summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore14
-rwxr-xr-xbin/createpackage.pl14
-rwxr-xr-xbin/createpackage.sh3
-rwxr-xr-xbin/syncqt48
-rw-r--r--config.tests/mac/corewlan/corewlan.pro3
-rw-r--r--config.tests/mac/corewlan/corewlantest.mm49
-rwxr-xr-xconfig.tests/unix/fvisibility.test39
-rw-r--r--config.tests/unix/networkmanager/main.cpp51
-rw-r--r--config.tests/unix/networkmanager/networkmanager.pro3
-rw-r--r--config.tests/unix/opengles1cl/opengles1cl.cpp51
-rw-r--r--config.tests/unix/opengles1cl/opengles1cl.pro9
-rw-r--r--config.tests/unix/pulseaudio/pulseaudio.pro4
-rw-r--r--config.tests/unix/pulseaudio/pulseaudiotest.cpp49
-rw-r--r--config.tests/x11/xvideo/xvideo.cpp52
-rw-r--r--config.tests/x11/xvideo/xvideo.pro4
-rwxr-xr-xconfigure557
-rwxr-xr-xconfigure.exebin1212416 -> 1008128 bytes
-rw-r--r--demos/browser/browsermainwindow.cpp2
-rw-r--r--demos/declarative/calculator/CalcButton.qml41
-rw-r--r--demos/declarative/calculator/calculator.js87
-rw-r--r--demos/declarative/calculator/calculator.qml124
-rw-r--r--demos/declarative/declarative.pro17
-rw-r--r--demos/declarative/flickr/common/ImageDetails.qml160
-rw-r--r--demos/declarative/flickr/common/LikeOMeter.qml35
-rw-r--r--demos/declarative/flickr/common/Loading.qml8
-rw-r--r--demos/declarative/flickr/common/MediaButton.qml41
-rw-r--r--demos/declarative/flickr/common/MediaLineEdit.qml104
-rw-r--r--demos/declarative/flickr/common/Progress.qml32
-rw-r--r--demos/declarative/flickr/common/RssModel.qml20
-rw-r--r--demos/declarative/flickr/common/ScrollBar.qml40
-rw-r--r--demos/declarative/flickr/common/Slider.qml36
-rw-r--r--demos/declarative/flickr/common/Star.qml45
-rw-r--r--demos/declarative/flickr/common/pics/background.pngbin0 -> 60504 bytes
-rw-r--r--demos/declarative/flickr/common/pics/button-pressed.pngbin0 -> 571 bytes
-rw-r--r--demos/declarative/flickr/common/pics/button-pressed.sci5
-rw-r--r--demos/declarative/flickr/common/pics/button.pngbin0 -> 564 bytes
-rw-r--r--demos/declarative/flickr/common/pics/button.sci5
-rw-r--r--demos/declarative/flickr/common/pics/ghns_star.pngbin0 -> 891 bytes
-rw-r--r--demos/declarative/flickr/common/pics/loading.pngbin0 -> 813 bytes
-rw-r--r--demos/declarative/flickr/common/pics/reflection.pngbin0 -> 4839 bytes
-rw-r--r--demos/declarative/flickr/common/pics/shadow-bottom.pngbin0 -> 656 bytes
-rw-r--r--demos/declarative/flickr/common/pics/shadow-corner.pngbin0 -> 405 bytes
-rw-r--r--demos/declarative/flickr/common/pics/shadow-right-screen.pngbin0 -> 227 bytes
-rw-r--r--demos/declarative/flickr/common/pics/shadow-right.pngbin0 -> 635 bytes
-rw-r--r--demos/declarative/flickr/common/qmldir10
-rw-r--r--demos/declarative/flickr/flickr-desktop.qml194
-rw-r--r--demos/declarative/flickr/flickr-mobile-90.qml11
-rw-r--r--demos/declarative/flickr/flickr-mobile.qml82
-rw-r--r--demos/declarative/flickr/mobile/Button.qml38
-rw-r--r--demos/declarative/flickr/mobile/GridDelegate.qml72
-rw-r--r--demos/declarative/flickr/mobile/ImageDetails.qml121
-rw-r--r--demos/declarative/flickr/mobile/ListDelegate.qml23
-rw-r--r--demos/declarative/flickr/mobile/TitleBar.qml76
-rw-r--r--demos/declarative/flickr/mobile/ToolBar.qml24
-rw-r--r--demos/declarative/flickr/mobile/images/gloss.pngbin0 -> 1236 bytes
-rw-r--r--demos/declarative/flickr/mobile/images/lineedit.pngbin0 -> 1415 bytes
-rw-r--r--demos/declarative/flickr/mobile/images/lineedit.sci5
-rw-r--r--demos/declarative/flickr/mobile/images/stripes.pngbin0 -> 257 bytes
-rw-r--r--demos/declarative/flickr/mobile/images/titlebar.pngbin0 -> 1436 bytes
-rw-r--r--demos/declarative/flickr/mobile/images/titlebar.sci5
-rw-r--r--demos/declarative/flickr/mobile/images/toolbutton.pngbin0 -> 2550 bytes
-rw-r--r--demos/declarative/flickr/mobile/images/toolbutton.sci5
-rw-r--r--demos/declarative/minehunt/MinehuntCore/Explosion.qml26
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/No-Ones-Laughing-3.jpgbin0 -> 30730 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/back.pngbin0 -> 558 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/bomb-color.pngbin0 -> 284 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/bomb.pngbin0 -> 535 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/face-sad.pngbin0 -> 14844 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/face-smile-big.pngbin0 -> 13810 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/face-smile.pngbin0 -> 15408 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/flag-color.pngbin0 -> 219 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/flag.pngbin0 -> 196 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/front.pngbin0 -> 580 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/star.pngbin0 -> 2677 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/qmldir2
-rw-r--r--demos/declarative/minehunt/README3
-rw-r--r--demos/declarative/minehunt/minehunt.cpp314
-rw-r--r--demos/declarative/minehunt/minehunt.pro25
-rw-r--r--demos/declarative/minehunt/minehunt.qml190
-rw-r--r--demos/declarative/samegame/SamegameCore/BoomBlock.qml55
-rw-r--r--demos/declarative/samegame/SamegameCore/Button.qml25
-rw-r--r--demos/declarative/samegame/SamegameCore/Dialog.qml22
-rw-r--r--demos/declarative/samegame/SamegameCore/pics/background.pngbin0 -> 313930 bytes
-rw-r--r--demos/declarative/samegame/SamegameCore/pics/blueStar.pngbin0 -> 278 bytes
-rw-r--r--demos/declarative/samegame/SamegameCore/pics/blueStone.pngbin0 -> 3054 bytes
-rw-r--r--demos/declarative/samegame/SamegameCore/pics/greenStar.pngbin0 -> 273 bytes
-rw-r--r--demos/declarative/samegame/SamegameCore/pics/greenStone.pngbin0 -> 2932 bytes
-rw-r--r--demos/declarative/samegame/SamegameCore/pics/redStar.pngbin0 -> 274 bytes
-rw-r--r--demos/declarative/samegame/SamegameCore/pics/redStone.pngbin0 -> 2902 bytes
-rw-r--r--demos/declarative/samegame/SamegameCore/pics/star.pngbin0 -> 262 bytes
-rw-r--r--demos/declarative/samegame/SamegameCore/pics/yellowStone.pngbin0 -> 3056 bytes
-rw-r--r--demos/declarative/samegame/SamegameCore/qmldir3
-rwxr-xr-xdemos/declarative/samegame/SamegameCore/samegame.js250
-rw-r--r--demos/declarative/samegame/highscores/README1
-rwxr-xr-xdemos/declarative/samegame/highscores/score_data.xml2
-rwxr-xr-xdemos/declarative/samegame/highscores/score_style.xsl28
-rwxr-xr-xdemos/declarative/samegame/highscores/scores.php34
-rw-r--r--demos/declarative/samegame/samegame.qml95
-rw-r--r--demos/declarative/snake/content/Button.qml25
-rw-r--r--demos/declarative/snake/content/Cookie.qml48
-rw-r--r--demos/declarative/snake/content/HighScoreModel.qml100
-rw-r--r--demos/declarative/snake/content/Link.qml75
-rw-r--r--demos/declarative/snake/content/Skull.qml21
-rw-r--r--demos/declarative/snake/content/pics/README1
-rw-r--r--demos/declarative/snake/content/pics/background.pngbin0 -> 144508 bytes
-rw-r--r--demos/declarative/snake/content/pics/blueStar.pngbin0 -> 272 bytes
-rw-r--r--demos/declarative/snake/content/pics/blueStone.pngbin0 -> 3139 bytes
-rw-r--r--demos/declarative/snake/content/pics/cookie.pngbin0 -> 2729 bytes
-rw-r--r--demos/declarative/snake/content/pics/eyes.svg118
-rw-r--r--demos/declarative/snake/content/pics/head.pngbin0 -> 3473 bytes
-rw-r--r--demos/declarative/snake/content/pics/head.svg134
-rw-r--r--demos/declarative/snake/content/pics/redStar.pngbin0 -> 273 bytes
-rw-r--r--demos/declarative/snake/content/pics/redStone.pngbin0 -> 3456 bytes
-rw-r--r--demos/declarative/snake/content/pics/skull.pngbin0 -> 2543 bytes
-rw-r--r--demos/declarative/snake/content/pics/snake.jpgbin0 -> 663901 bytes
-rw-r--r--demos/declarative/snake/content/pics/star.pngbin0 -> 262 bytes
-rw-r--r--demos/declarative/snake/content/pics/stoneShadow.pngbin0 -> 1699 bytes
-rw-r--r--demos/declarative/snake/content/pics/yellowStar.pngbin0 -> 276 bytes
-rw-r--r--demos/declarative/snake/content/pics/yellowStone.pngbin0 -> 2667 bytes
-rw-r--r--demos/declarative/snake/content/snake.js308
-rw-r--r--demos/declarative/snake/snake.qml190
-rw-r--r--demos/declarative/twitter/TwitterCore/AuthView.qml99
-rw-r--r--demos/declarative/twitter/TwitterCore/Button.qml49
-rw-r--r--demos/declarative/twitter/TwitterCore/FatDelegate.qml46
-rw-r--r--demos/declarative/twitter/TwitterCore/HomeTitleBar.qml121
-rw-r--r--demos/declarative/twitter/TwitterCore/Loading.qml8
-rw-r--r--demos/declarative/twitter/TwitterCore/MultiTitleBar.qml24
-rw-r--r--demos/declarative/twitter/TwitterCore/RssModel.qml44
-rw-r--r--demos/declarative/twitter/TwitterCore/TitleBar.qml77
-rw-r--r--demos/declarative/twitter/TwitterCore/ToolBar.qml24
-rw-r--r--demos/declarative/twitter/TwitterCore/UserModel.qml26
-rw-r--r--demos/declarative/twitter/TwitterCore/images/gloss.pngbin0 -> 1236 bytes
-rw-r--r--demos/declarative/twitter/TwitterCore/images/lineedit.pngbin0 -> 1415 bytes
-rw-r--r--demos/declarative/twitter/TwitterCore/images/lineedit.sci5
-rw-r--r--demos/declarative/twitter/TwitterCore/images/loading.pngbin0 -> 813 bytes
-rw-r--r--demos/declarative/twitter/TwitterCore/images/stripes.pngbin0 -> 257 bytes
-rw-r--r--demos/declarative/twitter/TwitterCore/images/titlebar.pngbin0 -> 1436 bytes
-rw-r--r--demos/declarative/twitter/TwitterCore/images/titlebar.sci5
-rw-r--r--demos/declarative/twitter/TwitterCore/images/toolbutton.pngbin0 -> 2550 bytes
-rw-r--r--demos/declarative/twitter/TwitterCore/images/toolbutton.sci5
-rw-r--r--demos/declarative/twitter/TwitterCore/qmldir10
-rw-r--r--demos/declarative/twitter/twitter.qml95
-rw-r--r--demos/declarative/webbrowser/content/FlickableWebView.qml165
-rw-r--r--demos/declarative/webbrowser/content/RectSoftShadow.qml32
-rw-r--r--demos/declarative/webbrowser/content/RetractingWebBrowserHeader.qml115
-rw-r--r--demos/declarative/webbrowser/content/fieldtext/FieldText.qml161
-rw-r--r--demos/declarative/webbrowser/content/fieldtext/pics/cancel.pngbin0 -> 1038 bytes
-rw-r--r--demos/declarative/webbrowser/content/fieldtext/pics/ok.pngbin0 -> 655 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/addressbar-filled.pngbin0 -> 694 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/addressbar-filled.sci6
-rw-r--r--demos/declarative/webbrowser/content/pics/addressbar.pngbin0 -> 467 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/addressbar.sci6
-rw-r--r--demos/declarative/webbrowser/content/pics/back-disabled.pngbin0 -> 475 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/back.pngbin0 -> 707 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/footer.pngbin0 -> 200 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/footer.sci6
-rw-r--r--demos/declarative/webbrowser/content/pics/forward-disabled.pngbin0 -> 471 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/forward.pngbin0 -> 682 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/header.pngbin0 -> 193 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/reload.pngbin0 -> 1283 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/softshadow-bottom.pngbin0 -> 186 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/softshadow-left.pngbin0 -> 598 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/softshadow-left.sci5
-rw-r--r--demos/declarative/webbrowser/content/pics/softshadow-right.pngbin0 -> 636 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/softshadow-right.sci5
-rw-r--r--demos/declarative/webbrowser/content/pics/softshadow-top.pngbin0 -> 186 bytes
-rw-r--r--demos/declarative/webbrowser/webbrowser.qml170
-rw-r--r--demos/demos.pro6
-rw-r--r--demos/interview/model.cpp2
-rw-r--r--demos/interview/model.h2
-rw-r--r--demos/mainwindow/mainwindow.cpp2
-rw-r--r--demos/multimedia/multimedia.pro4
-rw-r--r--demos/multimedia/player/main.cpp54
-rw-r--r--demos/multimedia/player/player.cpp361
-rw-r--r--demos/multimedia/player/player.h114
-rw-r--r--demos/multimedia/player/player.pro22
-rw-r--r--demos/multimedia/player/playercontrols.cpp205
-rw-r--r--demos/multimedia/player/playercontrols.h107
-rw-r--r--demos/multimedia/player/playlistmodel.cpp160
-rw-r--r--demos/multimedia/player/playlistmodel.h95
-rw-r--r--demos/multimedia/player/videowidget.cpp72
-rw-r--r--demos/multimedia/player/videowidget.h66
-rw-r--r--demos/qtdemo/qtdemo.pro2
-rw-r--r--demos/spreadsheet/spreadsheet.cpp1
-rw-r--r--dist/changes-4.7.0135
-rw-r--r--doc/doc.pri25
-rw-r--r--doc/src/declarative/advtutorial.qdoc379
-rw-r--r--doc/src/declarative/anchor-layout.qdoc111
-rw-r--r--doc/src/declarative/animation.qdoc266
-rw-r--r--doc/src/declarative/basictypes.qdoc358
-rw-r--r--doc/src/declarative/declarativeui.qdoc108
-rw-r--r--doc/src/declarative/dynamicobjects.qdoc179
-rw-r--r--doc/src/declarative/elements.qdoc207
-rw-r--r--doc/src/declarative/example-slideswitch.qdoc137
-rw-r--r--doc/src/declarative/examples.qdoc87
-rw-r--r--doc/src/declarative/extending-examples.qdoc309
-rw-r--r--doc/src/declarative/extending.qdoc982
-rw-r--r--doc/src/declarative/focus.qdoc340
-rw-r--r--doc/src/declarative/globalobject.qdoc316
-rw-r--r--doc/src/declarative/integrating.qdoc115
-rw-r--r--doc/src/declarative/javascriptblocks.qdoc225
-rw-r--r--doc/src/declarative/measuring-performance.qdoc122
-rw-r--r--doc/src/declarative/modules.qdoc187
-rw-r--r--doc/src/declarative/network.qdoc167
-rw-r--r--doc/src/declarative/pics/3d-axis.pngbin0 -> 13840 bytes
-rw-r--r--doc/src/declarative/pics/3d-rotation-axis.pngbin0 -> 11078 bytes
-rw-r--r--doc/src/declarative/pics/BorderImage.pngbin0 -> 8094 bytes
-rw-r--r--doc/src/declarative/pics/ListViewHighlight.pngbin0 -> 3582 bytes
-rw-r--r--doc/src/declarative/pics/ListViewHorizontal.pngbin0 -> 5802 bytes
-rw-r--r--doc/src/declarative/pics/ListViewSections.pngbin0 -> 7596 bytes
-rw-r--r--doc/src/declarative/pics/ListViewVertical.pngbin0 -> 2424 bytes
-rw-r--r--doc/src/declarative/pics/anatomy-component.pngbin0 -> 16117 bytes
-rw-r--r--doc/src/declarative/pics/anchors.svg92
-rw-r--r--doc/src/declarative/pics/animatedimageitem.gifbin0 -> 9997 bytes
-rw-r--r--doc/src/declarative/pics/axisrotation.pngbin0 -> 8891 bytes
-rw-r--r--doc/src/declarative/pics/blur_example.pngbin0 -> 64019 bytes
-rw-r--r--doc/src/declarative/pics/content.pngbin0 -> 1978 bytes
-rw-r--r--doc/src/declarative/pics/declarative-adv-tutorial1.pngbin0 -> 203229 bytes
-rw-r--r--doc/src/declarative/pics/declarative-adv-tutorial2.pngbin0 -> 249451 bytes
-rw-r--r--doc/src/declarative/pics/declarative-adv-tutorial3.pngbin0 -> 283378 bytes
-rw-r--r--doc/src/declarative/pics/declarative-adv-tutorial4.gifbin0 -> 1687445 bytes
-rw-r--r--doc/src/declarative/pics/declarative-qmlfocus1.pngbin0 -> 22047 bytes
-rw-r--r--doc/src/declarative/pics/declarative-qmlfocus2.pngbin0 -> 24225 bytes
-rw-r--r--doc/src/declarative/pics/declarative-qmlfocus3.pngbin0 -> 26300 bytes
-rw-r--r--doc/src/declarative/pics/declarative-qmlfocus4.pngbin0 -> 21401 bytes
-rw-r--r--doc/src/declarative/pics/dial-example.gifbin0 -> 566465 bytes
-rw-r--r--doc/src/declarative/pics/edge1.pngbin0 -> 3423 bytes
-rw-r--r--doc/src/declarative/pics/edge2.pngbin0 -> 3436 bytes
-rw-r--r--doc/src/declarative/pics/edge3.pngbin0 -> 3854 bytes
-rw-r--r--doc/src/declarative/pics/edge4.pngbin0 -> 5152 bytes
-rw-r--r--doc/src/declarative/pics/edges.pngbin0 -> 15226 bytes
-rw-r--r--doc/src/declarative/pics/edges.svg185
-rw-r--r--doc/src/declarative/pics/edges_examples.svg109
-rw-r--r--doc/src/declarative/pics/edges_qml.pngbin0 -> 21731 bytes
-rw-r--r--doc/src/declarative/pics/edges_qml.svg188
-rw-r--r--doc/src/declarative/pics/flickable.gifbin0 -> 185221 bytes
-rw-r--r--doc/src/declarative/pics/flipable.gifbin0 -> 80659 bytes
-rw-r--r--doc/src/declarative/pics/gradient.pngbin0 -> 364 bytes
-rw-r--r--doc/src/declarative/pics/gridLayout_example.pngbin0 -> 437 bytes
-rw-r--r--doc/src/declarative/pics/gridview.pngbin0 -> 10564 bytes
-rw-r--r--doc/src/declarative/pics/highlight.gifbin0 -> 18259 bytes
-rw-r--r--doc/src/declarative/pics/horizontalpositioner_example.pngbin0 -> 292 bytes
-rw-r--r--doc/src/declarative/pics/margins_qml.pngbin0 -> 18476 bytes
-rw-r--r--doc/src/declarative/pics/margins_qml.svg196
-rw-r--r--doc/src/declarative/pics/particles.gifbin0 -> 163068 bytes
-rw-r--r--doc/src/declarative/pics/pathview.gifbin0 -> 90512 bytes
-rw-r--r--doc/src/declarative/pics/positioner-add.gifbin0 -> 7821 bytes
-rw-r--r--doc/src/declarative/pics/positioner-move.gifbin0 -> 6154 bytes
-rw-r--r--doc/src/declarative/pics/positioner-remove.gifbin0 -> 5610 bytes
-rw-r--r--doc/src/declarative/pics/propanim.gifbin0 -> 74909 bytes
-rw-r--r--doc/src/declarative/pics/qml-context-object.pngbin0 -> 23602 bytes
-rw-r--r--doc/src/declarative/pics/qml-context-tree.pngbin0 -> 10337 bytes
-rw-r--r--doc/src/declarative/pics/qml-context.pngbin0 -> 61465 bytes
-rw-r--r--doc/src/declarative/pics/qml-scope.pngbin0 -> 47564 bytes
-rw-r--r--doc/src/declarative/pics/qmldebugger-creator.pngbin0 -> 170972 bytes
-rw-r--r--doc/src/declarative/pics/qtlogo.pngbin0 -> 2738 bytes
-rw-r--r--doc/src/declarative/pics/rect-smooth.pngbin0 -> 32162 bytes
-rw-r--r--doc/src/declarative/pics/reflection_example.pngbin0 -> 30919 bytes
-rw-r--r--doc/src/declarative/pics/repeater-index.pngbin0 -> 3024 bytes
-rw-r--r--doc/src/declarative/pics/repeater.pngbin0 -> 800 bytes
-rw-r--r--doc/src/declarative/pics/scalegrid.svg183
-rw-r--r--doc/src/declarative/pics/shadow_example.pngbin0 -> 4775 bytes
-rw-r--r--doc/src/declarative/pics/spacing_a.pngbin0 -> 547 bytes
-rw-r--r--doc/src/declarative/pics/spacing_b.pngbin0 -> 560 bytes
-rw-r--r--doc/src/declarative/pics/squish-transform.pngbin0 -> 9652 bytes
-rw-r--r--doc/src/declarative/pics/squish.pngbin0 -> 8590 bytes
-rw-r--r--doc/src/declarative/pics/switch-example.gifbin0 -> 25270 bytes
-rw-r--r--doc/src/declarative/pics/trivialListView.pngbin0 -> 5918 bytes
-rw-r--r--doc/src/declarative/pics/verticalpositioner_example.pngbin0 -> 385 bytes
-rw-r--r--doc/src/declarative/pics/verticalpositioner_transition.gifbin0 -> 12641 bytes
-rw-r--r--doc/src/declarative/pics/webview.pngbin0 -> 126662 bytes
-rw-r--r--doc/src/declarative/propertybinding.qdoc110
-rw-r--r--doc/src/declarative/qdeclarativedebugging.qdoc120
-rw-r--r--doc/src/declarative/qdeclarativedocument.qdoc190
-rw-r--r--doc/src/declarative/qdeclarativei18n.qdoc95
-rw-r--r--doc/src/declarative/qdeclarativeintro.qdoc351
-rw-r--r--doc/src/declarative/qdeclarativemodels.qdoc341
-rw-r--r--doc/src/declarative/qdeclarativereference.qdoc95
-rw-r--r--doc/src/declarative/qdeclarativestates.qdoc127
-rw-r--r--doc/src/declarative/qmlruntime.qdoc99
-rw-r--r--doc/src/declarative/qtbinding.qdoc402
-rw-r--r--doc/src/declarative/qtdeclarative.qdoc67
-rw-r--r--doc/src/declarative/qtprogrammers.qdoc163
-rw-r--r--doc/src/declarative/scope.qdoc380
-rw-r--r--doc/src/declarative/tutorial.qdoc239
-rw-r--r--doc/src/deployment/deployment.qdoc10
-rw-r--r--doc/src/development/assistant-manual.qdoc40
-rw-r--r--doc/src/development/developing-on-mac.qdoc40
-rw-r--r--doc/src/development/qmake-manual.qdoc18
-rw-r--r--doc/src/development/qtestlib.qdoc2
-rwxr-xr-xdoc/src/diagrams/contentspropagation/customwidget.py2
-rwxr-xr-xdoc/src/diagrams/contentspropagation/standardwidgets.py2
-rw-r--r--doc/src/diagrams/programs/mdiarea.py2
-rw-r--r--doc/src/diagrams/programs/qpen-dashpattern.py2
-rw-r--r--doc/src/diagrams/programs/standard_views.py2
-rw-r--r--doc/src/examples/completer.qdoc30
-rw-r--r--doc/src/examples/contextsensitivehelp.qdoc47
-rw-r--r--doc/src/examples/editabletreemodel.qdoc2
-rw-r--r--doc/src/examples/hellogl_es.qdoc23
-rw-r--r--doc/src/examples/svgalib.qdoc3
-rw-r--r--doc/src/files-and-resources/datastreamformat.qdoc19
-rw-r--r--doc/src/files-and-resources/resources.qdoc7
-rw-r--r--doc/src/frameworks-technologies/activeqt-server.qdoc7
-rw-r--r--doc/src/frameworks-technologies/activeqt.qdoc2
-rw-r--r--doc/src/frameworks-technologies/containers.qdoc11
-rw-r--r--doc/src/getting-started/demos.qdoc2
-rw-r--r--doc/src/getting-started/examples.qdoc2
-rw-r--r--doc/src/getting-started/installation.qdoc6
-rw-r--r--doc/src/howtos/timers.qdoc2
-rw-r--r--doc/src/images/container_bench.pngbin0 -> 71461 bytes
-rw-r--r--doc/src/images/declarative-anchors_example.pngbin0 -> 3654 bytes
-rw-r--r--doc/src/images/declarative-anchors_example2.pngbin0 -> 3819 bytes
-rw-r--r--doc/src/images/declarative-image_fillMode.gifbin0 -> 79561 bytes
-rw-r--r--doc/src/images/declarative-image_tile.pngbin0 -> 396 bytes
-rw-r--r--doc/src/images/declarative-item_opacity1.pngbin0 -> 464 bytes
-rw-r--r--doc/src/images/declarative-item_opacity2.pngbin0 -> 464 bytes
-rw-r--r--doc/src/images/declarative-item_stacking1.pngbin0 -> 460 bytes
-rw-r--r--doc/src/images/declarative-item_stacking2.pngbin0 -> 461 bytes
-rw-r--r--doc/src/images/declarative-item_stacking3.pngbin0 -> 464 bytes
-rw-r--r--doc/src/images/declarative-item_stacking4.pngbin0 -> 463 bytes
-rw-r--r--doc/src/images/declarative-nopercent.pngbin0 -> 553 bytes
-rw-r--r--doc/src/images/declarative-pathattribute.pngbin0 -> 7207 bytes
-rw-r--r--doc/src/images/declarative-pathcubic.pngbin0 -> 1261 bytes
-rw-r--r--doc/src/images/declarative-pathquad.pngbin0 -> 1517 bytes
-rw-r--r--doc/src/images/declarative-percent.pngbin0 -> 530 bytes
-rw-r--r--doc/src/images/declarative-qtlogo1.pngbin0 -> 3436 bytes
-rw-r--r--doc/src/images/declarative-qtlogo2.pngbin0 -> 11023 bytes
-rw-r--r--doc/src/images/declarative-qtlogo3.pngbin0 -> 4783 bytes
-rw-r--r--doc/src/images/declarative-qtlogo4.pngbin0 -> 11241 bytes
-rw-r--r--doc/src/images/declarative-qtlogo5.pngbin0 -> 3553 bytes
-rw-r--r--doc/src/images/declarative-qtlogo6.pngbin0 -> 4763 bytes
-rw-r--r--doc/src/images/declarative-rect.pngbin0 -> 674 bytes
-rw-r--r--doc/src/images/declarative-rect_gradient.pngbin0 -> 873 bytes
-rw-r--r--doc/src/images/declarative-rect_tint.pngbin0 -> 363 bytes
-rw-r--r--doc/src/images/declarative-removebutton-close.pngbin0 -> 3973 bytes
-rw-r--r--doc/src/images/declarative-removebutton-open.pngbin0 -> 5413 bytes
-rw-r--r--doc/src/images/declarative-removebutton.gifbin0 -> 183008 bytes
-rw-r--r--doc/src/images/declarative-removebutton.pngbin0 -> 6725 bytes
-rw-r--r--doc/src/images/declarative-reuse-1.pngbin0 -> 3489 bytes
-rw-r--r--doc/src/images/declarative-reuse-2.pngbin0 -> 3700 bytes
-rw-r--r--doc/src/images/declarative-reuse-3.pngbin0 -> 8829 bytes
-rw-r--r--doc/src/images/declarative-reuse-bluerect.pngbin0 -> 1474 bytes
-rw-r--r--doc/src/images/declarative-reuse-focus.pngbin0 -> 8026 bytes
-rw-r--r--doc/src/images/declarative-rotation.pngbin0 -> 667 bytes
-rw-r--r--doc/src/images/declarative-roundrect.pngbin0 -> 3058 bytes
-rw-r--r--doc/src/images/declarative-scale.pngbin0 -> 336 bytes
-rw-r--r--doc/src/images/declarative-scalegrid.pngbin0 -> 4228 bytes
-rw-r--r--doc/src/images/declarative-text.pngbin0 -> 3289 bytes
-rw-r--r--doc/src/images/declarative-textedit.gifbin0 -> 15286 bytes
-rw-r--r--doc/src/images/declarative-textformat.pngbin0 -> 11498 bytes
-rw-r--r--doc/src/images/declarative-textstyle.pngbin0 -> 6825 bytes
-rw-r--r--doc/src/images/declarative-transformorigin.pngbin0 -> 8927 bytes
-rw-r--r--doc/src/images/declarative-tutorial-list-closed.pngbin0 -> 11854 bytes
-rw-r--r--doc/src/images/declarative-tutorial-list-open.pngbin0 -> 14745 bytes
-rw-r--r--doc/src/images/declarative-tutorial-list.pngbin0 -> 10723 bytes
-rw-r--r--doc/src/images/declarative-tutorial1.pngbin0 -> 3577 bytes
-rw-r--r--doc/src/images/declarative-tutorial2.pngbin0 -> 3913 bytes
-rw-r--r--doc/src/images/declarative-tutorial3.gifbin0 -> 3317 bytes
-rw-r--r--doc/src/images/declarative-tutorial3_animation.gifbin0 -> 301974 bytes
-rw-r--r--doc/src/images/quick_screens.pngbin0 -> 128730 bytes
-rw-r--r--doc/src/index.qdoc5
-rw-r--r--doc/src/internationalization/i18n.qdoc5
-rw-r--r--doc/src/legal/3rdparty.qdoc167
-rw-r--r--doc/src/legal/commercialeditions.qdoc79
-rw-r--r--doc/src/legal/editions.qdoc4
-rw-r--r--doc/src/legal/licenses.qdoc18
-rw-r--r--doc/src/legal/opensourceedition.qdoc1
-rw-r--r--doc/src/legal/trademarks.qdoc2
-rw-r--r--doc/src/modules.qdoc73
-rw-r--r--doc/src/platforms/emb-pointer.qdoc6
-rw-r--r--doc/src/platforms/mac-differences.qdoc2
-rw-r--r--doc/src/platforms/platform-notes.qdoc8
-rw-r--r--doc/src/platforms/wince-opengl.qdoc13
-rw-r--r--doc/src/porting/porting4.qdoc9
-rw-r--r--doc/src/qt4-intro.qdoc74
-rw-r--r--doc/src/snippets/audio/main.cpp2
-rw-r--r--doc/src/snippets/code/doc_src_assistant-manual.qdoc8
-rw-r--r--doc/src/snippets/code/doc_src_emb-pointer.qdoc5
-rw-r--r--doc/src/snippets/code/doc_src_wince-opengl.qdoc2
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp5
-rw-r--r--doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp2
-rw-r--r--doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp9
-rw-r--r--doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp49
-rw-r--r--doc/src/snippets/declarative/border-image.qml31
-rw-r--r--doc/src/snippets/declarative/comments.qml11
-rw-r--r--doc/src/snippets/declarative/drag.qml18
-rw-r--r--doc/src/snippets/declarative/gradient.qml10
-rw-r--r--doc/src/snippets/declarative/gridview/dummydata/ContactModel.qml25
-rw-r--r--doc/src/snippets/declarative/gridview/gridview.qml47
-rw-r--r--doc/src/snippets/declarative/gridview/pics/portrait.pngbin0 -> 3126 bytes
-rw-r--r--doc/src/snippets/declarative/listview/dummydata/ContactModel.qml17
-rw-r--r--doc/src/snippets/declarative/listview/highlight.qml63
-rw-r--r--doc/src/snippets/declarative/listview/listview.qml49
-rw-r--r--doc/src/snippets/declarative/mouseregion.qml26
-rw-r--r--doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml17
-rw-r--r--doc/src/snippets/declarative/pathview/pathattributes.qml36
-rw-r--r--doc/src/snippets/declarative/pathview/pathview.qml30
-rw-r--r--doc/src/snippets/declarative/pathview/pics/qtlogo-64.pngbin0 -> 2991 bytes
-rw-r--r--doc/src/snippets/declarative/pics/qt.pngbin0 -> 514 bytes
-rw-r--r--doc/src/snippets/declarative/repeater-index.qml15
-rw-r--r--doc/src/snippets/declarative/repeater.qml16
-rw-r--r--doc/src/snippets/declarative/rotation.qml33
-rw-r--r--doc/src/tutorials/addressbook-fr.qdoc816
-rw-r--r--doc/src/widgets-and-layouts/stylesheet.qdoc4
-rw-r--r--doc/src/xml-processing/xml-patterns.qdoc5
-rw-r--r--doc/src/xml-processing/xquery-introduction.qdoc2
-rw-r--r--doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc96
-rw-r--r--doc/src/zh_CN/getting-started/tutorials.qdoc100
-rw-r--r--doc/src/zh_CN/tutorials/addressbook.qdoc673
-rw-r--r--doc/src/zh_CN/tutorials/widgets-tutorial.qdoc244
-rw-r--r--examples/assistant/README38
-rw-r--r--examples/assistant/assistant.pro10
-rw-r--r--examples/assistant/simpletextviewer/documentation/about.txt9
-rw-r--r--examples/assistant/simpletextviewer/documentation/browse.html34
-rw-r--r--examples/assistant/simpletextviewer/documentation/filedialog.html48
-rw-r--r--examples/assistant/simpletextviewer/documentation/findfile.html32
-rw-r--r--examples/assistant/simpletextviewer/documentation/images/browse.pngbin21553 -> 0 bytes
-rw-r--r--examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.pngbin9589 -> 0 bytes
-rw-r--r--examples/assistant/simpletextviewer/documentation/images/filedialog.pngbin12318 -> 0 bytes
-rw-r--r--examples/assistant/simpletextviewer/documentation/images/handbook.pngbin1060 -> 0 bytes
-rw-r--r--examples/assistant/simpletextviewer/documentation/images/mainwindow.pngbin12769 -> 0 bytes
-rw-r--r--examples/assistant/simpletextviewer/documentation/images/open.pngbin11697 -> 0 bytes
-rw-r--r--examples/assistant/simpletextviewer/documentation/images/wildcard.pngbin11266 -> 0 bytes
-rw-r--r--examples/assistant/simpletextviewer/documentation/index.html41
-rw-r--r--examples/assistant/simpletextviewer/documentation/intro.html28
-rw-r--r--examples/assistant/simpletextviewer/documentation/openfile.html36
-rw-r--r--examples/assistant/simpletextviewer/documentation/simpletextviewer.adp40
-rw-r--r--examples/assistant/simpletextviewer/documentation/wildcardmatching.html57
-rw-r--r--examples/assistant/simpletextviewer/findfiledialog.cpp221
-rw-r--r--examples/assistant/simpletextviewer/findfiledialog.h99
-rw-r--r--examples/assistant/simpletextviewer/main.cpp52
-rw-r--r--examples/assistant/simpletextviewer/mainwindow.cpp154
-rw-r--r--examples/assistant/simpletextviewer/mainwindow.h91
-rw-r--r--examples/assistant/simpletextviewer/simpletextviewer.pro18
-rw-r--r--examples/dbus/dbus-chat/chat_adaptor.cpp6
-rw-r--r--examples/dbus/dbus-chat/chat_adaptor.h24
-rw-r--r--examples/dbus/dbus-chat/chat_interface.cpp6
-rw-r--r--examples/dbus/dbus-chat/chat_interface.h10
-rw-r--r--examples/dbus/remotecontrolledcar/car/car.pro2
-rw-r--r--examples/dbus/remotecontrolledcar/car/car_adaptor.cpp22
-rw-r--r--examples/dbus/remotecontrolledcar/car/car_adaptor.h97
-rw-r--r--examples/dbus/remotecontrolledcar/car/car_adaptor_p.h97
-rw-r--r--examples/dbus/remotecontrolledcar/car/main.cpp4
-rw-r--r--examples/dbus/remotecontrolledcar/controller/car_interface.cpp15
-rw-r--r--examples/dbus/remotecontrolledcar/controller/car_interface.h114
-rw-r--r--examples/dbus/remotecontrolledcar/controller/car_interface_p.h114
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.cpp4
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.h5
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.pro2
-rw-r--r--examples/declarative/animations/color-animation.qml70
-rw-r--r--examples/declarative/animations/easing.qml99
-rw-r--r--examples/declarative/animations/images/face-smile.pngbin0 -> 15408 bytes
-rw-r--r--examples/declarative/animations/images/moon.pngbin0 -> 2433 bytes
-rw-r--r--examples/declarative/animations/images/shadow.pngbin0 -> 425 bytes
-rw-r--r--examples/declarative/animations/images/star.pngbin0 -> 349 bytes
-rw-r--r--examples/declarative/animations/images/sun.pngbin0 -> 8153 bytes
-rw-r--r--examples/declarative/animations/property-animation.qml64
-rw-r--r--examples/declarative/aspectratio/face_fit.qml26
-rw-r--r--examples/declarative/aspectratio/face_fit_animated.qml28
-rw-r--r--examples/declarative/aspectratio/pics/face.pngbin0 -> 15408 bytes
-rw-r--r--examples/declarative/aspectratio/scale_and_crop.qml21
-rw-r--r--examples/declarative/aspectratio/scale_and_crop_simple.qml20
-rw-r--r--examples/declarative/aspectratio/scale_and_sidecrop.qml22
-rw-r--r--examples/declarative/aspectratio/scale_to_fit.qml22
-rw-r--r--examples/declarative/aspectratio/scale_to_fit_simple.qml20
-rw-r--r--examples/declarative/behaviours/SideRect.qml17
-rw-r--r--examples/declarative/behaviours/behavior.qml72
-rw-r--r--examples/declarative/border-image/animated.qml55
-rw-r--r--examples/declarative/border-image/borders.qml18
-rw-r--r--examples/declarative/border-image/content/MyBorderImage.qml37
-rw-r--r--examples/declarative/border-image/content/bw.pngbin0 -> 1357 bytes
-rw-r--r--examples/declarative/border-image/content/colors-round.sci7
-rw-r--r--examples/declarative/border-image/content/colors-stretch.sci5
-rw-r--r--examples/declarative/border-image/content/colors.pngbin0 -> 1655 bytes
-rw-r--r--examples/declarative/clocks/clocks.qml15
-rw-r--r--examples/declarative/clocks/content/Clock.qml80
-rw-r--r--examples/declarative/clocks/content/background.pngbin0 -> 46895 bytes
-rwxr-xr-xexamples/declarative/clocks/content/center.pngbin0 -> 765 bytes
-rwxr-xr-xexamples/declarative/clocks/content/clock-night.pngbin0 -> 23359 bytes
-rwxr-xr-xexamples/declarative/clocks/content/clock.pngbin0 -> 20653 bytes
-rwxr-xr-xexamples/declarative/clocks/content/hour.pngbin0 -> 625 bytes
-rwxr-xr-xexamples/declarative/clocks/content/minute.pngbin0 -> 625 bytes
-rwxr-xr-xexamples/declarative/clocks/content/second.pngbin0 -> 303 bytes
-rw-r--r--examples/declarative/colorbrowser/colorbrowser.qml101
-rw-r--r--examples/declarative/colorbrowser/dummydata/ColorsModel.qml96
-rw-r--r--examples/declarative/colorbrowser/qml/ColorDelegate.qml114
-rw-r--r--examples/declarative/colorbrowser/qml/box-shadow.pngbin0 -> 871 bytes
-rw-r--r--examples/declarative/colorbrowser/qml/box.pngbin0 -> 765 bytes
-rw-r--r--examples/declarative/connections/connections.qml27
-rw-r--r--examples/declarative/connections/content/Button.qml12
-rw-r--r--examples/declarative/connections/content/bg1.jpgbin0 -> 23771 bytes
-rw-r--r--examples/declarative/connections/content/rotate-left.pngbin0 -> 3061 bytes
-rw-r--r--examples/declarative/connections/content/rotate-right.pngbin0 -> 3115 bytes
-rw-r--r--examples/declarative/declarative.pro48
-rw-r--r--examples/declarative/dial/content/Dial.qml37
-rw-r--r--examples/declarative/dial/content/background.pngbin0 -> 35876 bytes
-rw-r--r--examples/declarative/dial/content/needle.pngbin0 -> 342 bytes
-rw-r--r--examples/declarative/dial/content/needle_shadow.pngbin0 -> 632 bytes
-rw-r--r--examples/declarative/dial/content/overlay.pngbin0 -> 3564 bytes
-rw-r--r--examples/declarative/dial/dial.qml35
-rw-r--r--examples/declarative/dynamic/dynamic.qml121
-rw-r--r--examples/declarative/dynamic/images/NOTE1
-rw-r--r--examples/declarative/dynamic/images/face-smile.pngbin0 -> 15408 bytes
-rw-r--r--examples/declarative/dynamic/images/moon.pngbin0 -> 1757 bytes
-rw-r--r--examples/declarative/dynamic/images/rabbit_brown.pngbin0 -> 1245 bytes
-rw-r--r--examples/declarative/dynamic/images/rabbit_bw.pngbin0 -> 1759 bytes
-rw-r--r--examples/declarative/dynamic/images/star.pngbin0 -> 349 bytes
-rw-r--r--examples/declarative/dynamic/images/sun.pngbin0 -> 8153 bytes
-rw-r--r--examples/declarative/dynamic/images/tree_s.pngbin0 -> 3406 bytes
-rw-r--r--examples/declarative/dynamic/qml/Button.qml24
-rw-r--r--examples/declarative/dynamic/qml/GenericItem.qml13
-rw-r--r--examples/declarative/dynamic/qml/PaletteItem.qml13
-rw-r--r--examples/declarative/dynamic/qml/PerspectiveItem.qml16
-rw-r--r--examples/declarative/dynamic/qml/Sun.qml24
-rw-r--r--examples/declarative/dynamic/qml/itemCreation.js82
-rw-r--r--examples/declarative/effects/effects.qml60
-rw-r--r--examples/declarative/effects/pic.pngbin0 -> 12933 bytes
-rw-r--r--examples/declarative/extending/adding/adding.pro15
-rw-r--r--examples/declarative/extending/adding/adding.qrc5
-rw-r--r--examples/declarative/extending/adding/example.qml8
-rw-r--r--examples/declarative/extending/adding/main.cpp64
-rw-r--r--examples/declarative/extending/adding/person.cpp69
-rw-r--r--examples/declarative/extending/adding/person.h67
-rw-r--r--examples/declarative/extending/attached/attached.pro17
-rw-r--r--examples/declarative/extending/attached/attached.qrc5
-rw-r--r--examples/declarative/extending/attached/birthdayparty.cpp92
-rw-r--r--examples/declarative/extending/attached/birthdayparty.h89
-rw-r--r--examples/declarative/extending/attached/example.qml29
-rw-r--r--examples/declarative/extending/attached/main.cpp91
-rw-r--r--examples/declarative/extending/attached/person.cpp119
-rw-r--r--examples/declarative/extending/attached/person.h107
-rw-r--r--examples/declarative/extending/binding/binding.pro19
-rw-r--r--examples/declarative/extending/binding/binding.qrc5
-rw-r--r--examples/declarative/extending/binding/birthdayparty.cpp114
-rw-r--r--examples/declarative/extending/binding/birthdayparty.h105
-rw-r--r--examples/declarative/extending/binding/example.qml37
-rw-r--r--examples/declarative/extending/binding/happybirthday.cpp86
-rw-r--r--examples/declarative/extending/binding/happybirthday.h76
-rw-r--r--examples/declarative/extending/binding/main.cpp94
-rw-r--r--examples/declarative/extending/binding/person.cpp139
-rw-r--r--examples/declarative/extending/binding/person.h115
-rw-r--r--examples/declarative/extending/coercion/birthdayparty.cpp72
-rw-r--r--examples/declarative/extending/coercion/birthdayparty.h71
-rw-r--r--examples/declarative/extending/coercion/coercion.pro17
-rw-r--r--examples/declarative/extending/coercion/coercion.qrc5
-rw-r--r--examples/declarative/extending/coercion/example.qml15
-rw-r--r--examples/declarative/extending/coercion/main.cpp78
-rw-r--r--examples/declarative/extending/coercion/person.cpp80
-rw-r--r--examples/declarative/extending/coercion/person.h81
-rw-r--r--examples/declarative/extending/default/birthdayparty.cpp72
-rw-r--r--examples/declarative/extending/default/birthdayparty.h72
-rw-r--r--examples/declarative/extending/default/default.pro17
-rw-r--r--examples/declarative/extending/default/default.qrc5
-rw-r--r--examples/declarative/extending/default/example.qml14
-rw-r--r--examples/declarative/extending/default/main.cpp76
-rw-r--r--examples/declarative/extending/default/person.cpp79
-rw-r--r--examples/declarative/extending/default/person.h79
-rw-r--r--examples/declarative/extending/extended/example.qml7
-rw-r--r--examples/declarative/extending/extended/extended.pro15
-rw-r--r--examples/declarative/extending/extended/extended.qrc5
-rw-r--r--examples/declarative/extending/extended/lineedit.cpp105
-rw-r--r--examples/declarative/extending/extended/lineedit.h74
-rw-r--r--examples/declarative/extending/extended/main.cpp65
-rw-r--r--examples/declarative/extending/extending.pro13
-rw-r--r--examples/declarative/extending/grouped/birthdayparty.cpp72
-rw-r--r--examples/declarative/extending/grouped/birthdayparty.h70
-rw-r--r--examples/declarative/extending/grouped/example.qml33
-rw-r--r--examples/declarative/extending/grouped/grouped.pro17
-rw-r--r--examples/declarative/extending/grouped/grouped.qrc5
-rw-r--r--examples/declarative/extending/grouped/main.cpp86
-rw-r--r--examples/declarative/extending/grouped/person.cpp119
-rw-r--r--examples/declarative/extending/grouped/person.h109
-rw-r--r--examples/declarative/extending/properties/birthdayparty.cpp74
-rw-r--r--examples/declarative/extending/properties/birthdayparty.h77
-rw-r--r--examples/declarative/extending/properties/example.qml15
-rw-r--r--examples/declarative/extending/properties/main.cpp69
-rw-r--r--examples/declarative/extending/properties/person.cpp67
-rw-r--r--examples/declarative/extending/properties/person.h65
-rw-r--r--examples/declarative/extending/properties/properties.pro18
-rw-r--r--examples/declarative/extending/properties/properties.qrc5
-rw-r--r--examples/declarative/extending/signal/birthdayparty.cpp99
-rw-r--r--examples/declarative/extending/signal/birthdayparty.h96
-rw-r--r--examples/declarative/extending/signal/example.qml32
-rw-r--r--examples/declarative/extending/signal/main.cpp92
-rw-r--r--examples/declarative/extending/signal/person.cpp119
-rw-r--r--examples/declarative/extending/signal/person.h107
-rw-r--r--examples/declarative/extending/signal/signal.pro17
-rw-r--r--examples/declarative/extending/signal/signal.qrc5
-rw-r--r--examples/declarative/extending/valuesource/birthdayparty.cpp109
-rw-r--r--examples/declarative/extending/valuesource/birthdayparty.h102
-rw-r--r--examples/declarative/extending/valuesource/example.qml36
-rw-r--r--examples/declarative/extending/valuesource/happybirthday.cpp81
-rw-r--r--examples/declarative/extending/valuesource/happybirthday.h80
-rw-r--r--examples/declarative/extending/valuesource/main.cpp94
-rw-r--r--examples/declarative/extending/valuesource/person.cpp119
-rw-r--r--examples/declarative/extending/valuesource/person.h107
-rw-r--r--examples/declarative/extending/valuesource/valuesource.pro19
-rw-r--r--examples/declarative/extending/valuesource/valuesource.qrc5
-rw-r--r--examples/declarative/fillmode/face.pngbin0 -> 905 bytes
-rw-r--r--examples/declarative/fillmode/fillmode.qml41
-rw-r--r--examples/declarative/flipable/back.pngbin0 -> 5048 bytes
-rw-r--r--examples/declarative/flipable/flipable.qml37
-rw-r--r--examples/declarative/flipable/front.pngbin0 -> 6431 bytes
-rw-r--r--examples/declarative/focusscope/test.qml76
-rw-r--r--examples/declarative/focusscope/test2.qml40
-rw-r--r--examples/declarative/focusscope/test3.qml52
-rw-r--r--examples/declarative/focusscope/test4.qml75
-rw-r--r--examples/declarative/focusscope/test5.qml83
-rw-r--r--examples/declarative/fonts/banner.qml18
-rw-r--r--examples/declarative/fonts/fonts.qml56
-rw-r--r--examples/declarative/fonts/fonts/tarzeau_ocr_a.ttfbin0 -> 24544 bytes
-rw-r--r--examples/declarative/fonts/hello.qml27
-rw-r--r--examples/declarative/gridview/gridview.qml38
-rw-r--r--examples/declarative/gridview/pics/AddressBook_48.pngbin0 -> 3350 bytes
-rw-r--r--examples/declarative/gridview/pics/AudioPlayer_48.pngbin0 -> 3806 bytes
-rw-r--r--examples/declarative/gridview/pics/Camera_48.pngbin0 -> 3540 bytes
-rw-r--r--examples/declarative/gridview/pics/DateBook_48.pngbin0 -> 2610 bytes
-rw-r--r--examples/declarative/gridview/pics/EMail_48.pngbin0 -> 3655 bytes
-rw-r--r--examples/declarative/gridview/pics/TodoList_48.pngbin0 -> 3429 bytes
-rw-r--r--examples/declarative/gridview/pics/VideoPlayer_48.pngbin0 -> 4151 bytes
-rw-r--r--examples/declarative/imageprovider/ImageProviderCore/qmldir2
-rw-r--r--examples/declarative/imageprovider/imageprovider.cpp108
-rw-r--r--examples/declarative/imageprovider/imageprovider.pro21
-rw-r--r--examples/declarative/imageprovider/imageprovider.qml23
-rw-r--r--examples/declarative/layouts/Button.qml22
-rw-r--r--examples/declarative/layouts/add.pngbin0 -> 1577 bytes
-rw-r--r--examples/declarative/layouts/del.pngbin0 -> 1661 bytes
-rw-r--r--examples/declarative/layouts/layouts.qml31
-rw-r--r--examples/declarative/layouts/positioners.qml163
-rw-r--r--examples/declarative/listview/content/ClickAutoRepeating.qml31
-rw-r--r--examples/declarative/listview/content/MediaButton.qml35
-rw-r--r--examples/declarative/listview/content/pics/add.pngbin0 -> 1577 bytes
-rw-r--r--examples/declarative/listview/content/pics/archive-insert.pngbin0 -> 896 bytes
-rw-r--r--examples/declarative/listview/content/pics/archive-remove.pngbin0 -> 1074 bytes
-rw-r--r--examples/declarative/listview/content/pics/button-pressed.pngbin0 -> 571 bytes
-rw-r--r--examples/declarative/listview/content/pics/button.pngbin0 -> 564 bytes
-rw-r--r--examples/declarative/listview/content/pics/del.pngbin0 -> 1661 bytes
-rw-r--r--examples/declarative/listview/content/pics/fruit-salad.jpgbin0 -> 17952 bytes
-rw-r--r--examples/declarative/listview/content/pics/go-down.pngbin0 -> 892 bytes
-rw-r--r--examples/declarative/listview/content/pics/go-up.pngbin0 -> 929 bytes
-rw-r--r--examples/declarative/listview/content/pics/hamburger.jpgbin0 -> 8572 bytes
-rw-r--r--examples/declarative/listview/content/pics/lemonade.jpgbin0 -> 6645 bytes
-rw-r--r--examples/declarative/listview/content/pics/list-add.pngbin0 -> 907 bytes
-rw-r--r--examples/declarative/listview/content/pics/list-remove.pngbin0 -> 498 bytes
-rw-r--r--examples/declarative/listview/content/pics/moreDown.pngbin0 -> 217 bytes
-rw-r--r--examples/declarative/listview/content/pics/moreUp.pngbin0 -> 212 bytes
-rw-r--r--examples/declarative/listview/content/pics/pancakes.jpgbin0 -> 9163 bytes
-rw-r--r--examples/declarative/listview/content/pics/trash.pngbin0 -> 989 bytes
-rw-r--r--examples/declarative/listview/content/pics/vegetable-soup.jpgbin0 -> 8639 bytes
-rw-r--r--examples/declarative/listview/dummydata/MyPetsModel.qml61
-rw-r--r--examples/declarative/listview/dummydata/Recipes.qml90
-rw-r--r--examples/declarative/listview/dynamic.qml159
-rw-r--r--examples/declarative/listview/highlight.qml57
-rw-r--r--examples/declarative/listview/itemlist.qml58
-rw-r--r--examples/declarative/listview/listview.qml77
-rw-r--r--examples/declarative/listview/recipes.qml140
-rw-r--r--examples/declarative/listview/sections.qml67
-rw-r--r--examples/declarative/mousearea/mouse.qml40
-rw-r--r--examples/declarative/objectlistmodel/dataobject.cpp73
-rw-r--r--examples/declarative/objectlistmodel/dataobject.h69
-rw-r--r--examples/declarative/objectlistmodel/main.cpp77
-rw-r--r--examples/declarative/objectlistmodel/objectlistmodel.pro18
-rw-r--r--examples/declarative/objectlistmodel/objectlistmodel.qrc5
-rw-r--r--examples/declarative/objectlistmodel/view.qml16
-rw-r--r--examples/declarative/package/Delegate.qml48
-rw-r--r--examples/declarative/package/view.qml35
-rw-r--r--examples/declarative/parallax/parallax.qml41
-rw-r--r--examples/declarative/parallax/pics/background.jpgbin0 -> 209814 bytes
-rw-r--r--examples/declarative/parallax/pics/face-smile.pngbin0 -> 15408 bytes
-rw-r--r--examples/declarative/parallax/pics/home-page.svg445
-rw-r--r--examples/declarative/parallax/pics/shadow.pngbin0 -> 425 bytes
-rw-r--r--examples/declarative/parallax/pics/yast-joystick.pngbin0 -> 2723 bytes
-rw-r--r--examples/declarative/parallax/pics/yast-wol.pngbin0 -> 3769 bytes
-rw-r--r--examples/declarative/parallax/qml/ParallaxView.qml84
-rw-r--r--examples/declarative/parallax/qml/Smiley.qml47
-rw-r--r--examples/declarative/plugins/README9
-rw-r--r--examples/declarative/plugins/com/nokia/TimeExample/Clock.qml50
-rw-r--r--examples/declarative/plugins/com/nokia/TimeExample/center.pngbin0 -> 765 bytes
-rw-r--r--examples/declarative/plugins/com/nokia/TimeExample/clock.pngbin0 -> 20653 bytes
-rw-r--r--examples/declarative/plugins/com/nokia/TimeExample/hour.pngbin0 -> 625 bytes
-rw-r--r--examples/declarative/plugins/com/nokia/TimeExample/minute.pngbin0 -> 625 bytes
-rw-r--r--examples/declarative/plugins/com/nokia/TimeExample/qmldir2
-rw-r--r--examples/declarative/plugins/plugin.cpp156
-rw-r--r--examples/declarative/plugins/plugins.pro27
-rw-r--r--examples/declarative/plugins/plugins.qml11
-rw-r--r--examples/declarative/progressbar/content/ProgressBar.qml36
-rw-r--r--examples/declarative/progressbar/content/background.pngbin0 -> 426 bytes
-rw-r--r--examples/declarative/progressbar/progressbars.qml24
-rw-r--r--examples/declarative/scrollbar/ScrollBar.qml31
-rw-r--r--examples/declarative/scrollbar/display.qml58
-rw-r--r--examples/declarative/scrollbar/pics/niagara_falls.jpgbin0 -> 604121 bytes
-rw-r--r--examples/declarative/searchbox/SearchBox.qml60
-rw-r--r--examples/declarative/searchbox/images/edit-clear-locationbar-rtl.pngbin0 -> 429 bytes
-rw-r--r--examples/declarative/searchbox/images/lineedit-bg-focus.pngbin0 -> 526 bytes
-rw-r--r--examples/declarative/searchbox/images/lineedit-bg.pngbin0 -> 426 bytes
-rw-r--r--examples/declarative/searchbox/main.qml13
-rw-r--r--examples/declarative/slideswitch/content/Switch.qml73
-rw-r--r--examples/declarative/slideswitch/content/background.svg23
-rw-r--r--examples/declarative/slideswitch/content/knob.svg867
-rw-r--r--examples/declarative/slideswitch/slideswitch.qml11
-rw-r--r--examples/declarative/sql/hello.qml31
-rw-r--r--examples/declarative/states/states.qml50
-rw-r--r--examples/declarative/states/transitions.qml70
-rw-r--r--examples/declarative/states/user.pngbin0 -> 4886 bytes
-rw-r--r--examples/declarative/tabwidget/TabWidget.qml50
-rw-r--r--examples/declarative/tabwidget/tab.pngbin0 -> 507 bytes
-rw-r--r--examples/declarative/tabwidget/tabs.qml48
-rw-r--r--examples/declarative/tic-tac-toe/content/TicTac.qml20
-rw-r--r--examples/declarative/tic-tac-toe/content/pics/board.pngbin0 -> 5524 bytes
-rw-r--r--examples/declarative/tic-tac-toe/content/pics/o.pngbin0 -> 1470 bytes
-rw-r--r--examples/declarative/tic-tac-toe/content/pics/x.pngbin0 -> 1331 bytes
-rw-r--r--examples/declarative/tic-tac-toe/tic-tac-toe.qml115
-rw-r--r--examples/declarative/tutorials/helloworld/Cell.qml32
-rw-r--r--examples/declarative/tutorials/helloworld/tutorial1.qml22
-rw-r--r--examples/declarative/tutorials/helloworld/tutorial2.qml31
-rw-r--r--examples/declarative/tutorials/helloworld/tutorial3.qml51
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/Block.qml12
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/Button.qml27
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/samegame.qml40
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/Block.qml10
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/Button.qml25
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/samegame.js61
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/samegame.qml43
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/Block.qml21
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/Button.qml25
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/Dialog.qml23
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/samegame.js189
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/samegame.qml62
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml63
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/Button.qml25
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml21
-rwxr-xr-xexamples/declarative/tutorials/samegame/samegame4/content/samegame.js249
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/highscores/README1
-rwxr-xr-xexamples/declarative/tutorials/samegame/samegame4/highscores/score_data.xml2
-rwxr-xr-xexamples/declarative/tutorials/samegame/samegame4/highscores/score_style.xsl28
-rwxr-xr-xexamples/declarative/tutorials/samegame/samegame4/highscores/scores.php34
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/samegame.qml77
-rw-r--r--examples/declarative/tutorials/samegame/shared/pics/background.jpgbin0 -> 36473 bytes
-rw-r--r--examples/declarative/tutorials/samegame/shared/pics/blueStar.pngbin0 -> 278 bytes
-rw-r--r--examples/declarative/tutorials/samegame/shared/pics/blueStone.pngbin0 -> 3054 bytes
-rw-r--r--examples/declarative/tutorials/samegame/shared/pics/greenStar.pngbin0 -> 273 bytes
-rw-r--r--examples/declarative/tutorials/samegame/shared/pics/greenStone.pngbin0 -> 2932 bytes
-rw-r--r--examples/declarative/tutorials/samegame/shared/pics/redStar.pngbin0 -> 274 bytes
-rw-r--r--examples/declarative/tutorials/samegame/shared/pics/redStone.pngbin0 -> 2902 bytes
-rw-r--r--examples/declarative/tutorials/samegame/shared/pics/star.pngbin0 -> 262 bytes
-rw-r--r--examples/declarative/tutorials/samegame/shared/pics/yellowStone.pngbin0 -> 3056 bytes
-rw-r--r--examples/declarative/tvtennis/click.wavbin0 -> 3056 bytes
-rw-r--r--examples/declarative/tvtennis/paddle.wavbin0 -> 5320 bytes
-rw-r--r--examples/declarative/tvtennis/tvtennis.qml78
-rw-r--r--examples/declarative/velocity/Day.qml78
-rw-r--r--examples/declarative/velocity/cork.jpgbin0 -> 88766 bytes
-rw-r--r--examples/declarative/velocity/sticky.pngbin0 -> 15319 bytes
-rw-r--r--examples/declarative/velocity/tack.pngbin0 -> 7282 bytes
-rw-r--r--examples/declarative/velocity/velocity.qml108
-rw-r--r--examples/declarative/webview/autosize.qml61
-rw-r--r--examples/declarative/webview/content/FieldText.qml161
-rw-r--r--examples/declarative/webview/content/Mapping/Map.qml21
-rwxr-xr-xexamples/declarative/webview/content/Mapping/map.html47
-rw-r--r--examples/declarative/webview/content/SpinSquare.qml25
-rw-r--r--examples/declarative/webview/content/pics/cancel.pngbin0 -> 1038 bytes
-rw-r--r--examples/declarative/webview/content/pics/ok.pngbin0 -> 655 bytes
-rw-r--r--examples/declarative/webview/evalandattach.html31
-rw-r--r--examples/declarative/webview/evalandattach.qml55
-rw-r--r--examples/declarative/webview/googleMaps.qml32
-rw-r--r--examples/declarative/webview/inline-html.qml15
-rw-r--r--examples/declarative/webview/newwindows.html3
-rw-r--r--examples/declarative/webview/newwindows.qml31
-rw-r--r--examples/declarative/webview/qdeclarative-in-html.qml33
-rw-r--r--examples/declarative/webview/transparent.qml14
-rw-r--r--examples/declarative/workerlistmodel/dataloader.js14
-rw-r--r--examples/declarative/workerlistmodel/timedisplay.qml33
-rw-r--r--examples/declarative/workerscript/workerscript.js15
-rw-r--r--examples/declarative/workerscript/workerscript.qml47
-rw-r--r--examples/declarative/xmldata/daringfireball.qml45
-rw-r--r--examples/declarative/xmldata/yahoonews.qml79
-rw-r--r--examples/declarative/xmlhttprequest/test.qml36
-rw-r--r--examples/declarative/xmlhttprequest/test.xml5
-rw-r--r--examples/dialogs/standarddialogs/dialog.cpp7
-rw-r--r--examples/draganddrop/draggabletext/dragwidget.cpp2
-rw-r--r--examples/examples.pro7
-rw-r--r--examples/help/remotecontrol/remotecontrol.cpp2
-rw-r--r--examples/help/simpletextviewer/assistant.cpp2
-rw-r--r--examples/itemviews/dirview/main.cpp3
-rw-r--r--examples/multimedia/audioinput/audioinput.cpp8
-rw-r--r--examples/network/bearercloud/bearercloud.cpp197
-rw-r--r--examples/network/bearercloud/bearercloud.h81
-rw-r--r--examples/network/bearercloud/bearercloud.pro16
-rw-r--r--examples/network/bearercloud/cloud.cpp361
-rw-r--r--examples/network/bearercloud/cloud.h99
-rw-r--r--examples/network/bearercloud/icons.qrc7
-rw-r--r--examples/network/bearercloud/lan.svg76
-rw-r--r--examples/network/bearercloud/main.cpp89
-rw-r--r--examples/network/bearercloud/unknown.svg76
-rw-r--r--examples/network/bearercloud/wlan.svg151
-rw-r--r--examples/network/bearermonitor/bearermonitor.cpp395
-rw-r--r--examples/network/bearermonitor/bearermonitor.h92
-rw-r--r--examples/network/bearermonitor/bearermonitor.pro26
-rw-r--r--examples/network/bearermonitor/bearermonitor_240_320.ui420
-rw-r--r--examples/network/bearermonitor/bearermonitor_640_480.ui386
-rw-r--r--examples/network/bearermonitor/main.cpp55
-rw-r--r--examples/network/bearermonitor/sessionwidget.cpp177
-rw-r--r--examples/network/bearermonitor/sessionwidget.h78
-rw-r--r--examples/network/bearermonitor/sessionwidget.ui307
-rw-r--r--examples/network/network.pro4
-rw-r--r--examples/opengl/hellogl_es/cl_helper.h133
-rw-r--r--examples/opengl/hellogl_es/glwidget.cpp137
-rw-r--r--examples/opengl/hellogl_es/glwidget.h5
-rw-r--r--examples/opengl/opengl.pro6
-rw-r--r--examples/qtestlib/tutorial5/containers.cpp269
-rw-r--r--examples/qws/svgalib/README12
-rw-r--r--examples/qws/svgalib/svgalibpaintdevice.cpp2
-rw-r--r--examples/qws/svgalib/svgalibpaintengine.cpp45
-rw-r--r--examples/qws/svgalib/svgalibpaintengine.h6
-rw-r--r--examples/threads/waitconditions/waitconditions.pro2
-rw-r--r--examples/tools/completer/completer.pro4
-rw-r--r--examples/tools/completer/dirmodel.cpp63
-rw-r--r--examples/tools/completer/dirmodel.h61
-rw-r--r--examples/tools/completer/fsmodel.cpp64
-rw-r--r--examples/tools/completer/fsmodel.h61
-rw-r--r--examples/tools/completer/mainwindow.cpp20
-rw-r--r--examples/tutorials/addressbook/part3/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part4/addressbook.cpp2
-rw-r--r--examples/webkit/fancybrowser/main.cpp9
-rw-r--r--examples/webkit/fancybrowser/mainwindow.cpp27
-rw-r--r--examples/webkit/fancybrowser/mainwindow.h5
-rw-r--r--mkspecs/aix-g++-64/qmake.conf1
-rw-r--r--mkspecs/aix-g++-64/qplatformdefs.h127
-rw-r--r--mkspecs/aix-g++/qmake.conf1
-rw-r--r--mkspecs/aix-g++/qplatformdefs.h127
-rw-r--r--mkspecs/aix-xlc-64/qmake.conf1
-rw-r--r--mkspecs/aix-xlc-64/qplatformdefs.h113
-rw-r--r--mkspecs/aix-xlc/qmake.conf1
-rw-r--r--mkspecs/aix-xlc/qplatformdefs.h123
-rw-r--r--mkspecs/common/aix/qplatformdefs.h120
-rw-r--r--mkspecs/common/c89/qplatformdefs.h56
-rw-r--r--mkspecs/common/linux.conf3
-rw-r--r--mkspecs/common/posix/qplatformdefs.h162
-rw-r--r--mkspecs/common/qws.conf1
-rw-r--r--mkspecs/common/symbian/qplatformdefs.h77
-rw-r--r--mkspecs/common/symbian/symbian.conf31
-rw-r--r--mkspecs/common/wince/qmake.conf1
-rw-r--r--mkspecs/cygwin-g++/qmake.conf1
-rw-r--r--mkspecs/cygwin-g++/qplatformdefs.h50
-rw-r--r--mkspecs/darwin-g++/qmake.conf1
-rw-r--r--mkspecs/darwin-g++/qplatformdefs.h46
-rw-r--r--mkspecs/features/assistant.prf9
-rw-r--r--mkspecs/features/egl.prf8
-rw-r--r--mkspecs/features/incredibuild_xge.prf2
-rw-r--r--mkspecs/features/moc.prf2
-rw-r--r--mkspecs/features/symbian/application_icon.prf3
-rw-r--r--mkspecs/features/symbian/qt.prf114
-rw-r--r--mkspecs/features/unix/opengl.prf5
-rw-r--r--mkspecs/features/win32/thread.prf4
-rw-r--r--mkspecs/freebsd-g++/qmake.conf1
-rw-r--r--mkspecs/freebsd-g++/qplatformdefs.h53
-rw-r--r--mkspecs/freebsd-g++34/qmake.conf1
-rw-r--r--mkspecs/freebsd-g++40/qmake.conf1
-rw-r--r--mkspecs/freebsd-icc/qmake.conf1
-rw-r--r--mkspecs/hpux-acc-64/qmake.conf1
-rw-r--r--mkspecs/hpux-acc-64/qplatformdefs.h74
-rw-r--r--mkspecs/hpux-acc-o64/qmake.conf1
-rw-r--r--mkspecs/hpux-acc-o64/qplatformdefs.h75
-rw-r--r--mkspecs/hpux-acc/qmake.conf1
-rw-r--r--mkspecs/hpux-acc/qplatformdefs.h74
-rw-r--r--mkspecs/hpux-g++-64/qmake.conf1
-rw-r--r--mkspecs/hpux-g++-64/qplatformdefs.h74
-rw-r--r--mkspecs/hpux-g++/qmake.conf1
-rw-r--r--mkspecs/hpux-g++/qplatformdefs.h75
-rw-r--r--mkspecs/hpuxi-acc-32/qmake.conf1
-rw-r--r--mkspecs/hpuxi-acc-32/qplatformdefs.h73
-rw-r--r--mkspecs/hpuxi-acc-64/qmake.conf1
-rw-r--r--mkspecs/hpuxi-acc-64/qplatformdefs.h73
-rw-r--r--mkspecs/hpuxi-g++-64/qmake.conf1
-rw-r--r--mkspecs/hpuxi-g++-64/qplatformdefs.h73
-rw-r--r--mkspecs/hurd-g++/qmake.conf1
-rw-r--r--mkspecs/hurd-g++/qplatformdefs.h48
-rw-r--r--mkspecs/irix-cc-64/qmake.conf1
-rw-r--r--mkspecs/irix-cc-64/qplatformdefs.h75
-rw-r--r--mkspecs/irix-cc/qmake.conf1
-rw-r--r--mkspecs/irix-cc/qplatformdefs.h75
-rw-r--r--mkspecs/irix-g++-64/qmake.conf1
-rw-r--r--mkspecs/irix-g++/qmake.conf1
-rw-r--r--mkspecs/irix-g++/qplatformdefs.h83
-rw-r--r--mkspecs/linux-cxx/qmake.conf1
-rw-r--r--mkspecs/linux-cxx/qplatformdefs.h75
-rw-r--r--mkspecs/linux-ecc-64/qmake.conf1
-rw-r--r--mkspecs/linux-ecc-64/qplatformdefs.h75
-rw-r--r--mkspecs/linux-g++-32/qmake.conf1
-rw-r--r--mkspecs/linux-g++-64/qmake.conf1
-rw-r--r--mkspecs/linux-g++-maemo/qmake.conf1
-rw-r--r--mkspecs/linux-g++/qmake.conf1
-rw-r--r--mkspecs/linux-g++/qplatformdefs.h75
-rw-r--r--mkspecs/linux-icc/qmake.conf1
-rw-r--r--mkspecs/linux-kcc/qmake.conf1
-rw-r--r--mkspecs/linux-kcc/qplatformdefs.h75
-rw-r--r--mkspecs/linux-llvm/qmake.conf1
-rw-r--r--mkspecs/linux-llvm/qplatformdefs.h75
-rw-r--r--mkspecs/linux-lsb-g++/qmake.conf1
-rw-r--r--mkspecs/linux-lsb-g++/qplatformdefs.h81
-rw-r--r--mkspecs/linux-pgcc/qmake.conf1
-rw-r--r--mkspecs/linux-pgcc/qplatformdefs.h75
-rw-r--r--mkspecs/lynxos-g++/qmake.conf1
-rw-r--r--mkspecs/lynxos-g++/qplatformdefs.h50
-rw-r--r--mkspecs/macx-g++/qmake.conf1
-rw-r--r--mkspecs/macx-g++/qplatformdefs.h56
-rw-r--r--mkspecs/macx-g++40/qmake.conf1
-rw-r--r--mkspecs/macx-g++40/qplatformdefs.h56
-rw-r--r--mkspecs/macx-g++42/qmake.conf1
-rw-r--r--mkspecs/macx-g++42/qplatformdefs.h56
-rw-r--r--mkspecs/macx-icc/qmake.conf1
-rw-r--r--mkspecs/macx-llvm/qmake.conf1
-rw-r--r--mkspecs/macx-llvm/qplatformdefs.h56
-rw-r--r--mkspecs/macx-pbuilder/qplatformdefs.h55
-rw-r--r--mkspecs/macx-xcode/qplatformdefs.h56
-rw-r--r--mkspecs/macx-xlc/qmake.conf1
-rw-r--r--mkspecs/macx-xlc/qplatformdefs.h50
-rw-r--r--mkspecs/netbsd-g++/qmake.conf1
-rw-r--r--mkspecs/netbsd-g++/qplatformdefs.h53
-rw-r--r--mkspecs/openbsd-g++/qmake.conf1
-rw-r--r--mkspecs/openbsd-g++/qplatformdefs.h53
-rw-r--r--mkspecs/qws/freebsd-generic-g++/qmake.conf1
-rw-r--r--mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf20
-rw-r--r--mkspecs/qws/linux-arm-gnueabi-g++/qplatformdefs.h42
-rw-r--r--mkspecs/qws/macx-generic-g++/qmake.conf1
-rw-r--r--mkspecs/qws/solaris-generic-g++/qmake.conf1
-rw-r--r--mkspecs/sco-cc/qmake.conf1
-rw-r--r--mkspecs/sco-cc/qplatformdefs.h49
-rw-r--r--mkspecs/sco-g++/qmake.conf1
-rw-r--r--mkspecs/sco-g++/qplatformdefs.h49
-rw-r--r--mkspecs/solaris-cc-64/qmake.conf3
-rw-r--r--mkspecs/solaris-cc-64/qplatformdefs.h76
-rw-r--r--mkspecs/solaris-cc/qmake.conf3
-rw-r--r--mkspecs/solaris-cc/qplatformdefs.h83
-rw-r--r--mkspecs/solaris-g++-64/qmake.conf1
-rw-r--r--mkspecs/solaris-g++-64/qplatformdefs.h80
-rw-r--r--mkspecs/solaris-g++/qmake.conf1
-rw-r--r--mkspecs/solaris-g++/qplatformdefs.h79
-rw-r--r--mkspecs/symbian-abld/qmake.conf1
-rw-r--r--mkspecs/symbian-sbsv2/qmake.conf1
-rw-r--r--mkspecs/tru64-cxx/qmake.conf1
-rw-r--r--mkspecs/tru64-cxx/qplatformdefs.h64
-rw-r--r--mkspecs/tru64-g++/qmake.conf1
-rw-r--r--mkspecs/tru64-g++/qplatformdefs.h64
-rw-r--r--mkspecs/unixware-cc/qmake.conf1
-rw-r--r--mkspecs/unixware-cc/qplatformdefs.h51
-rw-r--r--mkspecs/unixware-g++/qmake.conf1
-rw-r--r--mkspecs/unixware-g++/qplatformdefs.h51
-rw-r--r--mkspecs/unsupported/linux-host-g++/qmake.conf3
-rw-r--r--mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf1
-rw-r--r--mkspecs/unsupported/qnx-g++/qmake.conf1
-rw-r--r--mkspecs/unsupported/qnx-g++/qplatformdefs.h72
-rw-r--r--mkspecs/unsupported/qws/qnx-641/qmake.conf100
-rw-r--r--mkspecs/unsupported/qws/qnx-641/qplatformdefs.h42
-rw-r--r--mkspecs/unsupported/qws/qnx-generic-g++/qmake.conf1
-rw-r--r--mkspecs/unsupported/qws/qnx-i386-g++/qmake.conf1
-rw-r--r--mkspecs/unsupported/qws/qnx-ppc-g++/qmake.conf1
-rw-r--r--mkspecs/unsupported/vxworks-ppc-dcc/qmake.conf1
-rw-r--r--mkspecs/unsupported/vxworks-ppc-g++/qmake.conf1
-rw-r--r--mkspecs/unsupported/vxworks-simpentium-dcc/qmake.conf1
-rw-r--r--mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf1
-rw-r--r--mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h79
-rw-r--r--mkspecs/win32-borland/qplatformdefs.h17
-rw-r--r--mkspecs/win32-g++/qplatformdefs.h17
-rw-r--r--mkspecs/win32-icc/qmake.conf2
-rw-r--r--mkspecs/win32-icc/qplatformdefs.h18
-rw-r--r--mkspecs/win32-msvc.net/qmake.conf89
-rw-r--r--mkspecs/win32-msvc.net/qplatformdefs.h147
-rw-r--r--mkspecs/win32-msvc/features/incremental.prf2
-rw-r--r--mkspecs/win32-msvc/features/incremental_off.prf2
-rw-r--r--mkspecs/win32-msvc/qmake.conf86
-rw-r--r--mkspecs/win32-msvc/qplatformdefs.h148
-rw-r--r--mkspecs/win32-msvc2002/qmake.conf88
-rw-r--r--mkspecs/win32-msvc2002/qplatformdefs.h42
-rw-r--r--mkspecs/win32-msvc2003/qplatformdefs.h100
-rw-r--r--mkspecs/win32-msvc2005/qplatformdefs.h17
-rw-r--r--projects.pro15
-rw-r--r--qmake/Makefile.unix5
-rw-r--r--qmake/Makefile.win326
-rw-r--r--qmake/Makefile.win32-g++7
-rw-r--r--qmake/Makefile.win32-g++-sh7
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp4
-rw-r--r--qmake/generators/makefile.cpp40
-rw-r--r--qmake/generators/makefile.h3
-rw-r--r--qmake/generators/metamakefile.cpp56
-rw-r--r--qmake/generators/metamakefile.h5
-rw-r--r--qmake/generators/projectgenerator.cpp9
-rw-r--r--qmake/generators/symbian/symmake.cpp104
-rw-r--r--qmake/generators/symbian/symmake.h1
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp42
-rw-r--r--qmake/generators/symbian/symmake_abld.h1
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp4
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.h1
-rw-r--r--qmake/generators/unix/unixmake.cpp9
-rw-r--r--qmake/generators/unix/unixmake2.cpp4
-rw-r--r--qmake/generators/win32/borland_bmake.cpp2
-rw-r--r--qmake/generators/win32/mingw_make.cpp4
-rw-r--r--qmake/generators/win32/msvc_dsp.cpp1207
-rw-r--r--qmake/generators/win32/msvc_dsp.h122
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp2
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp3
-rw-r--r--qmake/generators/win32/winmakefile.cpp20
-rw-r--r--qmake/generators/win32/winmakefile.h1
-rw-r--r--qmake/main.cpp2
-rw-r--r--qmake/option.cpp110
-rw-r--r--qmake/option.h13
-rw-r--r--qmake/project.cpp224
-rw-r--r--qmake/project.h8
-rw-r--r--qmake/property.cpp5
-rw-r--r--qmake/qmake.pri4
-rw-r--r--src/3rdparty/README34
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/SegmentTermDocs.cpp72
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/Term.cpp5
-rw-r--r--src/3rdparty/clucene/src/CLucene/queryParser/MultiFieldQueryParser.cpp61
-rw-r--r--src/3rdparty/clucene/src/CLucene/store/FSDirectory.cpp33
-rw-r--r--src/3rdparty/clucene/src/CLucene/store/FSDirectory.h4
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/bufferedstream.h2
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp6
-rw-r--r--src/3rdparty/libjpeg/README282
-rw-r--r--src/3rdparty/libjpeg/ansi2knr.136
-rw-r--r--src/3rdparty/libjpeg/ansi2knr.c739
-rw-r--r--src/3rdparty/libjpeg/cderror.h134
-rw-r--r--src/3rdparty/libjpeg/cdjpeg.h187
-rw-r--r--src/3rdparty/libjpeg/change.log73
-rw-r--r--src/3rdparty/libjpeg/cjpeg.1325
-rw-r--r--src/3rdparty/libjpeg/ckconfig.c402
-rw-r--r--src/3rdparty/libjpeg/coderules.doc118
-rw-r--r--src/3rdparty/libjpeg/coderules.txt118
-rw-r--r--src/3rdparty/libjpeg/djpeg.1252
-rw-r--r--src/3rdparty/libjpeg/example.c433
-rw-r--r--src/3rdparty/libjpeg/filelist.doc210
-rw-r--r--src/3rdparty/libjpeg/filelist.txt215
-rw-r--r--src/3rdparty/libjpeg/install.doc1063
-rw-r--r--src/3rdparty/libjpeg/jaricom.c153
-rw-r--r--src/3rdparty/libjpeg/jcapimin.c4
-rw-r--r--src/3rdparty/libjpeg/jcarith.c934
-rw-r--r--src/3rdparty/libjpeg/jccoefct.c24
-rw-r--r--src/3rdparty/libjpeg/jcdctmgr.c489
-rw-r--r--src/3rdparty/libjpeg/jchuff.c1013
-rw-r--r--src/3rdparty/libjpeg/jchuff.h47
-rw-r--r--src/3rdparty/libjpeg/jcinit.c15
-rw-r--r--src/3rdparty/libjpeg/jcmainct.c14
-rw-r--r--src/3rdparty/libjpeg/jcmarker.c98
-rw-r--r--src/3rdparty/libjpeg/jcmaster.c324
-rw-r--r--src/3rdparty/libjpeg/jconfig.bcc2
-rw-r--r--src/3rdparty/libjpeg/jconfig.cfg3
-rw-r--r--src/3rdparty/libjpeg/jconfig.dj2
-rw-r--r--src/3rdparty/libjpeg/jconfig.doc155
-rw-r--r--src/3rdparty/libjpeg/jconfig.h3
-rw-r--r--src/3rdparty/libjpeg/jconfig.mac2
-rw-r--r--src/3rdparty/libjpeg/jconfig.manx2
-rw-r--r--src/3rdparty/libjpeg/jconfig.mc62
-rw-r--r--src/3rdparty/libjpeg/jconfig.sas2
-rw-r--r--src/3rdparty/libjpeg/jconfig.st2
-rw-r--r--src/3rdparty/libjpeg/jconfig.txt155
-rw-r--r--src/3rdparty/libjpeg/jconfig.vc2
-rw-r--r--src/3rdparty/libjpeg/jconfig.vms2
-rw-r--r--src/3rdparty/libjpeg/jconfig.wat2
-rw-r--r--src/3rdparty/libjpeg/jcparam.c72
-rw-r--r--src/3rdparty/libjpeg/jcphuff.c833
-rw-r--r--src/3rdparty/libjpeg/jcprepct.c14
-rw-r--r--src/3rdparty/libjpeg/jcsample.c94
-rw-r--r--src/3rdparty/libjpeg/jctrans.c24
-rw-r--r--src/3rdparty/libjpeg/jdapimin.c5
-rw-r--r--src/3rdparty/libjpeg/jdapistd.c2
-rw-r--r--src/3rdparty/libjpeg/jdarith.c772
-rw-r--r--src/3rdparty/libjpeg/jdatadst.c122
-rw-r--r--src/3rdparty/libjpeg/jdatasrc.c78
-rw-r--r--src/3rdparty/libjpeg/jdcoefct.c14
-rw-r--r--src/3rdparty/libjpeg/jdct.h239
-rw-r--r--src/3rdparty/libjpeg/jddctmgr.c131
-rw-r--r--src/3rdparty/libjpeg/jdhuff.c1168
-rw-r--r--src/3rdparty/libjpeg/jdhuff.h201
-rw-r--r--src/3rdparty/libjpeg/jdinput.c378
-rw-r--r--src/3rdparty/libjpeg/jdmainct.c42
-rw-r--r--src/3rdparty/libjpeg/jdmarker.c74
-rw-r--r--src/3rdparty/libjpeg/jdmaster.c104
-rw-r--r--src/3rdparty/libjpeg/jdphuff.c668
-rw-r--r--src/3rdparty/libjpeg/jdsample.c147
-rw-r--r--src/3rdparty/libjpeg/jdtrans.c19
-rw-r--r--src/3rdparty/libjpeg/jerror.h19
-rw-r--r--src/3rdparty/libjpeg/jfdctflt.c48
-rw-r--r--src/3rdparty/libjpeg/jfdctfst.c48
-rw-r--r--src/3rdparty/libjpeg/jfdctint.c4261
-rw-r--r--src/3rdparty/libjpeg/jidctint.c4936
-rw-r--r--src/3rdparty/libjpeg/jidctred.c398
-rw-r--r--src/3rdparty/libjpeg/jmemansi.c167
-rw-r--r--src/3rdparty/libjpeg/jmemdos.c638
-rw-r--r--src/3rdparty/libjpeg/jmemdosa.asm379
-rw-r--r--src/3rdparty/libjpeg/jmemmac.c289
-rw-r--r--src/3rdparty/libjpeg/jmemname.c276
-rw-r--r--src/3rdparty/libjpeg/jmorecfg.h24
-rw-r--r--src/3rdparty/libjpeg/jpegint.h43
-rw-r--r--src/3rdparty/libjpeg/jpeglib.h102
-rw-r--r--src/3rdparty/libjpeg/jpegtran.1285
-rw-r--r--src/3rdparty/libjpeg/jutils.c52
-rw-r--r--src/3rdparty/libjpeg/jversion.h6
-rw-r--r--src/3rdparty/libjpeg/libjpeg.doc3006
-rw-r--r--src/3rdparty/libjpeg/libjpeg.map4
-rw-r--r--src/3rdparty/libjpeg/libjpeg.txt3070
-rw-r--r--src/3rdparty/libjpeg/makcjpeg.st36
-rw-r--r--src/3rdparty/libjpeg/makdjpeg.st36
-rw-r--r--src/3rdparty/libjpeg/makeadsw.vc677
-rw-r--r--src/3rdparty/libjpeg/makeasln.vc933
-rw-r--r--src/3rdparty/libjpeg/makecdep.vc682
-rw-r--r--src/3rdparty/libjpeg/makecdsp.vc6130
-rw-r--r--src/3rdparty/libjpeg/makecmak.vc6159
-rw-r--r--src/3rdparty/libjpeg/makecvcp.vc9186
-rw-r--r--src/3rdparty/libjpeg/makeddep.vc682
-rw-r--r--src/3rdparty/libjpeg/makeddsp.vc6130
-rw-r--r--src/3rdparty/libjpeg/makedmak.vc6159
-rw-r--r--src/3rdparty/libjpeg/makedvcp.vc9186
-rw-r--r--src/3rdparty/libjpeg/makefile.ansi76
-rw-r--r--src/3rdparty/libjpeg/makefile.bcc90
-rw-r--r--src/3rdparty/libjpeg/makefile.cfg319
-rw-r--r--src/3rdparty/libjpeg/makefile.dj76
-rw-r--r--src/3rdparty/libjpeg/makefile.manx76
-rw-r--r--src/3rdparty/libjpeg/makefile.mc696
-rw-r--r--src/3rdparty/libjpeg/makefile.mms88
-rw-r--r--src/3rdparty/libjpeg/makefile.sas76
-rw-r--r--src/3rdparty/libjpeg/makefile.unix76
-rw-r--r--src/3rdparty/libjpeg/makefile.vc72
-rw-r--r--src/3rdparty/libjpeg/makefile.vms22
-rw-r--r--src/3rdparty/libjpeg/makefile.wat76
-rw-r--r--src/3rdparty/libjpeg/makejdep.vc6423
-rw-r--r--src/3rdparty/libjpeg/makejdsp.vc6285
-rw-r--r--src/3rdparty/libjpeg/makejdsw.vc629
-rw-r--r--src/3rdparty/libjpeg/makejmak.vc6425
-rw-r--r--src/3rdparty/libjpeg/makejsln.vc917
-rw-r--r--src/3rdparty/libjpeg/makejvcp.vc9328
-rw-r--r--src/3rdparty/libjpeg/makeproj.mac213
-rw-r--r--src/3rdparty/libjpeg/makerdep.vc66
-rw-r--r--src/3rdparty/libjpeg/makerdsp.vc678
-rw-r--r--src/3rdparty/libjpeg/makermak.vc6110
-rw-r--r--src/3rdparty/libjpeg/makervcp.vc9133
-rw-r--r--src/3rdparty/libjpeg/maketdep.vc643
-rw-r--r--src/3rdparty/libjpeg/maketdsp.vc6122
-rw-r--r--src/3rdparty/libjpeg/maketmak.vc6131
-rw-r--r--src/3rdparty/libjpeg/maketvcp.vc9178
-rw-r--r--src/3rdparty/libjpeg/makewdep.vc66
-rw-r--r--src/3rdparty/libjpeg/makewdsp.vc678
-rw-r--r--src/3rdparty/libjpeg/makewmak.vc6110
-rw-r--r--src/3rdparty/libjpeg/makewvcp.vc9133
-rw-r--r--src/3rdparty/libjpeg/makljpeg.st68
-rw-r--r--src/3rdparty/libjpeg/maktjpeg.st30
-rw-r--r--src/3rdparty/libjpeg/makvms.opt4
-rw-r--r--src/3rdparty/libjpeg/rdjpgcom.163
-rw-r--r--src/3rdparty/libjpeg/structure.doc948
-rw-r--r--src/3rdparty/libjpeg/structure.txt945
-rw-r--r--src/3rdparty/libjpeg/transupp.h210
-rw-r--r--src/3rdparty/libjpeg/usage.doc562
-rw-r--r--src/3rdparty/libjpeg/usage.txt617
-rw-r--r--src/3rdparty/libjpeg/wizard.txt (renamed from src/3rdparty/libjpeg/wizard.doc)0
-rw-r--r--src/3rdparty/libjpeg/wrjpgcom.1103
-rw-r--r--src/3rdparty/libpng/ANNOUNCE365
-rw-r--r--src/3rdparty/libpng/CHANGES1136
-rw-r--r--src/3rdparty/libpng/CMakeLists.txt265
-rw-r--r--src/3rdparty/libpng/INSTALL114
-rw-r--r--src/3rdparty/libpng/KNOWNBUG22
-rw-r--r--src/3rdparty/libpng/LICENSE6
-rw-r--r--src/3rdparty/libpng/README96
-rw-r--r--src/3rdparty/libpng/TODO8
-rw-r--r--src/3rdparty/libpng/Y2KINFO55
-rw-r--r--src/3rdparty/libpng/aclocal.m48949
-rwxr-xr-xsrc/3rdparty/libpng/autogen.sh25
-rwxr-xr-xsrc/3rdparty/libpng/config.guess1561
-rw-r--r--src/3rdparty/libpng/config.h.in86
-rwxr-xr-xsrc/3rdparty/libpng/config.sub1686
-rwxr-xr-xsrc/3rdparty/libpng/configure13844
-rw-r--r--src/3rdparty/libpng/configure.ac124
-rwxr-xr-xsrc/3rdparty/libpng/depcomp630
-rw-r--r--src/3rdparty/libpng/example.c32
-rwxr-xr-xsrc/3rdparty/libpng/install-sh520
-rw-r--r--src/3rdparty/libpng/libpng-1.2.40.txt3112
-rw-r--r--src/3rdparty/libpng/libpng-1.4.0.txt3277
-rwxr-xr-xsrc/3rdparty/libpng/libpng-config.in127
-rw-r--r--src/3rdparty/libpng/libpng.3734
-rw-r--r--src/3rdparty/libpng/libpng.pc.in11
-rw-r--r--src/3rdparty/libpng/libpngpf.360
-rwxr-xr-xsrc/3rdparty/libpng/ltmain.sh8406
-rwxr-xr-xsrc/3rdparty/libpng/missing376
-rwxr-xr-xsrc/3rdparty/libpng/mkinstalldirs162
-rw-r--r--src/3rdparty/libpng/png.56
-rw-r--r--src/3rdparty/libpng/png.c434
-rw-r--r--src/3rdparty/libpng/png.h2214
-rw-r--r--src/3rdparty/libpng/pngconf.h852
-rw-r--r--src/3rdparty/libpng/pngerror.c100
-rw-r--r--src/3rdparty/libpng/pnggccrd.c103
-rw-r--r--src/3rdparty/libpng/pngget.c256
-rw-r--r--src/3rdparty/libpng/pngmem.c95
-rw-r--r--src/3rdparty/libpng/pngpread.c218
-rw-r--r--src/3rdparty/libpng/pngpriv.h957
-rw-r--r--src/3rdparty/libpng/pngread.c716
-rw-r--r--src/3rdparty/libpng/pngrio.c40
-rw-r--r--src/3rdparty/libpng/pngrtran.c656
-rw-r--r--src/3rdparty/libpng/pngrutil.c406
-rw-r--r--src/3rdparty/libpng/pngset.c386
-rw-r--r--src/3rdparty/libpng/pngtest.c288
-rw-r--r--src/3rdparty/libpng/pngtest.pngbin8574 -> 8608 bytes
-rw-r--r--src/3rdparty/libpng/pngtrans.c49
-rw-r--r--src/3rdparty/libpng/pngvcrd.c1
-rw-r--r--src/3rdparty/libpng/pngwio.c44
-rw-r--r--src/3rdparty/libpng/pngwrite.c499
-rw-r--r--src/3rdparty/libpng/pngwtran.c58
-rw-r--r--src/3rdparty/libpng/pngwutil.c262
-rw-r--r--src/3rdparty/libpng/projects/beos/x86-shared.projbin17031 -> 0 bytes
-rw-r--r--src/3rdparty/libpng/projects/beos/x86-shared.txt22
-rw-r--r--src/3rdparty/libpng/projects/beos/x86-static.projbin16706 -> 0 bytes
-rw-r--r--src/3rdparty/libpng/projects/beos/x86-static.txt22
-rw-r--r--src/3rdparty/libpng/projects/cbuilder5/README.txt11
-rw-r--r--src/3rdparty/libpng/projects/netware.txt6
-rw-r--r--src/3rdparty/libpng/projects/visualc6/README.txt12
-rw-r--r--src/3rdparty/libpng/projects/visualc6/libpng.dsp200
-rw-r--r--src/3rdparty/libpng/projects/visualc6/pngtest.dsp144
-rw-r--r--src/3rdparty/libpng/projects/visualc71/PRJ0041.mak2
-rw-r--r--src/3rdparty/libpng/projects/visualc71/README.txt12
-rw-r--r--src/3rdparty/libpng/projects/visualc71/README_zlib.txt6
-rw-r--r--src/3rdparty/libpng/projects/visualc71/libpng.sln88
-rw-r--r--src/3rdparty/libpng/projects/visualc71/libpng.vcproj702
-rw-r--r--src/3rdparty/libpng/projects/visualc71/pngtest.vcproj459
-rw-r--r--src/3rdparty/libpng/projects/visualc71/zlib.vcproj670
-rw-r--r--src/3rdparty/libpng/projects/wince.txt6
-rw-r--r--src/3rdparty/libpng/projects/xcode/Info.plist26
-rw-r--r--src/3rdparty/libpng/projects/xcode/README.txt9
-rw-r--r--src/3rdparty/libpng/projects/xcode/libpng.xcodeproj/.gitignore2
-rw-r--r--src/3rdparty/libpng/projects/xcode/libpng.xcodeproj/project.pbxproj353
-rw-r--r--src/3rdparty/libpng/scripts/CMakeLists.txt253
-rw-r--r--src/3rdparty/libpng/scripts/README.txt67
-rw-r--r--src/3rdparty/libpng/scripts/descrip.mms30
-rwxr-xr-xsrc/3rdparty/libpng/scripts/libpng-config-head.in2
-rwxr-xr-xsrc/3rdparty/libpng/scripts/libpng-config.in127
-rw-r--r--src/3rdparty/libpng/scripts/libpng.icc47
-rw-r--r--src/3rdparty/libpng/scripts/libpng.pc-configure.in11
-rw-r--r--src/3rdparty/libpng/scripts/libpng.pc.in6
-rw-r--r--src/3rdparty/libpng/scripts/makefile.32sunu46
-rw-r--r--src/3rdparty/libpng/scripts/makefile.64sunu48
-rw-r--r--src/3rdparty/libpng/scripts/makefile.aix40
-rw-r--r--src/3rdparty/libpng/scripts/makefile.amiga2
-rw-r--r--src/3rdparty/libpng/scripts/makefile.atari4
-rw-r--r--src/3rdparty/libpng/scripts/makefile.bc3230
-rw-r--r--src/3rdparty/libpng/scripts/makefile.beos50
-rw-r--r--src/3rdparty/libpng/scripts/makefile.bor32
-rw-r--r--src/3rdparty/libpng/scripts/makefile.cegcc113
-rw-r--r--src/3rdparty/libpng/scripts/makefile.cygwin63
-rw-r--r--src/3rdparty/libpng/scripts/makefile.darwin56
-rw-r--r--src/3rdparty/libpng/scripts/makefile.dec46
-rw-r--r--src/3rdparty/libpng/scripts/makefile.dj232
-rw-r--r--src/3rdparty/libpng/scripts/makefile.elf60
-rw-r--r--src/3rdparty/libpng/scripts/makefile.freebsd9
-rw-r--r--src/3rdparty/libpng/scripts/makefile.gcc32
-rw-r--r--src/3rdparty/libpng/scripts/makefile.gcmmx274
-rw-r--r--src/3rdparty/libpng/scripts/makefile.hp6448
-rw-r--r--src/3rdparty/libpng/scripts/makefile.hpgcc50
-rw-r--r--src/3rdparty/libpng/scripts/makefile.hpux50
-rw-r--r--src/3rdparty/libpng/scripts/makefile.ibmc34
-rw-r--r--src/3rdparty/libpng/scripts/makefile.intel36
-rw-r--r--src/3rdparty/libpng/scripts/makefile.knr34
-rw-r--r--src/3rdparty/libpng/scripts/makefile.linux56
-rw-r--r--src/3rdparty/libpng/scripts/makefile.mingw63
-rw-r--r--src/3rdparty/libpng/scripts/makefile.mips32
-rw-r--r--src/3rdparty/libpng/scripts/makefile.msc34
-rw-r--r--src/3rdparty/libpng/scripts/makefile.ne12bsd11
-rw-r--r--src/3rdparty/libpng/scripts/makefile.netbsd13
-rw-r--r--src/3rdparty/libpng/scripts/makefile.nommx255
-rw-r--r--src/3rdparty/libpng/scripts/makefile.openbsd12
-rw-r--r--src/3rdparty/libpng/scripts/makefile.os232
-rw-r--r--src/3rdparty/libpng/scripts/makefile.sco52
-rw-r--r--src/3rdparty/libpng/scripts/makefile.sggcc54
-rw-r--r--src/3rdparty/libpng/scripts/makefile.sgi57
-rw-r--r--src/3rdparty/libpng/scripts/makefile.so948
-rw-r--r--src/3rdparty/libpng/scripts/makefile.solaris54
-rw-r--r--src/3rdparty/libpng/scripts/makefile.solaris-x8648
-rw-r--r--src/3rdparty/libpng/scripts/makefile.std32
-rw-r--r--src/3rdparty/libpng/scripts/makefile.sunos32
-rw-r--r--src/3rdparty/libpng/scripts/makefile.tc330
-rw-r--r--src/3rdparty/libpng/scripts/makefile.vcawin32104
-rw-r--r--src/3rdparty/libpng/scripts/makefile.vcwin3237
-rw-r--r--src/3rdparty/libpng/scripts/makefile.watcom32
-rw-r--r--src/3rdparty/libpng/scripts/makevms.com30
-rw-r--r--src/3rdparty/libpng/scripts/png32ce.def257
-rw-r--r--src/3rdparty/libpng/scripts/pngos2.def40
-rw-r--r--src/3rdparty/libpng/scripts/pngw32.def239
-rw-r--r--src/3rdparty/libpng/scripts/pngw32.rc112
-rw-r--r--src/3rdparty/libpng/scripts/pngwin.def212
-rw-r--r--src/3rdparty/libpng/scripts/pngwin.rc112
-rw-r--r--src/3rdparty/libpng/scripts/smakefile.ppc2
-rwxr-xr-xsrc/3rdparty/libpng/test-pngtest.sh3
-rw-r--r--src/3rdparty/libtiff/ChangeLog728
-rw-r--r--src/3rdparty/libtiff/HOWTO-RELEASE106
-rw-r--r--src/3rdparty/libtiff/Makefile.am54
-rw-r--r--src/3rdparty/libtiff/Makefile.in724
-rw-r--r--src/3rdparty/libtiff/Makefile.vc59
-rw-r--r--src/3rdparty/libtiff/README.vms12
-rw-r--r--src/3rdparty/libtiff/RELEASE-DATE2
-rw-r--r--src/3rdparty/libtiff/SConstruct6
-rw-r--r--src/3rdparty/libtiff/VERSION2
-rw-r--r--src/3rdparty/libtiff/aclocal.m47281
-rwxr-xr-xsrc/3rdparty/libtiff/autogen.sh8
-rwxr-xr-xsrc/3rdparty/libtiff/config/compile142
-rwxr-xr-xsrc/3rdparty/libtiff/config/config.guess1497
-rwxr-xr-xsrc/3rdparty/libtiff/config/config.sub1608
-rwxr-xr-xsrc/3rdparty/libtiff/config/depcomp530
-rwxr-xr-xsrc/3rdparty/libtiff/config/install-sh323
-rwxr-xr-xsrc/3rdparty/libtiff/config/ltmain.sh7339
-rwxr-xr-xsrc/3rdparty/libtiff/config/missing360
-rwxr-xr-xsrc/3rdparty/libtiff/config/mkinstalldirs150
-rwxr-xr-xsrc/3rdparty/libtiff/configure22598
-rw-r--r--src/3rdparty/libtiff/configure.ac568
-rw-r--r--src/3rdparty/libtiff/html/Makefile.am81
-rw-r--r--src/3rdparty/libtiff/html/Makefile.in626
-rw-r--r--src/3rdparty/libtiff/html/bugs.html20
-rw-r--r--src/3rdparty/libtiff/html/document.html10
-rw-r--r--src/3rdparty/libtiff/html/images/Makefile.am46
-rw-r--r--src/3rdparty/libtiff/html/images/Makefile.in436
-rw-r--r--src/3rdparty/libtiff/html/index.html34
-rw-r--r--src/3rdparty/libtiff/html/man/Makefile.am118
-rw-r--r--src/3rdparty/libtiff/html/man/Makefile.in504
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFClose.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFDataWidth.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFError.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFFlush.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFGetField.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFOpen.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFPrintDirectory.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFRGBAImage.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadDirectory.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadEncodedStrip.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadEncodedTile.3tiff.html6
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadRGBAImage.3tiff.html10
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadRGBAStrip.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadRGBATile.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadRawStrip.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadRawTile.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadScanline.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadTile.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFSetDirectory.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFSetField.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFWarning.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFWriteDirectory.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFWriteEncodedStrip.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFWriteEncodedTile.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFWriteRawStrip.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFWriteRawTile.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFWriteScanline.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFWriteTile.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFbuffer.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFcodec.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFcolor.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFmemory.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFquery.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFsize.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFstrip.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFswab.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFtile.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/fax2ps.1.html76
-rw-r--r--src/3rdparty/libtiff/html/man/fax2tiff.1.html10
-rw-r--r--src/3rdparty/libtiff/html/man/gif2tiff.1.html10
-rw-r--r--src/3rdparty/libtiff/html/man/index.html2
-rw-r--r--src/3rdparty/libtiff/html/man/libtiff.3tiff.html2
-rw-r--r--src/3rdparty/libtiff/html/man/pal2rgb.1.html2
-rw-r--r--src/3rdparty/libtiff/html/man/ppm2tiff.1.html2
-rw-r--r--src/3rdparty/libtiff/html/man/ras2tiff.1.html14
-rw-r--r--src/3rdparty/libtiff/html/man/raw2tiff.1.html229
-rw-r--r--src/3rdparty/libtiff/html/man/rgb2ycbcr.1.html11
-rw-r--r--src/3rdparty/libtiff/html/man/sgi2tiff.1.html14
-rw-r--r--src/3rdparty/libtiff/html/man/thumbnail.1.html2
-rw-r--r--src/3rdparty/libtiff/html/man/tiff2bw.1.html17
-rw-r--r--src/3rdparty/libtiff/html/man/tiff2pdf.1.html176
-rw-r--r--src/3rdparty/libtiff/html/man/tiff2ps.1.html120
-rw-r--r--src/3rdparty/libtiff/html/man/tiff2rgba.1.html27
-rw-r--r--src/3rdparty/libtiff/html/man/tiffcmp.1.html6
-rw-r--r--src/3rdparty/libtiff/html/man/tiffcp.1.html82
-rw-r--r--src/3rdparty/libtiff/html/man/tiffcrop.1.html851
-rw-r--r--src/3rdparty/libtiff/html/man/tiffdither.1.html9
-rw-r--r--src/3rdparty/libtiff/html/man/tiffdump.1.html6
-rw-r--r--src/3rdparty/libtiff/html/man/tiffgt.1.html18
-rw-r--r--src/3rdparty/libtiff/html/man/tiffinfo.1.html2
-rw-r--r--src/3rdparty/libtiff/html/man/tiffmedian.1.html2
-rw-r--r--src/3rdparty/libtiff/html/man/tiffset.1.html22
-rw-r--r--src/3rdparty/libtiff/html/man/tiffsplit.1.html2
-rw-r--r--src/3rdparty/libtiff/html/man/tiffsv.1.html2
-rw-r--r--src/3rdparty/libtiff/html/misc.html30
-rw-r--r--src/3rdparty/libtiff/html/tools.html73
-rw-r--r--src/3rdparty/libtiff/html/v3.9.0beta.html304
-rw-r--r--src/3rdparty/libtiff/html/v3.9.1.html115
-rw-r--r--src/3rdparty/libtiff/html/v3.9.2.html122
-rw-r--r--src/3rdparty/libtiff/libtiff/Makefile.am138
-rw-r--r--src/3rdparty/libtiff/libtiff/Makefile.in763
-rw-r--r--src/3rdparty/libtiff/libtiff/Makefile.vc98
-rw-r--r--src/3rdparty/libtiff/libtiff/SConstruct4
-rw-r--r--src/3rdparty/libtiff/libtiff/mkg3states.c6
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_aux.c18
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_close.c22
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_codec.c9
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_compress.c24
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_config.h73
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_config.h-vms46
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_config.h.in67
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_config.h.vc44
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_config.vc.h56
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_config.wince.h67
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_dir.c229
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_dir.h77
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_dirinfo.c163
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_dirread.c867
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_dirwrite.c322
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_dumpmode.c6
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_fax3.c129
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_getimage.c2003
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_jbig.c378
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_jpeg.c395
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_luv.c38
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_lzw.c48
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_msdos.c9
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_next.c39
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_ojpeg.c4926
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_open.c19
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_packbits.c6
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_pixarlog.c34
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_predict.c219
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_predict.h16
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_print.c8
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_read.c375
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_stream.cxx10
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_strip.c85
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_win32.c77
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_wince.c281
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_write.c108
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_zip.c64
-rw-r--r--src/3rdparty/libtiff/libtiff/tiff.h4
-rw-r--r--src/3rdparty/libtiff/libtiff/tiffconf.h2
-rw-r--r--src/3rdparty/libtiff/libtiff/tiffconf.h.in3
-rw-r--r--src/3rdparty/libtiff/libtiff/tiffconf.h.vc97
-rw-r--r--src/3rdparty/libtiff/libtiff/tiffconf.vc.h109
-rw-r--r--src/3rdparty/libtiff/libtiff/tiffconf.wince.h129
-rw-r--r--src/3rdparty/libtiff/libtiff/tiffio.h92
-rw-r--r--src/3rdparty/libtiff/libtiff/tiffiop.h49
-rw-r--r--src/3rdparty/libtiff/libtiff/tiffvers.h4
-rw-r--r--src/3rdparty/libtiff/m4/acinclude.m4669
-rw-r--r--src/3rdparty/libtiff/m4/libtool.m46883
-rw-r--r--src/3rdparty/libtiff/m4/ltoptions.m4380
-rw-r--r--src/3rdparty/libtiff/m4/ltsugar.m4111
-rw-r--r--src/3rdparty/libtiff/m4/ltversion.m423
-rw-r--r--src/3rdparty/libtiff/nmake.opt30
-rw-r--r--src/3rdparty/libtiff/port/Makefile.am31
-rw-r--r--src/3rdparty/libtiff/port/Makefile.in501
-rw-r--r--src/3rdparty/libtiff/port/Makefile.vc43
-rw-r--r--src/3rdparty/libtiff/port/dummy.c4
-rw-r--r--src/3rdparty/libtiff/port/lfind.c8
-rw-r--r--src/3rdparty/libtiff/port/libport.h51
-rw-r--r--src/3rdparty/libtiff/test/Makefile.am44
-rw-r--r--src/3rdparty/libtiff/test/Makefile.in607
-rw-r--r--src/3rdparty/libtiff/test/ascii_tag.c170
-rw-r--r--src/3rdparty/libtiff/test/check_tag.c72
-rw-r--r--src/3rdparty/libtiff/test/long_tag.c154
-rw-r--r--src/3rdparty/libtiff/test/short_tag.c179
-rw-r--r--src/3rdparty/libtiff/test/strip.c289
-rw-r--r--src/3rdparty/libtiff/test/strip_rw.c155
-rw-r--r--src/3rdparty/libtiff/test/test_arrays.c829
-rw-r--r--src/3rdparty/libtiff/test/test_arrays.h63
-rw-r--r--src/3rdparty/patches/freetype-2.3.5-config.patch265
-rw-r--r--src/3rdparty/patches/freetype-2.3.6-ascii.patch174
-rw-r--r--src/3rdparty/patches/freetype-2.3.6-vxworks.patch35
-rw-r--r--src/3rdparty/patches/libjpeg-6b-config.patch50
-rw-r--r--src/3rdparty/patches/libjpeg-6b-vxworks.patch23
-rw-r--r--src/3rdparty/patches/libpng-1.2.20-elf-visibility.patch17
-rw-r--r--src/3rdparty/patches/libpng-1.2.20-vxworks.patch13
-rw-r--r--src/3rdparty/patches/libtiff-3.8.2-config.patch374
-rw-r--r--src/3rdparty/patches/libtiff-3.8.2-vxworks.patch11
-rw-r--r--src/3rdparty/patches/sqlite-3.5.6-config.patch38
-rw-r--r--src/3rdparty/patches/sqlite-3.5.6-vxworks.patch68
-rw-r--r--src/3rdparty/patches/sqlite-3.5.6-wince.patch19
-rw-r--r--src/3rdparty/phonon/ds9/backendnode.cpp2
-rw-r--r--src/3rdparty/phonon/ds9/mediagraph.cpp12
-rw-r--r--src/3rdparty/phonon/ds9/qevr9.h143
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_default.cpp153
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_default.h55
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_evr.cpp215
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_evr.h56
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_soft.cpp2
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp112
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_vmr9.h1
-rw-r--r--src/3rdparty/phonon/ds9/videowidget.cpp26
-rw-r--r--src/3rdparty/phonon/phonon/objectdescriptionmodel.cpp7
-rw-r--r--src/3rdparty/phonon/phonon/objectdescriptionmodel.h8
-rw-r--r--src/3rdparty/phonon/waveout/mediaobject.cpp4
-rw-r--r--src/3rdparty/phonon/waveout/mediaobject.h2
-rw-r--r--src/3rdparty/webkit/WebCore/accessibility/qt/AccessibilityObjectQt.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc3
-rw-r--r--src/activeqt/container/qaxbase.cpp9
-rw-r--r--src/activeqt/container/qaxwidget.cpp34
-rw-r--r--src/activeqt/control/qaxserverbase.cpp16
-rw-r--r--src/corelib/animation/qabstractanimation.cpp9
-rw-r--r--src/corelib/animation/qabstractanimation_p.h62
-rw-r--r--src/corelib/animation/qpropertyanimation.cpp6
-rw-r--r--src/corelib/animation/qvariantanimation.cpp4
-rw-r--r--src/corelib/codecs/codecs.pri3
-rw-r--r--src/corelib/codecs/qsimplecodec.cpp12
-rw-r--r--src/corelib/codecs/qsimplecodec_p.h4
-rw-r--r--src/corelib/codecs/qtextcodec.cpp90
-rw-r--r--src/corelib/codecs/qtextcodec.h18
-rw-r--r--src/corelib/codecs/qtextcodec_symbian.cpp678
-rw-r--r--src/corelib/codecs/qutfcodec.cpp39
-rw-r--r--src/corelib/concurrent/qfuturewatcher.cpp2
-rw-r--r--src/corelib/corelib.pro22
-rw-r--r--src/corelib/global/qglobal.h25
-rw-r--r--src/corelib/global/qlibraryinfo.cpp8
-rw-r--r--src/corelib/global/qlibraryinfo.h3
-rw-r--r--src/corelib/global/qmalloc.cpp1
-rw-r--r--src/corelib/global/qnamespace.h19
-rw-r--r--src/corelib/global/qnamespace.qdoc17
-rw-r--r--src/corelib/io/io.pri2
-rw-r--r--src/corelib/io/qdatastream.cpp232
-rw-r--r--src/corelib/io/qdatastream.h8
-rw-r--r--src/corelib/io/qdataurl.cpp101
-rw-r--r--src/corelib/io/qdataurl_p.h67
-rw-r--r--src/corelib/io/qdir.cpp374
-rw-r--r--src/corelib/io/qdir.h5
-rw-r--r--src/corelib/io/qfileinfo.cpp303
-rw-r--r--src/corelib/io/qfileinfo_p.h21
-rw-r--r--src/corelib/io/qfilesystemwatcher.cpp2
-rw-r--r--src/corelib/io/qfilesystemwatcher_dnotify.cpp13
-rw-r--r--src/corelib/io/qfilesystemwatcher_fsevents.cpp23
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify.cpp2
-rw-r--r--src/corelib/io/qfilesystemwatcher_kqueue.cpp2
-rw-r--r--src/corelib/io/qfsfileengine.cpp27
-rw-r--r--src/corelib/io/qfsfileengine_iterator_unix.cpp20
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp20
-rw-r--r--src/corelib/io/qprocess_symbian.cpp2
-rw-r--r--src/corelib/io/qprocess_win.cpp2
-rw-r--r--src/corelib/io/qtextstream.cpp3
-rw-r--r--src/corelib/io/qurl.cpp15
-rw-r--r--src/corelib/io/qurl.h7
-rw-r--r--src/corelib/kernel/qabstractitemmodel.cpp2
-rw-r--r--src/corelib/kernel/qcoreapplication_win.cpp12
-rw-r--r--src/corelib/kernel/qcoreevent.cpp3
-rw-r--r--src/corelib/kernel/qcoreevent.h1
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp33
-rw-r--r--src/corelib/kernel/qeventdispatcher_win_p.h6
-rw-r--r--src/corelib/kernel/qmetaobject.cpp110
-rw-r--r--src/corelib/kernel/qmetaobject_p.h27
-rw-r--r--src/corelib/kernel/qmetatype.cpp347
-rw-r--r--src/corelib/kernel/qmetatype.h55
-rw-r--r--src/corelib/kernel/qobject.cpp51
-rw-r--r--src/corelib/kernel/qobject_p.h4
-rw-r--r--src/corelib/kernel/qobjectdefs.h8
-rw-r--r--src/corelib/kernel/qtimer.cpp14
-rw-r--r--src/corelib/kernel/qvariant.cpp59
-rw-r--r--src/corelib/kernel/qvariant.h15
-rw-r--r--src/corelib/plugin/qlibrary.cpp16
-rw-r--r--src/corelib/thread/qmutex.cpp7
-rw-r--r--src/corelib/thread/qorderedmutexlocker_p.h8
-rw-r--r--src/corelib/tools/qbytearray.cpp24
-rw-r--r--src/corelib/tools/qbytearray.h2
-rw-r--r--src/corelib/tools/qchar.cpp271
-rw-r--r--src/corelib/tools/qeasingcurve.cpp69
-rw-r--r--src/corelib/tools/qeasingcurve.h11
-rw-r--r--src/corelib/tools/qhash.cpp17
-rw-r--r--src/corelib/tools/qhash.h4
-rw-r--r--src/corelib/tools/qlinkedlist.cpp5
-rw-r--r--src/corelib/tools/qlinkedlist.h1
-rw-r--r--src/corelib/tools/qlist.cpp135
-rw-r--r--src/corelib/tools/qlist.h219
-rw-r--r--src/corelib/tools/qlocale.cpp23
-rw-r--r--src/corelib/tools/qlocale_symbian.cpp6
-rw-r--r--src/corelib/tools/qmap.cpp5
-rw-r--r--src/corelib/tools/qmap.h4
-rw-r--r--src/corelib/tools/qpoint.cpp2
-rw-r--r--src/corelib/tools/qregexp.cpp11
-rw-r--r--src/corelib/tools/qset.h1
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h54
-rw-r--r--src/corelib/tools/qsimd.cpp246
-rw-r--r--src/corelib/tools/qsimd_p.h128
-rw-r--r--src/corelib/tools/qstring.cpp428
-rw-r--r--src/corelib/tools/qstring.h16
-rw-r--r--src/corelib/tools/qstringbuilder.h40
-rw-r--r--src/corelib/tools/qstringlist.cpp10
-rw-r--r--src/corelib/tools/qtextboundaryfinder.cpp7
-rw-r--r--src/corelib/tools/qunicodetables.cpp3694
-rw-r--r--src/corelib/tools/qunicodetables_p.h55
-rw-r--r--src/corelib/tools/qvector.cpp5
-rw-r--r--src/corelib/tools/qvector.h5
-rw-r--r--src/corelib/tools/tools.pri2
-rw-r--r--src/corelib/xml/qxmlstream.cpp7
-rw-r--r--src/dbus/qdbus_symbols_p.h5
-rw-r--r--src/dbus/qdbusmessage.cpp42
-rw-r--r--src/dbus/qdbusmessage.h3
-rw-r--r--src/dbus/qdbusmessage_p.h1
-rw-r--r--src/declarative/3rdparty/3rdparty.pri7
-rw-r--r--src/declarative/3rdparty/qlistmodelinterface.cpp109
-rw-r--r--src/declarative/3rdparty/qlistmodelinterface_p.h85
-rw-r--r--src/declarative/QmlChanges.txt185
-rw-r--r--src/declarative/debugger/debugger.pri15
-rw-r--r--src/declarative/debugger/qdeclarativedebug.cpp937
-rw-r--r--src/declarative/debugger/qdeclarativedebug_p.h371
-rw-r--r--src/declarative/debugger/qdeclarativedebugclient.cpp207
-rw-r--r--src/declarative/debugger/qdeclarativedebugclient_p.h99
-rw-r--r--src/declarative/debugger/qdeclarativedebuggerstatus.cpp54
-rw-r--r--src/declarative/debugger/qdeclarativedebuggerstatus_p.h66
-rw-r--r--src/declarative/debugger/qdeclarativedebugservice.cpp426
-rw-r--r--src/declarative/debugger/qdeclarativedebugservice_p.h92
-rw-r--r--src/declarative/debugger/qpacketprotocol.cpp498
-rw-r--r--src/declarative/debugger/qpacketprotocol_p.h122
-rw-r--r--src/declarative/declarative.pro29
-rw-r--r--src/declarative/graphicsitems/graphicsitems.pri86
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanchors.cpp1065
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanchors_p.h196
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanchors_p_p.h166
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp306
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h106
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanimatedimage_p_p.h82
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage.cpp440
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage_p.h106
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage_p_p.h97
-rw-r--r--src/declarative/graphicsitems/qdeclarativeeffects.cpp174
-rw-r--r--src/declarative/graphicsitems/qdeclarativeeffects_p.h65
-rw-r--r--src/declarative/graphicsitems/qdeclarativeevents.cpp194
-rw-r--r--src/declarative/graphicsitems/qdeclarativeevents_p_p.h137
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp1318
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable_p.h209
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable_p_p.h206
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflipable.cpp213
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflipable_p.h95
-rw-r--r--src/declarative/graphicsitems/qdeclarativefocuspanel.cpp89
-rw-r--r--src/declarative/graphicsitems/qdeclarativefocuspanel_p.h77
-rw-r--r--src/declarative/graphicsitems/qdeclarativefocusscope.cpp71
-rw-r--r--src/declarative/graphicsitems/qdeclarativefocusscope_p.h68
-rw-r--r--src/declarative/graphicsitems/qdeclarativegraphicsobjectcontainer.cpp269
-rw-r--r--src/declarative/graphicsitems/qdeclarativegraphicsobjectcontainer_p.h90
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp2105
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview_p.h242
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage.cpp392
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage_p.h103
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage_p_p.h79
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimagebase.cpp224
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimagebase_p.h99
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h87
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp2996
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.h246
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem_p.h482
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitemchangelistener_p.h76
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp157
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitemsmodule_p.h63
-rw-r--r--src/declarative/graphicsitems/qdeclarativelayoutitem.cpp114
-rw-r--r--src/declarative/graphicsitems/qdeclarativelayoutitem_p.h94
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp2641
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview_p.h318
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader.cpp497
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader_p.h111
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader_p_p.h88
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp685
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea_p.h185
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea_p_p.h117
-rw-r--r--src/declarative/graphicsitems/qdeclarativepainteditem.cpp466
-rw-r--r--src/declarative/graphicsitems/qdeclarativepainteditem_p.h114
-rw-r--r--src/declarative/graphicsitems/qdeclarativepainteditem_p_p.h90
-rw-r--r--src/declarative/graphicsitems/qdeclarativeparticles.cpp1317
-rw-r--r--src/declarative/graphicsitems/qdeclarativeparticles_p.h258
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath.cpp858
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath_p.h267
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath_p_p.h81
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp1065
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview_p.h188
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview_p_p.h149
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners.cpp891
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners_p.h199
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners_p_p.h136
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle.cpp476
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle_p.h186
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle_p_p.h106
-rw-r--r--src/declarative/graphicsitems/qdeclarativerepeater.cpp335
-rw-r--r--src/declarative/graphicsitems/qdeclarativerepeater_p.h104
-rw-r--r--src/declarative/graphicsitems/qdeclarativerepeater_p_p.h82
-rw-r--r--src/declarative/graphicsitems/qdeclarativescalegrid.cpp212
-rw-r--r--src/declarative/graphicsitems/qdeclarativescalegrid_p_p.h133
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext.cpp934
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext_p.h160
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext_p_p.h129
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp1040
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit_p.h240
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit_p_p.h113
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp915
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput_p.h232
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput_p_p.h114
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp1302
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h255
-rw-r--r--src/declarative/qml/parser/parser.pri21
-rw-r--r--src/declarative/qml/parser/qdeclarativejs.g3096
-rw-r--r--src/declarative/qml/parser/qdeclarativejsast.cpp955
-rw-r--r--src/declarative/qml/parser/qdeclarativejsast_p.h2685
-rw-r--r--src/declarative/qml/parser/qdeclarativejsastfwd_p.h189
-rw-r--r--src/declarative/qml/parser/qdeclarativejsastvisitor.cpp58
-rw-r--r--src/declarative/qml/parser/qdeclarativejsastvisitor_p.h335
-rw-r--r--src/declarative/qml/parser/qdeclarativejsengine_p.cpp212
-rw-r--r--src/declarative/qml/parser/qdeclarativejsengine_p.h173
-rw-r--r--src/declarative/qml/parser/qdeclarativejsglobal_p.h64
-rw-r--r--src/declarative/qml/parser/qdeclarativejsgrammar.cpp992
-rw-r--r--src/declarative/qml/parser/qdeclarativejsgrammar_p.h210
-rw-r--r--src/declarative/qml/parser/qdeclarativejslexer.cpp1163
-rw-r--r--src/declarative/qml/parser/qdeclarativejslexer_p.h249
-rw-r--r--src/declarative/qml/parser/qdeclarativejsmemorypool_p.h133
-rw-r--r--src/declarative/qml/parser/qdeclarativejsnodepool_p.h139
-rw-r--r--src/declarative/qml/parser/qdeclarativejsparser.cpp1857
-rw-r--r--src/declarative/qml/parser/qdeclarativejsparser_p.h246
-rw-r--r--src/declarative/qml/qbitfield_p.h165
-rw-r--r--src/declarative/qml/qdeclarative.h312
-rw-r--r--src/declarative/qml/qdeclarativebinding.cpp308
-rw-r--r--src/declarative/qml/qdeclarativebinding_p.h138
-rw-r--r--src/declarative/qml/qdeclarativebinding_p_p.h91
-rw-r--r--src/declarative/qml/qdeclarativeboundsignal.cpp263
-rw-r--r--src/declarative/qml/qdeclarativeboundsignal_p.h100
-rw-r--r--src/declarative/qml/qdeclarativeclassfactory.cpp50
-rw-r--r--src/declarative/qml/qdeclarativeclassfactory_p.h74
-rw-r--r--src/declarative/qml/qdeclarativecleanup.cpp87
-rw-r--r--src/declarative/qml/qdeclarativecleanup_p.h79
-rw-r--r--src/declarative/qml/qdeclarativecompiledbindings.cpp2738
-rw-r--r--src/declarative/qml/qdeclarativecompiledbindings_p.h116
-rw-r--r--src/declarative/qml/qdeclarativecompileddata.cpp239
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp2854
-rw-r--r--src/declarative/qml/qdeclarativecompiler_p.h344
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp805
-rw-r--r--src/declarative/qml/qdeclarativecomponent.h134
-rw-r--r--src/declarative/qml/qdeclarativecomponent_p.h147
-rw-r--r--src/declarative/qml/qdeclarativecompositetypedata_p.h152
-rw-r--r--src/declarative/qml/qdeclarativecompositetypemanager.cpp670
-rw-r--r--src/declarative/qml/qdeclarativecompositetypemanager_p.h117
-rw-r--r--src/declarative/qml/qdeclarativecontext.cpp581
-rw-r--r--src/declarative/qml/qdeclarativecontext.h107
-rw-r--r--src/declarative/qml/qdeclarativecontext_p.h195
-rw-r--r--src/declarative/qml/qdeclarativecontextscriptclass.cpp302
-rw-r--r--src/declarative/qml/qdeclarativecontextscriptclass_p.h102
-rw-r--r--src/declarative/qml/qdeclarativecustomparser.cpp263
-rw-r--r--src/declarative/qml/qdeclarativecustomparser_p.h142
-rw-r--r--src/declarative/qml/qdeclarativecustomparser_p_p.h89
-rw-r--r--src/declarative/qml/qdeclarativedeclarativedata_p.h146
-rw-r--r--src/declarative/qml/qdeclarativedirparser.cpp220
-rw-r--r--src/declarative/qml/qdeclarativedirparser_p.h125
-rw-r--r--src/declarative/qml/qdeclarativedom.cpp1846
-rw-r--r--src/declarative/qml/qdeclarativedom_p.h360
-rw-r--r--src/declarative/qml/qdeclarativedom_p_p.h157
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp1989
-rw-r--r--src/declarative/qml/qdeclarativeengine.h112
-rw-r--r--src/declarative/qml/qdeclarativeengine_p.h346
-rw-r--r--src/declarative/qml/qdeclarativeenginedebug.cpp458
-rw-r--r--src/declarative/qml/qdeclarativeenginedebug_p.h121
-rw-r--r--src/declarative/qml/qdeclarativeerror.cpp258
-rw-r--r--src/declarative/qml/qdeclarativeerror.h86
-rw-r--r--src/declarative/qml/qdeclarativeexpression.cpp825
-rw-r--r--src/declarative/qml/qdeclarativeexpression.h113
-rw-r--r--src/declarative/qml/qdeclarativeexpression_p.h190
-rw-r--r--src/declarative/qml/qdeclarativeextensioninterface.h68
-rw-r--r--src/declarative/qml/qdeclarativeextensionplugin.cpp99
-rw-r--r--src/declarative/qml/qdeclarativeextensionplugin.h73
-rw-r--r--src/declarative/qml/qdeclarativeglobal_p.h91
-rw-r--r--src/declarative/qml/qdeclarativeglobalscriptclass.cpp126
-rw-r--r--src/declarative/qml/qdeclarativeglobalscriptclass_p.h88
-rw-r--r--src/declarative/qml/qdeclarativeguard_p.h157
-rw-r--r--src/declarative/qml/qdeclarativeimageprovider.cpp72
-rw-r--r--src/declarative/qml/qdeclarativeimageprovider.h64
-rw-r--r--src/declarative/qml/qdeclarativeinfo.cpp127
-rw-r--r--src/declarative/qml/qdeclarativeinfo.h92
-rw-r--r--src/declarative/qml/qdeclarativeinstruction.cpp210
-rw-r--r--src/declarative/qml/qdeclarativeinstruction_p.h345
-rw-r--r--src/declarative/qml/qdeclarativeintegercache.cpp86
-rw-r--r--src/declarative/qml/qdeclarativeintegercache_p.h111
-rw-r--r--src/declarative/qml/qdeclarativelist.cpp409
-rw-r--r--src/declarative/qml/qdeclarativelist.h147
-rw-r--r--src/declarative/qml/qdeclarativelist_p.h85
-rw-r--r--src/declarative/qml/qdeclarativelistscriptclass.cpp149
-rw-r--r--src/declarative/qml/qdeclarativelistscriptclass_p.h87
-rw-r--r--src/declarative/qml/qdeclarativemetatype.cpp1145
-rw-r--r--src/declarative/qml/qdeclarativemetatype_p.h151
-rw-r--r--src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp84
-rw-r--r--src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.h66
-rw-r--r--src/declarative/qml/qdeclarativeobjectscriptclass.cpp754
-rw-r--r--src/declarative/qml/qdeclarativeobjectscriptclass_p.h156
-rw-r--r--src/declarative/qml/qdeclarativeparser.cpp394
-rw-r--r--src/declarative/qml/qdeclarativeparser_p.h367
-rw-r--r--src/declarative/qml/qdeclarativeparserstatus.cpp81
-rw-r--r--src/declarative/qml/qdeclarativeparserstatus.h75
-rw-r--r--src/declarative/qml/qdeclarativeprivate.h214
-rw-r--r--src/declarative/qml/qdeclarativeproperty.cpp1342
-rw-r--r--src/declarative/qml/qdeclarativeproperty.h138
-rw-r--r--src/declarative/qml/qdeclarativeproperty_p.h142
-rw-r--r--src/declarative/qml/qdeclarativepropertycache.cpp423
-rw-r--r--src/declarative/qml/qdeclarativepropertycache_p.h196
-rw-r--r--src/declarative/qml/qdeclarativepropertyvalueinterceptor.cpp79
-rw-r--r--src/declarative/qml/qdeclarativepropertyvalueinterceptor.h68
-rw-r--r--src/declarative/qml/qdeclarativepropertyvaluesource.cpp71
-rw-r--r--src/declarative/qml/qdeclarativepropertyvaluesource.h67
-rw-r--r--src/declarative/qml/qdeclarativeproxymetaobject.cpp138
-rw-r--r--src/declarative/qml/qdeclarativeproxymetaobject_p.h100
-rw-r--r--src/declarative/qml/qdeclarativerefcount.cpp70
-rw-r--r--src/declarative/qml/qdeclarativerefcount_p.h80
-rw-r--r--src/declarative/qml/qdeclarativerewrite.cpp215
-rw-r--r--src/declarative/qml/qdeclarativerewrite_p.h121
-rw-r--r--src/declarative/qml/qdeclarativescript.cpp88
-rw-r--r--src/declarative/qml/qdeclarativescriptclass_p.h89
-rw-r--r--src/declarative/qml/qdeclarativescriptparser.cpp984
-rw-r--r--src/declarative/qml/qdeclarativescriptparser_p.h137
-rw-r--r--src/declarative/qml/qdeclarativescriptstring.cpp155
-rw-r--r--src/declarative/qml/qdeclarativescriptstring.h87
-rw-r--r--src/declarative/qml/qdeclarativesqldatabase.cpp428
-rw-r--r--src/declarative/qml/qdeclarativesqldatabase_p.h67
-rw-r--r--src/declarative/qml/qdeclarativestringconverters.cpp276
-rw-r--r--src/declarative/qml/qdeclarativestringconverters_p.h87
-rw-r--r--src/declarative/qml/qdeclarativetypenamecache.cpp103
-rw-r--r--src/declarative/qml/qdeclarativetypenamecache_p.h117
-rw-r--r--src/declarative/qml/qdeclarativetypenamescriptclass.cpp166
-rw-r--r--src/declarative/qml/qdeclarativetypenamescriptclass_p.h93
-rw-r--r--src/declarative/qml/qdeclarativevaluetype.cpp781
-rw-r--r--src/declarative/qml/qdeclarativevaluetype_p.h407
-rw-r--r--src/declarative/qml/qdeclarativevaluetypescriptclass.cpp148
-rw-r--r--src/declarative/qml/qdeclarativevaluetypescriptclass_p.h86
-rw-r--r--src/declarative/qml/qdeclarativevme.cpp852
-rw-r--r--src/declarative/qml/qdeclarativevme_p.h119
-rw-r--r--src/declarative/qml/qdeclarativevmemetaobject.cpp366
-rw-r--r--src/declarative/qml/qdeclarativevmemetaobject_p.h157
-rw-r--r--src/declarative/qml/qdeclarativewatcher.cpp186
-rw-r--r--src/declarative/qml/qdeclarativewatcher_p.h94
-rw-r--r--src/declarative/qml/qdeclarativeworkerscript.cpp1257
-rw-r--r--src/declarative/qml/qdeclarativeworkerscript_p.h167
-rw-r--r--src/declarative/qml/qdeclarativexmlhttprequest.cpp1644
-rw-r--r--src/declarative/qml/qdeclarativexmlhttprequest_p.h67
-rw-r--r--src/declarative/qml/qmetaobjectbuilder.cpp2575
-rw-r--r--src/declarative/qml/qmetaobjectbuilder_p.h321
-rw-r--r--src/declarative/qml/qml.pri131
-rw-r--r--src/declarative/qml/qpodvector_p.h173
-rw-r--r--src/declarative/qml/rewriter/rewriter.cpp102
-rw-r--r--src/declarative/qml/rewriter/rewriter.pri9
-rw-r--r--src/declarative/qml/rewriter/rewriter_p.h153
-rw-r--r--src/declarative/qml/rewriter/textwriter.cpp217
-rw-r--r--src/declarative/qml/rewriter/textwriter_p.h101
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp2746
-rw-r--r--src/declarative/util/qdeclarativeanimation_p.h501
-rw-r--r--src/declarative/util/qdeclarativeanimation_p_p.h398
-rw-r--r--src/declarative/util/qdeclarativebehavior.cpp194
-rw-r--r--src/declarative/util/qdeclarativebehavior_p.h93
-rw-r--r--src/declarative/util/qdeclarativebind.cpp216
-rw-r--r--src/declarative/util/qdeclarativebind_p.h95
-rw-r--r--src/declarative/util/qdeclarativeconnections.cpp245
-rw-r--r--src/declarative/util/qdeclarativeconnections_p.h98
-rw-r--r--src/declarative/util/qdeclarativeeasefollow.cpp537
-rw-r--r--src/declarative/util/qdeclarativeeasefollow_p.h114
-rw-r--r--src/declarative/util/qdeclarativefontloader.cpp241
-rw-r--r--src/declarative/util/qdeclarativefontloader_p.h96
-rw-r--r--src/declarative/util/qdeclarativelistaccessor.cpp138
-rw-r--r--src/declarative/util/qdeclarativelistaccessor_p.h80
-rw-r--r--src/declarative/util/qdeclarativelistmodel.cpp985
-rw-r--r--src/declarative/util/qdeclarativelistmodel_p.h139
-rw-r--r--src/declarative/util/qdeclarativenullablevalue_p_p.h81
-rw-r--r--src/declarative/util/qdeclarativeopenmetaobject.cpp355
-rw-r--r--src/declarative/util/qdeclarativeopenmetaobject_p.h125
-rw-r--r--src/declarative/util/qdeclarativepackage.cpp194
-rw-r--r--src/declarative/util/qdeclarativepackage_p.h104
-rw-r--r--src/declarative/util/qdeclarativepixmapcache.cpp642
-rw-r--r--src/declarative/util/qdeclarativepixmapcache_p.h107
-rw-r--r--src/declarative/util/qdeclarativepropertychanges.cpp486
-rw-r--r--src/declarative/util/qdeclarativepropertychanges_p.h95
-rw-r--r--src/declarative/util/qdeclarativepropertymap.cpp279
-rw-r--r--src/declarative/util/qdeclarativepropertymap.h90
-rw-r--r--src/declarative/util/qdeclarativespringfollow.cpp465
-rw-r--r--src/declarative/util/qdeclarativespringfollow_p.h112
-rw-r--r--src/declarative/util/qdeclarativestate.cpp483
-rw-r--r--src/declarative/util/qdeclarativestate_p.h183
-rw-r--r--src/declarative/util/qdeclarativestate_p_p.h153
-rw-r--r--src/declarative/util/qdeclarativestategroup.cpp441
-rw-r--r--src/declarative/util/qdeclarativestategroup_p.h95
-rw-r--r--src/declarative/util/qdeclarativestateoperations.cpp996
-rw-r--r--src/declarative/util/qdeclarativestateoperations_p.h216
-rw-r--r--src/declarative/util/qdeclarativestyledtext.cpp347
-rw-r--r--src/declarative/util/qdeclarativestyledtext_p.h69
-rw-r--r--src/declarative/util/qdeclarativesystempalette.cpp304
-rw-r--r--src/declarative/util/qdeclarativesystempalette_p.h122
-rw-r--r--src/declarative/util/qdeclarativetimeline.cpp942
-rw-r--r--src/declarative/util/qdeclarativetimeline_p_p.h200
-rw-r--r--src/declarative/util/qdeclarativetimer.cpp317
-rw-r--r--src/declarative/util/qdeclarativetimer_p.h112
-rw-r--r--src/declarative/util/qdeclarativetransition.cpp249
-rw-r--r--src/declarative/util/qdeclarativetransition_p.h101
-rw-r--r--src/declarative/util/qdeclarativetransitionmanager.cpp283
-rw-r--r--src/declarative/util/qdeclarativetransitionmanager_p_p.h85
-rw-r--r--src/declarative/util/qdeclarativeutilmodule.cpp118
-rw-r--r--src/declarative/util/qdeclarativeutilmodule_p.h63
-rw-r--r--src/declarative/util/qdeclarativeview.cpp585
-rw-r--r--src/declarative/util/qdeclarativeview.h116
-rw-r--r--src/declarative/util/qdeclarativexmllistmodel.cpp834
-rw-r--r--src/declarative/util/qdeclarativexmllistmodel_p.h197
-rw-r--r--src/declarative/util/qfxperf.cpp67
-rw-r--r--src/declarative/util/qfxperf_p_p.h90
-rw-r--r--src/declarative/util/qperformancelog.cpp181
-rw-r--r--src/declarative/util/qperformancelog_p_p.h141
-rw-r--r--src/declarative/util/util.pri68
-rw-r--r--src/gui/dialogs/dialogs.pri3
-rw-r--r--src/gui/dialogs/qabstractprintdialog.cpp7
-rw-r--r--src/gui/dialogs/qabstractprintdialog.h6
-rw-r--r--src/gui/dialogs/qdialog.cpp7
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm27
-rw-r--r--src/gui/dialogs/qfiledialog_win.cpp78
-rw-r--r--src/gui/dialogs/qfiledialog_win_p.h243
-rw-r--r--src/gui/dialogs/qfileinfogatherer.cpp1
-rw-r--r--src/gui/dialogs/qfileinfogatherer_p.h1
-rw-r--r--src/gui/dialogs/qfilesystemmodel.cpp122
-rw-r--r--src/gui/dialogs/qfilesystemmodel.h1
-rw-r--r--src/gui/dialogs/qfilesystemmodel_p.h4
-rw-r--r--src/gui/dialogs/qfontdialog.cpp27
-rw-r--r--src/gui/dialogs/qfontdialog_mac.mm395
-rw-r--r--src/gui/dialogs/qfontdialog_p.h12
-rw-r--r--src/gui/dialogs/qmessagebox.cpp4
-rw-r--r--src/gui/dialogs/qprintdialog_qws.cpp17
-rw-r--r--src/gui/dialogs/qprintdialog_unix.cpp17
-rw-r--r--src/gui/dialogs/qprintdialog_win.cpp18
-rw-r--r--src/gui/dialogs/qprintsettingsoutput.ui246
-rw-r--r--src/gui/egl/egl.pri1
-rw-r--r--src/gui/egl/qegl.cpp326
-rw-r--r--src/gui/egl/qegl_p.h132
-rw-r--r--src/gui/egl/qegl_qws.cpp30
-rw-r--r--src/gui/egl/qegl_symbian.cpp48
-rw-r--r--src/gui/egl/qegl_wince.cpp54
-rw-r--r--src/gui/egl/qegl_x11.cpp349
-rw-r--r--src/gui/egl/qeglcontext_p.h119
-rw-r--r--src/gui/egl/qeglproperties.cpp31
-rw-r--r--src/gui/egl/qeglproperties_p.h51
-rw-r--r--src/gui/embedded/directfb.pri2
-rw-r--r--src/gui/embedded/qscreen_qws.cpp21
-rw-r--r--src/gui/embedded/qwsmanager_qws.cpp6
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp7
-rw-r--r--src/gui/graphicsview/qgraphicsitem.h8
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h13
-rw-r--r--src/gui/graphicsview/qgraphicslinearlayout.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp427
-rw-r--r--src/gui/graphicsview/qgraphicsscene_p.h19
-rw-r--r--src/gui/graphicsview/qgraphicsview_p.h2
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp30
-rw-r--r--src/gui/graphicsview/qgraphicswidget.h4
-rw-r--r--src/gui/graphicsview/qgraphicswidget_p.h2
-rw-r--r--src/gui/image/image.pri4
-rw-r--r--src/gui/image/qimage.cpp95
-rw-r--r--src/gui/image/qimage.h3
-rw-r--r--src/gui/image/qpaintengine_pic.cpp5
-rw-r--r--src/gui/image/qpicture.cpp49
-rw-r--r--src/gui/image/qpixmap.cpp28
-rw-r--r--src/gui/image/qpixmap.h4
-rw-r--r--src/gui/image/qpixmap_x11.cpp30
-rw-r--r--src/gui/image/qpixmap_x11_p.h12
-rw-r--r--src/gui/image/qpixmapfilter.cpp4
-rw-r--r--src/gui/image/qpnghandler.cpp137
-rw-r--r--src/gui/inputmethod/qwininputcontext_p.h2
-rw-r--r--src/gui/itemviews/qdirmodel.cpp4
-rw-r--r--src/gui/itemviews/qfileiconprovider.cpp2
-rw-r--r--src/gui/itemviews/qheaderview.cpp27
-rw-r--r--src/gui/itemviews/qsortfilterproxymodel.cpp41
-rw-r--r--src/gui/itemviews/qtableview.cpp7
-rw-r--r--src/gui/itemviews/qtreeview.cpp168
-rw-r--r--src/gui/itemviews/qtreeview_p.h14
-rw-r--r--src/gui/kernel/kernel.pri1
-rw-r--r--src/gui/kernel/qaction.h3
-rw-r--r--src/gui/kernel/qapplication.cpp286
-rw-r--r--src/gui/kernel/qapplication_mac.mm82
-rw-r--r--src/gui/kernel/qapplication_p.h15
-rw-r--r--src/gui/kernel/qapplication_win.cpp21
-rw-r--r--src/gui/kernel/qapplication_x11.cpp133
-rw-r--r--src/gui/kernel/qclipboard.cpp6
-rw-r--r--src/gui/kernel/qcocoaapplication_mac.mm46
-rw-r--r--src/gui/kernel/qcocoaapplication_mac_p.h8
-rw-r--r--src/gui/kernel/qcocoaapplicationdelegate_mac.mm20
-rw-r--r--src/gui/kernel/qcocoamenuloader_mac.mm26
-rw-r--r--src/gui/kernel/qcocoamenuloader_mac_p.h5
-rw-r--r--src/gui/kernel/qcocoapanel_mac.mm1
-rw-r--r--src/gui/kernel/qcocoapanel_mac_p.h6
-rw-r--r--src/gui/kernel/qcocoasharedwindowmethods_mac_p.h200
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm189
-rw-r--r--src/gui/kernel/qcocoaview_mac_p.h3
-rw-r--r--src/gui/kernel/qcocoawindow_mac.mm1
-rw-r--r--src/gui/kernel/qcocoawindow_mac_p.h3
-rw-r--r--src/gui/kernel/qcocoawindowdelegate_mac.mm7
-rw-r--r--src/gui/kernel/qcursor.cpp6
-rw-r--r--src/gui/kernel/qcursor_mac.mm57
-rw-r--r--src/gui/kernel/qcursor_win.cpp7
-rw-r--r--src/gui/kernel/qcursor_x11.cpp50
-rw-r--r--src/gui/kernel/qdesktopwidget_win.cpp4
-rw-r--r--src/gui/kernel/qdnd.cpp218
-rw-r--r--src/gui/kernel/qdnd_p.h2
-rw-r--r--src/gui/kernel/qdnd_x11.cpp6
-rw-r--r--src/gui/kernel/qeventdispatcher_mac.mm414
-rw-r--r--src/gui/kernel/qeventdispatcher_mac_p.h11
-rw-r--r--src/gui/kernel/qgesture_p.h2
-rw-r--r--src/gui/kernel/qgesturerecognizer.cpp1
-rw-r--r--src/gui/kernel/qguieventdispatcher_glib.cpp5
-rw-r--r--src/gui/kernel/qguieventdispatcher_glib_p.h1
-rw-r--r--src/gui/kernel/qkeymapper_win.cpp4
-rw-r--r--src/gui/kernel/qkeymapper_x11.cpp2
-rw-r--r--src/gui/kernel/qkeysequence.cpp36
-rw-r--r--src/gui/kernel/qkeysequence.h12
-rw-r--r--src/gui/kernel/qmime_mac.cpp57
-rw-r--r--src/gui/kernel/qmime_win.cpp2
-rw-r--r--src/gui/kernel/qnsthemeframe_mac_p.h2
-rw-r--r--src/gui/kernel/qt_cocoa_helpers_mac.mm112
-rw-r--r--src/gui/kernel/qt_cocoa_helpers_mac_p.h27
-rw-r--r--src/gui/kernel/qt_x11_p.h7
-rw-r--r--src/gui/kernel/qwidget.cpp302
-rw-r--r--src/gui/kernel/qwidget.h1
-rw-r--r--src/gui/kernel/qwidget_mac.mm281
-rw-r--r--src/gui/kernel/qwidget_p.h6
-rw-r--r--src/gui/kernel/qwidget_win.cpp25
-rw-r--r--src/gui/kernel/qwidget_wince.cpp4
-rw-r--r--src/gui/mac/qt_menu.nib/classes.nib16
-rw-r--r--src/gui/mac/qt_menu.nib/info.nib4
-rw-r--r--src/gui/mac/qt_menu.nib/keyedobjects.nibbin5567 -> 5560 bytes
-rw-r--r--src/gui/math3d/qmatrix4x4.h2
-rw-r--r--src/gui/math3d/qquaternion.h2
-rw-r--r--src/gui/math3d/qvector2d.h2
-rw-r--r--src/gui/math3d/qvector3d.h2
-rw-r--r--src/gui/math3d/qvector4d.h2
-rw-r--r--src/gui/painting/qbezier.cpp36
-rw-r--r--src/gui/painting/qbezier_p.h6
-rw-r--r--src/gui/painting/qbrush.cpp36
-rw-r--r--src/gui/painting/qcolor.cpp39
-rw-r--r--src/gui/painting/qcolor.h3
-rw-r--r--src/gui/painting/qcolormap.qdoc10
-rw-r--r--src/gui/painting/qcups.cpp3
-rw-r--r--src/gui/painting/qdatabuffer_p.h7
-rw-r--r--src/gui/painting/qdrawhelper.cpp238
-rw-r--r--src/gui/painting/qdrawhelper_p.h11
-rw-r--r--src/gui/painting/qdrawutil.cpp217
-rw-r--r--src/gui/painting/qdrawutil.h25
-rw-r--r--src/gui/painting/qemulationpaintengine.cpp35
-rw-r--r--src/gui/painting/qemulationpaintengine_p.h1
-rw-r--r--src/gui/painting/qmemrotate_p.h3
-rw-r--r--src/gui/painting/qpaintbuffer.cpp141
-rw-r--r--src/gui/painting/qpaintbuffer_p.h5
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp57
-rw-r--r--src/gui/painting/qpaintengine_raster_p.h5
-rw-r--r--src/gui/painting/qpaintengineex.cpp21
-rw-r--r--src/gui/painting/qpaintengineex_p.h6
-rw-r--r--src/gui/painting/qpainter.cpp359
-rw-r--r--src/gui/painting/qpainter.h41
-rw-r--r--src/gui/painting/qpainter_p.h8
-rw-r--r--src/gui/painting/qpainterpath.cpp2
-rw-r--r--src/gui/painting/qpathclipper.cpp259
-rw-r--r--src/gui/painting/qpathclipper_p.h1
-rw-r--r--src/gui/painting/qpdf.cpp12
-rw-r--r--src/gui/painting/qpdf_p.h2
-rw-r--r--src/gui/painting/qprintengine.h2
-rw-r--r--src/gui/painting/qprintengine_mac.mm10
-rw-r--r--src/gui/painting/qprintengine_qws.cpp5
-rw-r--r--src/gui/painting/qprintengine_win.cpp12
-rw-r--r--src/gui/painting/qprintengine_win_p.h1
-rw-r--r--src/gui/painting/qprinter.cpp102
-rw-r--r--src/gui/painting/qprinter.h6
-rw-r--r--src/gui/painting/qstroker.cpp116
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp45
-rw-r--r--src/gui/painting/qtextureglyphcache_p.h11
-rw-r--r--src/gui/statemachine/qguistatemachine.cpp6
-rw-r--r--src/gui/styles/qcommonstyle.cpp200
-rw-r--r--src/gui/styles/qgtkpainter.cpp2
-rw-r--r--src/gui/styles/qgtkstyle.cpp203
-rw-r--r--src/gui/styles/qgtkstyle_p.cpp103
-rw-r--r--src/gui/styles/qgtkstyle_p.h78
-rw-r--r--src/gui/styles/qmacstyle_mac.mm13
-rw-r--r--src/gui/styles/qs60style_s60.cpp4
-rw-r--r--src/gui/styles/qs60style_simulated.cpp12
-rw-r--r--src/gui/styles/qstylehelper.cpp65
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp23
-rw-r--r--src/gui/text/qfont.h1
-rw-r--r--src/gui/text/qfontdatabase_qws.cpp7
-rw-r--r--src/gui/text/qfontdatabase_win.cpp1
-rw-r--r--src/gui/text/qfontengine.cpp10
-rw-r--r--src/gui/text/qfontengine_ft.cpp72
-rw-r--r--src/gui/text/qfontengine_ft_p.h16
-rw-r--r--src/gui/text/qfontengine_mac.mm2
-rw-r--r--src/gui/text/qfontengine_qpf.cpp14
-rw-r--r--src/gui/text/qfontengine_win.cpp6
-rw-r--r--src/gui/text/qstatictext.cpp616
-rw-r--r--src/gui/text/qstatictext.h106
-rw-r--r--src/gui/text/qstatictext_p.h146
-rw-r--r--src/gui/text/qsyntaxhighlighter.cpp95
-rw-r--r--src/gui/text/qtextcontrol.cpp12
-rw-r--r--src/gui/text/qtextcursor.cpp26
-rw-r--r--src/gui/text/qtextcursor.h1
-rw-r--r--src/gui/text/qtextdocument.cpp33
-rw-r--r--src/gui/text/qtextdocument.h7
-rw-r--r--src/gui/text/qtextdocument_p.cpp63
-rw-r--r--src/gui/text/qtextdocument_p.h3
-rw-r--r--src/gui/text/qtextengine_p.h1
-rw-r--r--src/gui/text/qtextlayout.cpp2
-rw-r--r--src/gui/text/qzipreader_p.h4
-rw-r--r--src/gui/text/text.pri7
-rw-r--r--src/gui/util/qcompleter.cpp77
-rw-r--r--src/gui/util/qcompleter.h1
-rw-r--r--src/gui/util/qcompleter_p.h1
-rw-r--r--src/gui/util/qdesktopservices_s60.cpp4
-rw-r--r--src/gui/util/qdesktopservices_win.cpp16
-rw-r--r--src/gui/util/qsystemtrayicon_mac.mm115
-rw-r--r--src/gui/util/qsystemtrayicon_win.cpp3
-rw-r--r--src/gui/widgets/qabstractscrollarea_p.h2
-rw-r--r--src/gui/widgets/qabstractspinbox.cpp5
-rw-r--r--src/gui/widgets/qcheckbox.cpp2
-rw-r--r--src/gui/widgets/qcocoamenu_mac.mm33
-rw-r--r--src/gui/widgets/qcocoamenu_mac_p.h4
-rw-r--r--src/gui/widgets/qcombobox.cpp5
-rw-r--r--src/gui/widgets/qcombobox.h4
-rw-r--r--src/gui/widgets/qdatetimeedit.cpp2
-rw-r--r--src/gui/widgets/qdialogbuttonbox.cpp28
-rw-r--r--src/gui/widgets/qdockarealayout.cpp70
-rw-r--r--src/gui/widgets/qdockarealayout_p.h5
-rw-r--r--src/gui/widgets/qdockwidget.cpp2
-rw-r--r--src/gui/widgets/qfocusframe.cpp91
-rw-r--r--src/gui/widgets/qlabel.cpp93
-rw-r--r--src/gui/widgets/qlabel.h7
-rw-r--r--src/gui/widgets/qlabel_p.h2
-rw-r--r--src/gui/widgets/qlinecontrol.cpp6
-rw-r--r--src/gui/widgets/qlinecontrol_p.h2
-rw-r--r--src/gui/widgets/qlineedit.cpp29
-rw-r--r--src/gui/widgets/qlineedit.h6
-rw-r--r--src/gui/widgets/qmainwindow.cpp16
-rw-r--r--src/gui/widgets/qmenu.cpp47
-rw-r--r--src/gui/widgets/qmenu.h1
-rw-r--r--src/gui/widgets/qmenu_mac.mm235
-rw-r--r--src/gui/widgets/qmenu_p.h6
-rw-r--r--src/gui/widgets/qmenubar_p.h1
-rw-r--r--src/gui/widgets/qplaintextedit.cpp23
-rw-r--r--src/gui/widgets/qplaintextedit.h2
-rw-r--r--src/gui/widgets/qradiobutton.cpp2
-rw-r--r--src/gui/widgets/qscrollbar.cpp1
-rw-r--r--src/gui/widgets/qtabbar.cpp4
-rw-r--r--src/gui/widgets/qtabbar_p.h3
-rw-r--r--src/gui/widgets/qtextedit.cpp13
-rw-r--r--src/gui/widgets/qtoolbar.cpp9
-rw-r--r--src/gui/widgets/qtoolbar.h1
-rw-r--r--src/gui/widgets/qvalidator.cpp20
-rw-r--r--src/gui/widgets/qvalidator.h6
-rw-r--r--src/imports/imports.pro7
-rw-r--r--src/imports/multimedia/multimedia.cpp73
-rw-r--r--src/imports/multimedia/multimedia.pro26
-rw-r--r--src/imports/multimedia/qdeclarativeaudio.cpp328
-rw-r--r--src/imports/multimedia/qdeclarativeaudio_p.h173
-rw-r--r--src/imports/multimedia/qdeclarativemediabase.cpp413
-rw-r--r--src/imports/multimedia/qdeclarativemediabase_p.h168
-rw-r--r--src/imports/multimedia/qdeclarativevideo.cpp946
-rw-r--r--src/imports/multimedia/qdeclarativevideo_p.h204
-rw-r--r--src/imports/multimedia/qmetadatacontrolmetaobject.cpp362
-rw-r--r--src/imports/multimedia/qmetadatacontrolmetaobject_p.h92
-rw-r--r--src/imports/multimedia/qmldir1
-rw-r--r--src/imports/qimportbase.pri33
-rw-r--r--src/imports/webkit/plugin.cpp67
-rw-r--r--src/imports/webkit/qdeclarativewebview.cpp1340
-rw-r--r--src/imports/webkit/qdeclarativewebview_p.h288
-rw-r--r--src/imports/webkit/qdeclarativewebview_p_p.h153
-rw-r--r--src/imports/webkit/qmldir1
-rw-r--r--src/imports/webkit/webkit.pro19
-rw-r--r--src/imports/webkit/webkitqmlplugin_export.h53
-rw-r--r--src/imports/widgets/graphicslayouts.cpp260
-rw-r--r--src/imports/widgets/graphicslayouts_p.h226
-rw-r--r--src/imports/widgets/graphicswidgets.cpp40
-rw-r--r--src/imports/widgets/graphicswidgets_p.h68
-rw-r--r--src/imports/widgets/qmldir1
-rw-r--r--src/imports/widgets/widgets.cpp138
-rw-r--r--src/imports/widgets/widgets.pro22
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo.cpp34
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo.h2
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp12
-rw-r--r--src/multimedia/audio/qaudioformat.cpp66
-rw-r--r--src/multimedia/audio/qaudioformat.h4
-rw-r--r--src/multimedia/audio/qaudioinput_win32_p.cpp9
-rw-r--r--src/multimedia/audio/qaudiooutput_win32_p.cpp4
-rw-r--r--src/multimedia/audio/qaudiooutput_win32_p.h2
-rw-r--r--src/multimedia/base/base.pri63
-rw-r--r--src/multimedia/base/qgraphicsvideoitem.cpp418
-rw-r--r--src/multimedia/base/qgraphicsvideoitem.h109
-rw-r--r--src/multimedia/base/qlocalmediaplaylistprovider.cpp196
-rw-r--r--src/multimedia/base/qlocalmediaplaylistprovider.h87
-rw-r--r--src/multimedia/base/qmediacontent.cpp242
-rw-r--r--src/multimedia/base/qmediacontent.h93
-rw-r--r--src/multimedia/base/qmediacontrol.cpp140
-rw-r--r--src/multimedia/base/qmediacontrol.h82
-rw-r--r--src/multimedia/base/qmediacontrol_p.h74
-rw-r--r--src/multimedia/base/qmediaobject.cpp419
-rw-r--r--src/multimedia/base/qmediaobject.h121
-rw-r--r--src/multimedia/base/qmediaobject_p.h95
-rw-r--r--src/multimedia/base/qmediaplaylist.cpp724
-rw-r--r--src/multimedia/base/qmediaplaylist.h147
-rw-r--r--src/multimedia/base/qmediaplaylist_p.h172
-rw-r--r--src/multimedia/base/qmediaplaylistcontrol.cpp204
-rw-r--r--src/multimedia/base/qmediaplaylistcontrol.h97
-rw-r--r--src/multimedia/base/qmediaplaylistioplugin.cpp192
-rw-r--r--src/multimedia/base/qmediaplaylistioplugin.h126
-rw-r--r--src/multimedia/base/qmediaplaylistnavigator.cpp545
-rw-r--r--src/multimedia/base/qmediaplaylistnavigator.h116
-rw-r--r--src/multimedia/base/qmediaplaylistprovider.cpp308
-rw-r--r--src/multimedia/base/qmediaplaylistprovider.h114
-rw-r--r--src/multimedia/base/qmediaplaylistprovider_p.h75
-rw-r--r--src/multimedia/base/qmediapluginloader.cpp133
-rw-r--r--src/multimedia/base/qmediapluginloader_p.h92
-rw-r--r--src/multimedia/base/qmediaresource.cpp399
-rw-r--r--src/multimedia/base/qmediaresource.h134
-rw-r--r--src/multimedia/base/qmediaservice.cpp140
-rw-r--r--src/multimedia/base/qmediaservice.h90
-rw-r--r--src/multimedia/base/qmediaservice_p.h75
-rw-r--r--src/multimedia/base/qmediaserviceprovider.cpp738
-rw-r--r--src/multimedia/base/qmediaserviceprovider.h174
-rw-r--r--src/multimedia/base/qmediaserviceproviderplugin.h125
-rw-r--r--src/multimedia/base/qmediatimerange.cpp708
-rw-r--r--src/multimedia/base/qmediatimerange.h135
-rw-r--r--src/multimedia/base/qmetadatacontrol.cpp185
-rw-r--r--src/multimedia/base/qmetadatacontrol.h92
-rw-r--r--src/multimedia/base/qpaintervideosurface.cpp1574
-rw-r--r--src/multimedia/base/qpaintervideosurface_p.h158
-rw-r--r--src/multimedia/base/qtmedianamespace.h189
-rw-r--r--src/multimedia/base/qtmedianamespace.qdoc210
-rw-r--r--src/multimedia/base/qvideodevicecontrol.cpp155
-rw-r--r--src/multimedia/base/qvideodevicecontrol.h90
-rw-r--r--src/multimedia/base/qvideooutputcontrol.cpp135
-rw-r--r--src/multimedia/base/qvideooutputcontrol.h91
-rw-r--r--src/multimedia/base/qvideorenderercontrol.cpp124
-rw-r--r--src/multimedia/base/qvideorenderercontrol.h77
-rw-r--r--src/multimedia/base/qvideowidget.cpp913
-rw-r--r--src/multimedia/base/qvideowidget.h134
-rw-r--r--src/multimedia/base/qvideowidget_p.h265
-rw-r--r--src/multimedia/base/qvideowidgetcontrol.cpp235
-rw-r--r--src/multimedia/base/qvideowidgetcontrol.h105
-rw-r--r--src/multimedia/base/qvideowindowcontrol.cpp275
-rw-r--r--src/multimedia/base/qvideowindowcontrol.h111
-rw-r--r--src/multimedia/effects/effects.pri25
-rw-r--r--src/multimedia/effects/qsoundeffect.cpp200
-rw-r--r--src/multimedia/effects/qsoundeffect_p.h109
-rw-r--r--src/multimedia/effects/qsoundeffect_pulse_p.cpp499
-rw-r--r--src/multimedia/effects/qsoundeffect_pulse_p.h137
-rw-r--r--src/multimedia/effects/qsoundeffect_qmedia_p.cpp132
-rw-r--r--src/multimedia/effects/qsoundeffect_qmedia_p.h103
-rw-r--r--src/multimedia/effects/qsoundeffect_qsound_p.cpp131
-rw-r--r--src/multimedia/effects/qsoundeffect_qsound_p.h102
-rw-r--r--src/multimedia/effects/wavedecoder_p.cpp151
-rw-r--r--src/multimedia/effects/wavedecoder_p.h133
-rw-r--r--src/multimedia/multimedia.pro5
-rw-r--r--src/multimedia/playback/playback.pri11
-rw-r--r--src/multimedia/playback/qmediaplayer.cpp982
-rw-r--r--src/multimedia/playback/qmediaplayer.h203
-rw-r--r--src/multimedia/playback/qmediaplayercontrol.cpp378
-rw-r--r--src/multimedia/playback/qmediaplayercontrol.h131
-rw-r--r--src/network/access/qhttpnetworkrequest.cpp70
-rw-r--r--src/network/access/qhttpnetworkrequest_p.h7
-rw-r--r--src/network/access/qnetworkaccessbackend.cpp38
-rw-r--r--src/network/access/qnetworkaccessbackend_p.h6
-rw-r--r--src/network/access/qnetworkaccessdatabackend.cpp69
-rw-r--r--src/network/access/qnetworkaccessdebugpipebackend.cpp4
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp71
-rw-r--r--src/network/access/qnetworkaccesshttpbackend_p.h5
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp252
-rw-r--r--src/network/access/qnetworkaccessmanager.h20
-rw-r--r--src/network/access/qnetworkaccessmanager_p.h17
-rw-r--r--src/network/access/qnetworkreply.cpp20
-rw-r--r--src/network/access/qnetworkreply.h4
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp160
-rw-r--r--src/network/access/qnetworkreplyimpl_p.h31
-rw-r--r--src/network/access/qnetworkrequest.cpp51
-rw-r--r--src/network/access/qnetworkrequest.h10
-rw-r--r--src/network/bearer/bearer.pri18
-rw-r--r--src/network/bearer/qbearerengine.cpp113
-rw-r--r--src/network/bearer/qbearerengine_p.h115
-rw-r--r--src/network/bearer/qbearerplugin.cpp57
-rw-r--r--src/network/bearer/qbearerplugin_p.h93
-rw-r--r--src/network/bearer/qnetworkconfigmanager.cpp463
-rw-r--r--src/network/bearer/qnetworkconfigmanager.h101
-rw-r--r--src/network/bearer/qnetworkconfigmanager_p.cpp291
-rw-r--r--src/network/bearer/qnetworkconfigmanager_p.h127
-rw-r--r--src/network/bearer/qnetworkconfiguration.cpp395
-rw-r--r--src/network/bearer/qnetworkconfiguration.h115
-rw-r--r--src/network/bearer/qnetworkconfiguration_p.h107
-rw-r--r--src/network/bearer/qnetworksession.cpp702
-rw-r--r--src/network/bearer/qnetworksession.h132
-rw-r--r--src/network/bearer/qnetworksession_p.h150
-rw-r--r--src/network/kernel/qhostinfo.cpp2
-rw-r--r--src/network/kernel/qhostinfo_unix.cpp4
-rw-r--r--src/network/network.pro1
-rw-r--r--src/network/socket/qnativesocketengine.cpp6
-rw-r--r--src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp8
-rw-r--r--src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h30
-rw-r--r--src/opengl/gl2paintengineex/qglgradientcache.cpp2
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp434
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h19
-rw-r--r--src/opengl/gl2paintengineex/qtriangulatingstroker.cpp5
-rw-r--r--src/opengl/gl2paintengineex/qtriangulatingstroker_p.h4
-rw-r--r--src/opengl/gl2paintengineex/qtriangulator.cpp2983
-rw-r--r--src/opengl/gl2paintengineex/qtriangulator_p.h98
-rw-r--r--src/opengl/opengl.pro12
-rw-r--r--src/opengl/qgl.cpp315
-rw-r--r--src/opengl/qgl.h25
-rw-r--r--src/opengl/qgl_cl_p.h141
-rw-r--r--src/opengl/qgl_egl.cpp196
-rw-r--r--src/opengl/qgl_egl_p.h8
-rw-r--r--src/opengl/qgl_p.h95
-rw-r--r--src/opengl/qgl_qws.cpp23
-rw-r--r--src/opengl/qgl_win.cpp161
-rw-r--r--src/opengl/qgl_wince.cpp21
-rw-r--r--src/opengl/qgl_x11.cpp2
-rw-r--r--src/opengl/qgl_x11egl.cpp461
-rw-r--r--src/opengl/qglbuffer.cpp454
-rw-r--r--src/opengl/qglbuffer.h124
-rw-r--r--src/opengl/qglextensions.cpp32
-rw-r--r--src/opengl/qglextensions_p.h102
-rw-r--r--src/opengl/qglframebufferobject.cpp12
-rw-r--r--src/opengl/qglpaintdevice.cpp8
-rw-r--r--src/opengl/qglpixelbuffer.cpp6
-rw-r--r--src/opengl/qglpixelbuffer.h1
-rw-r--r--src/opengl/qglpixelbuffer_egl.cpp16
-rw-r--r--src/opengl/qglshaderprogram.cpp392
-rw-r--r--src/opengl/qglshaderprogram.h50
-rw-r--r--src/opengl/qgraphicsshadereffect.cpp2
-rw-r--r--src/opengl/qgraphicssystem_gl.cpp1
-rw-r--r--src/opengl/qpaintengine_opengl.cpp291
-rw-r--r--src/opengl/qpaintengine_opengl_p.h1
-rw-r--r--src/opengl/qpixmapdata_x11gl_egl.cpp178
-rw-r--r--src/opengl/qpixmapdata_x11gl_p.h9
-rw-r--r--src/opengl/qwindowsurface_gl.cpp36
-rw-r--r--src/openvg/qpaintengine_vg.cpp121
-rw-r--r--src/openvg/qpaintengine_vg_p.h7
-rw-r--r--src/openvg/qpixmapdata_vg.cpp12
-rw-r--r--src/openvg/qvg_p.h2
-rw-r--r--src/openvg/qwindowsurface_vg.cpp2
-rw-r--r--src/openvg/qwindowsurface_vgegl_p.h2
-rw-r--r--src/plugins/accessible/widgets/qaccessiblewidgets.cpp2
-rw-r--r--src/plugins/bearer/bearer.pro14
-rw-r--r--src/plugins/bearer/corewlan/corewlan.pro24
-rw-r--r--src/plugins/bearer/corewlan/main.cpp84
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.h106
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.mm615
-rw-r--r--src/plugins/bearer/generic/generic.pro16
-rw-r--r--src/plugins/bearer/generic/main.cpp84
-rw-r--r--src/plugins/bearer/generic/qgenericengine.cpp332
-rw-r--r--src/plugins/bearer/generic/qgenericengine.h93
-rw-r--r--src/plugins/bearer/icd/icd.pro22
-rw-r--r--src/plugins/bearer/icd/main.cpp84
-rw-r--r--src/plugins/bearer/icd/monitor.cpp84
-rw-r--r--src/plugins/bearer/icd/monitor.h114
-rw-r--r--src/plugins/bearer/icd/qicdengine.cpp415
-rw-r--r--src/plugins/bearer/icd/qicdengine.h130
-rw-r--r--src/plugins/bearer/icd/qnetworksession_impl.cpp1123
-rw-r--r--src/plugins/bearer/icd/qnetworksession_impl.h152
-rw-r--r--src/plugins/bearer/nativewifi/main.cpp139
-rw-r--r--src/plugins/bearer/nativewifi/nativewifi.pro17
-rw-r--r--src/plugins/bearer/nativewifi/platformdefs.h322
-rw-r--r--src/plugins/bearer/nativewifi/qnativewifiengine.cpp541
-rw-r--r--src/plugins/bearer/nativewifi/qnativewifiengine.h104
-rw-r--r--src/plugins/bearer/networkmanager/main.cpp89
-rw-r--r--src/plugins/bearer/networkmanager/networkmanager.pro20
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp846
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.h139
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp995
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerservice.h445
-rw-r--r--src/plugins/bearer/networkmanager/qnmdbushelper.cpp126
-rw-r--r--src/plugins/bearer/networkmanager/qnmdbushelper.h75
-rw-r--r--src/plugins/bearer/nla/main.cpp84
-rw-r--r--src/plugins/bearer/nla/nla.pro23
-rw-r--r--src/plugins/bearer/nla/qnlaengine.cpp647
-rw-r--r--src/plugins/bearer/nla/qnlaengine.h114
-rw-r--r--src/plugins/bearer/platformdefs_win.h134
-rw-r--r--src/plugins/bearer/qbearerengine_impl.h81
-rw-r--r--src/plugins/bearer/qnetworksession_impl.cpp441
-rw-r--r--src/plugins/bearer/qnetworksession_impl.h131
-rw-r--r--src/plugins/bearer/symbian/main.cpp84
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp1148
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.h196
-rw-r--r--src/plugins/bearer/symbian/symbian.pro38
-rw-r--r--src/plugins/bearer/symbian/symbianengine.cpp1028
-rw-r--r--src/plugins/bearer/symbian/symbianengine.h206
-rw-r--r--src/plugins/codecs/cn/qgb18030codec.cpp59
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp10
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h2
-rw-r--r--src/plugins/graphicssystems/opengl/main.cpp4
-rw-r--r--src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp9
-rw-r--r--src/plugins/imageformats/ico/qicohandler.cpp4
-rw-r--r--src/plugins/imageformats/ico/qicohandler.h4
-rw-r--r--src/plugins/imageformats/jpeg/jpeg.pro12
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.cpp629
-rw-r--r--src/plugins/imageformats/tiff/tiff.pro6
-rw-r--r--src/plugins/mediaservices/directshow/directshow.pro14
-rw-r--r--src/plugins/mediaservices/directshow/dsserviceplugin.cpp188
-rw-r--r--src/plugins/mediaservices/directshow/dsserviceplugin.h77
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowaudioendpointcontrol.cpp166
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowaudioendpointcontrol.h95
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.cpp161
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.h83
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowglobal.h147
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.cpp501
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.h126
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.cpp639
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.h157
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowmediatype.cpp189
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowmediatype.h85
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowmediatypelist.cpp229
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowmediatypelist.h78
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowmetadatacontrol.cpp370
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowmetadatacontrol.h104
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowpinenum.cpp140
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowpinenum.h81
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowplayercontrol.cpp395
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowplayercontrol.h153
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.cpp1372
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.h219
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowsamplescheduler.cpp414
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowsamplescheduler.h127
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowvideooutputcontrol.cpp87
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowvideooutputcontrol.h75
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowvideorenderercontrol.cpp93
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowvideorenderercontrol.h82
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/mediaplayer.pri45
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/mediasamplevideobuffer.cpp91
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/mediasamplevideobuffer.h77
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/videosurfacefilter.cpp633
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/videosurfacefilter.h180
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.cpp315
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.h112
-rw-r--r--src/plugins/mediaservices/gstreamer/gstreamer.pro50
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/mediaplayer.pri17
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp209
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamermetadataprovider.h83
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp451
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.h136
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.cpp137
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.h101
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp754
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.h167
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamerbushelper.cpp206
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamerbushelper.h87
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamermessage.cpp97
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamermessage.h76
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.cpp185
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.h76
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.cpp163
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.h85
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideooutputcontrol.cpp77
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideooutputcontrol.h86
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.cpp215
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.h114
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideorenderer.cpp88
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideorenderer.h78
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideorendererinterface.cpp52
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideorendererinterface.h69
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideowidget.cpp340
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideowidget.h110
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstvideobuffer.cpp101
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstvideobuffer.h80
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstxvimagebuffer.cpp282
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstxvimagebuffer.h131
-rw-r--r--src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.cpp699
-rw-r--r--src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.h157
-rw-r--r--src/plugins/mediaservices/gstreamer/qx11videosurface.cpp513
-rw-r--r--src/plugins/mediaservices/gstreamer/qx11videosurface.h117
-rw-r--r--src/plugins/mediaservices/mediaservices.pro11
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/mediaplayer.pri18
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/qt7playercontrol.h128
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/qt7playercontrol.mm193
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.h84
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.mm274
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/qt7playerservice.h90
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/qt7playerservice.mm152
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.h151
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm546
-rw-r--r--src/plugins/mediaservices/qt7/qcvdisplaylink.h90
-rw-r--r--src/plugins/mediaservices/qt7/qcvdisplaylink.mm158
-rw-r--r--src/plugins/mediaservices/qt7/qt7.pro45
-rw-r--r--src/plugins/mediaservices/qt7/qt7backend.h68
-rw-r--r--src/plugins/mediaservices/qt7/qt7backend.mm60
-rw-r--r--src/plugins/mediaservices/qt7/qt7movierenderer.h113
-rw-r--r--src/plugins/mediaservices/qt7/qt7movierenderer.mm474
-rw-r--r--src/plugins/mediaservices/qt7/qt7movievideowidget.h132
-rw-r--r--src/plugins/mediaservices/qt7/qt7movievideowidget.mm428
-rw-r--r--src/plugins/mediaservices/qt7/qt7movieviewoutput.h119
-rw-r--r--src/plugins/mediaservices/qt7/qt7movieviewoutput.mm312
-rw-r--r--src/plugins/mediaservices/qt7/qt7movieviewrenderer.h97
-rw-r--r--src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm352
-rw-r--r--src/plugins/mediaservices/qt7/qt7serviceplugin.h64
-rw-r--r--src/plugins/mediaservices/qt7/qt7serviceplugin.mm78
-rw-r--r--src/plugins/mediaservices/qt7/qt7videooutputcontrol.h136
-rw-r--r--src/plugins/mediaservices/qt7/qt7videooutputcontrol.mm93
-rw-r--r--src/plugins/phonon/ds9/ds9.pro10
-rw-r--r--src/plugins/plugins.pro6
-rw-r--r--src/plugins/qpluginbase.pri2
-rw-r--r--src/plugins/sqldrivers/psql/psql.pro11
-rw-r--r--src/qbase.pri3
-rw-r--r--src/qt3support/itemviews/q3listview.cpp9
-rw-r--r--src/qt3support/other/q3process_win.cpp2
-rw-r--r--src/qt3support/text/q3richtext.cpp2
-rw-r--r--src/qt3support/text/q3textedit.cpp2
-rw-r--r--src/qt3support/text/q3textstream.cpp2
-rw-r--r--src/qt3support/tools/q3gcache.cpp10
-rw-r--r--src/qt3support/tools/q3gdict.cpp4
-rw-r--r--src/s60installs/bwins/QtCoreu.def18
-rw-r--r--src/s60installs/bwins/QtDeclarativeu.def3499
-rw-r--r--src/s60installs/bwins/QtGuiu.def127
-rw-r--r--src/s60installs/bwins/QtMultimediau.def651
-rw-r--r--src/s60installs/bwins/QtNetworku.def164
-rw-r--r--src/s60installs/bwins/QtScriptu.def27
-rw-r--r--src/s60installs/bwins/QtTestu.def4
-rw-r--r--src/s60installs/eabi/QtCoreu.def20
-rw-r--r--src/s60installs/eabi/QtDeclarativeu.def3540
-rw-r--r--src/s60installs/eabi/QtGuiu.def127
-rw-r--r--src/s60installs/eabi/QtMultimediau.def651
-rw-r--r--src/s60installs/eabi/QtNetworku.def157
-rw-r--r--src/s60installs/eabi/QtScriptu.def41
-rw-r--r--src/s60installs/eabi/QtTestu.def1
-rw-r--r--src/s60installs/s60installs.pro11
-rw-r--r--src/script/api/qscriptengine.cpp973
-rw-r--r--src/script/api/qscriptengine_p.h539
-rw-r--r--src/script/api/qscriptprogram.cpp9
-rw-r--r--src/script/api/qscriptprogram_p.h4
-rw-r--r--src/script/api/qscriptvalue.cpp525
-rw-r--r--src/script/api/qscriptvalue_p.h24
-rw-r--r--src/script/bridge/qscriptclassobject.cpp2
-rw-r--r--src/script/bridge/qscriptdeclarativeclass.cpp208
-rw-r--r--src/script/bridge/qscriptdeclarativeclass_p.h37
-rw-r--r--src/script/bridge/qscriptdeclarativeobject.cpp35
-rw-r--r--src/script/bridge/qscriptdeclarativeobject_p.h6
-rw-r--r--src/script/bridge/qscriptqobject.cpp287
-rw-r--r--src/script/bridge/qscriptqobject_p.h1
-rw-r--r--src/script/bridge/qscriptvariant.cpp2
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsole.cpp221
-rw-r--r--src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp55
-rw-r--r--src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp5
-rw-r--r--src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp237
-rw-r--r--src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand_p.h4
-rw-r--r--src/sql/drivers/db2/qsql_db2.cpp4
-rw-r--r--src/sql/drivers/drivers.pri13
-rw-r--r--src/sql/drivers/oci/qsql_oci.cpp21
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp28
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.h7
-rw-r--r--src/sql/drivers/sqlite/qsql_sqlite.cpp10
-rw-r--r--src/src.pro9
-rw-r--r--src/svg/qsvggenerator.cpp27
-rw-r--r--src/svg/qsvggraphics.cpp178
-rw-r--r--src/svg/qsvggraphics_p.h40
-rw-r--r--src/svg/qsvghandler.cpp4
-rw-r--r--src/svg/qsvgnode.cpp65
-rw-r--r--src/svg/qsvgnode_p.h14
-rw-r--r--src/svg/qsvgstructure.cpp13
-rw-r--r--src/svg/qsvgstructure_p.h3
-rw-r--r--src/svg/qsvgstyle.cpp46
-rw-r--r--src/svg/qsvgstyle_p.h28
-rw-r--r--src/svg/qsvgtinydocument.cpp7
-rw-r--r--src/svg/qsvgtinydocument_p.h5
-rw-r--r--src/testlib/qbenchmark.cpp55
-rw-r--r--src/testlib/qbenchmark.h10
-rw-r--r--src/testlib/qbenchmark_p.h26
-rw-r--r--src/testlib/qbenchmarkevent.cpp10
-rw-r--r--src/testlib/qbenchmarkevent_p.h3
-rw-r--r--src/testlib/qbenchmarkmeasurement.cpp20
-rw-r--r--src/testlib/qbenchmarkmeasurement_p.h10
-rw-r--r--src/testlib/qbenchmarkmetric.cpp115
-rw-r--r--src/testlib/qbenchmarkmetric.h71
-rw-r--r--src/testlib/qbenchmarkmetric_p.h63
-rw-r--r--src/testlib/qbenchmarkvalgrind.cpp9
-rw-r--r--src/testlib/qbenchmarkvalgrind_p.h4
-rw-r--r--src/testlib/qplaintestlogger.cpp33
-rw-r--r--src/testlib/qtestcase.cpp48
-rw-r--r--src/testlib/qtestcoreelement.h5
-rw-r--r--src/testlib/qtestlogger.cpp4
-rw-r--r--src/testlib/qxmltestlogger.cpp3
-rw-r--r--src/testlib/testlib.pro1
-rw-r--r--src/tools/moc/generator.cpp2
-rw-r--r--src/tools/moc/util/generate_keywords.pro1
-rw-r--r--src/xmlpatterns/type/qprimitives_p.h14
-rw-r--r--tests/arthur/lance/widgets.h7
-rw-r--r--tests/auto/auto.pro1
-rw-r--r--tests/auto/declarative/.gitignore4
-rw-r--r--tests/auto/declarative/declarative.pro72
-rw-r--r--tests/auto/declarative/examples/data/dummytest.qml6
-rw-r--r--tests/auto/declarative/examples/data/webbrowser/webbrowser.qml6
-rw-r--r--tests/auto/declarative/examples/examples.pro7
-rw-r--r--tests/auto/declarative/examples/tst_examples.cpp203
-rw-r--r--tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml58
-rw-r--r--tests/auto/declarative/graphicswidgets/graphicswidgets.pro8
-rw-r--r--tests/auto/declarative/graphicswidgets/tst_graphicswidgets.cpp77
-rw-r--r--tests/auto/declarative/layouts/data/layouts.qml34
-rw-r--r--tests/auto/declarative/layouts/layouts.pro7
-rw-r--r--tests/auto/declarative/layouts/tst_layouts.cpp147
-rw-r--r--tests/auto/declarative/parserstress/parserstress.pro7
-rw-r--r--tests/auto/declarative/parserstress/tst_parserstress.cpp151
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/data/anchors.qml162
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/data/centerin.qml12
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/data/crash1.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/data/fill.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/data/loop1.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/data/loop2.qml20
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/data/margins.qml13
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro6
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp448
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/data/colors.gifbin0 -> 505 bytes
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/data/colors.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/data/stickman.gifbin0 -> 164923 bytes
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/data/stickman.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanpause.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanstopped.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro7
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp191
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/attached.qml34
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/badproperty1.qml21
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/badproperty2.qml21
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/badtype1.qml12
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/badtype2.qml12
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/badtype3.qml12
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/badtype4.qml27
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml18
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/dontStart.qml19
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/dontStart2.qml19
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/dotproperty.qml24
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/mixedtype1.qml25
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/mixedtype2.qml25
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/properties.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/properties2.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/properties3.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/properties4.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/properties5.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition.qml29
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition2.qml29
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition3.qml29
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition4.qml29
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition5.qml29
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition6.qml29
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/rotation.qml48
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/valuesource.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/valuesource2.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro6
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp730
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/binding.qml26
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/color.qml24
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/cpptrigger.qml11
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/disabled.qml27
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/dontStart.qml18
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/empty.qml23
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/explicit.qml26
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/groupProperty.qml23
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/groupProperty2.qml23
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/loop.qml19
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/nonSelecting2.qml26
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/parent.qml28
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml27
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml16
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/simple.qml26
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro6
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp301
-rw-r--r--tests/auto/declarative/qdeclarativebinding/data/test-binding.qml16
-rw-r--r--tests/auto/declarative/qdeclarativebinding/data/test-binding2.qml16
-rw-r--r--tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro8
-rw-r--r--tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp107
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/data/colors-round.sci7
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/data/colors.pngbin0 -> 1655 bytes
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/data/invalid.sci7
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp351
-rw-r--r--tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro8
-rw-r--r--tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp75
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/data/test-connection.qml10
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/data/test-connection2.qml3
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/data/test-connection3.qml3
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/data/trimming.qml10
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro8
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp135
-rw-r--r--tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro6
-rw-r--r--tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp454
-rw-r--r--tests/auto/declarative/qdeclarativedebug/qdeclarativedebug.pro7
-rw-r--r--tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp843
-rw-r--r--tests/auto/declarative/qdeclarativedebugclient/qdeclarativedebugclient.pro7
-rw-r--r--tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp157
-rw-r--r--tests/auto/declarative/qdeclarativedebugservice/qdeclarativedebugservice.pro7
-rw-r--r--tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp190
-rw-r--r--tests/auto/declarative/qdeclarativedom/data/MyComponent.qml4
-rw-r--r--tests/auto/declarative/qdeclarativedom/data/MyItem.qml4
-rw-r--r--tests/auto/declarative/qdeclarativedom/data/importdir/Bar.qml2
-rw-r--r--tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir/Foo.qml2
-rw-r--r--tests/auto/declarative/qdeclarativedom/data/top.qml6
-rw-r--r--tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro7
-rw-r--r--tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp1313
-rw-r--r--tests/auto/declarative/qdeclarativeeasefollow/data/easefollow1.qml3
-rw-r--r--tests/auto/declarative/qdeclarativeeasefollow/data/easefollow2.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeeasefollow/data/easefollow3.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeeasefollow/qdeclarativeeasefollow.pro8
-rw-r--r--tests/auto/declarative/qdeclarativeeasefollow/tst_qdeclarativeeasefollow.cpp122
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/ConstantsOverrideBindings.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/CustomObject.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/MethodsObject.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/ScopeObject.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/TypeForDynamicCreation.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/aliasPropertyAndBinding.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.2.qml26
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.qml29
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/attachedProperty.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/attachedPropertyScope.qml9
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/bindingLoop.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/boolPropertiesEvaluateAsBool.1.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/boolPropertiesEvaluateAsBool.2.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/bug.1.qml10
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/compositePropertyType.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.1.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.2.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.3.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/declarativeToString.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/deferredProperties.qml10
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml25
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.helper.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml21
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/dynamicDeletion.qml20
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/enums.1.qml20
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/enums.2.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/exceptionClearsOnReeval.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning2.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/extendedObjectPropertyLookup.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml10
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/externalScript.1.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/externalScript.2.js8
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/externalScript.2.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/externalScript.3.qml13
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/externalScript.4.qml15
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/externalScript.js6
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml13
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml12
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/jsObject.qml12
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml27
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/methods.1.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/methods.2.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/methods.3.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/methods.4.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml9
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/multiEngineObject.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/nonExistantAttachedObject.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml15
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/outerBindingOverridesInnerBinding.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scope.2.qml42
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml13
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scope.4.qml12
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scope.qml48
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptAccess.js7
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptAccess.qml17
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml16
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml22
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml15
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml12
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml20
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml18
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml19
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml19
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml20
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.js2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.qml17
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.1.qml13
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.2.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.js5
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/selfDeletingBinding.2.qml17
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/selfDeletingBinding.qml18
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/shutdownErrors.qml13
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/signalAssignment.1.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/signalAssignment.2.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/signalParameterTypes.qml16
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/signalTriggeredBindings.qml20
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml10
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/undefinedResetsProperty.2.qml10
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/undefinedResetsProperty.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/valueTypeFunctions.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro10
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp85
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/testtypes.h609
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp1898
-rw-r--r--tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro8
-rw-r--r--tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp240
-rw-r--r--tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro6
-rw-r--r--tests/auto/declarative/qdeclarativeerror/test.txt3
-rw-r--r--tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp242
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/data/flickable01.qml4
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/data/flickable02.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/data/flickable03.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/data/flickable04.qml16
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro8
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp223
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/data/test-flipable.qml9
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro8
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp113
-rw-r--r--tests/auto/declarative/qdeclarativefontloader/data/dummy.ttf (renamed from tests/auto/qdiriterator/foo/bar/readme.txt)0
-rw-r--r--tests/auto/declarative/qdeclarativefontloader/data/tarzeau_ocr_a.ttfbin0 -> 24544 bytes
-rw-r--r--tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro8
-rw-r--r--tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp156
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/displaygrid.qml39
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml56
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/gridview-initCurrent.qml51
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/gridview.qml56
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/gridview2.qml26
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/gridview3.qml6
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/propertychanges.qml69
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/setindex.qml33
-rw-r--r--tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro8
-rw-r--r--tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp1185
-rw-r--r--tests/auto/declarative/qdeclarativeimage/data/colors.pngbin0 -> 1655 bytes
-rw-r--r--tests/auto/declarative/qdeclarativeimage/data/colors1.pngbin0 -> 1655 bytes
-rw-r--r--tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp253
-rw-r--r--tests/auto/declarative/qdeclarativeimageprovider/data/exists.pngbin0 -> 2738 bytes
-rw-r--r--tests/auto/declarative/qdeclarativeimageprovider/data/exists1.pngbin0 -> 2738 bytes
-rw-r--r--tests/auto/declarative/qdeclarativeimageprovider/data/exists2.pngbin0 -> 2738 bytes
-rw-r--r--tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro12
-rw-r--r--tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp166
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro7
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp139
-rw-r--r--tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro6
-rw-r--r--tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp585
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/keynavigation.qml47
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/keys.qml20
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml43
-rw-r--r--tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro7
-rw-r--r--tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp422
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/Alias.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml9
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml12
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/Alias4.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/ComponentComposite.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/CompositeType.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/CompositeType2.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/CompositeType3.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/CompositeType4.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/DynamicPropertiesNestedType.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml9
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/I18n.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/I18nType30.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/MyComponent.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/MyCompositeValueSource.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/MyContainerComponent.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/NestedAlias.qml14
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/NestedErrorsType.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/OnCompletedType.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.1.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.2.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml10
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.4.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml13
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.6.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.7.qml14
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml9
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml9
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/assignBasicTypes.qml27
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/assignCompositeToType.qml18
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/assignLiteralSignalProperty.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/assignObjectToSignal.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/assignQmlComponent.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/assignSignal.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/assignTypeExtremes.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/attachedProperties.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/autoComponentCreation.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/autoNotifyConnection.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.1.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.1.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.2.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.2.qml9
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.3.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.3.qml9
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.4.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.4.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.5.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.5.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.6.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/component.6.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/cppnamespace.2.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/cppnamespace.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/crash2.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/customParserTypes.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/customVariantTypes.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/declaredPropertyValues.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.qml10
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/defaultPropertyListOrder.qml29
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/doubleSignal.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/doubleSignal.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/duplicateIDs.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/duplicateIDs.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.qml13
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml14
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicPropertiesNested.qml9
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicSignalsAndSlots.qml10
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/empty.errors.txt2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/empty.qml0
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/emptySignal.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/emptySignal.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/enumTypes.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/failingComponent.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/failingComponentTest.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/fakeDotProperty.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/fakeDotProperty.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/finalOverride.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/finalOverride.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/i18nDeclaredPropertyNames.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/i18nDeclaredPropertyUse.qml3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/i18nNameSpace.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/i18nScript.qml12
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/i18nStrings.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/i18nType.qml1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/idProperty.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingBuiltIn.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingBuiltIn.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingInstalled.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingInstalled.qml3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/inlineQmlComponents.qml10
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/interfaceProperty.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/interfaceQList.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.10.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.10.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.3.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.3.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.4.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.4.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.5.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.5.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.6.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.6.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.7.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.7.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.8.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.8.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.9.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.9.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidID.2.errors.txt2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidID.2.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidID.3.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidID.3.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidID.4.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidID.4.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidID.5.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidID.5.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidID.6.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidID.6.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidID.7.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidID.7.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidID.8.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidID.8.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidID.9.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidID.9.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidID.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidID.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/PrivateType.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/qmldir4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/listAssignment.2.errors.txt2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/listAssignment.2.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/listAssignment.3.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/listAssignment.3.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/listItemDeleteSelf.qml38
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/listProperties.qml9
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/method.1.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/method.1.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/missingObject.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/missingObject.qml1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/missingSignal.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/missingSignal.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/missingValueTypeProperty.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/missingValueTypeProperty.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.1.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.1.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.10.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.10.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.2.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.2.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.3.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.3.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.4.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.4.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.5.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.5.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.6.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.6.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.7.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.7.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.8.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.8.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.9.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/multiSet.9.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.errors.txt2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.1.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.2.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.2.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.3.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.3.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.4.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.4.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.5.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.5.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.6.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.6.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/nullDotProperty.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/nullDotProperty.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/objectValueTypeProperty.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/objectValueTypeProperty.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/onCompleted.qml17
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.1.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.1.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.2.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.2.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.3.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.3.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.4.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.4.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.5.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.5.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.6.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.6.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.7.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/property.7.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.2.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.1.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.2.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/readOnly.1.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/readOnly.1.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/readOnly.2.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/readOnly.2.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/rootAsQmlComponent.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.1.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.1.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.10.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.10.qml9
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.11.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.11.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.12.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.12.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.2.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.2.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.3.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.3.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.4.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.4.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.5.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.5.qml9
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.6.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.6.qml11
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.7.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.7.qml11
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.8.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.8.qml9
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.9.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.9.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/scriptString.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/signal.1.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/signal.1.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/signal.2.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/signal.2.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/signal.3.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/signal.3.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/signal.4.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/signal.4.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/simpleBindings.qml18
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/simpleContainer.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/simpleObject.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/subdir/Test.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/subdir/subsubdir/SubTest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/test.js0
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/test2.js0
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/unregisteredObject.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/unregisteredObject.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/unsupportedProperty.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/unsupportedProperty.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/valueTypes.qml13
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.1.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.1.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.10.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.10.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.11.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.11.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.12.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.12.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.13.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.13.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.14.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.14.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.15.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.15.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.2.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.2.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.3.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.3.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.4.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.4.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.5.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.5.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.6.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.6.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.7.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.7.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.8.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.8.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.9.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/wrongType.9.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro14
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/LocalInternal.qml3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/Test.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/TestLocal.qml1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/TestSubDir.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/pics/blue.pngbin0 -> 84 bytes
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/qmldir3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/SubTest.qml3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/qmldir1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/testtypes.cpp62
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/testtypes.h565
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp1441
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro6
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp346
-rw-r--r--tests/auto/declarative/qdeclarativelistreference/data/MyType.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelistreference/data/engineTypes.qml9
-rw-r--r--tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml10
-rw-r--r--tests/auto/declarative/qdeclarativelistreference/qdeclarativelistreference.pro5
-rw-r--r--tests/auto/declarative/qdeclarativelistreference/tst_qdeclarativelistreference.cpp580
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/displaylist.qml43
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/itemlist.qml43
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/listview-enforcerange.qml55
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/listview-initCurrent.qml50
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/listview-sections.qml59
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/listview.qml119
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/propertychanges.qml71
-rw-r--r--tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro8
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp1561
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/GraphicsWidget250x250.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/NoResize.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/NoResizeGraphicsWidget.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/Rect120x60.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/SizeToItem.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/SizeToLoader.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro11
-rw-r--r--tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp464
-rw-r--r--tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro6
-rw-r--r--tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp378
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/com/nokia/AutoTestQmlPluginType/qmldir1
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/plugin.qml3
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp85
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro6
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro7
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp116
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro5
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/data/dragproperties.qml28
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro9
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp138
-rw-r--r--tests/auto/declarative/qdeclarativeparticles/data/particle.pngbin0 -> 262 bytes
-rw-r--r--tests/auto/declarative/qdeclarativeparticles/data/particlemotion.qml33
-rw-r--r--tests/auto/declarative/qdeclarativeparticles/data/particles.qml15
-rw-r--r--tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro8
-rw-r--r--tests/auto/declarative/qdeclarativeparticles/tst_qdeclarativeparticles.cpp209
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/datamodel.qml36
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/displaypath.qml60
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/path.qml14
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/pathview.qml75
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/pathview1.qml4
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/pathview2.qml57
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/pathview3.qml57
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml115
-rw-r--r--tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro8
-rw-r--r--tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp722
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/data/exists.pngbin0 -> 2738 bytes
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/data/exists1.pngbin0 -> 2738 bytes
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/data/exists2.pngbin0 -> 2738 bytes
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro9
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp282
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml60
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/grid-spacing.qml40
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/grid.qml39
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml40
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml27
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/horizontal.qml26
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/propertychanges.qml39
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/repeater.qml20
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/vertical-animated.qml40
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/vertical-spacing.qml27
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/data/vertical.qml26
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro7
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp455
-rw-r--r--tests/auto/declarative/qdeclarativeproperty/data/TestType.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeproperty/data/readSynthesizedObject.qml9
-rw-r--r--tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro7
-rw-r--r--tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp1359
-rw-r--r--tests/auto/declarative/qdeclarativepropertymap/qdeclarativepropertymap.pro5
-rw-r--r--tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp171
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/closestangle.qml12
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/consoleLog.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/createComponent.qml23
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/createComponentData.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml31
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/darker.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/enums.qml9
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/formatting.qml19
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/hsla.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/lighter.qml10
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/md5.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/point.qml9
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/rect.qml9
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/rgba.qml10
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/size.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/tint.qml9
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/vector.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp391
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/data/intmodel.qml29
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/data/itemlist.qml49
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/data/objlist.qml21
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/data/properties.qml11
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/data/repeater.qml28
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml35
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro8
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp385
-rw-r--r--tests/auto/declarative/qdeclarativespringfollow/data/springfollow1.qml4
-rw-r--r--tests/auto/declarative/qdeclarativespringfollow/data/springfollow2.qml8
-rw-r--r--tests/auto/declarative/qdeclarativespringfollow/data/springfollow3.qml8
-rw-r--r--tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro8
-rw-r--r--tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp137
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/ExtendedRectangle.qml19
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorChanges.qml23
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml21
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml29
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml22
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml22
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml18
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicBinding.qml12
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicBinding2.qml12
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicBinding3.qml13
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicBinding4.qml17
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicChanges.qml10
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicChanges2.qml15
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicChanges3.qml15
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml19
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/basicExtension.qml16
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/deleting.qml11
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/deletingState.qml13
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/explicit.qml15
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/fakeExtension.qml16
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/illegalTempState.qml21
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/legalTempState.qml23
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/nonExistantProp.qml11
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/parentChange.qml37
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/parentChange2.qml31
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/parentChange3.qml42
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/parentChange4.qml30
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/parentChange5.qml30
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml10
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/reset.qml20
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/restoreEntryValues.qml14
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/script.qml10
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/signalOverride.qml18
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/signalOverride2.qml9
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash.qml15
-rw-r--r--tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro8
-rw-r--r--tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp969
-rw-r--r--tests/auto/declarative/qdeclarativestyledtext/qdeclarativestyledtext.pro9
-rw-r--r--tests/auto/declarative/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp96
-rw-r--r--tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro5
-rw-r--r--tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp187
-rw-r--r--tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro5
-rw-r--r--tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp844
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/cursorTest.qml8
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/http/ErrItem.qml7
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/http/NormItem.qml6
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTest.qml22
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail1.qml18
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail2.qml18
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml18
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/httpfail/FailItem.qml5
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/httpslow/WaitItem.qml5
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/inputmethodhints.qml6
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/navigation.qml23
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/readOnly.qml12
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro9
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp793
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml8
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/data/inputmethodhints.qml6
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/data/masks.qml7
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml7
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/data/navigation.qml24
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml12
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/data/validators.qml23
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro8
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp656
-rw-r--r--tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro7
-rw-r--r--tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp322
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.2.qml9
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.3.qml10
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.qml9
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/bindingAssignment.qml7
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/bindingConflict.qml8
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/bindingRead.qml5
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/bindingVariantCopy.qml13
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.js13
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml12
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/enums.1.qml6
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/enums.2.qml6
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml6
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml7
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/font_read.qml18
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/font_write.2.qml6
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/font_write.3.qml7
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/font_write.qml16
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/point_read.qml7
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/point_write.qml6
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/pointf_read.qml8
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/pointf_write.qml6
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/rect_read.qml10
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/rect_write.qml9
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/rectf_read.qml10
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/rectf_write.qml9
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/scriptAccess.qml9
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/scriptVariantCopy.qml14
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/size_read.qml8
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/size_write.qml7
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/sizef_read.qml9
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/sizef_write.qml6
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/staticAssignment.qml5
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/valueInterceptors.qml8
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/valueSources.qml5
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_read.qml9
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_write.qml8
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro10
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/testtypes.cpp48
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/testtypes.h156
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp631
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/basic.html17
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/basic.icobin0 -> 318 bytes
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/basic.pngbin0 -> 3961 bytes
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/basic.qml6
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/elements.html14
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/elements.qml8
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/forward.html12
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/forward.pngbin0 -> 2377 bytes
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/javaScript.html11
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/javaScript.qml12
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/loadError.qml6
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/newwindows.html16
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/newwindows.qml34
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/pixelCache.html10
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/pixelCache.qml6
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml34
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/sethtml.qml6
-rw-r--r--tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro9
-rw-r--r--tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp520
-rw-r--r--tests/auto/declarative/qdeclarativeworkerlistmodel/data/model.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeworkerlistmodel/data/script.js6
-rw-r--r--tests/auto/declarative/qdeclarativeworkerlistmodel/qdeclarativeworkerlistmodel.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeworkerlistmodel/tst_qdeclarativeworkerlistmodel.cpp193
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/data/script.js5
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml24
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro8
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp182
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.expect10
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml42
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.reply3
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml58
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml54
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml80
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.xml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/callbackException.qml25
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml135
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.xml2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/constructor.qml14
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/defaultState.qml30
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml58
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/document.xml3
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/domExceptionCodes.qml60
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml147
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/element.xml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml65
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_args.qml23
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_sent.qml20
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_unsent.qml16
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.expect7
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml75
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.reply8
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_args.qml23
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_sent.qml20
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_unsent.qml16
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/instanceStateValues.qml33
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/invalidMethodUsage.qml160
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml53
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.1.qml18
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.2.qml18
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml16
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.expect7
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.reply3
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.wait0
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_sync.qml17
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml53
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/open_username.qml54
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml23
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectRecur.qml23
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/redirects.qml22
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/redirecttarget.html1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml52
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/responseXML_invalid.qml24
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/seconddocument.html1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml27
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.expect10
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml21
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml23
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml23
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.expect10
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml23
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml23
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.expect10
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml21
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml23
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.reply3
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml26
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.reply3
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_GET.expect7
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_PUT.expect7
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/send_unsent.qml16
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.expect9
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml28
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.reply3
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_args.qml18
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml57
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml31
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_unsent.qml17
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/staticStateValues.qml24
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/status.200.reply3
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/status.404.reply3
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/status.expect7
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml77
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml77
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/testdocument.html1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml131
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/text.xml1
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml28
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.xmlbin0 -> 154 bytes
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro13
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp1121
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/data/model.qml10
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/data/model.xml54
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml11
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/data/propertychanges.qml10
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/data/recipes.qml10
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/data/recipes.xml90
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/data/roleErrors.qml10
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/data/roleKeys.qml13
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/data/unique.qml8
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro11
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp579
-rw-r--r--tests/auto/declarative/qmetaobjectbuilder/qmetaobjectbuilder.pro7
-rw-r--r--tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp1258
-rw-r--r--tests/auto/declarative/qpacketprotocol/qpacketprotocol.pro7
-rw-r--r--tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp271
-rwxr-xr-xtests/auto/declarative/runall.sh100
-rw-r--r--tests/auto/declarative/shared/debugutil.cpp179
-rw-r--r--tests/auto/declarative/shared/debugutil_p.h150
-rw-r--r--tests/auto/declarative/shared/testhttpserver.cpp324
-rw-r--r--tests/auto/declarative/shared/testhttpserver.h93
-rw-r--r--tests/auto/declarative/sql/data/README3
-rw-r--r--tests/auto/declarative/sql/data/changeversion.js53
-rw-r--r--tests/auto/declarative/sql/data/creation-a.js18
-rw-r--r--tests/auto/declarative/sql/data/creation.js14
-rw-r--r--tests/auto/declarative/sql/data/error-a.js20
-rw-r--r--tests/auto/declarative/sql/data/error-b.js13
-rw-r--r--tests/auto/declarative/sql/data/error-creation.js12
-rw-r--r--tests/auto/declarative/sql/data/error-notransaction.js15
-rw-r--r--tests/auto/declarative/sql/data/error-outsidetransaction.js17
-rw-r--r--tests/auto/declarative/sql/data/iteration-forwardonly.js29
-rw-r--r--tests/auto/declarative/sql/data/iteration.js28
-rw-r--r--tests/auto/declarative/sql/data/readonly-error.js27
-rw-r--r--tests/auto/declarative/sql/data/readonly.js24
-rw-r--r--tests/auto/declarative/sql/data/reopen1.js14
-rw-r--r--tests/auto/declarative/sql/data/reopen2.js16
-rw-r--r--tests/auto/declarative/sql/data/selection-bindnames.js26
-rw-r--r--tests/auto/declarative/sql/data/selection.js26
-rw-r--r--tests/auto/declarative/sql/sql.pro9
-rw-r--r--tests/auto/declarative/sql/tst_sql.cpp237
-rw-r--r--tests/auto/declarative/visual/ListView/basic1.qml27
-rw-r--r--tests/auto/declarative/visual/ListView/basic2.qml31
-rw-r--r--tests/auto/declarative/visual/ListView/basic3.qml29
-rw-r--r--tests/auto/declarative/visual/ListView/basic4.qml33
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/basic1.qml159
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/basic2.qml187
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/basic3.qml147
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/basic4.qml171
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/itemlist.0.pngbin0 -> 961 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/itemlist.1.pngbin0 -> 972 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/itemlist.2.pngbin0 -> 962 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/itemlist.3.pngbin0 -> 962 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/itemlist.4.pngbin0 -> 962 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/itemlist.5.pngbin0 -> 970 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/itemlist.6.pngbin0 -> 961 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/itemlist.qml2203
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.0.pngbin0 -> 1510 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.1.pngbin0 -> 1510 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.10.pngbin0 -> 1588 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.11.pngbin0 -> 1575 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.12.pngbin0 -> 1502 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.13.pngbin0 -> 1583 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.14.pngbin0 -> 1681 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.15.pngbin0 -> 1524 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.16.pngbin0 -> 1510 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.17.pngbin0 -> 1510 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.18.pngbin0 -> 1510 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.19.pngbin0 -> 1510 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.2.pngbin0 -> 1627 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.3.pngbin0 -> 1524 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.4.pngbin0 -> 1678 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.5.pngbin0 -> 1510 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.6.pngbin0 -> 1573 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.7.pngbin0 -> 1670 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.8.pngbin0 -> 1658 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.9.pngbin0 -> 1510 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data-MAC/listview.qml3079
-rw-r--r--tests/auto/declarative/visual/ListView/data-X11/basic1.qml159
-rw-r--r--tests/auto/declarative/visual/ListView/data-X11/basic2.qml187
-rw-r--r--tests/auto/declarative/visual/ListView/data-X11/basic3.qml147
-rw-r--r--tests/auto/declarative/visual/ListView/data-X11/basic4.qml171
-rw-r--r--tests/auto/declarative/visual/ListView/data/basic1.qml159
-rw-r--r--tests/auto/declarative/visual/ListView/data/basic2.qml187
-rw-r--r--tests/auto/declarative/visual/ListView/data/basic3.qml147
-rw-r--r--tests/auto/declarative/visual/ListView/data/basic4.qml171
-rw-r--r--tests/auto/declarative/visual/ListView/data/itemlist.0.pngbin0 -> 961 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/itemlist.1.pngbin0 -> 972 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/itemlist.2.pngbin0 -> 962 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/itemlist.3.pngbin0 -> 962 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/itemlist.4.pngbin0 -> 962 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/itemlist.5.pngbin0 -> 970 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/itemlist.6.pngbin0 -> 961 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/itemlist.qml2203
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.0.pngbin0 -> 1510 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.1.pngbin0 -> 1510 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.10.pngbin0 -> 1588 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.11.pngbin0 -> 1575 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.12.pngbin0 -> 1502 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.13.pngbin0 -> 1583 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.14.pngbin0 -> 1681 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.15.pngbin0 -> 1524 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.16.pngbin0 -> 1510 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.17.pngbin0 -> 1510 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.18.pngbin0 -> 1510 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.19.pngbin0 -> 1510 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.2.pngbin0 -> 1656 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.3.pngbin0 -> 1524 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.4.pngbin0 -> 1678 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.5.pngbin0 -> 1510 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.6.pngbin0 -> 1573 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.7.pngbin0 -> 1669 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.8.pngbin0 -> 1658 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.9.pngbin0 -> 1510 bytes
-rw-r--r--tests/auto/declarative/visual/ListView/data/listview.qml3079
-rw-r--r--tests/auto/declarative/visual/ListView/itemlist.qml40
-rw-r--r--tests/auto/declarative/visual/ListView/listview.qml81
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.0.pngbin0 -> 714 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.1.pngbin0 -> 798 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.10.pngbin0 -> 773 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.11.pngbin0 -> 773 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.12.pngbin0 -> 754 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.13.pngbin0 -> 742 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.14.pngbin0 -> 733 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.15.pngbin0 -> 712 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.16.pngbin0 -> 730 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.17.pngbin0 -> 730 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.18.pngbin0 -> 730 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.19.pngbin0 -> 744 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.2.pngbin0 -> 757 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.20.pngbin0 -> 754 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.21.pngbin0 -> 721 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.22.pngbin0 -> 732 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.3.pngbin0 -> 813 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.4.pngbin0 -> 756 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.5.pngbin0 -> 752 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.6.pngbin0 -> 752 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.7.pngbin0 -> 774 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.8.pngbin0 -> 774 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.9.pngbin0 -> 754 bytes
-rw-r--r--tests/auto/declarative/visual/Package_Views/data/packageviews.qml3751
-rw-r--r--tests/auto/declarative/visual/Package_Views/packageviews.qml89
-rw-r--r--tests/auto/declarative/visual/animation/bindinganimation/bindinganimation.qml40
-rw-r--r--tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.0.pngbin0 -> 817 bytes
-rw-r--r--tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.1.pngbin0 -> 815 bytes
-rw-r--r--tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.2.pngbin0 -> 817 bytes
-rw-r--r--tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.3.pngbin0 -> 815 bytes
-rw-r--r--tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.4.pngbin0 -> 813 bytes
-rw-r--r--tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.5.pngbin0 -> 815 bytes
-rw-r--r--tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.6.pngbin0 -> 817 bytes
-rw-r--r--tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.qml1655
-rw-r--r--tests/auto/declarative/visual/animation/colorAnimation/colorAnimation.qml41
-rw-r--r--tests/auto/declarative/visual/animation/colorAnimation/data/colorAnimation.0.pngbin0 -> 610 bytes
-rw-r--r--tests/auto/declarative/visual/animation/colorAnimation/data/colorAnimation.1.pngbin0 -> 610 bytes
-rw-r--r--tests/auto/declarative/visual/animation/colorAnimation/data/colorAnimation.2.pngbin0 -> 610 bytes
-rw-r--r--tests/auto/declarative/visual/animation/colorAnimation/data/colorAnimation.qml951
-rw-r--r--tests/auto/declarative/visual/animation/easing/data/easing.0.pngbin0 -> 3393 bytes
-rw-r--r--tests/auto/declarative/visual/animation/easing/data/easing.1.pngbin0 -> 3381 bytes
-rw-r--r--tests/auto/declarative/visual/animation/easing/data/easing.2.pngbin0 -> 3101 bytes
-rw-r--r--tests/auto/declarative/visual/animation/easing/data/easing.3.pngbin0 -> 16542 bytes
-rw-r--r--tests/auto/declarative/visual/animation/easing/data/easing.qml779
-rw-r--r--tests/auto/declarative/visual/animation/easing/easing.qml193
-rw-r--r--tests/auto/declarative/visual/animation/easing/pics/qtlogo.pngbin0 -> 2738 bytes
-rw-r--r--tests/auto/declarative/visual/animation/loop/data/loop.0.pngbin0 -> 508 bytes
-rw-r--r--tests/auto/declarative/visual/animation/loop/data/loop.1.pngbin0 -> 507 bytes
-rw-r--r--tests/auto/declarative/visual/animation/loop/data/loop.2.pngbin0 -> 508 bytes
-rw-r--r--tests/auto/declarative/visual/animation/loop/data/loop.3.pngbin0 -> 508 bytes
-rw-r--r--tests/auto/declarative/visual/animation/loop/data/loop.4.pngbin0 -> 505 bytes
-rw-r--r--tests/auto/declarative/visual/animation/loop/data/loop.5.pngbin0 -> 508 bytes
-rw-r--r--tests/auto/declarative/visual/animation/loop/data/loop.qml1471
-rw-r--r--tests/auto/declarative/visual/animation/loop/loop.qml24
-rw-r--r--tests/auto/declarative/visual/animation/parallelAnimation/data/parallelAnimation.0.pngbin0 -> 774 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parallelAnimation/data/parallelAnimation.1.pngbin0 -> 762 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parallelAnimation/data/parallelAnimation.2.pngbin0 -> 773 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parallelAnimation/data/parallelAnimation.qml463
-rw-r--r--tests/auto/declarative/visual/animation/parallelAnimation/parallelAnimation.qml43
-rw-r--r--tests/auto/declarative/visual/animation/parentAction/data/parentAction.0.pngbin0 -> 1652 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAction/data/parentAction.1.pngbin0 -> 1492 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAction/data/parentAction.2.pngbin0 -> 1424 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAction/data/parentAction.3.pngbin0 -> 1583 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAction/data/parentAction.4.pngbin0 -> 1640 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAction/data/parentAction.5.pngbin0 -> 1640 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAction/data/parentAction.qml1207
-rw-r--r--tests/auto/declarative/visual/animation/parentAction/parentAction.qml55
-rw-r--r--tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.0.pngbin0 -> 3742 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.1.pngbin0 -> 3727 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.2.pngbin0 -> 3742 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.3.pngbin0 -> 3628 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.4.pngbin0 -> 3610 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.5.pngbin0 -> 3742 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.qml1663
-rw-r--r--tests/auto/declarative/visual/animation/parentAnimation/parentAnimation.qml58
-rw-r--r--tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.0.pngbin0 -> 3211 bytes
-rw-r--r--tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.1.pngbin0 -> 3214 bytes
-rw-r--r--tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.2.pngbin0 -> 3209 bytes
-rw-r--r--tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.3.pngbin0 -> 3211 bytes
-rw-r--r--tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.4.pngbin0 -> 3214 bytes
-rw-r--r--tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.5.pngbin0 -> 3214 bytes
-rw-r--r--tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.qml1619
-rw-r--r--tests/auto/declarative/visual/animation/pauseAnimation/pauseAnimation.qml29
-rw-r--r--tests/auto/declarative/visual/animation/pauseAnimation/pics/qtlogo.pngbin0 -> 2738 bytes
-rw-r--r--tests/auto/declarative/visual/animation/propertyAction/data/propertyAction.0.pngbin0 -> 1418 bytes
-rw-r--r--tests/auto/declarative/visual/animation/propertyAction/data/propertyAction.1.pngbin0 -> 1430 bytes
-rw-r--r--tests/auto/declarative/visual/animation/propertyAction/data/propertyAction.2.pngbin0 -> 1431 bytes
-rw-r--r--tests/auto/declarative/visual/animation/propertyAction/data/propertyAction.qml939
-rw-r--r--tests/auto/declarative/visual/animation/propertyAction/propertyAction.qml34
-rw-r--r--tests/auto/declarative/visual/animation/reanchor/data/reanchor.0.pngbin0 -> 622 bytes
-rw-r--r--tests/auto/declarative/visual/animation/reanchor/data/reanchor.1.pngbin0 -> 626 bytes
-rw-r--r--tests/auto/declarative/visual/animation/reanchor/data/reanchor.2.pngbin0 -> 622 bytes
-rw-r--r--tests/auto/declarative/visual/animation/reanchor/data/reanchor.3.pngbin0 -> 622 bytes
-rw-r--r--tests/auto/declarative/visual/animation/reanchor/data/reanchor.4.pngbin0 -> 632 bytes
-rw-r--r--tests/auto/declarative/visual/animation/reanchor/data/reanchor.5.pngbin0 -> 622 bytes
-rw-r--r--tests/auto/declarative/visual/animation/reanchor/data/reanchor.6.pngbin0 -> 622 bytes
-rw-r--r--tests/auto/declarative/visual/animation/reanchor/data/reanchor.7.pngbin0 -> 622 bytes
-rw-r--r--tests/auto/declarative/visual/animation/reanchor/data/reanchor.8.pngbin0 -> 634 bytes
-rw-r--r--tests/auto/declarative/visual/animation/reanchor/data/reanchor.qml2471
-rw-r--r--tests/auto/declarative/visual/animation/reanchor/reanchor.qml68
-rw-r--r--tests/auto/declarative/visual/animation/scriptAction/data/scriptAction.0.pngbin0 -> 1418 bytes
-rw-r--r--tests/auto/declarative/visual/animation/scriptAction/data/scriptAction.1.pngbin0 -> 1431 bytes
-rw-r--r--tests/auto/declarative/visual/animation/scriptAction/data/scriptAction.qml535
-rw-r--r--tests/auto/declarative/visual/animation/scriptAction/scriptAction.qml35
-rw-r--r--tests/auto/declarative/visual/fillmode/data/fillmode.0.pngbin0 -> 26099 bytes
-rw-r--r--tests/auto/declarative/visual/fillmode/data/fillmode.qml279
-rw-r--r--tests/auto/declarative/visual/fillmode/face.pngbin0 -> 905 bytes
-rw-r--r--tests/auto/declarative/visual/fillmode/fillmode.qml16
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test.0.pngbin0 -> 14875 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test.1.pngbin0 -> 14875 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test.2.pngbin0 -> 14863 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test.3.pngbin0 -> 14877 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test.4.pngbin0 -> 14877 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test.5.pngbin0 -> 14877 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test.qml1599
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test2.0.pngbin0 -> 5375 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test2.1.pngbin0 -> 5375 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test2.qml607
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test3.0.pngbin0 -> 12749 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test3.1.pngbin0 -> 12667 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test3.2.pngbin0 -> 12373 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test3.3.pngbin0 -> 12150 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test3.4.pngbin0 -> 11944 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test3.5.pngbin0 -> 12150 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test3.6.pngbin0 -> 12373 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test3.7.pngbin0 -> 12667 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test3.8.pngbin0 -> 12749 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test3.9.pngbin0 -> 12710 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-MAC/test3.qml2879
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test.0.pngbin0 -> 11501 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test.1.pngbin0 -> 11501 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test.2.pngbin0 -> 11486 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test.3.pngbin0 -> 11500 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test.4.pngbin0 -> 11500 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test.5.pngbin0 -> 11500 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test.qml1599
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test2.0.pngbin0 -> 4656 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test2.1.pngbin0 -> 4656 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test2.qml607
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test3.0.pngbin0 -> 10093 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test3.1.pngbin0 -> 10051 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test3.2.pngbin0 -> 9812 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test3.3.pngbin0 -> 9625 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test3.4.pngbin0 -> 9458 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test3.5.pngbin0 -> 9645 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test3.6.pngbin0 -> 9812 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test3.7.pngbin0 -> 10051 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test3.8.pngbin0 -> 10087 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test3.9.pngbin0 -> 10072 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data-X11/test3.qml2879
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test.0.pngbin0 -> 14836 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test.1.pngbin0 -> 14836 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test.2.pngbin0 -> 14821 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test.3.pngbin0 -> 14833 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test.4.pngbin0 -> 14833 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test.5.pngbin0 -> 14833 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test.qml1599
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test2.0.pngbin0 -> 5359 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test2.1.pngbin0 -> 5359 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test2.qml607
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test3.0.pngbin0 -> 12616 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test3.1.pngbin0 -> 12538 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test3.2.pngbin0 -> 12257 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test3.3.pngbin0 -> 12035 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test3.4.pngbin0 -> 11877 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test3.5.pngbin0 -> 12046 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test3.6.pngbin0 -> 12257 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test3.7.pngbin0 -> 12538 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test3.8.pngbin0 -> 12616 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test3.9.pngbin0 -> 12581 bytes
-rw-r--r--tests/auto/declarative/visual/focusscope/data/test3.qml2879
-rw-r--r--tests/auto/declarative/visual/focusscope/test.qml76
-rw-r--r--tests/auto/declarative/visual/focusscope/test2.qml40
-rw-r--r--tests/auto/declarative/visual/focusscope/test3.qml52
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/animated-smooth.qml55
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/animated.qml55
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/borders.qml18
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/content/MyBorderImage.qml38
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/content/bw.pngbin0 -> 1357 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/content/colors-round.sci7
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/content/colors-stretch.sci5
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/content/colors.pngbin0 -> 1655 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.0.pngbin0 -> 61731 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.1.pngbin0 -> 98912 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.2.pngbin0 -> 48780 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.3.pngbin0 -> 32431 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.4.pngbin0 -> 35835 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.5.pngbin0 -> 79428 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.6.pngbin0 -> 45928 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.qml1823
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.0.pngbin0 -> 23684 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.1.pngbin0 -> 29115 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.2.pngbin0 -> 27580 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.3.pngbin0 -> 14822 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.4.pngbin0 -> 21356 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.5.pngbin0 -> 31143 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.6.pngbin0 -> 26468 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.7.pngbin0 -> 16225 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.qml2091
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.0.pngbin0 -> 23029 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.1.pngbin0 -> 23029 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.2.pngbin0 -> 23029 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.3.pngbin0 -> 23029 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.4.pngbin0 -> 23029 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.qml1359
-rw-r--r--tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.0.pngbin0 -> 1305 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.1.pngbin0 -> 1306 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.2.pngbin0 -> 1305 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.3.pngbin0 -> 1303 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.4.pngbin0 -> 1303 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.5.pngbin0 -> 1305 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.6.pngbin0 -> 1306 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.qml1807
-rw-r--r--tests/auto/declarative/visual/qdeclarativeeasefollow/easefollow.qml40
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.0.pngbin0 -> 1427 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.1.pngbin0 -> 1357 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.2.pngbin0 -> 1405 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.3.pngbin0 -> 1427 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.qml1199
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.0.pngbin0 -> 1951 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.1.pngbin0 -> 1951 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.10.pngbin0 -> 1952 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.11.pngbin0 -> 1930 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.12.pngbin0 -> 1974 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.13.pngbin0 -> 1961 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.14.pngbin0 -> 1959 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.15.pngbin0 -> 1937 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.16.pngbin0 -> 1618 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.17.pngbin0 -> 1952 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.18.pngbin0 -> 1952 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.19.pngbin0 -> 1930 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.2.pngbin0 -> 1976 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.20.pngbin0 -> 1930 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.21.pngbin0 -> 1947 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.22.pngbin0 -> 1941 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.23.pngbin0 -> 1951 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.24.png0
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.3.pngbin0 -> 1987 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.4.pngbin0 -> 1947 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.5.pngbin0 -> 1975 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.6.pngbin0 -> 1928 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.7.pngbin0 -> 1928 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.8.pngbin0 -> 1928 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.9.pngbin0 -> 1928 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.qml7037
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/flickable-horizontal.qml37
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflickable/flickable-vertical.qml91
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.0.pngbin0 -> 1090 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.1.pngbin0 -> 1134 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.2.pngbin0 -> 961 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.3.pngbin0 -> 1076 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.4.pngbin0 -> 1134 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.5.pngbin0 -> 969 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.qml1623
-rw-r--r--tests/auto/declarative/visual/qdeclarativeflipable/test-flipable.qml79
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview.0.pngbin0 -> 1303 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview.1.pngbin0 -> 1317 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview.2.pngbin0 -> 1318 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview.3.pngbin0 -> 1306 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview.4.pngbin0 -> 1308 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview.5.pngbin0 -> 1303 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview.6.pngbin0 -> 1323 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview.7.pngbin0 -> 1325 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview.8.pngbin0 -> 1346 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview.9.pngbin0 -> 1303 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview.qml2859
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.0.pngbin0 -> 1310 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.1.pngbin0 -> 1322 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.10.pngbin0 -> 1313 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.2.pngbin0 -> 1341 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.3.pngbin0 -> 1368 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.4.pngbin0 -> 1319 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.5.pngbin0 -> 1352 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.6.pngbin0 -> 1309 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.7.pngbin0 -> 1347 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.8.pngbin0 -> 1310 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.9.pngbin0 -> 1354 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.qml2479
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/gridview.qml51
-rw-r--r--tests/auto/declarative/visual/qdeclarativegridview/gridview2.qml58
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.0.pngbin0 -> 1563 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.1.pngbin0 -> 1570 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.2.pngbin0 -> 1553 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.3.pngbin0 -> 1563 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.4.pngbin0 -> 1569 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.5.pngbin0 -> 1569 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.6.pngbin0 -> 1566 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.7.pngbin0 -> 1566 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.8.pngbin0 -> 1567 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.qml5207
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.0.pngbin0 -> 471 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.1.pngbin0 -> 474 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.10.pngbin0 -> 479 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.11.pngbin0 -> 479 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.12.pngbin0 -> 479 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.13.pngbin0 -> 479 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.14.pngbin0 -> 479 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.15.pngbin0 -> 479 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.16.pngbin0 -> 1454 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.17.pngbin0 -> 1454 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.18.pngbin0 -> 1454 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.19.pngbin0 -> 1454 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.2.pngbin0 -> 474 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.20.pngbin0 -> 1454 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.21.pngbin0 -> 1454 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.22.pngbin0 -> 1454 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.3.pngbin0 -> 474 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.4.pngbin0 -> 481 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.5.pngbin0 -> 481 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.6.pngbin0 -> 481 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.7.pngbin0 -> 481 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.8.pngbin0 -> 479 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.9.pngbin0 -> 479 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.qml5867
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/drag.qml21
-rw-r--r--tests/auto/declarative/visual/qdeclarativemouseregion/mouseregion.qml124
-rw-r--r--tests/auto/declarative/visual/qdeclarativeparticles/data/particles.0.pngbin0 -> 10219 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeparticles/data/particles.1.pngbin0 -> 13469 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeparticles/data/particles.2.pngbin0 -> 14051 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativeparticles/data/particles.qml775
-rw-r--r--tests/auto/declarative/visual/qdeclarativeparticles/particles.qml54
-rw-r--r--tests/auto/declarative/visual/qdeclarativeparticles/star.pngbin0 -> 262 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.0.pngbin0 -> 2263 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.1.pngbin0 -> 2329 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.2.pngbin0 -> 2279 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.3.pngbin0 -> 2263 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.4.pngbin0 -> 2263 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.5.pngbin0 -> 2308 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.6.pngbin0 -> 2280 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.qml2303
-rw-r--r--tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.0.pngbin0 -> 2321 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.1.pngbin0 -> 2380 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.2.pngbin0 -> 2315 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.3.pngbin0 -> 2372 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.4.pngbin0 -> 2327 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.qml1495
-rw-r--r--tests/auto/declarative/visual/qdeclarativepathview/test-pathview-2.qml62
-rw-r--r--tests/auto/declarative/visual/qdeclarativepathview/test-pathview.qml62
-rw-r--r--tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.0.pngbin0 -> 1429 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.1.pngbin0 -> 1433 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.2.pngbin0 -> 1431 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.3.pngbin0 -> 1428 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.4.pngbin0 -> 1432 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.5.pngbin0 -> 1434 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.qml1603
-rw-r--r--tests/auto/declarative/visual/qdeclarativepositioners/data/repeater.0.pngbin0 -> 2790 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativepositioners/data/repeater.qml339
-rw-r--r--tests/auto/declarative/visual/qdeclarativepositioners/dynamic.qml65
-rw-r--r--tests/auto/declarative/visual/qdeclarativepositioners/repeater.qml15
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/clock.qml64
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/content/background.pngbin0 -> 46895 bytes
-rwxr-xr-xtests/auto/declarative/visual/qdeclarativespringfollow/content/center.pngbin0 -> 765 bytes
-rwxr-xr-xtests/auto/declarative/visual/qdeclarativespringfollow/content/clock.pngbin0 -> 20653 bytes
-rwxr-xr-xtests/auto/declarative/visual/qdeclarativespringfollow/content/hour.pngbin0 -> 625 bytes
-rwxr-xr-xtests/auto/declarative/visual/qdeclarativespringfollow/content/minute.pngbin0 -> 625 bytes
-rwxr-xr-xtests/auto/declarative/visual/qdeclarativespringfollow/content/second.pngbin0 -> 303 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.0.pngbin0 -> 17294 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.1.pngbin0 -> 17394 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.2.pngbin0 -> 17524 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.3.pngbin0 -> 17572 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.qml1135
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.0.pngbin0 -> 959 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.1.pngbin0 -> 1244 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.10.pngbin0 -> 1299 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.2.pngbin0 -> 1224 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.3.pngbin0 -> 1243 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.4.pngbin0 -> 1230 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.5.pngbin0 -> 1231 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.6.pngbin0 -> 1239 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.7.pngbin0 -> 1241 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.8.pngbin0 -> 1237 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.9.pngbin0 -> 1229 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.qml1763
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/follow.qml71
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/baseline/data-X11/parentanchor.qml131
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/baseline/data/parentanchor.qml131
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/baseline/parentanchor.qml14
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide.0.pngbin0 -> 2276 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide.qml279
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.0.pngbin0 -> 4818 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.1.pngbin0 -> 4089 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.2.pngbin0 -> 3128 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.3.pngbin0 -> 1963 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.qml991
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/multilength.0.pngbin0 -> 736 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/multilength.qml303
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data-X11/elide.0.pngbin0 -> 1002 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data-X11/elide.qml279
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data-X11/multilength.0.pngbin0 -> 596 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data-X11/multilength.qml303
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data/elide.0.pngbin0 -> 1604 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data/elide.qml279
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.0.pngbin0 -> 4818 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.1.pngbin0 -> 4089 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.2.pngbin0 -> 3128 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.3.pngbin0 -> 1963 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.qml991
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/elide.qml31
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/elide2.qml12
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/multilength.qml19
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/font/data-MAC/plaintext.0.pngbin0 -> 103018 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/font/data-MAC/plaintext.qml351
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/font/data-MAC/richtext.0.pngbin0 -> 136492 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/font/data-MAC/richtext.qml359
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/font/data/plaintext.0.pngbin0 -> 94120 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/font/data/plaintext.qml351
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/font/data/richtext.0.pngbin0 -> 121122 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/font/data/richtext.qml359
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/font/plaintext.qml85
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/font/richtext.qml85
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/cursorDelegate.qml35
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.0.pngbin0 -> 793 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.1.pngbin0 -> 795 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.2.pngbin0 -> 803 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.3.pngbin0 -> 805 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.4.pngbin0 -> 805 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.5.pngbin0 -> 805 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.6.pngbin0 -> 799 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.7.pngbin0 -> 799 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.8.pngbin0 -> 803 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.qml3555
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.0.pngbin0 -> 365 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.1.pngbin0 -> 365 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.2.pngbin0 -> 366 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.3.pngbin0 -> 362 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.qml1371
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.0.pngbin0 -> 1110 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.1.pngbin0 -> 1110 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.2.pngbin0 -> 1110 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.3.pngbin0 -> 1110 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.4.pngbin0 -> 1110 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.5.pngbin0 -> 1110 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.6.pngbin0 -> 1110 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.qml2467
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.0.pngbin0 -> 3322 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.1.pngbin0 -> 3323 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.2.pngbin0 -> 3325 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.3.pngbin0 -> 3332 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.4.pngbin0 -> 3329 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.5.pngbin0 -> 3818 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.6.pngbin0 -> 3333 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.7.pngbin0 -> 3332 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.8.pngbin0 -> 3347 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.qml3555
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.0.pngbin0 -> 4802 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.1.pngbin0 -> 4804 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.2.pngbin0 -> 4801 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.3.pngbin0 -> 4791 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.qml1371
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.0.pngbin0 -> 1110 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.1.pngbin0 -> 1110 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.2.pngbin0 -> 1110 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.3.pngbin0 -> 1110 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.4.pngbin0 -> 1110 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.5.pngbin0 -> 1110 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.6.pngbin0 -> 1110 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.qml2467
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/qt-669.qml19
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/wrap.qml21
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/cursorDelegate.qml35
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.0.pngbin0 -> 793 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.1.pngbin0 -> 796 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.2.pngbin0 -> 804 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.3.pngbin0 -> 805 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.4.pngbin0 -> 805 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.5.pngbin0 -> 805 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.6.pngbin0 -> 801 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.7.pngbin0 -> 802 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.8.pngbin0 -> 802 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.qml3379
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.0.pngbin0 -> 999 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.1.pngbin0 -> 1880 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.2.pngbin0 -> 2962 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.3.pngbin0 -> 2827 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.4.pngbin0 -> 2827 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.qml1043
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data-X11/hAlign.0.pngbin0 -> 1245 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data-X11/hAlign.qml107
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.0.pngbin0 -> 3314 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.1.pngbin0 -> 3377 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.2.pngbin0 -> 3323 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.3.pngbin0 -> 3325 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.4.pngbin0 -> 3322 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.5.pngbin0 -> 3322 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.6.pngbin0 -> 3326 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.7.pngbin0 -> 3814 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.8.pngbin0 -> 3324 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.qml3379
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.0.pngbin0 -> 999 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.1.pngbin0 -> 1880 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.2.pngbin0 -> 2962 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.3.pngbin0 -> 2827 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.4.pngbin0 -> 2827 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.qml1043
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data/hAlign.0.pngbin0 -> 1245 bytes
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/data/hAlign.qml107
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/echoMode.qml10
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/hAlign.qml39
-rw-r--r--tests/auto/declarative/visual/qfxwebview/autosize/autosize.qml61
-rw-r--r--tests/auto/declarative/visual/qfxwebview/autosize/data-X11/autosize.0.pngbin0 -> 6886 bytes
-rw-r--r--tests/auto/declarative/visual/qfxwebview/autosize/data-X11/autosize.qml83
-rw-r--r--tests/auto/declarative/visual/qfxwebview/autosize/data/autosize.0.pngbin0 -> 6886 bytes
-rw-r--r--tests/auto/declarative/visual/qfxwebview/autosize/data/autosize.qml83
-rw-r--r--tests/auto/declarative/visual/rect/GradientRect.qml25
-rw-r--r--tests/auto/declarative/visual/rect/MyRect.qml21
-rw-r--r--tests/auto/declarative/visual/rect/data/rect-painting.0.pngbin0 -> 29725 bytes
-rw-r--r--tests/auto/declarative/visual/rect/data/rect-painting.qml287
-rw-r--r--tests/auto/declarative/visual/rect/rect-painting.qml55
-rw-r--r--tests/auto/declarative/visual/repeater/basic1.qml27
-rw-r--r--tests/auto/declarative/visual/repeater/basic2.qml31
-rw-r--r--tests/auto/declarative/visual/repeater/basic3.qml29
-rw-r--r--tests/auto/declarative/visual/repeater/basic4.qml33
-rw-r--r--tests/auto/declarative/visual/repeater/data-MAC/basic1.0.pngbin0 -> 1550 bytes
-rw-r--r--tests/auto/declarative/visual/repeater/data-MAC/basic1.qml323
-rw-r--r--tests/auto/declarative/visual/repeater/data-MAC/basic2.0.pngbin0 -> 1550 bytes
-rw-r--r--tests/auto/declarative/visual/repeater/data-MAC/basic2.qml331
-rw-r--r--tests/auto/declarative/visual/repeater/data-MAC/basic3.0.pngbin0 -> 1550 bytes
-rw-r--r--tests/auto/declarative/visual/repeater/data-MAC/basic3.qml347
-rw-r--r--tests/auto/declarative/visual/repeater/data-MAC/basic4.0.pngbin0 -> 1550 bytes
-rw-r--r--tests/auto/declarative/visual/repeater/data-MAC/basic4.qml419
-rw-r--r--tests/auto/declarative/visual/repeater/data-X11/basic1.0.pngbin0 -> 1354 bytes
-rw-r--r--tests/auto/declarative/visual/repeater/data-X11/basic1.qml323
-rw-r--r--tests/auto/declarative/visual/repeater/data-X11/basic2.0.pngbin0 -> 1354 bytes
-rw-r--r--tests/auto/declarative/visual/repeater/data-X11/basic2.qml331
-rw-r--r--tests/auto/declarative/visual/repeater/data-X11/basic3.0.pngbin0 -> 1354 bytes
-rw-r--r--tests/auto/declarative/visual/repeater/data-X11/basic3.qml347
-rw-r--r--tests/auto/declarative/visual/repeater/data-X11/basic4.0.pngbin0 -> 1354 bytes
-rw-r--r--tests/auto/declarative/visual/repeater/data-X11/basic4.qml419
-rw-r--r--tests/auto/declarative/visual/repeater/data/basic1.0.pngbin0 -> 1513 bytes
-rw-r--r--tests/auto/declarative/visual/repeater/data/basic1.qml323
-rw-r--r--tests/auto/declarative/visual/repeater/data/basic2.0.pngbin0 -> 1513 bytes
-rw-r--r--tests/auto/declarative/visual/repeater/data/basic2.qml331
-rw-r--r--tests/auto/declarative/visual/repeater/data/basic3.0.pngbin0 -> 1513 bytes
-rw-r--r--tests/auto/declarative/visual/repeater/data/basic3.qml347
-rw-r--r--tests/auto/declarative/visual/repeater/data/basic4.0.pngbin0 -> 1513 bytes
-rw-r--r--tests/auto/declarative/visual/repeater/data/basic4.qml419
-rw-r--r--tests/auto/declarative/visual/selftest_noimages/data/selftest_noimages.qml470
-rw-r--r--tests/auto/declarative/visual/selftest_noimages/selftest_noimages.qml9
-rw-r--r--tests/auto/declarative/visual/tst_visual.cpp370
-rw-r--r--tests/auto/declarative/visual/visual.pro7
-rw-r--r--tests/auto/declarative/visual/webview/embedding/data/nesting.0.pngbin0 -> 5659 bytes
-rw-r--r--tests/auto/declarative/visual/webview/embedding/data/nesting.qml363
-rw-r--r--tests/auto/declarative/visual/webview/embedding/egg.qml26
-rw-r--r--tests/auto/declarative/visual/webview/embedding/nesting.html9
-rw-r--r--tests/auto/declarative/visual/webview/embedding/nesting.qml9
-rw-r--r--tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.0.pngbin0 -> 7999 bytes
-rw-r--r--tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.1.pngbin0 -> 8020 bytes
-rw-r--r--tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.2.pngbin0 -> 8143 bytes
-rw-r--r--tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.3.pngbin0 -> 8158 bytes
-rw-r--r--tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.4.pngbin0 -> 8284 bytes
-rw-r--r--tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.5.pngbin0 -> 8284 bytes
-rw-r--r--tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.6.pngbin0 -> 8284 bytes
-rw-r--r--tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.7.pngbin0 -> 8284 bytes
-rw-r--r--tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.8.pngbin0 -> 8284 bytes
-rw-r--r--tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.qml3759
-rw-r--r--tests/auto/declarative/visual/webview/javascript/data/windowObjects.0.pngbin0 -> 7991 bytes
-rw-r--r--tests/auto/declarative/visual/webview/javascript/data/windowObjects.1.pngbin0 -> 7991 bytes
-rw-r--r--tests/auto/declarative/visual/webview/javascript/data/windowObjects.2.pngbin0 -> 7643 bytes
-rw-r--r--tests/auto/declarative/visual/webview/javascript/data/windowObjects.3.pngbin0 -> 7733 bytes
-rw-r--r--tests/auto/declarative/visual/webview/javascript/data/windowObjects.4.pngbin0 -> 8116 bytes
-rw-r--r--tests/auto/declarative/visual/webview/javascript/data/windowObjects.qml2643
-rw-r--r--tests/auto/declarative/visual/webview/javascript/evaluateJavaScript.qml32
-rw-r--r--tests/auto/declarative/visual/webview/javascript/test-objects.html12
-rw-r--r--tests/auto/declarative/visual/webview/javascript/windowObjects.qml27
-rw-r--r--tests/auto/declarative/visual/webview/settings/data/fontFamily.0.pngbin0 -> 3774 bytes
-rw-r--r--tests/auto/declarative/visual/webview/settings/data/fontFamily.qml395
-rw-r--r--tests/auto/declarative/visual/webview/settings/data/fontSize.0.pngbin0 -> 32180 bytes
-rw-r--r--tests/auto/declarative/visual/webview/settings/data/fontSize.qml339
-rw-r--r--tests/auto/declarative/visual/webview/settings/data/noAutoLoadImages.0.pngbin0 -> 6609 bytes
-rw-r--r--tests/auto/declarative/visual/webview/settings/data/noAutoLoadImages.1.pngbin0 -> 6609 bytes
-rw-r--r--tests/auto/declarative/visual/webview/settings/data/noAutoLoadImages.qml595
-rw-r--r--tests/auto/declarative/visual/webview/settings/data/setFontFamily.0.pngbin0 -> 12132 bytes
-rw-r--r--tests/auto/declarative/visual/webview/settings/data/setFontFamily.qml351
-rw-r--r--tests/auto/declarative/visual/webview/settings/fontFamily.qml17
-rw-r--r--tests/auto/declarative/visual/webview/settings/fontSize.qml71
-rw-r--r--tests/auto/declarative/visual/webview/settings/noAutoLoadImages.qml21
-rw-r--r--tests/auto/declarative/visual/webview/settings/qtlogo.pngbin0 -> 2738 bytes
-rw-r--r--tests/auto/declarative/visual/webview/settings/setFontFamily.qml11
-rw-r--r--tests/auto/declarative/visual/webview/settings/tarzeau_ocr_a.ttfbin0 -> 24544 bytes
-rw-r--r--tests/auto/declarative/visual/webview/settings/test-img.html6
-rw-r--r--tests/auto/declarative/visual/webview/settings/test.html9
-rw-r--r--tests/auto/declarative/visual/webview/zooming/data/pageWidth.qml227
-rw-r--r--tests/auto/declarative/visual/webview/zooming/data/renderControl.0.pngbin0 -> 7589 bytes
-rw-r--r--tests/auto/declarative/visual/webview/zooming/data/renderControl.qml415
-rw-r--r--tests/auto/declarative/visual/webview/zooming/data/resolution.0.pngbin0 -> 6275 bytes
-rw-r--r--tests/auto/declarative/visual/webview/zooming/data/resolution.1.pngbin0 -> 3553 bytes
-rw-r--r--tests/auto/declarative/visual/webview/zooming/data/resolution.2.pngbin0 -> 5838 bytes
-rw-r--r--tests/auto/declarative/visual/webview/zooming/data/resolution.3.pngbin0 -> 8005 bytes
-rw-r--r--tests/auto/declarative/visual/webview/zooming/data/resolution.4.pngbin0 -> 6087 bytes
-rw-r--r--tests/auto/declarative/visual/webview/zooming/data/resolution.qml1319
-rw-r--r--tests/auto/declarative/visual/webview/zooming/data/zoomTextOnly.0.pngbin0 -> 5589 bytes
-rw-r--r--tests/auto/declarative/visual/webview/zooming/data/zoomTextOnly.1.pngbin0 -> 6848 bytes
-rw-r--r--tests/auto/declarative/visual/webview/zooming/data/zoomTextOnly.qml655
-rw-r--r--tests/auto/declarative/visual/webview/zooming/data/zooming.0.pngbin0 -> 735 bytes
-rw-r--r--tests/auto/declarative/visual/webview/zooming/data/zooming.1.pngbin0 -> 735 bytes
-rw-r--r--tests/auto/declarative/visual/webview/zooming/data/zooming.2.pngbin0 -> 735 bytes
-rw-r--r--tests/auto/declarative/visual/webview/zooming/data/zooming.3.pngbin0 -> 735 bytes
-rw-r--r--tests/auto/declarative/visual/webview/zooming/data/zooming.qml2115
-rw-r--r--tests/auto/declarative/visual/webview/zooming/pageWidth.qml10
-rw-r--r--tests/auto/declarative/visual/webview/zooming/qtlogo.pngbin0 -> 2738 bytes
-rw-r--r--tests/auto/declarative/visual/webview/zooming/renderControl.html7
-rw-r--r--tests/auto/declarative/visual/webview/zooming/renderControl.qml21
-rw-r--r--tests/auto/declarative/visual/webview/zooming/resolution.html6
-rw-r--r--tests/auto/declarative/visual/webview/zooming/resolution.qml17
-rw-r--r--tests/auto/declarative/visual/webview/zooming/zoomTextOnly.html7
-rw-r--r--tests/auto/declarative/visual/webview/zooming/zoomTextOnly.qml15
-rw-r--r--tests/auto/declarative/visual/webview/zooming/zooming.html6
-rw-r--r--tests/auto/declarative/visual/webview/zooming/zooming.qml18
-rw-r--r--tests/auto/gestures/tst_gestures.cpp321
-rw-r--r--tests/auto/gui.pro1
-rw-r--r--tests/auto/headers/headers.pro2
-rw-r--r--tests/auto/headers/headersclean.cpp86
-rw-r--r--tests/auto/headers/tst_headers.cpp22
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/respfile/lupdatecmd2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/respfile/project.ts.result17
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/respfile/source1.cpp49
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/respfile/source2.cpp49
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/respfile/sources.lst2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/respfile/tsfiles.lst1
-rw-r--r--tests/auto/modeltest/dynamictreemodel.cpp3
-rw-r--r--tests/auto/modeltest/tst_modeltest.cpp30
-rw-r--r--tests/auto/multimedia.pro15
-rw-r--r--tests/auto/network.pro3
-rw-r--r--tests/auto/opengl.pro2
-rw-r--r--tests/auto/q3listview/tst_q3listview.cpp126
-rw-r--r--tests/auto/qapplication/desktopsettingsaware/desktopsettingsaware.pro5
-rw-r--r--tests/auto/qapplication/tst_qapplication.cpp30
-rw-r--r--tests/auto/qbearertestcommon.h87
-rw-r--r--tests/auto/qbrush/tst_qbrush.cpp9
-rw-r--r--tests/auto/qbytearray/tst_qbytearray.cpp13
-rw-r--r--tests/auto/qchar/qchar.pro1
-rw-r--r--tests/auto/qchar/tst_qchar.cpp18
-rw-r--r--tests/auto/qcombobox/tst_qcombobox.cpp30
-rw-r--r--tests/auto/qdatastream/tst_qdatastream.cpp69
-rw-r--r--tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp2
-rw-r--r--tests/auto/qdbuspendingcall/tst_qdbuspendingcall.cpp55
-rw-r--r--tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro14
-rw-r--r--tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp1200
-rw-r--r--tests/auto/qdeclarativevideo/qdeclarativevideo.pro14
-rw-r--r--tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp911
-rw-r--r--tests/auto/qdir/tst_qdir.cpp99
-rw-r--r--tests/auto/qdiriterator/recursiveDirs/dir1/aPage.html8
-rw-r--r--tests/auto/qdiriterator/recursiveDirs/dir1/textFileB.txt1
-rw-r--r--tests/auto/qdiriterator/recursiveDirs/textFileA.txt1
-rw-r--r--tests/auto/qdiriterator/tst_qdiriterator.cpp129
-rw-r--r--tests/auto/qdom/tst_qdom.cpp6
-rw-r--r--tests/auto/qdoublevalidator/tst_qdoublevalidator.cpp10
-rw-r--r--tests/auto/qeasingcurve/tst_qeasingcurve.cpp200
-rw-r--r--tests/auto/qfileinfo/tst_qfileinfo.cpp15
-rw-r--r--tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp20
-rw-r--r--tests/auto/qgl/tst_qgl.cpp146
-rw-r--r--tests/auto/qgl_threads/qgl_threads.pro11
-rw-r--r--tests/auto/qgl_threads/tst_openglthreading.cpp480
-rw-r--r--tests/auto/qgl_threads/tst_openglthreading.h61
-rw-r--r--tests/auto/qglbuffer/qglbuffer.pro9
-rw-r--r--tests/auto/qglbuffer/tst_qglbuffer.cpp261
-rw-r--r--tests/auto/qgraphicsitem/nestedClipping_reference.pngbin638 -> 0 bytes
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp3
-rw-r--r--tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro5
-rw-r--r--tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp670
-rw-r--r--tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp27
-rw-r--r--tests/auto/qheaderview/tst_qheaderview.cpp64
-rw-r--r--tests/auto/qhttp/tst_qhttp.cpp30
-rw-r--r--tests/auto/qintvalidator/tst_qintvalidator.cpp26
-rw-r--r--tests/auto/qkeysequence/tst_qkeysequence.cpp13
-rw-r--r--tests/auto/qlabel/tst_qlabel.cpp46
-rw-r--r--tests/auto/qlineedit/tst_qlineedit.cpp23
-rw-r--r--tests/auto/qlist/tst_qlist.cpp44
-rw-r--r--tests/auto/qlocale/tst_qlocale.cpp5
-rw-r--r--tests/auto/qmainwindow/tst_qmainwindow.cpp40
-rw-r--r--tests/auto/qmediacontent/qmediacontent.pro6
-rw-r--r--tests/auto/qmediacontent/tst_qmediacontent.cpp174
-rw-r--r--tests/auto/qmediaobject/qmediaobject.pro4
-rw-r--r--tests/auto/qmediaobject/tst_qmediaobject.cpp549
-rw-r--r--tests/auto/qmediaplayer/qmediaplayer.pro6
-rw-r--r--tests/auto/qmediaplayer/tst_qmediaplayer.cpp986
-rw-r--r--tests/auto/qmediaplaylist/qmediaplaylist.pro6
-rw-r--r--tests/auto/qmediaplaylist/tmp.unsupported_format0
-rw-r--r--tests/auto/qmediaplaylist/tst_qmediaplaylist.cpp593
-rw-r--r--tests/auto/qmediaplaylistnavigator/qmediaplaylistnavigator.pro6
-rw-r--r--tests/auto/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp316
-rw-r--r--tests/auto/qmediapluginloader/qmediapluginloader.pro6
-rw-r--r--tests/auto/qmediapluginloader/tst_qmediapluginloader.cpp121
-rw-r--r--tests/auto/qmediaresource/qmediaresource.pro6
-rw-r--r--tests/auto/qmediaresource/tst_qmediaresource.cpp516
-rw-r--r--tests/auto/qmediaservice/qmediaservice.pro6
-rw-r--r--tests/auto/qmediaservice/tst_qmediaservice.cpp219
-rw-r--r--tests/auto/qmediaserviceprovider/qmediaserviceprovider.pro6
-rw-r--r--tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp481
-rw-r--r--tests/auto/qmediatimerange/qmediatimerange.pro6
-rw-r--r--tests/auto/qmediatimerange/tst_qmediatimerange.cpp735
-rw-r--r--tests/auto/qmenu/tst_qmenu.cpp37
-rw-r--r--tests/auto/qmetaobject/tst_qmetaobject.cpp37
-rw-r--r--tests/auto/qmetatype/tst_qmetatype.cpp14
-rw-r--r--tests/auto/qnetworkconfigmanager/qnetworkconfigmanager.pro15
-rw-r--r--tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp335
-rw-r--r--tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro15
-rw-r--r--tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp303
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp83
-rw-r--r--tests/auto/qnetworksession/lackey/lackey.pro15
-rw-r--r--tests/auto/qnetworksession/lackey/main.cpp146
-rw-r--r--tests/auto/qnetworksession/qnetworksession.pro2
-rw-r--r--tests/auto/qnetworksession/test/test.pro26
-rw-r--r--tests/auto/qnetworksession/test/tst_qnetworksession.cpp1273
-rw-r--r--tests/auto/qobject/moc_oldnormalizeobject.cpp154
-rw-r--r--tests/auto/qobject/oldnormalizeobject.h69
-rw-r--r--tests/auto/qobject/tst_qobject.cpp188
-rw-r--r--tests/auto/qobject/tst_qobject.pro22
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp48
-rw-r--r--tests/auto/qpathclipper/pathcompare.h126
-rw-r--r--tests/auto/qpathclipper/tst_qpathclipper.cpp107
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp27
-rw-r--r--tests/auto/qprinter/tst_qprinter.cpp33
-rw-r--r--tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp1
-rw-r--r--tests/auto/qregexp/tst_qregexp.cpp93
-rw-r--r--tests/auto/qscriptvalue/qscriptvalue.pro8
-rw-r--r--tests/auto/qscriptvalue/testgen/data.txt43
-rwxr-xr-xtests/auto/qscriptvalue/testgen/gen.py3
-rw-r--r--tests/auto/qscriptvalue/testgen/main.cpp2
-rw-r--r--tests/auto/qscriptvalue/testgen/testgenerator.cpp401
-rw-r--r--tests/auto/qscriptvalue/testgen/testgenerator.h15
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.h14
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp6496
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue_generated_cast.cpp1453
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp7026
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue_generated_init.cpp198
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue_generated_isXXX.cpp830
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue_generated_toXXX.cpp1897
-rw-r--r--tests/auto/qsharedpointer/externaltests.cpp10
-rw-r--r--tests/auto/qsharedpointer/tst_qsharedpointer.cpp100
-rw-r--r--tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp107
-rw-r--r--tests/auto/qsoundeffect/qsoundeffect.pro20
-rw-r--r--tests/auto/qsoundeffect/test.wavbin0 -> 38316 bytes
-rw-r--r--tests/auto/qsoundeffect/tst_qsoundeffect.cpp144
-rw-r--r--tests/auto/qstatictext/qstatictext.pro4
-rw-r--r--tests/auto/qstatictext/tst_qstatictext.cpp486
-rw-r--r--tests/auto/qstring/tst_qstring.cpp157
-rw-r--r--tests/auto/qstringbuilder1/stringbuilder.cpp14
-rw-r--r--tests/auto/qsvggenerator/referenceSvgs/fileName_output.svg6
-rw-r--r--tests/auto/qsvggenerator/referenceSvgs/radial_gradient.svg10
-rw-r--r--tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp31
-rw-r--r--tests/auto/qtabbar/tst_qtabbar.cpp3
-rw-r--r--tests/auto/qtcpsocket/tst_qtcpsocket.cpp25
-rw-r--r--tests/auto/qtextcodec/test/test.pro1
-rw-r--r--tests/auto/qtextcodec/tst_qtextcodec.cpp266
-rw-r--r--tests/auto/qtextedit/tst_qtextedit.cpp22
-rw-r--r--tests/auto/qtextstream/tst_qtextstream.cpp58
-rw-r--r--tests/auto/qtimer/tst_qtimer.cpp12
-rw-r--r--tests/auto/qtoolbar/tst_qtoolbar.cpp31
-rw-r--r--tests/auto/qurl/tst_qurl.cpp9
-rw-r--r--tests/auto/qvariant/tst_qvariant.cpp14
-rw-r--r--tests/auto/qvideowidget/qvideowidget.pro6
-rw-r--r--tests/auto/qvideowidget/tst_qvideowidget.cpp1600
-rw-r--r--tests/auto/qxmlsimplereader/tst_qxmlsimplereader.cpp2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P02/ibm02v01.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P66/ibm66v01.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P66/out/ibm66v01.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/089.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/089.xml2
-rw-r--r--tests/auto/selftests/expected_benchlibcallgrind.txt2
-rw-r--r--tests/auto/selftests/expected_cmptest.txt2
-rw-r--r--tests/auto/selftests/expected_crashes_3.txt2
-rw-r--r--tests/auto/selftests/expected_longstring.txt2
-rw-r--r--tests/auto/selftests/expected_maxwarnings.txt2
-rw-r--r--tests/auto/selftests/expected_skip.txt2
-rw-r--r--tests/auto/selftests/tst_selftests.cpp13
-rwxr-xr-xtests/auto/selftests/xunit/tst_xunitbin11624 -> 0 bytes
-rw-r--r--tests/auto/symbols/tst_symbols.cpp1
-rw-r--r--tests/auto/uiloader/baseline/css_buttons_background.ui39
-rw-r--r--tests/auto/uiloader/baseline/css_qtbug6855.ui57
-rw-r--r--tests/auto/utf8/tst_utf8.cpp85
-rw-r--r--tests/benchmarks/benchmarks.pro1
-rw-r--r--tests/benchmarks/corelib/kernel/kernel.pro1
-rw-r--r--tests/benchmarks/corelib/kernel/qmetaobject/main.cpp105
-rw-r--r--tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro7
-rw-r--r--tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp233
-rw-r--r--tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro11
-rw-r--r--tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/tst_qtimer_vs_qmetaobject.cpp96
-rw-r--r--tests/benchmarks/corelib/tools/qstringlist/main.cpp67
-rw-r--r--tests/benchmarks/corelib/tools/qstringlist/qstringlist.pro2
-rw-r--r--tests/benchmarks/corelib/tools/qvector/main.cpp426
-rw-r--r--tests/benchmarks/corelib/tools/qvector/outofline.cpp81
-rw-r--r--tests/benchmarks/corelib/tools/qvector/qrawvector.h742
-rw-r--r--tests/benchmarks/corelib/tools/qvector/qvector.pro6
-rw-r--r--tests/benchmarks/corelib/tools/tools.pro3
-rw-r--r--tests/benchmarks/declarative/binding/binding.pro18
-rw-r--r--tests/benchmarks/declarative/binding/data/idproperty.txt9
-rw-r--r--tests/benchmarks/declarative/binding/data/localproperty.txt5
-rw-r--r--tests/benchmarks/declarative/binding/data/objectproperty.txt7
-rw-r--r--tests/benchmarks/declarative/binding/testtypes.cpp46
-rw-r--r--tests/benchmarks/declarative/binding/testtypes.h83
-rw-r--r--tests/benchmarks/declarative/binding/tst_binding.cpp161
-rw-r--r--tests/benchmarks/declarative/creation/creation.pro15
-rw-r--r--tests/benchmarks/declarative/creation/data/item.qml34
-rw-r--r--tests/benchmarks/declarative/creation/data/qobject.qml4
-rw-r--r--tests/benchmarks/declarative/creation/tst_creation.cpp384
-rw-r--r--tests/benchmarks/declarative/declarative.pro10
-rw-r--r--tests/benchmarks/declarative/painting/data/63x63.pngbin0 -> 3077 bytes
-rw-r--r--tests/benchmarks/declarative/painting/data/63x63_opaque.pngbin0 -> 3440 bytes
-rw-r--r--tests/benchmarks/declarative/painting/data/64x64.pngbin0 -> 3101 bytes
-rw-r--r--tests/benchmarks/declarative/painting/data/64x64_opaque.pngbin0 -> 3588 bytes
-rw-r--r--tests/benchmarks/declarative/painting/paintbenchmark.cpp417
-rw-r--r--tests/benchmarks/declarative/painting/paintbenchmark.pro13
-rw-r--r--tests/benchmarks/declarative/pointers/pointers.pro8
-rw-r--r--tests/benchmarks/declarative/pointers/tst_pointers.cpp77
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject.qml3
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject_binding.qml6
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml3
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml6
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml55
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/blueStar.pngbin0 -> 278 bytes
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/blueStone.pngbin0 -> 2691 bytes
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/greenStar.pngbin0 -> 273 bytes
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/greenStone.pngbin0 -> 2662 bytes
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/redStar.pngbin0 -> 274 bytes
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/redStone.pngbin0 -> 2604 bytes
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/yellowStone.pngbin0 -> 2667 bytes
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml15
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml5
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro22
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/testtypes.cpp46
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/testtypes.h83
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp119
-rw-r--r--tests/benchmarks/declarative/qdeclarativeimage/image.pngbin0 -> 611 bytes
-rw-r--r--tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro16
-rw-r--r--tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp108
-rw-r--r--tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml3
-rw-r--r--tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml6
-rw-r--r--tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro10
-rw-r--r--tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp113
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/example.qml14
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/qdeclarativetime.cpp231
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/qdeclarativetime.pro23
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/anchors/empty.qml34
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/anchors/fill.qml41
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/anchors/null.qml27
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/item_creation/children.qml34
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/item_creation/data.qml34
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/item_creation/no_creation.qml12
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/item_creation/resources.qml34
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/positioner_creation/no_positioner.qml37
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/positioner_creation/null_positioner.qml34
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/positioner_creation/positioner.qml37
-rw-r--r--tests/benchmarks/declarative/script/data/CustomObject.qml7
-rw-r--r--tests/benchmarks/declarative/script/data/block.qml34
-rw-r--r--tests/benchmarks/declarative/script/data/signal_args.qml6
-rw-r--r--tests/benchmarks/declarative/script/data/signal_qml.qml6
-rw-r--r--tests/benchmarks/declarative/script/data/signal_unconnected.qml4
-rw-r--r--tests/benchmarks/declarative/script/data/signal_unusedArgs.qml6
-rw-r--r--tests/benchmarks/declarative/script/data/slot_complex.qml16
-rw-r--r--tests/benchmarks/declarative/script/data/slot_complex_js.qml18
-rw-r--r--tests/benchmarks/declarative/script/data/slot_simple.qml9
-rw-r--r--tests/benchmarks/declarative/script/data/slot_simple_js.qml13
-rw-r--r--tests/benchmarks/declarative/script/script.pro20
-rw-r--r--tests/benchmarks/declarative/script/tst_script.cpp631
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp2
-rw-r--r--tests/benchmarks/gui/painting/painting.pro4
-rw-r--r--tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp6
-rw-r--r--tests/benchmarks/gui/painting/qtbench/benchmarktests.h841
-rw-r--r--tests/benchmarks/gui/painting/qtbench/qtbench.pro6
-rw-r--r--tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp254
-rw-r--r--tests/benchmarks/gui/painting/qtracebench/qtracebench.pro10
-rw-r--r--tests/benchmarks/gui/painting/qtracebench/qtracebench.qrc10
-rw-r--r--tests/benchmarks/gui/painting/qtracebench/traces/basicdrawing.tracebin0 -> 366739 bytes
-rw-r--r--tests/benchmarks/gui/painting/qtracebench/traces/creator.tracebin0 -> 541031 bytes
-rw-r--r--tests/benchmarks/gui/painting/qtracebench/traces/qmlphoneconcept.tracebin0 -> 337439 bytes
-rw-r--r--tests/benchmarks/gui/painting/qtracebench/traces/qmlsamegame.tracebin0 -> 246423 bytes
-rw-r--r--tests/benchmarks/gui/painting/qtracebench/traces/textedit.tracebin0 -> 60042 bytes
-rw-r--r--tests/benchmarks/gui/painting/qtracebench/traces/webkit.tracebin0 -> 451391 bytes
-rw-r--r--tests/benchmarks/gui/painting/qtracebench/tst_qtracebench.cpp262
-rw-r--r--tests/manual/bearerex/bearerex.cpp561
-rw-r--r--tests/manual/bearerex/bearerex.h142
-rw-r--r--tests/manual/bearerex/bearerex.pro20
-rw-r--r--tests/manual/bearerex/bearerex.ui95
-rw-r--r--tests/manual/bearerex/detailedinfodialog.ui54
-rw-r--r--tests/manual/bearerex/main.cpp59
-rw-r--r--tests/manual/bearerex/sessiondialog.ui139
-rw-r--r--tests/manual/bearerex/xqlistwidget.cpp67
-rw-r--r--tests/manual/bearerex/xqlistwidget.h59
-rw-r--r--tests/manual/networkmanager/README2
-rw-r--r--tests/manual/networkmanager/dialog.ui213
-rw-r--r--tests/manual/networkmanager/networkmanager.pro9
-rw-r--r--tests/manual/networkmanager/networkmanagertest.cpp287
-rw-r--r--tests/manual/networkmanager/nmview.cpp1028
-rw-r--r--tests/manual/networkmanager/nmview.h109
-rw-r--r--tests/manual/networkmanager/startdlg.cpp96
-rw-r--r--tests/manual/networkmanager/startdlg.h59
-rw-r--r--tools/assistant/assistant.pro4
-rw-r--r--tools/assistant/compat/Info_mac.plist18
-rw-r--r--tools/assistant/compat/assistant.icnsbin162568 -> 0 bytes
-rw-r--r--tools/assistant/compat/assistant.icobin355574 -> 0 bytes
-rw-r--r--tools/assistant/compat/assistant.pro84
-rw-r--r--tools/assistant/compat/assistant.qrc37
-rw-r--r--tools/assistant/compat/assistant.rc1
-rw-r--r--tools/assistant/compat/compat.pro84
-rw-r--r--tools/assistant/compat/config.cpp438
-rw-r--r--tools/assistant/compat/config.h165
-rw-r--r--tools/assistant/compat/docuparser.cpp433
-rw-r--r--tools/assistant/compat/docuparser.h166
-rw-r--r--tools/assistant/compat/fontsettingsdialog.cpp137
-rw-r--r--tools/assistant/compat/fontsettingsdialog.h77
-rw-r--r--tools/assistant/compat/helpdialog.cpp1331
-rw-r--r--tools/assistant/compat/helpdialog.h184
-rw-r--r--tools/assistant/compat/helpdialog.ui404
-rw-r--r--tools/assistant/compat/helpwindow.cpp247
-rw-r--r--tools/assistant/compat/helpwindow.h100
-rw-r--r--tools/assistant/compat/images/assistant-128.pngbin6448 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/assistant.pngbin2034 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/close.pngbin406 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/designer.pngbin1282 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/linguist.pngbin1382 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/addtab.pngbin469 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/book.pngbin1477 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/closetab.pngbin516 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/editcopy.pngbin1468 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/find.pngbin1836 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/home.pngbin1807 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/next.pngbin1310 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/prev.pngbin1080 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/print.pngbin2087 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/synctoc.pngbin1838 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/whatsthis.pngbin1586 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/zoomin.pngbin1696 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/zoomout.pngbin1662 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/qt.pngbin1422 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/addtab.pngbin314 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/book.pngbin1109 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/closetab.pngbin375 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/editcopy.pngbin1325 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/find.pngbin1944 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/home.pngbin1414 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/next.pngbin1038 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/previous.pngbin898 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/print.pngbin1456 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/synctoc.pngbin1235 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/whatsthis.pngbin1040 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/zoomin.pngbin1208 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/zoomout.pngbin1226 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/wrap.pngbin500 -> 0 bytes
-rw-r--r--tools/assistant/compat/index.cpp581
-rw-r--r--tools/assistant/compat/index.h133
-rw-r--r--tools/assistant/compat/lib/lib.pro78
-rw-r--r--tools/assistant/compat/lib/qassistantclient.cpp446
-rw-r--r--tools/assistant/compat/lib/qassistantclient.h100
-rw-r--r--tools/assistant/compat/lib/qassistantclient_global.h63
-rw-r--r--tools/assistant/compat/main.cpp465
-rw-r--r--tools/assistant/compat/mainwindow.cpp885
-rw-r--r--tools/assistant/compat/mainwindow.h137
-rw-r--r--tools/assistant/compat/mainwindow.ui457
-rw-r--r--tools/assistant/compat/profile.cpp196
-rw-r--r--tools/assistant/compat/profile.h95
-rw-r--r--tools/assistant/compat/tabbedbrowser.cpp530
-rw-r--r--tools/assistant/compat/tabbedbrowser.h122
-rw-r--r--tools/assistant/compat/tabbedbrowser.ui233
-rw-r--r--tools/assistant/compat/topicchooser.cpp101
-rw-r--r--tools/assistant/compat/topicchooser.h77
-rw-r--r--tools/assistant/compat/topicchooser.ui162
-rw-r--r--tools/assistant/lib/lib.pro5
-rw-r--r--tools/assistant/lib/qclucenefieldnames.cpp57
-rw-r--r--tools/assistant/lib/qclucenefieldnames_p.h63
-rw-r--r--tools/assistant/lib/qhelp_global.cpp22
-rw-r--r--tools/assistant/lib/qhelpcollectionhandler.cpp12
-rw-r--r--tools/assistant/lib/qhelpdbreader.cpp2
-rw-r--r--tools/assistant/lib/qhelpenginecore.cpp7
-rw-r--r--tools/assistant/lib/qhelpgenerator.cpp107
-rw-r--r--tools/assistant/lib/qhelpgenerator_p.h3
-rw-r--r--tools/assistant/lib/qhelpprojectdata.cpp47
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_clucene.cpp419
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_clucene_p.h37
-rw-r--r--tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp20
-rw-r--r--tools/assistant/lib/qhelpsearchquerywidget.cpp90
-rw-r--r--tools/assistant/lib/qhelpsearchresultwidget.cpp2
-rw-r--r--tools/assistant/tools/assistant/aboutdialog.cpp44
-rw-r--r--tools/assistant/tools/assistant/assistant.pro131
-rw-r--r--tools/assistant/tools/assistant/assistant.qchbin364544 -> 364544 bytes
-rw-r--r--tools/assistant/tools/assistant/assistant_images.qrc1
-rw-r--r--tools/assistant/tools/assistant/bookmarkdialog.cpp238
-rw-r--r--tools/assistant/tools/assistant/bookmarkdialog.h89
-rw-r--r--tools/assistant/tools/assistant/bookmarkdialog.ui82
-rw-r--r--tools/assistant/tools/assistant/bookmarkfiltermodel.cpp322
-rw-r--r--tools/assistant/tools/assistant/bookmarkfiltermodel.h118
-rw-r--r--tools/assistant/tools/assistant/bookmarkitem.cpp181
-rw-r--r--tools/assistant/tools/assistant/bookmarkitem.h91
-rw-r--r--tools/assistant/tools/assistant/bookmarkmanager.cpp1017
-rw-r--r--tools/assistant/tools/assistant/bookmarkmanager.h202
-rw-r--r--tools/assistant/tools/assistant/bookmarkmanagerwidget.cpp321
-rw-r--r--tools/assistant/tools/assistant/bookmarkmanagerwidget.h102
-rw-r--r--tools/assistant/tools/assistant/bookmarkmanagerwidget.ui137
-rw-r--r--tools/assistant/tools/assistant/bookmarkmodel.cpp444
-rw-r--r--tools/assistant/tools/assistant/bookmarkmodel.h116
-rw-r--r--tools/assistant/tools/assistant/bookmarkwidget.ui85
-rw-r--r--tools/assistant/tools/assistant/centralwidget.cpp570
-rw-r--r--tools/assistant/tools/assistant/centralwidget.h85
-rw-r--r--tools/assistant/tools/assistant/cmdlineparser.cpp348
-rw-r--r--tools/assistant/tools/assistant/cmdlineparser.h28
-rw-r--r--tools/assistant/tools/assistant/contentwindow.cpp36
-rw-r--r--tools/assistant/tools/assistant/contentwindow.h5
-rw-r--r--tools/assistant/tools/assistant/doc/assistant.qdocconf2
-rw-r--r--tools/assistant/tools/assistant/filternamedialog.cpp4
-rw-r--r--tools/assistant/tools/assistant/findwidget.cpp234
-rw-r--r--tools/assistant/tools/assistant/findwidget.h101
-rw-r--r--tools/assistant/tools/assistant/helpenginewrapper.cpp841
-rw-r--r--tools/assistant/tools/assistant/helpenginewrapper.h216
-rw-r--r--tools/assistant/tools/assistant/helpviewer.cpp594
-rw-r--r--tools/assistant/tools/assistant/helpviewer.h138
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qtb.cpp287
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qtb.h110
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qwv.cpp385
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qwv.h119
-rw-r--r--tools/assistant/tools/assistant/images/bookmark.pngbin0 -> 1266 bytes
-rw-r--r--tools/assistant/tools/assistant/indexwindow.cpp29
-rw-r--r--tools/assistant/tools/assistant/indexwindow.h4
-rw-r--r--tools/assistant/tools/assistant/installdialog.cpp15
-rw-r--r--tools/assistant/tools/assistant/main.cpp540
-rw-r--r--tools/assistant/tools/assistant/mainwindow.cpp566
-rw-r--r--tools/assistant/tools/assistant/mainwindow.h48
-rw-r--r--tools/assistant/tools/assistant/preferencesdialog.cpp172
-rw-r--r--tools/assistant/tools/assistant/preferencesdialog.h13
-rw-r--r--tools/assistant/tools/assistant/qtdocinstaller.cpp87
-rw-r--r--tools/assistant/tools/assistant/qtdocinstaller.h21
-rw-r--r--tools/assistant/tools/assistant/remotecontrol.cpp287
-rw-r--r--tools/assistant/tools/assistant/remotecontrol.h18
-rw-r--r--tools/assistant/tools/assistant/searchwidget.cpp14
-rw-r--r--tools/assistant/tools/assistant/topicchooser.cpp29
-rw-r--r--tools/assistant/tools/assistant/topicchooser.h9
-rw-r--r--tools/assistant/tools/assistant/tracer.h75
-rw-r--r--tools/assistant/tools/assistant/xbelsupport.cpp233
-rw-r--r--tools/assistant/tools/assistant/xbelsupport.h87
-rw-r--r--tools/assistant/tools/qcollectiongenerator/main.cpp104
-rw-r--r--tools/assistant/tools/qcollectiongenerator/qcollectiongenerator.pro19
-rw-r--r--tools/assistant/tools/qhelpgenerator/main.cpp30
-rw-r--r--tools/assistant/tools/shared/collectionconfiguration.cpp313
-rw-r--r--tools/assistant/tools/shared/collectionconfiguration.h145
-rw-r--r--tools/assistant/tools/shared/helpgenerator.cpp5
-rw-r--r--tools/assistant/tools/shared/helpgenerator.h1
-rw-r--r--tools/assistant/translations/qt_help.pro1
-rw-r--r--tools/assistant/translations/translations.pro1
-rw-r--r--tools/assistant/translations/translations_adp.pro41
-rw-r--r--tools/configure/configure.pro1
-rw-r--r--tools/configure/configureapp.cpp76
-rw-r--r--tools/designer/src/components/formeditor/formeditor.pri2
-rw-r--r--tools/designer/src/components/formeditor/formwindow.cpp227
-rw-r--r--tools/designer/src/components/formeditor/formwindow.h15
-rw-r--r--tools/designer/src/components/formeditor/qdesignerundostack.cpp112
-rw-r--r--tools/designer/src/components/formeditor/qdesignerundostack.h90
-rw-r--r--tools/designer/src/components/propertyeditor/propertyeditor.cpp4
-rw-r--r--tools/designer/src/components/widgetbox/widgetboxcategorylistview.cpp26
-rw-r--r--tools/designer/src/lib/shared/formwindowbase.cpp13
-rw-r--r--tools/designer/src/lib/shared/qdesigner_formwindowcommand.cpp6
-rw-r--r--tools/designer/src/lib/shared/qdesigner_formwindowcommand_p.h4
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertycommand.cpp54
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertycommand_p.h28
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertyeditor.cpp16
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h8
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertysheet.cpp12
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertysheet_p.h3
-rw-r--r--tools/designer/src/lib/shared/qtresourceview.cpp2
-rw-r--r--tools/designer/src/plugins/plugins.pro1
-rw-r--r--tools/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro13
-rw-r--r--tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp132
-rw-r--r--tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.h74
-rw-r--r--tools/designer/translations/translations.pro1
-rw-r--r--tools/linguist/lconvert/main.cpp2
-rw-r--r--tools/linguist/linguist/linguist.pro7
-rw-r--r--tools/linguist/linguist/mainwindow.ui2
-rw-r--r--tools/linguist/lupdate/lupdate.h1
-rw-r--r--tools/linguist/lupdate/lupdate.pro4
-rw-r--r--tools/linguist/lupdate/main.cpp141
-rw-r--r--tools/linguist/lupdate/qdeclarative.cpp240
-rw-r--r--tools/linguist/lupdate/qscript.cpp41
-rw-r--r--tools/porting/src/q3porting.xml4
-rw-r--r--tools/qdbus/qdbus/qdbus.cpp191
-rw-r--r--tools/qdoc3/codemarker.cpp2
-rw-r--r--tools/qdoc3/codeparser.cpp6
-rw-r--r--tools/qdoc3/command.cpp9
-rw-r--r--tools/qdoc3/config.cpp10
-rw-r--r--tools/qdoc3/config.h3
-rw-r--r--tools/qdoc3/cppcodemarker.cpp16
-rw-r--r--tools/qdoc3/cppcodeparser.cpp48
-rw-r--r--tools/qdoc3/doc.cpp3
-rw-r--r--tools/qdoc3/doc.h1
-rw-r--r--tools/qdoc3/doc/classic.css284
-rw-r--r--tools/qdoc3/doc/examples/layoutmanagement.qdocinc13
-rw-r--r--tools/qdoc3/doc/examples/main.cpp54
-rw-r--r--tools/qdoc3/doc/examples/minimum.qdocconf42
-rw-r--r--tools/qdoc3/doc/examples/objectmodel.qdocinc11
-rw-r--r--tools/qdoc3/doc/examples/signalandslots.qdocinc9
-rw-r--r--tools/qdoc3/doc/files/compat.qdocconf31
-rw-r--r--tools/qdoc3/doc/files/qt.qdocconf115
-rw-r--r--tools/qdoc3/doc/images/happy.gifbin0 -> 11526 bytes
-rw-r--r--tools/qdoc3/doc/images/happyguy.jpgbin0 -> 53442 bytes
-rw-r--r--tools/qdoc3/doc/images/qt-logo.pngbin0 -> 5149 bytes
-rw-r--r--tools/qdoc3/doc/images/training.jpgbin0 -> 8368 bytes
-rw-r--r--tools/qdoc3/doc/qdoc-manual.qdoc8695
-rw-r--r--tools/qdoc3/doc/qdoc-manual.qdocconf49
-rw-r--r--tools/qdoc3/generator.cpp54
-rw-r--r--tools/qdoc3/generator.h8
-rw-r--r--tools/qdoc3/helpprojectwriter.cpp1
-rw-r--r--tools/qdoc3/htmlgenerator.cpp332
-rw-r--r--tools/qdoc3/htmlgenerator.h18
-rw-r--r--tools/qdoc3/jambiapiparser.cpp2
-rw-r--r--tools/qdoc3/javadocgenerator.cpp2
-rw-r--r--tools/qdoc3/javadocgenerator.h2
-rw-r--r--tools/qdoc3/linguistgenerator.cpp6
-rw-r--r--tools/qdoc3/linguistgenerator.h2
-rw-r--r--tools/qdoc3/main.cpp20
-rw-r--r--tools/qdoc3/mangenerator.cpp2
-rw-r--r--tools/qdoc3/mangenerator.h2
-rw-r--r--tools/qdoc3/node.cpp124
-rw-r--r--tools/qdoc3/node.h40
-rw-r--r--tools/qdoc3/pagegenerator.cpp14
-rw-r--r--tools/qdoc3/pagegenerator.h12
-rw-r--r--tools/qdoc3/qdoc3.pro37
-rw-r--r--tools/qdoc3/qsakernelparser.cpp6
-rw-r--r--tools/qdoc3/qscodeparser.cpp6
-rw-r--r--tools/qdoc3/test/assistant.qdocconf6
-rw-r--r--tools/qdoc3/test/designer.qdocconf6
-rw-r--r--tools/qdoc3/test/linguist.qdocconf6
-rw-r--r--tools/qdoc3/test/qdeclarative.qdocconf80
-rw-r--r--tools/qdoc3/test/qmake.qdocconf6
-rw-r--r--tools/qdoc3/test/qt-api-only_zh_CN.qdocconf30
-rw-r--r--tools/qdoc3/test/qt-build-docs.qdocconf30
-rw-r--r--tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf84
-rw-r--r--tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf25
-rw-r--r--tools/qdoc3/test/qt.qdocconf29
-rw-r--r--tools/qdoc3/test/qt_zh_CN.qdocconf86
-rw-r--r--tools/qdoc3/tokenizer.cpp25
-rw-r--r--tools/qdoc3/tokenizer.h9
-rw-r--r--tools/qdoc3/tree.cpp6
-rw-r--r--tools/qdoc3/webxmlgenerator.cpp6
-rw-r--r--tools/qdoc3/webxmlgenerator.h7
-rw-r--r--tools/qev/qev.pro2
-rw-r--r--tools/qml/content/Browser.qml243
-rw-r--r--tools/qml/content/images/folder.pngbin0 -> 1841 bytes
-rw-r--r--tools/qml/content/images/titlebar.pngbin0 -> 1436 bytes
-rw-r--r--tools/qml/content/images/titlebar.sci5
-rw-r--r--tools/qml/content/images/up.pngbin0 -> 662 bytes
-rw-r--r--tools/qml/deviceorientation.cpp75
-rw-r--r--tools/qml/deviceorientation.h73
-rw-r--r--tools/qml/deviceorientation_maemo.cpp139
-rw-r--r--tools/qml/main.cpp359
-rw-r--r--tools/qml/proxysettings.cpp110
-rw-r--r--tools/qml/proxysettings.h71
-rw-r--r--tools/qml/proxysettings.ui115
-rw-r--r--tools/qml/qdeclarativefolderlistmodel.cpp420
-rw-r--r--tools/qml/qdeclarativefolderlistmodel.h127
-rw-r--r--tools/qml/qfxtester.cpp381
-rw-r--r--tools/qml/qfxtester.h286
-rw-r--r--tools/qml/qml.pro60
-rw-r--r--tools/qml/qmlruntime.cpp1468
-rw-r--r--tools/qml/qmlruntime.h195
-rw-r--r--tools/qml/qmlruntime.qrc9
-rw-r--r--tools/qml/recopts.ui513
-rw-r--r--tools/qtconfig/mainwindow.cpp6
-rw-r--r--tools/qtconfig/qtconfig.pro5
-rw-r--r--tools/qtconfig/translations/translations.pro1
-rw-r--r--tools/qtestlib/chart/database.cpp3
-rw-r--r--tools/qtestlib/chart/database.h6
-rw-r--r--tools/qtestlib/chart/reportgenerator.cpp2
-rw-r--r--tools/qtestlib/chart/reportgenerator.h5
-rw-r--r--tools/qttracereplay/main.cpp84
-rw-r--r--tools/qvfb/translations/translations.pro1
-rw-r--r--tools/shared/fontpanel/fontpanel.cpp8
-rw-r--r--tools/tools.pro2
-rw-r--r--translations/assistant_adp_de.ts973
-rw-r--r--translations/assistant_adp_ja.ts1047
-rw-r--r--translations/assistant_adp_pl.ts974
-rw-r--r--translations/assistant_adp_ru.ts974
-rw-r--r--translations/assistant_adp_zh_CN.ts999
-rw-r--r--translations/assistant_adp_zh_TW.ts1000
-rw-r--r--translations/assistant_de.ts494
-rw-r--r--translations/assistant_hu.ts1083
-rw-r--r--translations/designer_de.ts58
-rw-r--r--translations/designer_hu.ts7023
-rw-r--r--translations/linguist_de.ts50
-rw-r--r--translations/linguist_hu.ts2014
-rw-r--r--translations/qt_da.ts23
-rw-r--r--translations/qt_de.ts1144
-rw-r--r--translations/qt_es.ts23
-rw-r--r--translations/qt_fr.ts23
-rw-r--r--translations/qt_help_de.ts181
-rw-r--r--translations/qt_help_hu.ts298
-rw-r--r--translations/qt_hu.ts10537
-rw-r--r--translations/qt_ja_JP.ts23
-rw-r--r--translations/qt_pl.ts23
-rw-r--r--translations/qt_pt.ts23
-rw-r--r--translations/qt_ru.ts23
-rw-r--r--translations/qt_sv.ts23
-rw-r--r--translations/qt_zh_CN.ts23
-rw-r--r--translations/qt_zh_TW.ts23
-rw-r--r--translations/qtconfig_hu.ts920
-rw-r--r--translations/qvfb_hu.ts344
-rw-r--r--translations/translations.pri7
-rw-r--r--util/unicode/.gitattributes1
-rw-r--r--util/unicode/data/CompositionExclusions.txt197
-rw-r--r--util/unicode/data/DerivedNormalizationProps.txt2650
-rw-r--r--util/unicode/main.cpp597
-rw-r--r--util/unicode/unicode.pro1
-rwxr-xr-xutil/webkit/mkdist-webkit36
4792 files changed, 589784 insertions, 133583 deletions
diff --git a/.gitignore b/.gitignore
index c8153fcdda..7fe33b9f6e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,15 +5,20 @@ examples/*/*/*
!examples/*/*/*[.]*
!examples/*/*/README
examples/*/*/*[.]app
+!examples/declarative/*
demos/*/*
!demos/*/*[.]*
demos/*/*[.]app
+!demos/declarative/*
config.tests/*/*/*
!config.tests/*/*/*[.]*
config.tests/*/*/*[.]app
+callgrind.out.*
+pcviewer.cfg
*~
*.a
+*.la
*.core
*.moc
*.o
@@ -42,10 +47,12 @@ Makefile*
*.prl
*.app
*.pro.user
+*.gcov
bin/Qt*.dll
bin/assistant*
bin/designer*
bin/dumpcpp*
+bin/duiviewer*
bin/idc*
bin/linguist*
bin/lrelease*
@@ -72,6 +79,12 @@ bin/cetest*
bin/collectiongenerator
bin/helpconverter
bin/helpgenerator
+bin/kmap2qmap*
+bin/qlalr*
+bin/qmlconv*
+bin/qmldebugger*
+bin/qml*
+bin/qttracereplay*
configure.cache
config.status
mkspecs/default
@@ -94,6 +107,7 @@ tests/auto/qprocess/fileWriterProcess.txt
.com.apple.timemachine.supported
tests/auto/qlibrary/libmylib.so*
tests/auto/qresourceengine/runtime_resource.rcc
+tools/qtestlib/chart/chart*
tools/qtestlib/updater/updater*
tools/activeqt/testcon/testcon.tlb
translations/*.qm
diff --git a/bin/createpackage.pl b/bin/createpackage.pl
index 7f803fde60..1d6ab6b6f9 100755
--- a/bin/createpackage.pl
+++ b/bin/createpackage.pl
@@ -162,10 +162,8 @@ my $stub_sis_name = $sisoutputbasename."_stub.sis";
# Store some utility variables
my $scriptpath = dirname(__FILE__);
my $certtext = $certificate;
-my $certpath = $scriptpath;
-$certpath =~ s-^(.*[^\\])$-$1\\-o; # ensure path ends with a backslash
-$certpath =~ s-/-\\-go; # for those working with UNIX shells
-$certpath =~ s-bin\\$-src\\s60installs\\-; # certificates are one step up in hierarcy
+# certificates are one step up in hierarchy
+my $certpath = File::Spec->catdir($scriptpath, File::Spec->updir(), "src/s60installs/");
# Check some pre-conditions and print error messages if needed.
unless (length($templatepkg)) {
@@ -197,14 +195,14 @@ if (length($certificate)) {
} else {
#If no certificate is given, check default options
$certtext = "RnD";
- $certificate = $certpath."rd.cer";
- $key = $certpath."rd-key.pem";
+ $certificate = File::Spec->catfile($certpath, "rd.cer");
+ $key = File::Spec->catfile($certpath, "rd-key.pem");
stat($certificate);
unless( -e _ ) {
$certtext = "Self Signed";
- $certificate = $certpath."selfsigned.cer";
- $key = $certpath."selfsigned.key";
+ $certificate = File::Spec->catfile($certpath, "selfsigned.cer");
+ $key = File::Spec->catfile($certpath, "selfsigned.key");
}
}
diff --git a/bin/createpackage.sh b/bin/createpackage.sh
new file mode 100755
index 0000000000..fdd4eebdea
--- /dev/null
+++ b/bin/createpackage.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+scriptpath=`dirname $0`
+perl $scriptpath/createpackage.pl "$@"
diff --git a/bin/syncqt b/bin/syncqt
index db6dce6284..be4af2a3de 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -44,7 +44,6 @@ my %modules = ( # path to module name map
"Qt3Support" => "$basedir/src/qt3support",
"ActiveQt" => "$basedir/src/activeqt/container;$basedir/src/activeqt/control;$basedir/src/activeqt/shared",
"QtTest" => "$basedir/src/testlib",
- "QtAssistant" => "$basedir/tools/assistant/compat/lib",
"QtHelp" => "$basedir/tools/assistant/lib",
"QtDesigner" => "$basedir/tools/designer/src/lib",
"QtUiTools" => "$basedir/tools/designer/src/uitools",
@@ -63,6 +62,7 @@ my %moduleheaders = ( # restrict the module headers to those found in relative p
# global variables (modified by options)
my $module = 0;
my $showonly = 0;
+my $quiet = 0;
my $remove_stale = 1;
my $force_win = 0;
my $force_relative = 0;
@@ -93,6 +93,7 @@ sub showUsage
print " -windows Force platform to Windows (default: " . ($force_win ? "yes" : "no") . ")\n";
print " -showonly Show action but not perform (default: " . ($showonly ? "yes" : "no") . ")\n";
print " -outdir <PATH> Specify output directory for sync (default: $out_basedir)\n";
+ print " -quiet Only report problems, not activity (default: " . ($quiet ? "yes" : "no") . ")\n";
print " -separate-module <NAME>:<PROFILEDIR>:<HEADERDIR> Create headers for <NAME> with original headers in <HEADERDIR> relative to <PROFILEDIR> \n";
print " -help This help\n";
exit 0;
@@ -325,7 +326,7 @@ sub syncHeader {
unless(-e "$header") {
my $header_dir = dirname($header);
- mkpath $header_dir, 0777;
+ mkpath $header_dir, !$quiet;
#write it
my $iheader_out = fixPaths($iheader, $header_dir);
@@ -355,12 +356,13 @@ sub fixPaths {
#setup
my $ret = $file;
+ $ret =~ s,/cygdrive/([a-zA-Z])/,$1:/,g;
my $file_dir = dirname($file);
if($file_dir eq ".") {
$file_dir = getcwd();
$file_dir =~ s=\\=/=g;
}
- $file_dir =~ s,/cygdrive/([a-zA-Z])/,$1:,g;
+ $file_dir =~ s,/cygdrive/([a-zA-Z])/,$1:/,g;
if($dir eq ".") {
$dir = getcwd();
$dir =~ s=\\=/=g;
@@ -465,7 +467,7 @@ sub copyFile
if ( $knowdiff || ($filecontents ne $ifilecontents) ) {
if ( $copy > 0 ) {
my $file_dir = dirname($file);
- mkpath $file_dir, 0777 unless(-e "$file_dir");
+ mkpath $file_dir, !$quiet unless(-e "$file_dir");
open(O, "> " . $file) || die "Could not open $file for writing (no write permission?)";
local $/;
binmode O;
@@ -474,7 +476,7 @@ sub copyFile
return 1;
} elsif ( $copy < 0 ) {
my $ifile_dir = dirname($ifile);
- mkpath $ifile_dir, 0777 unless(-e "$ifile_dir");
+ mkpath $ifile_dir, !$quiet unless(-e "$ifile_dir");
open(O, "> " . $ifile) || die "Could not open $ifile for writing (no write permission?)";
local $/;
binmode O;
@@ -500,7 +502,7 @@ sub symlinkFile
my ($file,$ifile) = @_;
if ($isunix) {
- print "symlink created for $file ";
+ print "symlink created for $file " unless $quiet;
if ( $force_relative && ($ifile =~ /^$basedir/)) {
my $t = getcwd();
my $c = -1;
@@ -508,9 +510,9 @@ sub symlinkFile
$t =~ s-^$basedir/--;
$p .= "../" while( ($c = index( $t, "/", $c + 1)) != -1 );
$file =~ s-^$basedir/-$p-;
- print " ($file)\n";
+ print " ($file)\n" unless $quiet;
}
- print "\n";
+ print "\n" unless $quiet;
return symlink($file, $ifile);
}
return copyFile($file, $ifile);
@@ -594,13 +596,13 @@ while ( @ARGV ) {
} elsif("$arg" eq "-show") {
$var = "showonly";
$val = "yes";
+ } elsif("$arg" eq "-quiet") {
+ $var = "quiet";
+ $val = "yes";
} elsif("$arg" eq "-base-dir") {
# skip, it's been dealt with at the top of the file
shift @ARGV;
next;
- } elsif("$arg" eq '*') {
- # workaround for windows 9x where "%*" expands to "*"
- $var = 1;
}
#do something
@@ -619,6 +621,12 @@ while ( @ARGV ) {
} elsif($showonly) {
$showonly--;
}
+ } elsif ("$var" eq "quiet") {
+ if("$val" eq "yes") {
+ $quiet++;
+ } elsif($quiet) {
+ $quiet--;
+ }
} elsif ("$var" eq "check-includes") {
if("$val" eq "yes") {
$check_includes++;
@@ -644,7 +652,7 @@ while ( @ARGV ) {
$force_relative--;
}
} elsif ("$var" eq "module") {
- print "module :$val:\n";
+ print "module :$val:\n" unless $quiet;
die "No such module: $val" unless(defined $modules{$val});
push @modules_to_sync, $val;
} elsif ("$var" eq "separate-module") {
@@ -672,7 +680,7 @@ while ( @ARGV ) {
$isunix = checkUnix; #cache checkUnix
# create path
-mkpath "$out_basedir/include", 0777;
+mkpath "$out_basedir/include", !$quiet;
my @ignore_headers = ();
my $class_lib_map_contents = "";
@@ -680,7 +688,7 @@ my @ignore_for_master_contents = ( "qt.h", "qpaintdevicedefs.h" );
my @ignore_for_include_check = ( "qatomic.h" );
my @ignore_for_qt_begin_header_check = ( "qiconset.h", "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qt_windows.h" );
my @ignore_for_qt_begin_namespace_check = ( "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qatomic_arch.h", "qatomic_windowsce.h", "qt_windows.h", "qatomic_macosx.h" );
-my @ignore_for_qt_module_check = ( "$modules{QtCore}/arch", "$modules{QtCore}/global", "$modules{QtSql}/drivers", "$modules{QtTest}", "$modules{QtAssistant}", "$modules{QtDesigner}", "$modules{QtUiTools}", "$modules{QtDBus}", "$modules{phonon}" );
+my @ignore_for_qt_module_check = ( "$modules{QtCore}/arch", "$modules{QtCore}/global", "$modules{QtSql}/drivers", "$modules{QtTest}", "$modules{QtDesigner}", "$modules{QtUiTools}", "$modules{QtDBus}", "$modules{phonon}" );
foreach (@modules_to_sync) {
#iteration info
@@ -875,7 +883,7 @@ foreach (@modules_to_sync) {
$pri_install_pfiles.= "$pri_install_iheader ";;
}
}
- print "header created for $iheader ($header_copies)\n" if($header_copies > 0);
+ print "header created for $iheader ($header_copies)\n" if($header_copies > 0 && !$quiet);
}
}
}
@@ -902,8 +910,8 @@ foreach (@modules_to_sync) {
}
if($master_include && $master_contents) {
my $master_dir = dirname($master_include);
- mkpath $master_dir, 0777;
- print "header (master) created for $lib\n";
+ mkpath $master_dir, !$quiet;
+ print "header (master) created for $lib\n" unless $quiet;
open MASTERINCLUDE, ">$master_include";
print MASTERINCLUDE "$master_contents";
close MASTERINCLUDE;
@@ -927,8 +935,8 @@ foreach (@modules_to_sync) {
}
if($headers_pri_file && $master_contents) {
my $headers_pri_dir = dirname($headers_pri_file);
- mkpath $headers_pri_dir, 0777;
- print "headers.pri file created for $lib\n";
+ mkpath $headers_pri_dir, !$quiet;
+ print "headers.pri file created for $lib\n" unless $quiet;
open HEADERS_PRI_FILE, ">$headers_pri_file";
print HEADERS_PRI_FILE "$headers_pri_contents";
close HEADERS_PRI_FILE;
@@ -948,7 +956,7 @@ unless($showonly || !$create_uic_class_map) {
}
if($class_lib_map) {
my $class_lib_map_dir = dirname($class_lib_map);
- mkpath $class_lib_map_dir, 0777;
+ mkpath $class_lib_map_dir, !$quiet;
open CLASS_LIB_MAP, ">$class_lib_map";
print CLASS_LIB_MAP "$class_lib_map_contents";
close CLASS_LIB_MAP;
diff --git a/config.tests/mac/corewlan/corewlan.pro b/config.tests/mac/corewlan/corewlan.pro
new file mode 100644
index 0000000000..8451af3e5b
--- /dev/null
+++ b/config.tests/mac/corewlan/corewlan.pro
@@ -0,0 +1,3 @@
+SOURCES = corewlantest.mm
+LIBS += -framework CoreWLAN -framework Foundation
+CONFIG -= app_bundle qt
diff --git a/config.tests/mac/corewlan/corewlantest.mm b/config.tests/mac/corewlan/corewlantest.mm
new file mode 100644
index 0000000000..3a29d84a02
--- /dev/null
+++ b/config.tests/mac/corewlan/corewlantest.mm
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <CoreWLAN/CoreWLAN.h>
+#include <CoreWLAN/CWInterface.h>
+
+int main()
+{
+ [CWInterface interfaceWithName:@"en2"];
+ return 0;
+}
diff --git a/config.tests/unix/fvisibility.test b/config.tests/unix/fvisibility.test
index b2bcc075ed..99e6fbe881 100755
--- a/config.tests/unix/fvisibility.test
+++ b/config.tests/unix/fvisibility.test
@@ -4,25 +4,41 @@ FVISIBILITY_SUPPORT=no
COMPILER=$1
VERBOSE=$2
+CMDLINE=
+
+
RunCompileTest() {
cat >>fvisibility.c << EOF
-__attribute__((visibility("default"))) void blah();
-#if !defined(__GNUC__)
-# error "Visiblility support requires GCC"
-#elif __GNUC__ < 4
-# error "GCC3 with backported visibility patch is known to miscompile Qt"
+#if defined(__GNUC__)
+# if (__GNUC__ < 4)
+# error "GCC3 with backported visibility patch is known to miscompile Qt"
+# endif
+__attribute((visibility("default"))) void blah();
+#elif defined(__SUNPRO_CC)
+# if (__SUNPRO_CC < 0x0550)
+# error "SunStudio 8 or later is required for ELF visibility"
+# endif
+__global void blah();
+#else
+# error "GCC4+ or SunStudio 8+ are required to support ELF visibility"
#endif
EOF
if [ "$VERBOSE" = "yes" ] ; then
- "$COMPILER" -c -fvisibility=hidden fvisibility.c && FVISIBILITY_SUPPORT=yes
+ "$COMPILER" -c $CMDLINE fvisibility.c && FVISIBILITY_SUPPORT=yes
else
- "$COMPILER" -c -fvisibility=hidden fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes
+ "$COMPILER" -c $CMDLINE fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes
fi
rm -f fvisibility.c fvisibility.o
}
+
case "$COMPILER" in
+gcc|g++)
+ CMDLINE="-fvisibility=hidden"
+ RunCompileTest
+ ;;
+
aCC*)
;;
@@ -34,14 +50,17 @@ icpc)
;;
*)
# the compile test works for the intel compiler because it mimics gcc's behavior
+ CMDLINE="-fvisibility=hidden"
RunCompileTest
;;
esac
;;
- *)
- RunCompileTest
- ;;
+CC)
+ # This should be SunStudio. If not, it'll get caught.
+ CMDLINE="-xldscope=hidden"
+ RunCompileTest
+ ;;
esac
# done
diff --git a/config.tests/unix/networkmanager/main.cpp b/config.tests/unix/networkmanager/main.cpp
new file mode 100644
index 0000000000..7b91ae0372
--- /dev/null
+++ b/config.tests/unix/networkmanager/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** 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 config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#if defined(QT_NO_DBUS)
+#error Qt is not configured with DBus support.
+#endif
+
+#include <NetworkManager/NetworkManager.h>
+
+int main(int argc, char** argv)
+{
+ return 0;
+}
diff --git a/config.tests/unix/networkmanager/networkmanager.pro b/config.tests/unix/networkmanager/networkmanager.pro
new file mode 100644
index 0000000000..c41204f49f
--- /dev/null
+++ b/config.tests/unix/networkmanager/networkmanager.pro
@@ -0,0 +1,3 @@
+SOURCES = main.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/opengles1cl/opengles1cl.cpp b/config.tests/unix/opengles1cl/opengles1cl.cpp
deleted file mode 100644
index 4f27c75694..0000000000
--- a/config.tests/unix/opengles1cl/opengles1cl.cpp
+++ /dev/null
@@ -1,51 +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 config.tests of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <GLES/gl.h>
-
-int main(int, char **)
-{
- GLfixed a = 0;
- glColor4x(a, a, a, a);
- glClear(GL_COLOR_BUFFER_BIT);
-
- return 0;
-}
diff --git a/config.tests/unix/opengles1cl/opengles1cl.pro b/config.tests/unix/opengles1cl/opengles1cl.pro
deleted file mode 100644
index c4c069e4e1..0000000000
--- a/config.tests/unix/opengles1cl/opengles1cl.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-SOURCES = opengles1cl.cpp
-INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES1CL
-
-for(p, QMAKE_LIBDIR_OPENGL_ES1CL) {
- exists($$p):LIBS += -L$$p
-}
-
-CONFIG -= qt
-LIBS += $$QMAKE_LIBS_OPENGL_ES1CL
diff --git a/config.tests/unix/pulseaudio/pulseaudio.pro b/config.tests/unix/pulseaudio/pulseaudio.pro
new file mode 100644
index 0000000000..698a35f0d7
--- /dev/null
+++ b/config.tests/unix/pulseaudio/pulseaudio.pro
@@ -0,0 +1,4 @@
+SOURCES = pulseaudiotest.cpp
+LIBS+=-lpulse
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/pulseaudio/pulseaudiotest.cpp b/config.tests/unix/pulseaudio/pulseaudiotest.cpp
new file mode 100644
index 0000000000..eed88da7cb
--- /dev/null
+++ b/config.tests/unix/pulseaudio/pulseaudiotest.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <pulse/pulseaudio.h>
+
+int main(int ,char **)
+{
+ pa_threaded_mainloop *mainloop = pa_threaded_mainloop_new();
+ return 0;
+}
+
diff --git a/config.tests/x11/xvideo/xvideo.cpp b/config.tests/x11/xvideo/xvideo.cpp
new file mode 100644
index 0000000000..515dc00343
--- /dev/null
+++ b/config.tests/x11/xvideo/xvideo.cpp
@@ -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 FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <X11/Xlib.h>
+#include <X11/extensions/Xv.h>
+#include <X11/extensions/Xvlib.h>
+
+int main(int argc, char** argv)
+{
+ unsigned int count = 0;
+ XvAdaptorInfo *adaptors = 0;
+ XvQueryAdaptors(0, 0, &count, &adaptors);
+ return 0;
+}
diff --git a/config.tests/x11/xvideo/xvideo.pro b/config.tests/x11/xvideo/xvideo.pro
new file mode 100644
index 0000000000..d4c63a0158
--- /dev/null
+++ b/config.tests/x11/xvideo/xvideo.pro
@@ -0,0 +1,4 @@
+CONFIG += x11
+CONFIG -= qt
+SOURCES = xvideo.cpp
+LIBS += -lXv
diff --git a/configure b/configure
index 9a3ee32bd0..60bcc677c2 100755
--- a/configure
+++ b/configure
@@ -640,6 +640,7 @@ CFG_SHARED=yes
CFG_SM=auto
CFG_XSHAPE=auto
CFG_XSYNC=auto
+CFG_XVIDEO=auto
CFG_XINERAMA=runtime
CFG_XFIXES=runtime
CFG_ZLIB=auto
@@ -676,6 +677,7 @@ CFG_RELEASE_QMAKE=no
CFG_PHONON=auto
CFG_PHONON_BACKEND=yes
CFG_MULTIMEDIA=yes
+CFG_MEDIASERVICE=yes
CFG_AUDIO_BACKEND=yes
CFG_SVG=yes
CFG_DECLARATIVE=auto
@@ -759,9 +761,9 @@ CFG_MAC_ARCHS=
MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
CFG_MAC_DWARF2=auto
CFG_MAC_XARCH=auto
-CFG_MAC_CARBON=yes
-CFG_MAC_COCOA=auto
-COMMANDLINE_MAC_COCOA=no
+CFG_MAC_CARBON=no
+CFG_MAC_COCOA=yes
+COMMANDLINE_MAC_CARBON=no
CFG_SXE=no
CFG_PREFIX_INSTALL=yes
CFG_SDK=
@@ -782,6 +784,9 @@ OPT_HELP=
CFG_SILENT=no
CFG_GRAPHICS_SYSTEM=default
CFG_ALSA=auto
+CFG_PULSEAUDIO=auto
+CFG_NETWORKMANAGER=auto
+CFG_COREWLAN=auto
# initalize variables used for installation
QT_INSTALL_PREFIX=
@@ -790,6 +795,7 @@ QT_INSTALL_HEADERS=
QT_INSTALL_LIBS=
QT_INSTALL_BINS=
QT_INSTALL_PLUGINS=
+QT_INSTALL_IMPORTS=
QT_INSTALL_DATA=
QT_INSTALL_TRANSLATIONS=
QT_INSTALL_SETTINGS=
@@ -921,7 +927,8 @@ while [ "$#" -gt 0 ]; do
VAL=no
;;
#Qt style yes options
- -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config)
+
+ -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xvideo|-xsync|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-mediaservice|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
VAL=yes
;;
@@ -1138,6 +1145,9 @@ while [ "$#" -gt 0 ]; do
plugindir)
QT_INSTALL_PLUGINS="$VAL"
;;
+ importdir)
+ QT_INSTALL_IMPORTS="$VAL"
+ ;;
datadir)
QT_INSTALL_DATA="$VAL"
;;
@@ -1225,7 +1235,7 @@ while [ "$#" -gt 0 ]; do
opengl)
if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
[ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
- [ "$VAL" = "es1cl" ] || [ "$VAL" = "es1" ] || [ "$VAL" = "es2" ]; then
+ [ "$VAL" = "es1" ] || [ "$VAL" = "es2" ]; then
CFG_OPENGL="$VAL"
else
UNKNOWN_OPT=yes
@@ -1321,13 +1331,17 @@ while [ "$#" -gt 0 ]; do
fi
;;
cocoa)
+# do nothing - Cocoa is the default.
+ ;;
+ carbon)
if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
- CFG_MAC_COCOA="$VAL"
- COMMANDLINE_MAC_COCOA="$VAL"
+ CFG_MAC_CARBON="$VAL"
+ COMMANDLINE_MAC_CARBON="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
+
framework)
if [ "$PLATFORM_MAC" = "yes" ]; then
CFG_FRAMEWORK="$VAL"
@@ -1529,6 +1543,13 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
+ xvideo)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_XVIDEO="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
xsync)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_XSYNC="$VAL"
@@ -2095,6 +2116,13 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
+ mediaservice)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_MEDIASERVICE="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
audio-backend)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_AUDIO_BACKEND="$VAL"
@@ -2384,7 +2412,9 @@ if [ "$CFG_EMBEDDED" != "no" ]; then
fi
;;
CYGWIN*:*)
- CFG_EMBEDDED=x86
+ if [ -z "$XPLATFORM" ]; then
+ CFG_EMBEDDED=x86
+ fi
;;
*)
echo "Qt for Embedded Linux is not supported on this platform. Disabling."
@@ -2946,7 +2976,7 @@ else
fi
QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
-TEST_COMPILER="$CC"
+TEST_COMPILER="$CXX"
[ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
if [ -z "$TEST_COMPILER" ]; then
echo "ERROR: Cannot set the compiler for the configuration tests"
@@ -3179,6 +3209,17 @@ if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
fi
QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
+#imports
+if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
+ if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
+ fi
+ fi
+ [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
+fi
+QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
+
#data
if [ -z "$QT_INSTALL_DATA" ]; then #default
QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
@@ -3297,7 +3338,8 @@ Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir
[-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
[-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
[-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
- [-no-audio-backend] [-audio-backend] [-no-openssl] [-openssl] [-openssl-linked]
+ [-no-mediaservice] [-mediaservice] [-no-audio-backend] [-audio-backend]
+ [-no-openssl] [-openssl] [-openssl-linked]
[-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-javascript-jit] [-javascript-jit]
[-no-script] [-script] [-no-scripttools] [-scripttools] [-no-declarative] [-declarative]
@@ -3341,6 +3383,8 @@ cat <<EOF
(default PREFIX/include)
-plugindir <dir> ...... Plugins will be installed to <dir>
(default PREFIX/plugins)
+ -importdir <dir> ...... Imports for QML will be installed to <dir>
+ (default PREFIX/imports)
-datadir <dir> ........ Data used by Qt programs will be installed to <dir>
(default PREFIX)
-translationdir <dir> . Translations of Qt programs will be installed to <dir>
@@ -3435,6 +3479,9 @@ fi
-no-multimedia ..... Do not build the QtMultimedia module.
+ -multimedia ........ Build the QtMultimedia module.
+ -no-mediaservice.... Do not build platform mediaservice plugin.
+ + -mediaservice ...... Build the platform mediaservice plugin.
+
-no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
+ -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
@@ -3620,6 +3667,13 @@ if [ "$PLATFORM_X11" = "yes" ]; then
SHY="*"
SHN=" "
fi
+ if [ "$CFG_XVIDEO" = "no" ]; then
+ XVY=" "
+ XVN="*"
+ else
+ XVY="*"
+ XVN=" "
+ fi
if [ "$CFG_XINERAMA" = "no" ]; then
XAY=" "
XAN="*"
@@ -3705,11 +3759,11 @@ Qt/X11 only:
+ -opengl <api> ...... Enable OpenGL support.
With no parameter, this will auto-detect the "best"
OpenGL API to use. If desktop OpenGL is available, it
- will be used. Use desktop, es1, es1cl or es2 for <api>
+ will be used. Use desktop, es1, or es2 for <api>
to force the use of the Desktop (OpenGL 1.x or 2.x),
- OpenGL ES 1.x Common profile, 1.x Common Lite profile
- or 2.x APIs instead. On X11, the EGL API will be used
- to manage GL contexts in the case of OpenGL ES
+ OpenGL ES 1.x Common profile, or 2.x APIs instead.
+ On X11, the EGL API will be used to manage GL
+ contexts in the case of OpenGL ES
-no-openvg ........ Do not support OpenVG.
+ -openvg ........... Enable OpenVG support.
@@ -3723,6 +3777,10 @@ Qt/X11 only:
$SHY -xshape ............ Compile XShape support.
Requires X11/extensions/shape.h.
+ $XVN -no-xvideo ......... Do not compile XVideo support.
+ $XVY -xvideo ............ Compile XVideo support.
+ Requires X11/extensions/Xv.h & Xvlib.h.
+
$SHN -no-xsync .......... Do not compile XSync support.
$SHY -xsync ............. Compile XSync support.
Requires X11/extensions/sync.h.
@@ -3784,10 +3842,11 @@ Qt/Mac only:
-Fstring ........... Add an explicit framework path.
-fw string ......... Add an explicit framework.
- -cocoa ............. Build the Cocoa version of Qt. Note that -no-framework
- and -static is not supported with -cocoa. Specifying
- this option creates Qt binaries that requires Mac OS X
- 10.5 or higher.
+ -cocoa ............. [Deprecated] Cocoa is now enabled by default.
+
+ -carbon .............Build the Carbon version of Qt. 64-bit archs
+ are not supported by carbon and will be built
+ with cocoa
* -framework ......... Build Qt as a series of frameworks and
link tools against those frameworks.
@@ -3800,8 +3859,7 @@ Qt/Mac only:
-arch <arch> ....... Build Qt for <arch>
Example values for <arch>: x86 ppc x86_64 ppc64
- Multiple -arch arguments can be specified, 64-bit archs
- will be built with the Cocoa framework.
+ Multiple -arch arguments can be specified.
-sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
@@ -3863,7 +3921,7 @@ Qt for Embedded Linux only:
-no-opengl .......... Do not support OpenGL.
-opengl <api> ....... Enable OpenGL ES support
With no parameter, this will attempt to auto-detect OpenGL ES 1.x
- or 2.x. Use es1, es1cl or es2 for <api> to override auto-detection.
+ or 2.x. Use es1 or es2 for <api> to override auto-detection.
NOTE: A QGLScreen driver for the hardware is required to support
OpenGL ES on Qt for Embedded Linux.
@@ -4136,6 +4194,7 @@ HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_IN
LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
+IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
@@ -4160,6 +4219,7 @@ if [ ! -z "$QT_HOST_PREFIX" ]; then
HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
+ HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
@@ -4176,6 +4236,7 @@ static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_
static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
+static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
@@ -4193,6 +4254,7 @@ static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH
static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
+static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
@@ -4217,6 +4279,7 @@ cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
#define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
#define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
#define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
+#define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
#define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
#define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
#define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
@@ -4260,7 +4323,7 @@ if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
[ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
if [ "$OPT_SHADOW" = "yes" ]; then
"$outpath/bin/syncqt" $SYNCQT_OPTS
- elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ]; then
+ elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then
QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS
fi
fi
@@ -4968,7 +5031,7 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
CFG_EGL=yes
CFG_EGL_GLES_INCLUDES=yes
fi
- if ( [ "$CFG_OPENGL" = "es1" ] || [ "$CFG_OPENGL" = "es1cl" ] || [ "$CFG_OPENGL" = "es2" ] ) && [ "$CFG_EGL" != "yes" ]; then
+ if ( [ "$CFG_OPENGL" = "es1" ] || [ "$CFG_OPENGL" = "es2" ] ) && [ "$CFG_EGL" != "yes" ]; then
echo "The EGL functionality test failed!"
echo " EGL is required for OpenGL ES to manage contexts & surfaces."
echo " You might need to modify the include and library search paths by editing"
@@ -5001,32 +5064,33 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
fi
fi
- if [ "$CFG_PHONON" != "no" ]; then
- if [ "$CFG_PHONON_BACKEND" != "no" ]; then
- if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
- if [ -n "$PKG_CONFIG" ]; then
- QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
- QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
- fi
- if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/gstreamer "GStreamer" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GSTREAMER $QT_LIBS_GSTREAMER $X11TESTS_FLAGS; then
- CFG_GSTREAMER=yes
- QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
- QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
- else
- if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "Gstreamer support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_GSTREAMER=no
- fi
- fi
- elif [ "$CFG_GLIB" = "no" ]; then
+ # Auto-detect GStreamer support (needed for both Phonon & QtMultimedia)
+ if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
+ if [ -n "$PKG_CONFIG" ]; then
+ QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
+ QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
+ fi
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/gstreamer "GStreamer" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GSTREAMER $QT_LIBS_GSTREAMER $X11TESTS_FLAGS; then
+ CFG_GSTREAMER=yes
+ QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
+ QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
+ else
+ if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "Gstreamer support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
CFG_GSTREAMER=no
fi
+ fi
+ elif [ "$CFG_GLIB" = "no" ]; then
+ CFG_GSTREAMER=no
+ fi
+ if [ "$CFG_PHONON" != "no" ]; then
+ if [ "$CFG_PHONON_BACKEND" != "no" ]; then
if [ "$CFG_GSTREAMER" = "yes" ]; then
CFG_PHONON=yes
else
@@ -5068,7 +5132,7 @@ if [ "$PLATFORM_X11" = "yes" ]; then
exit 1
fi
- # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
+ # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es2 = OpenGL ES 2.x)
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
CFG_OPENGL=desktop
@@ -5076,8 +5140,6 @@ if [ "$PLATFORM_X11" = "yes" ]; then
CFG_OPENGL=es2
elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
CFG_OPENGL=es1
- elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1cl "OpenGL ES 1.x Lite" $L_FLAGS $I_FLAGS $l_FLAGS; then
- CFG_OPENGL=es1cl
else
if [ "$CFG_OPENGL" = "yes" ]; then
echo "All the OpenGL functionality tests failed!"
@@ -5101,16 +5163,6 @@ if [ "$PLATFORM_X11" = "yes" ]; then
*)
;;
esac
- elif [ "$CFG_OPENGL" = "es1cl" ]; then
- # OpenGL ES 1.x common lite
- "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1cl "OpenGL ES 1.x Lite" $L_FLAGS $I_FLAGS $l_FLAGS
- if [ $? != "0" ]; then
- echo "The OpenGL ES 1.x Common Lite Profile functionality test failed!"
- echo " You might need to modify the include and library search paths by editing"
- echo " QMAKE_INCDIR_OPENGL_ES1CL, QMAKE_LIBDIR_OPENGL_ES1CL and QMAKE_LIBS_OPENGL_ES1CL in"
- echo " ${XQMAKESPEC}."
- exit 1
- fi
elif [ "$CFG_OPENGL" = "es1" ]; then
# OpenGL ES 1.x
"$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
@@ -5312,6 +5364,23 @@ if [ "$PLATFORM_X11" = "yes" ]; then
fi
fi
+ # auto-detect XVideo support
+ if [ "$CFG_XVIDEO" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xvideo "XVideo" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ CFG_XVIDEO=yes
+ else
+ if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "XVideo support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_XVIDEO=no
+ fi
+ fi
+ fi
+
# auto-detect XSync support
if [ "$CFG_XSYNC" != "no" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xsync "XSync" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
@@ -5415,19 +5484,25 @@ if [ "$PLATFORM_MAC" = "yes" ]; then
# Always enable Phonon (unless it was explicitly disabled)
CFG_PHONON=yes
fi
+
+ if [ "$CFG_COREWLAN" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/corewlan "CoreWlan" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
+ CFG_COREWLAN=yes
+ else
+ CFG_COREWLAN=no
+ fi
+ fi
fi
# QWS
if [ "$PLATFORM_QWS" = "yes" ]; then
- # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
+ # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es2 = OpenGL ES 2.x)
if [ "$CFG_OPENGL" = "yes" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
CFG_OPENGL=es2
elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
CFG_OPENGL=es1
- elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1cl "OpenGL ES 1.x Lite" $L_FLAGS $I_FLAGS $l_FLAGS; then
- CFG_OPENGL=es1cl
else
echo "All the OpenGL ES functionality tests failed!"
echo " You might need to modify the include and library search paths by editing"
@@ -5871,16 +5946,19 @@ if [ "$CFG_ALSA" = "auto" ]; then
fi
fi
-if [ -f "$relpath/src/declarative/declarative.pro" ]; then
- if [ "$CFG_DECLARATIVE" = "auto" ]; then
- CFG_DECLARATIVE=yes
+if [ "$CFG_PULSEAUDIO" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pulseaudio "pulseaudio" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_PULSEAUDIO=yes
+ else
+ CFG_PULSEAUDIO=no
fi
-else
- if [ "$CFG_DECLARATIVE" = "auto" ] || [ "$CFG_DECLARATIVE" = "no" ]; then
- CFG_DECLARATIVE=no
+fi
+
+if [ "$CFG_NETWORKMANAGER" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/networkmanager "NetworkManager" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_NETWORKMANAGER=yes
else
- echo "Error: Unable to locate the qt-declarative package. Refer to the documentation on how to build the package."
- exit 1
+ CFG_NETWORKMANAGER=no
fi
fi
@@ -5942,14 +6020,14 @@ if [ "$CFG_MAC_DWARF2" = "yes" ]; then
QT_CONFIG="$QT_CONFIG dwarf2"
fi
-# Set the default arch.
-# Carbon builds: 32 bit x86/ppc.
-# For "-cocoa" builds on snow leopard : compiler default (64-bit).
-# For "-cocoa" builds on leopard : compiler default (32-bit).
+# Set the default arch if there are no "-arch" arguments on the configure line
+# For "-carbon" builds: 32 bit x86/ppc.
+# For builds on snow leopard : compiler default (64-bit).
+# For builds on leopard : compiler default (32-bit).
if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
- if [ "$CFG_MAC_COCOA" != "yes" ]; then
+ if [ "$CFG_MAC_CARBON" = "yes" ]; then
if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then
CFG_MAC_ARCHS=" x86"
elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then
@@ -5964,12 +6042,13 @@ if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
[ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
fi
-# enable cocoa and/or carbon on Mac
-if [ "$CFG_MAC_COCOA" = "yes" ]; then
-# -cocoa on the command line disables carbon completely (i.e. use cocoa for 32-bit as well)
- CFG_MAC_CARBON="no"
-else
-# check which archs are in use, enable cocoa if we find a 64-bit one
+# enable Cocoa and/or Carbon on Mac
+# -carbon on the command line disables Cocoa, except for 64-bit archs
+if [ "$CFG_MAC_CARBON" = "yes" ]; then
+ CFG_MAC_CARBON="YES"
+ CFG_MAC_COCOA="NO"
+
+# check which archs are in use, enable cocoa if we find a 64-bit one
if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
CFG_MAC_COCOA="yes";
CFG_MAC_CARBON="no";
@@ -5979,11 +6058,26 @@ else
if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
CFG_MAC_CARBON="yes";
fi
- else
-# no 64-bit archs found.
- CFG_MAC_COCOA="no"
fi
-fi;
+fi
+
+# select Carbon on 10.4 Tiger.
+if [ "$PLATFORM_MAC" = "yes" ]; then
+ VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
+ if [ "$VERSION" == 8 ]; then
+ CFG_MAC_COCOA="no";
+ CFG_MAC_CARBON="yes";
+ fi
+fi
+
+# select Carbon when using the 10.4u SDK
+if [ "$PLATFORM_MAC" = "yes" ]; then
+ if [ "TEST$CFG_SDK" = "TEST/Developer/SDKs/MacOSX10.4u.sdk/" ]; then
+ echo "Carbon on";
+ CFG_MAC_COCOA="no";
+ CFG_MAC_CARBON="yes";
+ fi
+fi
# set the global Mac deployment target. This is overridden on an arch-by-arch basis
# in some cases, see code further down
@@ -6061,7 +6155,7 @@ else
QT_CONFIG="$QT_CONFIG opengl"
fi
-if [ "$CFG_OPENGL" = "es1" ] || [ "$CFG_OPENGL" = "es1cl" ] || [ "$CFG_OPENGL" = "es2" ]; then
+if [ "$CFG_OPENGL" = "es1" ] || [ "$CFG_OPENGL" = "es2" ]; then
if [ "$PLATFORM_QWS" = "yes" ]; then
QCONFIG_FLAGS="$QCONFIG_FLAGS Q_BACKINGSTORE_SUBSURFACES"
QCONFIG_FLAGS="$QCONFIG_FLAGS Q_USE_EGLWINDOWSURFACE"
@@ -6074,11 +6168,6 @@ if [ "$CFG_OPENGL" = "es1" ]; then
QT_CONFIG="$QT_CONFIG opengles1"
fi
-if [ "$CFG_OPENGL" = "es1cl" ]; then
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_1_CL"
- QT_CONFIG="$QT_CONFIG opengles1cl"
-fi
-
if [ "$CFG_OPENGL" = "es2" ]; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
QT_CONFIG="$QT_CONFIG opengles2"
@@ -6222,7 +6311,7 @@ else
QT_CONFIG="$QT_CONFIG freetype"
fi
-if [ "x$PLATFORM_MAC" = "xyes" ]; then
+if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM" != "win32-g++" ]; then
#On Mac we implicitly link against libz, so we
#never use the 3rdparty stuff.
[ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
@@ -6253,6 +6342,9 @@ if [ "$PLATFORM_X11" = "yes" ]; then
if [ "$CFG_XSHAPE" = "yes" ]; then
QT_CONFIG="$QT_CONFIG xshape"
fi
+ if [ "$CFG_XVIDEO" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG xvideo"
+ fi
if [ "$CFG_XSYNC" = "yes" ]; then
QT_CONFIG="$QT_CONFIG xsync"
fi
@@ -6352,6 +6444,18 @@ if [ "$CFG_ALSA" = "yes" ]; then
QT_CONFIG="$QT_CONFIG alsa"
fi
+if [ "$CFG_PULSEAUDIO" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG pulseaudio"
+fi
+
+if [ "$CFG_NETWORKMANAGER" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG networkmanager"
+fi
+
+if [ "$CFG_COREWLAN" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG corewlan"
+fi
+
#
# Some Qt modules are too advanced in C++ for some old compilers
# Detect here the platforms where they are known to work.
@@ -6497,6 +6601,9 @@ if [ "$CFG_MULTIMEDIA" = "no" ]; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
else
QT_CONFIG="$QT_CONFIG multimedia"
+ if [ "$CFG_MEDIASERVICE" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG mediaservice"
+ fi
fi
if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
@@ -6509,12 +6616,6 @@ else
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
fi
-if [ "$CFG_DECLARATIVE" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG declarative"
-else
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
-fi
-
if [ "$CFG_WEBKIT" = "auto" ]; then
CFG_WEBKIT="$canBuildWebKit"
fi
@@ -6554,6 +6655,27 @@ else
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
fi
+
+if [ "$CFG_DECLARATIVE" = "yes" ]; then
+ if [ "$CFG_SCRIPT" = "no" ]; then
+ echo "Error: QtDeclarative was requested, but it can't be built due to QtScript being disabled."
+ exit 1
+ fi
+fi
+if [ "$CFG_DECLARATIVE" = "auto" ]; then
+ if [ "$CFG_SCRIPT" = "no" ]; then
+ CFG_DECLARATIVE=no
+ else
+ CFG_DECLARATIVE=yes
+ fi
+fi
+
+if [ "$CFG_DECLARATIVE" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG declarative"
+else
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
+fi
+
if [ "$CFG_EXCEPTIONS" = "no" ]; then
case "$COMPILER" in
g++*)
@@ -6579,9 +6701,8 @@ fi
# On Mac, set the minimum deployment target for the different architechtures
# using the Xarch compiler option when supported (10.5 and up). On 10.4 the
# deployment version is set to 10.4 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET
-# env. variable. "-cocoa" on the command line means Cocoa is used in 32-bit mode also,
-# in this case fall back on QMAKE_MACOSX_DEPLOYMENT_TARGET which will be set to 10.5.
-if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] && [ "$COMMANDLINE_MAC_COCOA" != "yes" ]; then
+# env. variable.
+if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
@@ -6901,9 +7022,9 @@ if [ "$CFG_LARGEFILE" = "yes" ]; then
fi
# if both carbon and cocoa are specified, enable the autodetection code.
-if [ "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
- echo "#define AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
-elif [ "$CFG_MAC_COCOA" = "yes" ]; then
+if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
+ echo "#define QT_AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
+elif [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
fi
@@ -7047,6 +7168,7 @@ fi
[ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
[ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
[ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
+[ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO"
[ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
[ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
@@ -7056,6 +7178,9 @@ fi
[ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
[ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
[ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
+[ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
+[ "$CFG_NETWORKMANAGER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NETWORKMANAGER"
+[ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
# sort QCONFIG_FLAGS for neatness if we can
[ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
@@ -7391,164 +7516,163 @@ fi
if [ "$OPT_VERBOSE" = "yes" ]; then
if echo '\c' | grep '\c' >/dev/null; then
- echo -n "qmake vars .......... "
+ echo -n "qmake vars ............. "
else
- echo "qmake vars .......... \c"
+ echo "qmake vars ............. \c"
fi
cat "$QMAKE_VARS_FILE" | tr '\n' ' '
- echo "qmake switches ...... $QMAKE_SWITCHES"
+ echo "qmake switches ......... $QMAKE_SWITCHES"
fi
-[ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ......... $INCREMENTAL"
-echo "Build ............... $CFG_BUILD_PARTS"
-echo "Configuration ....... $QMAKE_CONFIG $QT_CONFIG"
+[ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ............ $INCREMENTAL"
+echo "Build .................. $CFG_BUILD_PARTS"
+echo "Configuration .......... $QMAKE_CONFIG $QT_CONFIG"
if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
- echo "Debug ............... yes (combined)"
+ echo "Debug .................. yes (combined)"
if [ "$CFG_DEBUG" = "yes" ]; then
- echo "Default Link ........ debug"
+ echo "Default Link ........... debug"
else
- echo "Default Link ........ release"
+ echo "Default Link ........... release"
fi
else
- echo "Debug ............... $CFG_DEBUG"
-fi
-echo "Qt 3 compatibility .. $CFG_QT3SUPPORT"
-[ "$CFG_DBUS" = "no" ] && echo "QtDBus module ....... no"
-[ "$CFG_DBUS" = "yes" ] && echo "QtDBus module ....... yes (run-time)"
-[ "$CFG_DBUS" = "linked" ] && echo "QtDBus module ....... yes (linked)"
-echo "QtConcurrent code.... $CFG_CONCURRENT"
-echo "QtScript module ..... $CFG_SCRIPT"
-echo "QtScriptTools module $CFG_SCRIPTTOOLS"
-echo "QtXmlPatterns module $CFG_XMLPATTERNS"
-echo "Phonon module ....... $CFG_PHONON"
-echo "Multimedia module ... $CFG_MULTIMEDIA"
-echo "SVG module .......... $CFG_SVG"
-echo "WebKit module ....... $CFG_WEBKIT"
+ echo "Debug .................. $CFG_DEBUG"
+fi
+echo "Qt 3 compatibility ..... $CFG_QT3SUPPORT"
+[ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no"
+[ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)"
+[ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)"
+echo "QtConcurrent code ...... $CFG_CONCURRENT"
+echo "QtScript module ........ $CFG_SCRIPT"
+echo "QtScriptTools module ... $CFG_SCRIPTTOOLS"
+echo "QtXmlPatterns module ... $CFG_XMLPATTERNS"
+echo "Phonon module .......... $CFG_PHONON"
+echo "Multimedia module ...... $CFG_MULTIMEDIA"
+echo "SVG module ............. $CFG_SVG"
+echo "WebKit module .......... $CFG_WEBKIT"
if [ "$CFG_WEBKIT" = "yes" ]; then
if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
- echo "JavaScriptCore JIT .. To be decided by JavaScriptCore"
+ echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
else
- echo "JavaScriptCore JIT .. $CFG_JAVASCRIPTCORE_JIT"
+ echo "JavaScriptCore JIT ..... $CFG_JAVASCRIPTCORE_JIT"
fi
fi
-echo "Declarative module .. $CFG_DECLARATIVE"
-echo "STL support ......... $CFG_STL"
-echo "PCH support ......... $CFG_PRECOMPILE"
-echo "MMX/3DNOW/SSE/SSE2.. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
+echo "Declarative module ..... $CFG_DECLARATIVE"
+echo "STL support ............ $CFG_STL"
+echo "PCH support ............ $CFG_PRECOMPILE"
+echo "MMX/3DNOW/SSE/SSE2 ..... ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
- echo "iWMMXt support ...... ${CFG_IWMMXT}"
- echo "NEON support ........ ${CFG_NEON}"
-fi
-[ "${PLATFORM_QWS}" != "yes" ] && echo "Graphics System ..... $CFG_GRAPHICS_SYSTEM"
-echo "IPv6 support ........ $CFG_IPV6"
-echo "IPv6 ifname support . $CFG_IPV6IFNAME"
-echo "getaddrinfo support . $CFG_GETADDRINFO"
-echo "getifaddrs support .. $CFG_GETIFADDRS"
-echo "Accessibility ....... $CFG_ACCESSIBILITY"
-echo "NIS support ......... $CFG_NIS"
-echo "CUPS support ........ $CFG_CUPS"
-echo "Iconv support ....... $CFG_ICONV"
-echo "Glib support ........ $CFG_GLIB"
-echo "GStreamer support ... $CFG_GSTREAMER"
-echo "Large File support .. $CFG_LARGEFILE"
-echo "GIF support ......... $CFG_GIF"
+ echo "iWMMXt support ......... ${CFG_IWMMXT}"
+ echo "NEON support ........... ${CFG_NEON}"
+fi
+[ "${PLATFORM_QWS}" != "yes" ] && echo "Graphics System ........ $CFG_GRAPHICS_SYSTEM"
+echo "IPv6 support ........... $CFG_IPV6"
+echo "IPv6 ifname support .... $CFG_IPV6IFNAME"
+echo "getaddrinfo support .... $CFG_GETADDRINFO"
+echo "getifaddrs support ..... $CFG_GETIFADDRS"
+echo "Accessibility .......... $CFG_ACCESSIBILITY"
+echo "NIS support ............ $CFG_NIS"
+echo "CUPS support ........... $CFG_CUPS"
+echo "Iconv support .......... $CFG_ICONV"
+echo "Glib support ........... $CFG_GLIB"
+echo "GStreamer support ...... $CFG_GSTREAMER"
+echo "Large File support ..... $CFG_LARGEFILE"
+echo "GIF support ............ $CFG_GIF"
if [ "$CFG_TIFF" = "no" ]; then
- echo "TIFF support ........ $CFG_TIFF"
+ echo "TIFF support ........... $CFG_TIFF"
else
- echo "TIFF support ........ $CFG_TIFF ($CFG_LIBTIFF)"
+ echo "TIFF support ........... $CFG_TIFF ($CFG_LIBTIFF)"
fi
if [ "$CFG_JPEG" = "no" ]; then
- echo "JPEG support ........ $CFG_JPEG"
+ echo "JPEG support ........... $CFG_JPEG"
else
- echo "JPEG support ........ $CFG_JPEG ($CFG_LIBJPEG)"
+ echo "JPEG support ........... $CFG_JPEG ($CFG_LIBJPEG)"
fi
if [ "$CFG_PNG" = "no" ]; then
- echo "PNG support ......... $CFG_PNG"
+ echo "PNG support ............ $CFG_PNG"
else
- echo "PNG support ......... $CFG_PNG ($CFG_LIBPNG)"
+ echo "PNG support ............ $CFG_PNG ($CFG_LIBPNG)"
fi
if [ "$CFG_MNG" = "no" ]; then
- echo "MNG support ......... $CFG_MNG"
+ echo "MNG support ............ $CFG_MNG"
else
- echo "MNG support ......... $CFG_MNG ($CFG_LIBMNG)"
+ echo "MNG support ............ $CFG_MNG ($CFG_LIBMNG)"
fi
-echo "zlib support ........ $CFG_ZLIB"
-echo "Session management .. $CFG_SM"
+echo "zlib support ........... $CFG_ZLIB"
+echo "Session management ..... $CFG_SM"
if [ "$PLATFORM_QWS" = "yes" ]; then
- echo "Embedded support .... $CFG_EMBEDDED"
+ echo "Embedded support ....... $CFG_EMBEDDED"
if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
- echo "Freetype2 support ... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
+ echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
else
- echo "Freetype2 support ... $CFG_QWS_FREETYPE"
+ echo "Freetype2 support ...... $CFG_QWS_FREETYPE"
fi
# Normalize the decoration output first
CFG_GFX_ON=`echo ${CFG_GFX_ON}`
CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
- echo "Graphics (qt) ....... ${CFG_GFX_ON}"
- echo "Graphics (plugin) ... ${CFG_GFX_PLUGIN}"
+ echo "Graphics (qt) .......... ${CFG_GFX_ON}"
+ echo "Graphics (plugin) ...... ${CFG_GFX_PLUGIN}"
CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
- echo "Decorations (qt) .... $CFG_DECORATION_ON"
- echo "Decorations (plugin) $CFG_DECORATION_PLUGIN"
+ echo "Decorations (qt) ....... $CFG_DECORATION_ON"
+ echo "Decorations (plugin) ... $CFG_DECORATION_PLUGIN"
CFG_KBD_ON=`echo ${CFG_KBD_ON}`
CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
- echo "Keyboard driver (qt). ${CFG_KBD_ON}"
- echo "Keyboard driver (plugin) ${CFG_KBD_PLUGIN}"
+ echo "Keyboard driver (qt) ... ${CFG_KBD_ON}"
+ echo "Keyboard driver (plugin) .. ${CFG_KBD_PLUGIN}"
CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
- echo "Mouse driver (qt) ... $CFG_MOUSE_ON"
- echo "Mouse driver (plugin) $CFG_MOUSE_PLUGIN"
+ echo "Mouse driver (qt) ...... $CFG_MOUSE_ON"
+ echo "Mouse driver (plugin) .. $CFG_MOUSE_PLUGIN"
fi
if [ "$CFG_OPENGL" = "desktop" ]; then
- echo "OpenGL support ...... yes (Desktop OpenGL)"
+ echo "OpenGL support ......... yes (Desktop OpenGL)"
elif [ "$CFG_OPENGL" = "es1" ]; then
- echo "OpenGL support ...... yes (OpenGL ES 1.x Common profile)"
-elif [ "$CFG_OPENGL" = "es1cl" ]; then
- echo "OpenGL support ...... yes (OpenGL ES 1.x Common Lite profile)"
+ echo "OpenGL support ......... yes (OpenGL ES 1.x Common profile)"
elif [ "$CFG_OPENGL" = "es2" ]; then
- echo "OpenGL support ...... yes (OpenGL ES 2.x)"
+ echo "OpenGL support ......... yes (OpenGL ES 2.x)"
else
- echo "OpenGL support ...... no"
+ echo "OpenGL support ......... no"
fi
if [ "$CFG_EGL" != "no" ]; then
if [ "$CFG_EGL_GLES_INCLUDES" != "no" ]; then
- echo "EGL support ......... yes <GLES/egl.h>"
+ echo "EGL support ............ yes <GLES/egl.h>"
else
- echo "EGL support ......... yes <EGL/egl.h>"
+ echo "EGL support ............ yes <EGL/egl.h>"
fi
fi
if [ "$CFG_OPENVG" ]; then
if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
- echo "OpenVG support ...... ShivaVG"
+ echo "OpenVG support ......... ShivaVG"
else
- echo "OpenVG support ...... $CFG_OPENVG"
+ echo "OpenVG support ......... $CFG_OPENVG"
fi
fi
if [ "$PLATFORM_X11" = "yes" ]; then
- echo "NAS sound support ... $CFG_NAS"
- echo "XShape support ...... $CFG_XSHAPE"
- echo "XSync support ....... $CFG_XSYNC"
- echo "Xinerama support .... $CFG_XINERAMA"
- echo "Xcursor support ..... $CFG_XCURSOR"
- echo "Xfixes support ...... $CFG_XFIXES"
- echo "Xrandr support ...... $CFG_XRANDR"
- echo "Xrender support ..... $CFG_XRENDER"
- echo "Xi support .......... $CFG_XINPUT"
- echo "MIT-SHM support ..... $CFG_MITSHM"
- echo "FontConfig support .. $CFG_FONTCONFIG"
- echo "XKB Support ......... $CFG_XKB"
- echo "immodule support .... $CFG_IM"
- echo "GTK theme support ... $CFG_QGTKSTYLE"
-fi
-[ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support ....... $CFG_SQL_mysql"
-[ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support .. $CFG_SQL_psql"
-[ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........ $CFG_SQL_odbc"
-[ "$CFG_SQL_oci" != "no" ] && echo "OCI support ......... $CFG_SQL_oci"
-[ "$CFG_SQL_tds" != "no" ] && echo "TDS support ......... $CFG_SQL_tds"
-[ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ......... $CFG_SQL_db2"
-[ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ... $CFG_SQL_ibase"
-[ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support .... $CFG_SQL_sqlite2"
-[ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ...... $CFG_SQL_sqlite ($CFG_SQLITE)"
+ echo "NAS sound support ...... $CFG_NAS"
+ echo "XShape support ......... $CFG_XSHAPE"
+ echo "XVideo support ......... $CFG_XVIDEO"
+ echo "XSync support .......... $CFG_XSYNC"
+ echo "Xinerama support ....... $CFG_XINERAMA"
+ echo "Xcursor support ........ $CFG_XCURSOR"
+ echo "Xfixes support ......... $CFG_XFIXES"
+ echo "Xrandr support ......... $CFG_XRANDR"
+ echo "Xrender support ........ $CFG_XRENDER"
+ echo "Xi support ............. $CFG_XINPUT"
+ echo "MIT-SHM support ........ $CFG_MITSHM"
+ echo "FontConfig support ..... $CFG_FONTCONFIG"
+ echo "XKB Support ............ $CFG_XKB"
+ echo "immodule support ....... $CFG_IM"
+ echo "GTK theme support ...... $CFG_QGTKSTYLE"
+fi
+[ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
+[ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
+[ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
+[ "$CFG_SQL_oci" != "no" ] && echo "OCI support ............ $CFG_SQL_oci"
+[ "$CFG_SQL_tds" != "no" ] && echo "TDS support ............ $CFG_SQL_tds"
+[ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ............ $CFG_SQL_db2"
+[ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ...... $CFG_SQL_ibase"
+[ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support ....... $CFG_SQL_sqlite2"
+[ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ......... $CFG_SQL_sqlite ($CFG_SQLITE)"
OPENSSL_LINKAGE=""
if [ "$CFG_OPENSSL" = "yes" ]; then
@@ -7556,11 +7680,16 @@ if [ "$CFG_OPENSSL" = "yes" ]; then
elif [ "$CFG_OPENSSL" = "linked" ]; then
OPENSSL_LINKAGE="(linked)"
fi
-echo "OpenSSL support ..... $CFG_OPENSSL $OPENSSL_LINKAGE"
-echo "Alsa support ........ $CFG_ALSA"
+echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
+echo "Alsa support ........... $CFG_ALSA"
+echo "Pulse Audio support .... $CFG_PULSEAUDIO"
+echo "NetworkManager support . $CFG_NETWORKMANAGER"
+if [ "$PLATFORM_MAC" = "yes" ]; then
+ echo "CoreWlan support ....... $CFG_COREWLAN"
+fi
echo
-[ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........ $CFG_PTMALLOC"
+[ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........... $CFG_PTMALLOC"
# complain about not being able to use dynamic plugins if we are using a static build
if [ "$CFG_SHARED" = "no" ]; then
@@ -7821,20 +7950,6 @@ done
rm -f .projects .projects.3
#-------------------------------------------------------------------------------
-# XShape is important, DnD in the Designer doens't work without it
-#-------------------------------------------------------------------------------
-if [ "$PLATFORM_X11" = "yes" ] && [ "$CFG_XSHAPE" = "no" ]; then
- cat <<EOF
-
- NOTICE: Qt will not be built with XShape support.
-
- As a result, drag-and-drop in the Qt Designer will NOT
- work. We recommend that you enable XShape support by passing
- the -xshape switch to $0.
-EOF
-fi
-
-#-------------------------------------------------------------------------------
# check for platforms that we don't yet know about
#-------------------------------------------------------------------------------
if [ "$CFG_ARCH" = "generic" ]; then
diff --git a/configure.exe b/configure.exe
index 3e518331fc..997423662d 100755
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/demos/browser/browsermainwindow.cpp b/demos/browser/browsermainwindow.cpp
index ed36c2538f..8c2ed893f1 100644
--- a/demos/browser/browsermainwindow.cpp
+++ b/demos/browser/browsermainwindow.cpp
@@ -433,10 +433,8 @@ void BrowserMainWindow::setupMenu()
QMenu *toolsMenu = menuBar()->addMenu(tr("&Tools"));
toolsMenu->addAction(tr("Web &Search"), this, SLOT(slotWebSearch()), QKeySequence(tr("Ctrl+K", "Web Search")));
-#ifndef Q_CC_MINGW
a = toolsMenu->addAction(tr("Enable Web &Inspector"), this, SLOT(slotToggleInspector(bool)));
a->setCheckable(true);
-#endif
QMenu *helpMenu = menuBar()->addMenu(tr("&Help"));
helpMenu->addAction(tr("About &Qt"), qApp, SLOT(aboutQt()));
diff --git a/demos/declarative/calculator/CalcButton.qml b/demos/declarative/calculator/CalcButton.qml
new file mode 100644
index 0000000000..6210e46088
--- /dev/null
+++ b/demos/declarative/calculator/CalcButton.qml
@@ -0,0 +1,41 @@
+import Qt 4.6
+
+Rectangle {
+ property alias operation: label.text
+ property bool toggable: false
+ property bool toggled: false
+ signal clicked
+
+ id: button; width: 50; height: 30
+ border.color: palette.mid; radius: 6
+ gradient: Gradient {
+ GradientStop { id: gradientStop1; position: 0.0; color: Qt.lighter(palette.button) }
+ GradientStop { id: gradientStop2; position: 1.0; color: palette.button }
+ }
+
+ Text { id: label; anchors.centerIn: parent; color: palette.buttonText }
+
+ MouseArea {
+ id: clickRegion
+ anchors.fill: parent
+ onClicked: {
+ doOp(operation);
+ button.clicked();
+ if (!button.toggable) return;
+ button.toggled ? button.toggled = false : button.toggled = true
+ }
+ }
+
+ states: [
+ State {
+ name: "Pressed"; when: clickRegion.pressed == true
+ PropertyChanges { target: gradientStop1; color: palette.dark }
+ PropertyChanges { target: gradientStop2; color: palette.button }
+ },
+ State {
+ name: "Toggled"; when: button.toggled == true
+ PropertyChanges { target: gradientStop1; color: palette.dark }
+ PropertyChanges { target: gradientStop2; color: palette.button }
+ }
+ ]
+}
diff --git a/demos/declarative/calculator/calculator.js b/demos/declarative/calculator/calculator.js
new file mode 100644
index 0000000000..cd6490a3a4
--- /dev/null
+++ b/demos/declarative/calculator/calculator.js
@@ -0,0 +1,87 @@
+
+var curVal = 0;
+var memory = 0;
+var lastOp = "";
+var timer = 0;
+
+function disabled(op) {
+ if (op == "." && curNum.text.toString().search(/\./) != -1) {
+ return true;
+ } else if (op == "Sqrt" && curNum.text.toString().search(/-/) != -1) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function doOp(op) {
+ if (disabled(op)) {
+ return;
+ }
+
+ if (op.toString().length==1 && ((op >= "0" && op <= "9") || op==".") ) {
+ if (curNum.text.toString().length >= 14)
+ return; // No arbitrary length numbers
+ if (lastOp.toString().length == 1 && ((lastOp >= "0" && lastOp <= "9") || lastOp==".") ) {
+ curNum.text = curNum.text + op.toString();
+ } else {
+ curNum.text = op;
+ }
+ lastOp = op;
+ return;
+ }
+ lastOp = op;
+
+ // Pending operations
+ if (currentOperation.text == "+") {
+ curNum.text = Number(curNum.text.valueOf()) + Number(curVal.valueOf());
+ } else if (currentOperation.text == "-") {
+ curNum.text = Number(curVal) - Number(curNum.text.valueOf());
+ } else if (currentOperation.text == "x") {
+ curNum.text = Number(curVal) * Number(curNum.text.valueOf());
+ } else if (currentOperation.text == "/") {
+ curNum.text = Number(Number(curVal) / Number(curNum.text.valueOf())).toString();
+ } else if (currentOperation.text == "=") {
+ }
+
+ if (op == "+" || op == "-" || op == "x" || op == "/") {
+ currentOperation.text = op;
+ curVal = curNum.text.valueOf();
+ return;
+ }
+ curVal = 0;
+ currentOperation.text = "";
+
+ // Immediate operations
+ if (op == "1/x") { // reciprocal
+ curNum.text = (1 / curNum.text.valueOf()).toString();
+ } else if (op == "^2") { // squared
+ curNum.text = (curNum.text.valueOf() * curNum.text.valueOf()).toString();
+ } else if (op == "Abs") {
+ curNum.text = (Math.abs(curNum.text.valueOf())).toString();
+ } else if (op == "Int") {
+ curNum.text = (Math.floor(curNum.text.valueOf())).toString();
+ } else if (op == "+/-") { // plus/minus
+ curNum.text = (curNum.text.valueOf() * -1).toString();
+ } else if (op == "Sqrt") { // square root
+ curNum.text = (Math.sqrt(curNum.text.valueOf())).toString();
+ } else if (op == "MC") { // memory clear
+ memory = 0;
+ } else if (op == "M+") { // memory increment
+ memory += curNum.text.valueOf();
+ } else if (op == "MR") { // memory recall
+ curNum.text = memory.toString();
+ } else if (op == "MS") { // memory set
+ memory = curNum.text.valueOf();
+ } else if (op == "Bksp") {
+ curNum.text = curNum.text.toString().slice(0, -1);
+ } else if (op == "C") {
+ curNum.text = "0";
+ } else if (op == "AC") {
+ curVal = 0;
+ memory = 0;
+ lastOp = "";
+ curNum.text ="0";
+ }
+}
+
diff --git a/demos/declarative/calculator/calculator.qml b/demos/declarative/calculator/calculator.qml
new file mode 100644
index 0000000000..66705e271c
--- /dev/null
+++ b/demos/declarative/calculator/calculator.qml
@@ -0,0 +1,124 @@
+import Qt 4.6
+
+Rectangle {
+ width: 320; height: 270; color: palette.window
+
+ SystemPalette { id: palette }
+ Script { source: "calculator.js" }
+
+ Column {
+ x: 2; spacing: 10;
+
+ Rectangle {
+ id: container
+ width: 316; height: 50
+ border.color: palette.dark; color: palette.base
+
+ Text {
+ id: curNum
+ font.bold: true; font.pointSize: 16
+ color: palette.text
+ anchors.right: container.right
+ anchors.rightMargin: 5
+ anchors.verticalCenter: container.verticalCenter
+ }
+
+ Text {
+ id: currentOperation
+ color: palette.text
+ font.bold: true; font.pointSize: 16
+ anchors.left: container.left
+ anchors.leftMargin: 5
+ anchors.verticalCenter: container.verticalCenter
+ }
+ }
+
+ Item {
+ width: 320; height: 30
+
+ CalcButton {
+ id: advancedCheckBox
+ x: 55; width: 206
+ operation: "Advanced Mode"
+ toggable: true
+ }
+ }
+
+ Item {
+ width: 320; height: 160
+
+ Item {
+ id: basicButtons
+ x: 55; width: 160; height: 160
+
+ CalcButton { operation: "Bksp"; id: bksp; width: 67; opacity: 0 }
+ CalcButton { operation: "C"; id: c; width: 76 }
+ CalcButton { operation: "AC"; id: ac; x: 78; width: 76 }
+
+ Grid {
+ id: numKeypad; y: 32; spacing: 2; columns: 3
+
+ CalcButton { operation: "7" }
+ CalcButton { operation: "8" }
+ CalcButton { operation: "9" }
+ CalcButton { operation: "4" }
+ CalcButton { operation: "5" }
+ CalcButton { operation: "6" }
+ CalcButton { operation: "1" }
+ CalcButton { operation: "2" }
+ CalcButton { operation: "3" }
+ }
+
+ Row {
+ y: 128; spacing: 2
+
+ CalcButton { operation: "0"; width: 50 }
+ CalcButton { operation: "."; x: 77; width: 50 }
+ CalcButton { operation: "="; id: equals; x: 77; width: 102 }
+ }
+
+ Column {
+ id: simpleOperations
+ x: 156; y: 0; spacing: 2
+
+ CalcButton { operation: "x" }
+ CalcButton { operation: "/" }
+ CalcButton { operation: "-" }
+ CalcButton { operation: "+" }
+ }
+ }
+
+ Grid {
+ id: advancedButtons
+ x: 350; spacing: 2; columns: 2; opacity: 0
+
+ CalcButton { operation: "Abs" }
+ CalcButton { operation: "Int" }
+ CalcButton { operation: "MC" }
+ CalcButton { operation: "Sqrt" }
+ CalcButton { operation: "MR" }
+ CalcButton { operation: "^2" }
+ CalcButton { operation: "MS" }
+ CalcButton { operation: "1/x" }
+ CalcButton { operation: "M+" }
+ CalcButton { operation: "+/-" }
+ }
+ }
+ }
+
+ states: State {
+ name: "Advanced"; when: advancedCheckBox.toggled == true
+ PropertyChanges { target: basicButtons; x: 0 }
+ PropertyChanges { target: simpleOperations; y: 32 }
+ PropertyChanges { target: bksp; opacity: 1 }
+ PropertyChanges { target: c; x: 69; width: 67 }
+ PropertyChanges { target: ac; x: 138; width: 67 }
+ PropertyChanges { target: equals; width: 50 }
+ PropertyChanges { target: advancedButtons; x: 210; opacity: 1 }
+ }
+
+ transitions: Transition {
+ NumberAnimation { properties: "x,y,width"; easing.type: "OutBounce"; duration: 500 }
+ NumberAnimation { properties: "opacity"; easing.type: "InOutQuad"; duration: 500 }
+ }
+}
diff --git a/demos/declarative/declarative.pro b/demos/declarative/declarative.pro
new file mode 100644
index 0000000000..4d169e3f67
--- /dev/null
+++ b/demos/declarative/declarative.pro
@@ -0,0 +1,17 @@
+TEMPLATE = subdirs
+
+# These demos contain C++ and need to be compiled
+SUBDIRS = \
+ minehunt
+
+# These examples contain no C++ and can simply be copied
+sources.files = \
+ calculator \
+ flickr \
+ samegame \
+ snake \
+ twitter \
+ webbrowser
+sources.path = $$[QT_INSTALL_DEMOS]/declarative
+INSTALLS += sources
+
diff --git a/demos/declarative/flickr/common/ImageDetails.qml b/demos/declarative/flickr/common/ImageDetails.qml
new file mode 100644
index 0000000000..862eeb192d
--- /dev/null
+++ b/demos/declarative/flickr/common/ImageDetails.qml
@@ -0,0 +1,160 @@
+import Qt 4.6
+import org.webkit 1.0
+
+Flipable {
+ id: container
+
+ property var frontContainer: containerFront
+ property string photoTitle: ""
+ property string photoDescription: ""
+ property string photoTags: ""
+ property int photoWidth
+ property int photoHeight
+ property string photoType
+ property string photoAuthor
+ property string photoDate
+ property string photoUrl
+ property int rating: 2
+ property var prevScale: 1.0
+
+ signal closed
+
+ transform: Rotation {
+ id: detailsRotation
+ origin.y: container.height / 2;
+ origin.x: container.width / 2;
+ axis.y: 1; axis.z: 0
+ }
+
+ front: Item {
+ id: containerFront; anchors.fill: container
+
+ Rectangle {
+ anchors.fill: parent
+ color: "black"; opacity: 0.4
+ border.color: "white"; border.width: 2
+ }
+
+ MediaButton {
+ id: backButton; x: 630; y: 370; text: "Back"
+ onClicked: { container.closed() }
+ }
+
+ MediaButton {
+ id: moreButton; x: 530; y: 370; text: "View..."
+ onClicked: { container.state='Back' }
+ }
+
+ Text { id: titleText; style: Text.Raised; styleColor: "black"; color: "white"; elide: Text.ElideRight
+ x: 220; y: 30; width: parent.width - 240; text: container.photoTitle; font.pointSize: 22 }
+
+ LikeOMeter { x: 40; y: 250; rating: container.rating }
+
+ Flickable { id: flickable; x: 220; width: 480; height: 210; y: 130; clip: true
+ contentWidth: 480; contentHeight: descriptionText.height
+
+ WebView { id: descriptionText; width: parent.width
+ html: "<style TYPE=\"text/css\">body {color: white;} a:link {color: cyan; text-decoration: underline; }</style>" + container.photoDescription }
+ }
+
+ Text { id: size; color: "white"; width: 300; x: 40; y: 300
+ text: "<b>Size:</b> " + container.photoWidth + 'x' + container.photoHeight }
+ Text { id: type; color: "white"; width: 300; x: 40; anchors.top: size.bottom
+ text: "<b>Type:</b> " + container.photoType }
+
+ Text { id: author; color: "white"; width: 300; x: 220; y: 80
+ text: "<b>Author:</b> " + container.photoAuthor }
+ Text { id: date; color: "white"; width: 300; x: 220; anchors.top: author.bottom
+ text: "<b>Published:</b> " + container.photoDate }
+ Text { id: tagsLabel; color: "white"; x: 220; anchors.top: date.bottom;
+ text: container.photoTags == "" ? "" : "<b>Tags:</b> " }
+ Text { id: tags; color: "white"; width: parent.width-x-20;
+ anchors.left: tagsLabel.right; anchors.top: date.bottom;
+ elide: Text.ElideRight; text: container.photoTags }
+
+ ScrollBar { id: scrollBar; x: 720; y: flickable.y; width: 7; height: flickable.height; opacity: 0;
+ flickableArea: flickable; clip: true }
+ }
+
+ back: Item {
+ anchors.fill: container
+
+ Rectangle { anchors.fill: parent; color: "black"; opacity: 0.4; border.color: "white"; border.width: 2 }
+
+ Progress { anchors.centerIn: parent; width: 200; height: 18; progress: bigImage.progress; visible: bigImage.status!=1 }
+ Flickable {
+ id: flick; width: container.width - 10; height: container.height - 10
+ x: 5; y: 5; clip: true;
+ contentWidth: imageContainer.width; contentHeight: imageContainer.height
+
+ Item {
+ id: imageContainer
+ width: Math.max(bigImage.width * bigImage.scale, flick.width);
+ height: Math.max(bigImage.height * bigImage.scale, flick.height);
+
+ Image {
+ id: bigImage; source: container.photoUrl; scale: slider.value
+ anchors.centerIn: parent;
+ smooth: !flick.moving
+ onStatusChanged : {
+ // Default scale shows the entire image.
+ if (status == 1 && width != 0) {
+ slider.minimum = Math.min(flick.width / width, flick.height / height);
+ prevScale = Math.min(slider.minimum, 1);
+ slider.value = prevScale;
+ }
+ }
+ }
+ }
+ }
+
+ MediaButton {
+ id: backButton2; x: 630; y: 370; text: "Back"; onClicked: { container.state = '' }
+ }
+ Text {
+ text: "Image Unavailable"
+ visible: bigImage.status == 'Error'
+ anchors.centerIn: parent; color: "white"; font.bold: true
+ }
+
+ Slider {
+ id: slider; x: 25; y: 374; visible: { bigImage.status == 1 && maximum > minimum }
+ onValueChanged: {
+ if (bigImage.width * value > flick.width) {
+ var xoff = (flick.width/2 + flick.contentX) * value / prevScale;
+ flick.contentX = xoff - flick.width/2;
+ }
+ if (bigImage.height * value > flick.height) {
+ var yoff = (flick.height/2 + flick.contentY) * value / prevScale;
+ flick.contentY = yoff - flick.height/2;
+ }
+ prevScale = value;
+ }
+ }
+ }
+
+ states: [
+ State {
+ name: "Back"
+ PropertyChanges { target: detailsRotation; angle: 180 }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ SequentialAnimation {
+ PropertyAction {
+ target: bigImage
+ property: "smooth"
+ value: false
+ }
+ NumberAnimation { easing.type: "InOutQuad"; properties: "angle"; duration: 500 }
+ PropertyAction {
+ target: bigImage
+ property: "smooth"
+ value: !flick.moving
+ }
+ }
+ }
+ ]
+}
diff --git a/demos/declarative/flickr/common/LikeOMeter.qml b/demos/declarative/flickr/common/LikeOMeter.qml
new file mode 100644
index 0000000000..5ee048b8cd
--- /dev/null
+++ b/demos/declarative/flickr/common/LikeOMeter.qml
@@ -0,0 +1,35 @@
+import Qt 4.6
+
+Item {
+ id: container
+
+ property int rating: 2
+
+ Row {
+ Star {
+ rating: 0
+ onClicked: { container.rating = rating }
+ on: container.rating >= 0
+ }
+ Star {
+ rating: 1
+ onClicked: { container.rating = rating }
+ on: container.rating >= 1
+ }
+ Star {
+ rating: 2
+ onClicked: { container.rating = rating }
+ on: container.rating >= 2
+ }
+ Star {
+ rating: 3
+ onClicked: { container.rating = rating }
+ on: container.rating >= 3
+ }
+ Star {
+ rating: 4
+ onClicked: { container.rating = rating }
+ on: container.rating >= 4
+ }
+ }
+}
diff --git a/demos/declarative/flickr/common/Loading.qml b/demos/declarative/flickr/common/Loading.qml
new file mode 100644
index 0000000000..938a08026d
--- /dev/null
+++ b/demos/declarative/flickr/common/Loading.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+Image {
+ id: loading; source: "pics/loading.png"; transformOrigin: "Center"
+ NumberAnimation on rotation {
+ from: 0; to: 360; running: loading.visible == true; repeat: true; duration: 900
+ }
+}
diff --git a/demos/declarative/flickr/common/MediaButton.qml b/demos/declarative/flickr/common/MediaButton.qml
new file mode 100644
index 0000000000..86ac948369
--- /dev/null
+++ b/demos/declarative/flickr/common/MediaButton.qml
@@ -0,0 +1,41 @@
+import Qt 4.6
+
+Item {
+ id: container
+
+ signal clicked
+
+ property string text
+
+ Image {
+ id: buttonImage
+ source: "pics/button.png"
+ }
+ Image {
+ id: pressed
+ source: "pics/button-pressed.png"
+ opacity: 0
+ }
+ MouseArea {
+ id: mouseRegion
+ anchors.fill: buttonImage
+ onClicked: { container.clicked(); }
+ }
+ Text {
+ font.bold: true
+ color: "white"
+ anchors.centerIn: buttonImage
+ text: container.text
+ }
+ width: buttonImage.width
+ states: [
+ State {
+ name: "Pressed"
+ when: mouseRegion.pressed == true
+ PropertyChanges {
+ target: pressed
+ opacity: 1
+ }
+ }
+ ]
+}
diff --git a/demos/declarative/flickr/common/MediaLineEdit.qml b/demos/declarative/flickr/common/MediaLineEdit.qml
new file mode 100644
index 0000000000..9559f6ae1c
--- /dev/null
+++ b/demos/declarative/flickr/common/MediaLineEdit.qml
@@ -0,0 +1,104 @@
+import Qt 4.6
+
+Item {
+ id: container
+
+ property string label
+ property string text
+
+ width: Math.max(94,labeltext.width + editor.width + 20)
+ height: buttonImage.height
+
+ states: [
+ State {
+ name: "Edit"
+ PropertyChanges {
+ target: labeltext
+ text: container.label + ": "
+ }
+ PropertyChanges {
+ target: labeltext
+ x: 10
+ }
+ PropertyChanges {
+ target: editor
+ cursorVisible: true
+ width: 100
+ }
+ PropertyChanges {
+ target: container
+ focus: true
+ }
+ StateChangeScript {
+ script:editor.selectAll()
+ }
+ },
+ State {
+ // When returning to default state, typed text is propagated
+ StateChangeScript {
+ script: container.text = editor.text
+ }
+ }
+ ]
+ transitions: [
+ Transition {
+ NumberAnimation { properties: "x,width"; duration: 500; easing.type: "InOutQuad" }
+ }
+ ]
+
+
+ BorderImage {
+ id: buttonImage
+ source: "pics/button.sci"
+ anchors.left: container.left
+ anchors.right: container.right
+ }
+
+ BorderImage {
+ id: pressed
+ source: "pics/button-pressed.sci"
+ opacity: 0
+ anchors.left: container.left
+ anchors.right: container.right
+ }
+
+ MouseArea {
+ id: mouseRegion
+ anchors.fill: buttonImage
+ onClicked: { container.state = container.state=="Edit" ? "" : "Edit" }
+ states: [
+ State {
+ when: mouseRegion.pressed == true
+ PropertyChanges {
+ target: pressed
+ opacity: 1
+ }
+ }
+ ]
+ }
+
+ Text {
+ id: labeltext
+ font.bold: true
+ color: "white"
+ anchors.verticalCenter: container.verticalCenter
+ x: (container.width - width)/2
+ text: container.label + "..."
+ }
+
+ TextInput {
+ id: editor
+ font.bold: true
+ color: "white"
+ selectionColor: "green"
+ width: 0
+ clip: true
+ anchors.left: labeltext.right
+ anchors.verticalCenter: container.verticalCenter
+ }
+ Keys.forwardTo: [(returnKey), (editor)]
+ Item {
+ id: returnKey
+ Keys.onReturnPressed: "container.state = ''"
+ }
+}
diff --git a/demos/declarative/flickr/common/Progress.qml b/demos/declarative/flickr/common/Progress.qml
new file mode 100644
index 0000000000..fd9be1044b
--- /dev/null
+++ b/demos/declarative/flickr/common/Progress.qml
@@ -0,0 +1,32 @@
+import Qt 4.6
+
+Item {
+ property var progress: 0
+
+ Rectangle {
+ anchors.fill: parent; smooth: true
+ border.color: "white"; border.width: 0; radius: height/2 - 2
+ gradient: Gradient {
+ GradientStop { position: 0; color: "#66343434" }
+ GradientStop { position: 1.0; color: "#66000000" }
+ }
+ }
+
+ Rectangle {
+ y: 2; height: parent.height-4;
+ x: 2; width: Math.max(parent.width * progress - 4, 0);
+ opacity: width < 1 ? 0 : 1; smooth: true
+ gradient: Gradient {
+ GradientStop { position: 0; color: "lightsteelblue" }
+ GradientStop { position: 1.0; color: "steelblue" }
+ }
+ radius: height/2 - 2
+ }
+
+ Text {
+ text: Math.round(progress * 100) + "%"
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ color: "white"; font.bold: true
+ }
+}
diff --git a/demos/declarative/flickr/common/RssModel.qml b/demos/declarative/flickr/common/RssModel.qml
new file mode 100644
index 0000000000..ed9fd5c56e
--- /dev/null
+++ b/demos/declarative/flickr/common/RssModel.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+XmlListModel {
+ property string tags : ""
+
+ source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+tags+"&" : "")+"format=rss2"
+ query: "/rss/channel/item"
+ namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";"
+
+ XmlRole { name: "title"; query: "title/string()" }
+ XmlRole { name: "imagePath"; query: "media:thumbnail/@url/string()" }
+ XmlRole { name: "url"; query: "media:content/@url/string()" }
+ XmlRole { name: "description"; query: "description/string()" }
+ XmlRole { name: "tags"; query: "media:category/string()" }
+ XmlRole { name: "photoWidth"; query: "media:content/@width/string()" }
+ XmlRole { name: "photoHeight"; query: "media:content/@height/string()" }
+ XmlRole { name: "photoType"; query: "media:content/@type/string()" }
+ XmlRole { name: "photoAuthor"; query: "author/string()" }
+ XmlRole { name: "photoDate"; query: "pubDate/string()" }
+}
diff --git a/demos/declarative/flickr/common/ScrollBar.qml b/demos/declarative/flickr/common/ScrollBar.qml
new file mode 100644
index 0000000000..feebcb08c2
--- /dev/null
+++ b/demos/declarative/flickr/common/ScrollBar.qml
@@ -0,0 +1,40 @@
+import Qt 4.6
+
+Item {
+ id: container
+
+ property var flickableArea
+
+ Rectangle {
+ radius: 5
+ color: "black"
+ opacity: 0.3
+ border.color: "white"
+ border.width: 2
+ x: 0
+ y: flickableArea.visibleArea.yPosition * container.height
+ width: parent.width
+ height: flickableArea.visibleArea.heightRatio * container.height
+ }
+ states: [
+ State {
+ name: "show"
+ when: flickableArea.moving
+ PropertyChanges {
+ target: container
+ opacity: 1
+ }
+ }
+ ]
+ transitions: [
+ Transition {
+ from: "*"
+ to: "*"
+ NumberAnimation {
+ target: container
+ properties: "opacity"
+ duration: 400
+ }
+ }
+ ]
+}
diff --git a/demos/declarative/flickr/common/Slider.qml b/demos/declarative/flickr/common/Slider.qml
new file mode 100644
index 0000000000..05a87e7102
--- /dev/null
+++ b/demos/declarative/flickr/common/Slider.qml
@@ -0,0 +1,36 @@
+import Qt 4.6
+
+Item {
+ id: slider; width: 400; height: 16
+
+ // value is read/write.
+ property real value
+ onValueChanged: { handle.x = 2 + (value - minimum) * slider.xMax / (maximum - minimum); }
+ property real maximum: 1
+ property real minimum: 1
+ property int xMax: slider.width - handle.width - 4
+
+ Rectangle {
+ anchors.fill: parent
+ border.color: "white"; border.width: 0; radius: 8
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "#66343434" }
+ GradientStop { position: 1.0; color: "#66000000" }
+ }
+ }
+
+ Rectangle {
+ id: handle; smooth: true
+ x: slider.width / 2 - handle.width / 2; y: 2; width: 30; height: slider.height-4; radius: 6
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "lightgray" }
+ GradientStop { position: 1.0; color: "gray" }
+ }
+
+ MouseArea {
+ anchors.fill: parent; drag.target: parent
+ drag.axis: "XAxis"; drag.minimumX: 2; drag.maximumX: slider.xMax+2
+ onPositionChanged: { value = (maximum - minimum) * (handle.x-2) / slider.xMax + minimum; }
+ }
+ }
+}
diff --git a/demos/declarative/flickr/common/Star.qml b/demos/declarative/flickr/common/Star.qml
new file mode 100644
index 0000000000..748a5ecd87
--- /dev/null
+++ b/demos/declarative/flickr/common/Star.qml
@@ -0,0 +1,45 @@
+import Qt 4.6
+
+Item {
+ id: container
+ width: 24
+ height: 24
+
+ property int rating
+ property bool on
+ signal clicked
+
+ Image {
+ id: starImage
+ source: "pics/ghns_star.png"
+ x: 6
+ y: 7
+ opacity: 0.4
+ scale: 0.5
+ }
+ MouseArea {
+ anchors.fill: container
+ onClicked: { container.clicked() }
+ }
+ states: [
+ State {
+ name: "on"
+ when: container.on == true
+ PropertyChanges {
+ target: starImage
+ opacity: 1
+ scale: 1
+ x: 1
+ y: 0
+ }
+ }
+ ]
+ transitions: [
+ Transition {
+ NumberAnimation {
+ properties: "opacity,scale,x,y"
+ easing.type: "OutBounce"
+ }
+ }
+ ]
+}
diff --git a/demos/declarative/flickr/common/pics/background.png b/demos/declarative/flickr/common/pics/background.png
new file mode 100644
index 0000000000..5b3707218f
--- /dev/null
+++ b/demos/declarative/flickr/common/pics/background.png
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/button-pressed.png b/demos/declarative/flickr/common/pics/button-pressed.png
new file mode 100644
index 0000000000..e434d327f2
--- /dev/null
+++ b/demos/declarative/flickr/common/pics/button-pressed.png
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/button-pressed.sci b/demos/declarative/flickr/common/pics/button-pressed.sci
new file mode 100644
index 0000000000..b8db27252d
--- /dev/null
+++ b/demos/declarative/flickr/common/pics/button-pressed.sci
@@ -0,0 +1,5 @@
+border.left: 8
+border.top: 4
+border.bottom: 4
+border.right: 8
+source: button.png
diff --git a/demos/declarative/flickr/common/pics/button.png b/demos/declarative/flickr/common/pics/button.png
new file mode 100644
index 0000000000..56a63ce641
--- /dev/null
+++ b/demos/declarative/flickr/common/pics/button.png
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/button.sci b/demos/declarative/flickr/common/pics/button.sci
new file mode 100644
index 0000000000..b8db27252d
--- /dev/null
+++ b/demos/declarative/flickr/common/pics/button.sci
@@ -0,0 +1,5 @@
+border.left: 8
+border.top: 4
+border.bottom: 4
+border.right: 8
+source: button.png
diff --git a/demos/declarative/flickr/common/pics/ghns_star.png b/demos/declarative/flickr/common/pics/ghns_star.png
new file mode 100644
index 0000000000..4ad43cc1c0
--- /dev/null
+++ b/demos/declarative/flickr/common/pics/ghns_star.png
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/loading.png b/demos/declarative/flickr/common/pics/loading.png
new file mode 100644
index 0000000000..47a1589c5d
--- /dev/null
+++ b/demos/declarative/flickr/common/pics/loading.png
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/reflection.png b/demos/declarative/flickr/common/pics/reflection.png
new file mode 100644
index 0000000000..c143a48866
--- /dev/null
+++ b/demos/declarative/flickr/common/pics/reflection.png
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/shadow-bottom.png b/demos/declarative/flickr/common/pics/shadow-bottom.png
new file mode 100644
index 0000000000..523f6e70f7
--- /dev/null
+++ b/demos/declarative/flickr/common/pics/shadow-bottom.png
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/shadow-corner.png b/demos/declarative/flickr/common/pics/shadow-corner.png
new file mode 100644
index 0000000000..ef8c85622c
--- /dev/null
+++ b/demos/declarative/flickr/common/pics/shadow-corner.png
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/shadow-right-screen.png b/demos/declarative/flickr/common/pics/shadow-right-screen.png
new file mode 100644
index 0000000000..9856c4f431
--- /dev/null
+++ b/demos/declarative/flickr/common/pics/shadow-right-screen.png
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/shadow-right.png b/demos/declarative/flickr/common/pics/shadow-right.png
new file mode 100644
index 0000000000..f534a35348
--- /dev/null
+++ b/demos/declarative/flickr/common/pics/shadow-right.png
Binary files differ
diff --git a/demos/declarative/flickr/common/qmldir b/demos/declarative/flickr/common/qmldir
new file mode 100644
index 0000000000..0c94f6078a
--- /dev/null
+++ b/demos/declarative/flickr/common/qmldir
@@ -0,0 +1,10 @@
+ImageDetails 0.0 ImageDetails.qml
+LikeOMeter 0.0 LikeOMeter.qml
+Loading 0.0 Loading.qml
+MediaButton 0.0 MediaButton.qml
+MediaLineEdit 0.0 MediaLineEdit.qml
+Progress 0.0 Progress.qml
+RssModel 0.0 RssModel.qml
+ScrollBar 0.0 ScrollBar.qml
+Slider 0.0 Slider.qml
+Star 0.0 Star.qml
diff --git a/demos/declarative/flickr/flickr-desktop.qml b/demos/declarative/flickr/flickr-desktop.qml
new file mode 100644
index 0000000000..99216cb8da
--- /dev/null
+++ b/demos/declarative/flickr/flickr-desktop.qml
@@ -0,0 +1,194 @@
+import Qt 4.6
+
+import "common"
+
+Item {
+ id: mainWindow; width: 800; height: 450
+
+ property bool showPathView : false
+
+ resources: [
+ Component {
+ id: photoDelegate
+ Item {
+ id: wrapper; width: 85; height: 85
+ scale: wrapper.PathView.scale ? wrapper.PathView.scale : 1
+ z: wrapper.PathView.z ? wrapper.PathView.z : 0
+
+ transform: Rotation {
+ id: itemRotation; origin.x: wrapper.width/2; origin.y: wrapper.height/2
+ axis.y: 1; axis.z: 0
+ angle: wrapper.PathView.angle ? wrapper.PathView.angle : 0
+ }
+
+ Connections {
+ target: imageDetails
+ onClosed: {
+ if (wrapper.state == 'Details') {
+ wrapper.state = '';
+ imageDetails.photoUrl = "";
+ }
+ }
+ }
+
+ Script {
+ function photoClicked() {
+ imageDetails.photoTitle = title;
+ imageDetails.photoDescription = description;
+ imageDetails.photoTags = tags;
+ imageDetails.photoWidth = photoWidth;
+ imageDetails.photoHeight = photoHeight;
+ imageDetails.photoType = photoType;
+ imageDetails.photoAuthor = photoAuthor;
+ imageDetails.photoDate = photoDate;
+ imageDetails.photoUrl = url;
+ imageDetails.rating = 0;
+ wrapper.state = "Details";
+ }
+ }
+
+ Rectangle {
+ id: whiteRect; anchors.fill: parent; color: "white"; radius: 5
+
+ Loading { x: 26; y: 26; visible: thumb.status!=1 }
+ Image { id: thumb; source: imagePath; x: 5; y: 5 }
+
+ Item {
+ id: shadows
+ Image { source: "common/pics/shadow-right.png"; x: whiteRect.width; height: whiteRect.height }
+ Image { source: "common/pics/shadow-bottom.png"; y: whiteRect.height; width: whiteRect.width }
+ Image { id: corner; source: "common/pics/shadow-corner.png"; x: whiteRect.width; y: whiteRect.height }
+ }
+ }
+
+ MouseArea { anchors.fill: wrapper; onClicked: { photoClicked() } }
+
+ states: [
+ State {
+ name: "Details"
+ PropertyChanges { target: imageDetails; z: 2 }
+ ParentChange { target: wrapper; parent: imageDetails.frontContainer }
+ PropertyChanges { target: wrapper; x: 45; y: 35; scale: 1; z: 1000 }
+ PropertyChanges { target: itemRotation; angle: 0 }
+ PropertyChanges { target: shadows; opacity: 0 }
+ PropertyChanges { target: imageDetails; y: 20 }
+ PropertyChanges { target: photoGridView; y: -480 }
+ PropertyChanges { target: photoPathView; y: -480 }
+ PropertyChanges { target: viewModeButton; opacity: 0 }
+ PropertyChanges { target: tagsEdit; opacity: 0 }
+ PropertyChanges { target: fetchButton; opacity: 0 }
+ PropertyChanges { target: categoryText; y: "-50" }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ from: "*"; to: "Details"
+ SequentialAnimation {
+ ParentAction { }
+ NumberAnimation { properties: "x,y,scale,opacity,angle"; duration: 500; easing.type: "InOutQuad" }
+ }
+ },
+ Transition {
+ from: "Details"; to: "*"
+ SequentialAnimation {
+ ParentAction { }
+ NumberAnimation { properties: "x,y,scale,opacity,angle"; duration: 500; easing.type: "InOutQuad" }
+ PropertyAction { targets: wrapper; properties: "z" }
+ }
+ }
+ ]
+
+ }
+ }
+ ]
+
+ Item {
+ id: background
+
+ anchors.fill: parent
+
+ Image { source: "common/pics/background.png"; anchors.fill: parent }
+ RssModel { id: rssModel; tags : tagsEdit.text }
+ Loading { anchors.centerIn: parent; visible: rssModel.status == 2 }
+
+ GridView {
+ id: photoGridView; model: rssModel; delegate: photoDelegate; cacheBuffer: 100
+ cellWidth: 105; cellHeight: 105; x:32; y: 80; width: 800; height: 330; z: 1
+ }
+
+ PathView {
+ id: photoPathView; model: rssModel; delegate: photoDelegate
+ y: -380; width: 800; height: 330; pathItemCount: 10; z: 1
+ path: Path {
+ startX: -50; startY: 40;
+
+ PathAttribute { name: "scale"; value: 1 }
+ PathAttribute { name: "angle"; value: -45 }
+
+ PathCubic {
+ x: 400; y: 220
+ control1X: 140; control1Y: 40
+ control2X: 210; control2Y: 220
+ }
+
+ PathAttribute { name: "scale"; value: 1.2 }
+ PathAttribute { name: "z"; value: 1 }
+ PathAttribute { name: "angle"; value: 0 }
+
+ PathCubic {
+ x: 850; y: 40
+ control2X: 660; control2Y: 40
+ control1X: 590; control1Y: 220
+ }
+
+ PathAttribute { name: "scale"; value: 1 }
+ PathAttribute { name: "angle"; value: 45 }
+ }
+
+ }
+
+ ImageDetails { id: imageDetails; width: 750; x: 25; y: 500; height: 410 }
+
+ MediaButton {
+ id: viewModeButton; x: 680; y: 410; text: "View Mode"
+ onClicked: { if (mainWindow.showPathView == true) mainWindow.showPathView = false; else mainWindow.showPathView = true }
+ }
+
+ MediaButton {
+ id: fetchButton
+ text: "Update"
+ anchors.right: viewModeButton.left; anchors.rightMargin: 5
+ anchors.top: viewModeButton.top
+ onClicked: { rssModel.reload(); }
+ }
+
+ MediaLineEdit {
+ id: tagsEdit;
+ label: "Tags"
+ anchors.right: fetchButton.left; anchors.rightMargin: 5
+ anchors.top: viewModeButton.top
+ }
+
+ states: State {
+ name: "PathView"
+ when: mainWindow.showPathView == true
+ PropertyChanges { target: photoPathView; y: 80 }
+ PropertyChanges { target: photoGridView; y: -380 }
+ }
+
+ transitions: [
+ Transition {
+ from: "*"; to: "*"
+ NumberAnimation { properties: "y"; duration: 1000; easing.type: "OutBounce"; easing.amplitude: 0.5 }
+ }
+ ]
+ }
+
+ Text {
+ id: categoryText; anchors.horizontalCenter: parent.horizontalCenter; y: 15;
+ text: "Flickr - " +
+ (rssModel.tags=="" ? "Uploads from everyone" : "Recent Uploads tagged " + rssModel.tags)
+ font.pointSize: 20; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black"
+ }
+}
diff --git a/demos/declarative/flickr/flickr-mobile-90.qml b/demos/declarative/flickr/flickr-mobile-90.qml
new file mode 100644
index 0000000000..9fec2421db
--- /dev/null
+++ b/demos/declarative/flickr/flickr-mobile-90.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+
+Item {
+ width: 480; height: 320
+
+ Loader {
+ y: 320; rotation: -90
+ transformOrigin: Item.TopLeft
+ source: "flickr-mobile.qml"
+ }
+}
diff --git a/demos/declarative/flickr/flickr-mobile.qml b/demos/declarative/flickr/flickr-mobile.qml
new file mode 100644
index 0000000000..21e4c490c5
--- /dev/null
+++ b/demos/declarative/flickr/flickr-mobile.qml
@@ -0,0 +1,82 @@
+import Qt 4.6
+import "common" as Common
+import "mobile" as Mobile
+
+Item {
+ id: screen; width: 320; height: 480
+ property bool inListView : false
+
+ Rectangle {
+ id: background
+ anchors.fill: parent; color: "#343434";
+
+ Image { source: "mobile/images/stripes.png"; fillMode: Image.Tile; anchors.fill: parent; opacity: 0.3 }
+
+ Common.RssModel { id: rssModel }
+ Common.Loading { anchors.centerIn: parent; visible: rssModel.status == 2 }
+
+ Item {
+ id: views
+ x: 2; width: parent.width - 4
+ anchors.top: titleBar.bottom; anchors.bottom: toolBar.top
+
+ Mobile.GridDelegate { id: gridDelegate }
+ GridView {
+ id: photoGridView; model: rssModel; delegate: gridDelegate; cacheBuffer: 100
+ cellWidth: 79; cellHeight: 79; width: parent.width; height: parent.height - 1; z: 6
+ }
+
+ Mobile.ListDelegate { id: listDelegate }
+ ListView {
+ id: photoListView; model: rssModel; delegate: listDelegate; z: 6
+ width: parent.width; height: parent.height; x: -(parent.width * 1.5); cacheBuffer: 100;
+ }
+ states: State {
+ name: "ListView"; when: screen.inListView == true
+ PropertyChanges { target: photoListView; x: 0 }
+ PropertyChanges { target: photoGridView; x: -(parent.width * 1.5) }
+ }
+
+ transitions: Transition {
+ NumberAnimation { properties: "x"; duration: 500; easing.type: "InOutQuad" }
+ }
+ }
+
+ Mobile.ImageDetails { id: imageDetails; width: parent.width; anchors.left: views.right; height: parent.height; z:1 }
+ Mobile.TitleBar { id: titleBar; z: 5; width: parent.width; height: 40; opacity: 0.9 }
+
+ Mobile.ToolBar {
+ id: toolBar; z: 5
+ height: 40; anchors.bottom: parent.bottom; width: parent.width; opacity: 0.9
+ button1Label: "Update"; button2Label: "View mode"
+ onButton1Clicked: rssModel.reload()
+ onButton2Clicked: if (screen.inListView == true) screen.inListView = false; else screen.inListView = true
+ }
+
+ Connections {
+ target: imageDetails
+ onClosed: {
+ if (background.state == "DetailedView") {
+ background.state = '';
+ imageDetails.photoUrl = "";
+ }
+ }
+ }
+
+ states: State {
+ name: "DetailedView"
+ PropertyChanges { target: views; x: -parent.width }
+ PropertyChanges { target: toolBar; button1Label: "More..." }
+ PropertyChanges {
+ target: toolBar
+ onButton1Clicked: if (imageDetails.state=='') imageDetails.state='Back'; else imageDetails.state=''
+ }
+ PropertyChanges { target: toolBar; button2Label: "Back" }
+ PropertyChanges { target: toolBar; onButton2Clicked: imageDetails.closed() }
+ }
+
+ transitions: Transition {
+ NumberAnimation { properties: "x"; duration: 500; easing.type: "InOutQuad" }
+ }
+ }
+}
diff --git a/demos/declarative/flickr/mobile/Button.qml b/demos/declarative/flickr/mobile/Button.qml
new file mode 100644
index 0000000000..4ba6b19be2
--- /dev/null
+++ b/demos/declarative/flickr/mobile/Button.qml
@@ -0,0 +1,38 @@
+import Qt 4.6
+
+Item {
+ id: container
+
+ signal clicked
+
+ property string text
+
+ BorderImage {
+ id: buttonImage
+ source: "images/toolbutton.sci"
+ width: container.width; height: container.height
+ }
+ BorderImage {
+ id: pressed
+ opacity: 0
+ source: "images/toolbutton.sci"
+ width: container.width; height: container.height
+ }
+ MouseArea {
+ id: mouseRegion
+ anchors.fill: buttonImage
+ onClicked: { container.clicked(); }
+ }
+ Text {
+ color: "white"
+ anchors.centerIn: buttonImage; font.bold: true
+ text: container.text; style: Text.Raised; styleColor: "black"
+ }
+ states: [
+ State {
+ name: "Pressed"
+ when: mouseRegion.pressed == true
+ PropertyChanges { target: pressed; opacity: 1 }
+ }
+ ]
+}
diff --git a/demos/declarative/flickr/mobile/GridDelegate.qml b/demos/declarative/flickr/mobile/GridDelegate.qml
new file mode 100644
index 0000000000..291d8746ce
--- /dev/null
+++ b/demos/declarative/flickr/mobile/GridDelegate.qml
@@ -0,0 +1,72 @@
+ import Qt 4.6
+
+ Component {
+ id: photoDelegate
+ Item {
+ id: wrapper; width: 79; height: 79
+
+ Script {
+ function photoClicked() {
+ imageDetails.photoTitle = title;
+ imageDetails.photoTags = tags;
+ imageDetails.photoWidth = photoWidth;
+ imageDetails.photoHeight = photoHeight;
+ imageDetails.photoType = photoType;
+ imageDetails.photoAuthor = photoAuthor;
+ imageDetails.photoDate = photoDate;
+ imageDetails.photoUrl = url;
+ imageDetails.rating = 0;
+ scaleMe.state = "Details";
+ }
+ }
+
+ Item {
+ anchors.centerIn: parent
+ scale: 0.0
+ Behavior on scale { NumberAnimation { easing.type: "InOutQuad"} }
+ id: scaleMe
+
+ Rectangle { height: 79; width: 79; id: blackRect; anchors.centerIn: parent; color: "black"; smooth: true }
+ Rectangle {
+ id: whiteRect; width: 77; height: 77; anchors.centerIn: parent; color: "#dddddd"; smooth: true
+ Image { id: thumb; source: imagePath; x: 1; y: 1; smooth: true}
+ Image { source: "images/gloss.png" }
+ }
+
+ Connections {
+ target: toolBar
+ onButton2Clicked: if (scaleMe.state == 'Details' ) scaleMe.state = 'Show'
+ }
+
+ states: [
+ State {
+ name: "Show"; when: thumb.status == 1
+ PropertyChanges { target: scaleMe; scale: 1 }
+ },
+ State {
+ name: "Details"
+ PropertyChanges { target: scaleMe; scale: 1 }
+ ParentChange { target: wrapper; parent: imageDetails.frontContainer }
+ PropertyChanges { target: wrapper; x: 20; y: 60; z: 1000 }
+ PropertyChanges { target: background; state: "DetailedView" }
+ }
+ ]
+ transitions: [
+ Transition {
+ from: "Show"; to: "Details"
+ ParentAction { }
+ NumberAnimation { properties: "x,y"; duration: 500; easing.type: "InOutQuad" }
+ },
+ Transition {
+ from: "Details"; to: "Show"
+ SequentialAnimation {
+ ParentAction { }
+ NumberAnimation { properties: "x,y"; duration: 500; easing.type: "InOutQuad" }
+ PropertyAction { targets: wrapper; properties: "z" }
+ }
+ }
+ ]
+ }
+ MouseArea { anchors.fill: wrapper; onClicked: { photoClicked() } }
+ }
+ }
diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml
new file mode 100644
index 0000000000..2f4df8a25f
--- /dev/null
+++ b/demos/declarative/flickr/mobile/ImageDetails.qml
@@ -0,0 +1,121 @@
+import Qt 4.6
+import "../common" as Common
+
+Flipable {
+ id: container
+
+ property var frontContainer: containerFront
+ property string photoTitle: ""
+ property string photoTags: ""
+ property int photoWidth
+ property int photoHeight
+ property string photoType
+ property string photoAuthor
+ property string photoDate
+ property string photoUrl
+ property int rating: 2
+ property var prevScale: 1.0
+
+ signal closed
+
+ transform: Rotation {
+ id: itemRotation
+ origin.x: container.width / 2;
+ axis.y: 1; axis.z: 0
+ }
+
+ front: Item {
+ id: containerFront; anchors.fill: container
+
+ Rectangle {
+ anchors.fill: parent
+ color: "black"; opacity: 0.4
+ }
+
+ Column {
+ spacing: 10
+ anchors {
+ left: parent.left; leftMargin: 20
+ right: parent.right; rightMargin: 20
+ top: parent.top; topMargin: 180
+ }
+ Text { font.bold: true; color: "white"; elide: Text.ElideRight; text: container.photoTitle }
+ Text { color: "white"; elide: Text.ElideRight; text: "<b>Size:</b> " + container.photoWidth + 'x' + container.photoHeight }
+ Text { color: "white"; elide: Text.ElideRight; text: "<b>Type:</b> " + container.photoType }
+ Text { color: "white"; elide: Text.ElideRight; text: "<b>Author:</b> " + container.photoAuthor }
+ Text { color: "white"; elide: Text.ElideRight; text: "<b>Published:</b> " + container.photoDate }
+ Text { color: "white"; elide: Text.ElideRight; text: container.photoTags == "" ? "" : "<b>Tags:</b> " }
+ Text { color: "white"; elide: Text.ElideRight; text: container.photoTags }
+ }
+ }
+
+ back: Item {
+ anchors.fill: container
+
+ Rectangle { anchors.fill: parent; color: "black"; opacity: 0.4 }
+
+ Common.Progress { anchors.centerIn: parent; width: 200; height: 18; progress: bigImage.progress; visible: bigImage.status!=1 }
+ Flickable {
+ id: flickable; anchors.fill: parent; clip: true
+ contentWidth: imageContainer.width; contentHeight: imageContainer.height
+
+ Item {
+ id: imageContainer
+ width: Math.max(bigImage.width * bigImage.scale, flickable.width);
+ height: Math.max(bigImage.height * bigImage.scale, flickable.height);
+
+ Image {
+ id: bigImage; source: container.photoUrl; scale: slider.value
+ anchors.centerIn: parent; smooth: !flickable.moving
+ onStatusChanged : {
+ // Default scale shows the entire image.
+ if (status == 1 && width != 0) {
+ slider.minimum = Math.min(flickable.width / width, flickable.height / height);
+ prevScale = Math.min(slider.minimum, 1);
+ slider.value = prevScale;
+ }
+ }
+ }
+ }
+ }
+
+ Text {
+ text: "Image Unavailable"
+ visible: bigImage.status == 'Error'
+ anchors.centerIn: parent; color: "white"; font.bold: true
+ }
+
+ Common.Slider {
+ id: slider; visible: { bigImage.status == 1 && maximum > minimum }
+ anchors {
+ bottom: parent.bottom; bottomMargin: 65
+ left: parent.left; leftMargin: 25
+ right: parent.right; rightMargin: 25
+ }
+ onValueChanged: {
+ if (bigImage.width * value > flickable.width) {
+ var xoff = (flickable.width/2 + flickable.contentX) * value / prevScale;
+ flickable.contentX = xoff - flickable.width/2;
+ }
+ if (bigImage.height * value > flickable.height) {
+ var yoff = (flickable.height/2 + flickable.contentY) * value / prevScale;
+ flickable.contentY = yoff - flickable.height/2;
+ }
+ prevScale = value;
+ }
+ }
+ }
+
+ states: State {
+ name: "Back"
+ PropertyChanges { target: itemRotation; angle: 180 }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAction { target: bigImage; property: "smooth"; value: false }
+ NumberAnimation { easing.type: "InOutQuad"; properties: "angle"; duration: 500 }
+ PropertyAction { target: bigImage; property: "smooth"; value: !flickable.moving }
+ }
+ }
+}
diff --git a/demos/declarative/flickr/mobile/ListDelegate.qml b/demos/declarative/flickr/mobile/ListDelegate.qml
new file mode 100644
index 0000000000..381664b55f
--- /dev/null
+++ b/demos/declarative/flickr/mobile/ListDelegate.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+
+Component {
+ Item {
+ id: wrapper; width: wrapper.ListView.view.width; height: 86
+ Item {
+ id: moveMe
+ Rectangle { color: "black"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
+ Rectangle {
+ x: 6; y: 4; width: 77; height: 77; color: "white"; smooth: true
+
+ Image { source: imagePath; x: 1; y: 1 }
+ Image { source: "images/gloss.png" }
+ }
+ Column {
+ x: 92; width: wrapper.ListView.view.width - 95; y: 15; spacing: 2
+ Text { text: title; color: "white"; width: parent.width; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black" }
+ Text { text: photoAuthor; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
+ Text { text: photoDate; width: parent.width; elide: Text.ElideRight; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
+ }
+ }
+ }
+}
diff --git a/demos/declarative/flickr/mobile/TitleBar.qml b/demos/declarative/flickr/mobile/TitleBar.qml
new file mode 100644
index 0000000000..0a06771df0
--- /dev/null
+++ b/demos/declarative/flickr/mobile/TitleBar.qml
@@ -0,0 +1,76 @@
+import Qt 4.6
+
+Item {
+ id: titleBar
+ property string untaggedString: "Uploads from everyone"
+ property string taggedString: "Recent uploads tagged "
+
+ BorderImage { source: "images/titlebar.sci"; width: parent.width; height: parent.height + 14; y: -7 }
+
+ Item {
+ id: container
+ width: (parent.width * 2) - 55 ; height: parent.height
+
+ Script {
+ function accept() {
+ titleBar.state = ""
+ background.state = ""
+ rssModel.tags = editor.text
+ }
+ }
+
+ Text {
+ id: categoryText
+ anchors {
+ left: parent.left; right: tagButton.left; leftMargin: 10; rightMargin: 10
+ verticalCenter: parent.verticalCenter
+ }
+ elide: Text.ElideLeft
+ text: (rssModel.tags=="" ? untaggedString : taggedString + rssModel.tags)
+ font.bold: true; color: "White"; style: Text.Raised; styleColor: "Black"
+ }
+
+ Button {
+ id: tagButton; x: titleBar.width - 50; width: 45; height: 32; text: "..."
+ onClicked: if (titleBar.state == "Tags") accept(); else titleBar.state = "Tags"
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Item {
+ id: lineEdit
+ y: 4; height: parent.height - 9
+ anchors { left: tagButton.right; leftMargin: 5; right: parent.right; rightMargin: 5 }
+
+ BorderImage { source: "images/lineedit.sci"; anchors.fill: parent }
+
+ TextInput {
+ id: editor
+ anchors {
+ left: parent.left; right: parent.right; leftMargin: 10; rightMargin: 10
+ verticalCenter: parent.verticalCenter
+ }
+ cursorVisible: true; font.bold: true
+ color: "#151515"; selectionColor: "Green"
+ }
+
+ Keys.forwardTo: [ (returnKey), (editor)]
+
+ Item {
+ id: returnKey
+ Keys.onReturnPressed: accept()
+ Keys.onEscapePressed: titleBar.state = ""
+ }
+ }
+ }
+
+ states: State {
+ name: "Tags"
+ PropertyChanges { target: container; x: -tagButton.x + 5 }
+ PropertyChanges { target: tagButton; text: "OK" }
+ PropertyChanges { target: lineEdit; focus: true }
+ }
+
+ transitions: Transition {
+ NumberAnimation { properties: "x"; easing.type: "InOutQuad" }
+ }
+}
diff --git a/demos/declarative/flickr/mobile/ToolBar.qml b/demos/declarative/flickr/mobile/ToolBar.qml
new file mode 100644
index 0000000000..f96c767d74
--- /dev/null
+++ b/demos/declarative/flickr/mobile/ToolBar.qml
@@ -0,0 +1,24 @@
+import Qt 4.6
+
+Item {
+ id: toolbar
+
+ property alias button1Label: button1.text
+ property alias button2Label: button2.text
+ signal button1Clicked
+ signal button2Clicked
+
+ BorderImage { source: "images/titlebar.sci"; width: parent.width; height: parent.height + 14; y: -7 }
+
+ Button {
+ id: button1
+ anchors.left: parent.left; anchors.leftMargin: 5; y: 3; width: 140; height: 32
+ onClicked: toolbar.button1Clicked()
+ }
+
+ Button {
+ id: button2
+ anchors.right: parent.right; anchors.rightMargin: 5; y: 3; width: 140; height: 32
+ onClicked: toolbar.button2Clicked()
+ }
+}
diff --git a/demos/declarative/flickr/mobile/images/gloss.png b/demos/declarative/flickr/mobile/images/gloss.png
new file mode 100644
index 0000000000..5d370cd93d
--- /dev/null
+++ b/demos/declarative/flickr/mobile/images/gloss.png
Binary files differ
diff --git a/demos/declarative/flickr/mobile/images/lineedit.png b/demos/declarative/flickr/mobile/images/lineedit.png
new file mode 100644
index 0000000000..2cc38dc35b
--- /dev/null
+++ b/demos/declarative/flickr/mobile/images/lineedit.png
Binary files differ
diff --git a/demos/declarative/flickr/mobile/images/lineedit.sci b/demos/declarative/flickr/mobile/images/lineedit.sci
new file mode 100644
index 0000000000..054bff78be
--- /dev/null
+++ b/demos/declarative/flickr/mobile/images/lineedit.sci
@@ -0,0 +1,5 @@
+border.left: 10
+border.top: 10
+border.bottom: 10
+border.right: 10
+source: lineedit.png
diff --git a/demos/declarative/flickr/mobile/images/stripes.png b/demos/declarative/flickr/mobile/images/stripes.png
new file mode 100644
index 0000000000..9f36727ea4
--- /dev/null
+++ b/demos/declarative/flickr/mobile/images/stripes.png
Binary files differ
diff --git a/demos/declarative/flickr/mobile/images/titlebar.png b/demos/declarative/flickr/mobile/images/titlebar.png
new file mode 100644
index 0000000000..51c90082d0
--- /dev/null
+++ b/demos/declarative/flickr/mobile/images/titlebar.png
Binary files differ
diff --git a/demos/declarative/flickr/mobile/images/titlebar.sci b/demos/declarative/flickr/mobile/images/titlebar.sci
new file mode 100644
index 0000000000..0418d94cd6
--- /dev/null
+++ b/demos/declarative/flickr/mobile/images/titlebar.sci
@@ -0,0 +1,5 @@
+border.left: 10
+border.top: 12
+border.bottom: 12
+border.right: 10
+source: titlebar.png
diff --git a/demos/declarative/flickr/mobile/images/toolbutton.png b/demos/declarative/flickr/mobile/images/toolbutton.png
new file mode 100644
index 0000000000..11310013ee
--- /dev/null
+++ b/demos/declarative/flickr/mobile/images/toolbutton.png
Binary files differ
diff --git a/demos/declarative/flickr/mobile/images/toolbutton.sci b/demos/declarative/flickr/mobile/images/toolbutton.sci
new file mode 100644
index 0000000000..9e4f965307
--- /dev/null
+++ b/demos/declarative/flickr/mobile/images/toolbutton.sci
@@ -0,0 +1,5 @@
+border.left: 15
+border.top: 4
+border.bottom: 4
+border.right: 15
+source: toolbutton.png
diff --git a/demos/declarative/minehunt/MinehuntCore/Explosion.qml b/demos/declarative/minehunt/MinehuntCore/Explosion.qml
new file mode 100644
index 0000000000..e337c46fd2
--- /dev/null
+++ b/demos/declarative/minehunt/MinehuntCore/Explosion.qml
@@ -0,0 +1,26 @@
+import Qt 4.6
+
+Item {
+ property bool explode : false
+
+ Particles {
+ id: particles
+ width: 40
+ height: 40
+ lifeSpan: 1000
+ lifeSpanDeviation: 0
+ source: "pics/star.png"
+ count: 0
+ angle: 270
+ angleDeviation: 360
+ velocity: 100
+ velocityDeviation: 20
+ z: 100
+ opacity: 1
+ }
+ states: [ State { name: "exploding"; when: explode == true
+ StateChangeScript {script: particles.burst(200); }
+ }
+ ]
+
+}
diff --git a/demos/declarative/minehunt/MinehuntCore/pics/No-Ones-Laughing-3.jpg b/demos/declarative/minehunt/MinehuntCore/pics/No-Ones-Laughing-3.jpg
new file mode 100644
index 0000000000..445567fbda
--- /dev/null
+++ b/demos/declarative/minehunt/MinehuntCore/pics/No-Ones-Laughing-3.jpg
Binary files differ
diff --git a/demos/declarative/minehunt/MinehuntCore/pics/back.png b/demos/declarative/minehunt/MinehuntCore/pics/back.png
new file mode 100644
index 0000000000..f6b3f0b4d7
--- /dev/null
+++ b/demos/declarative/minehunt/MinehuntCore/pics/back.png
Binary files differ
diff --git a/demos/declarative/minehunt/MinehuntCore/pics/bomb-color.png b/demos/declarative/minehunt/MinehuntCore/pics/bomb-color.png
new file mode 100644
index 0000000000..61ad0a928f
--- /dev/null
+++ b/demos/declarative/minehunt/MinehuntCore/pics/bomb-color.png
Binary files differ
diff --git a/demos/declarative/minehunt/MinehuntCore/pics/bomb.png b/demos/declarative/minehunt/MinehuntCore/pics/bomb.png
new file mode 100644
index 0000000000..a992575518
--- /dev/null
+++ b/demos/declarative/minehunt/MinehuntCore/pics/bomb.png
Binary files differ
diff --git a/demos/declarative/minehunt/MinehuntCore/pics/face-sad.png b/demos/declarative/minehunt/MinehuntCore/pics/face-sad.png
new file mode 100644
index 0000000000..cf00aafe1f
--- /dev/null
+++ b/demos/declarative/minehunt/MinehuntCore/pics/face-sad.png
Binary files differ
diff --git a/demos/declarative/minehunt/MinehuntCore/pics/face-smile-big.png b/demos/declarative/minehunt/MinehuntCore/pics/face-smile-big.png
new file mode 100644
index 0000000000..f9c2335df5
--- /dev/null
+++ b/demos/declarative/minehunt/MinehuntCore/pics/face-smile-big.png
Binary files differ
diff --git a/demos/declarative/minehunt/MinehuntCore/pics/face-smile.png b/demos/declarative/minehunt/MinehuntCore/pics/face-smile.png
new file mode 100644
index 0000000000..3d66d72578
--- /dev/null
+++ b/demos/declarative/minehunt/MinehuntCore/pics/face-smile.png
Binary files differ
diff --git a/demos/declarative/minehunt/MinehuntCore/pics/flag-color.png b/demos/declarative/minehunt/MinehuntCore/pics/flag-color.png
new file mode 100644
index 0000000000..aadad0f11a
--- /dev/null
+++ b/demos/declarative/minehunt/MinehuntCore/pics/flag-color.png
Binary files differ
diff --git a/demos/declarative/minehunt/MinehuntCore/pics/flag.png b/demos/declarative/minehunt/MinehuntCore/pics/flag.png
new file mode 100644
index 0000000000..39cde4df82
--- /dev/null
+++ b/demos/declarative/minehunt/MinehuntCore/pics/flag.png
Binary files differ
diff --git a/demos/declarative/minehunt/MinehuntCore/pics/front.png b/demos/declarative/minehunt/MinehuntCore/pics/front.png
new file mode 100644
index 0000000000..834331bd49
--- /dev/null
+++ b/demos/declarative/minehunt/MinehuntCore/pics/front.png
Binary files differ
diff --git a/demos/declarative/minehunt/MinehuntCore/pics/star.png b/demos/declarative/minehunt/MinehuntCore/pics/star.png
new file mode 100644
index 0000000000..3772359188
--- /dev/null
+++ b/demos/declarative/minehunt/MinehuntCore/pics/star.png
Binary files differ
diff --git a/demos/declarative/minehunt/MinehuntCore/qmldir b/demos/declarative/minehunt/MinehuntCore/qmldir
new file mode 100644
index 0000000000..862c396e1f
--- /dev/null
+++ b/demos/declarative/minehunt/MinehuntCore/qmldir
@@ -0,0 +1,2 @@
+plugin minehunt
+Explosion 1.0 Explosion.qml
diff --git a/demos/declarative/minehunt/README b/demos/declarative/minehunt/README
new file mode 100644
index 0000000000..7379dcf963
--- /dev/null
+++ b/demos/declarative/minehunt/README
@@ -0,0 +1,3 @@
+To run, simply load the minehunt.qml file with the qml runtime.
+
+Note that on X11, this demo has problems with the native graphicssystem. If you are using the X11 window system, please pass -graphicssystem raster to the qml binary.
diff --git a/demos/declarative/minehunt/minehunt.cpp b/demos/declarative/minehunt/minehunt.cpp
new file mode 100644
index 0000000000..89845efee5
--- /dev/null
+++ b/demos/declarative/minehunt/minehunt.cpp
@@ -0,0 +1,314 @@
+/****************************************************************************
+**
+** 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 demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <stdlib.h>
+#include <qdeclarativeextensionplugin.h>
+#include <qdeclarativecontext.h>
+#include <qdeclarativeengine.h>
+#include <qdeclarative.h>
+
+#include <QTime>
+#include <QTimer>
+
+class Tile : public QObject
+{
+ Q_OBJECT
+public:
+ Tile() : _hasFlag(false), _hasMine(false), _hint(-1), _flipped(false) {}
+
+ Q_PROPERTY(bool hasFlag READ hasFlag WRITE setHasFlag NOTIFY hasFlagChanged);
+ bool hasFlag() const { return _hasFlag; }
+
+ Q_PROPERTY(bool hasMine READ hasMine NOTIFY hasMineChanged);
+ bool hasMine() const { return _hasMine; }
+
+ Q_PROPERTY(int hint READ hint NOTIFY hintChanged);
+ int hint() const { return _hint; }
+
+ Q_PROPERTY(bool flipped READ flipped NOTIFY flippedChanged());
+ bool flipped() const { return _flipped; }
+
+ void setHasFlag(bool flag) {if(flag==_hasFlag) return; _hasFlag = flag; emit hasFlagChanged();}
+ void setHasMine(bool mine) {if(mine==_hasMine) return; _hasMine = mine; emit hasMineChanged();}
+ void setHint(int hint) { if(hint == _hint) return; _hint = hint; emit hintChanged(); }
+ void flip() { if (_flipped) return; _flipped = true; emit flippedChanged(); }
+ void unflip() { if(!_flipped) return; _flipped = false; emit flippedChanged(); }
+
+signals:
+ void flippedChanged();
+ void hasFlagChanged();
+ void hintChanged();
+ void hasMineChanged();
+
+private:
+ bool _hasFlag;
+ bool _hasMine;
+ int _hint;
+ bool _flipped;
+};
+
+class MinehuntGame : public QObject
+{
+ Q_OBJECT
+public:
+ MinehuntGame();
+
+ Q_PROPERTY(QDeclarativeListProperty<Tile> tiles READ tiles CONSTANT);
+ QDeclarativeListProperty<Tile> tiles() { return QDeclarativeListProperty<Tile>(this, _tiles); }
+
+ Q_PROPERTY(bool isPlaying READ isPlaying NOTIFY isPlayingChanged);
+ bool isPlaying() {return playing;}
+
+ Q_PROPERTY(bool hasWon READ hasWon NOTIFY hasWonChanged);
+ bool hasWon() {return won;}
+
+ Q_PROPERTY(int numMines READ numMines NOTIFY numMinesChanged);
+ int numMines() const{return nMines;}
+
+ Q_PROPERTY(int numFlags READ numFlags NOTIFY numFlagsChanged);
+ int numFlags() const{return nFlags;}
+
+public slots:
+ Q_INVOKABLE bool flip(int row, int col);
+ Q_INVOKABLE bool flag(int row, int col);
+ void setBoard();
+ void reset();
+
+signals:
+ void isPlayingChanged();
+ void hasWonChanged();
+ void numMinesChanged();
+ void numFlagsChanged();
+
+private:
+ bool onBoard( int r, int c ) const { return r >= 0 && r < numRows && c >= 0 && c < numCols; }
+ Tile *tile( int row, int col ) { return onBoard(row, col) ? _tiles[col+numRows*row] : 0; }
+ int getHint(int row, int col);
+ void setPlaying(bool b){if(b==playing) return; playing=b; emit isPlayingChanged();}
+
+ QList<Tile *> _tiles;
+ int numCols;
+ int numRows;
+ bool playing;
+ bool won;
+ int remaining;
+ int nMines;
+ int nFlags;
+};
+
+MinehuntGame::MinehuntGame()
+: numCols(9), numRows(9), playing(true), won(false)
+{
+ setObjectName("mainObject");
+ srand(QTime(0,0,0).secsTo(QTime::currentTime()));
+
+ //initialize array
+ for(int ii = 0; ii < numRows * numCols; ++ii) {
+ _tiles << new Tile;
+ }
+ reset();
+
+}
+
+void MinehuntGame::setBoard()
+{
+ foreach(Tile* t, _tiles){
+ t->setHasMine(false);
+ t->setHint(-1);
+ }
+ //place mines
+ int mines = nMines;
+ remaining = numRows*numCols-mines;
+ while ( mines ) {
+ int col = int((double(rand()) / double(RAND_MAX)) * numCols);
+ int row = int((double(rand()) / double(RAND_MAX)) * numRows);
+
+ Tile* t = tile( row, col );
+
+ if (t && !t->hasMine()) {
+ t->setHasMine( true );
+ mines--;
+ }
+ }
+
+ //set hints
+ for (int r = 0; r < numRows; r++)
+ for (int c = 0; c < numCols; c++) {
+ Tile* t = tile(r, c);
+ if (t && !t->hasMine()) {
+ int hint = getHint(r,c);
+ t->setHint(hint);
+ }
+ }
+
+ setPlaying(true);
+}
+
+void MinehuntGame::reset()
+{
+ foreach(Tile* t, _tiles){
+ t->unflip();
+ t->setHasFlag(false);
+ }
+ nMines = 12;
+ nFlags = 0;
+ setPlaying(false);
+ QTimer::singleShot(600,this, SLOT(setBoard()));
+}
+
+int MinehuntGame::getHint(int row, int col)
+{
+ int hint = 0;
+ for (int c = col-1; c <= col+1; c++)
+ for (int r = row-1; r <= row+1; r++) {
+ Tile* t = tile(r, c);
+ if (t && t->hasMine())
+ hint++;
+ }
+ return hint;
+}
+
+bool MinehuntGame::flip(int row, int col)
+{
+ if(!playing)
+ return false;
+
+ Tile *t = tile(row, col);
+ if (!t || t->hasFlag())
+ return false;
+
+ if(t->flipped()){
+ int flags = 0;
+ for (int c = col-1; c <= col+1; c++)
+ for (int r = row-1; r <= row+1; r++) {
+ Tile *nearT = tile(r, c);
+ if(!nearT || nearT == t)
+ continue;
+ if(nearT->hasFlag())
+ flags++;
+ }
+ if(!t->hint() || t->hint() != flags)
+ return false;
+ for (int c = col-1; c <= col+1; c++)
+ for (int r = row-1; r <= row+1; r++) {
+ Tile *nearT = tile(r, c);
+ if (nearT && !nearT->flipped() && !nearT->hasFlag()) {
+ flip( r, c );
+ }
+ }
+ return true;
+ }
+
+ t->flip();
+
+ if (t->hint() == 0) {
+ for (int c = col-1; c <= col+1; c++)
+ for (int r = row-1; r <= row+1; r++) {
+ Tile* t = tile(r, c);
+ if (t && !t->flipped()) {
+ flip( r, c );
+ }
+ }
+ }
+
+ if(t->hasMine()){
+ for (int r = 0; r < numRows; r++)//Flip all other mines
+ for (int c = 0; c < numCols; c++) {
+ Tile* t = tile(r, c);
+ if (t && t->hasMine()) {
+ flip(r, c);
+ }
+ }
+ won = false;
+ hasWonChanged();
+ setPlaying(false);
+ }
+
+ remaining--;
+ if(!remaining){
+ won = true;
+ hasWonChanged();
+ setPlaying(false);
+ }
+ return true;
+}
+
+bool MinehuntGame::flag(int row, int col)
+{
+ Tile *t = tile(row, col);
+ if(!t)
+ return false;
+
+ t->setHasFlag(!t->hasFlag());
+ nFlags += (t->hasFlag()?1:-1);
+ emit numFlagsChanged();
+ return true;
+}
+
+QML_DECLARE_TYPE(Tile);
+QML_DECLARE_TYPE(MinehuntGame);
+
+class MinehuntExtensionPlugin : public QDeclarativeExtensionPlugin
+{
+ Q_OBJECT
+
+ public:
+ void registerTypes(const char *uri) {
+ Q_UNUSED(uri);
+ QML_REGISTER_TYPE(SameGameCore, 0, 1, Tile, Tile);
+ QML_REGISTER_TYPE(SameGameCore, 0, 1, Game, MinehuntGame);
+ }
+
+ void initializeEngine(QDeclarativeEngine *engine, const char *uri) {
+ Q_UNUSED(uri);
+
+ srand(QTime(0,0,0).secsTo(QTime::currentTime()));
+
+ MinehuntGame* game = new MinehuntGame();
+
+ engine->rootContext()->addDefaultObject(game);
+ }
+};
+
+#include "minehunt.moc"
+
+Q_EXPORT_PLUGIN(MinehuntExtensionPlugin);
+
diff --git a/demos/declarative/minehunt/minehunt.pro b/demos/declarative/minehunt/minehunt.pro
new file mode 100644
index 0000000000..2df33e6cc8
--- /dev/null
+++ b/demos/declarative/minehunt/minehunt.pro
@@ -0,0 +1,25 @@
+TEMPLATE = lib
+TARGET = minehunt
+QT += declarative
+CONFIG += qt plugin
+
+TARGET = $$qtLibraryTarget($$TARGET)
+DESTDIR = MinehuntCore
+
+# Input
+SOURCES += minehunt.cpp
+
+
+sources.files = minehunt.qml minehunt.pro
+sources.path = $$[QT_INSTALL_DEMOS]/declarative/minehunt
+
+target.path = $$[QT_INSTALL_DEMOS]/declarative/minehunt/MinehuntCore
+
+MinehuntCore_sources.files = \
+ MinehuntCore/Explosion.qml \
+ MinehuntCore/pics \
+ MinehuntCore/qmldir
+MinehuntCore_sources.path = $$[QT_INSTALL_DEMOS]/declarative/minehunt/MinehuntCore
+
+INSTALLS = sources MinehuntCore_sources target
+
diff --git a/demos/declarative/minehunt/minehunt.qml b/demos/declarative/minehunt/minehunt.qml
new file mode 100644
index 0000000000..9e9970645d
--- /dev/null
+++ b/demos/declarative/minehunt/minehunt.qml
@@ -0,0 +1,190 @@
+import Qt 4.6
+import MinehuntCore 1.0
+
+Item {
+ id: field
+ width: 370
+ height: 480
+
+ property int clickx : 0
+ property int clicky : 0
+
+ resources: [
+ Component {
+ id: tile
+ Flipable {
+ id: flipable
+ width: 40
+ height: 40
+ property int angle: 0;
+ transform: Rotation {
+ origin.x: 20
+ origin.y: 20
+ axis.x: 1
+ axis.z: 0
+ angle: flipable.angle;
+ }
+ front: Image {
+ source: "MinehuntCore/pics/front.png"
+ width: 40
+ height: 40
+ Image {
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ source: "MinehuntCore/pics/flag.png"
+ opacity: modelData.hasFlag
+ Behavior on opacity {
+ NumberAnimation {
+ property: "opacity"
+ duration: 250
+ }
+ }
+ }
+ }
+ back: Image {
+ source: "MinehuntCore/pics/back.png"
+ width: 40
+ height: 40
+ Text {
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ text: modelData.hint
+ color: "white"
+ font.bold: true
+ opacity: !modelData.hasMine && modelData.hint > 0
+ }
+ Image {
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ source: "MinehuntCore/pics/bomb.png"
+ opacity: modelData.hasMine
+ }
+ Explosion {
+ id: expl
+ }
+ }
+ states: [
+ State {
+ name: "back"
+ when: modelData.flipped
+ PropertyChanges { target: flipable; angle: 180 }
+ }
+ ]
+ transitions: [
+ Transition {
+ SequentialAnimation {
+ PauseAnimation {
+ duration: {
+ var ret;
+ if(flipable.parent != null)
+ ret = Math.abs(flipable.parent.x-field.clickx)
+ + Math.abs(flipable.parent.y-field.clicky);
+ else
+ ret = 0;
+ if (ret > 0) {
+ if (modelData.hasMine && modelData.flipped) {
+ ret*3;
+ } else {
+ ret;
+ }
+ } else {
+ 0;
+ }
+ }
+ }
+ NumberAnimation {
+ easing.type: "InOutQuad"
+ properties: "angle"
+ }
+ ScriptAction{
+ script: if(modelData.hasMine && modelData.flipped){expl.explode = true;}
+ }
+ }
+ }
+ ]
+ MouseArea {
+ anchors.fill: parent
+ acceptedButtons: Qt.LeftButton | Qt.RightButton
+ onPressed: {
+ field.clickx = flipable.parent.x;
+ field.clicky = flipable.parent.y;
+ var row = Math.floor(index/9);
+ var col = index - (Math.floor(index/9) * 9);
+ if (mouse.button==undefined || mouse.button==Qt.RightButton) {
+ flag(row,col);
+ } else {
+ flip(row,col);
+ }
+ }
+ }
+ }
+ }
+ ]
+ Image {
+ source: "MinehuntCore/pics/No-Ones-Laughing-3.jpg"
+ fillMode: Image.Tile
+ }
+ Repeater {
+ id: repeater
+ model: tiles
+ x: 1
+ y: 1
+ Component {
+ Loader {
+ sourceComponent: tile
+ x: (index - (Math.floor(index/9) * 9)) * 41
+ y: Math.floor(index/9) * 41
+ }
+ }
+ }
+ Row {
+ id: gamedata
+ // width: 370
+ // height: 100
+ y: 400
+ x: 20
+ spacing: 20
+ Column {
+ spacing: 2
+ width: childrenRect.width
+ Image {
+ // x: 100
+ // y: 20
+ source: "MinehuntCore/pics/bomb-color.png"
+ }
+ Text {
+ // x: 100
+ // y: 60
+ anchors.horizontalCenter: parent.horizontalCenter
+ color: "white"
+ text: numMines
+ }
+ }
+ Column {
+ spacing: 2
+ width: childrenRect.width
+ Image {
+ // x: 140
+ // y: 20
+ source: "MinehuntCore/pics/flag-color.png"
+ }
+ Text {
+ // x: 140
+ // y: 60
+ anchors.horizontalCenter: parent.horizontalCenter
+ color: "white"
+ text: numFlags
+ }
+ }
+ }
+ Image {
+ y: 390
+ anchors.right: field.right
+ anchors.rightMargin: 20
+ source: isPlaying ? 'MinehuntCore/pics/face-smile.png' : hasWon ? 'MinehuntCore/pics/face-smile-big.png': 'MinehuntCore/pics/face-sad.png'
+ MouseArea {
+ anchors.fill: parent
+ onPressed: { reset() }
+ }
+ }
+}
diff --git a/demos/declarative/samegame/SamegameCore/BoomBlock.qml b/demos/declarative/samegame/SamegameCore/BoomBlock.qml
new file mode 100644
index 0000000000..e48194a7e3
--- /dev/null
+++ b/demos/declarative/samegame/SamegameCore/BoomBlock.qml
@@ -0,0 +1,55 @@
+import Qt 4.6
+
+Item { id:block
+ property bool dying: false
+ property bool spawned: false
+ property int type: 0
+ property int targetX: 0
+ property int targetY: 0
+
+ SpringFollow on x { enabled: spawned; source: targetX; spring: 2; damping: 0.2 }
+ SpringFollow on y { source: targetY; spring: 2; damping: 0.2 }
+
+ Image { id: img
+ source: {
+ if(type == 0){
+ "pics/redStone.png";
+ } else if(type == 1) {
+ "pics/blueStone.png";
+ } else {
+ "pics/greenStone.png";
+ }
+ }
+ opacity: 0
+ Behavior on opacity { NumberAnimation { duration: 200 } }
+ anchors.fill: parent
+ }
+
+ Particles { id: particles
+ width:1; height:1; anchors.centerIn: parent;
+ emissionRate: 0;
+ lifeSpan: 700; lifeSpanDeviation: 600;
+ angle: 0; angleDeviation: 360;
+ velocity: 100; velocityDeviation:30;
+ source: {
+ if(type == 0){
+ "pics/redStar.png";
+ } else if (type == 1) {
+ "pics/blueStar.png";
+ } else {
+ "pics/greenStar.png";
+ }
+ }
+ }
+
+ states: [
+ State{ name: "AliveState"; when: spawned == true && dying == false
+ PropertyChanges { target: img; opacity: 1 }
+ },
+ State{ name: "DeathState"; when: dying == true
+ StateChangeScript { script: particles.burst(50); }
+ PropertyChanges { target: img; opacity: 0 }
+ StateChangeScript { script: block.destroy(1000); }
+ }
+ ]
+}
diff --git a/demos/declarative/samegame/SamegameCore/Button.qml b/demos/declarative/samegame/SamegameCore/Button.qml
new file mode 100644
index 0000000000..6629302051
--- /dev/null
+++ b/demos/declarative/samegame/SamegameCore/Button.qml
@@ -0,0 +1,25 @@
+import Qt 4.6
+
+Rectangle {
+ id: container
+
+ signal clicked
+ property string text: "Button"
+
+ color: activePalette.button; smooth: true
+ width: txtItem.width + 20; height: txtItem.height + 6
+ border.width: 1; border.color: Qt.darker(activePalette.button); radius: 8;
+
+ gradient: Gradient {
+ GradientStop {
+ id: topGrad; position: 0.0
+ color: if (mr.pressed) { activePalette.dark } else { activePalette.light } }
+ GradientStop { position: 1.0; color: activePalette.button }
+ }
+
+ MouseArea { id: mr; anchors.fill: parent; onClicked: container.clicked() }
+
+ Text {
+ id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText
+ }
+}
diff --git a/demos/declarative/samegame/SamegameCore/Dialog.qml b/demos/declarative/samegame/SamegameCore/Dialog.qml
new file mode 100644
index 0000000000..6d5d6b58b0
--- /dev/null
+++ b/demos/declarative/samegame/SamegameCore/Dialog.qml
@@ -0,0 +1,22 @@
+import Qt 4.6
+
+Rectangle {
+ id: page
+ function forceClose() {
+ page.closed();
+ page.opacity = 0;
+ }
+ function show(txt) {
+ myText.text = txt;
+ page.opacity = 1;
+ }
+ signal closed();
+ property Item text: myText
+ color: "white"; border.width: 1; width: myText.width + 20; height: myText.height + 40;
+ opacity: 0
+ Behavior on opacity {
+ NumberAnimation { duration: 1000 }
+ }
+ Text { id: myText; anchors.centerIn: parent; text: "Hello World!" }
+ MouseArea { id: mr; anchors.fill: parent; onClicked: forceClose(); }
+}
diff --git a/demos/declarative/samegame/SamegameCore/pics/background.png b/demos/declarative/samegame/SamegameCore/pics/background.png
new file mode 100644
index 0000000000..3734a27744
--- /dev/null
+++ b/demos/declarative/samegame/SamegameCore/pics/background.png
Binary files differ
diff --git a/demos/declarative/samegame/SamegameCore/pics/blueStar.png b/demos/declarative/samegame/SamegameCore/pics/blueStar.png
new file mode 100644
index 0000000000..ff9588f80a
--- /dev/null
+++ b/demos/declarative/samegame/SamegameCore/pics/blueStar.png
Binary files differ
diff --git a/demos/declarative/samegame/SamegameCore/pics/blueStone.png b/demos/declarative/samegame/SamegameCore/pics/blueStone.png
new file mode 100644
index 0000000000..20e43c75b6
--- /dev/null
+++ b/demos/declarative/samegame/SamegameCore/pics/blueStone.png
Binary files differ
diff --git a/demos/declarative/samegame/SamegameCore/pics/greenStar.png b/demos/declarative/samegame/SamegameCore/pics/greenStar.png
new file mode 100644
index 0000000000..cd06854719
--- /dev/null
+++ b/demos/declarative/samegame/SamegameCore/pics/greenStar.png
Binary files differ
diff --git a/demos/declarative/samegame/SamegameCore/pics/greenStone.png b/demos/declarative/samegame/SamegameCore/pics/greenStone.png
new file mode 100644
index 0000000000..b568a1900c
--- /dev/null
+++ b/demos/declarative/samegame/SamegameCore/pics/greenStone.png
Binary files differ
diff --git a/demos/declarative/samegame/SamegameCore/pics/redStar.png b/demos/declarative/samegame/SamegameCore/pics/redStar.png
new file mode 100644
index 0000000000..0a4dffe583
--- /dev/null
+++ b/demos/declarative/samegame/SamegameCore/pics/redStar.png
Binary files differ
diff --git a/demos/declarative/samegame/SamegameCore/pics/redStone.png b/demos/declarative/samegame/SamegameCore/pics/redStone.png
new file mode 100644
index 0000000000..36b09a2686
--- /dev/null
+++ b/demos/declarative/samegame/SamegameCore/pics/redStone.png
Binary files differ
diff --git a/demos/declarative/samegame/SamegameCore/pics/star.png b/demos/declarative/samegame/SamegameCore/pics/star.png
new file mode 100644
index 0000000000..defbde53ca
--- /dev/null
+++ b/demos/declarative/samegame/SamegameCore/pics/star.png
Binary files differ
diff --git a/demos/declarative/samegame/SamegameCore/pics/yellowStone.png b/demos/declarative/samegame/SamegameCore/pics/yellowStone.png
new file mode 100644
index 0000000000..b1ce76212c
--- /dev/null
+++ b/demos/declarative/samegame/SamegameCore/pics/yellowStone.png
Binary files differ
diff --git a/demos/declarative/samegame/SamegameCore/qmldir b/demos/declarative/samegame/SamegameCore/qmldir
new file mode 100644
index 0000000000..a8f8a98537
--- /dev/null
+++ b/demos/declarative/samegame/SamegameCore/qmldir
@@ -0,0 +1,3 @@
+BoomBlock 0.0 BoomBlock.qml
+Button 0.0 Button.qml
+Dialog 0.0 Dialog.qml
diff --git a/demos/declarative/samegame/SamegameCore/samegame.js b/demos/declarative/samegame/SamegameCore/samegame.js
new file mode 100755
index 0000000000..1214b7937e
--- /dev/null
+++ b/demos/declarative/samegame/SamegameCore/samegame.js
@@ -0,0 +1,250 @@
+/* This script file handles the game logic */
+//Note that X/Y referred to here are in game coordinates
+var maxX = 10;//Nums are for gameCanvas.tileSize 40
+var maxY = 15;
+var maxIndex = maxX*maxY;
+var board = new Array(maxIndex);
+var tileSrc = "SamegameCore/BoomBlock.qml";
+var scoresURL = "http://qtfx-nokia.trolltech.com.au/samegame/scores.php";
+var scoresURL = "";
+var timer;
+var component = createComponent(tileSrc);
+
+//Index function used instead of a 2D array
+function index(xIdx,yIdx) {
+ return xIdx + (yIdx * maxX);
+}
+
+function timeStr(msecs) {
+ var secs = Math.floor(msecs/1000);
+ var m = Math.floor(secs/60);
+ var ret = "" + m + "m " + (secs%60) + "s";
+ return ret;
+}
+
+function getTileSize()
+{
+ return tileSize;
+}
+
+function initBoard()
+{
+ for(var i = 0; i<maxIndex; i++){
+ //Delete old blocks
+ if(board[i] != null)
+ board[i].destroy();
+ }
+
+ //Calculate board size
+ maxX = Math.floor(gameCanvas.width/gameCanvas.tileSize);
+ maxY = Math.floor(gameCanvas.height/gameCanvas.tileSize);
+ maxIndex = maxY*maxX;
+
+ //Close dialogs
+ scoreName.forceClose();
+ dialog.forceClose();
+
+ var a = new Date();
+ //Initialize Board
+ board = new Array(maxIndex);
+ gameCanvas.score = 0;
+ for(var xIdx=0; xIdx<maxX; xIdx++){
+ for(var yIdx=0; yIdx<maxY; yIdx++){
+ board[index(xIdx,yIdx)] = null;
+ createBlock(xIdx,yIdx);
+ }
+ }
+ timer = new Date();
+
+ //print(timer.valueOf() - a.valueOf());
+}
+
+var fillFound;//Set after a floodFill call to the number of tiles found
+var floodBoard;//Set to 1 if the floodFill reaches off that node
+//NOTE: Be careful with vars named x,y, as the calling object's x,y are still in scope
+function handleClick(x,y)
+{
+ var xIdx = Math.floor(x/gameCanvas.tileSize);
+ var yIdx = Math.floor(y/gameCanvas.tileSize);
+ if(xIdx >= maxX || xIdx < 0 || yIdx >= maxY || yIdx < 0)
+ return;
+ if(board[index(xIdx, yIdx)] == null)
+ return;
+ //If it's a valid tile, remove it and all connected (does nothing if it's not connected)
+ floodFill(xIdx,yIdx, -1);
+ if(fillFound <= 0)
+ return;
+ gameCanvas.score += (fillFound - 1) * (fillFound - 1);
+ shuffleDown();
+ victoryCheck();
+}
+
+function floodFill(xIdx,yIdx,type)
+{
+ if(board[index(xIdx, yIdx)] == null)
+ return;
+ var first = false;
+ if(type == -1){
+ first = true;
+ type = board[index(xIdx,yIdx)].type;
+
+ //Flood fill initialization
+ fillFound = 0;
+ floodBoard = new Array(maxIndex);
+ }
+ if(xIdx >= maxX || xIdx < 0 || yIdx >= maxY || yIdx < 0)
+ return;
+ if(floodBoard[index(xIdx, yIdx)] == 1 || (!first && type != board[index(xIdx,yIdx)].type))
+ return;
+ floodBoard[index(xIdx, yIdx)] = 1;
+ floodFill(xIdx+1,yIdx,type);
+ floodFill(xIdx-1,yIdx,type);
+ floodFill(xIdx,yIdx+1,type);
+ floodFill(xIdx,yIdx-1,type);
+ if(first==true && fillFound == 0)
+ return;//Can't remove single tiles
+ board[index(xIdx,yIdx)].dying = true;
+ board[index(xIdx,yIdx)] = null;
+ fillFound += 1;
+}
+
+function shuffleDown()
+{
+ //Fall down
+ for(var xIdx=0; xIdx<maxX; xIdx++){
+ var fallDist = 0;
+ for(var yIdx=maxY-1; yIdx>=0; yIdx--){
+ if(board[index(xIdx,yIdx)] == null){
+ fallDist += 1;
+ }else{
+ if(fallDist > 0){
+ var obj = board[index(xIdx,yIdx)];
+ obj.targetY += fallDist * gameCanvas.tileSize;
+ board[index(xIdx,yIdx+fallDist)] = obj;
+ board[index(xIdx,yIdx)] = null;
+ }
+ }
+ }
+ }
+ //Fall to the left
+ fallDist = 0;
+ for(xIdx=0; xIdx<maxX; xIdx++){
+ if(board[index(xIdx, maxY - 1)] == null){
+ fallDist += 1;
+ }else{
+ if(fallDist > 0){
+ for(yIdx=0; yIdx<maxY; yIdx++){
+ obj = board[index(xIdx,yIdx)];
+ if(obj == null)
+ continue;
+ obj.targetX -= fallDist * gameCanvas.tileSize;
+ board[index(xIdx-fallDist,yIdx)] = obj;
+ board[index(xIdx,yIdx)] = null;
+ }
+ }
+ }
+ }
+}
+
+function victoryCheck()
+{
+ //awards bonuses for no tiles left
+ var deservesBonus = true;
+ for(var xIdx=maxX-1; xIdx>=0; xIdx--)
+ if(board[index(xIdx, maxY - 1)] != null)
+ deservesBonus = false;
+ if(deservesBonus)
+ gameCanvas.score += 500;
+ //Checks for game over
+ if(deservesBonus || !(floodMoveCheck(0,maxY-1, -1))){
+ timer = new Date() - timer;
+ //scoreName.show("You won! Please enter your name: ");
+ scoreName.show("You won! Please enter your name: ");
+ scoreName.initialWidth = scoreName.text.width + 20;
+ scoreName.width = scoreName.initialWidth;
+ scoreName.text.opacity = 0;//Just a spacer
+ //dialog.show("Game Over. Your score is " + gameCanvas.score);
+ }
+}
+
+//only floods up and right, to see if it can find adjacent same-typed tiles
+function floodMoveCheck(xIdx, yIdx, type)
+{
+ if(xIdx >= maxX || xIdx < 0 || yIdx >= maxY || yIdx < 0)
+ return false;
+ if(board[index(xIdx, yIdx)] == null)
+ return false;
+ var myType = board[index(xIdx, yIdx)].type;
+ if(type == myType)
+ return true;
+ return floodMoveCheck(xIdx + 1, yIdx, myType) ||
+ floodMoveCheck(xIdx, yIdx - 1, board[index(xIdx,yIdx)].type);
+}
+
+function createBlock(xIdx,yIdx){
+ // Note that we don't wait for the component to become ready. This will
+ // only work if the block QML is a local file. Otherwise the component will
+ // not be ready immediately. There is a statusChanged signal on the
+ // component you could use if you want to wait to load remote files.
+ if(component.isReady){
+ var dynamicObject = component.createObject();
+ if(dynamicObject == null){
+ print("error creating block");
+ print(component.errorsString());
+ return false;
+ }
+ dynamicObject.type = Math.floor(Math.random() * 3);
+ dynamicObject.parent = gameCanvas;
+ dynamicObject.x = xIdx*gameCanvas.tileSize;
+ dynamicObject.targetX = xIdx*gameCanvas.tileSize;
+ dynamicObject.targetY = yIdx*gameCanvas.tileSize;
+ dynamicObject.width = gameCanvas.tileSize;
+ dynamicObject.height = gameCanvas.tileSize;
+ dynamicObject.spawned = true;
+ board[index(xIdx,yIdx)] = dynamicObject;
+ }else{//isError or isLoading
+ print("error loading block component");
+ print(component.errorsString());
+ return false;
+ }
+ return true;
+}
+
+function saveHighScore(name) {
+ if(scoresURL!="")
+ sendHighScore(name);
+ //OfflineStorage
+ var db = openDatabaseSync("SameGameScores", "1.0", "Local SameGame High Scores",100);
+ var dataStr = "INSERT INTO Scores VALUES(?, ?, ?, ?)";
+ var data = [name, gameCanvas.score, maxX+"x"+maxY ,Math.floor(timer/1000)];
+ db.transaction(
+ function(tx) {
+ tx.executeSql('CREATE TABLE IF NOT EXISTS Scores(name TEXT, score NUMBER, gridSize TEXT, time NUMBER)');
+ tx.executeSql(dataStr, data);
+
+ //Only show results for the current grid size
+ var rs = tx.executeSql('SELECT * FROM Scores WHERE gridSize = "'+maxX+"x"+maxY+'" ORDER BY score desc LIMIT 10');
+ var r = "\nHIGH SCORES for this grid size\n\n"
+ for(var i = 0; i < rs.rows.length; i++){
+ r += (i+1)+". " + rs.rows.item(i).name +' got '
+ + rs.rows.item(i).score + ' points in '
+ + rs.rows.item(i).time + ' seconds.\n';
+ }
+ dialog.show(r);
+ }
+ );
+}
+
+function sendHighScore(name) {
+ var postman = new XMLHttpRequest()
+ var postData = "name="+name+"&score="+gameCanvas.score
+ +"&gridSize="+maxX+"x"+maxY +"&time="+Math.floor(timer/1000);
+ postman.open("POST", scoresURL, true);
+ postman.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+ postman.onreadystatechange = function() {
+ if (postman.readyState == postman.DONE) {
+ dialog.show("Your score has been uploaded.");
+ }
+ }
+ postman.send(postData);
+}
diff --git a/demos/declarative/samegame/highscores/README b/demos/declarative/samegame/highscores/README
new file mode 100644
index 0000000000..eaa00fae37
--- /dev/null
+++ b/demos/declarative/samegame/highscores/README
@@ -0,0 +1 @@
+The SameGame example can interface with a simple PHP script to store XML high score data on a remote server. We do not have a publically accessible server available for this use, but if you have access to a PHP capable webserver you can copy the files (score_data.xml, score.php, score_style.xsl) to it and alter the highscore_server variable at the top of the samegame.js file to point to it.
diff --git a/demos/declarative/samegame/highscores/score_data.xml b/demos/declarative/samegame/highscores/score_data.xml
new file mode 100755
index 0000000000..c3fd90d9cf
--- /dev/null
+++ b/demos/declarative/samegame/highscores/score_data.xml
@@ -0,0 +1,2 @@
+<record><score>1000000</score><name>Alan the Tester</name><gridSize>0x0</gridSize><seconds>0</seconds></record>
+<record><score>6213</score><name>Alan</name><gridSize>12x17</gridSize><seconds>51</seconds></record>
diff --git a/demos/declarative/samegame/highscores/score_style.xsl b/demos/declarative/samegame/highscores/score_style.xsl
new file mode 100755
index 0000000000..670354c965
--- /dev/null
+++ b/demos/declarative/samegame/highscores/score_style.xsl
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:template match="/">
+ <html>
+ <head><title>SameGame High Scores</title></head>
+ <body>
+ <h2>SameGame High Scores</h2>
+ <table border="1">
+ <tr bgcolor="lightsteelblue">
+ <th>Name</th>
+ <th>Score</th>
+ <th>Grid Size</th>
+ <th>Time, s</th>
+ </tr>
+ <xsl:for-each select="records/record">
+ <xsl:sort select="score" data-type="number" order="descending"/>
+ <tr>
+ <td><xsl:value-of select="name"/></td>
+ <td><xsl:value-of select="score"/></td>
+ <td><xsl:value-of select="gridSize"/></td>
+ <td><xsl:value-of select="seconds"/></td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </body>
+ </html>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/demos/declarative/samegame/highscores/scores.php b/demos/declarative/samegame/highscores/scores.php
new file mode 100755
index 0000000000..3cceb2d738
--- /dev/null
+++ b/demos/declarative/samegame/highscores/scores.php
@@ -0,0 +1,34 @@
+<?php
+ $score = $_POST["score"];
+ echo "<html>";
+ echo "<head><title>SameGame High Scores</title></head><body>";
+ if($score > 0){#Sending in a new high score
+ $name = $_POST["name"];
+ $grid = $_POST["gridSize"];
+ $time = $_POST["time"];
+ if($name == "")
+ $name = "Anonymous";
+ //if($grid != "10x10"){
+ //Need a standard, so as to reject others?
+ //}
+ $file = fopen("score_data.xml", "a"); #It's XML. Happy?
+ $ret = fwrite($file, "<record><score>". $score . "</score><name>"
+ . $name . "</name><gridSize>" . $grid . "</gridSize><seconds>"
+ . $time . "</seconds></record>\n");
+ echo "Your score has been recorded. Thanks for playing!";
+ if($ret == False)
+ echo "<br/> There was an error though, so don't expect to see that score again.";
+ }else{#Read high score list
+ #Now uses XSLT to display. So just print the file. With XML cruft added.
+ #Note that firefox at least won't apply the XSLT on a php file. So redirecting
+ $file = fopen("scores.xml", "w");
+ $ret = fwrite($file, '<?xml version="1.0" encoding="ISO-8859-1"?>' . "\n"
+ . '<?xml-stylesheet type="text/xsl" href="score_style.xsl"?>' . "\n"
+ . "<records>\n" . file_get_contents("score_data.xml") . "</records>\n");
+ if($ret == False)
+ echo "There was an internal error. Sorry.";
+ else
+ echo '<script type="text/javascript">window.location.replace("scores.xml")</script>';
+ }
+ echo "</body></html>";
+?>
diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml
new file mode 100644
index 0000000000..3b19cbe418
--- /dev/null
+++ b/demos/declarative/samegame/samegame.qml
@@ -0,0 +1,95 @@
+import Qt 4.6
+import SamegameCore 1.0
+
+Rectangle {
+ id: screen
+ width: 490; height: 720
+
+ SystemPalette { id: activePalette }
+
+ Item {
+ width: parent.width; anchors.top: parent.top; anchors.bottom: toolBar.top
+
+ Image {
+ id: background
+ anchors.fill: parent; source: "SamegameCore/pics/background.png"
+ fillMode: Image.PreserveAspectCrop
+ smooth: true
+ }
+
+ Item {
+ id: gameCanvas
+ property int score: 0
+ property int tileSize: 40
+
+ Script { source: "SamegameCore/samegame.js" }
+
+ z: 20; anchors.centerIn: parent
+ width: parent.width - (parent.width % getTileSize());
+ height: parent.height - (parent.height % getTileSize());
+
+ MouseArea {
+ id: gameMR
+ anchors.fill: parent; onClicked: handleClick(mouse.x,mouse.y);
+ }
+ }
+ }
+
+ Dialog { id: dialog; anchors.centerIn: parent; z: 21 }
+ Dialog {
+ id: scoreName; anchors.centerIn: parent; z: 22;
+ property int initialWidth: 0
+ Behavior on width {NumberAnimation{} enabled: initialWidth!=0}
+ Text {
+ id: spacer
+ anchors.left: scoreName.left
+ anchors.leftMargin: 20
+ anchors.verticalCenter: parent.verticalCenter
+ text: "You won! Please enter your name: "
+ }
+ TextInput {
+ id: editor
+ onTextChanged: {
+ var newWidth = editor.width + spacer.width + 40;
+ if((newWidth > scoreName.width && newWidth < screen.width)
+ || (scoreName.width > scoreName.initialWidth))
+ scoreName.width = newWidth;
+ }
+ onAccepted: {
+ if(scoreName.opacity==1&&editor.text!="")
+ saveHighScore(editor.text);
+ scoreName.forceClose();
+ }
+ anchors.verticalCenter: parent.verticalCenter
+ focus: true
+ anchors.left: spacer.right
+ }
+ }
+
+ Rectangle {
+ id: toolBar
+ color: activePalette.window
+ height: 32; width: parent.width
+ anchors.bottom: screen.bottom
+
+ Button {
+ id: btnA; text: "New Game"; onClicked: {initBoard();}
+ anchors.left: parent.left; anchors.leftMargin: 3
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Button {
+ id: btnB; text: "Quit"; onClicked: {Qt.quit();}
+ anchors.left: btnA.right; anchors.leftMargin: 3
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Text {
+ id: score
+ text: "Score: " + gameCanvas.score; font.bold: true
+ anchors.right: parent.right; anchors.rightMargin: 3
+ anchors.verticalCenter: parent.verticalCenter
+ color: activePalette.windowText
+ }
+ }
+}
diff --git a/demos/declarative/snake/content/Button.qml b/demos/declarative/snake/content/Button.qml
new file mode 100644
index 0000000000..6629302051
--- /dev/null
+++ b/demos/declarative/snake/content/Button.qml
@@ -0,0 +1,25 @@
+import Qt 4.6
+
+Rectangle {
+ id: container
+
+ signal clicked
+ property string text: "Button"
+
+ color: activePalette.button; smooth: true
+ width: txtItem.width + 20; height: txtItem.height + 6
+ border.width: 1; border.color: Qt.darker(activePalette.button); radius: 8;
+
+ gradient: Gradient {
+ GradientStop {
+ id: topGrad; position: 0.0
+ color: if (mr.pressed) { activePalette.dark } else { activePalette.light } }
+ GradientStop { position: 1.0; color: activePalette.button }
+ }
+
+ MouseArea { id: mr; anchors.fill: parent; onClicked: container.clicked() }
+
+ Text {
+ id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText
+ }
+}
diff --git a/demos/declarative/snake/content/Cookie.qml b/demos/declarative/snake/content/Cookie.qml
new file mode 100644
index 0000000000..0ea95cbfd3
--- /dev/null
+++ b/demos/declarative/snake/content/Cookie.qml
@@ -0,0 +1,48 @@
+import Qt 4.6
+
+Item {
+ id: root
+ property bool dying: false
+ property int row;
+ property int column;
+ x: margin + column * gridSize
+ y: margin + row * gridSize
+
+ width: gridSize
+ height: gridSize
+ property int value : 1;
+
+ Image {
+ id: img
+ anchors.fill: parent
+ source: "pics/cookie.png"
+ opacity: 0
+ Behavior on opacity { NumberAnimation { duration: 100 } }
+ Text {
+ font.bold: true
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: value
+ }
+ }
+
+
+ Particles { id: particles
+ width:1; height:1; anchors.centerIn: parent;
+ emissionRate: 0;
+ lifeSpan: 700; lifeSpanDeviation: 600;
+ angle: 0; angleDeviation: 360;
+ velocity: 100; velocityDeviation:30;
+ source: "pics/yellowStar.png";
+ }
+
+ states: [
+ State{ name: "AliveState"; when: dying == false
+ PropertyChanges { target: img; opacity: 1 }
+ },
+ State{ name: "DeathState"; when: dying == true
+ StateChangeScript { script: particles.burst(50); }
+ PropertyChanges { target: img; opacity: 0 }
+ }
+ ]
+}
diff --git a/demos/declarative/snake/content/HighScoreModel.qml b/demos/declarative/snake/content/HighScoreModel.qml
new file mode 100644
index 0000000000..f585ce85fd
--- /dev/null
+++ b/demos/declarative/snake/content/HighScoreModel.qml
@@ -0,0 +1,100 @@
+import Qt 4.6
+
+// Models a high score table.
+//
+// Use this component like this:
+//
+// HighScoreModel {
+// id: highScores
+// game: "MyCoolGame"
+// }
+//
+// Then use either use the top-score properties:
+//
+// Text { text: "HI: " + highScores.topScore }
+//
+// or, use the model in a view:
+//
+// ListView {
+// model: highScore
+// delegate: Component {
+// ... player ... score ...
+// }
+// }
+//
+// Add new scores via:
+//
+// saveScore(newScore)
+//
+// or:
+//
+// savePlayerScore(playerName,newScore)
+//
+// The best maxScore scores added by this method will be retained in an SQL database,
+// and presented in the model and in the topScore/topPlayer properties.
+//
+
+ListModel {
+ id: model
+ property string game: ""
+ property int topScore: 0
+ property string topPlayer: ""
+ property int maxScores: 10
+
+ Script {
+ function db()
+ {
+ return openDatabaseSync("HighScoreModel", "1.0", "Generic High Score Functionality for QML", 1000000);
+ }
+ function ensureTables(tx)
+ {
+ tx.executeSql('CREATE TABLE IF NOT EXISTS HighScores(game TEXT, score INT, player TEXT)', []);
+ }
+ }
+
+ function fillModel() {
+ db().transaction(
+ function(tx) {
+ ensureTables(tx);
+ var rs = tx.executeSql("SELECT score,player FROM HighScores WHERE game=? ORDER BY score DESC", [game]);
+ model.clear();
+ if (rs.rows.length > 0) {
+ topScore = rs.rows.item(0).score
+ topPlayer = rs.rows.item(0).player
+ for (var i=0; i<rs.rows.length; ++i) {
+ if (i < maxScores)
+ model.append(rs.rows.item(i))
+ }
+ if (rs.rows.length > maxScores)
+ tx.executeSql("DELETE FROM HighScores WHERE game=? AND score <= ?",
+ [rs.rows.item(maxScores).score]);
+ }
+ }
+ )
+ }
+
+ function savePlayerScore(player,score) {
+ db().transaction(
+ function(tx) {
+ ensureTables(tx);
+ tx.executeSql("INSERT INTO HighScores VALUES(?,?,?)", [game,score,player]);
+ fillModel();
+ }
+ )
+ }
+
+ function saveScore(score) {
+ savePlayerScore("player",score);
+ }
+
+ function clearScores() {
+ db().transaction(
+ function(tx) {
+ tx.executeSql("DELETE FROM HighScores WHERE game=?", [game]);
+ fillModel();
+ }
+ )
+ }
+
+ Component.onCompleted: { fillModel() }
+}
diff --git a/demos/declarative/snake/content/Link.qml b/demos/declarative/snake/content/Link.qml
new file mode 100644
index 0000000000..31ac4b9427
--- /dev/null
+++ b/demos/declarative/snake/content/Link.qml
@@ -0,0 +1,75 @@
+import Qt 4.6
+
+Item { id:link
+ property bool dying: false
+ property bool spawned: false
+ property int type: 0
+ property int row: 0
+ property int column: 0
+ property int rotation;
+
+ width: 40;
+ height: 40
+
+ x: margin - 3 + gridSize * column
+ y: margin - 3 + gridSize * row
+ Behavior on x { NumberAnimation { duration: spawned ? heartbeatInterval : 0} }
+ Behavior on y { NumberAnimation { duration: spawned ? heartbeatInterval : 0 } }
+
+
+ Item {
+ id: img
+ anchors.fill: parent
+ Image {
+ source: {
+ if(type == 1) {
+ "pics/blueStone.png";
+ } else if (type == 2) {
+ "pics/head.png";
+ } else {
+ "pics/redStone.png";
+ }
+ }
+
+ transform: Rotation {
+ id: actualImageRotation
+ origin.x: width/2; origin.y: height/2;
+ angle: rotation * 90
+ Behavior on angle { NumberAnimation { duration: spawned ? 200 : 0} }
+ }
+ }
+
+ Image {
+ source: "pics/stoneShadow.png"
+ }
+
+ opacity: 0
+ Behavior on opacity { NumberAnimation { duration: 200 } }
+ }
+
+
+ Particles { id: particles
+ width:1; height:1; anchors.centerIn: parent;
+ emissionRate: 0;
+ lifeSpan: 700; lifeSpanDeviation: 600;
+ angle: 0; angleDeviation: 360;
+ velocity: 100; velocityDeviation:30;
+ source: {
+ if(type == 1){
+ "pics/blueStar.png";
+ } else {
+ "pics/redStar.png";
+ }
+ }
+ }
+
+ states: [
+ State{ name: "AliveState"; when: spawned == true && dying == false
+ PropertyChanges { target: img; opacity: 1 }
+ },
+ State{ name: "DeathState"; when: dying == true
+ StateChangeScript { script: particles.burst(50); }
+ PropertyChanges { target: img; opacity: 0 }
+ }
+ ]
+}
diff --git a/demos/declarative/snake/content/Skull.qml b/demos/declarative/snake/content/Skull.qml
new file mode 100644
index 0000000000..821996a227
--- /dev/null
+++ b/demos/declarative/snake/content/Skull.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+
+Image {
+ property bool spawned: false
+ property int row;
+ property int column;
+ property int verticalMovement;
+ property int horizontalMovement;
+
+ x: margin + column * gridSize + 2
+ y: margin + row * gridSize - 3
+ Behavior on x { NumberAnimation { duration: spawned ? halfbeatInterval : 0} }
+ Behavior on y { NumberAnimation { duration: spawned ? halfbeatInterval : 0 } }
+
+ opacity: spawned ? 1 : 0
+ Behavior on opacity { NumberAnimation { duration: 200 } }
+
+ source: "pics/skull.png"
+ width: 24
+ height: 40
+}
diff --git a/demos/declarative/snake/content/pics/README b/demos/declarative/snake/content/pics/README
new file mode 100644
index 0000000000..0215132caa
--- /dev/null
+++ b/demos/declarative/snake/content/pics/README
@@ -0,0 +1 @@
+snake.jpg: This image is based on the picture "Eastern Green Mamba.jpg" from the free media databse Wikimedia Commons and is published under the terms of the GNU Free Documentation License. The original picture was taken by Danleo.
diff --git a/demos/declarative/snake/content/pics/background.png b/demos/declarative/snake/content/pics/background.png
new file mode 100644
index 0000000000..72dffaa843
--- /dev/null
+++ b/demos/declarative/snake/content/pics/background.png
Binary files differ
diff --git a/demos/declarative/snake/content/pics/blueStar.png b/demos/declarative/snake/content/pics/blueStar.png
new file mode 100644
index 0000000000..ba7acabd26
--- /dev/null
+++ b/demos/declarative/snake/content/pics/blueStar.png
Binary files differ
diff --git a/demos/declarative/snake/content/pics/blueStone.png b/demos/declarative/snake/content/pics/blueStone.png
new file mode 100644
index 0000000000..356affdd95
--- /dev/null
+++ b/demos/declarative/snake/content/pics/blueStone.png
Binary files differ
diff --git a/demos/declarative/snake/content/pics/cookie.png b/demos/declarative/snake/content/pics/cookie.png
new file mode 100644
index 0000000000..aec2957f34
--- /dev/null
+++ b/demos/declarative/snake/content/pics/cookie.png
Binary files differ
diff --git a/demos/declarative/snake/content/pics/eyes.svg b/demos/declarative/snake/content/pics/eyes.svg
new file mode 100644
index 0000000000..1078692725
--- /dev/null
+++ b/demos/declarative/snake/content/pics/eyes.svg
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ width="40"
+ height="40"
+ version="1.0"
+ sodipodi:docname="eyes.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ inkscape:export-filename="/home/ettrich/dev/research/qml-validate/snake/pics/eyes.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs5">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective9" />
+ </defs>
+ <sodipodi:namedview
+ inkscape:window-height="838"
+ inkscape:window-width="907"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ guidetolerance="10.0"
+ gridtolerance="10.0"
+ objecttolerance="10.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ showgrid="false"
+ inkscape:zoom="12.35"
+ inkscape:cx="20"
+ inkscape:cy="20"
+ inkscape:window-x="117"
+ inkscape:window-y="45"
+ inkscape:current-layer="svg2" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="path2384"
+ sodipodi:cx="18.056681"
+ sodipodi:cy="9.5141697"
+ sodipodi:rx="7.1255059"
+ sodipodi:ry="11.295547"
+ d="M 25.182187,9.5141697 A 7.1255059,11.295547 0 1 1 10.931175,9.5141697 A 7.1255059,11.295547 0 1 1 25.182187,9.5141697 z"
+ transform="matrix(1.0089865,0,0,0.5462656,-4.9233835,3.3301401)" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="path3158"
+ sodipodi:cx="18.056681"
+ sodipodi:cy="9.5141697"
+ sodipodi:rx="7.1255059"
+ sodipodi:ry="11.295547"
+ d="M 25.182187,9.5141697 A 7.1255059,11.295547 0 1 1 10.931175,9.5141697 A 7.1255059,11.295547 0 1 1 25.182187,9.5141697 z"
+ transform="matrix(1.0089865,0,0,0.5462656,9.6190931,3.3522563)" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1"
+ id="path3182"
+ sodipodi:cx="16.275303"
+ sodipodi:cy="12.307693"
+ sodipodi:rx="2.2672064"
+ sodipodi:ry="3.4008098"
+ d="M 18.542509,12.307693 A 2.2672064,3.4008098 0 0 1 14.008446,12.367372"
+ sodipodi:start="0"
+ sodipodi:end="3.1240432"
+ transform="translate(11.65992,-9.740891)"
+ sodipodi:open="true" />
+ <rect
+ style="fill:#000000;fill-opacity:0"
+ id="rect2382"
+ width="40"
+ height="40"
+ x="0"
+ y="-7.1054274e-15"
+ inkscape:export-filename="/home/ettrich/dev/research/qml-validate/snake/pics/eyes.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1"
+ id="path2383"
+ sodipodi:cx="16.275303"
+ sodipodi:cy="12.307693"
+ sodipodi:rx="2.2672064"
+ sodipodi:ry="3.4008098"
+ d="M 18.542509,12.307693 A 2.2672064,3.4008098 0 0 1 14.008446,12.367372"
+ sodipodi:start="0"
+ sodipodi:end="3.1240432"
+ transform="translate(-3.3200119,-9.821862)"
+ sodipodi:open="true" />
+</svg>
diff --git a/demos/declarative/snake/content/pics/head.png b/demos/declarative/snake/content/pics/head.png
new file mode 100644
index 0000000000..550e002687
--- /dev/null
+++ b/demos/declarative/snake/content/pics/head.png
Binary files differ
diff --git a/demos/declarative/snake/content/pics/head.svg b/demos/declarative/snake/content/pics/head.svg
new file mode 100644
index 0000000000..3bf0bd2feb
--- /dev/null
+++ b/demos/declarative/snake/content/pics/head.svg
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ width="40"
+ height="40"
+ version="1.0"
+ sodipodi:docname="head.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ inkscape:export-filename="/home/ettrich/dev/research/qml-validate/snake/pics/head.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs5">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective9" />
+ <inkscape:perspective
+ id="perspective2444"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ </defs>
+ <sodipodi:namedview
+ inkscape:window-height="838"
+ inkscape:window-width="907"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ guidetolerance="10.0"
+ gridtolerance="10.0"
+ objecttolerance="10.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ showgrid="false"
+ inkscape:zoom="12.35"
+ inkscape:cx="20"
+ inkscape:cy="20"
+ inkscape:window-x="117"
+ inkscape:window-y="45"
+ inkscape:current-layer="svg2" />
+ <image
+ y="0.21862352"
+ x="-0.048582077"
+ id="image2446"
+ height="40"
+ width="40"
+ sodipodi:absref="/home/ettrich/dev/research/qml-validate/snake/pics/redStone.png"
+ xlink:href="redStone.png" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="path2384"
+ sodipodi:cx="18.056681"
+ sodipodi:cy="9.5141697"
+ sodipodi:rx="7.1255059"
+ sodipodi:ry="11.295547"
+ d="M 25.182187,9.5141697 A 7.1255059,11.295547 0 1 1 10.931175,9.5141697 A 7.1255059,11.295547 0 1 1 25.182187,9.5141697 z"
+ transform="matrix(1.0089865,0,0,0.5462656,-4.9233835,3.3301401)" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="path3158"
+ sodipodi:cx="18.056681"
+ sodipodi:cy="9.5141697"
+ sodipodi:rx="7.1255059"
+ sodipodi:ry="11.295547"
+ d="M 25.182187,9.5141697 A 7.1255059,11.295547 0 1 1 10.931175,9.5141697 A 7.1255059,11.295547 0 1 1 25.182187,9.5141697 z"
+ transform="matrix(1.0089865,0,0,0.5462656,9.6190931,3.3522563)" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1"
+ id="path3182"
+ sodipodi:cx="16.275303"
+ sodipodi:cy="12.307693"
+ sodipodi:rx="2.2672064"
+ sodipodi:ry="3.4008098"
+ d="M 18.542509,12.307693 A 2.2672064,3.4008098 0 0 1 14.008446,12.367372"
+ sodipodi:start="0"
+ sodipodi:end="3.1240432"
+ transform="translate(11.65992,-9.740891)"
+ sodipodi:open="true" />
+ <rect
+ style="fill:#000000;fill-opacity:0"
+ id="rect2382"
+ width="40"
+ height="40"
+ x="0"
+ y="-7.1054274e-15"
+ inkscape:export-filename="/home/ettrich/dev/research/qml-validate/snake/pics/eyes.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1"
+ id="path2383"
+ sodipodi:cx="16.275303"
+ sodipodi:cy="12.307693"
+ sodipodi:rx="2.2672064"
+ sodipodi:ry="3.4008098"
+ d="M 18.542509,12.307693 A 2.2672064,3.4008098 0 0 1 14.008446,12.367372"
+ sodipodi:start="0"
+ sodipodi:end="3.1240432"
+ transform="translate(-3.3200119,-9.821862)"
+ sodipodi:open="true" />
+</svg>
diff --git a/demos/declarative/snake/content/pics/redStar.png b/demos/declarative/snake/content/pics/redStar.png
new file mode 100644
index 0000000000..cd06854719
--- /dev/null
+++ b/demos/declarative/snake/content/pics/redStar.png
Binary files differ
diff --git a/demos/declarative/snake/content/pics/redStone.png b/demos/declarative/snake/content/pics/redStone.png
new file mode 100644
index 0000000000..9bb7fe4277
--- /dev/null
+++ b/demos/declarative/snake/content/pics/redStone.png
Binary files differ
diff --git a/demos/declarative/snake/content/pics/skull.png b/demos/declarative/snake/content/pics/skull.png
new file mode 100644
index 0000000000..63186167bd
--- /dev/null
+++ b/demos/declarative/snake/content/pics/skull.png
Binary files differ
diff --git a/demos/declarative/snake/content/pics/snake.jpg b/demos/declarative/snake/content/pics/snake.jpg
new file mode 100644
index 0000000000..e91a784f71
--- /dev/null
+++ b/demos/declarative/snake/content/pics/snake.jpg
Binary files differ
diff --git a/demos/declarative/snake/content/pics/star.png b/demos/declarative/snake/content/pics/star.png
new file mode 100644
index 0000000000..defbde53ca
--- /dev/null
+++ b/demos/declarative/snake/content/pics/star.png
Binary files differ
diff --git a/demos/declarative/snake/content/pics/stoneShadow.png b/demos/declarative/snake/content/pics/stoneShadow.png
new file mode 100644
index 0000000000..1bd56afd04
--- /dev/null
+++ b/demos/declarative/snake/content/pics/stoneShadow.png
Binary files differ
diff --git a/demos/declarative/snake/content/pics/yellowStar.png b/demos/declarative/snake/content/pics/yellowStar.png
new file mode 100644
index 0000000000..52fb9c4b78
--- /dev/null
+++ b/demos/declarative/snake/content/pics/yellowStar.png
Binary files differ
diff --git a/demos/declarative/snake/content/pics/yellowStone.png b/demos/declarative/snake/content/pics/yellowStone.png
new file mode 100644
index 0000000000..c56124a895
--- /dev/null
+++ b/demos/declarative/snake/content/pics/yellowStone.png
Binary files differ
diff --git a/demos/declarative/snake/content/snake.js b/demos/declarative/snake/content/snake.js
new file mode 100644
index 0000000000..12176c70d2
--- /dev/null
+++ b/demos/declarative/snake/content/snake.js
@@ -0,0 +1,308 @@
+
+var snake = new Array;
+var board = new Array;
+var links = new Array;
+var scheduledDirections = new Array;
+var numRows = 1;
+var numColumns = 1;
+var linkComponent = createComponent("content/Link.qml"); // XXX should resolve relative to script, not component
+var cookieComponent = createComponent("content/Cookie.qml");
+var cookie;
+var linksToGrow = 0;
+var linksToDie = 0;
+var waitForCookie = 0;
+var growType = 0;
+var skullMovementsBeforeDirectionChange = 0;
+
+
+function rand(n)
+{
+ return (Math.floor(Math.random() * n));
+}
+
+function scheduleDirection(dir)
+{
+ direction = dir;
+ if(scheduledDirections[scheduledDirections.length-1]!=direction)
+ scheduledDirections.push(direction);
+}
+
+function startNewGame()
+{
+ if (state == "starting")
+ return;
+
+ if (heartbeat.running) {
+ endGame();
+ startNewGameTimer.running = true;
+ return;
+ }
+ numRows = numRowsAvailable;
+ numColumns = numColumnsAvailable;
+ board = new Array(numRows * numColumns);
+ snake = new Array;
+ scheduledDirections = new Array;
+ growType = 0;
+
+ skull.z = numRows * numColumns + 1;
+
+ for (var i = 0; i < numRows * numColumns; ++i) {
+ if (i < links.length) {
+ var link = links[i];
+ link.spawned = false;
+ link.dying = false;
+ } else {
+ if(linkComponent.isReady == false){
+ if(linkComponent.isError == true)
+ print(linkComponent.errorsString());
+ else
+ print("Still loading linkComponent");
+ continue;//TODO: Better error handling?
+ }
+ var link = linkComponent.createObject();
+ link.parent = playfield;
+ link.z = numRows * numColumns + 1 - i;
+ link.type = i == 0 ? 2 : 0;
+ link.spawned = false;
+ link.dying = false;
+ links.push(link);
+ }
+ }
+
+ head = links[0];
+ snake.push(head);
+ head.row = numRows/2 -1;
+ head.column = numColumns/2 -1;
+ head.spawned = true;
+
+ linksToGrow = 5;
+ linksToDie = 0;
+ waitForCookie = 5;
+ score = 0;
+ startHeartbeatTimer.running = true;
+ heartbeat.running = true;
+}
+
+function endGame()
+{
+ heartbeat.running = false;
+ for(var i in snake)
+ snake[i].dying = true;
+ if (cookie) {
+ cookie.dying = true;
+ cookie = 0;
+ }
+ lastScore = score;
+ highScores.saveScore(lastScore);
+}
+
+function move() {
+
+ if (!head)
+ return;
+
+ var dir = direction;
+
+ if (scheduledDirections.length) {
+ dir = scheduledDirections.shift();
+ }
+
+ if (state == "starting") {
+ var turn = (dir - headDirection);
+ head.rotation += turn == -3 ? 1 : (turn == 3 ? -1 : turn );
+ headDirection = dir;
+ return;
+ }
+
+ var row = head.row;
+ var column = head.column;
+
+ if (dir == 0) {
+ row = row - 1;
+ } else if (dir == 1) {
+ column = column + 1
+ } else if (dir == 2) {
+ row = row + 1;
+ } else if (dir == 3) {
+ column = column - 1;
+ }
+
+ //validate the new position
+ if (row < 0 || row >= numRows
+ || column < 0 || column >= numColumns
+ || (row == skull.row && column == skull.column)
+ || !isFree(row, column)) {
+ var turn = (dir - headDirection);
+ head.rotation += turn == -3 ? 1 : (turn == 3 ? -1 : turn );
+ headDirection = dir;
+ endGame();
+ return;
+ }
+
+ var newLink;
+ if (linksToGrow > 0) {
+ --linksToGrow;
+ newLink = links[snake.length];
+ newLink.spawned = false;
+ newLink.rotation = snake[snake.length-1].rotation;
+ newLink.type = growType;
+ newLink.dying = false;
+ snake.push(newLink);
+ } else {
+ var lastLink = snake[snake.length-1];
+ board[lastLink.row * numColumns + lastLink.column] = Undefined;
+ }
+
+ if (waitForCookie > 0) {
+ if (--waitForCookie == 0)
+ createCookie(cookie? (cookie.value+1) : 1);
+ }
+
+ for (var i = snake.length-1; i > 0; --i) {
+ snake[i].row = snake[i-1].row;
+ snake[i].column = snake[i-1].column;
+ snake[i].rotation = snake[i-1].rotation;
+ }
+
+ if (newLink) {
+ newLink.spawned = true;
+ }
+
+ // move the head
+ head.row = row;
+ head.column = column;
+ board[row * numColumns + column] = head;
+
+ var turn = (dir - headDirection);
+ head.rotation += turn == -3 ? 1 : (turn == 3 ? -1 : turn );
+ headDirection = dir;
+
+ var value = testCookie(row, column);
+ if (value > 0) {
+ linksToGrow += value;
+ score += value;
+ }
+}
+
+function isFree(row, column)
+{
+ return board[row * numColumns + column] == Undefined;
+}
+
+function isHead(row, column)
+{
+ return head.column == column && head.row == row;
+}
+
+function testCookie(row, column)
+{
+ if (cookie && !cookie.dying && cookie.row == row && cookie.column == column) {
+ var value = cookie.value;
+ waitForCookie = value;
+ growType = snake[snake.length-1].type == 1 ? 0 : 1;
+ cookie.dying = true;
+ cookie.z = numRows * numColumns + 2;
+ return value;
+ }
+ return 0;
+}
+
+function moveSkull()
+{
+
+ if (linksToDie > 0) {
+ --linksToDie;
+ var link = snake.pop();
+ link.dying = true;
+ board[link.row * numColumns + link.column] = Undefined;
+ if (score > 0)
+ --score;
+ if (snake.length == 0) {
+ endGame();
+ return;
+ }
+ }
+
+ var row = skull.row;
+ var column = skull.column;
+ if (isHead(row, column)) {
+ endGame();
+ return;
+ }
+ row += skull.verticalMovement;
+ column += skull.horizontalMovement;
+
+ var attempts = 4;
+
+ while (skullMovementsBeforeDirectionChange == 0 || row < 0 || row >= numRows
+ || column < 0 || column >= numColumns
+ || (!isFree(row, column) && !isHead(row, column))) {
+ var d = rand(8);
+ skull.verticalMovement = 0;
+ skull.horizontalMovement = 0;
+ skullMovementsBeforeDirectionChange = rand(20)+1;
+ if (d == 0) {
+ skull.verticalMovement = -1
+ } else if (d == 1) {
+ skull.horizontalMovement = -1;
+ } else if (d == 2) {
+ skull.verticalMovement = 1
+ } else if (d == 3){
+ skull.horizontalMovement = 1;
+ } else if (cookie) {
+ var rd = cookie.row - skull.row;
+ var rc = cookie.column - skull.column;
+ if (Math.abs(rd) > Math.abs(rc)) {
+ skull.verticalMovement = rd > 0 ? 1 : -1;
+ skullMovementsBeforeDirectionChange = Math.abs(rd);
+ } else {
+ skull.horizontalMovement= rc > 0 ? 1 : -1;
+ skullMovementsBeforeDirectionChange = Math.abs(rc);
+ }
+ }
+ row = skull.row + skull.verticalMovement;
+ column = skull.column + skull.horizontalMovement;
+ if (--attempts == 0)
+ return;
+ }
+
+ skull.row = row;
+ skull.column = column;
+ --skullMovementsBeforeDirectionChange;
+ var value = testCookie(row, column);
+ if (value > 0)
+ linksToDie += value/2;
+
+ if (isHead(row, column))
+ endGame();
+}
+
+function createCookie(value) {
+ if (numRows * numColumns - snake.length < 10)
+ return;
+
+ var column = rand(numColumns);
+ var row = rand(numRows);
+ while (!isFree(row, column)) {
+ column++;
+ if (column == numColumns) {
+ column = 0;
+ row++;
+ if (row == numRows)
+ row = 0;
+ }
+ }
+
+ if(cookieComponent.isReady == false){
+ if(cookieComponent.isError == true)
+ print(cookieComponent.errorsString());
+ else
+ print("Still loading cookieComponent");
+ return;//TODO: Better error handling?
+ }
+ cookie = cookieComponent.createObject();
+ cookie.parent = head.parent;
+ cookie.value = value;
+ cookie.row = row;
+ cookie.column = column;
+}
diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml
new file mode 100644
index 0000000000..f9d02c7e0b
--- /dev/null
+++ b/demos/declarative/snake/snake.qml
@@ -0,0 +1,190 @@
+import Qt 4.6
+import "content"
+
+Rectangle {
+ id: screen;
+ SystemPalette { id: activePalette }
+ color: activePalette.window
+
+ Script { source: "content/snake.js" }
+
+ property int gridSize : 34
+ property int margin: 4
+ property int numRowsAvailable: Math.floor((height-32-2*margin)/gridSize)
+ property int numColumnsAvailable: Math.floor((width-2*margin)/gridSize)
+
+ property int lastScore : 0
+
+ property int score: 0;
+ property int heartbeatInterval: 200
+ property int halfbeatInterval: 160
+
+ width: 480
+ height: 750
+
+ property int direction
+ property int headDirection
+
+ property var head;
+
+ HighScoreModel {
+ id: highScores
+ game: "Snake"
+ }
+
+ Timer {
+ id: heartbeat;
+ interval: heartbeatInterval;
+ repeat: true
+ onTriggered: { move() }
+ }
+ Timer {
+ id: halfbeat;
+ interval: halfbeatInterval;
+ repeat: true
+ running: heartbeat.running
+ onTriggered: { moveSkull() }
+ }
+ Timer {
+ id: startNewGameTimer;
+ interval: 700;
+ onTriggered: {startNewGame(); }
+ }
+
+ Timer {
+ id: startHeartbeatTimer;
+ interval: 1000 ;
+ }
+
+
+ Image {
+ Image {
+ id: title
+ source: "content/pics/snake.jpg"
+ fillMode: "PreserveAspectCrop"
+ anchors.fill: parent
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ Behavior on opacity { NumberAnimation { duration: 500 } }
+
+ Text {
+ color: "white"
+ font.pointSize: 24
+ horizontalAlignment: "AlignHCenter"
+ text: "Last Score:\t" + lastScore + "\nHighscore:\t" + highScores.topScore;
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: gridSize
+ }
+ }
+
+ source: "content/pics/background.png"
+ fillMode: "PreserveAspectCrop"
+
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.bottom: toolbar.top
+
+ Rectangle {
+ id: playfield
+ border.width: 1
+ border.color: "white"
+ color: "transparent"
+ anchors.horizontalCenter: parent.horizontalCenter
+ y: (screen.height - 32 - height)/2;
+ width: numColumnsAvailable * gridSize + 2*margin
+ height: numRowsAvailable * gridSize + 2*margin
+
+
+ Skull {
+ id: skull
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: {
+ if (!head || !heartbeat.running) {
+ startNewGame();
+ return;
+ }
+ if (direction == 0 || direction == 2)
+ scheduleDirection((mouseX > (head.x + head.width/2)) ? 1 : 3);
+ else
+ scheduleDirection((mouseY > (head.y + head.height/2)) ? 2 : 0);
+ }
+ }
+ }
+
+ }
+
+ Rectangle {
+ id: progressBar
+ opacity: 0
+ Behavior on opacity { NumberAnimation { duration: 200 } }
+ color: "transparent"
+ border.width: 2
+ border.color: "#221edd"
+ x: 50
+ y: 50
+ width: 200
+ height: 30
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.verticalCenterOffset: 40
+
+ Rectangle {
+ id: progressIndicator
+ color: "#221edd";
+ width: 0;
+ Behavior on width { NumberAnimation { duration: startHeartbeatTimer.running ? 1000 : 0}}
+ height: 30;
+ }
+ }
+
+ Rectangle {
+ id: toolbar
+ color: activePalette.window
+ height: 32; width: parent.width
+ anchors.bottom: screen.bottom
+
+ Button {
+ id: btnA; text: "New Game"; onClicked: {startNewGame();}
+ anchors.left: parent.left; anchors.leftMargin: 3
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Text {
+ color: activePalette.text
+ text: "Score: " + score; font.bold: true
+ anchors.right: parent.right; anchors.rightMargin: 3
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ }
+
+ focus: true
+ Keys.onSpacePressed: startNewGame();
+ Keys.onLeftPressed: if (state == "starting" || direction != 1) scheduleDirection(3);
+ Keys.onRightPressed: if (state == "starting" || direction != 3) scheduleDirection(1);
+ Keys.onUpPressed: if (state == "starting" || direction != 2) scheduleDirection(0);
+ Keys.onDownPressed: if (state == "starting" || direction != 0) scheduleDirection(2);
+
+ states: [
+ State {
+ name: "starting"
+ when: startHeartbeatTimer.running
+ PropertyChanges {target: progressIndicator; width: 200}
+ PropertyChanges {target: title; opacity: 0}
+ PropertyChanges {target: progressBar; opacity: 1}
+ },
+ State {
+ name: "running"
+ when: (heartbeat.running && !startHeartbeatTimer.running)
+ PropertyChanges {target: progressIndicator; width: 200}
+ PropertyChanges {target: title; opacity: 0}
+ PropertyChanges {target: skull; row: 0; column: 0; }
+ PropertyChanges {target: skull; spawned: 1}
+ }
+ ]
+
+}
diff --git a/demos/declarative/twitter/TwitterCore/AuthView.qml b/demos/declarative/twitter/TwitterCore/AuthView.qml
new file mode 100644
index 0000000000..bcf4646bb2
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/AuthView.qml
@@ -0,0 +1,99 @@
+import Qt 4.6
+
+Item {
+ id: wrapper
+ Column {
+ anchors.centerIn: parent
+ spacing: 20
+ Column{
+ spacing: 4
+ Text {
+ text: "Screen name:"
+ font.pixelSize: 16; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black"
+ horizontalAlignment: Qt.AlignRight
+ }
+ Item {
+ width: 220
+ height: 28
+ BorderImage { source: "images/lineedit.sci"; anchors.fill: parent }
+ TextInput{
+ id: nameIn
+ width: parent.width - 8
+ anchors.centerIn: parent
+ maximumLength:21
+ font.pixelSize: 16;
+ font.bold: true
+ color: "#151515"; selectionColor: "green"
+ KeyNavigation.down: passIn
+ focus: true
+ }
+ }
+ }
+ Column{
+ spacing: 4
+ Text {
+ text: "Password:"
+ font.pixelSize: 16; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black"
+ horizontalAlignment: Qt.AlignRight
+ }
+ Item {
+ width: 220
+ height: 28
+ BorderImage { source: "images/lineedit.sci"; anchors.fill: parent }
+ TextInput{
+ id: passIn
+ width: parent.width - 8
+ anchors.centerIn: parent
+ maximumLength:21
+ echoMode: TextInput.Password
+ font.pixelSize: 16;
+ font.bold: true
+ color: "#151515"; selectionColor: "green"
+ KeyNavigation.down: login
+ KeyNavigation.up: nameIn
+ }
+ }
+ }
+ Row{
+ spacing: 10
+ Button {
+ width: 100
+ height: 32
+ id: login
+ keyUsing: true;
+ function doLogin(){
+ rssModel.authName=nameIn.text;
+ rssModel.authPass=passIn.text;
+ rssModel.tags='my timeline';
+ screen.focus = true;
+ }
+ text: "Log in"
+ KeyNavigation.right: guest
+ KeyNavigation.up: passIn
+ Keys.onReturnPressed: login.doLogin();
+ Keys.onSelectPressed: login.doLogin();
+ Keys.onSpacePressed: login.doLogin();
+ onClicked: login.doLogin();
+ }
+ Button {
+ width: 100
+ height: 32
+ id: guest
+ keyUsing: true;
+ function doGuest()
+ {
+ rssModel.authName='-';
+ screen.focus = true;
+ screen.setMode(true);
+ }
+ text: "Guest"
+ KeyNavigation.left: login
+ KeyNavigation.up: passIn
+ Keys.onReturnPressed: guest.doGuest();
+ Keys.onSelectPressed: guest.doGuest();
+ Keys.onSpacePressed: guest.doGuest();
+ onClicked: guest.doGuest();
+ }
+ }
+ }
+}
diff --git a/demos/declarative/twitter/TwitterCore/Button.qml b/demos/declarative/twitter/TwitterCore/Button.qml
new file mode 100644
index 0000000000..4cba8c3219
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/Button.qml
@@ -0,0 +1,49 @@
+import Qt 4.6
+
+Item {
+ id: container
+
+ signal clicked
+
+ property string text
+ property bool keyUsing: false
+
+ BorderImage {
+ id: buttonImage
+ source: "images/toolbutton.sci"
+ width: container.width; height: container.height
+ }
+ BorderImage {
+ id: pressed
+ opacity: 0
+ source: "images/toolbutton.sci"
+ width: container.width; height: container.height
+ }
+ MouseArea {
+ id: mouseRegion
+ anchors.fill: buttonImage
+ onClicked: { container.clicked(); }
+ }
+ Text {
+ id: btnText
+ color: if(container.keyUsing){"#DDDDDD";} else {"#FFFFFF";}
+ anchors.centerIn: buttonImage; font.bold: true
+ text: container.text; style: Text.Raised; styleColor: "black"
+ font.pixelSize: 12
+ }
+ states: [
+ State {
+ name: "Pressed"
+ when: mouseRegion.pressed == true
+ PropertyChanges { target: pressed; opacity: 1 }
+ },
+ State {
+ name: "Focused"
+ when: container.focus == true
+ PropertyChanges { target: btnText; color: "#FFFFFF" }
+ }
+ ]
+ transitions: Transition {
+ ColorAnimation { target: btnText; }
+ }
+}
diff --git a/demos/declarative/twitter/TwitterCore/FatDelegate.qml b/demos/declarative/twitter/TwitterCore/FatDelegate.qml
new file mode 100644
index 0000000000..0f013e609a
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/FatDelegate.qml
@@ -0,0 +1,46 @@
+import Qt 4.6
+
+Component {
+ id: listDelegate
+ Item {
+ id: wrapper; width: wrapper.ListView.view.width; height: if(txt.height > 58){txt.height+8}else{58}//50+4+4
+ Script {
+ function handleLink(link){
+ if(link.slice(0,3) == 'app'){
+ setUser(link.slice(7));
+ screen.setMode(true);
+ }else if(link.slice(0,4) == 'http'){
+ Qt.openUrlExternally(link);
+ }
+ }
+ function addTags(str){
+ var ret = str.replace(/@[a-zA-Z0-9_]+/g, '<a href="app://$&">$&</a>');//click to jump to user?
+ var ret2 = ret.replace(/http:\/\/[^ \n\t]+/g, '<a href="$&">$&</a>');//surrounds http links with html link tags
+ return ret2;
+ }
+ }
+ Item {
+ id: moveMe; height: parent.height
+ Rectangle {
+ id: blackRect
+ color: "black"; opacity: wrapper.ListView.index % 2 ? 0.2 : 0.3; height: wrapper.height-2; width: wrapper.width; y: 1
+ }
+ Rectangle {
+ id: whiteRect; x: 6; width: 50; height: 50; color: "white"; smooth: true
+ anchors.verticalCenter: parent.verticalCenter
+
+ Loading { x: 1; y: 1; width: 48; height: 48; visible: realImage.status != 1 }
+ Image { id: realImage; source: userImage; x: 1; y: 1; width:48; height:48 }
+ }
+ Text { id:txt; y:4; x: 56
+ text: '<html><style type="text/css">a:link {color:"#aaccaa"}; a:visited {color:"#336633"}</style>'
+ + '<a href="app://@'+userScreenName+'"><b>'+userScreenName + "</b></a> from " +source
+ + "<br /><b>" + addTags(statusText) + "</b></html>";
+ textFormat: Qt.RichText
+ color: "#cccccc"; style: Text.Raised; styleColor: "black"; wrap: true
+ anchors.left: whiteRect.right; anchors.right: blackRect.right; anchors.leftMargin: 6; anchors.rightMargin: 6
+ onLinkActivated: handleLink(link)
+ }
+ }
+ }
+}
diff --git a/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml b/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml
new file mode 100644
index 0000000000..a206c87524
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml
@@ -0,0 +1,121 @@
+import Qt 4.6
+
+Item {
+ id: titleBar
+
+ signal update()
+ onYChanged: state="" //When switching titlebars
+
+ BorderImage { source: "images/titlebar.sci"; width: parent.width; height: parent.height + 14; y: -7 }
+ Item {
+ id: container
+ width: (parent.width * 2) - 55 ; height: parent.height
+
+ Script {
+ function accept() {
+ if(rssModel.authName == '' || rssModel.authPass == '')
+ return false;//Can't login like that
+
+ var postData = "status=" + editor.text;
+ var postman = new XMLHttpRequest();
+ postman.open("POST", "http://twitter.com/statuses/update.xml", true, rssModel.authName, rssModel.authPass);
+ postman.onreadystatechange = function() {
+ if (postman.readyState == postman.DONE) {
+ titleBar.update();
+ }
+ }
+ postman.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+ postman.send(postData);
+
+ editor.text = ""
+ titleBar.state = ""
+ }
+ }
+
+ Rectangle {
+ x: 6; width: 50; height: 50; color: "white"; smooth: true
+ anchors.verticalCenter: parent.verticalCenter
+
+ UserModel { user: rssModel.authName; id: userModel }
+ Component { id: imgDelegate;
+ Item {
+ Loading { width:48; height:48; visible: realImage.status != 1 }
+ Image { source: image; width:48; height:48; id: realImage }
+ }
+ }
+ ListView { model: userModel.model; x:1; y:1; delegate: imgDelegate }
+ }
+
+ Text {
+ id: categoryText
+ anchors.left: parent.left; anchors.right: tagButton.left
+ anchors.leftMargin: 58; anchors.rightMargin: 10
+ anchors.verticalCenter: parent.verticalCenter
+ elide: Text.ElideLeft
+ text: "Timeline for " + rssModel.authName
+ font.pixelSize: 12; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black"
+ }
+
+ Button {
+ id: tagButton; x: titleBar.width - 90; width: 85; height: 32; text: "New Post..."
+ anchors.verticalCenter: parent.verticalCenter;
+ onClicked: if (titleBar.state == "Posting") accept(); else titleBar.state = "Posting"
+ }
+
+ Text {
+ id: charsLeftText; anchors.horizontalCenter: tagButton.horizontalCenter;
+ anchors.top: tagButton.bottom; anchors.topMargin: 2
+ text: {140 - editor.text.length;} visible: titleBar.state == "Posting"
+ font.pointSize: 10; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black"
+ }
+ Item {
+ id: txtEdit;
+ anchors.left: tagButton.right; anchors.leftMargin: 5; y: 4
+ anchors.right: parent.right; anchors.rightMargin: 40; height: parent.height - 9
+ BorderImage { source: "images/lineedit.sci"; anchors.fill: parent }
+
+ Binding {//TODO: Can this be a function, which also resets the cursor? And flashes?
+ when: editor.text.length > 140
+ target: editor
+ property: "text"
+ value: editor.text.slice(0,140)
+ }
+ TextEdit {
+ id: editor
+ anchors.left: parent.left;
+ anchors.leftMargin: 8;
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 4;
+ cursorVisible: true; font.bold: true
+ width: parent.width - 12
+ height: parent.height - 8
+ font.pointSize: 10
+ wrap: true
+ color: "#151515"; selectionColor: "green"
+ }
+ Keys.forwardTo: [(returnKey), (editor)]
+ Item {
+ id: returnKey
+ Keys.onReturnPressed: accept()
+ Keys.onEscapePressed: titleBar.state = ""
+ }
+ }
+ }
+ states: [
+ State {
+ name: "Posting"
+ PropertyChanges { target: container; x: -tagButton.x + 5 }
+ PropertyChanges { target: titleBar; height: 80 }
+ PropertyChanges { target: tagButton; text: "OK" }
+ PropertyChanges { target: tagButton; width: 28 }
+ PropertyChanges { target: tagButton; height: 24 }
+ PropertyChanges { target: txtEdit; focus: true }
+ }
+ ]
+ transitions: [
+ Transition {
+ from: "*"; to: "*"
+ NumberAnimation { properties: "x,y,width,height"; easing.type: "InOutQuad" }
+ }
+ ]
+}
diff --git a/demos/declarative/twitter/TwitterCore/Loading.qml b/demos/declarative/twitter/TwitterCore/Loading.qml
new file mode 100644
index 0000000000..76bf64b0cb
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/Loading.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+Image {
+ id: loading; source: "images/loading.png"; transformOrigin: "Center"
+ NumberAnimation on rotation {
+ from: 0; to: 360; running: loading.visible == true; repeat: true; duration: 900
+ }
+}
diff --git a/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml b/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml
new file mode 100644
index 0000000000..e0205b8097
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml
@@ -0,0 +1,24 @@
+import Qt 4.6
+
+Item {
+ height: homeBar.height
+ HomeTitleBar { id: homeBar; width: parent.width; height: 60;
+ onUpdate: rssModel.reload()
+ }
+ TitleBar { id: titleBar; width: parent.width; height: 60;
+ y: -80
+ untaggedString: "Latest tweets from everyone"
+ taggedString: "Latest tweets from "
+ }
+ states: [
+ State {
+ name: "search"; when: screen.userView
+ PropertyChanges { target: titleBar; y: 0 }
+ PropertyChanges { target: homeBar; y: -80 }
+ }
+ ]
+ transitions: [
+ Transition { NumberAnimation { properties: "x,y"; duration: 500; easing.type: "InOutQuad" } }
+ ]
+}
+
diff --git a/demos/declarative/twitter/TwitterCore/RssModel.qml b/demos/declarative/twitter/TwitterCore/RssModel.qml
new file mode 100644
index 0000000000..9d88bb7de3
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/RssModel.qml
@@ -0,0 +1,44 @@
+import Qt 4.6
+
+Item { id: wrapper
+ property var model: xmlModel
+ property string tags : ""
+ property string authName : ""
+ property string authPass : ""
+ property string mode : "everyone"
+ property int status: xmlModel.status
+ function reload() { xmlModel.reload(); }
+XmlListModel {
+ id: xmlModel
+
+ source:{
+ if (wrapper.authName == ""){
+ ""; //Avoid worthless calls to twitter servers
+ }else if(wrapper.mode == 'user'){
+ "https://"+ ((wrapper.authName!="" && wrapper.authPass!="")? (wrapper.authName+":"+wrapper.authPass+"@") : "" )+"twitter.com/statuses/user_timeline.xml?screen_name="+wrapper.tags;
+ }else if(wrapper.mode == 'self'){
+ "https://"+ ((wrapper.authName!="" && wrapper.authPass!="")? (wrapper.authName+":"+wrapper.authPass+"@") : "" )+"twitter.com/statuses/friends_timeline.xml";
+ }else{//everyone/public
+ "http://twitter.com/statuses/public_timeline.xml";
+ }
+ }
+ query: "/statuses/status"
+
+ XmlRole { name: "statusText"; query: "text/string()" }
+ XmlRole { name: "timestamp"; query: "created_at/string()" }
+ XmlRole { name: "source"; query: "source/string()" }
+ XmlRole { name: "userName"; query: "user/name/string()" }
+ XmlRole { name: "userScreenName"; query: "user/screen_name/string()" }
+ XmlRole { name: "userImage"; query: "user/profile_image_url/string()" }
+ XmlRole { name: "userLocation"; query: "user/location/string()" }
+ XmlRole { name: "userDescription"; query: "user/description/string()" }
+ XmlRole { name: "userFollowers"; query: "user/followers_count/string()" }
+ XmlRole { name: "userStatuses"; query: "user/statuses_count/string()" }
+ //TODO: Could also get the user's color scheme, timezone and a few other things
+}
+Binding {
+ property: "mode"
+ target: wrapper
+ value: {if(wrapper.tags==''){"everyone";}else if(wrapper.tags=='my timeline'){"self";}else{"user";}}
+}
+}
diff --git a/demos/declarative/twitter/TwitterCore/TitleBar.qml b/demos/declarative/twitter/TwitterCore/TitleBar.qml
new file mode 100644
index 0000000000..149aa8268f
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/TitleBar.qml
@@ -0,0 +1,77 @@
+import Qt 4.6
+
+Item {
+ id: titleBar
+ property string untaggedString: "Uploads from everyone"
+ property string taggedString: "Recent uploads tagged "
+
+ BorderImage { source: "images/titlebar.sci"; width: parent.width; height: parent.height + 14; y: -7 }
+
+ Item {
+ id: container
+ width: (parent.width * 2) - 55 ; height: parent.height
+
+ Script {
+ function accept() {
+ titleBar.state = ""
+ background.state = ""
+ rssModel.tags = editor.text
+ }
+ }
+
+ Text {
+ id: categoryText
+ anchors {
+ left: parent.left; right: tagButton.left; leftMargin: 10; rightMargin: 10
+ verticalCenter: parent.verticalCenter
+ }
+ elide: Text.ElideLeft
+ text: (rssModel.tags=="" ? untaggedString : taggedString + rssModel.tags)
+ font.bold: true; color: "White"; style: Text.Raised; styleColor: "Black"
+ font.pixelSize: 12
+ }
+
+ Button {
+ id: tagButton; x: titleBar.width - 50; width: 45; height: 32; text: "..."
+ onClicked: if (titleBar.state == "Tags") accept(); else titleBar.state = "Tags"
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Item {
+ id: lineEdit
+ y: 4; height: parent.height - 9
+ anchors { left: tagButton.right; leftMargin: 5; right: parent.right; rightMargin: 5 }
+
+ BorderImage { source: "images/lineedit.sci"; anchors.fill: parent }
+
+ TextInput {
+ id: editor
+ anchors {
+ left: parent.left; right: parent.right; leftMargin: 10; rightMargin: 10
+ verticalCenter: parent.verticalCenter
+ }
+ cursorVisible: true; font.bold: true
+ color: "#151515"; selectionColor: "Green"
+ }
+
+ Keys.forwardTo: [ (returnKey), (editor)]
+
+ Item {
+ id: returnKey
+ Keys.onReturnPressed: accept()
+ Keys.onEscapePressed: titleBar.state = ""
+ }
+ }
+ }
+
+ states: State {
+ name: "Tags"
+ PropertyChanges { target: container; x: -tagButton.x + 5 }
+ PropertyChanges { target: tagButton; text: "OK" }
+ PropertyChanges { target: lineEdit; focus: true }
+ }
+
+ transitions: Transition {
+ NumberAnimation { properties: "x"; easing.type: "InOutQuad" }
+ }
+}
diff --git a/demos/declarative/twitter/TwitterCore/ToolBar.qml b/demos/declarative/twitter/TwitterCore/ToolBar.qml
new file mode 100644
index 0000000000..f96c767d74
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/ToolBar.qml
@@ -0,0 +1,24 @@
+import Qt 4.6
+
+Item {
+ id: toolbar
+
+ property alias button1Label: button1.text
+ property alias button2Label: button2.text
+ signal button1Clicked
+ signal button2Clicked
+
+ BorderImage { source: "images/titlebar.sci"; width: parent.width; height: parent.height + 14; y: -7 }
+
+ Button {
+ id: button1
+ anchors.left: parent.left; anchors.leftMargin: 5; y: 3; width: 140; height: 32
+ onClicked: toolbar.button1Clicked()
+ }
+
+ Button {
+ id: button2
+ anchors.right: parent.right; anchors.rightMargin: 5; y: 3; width: 140; height: 32
+ onClicked: toolbar.button2Clicked()
+ }
+}
diff --git a/demos/declarative/twitter/TwitterCore/UserModel.qml b/demos/declarative/twitter/TwitterCore/UserModel.qml
new file mode 100644
index 0000000000..c146b846a9
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/UserModel.qml
@@ -0,0 +1,26 @@
+import Qt 4.6
+
+//This "model" gets the user information about the searched user. Mainly for the icon.
+//Copied from RssModel
+
+Item { id: wrapper
+ property var model: xmlModel
+ property string user : ""
+ property int status: xmlModel.status
+ function reload() { xmlModel.reload(); }
+XmlListModel {
+ id: xmlModel
+
+ source: {if(user!="") {"http://twitter.com/users/show.xml?screen_name="+user;}else{"";}}
+ query: "/user"
+
+ XmlRole { name: "name"; query: "name/string()" }
+ XmlRole { name: "screenName"; query: "screen_name/string()" }
+ XmlRole { name: "image"; query: "profile_image_url/string()" }
+ XmlRole { name: "location"; query: "location/string()" }
+ XmlRole { name: "description"; query: "description/string()" }
+ XmlRole { name: "followers"; query: "followers_count/string()" }
+ //XmlRole { name: "protected"; query: "protected/bool()" }
+ //TODO: Could also get the user's color scheme, timezone and a few other things
+}
+}
diff --git a/demos/declarative/twitter/TwitterCore/images/gloss.png b/demos/declarative/twitter/TwitterCore/images/gloss.png
new file mode 100644
index 0000000000..5d370cd93d
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/images/gloss.png
Binary files differ
diff --git a/demos/declarative/twitter/TwitterCore/images/lineedit.png b/demos/declarative/twitter/TwitterCore/images/lineedit.png
new file mode 100644
index 0000000000..2cc38dc35b
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/images/lineedit.png
Binary files differ
diff --git a/demos/declarative/twitter/TwitterCore/images/lineedit.sci b/demos/declarative/twitter/TwitterCore/images/lineedit.sci
new file mode 100644
index 0000000000..054bff78be
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/images/lineedit.sci
@@ -0,0 +1,5 @@
+border.left: 10
+border.top: 10
+border.bottom: 10
+border.right: 10
+source: lineedit.png
diff --git a/demos/declarative/twitter/TwitterCore/images/loading.png b/demos/declarative/twitter/TwitterCore/images/loading.png
new file mode 100644
index 0000000000..47a1589c5d
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/images/loading.png
Binary files differ
diff --git a/demos/declarative/twitter/TwitterCore/images/stripes.png b/demos/declarative/twitter/TwitterCore/images/stripes.png
new file mode 100644
index 0000000000..9f36727ea4
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/images/stripes.png
Binary files differ
diff --git a/demos/declarative/twitter/TwitterCore/images/titlebar.png b/demos/declarative/twitter/TwitterCore/images/titlebar.png
new file mode 100644
index 0000000000..51c90082d0
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/images/titlebar.png
Binary files differ
diff --git a/demos/declarative/twitter/TwitterCore/images/titlebar.sci b/demos/declarative/twitter/TwitterCore/images/titlebar.sci
new file mode 100644
index 0000000000..0418d94cd6
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/images/titlebar.sci
@@ -0,0 +1,5 @@
+border.left: 10
+border.top: 12
+border.bottom: 12
+border.right: 10
+source: titlebar.png
diff --git a/demos/declarative/twitter/TwitterCore/images/toolbutton.png b/demos/declarative/twitter/TwitterCore/images/toolbutton.png
new file mode 100644
index 0000000000..11310013ee
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/images/toolbutton.png
Binary files differ
diff --git a/demos/declarative/twitter/TwitterCore/images/toolbutton.sci b/demos/declarative/twitter/TwitterCore/images/toolbutton.sci
new file mode 100644
index 0000000000..9e4f965307
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/images/toolbutton.sci
@@ -0,0 +1,5 @@
+border.left: 15
+border.top: 4
+border.bottom: 4
+border.right: 15
+source: toolbutton.png
diff --git a/demos/declarative/twitter/TwitterCore/qmldir b/demos/declarative/twitter/TwitterCore/qmldir
new file mode 100644
index 0000000000..8b56c56330
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/qmldir
@@ -0,0 +1,10 @@
+AuthView 1.0 AuthView.qml
+Button 1.0 Button.qml
+FatDelegate 1.0 FatDelegate.qml
+HomeTitleBar 1.0 HomeTitleBar.qml
+Loading 1.0 Loading.qml
+MultiTitleBar 1.0 MultiTitleBar.qml
+TitleBar 1.0 TitleBar.qml
+RssModel 1.0 RssModel.qml
+UserModel 1.0 UserModel.qml
+ToolBar 1.0 ToolBar.qml
diff --git a/demos/declarative/twitter/twitter.qml b/demos/declarative/twitter/twitter.qml
new file mode 100644
index 0000000000..259f79a7bc
--- /dev/null
+++ b/demos/declarative/twitter/twitter.qml
@@ -0,0 +1,95 @@
+import Qt 4.6
+import TwitterCore 1.0 as Twitter
+
+Item {
+ id: screen; width: 320; height: 480
+ property bool userView : false
+ property var tmpStr
+ function setMode(m){
+ screen.userView = m;
+ if(m == false){
+ rssModel.tags='my timeline';
+ rssModel.reload();
+ toolBar.button2Label = "View others";
+ } else {
+ toolBar.button2Label = "Return home";
+ }
+ }
+ //Workaround for bug 260266
+ Timer{ interval: 1; running: false; repeat: false; onTriggered: reallySetUser(); id:hack }
+ Script {
+ function setUser(str){hack.running = true; tmpStr = str}
+ function reallySetUser(){rssModel.tags = tmpStr;}
+ }
+
+ //TODO: better way to return to the auth screen
+ Keys.onEscapePressed: rssModel.authName=''
+ Rectangle {
+ id: background
+ anchors.fill: parent; color: "#343434";
+
+ Image { source: "TwitterCore/images/stripes.png"; fillMode: Image.Tile; anchors.fill: parent; opacity: 0.3 }
+
+ Twitter.RssModel { id: rssModel }
+ Twitter.Loading { anchors.centerIn: parent; visible: rssModel.status==XmlListModel.Loading && state!='unauthed'}
+ Text {
+ width: 180
+ text: "Could not access twitter using this screen name and password pair.";
+ color: "#cccccc"; style: Text.Raised; styleColor: "black"; wrap: true
+ visible: rssModel.status==XmlListModel.Error; anchors.centerIn: parent
+ }
+
+ Item {
+ id: views
+ x: 2; width: parent.width - 4
+ y:60 //Below the title bars
+ height: 380
+
+ Twitter.AuthView{
+ id: authView
+ anchors.verticalCenter: parent.verticalCenter
+ width: parent.width; height: parent.height-60;
+ x: -(screen.width * 1.5)
+ }
+
+ Twitter.FatDelegate { id: fatDelegate }
+ ListView {
+ id: mainView; model: rssModel.model; delegate: fatDelegate;
+ width: parent.width; height: parent.height; x: 0; cacheBuffer: 100;
+ }
+ }
+
+ Twitter.MultiTitleBar { id: titleBar; width: parent.width }
+ Twitter.ToolBar { id: toolBar; height: 40;
+ //anchors.bottom: parent.bottom;
+ //TODO: Use anchor changes instead of hard coding
+ y: screen.height - 40
+ width: parent.width; opacity: 0.9
+ button1Label: "Update"
+ button2Label: "View others"
+ onButton1Clicked: rssModel.reload();
+ onButton2Clicked:
+ {
+ if(screen.userView == true){
+ screen.setMode(false);
+ }else{
+ rssModel.tags='';
+ screen.setMode(true);
+ }
+ }
+ }
+
+ states: [
+ State {
+ name: "unauthed"; when: rssModel.authName==""
+ PropertyChanges { target: authView; x: 0 }
+ PropertyChanges { target: mainView; x: -(parent.width * 1.5) }
+ PropertyChanges { target: titleBar; y: -80 }
+ PropertyChanges { target: toolBar; y: screen.height }
+ }
+ ]
+ transitions: [
+ Transition { NumberAnimation { properties: "x,y"; duration: 500; easing.type: "InOutQuad" } }
+ ]
+ }
+}
diff --git a/demos/declarative/webbrowser/content/FlickableWebView.qml b/demos/declarative/webbrowser/content/FlickableWebView.qml
new file mode 100644
index 0000000000..30a5d78a98
--- /dev/null
+++ b/demos/declarative/webbrowser/content/FlickableWebView.qml
@@ -0,0 +1,165 @@
+import Qt 4.6
+import org.webkit 1.0
+
+Flickable {
+ property alias title: webView.title
+ property alias icon: webView.icon
+ property alias progress: webView.progress
+ property alias url: webView.url
+ property alias back: webView.back
+ property alias reload: webView.reload
+ property alias forward: webView.forward
+
+ id: flickable
+ width: parent.width
+ contentWidth: Math.max(parent.width,webView.width*webView.scale)
+ contentHeight: Math.max(parent.height,webView.height*webView.scale)
+ anchors.top: headerSpace.bottom
+ anchors.bottom: footer.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ pressDelay: 200
+
+ WebView {
+ id: webView
+ pixelCacheSize: 4000000
+ transformOrigin: Item.TopLeft
+
+ Script {
+ function fixUrl(url)
+ {
+ if (url == "") return url
+ if (url[0] == "/") return "file://"+url
+ if (url.indexOf(":")<0) {
+ if (url.indexOf(".")<0 || url.indexOf(" ")>=0) {
+ // Fall back to a search engine; hard-code Wikipedia
+ return "http://en.wikipedia.org/w/index.php?search="+url
+ } else {
+ return "http://"+url
+ }
+ }
+ return url
+ }
+ }
+
+ url: fixUrl(webBrowser.urlString)
+ smooth: false // We don't want smooth scaling, since we only scale during (fast) transitions
+ smoothCache: true // We do want smooth rendering
+ fillColor: "white"
+ focus: true
+ zoomFactor: 4
+
+ onAlert: console.log(message)
+
+ function doZoom(zoom,centerX,centerY)
+ {
+ if (centerX) {
+ var sc = zoom/contentsScale;
+ scaleAnim.to = sc;
+ flickVX.from = flickable.contentX
+ flickVX.to = Math.max(0,Math.min(centerX-flickable.width/2,webView.width*sc-flickable.width))
+ finalX.value = flickVX.to
+ flickVY.from = flickable.contentY
+ flickVY.to = Math.max(0,Math.min(centerY-flickable.height/2,webView.height*sc-flickable.height))
+ finalY.value = flickVY.to
+ finalZoom.value = zoom
+ quickZoom.start()
+ }
+ }
+
+ Keys.onLeftPressed: webView.contentsScale -= 0.1
+ Keys.onRightPressed: webView.contentsScale += 0.1
+
+ preferredWidth: flickable.width*zoomFactor
+ preferredHeight: flickable.height*zoomFactor
+ contentsScale: 1/zoomFactor
+ onContentsSizeChanged: {
+ // zoom out
+ contentsScale = Math.min(0.25,flickable.width / contentsSize.width)
+ }
+ onUrlChanged: {
+ // got to topleft
+ flickable.contentX = 0
+ flickable.contentY = 0
+ if (url != null) { header.editUrl = url.toString(); }
+ }
+ onDoubleClick: {
+ if (!heuristicZoom(clickX,clickY,2.5)) {
+ var zf = flickable.width / contentsSize.width
+ if (zf >= contentsScale)
+ zf = 2.0/zoomFactor // zoom in (else zooming out)
+ doZoom(zf,clickX*zf,clickY*zf)
+ }
+ }
+
+ SequentialAnimation {
+ id: quickZoom
+
+ PropertyAction {
+ target: webView
+ property: "renderingEnabled"
+ value: false
+ }
+ ParallelAnimation {
+ NumberAnimation {
+ id: scaleAnim
+ target: webView
+ property: "scale"
+ from: 1
+ to: 0 // set before calling
+ easing.type: "Linear"
+ duration: 200
+ }
+ NumberAnimation {
+ id: flickVX
+ target: flickable
+ property: "contentX"
+ easing.type: "Linear"
+ duration: 200
+ from: 0 // set before calling
+ to: 0 // set before calling
+ }
+ NumberAnimation {
+ id: flickVY
+ target: flickable
+ property: "contentY"
+ easing.type: "Linear"
+ duration: 200
+ from: 0 // set before calling
+ to: 0 // set before calling
+ }
+ }
+ PropertyAction {
+ id: finalZoom
+ target: webView
+ property: "contentsScale"
+ }
+ PropertyAction {
+ target: webView
+ property: "scale"
+ value: 1.0
+ }
+ // Have to set the contentXY, since the above 2
+ // size changes may have started a correction if
+ // contentsScale < 1.0.
+ PropertyAction {
+ id: finalX
+ target: flickable
+ property: "contentX"
+ value: 0 // set before calling
+ }
+ PropertyAction {
+ id: finalY
+ target: flickable
+ property: "contentY"
+ value: 0 // set before calling
+ }
+ PropertyAction {
+ target: webView
+ property: "renderingEnabled"
+ value: true
+ }
+ }
+ onZoomTo: doZoom(zoom,centerX,centerY)
+ }
+}
diff --git a/demos/declarative/webbrowser/content/RectSoftShadow.qml b/demos/declarative/webbrowser/content/RectSoftShadow.qml
new file mode 100644
index 0000000000..5b6d4ece3f
--- /dev/null
+++ b/demos/declarative/webbrowser/content/RectSoftShadow.qml
@@ -0,0 +1,32 @@
+import Qt 4.6
+
+Item {
+ BorderImage {
+ source: "pics/softshadow-left.sci"
+ x: -16
+ y: -16
+ width: 16
+ height: parent.height+32
+ }
+ BorderImage {
+ source: "pics/softshadow-right.sci"
+ x: parent.width
+ y: -16
+ width: 16
+ height: parent.height+32
+ }
+ Image {
+ source: "pics/softshadow-top.png"
+ x: 0
+ y: -16
+ width: parent.width
+ height: 16
+ }
+ Image {
+ source: "pics/softshadow-bottom.png"
+ x: 0
+ y: parent.height
+ width: parent.width
+ height: 16
+ }
+}
diff --git a/demos/declarative/webbrowser/content/RetractingWebBrowserHeader.qml b/demos/declarative/webbrowser/content/RetractingWebBrowserHeader.qml
new file mode 100644
index 0000000000..94c94f255b
--- /dev/null
+++ b/demos/declarative/webbrowser/content/RetractingWebBrowserHeader.qml
@@ -0,0 +1,115 @@
+import Qt 4.6
+
+import "fieldtext"
+
+Image {
+ property alias editUrl: editUrl.text
+
+ id: header
+ source: "pics/header.png"
+ width: parent.width
+ height: 60
+ x: webView.contentX < 0 ? -webView.contentX : webView.contentX > webView.contentWidth-webView.width
+ ? -webView.contentX+webView.contentWidth-webView.width : 0
+ y: webView.contentY < 0 ? -webView.contentY : progressOff*
+ (webView.contentY>height?-height:-webView.contentY)
+ Row {
+ id: headerTitle
+
+ anchors.top: header.top
+ anchors.topMargin: 4
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 6
+
+ Image {
+ id: headerIcon
+ pixmap: webView.icon
+ }
+
+ Text {
+ id: headerText
+
+ text: webView.title!='' || webView.progress == 1.0 ? webView.title : 'Loading...'
+ elide: Text.ElideRight
+ //width: parent.width - headerIcon.width-4
+
+ color: "white"
+ styleColor: "black"
+ style: Text.Raised
+
+ font.family: "Helvetica"
+ font.pointSize: 10
+ font.bold: true
+
+ horizontalAlignment: Text.AlignHCenter
+ }
+ }
+ Item {
+ width: parent.width
+ anchors.top: headerTitle.bottom
+ anchors.topMargin: 2
+ anchors.bottom: parent.bottom
+
+ Item {
+ id: urlBox
+ height: 31
+ anchors.left: parent.left
+ anchors.leftMargin: 12
+ anchors.right: parent.right
+ anchors.rightMargin: 12
+ anchors.top: parent.top
+ clip: true
+ property bool mouseGrabbed: false
+
+ BorderImage {
+ source: "pics/addressbar.sci"
+ anchors.fill: urlBox
+ }
+
+ BorderImage {
+ id: urlBoxhl
+ source: "pics/addressbar-filled.sci"
+ width: parent.width*webView.progress
+ height: parent.height
+ opacity: 1-header.progressOff
+ clip: true
+ }
+
+ FieldText {
+ id: editUrl
+ mouseGrabbed: parent.mouseGrabbed
+
+ text: webBrowser.urlString
+ label: "url:"
+ onConfirmed: { webBrowser.urlString = editUrl.text; webView.focus=true }
+ onCancelled: { webView.focus=true }
+ onStartEdit: { webView.focus=false }
+
+ anchors.left: urlBox.left
+ anchors.right: urlBox.right
+ anchors.leftMargin: 6
+ anchors.verticalCenter: urlBox.verticalCenter
+ anchors.verticalCenterOffset: 1
+ }
+ }
+ }
+
+ property real progressOff : 1
+ states: [
+ State {
+ name: "ProgressShown"
+ when: webView.progress < 1.0
+ PropertyChanges { target: header; progressOff: 0; }
+ }
+ ]
+ transitions: [
+ Transition {
+ NumberAnimation {
+ targets: header
+ properties: "progressOff"
+ easing.type: "InOutQuad"
+ duration: 300
+ }
+ }
+ ]
+}
diff --git a/demos/declarative/webbrowser/content/fieldtext/FieldText.qml b/demos/declarative/webbrowser/content/fieldtext/FieldText.qml
new file mode 100644
index 0000000000..d282209daf
--- /dev/null
+++ b/demos/declarative/webbrowser/content/fieldtext/FieldText.qml
@@ -0,0 +1,161 @@
+import Qt 4.6
+
+Item {
+ id: fieldText
+ height: 30
+ property string text: ""
+ property string label: ""
+ property bool mouseGrabbed: false
+ signal confirmed
+ signal cancelled
+ signal startEdit
+
+ Script {
+
+ function edit() {
+ if (!mouseGrabbed) {
+ fieldText.startEdit();
+ fieldText.state='editing';
+ mouseGrabbed=true;
+ }
+ }
+
+ function confirm() {
+ fieldText.state='';
+ fieldText.text = textEdit.text;
+ mouseGrabbed=false;
+ fieldText.confirmed();
+ }
+
+ function reset() {
+ textEdit.text = fieldText.text;
+ fieldText.state='';
+ mouseGrabbed=false;
+ fieldText.cancelled();
+ }
+
+ }
+
+ Image {
+ id: cancelIcon
+ width: 22
+ height: 22
+ anchors.right: parent.right
+ anchors.rightMargin: 4
+ anchors.verticalCenter: parent.verticalCenter
+ source: "pics/cancel.png"
+ opacity: 0
+ }
+
+ Image {
+ id: confirmIcon
+ width: 22
+ height: 22
+ anchors.left: parent.left
+ anchors.leftMargin: 4
+ anchors.verticalCenter: parent.verticalCenter
+ source: "pics/ok.png"
+ opacity: 0
+ }
+
+ TextInput {
+ id: textEdit
+ text: fieldText.text
+ focus: false
+ anchors.left: parent.left
+ anchors.leftMargin: 0
+ anchors.right: parent.right
+ anchors.rightMargin: 0
+ anchors.verticalCenter: parent.verticalCenter
+ color: "black"
+ font.bold: true
+ readOnly: true
+ onAccepted: confirm()
+ Keys.onEscapePressed: reset()
+ }
+
+ Text {
+ id: textLabel
+ x: 5
+ width: parent.width-10
+ anchors.verticalCenter: parent.verticalCenter
+ horizontalAlignment: Text.AlignHCenter
+ color: fieldText.state == "editing" ? "#505050" : "#AAAAAA"
+ font.italic: true
+ font.bold: true
+ text: label
+ opacity: textEdit.text == '' ? 1 : 0
+ Behavior on opacity {
+ NumberAnimation {
+ property: "opacity"
+ duration: 250
+ }
+ }
+ }
+
+ MouseArea {
+ anchors.fill: cancelIcon
+ onClicked: { reset() }
+ }
+
+ MouseArea {
+ anchors.fill: confirmIcon
+ onClicked: { confirm() }
+ }
+
+ MouseArea {
+ id: editRegion
+ anchors.fill: textEdit
+ onClicked: { edit() }
+ }
+
+ states: [
+ State {
+ name: "editing"
+ PropertyChanges {
+ target: confirmIcon
+ opacity: 1
+ }
+ PropertyChanges {
+ target: cancelIcon
+ opacity: 1
+ }
+ PropertyChanges {
+ target: textEdit
+ color: "black"
+ readOnly: false
+ focus: true
+ selectionStart: 0
+ selectionEnd: -1
+ }
+ PropertyChanges {
+ target: editRegion
+ opacity: 0
+ }
+ PropertyChanges {
+ target: textEdit.anchors
+ leftMargin: 34
+ }
+ PropertyChanges {
+ target: textEdit.anchors
+ rightMargin: 34
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ from: ""
+ to: "*"
+ reversible: true
+ NumberAnimation {
+ properties: "opacity,leftMargin,rightMargin"
+ duration: 200
+ }
+ ColorAnimation {
+ property: "color"
+ duration: 150
+ }
+ }
+ ]
+}
diff --git a/demos/declarative/webbrowser/content/fieldtext/pics/cancel.png b/demos/declarative/webbrowser/content/fieldtext/pics/cancel.png
new file mode 100644
index 0000000000..ecc95331f2
--- /dev/null
+++ b/demos/declarative/webbrowser/content/fieldtext/pics/cancel.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/fieldtext/pics/ok.png b/demos/declarative/webbrowser/content/fieldtext/pics/ok.png
new file mode 100644
index 0000000000..5795f04fbf
--- /dev/null
+++ b/demos/declarative/webbrowser/content/fieldtext/pics/ok.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/addressbar-filled.png b/demos/declarative/webbrowser/content/pics/addressbar-filled.png
new file mode 100644
index 0000000000..d8452ecda1
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/addressbar-filled.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/addressbar-filled.sci b/demos/declarative/webbrowser/content/pics/addressbar-filled.sci
new file mode 100644
index 0000000000..96c5efbe80
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/addressbar-filled.sci
@@ -0,0 +1,6 @@
+border.left: 7
+border.top: 7
+border.bottom: 7
+border.right: 7
+source: addressbar-filled.png
+
diff --git a/demos/declarative/webbrowser/content/pics/addressbar.png b/demos/declarative/webbrowser/content/pics/addressbar.png
new file mode 100644
index 0000000000..3278f58fc5
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/addressbar.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/addressbar.sci b/demos/declarative/webbrowser/content/pics/addressbar.sci
new file mode 100644
index 0000000000..8f1cd18fca
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/addressbar.sci
@@ -0,0 +1,6 @@
+border.left: 7
+border.top: 7
+border.bottom: 7
+border.right: 7
+source: addressbar.png
+
diff --git a/demos/declarative/webbrowser/content/pics/back-disabled.png b/demos/declarative/webbrowser/content/pics/back-disabled.png
new file mode 100644
index 0000000000..91b9e76364
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/back-disabled.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/back.png b/demos/declarative/webbrowser/content/pics/back.png
new file mode 100644
index 0000000000..9988dd35a9
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/back.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/footer.png b/demos/declarative/webbrowser/content/pics/footer.png
new file mode 100644
index 0000000000..8391a93723
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/footer.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/footer.sci b/demos/declarative/webbrowser/content/pics/footer.sci
new file mode 100644
index 0000000000..7be58f1d93
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/footer.sci
@@ -0,0 +1,6 @@
+border.left: 5
+border.top: 0
+border.bottom: 0
+border.right: 5
+source: footer.png
+
diff --git a/demos/declarative/webbrowser/content/pics/forward-disabled.png b/demos/declarative/webbrowser/content/pics/forward-disabled.png
new file mode 100644
index 0000000000..cb87f4f950
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/forward-disabled.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/forward.png b/demos/declarative/webbrowser/content/pics/forward.png
new file mode 100644
index 0000000000..83870eea81
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/forward.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/header.png b/demos/declarative/webbrowser/content/pics/header.png
new file mode 100644
index 0000000000..26588c3142
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/header.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/reload.png b/demos/declarative/webbrowser/content/pics/reload.png
new file mode 100644
index 0000000000..45b5535ce4
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/reload.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/softshadow-bottom.png b/demos/declarative/webbrowser/content/pics/softshadow-bottom.png
new file mode 100644
index 0000000000..85b0b4451b
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/softshadow-bottom.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/softshadow-left.png b/demos/declarative/webbrowser/content/pics/softshadow-left.png
new file mode 100644
index 0000000000..02926d1135
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/softshadow-left.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/softshadow-left.sci b/demos/declarative/webbrowser/content/pics/softshadow-left.sci
new file mode 100644
index 0000000000..45c88d5b68
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/softshadow-left.sci
@@ -0,0 +1,5 @@
+border.left: 0
+border.top: 16
+border.bottom: 16
+border.right: 0
+source: softshadow-left.png
diff --git a/demos/declarative/webbrowser/content/pics/softshadow-right.png b/demos/declarative/webbrowser/content/pics/softshadow-right.png
new file mode 100644
index 0000000000..e459f4fb04
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/softshadow-right.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/softshadow-right.sci b/demos/declarative/webbrowser/content/pics/softshadow-right.sci
new file mode 100644
index 0000000000..4d459c027a
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/softshadow-right.sci
@@ -0,0 +1,5 @@
+border.left: 0
+border.top: 16
+border.bottom: 16
+border.right: 0
+source: softshadow-right.png
diff --git a/demos/declarative/webbrowser/content/pics/softshadow-top.png b/demos/declarative/webbrowser/content/pics/softshadow-top.png
new file mode 100644
index 0000000000..9a9e23219f
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/softshadow-top.png
Binary files differ
diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml
new file mode 100644
index 0000000000..b6cccb07f7
--- /dev/null
+++ b/demos/declarative/webbrowser/webbrowser.qml
@@ -0,0 +1,170 @@
+import Qt 4.6
+import org.webkit 1.0
+
+import "content"
+
+Item {
+ id: webBrowser
+
+ property string urlString : "http://qt.nokia.com/"
+
+ width: 640
+ height: 480
+
+ Item {
+ id: webPanel
+ anchors.fill: parent
+ clip: true
+ Rectangle {
+ color: "#555555"
+ anchors.fill: parent
+ }
+ Image {
+ source: "content/pics/softshadow-bottom.png"
+ width: webPanel.width
+ height: 16
+ }
+ Image {
+ source: "content/pics/softshadow-top.png"
+ width: webPanel.width
+ height: 16
+ anchors.bottom: footer.top
+ }
+ RectSoftShadow {
+ x: -webView.contentX
+ y: -webView.contentY
+ width: webView.contentWidth
+ height: webView.contentHeight+headerSpace.height
+ }
+ Item {
+ id: headerSpace
+ width: parent.width
+ height: 60
+ z: 1
+
+ RetractingWebBrowserHeader { id: header }
+ }
+ FlickableWebView {
+ id: webView
+ width: parent.width
+ anchors.top: headerSpace.bottom
+ anchors.bottom: footer.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ }
+ BorderImage {
+ id: footer
+ source: "content/pics/footer.sci"
+ width: parent.width
+ height: 43
+ anchors.bottom: parent.bottom
+ Rectangle {
+ y: -1
+ width: parent.width
+ height: 1
+ color: "#555555"
+ }
+ Item {
+ id: backbutton
+ width: back_e.width
+ height: back_e.height
+ anchors.right: reload.left
+ anchors.rightMargin: 10
+ anchors.verticalCenter: parent.verticalCenter
+ Image {
+ id: back_e
+ source: "content/pics/back.png"
+ anchors.fill: parent
+ }
+ Image {
+ id: back_d
+ source: "content/pics/back-disabled.png"
+ anchors.fill: parent
+ }
+ states: [
+ State {
+ name: "Enabled"
+ when: webView.back.enabled==true
+ PropertyChanges { target: back_e; opacity: 1 }
+ PropertyChanges { target: back_d; opacity: 0 }
+ },
+ State {
+ name: "Disabled"
+ when: webView.back.enabled==false
+ PropertyChanges { target: back_e; opacity: 0 }
+ PropertyChanges { target: back_d; opacity: 1 }
+ }
+ ]
+ transitions: [
+ Transition {
+ NumberAnimation {
+ properties: "opacity"
+ easing.type: "InOutQuad"
+ duration: 300
+ }
+ }
+ ]
+ MouseArea {
+ anchors.fill: back_e
+ onClicked: { if (webView.back.enabled) webView.back.trigger() }
+ }
+ }
+ Image {
+ id: reload
+ source: "content/pics/reload.png"
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ MouseArea {
+ anchors.fill: reload
+ onClicked: { webView.reload.trigger() }
+ }
+ Item {
+ id: forwardbutton
+ width: forward_e.width
+ height: forward_e.height
+ anchors.left: reload.right
+ anchors.leftMargin: 10
+ anchors.verticalCenter: parent.verticalCenter
+ Image {
+ id: forward_e
+ source: "content/pics/forward.png"
+ anchors.fill: parent
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ Image {
+ id: forward_d
+ source: "content/pics/forward-disabled.png"
+ anchors.fill: parent
+ }
+ states: [
+ State {
+ name: "Enabled"
+ when: webView.forward.enabled==true
+ PropertyChanges { target: forward_e; opacity: 1 }
+ PropertyChanges { target: forward_d; opacity: 0 }
+ },
+ State {
+ name: "Disabled"
+ when: webView.forward.enabled==false
+ PropertyChanges { target: forward_e; opacity: 0 }
+ PropertyChanges { target: forward_d; opacity: 1 }
+ }
+ ]
+ transitions: [
+ Transition {
+ NumberAnimation {
+ properties: "opacity"
+ easing.type: "InOutQuad"
+ duration: 320
+ }
+ }
+ ]
+ MouseArea {
+ anchors.fill: parent
+ onClicked: { if (webView.forward.enabled) webView.forward.trigger() }
+ }
+ }
+ }
+ }
+}
diff --git a/demos/demos.pro b/demos/demos.pro
index 5a9b6dbede..83e93559c4 100644
--- a/demos/demos.pro
+++ b/demos/demos.pro
@@ -38,7 +38,7 @@ wince*: SUBDIRS = \
demos_undo \
demos_sub-attaq
-contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles1):!contains(QT_CONFIG, opengles1cl):!contains(QT_CONFIG, opengles2):{
+contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles1):!contains(QT_CONFIG, opengles2):{
SUBDIRS += demos_boxes
}
@@ -55,6 +55,8 @@ wince*:SUBDIRS += demos_sqlbrowser
}
contains(QT_CONFIG, phonon):!static:SUBDIRS += demos_mediaplayer
contains(QT_CONFIG, webkit):contains(QT_CONFIG, svg):!symbian:SUBDIRS += demos_browser
+contains(QT_CONFIG, multimedia):SUBDIRS += demos_multimedia
+contains(QT_CONFIG, declarative):SUBDIRS += demos_declarative
# install
sources.files = README *.pro
@@ -82,6 +84,8 @@ demos_sqlbrowser.subdir = sqlbrowser
demos_undo.subdir = undo
demos_qtdemo.subdir = qtdemo
demos_mediaplayer.subdir = qmediaplayer
+demos_multimedia.subdir = multimedia
+demos_declarative.subdir = declarative
demos_browser.subdir = browser
diff --git a/demos/interview/model.cpp b/demos/interview/model.cpp
index 3f9548a6cd..840bc605df 100644
--- a/demos/interview/model.cpp
+++ b/demos/interview/model.cpp
@@ -45,6 +45,7 @@
Model::Model(int rows, int columns, QObject *parent)
: QAbstractItemModel(parent),
+ services(QPixmap(":/images/services.png")),
rc(rows), cc(columns),
tree(new QVector<Node>(rows, Node(0)))
{
@@ -105,7 +106,6 @@ QVariant Model::data(const QModelIndex &index, int role) const
QVariant Model::headerData(int section, Qt::Orientation orientation, int role) const
{
- static QIcon services(QPixmap(":/images/services.png"));
if (role == Qt::DisplayRole)
return QString::number(section);
if (role == Qt::DecorationRole)
diff --git a/demos/interview/model.h b/demos/interview/model.h
index bad83a800c..c7c15f7ebc 100644
--- a/demos/interview/model.h
+++ b/demos/interview/model.h
@@ -44,6 +44,7 @@
#include <QAbstractItemModel>
#include <QFileIconProvider>
+#include <QIcon>
#include <QVector>
class Model : public QAbstractItemModel
@@ -80,6 +81,7 @@ private:
Node *parent(Node *child) const;
int row(Node *node) const;
+ QIcon services;
int rc, cc;
QVector<Node> *tree;
QFileIconProvider iconProvider;
diff --git a/demos/mainwindow/mainwindow.cpp b/demos/mainwindow/mainwindow.cpp
index 32066d761f..3ddb74b64b 100644
--- a/demos/mainwindow/mainwindow.cpp
+++ b/demos/mainwindow/mainwindow.cpp
@@ -329,7 +329,7 @@ void MainWindow::setupDockWidgets(const QMap<QString, QSize> &customSizeHints)
BlueTitleBar *titlebar = new BlueTitleBar(swatch);
swatch->setTitleBarWidget(titlebar);
connect(swatch, SIGNAL(topLevelChanged(bool)), titlebar, SLOT(updateMask()));
- connect(swatch, SIGNAL(featuresChanged(QDockWidget::DockWidgetFeatures)), titlebar, SLOT(updateMask()));
+ connect(swatch, SIGNAL(featuresChanged(QDockWidget::DockWidgetFeatures)), titlebar, SLOT(updateMask()), Qt::QueuedConnection);
#ifdef Q_WS_QWS
QPalette pal = palette();
diff --git a/demos/multimedia/multimedia.pro b/demos/multimedia/multimedia.pro
new file mode 100644
index 0000000000..042650f00b
--- /dev/null
+++ b/demos/multimedia/multimedia.pro
@@ -0,0 +1,4 @@
+TEMPLATE = subdirs
+SUBDIRS = player
+
+
diff --git a/demos/multimedia/player/main.cpp b/demos/multimedia/player/main.cpp
new file mode 100644
index 0000000000..87c5b87b29
--- /dev/null
+++ b/demos/multimedia/player/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "player.h"
+
+#include <QtGui>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ Player player;
+ player.show();
+
+ return app.exec();
+};
diff --git a/demos/multimedia/player/player.cpp b/demos/multimedia/player/player.cpp
new file mode 100644
index 0000000000..af30a975f4
--- /dev/null
+++ b/demos/multimedia/player/player.cpp
@@ -0,0 +1,361 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "player.h"
+
+#include "playercontrols.h"
+#include "playlistmodel.h"
+#include "videowidget.h"
+
+#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/qmediaplaylist.h>
+
+#include <QtGui>
+
+Player::Player(QWidget *parent)
+ : QWidget(parent)
+ , videoWidget(0)
+ , coverLabel(0)
+ , slider(0)
+ , colorDialog(0)
+{
+ player = new QMediaPlayer(this);
+ playlist = new QMediaPlaylist(this);
+ playlist->setMediaObject(player);
+
+ connect(player, SIGNAL(durationChanged(qint64)), SLOT(durationChanged(qint64)));
+ connect(player, SIGNAL(positionChanged(qint64)), SLOT(positionChanged(qint64)));
+ connect(player, SIGNAL(metaDataChanged()), SLOT(metaDataChanged()));
+ connect(playlist, SIGNAL(currentIndexChanged(int)), SLOT(playlistPositionChanged(int)));
+ connect(player, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)),
+ this, SLOT(statusChanged(QMediaPlayer::MediaStatus)));
+ connect(player, SIGNAL(bufferStatusChanged(int)), this, SLOT(bufferingProgress(int)));
+
+ videoWidget = new VideoWidget;
+ videoWidget->setMediaObject(player);
+
+ playlistModel = new PlaylistModel(this);
+ playlistModel->setPlaylist(playlist);
+
+ playlistView = new QListView;
+ playlistView->setModel(playlistModel);
+ playlistView->setCurrentIndex(playlistModel->index(playlist->currentIndex(), 0));
+
+ connect(playlistView, SIGNAL(activated(QModelIndex)), this, SLOT(jump(QModelIndex)));
+
+ playbackModeBox = new QComboBox;
+ playbackModeBox->addItem(tr("Linear"),
+ QVariant::fromValue<QMediaPlaylist::PlaybackMode>(QMediaPlaylist::Linear));
+ playbackModeBox->addItem(tr("Loop"),
+ QVariant::fromValue<QMediaPlaylist::PlaybackMode>(QMediaPlaylist::Loop));
+ playbackModeBox->addItem(tr("Random"),
+ QVariant::fromValue<QMediaPlaylist::PlaybackMode>(QMediaPlaylist::Random));
+ playbackModeBox->addItem(tr("Current Item Once"),
+ QVariant::fromValue<QMediaPlaylist::PlaybackMode>(QMediaPlaylist::CurrentItemOnce));
+ playbackModeBox->addItem(tr("Current Item In Loop"),
+ QVariant::fromValue<QMediaPlaylist::PlaybackMode>(QMediaPlaylist::CurrentItemInLoop));
+ playbackModeBox->setCurrentIndex(0);
+
+ connect(playbackModeBox, SIGNAL(activated(int)), SLOT(updatePlaybackMode()));
+ updatePlaybackMode();
+
+ slider = new QSlider(Qt::Horizontal);
+ slider->setRange(0, player->duration() / 1000);
+
+ connect(slider, SIGNAL(sliderMoved(int)), this, SLOT(seek(int)));
+
+ QPushButton *openButton = new QPushButton(tr("Open"));
+
+ connect(openButton, SIGNAL(clicked()), this, SLOT(open()));
+
+ PlayerControls *controls = new PlayerControls;
+ controls->setState(player->state());
+ controls->setVolume(player->volume());
+ controls->setMuted(controls->isMuted());
+
+ connect(controls, SIGNAL(play()), player, SLOT(play()));
+ connect(controls, SIGNAL(pause()), player, SLOT(pause()));
+ connect(controls, SIGNAL(stop()), player, SLOT(stop()));
+ connect(controls, SIGNAL(next()), playlist, SLOT(next()));
+ connect(controls, SIGNAL(previous()), this, SLOT(previousClicked()));
+ connect(controls, SIGNAL(changeVolume(int)), player, SLOT(setVolume(int)));
+ connect(controls, SIGNAL(changeMuting(bool)), player, SLOT(setMuted(bool)));
+ connect(controls, SIGNAL(changeRate(qreal)), player, SLOT(setPlaybackRate(qreal)));
+
+ connect(player, SIGNAL(stateChanged(QMediaPlayer::State)),
+ controls, SLOT(setState(QMediaPlayer::State)));
+ connect(player, SIGNAL(volumeChanged(int)), controls, SLOT(setVolume(int)));
+ connect(player, SIGNAL(mutedChanged(bool)), controls, SLOT(setMuted(bool)));
+
+ QPushButton *fullScreenButton = new QPushButton(tr("FullScreen"));
+ fullScreenButton->setCheckable(true);
+
+ if (videoWidget != 0) {
+ connect(fullScreenButton, SIGNAL(clicked(bool)), videoWidget, SLOT(setFullScreen(bool)));
+ connect(videoWidget, SIGNAL(fullScreenChanged(bool)),
+ fullScreenButton, SLOT(setChecked(bool)));
+ } else {
+ fullScreenButton->setEnabled(false);
+ }
+
+ QPushButton *colorButton = new QPushButton(tr("Color Options..."));
+ if (videoWidget)
+ connect(colorButton, SIGNAL(clicked()), this, SLOT(showColorDialog()));
+ else
+ colorButton->setEnabled(false);
+
+ QBoxLayout *playlistLayout = new QVBoxLayout;
+ playlistLayout->addWidget(playlistView);
+ playlistLayout->addWidget(playbackModeBox);
+
+ QBoxLayout *displayLayout = new QHBoxLayout;
+ if (videoWidget)
+ displayLayout->addWidget(videoWidget, 2);
+ else
+ displayLayout->addWidget(coverLabel, 2);
+ displayLayout->addLayout(playlistLayout);
+
+ QBoxLayout *controlLayout = new QHBoxLayout;
+ controlLayout->setMargin(0);
+ controlLayout->addWidget(openButton);
+ controlLayout->addStretch(1);
+ controlLayout->addWidget(controls);
+ controlLayout->addStretch(1);
+ controlLayout->addWidget(fullScreenButton);
+ controlLayout->addWidget(colorButton);
+
+ QBoxLayout *layout = new QVBoxLayout;
+ layout->addLayout(displayLayout);
+ layout->addWidget(slider);
+ layout->addLayout(controlLayout);
+
+ setLayout(layout);
+
+ metaDataChanged();
+
+ QStringList fileNames = qApp->arguments();
+ fileNames.removeAt(0);
+ foreach (QString const &fileName, fileNames) {
+ if (QFileInfo(fileName).exists())
+ playlist->addMedia(QUrl::fromLocalFile(fileName));
+ }
+}
+
+Player::~Player()
+{
+ delete playlist;
+ delete player;
+}
+
+void Player::open()
+{
+ QStringList fileNames = QFileDialog::getOpenFileNames();
+ foreach (QString const &fileName, fileNames)
+ playlist->addMedia(QUrl::fromLocalFile(fileName));
+}
+
+void Player::durationChanged(qint64 duration)
+{
+ slider->setMaximum(duration / 1000);
+}
+
+void Player::positionChanged(qint64 progress)
+{
+ slider->setValue(progress / 1000);
+}
+
+void Player::metaDataChanged()
+{
+ //qDebug() << "update metadata" << player->metaData(QtMultimedia::Title).toString();
+ if (player->isMetaDataAvailable()) {
+ setTrackInfo(QString("%1 - %2")
+ .arg(player->metaData(QtMultimedia::AlbumArtist).toString())
+ .arg(player->metaData(QtMultimedia::Title).toString()));
+
+ if (coverLabel) {
+ QUrl url = player->metaData(QtMultimedia::CoverArtUrlLarge).value<QUrl>();
+
+ coverLabel->setPixmap(!url.isEmpty()
+ ? QPixmap(url.toString())
+ : QPixmap());
+ }
+ }
+}
+
+void Player::previousClicked()
+{
+ // Go to previous track if we are within the first 5 seconds of playback
+ // Otherwise, seek to the beginning.
+ if(player->position() <= 5000)
+ playlist->previous();
+ else
+ player->setPosition(0);
+}
+
+void Player::jump(const QModelIndex &index)
+{
+ if (index.isValid()) {
+ playlist->setCurrentIndex(index.row());
+ player->play();
+ }
+}
+
+void Player::playlistPositionChanged(int currentItem)
+{
+ playlistView->setCurrentIndex(playlistModel->index(currentItem, 0));
+}
+
+void Player::seek(int seconds)
+{
+ player->setPosition(seconds * 1000);
+}
+
+void Player::statusChanged(QMediaPlayer::MediaStatus status)
+{
+ switch (status) {
+ case QMediaPlayer::UnknownMediaStatus:
+ case QMediaPlayer::NoMedia:
+ case QMediaPlayer::LoadedMedia:
+ case QMediaPlayer::BufferingMedia:
+ case QMediaPlayer::BufferedMedia:
+#ifndef QT_NO_CURSOR
+ unsetCursor();
+#endif
+ setStatusInfo(QString());
+ break;
+ case QMediaPlayer::LoadingMedia:
+#ifndef QT_NO_CURSOR
+ setCursor(QCursor(Qt::BusyCursor));
+#endif
+ setStatusInfo(tr("Loading..."));
+ break;
+ case QMediaPlayer::StalledMedia:
+#ifndef QT_NO_CURSOR
+ setCursor(QCursor(Qt::BusyCursor));
+#endif
+ break;
+ case QMediaPlayer::EndOfMedia:
+#ifndef QT_NO_CURSOR
+ unsetCursor();
+#endif
+ setStatusInfo(QString());
+ QApplication::alert(this);
+ break;
+ case QMediaPlayer::InvalidMedia:
+#ifndef QT_NO_CURSOR
+ unsetCursor();
+#endif
+ setStatusInfo(player->errorString());
+ break;
+ }
+}
+
+void Player::bufferingProgress(int progress)
+{
+ setStatusInfo(tr("Buffering %4%%").arg(progress));
+}
+
+void Player::setTrackInfo(const QString &info)
+{
+ trackInfo = info;
+
+ if (!statusInfo.isEmpty())
+ setWindowTitle(QString("%1 | %2").arg(trackInfo).arg(statusInfo));
+ else
+ setWindowTitle(trackInfo);
+
+}
+
+void Player::setStatusInfo(const QString &info)
+{
+ statusInfo = info;
+
+ if (!statusInfo.isEmpty())
+ setWindowTitle(QString("%1 | %2").arg(trackInfo).arg(statusInfo));
+ else
+ setWindowTitle(trackInfo);
+}
+
+void Player::showColorDialog()
+{
+ if (!colorDialog) {
+ QSlider *brightnessSlider = new QSlider(Qt::Horizontal);
+ brightnessSlider->setRange(-100, 100);
+ brightnessSlider->setValue(videoWidget->brightness());
+ connect(brightnessSlider, SIGNAL(sliderMoved(int)), videoWidget, SLOT(setBrightness(int)));
+ connect(videoWidget, SIGNAL(brightnessChanged(int)), brightnessSlider, SLOT(setValue(int)));
+
+ QSlider *contrastSlider = new QSlider(Qt::Horizontal);
+ contrastSlider->setRange(-100, 100);
+ contrastSlider->setValue(videoWidget->contrast());
+ connect(contrastSlider, SIGNAL(sliderMoved(int)), videoWidget, SLOT(setContrast(int)));
+ connect(videoWidget, SIGNAL(contrastChanged(int)), contrastSlider, SLOT(setValue(int)));
+
+ QSlider *hueSlider = new QSlider(Qt::Horizontal);
+ hueSlider->setRange(-100, 100);
+ hueSlider->setValue(videoWidget->hue());
+ connect(hueSlider, SIGNAL(sliderMoved(int)), videoWidget, SLOT(setHue(int)));
+ connect(videoWidget, SIGNAL(hueChanged(int)), hueSlider, SLOT(setValue(int)));
+
+ QSlider *saturationSlider = new QSlider(Qt::Horizontal);
+ saturationSlider->setRange(-100, 100);
+ saturationSlider->setValue(videoWidget->saturation());
+ connect(saturationSlider, SIGNAL(sliderMoved(int)), videoWidget, SLOT(setSaturation(int)));
+ connect(videoWidget, SIGNAL(saturationChanged(int)), saturationSlider, SLOT(setValue(int)));
+
+ QFormLayout *layout = new QFormLayout;
+ layout->addRow(tr("Brightness"), brightnessSlider);
+ layout->addRow(tr("Contrast"), contrastSlider);
+ layout->addRow(tr("Hue"), hueSlider);
+ layout->addRow(tr("Saturation"), saturationSlider);
+
+ colorDialog = new QDialog(this);
+ colorDialog->setWindowTitle(tr("Color Options"));
+ colorDialog->setLayout(layout);
+ }
+ colorDialog->show();
+}
+
+void Player::updatePlaybackMode()
+{
+ playlist->setPlaybackMode(
+ playbackModeBox->itemData(playbackModeBox->currentIndex()).value<QMediaPlaylist::PlaybackMode>());
+}
diff --git a/demos/multimedia/player/player.h b/demos/multimedia/player/player.h
new file mode 100644
index 0000000000..cda3eb9d13
--- /dev/null
+++ b/demos/multimedia/player/player.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PLAYER_H
+#define PLAYER_H
+
+#include <QtGui/QWidget>
+
+#include <qmediaplayer.h>
+#include <qmediaplaylist.h>
+#include <qvideowidget.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QAbstractItemView;
+class QLabel;
+class QModelIndex;
+class QSlider;
+class QComboBox;
+class QMediaPlayer;
+class QVideoWidget;
+class PlaylistModel;
+
+class Player : public QWidget
+{
+ Q_OBJECT
+public:
+ Player(QWidget *parent = 0);
+ ~Player();
+
+Q_SIGNALS:
+ void fullScreenChanged(bool fullScreen);
+
+private slots:
+ void open();
+ void durationChanged(qint64 duration);
+ void positionChanged(qint64 progress);
+ void metaDataChanged();
+
+ void previousClicked();
+
+ void seek(int seconds);
+ void jump(const QModelIndex &index);
+ void playlistPositionChanged(int);
+
+ void statusChanged(QMediaPlayer::MediaStatus status);
+ void bufferingProgress(int progress);
+
+ void showColorDialog();
+ void updatePlaybackMode();
+
+private:
+ void setTrackInfo(const QString &info);
+ void setStatusInfo(const QString &info);
+
+ QMediaPlayer *player;
+ QMediaPlaylist *playlist;
+ QVideoWidget *videoWidget;
+ QLabel *coverLabel;
+ QSlider *slider;
+ QComboBox *playbackModeBox;
+ PlaylistModel *playlistModel;
+ QAbstractItemView *playlistView;
+ QDialog *colorDialog;
+ QString trackInfo;
+ QString statusInfo;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/demos/multimedia/player/player.pro b/demos/multimedia/player/player.pro
new file mode 100644
index 0000000000..dc731e4fd0
--- /dev/null
+++ b/demos/multimedia/player/player.pro
@@ -0,0 +1,22 @@
+TEMPLATE = app
+TARGET = player
+
+QT += gui multimedia
+
+
+HEADERS = \
+ player.h \
+ playercontrols.h \
+ playlistmodel.h \
+ videowidget.h
+
+SOURCES = \
+ main.cpp \
+ player.cpp \
+ playercontrols.cpp \
+ playlistmodel.cpp \
+ videowidget.cpp
+
+target.path = $$[QT_INSTALL_DEMOS]/multimedia/player
+INSTALLS += target
+
diff --git a/demos/multimedia/player/playercontrols.cpp b/demos/multimedia/player/playercontrols.cpp
new file mode 100644
index 0000000000..3798a71faf
--- /dev/null
+++ b/demos/multimedia/player/playercontrols.cpp
@@ -0,0 +1,205 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "playercontrols.h"
+
+#include <QtGui/qboxlayout.h>
+#include <QtGui/qslider.h>
+#include <QtGui/qstyle.h>
+#include <QtGui/qtoolbutton.h>
+#include <QtGui/qcombobox.h>
+
+PlayerControls::PlayerControls(QWidget *parent)
+ : QWidget(parent)
+ , playerState(QMediaPlayer::StoppedState)
+ , playerMuted(false)
+ , playButton(0)
+ , stopButton(0)
+ , nextButton(0)
+ , previousButton(0)
+ , muteButton(0)
+ , volumeSlider(0)
+ , rateBox(0)
+{
+ playButton = new QToolButton;
+ playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay));
+
+ connect(playButton, SIGNAL(clicked()), this, SLOT(playClicked()));
+
+ stopButton = new QToolButton;
+ stopButton->setIcon(style()->standardIcon(QStyle::SP_MediaStop));
+ stopButton->setEnabled(false);
+
+ connect(stopButton, SIGNAL(clicked()), this, SIGNAL(stop()));
+
+ nextButton = new QToolButton;
+ nextButton->setIcon(style()->standardIcon(QStyle::SP_MediaSkipForward));
+
+ connect(nextButton, SIGNAL(clicked()), this, SIGNAL(next()));
+
+ previousButton = new QToolButton;
+ previousButton->setIcon(style()->standardIcon(QStyle::SP_MediaSkipBackward));
+
+ connect(previousButton, SIGNAL(clicked()), this, SIGNAL(previous()));
+
+ muteButton = new QToolButton;
+ muteButton->setIcon(style()->standardIcon(QStyle::SP_MediaVolume));
+
+ connect(muteButton, SIGNAL(clicked()), this, SLOT(muteClicked()));
+
+ volumeSlider = new QSlider(Qt::Horizontal);
+ volumeSlider->setRange(0, 100);
+
+ connect(volumeSlider, SIGNAL(sliderMoved(int)), this, SIGNAL(changeVolume(int)));
+
+ rateBox = new QComboBox;
+ rateBox->addItem("0.5x", QVariant(0.5));
+ rateBox->addItem("1.0x", QVariant(1.0));
+ rateBox->addItem("2.0x", QVariant(2.0));
+ rateBox->setCurrentIndex(1);
+
+ connect(rateBox, SIGNAL(activated(int)), SLOT(updateRate()));
+
+ QBoxLayout *layout = new QHBoxLayout;
+ layout->setMargin(0);
+ layout->addWidget(stopButton);
+ layout->addWidget(previousButton);
+ layout->addWidget(playButton);
+ layout->addWidget(nextButton);
+ layout->addWidget(muteButton);
+ layout->addWidget(volumeSlider);
+ layout->addWidget(rateBox);
+ setLayout(layout);
+}
+
+QMediaPlayer::State PlayerControls::state() const
+{
+ return playerState;
+}
+
+void PlayerControls::setState(QMediaPlayer::State state)
+{
+ if (state != playerState) {
+ playerState = state;
+
+ switch (state) {
+ case QMediaPlayer::StoppedState:
+ stopButton->setEnabled(false);
+ playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay));
+ break;
+ case QMediaPlayer::PlayingState:
+ stopButton->setEnabled(true);
+ playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPause));
+ break;
+ case QMediaPlayer::PausedState:
+ stopButton->setEnabled(true);
+ playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay));
+ break;
+ }
+ }
+}
+
+int PlayerControls::volume() const
+{
+ return volumeSlider->value();
+}
+
+void PlayerControls::setVolume(int volume)
+{
+ volumeSlider->setValue(volume);
+}
+
+bool PlayerControls::isMuted() const
+{
+ return playerMuted;
+}
+
+void PlayerControls::setMuted(bool muted)
+{
+ if (muted != playerMuted) {
+ playerMuted = muted;
+
+ muteButton->setIcon(style()->standardIcon(muted
+ ? QStyle::SP_MediaVolumeMuted
+ : QStyle::SP_MediaVolume));
+ }
+}
+
+void PlayerControls::playClicked()
+{
+ switch (playerState) {
+ case QMediaPlayer::StoppedState:
+ case QMediaPlayer::PausedState:
+ emit play();
+ break;
+ case QMediaPlayer::PlayingState:
+ emit pause();
+ break;
+ }
+}
+
+void PlayerControls::muteClicked()
+{
+ emit changeMuting(!playerMuted);
+}
+
+qreal PlayerControls::playbackRate() const
+{
+ return rateBox->itemData(rateBox->currentIndex()).toDouble();
+}
+
+void PlayerControls::setPlaybackRate(float rate)
+{
+ for (int i=0; i<rateBox->count(); i++) {
+ if (qFuzzyCompare(rate, float(rateBox->itemData(i).toDouble()))) {
+ rateBox->setCurrentIndex(i);
+ return;
+ }
+ }
+
+ rateBox->addItem( QString("%1x").arg(rate), QVariant(rate));
+ rateBox->setCurrentIndex(rateBox->count()-1);
+}
+
+void PlayerControls::updateRate()
+{
+ emit changeRate(playbackRate());
+}
diff --git a/demos/multimedia/player/playercontrols.h b/demos/multimedia/player/playercontrols.h
new file mode 100644
index 0000000000..99894fffcd
--- /dev/null
+++ b/demos/multimedia/player/playercontrols.h
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PLAYERCONTROLS_H
+#define PLAYERCONTROLS_H
+
+#include <QtMultimedia/qmediaplayer.h>
+
+#include <QtGui/qwidget.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QAbstractButton;
+class QAbstractSlider;
+class QComboBox;
+
+class PlayerControls : public QWidget
+{
+ Q_OBJECT
+public:
+ PlayerControls(QWidget *parent = 0);
+
+ QMediaPlayer::State state() const;
+
+ int volume() const;
+ bool isMuted() const;
+ qreal playbackRate() const;
+
+public slots:
+ void setState(QMediaPlayer::State state);
+ void setVolume(int volume);
+ void setMuted(bool muted);
+ void setPlaybackRate(float rate);
+
+signals:
+ void play();
+ void pause();
+ void stop();
+ void next();
+ void previous();
+ void changeVolume(int volume);
+ void changeMuting(bool muting);
+ void changeRate(qreal rate);
+
+private slots:
+ void playClicked();
+ void muteClicked();
+ void updateRate();
+
+private:
+ QMediaPlayer::State playerState;
+ bool playerMuted;
+ QAbstractButton *playButton;
+ QAbstractButton *stopButton;
+ QAbstractButton *nextButton;
+ QAbstractButton *previousButton;
+ QAbstractButton *muteButton;
+ QAbstractSlider *volumeSlider;
+ QComboBox *rateBox;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/demos/multimedia/player/playlistmodel.cpp b/demos/multimedia/player/playlistmodel.cpp
new file mode 100644
index 0000000000..b60f914a0a
--- /dev/null
+++ b/demos/multimedia/player/playlistmodel.cpp
@@ -0,0 +1,160 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "playlistmodel.h"
+
+#include <QtCore/qfileinfo.h>
+#include <QtCore/qurl.h>
+
+#include <qmediaplaylist.h>
+
+PlaylistModel::PlaylistModel(QObject *parent)
+ : QAbstractItemModel(parent)
+ , m_playlist(0)
+{
+}
+
+int PlaylistModel::rowCount(const QModelIndex &parent) const
+{
+ return m_playlist && !parent.isValid() ? m_playlist->mediaCount() : 0;
+}
+
+int PlaylistModel::columnCount(const QModelIndex &parent) const
+{
+ return !parent.isValid() ? ColumnCount : 0;
+}
+
+QModelIndex PlaylistModel::index(int row, int column, const QModelIndex &parent) const
+{
+ return m_playlist && !parent.isValid()
+ && row >= 0 && row < m_playlist->mediaCount()
+ && column >= 0 && column < ColumnCount
+ ? createIndex(row, column)
+ : QModelIndex();
+}
+
+QModelIndex PlaylistModel::parent(const QModelIndex &child) const
+{
+ Q_UNUSED(child);
+
+ return QModelIndex();
+}
+
+QVariant PlaylistModel::data(const QModelIndex &index, int role) const
+{
+ if (index.isValid() && role == Qt::DisplayRole) {
+ QVariant value = m_data[index];
+ if (!value.isValid() && index.column() == Title) {
+ QUrl location = m_playlist->media(index.row()).canonicalUrl();
+ return QFileInfo(location.path()).fileName();
+ }
+
+ return value;
+ }
+ return QVariant();
+}
+
+QMediaPlaylist *PlaylistModel::playlist() const
+{
+ return m_playlist;
+}
+
+void PlaylistModel::setPlaylist(QMediaPlaylist *playlist)
+{
+ if (m_playlist) {
+ disconnect(m_playlist, SIGNAL(mediaAboutToBeInserted(int,int)), this, SLOT(beginInsertItems(int,int)));
+ disconnect(m_playlist, SIGNAL(mediaInserted(int,int)), this, SLOT(endInsertItems()));
+ disconnect(m_playlist, SIGNAL(mediaAboutToBeRemoved(int,int)), this, SLOT(beginRemoveItems(int,int)));
+ disconnect(m_playlist, SIGNAL(mediaRemoved(int,int)), this, SLOT(endRemoveItems()));
+ disconnect(m_playlist, SIGNAL(mediaChanged(int,int)), this, SLOT(changeItems(int,int)));
+ }
+
+ m_playlist = playlist;
+
+ if (m_playlist) {
+ connect(m_playlist, SIGNAL(mediaAboutToBeInserted(int,int)), this, SLOT(beginInsertItems(int,int)));
+ connect(m_playlist, SIGNAL(mediaInserted(int,int)), this, SLOT(endInsertItems()));
+ connect(m_playlist, SIGNAL(mediaAboutToBeRemoved(int,int)), this, SLOT(beginRemoveItems(int,int)));
+ connect(m_playlist, SIGNAL(mediaRemoved(int,int)), this, SLOT(endRemoveItems()));
+ connect(m_playlist, SIGNAL(mediaChanged(int,int)), this, SLOT(changeItems(int,int)));
+ }
+
+
+ reset();
+}
+
+bool PlaylistModel::setData(const QModelIndex &index, const QVariant &value, int role)
+{
+ Q_UNUSED(role);
+ m_data[index] = value;
+ emit dataChanged(index, index);
+ return true;
+}
+
+void PlaylistModel::beginInsertItems(int start, int end)
+{
+ m_data.clear();
+ beginInsertRows(QModelIndex(), start, end);
+}
+
+void PlaylistModel::endInsertItems()
+{
+ endInsertRows();
+}
+
+void PlaylistModel::beginRemoveItems(int start, int end)
+{
+ m_data.clear();
+ beginRemoveRows(QModelIndex(), start, end);
+}
+
+void PlaylistModel::endRemoveItems()
+{
+ endInsertRows();
+}
+
+void PlaylistModel::changeItems(int start, int end)
+{
+ m_data.clear();
+ emit dataChanged(index(start,0), index(end,ColumnCount));
+}
+
+
diff --git a/demos/multimedia/player/playlistmodel.h b/demos/multimedia/player/playlistmodel.h
new file mode 100644
index 0000000000..01802826f2
--- /dev/null
+++ b/demos/multimedia/player/playlistmodel.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PLAYLISTMODEL_H
+#define PLAYLISTMODEL_H
+
+#include <QtCore/qabstractitemmodel.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QMediaPlaylist;
+
+class PlaylistModel : public QAbstractItemModel
+{
+ Q_OBJECT
+public:
+ enum Column
+ {
+ Title = 0,
+ ColumnCount
+ };
+
+ PlaylistModel(QObject *parent = 0);
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+
+ QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
+ QModelIndex parent(const QModelIndex &child) const;
+
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+
+ QMediaPlaylist *playlist() const;
+ void setPlaylist(QMediaPlaylist *playlist);
+
+ bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::DisplayRole);
+
+private slots:
+ void beginInsertItems(int start, int end);
+ void endInsertItems();
+ void beginRemoveItems(int start, int end);
+ void endRemoveItems();
+ void changeItems(int start, int end);
+
+private:
+ QMediaPlaylist *m_playlist;
+ QMap<QModelIndex, QVariant> m_data;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/demos/multimedia/player/videowidget.cpp b/demos/multimedia/player/videowidget.cpp
new file mode 100644
index 0000000000..3bf36c3700
--- /dev/null
+++ b/demos/multimedia/player/videowidget.cpp
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "videowidget.h"
+
+#include <QtGui>
+
+VideoWidget::VideoWidget(QWidget *parent)
+ : QVideoWidget(parent)
+{
+ setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
+}
+
+void VideoWidget::keyPressEvent(QKeyEvent *event)
+{
+ if (event->key() == Qt::Key_Escape && isFullScreen()) {
+ showNormal();
+
+ event->accept();
+ } else if (event->key() == Qt::Key_Enter && event->modifiers() & Qt::Key_Alt) {
+ setFullScreen(!isFullScreen());
+
+ event->accept();
+ } else {
+ QVideoWidget::keyPressEvent(event);
+ }
+}
+
+void VideoWidget::mouseDoubleClickEvent(QMouseEvent *event)
+{
+ setFullScreen(!isFullScreen());
+
+ event->accept();
+}
diff --git a/demos/multimedia/player/videowidget.h b/demos/multimedia/player/videowidget.h
new file mode 100644
index 0000000000..543e1e05f4
--- /dev/null
+++ b/demos/multimedia/player/videowidget.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef VIDEOWIDGET_H
+#define VIDEOWIDGET_H
+
+#include <QtMultimedia/qvideowidget.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class VideoWidget : public QVideoWidget
+{
+ Q_OBJECT
+public:
+ VideoWidget(QWidget *parent = 0);
+
+protected:
+ void keyPressEvent(QKeyEvent *event);
+ void mouseDoubleClickEvent(QMouseEvent *event);
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/demos/qtdemo/qtdemo.pro b/demos/qtdemo/qtdemo.pro
index 011ea0c416..2a776ace1d 100644
--- a/demos/qtdemo/qtdemo.pro
+++ b/demos/qtdemo/qtdemo.pro
@@ -3,8 +3,6 @@ TARGET = qtdemo
DEMO_DESTDIR = $$QT_BUILD_TREE
isEmpty(DEMO_DESTDIR):DEMO_DESTDIR=../..
DESTDIR = $$DEMO_DESTDIR/bin
-OBJECTS_DIR = .obj
-MOC_DIR = .moc
INSTALLS += target sources
diff --git a/demos/spreadsheet/spreadsheet.cpp b/demos/spreadsheet/spreadsheet.cpp
index 9693f3c047..f2a1738c89 100644
--- a/demos/spreadsheet/spreadsheet.cpp
+++ b/demos/spreadsheet/spreadsheet.cpp
@@ -70,6 +70,7 @@ SpreadSheet::SpreadSheet(int rows, int cols, QWidget *parent)
updateColor(0);
setupMenuBar();
setupContents();
+ setupContextMenu();
setCentralWidget(table);
statusBar();
diff --git a/dist/changes-4.7.0 b/dist/changes-4.7.0
new file mode 100644
index 0000000000..76fa7f875b
--- /dev/null
+++ b/dist/changes-4.7.0
@@ -0,0 +1,135 @@
+Qt 4.7 introduces many new features and improvements as well as bugfixes
+over the 4.6.x series. For more details, refer to the online documentation
+included in this distribution. The documentation is also available online:
+
+ http://qt.nokia.com/doc/4.7
+
+The Qt version 4.7 series is binary compatible with the 4.6.x series.
+Applications compiled for 4.6 will continue to run with 4.7.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Task Tracker:
+
+ http://qt.nokia.com/developer/task-tracker
+
+Each of these identifiers can be entered in the task tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+General Improvements
+--------------------
+
+- Documentation and Examples
+
+- Support for the GL_EXT_geometry_shader4, aka Geometry Shaders, was added
+ to QGLShaderProgram.
+
+Third party components
+----------------------
+
+ - Updated libpng to version 1.4.0
+
+ - Updated libjpeg to version 8
+
+ - Updated libtiff to version 3.9.2
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+ - QPrinter
+ * Obsoleted the slightly confusing setNumCopies() and numCopies()
+ functions, and replaced them with setCopyCount(), copyCount() and
+ supportsMultipleCopies().
+
+****************************************************************************
+* Database Drivers *
+****************************************************************************
+
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+Qt for Linux/X11
+----------------
+
+
+Qt for Windows
+--------------
+
+
+Qt for Mac OS X
+---------------
+
+
+Qt for Embedded Linux
+---------------------
+
+
+Qt for Windows CE
+-----------------
+
+
+****************************************************************************
+* Compiler Specific Changes *
+****************************************************************************
+
+
+****************************************************************************
+* Tools *
+****************************************************************************
+
+- Build System
+
+- Assistant
+
+
+- Designer
+
+
+- Linguist
+ - Linguist GUI
+
+ - lupdate
+
+ - lrelease
+
+
+- rcc
+
+
+- moc
+
+
+- uic
+
+
+- uic3
+
+
+- qmake
+
+
+- configure
+
+
+- qtconfig
+
+
+- qt3to4
+
+
+****************************************************************************
+* Plugins *
+****************************************************************************
+
+
+****************************************************************************
+* Important Behavior Changes *
+****************************************************************************
+
diff --git a/doc/doc.pri b/doc/doc.pri
index 463c447f1a..3d04049287 100644
--- a/doc/doc.pri
+++ b/doc/doc.pri
@@ -21,26 +21,36 @@ $$unixstyle {
}
ADP_DOCS_QDOCCONF_FILE = qt-build-docs.qdocconf
QT_DOCUMENTATION = ($$QDOC qt-api-only.qdocconf assistant.qdocconf designer.qdocconf \
- linguist.qdocconf qmake.qdocconf) && \
+ linguist.qdocconf qmake.qdocconf qdeclarative.qdocconf) && \
(cd $$QT_BUILD_TREE && \
$$GENERATOR doc-build/html-qt/qt.qhp -o doc/qch/qt.qch && \
$$GENERATOR doc-build/html-assistant/assistant.qhp -o doc/qch/assistant.qch && \
$$GENERATOR doc-build/html-designer/designer.qhp -o doc/qch/designer.qch && \
$$GENERATOR doc-build/html-linguist/linguist.qhp -o doc/qch/linguist.qch && \
- $$GENERATOR doc-build/html-qmake/qmake.qhp -o doc/qch/qmake.qch \
+ $$GENERATOR doc-build/html-qmake/qmake.qhp -o doc/qch/qmake.qch && \
+ $$GENERATOR doc-build/html-qml/qml.qhp -o doc/qch/qml.qch \
+ )
+
+QT_ZH_CN_DOCUMENTATION = ($$QDOC qt-api-only_zh_CN.qdocconf) && \
+ (cd $$QT_BUILD_TREE && \
+ $$GENERATOR doc-build/html-qt_zh_CN/qt.qhp -o doc/qch/qt_zh_CN.qch \
)
win32-g++:isEmpty(QMAKE_SH) {
QT_DOCUMENTATION = $$replace(QT_DOCUMENTATION, "/", "\\\\")
+ QT_ZH_CN_DOCUMENTATION = $$replace(QT_ZH_CN_DOCUMENTATION, "/", "\\\\")
}
# Build rules:
adp_docs.commands = ($$QDOC $$ADP_DOCS_QDOCCONF_FILE)
-adp_docs.depends += sub-tools # qdoc3
+adp_docs.depends += sub-qdoc3 # qdoc3
qch_docs.commands = $$QT_DOCUMENTATION
-qch_docs.depends += sub-tools
+qch_docs.depends += sub-qdoc3
-docs.depends = adp_docs qch_docs
+docs.depends = sub-qdoc3 adp_docs qch_docs
+
+docs_zh_CN.depends = docs
+docs_zh_CN.commands = $$QT_ZH_CN_DOCUMENTATION
# Install rules
htmldocs.files = $$QT_BUILD_TREE/doc/html
@@ -54,5 +64,8 @@ qchdocs.CONFIG += no_check_exist
docimages.files = $$QT_BUILD_TREE/doc/src/images
docimages.path = $$[QT_INSTALL_DOCS]/src
-QMAKE_EXTRA_TARGETS += qdoc adp_docs qch_docs docs
+sub-qdoc3.depends = sub-corelib sub-xml
+sub-qdoc3.commands += (cd tools/qdoc3 && $(MAKE))
+
+QMAKE_EXTRA_TARGETS += sub-qdoc3 adp_docs qch_docs docs docs_zh_CN
INSTALLS += htmldocs qchdocs docimages
diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc
new file mode 100644
index 0000000000..e420e6dd4d
--- /dev/null
+++ b/doc/src/declarative/advtutorial.qdoc
@@ -0,0 +1,379 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qml-advtutorial.html
+\title QML Advanced Tutorial
+\brief A more advanced tutorial, showing how to use QML to create a game.
+\nextpage QML Advanced Tutorial 1 - Creating the Game Canvas and Blocks
+
+This tutorial goes step-by-step through creating a full application using just QML.
+It is assumed that you already know basic QML (such as from doing the simple tutorial) and the focus is on showing
+how to turn that knowledge into a complete and functioning application.
+
+This tutorial involves a significant amount of JavaScript to implement the game logic. An understanding of JavaScript is helpful to understand the JavaScript parts of this tutorial, but if you don't understand JavaScript you can still get a feel for how to integrate QML elements with backend logic which creates and controls them. From the QML perspective, there is little difference between integrating with backend logic written in C++ and backend logic written in JavaScript.
+
+In this tutorial we recreate, step by step, a version of the Same Game demo in $QTDIR/demos/declarative/samegame.qml.
+The results of the individual steps are in the $QTDIR/examples/declarative/tutorials/samegame directory.
+
+The Same Game demo has been extended since this tutorial was written. This tutorial only covers the version in
+the $QTDIR/examples/declarative/tutorials/samegame directory. However once you have completed the tutorial you should be able
+to understand the extensions in the most recent Same Game demo, and even extend it yourself.
+
+Tutorial chapters:
+
+\list
+\o \l {QML Advanced Tutorial 1 - Creating the Game Canvas and Blocks}
+\o \l {QML Advanced Tutorial 2 - Populating the Game Canvas}
+\o \l {QML Advanced Tutorial 3 - Implementing the Game Logic}
+\o \l {QML Advanced Tutorial 4 - Finishing Touches}
+\endlist
+*/
+
+/*!
+\page qml-advtutorial1.html
+\title QML Advanced Tutorial 1 - Creating the Game Canvas and Blocks
+\contentspage QML Advanced Tutorial
+\previouspage QML Advanced Tutorial
+\nextpage QML Advanced Tutorial 2 - Populating the Game Canvas
+
+The first step is to create the items in your application. In Same Game we have a main game screen and the blocks that populate it.
+
+\image declarative-adv-tutorial1.png
+
+Here is the QML code for the basic elements. The game window:
+
+\snippet declarative/tutorials/samegame/samegame1/samegame.qml 0
+
+This gives you a basic game window, with room for the game canvas. A new game
+button and room to display the score. The one thing you may not recognize here
+is the \l SystemPalette item. This item provides access to the Qt system palette
+and is used to make the button look more like a system button (for exact native
+feel you would use a \l QPushButton). Since we want a fully functional button,
+we use the QML elements Text and MouseArea inside a Rectangle to assemble a
+button. Below is the code which we wrote to do this:
+
+\snippet declarative/tutorials/samegame/samegame1/Button.qml 0
+
+Note that this Button component was written to be fairly generic, in case we
+want to use a similarly styled button later.
+
+And here is a simple block:
+
+\snippet declarative/tutorials/samegame/samegame1/Block.qml 0
+
+Since it doesn't do anything yet it's very simple, just an image. As the
+tutorial progresses and the block starts doing things the file will become
+more than just an image. Note that we've set the image to be the size of the item.
+This will be used later, when we dynamically create and size the block items the image will be scaled automatically
+to the correct size.
+
+Note that because there are several stages to this tutorial they share images. This is done by having a shared resources
+folder containing the images, and all stages of the tutorial refer to the same shared folder. This is the reason for the
+'../shared/pics' part of the image source. The image source can be any relative or absolute path, and it is relative to the
+location of the file the Image element is in, with ../ meaning to go up one level.
+
+You should be familiar with all that goes on in these files so far. This is a
+very basic start and doesn't move at all - next we will populate the game canvas
+with some blocks.
+*/
+
+
+/*!
+\page qml-advtutorial2.html
+\title QML Advanced Tutorial 2 - Populating the Game Canvas
+\contentspage QML Advanced Tutorial
+\previouspage QML Advanced Tutorial 1 - Creating the Game Canvas and Blocks
+\nextpage QML Advanced Tutorial 3 - Implementing the Game Logic
+
+Now that we've written some basic elements, let's start writing the game. The
+first thing to do is to generate all of the blocks. Now we need to dynamically
+generate all of these blocks, because you have a new, random set of blocks
+every time. As they are dynamically generated every time the new game button is
+clicked, as opposed to on startup, we will be dynamically generating the blocks
+in the JavaScript, as opposed to using a \l Repeater.
+
+This adds enough script to justify a new file, \c{samegame.js}, the intial version
+of which is shown below
+
+\snippet declarative/tutorials/samegame/samegame2/samegame.js 0
+
+The gist of this code is that we create the blocks dynamically, as many as will fit, and then store them in an array for future reference.
+The \c initBoard function will be hooked up to the new game button soon, and should be fairly straight forward.
+
+The \c createBlock function is a lot bigger, and I'll explain it block by block.
+First we ensure that the component has been constructed. QML elements, including composite ones like the \c Block.qml
+that we've written, are never created directly in script. While there is a function to parse and create an arbitrary QML string,
+in the case where you are repeatedly creating the same item you will want to use the \c createComponent function. \c createComponent is
+a built-in function in the declarative JavaScript, and returns a component object.
+A component object prepares and stores a QML element (usually a composite element) for easy and efficient use.
+When the component is ready, you can create a new instance of the loaded QML with the \c createObject method.
+If the component is loaded remotely (over HTTP for example) then you will have to wait for the component to finish loading
+before calling \c createObject. Since we don't wait here (the waiting is asyncronous, the component object will send a signal to tell
+you when it's done) this code will only work if the block QML is a local file.
+
+As we aren't waiting for the component, the next block of code creates a game block with \c{component.createObject}.
+Since there could be an error in the QML file you are trying to load, success is not guaranteed.
+The first bit of error checkign code comes right after \c{createObject()}, to ensure that the object loaded correctly.
+If it did not load correctly the function returns false, but we don't have that hooked up to the main UI to indicate
+that something has gone wrong. Instead we print out error messages to the console, because an error here means an invalid
+QML file and should only happen while you are developing and testing the UI.
+
+Next we start to set up our dynamically created block.
+Because the \c{Block.qml} file is generic it needs to be placed in the main scene, and in the right place.
+This is why \c parent, \c x, \c y, \c width and \c height are set. We then store it in the board array for later use.
+
+Finally, we have some more error handling. You can only call \c{createObject} if the component has loaded.
+If it has not loaded, either it is still loading or there was an error loading (such as a missing file).
+Since we don't request remote files the problem is likely to be a missing or misplaced file.
+Again we print this to the console to aid debugging.
+
+You now have the code to create a field of blocks dynamically, like below:
+
+\image declarative-adv-tutorial2.png
+
+To hook this code up to the \e{New Game} button, you alter it as below:
+
+\snippet declarative/tutorials/samegame/samegame2/samegame.qml 1
+
+We have just replaced the \c{onClicked: console.log("Implement me!")} with \c{onClicked: initBoard()}.
+Note that in order to have the function available, you'll need to include the script in the main file,
+by adding a script element to it.
+
+\snippet declarative/tutorials/samegame/samegame2/samegame.qml 2
+
+With those two changes, and the script file, you are now dynamically creating a field of blocks you can play with.
+They don't do anything now though; the next chapter will add the game mechanics.
+*/
+
+/*!
+\page qml-advtutorial3.html
+\title QML Advanced Tutorial 3 - Implementing the Game Logic
+\contentspage QML Advanced Tutorial
+\previouspage QML Advanced Tutorial 2 - Populating the Game Canvas
+\nextpage QML Advanced Tutorial 4 - Finishing Touches
+
+First we add to the \c initBoard function clearing of the board before filling it up again, so that clicking new game won't leave the previous game
+lying around in the background. To the \c createComponent function we have added setting the type of the block to a number between
+one and three - it's fundamental to the game logic that the blocks be different types if you want a fun game.
+
+The main change was adding the following game logic functions:
+\list
+\o function \c{handleClick(x,y)}
+\o function \c{floodFill(xIdx,yIdx,type)}
+\o function \c{shuffleDown()}
+\o function \c{victoryCheck()}
+\o function \c{floodMoveCheck(xIdx, yIdx, type)}
+\endlist
+
+As this is a tutorial about QML, not game design, these functions will not be discussed in detail. The game logic here
+was written in script, but it could have been written in C++ and had these functions exposed in the same way (except probably faster).
+The interfacing of these functions and QML is what we will focus on. Of these functions, only \c handleClick and \c victoryCheck
+interface closely with the QML. Those functions are shown below (the rest are still in the code for this tutorial located at
+\c{$QTDIR/examples/declarative/tutorials/samegame}).
+
+\snippet declarative/tutorials/samegame/samegame3/samegame.js 1
+\snippet declarative/tutorials/samegame/samegame3/samegame.js 2
+
+You'll notice them referring to the \c gameCanvas item. This is an item that has been added to the QML for easier interfacing with the game logic.
+It is placed next to the background image and replaces the background as the item to create the blocks in.
+Its code is shown below:
+
+\snippet declarative/tutorials/samegame/samegame3/samegame.qml 1
+
+This item is the exact size of the board, contains a score property, and a mouse region for input.
+The blocks are now created as its children, and its size is used to determining the board size, so as to scale to the available screen size.
+Since it needs to bind its size to a multiple of \c tileSize, \c tileSize needs to be moved into a QML property and out of the script file.
+Note that it can still be accessed from the script.
+
+The mouse region simply calls \c{handleClick()}, which deals with the input events.
+Should those events cause the player to score, \c{gameCanvas.score} is updated.
+The score display text item has also been changed to bind its text property to \c{gamecanvas.score}.
+Note that if score was a global variable in the \c{samegame.js} file you could not bind to it. You can only bind to QML properties.
+
+\c victoryCheck() primarily updates the score variable. But it also pops up a dialog saying \e {Game Over} when the game is over.
+In this example we wanted a pure-QML, animated dialog, and since QML doesn't contain one, we wrote our own.
+Below is the code for the \c Dialog element, note how it's designed so as to be usable imperatively from within the script file (via the functions and signals):
+
+\snippet declarative/tutorials/samegame/samegame3/Dialog.qml 0
+
+And this is how it's used in the main QML file:
+
+\snippet declarative/tutorials/samegame/samegame3/samegame.qml 2
+
+Combined with the line of code in \c victoryCheck, this causes a dialog to appear when the game is over, informing the user of that fact.
+
+We now have a working game! The blocks can be clicked, the player can score, and the game can end (and then you start a new one).
+Below is a screenshot of what has been accomplished so far:
+
+\image declarative-adv-tutorial3.png
+
+Here is the QML code as it is now for the main file:
+
+\snippet declarative/tutorials/samegame/samegame3/samegame.qml 0
+
+And the code for the block:
+
+\snippet declarative/tutorials/samegame/samegame3/Block.qml 0
+
+The game works, but it's a little boring right now. Where are the smooth animated transitions? Where are the high scores?
+If you were a QML expert you could have written these in for the first iteration, but in this tutorial they've been saved
+until the next chapter - where your application becomes alive!
+*/
+
+/*!
+\page qml-advtutorial4.html
+\title QML Advanced Tutorial 4 - Finishing Touches
+\contentspage QML Advanced Tutorial
+\previouspage QML Advanced Tutorial 3 - Implementing the Game Logic
+
+Now we're going to do two things to liven the game up. Animate the blocks and add a web-based high score system.
+
+If you compare the \c samegame3 directory with \c samegame4, you'll noticed that we've cleaned the directory structure up.
+We now have a lot of files, and so they've been split up into folders - the most notable one being a content folder
+which we've placed all the QML but the main file.
+
+\section2 Animated Blocks
+
+The most vital animations are that the blocks move fluidly around the board. QML has many tools for fluid behavior,
+and in this case we're going to use the \l SpringFollow element. By having the script set \c targetX and \c targetY, instead of \c x
+and \c y directly, we can set the \c x and \c y of the block to a follow. \l SpringFollow is a property value source, which means
+that you can set a property to be one of these elements and it will automatically bind the property to the element's value.
+The SpringFollow's value follows another value over time, when the value it is tracking changes the SpringFollow's
+value will also change, but it will move smoothly there over time with a spring-like movement (based on the spring
+parameters specified). This is shown in the below snippet of code from \c Block.qml:
+
+\code
+ property int targetX: 0
+ property int targetY: 0
+
+ x: SpringFollow { source: targetX; spring: 2; damping: 0.2 }
+ y: SpringFollow { source: targetY; spring: 2; damping: 0.2 }
+\endcode
+
+We also have to change the \c{samegame.js} code, so that wherever it was setting the \c x or \c y it now sets \c targetX and \c targetY
+(including when creating the block). This simple change is all you need to get spring moving blocks that no longer teleport
+around the board. If you try doing just this though, you'll notice that they now never jump from one point to another, even in
+the initialization! This gives an odd effect of having them all slide out of the corner (0,0) on start up. We'd rather that they
+fall down from the top in rows. To do this, we disable the \c x follow (but not the \c y follow) and only enable it after we've set
+the \c x in the \c createBlock function. The above snippet now becomes:
+
+\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 1
+
+The next-most vital animation is a smooth exit. For this animation, we'll use a \l Behavior element. A Behavior is also a property
+value source, and it is much like SpringFollow except that it doesn't model the behavior of a spring. You specify how a Behavior
+transitions using the standard animations. As we want the blocks to smoothly fade in and out we'll set a Behavior on the block
+image's opacity, like so:
+
+\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 2
+
+Note that the \c{opacity: 0} makes it start out transparent. We could set the opacity in the script file when we create and destroy the blocks,
+but instead we use states (as this is useful for the next animation we'll implement). The below snippet is set on the root
+element of \c{Block.qml}:
+\code
+ property bool dying: false
+ states: [
+ State{ name: "AliveState"; when: spawned == true && dying == false
+ PropertyChanges { target: img; opacity: 1 }
+ }, State{ name: "DeathState"; when: dying == true
+ PropertyChanges { target: img; opacity: 0 }
+ }
+ ]
+\endcode
+
+Now it will automatically fade in, as we set spawned to true already when implementing the block movement animations.
+To fade out, we set 'dying' to true instead of setting opacity to 0 when a block is destroyed (in the \c floodFill function).
+
+The least vital animations are a cool-looking particle effect when they get destroyed. First we create a \l Particles element in
+the block, like so:
+
+\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 3
+
+To fully understand this you'll want to look at the Particles element documentation, but it's important to note that emissionRate is set
+to zero, so that no particles are emitted normally.
+We next extend the 'dying' state, which creates a burst of particles by calling the burst method on the particles element. The code for the states now look
+like this:
+
+\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 4
+
+And now the game should be beautifully animated and smooth, with a subtle (or not-so-subtle) animation added for all of the
+player's actions. The end result is shown below, with a different set of images to demonstrate basic themeing:
+
+\image declarative-adv-tutorial4.gif
+
+The basic theme change there is the result of simply replacing the images. This can be done at run time by setting the source property, so a further advanced feature to try on your own is to add a button which toggles between two different themes.
+
+\section2 Offline High Scores
+Another extension we might want for the game is some way of storing and retrieving high scores. This tutorial contains both online and offline high score storage.
+
+For better high score data, we want the name and time of the player. The time is obtained in the script fairly simply, but we
+have to ask the player for their name. We thus re-use the dialog QML file to pop up a dialog asking for the player's name (and
+if they exit this dialog without entering it they have a way to opt out of posting their high score). When the dialog is closed we store the name and high score, using the code below.
+
+\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 2
+
+For offline storage, we use the HTML 5 offline storage JavaScript API to maintain a persistant SQL database unique to this application. This first line in this function calls the function for the web-based high scores, described later, if it has been setup. Next we create an offline storage database for the high scores using openDatabase and prepare the data and SQL query that we want to use to save it. The offline storage API uses SQL queries for data manipulation and retrival, and in the db.transaction call we use three SQL queries to initialize the database (if necessary), and then add to and retrieve high scores. To use the returned data, we turn it into a string with one line per row returned, and show a dialog containing that string. For a more detailed explanation of the offline storage API in QML, consult the global object documentation.
+
+This is one way of storing and displaying high scores locally, but not the only way. A more complex alternative would have been to create a high score dialog component, and pass the results to it for processing and display (instead of resusing the Dialog). This would allow a more themable dialog that could present the high scores better. If your QML is the UI for a C++ application, you could also have passed the score to a C++ function to store it locally in a variety of ways, including a simple format without SQL or in another SQL database.
+
+\section2 Web-based High Scores
+
+You've seen how to store high scores locally, but it is also easy to integrate a web enabled high score storage into your QML application. This tutorial also shows you how to communicate the high scores to a web server. The implementation we've done is very
+simple - the high score data is posted to a php script running on a server somewhere, and that server then stores it and
+displays it to visitors. You could request an XML or QML file from that same server, which contained and displayed the scores,
+but that's beyond the scope of this tutorial. The php script we've used is available in the examples directory.
+
+if the player entered their name we can send the data to the web service in the following snippet out of the script file:
+
+\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 1
+
+This is the same \c XMLHttpRequest() as you'll find in browser JavaScript, and can be used in the same way to dynamically get XML
+or QML from the web service to display the high scores. We don't worry about the response in this case, we just post the high
+score data to the web server. If it had returned a QML file (or a URL to a QML file) you could instantiate it in much the same
+way as you did the blocks.
+
+An alternate way to access and submit web-based data would be to use QML elements designed for this purpose - XmlListModel
+makes it very easy to fetch and display XML based data such as RSS in a QML application (see the Flickr demo for an example).
+
+By following this tutorial you've now ben shown how to write a fully functional application in QML, with the application logic
+written in a script file and with both many fluid animations and being web-enabled. Congratulations, you should now be skilled
+enough to write entire applications in QML.
+*/
diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc
new file mode 100644
index 0000000000..ff4769474b
--- /dev/null
+++ b/doc/src/declarative/anchor-layout.qdoc
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page anchor-layout.html
+\target anchor-layout
+\title Anchor-based Layout in QML
+
+In addition to the more traditional \l Grid, \l Row, and \l Column, QML also provides a way to layout items using the concept of \e anchors. Each item can be thought of as having a set of 6 invisible "anchor lines": \e left, \e horizontalCenter, \e right, \e top, \e verticalCenter, and \e bottom.
+
+\image edges_qml.png
+
+The QML anchoring system allows you to define relationships between the anchor lines of different items. For example, you can write:
+
+\code
+Rectangle { id: rect1; ... }
+Rectangle { id: rect2; anchors.left: rect1.right; ... }
+\endcode
+
+In this case, the left edge of \e rect2 is bound to the right edge of \e rect1, producing the following:
+
+\image edge1.png
+
+The anchoring system also allows you to specify margins and offsets. Margins specify the amount of empty space to leave to the outside of an item, while offsets allow you to manipulate positioning using the center anchor lines. Note that margins specified using the anchor layout system only have meaning for anchors; they won't have any effect when using other layouts or absolute positioning.
+
+\image margins_qml.png
+
+The following example specifies a left margin:
+
+\code
+Rectangle { id: rect1; ... }
+Rectangle { id: rect2; anchors.left: rect1.right; anchors.leftMargin: 5; ... }
+\endcode
+
+In this case, a margin of 5 pixels is reserved to the left of \e rect2, producing the following:
+
+\image edge2.png
+
+You can specify multiple anchors. For example:
+
+\code
+Rectangle { id: rect1; ... }
+Rectangle { id: rect2; anchors.left: rect1.right; anchors.top: rect1.bottom; ... }
+\endcode
+
+\image edge3.png
+
+By specifying multiple horizontal or vertical anchors you can control the size of an item. For example:
+
+\code
+Rectangle { id: rect1; x: 0; ... }
+Rectangle { id: rect2; anchors.left: rect1.right; anchors.right: rect3.left; ... }
+Rectangle { id: rect3; x: 150; ... }
+\endcode
+
+\image edge4.png
+
+\section1 Limitations
+
+For performance reasons, you can only anchor an item to its siblings and direct parent. For example, the following anchor would be considered invalid and would produce a warning:
+
+\badcode
+Item {
+ id: group1
+ Rectangle { id: rect1; ... }
+}
+Item {
+ id: group2
+ Rectangle { id: rect2; anchors.left: rect1.right; ... } // invalid anchor!
+}
+\endcode
+
+*/
diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc
new file mode 100644
index 0000000000..2b75211753
--- /dev/null
+++ b/doc/src/declarative/animation.qdoc
@@ -0,0 +1,266 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qdeclarativeanimation.html
+\title QML Animation
+
+Animation in QML is done by animating properties of objects. Properties of type
+real, int, color, rect, point, size, and vector3d can all be animated.
+
+QML supports three main forms of animation - basic property animation,
+transitions, and property behaviors.
+
+\tableofcontents
+
+\section1 Basic Property Animation
+
+The simplest form of animation is directly using \l PropertyAnimation, which can animate all of the property
+types listed above. If the property you are animating is a number or color, you can alternatively use
+NumberAnimation or ColorAnimation. These elements don't add any additional functionality,
+but will help enforce type correctness and are slightly more efficient.
+
+A property animation can be specified as a value source. This is especially useful for repeating animations.
+
+The following example creates a bouncing effect:
+\qml
+Rectangle {
+ id: rect
+ width: 120; height: 200;
+ Image {
+ id: img
+ source: "qt-logo.png"
+ x: 60-img.width/2
+ y: 0
+ y: SequentialAnimation {
+ repeat: true
+ NumberAnimation { to: 200-img.height; easing.type: "OutBounce"; duration: 2000 }
+ PauseAnimation { duration: 1000 }
+ NumberAnimation { to: 0; easing.type: "OutQuad"; duration: 1000 }
+ }
+ }
+}
+\endqml
+
+\image propanim.gif
+
+When you assign an animation as a value source, you do not need to specify \c property
+or \c target; they are automatically selected for you. You do, however, need to specify \c to.
+An animation specified as a value source will be \c running by default.
+
+\qml
+Rectangle {
+ id: rect
+ width: 200; height: 200;
+ Rectangle {
+ color: "red"
+ width: 50; height: 50
+ x: NumberAnimation { to: 50; }
+ }
+}
+\endqml
+
+A property animation can also be specified as a resource that is manipulated from script.
+
+\qml
+PropertyAnimation {
+ id: animation
+ target: image
+ property: "scale"
+ from: 1; to: .5
+}
+Image {
+ id: image
+ source: "image.png"
+ MouseArea {
+ anchors.fill: parent
+ onPressed: animation.start()
+ }
+}
+\endqml
+
+As can be seen, when an animation is used like this (as opposed to as a value source) you will need
+to explicitly set the \c target and \c property to animate.
+
+Animations can be joined into a group using SequentialAnimation and ParallelAnimation.
+
+\target state-transitions
+\section1 Transitions
+
+QML transitions describe animations to perform when \l{qmlstates}{state} changes occur. A transition
+can only be triggered by a state change.
+
+For example, a transition could describe how an item moves from its initial position to its new position:
+
+\code
+transitions: [
+ Transition {
+ NumberAnimation {
+ properties: "x,y"
+ easing.type: "OutBounce"
+ duration: 200
+ }
+ }
+]
+\endcode
+
+As can be seen, transitions make use of the same basic animation classes introduced above.
+In the above example we have specified that we want to animate the \c x and \c y properties, but have not
+specified the objects to animate or the \c to values. By default these values are supplied by the framework --
+the animation will animate any \c targets whose \c x and \c y have changed, and the \c to values will be those
+defined in the end state. You can always supply explicit values to override these implicit values when needed.
+
+\code
+Transition {
+ from: "*"
+ to: "MyState"
+ reversible: true
+ SequentialAnimation {
+ NumberAnimation {
+ duration: 1000
+ easing.type: "OutBounce"
+ // animate myItem's x and y if they have changed in the state
+ target: myItem
+ properties: "x,y"
+ }
+ NumberAnimation {
+ duration: 1000
+ // animate myItem2's y to 200, regardless of what happens in the state
+ target: myItem2
+ property: "y"
+ to: 200
+ }
+ }
+}
+\endcode
+
+QML transitions have selectors to determine which state changes a transition should apply to.
+The following transition will only be triggered when we enter into the \c "details" state.
+
+\code
+Transition {
+ from: "*"
+ to: "details"
+ ...
+}
+\endcode
+
+Transitions can happen in parallel, in sequence, or in any combination of the two. By default, the top-level
+animations in a transition will happen in parallel. The following example shows a rather complex transition
+making use of both sequential and parallel animations:
+
+\code
+Transition {
+ from: "*"
+ to: "MyState"
+ reversible: true
+ SequentialAnimation {
+ ColorAnimation { duration: 1000 }
+ PauseAnimation { duration: 1000 }
+ ParallelAnimation {
+ NumberAnimation {
+ duration: 1000
+ easing.type: "OutBounce"
+ targets: box1
+ properties: "x,y"
+ }
+ NumberAnimation {
+ duration: 1000
+ targets: box2
+ properties: "x,y"
+ }
+ }
+ }
+}
+\endcode
+
+\section1 Property Behaviors
+
+A \l{Behavior}{property behavior} specifies a default animation to run whenever the property's value changes, regardless
+of what caused the change. The \c enabled property can be used to force a \l Behavior
+to only apply under certain circumstances.
+
+In the following snippet, we specify that we want the x position of redRect to be animated
+whenever it changes. The animation will last 300 milliseconds and use an InOutQuad easing curve.
+
+\qml
+Rectangle {
+ id: redRect
+ color: "red"
+ width: 100; height: 100
+ x: Behavior { NumberAnimation { duration: 300; easing.type: "InOutQuad" } }
+}
+\endqml
+
+Like using an animation as a value source, when used in a Behavior and animation does not need to specify
+a \c target or \c property.
+
+To trigger this behavior, we could:
+\list
+\o Enter a state that changes x
+
+\qml
+State {
+ name: "myState"
+ PropertyChanges {
+ target: redRect
+ x: 200
+ ...
+ }
+}
+\endqml
+
+\o Update x from a script
+
+\qml
+MouseArea {
+ ....
+ onClicked: redRect.x = 24;
+}
+\endqml
+\endlist
+
+If x were bound to another property, triggering the binding would also trigger the behavior.
+
+If a state change has a transition animation matching a property with a Behavior, the transition animation
+will override the Behavior for that state change.
+
+*/
diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc
new file mode 100644
index 0000000000..6901947811
--- /dev/null
+++ b/doc/src/declarative/basictypes.qdoc
@@ -0,0 +1,358 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qdeclarativebasictypes.html
+ \title QML Basic Types
+
+ QML uses a set of property types, which are primitive within QML.
+ These basic types are referenced throughout the documentation of the
+ QML elements. Almost all of them are exactly what you would expect.
+
+ \annotatedlist qmlbasictypes
+*/
+
+/*!
+ \qmlbasictype int
+ \ingroup qmlbasictypes
+
+ \brief An integer is a whole number, e.g. 0, 10, or -20.
+
+ An integer is a whole number, e.g. 0, 10, or -20. The possible \c
+ int values range from around -2000000000 to around 2000000000,
+ although most elements will only accept a reduced range (which they
+ mention in their documentation).
+
+ Example:
+ \qml
+ Item { width: 100; height: 200 }
+ \endqml
+
+ \sa {QML Basic Types}
+*/
+
+/*!
+ \qmlbasictype bool
+ \ingroup qmlbasictypes
+
+ \brief A boolean is a binary true/false value.
+
+ A boolean is a binary true/false value.
+
+ Example:
+ \qml
+ Item { focus: true; clip: false }
+ \endqml
+
+ \sa {QML Basic Types}
+*/
+
+/*!
+ \qmlbasictype real
+ \ingroup qmlbasictypes
+
+ \brief A real number has a decimal point, e.g. 1.2 or -29.8.
+
+ A real number has a decimal point, e.g. 1.2 or -29.8.
+
+ Example:
+ \qml
+ Item { width: 100.45; height: 150.82 }
+ \endqml
+
+ \note In QML all reals are stored in single precision, \l
+ {http://en.wikipedia.org/wiki/IEEE_754} {IEEE floating point}
+ format.
+
+ \sa {QML Basic Types}
+*/
+
+/*!
+ \qmlbasictype string
+ \ingroup qmlbasictypes
+
+ \brief A string is a free form text in quotes, e.g. "Hello world!".
+
+ A string is a free form text in quotes, e.g. "Hello world!".
+
+ Example:
+ \qml
+ Text { text: "Hello world!" }
+ \endqml
+
+ \sa {QML Basic Types}
+*/
+
+/*!
+ \qmlbasictype url
+ \ingroup qmlbasictypes
+
+ \brief A URL is a resource locator, like a file name.
+
+ A URL is a resource locator, like a file name. It can be either
+ absolute, e.g. "http://qt.nokia.com", or relative, e.g.
+ "pics/logo.png". A relative URL is resolved relative to the URL of
+ the component where the URL is converted from a JavaScript string
+ expression to a url property value.
+
+ Example:
+ \qml
+ Image { source: "pics/logo.png" }
+ \endqml
+
+ \raw HTML
+ \endraw
+
+ \sa {QML Basic Types}
+*/
+
+/*!
+ \qmlbasictype color
+ \ingroup qmlbasictypes
+
+ \brief A color is a standard color name in quotes.
+
+ A color is a standard color name in quotes. It is normally specified
+ as an \l {http://www.w3.org/TR/SVG/types.html#ColorKeywords} {SVG
+ color name}. These names include colors like "red", "green" and
+ "lightsteelblue".
+
+ If the color you want isn't part of this list, colors can also be
+ specified in hexidecimal triplets or quads that take the form \c
+ "#RRGGBB" and \c "#AARRGGBB" respectively. For example, the color
+ red corresponds to a triplet of \c "#FF0000" and a slightly
+ transparent blue to a quad of \c "#800000FF".
+
+ Example:
+ \qml
+ Rectangle { color: "steelblue" }
+ Rectangle { color: "#FF0000" }
+ Rectangle { color: "#800000FF" }
+ \endqml
+
+ \sa {QML Basic Types}
+*/
+
+/*!
+ \qmlbasictype point
+ \ingroup qmlbasictypes
+
+ \brief A point is specified as "x,y".
+
+ A point is specified as "x,y".
+
+ Example:
+ \qml
+ Widget { pos: "0,20" }
+ \endqml
+
+ \sa {QML Basic Types}
+*/
+
+/*!
+ \qmlbasictype size
+ \ingroup qmlbasictypes
+
+ \brief A size is specified as "width x height".
+
+ A size is specified as "width x height".
+
+ Example:
+ \qml
+ Widget { size: "150x50" }
+ \endqml
+
+ \sa {QML Basic Types}
+*/
+
+/*!
+ \qmlbasictype rect
+ \ingroup qmlbasictypes
+
+ \brief A rect is specified as "x, y, width x height".
+
+ A rect is specified as "x, y, width x height".
+
+ Example:
+ \qml
+ Widget { geometry: "50,50,100x100" }
+ \endqml
+
+ \sa {QML Basic Types}
+*/
+
+/*!
+ \qmlbasictype date
+ \ingroup qmlbasictypes
+
+ \brief A date is specified as "YYYY-MM-DD".
+
+ A date is specified as "YYYY-MM-DD".
+
+ Example:
+ \qml
+ DatePicker { minDate: "2000-01-01"; maxDate: "2020-12-31" }
+ \endqml
+
+ \sa {QML Basic Types}
+*/
+
+/*!
+ \qmlbasictype time
+ \ingroup qmlbasictypes
+
+ \brief A time is specified as "hh:mm:ss".
+
+ A time is specified as "hh:mm:ss".
+
+ Example:
+ \qml
+ TimePicker { time: "14:22:15" }
+ \endqml
+
+ \sa {QML Basic Types}
+ */
+
+/*!
+ \qmlbasictype font
+ \ingroup qmlbasictypes
+
+ \brief A font type has the properties of a QFont.
+
+ A font type has the properties of a QFont. The properties are:
+
+ \list
+ \o \c string font.family
+ \o \c bool font.bold
+ \o \c bool font.italic
+ \o \c bool font.underline
+ \o \c real font.pointSize
+ \o \c int font.pixelSize
+ \endlist
+
+ Example:
+ \qml
+ Text { font.family: "Helvetica"; font.pointSize: 13; font.bold: true }
+ \endqml
+
+ \sa {QML Basic Types}
+*/
+
+/*!
+ \qmlbasictype action
+ \ingroup qmlbasictypes
+
+ \brief The action type has all the properties of QAction.
+
+ The action type has all the properties of QAction. The properties
+ are:
+
+ \list
+ \o \c slot action.trigger - invoke the action
+ \o \c bool action.enabled - true if the action is enabled
+ \o \c string action.text - the text associated with the action
+ \endlist
+
+ Actions are used like this:
+
+ \qml
+ MouseArea { onClicked: MyItem.myaction.trigger() }
+ State { name: "enabled"; when: MyItem.myaction.enabled == true }
+ Text { text: MyItem.someaction.text }
+ \endqml
+
+ \sa {QML Basic Types}
+*/
+
+/*!
+ \qmlbasictype list
+ \ingroup qmlbasictypes
+
+ \brief A list of objects.
+
+ A list of objects. While not technically a basic type, QML also
+ supports lists of object types. When used from QML, the engine
+ automatically appends each value to the list.
+
+ For example, the \l Item class contains a list property named
+ children that can be used like this:
+
+ \qml
+ Item {
+ children: [
+ Item { id: child1 },
+ Rectangle { id: child2 },
+ Text { id: child3 }
+ ]
+ }
+ \endqml
+ \c Child1, \c Child2 and \c Child3 will all be added to the children list
+ in the order in which they appear.
+
+ \sa {QML Basic Types}
+*/
+
+/*!
+ \qmlbasictype vector3d
+ \ingroup qmlbasictypes
+
+ \brief A vector3d is specified as "x,y,z".
+
+ A vector3d is specified as "x,y,z".
+
+ \qml
+ Rotation { angle: 60; axis: "0,1,0" }
+ \endqml
+
+ or with the \c{Qt.vector3d()} helper function:
+
+ \qml
+ Rotation { angle: 60; axis: Qt.vector3d(0, 1, 0) }
+ \endqml
+
+ or as separate \c x, \c y, and \c z components:
+
+ \qml
+ Rotation { angle: 60; axis.x: 0; axis.y: 1; axis.z: 0 }
+ \endqml
+
+ \sa {QML Basic Types}
+*/
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
new file mode 100644
index 0000000000..4b61bd95cb
--- /dev/null
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\title Declarative UI (QML)
+\page declarativeui.html
+
+\brief The Qt Declarative module provides a declarative framework for building
+highly dynamic, custom user interfaces.
+
+Qt Declarative UI provides a declarative framework for building highly dynamic, custom
+user interfaces. Declarative UI helps programmers and designers collaborate to build
+the animation rich, fluid user interfaces that are becoming common in portable
+consumer devices, such as mobile phones, media players, set-top boxes and netbooks.
+The Qt Declarative module provides an engine for interpreting the declarative QML
+language, and a rich set of \l {QML Elements}{QML elements} that can be used
+from QML.
+
+QML is an extension to \l {http://www.ecma-international.org/publications/standards/Ecma-262.htm}
+{JavaScript}, that provides a mechanism to declaratively build an object tree
+of QML elements. QML improves the integration between JavaScript and Qt's
+existing QObject based type system, adds support for automatic
+\l {Property Binding}{property bindings} and provides \l {Network Transparency}{network transparency} at the language
+level.
+
+The QML elements are a sophisticated set of graphical and behavioral building
+blocks. These different elements are combined together in \l {QML Documents}{QML documents} to build components
+ranging in complexity from simple buttons and sliders, to complete
+internet-enabled applications like a \l {http://www.flickr.com}{Flickr} photo browser.
+
+Qt Declarative builds on \l {QML for Qt programmers}{Qt's existing strengths}.
+QML can be be used to incrementally extend an existing application or to build
+completely new applications. QML is fully \l {Extending QML}{extensible from C++}.
+
+\section1 Getting Started:
+\list
+\o \l {Introduction to the QML language}
+\o \l {QML Tutorial}{Tutorial: 'Hello World'}
+\o \l {QML Advanced Tutorial}{Tutorial: 'Same Game'}
+\o \l {QML Examples and Walkthroughs}
+\o \l {Using QML in C++ Applications}
+\endlist
+
+\section1 Core QML Features:
+\list
+\o \l {QML Documents}
+\o \l {Property Binding}
+\o \l {JavaScript Blocks}
+\o \l {QML Scope}
+\o \l {Network Transparency}
+\o \l {Data Models}
+\o \l {anchor-layout.html}{Anchor-based Layout}
+\o \l {qdeclarativestates.html}{States}
+\o \l {qdeclarativeanimation.html}{Animation}
+\o \l {qdeclarativemodules.html}{Modules}
+\o \l {qdeclarativefocus.html}{Keyboard Focus}
+\o \l {Extending types from QML}
+\o \l {Dynamic Object Creation}
+\endlist
+
+\section1 Reference:
+\list
+\o \l {QML Elements}
+\o \l {QML Global Object}
+\o \l {Extending QML}
+\o \l {QML Internationalization}
+\o \l {QtDeclarative Module}
+\o \l {Debugging QML}
+\endlist
+*/
diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc
new file mode 100644
index 0000000000..033c0d19a2
--- /dev/null
+++ b/doc/src/declarative/dynamicobjects.qdoc
@@ -0,0 +1,179 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qdeclarativedynamicobjects.html
+\title Dynamic Object Management
+
+QML has some support for dynamically loading and managing QML objects from
+within Javascript blocks. It is preferable to use the existing QML elements for
+dynamic object management wherever possible; these are \l{Loader},
+\l{Repeater}, \l{ListView}, \l{GridView} and \l{PathView}. It is also possible
+to dynamically create and manage objects from C++, and this is preferable for
+hybrid QML/C++ applications - see \l{Using QML in C++ Applications}.
+Dynamically creating and managing objects from
+within Javascript blocks is intended for when none of the existing QML elements
+fit the needs of your application, and you do not desire for your application
+to involve C++ code.
+
+\section1 Creating Objects Dynamically
+There are two ways of creating objects dynamically. You can either create
+a component which instantiates items, or create an item from a string of QML.
+Creating a component is better for the situation where you have a predefined
+item which you want to manage dynamic instances of, and creating an item from
+a string of QML is intended for when the QML itself is generated at runtime.
+
+If you have a component specified in a QML file, you can dynamically load it with
+the createComponent function on the \l{QML Global Object}.
+This function takes the URL of the QML file as its only argument and returns
+a component object which can be used to create and load that QML file.
+
+You can also create a component by placing your QML inside a Component element.
+Referencing that component element by id will be the same as referencing the variable
+which you save the result of createComponent into.
+
+Once you have a component you can use its createObject method to create an instance of
+the component. Example QML script is below. Remember that QML files that might be loaded
+ over the network cannot be expected to be ready immediately.
+ \code
+ var component;
+ var sprite;
+ function finishCreation(){
+ if(component.isReady()){
+ sprite = component.createObject();
+ if(sprite == 0){
+ // Error Handling
+ }else{
+ sprite.parent = page;
+ sprite.x = 200;
+ //...
+ }
+ }else if(component.isError()){
+ // Error Handling
+ }
+ }
+
+ component = createComponent("Sprite.qml");
+ if(component.isReady()){
+ finishCreation();
+ }else{
+ component.statusChanged.connect(finishCreation);
+ }
+ \endcode
+
+ If you are certain the files will be local, you could simplify to
+
+ \code
+ component = createComponent("Sprite.qml");
+ sprite = component.createObject();
+ if(sprite == 0){
+ // Error Handling
+ console.log(component.errorsString());
+ }else{
+ sprite.parent = page;
+ sprite.x = 200;
+ //...
+ }
+ \endcode
+
+After creating the item, remember to set its parent to an item within the scene.
+Otherwise your dynamically created item will not appear in the scene. When using files with relative paths, the path should
+be relative to the file where createComponent is executed.
+
+If the QML does not exist until runtime, you can create a QML item from
+a string of QML using the createQmlObject function, as in the following example:
+
+ \code
+ newObject = createQmlObject('import Qt 4.6; Rectangle {color: "red"; width: 20; height: 20}',
+ targetItem, "dynamicSnippet1");
+ \endcode
+The first argument is the string of QML to create. Just like in a new file, you will need to
+import any types you wish to use. For importing files with relative paths, the path should
+be relative to the file where the item in the second argument is defined. Remember to set the parent after
+creating the item. The second argument is another item in the scene, and the new item is created
+in the same QML Context as this item. The third argument is the file path associated with this
+item, which is used for error reporting.
+
+\section1 Maintaining Dynamically Created Objects
+
+Dynamically created objects may be used the same as other objects, however they
+will not have an id in QML.
+
+A restriction which you need to manage with dynamically created items,
+is that the creation context must outlive the
+created item. The creation context is the QDeclarativeContext in which createComponent
+was called, or the context in which the Component element, or the item used as the
+second argument to createQmlObject, was specified. If the creation
+context is destroyed before the dynamic item is, then bindings in the dynamic item will
+fail to work.
+
+\section1 Deleting Objects Dynamically
+You should generally avoid dynamically deleting objects that you did not
+dynamically create. In many UIs, it is sufficient to set the opacity to 0 or
+to move the item off of the edge of the screen. If you have lots of dynamically
+created items however, deleting them when they are no longer used will provide
+a worthwhile performance benefit. Note that you should never manually delete
+items which were dynamically created by QML Elements such as \l{Loader}.
+
+To manually delete a QML item, call its destroy method. This method has one
+argument, which is an approximate delay in ms and which defaults to zero. This
+allows you to wait until the completion of an animation or transition. An example:
+
+\code
+ Component{ id:fadesOut
+ Rectangle{
+ id: rect
+ width: 40; height: 40;
+ opacity: NumberAnimation{from:1; to:0; duration: 1000;}
+ Component.onCompleted: rect.destroy(1000);
+ }
+ }
+ function createFadesOut(parentItem)
+ {
+ var object = fadesOut.createObject();
+ object.parent = parentItem;
+ }
+\endcode
+In the above example, the dynamically created rectangle calls destroy as soon as it's created,
+ but delays long enough for its fade out animation to play.
+
+*/
+
diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc
new file mode 100644
index 0000000000..67aadcfc49
--- /dev/null
+++ b/doc/src/declarative/elements.qdoc
@@ -0,0 +1,207 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qdeclarativeelements.html
+\target elements
+\title QML Elements
+
+The following table lists the QML elements provided by the Qt Declarative module.
+
+\bold {Standard Qt Declarative Elements}
+
+\table 80%
+\header
+\o \bold {States}
+\o \bold {Animation and Transitions}
+\o \bold {Working with Data}
+\o \bold {Utility}
+\row
+
+\o
+\list
+\o \l State
+\o \l PropertyChanges
+\o \l StateGroup
+\o \l ParentChange (Item-specific)
+\o \l StateChangeScript (Item-specific)
+\o \l AnchorChanges (Item-specific)
+\endlist
+
+\o
+\list
+\o \l PropertyAnimation
+\o \l NumberAnimation
+\o \l ColorAnimation
+\o \l RotationAnimation
+\o \l SequentialAnimation
+\o \l ParallelAnimation
+\o \l PauseAnimation
+\o \l ParentAnimation
+\o \l PropertyAction
+\o \l ParentAction
+\o \l ScriptAction
+\o \l Transition
+\o \l SpringFollow
+\o \l EaseFollow
+\o \l Behavior
+\endlist
+
+\o
+\list
+\o \l Binding
+\o \l ListModel, \l ListElement
+\o \l VisualItemModel
+\o \l VisualDataModel
+\o \l Package
+\o \l XmlListModel and XmlRole
+\o \l WorkerListModel
+\endlist
+
+\o
+\list
+\o \l Script
+\o \l Connections
+\o \l Component
+\o \l Timer
+\o \l QtObject
+\o \l WorkerScript
+\endlist
+\endtable
+
+\bold {QML Items}
+
+\table 80%
+\header
+\o \bold {Basic Visual Items}
+\o \bold {Basic Interaction Items}
+\o \bold {Widgets}
+\o \bold {Utility}
+
+\row
+\o
+\list
+\o \l Item
+\o \l Rectangle
+\o \l Image
+\o \l BorderImage
+\o \l Text
+\o \l TextInput
+\o \l TextEdit
+\endlist
+
+\o
+\list
+\o \l MouseArea
+\o \l FocusScope
+\endlist
+
+\o
+\list
+\o \l Flickable
+\o \l Flipable
+\o \l WebView
+\endlist
+
+\o
+\list
+\o \l Loader
+\o \l Repeater
+\o \l SystemPalette
+\o \l GraphicsObjectContainer
+\o \l LayoutItem
+\endlist
+
+\header
+\o \bold {Views}
+\o \bold {Positioners}
+\o \bold {Transforms}
+\o \bold {Effects}
+
+\row
+\o
+
+\target xmlViews
+\list
+\o \l ListView
+\o \l GridView
+\o \l PathView
+ \list
+ \o \l Path
+ \list
+ \o \l PathLine
+ \o \l PathQuad
+ \o \l PathCubic
+ \o \l PathAttribute
+ \o \l PathPercent
+ \endlist
+ \endlist
+\endlist
+
+\o
+\list
+\o \l Column
+\o \l Row
+\o \l Grid
+\endlist
+
+\o
+\list
+\o \l Scale
+\o \l Rotation
+\endlist
+
+\o
+\list
+\o \l Blur
+\o \l Colorize
+\o \l DropShadow
+\o \l Opacity
+\o \l Particles
+ \list
+ \o \l ParticleMotionLinear
+ \o \l ParticleMotionGravity
+ \o \l ParticleMotionWander
+ \endlist
+\endlist
+\endtable
+
+*/
diff --git a/doc/src/declarative/example-slideswitch.qdoc b/doc/src/declarative/example-slideswitch.qdoc
new file mode 100644
index 0000000000..42351c53f4
--- /dev/null
+++ b/doc/src/declarative/example-slideswitch.qdoc
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qdeclarativeexampletoggleswitch.html
+\title QML Example - Toggle Switch
+
+This example shows how to create a reusable switch component in QML.
+
+The code for this example can be found in the \c $QTDIR/examples/declarative/slideswitch directory.
+
+\section1 Overview
+
+The elements that composed the switch are:
+
+\list
+\o a \c on property (the interface to interact with the switch),
+\o two images (the background image and the knob),
+\o two mouse regions for user interation (on the background image and on the knob),
+\o two states (a \e on state and a \e off state),
+\o two functions or slots to react to the user interation (\c toggle() and \c dorelease()),
+\o and a transition that describe how to go from one state to the other.
+\endlist
+
+\section1 Switch.qml
+\snippet examples/declarative/slideswitch/content/Switch.qml 0
+
+\section1 Walkthrough
+
+\section2 Interface
+\snippet examples/declarative/slideswitch/content/Switch.qml 1
+
+This property is the interface of the switch. By default, the switch is off and this property is \c false.
+It can be used to activate/disactivate the switch or to query its current state.
+
+In this example:
+
+\qml
+Switch { id: mySwitch; on: true }
+Text { text: "The switch is on"; visible: mySwitch.on == true }
+\endqml
+
+the text will only be visible when the switch is on.
+
+\section2 Images and user interaction
+\snippet examples/declarative/slideswitch/content/Switch.qml 4
+
+First, we create the background image of the switch.
+In order for the switch to toggle when the user clicks on the background, we add a \l{MouseArea} as a child item of the image.
+A \c MouseArea has a \c onClicked property that is triggered when the item is clicked. For the moment we will just call a
+\c toggle() function. We will see what this function does in a moment.
+
+\snippet examples/declarative/slideswitch/content/Switch.qml 5
+
+Then, we place the image of the knob on top of the background.
+The interaction here is a little more complex. We want the knob to move with the finger when it is clicked. That is what the \c drag
+property of the \c MouseArea is for. We also want to toggle the switch if the knob is released between state. We handle this case
+in the \c dorelease() function that is called in the \c onReleased property.
+
+\section2 States
+\snippet examples/declarative/slideswitch/content/Switch.qml 6
+
+We define the two states of the switch:
+\list
+\o In the \e on state the knob is on the right (\c x position is 78) and the \c on property is \c true.
+\o In the \e off state the knob is on the left (\c x position is 1) and the \c on property is \c false.
+\endlist
+
+For more information on states see \l{qmlstates}{QML States}.
+
+\section2 Functions
+
+We add two JavaScript functions to our switch:
+
+\snippet examples/declarative/slideswitch/content/Switch.qml 2
+
+This first function is called when the background image or the knob are clicked. We simply want the switch to toggle between the two
+states (\e on and \e off).
+
+
+\snippet examples/declarative/slideswitch/content/Switch.qml 3
+
+This second function is called when the knob is released and we want to make sure that the knob does not end up between states
+(neither \e on nor \e off). If it is the case call the \c toggle() function otherwise we do nothing.
+
+For more information on scripts see \l{qdeclarativejavascript.html}{JavaScript Blocks}.
+
+\section2 Transition
+\snippet examples/declarative/slideswitch/content/Switch.qml 7
+
+At this point, when the switch toggles between the two states the knob will instantly change its \c x position between 1 and 78.
+In order for the the knob to move smoothly we add a transition that will animate the \c x property with an easing curve for a duration of 200ms.
+
+For more information on transitions see \l{state-transitions}{QML Transitions}.
+
+\section1 Usage
+The switch can be used in a QML file, like this:
+\snippet examples/declarative/slideswitch/slideswitch.qml 0
+*/
diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc
new file mode 100644
index 0000000000..b7da508213
--- /dev/null
+++ b/doc/src/declarative/examples.qdoc
@@ -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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qdeclarativeexamples.html
+\title QML Examples and Walkthroughs
+
+\section1 Running Examples and Demos
+
+You can find many simple examples in the \c examples/declarative
+sub-directory that show how to use various aspects of QML. In addition, the
+\c demos/declarative sub-directory contains more sophisticated demos of large
+applications. These demos are intended to show integrated functionality
+rather than being instructive on specifice elements.
+
+To run the examples and demos, use the included \l {qmlviewer}{qmlviewer}
+application. It has some useful options, revealed by:
+
+\code
+ bin/qmlviewer -help
+\endcode
+
+For example, from your build directory, run:
+
+\code
+ bin/qmlviewer $QTDIR/demos/declarative/flickr/flickr-desktop.qml
+\endcode
+or
+\code
+ bin/qmlviewer $QTDIR/demos/declarative/samegame/samegame.qml
+\endcode
+
+\section1 Examples
+
+These will be documented, and demonstrate how to achieve various things in QML.
+
+\table
+\row
+ \o Elastic Dial
+ \o \image dial-example.gif
+\row
+ \o \l{qdeclarativeexampletoggleswitch.html}{Toggle Switch}
+ \o \image switch-example.gif
+\row
+ \o \l{QML Advanced Tutorial}{SameGame}
+ \o \image declarative-adv-tutorial4.gif
+\endtable
+
+*/
diff --git a/doc/src/declarative/extending-examples.qdoc b/doc/src/declarative/extending-examples.qdoc
new file mode 100644
index 0000000000..cc668385a7
--- /dev/null
+++ b/doc/src/declarative/extending-examples.qdoc
@@ -0,0 +1,309 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\example declarative/extending/adding
+\title Extending QML - Adding Types Example
+
+The Adding Types Example shows how to add a new element type, \c Person, to QML.
+The \c Person type can be used from QML like this:
+
+\snippet examples/declarative/extending/adding/example.qml 0
+
+\section1 Declare the Person class
+
+All QML elements map to C++ types. Here we declare a basic C++ Person class
+with the two properties we want accessible on the QML type - name and shoeSize.
+Although in this example we use the same name for the C++ class as the QML
+element, the C++ class can be named differently, or appear in a namespace.
+
+\snippet examples/declarative/extending/adding/person.h 0
+
+Following the class declaration, we include the QML_DECLARE_TYPE() macro. This
+is necessary to declare the type to QML. It also includes the logic necessary
+to expose the class to Qt's meta system - that is, it includes the
+Q_DECLARE_METATYPE() functionality.
+
+\section1 Define the Person class
+
+\snippet examples/declarative/extending/adding/person.cpp 0
+
+The Person class implementation is quite basic. The property accessors simply
+return members of the object instance.
+
+The implementation must also be registered using the QML_REGISTER_TYPE() macro. This macro
+registers the Person class with QML as a type in the People library version 1.0,
+and defines the mapping between the C++ and QML class names.
+
+\section1 Running the example
+
+The main.cpp file in the example includes a simple shell application that
+loads and runs the QML snippet shown at the beginning of this page.
+*/
+
+/*!
+\example declarative/extending/properties
+\title Extending QML - Object and List Property Types Example
+
+This example builds on:
+\list
+\o \l {Extending QML - Adding Types Example}
+\endlist
+
+The Object and List Property Types example shows how to add object and list
+properties in QML. This example adds a BirthdayParty element that specifies
+a birthday party, consisting of a celebrant and a list of guests. People are
+specified using the People QML type built in the previous example.
+
+\snippet examples/declarative/extending/properties/example.qml 0
+
+\section1 Declare the BirthdayParty
+
+The BirthdayParty class is declared like this:
+
+\snippet examples/declarative/extending/properties/birthdayparty.h 0
+\snippet examples/declarative/extending/properties/birthdayparty.h 1
+\snippet examples/declarative/extending/properties/birthdayparty.h 2
+\snippet examples/declarative/extending/properties/birthdayparty.h 3
+
+The class contains a member to store the celebrant object, and also a
+QList<Person *> member.
+
+In QML, the type of a list properties - and the guests property is a list of
+people - are all of type QDeclarativeListProperty<T>. QDeclarativeListProperty is simple value
+type that contains a set of function pointers. QML calls these function
+pointers whenever it needs to read from, write to or otherwise interact with
+the list. In addition to concrete lists like the people list used in this
+example, the use of QDeclarativeListProperty allows for "virtual lists" and other advanced
+scenarios.
+
+\section2 Define the BirthdayParty
+
+The implementation of BirthdayParty property accessors is straight forward.
+
+\snippet examples/declarative/extending/properties/birthdayparty.cpp 0
+
+\section1 Running the example
+
+The main.cpp file in the example includes a simple shell application that
+loads and runs the QML snippet shown at the beginning of this page.
+*/
+
+/*!
+\example declarative/extending/coercion
+\title Extending QML - Inheritance and Coercion Example
+
+This example builds on:
+\list
+\o \l {Extending QML - Object and List Property Types Example}
+\o \l {Extending QML - Adding Types Example}
+\endlist
+
+The Inheritance and Coercion Example shows how to use base classes to assign
+elements of more than one type to a property. It specializes the Person element
+developed in the previous examples into two elements - a \c Boy and a \c Girl.
+
+\snippet examples/declarative/extending/coercion/example.qml 0
+
+\section1 Declare Boy and Girl
+
+\snippet examples/declarative/extending/coercion/person.h 0
+
+The Person class remains unaltered in this example and the Boy and Girl C++
+classes are trivial extensions of it. As an example, the inheritance used here
+is a little contrived, but in real applications it is likely that the two
+extensions would add additional properties or modify the Person classes
+behavior.
+
+\section2 Define People as a base class
+
+The implementation of the People class itself has not changed since the the
+previous example. However, as we have repurposed the People class as a common
+base for Boy and Girl, we want to prevent it from being instantiated from QML
+directly - an explicit Boy or Girl should be instantiated instead.
+
+\snippet examples/declarative/extending/coercion/main.cpp 0
+
+While we want to disallow instantiating Person from within QML, it still needs
+to be registered with the QML engine, so that it can be used as a property type
+and other types can be coerced to it. To register a type, without defining a
+named mapping into QML, we call the QML_REGISTER_NOCREATE_TYPE() macro instead of
+the QML_REGISTER_TYPE() macro used previously.
+
+\section2 Define Boy and Girl
+
+The implementation of Boy and Girl are trivial.
+
+\snippet examples/declarative/extending/coercion/person.cpp 1
+
+All that is necessary is to implement the constructor, and to register the types
+and their QML name with the QML engine.
+
+\section1 Running the example
+
+The BirthdayParty element has not changed since the previous example. The
+celebrant and guests property still use the People type.
+
+\snippet examples/declarative/extending/coercion/birthdayparty.h 0
+
+However, as all three types, Person, Boy and Girl, have been registered with the
+QML system, on assignment QML automatically (and type-safely) converts the Boy
+and Girl objects into a Person.
+
+The main.cpp file in the example includes a simple shell application that
+loads and runs the QML snippet shown at the beginning of this page.
+*/
+
+/*!
+\example declarative/extending/default
+\title Extending QML - Default Property Example
+
+This example builds on:
+\list
+\o \l {Extending QML - Inheritance and Coercion Example}
+\o \l {Extending QML - Object and List Property Types Example}
+\o \l {Extending QML - Adding Types Example}
+\endlist
+
+The Default Property Example is a minor modification of the
+\l {Extending QML - Inheritance and Coercion Example} that simplifies the
+specification of a BirthdayParty through the use of a default property.
+
+\snippet examples/declarative/extending/default/example.qml 0
+
+\section1 Declaring the BirthdayParty class
+
+The only difference between this example and the last, is the addition of the
+\c DefaultProperty class info annotation.
+
+\snippet examples/declarative/extending/default/birthdayparty.h 0
+
+The default property specifies the property to assign to whenever an explicit
+property is not specified, in the case of the BirthdayParty element the guest
+property. It is purely a syntactic simplification, the behavior is identical
+to specifying the property by name, but it can add a more natural feel in many
+situations. The default property must be either an object or list property.
+
+\section1 Running the example
+
+The main.cpp file in the example includes a simple shell application that
+loads and runs the QML snippet shown at the beginning of this page.
+*/
+
+/*!
+\example declarative/extending/grouped
+\title Extending QML - Grouped Properties Example
+
+This example builds on:
+\list
+\o \l {Extending QML - Default Property Example}
+\o \l {Extending QML - Inheritance and Coercion Example}
+\o \l {Extending QML - Object and List Property Types Example}
+\o \l {Extending QML - Adding Types Example}
+\endlist
+
+*/
+
+/*!
+\example declarative/extending/grouped
+\title Extending QML - Attached Properties Example
+
+This example builds on:
+\list
+\o \l {Extending QML - Grouped Properties Example}
+\o \l {Extending QML - Default Property Example}
+\o \l {Extending QML - Inheritance and Coercion Example}
+\o \l {Extending QML - Object and List Property Types Example}
+\o \l {Extending QML - Adding Types Example}
+\endlist
+
+*/
+
+/*!
+\example declarative/extending/signal
+\title Extending QML - Signal Support Example
+
+This example builds on:
+\list
+\o \l {Extending QML - Attached Properties Example}
+\o \l {Extending QML - Grouped Properties Example}
+\o \l {Extending QML - Default Property Example}
+\o \l {Extending QML - Inheritance and Coercion Example}
+\o \l {Extending QML - Object and List Property Types Example}
+\o \l {Extending QML - Adding Types Example}
+\endlist
+
+*/
+
+/*!
+\example declarative/extending/valuesource
+\title Extending QML - Property Value Source Example
+
+This example builds on:
+\list
+\o \l {Extending QML - Signal Support Example}
+\o \l {Extending QML - Attached Properties Example}
+\o \l {Extending QML - Grouped Properties Example}
+\o \l {Extending QML - Default Property Example}
+\o \l {Extending QML - Inheritance and Coercion Example}
+\o \l {Extending QML - Object and List Property Types Example}
+\o \l {Extending QML - Adding Types Example}
+\endlist
+
+*/
+
+/*!
+\example declarative/extending/binding
+\title Extending QML - Binding Example
+
+This example builds on:
+\list
+\o \l {Extending QML - Property Value Source Example}
+\o \l {Extending QML - Signal Support Example}
+\o \l {Extending QML - Attached Properties Example}
+\o \l {Extending QML - Grouped Properties Example}
+\o \l {Extending QML - Default Property Example}
+\o \l {Extending QML - Inheritance and Coercion Example}
+\o \l {Extending QML - Object and List Property Types Example}
+\o \l {Extending QML - Adding Types Example}
+\endlist
+
+*/
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
new file mode 100644
index 0000000000..5aaa7bdc2a
--- /dev/null
+++ b/doc/src/declarative/extending.qdoc
@@ -0,0 +1,982 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qml-extending.html
+\title Extending QML
+
+The QML syntax declaratively describes how to construct an in memory object
+tree. In Qt, QML is mainly used to describe a visual scene graph, but it is
+not conceptually limited to this: the QML format is an abstract description of
+any object tree. All the QML element types included in Qt are implemented using
+the C++ extension mechanisms describe on this page. Programmers can use these
+APIs to add new types that interact with the existing Qt types, or to repurpose
+QML for their own independent use.
+
+\tableofcontents
+
+\section1 Adding Types
+\target adding-types
+
+\snippet examples/declarative/extending/adding/example.qml 0
+
+The QML snippet shown above instantiates one \c Person instance and sets
+the name and shoeSize properties on it. Everything in QML ultimately comes down
+to either instantiating an object instance, or assigning a property a value.
+QML relies heavily on Qt's meta object system and can only instantiate classes
+that derive from QObject.
+
+The QML engine has no intrinsic knowledge of any class types. Instead the
+programmer must define the C++ types, and their corresponding QML name.
+
+Custom C++ types are made available to QML using these two macros:
+
+\quotation
+\code
+#define QML_DECLARE_TYPE(T)
+#define QML_REGISTER_TYPE(URI,VMAJ,VMIN,QDeclarativeName,T)
+\endcode
+
+Register the C++ type \a T with the QML system, and make it available in QML
+under the name \a QDeclarativeName in library URI version VMAJ.VMIN.
+\a T and \a QDeclarativeName may be the same.
+
+Generally the QML_DECLARE_TYPE() macro should be included immediately following
+the type declaration (usually in its header file), and the QML_REGISTER_TYPE()
+macro called by the implementation.
+
+Type \a T must be a concrete type that inherits QObject and has a default
+constructor.
+\endquotation
+
+Types can be registered by libraries (such as Qt does), application code,
+or by plugins (see QDeclarativeExtensionPlugin).
+
+Once registered, all of the \l {Qt's Property System}{properties} of a supported
+type are available for use within QML. QML has intrinsic support for properties
+of these types:
+
+\list
+\o bool
+\o unsigned int, int
+\o float, double, qreal
+\o QString
+\o QUrl
+\o QColor
+\o QDate, QTime, QDateTime
+\o QPoint, QPointF
+\o QSize, QSizeF
+\o QRect, QRectF
+\o QVariant
+\endlist
+
+QML is typesafe. Attempting to assign an invalid value to a property will
+generate an error. For example, assuming the name property of the \c Person
+element had a type of QString, this would cause an error:
+
+\code
+Person {
+ // Will NOT work
+ name: 12
+}
+\endcode
+
+\l {Extending QML - Adding Types Example} shows the complete code used to create
+the \c Person type.
+
+\section1 Object and List Property Types
+
+\snippet examples/declarative/extending/properties/example.qml 0
+
+The QML snippet shown above assigns a \c Person object to the \c BirthdayParty's
+celebrant property, and assigns three \c Person objects to the guests property.
+
+QML can set properties of types that are more complex than basic intrinsics like
+integers and strings. Properties can also be object pointers, Qt interface
+pointers, lists of object points, and lists of Qt interface pointers. As QML
+is typesafe it ensures that only valid types are assigned to these properties,
+just like it does for primitive types.
+
+Properties that are pointers to objects or Qt interfaces are declared with the
+Q_PROPERTY() macro, just like other properties. The celebrant property
+declaration looks like this:
+
+\snippet examples/declarative/extending/properties/birthdayparty.h 1
+
+As long as the property type, in this case Person, is registered with QML the
+property can be assigned.
+
+QML also supports assigning Qt interfaces. To assign to a property whose type
+is a Qt interface pointer, the interface must also be registered with QML. As
+they cannot be instantiated directly, registering a Qt interface is different
+from registering a new QML type. The following macros are used instead:
+
+\quotation
+\code
+ #define QML_DECLARE_INTERFACE(T)
+ #define QML_REGISTER_INTERFACE(T)
+\endcode
+
+Register the C++ interface \a T with the QML system.
+
+Generally the QML_DECLARE_INTERFACE() macro should be included immediately
+following the interface declaration (usually in its header file), and the
+QML_REGISTER_INTERFACE() macro called by the implementation.
+
+Following registration, QML can coerce objects that implement this interface
+for assignment to appropriately typed properties.
+\endquotation
+
+The guests property is a list of \c Person objects. Properties that are lists
+of objects or Qt interfaces are also declared with the Q_PROPERTY() macro, just
+like other properties. List properties must have the type \c {QDeclarativeListProperty<T>}.
+As with object properties, the type \a T must be registered with QML.
+
+The guest property declaration looks like this:
+
+\snippet examples/declarative/extending/properties/birthdayparty.h 2
+
+\l {Extending QML - Object and List Property Types Example} shows the complete
+code used to create the \c BirthdayParty type.
+
+\section1 Inheritance and Coercion
+
+\snippet examples/declarative/extending/coercion/example.qml 0
+
+The QML snippet shown above assigns a \c Boy object to the \c BirthdayParty's
+celebrant property, and assigns three other objects to the guests property.
+
+QML supports C++ inheritance heirarchies and can freely coerce between known,
+valid object types. This enables the creation of common base classes that allow
+the assignment of specialized classes to object or list properties. In the
+snippet shown, both the celebrant and the guests properties retain the Person
+type used in the previous section, but the assignment is valid as both the Boy
+and Girl objects inherit from Person.
+
+To assign to a property, the property's type must have been registered with QML.
+Both the QML_REGISTER_TYPE() and QML_REGISTER_INTERFACE() macros already shown can
+be used to register a type with QML. Additionally, if a type that acts purely
+as a base class that cannot be instantiated from QML needs to be
+registered these macros can be used:
+
+\quotation
+\code
+ #define QML_DECLARE_TYPE(T)
+ #define QML_REGISTER_NOCREATE_TYPE(T)
+\endcode
+
+Register the C++ type \a T with the QML system. QML_REGISTER_NOCREATE_TYPE()
+differs from QML_REGISTER_TYPE() in that it does not define a mapping between the
+C++ class and a QML element name, so the type is not instantiable from QML, but
+it is available for type coercion.
+
+Generally the QML_DECLARE_TYPE() macro should be included immediately following
+the type declaration (usually in its header file), and the
+QML_REGISTER_NOCREATE_TYPE() macro called from the implementation.
+
+Type \a T must inherit QObject, but there are no restrictions on whether it is
+concrete or the signature of its constructor.
+\endquotation
+
+QML will automatically coerce C++ types when assigning to either an object
+property, or to a list property. Only if coercion fails does an assignment
+error occur.
+
+\l {Extending QML - Inheritance and Coercion Example} shows the complete
+code used to create the \c Boy and \c Girl types.
+
+\section1 Default Property
+
+\snippet examples/declarative/extending/default/example.qml 0
+
+The QML snippet shown above assigns a collection of objects to the
+\c BirthdayParty's default property.
+
+The default property is a syntactic convenience that allows a type designer to
+specify a single property as the type's default. The default property is
+assigned to whenever no explicit property is specified. As a convenience, it is
+behaviorally identical to assigning the default property explicitly by name.
+
+From C++, type designers mark the default property using a Q_CLASSINFO()
+annotation:
+
+\quotation
+\code
+Q_CLASSINFO("DefaultProperty", "property")
+\endcode
+
+Mark \a property as the class's default property. \a property must be either
+an object property, or a list property.
+
+A default property is optional. A derived class inherits its base class's
+default property, but may override it in its own declaration. \a property can
+refer to a property declared in the class itself, or a property inherited from a
+base class.
+\endquotation
+
+\l {Extending QML - Default Property Example} shows the complete code used to
+specify a default property.
+
+\section1 Grouped Properties
+
+\snippet examples/declarative/extending/grouped/example.qml 1
+
+The QML snippet shown above assigns a number properties to the \c Boy object,
+including four properties using the grouped property syntax.
+
+Grouped properties collect similar properties together into a single named
+block. Grouped properties can be used to present a nicer API to developers, and
+may also simplify the implementation of common property collections across
+different types through implementation reuse.
+
+A grouped property block is implemented as a read-only object property. The
+shoe property shown is declared like this:
+
+\snippet examples/declarative/extending/grouped/person.h 1
+
+The ShoeDescription type declares the properties available to the grouped
+property block - in this case the size, color, brand and price properties.
+
+Grouped property blocks may declared and accessed be recusively.
+
+\l {Extending QML - Grouped Properties Example} shows the complete code used to
+implement the \c shoe property grouping.
+
+\section1 Attached Properties
+
+\snippet examples/declarative/extending/attached/example.qml 1
+
+The QML snippet shown above assigns the rsvp property using the attached
+property syntax.
+
+Attached properties allow unrelated types to annotate other types with some
+additional properties, generally for their own use. Attached properties are
+identified through the use of the attacher type name, in the case shown
+\c BirthdayParty, as a suffix to the property name.
+
+In the example shown, \c BirthdayParty is called the attaching type, and the
+Boy instance the attachee object instance.
+
+For the attaching type, an attached property block is implemented as a new
+QObject derived type, called the attachment object. The properties on the
+attachment object are those that become available for use as the attached
+property block.
+
+Any QML type can become an attaching type by declaring the
+\c qmlAttachedProperties() public function and declaring that the class has
+QML_HAS_ATTACHED_PROPERTIES:
+
+\quotation
+\code
+class MyType : public QObject {
+ Q_OBJECT
+public:
+
+ ...
+
+ static AttachedPropertiesType *qmlAttachedProperties(QObject *object);
+};
+
+QML_DECLARE_TYPEINFO(MyType, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(MyType)
+\endcode
+Return an attachment object, of type \a AttachedPropertiesType, for the
+attachee \a object instance. It is customary, though not strictly required, for
+the attachment object to be parented to \a object to prevent memory leaks.
+
+\a AttachedPropertiesType must be a QObject derived type. The properties on
+this type will be accessible through the attached properties syntax.
+
+This method will be called at most once for each attachee object instance. The
+QML engine will cache the returned instance pointer for subsequent attached
+property accesses. Consequently the attachment object may not be deleted until
+\a object is destroyed.
+\endquotation
+
+Conceptually, attached properties are a \e type exporting a set of additional
+properties that can be set on \e any other object instance. Attached properties
+cannot be limited to only attaching to a sub-set of object instances, although
+their effect may be so limited.
+
+For example, a common usage scenario is for a type to enhance the properties
+available to its children in order to gather instance specific data. Here we
+add a rsvp field to all the guests coming to a birthday party:
+\code
+BirthdayParty {
+ Boy { BirthdayParty.rsvp: "2009-06-01" }
+}
+\endcode
+However, as a type cannot limit the instances to which the attachment object
+must attach, the following is also allowed, even though adding a birthday party
+rsvp in this context will have no effect.
+\code
+GraduationParty {
+ Boy { BirthdayParty.rsvp: "2009-06-01" }
+}
+\endcode
+
+From C++, including the attaching type implementation, the attachment object for
+an instance can be accessed using the following method:
+
+\quotation
+\code
+template<typename T>
+QObject *qmlAttachedPropertiesObject<T>(QObject *attachee, bool create = true);
+\endcode
+Returns the attachment object attached to \a attachee by the attaching type
+\a T. If type \a T is not a valid attaching type, this method always returns 0.
+
+If \a create is true, a valid attachment object will always be returned,
+creating it if it does not already exist. If \a create is false, the attachment
+object will only be returned if it has previously been created.
+\endquotation
+
+\l {Extending QML - Attached Properties Example} shows the complete code used to
+implement the rsvp attached property.
+
+\section1 Memory Management and QVariant types
+
+It is an elements responsibility to ensure that it does not access or return
+pointers to invalid objects. QML makes the following guarentees:
+
+\list
+\o An object assigned to an QObject (or QObject-derived) pointer property will be
+valid at the time of assignment.
+
+Following assignment, it is the responsibility of the class to subsequently guard
+this pointer, either through a class specific method or the generic QPointer class.
+
+\o An object assigned to a QVariant will be valid at the time of assignment.
+
+When assigning an object to a QVariant property, QML will always use a QMetaType::QObjectStar
+typed QVariant. It is the responsibility of the class to guard the pointer. A
+general rule when writing a class that uses QVariant properties is to check the
+type of the QVariant when it is set and if the type is not handled by your class,
+reset it to an invalid variant.
+
+\o An object assigned to a QObject (or QObject-derived) list property will be
+valid at the time of assignment.
+
+Following assignment, it is the responsibility of the class to subsequently guard
+this pointer, either through a class specific method or the generic QPointer class.
+\endlist
+
+Elements should assume that any QML assigned object can be deleted at any time, and
+respond accordingly. If documented as such an element need not continue to work in
+this situation, but it must not crash.
+
+\section1 Signal Support
+
+\snippet examples/declarative/extending/signal/example.qml 0
+\snippet examples/declarative/extending/signal/example.qml 1
+
+The QML snippet shown above associates the evaluation of a JavaScript expression
+with the emission of a Qt signal.
+
+All Qt signals on a registered class become available as special "signal
+properties" within QML to which the user can assign a single JavaScript
+expression. The signal property's name is a transformed version of the Qt
+signal name: "on" is prepended, and the first letter of the signal name upper
+cased. For example, the signal used in the example above has the following
+C++ signature:
+
+\snippet examples/declarative/extending/signal/birthdayparty.h 0
+
+In classes with multiple signals with the same name, only the final signal
+is accessible as a signal property. Note that signals with the same name
+but different parameters cannot be distinguished.
+
+Signal parameters become accessible by name to the assigned script. An
+unnamed parameter cannot be accessed, so care should be taken to name all the
+signal parameters in the C++ class declaration. The intrinsic types
+listed in \l {Adding Types}, as well registered object types are permitted as
+signal parameter types. Using other types is not an error, but the parameter
+value will not be accessible from script.
+
+\l {Extending QML - Signal Support Example} shows the complete code used to
+implement the onPartyStarted signal property.
+
+\section1 Property Value Sources
+
+\snippet examples/declarative/extending/valuesource/example.qml 0
+\snippet examples/declarative/extending/valuesource/example.qml 1
+
+The QML snippet shown above assigns a property value to the speaker property.
+A property value source generates a value for a property that changes over time.
+
+Property value sources are most commonly used to do animation. Rather than
+constructing an animation object and manually setting the animation's "target"
+property, a property value source can be assigned directly to a property of any
+type and automatically set up this association.
+
+The example shown here is rather contrived: the speaker property of the
+BirthdayParty object is a string that is printed every time it is assigned and
+the HappyBirthday value source generates the lyrics of the song
+"Happy Birthday".
+
+\snippet examples/declarative/extending/valuesource/birthdayparty.h 0
+
+Normally, assigning an object to a string property would not be allowed. In
+the case of a property value source, rather than assigning the object instance
+itself, the QML engine sets up an association between the value source and
+the property.
+
+Property value sources are special types that derive from the
+QDeclarativePropertyValueSource base class. This base class contains a single method,
+QDeclarativePropertyValueSource::setTarget(), that the QML engine invokes when
+associating the property value source with a property. The relevant part of
+the HappyBirthday type declaration looks like this:
+
+\snippet examples/declarative/extending/valuesource/happybirthday.h 0
+\snippet examples/declarative/extending/valuesource/happybirthday.h 1
+\snippet examples/declarative/extending/valuesource/happybirthday.h 2
+
+In all other respects, property value sources are regular QML types. They must
+be registered with the QML engine using the same macros as other types, and can
+contain properties, signals and methods just like other types.
+
+When a property value source object is assigned to a property, QML first tries
+to assign it normally, as though it were a regular QML type. Only if this
+assignment fails does the engine call the setTarget() method. This allows
+the type to also be used in contexts other than just as a value source.
+
+\l {Extending QML - Property Value Source Example} shows the complete code used
+implement the HappyBirthday property value source.
+
+\section1 Property Binding
+
+\snippet examples/declarative/extending/binding/example.qml 0
+\snippet examples/declarative/extending/binding/example.qml 1
+
+The QML snippet shown above uses a property binding to ensure the
+HappyBirthday's name property remains up to date with the celebrant.
+
+Property binding is a core feature of QML. In addition to assigning literal
+values, property bindings allow the developer to assign an arbitrarily complex
+JavaScript expression that may include dependencies on other property values.
+Whenever the expression's result changes - through a change in one of its
+constituent values - the expression is automatically reevaluated and
+the new result assigned to the property.
+
+All properties on custom types automatically support property binding. However,
+for binding to work correctly, QML must be able to reliably determine when a
+property has changed so that it knows to reevaluate any bindings that depend on
+the property's value. QML relies on the presence of a
+\c {Qt's Property System}{NOTIFY signal} for this determination.
+
+Here is the celebrant property declaration:
+
+\snippet examples/declarative/extending/binding/birthdayparty.h 0
+
+The NOTIFY attribute is followed by a signal name. It is the responsibility of
+the class implementer to ensure that whenever the property's value changes, the
+NOTIFY signal is emitted. The signature of the NOTIFY signal is not important to QML.
+
+To prevent loops or excessive evaluation, developers should ensure that the
+signal is only emitted whenever the property's value is actually changed. If
+a property, or group of properties, is infrequently used it is permitted to use
+the same NOTIFY signal for several properties. This should be done with care to
+ensure that performance doesn't suffer.
+
+To keep QML reliable, if a property does not have a NOTIFY signal, it cannot be
+used in a binding expression. However, the property can still be assigned
+a binding as QML does not need to monitor the property for change in that
+scenario.
+
+Consider a custom type, \c TestElement, that has two properties, "a" and "b".
+Property "a" does not have a NOTIFY signal, and property "b" does have a NOTIFY
+signal.
+
+\code
+TestElement {
+ // This is OK
+ a: b
+}
+TestElement {
+ // Will NOT work
+ b: a
+}
+\endcode
+
+The presence of a NOTIFY signal does incur a small overhead. There are cases
+where a property's value is set at object construction time, and does not
+subsequently change. The most common case of this is when a type uses
+\l {Grouped Properties}, and the grouped property object is allocated once, and
+only freed when the object is deleted. In these cases, the CONSTANT attribute
+may be added to the property declaration instead of a NOTIFY signal.
+
+\snippet examples/declarative/extending/binding/person.h 0
+
+Extreme care must be taken here or applications using your type may misbehave.
+The CONSTANT attribute should only be used for properties whose value is set,
+and finalized, only in the class constructor. All other properties that want
+to be used in bindings should have a NOTIFY signal instead.
+
+\l {Extending QML - Binding Example} shows the BirthdayParty example updated to
+include NOTIFY signals for use in binding.
+
+\section1 Extension Objects
+
+\snippet examples/declarative/extending/extended/example.qml 0
+
+The QML snippet shown above adds a new property to an existing C++ type without
+modifying its source code.
+
+When integrating existing classes and technology into QML, their APIs will often
+need to be tweaked to fit better into the declarative environment. Although
+the best results are usually obtained by modifying the original classes
+directly, if this is either not possible or is complicated by some other
+concerns, extension objects allow limited extension possibilities without
+direct modifications.
+
+Extension objects are used to add additional properties to an existing type.
+Extension objects can only add properties, not signals or methods. An extended
+type definition allows the programmer to supply an additional type - known as the
+extension type - when registering the target class whose properties are
+transparently merged with the original target class when used from within QML.
+
+An extension class is a regular QObject, with a constructor that takes a QObject
+pointer. When needed (extension classes are delay created until the first extended
+property is accessed) the extension class is created and the target object is
+passed in as the parent. When an extended property on the original is accessed,
+the appropriate property on the extension object is used instead.
+
+When an extended type is installed, one of the
+\code
+ #define QML_REGISTER_EXTENDED_TYPE(URI, VMAJ, VFROM, VTO, QDeclarativeName,T, ExtendedT)
+ #define QML_REGISTER_EXTENDED_NOCREATE_TYPE(T, ExtendedT)
+\endcode
+macros should be used instead of the regular \c QML_REGISTER_TYPE or
+\c QML_REGISTER_NOCREATE_TYPE. The arguments are identical to the corresponding
+non-extension object macro, except for the ExtendedT parameter which is the type
+of the extension object.
+
+\section1 Optimization
+
+Often to develop high performance elements it is helpful to know more about the
+status of the QML engine. For example, it might be beneficial to delay
+initializing some costly data structures until after all the properties have been
+set.
+
+The QML engine defines an interface class called QDeclarativeParserStatus, which contains a
+number of virtual methods that are invoked at various stages during component
+instantiation. To receive these notifications, an element implementation inherits
+QDeclarativeParserStatus and notifies the Qt meta system using the Q_INTERFACES() macro.
+
+For example,
+
+\code
+class Example : public QObject, public QDeclarativeParserStatus
+{
+ Q_OBJECT
+ Q_INTERFACES(QDeclarativeParserStatus)
+public:
+ virtual void componentComplete()
+ {
+ qDebug() << "Woohoo! Now to do my costly initialization";
+ }
+};
+\endcode
+
+*/
+
+/*!
+\page qml-extending-types.html
+\title Extending types from QML
+
+Many of the elements available for use in QML are implemented in
+\l {Extending QML}{C++}. These types are know as "core types". QML
+allows programmers to build new, fully functional elements without using C++.
+Existing core types can be extended, and new types defined entirely in the QML
+language.
+
+\tableofcontents
+
+\section1 Adding new properties
+
+New properties can be added to an existing type. These new properties are
+available for use within QML, and also appear as regular Qt properties on the
+C++ object, accessible through the regular property access mechanisms.
+
+Like all properties in QML, custom properties are typed. The type is used to
+define the property's behavior, and also determines the C++ type of the created
+Qt property. The following table shows the list of types available when
+declaring a new property, and the corresponding C++ type.
+
+\table
+\header \o QML Type Name \o C++ Type Name
+\row \o int \o int
+\row \o bool \o bool
+\row \o double \o double
+\row \o real \o double
+\row \o string \o QString
+\row \o url \o QUrl
+\row \o color \o QColor
+\row \o date \o QDate
+\row \o var \o QVariant
+\row \o variant \o QVariant
+\endtable
+
+QML supports two methods for adding a new property to a type: a new property
+definition, and a property alias.
+
+\section2 Property definitions
+
+Property definitions add a new property to an existing type. The storage of the
+property is managed by QML. The defined property may be read, written and bound
+to and from.
+
+The syntax for defining a new property is:
+\code
+ [default] property <type> <name>[: defaultValue]
+\endcode
+
+This declaration may appear anywhere within a type body, but it is customary to
+include it at the top. Attempting to declare two properties with the same name
+in the same type block is an error. However, a new property may reuse the name
+of an existing property on the type. This should be done with caution, as the
+existing property will be hidden, and become inaccessible.
+
+The <type> must be one of the QML type names shown in the above table.
+Additionally, an optional default value of the property can be provided. The
+default value is a convenient shortcut, but is behaviorally identical to doing
+it in two steps, like this:
+
+\code
+ // Use default value
+ property int myProperty: 10
+
+ // Longer, but behaviorally identical
+ property int myProperty
+ myProperty: 10
+\endcode
+
+If specified, the optional "default" attribute marks the new property as the
+types default property, overriding any existing default property. Using the
+default attribute twice in the same type block is an error.
+
+The following example shows how to declare a new "innerColor" property that
+controls the color of the inner rectangle.
+
+\code
+ Rectangle {
+ property color innerColor: "black"
+
+ color: "red"; width: 100; height: 100
+ Rectangle {
+ anchors.centerIn: parent
+ width: parent.width - 10
+ height: parent.height - 10
+ color: innerColor
+ }
+ }
+\endcode
+
+\target qml-property-aliases
+\section2 Property aliases
+
+Property aliases are a more advanced form of property declaration. Unlike a
+property definition, that allocates a new, unique storage space for the
+property, a property alias connects the newly declared property (called the
+aliasing property) to an existing property (the aliased property). Read
+operations on the aliasing property act as read operations on the aliased
+property, and write operations on the aliasing property as write operations on
+the aliased property.
+
+A property alias declaration looks a lot like a property definition:
+\code
+ [default] property alias <name>: <alias reference>
+\endcode
+
+As the aliasing property has the same type as the aliased property, an explicit
+type is omitted, and the special "alias" keyword is used. Instead of a default
+value, a property alias includes a compulsary alias reference. The alias
+reference is used to locate the aliased property. While similar to a property
+binding, the alias reference syntax is highly restricted.
+
+An alias reference takes one of the following forms
+\code
+ <id>.<property>
+ <id>
+\endcode
+
+where <id> must refer to an object id within the same component as the type
+declaring the alias, and, optionally, <property> refers to a property on that object.
+
+Here is the property definition example rewritten to use property aliases.
+\code
+Rectangle {
+ property alias innerColor: innerRect.color
+
+ color: "red"; width: 100; height: 100
+ Rectangle {
+ id: innerRect
+ anchors.centerIn: parent
+ width: parent.width - 10
+ height: parent.height - 10
+ color: "black"
+ }
+}
+\endcode
+
+Aliases are most useful when \l {Defining new Components}. Consequently
+they have several apparent limitations that only make sense in this context.
+
+Aliases are only activated once the component specifying them is completed. The
+most obvious consequence of this is that the component itself cannot generally
+use the aliased property directly. For example, this will not work:
+
+\code
+ // Does NOT work
+ property alias innerColor: innerRect.color
+ innerColor: "black"
+\endcode
+
+This behavior is required to allow type developers to redefine the behavior
+of existing property names while continuing to use the existing behavior within
+the type they are building, something that is not possible with property
+definitions. In the example used so far, this could allows the developer to fix
+the external rectangle's color as "red" and redefine the "color" property to
+refer to the inner rectangle, like this:
+
+\code
+Rectangle {
+ property alias color: innerRect.color
+
+ color: "red"; width: 100; height: 100
+ Rectangle {
+ id: innerRect
+ anchors.centerIn: parent
+ width: parent.width - 10
+ height: parent.height - 10
+ color: "black"
+ }
+}
+\endcode
+
+Users of this type would not be able to affect the color of the red rectangle,
+but would find using the "color" property, rather than the strange new
+"innerColor" property, much more familiar.
+
+A second, much less significant, consequence of the delayed activation of
+aliases is that an alias reference cannot refer to another aliasing property
+declared within the same component. This will not work:
+
+\code
+ // Does NOT work
+ id: root
+ property alias innerColor: innerRect.color
+ property alias innerColor2: root.innerColor
+\endcode
+
+From outside the component, aliasing properties appear as regular Qt properties
+and consequently can be used in alias references.
+
+\section1 Adding new signals
+
+New signals can be added to an existing type. These new signals are available
+for use within QML, and also appear as regular Qt signals on the C++ object that
+can be used in Qt signal/slot connections.
+
+The syntax for defining a new signal is:
+\code
+signal <name>[([<type> <parameter name>[, ...]])]
+\endcode
+
+This declaration may appear anywhere within a type body, but it is customary to
+include it at the top. Attempting to declare two signals or methods with the
+same name in the same type block is an error. However, a new signal may reuse
+the name of an existing signal on the type. This should be done with caution,
+as the existing signal may be hidden and become inaccessible.
+
+The options for parameter types are the same as for property types (see
+\l {Adding new properties}. If this signal has no parameters, the parameter
+list may be omitted entirely.
+
+Here are three examples of signal declarations:
+\code
+ Item {
+ signal clicked
+ signal hovered()
+ signal performAction(string action, var actionArgument)
+ }
+\endcode
+
+Adding a signal to an item automatically adds a signal handler to it.
+The signal hander is named on<Signal name>, with the first letter of the
+signal name being upper cased. The above example item would now have the
+following signal handlers:
+
+\list
+ \o onClicked
+ \o onHovered
+ \o onPerformAction
+\endlist
+
+\section1 Adding new methods
+
+New methods can be added to an existing type. These new methods are available
+for use within QML, and also appear as regular Qt slots on the C++ object that
+can be used in Qt signal/slot connections.
+
+\code
+function <name>([<parameter name>[, ...]]) { <body> }
+\endcode
+
+This declaration may appear anywhere within a type body, but it is customary to
+include it at the top. Attempting to declare two methods or signals with the
+same name in the same type block is an error. However, a new method may reuse
+the name of an existing method on the type. This should be done with caution,
+as the existing method may be hidden and become inaccessible.
+
+Methods parameters are not typed. In C++ these parameters are of type QVariant.
+The body of the method is written in JavaScript and may access the parameters by
+name.
+
+This example adds a new method that behaves like a child:
+\code
+Item {
+ function say(text) {
+ console.log("You said " + text);
+ }
+}
+\endcode
+
+\section1 Defining new Components
+\target components
+
+A component is a reusable type with a well-defined interface built entirely in
+QML. Components appear as regular QML elements, and can be used interchangably
+with core types. Components allow developers to create new types to be reused
+in other projects without the use of C++. Components can also help to reduce
+duplication inside one project by limiting the need for large numbers of
+copy-and-pasted blocks.
+
+Any snippet of QML code can become a component, just by placing it in the file
+"<Name>.qml" where <Name> is the new element name, and begins with an uppercase
+letter. These QML files automatically become available as new QML element types
+to other QML components and applications in the same directory.
+
+For example, here we show how a component named "Box" is defined and used
+multiple times by an application.
+
+\table
+\row
+\o application.qml
+\code
+Rectangle {
+ width: 100; height: 400;
+ Box { x: 0; y: 0 }
+ Box { x: 0; y: 150 }
+ Box { x: 0; y: 300 }
+}
+\endcode
+\o Box.qml
+\code
+Rectangle {
+ width: 100; height: 100;
+ color: "blue"
+}
+\endcode
+\endtable
+
+Components may be collected into \l {Modules} that gives the
+developer more freedom than just putting files in the same directory.
+
+\section2 Building reusable components
+
+A component type built to be reused by others must have a well defined
+interface. In QML, an interface consists of a defined collection of
+properties, signals and methods. Users of a component have access to all the
+properties, signals and methods defined on the root element of the component.
+
+In the component example above, the root element of the "Box" component is a
+Rect. As the Rect type has a "color" property, this property is accessible to
+users of the Box component. For example, the application.qml can be modified
+to show three different colored boxes like this:
+\code
+Rectangle {
+ width: 100; height: 400;
+ Box { x: 0; y: 0; color: "red"; }
+ Box { x: 0; y: 150; color: "yellow"; }
+ Box { x: 0; y: 300; color: "green"; }
+}
+\endcode
+
+As expected, adding additional properties to the root element of Box, makes them
+available externally. Here we add a "text" property:
+
+\table
+\row
+\o application.qml
+\code
+Rectangle {
+ width: 100; height: 400;
+ Box { x: 0; y: 0; color: "red"; text: "stop" }
+ Box { x: 0; y: 150; color: "yellow"; text: "slow" }
+ Box { x: 0; y: 300; color: "green"; text: "go" }
+}
+\endcode
+\o Box.qml
+\code
+Rectangle {
+ property alias text: myText.text
+ width: 100; height: 100;
+ color: "blue"
+ Text {
+ id: myText
+ anchors.centerIn: parent
+ }
+}
+\endcode
+\endtable
+
+Methods and signals may be added in the same way.
+
+As all external methods, signals and properties are accessible to external
+users, developers should ensure that setting these properties does not have
+any undesirable side-effects. For most resiliance, root level properties should
+only be used for literal default values. When a root level property must be
+used inside the component - such as the children property - property aliases
+can be used to redirect this property to a "safe" location for external users.
+Try to think of the root level properties as being "owned" by the components
+user, rather than the component itself.
+*/
diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc
new file mode 100644
index 0000000000..d7e890ce7f
--- /dev/null
+++ b/doc/src/declarative/focus.qdoc
@@ -0,0 +1,340 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\target qmlfocus
+\page qdeclarativefocus.html
+\title Keyboard Focus in QML
+
+When a key is pressed or released, a key event is generated and delivered to the
+focused QML \l Item. To facilitate the construction of reusable components
+and to address some of the cases unique to fluid user interfaces, the QML items add a
+\e scope based extension to Qt's traditional keyboard focus model.
+
+\tableofcontents
+
+\section1 Key Handling Overview
+
+When the user presses or releases a key, the following occurs:
+\list 1
+\o Qt receives the key action and generates a key event.
+\o If the Qt widget containing the \l QDeclarativeView has focus, the key event is delivered to it. Otherwise, regular Qt key handling continues.
+\o The key event is delivered by the scene to the QML \l Item with \e {active focus}. If no \l Item has \e {active focus}, the key event is \l {QEvent::ignore()}{ignored} and regular Qt key handling continues.
+\o If the QML \l Item with \e {active focus} accepts the key event, propagation stops. Otherwise the event is "bubbled up", by recursively passing it to each \l Item's parent until either the event is accepted, or the root \l Item is reached.
+
+If the \c {Rectangle} element in the following example has active focus and the \e A key is pressed,
+it will bubble up to its parent. However, pressing the \e B key will bubble up to the root
+item and thus subsequently be \l {QEvent::ignore()}{ignored}.
+
+\code
+Item {
+ Item {
+ Keys.onPressed: if (event.key == Qt.Key_A) { console.log('Key A was pressed'); event.accepted = true }
+ Rectangle {}
+ }
+}
+\endcode
+
+\o If the root \l Item is reached, the key event is \l {QEvent::ignore()}{ignored} and regular Qt key handling continues.
+
+\endlist
+
+See also the \l {Keys}{Keys attached property} and \l {KeyNavigation}{KeyNavigation attached property}.
+
+\section1 Querying the Active Focus Item
+
+Whether or not an \l Item has \e {active focus} can be queried through the
+property \c {Item::focus}. For example, here we have a \l Text
+element whose text is determined by whether or not it has \e {active focus}.
+
+\code
+Text {
+ text: focus ? "I have active focus!" : "I do not have active focus"
+}
+\endcode
+
+\section1 Acquiring Focus and Focus Scopes
+
+An \l Item requests focus by setting the \c {Item::focus} property to true.
+
+For very simple cases simply setting the \c {Item::focus} property is sometimes
+sufficient. If we run the following example in the \c qmlviewer, we see that
+the \c {keyHandler} element has \e {active focus} and pressing the 'A', 'B'
+or 'C' keys modifies the text appropriately.
+
+\table
+\row
+\o \code
+ Rectangle {
+ color: "lightsteelblue"; width: 240; height: 25
+ Text { id: myText }
+ Item {
+ id: keyHandler
+ focus: true
+ Keys.onPressed: {
+ if (event.key == Qt.Key_A)
+ myText.text = 'Key A was pressed'
+ else if (event.key == Qt.Key_B)
+ myText.text = 'Key B was pressed'
+ else if (event.key == Qt.Key_C)
+ myText.text = 'Key C was pressed'
+ }
+ }
+ }
+\endcode
+\o \image declarative-qmlfocus1.png
+\endtable
+
+However, were the above example to be used as a self-contained component, this
+simple use of the \c {Item::focus} property is no longer sufficient. The left
+hand side of the following table shows what we would like to be able to write.
+Here we create two instances of our previously defined component, and set the
+second one to have focus. The intention is that when the \e A, \e B, or \e C
+keys are pressed, the second of the two components receives the event and
+reponds accordingly.
+
+\table
+\row
+\o \code
+Rectangle {
+ color: "red"; width: 240; height: 55
+ MyWidget {}
+ MyWidget { y: 30; focus: true }
+}
+\endcode
+\o \code
+Rectangle {
+ color: "red"; width: 240; height: 55
+ Rectangle {
+ color: "lightsteelblue"; width: 240; height: 25
+ Text { id: myText }
+ Item {
+ id: keyHandler
+ focus: true
+ Keys.onPressed: {
+ if (event.key == Qt.Key_A)
+ myText.text = 'Key A was pressed'
+ else if (event.key == Qt.Key_B)
+ myText.text = 'Key B was pressed'
+ else if (event.key == Qt.Key_C)
+ myText.text = 'Key C was pressed'
+ }
+ }
+ }
+ Rectangle {
+ y: 30; focus: true
+ color: "lightsteelblue"; width: 240; height: 25
+ Text { id: myText }
+ Item {
+ id: keyHandler
+ focus: true
+ Keys.onPressed: {
+ if (event.key == Qt.Key_A)
+ myText.text = 'Key A was pressed'
+ else if (event.key == Qt.Key_B)
+ myText.text = 'Key B was pressed'
+ else if (event.key == Qt.Key_C)
+ myText.text = 'Key C was pressed'
+ }
+ }
+ }
+}
+\endcode
+\endtable
+
+The right hand side of the example shows the expanded code - the equivalent QML
+without the use of the component \c {MyWidget}. From this, the problem is
+evident - there are no less than three elements that have the \c {Item::focus}
+property set to true. Ultimately only one element can have focus, and the
+system has to decide which on. In this case the first appearance of the
+\c {Item::focus} property being set to true on line 4 is selected, and the value
+of \c {Item::focus} in the other two instances is reverted back to false. This
+is exactly the opposite of what was wanted!
+
+This problem is fundamentally one of visibility. The \c {MyWidget}
+components each set their \c {keyHandler} Items as focused as that is all they can
+do - they don't know how they are going to be used, but they do know that when
+they're in use their \c {keyHandler} element is what needs focus. Likewise
+the code that uses the two \c {MyWidgets} sets the second \c {MyWidget} as
+focused. While it doesn't know exactly how the \c {MyWidget} is
+implemented, it knows that it wants the second one to be focused. This allows us
+to achieve encapsulation, allowing each widget to focus on it's appropriate behaviour
+itself.
+
+To solve this problem - allowing components to care about what they know about
+and ignore everything else - the QML items introduce a concept known as a
+\e {focus scope}. For existing Qt users, a \e {focus scope} is like an
+automatic focus proxy. A \e {focus scope} is created using the \l FocusScope
+element.
+
+In the next example, a \l FocusScope is added to the component, and the visual
+result shown.
+
+\table
+\row
+\o \code
+FocusScope {
+ width: 240; height: 25
+ Rectangle {
+ color: "lightsteelblue"; width: 240; height: 25
+ Text { id: myText }
+ Item {
+ id: keyHandler
+ focus: true
+ Keys.onPressed: {
+ if (event.key == Qt.Key_A)
+ myText.text = 'Key A was pressed'
+ else if (event.key == Qt.Key_B)
+ myText.text = 'Key B was pressed'
+ else if (event.key == Qt.Key_C)
+ myText.text = 'Key C was pressed'
+ }
+ }
+ }
+}
+\endcode
+\o \image declarative-qmlfocus2.png
+\endtable
+
+Conceptually \e {focus scopes} are quite simple.
+\list
+\o Within each \e {focus scope} one element may have \c {Item::focus} set to true.
+If more than one \l Item has the \c {Item::focus} property set, the first is selected
+and the others are unset, just like when there are no \e {focus scopes}.
+\o When a \e {focus scope} receives \e {active focus}, the contained element with
+\c {Item::focus} set (if any) also gets \e {active focus}. If this element is
+also a \l FocusScope, the proxying behaviour continues. Both the
+\e {focus scope} and the sub-focused item will have \c {Item::focus} set.
+\endlist
+
+So far the example has the second component statically selected. It is trivial
+now to extend this component to make it clickable, and add it to the original
+application. We still set a one of the widgets as focused by default, but from
+then on clicking the either one gives it focus.
+
+\table
+\row
+\o \code
+Rectangle {
+ color: "red"; width: 240; height: 55
+ MyClickableWidget {}
+ MyClickableWidget { y: 30; focus: true }
+}
+\endcode
+\o \code
+FocusScope {
+ id: page; width: 240; height: 25
+ MyWidget { focus: true }
+ MouseArea { anchors.fill: parent; onClicked: { page.focus = true } }
+}
+\endcode
+\endtable
+
+\image declarative-qmlfocus3.png
+
+When a QML item explicitly relinquishes focus (by setting its
+\c {Item::focus} property to false while it has \e {active focus}), the system
+does not automatically select another element to receive focus. That is, it
+is possible for there to be no currently \e {active focus}.
+
+\section1 Advanced uses of Focus Scopes
+
+Focus scopes allow focus to allocation to be easily partitioned. Several
+QML items use it to this effect.
+
+\l ListView, for example, is itself a focus scope. Generally this isn't
+noticable as \l ListView doesn't usually have manually added visual children.
+By being a focus scope, \l ListView can focus the current list item without
+worrying about how that will effect the rest of the application. This allows
+the current item delegate to react to key presses.
+
+This contrived example shows how this works. Pressing the \c Return key will
+print the name of the current list item.
+
+\table
+\row
+\o \code
+Rectangle {
+ color: "lightsteelblue"; width: 240; height: 320
+
+ ListView {
+ id: myView; anchors.fill: parent; focus: true
+ model: ListModel {
+ ListElement { name: "Bob" }
+ ListElement { name: "John" }
+ ListElement { name: "Michael" }
+ }
+ delegate: FocusScope {
+ width: contents.width; height: contents.height
+ Text {
+ focus: true
+ text: name
+ Keys.onReturnPressed: console.log(name)
+ }
+ }
+ }
+}
+\endcode
+\o \image declarative-qmlfocus4.png
+\endtable
+
+While the example is simple, there's a lot going on behind the scenes. Whenever
+the current item changes, the \l ListView sets the delegate's \c {Item::focus}
+property. As the \l ListView is a \e {focus scope}, this doesn't effect the
+rest of the application. However, if the \l ListView itself has
+\e {active focus} this causes the delegate itself to receive \e {active focus}.
+In this example, the root element of the delegate is also a \e {focus scope},
+which in turn gives \e {active focus} to the \c {Text} element that
+actually performs the work of handling the \e {Return} key.
+
+All of the QML view classes, such as \l PathView and \l GridView, behave
+in a similar manner to allow key handling in their respective delegates.
+
+\section1 Focus Panels
+
+Traditional UIs are composed of many top-level windows. Windows actually
+perform two tasks - they act as the visual bounds for a widget, and they segment
+focus. Each window has a separate focused widget, that becomes (to mix
+terminologies) the \e {active focus} widget when the window is the active
+window.
+
+### Focus panels do basically the same thing.
+*/
diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc
new file mode 100644
index 0000000000..4b1c7d3fcc
--- /dev/null
+++ b/doc/src/declarative/globalobject.qdoc
@@ -0,0 +1,316 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qdeclarativeglobalobject.html
+\title QML Global Object
+
+Contains all the properties of the JavaScript global object, plus:
+
+\tableofcontents
+
+\section1 Qt Object
+
+The Qt object provides useful enums and functions from Qt, for use in all QML
+files.
+
+\section2 Enums
+The Qt object contains all enums in the Qt namespace. For example, you can
+access the AlignLeft member of the Qt::AlignmentFlag enum with \c Qt.AlignLeft.
+
+For a full list of enums, see the \l{Qt Namespace} documentation.
+
+\section2 Types
+The Qt object also contains helper functions for creating objects of specific
+data types. This is primarily useful when setting the properties of an item
+when the property has one of the following types:
+
+\list
+\o Color
+\o Rect
+\o Point
+\o Size
+\o Vector3D
+\endlist
+
+There are also string based constructors for these types, see \l{qdeclarativebasictypes.html}{Qml Types}.
+
+\section3 Qt.rgba(qreal red, qreal green, qreal blue, qreal alpha)
+This function returns a Color with the specified \c red, \c green, \c blue and \c alpha components. All components should be in the range 0-1 inclusive.
+
+\section3 Qt.hsla(qreal hue, qreal saturation, qreal lightness, qreal alpha)
+This function returns a Color with the specified \c hue, \c saturation, \c lightness and \c alpha components. All components should be in the range 0-1 inclusive.
+
+\section3 Qt.rect(int x, int y, int width, int height)
+This function returns a Rect with the top-left corner at \c x, \c y and the specified \c width and \c height.
+\section3 Qt.point(int x, int y)
+This function returns a Point with the specified \c x and \c y coordinates.
+\section3 Qt.size(int width, int height)
+This function returns as Size with the specified \c width and \c height.
+\section3 Qt.vector3d(real x, real y, real z)
+This function returns a Vector3D with the specified \c x, \c y and \c z.
+
+\section2 Formatters
+The Qt object contains several functions for formatting dates and times.
+
+\section3 Qt.formatDate(datetime date, variant format)
+This function returns the string representation of \c date, formatted according to \c format.
+\section3 Qt.formatTime(datetime time, variant format)
+This function returns the string representation of \c time, formatted according to \c format.
+\section3 Qt.formatDateTime(datetime dateTime, variant format)
+This function returns the string representation of \c dateTime, formatted according to \c format.
+
+\c format for the above formatting functions can be specified as follows.
+
+ These expressions may be used for the date:
+
+ \table
+ \header \i Expression \i Output
+ \row \i d \i the day as number without a leading zero (1 to 31)
+ \row \i dd \i the day as number with a leading zero (01 to 31)
+ \row \i ddd
+ \i the abbreviated localized day name (e.g. 'Mon' to 'Sun').
+ Uses QDate::shortDayName().
+ \row \i dddd
+ \i the long localized day name (e.g. 'Monday' to 'Qt::Sunday').
+ Uses QDate::longDayName().
+ \row \i M \i the month as number without a leading zero (1-12)
+ \row \i MM \i the month as number with a leading zero (01-12)
+ \row \i MMM
+ \i the abbreviated localized month name (e.g. 'Jan' to 'Dec').
+ Uses QDate::shortMonthName().
+ \row \i MMMM
+ \i the long localized month name (e.g. 'January' to 'December').
+ Uses QDate::longMonthName().
+ \row \i yy \i the year as two digit number (00-99)
+ \row \i yyyy \i the year as four digit number
+ \endtable
+
+ These expressions may be used for the time:
+
+ \table
+ \header \i Expression \i Output
+ \row \i h
+ \i the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)
+ \row \i hh
+ \i the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)
+ \row \i m \i the minute without a leading zero (0 to 59)
+ \row \i mm \i the minute with a leading zero (00 to 59)
+ \row \i s \i the second without a leading zero (0 to 59)
+ \row \i ss \i the second with a leading zero (00 to 59)
+ \row \i z \i the milliseconds without leading zeroes (0 to 999)
+ \row \i zzz \i the milliseconds with leading zeroes (000 to 999)
+ \row \i AP
+ \i use AM/PM display. \e AP will be replaced by either "AM" or "PM".
+ \row \i ap
+ \i use am/pm display. \e ap will be replaced by either "am" or "pm".
+ \endtable
+
+ All other input characters will be ignored. Any sequence of characters that
+ are enclosed in singlequotes will be treated as text and not be used as an
+ expression. Two consecutive singlequotes ("''") are replaced by a singlequote
+ in the output.
+
+ Example format strings (assumed that the date and time is 21 May 2001
+ 14:13:09):
+
+ \table
+ \header \i Format \i Result
+ \row \i dd.MM.yyyy \i 21.05.2001
+ \row \i ddd MMMM d yy \i Tue May 21 01
+ \row \i hh:mm:ss.zzz \i 14:13:09.042
+ \row \i h:m:s ap \i 2:13:9 pm
+ \endtable
+
+If no format is specified the locale's short format is used. Alternatively, you can specify
+\c Qt.DefaultLocaleLongDate to get the locale's long format.
+
+\section2 Functions
+The Qt object also contains the following miscellaneous functions which expose Qt functionality for use in QML.
+
+\section3 Qt.lighter(color baseColor)
+This function returns a color 50% lighter than \c baseColor. See QColor::lighter() for further details.
+\section3 Qt.darker(color baseColor)
+This function returns a color 50% darker than \c baseColor. See QColor::darker() for further details.
+\section3 Qt.tint(color baseColor, color tintColor)
+ This function allows tinting one color with another.
+
+ The tint color should usually be mostly transparent, or you will not be able to see the underlying color. The below example provides a slight red tint by having the tint color be pure red which is only 1/16th opaque.
+
+ \qml
+ Rectangle { x: 0; width: 80; height: 80; color: "lightsteelblue" }
+ Rectangle { x: 100; width: 80; height: 80; color: Qt.tint("lightsteelblue", "#10FF0000") }
+ \endqml
+ \image declarative-rect_tint.png
+
+ Tint is most useful when a subtle change is intended to be conveyed due to some event; you can then use tinting to more effectively tune the visible color.
+\section3 Qt.closestAngle(number fromAngle, number toAngle)
+This function returns an equivalent angle to toAngle, such that the difference between fromAngle and toAngle is never more than 180 degrees. This is useful when animating angles using a NumberAnimation, which does not know about equivalent angles, when you always want to take the shortest path.
+
+For example, the following would rotate myItem counterclockwise from 350 degrees to 10 degrees, for a total of 340 degrees of rotation.
+\qml
+NumberAnimation { target: myItem; property: "rotation"; from: 350; to: 10 }
+\endqml
+
+while the following would rotate myItem clockwise from 350 degrees to 370 degrees (which is visually equivilant to 10 degrees), for a total of 20 degrees of rotation.
+\qml
+NumberAnimation { target: myItem; property: "rotation"; from: 350; to: Qt.closetAngle(350, 10) }
+\endqml
+
+\section3 Qt.openUrlExternally(url target)
+This function attempts to open the specified \c target url in an external application, based on the user's desktop preferences. It will return true if it succeeds, and false otherwise.
+
+\section3 Qt.md5(data)
+This function returns a hex string of the md5 hash of \c data.
+
+\section1 Dynamic Object Creation
+The following functions on the global object allow you to dynamically create QML
+items from files or strings. See \l{Dynamic Object Management} for an overview
+of their use.
+
+\section2 createComponent(url file)
+ This function takes the URL of a QML file as its only argument. It returns
+ a component object which can be used to create and load that QML file.
+
+ Example QML script is below. Remember that QML files that might be loaded
+ over the network cannot be expected to be ready immediately.
+ \code
+ var component;
+ var sprite;
+ function finishCreation(){
+ if(component.isReady()){
+ sprite = component.createObject();
+ if(sprite == 0){
+ // Error Handling
+ }else{
+ sprite.parent = page;
+ sprite.x = 200;
+ //...
+ }
+ }else if(component.isError()){
+ // Error Handling
+ }
+ }
+
+ component = createComponent("Sprite.qml");
+ if(component.isReady()){
+ finishCreation();
+ }else{
+ component.statusChanged.connect(finishCreation);
+ }
+ \endcode
+
+ If you are certain the files will be local, you could simplify to
+
+ \code
+ component = createComponent("Sprite.qml");
+ sprite = component.createObject();
+ if(sprite == 0){
+ // Error Handling
+ console.log(component.errorsString());
+ }else{
+ sprite.parent = page;
+ sprite.x = 200;
+ //...
+ }
+ \endcode
+
+ If you want to just create an arbitrary string of QML, instead of
+ loading a QML file, consider the createQmlObject() function.
+
+\section2 createQmlObject(string qml, object parent, string filepath)
+ Creates a new object from the specified string of QML. It requires a
+ second argument, which is the id of an existing QML object to use as
+ the new object's parent. If a third argument is provided, this is used
+ for error reporting as the filepath that the QML came from.
+
+ Example (where targetItem is the id of an existing QML item):
+ \code
+ newObject = createQmlObject('import Qt 4.6; Rectangle {color: "red"; width: 20; height: 20}',
+ targetItem, "dynamicSnippet1");
+ \endcode
+
+ This function is intended for use inside QML only. It is intended to behave
+ similarly to eval, but for creating QML elements.
+
+ Returns the created object, or null if there is an error. In the case of an
+ error, details of the error are output using qWarning().
+
+ Note that this function returns immediately, and therefore may not work if
+ the QML loads new components. If you are trying to load a new component,
+ for example from a QML file, consider the createComponent() function
+ instead. 'New components' refers to external QML files that have not yet
+ been loaded, and so it is safe to use createQmlObject to load built-in
+ components.
+
+\section1 Asynchronous JavaScript and XML
+QML script supports the XMLHttpRequest object, which can be used to asynchronously obtain data from over a network.
+\section2 XMLHttpRequest()
+In QML you can construct an XMLHttpRequest object just like in a web browser! TODO: Real documentation for this object.
+\section1 Offline Storage API
+
+The \c openDatabase() and related functions
+provide the ability to access local offline storage in an SQL database.
+
+These databases are user-specific and QML-specific. They are stored in the \c Databases subdirectory
+of QDeclarativeEngine::offlineStoragePath(), currently as SQLite databases.
+
+The API conforms to the Synchronous API of the HTML5 Web Database API,
+\link http://www.w3.org/TR/2009/WD-webdatabase-20091029/ W3C Working Draft 29 October 2009\endlink.
+
+The API can be used from JavaScript functions in your QML:
+
+\quotefile declarative/sql/hello.qml
+
+When a database is first created, an INI file is also created specifying its characteristics:
+
+\table
+\header \o \bold {Key} \o \bold {Value}
+\row \o Name \o The name of the database passed to \c openDatabase()
+\row \o Version \o The version of the database passed to \c openDatabase()
+\row \o Description \o The description of the database passed to \c openDatabase()
+\row \o EstimatedSize \o The estimated size of the database passed to \c openDatabase()
+\row \o Driver \o Currently "QSQLITE"
+\endtable
+
+This data can be used by application tools.
+
+*/
diff --git a/doc/src/declarative/integrating.qdoc b/doc/src/declarative/integrating.qdoc
new file mode 100644
index 0000000000..c685d3d084
--- /dev/null
+++ b/doc/src/declarative/integrating.qdoc
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qml-integration.html
+\title Integrating QML with existing Qt UI code
+
+If you have existing Qt UI code which does not use QML you can still
+add QML to your UI, without having to rewrite it.
+
+\section1 Adding QML to a \l{QWidget} based UI
+If you have an existing QWidget based UI you can simply write new custom
+widgets in QML. To integrate them into your application you can create a
+QDeclarativeView widget, and load the QML file into that. You'll then have a new widget
+containing your declarative UI, and you can interact with it through the
+QDeclarativeView interface. The one drawback of this approach is that QDeclarativeView is a lot
+heavier than a QWidget in terms of memory consumption and initialization speed,
+and so having large numbers of them may lead to performance degredation.
+
+For a smooth transition from a QWidget based UI to a QML based UI, simply
+rewrite your widgets in QML one at a time, using the above method. When
+all of your widgets are written in QML you can rewrite your main widget in
+QML, so as to load the other widgets in QML instead of using QDeclarativeViews. Then
+you just load the main QML file on startup.
+
+Keep in mind that QWidgets were designed for different sorts of UIs than QML
+was, and so it is not always a good idea to switch. QWidgets are a better
+choice if your UI is comprised of a small number of complex and static
+elements, and QML is a better choice if your UI is comprised of a large number
+of simple and dynamic elements.
+
+\section1 Adding QML to a QGraphicsView based UI
+
+If you have an existing Graphics View based UI you can create new
+items in QML, and use \l{QDeclarativeComponent} to create \l{QGraphicsObject}s
+from the QML files. These \l{QGraphicsObject}s can then be placed into
+your \l{QGraphicsScene} using \l{QGraphicsScene::addItem()} or by
+reparenting them to an item already in the \l{QGraphicsScene}.
+
+Example, for local QML files:
+
+\code
+QGraphicsScene* scene = new QGraphicsScene;
+QDeclarativeEngine *engine = new QDeclarativeEngine;
+QDeclarativeComponent component(engine, QUrl::fromLocalFile(filename));
+QGraphicsObject *object =
+ qobject_cast<QGraphicsObject *>(component.create());
+scene->addItem(object);
+\endcode
+
+The following QGraphicsView options are recommended for optimal performance
+of QML UIs:
+
+\list
+\o QGraphicsView::setOptimizationFlags(QGraphicsView::DontSavePainterState);
+\o QGraphicsView::setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
+\o QGraphicsScene::setItemIndexMethod(QGraphicsScene::NoIndex);
+\endlist
+
+\section1 Using existing QGraphicsWidgets in QML
+Another way of integrating with a QGraphicsView based UI is to expose your
+existing QGraphicsWidgets to QML, and constructing your scene in QML. Note that
+this approach will not work with QGraphicsItems which are not QGraphicsWidgets,
+and that this approach allows you to integrate new items written in QML
+without using the above method.
+
+You can make custom C++ types
+available in QML using the pair of macros listed in \l{Extending QML}.
+While this is normally only useful for
+types that were designed for QML use, in conjunction with the
+\l{GraphicsObjectContainer} element QGraphicsWidget subclasses can also be
+used effectively (if they were designed, like QGraphicsWidget, to be controllable through Qt's property system).
+This way you can write your UI using QML, without having to rewrite your existing items.
+
+For details on implementing this approach see \l{Extending QML} page for details on exposing your C++ types,
+and the \l{GraphicsObjectContainer} documentation for details about using it to wrap QGraphicsWidgets.
+*/
diff --git a/doc/src/declarative/javascriptblocks.qdoc b/doc/src/declarative/javascriptblocks.qdoc
new file mode 100644
index 0000000000..98183bbac8
--- /dev/null
+++ b/doc/src/declarative/javascriptblocks.qdoc
@@ -0,0 +1,225 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qdeclarativejavascript.html
+\title JavaScript Blocks
+
+QML encourages building UIs declaratively, using \l {Property Binding} and the
+composition of existing \l {QML Elements}. If imperative code is required to implement
+more advanced behavior, the \l Script element can be used to add JavaScript code directly
+to a QML file, or to include an external JavaScript file.
+
+The \l Script element is a QML language \e intrinsic. It can be used anywhere in a
+QML file, \e except as the root element of a file or sub-component, but cannot be
+assigned to an object property or given an id. The included JavaScript is evaluated
+in a scope chain. The \l {QML Scope} documentation covers the specifics of scoping
+in QML.
+
+A restriction on the JavaScript used in QML is that you cannot add new members to the
+global object. This happens transparently when you try to use a variable without
+declaring it, and so declaring local variables is required when using Java script in
+QML.
+
+The global object in QML has a variety of helper functions added to it, to aid UI
+implementation. See \l{QML Global Object} for further details.
+
+Note that if you are adding a function that should be called by external elements,
+you do not need the \l Script element. See \l {Extending types from QML#Adding new methods}
+{Adding new methods} for information about adding slots that can be called externally.
+
+\section1 Inline Script
+
+Small blocks of JavaScript can be included directly inside a \l {QML Document} as
+the body of the \l Script element.
+
+\code
+Rectangle {
+ Script {
+ function factorial(a) {
+ a = Integer(a);
+ if (a <= 0)
+ return 1;
+ else
+ return a * factorial(a - 1);
+ }
+ }
+}
+\endcode
+
+Good programming practice dictates that only small script snippets should be written
+inline. QML prohibits the declaration of anything other than functions in an inline
+script block. For example, the following script is illegal as an inline script block
+as it declares the non-function variable \c lastResult.
+
+\code
+// Illegal inline code block
+var lastResult = 0
+function factorial(a) {
+ a = Integer(a);
+ if (a <= 0)
+ lastResult = 1;
+ else
+ lastResult = a * factorial(a - 1);
+ return lastResult;
+}
+\endcode
+
+\section1 Including an External File
+
+To avoid cluttering the QML file, large script blocks should be in a separate file.
+The \l Script element's \c source property is used to load script from an external
+file.
+
+If the previous factorial code that was illegal as an inline script block was saved
+into a "factorial.js" file, it could be included like this.
+
+\code
+Rectangle {
+ Script {
+ source: "factorial.js"
+ }
+}
+\endcode
+
+The \c source property may reference a relative file, or an absolute path. In the
+case of a relative file, the location is resolved relative to the location of the
+\l {QML Document} that contains the \l Script element. If the script file is not
+accessible, an error will occur. If the source is on a network resource, the
+enclosing QML document will remain in the \l {QDeclarativeComponent::status()}{waiting state}
+until the script has been retrieved.
+
+\section1 Running Script at Startup
+
+It is occasionally necessary to run a block of JavaScript code at application (or
+component instance) "startup". While it is tempting to just include the startup
+script as \e {global code} in an external script file, this can have severe limitations
+as the QML environment may not have been fully established. For example, some objects
+might not have been created or some \l {Property Binding}s may not have been run.
+\l {QML Script Restrictions} covers the exact limitations of global script code.
+
+The QML \l Component element provides an \e attached \c onCompleted property that
+can be used to trigger the execution of script code at startup after the
+QML environment has been completely established.
+
+The following QML code shows how to use the \c Component::onCompleted property.
+
+\code
+Rectangle {
+ Script {
+ function startupFunction() {
+ // ... startup code
+ }
+ }
+
+ Component.onCompleted: startupFunction();
+}
+\endcode
+
+Any element in a QML file - including nested elements and nested QML component
+instances - can use this attached property. If there is more than one script to
+execute at startup, they are run sequentially in an undefined order.
+
+\section1 QML Script Restrictions
+
+QML \l Script blocks contain standard JavaScript code. QML introduces the following
+restrictions.
+
+\list
+\o Script code cannot modify the global object.
+
+In QML, the global object is constant - existing properties cannot be modified or
+deleted, and no new properties may be created.
+
+Most JavaScript programs do not explicitly modify the global object. However,
+JavaScript's automatic creation of undeclared variables is an implicit modification
+of the global object, and is prohibited in QML.
+
+Assuming that the \c a variable does not exist in the scope chain, the following code
+is illegal in QML.
+
+\code
+// Illegal modification of undeclared variable
+a = 1;
+for (var ii = 1; ii < 10; ++ii) a = a * ii;
+ console.log("Result: " + a);
+\endcode
+
+It can be trivially modified to this legal code.
+
+\code
+var a = 1;
+for (var ii = 1; ii < 10; ++ii) a = a * ii;
+ console.log("Result: " + a);
+\endcode
+
+Any attempt to modify the global object - either implicitly or explicitly - will
+cause an exception. If uncaught, this will result in an warning being printed,
+that includes the file and line number of the offending code.
+
+\o Global code is run in a reduced scope
+
+During startup, if a \l Script block includes an external file with "global"
+code, it is executed in a scope that contains only the external file itself and
+the global object. That is, it will not have access to the QML objects and
+properties it \l {QML Scope}{normally would}.
+
+Global code that only accesses script local variable is permitted. This is an
+example of valid global code.
+
+\code
+var colors = [ "red", "blue", "green", "orange", "purple" ];
+\endcode
+
+Global code that accesses QML objects will not run correctly.
+
+\code
+// Invalid global code - the "rootObject" variable is undefined
+var initialPosition = { rootObject.x, rootObject.y }
+\endcode
+
+This restriction exists as the QML environment is not yet fully established.
+To run code after the environment setup has completed, refer to
+\l {Running Script at Startup}.
+
+\endlist
+
+*/
diff --git a/doc/src/declarative/measuring-performance.qdoc b/doc/src/declarative/measuring-performance.qdoc
new file mode 100644
index 0000000000..cb608bf343
--- /dev/null
+++ b/doc/src/declarative/measuring-performance.qdoc
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page optimizing-performance.html
+\target optimizing-performance
+\title Optimizing Performance in QML
+
+The Qt Declarative module includes several tools to help measure performance.
+
+\section1 Performance Logging
+
+The declarative module uses the functionality provided by QPerformanceLog to log performance information. To see this information you can add the following to src.pro:
+
+\code
+DEFINES += Q_ENABLE_PERFORMANCE_LOG
+\endcode
+
+The performance information will be printed to screen on a QML application startup, or when running the viewer can be forced at anytime by pressing 'F3' on the keyboard.
+
+Additional logging can be enabled by adding the relevant categories to qfxperf.h and qfxperf.cpp.
+
+For example, to measure the cost of calculating the size of a text item, you would first define a TextSize category by adding the following:
+
+\code
+//in qfxperf.h
+Q_DECLARE_PERFORMANCE_METRIC(TextSize);
+
+//in qfxperf.cpp
+Q_DEFINE_PERFORMANCE_METRIC(TextSize, "Text Size Calculation");
+\endcode
+
+You could then use this category in the code:
+
+\code
+void QDeclarativeText::updateSize()
+{
+ QDeclarativePerfTimer<QDeclarativePerf::TextSize> perf;
+ ...
+}
+\endcode
+
+Because there is no cost for a QDeclarativePerfTimer when Q_ENABLE_PERFORMANCE_LOG is not defined, this line can persist in the code and be used to help detect performance bottlenecks and regressions. See the QPerformanceLog documentation for more information on this performance framework.
+
+\section1 FPS Measurements
+
+When running the viewer, pressing 'F2' on the keyboard while a QML program is running will cause information on cost-per-frame and frames-per-second (FPS) to be printed to the console.
+
+The information printed includes:
+\list
+\o \e repaint(): the total time spent painting.
+\o \e paint(): the time spent by Qt painting.
+\o \e timeBetweenFrames: the total time spent per frame. This number minus repaint() gives a good idea of how much time is spent on things besides painting. A high number here with a low number for repaint() indicates expensive calculations happening each frame.
+\endlist
+
+\section1 Improving Performance
+
+The following tips can help decrease startup time for QML-based appications.
+
+\section2 Images
+
+\list
+\o Use jpg instead of png for photo-like images. On the N810, this can save 150ms for a large (320x480) image.
+
+\o If you are configuring Qt, configure out any image plugins you don't plan to support (mng and svg are the most expensive). On the N810, this can save 75-100ms startup time. For example:
+
+\code
+configure -no-libmng -no-svg -no-libtiff
+\endcode
+
+\o In some cases running pngcrush, optipng, gifsicle or other similar tools can give some improvement.
+
+We are also investigating support for the loading of uncompressed images. This will provide opportunites to decrease startup time at the cost of increased storage space.
+\endlist
+
+\section2 Fonts
+
+\list
+\o Use qpf instead of ttf. When using multiple font sizes and weights on the N810, this can save 125ms startup time compared to a ttf 'clean' run, and 40-50ms on subsequent runs (ttfs are shared by open applications).
+\endlist
+
+*/
+
+*/
diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc
new file mode 100644
index 0000000000..ab75f8daa6
--- /dev/null
+++ b/doc/src/declarative/modules.qdoc
@@ -0,0 +1,187 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qdeclarativemodules.html
+\title Modules
+
+A \bold module is a collection of QML types.
+
+To use types from a module it must be imported using the \c import statement. Successive
+import statements override earlier import statements, however, since imports have version
+qualifiers, changes in modules do not alter the semantics of imports.
+
+\section1 Importing Types Defined in C++
+
+Types \link adding-types defined in C++\endlink can be from types your application defines, standard QML types,
+or types defined in plugins. To use any such types, you must import
+the module defining them. For example, to use types from Qt, import it:
+
+\code
+import Qt 4.6
+\endcode
+
+This makes available all types in Qt that were available in Qt 4.6, regardless of the
+actual version of Qt executing the QML. So even if Qt 4.7 adds a type that would conflict
+with a type you defined while using 4.6, that type is not imported, so there is no conflict.
+
+Types defined by plugins are made using QDeclarativeExtensionPlugin. Installed plugins and QML files
+can both contribute types to the same module.
+
+
+\section1 Importing Types Defined in QML
+
+When importing types \link components defined using QML\endlink, the syntax depends
+on whether or not the types are installed on the system.
+
+
+\section2 Installed QML Files
+
+To import types defined in QML files that are installed on the system running the
+QML, a URI import is used:
+
+\code
+import com.nokia.Example 1.0
+\endcode
+
+Files imported in this way are found on the paths added by QDeclarativeEngine::addImportPath(),
+which by default only inludes \c $QTDIR/qml, so the above would make available those types
+defined in \c $QTDIR/qml/com/nokia/Example which are specified as being in version 1.0.
+Installed plugins and QML files can both contribute types to the same module.
+
+The specification of types to versions is given by a special file, \c qmldir which must
+exist in the module directory. The syntax is described below.
+
+The \c -L option to the \l {qmlviewer}{viewer} application also adds paths to the import path.
+
+
+\section2 Local QML Files
+
+To import types defined in QML files in directories relative to the file importing them,
+a quoted import directory is used:
+
+\code
+import "path"
+\endcode
+
+This allows all components defined in the directory \c path to be used in
+the component where this statement appears.
+
+In this case, and only this case, it is not necessary for the module directory to include
+a \c qmldir file, nor is it necessary to provide a version qualifier. The basis of this is
+that the files in the subdirectory are assumed to be packaged with the importer, and therefore
+they form a single versioned unit.
+
+
+\section2 Remote QML Files
+
+To import types defined in QML file at arbitrary network locations, a quoted absolute URL is used:
+
+\code
+import "http://url/.../" 1.0
+\endcode
+
+This works the same as for relative directory imports, except that the target location \e must
+include a \c qmldir file, and a version qualifier must be given.
+
+
+\section2 The \c qmldir File
+
+Directories of installed files and remote content must include a file \c qmldir which specifies the
+mapping from all type names to versioned QML files. It is a list of lines of the form:
+
+\code
+# <Comment>
+<TypeName> <InitialVersion> <File>
+\endcode
+
+<TypeName> is the type being made available; <InitialVersion> is a version
+number like \c 4.0; <File> is the (relative)
+file name of the QML file defining the type.
+
+The same type can be provided by different files in different versions, in which
+case later earlier versions (eg. 1.2) must precede earlier versions (eg. 1.0),
+since the \e first name-version match is used.
+
+Installed files do not need to import the module of which they are a part, as they can refer
+to the other QML files in the module as relative (local) files.
+
+Installed and remote files \e must be referred to by version information described above,
+local files \e may have it.
+
+The versioning system ensures that a given QML file will work regardless of the version
+of installed software, since a versioned import \e only imports types for that version,
+leaving other identifiers available, even if the actual installed version might otherwise
+use those identifiers.
+
+
+\section1 Namespaces - Named Imports
+
+When importing content it by default imports types into the global namespace.
+You may choose to import the module into another namespace, either to allow identically-named
+types to be referenced, or purely for readability.
+
+To import a module into a namespace:
+
+\code
+import Qt 4.6 as TheQtLibrary
+\endcode
+
+Types from Qt 4.6 may then be used, but only by qualifying them with the namespace:
+
+\code
+TheQtLibrary.Rectangle { ... }
+\endcode
+
+Multiple modules can be imported into the same namespace in the same way that multiple
+modules can be imported into the global namespace:
+
+\code
+import Qt 4.6 as Nokia
+import Ovi 1.0 as Nokia
+\endcode
+*/
+
+/*
+
+See original requirement QT-558.
+
+*/
diff --git a/doc/src/declarative/network.qdoc b/doc/src/declarative/network.qdoc
new file mode 100644
index 0000000000..e642257469
--- /dev/null
+++ b/doc/src/declarative/network.qdoc
@@ -0,0 +1,167 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qdeclarativenetwork.html
+\title Network Transparency
+
+QML supports network transparency by using URLs (rather than file names) for all
+references from a QML document to other content:
+
+\qml
+Image {
+ source: "http://www.example.com/images/logo.png"
+}
+\endqml
+
+Since a \e relative URL is the same
+as a relative file, development of QML on regular file systems remains simple:
+
+\qml
+Image {
+ source: "images/logo.png"
+}
+\endqml
+
+Network transparency is supported throughout QML, for example:
+
+\list
+\o Scripts - the \c source property of \l Script is a URL
+\o Fonts - the \c source property of FontLoader is a URL
+\o WebViews - the \c url property of WebView (obviously!)
+\endlist
+
+Even QML types themselves can be on the network - if \l qmlviewer is used to load
+\tt http://example.com/mystuff/Hello.qml and that content refers to a type "World", this
+will load from \tt http://example.com/mystuff/World.qml just as it would for a local file.
+Any other resources that \tt Hello.qml referred to, usually by a relative URL, would
+similarly be loaded from the network.
+
+
+\section1 Relative vs. Absolute URLs
+
+Whenever an object has a property of type URL (QUrl), assigning a string to that
+property will actually assign an absolute URL - by resolving the string against
+the URL of the document where the string is used.
+
+For example, consider this content in \tt{http://example.com/mystuff/test.qml}:
+
+\qml
+Image {
+ source: "images/logo.png"
+}
+\endqml
+
+The \l Image source property will be assigned \tt{http://example.com/mystuff/images/logo.png},
+but while the QML is being developed, in say \tt C:\\User\\Fred\\Documents\\MyStuff\\test.qml, it will be assigned
+\tt C:\\User\\Fred\\Documents\\MyStuff\\images\\logo.png.
+
+If the string assigned to a URL is already an absolute URL, then "resolving" does
+not change it and the URL is assigned directly.
+
+
+\section1 Progressive Loading
+
+Because of the declarative nature of QML and the asynchronous nature of network resources,
+objects which reference network resource generally change state as the network resource loads.
+For example, an Image with a network source will initially have
+a \c width and \c height of 0, a \c status of \c Loading, and a \c progress of 0.0.
+While the content loads, the \c progress will increase until
+the content is fully loaded from the network,
+at which point the \c width and \c height become the content size, the \c status becomes \c Ready, and the \c progress reaches 1.0.
+Applications can bind to these changing states to provide visual progress indicators where appropriate, or simply
+bind to the \c width and \c height as if the content was a local file, adapting as those bound values change.
+
+Note that when objects reference local files they immediately have the \c Ready status, but applications wishing
+to remain network transparent should not rely on this. Future versions of QML may also use asynchronous local file I/O
+to improve performance.
+
+
+\section1 Accessing Network Services
+
+QML types such as XmlListModel, and JavaScript classes like XMLHttpRequest are intended
+entirely for accessing network services, which usually respond with references to
+content by URLs that can then be used directly in QML. For example, using these facilities
+to access an on-line photography service would provide the QML application with URLs to
+photographs, which can be directly set on an \l Image \c source property.
+
+See the \tt demos/declarative/flickr for a real demonstration of this.
+
+
+\section1 Configuring the Network Access Manager
+
+All network access from QML is managed by a QNetworkAccessManager set on the QDeclarativeEngine which executes the QML.
+By default, this is an unmodified Qt QNetworkAccessManager. You may set a different manager using
+QDeclarativeEngine::setNetworkAccessManager() as appropriate for the policies of your application.
+For example, the \l qmlviewer tool sets a new QNetworkAccessManager which
+trusts HTTP Expiry headers to avoid network cache checks, allows HTTP Pipelining, adds a persistent HTTP CookieJar,
+a simple disk cache, and supports proxy settings.
+
+
+\section1 QRC Resources
+
+One of the URL schemes built into Qt is the "qrc" scheme. This allows content to be compiled into
+the executable using \l{The Qt Resource System}. Using this, an executable can reference QML content
+that is compiled into the executable:
+
+\code
+ QDeclarativeView *canvas = new QDeclarativeView;
+ canvas->setUrl(QUrl("qrc:/dial.qml"));
+\endcode
+
+The content itself can then use relative URLs, and so be transparently unaware that the content is
+compiled into the executable.
+
+
+\section1 Limitations
+
+The \c import statement is only network transparent if it has an "as" clause.
+
+More specifically:
+\list
+\o \c{import "dir"} only works on local file systems
+\o \c{import libraryUri} only works on local file systems
+\o \c{import "dir" as D} works network transparently
+\o \c{import libraryUrl as U} works network transparently
+\endlist
+
+
+*/
diff --git a/doc/src/declarative/pics/3d-axis.png b/doc/src/declarative/pics/3d-axis.png
new file mode 100644
index 0000000000..1a587ffd28
--- /dev/null
+++ b/doc/src/declarative/pics/3d-axis.png
Binary files differ
diff --git a/doc/src/declarative/pics/3d-rotation-axis.png b/doc/src/declarative/pics/3d-rotation-axis.png
new file mode 100644
index 0000000000..b9402156f0
--- /dev/null
+++ b/doc/src/declarative/pics/3d-rotation-axis.png
Binary files differ
diff --git a/doc/src/declarative/pics/BorderImage.png b/doc/src/declarative/pics/BorderImage.png
new file mode 100644
index 0000000000..651dd8aa76
--- /dev/null
+++ b/doc/src/declarative/pics/BorderImage.png
Binary files differ
diff --git a/doc/src/declarative/pics/ListViewHighlight.png b/doc/src/declarative/pics/ListViewHighlight.png
new file mode 100644
index 0000000000..02bf51dabf
--- /dev/null
+++ b/doc/src/declarative/pics/ListViewHighlight.png
Binary files differ
diff --git a/doc/src/declarative/pics/ListViewHorizontal.png b/doc/src/declarative/pics/ListViewHorizontal.png
new file mode 100644
index 0000000000..4633a0e151
--- /dev/null
+++ b/doc/src/declarative/pics/ListViewHorizontal.png
Binary files differ
diff --git a/doc/src/declarative/pics/ListViewSections.png b/doc/src/declarative/pics/ListViewSections.png
new file mode 100644
index 0000000000..9270126985
--- /dev/null
+++ b/doc/src/declarative/pics/ListViewSections.png
Binary files differ
diff --git a/doc/src/declarative/pics/ListViewVertical.png b/doc/src/declarative/pics/ListViewVertical.png
new file mode 100644
index 0000000000..e0b23d95e1
--- /dev/null
+++ b/doc/src/declarative/pics/ListViewVertical.png
Binary files differ
diff --git a/doc/src/declarative/pics/anatomy-component.png b/doc/src/declarative/pics/anatomy-component.png
new file mode 100644
index 0000000000..70ed983d9a
--- /dev/null
+++ b/doc/src/declarative/pics/anatomy-component.png
Binary files differ
diff --git a/doc/src/declarative/pics/anchors.svg b/doc/src/declarative/pics/anchors.svg
new file mode 100644
index 0000000000..08b00ed6e3
--- /dev/null
+++ b/doc/src/declarative/pics/anchors.svg
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg1910"
+ sodipodi:version="0.32"
+ inkscape:version="0.44.1"
+ inkscape:export-filename="/home/mbrasser/work/Kinetic/ngui/doc/src/pics/anchors_example2.png"
+ inkscape:export-xdpi="189.65207"
+ inkscape:export-ydpi="189.65207"
+ sodipodi:docbase="/home/mbrasser/work/Kinetic/ngui/doc/src/pics"
+ sodipodi:docname="anchors.svg">
+ <defs
+ id="defs1912" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.979899"
+ inkscape:cx="431.57095"
+ inkscape:cy="413.38853"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ inkscape:window-width="1386"
+ inkscape:window-height="971"
+ inkscape:window-x="0"
+ inkscape:window-y="0" />
+ <metadata
+ id="metadata1915">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <rect
+ style="opacity:1;fill:none;fill-opacity:1;stroke:black;stroke-width:0.52033526;stroke-miterlimit:4;stroke-dasharray:1.04067054, 0.52033527;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect2807"
+ width="36.245155"
+ height="32.204544"
+ x="390.23157"
+ y="574.62024" />
+ <rect
+ style="opacity:1;fill:none;fill-opacity:1;stroke:black;stroke-width:0.44547796;stroke-miterlimit:4;stroke-dasharray:0.89095592, 0.44547796;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect2809"
+ width="59.048447"
+ height="14.601732"
+ x="430.82993"
+ y="574.9483" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="399.40982"
+ y="594.76312"
+ id="text3696"><tspan
+ sodipodi:role="line"
+ id="tspan3698"
+ x="399.40982"
+ y="594.76312">pic</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="445.84048"
+ y="586.5423"
+ id="text3700"><tspan
+ sodipodi:role="line"
+ id="tspan3702"
+ x="445.84048"
+ y="586.5423">label</tspan></text>
+ </g>
+</svg>
diff --git a/doc/src/declarative/pics/animatedimageitem.gif b/doc/src/declarative/pics/animatedimageitem.gif
new file mode 100644
index 0000000000..85c3cb5609
--- /dev/null
+++ b/doc/src/declarative/pics/animatedimageitem.gif
Binary files differ
diff --git a/doc/src/declarative/pics/axisrotation.png b/doc/src/declarative/pics/axisrotation.png
new file mode 100644
index 0000000000..4cddcdfcaf
--- /dev/null
+++ b/doc/src/declarative/pics/axisrotation.png
Binary files differ
diff --git a/doc/src/declarative/pics/blur_example.png b/doc/src/declarative/pics/blur_example.png
new file mode 100644
index 0000000000..763b11224a
--- /dev/null
+++ b/doc/src/declarative/pics/blur_example.png
Binary files differ
diff --git a/doc/src/declarative/pics/content.png b/doc/src/declarative/pics/content.png
new file mode 100644
index 0000000000..47a98ac9a5
--- /dev/null
+++ b/doc/src/declarative/pics/content.png
Binary files differ
diff --git a/doc/src/declarative/pics/declarative-adv-tutorial1.png b/doc/src/declarative/pics/declarative-adv-tutorial1.png
new file mode 100644
index 0000000000..1699ab0e4d
--- /dev/null
+++ b/doc/src/declarative/pics/declarative-adv-tutorial1.png
Binary files differ
diff --git a/doc/src/declarative/pics/declarative-adv-tutorial2.png b/doc/src/declarative/pics/declarative-adv-tutorial2.png
new file mode 100644
index 0000000000..ba27c442ce
--- /dev/null
+++ b/doc/src/declarative/pics/declarative-adv-tutorial2.png
Binary files differ
diff --git a/doc/src/declarative/pics/declarative-adv-tutorial3.png b/doc/src/declarative/pics/declarative-adv-tutorial3.png
new file mode 100644
index 0000000000..d500434d14
--- /dev/null
+++ b/doc/src/declarative/pics/declarative-adv-tutorial3.png
Binary files differ
diff --git a/doc/src/declarative/pics/declarative-adv-tutorial4.gif b/doc/src/declarative/pics/declarative-adv-tutorial4.gif
new file mode 100644
index 0000000000..827458daa5
--- /dev/null
+++ b/doc/src/declarative/pics/declarative-adv-tutorial4.gif
Binary files differ
diff --git a/doc/src/declarative/pics/declarative-qmlfocus1.png b/doc/src/declarative/pics/declarative-qmlfocus1.png
new file mode 100644
index 0000000000..fd05146d8a
--- /dev/null
+++ b/doc/src/declarative/pics/declarative-qmlfocus1.png
Binary files differ
diff --git a/doc/src/declarative/pics/declarative-qmlfocus2.png b/doc/src/declarative/pics/declarative-qmlfocus2.png
new file mode 100644
index 0000000000..a946e2c49f
--- /dev/null
+++ b/doc/src/declarative/pics/declarative-qmlfocus2.png
Binary files differ
diff --git a/doc/src/declarative/pics/declarative-qmlfocus3.png b/doc/src/declarative/pics/declarative-qmlfocus3.png
new file mode 100644
index 0000000000..ba55f76098
--- /dev/null
+++ b/doc/src/declarative/pics/declarative-qmlfocus3.png
Binary files differ
diff --git a/doc/src/declarative/pics/declarative-qmlfocus4.png b/doc/src/declarative/pics/declarative-qmlfocus4.png
new file mode 100644
index 0000000000..e21f2a6aa9
--- /dev/null
+++ b/doc/src/declarative/pics/declarative-qmlfocus4.png
Binary files differ
diff --git a/doc/src/declarative/pics/dial-example.gif b/doc/src/declarative/pics/dial-example.gif
new file mode 100644
index 0000000000..4e90ba91c4
--- /dev/null
+++ b/doc/src/declarative/pics/dial-example.gif
Binary files differ
diff --git a/doc/src/declarative/pics/edge1.png b/doc/src/declarative/pics/edge1.png
new file mode 100644
index 0000000000..f4bc16d01f
--- /dev/null
+++ b/doc/src/declarative/pics/edge1.png
Binary files differ
diff --git a/doc/src/declarative/pics/edge2.png b/doc/src/declarative/pics/edge2.png
new file mode 100644
index 0000000000..71bda8eb0b
--- /dev/null
+++ b/doc/src/declarative/pics/edge2.png
Binary files differ
diff --git a/doc/src/declarative/pics/edge3.png b/doc/src/declarative/pics/edge3.png
new file mode 100644
index 0000000000..51bb894c3e
--- /dev/null
+++ b/doc/src/declarative/pics/edge3.png
Binary files differ
diff --git a/doc/src/declarative/pics/edge4.png b/doc/src/declarative/pics/edge4.png
new file mode 100644
index 0000000000..aee3bd109f
--- /dev/null
+++ b/doc/src/declarative/pics/edge4.png
Binary files differ
diff --git a/doc/src/declarative/pics/edges.png b/doc/src/declarative/pics/edges.png
new file mode 100644
index 0000000000..211b1019a4
--- /dev/null
+++ b/doc/src/declarative/pics/edges.png
Binary files differ
diff --git a/doc/src/declarative/pics/edges.svg b/doc/src/declarative/pics/edges.svg
new file mode 100644
index 0000000000..25698ca40f
--- /dev/null
+++ b/doc/src/declarative/pics/edges.svg
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.44.1"
+ sodipodi:docbase="/home/mbrasser"
+ sodipodi:docname="edges.svg">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="Arrow1Mstart"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow1Mstart"
+ style="overflow:visible">
+ <path
+ id="path3850"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+ transform="scale(0.4) translate(10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lstart"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow1Lstart"
+ style="overflow:visible">
+ <path
+ id="path3856"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+ transform="scale(0.8) translate(12.5,0)" />
+ </marker>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="2.8583315"
+ inkscape:cx="372.04724"
+ inkscape:cy="596.15198"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ inkscape:window-width="1279"
+ inkscape:window-height="969"
+ inkscape:window-x="0"
+ inkscape:window-y="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <rect
+ style="opacity:1;fill:#0ca9fa;fill-opacity:1;stroke:black;stroke-width:0.04639034;stroke-miterlimit:4;stroke-dasharray:0.09278069, 0.04639034;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect1872"
+ width="33.656742"
+ height="39.808346"
+ x="208.86543"
+ y="390.22763"
+ rx="5"
+ ry="5" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 225.51888,380.99149 C 225.51888,439.06733 225.86873,439.06733 225.86873,439.06733"
+ id="path2760" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 242.97392,380.99149 C 242.97392,439.06733 243.32377,439.06733 243.32377,439.06733"
+ id="path3647" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 208.33832,380.99149 C 208.33832,439.06733 208.68817,439.06733 208.68817,439.06733"
+ id="path3649" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 195.91848,409.67956 C 256.44329,409.67956 256.09344,409.67956 256.09344,409.67956"
+ id="path3651" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 195.91848,429.97112 C 256.44329,429.97112 256.09344,429.97112 256.09344,429.97112"
+ id="path3653" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 195.91848,390.78742 C 256.44329,390.78742 256.09344,390.78742 256.09344,390.78742"
+ id="path3655" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="258.54242"
+ y="393.58627"
+ id="text3657"><tspan
+ sodipodi:role="line"
+ id="tspan3659"
+ x="258.54242"
+ y="393.58627"
+ style="font-size:10px">Top</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="258.78955"
+ y="412.28455"
+ id="text3661"><tspan
+ sodipodi:role="line"
+ id="tspan3663"
+ x="258.78955"
+ y="412.28455"
+ style="font-size:10px">VerticalCenter</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="260.18896"
+ y="433.27582"
+ id="text3665"><tspan
+ sodipodi:role="line"
+ id="tspan3667"
+ x="260.18896"
+ y="433.27582"
+ style="font-size:10px">Bottom</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="198.96443"
+ y="376.24954"
+ id="text3669"><tspan
+ sodipodi:role="line"
+ id="tspan3671"
+ x="198.96443"
+ y="376.24954"
+ style="font-size:10px">Left</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="230.55408"
+ y="375.39383"
+ id="text3673"><tspan
+ sodipodi:role="line"
+ id="tspan3675"
+ x="230.55408"
+ y="375.39383"
+ style="font-size:10px">Right</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="186.71951"
+ y="355.25827"
+ id="text3677"><tspan
+ sodipodi:role="line"
+ id="tspan3679"
+ x="186.71951"
+ y="355.25827"
+ style="font-size:10px">HorizontalCenter</tspan></text>
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Mstart)"
+ d="M 224.2567,375.39382 C 227.40539,356.85154 227.75525,357.20139 227.75525,357.20139"
+ id="path3681" />
+ </g>
+</svg>
diff --git a/doc/src/declarative/pics/edges_examples.svg b/doc/src/declarative/pics/edges_examples.svg
new file mode 100644
index 0000000000..31e9901f07
--- /dev/null
+++ b/doc/src/declarative/pics/edges_examples.svg
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg3885"
+ sodipodi:version="0.32"
+ inkscape:version="0.44.1"
+ inkscape:export-filename="/home/mbrasser/edge4.png"
+ inkscape:export-xdpi="189.65207"
+ inkscape:export-ydpi="189.65207"
+ sodipodi:docbase="/home/mbrasser/work/Kinetic/ngui/doc/src/pics"
+ sodipodi:docname="edges_examples.svg">
+ <defs
+ id="defs3887" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="2"
+ inkscape:cx="162.62912"
+ inkscape:cy="591.92069"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ inkscape:window-width="928"
+ inkscape:window-height="624"
+ inkscape:window-x="0"
+ inkscape:window-y="495" />
+ <metadata
+ id="metadata3890">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <rect
+ style="opacity:1;fill:#0ca9fa;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect3893"
+ width="50"
+ height="50"
+ x="100"
+ y="414.36218" />
+ <rect
+ style="opacity:1;fill:#fa0c2a;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect3895"
+ width="104"
+ height="50"
+ x="150"
+ y="414.36218" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="109"
+ y="443.65125"
+ id="text3897"><tspan
+ sodipodi:role="line"
+ id="tspan3899"
+ x="109"
+ y="443.65125">rect1</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="186.54297"
+ y="443.65125"
+ id="text3901"><tspan
+ sodipodi:role="line"
+ id="tspan3903"
+ x="186.54297"
+ y="443.65125">rect2</tspan></text>
+ <rect
+ style="opacity:1;fill:#0ca9fa;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect3905"
+ width="50"
+ height="50"
+ x="254"
+ y="414.36218" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="263"
+ y="443.65125"
+ id="text3907"><tspan
+ sodipodi:role="line"
+ id="tspan3909"
+ x="263"
+ y="443.65125">rect3</tspan></text>
+ </g>
+</svg>
diff --git a/doc/src/declarative/pics/edges_qml.png b/doc/src/declarative/pics/edges_qml.png
new file mode 100644
index 0000000000..73f22f92b3
--- /dev/null
+++ b/doc/src/declarative/pics/edges_qml.png
Binary files differ
diff --git a/doc/src/declarative/pics/edges_qml.svg b/doc/src/declarative/pics/edges_qml.svg
new file mode 100644
index 0000000000..1814ec6b20
--- /dev/null
+++ b/doc/src/declarative/pics/edges_qml.svg
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.44.1"
+ sodipodi:docbase="/home/mbrasser/work/Kinetic/ngui/doc/src/pics"
+ sodipodi:docname="edges_qml.svg"
+ inkscape:export-filename="/home/mbrasser/edges_qml.png"
+ inkscape:export-xdpi="284.45999"
+ inkscape:export-ydpi="284.45999">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="Arrow1Mstart"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow1Mstart"
+ style="overflow:visible">
+ <path
+ id="path3850"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+ transform="scale(0.4) translate(10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lstart"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow1Lstart"
+ style="overflow:visible">
+ <path
+ id="path3856"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+ transform="scale(0.8) translate(12.5,0)" />
+ </marker>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="2.8583315"
+ inkscape:cx="372.04724"
+ inkscape:cy="596.15198"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ inkscape:window-width="1279"
+ inkscape:window-height="969"
+ inkscape:window-x="0"
+ inkscape:window-y="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <rect
+ style="opacity:1;fill:#0ca9fa;fill-opacity:1;stroke:black;stroke-width:0.04639034;stroke-miterlimit:4;stroke-dasharray:0.09278069, 0.04639034;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect1872"
+ width="33.656742"
+ height="39.808346"
+ x="208.86543"
+ y="390.22763"
+ rx="5"
+ ry="5" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 225.51888,380.99149 C 225.51888,439.06733 225.86873,439.06733 225.86873,439.06733"
+ id="path2760" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 242.97392,380.99149 C 242.97392,439.06733 243.32377,439.06733 243.32377,439.06733"
+ id="path3647" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 208.33832,380.99149 C 208.33832,439.06733 208.68817,439.06733 208.68817,439.06733"
+ id="path3649" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 195.91848,409.67956 C 256.44329,409.67956 256.09344,409.67956 256.09344,409.67956"
+ id="path3651" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 195.91848,429.97112 C 256.44329,429.97112 256.09344,429.97112 256.09344,429.97112"
+ id="path3653" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 195.91848,390.78742 C 256.44329,390.78742 256.09344,390.78742 256.09344,390.78742"
+ id="path3655" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="258.54242"
+ y="393.58627"
+ id="text3657"><tspan
+ sodipodi:role="line"
+ id="tspan3659"
+ x="258.54242"
+ y="393.58627"
+ style="font-size:10px">top</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="258.78955"
+ y="412.28455"
+ id="text3661"><tspan
+ sodipodi:role="line"
+ id="tspan3663"
+ x="258.78955"
+ y="412.28455"
+ style="font-size:10px">verticalCenter</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="260.18896"
+ y="433.27582"
+ id="text3665"><tspan
+ sodipodi:role="line"
+ id="tspan3667"
+ x="260.18896"
+ y="433.27582"
+ style="font-size:10px">bottom</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="200.96443"
+ y="376.24954"
+ id="text3669"><tspan
+ sodipodi:role="line"
+ id="tspan3671"
+ x="200.96443"
+ y="376.24954"
+ style="font-size:10px">left</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="232.55408"
+ y="375.39383"
+ id="text3673"><tspan
+ sodipodi:role="line"
+ id="tspan3675"
+ x="232.55408"
+ y="375.39383"
+ style="font-size:10px">right</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="190.71951"
+ y="355.25827"
+ id="text3677"><tspan
+ sodipodi:role="line"
+ id="tspan3679"
+ x="190.71951"
+ y="355.25827"
+ style="font-size:10px">horizontalCenter</tspan></text>
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Mstart);stroke-opacity:1"
+ d="M 226.2567,375.39382 C 229.40539,356.85154 229.75525,357.20139 229.75525,357.20139"
+ id="path3681" />
+ </g>
+</svg>
diff --git a/doc/src/declarative/pics/flickable.gif b/doc/src/declarative/pics/flickable.gif
new file mode 100644
index 0000000000..f7a3319496
--- /dev/null
+++ b/doc/src/declarative/pics/flickable.gif
Binary files differ
diff --git a/doc/src/declarative/pics/flipable.gif b/doc/src/declarative/pics/flipable.gif
new file mode 100644
index 0000000000..6386f06b5d
--- /dev/null
+++ b/doc/src/declarative/pics/flipable.gif
Binary files differ
diff --git a/doc/src/declarative/pics/gradient.png b/doc/src/declarative/pics/gradient.png
new file mode 100644
index 0000000000..5eefdd2031
--- /dev/null
+++ b/doc/src/declarative/pics/gradient.png
Binary files differ
diff --git a/doc/src/declarative/pics/gridLayout_example.png b/doc/src/declarative/pics/gridLayout_example.png
new file mode 100644
index 0000000000..6b120e9639
--- /dev/null
+++ b/doc/src/declarative/pics/gridLayout_example.png
Binary files differ
diff --git a/doc/src/declarative/pics/gridview.png b/doc/src/declarative/pics/gridview.png
new file mode 100644
index 0000000000..37268932d3
--- /dev/null
+++ b/doc/src/declarative/pics/gridview.png
Binary files differ
diff --git a/doc/src/declarative/pics/highlight.gif b/doc/src/declarative/pics/highlight.gif
new file mode 100644
index 0000000000..fbef256f54
--- /dev/null
+++ b/doc/src/declarative/pics/highlight.gif
Binary files differ
diff --git a/doc/src/declarative/pics/horizontalpositioner_example.png b/doc/src/declarative/pics/horizontalpositioner_example.png
new file mode 100644
index 0000000000..42f90ec7ae
--- /dev/null
+++ b/doc/src/declarative/pics/horizontalpositioner_example.png
Binary files differ
diff --git a/doc/src/declarative/pics/margins_qml.png b/doc/src/declarative/pics/margins_qml.png
new file mode 100644
index 0000000000..d7d73a3fc9
--- /dev/null
+++ b/doc/src/declarative/pics/margins_qml.png
Binary files differ
diff --git a/doc/src/declarative/pics/margins_qml.svg b/doc/src/declarative/pics/margins_qml.svg
new file mode 100644
index 0000000000..1f0ff022bb
--- /dev/null
+++ b/doc/src/declarative/pics/margins_qml.svg
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.44.1"
+ sodipodi:docbase="/home/mbrasser/work/Kinetic/ngui/doc/src/pics"
+ sodipodi:docname="margins_qml.svg"
+ inkscape:export-filename="/home/mbrasser/edges_qml.png"
+ inkscape:export-xdpi="284.45999"
+ inkscape:export-ydpi="284.45999">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="Arrow1Send"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow1Send"
+ style="overflow:visible;">
+ <path
+ id="path2976"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
+ transform="scale(0.2) rotate(180) translate(6,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Sstart"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow1Sstart"
+ style="overflow:visible">
+ <path
+ id="path2979"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+ transform="scale(0.2) translate(6,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Mstart"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow1Mstart"
+ style="overflow:visible">
+ <path
+ id="path3850"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+ transform="scale(0.4) translate(10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lstart"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow1Lstart"
+ style="overflow:visible">
+ <path
+ id="path3856"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+ transform="scale(0.8) translate(12.5,0)" />
+ </marker>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="2.8583315"
+ inkscape:cx="372.04724"
+ inkscape:cy="596.15198"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ inkscape:window-width="1279"
+ inkscape:window-height="969"
+ inkscape:window-x="0"
+ inkscape:window-y="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <rect
+ style="opacity:1;fill:#0ca9fa;fill-opacity:1;stroke:black;stroke-width:0.04639034;stroke-miterlimit:4;stroke-dasharray:0.09278069, 0.04639034;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect1872"
+ width="33.656742"
+ height="39.808346"
+ x="208.86543"
+ y="390.22763"
+ rx="5"
+ ry="5" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.02602077;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.02602088, 1.02602088;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 252.98692,377.00435 C 252.98692,443.05433 253.31077,443.05433 253.31077,443.05433"
+ id="path3647" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.02601969;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.02602007, 1.02602007;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 198.35134,377.00433 C 198.35134,443.05431 198.67515,443.05431 198.67515,443.05431"
+ id="path3649" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.02421367;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.02421381, 1.02421381;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 193.94282,437.97112 C 257.43421,437.97112 257.06721,437.97112 257.06721,437.97112"
+ id="path3653" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.02421367;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.02421381, 1.02421381;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 193.94282,380.78742 C 257.43421,380.78742 257.06721,380.78742 257.06721,380.78742"
+ id="path3655" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="260.29169"
+ y="388.78741"
+ id="text1911"><tspan
+ sodipodi:role="line"
+ id="tspan1913"
+ x="260.29169"
+ y="388.78741"
+ style="font-size:10px">topMargin</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="259.65204"
+ y="437.27798"
+ id="text1915"><tspan
+ sodipodi:role="line"
+ id="tspan1917"
+ x="259.65204"
+ y="437.27798"
+ style="font-size:10px">bottomMargin</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="170.07939"
+ y="454.4209"
+ id="text1919"><tspan
+ sodipodi:role="line"
+ id="tspan1921"
+ x="170.07939"
+ y="454.4209"
+ style="font-size:10px">leftMargin</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="228.47504"
+ y="454.4209"
+ id="text1923"><tspan
+ sodipodi:role="line"
+ id="tspan1925"
+ x="228.47504"
+ y="454.4209"
+ style="font-size:10px">rightMargin</tspan></text>
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:0.92020172px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Sstart);marker-end:url(#Arrow1Send);stroke-opacity:1"
+ d="M 225.6938,382.51213 C 225.6938,388.91693 225.6938,388.91693 225.6938,388.91693"
+ id="path1929" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:0.92007709px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Sstart);marker-end:url(#Arrow1Send);stroke-opacity:1"
+ d="M 225.6938,430.56703 C 225.6938,436.97192 225.6938,436.97192 225.6938,436.97192"
+ id="path3000" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Sstart);marker-mid:none;marker-end:url(#Arrow1Send);stroke-opacity:1"
+ d="M 201.16631,410.1318 C 207.81355,410.1318 207.81355,410.1318 207.81355,410.1318"
+ id="path3002" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Sstart);marker-mid:none;marker-end:url(#Arrow1Send);stroke-opacity:1"
+ d="M 244.02348,410.1318 C 250.67072,410.1318 250.67072,410.1318 250.67072,410.1318"
+ id="path3889" />
+ </g>
+</svg>
diff --git a/doc/src/declarative/pics/particles.gif b/doc/src/declarative/pics/particles.gif
new file mode 100644
index 0000000000..763a8a8616
--- /dev/null
+++ b/doc/src/declarative/pics/particles.gif
Binary files differ
diff --git a/doc/src/declarative/pics/pathview.gif b/doc/src/declarative/pics/pathview.gif
new file mode 100644
index 0000000000..4052eb264b
--- /dev/null
+++ b/doc/src/declarative/pics/pathview.gif
Binary files differ
diff --git a/doc/src/declarative/pics/positioner-add.gif b/doc/src/declarative/pics/positioner-add.gif
new file mode 100644
index 0000000000..86e9247073
--- /dev/null
+++ b/doc/src/declarative/pics/positioner-add.gif
Binary files differ
diff --git a/doc/src/declarative/pics/positioner-move.gif b/doc/src/declarative/pics/positioner-move.gif
new file mode 100644
index 0000000000..1825c2282b
--- /dev/null
+++ b/doc/src/declarative/pics/positioner-move.gif
Binary files differ
diff --git a/doc/src/declarative/pics/positioner-remove.gif b/doc/src/declarative/pics/positioner-remove.gif
new file mode 100644
index 0000000000..708651190c
--- /dev/null
+++ b/doc/src/declarative/pics/positioner-remove.gif
Binary files differ
diff --git a/doc/src/declarative/pics/propanim.gif b/doc/src/declarative/pics/propanim.gif
new file mode 100644
index 0000000000..f86406ee7f
--- /dev/null
+++ b/doc/src/declarative/pics/propanim.gif
Binary files differ
diff --git a/doc/src/declarative/pics/qml-context-object.png b/doc/src/declarative/pics/qml-context-object.png
new file mode 100644
index 0000000000..1b91aff651
--- /dev/null
+++ b/doc/src/declarative/pics/qml-context-object.png
Binary files differ
diff --git a/doc/src/declarative/pics/qml-context-tree.png b/doc/src/declarative/pics/qml-context-tree.png
new file mode 100644
index 0000000000..6bba5f4f05
--- /dev/null
+++ b/doc/src/declarative/pics/qml-context-tree.png
Binary files differ
diff --git a/doc/src/declarative/pics/qml-context.png b/doc/src/declarative/pics/qml-context.png
new file mode 100644
index 0000000000..bdf2ecd2c6
--- /dev/null
+++ b/doc/src/declarative/pics/qml-context.png
Binary files differ
diff --git a/doc/src/declarative/pics/qml-scope.png b/doc/src/declarative/pics/qml-scope.png
new file mode 100644
index 0000000000..be025c8c3d
--- /dev/null
+++ b/doc/src/declarative/pics/qml-scope.png
Binary files differ
diff --git a/doc/src/declarative/pics/qmldebugger-creator.png b/doc/src/declarative/pics/qmldebugger-creator.png
new file mode 100644
index 0000000000..da1e22d7c3
--- /dev/null
+++ b/doc/src/declarative/pics/qmldebugger-creator.png
Binary files differ
diff --git a/doc/src/declarative/pics/qtlogo.png b/doc/src/declarative/pics/qtlogo.png
new file mode 100644
index 0000000000..399bd0b1d9
--- /dev/null
+++ b/doc/src/declarative/pics/qtlogo.png
Binary files differ
diff --git a/doc/src/declarative/pics/rect-smooth.png b/doc/src/declarative/pics/rect-smooth.png
new file mode 100644
index 0000000000..abbb0a96a7
--- /dev/null
+++ b/doc/src/declarative/pics/rect-smooth.png
Binary files differ
diff --git a/doc/src/declarative/pics/reflection_example.png b/doc/src/declarative/pics/reflection_example.png
new file mode 100644
index 0000000000..fd9bb48022
--- /dev/null
+++ b/doc/src/declarative/pics/reflection_example.png
Binary files differ
diff --git a/doc/src/declarative/pics/repeater-index.png b/doc/src/declarative/pics/repeater-index.png
new file mode 100644
index 0000000000..3dbe6d0571
--- /dev/null
+++ b/doc/src/declarative/pics/repeater-index.png
Binary files differ
diff --git a/doc/src/declarative/pics/repeater.png b/doc/src/declarative/pics/repeater.png
new file mode 100644
index 0000000000..973df27a74
--- /dev/null
+++ b/doc/src/declarative/pics/repeater.png
Binary files differ
diff --git a/doc/src/declarative/pics/scalegrid.svg b/doc/src/declarative/pics/scalegrid.svg
new file mode 100644
index 0000000000..e386f3d7bb
--- /dev/null
+++ b/doc/src/declarative/pics/scalegrid.svg
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.44.1"
+ sodipodi:docbase="/home/mbrasser/work/Kinetic/ngui/doc/src/pics"
+ sodipodi:docname="scalegrid.svg"
+ inkscape:export-filename="/home/mbrasser/work/Kinetic/ngui/doc/src/pics/scalegrid.png"
+ inkscape:export-xdpi="189.65207"
+ inkscape:export-ydpi="189.65207">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="50"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="3.2163554"
+ inkscape:cx="173.89302"
+ inkscape:cy="703.69531"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:grid-bbox="false"
+ inkscape:guide-bbox="false"
+ inkscape:window-width="1409"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <rect
+ style="opacity:1;fill:red;fill-opacity:1;stroke:none;stroke-width:3;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect1876"
+ width="45.104"
+ height="45.137001"
+ x="119.16868"
+ y="301.00308"
+ rx="5"
+ ry="5" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:0.3965202;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.79304035, 0.39652018;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 157.02483,295.52571 C 157.02483,352.04784 157.02483,352.04784 157.02483,352.04784"
+ id="path2766" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:0.39652267;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.79304534, 0.39652268;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 126.2,295.64284 C 126.2,352.16567 126.2,352.16567 126.2,352.16567"
+ id="path2768" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:0.39652267;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.79304534, 0.39652268;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 169.05321,308.25967 C 112.53038,308.25967 112.53038,308.25967 112.53038,308.25967"
+ id="path2770" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:0.39652267;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.79304534, 0.39652268;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 169.08024,339.77238 C 112.55741,339.77238 112.55741,339.77238 112.55741,339.77238"
+ id="path2772" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Black"
+ x="115.2857"
+ y="303.60583"
+ id="text2774"><tspan
+ sodipodi:role="line"
+ id="tspan2776"
+ x="115.2857"
+ y="303.60583">1</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="137.19142"
+ y="303.60583"
+ id="text2782"><tspan
+ sodipodi:role="line"
+ id="tspan2784"
+ x="137.19142"
+ y="303.60583"
+ style="font-family:Arial Black">2</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial Black"
+ x="161.56842"
+ y="303.45935"
+ id="text2786"><tspan
+ sodipodi:role="line"
+ id="tspan2788"
+ x="161.56842"
+ y="303.45935">3</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="114.72613"
+ y="327.00702"
+ id="text2790"><tspan
+ sodipodi:role="line"
+ id="tspan2792"
+ x="114.72613"
+ y="327.00702"
+ style="font-family:Arial Black">4</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="137.12404"
+ y="326.86053"
+ id="text2794"><tspan
+ sodipodi:role="line"
+ id="tspan2796"
+ x="137.12404"
+ y="326.86053"
+ style="font-family:Arial Black">5</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="161.49518"
+ y="326.86053"
+ id="text2798"><tspan
+ sodipodi:role="line"
+ id="tspan2800"
+ x="161.49518"
+ y="326.86053"
+ style="font-family:Arial Black">6</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="114.70855"
+ y="351.25809"
+ id="text2802"><tspan
+ sodipodi:role="line"
+ id="tspan2804"
+ x="114.70855"
+ y="351.25809"
+ style="font-family:Arial Black">7</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="137.08595"
+ y="351.1116"
+ id="text2806"><tspan
+ sodipodi:role="line"
+ id="tspan2808"
+ x="137.08595"
+ y="351.1116"
+ style="font-family:Arial Black">8</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="161.58307"
+ y="351.1116"
+ id="text2810"><tspan
+ sodipodi:role="line"
+ id="tspan2812"
+ x="161.58307"
+ y="351.1116"
+ style="font-family:Arial Black">9</tspan></text>
+ </g>
+</svg>
diff --git a/doc/src/declarative/pics/shadow_example.png b/doc/src/declarative/pics/shadow_example.png
new file mode 100644
index 0000000000..6214620f0c
--- /dev/null
+++ b/doc/src/declarative/pics/shadow_example.png
Binary files differ
diff --git a/doc/src/declarative/pics/spacing_a.png b/doc/src/declarative/pics/spacing_a.png
new file mode 100644
index 0000000000..c0fe8954c2
--- /dev/null
+++ b/doc/src/declarative/pics/spacing_a.png
Binary files differ
diff --git a/doc/src/declarative/pics/spacing_b.png b/doc/src/declarative/pics/spacing_b.png
new file mode 100644
index 0000000000..24cf640e4f
--- /dev/null
+++ b/doc/src/declarative/pics/spacing_b.png
Binary files differ
diff --git a/doc/src/declarative/pics/squish-transform.png b/doc/src/declarative/pics/squish-transform.png
new file mode 100644
index 0000000000..0eb848edc2
--- /dev/null
+++ b/doc/src/declarative/pics/squish-transform.png
Binary files differ
diff --git a/doc/src/declarative/pics/squish.png b/doc/src/declarative/pics/squish.png
new file mode 100644
index 0000000000..73bf2920de
--- /dev/null
+++ b/doc/src/declarative/pics/squish.png
Binary files differ
diff --git a/doc/src/declarative/pics/switch-example.gif b/doc/src/declarative/pics/switch-example.gif
new file mode 100644
index 0000000000..3d6582fecc
--- /dev/null
+++ b/doc/src/declarative/pics/switch-example.gif
Binary files differ
diff --git a/doc/src/declarative/pics/trivialListView.png b/doc/src/declarative/pics/trivialListView.png
new file mode 100644
index 0000000000..dc5c6b3b57
--- /dev/null
+++ b/doc/src/declarative/pics/trivialListView.png
Binary files differ
diff --git a/doc/src/declarative/pics/verticalpositioner_example.png b/doc/src/declarative/pics/verticalpositioner_example.png
new file mode 100644
index 0000000000..458dc7f481
--- /dev/null
+++ b/doc/src/declarative/pics/verticalpositioner_example.png
Binary files differ
diff --git a/doc/src/declarative/pics/verticalpositioner_transition.gif b/doc/src/declarative/pics/verticalpositioner_transition.gif
new file mode 100644
index 0000000000..ed61adb5ab
--- /dev/null
+++ b/doc/src/declarative/pics/verticalpositioner_transition.gif
Binary files differ
diff --git a/doc/src/declarative/pics/webview.png b/doc/src/declarative/pics/webview.png
new file mode 100644
index 0000000000..0d24586587
--- /dev/null
+++ b/doc/src/declarative/pics/webview.png
Binary files differ
diff --git a/doc/src/declarative/propertybinding.qdoc b/doc/src/declarative/propertybinding.qdoc
new file mode 100644
index 0000000000..5d21fd10b6
--- /dev/null
+++ b/doc/src/declarative/propertybinding.qdoc
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page propertybinding.html
+\title Property Binding
+
+Property binding is a declarative way of specifying the value of a property. Binding allows
+a property's value to be expressed as an JavaScript expression that defines the value relative
+to other property values or data accessible in the application. The property value is
+automatically kept up to date if the other properties or data values change.
+
+Property bindings are created implicitly in QML whenever a property is assigned an JavaScript
+expression. The following QML uses two property bindings to connect the size of the rectangle
+to that of \c otherItem.
+
+\code
+Rectangle {
+ width: otherItem.width
+ height: otherItem.height
+}
+\endcode
+
+QML extends a standards compliant JavaScript engine, so any valid JavaScript expression can be
+used as a property binding. Bindings can access object properties, make function calls and even
+use builtin JavaScript objects like \e {Date} and \e {Math}. Assigning a constant value to a
+property can even be thought of as a binding - afterall, a constant is a valid JavaScript
+expression! Here are some examples of more complex bindings:
+
+\code
+Rectangle {
+ Script {
+ function calculateMyHeight() {
+ return Math.max(otherItem.height, thirdItem.height);
+ }
+ }
+
+ anchors.centerIn: parent
+ width: Math.min(otherItem.width, 10)
+ height: calculateMyHeight()
+ color: { if (width > 10) "blue"; else "red" }
+}
+\endcode
+
+Being JavaScript expressions, bindings are evaluated in a scope chain. The \l {QML Scope}
+documentation covers the specifics of scoping in QML.
+
+\list
+\o When does a binding not get updated?
+\o Scope
+\o Assigning a constant/other binding clears existing binding
+\o Loops
+\o Using model data
+\endlist
+
+\section1 Binding Element
+
+The implicit binding syntax shown previously is easy to use and works perfectly for most uses
+of bindings. In some advanced cases, it is necessary to create bindings explicitly using the
+\l Binding element.
+
+For example, to bind a property exposed from C++ (\c system.brightness) to a value
+coming from QML (\c slider.value), you could use the Binding element as follows:
+\qml
+Binding {
+ target: system
+ property: "brightness"
+ value: slider.value
+}
+\endqml
+*/
+
diff --git a/doc/src/declarative/qdeclarativedebugging.qdoc b/doc/src/declarative/qdeclarativedebugging.qdoc
new file mode 100644
index 0000000000..3ef9ce7188
--- /dev/null
+++ b/doc/src/declarative/qdeclarativedebugging.qdoc
@@ -0,0 +1,120 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qdeclarativedebugging.html
+\title Debugging QML
+
+\section1 Logging
+
+\c console.log can be used to print debugging information to the console. For example:
+
+\qml
+Rectangle {
+ width: 200; height: 200
+ MouseArea {
+ anchors.fill: parent
+ onClicked: console.log("clicked")
+ }
+}
+\endqml
+
+\section1 Debugging Transitions
+
+When a transition doesn't look quite right, it can be helpful to view it in slow
+motion to see what is happening more clearly. \l {qmlviewer} provides a
+"Slow Down Animations" menu option to facilitate this.
+
+
+\section1 The QML Inspector
+
+The \c qmldebugger tool provides an experimental inspector to aid with debugging.
+It can be run as a Qt Creator plugin or as a standalone application.
+
+\section2 Qt Creator plugin
+
+The Qt Creator plugin currently builds against Qt Creator 1.3.
+
+To build the Qt Creator plugin:
+
+\list
+\o Set an environment variable \c CREATOR_SRC_DIR that points to the Qt Creator
+ source directory
+\o Set an environment variable \c CREATOR_BUILD_DIR that points to the Qt Creator
+ build directory
+\o Run \c qmake on \c $QTDIR/tools/qmldebugger/qmldebugger.pro
+\endlist
+
+This builds the plugin into your Qt Creator installation.
+
+The plugin adds a "QML Inspect" mode into Qt Creator that provides:
+
+\list
+\o An object tree showing all objects and their children
+\o The current property values for the object selected in the object tree
+ (this table is dynamically updated for all properties that have property changed
+ notifications)
+\o An expression evaluator for querying and setting values dynamically
+\o A table of watched properties (double-click on a property in the property
+ table to add it to the watch table)
+\o A graph that shows the frame rate of your application
+\endlist
+
+
+To start the debugger, open a QML project and click the "QML Inspect" mode, then click the green
+"play" button in the toolbar of the bottom-right debugger window.
+
+\image qmldebugger-creator.png
+
+
+\section2 Standalone qmldebugger tool
+
+To run the standalone \c qmldebugger tool, set an environment variable \c QML_DEBUG_SERVER_PORT
+to an available port number and run the \c qmlviewer. For example:
+
+\code
+ QML_DEBUG_SERVER_PORT=3768 qmlviewer myqmlfile.qml
+\endcode
+
+Then in another process, start the \c qmldebugger tool, enter the port number into the corresponding spinbox
+in the top right hand corner, and press the "Connect" button.
+
+*/
diff --git a/doc/src/declarative/qdeclarativedocument.qdoc b/doc/src/declarative/qdeclarativedocument.qdoc
new file mode 100644
index 0000000000..a210c98f14
--- /dev/null
+++ b/doc/src/declarative/qdeclarativedocument.qdoc
@@ -0,0 +1,190 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qdeclarativedocuments.html
+\title QML Documents
+
+A QML document is a block of QML source code. QML documents generally correspond to files
+stored on a disk or network resource, but can also be constructed directly from text data.
+
+Here is a simple QML document:
+
+\code
+import Qt 4.6
+
+Rectangle {
+ width: 240; height: 320;
+
+ resources: [
+ Component {
+ id: contactDelegate
+ Text {
+ text: modelData.firstName + " " + modelData.lastName
+ }
+ }
+ ]
+
+ ListView {
+ anchors.fill: parent
+ model: contactModel
+ delegate: contactDelegate
+ }
+}
+\endcode
+
+QML documents are always encoded in UTF-8 format.
+
+A QML document always begins with one or more import statements. To prevent elements
+introduced in later versions from affecting existing QML programs, the element types
+available within a document are controlled by the imported QML \l {Modules}. That is,
+QML is a \e versioned language.
+
+Syntactically a QML document is self contained; QML does \e not have a preprocessor that
+modifies the document prior to presentation to the QML runtime. \c import statements
+do not "include" code in the document, but instead instruct the QML runtime on how to
+resolve type references found in the document. Any type reference present in a QML
+document - such as \c Rectangle and \c ListView - including those made within an
+\l {JavaScript Block} or \l {Property Binding}s, are \e resolved based exclusively on the
+import statements. QML does not import any modules by default, so at least one \c import
+statement must be present or no elements will be available!
+
+A QML document defines a single, top-level \l {QDeclarativeComponent}{QML component}. A QML component
+is a template that is interpreted by the QML runtime to create an object with some predefined
+behaviour. As it is a template, a single QML component can be "run" multiple times to
+produce several objects, each of which are said to be \e instances of the component.
+
+Once created, instances are not dependent on the component that created them, so they can
+operate on independent data. Here is an example of a simple "button" component that is
+instantiated four times, each with a different value for its \c text property.
+
+\table
+\row
+\o
+\raw HTML
+<table><tr><td>
+\endraw
+\code
+import Qt 4.6
+
+BorderImage {
+ property alias text: textElement.text
+ width: 100; height: 30; source: "images/toolbutton.sci"
+
+ Text {
+ id: textElement
+ anchors.centerIn: parent
+ font.pointSize: 20
+ style: Text.Raised
+ color: "white"
+ }
+}
+\endcode
+\raw HTML
+</td> <td>
+\endraw
+\image anatomy-component.png
+\raw HTML
+</td> </tr> </table>
+\endraw
+\endtable
+
+In addition to the top-level component that all QML documents define, documents may also
+include additional \e inline components. Inline components are declared using the
+\l Component element, as can be seen in the first example above. Inline components share
+all the characteristics of regular top-level components and use the same \c import list as their
+containing QML document. Components are one of the most basic building blocks in QML, and are
+frequently used as "factories" by other elements. For example, the \l ListView element uses the
+\c delegate component as the template for instantiating list items - each list item is just a
+new instance of the component with the item specific data set appropriately.
+
+Like other \l {QML Elements}, the \l Component element is an object and must be assigned to a
+property. \l Component objects may also have an object id. In the first example on this page,
+the inline component is added to the \l Rectangle's \c resources list, and then
+\l {Property Binding} is used to assign the \l Component to the \l ListView's \c delegate
+property. While using property binding allows the \l Component object to be shared (for example,
+if the QML document contained multiple \l ListView's with the same delegate), in this case the
+\l Component could have been assigned directly to the \l ListView's \c delegate. The QML
+language even contains a syntactic optimization when assigning directly to a component property
+for this case where it will automatically insert the \l Component tag.
+
+These final two examples are behaviorally identical to the original document.
+
+\table
+\row
+\o
+\code
+import Qt 4.6
+
+Rectangle {
+ width: 240; height: 320;
+
+ ListView {
+ anchors.fill: parent
+ model: contactModel
+ delegate: Component {
+ Text {
+ text: modelData.firstName + " " + modelData.lastName
+ }
+ }
+ }
+}
+\endcode
+\o
+\code
+import Qt 4.6
+
+Rectangle {
+ width: 240; height: 320;
+
+ ListView {
+ anchors.fill: parent
+ model: contactModel
+ delegate: Text {
+ text: modelData.firstName + " " + modelData.lastName
+ }
+ }
+}
+\endcode
+\endtable
+
+\sa QDeclarativeComponent
+*/
diff --git a/doc/src/declarative/qdeclarativei18n.qdoc b/doc/src/declarative/qdeclarativei18n.qdoc
new file mode 100644
index 0000000000..9c10a46b6f
--- /dev/null
+++ b/doc/src/declarative/qdeclarativei18n.qdoc
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qdeclarativei18n.html
+\title QML Internationalization
+
+\section1 Overview
+
+Strings in QML can be marked for translation using the qsTr(), qsTranslate(),
+QT_TR_NOOP(), and QT_TRANSLATE_NOOP() functions.
+
+For example:
+\qml
+Text { text: qsTr("Pictures") }
+\endqml
+
+These functions are standard QtScript functions; for more details see
+QScriptEngine::installTranslatorFunctions().
+
+QML relies on the core internationalization capabilities provided by Qt. These
+capabilities are described more fully in:
+\list
+\o \l {Internationalization with Qt}
+\o \l {Qt Linguist Manual}
+\endlist
+
+You can test a translation in \l {qmlviewer} using the -translation option.
+
+\section1 Example
+
+First we create a simple QML file with text to be translated. The string
+that needs to be translated is enclosed in a call to \c qsTr().
+
+hello.qml:
+\qml
+import Qt 4.6
+
+Rectangle {
+ width: 200; height: 200
+ Text { text: qsTr("Hello"); anchors.centerIn: parent }
+}
+\endqml
+
+Next we create a translation source file using lupdate:
+\code
+lupdate hello.qml -ts hello.ts
+\endcode
+
+Then we open \c hello.ts in \l{Qt Linguist Manual} {Linguist}, provide
+a translation and create the release file \c hello.qm.
+
+Finally, we can test the translation in qmlviewer:
+\code
+qmlviewer -translation hello.qm hello.qml
+\endcode
+*/
diff --git a/doc/src/declarative/qdeclarativeintro.qdoc b/doc/src/declarative/qdeclarativeintro.qdoc
new file mode 100644
index 0000000000..4d05a8ce8b
--- /dev/null
+++ b/doc/src/declarative/qdeclarativeintro.qdoc
@@ -0,0 +1,351 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qdeclarativeintroduction.html
+\title Introduction to the QML language
+
+\tableofcontents
+
+QML is a declarative language designed to describe the user interface of a
+program: both what it looks like, and how it behaves. In QML, a user
+interface is specified as a tree of objects with properties.
+
+This introduction is meant for those with little or no programming
+experience. JavaScript is used as a scripting language in QML, so you may want
+to learn a bit more about it (\l{JavaScript: The Definitive Guide}) before diving
+deeper into QML. It's also helpful to have a basic understanding of other web
+technologies like HTML and CSS, but it's not required.
+
+\section1 Basic QML Syntax
+
+QML looks like this:
+
+\code
+Rectangle {
+ width: 200
+ height: 200
+ color: "white"
+ Image {
+ source: "pics/logo.png"
+ anchors.centerIn: parent
+ }
+}
+\endcode
+
+Objects are specified by their type, followed by a pair of braces. Object
+types always begin with a capital letter. In the above example, there are
+two objects, a \l Rectangle, and an \l Image. Between the braces, we can specify
+information about the object, such as its properties.
+
+Properties are specified as \c {property: value}. In the above example, we
+can see the Image has a property named \c source, which has been assigned the
+value \c "pics/logo.png". The property and its value are separated by a colon.
+
+Properties can be specified one-per-line:
+
+\code
+Rectangle {
+ width: 100
+ height: 100
+}
+\endcode
+
+or you can put multiple properties on a single line:
+
+\code
+Rectangle { width: 100; height: 100 }
+\endcode
+
+When multiple property/value pairs are specified on a single line, they
+must be separated by a semicolon.
+
+\section1 Expressions
+
+In addition to assigning values to properties, you can also assign
+expressions written in JavaScript.
+
+\code
+Rotation {
+ angle: 360 * 3
+}
+\endcode
+
+These expressions can include references to other objects and properties, in which case
+a \e binding is established: when the value of the expression changes, the property the
+expression has been assigned to is automatically updated to that value.
+
+\code
+Item {
+ Text {
+ id: text1
+ text: "Hello World"
+ }
+ Text {
+ id: text2
+ text: text1.text
+ }
+}
+\endcode
+
+In the example above, the \c text2 object will display the same text as \c text1. If \c text1 is changed,
+\c text2 is automatically changed to the same value.
+
+Note that to refer to other objects, we use their \e id values. (See below for more
+information on the \e id property.)
+
+\section1 QML Comments
+
+Commenting in QML is similar to JavaScript.
+\list
+\o Single line comments start with // and finish at the end of the line.
+\o Multiline comments start with /* and finish with *\/
+\endlist
+
+\quotefile doc/src/snippets/declarative/comments.qml
+
+Comments are ignored by the engine. The are useful for explaining what you
+are doing: for referring back to at a later date, or for others reading
+your QML files.
+
+Comments can also be used to prevent the execution of code, which is
+sometimes useful for tracking down problems.
+
+\code
+Text {
+ text: "Hello world!"
+ //opacity: 0.5
+}
+\endcode
+
+In the above example, the Text object will have normal opacity, since the
+line opacity: 0.5 has been turned into a comment.
+
+\section1 Properties
+\target intro-properties
+
+\section2 Property naming
+
+Properties begin with a lowercase letter (with the exception of \l{Attached Properties}).
+
+\section2 Property types
+
+QML supports properties of many types (see \l{QML Basic Types}). The basic types include int,
+real, bool, string, color, and lists.
+
+\code
+Item {
+ x: 10.5 // a 'real' property
+ ...
+ state: "details" // a 'string' property
+ focus: true // a 'bool' property
+}
+\endcode
+
+QML properties are what is known as \e typesafe. That is, they only allow you to assign a value that
+matches the property type. For example, the \c x property of item is a real, and if you try to assign
+a string to it you will get an error.
+
+\badcode
+Item {
+ x: "hello" // illegal!
+}
+\endcode
+
+\section3 The \c id property
+
+Each object can be given a special unique property called an \e id. Assigning an id enables the object
+to be referred to by other objects and scripts.
+
+The first Rectangle element below has an \e id, "myRect". The second Rectange element defines its
+own width by referring to \tt myRect.width, which means it will have the same \tt width
+value as the first Rectangle element.
+
+\code
+Item {
+ Rectangle {
+ id: myRect
+ width: 100
+ height: 100
+ }
+ Rectangle {
+ width: myRect.width
+ height: 200
+ }
+}
+\endcode
+
+Note that an \e id must begin with a lower-case letter or an underscore, and cannot contain characters other than letters, numbers and underscores.
+
+
+\section2 List properties
+
+List properties look like this:
+
+\code
+Item {
+ children: [
+ Image {},
+ Text {}
+ ]
+}
+\endcode
+
+The list is enclosed in square brackets, with a comma separating the
+list elements. In cases where you are only assigning a single item to a
+list, you can omit the square brackets:
+
+\code
+Image {
+ children: Rectangle {}
+}
+\endcode
+
+\section2 Default properties
+
+Each object type can specify one of its list or object properties as its default property.
+If a property has been declared as the default property, the property tag can be omitted.
+
+For example this code:
+\code
+State {
+ changes: [
+ PropertyChanges {},
+ PropertyChanges {}
+ ]
+}
+\endcode
+
+can be simplified to:
+
+\code
+State {
+ PropertyChanges {}
+ PropertyChanges {}
+}
+\endcode
+
+because \c changes is the default property of the \c State type.
+
+\section2 Grouped Properties
+\target dot properties
+
+In some cases properties form a logical group and use a 'dot' or grouped notation
+to show this.
+
+Grouped properties can be written like this:
+\qml
+Text {
+ font.pixelSize: 12
+ font.bold: true
+}
+\endqml
+
+or like this:
+\qml
+Text {
+ font { pixelSize: 12; bold: true }
+}
+\endqml
+
+In the element documentation grouped properties are shown using the 'dot' notation.
+
+\section2 Attached Properties
+\target attached-properties
+
+Some objects attach properties to another object. Attached Properties
+are of the form \e {Type.property} where \e Type is the type of the
+element that attaches \e property.
+
+For example:
+\code
+Component {
+ id: myDelegate
+ Text {
+ text: "Hello"
+ color: ListView.isCurrentItem ? "red" : "blue"
+ }
+}
+ListView {
+ delegate: myDelegate
+}
+\endcode
+
+The \l ListView element attaches the \e ListView.isCurrentItem property
+to each delegate it creates.
+
+Another example of attached properties is the \l Keys element which
+attaches properties for handling key presses to
+any visual Item, for example:
+
+\code
+Item {
+ focus: true
+ Keys.onSelectPressed: console.log("Selected")
+}
+\endcode
+
+\section2 Signal Handlers
+
+Signal handlers allow actions to be taken in reponse to an event. For instance,
+the \l MouseArea element has signal handlers to handle mouse press, release
+and click:
+
+\code
+MouseArea {
+ onPressed: console.log("mouse button pressed")
+}
+\endcode
+
+All signal handlers begin with \e "on".
+
+Some signal handlers include an optional parameter, for example
+the MouseArea onPressed signal handler has a \e mouse parameter:
+
+\code
+MouseArea {
+ acceptedButtons: Qt.LeftButton | Qt.RightButton
+ onPressed: if (mouse.button == Qt.RightButton) console.log("Right mouse button pressed")
+}
+\endcode
+
+
+*/
diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc
new file mode 100644
index 0000000000..c0e028e2cc
--- /dev/null
+++ b/doc/src/declarative/qdeclarativemodels.qdoc
@@ -0,0 +1,341 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qdeclarativemodels.html
+\target qmlmodels
+\title Data Models
+
+Some QML Items use Data Models to provide the data to be displayed.
+These items typically require a \e delegate component that
+creates an instance for each item in the model. Models may be static, or
+have items modified, inserted, removed or moved dynamically.
+
+Data is provided to the delegate via named data roles which the
+delegate may bind to. The roles are exposed as properties of the
+\e model context property, though this property is set as a default property
+of the delegate so, unless there is a naming clash with a
+property in the delegate, the roles are usually accessed unqualified. The
+example below would have a clash between he \e color role of the model and
+the \e color property of the Rectangle. The clash is avoided by referencing
+the \e color property of the model by its full name: \e model.color.
+
+\code
+ListModel {
+ id: myModel
+ ListElement { color: "red" }
+ ListElement { color: "green" }
+}
+
+Component {
+ id: myDelegate
+ Rectangle {
+ width: 20; height: 20
+ color: model.color
+ }
+}
+\endcode
+
+A special \e index role containing the index of the item in the model
+is also available.
+
+\e Note: the index role will be set to -1 if the item is removed from
+the model. If you bind to the index role, be sure that the logic
+accounts for the possibility of index being -1, i.e. that the item
+is no longer valid. Usually the item will shortly be destroyed, but
+it is possible to delay delegate destruction in some views via a delayRemove
+attached property.
+
+Models that do not have named roles will have the data provided via
+the \e modelData role. The \e modelData role is also provided for
+Models that have only one role. In this case the \e modelData role
+contains the same data as the named role.
+
+There are a number of QML elements that operate using data models:
+
+\list
+\o ListView
+\o GridView
+\o PathView
+\o \l Repeater
+\endlist
+
+QML supports several types of data model, which may be provided by QML
+or C++ (via QDeclarativeContext::setContextProperty(), for example).
+
+\section1 QML Data Models
+
+\section2 ListModel
+
+ListModel is a simple hierarchy of elements specified in QML. The
+available roles are specified by the \l ListElement properties.
+
+\code
+ListModel {
+ id: fruitModel
+ ListElement {
+ name: "Apple"
+ cost: 2.45
+ }
+ ListElement {
+ name: "Orange"
+ cost: 3.25
+ }
+ ListElement {
+ name: "Banana"
+ cost: 1.95
+ }
+}
+\endcode
+
+The above model has two roles, \e name and \e cost. These can be bound
+to by a ListView delegate, for example:
+
+\code
+Component {
+ id: fruitDelegate
+ Row {
+ Text { text: "Fruit: " + name }
+ Text { text: "Cost: $" + cost }
+ }
+}
+ListView {
+ model: fruitModel
+ delegate: fruitDelegate
+}
+\endcode
+
+
+\section2 XmlListModel
+
+XmlListModel allows construction of a model from an XML data source. The roles
+are specified via the \l XmlRole element.
+
+The following model has three roles, \e title, \e link and \e description:
+\code
+XmlListModel {
+ id: feedModel
+ source: "http://rss.news.yahoo.com/rss/oceania"
+ query: "/rss/channel/item"
+ XmlRole { name: "title"; query: "title/string()" }
+ XmlRole { name: "link"; query: "link/string()" }
+ XmlRole { name: "description"; query: "description/string()" }
+}
+\endcode
+
+
+\section2 VisualItemModel
+
+VisualItemModel allows QML items to be provided as a model. This model contains
+both the data and delegate (its child items). This model does not provide any roles.
+
+\code
+ VisualItemModel {
+ id: itemModel
+ Rectangle { height: 30; width: 80; color: "red" }
+ Rectangle { height: 30; width: 80; color: "green" }
+ Rectangle { height: 30; width: 80; color: "blue" }
+ }
+
+ ListView {
+ anchors.fill: parent
+ model: itemModel
+ }
+\endcode
+
+Note that in the above example there is no delegate required.
+The items of the model itself provide the visual elements that
+will be positioned by the view.
+
+
+\section1 C++ Data Models
+
+\section2 QAbstractItemModel
+
+QAbstractItemModel provides the roles set via the QAbstractItemModel::setRoleNames() method.
+
+
+\section2 QStringList
+
+QStringList provides the contents of the list via the \e modelData role:
+
+\table
+\header
+\o
+\o
+\row
+\o
+\code
+// main.cpp
+QStringList dataList;
+dataList.append("Fred");
+dataList.append("Ginger");
+dataList.appenf("Skipper");
+
+QDeclarativeContext *ctxt = view.rootContext();
+ctxt->setContextProperty("myModel", QVariant::fromValue(&dataList));
+\endcode
+
+\o
+\code
+// main.qml
+ListView {
+ width: 100
+ height: 100
+ anchors.fill: parent
+ model: myModel
+ delegate: Component {
+ Rectangle {
+ height: 25
+ Text { text: modelData }
+ }
+ }
+}
+\endcode
+\endtable
+
+\note There is no way for the view to know that the contents of a QStringList
+have changed. If the QStringList is changed, it will be necessary to reset
+the model by calling QDeclarativeContext::setContextProperty() again.
+
+
+\section2 QList<QObject*>
+
+QList<QObject*> provides the properties of the objects in the list as roles.
+
+\code
+class DataObject : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(QString color READ color WRITE setColor)
+...
+};
+
+QList<QObject*> dataList;
+dataList.append(new DataObject("Item 1", "red"));
+dataList.append(new DataObject("Item 2", "green"));
+dataList.append(new DataObject("Item 3", "blue"));
+dataList.append(new DataObject("Item 4", "yellow"));
+
+QDeclarativeContext *ctxt = view.rootContext();
+ctxt->setContextProperty("myModel", QVariant::fromValue(dataList));
+\endcode
+
+The properties of the object may then be accessed in the delegate:
+
+\code
+ListView {
+ width: 100
+ height: 100
+ anchors.fill: parent
+ model: myModel
+ delegate: Component {
+ Rectangle {
+ height: 25
+ width: 100
+ color: model.color
+ Text { text: name }
+ }
+ }
+}
+\endcode
+
+Note: There is no way for the view to know that the contents of a QList
+have changed. If the QList is changed, it will be necessary to reset
+the model by calling QDeclarativeContext::setContextProperty() again.
+
+
+\section1 Other Data Models
+
+
+\section2 An Integer
+
+An Integer specifies a model containing the integer number of elements.
+There are no data roles.
+
+The following example creates a ListView with five elements:
+\code
+Component {
+ id: itemDelegate
+ Text { text: "I am item number: " + index }
+}
+ListView {
+ model: 5
+ delegate: itemDelegate
+}
+\endcode
+
+
+\section2 An Object Instance
+
+An Object Instance specifies a model with a single Object element. The
+properties of the object are provided as roles.
+
+The example below creates a list with one item, showing the color of the
+\e myText text. Note the use of the fully qualified \e model.color property
+to avoid clashing with \e color property of the Text element in the delegate.
+
+\code
+Rectangle {
+ Text {
+ id: myText
+ text: "Hello"
+ color: "#dd44ee"
+ }
+
+ Component {
+ id: myDelegate
+ Text {
+ text: model.color
+ }
+ }
+ ListView {
+ anchors.fill: parent
+ anchors.topMargin: 30
+ model: myText
+ delegate: myDelegate
+ }
+}
+\endcode
+
+*/
diff --git a/doc/src/declarative/qdeclarativereference.qdoc b/doc/src/declarative/qdeclarativereference.qdoc
new file mode 100644
index 0000000000..01af7f5c88
--- /dev/null
+++ b/doc/src/declarative/qdeclarativereference.qdoc
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qdeclarativereference.html
+ \title QML Reference
+
+ \target qtdeclarativemainpage
+
+ QML is a language for building the animation rich,
+ highly fluid user interfaces that are becoming common in portable consumer
+ electronics devices such as mobile phones, media players, set-top boxes and
+ netbooks. It is also appropriate for highly custom desktop
+ user interfaces, or special elements in more traditional desktop user interfaces.
+
+ Building fluid applications is done declaratively, rather than procedurally.
+ That is, you specify \e what the UI should look like and how it should behave
+ rather than specifying step-by-step \e how to build it. Specifying a UI declaratively
+ does not just include the layout of the interface items, but also the way each
+ individual item looks and behaves and the overall flow of the application.
+
+ The QML elements provide a sophisticated set of graphical and behavioral building
+ blocks. These different elements are combined together in \l {QML Documents}{QML documents} to build components
+ ranging in complexity from simple buttons and sliders, to complete
+ internet-enabled applications like a \l {http://www.flickr.com}{Flickr} photo browser.
+
+ Getting Started:
+ \list
+ \o \l {Introduction to the QML language}
+ \o \l {QML Tutorial}{Tutorial: 'Hello World'}
+ \o \l {QML Advanced Tutorial}{Advanced Tutorial: 'Same Game'}
+ \o \l {QML Examples and Walkthroughs}
+ \endlist
+
+ \section1 Core QML Features:
+ \list
+ \o \l {QML Documents}
+ \o \l {Property Binding}
+ \o \l {JavaScript Blocks}
+ \o \l {QML Scope}
+ \o \l {Network Transparency}
+ \o \l {qmlmodels}{Data Models}
+ \o \l {anchor-layout}{Anchor-based Layout}
+ \o \l {qmlstates}{States}
+ \o \l {qdeclarativeanimation.html}{Animation}
+ \o \l {qdeclarativemodules.html}{Modules}
+ \o \l {qmlfocus}{Keyboard Focus}
+ \o \l {Extending types from QML}
+ \endlist
+
+ QML Reference:
+ \list
+ \o \l {elements}{QML Elements}
+ \o \l {QML Global Object}
+ \o \l {QML Internationalization}
+ \endlist
+*/
diff --git a/doc/src/declarative/qdeclarativestates.qdoc b/doc/src/declarative/qdeclarativestates.qdoc
new file mode 100644
index 0000000000..0fea6f8cfa
--- /dev/null
+++ b/doc/src/declarative/qdeclarativestates.qdoc
@@ -0,0 +1,127 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qdeclarativestates.html
+\target qmlstates
+\title QML States
+
+\section1 Overview
+
+QML states typically describe user interface configurations, including:
+\list
+\o What UI elements are present
+\o The properties of those elements (including how they behave)
+\o What actions are available
+\endlist
+
+A state can also be thought of as a set of batched changes from a default configuration.
+
+Examples of states in modern UI:
+\list
+\o An Address Book application with a 'View Contact' state and an 'Edit Contact' State. In the first state the contact information presented is read-only (using labels), and in the second it is editable (using editors).
+\o A button with a pressed and unpressed state. When pressed the text moves slightly down and to the right, and the button has a slightly darker appearance.
+\endlist
+
+\section1 States in QML
+
+In QML:
+\list
+\o Any object can use states.
+\o There is a default state. The default state can be explicitly set.
+\o A state can affect the properties of other objects, not just the object owning the state (and not just that object's children).
+\endlist
+
+Here is an example of using states. In the default state \c myRect is positioned at 0,0. In the 'moved' state it is positioned at 50,50. Clicking within the mouse region changes the state from the default state to the 'moved' state, thus moving the rectangle.
+
+\qml
+Item {
+ id: myItem
+
+ Rectangle {
+ id: myRect
+ width: 100
+ height: 100
+ color: "red"
+ }
+
+ states: [
+ State {
+ name: "moved"
+ PropertyChanges {
+ target: myRect
+ x: 50
+ y: 50
+ }
+ }
+ ]
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: myItem.state = 'moved'
+ }
+}
+\endqml
+
+State changes can be animated using \l{state-transitions}{Transitions}.
+
+For example, adding this code to the above \c {Item {}} element animates the transition to the "moved" state:
+
+\qml
+ transitions: [
+ Transition {
+ NumberAnimation { properties: "x,y"; duration: 500 }
+ }
+ ]
+\endqml
+
+See \l{state-transitions}{Transitions} for more information.
+
+
+Other things you can do in a state change:
+\list
+\o override signal handlers with PropertyChanges
+\o change an item's visual parent with ParentChange
+\o change an item's anchors with AnchorChanges
+\o run some script with StateChangeScript
+\endlist
+
+*/
diff --git a/doc/src/declarative/qmlruntime.qdoc b/doc/src/declarative/qmlruntime.qdoc
new file mode 100644
index 0000000000..6d3e10937b
--- /dev/null
+++ b/doc/src/declarative/qmlruntime.qdoc
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qmlruntime.html
+ \title Qt Declarative UI Viewer (qmlviewer)
+ \ingroup qttools
+ \keyword qmlviewer
+
+ This page documents the \e{Declarative UI Viewer} for the Qt GUI
+ toolkit. The \c qmlviewer reads a declarative user interface definition
+ (\c .qml) file and displays the user interface it describes.
+
+ qmlviewer is a development tool. It is not intended to be
+ installed in a production environment.
+
+ \section1 Options
+
+ When run with the \c -help option, qmlviewer shows available options.
+
+ \section1 Dummy Data
+
+ One use of qmlviewer is to allow QML files to be viewed stand-alone,
+ rather than being loaded from within a Qt program. Qt applications will
+ usually bind objects and properties into the execution context before
+ running the QML. To stand-in for such bindings, you can provide dummy
+ data: create a directory called "dummydata" in the same directory as
+ the target QML file and create files there with the "qml" extension.
+ All such files will be loaded as QML objects and bound to the root
+ context as a property with the name of the file (without ".qml").
+
+ For example, if the Qt application has a "clock.time" property
+ that is a qreal from 0 to 86400 representing the number of seconds since
+ midnight, dummy data for this could be provided by \c dummydata/clock.qml:
+ \code
+ QtObject { property real time: 12345 }
+ \endcode
+ Any QML can be used in the dummy data files. You could even animate the
+ fictional data!
+
+ \section1 Screen Orientation
+
+ A special piece of dummy data which is integrated into the viewer is
+ a simple orientation property. The orientation can be set via the
+ settings menu in the application, or by pressing Ctrl+T to toggle it.
+
+ To use this from within your QML file, import QDeclarativeViewer 1.0 and create a
+ Screen object. This object has a property, orientation, which can be either
+ Screen.Landscape or Screen.Portrait and which can be bound to in your
+ application. An example is below:
+
+\code
+ import QDeclarativeViewer 1.0 as QDeclarativeViewer
+
+ Item {
+ QDeclarativeViewer.Screen { id: qmlviewerScreen }
+ state: (qmlviewerScreen.orientation == QDeclarativeViewer.Screen.Landscape) ? 'landscape' : ''
+ }
+\endcode
+
+*/
diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc
new file mode 100644
index 0000000000..66d537d116
--- /dev/null
+++ b/doc/src/declarative/qtbinding.qdoc
@@ -0,0 +1,402 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qtbinding.html
+\target qtbinding
+\title Using QML in C++ Applications
+
+\tableofcontents
+
+The QML API is split into three main classes - QDeclarativeEngine, QDeclarativeComponent and QDeclarativeContext.
+QDeclarativeEngine provides the environment in which QML is run, QDeclarativeComponent encapsulates
+\l {QML Documents}, and QDeclarativeContext allows applications to expose data to QML component instances.
+
+QML also includes a convenience API, QDeclarativeView, for applications that simply want to embed QML
+components into a new QGraphicsView. QDeclarativeView covers up many of the details discussed below.
+While QDeclarativeView is mainly intended for rapid prototyping it can have uses in production applications.
+
+If you are looking at retrofitting an existing Qt application with QML,
+read \l{Integrating QML with existing Qt UI code}.
+\section1 Basic Usage
+
+Every application requires at least one QDeclarativeEngine. A QDeclarativeEngine allows the configuration of
+global settings that apply to all the QML component instances - such as the QNetworkAccessManager
+that is used for network communications, and the path used for persistent storage.
+Multiple QDeclarativeEngine's are only needed if the application requires these settings to differ
+between QML component instances.
+
+\l {QML Documents} are loaded using the QDeclarativeComponent class. Each QDeclarativeComponent instance
+represents a single QML document. A QDeclarativeComponent can be passed a document URL, or raw text
+representing the content of the document. The document URL can be a local filesystem URL, or
+any network URL supported by QNetworkAccessManager.
+
+QML component instances can then be created by calling the QDeclarativeComponent::create() method. Here's
+an example of loading a QML document, and creating an object from it.
+
+\code
+QDeclarativeEngine *engine = new QDeclarativeEngine(parent);
+QDeclarativeComponent component(engine, QUrl("main.qml"));
+QObject *myObject = component.create();
+\endcode
+
+\section1 Exposing Data
+
+QML components are instantiated in a QDeclarativeContext. A context allows the application to expose data
+to the QML component instance. A single QDeclarativeContext can be used to instantiate all the objects
+used by an application, or several QDeclarativeContext can be created for more fine grained control over
+the data exposed to each instance. If a context is not passed to the QDeclarativeComponent::create()
+method, the QDeclarativeEngine's \l {QDeclarativeEngine::rootContext()}{root context} is used. Data exposed through
+the root context is available to all object instances.
+
+\section1 Simple Data
+
+To expose data to a QML component instance, applications set \l {QDeclarativeContext::setContextProperty()}
+{context properties} which are then accessible by name from QML \l {Property Binding}s and
+\l {JavaScript Blocks}. The following example shows how to expose a background color to a QML
+file.
+
+\table
+\row
+\o
+\code
+// main.cpp
+QDeclarativeContext *windowContext = new QDeclarativeContext(engine->rootContext());
+windowContext->setContextProperty("backgroundColor",
+ QColor(Qt::lightsteelblue));
+
+QDeclarativeComponent component(&engine, "main.qml");
+QObject *window = component.create(windowContext);
+\endcode
+\o
+\code
+// main.qml
+import Qt 4.6
+
+Rectangle {
+ color: backgroundColor
+
+ Text {
+ anchors.centerIn: parent
+ text: "Hello Light Steel Blue World!"
+ }
+}
+\endcode
+\endtable
+
+Context properties work just like normal properties in QML bindings - if the \c backgroundColor
+context property in the previous example was changed to red, the component object instances would
+all be automatically updated. Note that it is the responsibility of the creator to delete any
+QDeclarativeContext it constructs. If the \c windowContext in the example above is no longer needed when
+the \c window component instantiation is destroyed, the \c windowContext must be destroyed
+explicitly. The simplest way to ensure this is to set \c window as \c windowContext's parent.
+
+QDeclarativeContexts form a tree - each QDeclarativeContext except for the root context has a parent. Child
+QDeclarativeContexts effectively inherit the context properties present in their parents. This gives
+applications more freedom in partitioning the data exposed to different QML object instances.
+If a QDeclarativeContext sets a context property that is also set in one of its parents, the new context
+property shadows that in the parent. In The following example, the \c background context property
+in \c {Context 1} shadows the \c background context property in the root context.
+
+\image qml-context-tree.png
+
+\section2 Structured Data
+
+Context properties can also be used to expose structured and writable data to QML objects. In
+addition to all the types already supported by QVariant, QObject derived types can be assigned to
+context properties. QObject context properties allow the data exposed to be more structured, and
+allow QML to set values.
+
+The following example creates a \c CustomPalette object, and sets it as the \c palette context
+property.
+
+\code
+class CustomPalette : public QObject
+{
+Q_OBJECT
+Q_PROPERTY(QColor background READ background WRITE setBackground NOTIFY backgroundChanged)
+Q_PROPERTY(QColor text READ text WRITE setText NOTIFY textChanged)
+public:
+ CustomPalette() : m_background(Qt::white), m_text(Qt::black) {}
+
+ QColor background() const { return m_background; }
+ void setBackground(const QColor &c) {
+ if (c != m_background) {
+ m_background = c;
+ emit backgroundChanged();
+ }
+ }
+
+ QColor text() const { return m_text; }
+ void setText(const QColor &c) {
+ if (c != m_text) {
+ m_text = c;
+ emit textChanged();
+ }
+ }
+signals:
+ void textChanged();
+ void backgroundChanged():
+
+private:
+ QColor m_background;
+ QColor m_text;
+};
+
+int main(int argc, char **argv)
+{
+ // ...
+
+ QDeclarativeContext *windowContext = new QDeclarativeContext(engine->rootContext());
+ windowContext->setContextProperty("palette", new CustomPalette);
+
+ QDeclarativeComponent component(&engine, "main.qml");
+ QObject *window = component.create(windowContext);
+}
+\endcode
+
+The QML that follows references the palette object, and its properties, to set the appropriate
+background and text colors. When the window is clicked, the palette's text color is changed, and
+the window text will update accordingly.
+
+\code
+// main.qml
+import Qt 4.6
+
+Rectangle {
+ width: 240
+ height: 320
+ color: palette.background
+
+ Text {
+ anchors.centerIn: parent
+ color: palette.text
+ text: "Hello Colorful World!"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ palette.text = "blue";
+ }
+ }
+}
+\endcode
+
+To detect when a C++ property value - in this case the \c CustomPalette's \c text property -
+changes, the property must have a corresponding NOTIFY signal. The NOTIFY signal specifies a signal
+that is emitted whenever the property changes value. Implementers should take care to only emit the
+signal if the value \e changes to prevent loops from occuring. Accessing a property from a
+binding that does not have a NOTIFY signal will cause QML to issue a warning at runtime.
+
+\section2 Dynamic Structured Data
+
+If an application is too dynamic to structure data as compile-time QObject types, dynamically
+structured data can be constructed at runtime using the QDeclarativePropertyMap class.
+
+
+\section1 Calling C++ methods from QML
+
+It is possible to call methods of QObject derived types by either exposing the
+methods as public slots, or by marking the methods Q_INVOKABLE.
+
+The C++ methods can also have parameters and return values. QML has support for
+the following types:
+
+\list
+\o bool
+\o unsigned int, int
+\o float, double, qreal
+\o QString
+\o QUrl
+\o QColor
+\o QDate, QTime, QDateTime
+\o QPoint, QPointF
+\o QSize, QSizeF
+\o QRect, QRectF
+\o QVariant
+\endlist
+
+This example toggles the "LED Blinker" when the MouseArea is clicked:
+
+\table
+\row
+\o
+\code
+// main.cpp
+class LEDBlinker : public QObject
+{
+ Q_OBJECT
+public:
+ LEDBlinker();
+
+ Q_INVOKABLE bool isRunning();
+
+public slots:
+ void start();
+ void stop();
+};
+
+int main(int argc, char **argv)
+{
+ // ...
+
+ QDeclarativeContext *context = engine->rootContext();
+ context->setContextProperty("ledBlinker", new LEDBlinker);
+
+ // ...
+}
+\endcode
+\o
+\code
+// main.qml
+import Qt 4.6
+
+Rectangle {
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (ledBlinker.isRunning())
+ ledBlinker.stop()
+ else
+ ledBlicker.start();
+ }
+ }
+}
+\endcode
+\endtable
+
+Note that in this particular example a better way to achieve the same result
+is to have a "running" property. This leads to much nicer QML code:
+
+\table
+\row
+\o
+\code
+// main.qml
+import Qt 4.6
+
+Rectangle {
+ MouseArea {
+ anchors.fill: parent
+ onClicked: ledBlinker.running = !ledBlinker.running
+ }
+}
+\endcode
+\endtable
+
+
+Of course, it is also possible to call \l {Adding new methods}{functions declared in QML from C++}.
+
+
+\section1 Network Components
+
+If the URL passed to QDeclarativeComponent is a network resource, or if the QML document references a
+network resource, the QDeclarativeComponent has to fetch the network data before it is able to create
+objects. In this case, the QDeclarativeComponent will have a \l {QDeclarativeComponent::Loading}{Loading}
+\l {QDeclarativeComponent::status()}{status}. An application will have to wait until the component
+is \l {QDeclarativeComponent::Ready}{Ready} before calling \l {QDeclarativeComponent::create()}.
+
+The following example shows how to load a QML file from a network resource. After creating
+the QDeclarativeComponent, it tests whether the component is loading. If it is, it connects to the
+QDeclarativeComponent::statusChanged() signal and otherwise calls the \c {continueLoading()} method
+directly. This test is necessary, even for URLs that are known to be remote, just in case
+the component has been cached and is ready immediately.
+
+\code
+MyApplication::MyApplication()
+{
+ // ...
+ component = new QDeclarativeComponent(engine, QUrl("http://www.example.com/main.qml"));
+ if (component->isLoading())
+ QObject::connect(component, SIGNAL(statusChanged(QDeclarativeComponent::Status)),
+ this, SLOT(continueLoading()));
+ else
+ continueLoading();
+}
+
+void MyApplication::continueLoading()
+{
+ if (component->isError()) {
+ qWarning() << component->errors();
+ } else {
+ QObject *myObject = component->create();
+ }
+}
+\endcode
+
+\section1 Qt Resources
+
+QML content can be loaded from \l {The Qt Resource System} using the \e qrc: URL scheme.
+For example:
+
+\code
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>main.qml</file>
+ <file>images/background.png</file>
+</qresource>
+</RCC>
+\endcode
+\code
+// main.cpp
+MyApplication::MyApplication()
+{
+ // ...
+ component = new QDeclarativeComponent(engine, QUrl("qrc:/main.qml"));
+ if (component->isError()) {
+ qWarning() << component->errors();
+ } else {
+ QObject *myObject = component->create();
+ }
+}
+\endcode
+\code
+// main.qml
+import Qt 4.6
+
+Image {
+ source: "images/background.png"
+}
+\endcode
+
+*/
+
diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc
new file mode 100644
index 0000000000..41d633844b
--- /dev/null
+++ b/doc/src/declarative/qtdeclarative.qdoc
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\module QtDeclarative
+\title QtDeclarative Module
+\ingroup modules
+
+\brief The Qt Declarative module provides a declarative framework for building
+highly dynamic, custom user interfaces.
+
+To include the definitions of the module's classes, use the
+following directive:
+
+\code
+#include <QtDeclarative>
+\endcode
+
+To link against the module, add this line to your \l qmake \c
+.pro file:
+
+\code
+QT += declarative
+\endcode
+
+For more information on the Qt Declarative module, see the
+\l{declarativeui.html}{Declarative UI} documentation.
+
+*/
diff --git a/doc/src/declarative/qtprogrammers.qdoc b/doc/src/declarative/qtprogrammers.qdoc
new file mode 100644
index 0000000000..ca1d596e83
--- /dev/null
+++ b/doc/src/declarative/qtprogrammers.qdoc
@@ -0,0 +1,163 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+
+ INCOMPLETE
+
+\page qtprogrammers.html
+\target qtprogrammers
+\title QML for Qt programmers
+
+\section1 Overview
+
+While QML does not require Qt knowledge to use, if you \e are already familar with Qt,
+much of your knowledge is directly relevant to learning and using QML. Of course,
+an application with a UI defined in QML also uses Qt for all the non-UI logic.
+
+\section1 Familiar Concepts
+
+QML provides direct access to the following concepts from Qt:
+
+\list
+ \o QAction - the \l {QML Basic Types}{action} type
+ \o QObject signals and slots - available as functions to call in JavaScript
+ \o QObject properties - available as variables in JavaScript
+ \o QWidget - QDeclarativeView is a QML-displaying widget
+ \o Qt models - used directly in data binding (QAbstractItemModel and next generation QListModelInterface)
+\endlist
+
+Qt knowledge is \e required for \l {Extending QML}, and also for \l{Integrating QML with existing Qt UI code}.
+
+\section1 QML Items compared with QWidgets
+
+QML Items are very similar to QWidgets: they define the look and feel of the user interface. (Note that while QWidgets
+haven't traditionally been used to define the look and feel of view delegates, QML Items can be used for this as well.)
+
+There are three structurally different types of QWidget:
+
+\list
+ \o Simple widgets that are not used as parents (QLabel, QCheckBox, QToolButton, etc.)
+ \o Parent widgets that are normally used as parents to other widgets (QGroupBox, QStackedWidget, QTabWidget, etc.)
+ \o Compound widgets that are internally composed of child widgets (QComboBox, QSpinBox, QFileDialog, QTabWidget, etc.)
+\endlist
+
+QML Items also serve these purposes. Each is considered separately below.
+
+\section2 Simple Widgets
+
+The most important rule to remember while implementing a new QDeclarativeItem in C++
+is that it should not contain any look and feel policies - leave that to the
+QML usage of the item.
+
+As an example, imagine you wanted a reusable Button item. If you therefore
+decided to write a QDeclarativeItem subclass to implement a button,
+just as QToolButton subclasses QWidget for this purpose, following the rule above, your
+\c QDeclarativeButton would not have any appearance - just the notions of enabled, triggering, etc.
+
+But there is already an object in Qt that does this: QAction.
+
+QAction is the UI-agnostic essence of QPushButton, QCheckBox, QMenu items, QToolButton,
+and other visual widgets that are commonly bound to a QAction.
+
+So, the job of implementing a checkbox abstraction for QML is already done - it's QAction.
+The look and feel of an action - the appearance of the button, the transition between states,
+and exactly how it respond to mouse, key, or touch input, should all be left for definition
+in QML.
+
+It is illustrative to note that QDeclarativeTextEdit is built upon QTextControl,
+QDeclarativeWebView is built upon QWebPage, and ListView uses QListModelInterface,
+just as QTextEdit, QWebView, and QListView are built upon
+those same UI-agnostic components.
+
+The encapsulation of the look and feel that QWidgets gives is important, and for this
+the QML concept of \l {qdeclarativedocuments.html}{components} serves the same purpose. If you are building a complete
+suite of applications which should have a consistent look and feel, you should build
+a set of reusable components with the look and feel you desire.
+
+So, to implement your reusable button, you would simply build a QML component.
+
+
+\section2 Parent Widgets
+
+Parent widgets each provide a generic way to interface to one or more arbitrary other widgets.
+A QTabWidget provides an interface to multiple "pages", one of which is visible at any time,
+and a mechnism for selecting among them (the QTabBar). A QScollArea provides scrollbars around
+a widget that is otherwise too large to fit in available space.
+
+Nearly all such components can be created directly in QML. Only a few cases
+which require very particular event handling, such as Flickable, require C++ implementations.
+
+As an example, imagine you decided to make a generic tab widget item to be used
+through your application suite wherever information is in such quantity that it
+needs to be divided up into pages.
+
+A significant difference in the parenting concept with QML compare to QWidgets
+is that while child items are positioned relative to their parents,
+there is no requirement that they be wholy contained ("clipped") to
+the parent (although the clipped property of the child Item does allow
+this where it is needed).
+This difference has rather far-reaching consequences, for example:
+
+\list
+ \o A shadow or highlight around a widget could be a child of that widget.
+ \o Particle effects can flow outside the object where they originate.
+ \o Transitioning animations can "hide" items by visibly moving them beyond the screen bounds.
+\endlist
+
+
+\section2 Compound Widgets
+
+Some widgets provide functionality by composing other widgets as an "implementation detail",
+providing a higher level API to the composition. QSpinBox for example is a line edit and some
+buttons to increase/decrease the edited value. QFileDialog uses a whole host of widgets to
+give the user a way of finding and selecting a file name.
+
+When developing reusable QML Items, you may choose to do the same: build an item composed
+of other items you have already defined.
+
+The only caveat when doing this is to consider the possible animations and transitions that
+users of the compound item might wish to employ. For example, a spinbox might need to smoothly
+transition from an arbitrary Text item, or characters within a Text item, so your spinbox
+item would need to be sufficiently flexible to allow such animation.
+
+\section1 QML Items Compared With QGraphicsWidgets
+*/
diff --git a/doc/src/declarative/scope.qdoc b/doc/src/declarative/scope.qdoc
new file mode 100644
index 0000000000..218af895e4
--- /dev/null
+++ b/doc/src/declarative/scope.qdoc
@@ -0,0 +1,380 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qdeclarativescope.html
+\title QML Scope
+
+\tableofcontents
+
+\l {Property Binding}s and \l {JavaScript Blocks} are executed in a scope chain automatically
+established by QML when a component instance is constructed. QML is a \e {dynamically scoped}
+language. Different object instances instantiated from the same component can exist in
+different scope chains.
+
+\image qml-scope.png
+
+\section1 JavaScript Variable object
+
+Each binding and script block has its own distinct JavaScript variable object where local
+variables are stored. That is, local variables from different bindings and script blocks never
+conflict.
+
+\section1 Element Type Names
+
+Bindings or script blocks use element type names when accessing \l {Attached Properties} or
+enumeration values. The set of available element names is defined by the import list of the
+\l {QML Documents}{QML Document} in which the the binding or script block is defined.
+
+These two examples show how to access attached properties and enumeration values with different
+types of import statements.
+\table
+\row
+\o
+\code
+import Qt 4.6
+
+Text {
+ id: root
+ scale: root.PathView.scale
+ horizontalAlignment: Text.AlignLeft
+}
+\endcode
+\o
+\code
+import Qt 4.6 as MyQt
+
+Text {
+ id: root
+ scale: root.MyQt.PathView.scale
+ horizontalAlignment: MyQt.Text.AlignLeft
+}
+\endcode
+\endtable
+
+\section1 QML Local Scope
+
+Most variables references are resolved in the local scope. The local scope is controlled by the
+QML component in which the binding or script block was defined. The following example shows
+three different bindings, and the component that dictates each local scope.
+
+\table
+\row
+\o
+\code
+// main.qml
+import Qt 4.6
+
+Rectangle { // Local scope component for binding 1
+ id: root
+ property string text
+
+ Button {
+ text: root.text // binding 1
+ }
+
+ ListView {
+ delegate: Component { // Local scope component for binding 2
+ Rectangle {
+ width: ListView.view.width // binding 2
+ }
+ }
+ }
+
+}
+\endcode
+\o
+\code
+// Button.qml
+import Qt 4.6
+
+Rectangle { // Local scope component for binding 3
+ id: root
+ property string text
+
+ Text {
+ text: root.text // binding 3
+ }
+}
+\endcode
+\endtable
+
+Inside the local scope, four "sub-scopes" exist. Each sub-scope is searched in order when
+resolving a name; names in higher sub-scopes shadow those in lower sub-scopes.
+
+\section2 IDs
+
+IDs present in the component take precendence over other names. The QML engine enforces
+uniqueness of IDs within a component, so their names cannot conflict with one another.
+
+Here is an example of using IDs within bindings:
+
+\code
+Item {
+ id: root
+ width: nested.width
+ Item {
+ id: nested
+ height: root.height
+ }
+}
+\endcode
+
+\section2 Script Methods
+
+Methods declared in script blocks are searched immediately after IDs. In the case of multiple
+script blocks in the one component, the blocks are searched in the order in which they were
+declared - the nesting of script blocks within a component is not significant for name
+resolution.
+
+In the following example, \c {Method 1} shadows \c {Method 2} for the bindings, but not for
+\c {Method 3}.
+
+\code
+Item {
+ Script {
+ function getValue() { return 10; } // Method 1
+ }
+
+ Rectangle {
+ Script {
+ function getValue() { return 11; } // Method 2
+ function getValue2() { return getValue(); } // Method 3
+ }
+
+ x: getValue() // Resolves to Method 1, set to 10
+ y: getValue2() // Resolves to Method 3, set to 11
+ }
+}
+\endcode
+
+\section2 Scope Object
+
+A scope object is associated with each binding and script block. Properties and methods of the
+scope object appear in the scope chain, immediately after \l {Script Methods}.
+
+In bindings and script blocks established explicitly in \l {QML Documents}, the scope object is
+always the element containing the binding or script block. The following example shows two
+bindings, one using grouped properties, and the corresponding scope object. These two bindings
+use the scope object to resolve variable references: \c height is a property on \l Rectangle,
+and \c parent is a property on \l Text.
+
+\code
+Item { // Scope object for Script block 1
+ Script { // Script block 1
+ function calculateValue() { ... }
+ }
+
+ Rectangle { // Scope object for Binding 1 and Script block 2
+ Script { // Script block 2
+ function calculateColor() { ... }
+ }
+ width: height * 2 // Binding 1
+ }
+
+ Text { // Scope object for Binding 2
+ font.pixelSize: parent.height * 0.7 // binding 2
+ }
+}
+\endcode
+
+One notable characteristic of the scope object is its interaction with \l {Attached Properties}.
+As attached properties exist on all objects, an attached property reference that is not
+explicitly prefixed by an id will \e always resolve to the attached property on the scope
+object.
+
+In the following example, \c {Binding 1} will resolve to the attached properties of the
+\l Rectangle element, as intended. However, due to the property search of the scope object,
+\c {Binding 2} will resolve to the attached properties of the \l Text element, which
+is probably not what was intended. This code can be corrected, by replacing \c {Binding 2}
+with this explicit element reference \c {root.ListView.view.width}.
+
+\code
+import Qt 4.6
+
+ListView {
+ delegate: Rectangle {
+ id: root
+ width: ListView.view.width // Binding 1
+ Text {
+ text: contactName
+ width: ListView.view.width // Binding 2
+ }
+ }
+}
+\endcode
+
+\e TODO
+
+\list
+\o scope object for PropertyChanges
+\endlist
+
+\section2 Root Object
+
+Properties and methods on the local scope component's root object appear in the scope chain
+immediately after the \l {Scope Object}. If the scope object and root object are the same,
+this step has no effect.
+
+This example uses the root object to easily propagate data throughout the component.
+
+\code
+Item {
+ property string description
+ property int fontSize
+
+ Text {
+ text: description
+ font.pixelSize: fontSize
+ }
+}
+\endcode
+
+\section1 QML Component chain
+
+When a QML component is instantiated it is given a parent component instance. The parent
+component instance is immutable - it is not affected, for example, by changes in the instance's
+visual parent (in the case of visual elements). Should name resolution fail within the
+\l {QML Local Scope}, this parent chain is searched.
+
+For each component instance in the chain, the following are examined:
+
+\list 1
+\o IDs
+\o Script Methods
+\o Root Object
+\endlist
+
+This list is a sub-set of that in the \l {QML Local Scope}.
+
+A sub-component's parent component instance is set to the component that created it.
+In the following example, the two \c Button instances have the
+\c main.qml instance as their parent component instance. If the \c Button type was used from
+within another QML file, it may have a difference parent component instance, and consequently
+the \c buttonClicked() method may resolve differently.
+
+\table
+\row
+\o
+\code
+// main.qml
+Item {
+ function buttonClicked(var data) {
+ print(data + " clicked");
+ }
+
+ Button { text: "Button1" }
+ Button { text: "Button2" }
+}
+\endcode
+\o
+\code
+// Button.qml
+Rectangle {
+ id: root
+ property string text
+ width: 80
+ height: 30
+ Text {
+ anchors.centerIn: parent
+ text: root.text
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: buttonClicked(text)
+ }
+}
+\endcode
+\endtable
+
+The code above discourages the re-use of the \c Button component, as it has a hard dependency
+on the environment in which it is used. Tightly coupling two types together like this should
+only be used when the components are within the same module, and the author controls the
+implementations of both.
+
+In the following example, the \l ListView sets the parent component instance of each of its
+delegates to its own component instance. In this way, the main component can easily pass data
+into the \l ListView delegates.
+
+\code
+Item {
+ property color delegateColor: "red"
+
+ ListView {
+ delegate: Component {
+ Rectangle {
+ color: delegateColor
+ }
+ }
+ }
+}
+\endcode
+
+\section1 QDeclarativeContext chain
+
+The \l QDeclarativeContext chain allows C++ applications to pass data into QML applications.
+\l QDeclarativeComponent object instances created from C++ are passed a \l QDeclarativeContext in which they
+are created. Variables defined in this context appear in the scope chain. Each QDeclarativeContext
+also defines a parent context. Variables in child QDeclarativeContext's shadow those in its parent.
+
+Consider the following QDeclarativeContext tree.
+
+\image qml-context-tree.png
+
+The value of \c background in \c {Context 1} would be used if it was instantiated in
+\c {Context 1}, where as the value of the \c background in the root context would be used if
+the component instance was instantiated in \c {Context 2}.
+
+\code
+import Qt 4.6
+
+Rectangle {
+ id: myRect
+ width: 100; height: 100
+ color: background
+}
+\endcode
+
+\section1 QML Global Object
+
+The \l {QML Global Object} contains all the properties of the JavaScript global object, plus some
+QML specific extensions.
+*/
diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc
new file mode 100644
index 0000000000..310b7767b3
--- /dev/null
+++ b/doc/src/declarative/tutorial.qdoc
@@ -0,0 +1,239 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qml-tutorial.html
+\title QML Tutorial
+\brief An introduction to the basic concepts and features of QML.
+\nextpage QML Tutorial 1 - Basic Types
+
+This tutorial gives an introduction to QML, the mark up language for Qt Quick. It doesn't cover everything;
+the emphasis is on teaching the key principles, and features are introduced as needed.
+
+Through the different steps of this tutorial we will learn about QML basic types, we will create our own QML component
+with properties and signals, and we will create a simple animation with the help of states and transitions.
+
+Chapter one starts with a minimal "Hello world" program and the following chapters introduce new concepts.
+
+The tutorial's source code is located in the $QTDIR/examples/declarative/tutorials/helloworld directory.
+
+Tutorial chapters:
+
+\list
+\o \l {QML Tutorial 1 - Basic Types}
+\o \l {QML Tutorial 2 - QML Component}
+\o \l {QML Tutorial 3 - States and Transitions}
+\endlist
+
+*/
+
+/*!
+\page qml-tutorial1.html
+\title QML Tutorial 1 - Basic Types
+\contentspage QML Tutorial
+\previouspage QML Tutorial
+\nextpage QML Tutorial 2 - QML Component
+
+This first program is a very simple "Hello world" example that introduces some basic QML concepts.
+The picture below is a screenshot of this program.
+
+\image declarative-tutorial1.png
+
+Here is the QML code for the application:
+
+\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 0
+
+\section1 Walkthrough
+
+\section2 Import
+
+First, we need to import the types that we need for this example. Most QML files will import the built-in QML
+types (like \l{Rectangle}, \l{Image}, ...) that come with Qt with:
+
+\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 3
+
+\section2 Rectangle element
+
+\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 1
+
+We declare a root element of type \l{Rectangle}. It is one of the basic building blocks you can use to create an application in QML.
+We give it an \c{id} to be able to refer to it later. In this case, we call it \e page.
+We also set the \c width, \c height and \c color properties.
+The \l{Rectangle} element contains many other properties (such as \c x and \c y), but these are left at their default values.
+
+\section2 Text element
+
+\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 2
+
+We add a \l Text element as a child of our root element that will display the text 'Hello world!'.
+
+The \c y property is used to position the text vertically at 30 pixels from the top of its parent.
+
+The \c font.pointSize and \c font.bold properties are related to fonts and use the \l{dot properties}{dot notation}.
+
+The \c anchors.horizontalCenter property refers to the horizontal center of an element.
+In this case, we specify that our text element should be horizontally centered in the \e page element (see \l{anchor-layout}{Anchor-based Layout}).
+
+\section2 Viewing the example
+
+To view what you have created, run the qmlviewer (located in the \c bin directory) with your filename as the first argument.
+For example, to run the provided completed Tutorial 1 example from the install location, you would type:
+
+\code
+bin/qmlviewer $QTDIR/examples/declarative/tutorials/helloworld/tutorial1.qml
+\endcode
+*/
+
+/*!
+\page qml-tutorial2.html
+\title QML Tutorial 2 - QML Component
+\contentspage QML Tutorial
+\previouspage QML Tutorial 1 - Basic Types
+\nextpage QML Tutorial 3 - States and Transitions
+
+This chapter adds a color picker to change the color of the text.
+
+\image declarative-tutorial2.png
+
+Our color picker is made of six cells with different colors.
+To avoid writing the same code multiple times, we first create a new \c Cell component.
+A component provides a way of defining a new type that we can re-use in other QML files.
+A QML component is like a black-box and interacts with the outside world through properties, signals and slots and is generally
+defined in its own QML file (for more details, see \l {Defining new Components}).
+The component's filename must always start with a capital letter.
+
+Here is the QML code for \c Cell.qml:
+
+\snippet examples/declarative/tutorials/helloworld/Cell.qml 0
+
+\section1 Walkthrough
+
+\section2 The Cell Component
+
+\snippet examples/declarative/tutorials/helloworld/Cell.qml 1
+
+The root element of our component is an \l Item with the \c id \e container.
+An \l Item is the most basic visual element in QML and is often used as a container for other elements.
+
+\snippet examples/declarative/tutorials/helloworld/Cell.qml 4
+
+We declare a \c color property. This property is accessible from \e outside our component, this allows us
+to instantiate the cells with different colors.
+This property is just an alias to an existing property - the color of the rectangle that compose the cell (see \l{intro-properties}{Properties}).
+
+\snippet examples/declarative/tutorials/helloworld/Cell.qml 5
+
+We want our component to also have a signal that we call \e clicked with a \e color parameter.
+We will use this signal to change the color of the text in the main QML file later.
+
+\snippet examples/declarative/tutorials/helloworld/Cell.qml 2
+
+Our cell component is basically a colored rectangle with the \c id \e rectangle.
+
+The \c anchors.fill property is a convenient way to set the size of an element.
+In this case the rectangle will have the same size as its parent (see \l{anchor-layout}{Anchor-based Layout}).
+
+\snippet examples/declarative/tutorials/helloworld/Cell.qml 3
+
+In order to change the color of the text when clicking on a cell, we create a \l MouseArea element with
+the same size as its parent.
+
+A \l MouseArea defines a signal called \e clicked.
+When this signal is triggered we want to emit our own \e clicked signal with the color as parameter.
+
+\section2 The main QML file
+
+In our main QML file, we use our \c Cell component to create the color picker:
+
+\snippet examples/declarative/tutorials/helloworld/tutorial2.qml 0
+
+We create the color picker by putting 6 cells with different colors in a grid.
+
+\snippet examples/declarative/tutorials/helloworld/tutorial2.qml 1
+
+When the \e clicked signal of our cell is triggered, we want to set the color of the text to the color passed as a parameter.
+We can react to any signal of our component through a property of the name \e 'onSignalName' (see \l{Signal Handlers}).
+*/
+
+/*!
+\page qml-tutorial3.html
+\title QML Tutorial 3 - States and Transitions
+\contentspage QML Tutorial
+\previouspage QML Tutorial 2 - QML Component
+
+In this chapter, we make this example a little bit more dynamic by introducing states and transitions.
+
+We want our text to move to the bottom of the screen, rotate and become red when clicked.
+
+\image declarative-tutorial3_animation.gif
+
+Here is the QML code:
+
+\snippet examples/declarative/tutorials/helloworld/tutorial3.qml 0
+
+\section1 Walkthrough
+
+\snippet examples/declarative/tutorials/helloworld/tutorial3.qml 2
+
+First, we create a new \e down state for our text element.
+This state will be activated when the \l MouseArea is pressed, and deactivated when it is released.
+
+The \e down state includes a set of property changes from our implicit \e {default state}
+(the items as they were initially defined in the QML).
+Specifically, we set the \c y property of the text to \c 160, the rotation to \c 180 and the \c color to red.
+
+\snippet examples/declarative/tutorials/helloworld/tutorial3.qml 3
+
+Because we don't want the text to appear at the bottom instantly but rather move smoothly,
+we add a transition between our two states.
+
+\c from and \c to define the states between which the transition will run.
+In this case, we want a transition from the default state to our \e down state.
+
+Because we want the same transition to be run in reverse when changing back from the \e down state to the default state,
+we set \c reversible to \c true.
+This is equivalent to writing the two transitions separately.
+
+The \l ParallelAnimation element makes sure that the two types of animations (number and color) start at the same time.
+We could also run them one after the other by using \l SequentialAnimation instead.
+
+For more details on states and transitions, see \l {QML States}.
+*/
diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc
index bf0bc743f7..16718f35e2 100644
--- a/doc/src/deployment/deployment.qdoc
+++ b/doc/src/deployment/deployment.qdoc
@@ -87,30 +87,28 @@
\header
\o {4,1} Qt's Libraries
\row
- \o \l {QtAssistant}
\o \l {QAxContainer}
\o \l {QAxServer}
\o \l {QtCore}
- \row
\o \l {QtDBus}
+ \row
\o \l {QtDesigner}
\o \l {QtGui}
\o \l {QtHelp}
- \row
\o \l {QtNetwork}
+ \row
\o \l {QtOpenGL}
\o \l {QtScript}
\o \l {QtScriptTools}
- \row
\o \l {QtSql}
+ \row
\o \l {QtSvg}
\o \l {QtWebKit}
\o \l {QtXml}
- \row
\o \l {QtXmlPatterns}
+ \row
\o \l {Phonon Module}{Phonon}
\o \l {Qt3Support}
- \o
\endtable
Since Qt is not a system library, it has to be redistributed along
diff --git a/doc/src/development/assistant-manual.qdoc b/doc/src/development/assistant-manual.qdoc
index c4eb615350..7d56ea1c22 100644
--- a/doc/src/development/assistant-manual.qdoc
+++ b/doc/src/development/assistant-manual.qdoc
@@ -154,13 +154,17 @@
\row
\o -unregister <doc.qch>
\o Unregisters the specified compressed help file from the given
- collection file.
+ collection file.
\row
\o -remove-search-index
\o Purges the help search engine's index. This option is
useful in case the associated index files get corrupted.
\QA will re-index the documentation at the next start-up.
\row
+ \o -rebuild-search-index
+ \o Rebuilds the help search engine's index.
+ Note that this operation may take a while to finish.
+ \row
\o -setCurrentFilter <filter>
\o Sets the given filter as the active filter.
\row
@@ -638,12 +642,19 @@
file in the \c{file} tags. It is possible to specify a different file or any
language. The icon defined by the \c{icon} tags is applied to any language.
\row
- \o \c{<cacheDirectory>}
- \o Specified as a path relative to the directory given by
- QDesktopServices::DataLocation, the cache path is used to store index files
+ \o \c{<cacheDirectory base="collection|default">}
+ \o The cache directory is used to store index files
needed for the full text search and a copy of the collection file.
- The copy is needed because \QA stores all its settings in the collection file;
- i.e., it must be writable for the user.
+ The copy is needed because \QA stores all its settings in the collection file; i.e., it must be writable for the user.
+ The directory is specified as a relative path.
+ If the \c{base} attribute is set to "collection", the path is
+ relative to the directory the collection file resides in.
+ If the attribute is set to "default" or if it is missing,
+ the path is relative to the directory given by
+ QDesktopServices::DataLocation. The first form is useful for
+ collections that are used in a "mobile" way, e.g. carried around
+ on a USB stick.
+
\endtable
In addition to those \QA specific tags, the tags for generating and registering
@@ -677,9 +688,6 @@
to make Assistant listen to your application, turn on its remote control
functionality by passing the \c{-enableRemoteControl} command line option.
- \warning The trailing '\0' must be appended separately to the QByteArray,
- e.g., \c{QByteArray("command" + '\0')}.
-
The following example shows how this can be done:
\snippet doc/src/snippets/code/doc_src_assistant-manual.qdoc 2
@@ -690,6 +698,9 @@
\snippet doc/src/snippets/code/doc_src_assistant-manual.qdoc 3
+ Note that the trailing newline character is required to mark the end
+ of the input.
+
The following commands can be used to control \QA:
\table
@@ -727,13 +738,20 @@
\o Selects the item in the contents widget which corresponds to
the currently displayed page.
\row
- \o \c{setCurrentFilter}
+ \o \c{setCurrentFilter <filter>}
\o Selects the specified filter and updates the visual representation
accordingly.
\row
\o \c{expandToc <Depth>}
\o Expands the table of contents tree to the given depth. If depth
- is less than 1, the tree will be collapsed completely.
+ is 0, the tree will be collapsed completely. If depth is -1,
+ the tree will be expanded completely.
+ \row
+ \o \c{register <help file>}
+ \o Adds the given Qt compressed help file to the collection.
+ \row
+ \o \c{unregister <help file>}
+ \o Removes the given Qt compressed help file from the collection.
\endtable
If you want to send several commands within a short period of time, it is
diff --git a/doc/src/development/developing-on-mac.qdoc b/doc/src/development/developing-on-mac.qdoc
index b0862cf005..1eb829eab8 100644
--- a/doc/src/development/developing-on-mac.qdoc
+++ b/doc/src/development/developing-on-mac.qdoc
@@ -60,26 +60,26 @@
\section1 What Versions of Mac OS X are Supported?
- As of Qt 4.6, Qt supports Mac OS X versions 10.4 and up. It is usually in
+ As of Qt 4.7, Qt supports Mac OS X versions 10.4 and up. It is usually in
the best interest of the developer and user to be running the latest
updates to any version. We test internally against Mac OS X 10.4.11 as well
as the updated release of Mac OS X 10.5 and Mac OS X 10.6.
\section2 Carbon or Cocoa?
- Historically, Qt has used the Carbon toolkit, which supports 32-bit
- applications on Mac OS X 10.4 and up. Qt 4.5 and up has support for the Cocoa
- toolkit, which requires 10.5 and provides 64-bit support.
-
- This detail is typically not important to Qt application developers. Qt is
- cross-platform across Carbon and Cocoa, and Qt applications behave
- the same way when configured for either one. Eventually, the Carbon
- version will be discontinued. This is something to keep in mind when you
- consider writing code directly against native APIs.
-
- The current binary for Qt is built in two flavors, 32-bit Carbon and full
- universal Cocoa (32-bit and 64-bit). If you want a different setup for
- Qt will use, you must build from scratch. Carbon or Cocoa is chosen when
+ Qt supports building in two flavors, using either the Carbon or Cocoa APIs.
+ Using the Cocoa toolkit, Qt requires 10.5 and provides 64-bit support. With
+ Carbon Qt can be developed on and deployed to 10.4, but there is no 64-bit
+ support.
+
+ With Qt 4.7 we now recommend using the Cocoa version of Qt for development,
+ unless you want to target the 10.4 platform. Qt now uses Cocoa by default,
+ both for the binary package and when configuring from source. Download the
+ Carbon binary packages or configure with "-carbon" to use that version.
+
+ There are two versions of the Qt binary, one with x86 and x86_64
+ Cocoa and another with x86 and ppc Carbon. If you want a different setup
+ you must build from source. Carbon or Cocoa is chosen when
configuring the package for building. The configure process selects Carbon
by default, to specify Cocoa use the \c{-cocoa} flag. configure for a
64-bit architecture using one of the \c{-arch} flags (see \l{universal
@@ -147,13 +147,11 @@
Carbon and Cocoa both have their advantages and disadvantages. Probably the
easiest way to determine is to look at the version of Mac OS X you are
- targetting. If you are starting a new application and can target 10.5 and
- up, then please consider Cocoa only. If you have an existing application or
- need to target earlier versions of the operating system and do not need
- access to 64-bit or newer Apple technologies, then Carbon is a good fit. If
- your needs fall in between, you can go with a 64-bit Cocoa and 32-bit
- Carbon universal application with the appropriate checks in your code to
- choose the right path based on where you are running the application.
+ targetting. If your application can target 10.5 and up, then we reccomend
+ using Cocoa. If you need to target earlier versions of the operating system
+ and do not need access to 64-bit or newer Apple technologies, then Carbon
+ is a good fit. If your needs fall in between, you can go with a 64-bit Cocoa and 32-bit
+ Carbon universal application.
For Mac OS X 10.6, Apple has started recommending developers to build their
applications 64-bit. The main reason is that there is a small speed
diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc
index 7ab3cd2a27..8e1d9700eb 100644
--- a/doc/src/development/qmake-manual.qdoc
+++ b/doc/src/development/qmake-manual.qdoc
@@ -872,7 +872,7 @@
Developers using Visual Studio to write Qt applications can use the
Visual Studio integration facilities provided with the
- \l{Qt Commercial Editions} and do not need to worry about how
+ \l{Qt Commercial Edition} and do not need to worry about how
project dependencies are managed.
However, some developers may need to import an existing \c qmake project
@@ -1996,7 +1996,7 @@ distinction between shared and
\section1 QMAKE_CFLAGS_WARN_OFF
This variable is not empty if the warn_off
- \l{#TEMPLATE}{TEMPLATE} option is specified. The value of this
+ \l{#CONFIG}{CONFIG} option is specified. The value of this
variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf}
and rarely needs to be modified.
@@ -2004,7 +2004,7 @@ distinction between shared and
\section1 QMAKE_CFLAGS_WARN_ON
This variable is not empty if the warn_on
- \l{#TEMPLATE}{TEMPLATE} option is specified.
+ \l{#CONFIG}{CONFIG} option is specified.
The value of this variable is typically handled by
\c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
to be modified.
@@ -2271,11 +2271,11 @@ For example:
If the OpenGL implementation uses EGL (most OpenGL/ES systems),
then QMAKE_INCDIR_EGL may also need to be set.
- \section1 QMAKE_INCDIR_OPENGL_ES1, QMAKE_INCDIR_OPENGL_ES1CL, QMAKE_INCDIR_OPENGL_ES2
+ \section1 QMAKE_INCDIR_OPENGL_ES1, QMAKE_INCDIR_OPENGL_ES2
These variables contain the location of OpenGL headers files to be added
- to INCLUDEPATH when building an application with OpenGL ES 1, OpenGL ES 1 Common
- Lite or OpenGL ES 2 support respectively.
+ to INCLUDEPATH when building an application with OpenGL ES 1
+ or OpenGL ES 2 support respectively.
The value of this variable is typically handled by \c qmake or
\l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
@@ -2529,10 +2529,10 @@ For example:
variable is typically handled by \c qmake or
\l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
- \section1 QMAKE_LIBS_OPENGL_ES1, QMAKE_LIBS_OPENGL_ES1CL, QMAKE_LIBS_OPENGL_ES2
+ \section1 QMAKE_LIBS_OPENGL_ES1, QMAKE_LIBS_OPENGL_ES2
- These variables contain all the OpenGL libraries for OpenGL ES 1,
- OpenGL ES 1 Common Lite profile and OpenGL ES 2.
+ These variables contain all the OpenGL libraries for OpenGL ES 1
+ and OpenGL ES 2.
The value of these variables is typically handled by \c qmake or
\l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
diff --git a/doc/src/development/qtestlib.qdoc b/doc/src/development/qtestlib.qdoc
index 4b9c65762f..2b38b2c79e 100644
--- a/doc/src/development/qtestlib.qdoc
+++ b/doc/src/development/qtestlib.qdoc
@@ -582,7 +582,7 @@
/*!
\example qtestlib/tutorial3
- \previouspage {Chapter 2 Data Driven Testing}{Chapter 2}
+ \previouspage {Chapter 2: Data Driven Testing}{Chapter 2}
\contentspage {QTestLib Tutorial}{Contents}
\nextpage {Chapter 4: Replaying GUI Events}{Chapter 4}
diff --git a/doc/src/diagrams/contentspropagation/customwidget.py b/doc/src/diagrams/contentspropagation/customwidget.py
index 44c7a6eb32..52a484f172 100755
--- a/doc/src/diagrams/contentspropagation/customwidget.py
+++ b/doc/src/diagrams/contentspropagation/customwidget.py
@@ -5,7 +5,7 @@
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
-## This file is part of the test suite 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/diagrams/contentspropagation/standardwidgets.py b/doc/src/diagrams/contentspropagation/standardwidgets.py
index 6c31b71a51..3ceabf52cf 100755
--- a/doc/src/diagrams/contentspropagation/standardwidgets.py
+++ b/doc/src/diagrams/contentspropagation/standardwidgets.py
@@ -5,7 +5,7 @@
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
-## This file is part of the test suite 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/diagrams/programs/mdiarea.py b/doc/src/diagrams/programs/mdiarea.py
index d9ed472e67..bc8864e0f8 100644
--- a/doc/src/diagrams/programs/mdiarea.py
+++ b/doc/src/diagrams/programs/mdiarea.py
@@ -5,7 +5,7 @@
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
-## This file is part of the test suite 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/diagrams/programs/qpen-dashpattern.py b/doc/src/diagrams/programs/qpen-dashpattern.py
index bc8ab05841..1b38d23fd2 100644
--- a/doc/src/diagrams/programs/qpen-dashpattern.py
+++ b/doc/src/diagrams/programs/qpen-dashpattern.py
@@ -5,7 +5,7 @@
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
-## This file is part of the test suite 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/diagrams/programs/standard_views.py b/doc/src/diagrams/programs/standard_views.py
index dbb310db31..6236a3f9af 100644
--- a/doc/src/diagrams/programs/standard_views.py
+++ b/doc/src/diagrams/programs/standard_views.py
@@ -5,7 +5,7 @@
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
-## This file is part of the test suite 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/examples/completer.qdoc b/doc/src/examples/completer.qdoc
index b69ea69862..c0eb947077 100644
--- a/doc/src/examples/completer.qdoc
+++ b/doc/src/examples/completer.qdoc
@@ -48,7 +48,7 @@
\image completer-example.png
- This example uses a custom item model, \c DirModel, and a QCompleter object.
+ This example uses a custom item model, \c FileSystemModel, and a QCompleter object.
QCompleter is a class that provides completions based on an item model. The
type of model, the completion mode, and the case sensitivity can be
selected using combo boxes.
@@ -61,32 +61,32 @@
\quotefile examples/tools/completer/completer.qrc
- \section1 DirModel Class Definition
+ \section1 FileSystemModel Class Definition
- The \c DirModel class is a subclass of QDirModel, which provides a data
+ The \c FileSystemModel class is a subclass of QFileSystemModel, which provides a data
model for the local filesystem.
- \snippet examples/tools/completer/dirmodel.h 0
+ \snippet examples/tools/completer/fsmodel.h 0
This class only has a constructor and a \c data() function as it is only
created to enable \c data() to return the entire file path for the
- display role, unlike \l{QDirModel}'s \c data() function that only returns
+ display role, unlike \l{QFileSystemModel}'s \c data() function that only returns
the folder and not the drive label. This is further explained in
- \c DirModel's implementation.
+ \c FileSystemModel's implementation.
- \section1 DirModel Class Implementation
+ \section1 FileSystemModel Class Implementation
- The constructor for the \c DirModel class is used to pass \a parent to
- QDirModel.
+ The constructor for the \c FileSystemModel class is used to pass \a parent to
+ QFileSystemModel.
- \snippet examples/tools/completer/dirmodel.cpp 0
+ \snippet examples/tools/completer/fsmodel.cpp 0
As mentioned earlier, the \c data() function is reimplemented in order to
get it to return the entire file parth for the display role. For example,
- with a QDirModel, you will see "Program Files" in the view. However, with
- \c DirModel, you will see "C:\\Program Files".
+ with a QFileSystemModel, you will see "Program Files" in the view. However, with
+ \c FileSystemModel, you will see "C:\\Program Files".
- \snippet examples/tools/completer/dirmodel.cpp 1
+ \snippet examples/tools/completer/fsmodel.cpp 1
The screenshots below illustrate this difference:
@@ -120,7 +120,7 @@
is then invoked.
We set up three QComboBox objects, \c modelComb, \c modeCombo and
- \c caseCombo. By default, the \c modelCombo is set to QDirModel,
+ \c caseCombo. By default, the \c modelCombo is set to QFileSystemModel,
the \c modeCombo is set to "Filtered Popup" and the \c caseCombo is set
to "Case Insensitive".
@@ -202,7 +202,7 @@
model selected by the user.
A \c switch statement is used to change the item model based on the index
- of \c modelCombo. If \c case is 0, we use an unsorted QDirModel, providing
+ of \c modelCombo. If \c case is 0, we use an unsorted QFileSystemModel, providing
us with a file path excluding the drive label.
\snippet examples/tools/completer/mainwindow.cpp 11
diff --git a/doc/src/examples/contextsensitivehelp.qdoc b/doc/src/examples/contextsensitivehelp.qdoc
new file mode 100644
index 0000000000..92ace2d952
--- /dev/null
+++ b/doc/src/examples/contextsensitivehelp.qdoc
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example help/contextsensitivehelp
+ \title Context-Sensitive Help Example
+
+ This example shows how to use the services of the QHelpEngineCore class.
+*/
diff --git a/doc/src/examples/editabletreemodel.qdoc b/doc/src/examples/editabletreemodel.qdoc
index d925c4340c..38754b6451 100644
--- a/doc/src/examples/editabletreemodel.qdoc
+++ b/doc/src/examples/editabletreemodel.qdoc
@@ -223,7 +223,7 @@
corresponding \c TreeItem, and return model indexes that correspond to
its parents and children.
- In the diagram, we show how the model's \l{TreeModel::parent()}{parent()}
+ In the diagram, we show how the model's \l{TreeModel::parent}{parent()}
implementation obtains the model index corresponding to the parent of
an item supplied by the caller, using the items shown in a
\l{Relations-between-internal-items}{previous diagram}.
diff --git a/doc/src/examples/hellogl_es.qdoc b/doc/src/examples/hellogl_es.qdoc
index fca1150a3b..67a83e03e5 100644
--- a/doc/src/examples/hellogl_es.qdoc
+++ b/doc/src/examples/hellogl_es.qdoc
@@ -64,29 +64,6 @@
the OpenGL ES window within the native window manager. In
QGLWidget::initializeGL() we initialize OpenGL ES.
- \section1 Using OpenGL ES rendering commands
-
- To update the scene, we reimplment QGLWidget::paintGL(). We use OpenGL ES
- rendering commands just like we do with standard OpenGL. Since the OpenGL
- ES common light profile only supports fixed point functions, we need to
- abstract it somehow. Hence, we define an abstraction layer in
- \c{cl_helper.h}.
-
- \snippet examples/opengl/hellogl_es/cl_helper.h 0
-
- Instead of \c glFogxv() or \c glFogfv() we use \c q_glFogv() and to
- convert the coordinates of a vertice we use the macro \c f2vt(). That way,
- if QT_OPENGL_ES_CL is defined we use the fixed point functions and every
- float is converted to fixed point.
-
- If QT_OPENGL_ES_CL is not defined we use the floating point functions.
-
- \snippet examples/opengl/hellogl_es/cl_helper.h 1
-
- This way we support OpenGL ES Common and Common Light with the same code
- and abstract the fact that we use either the floating point functions or
- otherwise the fixed point functions.
-
\section1 Porting OpenGL to OpenGL ES
Since OpenGL ES is missing the immediate mode and does not support quads,
diff --git a/doc/src/examples/svgalib.qdoc b/doc/src/examples/svgalib.qdoc
index cf6512c12a..91421125b5 100644
--- a/doc/src/examples/svgalib.qdoc
+++ b/doc/src/examples/svgalib.qdoc
@@ -43,9 +43,6 @@
\example qws/svgalib
\title Accelerated Graphics Driver Example
- \warning This example was designed to work with Qt 4.4 and will not work
- with current versions of Qt. It will be removed from Qt 4.7.
-
The Accelerated Graphics Driver example shows how you can write
your own accelerated graphics driver and \l {add your graphics
driver to Qt for Embedded Linux}. In \l{Qt for Embedded Linux},
diff --git a/doc/src/files-and-resources/datastreamformat.qdoc b/doc/src/files-and-resources/datastreamformat.qdoc
index 1c2d8875cc..bab2c2c3e0 100644
--- a/doc/src/files-and-resources/datastreamformat.qdoc
+++ b/doc/src/files-and-resources/datastreamformat.qdoc
@@ -47,7 +47,7 @@
The \l QDataStream allows you to serialize some of the Qt data types.
The table below lists the data types that QDataStream can serialize
and how they are represented. The format described below is
- \l{QDataStream::setVersion()}{version 8}.
+ \l{QDataStream::setVersion()}{version 12}.
It is always best to cast integers to a Qt integer type, such as
qint16 or quint32, when reading and writing. This ensures that
@@ -57,9 +57,9 @@
\table
\row \o bool
- \o \list
- \o boolean
- \endlist
+ \o \list
+ \o boolean
+ \endlist
\row \o qint8
\o \list
\o signed byte
@@ -145,6 +145,17 @@
\o Time (QTime)
\o 0 for Qt::LocalTime, 1 for Qt::UTC (quint8)
\endlist
+ \row \o QEasingCurve
+ \o \list
+ \o type (quint8)
+ \o func (quint64)
+ \o hasConfig (bool)
+ \o If hasConfig is true then these fields follow:
+ \o list
+ \o period (double)
+ \o amplitude (double)
+ \o overshoot (double)
+ \endlist
\row \o QFont
\o \list
\o The family (QString)
diff --git a/doc/src/files-and-resources/resources.qdoc b/doc/src/files-and-resources/resources.qdoc
index 639aaf4a21..00646ac5ca 100644
--- a/doc/src/files-and-resources/resources.qdoc
+++ b/doc/src/files-and-resources/resources.qdoc
@@ -92,8 +92,11 @@
system.
By default, resources are accessible in the application under the
- same name as they have in the source tree, with a \c :/ prefix.
- For example, the path \c :/images/cut.png would give access to the
+ same file name as they have in the source tree, with a \c :/ prefix,
+ or by a \link QUrl URL\endlink with a \c qrc scheme.
+
+ For example, the file path \c :/images/cut.png or the URL
+ \c qrc:///images/cut.png would give access to the
\c cut.png file, whose location in the application's source tree
is \c images/cut.png. This can be changed using the \c file tag's
\c alias attribute:
diff --git a/doc/src/frameworks-technologies/activeqt-server.qdoc b/doc/src/frameworks-technologies/activeqt-server.qdoc
index f28097fe7f..4afcee1114 100644
--- a/doc/src/frameworks-technologies/activeqt-server.qdoc
+++ b/doc/src/frameworks-technologies/activeqt-server.qdoc
@@ -99,10 +99,6 @@
\o Register the server
\endlist
- Note that the QAxServer build system is not supported on Windows 98/ME
- (attaching of resources to a binary is not possible there), but a server
- built on Windows NT/2000/XP will work on previous Windows versions as well.
-
To skip the post-processing step, also set the \c qaxserver_no_postlink
configuration.
@@ -413,8 +409,7 @@
\footnote
OLE needs to marshal user defined types by reference (ByRef), and cannot
marshal them by value (ByVal). This is why const-references and object
- parameters are not supported for QRect, QSize and QPoint. Also note that
- servers with this datatype require Windows 98 or DCOM 1.2 to be installed.
+ parameters are not supported for QRect, QSize and QPoint.
\endfootnote
\o [in, out] struct QRect (user defined)
\row
diff --git a/doc/src/frameworks-technologies/activeqt.qdoc b/doc/src/frameworks-technologies/activeqt.qdoc
index 67b9bb37c2..e24959d736 100644
--- a/doc/src/frameworks-technologies/activeqt.qdoc
+++ b/doc/src/frameworks-technologies/activeqt.qdoc
@@ -93,7 +93,7 @@
plugin that integrates the QAxContainer module into \l{Qt
Designer}.
- The ActiveQt modules are part of the \l{Qt Full Framework Edition} and
+ The ActiveQt modules are part of the \l{Qt Commercial Edition} and
the \l{Open Source Versions of Qt}.
\sa {QAxContainer Module}, {QAxServer Module}
diff --git a/doc/src/frameworks-technologies/containers.qdoc b/doc/src/frameworks-technologies/containers.qdoc
index 86920fdde0..505b65c987 100644
--- a/doc/src/frameworks-technologies/containers.qdoc
+++ b/doc/src/frameworks-technologies/containers.qdoc
@@ -612,11 +612,14 @@
Qt automatically takes a copy of the container when it enters a
\c foreach loop. If you modify the container as you are
- iterating, that won't affect the loop. (If you don't modify the
+ iterating, that won't affect the loop. (If you do not modify the
container, the copy still takes place, but thanks to \l{implicit
- sharing} copying a container is very fast.) Similarly, declaring
- the variable to be a non-const reference, in order to modify the
- current item in the list will not work either.
+ sharing} copying a container is very fast.)
+
+ Since foreach creates a copy of the container, using a non-const
+ reference for the variable does not allow you to modify the original
+ container. It only affects the copy, which is probably not what you
+ want.
In addition to \c foreach, Qt also provides a \c forever
pseudo-keyword for infinite loops:
diff --git a/doc/src/getting-started/demos.qdoc b/doc/src/getting-started/demos.qdoc
index 03e5aa6ad0..6974634123 100644
--- a/doc/src/getting-started/demos.qdoc
+++ b/doc/src/getting-started/demos.qdoc
@@ -46,7 +46,7 @@
\previouspage Qt Examples
\contentspage How to Learn Qt
- \nextpage What's New in Qt 4.6
+ \nextpage What's New in Qt 4.7
This is the list of demonstrations in Qt's \c demos directory.
These are larger and more complicated programs than the
diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc
index 0c18773e32..bc6404cd27 100644
--- a/doc/src/getting-started/examples.qdoc
+++ b/doc/src/getting-started/examples.qdoc
@@ -1218,6 +1218,8 @@
\list
\o \l{help/simpletextviewer}{Simple Text Viewer}\raisedaster
+ \o \l{help/remotecontrol}{Remote Control}
+ \o \l{help/contextsensitivehelp}{Context-Sensitive Help}
\endlist
Examples marked with an asterisk (*) are fully documented.
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index 561cc070fa..b23629d645 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -176,7 +176,7 @@ consult the installation instructions provided instead of the ones in
this document.
\o \l{Open Source Versions of Qt} is not officially supported for use with
any version of Visual Studio. Integration with Visual Studio is available
-as part of the \l{Qt Commercial Editions}.
+as part of the \l{Qt Commercial Edition}.
\endlist
\endtable
@@ -740,9 +740,9 @@ If you are using pre-built binaries, follow the instructions given in the
\l{http://www.microsoft.com/downloads/details.aspx?FamilyId=BB4A75AB-E2D4-4C96-B39D-37BAF6B5B1DC&amp;displaylang=en}{here}
to avoid runtime conflicts.
- If you are using a source code package of Qt, you must first install Perl so
+ If you are using a source edition of Qt, you must first install Perl so
that the syncqt script invoked by configure can be executed. You can download
- this \l{http://www.activestate/downloads/}{here}.
+ this \l{http://www.activestate.com/downloads/}{here}.
To build Qt with Phonon on Windows, you require:
diff --git a/doc/src/howtos/timers.qdoc b/doc/src/howtos/timers.qdoc
index b9c7bfa6f4..cfc2fb4abd 100644
--- a/doc/src/howtos/timers.qdoc
+++ b/doc/src/howtos/timers.qdoc
@@ -72,7 +72,7 @@
The upper limit for the interval value is determined by the number
of milliseconds that can be specified in a signed integer
(in practice, this is a period of just over 24 days). The accuracy
- depends on the underlying operating system. Windows 98 has 55
+ depends on the underlying operating system. Windows 2000 has 15
millisecond accuracy; other systems that we have tested can handle
1 millisecond intervals.
diff --git a/doc/src/images/container_bench.png b/doc/src/images/container_bench.png
new file mode 100644
index 0000000000..a707b1ac1f
--- /dev/null
+++ b/doc/src/images/container_bench.png
Binary files differ
diff --git a/doc/src/images/declarative-anchors_example.png b/doc/src/images/declarative-anchors_example.png
new file mode 100644
index 0000000000..293cd4b362
--- /dev/null
+++ b/doc/src/images/declarative-anchors_example.png
Binary files differ
diff --git a/doc/src/images/declarative-anchors_example2.png b/doc/src/images/declarative-anchors_example2.png
new file mode 100644
index 0000000000..6d3be7d05d
--- /dev/null
+++ b/doc/src/images/declarative-anchors_example2.png
Binary files differ
diff --git a/doc/src/images/declarative-image_fillMode.gif b/doc/src/images/declarative-image_fillMode.gif
new file mode 100644
index 0000000000..eb0a9afb7f
--- /dev/null
+++ b/doc/src/images/declarative-image_fillMode.gif
Binary files differ
diff --git a/doc/src/images/declarative-image_tile.png b/doc/src/images/declarative-image_tile.png
new file mode 100644
index 0000000000..b946a6ded1
--- /dev/null
+++ b/doc/src/images/declarative-image_tile.png
Binary files differ
diff --git a/doc/src/images/declarative-item_opacity1.png b/doc/src/images/declarative-item_opacity1.png
new file mode 100644
index 0000000000..cde973be8d
--- /dev/null
+++ b/doc/src/images/declarative-item_opacity1.png
Binary files differ
diff --git a/doc/src/images/declarative-item_opacity2.png b/doc/src/images/declarative-item_opacity2.png
new file mode 100644
index 0000000000..8627360717
--- /dev/null
+++ b/doc/src/images/declarative-item_opacity2.png
Binary files differ
diff --git a/doc/src/images/declarative-item_stacking1.png b/doc/src/images/declarative-item_stacking1.png
new file mode 100644
index 0000000000..18f41484e5
--- /dev/null
+++ b/doc/src/images/declarative-item_stacking1.png
Binary files differ
diff --git a/doc/src/images/declarative-item_stacking2.png b/doc/src/images/declarative-item_stacking2.png
new file mode 100644
index 0000000000..7a71bcd36d
--- /dev/null
+++ b/doc/src/images/declarative-item_stacking2.png
Binary files differ
diff --git a/doc/src/images/declarative-item_stacking3.png b/doc/src/images/declarative-item_stacking3.png
new file mode 100644
index 0000000000..cde973be8d
--- /dev/null
+++ b/doc/src/images/declarative-item_stacking3.png
Binary files differ
diff --git a/doc/src/images/declarative-item_stacking4.png b/doc/src/images/declarative-item_stacking4.png
new file mode 100644
index 0000000000..3fdf627f1a
--- /dev/null
+++ b/doc/src/images/declarative-item_stacking4.png
Binary files differ
diff --git a/doc/src/images/declarative-nopercent.png b/doc/src/images/declarative-nopercent.png
new file mode 100644
index 0000000000..28b00a91e7
--- /dev/null
+++ b/doc/src/images/declarative-nopercent.png
Binary files differ
diff --git a/doc/src/images/declarative-pathattribute.png b/doc/src/images/declarative-pathattribute.png
new file mode 100644
index 0000000000..57cd049e04
--- /dev/null
+++ b/doc/src/images/declarative-pathattribute.png
Binary files differ
diff --git a/doc/src/images/declarative-pathcubic.png b/doc/src/images/declarative-pathcubic.png
new file mode 100644
index 0000000000..ffbca5d91e
--- /dev/null
+++ b/doc/src/images/declarative-pathcubic.png
Binary files differ
diff --git a/doc/src/images/declarative-pathquad.png b/doc/src/images/declarative-pathquad.png
new file mode 100644
index 0000000000..65f199974f
--- /dev/null
+++ b/doc/src/images/declarative-pathquad.png
Binary files differ
diff --git a/doc/src/images/declarative-percent.png b/doc/src/images/declarative-percent.png
new file mode 100644
index 0000000000..c277055299
--- /dev/null
+++ b/doc/src/images/declarative-percent.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo1.png b/doc/src/images/declarative-qtlogo1.png
new file mode 100644
index 0000000000..940d159ae4
--- /dev/null
+++ b/doc/src/images/declarative-qtlogo1.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo2.png b/doc/src/images/declarative-qtlogo2.png
new file mode 100644
index 0000000000..b1d128a294
--- /dev/null
+++ b/doc/src/images/declarative-qtlogo2.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo3.png b/doc/src/images/declarative-qtlogo3.png
new file mode 100644
index 0000000000..d5165248cf
--- /dev/null
+++ b/doc/src/images/declarative-qtlogo3.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo4.png b/doc/src/images/declarative-qtlogo4.png
new file mode 100644
index 0000000000..7c8aa64210
--- /dev/null
+++ b/doc/src/images/declarative-qtlogo4.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo5.png b/doc/src/images/declarative-qtlogo5.png
new file mode 100644
index 0000000000..b7b3513e53
--- /dev/null
+++ b/doc/src/images/declarative-qtlogo5.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo6.png b/doc/src/images/declarative-qtlogo6.png
new file mode 100644
index 0000000000..07a078f912
--- /dev/null
+++ b/doc/src/images/declarative-qtlogo6.png
Binary files differ
diff --git a/doc/src/images/declarative-rect.png b/doc/src/images/declarative-rect.png
new file mode 100644
index 0000000000..173759ae57
--- /dev/null
+++ b/doc/src/images/declarative-rect.png
Binary files differ
diff --git a/doc/src/images/declarative-rect_gradient.png b/doc/src/images/declarative-rect_gradient.png
new file mode 100644
index 0000000000..f79d579bec
--- /dev/null
+++ b/doc/src/images/declarative-rect_gradient.png
Binary files differ
diff --git a/doc/src/images/declarative-rect_tint.png b/doc/src/images/declarative-rect_tint.png
new file mode 100644
index 0000000000..3a440137bd
--- /dev/null
+++ b/doc/src/images/declarative-rect_tint.png
Binary files differ
diff --git a/doc/src/images/declarative-removebutton-close.png b/doc/src/images/declarative-removebutton-close.png
new file mode 100644
index 0000000000..d73f8e182e
--- /dev/null
+++ b/doc/src/images/declarative-removebutton-close.png
Binary files differ
diff --git a/doc/src/images/declarative-removebutton-open.png b/doc/src/images/declarative-removebutton-open.png
new file mode 100644
index 0000000000..b54d797d95
--- /dev/null
+++ b/doc/src/images/declarative-removebutton-open.png
Binary files differ
diff --git a/doc/src/images/declarative-removebutton.gif b/doc/src/images/declarative-removebutton.gif
new file mode 100644
index 0000000000..ca4d7e6be0
--- /dev/null
+++ b/doc/src/images/declarative-removebutton.gif
Binary files differ
diff --git a/doc/src/images/declarative-removebutton.png b/doc/src/images/declarative-removebutton.png
new file mode 100644
index 0000000000..f783e6abae
--- /dev/null
+++ b/doc/src/images/declarative-removebutton.png
Binary files differ
diff --git a/doc/src/images/declarative-reuse-1.png b/doc/src/images/declarative-reuse-1.png
new file mode 100644
index 0000000000..c7044573e5
--- /dev/null
+++ b/doc/src/images/declarative-reuse-1.png
Binary files differ
diff --git a/doc/src/images/declarative-reuse-2.png b/doc/src/images/declarative-reuse-2.png
new file mode 100644
index 0000000000..0b6006b8f2
--- /dev/null
+++ b/doc/src/images/declarative-reuse-2.png
Binary files differ
diff --git a/doc/src/images/declarative-reuse-3.png b/doc/src/images/declarative-reuse-3.png
new file mode 100644
index 0000000000..695a7253fd
--- /dev/null
+++ b/doc/src/images/declarative-reuse-3.png
Binary files differ
diff --git a/doc/src/images/declarative-reuse-bluerect.png b/doc/src/images/declarative-reuse-bluerect.png
new file mode 100644
index 0000000000..97dbb5f5c6
--- /dev/null
+++ b/doc/src/images/declarative-reuse-bluerect.png
Binary files differ
diff --git a/doc/src/images/declarative-reuse-focus.png b/doc/src/images/declarative-reuse-focus.png
new file mode 100644
index 0000000000..f91d374e7b
--- /dev/null
+++ b/doc/src/images/declarative-reuse-focus.png
Binary files differ
diff --git a/doc/src/images/declarative-rotation.png b/doc/src/images/declarative-rotation.png
new file mode 100644
index 0000000000..b4031f5ae2
--- /dev/null
+++ b/doc/src/images/declarative-rotation.png
Binary files differ
diff --git a/doc/src/images/declarative-roundrect.png b/doc/src/images/declarative-roundrect.png
new file mode 100644
index 0000000000..607da81d72
--- /dev/null
+++ b/doc/src/images/declarative-roundrect.png
Binary files differ
diff --git a/doc/src/images/declarative-scale.png b/doc/src/images/declarative-scale.png
new file mode 100644
index 0000000000..bab729e216
--- /dev/null
+++ b/doc/src/images/declarative-scale.png
Binary files differ
diff --git a/doc/src/images/declarative-scalegrid.png b/doc/src/images/declarative-scalegrid.png
new file mode 100644
index 0000000000..32d8712568
--- /dev/null
+++ b/doc/src/images/declarative-scalegrid.png
Binary files differ
diff --git a/doc/src/images/declarative-text.png b/doc/src/images/declarative-text.png
new file mode 100644
index 0000000000..c1a4112500
--- /dev/null
+++ b/doc/src/images/declarative-text.png
Binary files differ
diff --git a/doc/src/images/declarative-textedit.gif b/doc/src/images/declarative-textedit.gif
new file mode 100644
index 0000000000..7186eb9f4f
--- /dev/null
+++ b/doc/src/images/declarative-textedit.gif
Binary files differ
diff --git a/doc/src/images/declarative-textformat.png b/doc/src/images/declarative-textformat.png
new file mode 100644
index 0000000000..ade1b45429
--- /dev/null
+++ b/doc/src/images/declarative-textformat.png
Binary files differ
diff --git a/doc/src/images/declarative-textstyle.png b/doc/src/images/declarative-textstyle.png
new file mode 100644
index 0000000000..858c1bcbff
--- /dev/null
+++ b/doc/src/images/declarative-textstyle.png
Binary files differ
diff --git a/doc/src/images/declarative-transformorigin.png b/doc/src/images/declarative-transformorigin.png
new file mode 100644
index 0000000000..4af320fbc5
--- /dev/null
+++ b/doc/src/images/declarative-transformorigin.png
Binary files differ
diff --git a/doc/src/images/declarative-tutorial-list-closed.png b/doc/src/images/declarative-tutorial-list-closed.png
new file mode 100644
index 0000000000..4a0fee9f0f
--- /dev/null
+++ b/doc/src/images/declarative-tutorial-list-closed.png
Binary files differ
diff --git a/doc/src/images/declarative-tutorial-list-open.png b/doc/src/images/declarative-tutorial-list-open.png
new file mode 100644
index 0000000000..16a9c94b6c
--- /dev/null
+++ b/doc/src/images/declarative-tutorial-list-open.png
Binary files differ
diff --git a/doc/src/images/declarative-tutorial-list.png b/doc/src/images/declarative-tutorial-list.png
new file mode 100644
index 0000000000..723fe2fad9
--- /dev/null
+++ b/doc/src/images/declarative-tutorial-list.png
Binary files differ
diff --git a/doc/src/images/declarative-tutorial1.png b/doc/src/images/declarative-tutorial1.png
new file mode 100644
index 0000000000..c9d3844cbd
--- /dev/null
+++ b/doc/src/images/declarative-tutorial1.png
Binary files differ
diff --git a/doc/src/images/declarative-tutorial2.png b/doc/src/images/declarative-tutorial2.png
new file mode 100644
index 0000000000..835484aa4c
--- /dev/null
+++ b/doc/src/images/declarative-tutorial2.png
Binary files differ
diff --git a/doc/src/images/declarative-tutorial3.gif b/doc/src/images/declarative-tutorial3.gif
new file mode 100644
index 0000000000..e2eae81b94
--- /dev/null
+++ b/doc/src/images/declarative-tutorial3.gif
Binary files differ
diff --git a/doc/src/images/declarative-tutorial3_animation.gif b/doc/src/images/declarative-tutorial3_animation.gif
new file mode 100644
index 0000000000..80b78dea9c
--- /dev/null
+++ b/doc/src/images/declarative-tutorial3_animation.gif
Binary files differ
diff --git a/doc/src/images/quick_screens.png b/doc/src/images/quick_screens.png
new file mode 100644
index 0000000000..76b25d9df2
--- /dev/null
+++ b/doc/src/images/quick_screens.png
Binary files differ
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
index 7c3b4a1614..52d4488c66 100644
--- a/doc/src/index.qdoc
+++ b/doc/src/index.qdoc
@@ -60,7 +60,7 @@
<ul>
<li><a href="installation.html">Installation</a> and <a href="how-to-learn-qt.html">First Steps with Qt</a></li>
<li><a href="tutorials.html">Tutorials</a> and <a href="examples.html">Examples</a></li>
- <li><a href="demos.html">Demonstrations</a> and <a href="qt4-6-intro.html"><b>New in Qt 4.6</b></a></li>
+ <li><a href="demos.html">Demonstrations</a> and <a href="qt4-7-intro.html"><b>New in Qt 4.7</b></a></li>
</ul>
</td>
<td valign="top">
@@ -103,6 +103,7 @@
<li><a href="paintsystem.html">Painting and Printing</a></li>
<li><a href="graphicsview.html">Canvas UI with Graphics View</a></li>
<li><a href="webintegration.html">Integrating Web Content</a></li>
+ <li><a href="declarativeui.html">Declarative UI (QML)</a></li>
</ul>
</td>
<td valign="top">
@@ -141,7 +142,7 @@
<td valign="top">
<ul>
<li><a href="gpl.html">GNU GPL</a>, <a href="lgpl.html">GNU LGPL</a></li>
- <li><a href="commercialeditions.html">Commercial Editions</a></li>
+ <li><a href="commercialedition.html">Commercial Edition</a></li>
<li><a href="licensing.html">Licenses Used in Qt</a></li>
</ul>
</td>
diff --git a/doc/src/internationalization/i18n.qdoc b/doc/src/internationalization/i18n.qdoc
index b26a983603..d5f32e3338 100644
--- a/doc/src/internationalization/i18n.qdoc
+++ b/doc/src/internationalization/i18n.qdoc
@@ -512,9 +512,6 @@
Note that some Windows programs do not understand big-endian
Unicode text files even though that is the order prescribed by
the Unicode Standard in the absence of higher-level protocols.
- \o Unlike programs written with MFC or plain winlib, Qt programs
- are portable between Windows 98 and Windows NT.
- \e {You do not need different binaries to support Unicode.}
\endlist
\section2 Mac OS X
@@ -732,7 +729,7 @@
\section1 Further Reading
- \l{Qt Linguist Manual}, \l{Hello tr Example}, \l{Translation Rules for Plurals}
+ \l{Qt Linguist Manual}, \l{Hello tr() Example}, \l{Translation Rules for Plurals}
*/
/*!
diff --git a/doc/src/legal/3rdparty.qdoc b/doc/src/legal/3rdparty.qdoc
index b7104499cd..d608038bde 100644
--- a/doc/src/legal/3rdparty.qdoc
+++ b/doc/src/legal/3rdparty.qdoc
@@ -116,9 +116,9 @@
\hr
- Copyright (C) 2004,2007  Red Hat, Inc.\br
- Copyright (C) 1998-2004  David Turner and Werner Lemberg\br
- Copyright (C) 2006  Behdad Esfahbod\br
+ Copyright (C) 2004,2007 Red Hat, Inc.\br
+ Copyright (C) 1998-2004 David Turner and Werner Lemberg\br
+ Copyright (C) 2006 Behdad Esfahbod\br
Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
This is part of HarfBuzz, an OpenType Layout engine library.
@@ -137,7 +137,7 @@
THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
+ FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
@@ -146,7 +146,7 @@
See \c src/3rdparty/harfbuzz/COPYING.FTL and src/3rdparty/harfbuzz/COPYING.GPL
for license details.
- \section1 The Independent JPEG Group's JPEG Software (\c libjpeg) version 6b
+ \section1 The Independent JPEG Group's JPEG Software (\c libjpeg) version 8
\e{This package contains C software to implement JPEG image compression and
decompression. JPEG (pronounced "jay-peg") is a standardized compression
@@ -156,6 +156,12 @@
exactly identical to the input image.} -- quoted from \c
src/3rdparty/libjpeg/README.
+ \hr
+
+ This software is based in part on the work of the Independent JPEG Group.
+
+ \hr
+
See \c src/3rdparty/libjpeg/README for license details.
\section1 MD4 (\c md4.cpp and \c md4.h)
@@ -192,13 +198,53 @@
See \c src/3rdparty/libmng/LICENSE for license details.
- \section1 PNG Reference Library (\c libpng) version 1.2.29
+ \section1 PNG Reference Library (\c libpng) version 1.4.0
\e{Libpng was written as a companion to the PNG specification, as a way
of reducing the amount of time and effort it takes to support the PNG
file format in application programs.} -- quoted from \c
src/3rdparty/libpng/libpng.txt.
+ \hr
+
+ copyright (C) 1999 by Willem van Schaik <willem@schaik.com>
+
+ version 1.0 - 1999.10.15 - First version.
+
+ Permission to use, copy, modify, and distribute this software and
+ its documentation for any purpose and without fee is hereby granted,
+ provided that the above copyright notice appear in all copies and
+ that both that copyright notice and this permission notice appear in
+ supporting documentation. This software is provided "as is" without
+ express or implied warranty.
+
+ \hr
+
+ Copyright (c) 1998-2001 Greg Roelofs. All rights reserved.
+
+ This software is provided "as is," without warranty of any kind,
+ express or implied. In no event shall the author or contributors
+ be held liable for any damages arising in any way from the use of
+ this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute
+ it freely, subject to the following restrictions:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, disclaimer, and this list of conditions.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, disclaimer, and this list of conditions in the documenta-
+ tion and/or other materials provided with the distribution.
+ 3. All advertising materials mentioning features or use of this
+ software must display the following acknowledgment:
+
+ This product includes software developed by Greg Roelofs
+ and contributors for the book, "PNG: The Definitive Guide,"
+ published by O'Reilly and Associates.
+
+ \hr
+
See \c src/3rdparty/libpng/LICENSE for license details.
\section1 The ptmalloc memory allocator (\c ptmalloc3) version 1.8
@@ -259,11 +305,52 @@
\hr
- Copyright (c) 1988-1997 Sam Leffler\br
- Copyright (c) 1991-1997 Silicon Graphics, Inc.\br
- Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\br
- Copyright (c) 1997 Greg Ward Larson
+ Copyright (c) 1987, 1993, 1994\br
+ The Regents of the University of California. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:\br
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.\br
+ 2. 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.\br
+ 3. Neither the name of the University 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 REGENTS 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 REGENTS 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.
+
+ \hr
+ Copyright (C) 1988-1997 Sam Leffler\br
+ Copyright (C) 1991-1997 Silicon Graphics, Inc.\br
+ Copyright (c) Joris Van Damme <info@awaresystems.be>\br
+ Copyright (c) AWare Systems <http://www.awaresystems.be/>\br
+ Portions Copyright (C) 1985-1987, 1990 Regents of the University of California\br
+ Portions Copyright (C) 1990, 1991 Digital Equipment Corporation\br
+ Portions Copyright (C) 1990 Sun Microsystems, Inc.\br
+ Portions Copyright (C) 1990, 1995 Frank D. Cringle\br
+ Portions Copyright (C) 1996 BancTec AB\br
+ Portions Copyright (C) 1996 Mike Johnson\br
+ Portions Copyright (C) 1996 Pixar\br
+ Portions Copyright (C) 1997 Greg Ward Larson\br
+ Portions Copyright (C) 2000 Frank Warmerdam\br
+ Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\br
+ Copyright (c( 1996 USAF Phillips Laboratory\br
+ Additions (c) Richard Nolde 2006-2009
+
Permission to use, copy, modify, distribute, and sell this software and
its documentation for any purpose is hereby granted without fee, provided
that (i) the above copyright notices and this permission notice appear in
@@ -271,11 +358,11 @@
Sam Leffler and Silicon Graphics may not be used in any advertising or
publicity relating to the software without the specific, prior written
permission of Sam Leffler and Silicon Graphics.
-
+
THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-
+
IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
@@ -285,11 +372,30 @@
\hr
- Copyright (c) 1996-1997 Sam Leffler\br
- Copyright (c) 1996 Pixar\br
- Copyright (c) 1991-1997 Silicon Graphics, Inc.\br
- Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
+ Copyright (c) 1985, 1986 The Regents of the University of California.\br
+ All rights reserved.
+
+ This code is derived from software contributed to Berkeley by
+ James A. Woods, derived from original work by Spencer Thomas
+ and Joseph Orost.
+
+ Redistribution and use in source and binary forms are permitted
+ provided that the above copyright notice and this paragraph are
+ duplicated in all such forms and that any documentation,
+ advertising materials, and other materials related to such
+ distribution and use acknowledge that the software was developed
+ by the University of California, Berkeley. The name of the
+ University may not be used to endorse or promote products derived
+ from this software without specific prior written permission.
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ \hr
+ Copyright (c) 1996-1997 Sam Leffler\br
+ Copyright (c) 1996 Pixar
+
Permission to use, copy, modify, distribute, and sell this software and
its documentation for any purpose is hereby granted without fee, provided
that (i) the above copyright notices and this permission notice appear in
@@ -297,11 +403,11 @@
Pixar, Sam Leffler and Silicon Graphics may not be used in any advertising or
publicity relating to the software without the specific, prior written
permission of Pixar, Sam Leffler and Silicon Graphics.
-
+
THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-
+
IN NO EVENT SHALL PIXAR, SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
@@ -311,28 +417,7 @@
\hr
- Copyright (c) 1985, 1986 The Regents of the University of California.\br
- All rights reserved.
-
- This code is derived from software contributed to Berkeley by
- James A. Woods, derived from original work by Spencer Thomas
- and Joseph Orost.
-
- Redistribution and use in source and binary forms are permitted
- provided that the above copyright notice and this paragraph are
- duplicated in all such forms and that any documentation,
- advertising materials, and other materials related to such
- distribution and use acknowledge that the software was developed
- by the University of California, Berkeley.  The name of the
- University may not be used to endorse or promote products derived
- from this software without specific prior written permission.
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-
- \hr
-
- See \c src/3rdparty/libtiff/COPYRIGHT for license details.
+ See \c src/3rdparty/libtiff/README for license details.
\section1 Wintab API (\c wintab)
@@ -364,7 +449,7 @@
documentation for such software.
THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
- WARRANTY.  IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
+ WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
diff --git a/doc/src/legal/commercialeditions.qdoc b/doc/src/legal/commercialeditions.qdoc
index 4e4437680a..dde8d69809 100644
--- a/doc/src/legal/commercialeditions.qdoc
+++ b/doc/src/legal/commercialeditions.qdoc
@@ -40,61 +40,19 @@
****************************************************************************/
/*!
- \page commercialeditions.html
- \title Qt Commercial Editions
+ \page commercialedition.html
+ \title Qt Commercial Edition
\ingroup licensing
\brief Information about the license and features of the Commercial Edition.
- \keyword Qt Full Framework Edition
- \keyword Qt GUI Framework Edition
-
- Two editions of Qt are available under a commercial license:
- Qt GUI Framework Edition, and Qt Full Framework Edition.
+ Qt can be used to develop closed source software if you obtain a commercial
+ license.
If you want to develop Free or Open Source software for release using a recognized
Open Source license, you can use the \l{Open Source Versions of Qt}.
The table below summarizes the differences between the two commercial editions:
- \table 75%
- \header \o{1,2} Features \o{2,1} Editions
- \header \o Qt GUI Framework \o Qt Full Framework
- \row \o \l{QtCore}{Qt Core classes (QtCore)} \o \bold{X} \o \bold{X}
- \row \o \l{QtGui}{Qt GUI classes (QtGui)} \o \bold{(X)} \o \bold{X}
- \row \o \l{Graphics View Classes} (part of QtGui) \o \o \bold{X}
- \row \o \l{QtNetwork}{Networking (QtNetwork)} \o \o \bold{X}
- \row \o \l{QtOpenGL}{OpenGL (QtOpenGL)} \o \o \bold{X}
- \row \o \l{QtScript}{Scripting (QtScript)} \o \o \bold{X}
- \row \o \l{QtScriptTools}{Script Debugging (QtScriptTools)}\o \o \bold{X}
- \row \o \l{QtSql}{Database/SQL (QtSql)} \o \o \bold{X}
- \row \o \l{QtSvg}{SVG (QtSvg)} \o \o \bold{X}
- \row \o \l{QtWebKit}{WebKit integration (QtWebKit)} \o \o \bold{X}
- \row \o \l{QtXml}{XML (QtXml)} \o \o \bold{X}
- \row \o \l{QtXmlPatterns}{XQuery and XPath (QtXmlPatterns)}\o \o \bold{X}
- \row \o \l{Qt3Support}{Qt 3 Support (Qt3Support)} \o \bold{(X)} \o \bold{X}
- \row \o \l{QtHelp}{Help system (QtHelp)} \o \o \bold{X}
- \row \o \l{QtDBus}{D-Bus IPC support (QtDBus)} \o \bold{X} \o \bold{X}
- \row \o \l{QtDesigner}{\QD extension classes (QtDesigner)} \o \o \bold{X}
- \row \o \l{QtTest}{Unit testing framework (QtTest)} \o \bold{X} \o \bold{X}
- \row \o \l{QtUiTools}{Run-time form handling (QtUiTools)} \o \o \bold{X}
- \row \o \l{Phonon Module}{Phonon Multimedia Framework} \o \o \bold{X}
- \row \o \l{ActiveQt} \o \o \bold{<X>}
- \endtable
-
- \bold{(X)} The Qt GUI Framework Edition contains selected classes from the QtGui and
- Qt3Support modules corresponding to the functionality available in the Qt 3 Professional
- Edition.
-
- \bold{<X>} The ActiveQt module is only available on Windows.
-
- Lists of the classes available in each edition are available on the
- following pages:
-
- \list
- \o \l{Qt GUI Framework Edition}
- \o \l{Qt Full Framework Edition}
- \endlist
-
Please see the \l{Supported Platforms}{list of supported
platforms} for up-to-date information about the various platforms
and compilers that Qt supports.
@@ -103,36 +61,13 @@
\l{Qt Licensing Overview} and information on \l{Qt License Pricing}
for commercial editions of Qt and other Qt-related products.
- To purchase, please visit the \l{How to Order}{online order
- form}.
+ To purchase, please visit the \l{How to Order}{online order form}.
- For further information and assistance, please contact Qt
- sales.
+ For further information and assistance, please contact Qt sales.
Web: http://qt.nokia.com/contact.
Phone, U.S. office (for North America): \bold{1-650-813-1676}.
- Phone, Norway office (for the rest of the world): \bold{+47 21 60
- 48 00}.
-*/
-
-/*!
- \page full-framework-edition-classes.html
- \title Qt Full Framework Edition
- \ingroup classlists
-
- \brief The list of Qt classes included in the Full Framework Edition.
-
- \generatelist{classesbyedition Desktop}
-*/
-
-/*!
- \page gui-framework-edition-classes.html
- \title Qt GUI Framework Edition
- \ingroup classlists
-
- \brief The list of Qt classes included in the GUI Framework Edition.
-
- \generatelist{classesbyedition DesktopLight}
+ Phone, Norway office (for the rest of the world): \bold{+47 21 60 48 00}.
*/
diff --git a/doc/src/legal/editions.qdoc b/doc/src/legal/editions.qdoc
index 4de77c1fd0..c7e73f2858 100644
--- a/doc/src/legal/editions.qdoc
+++ b/doc/src/legal/editions.qdoc
@@ -53,8 +53,8 @@
In terms of license conditions, there are two main forms of Qt:
\list
- \o The \l{Qt Commercial Editions} are the commercial
- versions of \l{About Qt}{Qt}.
+ \o The \l{Qt Commercial Edition} is the commercial version of
+ \l{About Qt}{Qt} which can be used to create closed source software.
\o The \l{Open Source Versions of Qt} are freely available for download.
\endlist
diff --git a/doc/src/legal/licenses.qdoc b/doc/src/legal/licenses.qdoc
index 9e680a6aea..d1bf4cf96a 100644
--- a/doc/src/legal/licenses.qdoc
+++ b/doc/src/legal/licenses.qdoc
@@ -60,7 +60,7 @@
Qt contains some code that is not provided under the
\l{GNU General Public License (GPL)},
\l{GNU Lesser General Public License (LGPL)} or the
- \l{Qt Commercial Editions}{Qt Commercial License Agreement}, but rather under
+ \l{Qt Commercial Edition}{Qt Commercial License Agreement}, but rather under
specific licenses from the original authors. Some pieces of code were developed
by Nokia and others originated from third parties.
This page lists the licenses used, names the authors, and links
@@ -276,14 +276,14 @@
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:\br
-     * Redistributions of source code must retain the above copyright
-       notice, this list of conditions and the following disclaimer.\br
-     * 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.\br
-     * Neither the name of Research In Motion Limited nor the
-       names of its contributors may be used to endorse or promote products
-       derived from this software without specific prior written permission.
+     * Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.\br
+     * 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.\br
+     * Neither the name of Research In Motion Limited 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 Research In Motion Limited ''AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
diff --git a/doc/src/legal/opensourceedition.qdoc b/doc/src/legal/opensourceedition.qdoc
index c199e34ce4..d95e107648 100644
--- a/doc/src/legal/opensourceedition.qdoc
+++ b/doc/src/legal/opensourceedition.qdoc
@@ -87,5 +87,4 @@
If you are in doubt what edition of Qt is right for your project,
please contact
\l{mailto:qt-info@nokia.com}{qt-info@nokia.com}.
-
*/
diff --git a/doc/src/legal/trademarks.qdoc b/doc/src/legal/trademarks.qdoc
index a7b576469a..23d0cf6e4f 100644
--- a/doc/src/legal/trademarks.qdoc
+++ b/doc/src/legal/trademarks.qdoc
@@ -47,7 +47,7 @@
\brief Information about trademarks owned by Nokia and other organisations.
Nokia, the Nokia logo, Qt, and the Qt logo are trademarks of Nokia
-  Corporation and/or its subsidiaries in Finland and other countries.
+  Corporation and/or its subsidiaries in Finland and other countries.
\list
\o Intel, Intel Inside (logos), MMX and Pentium are \reg trademarks of
diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc
index 44d6ed6088..76a52b4289 100644
--- a/doc/src/modules.qdoc
+++ b/doc/src/modules.qdoc
@@ -65,6 +65,7 @@
\row \o \l{QtWebKit} \o Classes for displaying and editing Web content
\row \o \l{QtXml} \o Classes for handling XML
\row \o \l{QtXmlPatterns} \o An XQuery & XPath engine for XML and custom data models
+ \row \o \l{QtDeclarative} \o An engine for declaratively building fluid user interfaces.
\row \o \l{Phonon Module}{Phonon} \o Multimedia framework classes
\row \o \l{Qt3Support} \o Qt 3 compatibility classes
\header \o {2,1} \bold{Modules for working with Qt's tools}
@@ -108,8 +109,6 @@
definitions of the module's classes, use the following directive:
\snippet doc/src/snippets/code/doc_src_qtcore.qdoc 0
-
- The QtCore module is part of all \l{Qt editions}.
*/
@@ -127,13 +126,11 @@
following directive:
\snippet doc/src/snippets/code/doc_src_qtgui.qdoc 0
-
- The QtGui module is part of the \l{Qt GUI Framework Edition},
- the \l{Qt Full Framework Edition}, and the \l{Open Source Versions of Qt}.
*/
/*!
\module QtMultimedia
+ \page qtmultimedia-module.html
\title QtMultimedia Module
\contentspage All Qt Modules
\previouspage QtCore
@@ -176,9 +173,6 @@
.pro file:
\snippet doc/src/snippets/code/doc_src_qtnetwork.qdoc 0
-
- The QtNetwork module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}.
*/
/*!
@@ -224,9 +218,9 @@
OpenGL module can take advantage of the whole Qt API for
non-OpenGL-specific GUI functionality.
- The QtOpenGL module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}. It is available on Windows, X11, and Mac OS X.
- \l{Qt for Embedded Linux and OpenGL} supports OpenGL ES (OpenGL for Embedded Systems).
+ The QtOpenGL module is available on Windows, X11 and Mac OS X.
+ \l{Qt for Embedded Linux and OpenGL} supports OpenGL ES (OpenGL for
+ Embedded Systems).
\note To be able to use the OpenGL API in \l{Qt for Embedded Linux}, it must be
integrated with the Q Window System (QWS). See the
\l{Qt for Embedded Linux and OpenGL} documentation for details.
@@ -318,9 +312,6 @@
scriptable with QtScript, see \l{Making Applications
Scriptable}.
- The QtScript module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}.
-
\section1 License Information
Qt Commercial Edition licensees that wish to distribute applications that
@@ -378,9 +369,6 @@
To link against the module, add this line to your \l qmake \c .pro file:
\snippet doc/src/snippets/code/doc.src.qtscripttools.qdoc 1
-
- The QtScriptTools module is part of the \l{Qt Full Framework Edition} and
- the \l{Open Source Versions of Qt}.
*/
/*!
@@ -401,9 +389,6 @@
\snippet doc/src/snippets/code/doc_src_qtsql.qdoc 1
- The QtSql module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}.
-
See the \l{SQL Programming} guide for information about using this
module in your applications.
*/
@@ -429,9 +414,6 @@
\snippet doc/src/snippets/code/doc_src_qtsvg.qdoc 1
- The QtSvg module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}.
-
\section1 License Information
Some code for arc handling in this module is derived from code with
@@ -487,9 +469,6 @@
Further XML support is provided by the \l{Qt Solutions} group who
provide, for example, classes that support SOAP and MML with the
Qt XML classes.
-
- This module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}.
*/
/*!
@@ -514,9 +493,6 @@
\snippet doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc 1
- This module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}.
-
\section1 License Information
The XML Schema implementation provided by this module contains the \c xml.xsd file
@@ -593,9 +569,6 @@
\snippet doc/src/snippets/code/doc_src_phonon.qdoc 1
- The Phonon module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}.
-
\section1 Qt Backends
Qt Backends are currently developed for Phonon version 4.1. The Phonon
@@ -671,12 +644,6 @@
diverse parts of the Qt 3 API, it has dependencies on the QtCore,
QtGui, QtNetwork, QtSql, and QtXml modules.
- This module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}. Most classes offered by this module are
- also part of the \l{Qt GUI Framework Edition}.
- Classes that are not available for \l{Qt GUI Framework Edition}
- users are marked as such in the class documentation.
-
\sa {Porting to Qt 4}
*/
@@ -704,10 +671,6 @@
file:
\snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 1
-
- \note These classes are part of the \l{Open Source Versions of Qt} and
- \l{Qt Commercial Editions}{Qt Full Framework Edition} for commercial
- users.
*/
/*!
@@ -744,10 +707,6 @@
\snippet doc/src/snippets/code/doc_src_qtuiloader.qdoc 1
- \note These classes are part of the \l{Open Source Versions of Qt} and
- \l{Qt Commercial Editions}{Qt Full Framework Edition} for commercial
- users.
-
\sa{Calculator Builder Example}, {World Time Clock Builder Example}
*/
@@ -772,10 +731,6 @@
\snippet doc/src/snippets/code/doc_src_qthelp.qdoc 1
- These classes are part of the \l{Open Source Versions of Qt} and
- \l{Qt Commercial Editions}{Qt Full Framework Edition} for commercial
- users.
-
\section1 License Information
The QtHelp module uses the CLucene indexing library to provide full-text
@@ -859,7 +814,7 @@
The QAxContainer module is not covered by the \l{GNU General Public License (GPL)},
the \l{GNU Lesser General Public License (LGPL)}, or the
- \l{Qt Commercial Editions}{Qt Commercial License}. Instead, it is distributed under
+ \l{Qt Commercial Edition}{Qt Commercial License}. Instead, it is distributed under
the following license.
\legalese
@@ -909,7 +864,7 @@
The QAxContainer module is not covered by the \l{GNU General Public License (GPL)},
the \l{GNU Lesser General Public License (LGPL)}, or the
- \l{Qt Commercial Editions}{Qt Commercial License}. Instead, it is distributed under
+ \l{Qt Commercial Edition}{Qt Commercial License}. Instead, it is distributed under
the following license.
\legalese
@@ -1004,7 +959,7 @@
The QAxContainer module is not covered by the \l{GNU General Public License (GPL)},
the \l{GNU Lesser General Public License (LGPL)}, or the
- \l{Qt Commercial Editions}{Qt Commercial License}. Instead, it is distributed under
+ \l{Qt Commercial Edition}{Qt Commercial License}. Instead, it is distributed under
the following license.
\legalese
@@ -1042,7 +997,7 @@
located in the \c{src/s60main} directory are not covered by the
\l{GNU General Public License (GPL)}, the
\l{GNU Lesser General Public License (LGPL)}, or the
- \l{Qt Commercial Editions}{Qt Commercial License}. Instead, they are
+ \l{Qt Commercial Edition}{Qt Commercial License}. Instead, they are
distributed under the following license.
\legalese
@@ -1080,13 +1035,3 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
\endlegalese
*/
-
-/*!
- \page qtassistant.html
- \title QtAssistant
-
- This module is no longer needed. Use the QtHelp module to integrate documentation
- into your application.
-
- \sa {QtHelp}
-*/
diff --git a/doc/src/platforms/emb-pointer.qdoc b/doc/src/platforms/emb-pointer.qdoc
index 34510dad44..3c37b63d40 100644
--- a/doc/src/platforms/emb-pointer.qdoc
+++ b/doc/src/platforms/emb-pointer.qdoc
@@ -154,9 +154,9 @@
in the build environment.
The tslib sources can be downloaded from \l
- http://tslib.berlios.de. Use the \c configure script's -L and
- -I options to explicitly specify the location of the library and
- its headers:
+ http://tslib.berlios.de. Specify the location of the library and
+ its headers using -L and -I options in the \c qmake.conf file in
+ your \c mkspec. Also it can be helpful to add a -rpath-link:
\snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 7
diff --git a/doc/src/platforms/mac-differences.qdoc b/doc/src/platforms/mac-differences.qdoc
index bda439df4c..58d64de580 100644
--- a/doc/src/platforms/mac-differences.qdoc
+++ b/doc/src/platforms/mac-differences.qdoc
@@ -301,7 +301,7 @@
\contentspage {Other Licenses Used in Qt}{Contents}
\ingroup licensing
- \brief License information for contributions by Apple, Inc. to specific parts of the Qt/Mac Cocoa port.
+ \brief License information for contributions by Apple, Inc. to specific parts of the Qt for Mac OS X Cocoa port.
\legalese
diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc
index f513181a19..9c9b743a56 100644
--- a/doc/src/platforms/platform-notes.qdoc
+++ b/doc/src/platforms/platform-notes.qdoc
@@ -263,14 +263,6 @@
Install Qt into a subdirectory without spaces to avoid this problem.
- \section2 AccelGALAXY graphic card
-
- When you use a NT 4.0 machine with the driver number
- 4,00,1381,1000,021,4.0.0 there is a problem with drag an drop and icons.
- The computer freezes, and you have to reset. The problem disappears with
- the newest version of the driver, available at
- \l{http://www.es.com/}{www.es.com}.
-
\section2 Possible GL conflict
There is a known issue with running Microsoft NetMeeting, Lotus SameTime
diff --git a/doc/src/platforms/wince-opengl.qdoc b/doc/src/platforms/wince-opengl.qdoc
index afc1c0b2a6..c1be4bc314 100644
--- a/doc/src/platforms/wince-opengl.qdoc
+++ b/doc/src/platforms/wince-opengl.qdoc
@@ -53,7 +53,7 @@ Windows CE window manager.
\section2 Configure
-To configure Qt for Windows Mobile 5.0 and OpenGL ES Common Lite support
+To configure Qt for Windows Mobile 5.0 and OpenGL ES Common support
you can run \c{configure} like this:
\snippet doc/src/snippets/code/doc_src_wince-opengl.qdoc 0
@@ -61,17 +61,12 @@ you can run \c{configure} like this:
OpenGL ES includes profiles for floating-point and fixed-point arithmetic.
The floating point profile is called OpenGL ES CM (Common) and the
fixed-point profile is called OpenGL ES CL (Common Lite).
+The fixed-point profile is no longer supported since Qt 4.7.
You can run \c{configure} with the \c{-opengl-es-cm} option for the Common
-profile or \c{-opengl-es-cl} for the Common Lite profile. In both cases,
-ensure that the \c{lib} and \c{includes} paths include the OpenGL ES
+profile. Ensure that the \c{lib} and \c{includes} paths include the OpenGL ES
headers and libararies from your SDK. The OpenGL ES lib should be called
-either \c{libGLES_CM.lib} for the Common profile or \c{libGLES_CL.lib} for
-the Common Lite profile.
-
-The distinction between the Common and Common Lite profiles is important,
-because the Common Lite profile has less functionality and only supports a
-fixed-point vertex format.
+either \c{libGLES_CM.lib} for the Common profile.
To start programming with Qt and OpenGL ES on Windows CE, you can start
with the \l{Hello GL ES Example}. This example shows how to use QGLWidget
diff --git a/doc/src/porting/porting4.qdoc b/doc/src/porting/porting4.qdoc
index 68e61194f3..1b6eeb7729 100644
--- a/doc/src/porting/porting4.qdoc
+++ b/doc/src/porting/porting4.qdoc
@@ -3793,11 +3793,10 @@
multimedia timer API, which gives us 1 millisecond resolution for
QTimer.
- Note that other versions of Windows have a lower timer resolution,
- and that code relying on underlying system timer restrictions
- encounters no such limitations using Qt 4 (e.g., setting an
- interval of 0 millisecond results in Qt occupying all of the
- processor time when no GUI events need processing).
+ Note that Windows 2000 has a lower timer resolution, and that code relying
+ on underlying system timer restrictions encounters no such limitations
+ using Qt 4 (e.g., setting an interval of 0 millisecond results in Qt
+ occupying all of the processor time when no GUI events need processing).
\section1 QToolBar
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index daceba547a..ba9821a957 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -225,9 +225,9 @@
\row \o \l{Qt3Support} \o Qt 3 support classes
\row \o \l{QAxContainer} \o ActiveQt client extension
\row \o \l{QAxServer} \o ActiveQt server extension
- \row \o \l{QtAssistant} \o Classes for launching Qt Assistant
+ \row \o \l{QtHelp} \o Classes for integrating online documentation
\row \o \l{QtDesigner} \o Classes for extending and embedding Qt Designer
- \row \o \l{QtUiTools} \o Classes for dynamic GUI generation
+ \row \o \l{QtUiTools} \o Classes for dynamic GUI generation
\row \o \l{QtTest} \o Tool classes for unit testing
\endtable
@@ -457,6 +457,76 @@
*/
/*!
+ \page qt4-7-intro.html
+ \title What's New in Qt 4.7
+
+ Qt 4.7 provides many improvements and enhancements over the
+ previous releases in the Qt 4 series. This document covers the
+ most important features in this release, separated by category.
+
+ A list of other Qt 4 features can be found on the \bold{\l{What's
+ New in Qt 4}} page.
+
+ \bold{Highlights}
+
+ \tableofcontents
+
+ \section1 Declarative UI development with Qt Quick
+
+ \image quick_screens.png
+
+ Qt 4.7 introduces Quick, the Qt UI Creation Kit. that enables the creation
+ of dynamic user interfaces, easier and more effective than possible
+ with existing UI technologies. This UI Creation Kit consist of three
+ technologies:
+
+ \list
+ \i QML is a declarative language oriented on JavaScript that utilizes
+ Qt's Meta-Object capabilities to enable designers and developers to
+ collaborate tightly and create animated and fluid user experiences,
+ using existing knowledge in script language and design.
+
+ \i QtDeclarative is a C++ library that provides the underlying engine,
+ which translates the declarative description of the UI in QML into
+ items on a QGraphicsScene. The library also provides APIs to bind
+ custom C++ types and elements to QML, and to connect the QML UI with
+ the underlying application logic written in C++.
+
+ \i Qt Creator has been improved to support interactive editing of
+ QML UIs through drag-and-drop. The text editor supports the QML
+ syntax and provides authoring assistance such as auto-completion,
+ error lookup, help lookup and easy preview of QML UI's.
+ \endlist
+
+ \section1 Network Bearer Management
+
+ Bearer Management controls the connectivity state of the system.
+ The new Bearer Management API in the QtNetwork module allows the
+ application to identify whether the system is online and how many
+ interfaces there are, as well as start and stop interfaces, or
+ roam transparently between access points.
+
+ QNetworkAccessManager uses this API for HTTP level roaming.
+
+ \section1 Multimedia - playback and declarative elements
+
+ The Multimedia API provides media playback and playlist support
+ for Qt Applications. Play music and movies through a single interface
+ with selectable output for movies to widgets or graphics view.
+
+ Multimedia support for Quick is also available with the new multimedia
+ declarative elements.
+
+ \section1 New Classes, Functions, Macros, etc.
+
+ Links to new classes, elements, functions, macros, and other items
+ introduced in Qt 4.7.
+
+ \sincelist 4.7
+
+*/
+
+/*!
\page qt4-6-intro.html
\title What's New in Qt 4.6
diff --git a/doc/src/snippets/audio/main.cpp b/doc/src/snippets/audio/main.cpp
index 019f2085a0..e21bf754f6 100644
--- a/doc/src/snippets/audio/main.cpp
+++ b/doc/src/snippets/audio/main.cpp
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the test suite 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/code/doc_src_assistant-manual.qdoc b/doc/src/snippets/code/doc_src_assistant-manual.qdoc
index 743836599d..96aa71d863 100644
--- a/doc/src/snippets/code/doc_src_assistant-manual.qdoc
+++ b/doc/src/snippets/code/doc_src_assistant-manual.qdoc
@@ -58,7 +58,7 @@ assistant -collectionFile file
<cacheDirectory>mycompany/myapplication</cacheDirectory>
<aboutMenuText>
<text>About My Application</text>
- <text language="de">Über meine Applikation...</text>
+ <text language="de">Ãœber meine Applikation...</text>
</aboutMenuText>
<aboutDialog>
<file>about.txt</file>
@@ -95,8 +95,7 @@ if (!process->waitForStarted())
//! [3]
QByteArray ba;
-ba.append("setSource qthelp://com.mycompany.1_0_0/doc/index.html");
-ba.append('\0');
+ba.append("setSource qthelp://com.mycompany.1_0_0/doc/index.html\n");
process->write(ba);
//! [3]
@@ -105,8 +104,7 @@ process->write(ba);
QByteArray ba;
ba.append("hide bookmarks;");
ba.append("hide index;");
-ba.append("setSource qthelp://com.mycompany.1_0_0/doc/index.html");
-ba.append('\0');
+ba.append("setSource qthelp://com.mycompany.1_0_0/doc/index.html\n");
process->write(ba);
//! [4]
diff --git a/doc/src/snippets/code/doc_src_emb-pointer.qdoc b/doc/src/snippets/code/doc_src_emb-pointer.qdoc
index 9661ae518a..0d66e18164 100644
--- a/doc/src/snippets/code/doc_src_emb-pointer.qdoc
+++ b/doc/src/snippets/code/doc_src_emb-pointer.qdoc
@@ -77,7 +77,10 @@ export QWS_MOUSE_PROTO="Vr41xx:press=500:/dev/misc/ts"
//! [7]
-./configure -L <path to tslib library> -I <path to tslib headers>
+....
+QMAKE_CFLAGS += -I<path to tslib headers>
+QMAKE_LFLAGS += -L<path to tslib library> -Wl,-rpath-link=<path to tslib library>
+....
//! [7]
diff --git a/doc/src/snippets/code/doc_src_wince-opengl.qdoc b/doc/src/snippets/code/doc_src_wince-opengl.qdoc
index eef154044d..601b00af80 100644
--- a/doc/src/snippets/code/doc_src_wince-opengl.qdoc
+++ b/doc/src/snippets/code/doc_src_wince-opengl.qdoc
@@ -40,5 +40,5 @@
****************************************************************************/
//! [0]
-configure -platform win32-msvc2005 -xplatform wincewm50pocket-msvc2005 -opengl-es-cl
+configure -platform win32-msvc2005 -xplatform wincewm50pocket-msvc2005 -opengl-es-cm
//! [0]
diff --git a/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
index bff72a0f24..19e37bad25 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
@@ -108,3 +108,8 @@ int id = qRegisterMetaType<MyStruct>();
int id = qMetaTypeId<QString>(); // id is now QMetaType::QString
id = qMetaTypeId<MyStruct>(); // compile error if MyStruct not declared
//! [8]
+
+//! [9]
+typedef QString CustomString;
+qRegisterMetaType<CustomString>("CustomString");
+//! [9]
diff --git a/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp b/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp
index a18971d461..1b1abeaa9a 100644
--- a/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp
+++ b/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the test suite 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/code/src_network_access_qnetworkaccessmanager.cpp b/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp
index 643d0dd2f5..5db6676036 100644
--- a/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp
+++ b/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp
@@ -60,3 +60,12 @@ connect(reply, SIGNAL(error(QNetworkReply::NetworkError)),
connect(reply, SIGNAL(sslErrors(QList<QSslError>)),
this, SLOT(slotSslErrors(QList<QSslError>)));
//! [1]
+
+//! [2]
+QNetworkConfigurationManager manager;
+networkAccessManager->setConfiguration(manager.defaultConfiguration());
+//! [2]
+
+//! [3]
+networkAccessManager->setConfiguration(QNetworkConfiguration());
+//! [3]
diff --git a/doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp b/doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp
new file mode 100644
index 0000000000..e2cc4dfc64
--- /dev/null
+++ b/doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+QNetworkConfigurationManager mgr;
+QList<QNetworkConfiguration> activeConfigs = mgr.allConfigurations(QNetworkConfiguration::Active)
+if (activeConfigs.count() > 0)
+ Q_ASSERT(mgr.isOnline())
+else
+ Q_ASSERT(!mgr.isOnline())
+//! [0]
diff --git a/doc/src/snippets/declarative/border-image.qml b/doc/src/snippets/declarative/border-image.qml
new file mode 100644
index 0000000000..c4215cd15d
--- /dev/null
+++ b/doc/src/snippets/declarative/border-image.qml
@@ -0,0 +1,31 @@
+import Qt 4.6
+
+Rectangle {
+ id: page
+ color: "white"
+ width: 520; height: 280
+
+ Row {
+ anchors.centerIn: parent
+ spacing: 50
+//! [0]
+ BorderImage {
+ width: 180; height: 180
+ border.left: 30; border.top: 30
+ border.right: 30; border.bottom: 30
+ horizontalTileMode: BorderImage.Stretch
+ verticalTileMode: BorderImage.Stretch
+ source: "content/colors.png"
+ }
+
+ BorderImage {
+ width: 180; height: 180
+ border.left: 30; border.top: 30
+ border.right: 30; border.bottom: 30
+ horizontalTileMode: BorderImage.Round
+ verticalTileMode: BorderImage.Round
+ source: "content/colors.png"
+ }
+//! [0]
+ }
+}
diff --git a/doc/src/snippets/declarative/comments.qml b/doc/src/snippets/declarative/comments.qml
new file mode 100644
index 0000000000..806be29e33
--- /dev/null
+++ b/doc/src/snippets/declarative/comments.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+
+Text {
+ text: "Hello world!" //a basic greeting
+ /*
+ We want this text to stand out from the rest so
+ we give it a large size and different font.
+ */
+ font.family: "Helvetica"
+ font.pointSize: 24
+}
diff --git a/doc/src/snippets/declarative/drag.qml b/doc/src/snippets/declarative/drag.qml
new file mode 100644
index 0000000000..8e5b5992ef
--- /dev/null
+++ b/doc/src/snippets/declarative/drag.qml
@@ -0,0 +1,18 @@
+import Qt 4.6
+
+//! [0]
+Rectangle {
+ id: blurtest; width: 600; height: 200; color: "white"
+ Image {
+ id: pic; source: "qtlogo-64.png"; anchors.verticalCenter: parent.verticalCenter
+ opacity: (600.0-pic.x) / 600;
+ MouseArea {
+ anchors.fill: parent
+ drag.target: pic
+ drag.axis: "XAxis"
+ drag.minimumX: 0
+ drag.maximumX: blurtest.width-pic.width
+ }
+ }
+}
+//! [0]
diff --git a/doc/src/snippets/declarative/gradient.qml b/doc/src/snippets/declarative/gradient.qml
new file mode 100644
index 0000000000..281360e2dc
--- /dev/null
+++ b/doc/src/snippets/declarative/gradient.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+Rectangle {
+ width: 100; height: 100
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "red" }
+ GradientStop { position: 0.33; color: "yellow" }
+ GradientStop { position: 1.0; color: "green" }
+ }
+}
diff --git a/doc/src/snippets/declarative/gridview/dummydata/ContactModel.qml b/doc/src/snippets/declarative/gridview/dummydata/ContactModel.qml
new file mode 100644
index 0000000000..3cf9ba764e
--- /dev/null
+++ b/doc/src/snippets/declarative/gridview/dummydata/ContactModel.qml
@@ -0,0 +1,25 @@
+import Qt 4.6
+
+ListModel {
+ id: contactModel
+ ListElement {
+ name: "Bill Smith"
+ number: "555 3264"
+ portrait: "pics/portrait.png"
+ }
+ ListElement {
+ name: "Jim Williams"
+ number: "555 5673"
+ portrait: "pics/portrait.png"
+ }
+ ListElement {
+ name: "John Brown"
+ number: "555 8426"
+ portrait: "pics/portrait.png"
+ }
+ ListElement {
+ name: "Sam Wise"
+ number: "555 0473"
+ portrait: "pics/portrait.png"
+ }
+}
diff --git a/doc/src/snippets/declarative/gridview/gridview.qml b/doc/src/snippets/declarative/gridview/gridview.qml
new file mode 100644
index 0000000000..1a2021c65b
--- /dev/null
+++ b/doc/src/snippets/declarative/gridview/gridview.qml
@@ -0,0 +1,47 @@
+import Qt 4.6
+
+//! [3]
+Rectangle {
+ width: 240; height: 180; color: "white"
+ // ContactModel model is defined in dummydata/ContactModel.qml
+ // The viewer automatically loads files in dummydata/* to assist
+ // development without a real data source.
+
+ // Define a delegate component. A component will be
+ // instantiated for each visible item in the list.
+//! [0]
+ Component {
+ id: delegate
+ Item {
+ id: wrapper
+ width: 80; height: 78
+ Column {
+ Image { source: portrait; anchors.horizontalCenter: parent.horizontalCenter }
+ Text { text: name; anchors.horizontalCenter: parent.horizontalCenter }
+ }
+ }
+ }
+//! [0]
+ // Define a highlight component. Just one of these will be instantiated
+ // by each ListView and placed behind the current item.
+//! [1]
+ Component {
+ id: highlight
+ Rectangle {
+ color: "lightsteelblue"
+ radius: 5
+ }
+ }
+//! [1]
+ // The actual grid
+//! [2]
+ GridView {
+ width: parent.width; height: parent.height
+ model: ContactModel; delegate: delegate
+ cellWidth: 80; cellHeight: 80
+ highlight: highlight
+ focus: true
+ }
+//! [2]
+}
+//! [3]
diff --git a/doc/src/snippets/declarative/gridview/pics/portrait.png b/doc/src/snippets/declarative/gridview/pics/portrait.png
new file mode 100644
index 0000000000..fb5052ad80
--- /dev/null
+++ b/doc/src/snippets/declarative/gridview/pics/portrait.png
Binary files differ
diff --git a/doc/src/snippets/declarative/listview/dummydata/ContactModel.qml b/doc/src/snippets/declarative/listview/dummydata/ContactModel.qml
new file mode 100644
index 0000000000..683230821b
--- /dev/null
+++ b/doc/src/snippets/declarative/listview/dummydata/ContactModel.qml
@@ -0,0 +1,17 @@
+import Qt 4.6
+
+ListModel {
+ id: contactModel
+ ListElement {
+ name: "Bill Smith"
+ number: "555 3264"
+ }
+ ListElement {
+ name: "John Brown"
+ number: "555 8426"
+ }
+ ListElement {
+ name: "Sam Wise"
+ number: "555 0473"
+ }
+}
diff --git a/doc/src/snippets/declarative/listview/highlight.qml b/doc/src/snippets/declarative/listview/highlight.qml
new file mode 100644
index 0000000000..6a9d215dae
--- /dev/null
+++ b/doc/src/snippets/declarative/listview/highlight.qml
@@ -0,0 +1,63 @@
+import Qt 4.6
+
+Rectangle {
+ width: 180; height: 200; color: "white"
+
+ // ContactModel model is defined in dummydata/ContactModel.qml
+ // The viewer automatically loads files in dummydata/* to assist
+ // development without a real data source.
+
+ // Define a delegate component. A component will be
+ // instantiated for each visible item in the list.
+//! [0]
+ Component {
+ id: delegate
+ Item {
+ id: wrapper
+ width: 180; height: 40
+ Column {
+ x: 5; y: 5
+ Text { text: '<b>Name:</b> ' + name }
+ Text { text: '<b>Number:</b> ' + number }
+ }
+ // Use the ListView.isCurrentItem attached property to
+ // indent the item if it is the current item.
+ states: [
+ State {
+ name: "Current"
+ when: wrapper.ListView.isCurrentItem
+ PropertyChanges { target: wrapper; x: 10 }
+ }
+ ]
+ transitions: [
+ Transition { NumberAnimation { properties: "x"; duration: 200 } }
+ ]
+ }
+ }
+//! [0]
+ // Specify a highlight with custom movement. Note that autoHighlight
+ // is set to false in the ListView so that we can control how the
+ // highlight moves to the current item.
+//! [1]
+ Component {
+ id: highlight
+ Rectangle {
+ width: 180; height: 40
+ color: "lightsteelblue"; radius: 5
+ SpringFollow on y {
+ source: list.currentItem.y
+ spring: 3
+ damping: 0.2
+ }
+ }
+ }
+ ListView {
+ id: list
+ width: parent.height; height: parent.height
+ model: ContactModel; delegate: delegate
+ highlight: highlight
+ highlightFollowsCurrentItem: false
+ focus: true
+ }
+//! [1]
+}
diff --git a/doc/src/snippets/declarative/listview/listview.qml b/doc/src/snippets/declarative/listview/listview.qml
new file mode 100644
index 0000000000..be0f3ad797
--- /dev/null
+++ b/doc/src/snippets/declarative/listview/listview.qml
@@ -0,0 +1,49 @@
+import Qt 4.6
+
+//! [3]
+Rectangle {
+ width: 180; height: 200; color: "white"
+
+ // ContactModel model is defined in dummydata/ContactModel.qml
+ // The viewer automatically loads files in dummydata/* to assist
+ // development without a real data source.
+
+ // Define a delegate component. A component will be
+ // instantiated for each visible item in the list.
+//! [0]
+ Component {
+ id: delegate
+ Item {
+ id: wrapper
+ width: 180; height: 40
+ Column {
+ x: 5; y: 5
+ Text { text: '<b>Name:</b> ' + name }
+ Text { text: '<b>Number:</b> ' + number }
+ }
+ }
+ }
+//! [0]
+ // Define a highlight component. Just one of these will be instantiated
+ // by each ListView and placed behind the current item.
+//! [1]
+ Component {
+ id: highlight
+ Rectangle {
+ color: "lightsteelblue"
+ radius: 5
+ }
+ }
+//! [1]
+ // The actual list
+//! [2]
+ ListView {
+ width: parent.width; height: parent.height
+ model: ContactModel
+ delegate: delegate
+ highlight: highlight
+ focus: true
+ }
+//! [2]
+}
+//! [3]
diff --git a/doc/src/snippets/declarative/mouseregion.qml b/doc/src/snippets/declarative/mouseregion.qml
new file mode 100644
index 0000000000..fc6c8f04a4
--- /dev/null
+++ b/doc/src/snippets/declarative/mouseregion.qml
@@ -0,0 +1,26 @@
+import Qt 4.6
+
+Rectangle { width: 200; height: 100
+Row {
+//! [0]
+Rectangle { width: 100; height: 100; color: "green"
+ MouseArea { anchors.fill: parent; onClicked: { parent.color = 'red' } }
+}
+//! [0]
+//! [1]
+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';
+ }
+ }
+}
+//! [1]
+}
+}
diff --git a/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml b/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml
new file mode 100644
index 0000000000..1334cf44d6
--- /dev/null
+++ b/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml
@@ -0,0 +1,17 @@
+import Qt 4.6
+
+ListModel {
+ id: menuModel
+ ListElement {
+ name: "Bill Jones"
+ icon: "pics/qtlogo-64.png"
+ }
+ ListElement {
+ name: "Jane Doe"
+ icon: "pics/qtlogo-64.png"
+ }
+ ListElement {
+ name: "John Smith"
+ icon: "pics/qtlogo-64.png"
+ }
+}
diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/declarative/pathview/pathattributes.qml
new file mode 100644
index 0000000000..99d0de2b8e
--- /dev/null
+++ b/doc/src/snippets/declarative/pathview/pathattributes.qml
@@ -0,0 +1,36 @@
+import Qt 4.6
+
+Rectangle {
+ width: 240; height: 200; color: 'white'
+//! [0]
+//! [1]
+ Component {
+ id: delegate
+ Item {
+ id: wrapper
+ width: 80; height: 80
+ scale: PathView.scale
+ opacity: PathView.opacity
+ Column {
+ Image { anchors.horizontalCenter: name.horizontalCenter; width: 64; height: 64; source: icon }
+ Text { text: name; font.pointSize: 16}
+ }
+ }
+ }
+//! [1]
+//! [2]
+ PathView {
+ anchors.fill: parent; model: MenuModel; delegate: delegate
+ path: Path {
+ startX: 120; startY: 100
+ PathAttribute { name: "scale"; value: 1.0 }
+ PathAttribute { name: "opacity"; value: 1.0 }
+ PathQuad { x: 120; y: 25; controlX: 260; controlY: 75 }
+ PathAttribute { name: "scale"; value: 0.3 }
+ PathAttribute { name: "opacity"; value: 0.5 }
+ PathQuad { x: 120; y: 100; controlX: -20; controlY: 75 }
+ }
+ }
+//! [2]
+//! [0]
+}
diff --git a/doc/src/snippets/declarative/pathview/pathview.qml b/doc/src/snippets/declarative/pathview/pathview.qml
new file mode 100644
index 0000000000..e316578b17
--- /dev/null
+++ b/doc/src/snippets/declarative/pathview/pathview.qml
@@ -0,0 +1,30 @@
+import Qt 4.6
+
+Rectangle {
+ width: 240; height: 200; color: 'white'
+//! [0]
+//! [1]
+ Component {
+ id: delegate
+ Item {
+ id: wrapper
+ width: 80; height: 80
+ Column {
+ Image { anchors.horizontalCenter: name.horizontalCenter; width: 64; height: 64; source: icon }
+ Text { text: name; font.pointSize: 16}
+ }
+ }
+ }
+//! [1]
+//! [2]
+ PathView {
+ anchors.fill: parent; model: MenuModel; delegate: delegate
+ path: Path {
+ startX: 120; startY: 100
+ PathQuad { x: 120; y: 25; controlX: 260; controlY: 75 }
+ PathQuad { x: 120; y: 100; controlX: -20; controlY: 75 }
+ }
+ }
+//! [2]
+//! [0]
+}
diff --git a/doc/src/snippets/declarative/pathview/pics/qtlogo-64.png b/doc/src/snippets/declarative/pathview/pics/qtlogo-64.png
new file mode 100644
index 0000000000..4f68e162de
--- /dev/null
+++ b/doc/src/snippets/declarative/pathview/pics/qtlogo-64.png
Binary files differ
diff --git a/doc/src/snippets/declarative/pics/qt.png b/doc/src/snippets/declarative/pics/qt.png
new file mode 100644
index 0000000000..cbed1a9019
--- /dev/null
+++ b/doc/src/snippets/declarative/pics/qt.png
Binary files differ
diff --git a/doc/src/snippets/declarative/repeater-index.qml b/doc/src/snippets/declarative/repeater-index.qml
new file mode 100644
index 0000000000..9063967307
--- /dev/null
+++ b/doc/src/snippets/declarative/repeater-index.qml
@@ -0,0 +1,15 @@
+import Qt 4.6
+
+Rectangle {
+ width: 50; height: childrenRect.height; color: "white"
+
+//! [0]
+ Column {
+ Repeater {
+ model: 10
+ Text { text: "I'm item " + index }
+ }
+ }
+//! [0]
+}
+
diff --git a/doc/src/snippets/declarative/repeater.qml b/doc/src/snippets/declarative/repeater.qml
new file mode 100644
index 0000000000..f8ac8561bd
--- /dev/null
+++ b/doc/src/snippets/declarative/repeater.qml
@@ -0,0 +1,16 @@
+import Qt 4.6
+
+Rectangle {
+ width: 220; height: 20; color: "white"
+
+//! [0]
+ Row {
+ Rectangle { width: 10; height: 20; color: "red" }
+ Repeater {
+ model: 10
+ Rectangle { width: 20; height: 20; radius: 10; color: "green" }
+ }
+ Rectangle { width: 10; height: 20; color: "blue" }
+ }
+//! [0]
+}
diff --git a/doc/src/snippets/declarative/rotation.qml b/doc/src/snippets/declarative/rotation.qml
new file mode 100644
index 0000000000..4a67dcb3aa
--- /dev/null
+++ b/doc/src/snippets/declarative/rotation.qml
@@ -0,0 +1,33 @@
+import Qt 4.6
+
+Rectangle {
+ width: 360; height: 80
+ color: "white"
+//! [0]
+ Row {
+ x: 10; y: 10
+ spacing: 10
+ Image { source: "pics/qt.png" }
+ Image {
+ source: "pics/qt.png"
+ transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 18 }
+ smooth: true
+ }
+ Image {
+ source: "pics/qt.png"
+ transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 36 }
+ smooth: true
+ }
+ Image {
+ source: "pics/qt.png"
+ transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 54 }
+ smooth: true
+ }
+ Image {
+ source: "pics/qt.png"
+ transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 72 }
+ smooth: true
+ }
+ }
+//! [0]
+}
diff --git a/doc/src/tutorials/addressbook-fr.qdoc b/doc/src/tutorials/addressbook-fr.qdoc
index d3bd1cac02..98c44a3266 100644
--- a/doc/src/tutorials/addressbook-fr.qdoc
+++ b/doc/src/tutorials/addressbook-fr.qdoc
@@ -47,47 +47,47 @@
\nextpage {tutorials/addressbook-fr/part1}{Chapitre 1}
\title Tutoriel "Carnet d'adresses"
- \brief Une introduction à la programation d'interface graphique montrant comment construire une application simple avec Qt.
+ \brief Une introduction à la programation d'interface graphique montrant comment construire une application simple avec Qt.
- Ce tutoriel est une introduction à la programmation de GUI (interface utilisateur)
- à l'aide des outils fournis par la plateforme multiplate-forme Qt.
+ Ce tutoriel est une introduction à la programmation de GUI (interface utilisateur)
+ à l'aide des outils fournis par la plateforme multiplate-forme Qt.
\image addressbook-tutorial-screenshot.png
- Ce tutoriel va nous amener à découvrir quelques technologies fondamentales fournies
+ Ce tutoriel va nous amener à découvrir quelques technologies fondamentales fournies
par Qt, tel que:
\list
- \o Les Widgets et leur mise en page à l'aide des layouts
+ \o Les Widgets et leur mise en page à l'aide des layouts
\o Les signaux et slots
- \o Les structures de données de collections
- \o Les entrées/sorties
+ \o Les structures de données de collections
+ \o Les entrées/sorties
\endlist
Si c'est votre premier contact avec Qt, lisez \l{How to Learn Qt}{Comment apprendre Qt}
- si ce n'est déjà fait.
+ si ce n'est déjà fait.
- Le code source du tutoriel est distribué avec Qt dans le dossier \c examples/tutorials/addressbook
+ Le code source du tutoriel est distribué avec Qt dans le dossier \c examples/tutorials/addressbook
Les chapitres du tutoriel:
\list 1
\o \l{tutorials/addressbook-fr/part1}{Conception de l'interface utilisateur}
\o \l{tutorials/addressbook-fr/part2}{Ajouter des adresses}
- \o \l{tutorials/addressbook-fr/part3}{Navigation entre les éléments}
- \o \l{tutorials/addressbook-fr/part4}{éditer et supprimer des adresses}
+ \o \l{tutorials/addressbook-fr/part3}{Navigation entre les éléments}
+ \o \l{tutorials/addressbook-fr/part4}{éditer et supprimer des adresses}
\o \l{tutorials/addressbook-fr/part5}{Ajout d'une fonction de recherche}
\o \l{tutorials/addressbook-fr/part6}{Sauvegarde et chargement}
- \o \l{tutorials/addressbook-fr/part7}{Fonctionnalités avancées}
+ \o \l{tutorials/addressbook-fr/part7}{Fonctionnalités avancées}
\endlist
- La petite application que nous développerons ici ne possède pas tous les éléments
+ La petite application que nous développerons ici ne possède pas tous les éléments
des interfaces dernier cri, elle va nous permettre d'utiliser les techniques de base
- utilisées dans les applications plus complexes.
+ utilisées dans les applications plus complexes.
- Lorsque vous aurez terminé ce tutoriel, nous vous recommandons de poursuivre avec l'exemple
- "\l{mainwindows/application}{Application}", qui présente une interface simple utilisant
- les menus et barres d'outils, la barre d'état, etc.
+ Lorsque vous aurez terminé ce tutoriel, nous vous recommandons de poursuivre avec l'exemple
+ "\l{mainwindows/application}{Application}", qui présente une interface simple utilisant
+ les menus et barres d'outils, la barre d'état, etc.
*/
@@ -98,156 +98,156 @@
\example tutorials/addressbook-fr/part1
\title Carnet d'adresses 1 - Conception de l'interface utilisateur
- La première partie de ce tutoriel traite de la conception d'une interface graphique
+ La première partie de ce tutoriel traite de la conception d'une interface graphique
(GUI) basique, que l'on utilisera pour l'application Carnet d'adresses.
- La première étape dans la création d'applications graphiques est la conception de
- l'interface utilisateur. Dans ce chapitre, nous verrons comment créer les labels
- et champs de saisie nécessaires à l'implementation d'un carnet d'adresses de base.
- Le résultat attendu est illustré par la capture d'écran ci-dessous.
+ La première étape dans la création d'applications graphiques est la conception de
+ l'interface utilisateur. Dans ce chapitre, nous verrons comment créer les labels
+ et champs de saisie nécessaires à l'implementation d'un carnet d'adresses de base.
+ Le résultat attendu est illustré par la capture d'écran ci-dessous.
\image addressbook-tutorial-part1-screenshot.png
Nous allons avoir besoin de deux objets QLabel, \c nameLabel et \c addressLabel,
ainsi que deux champs de saisie: un objet QLineEdit, \c nameLine, et un objet
- QTextEdit, \c addressText, afin de permettre à l'utilisateur d'entrer le nom d'un
- contact et son adresse. Les widgets utilisés ainsi que leur placement sont visibles ci-dessous.
+ QTextEdit, \c addressText, afin de permettre à l'utilisateur d'entrer le nom d'un
+ contact et son adresse. Les widgets utilisés ainsi que leur placement sont visibles ci-dessous.
\image addressbook-tutorial-part1-labeled-screenshot.png
- Trois fichiers sont nécessaires à l'implémentation de ce carnet d'adresses:
+ Trois fichiers sont nécessaires à l'implémentation de ce carnet d'adresses:
\list
- \o \c{addressbook.h} - le fichier de définition (header) pour la classe \c AddressBook,
- \o \c{addressbook.cpp} - le fichier source, qui comprend l'implémentation de la classe
+ \o \c{addressbook.h} - le fichier de définition (header) pour la classe \c AddressBook,
+ \o \c{addressbook.cpp} - le fichier source, qui comprend l'implémentation de la classe
\c AddressBook
- \o \c{main.cpp} - le fichier qui contient la méthode \c main() , et
+ \o \c{main.cpp} - le fichier qui contient la méthode \c main() , et
une instance de la classe \c AddressBook.
\endlist
- \section1 Programmation en Qt - héritage
+ \section1 Programmation en Qt - héritage
- Lorsque l'on écrit des programmes avec Qt, on a généralement recours à
- l'héritage depuis des objets Qt, afin d'y ajouter des fonctionnalités.
- C'est l'un des concepts fondamentaux de la création de widgets personnalisés
- ou de collections de widgets. Utiliser l'héritage afin de compléter
- ou modifier le comportement d'un widget présente les avantages suivants:
+ Lorsque l'on écrit des programmes avec Qt, on a généralement recours à
+ l'héritage depuis des objets Qt, afin d'y ajouter des fonctionnalités.
+ C'est l'un des concepts fondamentaux de la création de widgets personnalisés
+ ou de collections de widgets. Utiliser l'héritage afin de compléter
+ ou modifier le comportement d'un widget présente les avantages suivants:
\list
- \o La possibilité d'implémenter des méthodes virtuelles et des méthodes
- virtuelles pures pour obtenir exactement ce que l'on souhaite, avec la possibilité
- d'utiliser l'implémentation de la classe mère si besoin est.
+ \o La possibilité d'implémenter des méthodes virtuelles et des méthodes
+ virtuelles pures pour obtenir exactement ce que l'on souhaite, avec la possibilité
+ d'utiliser l'implémentation de la classe mère si besoin est.
\o Cela permet l'encapsulation partielle de l'interface utilisateur dans une classe,
- afin que les autres parties de l'application n'aient pas à se soucier de chacun des
+ afin que les autres parties de l'application n'aient pas à se soucier de chacun des
widgets qui forment l'interface utilisateur.
- \o La classe fille peut être utilisée pour créer de nombreux widgets personnalisés
- dans une même application ou bibliothèque, et le code de la classe fille peut être
- réutilisé dans d'autres projets
+ \o La classe fille peut être utilisée pour créer de nombreux widgets personnalisés
+ dans une même application ou bibliothèque, et le code de la classe fille peut être
+ réutilisé dans d'autres projets
\endlist
Comme Qt ne fournit pas de widget standard pour un carnet d'adresses, nous
- partirons d'une classe de widget Qt standard et y ajouterons des fonctionnalités.
- La classe \c AddressBook crée dans ce tutoriel peut être réutilisée si on a besoin d'un
+ partirons d'une classe de widget Qt standard et y ajouterons des fonctionnalités.
+ La classe \c AddressBook crée dans ce tutoriel peut être réutilisée si on a besoin d'un
widget carnet d'adresses basique.
\section1 La classe AddressBook
Le fichier \l{tutorials/addressbook-fr/part1/addressbook.h}{\c addressbook.h} permet de
- définir la classe \c AddressBook.
+ définir la classe \c AddressBook.
- On commence par définir \c AddressBook comme une classe fille de QWidget et déclarer
- un constructeur. On utilise également la macro Q_OBJECT pour indiquer que la classe
- exploite les fonctionnalités de signaux et slots offertes par Qt ainsi que
- l'internationalisation, bien que nous ne les utilisions pas à ce stade.
+ On commence par définir \c AddressBook comme une classe fille de QWidget et déclarer
+ un constructeur. On utilise également la macro Q_OBJECT pour indiquer que la classe
+ exploite les fonctionnalités de signaux et slots offertes par Qt ainsi que
+ l'internationalisation, bien que nous ne les utilisions pas à ce stade.
\snippet tutorials/addressbook-fr/part1/addressbook.h class definition
- La classe contient les déclarations de \c nameLine et \c addressText,
- les instances privées de QLineEdit et QTextEdit mentionnées précédemment.
- Vous verrez, dans les chapitres à venir que les informations contenues
- dans \c nameLine et \c addressText sont nécessaires à de nombreuses méthodes
+ La classe contient les déclarations de \c nameLine et \c addressText,
+ les instances privées de QLineEdit et QTextEdit mentionnées précédemment.
+ Vous verrez, dans les chapitres à venir que les informations contenues
+ dans \c nameLine et \c addressText sont nécessaires à de nombreuses méthodes
du carnet d'adresses.
- Il n'est pas nécessaire de déclarer les objets QLabel que nous allons utiliser
- puisque nous n'aurons pas besoin d'y faire référence après leur création.
- La façon dont Qt gère la parenté des objets est traitée dans la section suivante.
+ Il n'est pas nécessaire de déclarer les objets QLabel que nous allons utiliser
+ puisque nous n'aurons pas besoin d'y faire référence après leur création.
+ La façon dont Qt gère la parenté des objets est traitée dans la section suivante.
- La macro Q_OBJECT implémente des fonctionnalités parmi les plus avancées de Qt.
+ La macro Q_OBJECT implémente des fonctionnalités parmi les plus avancées de Qt.
Pour le moment, il est bon de voir la macro Q_OBJECT comme un raccourci nous
- permettant d'utiliser les méthodes \l{QObject::}{tr()} et \l{QObject::}{connect()}.
+ permettant d'utiliser les méthodes \l{QObject::}{tr()} et \l{QObject::}{connect()}.
- Nous en avons maintenant terminé avec le fichier \c addressbook.h et allons
- passer à l'implémentation du fichier \c addressbook.cpp.
+ Nous en avons maintenant terminé avec le fichier \c addressbook.h et allons
+ passer à l'implémentation du fichier \c addressbook.cpp.
- \section1 Implémentation de la classe AddressBook
+ \section1 Implémentation de la classe AddressBook
- Le constructeur de la classe \c{AddressBook} prend en paramètre un QWidget, \e parent.
- Par convention, on passe ce paramètre au constructeur de la classe mère.
- Ce concept de parenté, où un parent peut avoir un ou plusieurs enfants, est utile
- pour regrouper les Widgets avec Qt. Par exemple, si vous détruisez le parent,
- tous ses enfants seront détruits égalament.
+ Le constructeur de la classe \c{AddressBook} prend en paramètre un QWidget, \e parent.
+ Par convention, on passe ce paramètre au constructeur de la classe mère.
+ Ce concept de parenté, où un parent peut avoir un ou plusieurs enfants, est utile
+ pour regrouper les Widgets avec Qt. Par exemple, si vous détruisez le parent,
+ tous ses enfants seront détruits égalament.
\snippet tutorials/addressbook/part1/addressbook.cpp constructor and input fields
- à l'intérieur de ce constructeur, on déclare et instancie deux objets locaux
- QLabel, \c nameLabel et \c addressLabel, de même on instancie \c nameLine et
- \c addressText. La méthode \l{QObject::tr()}{tr()} renvoie une version traduite
- de la chaîne de caractères, si elle existe; dans le cas contraire, elle renvoie
- la chaîne elle même. On peut voir cette méthode comme un marqueur \tt{<insérer
- la traduction ici>}, permettant de repérer les objets QString à considérer
- pour traduire une application. Vous remarquerez, dans les chapitres à venir
- comme dans les \l{Qt Examples}{exemples Qt}, qu'elle est utilisée chaque fois
- que l'on utilise une chaîne susceptible d'être traduite.
+ à l'intérieur de ce constructeur, on déclare et instancie deux objets locaux
+ QLabel, \c nameLabel et \c addressLabel, de même on instancie \c nameLine et
+ \c addressText. La méthode \l{QObject::tr()}{tr()} renvoie une version traduite
+ de la chaîne de caractères, si elle existe; dans le cas contraire, elle renvoie
+ la chaîne elle même. On peut voir cette méthode comme un marqueur \tt{<insérer
+ la traduction ici>}, permettant de repérer les objets QString à considérer
+ pour traduire une application. Vous remarquerez, dans les chapitres à venir
+ comme dans les \l{Qt Examples}{exemples Qt}, qu'elle est utilisée chaque fois
+ que l'on utilise une chaîne susceptible d'être traduite.
Lorsque l'on programme avec Qt, il est utile de savoir comment fonctionnent les
agencements ou layouts. Qt fournit trois classes principales de layouts pour
- contrôler le placement des widgets: QHBoxLayout, QVBoxLayout et QGridLayout.
+ contrôler le placement des widgets: QHBoxLayout, QVBoxLayout et QGridLayout.
\image addressbook-tutorial-part1-labeled-layout.png
- On utilise un QGridLayout pour positionner nos labels et champs de saisie de manière
- structurée. QGridLayout divise l'espace disponible en une grille, et place les
- widgets dans les cellules que l'on spécifie par les numéros de ligne et de colonne.
- Le diagramme ci-dessus présente les cellules et la position des widgets, et cette
- organisation est obtenue à l'aide du code suivant:
+ On utilise un QGridLayout pour positionner nos labels et champs de saisie de manière
+ structurée. QGridLayout divise l'espace disponible en une grille, et place les
+ widgets dans les cellules que l'on spécifie par les numéros de ligne et de colonne.
+ Le diagramme ci-dessus présente les cellules et la position des widgets, et cette
+ organisation est obtenue à l'aide du code suivant:
\snippet tutorials/addressbook/part1/addressbook.cpp layout
- On remarque que le label \c AddressLabel est positionné en utilisant Qt::AlignTop
- comme argument optionnel. Ceci est destiné à assurer qu'il ne sera pas centré
- verticalement dans la cellule (1,0). Pour un aperçu rapide des layouts de Qt,
+ On remarque que le label \c AddressLabel est positionné en utilisant Qt::AlignTop
+ comme argument optionnel. Ceci est destiné à assurer qu'il ne sera pas centré
+ verticalement dans la cellule (1,0). Pour un aperçu rapide des layouts de Qt,
consultez la section \l{Layout Management}.
- Afin d'installer l'objet layout dans un widget, il faut appeler la méthode
+ Afin d'installer l'objet layout dans un widget, il faut appeler la méthode
\l{QWidget::setLayout()}{setLayout()} du widget en question:
\snippet tutorials/addressbook/part1/addressbook.cpp setting the layout
- Enfin, on initialise le titre du widget à "Simple Address Book"
+ Enfin, on initialise le titre du widget à "Simple Address Book"
- \section1 Exécution de l'application
+ \section1 Exécution de l'application
- Un fichier séparé, \c main.cpp, est utilisé pour la méthode \c main(). Dans cette
- fonction, on crée une instance de QApplication, \c app. QApplication se charge de
- des ressources communes à l'ensemble de l'application, tel que les polices de
- caractères et le curseur par défaut, ainsi que de l'exécution de la boucle d'évènements.
+ Un fichier séparé, \c main.cpp, est utilisé pour la méthode \c main(). Dans cette
+ fonction, on crée une instance de QApplication, \c app. QApplication se charge de
+ des ressources communes à l'ensemble de l'application, tel que les polices de
+ caractères et le curseur par défaut, ainsi que de l'exécution de la boucle d'évènements.
De ce fait, il y a toujours un objet QApplication dans toute application graphique en Qt.
\snippet tutorials/addressbook/part1/main.cpp main function
On construit un nouveau widget \c AddressBook sur la pile et on invoque
- sa méthode \l{QWidget::show()}{show()} pour l'afficher.
- Cependant, le widget ne sera pas visible tant que la boucle d'évènements
- n'aura pas été lancée. On démarre la boucle d'évènements en appelant la
- méthode \l{QApplication::}{exec()} de l'application; le résultat renvoyé
- par cette méthode est lui même utilisé comme valeur de retour pour la méthode
+ sa méthode \l{QWidget::show()}{show()} pour l'afficher.
+ Cependant, le widget ne sera pas visible tant que la boucle d'évènements
+ n'aura pas été lancée. On démarre la boucle d'évènements en appelant la
+ méthode \l{QApplication::}{exec()} de l'application; le résultat renvoyé
+ par cette méthode est lui même utilisé comme valeur de retour pour la méthode
\c main().
- On comprend maintenant pourquoi \c AddressBook a été créé sur la pile: à la fin
+ On comprend maintenant pourquoi \c AddressBook a été créé sur la pile: à la fin
du programme, l'objet sort du scope de la fonction \c main() et tous ses widgets enfants
- sont supprimés, assurant ainsi qu'il n'y aura pas de fuites de mémoire.
+ sont supprimés, assurant ainsi qu'il n'y aura pas de fuites de mémoire.
*/
/*!
@@ -258,53 +258,53 @@
\example tutorials/addressbook-fr/part2
\title Carnet d'adresses 2 - Ajouter des adresses
- La prochaine étape pour créer notre carnet d'adresses est d'ajouter un soupçon
- d'interactivité.
+ La prochaine étape pour créer notre carnet d'adresses est d'ajouter un soupçon
+ d'interactivité.
\image addressbook-tutorial-part2-add-contact.png
Nous allons fournir un bouton que l'utilisateur peut
- cliquer pour ajouter un nouveau contact. Une structure de données est aussi
- nécessaire afin de pouvoir stocker les contacts en mémoire.
+ cliquer pour ajouter un nouveau contact. Une structure de données est aussi
+ nécessaire afin de pouvoir stocker les contacts en mémoire.
- \section1 Définition de la classe AddressBook
+ \section1 Définition de la classe AddressBook
Maintenant que nous avons mis en place les labels et les champs de saisie,
- nous ajoutons les boutons pour compléter le processus d'ajout d'un contact.
+ nous ajoutons les boutons pour compléter le processus d'ajout d'un contact.
Cela veut dire que notre fichier \c addressbook.h a maintenant trois
objets QPushButton et trois slots publics correspondant.
\snippet tutorials/addressbook/part2/addressbook.h slots
- Un slot est une méthode qui répond à un signal. Nous allons
- voir ce concept en détail lorsque nous implémenterons la classe \c{AddressBook}.
- Pour une explication détaillée du concept de signal et slot, vous pouvez
- vous référer au document \l{Signals and Slots}.
+ Un slot est une méthode qui répond à un signal. Nous allons
+ voir ce concept en détail lorsque nous implémenterons la classe \c{AddressBook}.
+ Pour une explication détaillée du concept de signal et slot, vous pouvez
+ vous référer au document \l{Signals and Slots}.
Les trois objets QPushButton \c addButton, \c submitButton et \c cancelButton
- sont maintenant inclus dans la déclaration des variables privées, avec
- \c nameLine et \c addressText du chapitre précédent.
+ sont maintenant inclus dans la déclaration des variables privées, avec
+ \c nameLine et \c addressText du chapitre précédent.
\snippet tutorials/addressbook/part2/addressbook.h pushbutton declaration
Nous avons besoin d'un conteneur pour stocker les contacts du carnet
- d'adresses, de façon à pouvoir les énumérer et les afficher.
- Un objet QMap, \c contacts, est utilisé pour ça, car il permet de stocker
- des paires clé-valeur: le nom du contact est la \e{clé} et l'adresse du contact
+ d'adresses, de façon à pouvoir les énumérer et les afficher.
+ Un objet QMap, \c contacts, est utilisé pour ça, car il permet de stocker
+ des paires clé-valeur: le nom du contact est la \e{clé} et l'adresse du contact
est la \e{valeur}.
\snippet tutorials/addressbook/part2/addressbook.h remaining private variables
- Nous déclarons aussi deux objects QString privés: \c oldName et \c oldAddress.
- Ces objets sont nécessaires pour conserver le nom et l'adresse du dernier contact
- affiché avant que l'utilisateur ne clique sur le bouton "Add". Grâce à ces variables
+ Nous déclarons aussi deux objects QString privés: \c oldName et \c oldAddress.
+ Ces objets sont nécessaires pour conserver le nom et l'adresse du dernier contact
+ affiché avant que l'utilisateur ne clique sur le bouton "Add". Grâce à ces variables
si l'utilisateur clique sur "Cancel", il est possible de revenir
- à l'affichage du dernier contact.
+ à l'affichage du dernier contact.
- \section1 Implémentation de la classe AddressBook
+ \section1 Implémentation de la classe AddressBook
Dans le constructeur de \c AddressBook, \c nameLine et
- \c addressText sont mis en mode lecture seule, de façon à autoriser l'affichage
+ \c addressText sont mis en mode lecture seule, de façon à autoriser l'affichage
mais pas la modification du contact courant.
\dots
@@ -317,16 +317,16 @@
\snippet tutorials/addressbook/part2/addressbook.cpp pushbutton declaration
- Le bouton \c addButton est affiché en invoquant la méthode \l{QPushButton::show()}
- {show()}, tandis que \c submitButton et \c cancelButton sont cachés en invoquant
- \l{QPushButton::hide()}{hide()}. Ces deux boutons ne seront affichés que lorsque
- l'utilisateur cliquera sur "Add", et ceci est géré par la méthode \c addContact()
- décrite plus loin.
+ Le bouton \c addButton est affiché en invoquant la méthode \l{QPushButton::show()}
+ {show()}, tandis que \c submitButton et \c cancelButton sont cachés en invoquant
+ \l{QPushButton::hide()}{hide()}. Ces deux boutons ne seront affichés que lorsque
+ l'utilisateur cliquera sur "Add", et ceci est géré par la méthode \c addContact()
+ décrite plus loin.
\snippet tutorials/addressbook/part2/addressbook.cpp connecting signals and slots
Nous connectons le signal \l{QPushButton::clicked()}{clicked()} de chaque bouton
- au slot qui gèrera l'action.
+ au slot qui gèrera l'action.
L'image ci-dessous illustre ceci:
\image addressbook-tutorial-part2-signals-and-slots.png
@@ -336,77 +336,77 @@
\snippet tutorials/addressbook/part2/addressbook.cpp vertical layout
- La methode \l{QBoxLayout::addStretch()}{addStretch()} est utilisée pour
- assurer que les boutons ne sont pas répartis uniformément, mais regroupés
- dans la partie supperieure du widget. La figure ci-dessous montre la différence
- si \l{QBoxLayout::addStretch()}{addStretch()} est utilisé ou pas.
+ La methode \l{QBoxLayout::addStretch()}{addStretch()} est utilisée pour
+ assurer que les boutons ne sont pas répartis uniformément, mais regroupés
+ dans la partie supperieure du widget. La figure ci-dessous montre la différence
+ si \l{QBoxLayout::addStretch()}{addStretch()} est utilisé ou pas.
\image addressbook-tutorial-part2-stretch-effects.png
- Ensuite nous ajoutons \c buttonLayout1 à \c mainLayout, en utilisant
+ Ensuite nous ajoutons \c buttonLayout1 à \c mainLayout, en utilisant
\l{QGridLayout::addLayout()}{addLayout()}. Ceci nous permet d'imbriquer les
mises en page puisque \c buttonLayout1 est maintenant un enfant de \c mainLayout.
\snippet tutorials/addressbook/part2/addressbook.cpp grid layout
- Les coordonnées du layout global ressemblent maintenant à ça:
+ Les coordonnées du layout global ressemblent maintenant à ça:
\image addressbook-tutorial-part2-labeled-layout.png
- Dans la méthode \c addContact(), nous stockons les détails du dernier
- contact affiché dans \c oldName et \c oldAddress. Ensuite, nous
- vidons ces champs de saisie et nous désactivons le mode
- lecture seule. Le focus est placé sur \c nameLine et on affiche
+ Dans la méthode \c addContact(), nous stockons les détails du dernier
+ contact affiché dans \c oldName et \c oldAddress. Ensuite, nous
+ vidons ces champs de saisie et nous désactivons le mode
+ lecture seule. Le focus est placé sur \c nameLine et on affiche
\c submitButton et \c cancelButton.
\snippet tutorials/addressbook/part2/addressbook.cpp addContact
- La méthode \c submitContact() peut être divisée en trois parties:
+ La méthode \c submitContact() peut être divisée en trois parties:
\list 1
- \o Nous extrayons les détails du contact depuis \c nameLine et \c addressText
+ \o Nous extrayons les détails du contact depuis \c nameLine et \c addressText
et les stockons dans des objets QString. Nous les validons pour s'assurer
- que l'utilisateur n'a pas cliqué sur "Add" avec des champs de saisie
- vides; sinon un message est affiché avec QMessageBox pour rappeller à
- l'utilisateur que les deux champs doivent être complétés.
+ que l'utilisateur n'a pas cliqué sur "Add" avec des champs de saisie
+ vides; sinon un message est affiché avec QMessageBox pour rappeller à
+ l'utilisateur que les deux champs doivent être complétés.
\snippet tutorials/addressbook/part2/addressbook.cpp submitContact part1
- \o Ensuite, nous vérifions si le contact existe déjà. Si aucun contacts
- existant n'entre en conflit avec le nouveau, nous l'ajoutons à
+ \o Ensuite, nous vérifions si le contact existe déjà. Si aucun contacts
+ existant n'entre en conflit avec le nouveau, nous l'ajoutons à
\c contacts et nous affichons un QMessageBox pour informer l'utilisateur
- que le contact a été ajouté.
+ que le contact a été ajouté.
\snippet tutorials/addressbook/part2/addressbook.cpp submitContact part2
- Si le contact existe déjà, nous affichons un QMessageBox pour informer
- l'utilisateur du problème.
- Notre objet \c contacts est basé sur des paires clé-valeur formés par
- le nom et l'adresse, nous voulons nous assurer que la \e clé est unique.
+ Si le contact existe déjà, nous affichons un QMessageBox pour informer
+ l'utilisateur du problème.
+ Notre objet \c contacts est basé sur des paires clé-valeur formés par
+ le nom et l'adresse, nous voulons nous assurer que la \e clé est unique.
- \o Une fois que les deux vérifications précédentes ont été traitées,
- nous restaurons les boutons à leur état normal à l'aide du code
+ \o Une fois que les deux vérifications précédentes ont été traitées,
+ nous restaurons les boutons à leur état normal à l'aide du code
suivant:
\snippet tutorials/addressbook/part2/addressbook.cpp submitContact part3
\endlist
- La capture d'écran ci-dessous montre l'affichage fournit par un objet
- QMessageBox, utilisé ici pour afficher un message d'information
- à l'utilisateur:
+ La capture d'écran ci-dessous montre l'affichage fournit par un objet
+ QMessageBox, utilisé ici pour afficher un message d'information
+ à l'utilisateur:
\image addressbook-tutorial-part2-add-successful.png
- La méthode \c cancel() restaure les détails du dernier contact, active
+ La méthode \c cancel() restaure les détails du dernier contact, active
\c addButton, et cache \c submitButton et \c cancelButton.
\snippet tutorials/addressbook/part2/addressbook.cpp cancel
- L'idée générale pour augmenter la flexibilité lors de l'ajout d'un
- contact est de donner la possiblité de cliquer sur "Add"
- ou "Cancel" à n'importe quel moment.
- L'organigramme ci-dessous reprend l'ensemble des interactions dévelopées
+ L'idée générale pour augmenter la flexibilité lors de l'ajout d'un
+ contact est de donner la possiblité de cliquer sur "Add"
+ ou "Cancel" à n'importe quel moment.
+ L'organigramme ci-dessous reprend l'ensemble des interactions dévelopées
jusqu'ici:
\image addressbook-tutorial-part2-add-flowchart.png
@@ -418,118 +418,118 @@
\contentspage {Tutoriel "Carnet d'adresses"}{Sommaire}
\nextpage {tutorials/addressbook-fr/part4}{Chapitre 4}
\example tutorials/addressbook-fr/part3
- \title Carnet d'adresses 3 - Navigation entre les éléments
+ \title Carnet d'adresses 3 - Navigation entre les éléments
- L'application "Carnet d'adresses" est maintenant à moitié terminée. Il
+ L'application "Carnet d'adresses" est maintenant à moitié terminée. Il
nous faut maintenant ajouter quelques fonctions pour naviguer entre
- les contacts. Avant de commencer, il faut se décider sur le type de structure de
- données le plus approprié pour stocker les contacts.
+ les contacts. Avant de commencer, il faut se décider sur le type de structure de
+ données le plus approprié pour stocker les contacts.
- Dans le chapitre 2, nous avons utilisé un QMap utilisant des paires clé-valeur,
- avec le nom du contact comme \e clé, et l'adresse du contact comme \e valeur.
+ Dans le chapitre 2, nous avons utilisé un QMap utilisant des paires clé-valeur,
+ avec le nom du contact comme \e clé, et l'adresse du contact comme \e valeur.
Cela fonctionnait bien jusqu'ici, mais pour ajouter la navigation entre les
- entrées, quelques améliorations sont nécessaires.
+ entrées, quelques améliorations sont nécessaires.
- Nous améliorerons le QMap en le faisant ressembler à une structure de données
- similaire à une liste liée, où tous les éléments sont connectés, y compris
- le premier et le dernier élément. La figure ci-dessous illustre cette structure
- de donnée.
+ Nous améliorerons le QMap en le faisant ressembler à une structure de données
+ similaire à une liste liée, où tous les éléments sont connectés, y compris
+ le premier et le dernier élément. La figure ci-dessous illustre cette structure
+ de donnée.
\image addressbook-tutorial-part3-linkedlist.png
- \section1 Définition de la classe AddressBook
+ \section1 Définition de la classe AddressBook
Pour ajouter les fonctions de navigation au carnet d'adresses, nous avons
- besoin de deux slots supplémentaires dans notre classe \c AddressBook:
- \c next() et \c previous(). Ceux-ci sont ajoutés au fichier addressbook.h:
+ besoin de deux slots supplémentaires dans notre classe \c AddressBook:
+ \c next() et \c previous(). Ceux-ci sont ajoutés au fichier addressbook.h:
\snippet tutorials/addressbook/part3/addressbook.h navigation functions
Nous avons aussi besoin de deux nouveaux objets QPushButton, nous ajoutons
- donc les variables privées \c nextButton et \c previousButton.
+ donc les variables privées \c nextButton et \c previousButton.
\snippet tutorials/addressbook/part3/addressbook.h navigation pushbuttons
- \section1 Implémentation de la classe AddressBook
+ \section1 Implémentation de la classe AddressBook
- A l'intérieur du constructeur de \c AddressBook, dans \c addressbook.cpp, nous
- instancions \c nextButton et \c previousButton et nous les désactivons
- par défaut. Nous faisons ceci car la navigation ne doit être activée
+ A l'intérieur du constructeur de \c AddressBook, dans \c addressbook.cpp, nous
+ instancions \c nextButton et \c previousButton et nous les désactivons
+ par défaut. Nous faisons ceci car la navigation ne doit être activée
que lorsqu'il y a plus d'un contact dans le carnet d'adresses.
\snippet tutorials/addressbook/part3/addressbook.cpp navigation pushbuttons
- Nous connectons alors ces boutons à leur slots respectifs:
+ Nous connectons alors ces boutons à leur slots respectifs:
\snippet tutorials/addressbook/part3/addressbook.cpp connecting navigation signals
- L'image ci-dessous montre l'interface utilisateur que nous allons créer.
- Remarquez que cela ressemble de plus en plus à l'interface du programme
+ L'image ci-dessous montre l'interface utilisateur que nous allons créer.
+ Remarquez que cela ressemble de plus en plus à l'interface du programme
complet.
\image addressbook-tutorial-part3-screenshot.png
Nous suivons les conventions pour les fonctions \c next() et \c previous()
- en plaçant \c nextButton à droite et \c previousButton à gauche. Pour
+ en plaçant \c nextButton à droite et \c previousButton à gauche. Pour
faire cette mise en page intuitive, nous utilisons un QHBoxLayout pour
- placer les widgets côte à côte:
+ placer les widgets côte à côte:
\snippet tutorials/addressbook/part3/addressbook.cpp navigation layout
- L'objet QHBoxLayout, \c buttonLayout2, est ensuite ajouté à \c mainLayout.
+ L'objet QHBoxLayout, \c buttonLayout2, est ensuite ajouté à \c mainLayout.
\snippet tutorials/addressbook/part3/addressbook.cpp adding navigation layout
- La figure ci-dessous montre les systèmes de coordonnées pour les widgets du
+ La figure ci-dessous montre les systèmes de coordonnées pour les widgets du
\c mainLayout.
\image addressbook-tutorial-part3-labeled-layout.png
- Dans notre méthode \c addContact(), nous avons desactivé ces boutons
- pour être sûr que l'utilisateur n'utilise pas la navigation lors de
+ Dans notre méthode \c addContact(), nous avons desactivé ces boutons
+ pour être sûr que l'utilisateur n'utilise pas la navigation lors de
l'ajout d'un contact.
\snippet tutorials/addressbook/part3/addressbook.cpp disabling navigation
- Dans notre méthode \c submitContact(), nous activons les boutons de
+ Dans notre méthode \c submitContact(), nous activons les boutons de
navigation, \c nextButton et \c previousButton, en fonction de la
- taille de \c contacts. Commen mentionné plus tôt, la navigation n'est
- activée que si il y a plus d'un contact dans le carnet d'adresses.
+ taille de \c contacts. Commen mentionné plus tôt, la navigation n'est
+ activée que si il y a plus d'un contact dans le carnet d'adresses.
Les lignes suivantes montrent comment faire cela:
\snippet tutorials/addressbook/part3/addressbook.cpp enabling navigation
Nous incluons aussi ces lignes de code dans le bouton \c cancel().
- Souvenez vous que nous voulons émuler une liste-liée ciruculaire à
- l'aide de l'objet QMap, \c contacts. Pour faire cela, nous obtenons un itérateur
- sur \c contact dans la méthode \c next(), et ensuite:
+ Souvenez vous que nous voulons émuler une liste-liée ciruculaire à
+ l'aide de l'objet QMap, \c contacts. Pour faire cela, nous obtenons un itérateur
+ sur \c contact dans la méthode \c next(), et ensuite:
\list
- \o Si l'itérateur n'est pas à la fin de \c contacts, nous l'incrémentons
- \o Si l'itérateur est à la fin de \c contacts, nous changeons sa position
- jusqu'au début de \c contacts. Cela donne l'illusion que notre QMap
+ \o Si l'itérateur n'est pas à la fin de \c contacts, nous l'incrémentons
+ \o Si l'itérateur est à la fin de \c contacts, nous changeons sa position
+ jusqu'au début de \c contacts. Cela donne l'illusion que notre QMap
fonctionne comme une liste circulaire.
\endlist
\snippet tutorials/addressbook/part3/addressbook.cpp next() function
- Une fois que nous avons itéré jusqu'à l'objet recherché dans \c contacts,
+ Une fois que nous avons itéré jusqu'à l'objet recherché dans \c contacts,
nous affichons son contenu sur \c nameLine et \c addressText.
- De la même façon, pour la méthode \c previous(), nous obtenons un
- itérateur sur \c contacts et ensuite:
+ De la même façon, pour la méthode \c previous(), nous obtenons un
+ itérateur sur \c contacts et ensuite:
\list
- \o Si l'itérateur est à la fin de \c contacts, on réinitialise
+ \o Si l'itérateur est à la fin de \c contacts, on réinitialise
l'affichage et on retourne.
- \o Si l'itérateur est au début de \c contacts, on change sa
- position jusqu'à la fin
- \o Ensuite, on décrémente l'itérateur
+ \o Si l'itérateur est au début de \c contacts, on change sa
+ position jusqu'à la fin
+ \o Ensuite, on décrémente l'itérateur
\endlist
\snippet tutorials/addressbook/part3/addressbook.cpp previous() function
- à nouveau, nous affichons le contenu de l'objet courant dans \c contacts.
+ à nouveau, nous affichons le contenu de l'objet courant dans \c contacts.
*/
@@ -540,27 +540,27 @@
\contentspage {Tutoriel "Carnet d'adresses"}{Sommaire}
\nextpage {tutorials/addressbook-fr/part5}{Chapitre 5}
\example tutorials/addressbook-fr/part4
- \title Carnet d'Adresses 4 - éditer et supprimer des adresses
+ \title Carnet d'Adresses 4 - éditer et supprimer des adresses
- Dans ce chapitre, nous verrons comment modifier les données des contacts
+ Dans ce chapitre, nous verrons comment modifier les données des contacts
contenus dans l'application carnet d'adresses.
\image addressbook-tutorial-screenshot.png
Nous avons maintenant un carnet d'adresses qui ne se contente pas de
- lister des contacts de façon ordonnée, mais permet également la
- navigation. Il serait pratique d'inclure des fonctions telles qu'éditer et
- supprimer, afin que les détails associés à un contact puissent être
- modifiés lorsque c'est nécessaire. Cependant, cela requiert une légère
- modification, sous la forme d'énumérations. Au chapitre précédent, nous avions deux
- modes: \c {AddingMode} et \c {NavigationMode}, mais ils n'étaient pas
- définis en tant qu'énumérations. Au lieu de ça, on activait et désactivait les
+ lister des contacts de façon ordonnée, mais permet également la
+ navigation. Il serait pratique d'inclure des fonctions telles qu'éditer et
+ supprimer, afin que les détails associés à un contact puissent être
+ modifiés lorsque c'est nécessaire. Cependant, cela requiert une légère
+ modification, sous la forme d'énumérations. Au chapitre précédent, nous avions deux
+ modes: \c {AddingMode} et \c {NavigationMode}, mais ils n'étaient pas
+ définis en tant qu'énumérations. Au lieu de ça, on activait et désactivait les
boutons correspondants manuellement, au prix de multiples redondances dans
le code.
- Dans ce chapitre, on définit l'énumération \c Mode avec trois valeurs possibles.
+ Dans ce chapitre, on définit l'énumération \c Mode avec trois valeurs possibles.
\list
\o \c{NavigationMode},
@@ -568,22 +568,22 @@
\o \c{EditingMode}.
\endlist
- \section1 Définition de la classe AddressBook
+ \section1 Définition de la classe AddressBook
- Le fichier \c addressbook.h est mis a jour pour contenir l'énumération \c Mode :
+ Le fichier \c addressbook.h est mis a jour pour contenir l'énumération \c Mode :
\snippet tutorials/addressbook/part4/addressbook.h Mode enum
- On ajoute également deux nouveaux slots, \c editContact() et
- \c removeContact(), à notre liste de slots publics.
+ On ajoute également deux nouveaux slots, \c editContact() et
+ \c removeContact(), à notre liste de slots publics.
\snippet tutorials/addressbook/part4/addressbook.h edit and remove slots
- Afin de basculer d'un mode à l'autre, on introduit la méthode
- \c updateInterface() pour contrôller l'activation et la désactivation de
- tous les objets QPushButton. On ajoute également deux nouveaux boutons,
- \c editButton et \c removeButton, pour les fonctions d'édition
- et de suppression mentionnées plus haut.
+ Afin de basculer d'un mode à l'autre, on introduit la méthode
+ \c updateInterface() pour contrôller l'activation et la désactivation de
+ tous les objets QPushButton. On ajoute également deux nouveaux boutons,
+ \c editButton et \c removeButton, pour les fonctions d'édition
+ et de suppression mentionnées plus haut.
\snippet tutorials/addressbook/part4/addressbook.h updateInterface() declaration
\dots
@@ -591,97 +591,97 @@
\dots
\snippet tutorials/addressbook/part4/addressbook.h mode declaration
- Enfin, on déclare \c currentMode pour garder une trace du mode
- actuellement utilisé.
+ Enfin, on déclare \c currentMode pour garder une trace du mode
+ actuellement utilisé.
- \section1 Implémentation de la classe AddressBook
+ \section1 Implémentation de la classe AddressBook
- Il nous faut maintenant implémenter les fonctionnalités de changement de
+ Il nous faut maintenant implémenter les fonctionnalités de changement de
mode de l'application carnet d'adresses. Les boutons \c editButton et
- \c removeButton sont instanciés et désactivés par défaut, puisque le
- carnet d'adresses démarre sans aucun contact en mémoire.
+ \c removeButton sont instanciés et désactivés par défaut, puisque le
+ carnet d'adresses démarre sans aucun contact en mémoire.
\snippet tutorials/addressbook/part4/addressbook.cpp edit and remove buttons
- Ces boutons sont ensuite connectés à leurs slots respectifs,
- \c editContact() et \c removeContact(), avant d'être ajoutés à
+ Ces boutons sont ensuite connectés à leurs slots respectifs,
+ \c editContact() et \c removeContact(), avant d'être ajoutés à
\c buttonLayout1.
\snippet tutorials/addressbook/part4/addressbook.cpp connecting edit and remove
\dots
\snippet tutorials/addressbook/part4/addressbook.cpp adding edit and remove to the layout
- La methode \c editContact() place les anciens détails du contact dans
+ La methode \c editContact() place les anciens détails du contact dans
\c oldName et \c oldAddress, avant de basculer vers le mode
\c EditingMode. Dans ce mode, les boutons \c submitButton et
- \c cancelButton sont tous deux activés, l'utilisateur peut par conséquent
- modifier les détails du contact et cliquer sur l'un de ces deux boutons
+ \c cancelButton sont tous deux activés, l'utilisateur peut par conséquent
+ modifier les détails du contact et cliquer sur l'un de ces deux boutons
par la suite.
\snippet tutorials/addressbook/part4/addressbook.cpp editContact() function
- La méthode \c submitContact() a été divisée en deux avec un bloc
+ La méthode \c submitContact() a été divisée en deux avec un bloc
\c{if-else}. On teste \c currentMode pour voir si le mode courant est
- \c AddingMode. Si c'est le cas, on procède à l'ajout.
+ \c AddingMode. Si c'est le cas, on procède à l'ajout.
\snippet tutorials/addressbook/part4/addressbook.cpp submitContact() function beginning
\dots
\snippet tutorials/addressbook/part4/addressbook.cpp submitContact() function part1
Sinon, on s'assure que \c currentMode est en \c EditingMode. Si c'est le
- cas, on compare \c oldName et \c name. Si le nom a changé, on supprime
- l'ancien contact de \c contacts et on insère le contact mis a jour.
+ cas, on compare \c oldName et \c name. Si le nom a changé, on supprime
+ l'ancien contact de \c contacts et on insère le contact mis a jour.
\snippet tutorials/addressbook/part4/addressbook.cpp submitContact() function part2
- Si seule l'adresse a changé (i.e. \c oldAddress n'est pas identique à
- \c address), on met à jour l'adresse du contact. Enfin on règle
- \c currentMode à \c NavigationMode. C'est une étape importante puisque
- c'est cela qui réactive tous les boutons désactivés.
+ Si seule l'adresse a changé (i.e. \c oldAddress n'est pas identique à
+ \c address), on met à jour l'adresse du contact. Enfin on règle
+ \c currentMode à \c NavigationMode. C'est une étape importante puisque
+ c'est cela qui réactive tous les boutons désactivés.
- Afin de retirer un contact du carnet d'adresses, on implémente la méthode
- \c removeContact(). Cette méthode vérifie que le contact est présent dans
+ Afin de retirer un contact du carnet d'adresses, on implémente la méthode
+ \c removeContact(). Cette méthode vérifie que le contact est présent dans
\c contacts.
\snippet tutorials/addressbook/part4/addressbook.cpp removeContact() function
- Si c'est le cas, on affiche une boîte de dialogue QMessageBox, demandant
- confirmation de la suppression à l'utilisateur. Une fois la confirmation
- effectuée, on appelle \c previous(), afin de s'assurer que l'interface
- utilisateur affiche une autre entrée, et on supprime le contact en
- utilisant le méthode \l{QMap::remove()}{remove()} de \l{QMap}. Dans un
+ Si c'est le cas, on affiche une boîte de dialogue QMessageBox, demandant
+ confirmation de la suppression à l'utilisateur. Une fois la confirmation
+ effectuée, on appelle \c previous(), afin de s'assurer que l'interface
+ utilisateur affiche une autre entrée, et on supprime le contact en
+ utilisant le méthode \l{QMap::remove()}{remove()} de \l{QMap}. Dans un
souci pratique, on informe l'utilisateur de la suppression par le biais
- d'une autre QMessageBox. Les deux boîtes de dialogue utilisées dans cette
- méthode sont représentées ci-dessous.
+ d'une autre QMessageBox. Les deux boîtes de dialogue utilisées dans cette
+ méthode sont représentées ci-dessous.
\image addressbook-tutorial-part4-remove.png
- \section2 Mise à jour de l'Interface utilisateur
+ \section2 Mise à jour de l'Interface utilisateur
- On a évoqué plus haut la méthode \c updateInterface() comme moyen
- d'activer et de désactiver les différents boutons de l'interface en
- fonction du mode. Cette méthode met à jour le mode courant selon
- l'argument \c mode qui lui est passé, en l'assignant à \c currentMode,
+ On a évoqué plus haut la méthode \c updateInterface() comme moyen
+ d'activer et de désactiver les différents boutons de l'interface en
+ fonction du mode. Cette méthode met à jour le mode courant selon
+ l'argument \c mode qui lui est passé, en l'assignant à \c currentMode,
avant de tester sa valeur.
- Chacun des boutons est ensuite activé ou désactivé, en fonction du mode.
+ Chacun des boutons est ensuite activé ou désactivé, en fonction du mode.
Le code source pour les cas \c AddingMode et \c EditingMode est visible
ci-dessous:
\snippet tutorials/addressbook/part4/addressbook.cpp update interface() part 1
Dans le cas de \c NavigationMode, en revanche, des tests conditionnels
- sont passés en paramètre de QPushButton::setEnabled(). Ceci permet de
- s'assurer que les boutons \c editButton et \c removeButton ne sont activés
+ sont passés en paramètre de QPushButton::setEnabled(). Ceci permet de
+ s'assurer que les boutons \c editButton et \c removeButton ne sont activés
que s'il existe au moins un contact dans le carnet d'adresses;
- \c nextButton et \c previousButton ne sont activés que lorsqu'il existe
+ \c nextButton et \c previousButton ne sont activés que lorsqu'il existe
plus d'un contact dans le carnet d'adresses.
\snippet tutorials/addressbook/part4/addressbook.cpp update interface() part 2
- En effectuant les opérations de réglage du mode et de mise à jour de
- l'interface utilisateur au sein de la même méthode, on est à l'abri de
- l'éventualité où l'interface utilisateur se "désynchronise" de l'état
+ En effectuant les opérations de réglage du mode et de mise à jour de
+ l'interface utilisateur au sein de la même méthode, on est à l'abri de
+ l'éventualité où l'interface utilisateur se "désynchronise" de l'état
interne de l'application.
*/
@@ -694,7 +694,7 @@
\example tutorials/addressbook-fr/part5
\title Carnet d'adresse 5 - Ajout d'une fonction de recherche
- Dans ce chapitre, nous allons voir les possibilités pour rechercher
+ Dans ce chapitre, nous allons voir les possibilités pour rechercher
des contacts dans le carnet d'adresse.
\image addressbook-tutorial-part5-screenshot.png
@@ -703,110 +703,110 @@
il devient difficile de naviguer avec les boutons \e Next et \e Previous.
Dans ce cas, une fonction de recherche serait plus efficace pour rechercher
les contacts.
- La capture d'écran ci-dessus montre le bouton de recherche \e Find et sa position
+ La capture d'écran ci-dessus montre le bouton de recherche \e Find et sa position
dans le paneau de bouton.
Lorsque l'utilisateur clique sur le bouton \e Find, il est courant d'afficher
- une boîte de dialogue qui demande à l'utilisateur d'entrer un nom de contact.
+ une boîte de dialogue qui demande à l'utilisateur d'entrer un nom de contact.
Qt fournit la classe QDialog, que nous sous-classons dans ce chapitre pour
- implémenter la class \c FindDialog.
+ implémenter la class \c FindDialog.
- \section1 Définition de la classe FindDialog
+ \section1 Définition de la classe FindDialog
\image addressbook-tutorial-part5-finddialog.png
- Pour sous-classer QDialog, nous commençons par inclure le header de
- QDialog dans le fichier \c finddialog.h. De plus, nous déclarons les
+ Pour sous-classer QDialog, nous commençons par inclure le header de
+ QDialog dans le fichier \c finddialog.h. De plus, nous déclarons les
classes QLineEdit et QPushButton car nous utilisons ces widgets dans
notre classe dialogue.
Tout comme dans la classe \c AddressBook, la classe \c FindDialog utilise
- la macro Q_OBJECT et son constructeur est défini de façon à accepter
- un QWidget parent, même si cette boîte de dialogue sera affichée dans une
- fenêtre séparée.
+ la macro Q_OBJECT et son constructeur est défini de façon à accepter
+ un QWidget parent, même si cette boîte de dialogue sera affichée dans une
+ fenêtre séparée.
\snippet tutorials/addressbook/part5/finddialog.h FindDialog header
- Nous définissons la méthode publique \c getFindText() pour être utilisée
+ Nous définissons la méthode publique \c getFindText() pour être utilisée
par les classes qui instancient \c FindDialog, ce qui leur permet d'obtenir
- le texte entré par l'utilisateur. Un slot public, \c findClicked(), est
- défini pour prendre en charge le texte lorsque l'utilisateur clique sur
+ le texte entré par l'utilisateur. Un slot public, \c findClicked(), est
+ défini pour prendre en charge le texte lorsque l'utilisateur clique sur
le bouton \gui Find.
- Finalement, nous définissons les variables privées \c findButton,
+ Finalement, nous définissons les variables privées \c findButton,
\c lineEdit et \c findText, qui correspondent respectivement au bouton
\gui Find, au champ de texte dans lequel l'utilisateur tape le texte
- à rechercher, et à une variable interne stockant le texte pour une
- utilisation ultérieure.
+ à rechercher, et à une variable interne stockant le texte pour une
+ utilisation ultérieure.
- \section1 Implémentation de la classe FindDialog
+ \section1 Implémentation de la classe FindDialog
Dans le constructeur de \c FindDialog, nous instancions les objets des
- variables privées \c lineEdit, \c findButton et \c findText. Nous utilisons ensuite
+ variables privées \c lineEdit, \c findButton et \c findText. Nous utilisons ensuite
un QHBoxLayout pour positionner les widgets.
\snippet tutorials/addressbook/part5/finddialog.cpp constructor
- Nous mettons en place la mise en page et le titre de la fenêtre, et
+ Nous mettons en place la mise en page et le titre de la fenêtre, et
nous connectons les signaux aux slots. Remarquez que le signal
- \l{QPushButton::clicked()}{clicked()} de \c{findButton} est connecté
- à \c findClicked() et \l{QDialog::accept()}{accept()}. Le slot
+ \l{QPushButton::clicked()}{clicked()} de \c{findButton} est connecté
+ à \c findClicked() et \l{QDialog::accept()}{accept()}. Le slot
\l{QDialog::accept()}{accept()} fourni par le QDialog ferme
- la boîte de dialogue et lui donne le code de retour \l{QDialog::}{Accepted}.
- Nous utilisons cette fonction pour aider la méthode \c findContact() de la classe
- \c{AddressBook} à savoir si l'objet \c FindDialog a été fermé. Ceci sera
- expliqué plus loin lorsque nous verrons la méthode \c findContact().
+ la boîte de dialogue et lui donne le code de retour \l{QDialog::}{Accepted}.
+ Nous utilisons cette fonction pour aider la méthode \c findContact() de la classe
+ \c{AddressBook} à savoir si l'objet \c FindDialog a été fermé. Ceci sera
+ expliqué plus loin lorsque nous verrons la méthode \c findContact().
\image addressbook-tutorial-part5-signals-and-slots.png
Dans \c findClicked(), nous validons le champ de texte pour nous
- assurer que l'utilisateur n'a pas cliqué sur le bouton \gui Find sans
- avoir entré un nom de contact. Ensuite, nous stockons le texte du champ
- d'entrée \c lineEdit dans \c findText. Et finalement nous vidons le
- contenu de \c lineEdit et cachons la boîte de dialogue.
+ assurer que l'utilisateur n'a pas cliqué sur le bouton \gui Find sans
+ avoir entré un nom de contact. Ensuite, nous stockons le texte du champ
+ d'entrée \c lineEdit dans \c findText. Et finalement nous vidons le
+ contenu de \c lineEdit et cachons la boîte de dialogue.
\snippet tutorials/addressbook/part5/finddialog.cpp findClicked() function
- La variable \c findText a un accesseur publique associé: \c getFindText().
- Étant donné que nous ne modifions \c findText directement que dans le
- constructeur et la méthode \c findClicked(), nous ne créons pas
- de manipulateurs associé à \c getFindText().
+ La variable \c findText a un accesseur publique associé: \c getFindText().
+ Étant donné que nous ne modifions \c findText directement que dans le
+ constructeur et la méthode \c findClicked(), nous ne créons pas
+ de manipulateurs associé à \c getFindText().
Puisque \c getFindText() est publique, les classes instanciant et
- utilisant \c FindDialog peuvent toujours accéder à la chaîne de
- caractères que l'utilisateur a entré et accepté.
+ utilisant \c FindDialog peuvent toujours accéder à la chaîne de
+ caractères que l'utilisateur a entré et accepté.
\snippet tutorials/addressbook/part5/finddialog.cpp getFindText() function
- \section1 Définition de la classe AddressBook
+ \section1 Définition de la classe AddressBook
Pour utiliser \c FindDialog depuis la classe \c AddressBook, nous
incluons \c finddialog.h dans le fichier \c addressbook.h.
\snippet tutorials/addressbook/part5/addressbook.h include finddialog's header
- Jusqu'ici, toutes les fonctionnalités du carnet d'adresses ont un
- QPushButton et un slot correspondant. De la même façon, pour la
- fonctionnalité \gui Find, nous avons \c findButton et \c findContact().
+ Jusqu'ici, toutes les fonctionnalités du carnet d'adresses ont un
+ QPushButton et un slot correspondant. De la même façon, pour la
+ fonctionnalité \gui Find, nous avons \c findButton et \c findContact().
- Le \c findButton est déclaré comme une variable privée et la
- méthode \c findContact() est déclarée comme un slot public.
+ Le \c findButton est déclaré comme une variable privée et la
+ méthode \c findContact() est déclarée comme un slot public.
\snippet tutorials/addressbook/part5/addressbook.h findContact() declaration
\dots
\snippet tutorials/addressbook/part5/addressbook.h findButton declaration
- Finalement, nous déclarons la variable privée \c dialog que nous allons
- utiliser pour accéder à une instance de \c FindDialog.
+ Finalement, nous déclarons la variable privée \c dialog que nous allons
+ utiliser pour accéder à une instance de \c FindDialog.
\snippet tutorials/addressbook/part5/addressbook.h FindDialog declaration
- Une fois que nous avons instancié la boîte de dialogue, nous voulons l'utiliser
- plus qu'une fois. Utiliser une variable privée nous permet d'y référer
- à plus d'un endroit dans la classe.
+ Une fois que nous avons instancié la boîte de dialogue, nous voulons l'utiliser
+ plus qu'une fois. Utiliser une variable privée nous permet d'y référer
+ à plus d'un endroit dans la classe.
- \section1 Implémentation de la classe AddressBook
+ \section1 Implémentation de la classe AddressBook
- Dans le constructeur de \c AddressBook, nous instancions nos objets privés,
+ Dans le constructeur de \c AddressBook, nous instancions nos objets privés,
\c findbutton et \c findDialog:
\snippet tutorials/addressbook/part5/addressbook.cpp instantiating findButton
@@ -814,25 +814,25 @@
\snippet tutorials/addressbook/part5/addressbook.cpp instantiating FindDialog
Ensuite, nous connectons le signal \l{QPushButton::clicked()}{clicked()} de
- \c{findButton} à \c findContact().
+ \c{findButton} à \c findContact().
\snippet tutorials/addressbook/part5/addressbook.cpp signals and slots for find
- Maintenant, tout ce qui manque est le code de notre méthode \c findContact():
+ Maintenant, tout ce qui manque est le code de notre méthode \c findContact():
\snippet tutorials/addressbook/part5/addressbook.cpp findContact() function
- Nous commençons par afficher l'instance de \c FindDialog, \c dialog.
- L'utilisateur peut alors entrer le nom du contact à rechercher. Lorsque
- l'utilisateur clique sur le bouton \c findButton, la boîte de dialogue est
- masquée et le code de retour devient QDialog::Accepted. Ce code de retour
+ Nous commençons par afficher l'instance de \c FindDialog, \c dialog.
+ L'utilisateur peut alors entrer le nom du contact à rechercher. Lorsque
+ l'utilisateur clique sur le bouton \c findButton, la boîte de dialogue est
+ masquée et le code de retour devient QDialog::Accepted. Ce code de retour
vient remplir la condition du premier if.
Ensuite, nous extrayons le texte que nous utiliserons pour la recherche,
- il s'agit ici de \c contactName obtenu à l'aide de la méthode \c getFindText()
+ il s'agit ici de \c contactName obtenu à l'aide de la méthode \c getFindText()
de \c FindDialog. Si le contact existe dans le carnet d'adresse, nous
l'affichons directement. Sinon, nous affichons le QMessageBox suivant pour
- indiquer que la recherche à échouée.
+ indiquer que la recherche à échouée.
\image addressbook-tutorial-part5-notfound.png
*/
@@ -845,49 +845,49 @@
\example tutorials/addressbook-fr/part6
\title Carnet d'Adresses 6 - Sauvegarde et chargement
- Ce chapitre couvre les fonctionnalités de gestion des fichiers de Qt que
- l'on utilise pour écrire les procédures de sauvegarde et chargement pour
+ Ce chapitre couvre les fonctionnalités de gestion des fichiers de Qt que
+ l'on utilise pour écrire les procédures de sauvegarde et chargement pour
l'application carnet d'adresses.
\image addressbook-tutorial-part6-screenshot.png
Bien que la navigation et la recherche de contacts soient des
- fonctionnalités importantes, notre carnet d'adresses ne sera pleinement
+ fonctionnalités importantes, notre carnet d'adresses ne sera pleinement
utilisable qu'une fois que l'on pourra sauvegarder les contacts existants
- et les charger à nouveau par la suite.
- Qt fournit de nombreuses classes pour gérer les \l{Input/Output and
- Networking}{entrées et sorties}, mais nous avons choisi de nous contenter d'une
- combinaison de deux classes simples à utiliser ensemble: QFile et QDataStream.
+ et les charger à nouveau par la suite.
+ Qt fournit de nombreuses classes pour gérer les \l{Input/Output and
+ Networking}{entrées et sorties}, mais nous avons choisi de nous contenter d'une
+ combinaison de deux classes simples à utiliser ensemble: QFile et QDataStream.
- Un objet QFile représente un fichier sur le disque qui peut être lu, et
- dans lequel on peut écrire. QFile est une classe fille de la classe plus
- générique QIODevice, qui peut représenter différents types de
- périphériques.
+ Un objet QFile représente un fichier sur le disque qui peut être lu, et
+ dans lequel on peut écrire. QFile est une classe fille de la classe plus
+ générique QIODevice, qui peut représenter différents types de
+ périphériques.
- Un objet QDataStream est utilisé pour sérialiser des données binaires
- dans le but de les passer à un QIODevice pour les récupérer dans le
- futur. Pour lire ou écrire dans un QIODevice, il suffit d'ouvrir le
- flux, avec le périphérique approprié en paramètre, et d'y lire ou
- écrire.
+ Un objet QDataStream est utilisé pour sérialiser des données binaires
+ dans le but de les passer à un QIODevice pour les récupérer dans le
+ futur. Pour lire ou écrire dans un QIODevice, il suffit d'ouvrir le
+ flux, avec le périphérique approprié en paramètre, et d'y lire ou
+ écrire.
- \section1 Définition de la classe AddressBook
+ \section1 Définition de la classe AddressBook
- On déclare deux slots publics, \c saveToFile() et \c loadFromFile(),
+ On déclare deux slots publics, \c saveToFile() et \c loadFromFile(),
ainsi que deux objets QPushButton, \c loadButton et \c saveButton.
\snippet tutorials/addressbook/part6/addressbook.h save and load functions declaration
\dots
\snippet tutorials/addressbook/part6/addressbook.h save and load buttons declaration
- \section1 Implémentation de la classe AddressBook
+ \section1 Implémentation de la classe AddressBook
Dans notre constructeur, on instancie \c loadButton et \c saveButton.
- Idéalement, l'interface serait plus conviviale avec des boutons
+ Idéalement, l'interface serait plus conviviale avec des boutons
affichant "Load contacts from a file" et "Save contacts to a file". Mais
compte tenu de la dimension des autres boutons, on initialise les labels
- des boutons à \gui{Load...} et \gui{Save...}. Heureusement, Qt offre une
- façon simple d'ajouter des info-bulles avec
- \l{QWidget::setToolTip()}{setToolTip()}, et nous l'exploitons de la façon
+ des boutons à \gui{Load...} et \gui{Save...}. Heureusement, Qt offre une
+ façon simple d'ajouter des info-bulles avec
+ \l{QWidget::setToolTip()}{setToolTip()}, et nous l'exploitons de la façon
suivante pour nos boutons:
\snippet tutorials/addressbook/part6/addressbook.cpp tooltip 1
@@ -895,85 +895,85 @@
\snippet tutorials/addressbook/part6/addressbook.cpp tooltip 2
Bien qu'on ne cite pas le code correspondant ici, nous ajoutons ces deux boutons au
- layout de droite, \c button1Layout, comme pour les fonctionnalités précédentes, et
+ layout de droite, \c button1Layout, comme pour les fonctionnalités précédentes, et
nous connectons leurs signaux
- \l{QPushButton::clicked()}{clicked()} à leurs slots respectifs.
+ \l{QPushButton::clicked()}{clicked()} à leurs slots respectifs.
- Pour la sauvegarde, on commence par récupérer le nom de fichier
+ Pour la sauvegarde, on commence par récupérer le nom de fichier
\c fileName, en utilisant QFileDialog::getSaveFileName(). C'est une
- méthode pratique fournie par QFileDialog, qui ouvre une boîte de
- dialogue modale et permet à l'utilisateur d'entrer un nom de fichier ou
+ méthode pratique fournie par QFileDialog, qui ouvre une boîte de
+ dialogue modale et permet à l'utilisateur d'entrer un nom de fichier ou
de choisir un fichier \c{.abk} existant. Les fichiers \c{.abk}
- correspondent à l'extension choisie pour la sauvegarde des contacts de
+ correspondent à l'extension choisie pour la sauvegarde des contacts de
notre carnet d'adresses.
\snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part1
- La boîte de dialogue affichée est visible sur la capture d'écran ci-
+ La boîte de dialogue affichée est visible sur la capture d'écran ci-
dessous.
\image addressbook-tutorial-part6-save.png
- Si \c fileName n'est pas vide, on crée un objet QFile, \c file, à partir
- de \c fileName. QFile fonctionne avec QDataStream puisqu'il dérive de
+ Si \c fileName n'est pas vide, on crée un objet QFile, \c file, à partir
+ de \c fileName. QFile fonctionne avec QDataStream puisqu'il dérive de
QIODevice.
- Ensuite, on essaie d'ouvrir le fichier en écriture, ce qui correspond au
- mode \l{QIODevice::}{WriteOnly}. Si cela échoue, on en informe
+ Ensuite, on essaie d'ouvrir le fichier en écriture, ce qui correspond au
+ mode \l{QIODevice::}{WriteOnly}. Si cela échoue, on en informe
l'utilisateur avec une QMessageBox.
\snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part2
Dans le cas contraire, on instancie un objet QDataStream, \c out, afin
- d'écrire dans le fichier ouvert. QDataStream nécessite que la même
- version de flux soit utilisée pour la lecture et l'écriture. On s'assure
- que c'est le cas en spécifiant explicitement d'utiliser la
+ d'écrire dans le fichier ouvert. QDataStream nécessite que la même
+ version de flux soit utilisée pour la lecture et l'écriture. On s'assure
+ que c'est le cas en spécifiant explicitement d'utiliser la
\l{QDataStream::Qt_4_5}{version introduite avec Qt 4.5} avant de
- sérialiser les données vers le fichier \c file.
+ sérialiser les données vers le fichier \c file.
\snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part3
- Pour le chargement, on récupère également \c fileName en utilisant
- QFileDialog::getOpenFileName(). Cette méthode est l'homologue de
- QFileDialog::getSaveFileName() et affiche également une boîte de
- dialogue modale permettant à l'utilisateur d'entrer un nom de fichier ou
+ Pour le chargement, on récupère également \c fileName en utilisant
+ QFileDialog::getOpenFileName(). Cette méthode est l'homologue de
+ QFileDialog::getSaveFileName() et affiche également une boîte de
+ dialogue modale permettant à l'utilisateur d'entrer un nom de fichier ou
de selectionner un fichier \c{.abk} existant, afin de le charger dans le
carnet d'adresses.
\snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part1
- Sous Windows, par exemple, cette méthode affiche une boîte de dialogue
- native pour la sélection de fichier, comme illustré sur la capture
- d'écran suivante:
+ Sous Windows, par exemple, cette méthode affiche une boîte de dialogue
+ native pour la sélection de fichier, comme illustré sur la capture
+ d'écran suivante:
\image addressbook-tutorial-part6-load.png
Si \c fileName n'est pas vide, on utilise une fois de plus un objet
QFile, \c file, et on tente de l'ouvrir en lecture, avec le mode
- \l{QIODevice::}{ReadOnly}. De même que précédemment dans notre
- implémentation de \c saveToFile(), si cette tentative s'avère
+ \l{QIODevice::}{ReadOnly}. De même que précédemment dans notre
+ implémentation de \c saveToFile(), si cette tentative s'avère
infructueuse, on en informe l'utilisateur par le biais d'une
QMessageBox.
\snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part2
Dans le cas contraire, on instancie un objet QDataStream, \c in, en
- spécifiant la version à utiliser comme précédemment, et on lit les
- informations sérialisées vers la structure de données \c contacts. Notez
+ spécifiant la version à utiliser comme précédemment, et on lit les
+ informations sérialisées vers la structure de données \c contacts. Notez
qu'on purge \c contacts avant d'y mettre les informations lues afin de
- simplifier le processus de lecture de fichier. Une façon plus avancée de
- procéder serait de lire les contacts dans un objet QMap temporaire, et
+ simplifier le processus de lecture de fichier. Une façon plus avancée de
+ procéder serait de lire les contacts dans un objet QMap temporaire, et
de copier uniquement les contacts n'existant pas encore dans
\c contacts.
\snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part3
Pour afficher les contacts lus depuis le fichier, on doit d'abord
- valider les données obtenues afin de s'assurer que le fichier lu
- contient effectivement des entrées de carnet d'adresses. Si c'est le
+ valider les données obtenues afin de s'assurer que le fichier lu
+ contient effectivement des entrées de carnet d'adresses. Si c'est le
cas, on affiche le premier contact; sinon on informe l'utilisateur du
- problème par une QMessageBox. Enfin, on met à jour l'interface afin
- d'activer et de désactiver les boutons de façon appropriée.
+ problème par une QMessageBox. Enfin, on met à jour l'interface afin
+ d'activer et de désactiver les boutons de façon appropriée.
*/
/*!
@@ -981,86 +981,86 @@
\previouspage {tutorials/addressbook-fr/part6}{Chapitre 6}
\contentspage {Tutoriel "Carnet d'adresses"}{Sommaire}
\example tutorials/addressbook-fr/part7
- \title Carnet d'adresse 7 - Fonctionnalités avancées
+ \title Carnet d'adresse 7 - Fonctionnalités avancées
- Ce chapitre couvre quelques fonctionnalités additionnelles qui
+ Ce chapitre couvre quelques fonctionnalités additionnelles qui
feront de notre carnet d'adresses une application plus pratique
pour une utilisation quotidienne.
\image addressbook-tutorial-part7-screenshot.png
Bien que notre application carnet d'adresses soit utile en tant que telle,
- il serait pratique de pouvoir échanger les contacts avec d'autres applications.
- Le format vCard est un un format de fichier populaire pour échanger
- ce type de données.
- Dans ce chapitre, nous étendrons notre carnet d'adresses pour permettre
+ il serait pratique de pouvoir échanger les contacts avec d'autres applications.
+ Le format vCard est un un format de fichier populaire pour échanger
+ ce type de données.
+ Dans ce chapitre, nous étendrons notre carnet d'adresses pour permettre
d'exporter des contacts dans des fichiers vCard \c{.vcf}.
- \section1 Définition de la classe AddressBook
+ \section1 Définition de la classe AddressBook
Nous ajoutons un objet QPushButton, \c exportButton, et un slot
- public correspondant, \c exportAsVCard(), à notre classe \c AddressBook
+ public correspondant, \c exportAsVCard(), à notre classe \c AddressBook
dans le fichier \c addressbook.h.
\snippet tutorials/addressbook/part7/addressbook.h exportAsVCard() declaration
\dots
\snippet tutorials/addressbook/part7/addressbook.h exportButton declaration
- \section1 Implémentation de la classe AddressBook
+ \section1 Implémentation de la classe AddressBook
Dans le constructeur de \c AddressBook, nous connectons le signal
\l{QPushButton::clicked()}{clicked()} de \c{exportButton} au slot
\c exportAsVCard().
- Nous ajoutons aussi ce bouton à \c buttonLayout1, le layout responsable
+ Nous ajoutons aussi ce bouton à \c buttonLayout1, le layout responsable
du groupe de boutons sur la droite.
- Dans la méthode \c exportAsVCard(), nous commençons par extraire le
- nom du contact dans \n name. Nous déclarons \c firstname, \c lastName et
+ Dans la méthode \c exportAsVCard(), nous commençons par extraire le
+ nom du contact dans \n name. Nous déclarons \c firstname, \c lastName et
\c nameList.
Ensuite, nous cherchons la position du premier espace blanc de \c name.
- Si il y a un espace, nous séparons le nom du contact en \c firstName et
- \c lastName. Finalement, nous remplaçons l'espace par un underscore ("_").
+ Si il y a un espace, nous séparons le nom du contact en \c firstName et
+ \c lastName. Finalement, nous remplaçons l'espace par un underscore ("_").
Si il n'y a pas d'espace, nous supposons que le contact ne comprend que
- le prénom.
+ le prénom.
\snippet tutorials/addressbook/part7/addressbook.cpp export function part1
- Comme pour la méthode \c saveToFile(), nous ouvrons une boîte de dialogue
- pour donner la possibilité à l'utilisateur de choisir un emplacement pour
- le fichier. Avec le nom de fichier choisi, nous créons une instance de QFile
- pour y écrire.
+ Comme pour la méthode \c saveToFile(), nous ouvrons une boîte de dialogue
+ pour donner la possibilité à l'utilisateur de choisir un emplacement pour
+ le fichier. Avec le nom de fichier choisi, nous créons une instance de QFile
+ pour y écrire.
Nous essayons d'ouvrir le fichier en mode \l{QIODevice::}{WriteOnly}. Si
- cela échoue, nous affichons un QMessageBox pour informer l'utilisateur
- à propos de l'origine du problème et nous quittons la méthode. Sinon, nous passons le
- fichier comme paramètre pour créer un objet QTextStream, \c out. De la même façon que
- QDataStream, la classe QTextStream fournit les fonctionnalités pour
- lire et écrire des fichiers de texte. Grâce à celà, le fichier \c{.vcf}
- généré pourra être ouvert et édité à l'aide d'un simple éditeur de texte.
+ cela échoue, nous affichons un QMessageBox pour informer l'utilisateur
+ à propos de l'origine du problème et nous quittons la méthode. Sinon, nous passons le
+ fichier comme paramètre pour créer un objet QTextStream, \c out. De la même façon que
+ QDataStream, la classe QTextStream fournit les fonctionnalités pour
+ lire et écrire des fichiers de texte. Grâce à celà, le fichier \c{.vcf}
+ généré pourra être ouvert et édité à l'aide d'un simple éditeur de texte.
\snippet tutorials/addressbook/part7/addressbook.cpp export function part2
- Nous écrivons ensuite un fichier vCard avec la balise \c{BEGIN:VCARD},
+ Nous écrivons ensuite un fichier vCard avec la balise \c{BEGIN:VCARD},
suivit par \c{VERSION:2.1}.
- Le nom d'un contact est écrit à l'aide de la balise \c{N:}. Pour la balise
- \c{FN:}, qui remplit le titre du contact, nous devons vérifier si le contact
- à un nom de famille défini ou non. Si oui, nous utilions les détails de
- \c nameList pour remplir le champ, dans le cas contraire on écrit uniquement le contenu
+ Le nom d'un contact est écrit à l'aide de la balise \c{N:}. Pour la balise
+ \c{FN:}, qui remplit le titre du contact, nous devons vérifier si le contact
+ à un nom de famille défini ou non. Si oui, nous utilions les détails de
+ \c nameList pour remplir le champ, dans le cas contraire on écrit uniquement le contenu
de \c firstName.
\snippet tutorials/addressbook/part7/addressbook.cpp export function part3
- Nous continuons en écrivant l'adresse du contact. Les points-virgules
- dans l'adresse sont échappés à l'aide de "\\", les retours de ligne sont
- remplacés par des points-virgules, et les vigules sont remplacées par des espaces.
- Finalement nous écrivons les balises \c{ADR;HOME:;} suivies par l'adresse
+ Nous continuons en écrivant l'adresse du contact. Les points-virgules
+ dans l'adresse sont échappés à l'aide de "\\", les retours de ligne sont
+ remplacés par des points-virgules, et les vigules sont remplacées par des espaces.
+ Finalement nous écrivons les balises \c{ADR;HOME:;} suivies par l'adresse
et la balise \c{END:VCARD}.
\snippet tutorials/addressbook/part7/addressbook.cpp export function part4
- À la fin de la méthode, un QMessageBox est affiché pour informer l'utilisateur
- que la vCard a été exportée avec succès.
+ À la fin de la méthode, un QMessageBox est affiché pour informer l'utilisateur
+ que la vCard a été exportée avec succès.
- \e{vCard est une marque déposée de \l{http://www.imc.org}
+ \e{vCard est une marque déposée de \l{http://www.imc.org}
{Internet Mail Consortium}}.
*/
diff --git a/doc/src/widgets-and-layouts/stylesheet.qdoc b/doc/src/widgets-and-layouts/stylesheet.qdoc
index 5f42f28765..4d550663fa 100644
--- a/doc/src/widgets-and-layouts/stylesheet.qdoc
+++ b/doc/src/widgets-and-layouts/stylesheet.qdoc
@@ -934,8 +934,8 @@
subcontrol.
For items with a sub menu, the arrow marks are styled using the
- \l{::right-arrow-sub}{right-arrow} and
- \l{::left-arrow-sub}{left-arrow}.
+ \l{right-arrow-sub}{right-arrow} and
+ \l{left-arrow-sub}{left-arrow}.
The scroller is styled using the \l{#scroller-sub}{::scroller}.
diff --git a/doc/src/xml-processing/xml-patterns.qdoc b/doc/src/xml-processing/xml-patterns.qdoc
index 1a9f76d7a8..68056fd08f 100644
--- a/doc/src/xml-processing/xml-patterns.qdoc
+++ b/doc/src/xml-processing/xml-patterns.qdoc
@@ -65,8 +65,7 @@
\l{http://www.w3.org/TR/xpath20} {XPath 2.0} in Qt applications,
for querying XML data \e{and} for querying
\l{QAbstractXmlNodeModel} {non-XML data that can be modeled to
- look like XML}. The QtXmlPatterns module is included in the \l{Qt
- Full Framework Edition}, and the \l{Open Source Versions of Qt}.
+ look like XML}.
Readers who are not familiar with the XQuery/XPath language can read
\l {A Short Path to XQuery} for a brief introduction.
@@ -83,7 +82,7 @@
First, the query opens a \c{<bibliography>} element in the
output. The
- \l{xquery-introduction.html#using-path-expressions-to-match-select-items}
+ \l{xquery-introduction.html#using-path-expressions-to-match-and-select-items}
{embedded path expression} then loads the XML document describing
the contents of the library (\c{library.xml}) and begins the
search. For each \c{<book>} element it finds, where the publisher
diff --git a/doc/src/xml-processing/xquery-introduction.qdoc b/doc/src/xml-processing/xquery-introduction.qdoc
index 84e21abb79..930642043c 100644
--- a/doc/src/xml-processing/xquery-introduction.qdoc
+++ b/doc/src/xml-processing/xquery-introduction.qdoc
@@ -75,7 +75,7 @@ It creates a new \c{<html>} element in the output and sets its \c{id}
attribute to be the \c{id} attribute from an \c{<html>} element in the
\c{other.html} file.
-\section1 Using Path Expressions To Match & Select Items
+\section1 Using Path Expressions To Match And Select Items
In C++ and Java, we write nested \c{for} loops and recursive functions
to traverse XML trees in search of elements of interest. In XQuery, we
diff --git a/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc b/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc
new file mode 100644
index 0000000000..1c2f56b5a0
--- /dev/null
+++ b/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page how-to-learn-qt.html
+ \title 如何学习 Qt
+ \brief Links to guides and resources for learning Qt.
+ \nextpage 教程
+
+ \section1 Getting Started
+
+ 我们å‡å®šæ‚¨å·²äº†è§£ C++, 并将用于 Qt å¼€å‘。有关将 Qt 与其他编程语言一起使用的更多信æ¯ï¼Œè¯·å‚è§ \l{Qt website}{Qt 网站}。
+
+ 如果你想仅使用 C++ 编程, ä¸ä½¿ç”¨ä»»ä½•è®¾è®¡å·¥å…·è€Œä»…使用代ç è®¾è®¡ç”¨æˆ·ç•Œé¢ï¼Œè¯·è§‚看\l{教程}。这些教程是为您了解 Qt 编程é‡èº«å®šåšçš„,并侧é‡äºŽç¼–写å¯ç”¨ä»£ç ï¼Œè€Œå¹¶éžåŠŸèƒ½ç®€ä»‹ã€‚
+
+ 如果您想使用设计工具æ¥è®¾è®¡ç”¨æˆ·ç•Œé¢ï¼Œåˆ™è‡³å°‘è¦é˜…读 \l{Qt Designer manual}{Qt 设计者手册}çš„å‰å‡ ç« ã€‚
+
+ 现在您已ç»ç¼–写了一些å°åž‹å¯ç”¨çš„应用程åºï¼Œå¹¶å¯¹ Qt 编程有更加广泛的了解。您å¯ä»¥ç›´æŽ¥ç€æ‰‹åšè‡ªå·±çš„项目,但我们建议您阅读以下一些关键简介以加深您对 Qt 的了解:\l{Qt Object Model}Qt 对象模型}å’Œ\l{Signals and Slots}{ä¿¡å·å’Œæ§½}。
+
+ \beginfloatleft
+ \inlineimage qtdemo-small.png
+ \endfloat
+
+ \section1 了解概况
+
+ 在这个阶段,我们建议您æµè§ˆä¸€ä¸‹\l{All Overviews and HOWTOs}{简介},然åŽé˜…读与您项目相关的章节。您å¯èƒ½è¿˜ä¼šå‘现,æµè§ˆä¸Žæ‚¨é¡¹ç›®ç±»ä¼¼çš„\l{Qt Examples}{示例}çš„æºä»£ç ä¹Ÿä¼šå¯¹æ‚¨æœ‰æ‰€å¸®åŠ©ã€‚由于 Qt æºä»£ç å·²é¢å‘公众开放,您也å¯é˜…读 Qt æºä»£ç ã€‚
+
+ 如果您è¿è¡Œ\l{Examples and Demos Launcher}{示例和演示å¯åŠ¨ç¨‹åº},您就会看到许多正在使用的 Qt widget。
+
+ \l{Qt Widget Gallery} 还按照在ä¸åŒæ”¯æŒå¹³å°ä¸Šçš„使用风格æ供了精选 Qt widget 简介。
+ \clearfloat
+
+ \section1 Books and Learning Materials
+
+ Qt 附带大é‡æ–‡æ¡£ï¼Œå¹¶å…¨æ–‡å¸¦æœ‰è¶…文本交å‰å¼•ç”¨ï¼Œå¯è½»æ¾åœ°ç‚¹å‡»äº†è§£è‡ªå·±æƒ³çŸ¥é“的内容。您使用最多的文档å¯èƒ½æ˜¯ \l{index.html}{API 引用}。æ¯ä¸ªé“¾æŽ¥éƒ½æ供了æµè§ˆ API 引用的ä¸åŒæ–¹å¼ï¼Œæ‚¨å¯æ¯ä¸ªéƒ½å°è¯•ä¸€ä¸‹ï¼Œçœ‹å“ªä¸ªæ›´é€‚åˆè‡ªå·±ã€‚您还å¯ä»¥å°è¯• \l{Qt Assistant}ï¼Œè¿™æ˜¯éš Qt 附带的工具,å¯è®¿é—®å…¨éƒ¨ Qt API,并æ供全文本æœç´¢åŠŸèƒ½ã€‚
+
+ 有大é‡çš„书ç±æ˜¯å…³äºŽ Qt 编程的。有关 Qt 书ç±çš„完整列表。
+ We recommend the official Qt book,
+ \l{http://www.amazon.com/gp/product/0132354160/ref=ase_trolltech/}{C++
+ GUI Programming with Qt 4, Second Edition} (ISBN 0-13-235416-0).
+ 本书从 "Hello Qt" 到高级功能(如多线程ã€2D å’Œ 3D 图形ã€ç½‘络ã€å†…容视图类与 XML),全é¢è¯¦å®žåœ°è¯´æ˜Žäº† Qt 编程。(第一版基于 Qt 4.1,å¯\l{http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip}{在线}获得。)
+
+ 包括ä¸åŒè¯­è¨€çš„翻译版本,请å‚è§\l{Books about Qt Programming}{有关 Qt 编程的书ç±}。
+
+ å¦ä¸€ä¸ªæœ‰å…³å®žä¾‹ä»£ç å’Œ Qt 功能说明的有用资æºå°±æ˜¯å­˜æ¡£çš„ \l{Qt Quarterly}{Qt 季讯}文章,季讯是为 Qt 用户æ供的新闻时讯。
+
+ 有关特定 Qt 模å—和其他指å—的文档,请å‚è§\l{All Overviews and HOWTOs}。
+
+ \section1 Further Reading
+
+ Qt has an active and helpful user community who communicate using
+ the \l{Qt Mailing Lists}{qt-interest} mailing list, the \l{Qt Centre}
+ Web site, and a number of other community Web sites and Weblogs.
+ In addition, many Qt developers are active members of the
+ \l{KDE}{KDE community}.
+
+ ç¥æ‚¨å¥½è¿å¹¶ä¸”学习愉快ï¼
+*/
diff --git a/doc/src/zh_CN/getting-started/tutorials.qdoc b/doc/src/zh_CN/getting-started/tutorials.qdoc
new file mode 100644
index 0000000000..dc371d8eab
--- /dev/null
+++ b/doc/src/zh_CN/getting-started/tutorials.qdoc
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page tutorials.html
+ \title 教程
+
+ \contentspage 如何学习 Qt
+
+ \brief Tutorials, guides and overviews to help you learn Qt.
+
+ A collection of tutorials and "walkthrough" guides are provided with Qt to
+ help new users get started with Qt development. These documents cover a
+ range of topics, from basic use of widgets to step-by-step tutorials that
+ show how an application is put together.
+
+ \table
+ \row
+ \o{2,1} \l{Widgets 教程}{\bold Widgets}
+ \o{2,1} \l{地å€ç°¿æ•™ç¨‹}{\bold {地å€ç°¿}}
+ \row
+ \o \image widget-examples.png Widgets
+ \o
+ A beginner's guide to getting started with widgets and layouts to create
+ GUI applications.
+
+ \o \image addressbook-tutorial.png 地å€ç°¿
+ \o
+ A seven part guide to creating a fully-functioning address book
+ application. This tutorial is also available with
+ \l{Tutoriel "Carnet d'adresses"}{French explanation}.
+
+ \row
+ \o{2,1} \l{A Quick Start to Qt Designer}{\bold{Qt Designer}}
+ \o{2,1} \l{Qt Linguist Manual: Programmers#Tutorials}{\bold {Qt Linguist}}
+ \row
+ \o \image designer-examples.png QtDesigner
+ \o
+ A quick guide through \QD showing the basic steps to create a
+ form with this interactive tool.
+
+ \o \image linguist-examples.png QtLinguist
+ \o
+ A guided tour through the translations process, explaining the
+ tools provided for developers, translators and release managers.
+
+ \row
+ \o{2,1} \l{QTestLib Tutorial}{\bold QTestLib}
+ \o{2,1} \l{qmake Tutorial}{\bold qmake}
+ \row
+ \o{2,1}
+ This tutorial gives a short introduction to how to use some of the
+ features of Qt's unit-testing framework, QTestLib. It is divided into
+ four chapters.
+
+ \o{2,1}
+ This tutorial teaches you how to use \c qmake. We recommend that
+ you read the \l{qmake Manual}{qmake user guide} after completing
+ this tutorial.
+
+ \endtable
+*/
diff --git a/doc/src/zh_CN/tutorials/addressbook.qdoc b/doc/src/zh_CN/tutorials/addressbook.qdoc
new file mode 100644
index 0000000000..72349af6ec
--- /dev/null
+++ b/doc/src/zh_CN/tutorials/addressbook.qdoc
@@ -0,0 +1,673 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page tutorials-addressbook.html
+
+ \startpage {index.html}{Qt Reference Documentation}
+ \contentspage 教程
+ \nextpage {tutorials/addressbook/part1}{第一章}
+
+ \title 地å€ç°¿æ•™ç¨‹
+ \brief 本教程介ç»äº†ä½¿ç”¨ Qt 跨平å°æ¡†æž¶çš„ GUI 编程。
+
+ 本教程介ç»äº†ä½¿ç”¨ Qt 跨平å°æ¡†æž¶çš„ GUI 编程。
+
+ \image addressbook-tutorial-screenshot.png
+
+ \omit
+ It doesn't cover everything; the emphasis is on teaching the programming
+ philosophy of GUI programming, and Qt's features are introduced as needed.
+ Some commonly used features are never used in this tutorial.
+ \endomit
+
+ 在学习过程中,我们将了解部分 Qt 基本技术,如
+
+ \list
+ \o Widget 和布局管ç†å™¨
+ \o 容器类
+ \o ä¿¡å·å’Œæ§½
+ \o 输入和输出设备
+ \endlist
+
+ 如果您完全ä¸äº†è§£ Qt,请阅读\l{How to Learn Qt}{如何学习 Qt}(如果您还未阅读)。
+
+ 教程的æºä»£ç ä½äºŽ Qt çš„ \c examples/tutorials/addressbook 目录下。
+
+ 教程章节:
+
+ \list 1
+ \o \l{tutorials/addressbook/part1}{设计用户界é¢}
+ \o \l{tutorials/addressbook/part2}{添加地å€}
+ \o \l{tutorials/addressbook/part3}{æµè§ˆåœ°å€ç°¿æ¡ç›®}
+ \o \l{tutorials/addressbook/part4}{编辑和删除地å€}
+ \o \l{tutorials/addressbook/part5}{添加查找功能}
+ \o \l{tutorials/addressbook/part6}{加载和ä¿å­˜}
+ \o \l{tutorials/addressbook/part7}{附加功能}
+ \endlist
+
+ 虽然这个å°åž‹åº”用程åºçœ‹èµ·æ¥å¹¶ä¸è±¡ä¸€ä¸ªæˆç†Ÿçš„现代 GUI 应用程åºï¼Œä½†å®ƒä½¿ç”¨å¤šç§ç”¨äºŽæ›´å¤æ‚应用程åºçš„基本技术。在您完æˆå­¦ä¹ ä¹‹åŽï¼Œæˆ‘们建议您查看一下\l{mainwindows/application}{应用程åº}示例,它æ供带有èœå•ã€å·¥å…·æ ã€çŠ¶æ€æ ç­‰é¡¹ç›®çš„å°åž‹ GUI 应用程åºã€‚
+*/
+
+/*!
+ \page tutorials-addressbook-part1.html
+ \contentspage {地å€ç°¿æ•™ç¨‹}{目录}
+ \nextpage {tutorials/addressbook/part2}{第二章}
+ \example tutorials/addressbook/part1
+ \title 地å€ç°¿ 1 — 设计用户界é¢
+
+ 本教程的第一部分讲述了用于地å€ç°¿åº”用程åºçš„åŸºæœ¬å›¾å½¢ç”¨æˆ·ç•Œé¢ (GUI) 的设计。
+
+ 创建 GUI 程åºçš„第一步就是设计用户界é¢ã€‚在本章中,我们的目标是设置应用基本地å€ç°¿åº”用程åºæ‰€éœ€çš„标签和输入字段。下图为期望输出的å±å¹•æˆªå›¾ã€‚
+
+ \image addressbook-tutorial-part1-screenshot.png
+
+ 我们需è¦ä½¿ç”¨ä¸¤ä¸ª QLabel 对象:\c nameLabel å’Œ \c addressLabel,以åŠä¸¤ä¸ªè¾“入字段:QLineEdit 对象 \c nameLine å’Œ QTextEdit
+ 对象 \c addressText,这样用户æ‰èƒ½è¾“å…¥è”系人的姓å和地å€ã€‚使用的 widget åŠå…¶ä½ç½®å¦‚下图所示。
+
+ \image addressbook-tutorial-part1-labeled-screenshot.png
+
+ è¦åº”用地å€ç°¿éœ€ä½¿ç”¨ä¸‰ä¸ªæ–‡ä»¶ï¼š
+
+ \list
+ \o \c{addressbook.h} — AddressBook 类的定义文件,
+ \o \c{addressbook.cpp} — AddressBook 类的执行文件,以åŠ
+ \o \c{main.cpp} — åŒ…å« \c main() 函数并带有 AddressBook 实例的文件。
+ \endlist
+
+ \section1 Qt 编程 — 使用å­ç±»
+
+ 在编写 Qt 程åºæ—¶ï¼Œæˆ‘们通常使用 Qt 对象å­ç±»æ¥æ·»åŠ åŠŸèƒ½ã€‚这是创建定制 widget 或标准 widget 集åˆçš„基本概念之一。使用å­ç±»æ‰©å±•æˆ–æ”¹å˜ widget çš„æ“作具有以下优势:
+
+ \list
+ \o 我们å¯ä»¥ç¼–写虚函数或纯虚函数应用,以得到我们确切所需的功能,并在需è¦æ—¶å†ä½¿ç”¨åŸºæœ¬çš„类应用。
+ \o 这样我们就å¯ä»¥åœ¨ç±»ä¸­å°è£…部分用户界é¢ï¼Œåº”用程åºçš„其他部分也就无需了解用户界é¢ä¸­å•ç‹¬ä½¿ç”¨çš„ widget。
+ \o å¯ä½¿ç”¨å­ç±»åœ¨åŒä¸€åº”用程åºæˆ–库中创建多个定制 widget,这样å­ç±»çš„代ç å¯åœ¨å…¶ä»–项目é‡å¤ä½¿ç”¨ã€‚
+ \endlist
+
+ 由于 Qt 未æ供特定的地å€ç°¿ widget,我们在标准的 Qt widget 类中使用å­ç±»ï¼Œç„¶åŽæ·»åŠ åŠŸèƒ½ã€‚我们在本教程中创建的 \c AddressBook 类在需è¦ä½¿ç”¨åŸºæœ¬åœ°å€ç°¿ widget 的情况下å¯é‡å¤ä½¿ç”¨ã€‚
+
+ \section1 定义 AddressBook 类
+
+ \l{tutorials/addressbook/part1/addressbook.h}{\c addressbook.h} 文件用于定义 \c AddressBook 类。
+
+ 我们从定义 \c AddressBook 为 QWidget å­ç±»å’Œå£°æ˜Žæž„造器开始入手。我们还使用 Q_OBJECT å®è¡¨æ˜Žè¯¥ç±»ä½¿ç”¨å›½é™…化功能与 Qt ä¿¡å·å’Œæ§½åŠŸèƒ½ï¼Œå³ä½¿åœ¨æœ¬é˜¶æ®µä¸ä¼šç”¨åˆ°æ‰€æœ‰è¿™äº›åŠŸèƒ½ã€‚
+
+ \snippet tutorials/addressbook/part1/addressbook.h class definition
+
+ 该类包å«äº† \c nameLine å’Œ \c addressText 的声明ã€ä¸Šæ–‡æ到的 QLineEdit å’Œ QTextEdit çš„ç§æœ‰å®žä¾‹ã€‚在以åŽç« èŠ‚中,您会看到储存在 \c nameLine å’Œ \c addressText 中的数æ®åœ¨åœ°å€ç°¿çš„许多功能中都会用到。
+
+ 我们ä¸å¿…包å«è¦ä½¿ç”¨çš„ QLabel 对象的声明,这是因为在创建这些对象åŽæˆ‘们ä¸å¿…对其进行引用。在下一部分中,我们会说明 Qt 记录对象所属关系的方å¼ã€‚
+
+ Q_OBJECT å®æœ¬èº«åº”用了部分更高级的 Qt 功能。 我们暂时把 Q_OBJECT å®ç†è§£ä¸ºä½¿ç”¨ \l{QObject::}{tr()} å’Œ \l{QObject::}{connect()} 函数的快æ·æ–¹å¼ï¼Œè¿™ç§ç†è§£å¯¹æˆ‘们的学习更有用。
+
+ æˆ‘ä»¬çŽ°å·²å®Œæˆ \c addressbook.h 文件,接下æ¥æˆ‘们æ¥æ‰§è¡Œå¯¹åº”çš„ \c addressbook.cpp 文件。
+
+ \section1 应用 AddressBook 类
+
+ \c AddressBook 的构造器接收 QWidget å‚æ•° \a parent。按惯例,我们将å‚数传递给基本类的构造器。这ç§çˆ¶é¡¹å¯æœ‰ä¸€ä¸ªæˆ–多个å­é¡¹çš„所属概念对 Qt 中的 widget 分组å分有用。例如,如果删除父项,也会删除其所有å­é¡¹ã€‚
+
+ \snippet tutorials/addressbook/part1/addressbook.cpp constructor and input fields
+
+ 在该构造器中,我们声明并通过实例æ¥è¡¨ç¤ºä¸¤ä¸ªå±€éƒ¨ QLabel 对象 \c nameLabel å’Œ \c addressLabelï¼Œä»¥åŠ \c nameLine å’Œ \c addressText。如果字符串已进行转æ¢ï¼Œåˆ™ \l{QObject::tr()}{tr()} 函数返回已转æ¢çš„字符串,å¦åˆ™è¿”回字符串本身。我们å¯ä»¥å°†æ­¤å‡½æ•°ç†è§£ \c{<insert translation here>} 标识æ¥æ ‡è®°è¦è¿›è¡Œè½¬æ¢ QString 对象。在以åŽç« èŠ‚å’Œ \l{Qt Examples} 中,您会看到åªè¦ä½¿ç”¨äº†å¯è½¬æ¢çš„字符串就是使用该函数。
+
+ 使用 Qt 编程时,了解布局是如何起作用的会对您很有帮助。Qt æ供三个主è¦å¸ƒå±€ç±» QHBoxLayoutã€QVBoxLayout å’Œ QGridLayout æ¥å¤„ç† widget çš„ä½ç½®ã€‚
+
+ \image addressbook-tutorial-part1-labeled-layout.png
+
+ 我们使用 QGridLayout 以结构化的方å¼æ”¾ç½®æ ‡ç­¾å’Œè¾“入字段。QGridLayout å°†å¯ç”¨ç©ºé—´åˆ†ä¸ºç½‘格,并将 widget 放置在指定了行列å·çš„å•å…ƒæ ¼ä¸­ã€‚上é¢çš„图表显示了布局å•å…ƒæ ¼å’Œ widget çš„ä½ç½®ã€‚我们通过以下代ç æŒ‡å®šè¿™ç§æŽ’列方å¼ï¼š
+
+ \snippet tutorials/addressbook/part1/addressbook.cpp layout
+
+ 请注æ„,\c addressLabel 是使用作为附加å‚æ•°çš„ Qt::AlignTop æ¥æŽ’放ä½ç½®ã€‚è¿™å¯ç¡®ä¿å…¶ä¸ä¼šçºµå‘放置在å•å…ƒæ ¼ (1,0) 中央。有关 Qt 布局的基本简介,请å‚è§\l{Layout Management}{布局类}文档。
+
+ è¦åœ¨ widget 上安装布局对象,必须调用 widget çš„ \l{QWidget::setLayout()}{setLayout()} 函数:
+
+ \snippet tutorials/addressbook/part1/addressbook.cpp setting the layout
+
+ 最åŽï¼Œæˆ‘们将 widget 标题设置为“简å•åœ°å€ç°¿â€ã€‚
+
+ \section1 è¿è¡Œåº”用程åº
+
+ \c main() 函数使用å•ç‹¬çš„文件 \c main.cpp。在该函数中,我们实例化了 QApplication 对象 \c app。QApplication 负责管ç†å¤šç§åº”用范围的资æºï¼ˆå¦‚默认字体和光标),以åŠè¿è¡Œäº‹ä»¶å¾ªçŽ¯ã€‚因此,在æ¯ä¸ªä½¿ç”¨ Qt çš„ GUI 应用程åºä¸­éƒ½ä¼šæœ‰ä¸€ä¸ª QApplication 对象。
+
+ \snippet tutorials/addressbook/part1/main.cpp main function
+
+ 我们使用 new 关键字在堆中构造一个新的 \c AddressBook widget,然åŽè°ƒç”¨ \l{QWidget::show()}{show()} 函数对其进行显示。ä¸è¿‡ï¼Œè¯¥ widget åªæœ‰åœ¨åº”用程åºäº‹ä»¶å¾ªçŽ¯å¼€å§‹æ—¶æ‰ä¼šæ˜¾ç¤ºã€‚我们通过调用应用程åºçš„ \l{QApplication::}{exec()} 函数开始事件循环。该函数返回的结果作为 \c main() 函数的返回值。
+*/
+
+/*!
+ \page tutorials-addressbook-part2.html
+ \previouspage 地å€ç°¿ 1 — 设计用户界é¢
+ \contentspage {地å€ç°¿æ•™ç¨‹}{目录}
+ \nextpage {tutorials/addressbook/part3}{第三章}
+ \example tutorials/addressbook/part2
+ \title 地å€ç°¿ 2 — 添加地å€
+
+ 创建基本地å€ç°¿åº”用程åºçš„下一步是添加少许用户互动æ“作。
+
+ \image addressbook-tutorial-part2-add-contact.png
+
+ 我们将æ供一个按钮,用户å¯ç‚¹å‡»è¯¥æŒ‰é’®æ¥æ·»åŠ æ–°è”系人。此外,还需è¦å¯¹æ•°æ®ç»“构进行é™å®šï¼Œä»¥ä¾¿æœ‰åºåœ°å‚¨å­˜è¿™äº›è”系人。
+
+ \section1 定义 AddressBook 类
+
+ 由于已ç»è®¾ç½®äº†æ ‡ç­¾å’Œè¾“入字段,我们åªéœ€æ·»åŠ æŒ‰é’®å°±å¯å®Œæˆæ·»åŠ è”系人这一步骤。也就是说,在 \c addressbook.h 文件中已ç»å£°æ˜Žäº†ä¸‰ä¸ª QPushButton 对象和三个对应的公共槽。
+
+ \snippet tutorials/addressbook/part2/addressbook.h slots
+
+ 槽是对特殊信å·è¿›è¡Œå“应的函数。我们将在应用 \c AddressBook 类时进一步详细说明这一概念。如需有关 Qt ä¿¡å·å’Œæ§½æ¦‚念的简介,请å‚è§\l{Signals and Slots}{ä¿¡å·å’Œæ§½}文档。
+
+ 三个 QPushButton 对象分别是 \c addButtonã€\c submitButton å’Œ \c cancelButton,已与è¦åœ¨ä¸Šä¸€ç« ä¸­è¯´æ˜Žçš„ \c nameLine å’Œ \c addressText 一åŒåŒ…å«åœ¨ç§æœ‰å˜é‡å£°æ˜Žä¸­ã€‚
+
+ \snippet tutorials/addressbook/part2/addressbook.h pushbutton declaration
+
+ 我们需è¦ä¸€ä¸ªå®¹å™¨æ¥å‚¨å­˜åœ°å€ç°¿è”系人,这样æ‰èƒ½æœç´¢å’Œæ˜¾ç¤ºè”系人。QMap 对象 \c contacts å°±å¯å®žçŽ°æ­¤åŠŸèƒ½ï¼Œå› ä¸ºå…¶å¸¦æœ‰ä¸€ä¸ªé”®-值对:è”系人姓å作为键,而è”系人地å€ä½œä¸º\e{值}。
+
+ \snippet tutorials/addressbook/part2/addressbook.h remaining private variables
+
+ 我们还会声明两个ç§æœ‰ QString 对象:\c oldName å’Œ \c oldAddress。这些对象用æ¥ä¿ç•™åœ¨ç”¨æˆ·ç‚¹å‡»\gui{添加}时最åŽæ˜¾ç¤ºçš„è”系人姓å和地å€ã€‚这样,当用户点击\gui{å–消}时,我们就å¯ä»¥è¿”回至上一个è”系人的详细信æ¯ã€‚
+
+ \section1 应用 AddressBook 类
+
+ 在 \c AddressBook 构造器中,我们将 \c nameLine å’Œ \c addressText 设置为åªè¯»ï¼Œè¿™æ ·å°±å¯ä»…显示而ä¸å¿…编辑现有è”系人的详细信æ¯ã€‚
+
+ \dots
+ \snippet tutorials/addressbook/part2/addressbook.cpp setting readonly 1
+ \dots
+ \snippet tutorials/addressbook/part2/addressbook.cpp setting readonly 2
+
+ 然åŽï¼Œæˆ‘们实例化以下按钮:\c addButtonã€\c submitButton å’Œ \c cancelButton。
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp pushbutton declaration
+
+ 显示 \c addButton 是通过调用 \l{QPushButton::show()}{show()} 函数实现的,而éšè— \c submitButton å’Œ \c cancelButton 则需调用 \l{QPushButton::hide()}{hide()}。这两个按钮仅当用户点击\gui{添加}æ—¶æ‰ä¼šæ˜¾ç¤ºï¼Œè€Œæ­¤æ“作是通过在下文中说明的\c addContact() 函数处ç†çš„。
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp connecting signals and slots
+
+ 我们将按钮的 \l{QPushButton::clicked()}{clicked()} ä¿¡å·ä¸Žå…¶ç›¸åº”的槽关è”。下é¢çš„图表说明了此过程。
+
+ \image addressbook-tutorial-part2-signals-and-slots.png
+
+ 接下æ¥ï¼Œæˆ‘们将按钮整é½çš„排列在地å€ç°¿ widget çš„å³ä¾§ï¼Œä½¿ç”¨ QVBoxLayout 将其进行纵å‘排列。
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp vertical layout
+
+ \l{QBoxLayout::addStretch()}{addStretch()} 函数用æ¥ç¡®ä¿æŒ‰é’®å¹¶ä¸æ˜¯é‡‡ç”¨å‡åŒ€é—´éš”排列的,而是更é è¿‘ widget 的顶部。下图显示了是å¦ä½¿ç”¨ \l{QBoxLayout::addStretch()}{addStretch()} 的差别。
+
+ \image addressbook-tutorial-part2-stretch-effects.png
+
+ 然åŽï¼Œæˆ‘们使用 \l{QGridLayout::addLayout()}{addLayout()} å°† \c buttonLayout1 增加至 \c mainLayout。 这样我们就有了嵌套布局,因为 \c buttonLayout1 现在是 \c mainLayout çš„å­é¡¹ã€‚
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp grid layout
+
+ 布局å标显示如下:
+
+ \image addressbook-tutorial-part2-labeled-layout.png
+
+ 在 \c addContact() 函数中,我们使用 \c oldName å’Œ \c oldAddress 储存最åŽæ˜¾ç¤ºçš„è”系人详细信æ¯ã€‚然åŽï¼Œæˆ‘们清空这些输入字段并关闭åªè¯»æ¨¡å¼ã€‚输入焦点设置在 \c nameLine,显示 \c submitButton å’Œ \c cancelButton。
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp addContact
+
+ \c submitContact() 函数å¯åˆ†ä¸ºä¸‰ä¸ªéƒ¨åˆ†ï¼š
+
+ \list 1
+ \o 我们从 \c nameLine å’Œ \c addressText æå–è”系人的详细信æ¯ï¼Œç„¶åŽå°†å…¶å‚¨å­˜åœ¨ QString 对象中。我们还è¦éªŒè¯ç¡®ä¿ç”¨æˆ·æ²¡æœ‰åœ¨è¾“入字段为空时点击\gui{æ交},å¦åˆ™ï¼Œä¼šæ˜¾ç¤º QMessageBox æ示用户输入姓å和地å€ã€‚
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp submitContact part1
+
+ \o 我们接ç€ç»§ç»­æ£€æŸ¥æ˜¯å¦è”系人已存在。如果ä¸å­˜åœ¨ï¼Œå°†è”系人添加至 \c contacts,然åŽæ˜¾ç¤º QMessageBox æ示用户已添加è”系人。
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp submitContact part2
+
+ 如果è”系人已存在,还是会显示 QMessageBox 以æ示用户,以å…添加é‡å¤çš„è”系人。由于 \c contacts 对象是基于姓å地å€çš„é”®-值对,因此è¦ç¡®ä¿é”®å”¯ä¸€ã€‚
+
+ \o 在处ç†äº†ä¸Šè¿°ä¸¤ç§æƒ…况åŽï¼Œä½¿ç”¨ä»¥ä¸‹ä»£ç å°†æŒ‰é’®æ¢å¤ä¸ºæ­£å¸¸çŠ¶æ€ï¼š
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp submitContact part3
+
+ \endlist
+
+ 下é¢çš„å±å¹•æˆªå›¾æ˜¾ç¤ºäº†ç”¨äºŽå‘用户显示æ示信æ¯çš„ QMessageBox 对象。
+
+ \image addressbook-tutorial-part2-add-successful.png
+
+ \c cancel() 函数æ¢å¤ä¸Šæ¬¡æ˜¾ç¤ºçš„è”系人详细信æ¯ï¼Œå¹¶å¯ç”¨ \c addButton,还会éšè— \c submitButton å’Œ
+ \c cancelButton。
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp cancel
+
+ 添加è”系人的总体æ€æƒ³å°±æ˜¯æ高用户æ“作的çµæ´»æ€§ï¼Œå¯åœ¨ä»»ä½•æ—¶å€™ç‚¹å‡»\gui{æ交}或\gui{å–消}。下é¢çš„æµç¨‹å›¾è¯¦ç»†è¯´æ˜Žäº†æ­¤æ¦‚念:
+
+ \image addressbook-tutorial-part2-add-flowchart.png
+*/
+
+/*!
+ \page tutorials-addressbook-part3.html
+ \previouspage 地å€ç°¿ 2 — 添加地å€
+ \contentspage {地å€ç°¿æ•™ç¨‹}{目录}
+ \nextpage {tutorials/addressbook/part4}{第四章}
+ \example tutorials/addressbook/part3
+ \title 地å€ç°¿ 3 — æµè§ˆåœ°å€ç°¿æ¡ç›®
+
+ 构建地å€ç°¿åº”用程åºçŽ°å·²è¿›å±•è¿‡åŠã€‚我们需è¦å¢žåŠ ä¸€äº›å‡½æ•°ï¼Œä»¥ä¾¿æµè§ˆè”系人。但首先è¦å†³å®šé‡‡ç”¨ä½•ç§æ•°æ®ç»“æž„æ–¹å¼æ¥å‚¨å­˜è¿™äº›è”系人。
+
+ 在第二章中,我们使用了 QMap é”®-值对,å³è”系人姓å作为\e{é”®},而è”系人地å€ä½œä¸º\e{值}。这ç§æ–¹å¼å¾ˆé€‚åˆæˆ‘们的实例。ä¸è¿‡ï¼Œè¦æµè§ˆå’Œæ˜¾ç¤ºæ¯ä¸ªæ¡ç›®ï¼Œè¿˜éœ€è¦è¿›è¡Œä¸€äº›æ”¹è¿›ã€‚
+
+ 我们改进 QMap çš„æ–¹å¼æ˜¯ï¼Œå°†æ•°æ®ç»“构替æ¢ä¸ºç±»ä¼¼å¾ªçŽ¯é“¾æŽ¥çš„列表,其中所有元素都是相互关è”的,包括第一个元素和最åŽä¸€ä¸ªå…ƒç´ ã€‚下图图解说明了该数æ®ç»“构。
+
+ \image addressbook-tutorial-part3-linkedlist.png
+
+ \section1 定义 AddressBook 类
+
+ è¦ç»™åœ°å€ç°¿åº”用程åºå¢žåŠ æµè§ˆåŠŸèƒ½ï¼Œæˆ‘们需è¦ä¸º \c AddressBook ç±»å†å¢žåŠ ä¸¤ä¸ªå‡½æ•°ï¼š\c next() å’Œ \c previous()。将这两个函数添加到 \c addressbook.h 文件中:
+
+ \snippet tutorials/addressbook/part3/addressbook.h navigation functions
+
+ 我们还需è¦ä½¿ç”¨å…¶ä»–两个 QPushButton 对象,因此将 \c nextButton å’Œ \c previousButton 声明为ç§æœ‰å˜é‡ï¼š
+
+ \snippet tutorials/addressbook/part3/addressbook.h navigation pushbuttons
+
+ \section1 应用 AddressBook 类
+
+ 在 \c AddressBook çš„ \c addressbook.cpp 构造器中,我们实例化 \c nextButton å’Œ \c previousButton,并且这两项默认为ç¦ç”¨ã€‚这是因为仅当地å€ç°¿ä¸­æœ‰å¤šä¸ªè”系人时æ‰ä¼šå¯ç”¨æµè§ˆåŠŸèƒ½ã€‚
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp navigation pushbuttons
+
+ 然åŽï¼Œæˆ‘们将这两个按钮与其相应的槽关è”:
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp connecting navigation signals
+
+ 下图å³ä¸ºé¢„期的图形用户界é¢ã€‚请注æ„,该用户界é¢å·²å¾ˆæŽ¥è¿‘应用程åºæœ€ç»ˆçš„æ ·å­ã€‚
+
+ \image addressbook-tutorial-part3-screenshot.png
+
+ 我们按照 \c next() å’Œ \c previous() 函数的基本规范,将 \c nextButton 放置在å³ä¾§ï¼Œè€Œ \c previousButton 放置在左侧。为了使布局更加直观,我们使用 QHBoxLayout å°† widget 并排放置:
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp navigation layout
+
+ 然åŽï¼Œå°† QHBoxLayout 对象 \c buttonLayout2 增加至 \c mainLayout。
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp adding navigation layout
+
+ 下图显示了 widget 在 \c mainLayout 中的åæ ‡ä½ç½®ã€‚
+
+ \image addressbook-tutorial-part3-labeled-layout.png
+
+ 在 \c addContact() 函数中,我们必须ç¦ç”¨è¿™å‡ ä¸ªæŒ‰é’®ï¼Œè¿™æ ·ç”¨æˆ·å°±ä¸ä¼šåœ¨å¢žåŠ è”系人时å°è¯•è¿›è¡Œæµè§ˆã€‚
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp disabling navigation
+
+ 此外,在 \c submitContact() 函数中,我们å¯ç”¨äº†æµè§ˆæŒ‰é’® \c nextButton å’Œ \c previousButton,这å–决于 \c contacts 的多少。如上文所述,æµè§ˆåŠŸèƒ½ä»…在地å€ç°¿ä¸­æœ‰å¤šä¸ªè”系人时æ‰ä¼šå¯ç”¨ã€‚以下代ç è¡Œè¯´æ˜Žäº†å¦‚何实现此功能:
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp enabling navigation
+
+ 我们还在 \c cancel() 函数中加入这几行代ç ã€‚
+
+ 记得我们曾使用 QMap 对象 \c contacts 模拟了一个循环链接的列表。因此,在 \c next() å‡½æ•°ä¸­ï¼Œæˆ‘ä»¬èŽ·å– \c contacts 的迭代器,然åŽæ‰§è¡Œä»¥ä¸‹æ“作:
+
+ \list
+ \o 如果迭代器未达到 \c contacts 结尾,就会增加一。
+ \o 如果迭代器已达到 \c contacts 的结尾,就移至 \c contacts 的起始ä½ç½®ã€‚这给人感觉 QMap å°±åƒæ˜¯ä¸€ä¸ªå¾ªçŽ¯é“¾æŽ¥çš„列表。
+ \endlist
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp next() function
+
+ 一旦在 \c contacts 中循环至正确的对象,就会通过 \c nameLine 和 \c addressText 显示对象的内容。
+
+ åŒæ ·ï¼Œåœ¨ \c previous() å‡½æ•°ä¸­ï¼Œæˆ‘ä»¬èŽ·å– \c contacts 的迭代器,然åŽæ‰§è¡Œä»¥ä¸‹æ“作:
+
+ \list
+ \o 如果迭代器达到 \c contacts 的结尾,就清除显示内容,然åŽè¿”回。
+ \o 如果迭代器在 \c contacts 的起始ä½ç½®ï¼Œå°±å°†å…¶ç§»è‡³ç»“尾。
+ \o 然åŽï¼Œå°†è¿­ä»£å™¨å‡ä¸€ã€‚
+ \endlist
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp previous() function
+
+ 接ç€ï¼Œé‡æ–°æ˜¾ç¤º \c contacts 中当å‰å¯¹è±¡çš„内容。
+*/
+
+/*!
+ \page tutorials-addressbook-part4.html
+ \previouspage 地å€ç°¿ 3 — æµè§ˆåœ°å€ç°¿æ¡ç›®
+ \contentspage {地å€ç°¿æ•™ç¨‹}{目录}
+ \nextpage {tutorials/addressbook/part5}{第五章}
+ \example tutorials/addressbook/part4
+ \title 地å€ç°¿ 4 — 编辑和删除地å€
+
+ 在本章中,我们将了解如何修改储存在地å€ç°¿åº”用程åºä¸­çš„è”系人的内容。
+
+ \image addressbook-tutorial-screenshot.png
+
+ 现有的地å€ç°¿ä¸ä»…å¯ä»¥äº•äº•æœ‰æ¡åœ°å‚¨å­˜è”系人,还å¯è¿›è¡Œæµè§ˆã€‚å†æ·»åŠ ä¸Šç¼–辑和删除功能,以便在需è¦æ—¶æ›´æ”¹è”系人的详细信æ¯ï¼Œè¿™æ ·æ›´æ˜“于使用。ä¸è¿‡ï¼Œè¿˜éœ€ä½¿ç”¨ enum 类型进行一些改进。在å‰å‡ ç« ä¸­ï¼Œæˆ‘们使用以下两ç§æ¨¡å¼ï¼š\c{AddingMode} å’Œ \c{NavigationMode}。但是,他们并未定义为 enum。我们是采用手动方å¼å¯ç”¨å’Œç¦ç”¨ç›¸åº”的按钮,这就导致有多行é‡å¤çš„代ç ã€‚
+
+ 在本章中,我们定义带有以下三ç§ä¸åŒå€¼çš„ \c{Mode} enum 类型:
+
+ \list
+ \o \c{NavigationMode}ã€
+ \o \c{AddingMode} 和
+ \o \c{EditingMode}。
+ \endlist
+
+ \section1 定义 AddressBook 类
+
+ \c addressbook.h æ–‡ä»¶å·²æ›´æ–°ä¸ºåŒ…å« Mode \c enum 类型:
+
+ \snippet tutorials/addressbook/part4/addressbook.h Mode enum
+
+ 我们还è¦å‘当å‰çš„公有槽列表增加两个新槽:\c editContact() å’Œ \c removeContact()。
+
+ \snippet tutorials/addressbook/part4/addressbook.h edit and remove slots
+
+ 为了在模å¼é—´åˆ‡æ¢ï¼Œæˆ‘们引入了 \c updateInterface() 函数æ¥æŽ§åˆ¶æ‰€æœ‰ QPushButton 对象的å¯ç”¨å’Œç¦ç”¨ã€‚è¦å®žçŽ°ä¸Šæ–‡æåŠçš„编辑和删除功能,我们还è¦å¢žåŠ ä¸¤ä¸ªæ–°æŒ‰é’®ï¼š\c editButton å’Œ \c removeButton。
+
+ \snippet tutorials/addressbook/part4/addressbook.h updateInterface() declaration
+ \dots
+ \snippet tutorials/addressbook/part4/addressbook.h buttons declaration
+ \dots
+ \snippet tutorials/addressbook/part4/addressbook.h mode declaration
+
+ 最åŽï¼Œæˆ‘们声明 \c currentMode æ¥è·Ÿè¸ª enum 的当å‰æ¨¡å¼ã€‚
+
+ \section1 应用 AddressBook 类
+
+ 我们现在必须应用地å€ç°¿åº”用程åºçš„模å¼æ›´æ”¹åŠŸèƒ½ã€‚\c editButton å’Œ \c removeButton 已实例化并默认为ç¦ç”¨ï¼Œè¿™æ˜¯å› ä¸ºåœ°å€ç°¿å¯åŠ¨æ—¶åœ¨å†…存中没有è”系人。
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp edit and remove buttons
+
+ 这些按钮会与其相应的槽 \c editContact() å’Œ \c removeContact() å…³è”,然åŽæˆ‘们将其添加至 \c buttonLayout1。
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp connecting edit and remove
+ \dots
+ \snippet tutorials/addressbook/part4/addressbook.cpp adding edit and remove to the layout
+
+ 在将模å¼åˆ‡æ¢åˆ° \c EditingMode 之å‰ï¼Œ\c editContact() 函数使用 \c oldName å’Œ \c oldAddress 储存è”系人旧的详细信æ¯ã€‚ 在该模å¼ä¸‹ï¼Œ\c submitButton å’Œ \c cancelButton å‡å·²å¯ç”¨ï¼Œè¿™æ ·ç”¨æˆ·å°±å¯ä»¥æ›´æ”¹è”系人的详细信æ¯å¹¶å¯ç‚¹å‡»ä»»ä½•ä¸€ä¸ªæŒ‰é’®ã€‚
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp editContact() function
+
+ \c submitContact() 函数已被 \c{if-else} 语å¥åˆ†ä¸ºä¸¤éƒ¨åˆ†ã€‚我们查看 \c currentMode 是å¦åœ¨ \c AddingMode 模å¼ä¸‹ã€‚如果是,我们继续添加æ“作。
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp submitContact() function beginning
+ \dots
+ \snippet tutorials/addressbook/part4/addressbook.cpp submitContact() function part1
+
+ å¦åˆ™ï¼Œæˆ‘们查看 \c currentMode 是å¦åœ¨ \c EditingMode 模å¼ä¸‹ã€‚如果是,我们比较 \c oldName å’Œ \c name。如果姓å已更改,我们从 \c contacts 中删除旧的è”系人并æ’入已更新的è”系人。
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp submitContact() function part2
+
+ 如果仅更改了地å€ï¼ˆä¾‹å¦‚ \c oldAddress 与 \c address ä¸åŒï¼‰ï¼Œæˆ‘们就更新è”系人的地å€ã€‚最åŽï¼Œæˆ‘们将 \c currentMode 设置为 \c NavigationMode。这一步至关é‡è¦ï¼Œå› ä¸ºå®ƒä¼šé‡æ–°å¯ç”¨æ‰€æœ‰å·²ç¦ç”¨çš„按钮。
+
+ è¦ä»Žåœ°å€ç°¿ä¸­åˆ é™¤è”系人,我们采用 \c removeContact() 函数。该函数查看 \c contacts 中是å¦åŒ…å«è¯¥è”系人。
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp removeContact() function
+
+ 如果有,我们显示 QMessageBox,确认用户的删除æ“作。一旦用户确认æ“作,我们调用 \c previous() ç¡®ä¿ç”¨æˆ·ç•Œé¢æ˜¾ç¤ºå…¶ä»–è”系人,然åŽæˆ‘们使用 QMap çš„ \l{QMap::remove()}{remove()} 函数删除已已确认的è”系人。出于好æ„,我们会显示 QMessageBox æ示用户。在该函数中使用两ç§ä¿¡æ¯æ¡†æ˜¾ç¤ºå¦‚下:
+
+ \image addressbook-tutorial-part4-remove.png
+
+ \section2 更新用户界é¢
+
+ 我们在上文æ到 \c updateInterface() 函数,它å¯æ ¹æ®å½“å‰çš„模å¼å¯ç”¨å’Œç¦ç”¨æŒ‰é’®ã€‚该函数会根æ®ä¼ é€’给它的 \c mode å‚数更新当å‰çš„模å¼ï¼Œåœ¨æ ¡éªŒå€¼ä¹‹å‰å°†å‚数分é…ç»™ \c currentMode。
+
+ 这样,æ¯ä¸ªæŒ‰é’®å°±æ ¹æ®å½“å‰çš„模å¼è¿›è¡Œå¯ç”¨æˆ–ç¦ç”¨ã€‚\c AddingMode å’Œ \c EditingMode 的代ç æ˜¾ç¤ºå¦‚下:
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp update interface() part 1
+
+ ä¸è¿‡å¯¹äºŽ \c NavigationMode,我们在 QPushButton::setEnabled() 函数的å‚数中加入了æ¡ä»¶ã€‚这样å¯ç¡®ä¿ \c editButton å’Œ \c removeButton 在地å€ç°¿ä¸­è‡³å°‘有一个è”系人的情况下å¯ç”¨ï¼Œè€Œ \c nextButton å’Œ \c previousButton 仅在地å€ç°¿ä¸­æœ‰å¤šä¸ªè”系人时æ‰å¯ç”¨ã€‚
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp update interface() part 2
+
+ 通过在åŒä¸€å‡½æ•°ä¸­è®¾ç½®æ¨¡å¼å’Œæ›´æ–°ç”¨æˆ·ç•Œé¢ï¼Œæˆ‘们å¯ä»¥é¿å…用户界é¢ä¸Žåº”用程åºå†…部状æ€ä¸åŒæ­¥çš„å¯èƒ½æ€§ã€‚
+*/
+
+/*!
+ \page tutorials-addressbook-part5.html
+ \previouspage 地å€ç°¿ 4 — 编辑和删除地å€
+ \contentspage {地å€ç°¿æ•™ç¨‹}{目录}
+ \nextpage {tutorials/addressbook/part6}{第六章}
+ \example tutorials/addressbook/part5
+ \title 地å€ç°¿ 5 — 添加查找功能
+
+ 在本章中,我们将了解如何在地å€ç°¿åº”用程åºä¸­å®šä½è”系人和地å€ã€‚
+
+ \image addressbook-tutorial-part5-screenshot.png
+
+ éšç€æˆ‘们ä¸æ–­ä¸ºåœ°å€ç°¿åº”用程åºæ·»åŠ è”系人,使用下一个和上一个按钮æµè§ˆè”系人就会å˜å¾—很ç¹ç。在这ç§æƒ…况下,使用查找函数查找è”系人就会更加有效。上é¢çš„å±å¹•æˆªå›¾æ˜¾ç¤ºäº†æŸ¥æ‰¾æŒ‰é’®åŠå…¶åœ¨æŒ‰é’®é¢æ¿ä¸Šçš„ä½ç½®ã€‚
+
+ 当用户点击查找按钮时,有必è¦æ˜¾ç¤ºä¸€ä¸ªå¯¹è¯æ¡†ï¼Œç”¨æˆ·å¯åœ¨å…¶ä¸­è¾“å…¥è”系人的姓å。Qt æ供了 QDialog(我们会在本章中将其用作å­ç±»ï¼‰ï¼Œå¯ä½¿ç”¨ \c FindDialog 类。
+
+ \section1 定义 FindDialog 类
+
+ \image addressbook-tutorial-part5-finddialog.png
+
+ è¦ä½¿ç”¨ QDialog çš„å­ç±»ï¼Œæˆ‘们首先è¦åœ¨ \c finddialog.h 文件中声明 QDialog 的头信æ¯ã€‚此外,我们还使用å‘å‰ (forward) 声明æ¥å£°æ˜Ž QLineEdit å’Œ QPushButton,这样我们就能在对è¯æ¡†ç±»ä¸­ä½¿ç”¨è¿™äº› widget。
+
+ 因为在 \c AddressBook 类中,\c FindDialog 类包å«äº† Q_OBJECT å®ï¼Œå¹¶ä¸”其构造器已定义为接收父级 QWidget,å³ä½¿å¯¹è¯æ¡†ä»¥å•ç‹¬çš„窗å£æ–¹å¼æ‰“开。
+
+ \snippet tutorials/addressbook/part5/finddialog.h FindDialog header
+
+ 我们定义了公有函数 \c getFindText(),供实例化 \c FindDialog 的类使用,这样这些类å¯ä»¥èŽ·å–用户输入的文本。公有槽 \c findClicked() 定义为在用户点击\gui{查找}按钮时处ç†æœç´¢å­—符串。
+
+ 最åŽï¼Œæˆ‘们定义ç§æœ‰å˜é‡ \c findButtonã€\c lineEdit å’Œ \c findText,分别对应\gui{查找}按钮ã€ç”¨æˆ·è¾“å…¥æœç´¢å­—符串的行编辑框和储存æœç´¢å­—符串供ç¨åŽä½¿ç”¨çš„内部字符串。
+
+ \section1 应用 FindDialog 类
+
+ 在 \c FindDialog 的构造器中,我们设置ç§æœ‰å˜é‡ \c lineEditã€\c findButton å’Œ \c findText。使用 QHBoxLayout 放置 widget。
+
+ \snippet tutorials/addressbook/part5/finddialog.cpp constructor
+
+ 我们设定布局和窗å£æ ‡é¢˜ï¼Œå¹¶å°†ä¿¡å·ä¸Žå…¶å„自的槽关è”。请注æ„,\c findButton çš„ \l{QPushButton::clicked()}{clicked()} ä¿¡å·å·²ä¸Ž \c findClicked() å’Œ \l{QDialog::accept()}{accept()} å…³è”。QDialog æ供的 \l{QDialog::accept()}{accept()} 槽会éšè—对è¯æ¡†å¹¶å°†ç»“果代ç è®¾ç½®ä¸º \l{QDialog::}{Accepted}。我们使用该函数有助于 \c AddressBook çš„ \c findContact() 函数知晓 \c FindDialog 对象关闭的时间。我们在讨论 \c findContact() 函数时将对该函数åšè¿›ä¸€æ­¥è¯´æ˜Žã€‚
+
+ \image addressbook-tutorial-part5-signals-and-slots.png
+
+ 在 \c findClicked() ä¸­ï¼Œæˆ‘ä»¬éªŒè¯ \c lineEdit 以确ä¿ç”¨æˆ·æ²¡æœ‰åœ¨å°šæœªè¾“å…¥è”系人姓å时就点击\gui{查找}按钮。然åŽï¼Œæˆ‘们将 \c findText 设置为从 \c lineEdit æå–çš„æœç´¢å­—符串。之åŽï¼Œæˆ‘们清空 \c lineEdit 的内容并éšè—对è¯æ¡†ã€‚
+
+ \snippet tutorials/addressbook/part5/finddialog.cpp findClicked() function
+
+ \c findText å˜é‡å·²æœ‰å…¬æœ‰ getter 函数 \c getFindText() 与其相关è”。既然我们仅在构造器和 \c findClicked() 函数中直接设定了 \c findText, 我们就ä¸åœ¨åˆ›å»º \c getFindText() çš„åŒæ—¶å†åˆ›å»º setter 函数。由于 \c getFindText() 是公有的,实例化和使用 \c FindDialog çš„ç±»å¯å§‹ç»ˆè¯»å–用户已输入并确认的æœç´¢å­—符串。
+
+ \snippet tutorials/addressbook/part5/finddialog.cpp getFindText() function
+
+ \section1 定义 AddressBook 类
+
+ è¦ç¡®ä¿æˆ‘们å¯ä½¿ç”¨ \c AddressBook 类中的 \c FindDialog,我们è¦åœ¨ \c addressbook.h æ–‡ä»¶ä¸­åŒ…å« \c finddialog.h。
+
+ \snippet tutorials/addressbook/part5/addressbook.h include finddialog's header
+
+ 至此,所有地å€ç°¿åŠŸèƒ½éƒ½æœ‰äº† QPushButton 和对应的槽。åŒæ ·ï¼Œ\gui{Find} 功能有 \c findButton å’Œ \c findContact()。
+
+ \c findButton 声明为ç§æœ‰å˜é‡ï¼Œè€Œ \c findContact() 函数声明为公有槽。
+
+ \snippet tutorials/addressbook/part5/addressbook.h findContact() declaration
+ \dots
+ \snippet tutorials/addressbook/part5/addressbook.h findButton declaration
+
+ 最åŽï¼Œæˆ‘们声明ç§æœ‰å˜é‡ \c dialog,用于引用 \c FindDialog 的实例。
+
+ \snippet tutorials/addressbook/part5/addressbook.h FindDialog declaration
+
+ 在实例化对è¯æ¡†åŽï¼Œæˆ‘们å¯èƒ½ä¼šå¯¹å…¶è¿›è¡Œå¤šæ¬¡ä½¿ç”¨ã€‚使用ç§æœ‰å˜é‡å¯åœ¨ç±»ä¸­ä¸åŒä½ç½®å¯¹å…¶è¿›è¡Œå¤šæ¬¡å¼•ç”¨ã€‚
+
+ \section1 应用 AddressBook 类
+
+ 在 \c AddressBook 类的构造器中,实例化ç§æœ‰å¯¹è±¡ \c findButton å’Œ \c findDialog:
+
+ \snippet tutorials/addressbook/part5/addressbook.cpp instantiating findButton
+ \dots
+ \snippet tutorials/addressbook/part5/addressbook.cpp instantiating FindDialog
+
+ 接下æ¥ï¼Œå°† \c findButton çš„ \l{QPushButton::clicked()}{clicked()} ä¿¡å·ä¸Ž \c findContact() å…³è”。
+
+ \snippet tutorials/addressbook/part5/addressbook.cpp signals and slots for find
+
+ 现在唯一è¦å®Œæˆçš„就是 \c findContact() 函数的编ç ï¼š
+
+ \snippet tutorials/addressbook/part5/addressbook.cpp findContact() function
+
+ 我们从显示 \c FindDialog 的实例 \c dialog 开始入手。这时用户开始输入è”系人姓å进行查找。用户点击对è¯æ¡†çš„ \c findButton åŽï¼Œå¯¹è¯æ¡†ä¼šéšè—,并且结果代ç è®¾ç½®ä¸º QDialog::Accepted.这样就确ä¿äº† \c if 语å¥å§‹ç»ˆä¸ºçœŸã€‚
+
+ 然åŽï¼Œæˆ‘们就开始使用 \c FindDialog çš„ \c getFindText() 函数æå–æœç´¢å­—符串,这个字符串也就是本例中的 \c contactName。如果地å€ç°¿ä¸­æœ‰è”系人,就立å³æ˜¾ç¤ºè¯¥è”系人。å¦åˆ™ï¼Œæ˜¾ç¤ºå¦‚下所示的 QMessageBox 表明æœç´¢å¤±è´¥ã€‚
+
+ \image addressbook-tutorial-part5-notfound.png
+*/
+
+/*!
+ \page tutorials-addressbook-part6.html
+ \previouspage 地å€ç°¿ 5 — 添加查找功能
+ \contentspage {地å€ç°¿æ•™ç¨‹}{目录}
+ \nextpage {tutorials/addressbook/part7}{第七章}
+ \example tutorials/addressbook/part6
+ \title 地å€ç°¿ 6 — 加载和ä¿å­˜
+
+ 本章æ述了用于编写地å€ç°¿åº”用程åºçš„加载和ä¿å­˜ç¨‹åºæ‰€ä½¿ç”¨çš„ Qt 文件处ç†åŠŸèƒ½ã€‚
+
+ \image addressbook-tutorial-part6-screenshot.png
+
+ 虽然æµè§ˆå’Œæœç´¢è”系人是éžå¸¸å®žç”¨çš„功能,但åªæœ‰åœ¨å¯ä»¥ä¿å­˜çŽ°æœ‰è”系人并å¯ä»¥åœ¨ä»¥åŽåŠ è½½çš„å‰æ下地å€ç°¿æ‰çœŸæ­£å®Œå…¨å¯ç”¨ã€‚Qt æ供大é‡ç”¨äºŽ\l{Input/Output and Networking}{输入和输出}的类,但我们åªé€‰æ‹©ä¸¤ä¸ªæ˜“于åˆå¹¶ä½¿ç”¨çš„类:QFile å’Œ QDataStream。
+
+ QFile 对象表示ç£ç›˜ä¸Šå¯è¯»å–和写入的文件。QFile 是代表多ç§ä¸åŒè®¾å¤‡ä¸”应用更广的 QIODevice 类的å­ç±»ã€‚
+
+ QDataStream 对象用于按顺åºæŽ’列二进制数æ®ï¼Œä»¥ä¾¿å‚¨å­˜åœ¨ QIODevice 中并供以åŽæ£€ç´¢ã€‚读å–或写入 QIODevice 就如åŒæ‰“开数æ®æµï¼Œç„¶åŽè¯»å–或写入一样简å•ï¼Œåªæ˜¯å‚数为ä¸åŒçš„设备。
+
+
+ \section1 定义 AddressBook 类
+
+ 我们声明两个公有槽 \c saveToFile() å’Œ \c loadFromFile(),以åŠä¸¤ä¸ª QPushButton 对象 \c loadButton å’Œ \c saveButton。
+
+ \snippet tutorials/addressbook/part6/addressbook.h save and load functions declaration
+ \dots
+ \snippet tutorials/addressbook/part6/addressbook.h save and load buttons declaration
+
+ \section1 应用 AddressBook 类
+
+ 在构造器中,我们实例化 \c loadButton å’Œ \c saveButton。ç†æƒ³æƒ…况下,将按钮标签设置为“从文件加载è”系人â€å’Œâ€œå°†è”系人ä¿å­˜è‡³æ–‡ä»¶â€ä¼šæ›´æ–¹ä¾¿ç”¨æˆ·ä½¿ç”¨ã€‚ä¸è¿‡ï¼Œç”±äºŽå…¶ä»–按钮的大å°é™åˆ¶ï¼Œæˆ‘们将标签设置为\gui{加载...}å’Œ\gui{ä¿å­˜...}。幸è¿çš„是,Qt æ供了使用 \l{QWidget::setToolTip()}{setToolTip()} æ¥è®¾ç½®å·¥å…·æ示的简å•æ–¹å¼ï¼Œæˆ‘们å¯é€šè¿‡å¦‚下方å¼å°†å…¶ç”¨äºŽæŒ‰é’®ï¼š
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp tooltip 1
+ \dots
+ \snippet tutorials/addressbook/part6/addressbook.cpp tooltip 2
+
+ 虽然此处没有显示,但与其他应用的功能一样,我们在å³ä¾§çš„布局é¢æ¿ \c button1Layout 上添加按钮,然åŽå°†æŒ‰é’®çš„ \l{QPushButton::clicked()}{clicked()} ä¿¡å·ä¸Žå…¶ç›¸åº”的槽关è”。
+
+ 至于ä¿å­˜åŠŸèƒ½ï¼Œæˆ‘们首先使用 QFileDialog::getSaveFileName() èŽ·å– \c fileName。 这是 QFileDialog æ供的一个便æ·åŠŸèƒ½ï¼Œå¯å¼¹å‡ºæ ·å¼æ–‡ä»¶å¯¹è¯æ¡†å¹¶å…许用户输入文件å或选择现有的 \c{.abk} 文件。\c{.abk} 文件是ä¿å­˜è”系人时创建的地å€ç°¿æ‰©å±•å。
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part1
+
+ 弹出的文件对è¯æ¡†å±å¹•æˆªå›¾æ˜¾ç¤ºå¦‚下:
+
+ \image addressbook-tutorial-part6-save.png
+
+ 如果 \c fileName ä¸ä¸ºç©ºï¼Œæˆ‘们就使用 \c fileName 创建 QFile 对象 \c file。 QFile 与 QDataStream 一åŒä½¿ç”¨ï¼Œè¿™æ˜¯å› ä¸ºQFile 是 QIODevice。
+
+ 接下æ¥ï¼Œæˆ‘们å°è¯•ä»¥ \l{QIODevice::}{WriteOnly} 模å¼æ‰“开文件。如果未能打开,会显示 QMessageBox æ示用户。
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part2
+
+ å¦åˆ™ï¼Œä¼šç”¨å®žä¾‹è¡¨ç¤º QDataStream 对象 \c out,以写入打开的文件。QDataStream è¦æ±‚读写æ“作需使用相åŒç‰ˆæœ¬çš„æ•°æ®æµã€‚在将数æ®æŒ‰é¡ºåºå†™å…¥ \c file 之å‰ï¼Œå°†ä½¿ç”¨çš„版本设置为\l{QDataStream::Qt_4_5}{采用 Qt 4.5 的版本}å°±å¯ç¡®ä¿ç‰ˆæœ¬ç›¸åŒã€‚
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part3
+
+ 至于加载功能,我们也是使用 QFileDialog::getOpenFileName() èŽ·å– \c fileName。该函数与 QFileDialog::getSaveFileName() 相对应,也是弹出样å¼æ–‡ä»¶å¯¹è¯æ¡†å¹¶å…许用户输入文件å或选择现有的 \c{.abk} 文件加载到地å€ç°¿ä¸­ã€‚
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part1
+
+ 例如,在 Windows 上,该函数弹出本地文件对è¯æ¡†ï¼Œå¦‚以下å±å¹•æˆªå›¾æ‰€ç¤ºã€‚
+
+ \image addressbook-tutorial-part6-load.png
+
+ 如果 \c fileName ä¸ä¸ºç©ºï¼Œè¿˜æ˜¯ä½¿ç”¨ QFile 对象 \c file,然åŽå°è¯•åœ¨ \l{QIODevice::}{ReadOnly} 模å¼ä¸‹æ‰“开文件。与 \c saveToFile() 的应用方å¼ç±»ä¼¼ï¼Œå¦‚æžœå°è¯•å¤±è´¥ï¼Œä¼šæ˜¾ç¤º QMessageBox æ示用户。
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part2
+
+ å¦åˆ™ï¼Œä¼šç”¨å®žä¾‹è¡¨ç¤º QDataStream 对象 \c in,按上文所述设置其版本,然åŽå°†æŒ‰é¡ºåºæŽ’列的数æ®è¯»å…¥ \c contacts æ•°æ®ç»“构。请注æ„,在将数æ®è¯»å…¥ä¹‹å‰æ¸…空 \c contacts å¯ç®€åŒ–文件读å–过程。更高级的方法是将è”系人读å–至临时 QMap 对象,然åŽä»…å¤åˆ¶ \c contacts 中ä¸å­˜åœ¨çš„è”系人。
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part3
+
+ è¦æ˜¾ç¤ºä»Žæ–‡ä»¶ä¸­è¯»å–çš„è”系人,必须è¦å…ˆéªŒè¯èŽ·å–çš„æ•°æ®ï¼Œä»¥ç¡®ä¿è¯»å–的文件实际包å«åœ°å€ç°¿è”系人。如果为真,显示第一个è”系人,å¦åˆ™æ˜¾ç¤º QMessageBox æ示出现问题。最åŽï¼Œæˆ‘们更新界é¢ä»¥ç›¸åº”地å¯ç”¨å’Œç¦ç”¨æŒ‰é’®ã€‚
+*/
+
+/*!
+ \page tutorials-addressbook-part7.html
+ \previouspage 地å€ç°¿ 6 — 加载和ä¿å­˜
+ \contentspage {地å€ç°¿æ•™ç¨‹}{目录}
+ \example tutorials/addressbook/part7
+ \title 地å€ç°¿ 7 — 附加功能
+
+ 本章讲述了部分å¯ä½¿åœ°å€ç°¿åº”用程åºæ—¥å¸¸ä½¿ç”¨æ›´åŠ ä¾¿æ·çš„附加功能。
+
+ \image addressbook-tutorial-part7-screenshot.png
+
+ 虽然地å€ç°¿åº”用程åºå…¶è‡ªèº«åŠŸèƒ½å·²ç»å¾ˆå®žç”¨ï¼Œä½†æ˜¯å¦‚æžœå¯å’Œå…¶ä»–应用程åºäº’æ¢è”系人数æ®å°±ä¼šæ›´åŠ æœ‰ç›Šã€‚vCard æ ¼å¼æ˜¯ä¸€ç§æµè¡Œçš„文件格å¼ï¼Œå°±å¯ç”¨äºŽæ­¤ç›®çš„。在本章中,我们会扩展地å€ç°¿å®¢æˆ·ç«¯ï¼Œå¯å°†è”系人导出到 vCard \c{.vcf} 文件中。
+
+ \section1 定义 AddressBook 类
+
+ 我们在 \c addressbook.h 文件的 \c AddressBook 类中添加 QPushButton 对象 \c exportButton 以åŠå¯¹åº”的公有槽 \c exportAsVCard()。
+
+ \snippet tutorials/addressbook/part7/addressbook.h exportAsVCard() declaration
+ \dots
+ \snippet tutorials/addressbook/part7/addressbook.h exportButton declaration
+
+ \section1 应用 AddressBook 类
+
+ 在 \c AddressBook 构造器中,我们将 \c exportButton çš„ \l{QPushButton::clicked()}{clicked()} ä¿¡å·è¿žæŽ¥è‡³ \c exportAsVCard()。我们还会将该按钮添加至 \c buttonLayout1,它是负责å³ä¾§æŒ‰é’®é¢æ¿çš„布局类。
+
+ 在 \c exportAsVCard() 函数中,我们从æå– \c name 中è”系人姓å开始入手。我们声明 \c firstNameã€\c lastName å’Œ \c nameList。接下æ¥ï¼Œæˆ‘们查找 \c name 中第一处空白的索引。如果有空白,就将è”系人的姓å分隔为 \c firstName å’Œ lastName。然åŽï¼Œå°†ç©ºç™½æ›¿æ¢ä¸ºä¸‹åˆ’线 ("_")。或者,如果没有空白,就认定è”系人åªæœ‰å字。
+
+ \snippet tutorials/addressbook/part7/addressbook.cpp export function part1
+
+ 至于 \c saveToFile() 函数,会打开文件对è¯æ¡†ï¼Œè®©ç”¨æˆ·é€‰æ‹©æ–‡ä»¶çš„ä½ç½®ã€‚通过选择的文件å称,我们创建è¦å†™å…¥çš„ QFile 实例。
+
+ 我们å°è¯•ä»¥ \l{QIODevice::}{WriteOnly} 模å¼æ‰“开文件。如果æ“作失败,会显示 QMessageBox æ示用户出现问题并返回。å¦åˆ™ï¼Œå°†æ–‡ä»¶ä½œä¸ºå‚数传递给 QTextStream 对象 \c out。与 QDataStream 类似,QTextStream ç±»æ供了读å–纯文本和将其写入到文件的功能。因此,所生æˆçš„ \c{.vcf} 文件å¯ä»¥åœ¨æ–‡æœ¬ç¼–辑器中打开进行编辑。
+
+ \snippet tutorials/addressbook/part7/addressbook.cpp export function part2
+
+ 然åŽï¼Œæˆ‘们写出ä¾æ¬¡å¸¦æœ‰ \c{BEGIN:VCARD} å’Œ \c{VERSION:2.1} 标记的 vCard 文件。è”系人的姓å使用 \c{N:} 标记写入。至于写入 vCard “File asâ€å±žæ€§çš„ FN: 标记,我们必须è¦æŸ¥çœ‹æ˜¯å¦è”系人带有姓。如果è”系人有姓,就使用 \c nameList 中的详细信æ¯å¡«å…¥è¯¥æ ‡è®°ã€‚å¦åˆ™ï¼Œä»…写入 \c firstName。
+
+ \snippet tutorials/addressbook/part7/addressbook.cpp export function part3
+
+ 我们继续写入è”系人的地å€ã€‚地å€ä¸­çš„分å·ä½¿ç”¨ "\\" 进行转义,新行使用分å·è¿›è¡Œæ›¿æ¢ï¼Œè€Œé€—å·ä½¿ç”¨ç©ºç™½è¿›è¡Œæ›¿æ¢ã€‚最åŽï¼Œæˆ‘们ä¾æ¬¡å†™å…¥ \c{ADR;HOME:;}ã€\c address å’Œ \c{END:VCARD} 标记。
+
+ \snippet tutorials/addressbook/part7/addressbook.cpp export function part4
+
+ 最åŽï¼Œä¼šæ˜¾ç¤º QMessageBox æ示用户已æˆåŠŸå¯¼å‡º vCard。
+
+ \e{vCard 是 \l{http://www.imc.org}{Internet Mail Consortium} 的商标}。
+*/
diff --git a/doc/src/zh_CN/tutorials/widgets-tutorial.qdoc b/doc/src/zh_CN/tutorials/widgets-tutorial.qdoc
new file mode 100644
index 0000000000..90ef4f3051
--- /dev/null
+++ b/doc/src/zh_CN/tutorials/widgets-tutorial.qdoc
@@ -0,0 +1,244 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page widgets-tutorial.html
+ \title Widgets 教程
+ \brief This tutorial covers basic usage of widgets and layouts, showing how
+ they are used to build GUI applications.
+
+ \startpage {index.html}{Qt Reference Documentation}
+ \contentspage 教程
+ \nextpage {Widgets 教程 — 创建窗å£}
+
+
+ \section1 简介
+
+ Widget 是使用 Qt ç¼–å†™çš„å›¾å½¢ç”¨æˆ·ç•Œé¢ (GUI) 应用程åºçš„基本生æˆå—。æ¯ä¸ª GUI 组件,如按钮ã€æ ‡ç­¾æˆ–文本编辑器,都是一个 widget ,并å¯ä»¥æ”¾ç½®åœ¨çŽ°æœ‰çš„用户界é¢ä¸­æˆ–作为å•ç‹¬çš„窗å£æ˜¾ç¤ºã€‚æ¯ç§ç±»åž‹çš„组件都是由 QWidget 的特殊å­ç±»æ供的,而 QWidget 自身åˆæ˜¯ QObject çš„å­ç±»ã€‚
+
+ QWidget ä¸æ˜¯ä¸€ä¸ªæŠ½è±¡ç±»ï¼›å®ƒå¯ç”¨ä½œå…¶ä»– widget 的容器,并很容易作为å­ç±»ä½¿ç”¨æ¥åˆ›å»ºå®šåˆ¶ widget。它ç»å¸¸ç”¨æ¥åˆ›å»ºæ”¾ç½®å…¶ä»– widget 的窗å£ã€‚
+
+ 至于 QObject,å¯ä½¿ç”¨çˆ¶å¯¹è±¡åˆ›å»º widget 以表明其所属关系,这å¯ç¡®ä¿åˆ é™¤ä¸å†ä½¿ç”¨çš„对象。使用 widget,这些父å­å…³ç³»å°±æœ‰äº†æ›´å¤šçš„æ„义:æ¯ä¸ªå­ç±»éƒ½æ˜¾ç¤ºåœ¨å…¶çˆ¶çº§æ‰€æ‹¥æœ‰çš„å±å¹•åŒºåŸŸå†…。也就是说,当删除窗å£æ—¶ï¼Œå…¶åŒ…å«çš„所有 widget 也都自动删除。
+
+ \section1 Writing a main Function
+
+ Many of the GUI examples in Qt follow the pattern of having a \c{main.cpp}
+ file containing code to initialize the application, and a number of other
+ source and header files containing the application logic and custom GUI
+ components.
+
+ A typical \c main() function, written in \c{main.cpp}, looks like this:
+
+ \snippet doc/src/snippets/widgets-tutorial/template.cpp main.cpp body
+
+ We first construct a QApplication object which is configured using any
+ arguments passed in from the command line. After any widgets have been
+ created and shown, we call QApplication::exec() to start Qt's event loop.
+ Control passes to Qt until this function returns, at which point we return
+ the value we obtain from this function.
+
+ In each part of this tutorial, we provide an example that is written
+ entirely within a \c main() function. In more sophisticated examples, the
+ code to set up widgets and layouts is written in other parts of the
+ example. For example, the GUI for a main window may be set up in the
+ constructor of a QMainWindow subclass.
+
+ The \l{Widgets examples} are a good place to look for
+ more complex and complete examples and applications.
+
+ \section1 Building Examples and Tutorials
+
+ If you obtained a binary package of Qt or compiled it yourself, the
+ examples described in this tutorial should already be ready to run.
+ However, if you may wish to modify them and recompile them, you need to
+ perform the following steps:
+
+ \list 1
+ \o At the command line, enter the directory containing the example you
+ wish to recompile.
+ \o Type \c qmake and press \key{Return}. If this doesn't work, make sure
+ that the executable is on your path, or enter its full location.
+ \o On Linux/Unix and Mac OS X, type \c make and press \key{Return};
+ on Windows with Visual Studio, type \c nmake and press \key{Return}.
+ \endlist
+
+ An executable file should have been created within the current directory.
+ On Windows, this file may be located within a \c debug or \c release
+ subdirectory. You can run this file to see the example code at work.
+*/
+
+/*!
+ \page widgets-tutorial-toplevel.html
+ \contentspage {Widgets 教程}{目录}
+ \previouspage {Widgets 教程}
+ \nextpage {Widgets 教程 — Child Widgets}
+ \example tutorials/widgets/toplevel
+ \title Widgets 教程 — 创建窗å£
+
+ 如果 widget 未使用父级进行创建,则在显示时视为窗å£æˆ–\e{顶层 widget}。由于顶层 widget 没有父级对象类æ¥ç¡®ä¿åœ¨å…¶ä¸å†ä½¿ç”¨æ—¶å°±åˆ é™¤ï¼Œå› æ­¤éœ€è¦å¼€å‘人员在应用程åºä¸­å¯¹å…¶è¿›è¡Œè·Ÿè¸ªã€‚
+
+ 在下例中,我们使用 QWidget 创建和显示具有默认大å°çš„窗å£ï¼š
+
+ \raw HTML
+ <table align="left" width="100%">
+ <tr class="qt-code"><td>
+ \endraw
+ \snippet tutorials/widgets/toplevel/main.cpp main program
+ \raw HTML
+ </td><td align="right">
+ \endraw
+ \inlineimage widgets-tutorial-toplevel.png
+ \raw HTML
+ </td></tr>
+ </table>
+ \endraw
+
+ To create a real GUI, we need to place widgets inside the window. To do
+ this, we pass a QWidget instance to a widget's constructor, as we will
+ demonstrate in the next part of this tutorial.
+*/
+
+/*!
+ \page widgets-tutorial-childwidget.html
+ \contentspage {Widgets 教程}{目录}
+ \previouspage {Widgets 教程 — 创建窗å£}
+ \nextpage {Widgets 教程 — 使用布局}
+ \example tutorials/widgets/childwidget
+ \title Widgets 教程 — Child Widgets
+
+ 我们å¯ä»¥é€šè¿‡å°† \c window 作为父级传递给其构造器æ¥å‘窗å£æ·»åŠ å­ widget。在这ç§æƒ…况下,我们å‘窗å£æ·»åŠ æŒ‰é’®å¹¶å°†å…¶æ”¾ç½®åœ¨ç‰¹å®šä½ç½®ï¼š
+
+ \raw HTML
+ <table align="left" width="100%">
+ <tr class="qt-code"><td>
+ \endraw
+ \snippet tutorials/widgets/childwidget/main.cpp main program
+ \raw HTML
+ </td><td align="right">
+ \endraw
+ \inlineimage widgets-tutorial-childwidget.png
+ \raw HTML
+ </td></tr>
+ </table>
+ \endraw
+
+ 该按钮现在为窗å£çš„å­é¡¹ï¼Œå¹¶åœ¨åˆ é™¤çª—å£æ—¶ä¸€åŒåˆ é™¤ã€‚请注æ„,éšè—或关闭窗å£ä¸ä¼šè‡ªåŠ¨åˆ é™¤è¯¥æŒ‰é’®ã€‚
+*/
+
+/*!
+ \page widgets-tutorial-windowlayout.html
+ \contentspage {Widgets 教程}{目录}
+ \previouspage {Widgets 教程 — Child Widgets}
+ \nextpage {Widgets 教程 — Nested Layouts}
+ \example tutorials/widgets/windowlayout
+ \title Widgets 教程 — 使用布局
+
+ é€šå¸¸ï¼Œå­ widget 是通过使用布局对象在窗å£ä¸­è¿›è¡ŒæŽ’列,而ä¸æ˜¯é€šè¿‡æŒ‡å®šä½ç½®å’Œå¤§å°è¿›è¡ŒæŽ’列。在此处,我们构造è¦å¹¶æŽ’排列的标签和行编辑框 widget。
+
+ \raw HTML
+ <table align="left" width="100%">
+ <tr class="qt-code"><td>
+ \endraw
+ \snippet tutorials/widgets/windowlayout/main.cpp main program
+ \raw HTML
+ </td><td align="right">
+ \endraw
+ \inlineimage widgets-tutorial-windowlayout.png
+ \raw HTML
+ </td></tr>
+ </table>
+ \endraw
+
+ 我们构造的布局对象管ç†é€šè¿‡ \l{QHBoxLayout::}{addWidget()} 函数æ供的 widget çš„ä½ç½®å’Œå¤§å°ã€‚布局本身是通过调用 \l{QWidget::}{setLayout()} æ供给窗å£çš„。布局仅å¯é€šè¿‡å…¶å¯¹æ‰€ç®¡ç†çš„ widget(和其他布局)的效果æ‰å¯æ˜¾ç¤ºã€‚
+
+ 在上文示例中,æ¯ä¸ª widget 的所属关系并ä¸æ˜Žæ˜¾ã€‚由于我们未使用父级对象构造 widget 和布局,我们会看到一个空窗å£å’Œä¸¤ä¸ªåŒ…å«äº†æ ‡ç­¾ä¸Žè¡Œç¼–辑框的窗å£ã€‚ä¸è¿‡ï¼Œå¦‚果我们告知布局æ¥ç®¡ç†æ ‡ç­¾å’Œè¡Œç¼–辑框,并在窗å£ä¸­è®¾ç½®å¸ƒå±€ï¼Œä¸¤ä¸ª widget 与布局本身就都会æˆä¸ºçª—å£çš„å­é¡¹ã€‚
+*/
+
+/*!
+ \page widgets-tutorial-nestedlayouts.html
+ \contentspage {Widgets 教程}{目录}
+ \previouspage {Widgets 教程 — 使用布局}
+ \example tutorials/widgets/nestedlayouts
+ \title Widgets 教程 — Nested Layouts
+
+ 由于 widget å¯åŒ…å«å…¶ä»– widget,布局å¯ç”¨æ¥æ供按ä¸åŒå±‚次分组的 widget。这里,我们è¦åœ¨æ˜¾ç¤ºæŸ¥è¯¢ç»“果的表视图上方ã€çª—å£é¡¶éƒ¨çš„行编辑框æ—,显示一个标签。
+
+ We achieve this by creating two layouts: \c{queryLayout} is a QHBoxLayout
+ that contains QLabel and QLineEdit widgets placed side-by-side;
+ \c{mainLayout} is a QVBoxLayout that contains \c{queryLayout} and a
+ QTableView arranged vertically.
+
+ \raw HTML
+ <table align="left" width="100%">
+ <tr class="qt-code"><td>
+ \endraw
+ \snippet tutorials/widgets/nestedlayouts/main.cpp first part
+ \snippet tutorials/widgets/nestedlayouts/main.cpp last part
+ \raw HTML
+ </td><td align="right">
+ \endraw
+ \inlineimage widgets-tutorial-nestedlayouts.png
+ \raw HTML
+ </td></tr>
+ </table>
+ \endraw
+
+ Note that we call the \c{mainLayout}'s \l{QBoxLayout::}{addLayout()}
+ function to insert the \c{queryLayout} above the \c{resultView} table.
+
+ We have omitted the code that sets up the model containing the data shown
+ by the QTableView widget, \c resultView. For completeness, we show this below.
+
+ 除了 QHBoxLayout å’Œ QVBoxLayout,Qt 还æ供了 QGridLayout å’Œ QFormLayout ç±»æ¥å助实现更å¤æ‚的用户界é¢ã€‚
+ These can be seen if you run \l{Qt Designer}.
+
+ \section1 Setting up the Model
+
+ In the code above, we did not show where the table's data came from
+ because we wanted to concentrate on the use of layouts. Here, we see
+ that the model holds a number of items corresponding to rows, each of
+ which is set up to contain data for two columns.
+
+ \snippet tutorials/widgets/nestedlayouts/main.cpp set up the model
+
+ The use of models and views is covered in the
+ \l{Item Views Examples} and in the \l{Model/View Programming} overview.
+*/
diff --git a/examples/assistant/README b/examples/assistant/README
deleted file mode 100644
index 85f5a4373d..0000000000
--- a/examples/assistant/README
+++ /dev/null
@@ -1,38 +0,0 @@
-Support for interactive help is provided by the Qt Assistant application.
-Developers can take advantages of the facilities it offers to display
-specially-prepared documentation to users of their applications.
-
-
-The example launcher provided with Qt can be used to explore each of the
-examples in this directory.
-
-Documentation for these examples can be found via the Tutorial and Examples
-link in the main Qt documentation.
-
-
-Finding the Qt Examples and Demos launcher
-==========================================
-
-On Windows:
-
-The launcher can be accessed via the Windows Start menu. Select the menu
-entry entitled "Qt Examples and Demos" entry in the submenu containing
-the Qt tools.
-
-On Mac OS X:
-
-For the binary distribution, the qtdemo executable is installed in the
-/Developer/Applications/Qt directory. For the source distribution, it is
-installed alongside the other Qt tools on the path specified when Qt is
-configured.
-
-On Unix/Linux:
-
-The qtdemo executable is installed alongside the other Qt tools on the path
-specified when Qt is configured.
-
-On all platforms:
-
-The source code for the launcher can be found in the demos/qtdemo directory
-in the Qt package. This example is built at the same time as the Qt libraries,
-tools, examples, and demonstrations.
diff --git a/examples/assistant/assistant.pro b/examples/assistant/assistant.pro
deleted file mode 100644
index ff1f947ad7..0000000000
--- a/examples/assistant/assistant.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS = simpletextviewer
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/assistant
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS assistant.pro README
-sources.path = $$[QT_INSTALL_EXAMPLES]/assistant
-INSTALLS += target sources
-
-symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
diff --git a/examples/assistant/simpletextviewer/documentation/about.txt b/examples/assistant/simpletextviewer/documentation/about.txt
deleted file mode 100644
index eeab35f4a6..0000000000
--- a/examples/assistant/simpletextviewer/documentation/about.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-The Simple Text Viewer enables the user to select and view existing
-files.
-
-HTML files is displayed using rich text, while other files are
-presented as plain text. The application provides a file dialog
-allowing the user to search for files using wildcard matching. The
-search is performed within in the specified directory, and the user is
-given an option to browse the existing file system to find the
-relevant directory.
diff --git a/examples/assistant/simpletextviewer/documentation/browse.html b/examples/assistant/simpletextviewer/documentation/browse.html
deleted file mode 100644
index 987abf31f6..0000000000
--- a/examples/assistant/simpletextviewer/documentation/browse.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Browse</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>Browse</h2></center></p>
-
- <p>
- The file dialog let you browse the current file system to
- specify the directory in which the file you want to open
- resides.
- Note that only the specified directory will be searched, any
- subdirectories will simply be ignored.
- </p>
-
- <br />
- <br />
- <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
- <tr valign="top" bgcolor="#f0f0f0">
- <td><center><img src="images/browse.png" /></center></td>
- </tr>
- </table>
-
- <br />
- <br />
- <p>
- See also: <a href="filedialog.html">File Dialog</a>, <a href="wildcardmatching.html">Wildcard Matching</a>,
- <a href="findfile.html">Find File</a>
- </p>
- </body>
-</html>
-
diff --git a/examples/assistant/simpletextviewer/documentation/filedialog.html b/examples/assistant/simpletextviewer/documentation/filedialog.html
deleted file mode 100644
index afa65ed577..0000000000
--- a/examples/assistant/simpletextviewer/documentation/filedialog.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>File Dialog</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>File Dialog</h2></center></p>
-
- <p>
- In the file dialog you can name a particular file name, or
- search for files using wildcard matching, i.e. specify a
- file name containing wildcards. In addition you must specify
- the directory in which the file you search for resides.
- </p>
-
- <br />
- <br />
- <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
- <tr valign="top" bgcolor="#f0f0f0">
- <td><center><img src="images/filedialog.png" /></center></td>
- </tr>
- </table>
-
- <br />
- <br />
- <p>
- By default the dialog will search for all files (*) in the
- current directory (the directory the application is run from).
- </p>
-
- <p>
- When editing the file name and directory parameters, an
- overview of the matching files are displayed in the
- dialog. The overview is updated whenever the parameters
- change.
- </p>
-
- <br />
- <br />
- <p>
- See also: <a href="browse.html">Browse</a>, <a href="wildcardmatching.html">Wildcard Matching</a>,
- <a href="findfile.html">Find File</a>
- </p>
- </body>
-</html>
-
-
diff --git a/examples/assistant/simpletextviewer/documentation/findfile.html b/examples/assistant/simpletextviewer/documentation/findfile.html
deleted file mode 100644
index 32e0147181..0000000000
--- a/examples/assistant/simpletextviewer/documentation/findfile.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Find File</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>Find File</h2></center></p>
-
- <p>
- To open and view a file in the Simple Text Viewer, select the
- 'Open...' option in the 'File' menu. The application will then
- provide you with a file dialog that you can use to search for
- any existing file.
- </p>
-
- <br />
- <br />
- <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
- <tr valign="top" bgcolor="#f0f0f0">
- <td><center><img src="images/fadedfilemenu.png" /></center></td>
- </tr>
- </table>
-
- <br />
- <br />
- <p>
- See also: <a href="openfile.html">Open File</a>, <a href="filedialog.html">File Dialog</a>
- </p>
- </body>
-</html>
-
diff --git a/examples/assistant/simpletextviewer/documentation/images/browse.png b/examples/assistant/simpletextviewer/documentation/images/browse.png
deleted file mode 100644
index 86db6b19eb..0000000000
--- a/examples/assistant/simpletextviewer/documentation/images/browse.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png b/examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png
deleted file mode 100644
index fde0e43f67..0000000000
--- a/examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/filedialog.png b/examples/assistant/simpletextviewer/documentation/images/filedialog.png
deleted file mode 100644
index 883a33a269..0000000000
--- a/examples/assistant/simpletextviewer/documentation/images/filedialog.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/handbook.png b/examples/assistant/simpletextviewer/documentation/images/handbook.png
deleted file mode 100644
index 3bd2b928b0..0000000000
--- a/examples/assistant/simpletextviewer/documentation/images/handbook.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/mainwindow.png b/examples/assistant/simpletextviewer/documentation/images/mainwindow.png
deleted file mode 100644
index c28d5e9ffe..0000000000
--- a/examples/assistant/simpletextviewer/documentation/images/mainwindow.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/open.png b/examples/assistant/simpletextviewer/documentation/images/open.png
deleted file mode 100644
index 1e5bba3c8c..0000000000
--- a/examples/assistant/simpletextviewer/documentation/images/open.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/wildcard.png b/examples/assistant/simpletextviewer/documentation/images/wildcard.png
deleted file mode 100644
index 6e83a56cc4..0000000000
--- a/examples/assistant/simpletextviewer/documentation/images/wildcard.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/index.html b/examples/assistant/simpletextviewer/documentation/index.html
deleted file mode 100644
index 5a7b1d5fac..0000000000
--- a/examples/assistant/simpletextviewer/documentation/index.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Manual</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>Simple Text Viewer</h2></center></p>
-
- <p>
- The Simple Text Viewer enables the user to select and view
- existing files.
- </p>
-
- <p><center>
- <img src="images/mainwindow.png" />
- </center></p>
-
- <p>
- HTML files is displayed using rich text, while
- other files are presented as plain text. The application
- provides a file dialog allowing the user to search for files
- using wildcard matching. The search is performed within in the
- specified directory, and the user is given an option to browse
- the existing file system to find the relevant directory.
- </p>
-
- <ul>
- <li><a href="findfile.html">Find File</a></li>
- <ul>
- <li><a href="filedialog.html">File Dialog</a></li>
- <li><a href="wildcardmatching.html">WildCard Matching</a></li>
- <li><a href="browse.html">Browse</a></li>
- </ul>
- <li><a href="openfile.html">Open File</a></li>
- </ul>
- </body>
-</html>
-
-
-
diff --git a/examples/assistant/simpletextviewer/documentation/intro.html b/examples/assistant/simpletextviewer/documentation/intro.html
deleted file mode 100644
index 2e2aa40de7..0000000000
--- a/examples/assistant/simpletextviewer/documentation/intro.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Manual</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>Simple Text Viewer</h2></center></p>
-
- <p>
- The Simple Text Viewer enables the user to select and view
- existing files.
- </p>
-
- <p><center>
- <img src="images/mainwindow.png" />
- </center></p>
-
- <p>
- The application provides its own custom documentation that is
- available through the <b>Help</b> menu in the main window's menubar
- and through the <b>Help</b> button in the application's find file
- dialog.
- </p>
-
- </body>
-</html>
-
diff --git a/examples/assistant/simpletextviewer/documentation/openfile.html b/examples/assistant/simpletextviewer/documentation/openfile.html
deleted file mode 100644
index e172de95ea..0000000000
--- a/examples/assistant/simpletextviewer/documentation/openfile.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Open File</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>Open File</h2></center></p>
-
- <p>
- Once the file you want to view appears in the dialog's
- display, you can open it in two different ways.
- </p>
-
- <p>
- By pressing the 'Open' button the currently selected file will
- be opened. By default, the first file in the list of matching
- files is selected. Another way of opening a file is to simply
- double click the displayed file name.
- </p>
-
- <br />
- <br />
- <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
- <tr valign="top" bgcolor="#f0f0f0">
- <td><center><img src="images/open.png" /></center></td>
- </tr>
- </table>
-
- <br />
- <br />
- <p>
- See also: <a href="findfile.html">Find File</a>
- </p>
- </body>
-</html>
diff --git a/examples/assistant/simpletextviewer/documentation/simpletextviewer.adp b/examples/assistant/simpletextviewer/documentation/simpletextviewer.adp
deleted file mode 100644
index 660df4f382..0000000000
--- a/examples/assistant/simpletextviewer/documentation/simpletextviewer.adp
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE DCF>
-
-<assistantconfig version="3.2.0">
-
-<profile>
- <property name="name">simpletextviewer</property>
- <property name="title">Simple Text Viewer</property>
- <property name="applicationicon">images/handbook.png</property>
- <property name="startpage">index.html</property>
- <property name="aboutmenutext">About Simple Text Viewer</property>
- <property name="abouturl">about.txt</property>
- <property name="assistantdocs">.</property>
-</profile>
-
-<DCF ref="index.html" icon="images/handbook.png" title="Simple Text Viewer">
- <section ref="./findfile.html" title="Find File">
- <keyword ref="./index.html">Display</keyword>
- <keyword ref="./index.html">Rich text</keyword>
- <keyword ref="./index.html">Plain text</keyword>
- <keyword ref="./findfile.html">Find</keyword>
- <keyword ref="./findfile.html">File menu</keyword>
- <keyword ref="./filedialog.html">File name</keyword>
- <keyword ref="./filedialog.html">File dialog</keyword>
- <keyword ref="./wildcardmatching.html">File globbing</keyword>
- <keyword ref="./wildcardmatching.html">Wildcard matching</keyword>
- <keyword ref="./wildcardmatching.html">Wildcard syntax</keyword>
- <keyword ref="./browse.html">Browse</keyword>
- <keyword ref="./browse.html">Directory</keyword>
- <keyword ref="./openfile.html">Open</keyword>
- <keyword ref="./openfile.html">Select</keyword>
-
- <section ref="./filedialog.html" title="File Dialog" />
- <section ref="./wildcardmatching.html" title="Wildcard Matching" />
- <section ref="./browse.html" title="Browse" />
- </section>
- <section ref="./openfile.html" title="Open File" />
-</DCF>
-
-</assistantconfig>
-
diff --git a/examples/assistant/simpletextviewer/documentation/wildcardmatching.html b/examples/assistant/simpletextviewer/documentation/wildcardmatching.html
deleted file mode 100644
index eb1839a068..0000000000
--- a/examples/assistant/simpletextviewer/documentation/wildcardmatching.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Wildcard Matching</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>Wildcard Matching</h2></center></p>
-
- <p>
- Most command shells such as bash or cmd.exe support "file
- globbing", the ability to identify a group of files by using
- wildcards.
-
- <br />
- <br />
- <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
- <tr valign="top" bgcolor="#f0f0f0">
- <td><center><img src="images/wildcard.png" /></center></td>
- </tr>
- </table>
-
- <br />
- <br />
- <p>
- Wildcard matching provides four features:
- </p>
-
- <ul>
- <li>Any character represents itself apart from those
- mentioned below. Thus 'c' matches the character 'c'.
- </li>
- <li>The '?' character matches any single character.</li>
- <li>The '*' matches zero or more of any characters.</li>
- <li>Sets of characters can be represented in square brackets.
- Within the character class, like outside, backslash
- has no special meaning.
- </li>
- </ul>
-
- <p>
- For example we could identify HTML files with
- <code>*.html</code>. This will match zero or more characters
- followed by a dot followed by 'h', 't', 'm' and 'l'.
- </p>
-
- <br />
- <br />
- <p>
- See also: <a href="browse.html">Browse</a>, <a href="filedialog.html">File Dialog</a>,
- <a href="findfile.html">Find File</a>
- </p>
- </body>
-</html>
-
-
-
diff --git a/examples/assistant/simpletextviewer/findfiledialog.cpp b/examples/assistant/simpletextviewer/findfiledialog.cpp
deleted file mode 100644
index 1f11f69048..0000000000
--- a/examples/assistant/simpletextviewer/findfiledialog.cpp
+++ /dev/null
@@ -1,221 +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 examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtGui>
-
-#include "findfiledialog.h"
-
-//! [0]
-FindFileDialog::FindFileDialog(QTextEdit *editor, QAssistantClient *assistant,
- QWidget *parent)
- : QDialog(parent)
-{
- currentAssistantClient = assistant;
- currentEditor = editor;
-//! [0]
-
- createButtons();
- createComboBoxes();
- createFilesTree();
- createLabels();
- createLayout();
-
- directoryComboBox->addItem(QDir::toNativeSeparators(QDir::currentPath()));
- fileNameComboBox->addItem("*");
- findFiles();
-
- setWindowTitle(tr("Find File"));
-//! [1]
-}
-//! [1]
-
-void FindFileDialog::browse()
-{
- QString currentDirectory = directoryComboBox->currentText();
- QString newDirectory = QFileDialog::getExistingDirectory(this,
- tr("Select Directory"), currentDirectory);
- if (!newDirectory.isEmpty()) {
- directoryComboBox->addItem(QDir::toNativeSeparators(newDirectory));
- directoryComboBox->setCurrentIndex(directoryComboBox->count() - 1);
- update();
- }
-}
-
-//! [2]
-void FindFileDialog::help()
-{
- currentAssistantClient->showPage(QLibraryInfo::location(QLibraryInfo::ExamplesPath) +
- QDir::separator() + "assistant/simpletextviewer/documentation/filedialog.html");
-}
-//! [2]
-
-void FindFileDialog::openFile(QTreeWidgetItem *item)
-{
- if (!item) {
- item = foundFilesTree->currentItem();
- if (!item)
- return;
- }
-
- QString fileName = item->text(0);
- QString path = directoryComboBox->currentText() + QDir::separator();
-
- QFile file(path + fileName);
- if (file.open(QIODevice::ReadOnly)) {
- QString data(file.readAll());
-
- if (fileName.endsWith(QLatin1String(".html")))
- currentEditor->setHtml(data);
- else
- currentEditor->setPlainText(data);
- }
- close();
-}
-
-void FindFileDialog::update()
-{
- findFiles();
- buttonBox->button(QDialogButtonBox::Open)->setEnabled(
- foundFilesTree->topLevelItemCount() > 0);
-}
-
-void FindFileDialog::findFiles()
-{
- QRegExp filePattern(fileNameComboBox->currentText() + '*');
- filePattern.setPatternSyntax(QRegExp::Wildcard);
-
- QDir directory(directoryComboBox->currentText());
-
- QStringList allFiles = directory.entryList(QDir::Files | QDir::NoSymLinks);
- QStringList matchingFiles;
-
- foreach (const QString &file, allFiles) {
- if (filePattern.exactMatch(file))
- matchingFiles << file;
- }
- showFiles(matchingFiles);
-}
-
-void FindFileDialog::showFiles(const QStringList &files)
-{
- foundFilesTree->clear();
-
- for (int i = 0; i < files.count(); ++i) {
- QTreeWidgetItem *item = new QTreeWidgetItem(foundFilesTree);
- item->setText(0, files[i]);
- }
-
- if (files.count() > 0)
- foundFilesTree->setCurrentItem(foundFilesTree->topLevelItem(0));
-}
-
-void FindFileDialog::createButtons()
-{
- browseButton = new QToolButton;
- browseButton->setText(tr("..."));
- connect(browseButton, SIGNAL(clicked()), this, SLOT(browse()));
-
- buttonBox = new QDialogButtonBox(QDialogButtonBox::Open
- | QDialogButtonBox::Cancel
- | QDialogButtonBox::Help);
- connect(buttonBox, SIGNAL(accepted()), this, SLOT(openFile()));
- connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
- connect(buttonBox, SIGNAL(helpRequested()), this, SLOT(help()));
-}
-
-void FindFileDialog::createComboBoxes()
-{
- directoryComboBox = new QComboBox;
- fileNameComboBox = new QComboBox;
-
- fileNameComboBox->setEditable(true);
- fileNameComboBox->setSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Preferred);
-
- directoryComboBox->setMinimumContentsLength(30);
- directoryComboBox->setSizeAdjustPolicy(
- QComboBox::AdjustToMinimumContentsLength);
- directoryComboBox->setSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Preferred);
-
- connect(fileNameComboBox, SIGNAL(editTextChanged(QString)),
- this, SLOT(update()));
- connect(directoryComboBox, SIGNAL(currentIndexChanged(QString)),
- this, SLOT(update()));
-}
-
-void FindFileDialog::createFilesTree()
-{
- foundFilesTree = new QTreeWidget;
- foundFilesTree->setColumnCount(1);
- foundFilesTree->setHeaderLabels(QStringList(tr("Matching Files")));
- foundFilesTree->setRootIsDecorated(false);
- foundFilesTree->setSelectionMode(QAbstractItemView::SingleSelection);
-
- connect(foundFilesTree, SIGNAL(itemActivated(QTreeWidgetItem*,int)),
- this, SLOT(openFile(QTreeWidgetItem*)));
-}
-
-void FindFileDialog::createLabels()
-{
- directoryLabel = new QLabel(tr("Search in:"));
- fileNameLabel = new QLabel(tr("File name (including wildcards):"));
-}
-
-void FindFileDialog::createLayout()
-{
- QHBoxLayout *fileLayout = new QHBoxLayout;
- fileLayout->addWidget(fileNameLabel);
- fileLayout->addWidget(fileNameComboBox);
-
- QHBoxLayout *directoryLayout = new QHBoxLayout;
- directoryLayout->addWidget(directoryLabel);
- directoryLayout->addWidget(directoryComboBox);
- directoryLayout->addWidget(browseButton);
-
- QVBoxLayout *mainLayout = new QVBoxLayout;
- mainLayout->addLayout(fileLayout);
- mainLayout->addLayout(directoryLayout);
- mainLayout->addWidget(foundFilesTree);
- mainLayout->addStretch();
- mainLayout->addWidget(buttonBox);
- setLayout(mainLayout);
-}
diff --git a/examples/assistant/simpletextviewer/findfiledialog.h b/examples/assistant/simpletextviewer/findfiledialog.h
deleted file mode 100644
index aac27f1101..0000000000
--- a/examples/assistant/simpletextviewer/findfiledialog.h
+++ /dev/null
@@ -1,99 +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 examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef FINDFILEDIALOG_H
-#define FINDFILEDIALOG_H
-
-#include <QAssistantClient>
-#include <QDialog>
-
-QT_BEGIN_NAMESPACE
-class QComboBox;
-class QDialogButtonBox;
-class QLabel;
-class QTextEdit;
-class QToolButton;
-class QTreeWidget;
-class QTreeWidgetItem;
-QT_END_NAMESPACE
-
-//! [0]
-class FindFileDialog : public QDialog
-{
- Q_OBJECT
-
-public:
- FindFileDialog(QTextEdit *editor, QAssistantClient *assistant,
- QWidget *parent = 0);
-
-private slots:
- void browse();
- void help();
- void openFile(QTreeWidgetItem *item = 0);
- void update();
-
-private:
- void findFiles();
- void showFiles(const QStringList &files);
-
- void createButtons();
- void createComboBoxes();
- void createFilesTree();
- void createLabels();
- void createLayout();
-
- QAssistantClient *currentAssistantClient;
- QTextEdit *currentEditor;
- QTreeWidget *foundFilesTree;
-
- QComboBox *directoryComboBox;
- QComboBox *fileNameComboBox;
-
- QLabel *directoryLabel;
- QLabel *fileNameLabel;
-
- QDialogButtonBox *buttonBox;
-
- QToolButton *browseButton;
-};
-//! [0]
-
-#endif
diff --git a/examples/assistant/simpletextviewer/main.cpp b/examples/assistant/simpletextviewer/main.cpp
deleted file mode 100644
index 6e38406bfc..0000000000
--- a/examples/assistant/simpletextviewer/main.cpp
+++ /dev/null
@@ -1,52 +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 examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QApplication>
-
-#include "mainwindow.h"
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- MainWindow window;
- window.show();
- return app.exec();
-}
diff --git a/examples/assistant/simpletextviewer/mainwindow.cpp b/examples/assistant/simpletextviewer/mainwindow.cpp
deleted file mode 100644
index 03eab02838..0000000000
--- a/examples/assistant/simpletextviewer/mainwindow.cpp
+++ /dev/null
@@ -1,154 +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 examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtGui>
-
-#include "mainwindow.h"
-#include "findfiledialog.h"
-
-//! [0]
-MainWindow::MainWindow()
-{
- textViewer = new QTextEdit;
- textViewer->setReadOnly(true);
- QFile file("documentation/intro.html");
- if (file.open(QIODevice::ReadOnly))
- textViewer->setHtml(file.readAll());
-
- setCentralWidget(textViewer);
-
- createActions();
- createMenus();
-
- initializeAssistant();
-
- setWindowTitle(tr("Simple Text Viewer"));
- resize(750, 400);
-}
-//! [0]
-
-//! [1]
-void MainWindow::closeEvent(QCloseEvent *)
-{
- if (assistantClient)
- assistantClient->closeAssistant();
-}
-//! [1]
-
-void MainWindow::about()
-{
- QMessageBox::about(this, tr("About Simple Text Viewer"),
- tr("This example demonstrates how to use\n" \
- "Qt Assistant as help system for your\n" \
- "own application."));
-}
-
-//! [2]
-void MainWindow::assistant()
-{
- assistantClient->showPage(QLibraryInfo::location(QLibraryInfo::ExamplesPath) +
- QDir::separator() +
- "assistant/simpletextviewer/documentation/index.html");
-}
-//! [2]
-
-//! [3]
-void MainWindow::open()
-{
- FindFileDialog dialog(textViewer, assistantClient);
- dialog.exec();
-}
-//! [3]
-
-void MainWindow::createActions()
-{
- assistantAct = new QAction(tr("Help Contents"), this);
- assistantAct->setShortcuts(QKeySequence::HelpContents);
- connect(assistantAct, SIGNAL(triggered()), this, SLOT(assistant()));
-
- openAct = new QAction(tr("&Open..."), this);
- openAct->setShortcuts(QKeySequence::Open);
- connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
-
- clearAct = new QAction(tr("&Clear"), this);
- clearAct->setShortcut(tr("Ctrl+C"));
- connect(clearAct, SIGNAL(triggered()), textViewer, SLOT(clear()));
-
- exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcuts(QKeySequence::Quit);
- connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
-
- aboutAct = new QAction(tr("&About"), this);
- connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
-
- aboutQtAct = new QAction(tr("About &Qt"), this);
- connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
-}
-
-void MainWindow::createMenus()
-{
- fileMenu = new QMenu(tr("&File"), this);
- fileMenu->addAction(openAct);
- fileMenu->addAction(clearAct);
- fileMenu->addSeparator();
- fileMenu->addAction(exitAct);
-
- helpMenu = new QMenu(tr("&Help"), this);
- helpMenu->addAction(assistantAct);
- helpMenu->addSeparator();
- helpMenu->addAction(aboutAct);
- helpMenu->addAction(aboutQtAct);
-
-
- menuBar()->addMenu(fileMenu);
- menuBar()->addMenu(helpMenu);
-}
-
-//! [4]
-void MainWindow::initializeAssistant()
-{
- assistantClient = new QAssistantClient(QLibraryInfo::location(QLibraryInfo::BinariesPath), this);
-
- QStringList arguments;
- arguments << "-profile" << QString("documentation") + QDir::separator() + QString("simpletextviewer.adp");
- assistantClient->setArguments(arguments);
-}
-//! [4]
diff --git a/examples/assistant/simpletextviewer/mainwindow.h b/examples/assistant/simpletextviewer/mainwindow.h
deleted file mode 100644
index 14f0679e50..0000000000
--- a/examples/assistant/simpletextviewer/mainwindow.h
+++ /dev/null
@@ -1,91 +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 examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include <QAssistantClient>
-#include <QMainWindow>
-#include <QTextEdit>
-
-class MainWindow : public QMainWindow
-{
- Q_OBJECT
-
-public:
- MainWindow();
-
-private slots:
- void about();
-//! [0]
- void assistant();
-//! [0]
- void open();
-
-protected:
-//! [1]
- void closeEvent(QCloseEvent *event);
-//! [1]
-
-private:
- void createActions();
- void createMenus();
-//! [2]
- void initializeAssistant();
-//! [2]
-
-//! [3]
- QAssistantClient *assistantClient;
-//! [3]
- QTextEdit *textViewer;
-
- QMenu *fileMenu;
- QMenu *helpMenu;
-
- QAction *assistantAct;
- QAction *clearAct;
- QAction *openAct;
- QAction *exitAct;
- QAction *aboutAct;
- QAction *aboutQtAct;
-};
-
-#endif
diff --git a/examples/assistant/simpletextviewer/simpletextviewer.pro b/examples/assistant/simpletextviewer/simpletextviewer.pro
deleted file mode 100644
index 2c0eadadbc..0000000000
--- a/examples/assistant/simpletextviewer/simpletextviewer.pro
+++ /dev/null
@@ -1,18 +0,0 @@
-CONFIG += assistant
-
-QT += network
-
-HEADERS = mainwindow.h \
- findfiledialog.h
-SOURCES = main.cpp \
- mainwindow.cpp \
- findfiledialog.cpp
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/assistant/simpletextviewer
-sources.files = $$SOURCES $$HEADERS $$RESOURCES documentation *.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/assistant/simpletextviewer
-INSTALLS += target sources
-
-symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
-
diff --git a/examples/dbus/dbus-chat/chat_adaptor.cpp b/examples/dbus/dbus-chat/chat_adaptor.cpp
index dc07e1cb95..77e7ab081b 100644
--- a/examples/dbus/dbus-chat/chat_adaptor.cpp
+++ b/examples/dbus/dbus-chat/chat_adaptor.cpp
@@ -38,10 +38,10 @@
** $QT_END_LICENSE$
**
**
-** This file was generated by dbusxml2cpp version 0.6
-** Command line was: dbusxml2cpp -i chat_adaptor.h -a :chat_adaptor.cpp com.trolltech.chat.xml
+** This file was generated by qdbusxml2cpp version 0.7
+** Command line was: qdbusxml2cpp -i chat_adaptor.h -a :chat_adaptor.cpp com.trolltech.chat.xml
**
-** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** Do not edit! All changes made to it will be lost.
diff --git a/examples/dbus/dbus-chat/chat_adaptor.h b/examples/dbus/dbus-chat/chat_adaptor.h
index b1e66ad483..47b7f8f6e8 100644
--- a/examples/dbus/dbus-chat/chat_adaptor.h
+++ b/examples/dbus/dbus-chat/chat_adaptor.h
@@ -38,10 +38,10 @@
** $QT_END_LICENSE$
**
**
-** This file was generated by dbusxml2cpp version 0.6
-** Command line was: dbusxml2cpp -a chat_adaptor.h: com.trolltech.chat.xml
+** This file was generated by qdbusxml2cpp version 0.7
+** Command line was: qdbusxml2cpp -a chat_adaptor.h: com.trolltech.chat.xml
**
-** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** This file may have been hand-edited. Look for HAND-EDIT comments
@@ -49,8 +49,8 @@
**
****************************************************************************/
-#ifndef CHAT_ADAPTOR_H_142741156243605
-#define CHAT_ADAPTOR_H_142741156243605
+#ifndef CHAT_ADAPTOR_H_1257535021
+#define CHAT_ADAPTOR_H_1257535021
#include <QtCore/QObject>
#include <QtDBus/QtDBus>
@@ -72,14 +72,14 @@ class ChatAdaptor: public QDBusAbstractAdaptor
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "com.trolltech.chat")
Q_CLASSINFO("D-Bus Introspection", ""
-" <interface name=\"com.trolltech.chat\" >\n"
-" <signal name=\"message\" >\n"
-" <arg direction=\"out\" type=\"s\" name=\"nickname\" />\n"
-" <arg direction=\"out\" type=\"s\" name=\"text\" />\n"
+" <interface name=\"com.trolltech.chat\">\n"
+" <signal name=\"message\">\n"
+" <arg direction=\"out\" type=\"s\" name=\"nickname\"/>\n"
+" <arg direction=\"out\" type=\"s\" name=\"text\"/>\n"
" </signal>\n"
-" <signal name=\"action\" >\n"
-" <arg direction=\"out\" type=\"s\" name=\"nickname\" />\n"
-" <arg direction=\"out\" type=\"s\" name=\"text\" />\n"
+" <signal name=\"action\">\n"
+" <arg direction=\"out\" type=\"s\" name=\"nickname\"/>\n"
+" <arg direction=\"out\" type=\"s\" name=\"text\"/>\n"
" </signal>\n"
" </interface>\n"
"")
diff --git a/examples/dbus/dbus-chat/chat_interface.cpp b/examples/dbus/dbus-chat/chat_interface.cpp
index f187ee0e82..3aba098dfa 100644
--- a/examples/dbus/dbus-chat/chat_interface.cpp
+++ b/examples/dbus/dbus-chat/chat_interface.cpp
@@ -38,10 +38,10 @@
** $QT_END_LICENSE$
**
**
-** This file was generated by dbusxml2cpp version 0.6
-** Command line was: dbusxml2cpp -i chat_interface.h -p :chat_interface.cpp chat/com.trolltech.chat.xml
+** This file was generated by qdbusxml2cpp version 0.7
+** Command line was: qdbusxml2cpp -i chat_interface.h -p :chat_interface.cpp com.trolltech.chat.xml
**
-** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** This file may have been hand-edited. Look for HAND-EDIT comments
diff --git a/examples/dbus/dbus-chat/chat_interface.h b/examples/dbus/dbus-chat/chat_interface.h
index 3bf427b23b..a6aa2df880 100644
--- a/examples/dbus/dbus-chat/chat_interface.h
+++ b/examples/dbus/dbus-chat/chat_interface.h
@@ -38,18 +38,18 @@
** $QT_END_LICENSE$
**
**
-** This file was generated by dbusxml2cpp version 0.6
-** Command line was: dbusxml2cpp -p chat_interface.h: com.trolltech.chat.xml
+** This file was generated by qdbusxml2cpp version 0.7
+** Command line was: qdbusxml2cpp -p chat_interface.h: com.trolltech.chat.xml
**
-** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** Do not edit! All changes made to it will be lost.
**
****************************************************************************/
-#ifndef CHAT_INTERFACE_H_143021156243606
-#define CHAT_INTERFACE_H_143021156243606
+#ifndef CHAT_INTERFACE_H_1257535021
+#define CHAT_INTERFACE_H_1257535021
#include <QtCore/QObject>
#include <QtCore/QByteArray>
diff --git a/examples/dbus/remotecontrolledcar/car/car.pro b/examples/dbus/remotecontrolledcar/car/car.pro
index 9b426d345b..d362dc9fc1 100644
--- a/examples/dbus/remotecontrolledcar/car/car.pro
+++ b/examples/dbus/remotecontrolledcar/car/car.pro
@@ -10,7 +10,7 @@ CONFIG += qdbus
# Input
# DBUS_ADAPTORS += car.xml
-HEADERS += car.h car_adaptor_p.h
+HEADERS += car.h car_adaptor.h
SOURCES += car.cpp main.cpp car_adaptor.cpp
# install
diff --git a/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp b/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp
index bd4832e6f5..da7505b0e8 100644
--- a/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp
+++ b/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp
@@ -38,17 +38,17 @@
** $QT_END_LICENSE$
**
**
-** This file was generated by dbusxml2cpp version 0.6
-** Command line was: dbusxml2cpp -c CarAdaptor -a car_adaptor_p.h:car_adaptor.cpp car.xml
+** This file was generated by qdbusxml2cpp version 0.7
+** Command line was: qdbusxml2cpp -i car_adaptor.h -a :car_adaptor.cpp car.xml
**
-** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** Do not edit! All changes made to it will be lost.
**
****************************************************************************/
-#include "car_adaptor_p.h"
+#include "car_adaptor.h"
#include <QtCore/QMetaObject>
#include <QtCore/QByteArray>
#include <QtCore/QList>
@@ -58,40 +58,40 @@
#include <QtCore/QVariant>
/*
- * Implementation of adaptor class CarAdaptor
+ * Implementation of adaptor class CarInterfaceAdaptor
*/
-CarAdaptor::CarAdaptor(QObject *parent)
+CarInterfaceAdaptor::CarInterfaceAdaptor(QObject *parent)
: QDBusAbstractAdaptor(parent)
{
// constructor
setAutoRelaySignals(true);
}
-CarAdaptor::~CarAdaptor()
+CarInterfaceAdaptor::~CarInterfaceAdaptor()
{
// destructor
}
-void CarAdaptor::accelerate()
+void CarInterfaceAdaptor::accelerate()
{
// handle method call com.trolltech.Examples.CarInterface.accelerate
QMetaObject::invokeMethod(parent(), "accelerate");
}
-void CarAdaptor::decelerate()
+void CarInterfaceAdaptor::decelerate()
{
// handle method call com.trolltech.Examples.CarInterface.decelerate
QMetaObject::invokeMethod(parent(), "decelerate");
}
-void CarAdaptor::turnLeft()
+void CarInterfaceAdaptor::turnLeft()
{
// handle method call com.trolltech.Examples.CarInterface.turnLeft
QMetaObject::invokeMethod(parent(), "turnLeft");
}
-void CarAdaptor::turnRight()
+void CarInterfaceAdaptor::turnRight()
{
// handle method call com.trolltech.Examples.CarInterface.turnRight
QMetaObject::invokeMethod(parent(), "turnRight");
diff --git a/examples/dbus/remotecontrolledcar/car/car_adaptor.h b/examples/dbus/remotecontrolledcar/car/car_adaptor.h
new file mode 100644
index 0000000000..b8b5602209
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/car/car_adaptor.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+**
+** This file was generated by qdbusxml2cpp version 0.7
+** Command line was: qdbusxml2cpp -a car_adaptor.h: car.xml
+**
+** qdbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** This is an auto-generated file.
+** This file may have been hand-edited. Look for HAND-EDIT comments
+** before re-generating it.
+**
+****************************************************************************/
+
+#ifndef CAR_ADAPTOR_H_1264773009
+#define CAR_ADAPTOR_H_1264773009
+
+#include <QtCore/QObject>
+#include <QtDBus/QtDBus>
+
+QT_BEGIN_NAMESPACE
+class QByteArray;
+template<class T> class QList;
+template<class Key, class Value> class QMap;
+class QString;
+class QStringList;
+class QVariant;
+QT_END_NAMESPACE
+
+/*
+ * Adaptor class for interface com.trolltech.Examples.CarInterface
+ */
+class CarInterfaceAdaptor: public QDBusAbstractAdaptor
+{
+ Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "com.trolltech.Examples.CarInterface")
+ Q_CLASSINFO("D-Bus Introspection", ""
+" <interface name=\"com.trolltech.Examples.CarInterface\">\n"
+" <method name=\"accelerate\"/>\n"
+" <method name=\"decelerate\"/>\n"
+" <method name=\"turnLeft\"/>\n"
+" <method name=\"turnRight\"/>\n"
+" <signal name=\"crashed\"/>\n"
+" </interface>\n"
+ "")
+public:
+ CarInterfaceAdaptor(QObject *parent);
+ virtual ~CarInterfaceAdaptor();
+
+public: // PROPERTIES
+public Q_SLOTS: // METHODS
+ void accelerate();
+ void decelerate();
+ void turnLeft();
+ void turnRight();
+Q_SIGNALS: // SIGNALS
+ void crashed();
+};
+
+#endif
diff --git a/examples/dbus/remotecontrolledcar/car/car_adaptor_p.h b/examples/dbus/remotecontrolledcar/car/car_adaptor_p.h
deleted file mode 100644
index 5f769cd621..0000000000
--- a/examples/dbus/remotecontrolledcar/car/car_adaptor_p.h
+++ /dev/null
@@ -1,97 +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 examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-**
-** This file was generated by dbusxml2cpp version 0.6
-** Command line was: dbusxml2cpp -c CarAdaptor -a car_adaptor_p.h:car_adaptor.cpp car.xml
-**
-** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-**
-** This is an auto-generated file.
-** This file may have been hand-edited. Look for HAND-EDIT comments
-** before re-generating it.
-**
-****************************************************************************/
-
-#ifndef CAR_ADAPTOR_P_H_1157030132
-#define CAR_ADAPTOR_P_H_1157030132
-
-#include <QtCore/QObject>
-#include <QtDBus/QtDBus>
-
-QT_BEGIN_NAMESPACE
-class QByteArray;
-template<class T> class QList;
-template<class Key, class Value> class QMap;
-class QString;
-class QStringList;
-class QVariant;
-QT_END_NAMESPACE
-
-/*
- * Adaptor class for interface com.trolltech.Examples.CarInterface
- */
-class CarAdaptor: public QDBusAbstractAdaptor
-{
- Q_OBJECT
- Q_CLASSINFO("D-Bus Interface", "com.trolltech.Examples.CarInterface")
- Q_CLASSINFO("D-Bus Introspection", ""
-" <interface name=\"com.trolltech.Examples.CarInterface\" >\n"
-" <method name=\"accelerate\" />\n"
-" <method name=\"decelerate\" />\n"
-" <method name=\"turnLeft\" />\n"
-" <method name=\"turnRight\" />\n"
-" <signal name=\"crashed\" />\n"
-" </interface>\n"
- "")
-public:
- CarAdaptor(QObject *parent);
- virtual ~CarAdaptor();
-
-public: // PROPERTIES
-public Q_SLOTS: // METHODS
- void accelerate();
- void decelerate();
- void turnLeft();
- void turnRight();
-Q_SIGNALS: // SIGNALS
- void crashed();
-};
-
-#endif
diff --git a/examples/dbus/remotecontrolledcar/car/main.cpp b/examples/dbus/remotecontrolledcar/car/main.cpp
index 85b206c474..eab82a7155 100644
--- a/examples/dbus/remotecontrolledcar/car/main.cpp
+++ b/examples/dbus/remotecontrolledcar/car/main.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include "car.h"
-#include "car_adaptor_p.h"
+#include "car_adaptor.h"
#include <QtGui/QApplication>
#include <QtGui/QGraphicsView>
#include <QtGui/QGraphicsScene>
@@ -64,7 +64,7 @@ int main(int argc, char *argv[])
view.resize(400, 300);
view.show();
- new CarAdaptor(car);
+ new CarInterfaceAdaptor(car);
QDBusConnection connection = QDBusConnection::sessionBus();
connection.registerObject("/Car", car);
connection.registerService("com.trolltech.CarExample");
diff --git a/examples/dbus/remotecontrolledcar/controller/car_interface.cpp b/examples/dbus/remotecontrolledcar/controller/car_interface.cpp
index 01be1bfaa7..21662b434f 100644
--- a/examples/dbus/remotecontrolledcar/controller/car_interface.cpp
+++ b/examples/dbus/remotecontrolledcar/controller/car_interface.cpp
@@ -38,10 +38,10 @@
** $QT_END_LICENSE$
**
**
-** This file was generated by dbusxml2cpp version 0.6
-** Command line was: dbusxml2cpp -c CarInterface -p car_interface_p.h:car_interface.cpp car.xml
+** This file was generated by qdbusxml2cpp version 0.7
+** Command line was: qdbusxml2cpp -i car_interface.h -p :car_interface.cpp car.xml
**
-** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** qqdbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** This file may have been hand-edited. Look for HAND-EDIT comments
@@ -49,18 +49,17 @@
**
****************************************************************************/
-#include "car_interface_p.h"
-
+#include "car_interface.h"
/*
- * Implementation of interface class CarInterface
+ * Implementation of interface class ComTrolltechExamplesCarInterfaceInterface
*/
-CarInterface::CarInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
+ComTrolltechExamplesCarInterfaceInterface::ComTrolltechExamplesCarInterfaceInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
{
}
-CarInterface::~CarInterface()
+ComTrolltechExamplesCarInterfaceInterface::~ComTrolltechExamplesCarInterfaceInterface()
{
}
diff --git a/examples/dbus/remotecontrolledcar/controller/car_interface.h b/examples/dbus/remotecontrolledcar/controller/car_interface.h
new file mode 100644
index 0000000000..228481cfb3
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/car_interface.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+**
+** This file was generated by qdbusxml2cpp version 0.7
+** Command line was: qdbusxml2cpp -p car_interface.h: car.xml
+**
+** qdbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** This is an auto-generated file.
+** Do not edit! All changes made to it will be lost.
+**
+****************************************************************************/
+
+#ifndef CAR_INTERFACE_H_1264772826
+#define CAR_INTERFACE_H_1264772826
+
+#include <QtCore/QObject>
+#include <QtCore/QByteArray>
+#include <QtCore/QList>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QVariant>
+#include <QtDBus/QtDBus>
+
+/*
+ * Proxy class for interface com.trolltech.Examples.CarInterface
+ */
+class ComTrolltechExamplesCarInterfaceInterface: public QDBusAbstractInterface
+{
+ Q_OBJECT
+public:
+ static inline const char *staticInterfaceName()
+ { return "com.trolltech.Examples.CarInterface"; }
+
+public:
+ ComTrolltechExamplesCarInterfaceInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
+
+ ~ComTrolltechExamplesCarInterfaceInterface();
+
+public Q_SLOTS: // METHODS
+ inline QDBusPendingReply<> accelerate()
+ {
+ QList<QVariant> argumentList;
+ return asyncCallWithArgumentList(QLatin1String("accelerate"), argumentList);
+ }
+
+ inline QDBusPendingReply<> decelerate()
+ {
+ QList<QVariant> argumentList;
+ return asyncCallWithArgumentList(QLatin1String("decelerate"), argumentList);
+ }
+
+ inline QDBusPendingReply<> turnLeft()
+ {
+ QList<QVariant> argumentList;
+ return asyncCallWithArgumentList(QLatin1String("turnLeft"), argumentList);
+ }
+
+ inline QDBusPendingReply<> turnRight()
+ {
+ QList<QVariant> argumentList;
+ return asyncCallWithArgumentList(QLatin1String("turnRight"), argumentList);
+ }
+
+Q_SIGNALS: // SIGNALS
+ void crashed();
+};
+
+namespace com {
+ namespace trolltech {
+ namespace Examples {
+ typedef ::ComTrolltechExamplesCarInterfaceInterface CarInterface;
+ }
+ }
+}
+#endif
diff --git a/examples/dbus/remotecontrolledcar/controller/car_interface_p.h b/examples/dbus/remotecontrolledcar/controller/car_interface_p.h
deleted file mode 100644
index 8a5a90727a..0000000000
--- a/examples/dbus/remotecontrolledcar/controller/car_interface_p.h
+++ /dev/null
@@ -1,114 +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 examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-**
-** This file was generated by dbusxml2cpp version 0.6
-** Command line was: dbusxml2cpp -c CarInterface -p car_interface_p.h:car_interface.cpp car.xml
-**
-** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-**
-** This is an auto-generated file.
-** Do not edit! All changes made to it will be lost.
-**
-****************************************************************************/
-
-#ifndef CAR_INTERFACE_P_H_1156853585
-#define CAR_INTERFACE_P_H_1156853585
-
-#include <QtCore/QObject>
-#include <QtCore/QByteArray>
-#include <QtCore/QList>
-#include <QtCore/QMap>
-#include <QtCore/QString>
-#include <QtCore/QStringList>
-#include <QtCore/QVariant>
-#include <QtDBus/QtDBus>
-
-/*
- * Proxy class for interface com.trolltech.Examples.CarInterface
- */
-class CarInterface: public QDBusAbstractInterface
-{
- Q_OBJECT
-public:
- static inline const char *staticInterfaceName()
- { return "com.trolltech.Examples.CarInterface"; }
-
-public:
- CarInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
-
- ~CarInterface();
-
-public Q_SLOTS: // METHODS
- inline QDBusReply<void> accelerate()
- {
- QList<QVariant> argumentList;
- return callWithArgumentList(QDBus::Block, QLatin1String("accelerate"), argumentList);
- }
-
- inline QDBusReply<void> decelerate()
- {
- QList<QVariant> argumentList;
- return callWithArgumentList(QDBus::Block, QLatin1String("decelerate"), argumentList);
- }
-
- inline QDBusReply<void> turnLeft()
- {
- QList<QVariant> argumentList;
- return callWithArgumentList(QDBus::Block, QLatin1String("turnLeft"), argumentList);
- }
-
- inline QDBusReply<void> turnRight()
- {
- QList<QVariant> argumentList;
- return callWithArgumentList(QDBus::Block, QLatin1String("turnRight"), argumentList);
- }
-
-Q_SIGNALS: // SIGNALS
- void crashed();
-};
-
-namespace com {
- namespace trolltech {
- namespace Examples {
- typedef ::CarInterface CarInterface;
- }
- }
-}
-#endif
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.cpp b/examples/dbus/remotecontrolledcar/controller/controller.cpp
index 00a887501c..5fca9e3217 100644
--- a/examples/dbus/remotecontrolledcar/controller/controller.cpp
+++ b/examples/dbus/remotecontrolledcar/controller/controller.cpp
@@ -42,13 +42,13 @@
#include <QtGui>
#include "controller.h"
-#include "car_interface_p.h"
+#include "car_interface.h"
Controller::Controller(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);
- car = new CarInterface("com.trolltech.CarExample", "/Car",
+ car = new com::trolltech::Examples::CarInterface("com.trolltech.CarExample", "/Car",
QDBusConnection::sessionBus(), this);
startTimer(1000);
}
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.h b/examples/dbus/remotecontrolledcar/controller/controller.h
index 07a1355c63..caadff93c4 100644
--- a/examples/dbus/remotecontrolledcar/controller/controller.h
+++ b/examples/dbus/remotecontrolledcar/controller/controller.h
@@ -43,8 +43,7 @@
#define CONTROLLER_H
#include "ui_controller.h"
-
-class CarInterface;
+#include "car_interface.h"
class Controller : public QWidget
{
@@ -64,7 +63,7 @@ private slots:
private:
Ui::Controller ui;
- CarInterface *car;
+ com::trolltech::Examples::CarInterface *car;
};
#endif
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.pro b/examples/dbus/remotecontrolledcar/controller/controller.pro
index 159e3b15db..375b9d7f3f 100644
--- a/examples/dbus/remotecontrolledcar/controller/controller.pro
+++ b/examples/dbus/remotecontrolledcar/controller/controller.pro
@@ -11,7 +11,7 @@ CONFIG += qdbus
# Input
# DBUS_INTERFACES += car.xml
FORMS += controller.ui
-HEADERS += car_interface_p.h controller.h
+HEADERS += car_interface.h controller.h
SOURCES += main.cpp car_interface.cpp controller.cpp
# install
diff --git a/examples/declarative/animations/color-animation.qml b/examples/declarative/animations/color-animation.qml
new file mode 100644
index 0000000000..674052281e
--- /dev/null
+++ b/examples/declarative/animations/color-animation.qml
@@ -0,0 +1,70 @@
+import Qt 4.6
+
+Item {
+ id: window
+ width: 640; height: 480
+
+ // Let's draw the sky...
+ Rectangle {
+ anchors { left: parent.left; top: parent.top; right: parent.right; bottom: parent.verticalCenter }
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ SequentialAnimation on color {
+ repeat: true
+ ColorAnimation { from: "DeepSkyBlue"; to: "#0E1533"; duration: 5000 }
+ ColorAnimation { from: "#0E1533"; to: "DeepSkyBlue"; duration: 5000 }
+ }
+ }
+ GradientStop {
+ position: 1.0
+ SequentialAnimation on color {
+ repeat: true
+ ColorAnimation { from: "SkyBlue"; to: "#437284"; duration: 5000 }
+ ColorAnimation { from: "#437284"; to: "SkyBlue"; duration: 5000 }
+ }
+ }
+ }
+ }
+
+ // the sun, moon, and stars
+ Item {
+ width: parent.width; height: 2 * parent.height
+ transformOrigin: Item.Center
+ NumberAnimation on rotation { from: 0; to: 360; duration: 10000; repeat: true }
+ Image {
+ source: "images/sun.png"; y: 10; anchors.horizontalCenter: parent.horizontalCenter
+ transformOrigin: Item.Center; rotation: -3 * parent.rotation
+ }
+ Image {
+ source: "images/moon.png"; y: parent.height - 74; anchors.horizontalCenter: parent.horizontalCenter
+ transformOrigin: Item.Center; rotation: -parent.rotation
+ }
+ Particles {
+ x: 0; y: parent.height/2; width: parent.width; height: parent.height/2
+ source: "images/star.png"; angleDeviation: 360; velocity: 0
+ velocityDeviation: 0; count: parent.width / 10; fadeInDuration: 2800
+ SequentialAnimation on opacity {
+ repeat: true
+ NumberAnimation { from: 0; to: 1; duration: 5000 }
+ NumberAnimation { from: 1; to: 0; duration: 5000 }
+ }
+ }
+ }
+
+ // ...and the ground.
+ Rectangle {
+ anchors { left: parent.left; top: parent.verticalCenter; right: parent.right; bottom: parent.bottom }
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ SequentialAnimation on color {
+ repeat: true
+ ColorAnimation { from: "ForestGreen"; to: "#001600"; duration: 5000 }
+ ColorAnimation { from: "#001600"; to: "ForestGreen"; duration: 5000 }
+ }
+ }
+ GradientStop { position: 1.0; color: "DarkGreen" }
+ }
+ }
+}
diff --git a/examples/declarative/animations/easing.qml b/examples/declarative/animations/easing.qml
new file mode 100644
index 0000000000..8f2655e5a7
--- /dev/null
+++ b/examples/declarative/animations/easing.qml
@@ -0,0 +1,99 @@
+import Qt 4.6
+
+Rectangle {
+ id: window
+ width: 600; height: 460; color: "#232323"
+
+ ListModel {
+ id: easingTypes
+ ListElement { type: "Linear"; ballColor: "DarkRed" }
+ ListElement { type: "InQuad"; ballColor: "IndianRed" }
+ ListElement { type: "OutQuad"; ballColor: "Salmon" }
+ ListElement { type: "InOutQuad"; ballColor: "Tomato" }
+ ListElement { type: "OutInQuad"; ballColor: "DarkOrange" }
+ ListElement { type: "InCubic"; ballColor: "Gold" }
+ ListElement { type: "OutCubic"; ballColor: "Yellow" }
+ ListElement { type: "InOutCubic"; ballColor: "PeachPuff" }
+ ListElement { type: "OutInCubic"; ballColor: "Thistle" }
+ ListElement { type: "InQuart"; ballColor: "Orchid" }
+ ListElement { type: "OutQuart"; ballColor: "Purple" }
+ ListElement { type: "InOutQuart"; ballColor: "SlateBlue" }
+ ListElement { type: "OutInQuart"; ballColor: "Chartreuse" }
+ ListElement { type: "InQuint"; ballColor: "LimeGreen" }
+ ListElement { type: "OutQuint"; ballColor: "SeaGreen" }
+ ListElement { type: "InOutQuint"; ballColor: "DarkGreen" }
+ ListElement { type: "OutInQuint"; ballColor: "Olive" }
+ ListElement { type: "InSine"; ballColor: "DarkSeaGreen" }
+ ListElement { type: "OutSine"; ballColor: "Teal" }
+ ListElement { type: "InOutSine"; ballColor: "Turquoise" }
+ ListElement { type: "OutInSine"; ballColor: "SteelBlue" }
+ ListElement { type: "InExpo"; ballColor: "SkyBlue" }
+ ListElement { type: "OutExpo"; ballColor: "RoyalBlue" }
+ ListElement { type: "InOutExpo"; ballColor: "MediumBlue" }
+ ListElement { type: "OutInExpo"; ballColor: "MidnightBlue" }
+ ListElement { type: "InCirc"; ballColor: "CornSilk" }
+ ListElement { type: "OutCirc"; ballColor: "Bisque" }
+ ListElement { type: "InOutCirc"; ballColor: "RosyBrown" }
+ ListElement { type: "OutInCirc"; ballColor: "SandyBrown" }
+ ListElement { type: "InElastic"; ballColor: "DarkGoldenRod" }
+ ListElement { type: "OutElastic"; ballColor: "Chocolate" }
+ ListElement { type: "InOutElastic"; ballColor: "SaddleBrown" }
+ ListElement { type: "OutInElastic"; ballColor: "Brown" }
+ ListElement { type: "InBack"; ballColor: "Maroon" }
+ ListElement { type: "OutBack"; ballColor: "LavenderBlush" }
+ ListElement { type: "InOutBack"; ballColor: "MistyRose" }
+ ListElement { type: "OutInBack"; ballColor: "Gainsboro" }
+ ListElement { type: "OutBounce"; ballColor: "Silver" }
+ ListElement { type: "InBounce"; ballColor: "DimGray" }
+ ListElement { type: "InOutBounce"; ballColor: "SlateGray" }
+ ListElement { type: "OutInBounce"; ballColor: "DarkSlateGray" }
+ }
+
+ Component {
+ id: delegate
+
+ Item {
+ height: 42; width: window.width
+ Text { text: type; anchors.centerIn: parent; color: "White" }
+ Rectangle {
+ id: slot1; color: "#121212"; x: 30; height: 32; width: 32
+ border.color: "#343434"; border.width: 1; radius: 8; anchors.verticalCenter: parent.verticalCenter
+ }
+ Rectangle {
+ id: slot2; color: "#121212"; x: window.width - 62; height: 32; width: 32
+ border.color: "#343434"; border.width: 1; radius: 8; anchors.verticalCenter: parent.verticalCenter
+ }
+ Rectangle {
+ id: rect; x: 30; color: "#454545"
+ border.color: "White"; border.width: 2
+ height: 32; width: 32; radius: 8; anchors.verticalCenter: parent.verticalCenter
+
+ MouseArea {
+ onClicked: if (rect.state == '') rect.state = "right"; else rect.state = ''
+ anchors.fill: parent
+ }
+
+ states : State {
+ name: "right"
+ PropertyChanges { target: rect; x: window.width - 62; color: ballColor }
+ }
+
+ transitions: Transition {
+ ParallelAnimation {
+ NumberAnimation { properties: "x"; easing.type: type; duration: 1000 }
+ ColorAnimation { properties: "color"; easing.type: type; duration: 1000 }
+ }
+ }
+ }
+ }
+ }
+
+ Flickable {
+ anchors.fill: parent; contentHeight: layout.height
+ Column {
+ id: layout
+ anchors.left: parent.left; anchors.right: parent.right
+ Repeater { model: easingTypes; delegate: delegate }
+ }
+ }
+}
diff --git a/examples/declarative/animations/images/face-smile.png b/examples/declarative/animations/images/face-smile.png
new file mode 100644
index 0000000000..3d66d72578
--- /dev/null
+++ b/examples/declarative/animations/images/face-smile.png
Binary files differ
diff --git a/examples/declarative/animations/images/moon.png b/examples/declarative/animations/images/moon.png
new file mode 100644
index 0000000000..9407b2b4f0
--- /dev/null
+++ b/examples/declarative/animations/images/moon.png
Binary files differ
diff --git a/examples/declarative/animations/images/shadow.png b/examples/declarative/animations/images/shadow.png
new file mode 100644
index 0000000000..8270565e87
--- /dev/null
+++ b/examples/declarative/animations/images/shadow.png
Binary files differ
diff --git a/examples/declarative/animations/images/star.png b/examples/declarative/animations/images/star.png
new file mode 100644
index 0000000000..27ef924267
--- /dev/null
+++ b/examples/declarative/animations/images/star.png
Binary files differ
diff --git a/examples/declarative/animations/images/sun.png b/examples/declarative/animations/images/sun.png
new file mode 100644
index 0000000000..7713ca5ce7
--- /dev/null
+++ b/examples/declarative/animations/images/sun.png
Binary files differ
diff --git a/examples/declarative/animations/property-animation.qml b/examples/declarative/animations/property-animation.qml
new file mode 100644
index 0000000000..4428f34e7d
--- /dev/null
+++ b/examples/declarative/animations/property-animation.qml
@@ -0,0 +1,64 @@
+import Qt 4.6
+
+Item {
+ id: window
+ width: 320; height: 480
+
+ // Let's draw the sky...
+ Rectangle {
+ anchors { left: parent.left; top: parent.top; right: parent.right; bottom: parent.verticalCenter }
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "DeepSkyBlue" }
+ GradientStop { position: 1.0; color: "LightSkyBlue" }
+ }
+ }
+
+ // ...and the ground.
+ Rectangle {
+ anchors { left: parent.left; top: parent.verticalCenter; right: parent.right; bottom: parent.bottom }
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "ForestGreen" }
+ GradientStop { position: 1.0; color: "DarkGreen" }
+ }
+ }
+
+ // The shadow for the smiley face
+ Image {
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "images/shadow.png"; y: smiley.minHeight + 58
+ transformOrigin: Item.Center
+
+ // The scale property depends on the y position of the smiley face.
+ scale: smiley.y * 0.5 / (smiley.minHeight - smiley.maxHeight)
+ }
+
+ Image {
+ id: smiley
+ property int maxHeight: window.height / 3
+ property int minHeight: 2 * window.height / 3
+
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "images/face-smile.png"; y: minHeight
+
+ // Animate the y property. Setting repeat to true makes the
+ // animation repeat indefinitely, otherwise it would only run once.
+ SequentialAnimation on y {
+ repeat: true
+
+ // Move from minHeight to maxHeight in 300ms, using the OutExpo easing function
+ NumberAnimation {
+ from: smiley.minHeight; to: smiley.maxHeight
+ easing.type: "OutExpo"; duration: 300
+ }
+
+ // Then move back to minHeight in 1 second, using the OutBounce easing function
+ NumberAnimation {
+ from: smiley.maxHeight; to: smiley.minHeight
+ easing.type: "OutBounce"; duration: 1000
+ }
+
+ // Then pause for 500ms
+ PauseAnimation { duration: 500 }
+ }
+ }
+}
diff --git a/examples/declarative/aspectratio/face_fit.qml b/examples/declarative/aspectratio/face_fit.qml
new file mode 100644
index 0000000000..6a031a4bd8
--- /dev/null
+++ b/examples/declarative/aspectratio/face_fit.qml
@@ -0,0 +1,26 @@
+import Qt 4.6
+
+// Here, we implement a hybrid of the "scale to fit" and "scale and crop"
+// behaviours which will crop up to 25% from *one* dimension if necessary
+// to fully scale the other. This is a realistic algorithm, for example
+// when the edges of the image contain less vital information than the
+// center - such as a face.
+//
+Rectangle {
+ // default size: whole image, unscaled
+ width: face.width
+ height: face.height
+ color: "gray"
+ clip: true
+
+ Image {
+ id: face
+ smooth: true
+ anchors.centerIn: parent
+ source: "pics/face.png"
+ x: (parent.width-width*scale)/2
+ y: (parent.height-height*scale)/2
+ scale: Math.max(Math.min(parent.width/width*1.333,parent.height/height),
+ Math.min(parent.width/width,parent.height/height*1.333))
+ }
+}
diff --git a/examples/declarative/aspectratio/face_fit_animated.qml b/examples/declarative/aspectratio/face_fit_animated.qml
new file mode 100644
index 0000000000..79e99e9cbb
--- /dev/null
+++ b/examples/declarative/aspectratio/face_fit_animated.qml
@@ -0,0 +1,28 @@
+import Qt 4.6
+
+// Here, we extend the "face_fit" example with animation to show how truly
+// diverse and usage-specific behaviours are made possible by NOT putting a
+// hard-coded aspect ratio feature into the Image primitive.
+//
+Rectangle {
+ // default size: whole image, unscaled
+ width: face.width
+ height: face.height
+ color: "gray"
+ clip: true
+
+ Image {
+ id: face
+ smooth: true
+ anchors.centerIn: parent
+ source: "pics/face.png"
+ x: (parent.width-width*scale)/2
+ y: (parent.height-height*scale)/2
+ SpringFollow on scale {
+ source: Math.max(Math.min(face.parent.width/face.width*1.333,face.parent.height/face.height),
+ Math.min(face.parent.width/face.width,face.parent.height/face.height*1.333))
+ spring: 1
+ damping: 0.05
+ }
+ }
+}
diff --git a/examples/declarative/aspectratio/pics/face.png b/examples/declarative/aspectratio/pics/face.png
new file mode 100644
index 0000000000..3d66d72578
--- /dev/null
+++ b/examples/declarative/aspectratio/pics/face.png
Binary files differ
diff --git a/examples/declarative/aspectratio/scale_and_crop.qml b/examples/declarative/aspectratio/scale_and_crop.qml
new file mode 100644
index 0000000000..2e2b6ed3eb
--- /dev/null
+++ b/examples/declarative/aspectratio/scale_and_crop.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+
+// Here, we implement "Scale and Crop" behaviour.
+//
+Rectangle {
+ // default size: whole image, unscaled
+ width: face.width
+ height: face.height
+ color: "gray"
+ clip: true
+
+ Image {
+ id: face
+ smooth: true
+ anchors.centerIn: parent
+ source: "pics/face.png"
+ x: (parent.width-width*scale)/2
+ y: (parent.height-height*scale)/2
+ scale: Math.max(parent.width/width,parent.height/height)
+ }
+}
diff --git a/examples/declarative/aspectratio/scale_and_crop_simple.qml b/examples/declarative/aspectratio/scale_and_crop_simple.qml
new file mode 100644
index 0000000000..e720ce7793
--- /dev/null
+++ b/examples/declarative/aspectratio/scale_and_crop_simple.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+// Here, we implement "Scale to Fit" behaviour, using the
+// fillMode property.
+//
+Rectangle {
+ // default size: whole image, unscaled
+ width: face.width
+ height: face.height
+ color: "gray"
+ clip: true
+
+ Image {
+ id: face
+ smooth: true
+ source: "pics/face.png"
+ fillMode: Image.PreserveAspectCrop
+ anchors.fill: parent
+ }
+}
diff --git a/examples/declarative/aspectratio/scale_and_sidecrop.qml b/examples/declarative/aspectratio/scale_and_sidecrop.qml
new file mode 100644
index 0000000000..8230e49545
--- /dev/null
+++ b/examples/declarative/aspectratio/scale_and_sidecrop.qml
@@ -0,0 +1,22 @@
+import Qt 4.6
+
+// Here, we implement a variant of "Scale and Crop" behaviour, where we
+// crop the sides if necessary to fully fit vertically, but not the reverse.
+//
+Rectangle {
+ // default size: whole image, unscaled
+ width: face.width
+ height: face.height
+ color: "gray"
+ clip: true
+
+ Image {
+ id: face
+ smooth: true
+ anchors.centerIn: parent
+ source: "pics/face.png"
+ x: (parent.width-width*scale)/2
+ y: (parent.height-height*scale)/2
+ scale: parent.height/height
+ }
+}
diff --git a/examples/declarative/aspectratio/scale_to_fit.qml b/examples/declarative/aspectratio/scale_to_fit.qml
new file mode 100644
index 0000000000..eae4d163df
--- /dev/null
+++ b/examples/declarative/aspectratio/scale_to_fit.qml
@@ -0,0 +1,22 @@
+import Qt 4.6
+
+// Here, we implement "Scale to Fit" behaviour "manually", rather
+// than using the preserveAspect property.
+//
+Rectangle {
+ // default size: whole image, unscaled
+ width: face.width
+ height: face.height
+ color: "gray"
+ clip: true
+
+ Image {
+ id: face
+ smooth: true
+ anchors.centerIn: parent
+ source: "pics/face.png"
+ x: (parent.width-width*scale)/2
+ y: (parent.height-height*scale)/2
+ scale: Math.min(parent.width/width,parent.height/height)
+ }
+}
diff --git a/examples/declarative/aspectratio/scale_to_fit_simple.qml b/examples/declarative/aspectratio/scale_to_fit_simple.qml
new file mode 100644
index 0000000000..7389581613
--- /dev/null
+++ b/examples/declarative/aspectratio/scale_to_fit_simple.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+// Here, we implement "Scale to Fit" behaviour, using the
+// fillMode property.
+//
+Rectangle {
+ // default size: whole image, unscaled
+ width: face.width
+ height: face.height
+ color: "gray"
+ clip: true
+
+ Image {
+ id: face
+ smooth: true
+ source: "pics/face.png"
+ fillMode: Image.PreserveAspectFit
+ anchors.fill: parent
+ }
+}
diff --git a/examples/declarative/behaviours/SideRect.qml b/examples/declarative/behaviours/SideRect.qml
new file mode 100644
index 0000000000..63b7db22d2
--- /dev/null
+++ b/examples/declarative/behaviours/SideRect.qml
@@ -0,0 +1,17 @@
+import Qt 4.6
+
+Rectangle {
+ id: myRect
+
+ property string text
+
+ color: "black"
+ width: 75; height: 50
+ radius: 5
+ border.width: 10; border.color: "white";
+ MouseArea {
+ anchors.fill: parent
+ hoverEnabled: true
+ onEntered: { focusRect.x = myRect.x; focusRect.y = myRect.y; focusRect.text = myRect.text }
+ }
+}
diff --git a/examples/declarative/behaviours/behavior.qml b/examples/declarative/behaviours/behavior.qml
new file mode 100644
index 0000000000..c84bf62e75
--- /dev/null
+++ b/examples/declarative/behaviours/behavior.qml
@@ -0,0 +1,72 @@
+import Qt 4.6
+
+Rectangle {
+ color: "black"
+ width: 400; height: 400
+
+ Rectangle {
+ color: "transparent"
+ anchors.centerIn: parent
+ width: 200; height: 200
+ radius: 30
+ border.width: 10; border.color: "white";
+
+ SideRect {
+ id: leftRect
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.left
+ text: "Left"
+ }
+
+ SideRect {
+ id: rightRect
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.right
+ text: "Right"
+ }
+
+ SideRect {
+ id: topRect
+ anchors.verticalCenter: parent.top
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: "Top"
+ }
+
+ SideRect {
+ id: bottomRect
+ anchors.verticalCenter: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: "Bottom"
+ }
+
+
+ Rectangle {
+ id: focusRect
+
+ property string text
+
+ color: "red"
+ width: 75; height: 50
+ radius: 5
+ border.width: 10; border.color: "white";
+ x: 100-37; y: 100-25
+ Behavior on x { NumberAnimation { duration: 300 } }
+ Behavior on y { NumberAnimation { duration: 300 } }
+ Text {
+ id: focusText
+ text: focusRect.text;
+ Behavior on text {
+ SequentialAnimation {
+ NumberAnimation { target: focusText; property: "opacity"; to: 0; duration: 150 }
+ PropertyAction {}
+ NumberAnimation { target: focusText; property: "opacity"; to: 1; duration: 150 }
+ }
+ }
+ anchors.centerIn: parent;
+ color: "white";
+ font.pixelSize: 16
+ font.bold: true
+ }
+ }
+ }
+}
diff --git a/examples/declarative/border-image/animated.qml b/examples/declarative/border-image/animated.qml
new file mode 100644
index 0000000000..29c02b3d56
--- /dev/null
+++ b/examples/declarative/border-image/animated.qml
@@ -0,0 +1,55 @@
+import Qt 4.6
+import "content"
+
+Rectangle {
+ id: page
+ color: "white"
+ width: 1030; height: 540
+
+ MyBorderImage {
+ x: 20; y: 20; minWidth: 120; maxWidth: 240
+ minHeight: 120; maxHeight: 240
+ source: "content/colors.png"; margin: 30
+ }
+ MyBorderImage {
+ x: 270; y: 20; minWidth: 120; maxWidth: 240
+ minHeight: 120; maxHeight: 240
+ source: "content/colors.png"; margin: 30
+ horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
+ }
+ MyBorderImage {
+ x: 520; y: 20; minWidth: 120; maxWidth: 240
+ minHeight: 120; maxHeight: 240
+ source: "content/colors.png"; margin: 30
+ horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
+ }
+ MyBorderImage {
+ x: 770; y: 20; minWidth: 120; maxWidth: 240
+ minHeight: 120; maxHeight: 240
+ source: "content/colors.png"; margin: 30
+ horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
+ }
+ MyBorderImage {
+ x: 20; y: 280; minWidth: 60; maxWidth: 200
+ minHeight: 40; maxHeight: 200
+ source: "content/bw.png"; margin: 10
+ }
+ MyBorderImage {
+ x: 270; y: 280; minWidth: 60; maxWidth: 200
+ minHeight: 40; maxHeight: 200
+ source: "content/bw.png"; margin: 10
+ horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
+ }
+ MyBorderImage {
+ x: 520; y: 280; minWidth: 60; maxWidth: 200
+ minHeight: 40; maxHeight: 200
+ source: "content/bw.png"; margin: 10
+ horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
+ }
+ MyBorderImage {
+ x: 770; y: 280; minWidth: 60; maxWidth: 200
+ minHeight: 40; maxHeight: 200
+ source: "content/bw.png"; margin: 10
+ horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
+ }
+}
diff --git a/examples/declarative/border-image/borders.qml b/examples/declarative/border-image/borders.qml
new file mode 100644
index 0000000000..98794165f2
--- /dev/null
+++ b/examples/declarative/border-image/borders.qml
@@ -0,0 +1,18 @@
+import Qt 4.6
+
+Rectangle {
+ id: page
+ color: "white"
+ width: 520; height: 280
+
+ BorderImage {
+ x: 20; y: 20; width: 230; height: 240
+ smooth: true
+ source: "content/colors-stretch.sci"
+ }
+ BorderImage {
+ x: 270; y: 20; width: 230; height: 240
+ smooth: true
+ source: "content/colors-round.sci"
+ }
+}
diff --git a/examples/declarative/border-image/content/MyBorderImage.qml b/examples/declarative/border-image/content/MyBorderImage.qml
new file mode 100644
index 0000000000..5621e18bef
--- /dev/null
+++ b/examples/declarative/border-image/content/MyBorderImage.qml
@@ -0,0 +1,37 @@
+import Qt 4.6
+
+Item {
+ property alias horizontalMode: image.horizontalTileMode
+ property alias verticalMode: image.verticalTileMode
+ property alias source: image.source
+
+ property int minWidth
+ property int minHeight
+ property int maxWidth
+ property int maxHeight
+ property int margin
+
+ id: container
+ width: 240; height: 240
+
+ BorderImage {
+ id: image; x: container.width / 2 - width / 2; y: container.height / 2 - height / 2
+
+ SequentialAnimation on width {
+ repeat: true
+ NumberAnimation { from: container.minWidth; to: container.maxWidth; duration: 2000; easing.type: "InOutQuad"}
+ NumberAnimation { from: container.maxWidth; to: container.minWidth; duration: 2000; easing.type: "InOutQuad" }
+ }
+
+ SequentialAnimation on height {
+ repeat: true
+ NumberAnimation { from: container.minHeight; to: container.maxHeight; duration: 2000; easing.type: "InOutQuad"}
+ NumberAnimation { from: container.maxHeight; to: container.minHeight; duration: 2000; easing.type: "InOutQuad" }
+ }
+
+ border.top: container.margin
+ border.left: container.margin
+ border.bottom: container.margin
+ border.right: container.margin
+ }
+}
diff --git a/examples/declarative/border-image/content/bw.png b/examples/declarative/border-image/content/bw.png
new file mode 100644
index 0000000000..486eaae96e
--- /dev/null
+++ b/examples/declarative/border-image/content/bw.png
Binary files differ
diff --git a/examples/declarative/border-image/content/colors-round.sci b/examples/declarative/border-image/content/colors-round.sci
new file mode 100644
index 0000000000..506f6f5f99
--- /dev/null
+++ b/examples/declarative/border-image/content/colors-round.sci
@@ -0,0 +1,7 @@
+border.left:30
+border.top:30
+border.right:30
+border.bottom:30
+horizontalTileRule:Round
+verticalTileRule:Round
+source:colors.png
diff --git a/examples/declarative/border-image/content/colors-stretch.sci b/examples/declarative/border-image/content/colors-stretch.sci
new file mode 100644
index 0000000000..e4989a723c
--- /dev/null
+++ b/examples/declarative/border-image/content/colors-stretch.sci
@@ -0,0 +1,5 @@
+border.left:30
+border.top:30
+border.right:30
+border.bottom:30
+source:colors.png
diff --git a/examples/declarative/border-image/content/colors.png b/examples/declarative/border-image/content/colors.png
new file mode 100644
index 0000000000..dfb62f3d64
--- /dev/null
+++ b/examples/declarative/border-image/content/colors.png
Binary files differ
diff --git a/examples/declarative/clocks/clocks.qml b/examples/declarative/clocks/clocks.qml
new file mode 100644
index 0000000000..624748a728
--- /dev/null
+++ b/examples/declarative/clocks/clocks.qml
@@ -0,0 +1,15 @@
+import Qt 4.6
+import "content"
+
+Rectangle {
+ width: childrenRect.width
+ height: childrenRect.height
+ color: "#646464"
+
+ Grid {
+ columns: 3
+ Clock { city: "New York"; shift: -4 }
+ Clock { city: "Mumbai"; shift: 5.5 }
+ Clock { city: "Tokyo"; shift: 9 }
+ }
+}
diff --git a/examples/declarative/clocks/content/Clock.qml b/examples/declarative/clocks/content/Clock.qml
new file mode 100644
index 0000000000..75a1cf575b
--- /dev/null
+++ b/examples/declarative/clocks/content/Clock.qml
@@ -0,0 +1,80 @@
+import Qt 4.6
+
+Item {
+ id: clock
+ width: 200; height: 230
+
+ property alias city: cityLabel.text
+ property var hours
+ property var minutes
+ property var seconds
+ property var shift : 0
+ property bool night: false
+
+ function timeChanged() {
+ var date = new Date;
+ hours = shift ? date.getUTCHours() + Math.floor(clock.shift) : date.getHours()
+ if ( hours < 7 || hours > 19 ) night = true; else night = false
+ minutes = shift ? date.getUTCMinutes() + ((clock.shift % 1) * 60) : date.getMinutes()
+ seconds = date.getUTCSeconds();
+ }
+
+ Timer {
+ interval: 100; running: true; repeat: true; triggeredOnStart: true
+ onTriggered: clock.timeChanged()
+ }
+
+ Image { id: background; source: "clock.png"; visible: clock.night == false }
+ Image { source: "clock-night.png"; visible: clock.night == true }
+
+ Image {
+ x: 92.5; y: 27
+ source: "hour.png"
+ smooth: true
+ transform: Rotation {
+ id: hourRotation
+ origin.x: 7.5; origin.y: 73; angle: 0
+ SpringFollow on angle {
+ spring: 2; damping: 0.2; modulus: 360
+ source: (clock.hours * 30) + (clock.minutes * 0.5)
+ }
+ }
+ }
+
+ Image {
+ x: 93.5; y: 17
+ source: "minute.png"
+ smooth: true
+ transform: Rotation {
+ id: minuteRotation
+ origin.x: 6.5; origin.y: 83; angle: 0
+ SpringFollow on angle {
+ spring: 2; damping: 0.2; modulus: 360
+ source: clock.minutes * 6
+ }
+ }
+ }
+
+ Image {
+ x: 97.5; y: 20
+ source: "second.png"
+ smooth: true
+ transform: Rotation {
+ id: secondRotation
+ origin.x: 2.5; origin.y: 80; angle: 0
+ SpringFollow on angle {
+ spring: 5; damping: 0.25; modulus: 360
+ source: clock.seconds * 6
+ }
+ }
+ }
+
+ Image {
+ anchors.centerIn: background; source: "center.png"
+ }
+
+ Text {
+ id: cityLabel; font.bold: true; font.pixelSize: 14; y:200; color: "white"
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+}
diff --git a/examples/declarative/clocks/content/background.png b/examples/declarative/clocks/content/background.png
new file mode 100644
index 0000000000..a885950862
--- /dev/null
+++ b/examples/declarative/clocks/content/background.png
Binary files differ
diff --git a/examples/declarative/clocks/content/center.png b/examples/declarative/clocks/content/center.png
new file mode 100755
index 0000000000..7fbd802a44
--- /dev/null
+++ b/examples/declarative/clocks/content/center.png
Binary files differ
diff --git a/examples/declarative/clocks/content/clock-night.png b/examples/declarative/clocks/content/clock-night.png
new file mode 100755
index 0000000000..cc7151a397
--- /dev/null
+++ b/examples/declarative/clocks/content/clock-night.png
Binary files differ
diff --git a/examples/declarative/clocks/content/clock.png b/examples/declarative/clocks/content/clock.png
new file mode 100755
index 0000000000..462edacc0e
--- /dev/null
+++ b/examples/declarative/clocks/content/clock.png
Binary files differ
diff --git a/examples/declarative/clocks/content/hour.png b/examples/declarative/clocks/content/hour.png
new file mode 100755
index 0000000000..f8061a1235
--- /dev/null
+++ b/examples/declarative/clocks/content/hour.png
Binary files differ
diff --git a/examples/declarative/clocks/content/minute.png b/examples/declarative/clocks/content/minute.png
new file mode 100755
index 0000000000..1297ec7c2b
--- /dev/null
+++ b/examples/declarative/clocks/content/minute.png
Binary files differ
diff --git a/examples/declarative/clocks/content/second.png b/examples/declarative/clocks/content/second.png
new file mode 100755
index 0000000000..4aa9fb5e8e
--- /dev/null
+++ b/examples/declarative/clocks/content/second.png
Binary files differ
diff --git a/examples/declarative/colorbrowser/colorbrowser.qml b/examples/declarative/colorbrowser/colorbrowser.qml
new file mode 100644
index 0000000000..421ae07c9c
--- /dev/null
+++ b/examples/declarative/colorbrowser/colorbrowser.qml
@@ -0,0 +1,101 @@
+import Qt 4.6
+import 'qml'
+
+Rectangle {
+ id: mainWindow
+ width: 800; height: 480; color: '#454545'
+
+ VisualDataModel { id: colorsVisualModel; delegate: colorsDelegate; model: ColorsModel }
+
+ Component {
+ id: colorsDelegate
+ Package {
+
+ Item {
+ Package.name: 'grid'
+ GridView {
+ id: gridView; model: visualModel.parts.grid; width: mainWindow.width; height: mainWindow.height
+ cellWidth: 160; cellHeight: 160; interactive: false
+ onCurrentIndexChanged: listView.positionViewAtIndex(currentIndex)
+ }
+ }
+
+ Item {
+ Package.name: 'fullscreen'
+ ListView {
+ id: listView; model: visualModel.parts.list; orientation: Qt.Horizontal
+ width: mainWindow.width; height: mainWindow.height; interactive: false
+ onCurrentIndexChanged: gridView.positionViewAtIndex(currentIndex)
+ highlightRangeMode: ListView.StrictlyEnforceRange; snapMode: ListView.SnapOneItem
+ }
+ }
+
+ Item {
+ Package.name: 'stack'
+ id: wrapper
+ width: 260; height: 240
+
+ VisualDataModel { id: visualModel; model: colors; delegate: ColorDelegate {} }
+
+ PathView {
+ id: pathView; model: visualModel.parts.stack; anchors.centerIn: parent
+ pathItemCount: 3
+ path: Path {
+ PathAttribute { name: 'z'; value: 9999.0 }
+ PathLine { x: 1; y: 1 }
+ PathAttribute { name: 'z'; value: 0.0 }
+ }
+ }
+
+ Item {
+ anchors.horizontalCenter: parent.horizontalCenter; anchors.bottom: parent.bottom; anchors.bottomMargin: 20
+ width: albumTitle.width + 20 ; height: albumTitle.height + 4
+ Text { id: albumTitle; text: name; color: 'white'; font.bold: true; anchors.centerIn: parent }
+ }
+
+ MouseArea { anchors.fill: parent; onClicked: wrapper.state = 'inGrid' }
+
+ states: [
+ State {
+ name: 'inGrid'
+ PropertyChanges { target: gridView; interactive: true }
+ PropertyChanges { target: shade; opacity: 1 }
+ },
+ State {
+ name: 'fullscreen'; extend: 'inGrid'
+ PropertyChanges { target: gridView; interactive: false }
+ PropertyChanges { target: listView; interactive: true }
+ PropertyChanges { target: infobox; opacity: 1 }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ from: ''; to: 'inGrid'; reversible: true
+ NumberAnimation { target: shade; properties: 'opacity'; duration: 300 }
+ },
+ Transition {
+ from: 'inGrid'; to: 'fullscreen'; reversible: true
+ SequentialAnimation {
+ PauseAnimation { duration: 300 }
+ NumberAnimation { target: infobox; properties: 'opacity'; duration: 300 }
+ }
+ }
+ ]
+ }
+ }
+ }
+
+ GridView { width: parent.width; height: parent.height; cellWidth: 260; cellHeight: 240; model: colorsVisualModel.parts.stack }
+ Rectangle { id: shade; color: '#454545'; width: parent.width; height: parent.height; opacity: 0 }
+ ListView { anchors.fill: parent; model: colorsVisualModel.parts.grid; interactive: false }
+ ListView { anchors.fill: parent; model: colorsVisualModel.parts.fullscreen; interactive: false }
+ Item { id: foreground; anchors.fill: parent }
+
+ Column {
+ id: infobox; opacity: 0
+ anchors { left: parent.left; leftMargin: 20; bottom: parent.bottom; bottomMargin: 20 }
+ Text { id: infoColorName; color: '#eeeeee'; style: Text.Outline; styleColor: '#222222'; font.pointSize: 18 }
+ Text { id: infoColorHex; color: '#eeeeee'; style: Text.Outline; styleColor: '#222222'; font.pointSize: 14 }
+ }
+}
diff --git a/examples/declarative/colorbrowser/dummydata/ColorsModel.qml b/examples/declarative/colorbrowser/dummydata/ColorsModel.qml
new file mode 100644
index 0000000000..eefbcfee71
--- /dev/null
+++ b/examples/declarative/colorbrowser/dummydata/ColorsModel.qml
@@ -0,0 +1,96 @@
+import Qt 4.6
+
+ListModel {
+ id: colorsModel
+
+ ListElement {
+ name: "Reds"
+ colors: [
+ ListElement { name: "Fire Brick"; hex: "#B22222" },
+ ListElement { name: "Fire Brick 1"; hex: "#FF3030" },
+ ListElement { name: "Fire Brick 2"; hex: "#EE2C2C" },
+ ListElement { name: "Fire Brick 3"; hex: "#CD2626" },
+ ListElement { name: "Fire Brick 4"; hex: "#8B1A1A" },
+ ListElement { name: "Red"; hex: "#FF0000" },
+ ListElement { name: "Red 2"; hex: "#EE0000" },
+ ListElement { name: "Red 3"; hex: "#CD0000" },
+ ListElement { name: "Red 4"; hex: "#8B0000" },
+ ListElement { name: "Tomato"; hex: "#FF6347" },
+ ListElement { name: "Tomato 2"; hex: "#EE5C42" },
+ ListElement { name: "Tomato 3"; hex: "#CD4F39" },
+ ListElement { name: "Tomato 4"; hex: "#8B3626" },
+ ListElement { name: "Orange Red"; hex: "#FF4500" },
+ ListElement { name: "Orange Red 2"; hex: "#EE4000" },
+ ListElement { name: "Orange Red 3"; hex: "#CD3700" },
+ ListElement { name: "Orange Red 4"; hex: "#8B2500" },
+ ListElement { name: "Indian Red 2"; hex: "#EE6363" },
+ ListElement { name: "Indian Red 3"; hex: "#CD5555" },
+ ListElement { name: "Indian Red 4"; hex: "#8B3A3A" },
+ ListElement { name: "Brown"; hex: "#A52A2A" },
+ ListElement { name: "Brown 1"; hex: "#FF4040" },
+ ListElement { name: "Brown 2"; hex: "#EE3B3B" },
+ ListElement { name: "Brown 3"; hex: "#CD3333" },
+ ListElement { name: "Brown 4"; hex: "#8B2323" }
+ ]
+ }
+ ListElement {
+ name: "Greens"
+ colors: [
+ ListElement { name: "Green"; hex: "#008000" },
+ ListElement { name: "Green 2"; hex: "#00EE00" },
+ ListElement { name: "Green 3"; hex: "#00CD00" },
+ ListElement { name: "Green 4"; hex: "#008B00" },
+ ListElement { name: "Dark Green"; hex: "#006400" },
+ ListElement { name: "Sap Green"; hex: "#308014" },
+ ListElement { name: "Medium Spring Green"; hex: "#00FA9A" },
+ ListElement { name: "Spring Green"; hex: "#00FF7F" },
+ ListElement { name: "Spring Green 1"; hex: "#00EE76" },
+ ListElement { name: "Spring Green 2"; hex: "#00CD66" },
+ ListElement { name: "Spring Green 3"; hex: "#008B45" },
+ ListElement { name: "Medium Sea Green"; hex: "#3CB371" },
+ ListElement { name: "Sea Green 1"; hex: "#54FF9F" },
+ ListElement { name: "Sea Green 2"; hex: "#4EEE94" },
+ ListElement { name: "Sea Green 3"; hex: "#43CD80" },
+ ListElement { name: "Sea Green 4"; hex: "#2E8B57" },
+ ListElement { name: "Emerald Green"; hex: "#00C957" },
+ ListElement { name: "Mint"; hex: "#BDFCC9" },
+ ListElement { name: "Cobalt Green"; hex: "#3D9140" },
+ ListElement { name: "Dark Sea Green"; hex: "#8FBC8F" },
+ ListElement { name: "Dark Sea Green 1"; hex: "#C1FFC1" },
+ ListElement { name: "Dark Sea Green 2"; hex: "#B4EEB4" },
+ ListElement { name: "Dark Sea Green 3"; hex: "#9BCD9B" },
+ ListElement { name: "Dark Sea Green 4"; hex: "#698B69" },
+ ListElement { name: "Lime Green"; hex: "#00FF00" }
+ ]
+ }
+ ListElement {
+ name: "Blues"
+ colors: [
+ ListElement { name: "Dark Slate Blue"; hex: "#483D8B" },
+ ListElement { name: "Light Slate Blue"; hex: "#8470FF" },
+ ListElement { name: "Medium Slate Blue"; hex: "#7B68EE" },
+ ListElement { name: "Slate Blue"; hex: "#6A5ACD" },
+ ListElement { name: "Blue"; hex: "#0000FF" },
+ ListElement { name: "Midnight Blue"; hex: "#191970" },
+ ListElement { name: "Cobalt"; hex: "#3D59AB" },
+ ListElement { name: "Royal Blue"; hex: "#4169E1" },
+ ListElement { name: "Corn Flower Blue"; hex: "#6495ED" },
+ ListElement { name: "Light Steel Blue"; hex: "#B0C4DE" },
+ ListElement { name: "Light Steel Blue 1"; hex: "#CAE1FF" },
+ ListElement { name: "Light Steel Blue 2"; hex: "#BCD2EE" },
+ ListElement { name: "Light Steel Blue 3"; hex: "#A2B5CD" },
+ ListElement { name: "Dodger Blue"; hex: "#1E90FF" },
+ ListElement { name: "Dodger Blue 2"; hex: "#1C86EE" },
+ ListElement { name: "Dodger Blue 3"; hex: "#1874CD" },
+ ListElement { name: "Dodger Blue 4"; hex: "#104E8B" },
+ ListElement { name: "Steel Blue"; hex: "#4682B4" },
+ ListElement { name: "Light Sky Blue"; hex: "#87CEFA" },
+ ListElement { name: "Sky Blue"; hex: "#87CEEB" },
+ ListElement { name: "Peacock"; hex: "#33A1C9" },
+ ListElement { name: "Light Blue"; hex: "#ADD8E6" },
+ ListElement { name: "Powder Blue"; hex: "#B0E0E6" },
+ ListElement { name: "Cadet Blue"; hex: "#5F9EA0" },
+ ListElement { name: "Cyan"; hex: "#00FFFF" }
+ ]
+ }
+}
diff --git a/examples/declarative/colorbrowser/qml/ColorDelegate.qml b/examples/declarative/colorbrowser/qml/ColorDelegate.qml
new file mode 100644
index 0000000000..c123d1255a
--- /dev/null
+++ b/examples/declarative/colorbrowser/qml/ColorDelegate.qml
@@ -0,0 +1,114 @@
+import Qt 4.6
+
+Package {
+ Item { id: stack; Package.name: 'stack'; width: 110; height: 110; z: stack.PathView.z }
+ Item { id: list; Package.name: 'list'; width: mainWindow.width + 4; height: 110 }
+ Item { id: grid; Package.name: 'grid'; width: 110; height: 110 }
+
+ Item {
+ id: delegate
+
+ property double randomAngle: Math.random() * (2 * 8 + 1) - 8
+ property bool open: false
+
+ width: 110; height: 110; z: stack.PathView.z
+
+ Image { x: -6; y: -5; source: 'box-shadow.png'; smooth: true; }
+ Rectangle { color: hex; anchors.fill: parent; smooth: true }
+ Image { id: box; source: 'box.png'; smooth: true; anchors.fill: parent }
+
+ Binding {
+ target: infoColorName; property: 'text'
+ value: name; when: delegate.open && list.ListView.isCurrentItem
+ }
+
+ Binding {
+ target: infoColorHex; property: 'text'
+ value: hex; when: delegate.open && list.ListView.isCurrentItem
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ acceptedButtons: Qt.RightButton | Qt.LeftButton
+ onClicked: {
+ if (wrapper.state == 'inGrid' && mouse.button == Qt.RightButton) {
+ wrapper.state = ''
+ } else if (wrapper.state == 'inGrid') {
+ grid.GridView.view.currentIndex = index;
+ wrapper.state = 'fullscreen'
+ } else {
+ grid.GridView.view.currentIndex = index;
+ wrapper.state = 'inGrid'
+ }
+ }
+ }
+
+ states: [
+ State {
+ name: 'stacked'; when: wrapper.state == ''
+ ParentChange { target: delegate; parent: stack; x: 0; y: 0; rotation: delegate.randomAngle }
+ PropertyChanges { target: delegate; visible: stack.PathView.onPath ? 1.0 : 0.0 }
+ },
+ State {
+ name: 'inGrid'; when: wrapper.state == 'inGrid'
+ ParentChange { target: delegate; parent: grid; x: 24; y: 24 }
+ PropertyChanges { target: delegate; open: true }
+ },
+ State {
+ name: 'fullscreen'; when: wrapper.state == 'fullscreen'
+ ParentChange { target: delegate; parent: list; x: 0; y: 0; width: mainWindow.width; height: mainWindow.height }
+ PropertyChanges { target: box; opacity: 0 }
+ PropertyChanges { target: delegate; open: true }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ from: 'stacked'; to: 'inGrid'
+ SequentialAnimation {
+ PauseAnimation { duration: 20 * index }
+ ParentAnimation {
+ target: delegate; via: foreground
+ NumberAnimation { targets: delegate; properties: 'x,y,width,height,rotation'; duration: 600; easing.type: 'OutBack' }
+ }
+ }
+ },
+ Transition {
+ from: 'inGrid'; to: 'stacked'
+ ParentAnimation {
+ target: delegate; via: foreground
+ NumberAnimation { properties: 'x,y,width,height,rotation'; duration: 300; easing.type: 'InOutQuad' }
+ }
+ },
+ Transition {
+ from: 'inGrid'; to: 'fullscreen'
+ SequentialAnimation {
+ PauseAnimation { duration: grid.GridView.isCurrentItem ? 0 : 300 }
+ ParentAnimation {
+ target: delegate; via: foreground
+ NumberAnimation {
+ properties: 'x,y,width,height,opacity'
+ duration: grid.GridView.isCurrentItem ? 300 : 1; easing.type: 'InOutQuad'
+ }
+ }
+ }
+ },
+ Transition {
+ from: 'fullscreen'; to: 'inGrid'
+ SequentialAnimation {
+ PauseAnimation { duration: grid.GridView.isCurrentItem ? 3 : 0 }
+ ParallelAnimation {
+ ParentAnimation {
+ target: delegate; via: foreground
+ NumberAnimation {
+ properties: 'x,y,width,height'
+ duration: grid.GridView.isCurrentItem ? 300 : 1; easing.type: 'InOutQuad'
+ }
+ }
+ NumberAnimation { properties: 'opacity'; duration: grid.GridView.isCurrentItem ? 300 : 1; easing.type: 'InOutQuad' }
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/examples/declarative/colorbrowser/qml/box-shadow.png b/examples/declarative/colorbrowser/qml/box-shadow.png
new file mode 100644
index 0000000000..3281a37667
--- /dev/null
+++ b/examples/declarative/colorbrowser/qml/box-shadow.png
Binary files differ
diff --git a/examples/declarative/colorbrowser/qml/box.png b/examples/declarative/colorbrowser/qml/box.png
new file mode 100644
index 0000000000..86538aa91d
--- /dev/null
+++ b/examples/declarative/colorbrowser/qml/box.png
Binary files differ
diff --git a/examples/declarative/connections/connections.qml b/examples/declarative/connections/connections.qml
new file mode 100644
index 0000000000..c35bda5b22
--- /dev/null
+++ b/examples/declarative/connections/connections.qml
@@ -0,0 +1,27 @@
+import Qt 4.6
+import "content"
+
+Rectangle {
+ id: window; color: "#646464"
+ width: 640; height: 480
+
+ property int angle: 0
+
+ Image {
+ id: image; source: "content/bg1.jpg"; anchors.centerIn: parent; transformOrigin: Item.Center
+ rotation: window.angle
+ Behavior on rotation { NumberAnimation { easing.type: "OutCubic"; duration: 300 } }
+ }
+
+ Button {
+ id: leftButton; image: "content/rotate-left.png"
+ anchors { left: parent.left; bottom: parent.bottom; leftMargin: 10; bottomMargin: 10 }
+ }
+ Button {
+ id: rightButton; image: "content/rotate-right.png"
+ anchors { right: parent.right; bottom: parent.bottom; rightMargin: 10; bottomMargin: 10 }
+ }
+
+ Connections { target: leftButton; onClicked: window.angle -= 90 }
+ Connections { target: rightButton; onClicked: window.angle += 90 }
+}
diff --git a/examples/declarative/connections/content/Button.qml b/examples/declarative/connections/content/Button.qml
new file mode 100644
index 0000000000..0e33c783f9
--- /dev/null
+++ b/examples/declarative/connections/content/Button.qml
@@ -0,0 +1,12 @@
+import Qt 4.6
+
+Item {
+ id: button
+ width: 48; height: 48
+
+ property alias image: icon.source
+ signal clicked
+
+ Image { id: icon }
+ MouseArea { anchors.fill: icon; onClicked: button.clicked() }
+}
diff --git a/examples/declarative/connections/content/bg1.jpg b/examples/declarative/connections/content/bg1.jpg
new file mode 100644
index 0000000000..dfc7cee6ad
--- /dev/null
+++ b/examples/declarative/connections/content/bg1.jpg
Binary files differ
diff --git a/examples/declarative/connections/content/rotate-left.png b/examples/declarative/connections/content/rotate-left.png
new file mode 100644
index 0000000000..c30387e44e
--- /dev/null
+++ b/examples/declarative/connections/content/rotate-left.png
Binary files differ
diff --git a/examples/declarative/connections/content/rotate-right.png b/examples/declarative/connections/content/rotate-right.png
new file mode 100644
index 0000000000..1b05674b1f
--- /dev/null
+++ b/examples/declarative/connections/content/rotate-right.png
Binary files differ
diff --git a/examples/declarative/declarative.pro b/examples/declarative/declarative.pro
new file mode 100644
index 0000000000..b8c0200e4b
--- /dev/null
+++ b/examples/declarative/declarative.pro
@@ -0,0 +1,48 @@
+TEMPLATE = subdirs
+
+# These examples contain some C++ and need to be built
+SUBDIRS = \
+ extending \
+ imageprovider \
+ objectlistmodel \
+ plugins
+
+# These examples contain no C++ and can simply be copied
+sources.files = \
+ animations \
+ aspectratio \
+ behaviours \
+ border-image \
+ clocks \
+ colorbrowser \
+ connections \
+ dial \
+ dynamic \
+ effects \
+ fillmode \
+ focusscope \
+ fonts \
+ gridview \
+ layouts \
+ listview \
+ mousearea \
+ package \
+ parallax \
+ progressbar \
+ scrollbar \
+ searchbox \
+ slideswitch \
+ sql \
+ states \
+ tabwidget \
+ tic-tac-toe \
+ tutorials \
+ tvtennis \
+ velocity \
+ webview \
+ workerlistmodel \
+ workerscript \
+ xmldata \
+ xmlhttprequest
+sources.path = $$[QT_INSTALL_EXAMPLES]/declarative
+INSTALLS += sources
diff --git a/examples/declarative/dial/content/Dial.qml b/examples/declarative/dial/content/Dial.qml
new file mode 100644
index 0000000000..ad4717a6b9
--- /dev/null
+++ b/examples/declarative/dial/content/Dial.qml
@@ -0,0 +1,37 @@
+import Qt 4.6
+
+Item {
+ id: root
+ property real value : 0
+
+ width: 210; height: 210
+
+ Image { source: "background.png" }
+
+ Image {
+ x: 93
+ y: 35
+ source: "needle_shadow.png"
+ transform: Rotation {
+ origin.x: 11; origin.y: 67
+ angle: needleRotation.angle
+ }
+ }
+ Image {
+ id: needle
+ x: 95; y: 33
+ smooth: true
+ source: "needle.png"
+ transform: Rotation {
+ id: needleRotation
+ origin.x: 7; origin.y: 65
+ angle: -130
+ SpringFollow on angle {
+ spring: 1.4
+ damping: .15
+ source: Math.min(Math.max(-130, root.value*2.6 - 130), 133)
+ }
+ }
+ }
+ Image { x: 21; y: 18; source: "overlay.png" }
+}
diff --git a/examples/declarative/dial/content/background.png b/examples/declarative/dial/content/background.png
new file mode 100644
index 0000000000..75d555d7ab
--- /dev/null
+++ b/examples/declarative/dial/content/background.png
Binary files differ
diff --git a/examples/declarative/dial/content/needle.png b/examples/declarative/dial/content/needle.png
new file mode 100644
index 0000000000..2d19f75039
--- /dev/null
+++ b/examples/declarative/dial/content/needle.png
Binary files differ
diff --git a/examples/declarative/dial/content/needle_shadow.png b/examples/declarative/dial/content/needle_shadow.png
new file mode 100644
index 0000000000..8d8a928cc5
--- /dev/null
+++ b/examples/declarative/dial/content/needle_shadow.png
Binary files differ
diff --git a/examples/declarative/dial/content/overlay.png b/examples/declarative/dial/content/overlay.png
new file mode 100644
index 0000000000..3860a7b590
--- /dev/null
+++ b/examples/declarative/dial/content/overlay.png
Binary files differ
diff --git a/examples/declarative/dial/dial.qml b/examples/declarative/dial/dial.qml
new file mode 100644
index 0000000000..3aed70ef87
--- /dev/null
+++ b/examples/declarative/dial/dial.qml
@@ -0,0 +1,35 @@
+import Qt 4.6
+import "content"
+
+Rectangle {
+ color: "#545454"
+ width: 300; height: 300
+
+ // Dial with a slider to adjust it
+ Dial { id: dial; anchors.centerIn: parent; value: slider.x *100 / (container.width - 34) }
+
+ Rectangle {
+ id: container
+ anchors.bottom: parent.bottom; anchors.bottomMargin: 10
+ anchors.left: parent.left; anchors.leftMargin: 20
+ anchors.right: parent.right; anchors.rightMargin: 20; height: 16
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "gray" }
+ GradientStop { position: 1.0; color: "white" }
+ }
+ radius: 8; opacity: 0.7; smooth: true
+ Rectangle {
+ id: slider
+ x: 1; y: 1; width: 30; height: 14
+ radius: 6; smooth: true
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "#424242" }
+ GradientStop { position: 1.0; color: "black" }
+ }
+ MouseArea {
+ anchors.fill: parent
+ drag.target: parent; drag.axis: "XAxis"; drag.minimumX: 2; drag.maximumX: container.width - 32
+ }
+ }
+ }
+}
diff --git a/examples/declarative/dynamic/dynamic.qml b/examples/declarative/dynamic/dynamic.qml
new file mode 100644
index 0000000000..6af3e814d1
--- /dev/null
+++ b/examples/declarative/dynamic/dynamic.qml
@@ -0,0 +1,121 @@
+import Qt 4.6
+import "qml"
+
+Item {
+ id: window
+ //This is a desktop-sized example
+ width: 1024; height: 512
+ property int activeSuns: 0
+
+ // sky
+ Rectangle { id: sky
+ anchors { left: parent.left; top: parent.top; right: toolbox.right; bottom: parent.verticalCenter }
+ gradient: Gradient {
+ GradientStop { id: stopA; position: 0.0; color: "#0E1533" }
+ GradientStop { id: stopB; position: 1.0; color: "#437284" }
+ }
+ }
+
+ // stars (when there's no sun)
+ Particles {
+ id: stars
+ x: 0; y: 0; width: parent.width; height: parent.height / 2
+ source: "images/star.png"; angleDeviation: 360; velocity: 0
+ velocityDeviation: 0; count: parent.width / 10; fadeInDuration: 2800
+ opacity: 1
+ }
+
+ // ground, which has a z such that the sun can set behind it
+ Rectangle {
+ id: ground
+ z: 2
+ anchors { left: parent.left; top: parent.verticalCenter; right: toolbox.right; bottom: parent.bottom }
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "ForestGreen" }
+ GradientStop { position: 1.0; color: "DarkGreen" }
+ }
+ }
+
+ //Day state, for when you place a sun
+ states: State {
+ name: "Day"; when: window.activeSuns > 0
+ PropertyChanges { target: stopA; color: "DeepSkyBlue"}
+ PropertyChanges { target: stopB; color: "SkyBlue"}
+ PropertyChanges { target: stars; opacity: 0 }
+ }
+
+ transitions: Transition {
+ PropertyAnimation { duration: 3000 }
+ ColorAnimation { duration: 3000 }
+ }
+
+ SystemPalette { id: activePalette }
+
+ // toolbox
+ Rectangle {
+ id: toolbox
+ z: 3 //Above ground
+ color: activePalette.window;
+ width: 480
+ anchors { right: parent.right; top:parent.top; bottom: parent.bottom }
+ Rectangle { //Not a child of any positioner
+ color: "white"; border.color: "black";
+ width: toolRow.width + 4
+ height: toolRow.height + 4
+ x: toolboxPositioner.x + toolRow.x - 2
+ y: toolboxPositioner.y + toolRow.y - 2
+ }
+ Column {
+ id: toolboxPositioner
+ anchors.centerIn: parent
+ spacing: 8
+ Text { text: "Drag an item into the scene." }
+ Row {
+ id: toolRow
+ spacing: 8;
+ PaletteItem {
+ anchors.verticalCenter: parent.verticalCenter
+ file: "Sun.qml";
+ image: "../images/sun.png"
+ }
+ PaletteItem {
+ file: "GenericItem.qml"
+ image: "../images/moon.png"
+ }
+ PaletteItem {
+ anchors.verticalCenter: parent.verticalCenter
+ file: "PerspectiveItem.qml"
+ image: "../images/tree_s.png"
+ }
+ PaletteItem {
+ anchors.verticalCenter: parent.verticalCenter
+ file: "PerspectiveItem.qml"
+ image: "../images/rabbit_brown.png"
+ }
+ PaletteItem {
+ anchors.verticalCenter: parent.verticalCenter
+ file: "PerspectiveItem.qml"
+ image: "../images/rabbit_bw.png"
+ }
+ }
+ Text { text: "Active Suns: " + activeSuns }
+ Rectangle { width: 440; height: 1; color: "black" }
+ Text { text: "Arbitrary QML: " }
+ TextEdit {
+ id: qmlText
+ width: 460
+ height: 220
+ readOnly: false
+ focusOnPress: true
+ font.pixelSize: 14
+
+ text: "import Qt 4.6\nImage {\n id: smile;\n x: 500*Math.random();\n y: 200*Math.random(); \n source: 'images/face-smile.png';\n NumberAnimation on opacity { \n to: 0; duration: 1500;\n }\n Component.onCompleted: smile.destroy(1500);\n}"
+ }
+ Button {
+ text: "Create"
+ onClicked: createQmlObject(qmlText.text, window, 'CustomObject');
+ }
+ }
+ }
+
+}
diff --git a/examples/declarative/dynamic/images/NOTE b/examples/declarative/dynamic/images/NOTE
new file mode 100644
index 0000000000..fcd87f9132
--- /dev/null
+++ b/examples/declarative/dynamic/images/NOTE
@@ -0,0 +1 @@
+Images (except star.png) are from the KDE project.
diff --git a/examples/declarative/dynamic/images/face-smile.png b/examples/declarative/dynamic/images/face-smile.png
new file mode 100644
index 0000000000..3d66d72578
--- /dev/null
+++ b/examples/declarative/dynamic/images/face-smile.png
Binary files differ
diff --git a/examples/declarative/dynamic/images/moon.png b/examples/declarative/dynamic/images/moon.png
new file mode 100644
index 0000000000..1c0d6066a8
--- /dev/null
+++ b/examples/declarative/dynamic/images/moon.png
Binary files differ
diff --git a/examples/declarative/dynamic/images/rabbit_brown.png b/examples/declarative/dynamic/images/rabbit_brown.png
new file mode 100644
index 0000000000..ebfdeed332
--- /dev/null
+++ b/examples/declarative/dynamic/images/rabbit_brown.png
Binary files differ
diff --git a/examples/declarative/dynamic/images/rabbit_bw.png b/examples/declarative/dynamic/images/rabbit_bw.png
new file mode 100644
index 0000000000..7bff9b92ca
--- /dev/null
+++ b/examples/declarative/dynamic/images/rabbit_bw.png
Binary files differ
diff --git a/examples/declarative/dynamic/images/star.png b/examples/declarative/dynamic/images/star.png
new file mode 100644
index 0000000000..27ef924267
--- /dev/null
+++ b/examples/declarative/dynamic/images/star.png
Binary files differ
diff --git a/examples/declarative/dynamic/images/sun.png b/examples/declarative/dynamic/images/sun.png
new file mode 100644
index 0000000000..7713ca5ce7
--- /dev/null
+++ b/examples/declarative/dynamic/images/sun.png
Binary files differ
diff --git a/examples/declarative/dynamic/images/tree_s.png b/examples/declarative/dynamic/images/tree_s.png
new file mode 100644
index 0000000000..6eac35a729
--- /dev/null
+++ b/examples/declarative/dynamic/images/tree_s.png
Binary files differ
diff --git a/examples/declarative/dynamic/qml/Button.qml b/examples/declarative/dynamic/qml/Button.qml
new file mode 100644
index 0000000000..757e2957a9
--- /dev/null
+++ b/examples/declarative/dynamic/qml/Button.qml
@@ -0,0 +1,24 @@
+import Qt 4.6
+
+Rectangle {
+ id: container
+
+ property var text
+ signal clicked
+
+ SystemPalette { id: activePalette }
+ height: text.height + 10
+ width: text.width + 20
+ border.width: 1
+ radius: 4; smooth: true
+ gradient: Gradient {
+ GradientStop { position: 0.0;
+ color: if(!mr.pressed){activePalette.light;}else{activePalette.button;}
+ }
+ GradientStop { position: 1.0;
+ color: if(!mr.pressed){activePalette.button;}else{activePalette.dark;}
+ }
+ }
+ MouseArea { id:mr; anchors.fill: parent; onClicked: container.clicked() }
+ Text { id: text; anchors.centerIn:parent; font.pointSize: 10; text: parent.text; color: activePalette.buttonText }
+}
diff --git a/examples/declarative/dynamic/qml/GenericItem.qml b/examples/declarative/dynamic/qml/GenericItem.qml
new file mode 100644
index 0000000000..10e3dba838
--- /dev/null
+++ b/examples/declarative/dynamic/qml/GenericItem.qml
@@ -0,0 +1,13 @@
+import Qt 4.6
+
+Item{
+ property bool created: false
+ property string image
+ width: imageItem.width
+ height: imageItem.height
+ z: 2
+ Image{
+ id: imageItem
+ source: image;
+ }
+}
diff --git a/examples/declarative/dynamic/qml/PaletteItem.qml b/examples/declarative/dynamic/qml/PaletteItem.qml
new file mode 100644
index 0000000000..8a9a9ee953
--- /dev/null
+++ b/examples/declarative/dynamic/qml/PaletteItem.qml
@@ -0,0 +1,13 @@
+import Qt 4.6
+
+GenericItem {
+ id: itemButton
+ property string file
+ Script { source: "itemCreation.js" }
+ MouseArea {
+ anchors.fill: parent;
+ onPressed: startDrag(mouse);
+ onPositionChanged: moveDrag(mouse);
+ onReleased: endDrag(mouse);
+ }
+}
diff --git a/examples/declarative/dynamic/qml/PerspectiveItem.qml b/examples/declarative/dynamic/qml/PerspectiveItem.qml
new file mode 100644
index 0000000000..a0dfad3da8
--- /dev/null
+++ b/examples/declarative/dynamic/qml/PerspectiveItem.qml
@@ -0,0 +1,16 @@
+import Qt 4.6
+
+Image {
+ id: tree
+ property bool created: false
+ property double scaleFactor: Math.max((y+height-250)*0.01, 0.3)
+ property double scaledBottom: y + (height+height*scaleFactor)/2
+ property bool onLand: scaledBottom > window.height/2
+ property string image //Needed for compatibility with GenericItem
+ opacity: onLand ? 1 : 0.25
+ onCreatedChanged: if (created && !onLand) { tree.destroy() } else { z = scaledBottom }
+ scale: scaleFactor
+ transformOrigin: "Center"
+ source: image; smooth: true
+ onYChanged: z = scaledBottom
+}
diff --git a/examples/declarative/dynamic/qml/Sun.qml b/examples/declarative/dynamic/qml/Sun.qml
new file mode 100644
index 0000000000..81b6e9b9e1
--- /dev/null
+++ b/examples/declarative/dynamic/qml/Sun.qml
@@ -0,0 +1,24 @@
+import Qt 4.6
+
+Image {
+ id: sun
+ property bool created: false
+ property string image: "../images/sun.png"
+ onCreatedChanged: if(created){window.activeSuns++;}else{window.activeSuns--;}
+
+ source: image;
+ z: 1
+
+ //x and y get set when instantiated
+ //head offscreen
+ NumberAnimation on y {
+ to: window.height / 2;
+ running: created
+ onRunningChanged: if (running) duration = (window.height - sun.y) * 10; else state = "OffScreen";
+ }
+
+ states: State {
+ name: "OffScreen";
+ StateChangeScript { script: { sun.created = false; sun.destroy() } }
+ }
+}
diff --git a/examples/declarative/dynamic/qml/itemCreation.js b/examples/declarative/dynamic/qml/itemCreation.js
new file mode 100644
index 0000000000..ccc03aa37e
--- /dev/null
+++ b/examples/declarative/dynamic/qml/itemCreation.js
@@ -0,0 +1,82 @@
+var itemComponent = null;
+var draggedItem = null;
+var startingMouse;
+var startingZ;
+//Until QT-2385 is resolved we need to convert to scene coordinates manually
+var xOffset;
+var yOffset;
+function setSceneOffset()
+{
+ xOffset = 0;
+ yOffset = 0;
+ var p = itemButton;
+ while(p != window){
+ xOffset += p.x;
+ yOffset += p.y;
+ p = p.parent;
+ }
+}
+
+function startDrag(mouse)
+{
+ setSceneOffset();
+ startingMouse = { x: mouse.x, y: mouse.y }
+ loadComponent();
+}
+
+//Creation is split into two functions due to an asyncronous wait while
+//possible external files are loaded.
+
+function loadComponent() {
+ if (itemComponent != null) //Already loaded the component
+ createItem();
+
+ itemComponent = createComponent(itemButton.file);
+ //print(itemButton.file)
+ if(itemComponent.isLoading){
+ component.statusChanged.connect(finishCreation);
+ }else{//Depending on the content, it can be ready or error immediately
+ createItem();
+ }
+}
+
+function createItem() {
+ if (itemComponent.isReady && draggedItem == null) {
+ draggedItem = itemComponent.createObject();
+ draggedItem.parent = window;
+ draggedItem.image = itemButton.image;
+ draggedItem.x = xOffset;
+ draggedItem.y = yOffset;
+ startingZ = draggedItem.z;
+ draggedItem.z = 4;//On top
+ } else if (itemComponent.isError) {
+ draggedItem = null;
+ print("error creating component");
+ print(component.errorsString());
+ }
+}
+
+function moveDrag(mouse)
+{
+ if(draggedItem == null)
+ return;
+
+ draggedItem.x = mouse.x + xOffset - startingMouse.x;
+ draggedItem.y = mouse.y + yOffset - startingMouse.y;
+}
+
+function endDrag(mouse)
+{
+ if(draggedItem == null)
+ return;
+
+ if(draggedItem.x + draggedItem.width > toolbox.x){ //Don't drop it in the toolbox
+ draggedItem.destroy();
+ draggedItem = null;
+ }else{
+ draggedItem.z = startingZ;
+ draggedItem.created = true;
+ draggedItem = null;
+ }
+}
+
diff --git a/examples/declarative/effects/effects.qml b/examples/declarative/effects/effects.qml
new file mode 100644
index 0000000000..997d7de9da
--- /dev/null
+++ b/examples/declarative/effects/effects.qml
@@ -0,0 +1,60 @@
+import Qt 4.6
+
+Rectangle {
+ color: "white"
+ width: 400
+ height: 200
+
+ Image {
+ id: blur
+ x: 5
+ source: "pic.png"
+
+ effect: Blur {
+ NumberAnimation on blurRadius {
+ id: blurEffect
+ running: false
+ from: 0; to: 10
+ duration: 1000
+ repeat: true
+ }
+ }
+
+ MouseArea { anchors.fill: parent; onClicked: blurEffect.running = !blurEffect.running }
+ }
+
+ Text { text: "Blur"; anchors.top: blur.bottom; anchors.horizontalCenter: blur.horizontalCenter }
+
+ Image {
+ id: dropShadow
+ source: "pic.png"
+ x: 135
+
+ effect: DropShadow {
+ blurRadius: 3
+ offset.x: 3
+ NumberAnimation on offset.y { id: dropShadowEffect; from: 0; to: 10; duration: 1000; running: false; repeat: true; }
+ }
+
+ MouseArea { anchors.fill: parent; onClicked: dropShadowEffect.running = !dropShadowEffect.running }
+ }
+
+ Image {
+ id: colorize
+ source: "pic.png"
+ x: 265
+
+ effect: Colorize { color: "blue" }
+ }
+
+ Text { text: "Colorize"; anchors.top: colorize.bottom; anchors.horizontalCenter: colorize.horizontalCenter }
+
+ Text { text: "Drop Shadow"; anchors.top: dropShadow.bottom; anchors.horizontalCenter: dropShadow.horizontalCenter }
+
+ Text {
+ y: 155; anchors.horizontalCenter: parent.horizontalCenter
+ text: "Clicking Blur or Drop Shadow will \ntoggle animation."
+ color: "black"
+ }
+
+}
diff --git a/examples/declarative/effects/pic.png b/examples/declarative/effects/pic.png
new file mode 100644
index 0000000000..051e7389e5
--- /dev/null
+++ b/examples/declarative/effects/pic.png
Binary files differ
diff --git a/examples/declarative/extending/adding/adding.pro b/examples/declarative/extending/adding/adding.pro
new file mode 100644
index 0000000000..6072de42cc
--- /dev/null
+++ b/examples/declarative/extending/adding/adding.pro
@@ -0,0 +1,15 @@
+TEMPLATE = app
+TARGET = adding
+DEPENDPATH += .
+INCLUDEPATH += .
+QT += declarative
+
+# Input
+SOURCES += main.cpp \
+ person.cpp
+HEADERS += person.h
+RESOURCES += adding.qrc
+target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/adding
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS adding.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/adding
+INSTALLS += target sources
diff --git a/examples/declarative/extending/adding/adding.qrc b/examples/declarative/extending/adding/adding.qrc
new file mode 100644
index 0000000000..e2fa01d5e7
--- /dev/null
+++ b/examples/declarative/extending/adding/adding.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>example.qml</file>
+</qresource>
+</RCC>
diff --git a/examples/declarative/extending/adding/example.qml b/examples/declarative/extending/adding/example.qml
new file mode 100644
index 0000000000..c608f94b22
--- /dev/null
+++ b/examples/declarative/extending/adding/example.qml
@@ -0,0 +1,8 @@
+import People 1.0
+
+// ![0]
+Person {
+ name: "Bob Jones"
+ shoeSize: 12
+}
+// ![0]
diff --git a/examples/declarative/extending/adding/main.cpp b/examples/declarative/extending/adding/main.cpp
new file mode 100644
index 0000000000..76e0736157
--- /dev/null
+++ b/examples/declarative/extending/adding/main.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QCoreApplication>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QDebug>
+#include "person.h"
+
+int main(int argc, char ** argv)
+{
+ QCoreApplication app(argc, argv);
+
+ QML_REGISTER_TYPE(People, 1,0, Person, Person);
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, ":example.qml");
+ Person *person = qobject_cast<Person *>(component.create());
+ if (person) {
+ qWarning() << "The person's name is" << person->name();
+ qWarning() << "They wear a" << person->shoeSize() << "sized shoe";
+ } else {
+ qWarning() << "An error occured";
+ }
+
+ return 0;
+}
diff --git a/examples/declarative/extending/adding/person.cpp b/examples/declarative/extending/adding/person.cpp
new file mode 100644
index 0000000000..cdf08e0281
--- /dev/null
+++ b/examples/declarative/extending/adding/person.cpp
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "person.h"
+
+// ![0]
+Person::Person(QObject *parent)
+: QObject(parent), m_shoeSize(0)
+{
+}
+
+QString Person::name() const
+{
+ return m_name;
+}
+
+void Person::setName(const QString &n)
+{
+ m_name = n;
+}
+
+int Person::shoeSize() const
+{
+ return m_shoeSize;
+}
+
+void Person::setShoeSize(int s)
+{
+ m_shoeSize = s;
+}
+
+// ![0]
diff --git a/examples/declarative/extending/adding/person.h b/examples/declarative/extending/adding/person.h
new file mode 100644
index 0000000000..fbaf2df2cf
--- /dev/null
+++ b/examples/declarative/extending/adding/person.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef PERSON_H
+#define PERSON_H
+
+#include <QObject>
+// ![0]
+#include <qdeclarative.h>
+
+class Person : public QObject {
+Q_OBJECT
+Q_PROPERTY(QString name READ name WRITE setName)
+Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
+public:
+ Person(QObject *parent = 0);
+
+ QString name() const;
+ void setName(const QString &);
+
+ int shoeSize() const;
+ void setShoeSize(int);
+private:
+ QString m_name;
+ int m_shoeSize;
+};
+QML_DECLARE_TYPE(Person);
+// ![0]
+
+#endif // PERSON_H
diff --git a/examples/declarative/extending/attached/attached.pro b/examples/declarative/extending/attached/attached.pro
new file mode 100644
index 0000000000..f6d76ed27f
--- /dev/null
+++ b/examples/declarative/extending/attached/attached.pro
@@ -0,0 +1,17 @@
+TEMPLATE = app
+TARGET = attached
+DEPENDPATH += .
+INCLUDEPATH += .
+QT += declarative
+
+# Input
+SOURCES += main.cpp \
+ person.cpp \
+ birthdayparty.cpp
+HEADERS += person.h \
+ birthdayparty.h
+RESOURCES += attached.qrc
+target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/attached
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS attached.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/attached
+INSTALLS += target sources
diff --git a/examples/declarative/extending/attached/attached.qrc b/examples/declarative/extending/attached/attached.qrc
new file mode 100644
index 0000000000..e2fa01d5e7
--- /dev/null
+++ b/examples/declarative/extending/attached/attached.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>example.qml</file>
+</qresource>
+</RCC>
diff --git a/examples/declarative/extending/attached/birthdayparty.cpp b/examples/declarative/extending/attached/birthdayparty.cpp
new file mode 100644
index 0000000000..d4f2675b6b
--- /dev/null
+++ b/examples/declarative/extending/attached/birthdayparty.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "birthdayparty.h"
+
+BirthdayPartyAttached::BirthdayPartyAttached(QObject *object)
+: QObject(object)
+{
+}
+
+QDate BirthdayPartyAttached::rsvp() const
+{
+ return m_rsvp;
+}
+
+void BirthdayPartyAttached::setRsvp(const QDate &d)
+{
+ m_rsvp = d;
+}
+
+BirthdayParty::BirthdayParty(QObject *parent)
+: QObject(parent), m_celebrant(0)
+{
+}
+
+Person *BirthdayParty::celebrant() const
+{
+ return m_celebrant;
+}
+
+void BirthdayParty::setCelebrant(Person *c)
+{
+ m_celebrant = c;
+}
+
+QDeclarativeListProperty<Person> BirthdayParty::guests()
+{
+ return QDeclarativeListProperty<Person>(this, m_guests);
+}
+
+int BirthdayParty::guestCount() const
+{
+ return m_guests.count();
+}
+
+Person *BirthdayParty::guest(int index) const
+{
+ return m_guests.at(index);
+}
+
+BirthdayPartyAttached *BirthdayParty::qmlAttachedProperties(QObject *object)
+{
+ return new BirthdayPartyAttached(object);
+}
+
diff --git a/examples/declarative/extending/attached/birthdayparty.h b/examples/declarative/extending/attached/birthdayparty.h
new file mode 100644
index 0000000000..d8ca2e1aa3
--- /dev/null
+++ b/examples/declarative/extending/attached/birthdayparty.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef BIRTHDAYPARTY_H
+#define BIRTHDAYPARTY_H
+
+#include <QObject>
+#include <QDate>
+#include <qdeclarative.h>
+#include "person.h"
+
+class BirthdayPartyAttached : public QObject
+{
+Q_OBJECT
+Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
+public:
+ BirthdayPartyAttached(QObject *object);
+
+ QDate rsvp() const;
+ void setRsvp(const QDate &);
+
+private:
+ QDate m_rsvp;
+};
+QML_DECLARE_TYPE(BirthdayPartyAttached)
+
+class BirthdayParty : public QObject
+{
+Q_OBJECT
+Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
+Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+Q_CLASSINFO("DefaultProperty", "guests")
+public:
+ BirthdayParty(QObject *parent = 0);
+
+ Person *celebrant() const;
+ void setCelebrant(Person *);
+
+ QDeclarativeListProperty<Person> guests();
+ int guestCount() const;
+ Person *guest(int) const;
+
+ static BirthdayPartyAttached *qmlAttachedProperties(QObject *);
+private:
+ Person *m_celebrant;
+ QList<Person *> m_guests;
+};
+
+QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(BirthdayParty)
+
+#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/extending/attached/example.qml b/examples/declarative/extending/attached/example.qml
new file mode 100644
index 0000000000..952eb938f1
--- /dev/null
+++ b/examples/declarative/extending/attached/example.qml
@@ -0,0 +1,29 @@
+import People 1.0
+
+BirthdayParty {
+ celebrant: Boy {
+ name: "Bob Jones"
+ shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
+ }
+
+ // ![1]
+ Boy {
+ name: "Joan Hodges"
+ BirthdayParty.rsvp: "2009-07-06"
+ shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
+ }
+ // ![1]
+ Boy {
+ name: "Jack Smith"
+ shoe { size: 8; color: "blue"; brand: "Puma"; price: 19.95 }
+ }
+ Girl {
+ name: "Anne Brown"
+ BirthdayParty.rsvp: "2009-07-01"
+ shoe.size: 7
+ shoe.color: "red"
+ shoe.brand: "Marc Jacobs"
+ shoe.price: 699.99
+ }
+}
+
diff --git a/examples/declarative/extending/attached/main.cpp b/examples/declarative/extending/attached/main.cpp
new file mode 100644
index 0000000000..684d8d399d
--- /dev/null
+++ b/examples/declarative/extending/attached/main.cpp
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QCoreApplication>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QDebug>
+#include "birthdayparty.h"
+#include "person.h"
+
+int main(int argc, char ** argv)
+{
+ QCoreApplication app(argc, argv);
+
+ QML_REGISTER_NOCREATE_TYPE(BirthdayPartyAttached);
+ QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty);
+ QML_REGISTER_NOCREATE_TYPE(ShoeDescription);
+ QML_REGISTER_NOCREATE_TYPE(Person);
+ QML_REGISTER_TYPE(People, 1,0, Boy, Boy);
+ QML_REGISTER_TYPE(People, 1,0, Girl, Girl);
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, ":example.qml");
+ BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
+
+ if (party && party->celebrant()) {
+ qWarning() << party->celebrant()->name() << "is having a birthday!";
+
+ if (qobject_cast<Boy *>(party->celebrant()))
+ qWarning() << "He is inviting:";
+ else
+ qWarning() << "She is inviting:";
+
+ for (int ii = 0; ii < party->guestCount(); ++ii) {
+ Person *guest = party->guest(ii);
+
+ QDate rsvpDate;
+ QObject *attached =
+ qmlAttachedPropertiesObject<BirthdayParty>(guest, false);
+ if (attached)
+ rsvpDate = attached->property("rsvp").toDate();
+
+ if (rsvpDate.isNull())
+ qWarning() << " " << guest->name() << "RSVP date: Hasn't RSVP'd";
+ else
+ qWarning() << " " << guest->name() << "RSVP date:" << qPrintable(rsvpDate.toString());
+ }
+
+ } else {
+ qWarning() << "An error occured";
+ }
+
+ return 0;
+}
diff --git a/examples/declarative/extending/attached/person.cpp b/examples/declarative/extending/attached/person.cpp
new file mode 100644
index 0000000000..0a9e508302
--- /dev/null
+++ b/examples/declarative/extending/attached/person.cpp
@@ -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 examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "person.h"
+
+ShoeDescription::ShoeDescription(QObject *parent)
+: QObject(parent), m_size(0), m_price(0)
+{
+}
+
+int ShoeDescription::size() const
+{
+ return m_size;
+}
+
+void ShoeDescription::setSize(int s)
+{
+ m_size = s;
+}
+
+QColor ShoeDescription::color() const
+{
+ return m_color;
+}
+
+void ShoeDescription::setColor(const QColor &c)
+{
+ m_color = c;
+}
+
+QString ShoeDescription::brand() const
+{
+ return m_brand;
+}
+
+void ShoeDescription::setBrand(const QString &b)
+{
+ m_brand = b;
+}
+
+qreal ShoeDescription::price() const
+{
+ return m_price;
+}
+
+void ShoeDescription::setPrice(qreal p)
+{
+ m_price = p;
+}
+
+Person::Person(QObject *parent)
+: QObject(parent)
+{
+}
+
+QString Person::name() const
+{
+ return m_name;
+}
+
+void Person::setName(const QString &n)
+{
+ m_name = n;
+}
+
+ShoeDescription *Person::shoe()
+{
+ return &m_shoe;
+}
+
+
+Boy::Boy(QObject * parent)
+: Person(parent)
+{
+}
+
+
+Girl::Girl(QObject * parent)
+: Person(parent)
+{
+}
+
diff --git a/examples/declarative/extending/attached/person.h b/examples/declarative/extending/attached/person.h
new file mode 100644
index 0000000000..0f86d8b76e
--- /dev/null
+++ b/examples/declarative/extending/attached/person.h
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef PERSON_H
+#define PERSON_H
+
+#include <QObject>
+#include <QColor>
+#include <qdeclarative.h>
+
+class ShoeDescription : public QObject {
+Q_OBJECT
+Q_PROPERTY(int size READ size WRITE setSize)
+Q_PROPERTY(QColor color READ color WRITE setColor)
+Q_PROPERTY(QString brand READ brand WRITE setBrand)
+Q_PROPERTY(qreal price READ price WRITE setPrice)
+public:
+ ShoeDescription(QObject *parent = 0);
+
+ int size() const;
+ void setSize(int);
+
+ QColor color() const;
+ void setColor(const QColor &);
+
+ QString brand() const;
+ void setBrand(const QString &);
+
+ qreal price() const;
+ void setPrice(qreal);
+private:
+ int m_size;
+ QColor m_color;
+ QString m_brand;
+ qreal m_price;
+};
+QML_DECLARE_TYPE(ShoeDescription);
+
+class Person : public QObject {
+Q_OBJECT
+Q_PROPERTY(QString name READ name WRITE setName)
+Q_PROPERTY(ShoeDescription *shoe READ shoe);
+public:
+ Person(QObject *parent = 0);
+
+ QString name() const;
+ void setName(const QString &);
+
+ ShoeDescription *shoe();
+private:
+ QString m_name;
+ ShoeDescription m_shoe;
+};
+QML_DECLARE_TYPE(Person);
+
+class Boy : public Person {
+Q_OBJECT
+public:
+ Boy(QObject * parent = 0);
+};
+QML_DECLARE_TYPE(Boy);
+
+class Girl : public Person {
+Q_OBJECT
+public:
+ Girl(QObject * parent = 0);
+};
+QML_DECLARE_TYPE(Girl);
+
+#endif // PERSON_H
diff --git a/examples/declarative/extending/binding/binding.pro b/examples/declarative/extending/binding/binding.pro
new file mode 100644
index 0000000000..903712ef7d
--- /dev/null
+++ b/examples/declarative/extending/binding/binding.pro
@@ -0,0 +1,19 @@
+TEMPLATE = app
+TARGET = binding
+DEPENDPATH += .
+INCLUDEPATH += .
+QT += declarative
+
+# Input
+SOURCES += main.cpp \
+ person.cpp \
+ birthdayparty.cpp \
+ happybirthday.cpp
+HEADERS += person.h \
+ birthdayparty.h \
+ happybirthday.h
+RESOURCES += binding.qrc
+target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/binding
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS binding.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/binding
+INSTALLS += target sources
diff --git a/examples/declarative/extending/binding/binding.qrc b/examples/declarative/extending/binding/binding.qrc
new file mode 100644
index 0000000000..e2fa01d5e7
--- /dev/null
+++ b/examples/declarative/extending/binding/binding.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>example.qml</file>
+</qresource>
+</RCC>
diff --git a/examples/declarative/extending/binding/birthdayparty.cpp b/examples/declarative/extending/binding/birthdayparty.cpp
new file mode 100644
index 0000000000..e5be2b9cf4
--- /dev/null
+++ b/examples/declarative/extending/binding/birthdayparty.cpp
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "birthdayparty.h"
+
+BirthdayPartyAttached::BirthdayPartyAttached(QObject *object)
+: QObject(object)
+{
+}
+
+QDate BirthdayPartyAttached::rsvp() const
+{
+ return m_rsvp;
+}
+
+void BirthdayPartyAttached::setRsvp(const QDate &d)
+{
+ if (d != m_rsvp) {
+ m_rsvp = d;
+ emit rsvpChanged();
+ }
+}
+
+
+BirthdayParty::BirthdayParty(QObject *parent)
+: QObject(parent), m_celebrant(0)
+{
+}
+
+Person *BirthdayParty::celebrant() const
+{
+ return m_celebrant;
+}
+
+void BirthdayParty::setCelebrant(Person *c)
+{
+ if (c == m_celebrant) return;
+ m_celebrant = c;
+ emit celebrantChanged();
+}
+
+QDeclarativeListProperty<Person> BirthdayParty::guests()
+{
+ return QDeclarativeListProperty<Person>(this, m_guests);
+}
+
+int BirthdayParty::guestCount() const
+{
+ return m_guests.count();
+}
+
+Person *BirthdayParty::guest(int index) const
+{
+ return m_guests.at(index);
+}
+
+void BirthdayParty::startParty()
+{
+ QTime time = QTime::currentTime();
+ emit partyStarted(time);
+}
+
+QString BirthdayParty::speaker() const
+{
+ return QString();
+}
+
+void BirthdayParty::setSpeaker(const QString &speak)
+{
+ qWarning() << qPrintable(speak);
+}
+
+BirthdayPartyAttached *BirthdayParty::qmlAttachedProperties(QObject *object)
+{
+ return new BirthdayPartyAttached(object);
+}
+
diff --git a/examples/declarative/extending/binding/birthdayparty.h b/examples/declarative/extending/binding/birthdayparty.h
new file mode 100644
index 0000000000..84864427ad
--- /dev/null
+++ b/examples/declarative/extending/binding/birthdayparty.h
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef BIRTHDAYPARTY_H
+#define BIRTHDAYPARTY_H
+
+#include <QObject>
+#include <QDate>
+#include <QDebug>
+#include <qdeclarative.h>
+#include "person.h"
+
+class BirthdayPartyAttached : public QObject
+{
+Q_OBJECT
+Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp NOTIFY rsvpChanged)
+public:
+ BirthdayPartyAttached(QObject *object);
+
+ QDate rsvp() const;
+ void setRsvp(const QDate &);
+
+signals:
+ void rsvpChanged();
+
+private:
+ QDate m_rsvp;
+};
+QML_DECLARE_TYPE(BirthdayPartyAttached)
+
+class BirthdayParty : public QObject
+{
+Q_OBJECT
+// ![0]
+Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant NOTIFY celebrantChanged)
+// ![0]
+Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+Q_PROPERTY(QString speaker READ speaker WRITE setSpeaker)
+Q_CLASSINFO("DefaultProperty", "guests")
+public:
+ BirthdayParty(QObject *parent = 0);
+
+ Person *celebrant() const;
+ void setCelebrant(Person *);
+
+ QDeclarativeListProperty<Person> guests();
+ int guestCount() const;
+ Person *guest(int) const;
+
+ QString speaker() const;
+ void setSpeaker(const QString &);
+
+ static BirthdayPartyAttached *qmlAttachedProperties(QObject *);
+
+ void startParty();
+signals:
+ void partyStarted(const QTime &time);
+ void celebrantChanged();
+
+private:
+ Person *m_celebrant;
+ QList<Person *> m_guests;
+};
+
+QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(BirthdayParty)
+
+#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/extending/binding/example.qml b/examples/declarative/extending/binding/example.qml
new file mode 100644
index 0000000000..b66bc86f2e
--- /dev/null
+++ b/examples/declarative/extending/binding/example.qml
@@ -0,0 +1,37 @@
+import People 1.0
+
+// ![0]
+BirthdayParty {
+ id: theParty
+
+ speaker: HappyBirthday { name: theParty.celebrant.name }
+
+ celebrant: Boy {
+ name: "Bob Jones"
+ shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
+ }
+// ![0]
+ onPartyStarted: console.log("This party started rockin' at " + time);
+
+
+ Boy {
+ name: "Joan Hodges"
+ BirthdayParty.rsvp: "2009-07-06"
+ shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
+ }
+ Boy {
+ name: "Jack Smith"
+ shoe { size: 8; color: "blue"; brand: "Puma"; price: 19.95 }
+ }
+ Girl {
+ name: "Anne Brown"
+ BirthdayParty.rsvp: "2009-07-01"
+ shoe.size: 7
+ shoe.color: "red"
+ shoe.brand: "Marc Jacobs"
+ shoe.price: 699.99
+ }
+
+// ![1]
+}
+// ![1]
diff --git a/examples/declarative/extending/binding/happybirthday.cpp b/examples/declarative/extending/binding/happybirthday.cpp
new file mode 100644
index 0000000000..aa5f937cf3
--- /dev/null
+++ b/examples/declarative/extending/binding/happybirthday.cpp
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "happybirthday.h"
+#include <QTimer>
+
+HappyBirthday::HappyBirthday(QObject *parent)
+: QObject(parent), m_line(-1)
+{
+ setName(QString());
+ QTimer *timer = new QTimer(this);
+ QObject::connect(timer, SIGNAL(timeout()), this, SLOT(advance()));
+ timer->start(1000);
+}
+
+void HappyBirthday::setTarget(const QDeclarativeProperty &p)
+{
+ m_target = p;
+}
+
+QString HappyBirthday::name() const
+{
+ return m_name;
+}
+
+void HappyBirthday::setName(const QString &name)
+{
+ if (m_name == name)
+ return;
+
+ m_name = name;
+
+ m_lyrics.clear();
+ m_lyrics << "Happy birthday to you,";
+ m_lyrics << "Happy birthday to you,";
+ m_lyrics << "Happy birthday dear " + m_name + ",";
+ m_lyrics << "Happy birthday to you!";
+ m_lyrics << "";
+
+ emit nameChanged();
+}
+
+void HappyBirthday::advance()
+{
+ m_line = (m_line + 1) % m_lyrics.count();
+
+ m_target.write(m_lyrics.at(m_line));
+}
+
diff --git a/examples/declarative/extending/binding/happybirthday.h b/examples/declarative/extending/binding/happybirthday.h
new file mode 100644
index 0000000000..eb2da5e91d
--- /dev/null
+++ b/examples/declarative/extending/binding/happybirthday.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef HAPPYBIRTHDAY_H
+#define HAPPYBIRTHDAY_H
+
+#include <QDeclarativePropertyValueSource>
+#include <QDeclarativeProperty>
+#include <qdeclarative.h>
+
+#include <QStringList>
+
+class HappyBirthday : public QObject, public QDeclarativePropertyValueSource
+{
+Q_OBJECT
+Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
+public:
+ HappyBirthday(QObject *parent = 0);
+
+ virtual void setTarget(const QDeclarativeProperty &);
+
+ QString name() const;
+ void setName(const QString &);
+
+private slots:
+ void advance();
+
+signals:
+ void nameChanged();
+private:
+ int m_line;
+ QStringList m_lyrics;
+ QDeclarativeProperty m_target;
+ QString m_name;
+};
+QML_DECLARE_TYPE(HappyBirthday);
+
+#endif // HAPPYBIRTHDAY_H
+
diff --git a/examples/declarative/extending/binding/main.cpp b/examples/declarative/extending/binding/main.cpp
new file mode 100644
index 0000000000..873f8c970a
--- /dev/null
+++ b/examples/declarative/extending/binding/main.cpp
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QCoreApplication>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QDebug>
+#include "birthdayparty.h"
+#include "happybirthday.h"
+#include "person.h"
+
+int main(int argc, char ** argv)
+{
+ QCoreApplication app(argc, argv);
+
+ QML_REGISTER_NOCREATE_TYPE(BirthdayPartyAttached);
+ QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty);
+ QML_REGISTER_TYPE(People, 1,0, HappyBirthday, HappyBirthday);
+ QML_REGISTER_NOCREATE_TYPE(ShoeDescription);
+ QML_REGISTER_NOCREATE_TYPE(Person);
+ QML_REGISTER_TYPE(People, 1,0, Boy, Boy);
+ QML_REGISTER_TYPE(People, 1,0, Girl, Girl);
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, ":example.qml");
+ BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
+
+ if (party && party->celebrant()) {
+ qWarning() << party->celebrant()->name() << "is having a birthday!";
+
+ if (qobject_cast<Boy *>(party->celebrant()))
+ qWarning() << "He is inviting:";
+ else
+ qWarning() << "She is inviting:";
+
+ for (int ii = 0; ii < party->guestCount(); ++ii) {
+ Person *guest = party->guest(ii);
+
+ QDate rsvpDate;
+ QObject *attached =
+ qmlAttachedPropertiesObject<BirthdayParty>(guest, false);
+ if (attached)
+ rsvpDate = attached->property("rsvp").toDate();
+
+ if (rsvpDate.isNull())
+ qWarning() << " " << guest->name() << "RSVP date: Hasn't RSVP'd";
+ else
+ qWarning() << " " << guest->name() << "RSVP date:" << qPrintable(rsvpDate.toString());
+ }
+
+ party->startParty();
+ } else {
+ qWarning() << "An error occured";
+ }
+
+ return app.exec();
+}
diff --git a/examples/declarative/extending/binding/person.cpp b/examples/declarative/extending/binding/person.cpp
new file mode 100644
index 0000000000..9a2248f92d
--- /dev/null
+++ b/examples/declarative/extending/binding/person.cpp
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "person.h"
+
+ShoeDescription::ShoeDescription(QObject *parent)
+: QObject(parent), m_size(0), m_price(0)
+{
+}
+
+int ShoeDescription::size() const
+{
+ return m_size;
+}
+
+void ShoeDescription::setSize(int s)
+{
+ if (m_size == s)
+ return;
+
+ m_size = s;
+ emit shoeChanged();
+}
+
+QColor ShoeDescription::color() const
+{
+ return m_color;
+}
+
+void ShoeDescription::setColor(const QColor &c)
+{
+ if (m_color == c)
+ return;
+
+ m_color = c;
+ emit shoeChanged();
+}
+
+QString ShoeDescription::brand() const
+{
+ return m_brand;
+}
+
+void ShoeDescription::setBrand(const QString &b)
+{
+ if (m_brand == b)
+ return;
+
+ m_brand = b;
+ emit shoeChanged();
+}
+
+qreal ShoeDescription::price() const
+{
+ return m_price;
+}
+
+void ShoeDescription::setPrice(qreal p)
+{
+ if (m_price == p)
+ return;
+
+ m_price = p;
+ emit shoeChanged();
+}
+
+Person::Person(QObject *parent)
+: QObject(parent)
+{
+}
+
+QString Person::name() const
+{
+ return m_name;
+}
+
+void Person::setName(const QString &n)
+{
+ if (m_name == n)
+ return;
+
+ m_name = n;
+ emit nameChanged();
+}
+
+ShoeDescription *Person::shoe()
+{
+ return &m_shoe;
+}
+
+
+Boy::Boy(QObject * parent)
+: Person(parent)
+{
+}
+
+
+Girl::Girl(QObject * parent)
+: Person(parent)
+{
+}
+
diff --git a/examples/declarative/extending/binding/person.h b/examples/declarative/extending/binding/person.h
new file mode 100644
index 0000000000..1bec71c401
--- /dev/null
+++ b/examples/declarative/extending/binding/person.h
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef PERSON_H
+#define PERSON_H
+
+#include <QObject>
+#include <QColor>
+#include <qdeclarative.h>
+
+class ShoeDescription : public QObject {
+Q_OBJECT
+Q_PROPERTY(int size READ size WRITE setSize NOTIFY shoeChanged)
+Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY shoeChanged)
+Q_PROPERTY(QString brand READ brand WRITE setBrand NOTIFY shoeChanged)
+Q_PROPERTY(qreal price READ price WRITE setPrice NOTIFY shoeChanged)
+public:
+ ShoeDescription(QObject *parent = 0);
+
+ int size() const;
+ void setSize(int);
+
+ QColor color() const;
+ void setColor(const QColor &);
+
+ QString brand() const;
+ void setBrand(const QString &);
+
+ qreal price() const;
+ void setPrice(qreal);
+signals:
+ void shoeChanged();
+
+private:
+ int m_size;
+ QColor m_color;
+ QString m_brand;
+ qreal m_price;
+};
+QML_DECLARE_TYPE(ShoeDescription);
+
+class Person : public QObject {
+Q_OBJECT
+Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
+// ![0]
+Q_PROPERTY(ShoeDescription *shoe READ shoe CONSTANT);
+// ![0]
+public:
+ Person(QObject *parent = 0);
+
+ QString name() const;
+ void setName(const QString &);
+
+ ShoeDescription *shoe();
+signals:
+ void nameChanged();
+
+private:
+ QString m_name;
+ ShoeDescription m_shoe;
+};
+QML_DECLARE_TYPE(Person);
+
+class Boy : public Person {
+Q_OBJECT
+public:
+ Boy(QObject * parent = 0);
+};
+QML_DECLARE_TYPE(Boy);
+
+class Girl : public Person {
+Q_OBJECT
+public:
+ Girl(QObject * parent = 0);
+};
+QML_DECLARE_TYPE(Girl);
+
+#endif // PERSON_H
diff --git a/examples/declarative/extending/coercion/birthdayparty.cpp b/examples/declarative/extending/coercion/birthdayparty.cpp
new file mode 100644
index 0000000000..523a42dbf8
--- /dev/null
+++ b/examples/declarative/extending/coercion/birthdayparty.cpp
@@ -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 examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "birthdayparty.h"
+
+BirthdayParty::BirthdayParty(QObject *parent)
+: QObject(parent), m_celebrant(0)
+{
+}
+
+Person *BirthdayParty::celebrant() const
+{
+ return m_celebrant;
+}
+
+void BirthdayParty::setCelebrant(Person *c)
+{
+ m_celebrant = c;
+}
+
+QDeclarativeListProperty<Person> BirthdayParty::guests()
+{
+ return QDeclarativeListProperty<Person>(this, m_guests);
+}
+
+int BirthdayParty::guestCount() const
+{
+ return m_guests.count();
+}
+
+Person *BirthdayParty::guest(int index) const
+{
+ return m_guests.at(index);
+}
+
diff --git a/examples/declarative/extending/coercion/birthdayparty.h b/examples/declarative/extending/coercion/birthdayparty.h
new file mode 100644
index 0000000000..fffd407c80
--- /dev/null
+++ b/examples/declarative/extending/coercion/birthdayparty.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef BIRTHDAYPARTY_H
+#define BIRTHDAYPARTY_H
+
+#include <QObject>
+#include <qdeclarative.h>
+#include "person.h"
+
+class BirthdayParty : public QObject
+{
+Q_OBJECT
+// ![0]
+Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
+Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+// ![0]
+public:
+ BirthdayParty(QObject *parent = 0);
+
+ Person *celebrant() const;
+ void setCelebrant(Person *);
+
+ QDeclarativeListProperty<Person> guests();
+ int guestCount() const;
+ Person *guest(int) const;
+
+private:
+ Person *m_celebrant;
+ QList<Person *> m_guests;
+};
+QML_DECLARE_TYPE(BirthdayParty);
+
+#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/extending/coercion/coercion.pro b/examples/declarative/extending/coercion/coercion.pro
new file mode 100644
index 0000000000..c8daed813a
--- /dev/null
+++ b/examples/declarative/extending/coercion/coercion.pro
@@ -0,0 +1,17 @@
+TEMPLATE = app
+TARGET = coercion
+DEPENDPATH += .
+INCLUDEPATH += .
+QT += declarative
+
+# Input
+SOURCES += main.cpp \
+ person.cpp \
+ birthdayparty.cpp
+HEADERS += person.h \
+ birthdayparty.h
+RESOURCES += coercion.qrc
+target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/coercion
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS coercion.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/coercion
+INSTALLS += target sources
diff --git a/examples/declarative/extending/coercion/coercion.qrc b/examples/declarative/extending/coercion/coercion.qrc
new file mode 100644
index 0000000000..e2fa01d5e7
--- /dev/null
+++ b/examples/declarative/extending/coercion/coercion.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>example.qml</file>
+</qresource>
+</RCC>
diff --git a/examples/declarative/extending/coercion/example.qml b/examples/declarative/extending/coercion/example.qml
new file mode 100644
index 0000000000..64d26b0087
--- /dev/null
+++ b/examples/declarative/extending/coercion/example.qml
@@ -0,0 +1,15 @@
+import People 1.0
+
+// ![0]
+BirthdayParty {
+ celebrant: Boy {
+ name: "Bob Jones"
+ shoeSize: 12
+ }
+ guests: [
+ Boy { name: "Joan Hodges" },
+ Boy { name: "Jack Smith" },
+ Girl { name: "Anne Brown" }
+ ]
+}
+// ![0]
diff --git a/examples/declarative/extending/coercion/main.cpp b/examples/declarative/extending/coercion/main.cpp
new file mode 100644
index 0000000000..1e2209f941
--- /dev/null
+++ b/examples/declarative/extending/coercion/main.cpp
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QCoreApplication>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QDebug>
+#include "birthdayparty.h"
+#include "person.h"
+
+int main(int argc, char ** argv)
+{
+ QCoreApplication app(argc, argv);
+
+ QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty);
+// ![0]
+ QML_REGISTER_NOCREATE_TYPE(Person);
+// ![0]
+ QML_REGISTER_TYPE(People, 1,0, Boy, Boy);
+ QML_REGISTER_TYPE(People, 1,0, Girl, Girl);
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, ":example.qml");
+ BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
+
+ if (party && party->celebrant()) {
+ qWarning() << party->celebrant()->name() << "is having a birthday!";
+
+ if (qobject_cast<Boy *>(party->celebrant()))
+ qWarning() << "He is inviting:";
+ else
+ qWarning() << "She is inviting:";
+
+ for (int ii = 0; ii < party->guestCount(); ++ii)
+ qWarning() << " " << party->guest(ii)->name();
+ } else {
+ qWarning() << "An error occured";
+ }
+
+ return 0;
+}
diff --git a/examples/declarative/extending/coercion/person.cpp b/examples/declarative/extending/coercion/person.cpp
new file mode 100644
index 0000000000..5b5203add6
--- /dev/null
+++ b/examples/declarative/extending/coercion/person.cpp
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "person.h"
+
+Person::Person(QObject *parent)
+: QObject(parent), m_shoeSize(0)
+{
+}
+
+QString Person::name() const
+{
+ return m_name;
+}
+
+void Person::setName(const QString &n)
+{
+ m_name = n;
+}
+
+int Person::shoeSize() const
+{
+ return m_shoeSize;
+}
+
+void Person::setShoeSize(int s)
+{
+ m_shoeSize = s;
+}
+
+// ![1]
+Boy::Boy(QObject * parent)
+: Person(parent)
+{
+}
+
+
+Girl::Girl(QObject * parent)
+: Person(parent)
+{
+}
+
+// ![1]
diff --git a/examples/declarative/extending/coercion/person.h b/examples/declarative/extending/coercion/person.h
new file mode 100644
index 0000000000..298ffb1a3f
--- /dev/null
+++ b/examples/declarative/extending/coercion/person.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef PERSON_H
+#define PERSON_H
+
+#include <QObject>
+#include <qdeclarative.h>
+
+class Person : public QObject {
+Q_OBJECT
+Q_PROPERTY(QString name READ name WRITE setName)
+Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
+public:
+ Person(QObject *parent = 0);
+
+ QString name() const;
+ void setName(const QString &);
+
+ int shoeSize() const;
+ void setShoeSize(int);
+private:
+ QString m_name;
+ int m_shoeSize;
+};
+QML_DECLARE_TYPE(Person);
+
+// ![0]
+class Boy : public Person {
+Q_OBJECT
+public:
+ Boy(QObject * parent = 0);
+};
+QML_DECLARE_TYPE(Boy);
+
+class Girl : public Person {
+Q_OBJECT
+public:
+ Girl(QObject * parent = 0);
+};
+QML_DECLARE_TYPE(Girl);
+// ![0]
+
+#endif // PERSON_H
diff --git a/examples/declarative/extending/default/birthdayparty.cpp b/examples/declarative/extending/default/birthdayparty.cpp
new file mode 100644
index 0000000000..523a42dbf8
--- /dev/null
+++ b/examples/declarative/extending/default/birthdayparty.cpp
@@ -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 examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "birthdayparty.h"
+
+BirthdayParty::BirthdayParty(QObject *parent)
+: QObject(parent), m_celebrant(0)
+{
+}
+
+Person *BirthdayParty::celebrant() const
+{
+ return m_celebrant;
+}
+
+void BirthdayParty::setCelebrant(Person *c)
+{
+ m_celebrant = c;
+}
+
+QDeclarativeListProperty<Person> BirthdayParty::guests()
+{
+ return QDeclarativeListProperty<Person>(this, m_guests);
+}
+
+int BirthdayParty::guestCount() const
+{
+ return m_guests.count();
+}
+
+Person *BirthdayParty::guest(int index) const
+{
+ return m_guests.at(index);
+}
+
diff --git a/examples/declarative/extending/default/birthdayparty.h b/examples/declarative/extending/default/birthdayparty.h
new file mode 100644
index 0000000000..49c20bd118
--- /dev/null
+++ b/examples/declarative/extending/default/birthdayparty.h
@@ -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 examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef BIRTHDAYPARTY_H
+#define BIRTHDAYPARTY_H
+
+#include <QObject>
+#include <qdeclarative.h>
+#include "person.h"
+
+// ![0]
+class BirthdayParty : public QObject
+{
+Q_OBJECT
+Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
+Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+Q_CLASSINFO("DefaultProperty", "guests")
+public:
+ BirthdayParty(QObject *parent = 0);
+
+ Person *celebrant() const;
+ void setCelebrant(Person *);
+
+ QDeclarativeListProperty<Person> guests();
+ int guestCount() const;
+ Person *guest(int) const;
+
+private:
+ Person *m_celebrant;
+ QList<Person *> m_guests;
+};
+// ![0]
+QML_DECLARE_TYPE(BirthdayParty);
+
+#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/extending/default/default.pro b/examples/declarative/extending/default/default.pro
new file mode 100644
index 0000000000..32aff0bd8c
--- /dev/null
+++ b/examples/declarative/extending/default/default.pro
@@ -0,0 +1,17 @@
+TEMPLATE = app
+TARGET = default
+DEPENDPATH += .
+INCLUDEPATH += .
+QT += declarative
+
+# Input
+SOURCES += main.cpp \
+ person.cpp \
+ birthdayparty.cpp
+HEADERS += person.h \
+ birthdayparty.h
+RESOURCES += default.qrc
+target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/default
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS default.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/default
+INSTALLS += target sources
diff --git a/examples/declarative/extending/default/default.qrc b/examples/declarative/extending/default/default.qrc
new file mode 100644
index 0000000000..e2fa01d5e7
--- /dev/null
+++ b/examples/declarative/extending/default/default.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>example.qml</file>
+</qresource>
+</RCC>
diff --git a/examples/declarative/extending/default/example.qml b/examples/declarative/extending/default/example.qml
new file mode 100644
index 0000000000..58035f92a9
--- /dev/null
+++ b/examples/declarative/extending/default/example.qml
@@ -0,0 +1,14 @@
+import People 1.0
+
+// ![0]
+BirthdayParty {
+ celebrant: Boy {
+ name: "Bob Jones"
+ shoeSize: 12
+ }
+
+ Boy { name: "Joan Hodges" }
+ Boy { name: "Jack Smith" }
+ Girl { name: "Anne Brown" }
+}
+// ![0]
diff --git a/examples/declarative/extending/default/main.cpp b/examples/declarative/extending/default/main.cpp
new file mode 100644
index 0000000000..7d7f8a136f
--- /dev/null
+++ b/examples/declarative/extending/default/main.cpp
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QCoreApplication>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QDebug>
+#include "birthdayparty.h"
+#include "person.h"
+
+int main(int argc, char ** argv)
+{
+ QCoreApplication app(argc, argv);
+
+ QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty);
+ QML_REGISTER_NOCREATE_TYPE(Person);
+ QML_REGISTER_TYPE(People, 1,0, Boy, Boy);
+ QML_REGISTER_TYPE(People, 1,0, Girl, Girl);
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, ":example.qml");
+ BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
+
+ if (party && party->celebrant()) {
+ qWarning() << party->celebrant()->name() << "is having a birthday!";
+
+ if (qobject_cast<Boy *>(party->celebrant()))
+ qWarning() << "He is inviting:";
+ else
+ qWarning() << "She is inviting:";
+
+ for (int ii = 0; ii < party->guestCount(); ++ii)
+ qWarning() << " " << party->guest(ii)->name();
+ } else {
+ qWarning() << "An error occured";
+ }
+
+ return 0;
+}
diff --git a/examples/declarative/extending/default/person.cpp b/examples/declarative/extending/default/person.cpp
new file mode 100644
index 0000000000..69216d3539
--- /dev/null
+++ b/examples/declarative/extending/default/person.cpp
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "person.h"
+
+Person::Person(QObject *parent)
+: QObject(parent), m_shoeSize(0)
+{
+}
+
+QString Person::name() const
+{
+ return m_name;
+}
+
+void Person::setName(const QString &n)
+{
+ m_name = n;
+}
+
+int Person::shoeSize() const
+{
+ return m_shoeSize;
+}
+
+void Person::setShoeSize(int s)
+{
+ m_shoeSize = s;
+}
+
+
+Boy::Boy(QObject * parent)
+: Person(parent)
+{
+}
+
+
+Girl::Girl(QObject * parent)
+: Person(parent)
+{
+}
+
diff --git a/examples/declarative/extending/default/person.h b/examples/declarative/extending/default/person.h
new file mode 100644
index 0000000000..b3eceaab8d
--- /dev/null
+++ b/examples/declarative/extending/default/person.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef PERSON_H
+#define PERSON_H
+
+#include <QObject>
+#include <qdeclarative.h>
+
+class Person : public QObject {
+Q_OBJECT
+Q_PROPERTY(QString name READ name WRITE setName)
+Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
+public:
+ Person(QObject *parent = 0);
+
+ QString name() const;
+ void setName(const QString &);
+
+ int shoeSize() const;
+ void setShoeSize(int);
+private:
+ QString m_name;
+ int m_shoeSize;
+};
+QML_DECLARE_TYPE(Person);
+
+class Boy : public Person {
+Q_OBJECT
+public:
+ Boy(QObject * parent = 0);
+};
+QML_DECLARE_TYPE(Boy);
+
+class Girl : public Person {
+Q_OBJECT
+public:
+ Girl(QObject * parent = 0);
+};
+QML_DECLARE_TYPE(Girl);
+
+#endif // PERSON_H
diff --git a/examples/declarative/extending/extended/example.qml b/examples/declarative/extending/extended/example.qml
new file mode 100644
index 0000000000..985ce2008c
--- /dev/null
+++ b/examples/declarative/extending/extended/example.qml
@@ -0,0 +1,7 @@
+import People 1.0
+
+// ![0]
+QLineEdit {
+ leftMargin: 20
+}
+// ![0]
diff --git a/examples/declarative/extending/extended/extended.pro b/examples/declarative/extending/extended/extended.pro
new file mode 100644
index 0000000000..97af286eb4
--- /dev/null
+++ b/examples/declarative/extending/extended/extended.pro
@@ -0,0 +1,15 @@
+TEMPLATE = app
+TARGET = extended
+DEPENDPATH += .
+INCLUDEPATH += .
+QT += declarative
+
+# Input
+SOURCES += main.cpp \
+ lineedit.cpp
+HEADERS += lineedit.h
+RESOURCES += extended.qrc
+target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/extended
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS extended.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/extended
+INSTALLS += target sources
diff --git a/examples/declarative/extending/extended/extended.qrc b/examples/declarative/extending/extended/extended.qrc
new file mode 100644
index 0000000000..e2fa01d5e7
--- /dev/null
+++ b/examples/declarative/extending/extended/extended.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>example.qml</file>
+</qresource>
+</RCC>
diff --git a/examples/declarative/extending/extended/lineedit.cpp b/examples/declarative/extending/extended/lineedit.cpp
new file mode 100644
index 0000000000..417fbd9f27
--- /dev/null
+++ b/examples/declarative/extending/extended/lineedit.cpp
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "lineedit.h"
+#include <qdeclarative.h>
+
+LineEditExtension::LineEditExtension(QObject *object)
+: QObject(object), m_lineedit(static_cast<QLineEdit *>(object))
+{
+}
+
+int LineEditExtension::leftMargin() const
+{
+ int l, r, t, b;
+ m_lineedit->getTextMargins(&l, &t, &r, &b);
+ return l;
+}
+
+void LineEditExtension::setLeftMargin(int m)
+{
+ int l, r, t, b;
+ m_lineedit->getTextMargins(&l, &t, &r, &b);
+ m_lineedit->setTextMargins(m, t, r, b);
+}
+
+int LineEditExtension::rightMargin() const
+{
+ int l, r, t, b;
+ m_lineedit->getTextMargins(&l, &t, &r, &b);
+ return r;
+}
+
+void LineEditExtension::setRightMargin(int m)
+{
+ int l, r, t, b;
+ m_lineedit->getTextMargins(&l, &t, &r, &b);
+ m_lineedit->setTextMargins(l, t, m, b);
+}
+
+int LineEditExtension::topMargin() const
+{
+ int l, r, t, b;
+ m_lineedit->getTextMargins(&l, &t, &r, &b);
+ return t;
+}
+
+void LineEditExtension::setTopMargin(int m)
+{
+ int l, r, t, b;
+ m_lineedit->getTextMargins(&l, &t, &r, &b);
+ m_lineedit->setTextMargins(l, m, r, b);
+}
+
+int LineEditExtension::bottomMargin() const
+{
+ int l, r, t, b;
+ m_lineedit->getTextMargins(&l, &t, &r, &b);
+ return b;
+}
+
+void LineEditExtension::setBottomMargin(int m)
+{
+ int l, r, t, b;
+ m_lineedit->getTextMargins(&l, &t, &r, &b);
+ m_lineedit->setTextMargins(l, t, r, m);
+}
+
+QML_DECLARE_TYPE(QLineEdit);
diff --git a/examples/declarative/extending/extended/lineedit.h b/examples/declarative/extending/extended/lineedit.h
new file mode 100644
index 0000000000..ca96d058a0
--- /dev/null
+++ b/examples/declarative/extending/extended/lineedit.h
@@ -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 examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef LINEEDIT_H
+#define LINEEDIT_H
+
+#include <QLineEdit>
+
+class LineEditExtension : public QObject
+{
+Q_OBJECT
+Q_PROPERTY(int leftMargin READ leftMargin WRITE setLeftMargin NOTIFY marginsChanged);
+Q_PROPERTY(int rightMargin READ rightMargin WRITE setRightMargin NOTIFY marginsChanged);
+Q_PROPERTY(int topMargin READ topMargin WRITE setTopMargin NOTIFY marginsChanged);
+Q_PROPERTY(int bottomMargin READ bottomMargin WRITE setBottomMargin NOTIFY marginsChanged);
+public:
+ LineEditExtension(QObject *);
+
+ int leftMargin() const;
+ void setLeftMargin(int);
+
+ int rightMargin() const;
+ void setRightMargin(int);
+
+ int topMargin() const;
+ void setTopMargin(int);
+
+ int bottomMargin() const;
+ void setBottomMargin(int);
+signals:
+ void marginsChanged();
+
+private:
+ QLineEdit *m_lineedit;
+};
+
+#endif // LINEEDIT_H
diff --git a/examples/declarative/extending/extended/main.cpp b/examples/declarative/extending/extended/main.cpp
new file mode 100644
index 0000000000..5cbeea3bcc
--- /dev/null
+++ b/examples/declarative/extending/extended/main.cpp
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QApplication>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QDebug>
+#include <QLineEdit>
+#include "lineedit.h"
+
+int main(int argc, char ** argv)
+{
+ QApplication app(argc, argv);
+
+ QML_REGISTER_EXTENDED_TYPE(People, 1,0, QLineEdit, QLineEdit, LineEditExtension);
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, ":example.qml");
+ QLineEdit *edit = qobject_cast<QLineEdit *>(component.create());
+
+ if (edit) {
+ edit->show();
+ return app.exec();
+ } else {
+ qWarning() << "An error occured";
+ return 0;
+ }
+}
diff --git a/examples/declarative/extending/extending.pro b/examples/declarative/extending/extending.pro
new file mode 100644
index 0000000000..169c7abde2
--- /dev/null
+++ b/examples/declarative/extending/extending.pro
@@ -0,0 +1,13 @@
+TEMPLATE = subdirs
+
+SUBDIRS += \
+ adding \
+ attached \
+ binding \
+ coercion \
+ default \
+ extended \
+ grouped \
+ properties \
+ signal \
+ valuesource
diff --git a/examples/declarative/extending/grouped/birthdayparty.cpp b/examples/declarative/extending/grouped/birthdayparty.cpp
new file mode 100644
index 0000000000..523a42dbf8
--- /dev/null
+++ b/examples/declarative/extending/grouped/birthdayparty.cpp
@@ -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 examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "birthdayparty.h"
+
+BirthdayParty::BirthdayParty(QObject *parent)
+: QObject(parent), m_celebrant(0)
+{
+}
+
+Person *BirthdayParty::celebrant() const
+{
+ return m_celebrant;
+}
+
+void BirthdayParty::setCelebrant(Person *c)
+{
+ m_celebrant = c;
+}
+
+QDeclarativeListProperty<Person> BirthdayParty::guests()
+{
+ return QDeclarativeListProperty<Person>(this, m_guests);
+}
+
+int BirthdayParty::guestCount() const
+{
+ return m_guests.count();
+}
+
+Person *BirthdayParty::guest(int index) const
+{
+ return m_guests.at(index);
+}
+
diff --git a/examples/declarative/extending/grouped/birthdayparty.h b/examples/declarative/extending/grouped/birthdayparty.h
new file mode 100644
index 0000000000..42439c4f1a
--- /dev/null
+++ b/examples/declarative/extending/grouped/birthdayparty.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef BIRTHDAYPARTY_H
+#define BIRTHDAYPARTY_H
+
+#include <QObject>
+#include <qdeclarative.h>
+#include "person.h"
+
+class BirthdayParty : public QObject
+{
+Q_OBJECT
+Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
+Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+Q_CLASSINFO("DefaultProperty", "guests")
+public:
+ BirthdayParty(QObject *parent = 0);
+
+ Person *celebrant() const;
+ void setCelebrant(Person *);
+
+ QDeclarativeListProperty<Person> guests();
+ int guestCount() const;
+ Person *guest(int) const;
+
+private:
+ Person *m_celebrant;
+ QList<Person *> m_guests;
+};
+QML_DECLARE_TYPE(BirthdayParty);
+
+#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/extending/grouped/example.qml b/examples/declarative/extending/grouped/example.qml
new file mode 100644
index 0000000000..55912ed585
--- /dev/null
+++ b/examples/declarative/extending/grouped/example.qml
@@ -0,0 +1,33 @@
+import People 1.0
+
+// ![0]
+BirthdayParty {
+ celebrant: Boy {
+ name: "Bob Jones"
+ shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
+ }
+
+ Boy {
+ name: "Joan Hodges"
+ shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
+ }
+ // ![1]
+ Boy {
+ name: "Jack Smith"
+ shoe {
+ size: 8
+ color: "blue"
+ brand: "Puma"
+ price: 19.95
+ }
+ }
+ // ![1]
+ Girl {
+ name: "Anne Brown"
+ shoe.size: 7
+ shoe.color: "red"
+ shoe.brand: "Marc Jacobs"
+ shoe.price: 699.99
+ }
+}
+// ![0]
diff --git a/examples/declarative/extending/grouped/grouped.pro b/examples/declarative/extending/grouped/grouped.pro
new file mode 100644
index 0000000000..576e1d202c
--- /dev/null
+++ b/examples/declarative/extending/grouped/grouped.pro
@@ -0,0 +1,17 @@
+TEMPLATE = app
+TARGET = grouped
+DEPENDPATH += .
+INCLUDEPATH += .
+QT += declarative
+
+# Input
+SOURCES += main.cpp \
+ person.cpp \
+ birthdayparty.cpp
+HEADERS += person.h \
+ birthdayparty.h
+RESOURCES += grouped.qrc
+target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/grouped
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS grouped.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/grouped
+INSTALLS += target sources
diff --git a/examples/declarative/extending/grouped/grouped.qrc b/examples/declarative/extending/grouped/grouped.qrc
new file mode 100644
index 0000000000..e2fa01d5e7
--- /dev/null
+++ b/examples/declarative/extending/grouped/grouped.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>example.qml</file>
+</qresource>
+</RCC>
diff --git a/examples/declarative/extending/grouped/main.cpp b/examples/declarative/extending/grouped/main.cpp
new file mode 100644
index 0000000000..15a0bb55f9
--- /dev/null
+++ b/examples/declarative/extending/grouped/main.cpp
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QCoreApplication>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QDebug>
+#include "birthdayparty.h"
+#include "person.h"
+
+int main(int argc, char ** argv)
+{
+ QCoreApplication app(argc, argv);
+
+ QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty);
+ QML_REGISTER_NOCREATE_TYPE(ShoeDescription);
+ QML_REGISTER_NOCREATE_TYPE(Person);
+ QML_REGISTER_TYPE(People, 1,0, Boy, Boy);
+ QML_REGISTER_TYPE(People, 1,0, Girl, Girl);
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, ":example.qml");
+ BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
+
+ if (party && party->celebrant()) {
+ qWarning() << party->celebrant()->name() << "is having a birthday!";
+
+ if (qobject_cast<Boy *>(party->celebrant()))
+ qWarning() << "He is inviting:";
+ else
+ qWarning() << "She is inviting:";
+
+ Person *bestShoe = 0;
+ for (int ii = 0; ii < party->guestCount(); ++ii) {
+ Person *guest = party->guest(ii);
+ qWarning() << " " << guest->name();
+
+ if (!bestShoe || bestShoe->shoe()->price() < guest->shoe()->price())
+ bestShoe = guest;
+ }
+ if (bestShoe)
+ qWarning() << bestShoe->name() << "is wearing the best shoes!";
+
+ } else {
+ qWarning() << "An error occured";
+ }
+
+ return 0;
+}
diff --git a/examples/declarative/extending/grouped/person.cpp b/examples/declarative/extending/grouped/person.cpp
new file mode 100644
index 0000000000..0a9e508302
--- /dev/null
+++ b/examples/declarative/extending/grouped/person.cpp
@@ -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 examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "person.h"
+
+ShoeDescription::ShoeDescription(QObject *parent)
+: QObject(parent), m_size(0), m_price(0)
+{
+}
+
+int ShoeDescription::size() const
+{
+ return m_size;
+}
+
+void ShoeDescription::setSize(int s)
+{
+ m_size = s;
+}
+
+QColor ShoeDescription::color() const
+{
+ return m_color;
+}
+
+void ShoeDescription::setColor(const QColor &c)
+{
+ m_color = c;
+}
+
+QString ShoeDescription::brand() const
+{
+ return m_brand;
+}
+
+void ShoeDescription::setBrand(const QString &b)
+{
+ m_brand = b;
+}
+
+qreal ShoeDescription::price() const
+{
+ return m_price;
+}
+
+void ShoeDescription::setPrice(qreal p)
+{
+ m_price = p;
+}
+
+Person::Person(QObject *parent)
+: QObject(parent)
+{
+}
+
+QString Person::name() const
+{
+ return m_name;
+}
+
+void Person::setName(const QString &n)
+{
+ m_name = n;
+}
+
+ShoeDescription *Person::shoe()
+{
+ return &m_shoe;
+}
+
+
+Boy::Boy(QObject * parent)
+: Person(parent)
+{
+}
+
+
+Girl::Girl(QObject * parent)
+: Person(parent)
+{
+}
+
diff --git a/examples/declarative/extending/grouped/person.h b/examples/declarative/extending/grouped/person.h
new file mode 100644
index 0000000000..5dab37823f
--- /dev/null
+++ b/examples/declarative/extending/grouped/person.h
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef PERSON_H
+#define PERSON_H
+
+#include <QObject>
+#include <QColor>
+#include <qdeclarative.h>
+
+class ShoeDescription : public QObject {
+Q_OBJECT
+Q_PROPERTY(int size READ size WRITE setSize)
+Q_PROPERTY(QColor color READ color WRITE setColor)
+Q_PROPERTY(QString brand READ brand WRITE setBrand)
+Q_PROPERTY(qreal price READ price WRITE setPrice)
+public:
+ ShoeDescription(QObject *parent = 0);
+
+ int size() const;
+ void setSize(int);
+
+ QColor color() const;
+ void setColor(const QColor &);
+
+ QString brand() const;
+ void setBrand(const QString &);
+
+ qreal price() const;
+ void setPrice(qreal);
+private:
+ int m_size;
+ QColor m_color;
+ QString m_brand;
+ qreal m_price;
+};
+QML_DECLARE_TYPE(ShoeDescription);
+
+class Person : public QObject {
+Q_OBJECT
+Q_PROPERTY(QString name READ name WRITE setName)
+// ![1]
+Q_PROPERTY(ShoeDescription *shoe READ shoe);
+// ![1]
+public:
+ Person(QObject *parent = 0);
+
+ QString name() const;
+ void setName(const QString &);
+
+ ShoeDescription *shoe();
+private:
+ QString m_name;
+ ShoeDescription m_shoe;
+};
+QML_DECLARE_TYPE(Person);
+
+class Boy : public Person {
+Q_OBJECT
+public:
+ Boy(QObject * parent = 0);
+};
+QML_DECLARE_TYPE(Boy);
+
+class Girl : public Person {
+Q_OBJECT
+public:
+ Girl(QObject * parent = 0);
+};
+QML_DECLARE_TYPE(Girl);
+
+#endif // PERSON_H
diff --git a/examples/declarative/extending/properties/birthdayparty.cpp b/examples/declarative/extending/properties/birthdayparty.cpp
new file mode 100644
index 0000000000..14fd6a3ad4
--- /dev/null
+++ b/examples/declarative/extending/properties/birthdayparty.cpp
@@ -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 examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "birthdayparty.h"
+
+BirthdayParty::BirthdayParty(QObject *parent)
+: QObject(parent), m_celebrant(0)
+{
+}
+
+// ![0]
+Person *BirthdayParty::celebrant() const
+{
+ return m_celebrant;
+}
+
+void BirthdayParty::setCelebrant(Person *c)
+{
+ m_celebrant = c;
+}
+
+QDeclarativeListProperty<Person> BirthdayParty::guests()
+{
+ return QDeclarativeListProperty<Person>(this, m_guests);
+}
+
+int BirthdayParty::guestCount() const
+{
+ return m_guests.count();
+}
+
+Person *BirthdayParty::guest(int index) const
+{
+ return m_guests.at(index);
+}
+// ![0]
+
diff --git a/examples/declarative/extending/properties/birthdayparty.h b/examples/declarative/extending/properties/birthdayparty.h
new file mode 100644
index 0000000000..c4cb536ec2
--- /dev/null
+++ b/examples/declarative/extending/properties/birthdayparty.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef BIRTHDAYPARTY_H
+#define BIRTHDAYPARTY_H
+
+#include <QObject>
+#include <qdeclarative.h>
+#include "person.h"
+
+// ![0]
+class BirthdayParty : public QObject
+{
+Q_OBJECT
+// ![0]
+// ![1]
+Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
+// ![1]
+// ![2]
+Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+// ![2]
+// ![3]
+public:
+ BirthdayParty(QObject *parent = 0);
+
+ Person *celebrant() const;
+ void setCelebrant(Person *);
+
+ QDeclarativeListProperty<Person> guests();
+ int guestCount() const;
+ Person *guest(int) const;
+
+private:
+ Person *m_celebrant;
+ QList<Person *> m_guests;
+};
+QML_DECLARE_TYPE(BirthdayParty);
+// ![3]
+
+#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/extending/properties/example.qml b/examples/declarative/extending/properties/example.qml
new file mode 100644
index 0000000000..9594a841f1
--- /dev/null
+++ b/examples/declarative/extending/properties/example.qml
@@ -0,0 +1,15 @@
+import People 1.0
+
+// ![0]
+BirthdayParty {
+ celebrant: Person {
+ name: "Bob Jones"
+ shoeSize: 12
+ }
+ guests: [
+ Person { name: "Joan Hodges" },
+ Person { name: "Jack Smith" },
+ Person { name: "Anne Brown" }
+ ]
+}
+// ![0]
diff --git a/examples/declarative/extending/properties/main.cpp b/examples/declarative/extending/properties/main.cpp
new file mode 100644
index 0000000000..ce69ad204e
--- /dev/null
+++ b/examples/declarative/extending/properties/main.cpp
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QCoreApplication>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QDebug>
+#include "birthdayparty.h"
+#include "person.h"
+
+int main(int argc, char ** argv)
+{
+ QCoreApplication app(argc, argv);
+
+ QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty);
+ QML_REGISTER_TYPE(People, 1,0, Person, Person);
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, ":example.qml");
+ BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
+
+ if (party && party->celebrant()) {
+ qWarning() << party->celebrant()->name() << "is having a birthday!";
+ qWarning() << "They are inviting:";
+ for (int ii = 0; ii < party->guestCount(); ++ii)
+ qWarning() << " " << party->guest(ii)->name();
+ } else {
+ qWarning() << "An error occured";
+ }
+
+ return 0;
+}
diff --git a/examples/declarative/extending/properties/person.cpp b/examples/declarative/extending/properties/person.cpp
new file mode 100644
index 0000000000..92c54f5847
--- /dev/null
+++ b/examples/declarative/extending/properties/person.cpp
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "person.h"
+
+Person::Person(QObject *parent)
+: QObject(parent), m_shoeSize(0)
+{
+}
+
+QString Person::name() const
+{
+ return m_name;
+}
+
+void Person::setName(const QString &n)
+{
+ m_name = n;
+}
+
+int Person::shoeSize() const
+{
+ return m_shoeSize;
+}
+
+void Person::setShoeSize(int s)
+{
+ m_shoeSize = s;
+}
+
diff --git a/examples/declarative/extending/properties/person.h b/examples/declarative/extending/properties/person.h
new file mode 100644
index 0000000000..860a6076fe
--- /dev/null
+++ b/examples/declarative/extending/properties/person.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef PERSON_H
+#define PERSON_H
+
+#include <QObject>
+#include <qdeclarative.h>
+
+class Person : public QObject {
+Q_OBJECT
+Q_PROPERTY(QString name READ name WRITE setName)
+Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
+public:
+ Person(QObject *parent = 0);
+
+ QString name() const;
+ void setName(const QString &);
+
+ int shoeSize() const;
+ void setShoeSize(int);
+private:
+ QString m_name;
+ int m_shoeSize;
+};
+QML_DECLARE_TYPE(Person);
+
+#endif // PERSON_H
diff --git a/examples/declarative/extending/properties/properties.pro b/examples/declarative/extending/properties/properties.pro
new file mode 100644
index 0000000000..a8f430150d
--- /dev/null
+++ b/examples/declarative/extending/properties/properties.pro
@@ -0,0 +1,18 @@
+TEMPLATE = app
+TARGET = properties
+DEPENDPATH += .
+INCLUDEPATH += .
+QT += declarative
+
+# Input
+SOURCES += main.cpp \
+ person.cpp \
+ birthdayparty.cpp
+HEADERS += person.h \
+ birthdayparty.h
+RESOURCES += properties.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/properties
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS properties.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/properties
+INSTALLS += target sources
diff --git a/examples/declarative/extending/properties/properties.qrc b/examples/declarative/extending/properties/properties.qrc
new file mode 100644
index 0000000000..e2fa01d5e7
--- /dev/null
+++ b/examples/declarative/extending/properties/properties.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>example.qml</file>
+</qresource>
+</RCC>
diff --git a/examples/declarative/extending/signal/birthdayparty.cpp b/examples/declarative/extending/signal/birthdayparty.cpp
new file mode 100644
index 0000000000..65ff53016b
--- /dev/null
+++ b/examples/declarative/extending/signal/birthdayparty.cpp
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "birthdayparty.h"
+
+BirthdayPartyAttached::BirthdayPartyAttached(QObject *object)
+: QObject(object)
+{
+}
+
+QDate BirthdayPartyAttached::rsvp() const
+{
+ return m_rsvp;
+}
+
+void BirthdayPartyAttached::setRsvp(const QDate &d)
+{
+ m_rsvp = d;
+}
+
+
+BirthdayParty::BirthdayParty(QObject *parent)
+: QObject(parent), m_celebrant(0)
+{
+}
+
+Person *BirthdayParty::celebrant() const
+{
+ return m_celebrant;
+}
+
+void BirthdayParty::setCelebrant(Person *c)
+{
+ m_celebrant = c;
+}
+
+QDeclarativeListProperty<Person> BirthdayParty::guests()
+{
+ return QDeclarativeListProperty<Person>(this, m_guests);
+}
+
+int BirthdayParty::guestCount() const
+{
+ return m_guests.count();
+}
+
+Person *BirthdayParty::guest(int index) const
+{
+ return m_guests.at(index);
+}
+
+void BirthdayParty::startParty()
+{
+ QTime time = QTime::currentTime();
+ emit partyStarted(time);
+}
+
+BirthdayPartyAttached *BirthdayParty::qmlAttachedProperties(QObject *object)
+{
+ return new BirthdayPartyAttached(object);
+}
+
diff --git a/examples/declarative/extending/signal/birthdayparty.h b/examples/declarative/extending/signal/birthdayparty.h
new file mode 100644
index 0000000000..bcdc5138e5
--- /dev/null
+++ b/examples/declarative/extending/signal/birthdayparty.h
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef BIRTHDAYPARTY_H
+#define BIRTHDAYPARTY_H
+
+#include <QObject>
+#include <QDate>
+#include <qdeclarative.h>
+#include "person.h"
+
+class BirthdayPartyAttached : public QObject
+{
+Q_OBJECT
+Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
+public:
+ BirthdayPartyAttached(QObject *object);
+
+ QDate rsvp() const;
+ void setRsvp(const QDate &);
+
+private:
+ QDate m_rsvp;
+};
+QML_DECLARE_TYPE(BirthdayPartyAttached)
+
+class BirthdayParty : public QObject
+{
+Q_OBJECT
+Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
+Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+Q_CLASSINFO("DefaultProperty", "guests")
+public:
+ BirthdayParty(QObject *parent = 0);
+
+ Person *celebrant() const;
+ void setCelebrant(Person *);
+
+ QDeclarativeListProperty<Person> guests();
+ int guestCount() const;
+ Person *guest(int) const;
+
+ static BirthdayPartyAttached *qmlAttachedProperties(QObject *);
+
+ void startParty();
+// ![0]
+signals:
+ void partyStarted(const QTime &time);
+// ![0]
+
+private:
+ Person *m_celebrant;
+ QList<Person *> m_guests;
+};
+
+QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(BirthdayParty)
+
+#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/extending/signal/example.qml b/examples/declarative/extending/signal/example.qml
new file mode 100644
index 0000000000..c7d4792a52
--- /dev/null
+++ b/examples/declarative/extending/signal/example.qml
@@ -0,0 +1,32 @@
+import People 1.0
+
+// ![0]
+BirthdayParty {
+ onPartyStarted: console.log("This party started rockin' at " + time);
+// ![0]
+
+ celebrant: Boy {
+ name: "Bob Jones"
+ shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
+ }
+
+ Boy {
+ name: "Joan Hodges"
+ BirthdayParty.rsvp: "2009-07-06"
+ shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
+ }
+ Boy {
+ name: "Jack Smith"
+ shoe { size: 8; color: "blue"; brand: "Puma"; price: 19.95 }
+ }
+ Girl {
+ name: "Anne Brown"
+ BirthdayParty.rsvp: "2009-07-01"
+ shoe.size: 7
+ shoe.color: "red"
+ shoe.brand: "Marc Jacobs"
+ shoe.price: 699.99
+ }
+// ![1]
+}
+// ![1]
diff --git a/examples/declarative/extending/signal/main.cpp b/examples/declarative/extending/signal/main.cpp
new file mode 100644
index 0000000000..afc1a666e7
--- /dev/null
+++ b/examples/declarative/extending/signal/main.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QCoreApplication>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QDebug>
+#include "birthdayparty.h"
+#include "person.h"
+
+int main(int argc, char ** argv)
+{
+ QCoreApplication app(argc, argv);
+
+ QML_REGISTER_NOCREATE_TYPE(BirthdayPartyAttached);
+ QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty);
+ QML_REGISTER_NOCREATE_TYPE(ShoeDescription);
+ QML_REGISTER_NOCREATE_TYPE(Person);
+ QML_REGISTER_TYPE(People, 1,0, Boy, Boy);
+ QML_REGISTER_TYPE(People, 1,0, Girl, Girl);
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, ":example.qml");
+ BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
+
+ if (party && party->celebrant()) {
+ qWarning() << party->celebrant()->name() << "is having a birthday!";
+
+ if (qobject_cast<Boy *>(party->celebrant()))
+ qWarning() << "He is inviting:";
+ else
+ qWarning() << "She is inviting:";
+
+ for (int ii = 0; ii < party->guestCount(); ++ii) {
+ Person *guest = party->guest(ii);
+
+ QDate rsvpDate;
+ QObject *attached =
+ qmlAttachedPropertiesObject<BirthdayParty>(guest, false);
+ if (attached)
+ rsvpDate = attached->property("rsvp").toDate();
+
+ if (rsvpDate.isNull())
+ qWarning() << " " << guest->name() << "RSVP date: Hasn't RSVP'd";
+ else
+ qWarning() << " " << guest->name() << "RSVP date:" << qPrintable(rsvpDate.toString());
+ }
+
+ party->startParty();
+ } else {
+ qWarning() << "An error occured";
+ }
+
+ return 0;
+}
diff --git a/examples/declarative/extending/signal/person.cpp b/examples/declarative/extending/signal/person.cpp
new file mode 100644
index 0000000000..0a9e508302
--- /dev/null
+++ b/examples/declarative/extending/signal/person.cpp
@@ -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 examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "person.h"
+
+ShoeDescription::ShoeDescription(QObject *parent)
+: QObject(parent), m_size(0), m_price(0)
+{
+}
+
+int ShoeDescription::size() const
+{
+ return m_size;
+}
+
+void ShoeDescription::setSize(int s)
+{
+ m_size = s;
+}
+
+QColor ShoeDescription::color() const
+{
+ return m_color;
+}
+
+void ShoeDescription::setColor(const QColor &c)
+{
+ m_color = c;
+}
+
+QString ShoeDescription::brand() const
+{
+ return m_brand;
+}
+
+void ShoeDescription::setBrand(const QString &b)
+{
+ m_brand = b;
+}
+
+qreal ShoeDescription::price() const
+{
+ return m_price;
+}
+
+void ShoeDescription::setPrice(qreal p)
+{
+ m_price = p;
+}
+
+Person::Person(QObject *parent)
+: QObject(parent)
+{
+}
+
+QString Person::name() const
+{
+ return m_name;
+}
+
+void Person::setName(const QString &n)
+{
+ m_name = n;
+}
+
+ShoeDescription *Person::shoe()
+{
+ return &m_shoe;
+}
+
+
+Boy::Boy(QObject * parent)
+: Person(parent)
+{
+}
+
+
+Girl::Girl(QObject * parent)
+: Person(parent)
+{
+}
+
diff --git a/examples/declarative/extending/signal/person.h b/examples/declarative/extending/signal/person.h
new file mode 100644
index 0000000000..0f86d8b76e
--- /dev/null
+++ b/examples/declarative/extending/signal/person.h
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef PERSON_H
+#define PERSON_H
+
+#include <QObject>
+#include <QColor>
+#include <qdeclarative.h>
+
+class ShoeDescription : public QObject {
+Q_OBJECT
+Q_PROPERTY(int size READ size WRITE setSize)
+Q_PROPERTY(QColor color READ color WRITE setColor)
+Q_PROPERTY(QString brand READ brand WRITE setBrand)
+Q_PROPERTY(qreal price READ price WRITE setPrice)
+public:
+ ShoeDescription(QObject *parent = 0);
+
+ int size() const;
+ void setSize(int);
+
+ QColor color() const;
+ void setColor(const QColor &);
+
+ QString brand() const;
+ void setBrand(const QString &);
+
+ qreal price() const;
+ void setPrice(qreal);
+private:
+ int m_size;
+ QColor m_color;
+ QString m_brand;
+ qreal m_price;
+};
+QML_DECLARE_TYPE(ShoeDescription);
+
+class Person : public QObject {
+Q_OBJECT
+Q_PROPERTY(QString name READ name WRITE setName)
+Q_PROPERTY(ShoeDescription *shoe READ shoe);
+public:
+ Person(QObject *parent = 0);
+
+ QString name() const;
+ void setName(const QString &);
+
+ ShoeDescription *shoe();
+private:
+ QString m_name;
+ ShoeDescription m_shoe;
+};
+QML_DECLARE_TYPE(Person);
+
+class Boy : public Person {
+Q_OBJECT
+public:
+ Boy(QObject * parent = 0);
+};
+QML_DECLARE_TYPE(Boy);
+
+class Girl : public Person {
+Q_OBJECT
+public:
+ Girl(QObject * parent = 0);
+};
+QML_DECLARE_TYPE(Girl);
+
+#endif // PERSON_H
diff --git a/examples/declarative/extending/signal/signal.pro b/examples/declarative/extending/signal/signal.pro
new file mode 100644
index 0000000000..6367a38536
--- /dev/null
+++ b/examples/declarative/extending/signal/signal.pro
@@ -0,0 +1,17 @@
+TEMPLATE = app
+TARGET = signal
+DEPENDPATH += .
+INCLUDEPATH += .
+QT += declarative
+
+# Input
+SOURCES += main.cpp \
+ person.cpp \
+ birthdayparty.cpp
+HEADERS += person.h \
+ birthdayparty.h
+RESOURCES += signal.qrc
+target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/signal
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS signal.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/signal
+INSTALLS += target sources
diff --git a/examples/declarative/extending/signal/signal.qrc b/examples/declarative/extending/signal/signal.qrc
new file mode 100644
index 0000000000..e2fa01d5e7
--- /dev/null
+++ b/examples/declarative/extending/signal/signal.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>example.qml</file>
+</qresource>
+</RCC>
diff --git a/examples/declarative/extending/valuesource/birthdayparty.cpp b/examples/declarative/extending/valuesource/birthdayparty.cpp
new file mode 100644
index 0000000000..99d98beba5
--- /dev/null
+++ b/examples/declarative/extending/valuesource/birthdayparty.cpp
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "birthdayparty.h"
+
+BirthdayPartyAttached::BirthdayPartyAttached(QObject *object)
+: QObject(object)
+{
+}
+
+QDate BirthdayPartyAttached::rsvp() const
+{
+ return m_rsvp;
+}
+
+void BirthdayPartyAttached::setRsvp(const QDate &d)
+{
+ m_rsvp = d;
+}
+
+
+BirthdayParty::BirthdayParty(QObject *parent)
+: QObject(parent), m_celebrant(0)
+{
+}
+
+Person *BirthdayParty::celebrant() const
+{
+ return m_celebrant;
+}
+
+void BirthdayParty::setCelebrant(Person *c)
+{
+ m_celebrant = c;
+}
+
+QDeclarativeListProperty<Person> BirthdayParty::guests()
+{
+ return QDeclarativeListProperty<Person>(this, m_guests);
+}
+
+int BirthdayParty::guestCount() const
+{
+ return m_guests.count();
+}
+
+Person *BirthdayParty::guest(int index) const
+{
+ return m_guests.at(index);
+}
+
+void BirthdayParty::startParty()
+{
+ QTime time = QTime::currentTime();
+ emit partyStarted(time);
+}
+
+QString BirthdayParty::speaker() const
+{
+ return QString();
+}
+
+void BirthdayParty::setSpeaker(const QString &speak)
+{
+ qWarning() << qPrintable(speak);
+}
+
+BirthdayPartyAttached *BirthdayParty::qmlAttachedProperties(QObject *object)
+{
+ return new BirthdayPartyAttached(object);
+}
+
diff --git a/examples/declarative/extending/valuesource/birthdayparty.h b/examples/declarative/extending/valuesource/birthdayparty.h
new file mode 100644
index 0000000000..819a200cfd
--- /dev/null
+++ b/examples/declarative/extending/valuesource/birthdayparty.h
@@ -0,0 +1,102 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef BIRTHDAYPARTY_H
+#define BIRTHDAYPARTY_H
+
+#include <QObject>
+#include <QDate>
+#include <QDebug>
+#include <qdeclarative.h>
+#include "person.h"
+
+class BirthdayPartyAttached : public QObject
+{
+Q_OBJECT
+Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
+public:
+ BirthdayPartyAttached(QObject *object);
+
+ QDate rsvp() const;
+ void setRsvp(const QDate &);
+
+private:
+ QDate m_rsvp;
+};
+QML_DECLARE_TYPE(BirthdayPartyAttached)
+
+class BirthdayParty : public QObject
+{
+Q_OBJECT
+Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
+Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+// ![0]
+Q_PROPERTY(QString speaker READ speaker WRITE setSpeaker)
+// ![0]
+Q_CLASSINFO("DefaultProperty", "guests")
+public:
+ BirthdayParty(QObject *parent = 0);
+
+ Person *celebrant() const;
+ void setCelebrant(Person *);
+
+ QDeclarativeListProperty<Person> guests();
+ int guestCount() const;
+ Person *guest(int) const;
+
+
+ QString speaker() const;
+ void setSpeaker(const QString &);
+
+ static BirthdayPartyAttached *qmlAttachedProperties(QObject *);
+
+ void startParty();
+signals:
+ void partyStarted(const QTime &time);
+
+private:
+ Person *m_celebrant;
+ QList<Person *> m_guests;
+};
+
+QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(BirthdayParty)
+
+#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/extending/valuesource/example.qml b/examples/declarative/extending/valuesource/example.qml
new file mode 100644
index 0000000000..7cdf8c0bea
--- /dev/null
+++ b/examples/declarative/extending/valuesource/example.qml
@@ -0,0 +1,36 @@
+import People 1.0
+
+// ![0]
+BirthdayParty {
+ speaker: HappyBirthday { name: "Bob Jones" }
+// ![0]
+
+ onPartyStarted: console.log("This party started rockin' at " + time);
+
+
+ celebrant: Boy {
+ name: "Bob Jones"
+ shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
+ }
+
+ Boy {
+ name: "Joan Hodges"
+ BirthdayParty.rsvp: "2009-07-06"
+ shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
+ }
+ Boy {
+ name: "Jack Smith"
+ shoe { size: 8; color: "blue"; brand: "Puma"; price: 19.95 }
+ }
+ Girl {
+ name: "Anne Brown"
+ BirthdayParty.rsvp: "2009-07-01"
+ shoe.size: 7
+ shoe.color: "red"
+ shoe.brand: "Marc Jacobs"
+ shoe.price: 699.99
+ }
+
+// ![1]
+}
+// ![1]
diff --git a/examples/declarative/extending/valuesource/happybirthday.cpp b/examples/declarative/extending/valuesource/happybirthday.cpp
new file mode 100644
index 0000000000..0dbbd6e695
--- /dev/null
+++ b/examples/declarative/extending/valuesource/happybirthday.cpp
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "happybirthday.h"
+#include <QTimer>
+
+HappyBirthday::HappyBirthday(QObject *parent)
+: QObject(parent), m_line(-1)
+{
+ setName(QString());
+ QTimer *timer = new QTimer(this);
+ QObject::connect(timer, SIGNAL(timeout()), this, SLOT(advance()));
+ timer->start(1000);
+}
+
+void HappyBirthday::setTarget(const QDeclarativeProperty &p)
+{
+ m_target = p;
+}
+
+QString HappyBirthday::name() const
+{
+ return m_name;
+}
+
+void HappyBirthday::setName(const QString &name)
+{
+ m_name = name;
+
+ m_lyrics.clear();
+ m_lyrics << "Happy birthday to you,";
+ m_lyrics << "Happy birthday to you,";
+ m_lyrics << "Happy birthday dear " + m_name + ",";
+ m_lyrics << "Happy birthday to you!";
+ m_lyrics << "";
+}
+
+void HappyBirthday::advance()
+{
+ m_line = (m_line + 1) % m_lyrics.count();
+
+ m_target.write(m_lyrics.at(m_line));
+}
+
diff --git a/examples/declarative/extending/valuesource/happybirthday.h b/examples/declarative/extending/valuesource/happybirthday.h
new file mode 100644
index 0000000000..b48c012212
--- /dev/null
+++ b/examples/declarative/extending/valuesource/happybirthday.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef HAPPYBIRTHDAY_H
+#define HAPPYBIRTHDAY_H
+
+#include <QDeclarativePropertyValueSource>
+#include <QDeclarativeProperty>
+#include <qdeclarative.h>
+
+#include <QStringList>
+
+// ![0]
+class HappyBirthday : public QObject, public QDeclarativePropertyValueSource
+{
+Q_OBJECT
+// ![0]
+Q_PROPERTY(QString name READ name WRITE setName)
+// ![1]
+public:
+ HappyBirthday(QObject *parent = 0);
+
+ virtual void setTarget(const QDeclarativeProperty &);
+// ![1]
+
+ QString name() const;
+ void setName(const QString &);
+
+private slots:
+ void advance();
+
+private:
+ int m_line;
+ QStringList m_lyrics;
+ QDeclarativeProperty m_target;
+ QString m_name;
+// ![2]
+};
+// ![2]
+QML_DECLARE_TYPE(HappyBirthday);
+
+#endif // HAPPYBIRTHDAY_H
+
diff --git a/examples/declarative/extending/valuesource/main.cpp b/examples/declarative/extending/valuesource/main.cpp
new file mode 100644
index 0000000000..873f8c970a
--- /dev/null
+++ b/examples/declarative/extending/valuesource/main.cpp
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QCoreApplication>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QDebug>
+#include "birthdayparty.h"
+#include "happybirthday.h"
+#include "person.h"
+
+int main(int argc, char ** argv)
+{
+ QCoreApplication app(argc, argv);
+
+ QML_REGISTER_NOCREATE_TYPE(BirthdayPartyAttached);
+ QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty);
+ QML_REGISTER_TYPE(People, 1,0, HappyBirthday, HappyBirthday);
+ QML_REGISTER_NOCREATE_TYPE(ShoeDescription);
+ QML_REGISTER_NOCREATE_TYPE(Person);
+ QML_REGISTER_TYPE(People, 1,0, Boy, Boy);
+ QML_REGISTER_TYPE(People, 1,0, Girl, Girl);
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, ":example.qml");
+ BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
+
+ if (party && party->celebrant()) {
+ qWarning() << party->celebrant()->name() << "is having a birthday!";
+
+ if (qobject_cast<Boy *>(party->celebrant()))
+ qWarning() << "He is inviting:";
+ else
+ qWarning() << "She is inviting:";
+
+ for (int ii = 0; ii < party->guestCount(); ++ii) {
+ Person *guest = party->guest(ii);
+
+ QDate rsvpDate;
+ QObject *attached =
+ qmlAttachedPropertiesObject<BirthdayParty>(guest, false);
+ if (attached)
+ rsvpDate = attached->property("rsvp").toDate();
+
+ if (rsvpDate.isNull())
+ qWarning() << " " << guest->name() << "RSVP date: Hasn't RSVP'd";
+ else
+ qWarning() << " " << guest->name() << "RSVP date:" << qPrintable(rsvpDate.toString());
+ }
+
+ party->startParty();
+ } else {
+ qWarning() << "An error occured";
+ }
+
+ return app.exec();
+}
diff --git a/examples/declarative/extending/valuesource/person.cpp b/examples/declarative/extending/valuesource/person.cpp
new file mode 100644
index 0000000000..0a9e508302
--- /dev/null
+++ b/examples/declarative/extending/valuesource/person.cpp
@@ -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 examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "person.h"
+
+ShoeDescription::ShoeDescription(QObject *parent)
+: QObject(parent), m_size(0), m_price(0)
+{
+}
+
+int ShoeDescription::size() const
+{
+ return m_size;
+}
+
+void ShoeDescription::setSize(int s)
+{
+ m_size = s;
+}
+
+QColor ShoeDescription::color() const
+{
+ return m_color;
+}
+
+void ShoeDescription::setColor(const QColor &c)
+{
+ m_color = c;
+}
+
+QString ShoeDescription::brand() const
+{
+ return m_brand;
+}
+
+void ShoeDescription::setBrand(const QString &b)
+{
+ m_brand = b;
+}
+
+qreal ShoeDescription::price() const
+{
+ return m_price;
+}
+
+void ShoeDescription::setPrice(qreal p)
+{
+ m_price = p;
+}
+
+Person::Person(QObject *parent)
+: QObject(parent)
+{
+}
+
+QString Person::name() const
+{
+ return m_name;
+}
+
+void Person::setName(const QString &n)
+{
+ m_name = n;
+}
+
+ShoeDescription *Person::shoe()
+{
+ return &m_shoe;
+}
+
+
+Boy::Boy(QObject * parent)
+: Person(parent)
+{
+}
+
+
+Girl::Girl(QObject * parent)
+: Person(parent)
+{
+}
+
diff --git a/examples/declarative/extending/valuesource/person.h b/examples/declarative/extending/valuesource/person.h
new file mode 100644
index 0000000000..0f86d8b76e
--- /dev/null
+++ b/examples/declarative/extending/valuesource/person.h
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef PERSON_H
+#define PERSON_H
+
+#include <QObject>
+#include <QColor>
+#include <qdeclarative.h>
+
+class ShoeDescription : public QObject {
+Q_OBJECT
+Q_PROPERTY(int size READ size WRITE setSize)
+Q_PROPERTY(QColor color READ color WRITE setColor)
+Q_PROPERTY(QString brand READ brand WRITE setBrand)
+Q_PROPERTY(qreal price READ price WRITE setPrice)
+public:
+ ShoeDescription(QObject *parent = 0);
+
+ int size() const;
+ void setSize(int);
+
+ QColor color() const;
+ void setColor(const QColor &);
+
+ QString brand() const;
+ void setBrand(const QString &);
+
+ qreal price() const;
+ void setPrice(qreal);
+private:
+ int m_size;
+ QColor m_color;
+ QString m_brand;
+ qreal m_price;
+};
+QML_DECLARE_TYPE(ShoeDescription);
+
+class Person : public QObject {
+Q_OBJECT
+Q_PROPERTY(QString name READ name WRITE setName)
+Q_PROPERTY(ShoeDescription *shoe READ shoe);
+public:
+ Person(QObject *parent = 0);
+
+ QString name() const;
+ void setName(const QString &);
+
+ ShoeDescription *shoe();
+private:
+ QString m_name;
+ ShoeDescription m_shoe;
+};
+QML_DECLARE_TYPE(Person);
+
+class Boy : public Person {
+Q_OBJECT
+public:
+ Boy(QObject * parent = 0);
+};
+QML_DECLARE_TYPE(Boy);
+
+class Girl : public Person {
+Q_OBJECT
+public:
+ Girl(QObject * parent = 0);
+};
+QML_DECLARE_TYPE(Girl);
+
+#endif // PERSON_H
diff --git a/examples/declarative/extending/valuesource/valuesource.pro b/examples/declarative/extending/valuesource/valuesource.pro
new file mode 100644
index 0000000000..d3409b6381
--- /dev/null
+++ b/examples/declarative/extending/valuesource/valuesource.pro
@@ -0,0 +1,19 @@
+TEMPLATE = app
+TARGET = valuesource
+DEPENDPATH += .
+INCLUDEPATH += .
+QT += declarative
+
+# Input
+SOURCES += main.cpp \
+ person.cpp \
+ birthdayparty.cpp \
+ happybirthday.cpp
+HEADERS += person.h \
+ birthdayparty.h \
+ happybirthday.h
+RESOURCES += valuesource.qrc
+target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/valuesource
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS valuesource.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/valuesource
+INSTALLS += target sources
diff --git a/examples/declarative/extending/valuesource/valuesource.qrc b/examples/declarative/extending/valuesource/valuesource.qrc
new file mode 100644
index 0000000000..e2fa01d5e7
--- /dev/null
+++ b/examples/declarative/extending/valuesource/valuesource.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>example.qml</file>
+</qresource>
+</RCC>
diff --git a/examples/declarative/fillmode/face.png b/examples/declarative/fillmode/face.png
new file mode 100644
index 0000000000..9623b1ad15
--- /dev/null
+++ b/examples/declarative/fillmode/face.png
Binary files differ
diff --git a/examples/declarative/fillmode/fillmode.qml b/examples/declarative/fillmode/fillmode.qml
new file mode 100644
index 0000000000..ab0f81cac2
--- /dev/null
+++ b/examples/declarative/fillmode/fillmode.qml
@@ -0,0 +1,41 @@
+import Qt 4.6
+
+Image {
+ width: 400
+ height: 250
+ source: "face.png"
+ SequentialAnimation on fillMode {
+ repeat: true
+ PropertyAction { value: Image.Stretch }
+ PropertyAction { target: label; property: "text"; value: "Stretch" }
+ PauseAnimation { duration: 1000 }
+ PropertyAction { value: Image.PreserveAspectFit }
+ PropertyAction { target: label; property: "text"; value: "PreserveAspectFit" }
+ PauseAnimation { duration: 1000 }
+ PropertyAction { value: Image.PreserveAspectCrop }
+ PropertyAction { target: label; property: "text"; value: "PreserveAspectCrop" }
+ PauseAnimation { duration: 1000 }
+ PropertyAction { value: Image.Tile }
+ PropertyAction { target: label; property: "text"; value: "Tile" }
+ PauseAnimation { duration: 1000 }
+ PropertyAction { value: Image.TileHorizontally }
+ PropertyAction { target: label; property: "text"; value: "TileHorizontally" }
+ PauseAnimation { duration: 1000 }
+ PropertyAction { value: Image.TileVertically }
+ PropertyAction { target: label; property: "text"; value: "TileVertically" }
+ PauseAnimation { duration: 1000 }
+ }
+ Text {
+ id: label
+ font.pointSize: 24
+ color: "blue"
+ style: Text.Outline
+ styleColor: "white"
+ anchors { centerIn: parent }
+ }
+ Rectangle {
+ border.color: "black"
+ color: "transparent"
+ anchors { fill: parent; rightMargin: 1; bottomMargin: 1}
+ }
+}
diff --git a/examples/declarative/flipable/back.png b/examples/declarative/flipable/back.png
new file mode 100644
index 0000000000..0b4cafc4a0
--- /dev/null
+++ b/examples/declarative/flipable/back.png
Binary files differ
diff --git a/examples/declarative/flipable/flipable.qml b/examples/declarative/flipable/flipable.qml
new file mode 100644
index 0000000000..c837ebccfa
--- /dev/null
+++ b/examples/declarative/flipable/flipable.qml
@@ -0,0 +1,37 @@
+//! [0]
+import Qt 4.6
+
+Flipable {
+ id: flipable
+ width: 240
+ height: 240
+
+ property int angle: 0
+ property bool flipped: false
+
+ front: Image { source: "front.png" }
+ back: Image { source: "back.png" }
+
+ transform: Rotation {
+ origin.x: flipable.width/2; origin.y: flipable.height/2
+ axis.x: 0; axis.y: 1; axis.z: 0 // rotate around y-axis
+ angle: flipable.angle
+ }
+
+ states: State {
+ name: "back"
+ PropertyChanges { target: flipable; angle: 180 }
+ when: flipable.flipped
+ }
+
+ transitions: Transition {
+ NumberAnimation { properties: "angle"; duration: 1000 }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: flipable.flipped = !flipable.flipped
+ }
+}
+//! [0]
+
diff --git a/examples/declarative/flipable/front.png b/examples/declarative/flipable/front.png
new file mode 100644
index 0000000000..796b60559b
--- /dev/null
+++ b/examples/declarative/flipable/front.png
Binary files differ
diff --git a/examples/declarative/focusscope/test.qml b/examples/declarative/focusscope/test.qml
new file mode 100644
index 0000000000..e4332e7aa1
--- /dev/null
+++ b/examples/declarative/focusscope/test.qml
@@ -0,0 +1,76 @@
+import Qt 4.6
+
+Rectangle {
+ color: "white"
+ width: 800
+ height: 600
+
+ Keys.onDigit9Pressed: console.log("Error - Root")
+
+ FocusScope {
+ id: myScope
+ focus: true
+
+ Keys.onDigit9Pressed: console.log("Error - FocusScope")
+
+ Rectangle {
+ height: 120
+ width: 420
+
+ color: "transparent"
+ border.width: 5
+ border.color: myScope.wantsFocus?"blue":"black"
+
+ Rectangle {
+ id: item1
+ x: 10; y: 10
+ width: 100; height: 100; color: "green"
+ border.width: 5
+ border.color: wantsFocus?"blue":"black"
+ Keys.onDigit9Pressed: console.log("Top Left");
+ KeyNavigation.right: item2
+ focus: true
+
+ Rectangle {
+ width: 50; height: 50; anchors.centerIn: parent
+ color: parent.focus?"red":"transparent"
+ }
+ }
+
+ Rectangle {
+ id: item2
+ x: 310; y: 10
+ width: 100; height: 100; color: "green"
+ border.width: 5
+ border.color: wantsFocus?"blue":"black"
+ KeyNavigation.left: item1
+ Keys.onDigit9Pressed: console.log("Top Right");
+
+ Rectangle {
+ width: 50; height: 50; anchors.centerIn: parent
+ color: parent.focus?"red":"transparent"
+ }
+ }
+ }
+ KeyNavigation.down: item3
+ }
+
+ Text { x:100; y:170; text: "Blue border indicates scoped focus\nBlack border indicates NOT scoped focus\nRed box indicates active focus\nUse arrow keys to navigate\nPress \"9\" to print currently focused item" }
+
+ Rectangle {
+ id: item3
+ x: 10; y: 300
+ width: 100; height: 100; color: "green"
+ border.width: 5
+ border.color: wantsFocus?"blue":"black"
+
+ Keys.onDigit9Pressed: console.log("Bottom Left");
+ KeyNavigation.up: myScope
+
+ Rectangle {
+ width: 50; height: 50; anchors.centerIn: parent
+ color: parent.focus?"red":"transparent"
+ }
+ }
+
+}
diff --git a/examples/declarative/focusscope/test2.qml b/examples/declarative/focusscope/test2.qml
new file mode 100644
index 0000000000..5b6971aaa3
--- /dev/null
+++ b/examples/declarative/focusscope/test2.qml
@@ -0,0 +1,40 @@
+import Qt 4.6
+
+Rectangle {
+ color: "white"
+ width: 800
+ height: 600
+
+ Text { text: "All five rectangles should be red" }
+
+ FocusScope {
+ y: 100
+ focus: true
+ Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+
+ FocusScope {
+ y: 100
+ focus: true
+ Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+
+ FocusScope {
+ y: 100
+ focus: true
+ Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+
+ FocusScope {
+ y: 100
+ focus: true
+ Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+
+ FocusScope {
+ y: 100
+ focus: true
+ Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+ }
+ }
+ }
+ }
+ }
+
+}
diff --git a/examples/declarative/focusscope/test3.qml b/examples/declarative/focusscope/test3.qml
new file mode 100644
index 0000000000..9344d07b10
--- /dev/null
+++ b/examples/declarative/focusscope/test3.qml
@@ -0,0 +1,52 @@
+import Qt 4.6
+
+Rectangle {
+ color: "white"
+ width: 800
+ height: 600
+
+ ListModel {
+ id: model
+ ListElement { name: "1" }
+ ListElement { name: "2" }
+ ListElement { name: "3" }
+ ListElement { name: "4" }
+ ListElement { name: "5" }
+ ListElement { name: "6" }
+ ListElement { name: "6" }
+ ListElement { name: "8" }
+ ListElement { name: "9" }
+ }
+
+ Component {
+ id: verticalDelegate
+ FocusScope {
+ id: root
+ width: 50; height: 50;
+ Keys.onDigit9Pressed: console.log("Error - " + name)
+ Rectangle {
+ focus: true
+ Keys.onDigit9Pressed: console.log(name)
+ width: 50; height: 50;
+ color: root.ListView.isCurrentItem?"red":"green"
+ Text { text: name; anchors.centerIn: parent }
+ }
+ }
+ }
+
+ ListView {
+ width: 800; height: 50; orientation: "Horizontal"
+ focus: true
+ model: model
+ delegate: verticalDelegate
+ preferredHighlightBegin: 100
+ preferredHighlightEnd: 100
+ highlightRangeMode: "StrictlyEnforceRange"
+ }
+
+
+ Text {
+ y: 100; x: 50
+ text: "Currently selected element should be red\nPressing \"9\" should print the number of the currently selected item\nBe sure to scroll all the way to the right, pause, and then all the way to the left."
+ }
+}
diff --git a/examples/declarative/focusscope/test4.qml b/examples/declarative/focusscope/test4.qml
new file mode 100644
index 0000000000..cc96df9138
--- /dev/null
+++ b/examples/declarative/focusscope/test4.qml
@@ -0,0 +1,75 @@
+import Qt 4.6
+
+Rectangle {
+ color: "white"
+ width: 800
+ height: 600
+
+ Keys.onDigit9Pressed: console.log("Error - Root")
+
+ FocusScope {
+ id: myScope
+
+ Keys.onDigit9Pressed: console.log("Error - FocusScope")
+
+ Rectangle {
+ height: 120
+ width: 420
+
+ color: "transparent"
+ border.width: 5
+ border.color: myScope.wantsFocus?"blue":"black"
+
+ Rectangle {
+ id: item1
+ x: 10; y: 10
+ width: 100; height: 100; color: "green"
+ border.width: 5
+ border.color: wantsFocus?"blue":"black"
+ Keys.onDigit9Pressed: console.log("Error - Top Left");
+ KeyNavigation.right: item2
+ focus: true
+
+ Rectangle {
+ width: 50; height: 50; anchors.centerIn: parent
+ color: parent.focus?"red":"transparent"
+ }
+ }
+
+ Rectangle {
+ id: item2
+ x: 310; y: 10
+ width: 100; height: 100; color: "green"
+ border.width: 5
+ border.color: wantsFocus?"blue":"black"
+ KeyNavigation.left: item1
+ Keys.onDigit9Pressed: console.log("Error - Top Right");
+
+ Rectangle {
+ width: 50; height: 50; anchors.centerIn: parent
+ color: parent.focus?"red":"transparent"
+ }
+ }
+ }
+ KeyNavigation.down: item3
+ }
+
+ Text { x:100; y:170; text: "There should be no blue borders, or red squares.\nPressing \"9\" should do nothing.\nArrow keys should have no effect." }
+
+ Rectangle {
+ id: item3
+ x: 10; y: 300
+ width: 100; height: 100; color: "green"
+ border.width: 5
+ border.color: wantsFocus?"blue":"black"
+
+ Keys.onDigit9Pressed: console.log("Error - Bottom Left");
+ KeyNavigation.up: myScope
+
+ Rectangle {
+ width: 50; height: 50; anchors.centerIn: parent
+ color: parent.focus?"red":"transparent"
+ }
+ }
+
+}
diff --git a/examples/declarative/focusscope/test5.qml b/examples/declarative/focusscope/test5.qml
new file mode 100644
index 0000000000..da98350165
--- /dev/null
+++ b/examples/declarative/focusscope/test5.qml
@@ -0,0 +1,83 @@
+import Qt 4.6
+
+Rectangle {
+ color: "white"
+ width: 800
+ height: 600
+
+ Keys.onReturnPressed: console.log("Error - Root")
+
+ FocusScope {
+ id: myScope
+ focus: true
+
+ Keys.onReturnPressed: console.log("Error - FocusScope")
+
+ Rectangle {
+ height: 120
+ width: 420
+
+ color: "transparent"
+ border.width: 5
+ border.color: myScope.wantsFocus?"blue":"black"
+
+ Rectangle {
+ x: 10; y: 10
+ width: 100; height: 100; color: "green"
+ border.width: 5
+ border.color: item1.wantsFocus?"blue":"black"
+ }
+
+ TextEdit {
+ id: item1
+ x: 20; y: 20
+ width: 90; height: 90
+ color: "white"
+ font.pixelSize: 20
+ Keys.onReturnPressed: console.log("Top Left");
+ KeyNavigation.right: item2
+ focus: true
+ wrap: true
+ text: "Box 1"
+ }
+
+ Rectangle {
+ id: item2
+ x: 310; y: 10
+ width: 100; height: 100; color: "green"
+ border.width: 5
+ border.color: wantsFocus?"blue":"black"
+ KeyNavigation.left: item1
+ Keys.onReturnPressed: console.log("Top Right");
+
+ Rectangle {
+ width: 50; height: 50; anchors.centerIn: parent
+ color: parent.focus?"red":"transparent"
+ }
+ }
+ }
+ KeyNavigation.down: item3
+ }
+
+ Text { x:100; y:170; text: "Blue border indicates scoped focus\nBlack border indicates NOT scoped focus\nRed box or flashing cursor indicates active focus\nUse arrow keys to navigate\nPress Ctrl-Return to print currently focused item" }
+
+ Rectangle {
+ x: 10; y: 300
+ width: 100; height: 100; color: "green"
+ border.width: 5
+ border.color: item3.wantsFocus?"blue":"black"
+ }
+
+ TextEdit {
+ id: item3
+ x: 20; y: 310
+ width: 90; height: 90
+ color: "white"
+ font.pixelSize: 20
+ text: "Box 3"
+
+ Keys.onReturnPressed: console.log("Bottom Left");
+ KeyNavigation.up: myScope
+ wrap: true
+ }
+}
diff --git a/examples/declarative/fonts/banner.qml b/examples/declarative/fonts/banner.qml
new file mode 100644
index 0000000000..7989f80e36
--- /dev/null
+++ b/examples/declarative/fonts/banner.qml
@@ -0,0 +1,18 @@
+import Qt 4.6
+
+Rectangle {
+ id: screen
+ width: 640; height: 320; color: "steelblue"
+
+ property int pixelSize: screen.height * 1.25
+ property color textColor: "lightsteelblue"
+ property string text: "Hello world! "
+
+ Row {
+ y: -screen.height / 4.5
+ NumberAnimation on x { from: 0; to: -text.width; duration: 6000; repeat: true }
+ Text { id: text; font.pixelSize: screen.pixelSize; color: screen.textColor; text: screen.text }
+ Text { font.pixelSize: screen.pixelSize; color: screen.textColor; text: screen.text }
+ Text { font.pixelSize: screen.pixelSize; color: screen.textColor; text: screen.text }
+ }
+}
diff --git a/examples/declarative/fonts/fonts.qml b/examples/declarative/fonts/fonts.qml
new file mode 100644
index 0000000000..e928df4e2b
--- /dev/null
+++ b/examples/declarative/fonts/fonts.qml
@@ -0,0 +1,56 @@
+import Qt 4.6
+
+Rectangle {
+ property string myText: "The quick brown fox jumps over the lazy dog."
+
+ width: 800; height: 480
+ color: "steelblue"
+
+ FontLoader { id: fixedFont; name: "Courier" }
+ FontLoader { id: localFont; source: "fonts/tarzenau-ocr-a.ttf" }
+ FontLoader { id: webFont; source: "http://www.princexml.com/fonts/steffmann/Starburst.ttf" }
+
+ Column {
+ anchors.fill: parent; spacing: 15
+ anchors.leftMargin: 10; anchors.rightMargin: 10
+ Text {
+ text: myText; color: "lightsteelblue"
+ width: parent.width; elide: Text.ElideRight
+ font.family: "Times"; font.pointSize: 42
+ }
+ Text {
+ text: myText; color: "lightsteelblue"
+ width: parent.width; elide: Text.ElideLeft
+ font.family: "Times"; font.pointSize: 42
+ font.capitalization: Font.AllUppercase
+ }
+ Text {
+ text: myText; color: "lightsteelblue"
+ width: parent.width; elide: Text.ElideMiddle
+ font.family: fixedFont.name; font.pointSize: 42; font.weight: Font.Bold
+ font.capitalization: Font.AllLowercase
+ }
+ Text {
+ text: myText; color: "lightsteelblue"
+ width: parent.width; elide: Text.ElideRight
+ font.family: fixedFont.name; font.pointSize: 42; font.italic: true
+ font.capitalization: Font.SmallCaps
+ }
+ Text {
+ text: myText; color: "lightsteelblue"
+ width: parent.width; elide: Text.ElideLeft
+ font.family: localFont.name; font.pointSize: 42
+ font.capitalization: Font.Capitalize
+ }
+ Text {
+ text: {
+ if (webFont.status == 1) myText
+ else if (webFont.status == 2) "Loading..."
+ else if (webFont.status == 3) "Error loading font"
+ }
+ color: "lightsteelblue"
+ width: parent.width; elide: Text.ElideMiddle
+ font.family: webFont.name; font.pointSize: 42
+ }
+ }
+}
diff --git a/examples/declarative/fonts/fonts/tarzeau_ocr_a.ttf b/examples/declarative/fonts/fonts/tarzeau_ocr_a.ttf
new file mode 100644
index 0000000000..cf93f9651f
--- /dev/null
+++ b/examples/declarative/fonts/fonts/tarzeau_ocr_a.ttf
Binary files differ
diff --git a/examples/declarative/fonts/hello.qml b/examples/declarative/fonts/hello.qml
new file mode 100644
index 0000000000..334409edb2
--- /dev/null
+++ b/examples/declarative/fonts/hello.qml
@@ -0,0 +1,27 @@
+import Qt 4.6
+
+Rectangle {
+ id: screen; width: 800; height: 480; color: "black"
+
+ Item {
+ id: container; x: screen.width / 2; y: screen.height / 2
+ Text {
+ id: text; color: "white"; anchors.centerIn: parent
+ text: "Hello world!"; font.pixelSize: 60
+
+ SequentialAnimation on font.letterSpacing {
+ repeat: true;
+ NumberAnimation { from: 100; to: 300; easing.type: "InQuad"; duration: 3000 }
+ ScriptAction { script: {
+ container.y = (screen.height / 4) + (Math.random() * screen.height / 2)
+ container.x = (screen.width / 4) + (Math.random() * screen.width / 2)
+ } }
+ }
+ SequentialAnimation on opacity {
+ repeat: true;
+ NumberAnimation { from: 1; to: 0; duration: 2600 }
+ PauseAnimation { duration: 400 }
+ }
+ }
+ }
+}
diff --git a/examples/declarative/gridview/gridview.qml b/examples/declarative/gridview/gridview.qml
new file mode 100644
index 0000000000..93931c7b09
--- /dev/null
+++ b/examples/declarative/gridview/gridview.qml
@@ -0,0 +1,38 @@
+import Qt 4.6
+
+Rectangle {
+ width: 300; height: 400; color: "white"
+
+ ListModel {
+ id: appModel
+ ListElement { name: "Music"; icon: "pics/AudioPlayer_48.png" }
+ ListElement { name: "Movies"; icon: "pics/VideoPlayer_48.png" }
+ ListElement { name: "Camera"; icon: "pics/Camera_48.png" }
+ ListElement { name: "Calendar"; icon: "pics/DateBook_48.png" }
+ ListElement { name: "Messaging"; icon: "pics/EMail_48.png" }
+ ListElement { name: "Todo List"; icon: "pics/TodoList_48.png" }
+ ListElement { name: "Contacts"; icon: "pics/AddressBook_48.png" }
+ }
+
+ Component {
+ id: appDelegate
+ Item {
+ width: 100; height: 100
+ Image { id: myIcon; y: 20; anchors.horizontalCenter: parent.horizontalCenter; source: icon }
+ Text { anchors.top: myIcon.bottom; anchors.horizontalCenter: parent.horizontalCenter; text: name }
+ }
+ }
+
+ Component {
+ id: appHighlight
+ Rectangle { width: 80; height: 80; color: "lightsteelblue" }
+ }
+
+ GridView {
+ anchors.fill: parent
+ cellWidth: 100; cellHeight: 100
+ model: appModel; delegate: appDelegate
+ highlight: appHighlight
+ focus: true
+ }
+}
diff --git a/examples/declarative/gridview/pics/AddressBook_48.png b/examples/declarative/gridview/pics/AddressBook_48.png
new file mode 100644
index 0000000000..1ab7c8eec1
--- /dev/null
+++ b/examples/declarative/gridview/pics/AddressBook_48.png
Binary files differ
diff --git a/examples/declarative/gridview/pics/AudioPlayer_48.png b/examples/declarative/gridview/pics/AudioPlayer_48.png
new file mode 100644
index 0000000000..f4b8689f87
--- /dev/null
+++ b/examples/declarative/gridview/pics/AudioPlayer_48.png
Binary files differ
diff --git a/examples/declarative/gridview/pics/Camera_48.png b/examples/declarative/gridview/pics/Camera_48.png
new file mode 100644
index 0000000000..c76b524945
--- /dev/null
+++ b/examples/declarative/gridview/pics/Camera_48.png
Binary files differ
diff --git a/examples/declarative/gridview/pics/DateBook_48.png b/examples/declarative/gridview/pics/DateBook_48.png
new file mode 100644
index 0000000000..58f5787fb8
--- /dev/null
+++ b/examples/declarative/gridview/pics/DateBook_48.png
Binary files differ
diff --git a/examples/declarative/gridview/pics/EMail_48.png b/examples/declarative/gridview/pics/EMail_48.png
new file mode 100644
index 0000000000..d6d84a61be
--- /dev/null
+++ b/examples/declarative/gridview/pics/EMail_48.png
Binary files differ
diff --git a/examples/declarative/gridview/pics/TodoList_48.png b/examples/declarative/gridview/pics/TodoList_48.png
new file mode 100644
index 0000000000..0988448d9b
--- /dev/null
+++ b/examples/declarative/gridview/pics/TodoList_48.png
Binary files differ
diff --git a/examples/declarative/gridview/pics/VideoPlayer_48.png b/examples/declarative/gridview/pics/VideoPlayer_48.png
new file mode 100644
index 0000000000..52638c50a7
--- /dev/null
+++ b/examples/declarative/gridview/pics/VideoPlayer_48.png
Binary files differ
diff --git a/examples/declarative/imageprovider/ImageProviderCore/qmldir b/examples/declarative/imageprovider/ImageProviderCore/qmldir
new file mode 100644
index 0000000000..1028590a84
--- /dev/null
+++ b/examples/declarative/imageprovider/ImageProviderCore/qmldir
@@ -0,0 +1,2 @@
+plugin imageprovider
+
diff --git a/examples/declarative/imageprovider/imageprovider.cpp b/examples/declarative/imageprovider/imageprovider.cpp
new file mode 100644
index 0000000000..011a63b035
--- /dev/null
+++ b/examples/declarative/imageprovider/imageprovider.cpp
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** 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 demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <qdeclarativeextensionplugin.h>
+
+#include <qdeclarativeengine.h>
+#include <qdeclarativecontext.h>
+#include <qdeclarative.h>
+#include <qdeclarativeitem.h>
+#include <qdeclarativeimageprovider.h>
+#include <qdeclarativeview.h>
+#include <QImage>
+#include <QPainter>
+
+/*
+ This example illustrates using a QDeclarativeImageProvider to serve
+ images asynchronously.
+*/
+
+//![0]
+class ColorImageProvider : public QDeclarativeImageProvider
+{
+public:
+ // This is run in a low priority thread.
+ QImage request(const QString &id) {
+ QImage image(100, 50, QImage::Format_RGB32);
+ image.fill(QColor(id).rgba());
+ QPainter p(&image);
+ p.setPen(Qt::black);
+ p.drawText(QRectF(0,0,100,50),Qt::AlignCenter,id);
+ return image;
+ }
+};
+
+
+class ImageProviderExtensionPlugin : public QDeclarativeExtensionPlugin
+{
+ Q_OBJECT
+public:
+ void registerTypes(const char *uri) {
+ Q_UNUSED(uri);
+
+ }
+
+ void initializeEngine(QDeclarativeEngine *engine, const char *uri) {
+ Q_UNUSED(uri);
+
+ engine->addImageProvider("colors", new ColorImageProvider);
+
+ QStringList dataList;
+ dataList.append("image://colors/red");
+ dataList.append("image://colors/green");
+ dataList.append("image://colors/blue");
+ dataList.append("image://colors/brown");
+ dataList.append("image://colors/orange");
+ dataList.append("image://colors/purple");
+ dataList.append("image://colors/yellow");
+
+ QDeclarativeContext *ctxt = engine->rootContext();
+ ctxt->setContextProperty("myModel", QVariant::fromValue(dataList));
+ }
+
+};
+
+#include "imageprovider.moc"
+
+Q_EXPORT_PLUGIN(ImageProviderExtensionPlugin);
+//![0]
+
diff --git a/examples/declarative/imageprovider/imageprovider.pro b/examples/declarative/imageprovider/imageprovider.pro
new file mode 100644
index 0000000000..86dbcca480
--- /dev/null
+++ b/examples/declarative/imageprovider/imageprovider.pro
@@ -0,0 +1,21 @@
+TEMPLATE = lib
+TARGET = imageprovider
+QT += declarative
+CONFIG += qt plugin
+
+TARGET = $$qtLibraryTarget($$TARGET)
+DESTDIR = ImageProviderCore
+
+# Input
+SOURCES += imageprovider.cpp
+
+sources.files = $$SOURCES imageprovider.qml imageprovider.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/imageprovider
+
+target.path = $$[QT_INSTALL_EXAMPLES]/declarative/imageprovider/ImageProviderCore
+
+ImageProviderCore_sources.files = \
+ ImageProviderCore/qmldir
+ImageProviderCore_sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/imageprovider/ImageProviderCore
+
+INSTALLS = sources ImageProviderCore_sources target
diff --git a/examples/declarative/imageprovider/imageprovider.qml b/examples/declarative/imageprovider/imageprovider.qml
new file mode 100644
index 0000000000..f899b1e93c
--- /dev/null
+++ b/examples/declarative/imageprovider/imageprovider.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+import "ImageProviderCore"
+//![0]
+ListView {
+ width: 100
+ height: 100
+ anchors.fill: parent
+ model: myModel
+ delegate: Component {
+ Item {
+ width: 100
+ height: 50
+ Text {
+ text: "Loading..."
+ anchors.centerIn: parent
+ }
+ Image {
+ source: modelData
+ }
+ }
+ }
+}
+//![0]
diff --git a/examples/declarative/layouts/Button.qml b/examples/declarative/layouts/Button.qml
new file mode 100644
index 0000000000..7cbf68af20
--- /dev/null
+++ b/examples/declarative/layouts/Button.qml
@@ -0,0 +1,22 @@
+import Qt 4.6
+
+Rectangle { border.color: "black"; color: "steelblue"; radius: 5; width: pix.width + textelement.width + 13; height: pix.height + 10; id: page
+ property string text
+ property string icon
+ signal clicked
+
+ Image { id: pix; x: 5; y:5; source: parent.icon}
+ Text { id: textelement; text: page.text; color: "white"; x:pix.width+pix.x+3; anchors.verticalCenter: pix.verticalCenter;}
+ MouseArea{ id:mr; anchors.fill: parent; onClicked: {parent.focus = true; page.clicked()}}
+
+ states:
+ State{ name:"pressed"; when:mr.pressed
+ PropertyChanges {target:textelement; x: 5}
+ PropertyChanges {target:pix; x:textelement.x+textelement.width + 3}
+ }
+
+ transitions:
+ Transition{
+ NumberAnimation { properties:"x,left"; easing.type:"InOutQuad"; duration:200 }
+ }
+}
diff --git a/examples/declarative/layouts/add.png b/examples/declarative/layouts/add.png
new file mode 100644
index 0000000000..f29d84b492
--- /dev/null
+++ b/examples/declarative/layouts/add.png
Binary files differ
diff --git a/examples/declarative/layouts/del.png b/examples/declarative/layouts/del.png
new file mode 100644
index 0000000000..1d753a3bc5
--- /dev/null
+++ b/examples/declarative/layouts/del.png
Binary files differ
diff --git a/examples/declarative/layouts/layouts.qml b/examples/declarative/layouts/layouts.qml
new file mode 100644
index 0000000000..4b2a3f808d
--- /dev/null
+++ b/examples/declarative/layouts/layouts.qml
@@ -0,0 +1,31 @@
+import Qt 4.6
+import Qt.widgets 4.6
+Item {
+ id: resizable
+ width:400
+ height:400
+
+ GraphicsObjectContainer {
+ anchors.fill:parent
+
+ QGraphicsWidget {
+ size.width:parent.width
+ size.height:parent.height
+
+ layout: QGraphicsLinearLayout {
+ LayoutItem {
+ minimumSize: "100x100"
+ maximumSize: "300x300"
+ preferredSize: "100x100"
+ Rectangle { color: "yellow"; anchors.fill: parent }
+ }
+ LayoutItem {
+ minimumSize: "100x100"
+ maximumSize: "400x400"
+ preferredSize: "200x200"
+ Rectangle { color: "green"; anchors.fill: parent }
+ }
+ }
+ }
+ }
+}
diff --git a/examples/declarative/layouts/positioners.qml b/examples/declarative/layouts/positioners.qml
new file mode 100644
index 0000000000..bce53bd0b7
--- /dev/null
+++ b/examples/declarative/layouts/positioners.qml
@@ -0,0 +1,163 @@
+import Qt 4.6
+
+Rectangle {
+ id: page
+ width: 420
+ height: 420
+ color: "white"
+
+ Column {
+ id: layout1
+ y: 0
+ move: Transition {
+ NumberAnimation {
+ properties: "y"; easing.type: "OutBounce"
+ }
+ }
+ add: Transition {
+ NumberAnimation {
+ properties: "y"; easing.type: "OutQuad"
+ }
+ }
+ Rectangle { color: "red"; width: 100; height: 50; border.color: "black"; radius: 15 }
+ Rectangle { id: blueV1; color: "lightsteelblue"; width: 100; height: 50; border.color: "black"; radius: 15
+ Behavior on opacity {NumberAnimation{}}
+ }
+ Rectangle { color: "green"; width: 100; height: 50; border.color: "black"; radius: 15 }
+ Rectangle { id: blueV2; color: "lightsteelblue"; width: 100; height: 50; border.color: "black"; radius: 15
+ Behavior on opacity {NumberAnimation{}}
+ }
+ Rectangle { color: "orange"; width: 100; height: 50; border.color: "black"; radius: 15 }
+ }
+
+ Row {
+ id: layout2
+ y: 300
+ move: Transition {
+ NumberAnimation {
+ properties: "x"; easing.type: "OutBounce"
+ }
+ }
+ add: Transition {
+ NumberAnimation {
+ properties: "x"; easing.type: "OutQuad"
+ }
+ }
+ Rectangle { color: "red"; width: 50; height: 100; border.color: "black"; radius: 15 }
+ Rectangle { id: blueH1; color: "lightsteelblue"; width: 50; height: 100; border.color: "black"; radius: 15
+ Behavior on opacity {NumberAnimation{}}
+ }
+ Rectangle { color: "green"; width: 50; height: 100; border.color: "black"; radius: 15 }
+ Rectangle { id: blueH2; color: "lightsteelblue"; width: 50; height: 100; border.color: "black"; radius: 15
+ Behavior on opacity {NumberAnimation{}}
+ }
+ Rectangle { color: "orange"; width: 50; height: 100; border.color: "black"; radius: 15 }
+ }
+
+ Button {
+ text: "Remove"
+ icon: "del.png"
+ x: 135
+ y: 90
+
+ onClicked: {
+ blueH2.opacity = 0
+ blueH1.opacity = 0
+ blueV1.opacity = 0
+ blueV2.opacity = 0
+ blueG1.opacity = 0
+ blueG2.opacity = 0
+ blueG3.opacity = 0
+ blueF1.opacity = 0
+ blueF2.opacity = 0
+ blueF3.opacity = 0
+ }
+ }
+
+ Button {
+ text: "Add"
+ icon: "add.png"
+ x: 145
+ y: 140
+
+ onClicked: {
+ blueH2.opacity = 1
+ blueH1.opacity = 1
+ blueV1.opacity = 1
+ blueV2.opacity = 1
+ blueG1.opacity = 1
+ blueG2.opacity = 1
+ blueG3.opacity = 1
+ blueF1.opacity = 1
+ blueF2.opacity = 1
+ blueF3.opacity = 1
+ }
+ }
+
+ Grid {
+ x: 260
+ y: 0
+ columns: 3
+
+ move: Transition {
+ NumberAnimation {
+ properties: "x,y"; easing.type: "OutBounce"
+ }
+ }
+
+ add: Transition {
+ NumberAnimation {
+ properties: "x,y"; easing.type: "OutBounce"
+ }
+ }
+
+ Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 }
+ Rectangle { id: blueG1; color: "lightsteelblue"; width: 50; height: 50; border.color: "black"; radius: 15
+ Behavior on opacity {NumberAnimation{}}
+ }
+ Rectangle { color: "green"; width: 50; height: 50; border.color: "black"; radius: 15 }
+ Rectangle { id: blueG2; color: "lightsteelblue"; width: 50; height: 50; border.color: "black"; radius: 15
+ Behavior on opacity {NumberAnimation{}}
+ }
+ Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 }
+ Rectangle { id: blueG3; color: "lightsteelblue"; width: 50; height: 50; border.color: "black"; radius: 15
+ Behavior on opacity {NumberAnimation{}}
+ }
+ Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 }
+ Rectangle { color: "green"; width: 50; height: 50; border.color: "black"; radius: 15 }
+ Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 }
+ }
+
+ Flow {
+ id: layout4
+ x: 260
+ y: 250
+ width: 150
+
+ move: Transition {
+ NumberAnimation {
+ properties: "x,y"; easing.type: "OutBounce"
+ }
+ }
+
+ add: Transition {
+ NumberAnimation {
+ properties: "x,y"; easing.type: "OutBounce"
+ }
+ }
+ Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 }
+ Rectangle { id: blueF1; color: "lightsteelblue"; width: 60; height: 50; border.color: "black"; radius: 15
+ Behavior on opacity {NumberAnimation{}}
+ }
+ Rectangle { color: "green"; width: 30; height: 50; border.color: "black"; radius: 15 }
+ Rectangle { id: blueF2; color: "lightsteelblue"; width: 60; height: 50; border.color: "black"; radius: 15
+ Behavior on opacity {NumberAnimation{}}
+ }
+ Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 }
+ Rectangle { id: blueF3; color: "lightsteelblue"; width: 40; height: 50; border.color: "black"; radius: 15
+ Behavior on opacity {NumberAnimation{}}
+ }
+ Rectangle { color: "red"; width: 80; height: 50; border.color: "black"; radius: 15 }
+ }
+
+}
diff --git a/examples/declarative/listview/content/ClickAutoRepeating.qml b/examples/declarative/listview/content/ClickAutoRepeating.qml
new file mode 100644
index 0000000000..5240e657f0
--- /dev/null
+++ b/examples/declarative/listview/content/ClickAutoRepeating.qml
@@ -0,0 +1,31 @@
+import Qt 4.6
+
+Item {
+ id: page
+ property int repeatdelay: 300
+ property int repeatperiod: 75
+ property bool isPressed: false
+
+ signal pressed
+ signal released
+ signal clicked
+
+ SequentialAnimation on isPressed {
+ running: false
+ id: autoRepeat
+ PropertyAction { target: page; property: "isPressed"; value: true }
+ ScriptAction { script: page.pressed() }
+ ScriptAction { script: page.clicked() }
+ PauseAnimation { duration: repeatdelay }
+ SequentialAnimation {
+ repeat: true
+ ScriptAction { script: page.clicked() }
+ PauseAnimation { duration: repeatperiod }
+ }
+ }
+ MouseArea {
+ anchors.fill: parent
+ onPressed: autoRepeat.start()
+ onReleased: { autoRepeat.stop(); parent.isPressed = false; page.released() }
+ }
+}
diff --git a/examples/declarative/listview/content/MediaButton.qml b/examples/declarative/listview/content/MediaButton.qml
new file mode 100644
index 0000000000..e9065c1417
--- /dev/null
+++ b/examples/declarative/listview/content/MediaButton.qml
@@ -0,0 +1,35 @@
+import Qt 4.6
+
+Item {
+ property var text
+ signal clicked
+
+ id: container
+ Image {
+ id: normal
+ source: "pics/button.png"
+ }
+ Image {
+ id: pressed
+ source: "pics/button-pressed.png"
+ opacity: 0
+ }
+ MouseArea {
+ id: clickRegion
+ anchors.fill: normal
+ onClicked: { container.clicked(); }
+ }
+ Text {
+ font.bold: true
+ color: "white"
+ anchors.centerIn: normal
+ text: container.text
+ }
+ width: normal.width
+
+ states: State {
+ name: "Pressed"
+ when: clickRegion.pressed == true
+ PropertyChanges { target: pressed; opacity: 1 }
+ }
+}
diff --git a/examples/declarative/listview/content/pics/add.png b/examples/declarative/listview/content/pics/add.png
new file mode 100644
index 0000000000..f29d84b492
--- /dev/null
+++ b/examples/declarative/listview/content/pics/add.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/archive-insert.png b/examples/declarative/listview/content/pics/archive-insert.png
new file mode 100644
index 0000000000..b706248162
--- /dev/null
+++ b/examples/declarative/listview/content/pics/archive-insert.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/archive-remove.png b/examples/declarative/listview/content/pics/archive-remove.png
new file mode 100644
index 0000000000..9640f6b055
--- /dev/null
+++ b/examples/declarative/listview/content/pics/archive-remove.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/button-pressed.png b/examples/declarative/listview/content/pics/button-pressed.png
new file mode 100644
index 0000000000..e434d327f2
--- /dev/null
+++ b/examples/declarative/listview/content/pics/button-pressed.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/button.png b/examples/declarative/listview/content/pics/button.png
new file mode 100644
index 0000000000..56a63ce641
--- /dev/null
+++ b/examples/declarative/listview/content/pics/button.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/del.png b/examples/declarative/listview/content/pics/del.png
new file mode 100644
index 0000000000..1d753a3bc5
--- /dev/null
+++ b/examples/declarative/listview/content/pics/del.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/fruit-salad.jpg b/examples/declarative/listview/content/pics/fruit-salad.jpg
new file mode 100644
index 0000000000..da5a6b10a2
--- /dev/null
+++ b/examples/declarative/listview/content/pics/fruit-salad.jpg
Binary files differ
diff --git a/examples/declarative/listview/content/pics/go-down.png b/examples/declarative/listview/content/pics/go-down.png
new file mode 100644
index 0000000000..63331a575a
--- /dev/null
+++ b/examples/declarative/listview/content/pics/go-down.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/go-up.png b/examples/declarative/listview/content/pics/go-up.png
new file mode 100644
index 0000000000..4459024ea8
--- /dev/null
+++ b/examples/declarative/listview/content/pics/go-up.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/hamburger.jpg b/examples/declarative/listview/content/pics/hamburger.jpg
new file mode 100644
index 0000000000..d0a15be1bf
--- /dev/null
+++ b/examples/declarative/listview/content/pics/hamburger.jpg
Binary files differ
diff --git a/examples/declarative/listview/content/pics/lemonade.jpg b/examples/declarative/listview/content/pics/lemonade.jpg
new file mode 100644
index 0000000000..db445c9ac8
--- /dev/null
+++ b/examples/declarative/listview/content/pics/lemonade.jpg
Binary files differ
diff --git a/examples/declarative/listview/content/pics/list-add.png b/examples/declarative/listview/content/pics/list-add.png
new file mode 100644
index 0000000000..e029787c71
--- /dev/null
+++ b/examples/declarative/listview/content/pics/list-add.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/list-remove.png b/examples/declarative/listview/content/pics/list-remove.png
new file mode 100644
index 0000000000..2bb1a59831
--- /dev/null
+++ b/examples/declarative/listview/content/pics/list-remove.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/moreDown.png b/examples/declarative/listview/content/pics/moreDown.png
new file mode 100644
index 0000000000..31a35d5c20
--- /dev/null
+++ b/examples/declarative/listview/content/pics/moreDown.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/moreUp.png b/examples/declarative/listview/content/pics/moreUp.png
new file mode 100644
index 0000000000..fefb9c9098
--- /dev/null
+++ b/examples/declarative/listview/content/pics/moreUp.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/pancakes.jpg b/examples/declarative/listview/content/pics/pancakes.jpg
new file mode 100644
index 0000000000..60c439638e
--- /dev/null
+++ b/examples/declarative/listview/content/pics/pancakes.jpg
Binary files differ
diff --git a/examples/declarative/listview/content/pics/trash.png b/examples/declarative/listview/content/pics/trash.png
new file mode 100644
index 0000000000..20425957a5
--- /dev/null
+++ b/examples/declarative/listview/content/pics/trash.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/vegetable-soup.jpg b/examples/declarative/listview/content/pics/vegetable-soup.jpg
new file mode 100644
index 0000000000..9dce332041
--- /dev/null
+++ b/examples/declarative/listview/content/pics/vegetable-soup.jpg
Binary files differ
diff --git a/examples/declarative/listview/dummydata/MyPetsModel.qml b/examples/declarative/listview/dummydata/MyPetsModel.qml
new file mode 100644
index 0000000000..1ac37bb94a
--- /dev/null
+++ b/examples/declarative/listview/dummydata/MyPetsModel.qml
@@ -0,0 +1,61 @@
+import Qt 4.6
+
+// ListModel allows free form list models to be defined and populated.
+
+ListModel {
+ id: petsModel
+ ListElement {
+ name: "Polly"
+ type: "Parrot"
+ age: 12
+ size: "Small"
+ }
+ ListElement {
+ name: "Penny"
+ type: "Turtle"
+ age: 4
+ size: "Small"
+ }
+ ListElement {
+ name: "Warren"
+ type: "Rabbit"
+ age: 2
+ size: "Small"
+ }
+ ListElement {
+ name: "Spot"
+ type: "Dog"
+ age: 9
+ size: "Medium"
+ }
+ ListElement {
+ name: "Schrödinger"
+ type: "Cat"
+ age: 2
+ size: "Medium"
+ }
+ ListElement {
+ name: "Joey"
+ type: "Kangaroo"
+ age: 1
+ size: "Medium"
+ }
+ ListElement {
+ name: "Kimba"
+ type: "Bunny"
+ age: 65
+ size: "Large"
+ }
+ ListElement {
+ name: "Rover"
+ type: "Dog"
+ age: 5
+ size: "Large"
+ }
+ ListElement {
+ name: "Tiny"
+ type: "Elephant"
+ age: 15
+ size: "Large"
+ }
+}
diff --git a/examples/declarative/listview/dummydata/Recipes.qml b/examples/declarative/listview/dummydata/Recipes.qml
new file mode 100644
index 0000000000..68e94ac3e1
--- /dev/null
+++ b/examples/declarative/listview/dummydata/Recipes.qml
@@ -0,0 +1,90 @@
+import Qt 4.6
+
+ListModel {
+ id: recipesModel
+ ListElement {
+ title: "Pancakes"
+ picture: "content/pics/pancakes.jpg"
+ ingredients: "<html>
+ <ul>
+ <li> 1 cup (150g) self-raising flour
+ <li> 1 tbs caster sugar
+ <li> 3/4 cup (185ml) milk
+ <li> 1 egg
+ </ul>
+ </html>"
+ method: "<html>
+ <ol>
+ <li> Sift flour and sugar together into a bowl. Add a pinch of salt.
+ <li> Beat milk and egg together, then add to dry ingredients. Beat until smooth.
+ <li> Pour mixture into a pan on medium heat and cook until bubbles appear on the surface.
+ <li> Turn over and cook other side until golden.
+ </ol>
+ </html>"
+ }
+ ListElement {
+ title: "Fruit Salad"
+ picture: "content/pics/fruit-salad.jpg"
+ ingredients: "* Seasonal Fruit"
+ method: "* Chop fruit and place in a bowl."
+ }
+ ListElement {
+ title: "Vegetable Soup"
+ picture: "content/pics/vegetable-soup.jpg"
+ ingredients: "<html>
+ <ul>
+ <li> 1 onion
+ <li> 1 turnip
+ <li> 1 potato
+ <li> 1 carrot
+ <li> 1 head of celery
+ <li> 1 1/2 litres of water
+ </ul>
+ </html>"
+ method: "<html>
+ <ol>
+ <li> Chop vegetables.
+ <li> Boil in water until vegetables soften.
+ <li> Season with salt and pepper to taste.
+ </ol>
+ </html>"
+ }
+ ListElement {
+ title: "Hamburger"
+ picture: "content/pics/hamburger.jpg"
+ ingredients: "<html>
+ <ul>
+ <li> 500g minced beef
+ <li> Seasoning
+ <li> lettuce, tomato, onion, cheese
+ <li> 1 hamburger bun for each burger
+ </ul>
+ </html>"
+ method: "<html>
+ <ol>
+ <li> Mix the beef, together with seasoning, in a food processor.
+ <li> Shape the beef into burgers.
+ <li> Grill the burgers for about 5 mins on each side (until cooked through)
+ <li> Serve each burger on a bun with ketchup, cheese, lettuce, tomato and onion.
+ </ol>
+ </html>"
+ }
+ ListElement {
+ title: "Lemonade"
+ picture: "content/pics/lemonade.jpg"
+ ingredients: "<html>
+ <ul>
+ <li> 1 cup Lemon Juice
+ <li> 1 cup Sugar
+ <li> 6 Cups of Water (2 cups warm water, 4 cups cold water)
+ </ul>
+ </html>"
+ method: "<html>
+ <ol>
+ <li> Pour 2 cups of warm water into a pitcher and stir in sugar until it dissolves.
+ <li> Pour in lemon juice, stir again, and add 4 cups of cold water.
+ <li> Chill or serve over ice cubes.
+ </ol>
+ </html>"
+ }
+}
diff --git a/examples/declarative/listview/dynamic.qml b/examples/declarative/listview/dynamic.qml
new file mode 100644
index 0000000000..81550d7da2
--- /dev/null
+++ b/examples/declarative/listview/dynamic.qml
@@ -0,0 +1,159 @@
+import Qt 4.6
+import "content"
+import "../scrollbar"
+
+Rectangle {
+ width: 640; height: 480
+ color: "#343434"
+
+ ListModel {
+ id: fruitModel
+ ListElement {
+ name: "Apple"; cost: 2.45
+ attributes: [
+ ListElement { description: "Core" },
+ ListElement { description: "Deciduous" }
+ ]
+ }
+ ListElement {
+ name: "Banana"; cost: 1.95
+ attributes: [
+ ListElement { description: "Tropical" },
+ ListElement { description: "Seedless" }
+ ]
+ }
+ ListElement {
+ name: "Cumquat"; cost: 3.25
+ attributes: [
+ ListElement { description: "Citrus" }
+ ]
+ }
+ ListElement {
+ name: "Durian"; cost: 9.95
+ attributes: [
+ ListElement { description: "Tropical" },
+ ListElement { description: "Smelly" }
+ ]
+ }
+ ListElement {
+ name: "Elderberry"; cost: 0.05
+ attributes: [
+ ListElement { description: "Berry" }
+ ]
+ }
+ ListElement {
+ name: "Fig"; cost: 0.25
+ attributes: [
+ ListElement { description: "Flower" }
+ ]
+ }
+ }
+
+ Component {
+ id: fruitDelegate
+ Item {
+ width: parent.width; height: 55
+
+ Column {
+ id: moveButtons; x: 5; width: childrenRect.width; anchors.verticalCenter: parent.verticalCenter
+ Image { source: "content/pics/go-up.png"
+ MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index-1,1) }
+ }
+ Image { source: "content/pics/go-down.png"
+ MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index+1,1) }
+ }
+ }
+
+ Column {
+ anchors { right: itemButtons.left; verticalCenter: parent.verticalCenter; left: moveButtons.right; leftMargin: 10 }
+ Text {
+ id: label; font.bold: true; text: name; elide: Text.ElideRight; font.pixelSize: 15
+ width: parent.width; color: "White"
+ }
+ Row {
+ spacing: 5
+ Repeater { model: attributes; Component { Text { text: description; color: "White" } } }
+ }
+ }
+
+ Row {
+ id: itemButtons
+ anchors.right: removeButton.left; anchors.rightMargin: 35; spacing: 10
+ width: childrenRect.width; anchors.verticalCenter: parent.verticalCenter
+ Image { source: "content/pics/list-add.png"
+ ClickAutoRepeating { id: clickUp; anchors.fill: parent; onClicked: fruitModel.setProperty(index,"cost",cost+0.25) }
+ scale: clickUp.isPressed ? 0.9 : 1; transformOrigin: Item.Center
+ }
+ Text { id: costText; text: '$'+Number(cost).toFixed(2); font.pixelSize: 15; color: "White"; font.bold: true; }
+ Image { source: "content/pics/list-remove.png"
+ ClickAutoRepeating { id: clickDown; anchors.fill: parent; onClicked: fruitModel.setProperty(index,"cost",Math.max(0,cost-0.25)) }
+ scale: clickDown.isPressed ? 0.9 : 1; transformOrigin: Item.Center
+ }
+ }
+ Image {
+ id: removeButton; source: "content/pics/archive-remove.png"
+ anchors { verticalCenter: parent.verticalCenter; right: parent.right; rightMargin: 10 }
+ MouseArea { anchors.fill:parent; onClicked: fruitModel.remove(index) }
+ }
+ }
+ }
+
+ ListView {
+ id: view
+ model: fruitModel; delegate: fruitDelegate
+ anchors { top: parent.top; left: parent.left; right: parent.right; bottom: buttons.top }
+ }
+
+ // Attach scrollbar to the right edge of the view.
+ ScrollBar {
+ id: verticalScrollBar
+ opacity: 0
+ orientation: "Vertical"
+ position: view.visibleArea.yPosition
+ pageSize: view.visibleArea.heightRatio
+ width: 8
+ height: view.height
+ anchors.right: view.right
+ // Only show the scrollbar when the view is moving.
+ states: [
+ State {
+ name: "ShowBars"; when: view.moving
+ PropertyChanges { target: verticalScrollBar; opacity: 1 }
+ }
+ ]
+ transitions: [ Transition { NumberAnimation { properties: "opacity"; duration: 400 } } ]
+ }
+
+ Row {
+ x: 8; width: childrenRect.width
+ height: childrenRect.height
+ anchors { bottom: parent.bottom; bottomMargin: 8 }
+ spacing: 8
+ id: buttons
+ Image { source: "content/pics/archive-insert.png"
+ MouseArea { anchors.fill: parent;
+ onClicked: {
+ fruitModel.append({
+ "name":"Pizza Margarita",
+ "cost":5.95,
+ "attributes":[{"description": "Cheese"},{"description": "Tomato"}]
+ })
+ }
+ }
+ }
+ Image { source: "content/pics/archive-insert.png"
+ MouseArea { anchors.fill: parent;
+ onClicked: {
+ fruitModel.insert(0,{
+ "name":"Pizza Supreme",
+ "cost":9.95,
+ "attributes":[{"description": "Cheese"},{"description": "Tomato"},{"description": "The Works"}]
+ })
+ }
+ }
+ }
+ Image { source: "content/pics/archive-remove.png"
+ MouseArea { anchors.fill: parent; onClicked: fruitModel.clear() }
+ }
+ }
+}
diff --git a/examples/declarative/listview/highlight.qml b/examples/declarative/listview/highlight.qml
new file mode 100644
index 0000000000..5e4911d844
--- /dev/null
+++ b/examples/declarative/listview/highlight.qml
@@ -0,0 +1,57 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400; height: 300; color: "white"
+
+ // MyPets model is defined in dummydata/MyPetsModel.qml
+ // The viewer automatically loads files in dummydata/* to assist
+ // development without a real data source.
+ // This one contains my pets.
+ // Define a delegate component. A component will be
+ // instantiated for each visible item in the list.
+ Component {
+ id: petDelegate
+ Item {
+ id: wrapper
+ width: 200; height: 50
+ Column {
+ Text { text: 'Name: ' + name }
+ Text { text: 'Type: ' + type }
+ Text { text: 'Age: ' + age }
+ }
+ // Use the ListView.isCurrentItem attached property to
+ // indent the item if it is the current item.
+ states: [
+ State {
+ name: "Current"
+ when: wrapper.ListView.isCurrentItem
+ PropertyChanges { target: wrapper; x: 10 }
+ }
+ ]
+ transitions: [
+ Transition {
+ NumberAnimation {
+ properties: "x"; duration: 200
+ }
+ }
+ ]
+ }
+ }
+ // Specify a highlight with custom movement. Note that highlightFollowsCurrentItem
+ // is set to false in the ListView so that we can control how the
+ // highlight moves to the current item.
+ Component {
+ id: petHighlight
+ Rectangle {
+ width: 200; height: 50; color: "#FFFF88"
+ SpringFollow on y { source: list1.currentItem.y; spring: 3; damping: 0.1 }
+ }
+ }
+ ListView {
+ id: list1
+ width: 200; height: parent.height
+ model: MyPetsModel; delegate: petDelegate
+ highlight: petHighlight; highlightFollowsCurrentItem: false
+ focus: true
+ }
+}
diff --git a/examples/declarative/listview/itemlist.qml b/examples/declarative/listview/itemlist.qml
new file mode 100644
index 0000000000..41aa8607fc
--- /dev/null
+++ b/examples/declarative/listview/itemlist.qml
@@ -0,0 +1,58 @@
+// This example demonstrates placing items in a view using
+// a VisualItemModel
+
+import Qt 4.6
+
+Rectangle {
+ color: "lightgray"
+ width: 240
+ height: 320
+
+ VisualItemModel {
+ id: itemModel
+ Rectangle {
+ height: view.height; width: view.width; color: "#FFFEF0"
+ Text { text: "Page 1"; font.bold: true; anchors.centerIn: parent }
+ }
+ Rectangle {
+ height: view.height; width: view.width; color: "#F0FFF7"
+ Text { text: "Page 2"; font.bold: true; anchors.centerIn: parent }
+ }
+ Rectangle {
+ height: view.height; width: view.width; color: "#F4F0FF"
+ Text { text: "Page 3"; font.bold: true; anchors.centerIn: parent }
+ }
+ }
+
+ ListView {
+ id: view
+ anchors.fill: parent; anchors.bottomMargin: 30
+ model: itemModel
+ preferredHighlightBegin: 0; preferredHighlightEnd: 0
+ highlightRangeMode: "StrictlyEnforceRange"
+ orientation: ListView.Horizontal
+ snapMode: ListView.SnapOneItem; flickDeceleration: 2000
+ }
+
+ Rectangle {
+ color: "gray"
+ anchors.top: view.bottom
+ anchors.bottom: parent.bottom
+ height: 30
+ width: 240
+
+ Row {
+ anchors.centerIn: parent
+ spacing: 20
+ Repeater {
+ model: itemModel.count
+ Rectangle {
+ width: 5; height: 5
+ radius: 3
+ MouseArea { width: 20; height: 20; anchors.centerIn: parent; onClicked: view.currentIndex = index }
+ color: view.currentIndex == index ? "blue" : "white"
+ }
+ }
+ }
+ }
+}
diff --git a/examples/declarative/listview/listview.qml b/examples/declarative/listview/listview.qml
new file mode 100644
index 0000000000..92acce1732
--- /dev/null
+++ b/examples/declarative/listview/listview.qml
@@ -0,0 +1,77 @@
+import Qt 4.6
+
+Rectangle {
+ width: 600; height: 300; color: "white"
+
+ // MyPets model is defined in dummydata/MyPetsModel.qml
+ // The viewer automatically loads files in dummydata/* to assist
+ // development without a real data source.
+ // This one contains my pets.
+ // Define a delegate component. A component will be
+ // instantiated for each visible item in the list.
+ Component {
+ id: petDelegate
+ Item {
+ width: 200; height: 50
+ Column {
+ Text { text: 'Name: ' + name }
+ Text { text: 'Type: ' + type }
+ Text { text: 'Age: ' + age }
+ }
+ }
+ }
+
+ // Define a highlight component. Just one of these will be instantiated
+ // by each ListView and placed behind the current item.
+ Component {
+ id: petHighlight
+ Rectangle { color: "#FFFF88" }
+ }
+
+ // Show the model in three lists, with different highlight ranges.
+ // preferredHighlightBegin and preferredHighlightEnd set the
+ // range in which to attempt to maintain the highlight.
+ // Note that the second and third ListView
+ // set their currentIndex to be the same as the first, and that
+ // the first ListView is given keyboard focus.
+ // The default mode allows the currentItem to move freely
+ // within the visible area. If it would move outside the visible
+ // area, the view is scrolled to keep it visible.
+ // The second list sets a highlight range which attempts to keep the
+ // current item within the the bounds of the range, however
+ // items will not scroll beyond the beginning or end of the view,
+ // forcing the highlight to move outside the range at the ends.
+ // The third list sets the highlightRangeMode to StrictlyEnforceRange
+ // and sets a range smaller than the height of an item. This
+ // forces the current item to change when the view is flicked,
+ // since the highlight is unable to move.
+ // Note that the first ListView sets its currentIndex to be equal to
+ // the third ListView's currentIndex. By flicking List3 with
+ // the mouse, the current index of List1 will be changed.
+ ListView {
+ id: list1
+ width: 200; height: parent.height
+ model: MyPetsModel; delegate: petDelegate
+ highlight: petHighlight; currentIndex: list3.currentIndex
+ focus: true
+ }
+ ListView {
+ id: list2
+ x: 200; width: 200; height: parent.height
+ model: MyPetsModel; delegate: petDelegate; highlight: petHighlight
+ preferredHighlightBegin: 80
+ preferredHighlightEnd: 220
+ highlightRangeMode: "ApplyRange"
+ currentIndex: list1.currentIndex
+ }
+ ListView {
+ id: list3
+ x: 400; width: 200; height: parent.height
+ model: MyPetsModel; delegate: petDelegate; highlight: petHighlight
+ currentIndex: list1.currentIndex
+ preferredHighlightBegin: 125
+ preferredHighlightEnd: 125
+ highlightRangeMode: "StrictlyEnforceRange"
+ flickDeceleration: 1000
+ }
+}
diff --git a/examples/declarative/listview/recipes.qml b/examples/declarative/listview/recipes.qml
new file mode 100644
index 0000000000..b76a9ab0e0
--- /dev/null
+++ b/examples/declarative/listview/recipes.qml
@@ -0,0 +1,140 @@
+import Qt 4.6
+import "content"
+
+// This example illustrates expanding a list item to show a more detailed view
+
+Rectangle {
+ id: page
+ width: 400; height: 240; color: "black"
+
+ // Delegate for the recipes. This delegate has two modes:
+ // 1. the list mode (default), which just shows the picture and title of the recipe.
+ // 2. the details mode, which also shows the ingredients and method.
+ Component {
+ id: recipeDelegate
+ Item {
+ id: wrapper
+ width: list.width
+
+ // Create a property to contain the visibility of the details.
+ // We can bind multiple element's opacity to this one property,
+ // rather than having a "PropertyChanges" line for each element we
+ // want to fade.
+ property real detailsOpacity : 0
+
+ // A simple rounded rectangle for the background
+ Rectangle {
+ id: background
+ x: 1; y: 2; width: parent.width - 2; height: parent.height - 4
+ color: "#FEFFEE"; border.color: "#FFBE4F"; radius: 5
+ }
+
+ // This mouse region covers the entire delegate.
+ // When clicked it changes mode to 'Details'. If we are already
+ // in Details mode, then no change will happen.
+ MouseArea {
+ id: pageMouse
+ anchors.fill: parent
+ onClicked: wrapper.state = 'Details';
+ }
+
+ // Layout the page. Picture, title and ingredients at the top, method at the
+ // bottom. Note that elements that should not be visible in the list
+ // mode have their opacity set to wrapper.detailsOpacity.
+ Row {
+ id: topLayout
+ x: 10; y: 10; height: recipePic.height; width: parent.width
+ spacing: 10
+
+ Image {
+ id: recipePic
+ source: picture; width: 48; height: 48
+ }
+
+ Column {
+ height: recipePic.height; width: background.width-recipePic.width-20
+ spacing: 5
+ Text { id: name; text: title; font.bold: true; font.pointSize: 16 }
+ Text {
+ text: "Ingredients"; font.pointSize: 12; font.bold: true
+ opacity: wrapper.detailsOpacity
+ }
+ Text {
+ text: ingredients; wrap: true; width: parent.width
+ opacity: wrapper.detailsOpacity
+ }
+ }
+ }
+
+ Item {
+ id: details
+ x: 10; width: parent.width-20
+ anchors.top: topLayout.bottom; anchors.topMargin: 10
+ anchors.bottom: parent.bottom; anchors.bottomMargin: 10
+ opacity: wrapper.detailsOpacity
+
+ Text {
+ id: methodTitle
+ text: "Method"; font.pointSize: 12; font.bold: true
+ anchors.top: parent.top
+ }
+ Flickable {
+ id: flick
+ anchors.top: methodTitle.bottom; anchors.bottom: parent.bottom
+ width: parent.width; contentHeight: methodText.height; clip: true
+ Text { id: methodText; text: method; wrap: true; width: details.width }
+ }
+ Image {
+ anchors.right: flick.right; anchors.top: flick.top
+ source: "content/pics/moreUp.png"; opacity: flick.atYBeginning ? 0 : 1
+ }
+ Image {
+ anchors.right: flick.right; anchors.bottom: flick.bottom
+ source: "content/pics/moreDown.png"; opacity: flick.atYEnd ? 0 : 1
+ }
+ }
+
+ // A button to close the detailed view, i.e. set the state back to default ('').
+ MediaButton {
+ anchors.right: background.right; anchors.rightMargin: 5
+ y: 10; opacity: wrapper.detailsOpacity
+ text: "Close"; onClicked: wrapper.state = '';
+ }
+
+ // Make the default height equal the hight of the picture, plus margin.
+ height: 68
+
+ states: State {
+ name: "Details"
+ PropertyChanges { target: background; color: "white" }
+ // Make the picture bigger
+ PropertyChanges { target: recipePic; width: 128; height: 128 }
+ // Make details visible
+ PropertyChanges { target: wrapper; detailsOpacity: 1; x: 0 }
+ // Make the detailed view fill the entire list area
+ PropertyChanges { target: wrapper; height: list.height }
+ // Move the list so that this item is at the top.
+ PropertyChanges { target: wrapper.ListView.view; explicit: true; contentY: wrapper.y }
+ // Disallow flicking while we're in detailed view
+ PropertyChanges { target: wrapper.ListView.view; interactive: false }
+ }
+
+ transitions: Transition {
+ // Make the state changes smooth
+ ParallelAnimation {
+ ColorAnimation { property: "color"; duration: 500 }
+ NumberAnimation {
+ duration: 300; properties: "detailsOpacity,x,contentY,height,width"
+ }
+ }
+ }
+ }
+ }
+
+ // The actual list
+ ListView {
+ id: list
+ model: Recipes; delegate: recipeDelegate
+ anchors.fill: parent; clip: true
+ }
+}
diff --git a/examples/declarative/listview/sections.qml b/examples/declarative/listview/sections.qml
new file mode 100644
index 0000000000..877026b4c7
--- /dev/null
+++ b/examples/declarative/listview/sections.qml
@@ -0,0 +1,67 @@
+import Qt 4.6
+
+//! [0]
+Rectangle {
+ width: 200
+ height: 240
+ color: "white"
+ // MyPets model is defined in dummydata/MyPetsModel.qml
+ // The viewer automatically loads files in dummydata/* to assist
+ // development without a real data source.
+ // This one contains my pets.
+
+ // Define a delegate component that includes a separator for sections.
+ Component {
+ id: petDelegate
+ Item {
+ id: wrapper
+ width: 200
+ // My height is the combined height of the description and the section separator
+ height: desc.height
+ Item {
+ id: desc
+ x: 5
+ height: layout.height + 4
+ Column {
+ id: layout
+ y: 2
+ Text { text: 'Name: ' + name }
+ Text { text: 'Type: ' + type }
+ Text { text: 'Age: ' + age }
+ }
+ }
+ }
+ }
+ // Define a highlight component. Just one of these will be instantiated
+ // by each ListView and placed behind the current item.
+ Component {
+ id: petHighlight
+ Rectangle {
+ color: "#FFFF88"
+ }
+ }
+ // The list
+ ListView {
+ id: myList
+ width: 200
+ height: parent.height
+ model: MyPetsModel
+ delegate: petDelegate
+ highlight: petHighlight
+ // The sectionExpression is simply the size of the pet.
+ // We use this to determine which section we are in above.
+ section.property: "size"
+ section.criteria: ViewSection.FullString
+ section.delegate: Rectangle {
+ color: "lightsteelblue"
+ width: 200
+ height: 20
+ Text {
+ text: section; font.bold: true
+ x: 2; height: parent.height; verticalAlignment: 'AlignVCenter'
+ }
+ }
+ focus: true
+ }
+}
+//! [0]
diff --git a/examples/declarative/mousearea/mouse.qml b/examples/declarative/mousearea/mouse.qml
new file mode 100644
index 0000000000..9191f8a00e
--- /dev/null
+++ b/examples/declarative/mousearea/mouse.qml
@@ -0,0 +1,40 @@
+import Qt 4.6
+
+Rectangle {
+ color: "white"
+ width: 200; height: 200
+ Rectangle {
+ width: 50; height: 50
+ color: "red"
+ Text { text: "Click"; anchors.centerIn: parent }
+ MouseArea {
+ hoverEnabled: true
+ acceptedButtons: Qt.LeftButton | Qt.RightButton
+ onPressed: { console.log('press (x: ' + mouse.x + ' y: ' + mouse.y + ' button: ' + (mouse.button == Qt.RightButton ? 'right' : 'left') + ' Shift: ' + (mouse.modifiers & Qt.ShiftModifier ? 'true' : 'false') + ')') }
+ onReleased: { console.log('release (x: ' + mouse.x + ' y: ' + mouse.y + ' isClick: ' + mouse.isClick + ' wasHeld: ' + mouse.wasHeld + ')') }
+ onClicked: { console.log('click (x: ' + mouse.x + ' y: ' + mouse.y + ' wasHeld: ' + mouse.wasHeld + ')') }
+ onDoubleClicked: { console.log('double click (x: ' + mouse.x + ' y: ' + mouse.y + ')') }
+ onPressAndHold: { console.log('press and hold') }
+ onEntered: { console.log('entered ' + pressed) }
+ onExited: { console.log('exited ' + pressed) }
+ anchors.fill: parent
+ }
+ }
+ Rectangle {
+ y: 100; width: 50; height: 50
+ color: "blue"
+ Text { text: "Drag"; anchors.centerIn: parent }
+ MouseArea {
+ drag.target: parent
+ drag.axis: "XAxis"
+ drag.minimumX: 0
+ drag.maximumX: 150
+ onPressed: { console.log('press') }
+ onReleased: { console.log('release (isClick: ' + mouse.isClick + ') (wasHeld: ' + mouse.wasHeld + ')') }
+ onClicked: { console.log('click' + '(wasHeld: ' + mouse.wasHeld + ')') }
+ onDoubleClicked: { console.log('double click') }
+ onPressAndHold: { console.log('press and hold') }
+ anchors.fill: parent
+ }
+ }
+}
diff --git a/examples/declarative/objectlistmodel/dataobject.cpp b/examples/declarative/objectlistmodel/dataobject.cpp
new file mode 100644
index 0000000000..4c44ee4cc2
--- /dev/null
+++ b/examples/declarative/objectlistmodel/dataobject.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QDebug>
+#include "dataobject.h"
+
+DataObject::DataObject(QObject *parent)
+ : QObject(parent)
+{
+}
+
+DataObject::DataObject(const QString &name, const QString &color, QObject *parent)
+ : QObject(parent), m_name(name), m_color(color)
+{
+}
+
+QString DataObject::name() const
+{
+ return m_name;
+}
+
+void DataObject::setName(const QString &name)
+{
+ m_name = name;
+}
+
+QString DataObject::color() const
+{
+ return m_color;
+}
+
+void DataObject::setColor(const QString &color)
+{
+ m_color = color;
+}
diff --git a/examples/declarative/objectlistmodel/dataobject.h b/examples/declarative/objectlistmodel/dataobject.h
new file mode 100644
index 0000000000..68044747ab
--- /dev/null
+++ b/examples/declarative/objectlistmodel/dataobject.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DATAOBJECT_H
+#define DATAOBJECT_H
+
+#include <QObject>
+
+class DataObject : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(QString color READ color WRITE setColor)
+
+public:
+ DataObject(QObject *parent=0);
+ DataObject(const QString &name, const QString &color, QObject *parent=0);
+
+ QString name() const;
+ void setName(const QString &name);
+
+ QString color() const;
+ void setColor(const QString &color);
+
+private:
+ QString m_name;
+ QString m_color;
+};
+
+#endif // DATAOBJECT_H
diff --git a/examples/declarative/objectlistmodel/main.cpp b/examples/declarative/objectlistmodel/main.cpp
new file mode 100644
index 0000000000..b210570234
--- /dev/null
+++ b/examples/declarative/objectlistmodel/main.cpp
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** 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 demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include <qdeclarativeengine.h>
+#include <qdeclarativecontext.h>
+#include <qdeclarative.h>
+#include <qdeclarativeitem.h>
+#include <qdeclarativeview.h>
+
+#include "dataobject.h"
+
+/*
+ This example illustrates exposing a QList<QObject*> as a
+ model in QML
+*/
+
+int main(int argc, char ** argv)
+{
+ QApplication app(argc, argv);
+
+ QDeclarativeView view;
+
+ QList<QObject*> dataList;
+ dataList.append(new DataObject("Item 1", "red"));
+ dataList.append(new DataObject("Item 2", "green"));
+ dataList.append(new DataObject("Item 3", "blue"));
+ dataList.append(new DataObject("Item 4", "yellow"));
+
+ QDeclarativeContext *ctxt = view.rootContext();
+ ctxt->setContextProperty("myModel", QVariant::fromValue(dataList));
+
+ view.setSource(QUrl("qrc:view.qml"));
+ view.show();
+
+ return app.exec();
+}
+
diff --git a/examples/declarative/objectlistmodel/objectlistmodel.pro b/examples/declarative/objectlistmodel/objectlistmodel.pro
new file mode 100644
index 0000000000..869cde35af
--- /dev/null
+++ b/examples/declarative/objectlistmodel/objectlistmodel.pro
@@ -0,0 +1,18 @@
+TEMPLATE = app
+TARGET = objectlistmodel
+DEPENDPATH += .
+INCLUDEPATH += .
+QT += declarative
+
+# Input
+SOURCES += main.cpp \
+ dataobject.cpp
+HEADERS += dataobject.h
+RESOURCES += objectlistmodel.qrc
+
+sources.files = $$SOURCES $$HEADERS $$RESOURCES objectlistmodel.pro view.qml
+sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/objectlistmodel
+target.path = $$[QT_INSTALL_EXAMPLES]/declarative/objectlistmodel
+
+INSTALLS += sources target
+
diff --git a/examples/declarative/objectlistmodel/objectlistmodel.qrc b/examples/declarative/objectlistmodel/objectlistmodel.qrc
new file mode 100644
index 0000000000..17e9301471
--- /dev/null
+++ b/examples/declarative/objectlistmodel/objectlistmodel.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>view.qml</file>
+</qresource>
+</RCC>
diff --git a/examples/declarative/objectlistmodel/view.qml b/examples/declarative/objectlistmodel/view.qml
new file mode 100644
index 0000000000..5f5e4153e3
--- /dev/null
+++ b/examples/declarative/objectlistmodel/view.qml
@@ -0,0 +1,16 @@
+import Qt 4.6
+
+ListView {
+ width: 100
+ height: 100
+ anchors.fill: parent
+ model: myModel
+ delegate: Component {
+ Rectangle {
+ height: 25
+ width: 100
+ color: model.color
+ Text { text: name }
+ }
+ }
+}
diff --git a/examples/declarative/package/Delegate.qml b/examples/declarative/package/Delegate.qml
new file mode 100644
index 0000000000..f35314fa5b
--- /dev/null
+++ b/examples/declarative/package/Delegate.qml
@@ -0,0 +1,48 @@
+import Qt 4.6
+
+//![0]
+Package {
+ Text { id: listDelegate; width: 200; height: 25; text: 'Empty'; Package.name: 'list' }
+ Text { id: gridDelegate; width: 100; height: 50; text: 'Empty'; Package.name: 'grid' }
+
+ Rectangle {
+ id: wrapper
+ width: 200; height: 25
+ color: 'lightsteelblue'
+
+ Text { text: display; anchors.centerIn: parent }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (wrapper.state == 'inList')
+ wrapper.state = 'inGrid';
+ else
+ wrapper.state = 'inList';
+ }
+ }
+
+ state: 'inList'
+ states: [
+ State {
+ name: 'inList'
+ ParentChange { target: wrapper; parent: listDelegate }
+ },
+ State {
+ name: 'inGrid'
+ ParentChange {
+ target: wrapper; parent: gridDelegate
+ x: 0; y: 0; width: gridDelegate.width; height: gridDelegate.height
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ ParentAnimation {
+ NumberAnimation { properties: 'x,y,width,height'; duration: 300 }
+ }
+ }
+ ]
+ }
+}
+//![0]
diff --git a/examples/declarative/package/view.qml b/examples/declarative/package/view.qml
new file mode 100644
index 0000000000..07bba0c4d8
--- /dev/null
+++ b/examples/declarative/package/view.qml
@@ -0,0 +1,35 @@
+import Qt 4.6
+
+Item {
+ width: 400
+ height: 200
+
+ ListModel {
+ id: myModel
+ ListElement { display: "One" }
+ ListElement { display: "Two" }
+ ListElement { display: "Three" }
+ ListElement { display: "Four" }
+ ListElement { display: "Five" }
+ ListElement { display: "Six" }
+ ListElement { display: "Seven" }
+ ListElement { display: "Eight" }
+ }
+ //![0]
+ VisualDataModel {
+ id: visualModel
+ delegate: Delegate {}
+ model: myModel
+ }
+
+ ListView {
+ width: 200; height:200
+ model: visualModel.parts.list
+ }
+ GridView {
+ x: 200; width: 200; height:200
+ cellHeight: 50
+ model: visualModel.parts.grid
+ }
+ //![0]
+}
diff --git a/examples/declarative/parallax/parallax.qml b/examples/declarative/parallax/parallax.qml
new file mode 100644
index 0000000000..6193f278a0
--- /dev/null
+++ b/examples/declarative/parallax/parallax.qml
@@ -0,0 +1,41 @@
+import Qt 4.6
+import "../clocks/content"
+import "qml"
+
+Rectangle {
+ id: root
+
+ width: 320; height: 480
+
+ ParallaxView {
+ id: parallax
+ anchors.fill: parent
+ background: "pics/background.jpg"
+
+ Item {
+ property url icon: "pics/yast-wol.png"
+ width: 320; height: 480
+ Clock { anchors.centerIn: parent }
+ }
+
+ Item {
+ property url icon: "pics/home-page.svg"
+ width: 320; height: 480
+ Smiley { }
+ }
+
+ Item {
+ property url icon: "pics/yast-joystick.png"
+ width: 320; height: 480
+
+ Loader {
+ anchors { top: parent.top; topMargin: 10; horizontalCenter: parent.horizontalCenter }
+ width: 300; height: 400
+ clip: true; resizeMode: Loader.SizeItemToLoader
+ source: "../../../demos/declarative/samegame/samegame.qml"
+ }
+ }
+
+ currentIndex: root.currentIndex
+ }
+}
diff --git a/examples/declarative/parallax/pics/background.jpg b/examples/declarative/parallax/pics/background.jpg
new file mode 100644
index 0000000000..61cca2f138
--- /dev/null
+++ b/examples/declarative/parallax/pics/background.jpg
Binary files differ
diff --git a/examples/declarative/parallax/pics/face-smile.png b/examples/declarative/parallax/pics/face-smile.png
new file mode 100644
index 0000000000..3d66d72578
--- /dev/null
+++ b/examples/declarative/parallax/pics/face-smile.png
Binary files differ
diff --git a/examples/declarative/parallax/pics/home-page.svg b/examples/declarative/parallax/pics/home-page.svg
new file mode 100644
index 0000000000..4f16958844
--- /dev/null
+++ b/examples/declarative/parallax/pics/home-page.svg
@@ -0,0 +1,445 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="48"
+ height="48"
+ overflow="visible"
+ enable-background="new 0 0 128 129.396"
+ xml:space="preserve"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="go-home.svg"
+ sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions"
+ version="1.0"
+ inkscape:export-filename="/home/tigert/My Downloads/go-home.png"
+ inkscape:export-xdpi="90.000000"
+ inkscape:export-ydpi="90.000000"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata
+ id="metadata367"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><cc:license
+ rdf:resource="http://creativecommons.org/licenses/publicdomain/" /><dc:title>Go Home</dc:title><dc:creator><cc:Agent><dc:title>Jakub Steiner</dc:title></cc:Agent></dc:creator><dc:source>http://jimmac.musichall.cz</dc:source><dc:subject><rdf:Bag><rdf:li>home</rdf:li><rdf:li>return</rdf:li><rdf:li>go</rdf:li><rdf:li>default</rdf:li><rdf:li>user</rdf:li><rdf:li>directory</rdf:li></rdf:Bag></dc:subject><dc:contributor><cc:Agent><dc:title>Tuomas Kuosmanen</dc:title></cc:Agent></dc:contributor></cc:Work><cc:License
+ rdf:about="http://creativecommons.org/licenses/publicdomain/"><cc:permits
+ rdf:resource="http://creativecommons.org/ns#Reproduction" /><cc:permits
+ rdf:resource="http://creativecommons.org/ns#Distribution" /><cc:permits
+ rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /></cc:License></rdf:RDF></metadata><defs
+ id="defs365"><inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 24 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="48 : 24 : 1"
+ inkscape:persp3d-origin="24 : 16 : 1"
+ id="perspective92" /><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5060"
+ id="radialGradient5031"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
+ cx="605.71429"
+ cy="486.64789"
+ fx="605.71429"
+ fy="486.64789"
+ r="117.14286" /><linearGradient
+ inkscape:collect="always"
+ id="linearGradient5060"><stop
+ style="stop-color:black;stop-opacity:1;"
+ offset="0"
+ id="stop5062" /><stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="1"
+ id="stop5064" /></linearGradient><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5060"
+ id="radialGradient5029"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
+ cx="605.71429"
+ cy="486.64789"
+ fx="605.71429"
+ fy="486.64789"
+ r="117.14286" /><linearGradient
+ id="linearGradient5048"><stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="0"
+ id="stop5050" /><stop
+ id="stop5056"
+ offset="0.5"
+ style="stop-color:black;stop-opacity:1;" /><stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="1"
+ id="stop5052" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5048"
+ id="linearGradient5027"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
+ x1="302.85715"
+ y1="366.64789"
+ x2="302.85715"
+ y2="609.50507" /><linearGradient
+ id="linearGradient2406"><stop
+ style="stop-color:#7c7e79;stop-opacity:1;"
+ offset="0"
+ id="stop2408" /><stop
+ id="stop2414"
+ offset="0.1724138"
+ style="stop-color:#848681;stop-opacity:1;" /><stop
+ style="stop-color:#898c86;stop-opacity:1;"
+ offset="1"
+ id="stop2410" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ id="linearGradient2390"><stop
+ style="stop-color:#919191;stop-opacity:1;"
+ offset="0"
+ id="stop2392" /><stop
+ style="stop-color:#919191;stop-opacity:0;"
+ offset="1"
+ id="stop2394" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ id="linearGradient2378"><stop
+ style="stop-color:#575757;stop-opacity:1;"
+ offset="0"
+ id="stop2380" /><stop
+ style="stop-color:#575757;stop-opacity:0;"
+ offset="1"
+ id="stop2382" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ id="linearGradient2368"><stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop2370" /><stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop2372" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ id="linearGradient2349"><stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop2351" /><stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop2353" /></linearGradient><linearGradient
+ id="linearGradient2341"><stop
+ id="stop2343"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" /><stop
+ id="stop2345"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" /></linearGradient><linearGradient
+ id="linearGradient2329"><stop
+ style="stop-color:#000000;stop-opacity:0.18556701;"
+ offset="0"
+ id="stop2331" /><stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="1"
+ id="stop2333" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ id="linearGradient2319"><stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop2321" /><stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop2323" /></linearGradient><linearGradient
+ id="linearGradient2307"><stop
+ style="stop-color:#edd400;stop-opacity:1;"
+ offset="0"
+ id="stop2309" /><stop
+ style="stop-color:#998800;stop-opacity:1;"
+ offset="1"
+ id="stop2311" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ id="linearGradient2299"><stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop2301" /><stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop2303" /></linearGradient><linearGradient
+ id="XMLID_2_"
+ gradientUnits="userSpaceOnUse"
+ x1="80.223602"
+ y1="117.5205"
+ x2="48.046001"
+ y2="59.7995"
+ gradientTransform="matrix(0.314683,0.000000,0.000000,0.314683,4.128264,3.742874)">
+ <stop
+ offset="0"
+ style="stop-color:#CCCCCC"
+ id="stop17" />
+ <stop
+ offset="0.9831"
+ style="stop-color:#FFFFFF"
+ id="stop19" />
+ <midPointStop
+ offset="0"
+ style="stop-color:#CCCCCC"
+ id="midPointStop48" />
+ <midPointStop
+ offset="0.5"
+ style="stop-color:#CCCCCC"
+ id="midPointStop50" />
+ <midPointStop
+ offset="0.9831"
+ style="stop-color:#FFFFFF"
+ id="midPointStop52" />
+ </linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#XMLID_2_"
+ id="linearGradient1514"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.336922,0.000000,0.000000,0.166888,17.98288,15.46151)"
+ x1="52.006104"
+ y1="166.1331"
+ x2="14.049017"
+ y2="-42.218513" /><linearGradient
+ id="XMLID_39_"
+ gradientUnits="userSpaceOnUse"
+ x1="64.387703"
+ y1="65.124001"
+ x2="64.387703"
+ y2="35.569"
+ gradientTransform="matrix(0.354101,0.000000,0.000000,0.354101,1.638679,-8.364921e-2)">
+ <stop
+ offset="0"
+ style="stop-color:#FFFFFF"
+ id="stop336" />
+ <stop
+ offset="0.8539"
+ style="stop-color:#FF6200"
+ id="stop338" />
+ <stop
+ offset="1"
+ style="stop-color:#F25D00"
+ id="stop340" />
+ <midPointStop
+ offset="0"
+ style="stop-color:#FFFFFF"
+ id="midPointStop335" />
+ <midPointStop
+ offset="0.5"
+ style="stop-color:#FFFFFF"
+ id="midPointStop337" />
+ <midPointStop
+ offset="0.8539"
+ style="stop-color:#FF6200"
+ id="midPointStop339" />
+ <midPointStop
+ offset="0.5"
+ style="stop-color:#FF6200"
+ id="midPointStop341" />
+ <midPointStop
+ offset="1"
+ style="stop-color:#F25D00"
+ id="midPointStop343" />
+ </linearGradient><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2299"
+ id="radialGradient2305"
+ cx="7.5326638"
+ cy="24.202574"
+ fx="7.5326638"
+ fy="24.202574"
+ r="8.2452128"
+ gradientTransform="matrix(4.100086,-1.627292e-17,2.125447e-14,4.201322,-25.41506,-78.53967)"
+ gradientUnits="userSpaceOnUse" /><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2307"
+ id="radialGradient2313"
+ cx="19.985598"
+ cy="36.77816"
+ fx="19.985598"
+ fy="36.77816"
+ r="1.0821035"
+ gradientTransform="matrix(1.125263,0.000000,0.000000,0.982744,-3.428678,0.565787)"
+ gradientUnits="userSpaceOnUse" /><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2319"
+ id="radialGradient2325"
+ cx="20.443665"
+ cy="37.425829"
+ fx="20.443665"
+ fy="37.425829"
+ r="1.0821035"
+ gradientTransform="matrix(1.125263,0.000000,0.000000,0.982744,-3.428678,0.731106)"
+ gradientUnits="userSpaceOnUse" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2329"
+ id="linearGradient2335"
+ x1="17.602522"
+ y1="26.057423"
+ x2="17.682528"
+ y2="32.654099"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.898789,0,0,1.071914,0.478025,-2.080838)" /><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2341"
+ id="radialGradient2339"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(4.100086,1.627292e-17,2.125447e-14,-4.201322,-5.198109,105.3535)"
+ cx="11.68129"
+ cy="19.554111"
+ fx="11.68129"
+ fy="19.554111"
+ r="8.2452126" /><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2349"
+ id="radialGradient2355"
+ cx="24.023088"
+ cy="40.56913"
+ fx="24.023088"
+ fy="40.56913"
+ r="16.28684"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.431250,1.157278e-15,23.07369)"
+ gradientUnits="userSpaceOnUse" /><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2368"
+ id="radialGradient2374"
+ cx="29.913452"
+ cy="30.442923"
+ fx="29.913452"
+ fy="30.442923"
+ r="4.0018832"
+ gradientTransform="matrix(3.751495,-2.191984e-22,1.723265e-22,3.147818,-82.00907,-65.70704)"
+ gradientUnits="userSpaceOnUse" /><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2378"
+ id="radialGradient2384"
+ cx="24.195112"
+ cy="10.577631"
+ fx="24.195112"
+ fy="10.577631"
+ r="15.242914"
+ gradientTransform="matrix(1.125263,-3.585417e-8,4.269819e-8,1.340059,-3.006704,1.355395)"
+ gradientUnits="userSpaceOnUse" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2390"
+ id="linearGradient2396"
+ x1="30.603519"
+ y1="37.337803"
+ x2="30.603519"
+ y2="36.112415"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.263867,0,0,0.859794,-6.499556,8.390924)" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2406"
+ id="linearGradient2412"
+ x1="17.850183"
+ y1="28.939463"
+ x2="19.040216"
+ y2="41.03223"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.888785,0,0,1.08932,2.41099,-1.524336)" /></defs><sodipodi:namedview
+ inkscape:cy="-2.3755359"
+ inkscape:cx="25.234802"
+ inkscape:zoom="1"
+ inkscape:window-height="691"
+ inkscape:window-width="872"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ borderopacity="0.21568627"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ inkscape:showpageshadow="false"
+ inkscape:window-x="466"
+ inkscape:window-y="157"
+ inkscape:current-layer="svg2"
+ fill="#555753"
+ showgrid="false"
+ stroke="#a40000"
+ showguides="true"
+ inkscape:guide-bbox="true" />
+ <g
+ style="display:inline"
+ id="g5022"
+ transform="matrix(2.158196e-2,0,0,1.859457e-2,43.12251,41.63767)"><rect
+ y="-150.69685"
+ x="-1559.2523"
+ height="478.35718"
+ width="1339.6335"
+ id="rect4173"
+ style="opacity:0.40206185;color:black;fill:url(#linearGradient5027);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /><path
+ sodipodi:nodetypes="cccc"
+ id="path5058"
+ d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z "
+ style="opacity:0.40206185;color:black;fill:url(#radialGradient5029);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /><path
+ style="opacity:0.40206185;color:black;fill:url(#radialGradient5031);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z "
+ id="path5018"
+ sodipodi:nodetypes="cccc" /></g><path
+ style="color:#000000;fill:url(#linearGradient1514);fill-opacity:1;fill-rule:nonzero;stroke:#757575;stroke-width:1.0000006;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 21.619576,8.1833733 L 27.577035,8.1833733 C 28.416767,8.1833733 41.46351,23.618701 41.46351,24.524032 L 41.019989,43.020777 C 41.019989,43.92611 40.343959,44.654954 39.504227,44.654954 L 8.0469496,44.654954 C 7.2072167,44.654954 6.5311871,43.92611 6.5311871,43.020777 L 6.5876651,24.524032 C 6.5876651,23.618701 20.779844,8.1833733 21.619576,8.1833733 z "
+ id="rect1512"
+ sodipodi:nodetypes="ccccccccc" /><path
+ style="fill:none"
+ id="path5"
+ d="M 46.963575,45.735573 L 1.6386762,45.735573 L 1.6386762,0.41067554 L 46.963575,0.41067554 L 46.963575,45.735573 z " /><path
+ style="fill:url(#linearGradient2335);fill-opacity:1;fill-rule:evenodd"
+ id="path2327"
+ d="M 23,29 L 22.954256,44.090942 L 11.111465,44.090942 L 11,29 L 23,29 z "
+ clip-rule="evenodd"
+ sodipodi:nodetypes="ccccc" /><path
+ sodipodi:nodetypes="ccccccccc"
+ id="path2357"
+ d="M 21.780459,9.405584 L 27.339556,9.405584 C 28.123138,9.405584 40.340425,23.805172 40.340425,24.649756 L 39.993267,42.862067 C 39.993267,43.321326 39.84953,43.515532 39.480892,43.515532 L 8.0936894,43.529812 C 7.7250517,43.529812 7.5097258,43.449894 7.5097258,43.076262 L 7.7250676,24.649756 C 7.7250676,23.805172 20.99688,9.405584 21.780459,9.405584 z "
+ style="opacity:0.3125;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /><path
+ clip-rule="evenodd"
+ d="M 7.2075295,27.943053 L 7.1532728,30.538247 L 25.521437,17.358993 L 40.807832,28.513421 L 40.879142,28.201707 L 24.508686,12.297576 L 7.2075295,27.943053 z "
+ id="path23"
+ style="opacity:0.2;fill:url(#radialGradient2384);fill-opacity:1;fill-rule:evenodd"
+ sodipodi:nodetypes="ccccccc" /><path
+ clip-rule="evenodd"
+ d="M 22,30 L 22,44.090942 L 12.188971,44.090942 L 12,30 L 22,30 z "
+ id="path188"
+ style="fill:url(#linearGradient2412);fill-opacity:1;fill-rule:evenodd"
+ sodipodi:nodetypes="ccccc" /><path
+ style="opacity:0.40909089;fill:url(#radialGradient2325);fill-opacity:1;fill-rule:evenodd"
+ id="path2315"
+ d="M 19.576856,36.44767 C 20.249646,36.44767 20.793472,36.922275 20.793472,37.506177 C 20.793472,38.095988 20.249646,38.574532 19.576856,38.574532 C 18.904584,38.574532 18.35817,38.095988 18.35817,37.506177 C 18.358685,36.922275 18.904584,36.44767 19.576856,36.44767 z "
+ clip-rule="evenodd" /><path
+ clip-rule="evenodd"
+ d="M 19.462314,35.932229 C 20.135103,35.932229 20.678929,36.406834 20.678929,36.990736 C 20.678929,37.580545 20.135103,38.059089 19.462314,38.059089 C 18.790041,38.059089 18.243627,37.580545 18.243627,36.990736 C 18.244142,36.406834 18.790041,35.932229 19.462314,35.932229 z "
+ id="path217"
+ style="fill:url(#radialGradient2313);fill-opacity:1;fill-rule:evenodd" /><path
+ d="M 24.447748,11.559337 L 43.374808,28.729205 L 43.869487,29.121196 L 44.273163,28.949811 L 43.900293,28.188138 L 43.622679,27.964702 L 24.447748,12.392396 L 5.0582327,28.135731 L 4.8206309,28.279851 L 4.603921,28.986637 L 5.0373408,29.115885 L 5.4218948,28.807462 L 24.447748,11.559337 z "
+ id="path342"
+ style="fill:url(#XMLID_39_)"
+ sodipodi:nodetypes="ccccccccccccc" /><path
+ style="fill:#ef2929;stroke:#a40000"
+ id="path362"
+ d="M 24.330168,2.2713382 L 2.4484294,20.372675 L 1.8237005,27.538603 L 3.8236367,29.602926 C 3.8236367,29.602926 24.231018,12.445641 24.44773,12.274963 L 44.08027,29.818223 L 45.978694,27.494226 L 44.362903,20.382852 L 24.44773,2.1668788 L 24.330168,2.2713382 z "
+ sodipodi:nodetypes="cccccccccc" />
+<path
+ style="opacity:0.40909089;color:#000000;fill:url(#radialGradient2305);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 2.8413446,20.613129 L 2.5497894,27.236494 L 24.369219,8.980075 L 24.298891,3.0867443 L 2.8413446,20.613129 z "
+ id="path1536"
+ sodipodi:nodetypes="ccccc" /><path
+ sodipodi:nodetypes="ccccc"
+ id="path2337"
+ d="M 24.483763,8.7509884 L 24.583223,2.9098867 L 43.912186,20.56184 L 45.403998,27.062652 L 24.483763,8.7509884 z "
+ style="opacity:0.13636367;color:#000000;fill:url(#radialGradient2339);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /><path
+ style="opacity:0.31818183;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:0.99999934;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 27.102228,27.719824 L 36.142223,27.719824 C 36.912818,27.719824 37.53319,28.340194 37.53319,29.110791 L 37.525229,38.190012 C 37.525229,38.960608 36.928907,39.455981 36.158311,39.455981 L 27.102228,39.455981 C 26.331631,39.455981 25.711261,38.835608 25.711261,38.065012 L 25.711261,29.110791 C 25.711261,28.340194 26.331631,27.719824 27.102228,27.719824 z "
+ id="rect2361"
+ sodipodi:nodetypes="ccccccccc" /><rect
+ style="opacity:1;color:#000000;fill:#3465a4;fill-opacity:1;fill-rule:nonzero;stroke:#757575;stroke-width:0.9999994;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="rect3263"
+ width="10.001333"
+ height="9.9624557"
+ x="26.507767"
+ y="28.514256"
+ rx="0.38128215"
+ ry="0.38128215" /><path
+ style="opacity:0.39772728;color:#000000;fill:url(#radialGradient2374);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999958;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 27.107118,34.408261 C 30.725101,34.739438 32.634842,32.962557 35.97527,32.855521 L 36,29.00603 L 27.088388,29 L 27.107118,34.408261 z "
+ id="rect2363"
+ sodipodi:nodetypes="ccccc" /></svg> \ No newline at end of file
diff --git a/examples/declarative/parallax/pics/shadow.png b/examples/declarative/parallax/pics/shadow.png
new file mode 100644
index 0000000000..8270565e87
--- /dev/null
+++ b/examples/declarative/parallax/pics/shadow.png
Binary files differ
diff --git a/examples/declarative/parallax/pics/yast-joystick.png b/examples/declarative/parallax/pics/yast-joystick.png
new file mode 100644
index 0000000000..858cea0301
--- /dev/null
+++ b/examples/declarative/parallax/pics/yast-joystick.png
Binary files differ
diff --git a/examples/declarative/parallax/pics/yast-wol.png b/examples/declarative/parallax/pics/yast-wol.png
new file mode 100644
index 0000000000..7712180a3b
--- /dev/null
+++ b/examples/declarative/parallax/pics/yast-wol.png
Binary files differ
diff --git a/examples/declarative/parallax/qml/ParallaxView.qml b/examples/declarative/parallax/qml/ParallaxView.qml
new file mode 100644
index 0000000000..08193aed75
--- /dev/null
+++ b/examples/declarative/parallax/qml/ParallaxView.qml
@@ -0,0 +1,84 @@
+import Qt 4.6
+
+Item {
+ id: root
+
+ property alias background: background.source
+ default property alias content: visualModel.children
+ property int currentIndex: 0
+
+ Image {
+ id: background
+ fillMode: Image.TileHorizontally
+ x: -list.contentX / 2
+ width: Math.max(list.contentWidth, parent.width)
+ }
+
+ ListView {
+ id: list
+
+ currentIndex: root.currentIndex
+ onCurrentIndexChanged: root.currentIndex = currentIndex
+
+ orientation: "Horizontal"
+ overShoot: false
+ anchors.fill: parent
+ model: VisualItemModel { id: visualModel }
+
+ highlightRangeMode: ListView.StrictlyEnforceRange
+ snapMode: ListView.SnapOneItem
+ }
+
+ ListView {
+ id: selector
+
+ Rectangle {
+ color: "#60FFFFFF"
+ x: -10; y: -10; radius: 10; z: -1
+ width: parent.width + 20; height: parent.height + 20
+ }
+ currentIndex: root.currentIndex
+ onCurrentIndexChanged: root.currentIndex = currentIndex
+
+ height: 50
+ anchors.bottom: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: Math.min(count * 50, parent.width - 20)
+ interactive: width == parent.width - 20
+ orientation: "Horizontal"
+
+ delegate: Item {
+ width: 50; height: 50
+ id: delegateRoot
+
+ Image {
+ id: image
+ source: modelData.icon
+ smooth: true
+ scale: 0.8
+ transformOrigin: "Center"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: { root.currentIndex = index }
+ }
+
+ states: State {
+ name: "Selected"
+ when: delegateRoot.ListView.isCurrentItem == true
+ PropertyChanges {
+ target: image
+ scale: 1
+ y: -5
+ }
+ }
+ transitions: Transition {
+ NumberAnimation {
+ properties: "scale,y"
+ }
+ }
+ }
+ model: visualModel.children
+ }
+}
diff --git a/examples/declarative/parallax/qml/Smiley.qml b/examples/declarative/parallax/qml/Smiley.qml
new file mode 100644
index 0000000000..4442d5e618
--- /dev/null
+++ b/examples/declarative/parallax/qml/Smiley.qml
@@ -0,0 +1,47 @@
+import Qt 4.6
+
+Item {
+ id: window
+ width: 320; height: 480
+
+ // The shadow for the smiley face
+ Image {
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "../pics/shadow.png"; y: smiley.minHeight + 58
+ transformOrigin: Item.Center
+
+ // The scale property depends on the y position of the smiley face.
+ scale: smiley.y * 0.5 / (smiley.minHeight - smiley.maxHeight)
+ }
+
+ Image {
+ id: smiley
+ property int maxHeight: window.height / 3
+ property int minHeight: 2 * window.height / 3
+
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "../pics/face-smile.png"; y: minHeight
+
+ // Animate the y property. Setting repeat to true makes the
+ // animation repeat indefinitely, otherwise it would only run once.
+ SequentialAnimation on y {
+ repeat: true
+
+ // Move from minHeight to maxHeight in 300ms, using the OutExpo easing function
+ NumberAnimation {
+ from: smiley.minHeight; to: smiley.maxHeight
+ easing.type: "OutExpo"; duration: 300
+ }
+
+ // Then move back to minHeight in 1 second, using the OutBounce easing function
+ NumberAnimation {
+ from: smiley.maxHeight; to: smiley.minHeight
+ easing.type: "OutBounce"; duration: 1000
+ }
+
+ // Then pause for 500ms
+ PauseAnimation { duration: 500 }
+ }
+ }
+}
+
diff --git a/examples/declarative/plugins/README b/examples/declarative/plugins/README
new file mode 100644
index 0000000000..621f570861
--- /dev/null
+++ b/examples/declarative/plugins/README
@@ -0,0 +1,9 @@
+This example shows a module "com.nokia.TimeExample" that is implelement
+by a C++ plugin (providing the "Time" type), and by QML files (providing the
+"Clock" type).
+
+To run:
+
+ make install
+ qmlviewer plugins.qml
+
diff --git a/examples/declarative/plugins/com/nokia/TimeExample/Clock.qml b/examples/declarative/plugins/com/nokia/TimeExample/Clock.qml
new file mode 100644
index 0000000000..622fcf9497
--- /dev/null
+++ b/examples/declarative/plugins/com/nokia/TimeExample/Clock.qml
@@ -0,0 +1,50 @@
+import Qt 4.6
+
+Rectangle {
+ id: clock
+ width: 200; height: 200; color: "gray"
+
+ property alias city: cityLabel.text
+ property var hours
+ property var minutes
+ property var shift : 0
+
+ Image { id: background; source: "clock.png" }
+
+ Image {
+ x: 92.5; y: 27
+ source: "hour.png"
+ smooth: true
+ transform: Rotation {
+ id: hourRotation
+ origin.x: 7.5; origin.y: 73; angle: 0
+ SpringFollow on angle {
+ spring: 2; damping: 0.2; modulus: 360
+ source: (clock.hours * 30) + (clock.minutes * 0.5)
+ }
+ }
+ }
+
+ Image {
+ x: 93.5; y: 17
+ source: "minute.png"
+ smooth: true
+ transform: Rotation {
+ id: minuteRotation
+ origin.x: 6.5; origin.y: 83; angle: 0
+ SpringFollow on angle {
+ spring: 2; damping: 0.2; modulus: 360
+ source: clock.minutes * 6
+ }
+ }
+ }
+
+ Image {
+ anchors.centerIn: background; source: "center.png"
+ }
+
+ Text {
+ id: cityLabel; font.bold: true; font.pixelSize: 14; y:200; color: "white"
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+}
diff --git a/examples/declarative/plugins/com/nokia/TimeExample/center.png b/examples/declarative/plugins/com/nokia/TimeExample/center.png
new file mode 100644
index 0000000000..7fbd802a44
--- /dev/null
+++ b/examples/declarative/plugins/com/nokia/TimeExample/center.png
Binary files differ
diff --git a/examples/declarative/plugins/com/nokia/TimeExample/clock.png b/examples/declarative/plugins/com/nokia/TimeExample/clock.png
new file mode 100644
index 0000000000..462edacc0e
--- /dev/null
+++ b/examples/declarative/plugins/com/nokia/TimeExample/clock.png
Binary files differ
diff --git a/examples/declarative/plugins/com/nokia/TimeExample/hour.png b/examples/declarative/plugins/com/nokia/TimeExample/hour.png
new file mode 100644
index 0000000000..f8061a1235
--- /dev/null
+++ b/examples/declarative/plugins/com/nokia/TimeExample/hour.png
Binary files differ
diff --git a/examples/declarative/plugins/com/nokia/TimeExample/minute.png b/examples/declarative/plugins/com/nokia/TimeExample/minute.png
new file mode 100644
index 0000000000..1297ec7c2b
--- /dev/null
+++ b/examples/declarative/plugins/com/nokia/TimeExample/minute.png
Binary files differ
diff --git a/examples/declarative/plugins/com/nokia/TimeExample/qmldir b/examples/declarative/plugins/com/nokia/TimeExample/qmldir
new file mode 100644
index 0000000000..e9ef11530f
--- /dev/null
+++ b/examples/declarative/plugins/com/nokia/TimeExample/qmldir
@@ -0,0 +1,2 @@
+Clock 1.0 Clock.qml
+plugin qtimeexampleqmlplugin
diff --git a/examples/declarative/plugins/plugin.cpp b/examples/declarative/plugins/plugin.cpp
new file mode 100644
index 0000000000..741f68ad33
--- /dev/null
+++ b/examples/declarative/plugins/plugin.cpp
@@ -0,0 +1,156 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtDeclarative/QDeclarativeExtensionPlugin>
+#include <QtDeclarative/qdeclarative.h>
+#include <qdebug.h>
+#include <qdatetime.h>
+#include <qbasictimer.h>
+#include <qapplication.h>
+
+// Implements a "Time" class with hour and minute properties
+// that change on-the-minute yet efficiently sleep the rest
+// of the time.
+
+class MinuteTimer : public QObject
+{
+ Q_OBJECT
+public:
+ MinuteTimer(QObject *parent) : QObject(parent)
+ {
+ }
+
+ void start()
+ {
+ if (!timer.isActive()) {
+ time = QTime::currentTime();
+ timer.start(60000-time.second()*1000, this);
+ }
+ }
+
+ void stop()
+ {
+ timer.stop();
+ }
+
+ int hour() const { return time.hour(); }
+ int minute() const { return time.minute(); }
+
+signals:
+ void timeChanged();
+
+protected:
+ void timerEvent(QTimerEvent *)
+ {
+ QTime now = QTime::currentTime();
+ if (now.second() == 59 && now.minute() == time.minute() && now.hour() == time.hour()) {
+ // just missed time tick over, force it, wait extra 0.5 seconds
+ time.addSecs(60);
+ timer.start(60500, this);
+ } else {
+ time = now;
+ timer.start(60000-time.second()*1000, this);
+ }
+ emit timeChanged();
+ }
+
+private:
+ QTime time;
+ QBasicTimer timer;
+};
+
+class Time : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int hour READ hour NOTIFY timeChanged)
+ Q_PROPERTY(int minute READ minute NOTIFY timeChanged)
+
+public:
+ Time(QObject *parent=0) : QObject(parent)
+ {
+ if (++instances == 1) {
+ if (!timer)
+ timer = new MinuteTimer(qApp);
+ connect(timer, SIGNAL(timeChanged()), this, SIGNAL(timeChanged()));
+ timer->start();
+ }
+ }
+
+ ~Time()
+ {
+ if (--instances == 0) {
+ timer->stop();
+ }
+ }
+
+ int minute() const { return timer->minute(); }
+ int hour() const { return timer->hour(); }
+
+signals:
+ void timeChanged();
+
+private:
+ QTime t;
+ static MinuteTimer *timer;
+ static int instances;
+};
+
+int Time::instances=0;
+MinuteTimer *Time::timer=0;
+
+
+QML_DECLARE_TYPE(Time);
+
+
+class QExampleQmlPlugin : public QDeclarativeExtensionPlugin
+{
+ Q_OBJECT
+public:
+ void registerTypes(const char *uri)
+ {
+ Q_ASSERT(uri == QLatin1String("com.nokia.TimeExample"));
+ qmlRegisterType<Time>(uri, 1, 0, "Time");
+ }
+};
+
+#include "plugin.moc"
+
+Q_EXPORT_PLUGIN2(qtimeexampleqmlplugin, QExampleQmlPlugin);
diff --git a/examples/declarative/plugins/plugins.pro b/examples/declarative/plugins/plugins.pro
new file mode 100644
index 0000000000..877a5ceea6
--- /dev/null
+++ b/examples/declarative/plugins/plugins.pro
@@ -0,0 +1,27 @@
+TEMPLATE = lib
+DESTDIR = com/nokia/TimeExample
+TARGET = qtimeexampleqmlplugin
+CONFIG += qt plugin
+QT += declarative
+VERSION = 1.0.0
+
+SOURCES += plugin.cpp
+
+qdeclarativesources.files += \
+ com/nokia/TimeExample/qdeclarativedir \
+ com/nokia/TimeExample/center.png \
+ com/nokia/TimeExample/clock.png \
+ com/nokia/TimeExample/Clock.qml \
+ com/nokia/TimeExample/hour.png \
+ com/nokia/TimeExample/minute.png
+
+qdeclarativesources.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins/com/nokia/TimeExample
+
+sources.files += plugins.pro plugin.cpp plugins.qml README
+sources.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins
+
+target.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins/com/nokia/TimeExample
+
+INSTALLS += qdeclarativesources sources target
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
diff --git a/examples/declarative/plugins/plugins.qml b/examples/declarative/plugins/plugins.qml
new file mode 100644
index 0000000000..44b552b669
--- /dev/null
+++ b/examples/declarative/plugins/plugins.qml
@@ -0,0 +1,11 @@
+import com.nokia.TimeExample 1.0 // import types from the plugin
+
+Clock { // this class is defined in QML (files/Clock.qml)
+
+ Time { // this class is defined in C++ (plugins.cpp)
+ id: time
+ }
+
+ hours: time.hour
+ minutes: time.minute
+}
diff --git a/examples/declarative/progressbar/content/ProgressBar.qml b/examples/declarative/progressbar/content/ProgressBar.qml
new file mode 100644
index 0000000000..65c80b2df1
--- /dev/null
+++ b/examples/declarative/progressbar/content/ProgressBar.qml
@@ -0,0 +1,36 @@
+import Qt 4.6
+
+Item {
+ id: progressbar
+ width: 250; height: 23; clip: true
+
+ property int minimum: 0
+ property int maximum: 100
+ property int value: 0
+ property alias color: g1.color
+ property alias secondColor: g2.color
+
+ BorderImage {
+ source: "background.png"
+ width: parent.width; height: parent.height
+ border.left: 4; border.top: 4; border.right: 4; border.bottom: 4
+ }
+
+ Rectangle {
+ property int widthDest: ((progressbar.width * (value - minimum)) / (maximum - minimum) - 6)
+ id: highlight; radius: 1
+ anchors.left: parent.left; anchors.top: parent.top; anchors.bottom: parent.bottom
+ anchors.leftMargin: 3; anchors.topMargin: 3; anchors.bottomMargin: 3
+ EaseFollow on width { source: highlight.widthDest; velocity: 1200 }
+ gradient: Gradient {
+ GradientStop { id: g1; position: 0.0 }
+ GradientStop { id: g2; position: 1.0 }
+ }
+ }
+ Text {
+ anchors.right: highlight.right; anchors.rightMargin: 6
+ color: "white"; font.bold: true
+ anchors.verticalCenter: parent.verticalCenter
+ text: Math.floor((value - minimum) / (maximum - minimum) * 100) + '%'
+ }
+}
diff --git a/examples/declarative/progressbar/content/background.png b/examples/declarative/progressbar/content/background.png
new file mode 100644
index 0000000000..9044226f85
--- /dev/null
+++ b/examples/declarative/progressbar/content/background.png
Binary files differ
diff --git a/examples/declarative/progressbar/progressbars.qml b/examples/declarative/progressbar/progressbars.qml
new file mode 100644
index 0000000000..a66d5441e7
--- /dev/null
+++ b/examples/declarative/progressbar/progressbars.qml
@@ -0,0 +1,24 @@
+import Qt 4.6
+import "content"
+
+Rectangle {
+ id: main
+ width: 600; height: 405; color: "#edecec"
+
+ Flickable {
+ anchors.fill: parent; contentHeight: column.height + 20
+ Column {
+ id: column; x: 10; y: 10; spacing: 10
+ Repeater {
+ model: 25
+ ProgressBar {
+ property int r: Math.floor(Math.random() * 5000 + 1000)
+ width: main.width - 20
+ NumberAnimation on value { duration: r; from: 0; to: 100; repeat: true }
+ ColorAnimation on color { duration: r; from: "lightsteelblue"; to: "thistle"; repeat: true }
+ ColorAnimation on secondColor { duration: r; from: "steelblue"; to: "#CD96CD"; repeat: true }
+ }
+ }
+ }
+ }
+}
diff --git a/examples/declarative/scrollbar/ScrollBar.qml b/examples/declarative/scrollbar/ScrollBar.qml
new file mode 100644
index 0000000000..802b53784d
--- /dev/null
+++ b/examples/declarative/scrollbar/ScrollBar.qml
@@ -0,0 +1,31 @@
+import Qt 4.6
+
+Item {
+ id: scrollBar
+ // The properties that define the scrollbar's state.
+ // position and pageSize are in the range 0.0 - 1.0. They are relative to the
+ // height of the page, i.e. a pageSize of 0.5 means that you can see 50%
+ // of the height of the view.
+ // orientation can be either 'Vertical' or 'Horizontal'
+ property real position
+ property real pageSize
+ property var orientation : "Vertical"
+
+ // A light, semi-transparent background
+ Rectangle {
+ id: background
+ radius: orientation == 'Vertical' ? (width/2 - 1) : (height/2 - 1)
+ color: "white"; opacity: 0.3
+ anchors.fill: parent
+ }
+ // Size the bar to the required size, depending upon the orientation.
+ Rectangle {
+ opacity: 0.7
+ color: "black"
+ radius: orientation == 'Vertical' ? (width/2 - 1) : (height/2 - 1)
+ x: orientation == 'Vertical' ? 1 : (scrollBar.position * (scrollBar.width-2) + 1)
+ y: orientation == 'Vertical' ? (scrollBar.position * (scrollBar.height-2) + 1) : 1
+ width: orientation == 'Vertical' ? (parent.width-2) : (scrollBar.pageSize * (scrollBar.width-2))
+ height: orientation == 'Vertical' ? (scrollBar.pageSize * (scrollBar.height-2)) : (parent.height-2)
+ }
+}
diff --git a/examples/declarative/scrollbar/display.qml b/examples/declarative/scrollbar/display.qml
new file mode 100644
index 0000000000..84763d21a5
--- /dev/null
+++ b/examples/declarative/scrollbar/display.qml
@@ -0,0 +1,58 @@
+import Qt 4.6
+
+Rectangle {
+ width: 640
+ height: 480
+ // Create a flickable to view a large image.
+ Flickable {
+ id: view
+ anchors.fill: parent
+ Image {
+ id: picture
+ source: "pics/niagara_falls.jpg"
+ asynchronous: true
+ }
+ contentWidth: picture.width
+ contentHeight: picture.height
+ // Only show the scrollbars when the view is moving.
+ states: [
+ State {
+ name: "ShowBars"
+ when: view.moving
+ PropertyChanges { target: verticalScrollBar; opacity: 1 }
+ PropertyChanges { target: horizontalScrollBar; opacity: 1 }
+ }
+ ]
+ transitions: [
+ Transition {
+ from: "*"
+ to: "*"
+ NumberAnimation {
+ properties: "opacity"
+ duration: 400
+ }
+ }
+ ]
+ }
+ // Attach scrollbars to the right and bottom edges of the view.
+ ScrollBar {
+ id: verticalScrollBar
+ opacity: 0
+ orientation: "Vertical"
+ position: view.visibleArea.yPosition
+ pageSize: view.visibleArea.heightRatio
+ width: 12
+ height: view.height-12
+ anchors.right: view.right
+ }
+ ScrollBar {
+ id: horizontalScrollBar
+ opacity: 0
+ orientation: "Horizontal"
+ position: view.visibleArea.xPosition
+ pageSize: view.visibleArea.widthRatio
+ height: 12
+ width: view.width-12
+ anchors.bottom: view.bottom
+ }
+}
diff --git a/examples/declarative/scrollbar/pics/niagara_falls.jpg b/examples/declarative/scrollbar/pics/niagara_falls.jpg
new file mode 100644
index 0000000000..618d808ccf
--- /dev/null
+++ b/examples/declarative/scrollbar/pics/niagara_falls.jpg
Binary files differ
diff --git a/examples/declarative/searchbox/SearchBox.qml b/examples/declarative/searchbox/SearchBox.qml
new file mode 100644
index 0000000000..524b6523f0
--- /dev/null
+++ b/examples/declarative/searchbox/SearchBox.qml
@@ -0,0 +1,60 @@
+import Qt 4.6
+
+FocusScope {
+ id: focusScope
+ width: 250; height: 28
+
+ BorderImage {
+ source: "images/lineedit-bg.png"
+ width: parent.width; height: parent.height
+ border { left: 4; top: 4; right: 4; bottom: 4 }
+ }
+
+ BorderImage {
+ source: "images/lineedit-bg-focus.png"
+ width: parent.width; height: parent.height
+ border { left: 4; top: 4; right: 4; bottom: 4 }
+ visible: parent.wantsFocus ? true : false
+ }
+
+ Text {
+ id: typeSomething; anchors.fill: parent; anchors.leftMargin: 8
+ verticalAlignment: Text.AlignVCenter
+ text: "Type something..."; color: "gray"; font.italic: true
+ }
+
+ MouseArea { anchors.fill: parent; onClicked: focusScope.focus = true }
+
+ TextInput {
+ id: textInput
+ anchors.left: parent.left; anchors.leftMargin: 8
+ anchors.verticalCenter: parent.verticalCenter
+ focus: if (1) true
+ }
+
+ Image {
+ id: clear
+ anchors.right: parent.right; anchors.rightMargin: 8
+ anchors.verticalCenter: parent.verticalCenter
+ source: "images/edit-clear-locationbar-rtl.png"; opacity: 0
+
+ MouseArea { anchors.fill: parent; onClicked: { textInput.text = ''; focusScope.focus = true } }
+ }
+
+ states: State {
+ name: "hasText"; when: textInput.text != ''
+ PropertyChanges { target: typeSomething; opacity: 0 }
+ PropertyChanges { target: clear; opacity: 1 }
+ }
+
+ transitions: [
+ Transition {
+ from: ""; to: "hasText"
+ NumberAnimation { exclude: typeSomething; properties: "opacity" }
+ },
+ Transition {
+ from: "hasText"; to: ""
+ NumberAnimation { properties: "opacity" }
+ }
+ ]
+}
diff --git a/examples/declarative/searchbox/images/edit-clear-locationbar-rtl.png b/examples/declarative/searchbox/images/edit-clear-locationbar-rtl.png
new file mode 100644
index 0000000000..91eb270695
--- /dev/null
+++ b/examples/declarative/searchbox/images/edit-clear-locationbar-rtl.png
Binary files differ
diff --git a/examples/declarative/searchbox/images/lineedit-bg-focus.png b/examples/declarative/searchbox/images/lineedit-bg-focus.png
new file mode 100644
index 0000000000..bbfac38d2d
--- /dev/null
+++ b/examples/declarative/searchbox/images/lineedit-bg-focus.png
Binary files differ
diff --git a/examples/declarative/searchbox/images/lineedit-bg.png b/examples/declarative/searchbox/images/lineedit-bg.png
new file mode 100644
index 0000000000..9044226f85
--- /dev/null
+++ b/examples/declarative/searchbox/images/lineedit-bg.png
Binary files differ
diff --git a/examples/declarative/searchbox/main.qml b/examples/declarative/searchbox/main.qml
new file mode 100644
index 0000000000..9b33be3bb7
--- /dev/null
+++ b/examples/declarative/searchbox/main.qml
@@ -0,0 +1,13 @@
+import Qt 4.6
+
+Rectangle {
+ width: 500; height: 250; color: "#edecec"
+
+ Column {
+ anchors.horizontalCenter: parent.horizontalCenter; anchors.verticalCenter: parent.verticalCenter; spacing: 10
+
+ SearchBox { id: search1; KeyNavigation.tab: search2; KeyNavigation.backtab: search3; focus: true }
+ SearchBox { id: search2; KeyNavigation.tab: search3; KeyNavigation.backtab: search1 }
+ SearchBox { id: search3; KeyNavigation.tab: search1; KeyNavigation.backtab: search2 }
+ }
+}
diff --git a/examples/declarative/slideswitch/content/Switch.qml b/examples/declarative/slideswitch/content/Switch.qml
new file mode 100644
index 0000000000..758aee6568
--- /dev/null
+++ b/examples/declarative/slideswitch/content/Switch.qml
@@ -0,0 +1,73 @@
+//![0]
+import Qt 4.6
+
+Item {
+ id: toggleswitch
+ width: background.width; height: background.height
+
+//![1]
+ property bool on: false
+//![1]
+
+//![2]
+ function toggle() {
+ if (toggleswitch.state == "on")
+ toggleswitch.state = "off";
+ else toggleswitch.state = "on";
+ }
+//![2]
+
+//![3]
+ function dorelease() {
+ if (knob.x == 1) {
+ if (toggleswitch.state == "off") return;
+ }
+ if (knob.x == 78) {
+ if (toggleswitch.state == "on") return;
+ }
+ toggle();
+ }
+//![3]
+
+//![4]
+ Image {
+ id: background; source: "background.svg"
+ MouseArea { anchors.fill: parent; onClicked: toggle() }
+ }
+//![4]
+
+//![5]
+ Image {
+ id: knob; source: "knob.svg"; x: 1; y: 2
+
+ MouseArea {
+ anchors.fill: parent
+ drag.target: knob; drag.axis: "XAxis"; drag.minimumX: 1; drag.maximumX: 78
+ onClicked: toggle()
+ onReleased: dorelease()
+ }
+ }
+//![5]
+
+//![6]
+ states: [
+ State {
+ name: "on"
+ PropertyChanges { target: knob; x: 78 }
+ PropertyChanges { target: toggleswitch; on: true }
+ },
+ State {
+ name: "off"
+ PropertyChanges { target: knob; x: 1 }
+ PropertyChanges { target: toggleswitch; on: false }
+ }
+ ]
+//![6]
+
+//![7]
+ transitions: Transition {
+ NumberAnimation { properties: "x"; easing.type: "InOutQuad"; duration: 200 }
+ }
+//![7]
+}
+//![0]
diff --git a/examples/declarative/slideswitch/content/background.svg b/examples/declarative/slideswitch/content/background.svg
new file mode 100644
index 0000000000..f920d3e47a
--- /dev/null
+++ b/examples/declarative/slideswitch/content/background.svg
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="130px" height="56px" viewBox="0 0 130 56" enable-background="new 0 0 130 56" xml:space="preserve">
+<defs>
+</defs>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-37.5005" y1="-66" x2="-37.5005" y2="-121.9985" gradientTransform="matrix(1 0 0 -1 102.5 -66)">
+ <stop offset="0.0056" style="stop-color:#000000"/>
+ <stop offset="1" style="stop-color:#EAECEF"/>
+</linearGradient>
+<path fill="url(#SVGID_1_)" d="M101.998,55.998H28c-15.439,0-28-12.562-28-28C0,12.56,12.561,0,28,0h73.998
+ c15.439,0,28,12.559,28,27.998C129.998,43.438,117.438,55.998,101.998,55.998L101.998,55.998z"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-5.5" y1="-132.1338" x2="-69.5002" y2="-55.8613" gradientTransform="matrix(1 0 0 -1 102.5 -66)">
+ <stop offset="0.0056" style="stop-color:#000000"/>
+ <stop offset="1" style="stop-color:#828385"/>
+</linearGradient>
+<path fill="url(#SVGID_2_)" d="M127.999,27.998c0,14.359-11.642,26-26,26h-74c-14.359,0-26-11.641-26-26l0,0
+ c0-14.359,11.641-26,26-26h74C116.357,1.998,127.999,13.639,127.999,27.998L127.999,27.998z"/>
+</svg>
diff --git a/examples/declarative/slideswitch/content/knob.svg b/examples/declarative/slideswitch/content/knob.svg
new file mode 100644
index 0000000000..fb6933718e
--- /dev/null
+++ b/examples/declarative/slideswitch/content/knob.svg
@@ -0,0 +1,867 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ x="0px"
+ y="0px"
+ width="52px"
+ height="52px"
+ viewBox="0 0 52 52"
+ enable-background="new 0 0 52 52"
+ xml:space="preserve"
+ id="svg3883"
+ sodipodi:version="0.32"
+ inkscape:version="0.44.1"
+ sodipodi:docname="knob_on.svg"
+ sodipodi:docbase="/local/axel/embeddedwidgets/embeddedstories/skins/svgslideswitch/MetallicBrush"><metadata
+ id="metadata4200"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview
+ inkscape:window-height="640"
+ inkscape:window-width="937"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ guidetolerance="10.0"
+ gridtolerance="10.0"
+ objecttolerance="10.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ inkscape:zoom="8.3653846"
+ inkscape:cx="26.000002"
+ inkscape:cy="26"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:current-layer="svg3883" />
+<defs
+ id="defs3885">
+</defs>
+<linearGradient
+ id="SVGID_1_"
+ gradientUnits="userSpaceOnUse"
+ x1="-59.7866"
+ y1="-115.917"
+ x2="-93.2123"
+ y2="-76.0818"
+ gradientTransform="matrix(1,0,0,-1,102.5,-70)">
+ <stop
+ offset="0.0056"
+ style="stop-color:#000000"
+ id="stop3888" />
+ <stop
+ offset="1"
+ style="stop-color:#EAECEF"
+ id="stop3890" />
+</linearGradient>
+<circle
+ cx="26"
+ cy="26"
+ r="26"
+ id="circle3892"
+ style="fill:url(#SVGID_1_)"
+ sodipodi:cx="26"
+ sodipodi:cy="26"
+ sodipodi:rx="26"
+ sodipodi:ry="26"
+ transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
+<linearGradient
+ id="SVGID_2_"
+ gradientUnits="userSpaceOnUse"
+ x1="-100.5"
+ y1="-96"
+ x2="-52.5"
+ y2="-96"
+ gradientTransform="matrix(1,0,0,-1,102.5,-70)">
+ <stop
+ offset="0.0056"
+ style="stop-color:#8AADCE"
+ id="stop3895" />
+ <stop
+ offset="0.5"
+ style="stop-color:#EAECEF"
+ id="stop3897" />
+ <stop
+ offset="0.6043"
+ style="stop-color:#E7EAED"
+ id="stop3899" />
+ <stop
+ offset="0.6751"
+ style="stop-color:#DEE4E7"
+ id="stop3901" />
+ <stop
+ offset="0.7358"
+ style="stop-color:#CFD9DD"
+ id="stop3903" />
+ <stop
+ offset="0.791"
+ style="stop-color:#B9CACF"
+ id="stop3905" />
+ <stop
+ offset="0.8425"
+ style="stop-color:#9EB6BD"
+ id="stop3907" />
+ <stop
+ offset="0.891"
+ style="stop-color:#7B9EA7"
+ id="stop3909" />
+ <stop
+ offset="0.9374"
+ style="stop-color:#53828C"
+ id="stop3911" />
+ <stop
+ offset="0.9809"
+ style="stop-color:#25626E"
+ id="stop3913" />
+ <stop
+ offset="1"
+ style="stop-color:#0E525F"
+ id="stop3915" />
+</linearGradient>
+<circle
+ cx="26"
+ cy="26"
+ r="24"
+ id="circle3917"
+ style="fill:url(#SVGID_2_)"
+ sodipodi:cx="26"
+ sodipodi:cy="26"
+ sodipodi:rx="24"
+ sodipodi:ry="24"
+ transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
+<linearGradient
+ id="SVGID_3_"
+ gradientUnits="userSpaceOnUse"
+ x1="-98.6328"
+ y1="-96"
+ x2="-54.3672"
+ y2="-96"
+ gradientTransform="matrix(1,0,0,-1,102.5,-70)">
+ <stop
+ offset="0.0056"
+ style="stop-color:#8AADCE"
+ id="stop3920" />
+ <stop
+ offset="0.073"
+ style="stop-color:#8FAECB"
+ id="stop3922" />
+ <stop
+ offset="0.5"
+ style="stop-color:#EAECEF"
+ id="stop3924" />
+ <stop
+ offset="0.5902"
+ style="stop-color:#E7E9ED"
+ id="stop3926" />
+ <stop
+ offset="0.618"
+ style="stop-color:#E4E7EB"
+ id="stop3928" />
+ <stop
+ offset="0.6697"
+ style="stop-color:#E0E4E9"
+ id="stop3930" />
+ <stop
+ offset="0.7211"
+ style="stop-color:#D4DCE1"
+ id="stop3932" />
+ <stop
+ offset="0.7722"
+ style="stop-color:#C0CFD5"
+ id="stop3934" />
+ <stop
+ offset="0.809"
+ style="stop-color:#ADC2C9"
+ id="stop3936" />
+ <stop
+ offset="1"
+ style="stop-color:#0E525F"
+ id="stop3938" />
+</linearGradient>
+<circle
+ cx="26"
+ cy="26"
+ r="22.132999"
+ id="circle3940"
+ style="fill:url(#SVGID_3_)"
+ sodipodi:cx="26"
+ sodipodi:cy="26"
+ sodipodi:rx="22.132999"
+ sodipodi:ry="22.132999"
+ transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
+<linearGradient
+ id="SVGID_4_"
+ gradientUnits="userSpaceOnUse"
+ x1="-96.7671"
+ y1="-96"
+ x2="-56.2324"
+ y2="-96"
+ gradientTransform="matrix(1,0,0,-1,102.5,-70)">
+ <stop
+ offset="0.0056"
+ style="stop-color:#8AADCE"
+ id="stop3943" />
+ <stop
+ offset="0.073"
+ style="stop-color:#86A7C4"
+ id="stop3945" />
+ <stop
+ offset="0.5"
+ style="stop-color:#EAECEF"
+ id="stop3947" />
+ <stop
+ offset="0.577"
+ style="stop-color:#E7EAED"
+ id="stop3949" />
+ <stop
+ offset="0.618"
+ style="stop-color:#E1E6EA"
+ id="stop3951" />
+ <stop
+ offset="0.6697"
+ style="stop-color:#DDE3E8"
+ id="stop3953" />
+ <stop
+ offset="0.7211"
+ style="stop-color:#D1DBE1"
+ id="stop3955" />
+ <stop
+ offset="0.7722"
+ style="stop-color:#BDCDD5"
+ id="stop3957" />
+ <stop
+ offset="0.809"
+ style="stop-color:#AAC0CA"
+ id="stop3959" />
+ <stop
+ offset="1"
+ style="stop-color:#0E525F"
+ id="stop3961" />
+</linearGradient>
+<circle
+ cx="26"
+ cy="26"
+ r="20.267"
+ id="circle3963"
+ style="fill:url(#SVGID_4_)"
+ sodipodi:cx="26"
+ sodipodi:cy="26"
+ sodipodi:rx="20.267"
+ sodipodi:ry="20.267"
+ transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
+<linearGradient
+ id="SVGID_5_"
+ gradientUnits="userSpaceOnUse"
+ x1="-94.8999"
+ y1="-96"
+ x2="-58.0996"
+ y2="-96"
+ gradientTransform="matrix(1,0,0,-1,102.5,-70)">
+ <stop
+ offset="0.0056"
+ style="stop-color:#8AADCE"
+ id="stop3966" />
+ <stop
+ offset="0.073"
+ style="stop-color:#7E9FBC"
+ id="stop3968" />
+ <stop
+ offset="0.5"
+ style="stop-color:#EAECEF"
+ id="stop3970" />
+ <stop
+ offset="0.5709"
+ style="stop-color:#E6E9ED"
+ id="stop3972" />
+ <stop
+ offset="0.618"
+ style="stop-color:#DFE4E9"
+ id="stop3974" />
+ <stop
+ offset="0.6687"
+ style="stop-color:#DBE1E7"
+ id="stop3976" />
+ <stop
+ offset="0.7193"
+ style="stop-color:#CFD9E0"
+ id="stop3978" />
+ <stop
+ offset="0.7695"
+ style="stop-color:#BBCCD6"
+ id="stop3980" />
+ <stop
+ offset="0.809"
+ style="stop-color:#A6BECA"
+ id="stop3982" />
+ <stop
+ offset="1"
+ style="stop-color:#0E525F"
+ id="stop3984" />
+</linearGradient>
+<circle
+ cx="26"
+ cy="26"
+ r="18.4"
+ id="circle3986"
+ style="fill:url(#SVGID_5_)"
+ sodipodi:cx="26"
+ sodipodi:cy="26"
+ sodipodi:rx="18.4"
+ sodipodi:ry="18.4"
+ transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
+<linearGradient
+ id="SVGID_6_"
+ gradientUnits="userSpaceOnUse"
+ x1="-93.0332"
+ y1="-96"
+ x2="-59.9668"
+ y2="-96"
+ gradientTransform="matrix(1,0,0,-1,102.5,-70)">
+ <stop
+ offset="0.0056"
+ style="stop-color:#8AADCE"
+ id="stop3989" />
+ <stop
+ offset="0.073"
+ style="stop-color:#7697B4"
+ id="stop3991" />
+ <stop
+ offset="0.5"
+ style="stop-color:#EAECEF"
+ id="stop3993" />
+ <stop
+ offset="0.5636"
+ style="stop-color:#E6E9ED"
+ id="stop3995" />
+ <stop
+ offset="0.618"
+ style="stop-color:#DCE2E8"
+ id="stop3997" />
+ <stop
+ offset="0.6687"
+ style="stop-color:#D8DFE6"
+ id="stop3999" />
+ <stop
+ offset="0.7193"
+ style="stop-color:#CCD7E0"
+ id="stop4001" />
+ <stop
+ offset="0.7695"
+ style="stop-color:#B8CAD5"
+ id="stop4003" />
+ <stop
+ offset="0.809"
+ style="stop-color:#A3BCCA"
+ id="stop4005" />
+ <stop
+ offset="1"
+ style="stop-color:#0E525F"
+ id="stop4007" />
+</linearGradient>
+<circle
+ cx="26"
+ cy="26"
+ r="16.533001"
+ id="circle4009"
+ style="fill:url(#SVGID_6_)"
+ sodipodi:cx="26"
+ sodipodi:cy="26"
+ sodipodi:rx="16.533001"
+ sodipodi:ry="16.533001"
+ transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
+<linearGradient
+ id="SVGID_7_"
+ gradientUnits="userSpaceOnUse"
+ x1="-91.167"
+ y1="-96"
+ x2="-61.833"
+ y2="-96"
+ gradientTransform="matrix(1,0,0,-1,102.5,-70)">
+ <stop
+ offset="0.0056"
+ style="stop-color:#8AADCE"
+ id="stop4012" />
+ <stop
+ offset="0.073"
+ style="stop-color:#6D8FAD"
+ id="stop4014" />
+ <stop
+ offset="0.5"
+ style="stop-color:#EAECEF"
+ id="stop4016" />
+ <stop
+ offset="0.5605"
+ style="stop-color:#E5E8EC"
+ id="stop4018" />
+ <stop
+ offset="0.618"
+ style="stop-color:#DAE1E7"
+ id="stop4020" />
+ <stop
+ offset="0.6679"
+ style="stop-color:#D6DEE5"
+ id="stop4022" />
+ <stop
+ offset="0.7175"
+ style="stop-color:#CAD6DF"
+ id="stop4024" />
+ <stop
+ offset="0.7669"
+ style="stop-color:#B6C9D6"
+ id="stop4026" />
+ <stop
+ offset="0.809"
+ style="stop-color:#9FBACB"
+ id="stop4028" />
+ <stop
+ offset="1"
+ style="stop-color:#0E525F"
+ id="stop4030" />
+</linearGradient>
+<circle
+ cx="26"
+ cy="26"
+ r="14.667"
+ id="circle4032"
+ style="fill:url(#SVGID_7_)"
+ sodipodi:cx="26"
+ sodipodi:cy="26"
+ sodipodi:rx="14.667"
+ sodipodi:ry="14.667"
+ transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
+<linearGradient
+ id="SVGID_8_"
+ gradientUnits="userSpaceOnUse"
+ x1="-89.2998"
+ y1="-96"
+ x2="-63.7002"
+ y2="-96"
+ gradientTransform="matrix(1,0,0,-1,102.5,-70)">
+ <stop
+ offset="0.0056"
+ style="stop-color:#8AADCE"
+ id="stop4035" />
+ <stop
+ offset="0.073"
+ style="stop-color:#6587A5"
+ id="stop4037" />
+ <stop
+ offset="0.5"
+ style="stop-color:#EAECEF"
+ id="stop4039" />
+ <stop
+ offset="0.5588"
+ style="stop-color:#E4E8EC"
+ id="stop4041" />
+ <stop
+ offset="0.618"
+ style="stop-color:#D8DFE7"
+ id="stop4043" />
+ <stop
+ offset="0.6675"
+ style="stop-color:#D4DCE5"
+ id="stop4045" />
+ <stop
+ offset="0.7167"
+ style="stop-color:#C8D5E0"
+ id="stop4047" />
+ <stop
+ offset="0.7657"
+ style="stop-color:#B4C8D6"
+ id="stop4049" />
+ <stop
+ offset="0.809"
+ style="stop-color:#9CB8CB"
+ id="stop4051" />
+ <stop
+ offset="1"
+ style="stop-color:#0E525F"
+ id="stop4053" />
+</linearGradient>
+<circle
+ cx="26"
+ cy="26"
+ r="12.8"
+ id="circle4055"
+ style="fill:url(#SVGID_8_)"
+ sodipodi:cx="26"
+ sodipodi:cy="26"
+ sodipodi:rx="12.8"
+ sodipodi:ry="12.8"
+ transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
+<linearGradient
+ id="SVGID_9_"
+ gradientUnits="userSpaceOnUse"
+ x1="-87.4331"
+ y1="-96"
+ x2="-65.5664"
+ y2="-96"
+ gradientTransform="matrix(1,0,0,-1,102.5,-70)">
+ <stop
+ offset="0.0056"
+ style="stop-color:#8AADCE"
+ id="stop4058" />
+ <stop
+ offset="0.073"
+ style="stop-color:#5D809D"
+ id="stop4060" />
+ <stop
+ offset="0.5"
+ style="stop-color:#EAECEF"
+ id="stop4062" />
+ <stop
+ offset="0.5567"
+ style="stop-color:#E3E7EC"
+ id="stop4064" />
+ <stop
+ offset="0.618"
+ style="stop-color:#D5DDE6"
+ id="stop4066" />
+ <stop
+ offset="0.6671"
+ style="stop-color:#D1DAE4"
+ id="stop4068" />
+ <stop
+ offset="0.7159"
+ style="stop-color:#C5D3DF"
+ id="stop4070" />
+ <stop
+ offset="0.7645"
+ style="stop-color:#B1C6D6"
+ id="stop4072" />
+ <stop
+ offset="0.809"
+ style="stop-color:#98B5CB"
+ id="stop4074" />
+ <stop
+ offset="1"
+ style="stop-color:#0E525F"
+ id="stop4076" />
+</linearGradient>
+<circle
+ cx="26"
+ cy="26"
+ r="10.933"
+ id="circle4078"
+ style="fill:url(#SVGID_9_)"
+ sodipodi:cx="26"
+ sodipodi:cy="26"
+ sodipodi:rx="10.933"
+ sodipodi:ry="10.933"
+ transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
+<linearGradient
+ id="SVGID_10_"
+ gradientUnits="userSpaceOnUse"
+ x1="-85.5659"
+ y1="-96"
+ x2="-67.4336"
+ y2="-96"
+ gradientTransform="matrix(1,0,0,-1,102.5,-70)">
+ <stop
+ offset="0.0056"
+ style="stop-color:#8AADCE"
+ id="stop4081" />
+ <stop
+ offset="0.073"
+ style="stop-color:#547896"
+ id="stop4083" />
+ <stop
+ offset="0.5"
+ style="stop-color:#EAECEF"
+ id="stop4085" />
+ <stop
+ offset="0.5588"
+ style="stop-color:#E1E6EB"
+ id="stop4087" />
+ <stop
+ offset="0.618"
+ style="stop-color:#D3DCE5"
+ id="stop4089" />
+ <stop
+ offset="0.6663"
+ style="stop-color:#CFD9E3"
+ id="stop4091" />
+ <stop
+ offset="0.7143"
+ style="stop-color:#C3D2DF"
+ id="stop4093" />
+ <stop
+ offset="0.7621"
+ style="stop-color:#AFC5D7"
+ id="stop4095" />
+ <stop
+ offset="0.809"
+ style="stop-color:#94B3CC"
+ id="stop4097" />
+ <stop
+ offset="1"
+ style="stop-color:#0E525F"
+ id="stop4099" />
+</linearGradient>
+<circle
+ cx="26"
+ cy="26"
+ r="9.066"
+ id="circle4101"
+ style="fill:url(#SVGID_10_)"
+ sodipodi:cx="26"
+ sodipodi:cy="26"
+ sodipodi:rx="9.066"
+ sodipodi:ry="9.066"
+ transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
+<linearGradient
+ id="SVGID_11_"
+ gradientUnits="userSpaceOnUse"
+ x1="-83.7002"
+ y1="-96"
+ x2="-69.2998"
+ y2="-96"
+ gradientTransform="matrix(1,0,0,-1,102.5,-70)">
+ <stop
+ offset="0.0056"
+ style="stop-color:#8AADCE"
+ id="stop4104" />
+ <stop
+ offset="0.073"
+ style="stop-color:#4C708E"
+ id="stop4106" />
+ <stop
+ offset="0.5"
+ style="stop-color:#EAECEF"
+ id="stop4108" />
+ <stop
+ offset="0.5625"
+ style="stop-color:#DEE4EA"
+ id="stop4110" />
+ <stop
+ offset="0.618"
+ style="stop-color:#D0DAE4"
+ id="stop4112" />
+ <stop
+ offset="0.6663"
+ style="stop-color:#CCD7E2"
+ id="stop4114" />
+ <stop
+ offset="0.7143"
+ style="stop-color:#C0D0DE"
+ id="stop4116" />
+ <stop
+ offset="0.7621"
+ style="stop-color:#ACC3D6"
+ id="stop4118" />
+ <stop
+ offset="0.809"
+ style="stop-color:#91B1CC"
+ id="stop4120" />
+ <stop
+ offset="1"
+ style="stop-color:#0E525F"
+ id="stop4122" />
+</linearGradient>
+<circle
+ cx="26"
+ cy="26"
+ r="7.1999998"
+ id="circle4124"
+ style="fill:url(#SVGID_11_)"
+ sodipodi:cx="26"
+ sodipodi:cy="26"
+ sodipodi:rx="7.1999998"
+ sodipodi:ry="7.1999998"
+ transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
+<linearGradient
+ id="SVGID_12_"
+ gradientUnits="userSpaceOnUse"
+ x1="-81.833"
+ y1="-96"
+ x2="-71.167"
+ y2="-96"
+ gradientTransform="matrix(1,0,0,-1,102.5,-70)">
+ <stop
+ offset="0.0056"
+ style="stop-color:#8AADCE"
+ id="stop4127" />
+ <stop
+ offset="0.073"
+ style="stop-color:#446986"
+ id="stop4129" />
+ <stop
+ offset="0.5"
+ style="stop-color:#EAECEF"
+ id="stop4131" />
+ <stop
+ offset="0.5757"
+ style="stop-color:#D9E0E8"
+ id="stop4133" />
+ <stop
+ offset="0.618"
+ style="stop-color:#CED8E3"
+ id="stop4135" />
+ <stop
+ offset="0.6655"
+ style="stop-color:#CAD5E2"
+ id="stop4137" />
+ <stop
+ offset="0.7129"
+ style="stop-color:#BECEDD"
+ id="stop4139" />
+ <stop
+ offset="0.7601"
+ style="stop-color:#AAC1D6"
+ id="stop4141" />
+ <stop
+ offset="0.807"
+ style="stop-color:#8EB0CC"
+ id="stop4143" />
+ <stop
+ offset="0.809"
+ style="stop-color:#8DAFCC"
+ id="stop4145" />
+ <stop
+ offset="1"
+ style="stop-color:#0E525F"
+ id="stop4147" />
+</linearGradient>
+<circle
+ cx="26"
+ cy="26"
+ r="5.3330002"
+ id="circle4149"
+ style="fill:url(#SVGID_12_)"
+ sodipodi:cx="26"
+ sodipodi:cy="26"
+ sodipodi:rx="5.3330002"
+ sodipodi:ry="5.3330002"
+ transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
+<linearGradient
+ id="SVGID_13_"
+ gradientUnits="userSpaceOnUse"
+ x1="-79.9658"
+ y1="-96"
+ x2="-73.0342"
+ y2="-96"
+ gradientTransform="matrix(1,0,0,-1,102.5,-70)">
+ <stop
+ offset="0.0056"
+ style="stop-color:#8AADCE"
+ id="stop4152" />
+ <stop
+ offset="0.073"
+ style="stop-color:#3B617F"
+ id="stop4154" />
+ <stop
+ offset="0.5"
+ style="stop-color:#EAECEF"
+ id="stop4156" />
+ <stop
+ offset="0.6087"
+ style="stop-color:#CED9E3"
+ id="stop4158" />
+ <stop
+ offset="0.618"
+ style="stop-color:#CBD7E2"
+ id="stop4160" />
+ <stop
+ offset="0.6655"
+ style="stop-color:#C7D4E1"
+ id="stop4162" />
+ <stop
+ offset="0.7129"
+ style="stop-color:#BBCDDD"
+ id="stop4164" />
+ <stop
+ offset="0.7601"
+ style="stop-color:#A7C0D6"
+ id="stop4166" />
+ <stop
+ offset="0.807"
+ style="stop-color:#8BAECD"
+ id="stop4168" />
+ <stop
+ offset="0.809"
+ style="stop-color:#8AADCD"
+ id="stop4170" />
+ <stop
+ offset="1"
+ style="stop-color:#0E525F"
+ id="stop4172" />
+</linearGradient>
+<circle
+ cx="26"
+ cy="26"
+ r="3.4660001"
+ id="circle4174"
+ style="fill:url(#SVGID_13_)"
+ sodipodi:cx="26"
+ sodipodi:cy="26"
+ sodipodi:rx="3.4660001"
+ sodipodi:ry="3.4660001"
+ transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
+<linearGradient
+ id="SVGID_14_"
+ gradientUnits="userSpaceOnUse"
+ x1="-78.1001"
+ y1="-96"
+ x2="-74.9004"
+ y2="-96"
+ gradientTransform="matrix(1,0,0,-1,102.5,-70)">
+ <stop
+ offset="0.0056"
+ style="stop-color:#8AADCE"
+ id="stop4177" />
+ <stop
+ offset="0.073"
+ style="stop-color:#335977"
+ id="stop4179" />
+ <stop
+ offset="0.5"
+ style="stop-color:#EAECEF"
+ id="stop4181" />
+ <stop
+ offset="0.618"
+ style="stop-color:#C9D5E1"
+ id="stop4183" />
+ <stop
+ offset="0.6648"
+ style="stop-color:#C5D3E0"
+ id="stop4185" />
+ <stop
+ offset="0.7114"
+ style="stop-color:#B9CBDC"
+ id="stop4187" />
+ <stop
+ offset="0.758"
+ style="stop-color:#A5BFD6"
+ id="stop4189" />
+ <stop
+ offset="0.8042"
+ style="stop-color:#89ADCE"
+ id="stop4191" />
+ <stop
+ offset="0.809"
+ style="stop-color:#86ABCD"
+ id="stop4193" />
+ <stop
+ offset="1"
+ style="stop-color:#0E525F"
+ id="stop4195" />
+</linearGradient>
+<circle
+ cx="26"
+ cy="26"
+ r="1.6"
+ id="circle4197"
+ style="fill:url(#SVGID_14_)"
+ sodipodi:cx="26"
+ sodipodi:cy="26"
+ sodipodi:rx="1.6"
+ sodipodi:ry="1.6"
+ transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
+</svg> \ No newline at end of file
diff --git a/examples/declarative/slideswitch/slideswitch.qml b/examples/declarative/slideswitch/slideswitch.qml
new file mode 100644
index 0000000000..396749f997
--- /dev/null
+++ b/examples/declarative/slideswitch/slideswitch.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+import "content"
+
+Rectangle {
+ color: "white"
+ width: 400; height: 250
+
+//![0]
+ Switch { anchors.centerIn: parent; on: false }
+//![0]
+}
diff --git a/examples/declarative/sql/hello.qml b/examples/declarative/sql/hello.qml
new file mode 100644
index 0000000000..277dfeb42d
--- /dev/null
+++ b/examples/declarative/sql/hello.qml
@@ -0,0 +1,31 @@
+import Qt 4.6
+
+Text {
+ Script {
+ function findGreetings() {
+ var db = openDatabaseSync("QDeclarativeExampleDB", "1.0", "The Example QML SQL!", 1000000);
+
+ db.transaction(
+ function(tx) {
+ // Create the database if it doesn't already exist
+ tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)');
+
+ // Add (another) greeting row
+ tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]);
+
+ // Show all added greetings
+ var rs = tx.executeSql('SELECT * FROM Greeting');
+
+ var r = ""
+ for(var i = 0; i < rs.rows.length; i++) {
+ r += rs.rows.item(i).salutation + ", " + rs.rows.item(i).salutee + "\n"
+ }
+ text = r
+ }
+ )
+ }
+ }
+ text: "?"
+ Component.onCompleted: findGreetings()
+}
+
diff --git a/examples/declarative/states/states.qml b/examples/declarative/states/states.qml
new file mode 100644
index 0000000000..89f24213e7
--- /dev/null
+++ b/examples/declarative/states/states.qml
@@ -0,0 +1,50 @@
+import Qt 4.6
+
+Rectangle {
+ id: page
+ width: 640; height: 480; color: "#343434"
+
+ // A target region. Clicking in here sets the state to the default state
+ Rectangle {
+ id: initialPosition
+ anchors { left: parent.left; top: parent.top; leftMargin: 10; topMargin: 20 }
+ width: 64; height: 64; radius: 6
+ color: "Transparent"; border.color: "Gray"
+ MouseArea { anchors.fill: parent; onClicked: page.state = '' }
+ }
+
+ // Another target region. Clicking in here sets the state to 'Position1'
+ Rectangle {
+ id: position1
+ anchors { right: parent.right; verticalCenter: parent.verticalCenter; rightMargin: 20 }
+ width: 64; height: 64; radius: 6
+ color: "Transparent"; border.color: "Gray"
+ MouseArea { anchors.fill: parent; onClicked: page.state = 'Position1' }
+ }
+
+ // Another target region. Clicking in here sets the state to 'Position2'
+ Rectangle {
+ id: position2
+ anchors { left: parent.left; bottom: parent.bottom; leftMargin: 10; bottomMargin: 20 }
+ width: 64; height: 64; radius: 6
+ color: "Transparent"; border.color: "Gray"
+ MouseArea { anchors.fill: parent; onClicked: page.state = 'Position2' }
+ }
+
+ // The image which will be moved when my state changes
+ Image { id: user; source: "user.png"; x: initialPosition.x; y: initialPosition.y }
+
+ states: [
+ // In state 'Position1', change the 'user' item position to rect2's position.
+ State {
+ name: "Position1"
+ PropertyChanges { target: user; x: position1.x; y: position1.y }
+ },
+
+ // In state 'Position2', change the 'user' item position to rect3's position.
+ State {
+ name: "Position2"
+ PropertyChanges { target: user; x: position2.x; y: position2.y }
+ }
+ ]
+}
diff --git a/examples/declarative/states/transitions.qml b/examples/declarative/states/transitions.qml
new file mode 100644
index 0000000000..8ad61ad217
--- /dev/null
+++ b/examples/declarative/states/transitions.qml
@@ -0,0 +1,70 @@
+import Qt 4.6
+
+Rectangle {
+ id: page
+ width: 640; height: 480; color: "#343434"
+
+ // A target region. Clicking in here sets the state to the default state
+ Rectangle {
+ id: initialPosition
+ anchors { left: parent.left; top: parent.top; leftMargin: 10; topMargin: 20 }
+ width: 64; height: 64; radius: 6
+ color: "Transparent"; border.color: "Gray"
+ MouseArea { anchors.fill: parent; onClicked: page.state = '' }
+ }
+
+ // Another target region. Clicking in here sets the state to 'Position1'
+ Rectangle {
+ id: position1
+ anchors { right: parent.right; verticalCenter: parent.verticalCenter; rightMargin: 20 }
+ width: 64; height: 64; radius: 6
+ color: "Transparent"; border.color: "Gray"
+ MouseArea { anchors.fill: parent; onClicked: page.state = 'Position1' }
+ }
+
+ // Another target region. Clicking in here sets the state to 'Position2'
+ Rectangle {
+ id: position2
+ anchors { left: parent.left; bottom: parent.bottom; leftMargin: 10; bottomMargin: 20 }
+ width: 64; height: 64; radius: 6
+ color: "Transparent"; border.color: "Gray"
+ MouseArea { anchors.fill: parent; onClicked: page.state = 'Position2' }
+ }
+
+ // The image which will be moved when my state changes
+ Image { id: user; source: "user.png"; x: initialPosition.x; y: initialPosition.y }
+
+ states: [
+ // In state 'Position1', change the 'user' item position to rect2's position.
+ State {
+ name: "Position1"
+ PropertyChanges { target: user; x: position1.x; y: position1.y }
+ },
+
+ // In state 'Position2', change the 'user' item position to rect3's position.
+ State {
+ name: "Position2"
+ PropertyChanges { target: user; x: position2.x; y: position2.y }
+ }
+ ]
+
+ // transitions define how the properties change.
+ transitions: [
+ // When transitioning to 'Position1' move x,y over a duration of 1 second,
+ // with OutBounce easing function.
+ Transition {
+ from: "*"; to: "Position1"
+ NumberAnimation { properties: "x,y"; easing.type: "OutBounce"; duration: 1000 }
+ },
+ // When transitioning to 'Position2' move x,y over a duration of 2 seconds,
+ // with InOutQuad easing function.
+ Transition {
+ from: "*"; to: "Position2"
+ NumberAnimation { properties: "x,y"; easing.type: "InOutQuad"; duration: 2000 }
+ },
+ // For any other state changes move x,y linearly over duration of 200ms.
+ Transition {
+ NumberAnimation { properties: "x,y"; duration: 200 }
+ }
+ ]
+}
diff --git a/examples/declarative/states/user.png b/examples/declarative/states/user.png
new file mode 100644
index 0000000000..dd7d7a2417
--- /dev/null
+++ b/examples/declarative/states/user.png
Binary files differ
diff --git a/examples/declarative/tabwidget/TabWidget.qml b/examples/declarative/tabwidget/TabWidget.qml
new file mode 100644
index 0000000000..f0f7164e8d
--- /dev/null
+++ b/examples/declarative/tabwidget/TabWidget.qml
@@ -0,0 +1,50 @@
+import Qt 4.6
+
+Item {
+ id: tabWidget
+ property int current: 0
+ default property alias content: stack.children
+
+ onCurrentChanged: setOpacities()
+ Component.onCompleted: setOpacities()
+
+ function setOpacities()
+ {
+ for (var i = 0; i < stack.children.length; ++i) {
+ stack.children[i].opacity = i == current ? 1 : 0
+ }
+ }
+
+ Row {
+ id: header
+ Repeater {
+ delegate:
+ Rectangle {
+ width: tabWidget.width / stack.children.length; height: 36
+ Rectangle {
+ color: "#acb2c2"; width: parent.width; height: 1
+ anchors { bottom: parent.bottom; bottomMargin: 1 }
+ }
+ BorderImage {
+ source: "tab.png"; visible: tabWidget.current == index; border.left: 7; border.right: 7
+ anchors { fill: parent; leftMargin: 2; topMargin: 5; rightMargin: 1 }
+ }
+ Text {
+ horizontalAlignment: Qt.AlignHCenter; verticalAlignment: Qt.AlignVCenter
+ anchors.fill: parent; text: stack.children[index].title
+ elide: Text.ElideRight; font.bold: tabWidget.current == index
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: tabWidget.current = index
+ }
+ }
+ model: stack.children.length
+ }
+ }
+
+ Item {
+ id: stack
+ anchors.top: header.bottom; anchors.bottom: tabWidget.bottom; width: tabWidget.width
+ }
+}
diff --git a/examples/declarative/tabwidget/tab.png b/examples/declarative/tabwidget/tab.png
new file mode 100644
index 0000000000..ad8021605f
--- /dev/null
+++ b/examples/declarative/tabwidget/tab.png
Binary files differ
diff --git a/examples/declarative/tabwidget/tabs.qml b/examples/declarative/tabwidget/tabs.qml
new file mode 100644
index 0000000000..1d11b03225
--- /dev/null
+++ b/examples/declarative/tabwidget/tabs.qml
@@ -0,0 +1,48 @@
+import Qt 4.6
+
+TabWidget {
+ id: tabs
+ width: 640; height: 480
+
+ Rectangle {
+ property string title: "Red"
+ anchors.fill: parent; color: "#e3e3e3"
+ Rectangle {
+ anchors { fill: parent; topMargin: 20; leftMargin: 20; rightMargin: 20; bottomMargin: 20 }
+ color: "#ff7f7f"
+ Text {
+ anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter
+ text: "Roses are red"; font.pixelSize: 20
+ wrap: true; width: parent.width - 20
+ }
+ }
+ }
+
+ Rectangle {
+ property string title: "Green"
+ anchors.fill: parent; color: "#e3e3e3"
+ Rectangle {
+ anchors { fill: parent; topMargin: 20; leftMargin: 20; rightMargin: 20; bottomMargin: 20 }
+ color: "#7fff7f"
+ Text {
+ anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter
+ text: "Flower stems are green"; font.pixelSize: 20
+ wrap: true; width: parent.width - 20
+ }
+ }
+ }
+
+ Rectangle {
+ property string title: "Blue"
+ anchors.fill: parent; color: "#e3e3e3"
+ Rectangle {
+ anchors { fill: parent; topMargin: 20; leftMargin: 20; rightMargin: 20; bottomMargin: 20 }
+ color: "#7f7fff"
+ Text {
+ anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter
+ text: "Violets are blue"; font.pixelSize: 20
+ wrap: true; width: parent.width - 20
+ }
+ }
+ }
+}
diff --git a/examples/declarative/tic-tac-toe/content/TicTac.qml b/examples/declarative/tic-tac-toe/content/TicTac.qml
new file mode 100644
index 0000000000..ccb7b78508
--- /dev/null
+++ b/examples/declarative/tic-tac-toe/content/TicTac.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+Item {
+ signal clicked
+
+ states: [
+ State { name: "X"; PropertyChanges { target: image; source: "pics/x.png" } },
+ State { name: "O"; PropertyChanges { target: image; source: "pics/o.png" } }
+ ]
+
+ Image {
+ id: image
+ anchors.centerIn: parent
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: parent.clicked()
+ }
+}
diff --git a/examples/declarative/tic-tac-toe/content/pics/board.png b/examples/declarative/tic-tac-toe/content/pics/board.png
new file mode 100644
index 0000000000..cd859716be
--- /dev/null
+++ b/examples/declarative/tic-tac-toe/content/pics/board.png
Binary files differ
diff --git a/examples/declarative/tic-tac-toe/content/pics/o.png b/examples/declarative/tic-tac-toe/content/pics/o.png
new file mode 100644
index 0000000000..abc7ee020b
--- /dev/null
+++ b/examples/declarative/tic-tac-toe/content/pics/o.png
Binary files differ
diff --git a/examples/declarative/tic-tac-toe/content/pics/x.png b/examples/declarative/tic-tac-toe/content/pics/x.png
new file mode 100644
index 0000000000..ddc65c83b8
--- /dev/null
+++ b/examples/declarative/tic-tac-toe/content/pics/x.png
Binary files differ
diff --git a/examples/declarative/tic-tac-toe/tic-tac-toe.qml b/examples/declarative/tic-tac-toe/tic-tac-toe.qml
new file mode 100644
index 0000000000..63ee4836a7
--- /dev/null
+++ b/examples/declarative/tic-tac-toe/tic-tac-toe.qml
@@ -0,0 +1,115 @@
+import Qt 4.6
+import "content"
+
+Item {
+ width: boardimage.width
+ height: boardimage.height
+
+ Image {
+ id: boardimage
+ source: "content/pics/board.png"
+ }
+
+ Grid {
+ id: board
+ anchors.fill: boardimage
+
+ columns: 3
+
+ Repeater {
+ model: 9
+ TicTac {
+ width: board.width/3
+ height: board.height/3
+ onClicked: {
+ if (!endtimer.running) {
+ if (!makeMove(index,"X"))
+ computerTurn()
+ }
+ }
+ }
+ }
+
+ Script {
+ function winner()
+ {
+ for (var i=0; i<3; ++i) {
+ if (board.children[i].state!=""
+ && board.children[i].state==board.children[i+3].state
+ && board.children[i].state==board.children[i+6].state)
+ return true
+
+ if (board.children[i*3].state!=""
+ && board.children[i*3].state==board.children[i*3+1].state
+ && board.children[i*3].state==board.children[i*3+2].state)
+ return true
+ }
+
+ if (board.children[0].state!=""
+ && board.children[0].state==board.children[4].state!=""
+ && board.children[0].state==board.children[8].state!="")
+ return true
+
+ if (board.children[2].state!=""
+ && board.children[2].state==board.children[4].state!=""
+ && board.children[2].state==board.children[6].state!="")
+ return true
+
+ return false
+ }
+
+ function restart()
+ {
+ // No moves left - start again
+ for (var i=0; i<9; ++i)
+ board.children[i].state = ""
+ }
+
+ function makeMove(pos,player)
+ {
+ board.children[pos].state = player
+ if (winner()) {
+ win(player + " wins")
+ return true
+ } else {
+ return false
+ }
+ }
+
+ function computerTurn()
+ {
+ // world's dumbest player
+ for (var i=0; i<9; ++i)
+ if (board.children[i].state == "") {
+ makeMove(i,"O")
+ return
+ }
+ restart()
+ }
+
+ function win(s)
+ {
+ msg.text = s
+ msg.opacity = 1
+ endtimer.running = true
+ }
+ }
+
+ Timer {
+ id: endtimer
+ interval: 1600
+ onTriggered: { msg.opacity = 0; restart() }
+ }
+ }
+
+ Text {
+ id: msg
+ opacity: 0
+ anchors.centerIn: parent
+ color: "blue"
+ styleColor: "white"
+ style: Text.Outline
+ font.pixelSize: 50
+ font.bold: true
+ }
+}
diff --git a/examples/declarative/tutorials/helloworld/Cell.qml b/examples/declarative/tutorials/helloworld/Cell.qml
new file mode 100644
index 0000000000..de4f3bb5af
--- /dev/null
+++ b/examples/declarative/tutorials/helloworld/Cell.qml
@@ -0,0 +1,32 @@
+//![0]
+import Qt 4.6
+
+//![1]
+Item {
+ id: container
+//![4]
+ property alias color: rectangle.color
+//![4]
+//![5]
+ signal clicked(color color)
+//![5]
+
+ width: 40; height: 25
+//![1]
+
+//![2]
+ Rectangle {
+ id: rectangle
+ border.color: "white"
+ anchors.fill: parent
+ }
+//![2]
+
+//![3]
+ MouseArea {
+ anchors.fill: parent
+ onClicked: container.clicked(container.color)
+ }
+//![3]
+}
+//![0]
diff --git a/examples/declarative/tutorials/helloworld/tutorial1.qml b/examples/declarative/tutorials/helloworld/tutorial1.qml
new file mode 100644
index 0000000000..93d3c34b2a
--- /dev/null
+++ b/examples/declarative/tutorials/helloworld/tutorial1.qml
@@ -0,0 +1,22 @@
+//![0]
+//![3]
+import Qt 4.6
+//![3]
+
+//![1]
+Rectangle {
+ id: page
+ width: 500; height: 200
+ color: "lightgray"
+//![1]
+
+//![2]
+ Text {
+ id: helloText
+ text: "Hello world!"
+ font.pointSize: 24; font.bold: true
+ y: 30; anchors.horizontalCenter: page.horizontalCenter
+ }
+//![2]
+}
+//![0]
diff --git a/examples/declarative/tutorials/helloworld/tutorial2.qml b/examples/declarative/tutorials/helloworld/tutorial2.qml
new file mode 100644
index 0000000000..99889d73f4
--- /dev/null
+++ b/examples/declarative/tutorials/helloworld/tutorial2.qml
@@ -0,0 +1,31 @@
+//![0]
+import Qt 4.6
+
+Rectangle {
+ id: page
+ width: 500; height: 200
+ color: "lightgray"
+
+ Text {
+ id: helloText
+ text: "Hello world!"
+ font.pointSize: 24; font.bold: true
+ y: 30; anchors.horizontalCenter: page.horizontalCenter
+ }
+
+ Grid {
+ id: colorPicker
+ anchors.bottom: page.bottom
+ rows: 2; columns: 3; spacing: 3
+
+//![1]
+ Cell { color: "red"; onClicked: helloText.color = color }
+//![1]
+ Cell { color: "green"; onClicked: helloText.color = color }
+ Cell { color: "blue"; onClicked: helloText.color = color }
+ Cell { color: "yellow"; onClicked: helloText.color = color }
+ Cell { color: "steelblue"; onClicked: helloText.color = color }
+ Cell { color: "black"; onClicked: helloText.color = color }
+ }
+}
+//![0]
diff --git a/examples/declarative/tutorials/helloworld/tutorial3.qml b/examples/declarative/tutorials/helloworld/tutorial3.qml
new file mode 100644
index 0000000000..b8a4f7709e
--- /dev/null
+++ b/examples/declarative/tutorials/helloworld/tutorial3.qml
@@ -0,0 +1,51 @@
+//![0]
+import Qt 4.6
+
+Rectangle {
+ id: page
+ width: 500; height: 200
+ color: "lightgray"
+
+ Text {
+ id: helloText
+ text: "Hello world!"
+ font.pointSize: 24; font.bold: true
+ y: 30; anchors.horizontalCenter: page.horizontalCenter
+ transformOrigin: Item.Center
+
+//![1]
+ MouseArea { id: mouseRegion; anchors.fill: parent }
+//![1]
+
+//![2]
+ states: State {
+ name: "down"; when: mouseRegion.pressed == true
+ PropertyChanges { target: helloText; y: 160; rotation: 180; color: "red" }
+ }
+//![2]
+
+//![3]
+ transitions: Transition {
+ from: ""; to: "down"; reversible: true
+ ParallelAnimation {
+ NumberAnimation { properties: "y,rotation"; duration: 500; easing.type: "InOutQuad" }
+ ColorAnimation { duration: 500 }
+ }
+ }
+//![3]
+ }
+
+ Grid {
+ id: colorPicker
+ anchors.bottom: page.bottom
+ rows: 2; columns: 3; spacing: 3
+
+ Cell { color: "red"; onClicked: helloText.color = color }
+ Cell { color: "green"; onClicked: helloText.color = color }
+ Cell { color: "blue"; onClicked: helloText.color = color }
+ Cell { color: "yellow"; onClicked: helloText.color = color }
+ Cell { color: "steelblue"; onClicked: helloText.color = color }
+ Cell { color: "black"; onClicked: helloText.color = color }
+ }
+}
+//![0]
diff --git a/examples/declarative/tutorials/samegame/samegame1/Block.qml b/examples/declarative/tutorials/samegame/samegame1/Block.qml
new file mode 100644
index 0000000000..f133b1741b
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame1/Block.qml
@@ -0,0 +1,12 @@
+//![0]
+import Qt 4.6
+
+Item {
+ id:block
+
+ Image { id: img
+ source: "../shared/pics/redStone.png";
+ anchors.fill: parent
+ }
+}
+//![0]
diff --git a/examples/declarative/tutorials/samegame/samegame1/Button.qml b/examples/declarative/tutorials/samegame/samegame1/Button.qml
new file mode 100644
index 0000000000..2e31ff887c
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame1/Button.qml
@@ -0,0 +1,27 @@
+//![0]
+import Qt 4.6
+
+Rectangle {
+ id: container
+
+ signal clicked
+ property string text: "Button"
+
+ color: activePalette.button; smooth: true
+ width: txtItem.width + 20; height: txtItem.height + 6
+ border.width: 1; border.color: Qt.darker(activePalette.button); radius: 8;
+
+ gradient: Gradient {
+ GradientStop {
+ id: topGrad; position: 0.0
+ color: if (mr.pressed) { activePalette.dark } else { activePalette.light } }
+ GradientStop { position: 1.0; color: activePalette.button }
+ }
+
+ MouseArea { id: mr; anchors.fill: parent; onClicked: container.clicked() }
+
+ Text {
+ id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText
+ }
+}
+//![0]
diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame.qml b/examples/declarative/tutorials/samegame/samegame1/samegame.qml
new file mode 100644
index 0000000000..5ed30c9008
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame1/samegame.qml
@@ -0,0 +1,40 @@
+//![0]
+import Qt 4.6
+
+Rectangle {
+ id: screen
+ width: 490; height: 720
+
+ SystemPalette { id: activePalette }
+
+ Item {
+ width: parent.width; anchors.top: parent.top; anchors.bottom: toolbar.top
+
+ Image {
+ id: background
+ anchors.fill: parent; source: "../shared/pics/background.jpg"
+ fillMode: Image.PreserveAspectCrop
+ }
+ }
+
+ Rectangle {
+ id: toolbar
+ color: activePalette.window
+ height: 32; width: parent.width
+ anchors.bottom: screen.bottom
+
+ Button {
+ id: btnA; text: "New Game"; onClicked: console.log("Implement me!");
+ anchors.left: parent.left; anchors.leftMargin: 3
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Text {
+ id: score
+ text: "Score: Who knows?"; font.bold: true
+ anchors.right: parent.right; anchors.rightMargin: 3
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ }
+}
+//![0]
diff --git a/examples/declarative/tutorials/samegame/samegame2/Block.qml b/examples/declarative/tutorials/samegame/samegame2/Block.qml
new file mode 100644
index 0000000000..e4b33549f3
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame2/Block.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+Item {
+ id:block
+
+ Image { id: img
+ source: "../shared/pics/redStone.png";
+ anchors.fill: parent
+ }
+}
diff --git a/examples/declarative/tutorials/samegame/samegame2/Button.qml b/examples/declarative/tutorials/samegame/samegame2/Button.qml
new file mode 100644
index 0000000000..6629302051
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame2/Button.qml
@@ -0,0 +1,25 @@
+import Qt 4.6
+
+Rectangle {
+ id: container
+
+ signal clicked
+ property string text: "Button"
+
+ color: activePalette.button; smooth: true
+ width: txtItem.width + 20; height: txtItem.height + 6
+ border.width: 1; border.color: Qt.darker(activePalette.button); radius: 8;
+
+ gradient: Gradient {
+ GradientStop {
+ id: topGrad; position: 0.0
+ color: if (mr.pressed) { activePalette.dark } else { activePalette.light } }
+ GradientStop { position: 1.0; color: activePalette.button }
+ }
+
+ MouseArea { id: mr; anchors.fill: parent; onClicked: container.clicked() }
+
+ Text {
+ id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText
+ }
+}
diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.js b/examples/declarative/tutorials/samegame/samegame2/samegame.js
new file mode 100644
index 0000000000..2c02c61cd4
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame2/samegame.js
@@ -0,0 +1,61 @@
+//![0]
+//Note that X/Y referred to here are in game coordinates
+var maxX = 10;//Nums are for tileSize 40
+var maxY = 15;
+var tileSize = 40;
+var maxIndex = maxX*maxY;
+var board = new Array(maxIndex);
+var tileSrc = "Block.qml";
+var component;
+
+//Index function used instead of a 2D array
+function index(xIdx,yIdx) {
+ return xIdx + (yIdx * maxX);
+}
+
+function initBoard()
+{
+ //Calculate board size
+ maxX = Math.floor(background.width/tileSize);
+ maxY = Math.floor(background.height/tileSize);
+ maxIndex = maxY*maxX;
+
+ //Initialize Board
+ board = new Array(maxIndex);
+ for(var xIdx=0; xIdx<maxX; xIdx++){
+ for(var yIdx=0; yIdx<maxY; yIdx++){
+ board[index(xIdx,yIdx)] = null;
+ createBlock(xIdx,yIdx);
+ }
+ }
+}
+
+function createBlock(xIdx,yIdx){
+ if(component==null)
+ component = createComponent(tileSrc);
+
+ // Note that we don't wait for the component to become ready. This will
+ // only work if the block QML is a local file. Otherwise the component will
+ // not be ready immediately. There is a statusChanged signal on the
+ // component you could use if you want to wait to load remote files.
+ if(component.isReady){
+ var dynamicObject = component.createObject();
+ if(dynamicObject == null){
+ print("error creating block");
+ print(component.errorsString());
+ return false;
+ }
+ dynamicObject.parent = background;
+ dynamicObject.x = xIdx*tileSize;
+ dynamicObject.y = yIdx*tileSize;
+ dynamicObject.width = tileSize;
+ dynamicObject.height = tileSize;
+ board[index(xIdx,yIdx)] = dynamicObject;
+ }else{//isError or isLoading
+ print("error loading block component");
+ print(component.errorsString());
+ return false;
+ }
+ return true;
+}
+//![0]
diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.qml b/examples/declarative/tutorials/samegame/samegame2/samegame.qml
new file mode 100644
index 0000000000..7e0bc0c3e4
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame2/samegame.qml
@@ -0,0 +1,43 @@
+import Qt 4.6
+
+Rectangle {
+ id: screen
+ width: 490; height: 720
+
+ SystemPalette { id: activePalette }
+//![2]
+ Script { source: "samegame.js" }
+//![2]
+
+ Item {
+ width: parent.width; anchors.top: parent.top; anchors.bottom: toolbar.top
+
+ Image {
+ id: background
+ anchors.fill: parent; source: "../shared/pics/background.jpg"
+ fillMode: Image.PreserveAspectCrop
+ }
+ }
+
+ Rectangle {
+ id: toolbar
+ color: activePalette.window
+ height: 32; width: parent.width
+ anchors.bottom: screen.bottom
+
+//![1]
+ Button {
+ id: btnA; text: "New Game"; onClicked: initBoard();
+ anchors.left: parent.left; anchors.leftMargin: 3
+ anchors.verticalCenter: parent.verticalCenter
+ }
+//![1]
+
+ Text {
+ id: score
+ text: "Score: Who knows?"; font.bold: true
+ anchors.right: parent.right; anchors.rightMargin: 3
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ }
+}
diff --git a/examples/declarative/tutorials/samegame/samegame3/Block.qml b/examples/declarative/tutorials/samegame/samegame3/Block.qml
new file mode 100644
index 0000000000..7620104f52
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame3/Block.qml
@@ -0,0 +1,21 @@
+//![0]
+import Qt 4.6
+
+Item {
+ id:block
+ property int type: 0
+
+ Image { id: img
+ source: {
+ if(type == 0){
+ "../shared/pics/redStone.png";
+ } else if(type == 1) {
+ "../shared/pics/blueStone.png";
+ } else {
+ "../shared/pics/greenStone.png";
+ }
+ }
+ anchors.fill: parent
+ }
+}
+//![0]
diff --git a/examples/declarative/tutorials/samegame/samegame3/Button.qml b/examples/declarative/tutorials/samegame/samegame3/Button.qml
new file mode 100644
index 0000000000..6629302051
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame3/Button.qml
@@ -0,0 +1,25 @@
+import Qt 4.6
+
+Rectangle {
+ id: container
+
+ signal clicked
+ property string text: "Button"
+
+ color: activePalette.button; smooth: true
+ width: txtItem.width + 20; height: txtItem.height + 6
+ border.width: 1; border.color: Qt.darker(activePalette.button); radius: 8;
+
+ gradient: Gradient {
+ GradientStop {
+ id: topGrad; position: 0.0
+ color: if (mr.pressed) { activePalette.dark } else { activePalette.light } }
+ GradientStop { position: 1.0; color: activePalette.button }
+ }
+
+ MouseArea { id: mr; anchors.fill: parent; onClicked: container.clicked() }
+
+ Text {
+ id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText
+ }
+}
diff --git a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml
new file mode 100644
index 0000000000..36178ec05f
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml
@@ -0,0 +1,23 @@
+//![0]
+import Qt 4.6
+
+Rectangle {
+ id: page
+ function forceClose() {
+ page.closed();
+ page.opacity = 0;
+ }
+ function show(txt) {
+ myText.text = txt;
+ page.opacity = 1;
+ }
+ signal closed();
+ color: "white"; border.width: 1; width: myText.width + 20; height: 60;
+ opacity: 0
+ Behavior on opacity {
+ NumberAnimation { duration: 1000 }
+ }
+ Text { id: myText; anchors.centerIn: parent; text: "Hello World!" }
+ MouseArea { id: mr; anchors.fill: parent; onClicked: forceClose(); }
+}
+//![0]
diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.js b/examples/declarative/tutorials/samegame/samegame3/samegame.js
new file mode 100644
index 0000000000..38efb3b54c
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame3/samegame.js
@@ -0,0 +1,189 @@
+/* This script file handles the game logic */
+//Note that X/Y referred to here are in game coordinates
+var maxX = 10;//Nums are for tileSize 40
+var maxY = 15;
+var maxIndex = maxX*maxY;
+var board = new Array(maxIndex);
+var tileSrc = "Block.qml";
+var component;
+
+//Index function used instead of a 2D array
+function index(xIdx,yIdx) {
+ return xIdx + (yIdx * maxX);
+}
+
+function initBoard()
+{
+ for(var i = 0; i<maxIndex; i++){
+ //Delete old blocks
+ if(board[i] != null)
+ board[i].destroy();
+ }
+
+ //Calculate board size
+ maxX = Math.floor(gameCanvas.width/gameCanvas.tileSize);
+ maxY = Math.floor(gameCanvas.height/gameCanvas.tileSize);
+ maxIndex = maxY*maxX;
+
+ //Close dialogs
+ dialog.forceClose();
+
+ //Initialize Board
+ board = new Array(maxIndex);
+ gameCanvas.score = 0;
+ for(var xIdx=0; xIdx<maxX; xIdx++){
+ for(var yIdx=0; yIdx<maxY; yIdx++){
+ board[index(xIdx,yIdx)] = null;
+ createBlock(xIdx,yIdx);
+ }
+ }
+}
+
+function createBlock(xIdx,yIdx){
+ if(component==null)
+ component = createComponent(tileSrc);
+
+ // Note that we don't wait for the component to become ready. This will
+ // only work if the block QML is a local file. Otherwise the component will
+ // not be ready immediately. There is a statusChanged signal on the
+ // component you could use if you want to wait to load remote files.
+ if(component.isReady){
+ var dynamicObject = component.createObject();
+ if(dynamicObject == null){
+ print("error creating block");
+ print(component.errorsString());
+ return false;
+ }
+ dynamicObject.type = Math.floor(Math.random() * 3);
+ dynamicObject.parent = gameCanvas;
+ dynamicObject.x = xIdx*gameCanvas.tileSize;
+ dynamicObject.y = yIdx*gameCanvas.tileSize;
+ dynamicObject.width = gameCanvas.tileSize;
+ dynamicObject.height = gameCanvas.tileSize;
+ board[index(xIdx,yIdx)] = dynamicObject;
+ }else{//isError or isLoading
+ print("error loading block component");
+ print(component.errorsString());
+ return false;
+ }
+ return true;
+}
+
+var fillFound;//Set after a floodFill call to the number of tiles found
+var floodBoard;//Set to 1 if the floodFill reaches off that node
+//NOTE: Be careful with vars named x,y, as the calling object's x,y are still in scope
+//![1]
+function handleClick(x,y)
+{
+ var xIdx = Math.floor(x/gameCanvas.tileSize);
+ var yIdx = Math.floor(y/gameCanvas.tileSize);
+ if(xIdx >= maxX || xIdx < 0 || yIdx >= maxY || yIdx < 0)
+ return;
+ if(board[index(xIdx, yIdx)] == null)
+ return;
+ //If it's a valid tile, remove it and all connected (does nothing if it's not connected)
+ floodFill(xIdx,yIdx, -1);
+ if(fillFound <= 0)
+ return;
+ gameCanvas.score += (fillFound - 1) * (fillFound - 1);
+ shuffleDown();
+ victoryCheck();
+}
+//![1]
+
+function floodFill(xIdx,yIdx,type)
+{
+ if(board[index(xIdx, yIdx)] == null)
+ return;
+ var first = false;
+ if(type == -1){
+ first = true;
+ type = board[index(xIdx,yIdx)].type;
+
+ //Flood fill initialization
+ fillFound = 0;
+ floodBoard = new Array(maxIndex);
+ }
+ if(xIdx >= maxX || xIdx < 0 || yIdx >= maxY || yIdx < 0)
+ return;
+ if(floodBoard[index(xIdx, yIdx)] == 1 || (!first && type != board[index(xIdx,yIdx)].type))
+ return;
+ floodBoard[index(xIdx, yIdx)] = 1;
+ floodFill(xIdx+1,yIdx,type);
+ floodFill(xIdx-1,yIdx,type);
+ floodFill(xIdx,yIdx+1,type);
+ floodFill(xIdx,yIdx-1,type);
+ if(first==true && fillFound == 0)
+ return;//Can't remove single tiles
+ board[index(xIdx,yIdx)].opacity = 0;
+ board[index(xIdx,yIdx)] = null;
+ fillFound += 1;
+}
+
+function shuffleDown()
+{
+ //Fall down
+ for(var xIdx=0; xIdx<maxX; xIdx++){
+ var fallDist = 0;
+ for(var yIdx=maxY-1; yIdx>=0; yIdx--){
+ if(board[index(xIdx,yIdx)] == null){
+ fallDist += 1;
+ }else{
+ if(fallDist > 0){
+ var obj = board[index(xIdx,yIdx)];
+ obj.y += fallDist * gameCanvas.tileSize;
+ board[index(xIdx,yIdx+fallDist)] = obj;
+ board[index(xIdx,yIdx)] = null;
+ }
+ }
+ }
+ }
+ //Fall to the left
+ var fallDist = 0;
+ for(var xIdx=0; xIdx<maxX; xIdx++){
+ if(board[index(xIdx, maxY - 1)] == null){
+ fallDist += 1;
+ }else{
+ if(fallDist > 0){
+ for(var yIdx=0; yIdx<maxY; yIdx++){
+ var obj = board[index(xIdx,yIdx)];
+ if(obj == null)
+ continue;
+ obj.x -= fallDist * gameCanvas.tileSize;
+ board[index(xIdx-fallDist,yIdx)] = obj;
+ board[index(xIdx,yIdx)] = null;
+ }
+ }
+ }
+ }
+}
+
+//![2]
+function victoryCheck()
+{
+ //awards bonuses for no tiles left
+ var deservesBonus = true;
+ for(var xIdx=maxX-1; xIdx>=0; xIdx--)
+ if(board[index(xIdx, maxY - 1)] != null)
+ deservesBonus = false;
+ if(deservesBonus)
+ gameCanvas.score += 500;
+ //Checks for game over
+ if(deservesBonus || !(floodMoveCheck(0,maxY-1, -1)))
+ dialog.show("Game Over. Your score is " + gameCanvas.score);
+}
+//![2]
+
+//only floods up and right, to see if it can find adjacent same-typed tiles
+function floodMoveCheck(xIdx, yIdx, type)
+{
+ if(xIdx >= maxX || xIdx < 0 || yIdx >= maxY || yIdx < 0)
+ return false;
+ if(board[index(xIdx, yIdx)] == null)
+ return false;
+ var myType = board[index(xIdx, yIdx)].type;
+ if(type == myType)
+ return true;
+ return floodMoveCheck(xIdx + 1, yIdx, myType) ||
+ floodMoveCheck(xIdx, yIdx - 1, board[index(xIdx,yIdx)].type);
+}
diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.qml b/examples/declarative/tutorials/samegame/samegame3/samegame.qml
new file mode 100644
index 0000000000..168bf9b300
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame3/samegame.qml
@@ -0,0 +1,62 @@
+//![0]
+import Qt 4.6
+
+Rectangle {
+ id: screen
+ width: 490; height: 720
+
+ SystemPalette { id: activePalette }
+ Script { source: "samegame.js" }
+
+ Item {
+ width: parent.width; anchors.top: parent.top; anchors.bottom: toolbar.top
+
+ Image {
+ id: background
+ anchors.fill: parent; source: "../shared/pics/background.jpg"
+ fillMode: Image.PreserveAspectCrop
+ }
+
+//![1]
+ Item {
+ id: gameCanvas
+ property int score: 0
+ property int tileSize: 40
+
+ z: 20; anchors.centerIn: parent
+ width: parent.width - (parent.width % tileSize);
+ height: parent.height - (parent.height % tileSize);
+
+ MouseArea {
+ id: gameMR
+ anchors.fill: parent; onClicked: handleClick(mouse.x,mouse.y);
+ }
+ }
+//![1]
+ }
+
+//![2]
+ Dialog { id: dialog; anchors.centerIn: parent; z: 21 }
+//![2]
+
+ Rectangle {
+ id: toolbar
+ color: activePalette.window
+ height: 32; width: parent.width
+ anchors.bottom: screen.bottom
+
+ Button {
+ id: btnA; text: "New Game"; onClicked: initBoard();
+ anchors.left: parent.left; anchors.leftMargin: 3
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Text {
+ id: score
+ text: "Score: " + gameCanvas.score; font.bold: true
+ anchors.right: parent.right; anchors.rightMargin: 3
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ }
+}
+//![0]
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
new file mode 100644
index 0000000000..9ef455afc1
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
@@ -0,0 +1,63 @@
+import Qt 4.6
+
+Item { id:block
+ property int type: 0
+ property bool dying: false
+ //![1]
+ property bool spawned: false
+ property int targetX: 0
+ property int targetY: 0
+
+ SpringFollow on x { enabled: spawned; source: targetX; spring: 2; damping: 0.2 }
+ SpringFollow on y { source: targetY; spring: 2; damping: 0.2 }
+ //![1]
+
+ //![2]
+ Image { id: img
+ source: {
+ if(type == 0){
+ "../../shared/pics/redStone.png";
+ } else if(type == 1) {
+ "../../shared/pics/blueStone.png";
+ } else {
+ "../../shared/pics/greenStone.png";
+ }
+ }
+ opacity: 0
+ Behavior on opacity { NumberAnimation { properties:"opacity"; duration: 200 } }
+ anchors.fill: parent
+ }
+ //![2]
+
+ //![3]
+ Particles { id: particles
+ width:1; height:1; anchors.centerIn: parent;
+ emissionRate: 0;
+ lifeSpan: 700; lifeSpanDeviation: 600;
+ angle: 0; angleDeviation: 360;
+ velocity: 100; velocityDeviation:30;
+ source: {
+ if(type == 0){
+ "../../shared/pics/redStar.png";
+ } else if (type == 1) {
+ "../../shared/pics/blueStar.png";
+ } else {
+ "../../shared/pics/greenStar.png";
+ }
+ }
+ }
+ //![3]
+
+ //![4]
+ states: [
+ State{ name: "AliveState"; when: spawned == true && dying == false
+ PropertyChanges { target: img; opacity: 1 }
+ },
+ State{ name: "DeathState"; when: dying == true
+ StateChangeScript { script: particles.burst(50); }
+ PropertyChanges { target: img; opacity: 0 }
+ StateChangeScript { script: block.destroy(1000); }
+ }
+ ]
+ //![4]
+}
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml
new file mode 100644
index 0000000000..6629302051
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml
@@ -0,0 +1,25 @@
+import Qt 4.6
+
+Rectangle {
+ id: container
+
+ signal clicked
+ property string text: "Button"
+
+ color: activePalette.button; smooth: true
+ width: txtItem.width + 20; height: txtItem.height + 6
+ border.width: 1; border.color: Qt.darker(activePalette.button); radius: 8;
+
+ gradient: Gradient {
+ GradientStop {
+ id: topGrad; position: 0.0
+ color: if (mr.pressed) { activePalette.dark } else { activePalette.light } }
+ GradientStop { position: 1.0; color: activePalette.button }
+ }
+
+ MouseArea { id: mr; anchors.fill: parent; onClicked: container.clicked() }
+
+ Text {
+ id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText
+ }
+}
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
new file mode 100644
index 0000000000..831c03bdf3
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+
+Rectangle {
+ id: page
+ function forceClose() {
+ page.closed();
+ page.opacity = 0;
+ }
+ function show(txt) {
+ myText.text = txt;
+ page.opacity = 1;
+ }
+ signal closed();
+ color: "white"; border.width: 1; width: myText.width + 20; height: 60;
+ opacity: 0
+ Behavior on opacity {
+ NumberAnimation { duration: 1000 }
+ }
+ Text { id: myText; anchors.centerIn: parent; text: "Hello World!" }
+ MouseArea { id: mr; anchors.fill: parent; onClicked: forceClose(); }
+}
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
new file mode 100755
index 0000000000..2a0d7186df
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
@@ -0,0 +1,249 @@
+/* This script file handles the game logic */
+//Note that X/Y referred to here are in game coordinates
+var maxX = 10;//Nums are for gameCanvas.tileSize 40
+var maxY = 15;
+var maxIndex = maxX*maxY;
+var board = new Array(maxIndex);
+var tileSrc = "content/BoomBlock.qml";
+//var scoresURL = "http://qtfx-nokia.trolltech.com.au/samegame/scores.php";
+var scoresURL = "";
+var timer;
+var component = createComponent(tileSrc);
+
+//Index function used instead of a 2D array
+function index(xIdx,yIdx) {
+ return xIdx + (yIdx * maxX);
+}
+
+function timeStr(msecs) {
+ var secs = Math.floor(msecs/1000);
+ var m = Math.floor(secs/60);
+ var ret = "" + m + "m " + (secs%60) + "s";
+ return ret;
+}
+
+function getTileSize()
+{
+ return tileSize;
+}
+
+function initBoard()
+{
+ for(var i = 0; i<maxIndex; i++){
+ //Delete old blocks
+ if(board[i] != null)
+ board[i].destroy();
+ }
+
+ //Calculate board size
+ maxX = Math.floor(gameCanvas.width/gameCanvas.tileSize);
+ maxY = Math.floor(gameCanvas.height/gameCanvas.tileSize);
+ maxIndex = maxY*maxX;
+
+ //Close dialogs
+ scoreName.forceClose();
+ dialog.forceClose();
+
+ var a = new Date();
+ //Initialize Board
+ board = new Array(maxIndex);
+ gameCanvas.score = 0;
+ for(var xIdx=0; xIdx<maxX; xIdx++){
+ for(var yIdx=0; yIdx<maxY; yIdx++){
+ board[index(xIdx,yIdx)] = null;
+ createBlock(xIdx,yIdx);
+ }
+ }
+ timer = new Date();
+
+ print(timer.valueOf() - a.valueOf());
+}
+
+var fillFound;//Set after a floodFill call to the number of tiles found
+var floodBoard;//Set to 1 if the floodFill reaches off that node
+//NOTE: Be careful with vars named x,y, as the calling object's x,y are still in scope
+function handleClick(x,y)
+{
+ var xIdx = Math.floor(x/gameCanvas.tileSize);
+ var yIdx = Math.floor(y/gameCanvas.tileSize);
+ if(xIdx >= maxX || xIdx < 0 || yIdx >= maxY || yIdx < 0)
+ return;
+ if(board[index(xIdx, yIdx)] == null)
+ return;
+ //If it's a valid tile, remove it and all connected (does nothing if it's not connected)
+ floodFill(xIdx,yIdx, -1);
+ if(fillFound <= 0)
+ return;
+ gameCanvas.score += (fillFound - 1) * (fillFound - 1);
+ shuffleDown();
+ victoryCheck();
+}
+
+function floodFill(xIdx,yIdx,type)
+{
+ if(board[index(xIdx, yIdx)] == null)
+ return;
+ var first = false;
+ if(type == -1){
+ first = true;
+ type = board[index(xIdx,yIdx)].type;
+
+ //Flood fill initialization
+ fillFound = 0;
+ floodBoard = new Array(maxIndex);
+ }
+ if(xIdx >= maxX || xIdx < 0 || yIdx >= maxY || yIdx < 0)
+ return;
+ if(floodBoard[index(xIdx, yIdx)] == 1 || (!first && type != board[index(xIdx,yIdx)].type))
+ return;
+ floodBoard[index(xIdx, yIdx)] = 1;
+ floodFill(xIdx+1,yIdx,type);
+ floodFill(xIdx-1,yIdx,type);
+ floodFill(xIdx,yIdx+1,type);
+ floodFill(xIdx,yIdx-1,type);
+ if(first==true && fillFound == 0)
+ return;//Can't remove single tiles
+ board[index(xIdx,yIdx)].dying = true;
+ board[index(xIdx,yIdx)] = null;
+ fillFound += 1;
+}
+
+function shuffleDown()
+{
+ //Fall down
+ for(var xIdx=0; xIdx<maxX; xIdx++){
+ var fallDist = 0;
+ for(var yIdx=maxY-1; yIdx>=0; yIdx--){
+ if(board[index(xIdx,yIdx)] == null){
+ fallDist += 1;
+ }else{
+ if(fallDist > 0){
+ var obj = board[index(xIdx,yIdx)];
+ obj.targetY += fallDist * gameCanvas.tileSize;
+ board[index(xIdx,yIdx+fallDist)] = obj;
+ board[index(xIdx,yIdx)] = null;
+ }
+ }
+ }
+ }
+ //Fall to the left
+ fallDist = 0;
+ for(xIdx=0; xIdx<maxX; xIdx++){
+ if(board[index(xIdx, maxY - 1)] == null){
+ fallDist += 1;
+ }else{
+ if(fallDist > 0){
+ for(yIdx=0; yIdx<maxY; yIdx++){
+ obj = board[index(xIdx,yIdx)];
+ if(obj == null)
+ continue;
+ obj.targetX -= fallDist * gameCanvas.tileSize;
+ board[index(xIdx-fallDist,yIdx)] = obj;
+ board[index(xIdx,yIdx)] = null;
+ }
+ }
+ }
+ }
+}
+
+function victoryCheck()
+{
+ //awards bonuses for no tiles left
+ var deservesBonus = true;
+ for(var xIdx=maxX-1; xIdx>=0; xIdx--)
+ if(board[index(xIdx, maxY - 1)] != null)
+ deservesBonus = false;
+ if(deservesBonus)
+ gameCanvas.score += 500;
+ //Checks for game over
+ if(deservesBonus || !(floodMoveCheck(0,maxY-1, -1))){
+ timer = new Date() - timer;
+ scoreName.show("You won! Please enter your name: ");
+ //dialog.show("Game Over. Your score is " + gameCanvas.score);
+ }
+}
+
+//only floods up and right, to see if it can find adjacent same-typed tiles
+function floodMoveCheck(xIdx, yIdx, type)
+{
+ if(xIdx >= maxX || xIdx < 0 || yIdx >= maxY || yIdx < 0)
+ return false;
+ if(board[index(xIdx, yIdx)] == null)
+ return false;
+ var myType = board[index(xIdx, yIdx)].type;
+ if(type == myType)
+ return true;
+ return floodMoveCheck(xIdx + 1, yIdx, myType) ||
+ floodMoveCheck(xIdx, yIdx - 1, board[index(xIdx,yIdx)].type);
+}
+
+function createBlock(xIdx,yIdx){
+ // Note that we don't wait for the component to become ready. This will
+ // only work if the block QML is a local file. Otherwise the component will
+ // not be ready immediately. There is a statusChanged signal on the
+ // component you could use if you want to wait to load remote files.
+ if(component.isReady){
+ var dynamicObject = component.createObject();
+ if(dynamicObject == null){
+ print("error creating block");
+ print(component.errorsString());
+ return false;
+ }
+ dynamicObject.type = Math.floor(Math.random() * 3);
+ dynamicObject.parent = gameCanvas;
+ dynamicObject.x = xIdx*gameCanvas.tileSize;
+ dynamicObject.targetX = xIdx*gameCanvas.tileSize;
+ dynamicObject.targetY = yIdx*gameCanvas.tileSize;
+ dynamicObject.width = gameCanvas.tileSize;
+ dynamicObject.height = gameCanvas.tileSize;
+ dynamicObject.spawned = true;
+ board[index(xIdx,yIdx)] = dynamicObject;
+ }else{//isError or isLoading
+ print("error loading block component");
+ print(component.errorsString());
+ return false;
+ }
+ return true;
+}
+
+//![2]
+function saveHighScore(name) {
+ if(scoresURL!="")
+ sendHighScore(name);
+ //OfflineStorage
+ var db = openDatabaseSync("SameGameScores", "1.0", "Local SameGame High Scores",100);
+ var dataStr = "INSERT INTO Scores VALUES(?, ?, ?, ?)";
+ var data = [name, gameCanvas.score, maxX+"x"+maxY ,Math.floor(timer/1000)];
+ db.transaction(
+ function(tx) {
+ tx.executeSql('CREATE TABLE IF NOT EXISTS Scores(name TEXT, score NUMBER, gridSize TEXT, time NUMBER)');
+ tx.executeSql(dataStr, data);
+
+ var rs = tx.executeSql('SELECT * FROM Scores WHERE gridSize = "12x17" ORDER BY score desc LIMIT 10');
+ var r = "\nHIGH SCORES for a standard sized grid\n\n"
+ for(var i = 0; i < rs.rows.length; i++){
+ r += (i+1)+". " + rs.rows.item(i).name +' got '
+ + rs.rows.item(i).score + ' points in '
+ + rs.rows.item(i).time + ' seconds.\n';
+ }
+ dialog.show(r);
+ }
+ );
+}
+//![2]
+
+//![1]
+function sendHighScore(name) {
+ var postman = new XMLHttpRequest()
+ var postData = "name="+name+"&score="+gameCanvas.score
+ +"&gridSize="+maxX+"x"+maxY +"&time="+Math.floor(timer/1000);
+ postman.open("POST", scoresURL, true);
+ postman.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+ postman.onreadystatechange = function() {
+ if (postman.readyState == postman.DONE) {
+ dialog.show("Your score has been uploaded.");
+ }
+ }
+ postman.send(postData);
+}
+//![1]
diff --git a/examples/declarative/tutorials/samegame/samegame4/highscores/README b/examples/declarative/tutorials/samegame/samegame4/highscores/README
new file mode 100644
index 0000000000..eaa00fae37
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame4/highscores/README
@@ -0,0 +1 @@
+The SameGame example can interface with a simple PHP script to store XML high score data on a remote server. We do not have a publically accessible server available for this use, but if you have access to a PHP capable webserver you can copy the files (score_data.xml, score.php, score_style.xsl) to it and alter the highscore_server variable at the top of the samegame.js file to point to it.
diff --git a/examples/declarative/tutorials/samegame/samegame4/highscores/score_data.xml b/examples/declarative/tutorials/samegame/samegame4/highscores/score_data.xml
new file mode 100755
index 0000000000..c3fd90d9cf
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame4/highscores/score_data.xml
@@ -0,0 +1,2 @@
+<record><score>1000000</score><name>Alan the Tester</name><gridSize>0x0</gridSize><seconds>0</seconds></record>
+<record><score>6213</score><name>Alan</name><gridSize>12x17</gridSize><seconds>51</seconds></record>
diff --git a/examples/declarative/tutorials/samegame/samegame4/highscores/score_style.xsl b/examples/declarative/tutorials/samegame/samegame4/highscores/score_style.xsl
new file mode 100755
index 0000000000..670354c965
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame4/highscores/score_style.xsl
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:template match="/">
+ <html>
+ <head><title>SameGame High Scores</title></head>
+ <body>
+ <h2>SameGame High Scores</h2>
+ <table border="1">
+ <tr bgcolor="lightsteelblue">
+ <th>Name</th>
+ <th>Score</th>
+ <th>Grid Size</th>
+ <th>Time, s</th>
+ </tr>
+ <xsl:for-each select="records/record">
+ <xsl:sort select="score" data-type="number" order="descending"/>
+ <tr>
+ <td><xsl:value-of select="name"/></td>
+ <td><xsl:value-of select="score"/></td>
+ <td><xsl:value-of select="gridSize"/></td>
+ <td><xsl:value-of select="seconds"/></td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </body>
+ </html>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/examples/declarative/tutorials/samegame/samegame4/highscores/scores.php b/examples/declarative/tutorials/samegame/samegame4/highscores/scores.php
new file mode 100755
index 0000000000..3cceb2d738
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame4/highscores/scores.php
@@ -0,0 +1,34 @@
+<?php
+ $score = $_POST["score"];
+ echo "<html>";
+ echo "<head><title>SameGame High Scores</title></head><body>";
+ if($score > 0){#Sending in a new high score
+ $name = $_POST["name"];
+ $grid = $_POST["gridSize"];
+ $time = $_POST["time"];
+ if($name == "")
+ $name = "Anonymous";
+ //if($grid != "10x10"){
+ //Need a standard, so as to reject others?
+ //}
+ $file = fopen("score_data.xml", "a"); #It's XML. Happy?
+ $ret = fwrite($file, "<record><score>". $score . "</score><name>"
+ . $name . "</name><gridSize>" . $grid . "</gridSize><seconds>"
+ . $time . "</seconds></record>\n");
+ echo "Your score has been recorded. Thanks for playing!";
+ if($ret == False)
+ echo "<br/> There was an error though, so don't expect to see that score again.";
+ }else{#Read high score list
+ #Now uses XSLT to display. So just print the file. With XML cruft added.
+ #Note that firefox at least won't apply the XSLT on a php file. So redirecting
+ $file = fopen("scores.xml", "w");
+ $ret = fwrite($file, '<?xml version="1.0" encoding="ISO-8859-1"?>' . "\n"
+ . '<?xml-stylesheet type="text/xsl" href="score_style.xsl"?>' . "\n"
+ . "<records>\n" . file_get_contents("score_data.xml") . "</records>\n");
+ if($ret == False)
+ echo "There was an internal error. Sorry.";
+ else
+ echo '<script type="text/javascript">window.location.replace("scores.xml")</script>';
+ }
+ echo "</body></html>";
+?>
diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame.qml b/examples/declarative/tutorials/samegame/samegame4/samegame.qml
new file mode 100644
index 0000000000..c2e8018ca6
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame4/samegame.qml
@@ -0,0 +1,77 @@
+import Qt 4.6
+import "content"
+
+Rectangle {
+ id: screen
+ width: 490; height: 720
+
+ SystemPalette { id: activePalette }
+
+ Item {
+ width: parent.width; anchors.top: parent.top; anchors.bottom: toolBar.top
+
+ Image {
+ id: background
+ anchors.fill: parent; source: "../shared/pics/background.jpg"
+ fillMode: Image.PreserveAspectCrop
+ }
+
+ Item {
+ id: gameCanvas
+ property int score: 0
+ property int tileSize: 40
+
+ Script { source: "content/samegame.js" }
+
+ z: 20; anchors.centerIn: parent
+ width: parent.width - (parent.width % getTileSize());
+ height: parent.height - (parent.height % getTileSize());
+
+ MouseArea {
+ id: gameMR
+ anchors.fill: parent; onClicked: handleClick(mouse.x,mouse.y);
+ }
+ }
+ }
+
+ Dialog { id: dialog; anchors.centerIn: parent; z: 21 }
+ Dialog {
+ id: scoreName; anchors.centerIn: parent; z: 22;
+ Text {
+ id: spacer
+ opacity: 0
+ text: " You won! Please enter your name:"
+ }
+ TextInput {
+ id: editor
+ onAccepted: {
+ if(scoreName.opacity==1&&editor.text!="")
+ saveHighScore(editor.text);
+ scoreName.forceClose();
+ }
+ anchors.verticalCenter: parent.verticalCenter
+ width: 72; focus: true
+ anchors.left: spacer.right
+ }
+ }
+
+ Rectangle {
+ id: toolBar
+ color: activePalette.window
+ height: 32; width: parent.width
+ anchors.bottom: screen.bottom
+
+ Button {
+ id: btnA; text: "New Game"; onClicked: {initBoard();}
+ anchors.left: parent.left; anchors.leftMargin: 3
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Text {
+ id: score
+ text: "Score: " + gameCanvas.score; font.bold: true
+ anchors.right: parent.right; anchors.rightMargin: 3
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ }
+}
diff --git a/examples/declarative/tutorials/samegame/shared/pics/background.jpg b/examples/declarative/tutorials/samegame/shared/pics/background.jpg
new file mode 100644
index 0000000000..903d395c8d
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/shared/pics/background.jpg
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/shared/pics/blueStar.png b/examples/declarative/tutorials/samegame/shared/pics/blueStar.png
new file mode 100644
index 0000000000..ff9588f80a
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/shared/pics/blueStar.png
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/shared/pics/blueStone.png b/examples/declarative/tutorials/samegame/shared/pics/blueStone.png
new file mode 100644
index 0000000000..20e43c75b6
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/shared/pics/blueStone.png
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/shared/pics/greenStar.png b/examples/declarative/tutorials/samegame/shared/pics/greenStar.png
new file mode 100644
index 0000000000..cd06854719
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/shared/pics/greenStar.png
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/shared/pics/greenStone.png b/examples/declarative/tutorials/samegame/shared/pics/greenStone.png
new file mode 100644
index 0000000000..b568a1900c
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/shared/pics/greenStone.png
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/shared/pics/redStar.png b/examples/declarative/tutorials/samegame/shared/pics/redStar.png
new file mode 100644
index 0000000000..0a4dffe583
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/shared/pics/redStar.png
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/shared/pics/redStone.png b/examples/declarative/tutorials/samegame/shared/pics/redStone.png
new file mode 100644
index 0000000000..36b09a2686
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/shared/pics/redStone.png
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/shared/pics/star.png b/examples/declarative/tutorials/samegame/shared/pics/star.png
new file mode 100644
index 0000000000..defbde53ca
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/shared/pics/star.png
Binary files differ
diff --git a/examples/declarative/tutorials/samegame/shared/pics/yellowStone.png b/examples/declarative/tutorials/samegame/shared/pics/yellowStone.png
new file mode 100644
index 0000000000..b1ce76212c
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/shared/pics/yellowStone.png
Binary files differ
diff --git a/examples/declarative/tvtennis/click.wav b/examples/declarative/tvtennis/click.wav
new file mode 100644
index 0000000000..26c46f84f0
--- /dev/null
+++ b/examples/declarative/tvtennis/click.wav
Binary files differ
diff --git a/examples/declarative/tvtennis/paddle.wav b/examples/declarative/tvtennis/paddle.wav
new file mode 100644
index 0000000000..604e0e520d
--- /dev/null
+++ b/examples/declarative/tvtennis/paddle.wav
Binary files differ
diff --git a/examples/declarative/tvtennis/tvtennis.qml b/examples/declarative/tvtennis/tvtennis.qml
new file mode 100644
index 0000000000..6022a159c6
--- /dev/null
+++ b/examples/declarative/tvtennis/tvtennis.qml
@@ -0,0 +1,78 @@
+import Qt 4.6
+import Qt.multimedia 4.7
+
+Rectangle {
+ id: page
+ width: 640; height: 480
+ color: "Black"
+
+ // Make a ball to bounce
+ Rectangle {
+ // Add a property for the target y coordinate
+ property int targetY : page.height - 10
+ property var direction : "right"
+
+ id: ball
+ color: "Lime"
+ x: 20; width: 20; height: 20; z: 1
+
+ SoundEffect { id: paddle; source: "paddle.wav" }
+ SoundEffect { id: wall; source: "click.wav" }
+
+ // Move the ball to the right and back to the left repeatedly
+ SequentialAnimation on x {
+ repeat: true
+ NumberAnimation { to: page.width - 40; duration: 2000 }
+ ScriptAction { script: paddle.play() }
+ PropertyAction { target: ball; property: "direction"; value: "left" }
+ NumberAnimation { to: 20; duration: 2000 }
+ ScriptAction { script: paddle.play() }
+ PropertyAction { target: ball; property: "direction"; value: "right" }
+ }
+
+ // Make y follow the target y coordinate, with a velocity of 200
+ SpringFollow on y { source: ball.targetY; velocity: 200 }
+
+ // Detect the ball hitting the top or bottom of the view and bounce it
+ onYChanged: {
+ if (y <= 0) {
+ wall.play();
+ targetY = page.height - 20;
+ } else if (y >= page.height - 20) {
+ wall.play();
+ targetY = 0;
+ }
+ }
+ }
+
+ // Place bats to the left and right of the view, following the y
+ // coordinates of the ball.
+ Rectangle {
+ id: leftBat
+ color: "Lime"
+ x: 2; width: 20; height: 90
+ SpringFollow on y {
+ source: ball.y - 45; velocity: 300
+ enabled: ball.direction == 'left'
+ }
+ }
+ Rectangle {
+ id: rightBat
+ color: "Lime"
+ x: page.width - 22; width: 20; height: 90
+ SpringFollow on y {
+ source: ball.y-45; velocity: 300
+ enabled: ball.direction == 'right'
+ }
+ }
+
+ // The rest, to make it look realistic, if neither ever scores...
+ Rectangle { color: "Lime"; x: page.width/2-80; y: 0; width: 40; height: 60 }
+ Rectangle { color: "Black"; x: page.width/2-70; y: 10; width: 20; height: 40 }
+ Rectangle { color: "Lime"; x: page.width/2+40; y: 0; width: 40; height: 60 }
+ Rectangle { color: "Black"; x: page.width/2+50; y: 10; width: 20; height: 40 }
+ Repeater {
+ model: page.height / 20
+ Rectangle { color: "Lime"; x: page.width/2-5; y: index * 20; width: 10; height: 10 }
+ }
+}
diff --git a/examples/declarative/velocity/Day.qml b/examples/declarative/velocity/Day.qml
new file mode 100644
index 0000000000..f4c24a579f
--- /dev/null
+++ b/examples/declarative/velocity/Day.qml
@@ -0,0 +1,78 @@
+import Qt 4.6
+
+Rectangle {
+ property alias day: dayText.text
+ property var stickies
+
+ id: page
+ width: 400; height: 500; radius: 7
+ border.color: "black"
+
+ Image { x: 10; y: 10; source: "cork.jpg" }
+
+ Text {
+ id: dayText; x: 20; y: 20
+ height: 40; width: 370
+ font.pointSize: 14; font.bold: true
+ style: Text.Outline; styleColor: "#dedede"
+ }
+
+ Repeater {
+ model: page.stickies
+
+ Item {
+ id: stickyPage
+ x: Math.random() * 200 + 100
+ y: Math.random() * 300 + 50
+ SpringFollow on rotation {
+ source: -flickable.horizontalVelocity / 100
+ spring: 2.0; damping: 0.1
+ }
+
+ Item {
+ id: sticky
+ scale: 0.5
+ Image {
+ id: stickyImage; source: "sticky.png"; transformOrigin: Item.TopLeft
+ smooth: true; y: -20; x: 8 + -width * 0.6 / 2; scale: 0.6
+ }
+
+ TextEdit {
+ id: myText; smooth: true; font.pointSize: 28
+ readOnly: false; x: -104; y: 36; wrap: true
+ rotation: -8; text: noteText; width: 195; height: 172
+ }
+
+ Item {
+ y: -20
+ x: stickyImage.x
+ width: stickyImage.width * stickyImage.scale
+ height: stickyImage.height * stickyImage.scale
+ MouseArea {
+ id: mouse
+ onClicked: { myText.focus = true }
+ anchors.fill: parent
+ drag.target: stickyPage; drag.axis: MouseArea.XandYAxis; drag.minimumY: 0; drag.maximumY: 500
+ drag.minimumX: 0; drag.maximumX: 400
+ }
+ }
+ }
+
+ Image {
+ source: "tack.png"; transformOrigin: Item.TopLeft
+ x: -width / 2; y: -height * 0.7 / 2; scale: 0.7
+ }
+
+ states: State {
+ name: "pressed"
+ when: mouse.pressed
+ PropertyChanges { target: sticky; rotation: 8; scale: 1 }
+ PropertyChanges { target: page; z: 8 }
+ }
+
+ transitions: Transition {
+ NumberAnimation { properties: "rotation,scale"; duration: 200 }
+ }
+ }
+ }
+}
diff --git a/examples/declarative/velocity/cork.jpg b/examples/declarative/velocity/cork.jpg
new file mode 100644
index 0000000000..d4d706c3ae
--- /dev/null
+++ b/examples/declarative/velocity/cork.jpg
Binary files differ
diff --git a/examples/declarative/velocity/sticky.png b/examples/declarative/velocity/sticky.png
new file mode 100644
index 0000000000..73df3cd1dc
--- /dev/null
+++ b/examples/declarative/velocity/sticky.png
Binary files differ
diff --git a/examples/declarative/velocity/tack.png b/examples/declarative/velocity/tack.png
new file mode 100644
index 0000000000..cef2d1cd23
--- /dev/null
+++ b/examples/declarative/velocity/tack.png
Binary files differ
diff --git a/examples/declarative/velocity/velocity.qml b/examples/declarative/velocity/velocity.qml
new file mode 100644
index 0000000000..0d1881e84a
--- /dev/null
+++ b/examples/declarative/velocity/velocity.qml
@@ -0,0 +1,108 @@
+import Qt 4.6
+
+Rectangle {
+ color: "lightSteelBlue"
+ width: 800; height: 600
+
+ ListModel {
+ id: list
+ ListElement {
+ name: "Sunday"
+ dayColor: "#808080"
+ notes: [
+ ListElement {
+ noteText: "Lunch"
+ },
+ ListElement {
+ noteText: "Party"
+ }
+ ]
+ }
+ ListElement {
+ name: "Monday"
+ dayColor: "blue"
+ notes: [
+ ListElement {
+ noteText: "Pickup kids"
+ },
+ ListElement {
+ noteText: "Checkout kinetic"
+ },
+ ListElement {
+ noteText: "Read email"
+ }
+ ]
+ }
+ ListElement {
+ name: "Tuesday"
+ dayColor: "yellow"
+ notes: [
+ ListElement {
+ noteText: "Walk dog"
+ },
+ ListElement {
+ noteText: "Buy newspaper"
+ }
+ ]
+ }
+ ListElement {
+ name: "Wednesday"
+ dayColor: "purple"
+ notes: [
+ ListElement {
+ noteText: "Cook dinner"
+ },
+ ListElement {
+ noteText: "Eat dinner"
+ }
+ ]
+ }
+ ListElement {
+ name: "Thursday"
+ dayColor: "blue"
+ notes: [
+ ListElement {
+ noteText: "5:30pm Meeting"
+ },
+ ListElement {
+ noteText: "Weed garden"
+ }
+ ]
+ }
+ ListElement {
+ name: "Friday"
+ dayColor: "green"
+ notes: [
+ ListElement {
+ noteText: "Still work"
+ },
+ ListElement {
+ noteText: "Drink"
+ }
+ ]
+ }
+ ListElement {
+ name: "Saturday"
+ dayColor: "orange"
+ notes: [
+ ListElement {
+ noteText: "Drink"
+ },
+ ListElement {
+ noteText: "Drink"
+ }
+ ]
+ }
+ }
+ Flickable {
+ id: flickable
+ anchors.fill: parent; contentWidth: lay.width
+ Row {
+ id: lay
+ Repeater {
+ model: list
+ Component { Day { day: name; color: dayColor; stickies: notes } }
+ }
+ }
+ }
+}
diff --git a/examples/declarative/webview/autosize.qml b/examples/declarative/webview/autosize.qml
new file mode 100644
index 0000000000..3c00ee6a3e
--- /dev/null
+++ b/examples/declarative/webview/autosize.qml
@@ -0,0 +1,61 @@
+import Qt 4.6
+import org.webkit 1.0
+
+// The WebView size is determined by the width, height,
+// preferredWidth, and preferredHeight properties.
+Rectangle {
+ id: rect
+ color: "white"
+ width: 200
+ height: layout.height
+ Column {
+ id: layout
+ spacing: 2
+ WebView {
+ html: "No width defined."
+ Rectangle { color: "#10000000"
+ anchors.fill: parent
+ }
+ }
+ WebView {
+ width: rect.width
+ html: "The width is full."
+ Rectangle {
+ color: "#10000000"
+ anchors.fill: parent
+ }
+ }
+ WebView {
+ width: rect.width/2
+ html: "The width is half."
+ Rectangle {
+ color: "#10000000"
+ anchors.fill: parent
+ }
+ }
+ WebView {
+ preferredWidth: rect.width/2
+ html: "The preferredWidth is half."
+ Rectangle {
+ color: "#10000000"
+ anchors.fill: parent
+ }
+ }
+ WebView {
+ preferredWidth: rect.width/2
+ html: "The_preferredWidth_is_half."
+ Rectangle {
+ color: "#10000000"
+ anchors.fill: parent
+ }
+ }
+ WebView {
+ width: rect.width/2
+ html: "The_width_is_half."
+ Rectangle {
+ color: "#10000000"
+ anchors.fill: parent
+ }
+ }
+ }
+}
diff --git a/examples/declarative/webview/content/FieldText.qml b/examples/declarative/webview/content/FieldText.qml
new file mode 100644
index 0000000000..d282209daf
--- /dev/null
+++ b/examples/declarative/webview/content/FieldText.qml
@@ -0,0 +1,161 @@
+import Qt 4.6
+
+Item {
+ id: fieldText
+ height: 30
+ property string text: ""
+ property string label: ""
+ property bool mouseGrabbed: false
+ signal confirmed
+ signal cancelled
+ signal startEdit
+
+ Script {
+
+ function edit() {
+ if (!mouseGrabbed) {
+ fieldText.startEdit();
+ fieldText.state='editing';
+ mouseGrabbed=true;
+ }
+ }
+
+ function confirm() {
+ fieldText.state='';
+ fieldText.text = textEdit.text;
+ mouseGrabbed=false;
+ fieldText.confirmed();
+ }
+
+ function reset() {
+ textEdit.text = fieldText.text;
+ fieldText.state='';
+ mouseGrabbed=false;
+ fieldText.cancelled();
+ }
+
+ }
+
+ Image {
+ id: cancelIcon
+ width: 22
+ height: 22
+ anchors.right: parent.right
+ anchors.rightMargin: 4
+ anchors.verticalCenter: parent.verticalCenter
+ source: "pics/cancel.png"
+ opacity: 0
+ }
+
+ Image {
+ id: confirmIcon
+ width: 22
+ height: 22
+ anchors.left: parent.left
+ anchors.leftMargin: 4
+ anchors.verticalCenter: parent.verticalCenter
+ source: "pics/ok.png"
+ opacity: 0
+ }
+
+ TextInput {
+ id: textEdit
+ text: fieldText.text
+ focus: false
+ anchors.left: parent.left
+ anchors.leftMargin: 0
+ anchors.right: parent.right
+ anchors.rightMargin: 0
+ anchors.verticalCenter: parent.verticalCenter
+ color: "black"
+ font.bold: true
+ readOnly: true
+ onAccepted: confirm()
+ Keys.onEscapePressed: reset()
+ }
+
+ Text {
+ id: textLabel
+ x: 5
+ width: parent.width-10
+ anchors.verticalCenter: parent.verticalCenter
+ horizontalAlignment: Text.AlignHCenter
+ color: fieldText.state == "editing" ? "#505050" : "#AAAAAA"
+ font.italic: true
+ font.bold: true
+ text: label
+ opacity: textEdit.text == '' ? 1 : 0
+ Behavior on opacity {
+ NumberAnimation {
+ property: "opacity"
+ duration: 250
+ }
+ }
+ }
+
+ MouseArea {
+ anchors.fill: cancelIcon
+ onClicked: { reset() }
+ }
+
+ MouseArea {
+ anchors.fill: confirmIcon
+ onClicked: { confirm() }
+ }
+
+ MouseArea {
+ id: editRegion
+ anchors.fill: textEdit
+ onClicked: { edit() }
+ }
+
+ states: [
+ State {
+ name: "editing"
+ PropertyChanges {
+ target: confirmIcon
+ opacity: 1
+ }
+ PropertyChanges {
+ target: cancelIcon
+ opacity: 1
+ }
+ PropertyChanges {
+ target: textEdit
+ color: "black"
+ readOnly: false
+ focus: true
+ selectionStart: 0
+ selectionEnd: -1
+ }
+ PropertyChanges {
+ target: editRegion
+ opacity: 0
+ }
+ PropertyChanges {
+ target: textEdit.anchors
+ leftMargin: 34
+ }
+ PropertyChanges {
+ target: textEdit.anchors
+ rightMargin: 34
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ from: ""
+ to: "*"
+ reversible: true
+ NumberAnimation {
+ properties: "opacity,leftMargin,rightMargin"
+ duration: 200
+ }
+ ColorAnimation {
+ property: "color"
+ duration: 150
+ }
+ }
+ ]
+}
diff --git a/examples/declarative/webview/content/Mapping/Map.qml b/examples/declarative/webview/content/Mapping/Map.qml
new file mode 100644
index 0000000000..6c3b0218b3
--- /dev/null
+++ b/examples/declarative/webview/content/Mapping/Map.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+import org.webkit 1.0
+
+Item {
+ id: page
+ property real latitude: -34.397
+ property real longitude: 150.644
+ property string address: ""
+ WebView {
+ id: map
+ anchors.fill: parent
+ url: "map.html"
+ javaScriptWindowObjects: QtObject {
+ WebView.windowObjectName: "qml"
+ property real lat: page.latitude
+ property real lng: page.longitude
+ property string address: page.address
+ onAddressChanged: {map.evaluateJavaScript("goToAddress()")}
+ }
+ }
+}
diff --git a/examples/declarative/webview/content/Mapping/map.html b/examples/declarative/webview/content/Mapping/map.html
new file mode 100755
index 0000000000..72f426a087
--- /dev/null
+++ b/examples/declarative/webview/content/Mapping/map.html
@@ -0,0 +1,47 @@
+<html>
+<head>
+<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
+<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
+<script type="text/javascript">
+ var geocoder
+ var map
+ function goToLatLng(latlng,bounds) {
+ if (map) {
+ map.setCenter(latlng)
+ map.fitBounds(bounds)
+ } else {
+ var myOptions = {
+ zoom: 8,
+ center: latlng,
+ mapTypeId: google.maps.MapTypeId.ROADMAP
+ };
+ map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
+ }
+ }
+ function initialize() {
+ geocoder = new google.maps.Geocoder();
+ if (window.qml.address) {
+ goToAddress()
+ } else {
+ goToLatLng(new google.maps.LatLng(window.qml.lat,window.qml.lng));
+ }
+ }
+ function goToAddress() {
+ if (geocoder) {
+ var req = {
+ address: window.qml.address,
+ }
+ if (map)
+ req.bounds = map.getBounds()
+ geocoder.geocode(req, function(results, status) {
+ if (status == google.maps.GeocoderStatus.OK)
+ goToLatLng(results[0].geometry.location,results[0].geometry.bounds);
+ });
+ }
+ }
+</script>
+</head>
+<body onload="initialize()" leftmargin="0px" topmargin="0px" marginwidth="0px" marginheight="0px">
+ <div id="map_canvas" style="width:100%; height:100%"></div>
+</body>
+</html>
diff --git a/examples/declarative/webview/content/SpinSquare.qml b/examples/declarative/webview/content/SpinSquare.qml
new file mode 100644
index 0000000000..466c99e1da
--- /dev/null
+++ b/examples/declarative/webview/content/SpinSquare.qml
@@ -0,0 +1,25 @@
+import Qt 4.6
+
+Item {
+ property var period : 250
+ property var color : "black"
+ id: root
+
+ Item {
+ x: root.width/2
+ y: root.height/2
+ Rectangle {
+ color: root.color
+ x: -width/2
+ y: -height/2
+ width: root.width
+ height: width
+ }
+ rotation: NumberAnimation {
+ from: 0
+ to: 360
+ repeat: true
+ duration: root.period
+ }
+ }
+}
diff --git a/examples/declarative/webview/content/pics/cancel.png b/examples/declarative/webview/content/pics/cancel.png
new file mode 100644
index 0000000000..ecc95331f2
--- /dev/null
+++ b/examples/declarative/webview/content/pics/cancel.png
Binary files differ
diff --git a/examples/declarative/webview/content/pics/ok.png b/examples/declarative/webview/content/pics/ok.png
new file mode 100644
index 0000000000..5795f04fbf
--- /dev/null
+++ b/examples/declarative/webview/content/pics/ok.png
Binary files differ
diff --git a/examples/declarative/webview/evalandattach.html b/examples/declarative/webview/evalandattach.html
new file mode 100644
index 0000000000..48a1c330de
--- /dev/null
+++ b/examples/declarative/webview/evalandattach.html
@@ -0,0 +1,31 @@
+<body bgcolor=gray onload="ftext.confirmed.connect (ftext_confirmed); ">
+ <script>
+ do_it = function () {var oPressed = document.getElementById('pressed');
+ oPressed.innerHTML = 'MouseArea in QML clicked!';};
+ ftext_confirmed = function () { statusText1.text = ftext.text; var oT = document.getElementById('htmlTextInput'); oT.value = ftext.text }
+ </script>
+ <table border=1>
+ <tr>
+ <td>&nbsp</td>
+ <td id='pressed'></td>
+ </tr>
+ <tr>
+ <td><label for='htmlTextInput'>Type something:</label></td>
+ <td><input type='text' name='htmlTextInput' size='25' id='htmlTextInput'
+ onfocus="statusText2.text = 'Focus in html text input.'"></td>
+ </tr>
+ <tr>
+ <td><label for='htmlButton'>&nbsp;</label></td>
+ <td>
+ <input type='button' id='htmlButton' value='Push'
+ onclick="var oText = document.getElementById('htmlTextInput'); statusText1.text = oText.value; ftext.text = oText.value" />
+ </tr>
+ </table>
+ <p>
+ Below a qml(QFxItem) object inside webkit:
+ </p>
+ <object data=content/FieldText.qml TYPE=application/x-qt-plugin id="ftext_id" text="" label="Cool:" width="200"
+ objectname="ftext">
+ </object>
+</body>
+
diff --git a/examples/declarative/webview/evalandattach.qml b/examples/declarative/webview/evalandattach.qml
new file mode 100644
index 0000000000..d219d84df5
--- /dev/null
+++ b/examples/declarative/webview/evalandattach.qml
@@ -0,0 +1,55 @@
+import Qt 4.6
+import org.webkit 1.0
+
+Item {
+ height: 640
+ width: 360
+ Text {
+ id: teksti
+ text: webView.statusText1
+ anchors.top: parent.top
+ height: 30
+ anchors.left: parent.left
+ width: parent.width/2
+ }
+
+ Text {
+ id: teksti2
+ text: webView.statusText2
+ anchors.top: parent.top
+ height: 30
+ anchors.left: teksti.right
+ anchors.right: parent.right
+ }
+
+ MouseArea {
+ anchors.fill: teksti
+ onClicked: { webView.evaluateJavaScript ("do_it()") }
+ }
+
+ WebView {
+ id: webView
+ property alias statusText1: txt.text
+ property alias statusText2: txt2.text
+ anchors.top: teksti.bottom
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ focus: true
+ settings.pluginsEnabled: true
+ javaScriptWindowObjects: [
+ QtObject {
+ id: txt
+ WebView.windowObjectName: "statusText1"
+ property string text: "Click me!"
+ },
+ QtObject {
+ id: txt2
+ WebView.windowObjectName: "statusText2"
+ property string text: ""
+ }
+ ]
+ url: "evalandattach.html"
+ }
+
+}
diff --git a/examples/declarative/webview/googleMaps.qml b/examples/declarative/webview/googleMaps.qml
new file mode 100644
index 0000000000..a04fecba22
--- /dev/null
+++ b/examples/declarative/webview/googleMaps.qml
@@ -0,0 +1,32 @@
+// This example demonstrates how Web services such as Google Maps can be
+// abstracted as QML types. Here we have a "Mapping" module with a "Map"
+// type. The Map type has an address property. Setting that property moves
+// the map. The underlying implementation uses WebView and the Google Maps
+// API, but users from QML don't need to understand the implementation in
+// order to create a Map.
+
+import Qt 4.6
+import org.webkit 1.0
+import "content/Mapping"
+
+Map {
+ id: map
+ width: 300
+ height: 300
+ address: "Paris"
+ Rectangle {
+ color: "white"
+ width: input.width + 20
+ height: input.height + 4
+ radius: 5
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 5
+ x: 70
+ TextInput {
+ id: input
+ text: map.address
+ anchors.centerIn: parent
+ Keys.onReturnPressed: map.address = input.text
+ }
+ }
+}
diff --git a/examples/declarative/webview/inline-html.qml b/examples/declarative/webview/inline-html.qml
new file mode 100644
index 0000000000..41dfec3d63
--- /dev/null
+++ b/examples/declarative/webview/inline-html.qml
@@ -0,0 +1,15 @@
+import Qt 4.6
+import org.webkit 1.0
+
+// Inline HTML with loose formatting can be
+// set on the html property.
+WebView {
+ html:"\
+ <body bgcolor=white>\
+ <table border=1>\
+ <tr><th><th>One<th>Two<th>Three\
+ <tr><th>1<td>X<td>1<td>X\
+ <tr><th>2<td>0<td>X<td>0\
+ <tr><th>3<td>X<td>1<td>X\
+ </table>"
+}
diff --git a/examples/declarative/webview/newwindows.html b/examples/declarative/webview/newwindows.html
new file mode 100644
index 0000000000..f169599387
--- /dev/null
+++ b/examples/declarative/webview/newwindows.html
@@ -0,0 +1,3 @@
+<h1>Multiple windows...</h1>
+
+<a target="_blank" href="newwindows.html">Popup!</a>
diff --git a/examples/declarative/webview/newwindows.qml b/examples/declarative/webview/newwindows.qml
new file mode 100644
index 0000000000..c62aba65ff
--- /dev/null
+++ b/examples/declarative/webview/newwindows.qml
@@ -0,0 +1,31 @@
+// Demonstrates opening new WebViews from HTML
+//
+// Note that to open windows from JavaScript, you will need to
+// allow it on WebView with settings.javascriptCanOpenWindows: true
+
+import Qt 4.6
+import org.webkit 1.0
+
+Grid {
+ columns: 3
+ id: pages
+ height: 300; width: 600
+
+ Component {
+ id: webViewPage
+ Rectangle {
+ width: webView.width
+ height: webView.height
+ border.color: "gray"
+
+ WebView {
+ id: webView
+ newWindowComponent: webViewPage
+ newWindowParent: pages
+ url: "newwindows.html"
+ }
+ }
+ }
+
+ Loader { sourceComponent: webViewPage }
+}
diff --git a/examples/declarative/webview/qdeclarative-in-html.qml b/examples/declarative/webview/qdeclarative-in-html.qml
new file mode 100644
index 0000000000..172ea4b57f
--- /dev/null
+++ b/examples/declarative/webview/qdeclarative-in-html.qml
@@ -0,0 +1,33 @@
+import Qt 4.6
+import org.webkit 1.0
+
+// The WebView supports QML data through the HTML OBJECT tag
+Rectangle {
+ color:"blue"
+ Flickable {
+ width: parent.width
+ height: parent.height/2
+ contentWidth: web.width*web.scale
+ contentHeight: web.height*web.scale
+ WebView {
+ id: web
+ width: 250
+ height: 420
+ zoomFactor: 0.75
+ smoothCache: true
+ settings.pluginsEnabled: true
+ html: "<html>\
+ <body bgcolor=white>\
+ These are QML plugins, shown in a QML WebView via HTML OBJECT tags, all scaled to 75%\
+ and placed in a Flickable area...\
+ <table border=1>\
+ <tr><th>Duration <th>Color <th>Plugin\
+ <tr><td>500 <td>red <td><OBJECT data=content/SpinSquare.qml TYPE=application/x-qt-plugin width=100 height=100 period=500 color=red />\
+ <tr><td>2000 <td>blue <td><OBJECT data=content/SpinSquare.qml TYPE=application/x-qt-plugin width=100 height=100 period=2000 color=blue />\
+ <tr><td>1000 <td>green <td><OBJECT data=content/SpinSquare.qml TYPE=application/x-qt-plugin width=100 height=100 period=1000 color=green />\
+ </table>\
+ </body>\
+ </html>"
+ }
+ }
+}
diff --git a/examples/declarative/webview/transparent.qml b/examples/declarative/webview/transparent.qml
new file mode 100644
index 0000000000..55308195b7
--- /dev/null
+++ b/examples/declarative/webview/transparent.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+import org.webkit 1.0
+
+// The WebView background is transparent
+// if the HTML does not specify a background
+Rectangle {
+ color: "green"
+ width: web.width
+ height: web.height
+ WebView {
+ id: web
+ html: "Hello <b>World!</b>"
+ }
+}
diff --git a/examples/declarative/workerlistmodel/dataloader.js b/examples/declarative/workerlistmodel/dataloader.js
new file mode 100644
index 0000000000..eac747887a
--- /dev/null
+++ b/examples/declarative/workerlistmodel/dataloader.js
@@ -0,0 +1,14 @@
+// ![0]
+WorkerScript.onMessage = function(msg) {
+ console.log("Worker told to", msg.action);
+
+ if (msg.action == 'appendCurrentTime') {
+ var data = {'time': new Date().toTimeString()};
+ msg.model.append(data);
+ msg.model.sync(); // updates the changes to the list
+
+ var msgToSend = {'msg': 'Model updated!'};
+ WorkerScript.sendMessage(msgToSend);
+ }
+}
+// ![0]
diff --git a/examples/declarative/workerlistmodel/timedisplay.qml b/examples/declarative/workerlistmodel/timedisplay.qml
new file mode 100644
index 0000000000..3bf2630562
--- /dev/null
+++ b/examples/declarative/workerlistmodel/timedisplay.qml
@@ -0,0 +1,33 @@
+// ![0]
+import Qt 4.6
+
+ListView {
+ width: 200
+ height: 300
+
+ model: listModel
+ delegate: Component {
+ Text { text: time }
+ }
+
+ WorkerListModel { id: listModel }
+
+ WorkerScript {
+ id: worker
+ source: "dataloader.js"
+ onMessage: {
+ console.log("Worker said", messageObject.msg);
+ }
+ }
+
+ Timer {
+ id: timer
+ interval: 2000; repeat: true; running: true; triggeredOnStart: true
+
+ onTriggered: {
+ var msg = {'action': 'appendCurrentTime', 'model': listModel};
+ worker.sendMessage(msg);
+ }
+ }
+}
+// ![0]
diff --git a/examples/declarative/workerscript/workerscript.js b/examples/declarative/workerscript/workerscript.js
new file mode 100644
index 0000000000..f76471f920
--- /dev/null
+++ b/examples/declarative/workerscript/workerscript.js
@@ -0,0 +1,15 @@
+var lastx = 0;
+var lasty = 0;
+
+WorkerScript.onMessage = function(message) {
+ var ydiff = message.y - lasty;
+ var xdiff = message.x - lastx;
+
+ var total = Math.sqrt(ydiff * ydiff + xdiff * xdiff);
+
+ lastx = message.x;
+ lasty = message.y;
+
+ WorkerScript.sendMessage( {xmove: xdiff, ymove: ydiff, move: total} );
+}
+
diff --git a/examples/declarative/workerscript/workerscript.qml b/examples/declarative/workerscript/workerscript.qml
new file mode 100644
index 0000000000..0566f1f9b2
--- /dev/null
+++ b/examples/declarative/workerscript/workerscript.qml
@@ -0,0 +1,47 @@
+import Qt 4.6
+
+Rectangle {
+ width: 480; height: 320;
+
+ WorkerScript {
+ id: myWorker
+ source: "workerscript.js"
+
+ onMessage: {
+ print("Moved " + messageObject.xmove + " along the X axis.");
+ print("Moved " + messageObject.ymove + " along the Y axis.");
+ print("Moved " + messageObject.move + " pixels.");
+ }
+ }
+
+ Rectangle {
+ width: 200; height: 200
+ anchors.left: parent.left
+ anchors.leftMargin: 20
+ color: "red"
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: myWorker.sendMessage( { rectangle: "red", x: mouse.x, y: mouse.y } );
+ }
+ }
+
+ Rectangle {
+ width: 200; height: 200
+ anchors.right: parent.right
+ anchors.rightMargin: 20
+ color: "blue"
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: myWorker.sendMessage( { rectangle: "blue", x: mouse.x, y: mouse.y } );
+ }
+ }
+
+ Text {
+ text: "Click a Rectangle!"
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 50
+ }
+}
diff --git a/examples/declarative/xmldata/daringfireball.qml b/examples/declarative/xmldata/daringfireball.qml
new file mode 100644
index 0000000000..456f309b58
--- /dev/null
+++ b/examples/declarative/xmldata/daringfireball.qml
@@ -0,0 +1,45 @@
+import Qt 4.6
+
+Rectangle {
+ color: "white"
+ width: 600; height: 600
+
+ XmlListModel {
+ id: feedModel
+ source: "http://daringfireball.net/index.xml"
+ query: "/feed/entry"
+ namespaceDeclarations: "declare default element namespace 'http://www.w3.org/2005/Atom';"
+ XmlRole { name: "title"; query: "title/string()" }
+ XmlRole { name: "tagline"; query: "author/name/string()" }
+ XmlRole { name: "content"; query: "content/string()" }
+ }
+
+ Component {
+ id: feedDelegate
+ Item {
+ height: childrenRect.height + 20
+ Text {
+ id: titleText
+ x: 10
+ text: title; font.bold: true
+ }
+ Text {
+ text: 'by ' + tagline
+ anchors.left: titleText.right; anchors.leftMargin: 10
+ font.italic: true
+ }
+ Text {
+ x: 10
+ text: content
+ anchors.top: titleText.bottom
+ width: 580; wrap: true
+ onLinkActivated: { console.log('link clicked: ' + link) }
+ }
+ }
+ }
+
+ ListView {
+ anchors.fill: parent
+ model: feedModel; delegate: feedDelegate
+ }
+}
diff --git a/examples/declarative/xmldata/yahoonews.qml b/examples/declarative/xmldata/yahoonews.qml
new file mode 100644
index 0000000000..f7c269c54d
--- /dev/null
+++ b/examples/declarative/xmldata/yahoonews.qml
@@ -0,0 +1,79 @@
+import Qt 4.6
+
+Rectangle {
+ gradient: Gradient {
+ GradientStop { position: 0; color: "black" }
+ GradientStop { position: 1.0; color: "#AAAAAA" }
+ }
+ width: 600; height: 600
+
+ XmlListModel {
+ id: feedModel
+ source: "http://rss.news.yahoo.com/rss/oceania"
+ query: "/rss/channel/item"
+ XmlRole { name: "title"; query: "title/string()" }
+ XmlRole { name: "link"; query: "link/string()" }
+ XmlRole { name: "description"; query: "description/string()" }
+ }
+
+ Component {
+ id: feedDelegate
+ Item {
+ id: delegate
+ height: wrapper.height + 10
+
+ MouseArea {
+ anchors.fill: wrapper
+ onPressed: delegate.ListView.view.currentIndex = index;
+ onClicked: if (wrapper.state == 'Details') wrapper.state = ''; else wrapper.state = 'Details';
+ }
+
+ Rectangle {
+ id: wrapper
+ y: 5; height: titleText.height + 10; width: 580
+ color: "#F0F0F0"; radius: 5
+ Text {
+ id: titleText
+ x: 10; y: 5
+ text: '<a href=\'' + link + '\'>' + title + '</a>'
+ font.bold: true; font.family: "Helvetica"; font.pointSize: 14
+ onLinkActivated: { console.log('link clicked: ' + link) }
+ }
+
+ Text {
+ x: 10
+ id: descriptionText
+ text: description
+ width: 560
+ wrap: true
+ font.family: "Helvetica"
+ anchors.top: titleText.bottom
+ anchors.topMargin: 5
+ opacity: 0
+ }
+
+ states: State {
+ name: "Details"
+ PropertyChanges { target: wrapper; height: childrenRect.height + 10 }
+ PropertyChanges { target: descriptionText; opacity: 1 }
+ }
+
+ transitions: Transition {
+ from: "*"; to: "Details"; reversible: true
+ SequentialAnimation {
+ NumberAnimation { duration: 200; properties: "height"; easing.type: "OutQuad" }
+ NumberAnimation { duration: 200; properties: "opacity" }
+ }
+ }
+ }
+ }
+ }
+
+ ListView {
+ id: list
+ x: 10; y: 10
+ width: parent.width - 20; height: parent.height - 20
+ model: feedModel
+ delegate: feedDelegate
+ }
+}
diff --git a/examples/declarative/xmlhttprequest/test.qml b/examples/declarative/xmlhttprequest/test.qml
new file mode 100644
index 0000000000..15ac54bde0
--- /dev/null
+++ b/examples/declarative/xmlhttprequest/test.qml
@@ -0,0 +1,36 @@
+import Qt 4.6
+
+Rectangle {
+ width: 800; height: 600
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+
+ var doc = new XMLHttpRequest();
+ doc.onreadystatechange = function() {
+ if (doc.readyState == XMLHttpRequest.HEADERS_RECEIVED) {
+ console.log("Headers -->");
+ console.log(doc.getAllResponseHeaders ());
+ console.log("Last modified -->");
+ console.log(doc.getResponseHeader ("Last-Modified"));
+ }
+ else if (doc.readyState == XMLHttpRequest.DONE) {
+
+ var a = doc.responseXML.documentElement;
+ for (var ii = 0; ii < a.childNodes.length; ++ii) {
+ console.log(a.childNodes[ii].nodeName);
+ }
+ console.log("Headers -->");
+ console.log(doc.getAllResponseHeaders ());
+ console.log("Last modified -->");
+ console.log(doc.getResponseHeader ("Last-Modified"));
+
+ }
+ }
+
+ doc.open("GET", "test.xml");
+ doc.send();
+ }
+ }
+}
diff --git a/examples/declarative/xmlhttprequest/test.xml b/examples/declarative/xmlhttprequest/test.xml
new file mode 100644
index 0000000000..8b7f1e116d
--- /dev/null
+++ b/examples/declarative/xmlhttprequest/test.xml
@@ -0,0 +1,5 @@
+<data>
+ <element1 />
+ <element2 />
+</data>
+
diff --git a/examples/dialogs/standarddialogs/dialog.cpp b/examples/dialogs/standarddialogs/dialog.cpp
index 90016196f5..92ed334ce9 100644
--- a/examples/dialogs/standarddialogs/dialog.cpp
+++ b/examples/dialogs/standarddialogs/dialog.cpp
@@ -239,7 +239,12 @@ void Dialog::setText()
void Dialog::setColor()
{
- QColor color = QColorDialog::getColor(Qt::green, this);
+ QColor color;
+ if (native->isChecked())
+ color = QColorDialog::getColor(Qt::green, this);
+ else
+ color = QColorDialog::getColor(Qt::green, this, "Select Color", QColorDialog::DontUseNativeDialog);
+
if (color.isValid()) {
colorLabel->setText(color.name());
colorLabel->setPalette(QPalette(color));
diff --git a/examples/draganddrop/draggabletext/dragwidget.cpp b/examples/draganddrop/draggabletext/dragwidget.cpp
index 0ada3acf52..1fd40becce 100644
--- a/examples/draganddrop/draggabletext/dragwidget.cpp
+++ b/examples/draganddrop/draggabletext/dragwidget.cpp
@@ -82,7 +82,7 @@ DragWidget::DragWidget(QWidget *parent)
void DragWidget::dragEnterEvent(QDragEnterEvent *event)
{
if (event->mimeData()->hasText()) {
- if (children().contains(event->source())) {
+ if (event->source() == this) {
event->setDropAction(Qt::MoveAction);
event->accept();
} else {
diff --git a/examples/examples.pro b/examples/examples.pro
index 7d9aa05604..ec5cc5f95a 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -47,13 +47,12 @@ contains(QT_CONFIG, multimedia) {
contains(QT_CONFIG, script): SUBDIRS += script
contains(QT_CONFIG, phonon):!static: SUBDIRS += phonon
-contains(QT_CONFIG, webkit): SUBDIRS += webkit
embedded:SUBDIRS += qws
!wince*:!symbian: {
- !contains(QT_EDITION, Console):contains(QT_BUILD_PARTS, tools):SUBDIRS += designer
- contains(QT_BUILD_PARTS, tools):SUBDIRS += assistant qtestlib help
+ !contains(QT_EDITION, Console):contains(QT_BUILD_PARTS, tools):SUBDIRS += designer
+ contains(QT_BUILD_PARTS, tools):SUBDIRS += qtestlib help
} else {
- contains(QT_BUILD_PARTS, tools):SUBDIRS += qtestlib
+ contains(QT_BUILD_PARTS, tools):SUBDIRS += qtestlib
}
contains(QT_CONFIG, opengl): SUBDIRS += opengl
contains(QT_CONFIG, openvg): SUBDIRS += openvg
diff --git a/examples/help/remotecontrol/remotecontrol.cpp b/examples/help/remotecontrol/remotecontrol.cpp
index 2492298124..b51d8f7556 100644
--- a/examples/help/remotecontrol/remotecontrol.cpp
+++ b/examples/help/remotecontrol/remotecontrol.cpp
@@ -123,7 +123,7 @@ void RemoteControl::sendCommand(const QString &cmd)
{
if (process->state() != QProcess::Running)
return;
- process->write(cmd.toLocal8Bit() + '\0');
+ process->write(cmd.toLocal8Bit() + '\n');
}
void RemoteControl::on_indexButton_clicked()
diff --git a/examples/help/simpletextviewer/assistant.cpp b/examples/help/simpletextviewer/assistant.cpp
index 7d779f31dc..3acc1938a3 100644
--- a/examples/help/simpletextviewer/assistant.cpp
+++ b/examples/help/simpletextviewer/assistant.cpp
@@ -73,7 +73,7 @@ void Assistant::showDocumentation(const QString &page)
QByteArray ba("SetSource ");
ba.append("qthelp://com.trolltech.examples.simpletextviewer/doc/");
- proc->write(ba + page.toLocal8Bit() + '\0');
+ proc->write(ba + page.toLocal8Bit() + '\n');
}
//! [1]
diff --git a/examples/itemviews/dirview/main.cpp b/examples/itemviews/dirview/main.cpp
index f26e2f04b6..5f33810895 100644
--- a/examples/itemviews/dirview/main.cpp
+++ b/examples/itemviews/dirview/main.cpp
@@ -45,7 +45,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- QDirModel model;
+ QFileSystemModel model;
+ model.setRootPath("");
QTreeView tree;
tree.setModel(&model);
diff --git a/examples/multimedia/audioinput/audioinput.cpp b/examples/multimedia/audioinput/audioinput.cpp
index 7c2cc304a7..af72385506 100644
--- a/examples/multimedia/audioinput/audioinput.cpp
+++ b/examples/multimedia/audioinput/audioinput.cpp
@@ -76,7 +76,8 @@ AudioInfo::AudioInfo(const QAudioFormat &format, QObject *parent)
case QAudioFormat::SignedInt:
m_maxAmplitude = 127;
break;
- default: ;
+ default:
+ break;
}
break;
case 16:
@@ -87,9 +88,12 @@ AudioInfo::AudioInfo(const QAudioFormat &format, QObject *parent)
case QAudioFormat::SignedInt:
m_maxAmplitude = 32767;
break;
- default: ;
+ default:
+ break;
}
break;
+ default:
+ break;
}
}
diff --git a/examples/network/bearercloud/bearercloud.cpp b/examples/network/bearercloud/bearercloud.cpp
new file mode 100644
index 0000000000..27a296d10d
--- /dev/null
+++ b/examples/network/bearercloud/bearercloud.cpp
@@ -0,0 +1,197 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "bearercloud.h"
+#include "cloud.h"
+
+#include <QGraphicsTextItem>
+#include <QTimer>
+#include <QDateTime>
+#include <QHostInfo>
+
+#include <QDebug>
+
+#include <math.h>
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+//! [0]
+BearerCloud::BearerCloud(QObject *parent)
+: QGraphicsScene(parent), timerId(0)
+{
+ setSceneRect(-300, -300, 600, 600);
+
+ qsrand(QDateTime::currentDateTime().toTime_t());
+
+ offset[QNetworkConfiguration::Active] = 2 * M_PI * qrand() / RAND_MAX;
+ offset[QNetworkConfiguration::Discovered] = offset[QNetworkConfiguration::Active] + M_PI / 6;
+ offset[QNetworkConfiguration::Defined] = offset[QNetworkConfiguration::Discovered] - M_PI / 6;
+ offset[QNetworkConfiguration::Undefined] = offset[QNetworkConfiguration::Undefined] + M_PI / 6;
+
+ thisDevice = new QGraphicsTextItem(QHostInfo::localHostName());
+ thisDevice->setData(0, QLatin1String("This Device"));
+ thisDevice->setPos(thisDevice->boundingRect().width() / -2,
+ thisDevice->boundingRect().height() / -2);
+ addItem(thisDevice);
+
+ qreal radius = Cloud::getRadiusForState(QNetworkConfiguration::Active);
+ QGraphicsEllipseItem *orbit = new QGraphicsEllipseItem(-radius, -radius, 2*radius, 2*radius);
+ orbit->setPen(QColor(Qt::green));
+ addItem(orbit);
+ radius = Cloud::getRadiusForState(QNetworkConfiguration::Discovered);
+ orbit = new QGraphicsEllipseItem(-radius, -radius, 2*radius, 2*radius);
+ orbit->setPen(QColor(Qt::blue));
+ addItem(orbit);
+ radius = Cloud::getRadiusForState(QNetworkConfiguration::Defined);
+ orbit = new QGraphicsEllipseItem(-radius, -radius, 2*radius, 2*radius);
+ orbit->setPen(QColor(Qt::darkGray));
+ addItem(orbit);
+ radius = Cloud::getRadiusForState(QNetworkConfiguration::Undefined);
+ orbit = new QGraphicsEllipseItem(-radius, -radius, 2*radius, 2*radius);
+ orbit->setPen(QColor(Qt::lightGray));
+ addItem(orbit);
+
+ connect(&manager, SIGNAL(configurationAdded(QNetworkConfiguration)),
+ this, SLOT(configurationAdded(QNetworkConfiguration)));
+ connect(&manager, SIGNAL(configurationRemoved(QNetworkConfiguration)),
+ this, SLOT(configurationRemoved(QNetworkConfiguration)));
+ connect(&manager, SIGNAL(configurationChanged(QNetworkConfiguration)),
+ this, SLOT(configurationChanged(QNetworkConfiguration)));
+
+ QTimer::singleShot(0, this, SLOT(updateConfigurations()));
+}
+//! [0]
+
+BearerCloud::~BearerCloud()
+{
+}
+
+void BearerCloud::cloudMoved()
+{
+ if (!timerId)
+ timerId = startTimer(1000 / 25);
+}
+
+void BearerCloud::timerEvent(QTimerEvent *)
+{
+ QList<Cloud *> clouds;
+ foreach (QGraphicsItem *item, items()) {
+ if (Cloud *cloud = qgraphicsitem_cast<Cloud *>(item))
+ clouds << cloud;
+ }
+
+ foreach (Cloud *cloud, clouds)
+ cloud->calculateForces();
+
+ bool cloudsMoved = false;
+ foreach (Cloud *cloud, clouds)
+ cloudsMoved |= cloud->advance();
+
+ if (!cloudsMoved) {
+ killTimer(timerId);
+ timerId = 0;
+ }
+}
+
+//! [2]
+void BearerCloud::configurationAdded(const QNetworkConfiguration &config)
+{
+ const QNetworkConfiguration::StateFlags state = config.state();
+
+ configStates.insert(state, config.identifier());
+
+ const qreal radius = Cloud::getRadiusForState(state);
+ const int count = configStates.count(state);
+ const qreal angle = 2 * M_PI / count;
+
+ Cloud *item = new Cloud(config);
+ configurations.insert(config.identifier(), item);
+
+ item->setPos(radius * cos((count-1) * angle + offset[state]),
+ radius * sin((count-1) * angle + offset[state]));
+
+ addItem(item);
+
+ cloudMoved();
+}
+//! [2]
+
+//! [3]
+void BearerCloud::configurationRemoved(const QNetworkConfiguration &config)
+{
+ foreach (const QNetworkConfiguration::StateFlags &state, configStates.uniqueKeys())
+ configStates.remove(state, config.identifier());
+
+ Cloud *item = configurations.take(config.identifier());
+
+ item->setFinalScale(0.0);
+ item->setDeleteAfterAnimation(true);
+
+ cloudMoved();
+}
+//! [3]
+
+//! [4]
+void BearerCloud::configurationChanged(const QNetworkConfiguration &config)
+{
+ foreach (const QNetworkConfiguration::StateFlags &state, configStates.uniqueKeys())
+ configStates.remove(state, config.identifier());
+
+ configStates.insert(config.state(), config.identifier());
+
+ cloudMoved();
+}
+//! [4]
+
+//! [1]
+void BearerCloud::updateConfigurations()
+{
+ QList<QNetworkConfiguration> allConfigurations = manager.allConfigurations();
+
+ while (!allConfigurations.isEmpty())
+ configurationAdded(allConfigurations.takeFirst());
+
+ cloudMoved();
+}
+//! [1]
+
diff --git a/examples/network/bearercloud/bearercloud.h b/examples/network/bearercloud/bearercloud.h
new file mode 100644
index 0000000000..f09cb535f1
--- /dev/null
+++ b/examples/network/bearercloud/bearercloud.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qnetworkconfigmanager.h>
+
+#include <QGraphicsScene>
+#include <QMap>
+#include <QHash>
+
+QT_USE_NAMESPACE
+
+class Cloud;
+
+class BearerCloud : public QGraphicsScene
+{
+ Q_OBJECT
+
+public:
+ BearerCloud(QObject *parent = 0);
+ ~BearerCloud();
+
+ void cloudMoved();
+
+ void timerEvent(QTimerEvent *event);
+
+private Q_SLOTS:
+ void configurationAdded(const QNetworkConfiguration &config);
+ void configurationRemoved(const QNetworkConfiguration &config);
+ void configurationChanged(const QNetworkConfiguration &config);
+ void updateConfigurations();
+
+private:
+ QNetworkConfigurationManager manager;
+
+ QGraphicsTextItem *thisDevice;
+ QHash<QString, Cloud *> configurations;
+
+ QMap<QNetworkConfiguration::StateFlags, qreal> offset;
+ QMultiMap<QNetworkConfiguration::StateFlags, QString> configStates;
+
+ int timerId;
+};
+
diff --git a/examples/network/bearercloud/bearercloud.pro b/examples/network/bearercloud/bearercloud.pro
new file mode 100644
index 0000000000..c07626a341
--- /dev/null
+++ b/examples/network/bearercloud/bearercloud.pro
@@ -0,0 +1,16 @@
+HEADERS = bearercloud.h \
+ cloud.h
+
+SOURCES = main.cpp \
+ bearercloud.cpp \
+ cloud.cpp
+
+RESOURCES = icons.qrc
+
+TARGET = bearercloud
+
+QT = core gui network svg
+
+CONFIG += console
+
+symbian:TARGET.CAPABILITY = NetworkServices ReadUserData
diff --git a/examples/network/bearercloud/cloud.cpp b/examples/network/bearercloud/cloud.cpp
new file mode 100644
index 0000000000..81e13a6e66
--- /dev/null
+++ b/examples/network/bearercloud/cloud.cpp
@@ -0,0 +1,361 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "cloud.h"
+#include "bearercloud.h"
+
+#include <qnetworksession.h>
+
+#include <QGraphicsTextItem>
+#include <QGraphicsSvgItem>
+#include <QGraphicsSceneMouseEvent>
+#include <QSvgRenderer>
+#include <QPainter>
+
+#include <QDebug>
+
+#include <math.h>
+
+static QMap<QString, QSvgRenderer *> svgCache;
+
+//! [0]
+Cloud::Cloud(const QNetworkConfiguration &config, QGraphicsItem *parent)
+: QGraphicsItem(parent), configuration(config), deleteAfterAnimation(false)
+{
+ session = new QNetworkSession(configuration, this);
+ connect(session, SIGNAL(newConfigurationActivated()),
+ this, SLOT(newConfigurationActivated()));
+ connect(session, SIGNAL(stateChanged(QNetworkSession::State)),
+ this, SLOT(stateChanged(QNetworkSession::State)));
+
+ setFlag(ItemIsMovable);
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 0))
+ setFlag(ItemSendsGeometryChanges);
+#endif
+ setZValue(1);
+
+ icon = new QGraphicsSvgItem(this);
+ text = new QGraphicsTextItem(this);
+
+ currentScale = 0;
+ finalScale = 1;
+ setTransform(QTransform::fromScale(currentScale, currentScale), false);
+ setOpacity(0);
+
+ newConfigurationActivated();
+}
+//! [0]
+
+Cloud::~Cloud()
+{
+}
+
+void Cloud::setFinalScale(qreal factor)
+{
+ finalScale = factor;
+}
+
+void Cloud::setDeleteAfterAnimation(bool deleteAfter)
+{
+ deleteAfterAnimation = deleteAfter;
+}
+
+void Cloud::calculateForces()
+{
+ if (!scene() || scene()->mouseGrabberItem() == this) {
+ newPos = pos();
+ return;
+ }
+
+ // sum up all the forces push this item away
+ qreal xvel = 0;
+ qreal yvel = 0;
+ QLineF orbitForce;
+ foreach (QGraphicsItem *item, scene()->items()) {
+ // other clouds
+ Cloud *cloud = qgraphicsitem_cast<Cloud *>(item);
+ if (!cloud && item->data(0) != QLatin1String("This Device"))
+ continue;
+
+ qreal factor = 1.0;
+
+ QLineF line(cloud ? item->mapToScene(0, 0) : QPointF(0, 0), mapToScene(0, 0));
+ if (item->data(0) == QLatin1String("This Device"))
+ orbitForce = line;
+
+ if (cloud)
+ factor = cloud->currentScale;
+
+ qreal dx = line.dx();
+ qreal dy = line.dy();
+ double l = 2.0 * (dx * dx + dy * dy);
+ if (l > 0) {
+ xvel += factor * dx * 200.0 / l;
+ yvel += factor * dy * 200.0 / l;
+ }
+ }
+
+ // tendency to stay at a fixed orbit
+ qreal orbit = getRadiusForState(configuration.state());
+ qreal distance = orbitForce.length();
+
+ QLineF unit = orbitForce.unitVector();
+
+ orbitForce.setLength(xvel * unit.dx() + yvel * unit.dy());
+
+ qreal w = 2 - exp(-pow(distance-orbit, 2)/(2 * 50));
+
+ if (distance < orbit) {
+ xvel += orbitForce.dx() * w;
+ yvel += orbitForce.dy() * w;
+ } else {
+ xvel -= orbitForce.dx() * w;
+ yvel -= orbitForce.dy() * w;
+ }
+
+ if (qAbs(xvel) < 0.1 && qAbs(yvel) < 0.1)
+ xvel = yvel = 0;
+
+ QRectF sceneRect = scene()->sceneRect();
+ newPos = pos() + QPointF(xvel, yvel);
+ newPos.setX(qMin(qMax(newPos.x(), sceneRect.left() + 10), sceneRect.right() - 10));
+ newPos.setY(qMin(qMax(newPos.y(), sceneRect.top() + 10), sceneRect.bottom() - 10));
+}
+
+bool Cloud::advance()
+{
+ static const qreal scaleDelta = 0.01;
+
+ bool animated = false;
+
+ if (currentScale < finalScale) {
+ animated = true;
+ currentScale = qMin<qreal>(currentScale + scaleDelta, finalScale);
+ setTransform(QTransform::fromScale(currentScale, currentScale), false);
+ } else if (currentScale > finalScale) {
+ animated = true;
+ currentScale = qMax<qreal>(currentScale - scaleDelta, finalScale);
+ setTransform(QTransform::fromScale(currentScale, currentScale), false);
+ }
+
+ if (newPos != pos()) {
+ setPos(newPos);
+ animated = true;
+ }
+
+ if (opacity() != finalOpacity) {
+ animated = true;
+ if (qAbs(finalScale - currentScale) > 0.0) {
+ // use scale as reference
+ setOpacity(opacity() + scaleDelta * (finalOpacity - opacity()) /
+ qAbs(finalScale - currentScale));
+ } else {
+ setOpacity(finalOpacity);
+ }
+ }
+
+ if (!animated && deleteAfterAnimation)
+ deleteLater();
+
+ return animated;
+}
+
+QRectF Cloud::boundingRect() const
+{
+ return childrenBoundingRect();
+}
+
+void Cloud::paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
+{
+}
+
+//! [4]
+QVariant Cloud::itemChange(GraphicsItemChange change, const QVariant &value)
+{
+ switch (change) {
+ case ItemPositionHasChanged:
+ if (BearerCloud *bearercloud = qobject_cast<BearerCloud *>(scene()))
+ bearercloud->cloudMoved();
+ default:
+ ;
+ };
+
+ return QGraphicsItem::itemChange(change, value);
+}
+//! [4]
+
+//! [3]
+void Cloud::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton) {
+ if (session->isOpen())
+ session->close();
+ else
+ session->open();
+
+ event->accept();
+ }
+}
+//! [3]
+
+//! [2]
+void Cloud::stateChanged(QNetworkSession::State state)
+{
+ if (configuration.name().isEmpty())
+ finalOpacity = qreal(0.1);
+ else if (session->state() == QNetworkSession::NotAvailable)
+ finalOpacity = 0.5;
+ else
+ finalOpacity = 1.0;
+
+ QString tooltip;
+
+ if (configuration.name().isEmpty())
+ tooltip += tr("<b>HIDDEN NETWORK</b><br>");
+ else
+ tooltip += tr("<b>%1</b><br>").arg(configuration.name());
+
+ const QNetworkInterface interface = session->interface();
+ if (interface.isValid())
+ tooltip += tr("<br>Interface: %1").arg(interface.humanReadableName());
+ tooltip += tr("<br>Id: %1").arg(configuration.identifier());
+
+ const QString bearerName = configuration.bearerName();
+ if (!bearerName.isEmpty())
+ tooltip += tr("<br>Bearer: %1").arg(bearerName);
+
+ QString s = tr("<br>State: %1 (%2)");
+ switch (state) {
+ case QNetworkSession::Invalid:
+ s = s.arg(tr("Invalid"));
+ break;
+ case QNetworkSession::NotAvailable:
+ s = s.arg(tr("Not Available"));
+ break;
+ case QNetworkSession::Connecting:
+ s = s.arg(tr("Connecting"));
+ break;
+ case QNetworkSession::Connected:
+ s = s.arg(tr("Connected"));
+ break;
+ case QNetworkSession::Closing:
+ s = s.arg(tr("Closing"));
+ break;
+ case QNetworkSession::Disconnected:
+ s = s.arg(tr("Disconnected"));
+ break;
+ case QNetworkSession::Roaming:
+ s = s.arg(tr("Roaming"));
+ break;
+ default:
+ s = s.arg(tr("Unknown"));
+ }
+
+ if (session->isOpen())
+ s = s.arg(tr("Open"));
+ else
+ s = s.arg(tr("Closed"));
+
+ tooltip += s;
+
+ tooltip += tr("<br><br>Active time: %1 seconds").arg(session->activeTime());
+ tooltip += tr("<br>Received data: %1 bytes").arg(session->bytesReceived());
+ tooltip += tr("<br>Sent data: %1 bytes").arg(session->bytesWritten());
+
+ setToolTip(tooltip);
+}
+//! [2]
+
+//! [1]
+void Cloud::newConfigurationActivated()
+{
+ const QString bearerName = configuration.bearerName();
+ if (!svgCache.contains(bearerName)) {
+ if (bearerName == QLatin1String("WLAN"))
+ svgCache.insert(bearerName, new QSvgRenderer(QLatin1String(":wlan.svg")));
+ else if (bearerName == QLatin1String("Ethernet"))
+ svgCache.insert(bearerName, new QSvgRenderer(QLatin1String(":lan.svg")));
+ else
+ svgCache.insert(bearerName, new QSvgRenderer(QLatin1String(":unknown.svg")));
+ }
+
+ icon->setSharedRenderer(svgCache[bearerName]);
+
+ if (configuration.name().isEmpty()) {
+ text->setPlainText(tr("HIDDEN NETWORK"));
+ } else {
+ if (configuration.type() == QNetworkConfiguration::ServiceNetwork)
+ text->setHtml("<b>" + configuration.name() + "</b>");
+ else
+ text->setPlainText(configuration.name());
+ }
+
+ const qreal height = icon->boundingRect().height() + text->boundingRect().height();
+
+ icon->setPos(icon->boundingRect().width() / -2, height / -2);
+
+ text->setPos(text->boundingRect().width() / -2,
+ height / 2 - text->boundingRect().height());
+
+ stateChanged(session->state());
+}
+//! [1]
+
+qreal Cloud::getRadiusForState(QNetworkConfiguration::StateFlags state)
+{
+ switch (state) {
+ case QNetworkConfiguration::Active:
+ return 100;
+ break;
+ case QNetworkConfiguration::Discovered:
+ return 150;
+ break;
+ case QNetworkConfiguration::Defined:
+ return 200;
+ break;
+ case QNetworkConfiguration::Undefined:
+ return 250;
+ break;
+ default:
+ return 300;
+ }
+}
+
diff --git a/examples/network/bearercloud/cloud.h b/examples/network/bearercloud/cloud.h
new file mode 100644
index 0000000000..38f8aff6f4
--- /dev/null
+++ b/examples/network/bearercloud/cloud.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qnetworkconfiguration.h>
+#include <qnetworksession.h>
+
+#include <QGraphicsItem>
+QT_USE_NAMESPACE
+
+QT_BEGIN_NAMESPACE
+class QGraphicsTextItem;
+class QGraphicsSvgItem;
+QT_END_NAMESPACE
+
+class Cloud : public QObject, public QGraphicsItem
+{
+ Q_OBJECT
+ Q_INTERFACES(QGraphicsItem)
+
+public:
+ Cloud(const QNetworkConfiguration &config, QGraphicsItem *parent = 0);
+ ~Cloud();
+
+ enum { Type = UserType + 1 };
+ int type() const { return Type; }
+
+ void setFinalScale(qreal factor);
+ void setDeleteAfterAnimation(bool deleteAfter);
+
+ void calculateForces();
+
+ bool advance();
+ QRectF boundingRect() const;
+ void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
+
+ static qreal getRadiusForState(QNetworkConfiguration::StateFlags state);
+
+protected:
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value);
+ void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
+
+private Q_SLOTS:
+ void stateChanged(QNetworkSession::State state);
+ void newConfigurationActivated();
+
+private:
+ QNetworkConfiguration configuration;
+ QNetworkSession *session;
+
+ QGraphicsTextItem *text;
+ QGraphicsSvgItem *icon;
+
+ qreal finalOpacity;
+ qreal finalScale;
+ qreal currentScale;
+
+ QPointF newPos;
+
+ bool deleteAfterAnimation;
+};
+
diff --git a/examples/network/bearercloud/icons.qrc b/examples/network/bearercloud/icons.qrc
new file mode 100644
index 0000000000..84a8939db3
--- /dev/null
+++ b/examples/network/bearercloud/icons.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>wlan.svg</file>
+ <file>lan.svg</file>
+ <file>unknown.svg</file>
+</qresource>
+</RCC>
diff --git a/examples/network/bearercloud/lan.svg b/examples/network/bearercloud/lan.svg
new file mode 100644
index 0000000000..3cce805197
--- /dev/null
+++ b/examples/network/bearercloud/lan.svg
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="25.000002"
+ height="9.6406126"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ version="1.0"
+ sodipodi:docname="lan.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs4">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="19.416667"
+ inkscape:cx="15.244635"
+ inkscape:cy="11.639485"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1459"
+ inkscape:window-height="964"
+ inkscape:window-x="453"
+ inkscape:window-y="166" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-4.0978193e-8,-19.359387)">
+ <text
+ xml:space="preserve"
+ style="font-size:13.99289513px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="-1.1205248"
+ y="29"
+ id="text3239"><tspan
+ sodipodi:role="line"
+ id="tspan3241"
+ x="-1.1205248"
+ y="29">LAN</tspan></text>
+ </g>
+</svg>
diff --git a/examples/network/bearercloud/main.cpp b/examples/network/bearercloud/main.cpp
new file mode 100644
index 0000000000..86ef46ffc0
--- /dev/null
+++ b/examples/network/bearercloud/main.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "bearercloud.h"
+
+#include <QApplication>
+#include <QGraphicsView>
+
+class CloudView : public QGraphicsView
+{
+ Q_OBJECT
+
+public:
+ CloudView(QGraphicsScene *scene);
+ ~CloudView() { }
+
+protected:
+ void resizeEvent(QResizeEvent *) {
+ fitInView(sceneRect(), Qt::KeepAspectRatio);
+ }
+#ifdef Q_OS_WINCE
+ void hideEvent(QHideEvent *) {
+ qApp->quit();
+ }
+#endif
+};
+
+CloudView::CloudView(QGraphicsScene *scene)
+: QGraphicsView(scene)
+{
+ setRenderHints(QPainter::TextAntialiasing | QPainter::Antialiasing |
+ QPainter::SmoothPixmapTransform);
+#if defined (Q_OS_SYMBIAN) || defined (Q_OS_WINCE)
+ setWindowState(Qt::WindowMaximized);
+#endif
+}
+
+#include "main.moc"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ BearerCloud bearerCloud;
+
+ CloudView view(&bearerCloud);
+ view.show();
+
+ return app.exec();
+}
+
diff --git a/examples/network/bearercloud/unknown.svg b/examples/network/bearercloud/unknown.svg
new file mode 100644
index 0000000000..fd10298326
--- /dev/null
+++ b/examples/network/bearercloud/unknown.svg
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="25"
+ height="9.0681238"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ version="1.0"
+ sodipodi:docname="unknown.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs4">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="19.416667"
+ inkscape:cx="15.244635"
+ inkscape:cy="11.639485"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1459"
+ inkscape:window-height="964"
+ inkscape:window-x="453"
+ inkscape:window-y="166" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-6.891787e-8,-19.931876)">
+ <text
+ xml:space="preserve"
+ style="font-size:13.16195393px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="-1.0539845"
+ y="29"
+ id="text3239"><tspan
+ sodipodi:role="line"
+ id="tspan3241"
+ x="-1.0539845"
+ y="29">NET</tspan></text>
+ </g>
+</svg>
diff --git a/examples/network/bearercloud/wlan.svg b/examples/network/bearercloud/wlan.svg
new file mode 100644
index 0000000000..8b86089c6a
--- /dev/null
+++ b/examples/network/bearercloud/wlan.svg
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="27"
+ height="29"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ version="1.0"
+ sodipodi:docname="wlan.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs4">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="19.416667"
+ inkscape:cx="23.665236"
+ inkscape:cy="11.639485"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1912"
+ inkscape:window-height="1130"
+ inkscape:window-x="0"
+ inkscape:window-y="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <g
+ id="g6334"
+ transform="translate(1.0000001,0)">
+ <path
+ id="path2393"
+ d="M 12.500248,9.499893 L 12.500248,28.500095"
+ style="fill:none;fill-rule:evenodd;stroke:#3bb3ff;stroke-width:0.99981093;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ sodipodi:open="true"
+ sodipodi:end="4.1887902"
+ sodipodi:start="2.0943951"
+ transform="matrix(1.0216765,0,0,1.0324764,0.4493163,-22.692096)"
+ d="M 8.8583691,34.085043 A 3.9141631,3.9141631 0 0 1 8.8583691,27.305513"
+ sodipodi:ry="3.9141631"
+ sodipodi:rx="3.9141631"
+ sodipodi:cy="30.695278"
+ sodipodi:cx="10.815451"
+ id="path3171"
+ style="fill:none;fill-opacity:0;stroke:#3bb3ff;stroke-width:0.97365081;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:open="true"
+ sodipodi:end="4.1887902"
+ sodipodi:start="2.0943951"
+ transform="matrix(1.6055152,0,0,1.6224868,-7.5798083,-40.80263)"
+ d="M 8.8583691,34.085043 A 3.9141631,3.9141631 0 0 1 8.8583691,27.305513"
+ sodipodi:ry="3.9141631"
+ sodipodi:rx="3.9141631"
+ sodipodi:cy="30.695278"
+ sodipodi:cx="10.815451"
+ id="path3175"
+ style="fill:none;fill-opacity:0;stroke:#3bb3ff;stroke-width:0.61958688;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:open="true"
+ sodipodi:end="4.1887902"
+ sodipodi:start="2.0943951"
+ transform="matrix(2.4812855,0,0,2.5075146,-17.62358,-67.968804)"
+ d="M 8.8583691,34.085043 A 3.9141631,3.9141631 0 0 1 8.8583691,27.305513"
+ sodipodi:ry="3.9141631"
+ sodipodi:rx="3.9141631"
+ sodipodi:cy="30.695278"
+ sodipodi:cx="10.815451"
+ id="path3177"
+ style="fill:none;fill-opacity:0;stroke:#3bb3ff;stroke-width:0.40090355;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:open="true"
+ sodipodi:end="4.1887902"
+ sodipodi:start="2.0943951"
+ transform="matrix(-1.0216765,0,0,1.0324764,24.550388,-22.692096)"
+ d="M 8.8583691,34.085043 A 3.9141631,3.9141631 0 0 1 8.8583691,27.305513"
+ sodipodi:ry="3.9141631"
+ sodipodi:rx="3.9141631"
+ sodipodi:cy="30.695278"
+ sodipodi:cx="10.815451"
+ id="path3179"
+ style="fill:none;fill-opacity:0;stroke:#3bb3ff;stroke-width:0.97365081;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:open="true"
+ sodipodi:end="4.1887902"
+ sodipodi:start="2.0943951"
+ transform="matrix(-1.6055152,0,0,1.6224868,32.580246,-40.80263)"
+ d="M 8.8583691,34.085043 A 3.9141631,3.9141631 0 0 1 8.8583691,27.305513"
+ sodipodi:ry="3.9141631"
+ sodipodi:rx="3.9141631"
+ sodipodi:cy="30.695278"
+ sodipodi:cx="10.815451"
+ id="path3181"
+ style="fill:none;fill-opacity:0;stroke:#3bb3ff;stroke-width:0.61958688;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:open="true"
+ sodipodi:end="4.1887902"
+ sodipodi:start="2.0943951"
+ transform="matrix(-2.4812855,0,0,2.5075146,42.623143,-67.968804)"
+ d="M 8.8583691,34.085043 A 3.9141631,3.9141631 0 0 1 8.8583691,27.305513"
+ sodipodi:ry="3.9141631"
+ sodipodi:rx="3.9141631"
+ sodipodi:cy="30.695278"
+ sodipodi:cx="10.815451"
+ id="path3183"
+ style="fill:none;fill-opacity:0;stroke:#3bb3ff;stroke-width:0.40090355;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:type="arc" />
+ </g>
+ </g>
+</svg>
diff --git a/examples/network/bearermonitor/bearermonitor.cpp b/examples/network/bearermonitor/bearermonitor.cpp
new file mode 100644
index 0000000000..5b2bad12e7
--- /dev/null
+++ b/examples/network/bearermonitor/bearermonitor.cpp
@@ -0,0 +1,395 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "bearermonitor.h"
+#include "sessionwidget.h"
+
+#include <QDebug>
+
+#ifdef Q_OS_WIN
+#include <winsock2.h>
+#undef interface
+
+#ifndef NS_NLA
+#define NS_NLA 15
+#endif
+#endif
+
+BearerMonitor::BearerMonitor(QWidget *parent)
+: QWidget(parent)
+{
+ setupUi(this);
+ delete tabWidget->currentWidget();
+ sessionGroup->hide();
+#if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE)
+ setWindowState(Qt::WindowMaximized);
+#endif
+ updateConfigurations();
+
+ onlineStateChanged(!manager.allConfigurations(QNetworkConfiguration::Active).isEmpty());
+
+ QNetworkConfiguration defaultConfiguration = manager.defaultConfiguration();
+ for (int i = 0; i < treeWidget->topLevelItemCount(); ++i) {
+ QTreeWidgetItem *item = treeWidget->topLevelItem(i);
+
+ if (item->data(0, Qt::UserRole).toString() == defaultConfiguration.identifier()) {
+ treeWidget->setCurrentItem(item);
+ showConfigurationFor(item);
+ break;
+ }
+ }
+
+ connect(&manager, SIGNAL(configurationAdded(const QNetworkConfiguration&)),
+ this, SLOT(configurationAdded(const QNetworkConfiguration&)));
+ connect(&manager, SIGNAL(configurationRemoved(const QNetworkConfiguration&)),
+ this, SLOT(configurationRemoved(const QNetworkConfiguration&)));
+ connect(&manager, SIGNAL(configurationChanged(const QNetworkConfiguration&)),
+ this, SLOT(configurationChanged(const QNetworkConfiguration)));
+ connect(&manager, SIGNAL(updateCompleted()), this, SLOT(updateConfigurations()));
+ connect(&manager, SIGNAL(onlineStateChanged(bool)), this ,SLOT(onlineStateChanged(bool)));
+
+#ifdef Q_OS_WIN
+ connect(registerButton, SIGNAL(clicked()), this, SLOT(registerNetwork()));
+ connect(unregisterButton, SIGNAL(clicked()), this, SLOT(unregisterNetwork()));
+#else
+ nlaGroup->hide();
+#endif
+
+ connect(treeWidget, SIGNAL(itemActivated(QTreeWidgetItem*,int)),
+ this, SLOT(createSessionFor(QTreeWidgetItem*)));
+
+ connect(treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
+ this, SLOT(showConfigurationFor(QTreeWidgetItem*)));
+
+ connect(newSessionButton, SIGNAL(clicked()),
+ this, SLOT(createNewSession()));
+ connect(deleteSessionButton, SIGNAL(clicked()),
+ this, SLOT(deleteSession()));
+
+ connect(scanButton, SIGNAL(clicked()),
+ this, SLOT(performScan()));
+}
+
+BearerMonitor::~BearerMonitor()
+{
+}
+
+static void updateItem(QTreeWidgetItem *item, const QNetworkConfiguration &config)
+{
+ item->setText(0, config.name());
+ item->setData(0, Qt::UserRole, config.identifier());
+
+ QFont font = item->font(1);
+ font.setBold((config.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active);
+ item->setFont(0, font);
+}
+
+void BearerMonitor::configurationAdded(const QNetworkConfiguration &config, QTreeWidgetItem *parent)
+{
+ QTreeWidgetItem *item = new QTreeWidgetItem;
+ updateItem(item, config);
+
+ if (parent)
+ parent->addChild(item);
+ else
+ treeWidget->addTopLevelItem(item);
+
+ if (config.type() == QNetworkConfiguration::ServiceNetwork) {
+ foreach (const QNetworkConfiguration &child, config.children())
+ configurationAdded(child, item);
+ }
+}
+
+void BearerMonitor::configurationRemoved(const QNetworkConfiguration &config)
+{
+ for (int i = 0; i < treeWidget->topLevelItemCount(); ++i) {
+ QTreeWidgetItem *item = treeWidget->topLevelItem(i);
+
+ if (item->data(0, Qt::UserRole).toString() == config.identifier()) {
+ delete item;
+ break;
+ }
+ }
+}
+
+void BearerMonitor::configurationChanged(const QNetworkConfiguration &config)
+{
+ for (int i = 0; i < treeWidget->topLevelItemCount(); ++i) {
+ QTreeWidgetItem *item = treeWidget->topLevelItem(i);
+
+ if (item->data(0, Qt::UserRole).toString() == config.identifier()) {
+ updateItem(item, config);
+
+ if (config.type() == QNetworkConfiguration::ServiceNetwork)
+ updateSnapConfiguration(item, config);
+
+ if (item == treeWidget->currentItem())
+ showConfigurationFor(item);
+
+ break;
+ }
+ }
+}
+
+void BearerMonitor::updateSnapConfiguration(QTreeWidgetItem *parent, const QNetworkConfiguration &snap)
+{
+ QMap<QString, QTreeWidgetItem *> itemMap;
+ for (int i = 0; i < parent->childCount(); ++i) {
+ QTreeWidgetItem *item = parent->child(i);
+ itemMap.insert(item->data(0, Qt::UserRole).toString(), item);
+ }
+
+ QList<QNetworkConfiguration> allConfigurations = snap.children();
+
+ while (!allConfigurations.isEmpty()) {
+ QNetworkConfiguration config = allConfigurations.takeFirst();
+
+ QTreeWidgetItem *item = itemMap.take(config.identifier());
+ if (item) {
+ updateItem(item, config);
+
+ if (config.type() == QNetworkConfiguration::ServiceNetwork)
+ updateSnapConfiguration(item, config);
+ } else {
+ configurationAdded(config, parent);
+ }
+ }
+
+ foreach (const QString &id, itemMap.keys())
+ delete itemMap.value(id);
+
+ itemMap.clear();
+}
+
+void BearerMonitor::updateConfigurations()
+{
+ progressBar->hide();
+ scanButton->show();
+
+ QList<QTreeWidgetItem *> items = treeWidget->findItems(QLatin1String("*"), Qt::MatchWildcard);
+ QMap<QString, QTreeWidgetItem *> itemMap;
+ while (!items.isEmpty()) {
+ QTreeWidgetItem *item = items.takeFirst();
+ itemMap.insert(item->data(0, Qt::UserRole).toString(), item);
+ }
+
+ QList<QNetworkConfiguration> allConfigurations = manager.allConfigurations();
+
+ while (!allConfigurations.isEmpty()) {
+ QNetworkConfiguration config = allConfigurations.takeFirst();
+
+ QTreeWidgetItem *item = itemMap.take(config.identifier());
+ if (item) {
+ updateItem(item, config);
+
+ if (config.type() == QNetworkConfiguration::ServiceNetwork)
+ updateSnapConfiguration(item, config);
+ } else {
+ configurationAdded(config);
+ }
+ }
+
+ foreach (const QString &id, itemMap.keys())
+ delete itemMap.value(id);
+}
+
+void BearerMonitor::onlineStateChanged(bool isOnline)
+{
+ if (isOnline)
+ onlineState->setText(tr("Online"));
+ else
+ onlineState->setText(tr("Offline"));
+}
+
+#ifdef Q_OS_WIN
+void BearerMonitor::registerNetwork()
+{
+ QTreeWidgetItem *item = treeWidget->currentItem();
+
+ QNetworkConfiguration configuration =
+ manager.configurationFromIdentifier(item->data(0, Qt::UserRole).toString());
+
+ const QString name = configuration.name();
+
+ qDebug() << "Registering" << name << "with system";
+
+ WSAQUERYSET networkInfo;
+ memset(&networkInfo, 0, sizeof(networkInfo));
+ networkInfo.dwSize = sizeof(networkInfo);
+ networkInfo.lpszServiceInstanceName = (LPWSTR)name.utf16();
+ networkInfo.dwNameSpace = NS_NLA;
+
+ if (WSASetService(&networkInfo, RNRSERVICE_REGISTER, 0) == SOCKET_ERROR)
+ qDebug() << "WSASetService(RNRSERVICE_REGISTER) returned" << WSAGetLastError();
+}
+
+void BearerMonitor::unregisterNetwork()
+{
+ QTreeWidgetItem *item = treeWidget->currentItem();
+
+ QNetworkConfiguration configuration =
+ manager.configurationFromIdentifier(item->data(0, Qt::UserRole).toString());
+
+ const QString name = configuration.name();
+
+ qDebug() << "Unregistering" << name << "with system";
+
+ WSAQUERYSET networkInfo;
+ memset(&networkInfo, 0, sizeof(networkInfo));
+ networkInfo.dwSize = sizeof(networkInfo);
+ networkInfo.lpszServiceInstanceName = (LPWSTR)name.utf16();
+ networkInfo.dwNameSpace = NS_NLA;
+
+ if (WSASetService(&networkInfo, RNRSERVICE_DELETE, 0) == SOCKET_ERROR)
+ qDebug() << "WSASetService(RNRSERVICE_DELETE) returned" << WSAGetLastError();
+}
+#endif
+
+void BearerMonitor::showConfigurationFor(QTreeWidgetItem *item)
+{
+ QString identifier;
+
+ if (item)
+ identifier = item->data(0, Qt::UserRole).toString();
+
+ QNetworkConfiguration conf = manager.configurationFromIdentifier(identifier);
+
+ switch (conf.state()) {
+ case QNetworkConfiguration::Active:
+ configurationState->setText(tr("Active"));
+ break;
+ case QNetworkConfiguration::Discovered:
+ configurationState->setText(tr("Discovered"));
+ break;
+ case QNetworkConfiguration::Defined:
+ configurationState->setText(tr("Defined"));
+ break;
+ case QNetworkConfiguration::Undefined:
+ configurationState->setText(tr("Undefined"));
+ break;
+ default:
+ configurationState->setText(QString());
+ }
+
+ switch (conf.type()) {
+ case QNetworkConfiguration::InternetAccessPoint:
+ configurationType->setText(tr("Internet Access Point"));
+ break;
+ case QNetworkConfiguration::ServiceNetwork:
+ configurationType->setText(tr("Service Network"));
+ break;
+ case QNetworkConfiguration::UserChoice:
+ configurationType->setText(tr("User Choice"));
+ break;
+ case QNetworkConfiguration::Invalid:
+ configurationType->setText(tr("Invalid"));
+ break;
+ default:
+ configurationType->setText(QString());
+ }
+
+ switch (conf.purpose()) {
+ case QNetworkConfiguration::UnknownPurpose:
+ configurationPurpose->setText(tr("Unknown"));
+ break;
+ case QNetworkConfiguration::PublicPurpose:
+ configurationPurpose->setText(tr("Public"));
+ break;
+ case QNetworkConfiguration::PrivatePurpose:
+ configurationPurpose->setText(tr("Private"));
+ break;
+ case QNetworkConfiguration::ServiceSpecificPurpose:
+ configurationPurpose->setText(tr("Service Specific"));
+ break;
+ default:
+ configurationPurpose->setText(QString());
+ }
+
+ configurationIdentifier->setText(conf.identifier());
+
+ configurationRoaming->setText(conf.isRoamingAvailable() ? tr("Available") : tr("Not available"));
+
+ configurationChildren->setText(QString::number(conf.children().count()));
+
+ configurationName->setText(conf.name());
+}
+
+void BearerMonitor::createSessionFor(QTreeWidgetItem *item)
+{
+ const QString identifier = item->data(0, Qt::UserRole).toString();
+
+ QNetworkConfiguration conf = manager.configurationFromIdentifier(identifier);
+
+ SessionWidget *session = new SessionWidget(conf);
+
+ tabWidget->addTab(session, conf.name());
+
+ sessionGroup->show();
+
+ sessionWidgets.append(session);
+}
+
+void BearerMonitor::createNewSession()
+{
+ QTreeWidgetItem *item = treeWidget->currentItem();
+
+ createSessionFor(item);
+}
+
+void BearerMonitor::deleteSession()
+{
+ SessionWidget *session = qobject_cast<SessionWidget *>(tabWidget->currentWidget());
+ if (session) {
+ sessionWidgets.removeAll(session);
+
+ delete session;
+
+ if (tabWidget->count() == 0)
+ sessionGroup->hide();
+ }
+}
+
+void BearerMonitor::performScan()
+{
+ scanButton->hide();
+ progressBar->show();
+ manager.updateConfigurations();
+}
diff --git a/examples/network/bearermonitor/bearermonitor.h b/examples/network/bearermonitor/bearermonitor.h
new file mode 100644
index 0000000000..d7025dd327
--- /dev/null
+++ b/examples/network/bearermonitor/bearermonitor.h
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BEARERMONITOR_H
+#define BEARERMONITOR_H
+
+#include <qnetworkconfigmanager.h>
+#include <qnetworksession.h>
+#if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE)
+#include "ui_bearermonitor_240_320.h"
+#else
+#include "ui_bearermonitor_640_480.h"
+#endif
+
+QT_USE_NAMESPACE
+
+class SessionWidget;
+
+class BearerMonitor : public QWidget, public Ui_BearerMonitor
+{
+ Q_OBJECT
+
+public:
+ BearerMonitor(QWidget *parent = 0);
+ ~BearerMonitor();
+
+private slots:
+ void configurationAdded(const QNetworkConfiguration &config, QTreeWidgetItem *parent = 0);
+ void configurationRemoved(const QNetworkConfiguration &config);
+ void configurationChanged(const QNetworkConfiguration &config);
+ void updateSnapConfiguration(QTreeWidgetItem *parent, const QNetworkConfiguration &snap);
+ void updateConfigurations();
+
+ void onlineStateChanged(bool isOnline);
+
+#ifdef Q_OS_WIN
+ void registerNetwork();
+ void unregisterNetwork();
+#endif
+
+ void showConfigurationFor(QTreeWidgetItem *item);
+
+ void createSessionFor(QTreeWidgetItem *item);
+ void createNewSession();
+ void deleteSession();
+
+ void performScan();
+
+private:
+ QNetworkConfigurationManager manager;
+ QList<SessionWidget *> sessionWidgets;
+};
+
+#endif //BEARERMONITOR_H
diff --git a/examples/network/bearermonitor/bearermonitor.pro b/examples/network/bearermonitor/bearermonitor.pro
new file mode 100644
index 0000000000..4b86187442
--- /dev/null
+++ b/examples/network/bearermonitor/bearermonitor.pro
@@ -0,0 +1,26 @@
+HEADERS = sessionwidget.h \
+ bearermonitor.h
+
+SOURCES = main.cpp \
+ bearermonitor.cpp \
+ sessionwidget.cpp
+
+FORMS = bearermonitor_240_320.ui \
+ bearermonitor_640_480.ui \
+ sessionwidget.ui
+
+TARGET = bearermonitor
+
+QT = core gui network
+
+win32 {
+ !wince* {
+ LIBS += -lWs2_32
+ } else {
+ LIBS += -lWs2
+ }
+}
+
+CONFIG += console
+
+symbian:TARGET.CAPABILITY = NetworkServices ReadUserData
diff --git a/examples/network/bearermonitor/bearermonitor_240_320.ui b/examples/network/bearermonitor/bearermonitor_240_320.ui
new file mode 100644
index 0000000000..ce9c2d1d12
--- /dev/null
+++ b/examples/network/bearermonitor/bearermonitor_240_320.ui
@@ -0,0 +1,420 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>BearerMonitor</class>
+ <widget class="QWidget" name="BearerMonitor">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>240</width>
+ <height>320</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_5">
+ <item>
+ <widget class="QScrollArea" name="scrollArea">
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="widgetResizable">
+ <bool>true</bool>
+ </property>
+ <widget class="QWidget" name="scrollAreaWidgetContents">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>-274</y>
+ <width>206</width>
+ <height>576</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QGroupBox" name="systemState">
+ <property name="title">
+ <string>System State</string>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_4">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout" name="onlineStateLayout">
+ <item>
+ <widget class="QLabel" name="onlineStateLabel">
+ <property name="text">
+ <string>Online State:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="onlineState">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
+ <string>Configurations</string>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_9">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="configurationNameLayout">
+ <item>
+ <widget class="QLabel" name="configurationNameLabel">
+ <property name="text">
+ <string>Name:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationName">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationStateLayout">
+ <item>
+ <widget class="QLabel" name="configurationStateLabel">
+ <property name="text">
+ <string>State:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationState">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationTypeLayout">
+ <item>
+ <widget class="QLabel" name="configurationTypeLabel">
+ <property name="text">
+ <string>Type:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationType">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Invalid</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationPurposeLayout">
+ <item>
+ <widget class="QLabel" name="configurationPurposeLabel">
+ <property name="text">
+ <string>Purpose:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationPurpose">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Unknown</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationIdentifierLayout">
+ <item>
+ <widget class="QLabel" name="configurationIdentifierLabel">
+ <property name="text">
+ <string>Identifier:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationIdentifier">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationRoamingLayout">
+ <item>
+ <widget class="QLabel" name="configurationRoamingLabel">
+ <property name="text">
+ <string>Roaming:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationRoaming">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationChildrenLayout">
+ <item>
+ <widget class="QLabel" name="configurationChildrenLabel">
+ <property name="text">
+ <string>Children:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationChildren">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="nlaGroup">
+ <property name="title">
+ <string>Network Location Awareness</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QPushButton" name="registerButton">
+ <property name="text">
+ <string>Register</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="unregisterButton">
+ <property name="text">
+ <string>Unregister</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="newSessionButton">
+ <property name="text">
+ <string>New Session</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="deleteSessionButton">
+ <property name="text">
+ <string>Delete Session</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="scanButton">
+ <property name="text">
+ <string>Scan</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QProgressBar" name="progressBar">
+ <property name="maximum">
+ <number>0</number>
+ </property>
+ <property name="value">
+ <number>-1</number>
+ </property>
+ <property name="textVisible">
+ <bool>false</bool>
+ </property>
+ <property name="invertedAppearance">
+ <bool>false</bool>
+ </property>
+ <property name="format">
+ <string>%p%</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QTreeWidget" name="treeWidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="verticalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <attribute name="headerVisible">
+ <bool>false</bool>
+ </attribute>
+ <column>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </column>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="sessionGroup">
+ <property name="title">
+ <string>Sessions</string>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="tab">
+ <attribute name="title">
+ <string>Session 1</string>
+ </attribute>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/network/bearermonitor/bearermonitor_640_480.ui b/examples/network/bearermonitor/bearermonitor_640_480.ui
new file mode 100644
index 0000000000..941eaa0282
--- /dev/null
+++ b/examples/network/bearermonitor/bearermonitor_640_480.ui
@@ -0,0 +1,386 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>BearerMonitor</class>
+ <widget class="QWidget" name="BearerMonitor">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>640</width>
+ <height>515</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QGroupBox" name="systemState">
+ <property name="title">
+ <string>System State</string>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_4">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout" name="onlineStateLayout">
+ <item>
+ <widget class="QLabel" name="onlineStateLabel">
+ <property name="text">
+ <string>Online State:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="onlineState">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
+ <string>Configurations</string>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_9">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QTreeWidget" name="treeWidget">
+ <attribute name="headerVisible">
+ <bool>false</bool>
+ </attribute>
+ <column>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </column>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="configurationNameLayout">
+ <item>
+ <widget class="QLabel" name="configurationNameLabel">
+ <property name="text">
+ <string>Name:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationName">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationStateLayout">
+ <item>
+ <widget class="QLabel" name="configurationStateLabel">
+ <property name="text">
+ <string>State:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationState">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationTypeLayout">
+ <item>
+ <widget class="QLabel" name="configurationTypeLabel">
+ <property name="text">
+ <string>Type:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationType">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Invalid</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationPurposeLayout">
+ <item>
+ <widget class="QLabel" name="configurationPurposeLabel">
+ <property name="text">
+ <string>Purpose:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationPurpose">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Unknown</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationIdentifierLayout">
+ <item>
+ <widget class="QLabel" name="configurationIdentifierLabel">
+ <property name="text">
+ <string>Identifier:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationIdentifier">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationRoamingLayout">
+ <item>
+ <widget class="QLabel" name="configurationRoamingLabel">
+ <property name="text">
+ <string>Roaming:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationRoaming">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationChildrenLayout">
+ <item>
+ <widget class="QLabel" name="configurationChildrenLabel">
+ <property name="text">
+ <string>Children:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationChildren">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="nlaGroup">
+ <property name="title">
+ <string>Network Location Awareness</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QPushButton" name="registerButton">
+ <property name="text">
+ <string>Register</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="unregisterButton">
+ <property name="text">
+ <string>Unregister</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="newSessionButton">
+ <property name="text">
+ <string>New Session</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="deleteSessionButton">
+ <property name="text">
+ <string>Delete Session</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="scanButton">
+ <property name="text">
+ <string>Scan</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QProgressBar" name="progressBar">
+ <property name="maximum">
+ <number>0</number>
+ </property>
+ <property name="value">
+ <number>-1</number>
+ </property>
+ <property name="textVisible">
+ <bool>false</bool>
+ </property>
+ <property name="invertedAppearance">
+ <bool>false</bool>
+ </property>
+ <property name="format">
+ <string>%p%</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QGroupBox" name="sessionGroup">
+ <property name="title">
+ <string>Sessions</string>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="tab">
+ <attribute name="title">
+ <string>Session 1</string>
+ </attribute>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/network/bearermonitor/main.cpp b/examples/network/bearermonitor/main.cpp
new file mode 100644
index 0000000000..b7ac4feb96
--- /dev/null
+++ b/examples/network/bearermonitor/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "bearermonitor.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ BearerMonitor monitor;
+ monitor.show();
+
+ return app.exec();
+}
+
diff --git a/examples/network/bearermonitor/sessionwidget.cpp b/examples/network/bearermonitor/sessionwidget.cpp
new file mode 100644
index 0000000000..46ffb20d31
--- /dev/null
+++ b/examples/network/bearermonitor/sessionwidget.cpp
@@ -0,0 +1,177 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "sessionwidget.h"
+#include "qnetworkconfigmanager.h"
+
+SessionWidget::SessionWidget(const QNetworkConfiguration &config, QWidget *parent)
+: QWidget(parent), statsTimer(-1)
+{
+ setupUi(this);
+
+ session = new QNetworkSession(config, this);
+
+ connect(session, SIGNAL(stateChanged(QNetworkSession::State)),
+ this, SLOT(updateSession()));
+ connect(session, SIGNAL(error(QNetworkSession::SessionError)),
+ this, SLOT(updateSession()));
+
+ updateSession();
+
+ sessionId->setText(QString("0x%1").arg(qulonglong(session), 8, 16, QChar('0')));
+
+ configuration->setText(session->configuration().name());
+
+ connect(openSessionButton, SIGNAL(clicked()),
+ this, SLOT(openSession()));
+ connect(openSyncSessionButton, SIGNAL(clicked()),
+ this, SLOT(openSyncSession()));
+ connect(closeSessionButton, SIGNAL(clicked()),
+ this, SLOT(closeSession()));
+ connect(stopSessionButton, SIGNAL(clicked()),
+ this, SLOT(stopSession()));
+}
+
+SessionWidget::~SessionWidget()
+{
+ delete session;
+}
+
+void SessionWidget::timerEvent(QTimerEvent *e)
+{
+ if (e->timerId() == statsTimer) {
+ rxData->setText(QString::number(session->bytesReceived()));
+ txData->setText(QString::number(session->bytesWritten()));
+ activeTime->setText(QString::number(session->activeTime()));
+ }
+}
+
+void SessionWidget::updateSession()
+{
+ updateSessionState(session->state());
+ updateSessionError(session->error());
+
+ if (session->state() == QNetworkSession::Connected)
+ statsTimer = startTimer(1000);
+ else
+ killTimer(statsTimer);
+
+ if (session->configuration().type() == QNetworkConfiguration::InternetAccessPoint)
+ bearer->setText(session->configuration().bearerName());
+ else {
+ QNetworkConfigurationManager mgr;
+ QNetworkConfiguration c = mgr.configurationFromIdentifier(session->sessionProperty("ActiveConfiguration").toString());
+ bearer->setText(c.bearerName());
+ }
+
+ interfaceName->setText(session->interface().humanReadableName());
+ interfaceGuid->setText(session->interface().name());
+}
+
+void SessionWidget::openSession()
+{
+ session->open();
+ updateSession();
+}
+
+void SessionWidget::openSyncSession()
+{
+ session->open();
+ session->waitForOpened();
+ updateSession();
+}
+
+void SessionWidget::closeSession()
+{
+ session->close();
+ updateSession();
+}
+
+void SessionWidget::stopSession()
+{
+ session->stop();
+ updateSession();
+}
+
+void SessionWidget::updateSessionState(QNetworkSession::State state)
+{
+ QString s = tr("%1 (%2)");
+
+ switch (state) {
+ case QNetworkSession::Invalid:
+ s = s.arg(tr("Invalid"));
+ break;
+ case QNetworkSession::NotAvailable:
+ s = s.arg(tr("Not Available"));
+ break;
+ case QNetworkSession::Connecting:
+ s = s.arg(tr("Connecting"));
+ break;
+ case QNetworkSession::Connected:
+ s = s.arg(tr("Connected"));
+ break;
+ case QNetworkSession::Closing:
+ s = s.arg(tr("Closing"));
+ break;
+ case QNetworkSession::Disconnected:
+ s = s.arg(tr("Disconnected"));
+ break;
+ case QNetworkSession::Roaming:
+ s = s.arg(tr("Roaming"));
+ break;
+ default:
+ s = s.arg(tr("Unknown"));
+ }
+
+ if (session->isOpen())
+ s = s.arg(tr("Open"));
+ else
+ s = s.arg(tr("Closed"));
+
+ sessionState->setText(s);
+}
+
+void SessionWidget::updateSessionError(QNetworkSession::SessionError error)
+{
+ lastError->setText(QString::number(error));
+ errorString->setText(session->errorString());
+}
+
diff --git a/examples/network/bearermonitor/sessionwidget.h b/examples/network/bearermonitor/sessionwidget.h
new file mode 100644
index 0000000000..cc9c067335
--- /dev/null
+++ b/examples/network/bearermonitor/sessionwidget.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SESSIONWIDGET_H
+#define SESSIONWIDGET_H
+
+#include "ui_sessionwidget.h"
+
+#include <qnetworksession.h>
+
+QT_USE_NAMESPACE
+
+class SessionWidget : public QWidget, public Ui_SessionWidget
+{
+ Q_OBJECT
+
+public:
+ SessionWidget(const QNetworkConfiguration &config, QWidget *parent = 0);
+ ~SessionWidget();
+
+ void timerEvent(QTimerEvent *);
+
+private:
+ void updateSessionState(QNetworkSession::State state);
+ void updateSessionError(QNetworkSession::SessionError error);
+
+private Q_SLOTS:
+ void openSession();
+ void openSyncSession();
+ void closeSession();
+ void stopSession();
+ void updateSession();
+
+private:
+ QNetworkSession *session;
+ int statsTimer;
+};
+
+#endif
+
diff --git a/examples/network/bearermonitor/sessionwidget.ui b/examples/network/bearermonitor/sessionwidget.ui
new file mode 100644
index 0000000000..45135f543a
--- /dev/null
+++ b/examples/network/bearermonitor/sessionwidget.ui
@@ -0,0 +1,307 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SessionWidget</class>
+ <widget class="QWidget" name="SessionWidget">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>340</width>
+ <height>276</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="sessionIdLayout">
+ <item>
+ <widget class="QLabel" name="sessionIdLabel">
+ <property name="text">
+ <string>Session ID:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="sessionId">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="sessionStateLayout">
+ <item>
+ <widget class="QLabel" name="sessionStateLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Session State:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="sessionState">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Invalid</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationLayout">
+ <item>
+ <widget class="QLabel" name="configurationLabel">
+ <property name="text">
+ <string>Configuration:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configuration">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="bearerLayout">
+ <item>
+ <widget class="QLabel" name="bearerLabel">
+ <property name="text">
+ <string>Bearer:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="bearer">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="interfaceNameLayout">
+ <item>
+ <widget class="QLabel" name="interfaceNameLabel">
+ <property name="text">
+ <string>Interface Name:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="interfaceName">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="interfaceGuidLayout">
+ <item>
+ <widget class="QLabel" name="interfaceGuidLabel">
+ <property name="text">
+ <string>Interface GUID:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="interfaceGuid">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="lastErrorLayout">
+ <item>
+ <widget class="QLabel" name="lastErrorLabel">
+ <property name="text">
+ <string>Last Error:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="lastError">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="errorStringLayout">
+ <item>
+ <widget class="QLabel" name="errorStringLabel">
+ <property name="text">
+ <string>Error String</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="errorString">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QLabel" name="rxData">
+ <property name="text">
+ <string>0</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="txData">
+ <property name="text">
+ <string>0</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Active Time:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="activeTime">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>0 seconds</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QPushButton" name="openSessionButton">
+ <property name="text">
+ <string>Open</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="openSyncSessionButton">
+ <property name="text">
+ <string>Blocking Open</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QPushButton" name="closeSessionButton">
+ <property name="text">
+ <string>Close</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="stopSessionButton">
+ <property name="text">
+ <string>Stop</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/network/network.pro b/examples/network/network.pro
index c5a97fb62b..bd632b8b3c 100644
--- a/examples/network/network.pro
+++ b/examples/network/network.pro
@@ -11,7 +11,9 @@ SUBDIRS = blockingfortuneclient \
loopback \
threadedfortuneserver \
googlesuggest \
- torrent
+ torrent \
+ bearercloud \
+ bearermonitor
# no QProcess
!vxworks:!qnx:SUBDIRS += network-chat
diff --git a/examples/opengl/hellogl_es/cl_helper.h b/examples/opengl/hellogl_es/cl_helper.h
deleted file mode 100644
index 4f4c2bda5f..0000000000
--- a/examples/opengl/hellogl_es/cl_helper.h
+++ /dev/null
@@ -1,133 +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 examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifdef QT_OPENGL_ES_1_CL
-
-//! [0]
-#define FLOAT2X(f) ((int) ( (f) * (65536)))
-#define X2FLOAT(x) ((float)(x) / 65536.0f)
-
-#define f2vt(f) FLOAT2X(f)
-#define vt2f(x) X2FLOAT(x)
-
-#define q_vertexType GLfixed
-#define q_vertexTypeEnum GL_FIXED
-
-#define q_glFog glFogx
-#define q_glFogv glFogxv
-//! [0]
-
-#define q_glLight glLightx
-#define q_glLightv glLightxv
-#define q_glLightModel glLightModelx
-#define q_glLightModelv glLightModelxv
-
-#define q_glAlphaFunc glAlphaFuncx
-
-#define q_glMaterial glMaterialx
-#define q_glMaterialv glMaterialxv
-#define q_glColor4 glColor4x
-
-#define q_glTexParameter glTexParameterx
-#define q_glTexEnv glTexEnvx
-
-#define q_glOrtho glOrthox
-#define q_glFrustum glFrustumx
-
-#define q_glTranslate glTranslatex
-#define q_glScale glScalex
-#define q_glRotate glRotatex
-#define q_glLoadMatrix glLoadMatrixx
-
-#define q_glClearColor glClearColorx
-
-#define q_glMultMatrix glMultMatrixx
-
-#define q_glNormal3 glNormal3x
-
-#define q_glPolygonOffset glPolygonOffsetx
-#define q_glPointSize glPointSizex
-
-//! [1]
-#else
-
-#define f2vt(f) (f)
-#define vt2f(x) (x)
-
-#define q_vertexType GLfloat
-#define q_vertexTypeEnum GL_FLOAT
-
-#define q_glFog glFogf
-#define q_glFogv glFogfv
-//! [1]
-
-#define q_glLight glLightf
-#define q_glLightv glLightfv
-#define q_glLightModel glLightModelf
-#define q_glLightModelv glLightModelfv
-
-#define q_glAlphaFunc glAlphaFuncf
-
-#define q_glMaterial glMaterialf
-#define q_glMaterialv glMaterialfv
-#define q_glColor4 glColor4f
-
-#define q_glTexParameter glTexParameterf
-#define q_glTexEnv glTexEnvf
-
-#define q_glOrtho glOrthof
-#define q_glFrustum glFrustumf
-
-#define q_glTranslate glTranslatef
-#define q_glScale glScalef
-#define q_glRotate glRotatef
-#define q_glLoadMatrix glLoadMatrixf
-
-#define q_glClearColor glClearColor
-
-#define q_glMultMatrix glMultMatrixf
-
-#define q_glNormal3 glNormal3f
-
-#define q_glPolygonOffset glPolygonOffsetf
-#define q_glPointSize glPointSizef
-
-#endif
diff --git a/examples/opengl/hellogl_es/glwidget.cpp b/examples/opengl/hellogl_es/glwidget.cpp
index 9a45a11649..8a6543d7f8 100644
--- a/examples/opengl/hellogl_es/glwidget.cpp
+++ b/examples/opengl/hellogl_es/glwidget.cpp
@@ -44,7 +44,6 @@
#include <math.h>
#include "bubble.h"
-#include "cl_helper.h"
const int bubbleNum = 8;
@@ -114,9 +113,9 @@ void GLWidget::paintQtLogo()
{
glDisable(GL_TEXTURE_2D);
glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(3,q_vertexTypeEnum,0, createdVertices);
+ glVertexPointer(3,GL_FLOAT,0, createdVertices);
glEnableClientState(GL_NORMAL_ARRAY);
- glNormalPointer(q_vertexTypeEnum,0,createdNormals);
+ glNormalPointer(GL_FLOAT,0,createdNormals);
glDrawArrays(GL_TRIANGLES, 0, m_vertexNumber / 3);
}
//! [2]
@@ -125,83 +124,83 @@ void GLWidget::paintTexturedCube()
{
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, m_uiTexture);
- q_vertexType afVertices[] = {
- f2vt(-0.5), f2vt(0.5), f2vt(0.5), f2vt(0.5),f2vt(-0.5),f2vt(0.5),f2vt(-0.5),f2vt(-0.5),f2vt(0.5),
- f2vt(0.5), f2vt(-0.5), f2vt(0.5), f2vt(-0.5),f2vt(0.5),f2vt(0.5),f2vt(0.5),f2vt(0.5),f2vt(0.5),
- f2vt(-0.5), f2vt(-0.5), f2vt(-0.5), f2vt(0.5),f2vt(-0.5),f2vt(-0.5),f2vt(-0.5),f2vt(0.5),f2vt(-0.5),
- f2vt(0.5), f2vt(0.5), f2vt(-0.5), f2vt(-0.5),f2vt(0.5),f2vt(-0.5),f2vt(0.5),f2vt(-0.5),f2vt(-0.5),
-
- f2vt(0.5), f2vt(-0.5), f2vt(-0.5), f2vt(0.5),f2vt(-0.5),f2vt(0.5),f2vt(0.5),f2vt(0.5),f2vt(-0.5),
- f2vt(0.5), f2vt(0.5), f2vt(0.5), f2vt(0.5),f2vt(0.5),f2vt(-0.5),f2vt(0.5),f2vt(-0.5),f2vt(0.5),
- f2vt(-0.5), f2vt(0.5), f2vt(-0.5), f2vt(-0.5),f2vt(-0.5),f2vt(0.5),f2vt(-0.5),f2vt(-0.5),f2vt(-0.5),
- f2vt(-0.5), f2vt(-0.5), f2vt(0.5), f2vt(-0.5),f2vt(0.5),f2vt(-0.5),f2vt(-0.5),f2vt(0.5),f2vt(0.5),
-
- f2vt(0.5), f2vt(0.5), f2vt(-0.5), f2vt(-0.5), f2vt(0.5), f2vt(0.5), f2vt(-0.5), f2vt(0.5), f2vt(-0.5),
- f2vt(-0.5), f2vt(0.5), f2vt(0.5), f2vt(0.5), f2vt(0.5), f2vt(-0.5), f2vt(0.5), f2vt(0.5), f2vt(0.5),
- f2vt(-0.5), f2vt(-0.5), f2vt(-0.5), f2vt(-0.5), f2vt(-0.5), f2vt(0.5), f2vt(0.5), f2vt(-0.5), f2vt(-0.5),
- f2vt(0.5), f2vt(-0.5), f2vt(0.5), f2vt(0.5), f2vt(-0.5), f2vt(-0.5), f2vt(-0.5), f2vt(-0.5), f2vt(0.5)
+ GLfloat afVertices[] = {
+ -0.5, 0.5, 0.5, 0.5,-0.5,0.5,-0.5,-0.5,0.5,
+ 0.5, -0.5, 0.5, -0.5,0.5,0.5,0.5,0.5,0.5,
+ -0.5, -0.5, -0.5, 0.5,-0.5,-0.5,-0.5,0.5,-0.5,
+ 0.5, 0.5, -0.5, -0.5,0.5,-0.5,0.5,-0.5,-0.5,
+
+ 0.5, -0.5, -0.5, 0.5,-0.5,0.5,0.5,0.5,-0.5,
+ 0.5, 0.5, 0.5, 0.5,0.5,-0.5,0.5,-0.5,0.5,
+ -0.5, 0.5, -0.5, -0.5,-0.5,0.5,-0.5,-0.5,-0.5,
+ -0.5, -0.5, 0.5, -0.5,0.5,-0.5,-0.5,0.5,0.5,
+
+ 0.5, 0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, -0.5,
+ -0.5, 0.5, 0.5, 0.5, 0.5, -0.5, 0.5, 0.5, 0.5,
+ -0.5, -0.5, -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, -0.5,
+ 0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5, -0.5, 0.5
};
glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(3,q_vertexTypeEnum,0,afVertices);
-
- q_vertexType afTexCoord[] = {
- f2vt(0.0f),f2vt(0.0f), f2vt(1.0f),f2vt(1.0f), f2vt(1.0f),f2vt(0.0f),
- f2vt(1.0f),f2vt(1.0f), f2vt(0.0f),f2vt(0.0f), f2vt(0.0f),f2vt(1.0f),
- f2vt(1.0f),f2vt(1.0f), f2vt(1.0f),f2vt(0.0f), f2vt(0.0f),f2vt(1.0f),
- f2vt(0.0f),f2vt(0.0f), f2vt(0.0f),f2vt(1.0f), f2vt(1.0f),f2vt(0.0f),
-
- f2vt(1.0f),f2vt(1.0f), f2vt(1.0f),f2vt(0.0f), f2vt(0.0f),f2vt(1.0f),
- f2vt(0.0f),f2vt(0.0f), f2vt(0.0f),f2vt(1.0f), f2vt(1.0f),f2vt(0.0f),
- f2vt(0.0f),f2vt(0.0f), f2vt(1.0f),f2vt(1.0f), f2vt(1.0f),f2vt(0.0f),
- f2vt(1.0f),f2vt(1.0f), f2vt(0.0f),f2vt(0.0f), f2vt(0.0f),f2vt(1.0f),
-
- f2vt(0.0f),f2vt(1.0f), f2vt(1.0f),f2vt(0.0f), f2vt(1.0f),f2vt(1.0f),
- f2vt(1.0f),f2vt(0.0f), f2vt(0.0f),f2vt(1.0f), f2vt(0.0f),f2vt(0.0f),
- f2vt(1.0f),f2vt(0.0f), f2vt(1.0f),f2vt(1.0f), f2vt(0.0f),f2vt(0.0f),
- f2vt(0.0f),f2vt(1.0f), f2vt(0.0f),f2vt(0.0f), f2vt(1.0f),f2vt(1.0f)
+ glVertexPointer(3,GL_FLOAT,0,afVertices);
+
+ GLfloat afTexCoord[] = {
+ 0.0f,0.0f, 1.0f,1.0f, 1.0f,0.0f,
+ 1.0f,1.0f, 0.0f,0.0f, 0.0f,1.0f,
+ 1.0f,1.0f, 1.0f,0.0f, 0.0f,1.0f,
+ 0.0f,0.0f, 0.0f,1.0f, 1.0f,0.0f,
+
+ 1.0f,1.0f, 1.0f,0.0f, 0.0f,1.0f,
+ 0.0f,0.0f, 0.0f,1.0f, 1.0f,0.0f,
+ 0.0f,0.0f, 1.0f,1.0f, 1.0f,0.0f,
+ 1.0f,1.0f, 0.0f,0.0f, 0.0f,1.0f,
+
+ 0.0f,1.0f, 1.0f,0.0f, 1.0f,1.0f,
+ 1.0f,0.0f, 0.0f,1.0f, 0.0f,0.0f,
+ 1.0f,0.0f, 1.0f,1.0f, 0.0f,0.0f,
+ 0.0f,1.0f, 0.0f,0.0f, 1.0f,1.0f
};
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- glTexCoordPointer(2,q_vertexTypeEnum,0,afTexCoord);
+ glTexCoordPointer(2,GL_FLOAT,0,afTexCoord);
- q_vertexType afNormals[] = {
+ GLfloat afNormals[] = {
- f2vt(0),f2vt(0),f2vt(-1), f2vt(0),f2vt(0),f2vt(-1), f2vt(0),f2vt(0),f2vt(-1),
- f2vt(0),f2vt(0),f2vt(-1), f2vt(0),f2vt(0),f2vt(-1), f2vt(0),f2vt(0),f2vt(-1),
- f2vt(0),f2vt(0),f2vt(1), f2vt(0),f2vt(0),f2vt(1), f2vt(0),f2vt(0),f2vt(1),
- f2vt(0),f2vt(0),f2vt(1), f2vt(0),f2vt(0),f2vt(1), f2vt(0),f2vt(0),f2vt(1),
+ 0,0,-1, 0,0,-1, 0,0,-1,
+ 0,0,-1, 0,0,-1, 0,0,-1,
+ 0,0,1, 0,0,1, 0,0,1,
+ 0,0,1, 0,0,1, 0,0,1,
- f2vt(-1),f2vt(0),f2vt(0), f2vt(-1),f2vt(0),f2vt(0), f2vt(-1),f2vt(0),f2vt(0),
- f2vt(-1),f2vt(0),f2vt(0), f2vt(-1),f2vt(0),f2vt(0), f2vt(-1),f2vt(0),f2vt(0),
- f2vt(1),f2vt(0),f2vt(0), f2vt(1),f2vt(0),f2vt(0), f2vt(1),f2vt(0),f2vt(0),
- f2vt(1),f2vt(0),f2vt(0), f2vt(1),f2vt(0),f2vt(0), f2vt(1),f2vt(0),f2vt(0),
+ -1,0,0, -1,0,0, -1,0,0,
+ -1,0,0, -1,0,0, -1,0,0,
+ 1,0,0, 1,0,0, 1,0,0,
+ 1,0,0, 1,0,0, 1,0,0,
- f2vt(0),f2vt(-1),f2vt(0), f2vt(0),f2vt(-1),f2vt(0), f2vt(0),f2vt(-1),f2vt(0),
- f2vt(0),f2vt(-1),f2vt(0), f2vt(0),f2vt(-1),f2vt(0), f2vt(0),f2vt(-1),f2vt(0),
- f2vt(0),f2vt(1),f2vt(0), f2vt(0),f2vt(1),f2vt(0), f2vt(0),f2vt(1),f2vt(0),
- f2vt(0),f2vt(1),f2vt(0), f2vt(0),f2vt(1),f2vt(0), f2vt(0),f2vt(1),f2vt(0)
+ 0,-1,0, 0,-1,0, 0,-1,0,
+ 0,-1,0, 0,-1,0, 0,-1,0,
+ 0,1,0, 0,1,0, 0,1,0,
+ 0,1,0, 0,1,0, 0,1,0
};
glEnableClientState(GL_NORMAL_ARRAY);
- glNormalPointer(q_vertexTypeEnum,0,afNormals);
+ glNormalPointer(GL_FLOAT,0,afNormals);
glDrawArrays(GL_TRIANGLES, 0, 36);
}
void GLWidget::initializeGL ()
{
- q_glClearColor(f2vt(0.1f), f2vt(0.1f), f2vt(0.2f), f2vt(1.0f));
+ glClearColor(0.1f, 0.1f, 0.2f, 1.0f);
glEnable(GL_TEXTURE_2D);
glGenTextures(1, &m_uiTexture);
m_uiTexture = bindTexture(QImage(":/qt.png"));
- q_glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
- q_glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
- q_vertexType aLightPosition[] = {f2vt(0.0f),f2vt(0.3f),f2vt(1.0f),f2vt(0.0f)};
+ GLfloat aLightPosition[] = {0.0f,0.3f,1.0f,0.0f};
- q_glLightv(GL_LIGHT0, GL_SPOT_DIRECTION, aLightPosition);
+ glLightfv(GL_LIGHT0, GL_SPOT_DIRECTION, aLightPosition);
m_fAngle = 0;
m_fScale = 1;
createGeometry();
@@ -230,12 +229,12 @@ void GLWidget::paintGL()
//Since OpenGL ES does not support glPush/PopAttrib(GL_ALL_ATTRIB_BITS)
//we have to take care of the states ourselves
- q_glClearColor(f2vt(0.1f), f2vt(0.1f), f2vt(0.2f), f2vt(1.0f));
+ glClearColor(0.1f, 0.1f, 0.2f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glEnable(GL_TEXTURE_2D);
- q_glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
- q_glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
@@ -248,14 +247,14 @@ void GLWidget::paintGL()
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
- q_glRotate(f2vt(m_fAngle), f2vt(0.0), f2vt(1.0), f2vt(0.0));
- q_glRotate(f2vt(m_fAngle), f2vt(1.0), f2vt(0.0), f2vt(0.0));
- q_glRotate(f2vt(m_fAngle), f2vt(0.0), f2vt(0.0), f2vt(1.0));
- q_glScale(f2vt(m_fScale), f2vt(m_fScale),f2vt(m_fScale));
- q_glTranslate(f2vt(0),f2vt(-0.2),f2vt(0));
+ glRotatef(m_fAngle, 0.0f, 1.0f, 0.0f);
+ glRotatef(m_fAngle, 1.0f, 0.0f, 0.0f);
+ glRotatef(m_fAngle, 0.0f, 0.0f, 1.0f);
+ glScalef(m_fScale, m_fScale,m_fScale);
+ glTranslatef(0.0f,-0.2f,0.0f);
- q_vertexType matDiff[] = {f2vt(0.40), f2vt(1.0), f2vt(0.0), f2vt(1.0)};
- q_glMaterialv(GL_FRONT_AND_BACK, GL_DIFFUSE, matDiff);
+ GLfloat matDiff[] = {0.40f, 1.0f, 0.0f, 1.0f};
+ glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, matDiff);
if (qtLogo)
paintQtLogo();
@@ -376,11 +375,11 @@ void GLWidget::createGeometry()
//! [1]
m_vertexNumber = vertices.size();
- createdVertices = new q_vertexType[m_vertexNumber];
- createdNormals = new q_vertexType[m_vertexNumber];
+ createdVertices = new GLfloat[m_vertexNumber];
+ createdNormals = new GLfloat[m_vertexNumber];
for (int i = 0;i < m_vertexNumber;i++) {
- createdVertices[i] = f2vt(vertices.at(i) * 2);
- createdNormals[i] = f2vt(normals.at(i));
+ createdVertices[i] = vertices.at(i) * 2;
+ createdNormals[i] = normals.at(i);
}
vertices.clear();
normals.clear();
diff --git a/examples/opengl/hellogl_es/glwidget.h b/examples/opengl/hellogl_es/glwidget.h
index 7a8df530c5..3b2b5d42f7 100644
--- a/examples/opengl/hellogl_es/glwidget.h
+++ b/examples/opengl/hellogl_es/glwidget.h
@@ -45,7 +45,6 @@
#include <QGLWidget>
#include <QTime>
-#include "cl_helper.h"
class Bubble;
@@ -76,8 +75,8 @@ private:
void extrude(qreal x1, qreal y1, qreal x2, qreal y2);
QList<qreal> vertices;
QList<qreal> normals;
- q_vertexType *createdVertices;
- q_vertexType *createdNormals;
+ GLfloat *createdVertices;
+ GLfloat *createdNormals;
int m_vertexNumber;
bool qtLogo;
QList<Bubble*> bubbles;
diff --git a/examples/opengl/opengl.pro b/examples/opengl/opengl.pro
index eaac9b8924..c3fbc77e80 100644
--- a/examples/opengl/opengl.pro
+++ b/examples/opengl/opengl.pro
@@ -1,14 +1,12 @@
TEMPLATE = subdirs
-contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles1cl)|contains(QT_CONFIG, opengles2){
+contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2){
contains(QT_CONFIG, opengles2) {
SUBDIRS = hellogl_es2
} else {
SUBDIRS = hellogl_es
}
- !contains(QT_CONFIG, opengles1cl) {
- SUBDIRS += textures
- }
+ SUBDIRS += textures
contains(QT_CONFIG, opengles1) {
SUBDIRS += hellogl
}
diff --git a/examples/qtestlib/tutorial5/containers.cpp b/examples/qtestlib/tutorial5/containers.cpp
new file mode 100644
index 0000000000..fe68c85d0e
--- /dev/null
+++ b/examples/qtestlib/tutorial5/containers.cpp
@@ -0,0 +1,269 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+// This file contains benchmarks for comparing QVector against std::vector
+
+#include <QtCore>
+#include <QVector>
+#include <vector>
+
+#include <qtest.h>
+
+template <typename T> // T is the item type
+class UseCases {
+public:
+ virtual ~UseCases() {}
+
+ // Use case: Insert \a size items into the vector.
+ virtual void insert(int size) = 0;
+
+ // Use case: Lookup \a size items from the vector.
+ virtual void lookup(int size) = 0;
+};
+
+template <typename T>
+T * f(T *ts) // dummy function to prevent code from being optimized away by the compiler
+{
+ return ts;
+}
+
+// This subclass implements the use cases using QVector as efficiently as possible.
+template <typename T>
+class UseCases_QVector : public UseCases<T>
+{
+ void insert(int size)
+ {
+ QVector<T> v;
+ T t;
+ QBENCHMARK {
+ for (int i = 0; i < size; ++i)
+ v.append(t);
+ }
+ }
+
+ void lookup(int size)
+ {
+ QVector<T> v;
+
+ T t;
+ for (int i = 0; i < size; ++i)
+ v.append(t);
+
+ T *ts = new T[size];
+ QBENCHMARK {
+ for (int i = 0; i < size; ++i)
+ ts[i] = v.value(i);
+ }
+ f<T>(ts);
+ delete[] ts;
+ }
+};
+
+// This subclass implements the use cases using std::vector as efficiently as possible.
+template <typename T>
+class UseCases_stdvector : public UseCases<T>
+{
+ void insert(int size)
+ {
+ std::vector<T> v;
+ T t;
+ QBENCHMARK {
+ for (int i = 0; i < size; ++i)
+ v.push_back(t);
+ }
+ }
+
+ void lookup(int size)
+ {
+ std::vector<T> v;
+
+ T t;
+ for (int i = 0; i < size; ++i)
+ v.push_back(t);
+
+ T *ts = new T[size];
+ QBENCHMARK {
+ for (int i = 0; i < size; ++i)
+ ts[i] = v[i];
+ }
+ f<T>(ts);
+ delete[] ts;
+ }
+};
+
+struct Large { // A "large" item type
+ int x[1000];
+};
+
+// Symbian devices typically have limited memory
+#ifdef Q_OS_SYMBIAN
+# define LARGE_MAX_SIZE 2000
+#else
+# define LARGE_MAX_SIZE 20000
+#endif
+
+class tst_vector_vs_std : public QObject
+{
+ Q_OBJECT
+public:
+ tst_vector_vs_std()
+ {
+ useCases_QVector_int = new UseCases_QVector<int>;
+ useCases_stdvector_int = new UseCases_stdvector<int>;
+
+ useCases_QVector_Large = new UseCases_QVector<Large>;
+ useCases_stdvector_Large = new UseCases_stdvector<Large>;
+ }
+
+private:
+ UseCases<int> *useCases_QVector_int;
+ UseCases<int> *useCases_stdvector_int;
+ UseCases<Large> *useCases_QVector_Large;
+ UseCases<Large> *useCases_stdvector_Large;
+
+private slots:
+ void insert_int_data();
+ void insert_int();
+ void insert_Large_data();
+ void insert_Large();
+ void lookup_int_data();
+ void lookup_int();
+ void lookup_Large_data();
+ void lookup_Large();
+};
+
+void tst_vector_vs_std::insert_int_data()
+{
+ QTest::addColumn<bool>("useStd");
+ QTest::addColumn<int>("size");
+
+ for (int size = 10; size < 20000; size += 100) {
+ const QByteArray sizeString = QByteArray::number(size);
+ QTest::newRow(("std::vector-int--" + sizeString).constData()) << true << size;
+ QTest::newRow(("QVector-int--" + sizeString).constData()) << false << size;
+ }
+}
+
+void tst_vector_vs_std::insert_int()
+{
+ QFETCH(bool, useStd);
+ QFETCH(int, size);
+
+ if (useStd)
+ useCases_stdvector_int->insert(size);
+ else
+ useCases_QVector_int->insert(size);
+}
+
+void tst_vector_vs_std::insert_Large_data()
+{
+ QTest::addColumn<bool>("useStd");
+ QTest::addColumn<int>("size");
+
+ for (int size = 10; size < LARGE_MAX_SIZE; size += 100) {
+ const QByteArray sizeString = QByteArray::number(size);
+ QTest::newRow(("std::vector-Large--" + sizeString).constData()) << true << size;
+ QTest::newRow(("QVector-Large--" + sizeString).constData()) << false << size;
+ }
+}
+
+void tst_vector_vs_std::insert_Large()
+{
+ QFETCH(bool, useStd);
+ QFETCH(int, size);
+
+ if (useStd)
+ useCases_stdvector_Large->insert(size);
+ else
+ useCases_QVector_Large->insert(size);
+}
+
+//! [1]
+void tst_vector_vs_std::lookup_int_data()
+{
+ QTest::addColumn<bool>("useStd");
+ QTest::addColumn<int>("size");
+
+ for (int size = 10; size < 20000; size += 100) {
+ const QByteArray sizeString = QByteArray::number(size);
+ QTest::newRow(("std::vector-int--" + sizeString).constData()) << true << size;
+ QTest::newRow(("QVector-int--" + sizeString).constData()) << false << size;
+ }
+}
+//! [1]
+
+//! [2]
+void tst_vector_vs_std::lookup_int()
+{
+ QFETCH(bool, useStd);
+ QFETCH(int, size);
+
+ if (useStd)
+ useCases_stdvector_int->lookup(size); // Create a std::vector and run the benchmark.
+ else
+ useCases_QVector_int->lookup(size); // Create a QVector and run the benchmark.
+}
+//! [2]
+
+void tst_vector_vs_std::lookup_Large_data()
+{
+ QTest::addColumn<bool>("useStd");
+ QTest::addColumn<int>("size");
+
+ for (int size = 10; size < LARGE_MAX_SIZE; size += 100) {
+ const QByteArray sizeString = QByteArray::number(size);
+ QTest::newRow(("std::vector-Large--" + sizeString).constData()) << true << size;
+ QTest::newRow(("QVector-Large--" + sizeString).constData()) << false << size;
+ }
+}
+
+void tst_vector_vs_std::lookup_Large()
+{
+ QFETCH(bool, useStd);
+ QFETCH(int, size);
+
+ if (useStd)
+ useCases_stdvector_Large->lookup(size);
+ else
+ useCases_QVector_Large->lookup(size);
+}
+
+QTEST_MAIN(tst_vector_vs_std)
+#include "main.moc"
diff --git a/examples/qws/svgalib/README b/examples/qws/svgalib/README
index 0b2831f618..227c066f01 100644
--- a/examples/qws/svgalib/README
+++ b/examples/qws/svgalib/README
@@ -1,5 +1,9 @@
-This is the SVGA screen driver plugin example from Qt 4.4. The code does
-not compile with Qt 4.5, because the internal graphics engine has changed.
+This is the SVGA screen driver plugin example for QWS.
-This is unsupported code, provided for convenience in case there is
-interest in porting it to Qt 4.5.
+You may need to set the SVGALIB_DEFAULT_MODE environment
+variable. These values have been confirmed to work on one specific
+machine using svgalib 1.4.3: 18, 24, 34, 35, 36
+
+There is a bug in the example causing missing updates in 8-bit mode
+(e.g. modes 10 and 12). Fixing this bug is left as an exercise for the
+reader.
diff --git a/examples/qws/svgalib/svgalibpaintdevice.cpp b/examples/qws/svgalib/svgalibpaintdevice.cpp
index 090311fec3..86613d2e59 100644
--- a/examples/qws/svgalib/svgalibpaintdevice.cpp
+++ b/examples/qws/svgalib/svgalibpaintdevice.cpp
@@ -48,7 +48,7 @@
SvgalibPaintDevice::SvgalibPaintDevice(QWidget *w)
: QCustomRasterPaintDevice(w)
{
- pengine = new SvgalibPaintEngine;
+ pengine = new SvgalibPaintEngine(this);
}
SvgalibPaintDevice::~SvgalibPaintDevice()
diff --git a/examples/qws/svgalib/svgalibpaintengine.cpp b/examples/qws/svgalib/svgalibpaintengine.cpp
index 8713863084..59740da7e7 100644
--- a/examples/qws/svgalib/svgalibpaintengine.cpp
+++ b/examples/qws/svgalib/svgalibpaintengine.cpp
@@ -45,7 +45,8 @@
#include <vga.h>
#include <vgagl.h>
-SvgalibPaintEngine::SvgalibPaintEngine()
+SvgalibPaintEngine::SvgalibPaintEngine(QPaintDevice *device)
+ : QRasterPaintEngine(device)
{
}
@@ -61,7 +62,7 @@ bool SvgalibPaintEngine::begin(QPaintDevice *dev)
simplePen = true;
brush = Qt::NoBrush;
simpleBrush = true;
- matrix = QMatrix();
+ matrix = QTransform();
simpleMatrix = true;
setClip(QRect(0, 0, device->width(), device->height()));
opaque = true;
@@ -81,54 +82,52 @@ bool SvgalibPaintEngine::end()
//! [1]
//! [2]
-void SvgalibPaintEngine::updateState(const QPaintEngineState &state)
+void SvgalibPaintEngine::updateState()
{
- QPaintEngine::DirtyFlags flags = state.state();
+ QRasterPaintEngineState *s = state();
- if (flags & DirtyTransform) {
- matrix = state.matrix();
+ if (s->dirty & DirtyTransform) {
+ matrix = s->matrix;
simpleMatrix = (matrix.m12() == 0 && matrix.m21() == 0);
}
- if (flags & DirtyPen) {
- pen = state.pen();
+ if (s->dirty & DirtyPen) {
+ pen = s->pen;
simplePen = (pen.width() == 0 || pen.widthF() <= 1)
&& (pen.style() == Qt::NoPen || pen.style() == Qt::SolidLine)
&& (pen.color().alpha() == 255);
}
- if (flags & DirtyBrush) {
- brush = state.brush();
+ if (s->dirty & DirtyBrush) {
+ brush = s->brush;
simpleBrush = (brush.style() == Qt::SolidPattern
|| brush.style() == Qt::NoBrush)
&& (brush.color().alpha() == 255);
}
- if (flags & DirtyClipRegion)
- setClip(state.clipRegion());
+ if (s->dirty & DirtyClipRegion)
+ setClip(s->clipRegion);
- if (flags & DirtyClipEnabled) {
- clipEnabled = state.isClipEnabled();
+ if (s->dirty & DirtyClipEnabled) {
+ clipEnabled = s->isClipEnabled();
updateClip();
}
- if (flags & DirtyClipPath) {
+ if (s->dirty & DirtyClipPath) {
setClip(QRegion());
simpleClip = false;
}
- if (flags & DirtyCompositionMode) {
- const QPainter::CompositionMode m = state.compositionMode();
+ if (s->dirty & DirtyCompositionMode) {
+ const QPainter::CompositionMode m = s->composition_mode;
sourceOver = (m == QPainter::CompositionMode_SourceOver);
}
- if (flags & DirtyOpacity)
- opaque = (state.opacity() == 256);
+ if (s->dirty & DirtyOpacity)
+ opaque = (s->opacity == 256);
- if (flags & DirtyHints)
- aliased = !(state.renderHints() & QPainter::Antialiasing);
-
- QRasterPaintEngine::updateState(state);
+ if (s->dirty & DirtyHints)
+ aliased = !(s->flags.antialiased);
}
//! [2]
diff --git a/examples/qws/svgalib/svgalibpaintengine.h b/examples/qws/svgalib/svgalibpaintengine.h
index f43d201d2e..27b77eea3c 100644
--- a/examples/qws/svgalib/svgalibpaintengine.h
+++ b/examples/qws/svgalib/svgalibpaintengine.h
@@ -48,12 +48,12 @@
class SvgalibPaintEngine : public QRasterPaintEngine
{
public:
- SvgalibPaintEngine();
+ SvgalibPaintEngine(QPaintDevice *device);
~SvgalibPaintEngine();
bool begin(QPaintDevice *device);
bool end();
- void updateState(const QPaintEngineState &state);
+ void updateState();
void drawRects(const QRect *rects, int rectCount);
private:
@@ -64,7 +64,7 @@ private:
bool simplePen;
QBrush brush;
bool simpleBrush;
- QMatrix matrix;
+ QTransform matrix;
bool simpleMatrix;
QRegion clip;
bool clipEnabled;
diff --git a/examples/threads/waitconditions/waitconditions.pro b/examples/threads/waitconditions/waitconditions.pro
index b07b413ce0..c2be6cda57 100644
--- a/examples/threads/waitconditions/waitconditions.pro
+++ b/examples/threads/waitconditions/waitconditions.pro
@@ -10,8 +10,6 @@ INCLUDEPATH += .
# Input
SOURCES += waitconditions.cpp
CONFIG += qt warn_on create_prl link_prl console
-OBJECTS_DIR=obj/debug-shared
-MOC_DIR=moc/debug-shared
# install
target.path = $$[QT_INSTALL_EXAMPLES]/threads/waitconditions
diff --git a/examples/tools/completer/completer.pro b/examples/tools/completer/completer.pro
index 96d3734819..14521b2b0d 100644
--- a/examples/tools/completer/completer.pro
+++ b/examples/tools/completer/completer.pro
@@ -1,6 +1,6 @@
-HEADERS = dirmodel.h \
+HEADERS = fsmodel.h \
mainwindow.h
-SOURCES = dirmodel.cpp \
+SOURCES = fsmodel.cpp \
main.cpp \
mainwindow.cpp
RESOURCES = completer.qrc
diff --git a/examples/tools/completer/dirmodel.cpp b/examples/tools/completer/dirmodel.cpp
deleted file mode 100644
index 6279547aec..0000000000
--- a/examples/tools/completer/dirmodel.cpp
+++ /dev/null
@@ -1,63 +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 examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "dirmodel.h"
-
-//! [0]
-DirModel::DirModel(QObject *parent)
- : QDirModel(parent)
-{
-}
-//! [0]
-
-//! [1]
-QVariant DirModel::data(const QModelIndex &index, int role) const
-{
- if (role == Qt::DisplayRole && index.column() == 0) {
- QString path = QDir::toNativeSeparators(filePath(index));
- if (path.endsWith(QDir::separator()))
- path.chop(1);
- return path;
- }
-
- return QDirModel::data(index, role);
-}
-//! [1]
diff --git a/examples/tools/completer/dirmodel.h b/examples/tools/completer/dirmodel.h
deleted file mode 100644
index 5fbb4a2824..0000000000
--- a/examples/tools/completer/dirmodel.h
+++ /dev/null
@@ -1,61 +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 examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef DIRMODEL_H
-#define DIRMODEL_H
-
-#include <QDirModel>
-
-// With a QDirModel, set on a view, you will see "Program Files" in the view
-// But with this model, you will see "C:\Program Files" in the view.
-// We acheive this, by having the data() return the entire file path for
-// the display role. Note that the Qt::EditRole over which the QCompleter
-// looks for matches is left unchanged
-//! [0]
-class DirModel : public QDirModel
-{
-public:
- DirModel(QObject *parent = 0);
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
-};
-//! [0]
-
-#endif
diff --git a/examples/tools/completer/fsmodel.cpp b/examples/tools/completer/fsmodel.cpp
new file mode 100644
index 0000000000..9a5a772116
--- /dev/null
+++ b/examples/tools/completer/fsmodel.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "fsmodel.h"
+
+//! [0]
+FileSystemModel::FileSystemModel(QObject *parent)
+ : QFileSystemModel(parent)
+{
+}
+//! [0]
+
+//! [1]
+QVariant FileSystemModel::data(const QModelIndex &index, int role) const
+{
+ if (role == Qt::DisplayRole && index.column() == 0) {
+ QString path = QDir::toNativeSeparators(filePath(index));
+ if (path.endsWith(QDir::separator()))
+ path.chop(1);
+ return path;
+ }
+
+ return QFileSystemModel::data(index, role);
+}
+
+//! [1]
diff --git a/examples/tools/completer/fsmodel.h b/examples/tools/completer/fsmodel.h
new file mode 100644
index 0000000000..0ec9ce96f8
--- /dev/null
+++ b/examples/tools/completer/fsmodel.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FILESYSTEMMODEL_H
+#define FILESYSTEMMODEL_H
+
+#include <QFileSystemModel>
+
+// With a QFileSystemModel, set on a view, you will see "Program Files" in the view
+// But with this model, you will see "C:\Program Files" in the view.
+// We acheive this, by having the data() return the entire file path for
+// the display role. Note that the Qt::EditRole over which the QCompleter
+// looks for matches is left unchanged
+//! [0]
+class FileSystemModel : public QFileSystemModel
+{
+public:
+ FileSystemModel(QObject *parent = 0);
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+};
+//! [0]
+
+#endif
diff --git a/examples/tools/completer/mainwindow.cpp b/examples/tools/completer/mainwindow.cpp
index f386497183..b1f6759153 100644
--- a/examples/tools/completer/mainwindow.cpp
+++ b/examples/tools/completer/mainwindow.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include <QtGui>
-#include "dirmodel.h"
+#include "fsmodel.h"
#include "mainwindow.h"
//! [0]
@@ -55,8 +55,8 @@ MainWindow::MainWindow(QWidget *parent)
modelLabel->setText(tr("Model"));
modelCombo = new QComboBox;
- modelCombo->addItem(tr("QDirModel"));
- modelCombo->addItem(tr("QDirModel that shows full path"));
+ modelCombo->addItem(tr("QFileSytemModel"));
+ modelCombo->addItem(tr("QFileSytemModel that shows full path"));
modelCombo->addItem(tr("Country list"));
modelCombo->addItem(tr("Word list"));
modelCombo->setCurrentIndex(0);
@@ -218,17 +218,19 @@ void MainWindow::changeModel()
switch (modelCombo->currentIndex()) {
default:
case 0:
- { // Unsorted QDirModel
- QDirModel *dirModel = new QDirModel(completer);
- completer->setModel(dirModel);
+ { // Unsorted QFileSystemModel
+ QFileSystemModel *fsModel = new QFileSystemModel(completer);
+ fsModel->setRootPath("");
+ completer->setModel(fsModel);
contentsLabel->setText(tr("Enter file path"));
}
break;
//! [11] //! [12]
case 1:
- { // DirModel that shows full paths
- DirModel *dirModel = new DirModel(completer);
- completer->setModel(dirModel);
+ { // FileSystemModel that shows full paths
+ FileSystemModel *fsModel = new FileSystemModel(completer);
+ completer->setModel(fsModel);
+ fsModel->setRootPath("");
contentsLabel->setText(tr("Enter file path"));
}
break;
diff --git a/examples/tutorials/addressbook/part3/addressbook.cpp b/examples/tutorials/addressbook/part3/addressbook.cpp
index 59b297a27c..5b391590f9 100644
--- a/examples/tutorials/addressbook/part3/addressbook.cpp
+++ b/examples/tutorials/addressbook/part3/addressbook.cpp
@@ -91,7 +91,7 @@ AddressBook::AddressBook(QWidget *parent)
mainLayout->addWidget(addressText, 1, 1);
mainLayout->addLayout(buttonLayout1, 1, 2);
//! [adding navigation layout]
- mainLayout->addLayout(buttonLayout2, 3, 1);
+ mainLayout->addLayout(buttonLayout2, 2, 1);
//! [adding navigation layout]
setLayout(mainLayout);
setWindowTitle(tr("Simple Address Book"));
diff --git a/examples/tutorials/addressbook/part4/addressbook.cpp b/examples/tutorials/addressbook/part4/addressbook.cpp
index e4e451f193..a4bf4593f8 100644
--- a/examples/tutorials/addressbook/part4/addressbook.cpp
+++ b/examples/tutorials/addressbook/part4/addressbook.cpp
@@ -100,7 +100,7 @@ AddressBook::AddressBook(QWidget *parent)
mainLayout->addWidget(addressLabel, 1, 0, Qt::AlignTop);
mainLayout->addWidget(addressText, 1, 1);
mainLayout->addLayout(buttonLayout1, 1, 2);
- mainLayout->addLayout(buttonLayout2, 3, 1);
+ mainLayout->addLayout(buttonLayout2, 2, 1);
setLayout(mainLayout);
setWindowTitle(tr("Simple Address Book"));
diff --git a/examples/webkit/fancybrowser/main.cpp b/examples/webkit/fancybrowser/main.cpp
index cf98b5128f..23f97130eb 100644
--- a/examples/webkit/fancybrowser/main.cpp
+++ b/examples/webkit/fancybrowser/main.cpp
@@ -45,7 +45,12 @@
int main(int argc, char * argv[])
{
QApplication app(argc, argv);
- MainWindow browser;
- browser.show();
+ QUrl url;
+ if (argc > 1)
+ url = QUrl(argv[1]);
+ else
+ url = QUrl("http://www.google.com/ncr");
+ MainWindow *browser = new MainWindow(url);
+ browser->show();
return app.exec();
}
diff --git a/examples/webkit/fancybrowser/mainwindow.cpp b/examples/webkit/fancybrowser/mainwindow.cpp
index 852d981e2b..649983139e 100644
--- a/examples/webkit/fancybrowser/mainwindow.cpp
+++ b/examples/webkit/fancybrowser/mainwindow.cpp
@@ -45,7 +45,7 @@
//! [1]
-MainWindow::MainWindow()
+MainWindow::MainWindow(const QUrl& url)
{
progress = 0;
@@ -60,7 +60,7 @@ MainWindow::MainWindow()
//! [2]
view = new QWebView(this);
- view->load(QUrl("http://www.google.com/ncr"));
+ view->load(url);
connect(view, SIGNAL(loadFinished(bool)), SLOT(adjustLocation()));
connect(view, SIGNAL(titleChanged(QString)), SLOT(adjustTitle()));
connect(view, SIGNAL(loadProgress(int)), SLOT(setProgress(int)));
@@ -78,6 +78,11 @@ MainWindow::MainWindow()
toolBar->addWidget(locationEdit);
//! [2]
+ QMenu *viewMenu = menuBar()->addMenu(tr("&View"));
+ QAction* viewSourceAction = new QAction("Page Source", this);
+ connect(viewSourceAction, SIGNAL(triggered()), SLOT(viewSource()));
+ viewMenu->addAction(viewSourceAction);
+
//! [3]
QMenu *effectMenu = menuBar()->addMenu(tr("&Effect"));
effectMenu->addAction("Highlight all links", this, SLOT(highlightAllLinks()));
@@ -100,6 +105,24 @@ MainWindow::MainWindow()
}
//! [3]
+void MainWindow::viewSource()
+{
+ QNetworkAccessManager* accessManager = view->page()->networkAccessManager();
+ QNetworkRequest request(view->url());
+ QNetworkReply* reply = accessManager->get(request);
+ connect(reply, SIGNAL(finished()), this, SLOT(slotSourceDownloaded()));
+}
+
+void MainWindow::slotSourceDownloaded()
+{
+ QNetworkReply* reply = qobject_cast<QNetworkReply*>(const_cast<QObject*>(sender()));
+ QTextEdit* textEdit = new QTextEdit(NULL);
+ textEdit->setAttribute(Qt::WA_DeleteOnClose);
+ textEdit->show();
+ textEdit->setPlainText(reply->readAll());
+ reply->deleteLater();
+}
+
//! [4]
void MainWindow::adjustLocation()
{
diff --git a/examples/webkit/fancybrowser/mainwindow.h b/examples/webkit/fancybrowser/mainwindow.h
index 08439c1f37..d3f8e7ebf1 100644
--- a/examples/webkit/fancybrowser/mainwindow.h
+++ b/examples/webkit/fancybrowser/mainwindow.h
@@ -52,7 +52,7 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
- MainWindow();
+ MainWindow(const QUrl& url);
protected slots:
@@ -62,6 +62,9 @@ protected slots:
void setProgress(int p);
void finishLoading(bool);
+ void viewSource();
+ void slotSourceDownloaded();
+
void highlightAllLinks();
void rotateImages(bool invert);
void removeGifImages();
diff --git a/mkspecs/aix-g++-64/qmake.conf b/mkspecs/aix-g++-64/qmake.conf
index 995178bb52..d9d9c38a58 100644
--- a/mkspecs/aix-g++-64/qmake.conf
+++ b/mkspecs/aix-g++-64/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/aix-g++-64/qplatformdefs.h b/mkspecs/aix-g++-64/qplatformdefs.h
index ecc2cf0196..d32f99469c 100644
--- a/mkspecs/aix-g++-64/qplatformdefs.h
+++ b/mkspecs/aix-g++-64/qplatformdefs.h
@@ -42,131 +42,6 @@
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-#include <unistd.h>
-
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-
-// uncomment if you have problems with <sys/proc.h> because your gcc
-// hasn't been built on exactly the same OS version your are using now.
-// typedef int crid_t;
-// typedef unsigned int class_id_t;
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-#include <dlfcn.h>
-#include <strings.h> // AIX X11 headers define FD_ZERO using bzero()
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/ipc.h>
-#include <sys/time.h>
-#include <sys/select.h>
-#include <sys/shm.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <netinet/in.h>
-#ifndef QT_NO_IPV6IFNAME
-#include <net/if.h>
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#ifdef _AIX43
-// AIX 4.3 and better
-#define QT_SOCKLEN_T socklen_t
-#elif _AIX42
-// AIX 4.2
-#define QT_SOCKLEN_T size_t
-#else
-// AIX 4.1
-#define QT_SOCKLEN_T size_t
-// override
-#define QT_SOCKOPTLEN_T int
-#endif
-
-#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-// AIX 4.3 and better
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-#endif
+#include "../common/aix/qplatformdefs.h"
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/aix-g++/qmake.conf b/mkspecs/aix-g++/qmake.conf
index 969aa76699..5fc4c17633 100644
--- a/mkspecs/aix-g++/qmake.conf
+++ b/mkspecs/aix-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/aix-g++/qplatformdefs.h b/mkspecs/aix-g++/qplatformdefs.h
index ecc2cf0196..d32f99469c 100644
--- a/mkspecs/aix-g++/qplatformdefs.h
+++ b/mkspecs/aix-g++/qplatformdefs.h
@@ -42,131 +42,6 @@
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-#include <unistd.h>
-
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-
-// uncomment if you have problems with <sys/proc.h> because your gcc
-// hasn't been built on exactly the same OS version your are using now.
-// typedef int crid_t;
-// typedef unsigned int class_id_t;
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-#include <dlfcn.h>
-#include <strings.h> // AIX X11 headers define FD_ZERO using bzero()
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/ipc.h>
-#include <sys/time.h>
-#include <sys/select.h>
-#include <sys/shm.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <netinet/in.h>
-#ifndef QT_NO_IPV6IFNAME
-#include <net/if.h>
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#ifdef _AIX43
-// AIX 4.3 and better
-#define QT_SOCKLEN_T socklen_t
-#elif _AIX42
-// AIX 4.2
-#define QT_SOCKLEN_T size_t
-#else
-// AIX 4.1
-#define QT_SOCKLEN_T size_t
-// override
-#define QT_SOCKOPTLEN_T int
-#endif
-
-#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-// AIX 4.3 and better
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-#endif
+#include "../common/aix/qplatformdefs.h"
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/aix-xlc-64/qmake.conf b/mkspecs/aix-xlc-64/qmake.conf
index a18aa9fed5..c67bd0b334 100644
--- a/mkspecs/aix-xlc-64/qmake.conf
+++ b/mkspecs/aix-xlc-64/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/aix-xlc-64/qplatformdefs.h b/mkspecs/aix-xlc-64/qplatformdefs.h
index 2ed08795c0..d32f99469c 100644
--- a/mkspecs/aix-xlc-64/qplatformdefs.h
+++ b/mkspecs/aix-xlc-64/qplatformdefs.h
@@ -42,117 +42,6 @@
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-#include <unistd.h>
-
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-#include <dlfcn.h>
-#include <strings.h> // AIX X11 headers define FD_ZERO using bzero()
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/ipc.h>
-#include <sys/time.h>
-#include <sys/select.h>
-#include <sys/shm.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <netinet/in.h>
-#ifndef QT_NO_IPV6IFNAME
-#include <net/if.h>
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-// Only AIX 4.3 and better support 64-bit
-#define QT_SOCKLEN_T socklen_t
-
-#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-// Only AIX 4.3 and better support 64-bit
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-#endif
+#include "../common/aix/qplatformdefs.h"
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/aix-xlc/qmake.conf b/mkspecs/aix-xlc/qmake.conf
index 42f6f7e50a..e81fb661c6 100644
--- a/mkspecs/aix-xlc/qmake.conf
+++ b/mkspecs/aix-xlc/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/aix-xlc/qplatformdefs.h b/mkspecs/aix-xlc/qplatformdefs.h
index 435fc40264..d32f99469c 100644
--- a/mkspecs/aix-xlc/qplatformdefs.h
+++ b/mkspecs/aix-xlc/qplatformdefs.h
@@ -42,127 +42,6 @@
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-#include <unistd.h>
-
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-#include <dlfcn.h>
-#include <strings.h> // AIX X11 headers define FD_ZERO using bzero()
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/ipc.h>
-#include <sys/time.h>
-#include <sys/select.h>
-#include <sys/shm.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <netinet/in.h>
-#ifndef QT_NO_IPV6IFNAME
-#include <net/if.h>
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#ifdef _AIX43
-// AIX 4.3 and better
-#define QT_SOCKLEN_T socklen_t
-#elif _AIX42
-// AIX 4.2
-#define QT_SOCKLEN_T size_t
-#else
-// AIX 4.1
-#define QT_SOCKLEN_T size_t
-// override
-#define QT_SOCKOPTLEN_T int
-#endif
-
-#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500)
-// AIX 4.3 and better
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-#endif
+#include "../common/aix/qplatformdefs.h"
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/common/aix/qplatformdefs.h b/mkspecs/common/aix/qplatformdefs.h
new file mode 100644
index 0000000000..b3abf68b4d
--- /dev/null
+++ b/mkspecs/common/aix/qplatformdefs.h
@@ -0,0 +1,120 @@
+/****************************************************************************
+**
+** 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 qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef Q_AIX_QPLATFORMDEFS_H
+#define Q_AIX_QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+// uncomment if you have problems with <sys/proc.h> because your gcc
+// hasn't been built on exactly the same OS version your are using now.
+// typedef int crid_t;
+// typedef unsigned int class_id_t;
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+#include <strings.h> // AIX X11 headers define FD_ZERO using bzero()
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/select.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+// Only AIX 4.3 and better support 64-bit
+
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../posix/qplatformdefs.h"
+
+#undef QT_SOCKLEN_T
+
+#ifdef _AIX43
+// AIX 4.3 and better
+#define QT_SOCKLEN_T socklen_t
+#elif _AIX42
+// AIX 4.2
+#define QT_SOCKLEN_T size_t
+#else
+// AIX 4.1
+#define QT_SOCKLEN_T size_t
+// override
+#define QT_SOCKOPTLEN_T int
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#undef QT_DIR
+#undef QT_OPENDIR
+#undef QT_CLOSEDIR
+
+#define QT_DIR DIR64
+#define QT_OPENDIR ::opendir64
+#define QT_CLOSEDIR ::closedir64
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500)
+// AIX 4.3 and better
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+#endif // include guard
diff --git a/mkspecs/common/c89/qplatformdefs.h b/mkspecs/common/c89/qplatformdefs.h
new file mode 100644
index 0000000000..c6a8e14e20
--- /dev/null
+++ b/mkspecs/common/c89/qplatformdefs.h
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** 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 qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef Q_C89_QPLATFORMDEFS_H
+#define Q_C89_QPLATFORMDEFS_H
+
+// #include <stdio.h>
+
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+
+#endif // include guard
diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf
index 1ae560808a..4fbe2dcab5 100644
--- a/mkspecs/common/linux.conf
+++ b/mkspecs/common/linux.conf
@@ -15,8 +15,6 @@ QMAKE_INCDIR_OPENGL = /usr/X11R6/include
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL
-QMAKE_INCDIR_OPENGL_ES1CL = $$QMAKE_INCDIR_OPENGL
-QMAKE_LIBDIR_OPENGL_ES1CL = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_EGL =
@@ -33,7 +31,6 @@ QMAKE_LIBS_EGL = -lEGL
QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_OPENGL_ES1 = -lGLES_CM
-QMAKE_LIBS_OPENGL_ES1CL = -lGLES_CL
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
QMAKE_LIBS_OPENVG = -lOpenVG
QMAKE_LIBS_THREAD = -lpthread
diff --git a/mkspecs/common/posix/qplatformdefs.h b/mkspecs/common/posix/qplatformdefs.h
new file mode 100644
index 0000000000..631025757c
--- /dev/null
+++ b/mkspecs/common/posix/qplatformdefs.h
@@ -0,0 +1,162 @@
+/****************************************************************************
+**
+** 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 qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef Q_POSIX_QPLATFORMDEFS_H
+#define Q_POSIX_QPLATFORMDEFS_H
+
+#include <signal.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+
+#if defined(QT_USE_XOPEN_LFS_EXTENSIONS) && defined(QT_LARGEFILE_SUPPORT)
+
+#define QT_STATBUF struct stat64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+
+#define QT_STAT ::stat64
+#define QT_LSTAT ::lstat64
+#define QT_TRUNCATE ::truncate64
+
+// File I/O
+#define QT_OPEN ::open64
+#define QT_LSEEK ::lseek64
+#define QT_FSTAT ::fstat64
+#define QT_FTRUNCATE ::ftruncate64
+
+// Standard C89
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+
+#define QT_MMAP ::mmap64
+
+#else // !defined(QT_USE_XOPEN_LFS_EXTENSIONS) || !defined(QT_LARGEFILE_SUPPORT)
+
+#include "../c89/qplatformdefs.h"
+
+#define QT_STATBUF struct stat
+
+#define QT_STAT ::stat
+#define QT_LSTAT ::lstat
+#define QT_TRUNCATE ::truncate
+
+// File I/O
+#define QT_OPEN ::open
+#define QT_LSEEK ::lseek
+#define QT_FSTAT ::fstat
+#define QT_FTRUNCATE ::ftruncate
+
+// Posix extensions to C89
+#if !defined(QT_USE_XOPEN_LFS_EXTENSIONS) && !defined(QT_NO_USE_FSEEKO)
+#undef QT_OFF_T
+#undef QT_FSEEK
+#undef QT_FTELL
+
+#define QT_OFF_T off_t
+
+#define QT_FSEEK ::fseeko
+#define QT_FTELL ::ftello
+#endif
+
+#define QT_MMAP ::mmap
+
+#endif // !defined (QT_USE_XOPEN_LFS_EXTENSIONS) || !defined(QT_LARGEFILE_SUPPORT)
+
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_LNK S_IFLNK
+
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+
+// File I/O
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+// Posix extensions to C89
+#define QT_FILENO fileno
+
+// Directory iteration
+#define QT_DIR DIR
+
+#define QT_OPENDIR ::opendir
+#define QT_CLOSEDIR ::closedir
+
+#if defined(QT_LARGEFILE_SUPPORT) \
+ && defined(QT_USE_XOPEN_LFS_EXTENSIONS) \
+ && !defined(QT_NO_READDIR64)
+#define QT_DIRENT struct dirent64
+#define QT_READDIR ::readdir64
+#define QT_READDIR_R ::readdir64_r
+#else
+#define QT_DIRENT struct dirent
+#define QT_READDIR ::readdir
+#define QT_READDIR_R ::readdir_r
+#endif
+
+#define QT_SOCKLEN_T socklen_t
+
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#endif // include guard
diff --git a/mkspecs/common/qws.conf b/mkspecs/common/qws.conf
index 0242db4c4a..96341a7a83 100644
--- a/mkspecs/common/qws.conf
+++ b/mkspecs/common/qws.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
QT += core gui network
diff --git a/mkspecs/common/symbian/qplatformdefs.h b/mkspecs/common/symbian/qplatformdefs.h
index c8a336be89..38a1314178 100644
--- a/mkspecs/common/symbian/qplatformdefs.h
+++ b/mkspecs/common/symbian/qplatformdefs.h
@@ -84,86 +84,23 @@
#endif
#include <arpa/inet.h>
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#define QT_OPEN_LARGEFILE 0
#if (defined(__GLIBC__) && (__GLIBC__ >= 2)) || defined(Q_OS_SYMBIAN)
-#define QT_SOCKLEN_T socklen_t
+#define QT_SOCKLEN_T socklen_t
#else
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif
-
#if defined(__ISO_C_VISIBLE) && (__ISO_C_VISIBLE >= 1999)
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index 77b42a9983..b42ab6ab45 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -28,7 +28,12 @@ QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
QMAKE_CXX = g++
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS.CW =
+# Symbian build system applies -cwd source on the MWCC command line.
+# this causes problems with include paths, -cwd include uses the same
+# rules for include paths as ARMCC
+# This should really be fixed in raptor, as using CXXFLAGS means we pass
+# both on the command line and rely on the compiler using the last specified
+QMAKE_CXXFLAGS.CW = -cwd include
QMAKE_CXXFLAGS.ARMCC = --visibility_inlines_hidden
QMAKE_CXXFLAGS.GCCE = -fvisibility-inlines-hidden
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
@@ -79,9 +84,10 @@ contains(QMAKE_HOST.os,Windows) {
QMAKE_COPY = copy /y
QMAKE_COPY_DIR = xcopy /s /q /y /i
QMAKE_MOVE = move
- QMAKE_DEL_FILE = del
+ QMAKE_DEL_FILE = del 2> NUL
QMAKE_MKDIR = mkdir
QMAKE_DEL_DIR = rmdir
+ QMAKE_DEL_TREE = rmdir /s /q
QMAKE_CHK_DIR_EXISTS = if not exist
} else {
QMAKE_COPY = cp
@@ -90,12 +96,19 @@ contains(QMAKE_HOST.os,Windows) {
QMAKE_DEL_FILE = rm -f
QMAKE_MKDIR = mkdir
QMAKE_DEL_DIR = rmdir
+ QMAKE_DEL_TREE = rm -rf
QMAKE_CHK_DIR_EXISTS = test -d
}
-QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
-QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe
-QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe
+contains(QMAKE_HOST.os, "Windows") {
+ QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
+ QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe
+ QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe
+} else {
+ QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc
+ QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic
+ QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc
+}
QMAKE_IDL = midl
QMAKE_LIB = ar -ru
@@ -106,8 +119,8 @@ QMAKE_STRIP = strip
QMAKE_STRIPFLAGS_LIB += --strip-unneeded
load(qt_config)
-load(platform_paths)
-load(add_mmp_rules)
+load(symbian/platform_paths)
+load(symbian/add_mmp_rules)
symbian-abld {
# Versions of abld prior to Symbian^3 have a bug where you cannot remove something from the command line without replacing it
@@ -142,10 +155,10 @@ default_deployment.pkg_prerules = \
DEPLOYMENT += default_deployment
-exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/Series60v5.0.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/Series60v5.0.sis) {
+exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.0.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.0.sis) {
S60_VERSION = 5.0
} else {
- exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/Series60v3.2.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/Series60v3.2.sis) {
+ exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.2.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.2.sis) {
S60_VERSION = 3.2
} else {
S60_VERSION = 3.1
diff --git a/mkspecs/common/wince/qmake.conf b/mkspecs/common/wince/qmake.conf
index ff99f1b562..705cdc363d 100644
--- a/mkspecs/common/wince/qmake.conf
+++ b/mkspecs/common/wince/qmake.conf
@@ -66,7 +66,6 @@ QMAKE_LIBS_COMPAT =
QMAKE_LIBS_EGL = libEGL.lib
QMAKE_LIBS_OPENGL_ES1 = libGLES_CM.lib
-QMAKE_LIBS_OPENGL_ES1CL = libGLES_CL.lib
QMAKE_LIBS_OPENGL_ES2 = libGLESv2.lib
QMAKE_LIBS_QT_ENTRY = -lqtmain
diff --git a/mkspecs/cygwin-g++/qmake.conf b/mkspecs/cygwin-g++/qmake.conf
index 9cbc3d7e76..af9881b51b 100644
--- a/mkspecs/cygwin-g++/qmake.conf
+++ b/mkspecs/cygwin-g++/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
QT += core gui
diff --git a/mkspecs/cygwin-g++/qplatformdefs.h b/mkspecs/cygwin-g++/qplatformdefs.h
index 9b3be628b8..a6f57d22d8 100644
--- a/mkspecs/cygwin-g++/qplatformdefs.h
+++ b/mkspecs/cygwin-g++/qplatformdefs.h
@@ -81,58 +81,14 @@
//#include <windows.h>
#include <netinet/in.h>
+#define QT_NO_USE_FSEEKO
+#include "../common/posix/qplatformdefs.h"
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-#define QT_FOPEN ::fopen
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#define QT_SOCKLEN_T socklen_t
+#undef QT_OPEN_LARGEFILE
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/darwin-g++/qmake.conf b/mkspecs/darwin-g++/qmake.conf
index 72baa89ca0..995679ea82 100644
--- a/mkspecs/darwin-g++/qmake.conf
+++ b/mkspecs/darwin-g++/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
TEMPLATE = app
CONFIG += qt warn_on release link_prl native_precompiled_headers
QT += core gui
diff --git a/mkspecs/darwin-g++/qplatformdefs.h b/mkspecs/darwin-g++/qplatformdefs.h
index 5aea69fa80..7a67339bde 100644
--- a/mkspecs/darwin-g++/qplatformdefs.h
+++ b/mkspecs/darwin-g++/qplatformdefs.h
@@ -74,52 +74,10 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
+#include "../common/posix/qplatformdefs.h"
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
+#undef QT_OPEN_LARGEFILE
#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#define QT_SOCKLEN_T socklen_t
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
diff --git a/mkspecs/features/assistant.prf b/mkspecs/features/assistant.prf
deleted file mode 100644
index 25e5d4dcc8..0000000000
--- a/mkspecs/features/assistant.prf
+++ /dev/null
@@ -1,9 +0,0 @@
-
-INCLUDEPATH = $$QMAKE_INCDIR_QT/QtAssistant $$INCLUDEPATH
-
-mac:!static:contains(QT_CONFIG, qt_framework) {
- qtAddLibrary(QtAssistant)
-} else {
- qtAddLibrary(QtAssistantClient)
-}
-QT += network
diff --git a/mkspecs/features/egl.prf b/mkspecs/features/egl.prf
index 00f70d3a65..7e7d098236 100644
--- a/mkspecs/features/egl.prf
+++ b/mkspecs/features/egl.prf
@@ -11,14 +11,6 @@ wince*:contains(QT_CONFIG, opengles1) {
exists($$p):LIBS_PRIVATE += -L$$p
}
DEFINES += QT_GLES_EGL
-} else:wince*:contains(QT_CONFIG, opengles1cl) {
- INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES1CL
- LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_ES1CL
- LIBS += $$QMAKE_LFLAGS_EGL
- for(p, QMAKE_LIBDIR_OPENGL_ES1CL) {
- exists($$p):LIBS_PRIVATE += -L$$p
- }
- DEFINES += QT_GLES_EGL
} else {
INCLUDEPATH += $$QMAKE_INCDIR_EGL
LIBS_PRIVATE += $$QMAKE_LIBS_EGL
diff --git a/mkspecs/features/incredibuild_xge.prf b/mkspecs/features/incredibuild_xge.prf
index 2fce443259..e241ca4591 100644
--- a/mkspecs/features/incredibuild_xge.prf
+++ b/mkspecs/features/incredibuild_xge.prf
@@ -3,7 +3,7 @@ contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc") {
# The VCPROJ generator will replace the \r\h with the coded \r\n: &#x0d;&#x0a;
# No other generator understands the \h
- win32-msvc.net|win32-msvc2*|wince*msvc*: EOC = \$\$escape_expand(\r\h)
+ win32-msvc2*|wince*msvc*: EOC = \$\$escape_expand(\r\h)
for(xge, INCREDIBUILD_XGE) {
eval($${xge}.commands = Rem IncrediBuild_AllowRemote $$EOC Rem IncrediBuild_OutputFile $$replace($${xge}.output,/,\\) $$EOC $$eval($${xge}.commands))
diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf
index e4b7dae22d..e806ef6ad0 100644
--- a/mkspecs/features/moc.prf
+++ b/mkspecs/features/moc.prf
@@ -22,7 +22,7 @@ win32:count($$list($$INCPATH), 40, >) {
if(contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc")) {
# the VCPROJ generator will replace the \r\h with the coded \r\n: &#x0d;&#x0a;
# No other generator understands the \h
- if(win32-msvc.net|win32-msvc2*|wince*msvc*): EOC = $$escape_expand(\r\h)
+ if(win32-msvc2*|wince*msvc*): EOC = $$escape_expand(\r\h)
else: EOC = $$escape_expand(\\)$$escape_expand(\n\t)
}
diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf
index 3a26325501..ebef8b2d57 100644
--- a/mkspecs/features/symbian/application_icon.prf
+++ b/mkspecs/features/symbian/application_icon.prf
@@ -30,7 +30,7 @@ contains( CONFIG, no_icon ) {
# Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code
symbian-abld {
#Makefile: requires paths with backslash
- ICON = $$replace( ICON, /, \\)
+ contains(QMAKE_HOST.os, "Windows"):ICON = $$replace(ICON, /, \\)
# Extra compiler rules for mifconv
mifconv.output = ${ZDIR}$$APP_RESOURCE_DIR/$${baseTarget}.mif
@@ -48,4 +48,3 @@ contains( CONFIG, no_icon ) {
RSS_RULES.icon_file = $$APP_RESOURCE_DIR/$${baseTarget}.mif
}
}
-
diff --git a/mkspecs/features/symbian/qt.prf b/mkspecs/features/symbian/qt.prf
index 99f5ece067..02b300326a 100644
--- a/mkspecs/features/symbian/qt.prf
+++ b/mkspecs/features/symbian/qt.prf
@@ -39,3 +39,117 @@ contains(CONFIG, qt):!contains(TARGET.UID3, 0x2001E61C):!contains(TARGET.UID3, 0
isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000
isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x020000 0x800000
+
+# Sis file creation
+make_cache_name = .make.cache
+!symbian-abld:!symbian-sbsv2 {
+ fixedDestdir = $$DESTDIR
+ !isEmpty(fixedDestdir):!contains(fixedDestdir, "[/\\]$"):fixedDestdir = $${fixedDestdir}/
+ contains(QMAKE_HOST.os, "Windows"):fixedDestdir = $$replace(fixedDestdir, "/", "\\")
+} else {
+ fixedDestdir =
+}
+
+sis_target.target = sis
+sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \
+ $(if $(wildcard $$make_cache_name), \
+ $(MAKE) -f $(MAKEFILE) ok_sis MAKEFILES=$$make_cache_name \
+ , \
+ $(if $(QT_SIS_TARGET), \
+ $(MAKE) -f $(MAKEFILE) ok_sis \
+ , \
+ $(MAKE) -f $(MAKEFILE) fail_sis_nocache \
+ ) \
+ ) \
+ , \
+ $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \
+ )
+
+ok_sis_target.target = ok_sis
+ok_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \
+ $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+
+target_sis_target.target = $${fixedDestdir}$${TARGET}.sis
+target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis
+
+installer_sis_target.target = installer_sis
+installer_sis_target.commands = $(if $(wildcard $$basename(TARGET)_installer.pkg), \
+ $(MAKE) -f $(MAKEFILE) ok_installer_sis \
+ , \
+ $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \
+ )
+installer_sis_target.depends = $${fixedDestdir}$${TARGET}.sis
+
+ok_installer_sis_target.target = ok_installer_sis
+ok_installer_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_installer.pkg - \
+ $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+
+fail_sis_nopkg_target.target = fail_sis_nopkg
+fail_sis_nopkg_target.commands = "$(error PKG file does not exist, 'sis' and 'installer_sis' target are only supported for executables or projects with DEPLOYMENT statement)"
+
+fail_sis_nocache_target.target = fail_sis_nocache
+fail_sis_nocache_target.commands = "$(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target)"
+
+symbian-abld|symbian-sbsv2 {
+ # Only enable stub_sis files for the abld/sbsv2 build systems for now, since we don't
+ # support ROM builds for any other Symbian build system.
+ stub_sis_target.target = stub_sis
+ stub_sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \
+ $(if $(wildcard $$make_cache_name), \
+ $(MAKE) -f $(MAKEFILE) ok_stub_sis MAKEFILES=$$make_cache_name \
+ , \
+ $(if $(QT_SIS_TARGET), \
+ $(MAKE) -f $(MAKEFILE) ok_stub_sis \
+ , \
+ $(MAKE) -f $(MAKEFILE) fail_sis_nocache \
+ ) \
+ ) \
+ , \
+ $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \
+ )
+
+ ok_stub_sis_target.target = ok_stub_sis
+ ok_stub_sis_target.commands = createpackage.bat -s $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \
+ $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+
+ QMAKE_EXTRA_TARGETS += stub_sis_target \
+ ok_stub_sis_target
+} else {
+ # DESTDIR is not honored on abld and sbsv2
+ !isEmpty(DESTDIR) {
+ ok_sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR
+ ok_installer_sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR
+ }
+}
+
+QMAKE_EXTRA_TARGETS += sis_target \
+ ok_sis_target \
+ target_sis_target \
+ installer_sis_target \
+ ok_installer_sis_target \
+ fail_sis_nopkg_target \
+ fail_sis_nocache_target
+
+# Sbsv2 has its own store_build target which is using flms.
+!symbian-sbsv2 {
+ contains(QMAKE_HOST.os, "Windows") {
+ shellFixedHash = $${LITERAL_HASH}
+ } else {
+ shellFixedHash = \\$${LITERAL_HASH}
+ }
+ store_build_target.target = store_build
+ store_build_target.commands = \
+ @echo $${shellFixedHash} ============================================================================== > $$make_cache_name \
+ && echo $${shellFixedHash} This file is generated by make and should not be modified by the user >> $$make_cache_name \
+ && echo $${shellFixedHash} Name : $$make_cache_name >> $$make_cache_name \
+ && echo $${shellFixedHash} Part of : lineedits >> $$make_cache_name \
+ && echo $${shellFixedHash} Description : This file is used to cache last build target for >> $$make_cache_name \
+ && echo $${shellFixedHash} make sis target. >> $$make_cache_name \
+ && echo $${shellFixedHash} Version : >> $$make_cache_name \
+ && echo $${shellFixedHash} >> $$make_cache_name \
+ && echo $${shellFixedHash} ============================================================================== >> $$make_cache_name \
+ && echo. >> $$make_cache_name \
+ && echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> $$make_cache_name
+
+ QMAKE_EXTRA_TARGETS += store_build_target
+}
diff --git a/mkspecs/features/unix/opengl.prf b/mkspecs/features/unix/opengl.prf
index f2db8190b6..74a514915d 100644
--- a/mkspecs/features/unix/opengl.prf
+++ b/mkspecs/features/unix/opengl.prf
@@ -3,11 +3,6 @@ contains(QT_CONFIG, opengles1) {
!isEmpty(QMAKE_LIBDIR_OPENGL_ES1):QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES1
target_qt:LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_ES1
else:LIBS += $$QMAKE_LIBS_OPENGL_ES1
-} else:contains(QT_CONFIG, opengles1cl) {
- INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES1CL
- !isEmpty(QMAKE_LIBDIR_OPENGL_ES1CL):QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES1CL
- target_qt:LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_ES1CL
- else:LIBS += $$QMAKE_LIBS_OPENGL_ES1CL
} else:contains(QT_CONFIG, opengles2) {
INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2
!isEmpty(QMAKE_LIBDIR_OPENGL_ES2):QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2
diff --git a/mkspecs/features/win32/thread.prf b/mkspecs/features/win32/thread.prf
index aa844d2d97..76354a8200 100644
--- a/mkspecs/features/win32/thread.prf
+++ b/mkspecs/features/win32/thread.prf
@@ -23,8 +23,4 @@ debug {
}
}
-win32-msvc|win32-msvc.net {
- !contains(DEFINES, QT_DLL):!target_qt:!isEqual(TARGET, qtmain):QMAKE_LFLAGS += /NODEFAULTLIB:"libc"
-}
-
QMAKE_LIBS += $$QMAKE_LIBS_RTMT
diff --git a/mkspecs/freebsd-g++/qmake.conf b/mkspecs/freebsd-g++/qmake.conf
index acd2a6a5b6..51a1960451 100644
--- a/mkspecs/freebsd-g++/qmake.conf
+++ b/mkspecs/freebsd-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/freebsd-g++/qplatformdefs.h b/mkspecs/freebsd-g++/qplatformdefs.h
index b5d1b2f812..5afb9654fa 100644
--- a/mkspecs/freebsd-g++/qplatformdefs.h
+++ b/mkspecs/freebsd-g++/qplatformdefs.h
@@ -76,57 +76,19 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#define QT_OPEN_LARGEFILE 0
#if !defined(__DragonFly__) && (__FreeBSD_version < 400000)
// FreeBSD 1.0 - 3.5.1
-# define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#else
// FreeBSD 4.0 and better
-# define QT_SOCKLEN_T socklen_t
+#define QT_SOCKLEN_T socklen_t
#endif
#define QT_SNPRINTF ::snprintf
@@ -143,5 +105,4 @@
#define QT_AOUT_UNDERSCORE
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/freebsd-g++34/qmake.conf b/mkspecs/freebsd-g++34/qmake.conf
index 9627b460c1..3e6bf6a5b3 100644
--- a/mkspecs/freebsd-g++34/qmake.conf
+++ b/mkspecs/freebsd-g++34/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/freebsd-g++40/qmake.conf b/mkspecs/freebsd-g++40/qmake.conf
index e3a3c8632c..43d69802ac 100644
--- a/mkspecs/freebsd-g++40/qmake.conf
+++ b/mkspecs/freebsd-g++40/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/freebsd-icc/qmake.conf b/mkspecs/freebsd-icc/qmake.conf
index 60fa7ee67e..c9c3140104 100644
--- a/mkspecs/freebsd-icc/qmake.conf
+++ b/mkspecs/freebsd-icc/qmake.conf
@@ -28,6 +28,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/hpux-acc-64/qmake.conf b/mkspecs/hpux-acc-64/qmake.conf
index 8757459722..b138ef833e 100644
--- a/mkspecs/hpux-acc-64/qmake.conf
+++ b/mkspecs/hpux-acc-64/qmake.conf
@@ -46,6 +46,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/hpux-acc-64/qplatformdefs.h b/mkspecs/hpux-acc-64/qplatformdefs.h
index 50da6169da..c1a9ab8cc3 100644
--- a/mkspecs/hpux-acc-64/qplatformdefs.h
+++ b/mkspecs/hpux-acc-64/qplatformdefs.h
@@ -76,76 +76,14 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#define QT_NO_READDIR64
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#define QT_SOCKLEN_T int
-
+#define QT_SOCKLEN_T int
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpux-acc-o64/qmake.conf b/mkspecs/hpux-acc-o64/qmake.conf
index d4d2c7dc9b..b703540512 100644
--- a/mkspecs/hpux-acc-o64/qmake.conf
+++ b/mkspecs/hpux-acc-o64/qmake.conf
@@ -46,6 +46,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/hpux-acc-o64/qplatformdefs.h b/mkspecs/hpux-acc-o64/qplatformdefs.h
index 1aee3f9cc7..c622d8085e 100644
--- a/mkspecs/hpux-acc-o64/qplatformdefs.h
+++ b/mkspecs/hpux-acc-o64/qplatformdefs.h
@@ -77,76 +77,11 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#define QT_SOCKLEN_T int
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#define QT_NO_READDIR64
+#include "../common/posix/qplatformdefs.h"
+#undef QT_SOCKLEN_T
+#define QT_SOCKLEN_T int
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpux-acc/qmake.conf b/mkspecs/hpux-acc/qmake.conf
index 19ee00f94b..8223a07f28 100644
--- a/mkspecs/hpux-acc/qmake.conf
+++ b/mkspecs/hpux-acc/qmake.conf
@@ -25,6 +25,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/hpux-acc/qplatformdefs.h b/mkspecs/hpux-acc/qplatformdefs.h
index 475c85ae63..c18ad495d9 100644
--- a/mkspecs/hpux-acc/qplatformdefs.h
+++ b/mkspecs/hpux-acc/qplatformdefs.h
@@ -79,76 +79,15 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#define QT_NO_READDIR64
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
// presence of _XOPEN_UNIX can be used to detect HP-UX 10 or higher
#if !defined(_XOPEN_UNIX)
@@ -156,5 +95,4 @@
#define select(a,b,c,d,e) select((a), (int *)(b), (int *)(c), (int *)(d), (e))
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpux-g++-64/qmake.conf b/mkspecs/hpux-g++-64/qmake.conf
index f76bd4e9ec..734a5f7afa 100644
--- a/mkspecs/hpux-g++-64/qmake.conf
+++ b/mkspecs/hpux-g++-64/qmake.conf
@@ -6,6 +6,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/hpux-g++-64/qplatformdefs.h b/mkspecs/hpux-g++-64/qplatformdefs.h
index 60826324d0..e9a9e75aff 100644
--- a/mkspecs/hpux-g++-64/qplatformdefs.h
+++ b/mkspecs/hpux-g++-64/qplatformdefs.h
@@ -76,76 +76,8 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#define QT_SOCKLEN_T socklen_t
-
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#define QT_NO_READDIR64
+#include "../common/posix/qplatformdefs.h"
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpux-g++/qmake.conf b/mkspecs/hpux-g++/qmake.conf
index 1ed2ee64a8..6935ea99bf 100644
--- a/mkspecs/hpux-g++/qmake.conf
+++ b/mkspecs/hpux-g++/qmake.conf
@@ -6,6 +6,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl plugin_no_soname
QT += core gui
diff --git a/mkspecs/hpux-g++/qplatformdefs.h b/mkspecs/hpux-g++/qplatformdefs.h
index 161474e906..9296ac251f 100644
--- a/mkspecs/hpux-g++/qplatformdefs.h
+++ b/mkspecs/hpux-g++/qplatformdefs.h
@@ -78,76 +78,12 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#define QT_NO_READDIR64
+#include "../common/posix/qplatformdefs.h"
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#define QT_SOCKLEN_T int
+#undef QT_SOCKLEN_T
+#define QT_SOCKLEN_T int
// presence of _XOPEN_UNIX can be used to detect HP-UX 10 or higher
#if !defined(_XOPEN_UNIX)
@@ -155,5 +91,4 @@
#define select(a,b,c,d,e) select((a), (int *)(b), (int *)(c), (int *)(d), (e))
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpuxi-acc-32/qmake.conf b/mkspecs/hpuxi-acc-32/qmake.conf
index 00b400f0de..93006e53dd 100644
--- a/mkspecs/hpuxi-acc-32/qmake.conf
+++ b/mkspecs/hpuxi-acc-32/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release plugin_no_soname
QT += core gui
diff --git a/mkspecs/hpuxi-acc-32/qplatformdefs.h b/mkspecs/hpuxi-acc-32/qplatformdefs.h
index 04ce3cd7cf..6aafed27f5 100644
--- a/mkspecs/hpuxi-acc-32/qplatformdefs.h
+++ b/mkspecs/hpuxi-acc-32/qplatformdefs.h
@@ -77,75 +77,14 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#define QT_NO_READDIR64
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpuxi-acc-64/qmake.conf b/mkspecs/hpuxi-acc-64/qmake.conf
index feefd309dc..2fa1f01195 100644
--- a/mkspecs/hpuxi-acc-64/qmake.conf
+++ b/mkspecs/hpuxi-acc-64/qmake.conf
@@ -46,6 +46,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release plugin_no_soname
QT += core gui
diff --git a/mkspecs/hpuxi-acc-64/qplatformdefs.h b/mkspecs/hpuxi-acc-64/qplatformdefs.h
index 04ce3cd7cf..6aafed27f5 100644
--- a/mkspecs/hpuxi-acc-64/qplatformdefs.h
+++ b/mkspecs/hpuxi-acc-64/qplatformdefs.h
@@ -77,75 +77,14 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#define QT_NO_READDIR64
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpuxi-g++-64/qmake.conf b/mkspecs/hpuxi-g++-64/qmake.conf
index e8fa053a57..05b069106a 100644
--- a/mkspecs/hpuxi-g++-64/qmake.conf
+++ b/mkspecs/hpuxi-g++-64/qmake.conf
@@ -11,6 +11,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/hpuxi-g++-64/qplatformdefs.h b/mkspecs/hpuxi-g++-64/qplatformdefs.h
index ba62e24061..f6789eeb33 100644
--- a/mkspecs/hpuxi-g++-64/qplatformdefs.h
+++ b/mkspecs/hpuxi-g++-64/qplatformdefs.h
@@ -76,75 +76,14 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#define QT_NO_READDIR64
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hurd-g++/qmake.conf b/mkspecs/hurd-g++/qmake.conf
index f213f2d5dc..6570e4079e 100644
--- a/mkspecs/hurd-g++/qmake.conf
+++ b/mkspecs/hurd-g++/qmake.conf
@@ -6,6 +6,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
QT += core gui
CONFIG += qt warn_on release link_prl
diff --git a/mkspecs/hurd-g++/qplatformdefs.h b/mkspecs/hurd-g++/qplatformdefs.h
index 68ee2d8212..b734a68945 100644
--- a/mkspecs/hurd-g++/qplatformdefs.h
+++ b/mkspecs/hurd-g++/qplatformdefs.h
@@ -82,57 +82,11 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#define QT_SOCKLEN_T socklen_t
+#include "../common/posix/qplatformdefs.h"
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/irix-cc-64/qmake.conf b/mkspecs/irix-cc-64/qmake.conf
index bf5febb048..4b651b2e96 100644
--- a/mkspecs/irix-cc-64/qmake.conf
+++ b/mkspecs/irix-cc-64/qmake.conf
@@ -35,6 +35,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/irix-cc-64/qplatformdefs.h b/mkspecs/irix-cc-64/qplatformdefs.h
index f1078df029..c95c2e52ae 100644
--- a/mkspecs/irix-cc-64/qplatformdefs.h
+++ b/mkspecs/irix-cc-64/qplatformdefs.h
@@ -75,79 +75,15 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#undef QT_SOCKLEN_T
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500)
-#define QT_SOCKLEN_T size_t
+#define QT_SOCKLEN_T size_t
#else
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif
// Irix 6.5 and better
@@ -156,5 +92,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/irix-cc/qmake.conf b/mkspecs/irix-cc/qmake.conf
index 99e8064326..0070d42a76 100644
--- a/mkspecs/irix-cc/qmake.conf
+++ b/mkspecs/irix-cc/qmake.conf
@@ -35,6 +35,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/irix-cc/qplatformdefs.h b/mkspecs/irix-cc/qplatformdefs.h
index f1078df029..c95c2e52ae 100644
--- a/mkspecs/irix-cc/qplatformdefs.h
+++ b/mkspecs/irix-cc/qplatformdefs.h
@@ -75,79 +75,15 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#undef QT_SOCKLEN_T
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500)
-#define QT_SOCKLEN_T size_t
+#define QT_SOCKLEN_T size_t
#else
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif
// Irix 6.5 and better
@@ -156,5 +92,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/irix-g++-64/qmake.conf b/mkspecs/irix-g++-64/qmake.conf
index d614b9dd35..56f02f105b 100644
--- a/mkspecs/irix-g++-64/qmake.conf
+++ b/mkspecs/irix-g++-64/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/irix-g++/qmake.conf b/mkspecs/irix-g++/qmake.conf
index 1f1df30298..c1eafdb76c 100644
--- a/mkspecs/irix-g++/qmake.conf
+++ b/mkspecs/irix-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/irix-g++/qplatformdefs.h b/mkspecs/irix-g++/qplatformdefs.h
index 49d0bfbb49..be7fb69a91 100644
--- a/mkspecs/irix-g++/qplatformdefs.h
+++ b/mkspecs/irix-g++/qplatformdefs.h
@@ -75,83 +75,22 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#undef QT_SOCKLEN_T
+#undef QT_SIGNAL_ARGS
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#if defined(_LANGUAGE_C_PLUS_PLUS) || !defined(_SGIAPI)
-#define QT_SIGNAL_ARGS int
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500)
+#define QT_SOCKLEN_T size_t
#else
-#define QT_SIGNAL_ARGS void
+#define QT_SOCKLEN_T int
#endif
-#define QT_SIGNAL_IGNORE SIG_IGN
-#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500)
-#define QT_SOCKLEN_T size_t
+#if defined(_LANGUAGE_C_PLUS_PLUS) || !defined(_SGIAPI)
+#define QT_SIGNAL_ARGS int
#else
-#define QT_SOCKLEN_T int
+#define QT_SIGNAL_ARGS void
#endif
// Irix 6.5 and better
@@ -160,6 +99,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
-
diff --git a/mkspecs/linux-cxx/qmake.conf b/mkspecs/linux-cxx/qmake.conf
index 633b738b38..879c78a06c 100644
--- a/mkspecs/linux-cxx/qmake.conf
+++ b/mkspecs/linux-cxx/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/linux-cxx/qplatformdefs.h b/mkspecs/linux-cxx/qplatformdefs.h
index 11b5ac0883..578e63a045 100644
--- a/mkspecs/linux-cxx/qplatformdefs.h
+++ b/mkspecs/linux-cxx/qplatformdefs.h
@@ -82,79 +82,15 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#undef QT_SOCKLEN_T
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
-#define QT_SOCKLEN_T socklen_t
+#define QT_SOCKLEN_T socklen_t
#else
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
@@ -162,5 +98,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-ecc-64/qmake.conf b/mkspecs/linux-ecc-64/qmake.conf
index 359d44be23..21f29604b7 100644
--- a/mkspecs/linux-ecc-64/qmake.conf
+++ b/mkspecs/linux-ecc-64/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/linux-ecc-64/qplatformdefs.h b/mkspecs/linux-ecc-64/qplatformdefs.h
index 11b5ac0883..578e63a045 100644
--- a/mkspecs/linux-ecc-64/qplatformdefs.h
+++ b/mkspecs/linux-ecc-64/qplatformdefs.h
@@ -82,79 +82,15 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#undef QT_SOCKLEN_T
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
-#define QT_SOCKLEN_T socklen_t
+#define QT_SOCKLEN_T socklen_t
#else
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
@@ -162,5 +98,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-g++-32/qmake.conf b/mkspecs/linux-g++-32/qmake.conf
index 44866cf812..1e5c50b987 100644
--- a/mkspecs/linux-g++-32/qmake.conf
+++ b/mkspecs/linux-g++-32/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
QT += core gui
diff --git a/mkspecs/linux-g++-64/qmake.conf b/mkspecs/linux-g++-64/qmake.conf
index 4f8794f3f9..e7372cc205 100644
--- a/mkspecs/linux-g++-64/qmake.conf
+++ b/mkspecs/linux-g++-64/qmake.conf
@@ -6,6 +6,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
QT += core gui
diff --git a/mkspecs/linux-g++-maemo/qmake.conf b/mkspecs/linux-g++-maemo/qmake.conf
index 38c26a6759..ca201bcc24 100644
--- a/mkspecs/linux-g++-maemo/qmake.conf
+++ b/mkspecs/linux-g++-maemo/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
CONFIG += nostrip
diff --git a/mkspecs/linux-g++/qmake.conf b/mkspecs/linux-g++/qmake.conf
index 47784e27f7..4b218960c8 100644
--- a/mkspecs/linux-g++/qmake.conf
+++ b/mkspecs/linux-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
QT += core gui
diff --git a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h
index a87927939b..23816b1046 100644
--- a/mkspecs/linux-g++/qplatformdefs.h
+++ b/mkspecs/linux-g++/qplatformdefs.h
@@ -81,79 +81,15 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#undef QT_SOCKLEN_T
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
-#define QT_SOCKLEN_T socklen_t
+#define QT_SOCKLEN_T socklen_t
#else
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
@@ -161,5 +97,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf
index 965de0c298..eeb24a382d 100644
--- a/mkspecs/linux-icc/qmake.conf
+++ b/mkspecs/linux-icc/qmake.conf
@@ -11,6 +11,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/linux-kcc/qmake.conf b/mkspecs/linux-kcc/qmake.conf
index 009c48602b..217572fd85 100644
--- a/mkspecs/linux-kcc/qmake.conf
+++ b/mkspecs/linux-kcc/qmake.conf
@@ -14,6 +14,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/linux-kcc/qplatformdefs.h b/mkspecs/linux-kcc/qplatformdefs.h
index 30b3c25c0e..3a37ab9d14 100644
--- a/mkspecs/linux-kcc/qplatformdefs.h
+++ b/mkspecs/linux-kcc/qplatformdefs.h
@@ -85,79 +85,15 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#undef QT_SOCKLEN_T
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
-#define QT_SOCKLEN_T socklen_t
+#define QT_SOCKLEN_T socklen_t
#else
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
@@ -165,5 +101,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-llvm/qmake.conf b/mkspecs/linux-llvm/qmake.conf
index 9c34377de7..73d6609165 100644
--- a/mkspecs/linux-llvm/qmake.conf
+++ b/mkspecs/linux-llvm/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
QT += core gui
diff --git a/mkspecs/linux-llvm/qplatformdefs.h b/mkspecs/linux-llvm/qplatformdefs.h
index 8e592499b5..a38c86c194 100644
--- a/mkspecs/linux-llvm/qplatformdefs.h
+++ b/mkspecs/linux-llvm/qplatformdefs.h
@@ -82,79 +82,15 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#undef QT_SOCKLEN_T
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
-#define QT_SOCKLEN_T socklen_t
+#define QT_SOCKLEN_T socklen_t
#else
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
@@ -162,5 +98,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-lsb-g++/qmake.conf b/mkspecs/linux-lsb-g++/qmake.conf
index b603a16110..4b4deabc58 100644
--- a/mkspecs/linux-lsb-g++/qmake.conf
+++ b/mkspecs/linux-lsb-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
QT += core gui
diff --git a/mkspecs/linux-lsb-g++/qplatformdefs.h b/mkspecs/linux-lsb-g++/qplatformdefs.h
index ce0b4618ff..e2a138a04d 100644
--- a/mkspecs/linux-lsb-g++/qplatformdefs.h
+++ b/mkspecs/linux-lsb-g++/qplatformdefs.h
@@ -86,90 +86,27 @@
// LSB 3.1 defines htonl and friends here
#include <arpa/inet.h>
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
#ifndef SIOCGIFBRDADDR
# define SIOCGIFBRDADDR 0x8919
#endif
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
-#define QT_SOCKLEN_T socklen_t
-#else
-#define QT_SOCKLEN_T int
-#endif
-
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-pgcc/qmake.conf b/mkspecs/linux-pgcc/qmake.conf
index 756f1af941..19af8ee216 100644
--- a/mkspecs/linux-pgcc/qmake.conf
+++ b/mkspecs/linux-pgcc/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/linux-pgcc/qplatformdefs.h b/mkspecs/linux-pgcc/qplatformdefs.h
index 11b5ac0883..578e63a045 100644
--- a/mkspecs/linux-pgcc/qplatformdefs.h
+++ b/mkspecs/linux-pgcc/qplatformdefs.h
@@ -82,79 +82,15 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#undef QT_SOCKLEN_T
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
-#define QT_SOCKLEN_T socklen_t
+#define QT_SOCKLEN_T socklen_t
#else
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
@@ -162,5 +98,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/lynxos-g++/qmake.conf b/mkspecs/lynxos-g++/qmake.conf
index 40f2b9f95e..eae330873b 100644
--- a/mkspecs/lynxos-g++/qmake.conf
+++ b/mkspecs/lynxos-g++/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
QT += core gui
diff --git a/mkspecs/lynxos-g++/qplatformdefs.h b/mkspecs/lynxos-g++/qplatformdefs.h
index bdb492e656..cac71d12bd 100644
--- a/mkspecs/lynxos-g++/qplatformdefs.h
+++ b/mkspecs/lynxos-g++/qplatformdefs.h
@@ -75,55 +75,14 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
+#include "../common/posix/qplatformdefs.h"
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS void
-#define QT_SIGNAL_IGNORE SIG_IGN
+#undef QT_SOCKLEN_T
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
-#define QT_SOCKLEN_T socklen_t
+#define QT_SOCKLEN_T socklen_t
#else
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
@@ -131,5 +90,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-g++/qmake.conf b/mkspecs/macx-g++/qmake.conf
index 43550737e1..4464686b3e 100644
--- a/mkspecs/macx-g++/qmake.conf
+++ b/mkspecs/macx-g++/qmake.conf
@@ -7,6 +7,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
TEMPLATE = app
CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl
QT += core gui
diff --git a/mkspecs/macx-g++/qplatformdefs.h b/mkspecs/macx-g++/qplatformdefs.h
index 03bdce941f..99d64ef054 100644
--- a/mkspecs/macx-g++/qplatformdefs.h
+++ b/mkspecs/macx-g++/qplatformdefs.h
@@ -75,59 +75,23 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
+#undef QT_SIGNAL_IGNORE
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE (void (*)(int))1
+#define QT_OPEN_LARGEFILE 0
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
-#define QT_SOCKLEN_T socklen_t
+#define QT_SOCKLEN_T socklen_t
#else
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif
+#define QT_SIGNAL_IGNORE (void (*)(int))1
+
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-g++40/qmake.conf b/mkspecs/macx-g++40/qmake.conf
index d6fd09d7ae..784f5fce58 100644
--- a/mkspecs/macx-g++40/qmake.conf
+++ b/mkspecs/macx-g++40/qmake.conf
@@ -7,6 +7,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
TEMPLATE = app
CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl
QT += core gui
diff --git a/mkspecs/macx-g++40/qplatformdefs.h b/mkspecs/macx-g++40/qplatformdefs.h
index 03bdce941f..99d64ef054 100644
--- a/mkspecs/macx-g++40/qplatformdefs.h
+++ b/mkspecs/macx-g++40/qplatformdefs.h
@@ -75,59 +75,23 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
+#undef QT_SIGNAL_IGNORE
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE (void (*)(int))1
+#define QT_OPEN_LARGEFILE 0
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
-#define QT_SOCKLEN_T socklen_t
+#define QT_SOCKLEN_T socklen_t
#else
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif
+#define QT_SIGNAL_IGNORE (void (*)(int))1
+
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-g++42/qmake.conf b/mkspecs/macx-g++42/qmake.conf
index 06bbdcbb12..fb936973a7 100644
--- a/mkspecs/macx-g++42/qmake.conf
+++ b/mkspecs/macx-g++42/qmake.conf
@@ -7,6 +7,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
TEMPLATE = app
CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl
QT += core gui
diff --git a/mkspecs/macx-g++42/qplatformdefs.h b/mkspecs/macx-g++42/qplatformdefs.h
index 03bdce941f..99d64ef054 100644
--- a/mkspecs/macx-g++42/qplatformdefs.h
+++ b/mkspecs/macx-g++42/qplatformdefs.h
@@ -75,59 +75,23 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
+#undef QT_SIGNAL_IGNORE
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE (void (*)(int))1
+#define QT_OPEN_LARGEFILE 0
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
-#define QT_SOCKLEN_T socklen_t
+#define QT_SOCKLEN_T socklen_t
#else
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif
+#define QT_SIGNAL_IGNORE (void (*)(int))1
+
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-icc/qmake.conf b/mkspecs/macx-icc/qmake.conf
index b7753d8216..00de6c437a 100644
--- a/mkspecs/macx-icc/qmake.conf
+++ b/mkspecs/macx-icc/qmake.conf
@@ -13,6 +13,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
TEMPLATE = app
CONFIG += qt warn_on release link_prl app_bundle
QT += core gui
diff --git a/mkspecs/macx-llvm/qmake.conf b/mkspecs/macx-llvm/qmake.conf
index de8040c340..d46baeaa37 100644
--- a/mkspecs/macx-llvm/qmake.conf
+++ b/mkspecs/macx-llvm/qmake.conf
@@ -7,6 +7,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
TEMPLATE = app
CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl
QT += core gui
diff --git a/mkspecs/macx-llvm/qplatformdefs.h b/mkspecs/macx-llvm/qplatformdefs.h
index 03bdce941f..99d64ef054 100644
--- a/mkspecs/macx-llvm/qplatformdefs.h
+++ b/mkspecs/macx-llvm/qplatformdefs.h
@@ -75,59 +75,23 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
+#undef QT_SIGNAL_IGNORE
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE (void (*)(int))1
+#define QT_OPEN_LARGEFILE 0
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
-#define QT_SOCKLEN_T socklen_t
+#define QT_SOCKLEN_T socklen_t
#else
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif
+#define QT_SIGNAL_IGNORE (void (*)(int))1
+
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-pbuilder/qplatformdefs.h b/mkspecs/macx-pbuilder/qplatformdefs.h
index c8e49afe3b..66afad2a0f 100644
--- a/mkspecs/macx-pbuilder/qplatformdefs.h
+++ b/mkspecs/macx-pbuilder/qplatformdefs.h
@@ -75,59 +75,20 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE (void (*)(int))1
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_SOCKLEN_T
+#undef QT_SIGNAL_IGNORE
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
-#define QT_SOCKLEN_T socklen_t
+#define QT_SOCKLEN_T socklen_t
#else
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif
+#define QT_SIGNAL_IGNORE (void (*)(int))1
+
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-xcode/qplatformdefs.h b/mkspecs/macx-xcode/qplatformdefs.h
index 03bdce941f..99d64ef054 100644
--- a/mkspecs/macx-xcode/qplatformdefs.h
+++ b/mkspecs/macx-xcode/qplatformdefs.h
@@ -75,59 +75,23 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
+#undef QT_SIGNAL_IGNORE
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE (void (*)(int))1
+#define QT_OPEN_LARGEFILE 0
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
-#define QT_SOCKLEN_T socklen_t
+#define QT_SOCKLEN_T socklen_t
#else
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif
+#define QT_SIGNAL_IGNORE (void (*)(int))1
+
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-xlc/qmake.conf b/mkspecs/macx-xlc/qmake.conf
index 6a8c24659e..f84524bbdf 100644
--- a/mkspecs/macx-xlc/qmake.conf
+++ b/mkspecs/macx-xlc/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
TEMPLATE = app
CONFIG += qt warn_on release app_bundle global_init_link_order lib_version_first plugin_no_soname link_prl
QT += core gui
diff --git a/mkspecs/macx-xlc/qplatformdefs.h b/mkspecs/macx-xlc/qplatformdefs.h
index 43c31584b7..b830041d87 100644
--- a/mkspecs/macx-xlc/qplatformdefs.h
+++ b/mkspecs/macx-xlc/qplatformdefs.h
@@ -75,55 +75,15 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
+#include "../common/posix/qplatformdefs.h"
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
+#undef QT_SOCKLEN_T
+#undef QT_SIGNAL_IGNORE
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE (void (*)(int))1
-
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
+#define QT_SIGNAL_IGNORE (void (*)(int))1
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/netbsd-g++/qmake.conf b/mkspecs/netbsd-g++/qmake.conf
index 622baceb7d..1cb449f5cd 100644
--- a/mkspecs/netbsd-g++/qmake.conf
+++ b/mkspecs/netbsd-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/netbsd-g++/qplatformdefs.h b/mkspecs/netbsd-g++/qplatformdefs.h
index f455a8668c..2ce5b4a37a 100644
--- a/mkspecs/netbsd-g++/qplatformdefs.h
+++ b/mkspecs/netbsd-g++/qplatformdefs.h
@@ -75,54 +75,14 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
+#include "../common/posix/qplatformdefs.h"
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#undef QT_OPEN_LARGEFILE
+#define QT_OPEN_LARGEFILE 0
-// NetBSD 1.0 - 1.3.3 int
-// NetBSD 1.4 - 1.5 socklen_t
-#define QT_SOCKLEN_T socklen_t
+// QT_SOCKLEN_T
+// NetBSD 1.0 - 1.3.3 int
+// NetBSD 1.4 - 1.5 socklen_t
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
@@ -132,5 +92,4 @@
#define QT_AOUT_UNDERSCORE
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/openbsd-g++/qmake.conf b/mkspecs/openbsd-g++/qmake.conf
index 4204f65f67..c948c90dc5 100644
--- a/mkspecs/openbsd-g++/qmake.conf
+++ b/mkspecs/openbsd-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/openbsd-g++/qplatformdefs.h b/mkspecs/openbsd-g++/qplatformdefs.h
index 0a9ea21120..b3a9ad5752 100644
--- a/mkspecs/openbsd-g++/qplatformdefs.h
+++ b/mkspecs/openbsd-g++/qplatformdefs.h
@@ -76,54 +76,14 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
+#include "../common/posix/qplatformdefs.h"
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#undef QT_OPEN_LARGEFILE
+#define QT_OPEN_LARGEFILE 0
-// OpenBSD 2.2 - 2.4 int
-// OpenBSD 2.5 - 2.8 socklen_t
-#define QT_SOCKLEN_T socklen_t
+// QT_SOCKLEN_T
+// OpenBSD 2.2 - 2.4 int
+// OpenBSD 2.5 - 2.8 socklen_t
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
@@ -148,5 +108,4 @@
#define QT_AOUT_UNDERSCORE
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/qws/freebsd-generic-g++/qmake.conf b/mkspecs/qws/freebsd-generic-g++/qmake.conf
index 19d6709ac4..6e30d4fe17 100644
--- a/mkspecs/qws/freebsd-generic-g++/qmake.conf
+++ b/mkspecs/qws/freebsd-generic-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release
QT += core gui network
diff --git a/mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf b/mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf
new file mode 100644
index 0000000000..3611421c44
--- /dev/null
+++ b/mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf
@@ -0,0 +1,20 @@
+#
+# qmake configuration for building with arm-none-linux-gnueabi-g++
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+# modifications to g++.conf
+QMAKE_CC = arm-none-linux-gnueabi-gcc
+QMAKE_CXX = arm-none-linux-gnueabi-g++
+QMAKE_LINK = arm-none-linux-gnueabi-g++
+QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++
+
+# modifications to linux.conf
+QMAKE_AR = arm-none-linux-gnueabi-ar cqs
+QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
+QMAKE_STRIP = arm-none-linux-gnueabi-strip
+
+load(qt_config)
diff --git a/mkspecs/qws/linux-arm-gnueabi-g++/qplatformdefs.h b/mkspecs/qws/linux-arm-gnueabi-g++/qplatformdefs.h
new file mode 100644
index 0000000000..b0551e5686
--- /dev/null
+++ b/mkspecs/qws/linux-arm-gnueabi-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** 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 qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/macx-generic-g++/qmake.conf b/mkspecs/qws/macx-generic-g++/qmake.conf
index b724cbc322..f753222ed2 100644
--- a/mkspecs/qws/macx-generic-g++/qmake.conf
+++ b/mkspecs/qws/macx-generic-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui network
diff --git a/mkspecs/qws/solaris-generic-g++/qmake.conf b/mkspecs/qws/solaris-generic-g++/qmake.conf
index db83a572df..f5874c22eb 100644
--- a/mkspecs/qws/solaris-generic-g++/qmake.conf
+++ b/mkspecs/qws/solaris-generic-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui network
diff --git a/mkspecs/sco-cc/qmake.conf b/mkspecs/sco-cc/qmake.conf
index f682f49285..6eb5ca12ec 100644
--- a/mkspecs/sco-cc/qmake.conf
+++ b/mkspecs/sco-cc/qmake.conf
@@ -8,6 +8,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
QT += core gui
CONFIG += qt warn_on release link_prl
diff --git a/mkspecs/sco-cc/qplatformdefs.h b/mkspecs/sco-cc/qplatformdefs.h
index b5427c99f1..078cb45f62 100644
--- a/mkspecs/sco-cc/qplatformdefs.h
+++ b/mkspecs/sco-cc/qplatformdefs.h
@@ -76,55 +76,12 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
+#include "../common/posix/qplatformdefs.h"
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#define QT_SOCKLEN_T size_t
+#undef QT_SOCKLEN_T
+#define QT_SOCKLEN_T size_t
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/sco-g++/qmake.conf b/mkspecs/sco-g++/qmake.conf
index 268bf320d9..746cf2ceb0 100644
--- a/mkspecs/sco-g++/qmake.conf
+++ b/mkspecs/sco-g++/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/sco-g++/qplatformdefs.h b/mkspecs/sco-g++/qplatformdefs.h
index 058ab7819f..a09f77db18 100644
--- a/mkspecs/sco-g++/qplatformdefs.h
+++ b/mkspecs/sco-g++/qplatformdefs.h
@@ -80,55 +80,12 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
+#include "../common/posix/qplatformdefs.h"
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#define QT_SOCKLEN_T int
+#undef QT_SOCKLEN_T
+#define QT_SOCKLEN_T int
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/solaris-cc-64/qmake.conf b/mkspecs/solaris-cc-64/qmake.conf
index eb594d9497..3d35d62e30 100644
--- a/mkspecs/solaris-cc-64/qmake.conf
+++ b/mkspecs/solaris-cc-64/qmake.conf
@@ -22,6 +22,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
@@ -41,6 +42,7 @@ QMAKE_CFLAGS_SHLIB = -KPIC
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_THREAD = -mt
+QMAKE_CFLAGS_HIDESYMS = -xldscope=hidden
QMAKE_CXX = CC
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
@@ -53,6 +55,7 @@ QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS
QMAKE_INCDIR = /usr/sfw/include
QMAKE_LIBDIR = /usr/sfw/lib/64
diff --git a/mkspecs/solaris-cc-64/qplatformdefs.h b/mkspecs/solaris-cc-64/qplatformdefs.h
index 8de7c20760..d01c48c38a 100644
--- a/mkspecs/solaris-cc-64/qplatformdefs.h
+++ b/mkspecs/solaris-cc-64/qplatformdefs.h
@@ -76,82 +76,16 @@
#include <net/if.h>
#endif
-// On 64-bit platforms sockets use socklen_t
-#define QT_SOCKLEN_T socklen_t
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_SOCKET_CONNECT
+#define QT_SOCKET_CONNECT qt_socket_connect
// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED
static inline int qt_socket_connect(int s, struct sockaddr *addr, QT_SOCKLEN_T addrlen)
{ return ::connect(s, addr, addrlen); }
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT qt_socket_connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
// Only Solaris 7 and better support 64-bit
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
diff --git a/mkspecs/solaris-cc/qmake.conf b/mkspecs/solaris-cc/qmake.conf
index ad430d1cf2..0c97620111 100644
--- a/mkspecs/solaris-cc/qmake.conf
+++ b/mkspecs/solaris-cc/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
@@ -24,6 +25,7 @@ QMAKE_CFLAGS_SHLIB = -KPIC
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_THREAD = -mt
+QMAKE_CFLAGS_HIDESYMS = -xldscope=hidden
QMAKE_CXX = CC
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
@@ -36,6 +38,7 @@ QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS
QMAKE_INCDIR = /usr/sfw/include
QMAKE_LIBDIR = /usr/sfw/lib
diff --git a/mkspecs/solaris-cc/qplatformdefs.h b/mkspecs/solaris-cc/qplatformdefs.h
index 128cd8f6f7..678d076aa5 100644
--- a/mkspecs/solaris-cc/qplatformdefs.h
+++ b/mkspecs/solaris-cc/qplatformdefs.h
@@ -76,90 +76,29 @@
#include <net/if.h>
#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_SOCKLEN_T
+#undef QT_SOCKET_CONNECT
+
+#define QT_SOCKET_CONNECT qt_socket_connect
+
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500) && (_XOPEN_VERSION-0 >= 500)
// Solaris 7 and better with specific feature test macros
-#define QT_SOCKLEN_T socklen_t
+#define QT_SOCKLEN_T socklen_t
#elif defined(_XOPEN_SOURCE_EXTENDED) && (_XOPEN_VERSION-0 >= 4)
// Solaris 2.6 and better with specific feature test macros
-#define QT_SOCKLEN_T size_t
+#define QT_SOCKLEN_T size_t
#else
// always this case in practice
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif
// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED
static inline int qt_socket_connect(int s, struct sockaddr *addr, QT_SOCKLEN_T addrlen)
{ return ::connect(s, addr, addrlen); }
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT qt_socket_connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
#if !defined(_XOPEN_UNIX)
// Solaris 2.5.1
// Function usleep() is defined in C library but not declared in header files
diff --git a/mkspecs/solaris-g++-64/qmake.conf b/mkspecs/solaris-g++-64/qmake.conf
index e89aff3f8c..587c630046 100644
--- a/mkspecs/solaris-g++-64/qmake.conf
+++ b/mkspecs/solaris-g++-64/qmake.conf
@@ -26,6 +26,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/solaris-g++-64/qplatformdefs.h b/mkspecs/solaris-g++-64/qplatformdefs.h
index d7aebaf4f3..bce0d5bad4 100644
--- a/mkspecs/solaris-g++-64/qplatformdefs.h
+++ b/mkspecs/solaris-g++-64/qplatformdefs.h
@@ -79,12 +79,11 @@
#include <net/if.h>
#endif
-// On 64-bit platforms sockets use socklen_t
-#define QT_SOCKLEN_T socklen_t
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
-// Only Solaris 7 and better support 64-bit
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#undef QT_SOCKET_CONNECT
+#define QT_SOCKET_CONNECT qt_socket_connect
// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED
static inline int qt_socket_connect(int s, struct sockaddr *addr, QT_SOCKLEN_T addrlen)
@@ -100,73 +99,8 @@ static inline int qt_socket_bind(int s, struct sockaddr *addr, QT_SOCKLEN_T addr
# undef bind
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT qt_socket_connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+// Only Solaris 7 and better support 64-bit
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/solaris-g++/qmake.conf b/mkspecs/solaris-g++/qmake.conf
index bce0889686..08149807ea 100644
--- a/mkspecs/solaris-g++/qmake.conf
+++ b/mkspecs/solaris-g++/qmake.conf
@@ -9,6 +9,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/solaris-g++/qplatformdefs.h b/mkspecs/solaris-g++/qplatformdefs.h
index 9984a384c2..573238803c 100644
--- a/mkspecs/solaris-g++/qplatformdefs.h
+++ b/mkspecs/solaris-g++/qplatformdefs.h
@@ -79,6 +79,16 @@
#include <net/if.h>
#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_SOCKLEN_T
+#undef QT_SOCKET_CONNECT
+#undef QT_SOCKET_BIND
+
+#define QT_SOCKET_CONNECT qt_socket_connect
+#define QT_SOCKET_BIND qt_socket_bind
+
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500) && (_XOPEN_VERSION-0 >= 500)
// Solaris 7 and better with specific feature test macros
#define QT_SOCKLEN_T socklen_t
@@ -104,75 +114,6 @@ static inline int qt_socket_bind(int s, struct sockaddr *addr, QT_SOCKLEN_T addr
# undef bind
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT qt_socket_connect
-#define QT_SOCKET_BIND qt_socket_bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
#if !defined(_XOPEN_UNIX)
// Solaris 2.5.1
// Function usleep() is defined in C library but not declared in header files
diff --git a/mkspecs/symbian-abld/qmake.conf b/mkspecs/symbian-abld/qmake.conf
index 499bf63cd3..33b897d1b8 100644
--- a/mkspecs/symbian-abld/qmake.conf
+++ b/mkspecs/symbian-abld/qmake.conf
@@ -5,5 +5,6 @@
#
MAKEFILE_GENERATOR = SYMBIAN_ABLD
+option(recursive)
include(../common/symbian/symbian.conf)
diff --git a/mkspecs/symbian-sbsv2/qmake.conf b/mkspecs/symbian-sbsv2/qmake.conf
index 0a5e8782bf..585e645405 100644
--- a/mkspecs/symbian-sbsv2/qmake.conf
+++ b/mkspecs/symbian-sbsv2/qmake.conf
@@ -5,5 +5,6 @@
#
MAKEFILE_GENERATOR = SYMBIAN_SBSV2
+option(recursive)
include(../common/symbian/symbian.conf)
diff --git a/mkspecs/tru64-cxx/qmake.conf b/mkspecs/tru64-cxx/qmake.conf
index 8cef84d81b..88021df958 100644
--- a/mkspecs/tru64-cxx/qmake.conf
+++ b/mkspecs/tru64-cxx/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl plugin_no_soname
QT += core gui
diff --git a/mkspecs/tru64-cxx/qplatformdefs.h b/mkspecs/tru64-cxx/qplatformdefs.h
index 54fb139215..ed07d5be2b 100644
--- a/mkspecs/tru64-cxx/qplatformdefs.h
+++ b/mkspecs/tru64-cxx/qplatformdefs.h
@@ -78,50 +78,21 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
+#define QT_NO_USE_FSEEKO
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_OFF_T
+#undef QT_SOCKLEN_T
+
#define QT_OFF_T off_t
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#if defined(_POSIX_PII_SOCKET)
+#define QT_SOCKLEN_T socklen_t
+#elif defined(_XOPEN_SOURCE_EXTENDED)
+#define QT_SOCKLEN_T size_t
+#else
+#define QT_SOCKLEN_T int
+#endif
#if defined(_XOPEN_SOURCE) && defined(_OSF_SOURCE)
// Not available in the <unistd.h> header file of Tru64 4.0F.
@@ -129,19 +100,10 @@
extern "C" int usleep(useconds_t);
#endif
-#if defined(_POSIX_PII_SOCKET)
-#define QT_SOCKLEN_T socklen_t
-#elif defined(_XOPEN_SOURCE_EXTENDED)
-#define QT_SOCKLEN_T size_t
-#else
-#define QT_SOCKLEN_T int
-#endif
-
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 400)
// Tru64 5.0 and better
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/tru64-g++/qmake.conf b/mkspecs/tru64-g++/qmake.conf
index 7749013eaf..71e5682485 100644
--- a/mkspecs/tru64-g++/qmake.conf
+++ b/mkspecs/tru64-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl plugin_no_soname
QT += core gui
diff --git a/mkspecs/tru64-g++/qplatformdefs.h b/mkspecs/tru64-g++/qplatformdefs.h
index 44c23f17fe..ed07d5be2b 100644
--- a/mkspecs/tru64-g++/qplatformdefs.h
+++ b/mkspecs/tru64-g++/qplatformdefs.h
@@ -78,50 +78,21 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
+#define QT_NO_USE_FSEEKO
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_OFF_T
+#undef QT_SOCKLEN_T
+
#define QT_OFF_T off_t
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#if defined(_POSIX_PII_SOCKET)
+#define QT_SOCKLEN_T socklen_t
+#elif defined(_XOPEN_SOURCE_EXTENDED)
+#define QT_SOCKLEN_T size_t
+#else
+#define QT_SOCKLEN_T int
+#endif
#if defined(_XOPEN_SOURCE) && defined(_OSF_SOURCE)
// Not available in the <unistd.h> header file of Tru64 4.0F.
@@ -129,19 +100,10 @@
extern "C" int usleep(useconds_t);
#endif
-#if defined(_POSIX_PII_SOCKET)
-# define QT_SOCKLEN_T socklen_t
-#elif defined(_XOPEN_SOURCE_EXTENDED)
-# define QT_SOCKLEN_T size_t
-#else
-# define QT_SOCKLEN_T int
-#endif
-
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 400)
// Tru64 5.0 and better
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unixware-cc/qmake.conf b/mkspecs/unixware-cc/qmake.conf
index 978aaa178a..5fb2b2cc3c 100644
--- a/mkspecs/unixware-cc/qmake.conf
+++ b/mkspecs/unixware-cc/qmake.conf
@@ -8,6 +8,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/unixware-cc/qplatformdefs.h b/mkspecs/unixware-cc/qplatformdefs.h
index e314713a3f..3a26042a39 100644
--- a/mkspecs/unixware-cc/qplatformdefs.h
+++ b/mkspecs/unixware-cc/qplatformdefs.h
@@ -76,55 +76,16 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
+#define QT_NO_USE_FSEEKO
+#include "../common/posix/qplatformdefs.h"
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#undef QT_OFF_T
+#undef QT_SOCKLEN_T
-#define QT_SOCKLEN_T size_t
+#define QT_OFF_T off_t
+#define QT_SOCKLEN_T size_t
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unixware-g++/qmake.conf b/mkspecs/unixware-g++/qmake.conf
index ce1a0f1c0b..b6a438a0b3 100644
--- a/mkspecs/unixware-g++/qmake.conf
+++ b/mkspecs/unixware-g++/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/unixware-g++/qplatformdefs.h b/mkspecs/unixware-g++/qplatformdefs.h
index e314713a3f..3a26042a39 100644
--- a/mkspecs/unixware-g++/qplatformdefs.h
+++ b/mkspecs/unixware-g++/qplatformdefs.h
@@ -76,55 +76,16 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_OPEN ::open
-#define QT_CLOSE ::close
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
+#define QT_NO_USE_FSEEKO
+#include "../common/posix/qplatformdefs.h"
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#undef QT_OFF_T
+#undef QT_SOCKLEN_T
-#define QT_SOCKLEN_T size_t
+#define QT_OFF_T off_t
+#define QT_SOCKLEN_T size_t
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unsupported/linux-host-g++/qmake.conf b/mkspecs/unsupported/linux-host-g++/qmake.conf
index 8a480c45df..7b17789bbe 100644
--- a/mkspecs/unsupported/linux-host-g++/qmake.conf
+++ b/mkspecs/unsupported/linux-host-g++/qmake.conf
@@ -88,8 +88,6 @@ QMAKE_INCDIR_OPENGL = /usr/X11R6/include
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL
-QMAKE_INCDIR_OPENGL_ES1CL = $$QMAKE_INCDIR_OPENGL
-QMAKE_LIBDIR_OPENGL_ES1CL = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_EGL =
@@ -106,7 +104,6 @@ QMAKE_LIBS_EGL = -lEGL
QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_OPENGL_ES1 = -lGLES_CM
-QMAKE_LIBS_OPENGL_ES1CL = -lGLES_CL
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
QMAKE_LIBS_OPENVG = -lOpenVG
QMAKE_LIBS_THREAD = -lpthread
diff --git a/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf b/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf
index 1ade6b9b84..28e7754066 100644
--- a/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf
+++ b/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf
@@ -12,6 +12,7 @@
# $staging/usr/lib/pkgconfig)
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
QT += core gui
diff --git a/mkspecs/unsupported/qnx-g++/qmake.conf b/mkspecs/unsupported/qnx-g++/qmake.conf
index 2e568dcabc..37e7bceec0 100644
--- a/mkspecs/unsupported/qnx-g++/qmake.conf
+++ b/mkspecs/unsupported/qnx-g++/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/unsupported/qnx-g++/qplatformdefs.h b/mkspecs/unsupported/qnx-g++/qplatformdefs.h
index 9fe67ddaa3..b5bcee8452 100644
--- a/mkspecs/unsupported/qnx-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/qnx-g++/qplatformdefs.h
@@ -81,76 +81,8 @@
// for htonl
#include <arpa/inet.h>
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::lstat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
-#define QT_READ ::read
-#define QT_WRITE ::write
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#define QT_SOCKLEN_T socklen_t
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../../common/posix/qplatformdefs.h"
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
diff --git a/mkspecs/unsupported/qws/qnx-641/qmake.conf b/mkspecs/unsupported/qws/qnx-641/qmake.conf
new file mode 100644
index 0000000000..12eaf1d301
--- /dev/null
+++ b/mkspecs/unsupported/qws/qnx-641/qmake.conf
@@ -0,0 +1,100 @@
+#
+# qmake configuration for qnx
+#
+# Written for QNX 6.4.1 without X11.
+#
+
+MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+DEFINES += QT_NO_NIS QT_NO_TEXTODFWRITER QT_OPENGL
+
+QMAKE_CC = qcc
+QMAKE_CFLAGS += -V4.3.3,gcc_ntox86_acpp-ne -pipe
+QMAKE_CFLAGS_DEPS += -M
+QMAKE_CFLAGS_WARN_ON += -Wall -W
+QMAKE_CFLAGS_WARN_OFF += -w
+QMAKE_CFLAGS_RELEASE += -O2
+QMAKE_CFLAGS_DEBUG += -g
+QMAKE_CFLAGS_SHLIB += -fPIC
+QMAKE_CFLAGS_STATIC_LIB += -fPIC
+QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
+QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
+QMAKE_COMPILER_DEFINES += __QNXNTO__
+
+QMAKE_CXX = qcc
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
+QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+
+QMAKE_LINK = qcc
+QMAKE_LINK_SHLIB = qcc
+QMAKE_LINK_SHLIB_CMD = $(LINK) $(LFLAGS) -o ../../lib/$(TARGET) $(OBJECTS) $(LIBS)
+QMAKE_LFLAGS = -V4.3.3,gcc_ntox86 -lang-c++ -Y_acpp-ne
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+QMAKE_LFLAGS_THREAD =
+QMAKE_LN_SHLIB = -cp
+QMAKE_RPATH = -Wl,-rpath,
+
+QMAKE_PCH_OUTPUT_EXT = .gch
+
+# -Bsymbolic-functions (ld) support
+QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
+QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list,
+
+include(../../common/unix.conf)
+
+QMAKE_CFLAGS_THREAD = -D_REENTRANT
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+
+
+QMAKE_LIBS = -lm -lz
+QMAKE_LIBS_DYNLOAD =
+QMAKE_LIBS_THREAD =
+QMAKE_LIBS_NETWORK += -lsocket
+QMAKE_LIBS_GUI += -lsocket
+QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
+QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe
+QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe
+
+QMAKE_AR = ntox86-ar cqs
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_COPY_FILE = $(COPY)
+QMAKE_COPY_DIR = $(COPY) -r
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+QMAKE_STRIP = strip
+QMAKE_STRIPFLAGS_LIB += --strip-unneeded
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+load(qt_config)
diff --git a/mkspecs/unsupported/qws/qnx-641/qplatformdefs.h b/mkspecs/unsupported/qws/qnx-641/qplatformdefs.h
new file mode 100644
index 0000000000..5912a51885
--- /dev/null
+++ b/mkspecs/unsupported/qws/qnx-641/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** 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 qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../qnx-g++/qplatformdefs.h"
diff --git a/mkspecs/unsupported/qws/qnx-generic-g++/qmake.conf b/mkspecs/unsupported/qws/qnx-generic-g++/qmake.conf
index 51fe69736c..62857bf220 100644
--- a/mkspecs/unsupported/qws/qnx-generic-g++/qmake.conf
+++ b/mkspecs/unsupported/qws/qnx-generic-g++/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/unsupported/qws/qnx-i386-g++/qmake.conf b/mkspecs/unsupported/qws/qnx-i386-g++/qmake.conf
index fffb80fa67..dce60ea539 100644
--- a/mkspecs/unsupported/qws/qnx-i386-g++/qmake.conf
+++ b/mkspecs/unsupported/qws/qnx-i386-g++/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/unsupported/qws/qnx-ppc-g++/qmake.conf b/mkspecs/unsupported/qws/qnx-ppc-g++/qmake.conf
index 56a9c66aea..93d04ffffb 100644
--- a/mkspecs/unsupported/qws/qnx-ppc-g++/qmake.conf
+++ b/mkspecs/unsupported/qws/qnx-ppc-g++/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/unsupported/vxworks-ppc-dcc/qmake.conf b/mkspecs/unsupported/vxworks-ppc-dcc/qmake.conf
index a8f7e49b56..fc0b12587c 100644
--- a/mkspecs/unsupported/vxworks-ppc-dcc/qmake.conf
+++ b/mkspecs/unsupported/vxworks-ppc-dcc/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl vxworks
QT += core gui network
diff --git a/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf b/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf
index be8c13d0b6..80b5f3e088 100644
--- a/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf
+++ b/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl vxworks
QT += core gui network
diff --git a/mkspecs/unsupported/vxworks-simpentium-dcc/qmake.conf b/mkspecs/unsupported/vxworks-simpentium-dcc/qmake.conf
index 6228a6be3a..be351725d9 100644
--- a/mkspecs/unsupported/vxworks-simpentium-dcc/qmake.conf
+++ b/mkspecs/unsupported/vxworks-simpentium-dcc/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl vxworks
QT += core gui network
diff --git a/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf b/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf
index 29e9c70c5d..83f46c052a 100644
--- a/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf
+++ b/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl vxworks
QT += core gui network
diff --git a/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h b/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h
index 33ffd96413..b183684864 100644
--- a/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h
@@ -47,84 +47,29 @@
#include "qglobal.h"
#include "qfunctions_vxworks.h"
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::stat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::stat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#undef QT_LSTAT
+#undef QT_MKDIR
+#undef QT_READ
+#undef QT_WRITE
+#undef QT_SOCKLEN_T
+#undef QT_SOCKET_CONNECT
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#define QT_LSTAT QT_STAT
+#define QT_MKDIR(dir, perm) ::mkdir(dir)
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT(sd, to, tolen) \
- ::connect(sd, (struct sockaddr *) to, tolen)
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
-#define QT_CLOSE ::close
#define QT_READ(fd, buf, len) ::read(fd, (char*) buf, len)
#define QT_WRITE(fd, buf, len) ::write(fd, (char*) buf, len)
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR(dir, perm) ::mkdir(dir)
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_LARGEFILE O_LARGEFILE
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
// there IS a socklen_t in sys/socket.h (unsigned int),
// but sockLib.h uses int in all function declaration...
-//#define QT_SOCKLEN_T socklen_t
#define QT_SOCKLEN_T int
+#define QT_SOCKET_CONNECT(sd, to, tolen) \
+ ::connect(sd, (struct sockaddr *) to, tolen)
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/win32-borland/qplatformdefs.h b/mkspecs/win32-borland/qplatformdefs.h
index 4efae9a536..d8fa4c258d 100644
--- a/mkspecs/win32-borland/qplatformdefs.h
+++ b/mkspecs/win32-borland/qplatformdefs.h
@@ -96,21 +96,16 @@
# define QT_STAT_LNK _S_IFLNK
#endif
-#define QT_FOPEN ::fopen
+#include "../common/c89/qplatformdefs.h"
+
#ifdef QT_LARGEFILE_SUPPORT
+#undef QT_FSEEK
+#undef QT_FTELL
+#undef QT_OFF_T
+
#define QT_FSEEK ::_fseeki64
#define QT_FTELL ::_ftelli64
-#else
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#endif
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_FPOS_T fpos_t
-#ifdef QT_LARGEFILE_SUPPORT
#define QT_OFF_T __int64
-#else
-#define QT_OFF_T long
#endif
#define QT_FILENO _fileno
diff --git a/mkspecs/win32-g++/qplatformdefs.h b/mkspecs/win32-g++/qplatformdefs.h
index 12828d148d..36333b63d8 100644
--- a/mkspecs/win32-g++/qplatformdefs.h
+++ b/mkspecs/win32-g++/qplatformdefs.h
@@ -133,21 +133,16 @@ typedef enum {
# define QT_OPEN_BINARY _O_BINARY
#endif
-#define QT_FOPEN ::fopen
+#include "../common/c89/qplatformdefs.h"
+
#ifdef QT_LARGEFILE_SUPPORT
+#undef QT_FSEEK
+#undef QT_FTELL
+#undef QT_OFF_T
+
#define QT_FSEEK ::fseeko64
#define QT_FTELL ::ftello64
-#else
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#endif
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_FPOS_T fpos_t
-#ifdef QT_LARGEFILE_SUPPORT
#define QT_OFF_T off64_t
-#else
-#define QT_OFF_T long
#endif
#define QT_SIGNAL_ARGS int
diff --git a/mkspecs/win32-icc/qmake.conf b/mkspecs/win32-icc/qmake.conf
index 78c947d960..fcc769163d 100644
--- a/mkspecs/win32-icc/qmake.conf
+++ b/mkspecs/win32-icc/qmake.conf
@@ -4,7 +4,7 @@
# Written for Intel C++
#
-MAKEFILE_GENERATOR = MSVC
+MAKEFILE_GENERATOR = MSVC.NET
TEMPLATE = app
CONFIG += qt warn_on release incremental flat link_prl copy_dir_files debug_and_release debug_and_release_target
QT += core gui
diff --git a/mkspecs/win32-icc/qplatformdefs.h b/mkspecs/win32-icc/qplatformdefs.h
index 6abfef2ccb..833846fc26 100644
--- a/mkspecs/win32-icc/qplatformdefs.h
+++ b/mkspecs/win32-icc/qplatformdefs.h
@@ -113,21 +113,19 @@
# define QT_OPEN_BINARY _O_BINARY
#endif
-#define QT_FOPEN ::fopen
+#include "../common/c89/qplatformdefs.h"
+
#if defined(QT_LARGEFILE_SUPPORT) && _MSC_VER > 1310
+#undef QT_FSEEK
+#undef QT_FTELL
+
#define QT_FSEEK ::_fseeki64
#define QT_FTELL ::_ftelli64
-#else
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
#endif
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_FPOS_T fpos_t
-#ifdef QT_LARGEFILE_SUPPORT
+
+#if defined(QT_LARGEFILE_SUPPORT)
+#undef QT_OFF_T
#define QT_OFF_T __int64
-#else
-#define QT_OFF_T long
#endif
#define QT_SIGNAL_ARGS int
diff --git a/mkspecs/win32-msvc.net/qmake.conf b/mkspecs/win32-msvc.net/qmake.conf
deleted file mode 100644
index 89fa00d407..0000000000
--- a/mkspecs/win32-msvc.net/qmake.conf
+++ /dev/null
@@ -1,89 +0,0 @@
-#
-# qmake configuration for win32-msvc.net (used by 2002 & 2003 before, but now deprecated. Use win32-msvc2002 or win32-msvc2003 instead)
-#
-# Written for Microsoft C++.NET
-#
-!build_pass:message("The mkspec/win32-msvc.net is now deprecated, use win32-msvc2002 or win32-msvc2003")
-
-MAKEFILE_GENERATOR = MSVC.NET
-TEMPLATE = app
-CONFIG += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target
-QT += core gui
-DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT
-QMAKE_COMPILER_DEFINES += _MSC_VER=1300 WIN32
-
-QMAKE_CC = cl
-QMAKE_LEX = flex
-QMAKE_LEXFLAGS =
-QMAKE_YACC = byacc
-QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -nologo -Zm300
-QMAKE_CFLAGS_WARN_ON = -W3
-QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O2 -MD
-QMAKE_CFLAGS_DEBUG = -Zi -MDd
-QMAKE_CFLAGS_YACC =
-
-QMAKE_CXX = $$QMAKE_CC
-QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189
-QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_STL_ON = -EHsc
-QMAKE_CXXFLAGS_STL_OFF =
-QMAKE_CXXFLAGS_RTTI_ON = -GR
-QMAKE_CXXFLAGS_RTTI_OFF =
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
-QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
-
-QMAKE_INCDIR =
-QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
-QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
-
-QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<<
-QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
-
-QMAKE_LINK = link
-QMAKE_LFLAGS = /NOLOGO
-QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
-QMAKE_LFLAGS_DEBUG = /DEBUG
-QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
-QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS
-QMAKE_LFLAGS_DLL = /DLL
-
-QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib
-QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib winspool.lib ws2_32.lib ole32.lib user32.lib advapi32.lib
-QMAKE_LIBS_NETWORK = ws2_32.lib
-QMAKE_LIBS_OPENGL = opengl32.lib glu32.lib gdi32.lib user32.lib
-QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
-
-QMAKE_LIBS_QT_ENTRY = -lqtmain
-
-QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
-QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
-QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe
-
-QMAKE_IDL = midl
-QMAKE_LIB = lib /NOLOGO
-QMAKE_RC = rc
-
-QMAKE_ZIP = zip -r -9
-
-QMAKE_COPY = copy /y
-QMAKE_COPY_DIR = xcopy /s /q /y /i
-QMAKE_MOVE = move
-QMAKE_DEL_FILE = del
-QMAKE_DEL_DIR = rmdir
-QMAKE_CHK_DIR_EXISTS = if not exist
-QMAKE_MKDIR = mkdir
-
-VCPROJ_EXTENSION = .vcproj
-VCSOLUTION_EXTENSION = .sln
-VCPROJ_KEYWORD = Qt4VSv1.0
-load(qt_config)
diff --git a/mkspecs/win32-msvc.net/qplatformdefs.h b/mkspecs/win32-msvc.net/qplatformdefs.h
deleted file mode 100644
index dcfaec590a..0000000000
--- a/mkspecs/win32-msvc.net/qplatformdefs.h
+++ /dev/null
@@ -1,147 +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 qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QPLATFORMDEFS_H
-#define QPLATFORMDEFS_H
-
-#ifdef UNICODE
-#ifndef _UNICODE
-#define _UNICODE
-#endif
-#endif
-
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-#define _POSIX_
-#include <limits.h>
-#undef _POSIX_
-
-#include <tchar.h>
-#include <io.h>
-#include <direct.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <windows.h>
-
-#define Q_FS_FAT
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct _stati64 // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
-#define QT_STAT ::_stati64
-#define QT_FSTAT ::_fstati64
-#else
-#define QT_STATBUF struct _stat // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
-#define QT_STAT ::_stat
-#define QT_FSTAT ::_fstat
-#endif
-#define QT_STAT_REG _S_IFREG
-#define QT_STAT_DIR _S_IFDIR
-#define QT_STAT_MASK _S_IFMT
-#if defined(_S_IFLNK)
-# define QT_STAT_LNK _S_IFLNK
-#endif
-#define QT_FILENO _fileno
-#define QT_OPEN ::_open
-#define QT_CLOSE ::_close
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_LSEEK ::_lseeki64
-#define QT_TSTAT ::_tstati64
-#else
-#define QT_LSEEK ::_lseek
-#define QT_TSTAT ::_tstat
-#endif
-#define QT_READ ::_read
-#define QT_WRITE ::_write
-#define QT_ACCESS ::_access
-#define QT_GETCWD ::_getcwd
-#define QT_CHDIR ::_chdir
-#define QT_MKDIR ::_mkdir
-#define QT_RMDIR ::_rmdir
-#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY _O_RDONLY
-#define QT_OPEN_WRONLY _O_WRONLY
-#define QT_OPEN_RDWR _O_RDWR
-#define QT_OPEN_CREAT _O_CREAT
-#define QT_OPEN_TRUNC _O_TRUNC
-#define QT_OPEN_APPEND _O_APPEND
-#if defined(O_TEXT)
-# define QT_OPEN_TEXT _O_TEXT
-# define QT_OPEN_BINARY _O_BINARY
-#endif
-
-#define QT_FOPEN ::fopen
-#ifdef QT_LARGEFILE_SUPPORT
-// 64-bit versions of fseek/ftell not always available. E.g., when linking
-// dynamically to CRT (/MT)
-#define QT_FSEEK ::fseek
-#define QT_FTELL (QT_OFF_T)::ftell
-#else
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#endif
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_FPOS_T fpos_t
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_OFF_T __int64
-#else
-#define QT_OFF_T long
-#endif
-
-#define QT_SIGNAL_ARGS int
-
-#define QT_VSNPRINTF ::_vsnprintf
-#define QT_SNPRINTF ::_snprintf
-
-# define F_OK 0
-# define X_OK 1
-# define W_OK 2
-# define R_OK 4
-
-typedef int mode_t;
-
-#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/win32-msvc/features/incremental.prf b/mkspecs/win32-msvc/features/incremental.prf
deleted file mode 100644
index 67596caaa5..0000000000
--- a/mkspecs/win32-msvc/features/incremental.prf
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG -= incremental_off
-QMAKE_LFLAGS_DEBUG += /incremental:yes
diff --git a/mkspecs/win32-msvc/features/incremental_off.prf b/mkspecs/win32-msvc/features/incremental_off.prf
deleted file mode 100644
index 9b6d19eb31..0000000000
--- a/mkspecs/win32-msvc/features/incremental_off.prf
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG -= incremental
-QMAKE_LFLAGS += /incremental:no
diff --git a/mkspecs/win32-msvc/qmake.conf b/mkspecs/win32-msvc/qmake.conf
deleted file mode 100644
index 64ab84a315..0000000000
--- a/mkspecs/win32-msvc/qmake.conf
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# qmake configuration for win32-msvc
-#
-# Written for Microsoft C++
-#
-
-MAKEFILE_GENERATOR = MSVC
-TEMPLATE = app
-CONFIG += qt warn_on release incremental flat link_prl precompile_header copy_dir_files no_delete_multiple_files debug_and_release debug_and_release_target
-QT += core gui
-DEFINES += UNICODE QT_LARGEFILE_SUPPORT
-QMAKE_COMPILER_DEFINES += _MSC_VER=1200 WIN32
-
-QMAKE_CC = cl
-QMAKE_LEX = flex
-QMAKE_LEXFLAGS =
-QMAKE_YACC = byacc
-QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -nologo -Zm200
-QMAKE_CFLAGS_WARN_ON = -W3
-QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O1 -MD
-QMAKE_CFLAGS_DEBUG = -Zi -MDd
-QMAKE_CFLAGS_YACC =
-
-QMAKE_CXX = $$QMAKE_CC
-QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
-QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_STL_ON = -GX
-QMAKE_CXXFLAGS_STL_OFF =
-QMAKE_CXXFLAGS_RTTI_ON = -GR
-QMAKE_CXXFLAGS_RTTI_OFF =
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -GX
-QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
-
-QMAKE_INCDIR =
-QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
-QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
-
-QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<<
-QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
-
-QMAKE_LINK = link
-QMAKE_LFLAGS = /NOLOGO
-QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
-QMAKE_LFLAGS_DEBUG = /DEBUG
-QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:console
-QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:windows
-QMAKE_LFLAGS_DLL = /DLL
-
-QMAKE_LIBS =
-QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib
-QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib winspool.lib ws2_32.lib ole32.lib user32.lib advapi32.lib
-QMAKE_LIBS_NETWORK = ws2_32.lib
-QMAKE_LIBS_OPENGL = opengl32.lib glu32.lib gdi32.lib user32.lib delayimp.lib
-QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
-QMAKE_LIBS_QT_ENTRY = -lqtmain
-
-QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
-QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
-QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe
-
-QMAKE_IDL = midl
-QMAKE_LIB = lib /NOLOGO
-QMAKE_RC = rc
-
-QMAKE_ZIP = zip -r -9
-
-QMAKE_COPY = copy /y
-QMAKE_COPY_DIR = xcopy /s /q /y /i
-QMAKE_MOVE = move
-QMAKE_DEL_FILE = del
-QMAKE_DEL_DIR = rmdir
-QMAKE_CHK_DIR_EXISTS = if not exist
-QMAKE_MKDIR = mkdir
-
-DSP_EXTENSION = .dsp
-load(qt_config)
diff --git a/mkspecs/win32-msvc/qplatformdefs.h b/mkspecs/win32-msvc/qplatformdefs.h
deleted file mode 100644
index 5dee28c3ef..0000000000
--- a/mkspecs/win32-msvc/qplatformdefs.h
+++ /dev/null
@@ -1,148 +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 qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QPLATFORMDEFS_H
-#define QPLATFORMDEFS_H
-
-#ifdef UNICODE
-#ifndef _UNICODE
-#define _UNICODE
-#endif
-#endif
-
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-#define _POSIX_
-#include <limits.h>
-#undef _POSIX_
-
-#include <tchar.h>
-#include <io.h>
-#include <direct.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <windows.h>
-
-#define Q_FS_FAT
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct _stati64 // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
-#define QT_STAT ::_stati64
-#define QT_FSTAT ::_fstati64
-#else
-#define QT_STATBUF struct _stat // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
-#define QT_STAT ::_stat
-#define QT_FSTAT ::_fstat
-#endif
-#define QT_STAT_REG _S_IFREG
-#define QT_STAT_DIR _S_IFDIR
-#define QT_STAT_MASK _S_IFMT
-#if defined(_S_IFLNK)
-# define QT_STAT_LNK _S_IFLNK
-#endif
-#define QT_FILENO _fileno
-#define QT_OPEN ::_open
-#define QT_CLOSE ::_close
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_LSEEK ::_lseeki64
-#define QT_TSTAT ::_tstati64
-#else
-#define QT_LSEEK ::_lseek
-#define QT_TSTAT ::_tstat
-#endif
-#define QT_READ ::_read
-#define QT_WRITE ::_write
-#define QT_ACCESS ::_access
-#define QT_GETCWD ::_getcwd
-#define QT_CHDIR ::_chdir
-#define QT_MKDIR ::_mkdir
-#define QT_RMDIR ::_rmdir
-#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY _O_RDONLY
-#define QT_OPEN_WRONLY _O_WRONLY
-#define QT_OPEN_RDWR _O_RDWR
-#define QT_OPEN_CREAT _O_CREAT
-#define QT_OPEN_TRUNC _O_TRUNC
-#define QT_OPEN_APPEND _O_APPEND
-#if defined(O_TEXT)
-# define QT_OPEN_TEXT _O_TEXT
-# define QT_OPEN_BINARY _O_BINARY
-#endif
-
-#define QT_FOPEN ::fopen
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#else
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#endif
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_FPOS_T fpos_t
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_OFF_T __int64
-#else
-#define QT_OFF_T long
-#endif
-
-#define QT_SIGNAL_ARGS int
-
-#if defined(_MSC_VER) && _MSC_VER < 1400
-# define QT_VSNPRINTF ::_vsnprintf
-#endif
-#define QT_SNPRINTF ::_snprintf
-
-# define F_OK 0
-# define X_OK 1
-# define W_OK 2
-# define R_OK 4
-
-typedef int mode_t;
-
-
-#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/win32-msvc2002/qmake.conf b/mkspecs/win32-msvc2002/qmake.conf
deleted file mode 100644
index 13fbfb0661..0000000000
--- a/mkspecs/win32-msvc2002/qmake.conf
+++ /dev/null
@@ -1,88 +0,0 @@
-#
-# qmake configuration for win32-msvc2002
-#
-# Written for Microsoft C++.NET
-#
-
-MAKEFILE_GENERATOR = MSVC.NET
-TEMPLATE = app
-CONFIG += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target
-QT += core gui
-DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT
-QMAKE_COMPILER_DEFINES += _MSC_VER=1300 WIN32
-
-QMAKE_CC = cl
-QMAKE_LEX = flex
-QMAKE_LEXFLAGS =
-QMAKE_YACC = byacc
-QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -nologo -Zm300
-QMAKE_CFLAGS_WARN_ON = -W3
-QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O2 -MD
-QMAKE_CFLAGS_DEBUG = -Zi -MDd
-QMAKE_CFLAGS_YACC =
-
-QMAKE_CXX = $$QMAKE_CC
-QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189
-QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_STL_ON = -EHsc
-QMAKE_CXXFLAGS_STL_OFF =
-QMAKE_CXXFLAGS_RTTI_ON = -GR
-QMAKE_CXXFLAGS_RTTI_OFF =
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
-QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
-
-QMAKE_INCDIR =
-QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
-QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
-
-QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<<
-QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
-
-QMAKE_LINK = link
-QMAKE_LFLAGS = /NOLOGO
-QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
-QMAKE_LFLAGS_DEBUG = /DEBUG
-QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
-QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS
-QMAKE_LFLAGS_DLL = /DLL
-
-QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib
-QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib winspool.lib ws2_32.lib ole32.lib user32.lib advapi32.lib
-QMAKE_LIBS_NETWORK = ws2_32.lib
-QMAKE_LIBS_OPENGL = opengl32.lib glu32.lib gdi32.lib user32.lib
-QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
-
-QMAKE_LIBS_QT_ENTRY = -lqtmain
-
-QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
-QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
-QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe
-
-QMAKE_IDL = midl
-QMAKE_LIB = lib /NOLOGO
-QMAKE_RC = rc
-
-QMAKE_ZIP = zip -r -9
-
-QMAKE_COPY = copy /y
-QMAKE_COPY_DIR = xcopy /s /q /y /i
-QMAKE_MOVE = move
-QMAKE_DEL_FILE = del
-QMAKE_DEL_DIR = rmdir
-QMAKE_CHK_DIR_EXISTS = if not exist
-QMAKE_MKDIR = mkdir
-
-VCPROJ_EXTENSION = .vcproj
-VCSOLUTION_EXTENSION = .sln
-VCPROJ_KEYWORD = Qt4VSv1.0
-load(qt_config)
diff --git a/mkspecs/win32-msvc2002/qplatformdefs.h b/mkspecs/win32-msvc2002/qplatformdefs.h
deleted file mode 100644
index 6d71abfb76..0000000000
--- a/mkspecs/win32-msvc2002/qplatformdefs.h
+++ /dev/null
@@ -1,42 +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 qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../win32-msvc.net/qplatformdefs.h"
diff --git a/mkspecs/win32-msvc2003/qplatformdefs.h b/mkspecs/win32-msvc2003/qplatformdefs.h
index 6d71abfb76..05584c94c2 100644
--- a/mkspecs/win32-msvc2003/qplatformdefs.h
+++ b/mkspecs/win32-msvc2003/qplatformdefs.h
@@ -39,4 +39,102 @@
**
****************************************************************************/
-#include "../win32-msvc.net/qplatformdefs.h"
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+#ifdef UNICODE
+#ifndef _UNICODE
+#define _UNICODE
+#endif
+#endif
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+#define _POSIX_
+#include <limits.h>
+#undef _POSIX_
+
+#include <tchar.h>
+#include <io.h>
+#include <direct.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <windows.h>
+
+#define Q_FS_FAT
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct _stati64 // non-ANSI defs
+#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
+#define QT_STAT ::_stati64
+#define QT_FSTAT ::_fstati64
+#else
+#define QT_STATBUF struct _stat // non-ANSI defs
+#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
+#define QT_STAT ::_stat
+#define QT_FSTAT ::_fstat
+#endif
+#define QT_STAT_REG _S_IFREG
+#define QT_STAT_DIR _S_IFDIR
+#define QT_STAT_MASK _S_IFMT
+#if defined(_S_IFLNK)
+# define QT_STAT_LNK _S_IFLNK
+#endif
+#define QT_FILENO _fileno
+#define QT_OPEN ::_open
+#define QT_CLOSE ::_close
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_LSEEK ::_lseeki64
+#define QT_TSTAT ::_tstati64
+#else
+#define QT_LSEEK ::_lseek
+#define QT_TSTAT ::_tstat
+#endif
+#define QT_READ ::_read
+#define QT_WRITE ::_write
+#define QT_ACCESS ::_access
+#define QT_GETCWD ::_getcwd
+#define QT_CHDIR ::_chdir
+#define QT_MKDIR ::_mkdir
+#define QT_RMDIR ::_rmdir
+#define QT_OPEN_LARGEFILE 0
+#define QT_OPEN_RDONLY _O_RDONLY
+#define QT_OPEN_WRONLY _O_WRONLY
+#define QT_OPEN_RDWR _O_RDWR
+#define QT_OPEN_CREAT _O_CREAT
+#define QT_OPEN_TRUNC _O_TRUNC
+#define QT_OPEN_APPEND _O_APPEND
+#if defined(O_TEXT)
+# define QT_OPEN_TEXT _O_TEXT
+# define QT_OPEN_BINARY _O_BINARY
+#endif
+
+#include "../common/c89/qplatformdefs.h"
+
+#ifdef QT_LARGEFILE_SUPPORT
+#undef QT_FTELL
+#undef QT_OFF_T
+
+// 64-bit versions of fseek/ftell not always available. E.g., when linking
+// dynamically to CRT (/MT)
+#define QT_FTELL (QT_OFF_T)::ftell
+#define QT_OFF_T __int64
+#endif
+
+#define QT_SIGNAL_ARGS int
+
+#define QT_VSNPRINTF ::_vsnprintf
+#define QT_SNPRINTF ::_snprintf
+
+# define F_OK 0
+# define X_OK 1
+# define W_OK 2
+# define R_OK 4
+
+typedef int mode_t;
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/win32-msvc2005/qplatformdefs.h b/mkspecs/win32-msvc2005/qplatformdefs.h
index b87ea48fa2..33360b7680 100644
--- a/mkspecs/win32-msvc2005/qplatformdefs.h
+++ b/mkspecs/win32-msvc2005/qplatformdefs.h
@@ -113,21 +113,16 @@
# define QT_OPEN_BINARY _O_BINARY
#endif
-#define QT_FOPEN ::fopen
+#include "../common/c89/qplatformdefs.h"
+
#ifdef QT_LARGEFILE_SUPPORT
+#undef QT_FSEEK
+#undef QT_FTELL
+#undef QT_OFF_T
+
#define QT_FSEEK ::_fseeki64
#define QT_FTELL ::_ftelli64
-#else
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#endif
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_FPOS_T fpos_t
-#ifdef QT_LARGEFILE_SUPPORT
#define QT_OFF_T __int64
-#else
-#define QT_OFF_T long
#endif
#define QT_SIGNAL_ARGS int
diff --git a/projects.pro b/projects.pro
index d405a5badd..19a5ff8e00 100644
--- a/projects.pro
+++ b/projects.pro
@@ -112,7 +112,8 @@ win32 {
}
symbian {
confclean.depends += distclean
- confclean.commands += \
+ contains(QMAKE_HOST.os, "Windows") {
+ confclean.commands += \
(cd src\tools\moc && $(MAKE) distclean) $$escape_expand(\n\t) \
(cd src\tools\rcc && $(MAKE) distclean) $$escape_expand(\n\t) \
(cd src\tools\uic && $(MAKE) distclean) $$escape_expand(\n\t) \
@@ -121,7 +122,17 @@ symbian {
-$(DEL_FILE) mkspecs\qconfig.pri $$escape_expand(\n\t) \
-$(DEL_FILE) .qmake.cache $$escape_expand(\n\t) \
(cd qmake && $(MAKE) distclean)
-
+ } else {
+ confclean.commands += \
+ (cd src/tools/moc && $(MAKE) distclean) $$escape_expand(\n\t) \
+ (cd src/tools/rcc && $(MAKE) distclean) $$escape_expand(\n\t) \
+ (cd src/tools/uic && $(MAKE) distclean) $$escape_expand(\n\t) \
+ -$(DEL_FILE) src/corelib/global/qconfig.h $$escape_expand(\n\t) \
+ -$(DEL_FILE) src/corelib/global/qconfig.cpp $$escape_expand(\n\t) \
+ -$(DEL_FILE) mkspecs/qconfig.pri $$escape_expand(\n\t) \
+ -$(DEL_FILE) .qmake.cache $$escape_expand(\n\t) \
+ (cd qmake && $(MAKE) distclean)
+ }
}
QMAKE_EXTRA_TARGETS += confclean
qmakeclean.commands += (cd qmake && $(MAKE) clean)
diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix
index d4f5849e90..c101626817 100644
--- a/qmake/Makefile.unix
+++ b/qmake/Makefile.unix
@@ -9,7 +9,7 @@ LFLAGS = @QMAKE_LFLAGS@
OBJS=project.o property.o main.o makefile.o unixmake2.o unixmake.o \
mingw_make.o option.o winmakefile.o projectgenerator.o \
meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o \
- borland_bmake.o msvc_dsp.o msvc_vcproj.o msvc_nmake.o msvc_objectmodel.o \
+ borland_bmake.o msvc_vcproj.o msvc_nmake.o msvc_objectmodel.o \
symmake.o initprojectdeploy_symbian.o symmake_abld.o symmake_sbsv2.o \
registry.o \
epocroot.o
@@ -271,9 +271,6 @@ msvc_nmake.o: generators/win32/msvc_nmake.cpp
pbuilder_pbx.o: generators/mac/pbuilder_pbx.cpp
$(CXX) -c -o $@ $(CXXFLAGS) generators/mac/pbuilder_pbx.cpp
-msvc_dsp.o: generators/win32/msvc_dsp.cpp
- $(CXX) -c -o $@ $(CXXFLAGS) generators/win32/msvc_dsp.cpp
-
symmake.o: generators/symbian/symmake.cpp
$(CXX) -c -o $@ $(CXXFLAGS) generators/symbian/symmake.cpp
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32
index 48d84b74e3..a598350073 100644
--- a/qmake/Makefile.win32
+++ b/qmake/Makefile.win32
@@ -75,7 +75,7 @@ ADDCLEAN = qmake.tds
OBJS = project.obj main.obj makefile.obj unixmake.obj unixmake2.obj mingw_make.obj \
option.obj winmakefile.obj projectgenerator.obj property.obj meta.obj \
makefiledeps.obj metamakefile.obj xmloutput.obj pbuilder_pbx.obj \
- borland_bmake.obj msvc_nmake.obj msvc_dsp.obj msvc_vcproj.obj \
+ borland_bmake.obj msvc_nmake.obj msvc_vcproj.obj \
msvc_objectmodel.obj symmake.obj initprojectdeploy_symbian.obj \
registry.obj \
epocroot.obj \
@@ -195,7 +195,6 @@ clean::
-del xmloutput.obj
-del borland_bmake.obj
-del msvc_nmake.obj
- -del msvc_dsp.obj
-del msvc_vcproj.obj
-del msvc_objectmodel.obj
-del symmake.obj
@@ -382,9 +381,6 @@ mingw_make.obj: $(SOURCE_PATH)/qmake/generators/win32/mingw_make.cpp
msvc_nmake.obj: $(SOURCE_PATH)/qmake/generators/win32/msvc_nmake.cpp
$(CXX) $(CXXFLAGS) generators/win32/msvc_nmake.cpp
-msvc_dsp.obj: $(SOURCE_PATH)/qmake/generators/win32/msvc_dsp.cpp
- $(CXX) $(CXXFLAGS) generators/win32/msvc_dsp.cpp
-
msvc_vcproj.obj: $(SOURCE_PATH)/qmake/generators/win32/msvc_vcproj.cpp
$(CXX) $(CXXFLAGS) generators/win32/msvc_vcproj.cpp
diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++
index 169de3c773..27ae27b7ed 100644
--- a/qmake/Makefile.win32-g++
+++ b/qmake/Makefile.win32-g++
@@ -27,7 +27,7 @@ CFLAGS = -c -o$@ -O \
-DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \
-DQT_BOOTSTRAPPED
CXXFLAGS = $(CFLAGS)
-LFLAGS =
+LFLAGS = -static-libgcc -s
LIBS = -lole32 -luuid
LINKQMAKE = g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS)
ADDCLEAN =
@@ -37,7 +37,7 @@ ADDCLEAN =
OBJS = project.o main.o makefile.o unixmake.o unixmake2.o mingw_make.o \
option.o winmakefile.o projectgenerator.o property.o meta.o \
makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o \
- borland_bmake.o msvc_nmake.o msvc_dsp.o msvc_vcproj.o \
+ borland_bmake.o msvc_nmake.o msvc_vcproj.o \
msvc_objectmodel.o symmake.o initprojectdeploy_symbian.o \
registry.o \
epocroot.o \
@@ -260,9 +260,6 @@ mingw_make.o: $(SOURCE_PATH)/qmake/generators/win32/mingw_make.cpp
msvc_nmake.o: $(SOURCE_PATH)/qmake/generators/win32/msvc_nmake.cpp
$(CXX) $(CXXFLAGS) generators/win32/msvc_nmake.cpp
-msvc_dsp.o: $(SOURCE_PATH)/qmake/generators/win32/msvc_dsp.cpp
- $(CXX) $(CXXFLAGS) generators/win32/msvc_dsp.cpp
-
msvc_vcproj.o: $(SOURCE_PATH)/qmake/generators/win32/msvc_vcproj.cpp
$(CXX) $(CXXFLAGS) generators/win32/msvc_vcproj.cpp
diff --git a/qmake/Makefile.win32-g++-sh b/qmake/Makefile.win32-g++-sh
index 98237e779c..f7b486f1e7 100644
--- a/qmake/Makefile.win32-g++-sh
+++ b/qmake/Makefile.win32-g++-sh
@@ -27,7 +27,7 @@ CFLAGS = -c -o$@ -O \
-DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \
-DQT_BOOTSTRAPPED
CXXFLAGS = $(CFLAGS)
-LFLAGS =
+LFLAGS = -static-libgcc -s
LIBS = -lole32 -luuid
LINKQMAKE = g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS)
ADDCLEAN =
@@ -37,7 +37,7 @@ ADDCLEAN =
OBJS = project.o main.o makefile.o unixmake.o unixmake2.o mingw_make.o \
option.o winmakefile.o projectgenerator.o property.o meta.o \
makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o \
- borland_bmake.o msvc_nmake.o msvc_dsp.o msvc_vcproj.o \
+ borland_bmake.o msvc_nmake.o msvc_vcproj.o \
msvc_objectmodel.o symmake.o initprojectdeploy_symbian.o \
registry.o \
epocroot.o \
@@ -259,9 +259,6 @@ mingw_make.o: $(SOURCE_PATH)/qmake/generators/win32/mingw_make.cpp
msvc_nmake.o: $(SOURCE_PATH)/qmake/generators/win32/msvc_nmake.cpp
$(CXX) $(CXXFLAGS) generators/win32/msvc_nmake.cpp
-msvc_dsp.o: $(SOURCE_PATH)/qmake/generators/win32/msvc_dsp.cpp
- $(CXX) $(CXXFLAGS) generators/win32/msvc_dsp.cpp
-
msvc_vcproj.o: $(SOURCE_PATH)/qmake/generators/win32/msvc_vcproj.cpp
$(CXX) $(CXXFLAGS) generators/win32/msvc_vcproj.cpp
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index ac9fa998d2..1a7391b5dd 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -523,9 +523,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
debug_msg(1, "pbuilder: Creating file: %s", mkfile.toLatin1().constData());
QTextStream mkt(&mkf);
writeHeader(mkt);
- mkt << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ?
- QString((QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmake")) :
- var("QMAKE_QMAKE")) << endl;
+ mkt << "QMAKE = " << var("QMAKE_QMAKE") << endl;
writeMakeQmake(mkt);
mkt.flush();
mkf.close();
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index db2737bd5f..b9d2445982 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -806,9 +806,8 @@ MakefileGenerator::init()
}
// escape qmake command
- if (!project->isEmpty("QMAKE_QMAKE")) {
- project->values("QMAKE_QMAKE") = escapeFilePaths(project->values("QMAKE_QMAKE"));
- }
+ QStringList &qmk = project->values("QMAKE_QMAKE");
+ qmk = escapeFilePaths(qmk);
}
bool
@@ -1808,8 +1807,6 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
tmp_clean = tmp_out;
if(tmp_clean.indexOf("${QMAKE_") == -1) {
t << "\n\t" << "-$(DEL_FILE) " << tmp_clean;
- if (isForSymbian())
- t << " 2> NUL"; // Eliminate unnecessary warnings
wrote_clean = true;
}
if(!wrote_clean_cmds || !wrote_clean) {
@@ -1837,12 +1834,8 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
cleans.append(files);
}
}
- if(!cleans.isEmpty()) {
- if (isForSymbian())
- t << valGlue(cleans, "\n\t" + del_statement, " 2> NUL\n\t" + del_statement, " 2> NUL");
- else
- t << valGlue(cleans, "\n\t" + del_statement, "\n\t" + del_statement, "");
- }
+ if(!cleans.isEmpty())
+ t << valGlue(cleans, "\n\t" + del_statement, "\n\t" + del_statement, "");
if(!wrote_clean_cmds) {
for(QStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) {
t << "\n\t" << replaceExtraCompilerVariables(tmp_clean_cmds, (*input),
@@ -2103,7 +2096,7 @@ MakefileGenerator::writeExtraVariables(QTextStream &t)
bool
MakefileGenerator::writeStubMakefile(QTextStream &t)
{
- t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl;
+ t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it)
t << *it << " ";
@@ -2158,14 +2151,14 @@ QString MakefileGenerator::buildArgs(const QString &outdir)
ret += " -nodependheuristics";
if(!Option::mkfile::qmakespec_commandline.isEmpty())
ret += " -spec " + specdir(outdir);
- if(Option::target_mode == Option::TARG_MAC9_MODE)
- ret += " -mac9";
- else if(Option::target_mode == Option::TARG_MACX_MODE)
- ret += " -macx";
- else if(Option::target_mode == Option::TARG_UNIX_MODE)
- ret += " -unix";
- else if(Option::target_mode == Option::TARG_WIN_MODE)
- ret += " -win32";
+ if (Option::target_mode_overridden) {
+ if (Option::target_mode == Option::TARG_MACX_MODE)
+ ret += " -macx";
+ else if (Option::target_mode == Option::TARG_UNIX_MODE)
+ ret += " -unix";
+ else if (Option::target_mode == Option::TARG_WIN_MODE)
+ ret += " -win32";
+ }
//configs
for(QStringList::Iterator it = Option::user_configs.begin();
@@ -2218,8 +2211,7 @@ MakefileGenerator::writeHeader(QTextStream &t)
t << "# Project: " << fileFixify(project->projectFile()) << endl;
t << "# Template: " << var("TEMPLATE") << endl;
if(!project->isActiveConfig("build_pass"))
- t << "# Command: " << build_args().replace("$(QMAKE)",
- (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE"))) << endl;
+ t << "# Command: " << build_args().replace("$(QMAKE)", var("QMAKE_QMAKE")) << endl;
t << "#############################################################################" << endl;
t << endl;
}
@@ -2352,7 +2344,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
t << "MAKEFILE = " << ofile << endl;
/* Calling Option::fixPathToTargetOS() is necessary for MinGW/MSYS, which requires
* back-slashes to be turned into slashes. */
- t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl;
+ t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl;
t << "MKDIR = " << var("QMAKE_MKDIR") << endl;
@@ -2675,8 +2667,6 @@ MakefileGenerator::writeMakeQmake(QTextStream &t)
if(!specdir().isEmpty()) {
if(exists(Option::fixPathToLocalOS(specdir()+QDir::separator()+"qmake.conf")))
t << escapeDependencyPath(specdir() + Option::dir_sep + "qmake.conf") << " ";
- else if(exists(Option::fixPathToLocalOS(specdir()+QDir::separator()+"tmake.conf")))
- t << escapeDependencyPath(specdir() + Option::dir_sep + "tmake.conf") << " ";
}
const QStringList &included = project->values("QMAKE_INTERNAL_INCLUDED_FILES");
t << escapeDependencyPaths(included).join(" \\\n\t\t") << "\n\t"
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index d89c3b15bd..addb1f5ed3 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -247,7 +247,8 @@ public:
virtual bool supportsMergedBuilds() { return false; }
virtual bool mergeBuildProject(MakefileGenerator * /*other*/) { return false; }
virtual bool openOutput(QFile &, const QString &build) const;
- virtual bool isWindowsShell() const { return Option::target_mode == Option::TARG_WIN_MODE; }
+ virtual bool isWindowsShell() const { return Option::host_mode == Option::HOST_WIN_MODE; }
+ virtual bool isForSymbianSbsv2() const { return false; } // FIXME: killme - i'm ugly!
};
inline void MakefileGenerator::setNoIO(bool o)
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index 415119371a..bc8927c702 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -293,7 +293,15 @@ SubdirsMetaMakefileGenerator::init()
init_flag = true;
bool hasError = false;
- if(Option::recursive) {
+ // It might make sense to bequeath the CONFIG option to the recursed
+ // projects. OTOH, one would most likely have it in all projects anyway -
+ // either through a qmakespec, a .qmake.cache or explicitly - as otherwise
+ // running qmake in a subdirectory would have a different auto-recurse
+ // setting than in parent directories.
+ bool recurse = Option::recursive == Option::QMAKE_RECURSIVE_YES
+ || (Option::recursive == Option::QMAKE_RECURSIVE_DEFAULT
+ && project->isRecursive());
+ if(recurse) {
QString old_output_dir = Option::output_dir;
QString old_output = Option::output.fileName();
QString oldpwd = qmake_getpwd();
@@ -375,7 +383,7 @@ SubdirsMetaMakefileGenerator::init()
Subdir *self = new Subdir;
self->input_dir = qmake_getpwd();
self->output_dir = Option::output_dir;
- if(!Option::recursive || (!Option::output.fileName().endsWith(Option::dir_sep) && !QFileInfo(Option::output).isDir()))
+ if(!recurse || (!Option::output.fileName().endsWith(Option::dir_sep) && !QFileInfo(Option::output).isDir()))
self->output_file = Option::output.fileName();
self->makefile = new BuildsMetaMakefileGenerator(project, name, false);
self->makefile->init();
@@ -432,7 +440,6 @@ QT_BEGIN_INCLUDE_NAMESPACE
#include "pbuilder_pbx.h"
#include "msvc_nmake.h"
#include "borland_bmake.h"
-#include "msvc_dsp.h"
#include "msvc_vcproj.h"
#include "symmake_abld.h"
#include "symmake_sbsv2.h"
@@ -458,15 +465,8 @@ MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO)
mkfile = new MingwMakefileGenerator;
} else if(gen == "PROJECTBUILDER" || gen == "XCODE") {
mkfile = new ProjectBuilderMakefileGenerator;
- } else if(gen == "MSVC") {
- // Visual Studio =< v6.0
- if(proj->first("TEMPLATE").indexOf(QRegExp("^vc.*")) != -1)
- mkfile = new DspMakefileGenerator;
- else
- mkfile = new NmakeMakefileGenerator;
} else if(gen == "MSVC.NET") {
- // Visual Studio >= v7.0
- if(proj->first("TEMPLATE").indexOf(QRegExp("^vc.*")) != -1 || proj->first("TEMPLATE").indexOf(QRegExp("^ce.*")) != -1)
+ if (proj->first("TEMPLATE").startsWith("vc"))
mkfile = new VcprojGenerator;
else
mkfile = new NmakeMakefileGenerator;
@@ -486,6 +486,40 @@ MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO)
return mkfile;
}
+bool
+MetaMakefileGenerator::modesForGenerator(const QString &gen,
+ Option::HOST_MODE *host_mode, Option::TARG_MODE *target_mode)
+{
+ if (gen == "UNIX") {
+#ifdef Q_OS_MAC
+ *host_mode = Option::HOST_MACX_MODE;
+ *target_mode = Option::TARG_MACX_MODE;
+#else
+ *host_mode = Option::HOST_UNIX_MODE;
+ *target_mode = Option::TARG_UNIX_MODE;
+#endif
+ } else if (gen == "MSVC.NET" || gen == "MINGW" || gen == "BMAKE") {
+ *host_mode = Option::HOST_WIN_MODE;
+ *target_mode = Option::TARG_WIN_MODE;
+ } else if (gen == "PROJECTBUILDER" || gen == "XCODE") {
+ *host_mode = Option::HOST_MACX_MODE;
+ *target_mode = Option::TARG_MACX_MODE;
+ } else if (gen == "SYMBIAN_ABLD" || gen == "SYMBIAN_SBSV2") {
+#if defined(Q_OS_MAC)
+ *host_mode = Option::HOST_MACX_MODE;
+#elif defined(Q_OS_UNIX)
+ *host_mode = Option::HOST_UNIX_MODE;
+#else
+ *host_mode = Option::HOST_WIN_MODE;
+#endif
+ *target_mode = Option::TARG_SYMBIAN_MODE;
+ } else {
+ fprintf(stderr, "Unknown generator specified: %s\n", gen.toLatin1().constData());
+ return false;
+ }
+ return true;
+}
+
MetaMakefileGenerator *
MetaMakefileGenerator::createMetaGenerator(QMakeProject *proj, const QString &name, bool op, bool *success)
{
diff --git a/qmake/generators/metamakefile.h b/qmake/generators/metamakefile.h
index 867511589b..e559c8e863 100644
--- a/qmake/generators/metamakefile.h
+++ b/qmake/generators/metamakefile.h
@@ -42,6 +42,8 @@
#ifndef METAMAKEFILE_H
#define METAMAKEFILE_H
+#include <option.h>
+
#include <qlist.h>
#include <qstring.h>
@@ -65,6 +67,9 @@ public:
static MetaMakefileGenerator *createMetaGenerator(QMakeProject *proj, const QString &name, bool op=true, bool *success = 0);
static MakefileGenerator *createMakefileGenerator(QMakeProject *proj, bool noIO = false);
+ static bool modesForGenerator(const QString &generator,
+ Option::HOST_MODE *host_mode, Option::TARG_MODE *target_mode);
+
inline QMakeProject *projectFile() const { return project; }
virtual bool init() = 0;
diff --git a/qmake/generators/projectgenerator.cpp b/qmake/generators/projectgenerator.cpp
index 8622cd9fd4..d2256359db 100644
--- a/qmake/generators/projectgenerator.cpp
+++ b/qmake/generators/projectgenerator.cpp
@@ -111,7 +111,7 @@ ProjectGenerator::init()
add_depend = true;
if(dir.right(1) != Option::dir_sep)
dir += Option::dir_sep;
- if(Option::recursive) {
+ if(Option::recursive == Option::QMAKE_RECURSIVE_YES) {
QStringList files = QDir(dir).entryList(QDir::Files);
for(int i = 0; i < (int)files.count(); i++) {
if(files[i] != "." && files[i] != "..")
@@ -138,7 +138,7 @@ ProjectGenerator::init()
dir = regex.left(s+1);
regex = regex.right(regex.length() - (s+1));
}
- if(Option::recursive) {
+ if(Option::recursive == Option::QMAKE_RECURSIVE_YES) {
QStringList entries = QDir(dir).entryList(QDir::Dirs);
for(int i = 0; i < (int)entries.count(); i++) {
if(entries[i] != "." && entries[i] != "..") {
@@ -193,7 +193,7 @@ ProjectGenerator::init()
subdirs.append(nd);
}
}
- if(Option::recursive) {
+ if(Option::recursive == Option::QMAKE_RECURSIVE_YES) {
QStringList dirs = QDir(newdir).entryList(QDir::Dirs);
for(int i = 0; i < (int)dirs.count(); i++) {
QString nd = fileFixify(newdir + QDir::separator() + dirs[i]);
@@ -230,7 +230,8 @@ ProjectGenerator::init()
}
}
}
- if(Option::recursive && !knownDirs.contains(newdir, Qt::CaseInsensitive))
+ if(Option::recursive == Option::QMAKE_RECURSIVE_YES
+ && !knownDirs.contains(newdir, Qt::CaseInsensitive))
knownDirs.append(newdir);
}
}
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index f906c7651a..b84f0f1231 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -56,7 +56,8 @@
#define RESOURCE_DIRECTORY_RESOURCE "\\\\resource\\\\apps\\\\"
#define REGISTRATION_RESOURCE_DIRECTORY_HW "/private/10003a3f/import/apps"
#define PLUGIN_COMMON_DEF_FILE_FOR_MMP "./plugin_common.def"
-#define PLUGIN_COMMON_DEF_FILE_ACTUAL "plugin_commonU.def"
+#define PLUGIN_COMMON_DEF_FILE_ACTUAL "plugin_commonu.def"
+#define BLD_INF_FILENAME_LEN (sizeof(BLD_INF_FILENAME) - 1)
#define BLD_INF_RULES_BASE "BLD_INF_RULES."
#define BLD_INF_TAG_PLATFORMS "prj_platforms"
@@ -95,15 +96,6 @@
#define MMP_START_RESOURCE "START RESOURCE"
#define MMP_END_RESOURCE "END"
-#define SIS_TARGET "sis"
-#define INSTALLER_SIS_TARGET "installer_sis"
-#define ROM_STUB_SIS_TARGET "stub_sis"
-#define OK_SIS_TARGET "ok_sis"
-#define OK_INSTALLER_SIS_TARGET "ok_installer_sis"
-#define OK_ROM_STUB_SIS_TARGET "ok_stub_sis"
-#define FAIL_SIS_NOPKG_TARGET "fail_sis_nopkg"
-#define FAIL_SIS_NOCACHE_TARGET "fail_sis_nocache"
-
#define PRINT_FILE_CREATE_ERROR(filename) fprintf(stderr, "Error: Could not create '%s'\n", qPrintable(filename));
#define MANUFACTURER_NOTE_FILE "manufacturer_note.txt"
@@ -463,7 +455,7 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, Deployme
for (int i = 0; i < depList.size(); ++i) {
t << QString("\"%1\" - \"%2\"")
.arg(QString(depList.at(i).from).replace('\\','/'))
- .arg(depList.at(i).to) << endl;
+ .arg(QString(depList.at(i).to).replace('/','\\')) << endl;
}
t << endl;
@@ -1915,7 +1907,7 @@ void SymbianMakefileGenerator::generateCleanCommands(QTextStream& t,
t << "\t-@ if EXIST \"" << QDir::toNativeSeparators(item) << "\" ";
t << cmd << " " << cmdOptions << " \"" << QDir::toNativeSeparators(item) << "\"" << endl;
#else
- t << "\t-if test -f " << QDir::toNativeSeparators(item) << "; then ";
+ t << "\t-if test -e " << QDir::toNativeSeparators(item) << "; then ";
t << cmd << " " << cmdOptions << " " << QDir::toNativeSeparators(item) << "; fi" << endl;
#endif
}
@@ -1932,94 +1924,6 @@ void SymbianMakefileGenerator::removeSpecialCharacters(QString& str)
str.replace(QString(" "), QString("_"));
}
-void SymbianMakefileGenerator::writeSisTargets(QTextStream &t)
-{
- t << "-include " MAKE_CACHE_NAME << endl;
- t << endl;
-
- t << SIS_TARGET ":" << endl;
- QString siscommand = QString::fromLatin1("\t$(if $(wildcard %1_template.%2),$(if $(wildcard %3)," \
- "$(MAKE) -s -f $(MAKEFILE) %4," \
- "$(if $(QT_SIS_TARGET),$(MAKE) -s -f $(MAKEFILE) %4," \
- "$(MAKE) -s -f $(MAKEFILE) %5))," \
- "$(MAKE) -s -f $(MAKEFILE) %6)")
- .arg(fixedTarget)
- .arg("pkg")
- .arg(MAKE_CACHE_NAME)
- .arg(OK_SIS_TARGET)
- .arg(FAIL_SIS_NOCACHE_TARGET)
- .arg(FAIL_SIS_NOPKG_TARGET);
- t << siscommand << endl;
- t << endl;
-
- t << OK_SIS_TARGET ":" << endl;
-
- QString pkgcommand = QString::fromLatin1("\tcreatepackage.bat $(QT_SIS_OPTIONS) %1_template.%2 $(QT_SIS_TARGET) " \
- "$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)")
- .arg(fixedTarget)
- .arg("pkg");
- t << pkgcommand << endl;
- t << endl;
-
- QString sisName = fixedTarget;
- sisName += ".sis";
-
- t << sisName << ":" << endl;
- t << "\t$(MAKE) -s -f $(MAKEFILE) " SIS_TARGET << endl << endl;
-
- t << ROM_STUB_SIS_TARGET ":" << endl;
- QString stubsiscommand = QString::fromLatin1("\t$(if $(wildcard %1_template.%2),$(if $(wildcard %3)," \
- "$(MAKE) -s -f $(MAKEFILE) %4," \
- "$(if $(QT_SIS_TARGET),$(MAKE) -s -f $(MAKEFILE) %4," \
- "$(MAKE) -s -f $(MAKEFILE) %5))," \
- "$(MAKE) -s -f $(MAKEFILE) %6)")
- .arg(fixedTarget)
- .arg("pkg")
- .arg(MAKE_CACHE_NAME)
- .arg(OK_ROM_STUB_SIS_TARGET)
- .arg(FAIL_SIS_NOCACHE_TARGET)
- .arg(FAIL_SIS_NOPKG_TARGET);
- t << stubsiscommand << endl;
- t << endl;
-
- t << OK_ROM_STUB_SIS_TARGET ":" << endl;
-
- QString stubpkgcommand = QString::fromLatin1("\tcreatepackage.bat -s $(QT_SIS_OPTIONS) %1_template.%2 $(QT_SIS_TARGET) " \
- "$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)")
- .arg(fixedTarget)
- .arg("pkg");
- t << stubpkgcommand << endl;
- t << endl;
-
- t << INSTALLER_SIS_TARGET ": " << sisName << endl;
- siscommand = QString::fromLatin1("\t$(if $(wildcard %1_installer.%2)," \
- "$(MAKE) -s -f $(MAKEFILE) %3," \
- "$(MAKE) -s -f $(MAKEFILE) %4)")
- .arg(fixedTarget)
- .arg("pkg")
- .arg(OK_INSTALLER_SIS_TARGET)
- .arg(FAIL_SIS_NOPKG_TARGET);
- t << siscommand << endl;
- t << endl;
-
- t << OK_INSTALLER_SIS_TARGET ": " << endl;
-
- pkgcommand = QString::fromLatin1("\tcreatepackage.bat $(QT_SIS_OPTIONS) %1_installer.%2 - " \
- "$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)")
- .arg(fixedTarget)
- .arg("pkg");
- t << pkgcommand << endl;
- t << endl;
-
- t << FAIL_SIS_NOPKG_TARGET ":" << endl;
- t << "\t$(error PKG file does not exist, '" SIS_TARGET "' and '" INSTALLER_SIS_TARGET "' target are only supported for executables or projects with DEPLOYMENT statement)" << endl;
- t << endl;
-
- t << FAIL_SIS_NOCACHE_TARGET ":" << endl;
- t << "\t$(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target)" << endl;
- t << endl;
-}
-
void SymbianMakefileGenerator::generateDistcleanTargets(QTextStream& t)
{
t << "dodistclean:" << endl;
diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h
index 9de852af1a..0847ee80d0 100644
--- a/qmake/generators/symbian/symmake.h
+++ b/qmake/generators/symbian/symmake.h
@@ -155,7 +155,6 @@ protected:
const QString& itemPrefix,
const QString& itemSuffix);
- void writeSisTargets(QTextStream &t);
void generateDistcleanTargets(QTextStream& t);
void generateExecutionTargets(QTextStream& t, const QStringList& platforms);
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index cd613e0706..f90421ba0f 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -200,20 +200,25 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
t << endl;
t << "MAKEFILE = " << wrapperFile.fileName() << endl;
- t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl;
+ t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl;
t << "MOVE = " << var("QMAKE_MOVE") << endl;
+#ifdef Q_OS_WIN32
t << "XCOPY = xcopy /d /f /h /r /y /i" << endl;
t << "ABLD = ABLD.BAT" << endl;
+#else
+ t << "XCOPY = cp -u -v" << endl;
+ t << "ABLD = abld" << endl;
+#endif
t << "DEBUG_PLATFORMS = " << debugPlatforms.join(" ") << endl;
t << "RELEASE_PLATFORMS = " << releasePlatforms.join(" ") << endl;
t << "MAKE = make" << endl;
t << endl;
t << "ifeq (WINS,$(findstring WINS, $(PLATFORM)))" << endl;
- t << "ZDIR=$(EPOCROOT)epoc32\\release\\$(PLATFORM)\\$(CFG)\\Z" << endl;
+ t << "ZDIR=$(EPOCROOT)" << QDir::toNativeSeparators("epoc32/release/$(PLATFORM)/$(CFG)/z") << endl;
t << "else" << endl;
- t << "ZDIR=$(EPOCROOT)epoc32\\data\\z" << endl;
+ t << "ZDIR=$(EPOCROOT)" << QDir::toNativeSeparators("epoc32/data/z") << endl;
t << "endif" << endl;
t << endl;
t << "DEFINES" << '\t' << " = "
@@ -307,14 +312,16 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
// generate command lines like this ...
// -@ if NOT EXIST ".\somedir" mkdir ".\somedir"
QStringList dirsToClean;
+ QString dirExists = var("QMAKE_CHK_DIR_EXISTS");
+ QString mkdir = var("QMAKE_MKDIR");
for (QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) {
QStringList values = it.value();
for (int i = 0; i < values.size(); ++i) {
if (values.at(i).endsWith("/" QT_EXTRA_INCLUDE_DIR)) {
QString fixedValue(QDir::toNativeSeparators(values.at(i)));
dirsToClean << fixedValue;
- t << "\t-@ if NOT EXIST \"" << fixedValue << "\" mkdir \""
- << fixedValue << "\"" << endl;
+ t << "\t-@ " << dirExists << " \"" << fixedValue << "\" "
+ << mkdir << " \"" << fixedValue << "\"" << endl;
}
}
}
@@ -323,7 +330,7 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
// Note: EXTENSION_CLEAN will get called many times when doing reallyclean
// This is why the "2> NUL" gets appended to generated clean targets in makefile.cpp.
t << EXTENSION_CLEAN ": " COMPILER_CLEAN_TARGET << endl;
- generateCleanCommands(t, dirsToClean, var("QMAKE_DEL_DIR"), " /S /Q ", "", "");
+ generateCleanCommands(t, dirsToClean, var("QMAKE_DEL_TREE"), "", "", "");
t << endl;
t << PRE_TARGETDEPS_TARGET ":"
@@ -372,10 +379,6 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
writeDeploymentTargets(t, false);
writeDeploymentTargets(t, true);
- writeSisTargets(t);
-
- writeStoreBuildTarget(t);
-
generateDistcleanTargets(t);
t << "clean: $(ABLD)" << endl;
@@ -463,25 +466,6 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i
return true;
}
-void SymbianAbldMakefileGenerator::writeStoreBuildTarget(QTextStream &t)
-{
- t << STORE_BUILD_TARGET ":" << endl;
- t << "\t@echo # ============================================================================== > " MAKE_CACHE_NAME << endl;
- t << "\t@echo # This file is generated by make and should not be modified by the user >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo # Name : " << MAKE_CACHE_NAME << " >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo # Part of : " << project->values("TARGET").join(" ") << " >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo # Description : This file is used to cache last build target for >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo # make sis target. >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo # Version : >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo # >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo # ============================================================================== >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo. >> " MAKE_CACHE_NAME << endl;
- t << "\t@echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> " MAKE_CACHE_NAME << endl;
- t << endl;
-
- generatedFiles << MAKE_CACHE_NAME;
-}
-
void SymbianAbldMakefileGenerator::writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension)
{
// Normally emulator deployment gets done via regular makefile, but since subdirs
diff --git a/qmake/generators/symbian/symmake_abld.h b/qmake/generators/symbian/symmake_abld.h
index c03328405a..f998b28bde 100644
--- a/qmake/generators/symbian/symmake_abld.h
+++ b/qmake/generators/symbian/symmake_abld.h
@@ -57,7 +57,6 @@ protected:
virtual void writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile);
virtual void appendAbldTempDirs(QStringList& sysincspaths, QString includepath);
- void writeStoreBuildTarget(QTextStream &t);
bool writeDeploymentTargets(QTextStream &t, bool isRom);
public:
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index 8289f7f748..79663fbfb5 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -144,7 +144,7 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo
t << "# ==============================================================================" << "\n" << endl;
t << endl;
t << "MAKEFILE = " << wrapperFile.fileName() << endl;
- t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl;
+ t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl;
t << "MOVE = " << var("QMAKE_MOVE") << endl;
@@ -251,8 +251,6 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo
qDeleteAll(subtargets);
}
- writeSisTargets(t);
-
generateDistcleanTargets(t);
t << "clean: " << BLD_INF_FILENAME << endl;
diff --git a/qmake/generators/symbian/symmake_sbsv2.h b/qmake/generators/symbian/symmake_sbsv2.h
index b8ccdbec98..286c91ca6a 100644
--- a/qmake/generators/symbian/symmake_sbsv2.h
+++ b/qmake/generators/symbian/symmake_sbsv2.h
@@ -56,6 +56,7 @@ protected:
virtual void writeMkFile(const QString& wrapperFileName, bool deploymentOnly);
virtual void writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile);
virtual void appendAbldTempDirs(QStringList& sysincspaths, QString includepath);
+ virtual bool isForSymbianSbsv2() const { return true; } // FIXME: killme - i'm ugly!
public:
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 670e3a053b..f85d7078a5 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -99,8 +99,6 @@ UnixMakefileGenerator::init()
MakefileGenerator::init();
if(project->isEmpty("MAKEFILE"))
project->values("MAKEFILE").append("Makefile");
- if(project->isEmpty("QMAKE_QMAKE"))
- project->values("QMAKE_QMAKE").append("qmake");
if(project->values("QMAKE_INTERNAL_QMAKE_DEPS").indexOf("qmake_all") == -1)
project->values("QMAKE_INTERNAL_QMAKE_DEPS").append("qmake_all");
return; /* subdirs is done */
@@ -544,7 +542,6 @@ UnixMakefileGenerator::processPrlFiles()
{
QList<QMakeLocalFileName> libdirs, frameworkdirs;
frameworkdirs.append(QMakeLocalFileName("/System/Library/Frameworks"));
- frameworkdirs.append(QMakeLocalFileName("/Library/Frameworks"));
const QString lflags[] = { "QMAKE_LIBDIR_FLAGS", "QMAKE_FRAMEWORKPATH_FLAGS", "QMAKE_LFLAGS", "QMAKE_LIBS", QString() };
for(int i = 0; !lflags[i].isNull(); i++) {
QStringList &l = project->values(lflags[i]);
@@ -779,10 +776,8 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
uninst.append("-$(DEL_FILE) \"" + dst_targ + "\"");
if(!links.isEmpty()) {
for(int i = 0; i < links.size(); ++i) {
- if(Option::target_mode == Option::TARG_WIN_MODE ||
- Option::target_mode == Option::TARG_MAC9_MODE) {
- } else if(Option::target_mode == Option::TARG_UNIX_MODE ||
- Option::target_mode == Option::TARG_MACX_MODE) {
+ if(Option::target_mode == Option::TARG_UNIX_MODE ||
+ Option::target_mode == Option::TARG_MACX_MODE) {
QString link = Option::fixPathToTargetOS(destdir + links[i], false);
int lslash = link.lastIndexOf(Option::dir_sep);
if(lslash != -1)
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 025882e942..5def030fbd 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -81,7 +81,7 @@ UnixMakefileGenerator::writeMakefile(QTextStream &t)
writeHeader(t);
if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) {
- t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl;
+ t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it)
t << *it << " ";
@@ -154,7 +154,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << "AR = " << var("QMAKE_AR") << endl;
t << "RANLIB = " << var("QMAKE_RANLIB") << endl;
- t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl;
+ t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
t << "TAR = " << var("QMAKE_TAR") << endl;
t << "COMPRESS = " << var("QMAKE_GZIP") << endl;
if(project->isActiveConfig("compile_libtool"))
diff --git a/qmake/generators/win32/borland_bmake.cpp b/qmake/generators/win32/borland_bmake.cpp
index 9208e1d2b6..b5c33c432c 100644
--- a/qmake/generators/win32/borland_bmake.cpp
+++ b/qmake/generators/win32/borland_bmake.cpp
@@ -115,8 +115,6 @@ BorlandMakefileGenerator::init()
project->values("QMAKE_INSTALL_DIR").append("$(COPY_DIR)");
if(project->values("MAKEFILE").isEmpty())
project->values("MAKEFILE").append("Makefile");
- if(project->values("QMAKE_QMAKE").isEmpty())
- project->values("QMAKE_QMAKE").append("qmake");
return;
}
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index e1f502f68e..fd431459c5 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -143,7 +143,7 @@ bool MingwMakefileGenerator::writeMakefile(QTextStream &t)
if(project->first("TEMPLATE") == "app" ||
project->first("TEMPLATE") == "lib") {
if(Option::mkfile::do_stub_makefile) {
- t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl;
+ t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it)
t << *it << " ";
@@ -248,8 +248,6 @@ void MingwMakefileGenerator::init()
project->values("QMAKE_INSTALL_DIR").append("$(COPY_DIR)");
if(project->values("MAKEFILE").isEmpty())
project->values("MAKEFILE").append("Makefile");
- if(project->values("QMAKE_QMAKE").isEmpty())
- project->values("QMAKE_QMAKE").append("qmake");
return;
}
diff --git a/qmake/generators/win32/msvc_dsp.cpp b/qmake/generators/win32/msvc_dsp.cpp
deleted file mode 100644
index 9c8dd1db82..0000000000
--- a/qmake/generators/win32/msvc_dsp.cpp
+++ /dev/null
@@ -1,1207 +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 qmake application of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "msvc_dsp.h"
-#include "option.h"
-
-#include <qdir.h>
-#include <qset.h>
-
-#include <stdlib.h>
-
-QT_BEGIN_NAMESPACE
-
-DspMakefileGenerator::DspMakefileGenerator() : Win32MakefileGenerator(), init_flag(false)
-{
-}
-
-bool DspMakefileGenerator::writeMakefile(QTextStream &t)
-{
- if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) {
- /* for now just dump, I need to generated an empty dsp or something.. */
- fprintf(stderr, "Project file not generated because all requirements not met:\n\t%s\n",
- var("QMAKE_FAILED_REQUIREMENTS").toLatin1().constData());
- return true;
- }
-
- // Generate workspace file
- if(project->first("TEMPLATE") == "vcsubdirs") {
- if (!project->isActiveConfig("build_pass")) {
- debug_msg(1, "Generator: MSVC: Writing workspave file");
- writeSubDirs(t);
- } else {
- debug_msg(1, "Generator: MSVC: Not writing workspace file for build_pass configs");
- }
- return true;
- } else if (project->first("TEMPLATE") == "vcapp" || project->first("TEMPLATE") == "vclib") {
- if(!project->isActiveConfig("build_pass"))
- return writeDspParts(t);
- return true;
- }
- return project->isActiveConfig("build_pass");
-}
-
-bool DspMakefileGenerator::hasBuiltinCompiler(const QString &filename) const
-{
- for (int i = 0; i < Option::cpp_ext.count(); ++i)
- if (filename.endsWith(Option::cpp_ext.at(i)))
- return true;
- for (int i = 0; i < Option::c_ext.count(); ++i)
- if (filename.endsWith(Option::c_ext.at(i)))
- return true;
- return false;
-}
-
-QString DspMakefileGenerator::replaceExtraCompilerVariables(const QString &var, const QStringList &in, const QStringList &out)
-{
- QString ret = MakefileGenerator::replaceExtraCompilerVariables(var, in, out);
- ret.replace("$(DEFINES)", varGlue("PRL_EXPORT_DEFINES"," -D"," -D","") +
- varGlue("DEFINES"," -D"," -D",""));
-
- QString incpath = this->var("MSVCDSP_INCPATH");
- incpath.replace("/I", "-I");
- ret.replace("$(INCPATH)", incpath);
- return ret;
-}
-
-
-// if config is part of a multibuild thenthe gule (this) has the correct MSVCDSP_PROJECT
-QString DspMakefileGenerator::configName(DspMakefileGenerator * config)
-{
- return var("MSVCDSP_PROJECT") + config->var("MSVCDSP_CONFIG_NAME");
-}
-
-bool DspMakefileGenerator::writeDspHeader(QTextStream &t)
-{
- DspMakefileGenerator * config = this;
- if (mergedProjects.count())
- config = mergedProjects.at(0);
-
- t << "# Microsoft Developer Studio Project File - Name=\"" << var("MSVCDSP_PROJECT") << "\" - Package Owner=<4>" << endl;
- t << "# Microsoft Developer Studio Generated Build File, Format Version 6.00" << endl;
- t << "# ** DO NOT EDIT **" << endl;
- t << endl;
- t << "# TARGTYPE \"Win32 (x86) " << var("MSVCDSP_TARGETTYPE") << "\" " << var("MSVCDSP_DSPTYPE") << endl;
- t << endl;
- t << "CFG=\"" << configName(config) << "\"" << endl;
- t << "!MESSAGE This is not a valid makefile. To build this project using NMAKE," << endl;
- t << "!MESSAGE use the Export Makefile command and run" << endl;
- t << "!MESSAGE " << endl;
- t << "!MESSAGE NMAKE /f " << escapeFilePath(var("TARGET")) << ".mak." << endl;
- t << "!MESSAGE " << endl;
- t << "!MESSAGE You can specify a configuration when running NMAKE" << endl;
- t << "!MESSAGE by defining the macro CFG on the command line. For example:" << endl;
- t << "!MESSAGE " << endl;
- t << "!MESSAGE NMAKE /f " << escapeFilePath(var("TARGET")) << ".mak CFG=\"" << configName(config) << "\"" << endl;
- t << "!MESSAGE " << endl;
- t << "!MESSAGE Possible choices for configuration are:" << endl;
- t << "!MESSAGE " << endl;
- if (mergedProjects.count()) {
- for (int i = 0; i < mergedProjects.count(); ++i) {
- DspMakefileGenerator * config = mergedProjects.at(i);
- t << "!MESSAGE \"" << configName(config) << "\" (based on \"Win32 (x86) " << config->var("MSVCDSP_TARGETTYPE") << "\")" << endl;
- }
- } else {
- t << "!MESSAGE \"" << configName(config) << "\" (based on \"Win32 (x86) " << config->var("MSVCDSP_TARGETTYPE") << "\")" << endl;
- }
- t << "!MESSAGE " << endl;
- t << endl;
- t << "# Begin Project" << endl;
- t << "# PROP AllowPerConfigDependencies 0" << endl;
- t << "# PROP Scc_ProjName \"\"" << endl;
- t << "# PROP Scc_LocalPath \"\"" << endl;
- t << "CPP=" << config->var("QMAKE_CC") << endl;
- t << "MTL=" << config->var("QMAKE_IDL") << endl;
- t << "RSC=" << config->var("QMAKE_RC") << endl;
- t << "BSC32=bscmake.exe" << endl;
-
- return true;
-}
-
-
-bool DspMakefileGenerator::writeDspParts(QTextStream &t)
-{
- //bool staticLibTarget = var("MSVCDSP_DSPTYPE") == "0x0104";
-
- writeDspHeader(t);
- writeDspConfig(t, this);
- t << endl;
- t << "# Begin Target" << endl;
- t << endl;
- t << "# Name \"" << configName(this) << "\"" << endl;
- t << endl;
-
-
- QStringList listNames = QString("SOURCES|DEF_FILE").split("|");
- QStringList allListNames = listNames;
- writeFileGroup(t, listNames, "Source Files", "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat");
- listNames = QStringList("HEADERS");
- allListNames += listNames;
- writeFileGroup(t, QStringList("HEADERS"), "Header Files", "h;hpp;hxx;hm;inl");
- listNames = QString("FORMS|INTERFACES|FORMS3").split("|");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Form Files", "ui");
- listNames = QStringList("IMAGES");
- allListNames += listNames;
- writeFileGroup(t, QStringList("IMAGES"), "Image Files", "");
- listNames = QString("RC_FILE|RESOURCES").split("|");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Resources", "rc;qrc");
- listNames = QStringList("TRANSLATIONS");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Translations", "ts;xlf");
- listNames = QStringList("LEXSOURCES");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Lexables", "l");
- listNames = QStringList("YACCSOURCES");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Yaccables", "y");
- listNames = QStringList("TYPELIBS");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Type Libraries", "tlb;olb");
-
- if (!project->isEmpty("QMAKE_EXTRA_COMPILERS")) {
- const QStringList &quc = project->values("QMAKE_EXTRA_COMPILERS");
- for (QStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) {
- const QStringList &inputs = project->values((*it)+".input");
- for (QStringList::ConstIterator input = inputs.begin(); input != inputs.end(); ++input) {
- if (!allListNames.contains((*input)) && *input != "UIC3_HEADERS")
- writeFileGroup(t, QStringList((*input)), (*input) + " Files", "");
- }
- }
- }
-
- project->values("SWAPPED_BUILD_STEPS") = swappedBuildSteps.keys();
-
- writeFileGroup(t, QString("GENERATED_SOURCES|GENERATED_FILES|SWAPPED_BUILD_STEPS").split("|"), "Generated", "");
-
- t << "# End Target" << endl;
- t << "# End Project" << endl;
- return true;
-}
-
-void
-DspMakefileGenerator::init()
-{
- if(init_flag)
- return;
- QStringList::Iterator it;
- init_flag = true;
-
- platform = "Win32";
- if(!project->values("QMAKE_PLATFORM").isEmpty())
- platform = varGlue("QMAKE_PLATFORM", "", " ", "");
-
- // this should probably not be here, but I'm using it to wrap the .t files
- if(project->first("TEMPLATE") == "vcapp")
- project->values("QMAKE_APP_FLAG").append("1");
- else if(project->first("TEMPLATE") == "vclib")
- project->values("QMAKE_LIB_FLAG").append("1");
-
- if(project->values("QMAKESPEC").isEmpty())
- project->values("QMAKESPEC").append(qgetenv("QMAKESPEC"));
-
- project->values("QMAKE_LIBS") += escapeFilePaths(project->values("LIBS"));
- processVars();
-
- if(!project->values("VERSION").isEmpty()) {
- QString version = project->values("VERSION").first();
- int firstDot = version.indexOf(".");
- QString major = version.left(firstDot);
- QString minor = version.right(version.length() - firstDot - 1);
- minor.replace(".", "");
- project->values("MSVCDSP_LFLAGS").append("/VERSION:" + major + "." + minor);
- }
-
- QString msvcdsp_project;
- if(!project->isEmpty("TARGET")) {
- project->values("TARGET") = unescapeFilePaths(project->values("TARGET"));
- msvcdsp_project = project->first("TARGET");
- }
-
- MakefileGenerator::init();
-
- if(msvcdsp_project.isEmpty())
- msvcdsp_project = Option::output.fileName();
-
- msvcdsp_project = msvcdsp_project.right(msvcdsp_project.length() - msvcdsp_project.lastIndexOf("\\") - 1);
- int dotFind = msvcdsp_project.lastIndexOf(".");
- if(dotFind != -1)
- msvcdsp_project = msvcdsp_project.left(dotFind);
- msvcdsp_project.replace("-", "");
-
- project->values("MSVCDSP_PROJECT").append(msvcdsp_project);
-
- QStringList &proj = project->values("MSVCDSP_PROJECT");
-
- for(QStringList::Iterator it = proj.begin(); it != proj.end(); ++it)
- (*it).replace(QRegExp("\\.[a-zA-Z0-9_]*$"), "");
-
- if(!project->values("QMAKE_APP_FLAG").isEmpty()) {
- if(project->isActiveConfig("console")) {
- project->values("MSVCDSP_TARGETTYPE").append("Console Application");
- project->values("MSVCDSP_DSPTYPE").append("0x0103");
- project->values("MSVCDSP_DEFINES").append(" /D \"_CONSOLE\" ");
- } else {
- project->values("MSVCDSP_TARGETTYPE").append("Application");
- project->values("MSVCDSP_DSPTYPE").append("0x0101");
- project->values("MSVCDSP_DEFINES").append(" /D \"_WINDOWS\" ");
- }
- } else {
- if(project->isActiveConfig("dll")) {
- project->values("MSVCDSP_TARGETTYPE").append("Dynamic-Link Library");
- project->values("MSVCDSP_DSPTYPE").append("0x0102");
- project->values("MSVCDSP_DEFINES").append(" /D \"_USRDLL\" ");
- } else {
- project->values("MSVCDSP_TARGETTYPE").append("Static Library");
- project->values("MSVCDSP_DSPTYPE").append("0x0104");
- project->values("MSVCDSP_DEFINES").append(" /D \"_LIB\" ");
- }
- }
-
- project->values("MSVCDSP_LFLAGS") += project->values("QMAKE_LFLAGS");
-
- if(!project->values("QMAKE_LIBDIR").isEmpty())
- project->values("MSVCDSP_LFLAGS").append(valGlue(
- escapeFilePaths(project->values("QMAKE_LIBDIR")),
- "/LIBPATH:"," /LIBPATH:",""));
-
- project->values("MSVCDSP_DEFINES").append(varGlue("DEFINES","/D ","" " /D ",""));
- project->values("MSVCDSP_DEFINES").append(varGlue("PRL_EXPORT_DEFINES","/D ","" " /D ",""));
- project->values("MSVCDSP_DEFINES").append(" /D \"WIN32\" ");
-
- QStringList &libs = project->values("QMAKE_LIBS");
- for(QStringList::Iterator libit = libs.begin(); libit != libs.end(); ++libit) {
- project->values("MSVCDSP_LIBS").append(" " + escapeFilePath(*libit));
- }
-
- QStringList &incs = project->values("INCLUDEPATH");
- for(QStringList::Iterator incit = incs.begin(); incit != incs.end(); ++incit) {
- QString inc = (*incit);
- project->values("MSVCDSP_INCPATH").append("/I" + escapeFilePath(inc));
- }
- project->values("MSVCDSP_INCPATH").append("/I" + escapeFilePath(specdir()));
-
- QString dest;
- QString preLinkStep;
- QString postLinkStep;
- QString copyDllStep;
-
- if(!project->values("QMAKE_PRE_LINK").isEmpty())
- preLinkStep += var("QMAKE_PRE_LINK");
-
- if(!project->values("QMAKE_POST_LINK").isEmpty())
- postLinkStep += var("QMAKE_POST_LINK");
-
- // don't destroy the target, it is used by prl writer.
- if(!project->values("DESTDIR").isEmpty()) {
- dest = project->first("DESTDIR");
- project->values("DESTDIR").first() = dest;
- dest = project->values("TARGET").first() + project->first("TARGET_EXT");
- dest.prepend(project->first("DESTDIR"));
- Option::fixPathToTargetOS(dest);
- dest = escapeFilePath(dest);
-
- project->values("MSVCDSP_TARGET").append(
- QString("/out:") + dest);
- if(project->isActiveConfig("dll")) {
- QString imp = dest;
- imp.replace(".dll", ".lib");
- project->values("MSVCDSP_TARGET").append(QString(" /implib:") + escapeFilePath(imp));
- }
- }
-
- if(project->isActiveConfig("dll") && !project->values("DLLDESTDIR").isEmpty()) {
- QStringList dlldirs = project->values("DLLDESTDIR");
- if(dlldirs.count())
- copyDllStep += "\t";
- for(QStringList::Iterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir) {
- copyDllStep += "copy \"$(TargetPath)\" " + escapeFilePath(Option::fixPathToTargetOS(*dlldir)) + "\t";
- }
- }
-
- if(!preLinkStep.isEmpty()) {
- project->values("MSVCDSP_PRE_LINK").append(
- "# Begin Special Build Tool\n"
- "SOURCE=$(InputPath)\n"
- "PreLink_Desc=Post Build Step\n"
- "PreLink_Cmds=" + preLinkStep + "\n"
- "# End Special Build Tool\n");
- }
-
- if(!postLinkStep.isEmpty() || !copyDllStep.isEmpty()) {
- project->values("MSVCDSP_POST_LINK").append(
- "# Begin Special Build Tool\n"
- "SOURCE=$(InputPath)\n"
- "PostBuild_Desc=Post Build Step\n"
- "PostBuild_Cmds=" + postLinkStep + copyDllStep + "\n"
- "# End Special Build Tool\n");
- }
-
- QStringList &formList = project->values("FORMS");
- for(QStringList::ConstIterator hit = formList.begin(); hit != formList.end(); ++hit) {
- if(exists(*hit + ".h"))
- project->values("SOURCES").append(*hit + ".h");
- }
- QStringList &form3List = project->values("FORMS3");
- for(QStringList::ConstIterator hit = form3List.begin(); hit != form3List.end(); ++hit) {
- if(exists(*hit + ".h"))
- project->values("SOURCES").append(*hit + ".h");
- }
-
- project->values("QMAKE_INTERNAL_PRL_LIBS") << "MSVCDSP_LIBS";
-
- // Move some files around //### is this compat?
- if (!project->values("IMAGES").isEmpty()) {
- QString imageFactory(project->first("QMAKE_IMAGE_COLLECTION"));
- project->values("GENERATED_SOURCES") += imageFactory;
- project->values("SOURCES").removeAll(imageFactory);
- }
-
- // Setup PCH variables
- precompH = project->first("PRECOMPILED_HEADER");
- namePCH = fileInfo(precompH).fileName();
- usePCH = !precompH.isEmpty() && project->isActiveConfig("precompile_header");
- if (usePCH) {
- // Created files
- precompObj = var("PRECOMPILED_DIR") + project->first("TARGET") + "_pch" + Option::obj_ext;
- precompPch = var("PRECOMPILED_DIR") + project->first("TARGET") + "_pch.pch";
-
- // Add PRECOMPILED_HEADER to HEADERS
- if (!project->values("HEADERS").contains(precompH))
- project->values("HEADERS") += precompH;
- // Add precompile compiler options
- project->values("PRECOMPILED_FLAGS") = QStringList("/Fp" + precompPch + " /Yu" + escapeFilePath(namePCH) + " /FI" + escapeFilePath(namePCH) + " ");
- // Return to variable pool
- project->values("PRECOMPILED_OBJECT") = QStringList(precompObj);
- project->values("PRECOMPILED_PCH") = QStringList(precompPch);
- }
-
- QString buildName;
- if (!var("BUILD_NAME").isEmpty())
- buildName = var("BUILD_NAME");
- else if (project->isActiveConfig("debug"))
- buildName = "Debug";
- else
- buildName = "Release";
-
- project->values("MSVCDSP_CONFIG_NAME") = QStringList(" - " + platform + " " + buildName);
-}
-
-void DspMakefileGenerator::processPrlVariable(const QString &var, const QStringList &l)
-{
- if(var == "QMAKE_PRL_DEFINES") {
- QStringList &out = project->values("MSVCDSP_DEFINES");
- for(QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) {
- if(out.indexOf((*it)) == -1)
- out.append((" /D \"" + *it + "\""));
- }
- } else {
- MakefileGenerator::processPrlVariable(var, l);
- }
-}
-
-bool DspMakefileGenerator::openOutput(QFile &file, const QString &build) const
-{
- QString outdir;
- if(!file.fileName().isEmpty()) {
- if(QDir::isRelativePath(file.fileName()))
- file.setFileName(Option::output_dir + "/" + file.fileName()); //pwd when qmake was run
- QFileInfo fi(fileInfo(file.fileName()));
- if(fi.isDir())
- outdir = file.fileName() + QDir::separator();
- }
-
- if(!outdir.isEmpty() || file.fileName().isEmpty()) {
- QString ext = project->first("DSP_EXTENSION");
- if(project->first("TEMPLATE") == "vcsubdirs") {
- if (!project->first("DSW_EXTENSION").isEmpty())
- ext = project->first("DSW_EXTENSION");
- else
- ext = ".dsw";
- }
- QString outputName = unescapeFilePath(project->first("QMAKE_DSP_PROJECT_NAME"));
- if (!project->first("MAKEFILE").isEmpty())
- outputName = unescapeFilePath(project->first("MAKEFILE"));
- if (outputName.isEmpty())
- outputName = unescapeFilePath(project->first("QMAKE_ORIG_TARGET"));
- file.setFileName(outdir + outputName + ext);
- }
-
- if(QDir::isRelativePath(file.fileName())) {
- QString ofile = Option::fixPathToLocalOS(file.fileName());
- int slashfind = ofile.lastIndexOf(Option::dir_sep);
- if(slashfind == -1) {
- ofile = ofile.replace(QRegExp("-"), "_");
- } else {
- int hypenfind = ofile.indexOf('-', slashfind);
- while (hypenfind != -1 && slashfind < hypenfind) {
- ofile = ofile.replace(hypenfind, 1, "_");
- hypenfind = ofile.indexOf('-', hypenfind + 1);
- }
- }
- file.setFileName(Option::fixPathToLocalOS(qmake_getpwd() + Option::dir_sep + ofile));
- }
- return Win32MakefileGenerator::openOutput(file, build);
-}
-
-bool DspMakefileGenerator::mergeBuildProject(MakefileGenerator *other)
-{
-
- mergedProjects.prepend(static_cast<DspMakefileGenerator*>(other));
- return true;
-}
-
-bool DspMakefileGenerator::writeProjectMakefile()
-{
- bool ret = true;
-
- QTextStream t(&Option::output);
- // Check if all requirements are fulfilled
- if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) {
- fprintf(stderr, "Project file not generated because all requirements not met:\n\t%s\n",
- var("QMAKE_FAILED_REQUIREMENTS").toLatin1().constData());
- return true;
- }
-
- // Generate project file
- if(project->first("TEMPLATE") == "vcapp" ||
- project->first("TEMPLATE") == "vclib") {
- if (!mergedProjects.count()) {
- warn_msg(WarnLogic, "Generator: MSVC DSP: no single configuration created, cannot output project!");
- return false;
- }
- debug_msg(1, "Generator: MSVC 6: Writing project file");
-
- writeDspHeader(t);
- for (int i = 0; i < mergedProjects.count(); ++i) {
- DspMakefileGenerator* config = mergedProjects.at(i);
- t << endl;
- if (i == 0)
- t << "!IF";
- else
- t << "!ELSEIF";
- t << " \"$(CFG)\" == \"" << configName(config) << "\"" << endl;
- t << endl;
- writeDspConfig(t, config);
- }
- t << endl;
- t << "!ENDIF " << endl;
- t << endl;
- t << "# Begin Target" << endl;
- t << endl;
- for (int i = 0; i < mergedProjects.count(); ++i)
- t << "# Name \"" << configName(mergedProjects.at(i)) << "\"" << endl;
- t << endl;
-
- QMap< QString, QSet<QString> > files;
-
- // merge source files
- for (int i = 0; i < mergedProjects.count(); ++i) {
-
- DspMakefileGenerator* config = mergedProjects.at(i);
-
- files["DEF_FILE"] += config->project->values("DEF_FILE").toSet();
- files["SOURCES"] += config->project->values("SOURCES").toSet();
- files["HEADERS"] += config->project->values("HEADERS").toSet();
- files["INTERFACES"] += config->project->values("INTERFACES").toSet();
- files["FORMS"] += config->project->values("FORMS").toSet();
- files["FORMS"] += config->project->values("FORMS3").toSet();
- files["IMAGES"] += config->project->values("IMAGES").toSet();
- files["RC_FILE"] += config->project->values("RC_FILE").toSet();
- files["RESOURCES"] += config->project->values("RESOURCES").toSet();
- files["TRANSLATIONS"] += config->project->values("TRANSLATIONS").toSet();
- files["LEXSOURCES"] += config->project->values("LEXSOURCES").toSet();
- files["YACCSOURCES"] += config->project->values("YACCSOURCES").toSet();
- files["TYPELIBS"] += config->project->values("TYPELIBS").toSet();
-
- if (!config->project->isEmpty("QMAKE_EXTRA_COMPILERS")) {
- const QStringList &quc = config->project->values("QMAKE_EXTRA_COMPILERS");
- for (QStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) {
- const QStringList &inputs = project->values((*it)+".input");
- for (QStringList::ConstIterator input = inputs.begin(); input != inputs.end(); ++input) {
- if (*input != "UIC3_HEADERS")
- files[(*input)] += config->project->values((*input)).toSet();
- }
- }
- }
- }
-
- QStringList keys = files.keys();
- for (int k = 0; k < keys.size(); ++k)
- project->values(keys.at(k)) = QList<QString>::fromSet(files[keys.at(k)]);
-
- QStringList listNames = QString("SOURCES|DEF_FILE").split("|");
- QStringList allListNames = listNames;
- writeFileGroup(t, listNames, "Source Files", "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat");
- listNames = QStringList("HEADERS");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Header Files", "h;hpp;hxx;hm;inl");
- listNames = QString("FORMS|INTERFACES|FORMS3").split("|");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Form Files", "ui");
- listNames = QStringList("IMAGES");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Image Files", "");
- listNames = QString("RC_FILE|RESOURCES").split("|");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Resources", "rc;qrc");
- listNames = QStringList("TRANSLATIONS");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Translations", "ts;xlf");
- listNames = QStringList("LEXSOURCES");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Lexables", "l");
- listNames = QStringList("YACCSOURCES");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Yaccables", "y");
- listNames = QStringList("TYPELIBS");
- allListNames += listNames;
- writeFileGroup(t, listNames, "Type Libraries", "tlb;olb");
-
- for (int l = 0; l < allListNames.size(); ++l)
- keys.removeAll(allListNames.at(l));
-
- for (int k = 0; k < keys.size(); ++k)
- writeFileGroup(t, QStringList(keys.at(k)), keys.at(k) + " Files", "");
-
- // done last as generated may have changed when creating build rules for the above
- for (int i = 0; i < mergedProjects.count(); ++i) {
-
- DspMakefileGenerator* config = mergedProjects.at(i);
-
- config->project->values("SWAPPED_BUILD_STEPS") = config->swappedBuildSteps.keys();
- files["SWAPPED_BUILD_STEPS"] += config->project->values("SWAPPED_BUILD_STEPS").toSet();
-
- files["GENERATED_SOURCES"] += config->project->values("GENERATED_SOURCES").toSet();
- files["GENERATED_FILES"] += config->project->values("GENERATED_FILES").toSet();
- }
-
- project->values("SWAPPED_BUILD_STEPS") = QList<QString>::fromSet(files["SWAPPED_BUILD_STEPS"]);
- project->values("GENERATED_SOURCES") = QList<QString>::fromSet(files["GENERATED_SOURCES"]);
- project->values("GENERATED_FILES") = QList<QString>::fromSet(files["GENERATED_FILES"]);
-
- writeFileGroup(t, QString("GENERATED_SOURCES|GENERATED_FILES|SWAPPED_BUILD_STEPS").split("|"), "Generated", "");
- t << endl;
- t << "# End Target" << endl;
- t << "# End Project" << endl;
- }else if(project->first("TEMPLATE") == "vcsubdirs") {
- ret = writeMakefile(t);
- }
-
- return ret;
-}
-
-const char _dswHeader60[] = "Microsoft Developer Studio Workspace File, Format Version 6.00\n";
-const char _dswWarning[] = "# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\n";
-const char _dswDevider[] = "###############################################################################\n";
-const char _dswProjectName[] = "Project: \"%1\"=%2 - Package Owner=<4>\n"; // %1 = project name, %2 = project path
-const char _dswPackage5Start[] = "Package=<5>\n{{{\n";
-const char _dswPackage5Stop[] = "}}}\n";
-const char _dswPackage4Start[] = "Package=<4>\n{{{\n";
-const char _dswPackage4Stop[] = "}}}\n";
-const char _dswProjectDep[] = " Begin Project Dependency\n Project_Dep_Name %1\n End Project Dependency\n"; // %1 = project name
-const char _dswGlobal[] = "Global:\n\nPackage=<5>\n{{{\n}}}\n\nPackage=<3>\n{{{\n}}}\n\n";
-
-
-struct WorkspaceDepend {
- QString dspProjectFile, orig_target, target;
- QStringList dependencies;
-};
-
-void DspMakefileGenerator::writeSubDirs(QTextStream &t)
-{
- // Output headers
- t << _dswHeader60;
- t << _dswWarning;
- t << endl;
-
- QHash<QString, WorkspaceDepend*> workspace_depends;
- QList<WorkspaceDepend*> workspace_cleanup;
- QStringList subdirs = project->values("SUBDIRS");
- QString oldpwd = qmake_getpwd();
-
- // Make sure that all temp projects are configured
- // for release so that the depends are created
- // without the debug <lib>dxxx.lib name mangling
- QStringList old_after_vars = Option::after_user_vars;
- Option::after_user_vars.append("CONFIG+=release");
-
- for(int i = 0; i < subdirs.size(); ++i) {
- QString tmp = subdirs.at(i);
- if(!project->isEmpty(tmp + ".file")) {
- if(!project->isEmpty(tmp + ".subdir"))
- warn_msg(WarnLogic, "Cannot assign both file and subdir for subdir %s",
- tmp.toLatin1().constData());
- tmp = project->first(tmp + ".file");
- } else if(!project->isEmpty(tmp + ".subdir")) {
- tmp = project->first(tmp + ".subdir");
- }
-
- QFileInfo fi(fileInfo(Option::fixPathToLocalOS(tmp, true)));
- if(fi.exists()) {
- if(fi.isDir()) {
- QString profile = tmp;
- if(!profile.endsWith(Option::dir_sep))
- profile += Option::dir_sep;
- profile += fi.baseName() + Option::pro_ext;
- subdirs.append(profile);
- } else {
- QMakeProject tmp_proj;
- QString dir = fi.path(), fn = fi.fileName();
- if(!dir.isEmpty()) {
- if(!qmake_setpwd(dir))
- fprintf(stderr, "Cannot find directory: %s\n", dir.toLatin1().constData());
- }
- if(tmp_proj.read(fn)) {
- // Check if all requirements are fulfilled
- if(!tmp_proj.variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) {
- fprintf(stderr, "Project file(%s) not added to Workspace because all requirements not met:\n\t%s\n",
- fn.toLatin1().constData(), tmp_proj.values("QMAKE_FAILED_REQUIREMENTS").join(" ").toLatin1().constData());
- continue;
- }
- if(tmp_proj.first("TEMPLATE") == "vcsubdirs") {
- QStringList tmp_proj_subdirs = tmp_proj.variables()["SUBDIRS"];
- for(int x = 0; x < tmp_proj_subdirs.size(); ++x) {
- QString tmpdir = tmp_proj_subdirs.at(x);
- if(!tmp_proj.isEmpty(tmpdir + ".file")) {
- if(!tmp_proj.isEmpty(tmpdir + ".subdir"))
- warn_msg(WarnLogic, "Cannot assign both file and subdir for subdir %s",
- tmpdir.toLatin1().constData());
- tmpdir = tmp_proj.first(tmpdir + ".file");
- } else if(!tmp_proj.isEmpty(tmpdir + ".subdir")) {
- tmpdir = tmp_proj.first(tmpdir + ".subdir");
- }
- subdirs += fileFixify(tmpdir);
- }
- } else if(tmp_proj.first("TEMPLATE") == "vcapp" || tmp_proj.first("TEMPLATE") == "vclib") {
- // Initialize a 'fake' project to get the correct variables
- // and to be able to extract all the dependencies
- DspMakefileGenerator tmp_dsp;
- tmp_dsp.setNoIO(true);
- tmp_dsp.setProjectFile(&tmp_proj);
- if(Option::debug_level) {
- QMap<QString, QStringList> &vars = tmp_proj.variables();
- for(QMap<QString, QStringList>::Iterator it = vars.begin();
- it != vars.end(); ++it) {
- if(it.key().left(1) != "." && !it.value().isEmpty())
- debug_msg(1, "%s: %s === %s", fn.toLatin1().constData(), it.key().toLatin1().constData(),
- it.value().join(" :: ").toLatin1().constData());
- }
- }
-
- // We assume project filename is [QMAKE_ORIG_TARGET].vcproj
- QString dsp = unescapeFilePath(tmp_dsp.project->first("MSVCDSP_PROJECT") + project->first("DSP_EXTENSION"));
-
- // If file doesn't exsist, then maybe the users configuration
- // doesn't allow it to be created. Skip to next...
- if(!exists(qmake_getpwd() + Option::dir_sep + dsp)) {
- warn_msg(WarnLogic, "Ignored (not found) '%s'", QString(qmake_getpwd() + Option::dir_sep + dsp).toLatin1().constData());
- goto nextfile; // # Dirty!
- }
-
- WorkspaceDepend *newDep = new WorkspaceDepend;
- newDep->dspProjectFile = fileFixify(dsp);
- newDep->orig_target = unescapeFilePath(tmp_proj.first("QMAKE_ORIG_TARGET"));
- newDep->target = tmp_proj.first("MSVCDSP_PROJECT").section(Option::dir_sep, -1) + tmp_proj.first("TARGET_EXT");
-
- // We want to store it as the .lib name.
- if(newDep->target.endsWith(".dll"))
- newDep->target = newDep->target.left(newDep->target.length()-3) + "lib";
-
- // All projects having mocable sourcefiles are dependent on moc.exe
- if(tmp_proj.variables()["CONFIG"].contains("moc"))
- newDep->dependencies << "moc.exe";
-
- // All extra compilers which has valid input are considered dependencies
- const QStringList &quc = tmp_proj.variables()["QMAKE_EXTRA_COMPILERS"];
- for(QStringList::ConstIterator it = quc.constBegin(); it != quc.constEnd(); ++it) {
- const QStringList &invar = tmp_proj.variables().value((*it) + ".input");
- for(QStringList::ConstIterator iit = invar.constBegin(); iit != invar.constEnd(); ++iit) {
- const QStringList fileList = tmp_proj.variables().value(*iit);
- if (!fileList.isEmpty()) {
- QString dep = tmp_proj.first((*it) + ".commands").section('/', -1).section('\\', -1);
- if (!newDep->dependencies.contains(dep))
- newDep->dependencies << dep;
- }
- }
- }
-
- // Add all unknown libs to the deps
- QStringList where("QMAKE_LIBS");
- if(!tmp_proj.isEmpty("QMAKE_INTERNAL_PRL_LIBS"))
- where = tmp_proj.variables()["QMAKE_INTERNAL_PRL_LIBS"];
-
- for(QStringList::iterator wit = where.begin();
- wit != where.end(); ++wit) {
- QStringList &l = tmp_proj.variables()[(*wit)];
- for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
- QString opt = (*it).trimmed();
- if(!opt.startsWith("/") && // Not a switch
- opt != newDep->target && // Not self
- opt != "opengl32.lib" && // We don't care about these libs
- opt != "glu32.lib" && // to make depgen alittle faster
- opt != "kernel32.lib" &&
- opt != "user32.lib" &&
- opt != "gdi32.lib" &&
- opt != "comdlg32.lib" &&
- opt != "advapi32.lib" &&
- opt != "shell32.lib" &&
- opt != "ole32.lib" &&
- opt != "oleaut32.lib" &&
- opt != "uuid.lib" &&
- opt != "imm32.lib" &&
- opt != "winmm.lib" &&
- opt != "wsock32.lib" &&
- opt != "ws2_32.lib" &&
- opt != "winspool.lib" &&
- opt != "delayimp.lib")
- {
- newDep->dependencies << opt.section(Option::dir_sep, -1);
- }
- }
- }
- workspace_cleanup.append(newDep);
- workspace_depends.insert(newDep->target, newDep);
-
- debug_msg(1, "Generator: MSVC: Added project (name:'%s' path:'%s' deps:'%s')",
- qPrintable(newDep->target) , qPrintable(newDep->dspProjectFile),
- qPrintable(newDep->dependencies.join(";")));
- }
- }
-nextfile:
- qmake_setpwd(oldpwd);
- }
- }
- }
-
- // Restore previous after_user_var options
- Option::after_user_vars = old_after_vars;
-
- // Output all projects
- QString dswProjectName = QLatin1String(_dswProjectName);
- QString dswProjectDep = QLatin1String(_dswProjectDep);
- for(QList<WorkspaceDepend*>::Iterator it = workspace_cleanup.begin(); it != workspace_cleanup.end(); ++it) {
- t << _dswDevider;
- t << endl;
- t << dswProjectName.arg((*it)->orig_target).arg((*it)->dspProjectFile);
- t << endl;
- t << _dswPackage5Start;
- t << _dswPackage5Stop;
- t << endl;
- t << _dswPackage4Start;
-
- // Output project dependencies
- for(QStringList::iterator dit = (*it)->dependencies.begin(); dit != (*it)->dependencies.end(); ++dit) {
- if(WorkspaceDepend *vc = workspace_depends[*dit])
- t << dswProjectDep.arg(vc->orig_target);
- }
-
- t << _dswPackage4Stop;
- }
-
- // Output global part
- t << _dswDevider << endl;
- t << _dswGlobal;
- t << _dswDevider;
- t << endl << endl;
-}
-
-class FolderGroup
-{
-public:
- QString name;
- QString filter;
- QMap<QString, FolderGroup *> subFolders;
- QMap<QString, QString> files;
-
- void insertStructured(const QString &file, const QString &fileListName)
- {
- QStringList path = QFileInfo(file).path().split("/");
- if (!path.isEmpty() && path.at(0) == ".")
- path.takeAt(0);
- FolderGroup *currentFolder = this;
- for (int i = 0; i < path.size(); i++) {
- if (currentFolder->subFolders.contains(path.at(i))) {
- currentFolder = currentFolder->subFolders.value(path.at(i));
- } else {
- FolderGroup *newFolder = new FolderGroup;
- newFolder->name = path.at(i);
- currentFolder->subFolders.insert(path.at(i), newFolder);
- currentFolder = newFolder;
- }
- }
- currentFolder->files.insert(file, fileListName);
- }
-
- void insertFlat(const QString &file, const QString &fileListName)
- {
- files.insert(file, fileListName);
- }
-
- ~FolderGroup()
- {
- qDeleteAll(subFolders.values());
- }
-};
-
-bool DspMakefileGenerator::writeFileGroup(QTextStream &t, const QStringList &listNames, const QString &group, const QString &filter)
-{
- FolderGroup root;
- root.name = group;
- root.filter = filter;
-
- for (int i = 0; i < listNames.count(); ++i) {
- QStringList list = project->values(listNames.at(i));
- for (int j = 0; j < list.count(); ++j) {
- const QString name = list.at(j);
- if (name.isEmpty())
- continue;
- if (project->isActiveConfig("flat"))
- root.insertFlat(name, listNames.at(i));
- else
- root.insertStructured(name, listNames.at(i));
- }
- }
-
- if (root.files.isEmpty() && root.subFolders.isEmpty())
- return true;
-
- writeSubFileGroup(t, &root);
-
- return true;
-}
-
-void DspMakefileGenerator::writeSubFileGroup(QTextStream &t, FolderGroup *folder)
-{
- t << "# Begin Group \"" << folder->name << "\"" << endl;
- t << "# PROP Default_Filter \"" << folder->filter << "\"" << endl;
- QMap<QString, FolderGroup *>::const_iterator folderIt = folder->subFolders.begin();
- while (folderIt != folder->subFolders.end()) {
- writeSubFileGroup(t, folderIt.value());
- ++folderIt;
- }
- QMap<QString, QString>::const_iterator it = folder->files.begin();
- while (it != folder->files.end()) {
- t << "# Begin Source File" << endl;
- t << "SOURCE=" << escapeFilePath(it.key()) << endl;
- writeBuildstepForFile(t, it.key(), it.value());
- t << "# End Source File" << endl;
- t << endl;
- ++it;
- }
- t << "# End Group" << endl;
- t << endl;
-}
-
-bool DspMakefileGenerator::writeBuildstepForFile(QTextStream &t, const QString &file, const QString &listName)
-{
-
- if (!mergedProjects.count()) {
- t << writeBuildstepForFileForConfig(file, listName, this);
- return true;
- }
-
- //only add special build rules when needed
-
- QStringList specialBuilds;
- int i = 0;
- for (i = 0; i < mergedProjects.count(); ++i)
- specialBuilds += writeBuildstepForFileForConfig(file, listName, mergedProjects.at(i));
-
- // no special build just return
- if (specialBuilds.join("").isEmpty())
- return true;
-
- for (i = 0; i < mergedProjects.count(); ++i) {
- if (i == 0)
- t << "!IF";
- else
- t << "!ELSEIF";
- t << " \"$(CFG)\" == \"" << configName(mergedProjects.at(i)) << "\"" << endl;
- t << endl;
- t << specialBuilds.at(i);
- t << endl;
- }
-
- t << "!ENDIF" << endl;
-
- return true;
-}
-
-bool DspMakefileGenerator::writeDspConfig(QTextStream &t, DspMakefileGenerator *config)
-{
-
- bool isDebug = config->project->isActiveConfig("debug");
- bool staticLibTarget = config->var("MSVCDSP_DSPTYPE") == "0x0104";
-
- QString outDir = Option::fixPathToTargetOS(config->project->first("DESTDIR"));
- while (outDir.endsWith(Option::dir_sep))
- outDir.chop(1);
- outDir = config->escapeFilePath(outDir);
-
- QString intDir = config->project->first("OBJECTS_DIR");
- while (intDir.endsWith(Option::dir_sep))
- intDir.chop(1);
- intDir = config->escapeFilePath(intDir);
-
- t << "# PROP BASE Use_MFC 0" << endl;
- t << "# PROP BASE Use_Debug_Libraries " << (isDebug ? "1" : "0") << endl;
- t << "# PROP BASE Output_Dir " << outDir << endl;
- t << "# PROP BASE Intermediate_Dir " << intDir << endl;
- t << "# PROP BASE Target_Dir \"\"" << endl;
- t << "# PROP Use_MFC 0" << endl;
- t << "# PROP Use_Debug_Libraries " << (isDebug ? "1" : "0") << endl;
-
- t << "# PROP Output_Dir " << outDir << endl;
- t << "# PROP Intermediate_Dir " << intDir << endl;
- if (config->project->isActiveConfig("dll") || config->project->isActiveConfig("plugin"))
- t << "# PROP Ignore_Export_Lib 1" << endl;
- t << "# PROP Target_Dir \"\"" << endl;
- t << "# ADD CPP " << config->var("MSVCDSP_INCPATH") << " /c /FD " << config->var("QMAKE_CXXFLAGS") << " " << config->var("MSVCDSP_DEFINES") << " " << config->var("PRECOMPILED_FLAGS") << endl;
- t << "# ADD MTL /nologo /mktyplib203 /win32 /D " << (isDebug ? "\"_DEBUG\"" : "\"NDEBUG\"") << endl;
- t << "# ADD RSC /l 0x409 /d " << (isDebug ? "\"_DEBUG\"" : "\"NDEBUG\"") << endl;
- t << "# ADD BSC32 /nologo" << endl;
- if (staticLibTarget) {
- t << "LIB32=" << config->var("QMAKE_LIB") << endl;
- t << "# ADD LIB32 " << config->var("MSVCDSP_TARGET") << " " << config->var("PRECOMPILED_OBJECT") << endl;
- } else {
- t << "LINK32=" << config->var("QMAKE_LINK") << endl;
- t << "# ADD LINK32 " << config->var("MSVCDSP_LFLAGS") << " " << config->var("MSVCDSP_LIBS") << " " << config->var("MSVCDSP_TARGET") << " " << config->var("PRECOMPILED_OBJECT") << endl;
- }
-
- if (!config->project->values("MSVCDSP_PRE_LINK").isEmpty())
- t << config->project->values("MSVCDSP_PRE_LINK").first();
-
- if (!config->project->values("MSVCDSP_POST_LINK").isEmpty())
- t << config->project->values("MSVCDSP_POST_LINK").first();
-
- return true;
-}
-
-QString DspMakefileGenerator::writeBuildstepForFileForConfig(const QString &file, const QString &listName, DspMakefileGenerator *config)
-{
- QString ret;
- QTextStream t(&ret);
-
- // exclude from build
- if (!config->project->values(listName).contains(file)) {
- t << "# PROP Exclude_From_Build 1" << endl;
- return ret;
- }
-
- if (config->usePCH) {
- bool c_file = false;
- for (QStringList::Iterator it = Option::c_ext.begin(); it != Option::c_ext.end(); ++it) {
- if (file.endsWith(*it)) {
- c_file = true;
- break;
- }
- }
- if(c_file) {
- t << "# SUBTRACT CPP /FI" << config->escapeFilePath(config->namePCH) << " /Yu" << config->escapeFilePath(config->namePCH) << " /Fp" << endl;
- return ret;
- } else if (config->precompH.endsWith(file)) {
- // ### dependency list quickly becomes too long for VS to grok...
- t << "USERDEP_" << file << "=" << config->valGlue(config->escapeFilePaths(config->findDependencies(config->precompH)), "", "\t", "") << endl;
- t << endl;
- t << "# Begin Custom Build - Creating precompiled header from " << file << "..." << endl;
- t << "InputPath=.\\" << config->escapeFilePath(file) << endl << endl;
- t << config->precompPch + ": $(SOURCE) \"$(IntDir)\" \"$(OUTDIR)\"" << endl;
- t << "\t" << config->var("QMAKE_CC") << " /TP /W3 /FD /c /Yc /Fp" << config->precompPch << " /Fo" << config->precompObj << " /Fd\"$(IntDir)\\\\\" " << file << " ";
- t << config->var("MSVCDSP_INCPATH") << " " << config->var("MSVCDSP_DEFINES") << " " << config->var("QMAKE_CXXFLAGS") << endl;
- t << "# End Custom Build" << endl << endl;
- return ret;
- }
- }
-
- QString fileBase = QFileInfo(file).completeBaseName();
-
- bool hasBuiltin = config->hasBuiltinCompiler(file);
- BuildStep allSteps;
-
- if (!config->swappedBuildSteps.contains(file)) {
- QStringList compilers = config->project->values("QMAKE_EXTRA_COMPILERS");
- for (int i = 0; i < compilers.count(); ++i) {
- QString compiler = compilers.at(i);
- if (config->project->values(compiler + ".input").isEmpty())
- continue;
- QString input = config->project->values(compiler + ".input").first();
- QStringList inputList = config->project->values(input);
- if (!inputList.contains(file))
- continue;
-
- QStringList compilerCommands = config->project->values(compiler + ".commands");
- QStringList compilerOutput = config->project->values(compiler + ".output");
- if (compilerCommands.isEmpty() || compilerOutput.isEmpty())
- continue;
-
- QStringList compilerName = config->project->values(compiler + ".name");
- if (compilerName.isEmpty())
- compilerName << compiler;
- QStringList compilerDepends = config->project->values(compiler + ".depends");
- QString compilerDependsCommand = config->project->values(compiler + ".depend_command").join(" ");
- if (!compilerDependsCommand.isEmpty()) {
- if(!config->canExecute(compilerDependsCommand))
- compilerDependsCommand = QString();
- }
- QStringList compilerConfig = config->project->values(compiler + ".CONFIG");
-
- if (!config->verifyExtraCompiler(compiler, file))
- continue;
-
- bool combineAll = compilerConfig.contains("combine");
- if (combineAll && inputList.first() != file)
- continue;
-
- QString fileIn("$(InputPath)");
-
- if (combineAll && !inputList.isEmpty()) {
- fileIn = inputList.join(" ");
- compilerDepends += inputList;
- }
-
- QString fileOut = compilerOutput.first();
- QString fileOutBase = QFileInfo(fileOut).completeBaseName();
- fileOut.replace("${QMAKE_FILE_IN}", fileIn);
- fileOut.replace("${QMAKE_FILE_BASE}", fileBase);
- fileOut.replace("${QMAKE_FILE_OUT_BASE}", fileOutBase);
- fileOut.replace('/', '\\');
-
- BuildStep step;
- for (int i2 = 0; i2 < compilerDepends.count(); ++i2) {
- QString dependency = compilerDepends.at(i2);
- dependency.replace("${QMAKE_FILE_IN}", fileIn);
- dependency.replace("${QMAKE_FILE_BASE}", fileBase);
- dependency.replace("${QMAKE_FILE_OUT_BASE}", fileOutBase);
- dependency.replace('/', '\\');
- if (!step.deps.contains(dependency, Qt::CaseInsensitive))
- step.deps << dependency;
- }
- // depends command
- if (!compilerDependsCommand.isEmpty() && config->doDepends()) {
- char buff[256];
- QString dep_cmd = config->replaceExtraCompilerVariables(compilerDependsCommand, file,
- fileOut);
- dep_cmd = Option::fixPathToLocalOS(dep_cmd, true, false);
- if(config->canExecute(dep_cmd)) {
- if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) {
- QString indeps;
- while(!feof(proc)) {
- int read_in = (int)fread(buff, 1, 255, proc);
- if(!read_in)
- break;
- indeps += QByteArray(buff, read_in);
- }
- QT_PCLOSE(proc);
- if(!indeps.isEmpty())
- step.deps += config->fileFixify(indeps.replace('\n', ' ').simplified().split(' '));
- }
- }
- }
-
-
- QString mappedFile;
- if (hasBuiltin) {
- mappedFile = fileOut;
- fileOut = fileIn;
- fileIn = file;
- }
-
- step.buildStep += " \\\n\t";
- QString command(compilerCommands.join(" "));
- // Replace any newlines with proper line-continuance
- command.replace("\n", " \\\n\t");
- // Might be a macro, and not a valid filename, so the replaceExtraCompilerVariables() would eat it
- command.replace("${QMAKE_FILE_IN}", config->escapeFilePath(fileIn));
- command.replace("${QMAKE_FILE_BASE}", config->escapeFilePath(fileBase));
- command.replace("${QMAKE_FILE_OUT_BASE}", config->escapeFilePath(fileOutBase));
- command.replace("${QMAKE_FILE_OUT}", config->escapeFilePath(fileOut));
-
- command = config->replaceExtraCompilerVariables(command, fileIn, fileOut);
-
- step.buildName = compilerName.first();
- step.buildStep += command;
- step.buildOutputs += fileOut;
-
- if (hasBuiltin) {
- step.deps << fileIn;
- config->swappedBuildSteps[mappedFile] = step;
- } else {
- allSteps << step;
- }
- }
- } else {
- allSteps << config->swappedBuildSteps.value(file);
- }
-
- if (allSteps.buildStep.isEmpty())
- return ret;
-
- int i;
- QStringList dependencyList;
- // remove dependencies that are also output
- for (i = 0; i < 1; ++i) {
- QStringList buildOutput(allSteps.buildOutputs.at(i));
-
- for (int i2 = 0; i2 < allSteps.deps.count(); ++i2) {
- QString dependency = allSteps.deps.at(i2);
- if (!buildOutput.contains(dependency) && !dependencyList.contains(dependency))
- dependencyList << dependency;
- }
- }
- QString allDependencies = config->valGlue(dependencyList, "", "\t", "");
- t << "USERDEP_" << file << "=" << allDependencies << endl;
- t << "# PROP Ignore_Default_Tool 1" << endl;
- t << "# Begin Custom Build - Running " << allSteps.buildName << " on " << file << endl;
- t << "InputPath=" << file << endl;
- t << "BuildCmds= " << allSteps.buildStep << endl;
- for (i = 0; i < allSteps.buildOutputs.count(); ++i) {
- t << config->escapeFilePath(allSteps.buildOutputs.at(i))
- << " : $(SOURCE) $(INTDIR) $(OUTDIR)\n\t$(BuildCmds)\n";
- }
- t << endl;
- t << "# End Custom Build" << endl;
-
- return ret;
-}
-
-QT_END_NAMESPACE
diff --git a/qmake/generators/win32/msvc_dsp.h b/qmake/generators/win32/msvc_dsp.h
deleted file mode 100644
index f3e2435622..0000000000
--- a/qmake/generators/win32/msvc_dsp.h
+++ /dev/null
@@ -1,122 +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 qmake application of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef MSVC_DSP_H
-#define MSVC_DSP_H
-
-#include "winmakefile.h"
-
-QT_BEGIN_NAMESPACE
-
-class FolderGroup;
-
-class DspMakefileGenerator : public Win32MakefileGenerator
-{
- bool init_flag;
- bool writeDspHeader(QTextStream &);
- bool writeDspParts(QTextStream &);
- bool writeFileGroup(QTextStream &t, const QStringList &listNames, const QString &group, const QString &filter);
- void writeSubFileGroup(QTextStream &t, FolderGroup *folder);
- bool writeBuildstepForFile(QTextStream &t, const QString &file, const QString &listName);
- static bool writeDspConfig(QTextStream &t, DspMakefileGenerator *config);
- static QString writeBuildstepForFileForConfig(const QString &file, const QString &listName, DspMakefileGenerator *config);
- QString configName(DspMakefileGenerator * config);
-
- bool writeMakefile(QTextStream &);
- bool writeProjectMakefile();
- void writeSubDirs(QTextStream &t);
- void init();
-
-public:
- DspMakefileGenerator();
- ~DspMakefileGenerator();
-
- bool openOutput(QFile &file, const QString &build) const;
- bool hasBuiltinCompiler(const QString &filename) const;
-
-protected:
- virtual bool doDepends() const { return false; } //never necesary
- virtual void processSources() { filterIncludedFiles("SOURCES"); filterIncludedFiles("GENERATED_SOURCES"); }
- virtual QString replaceExtraCompilerVariables(const QString &, const QStringList &, const QStringList &);
- inline QString replaceExtraCompilerVariables(const QString &val, const QString &in, const QString &out)
- { return MakefileGenerator::replaceExtraCompilerVariables(val, in, out); }
- virtual bool supportsMetaBuild() { return true; }
- virtual bool supportsMergedBuilds() { return true; }
- virtual bool mergeBuildProject(MakefileGenerator *other);
- virtual void processPrlVariable(const QString &, const QStringList &);
- virtual bool findLibraries();
-
- bool usePCH;
- QString precompH, namePCH,
- precompObj, precompPch;
-
- QString platform;
-
- struct BuildStep {
- BuildStep() {}
- BuildStep &operator<<(const BuildStep &other) {
- deps << other.deps;
- buildStep += other.buildStep;
- buildName += other.buildName;
- buildOutputs += other.buildOutputs;
- return *this;
- }
-
- QStringList deps;
- QString buildStep;
- QString buildName;
- QStringList buildOutputs;
- };
- QMap<QString, BuildStep> swappedBuildSteps;
-
- // Holds all configurations for glue (merged) project
- QList<DspMakefileGenerator*> mergedProjects;
-};
-
-inline DspMakefileGenerator::~DspMakefileGenerator()
-{ }
-
-inline bool DspMakefileGenerator::findLibraries()
-{ return Win32MakefileGenerator::findLibraries("MSVCDSP_LIBS"); }
-
-QT_END_NAMESPACE
-
-#endif // MSVC_DSP_H
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index 7566b23845..92e8aeba7f 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -156,8 +156,6 @@ void NmakeMakefileGenerator::init()
MakefileGenerator::init();
if(project->values("MAKEFILE").isEmpty())
project->values("MAKEFILE").append("Makefile");
- if(project->values("QMAKE_QMAKE").isEmpty())
- project->values("QMAKE_QMAKE").append("qmake");
if(project->isEmpty("QMAKE_COPY_FILE"))
project->values("QMAKE_COPY_FILE").append("$(COPY)");
if(project->isEmpty("QMAKE_COPY_DIR"))
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 58f95e953b..f1777e1d1c 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -1626,8 +1626,7 @@ QString VcprojGenerator::findTemplate(QString file)
!exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2002/" + file))) &&
!exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2003/" + file))) &&
!exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2005/" + file))) &&
- !exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2008/" + file))) &&
- !exists((ret = (QString(qgetenv("HOME")) + "/.tmake/" + file))))
+ !exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2008/" + file))))
return "";
debug_msg(1, "Generator: MSVC.NET: Found template \'%s\'", ret.toLatin1().constData());
return ret;
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index c36cc9cb0c..64aaf34294 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -595,8 +595,7 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t)
writeIncPart(t);
writeLibsPart(t);
- t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") :
- Option::fixPathToTargetOS(var("QMAKE_QMAKE"), false)) << endl;
+ t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
t << "IDC = " << (project->isEmpty("QMAKE_IDC") ? QString("idc") :
Option::fixPathToTargetOS(var("QMAKE_IDC"), false)) << endl;
t << "IDL = " << (project->isEmpty("QMAKE_IDL") ? QString("midl") :
@@ -768,6 +767,11 @@ QString Win32MakefileGenerator::getLibTarget()
return QString(project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".lib");
}
+QString Win32MakefileGenerator::getPdbTarget()
+{
+ return QString(project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".pdb");
+}
+
QString Win32MakefileGenerator::defaultInstall(const QString &t)
{
if((t != "target" && t != "dlltarget") ||
@@ -808,6 +812,18 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t)
uninst.append("\n\t");
uninst.append("-$(DEL_FILE) \"" + dst_targ + "\"");
}
+ if(project->isActiveConfig("shared") && project->isActiveConfig("debug")) {
+ QString pdb_target = getPdbTarget();
+ pdb_target.remove('"');
+ QString src_targ = (project->isEmpty("DESTDIR") ? QString("$(DESTDIR)") : project->first("DESTDIR")) + pdb_target;
+ QString dst_targ = filePrefixRoot(root, fileFixify(targetdir + pdb_target, FileFixifyAbsolute));
+ if(!ret.isEmpty())
+ ret += "\n\t";
+ ret += QString("-$(INSTALL_FILE)") + " \"" + src_targ + "\" \"" + dst_targ + "\"";
+ if(!uninst.isEmpty())
+ uninst.append("\n\t");
+ uninst.append("-$(DEL_FILE) \"" + dst_targ + "\"");
+ }
}
if(t == "dlltarget" || project->values(t + ".CONFIG").indexOf("no_dll") == -1) {
diff --git a/qmake/generators/win32/winmakefile.h b/qmake/generators/win32/winmakefile.h
index 5437524495..3a2e3a1ee8 100644
--- a/qmake/generators/win32/winmakefile.h
+++ b/qmake/generators/win32/winmakefile.h
@@ -83,6 +83,7 @@ protected:
virtual void processRcFileVar();
virtual void processFileTagsVar();
virtual QString getLibTarget();
+ virtual QString getPdbTarget();
};
inline Win32MakefileGenerator::~Win32MakefileGenerator()
diff --git a/qmake/main.cpp b/qmake/main.cpp
index 50f9272e22..42679a2e93 100644
--- a/qmake/main.cpp
+++ b/qmake/main.cpp
@@ -149,7 +149,7 @@ int runQMake(int argc, char **argv)
//setup pwd properly
debug_msg(1, "Resetting dir to: %s", oldpwd.toLatin1().constData());
qmake_setpwd(oldpwd); //reset the old pwd
- int di = fn.lastIndexOf(Option::dir_sep);
+ int di = fn.lastIndexOf(QDir::separator());
if(di != -1) {
debug_msg(1, "Changing dir to: %s", fn.left(di).toLatin1().constData());
if(!qmake_setpwd(fn.left(di)))
diff --git a/qmake/option.cpp b/qmake/option.cpp
index 5522a808a9..b41e39dd1c 100644
--- a/qmake/option.cpp
+++ b/qmake/option.cpp
@@ -88,7 +88,7 @@ int Option::warn_level = WarnLogic;
int Option::debug_level = 0;
QFile Option::output;
QString Option::output_dir;
-bool Option::recursive = false;
+Option::QMAKE_RECURSIVE Option::recursive = Option::QMAKE_RECURSIVE_DEFAULT;
QStringList Option::before_user_vars;
QStringList Option::after_user_vars;
QStringList Option::user_configs;
@@ -96,13 +96,9 @@ QStringList Option::after_user_configs;
QString Option::user_template;
QString Option::user_template_prefix;
QStringList Option::shellPath;
-#if defined(Q_OS_WIN32)
-Option::TARG_MODE Option::target_mode = Option::TARG_WIN_MODE;
-#elif defined(Q_OS_MAC)
-Option::TARG_MODE Option::target_mode = Option::TARG_MACX_MODE;
-#else
-Option::TARG_MODE Option::target_mode = Option::TARG_UNIX_MODE;
-#endif
+Option::HOST_MODE Option::host_mode = Option::HOST_UNKNOWN_MODE;
+Option::TARG_MODE Option::target_mode = Option::TARG_UNKNOWN_MODE;
+bool Option::target_mode_overridden = false;
//QMAKE_*_PROPERTY stuff
QStringList Option::prop::properties;
@@ -126,7 +122,7 @@ QString Option::mkfile::qmakespec_commandline;
static Option::QMAKE_MODE default_mode(QString progname)
{
- int s = progname.lastIndexOf(Option::dir_sep);
+ int s = progname.lastIndexOf(QDir::separator());
if(s != -1)
progname = progname.right(progname.length() - (s + 1));
if(progname == "qmakegen")
@@ -136,6 +132,20 @@ static Option::QMAKE_MODE default_mode(QString progname)
return Option::QMAKE_GENERATE_MAKEFILE;
}
+static QString detectProjectFile(const QString &path)
+{
+ QString ret;
+ QDir dir(path);
+ if(dir.exists(dir.dirName() + Option::pro_ext)) {
+ ret = dir.filePath(dir.dirName()) + Option::pro_ext;
+ } else { //last try..
+ QStringList profiles = dir.entryList(QStringList("*" + Option::pro_ext));
+ if(profiles.count() == 1)
+ ret = dir.filePath(profiles.at(0));
+ }
+ return ret;
+}
+
QString project_builtin_regx();
bool usage(const char *a0)
{
@@ -170,9 +180,6 @@ bool usage(const char *a0)
" * processed as if it was in [files]. These assignments will be parsed *\n"
" * before [files]. *\n"
" -o file Write output to file\n"
- " -unix Run in unix mode\n"
- " -win32 Run in win32 mode\n"
- " -macx Run in Mac OS X mode\n"
" -d Increase debug level\n"
" -t templ Overrides TEMPLATE as templ\n"
" -tp prefix Overrides TEMPLATE so that prefix is prefixed into the value\n"
@@ -209,7 +216,7 @@ Option::parseCommandLine(int argc, char **argv, int skip)
if(x == 1) {
bool specified = true;
if(opt == "project") {
- Option::recursive = true;
+ Option::recursive = Option::QMAKE_RECURSIVE_YES;
Option::qmake_mode = Option::QMAKE_GENERATE_PROJECT;
} else if(opt == "prl") {
Option::mkfile::do_deps = false;
@@ -236,14 +243,21 @@ Option::parseCommandLine(int argc, char **argv, int skip)
Option::user_template = argv[++x];
} else if(opt == "tp" || opt == "template_prefix") {
Option::user_template_prefix = argv[++x];
- } else if(opt == "mac9") {
- Option::target_mode = TARG_MAC9_MODE;
} else if(opt == "macx") {
+ fprintf(stderr, "-macx is deprecated.\n");
+ Option::host_mode = HOST_MACX_MODE;
Option::target_mode = TARG_MACX_MODE;
+ Option::target_mode_overridden = true;
} else if(opt == "unix") {
+ fprintf(stderr, "-unix is deprecated.\n");
+ Option::host_mode = HOST_UNIX_MODE;
Option::target_mode = TARG_UNIX_MODE;
+ Option::target_mode_overridden = true;
} else if(opt == "win32") {
+ fprintf(stderr, "-win32 is deprecated.\n");
+ Option::host_mode = HOST_WIN_MODE;
Option::target_mode = TARG_WIN_MODE;
+ Option::target_mode_overridden = true;
} else if(opt == "d") {
Option::debug_level++;
} else if(opt == "version" || opt == "v" || opt == "-version") {
@@ -267,9 +281,9 @@ Option::parseCommandLine(int argc, char **argv, int skip)
} else if(opt == "Wnone") {
Option::warn_level = WarnNone;
} else if(opt == "r" || opt == "recursive") {
- Option::recursive = true;
- } else if(opt == "norecursive") {
- Option::recursive = false;
+ Option::recursive = Option::QMAKE_RECURSIVE_YES;
+ } else if(opt == "nr" || opt == "norecursive") {
+ Option::recursive = Option::QMAKE_RECURSIVE_NO;
} else if(opt == "config") {
Option::user_configs += argv[++x];
} else {
@@ -322,12 +336,18 @@ Option::parseCommandLine(int argc, char **argv, int skip)
if(!fi.makeAbsolute()) //strange
arg = fi.filePath();
if(Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE ||
- Option::qmake_mode == Option::QMAKE_GENERATE_PRL)
+ Option::qmake_mode == Option::QMAKE_GENERATE_PRL) {
+ if(fi.isDir()) {
+ QString proj = detectProjectFile(arg);
+ if (!proj.isNull())
+ arg = proj;
+ }
Option::mkfile::project_files.append(arg);
- else if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT)
+ } else if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT) {
Option::projfile::project_dirs.append(arg);
- else
+ } else {
handled = false;
+ }
}
if(!handled) {
return Option::QMAKE_CMDLINE_SHOW_USAGE | Option::QMAKE_CMDLINE_ERROR;
@@ -387,6 +407,7 @@ Option::init(int argc, char **argv)
#ifdef Q_OS_WIN
Option::dirlist_sep = ";";
Option::shellPath = detectShellPath();
+ Option::res_ext = ".res";
#else
Option::dirlist_sep = ":";
#endif
@@ -494,15 +515,9 @@ Option::init(int argc, char **argv)
//try REALLY hard to do it for them, lazy..
if(Option::mkfile::project_files.isEmpty()) {
- QString pwd = qmake_getpwd(),
- proj = pwd + "/" + pwd.right(pwd.length() - (pwd.lastIndexOf('/') + 1)) + Option::pro_ext;
- if(QFile::exists(proj)) {
+ QString proj = detectProjectFile(qmake_getpwd());
+ if(!proj.isNull())
Option::mkfile::project_files.append(proj);
- } else { //last try..
- QStringList profiles = QDir(pwd).entryList(QStringList("*" + Option::pro_ext));
- if(profiles.count() == 1)
- Option::mkfile::project_files.append(pwd + "/" + profiles[0]);
- }
#ifndef QT_BUILD_QMAKE_LIBRARY
if(Option::mkfile::project_files.isEmpty()) {
usage(argv[0]);
@@ -510,24 +525,37 @@ Option::init(int argc, char **argv)
}
#endif
}
+ } else if (Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT) {
+#if defined(Q_OS_MAC)
+ Option::host_mode = Option::HOST_MACX_MODE;
+ Option::target_mode = Option::TARG_MACX_MODE;
+#elif defined(Q_OS_UNIX)
+ Option::host_mode = Option::HOST_UNIX_MODE;
+ Option::target_mode = Option::TARG_UNIX_MODE;
+#else
+ Option::host_mode = Option::HOST_WIN_MODE;
+ Option::target_mode = Option::TARG_WIN_MODE;
+#endif
}
//defaults for globals
- if(Option::target_mode == Option::TARG_WIN_MODE) {
- Option::dir_sep = "\\";
- Option::obj_ext = ".obj";
- Option::res_ext = ".res";
- } else {
- if(Option::target_mode == Option::TARG_MAC9_MODE)
- Option::dir_sep = ":";
- else
- Option::dir_sep = "/";
- Option::obj_ext = ".o";
- }
- Option::qmake_abslocation = Option::fixPathToTargetOS(Option::qmake_abslocation);
+ if (Option::host_mode != Option::HOST_UNKNOWN_MODE)
+ applyHostMode();
return QMAKE_CMDLINE_SUCCESS;
}
+void Option::applyHostMode()
+{
+ if (Option::host_mode == Option::HOST_WIN_MODE) {
+ Option::dir_sep = "\\";
+ Option::obj_ext = ".obj";
+ } else {
+ Option::dir_sep = "/";
+ Option::obj_ext = ".o";
+ }
+ Option::qmake_abslocation = Option::fixPathToTargetOS(Option::qmake_abslocation);
+}
+
bool Option::postProcessProject(QMakeProject *project)
{
Option::cpp_ext = project->variables()["QMAKE_EXT_CPP"];
diff --git a/qmake/option.h b/qmake/option.h
index fe9a4ef798..9bfdaede88 100644
--- a/qmake/option.h
+++ b/qmake/option.h
@@ -106,6 +106,7 @@ struct Option
//both of these must be called..
static int init(int argc=0, char **argv=0); //parse cmdline
+ static void applyHostMode();
static bool postProcessProject(QMakeProject *);
enum StringFixFlags {
@@ -148,10 +149,15 @@ struct Option
static QString output_dir;
static int debug_level;
static int warn_level;
- static bool recursive;
+ enum QMAKE_RECURSIVE { QMAKE_RECURSIVE_DEFAULT, QMAKE_RECURSIVE_YES, QMAKE_RECURSIVE_NO };
+ static QMAKE_RECURSIVE recursive;
static QStringList before_user_vars, after_user_vars, user_configs, after_user_configs;
- enum TARG_MODE { TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_MODE, TARG_MAC9_MODE };
+ enum HOST_MODE { HOST_UNKNOWN_MODE, HOST_UNIX_MODE, HOST_WIN_MODE, HOST_MACX_MODE };
+ static HOST_MODE host_mode;
+ enum TARG_MODE { TARG_UNKNOWN_MODE, TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_MODE,
+ TARG_SYMBIAN_MODE };
static TARG_MODE target_mode;
+ static bool target_mode_overridden;
static QString user_template, user_template_prefix;
static QStringList shellPath;
@@ -205,7 +211,8 @@ public:
TranslationsPath,
SettingsPath,
DemosPath,
- ExamplesPath
+ ExamplesPath,
+ ImportsPath
};
static QString location(LibraryLocation);
};
diff --git a/qmake/project.cpp b/qmake/project.cpp
index e4ef7ddcc5..9e6db108ea 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -43,6 +43,7 @@
#include "property.h"
#include "option.h"
#include "cachekeys.h"
+#include "generators/metamakefile.h"
#include <qdatetime.h>
#include <qfile.h>
@@ -121,7 +122,7 @@ enum TestFunc { T_REQUIRES=1, T_GREATERTHAN, T_LESSTHAN, T_EQUALS,
T_EXISTS, T_EXPORT, T_CLEAR, T_UNSET, T_EVAL, T_CONFIG, T_SYSTEM,
T_RETURN, T_BREAK, T_NEXT, T_DEFINED, T_CONTAINS, T_INFILE,
T_COUNT, T_ISEMPTY, T_INCLUDE, T_LOAD, T_DEBUG, T_ERROR,
- T_MESSAGE, T_WARNING, T_IF };
+ T_MESSAGE, T_WARNING, T_IF, T_OPTION };
QMap<QString, TestFunc> qmake_testFunctions()
{
static QMap<QString, TestFunc> *qmake_test_functions = 0;
@@ -155,6 +156,7 @@ QMap<QString, TestFunc> qmake_testFunctions()
qmake_test_functions->insert("error", T_ERROR);
qmake_test_functions->insert("message", T_MESSAGE);
qmake_test_functions->insert("warning", T_WARNING);
+ qmake_test_functions->insert("option", T_OPTION);
}
return *qmake_test_functions;
}
@@ -184,9 +186,7 @@ static QString remove_quotes(const QString &arg)
static QString varMap(const QString &x)
{
QString ret(x);
- if(ret.startsWith("TMAKE")) //tmake no more!
- ret = "QMAKE" + ret.mid(5);
- else if(ret == "INTERFACES")
+ if(ret == "INTERFACES")
ret = "FORMS";
else if(ret == "QMAKE_POST_BUILD")
ret = "QMAKE_POST_LINK";
@@ -509,69 +509,6 @@ static void qmake_error_msg(const QString &msg)
msg.toLatin1().constData());
}
-enum isForSymbian_enum {
- isForSymbian_NOT_SET = -1,
- isForSymbian_FALSE = 0,
- isForSymbian_ABLD = 1,
- isForSymbian_SBSV2 = 2,
-};
-
-static isForSymbian_enum isForSymbian_value = isForSymbian_NOT_SET;
-
-// Checking for symbian build is primarily determined from the qmake spec,
-// but if that is not specified, detect if symbian is the default spec
-// by checking the MAKEFILE_GENERATOR variable value.
-static void init_symbian(const QMap<QString, QStringList>& vars)
-{
- if (isForSymbian_value != isForSymbian_NOT_SET)
- return;
-
- QString spec = QFileInfo(Option::mkfile::qmakespec).fileName();
- if (spec.startsWith("symbian-abld", Qt::CaseInsensitive)) {
- isForSymbian_value = isForSymbian_ABLD;
- } else if (spec.startsWith("symbian-sbsv2", Qt::CaseInsensitive)) {
- isForSymbian_value = isForSymbian_SBSV2;
- } else {
- QStringList generatorList = vars["MAKEFILE_GENERATOR"];
-
- if (!generatorList.isEmpty()) {
- QString generator = generatorList.first();
- if (generator.startsWith("SYMBIAN_ABLD"))
- isForSymbian_value = isForSymbian_ABLD;
- else if (generator.startsWith("SYMBIAN_SBSV2"))
- isForSymbian_value = isForSymbian_SBSV2;
- else
- isForSymbian_value = isForSymbian_FALSE;
- } else {
- isForSymbian_value = isForSymbian_FALSE;
- }
- }
-
- // Force recursive on Symbian, as non-recursive is not really a viable option there
- if (isForSymbian_value != isForSymbian_FALSE)
- Option::recursive = true;
-}
-
-bool isForSymbian()
-{
- // If isForSymbian_value has not been initialized explicitly yet,
- // call initializer with dummy map to check qmake spec.
- if (isForSymbian_value == isForSymbian_NOT_SET)
- init_symbian(QMap<QString, QStringList>());
-
- return (isForSymbian_value != isForSymbian_FALSE);
-}
-
-bool isForSymbianSbsv2()
-{
- // If isForSymbian_value has not been initialized explicitly yet,
- // call initializer with dummy map to check qmake spec.
- if (isForSymbian_value == isForSymbian_NOT_SET)
- init_symbian(QMap<QString, QStringList>());
-
- return (isForSymbian_value == isForSymbian_SBSV2);
-}
-
/*
1) environment variable QMAKEFEATURES (as separated by colons)
2) property variable QMAKEFEATURES (as separated by colons)
@@ -597,25 +534,15 @@ QStringList qmake_feature_paths(QMakeProperty *prop=0)
concat << base_concat + QDir::separator() + "macx";
concat << base_concat + QDir::separator() + "unix";
break;
+ default: // Can't happen, just make the compiler shut up
case Option::TARG_UNIX_MODE:
- {
- if (isForSymbian())
- concat << base_concat + QDir::separator() + "symbian";
- else
- concat << base_concat + QDir::separator() + "unix";
- break;
- }
+ concat << base_concat + QDir::separator() + "unix";
+ break;
case Option::TARG_WIN_MODE:
- {
- if (isForSymbian())
- concat << base_concat + QDir::separator() + "symbian";
- else
- concat << base_concat + QDir::separator() + "win32";
- break;
- }
- case Option::TARG_MAC9_MODE:
- concat << base_concat + QDir::separator() + "mac";
- concat << base_concat + QDir::separator() + "mac9";
+ concat << base_concat + QDir::separator() + "win32";
+ break;
+ case Option::TARG_SYMBIAN_MODE:
+ concat << base_concat + QDir::separator() + "symbian";
break;
}
concat << base_concat;
@@ -629,7 +556,7 @@ QStringList qmake_feature_paths(QMakeProperty *prop=0)
feature_roots += splitPathList(prop->value("QMAKEFEATURES"));
if(!Option::mkfile::cachefile.isEmpty()) {
QString path;
- int last_slash = Option::mkfile::cachefile.lastIndexOf(Option::dir_sep);
+ int last_slash = Option::mkfile::cachefile.lastIndexOf(QDir::separator());
if(last_slash != -1)
path = Option::fixPathToLocalOS(Option::mkfile::cachefile.left(last_slash));
for(QStringList::Iterator concat_it = concat.begin();
@@ -772,6 +699,7 @@ QMakeProject::reset()
scope_blocks.push(ScopeBlock());
iterator = 0;
function = 0;
+ recursive = false;
}
bool
@@ -1362,16 +1290,7 @@ bool
QMakeProject::read(uchar cmd)
{
if(cfile.isEmpty()) {
- //find out where qmake (myself) lives
- if (!base_vars.contains("QMAKE_QMAKE")) {
- if (!Option::qmake_abslocation.isNull())
- base_vars["QMAKE_QMAKE"] = QStringList(Option::qmake_abslocation);
- else
- base_vars["QMAKE_QMAKE"] = QStringList("qmake");
- }
-
// hack to get the Option stuff in there
- base_vars["QMAKE_EXT_OBJ"] = QStringList(Option::obj_ext);
base_vars["QMAKE_EXT_CPP"] = Option::cpp_ext;
base_vars["QMAKE_EXT_C"] = Option::c_ext;
base_vars["QMAKE_EXT_H"] = Option::h_ext;
@@ -1457,16 +1376,12 @@ QMakeProject::read(uchar cmd)
while(qmakespec.endsWith(QString(QChar(QDir::separator()))))
qmakespec.truncate(qmakespec.length()-1);
QString spec = qmakespec + QDir::separator() + "qmake.conf";
- if(!QFile::exists(spec) &&
- QFile::exists(qmakespec + QDir::separator() + "tmake.conf"))
- spec = qmakespec + QDir::separator() + "tmake.conf";
debug_msg(1, "QMAKESPEC conf: reading %s", spec.toLatin1().constData());
if(!read(spec, base_vars)) {
fprintf(stderr, "Failure to read QMAKESPEC conf file %s.\n", spec.toLatin1().constData());
return false;
}
-
- init_symbian(base_vars);
+ validateModes();
if(Option::mkfile::do_cache && !Option::mkfile::cachefile.isEmpty()) {
debug_msg(1, "QMAKECACHE file: reading %s", Option::mkfile::cachefile.toLatin1().constData());
@@ -1590,6 +1505,46 @@ QMakeProject::read(uchar cmd)
return true;
}
+void QMakeProject::validateModes()
+{
+ if (Option::host_mode == Option::HOST_UNKNOWN_MODE
+ || Option::target_mode == Option::TARG_UNKNOWN_MODE) {
+ Option::HOST_MODE host_mode;
+ Option::TARG_MODE target_mode;
+ const QStringList &gen = base_vars.value("MAKEFILE_GENERATOR");
+ if (gen.isEmpty()) {
+ fprintf(stderr, "%s:%d: Using OS scope before setting MAKEFILE_GENERATOR\n",
+ parser.file.toLatin1().constData(), parser.line_no);
+ } else if (MetaMakefileGenerator::modesForGenerator(gen.first(),
+ &host_mode, &target_mode)) {
+ if (Option::host_mode == Option::HOST_UNKNOWN_MODE) {
+ Option::host_mode = host_mode;
+ Option::applyHostMode();
+ }
+
+ if (Option::target_mode == Option::TARG_UNKNOWN_MODE) {
+ const QStringList &tgt = base_vars.value("TARGET_PLATFORM");
+ if (!tgt.isEmpty()) {
+ const QString &os = tgt.first();
+ if (os == "unix")
+ Option::target_mode = Option::TARG_UNIX_MODE;
+ else if (os == "macx")
+ Option::target_mode = Option::TARG_MACX_MODE;
+ else if (os == "symbian")
+ Option::target_mode = Option::TARG_SYMBIAN_MODE;
+ else if (os == "win32")
+ Option::target_mode = Option::TARG_WIN_MODE;
+ else
+ fprintf(stderr, "Unknown target platform specified: %s\n",
+ os.toLatin1().constData());
+ } else {
+ Option::target_mode = target_mode;
+ }
+ }
+ }
+ }
+}
+
bool
QMakeProject::isActiveConfig(const QString &x, bool regex, QMap<QString, QStringList> *place)
{
@@ -1602,31 +1557,26 @@ QMakeProject::isActiveConfig(const QString &x, bool regex, QMap<QString, QString
else if(x == "false")
return false;
+ if (x == "unix") {
+ validateModes();
+ return Option::target_mode == Option::TARG_UNIX_MODE
+ || Option::target_mode == Option::TARG_MACX_MODE
+ || Option::target_mode == Option::TARG_SYMBIAN_MODE;
+ } else if (x == "macx" || x == "mac") {
+ validateModes();
+ return Option::target_mode == Option::TARG_MACX_MODE;
+ } else if (x == "symbian") {
+ validateModes();
+ return Option::target_mode == Option::TARG_SYMBIAN_MODE;
+ } else if (x == "win32") {
+ validateModes();
+ return Option::target_mode == Option::TARG_WIN_MODE;
+ }
+
+ //mkspecs
static QString spec;
if(spec.isEmpty())
spec = QFileInfo(Option::mkfile::qmakespec).fileName();
-
- // Symbian is an exception to how scopes are resolved. Since we do not
- // have a separate target mode for Symbian, but we expect the scope to resolve
- // on other platforms we base it entirely on the mkspec. This means that
- // using a mkspec starting with 'symbian*' will resolve both the 'symbian'
- // and the 'unix' (because of Open C) scopes to true.
- if(isForSymbian() && (x == "symbian" || x == "unix"))
- return true;
-
- //mkspecs
- if((Option::target_mode == Option::TARG_MACX_MODE ||
- Option::target_mode == Option::TARG_UNIX_MODE) && x == "unix")
- return !isForSymbian();
- else if(Option::target_mode == Option::TARG_MACX_MODE && x == "macx")
- return !isForSymbian();
- else if(Option::target_mode == Option::TARG_MAC9_MODE && x == "mac9")
- return !isForSymbian();
- else if((Option::target_mode == Option::TARG_MAC9_MODE || Option::target_mode == Option::TARG_MACX_MODE) &&
- x == "mac")
- return !isForSymbian();
- else if(Option::target_mode == Option::TARG_WIN_MODE && x == "win32")
- return !isForSymbian();
QRegExp re(x, Qt::CaseSensitive, QRegExp::Wildcard);
if((regex && re.exactMatch(spec)) || (!regex && spec == x))
return true;
@@ -1718,7 +1668,7 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QMap<QString, QStringL
if(file.indexOf(Option::dir_sep) == -1 || !QFile::exists(file)) {
static QStringList *feature_roots = 0;
if(!feature_roots) {
- init_symbian(base_vars);
+ validateModes();
feature_roots = new QStringList(qmake_feature_paths(prop));
qmakeAddCacheClear(qmakeDeleteCacheClear_QStringList, (void**)&feature_roots);
}
@@ -2782,6 +2732,21 @@ QMakeProject::doProjectTest(QString func, QList<QStringList> args_list, QMap<QSt
exit(2);
#endif
return true; }
+ case T_OPTION:
+ if (args.count() != 1) {
+ fprintf(stderr, "%s:%d: option() requires one argument.\n",
+ parser.file.toLatin1().constData(), parser.line_no);
+ return false;
+ }
+ if (args.first() == "recursive") {
+ recursive = true;
+ } else {
+ fprintf(stderr, "%s:%d: unrecognized option() argument '%s'.\n",
+ parser.file.toLatin1().constData(), parser.line_no,
+ args.first().toLatin1().constData());
+ return false;
+ }
+ return true;
default:
fprintf(stderr, "%s:%d: Unknown test function: %s\n", parser.file.toLatin1().constData(), parser.line_no,
func.toLatin1().constData());
@@ -3081,8 +3046,6 @@ QStringList &QMakeProject::values(const QString &_var, QMap<QString, QStringList
QString orig_template = place["TEMPLATE"].first(), real_template;
if(!Option::user_template_prefix.isEmpty() && !orig_template.startsWith(Option::user_template_prefix))
real_template = Option::user_template_prefix + orig_template;
- if(real_template.endsWith(".t"))
- real_template = real_template.left(real_template.length()-2);
if(!real_template.isEmpty()) {
var = ".BUILTIN." + var;
place[var] = QStringList(real_template);
@@ -3166,6 +3129,19 @@ QStringList &QMakeProject::values(const QString &_var, QMap<QString, QStringList
} else if (var == QLatin1String("QMAKE_DIR_SEP")) {
if (place[var].isEmpty())
return values("DIR_SEPARATOR", place);
+ } else if (var == QLatin1String("QMAKE_EXT_OBJ")) {
+ if (place[var].isEmpty()) {
+ var = ".BUILTIN." + var;
+ place[var] = QStringList(Option::obj_ext);
+ }
+ } else if (var == QLatin1String("QMAKE_QMAKE")) {
+ if (place[var].isEmpty()) {
+ if (!Option::qmake_abslocation.isNull())
+ place[var] = QStringList(Option::qmake_abslocation);
+ else
+ place[var] = QStringList(Option::fixPathToTargetOS(
+ QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmake", false));
+ }
} else if (var == QLatin1String("EPOCROOT")) {
if (place[var].isEmpty())
place[var] = QStringList(epocRoot());
diff --git a/qmake/project.h b/qmake/project.h
index 1f53bf22ab..bfebed0be2 100644
--- a/qmake/project.h
+++ b/qmake/project.h
@@ -78,6 +78,7 @@ class QMakeProject
FunctionBlock *function;
QMap<QString, FunctionBlock*> testFunctions, replaceFunctions;
+ bool recursive;
bool own_prop;
QString pfile, cfile;
QMakeProperty *prop;
@@ -105,6 +106,7 @@ class QMakeProject
QStringList doVariableReplaceExpand(const QString &str, QMap<QString, QStringList> &place, bool *ok=0);
void init(QMakeProperty *, const QMap<QString, QStringList> *);
QStringList &values(const QString &v, QMap<QString, QStringList> &place);
+ void validateModes();
public:
QMakeProject() { init(0, 0); }
@@ -154,6 +156,8 @@ public:
QString first(const QString &v);
QMap<QString, QStringList> &variables();
+ bool isRecursive() const { return recursive; }
+
protected:
friend class MakefileGenerator;
bool read(const QString &file, QMap<QString, QStringList> &place);
@@ -192,10 +196,6 @@ inline QString QMakeProject::first(const QString &v)
inline QMap<QString, QStringList> &QMakeProject::variables()
{ return vars; }
-// Helper functions needed for Symbian
-bool isForSymbian();
-bool isForSymbianSbsv2();
-
QT_END_NAMESPACE
#endif // PROJECT_H
diff --git a/qmake/property.cpp b/qmake/property.cpp
index 34368cd206..fde7c6560d 100644
--- a/qmake/property.cpp
+++ b/qmake/property.cpp
@@ -95,6 +95,8 @@ QMakeProperty::value(QString v, bool just_check)
return QLibraryInfo::location(QLibraryInfo::BinariesPath);
else if(v == "QT_INSTALL_PLUGINS")
return QLibraryInfo::location(QLibraryInfo::PluginsPath);
+ else if(v == "QT_INSTALL_IMPORTS")
+ return QLibraryInfo::location(QLibraryInfo::ImportsPath);
else if(v == "QT_INSTALL_TRANSLATIONS")
return QLibraryInfo::location(QLibraryInfo::TranslationsPath);
else if(v == "QT_INSTALL_CONFIGURATION")
@@ -104,7 +106,7 @@ QMakeProperty::value(QString v, bool just_check)
else if(v == "QT_INSTALL_DEMOS")
return QLibraryInfo::location(QLibraryInfo::DemosPath);
else if(v == "QMAKE_MKSPECS")
- return qmake_mkspec_paths().join(Option::target_mode == Option::TARG_WIN_MODE ? ";" : ":");
+ return qmake_mkspec_paths().join(Option::dirlist_sep);
else if(v == "QMAKE_VERSION")
return qmake_version();
#ifdef QT_VERSION_STR
@@ -191,6 +193,7 @@ QMakeProperty::exec()
specialProps.append("QT_INSTALL_LIBS");
specialProps.append("QT_INSTALL_BINS");
specialProps.append("QT_INSTALL_PLUGINS");
+ specialProps.append("QT_INSTALL_IMPORTS");
specialProps.append("QT_INSTALL_TRANSLATIONS");
specialProps.append("QT_INSTALL_CONFIGURATION");
specialProps.append("QT_INSTALL_EXAMPLES");
diff --git a/qmake/qmake.pri b/qmake/qmake.pri
index 05debe6e95..0821f00e75 100644
--- a/qmake/qmake.pri
+++ b/qmake/qmake.pri
@@ -12,7 +12,7 @@ SOURCES += project.cpp property.cpp main.cpp generators/makefile.cpp \
generators/makefiledeps.cpp generators/metamakefile.cpp generators/mac/pbuilder_pbx.cpp \
generators/xmloutput.cpp generators/win32/borland_bmake.cpp \
generators/win32/msvc_nmake.cpp generators/projectgenerator.cpp \
- generators/win32/msvc_dsp.cpp generators/win32/msvc_vcproj.cpp \
+ generators/win32/msvc_vcproj.cpp \
generators/win32/msvc_objectmodel.cpp \
generators/symbian/symmake.cpp \
generators/symbian/symmake_abld.cpp \
@@ -26,7 +26,7 @@ HEADERS += project.h property.h generators/makefile.h \
generators/win32/winmakefile.h generators/projectgenerator.h \
generators/makefiledeps.h generators/metamakefile.h generators/mac/pbuilder_pbx.h \
generators/xmloutput.h generators/win32/borland_bmake.h generators/win32/msvc_nmake.h \
- generators/win32/msvc_dsp.h generators/win32/msvc_vcproj.h \
+ generators/win32/msvc_vcproj.h \
generators/win32/mingw_make.h generators/win32/msvc_objectmodel.h \
generators/symbian/symmake.h \
generators/symbian/symmake_abld.h \
diff --git a/src/3rdparty/README b/src/3rdparty/README
index ef05674a1f..0248db1c53 100644
--- a/src/3rdparty/README
+++ b/src/3rdparty/README
@@ -1,26 +1,22 @@
The libraries included here are the original packages, unpacked, and
with their version number removed from the directory name (for version
-information, see the README files in the directories). The following
-have been removed:
-
- libjpeg - some source files, images, Makefiles, manual pages
- libpng/contrib - a collection of examples and test-suite
- libmng/bcb - a collection of files for the Borland compiler
- libmng/contrib - a collection of projects that use libmng
- libmng/special - configuration file for Mozilla integration
- libtiff/contrib - a collection of additions to libtiff
- libtiff/man - manual pages
- libtiff/tools - a collection of command-line tools based on libtiff
- zlib/contrib - a collection of non-zlib code
- zlib/amiga - zlib for a platform not supported by Qt
- zlib/as400 - zlib for a platform not supported by Qt
- zlib/msdos - zlib for a platform not supported by Qt
- zlib/old - zlib for a platform not supported by Qt
- zlib/qnx - zlib packaging
+information, see the README files in the directories).
-Some patches are applied from time to time. Recent patches can be
-found in the patches subdirectory.
+Certain files and subdirectories of the original library packages that
+are irrelevant to Qt may not be included here. Typically, those are
+the standalone library configuration and make files, tools, test
+files, contribs, documentation, and similar.
+Patches may have been applied, typically for configuration and build
+issues in the Qt framework. Such patches can be reviewed in the the
+public git repository; they will appear in the commit logs of each
+library directory, following the latest clean version update commit.
+
+The 'patches' subdirectory contains certain patches applied prior to
+the start of the public git history, where the library has not been
+updated since.
+
+--
The pvr2d.h & wsegl.h in the powervr directory are required for building
the PowerVR plugin on Qt for Embedded Linux. These headers are for SGX
diff --git a/src/3rdparty/clucene/src/CLucene/index/SegmentTermDocs.cpp b/src/3rdparty/clucene/src/CLucene/index/SegmentTermDocs.cpp
index f4c5e3adec..50951e9ba5 100644
--- a/src/3rdparty/clucene/src/CLucene/index/SegmentTermDocs.cpp
+++ b/src/3rdparty/clucene/src/CLucene/index/SegmentTermDocs.cpp
@@ -112,47 +112,51 @@ CL_NS_DEF(index)
return _freq;
}
- bool SegmentTermDocs::next() {
- while (true) {
- if (count == df)
- return false;
- uint32_t docCode = freqStream->readVInt();
- _doc += docCode >> 1; //unsigned shift
- if ((docCode & 1) != 0) // if low bit is set
- _freq = 1; // _freq is one
- else
- _freq = freqStream->readVInt(); // else read _freq
- count++;
-
- if ( (deletedDocs == NULL) || (deletedDocs->get(_doc) == false ) )
- break;
- skippingDoc();
+bool SegmentTermDocs::next()
+{
+ while (true) {
+ if (count == df)
+ return false;
+
+ uint32_t docCode = freqStream->readVInt();
+ _doc += docCode >> 1; //unsigned shift
+ if ((docCode & 1) != 0) // if low bit is set
+ _freq = 1; // _freq is one
+ else
+ _freq = freqStream->readVInt(); // else read _freq
+ count++;
+
+ if (deletedDocs == NULL || (_doc >= 0 && !deletedDocs->get(_doc)))
+ break;
+ skippingDoc();
}
return true;
- }
+}
- int32_t SegmentTermDocs::read(int32_t* docs, int32_t* freqs, int32_t length) {
+
+int32_t SegmentTermDocs::read(int32_t* docs, int32_t* freqs, int32_t length)
+{
int32_t i = 0;
-//todo: one optimization would be to get the pointer buffer for ram or mmap dirs
-//and iterate over them instead of using readByte() intensive functions.
- while (i<length && count < df) {
- uint32_t docCode = freqStream->readVInt();
- _doc += docCode >> 1;
- if ((docCode & 1) != 0) // if low bit is set
- _freq = 1; // _freq is one
- else
- _freq = freqStream->readVInt(); // else read _freq
- count++;
-
- if (deletedDocs == NULL || !deletedDocs->get(_doc)) {
- docs[i] = _doc;
- freqs[i] = _freq;
- i++;
- }
+ // TODO: one optimization would be to get the pointer buffer for ram or mmap
+ // dirs and iterate over them instead of using readByte() intensive functions.
+ while (i < length && count < df) {
+ uint32_t docCode = freqStream->readVInt();
+ _doc += docCode >> 1;
+ if ((docCode & 1) != 0) // if low bit is set
+ _freq = 1; // _freq is one
+ else
+ _freq = freqStream->readVInt(); // else read _freq
+ count++;
+
+ if (deletedDocs == NULL || (_doc >= 0 && !deletedDocs->get(_doc))) {
+ docs[i] = _doc;
+ freqs[i] = _freq;
+ i++;
+ }
}
return i;
- }
+}
bool SegmentTermDocs::skipTo(const int32_t target){
if (df >= skipInterval) { // optimized case
diff --git a/src/3rdparty/clucene/src/CLucene/index/Term.cpp b/src/3rdparty/clucene/src/CLucene/index/Term.cpp
index fc32e44580..5ff7bb2644 100644
--- a/src/3rdparty/clucene/src/CLucene/index/Term.cpp
+++ b/src/3rdparty/clucene/src/CLucene/index/Term.cpp
@@ -153,7 +153,10 @@ int32_t Term::compareTo(const Term* other) const
if (_field == other->_field)
return _tcscmp(_text, other->_text);
- return _tcscmp(_field, other->_field);
+ int32_t ret = _tcscmp(_field, other->_field);
+ if (ret == 0)
+ ret = _tcscmp(_text, other->_text);
+ return ret;
}
TCHAR* Term::toString() const
diff --git a/src/3rdparty/clucene/src/CLucene/queryParser/MultiFieldQueryParser.cpp b/src/3rdparty/clucene/src/CLucene/queryParser/MultiFieldQueryParser.cpp
index ea93ec4efd..b57896b66a 100644
--- a/src/3rdparty/clucene/src/CLucene/queryParser/MultiFieldQueryParser.cpp
+++ b/src/3rdparty/clucene/src/CLucene/queryParser/MultiFieldQueryParser.cpp
@@ -21,51 +21,62 @@ CL_NS_USE(analysis)
CL_NS_DEF(queryParser)
-MultiFieldQueryParser::MultiFieldQueryParser(const TCHAR** fields, CL_NS(analysis)::Analyzer* a, BoostMap* boosts):
- QueryParser(NULL,a)
+MultiFieldQueryParser::MultiFieldQueryParser(const TCHAR** fields,
+ CL_NS(analysis)::Analyzer* analyzer, BoostMap* boosts)
+ : QueryParser(NULL, analyzer)
{
this->fields = fields;
this->boosts = boosts;
}
-MultiFieldQueryParser::~MultiFieldQueryParser(){
+
+MultiFieldQueryParser::~MultiFieldQueryParser()
+{
}
//static
-Query* MultiFieldQueryParser::parse(const TCHAR* query, const TCHAR** fields, Analyzer* analyzer)
+Query* MultiFieldQueryParser::parse(const TCHAR* query, const TCHAR** fields,
+ Analyzer* analyzer)
{
BooleanQuery* bQuery = _CLNEW BooleanQuery();
int32_t i = 0;
- while ( fields[i] != NULL ){
- Query* q = QueryParser::parse(query, fields[i], analyzer);
- bQuery->add(q, true, false, false);
-
+ while (fields[i] != NULL){
+ Query* q = QueryParser::parse(query, fields[i], analyzer);
+ if (q && (q->getQueryName() != _T("BooleanQuery")
+ || ((BooleanQuery*)q)->getClauseCount() > 0)) {
+ bQuery->add(q , true, false, false);
+ } else {
+ _CLDELETE(q);
+ }
i++;
}
return bQuery;
}
//static
-Query* MultiFieldQueryParser::parse(const TCHAR* query, const TCHAR** fields, const uint8_t* flags, Analyzer* analyzer)
+Query* MultiFieldQueryParser::parse(const TCHAR* query, const TCHAR** fields,
+ const uint8_t* flags, Analyzer* analyzer)
{
BooleanQuery* bQuery = _CLNEW BooleanQuery();
int32_t i = 0;
- while ( fields[i] != NULL )
- {
- Query* q = QueryParser::parse(query, fields[i], analyzer);
- uint8_t flag = flags[i];
- switch (flag)
- {
- case MultiFieldQueryParser::REQUIRED_FIELD:
- bQuery->add(q, true, true, false);
- break;
- case MultiFieldQueryParser::PROHIBITED_FIELD:
- bQuery->add(q, true, false, true);
- break;
- default:
- bQuery->add(q, true, false, false);
- break;
+ while ( fields[i] != NULL ) {
+ Query* q = QueryParser::parse(query, fields[i], analyzer);
+ if (q && (q->getQueryName() != _T("BooleanQuery")
+ || ((BooleanQuery*)q)->getClauseCount() > 0)) {
+ uint8_t flag = flags[i];
+ switch (flag) {
+ case MultiFieldQueryParser::REQUIRED_FIELD:
+ bQuery->add(q, true, true, false);
+ break;
+ case MultiFieldQueryParser::PROHIBITED_FIELD:
+ bQuery->add(q, true, false, true);
+ break;
+ default:
+ bQuery->add(q, true, false, false);
+ break;
+ }
+ } else {
+ _CLDELETE(q);
}
-
i++;
}
return bQuery;
diff --git a/src/3rdparty/clucene/src/CLucene/store/FSDirectory.cpp b/src/3rdparty/clucene/src/CLucene/store/FSDirectory.cpp
index e9659cff1b..5f96e91cdf 100644
--- a/src/3rdparty/clucene/src/CLucene/store/FSDirectory.cpp
+++ b/src/3rdparty/clucene/src/CLucene/store/FSDirectory.cpp
@@ -91,7 +91,7 @@ QString FSDirectory::FSLock::toString() const
// # pragma mark -- FSDirectory::FSIndexInput
FSDirectory::FSIndexInput::FSIndexInput(const QString& path, int32_t bufferSize)
- : BufferedIndexInput(bufferSize)
+ : BufferedIndexInput(bufferSize)
{
CND_PRECONDITION(!path.isEmpty(), "path is NULL");
@@ -155,7 +155,7 @@ FSDirectory::FSIndexInput::FSIndexInput(const FSIndexInput& other)
if (other.handle == NULL)
_CLTHROWA(CL_ERR_NullPointer, "other handle is null");
- SCOPED_LOCK_MUTEX(other.handle->THIS_LOCK)
+ SCOPED_LOCK_MUTEX(*other.handle->THIS_LOCK)
_pos = other.handle->_fpos;
handle = _CL_POINTER(other.handle);
@@ -169,7 +169,30 @@ FSDirectory::FSIndexInput::~FSIndexInput()
void FSDirectory::FSIndexInput::close()
{
BufferedIndexInput::close();
+#ifdef _LUCENE_THREADMUTEX
+ if (handle != NULL) {
+ // Here we have a bit of a problem... We need to lock the handle to
+ // ensure that we can safely delete the handle... But if we delete the
+ // handle, then the scoped unlock, won't be able to unlock the mutex...
+
+ // take a reference of the lock object...
+ _LUCENE_THREADMUTEX* mutex = handle->THIS_LOCK;
+ //lock the mutex
+ mutex->lock();
+
+ // determine if we are about to delete the handle...
+ bool doUnlock = (handle->__cl_refcount > 1);
+ // decdelete (deletes if refcount is down to 0)
+ _CLDECDELETE(handle);
+
+ if (doUnlock)
+ mutex->unlock();
+ else
+ delete mutex;
+ }
+#else
_CLDECDELETE(handle);
+#endif
}
IndexInput* FSDirectory::FSIndexInput::clone() const
@@ -186,7 +209,7 @@ void FSDirectory::FSIndexInput::seekInternal(const int64_t position)
void FSDirectory::FSIndexInput::readInternal(uint8_t* b, const int32_t len)
{
- SCOPED_LOCK_MUTEX(handle->THIS_LOCK)
+ SCOPED_LOCK_MUTEX(*handle->THIS_LOCK)
CND_PRECONDITION(handle != NULL, "shared file handle has closed");
CND_PRECONDITION(handle->fhandle.isOpen(), "file is not open");
@@ -214,8 +237,10 @@ void FSDirectory::FSIndexInput::readInternal(uint8_t* b, const int32_t len)
FSDirectory::FSIndexInput::SharedHandle::SharedHandle()
: _fpos(0)
, _length(0)
-
{
+#ifdef _LUCENE_THREADMUTEX
+ THIS_LOCK = new _LUCENE_THREADMUTEX;
+#endif
}
FSDirectory::FSIndexInput::SharedHandle::~SharedHandle()
diff --git a/src/3rdparty/clucene/src/CLucene/store/FSDirectory.h b/src/3rdparty/clucene/src/CLucene/store/FSDirectory.h
index 1302edff9f..e967380e0b 100644
--- a/src/3rdparty/clucene/src/CLucene/store/FSDirectory.h
+++ b/src/3rdparty/clucene/src/CLucene/store/FSDirectory.h
@@ -147,7 +147,7 @@ private:
void close();
IndexInput* clone() const;
-
+
int64_t length()
{ return handle->_length; }
@@ -174,7 +174,7 @@ private:
int64_t _length;
QFile fhandle;
- DEFINE_MUTEX(THIS_LOCK)
+ DEFINE_MUTEX(*THIS_LOCK)
};
SharedHandle* handle;
int64_t _pos;
diff --git a/src/3rdparty/clucene/src/CLucene/util/bufferedstream.h b/src/3rdparty/clucene/src/CLucene/util/bufferedstream.h
index 2455d5e5a1..b73ad98d72 100644
--- a/src/3rdparty/clucene/src/CLucene/util/bufferedstream.h
+++ b/src/3rdparty/clucene/src/CLucene/util/bufferedstream.h
@@ -28,7 +28,9 @@
#include "streambase.h"
#include "inputstreambuffer.h"
+
#include <cassert>
+#include <stdio.h>
namespace jstreams {
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
index 1e717cb2d2..abe15c8838 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
@@ -241,7 +241,7 @@ NEVER_INLINE CollectorBlock* Heap::allocateBlock()
#elif PLATFORM(WINCE)
void* address = VirtualAlloc(NULL, BLOCK_SIZE, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
#elif PLATFORM(WIN_OS)
-#if COMPILER(MINGW)
+#if COMPILER(MINGW) && !PLATFORM(X86_64)
void* address = __mingw_aligned_malloc(BLOCK_SIZE, BLOCK_SIZE);
#else
void* address = _aligned_malloc(BLOCK_SIZE, BLOCK_SIZE);
@@ -327,7 +327,7 @@ NEVER_INLINE void Heap::freeBlock(CollectorBlock* block)
#elif PLATFORM(WINCE)
VirtualFree(block, 0, MEM_RELEASE);
#elif PLATFORM(WIN_OS)
-#if COMPILER(MINGW)
+#if COMPILER(MINGW) && !PLATFORM(X86_64)
__mingw_aligned_free(block);
#else
_aligned_free(block);
@@ -617,7 +617,7 @@ static inline void* currentThreadStackBase()
MOV pTib, EAX
}
return static_cast<void*>(pTib->StackBase);
-#elif PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC)
+#elif PLATFORM(WIN_OS) && PLATFORM(X86_64) && (COMPILER(MSVC) ||COMPILER(GCC))
PNT_TIB64 pTib = reinterpret_cast<PNT_TIB64>(NtCurrentTeb());
return reinterpret_cast<void*>(pTib->StackBase);
#elif PLATFORM(WIN_OS) && PLATFORM(X86) && COMPILER(GCC)
diff --git a/src/3rdparty/libjpeg/README b/src/3rdparty/libjpeg/README
index 86cc20669d..7bc588f038 100644
--- a/src/3rdparty/libjpeg/README
+++ b/src/3rdparty/libjpeg/README
@@ -1,22 +1,17 @@
The Independent JPEG Group's JPEG software
==========================================
-README for release 6b of 27-Mar-1998
-====================================
+README for release 8 of 10-Jan-2010
+===================================
-This distribution contains the sixth public release of the Independent JPEG
+This distribution contains the eighth public release of the Independent JPEG
Group's free JPEG software. You are welcome to redistribute this software and
to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
-Serious users of this software (particularly those incorporating it into
-larger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to
-our electronic mailing list. Mailing list members are notified of updates
-and have a chance to participate in technical discussions, etc.
-
-This software is the work of Tom Lane, Philip Gladstone, Jim Boucher,
-Lee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi,
-Guido Vollbeding, Ge' Weijers, and other members of the Independent JPEG
-Group.
+This software is the work of Tom Lane, Guido Vollbeding, Philip Gladstone,
+Bill Allombert, Jim Boucher, Lee Crocker, Bob Friesenhahn, Ben Jackson,
+Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, Ge' Weijers,
+and other members of the Independent JPEG Group.
IJG is not affiliated with the official ISO JPEG standards committee.
@@ -30,27 +25,27 @@ OVERVIEW General description of JPEG and the IJG software.
LEGAL ISSUES Copyright, lack of warranty, terms of distribution.
REFERENCES Where to learn more about JPEG.
ARCHIVE LOCATIONS Where to find newer versions of this software.
-RELATED SOFTWARE Other stuff you should get.
+ACKNOWLEDGMENTS Special thanks.
FILE FORMAT WARS Software *not* to get.
TO DO Plans for future IJG releases.
Other documentation files in the distribution are:
User documentation:
- install.doc How to configure and install the IJG software.
- usage.doc Usage instructions for cjpeg, djpeg, jpegtran,
+ install.txt How to configure and install the IJG software.
+ usage.txt Usage instructions for cjpeg, djpeg, jpegtran,
rdjpgcom, and wrjpgcom.
- *.1 Unix-style man pages for programs (same info as usage.doc).
- wizard.doc Advanced usage instructions for JPEG wizards only.
+ *.1 Unix-style man pages for programs (same info as usage.txt).
+ wizard.txt Advanced usage instructions for JPEG wizards only.
change.log Version-to-version change highlights.
Programmer and internal documentation:
- libjpeg.doc How to use the JPEG library in your own programs.
+ libjpeg.txt How to use the JPEG library in your own programs.
example.c Sample code for calling the JPEG library.
- structure.doc Overview of the JPEG library's internal structure.
- filelist.doc Road map of IJG files.
- coderules.doc Coding style rules --- please read if you contribute code.
+ structure.txt Overview of the JPEG library's internal structure.
+ filelist.txt Road map of IJG files.
+ coderules.txt Coding style rules --- please read if you contribute code.
-Please read at least the files install.doc and usage.doc. Useful information
+Please read at least the files install.txt and usage.txt. Some information
can also be found in the JPEG FAQ (Frequently Asked Questions) article. See
ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
@@ -62,24 +57,15 @@ the order listed) before diving into the code.
OVERVIEW
========
-This package contains C software to implement JPEG image compression and
-decompression. JPEG (pronounced "jay-peg") is a standardized compression
-method for full-color and gray-scale images. JPEG is intended for compressing
-"real-world" scenes; line drawings, cartoons and other non-realistic images
-are not its strong suit. JPEG is lossy, meaning that the output image is not
-exactly identical to the input image. Hence you must not use JPEG if you
-have to have identical output bits. However, on typical photographic images,
-very good compression levels can be obtained with no visible change, and
-remarkably high compression levels are possible if you can tolerate a
-low-quality image. For more details, see the references, or just experiment
-with various compression settings.
+This package contains C software to implement JPEG image encoding, decoding,
+and transcoding. JPEG (pronounced "jay-peg") is a standardized compression
+method for full-color and gray-scale images.
This software implements JPEG baseline, extended-sequential, and progressive
compression processes. Provision is made for supporting all variants of these
processes, although some uncommon parameter settings aren't implemented yet.
-For legal reasons, we are not distributing code for the arithmetic-coding
-variants of JPEG; see LEGAL ISSUES. We have made no provision for supporting
-the hierarchical or lossless processes defined in the standard.
+We have made no provision for supporting the hierarchical or lossless
+processes defined in the standard.
We provide a set of library routines for reading and writing JPEG image files,
plus two sample applications "cjpeg" and "djpeg", which use the library to
@@ -91,10 +77,11 @@ considerable functionality beyond the bare JPEG coding/decoding capability;
for example, the color quantization modules are not strictly part of JPEG
decoding, but they are essential for output to colormapped file formats or
colormapped displays. These extra functions can be compiled out of the
-library if not required for a particular application. We have also included
-"jpegtran", a utility for lossless transcoding between different JPEG
-processes, and "rdjpgcom" and "wrjpgcom", two simple applications for
-inserting and extracting textual comments in JFIF files.
+library if not required for a particular application.
+
+We have also included "jpegtran", a utility for lossless transcoding between
+different JPEG processes, and "rdjpgcom" and "wrjpgcom", two simple
+applications for inserting and extracting textual comments in JFIF files.
The emphasis in designing this software has been on achieving portability and
flexibility, while also making it fast enough to be useful. In particular,
@@ -127,7 +114,7 @@ with respect to this software, its quality, accuracy, merchantability, or
fitness for a particular purpose. This software is provided "AS IS", and you,
its user, assume the entire risk as to its quality and accuracy.
-This software is copyright (C) 1991-1998, Thomas G. Lane.
+This software is copyright (C) 1991-2010, Thomas G. Lane, Guido Vollbeding.
All Rights Reserved except as specified below.
Permission is hereby granted to use, copy, modify, and distribute this
@@ -170,17 +157,8 @@ the foregoing paragraphs do.
The Unix configuration script "configure" was produced with GNU Autoconf.
It is copyright by the Free Software Foundation but is freely distributable.
The same holds for its supporting scripts (config.guess, config.sub,
-ltconfig, ltmain.sh). Another support script, install-sh, is copyright
-by M.I.T. but is also freely distributable.
-
-It appears that the arithmetic coding option of the JPEG spec is covered by
-patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot
-legally be used without obtaining one or more licenses. For this reason,
-support for arithmetic coding has been removed from the free JPEG software.
-(Since arithmetic coding provides only a marginal gain over the unpatented
-Huffman mode, it is unlikely that very many implementations will support it.)
-So far as we are aware, there are no patent restrictions on the remaining
-code.
+ltmain.sh). Another support script, install-sh, is copyright by X Consortium
+but is also freely distributable.
The IJG distribution formerly included code to read and write GIF files.
To avoid entanglement with the Unisys LZW patent, GIF reading support has
@@ -198,7 +176,7 @@ We are required to state that
REFERENCES
==========
-We highly recommend reading one or more of these references before trying to
+We recommend reading one or more of these references before trying to
understand the innards of the JPEG software.
The best short technical introduction to the JPEG compression algorithm is
@@ -207,7 +185,7 @@ The best short technical introduction to the JPEG compression algorithm is
(Adjacent articles in that issue discuss MPEG motion picture compression,
applications of JPEG, and related topics.) If you don't have the CACM issue
handy, a PostScript file containing a revised version of Wallace's article is
-available at ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz. The file (actually
+available at http://www.ijg.org/files/wallace.ps.gz. The file (actually
a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
omits the sample images that appeared in CACM, but it includes corrections
and some added material. Note: the Wallace article is copyright ACM and IEEE,
@@ -222,82 +200,65 @@ code but don't know much about data compression in general. The book's JPEG
sample code is far from industrial-strength, but when you are ready to look
at a full implementation, you've got one here...
-The best full description of JPEG is the textbook "JPEG Still Image Data
-Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published
-by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. Price US$59.95, 638 pp.
-The book includes the complete text of the ISO JPEG standards (DIS 10918-1
-and draft DIS 10918-2). This is by far the most complete exposition of JPEG
-in existence, and we highly recommend it.
-
-The JPEG standard itself is not available electronically; you must order a
-paper copy through ISO or ITU. (Unless you feel a need to own a certified
-official copy, we recommend buying the Pennebaker and Mitchell book instead;
-it's much cheaper and includes a great deal of useful explanatory material.)
-In the USA, copies of the standard may be ordered from ANSI Sales at (212)
-642-4900, or from Global Engineering Documents at (800) 854-7179. (ANSI
-doesn't take credit card orders, but Global does.) It's not cheap: as of
-1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7%
-shipping/handling. The standard is divided into two parts, Part 1 being the
-actual specification, while Part 2 covers compliance testing methods. Part 1
-is titled "Digital Compression and Coding of Continuous-tone Still Images,
+The best currently available description of JPEG is the textbook "JPEG Still
+Image Data Compression Standard" by William B. Pennebaker and Joan L.
+Mitchell, published by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1.
+Price US$59.95, 638 pp. The book includes the complete text of the ISO JPEG
+standards (DIS 10918-1 and draft DIS 10918-2).
+Although this is by far the most detailed and comprehensive exposition of
+JPEG publicly available, we point out that it is still missing an explanation
+of the most essential properties and algorithms of the underlying DCT
+technology.
+If you think that you know about DCT-based JPEG after reading this book,
+then you are in delusion. The real fundamentals and corresponding potential
+of DCT-based JPEG are not publicly known so far, and that is the reason for
+all the mistaken developments taking place in the image coding domain.
+
+The original JPEG standard is divided into two parts, Part 1 being the actual
+specification, while Part 2 covers compliance testing methods. Part 1 is
+titled "Digital Compression and Coding of Continuous-tone Still Images,
Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS
10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of
Continuous-tone Still Images, Part 2: Compliance testing" and has document
numbers ISO/IEC IS 10918-2, ITU-T T.83.
-
-Some extensions to the original JPEG standard are defined in JPEG Part 3,
-a newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84. IJG
-currently does not support any Part 3 extensions.
+IJG JPEG 8 introduces an implementation of the JPEG SmartScale extension
+which is specified in a contributed document at ITU and ISO with title "ITU-T
+JPEG-Plus Proposal for Extending ITU-T T.81 for Advanced Image Coding", April
+2006, Geneva, Switzerland. The latest version of the document is Revision 3.
The JPEG standard does not specify all details of an interchangeable file
format. For the omitted details we follow the "JFIF" conventions, revision
-1.02. A copy of the JFIF spec is available from:
- Literature Department
- C-Cube Microsystems, Inc.
- 1778 McCarthy Blvd.
- Milpitas, CA 95035
- phone (408) 944-6300, fax (408) 944-6314
-A PostScript version of this document is available by FTP at
-ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz. There is also a plain text
-version at ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz, but it is missing
-the figures.
+1.02. JFIF 1.02 has been adopted as an Ecma International Technical Report
+and thus received a formal publication status. It is available as a free
+download in PDF format from
+http://www.ecma-international.org/publications/techreports/E-TR-098.htm.
+A PostScript version of the JFIF document is available at
+http://www.ijg.org/files/jfif.ps.gz. There is also a plain text version at
+http://www.ijg.org/files/jfif.txt.gz, but it is missing the figures.
The TIFF 6.0 file format specification can be obtained by FTP from
ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme
found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
Instead, we recommend the JPEG design proposed by TIFF Technical Note #2
-(Compression tag 7). Copies of this Note can be obtained from ftp.sgi.com or
-from ftp://ftp.uu.net/graphics/jpeg/. It is expected that the next revision
+(Compression tag 7). Copies of this Note can be obtained from
+http://www.ijg.org/files/. It is expected that the next revision
of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
Although IJG's own code does not support TIFF/JPEG, the free libtiff library
-uses our library to implement TIFF/JPEG per the Note. libtiff is available
-from ftp://ftp.sgi.com/graphics/tiff/.
+uses our library to implement TIFF/JPEG per the Note.
ARCHIVE LOCATIONS
=================
-The "official" archive site for this software is ftp.uu.net (Internet
-address 192.48.96.9). The most recent released version can always be found
-there in directory graphics/jpeg. This particular version will be archived
-as ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz. If you don't have
-direct Internet access, UUNET's archives are also available via UUCP; contact
-help@uunet.uu.net for information on retrieving files that way.
-
-Numerous Internet sites maintain copies of the UUNET files. However, only
-ftp.uu.net is guaranteed to have the latest official version.
-
-You can also obtain this software in DOS-compatible "zip" archive format from
-the SimTel archives (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or
-on CompuServe in the Graphics Support forum (GO CIS:GRAPHSUP), library 12
-"JPEG Tools". Again, these versions may sometimes lag behind the ftp.uu.net
-release.
-
-The JPEG FAQ (Frequently Asked Questions) article is a useful source of
-general information about JPEG. It is updated constantly and therefore is
-not included in this distribution. The FAQ is posted every two weeks to
-Usenet newsgroups comp.graphics.misc, news.answers, and other groups.
+The "official" archive site for this software is www.ijg.org.
+The most recent released version can always be found there in
+directory "files". This particular version will be archived as
+http://www.ijg.org/files/jpegsrc.v8.tar.gz, and in Windows-compatible
+"zip" archive format as http://www.ijg.org/files/jpegsr8.zip.
+
+The JPEG FAQ (Frequently Asked Questions) article is a source of some
+general information about JPEG.
It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
and other news.answers archive sites, including the official news.answers
archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/.
@@ -307,79 +268,58 @@ with body
send usenet/news.answers/jpeg-faq/part2
-RELATED SOFTWARE
-================
+ACKNOWLEDGMENTS
+===============
+
+Thank to Juergen Bruder for providing me with a copy of the common DCT
+algorithm article, only to find out that I had come to the same result
+in a more direct and comprehensible way with a more generative approach.
+
+Thank to Istvan Sebestyen and Joan L. Mitchell for inviting me to the
+ITU JPEG (Study Group 16) meeting in Geneva, Switzerland.
-Numerous viewing and image manipulation programs now support JPEG. (Quite a
-few of them use this library to do so.) The JPEG FAQ described above lists
-some of the more popular free and shareware viewers, and tells where to
-obtain them on Internet.
+Thank to Thomas Wiegand and Gary Sullivan for inviting me to the
+Joint Video Team (MPEG & ITU) meeting in Geneva, Switzerland.
-If you are on a Unix machine, we highly recommend Jef Poskanzer's free
-PBMPLUS software, which provides many useful operations on PPM-format image
-files. In particular, it can convert PPM images to and from a wide range of
-other formats, thus making cjpeg/djpeg considerably more useful. The latest
-version is distributed by the NetPBM group, and is available from numerous
-sites, notably ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/.
-Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software is;
-you are likely to have difficulty making it work on any non-Unix machine.
+Thank to John Korejwa and Massimo Ballerini for inviting me to
+fruitful consultations in Boston, MA and Milan, Italy.
-A different free JPEG implementation, written by the PVRG group at Stanford,
-is available from ftp://havefun.stanford.edu/pub/jpeg/. This program
-is designed for research and experimentation rather than production use;
-it is slower, harder to use, and less portable than the IJG code, but it
-is easier to read and modify. Also, the PVRG code supports lossless JPEG,
-which we do not. (On the other hand, it doesn't do progressive JPEG.)
+Thank to Hendrik Elstner, Roland Fassauer, Simone Zuck, Guenther
+Maier-Gerber, and Walter Stoeber for corresponding business development.
+
+Thank to Nico Zschach and Dirk Stelling of the technical support team
+at the Digital Images company in Halle for providing me with extra
+equipment for configuration tests.
+
+Thank to Richard F. Lyon (then of Foveon Inc.) for fruitful
+communication about JPEG configuration in Sigma Photo Pro software.
+
+Thank to Andrew Finkenstadt for hosting the ijg.org site.
+
+Last but not least special thank to Thomas G. Lane for the original
+design and development of this singular software package.
FILE FORMAT WARS
================
-Some JPEG programs produce files that are not compatible with our library.
-The root of the problem is that the ISO JPEG committee failed to specify a
-concrete file format. Some vendors "filled in the blanks" on their own,
-creating proprietary formats that no one else could read. (For example, none
-of the early commercial JPEG implementations for the Macintosh were able to
-exchange compressed files.)
-
-The file format we have adopted is called JFIF (see REFERENCES). This format
-has been agreed to by a number of major commercial JPEG vendors, and it has
-become the de facto standard. JFIF is a minimal or "low end" representation.
-We recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF
-Technical Note #2) for "high end" applications that need to record a lot of
-additional data about an image. TIFF/JPEG is fairly new and not yet widely
-supported, unfortunately.
-
-The upcoming JPEG Part 3 standard defines a file format called SPIFF.
-SPIFF is interoperable with JFIF, in the sense that most JFIF decoders should
-be able to read the most common variant of SPIFF. SPIFF has some technical
-advantages over JFIF, but its major claim to fame is simply that it is an
-official standard rather than an informal one. At this point it is unclear
-whether SPIFF will supersede JFIF or whether JFIF will remain the de-facto
-standard. IJG intends to support SPIFF once the standard is frozen, but we
-have not decided whether it should become our default output format or not.
-(In any case, our decoder will remain capable of reading JFIF indefinitely.)
-
-Various proprietary file formats incorporating JPEG compression also exist.
-We have little or no sympathy for the existence of these formats. Indeed,
+The ISO JPEG standards committee actually promotes different formats like
+"JPEG 2000" or "JPEG XR" which are incompatible with original DCT-based
+JPEG and which are based on faulty technologies. IJG therefore does not
+and will not support such momentary mistakes (see REFERENCES).
+We have little or no sympathy for the promotion of these formats. Indeed,
one of the original reasons for developing this free software was to help
-force convergence on common, open format standards for JPEG files. Don't
-use a proprietary file format!
+force convergence on common, interoperable format standards for JPEG files.
+Don't use an incompatible file format!
+(In any case, our decoder will remain capable of reading existing JPEG
+image files indefinitely.)
TO DO
=====
-The major thrust for v7 will probably be improvement of visual quality.
-The current method for scaling the quantization tables is known not to be
-very good at low Q values. We also intend to investigate block boundary
-smoothing, "poor man's variable quantization", and other means of improving
-quality-vs-file-size performance without sacrificing compatibility.
-
-In future versions, we are considering supporting some of the upcoming JPEG
-Part 3 extensions --- principally, variable quantization and the SPIFF file
-format.
-
-As always, speeding things up is of great interest.
+Version 8.0 is the first release of a new generation JPEG standard
+to overcome the limitations of the original JPEG specification.
+More features are being prepared for coming releases...
-Please send bug reports, offers of help, etc. to jpeg-info@uunet.uu.net.
+Please send bug reports, offers of help, etc. to jpeg-info@uc.ag.
diff --git a/src/3rdparty/libjpeg/ansi2knr.1 b/src/3rdparty/libjpeg/ansi2knr.1
new file mode 100644
index 0000000000..f9ee5a631c
--- /dev/null
+++ b/src/3rdparty/libjpeg/ansi2knr.1
@@ -0,0 +1,36 @@
+.TH ANSI2KNR 1 "19 Jan 1996"
+.SH NAME
+ansi2knr \- convert ANSI C to Kernighan & Ritchie C
+.SH SYNOPSIS
+.I ansi2knr
+[--varargs] input_file [output_file]
+.SH DESCRIPTION
+If no output_file is supplied, output goes to stdout.
+.br
+There are no error messages.
+.sp
+.I ansi2knr
+recognizes function definitions by seeing a non-keyword identifier at the left
+margin, followed by a left parenthesis, with a right parenthesis as the last
+character on the line, and with a left brace as the first token on the
+following line (ignoring possible intervening comments). It will recognize a
+multi-line header provided that no intervening line ends with a left or right
+brace or a semicolon. These algorithms ignore whitespace and comments, except
+that the function name must be the first thing on the line.
+.sp
+The following constructs will confuse it:
+.br
+ - Any other construct that starts at the left margin and follows the
+above syntax (such as a macro or function call).
+.br
+ - Some macros that tinker with the syntax of the function header.
+.sp
+The --varargs switch is obsolete, and is recognized only for
+backwards compatibility. The present version of
+.I ansi2knr
+will always attempt to convert a ... argument to va_alist and va_dcl.
+.SH AUTHOR
+L. Peter Deutsch <ghost@aladdin.com> wrote the original ansi2knr and
+continues to maintain the current version; most of the code in the current
+version is his work. ansi2knr also includes contributions by Francois
+Pinard <pinard@iro.umontreal.ca> and Jim Avera <jima@netcom.com>.
diff --git a/src/3rdparty/libjpeg/ansi2knr.c b/src/3rdparty/libjpeg/ansi2knr.c
new file mode 100644
index 0000000000..e84c210b66
--- /dev/null
+++ b/src/3rdparty/libjpeg/ansi2knr.c
@@ -0,0 +1,739 @@
+/* Copyright (C) 1989, 2000 Aladdin Enterprises. All rights reserved. */
+
+/*$Id: ansi2knr.c,v 1.14 2003/09/06 05:36:56 eggert Exp $*/
+/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
+
+/*
+ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY. No author or distributor accepts responsibility to anyone for the
+consequences of using it or for whether it serves any particular purpose or
+works at all, unless he says so in writing. Refer to the GNU General Public
+License (the "GPL") for full details.
+
+Everyone is granted permission to copy, modify and redistribute ansi2knr,
+but only under the conditions described in the GPL. A copy of this license
+is supposed to have been given to you along with ansi2knr so you can know
+your rights and responsibilities. It should be in a file named COPYLEFT,
+or, if there is no file named COPYLEFT, a file named COPYING. Among other
+things, the copyright notice and this notice must be preserved on all
+copies.
+
+We explicitly state here what we believe is already implied by the GPL: if
+the ansi2knr program is distributed as a separate set of sources and a
+separate executable file which are aggregated on a storage medium together
+with another program, this in itself does not bring the other program under
+the GPL, nor does the mere fact that such a program or the procedures for
+constructing it invoke the ansi2knr executable bring any other part of the
+program under the GPL.
+*/
+
+/*
+ * Usage:
+ ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]
+ * --filename provides the file name for the #line directive in the output,
+ * overriding input_file (if present).
+ * If no input_file is supplied, input is read from stdin.
+ * If no output_file is supplied, output goes to stdout.
+ * There are no error messages.
+ *
+ * ansi2knr recognizes function definitions by seeing a non-keyword
+ * identifier at the left margin, followed by a left parenthesis, with a
+ * right parenthesis as the last character on the line, and with a left
+ * brace as the first token on the following line (ignoring possible
+ * intervening comments and/or preprocessor directives), except that a line
+ * consisting of only
+ * identifier1(identifier2)
+ * will not be considered a function definition unless identifier2 is
+ * the word "void", and a line consisting of
+ * identifier1(identifier2, <<arbitrary>>)
+ * will not be considered a function definition.
+ * ansi2knr will recognize a multi-line header provided that no intervening
+ * line ends with a left or right brace or a semicolon. These algorithms
+ * ignore whitespace, comments, and preprocessor directives, except that
+ * the function name must be the first thing on the line. The following
+ * constructs will confuse it:
+ * - Any other construct that starts at the left margin and
+ * follows the above syntax (such as a macro or function call).
+ * - Some macros that tinker with the syntax of function headers.
+ */
+
+/*
+ * The original and principal author of ansi2knr is L. Peter Deutsch
+ * <ghost@aladdin.com>. Other authors are noted in the change history
+ * that follows (in reverse chronological order):
+
+ lpd 2000-04-12 backs out Eggert's changes because of bugs:
+ - concatlits didn't declare the type of its bufend argument;
+ - concatlits didn't recognize when it was inside a comment;
+ - scanstring could scan backward past the beginning of the string; when
+ - the check for \ + newline in scanstring was unnecessary.
+
+ 2000-03-05 Paul Eggert <eggert@twinsun.com>
+
+ Add support for concatenated string literals.
+ * ansi2knr.c (concatlits): New decl.
+ (main): Invoke concatlits to concatenate string literals.
+ (scanstring): Handle backslash-newline correctly. Work with
+ character constants. Fix bug when scanning backwards through
+ backslash-quote. Check for unterminated strings.
+ (convert1): Parse character constants, too.
+ (appendline, concatlits): New functions.
+ * ansi2knr.1: Document this.
+
+ lpd 1999-08-17 added code to allow preprocessor directives
+ wherever comments are allowed
+ lpd 1999-04-12 added minor fixes from Pavel Roskin
+ <pavel_roskin@geocities.com> for clean compilation with
+ gcc -W -Wall
+ lpd 1999-03-22 added hack to recognize lines consisting of
+ identifier1(identifier2, xxx) as *not* being procedures
+ lpd 1999-02-03 made indentation of preprocessor commands consistent
+ lpd 1999-01-28 fixed two bugs: a '/' in an argument list caused an
+ endless loop; quoted strings within an argument list
+ confused the parser
+ lpd 1999-01-24 added a check for write errors on the output,
+ suggested by Jim Meyering <meyering@ascend.com>
+ lpd 1998-11-09 added further hack to recognize identifier(void)
+ as being a procedure
+ lpd 1998-10-23 added hack to recognize lines consisting of
+ identifier1(identifier2) as *not* being procedures
+ lpd 1997-12-08 made input_file optional; only closes input and/or
+ output file if not stdin or stdout respectively; prints
+ usage message on stderr rather than stdout; adds
+ --filename switch (changes suggested by
+ <ceder@lysator.liu.se>)
+ lpd 1996-01-21 added code to cope with not HAVE_CONFIG_H and with
+ compilers that don't understand void, as suggested by
+ Tom Lane
+ lpd 1996-01-15 changed to require that the first non-comment token
+ on the line following a function header be a left brace,
+ to reduce sensitivity to macros, as suggested by Tom Lane
+ <tgl@sss.pgh.pa.us>
+ lpd 1995-06-22 removed #ifndefs whose sole purpose was to define
+ undefined preprocessor symbols as 0; changed all #ifdefs
+ for configuration symbols to #ifs
+ lpd 1995-04-05 changed copyright notice to make it clear that
+ including ansi2knr in a program does not bring the entire
+ program under the GPL
+ lpd 1994-12-18 added conditionals for systems where ctype macros
+ don't handle 8-bit characters properly, suggested by
+ Francois Pinard <pinard@iro.umontreal.ca>;
+ removed --varargs switch (this is now the default)
+ lpd 1994-10-10 removed CONFIG_BROKETS conditional
+ lpd 1994-07-16 added some conditionals to help GNU `configure',
+ suggested by Francois Pinard <pinard@iro.umontreal.ca>;
+ properly erase prototype args in function parameters,
+ contributed by Jim Avera <jima@netcom.com>;
+ correct error in writeblanks (it shouldn't erase EOLs)
+ lpd 1989-xx-xx original version
+ */
+
+/* Most of the conditionals here are to make ansi2knr work with */
+/* or without the GNU configure machinery. */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <ctype.h>
+
+#if HAVE_CONFIG_H
+
+/*
+ For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h).
+ This will define HAVE_CONFIG_H and so, activate the following lines.
+ */
+
+# if STDC_HEADERS || HAVE_STRING_H
+# include <string.h>
+# else
+# include <strings.h>
+# endif
+
+#else /* not HAVE_CONFIG_H */
+
+/* Otherwise do it the hard way */
+
+# ifdef BSD
+# include <strings.h>
+# else
+# ifdef VMS
+ extern int strlen(), strncmp();
+# else
+# include <string.h>
+# endif
+# endif
+
+#endif /* not HAVE_CONFIG_H */
+
+#if STDC_HEADERS
+# include <stdlib.h>
+#else
+/*
+ malloc and free should be declared in stdlib.h,
+ but if you've got a K&R compiler, they probably aren't.
+ */
+# ifdef MSDOS
+# include <malloc.h>
+# else
+# ifdef VMS
+ extern char *malloc();
+ extern void free();
+# else
+ extern char *malloc();
+ extern int free();
+# endif
+# endif
+
+#endif
+
+/* Define NULL (for *very* old compilers). */
+#ifndef NULL
+# define NULL (0)
+#endif
+
+/*
+ * The ctype macros don't always handle 8-bit characters correctly.
+ * Compensate for this here.
+ */
+#ifdef isascii
+# undef HAVE_ISASCII /* just in case */
+# define HAVE_ISASCII 1
+#else
+#endif
+#if STDC_HEADERS || !HAVE_ISASCII
+# define is_ascii(c) 1
+#else
+# define is_ascii(c) isascii(c)
+#endif
+
+#define is_space(c) (is_ascii(c) && isspace(c))
+#define is_alpha(c) (is_ascii(c) && isalpha(c))
+#define is_alnum(c) (is_ascii(c) && isalnum(c))
+
+/* Scanning macros */
+#define isidchar(ch) (is_alnum(ch) || (ch) == '_')
+#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
+
+/* Forward references */
+char *ppdirforward();
+char *ppdirbackward();
+char *skipspace();
+char *scanstring();
+int writeblanks();
+int test1();
+int convert1();
+
+/* The main program */
+int
+main(argc, argv)
+ int argc;
+ char *argv[];
+{ FILE *in = stdin;
+ FILE *out = stdout;
+ char *filename = 0;
+ char *program_name = argv[0];
+ char *output_name = 0;
+#define bufsize 5000 /* arbitrary size */
+ char *buf;
+ char *line;
+ char *more;
+ char *usage =
+ "Usage: ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]\n";
+ /*
+ * In previous versions, ansi2knr recognized a --varargs switch.
+ * If this switch was supplied, ansi2knr would attempt to convert
+ * a ... argument to va_alist and va_dcl; if this switch was not
+ * supplied, ansi2knr would simply drop any such arguments.
+ * Now, ansi2knr always does this conversion, and we only
+ * check for this switch for backward compatibility.
+ */
+ int convert_varargs = 1;
+ int output_error;
+
+ while ( argc > 1 && argv[1][0] == '-' ) {
+ if ( !strcmp(argv[1], "--varargs") ) {
+ convert_varargs = 1;
+ argc--;
+ argv++;
+ continue;
+ }
+ if ( !strcmp(argv[1], "--filename") && argc > 2 ) {
+ filename = argv[2];
+ argc -= 2;
+ argv += 2;
+ continue;
+ }
+ fprintf(stderr, "%s: Unrecognized switch: %s\n", program_name,
+ argv[1]);
+ fprintf(stderr, usage);
+ exit(1);
+ }
+ switch ( argc )
+ {
+ default:
+ fprintf(stderr, usage);
+ exit(0);
+ case 3:
+ output_name = argv[2];
+ out = fopen(output_name, "w");
+ if ( out == NULL ) {
+ fprintf(stderr, "%s: Cannot open output file %s\n",
+ program_name, output_name);
+ exit(1);
+ }
+ /* falls through */
+ case 2:
+ in = fopen(argv[1], "r");
+ if ( in == NULL ) {
+ fprintf(stderr, "%s: Cannot open input file %s\n",
+ program_name, argv[1]);
+ exit(1);
+ }
+ if ( filename == 0 )
+ filename = argv[1];
+ /* falls through */
+ case 1:
+ break;
+ }
+ if ( filename )
+ fprintf(out, "#line 1 \"%s\"\n", filename);
+ buf = malloc(bufsize);
+ if ( buf == NULL )
+ {
+ fprintf(stderr, "Unable to allocate read buffer!\n");
+ exit(1);
+ }
+ line = buf;
+ while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
+ {
+test: line += strlen(line);
+ switch ( test1(buf) )
+ {
+ case 2: /* a function header */
+ convert1(buf, out, 1, convert_varargs);
+ break;
+ case 1: /* a function */
+ /* Check for a { at the start of the next line. */
+ more = ++line;
+f: if ( line >= buf + (bufsize - 1) ) /* overflow check */
+ goto wl;
+ if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
+ goto wl;
+ switch ( *skipspace(ppdirforward(more), 1) )
+ {
+ case '{':
+ /* Definitely a function header. */
+ convert1(buf, out, 0, convert_varargs);
+ fputs(more, out);
+ break;
+ case 0:
+ /* The next line was blank or a comment: */
+ /* keep scanning for a non-comment. */
+ line += strlen(line);
+ goto f;
+ default:
+ /* buf isn't a function header, but */
+ /* more might be. */
+ fputs(buf, out);
+ strcpy(buf, more);
+ line = buf;
+ goto test;
+ }
+ break;
+ case -1: /* maybe the start of a function */
+ if ( line != buf + (bufsize - 1) ) /* overflow check */
+ continue;
+ /* falls through */
+ default: /* not a function */
+wl: fputs(buf, out);
+ break;
+ }
+ line = buf;
+ }
+ if ( line != buf )
+ fputs(buf, out);
+ free(buf);
+ if ( output_name ) {
+ output_error = ferror(out);
+ output_error |= fclose(out);
+ } else { /* out == stdout */
+ fflush(out);
+ output_error = ferror(out);
+ }
+ if ( output_error ) {
+ fprintf(stderr, "%s: error writing to %s\n", program_name,
+ (output_name ? output_name : "stdout"));
+ exit(1);
+ }
+ if ( in != stdin )
+ fclose(in);
+ return 0;
+}
+
+/*
+ * Skip forward or backward over one or more preprocessor directives.
+ */
+char *
+ppdirforward(p)
+ char *p;
+{
+ for (; *p == '#'; ++p) {
+ for (; *p != '\r' && *p != '\n'; ++p)
+ if (*p == 0)
+ return p;
+ if (*p == '\r' && p[1] == '\n')
+ ++p;
+ }
+ return p;
+}
+char *
+ppdirbackward(p, limit)
+ char *p;
+ char *limit;
+{
+ char *np = p;
+
+ for (;; p = --np) {
+ if (*np == '\n' && np[-1] == '\r')
+ --np;
+ for (; np > limit && np[-1] != '\r' && np[-1] != '\n'; --np)
+ if (np[-1] == 0)
+ return np;
+ if (*np != '#')
+ return p;
+ }
+}
+
+/*
+ * Skip over whitespace, comments, and preprocessor directives,
+ * in either direction.
+ */
+char *
+skipspace(p, dir)
+ char *p;
+ int dir; /* 1 for forward, -1 for backward */
+{
+ for ( ; ; ) {
+ while ( is_space(*p) )
+ p += dir;
+ if ( !(*p == '/' && p[dir] == '*') )
+ break;
+ p += dir; p += dir;
+ while ( !(*p == '*' && p[dir] == '/') ) {
+ if ( *p == 0 )
+ return p; /* multi-line comment?? */
+ p += dir;
+ }
+ p += dir; p += dir;
+ }
+ return p;
+}
+
+/* Scan over a quoted string, in either direction. */
+char *
+scanstring(p, dir)
+ char *p;
+ int dir;
+{
+ for (p += dir; ; p += dir)
+ if (*p == '"' && p[-dir] != '\\')
+ return p + dir;
+}
+
+/*
+ * Write blanks over part of a string.
+ * Don't overwrite end-of-line characters.
+ */
+int
+writeblanks(start, end)
+ char *start;
+ char *end;
+{ char *p;
+ for ( p = start; p < end; p++ )
+ if ( *p != '\r' && *p != '\n' )
+ *p = ' ';
+ return 0;
+}
+
+/*
+ * Test whether the string in buf is a function definition.
+ * The string may contain and/or end with a newline.
+ * Return as follows:
+ * 0 - definitely not a function definition;
+ * 1 - definitely a function definition;
+ * 2 - definitely a function prototype (NOT USED);
+ * -1 - may be the beginning of a function definition,
+ * append another line and look again.
+ * The reason we don't attempt to convert function prototypes is that
+ * Ghostscript's declaration-generating macros look too much like
+ * prototypes, and confuse the algorithms.
+ */
+int
+test1(buf)
+ char *buf;
+{ char *p = buf;
+ char *bend;
+ char *endfn;
+ int contin;
+
+ if ( !isidfirstchar(*p) )
+ return 0; /* no name at left margin */
+ bend = skipspace(ppdirbackward(buf + strlen(buf) - 1, buf), -1);
+ switch ( *bend )
+ {
+ case ';': contin = 0 /*2*/; break;
+ case ')': contin = 1; break;
+ case '{': return 0; /* not a function */
+ case '}': return 0; /* not a function */
+ default: contin = -1;
+ }
+ while ( isidchar(*p) )
+ p++;
+ endfn = p;
+ p = skipspace(p, 1);
+ if ( *p++ != '(' )
+ return 0; /* not a function */
+ p = skipspace(p, 1);
+ if ( *p == ')' )
+ return 0; /* no parameters */
+ /* Check that the apparent function name isn't a keyword. */
+ /* We only need to check for keywords that could be followed */
+ /* by a left parenthesis (which, unfortunately, is most of them). */
+ { static char *words[] =
+ { "asm", "auto", "case", "char", "const", "double",
+ "extern", "float", "for", "if", "int", "long",
+ "register", "return", "short", "signed", "sizeof",
+ "static", "switch", "typedef", "unsigned",
+ "void", "volatile", "while", 0
+ };
+ char **key = words;
+ char *kp;
+ unsigned len = endfn - buf;
+
+ while ( (kp = *key) != 0 )
+ { if ( strlen(kp) == len && !strncmp(kp, buf, len) )
+ return 0; /* name is a keyword */
+ key++;
+ }
+ }
+ {
+ char *id = p;
+ int len;
+ /*
+ * Check for identifier1(identifier2) and not
+ * identifier1(void), or identifier1(identifier2, xxxx).
+ */
+
+ while ( isidchar(*p) )
+ p++;
+ len = p - id;
+ p = skipspace(p, 1);
+ if (*p == ',' ||
+ (*p == ')' && (len != 4 || strncmp(id, "void", 4)))
+ )
+ return 0; /* not a function */
+ }
+ /*
+ * If the last significant character was a ), we need to count
+ * parentheses, because it might be part of a formal parameter
+ * that is a procedure.
+ */
+ if (contin > 0) {
+ int level = 0;
+
+ for (p = skipspace(buf, 1); *p; p = skipspace(p + 1, 1))
+ level += (*p == '(' ? 1 : *p == ')' ? -1 : 0);
+ if (level > 0)
+ contin = -1;
+ }
+ return contin;
+}
+
+/* Convert a recognized function definition or header to K&R syntax. */
+int
+convert1(buf, out, header, convert_varargs)
+ char *buf;
+ FILE *out;
+ int header; /* Boolean */
+ int convert_varargs; /* Boolean */
+{ char *endfn;
+ char *p;
+ /*
+ * The breaks table contains pointers to the beginning and end
+ * of each argument.
+ */
+ char **breaks;
+ unsigned num_breaks = 2; /* for testing */
+ char **btop;
+ char **bp;
+ char **ap;
+ char *vararg = 0;
+
+ /* Pre-ANSI implementations don't agree on whether strchr */
+ /* is called strchr or index, so we open-code it here. */
+ for ( endfn = buf; *(endfn++) != '('; )
+ ;
+top: p = endfn;
+ breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
+ if ( breaks == NULL )
+ { /* Couldn't allocate break table, give up */
+ fprintf(stderr, "Unable to allocate break table!\n");
+ fputs(buf, out);
+ return -1;
+ }
+ btop = breaks + num_breaks * 2 - 2;
+ bp = breaks;
+ /* Parse the argument list */
+ do
+ { int level = 0;
+ char *lp = NULL;
+ char *rp = NULL;
+ char *end = NULL;
+
+ if ( bp >= btop )
+ { /* Filled up break table. */
+ /* Allocate a bigger one and start over. */
+ free((char *)breaks);
+ num_breaks <<= 1;
+ goto top;
+ }
+ *bp++ = p;
+ /* Find the end of the argument */
+ for ( ; end == NULL; p++ )
+ { switch(*p)
+ {
+ case ',':
+ if ( !level ) end = p;
+ break;
+ case '(':
+ if ( !level ) lp = p;
+ level++;
+ break;
+ case ')':
+ if ( --level < 0 ) end = p;
+ else rp = p;
+ break;
+ case '/':
+ if (p[1] == '*')
+ p = skipspace(p, 1) - 1;
+ break;
+ case '"':
+ p = scanstring(p, 1) - 1;
+ break;
+ default:
+ ;
+ }
+ }
+ /* Erase any embedded prototype parameters. */
+ if ( lp && rp )
+ writeblanks(lp + 1, rp);
+ p--; /* back up over terminator */
+ /* Find the name being declared. */
+ /* This is complicated because of procedure and */
+ /* array modifiers. */
+ for ( ; ; )
+ { p = skipspace(p - 1, -1);
+ switch ( *p )
+ {
+ case ']': /* skip array dimension(s) */
+ case ')': /* skip procedure args OR name */
+ { int level = 1;
+ while ( level )
+ switch ( *--p )
+ {
+ case ']': case ')':
+ level++;
+ break;
+ case '[': case '(':
+ level--;
+ break;
+ case '/':
+ if (p > buf && p[-1] == '*')
+ p = skipspace(p, -1) + 1;
+ break;
+ case '"':
+ p = scanstring(p, -1) + 1;
+ break;
+ default: ;
+ }
+ }
+ if ( *p == '(' && *skipspace(p + 1, 1) == '*' )
+ { /* We found the name being declared */
+ while ( !isidfirstchar(*p) )
+ p = skipspace(p, 1) + 1;
+ goto found;
+ }
+ break;
+ default:
+ goto found;
+ }
+ }
+found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' )
+ { if ( convert_varargs )
+ { *bp++ = "va_alist";
+ vararg = p-2;
+ }
+ else
+ { p++;
+ if ( bp == breaks + 1 ) /* sole argument */
+ writeblanks(breaks[0], p);
+ else
+ writeblanks(bp[-1] - 1, p);
+ bp--;
+ }
+ }
+ else
+ { while ( isidchar(*p) ) p--;
+ *bp++ = p+1;
+ }
+ p = end;
+ }
+ while ( *p++ == ',' );
+ *bp = p;
+ /* Make a special check for 'void' arglist */
+ if ( bp == breaks+2 )
+ { p = skipspace(breaks[0], 1);
+ if ( !strncmp(p, "void", 4) )
+ { p = skipspace(p+4, 1);
+ if ( p == breaks[2] - 1 )
+ { bp = breaks; /* yup, pretend arglist is empty */
+ writeblanks(breaks[0], p + 1);
+ }
+ }
+ }
+ /* Put out the function name and left parenthesis. */
+ p = buf;
+ while ( p != endfn ) putc(*p, out), p++;
+ /* Put out the declaration. */
+ if ( header )
+ { fputs(");", out);
+ for ( p = breaks[0]; *p; p++ )
+ if ( *p == '\r' || *p == '\n' )
+ putc(*p, out);
+ }
+ else
+ { for ( ap = breaks+1; ap < bp; ap += 2 )
+ { p = *ap;
+ while ( isidchar(*p) )
+ putc(*p, out), p++;
+ if ( ap < bp - 1 )
+ fputs(", ", out);
+ }
+ fputs(") ", out);
+ /* Put out the argument declarations */
+ for ( ap = breaks+2; ap <= bp; ap += 2 )
+ (*ap)[-1] = ';';
+ if ( vararg != 0 )
+ { *vararg = 0;
+ fputs(breaks[0], out); /* any prior args */
+ fputs("va_dcl", out); /* the final arg */
+ fputs(bp[0], out);
+ }
+ else
+ fputs(breaks[0], out);
+ }
+ free((char *)breaks);
+ return 0;
+}
diff --git a/src/3rdparty/libjpeg/cderror.h b/src/3rdparty/libjpeg/cderror.h
new file mode 100644
index 0000000000..e19c475c5c
--- /dev/null
+++ b/src/3rdparty/libjpeg/cderror.h
@@ -0,0 +1,134 @@
+/*
+ * cderror.h
+ *
+ * Copyright (C) 1994-1997, Thomas G. Lane.
+ * Modified 2009 by Guido Vollbeding.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file defines the error and message codes for the cjpeg/djpeg
+ * applications. These strings are not needed as part of the JPEG library
+ * proper.
+ * Edit this file to add new codes, or to translate the message strings to
+ * some other language.
+ */
+
+/*
+ * To define the enum list of message codes, include this file without
+ * defining macro JMESSAGE. To create a message string table, include it
+ * again with a suitable JMESSAGE definition (see jerror.c for an example).
+ */
+#ifndef JMESSAGE
+#ifndef CDERROR_H
+#define CDERROR_H
+/* First time through, define the enum list */
+#define JMAKE_ENUM_LIST
+#else
+/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
+#define JMESSAGE(code,string)
+#endif /* CDERROR_H */
+#endif /* JMESSAGE */
+
+#ifdef JMAKE_ENUM_LIST
+
+typedef enum {
+
+#define JMESSAGE(code,string) code ,
+
+#endif /* JMAKE_ENUM_LIST */
+
+JMESSAGE(JMSG_FIRSTADDONCODE=1000, NULL) /* Must be first entry! */
+
+#ifdef BMP_SUPPORTED
+JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format")
+JMESSAGE(JERR_BMP_BADDEPTH, "Only 8- and 24-bit BMP files are supported")
+JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length")
+JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1")
+JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB")
+JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported")
+JMESSAGE(JERR_BMP_EMPTY, "Empty BMP image")
+JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM")
+JMESSAGE(JTRC_BMP, "%ux%u 24-bit BMP image")
+JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image")
+JMESSAGE(JTRC_BMP_OS2, "%ux%u 24-bit OS2 BMP image")
+JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image")
+#endif /* BMP_SUPPORTED */
+
+#ifdef GIF_SUPPORTED
+JMESSAGE(JERR_GIF_BUG, "GIF output got confused")
+JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d")
+JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB")
+JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file")
+JMESSAGE(JERR_GIF_NOT, "Not a GIF file")
+JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image")
+JMESSAGE(JTRC_GIF_BADVERSION,
+ "Warning: unexpected GIF version number '%c%c%c'")
+JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x")
+JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input")
+JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file")
+JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring")
+JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image")
+JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits")
+#endif /* GIF_SUPPORTED */
+
+#ifdef PPM_SUPPORTED
+JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB")
+JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file")
+JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file")
+JMESSAGE(JTRC_PGM, "%ux%u PGM image")
+JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image")
+JMESSAGE(JTRC_PPM, "%ux%u PPM image")
+JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image")
+#endif /* PPM_SUPPORTED */
+
+#ifdef RLE_SUPPORTED
+JMESSAGE(JERR_RLE_BADERROR, "Bogus error code from RLE library")
+JMESSAGE(JERR_RLE_COLORSPACE, "RLE output must be grayscale or RGB")
+JMESSAGE(JERR_RLE_DIMENSIONS, "Image dimensions (%ux%u) too large for RLE")
+JMESSAGE(JERR_RLE_EMPTY, "Empty RLE file")
+JMESSAGE(JERR_RLE_EOF, "Premature EOF in RLE header")
+JMESSAGE(JERR_RLE_MEM, "Insufficient memory for RLE header")
+JMESSAGE(JERR_RLE_NOT, "Not an RLE file")
+JMESSAGE(JERR_RLE_TOOMANYCHANNELS, "Cannot handle %d output channels for RLE")
+JMESSAGE(JERR_RLE_UNSUPPORTED, "Cannot handle this RLE setup")
+JMESSAGE(JTRC_RLE, "%ux%u full-color RLE file")
+JMESSAGE(JTRC_RLE_FULLMAP, "%ux%u full-color RLE file with map of length %d")
+JMESSAGE(JTRC_RLE_GRAY, "%ux%u grayscale RLE file")
+JMESSAGE(JTRC_RLE_MAPGRAY, "%ux%u grayscale RLE file with map of length %d")
+JMESSAGE(JTRC_RLE_MAPPED, "%ux%u colormapped RLE file with map of length %d")
+#endif /* RLE_SUPPORTED */
+
+#ifdef TARGA_SUPPORTED
+JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format")
+JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file")
+JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB")
+JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image")
+JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image")
+JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image")
+#else
+JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled")
+#endif /* TARGA_SUPPORTED */
+
+JMESSAGE(JERR_BAD_CMAP_FILE,
+ "Color map file is invalid or of unsupported format")
+JMESSAGE(JERR_TOO_MANY_COLORS,
+ "Output file format cannot handle %d colormap entries")
+JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed")
+#ifdef TARGA_SUPPORTED
+JMESSAGE(JERR_UNKNOWN_FORMAT,
+ "Unrecognized input file format --- perhaps you need -targa")
+#else
+JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format")
+#endif
+JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format")
+
+#ifdef JMAKE_ENUM_LIST
+
+ JMSG_LASTADDONCODE
+} ADDON_MESSAGE_CODE;
+
+#undef JMAKE_ENUM_LIST
+#endif /* JMAKE_ENUM_LIST */
+
+/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */
+#undef JMESSAGE
diff --git a/src/3rdparty/libjpeg/cdjpeg.h b/src/3rdparty/libjpeg/cdjpeg.h
new file mode 100644
index 0000000000..ed024ac3ae
--- /dev/null
+++ b/src/3rdparty/libjpeg/cdjpeg.h
@@ -0,0 +1,187 @@
+/*
+ * cdjpeg.h
+ *
+ * Copyright (C) 1994-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains common declarations for the sample applications
+ * cjpeg and djpeg. It is NOT used by the core JPEG library.
+ */
+
+#define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */
+#define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jerror.h" /* get library error codes too */
+#include "cderror.h" /* get application-specific error codes */
+
+
+/*
+ * Object interface for cjpeg's source file decoding modules
+ */
+
+typedef struct cjpeg_source_struct * cjpeg_source_ptr;
+
+struct cjpeg_source_struct {
+ JMETHOD(void, start_input, (j_compress_ptr cinfo,
+ cjpeg_source_ptr sinfo));
+ JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo,
+ cjpeg_source_ptr sinfo));
+ JMETHOD(void, finish_input, (j_compress_ptr cinfo,
+ cjpeg_source_ptr sinfo));
+
+ FILE *input_file;
+
+ JSAMPARRAY buffer;
+ JDIMENSION buffer_height;
+};
+
+
+/*
+ * Object interface for djpeg's output file encoding modules
+ */
+
+typedef struct djpeg_dest_struct * djpeg_dest_ptr;
+
+struct djpeg_dest_struct {
+ /* start_output is called after jpeg_start_decompress finishes.
+ * The color map will be ready at this time, if one is needed.
+ */
+ JMETHOD(void, start_output, (j_decompress_ptr cinfo,
+ djpeg_dest_ptr dinfo));
+ /* Emit the specified number of pixel rows from the buffer. */
+ JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo,
+ djpeg_dest_ptr dinfo,
+ JDIMENSION rows_supplied));
+ /* Finish up at the end of the image. */
+ JMETHOD(void, finish_output, (j_decompress_ptr cinfo,
+ djpeg_dest_ptr dinfo));
+
+ /* Target file spec; filled in by djpeg.c after object is created. */
+ FILE * output_file;
+
+ /* Output pixel-row buffer. Created by module init or start_output.
+ * Width is cinfo->output_width * cinfo->output_components;
+ * height is buffer_height.
+ */
+ JSAMPARRAY buffer;
+ JDIMENSION buffer_height;
+};
+
+
+/*
+ * cjpeg/djpeg may need to perform extra passes to convert to or from
+ * the source/destination file format. The JPEG library does not know
+ * about these passes, but we'd like them to be counted by the progress
+ * monitor. We use an expanded progress monitor object to hold the
+ * additional pass count.
+ */
+
+struct cdjpeg_progress_mgr {
+ struct jpeg_progress_mgr pub; /* fields known to JPEG library */
+ int completed_extra_passes; /* extra passes completed */
+ int total_extra_passes; /* total extra */
+ /* last printed percentage stored here to avoid multiple printouts */
+ int percent_done;
+};
+
+typedef struct cdjpeg_progress_mgr * cd_progress_ptr;
+
+
+/* Short forms of external names for systems with brain-damaged linkers. */
+
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+#define jinit_read_bmp jIRdBMP
+#define jinit_write_bmp jIWrBMP
+#define jinit_read_gif jIRdGIF
+#define jinit_write_gif jIWrGIF
+#define jinit_read_ppm jIRdPPM
+#define jinit_write_ppm jIWrPPM
+#define jinit_read_rle jIRdRLE
+#define jinit_write_rle jIWrRLE
+#define jinit_read_targa jIRdTarga
+#define jinit_write_targa jIWrTarga
+#define read_quant_tables RdQTables
+#define read_scan_script RdScnScript
+#define set_quality_ratings SetQRates
+#define set_quant_slots SetQSlots
+#define set_sample_factors SetSFacts
+#define read_color_map RdCMap
+#define enable_signal_catcher EnSigCatcher
+#define start_progress_monitor StProgMon
+#define end_progress_monitor EnProgMon
+#define read_stdin RdStdin
+#define write_stdout WrStdout
+#endif /* NEED_SHORT_EXTERNAL_NAMES */
+
+/* Module selection routines for I/O modules. */
+
+EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo));
+EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo,
+ boolean is_os2));
+EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo));
+EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo));
+EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo));
+EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo));
+EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo));
+EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo));
+EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo));
+EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo));
+
+/* cjpeg support routines (in rdswitch.c) */
+
+EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename,
+ boolean force_baseline));
+EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename));
+EXTERN(boolean) set_quality_ratings JPP((j_compress_ptr cinfo, char *arg,
+ boolean force_baseline));
+EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg));
+EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg));
+
+/* djpeg support routines (in rdcolmap.c) */
+
+EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile));
+
+/* common support routines (in cdjpeg.c) */
+
+EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo));
+EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo,
+ cd_progress_ptr progress));
+EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo));
+EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars));
+EXTERN(FILE *) read_stdin JPP((void));
+EXTERN(FILE *) write_stdout JPP((void));
+
+/* miscellaneous useful macros */
+
+#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */
+#define READ_BINARY "r"
+#define WRITE_BINARY "w"
+#else
+#ifdef VMS /* VMS is very nonstandard */
+#define READ_BINARY "rb", "ctx=stm"
+#define WRITE_BINARY "wb", "ctx=stm"
+#else /* standard ANSI-compliant case */
+#define READ_BINARY "rb"
+#define WRITE_BINARY "wb"
+#endif
+#endif
+
+#ifndef EXIT_FAILURE /* define exit() codes if not provided */
+#define EXIT_FAILURE 1
+#endif
+#ifndef EXIT_SUCCESS
+#ifdef VMS
+#define EXIT_SUCCESS 1 /* VMS is very nonstandard */
+#else
+#define EXIT_SUCCESS 0
+#endif
+#endif
+#ifndef EXIT_WARNING
+#ifdef VMS
+#define EXIT_WARNING 1 /* VMS is very nonstandard */
+#else
+#define EXIT_WARNING 2
+#endif
+#endif
diff --git a/src/3rdparty/libjpeg/change.log b/src/3rdparty/libjpeg/change.log
index 74102c0db5..58ea3eb3be 100644
--- a/src/3rdparty/libjpeg/change.log
+++ b/src/3rdparty/libjpeg/change.log
@@ -1,6 +1,79 @@
CHANGE LOG for Independent JPEG Group's JPEG software
+Version 8 10-Jan-2010
+----------------------
+
+jpegtran now supports the same -scale option as djpeg for "lossless" resize.
+An implementation of the JPEG SmartScale extension is required for this
+feature. A (draft) specification of the JPEG SmartScale extension is
+available as a contributed document at ITU and ISO. Revision 2 or later
+of the document is required (latest document version is Revision 3).
+The SmartScale extension will enable more features beside lossless resize
+in future implementations, as described in the document (new compression
+options).
+
+Add sanity check in BMP reader module to avoid cjpeg crash for empty input
+image (thank to Isaev Ildar of ISP RAS, Moscow, RU for reporting this error).
+
+Add data source and destination managers for read from and write to
+memory buffers. New API functions jpeg_mem_src and jpeg_mem_dest.
+Thank to Roberto Boni from Italy for the suggestion.
+
+
+Version 7 27-Jun-2009
+----------------------
+
+New scaled DCTs implemented.
+djpeg now supports scalings N/8 with all N from 1 to 16.
+cjpeg now supports scalings 8/N with all N from 1 to 16.
+Scaled DCTs with size larger than 8 are now also used for resolving the
+common 2x2 chroma subsampling case without additional spatial resampling.
+Separate spatial resampling for those kind of files is now only necessary
+for N>8 scaling cases.
+Furthermore, separate scaled DCT functions are provided for direct resolving
+of the common asymmetric subsampling cases (2x1 and 1x2) without additional
+spatial resampling.
+
+cjpeg -quality option has been extended for support of separate quality
+settings for luminance and chrominance (or in general, for every provided
+quantization table slot).
+New API function jpeg_default_qtables() and q_scale_factor array in library.
+
+Added -nosmooth option to cjpeg, complementary to djpeg.
+New variable "do_fancy_downsampling" in library, complement to fancy
+upsampling. Fancy upsampling now uses direct DCT scaling with sizes
+larger than 8. The old method is not reversible and has been removed.
+
+Support arithmetic entropy encoding and decoding.
+Added files jaricom.c, jcarith.c, jdarith.c.
+
+Straighten the file structure:
+Removed files jidctred.c, jcphuff.c, jchuff.h, jdphuff.c, jdhuff.h.
+
+jpegtran has a new "lossless" cropping feature.
+
+Implement -perfect option in jpegtran, new API function
+jtransform_perfect_transform() in transupp. (DP 204_perfect.dpatch)
+
+Better error messages for jpegtran fopen failure.
+(DP 203_jpegtran_errmsg.dpatch)
+
+Fix byte order issue with 16bit PPM/PGM files in rdppm.c/wrppm.c:
+according to Netpbm, the de facto standard implementation of the PNM formats,
+the most significant byte is first. (DP 203_rdppm.dpatch)
+
+Add -raw option to rdjpgcom not to mangle the output.
+(DP 205_rdjpgcom_raw.dpatch)
+
+Make rdjpgcom locale aware. (DP 201_rdjpgcom_locale.dpatch)
+
+Add extern "C" to jpeglib.h.
+This avoids the need to put extern "C" { ... } around #include "jpeglib.h"
+in your C++ application. Defining the symbol DONT_USE_EXTERN_C in the
+configuration prevents this. (DP 202_jpeglib.h_c++.dpatch)
+
+
Version 6b 27-Mar-1998
-----------------------
diff --git a/src/3rdparty/libjpeg/cjpeg.1 b/src/3rdparty/libjpeg/cjpeg.1
new file mode 100644
index 0000000000..01bfa2595b
--- /dev/null
+++ b/src/3rdparty/libjpeg/cjpeg.1
@@ -0,0 +1,325 @@
+.TH CJPEG 1 "30 December 2009"
+.SH NAME
+cjpeg \- compress an image file to a JPEG file
+.SH SYNOPSIS
+.B cjpeg
+[
+.I options
+]
+[
+.I filename
+]
+.LP
+.SH DESCRIPTION
+.LP
+.B cjpeg
+compresses the named image file, or the standard input if no file is
+named, and produces a JPEG/JFIF file on the standard output.
+The currently supported input file formats are: PPM (PBMPLUS color
+format), PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster
+Toolkit format). (RLE is supported only if the URT library is available.)
+.SH OPTIONS
+All switch names may be abbreviated; for example,
+.B \-grayscale
+may be written
+.B \-gray
+or
+.BR \-gr .
+Most of the "basic" switches can be abbreviated to as little as one letter.
+Upper and lower case are equivalent (thus
+.B \-BMP
+is the same as
+.BR \-bmp ).
+British spellings are also accepted (e.g.,
+.BR \-greyscale ),
+though for brevity these are not mentioned below.
+.PP
+The basic switches are:
+.TP
+.BI \-quality " N[,...]"
+Scale quantization tables to adjust image quality. Quality is 0 (worst) to
+100 (best); default is 75. (See below for more info.)
+.TP
+.B \-grayscale
+Create monochrome JPEG file from color input. Be sure to use this switch when
+compressing a grayscale BMP file, because
+.B cjpeg
+isn't bright enough to notice whether a BMP file uses only shades of gray.
+By saying
+.BR \-grayscale ,
+you'll get a smaller JPEG file that takes less time to process.
+.TP
+.B \-optimize
+Perform optimization of entropy encoding parameters. Without this, default
+encoding parameters are used.
+.B \-optimize
+usually makes the JPEG file a little smaller, but
+.B cjpeg
+runs somewhat slower and needs much more memory. Image quality and speed of
+decompression are unaffected by
+.BR \-optimize .
+.TP
+.B \-progressive
+Create progressive JPEG file (see below).
+.TP
+.BI \-scale " M/N"
+Scale the output image by a factor M/N. Currently supported scale factors are
+8/N with all N from 1 to 16.
+.TP
+.B \-targa
+Input file is Targa format. Targa files that contain an "identification"
+field will not be automatically recognized by
+.BR cjpeg ;
+for such files you must specify
+.B \-targa
+to make
+.B cjpeg
+treat the input as Targa format.
+For most Targa files, you won't need this switch.
+.PP
+The
+.B \-quality
+switch lets you trade off compressed file size against quality of the
+reconstructed image: the higher the quality setting, the larger the JPEG file,
+and the closer the output image will be to the original input. Normally you
+want to use the lowest quality setting (smallest file) that decompresses into
+something visually indistinguishable from the original image. For this
+purpose the quality setting should be between 50 and 95; the default of 75 is
+often about right. If you see defects at
+.B \-quality
+75, then go up 5 or 10 counts at a time until you are happy with the output
+image. (The optimal setting will vary from one image to another.)
+.PP
+.B \-quality
+100 will generate a quantization table of all 1's, minimizing loss in the
+quantization step (but there is still information loss in subsampling, as well
+as roundoff error). This setting is mainly of interest for experimental
+purposes. Quality values above about 95 are
+.B not
+recommended for normal use; the compressed file size goes up dramatically for
+hardly any gain in output image quality.
+.PP
+In the other direction, quality values below 50 will produce very small files
+of low image quality. Settings around 5 to 10 might be useful in preparing an
+index of a large image library, for example. Try
+.B \-quality
+2 (or so) for some amusing Cubist effects. (Note: quality
+values below about 25 generate 2-byte quantization tables, which are
+considered optional in the JPEG standard.
+.B cjpeg
+emits a warning message when you give such a quality value, because some
+other JPEG programs may be unable to decode the resulting file. Use
+.B \-baseline
+if you need to ensure compatibility at low quality values.)
+.PP
+The
+.B \-quality
+option has been extended in IJG version 7 for support of separate quality
+settings for luminance and chrominance (or in general, for every provided
+quantization table slot). This feature is useful for high-quality
+applications which cannot accept the damage of color data by coarse
+subsampling settings. You can now easily reduce the color data amount more
+smoothly with finer control without separate subsampling. The resulting file
+is fully compliant with standard JPEG decoders.
+Note that the
+.B \-quality
+ratings refer to the quantization table slots, and that the last value is
+replicated if there are more q-table slots than parameters. The default
+q-table slots are 0 for luminance and 1 for chrominance with default tables as
+given in the JPEG standard. This is compatible with the old behaviour in case
+that only one parameter is given, which is then used for both luminance and
+chrominance (slots 0 and 1). More or custom quantization tables can be set
+with
+.B \-qtables
+and assigned to components with
+.B \-qslots
+parameter (see the "wizard" switches below).
+.B Caution:
+You must explicitly add
+.BI \-sample " 1x1"
+for efficient separate color
+quality selection, since the default value used by library is 2x2!
+.PP
+The
+.B \-progressive
+switch creates a "progressive JPEG" file. In this type of JPEG file, the data
+is stored in multiple scans of increasing quality. If the file is being
+transmitted over a slow communications link, the decoder can use the first
+scan to display a low-quality image very quickly, and can then improve the
+display with each subsequent scan. The final image is exactly equivalent to a
+standard JPEG file of the same quality setting, and the total file size is
+about the same --- often a little smaller.
+.PP
+Switches for advanced users:
+.TP
+.B \-dct int
+Use integer DCT method (default).
+.TP
+.B \-dct fast
+Use fast integer DCT (less accurate).
+.TP
+.B \-dct float
+Use floating-point DCT method.
+The float method is very slightly more accurate than the int method, but is
+much slower unless your machine has very fast floating-point hardware. Also
+note that results of the floating-point method may vary slightly across
+machines, while the integer methods should give the same results everywhere.
+The fast integer method is much less accurate than the other two.
+.TP
+.B \-nosmooth
+Don't use high-quality downsampling.
+.TP
+.BI \-restart " N"
+Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is
+attached to the number.
+.B \-restart 0
+(the default) means no restart markers.
+.TP
+.BI \-smooth " N"
+Smooth the input image to eliminate dithering noise. N, ranging from 1 to
+100, indicates the strength of smoothing. 0 (the default) means no smoothing.
+.TP
+.BI \-maxmemory " N"
+Set limit for amount of memory to use in processing large images. Value is
+in thousands of bytes, or millions of bytes if "M" is attached to the
+number. For example,
+.B \-max 4m
+selects 4000000 bytes. If more space is needed, temporary files will be used.
+.TP
+.BI \-outfile " name"
+Send output image to the named file, not to standard output.
+.TP
+.B \-verbose
+Enable debug printout. More
+.BR \-v 's
+give more output. Also, version information is printed at startup.
+.TP
+.B \-debug
+Same as
+.BR \-verbose .
+.PP
+The
+.B \-restart
+option inserts extra markers that allow a JPEG decoder to resynchronize after
+a transmission error. Without restart markers, any damage to a compressed
+file will usually ruin the image from the point of the error to the end of the
+image; with restart markers, the damage is usually confined to the portion of
+the image up to the next restart marker. Of course, the restart markers
+occupy extra space. We recommend
+.B \-restart 1
+for images that will be transmitted across unreliable networks such as Usenet.
+.PP
+The
+.B \-smooth
+option filters the input to eliminate fine-scale noise. This is often useful
+when converting dithered images to JPEG: a moderate smoothing factor of 10 to
+50 gets rid of dithering patterns in the input file, resulting in a smaller
+JPEG file and a better-looking image. Too large a smoothing factor will
+visibly blur the image, however.
+.PP
+Switches for wizards:
+.TP
+.B \-arithmetic
+Use arithmetic coding.
+.B Caution:
+arithmetic coded JPEG is not yet widely implemented, so many decoders will be
+unable to view an arithmetic coded JPEG file at all.
+.TP
+.B \-baseline
+Force baseline-compatible quantization tables to be generated. This clamps
+quantization values to 8 bits even at low quality settings. (This switch is
+poorly named, since it does not ensure that the output is actually baseline
+JPEG. For example, you can use
+.B \-baseline
+and
+.B \-progressive
+together.)
+.TP
+.BI \-qtables " file"
+Use the quantization tables given in the specified text file.
+.TP
+.BI \-qslots " N[,...]"
+Select which quantization table to use for each color component.
+.TP
+.BI \-sample " HxV[,...]"
+Set JPEG sampling factors for each color component.
+.TP
+.BI \-scans " file"
+Use the scan script given in the specified text file.
+.PP
+The "wizard" switches are intended for experimentation with JPEG. If you
+don't know what you are doing, \fBdon't use them\fR. These switches are
+documented further in the file wizard.txt.
+.SH EXAMPLES
+.LP
+This example compresses the PPM file foo.ppm with a quality factor of
+60 and saves the output as foo.jpg:
+.IP
+.B cjpeg \-quality
+.I 60 foo.ppm
+.B >
+.I foo.jpg
+.SH HINTS
+Color GIF files are not the ideal input for JPEG; JPEG is really intended for
+compressing full-color (24-bit) images. In particular, don't try to convert
+cartoons, line drawings, and other images that have only a few distinct
+colors. GIF works great on these, JPEG does not. If you want to convert a
+GIF to JPEG, you should experiment with
+.BR cjpeg 's
+.B \-quality
+and
+.B \-smooth
+options to get a satisfactory conversion.
+.B \-smooth 10
+or so is often helpful.
+.PP
+Avoid running an image through a series of JPEG compression/decompression
+cycles. Image quality loss will accumulate; after ten or so cycles the image
+may be noticeably worse than it was after one cycle. It's best to use a
+lossless format while manipulating an image, then convert to JPEG format when
+you are ready to file the image away.
+.PP
+The
+.B \-optimize
+option to
+.B cjpeg
+is worth using when you are making a "final" version for posting or archiving.
+It's also a win when you are using low quality settings to make very small
+JPEG files; the percentage improvement is often a lot more than it is on
+larger files. (At present,
+.B \-optimize
+mode is always selected when generating progressive JPEG files.)
+.SH ENVIRONMENT
+.TP
+.B JPEGMEM
+If this environment variable is set, its value is the default memory limit.
+The value is specified as described for the
+.B \-maxmemory
+switch.
+.B JPEGMEM
+overrides the default value specified when the program was compiled, and
+itself is overridden by an explicit
+.BR \-maxmemory .
+.SH SEE ALSO
+.BR djpeg (1),
+.BR jpegtran (1),
+.BR rdjpgcom (1),
+.BR wrjpgcom (1)
+.br
+.BR ppm (5),
+.BR pgm (5)
+.br
+Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
+Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
+.SH AUTHOR
+Independent JPEG Group
+.SH BUGS
+GIF input files are no longer supported, to avoid the Unisys LZW patent.
+(Conversion of GIF files to JPEG is usually a bad idea anyway.)
+.PP
+Not all variants of BMP and Targa file formats are supported.
+.PP
+The
+.B \-targa
+switch is not a bug, it's a feature. (It would be a bug if the Targa format
+designers had not been clueless.)
diff --git a/src/3rdparty/libjpeg/ckconfig.c b/src/3rdparty/libjpeg/ckconfig.c
new file mode 100644
index 0000000000..e658623fa5
--- /dev/null
+++ b/src/3rdparty/libjpeg/ckconfig.c
@@ -0,0 +1,402 @@
+/*
+ * ckconfig.c
+ *
+ * Copyright (C) 1991-1994, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ */
+
+/*
+ * This program is intended to help you determine how to configure the JPEG
+ * software for installation on a particular system. The idea is to try to
+ * compile and execute this program. If your compiler fails to compile the
+ * program, make changes as indicated in the comments below. Once you can
+ * compile the program, run it, and it will produce a "jconfig.h" file for
+ * your system.
+ *
+ * As a general rule, each time you try to compile this program,
+ * pay attention only to the *first* error message you get from the compiler.
+ * Many C compilers will issue lots of spurious error messages once they
+ * have gotten confused. Go to the line indicated in the first error message,
+ * and read the comments preceding that line to see what to change.
+ *
+ * Almost all of the edits you may need to make to this program consist of
+ * changing a line that reads "#define SOME_SYMBOL" to "#undef SOME_SYMBOL",
+ * or vice versa. This is called defining or undefining that symbol.
+ */
+
+
+/* First we must see if your system has the include files we need.
+ * We start out with the assumption that your system has all the ANSI-standard
+ * include files. If you get any error trying to include one of these files,
+ * undefine the corresponding HAVE_xxx symbol.
+ */
+
+#define HAVE_STDDEF_H /* replace 'define' by 'undef' if error here */
+#ifdef HAVE_STDDEF_H /* next line will be skipped if you undef... */
+#include <stddef.h>
+#endif
+
+#define HAVE_STDLIB_H /* same thing for stdlib.h */
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include <stdio.h> /* If you ain't got this, you ain't got C. */
+
+/* We have to see if your string functions are defined by
+ * strings.h (old BSD convention) or string.h (everybody else).
+ * We try the non-BSD convention first; define NEED_BSD_STRINGS
+ * if the compiler says it can't find string.h.
+ */
+
+#undef NEED_BSD_STRINGS
+
+#ifdef NEED_BSD_STRINGS
+#include <strings.h>
+#else
+#include <string.h>
+#endif
+
+/* On some systems (especially older Unix machines), type size_t is
+ * defined only in the include file <sys/types.h>. If you get a failure
+ * on the size_t test below, try defining NEED_SYS_TYPES_H.
+ */
+
+#undef NEED_SYS_TYPES_H /* start by assuming we don't need it */
+#ifdef NEED_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+
+/* Usually type size_t is defined in one of the include files we've included
+ * above. If not, you'll get an error on the "typedef size_t my_size_t;" line.
+ * In that case, first try defining NEED_SYS_TYPES_H just above.
+ * If that doesn't work, you'll have to search through your system library
+ * to figure out which include file defines "size_t". Look for a line that
+ * says "typedef something-or-other size_t;". Then, change the line below
+ * that says "#include <someincludefile.h>" to instead include the file
+ * you found size_t in, and define NEED_SPECIAL_INCLUDE. If you can't find
+ * type size_t anywhere, try replacing "#include <someincludefile.h>" with
+ * "typedef unsigned int size_t;".
+ */
+
+#undef NEED_SPECIAL_INCLUDE /* assume we DON'T need it, for starters */
+
+#ifdef NEED_SPECIAL_INCLUDE
+#include <someincludefile.h>
+#endif
+
+typedef size_t my_size_t; /* The payoff: do we have size_t now? */
+
+
+/* The next question is whether your compiler supports ANSI-style function
+ * prototypes. You need to know this in order to choose between using
+ * makefile.ansi and using makefile.unix.
+ * The #define line below is set to assume you have ANSI function prototypes.
+ * If you get an error in this group of lines, undefine HAVE_PROTOTYPES.
+ */
+
+#define HAVE_PROTOTYPES
+
+#ifdef HAVE_PROTOTYPES
+int testfunction (int arg1, int * arg2); /* check prototypes */
+
+struct methods_struct { /* check method-pointer declarations */
+ int (*error_exit) (char *msgtext);
+ int (*trace_message) (char *msgtext);
+ int (*another_method) (void);
+};
+
+int testfunction (int arg1, int * arg2) /* check definitions */
+{
+ return arg2[arg1];
+}
+
+int test2function (void) /* check void arg list */
+{
+ return 0;
+}
+#endif
+
+
+/* Now we want to find out if your compiler knows what "unsigned char" means.
+ * If you get an error on the "unsigned char un_char;" line,
+ * then undefine HAVE_UNSIGNED_CHAR.
+ */
+
+#define HAVE_UNSIGNED_CHAR
+
+#ifdef HAVE_UNSIGNED_CHAR
+unsigned char un_char;
+#endif
+
+
+/* Now we want to find out if your compiler knows what "unsigned short" means.
+ * If you get an error on the "unsigned short un_short;" line,
+ * then undefine HAVE_UNSIGNED_SHORT.
+ */
+
+#define HAVE_UNSIGNED_SHORT
+
+#ifdef HAVE_UNSIGNED_SHORT
+unsigned short un_short;
+#endif
+
+
+/* Now we want to find out if your compiler understands type "void".
+ * If you get an error anywhere in here, undefine HAVE_VOID.
+ */
+
+#define HAVE_VOID
+
+#ifdef HAVE_VOID
+/* Caution: a C++ compiler will insist on complete prototypes */
+typedef void * void_ptr; /* check void * */
+#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */
+typedef void (*void_func) (int a, int b);
+#else
+typedef void (*void_func) ();
+#endif
+
+#ifdef HAVE_PROTOTYPES /* check void function result */
+void test3function (void_ptr arg1, void_func arg2)
+#else
+void test3function (arg1, arg2)
+ void_ptr arg1;
+ void_func arg2;
+#endif
+{
+ char * locptr = (char *) arg1; /* check casting to and from void * */
+ arg1 = (void *) locptr;
+ (*arg2) (1, 2); /* check call of fcn returning void */
+}
+#endif
+
+
+/* Now we want to find out if your compiler knows what "const" means.
+ * If you get an error here, undefine HAVE_CONST.
+ */
+
+#define HAVE_CONST
+
+#ifdef HAVE_CONST
+static const int carray[3] = {1, 2, 3};
+
+#ifdef HAVE_PROTOTYPES
+int test4function (const int arg1)
+#else
+int test4function (arg1)
+ const int arg1;
+#endif
+{
+ return carray[arg1];
+}
+#endif
+
+
+/* If you get an error or warning about this structure definition,
+ * define INCOMPLETE_TYPES_BROKEN.
+ */
+
+#undef INCOMPLETE_TYPES_BROKEN
+
+#ifndef INCOMPLETE_TYPES_BROKEN
+typedef struct undefined_structure * undef_struct_ptr;
+#endif
+
+
+/* If you get an error about duplicate names,
+ * define NEED_SHORT_EXTERNAL_NAMES.
+ */
+
+#undef NEED_SHORT_EXTERNAL_NAMES
+
+#ifndef NEED_SHORT_EXTERNAL_NAMES
+
+int possibly_duplicate_function ()
+{
+ return 0;
+}
+
+int possibly_dupli_function ()
+{
+ return 1;
+}
+
+#endif
+
+
+
+/************************************************************************
+ * OK, that's it. You should not have to change anything beyond this
+ * point in order to compile and execute this program. (You might get
+ * some warnings, but you can ignore them.)
+ * When you run the program, it will make a couple more tests that it
+ * can do automatically, and then it will create jconfig.h and print out
+ * any additional suggestions it has.
+ ************************************************************************
+ */
+
+
+#ifdef HAVE_PROTOTYPES
+int is_char_signed (int arg)
+#else
+int is_char_signed (arg)
+ int arg;
+#endif
+{
+ if (arg == 189) { /* expected result for unsigned char */
+ return 0; /* type char is unsigned */
+ }
+ else if (arg != -67) { /* expected result for signed char */
+ printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
+ printf("I fear the JPEG software will not work at all.\n\n");
+ }
+ return 1; /* assume char is signed otherwise */
+}
+
+
+#ifdef HAVE_PROTOTYPES
+int is_shifting_signed (long arg)
+#else
+int is_shifting_signed (arg)
+ long arg;
+#endif
+/* See whether right-shift on a long is signed or not. */
+{
+ long res = arg >> 4;
+
+ if (res == -0x7F7E80CL) { /* expected result for signed shift */
+ return 1; /* right shift is signed */
+ }
+ /* see if unsigned-shift hack will fix it. */
+ /* we can't just test exact value since it depends on width of long... */
+ res |= (~0L) << (32-4);
+ if (res == -0x7F7E80CL) { /* expected result now? */
+ return 0; /* right shift is unsigned */
+ }
+ printf("Right shift isn't acting as I expect it to.\n");
+ printf("I fear the JPEG software will not work at all.\n\n");
+ return 0; /* try it with unsigned anyway */
+}
+
+
+#ifdef HAVE_PROTOTYPES
+int main (int argc, char ** argv)
+#else
+int main (argc, argv)
+ int argc;
+ char ** argv;
+#endif
+{
+ char signed_char_check = (char) (-67);
+ FILE *outfile;
+
+ /* Attempt to write jconfig.h */
+ if ((outfile = fopen("jconfig.h", "w")) == NULL) {
+ printf("Failed to write jconfig.h\n");
+ return 1;
+ }
+
+ /* Write out all the info */
+ fprintf(outfile, "/* jconfig.h --- generated by ckconfig.c */\n");
+ fprintf(outfile, "/* see jconfig.txt for explanations */\n\n");
+#ifdef HAVE_PROTOTYPES
+ fprintf(outfile, "#define HAVE_PROTOTYPES\n");
+#else
+ fprintf(outfile, "#undef HAVE_PROTOTYPES\n");
+#endif
+#ifdef HAVE_UNSIGNED_CHAR
+ fprintf(outfile, "#define HAVE_UNSIGNED_CHAR\n");
+#else
+ fprintf(outfile, "#undef HAVE_UNSIGNED_CHAR\n");
+#endif
+#ifdef HAVE_UNSIGNED_SHORT
+ fprintf(outfile, "#define HAVE_UNSIGNED_SHORT\n");
+#else
+ fprintf(outfile, "#undef HAVE_UNSIGNED_SHORT\n");
+#endif
+#ifdef HAVE_VOID
+ fprintf(outfile, "/* #define void char */\n");
+#else
+ fprintf(outfile, "#define void char\n");
+#endif
+#ifdef HAVE_CONST
+ fprintf(outfile, "/* #define const */\n");
+#else
+ fprintf(outfile, "#define const\n");
+#endif
+ if (is_char_signed((int) signed_char_check))
+ fprintf(outfile, "#undef CHAR_IS_UNSIGNED\n");
+ else
+ fprintf(outfile, "#define CHAR_IS_UNSIGNED\n");
+#ifdef HAVE_STDDEF_H
+ fprintf(outfile, "#define HAVE_STDDEF_H\n");
+#else
+ fprintf(outfile, "#undef HAVE_STDDEF_H\n");
+#endif
+#ifdef HAVE_STDLIB_H
+ fprintf(outfile, "#define HAVE_STDLIB_H\n");
+#else
+ fprintf(outfile, "#undef HAVE_STDLIB_H\n");
+#endif
+#ifdef NEED_BSD_STRINGS
+ fprintf(outfile, "#define NEED_BSD_STRINGS\n");
+#else
+ fprintf(outfile, "#undef NEED_BSD_STRINGS\n");
+#endif
+#ifdef NEED_SYS_TYPES_H
+ fprintf(outfile, "#define NEED_SYS_TYPES_H\n");
+#else
+ fprintf(outfile, "#undef NEED_SYS_TYPES_H\n");
+#endif
+ fprintf(outfile, "#undef NEED_FAR_POINTERS\n");
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+ fprintf(outfile, "#define NEED_SHORT_EXTERNAL_NAMES\n");
+#else
+ fprintf(outfile, "#undef NEED_SHORT_EXTERNAL_NAMES\n");
+#endif
+#ifdef INCOMPLETE_TYPES_BROKEN
+ fprintf(outfile, "#define INCOMPLETE_TYPES_BROKEN\n");
+#else
+ fprintf(outfile, "#undef INCOMPLETE_TYPES_BROKEN\n");
+#endif
+ fprintf(outfile, "\n#ifdef JPEG_INTERNALS\n\n");
+ if (is_shifting_signed(-0x7F7E80B1L))
+ fprintf(outfile, "#undef RIGHT_SHIFT_IS_UNSIGNED\n");
+ else
+ fprintf(outfile, "#define RIGHT_SHIFT_IS_UNSIGNED\n");
+ fprintf(outfile, "\n#endif /* JPEG_INTERNALS */\n");
+ fprintf(outfile, "\n#ifdef JPEG_CJPEG_DJPEG\n\n");
+ fprintf(outfile, "#define BMP_SUPPORTED /* BMP image file format */\n");
+ fprintf(outfile, "#define GIF_SUPPORTED /* GIF image file format */\n");
+ fprintf(outfile, "#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */\n");
+ fprintf(outfile, "#undef RLE_SUPPORTED /* Utah RLE image file format */\n");
+ fprintf(outfile, "#define TARGA_SUPPORTED /* Targa image file format */\n\n");
+ fprintf(outfile, "#undef TWO_FILE_COMMANDLINE /* You may need this on non-Unix systems */\n");
+ fprintf(outfile, "#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */\n");
+ fprintf(outfile, "#undef DONT_USE_B_MODE\n");
+ fprintf(outfile, "/* #define PROGRESS_REPORT */ /* optional */\n");
+ fprintf(outfile, "\n#endif /* JPEG_CJPEG_DJPEG */\n");
+
+ /* Close the jconfig.h file */
+ fclose(outfile);
+
+ /* User report */
+ printf("Configuration check for Independent JPEG Group's software done.\n");
+ printf("\nI have written the jconfig.h file for you.\n\n");
+#ifdef HAVE_PROTOTYPES
+ printf("You should use makefile.ansi as the starting point for your Makefile.\n");
+#else
+ printf("You should use makefile.unix as the starting point for your Makefile.\n");
+#endif
+
+#ifdef NEED_SPECIAL_INCLUDE
+ printf("\nYou'll need to change jconfig.h to include the system include file\n");
+ printf("that you found type size_t in, or add a direct definition of type\n");
+ printf("size_t if that's what you used. Just add it to the end.\n");
+#endif
+
+ return 0;
+}
diff --git a/src/3rdparty/libjpeg/coderules.doc b/src/3rdparty/libjpeg/coderules.doc
deleted file mode 100644
index 0ab5d9bd30..0000000000
--- a/src/3rdparty/libjpeg/coderules.doc
+++ /dev/null
@@ -1,118 +0,0 @@
-IJG JPEG LIBRARY: CODING RULES
-
-Copyright (C) 1991-1996, Thomas G. Lane.
-This file is part of the Independent JPEG Group's software.
-For conditions of distribution and use, see the accompanying README file.
-
-
-Since numerous people will be contributing code and bug fixes, it's important
-to establish a common coding style. The goal of using similar coding styles
-is much more important than the details of just what that style is.
-
-In general we follow the recommendations of "Recommended C Style and Coding
-Standards" revision 6.1 (Cannon et al. as modified by Spencer, Keppel and
-Brader). This document is available in the IJG FTP archive (see
-jpeg/doc/cstyle.ms.tbl.Z, or cstyle.txt.Z for those without nroff/tbl).
-
-Block comments should be laid out thusly:
-
-/*
- * Block comments in this style.
- */
-
-We indent statements in K&R style, e.g.,
- if (test) {
- then-part;
- } else {
- else-part;
- }
-with two spaces per indentation level. (This indentation convention is
-handled automatically by GNU Emacs and many other text editors.)
-
-Multi-word names should be written in lower case with underscores, e.g.,
-multi_word_name (not multiWordName). Preprocessor symbols and enum constants
-are similar but upper case (MULTI_WORD_NAME). Names should be unique within
-the first fifteen characters. (On some older systems, global names must be
-unique within six characters. We accommodate this without cluttering the
-source code by using macros to substitute shorter names.)
-
-We use function prototypes everywhere; we rely on automatic source code
-transformation to feed prototype-less C compilers. Transformation is done
-by the simple and portable tool 'ansi2knr.c' (courtesy of Ghostscript).
-ansi2knr is not very bright, so it imposes a format requirement on function
-declarations: the function name MUST BEGIN IN COLUMN 1. Thus all functions
-should be written in the following style:
-
-LOCAL(int *)
-function_name (int a, char *b)
-{
- code...
-}
-
-Note that each function definition must begin with GLOBAL(type), LOCAL(type),
-or METHODDEF(type). These macros expand to "static type" or just "type" as
-appropriate. They provide a readable indication of the routine's usage and
-can readily be changed for special needs. (For instance, special linkage
-keywords can be inserted for use in Windows DLLs.)
-
-ansi2knr does not transform method declarations (function pointers in
-structs). We handle these with a macro JMETHOD, defined as
- #ifdef HAVE_PROTOTYPES
- #define JMETHOD(type,methodname,arglist) type (*methodname) arglist
- #else
- #define JMETHOD(type,methodname,arglist) type (*methodname) ()
- #endif
-which is used like this:
- struct function_pointers {
- JMETHOD(void, init_entropy_encoder, (int somearg, jparms *jp));
- JMETHOD(void, term_entropy_encoder, (void));
- };
-Note the set of parentheses surrounding the parameter list.
-
-A similar solution is used for forward and external function declarations
-(see the EXTERN and JPP macros).
-
-If the code is to work on non-ANSI compilers, we cannot rely on a prototype
-declaration to coerce actual parameters into the right types. Therefore, use
-explicit casts on actual parameters whenever the actual parameter type is not
-identical to the formal parameter. Beware of implicit conversions to "int".
-
-It seems there are some non-ANSI compilers in which the sizeof() operator
-is defined to return int, yet size_t is defined as long. Needless to say,
-this is brain-damaged. Always use the SIZEOF() macro in place of sizeof(),
-so that the result is guaranteed to be of type size_t.
-
-
-The JPEG library is intended to be used within larger programs. Furthermore,
-we want it to be reentrant so that it can be used by applications that process
-multiple images concurrently. The following rules support these requirements:
-
-1. Avoid direct use of file I/O, "malloc", error report printouts, etc;
-pass these through the common routines provided.
-
-2. Minimize global namespace pollution. Functions should be declared static
-wherever possible. (Note that our method-based calling conventions help this
-a lot: in many modules only the initialization function will ever need to be
-called directly, so only that function need be externally visible.) All
-global function names should begin with "jpeg_", and should have an
-abbreviated name (unique in the first six characters) substituted by macro
-when NEED_SHORT_EXTERNAL_NAMES is set.
-
-3. Don't use global variables; anything that must be used in another module
-should be in the common data structures.
-
-4. Don't use static variables except for read-only constant tables. Variables
-that should be private to a module can be placed into private structures (see
-the system architecture document, structure.doc).
-
-5. Source file names should begin with "j" for files that are part of the
-library proper; source files that are not part of the library, such as cjpeg.c
-and djpeg.c, do not begin with "j". Keep source file names to eight
-characters (plus ".c" or ".h", etc) to make life easy for MS-DOSers. Keep
-compression and decompression code in separate source files --- some
-applications may want only one half of the library.
-
-Note: these rules (particularly #4) are not followed religiously in the
-modules that are used in cjpeg/djpeg but are not part of the JPEG library
-proper. Those modules are not really intended to be used in other
-applications.
diff --git a/src/3rdparty/libjpeg/coderules.txt b/src/3rdparty/libjpeg/coderules.txt
new file mode 100644
index 0000000000..357929fb44
--- /dev/null
+++ b/src/3rdparty/libjpeg/coderules.txt
@@ -0,0 +1,118 @@
+IJG JPEG LIBRARY: CODING RULES
+
+Copyright (C) 1991-1996, Thomas G. Lane.
+This file is part of the Independent JPEG Group's software.
+For conditions of distribution and use, see the accompanying README file.
+
+
+Since numerous people will be contributing code and bug fixes, it's important
+to establish a common coding style. The goal of using similar coding styles
+is much more important than the details of just what that style is.
+
+In general we follow the recommendations of "Recommended C Style and Coding
+Standards" revision 6.1 (Cannon et al. as modified by Spencer, Keppel and
+Brader). This document is available in the IJG FTP archive (see
+jpeg/doc/cstyle.ms.tbl.Z, or cstyle.txt.Z for those without nroff/tbl).
+
+Block comments should be laid out thusly:
+
+/*
+ * Block comments in this style.
+ */
+
+We indent statements in K&R style, e.g.,
+ if (test) {
+ then-part;
+ } else {
+ else-part;
+ }
+with two spaces per indentation level. (This indentation convention is
+handled automatically by GNU Emacs and many other text editors.)
+
+Multi-word names should be written in lower case with underscores, e.g.,
+multi_word_name (not multiWordName). Preprocessor symbols and enum constants
+are similar but upper case (MULTI_WORD_NAME). Names should be unique within
+the first fifteen characters. (On some older systems, global names must be
+unique within six characters. We accommodate this without cluttering the
+source code by using macros to substitute shorter names.)
+
+We use function prototypes everywhere; we rely on automatic source code
+transformation to feed prototype-less C compilers. Transformation is done
+by the simple and portable tool 'ansi2knr.c' (courtesy of Ghostscript).
+ansi2knr is not very bright, so it imposes a format requirement on function
+declarations: the function name MUST BEGIN IN COLUMN 1. Thus all functions
+should be written in the following style:
+
+LOCAL(int *)
+function_name (int a, char *b)
+{
+ code...
+}
+
+Note that each function definition must begin with GLOBAL(type), LOCAL(type),
+or METHODDEF(type). These macros expand to "static type" or just "type" as
+appropriate. They provide a readable indication of the routine's usage and
+can readily be changed for special needs. (For instance, special linkage
+keywords can be inserted for use in Windows DLLs.)
+
+ansi2knr does not transform method declarations (function pointers in
+structs). We handle these with a macro JMETHOD, defined as
+ #ifdef HAVE_PROTOTYPES
+ #define JMETHOD(type,methodname,arglist) type (*methodname) arglist
+ #else
+ #define JMETHOD(type,methodname,arglist) type (*methodname) ()
+ #endif
+which is used like this:
+ struct function_pointers {
+ JMETHOD(void, init_entropy_encoder, (int somearg, jparms *jp));
+ JMETHOD(void, term_entropy_encoder, (void));
+ };
+Note the set of parentheses surrounding the parameter list.
+
+A similar solution is used for forward and external function declarations
+(see the EXTERN and JPP macros).
+
+If the code is to work on non-ANSI compilers, we cannot rely on a prototype
+declaration to coerce actual parameters into the right types. Therefore, use
+explicit casts on actual parameters whenever the actual parameter type is not
+identical to the formal parameter. Beware of implicit conversions to "int".
+
+It seems there are some non-ANSI compilers in which the sizeof() operator
+is defined to return int, yet size_t is defined as long. Needless to say,
+this is brain-damaged. Always use the SIZEOF() macro in place of sizeof(),
+so that the result is guaranteed to be of type size_t.
+
+
+The JPEG library is intended to be used within larger programs. Furthermore,
+we want it to be reentrant so that it can be used by applications that process
+multiple images concurrently. The following rules support these requirements:
+
+1. Avoid direct use of file I/O, "malloc", error report printouts, etc;
+pass these through the common routines provided.
+
+2. Minimize global namespace pollution. Functions should be declared static
+wherever possible. (Note that our method-based calling conventions help this
+a lot: in many modules only the initialization function will ever need to be
+called directly, so only that function need be externally visible.) All
+global function names should begin with "jpeg_", and should have an
+abbreviated name (unique in the first six characters) substituted by macro
+when NEED_SHORT_EXTERNAL_NAMES is set.
+
+3. Don't use global variables; anything that must be used in another module
+should be in the common data structures.
+
+4. Don't use static variables except for read-only constant tables. Variables
+that should be private to a module can be placed into private structures (see
+the system architecture document, structure.txt).
+
+5. Source file names should begin with "j" for files that are part of the
+library proper; source files that are not part of the library, such as cjpeg.c
+and djpeg.c, do not begin with "j". Keep source file names to eight
+characters (plus ".c" or ".h", etc) to make life easy for MS-DOSers. Keep
+compression and decompression code in separate source files --- some
+applications may want only one half of the library.
+
+Note: these rules (particularly #4) are not followed religiously in the
+modules that are used in cjpeg/djpeg but are not part of the JPEG library
+proper. Those modules are not really intended to be used in other
+applications.
diff --git a/src/3rdparty/libjpeg/djpeg.1 b/src/3rdparty/libjpeg/djpeg.1
new file mode 100644
index 0000000000..f3722d1500
--- /dev/null
+++ b/src/3rdparty/libjpeg/djpeg.1
@@ -0,0 +1,252 @@
+.TH DJPEG 1 "3 October 2009"
+.SH NAME
+djpeg \- decompress a JPEG file to an image file
+.SH SYNOPSIS
+.B djpeg
+[
+.I options
+]
+[
+.I filename
+]
+.LP
+.SH DESCRIPTION
+.LP
+.B djpeg
+decompresses the named JPEG file, or the standard input if no file is named,
+and produces an image file on the standard output. PBMPLUS (PPM/PGM), BMP,
+GIF, Targa, or RLE (Utah Raster Toolkit) output format can be selected.
+(RLE is supported only if the URT library is available.)
+.SH OPTIONS
+All switch names may be abbreviated; for example,
+.B \-grayscale
+may be written
+.B \-gray
+or
+.BR \-gr .
+Most of the "basic" switches can be abbreviated to as little as one letter.
+Upper and lower case are equivalent (thus
+.B \-BMP
+is the same as
+.BR \-bmp ).
+British spellings are also accepted (e.g.,
+.BR \-greyscale ),
+though for brevity these are not mentioned below.
+.PP
+The basic switches are:
+.TP
+.BI \-colors " N"
+Reduce image to at most N colors. This reduces the number of colors used in
+the output image, so that it can be displayed on a colormapped display or
+stored in a colormapped file format. For example, if you have an 8-bit
+display, you'd need to reduce to 256 or fewer colors.
+.TP
+.BI \-quantize " N"
+Same as
+.BR \-colors .
+.B \-colors
+is the recommended name,
+.B \-quantize
+is provided only for backwards compatibility.
+.TP
+.B \-fast
+Select recommended processing options for fast, low quality output. (The
+default options are chosen for highest quality output.) Currently, this is
+equivalent to \fB\-dct fast \-nosmooth \-onepass \-dither ordered\fR.
+.TP
+.B \-grayscale
+Force gray-scale output even if JPEG file is color. Useful for viewing on
+monochrome displays; also,
+.B djpeg
+runs noticeably faster in this mode.
+.TP
+.BI \-scale " M/N"
+Scale the output image by a factor M/N. Currently supported scale factors are
+M/N with all M from 1 to 16, where N is the source DCT size, which is 8 for
+baseline JPEG. If the /N part is omitted, then M specifies the DCT scaled
+size to be applied on the given input. For baseline JPEG this is equivalent
+to M/8 scaling, since the source DCT size for baseline JPEG is 8.
+Scaling is handy if the image is larger than your screen; also,
+.B djpeg
+runs much faster when scaling down the output.
+.TP
+.B \-bmp
+Select BMP output format (Windows flavor). 8-bit colormapped format is
+emitted if
+.B \-colors
+or
+.B \-grayscale
+is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
+format is emitted.
+.TP
+.B \-gif
+Select GIF output format. Since GIF does not support more than 256 colors,
+.B \-colors 256
+is assumed (unless you specify a smaller number of colors).
+.TP
+.B \-os2
+Select BMP output format (OS/2 1.x flavor). 8-bit colormapped format is
+emitted if
+.B \-colors
+or
+.B \-grayscale
+is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
+format is emitted.
+.TP
+.B \-pnm
+Select PBMPLUS (PPM/PGM) output format (this is the default format).
+PGM is emitted if the JPEG file is gray-scale or if
+.B \-grayscale
+is specified; otherwise PPM is emitted.
+.TP
+.B \-rle
+Select RLE output format. (Requires URT library.)
+.TP
+.B \-targa
+Select Targa output format. Gray-scale format is emitted if the JPEG file is
+gray-scale or if
+.B \-grayscale
+is specified; otherwise, colormapped format is emitted if
+.B \-colors
+is specified; otherwise, 24-bit full-color format is emitted.
+.PP
+Switches for advanced users:
+.TP
+.B \-dct int
+Use integer DCT method (default).
+.TP
+.B \-dct fast
+Use fast integer DCT (less accurate).
+.TP
+.B \-dct float
+Use floating-point DCT method.
+The float method is very slightly more accurate than the int method, but is
+much slower unless your machine has very fast floating-point hardware. Also
+note that results of the floating-point method may vary slightly across
+machines, while the integer methods should give the same results everywhere.
+The fast integer method is much less accurate than the other two.
+.TP
+.B \-dither fs
+Use Floyd-Steinberg dithering in color quantization.
+.TP
+.B \-dither ordered
+Use ordered dithering in color quantization.
+.TP
+.B \-dither none
+Do not use dithering in color quantization.
+By default, Floyd-Steinberg dithering is applied when quantizing colors; this
+is slow but usually produces the best results. Ordered dither is a compromise
+between speed and quality; no dithering is fast but usually looks awful. Note
+that these switches have no effect unless color quantization is being done.
+Ordered dither is only available in
+.B \-onepass
+mode.
+.TP
+.BI \-map " file"
+Quantize to the colors used in the specified image file. This is useful for
+producing multiple files with identical color maps, or for forcing a
+predefined set of colors to be used. The
+.I file
+must be a GIF or PPM file. This option overrides
+.B \-colors
+and
+.BR \-onepass .
+.TP
+.B \-nosmooth
+Don't use high-quality upsampling.
+.TP
+.B \-onepass
+Use one-pass instead of two-pass color quantization. The one-pass method is
+faster and needs less memory, but it produces a lower-quality image.
+.B \-onepass
+is ignored unless you also say
+.B \-colors
+.IR N .
+Also, the one-pass method is always used for gray-scale output (the two-pass
+method is no improvement then).
+.TP
+.BI \-maxmemory " N"
+Set limit for amount of memory to use in processing large images. Value is
+in thousands of bytes, or millions of bytes if "M" is attached to the
+number. For example,
+.B \-max 4m
+selects 4000000 bytes. If more space is needed, temporary files will be used.
+.TP
+.BI \-outfile " name"
+Send output image to the named file, not to standard output.
+.TP
+.B \-verbose
+Enable debug printout. More
+.BR \-v 's
+give more output. Also, version information is printed at startup.
+.TP
+.B \-debug
+Same as
+.BR \-verbose .
+.SH EXAMPLES
+.LP
+This example decompresses the JPEG file foo.jpg, quantizes it to
+256 colors, and saves the output in 8-bit BMP format in foo.bmp:
+.IP
+.B djpeg \-colors 256 \-bmp
+.I foo.jpg
+.B >
+.I foo.bmp
+.SH HINTS
+To get a quick preview of an image, use the
+.B \-grayscale
+and/or
+.B \-scale
+switches.
+.B \-grayscale \-scale 1/8
+is the fastest case.
+.PP
+Several options are available that trade off image quality to gain speed.
+.B \-fast
+turns on the recommended settings.
+.PP
+.B \-dct fast
+and/or
+.B \-nosmooth
+gain speed at a small sacrifice in quality.
+When producing a color-quantized image,
+.B \-onepass \-dither ordered
+is fast but much lower quality than the default behavior.
+.B \-dither none
+may give acceptable results in two-pass mode, but is seldom tolerable in
+one-pass mode.
+.PP
+If you are fortunate enough to have very fast floating point hardware,
+\fB\-dct float\fR may be even faster than \fB\-dct fast\fR. But on most
+machines \fB\-dct float\fR is slower than \fB\-dct int\fR; in this case it is
+not worth using, because its theoretical accuracy advantage is too small to be
+significant in practice.
+.SH ENVIRONMENT
+.TP
+.B JPEGMEM
+If this environment variable is set, its value is the default memory limit.
+The value is specified as described for the
+.B \-maxmemory
+switch.
+.B JPEGMEM
+overrides the default value specified when the program was compiled, and
+itself is overridden by an explicit
+.BR \-maxmemory .
+.SH SEE ALSO
+.BR cjpeg (1),
+.BR jpegtran (1),
+.BR rdjpgcom (1),
+.BR wrjpgcom (1)
+.br
+.BR ppm (5),
+.BR pgm (5)
+.br
+Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
+Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
+.SH AUTHOR
+Independent JPEG Group
+.SH BUGS
+To avoid the Unisys LZW patent,
+.B djpeg
+produces uncompressed GIF files. These are larger than they should be, but
+are readable by standard GIF decoders.
diff --git a/src/3rdparty/libjpeg/example.c b/src/3rdparty/libjpeg/example.c
new file mode 100644
index 0000000000..1d6f6cc30b
--- /dev/null
+++ b/src/3rdparty/libjpeg/example.c
@@ -0,0 +1,433 @@
+/*
+ * example.c
+ *
+ * This file illustrates how to use the IJG code as a subroutine library
+ * to read or write JPEG image files. You should look at this code in
+ * conjunction with the documentation file libjpeg.txt.
+ *
+ * This code will not do anything useful as-is, but it may be helpful as a
+ * skeleton for constructing routines that call the JPEG library.
+ *
+ * We present these routines in the same coding style used in the JPEG code
+ * (ANSI function definitions, etc); but you are of course free to code your
+ * routines in a different style if you prefer.
+ */
+
+#include <stdio.h>
+
+/*
+ * Include file for users of JPEG library.
+ * You will need to have included system headers that define at least
+ * the typedefs FILE and size_t before you can include jpeglib.h.
+ * (stdio.h is sufficient on ANSI-conforming systems.)
+ * You may also wish to include "jerror.h".
+ */
+
+#include "jpeglib.h"
+
+/*
+ * <setjmp.h> is used for the optional error recovery mechanism shown in
+ * the second part of the example.
+ */
+
+#include <setjmp.h>
+
+
+
+/******************** JPEG COMPRESSION SAMPLE INTERFACE *******************/
+
+/* This half of the example shows how to feed data into the JPEG compressor.
+ * We present a minimal version that does not worry about refinements such
+ * as error recovery (the JPEG code will just exit() if it gets an error).
+ */
+
+
+/*
+ * IMAGE DATA FORMATS:
+ *
+ * The standard input image format is a rectangular array of pixels, with
+ * each pixel having the same number of "component" values (color channels).
+ * Each pixel row is an array of JSAMPLEs (which typically are unsigned chars).
+ * If you are working with color data, then the color values for each pixel
+ * must be adjacent in the row; for example, R,G,B,R,G,B,R,G,B,... for 24-bit
+ * RGB color.
+ *
+ * For this example, we'll assume that this data structure matches the way
+ * our application has stored the image in memory, so we can just pass a
+ * pointer to our image buffer. In particular, let's say that the image is
+ * RGB color and is described by:
+ */
+
+extern JSAMPLE * image_buffer; /* Points to large array of R,G,B-order data */
+extern int image_height; /* Number of rows in image */
+extern int image_width; /* Number of columns in image */
+
+
+/*
+ * Sample routine for JPEG compression. We assume that the target file name
+ * and a compression quality factor are passed in.
+ */
+
+GLOBAL(void)
+write_JPEG_file (char * filename, int quality)
+{
+ /* This struct contains the JPEG compression parameters and pointers to
+ * working space (which is allocated as needed by the JPEG library).
+ * It is possible to have several such structures, representing multiple
+ * compression/decompression processes, in existence at once. We refer
+ * to any one struct (and its associated working data) as a "JPEG object".
+ */
+ struct jpeg_compress_struct cinfo;
+ /* This struct represents a JPEG error handler. It is declared separately
+ * because applications often want to supply a specialized error handler
+ * (see the second half of this file for an example). But here we just
+ * take the easy way out and use the standard error handler, which will
+ * print a message on stderr and call exit() if compression fails.
+ * Note that this struct must live as long as the main JPEG parameter
+ * struct, to avoid dangling-pointer problems.
+ */
+ struct jpeg_error_mgr jerr;
+ /* More stuff */
+ FILE * outfile; /* target file */
+ JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */
+ int row_stride; /* physical row width in image buffer */
+
+ /* Step 1: allocate and initialize JPEG compression object */
+
+ /* We have to set up the error handler first, in case the initialization
+ * step fails. (Unlikely, but it could happen if you are out of memory.)
+ * This routine fills in the contents of struct jerr, and returns jerr's
+ * address which we place into the link field in cinfo.
+ */
+ cinfo.err = jpeg_std_error(&jerr);
+ /* Now we can initialize the JPEG compression object. */
+ jpeg_create_compress(&cinfo);
+
+ /* Step 2: specify data destination (eg, a file) */
+ /* Note: steps 2 and 3 can be done in either order. */
+
+ /* Here we use the library-supplied code to send compressed data to a
+ * stdio stream. You can also write your own code to do something else.
+ * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that
+ * requires it in order to write binary files.
+ */
+ if ((outfile = fopen(filename, "wb")) == NULL) {
+ fprintf(stderr, "can't open %s\n", filename);
+ exit(1);
+ }
+ jpeg_stdio_dest(&cinfo, outfile);
+
+ /* Step 3: set parameters for compression */
+
+ /* First we supply a description of the input image.
+ * Four fields of the cinfo struct must be filled in:
+ */
+ cinfo.image_width = image_width; /* image width and height, in pixels */
+ cinfo.image_height = image_height;
+ cinfo.input_components = 3; /* # of color components per pixel */
+ cinfo.in_color_space = JCS_RGB; /* colorspace of input image */
+ /* Now use the library's routine to set default compression parameters.
+ * (You must set at least cinfo.in_color_space before calling this,
+ * since the defaults depend on the source color space.)
+ */
+ jpeg_set_defaults(&cinfo);
+ /* Now you can set any non-default parameters you wish to.
+ * Here we just illustrate the use of quality (quantization table) scaling:
+ */
+ jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */);
+
+ /* Step 4: Start compressor */
+
+ /* TRUE ensures that we will write a complete interchange-JPEG file.
+ * Pass TRUE unless you are very sure of what you're doing.
+ */
+ jpeg_start_compress(&cinfo, TRUE);
+
+ /* Step 5: while (scan lines remain to be written) */
+ /* jpeg_write_scanlines(...); */
+
+ /* Here we use the library's state variable cinfo.next_scanline as the
+ * loop counter, so that we don't have to keep track ourselves.
+ * To keep things simple, we pass one scanline per call; you can pass
+ * more if you wish, though.
+ */
+ row_stride = image_width * 3; /* JSAMPLEs per row in image_buffer */
+
+ while (cinfo.next_scanline < cinfo.image_height) {
+ /* jpeg_write_scanlines expects an array of pointers to scanlines.
+ * Here the array is only one element long, but you could pass
+ * more than one scanline at a time if that's more convenient.
+ */
+ row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride];
+ (void) jpeg_write_scanlines(&cinfo, row_pointer, 1);
+ }
+
+ /* Step 6: Finish compression */
+
+ jpeg_finish_compress(&cinfo);
+ /* After finish_compress, we can close the output file. */
+ fclose(outfile);
+
+ /* Step 7: release JPEG compression object */
+
+ /* This is an important step since it will release a good deal of memory. */
+ jpeg_destroy_compress(&cinfo);
+
+ /* And we're done! */
+}
+
+
+/*
+ * SOME FINE POINTS:
+ *
+ * In the above loop, we ignored the return value of jpeg_write_scanlines,
+ * which is the number of scanlines actually written. We could get away
+ * with this because we were only relying on the value of cinfo.next_scanline,
+ * which will be incremented correctly. If you maintain additional loop
+ * variables then you should be careful to increment them properly.
+ * Actually, for output to a stdio stream you needn't worry, because
+ * then jpeg_write_scanlines will write all the lines passed (or else exit
+ * with a fatal error). Partial writes can only occur if you use a data
+ * destination module that can demand suspension of the compressor.
+ * (If you don't know what that's for, you don't need it.)
+ *
+ * If the compressor requires full-image buffers (for entropy-coding
+ * optimization or a multi-scan JPEG file), it will create temporary
+ * files for anything that doesn't fit within the maximum-memory setting.
+ * (Note that temp files are NOT needed if you use the default parameters.)
+ * On some systems you may need to set up a signal handler to ensure that
+ * temporary files are deleted if the program is interrupted. See libjpeg.txt.
+ *
+ * Scanlines MUST be supplied in top-to-bottom order if you want your JPEG
+ * files to be compatible with everyone else's. If you cannot readily read
+ * your data in that order, you'll need an intermediate array to hold the
+ * image. See rdtarga.c or rdbmp.c for examples of handling bottom-to-top
+ * source data using the JPEG code's internal virtual-array mechanisms.
+ */
+
+
+
+/******************** JPEG DECOMPRESSION SAMPLE INTERFACE *******************/
+
+/* This half of the example shows how to read data from the JPEG decompressor.
+ * It's a bit more refined than the above, in that we show:
+ * (a) how to modify the JPEG library's standard error-reporting behavior;
+ * (b) how to allocate workspace using the library's memory manager.
+ *
+ * Just to make this example a little different from the first one, we'll
+ * assume that we do not intend to put the whole image into an in-memory
+ * buffer, but to send it line-by-line someplace else. We need a one-
+ * scanline-high JSAMPLE array as a work buffer, and we will let the JPEG
+ * memory manager allocate it for us. This approach is actually quite useful
+ * because we don't need to remember to deallocate the buffer separately: it
+ * will go away automatically when the JPEG object is cleaned up.
+ */
+
+
+/*
+ * ERROR HANDLING:
+ *
+ * The JPEG library's standard error handler (jerror.c) is divided into
+ * several "methods" which you can override individually. This lets you
+ * adjust the behavior without duplicating a lot of code, which you might
+ * have to update with each future release.
+ *
+ * Our example here shows how to override the "error_exit" method so that
+ * control is returned to the library's caller when a fatal error occurs,
+ * rather than calling exit() as the standard error_exit method does.
+ *
+ * We use C's setjmp/longjmp facility to return control. This means that the
+ * routine which calls the JPEG library must first execute a setjmp() call to
+ * establish the return point. We want the replacement error_exit to do a
+ * longjmp(). But we need to make the setjmp buffer accessible to the
+ * error_exit routine. To do this, we make a private extension of the
+ * standard JPEG error handler object. (If we were using C++, we'd say we
+ * were making a subclass of the regular error handler.)
+ *
+ * Here's the extended error handler struct:
+ */
+
+struct my_error_mgr {
+ struct jpeg_error_mgr pub; /* "public" fields */
+
+ jmp_buf setjmp_buffer; /* for return to caller */
+};
+
+typedef struct my_error_mgr * my_error_ptr;
+
+/*
+ * Here's the routine that will replace the standard error_exit method:
+ */
+
+METHODDEF(void)
+my_error_exit (j_common_ptr cinfo)
+{
+ /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */
+ my_error_ptr myerr = (my_error_ptr) cinfo->err;
+
+ /* Always display the message. */
+ /* We could postpone this until after returning, if we chose. */
+ (*cinfo->err->output_message) (cinfo);
+
+ /* Return control to the setjmp point */
+ longjmp(myerr->setjmp_buffer, 1);
+}
+
+
+/*
+ * Sample routine for JPEG decompression. We assume that the source file name
+ * is passed in. We want to return 1 on success, 0 on error.
+ */
+
+
+GLOBAL(int)
+read_JPEG_file (char * filename)
+{
+ /* This struct contains the JPEG decompression parameters and pointers to
+ * working space (which is allocated as needed by the JPEG library).
+ */
+ struct jpeg_decompress_struct cinfo;
+ /* We use our private extension JPEG error handler.
+ * Note that this struct must live as long as the main JPEG parameter
+ * struct, to avoid dangling-pointer problems.
+ */
+ struct my_error_mgr jerr;
+ /* More stuff */
+ FILE * infile; /* source file */
+ JSAMPARRAY buffer; /* Output row buffer */
+ int row_stride; /* physical row width in output buffer */
+
+ /* In this example we want to open the input file before doing anything else,
+ * so that the setjmp() error recovery below can assume the file is open.
+ * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that
+ * requires it in order to read binary files.
+ */
+
+ if ((infile = fopen(filename, "rb")) == NULL) {
+ fprintf(stderr, "can't open %s\n", filename);
+ return 0;
+ }
+
+ /* Step 1: allocate and initialize JPEG decompression object */
+
+ /* We set up the normal JPEG error routines, then override error_exit. */
+ cinfo.err = jpeg_std_error(&jerr.pub);
+ jerr.pub.error_exit = my_error_exit;
+ /* Establish the setjmp return context for my_error_exit to use. */
+ if (setjmp(jerr.setjmp_buffer)) {
+ /* If we get here, the JPEG code has signaled an error.
+ * We need to clean up the JPEG object, close the input file, and return.
+ */
+ jpeg_destroy_decompress(&cinfo);
+ fclose(infile);
+ return 0;
+ }
+ /* Now we can initialize the JPEG decompression object. */
+ jpeg_create_decompress(&cinfo);
+
+ /* Step 2: specify data source (eg, a file) */
+
+ jpeg_stdio_src(&cinfo, infile);
+
+ /* Step 3: read file parameters with jpeg_read_header() */
+
+ (void) jpeg_read_header(&cinfo, TRUE);
+ /* We can ignore the return value from jpeg_read_header since
+ * (a) suspension is not possible with the stdio data source, and
+ * (b) we passed TRUE to reject a tables-only JPEG file as an error.
+ * See libjpeg.txt for more info.
+ */
+
+ /* Step 4: set parameters for decompression */
+
+ /* In this example, we don't need to change any of the defaults set by
+ * jpeg_read_header(), so we do nothing here.
+ */
+
+ /* Step 5: Start decompressor */
+
+ (void) jpeg_start_decompress(&cinfo);
+ /* We can ignore the return value since suspension is not possible
+ * with the stdio data source.
+ */
+
+ /* We may need to do some setup of our own at this point before reading
+ * the data. After jpeg_start_decompress() we have the correct scaled
+ * output image dimensions available, as well as the output colormap
+ * if we asked for color quantization.
+ * In this example, we need to make an output work buffer of the right size.
+ */
+ /* JSAMPLEs per row in output buffer */
+ row_stride = cinfo.output_width * cinfo.output_components;
+ /* Make a one-row-high sample array that will go away when done with image */
+ buffer = (*cinfo.mem->alloc_sarray)
+ ((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1);
+
+ /* Step 6: while (scan lines remain to be read) */
+ /* jpeg_read_scanlines(...); */
+
+ /* Here we use the library's state variable cinfo.output_scanline as the
+ * loop counter, so that we don't have to keep track ourselves.
+ */
+ while (cinfo.output_scanline < cinfo.output_height) {
+ /* jpeg_read_scanlines expects an array of pointers to scanlines.
+ * Here the array is only one element long, but you could ask for
+ * more than one scanline at a time if that's more convenient.
+ */
+ (void) jpeg_read_scanlines(&cinfo, buffer, 1);
+ /* Assume put_scanline_someplace wants a pointer and sample count. */
+ put_scanline_someplace(buffer[0], row_stride);
+ }
+
+ /* Step 7: Finish decompression */
+
+ (void) jpeg_finish_decompress(&cinfo);
+ /* We can ignore the return value since suspension is not possible
+ * with the stdio data source.
+ */
+
+ /* Step 8: Release JPEG decompression object */
+
+ /* This is an important step since it will release a good deal of memory. */
+ jpeg_destroy_decompress(&cinfo);
+
+ /* After finish_decompress, we can close the input file.
+ * Here we postpone it until after no more JPEG errors are possible,
+ * so as to simplify the setjmp error logic above. (Actually, I don't
+ * think that jpeg_destroy can do an error exit, but why assume anything...)
+ */
+ fclose(infile);
+
+ /* At this point you may want to check to see whether any corrupt-data
+ * warnings occurred (test whether jerr.pub.num_warnings is nonzero).
+ */
+
+ /* And we're done! */
+ return 1;
+}
+
+
+/*
+ * SOME FINE POINTS:
+ *
+ * In the above code, we ignored the return value of jpeg_read_scanlines,
+ * which is the number of scanlines actually read. We could get away with
+ * this because we asked for only one line at a time and we weren't using
+ * a suspending data source. See libjpeg.txt for more info.
+ *
+ * We cheated a bit by calling alloc_sarray() after jpeg_start_decompress();
+ * we should have done it beforehand to ensure that the space would be
+ * counted against the JPEG max_memory setting. In some systems the above
+ * code would risk an out-of-memory error. However, in general we don't
+ * know the output image dimensions before jpeg_start_decompress(), unless we
+ * call jpeg_calc_output_dimensions(). See libjpeg.txt for more about this.
+ *
+ * Scanlines are returned in the same order as they appear in the JPEG file,
+ * which is standardly top-to-bottom. If you must emit data bottom-to-top,
+ * you can use one of the virtual arrays provided by the JPEG memory manager
+ * to invert the data. See wrbmp.c for an example.
+ *
+ * As with compression, some operating modes may require temporary files.
+ * On some systems you may need to set up a signal handler to ensure that
+ * temporary files are deleted if the program is interrupted. See libjpeg.txt.
+ */
diff --git a/src/3rdparty/libjpeg/filelist.doc b/src/3rdparty/libjpeg/filelist.doc
deleted file mode 100644
index e14982ca55..0000000000
--- a/src/3rdparty/libjpeg/filelist.doc
+++ /dev/null
@@ -1,210 +0,0 @@
-IJG JPEG LIBRARY: FILE LIST
-
-Copyright (C) 1994-1998, Thomas G. Lane.
-This file is part of the Independent JPEG Group's software.
-For conditions of distribution and use, see the accompanying README file.
-
-
-Here is a road map to the files in the IJG JPEG distribution. The
-distribution includes the JPEG library proper, plus two application
-programs ("cjpeg" and "djpeg") which use the library to convert JPEG
-files to and from some other popular image formats. A third application
-"jpegtran" uses the library to do lossless conversion between different
-variants of JPEG. There are also two stand-alone applications,
-"rdjpgcom" and "wrjpgcom".
-
-
-THE JPEG LIBRARY
-================
-
-Include files:
-
-jpeglib.h JPEG library's exported data and function declarations.
-jconfig.h Configuration declarations. Note: this file is not present
- in the distribution; it is generated during installation.
-jmorecfg.h Additional configuration declarations; need not be changed
- for a standard installation.
-jerror.h Declares JPEG library's error and trace message codes.
-jinclude.h Central include file used by all IJG .c files to reference
- system include files.
-jpegint.h JPEG library's internal data structures.
-jchuff.h Private declarations for Huffman encoder modules.
-jdhuff.h Private declarations for Huffman decoder modules.
-jdct.h Private declarations for forward & reverse DCT subsystems.
-jmemsys.h Private declarations for memory management subsystem.
-jversion.h Version information.
-
-Applications using the library should include jpeglib.h (which in turn
-includes jconfig.h and jmorecfg.h). Optionally, jerror.h may be included
-if the application needs to reference individual JPEG error codes. The
-other include files are intended for internal use and would not normally
-be included by an application program. (cjpeg/djpeg/etc do use jinclude.h,
-since its function is to improve portability of the whole IJG distribution.
-Most other applications will directly include the system include files they
-want, and hence won't need jinclude.h.)
-
-
-C source code files:
-
-These files contain most of the functions intended to be called directly by
-an application program:
-
-jcapimin.c Application program interface: core routines for compression.
-jcapistd.c Application program interface: standard compression.
-jdapimin.c Application program interface: core routines for decompression.
-jdapistd.c Application program interface: standard decompression.
-jcomapi.c Application program interface routines common to compression
- and decompression.
-jcparam.c Compression parameter setting helper routines.
-jctrans.c API and library routines for transcoding compression.
-jdtrans.c API and library routines for transcoding decompression.
-
-Compression side of the library:
-
-jcinit.c Initialization: determines which other modules to use.
-jcmaster.c Master control: setup and inter-pass sequencing logic.
-jcmainct.c Main buffer controller (preprocessor => JPEG compressor).
-jcprepct.c Preprocessor buffer controller.
-jccoefct.c Buffer controller for DCT coefficient buffer.
-jccolor.c Color space conversion.
-jcsample.c Downsampling.
-jcdctmgr.c DCT manager (DCT implementation selection & control).
-jfdctint.c Forward DCT using slow-but-accurate integer method.
-jfdctfst.c Forward DCT using faster, less accurate integer method.
-jfdctflt.c Forward DCT using floating-point arithmetic.
-jchuff.c Huffman entropy coding for sequential JPEG.
-jcphuff.c Huffman entropy coding for progressive JPEG.
-jcmarker.c JPEG marker writing.
-jdatadst.c Data destination manager for stdio output.
-
-Decompression side of the library:
-
-jdmaster.c Master control: determines which other modules to use.
-jdinput.c Input controller: controls input processing modules.
-jdmainct.c Main buffer controller (JPEG decompressor => postprocessor).
-jdcoefct.c Buffer controller for DCT coefficient buffer.
-jdpostct.c Postprocessor buffer controller.
-jdmarker.c JPEG marker reading.
-jdhuff.c Huffman entropy decoding for sequential JPEG.
-jdphuff.c Huffman entropy decoding for progressive JPEG.
-jddctmgr.c IDCT manager (IDCT implementation selection & control).
-jidctint.c Inverse DCT using slow-but-accurate integer method.
-jidctfst.c Inverse DCT using faster, less accurate integer method.
-jidctflt.c Inverse DCT using floating-point arithmetic.
-jidctred.c Inverse DCTs with reduced-size outputs.
-jdsample.c Upsampling.
-jdcolor.c Color space conversion.
-jdmerge.c Merged upsampling/color conversion (faster, lower quality).
-jquant1.c One-pass color quantization using a fixed-spacing colormap.
-jquant2.c Two-pass color quantization using a custom-generated colormap.
- Also handles one-pass quantization to an externally given map.
-jdatasrc.c Data source manager for stdio input.
-
-Support files for both compression and decompression:
-
-jerror.c Standard error handling routines (application replaceable).
-jmemmgr.c System-independent (more or less) memory management code.
-jutils.c Miscellaneous utility routines.
-
-jmemmgr.c relies on a system-dependent memory management module. The IJG
-distribution includes the following implementations of the system-dependent
-module:
-
-jmemnobs.c "No backing store": assumes adequate virtual memory exists.
-jmemansi.c Makes temporary files with ANSI-standard routine tmpfile().
-jmemname.c Makes temporary files with program-generated file names.
-jmemdos.c Custom implementation for MS-DOS (16-bit environment only):
- can use extended and expanded memory as well as temp files.
-jmemmac.c Custom implementation for Apple Macintosh.
-
-Exactly one of the system-dependent modules should be configured into an
-installed JPEG library (see install.doc for hints about which one to use).
-On unusual systems you may find it worthwhile to make a special
-system-dependent memory manager.
-
-
-Non-C source code files:
-
-jmemdosa.asm 80x86 assembly code support for jmemdos.c; used only in
- MS-DOS-specific configurations of the JPEG library.
-
-
-CJPEG/DJPEG/JPEGTRAN
-====================
-
-Include files:
-
-cdjpeg.h Declarations shared by cjpeg/djpeg/jpegtran modules.
-cderror.h Additional error and trace message codes for cjpeg et al.
-transupp.h Declarations for jpegtran support routines in transupp.c.
-
-C source code files:
-
-cjpeg.c Main program for cjpeg.
-djpeg.c Main program for djpeg.
-jpegtran.c Main program for jpegtran.
-cdjpeg.c Utility routines used by all three programs.
-rdcolmap.c Code to read a colormap file for djpeg's "-map" switch.
-rdswitch.c Code to process some of cjpeg's more complex switches.
- Also used by jpegtran.
-transupp.c Support code for jpegtran: lossless image manipulations.
-
-Image file reader modules for cjpeg:
-
-rdbmp.c BMP file input.
-rdgif.c GIF file input (now just a stub).
-rdppm.c PPM/PGM file input.
-rdrle.c Utah RLE file input.
-rdtarga.c Targa file input.
-
-Image file writer modules for djpeg:
-
-wrbmp.c BMP file output.
-wrgif.c GIF file output (a mere shadow of its former self).
-wrppm.c PPM/PGM file output.
-wrrle.c Utah RLE file output.
-wrtarga.c Targa file output.
-
-
-RDJPGCOM/WRJPGCOM
-=================
-
-C source code files:
-
-rdjpgcom.c Stand-alone rdjpgcom application.
-wrjpgcom.c Stand-alone wrjpgcom application.
-
-These programs do not depend on the IJG library. They do use
-jconfig.h and jinclude.h, only to improve portability.
-
-
-ADDITIONAL FILES
-================
-
-Documentation (see README for a guide to the documentation files):
-
-README Master documentation file.
-*.doc Other documentation files.
-*.1 Documentation in Unix man page format.
-change.log Version-to-version change highlights.
-example.c Sample code for calling JPEG library.
-
-Configuration/installation files and programs (see install.doc for more info):
-
-configure Unix shell script to perform automatic configuration.
-ltconfig Support scripts for configure (from GNU libtool).
-ltmain.sh
-config.guess
-config.sub
-install-sh Install shell script for those Unix systems lacking one.
-ckconfig.c Program to generate jconfig.h on non-Unix systems.
-jconfig.doc Template for making jconfig.h by hand.
-makefile.* Sample makefiles for particular systems.
-jconfig.* Sample jconfig.h for particular systems.
-ansi2knr.c De-ANSIfier for pre-ANSI C compilers (courtesy of
- L. Peter Deutsch and Aladdin Enterprises).
-
-Test files (see install.doc for test procedure):
-
-test*.* Source and comparison files for confidence test.
- These are binary image files, NOT text files.
diff --git a/src/3rdparty/libjpeg/filelist.txt b/src/3rdparty/libjpeg/filelist.txt
new file mode 100644
index 0000000000..7e053869a6
--- /dev/null
+++ b/src/3rdparty/libjpeg/filelist.txt
@@ -0,0 +1,215 @@
+IJG JPEG LIBRARY: FILE LIST
+
+Copyright (C) 1994-2009, Thomas G. Lane, Guido Vollbeding.
+This file is part of the Independent JPEG Group's software.
+For conditions of distribution and use, see the accompanying README file.
+
+
+Here is a road map to the files in the IJG JPEG distribution. The
+distribution includes the JPEG library proper, plus two application
+programs ("cjpeg" and "djpeg") which use the library to convert JPEG
+files to and from some other popular image formats. A third application
+"jpegtran" uses the library to do lossless conversion between different
+variants of JPEG. There are also two stand-alone applications,
+"rdjpgcom" and "wrjpgcom".
+
+
+THE JPEG LIBRARY
+================
+
+Include files:
+
+jpeglib.h JPEG library's exported data and function declarations.
+jconfig.h Configuration declarations. Note: this file is not present
+ in the distribution; it is generated during installation.
+jmorecfg.h Additional configuration declarations; need not be changed
+ for a standard installation.
+jerror.h Declares JPEG library's error and trace message codes.
+jinclude.h Central include file used by all IJG .c files to reference
+ system include files.
+jpegint.h JPEG library's internal data structures.
+jdct.h Private declarations for forward & reverse DCT subsystems.
+jmemsys.h Private declarations for memory management subsystem.
+jversion.h Version information.
+
+Applications using the library should include jpeglib.h (which in turn
+includes jconfig.h and jmorecfg.h). Optionally, jerror.h may be included
+if the application needs to reference individual JPEG error codes. The
+other include files are intended for internal use and would not normally
+be included by an application program. (cjpeg/djpeg/etc do use jinclude.h,
+since its function is to improve portability of the whole IJG distribution.
+Most other applications will directly include the system include files they
+want, and hence won't need jinclude.h.)
+
+
+C source code files:
+
+These files contain most of the functions intended to be called directly by
+an application program:
+
+jcapimin.c Application program interface: core routines for compression.
+jcapistd.c Application program interface: standard compression.
+jdapimin.c Application program interface: core routines for decompression.
+jdapistd.c Application program interface: standard decompression.
+jcomapi.c Application program interface routines common to compression
+ and decompression.
+jcparam.c Compression parameter setting helper routines.
+jctrans.c API and library routines for transcoding compression.
+jdtrans.c API and library routines for transcoding decompression.
+
+Compression side of the library:
+
+jcinit.c Initialization: determines which other modules to use.
+jcmaster.c Master control: setup and inter-pass sequencing logic.
+jcmainct.c Main buffer controller (preprocessor => JPEG compressor).
+jcprepct.c Preprocessor buffer controller.
+jccoefct.c Buffer controller for DCT coefficient buffer.
+jccolor.c Color space conversion.
+jcsample.c Downsampling.
+jcdctmgr.c DCT manager (DCT implementation selection & control).
+jfdctint.c Forward DCT using slow-but-accurate integer method.
+jfdctfst.c Forward DCT using faster, less accurate integer method.
+jfdctflt.c Forward DCT using floating-point arithmetic.
+jchuff.c Huffman entropy coding.
+jcarith.c Arithmetic entropy coding.
+jcmarker.c JPEG marker writing.
+jdatadst.c Data destination managers for memory and stdio output.
+
+Decompression side of the library:
+
+jdmaster.c Master control: determines which other modules to use.
+jdinput.c Input controller: controls input processing modules.
+jdmainct.c Main buffer controller (JPEG decompressor => postprocessor).
+jdcoefct.c Buffer controller for DCT coefficient buffer.
+jdpostct.c Postprocessor buffer controller.
+jdmarker.c JPEG marker reading.
+jdhuff.c Huffman entropy decoding.
+jdarith.c Arithmetic entropy decoding.
+jddctmgr.c IDCT manager (IDCT implementation selection & control).
+jidctint.c Inverse DCT using slow-but-accurate integer method.
+jidctfst.c Inverse DCT using faster, less accurate integer method.
+jidctflt.c Inverse DCT using floating-point arithmetic.
+jdsample.c Upsampling.
+jdcolor.c Color space conversion.
+jdmerge.c Merged upsampling/color conversion (faster, lower quality).
+jquant1.c One-pass color quantization using a fixed-spacing colormap.
+jquant2.c Two-pass color quantization using a custom-generated colormap.
+ Also handles one-pass quantization to an externally given map.
+jdatasrc.c Data source managers for memory and stdio input.
+
+Support files for both compression and decompression:
+
+jaricom.c Tables for common use in arithmetic entropy encoding and
+ decoding routines.
+jerror.c Standard error handling routines (application replaceable).
+jmemmgr.c System-independent (more or less) memory management code.
+jutils.c Miscellaneous utility routines.
+
+jmemmgr.c relies on a system-dependent memory management module. The IJG
+distribution includes the following implementations of the system-dependent
+module:
+
+jmemnobs.c "No backing store": assumes adequate virtual memory exists.
+jmemansi.c Makes temporary files with ANSI-standard routine tmpfile().
+jmemname.c Makes temporary files with program-generated file names.
+jmemdos.c Custom implementation for MS-DOS (16-bit environment only):
+ can use extended and expanded memory as well as temp files.
+jmemmac.c Custom implementation for Apple Macintosh.
+
+Exactly one of the system-dependent modules should be configured into an
+installed JPEG library (see install.txt for hints about which one to use).
+On unusual systems you may find it worthwhile to make a special
+system-dependent memory manager.
+
+
+Non-C source code files:
+
+jmemdosa.asm 80x86 assembly code support for jmemdos.c; used only in
+ MS-DOS-specific configurations of the JPEG library.
+
+
+CJPEG/DJPEG/JPEGTRAN
+====================
+
+Include files:
+
+cdjpeg.h Declarations shared by cjpeg/djpeg/jpegtran modules.
+cderror.h Additional error and trace message codes for cjpeg et al.
+transupp.h Declarations for jpegtran support routines in transupp.c.
+
+C source code files:
+
+cjpeg.c Main program for cjpeg.
+djpeg.c Main program for djpeg.
+jpegtran.c Main program for jpegtran.
+cdjpeg.c Utility routines used by all three programs.
+rdcolmap.c Code to read a colormap file for djpeg's "-map" switch.
+rdswitch.c Code to process some of cjpeg's more complex switches.
+ Also used by jpegtran.
+transupp.c Support code for jpegtran: lossless image manipulations.
+
+Image file reader modules for cjpeg:
+
+rdbmp.c BMP file input.
+rdgif.c GIF file input (now just a stub).
+rdppm.c PPM/PGM file input.
+rdrle.c Utah RLE file input.
+rdtarga.c Targa file input.
+
+Image file writer modules for djpeg:
+
+wrbmp.c BMP file output.
+wrgif.c GIF file output (a mere shadow of its former self).
+wrppm.c PPM/PGM file output.
+wrrle.c Utah RLE file output.
+wrtarga.c Targa file output.
+
+
+RDJPGCOM/WRJPGCOM
+=================
+
+C source code files:
+
+rdjpgcom.c Stand-alone rdjpgcom application.
+wrjpgcom.c Stand-alone wrjpgcom application.
+
+These programs do not depend on the IJG library. They do use
+jconfig.h and jinclude.h, only to improve portability.
+
+
+ADDITIONAL FILES
+================
+
+Documentation (see README for a guide to the documentation files):
+
+README Master documentation file.
+*.txt Other documentation files.
+*.1 Documentation in Unix man page format.
+change.log Version-to-version change highlights.
+example.c Sample code for calling JPEG library.
+
+Configuration/installation files and programs (see install.txt for more info):
+
+configure Unix shell script to perform automatic configuration.
+configure.ac Source file for use with Autoconf to generate configure.
+ltmain.sh Support scripts for configure (from GNU libtool).
+config.guess
+config.sub
+depcomp
+missing
+install-sh Install shell script for those Unix systems lacking one.
+Makefile.in Makefile input for configure.
+Makefile.am Source file for use with Automake to generate Makefile.in.
+ckconfig.c Program to generate jconfig.h on non-Unix systems.
+jconfig.txt Template for making jconfig.h by hand.
+mak*.* Sample makefiles for particular systems.
+jconfig.* Sample jconfig.h for particular systems.
+libjpeg.map Script to generate shared library with versioned symbols.
+aclocal.m4 M4 macro definitions for use with Autoconf.
+ansi2knr.c De-ANSIfier for pre-ANSI C compilers (courtesy of
+ L. Peter Deutsch and Aladdin Enterprises).
+
+Test files (see install.txt for test procedure):
+
+test*.* Source and comparison files for confidence test.
+ These are binary image files, NOT text files.
diff --git a/src/3rdparty/libjpeg/install.doc b/src/3rdparty/libjpeg/install.doc
deleted file mode 100644
index 3702b986b6..0000000000
--- a/src/3rdparty/libjpeg/install.doc
+++ /dev/null
@@ -1,1063 +0,0 @@
-INSTALLATION INSTRUCTIONS for the Independent JPEG Group's JPEG software
-
-Copyright (C) 1991-1998, Thomas G. Lane.
-This file is part of the Independent JPEG Group's software.
-For conditions of distribution and use, see the accompanying README file.
-
-
-This file explains how to configure and install the IJG software. We have
-tried to make this software extremely portable and flexible, so that it can be
-adapted to almost any environment. The downside of this decision is that the
-installation process is complicated. We have provided shortcuts to simplify
-the task on common systems. But in any case, you will need at least a little
-familiarity with C programming and program build procedures for your system.
-
-If you are only using this software as part of a larger program, the larger
-program's installation procedure may take care of configuring the IJG code.
-For example, Ghostscript's installation script will configure the IJG code.
-You don't need to read this file if you just want to compile Ghostscript.
-
-If you are on a Unix machine, you may not need to read this file at all.
-Try doing
- ./configure
- make
- make test
-If that doesn't complain, do
- make install
-(better do "make -n install" first to see if the makefile will put the files
-where you want them). Read further if you run into snags or want to customize
-the code for your system.
-
-
-TABLE OF CONTENTS
------------------
-
-Before you start
-Configuring the software:
- using the automatic "configure" script
- using one of the supplied jconfig and makefile files
- by hand
-Building the software
-Testing the software
-Installing the software
-Optional stuff
-Optimization
-Hints for specific systems
-
-
-BEFORE YOU START
-================
-
-Before installing the software you must unpack the distributed source code.
-Since you are reading this file, you have probably already succeeded in this
-task. However, there is a potential for error if you needed to convert the
-files to the local standard text file format (for example, if you are on
-MS-DOS you may have converted LF end-of-line to CR/LF). You must apply
-such conversion to all the files EXCEPT those whose names begin with "test".
-The test files contain binary data; if you change them in any way then the
-self-test will give bad results.
-
-Please check the last section of this file to see if there are hints for the
-specific machine or compiler you are using.
-
-
-CONFIGURING THE SOFTWARE
-========================
-
-To configure the IJG code for your system, you need to create two files:
- * jconfig.h: contains values for system-dependent #define symbols.
- * Makefile: controls the compilation process.
-(On a non-Unix machine, you may create "project files" or some other
-substitute for a Makefile. jconfig.h is needed in any environment.)
-
-We provide three different ways to generate these files:
- * On a Unix system, you can just run the "configure" script.
- * We provide sample jconfig files and makefiles for popular machines;
- if your machine matches one of the samples, just copy the right sample
- files to jconfig.h and Makefile.
- * If all else fails, read the instructions below and make your own files.
-
-
-Configuring the software using the automatic "configure" script
----------------------------------------------------------------
-
-If you are on a Unix machine, you can just type
- ./configure
-and let the configure script construct appropriate configuration files.
-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.
-Expect configure to run for a few minutes, particularly on slower machines;
-it works by compiling a series of test programs.
-
-Configure was created with GNU Autoconf and it follows the usual conventions
-for GNU configure scripts. It makes a few assumptions that you may want to
-override. You can do this by providing optional switches to configure:
-
-* If you want to build libjpeg as a shared library, say
- ./configure --enable-shared
-To get both shared and static libraries, say
- ./configure --enable-shared --enable-static
-Note that these switches invoke GNU libtool to take care of system-dependent
-shared library building methods. If things don't work this way, please try
-running configure without either switch; that should build a static library
-without using libtool. If that works, your problem is probably with libtool
-not with the IJG code. libtool is fairly new and doesn't support all flavors
-of Unix yet. (You might be able to find a newer version of libtool than the
-one included with libjpeg; see ftp.gnu.org. Report libtool problems to
-bug-libtool@gnu.org.)
-
-* Configure will use gcc (GNU C compiler) if it's available, otherwise cc.
-To force a particular compiler to be selected, use the CC option, for example
- ./configure CC='cc'
-The same method can be used to include any unusual compiler switches.
-For example, on HP-UX you probably want to say
- ./configure CC='cc -Aa'
-to get HP's compiler to run in ANSI mode.
-
-* The default CFLAGS setting is "-O" for non-gcc compilers, "-O2" for gcc.
-You can override this by saying, for example,
- ./configure CFLAGS='-g'
-if you want to compile with debugging support.
-
-* Configure will set up the makefile so that "make install" will install files
-into /usr/local/bin, /usr/local/man, etc. You can specify an installation
-prefix other than "/usr/local" by giving configure the option "--prefix=PATH".
-
-* If you don't have a lot of swap space, you may need to enable the IJG
-software's internal virtual memory mechanism. To do this, give the option
-"--enable-maxmem=N" where N is the default maxmemory limit in megabytes.
-This is discussed in more detail under "Selecting a memory manager", below.
-You probably don't need to worry about this on reasonably-sized Unix machines,
-unless you plan to process very large images.
-
-Configure has some other features that are useful if you are cross-compiling
-or working in a network of multiple machine types; but if you need those
-features, you probably already know how to use them.
-
-
-Configuring the software using one of the supplied jconfig and makefile files
------------------------------------------------------------------------------
-
-If you have one of these systems, you can just use the provided configuration
-files:
-
-Makefile jconfig file System and/or compiler
-
-makefile.manx jconfig.manx Amiga, Manx Aztec C
-makefile.sas jconfig.sas Amiga, SAS C
-makeproj.mac jconfig.mac Apple Macintosh, Metrowerks CodeWarrior
-mak*jpeg.st jconfig.st Atari ST/STE/TT, Pure C or Turbo C
-makefile.bcc jconfig.bcc MS-DOS or OS/2, Borland C
-makefile.dj jconfig.dj MS-DOS, DJGPP (Delorie's port of GNU C)
-makefile.mc6 jconfig.mc6 MS-DOS, Microsoft C (16-bit only)
-makefile.wat jconfig.wat MS-DOS, OS/2, or Windows NT, Watcom C
-makefile.vc jconfig.vc Windows NT/95, MS Visual C++
-make*.ds jconfig.vc Windows NT/95, MS Developer Studio
-makefile.mms jconfig.vms Digital VMS, with MMS software
-makefile.vms jconfig.vms Digital VMS, without MMS software
-
-Copy the proper jconfig file to jconfig.h and the makefile to Makefile (or
-whatever your system uses as the standard makefile name). For more info see
-the appropriate system-specific hints section near the end of this file.
-
-
-Configuring the software by hand
---------------------------------
-
-First, generate a jconfig.h file. If you are moderately familiar with C,
-the comments in jconfig.doc should be enough information to do this; just
-copy jconfig.doc to jconfig.h and edit it appropriately. Otherwise, you may
-prefer to use the ckconfig.c program. You will need to compile and execute
-ckconfig.c by hand --- we hope you know at least enough to do that.
-ckconfig.c may not compile the first try (in fact, the whole idea is for it
-to fail if anything is going to). If you get compile errors, fix them by
-editing ckconfig.c according to the directions given in ckconfig.c. Once
-you get it to run, it will write a suitable jconfig.h file, and will also
-print out some advice about which makefile to use.
-
-You may also want to look at the canned jconfig files, if there is one for a
-system similar to yours.
-
-Second, select a makefile and copy it to Makefile (or whatever your system
-uses as the standard makefile name). The most generic makefiles we provide
-are
- makefile.ansi: if your C compiler supports function prototypes
- makefile.unix: if not.
-(You have function prototypes if ckconfig.c put "#define HAVE_PROTOTYPES"
-in jconfig.h.) You may want to start from one of the other makefiles if
-there is one for a system similar to yours.
-
-Look over the selected Makefile and adjust options as needed. In particular
-you may want to change the CC and CFLAGS definitions. For instance, if you
-are using GCC, set CC=gcc. If you had to use any compiler switches to get
-ckconfig.c to work, make sure the same switches are in CFLAGS.
-
-If you are on a system that doesn't use makefiles, you'll need to set up
-project files (or whatever you do use) to compile all the source files and
-link them into executable files cjpeg, djpeg, jpegtran, rdjpgcom, and wrjpgcom.
-See the file lists in any of the makefiles to find out which files go into
-each program. Note that the provided makefiles all make a "library" file
-libjpeg first, but you don't have to do that if you don't want to; the file
-lists identify which source files are actually needed for compression,
-decompression, or both. As a last resort, you can make a batch script that
-just compiles everything and links it all together; makefile.vms is an example
-of this (it's for VMS systems that have no make-like utility).
-
-Here are comments about some specific configuration decisions you'll
-need to make:
-
-Command line style
-------------------
-
-These programs can use a Unix-like command line style which supports
-redirection and piping, like this:
- cjpeg inputfile >outputfile
- cjpeg <inputfile >outputfile
- source program | cjpeg >outputfile
-The simpler "two file" command line style is just
- cjpeg inputfile outputfile
-You may prefer the two-file style, particularly if you don't have pipes.
-
-You MUST use two-file style on any system that doesn't cope well with binary
-data fed through stdin/stdout; this is true for some MS-DOS compilers, for
-example. If you're not on a Unix system, it's safest to assume you need
-two-file style. (But if your compiler provides either the Posix-standard
-fdopen() library routine or a Microsoft-compatible setmode() routine, you
-can safely use the Unix command line style, by defining USE_FDOPEN or
-USE_SETMODE respectively.)
-
-To use the two-file style, make jconfig.h say "#define TWO_FILE_COMMANDLINE".
-
-Selecting a memory manager
---------------------------
-
-The IJG code is capable of working on images that are too big to fit in main
-memory; data is swapped out to temporary files as necessary. However, the
-code to do this is rather system-dependent. We provide five different
-memory managers:
-
-* jmemansi.c This version uses the ANSI-standard library routine tmpfile(),
- which not all non-ANSI systems have. On some systems
- tmpfile() may put the temporary file in a non-optimal
- location; if you don't like what it does, use jmemname.c.
-
-* jmemname.c This version creates named temporary files. For anything
- except a Unix machine, you'll need to configure the
- select_file_name() routine appropriately; see the comments
- near the head of jmemname.c. If you use this version, define
- NEED_SIGNAL_CATCHER in jconfig.h to make sure the temp files
- are removed if the program is aborted.
-
-* jmemnobs.c (That stands for No Backing Store :-).) This will compile on
- almost any system, but it assumes you have enough main memory
- or virtual memory to hold the biggest images you work with.
-
-* jmemdos.c This should be used with most 16-bit MS-DOS compilers.
- See the system-specific notes about MS-DOS for more info.
- IMPORTANT: if you use this, define USE_MSDOS_MEMMGR in
- jconfig.h, and include the assembly file jmemdosa.asm in the
- programs. The supplied makefiles and jconfig files for
- 16-bit MS-DOS compilers already do both.
-
-* jmemmac.c Custom version for Apple Macintosh; see the system-specific
- notes for Macintosh for more info.
-
-To use a particular memory manager, change the SYSDEPMEM variable in your
-makefile to equal the corresponding object file name (for example, jmemansi.o
-or jmemansi.obj for jmemansi.c).
-
-If you have plenty of (real or virtual) main memory, just use jmemnobs.c.
-"Plenty" means about ten bytes for every pixel in the largest images
-you plan to process, so a lot of systems don't meet this criterion.
-If yours doesn't, try jmemansi.c first. If that doesn't compile, you'll have
-to use jmemname.c; be sure to adjust select_file_name() for local conditions.
-You may also need to change unlink() to remove() in close_backing_store().
-
-Except with jmemnobs.c or jmemmac.c, you need to adjust the DEFAULT_MAX_MEM
-setting to a reasonable value for your system (either by adding a #define for
-DEFAULT_MAX_MEM to jconfig.h, or by adding a -D switch to the Makefile).
-This value limits the amount of data space the program will attempt to
-allocate. Code and static data space isn't counted, so the actual memory
-needs for cjpeg or djpeg are typically 100 to 150Kb more than the max-memory
-setting. Larger max-memory settings reduce the amount of I/O needed to
-process a large image, but too large a value can result in "insufficient
-memory" failures. On most Unix machines (and other systems with virtual
-memory), just set DEFAULT_MAX_MEM to several million and forget it. At the
-other end of the spectrum, for MS-DOS machines you probably can't go much
-above 300K to 400K. (On MS-DOS the value refers to conventional memory only.
-Extended/expanded memory is handled separately by jmemdos.c.)
-
-
-BUILDING THE SOFTWARE
-=====================
-
-Now you should be able to compile the software. Just say "make" (or
-whatever's necessary to start the compilation). Have a cup of coffee.
-
-Here are some things that could go wrong:
-
-If your compiler complains about undefined structures, you should be able to
-shut it up by putting "#define INCOMPLETE_TYPES_BROKEN" in jconfig.h.
-
-If you have trouble with missing system include files or inclusion of the
-wrong ones, read jinclude.h. This shouldn't happen if you used configure
-or ckconfig.c to set up jconfig.h.
-
-There are a fair number of routines that do not use all of their parameters;
-some compilers will issue warnings about this, which you can ignore. There
-are also a few configuration checks that may give "unreachable code" warnings.
-Any other warning deserves investigation.
-
-If you don't have a getenv() library routine, define NO_GETENV.
-
-Also see the system-specific hints, below.
-
-
-TESTING THE SOFTWARE
-====================
-
-As a quick test of functionality we've included a small sample image in
-several forms:
- testorig.jpg Starting point for the djpeg tests.
- testimg.ppm The output of djpeg testorig.jpg
- testimg.bmp The output of djpeg -bmp -colors 256 testorig.jpg
- testimg.jpg The output of cjpeg testimg.ppm
- testprog.jpg Progressive-mode equivalent of testorig.jpg.
- testimgp.jpg The output of cjpeg -progressive -optimize testimg.ppm
-(The first- and second-generation .jpg files aren't identical since JPEG is
-lossy.) If you can generate duplicates of the testimg* files then you
-probably have working programs.
-
-With most of the makefiles, "make test" will perform the necessary
-comparisons.
-
-If you're using a makefile that doesn't provide the test option, run djpeg
-and cjpeg by hand and compare the output files to testimg* with whatever
-binary file comparison tool you have. The files should be bit-for-bit
-identical.
-
-If the programs complain "MAX_ALLOC_CHUNK is wrong, please fix", then you
-need to reduce MAX_ALLOC_CHUNK to a value that fits in type size_t.
-Try adding "#define MAX_ALLOC_CHUNK 65520L" to jconfig.h. A less likely
-configuration error is "ALIGN_TYPE is wrong, please fix": defining ALIGN_TYPE
-as long should take care of that one.
-
-If the cjpeg test run fails with "Missing Huffman code table entry", it's a
-good bet that you needed to define RIGHT_SHIFT_IS_UNSIGNED. Go back to the
-configuration step and run ckconfig.c. (This is a good plan for any other
-test failure, too.)
-
-If you are using Unix (one-file) command line style on a non-Unix system,
-it's a good idea to check that binary I/O through stdin/stdout actually
-works. You should get the same results from "djpeg <testorig.jpg >out.ppm"
-as from "djpeg -outfile out.ppm testorig.jpg". Note that the makefiles all
-use the latter style and therefore do not exercise stdin/stdout! If this
-check fails, try recompiling with USE_SETMODE or USE_FDOPEN defined.
-If it still doesn't work, better use two-file style.
-
-If you chose a memory manager other than jmemnobs.c, you should test that
-temporary-file usage works. Try "djpeg -bmp -colors 256 -max 0 testorig.jpg"
-and make sure its output matches testimg.bmp. If you have any really large
-images handy, try compressing them with -optimize and/or decompressing with
--colors 256 to make sure your DEFAULT_MAX_MEM setting is not too large.
-
-NOTE: this is far from an exhaustive test of the JPEG software; some modules,
-such as 1-pass color quantization, are not exercised at all. It's just a
-quick test to give you some confidence that you haven't missed something
-major.
-
-
-INSTALLING THE SOFTWARE
-=======================
-
-Once you're done with the above steps, you can install the software by
-copying the executable files (cjpeg, djpeg, jpegtran, rdjpgcom, and wrjpgcom)
-to wherever you normally install programs. On Unix systems, you'll also want
-to put the man pages (cjpeg.1, djpeg.1, jpegtran.1, rdjpgcom.1, wrjpgcom.1)
-in the man-page directory. The pre-fab makefiles don't support this step
-since there's such a wide variety of installation procedures on different
-systems.
-
-If you generated a Makefile with the "configure" script, you can just say
- make install
-to install the programs and their man pages into the standard places.
-(You'll probably need to be root to do this.) We recommend first saying
- make -n install
-to see where configure thought the files should go. You may need to edit
-the Makefile, particularly if your system's conventions for man page
-filenames don't match what configure expects.
-
-If you want to install the IJG library itself, for use in compiling other
-programs besides ours, then you need to put the four include files
- jpeglib.h jerror.h jconfig.h jmorecfg.h
-into your include-file directory, and put the library file libjpeg.a
-(extension may vary depending on system) wherever library files go.
-If you generated a Makefile with "configure", it will do what it thinks
-is the right thing if you say
- make install-lib
-
-
-OPTIONAL STUFF
-==============
-
-Progress monitor:
-
-If you like, you can #define PROGRESS_REPORT (in jconfig.h) to enable display
-of percent-done progress reports. The routine provided in cdjpeg.c merely
-prints percentages to stderr, but you can customize it to do something
-fancier.
-
-Utah RLE file format support:
-
-We distribute the software with support for RLE image files (Utah Raster
-Toolkit format) disabled, because the RLE support won't compile without the
-Utah library. If you have URT version 3.1 or later, you can enable RLE
-support as follows:
- 1. #define RLE_SUPPORTED in jconfig.h.
- 2. Add a -I option to CFLAGS in the Makefile for the directory
- containing the URT .h files (typically the "include"
- subdirectory of the URT distribution).
- 3. Add -L... -lrle to LDLIBS in the Makefile, where ... specifies
- the directory containing the URT "librle.a" file (typically the
- "lib" subdirectory of the URT distribution).
-
-Support for 12-bit-deep pixel data:
-
-The JPEG standard allows either 8-bit or 12-bit data precision. (For color,
-this means 8 or 12 bits per channel, of course.) If you need to work with
-deeper than 8-bit data, you can compile the IJG code for 12-bit operation.
-To do so:
- 1. In jmorecfg.h, define BITS_IN_JSAMPLE as 12 rather than 8.
- 2. In jconfig.h, undefine BMP_SUPPORTED, RLE_SUPPORTED, and TARGA_SUPPORTED,
- because the code for those formats doesn't handle 12-bit data and won't
- even compile. (The PPM code does work, as explained below. The GIF
- code works too; it scales 8-bit GIF data to and from 12-bit depth
- automatically.)
- 3. Compile. Don't expect "make test" to pass, since the supplied test
- files are for 8-bit data.
-
-Currently, 12-bit support does not work on 16-bit-int machines.
-
-Note that a 12-bit version will not read 8-bit JPEG files, nor vice versa;
-so you'll want to keep around a regular 8-bit compilation as well.
-(Run-time selection of data depth, to allow a single copy that does both,
-is possible but would probably slow things down considerably; it's very low
-on our to-do list.)
-
-The PPM reader (rdppm.c) can read 12-bit data from either text-format or
-binary-format PPM and PGM files. Binary-format PPM/PGM files which have a
-maxval greater than 255 are assumed to use 2 bytes per sample, LSB first
-(little-endian order). As of early 1995, 2-byte binary format is not
-officially supported by the PBMPLUS library, but it is expected that a
-future release of PBMPLUS will support it. Note that the PPM reader will
-read files of any maxval regardless of the BITS_IN_JSAMPLE setting; incoming
-data is automatically rescaled to either maxval=255 or maxval=4095 as
-appropriate for the cjpeg bit depth.
-
-The PPM writer (wrppm.c) will normally write 2-byte binary PPM or PGM
-format, maxval 4095, when compiled with BITS_IN_JSAMPLE=12. Since this
-format is not yet widely supported, you can disable it by compiling wrppm.c
-with PPM_NORAWWORD defined; then the data is scaled down to 8 bits to make a
-standard 1-byte/sample PPM or PGM file. (Yes, this means still another copy
-of djpeg to keep around. But hopefully you won't need it for very long.
-Poskanzer's supposed to get that new PBMPLUS release out Real Soon Now.)
-
-Of course, if you are working with 12-bit data, you probably have it stored
-in some other, nonstandard format. In that case you'll probably want to
-write your own I/O modules to read and write your format.
-
-Note that a 12-bit version of cjpeg always runs in "-optimize" mode, in
-order to generate valid Huffman tables. This is necessary because our
-default Huffman tables only cover 8-bit data.
-
-Removing code:
-
-If you need to make a smaller version of the JPEG software, some optional
-functions can be removed at compile time. See the xxx_SUPPORTED #defines in
-jconfig.h and jmorecfg.h. If at all possible, we recommend that you leave in
-decoder support for all valid JPEG files, to ensure that you can read anyone's
-output. Taking out support for image file formats that you don't use is the
-most painless way to make the programs smaller. Another possibility is to
-remove some of the DCT methods: in particular, the "IFAST" method may not be
-enough faster than the others to be worth keeping on your machine. (If you
-do remove ISLOW or IFAST, be sure to redefine JDCT_DEFAULT or JDCT_FASTEST
-to a supported method, by adding a #define in jconfig.h.)
-
-
-OPTIMIZATION
-============
-
-Unless you own a Cray, you'll probably be interested in making the JPEG
-software go as fast as possible. This section covers some machine-dependent
-optimizations you may want to try. We suggest that before trying any of
-this, you first get the basic installation to pass the self-test step.
-Repeat the self-test after any optimization to make sure that you haven't
-broken anything.
-
-The integer DCT routines perform a lot of multiplications. These
-multiplications must yield 32-bit results, but none of their input values
-are more than 16 bits wide. On many machines, notably the 680x0 and 80x86
-CPUs, a 16x16=>32 bit multiply instruction is faster than a full 32x32=>32
-bit multiply. Unfortunately there is no portable way to specify such a
-multiplication in C, but some compilers can generate one when you use the
-right combination of casts. See the MULTIPLYxxx macro definitions in
-jdct.h. If your compiler makes "int" be 32 bits and "short" be 16 bits,
-defining SHORTxSHORT_32 is fairly likely to work. When experimenting with
-alternate definitions, be sure to test not only whether the code still works
-(use the self-test), but also whether it is actually faster --- on some
-compilers, alternate definitions may compute the right answer, yet be slower
-than the default. Timing cjpeg on a large PGM (grayscale) input file is the
-best way to check this, as the DCT will be the largest fraction of the runtime
-in that mode. (Note: some of the distributed compiler-specific jconfig files
-already contain #define switches to select appropriate MULTIPLYxxx
-definitions.)
-
-If your machine has sufficiently fast floating point hardware, you may find
-that the float DCT method is faster than the integer DCT methods, even
-after tweaking the integer multiply macros. In that case you may want to
-make the float DCT be the default method. (The only objection to this is
-that float DCT results may vary slightly across machines.) To do that, add
-"#define JDCT_DEFAULT JDCT_FLOAT" to jconfig.h. Even if you don't change
-the default, you should redefine JDCT_FASTEST, which is the method selected
-by djpeg's -fast switch. Don't forget to update the documentation files
-(usage.doc and/or cjpeg.1, djpeg.1) to agree with what you've done.
-
-If access to "short" arrays is slow on your machine, it may be a win to
-define type JCOEF as int rather than short. This will cost a good deal of
-memory though, particularly in some multi-pass modes, so don't do it unless
-you have memory to burn and short is REALLY slow.
-
-If your compiler can compile function calls in-line, make sure the INLINE
-macro in jmorecfg.h is defined as the keyword that marks a function
-inline-able. Some compilers have a switch that tells the compiler to inline
-any function it thinks is profitable (e.g., -finline-functions for gcc).
-Enabling such a switch is likely to make the compiled code bigger but faster.
-
-In general, it's worth trying the maximum optimization level of your compiler,
-and experimenting with any optional optimizations such as loop unrolling.
-(Unfortunately, far too many compilers have optimizer bugs ... be prepared to
-back off if the code fails self-test.) If you do any experimentation along
-these lines, please report the optimal settings to jpeg-info@uunet.uu.net so
-we can mention them in future releases. Be sure to specify your machine and
-compiler version.
-
-
-HINTS FOR SPECIFIC SYSTEMS
-==========================
-
-We welcome reports on changes needed for systems not mentioned here. Submit
-'em to jpeg-info@uunet.uu.net. Also, if configure or ckconfig.c is wrong
-about how to configure the JPEG software for your system, please let us know.
-
-
-Acorn RISC OS:
-
-(Thanks to Simon Middleton for these hints on compiling with Desktop C.)
-After renaming the files according to Acorn conventions, take a copy of
-makefile.ansi, change all occurrences of 'libjpeg.a' to 'libjpeg.o' and
-change these definitions as indicated:
-
-CFLAGS= -throwback -IC: -Wn
-LDLIBS=C:o.Stubs
-SYSDEPMEM=jmemansi.o
-LN=Link
-AR=LibFile -c -o
-
-Also add a new line '.c.o:; $(cc) $< $(cflags) -c -o $@'. Remove the
-lines '$(RM) libjpeg.o' and '$(AR2) libjpeg.o' and the 'jconfig.h'
-dependency section.
-
-Copy jconfig.doc to jconfig.h. Edit jconfig.h to define TWO_FILE_COMMANDLINE
-and CHAR_IS_UNSIGNED.
-
-Run the makefile using !AMU not !Make. If you want to use the 'clean' and
-'test' makefile entries then you will have to fiddle with the syntax a bit
-and rename the test files.
-
-
-Amiga:
-
-SAS C 6.50 reportedly is too buggy to compile the IJG code properly.
-A patch to update to 6.51 is available from SAS or AmiNet FTP sites.
-
-The supplied config files are set up to use jmemname.c as the memory
-manager, with temporary files being created on the device named by
-"JPEGTMP:".
-
-
-Atari ST/STE/TT:
-
-Copy the project files makcjpeg.st, makdjpeg.st, maktjpeg.st, and makljpeg.st
-to cjpeg.prj, djpeg.prj, jpegtran.prj, and libjpeg.prj respectively. The
-project files should work as-is with Pure C. For Turbo C, change library
-filenames "pc..." to "tc..." in each project file. Note that libjpeg.prj
-selects jmemansi.c as the recommended memory manager. You'll probably want to
-adjust the DEFAULT_MAX_MEM setting --- you want it to be a couple hundred K
-less than your normal free memory. Put "#define DEFAULT_MAX_MEM nnnn" into
-jconfig.h to do this.
-
-To use the 68881/68882 coprocessor for the floating point DCT, add the
-compiler option "-8" to the project files and replace pcfltlib.lib with
-pc881lib.lib in cjpeg.prj and djpeg.prj. Or if you don't have a
-coprocessor, you may prefer to remove the float DCT code by undefining
-DCT_FLOAT_SUPPORTED in jmorecfg.h (since without a coprocessor, the float
-code will be too slow to be useful). In that case, you can delete
-pcfltlib.lib from the project files.
-
-Note that you must make libjpeg.lib before making cjpeg.ttp, djpeg.ttp,
-or jpegtran.ttp. You'll have to perform the self-test by hand.
-
-We haven't bothered to include project files for rdjpgcom and wrjpgcom.
-Those source files should just be compiled by themselves; they don't
-depend on the JPEG library.
-
-There is a bug in some older versions of the Turbo C library which causes the
-space used by temporary files created with "tmpfile()" not to be freed after
-an abnormal program exit. If you check your disk afterwards, you will find
-cluster chains that are allocated but not used by a file. This should not
-happen in cjpeg/djpeg/jpegtran, since we enable a signal catcher to explicitly
-close temp files before exiting. But if you use the JPEG library with your
-own code, be sure to supply a signal catcher, or else use a different
-system-dependent memory manager.
-
-
-Cray:
-
-Should you be so fortunate as to be running JPEG on a Cray YMP, there is a
-compiler bug in old versions of Cray's Standard C (prior to 3.1). If you
-still have an old compiler, you'll need to insert a line reading
-"#pragma novector" just before the loop
- for (i = 1; i <= (int) htbl->bits[l]; i++)
- huffsize[p++] = (char) l;
-in fix_huff_tbl (in V5beta1, line 204 of jchuff.c and line 176 of jdhuff.c).
-[This bug may or may not still occur with the current IJG code, but it's
-probably a dead issue anyway...]
-
-
-HP-UX:
-
-If you have HP-UX 7.05 or later with the "software development" C compiler,
-you should run the compiler in ANSI mode. If using the configure script,
-say
- ./configure CC='cc -Aa'
-(or -Ae if you prefer). If configuring by hand, use makefile.ansi and add
-"-Aa" to the CFLAGS line in the makefile.
-
-If you have a pre-7.05 system, or if you are using the non-ANSI C compiler
-delivered with a minimum HP-UX system, then you must use makefile.unix
-(and do NOT add -Aa); or just run configure without the CC option.
-
-On HP 9000 series 800 machines, the HP C compiler is buggy in revisions prior
-to A.08.07. If you get complaints about "not a typedef name", you'll have to
-use makefile.unix, or run configure without the CC option.
-
-
-Macintosh, generic comments:
-
-The supplied user-interface files (cjpeg.c, djpeg.c, etc) are set up to
-provide a Unix-style command line interface. You can use this interface on
-the Mac by means of the ccommand() library routine provided by Metrowerks
-CodeWarrior or Think C. This is only appropriate for testing the library,
-however; to make a user-friendly equivalent of cjpeg/djpeg you'd really want
-to develop a Mac-style user interface. There isn't a complete example
-available at the moment, but there are some helpful starting points:
-1. Sam Bushell's free "To JPEG" applet provides drag-and-drop conversion to
-JPEG under System 7 and later. This only illustrates how to use the
-compression half of the library, but it does a very nice job of that part.
-The CodeWarrior source code is available from http://www.pobox.com/~jsam.
-2. Jim Brunner prepared a Mac-style user interface for both compression and
-decompression. Unfortunately, it hasn't been updated since IJG v4, and
-the library's API has changed considerably since then. Still it may be of
-some help, particularly as a guide to compiling the IJG code under Think C.
-Jim's code is available from the Info-Mac archives, at sumex-aim.stanford.edu
-or mirrors thereof; see file /info-mac/dev/src/jpeg-convert-c.hqx.
-
-jmemmac.c is the recommended memory manager back end for Macintosh. It uses
-NewPtr/DisposePtr instead of malloc/free, and has a Mac-specific
-implementation of jpeg_mem_available(). It also creates temporary files that
-follow Mac conventions. (That part of the code relies on System-7-or-later OS
-functions. See the comments in jmemmac.c if you need to run it on System 6.)
-NOTE that USE_MAC_MEMMGR must be defined in jconfig.h to use jmemmac.c.
-
-You can also use jmemnobs.c, if you don't care about handling images larger
-than available memory. If you use any memory manager back end other than
-jmemmac.c, we recommend replacing "malloc" and "free" by "NewPtr" and
-"DisposePtr", because Mac C libraries often have peculiar implementations of
-malloc/free. (For instance, free() may not return the freed space to the
-Mac Memory Manager. This is undesirable for the IJG code because jmemmgr.c
-already clumps space requests.)
-
-
-Macintosh, Metrowerks CodeWarrior:
-
-The Unix-command-line-style interface can be used by defining USE_CCOMMAND.
-You'll also need to define TWO_FILE_COMMANDLINE to avoid stdin/stdout.
-This means that when using the cjpeg/djpeg programs, you'll have to type the
-input and output file names in the "Arguments" text-edit box, rather than
-using the file radio buttons. (Perhaps USE_FDOPEN or USE_SETMODE would
-eliminate the problem, but I haven't heard from anyone who's tried it.)
-
-On 680x0 Macs, Metrowerks defines type "double" as a 10-byte IEEE extended
-float. jmemmgr.c won't like this: it wants sizeof(ALIGN_TYPE) to be a power
-of 2. Add "#define ALIGN_TYPE long" to jconfig.h to eliminate the complaint.
-
-The supplied configuration file jconfig.mac can be used for your jconfig.h;
-it includes all the recommended symbol definitions. If you have AppleScript
-installed, you can run the supplied script makeproj.mac to create CodeWarrior
-project files for the library and the testbed applications, then build the
-library and applications. (Thanks to Dan Sears and Don Agro for this nifty
-hack, which saves us from trying to maintain CodeWarrior project files as part
-of the IJG distribution...)
-
-
-Macintosh, Think C:
-
-The documentation in Jim Brunner's "JPEG Convert" source code (see above)
-includes detailed build instructions for Think C; it's probably somewhat
-out of date for the current release, but may be helpful.
-
-If you want to build the minimal command line version, proceed as follows.
-You'll have to prepare project files for the programs; we don't include any
-in the distribution since they are not text files. Use the file lists in
-any of the supplied makefiles as a guide. Also add the ANSI and Unix C
-libraries in a separate segment. You may need to divide the JPEG files into
-more than one segment; we recommend dividing compression and decompression
-modules. Define USE_CCOMMAND in jconfig.h so that the ccommand() routine is
-called. You must also define TWO_FILE_COMMANDLINE because stdin/stdout
-don't handle binary data correctly.
-
-On 680x0 Macs, Think C defines type "double" as a 12-byte IEEE extended float.
-jmemmgr.c won't like this: it wants sizeof(ALIGN_TYPE) to be a power of 2.
-Add "#define ALIGN_TYPE long" to jconfig.h to eliminate the complaint.
-
-jconfig.mac should work as a jconfig.h configuration file for Think C,
-but the makeproj.mac AppleScript script is specific to CodeWarrior. Sorry.
-
-
-MIPS R3000:
-
-MIPS's cc version 1.31 has a rather nasty optimization bug. Don't use -O
-if you have that compiler version. (Use "cc -V" to check the version.)
-Note that the R3000 chip is found in workstations from DEC and others.
-
-
-MS-DOS, generic comments for 16-bit compilers:
-
-The IJG code is designed to work well in 80x86 "small" or "medium" memory
-models (i.e., data pointers are 16 bits unless explicitly declared "far";
-code pointers can be either size). You may be able to use small model to
-compile cjpeg or djpeg by itself, but you will probably have to use medium
-model for any larger application. This won't make much difference in
-performance. You *will* take a noticeable performance hit if you use a
-large-data memory model, and you should avoid "huge" model if at all
-possible. Be sure that NEED_FAR_POINTERS is defined in jconfig.h if you use
-a small-data memory model; be sure it is NOT defined if you use a large-data
-model. (The supplied makefiles and jconfig files for Borland and Microsoft C
-compile in medium model and define NEED_FAR_POINTERS.)
-
-The DOS-specific memory manager, jmemdos.c, should be used if possible.
-It needs some assembly-code routines which are in jmemdosa.asm; make sure
-your makefile assembles that file and includes it in the library. If you
-don't have a suitable assembler, you can get pre-assembled object files for
-jmemdosa by FTP from ftp.uu.net:/graphics/jpeg/jdosaobj.zip. (DOS-oriented
-distributions of the IJG source code often include these object files.)
-
-When using jmemdos.c, jconfig.h must define USE_MSDOS_MEMMGR and must set
-MAX_ALLOC_CHUNK to less than 64K (65520L is a typical value). If your
-C library's far-heap malloc() can't allocate blocks that large, reduce
-MAX_ALLOC_CHUNK to whatever it can handle.
-
-If you can't use jmemdos.c for some reason --- for example, because you
-don't have an assembler to assemble jmemdosa.asm --- you'll have to fall
-back to jmemansi.c or jmemname.c. You'll probably still need to set
-MAX_ALLOC_CHUNK in jconfig.h, because most DOS C libraries won't malloc()
-more than 64K at a time. IMPORTANT: if you use jmemansi.c or jmemname.c,
-you will have to compile in a large-data memory model in order to get the
-right stdio library. Too bad.
-
-wrjpgcom needs to be compiled in large model, because it malloc()s a 64KB
-work area to hold the comment text. If your C library's malloc can't
-handle that, reduce MAX_COM_LENGTH as necessary in wrjpgcom.c.
-
-Most MS-DOS compilers treat stdin/stdout as text files, so you must use
-two-file command line style. But if your compiler has either fdopen() or
-setmode(), you can use one-file style if you like. To do this, define
-USE_SETMODE or USE_FDOPEN so that stdin/stdout will be set to binary mode.
-(USE_SETMODE seems to work with more DOS compilers than USE_FDOPEN.) You
-should test that I/O through stdin/stdout produces the same results as I/O
-to explicitly named files... the "make test" procedures in the supplied
-makefiles do NOT use stdin/stdout.
-
-
-MS-DOS, generic comments for 32-bit compilers:
-
-None of the above comments about memory models apply if you are using a
-32-bit flat-memory-space environment, such as DJGPP or Watcom C. (And you
-should use one if you have it, as performance will be much better than
-8086-compatible code!) For flat-memory-space compilers, do NOT define
-NEED_FAR_POINTERS, and do NOT use jmemdos.c. Use jmemnobs.c if the
-environment supplies adequate virtual memory, otherwise use jmemansi.c or
-jmemname.c.
-
-You'll still need to be careful about binary I/O through stdin/stdout.
-See the last paragraph of the previous section.
-
-
-MS-DOS, Borland C:
-
-Be sure to convert all the source files to DOS text format (CR/LF newlines).
-Although Borland C will often work OK with unmodified Unix (LF newlines)
-source files, sometimes it will give bogus compile errors.
-"Illegal character '#'" is the most common such error. (This is true with
-Borland C 3.1, but perhaps is fixed in newer releases.)
-
-If you want one-file command line style, just undefine TWO_FILE_COMMANDLINE.
-jconfig.bcc already includes #define USE_SETMODE to make this work.
-(fdopen does not work correctly.)
-
-
-MS-DOS, Microsoft C:
-
-makefile.mc6 works with Microsoft C, DOS Visual C++, etc. It should only
-be used if you want to build a 16-bit (small or medium memory model) program.
-
-If you want one-file command line style, just undefine TWO_FILE_COMMANDLINE.
-jconfig.mc6 already includes #define USE_SETMODE to make this work.
-(fdopen does not work correctly.)
-
-Note that this makefile assumes that the working copy of itself is called
-"makefile". If you want to call it something else, say "makefile.mak",
-be sure to adjust the dependency line that reads "$(RFILE) : makefile".
-Otherwise the make will fail because it doesn't know how to create "makefile".
-Worse, some releases of Microsoft's make utilities give an incorrect error
-message in this situation.
-
-Old versions of MS C fail with an "out of macro expansion space" error
-because they can't cope with the macro TRACEMS8 (defined in jerror.h).
-If this happens to you, the easiest solution is to change TRACEMS8 to
-expand to nothing. You'll lose the ability to dump out JPEG coefficient
-tables with djpeg -debug -debug, but at least you can compile.
-
-Original MS C 6.0 is very buggy; it compiles incorrect code unless you turn
-off optimization entirely (remove -O from CFLAGS). 6.00A is better, but it
-still generates bad code if you enable loop optimizations (-Ol or -Ox).
-
-MS C 8.0 crashes when compiling jquant1.c with optimization switch /Oo ...
-which is on by default. To work around this bug, compile that one file
-with /Oo-.
-
-
-Microsoft Windows (all versions), generic comments:
-
-Some Windows system include files define typedef boolean as "unsigned char".
-The IJG code also defines typedef boolean, but we make it "int" by default.
-This doesn't affect the IJG programs because we don't import those Windows
-include files. But if you use the JPEG library in your own program, and some
-of your program's files import one definition of boolean while some import the
-other, you can get all sorts of mysterious problems. A good preventive step
-is to make the IJG library use "unsigned char" for boolean. To do that,
-add something like this to your jconfig.h file:
- /* Define "boolean" as unsigned char, not int, per Windows custom */
- #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
- typedef unsigned char boolean;
- #endif
- #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
-(This is already in jconfig.vc, by the way.)
-
-windef.h contains the declarations
- #define far
- #define FAR far
-Since jmorecfg.h tries to define FAR as empty, you may get a compiler
-warning if you include both jpeglib.h and windef.h (which windows.h
-includes). To suppress the warning, you can put "#ifndef FAR"/"#endif"
-around the line "#define FAR" in jmorecfg.h.
-
-When using the library in a Windows application, you will almost certainly
-want to modify or replace the error handler module jerror.c, since our
-default error handler does a couple of inappropriate things:
- 1. it tries to write error and warning messages on stderr;
- 2. in event of a fatal error, it exits by calling exit().
-
-A simple stopgap solution for problem 1 is to replace the line
- fprintf(stderr, "%s\n", buffer);
-(in output_message in jerror.c) with
- MessageBox(GetActiveWindow(),buffer,"JPEG Error",MB_OK|MB_ICONERROR);
-It's highly recommended that you at least do that much, since otherwise
-error messages will disappear into nowhere. (Beginning with IJG v6b, this
-code is already present in jerror.c; just define USE_WINDOWS_MESSAGEBOX in
-jconfig.h to enable it.)
-
-The proper solution for problem 2 is to return control to your calling
-application after a library error. This can be done with the setjmp/longjmp
-technique discussed in libjpeg.doc and illustrated in example.c. (NOTE:
-some older Windows C compilers provide versions of setjmp/longjmp that
-don't actually work under Windows. You may need to use the Windows system
-functions Catch and Throw instead.)
-
-The recommended memory manager under Windows is jmemnobs.c; in other words,
-let Windows do any virtual memory management needed. You should NOT use
-jmemdos.c nor jmemdosa.asm under Windows.
-
-For Windows 3.1, we recommend compiling in medium or large memory model;
-for newer Windows versions, use a 32-bit flat memory model. (See the MS-DOS
-sections above for more info about memory models.) In the 16-bit memory
-models only, you'll need to put
- #define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */
-into jconfig.h to limit allocation chunks to 64Kb. (Without that, you'd
-have to use huge memory model, which slows things down unnecessarily.)
-jmemnobs.c works without modification in large or flat memory models, but to
-use medium model, you need to modify its jpeg_get_large and jpeg_free_large
-routines to allocate far memory. In any case, you might like to replace
-its calls to malloc and free with direct calls on Windows memory allocation
-functions.
-
-You may also want to modify jdatasrc.c and jdatadst.c to use Windows file
-operations rather than fread/fwrite. This is only necessary if your C
-compiler doesn't provide a competent implementation of C stdio functions.
-
-You might want to tweak the RGB_xxx macros in jmorecfg.h so that the library
-will accept or deliver color pixels in BGR sample order, not RGB; BGR order
-is usually more convenient under Windows. Note that this change will break
-the sample applications cjpeg/djpeg, but the library itself works fine.
-
-
-Many people want to convert the IJG library into a DLL. This is reasonably
-straightforward, but watch out for the following:
-
- 1. Don't try to compile as a DLL in small or medium memory model; use
-large model, or even better, 32-bit flat model. Many places in the IJG code
-assume the address of a local variable is an ordinary (not FAR) pointer;
-that isn't true in a medium-model DLL.
-
- 2. Microsoft C cannot pass file pointers between applications and DLLs.
-(See Microsoft Knowledge Base, PSS ID Number Q50336.) So jdatasrc.c and
-jdatadst.c don't work if you open a file in your application and then pass
-the pointer to the DLL. One workaround is to make jdatasrc.c/jdatadst.c
-part of your main application rather than part of the DLL.
-
- 3. You'll probably need to modify the macros GLOBAL() and EXTERN() to
-attach suitable linkage keywords to the exported routine names. Similarly,
-you'll want to modify METHODDEF() and JMETHOD() to ensure function pointers
-are declared in a way that lets application routines be called back through
-the function pointers. These macros are in jmorecfg.h. Typical definitions
-for a 16-bit DLL are:
- #define GLOBAL(type) type _far _pascal _loadds _export
- #define EXTERN(type) extern type _far _pascal _loadds
- #define METHODDEF(type) static type _far _pascal
- #define JMETHOD(type,methodname,arglist) \
- type (_far _pascal *methodname) arglist
-For a 32-bit DLL you may want something like
- #define GLOBAL(type) __declspec(dllexport) type
- #define EXTERN(type) extern __declspec(dllexport) type
-Although not all the GLOBAL routines are actually intended to be called by
-the application, the performance cost of making them all DLL entry points is
-negligible.
-
-The unmodified IJG library presents a very C-specific application interface,
-so the resulting DLL is only usable from C or C++ applications. There has
-been some talk of writing wrapper code that would present a simpler interface
-usable from other languages, such as Visual Basic. This is on our to-do list
-but hasn't been very high priority --- any volunteers out there?
-
-
-Microsoft Windows, Borland C:
-
-The provided jconfig.bcc should work OK in a 32-bit Windows environment,
-but you'll need to tweak it in a 16-bit environment (you'd need to define
-NEED_FAR_POINTERS and MAX_ALLOC_CHUNK). Beware that makefile.bcc will need
-alteration if you want to use it for Windows --- in particular, you should
-use jmemnobs.c not jmemdos.c under Windows.
-
-Borland C++ 4.5 fails with an internal compiler error when trying to compile
-jdmerge.c in 32-bit mode. If enough people complain, perhaps Borland will fix
-it. In the meantime, the simplest known workaround is to add a redundant
-definition of the variable range_limit in h2v1_merged_upsample(), at the head
-of the block that handles odd image width (about line 268 in v6 jdmerge.c):
- /* If image width is odd, do the last output column separately */
- if (cinfo->output_width & 1) {
- register JSAMPLE * range_limit = cinfo->sample_range_limit; /* ADD THIS */
- cb = GETJSAMPLE(*inptr1);
-Pretty bizarre, especially since the very similar routine h2v2_merged_upsample
-doesn't trigger the bug.
-Recent reports suggest that this bug does not occur with "bcc32a" (the
-Pentium-optimized version of the compiler).
-
-Another report from a user of Borland C 4.5 was that incorrect code (leading
-to a color shift in processed images) was produced if any of the following
-optimization switch combinations were used:
- -Ot -Og
- -Ot -Op
- -Ot -Om
-So try backing off on optimization if you see such a problem. (Are there
-several different releases all numbered "4.5"??)
-
-
-Microsoft Windows, Microsoft Visual C++:
-
-jconfig.vc should work OK with any Microsoft compiler for a 32-bit memory
-model. makefile.vc is intended for command-line use. (If you are using
-the Developer Studio environment, you may prefer the DevStudio project
-files; see below.)
-
-Some users feel that it's easier to call the library from C++ code if you
-force VC++ to treat the library as C++ code, which you can do by renaming
-all the *.c files to *.cpp (and adjusting the makefile to match). This
-avoids the need to put extern "C" { ... } around #include "jpeglib.h" in
-your C++ application.
-
-
-Microsoft Windows, Microsoft Developer Studio:
-
-We include makefiles that should work as project files in DevStudio 4.2 or
-later. There is a library makefile that builds the IJG library as a static
-Win32 library, and an application makefile that builds the sample applications
-as Win32 console applications. (Even if you only want the library, we
-recommend building the applications so that you can run the self-test.)
-
-To use:
-1. Copy jconfig.vc to jconfig.h, makelib.ds to jpeg.mak, and
- makeapps.ds to apps.mak. (Note that the renaming is critical!)
-2. Click on the .mak files to construct project workspaces.
- (If you are using DevStudio more recent than 4.2, you'll probably
- get a message saying that the makefiles are being updated.)
-3. Build the library project, then the applications project.
-4. Move the application .exe files from `app`\Release to an
- appropriate location on your path.
-5. To perform the self-test, execute the command line
- NMAKE /f makefile.vc test
-
-
-OS/2, Borland C++:
-
-Watch out for optimization bugs in older Borland compilers; you may need
-to back off the optimization switch settings. See the comments in
-makefile.bcc.
-
-
-SGI:
-
-On some SGI systems, you may need to set "AR2= ar -ts" in the Makefile.
-If you are using configure, you can do this by saying
- ./configure RANLIB='ar -ts'
-This change is not needed on all SGIs. Use it only if the make fails at the
-stage of linking the completed programs.
-
-On the MIPS R4000 architecture (Indy, etc.), the compiler option "-mips2"
-reportedly speeds up the float DCT method substantially, enough to make it
-faster than the default int method (but still slower than the fast int
-method). If you use -mips2, you may want to alter the default DCT method to
-be float. To do this, put "#define JDCT_DEFAULT JDCT_FLOAT" in jconfig.h.
-
-
-VMS:
-
-On an Alpha/VMS system with MMS, be sure to use the "/Marco=Alpha=1"
-qualifier with MMS when building the JPEG package.
-
-VAX/VMS v5.5-1 may have problems with the test step of the build procedure
-reporting differences when it compares the original and test images. If the
-error points to the last block of the files, it is most likely bogus and may
-be safely ignored. It seems to be because the files are Stream_LF and
-Backup/Compare has difficulty with the (presumably) null padded files.
-This problem was not observed on VAX/VMS v6.1 or AXP/VMS v6.1.
diff --git a/src/3rdparty/libjpeg/jaricom.c b/src/3rdparty/libjpeg/jaricom.c
new file mode 100644
index 0000000000..f43e2ea7fa
--- /dev/null
+++ b/src/3rdparty/libjpeg/jaricom.c
@@ -0,0 +1,153 @@
+/*
+ * jaricom.c
+ *
+ * Developed 1997-2009 by Guido Vollbeding.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains probability estimation tables for common use in
+ * arithmetic entropy encoding and decoding routines.
+ *
+ * This data represents Table D.2 in the JPEG spec (ISO/IEC IS 10918-1
+ * and CCITT Recommendation ITU-T T.81) and Table 24 in the JBIG spec
+ * (ISO/IEC IS 11544 and CCITT Recommendation ITU-T T.82).
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+/* The following #define specifies the packing of the four components
+ * into the compact INT32 representation.
+ * Note that this formula must match the actual arithmetic encoder
+ * and decoder implementation. The implementation has to be changed
+ * if this formula is changed.
+ * The current organization is leaned on Markus Kuhn's JBIG
+ * implementation (jbig_tab.c).
+ */
+
+#define V(i,a,b,c,d) (((INT32)a << 16) | ((INT32)c << 8) | ((INT32)d << 7) | b)
+
+const INT32 jpeg_aritab[113+1] = {
+/*
+ * Index, Qe_Value, Next_Index_LPS, Next_Index_MPS, Switch_MPS
+ */
+ V( 0, 0x5a1d, 1, 1, 1 ),
+ V( 1, 0x2586, 14, 2, 0 ),
+ V( 2, 0x1114, 16, 3, 0 ),
+ V( 3, 0x080b, 18, 4, 0 ),
+ V( 4, 0x03d8, 20, 5, 0 ),
+ V( 5, 0x01da, 23, 6, 0 ),
+ V( 6, 0x00e5, 25, 7, 0 ),
+ V( 7, 0x006f, 28, 8, 0 ),
+ V( 8, 0x0036, 30, 9, 0 ),
+ V( 9, 0x001a, 33, 10, 0 ),
+ V( 10, 0x000d, 35, 11, 0 ),
+ V( 11, 0x0006, 9, 12, 0 ),
+ V( 12, 0x0003, 10, 13, 0 ),
+ V( 13, 0x0001, 12, 13, 0 ),
+ V( 14, 0x5a7f, 15, 15, 1 ),
+ V( 15, 0x3f25, 36, 16, 0 ),
+ V( 16, 0x2cf2, 38, 17, 0 ),
+ V( 17, 0x207c, 39, 18, 0 ),
+ V( 18, 0x17b9, 40, 19, 0 ),
+ V( 19, 0x1182, 42, 20, 0 ),
+ V( 20, 0x0cef, 43, 21, 0 ),
+ V( 21, 0x09a1, 45, 22, 0 ),
+ V( 22, 0x072f, 46, 23, 0 ),
+ V( 23, 0x055c, 48, 24, 0 ),
+ V( 24, 0x0406, 49, 25, 0 ),
+ V( 25, 0x0303, 51, 26, 0 ),
+ V( 26, 0x0240, 52, 27, 0 ),
+ V( 27, 0x01b1, 54, 28, 0 ),
+ V( 28, 0x0144, 56, 29, 0 ),
+ V( 29, 0x00f5, 57, 30, 0 ),
+ V( 30, 0x00b7, 59, 31, 0 ),
+ V( 31, 0x008a, 60, 32, 0 ),
+ V( 32, 0x0068, 62, 33, 0 ),
+ V( 33, 0x004e, 63, 34, 0 ),
+ V( 34, 0x003b, 32, 35, 0 ),
+ V( 35, 0x002c, 33, 9, 0 ),
+ V( 36, 0x5ae1, 37, 37, 1 ),
+ V( 37, 0x484c, 64, 38, 0 ),
+ V( 38, 0x3a0d, 65, 39, 0 ),
+ V( 39, 0x2ef1, 67, 40, 0 ),
+ V( 40, 0x261f, 68, 41, 0 ),
+ V( 41, 0x1f33, 69, 42, 0 ),
+ V( 42, 0x19a8, 70, 43, 0 ),
+ V( 43, 0x1518, 72, 44, 0 ),
+ V( 44, 0x1177, 73, 45, 0 ),
+ V( 45, 0x0e74, 74, 46, 0 ),
+ V( 46, 0x0bfb, 75, 47, 0 ),
+ V( 47, 0x09f8, 77, 48, 0 ),
+ V( 48, 0x0861, 78, 49, 0 ),
+ V( 49, 0x0706, 79, 50, 0 ),
+ V( 50, 0x05cd, 48, 51, 0 ),
+ V( 51, 0x04de, 50, 52, 0 ),
+ V( 52, 0x040f, 50, 53, 0 ),
+ V( 53, 0x0363, 51, 54, 0 ),
+ V( 54, 0x02d4, 52, 55, 0 ),
+ V( 55, 0x025c, 53, 56, 0 ),
+ V( 56, 0x01f8, 54, 57, 0 ),
+ V( 57, 0x01a4, 55, 58, 0 ),
+ V( 58, 0x0160, 56, 59, 0 ),
+ V( 59, 0x0125, 57, 60, 0 ),
+ V( 60, 0x00f6, 58, 61, 0 ),
+ V( 61, 0x00cb, 59, 62, 0 ),
+ V( 62, 0x00ab, 61, 63, 0 ),
+ V( 63, 0x008f, 61, 32, 0 ),
+ V( 64, 0x5b12, 65, 65, 1 ),
+ V( 65, 0x4d04, 80, 66, 0 ),
+ V( 66, 0x412c, 81, 67, 0 ),
+ V( 67, 0x37d8, 82, 68, 0 ),
+ V( 68, 0x2fe8, 83, 69, 0 ),
+ V( 69, 0x293c, 84, 70, 0 ),
+ V( 70, 0x2379, 86, 71, 0 ),
+ V( 71, 0x1edf, 87, 72, 0 ),
+ V( 72, 0x1aa9, 87, 73, 0 ),
+ V( 73, 0x174e, 72, 74, 0 ),
+ V( 74, 0x1424, 72, 75, 0 ),
+ V( 75, 0x119c, 74, 76, 0 ),
+ V( 76, 0x0f6b, 74, 77, 0 ),
+ V( 77, 0x0d51, 75, 78, 0 ),
+ V( 78, 0x0bb6, 77, 79, 0 ),
+ V( 79, 0x0a40, 77, 48, 0 ),
+ V( 80, 0x5832, 80, 81, 1 ),
+ V( 81, 0x4d1c, 88, 82, 0 ),
+ V( 82, 0x438e, 89, 83, 0 ),
+ V( 83, 0x3bdd, 90, 84, 0 ),
+ V( 84, 0x34ee, 91, 85, 0 ),
+ V( 85, 0x2eae, 92, 86, 0 ),
+ V( 86, 0x299a, 93, 87, 0 ),
+ V( 87, 0x2516, 86, 71, 0 ),
+ V( 88, 0x5570, 88, 89, 1 ),
+ V( 89, 0x4ca9, 95, 90, 0 ),
+ V( 90, 0x44d9, 96, 91, 0 ),
+ V( 91, 0x3e22, 97, 92, 0 ),
+ V( 92, 0x3824, 99, 93, 0 ),
+ V( 93, 0x32b4, 99, 94, 0 ),
+ V( 94, 0x2e17, 93, 86, 0 ),
+ V( 95, 0x56a8, 95, 96, 1 ),
+ V( 96, 0x4f46, 101, 97, 0 ),
+ V( 97, 0x47e5, 102, 98, 0 ),
+ V( 98, 0x41cf, 103, 99, 0 ),
+ V( 99, 0x3c3d, 104, 100, 0 ),
+ V( 100, 0x375e, 99, 93, 0 ),
+ V( 101, 0x5231, 105, 102, 0 ),
+ V( 102, 0x4c0f, 106, 103, 0 ),
+ V( 103, 0x4639, 107, 104, 0 ),
+ V( 104, 0x415e, 103, 99, 0 ),
+ V( 105, 0x5627, 105, 106, 1 ),
+ V( 106, 0x50e7, 108, 107, 0 ),
+ V( 107, 0x4b85, 109, 103, 0 ),
+ V( 108, 0x5597, 110, 109, 0 ),
+ V( 109, 0x504f, 111, 107, 0 ),
+ V( 110, 0x5a10, 110, 111, 1 ),
+ V( 111, 0x5522, 112, 109, 0 ),
+ V( 112, 0x59eb, 112, 111, 1 ),
+/*
+ * This last entry is used for fixed probability estimate of 0.5
+ * as recommended in Section 10.3 Table 5 of ITU-T Rec. T.851.
+ */
+ V( 113, 0x5a1d, 113, 113, 0 )
+};
diff --git a/src/3rdparty/libjpeg/jcapimin.c b/src/3rdparty/libjpeg/jcapimin.c
index 54fb8c58c5..563ab42716 100644
--- a/src/3rdparty/libjpeg/jcapimin.c
+++ b/src/3rdparty/libjpeg/jcapimin.c
@@ -63,8 +63,10 @@ jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize)
cinfo->comp_info = NULL;
- for (i = 0; i < NUM_QUANT_TBLS; i++)
+ for (i = 0; i < NUM_QUANT_TBLS; i++) {
cinfo->quant_tbl_ptrs[i] = NULL;
+ cinfo->q_scale_factor[i] = 100;
+ }
for (i = 0; i < NUM_HUFF_TBLS; i++) {
cinfo->dc_huff_tbl_ptrs[i] = NULL;
diff --git a/src/3rdparty/libjpeg/jcarith.c b/src/3rdparty/libjpeg/jcarith.c
new file mode 100644
index 0000000000..0b7ea55d40
--- /dev/null
+++ b/src/3rdparty/libjpeg/jcarith.c
@@ -0,0 +1,934 @@
+/*
+ * jcarith.c
+ *
+ * Developed 1997-2009 by Guido Vollbeding.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains portable arithmetic entropy encoding routines for JPEG
+ * (implementing the ISO/IEC IS 10918-1 and CCITT Recommendation ITU-T T.81).
+ *
+ * Both sequential and progressive modes are supported in this single module.
+ *
+ * Suspension is not currently supported in this module.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/* Expanded entropy encoder object for arithmetic encoding. */
+
+typedef struct {
+ struct jpeg_entropy_encoder pub; /* public fields */
+
+ INT32 c; /* C register, base of coding interval, layout as in sec. D.1.3 */
+ INT32 a; /* A register, normalized size of coding interval */
+ INT32 sc; /* counter for stacked 0xFF values which might overflow */
+ INT32 zc; /* counter for pending 0x00 output values which might *
+ * be discarded at the end ("Pacman" termination) */
+ int ct; /* bit shift counter, determines when next byte will be written */
+ int buffer; /* buffer for most recent output byte != 0xFF */
+
+ int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */
+ int dc_context[MAX_COMPS_IN_SCAN]; /* context index for DC conditioning */
+
+ unsigned int restarts_to_go; /* MCUs left in this restart interval */
+ int next_restart_num; /* next restart number to write (0-7) */
+
+ /* Pointers to statistics areas (these workspaces have image lifespan) */
+ unsigned char * dc_stats[NUM_ARITH_TBLS];
+ unsigned char * ac_stats[NUM_ARITH_TBLS];
+
+ /* Statistics bin for coding with fixed probability 0.5 */
+ unsigned char fixed_bin[4];
+} arith_entropy_encoder;
+
+typedef arith_entropy_encoder * arith_entropy_ptr;
+
+/* The following two definitions specify the allocation chunk size
+ * for the statistics area.
+ * According to sections F.1.4.4.1.3 and F.1.4.4.2, we need at least
+ * 49 statistics bins for DC, and 245 statistics bins for AC coding.
+ *
+ * We use a compact representation with 1 byte per statistics bin,
+ * thus the numbers directly represent byte sizes.
+ * This 1 byte per statistics bin contains the meaning of the MPS
+ * (more probable symbol) in the highest bit (mask 0x80), and the
+ * index into the probability estimation state machine table
+ * in the lower bits (mask 0x7F).
+ */
+
+#define DC_STAT_BINS 64
+#define AC_STAT_BINS 256
+
+/* NOTE: Uncomment the following #define if you want to use the
+ * given formula for calculating the AC conditioning parameter Kx
+ * for spectral selection progressive coding in section G.1.3.2
+ * of the spec (Kx = Kmin + SRL (8 + Se - Kmin) 4).
+ * Although the spec and P&M authors claim that this "has proven
+ * to give good results for 8 bit precision samples", I'm not
+ * convinced yet that this is really beneficial.
+ * Early tests gave only very marginal compression enhancements
+ * (a few - around 5 or so - bytes even for very large files),
+ * which would turn out rather negative if we'd suppress the
+ * DAC (Define Arithmetic Conditioning) marker segments for
+ * the default parameters in the future.
+ * Note that currently the marker writing module emits 12-byte
+ * DAC segments for a full-component scan in a color image.
+ * This is not worth worrying about IMHO. However, since the
+ * spec defines the default values to be used if the tables
+ * are omitted (unlike Huffman tables, which are required
+ * anyway), one might optimize this behaviour in the future,
+ * and then it would be disadvantageous to use custom tables if
+ * they don't provide sufficient gain to exceed the DAC size.
+ *
+ * On the other hand, I'd consider it as a reasonable result
+ * that the conditioning has no significant influence on the
+ * compression performance. This means that the basic
+ * statistical model is already rather stable.
+ *
+ * Thus, at the moment, we use the default conditioning values
+ * anyway, and do not use the custom formula.
+ *
+#define CALCULATE_SPECTRAL_CONDITIONING
+ */
+
+/* IRIGHT_SHIFT is like RIGHT_SHIFT, but works on int rather than INT32.
+ * We assume that int right shift is unsigned if INT32 right shift is,
+ * which should be safe.
+ */
+
+#ifdef RIGHT_SHIFT_IS_UNSIGNED
+#define ISHIFT_TEMPS int ishift_temp;
+#define IRIGHT_SHIFT(x,shft) \
+ ((ishift_temp = (x)) < 0 ? \
+ (ishift_temp >> (shft)) | ((~0) << (16-(shft))) : \
+ (ishift_temp >> (shft)))
+#else
+#define ISHIFT_TEMPS
+#define IRIGHT_SHIFT(x,shft) ((x) >> (shft))
+#endif
+
+
+LOCAL(void)
+emit_byte (int val, j_compress_ptr cinfo)
+/* Write next output byte; we do not support suspension in this module. */
+{
+ struct jpeg_destination_mgr * dest = cinfo->dest;
+
+ *dest->next_output_byte++ = (JOCTET) val;
+ if (--dest->free_in_buffer == 0)
+ if (! (*dest->empty_output_buffer) (cinfo))
+ ERREXIT(cinfo, JERR_CANT_SUSPEND);
+}
+
+
+/*
+ * Finish up at the end of an arithmetic-compressed scan.
+ */
+
+METHODDEF(void)
+finish_pass (j_compress_ptr cinfo)
+{
+ arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy;
+ INT32 temp;
+
+ /* Section D.1.8: Termination of encoding */
+
+ /* Find the e->c in the coding interval with the largest
+ * number of trailing zero bits */
+ if ((temp = (e->a - 1 + e->c) & 0xFFFF0000L) < e->c)
+ e->c = temp + 0x8000L;
+ else
+ e->c = temp;
+ /* Send remaining bytes to output */
+ e->c <<= e->ct;
+ if (e->c & 0xF8000000L) {
+ /* One final overflow has to be handled */
+ if (e->buffer >= 0) {
+ if (e->zc)
+ do emit_byte(0x00, cinfo);
+ while (--e->zc);
+ emit_byte(e->buffer + 1, cinfo);
+ if (e->buffer + 1 == 0xFF)
+ emit_byte(0x00, cinfo);
+ }
+ e->zc += e->sc; /* carry-over converts stacked 0xFF bytes to 0x00 */
+ e->sc = 0;
+ } else {
+ if (e->buffer == 0)
+ ++e->zc;
+ else if (e->buffer >= 0) {
+ if (e->zc)
+ do emit_byte(0x00, cinfo);
+ while (--e->zc);
+ emit_byte(e->buffer, cinfo);
+ }
+ if (e->sc) {
+ if (e->zc)
+ do emit_byte(0x00, cinfo);
+ while (--e->zc);
+ do {
+ emit_byte(0xFF, cinfo);
+ emit_byte(0x00, cinfo);
+ } while (--e->sc);
+ }
+ }
+ /* Output final bytes only if they are not 0x00 */
+ if (e->c & 0x7FFF800L) {
+ if (e->zc) /* output final pending zero bytes */
+ do emit_byte(0x00, cinfo);
+ while (--e->zc);
+ emit_byte((e->c >> 19) & 0xFF, cinfo);
+ if (((e->c >> 19) & 0xFF) == 0xFF)
+ emit_byte(0x00, cinfo);
+ if (e->c & 0x7F800L) {
+ emit_byte((e->c >> 11) & 0xFF, cinfo);
+ if (((e->c >> 11) & 0xFF) == 0xFF)
+ emit_byte(0x00, cinfo);
+ }
+ }
+}
+
+
+/*
+ * The core arithmetic encoding routine (common in JPEG and JBIG).
+ * This needs to go as fast as possible.
+ * Machine-dependent optimization facilities
+ * are not utilized in this portable implementation.
+ * However, this code should be fairly efficient and
+ * may be a good base for further optimizations anyway.
+ *
+ * Parameter 'val' to be encoded may be 0 or 1 (binary decision).
+ *
+ * Note: I've added full "Pacman" termination support to the
+ * byte output routines, which is equivalent to the optional
+ * Discard_final_zeros procedure (Figure D.15) in the spec.
+ * Thus, we always produce the shortest possible output
+ * stream compliant to the spec (no trailing zero bytes,
+ * except for FF stuffing).
+ *
+ * I've also introduced a new scheme for accessing
+ * the probability estimation state machine table,
+ * derived from Markus Kuhn's JBIG implementation.
+ */
+
+LOCAL(void)
+arith_encode (j_compress_ptr cinfo, unsigned char *st, int val)
+{
+ register arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy;
+ register unsigned char nl, nm;
+ register INT32 qe, temp;
+ register int sv;
+
+ /* Fetch values from our compact representation of Table D.2:
+ * Qe values and probability estimation state machine
+ */
+ sv = *st;
+ qe = jpeg_aritab[sv & 0x7F]; /* => Qe_Value */
+ nl = qe & 0xFF; qe >>= 8; /* Next_Index_LPS + Switch_MPS */
+ nm = qe & 0xFF; qe >>= 8; /* Next_Index_MPS */
+
+ /* Encode & estimation procedures per sections D.1.4 & D.1.5 */
+ e->a -= qe;
+ if (val != (sv >> 7)) {
+ /* Encode the less probable symbol */
+ if (e->a >= qe) {
+ /* If the interval size (qe) for the less probable symbol (LPS)
+ * is larger than the interval size for the MPS, then exchange
+ * the two symbols for coding efficiency, otherwise code the LPS
+ * as usual: */
+ e->c += e->a;
+ e->a = qe;
+ }
+ *st = (sv & 0x80) ^ nl; /* Estimate_after_LPS */
+ } else {
+ /* Encode the more probable symbol */
+ if (e->a >= 0x8000L)
+ return; /* A >= 0x8000 -> ready, no renormalization required */
+ if (e->a < qe) {
+ /* If the interval size (qe) for the less probable symbol (LPS)
+ * is larger than the interval size for the MPS, then exchange
+ * the two symbols for coding efficiency: */
+ e->c += e->a;
+ e->a = qe;
+ }
+ *st = (sv & 0x80) ^ nm; /* Estimate_after_MPS */
+ }
+
+ /* Renormalization & data output per section D.1.6 */
+ do {
+ e->a <<= 1;
+ e->c <<= 1;
+ if (--e->ct == 0) {
+ /* Another byte is ready for output */
+ temp = e->c >> 19;
+ if (temp > 0xFF) {
+ /* Handle overflow over all stacked 0xFF bytes */
+ if (e->buffer >= 0) {
+ if (e->zc)
+ do emit_byte(0x00, cinfo);
+ while (--e->zc);
+ emit_byte(e->buffer + 1, cinfo);
+ if (e->buffer + 1 == 0xFF)
+ emit_byte(0x00, cinfo);
+ }
+ e->zc += e->sc; /* carry-over converts stacked 0xFF bytes to 0x00 */
+ e->sc = 0;
+ /* Note: The 3 spacer bits in the C register guarantee
+ * that the new buffer byte can't be 0xFF here
+ * (see page 160 in the P&M JPEG book). */
+ e->buffer = temp & 0xFF; /* new output byte, might overflow later */
+ } else if (temp == 0xFF) {
+ ++e->sc; /* stack 0xFF byte (which might overflow later) */
+ } else {
+ /* Output all stacked 0xFF bytes, they will not overflow any more */
+ if (e->buffer == 0)
+ ++e->zc;
+ else if (e->buffer >= 0) {
+ if (e->zc)
+ do emit_byte(0x00, cinfo);
+ while (--e->zc);
+ emit_byte(e->buffer, cinfo);
+ }
+ if (e->sc) {
+ if (e->zc)
+ do emit_byte(0x00, cinfo);
+ while (--e->zc);
+ do {
+ emit_byte(0xFF, cinfo);
+ emit_byte(0x00, cinfo);
+ } while (--e->sc);
+ }
+ e->buffer = temp & 0xFF; /* new output byte (can still overflow) */
+ }
+ e->c &= 0x7FFFFL;
+ e->ct += 8;
+ }
+ } while (e->a < 0x8000L);
+}
+
+
+/*
+ * Emit a restart marker & resynchronize predictions.
+ */
+
+LOCAL(void)
+emit_restart (j_compress_ptr cinfo, int restart_num)
+{
+ arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
+ int ci;
+ jpeg_component_info * compptr;
+
+ finish_pass(cinfo);
+
+ emit_byte(0xFF, cinfo);
+ emit_byte(JPEG_RST0 + restart_num, cinfo);
+
+ /* Re-initialize statistics areas */
+ for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+ compptr = cinfo->cur_comp_info[ci];
+ /* DC needs no table for refinement scan */
+ if (cinfo->Ss == 0 && cinfo->Ah == 0) {
+ MEMZERO(entropy->dc_stats[compptr->dc_tbl_no], DC_STAT_BINS);
+ /* Reset DC predictions to 0 */
+ entropy->last_dc_val[ci] = 0;
+ entropy->dc_context[ci] = 0;
+ }
+ /* AC needs no table when not present */
+ if (cinfo->Se) {
+ MEMZERO(entropy->ac_stats[compptr->ac_tbl_no], AC_STAT_BINS);
+ }
+ }
+
+ /* Reset arithmetic encoding variables */
+ entropy->c = 0;
+ entropy->a = 0x10000L;
+ entropy->sc = 0;
+ entropy->zc = 0;
+ entropy->ct = 11;
+ entropy->buffer = -1; /* empty */
+}
+
+
+/*
+ * MCU encoding for DC initial scan (either spectral selection,
+ * or first pass of successive approximation).
+ */
+
+METHODDEF(boolean)
+encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
+ JBLOCKROW block;
+ unsigned char *st;
+ int blkn, ci, tbl;
+ int v, v2, m;
+ ISHIFT_TEMPS
+
+ /* Emit restart marker if needed */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0) {
+ emit_restart(cinfo, entropy->next_restart_num);
+ entropy->restarts_to_go = cinfo->restart_interval;
+ entropy->next_restart_num++;
+ entropy->next_restart_num &= 7;
+ }
+ entropy->restarts_to_go--;
+ }
+
+ /* Encode the MCU data blocks */
+ for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+ block = MCU_data[blkn];
+ ci = cinfo->MCU_membership[blkn];
+ tbl = cinfo->cur_comp_info[ci]->dc_tbl_no;
+
+ /* Compute the DC value after the required point transform by Al.
+ * This is simply an arithmetic right shift.
+ */
+ m = IRIGHT_SHIFT((int) ((*block)[0]), cinfo->Al);
+
+ /* Sections F.1.4.1 & F.1.4.4.1: Encoding of DC coefficients */
+
+ /* Table F.4: Point to statistics bin S0 for DC coefficient coding */
+ st = entropy->dc_stats[tbl] + entropy->dc_context[ci];
+
+ /* Figure F.4: Encode_DC_DIFF */
+ if ((v = m - entropy->last_dc_val[ci]) == 0) {
+ arith_encode(cinfo, st, 0);
+ entropy->dc_context[ci] = 0; /* zero diff category */
+ } else {
+ entropy->last_dc_val[ci] = m;
+ arith_encode(cinfo, st, 1);
+ /* Figure F.6: Encoding nonzero value v */
+ /* Figure F.7: Encoding the sign of v */
+ if (v > 0) {
+ arith_encode(cinfo, st + 1, 0); /* Table F.4: SS = S0 + 1 */
+ st += 2; /* Table F.4: SP = S0 + 2 */
+ entropy->dc_context[ci] = 4; /* small positive diff category */
+ } else {
+ v = -v;
+ arith_encode(cinfo, st + 1, 1); /* Table F.4: SS = S0 + 1 */
+ st += 3; /* Table F.4: SN = S0 + 3 */
+ entropy->dc_context[ci] = 8; /* small negative diff category */
+ }
+ /* Figure F.8: Encoding the magnitude category of v */
+ m = 0;
+ if (v -= 1) {
+ arith_encode(cinfo, st, 1);
+ m = 1;
+ v2 = v;
+ st = entropy->dc_stats[tbl] + 20; /* Table F.4: X1 = 20 */
+ while (v2 >>= 1) {
+ arith_encode(cinfo, st, 1);
+ m <<= 1;
+ st += 1;
+ }
+ }
+ arith_encode(cinfo, st, 0);
+ /* Section F.1.4.4.1.2: Establish dc_context conditioning category */
+ if (m < (int) ((1L << cinfo->arith_dc_L[tbl]) >> 1))
+ entropy->dc_context[ci] = 0; /* zero diff category */
+ else if (m > (int) ((1L << cinfo->arith_dc_U[tbl]) >> 1))
+ entropy->dc_context[ci] += 8; /* large diff category */
+ /* Figure F.9: Encoding the magnitude bit pattern of v */
+ st += 14;
+ while (m >>= 1)
+ arith_encode(cinfo, st, (m & v) ? 1 : 0);
+ }
+ }
+
+ return TRUE;
+}
+
+
+/*
+ * MCU encoding for AC initial scan (either spectral selection,
+ * or first pass of successive approximation).
+ */
+
+METHODDEF(boolean)
+encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
+ JBLOCKROW block;
+ unsigned char *st;
+ int tbl, k, ke;
+ int v, v2, m;
+ const int * natural_order;
+
+ /* Emit restart marker if needed */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0) {
+ emit_restart(cinfo, entropy->next_restart_num);
+ entropy->restarts_to_go = cinfo->restart_interval;
+ entropy->next_restart_num++;
+ entropy->next_restart_num &= 7;
+ }
+ entropy->restarts_to_go--;
+ }
+
+ natural_order = cinfo->natural_order;
+
+ /* Encode the MCU data block */
+ block = MCU_data[0];
+ tbl = cinfo->cur_comp_info[0]->ac_tbl_no;
+
+ /* Sections F.1.4.2 & F.1.4.4.2: Encoding of AC coefficients */
+
+ /* Establish EOB (end-of-block) index */
+ for (ke = cinfo->Se; ke > 0; ke--)
+ /* We must apply the point transform by Al. For AC coefficients this
+ * is an integer division with rounding towards 0. To do this portably
+ * in C, we shift after obtaining the absolute value.
+ */
+ if ((v = (*block)[natural_order[ke]]) >= 0) {
+ if (v >>= cinfo->Al) break;
+ } else {
+ v = -v;
+ if (v >>= cinfo->Al) break;
+ }
+
+ /* Figure F.5: Encode_AC_Coefficients */
+ for (k = cinfo->Ss; k <= ke; k++) {
+ st = entropy->ac_stats[tbl] + 3 * (k - 1);
+ arith_encode(cinfo, st, 0); /* EOB decision */
+ for (;;) {
+ if ((v = (*block)[natural_order[k]]) >= 0) {
+ if (v >>= cinfo->Al) {
+ arith_encode(cinfo, st + 1, 1);
+ arith_encode(cinfo, entropy->fixed_bin, 0);
+ break;
+ }
+ } else {
+ v = -v;
+ if (v >>= cinfo->Al) {
+ arith_encode(cinfo, st + 1, 1);
+ arith_encode(cinfo, entropy->fixed_bin, 1);
+ break;
+ }
+ }
+ arith_encode(cinfo, st + 1, 0); st += 3; k++;
+ }
+ st += 2;
+ /* Figure F.8: Encoding the magnitude category of v */
+ m = 0;
+ if (v -= 1) {
+ arith_encode(cinfo, st, 1);
+ m = 1;
+ v2 = v;
+ if (v2 >>= 1) {
+ arith_encode(cinfo, st, 1);
+ m <<= 1;
+ st = entropy->ac_stats[tbl] +
+ (k <= cinfo->arith_ac_K[tbl] ? 189 : 217);
+ while (v2 >>= 1) {
+ arith_encode(cinfo, st, 1);
+ m <<= 1;
+ st += 1;
+ }
+ }
+ }
+ arith_encode(cinfo, st, 0);
+ /* Figure F.9: Encoding the magnitude bit pattern of v */
+ st += 14;
+ while (m >>= 1)
+ arith_encode(cinfo, st, (m & v) ? 1 : 0);
+ }
+ /* Encode EOB decision only if k <= cinfo->Se */
+ if (k <= cinfo->Se) {
+ st = entropy->ac_stats[tbl] + 3 * (k - 1);
+ arith_encode(cinfo, st, 1);
+ }
+
+ return TRUE;
+}
+
+
+/*
+ * MCU encoding for DC successive approximation refinement scan.
+ */
+
+METHODDEF(boolean)
+encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
+ unsigned char *st;
+ int Al, blkn;
+
+ /* Emit restart marker if needed */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0) {
+ emit_restart(cinfo, entropy->next_restart_num);
+ entropy->restarts_to_go = cinfo->restart_interval;
+ entropy->next_restart_num++;
+ entropy->next_restart_num &= 7;
+ }
+ entropy->restarts_to_go--;
+ }
+
+ st = entropy->fixed_bin; /* use fixed probability estimation */
+ Al = cinfo->Al;
+
+ /* Encode the MCU data blocks */
+ for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+ /* We simply emit the Al'th bit of the DC coefficient value. */
+ arith_encode(cinfo, st, (MCU_data[blkn][0][0] >> Al) & 1);
+ }
+
+ return TRUE;
+}
+
+
+/*
+ * MCU encoding for AC successive approximation refinement scan.
+ */
+
+METHODDEF(boolean)
+encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
+ JBLOCKROW block;
+ unsigned char *st;
+ int tbl, k, ke, kex;
+ int v;
+ const int * natural_order;
+
+ /* Emit restart marker if needed */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0) {
+ emit_restart(cinfo, entropy->next_restart_num);
+ entropy->restarts_to_go = cinfo->restart_interval;
+ entropy->next_restart_num++;
+ entropy->next_restart_num &= 7;
+ }
+ entropy->restarts_to_go--;
+ }
+
+ natural_order = cinfo->natural_order;
+
+ /* Encode the MCU data block */
+ block = MCU_data[0];
+ tbl = cinfo->cur_comp_info[0]->ac_tbl_no;
+
+ /* Section G.1.3.3: Encoding of AC coefficients */
+
+ /* Establish EOB (end-of-block) index */
+ for (ke = cinfo->Se; ke > 0; ke--)
+ /* We must apply the point transform by Al. For AC coefficients this
+ * is an integer division with rounding towards 0. To do this portably
+ * in C, we shift after obtaining the absolute value.
+ */
+ if ((v = (*block)[natural_order[ke]]) >= 0) {
+ if (v >>= cinfo->Al) break;
+ } else {
+ v = -v;
+ if (v >>= cinfo->Al) break;
+ }
+
+ /* Establish EOBx (previous stage end-of-block) index */
+ for (kex = ke; kex > 0; kex--)
+ if ((v = (*block)[natural_order[kex]]) >= 0) {
+ if (v >>= cinfo->Ah) break;
+ } else {
+ v = -v;
+ if (v >>= cinfo->Ah) break;
+ }
+
+ /* Figure G.10: Encode_AC_Coefficients_SA */
+ for (k = cinfo->Ss; k <= ke; k++) {
+ st = entropy->ac_stats[tbl] + 3 * (k - 1);
+ if (k > kex)
+ arith_encode(cinfo, st, 0); /* EOB decision */
+ for (;;) {
+ if ((v = (*block)[natural_order[k]]) >= 0) {
+ if (v >>= cinfo->Al) {
+ if (v >> 1) /* previously nonzero coef */
+ arith_encode(cinfo, st + 2, (v & 1));
+ else { /* newly nonzero coef */
+ arith_encode(cinfo, st + 1, 1);
+ arith_encode(cinfo, entropy->fixed_bin, 0);
+ }
+ break;
+ }
+ } else {
+ v = -v;
+ if (v >>= cinfo->Al) {
+ if (v >> 1) /* previously nonzero coef */
+ arith_encode(cinfo, st + 2, (v & 1));
+ else { /* newly nonzero coef */
+ arith_encode(cinfo, st + 1, 1);
+ arith_encode(cinfo, entropy->fixed_bin, 1);
+ }
+ break;
+ }
+ }
+ arith_encode(cinfo, st + 1, 0); st += 3; k++;
+ }
+ }
+ /* Encode EOB decision only if k <= cinfo->Se */
+ if (k <= cinfo->Se) {
+ st = entropy->ac_stats[tbl] + 3 * (k - 1);
+ arith_encode(cinfo, st, 1);
+ }
+
+ return TRUE;
+}
+
+
+/*
+ * Encode and output one MCU's worth of arithmetic-compressed coefficients.
+ */
+
+METHODDEF(boolean)
+encode_mcu (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
+ jpeg_component_info * compptr;
+ JBLOCKROW block;
+ unsigned char *st;
+ int blkn, ci, tbl, k, ke;
+ int v, v2, m;
+ const int * natural_order;
+
+ /* Emit restart marker if needed */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0) {
+ emit_restart(cinfo, entropy->next_restart_num);
+ entropy->restarts_to_go = cinfo->restart_interval;
+ entropy->next_restart_num++;
+ entropy->next_restart_num &= 7;
+ }
+ entropy->restarts_to_go--;
+ }
+
+ natural_order = cinfo->natural_order;
+
+ /* Encode the MCU data blocks */
+ for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+ block = MCU_data[blkn];
+ ci = cinfo->MCU_membership[blkn];
+ compptr = cinfo->cur_comp_info[ci];
+
+ /* Sections F.1.4.1 & F.1.4.4.1: Encoding of DC coefficients */
+
+ tbl = compptr->dc_tbl_no;
+
+ /* Table F.4: Point to statistics bin S0 for DC coefficient coding */
+ st = entropy->dc_stats[tbl] + entropy->dc_context[ci];
+
+ /* Figure F.4: Encode_DC_DIFF */
+ if ((v = (*block)[0] - entropy->last_dc_val[ci]) == 0) {
+ arith_encode(cinfo, st, 0);
+ entropy->dc_context[ci] = 0; /* zero diff category */
+ } else {
+ entropy->last_dc_val[ci] = (*block)[0];
+ arith_encode(cinfo, st, 1);
+ /* Figure F.6: Encoding nonzero value v */
+ /* Figure F.7: Encoding the sign of v */
+ if (v > 0) {
+ arith_encode(cinfo, st + 1, 0); /* Table F.4: SS = S0 + 1 */
+ st += 2; /* Table F.4: SP = S0 + 2 */
+ entropy->dc_context[ci] = 4; /* small positive diff category */
+ } else {
+ v = -v;
+ arith_encode(cinfo, st + 1, 1); /* Table F.4: SS = S0 + 1 */
+ st += 3; /* Table F.4: SN = S0 + 3 */
+ entropy->dc_context[ci] = 8; /* small negative diff category */
+ }
+ /* Figure F.8: Encoding the magnitude category of v */
+ m = 0;
+ if (v -= 1) {
+ arith_encode(cinfo, st, 1);
+ m = 1;
+ v2 = v;
+ st = entropy->dc_stats[tbl] + 20; /* Table F.4: X1 = 20 */
+ while (v2 >>= 1) {
+ arith_encode(cinfo, st, 1);
+ m <<= 1;
+ st += 1;
+ }
+ }
+ arith_encode(cinfo, st, 0);
+ /* Section F.1.4.4.1.2: Establish dc_context conditioning category */
+ if (m < (int) ((1L << cinfo->arith_dc_L[tbl]) >> 1))
+ entropy->dc_context[ci] = 0; /* zero diff category */
+ else if (m > (int) ((1L << cinfo->arith_dc_U[tbl]) >> 1))
+ entropy->dc_context[ci] += 8; /* large diff category */
+ /* Figure F.9: Encoding the magnitude bit pattern of v */
+ st += 14;
+ while (m >>= 1)
+ arith_encode(cinfo, st, (m & v) ? 1 : 0);
+ }
+
+ /* Sections F.1.4.2 & F.1.4.4.2: Encoding of AC coefficients */
+
+ tbl = compptr->ac_tbl_no;
+
+ /* Establish EOB (end-of-block) index */
+ for (ke = cinfo->lim_Se; ke > 0; ke--)
+ if ((*block)[natural_order[ke]]) break;
+
+ /* Figure F.5: Encode_AC_Coefficients */
+ for (k = 1; k <= ke; k++) {
+ st = entropy->ac_stats[tbl] + 3 * (k - 1);
+ arith_encode(cinfo, st, 0); /* EOB decision */
+ while ((v = (*block)[natural_order[k]]) == 0) {
+ arith_encode(cinfo, st + 1, 0); st += 3; k++;
+ }
+ arith_encode(cinfo, st + 1, 1);
+ /* Figure F.6: Encoding nonzero value v */
+ /* Figure F.7: Encoding the sign of v */
+ if (v > 0) {
+ arith_encode(cinfo, entropy->fixed_bin, 0);
+ } else {
+ v = -v;
+ arith_encode(cinfo, entropy->fixed_bin, 1);
+ }
+ st += 2;
+ /* Figure F.8: Encoding the magnitude category of v */
+ m = 0;
+ if (v -= 1) {
+ arith_encode(cinfo, st, 1);
+ m = 1;
+ v2 = v;
+ if (v2 >>= 1) {
+ arith_encode(cinfo, st, 1);
+ m <<= 1;
+ st = entropy->ac_stats[tbl] +
+ (k <= cinfo->arith_ac_K[tbl] ? 189 : 217);
+ while (v2 >>= 1) {
+ arith_encode(cinfo, st, 1);
+ m <<= 1;
+ st += 1;
+ }
+ }
+ }
+ arith_encode(cinfo, st, 0);
+ /* Figure F.9: Encoding the magnitude bit pattern of v */
+ st += 14;
+ while (m >>= 1)
+ arith_encode(cinfo, st, (m & v) ? 1 : 0);
+ }
+ /* Encode EOB decision only if k <= cinfo->lim_Se */
+ if (k <= cinfo->lim_Se) {
+ st = entropy->ac_stats[tbl] + 3 * (k - 1);
+ arith_encode(cinfo, st, 1);
+ }
+ }
+
+ return TRUE;
+}
+
+
+/*
+ * Initialize for an arithmetic-compressed scan.
+ */
+
+METHODDEF(void)
+start_pass (j_compress_ptr cinfo, boolean gather_statistics)
+{
+ arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
+ int ci, tbl;
+ jpeg_component_info * compptr;
+
+ if (gather_statistics)
+ /* Make sure to avoid that in the master control logic!
+ * We are fully adaptive here and need no extra
+ * statistics gathering pass!
+ */
+ ERREXIT(cinfo, JERR_NOT_COMPILED);
+
+ /* We assume jcmaster.c already validated the progressive scan parameters. */
+
+ /* Select execution routines */
+ if (cinfo->progressive_mode) {
+ if (cinfo->Ah == 0) {
+ if (cinfo->Ss == 0)
+ entropy->pub.encode_mcu = encode_mcu_DC_first;
+ else
+ entropy->pub.encode_mcu = encode_mcu_AC_first;
+ } else {
+ if (cinfo->Ss == 0)
+ entropy->pub.encode_mcu = encode_mcu_DC_refine;
+ else
+ entropy->pub.encode_mcu = encode_mcu_AC_refine;
+ }
+ } else
+ entropy->pub.encode_mcu = encode_mcu;
+
+ /* Allocate & initialize requested statistics areas */
+ for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+ compptr = cinfo->cur_comp_info[ci];
+ /* DC needs no table for refinement scan */
+ if (cinfo->Ss == 0 && cinfo->Ah == 0) {
+ tbl = compptr->dc_tbl_no;
+ if (tbl < 0 || tbl >= NUM_ARITH_TBLS)
+ ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl);
+ if (entropy->dc_stats[tbl] == NULL)
+ entropy->dc_stats[tbl] = (unsigned char *) (*cinfo->mem->alloc_small)
+ ((j_common_ptr) cinfo, JPOOL_IMAGE, DC_STAT_BINS);
+ MEMZERO(entropy->dc_stats[tbl], DC_STAT_BINS);
+ /* Initialize DC predictions to 0 */
+ entropy->last_dc_val[ci] = 0;
+ entropy->dc_context[ci] = 0;
+ }
+ /* AC needs no table when not present */
+ if (cinfo->Se) {
+ tbl = compptr->ac_tbl_no;
+ if (tbl < 0 || tbl >= NUM_ARITH_TBLS)
+ ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl);
+ if (entropy->ac_stats[tbl] == NULL)
+ entropy->ac_stats[tbl] = (unsigned char *) (*cinfo->mem->alloc_small)
+ ((j_common_ptr) cinfo, JPOOL_IMAGE, AC_STAT_BINS);
+ MEMZERO(entropy->ac_stats[tbl], AC_STAT_BINS);
+#ifdef CALCULATE_SPECTRAL_CONDITIONING
+ if (cinfo->progressive_mode)
+ /* Section G.1.3.2: Set appropriate arithmetic conditioning value Kx */
+ cinfo->arith_ac_K[tbl] = cinfo->Ss + ((8 + cinfo->Se - cinfo->Ss) >> 4);
+#endif
+ }
+ }
+
+ /* Initialize arithmetic encoding variables */
+ entropy->c = 0;
+ entropy->a = 0x10000L;
+ entropy->sc = 0;
+ entropy->zc = 0;
+ entropy->ct = 11;
+ entropy->buffer = -1; /* empty */
+
+ /* Initialize restart stuff */
+ entropy->restarts_to_go = cinfo->restart_interval;
+ entropy->next_restart_num = 0;
+}
+
+
+/*
+ * Module initialization routine for arithmetic entropy encoding.
+ */
+
+GLOBAL(void)
+jinit_arith_encoder (j_compress_ptr cinfo)
+{
+ arith_entropy_ptr entropy;
+ int i;
+
+ entropy = (arith_entropy_ptr)
+ (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+ SIZEOF(arith_entropy_encoder));
+ cinfo->entropy = (struct jpeg_entropy_encoder *) entropy;
+ entropy->pub.start_pass = start_pass;
+ entropy->pub.finish_pass = finish_pass;
+
+ /* Mark tables unallocated */
+ for (i = 0; i < NUM_ARITH_TBLS; i++) {
+ entropy->dc_stats[i] = NULL;
+ entropy->ac_stats[i] = NULL;
+ }
+
+ /* Initialize index for fixed probability estimation */
+ entropy->fixed_bin[0] = 113;
+}
diff --git a/src/3rdparty/libjpeg/jccoefct.c b/src/3rdparty/libjpeg/jccoefct.c
index 1963ddb61b..d775313b86 100644
--- a/src/3rdparty/libjpeg/jccoefct.c
+++ b/src/3rdparty/libjpeg/jccoefct.c
@@ -149,6 +149,7 @@ compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
int blkn, bi, ci, yindex, yoffset, blockcnt;
JDIMENSION ypos, xpos;
jpeg_component_info *compptr;
+ forward_DCT_ptr forward_DCT;
/* Loop to write as much as one whole iMCU row */
for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
@@ -167,17 +168,19 @@ compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
blkn = 0;
for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
compptr = cinfo->cur_comp_info[ci];
+ forward_DCT = cinfo->fdct->forward_DCT[compptr->component_index];
blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width
: compptr->last_col_width;
xpos = MCU_col_num * compptr->MCU_sample_width;
- ypos = yoffset * DCTSIZE; /* ypos == (yoffset+yindex) * DCTSIZE */
+ ypos = yoffset * compptr->DCT_v_scaled_size;
+ /* ypos == (yoffset+yindex) * DCTSIZE */
for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
if (coef->iMCU_row_num < last_iMCU_row ||
yoffset+yindex < compptr->last_row_height) {
- (*cinfo->fdct->forward_DCT) (cinfo, compptr,
- input_buf[compptr->component_index],
- coef->MCU_buffer[blkn],
- ypos, xpos, (JDIMENSION) blockcnt);
+ (*forward_DCT) (cinfo, compptr,
+ input_buf[compptr->component_index],
+ coef->MCU_buffer[blkn],
+ ypos, xpos, (JDIMENSION) blockcnt);
if (blockcnt < compptr->MCU_width) {
/* Create some dummy blocks at the right edge of the image. */
jzero_far((void FAR *) coef->MCU_buffer[blkn + blockcnt],
@@ -195,7 +198,7 @@ compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
}
}
blkn += compptr->MCU_width;
- ypos += DCTSIZE;
+ ypos += compptr->DCT_v_scaled_size;
}
}
/* Try to write the MCU. In event of a suspension failure, we will
@@ -252,6 +255,7 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
jpeg_component_info *compptr;
JBLOCKARRAY buffer;
JBLOCKROW thisblockrow, lastblockrow;
+ forward_DCT_ptr forward_DCT;
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
@@ -274,15 +278,15 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
ndummy = (int) (blocks_across % h_samp_factor);
if (ndummy > 0)
ndummy = h_samp_factor - ndummy;
+ forward_DCT = cinfo->fdct->forward_DCT[ci];
/* Perform DCT for all non-dummy blocks in this iMCU row. Each call
* on forward_DCT processes a complete horizontal row of DCT blocks.
*/
for (block_row = 0; block_row < block_rows; block_row++) {
thisblockrow = buffer[block_row];
- (*cinfo->fdct->forward_DCT) (cinfo, compptr,
- input_buf[ci], thisblockrow,
- (JDIMENSION) (block_row * DCTSIZE),
- (JDIMENSION) 0, blocks_across);
+ (*forward_DCT) (cinfo, compptr, input_buf[ci], thisblockrow,
+ (JDIMENSION) (block_row * compptr->DCT_v_scaled_size),
+ (JDIMENSION) 0, blocks_across);
if (ndummy > 0) {
/* Create dummy blocks at the right edge of the image. */
thisblockrow += blocks_across; /* => first dummy block */
diff --git a/src/3rdparty/libjpeg/jcdctmgr.c b/src/3rdparty/libjpeg/jcdctmgr.c
index 61fa79b9e6..0bbdbb685d 100644
--- a/src/3rdparty/libjpeg/jcdctmgr.c
+++ b/src/3rdparty/libjpeg/jcdctmgr.c
@@ -23,7 +23,7 @@ typedef struct {
struct jpeg_forward_dct pub; /* public fields */
/* Pointer to the DCT routine actually in use */
- forward_DCT_method_ptr do_dct;
+ forward_DCT_method_ptr do_dct[MAX_COMPONENTS];
/* The actual post-DCT divisors --- not identical to the quant table
* entries, because of scaling (especially for an unnormalized DCT).
@@ -33,7 +33,7 @@ typedef struct {
#ifdef DCT_FLOAT_SUPPORTED
/* Same as above for the floating-point case. */
- float_DCT_method_ptr do_float_dct;
+ float_DCT_method_ptr do_float_dct[MAX_COMPONENTS];
FAST_FLOAT * float_divisors[NUM_QUANT_TBLS];
#endif
} my_fdct_controller;
@@ -41,6 +41,132 @@ typedef struct {
typedef my_fdct_controller * my_fdct_ptr;
+/* The current scaled-DCT routines require ISLOW-style divisor tables,
+ * so be sure to compile that code if either ISLOW or SCALING is requested.
+ */
+#ifdef DCT_ISLOW_SUPPORTED
+#define PROVIDE_ISLOW_TABLES
+#else
+#ifdef DCT_SCALING_SUPPORTED
+#define PROVIDE_ISLOW_TABLES
+#endif
+#endif
+
+
+/*
+ * Perform forward DCT on one or more blocks of a component.
+ *
+ * The input samples are taken from the sample_data[] array starting at
+ * position start_row/start_col, and moving to the right for any additional
+ * blocks. The quantized coefficients are returned in coef_blocks[].
+ */
+
+METHODDEF(void)
+forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
+ JDIMENSION start_row, JDIMENSION start_col,
+ JDIMENSION num_blocks)
+/* This version is used for integer DCT implementations. */
+{
+ /* This routine is heavily used, so it's worth coding it tightly. */
+ my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;
+ forward_DCT_method_ptr do_dct = fdct->do_dct[compptr->component_index];
+ DCTELEM * divisors = fdct->divisors[compptr->quant_tbl_no];
+ DCTELEM workspace[DCTSIZE2]; /* work area for FDCT subroutine */
+ JDIMENSION bi;
+
+ sample_data += start_row; /* fold in the vertical offset once */
+
+ for (bi = 0; bi < num_blocks; bi++, start_col += compptr->DCT_h_scaled_size) {
+ /* Perform the DCT */
+ (*do_dct) (workspace, sample_data, start_col);
+
+ /* Quantize/descale the coefficients, and store into coef_blocks[] */
+ { register DCTELEM temp, qval;
+ register int i;
+ register JCOEFPTR output_ptr = coef_blocks[bi];
+
+ for (i = 0; i < DCTSIZE2; i++) {
+ qval = divisors[i];
+ temp = workspace[i];
+ /* Divide the coefficient value by qval, ensuring proper rounding.
+ * Since C does not specify the direction of rounding for negative
+ * quotients, we have to force the dividend positive for portability.
+ *
+ * In most files, at least half of the output values will be zero
+ * (at default quantization settings, more like three-quarters...)
+ * so we should ensure that this case is fast. On many machines,
+ * a comparison is enough cheaper than a divide to make a special test
+ * a win. Since both inputs will be nonnegative, we need only test
+ * for a < b to discover whether a/b is 0.
+ * If your machine's division is fast enough, define FAST_DIVIDE.
+ */
+#ifdef FAST_DIVIDE
+#define DIVIDE_BY(a,b) a /= b
+#else
+#define DIVIDE_BY(a,b) if (a >= b) a /= b; else a = 0
+#endif
+ if (temp < 0) {
+ temp = -temp;
+ temp += qval>>1; /* for rounding */
+ DIVIDE_BY(temp, qval);
+ temp = -temp;
+ } else {
+ temp += qval>>1; /* for rounding */
+ DIVIDE_BY(temp, qval);
+ }
+ output_ptr[i] = (JCOEF) temp;
+ }
+ }
+ }
+}
+
+
+#ifdef DCT_FLOAT_SUPPORTED
+
+METHODDEF(void)
+forward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
+ JDIMENSION start_row, JDIMENSION start_col,
+ JDIMENSION num_blocks)
+/* This version is used for floating-point DCT implementations. */
+{
+ /* This routine is heavily used, so it's worth coding it tightly. */
+ my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;
+ float_DCT_method_ptr do_dct = fdct->do_float_dct[compptr->component_index];
+ FAST_FLOAT * divisors = fdct->float_divisors[compptr->quant_tbl_no];
+ FAST_FLOAT workspace[DCTSIZE2]; /* work area for FDCT subroutine */
+ JDIMENSION bi;
+
+ sample_data += start_row; /* fold in the vertical offset once */
+
+ for (bi = 0; bi < num_blocks; bi++, start_col += compptr->DCT_h_scaled_size) {
+ /* Perform the DCT */
+ (*do_dct) (workspace, sample_data, start_col);
+
+ /* Quantize/descale the coefficients, and store into coef_blocks[] */
+ { register FAST_FLOAT temp;
+ register int i;
+ register JCOEFPTR output_ptr = coef_blocks[bi];
+
+ for (i = 0; i < DCTSIZE2; i++) {
+ /* Apply the quantization and scaling factor */
+ temp = workspace[i] * divisors[i];
+ /* Round to nearest integer.
+ * Since C does not specify the direction of rounding for negative
+ * quotients, we have to force the dividend positive for portability.
+ * The maximum coefficient size is +-16K (for 12-bit data), so this
+ * code should work for either 16-bit or 32-bit ints.
+ */
+ output_ptr[i] = (JCOEF) ((int) (temp + (FAST_FLOAT) 16384.5) - 16384);
+ }
+ }
+ }
+}
+
+#endif /* DCT_FLOAT_SUPPORTED */
+
+
/*
* Initialize for a processing pass.
* Verify that all referenced Q-tables are present, and set up
@@ -56,11 +182,170 @@ start_pass_fdctmgr (j_compress_ptr cinfo)
my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;
int ci, qtblno, i;
jpeg_component_info *compptr;
+ int method = 0;
JQUANT_TBL * qtbl;
DCTELEM * dtbl;
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
+ /* Select the proper DCT routine for this component's scaling */
+ switch ((compptr->DCT_h_scaled_size << 8) + compptr->DCT_v_scaled_size) {
+#ifdef DCT_SCALING_SUPPORTED
+ case ((1 << 8) + 1):
+ fdct->do_dct[ci] = jpeg_fdct_1x1;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((2 << 8) + 2):
+ fdct->do_dct[ci] = jpeg_fdct_2x2;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((3 << 8) + 3):
+ fdct->do_dct[ci] = jpeg_fdct_3x3;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((4 << 8) + 4):
+ fdct->do_dct[ci] = jpeg_fdct_4x4;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((5 << 8) + 5):
+ fdct->do_dct[ci] = jpeg_fdct_5x5;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((6 << 8) + 6):
+ fdct->do_dct[ci] = jpeg_fdct_6x6;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((7 << 8) + 7):
+ fdct->do_dct[ci] = jpeg_fdct_7x7;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((9 << 8) + 9):
+ fdct->do_dct[ci] = jpeg_fdct_9x9;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((10 << 8) + 10):
+ fdct->do_dct[ci] = jpeg_fdct_10x10;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((11 << 8) + 11):
+ fdct->do_dct[ci] = jpeg_fdct_11x11;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((12 << 8) + 12):
+ fdct->do_dct[ci] = jpeg_fdct_12x12;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((13 << 8) + 13):
+ fdct->do_dct[ci] = jpeg_fdct_13x13;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((14 << 8) + 14):
+ fdct->do_dct[ci] = jpeg_fdct_14x14;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((15 << 8) + 15):
+ fdct->do_dct[ci] = jpeg_fdct_15x15;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((16 << 8) + 16):
+ fdct->do_dct[ci] = jpeg_fdct_16x16;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((16 << 8) + 8):
+ fdct->do_dct[ci] = jpeg_fdct_16x8;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((14 << 8) + 7):
+ fdct->do_dct[ci] = jpeg_fdct_14x7;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((12 << 8) + 6):
+ fdct->do_dct[ci] = jpeg_fdct_12x6;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((10 << 8) + 5):
+ fdct->do_dct[ci] = jpeg_fdct_10x5;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((8 << 8) + 4):
+ fdct->do_dct[ci] = jpeg_fdct_8x4;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((6 << 8) + 3):
+ fdct->do_dct[ci] = jpeg_fdct_6x3;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((4 << 8) + 2):
+ fdct->do_dct[ci] = jpeg_fdct_4x2;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((2 << 8) + 1):
+ fdct->do_dct[ci] = jpeg_fdct_2x1;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((8 << 8) + 16):
+ fdct->do_dct[ci] = jpeg_fdct_8x16;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((7 << 8) + 14):
+ fdct->do_dct[ci] = jpeg_fdct_7x14;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((6 << 8) + 12):
+ fdct->do_dct[ci] = jpeg_fdct_6x12;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((5 << 8) + 10):
+ fdct->do_dct[ci] = jpeg_fdct_5x10;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((4 << 8) + 8):
+ fdct->do_dct[ci] = jpeg_fdct_4x8;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((3 << 8) + 6):
+ fdct->do_dct[ci] = jpeg_fdct_3x6;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((2 << 8) + 4):
+ fdct->do_dct[ci] = jpeg_fdct_2x4;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+ case ((1 << 8) + 2):
+ fdct->do_dct[ci] = jpeg_fdct_1x2;
+ method = JDCT_ISLOW; /* jfdctint uses islow-style table */
+ break;
+#endif
+ case ((DCTSIZE << 8) + DCTSIZE):
+ switch (cinfo->dct_method) {
+#ifdef DCT_ISLOW_SUPPORTED
+ case JDCT_ISLOW:
+ fdct->do_dct[ci] = jpeg_fdct_islow;
+ method = JDCT_ISLOW;
+ break;
+#endif
+#ifdef DCT_IFAST_SUPPORTED
+ case JDCT_IFAST:
+ fdct->do_dct[ci] = jpeg_fdct_ifast;
+ method = JDCT_IFAST;
+ break;
+#endif
+#ifdef DCT_FLOAT_SUPPORTED
+ case JDCT_FLOAT:
+ fdct->do_float_dct[ci] = jpeg_fdct_float;
+ method = JDCT_FLOAT;
+ break;
+#endif
+ default:
+ ERREXIT(cinfo, JERR_NOT_COMPILED);
+ break;
+ }
+ break;
+ default:
+ ERREXIT2(cinfo, JERR_BAD_DCTSIZE,
+ compptr->DCT_h_scaled_size, compptr->DCT_v_scaled_size);
+ break;
+ }
qtblno = compptr->quant_tbl_no;
/* Make sure specified quantization table is present */
if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS ||
@@ -69,8 +354,8 @@ start_pass_fdctmgr (j_compress_ptr cinfo)
qtbl = cinfo->quant_tbl_ptrs[qtblno];
/* Compute divisors for this quant table */
/* We may do this more than once for same table, but it's not a big deal */
- switch (cinfo->dct_method) {
-#ifdef DCT_ISLOW_SUPPORTED
+ switch (method) {
+#ifdef PROVIDE_ISLOW_TABLES
case JDCT_ISLOW:
/* For LL&M IDCT method, divisors are equal to raw quantization
* coefficients multiplied by 8 (to counteract scaling).
@@ -84,6 +369,7 @@ start_pass_fdctmgr (j_compress_ptr cinfo)
for (i = 0; i < DCTSIZE2; i++) {
dtbl[i] = ((DCTELEM) qtbl->quantval[i]) << 3;
}
+ fdct->pub.forward_DCT[ci] = forward_DCT;
break;
#endif
#ifdef DCT_IFAST_SUPPORTED
@@ -122,6 +408,7 @@ start_pass_fdctmgr (j_compress_ptr cinfo)
CONST_BITS-3);
}
}
+ fdct->pub.forward_DCT[ci] = forward_DCT;
break;
#endif
#ifdef DCT_FLOAT_SUPPORTED
@@ -158,6 +445,7 @@ start_pass_fdctmgr (j_compress_ptr cinfo)
}
}
}
+ fdct->pub.forward_DCT[ci] = forward_DCT_float;
break;
#endif
default:
@@ -169,175 +457,6 @@ start_pass_fdctmgr (j_compress_ptr cinfo)
/*
- * Perform forward DCT on one or more blocks of a component.
- *
- * The input samples are taken from the sample_data[] array starting at
- * position start_row/start_col, and moving to the right for any additional
- * blocks. The quantized coefficients are returned in coef_blocks[].
- */
-
-METHODDEF(void)
-forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
- JDIMENSION start_row, JDIMENSION start_col,
- JDIMENSION num_blocks)
-/* This version is used for integer DCT implementations. */
-{
- /* This routine is heavily used, so it's worth coding it tightly. */
- my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;
- forward_DCT_method_ptr do_dct = fdct->do_dct;
- DCTELEM * divisors = fdct->divisors[compptr->quant_tbl_no];
- DCTELEM workspace[DCTSIZE2]; /* work area for FDCT subroutine */
- JDIMENSION bi;
-
- sample_data += start_row; /* fold in the vertical offset once */
-
- for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) {
- /* Load data into workspace, applying unsigned->signed conversion */
- { register DCTELEM *workspaceptr;
- register JSAMPROW elemptr;
- register int elemr;
-
- workspaceptr = workspace;
- for (elemr = 0; elemr < DCTSIZE; elemr++) {
- elemptr = sample_data[elemr] + start_col;
-#if DCTSIZE == 8 /* unroll the inner loop */
- *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
- *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
- *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
- *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
- *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
- *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
- *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
- *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
-#else
- { register int elemc;
- for (elemc = DCTSIZE; elemc > 0; elemc--) {
- *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
- }
- }
-#endif
- }
- }
-
- /* Perform the DCT */
- (*do_dct) (workspace);
-
- /* Quantize/descale the coefficients, and store into coef_blocks[] */
- { register DCTELEM temp, qval;
- register int i;
- register JCOEFPTR output_ptr = coef_blocks[bi];
-
- for (i = 0; i < DCTSIZE2; i++) {
- qval = divisors[i];
- temp = workspace[i];
- /* Divide the coefficient value by qval, ensuring proper rounding.
- * Since C does not specify the direction of rounding for negative
- * quotients, we have to force the dividend positive for portability.
- *
- * In most files, at least half of the output values will be zero
- * (at default quantization settings, more like three-quarters...)
- * so we should ensure that this case is fast. On many machines,
- * a comparison is enough cheaper than a divide to make a special test
- * a win. Since both inputs will be nonnegative, we need only test
- * for a < b to discover whether a/b is 0.
- * If your machine's division is fast enough, define FAST_DIVIDE.
- */
-#ifdef FAST_DIVIDE
-#define DIVIDE_BY(a,b) a /= b
-#else
-#define DIVIDE_BY(a,b) if (a >= b) a /= b; else a = 0
-#endif
- if (temp < 0) {
- temp = -temp;
- temp += qval>>1; /* for rounding */
- DIVIDE_BY(temp, qval);
- temp = -temp;
- } else {
- temp += qval>>1; /* for rounding */
- DIVIDE_BY(temp, qval);
- }
- output_ptr[i] = (JCOEF) temp;
- }
- }
- }
-}
-
-
-#ifdef DCT_FLOAT_SUPPORTED
-
-METHODDEF(void)
-forward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
- JDIMENSION start_row, JDIMENSION start_col,
- JDIMENSION num_blocks)
-/* This version is used for floating-point DCT implementations. */
-{
- /* This routine is heavily used, so it's worth coding it tightly. */
- my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;
- float_DCT_method_ptr do_dct = fdct->do_float_dct;
- FAST_FLOAT * divisors = fdct->float_divisors[compptr->quant_tbl_no];
- FAST_FLOAT workspace[DCTSIZE2]; /* work area for FDCT subroutine */
- JDIMENSION bi;
-
- sample_data += start_row; /* fold in the vertical offset once */
-
- for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) {
- /* Load data into workspace, applying unsigned->signed conversion */
- { register FAST_FLOAT *workspaceptr;
- register JSAMPROW elemptr;
- register int elemr;
-
- workspaceptr = workspace;
- for (elemr = 0; elemr < DCTSIZE; elemr++) {
- elemptr = sample_data[elemr] + start_col;
-#if DCTSIZE == 8 /* unroll the inner loop */
- *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
- *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
- *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
- *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
- *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
- *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
- *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
- *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
-#else
- { register int elemc;
- for (elemc = DCTSIZE; elemc > 0; elemc--) {
- *workspaceptr++ = (FAST_FLOAT)
- (GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
- }
- }
-#endif
- }
- }
-
- /* Perform the DCT */
- (*do_dct) (workspace);
-
- /* Quantize/descale the coefficients, and store into coef_blocks[] */
- { register FAST_FLOAT temp;
- register int i;
- register JCOEFPTR output_ptr = coef_blocks[bi];
-
- for (i = 0; i < DCTSIZE2; i++) {
- /* Apply the quantization and scaling factor */
- temp = workspace[i] * divisors[i];
- /* Round to nearest integer.
- * Since C does not specify the direction of rounding for negative
- * quotients, we have to force the dividend positive for portability.
- * The maximum coefficient size is +-16K (for 12-bit data), so this
- * code should work for either 16-bit or 32-bit ints.
- */
- output_ptr[i] = (JCOEF) ((int) (temp + (FAST_FLOAT) 16384.5) - 16384);
- }
- }
- }
-}
-
-#endif /* DCT_FLOAT_SUPPORTED */
-
-
-/*
* Initialize FDCT manager.
*/
@@ -353,30 +472,6 @@ jinit_forward_dct (j_compress_ptr cinfo)
cinfo->fdct = (struct jpeg_forward_dct *) fdct;
fdct->pub.start_pass = start_pass_fdctmgr;
- switch (cinfo->dct_method) {
-#ifdef DCT_ISLOW_SUPPORTED
- case JDCT_ISLOW:
- fdct->pub.forward_DCT = forward_DCT;
- fdct->do_dct = jpeg_fdct_islow;
- break;
-#endif
-#ifdef DCT_IFAST_SUPPORTED
- case JDCT_IFAST:
- fdct->pub.forward_DCT = forward_DCT;
- fdct->do_dct = jpeg_fdct_ifast;
- break;
-#endif
-#ifdef DCT_FLOAT_SUPPORTED
- case JDCT_FLOAT:
- fdct->pub.forward_DCT = forward_DCT_float;
- fdct->do_float_dct = jpeg_fdct_float;
- break;
-#endif
- default:
- ERREXIT(cinfo, JERR_NOT_COMPILED);
- break;
- }
-
/* Mark divisor tables unallocated */
for (i = 0; i < NUM_QUANT_TBLS; i++) {
fdct->divisors[i] = NULL;
diff --git a/src/3rdparty/libjpeg/jchuff.c b/src/3rdparty/libjpeg/jchuff.c
index f235250548..257d7aa1f5 100644
--- a/src/3rdparty/libjpeg/jchuff.c
+++ b/src/3rdparty/libjpeg/jchuff.c
@@ -2,22 +2,48 @@
* jchuff.c
*
* Copyright (C) 1991-1997, Thomas G. Lane.
+ * Modified 2006-2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
* This file contains Huffman entropy encoding routines.
+ * Both sequential and progressive modes are supported in this single module.
*
* Much of the complexity here has to do with supporting output suspension.
* If the data destination module demands suspension, we want to be able to
* back up to the start of the current MCU. To do this, we copy state
* variables into local working storage, and update them back to the
* permanent JPEG objects only upon successful completion of an MCU.
+ *
+ * We do not support output suspension for the progressive JPEG mode, since
+ * the library currently does not allow multiple-scan files to be written
+ * with output suspension.
*/
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
-#include "jchuff.h" /* Declarations shared with jcphuff.c */
+
+
+/* The legal range of a DCT coefficient is
+ * -1024 .. +1023 for 8-bit data;
+ * -16384 .. +16383 for 12-bit data.
+ * Hence the magnitude should always fit in 10 or 14 bits respectively.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+#define MAX_COEF_BITS 10
+#else
+#define MAX_COEF_BITS 14
+#endif
+
+/* Derived data constructed for each Huffman table */
+
+typedef struct {
+ unsigned int ehufco[256]; /* code for each symbol */
+ char ehufsi[256]; /* length of code for each symbol */
+ /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */
+} c_derived_tbl;
/* Expanded entropy encoder object for Huffman encoding.
@@ -65,15 +91,32 @@ typedef struct {
c_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS];
c_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS];
-#ifdef ENTROPY_OPT_SUPPORTED /* Statistics tables for optimization */
+ /* Statistics tables for optimization */
long * dc_count_ptrs[NUM_HUFF_TBLS];
long * ac_count_ptrs[NUM_HUFF_TBLS];
-#endif
+
+ /* Following fields used only in progressive mode */
+
+ /* Mode flag: TRUE for optimization, FALSE for actual data output */
+ boolean gather_statistics;
+
+ /* next_output_byte/free_in_buffer are local copies of cinfo->dest fields.
+ */
+ JOCTET * next_output_byte; /* => next byte to write in buffer */
+ size_t free_in_buffer; /* # of byte spaces remaining in buffer */
+ j_compress_ptr cinfo; /* link to cinfo (needed for dump_buffer) */
+
+ /* Coding status for AC components */
+ int ac_tbl_no; /* the table number of the single component */
+ unsigned int EOBRUN; /* run length of EOBs */
+ unsigned int BE; /* # of buffered correction bits before MCU */
+ char * bit_buffer; /* buffer for correction bits (1 per char) */
+ /* packing correction bits tightly would save some space but cost time... */
} huff_entropy_encoder;
typedef huff_entropy_encoder * huff_entropy_ptr;
-/* Working state while writing an MCU.
+/* Working state while writing an MCU (sequential mode).
* This struct contains all the fields that are needed by subroutines.
*/
@@ -84,98 +127,37 @@ typedef struct {
j_compress_ptr cinfo; /* dump_buffer needs access to this */
} working_state;
+/* MAX_CORR_BITS is the number of bits the AC refinement correction-bit
+ * buffer can hold. Larger sizes may slightly improve compression, but
+ * 1000 is already well into the realm of overkill.
+ * The minimum safe size is 64 bits.
+ */
-/* Forward declarations */
-METHODDEF(boolean) encode_mcu_huff JPP((j_compress_ptr cinfo,
- JBLOCKROW *MCU_data));
-METHODDEF(void) finish_pass_huff JPP((j_compress_ptr cinfo));
-#ifdef ENTROPY_OPT_SUPPORTED
-METHODDEF(boolean) encode_mcu_gather JPP((j_compress_ptr cinfo,
- JBLOCKROW *MCU_data));
-METHODDEF(void) finish_pass_gather JPP((j_compress_ptr cinfo));
-#endif
-
+#define MAX_CORR_BITS 1000 /* Max # of correction bits I can buffer */
-/*
- * Initialize for a Huffman-compressed scan.
- * If gather_statistics is TRUE, we do not output anything during the scan,
- * just count the Huffman symbols used and generate Huffman code tables.
+/* IRIGHT_SHIFT is like RIGHT_SHIFT, but works on int rather than INT32.
+ * We assume that int right shift is unsigned if INT32 right shift is,
+ * which should be safe.
*/
-METHODDEF(void)
-start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics)
-{
- huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
- int ci, dctbl, actbl;
- jpeg_component_info * compptr;
-
- if (gather_statistics) {
-#ifdef ENTROPY_OPT_SUPPORTED
- entropy->pub.encode_mcu = encode_mcu_gather;
- entropy->pub.finish_pass = finish_pass_gather;
+#ifdef RIGHT_SHIFT_IS_UNSIGNED
+#define ISHIFT_TEMPS int ishift_temp;
+#define IRIGHT_SHIFT(x,shft) \
+ ((ishift_temp = (x)) < 0 ? \
+ (ishift_temp >> (shft)) | ((~0) << (16-(shft))) : \
+ (ishift_temp >> (shft)))
#else
- ERREXIT(cinfo, JERR_NOT_COMPILED);
+#define ISHIFT_TEMPS
+#define IRIGHT_SHIFT(x,shft) ((x) >> (shft))
#endif
- } else {
- entropy->pub.encode_mcu = encode_mcu_huff;
- entropy->pub.finish_pass = finish_pass_huff;
- }
-
- for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
- compptr = cinfo->cur_comp_info[ci];
- dctbl = compptr->dc_tbl_no;
- actbl = compptr->ac_tbl_no;
- if (gather_statistics) {
-#ifdef ENTROPY_OPT_SUPPORTED
- /* Check for invalid table indexes */
- /* (make_c_derived_tbl does this in the other path) */
- if (dctbl < 0 || dctbl >= NUM_HUFF_TBLS)
- ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, dctbl);
- if (actbl < 0 || actbl >= NUM_HUFF_TBLS)
- ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, actbl);
- /* Allocate and zero the statistics tables */
- /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */
- if (entropy->dc_count_ptrs[dctbl] == NULL)
- entropy->dc_count_ptrs[dctbl] = (long *)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- 257 * SIZEOF(long));
- MEMZERO(entropy->dc_count_ptrs[dctbl], 257 * SIZEOF(long));
- if (entropy->ac_count_ptrs[actbl] == NULL)
- entropy->ac_count_ptrs[actbl] = (long *)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- 257 * SIZEOF(long));
- MEMZERO(entropy->ac_count_ptrs[actbl], 257 * SIZEOF(long));
-#endif
- } else {
- /* Compute derived values for Huffman tables */
- /* We may do this more than once for a table, but it's not expensive */
- jpeg_make_c_derived_tbl(cinfo, TRUE, dctbl,
- & entropy->dc_derived_tbls[dctbl]);
- jpeg_make_c_derived_tbl(cinfo, FALSE, actbl,
- & entropy->ac_derived_tbls[actbl]);
- }
- /* Initialize DC predictions to 0 */
- entropy->saved.last_dc_val[ci] = 0;
- }
-
- /* Initialize bit buffer to empty */
- entropy->saved.put_buffer = 0;
- entropy->saved.put_bits = 0;
-
- /* Initialize restart stuff */
- entropy->restarts_to_go = cinfo->restart_interval;
- entropy->next_restart_num = 0;
-}
/*
* Compute the derived values for a Huffman table.
* This routine also performs some validation checks on the table.
- *
- * Note this is also used by jcphuff.c.
*/
-GLOBAL(void)
+LOCAL(void)
jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno,
c_derived_tbl ** pdtbl)
{
@@ -264,18 +246,27 @@ jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno,
}
-/* Outputting bytes to the file */
+/* Outputting bytes to the file.
+ * NB: these must be called only when actually outputting,
+ * that is, entropy->gather_statistics == FALSE.
+ */
/* Emit a byte, taking 'action' if must suspend. */
-#define emit_byte(state,val,action) \
+#define emit_byte_s(state,val,action) \
{ *(state)->next_output_byte++ = (JOCTET) (val); \
if (--(state)->free_in_buffer == 0) \
- if (! dump_buffer(state)) \
+ if (! dump_buffer_s(state)) \
{ action; } }
+/* Emit a byte */
+#define emit_byte_e(entropy,val) \
+ { *(entropy)->next_output_byte++ = (JOCTET) (val); \
+ if (--(entropy)->free_in_buffer == 0) \
+ dump_buffer_e(entropy); }
+
LOCAL(boolean)
-dump_buffer (working_state * state)
+dump_buffer_s (working_state * state)
/* Empty the output buffer; return TRUE if successful, FALSE if must suspend */
{
struct jpeg_destination_mgr * dest = state->cinfo->dest;
@@ -289,6 +280,20 @@ dump_buffer (working_state * state)
}
+LOCAL(void)
+dump_buffer_e (huff_entropy_ptr entropy)
+/* Empty the output buffer; we do not support suspension in this case. */
+{
+ struct jpeg_destination_mgr * dest = entropy->cinfo->dest;
+
+ if (! (*dest->empty_output_buffer) (entropy->cinfo))
+ ERREXIT(entropy->cinfo, JERR_CANT_SUSPEND);
+ /* After a successful buffer dump, must reset buffer pointers */
+ entropy->next_output_byte = dest->next_output_byte;
+ entropy->free_in_buffer = dest->free_in_buffer;
+}
+
+
/* Outputting bits to the file */
/* Only the right 24 bits of put_buffer are used; the valid bits are
@@ -299,7 +304,7 @@ dump_buffer (working_state * state)
INLINE
LOCAL(boolean)
-emit_bits (working_state * state, unsigned int code, int size)
+emit_bits_s (working_state * state, unsigned int code, int size)
/* Emit some bits; return TRUE if successful, FALSE if must suspend */
{
/* This routine is heavily used, so it's worth coding tightly. */
@@ -321,9 +326,9 @@ emit_bits (working_state * state, unsigned int code, int size)
while (put_bits >= 8) {
int c = (int) ((put_buffer >> 16) & 0xFF);
- emit_byte(state, c, return FALSE);
+ emit_byte_s(state, c, return FALSE);
if (c == 0xFF) { /* need to stuff a zero byte? */
- emit_byte(state, 0, return FALSE);
+ emit_byte_s(state, 0, return FALSE);
}
put_buffer <<= 8;
put_bits -= 8;
@@ -336,17 +341,575 @@ emit_bits (working_state * state, unsigned int code, int size)
}
+INLINE
+LOCAL(void)
+emit_bits_e (huff_entropy_ptr entropy, unsigned int code, int size)
+/* Emit some bits, unless we are in gather mode */
+{
+ /* This routine is heavily used, so it's worth coding tightly. */
+ register INT32 put_buffer = (INT32) code;
+ register int put_bits = entropy->saved.put_bits;
+
+ /* if size is 0, caller used an invalid Huffman table entry */
+ if (size == 0)
+ ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE);
+
+ if (entropy->gather_statistics)
+ return; /* do nothing if we're only getting stats */
+
+ put_buffer &= (((INT32) 1)<<size) - 1; /* mask off any extra bits in code */
+
+ put_bits += size; /* new number of bits in buffer */
+
+ put_buffer <<= 24 - put_bits; /* align incoming bits */
+
+ /* and merge with old buffer contents */
+ put_buffer |= entropy->saved.put_buffer;
+
+ while (put_bits >= 8) {
+ int c = (int) ((put_buffer >> 16) & 0xFF);
+
+ emit_byte_e(entropy, c);
+ if (c == 0xFF) { /* need to stuff a zero byte? */
+ emit_byte_e(entropy, 0);
+ }
+ put_buffer <<= 8;
+ put_bits -= 8;
+ }
+
+ entropy->saved.put_buffer = put_buffer; /* update variables */
+ entropy->saved.put_bits = put_bits;
+}
+
+
LOCAL(boolean)
-flush_bits (working_state * state)
+flush_bits_s (working_state * state)
{
- if (! emit_bits(state, 0x7F, 7)) /* fill any partial byte with ones */
+ if (! emit_bits_s(state, 0x7F, 7)) /* fill any partial byte with ones */
return FALSE;
- state->cur.put_buffer = 0; /* and reset bit-buffer to empty */
+ state->cur.put_buffer = 0; /* and reset bit-buffer to empty */
state->cur.put_bits = 0;
return TRUE;
}
+LOCAL(void)
+flush_bits_e (huff_entropy_ptr entropy)
+{
+ emit_bits_e(entropy, 0x7F, 7); /* fill any partial byte with ones */
+ entropy->saved.put_buffer = 0; /* and reset bit-buffer to empty */
+ entropy->saved.put_bits = 0;
+}
+
+
+/*
+ * Emit (or just count) a Huffman symbol.
+ */
+
+INLINE
+LOCAL(void)
+emit_dc_symbol (huff_entropy_ptr entropy, int tbl_no, int symbol)
+{
+ if (entropy->gather_statistics)
+ entropy->dc_count_ptrs[tbl_no][symbol]++;
+ else {
+ c_derived_tbl * tbl = entropy->dc_derived_tbls[tbl_no];
+ emit_bits_e(entropy, tbl->ehufco[symbol], tbl->ehufsi[symbol]);
+ }
+}
+
+
+INLINE
+LOCAL(void)
+emit_ac_symbol (huff_entropy_ptr entropy, int tbl_no, int symbol)
+{
+ if (entropy->gather_statistics)
+ entropy->ac_count_ptrs[tbl_no][symbol]++;
+ else {
+ c_derived_tbl * tbl = entropy->ac_derived_tbls[tbl_no];
+ emit_bits_e(entropy, tbl->ehufco[symbol], tbl->ehufsi[symbol]);
+ }
+}
+
+
+/*
+ * Emit bits from a correction bit buffer.
+ */
+
+LOCAL(void)
+emit_buffered_bits (huff_entropy_ptr entropy, char * bufstart,
+ unsigned int nbits)
+{
+ if (entropy->gather_statistics)
+ return; /* no real work */
+
+ while (nbits > 0) {
+ emit_bits_e(entropy, (unsigned int) (*bufstart), 1);
+ bufstart++;
+ nbits--;
+ }
+}
+
+
+/*
+ * Emit any pending EOBRUN symbol.
+ */
+
+LOCAL(void)
+emit_eobrun (huff_entropy_ptr entropy)
+{
+ register int temp, nbits;
+
+ if (entropy->EOBRUN > 0) { /* if there is any pending EOBRUN */
+ temp = entropy->EOBRUN;
+ nbits = 0;
+ while ((temp >>= 1))
+ nbits++;
+ /* safety check: shouldn't happen given limited correction-bit buffer */
+ if (nbits > 14)
+ ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE);
+
+ emit_ac_symbol(entropy, entropy->ac_tbl_no, nbits << 4);
+ if (nbits)
+ emit_bits_e(entropy, entropy->EOBRUN, nbits);
+
+ entropy->EOBRUN = 0;
+
+ /* Emit any buffered correction bits */
+ emit_buffered_bits(entropy, entropy->bit_buffer, entropy->BE);
+ entropy->BE = 0;
+ }
+}
+
+
+/*
+ * Emit a restart marker & resynchronize predictions.
+ */
+
+LOCAL(boolean)
+emit_restart_s (working_state * state, int restart_num)
+{
+ int ci;
+
+ if (! flush_bits_s(state))
+ return FALSE;
+
+ emit_byte_s(state, 0xFF, return FALSE);
+ emit_byte_s(state, JPEG_RST0 + restart_num, return FALSE);
+
+ /* Re-initialize DC predictions to 0 */
+ for (ci = 0; ci < state->cinfo->comps_in_scan; ci++)
+ state->cur.last_dc_val[ci] = 0;
+
+ /* The restart counter is not updated until we successfully write the MCU. */
+
+ return TRUE;
+}
+
+
+LOCAL(void)
+emit_restart_e (huff_entropy_ptr entropy, int restart_num)
+{
+ int ci;
+
+ emit_eobrun(entropy);
+
+ if (! entropy->gather_statistics) {
+ flush_bits_e(entropy);
+ emit_byte_e(entropy, 0xFF);
+ emit_byte_e(entropy, JPEG_RST0 + restart_num);
+ }
+
+ if (entropy->cinfo->Ss == 0) {
+ /* Re-initialize DC predictions to 0 */
+ for (ci = 0; ci < entropy->cinfo->comps_in_scan; ci++)
+ entropy->saved.last_dc_val[ci] = 0;
+ } else {
+ /* Re-initialize all AC-related fields to 0 */
+ entropy->EOBRUN = 0;
+ entropy->BE = 0;
+ }
+}
+
+
+/*
+ * MCU encoding for DC initial scan (either spectral selection,
+ * or first pass of successive approximation).
+ */
+
+METHODDEF(boolean)
+encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+ register int temp, temp2;
+ register int nbits;
+ int blkn, ci;
+ int Al = cinfo->Al;
+ JBLOCKROW block;
+ jpeg_component_info * compptr;
+ ISHIFT_TEMPS
+
+ entropy->next_output_byte = cinfo->dest->next_output_byte;
+ entropy->free_in_buffer = cinfo->dest->free_in_buffer;
+
+ /* Emit restart marker if needed */
+ if (cinfo->restart_interval)
+ if (entropy->restarts_to_go == 0)
+ emit_restart_e(entropy, entropy->next_restart_num);
+
+ /* Encode the MCU data blocks */
+ for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+ block = MCU_data[blkn];
+ ci = cinfo->MCU_membership[blkn];
+ compptr = cinfo->cur_comp_info[ci];
+
+ /* Compute the DC value after the required point transform by Al.
+ * This is simply an arithmetic right shift.
+ */
+ temp2 = IRIGHT_SHIFT((int) ((*block)[0]), Al);
+
+ /* DC differences are figured on the point-transformed values. */
+ temp = temp2 - entropy->saved.last_dc_val[ci];
+ entropy->saved.last_dc_val[ci] = temp2;
+
+ /* Encode the DC coefficient difference per section G.1.2.1 */
+ temp2 = temp;
+ if (temp < 0) {
+ temp = -temp; /* temp is abs value of input */
+ /* For a negative input, want temp2 = bitwise complement of abs(input) */
+ /* This code assumes we are on a two's complement machine */
+ temp2--;
+ }
+
+ /* Find the number of bits needed for the magnitude of the coefficient */
+ nbits = 0;
+ while (temp) {
+ nbits++;
+ temp >>= 1;
+ }
+ /* Check for out-of-range coefficient values.
+ * Since we're encoding a difference, the range limit is twice as much.
+ */
+ if (nbits > MAX_COEF_BITS+1)
+ ERREXIT(cinfo, JERR_BAD_DCT_COEF);
+
+ /* Count/emit the Huffman-coded symbol for the number of bits */
+ emit_dc_symbol(entropy, compptr->dc_tbl_no, nbits);
+
+ /* Emit that number of bits of the value, if positive, */
+ /* or the complement of its magnitude, if negative. */
+ if (nbits) /* emit_bits rejects calls with size 0 */
+ emit_bits_e(entropy, (unsigned int) temp2, nbits);
+ }
+
+ cinfo->dest->next_output_byte = entropy->next_output_byte;
+ cinfo->dest->free_in_buffer = entropy->free_in_buffer;
+
+ /* Update restart-interval state too */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0) {
+ entropy->restarts_to_go = cinfo->restart_interval;
+ entropy->next_restart_num++;
+ entropy->next_restart_num &= 7;
+ }
+ entropy->restarts_to_go--;
+ }
+
+ return TRUE;
+}
+
+
+/*
+ * MCU encoding for AC initial scan (either spectral selection,
+ * or first pass of successive approximation).
+ */
+
+METHODDEF(boolean)
+encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+ register int temp, temp2;
+ register int nbits;
+ register int r, k;
+ int Se, Al;
+ const int * natural_order;
+ JBLOCKROW block;
+
+ entropy->next_output_byte = cinfo->dest->next_output_byte;
+ entropy->free_in_buffer = cinfo->dest->free_in_buffer;
+
+ /* Emit restart marker if needed */
+ if (cinfo->restart_interval)
+ if (entropy->restarts_to_go == 0)
+ emit_restart_e(entropy, entropy->next_restart_num);
+
+ Se = cinfo->Se;
+ Al = cinfo->Al;
+ natural_order = cinfo->natural_order;
+
+ /* Encode the MCU data block */
+ block = MCU_data[0];
+
+ /* Encode the AC coefficients per section G.1.2.2, fig. G.3 */
+
+ r = 0; /* r = run length of zeros */
+
+ for (k = cinfo->Ss; k <= Se; k++) {
+ if ((temp = (*block)[natural_order[k]]) == 0) {
+ r++;
+ continue;
+ }
+ /* We must apply the point transform by Al. For AC coefficients this
+ * is an integer division with rounding towards 0. To do this portably
+ * in C, we shift after obtaining the absolute value; so the code is
+ * interwoven with finding the abs value (temp) and output bits (temp2).
+ */
+ if (temp < 0) {
+ temp = -temp; /* temp is abs value of input */
+ temp >>= Al; /* apply the point transform */
+ /* For a negative coef, want temp2 = bitwise complement of abs(coef) */
+ temp2 = ~temp;
+ } else {
+ temp >>= Al; /* apply the point transform */
+ temp2 = temp;
+ }
+ /* Watch out for case that nonzero coef is zero after point transform */
+ if (temp == 0) {
+ r++;
+ continue;
+ }
+
+ /* Emit any pending EOBRUN */
+ if (entropy->EOBRUN > 0)
+ emit_eobrun(entropy);
+ /* if run length > 15, must emit special run-length-16 codes (0xF0) */
+ while (r > 15) {
+ emit_ac_symbol(entropy, entropy->ac_tbl_no, 0xF0);
+ r -= 16;
+ }
+
+ /* Find the number of bits needed for the magnitude of the coefficient */
+ nbits = 1; /* there must be at least one 1 bit */
+ while ((temp >>= 1))
+ nbits++;
+ /* Check for out-of-range coefficient values */
+ if (nbits > MAX_COEF_BITS)
+ ERREXIT(cinfo, JERR_BAD_DCT_COEF);
+
+ /* Count/emit Huffman symbol for run length / number of bits */
+ emit_ac_symbol(entropy, entropy->ac_tbl_no, (r << 4) + nbits);
+
+ /* Emit that number of bits of the value, if positive, */
+ /* or the complement of its magnitude, if negative. */
+ emit_bits_e(entropy, (unsigned int) temp2, nbits);
+
+ r = 0; /* reset zero run length */
+ }
+
+ if (r > 0) { /* If there are trailing zeroes, */
+ entropy->EOBRUN++; /* count an EOB */
+ if (entropy->EOBRUN == 0x7FFF)
+ emit_eobrun(entropy); /* force it out to avoid overflow */
+ }
+
+ cinfo->dest->next_output_byte = entropy->next_output_byte;
+ cinfo->dest->free_in_buffer = entropy->free_in_buffer;
+
+ /* Update restart-interval state too */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0) {
+ entropy->restarts_to_go = cinfo->restart_interval;
+ entropy->next_restart_num++;
+ entropy->next_restart_num &= 7;
+ }
+ entropy->restarts_to_go--;
+ }
+
+ return TRUE;
+}
+
+
+/*
+ * MCU encoding for DC successive approximation refinement scan.
+ * Note: we assume such scans can be multi-component, although the spec
+ * is not very clear on the point.
+ */
+
+METHODDEF(boolean)
+encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+ register int temp;
+ int blkn;
+ int Al = cinfo->Al;
+ JBLOCKROW block;
+
+ entropy->next_output_byte = cinfo->dest->next_output_byte;
+ entropy->free_in_buffer = cinfo->dest->free_in_buffer;
+
+ /* Emit restart marker if needed */
+ if (cinfo->restart_interval)
+ if (entropy->restarts_to_go == 0)
+ emit_restart_e(entropy, entropy->next_restart_num);
+
+ /* Encode the MCU data blocks */
+ for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+ block = MCU_data[blkn];
+
+ /* We simply emit the Al'th bit of the DC coefficient value. */
+ temp = (*block)[0];
+ emit_bits_e(entropy, (unsigned int) (temp >> Al), 1);
+ }
+
+ cinfo->dest->next_output_byte = entropy->next_output_byte;
+ cinfo->dest->free_in_buffer = entropy->free_in_buffer;
+
+ /* Update restart-interval state too */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0) {
+ entropy->restarts_to_go = cinfo->restart_interval;
+ entropy->next_restart_num++;
+ entropy->next_restart_num &= 7;
+ }
+ entropy->restarts_to_go--;
+ }
+
+ return TRUE;
+}
+
+
+/*
+ * MCU encoding for AC successive approximation refinement scan.
+ */
+
+METHODDEF(boolean)
+encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+ register int temp;
+ register int r, k;
+ int EOB;
+ char *BR_buffer;
+ unsigned int BR;
+ int Se, Al;
+ const int * natural_order;
+ JBLOCKROW block;
+ int absvalues[DCTSIZE2];
+
+ entropy->next_output_byte = cinfo->dest->next_output_byte;
+ entropy->free_in_buffer = cinfo->dest->free_in_buffer;
+
+ /* Emit restart marker if needed */
+ if (cinfo->restart_interval)
+ if (entropy->restarts_to_go == 0)
+ emit_restart_e(entropy, entropy->next_restart_num);
+
+ Se = cinfo->Se;
+ Al = cinfo->Al;
+ natural_order = cinfo->natural_order;
+
+ /* Encode the MCU data block */
+ block = MCU_data[0];
+
+ /* It is convenient to make a pre-pass to determine the transformed
+ * coefficients' absolute values and the EOB position.
+ */
+ EOB = 0;
+ for (k = cinfo->Ss; k <= Se; k++) {
+ temp = (*block)[natural_order[k]];
+ /* We must apply the point transform by Al. For AC coefficients this
+ * is an integer division with rounding towards 0. To do this portably
+ * in C, we shift after obtaining the absolute value.
+ */
+ if (temp < 0)
+ temp = -temp; /* temp is abs value of input */
+ temp >>= Al; /* apply the point transform */
+ absvalues[k] = temp; /* save abs value for main pass */
+ if (temp == 1)
+ EOB = k; /* EOB = index of last newly-nonzero coef */
+ }
+
+ /* Encode the AC coefficients per section G.1.2.3, fig. G.7 */
+
+ r = 0; /* r = run length of zeros */
+ BR = 0; /* BR = count of buffered bits added now */
+ BR_buffer = entropy->bit_buffer + entropy->BE; /* Append bits to buffer */
+
+ for (k = cinfo->Ss; k <= Se; k++) {
+ if ((temp = absvalues[k]) == 0) {
+ r++;
+ continue;
+ }
+
+ /* Emit any required ZRLs, but not if they can be folded into EOB */
+ while (r > 15 && k <= EOB) {
+ /* emit any pending EOBRUN and the BE correction bits */
+ emit_eobrun(entropy);
+ /* Emit ZRL */
+ emit_ac_symbol(entropy, entropy->ac_tbl_no, 0xF0);
+ r -= 16;
+ /* Emit buffered correction bits that must be associated with ZRL */
+ emit_buffered_bits(entropy, BR_buffer, BR);
+ BR_buffer = entropy->bit_buffer; /* BE bits are gone now */
+ BR = 0;
+ }
+
+ /* If the coef was previously nonzero, it only needs a correction bit.
+ * NOTE: a straight translation of the spec's figure G.7 would suggest
+ * that we also need to test r > 15. But if r > 15, we can only get here
+ * if k > EOB, which implies that this coefficient is not 1.
+ */
+ if (temp > 1) {
+ /* The correction bit is the next bit of the absolute value. */
+ BR_buffer[BR++] = (char) (temp & 1);
+ continue;
+ }
+
+ /* Emit any pending EOBRUN and the BE correction bits */
+ emit_eobrun(entropy);
+
+ /* Count/emit Huffman symbol for run length / number of bits */
+ emit_ac_symbol(entropy, entropy->ac_tbl_no, (r << 4) + 1);
+
+ /* Emit output bit for newly-nonzero coef */
+ temp = ((*block)[natural_order[k]] < 0) ? 0 : 1;
+ emit_bits_e(entropy, (unsigned int) temp, 1);
+
+ /* Emit buffered correction bits that must be associated with this code */
+ emit_buffered_bits(entropy, BR_buffer, BR);
+ BR_buffer = entropy->bit_buffer; /* BE bits are gone now */
+ BR = 0;
+ r = 0; /* reset zero run length */
+ }
+
+ if (r > 0 || BR > 0) { /* If there are trailing zeroes, */
+ entropy->EOBRUN++; /* count an EOB */
+ entropy->BE += BR; /* concat my correction bits to older ones */
+ /* We force out the EOB if we risk either:
+ * 1. overflow of the EOB counter;
+ * 2. overflow of the correction bit buffer during the next MCU.
+ */
+ if (entropy->EOBRUN == 0x7FFF || entropy->BE > (MAX_CORR_BITS-DCTSIZE2+1))
+ emit_eobrun(entropy);
+ }
+
+ cinfo->dest->next_output_byte = entropy->next_output_byte;
+ cinfo->dest->free_in_buffer = entropy->free_in_buffer;
+
+ /* Update restart-interval state too */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0) {
+ entropy->restarts_to_go = cinfo->restart_interval;
+ entropy->next_restart_num++;
+ entropy->next_restart_num &= 7;
+ }
+ entropy->restarts_to_go--;
+ }
+
+ return TRUE;
+}
+
+
/* Encode a single block's worth of coefficients */
LOCAL(boolean)
@@ -356,9 +919,11 @@ encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
register int temp, temp2;
register int nbits;
register int k, r, i;
-
+ int Se = state->cinfo->lim_Se;
+ const int * natural_order = state->cinfo->natural_order;
+
/* Encode the DC coefficient difference per section F.1.2.1 */
-
+
temp = temp2 = block[0] - last_dc_val;
if (temp < 0) {
@@ -367,7 +932,7 @@ encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
/* This code assumes we are on a two's complement machine */
temp2--;
}
-
+
/* Find the number of bits needed for the magnitude of the coefficient */
nbits = 0;
while (temp) {
@@ -379,28 +944,28 @@ encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
*/
if (nbits > MAX_COEF_BITS+1)
ERREXIT(state->cinfo, JERR_BAD_DCT_COEF);
-
+
/* Emit the Huffman-coded symbol for the number of bits */
- if (! emit_bits(state, dctbl->ehufco[nbits], dctbl->ehufsi[nbits]))
+ if (! emit_bits_s(state, dctbl->ehufco[nbits], dctbl->ehufsi[nbits]))
return FALSE;
/* Emit that number of bits of the value, if positive, */
/* or the complement of its magnitude, if negative. */
if (nbits) /* emit_bits rejects calls with size 0 */
- if (! emit_bits(state, (unsigned int) temp2, nbits))
+ if (! emit_bits_s(state, (unsigned int) temp2, nbits))
return FALSE;
/* Encode the AC coefficients per section F.1.2.2 */
-
+
r = 0; /* r = run length of zeros */
-
- for (k = 1; k < DCTSIZE2; k++) {
- if ((temp = block[jpeg_natural_order[k]]) == 0) {
+
+ for (k = 1; k <= Se; k++) {
+ if ((temp = block[natural_order[k]]) == 0) {
r++;
} else {
/* if run length > 15, must emit special run-length-16 codes (0xF0) */
while (r > 15) {
- if (! emit_bits(state, actbl->ehufco[0xF0], actbl->ehufsi[0xF0]))
+ if (! emit_bits_s(state, actbl->ehufco[0xF0], actbl->ehufsi[0xF0]))
return FALSE;
r -= 16;
}
@@ -411,7 +976,7 @@ encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
/* This code assumes we are on a two's complement machine */
temp2--;
}
-
+
/* Find the number of bits needed for the magnitude of the coefficient */
nbits = 1; /* there must be at least one 1 bit */
while ((temp >>= 1))
@@ -419,24 +984,24 @@ encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
/* Check for out-of-range coefficient values */
if (nbits > MAX_COEF_BITS)
ERREXIT(state->cinfo, JERR_BAD_DCT_COEF);
-
+
/* Emit Huffman symbol for run length / number of bits */
i = (r << 4) + nbits;
- if (! emit_bits(state, actbl->ehufco[i], actbl->ehufsi[i]))
+ if (! emit_bits_s(state, actbl->ehufco[i], actbl->ehufsi[i]))
return FALSE;
/* Emit that number of bits of the value, if positive, */
/* or the complement of its magnitude, if negative. */
- if (! emit_bits(state, (unsigned int) temp2, nbits))
+ if (! emit_bits_s(state, (unsigned int) temp2, nbits))
return FALSE;
-
+
r = 0;
}
}
/* If the last coef(s) were zero, emit an end-of-block code */
if (r > 0)
- if (! emit_bits(state, actbl->ehufco[0], actbl->ehufsi[0]))
+ if (! emit_bits_s(state, actbl->ehufco[0], actbl->ehufsi[0]))
return FALSE;
return TRUE;
@@ -444,31 +1009,6 @@ encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
/*
- * Emit a restart marker & resynchronize predictions.
- */
-
-LOCAL(boolean)
-emit_restart (working_state * state, int restart_num)
-{
- int ci;
-
- if (! flush_bits(state))
- return FALSE;
-
- emit_byte(state, 0xFF, return FALSE);
- emit_byte(state, JPEG_RST0 + restart_num, return FALSE);
-
- /* Re-initialize DC predictions to 0 */
- for (ci = 0; ci < state->cinfo->comps_in_scan; ci++)
- state->cur.last_dc_val[ci] = 0;
-
- /* The restart counter is not updated until we successfully write the MCU. */
-
- return TRUE;
-}
-
-
-/*
* Encode and output one MCU's worth of Huffman-compressed coefficients.
*/
@@ -489,7 +1029,7 @@ encode_mcu_huff (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
/* Emit restart marker if needed */
if (cinfo->restart_interval) {
if (entropy->restarts_to_go == 0)
- if (! emit_restart(&state, entropy->next_restart_num))
+ if (! emit_restart_s(&state, entropy->next_restart_num))
return FALSE;
}
@@ -535,20 +1075,32 @@ finish_pass_huff (j_compress_ptr cinfo)
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
working_state state;
- /* Load up working state ... flush_bits needs it */
- state.next_output_byte = cinfo->dest->next_output_byte;
- state.free_in_buffer = cinfo->dest->free_in_buffer;
- ASSIGN_STATE(state.cur, entropy->saved);
- state.cinfo = cinfo;
+ if (cinfo->progressive_mode) {
+ entropy->next_output_byte = cinfo->dest->next_output_byte;
+ entropy->free_in_buffer = cinfo->dest->free_in_buffer;
- /* Flush out the last data */
- if (! flush_bits(&state))
- ERREXIT(cinfo, JERR_CANT_SUSPEND);
+ /* Flush out any buffered data */
+ emit_eobrun(entropy);
+ flush_bits_e(entropy);
- /* Update state */
- cinfo->dest->next_output_byte = state.next_output_byte;
- cinfo->dest->free_in_buffer = state.free_in_buffer;
- ASSIGN_STATE(entropy->saved, state.cur);
+ cinfo->dest->next_output_byte = entropy->next_output_byte;
+ cinfo->dest->free_in_buffer = entropy->free_in_buffer;
+ } else {
+ /* Load up working state ... flush_bits needs it */
+ state.next_output_byte = cinfo->dest->next_output_byte;
+ state.free_in_buffer = cinfo->dest->free_in_buffer;
+ ASSIGN_STATE(state.cur, entropy->saved);
+ state.cinfo = cinfo;
+
+ /* Flush out the last data */
+ if (! flush_bits_s(&state))
+ ERREXIT(cinfo, JERR_CANT_SUSPEND);
+
+ /* Update state */
+ cinfo->dest->next_output_byte = state.next_output_byte;
+ cinfo->dest->free_in_buffer = state.free_in_buffer;
+ ASSIGN_STATE(entropy->saved, state.cur);
+ }
}
@@ -563,8 +1115,6 @@ finish_pass_huff (j_compress_ptr cinfo)
* the compressed data.
*/
-#ifdef ENTROPY_OPT_SUPPORTED
-
/* Process a single block's worth of coefficients */
@@ -575,6 +1125,8 @@ htest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val,
register int temp;
register int nbits;
register int k, r;
+ int Se = cinfo->lim_Se;
+ const int * natural_order = cinfo->natural_order;
/* Encode the DC coefficient difference per section F.1.2.1 */
@@ -601,8 +1153,8 @@ htest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val,
r = 0; /* r = run length of zeros */
- for (k = 1; k < DCTSIZE2; k++) {
- if ((temp = block[jpeg_natural_order[k]]) == 0) {
+ for (k = 1; k <= Se; k++) {
+ if ((temp = block[natural_order[k]]) == 0) {
r++;
} else {
/* if run length > 15, must emit special run-length-16 codes (0xF0) */
@@ -675,7 +1227,6 @@ encode_mcu_gather (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
/*
* Generate the best Huffman code table for the given counts, fill htbl.
- * Note this is also used by jcphuff.c.
*
* The JPEG standard requires that no symbol be assigned a codeword of all
* one bits (so that padding bits added at the end of a compressed segment
@@ -701,7 +1252,7 @@ encode_mcu_gather (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
* So the extra complexity of an optimal algorithm doesn't seem worthwhile.
*/
-GLOBAL(void)
+LOCAL(void)
jpeg_gen_optimal_table (j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[])
{
#define MAX_CLEN 32 /* assumed maximum initial code length */
@@ -846,7 +1397,7 @@ METHODDEF(void)
finish_pass_gather (j_compress_ptr cinfo)
{
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
- int ci, dctbl, actbl;
+ int ci, tbl;
jpeg_component_info * compptr;
JHUFF_TBL **htblptr;
boolean did_dc[NUM_HUFF_TBLS];
@@ -855,32 +1406,147 @@ finish_pass_gather (j_compress_ptr cinfo)
/* It's important not to apply jpeg_gen_optimal_table more than once
* per table, because it clobbers the input frequency counts!
*/
+ if (cinfo->progressive_mode)
+ /* Flush out buffered data (all we care about is counting the EOB symbol) */
+ emit_eobrun(entropy);
+
MEMZERO(did_dc, SIZEOF(did_dc));
MEMZERO(did_ac, SIZEOF(did_ac));
for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
compptr = cinfo->cur_comp_info[ci];
- dctbl = compptr->dc_tbl_no;
- actbl = compptr->ac_tbl_no;
- if (! did_dc[dctbl]) {
- htblptr = & cinfo->dc_huff_tbl_ptrs[dctbl];
- if (*htblptr == NULL)
- *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);
- jpeg_gen_optimal_table(cinfo, *htblptr, entropy->dc_count_ptrs[dctbl]);
- did_dc[dctbl] = TRUE;
- }
- if (! did_ac[actbl]) {
- htblptr = & cinfo->ac_huff_tbl_ptrs[actbl];
- if (*htblptr == NULL)
- *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);
- jpeg_gen_optimal_table(cinfo, *htblptr, entropy->ac_count_ptrs[actbl]);
- did_ac[actbl] = TRUE;
+ /* DC needs no table for refinement scan */
+ if (cinfo->Ss == 0 && cinfo->Ah == 0) {
+ tbl = compptr->dc_tbl_no;
+ if (! did_dc[tbl]) {
+ htblptr = & cinfo->dc_huff_tbl_ptrs[tbl];
+ if (*htblptr == NULL)
+ *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);
+ jpeg_gen_optimal_table(cinfo, *htblptr, entropy->dc_count_ptrs[tbl]);
+ did_dc[tbl] = TRUE;
+ }
+ }
+ /* AC needs no table when not present */
+ if (cinfo->Se) {
+ tbl = compptr->ac_tbl_no;
+ if (! did_ac[tbl]) {
+ htblptr = & cinfo->ac_huff_tbl_ptrs[tbl];
+ if (*htblptr == NULL)
+ *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);
+ jpeg_gen_optimal_table(cinfo, *htblptr, entropy->ac_count_ptrs[tbl]);
+ did_ac[tbl] = TRUE;
+ }
}
}
}
-#endif /* ENTROPY_OPT_SUPPORTED */
+/*
+ * Initialize for a Huffman-compressed scan.
+ * If gather_statistics is TRUE, we do not output anything during the scan,
+ * just count the Huffman symbols used and generate Huffman code tables.
+ */
+
+METHODDEF(void)
+start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics)
+{
+ huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+ int ci, tbl;
+ jpeg_component_info * compptr;
+
+ if (gather_statistics)
+ entropy->pub.finish_pass = finish_pass_gather;
+ else
+ entropy->pub.finish_pass = finish_pass_huff;
+
+ if (cinfo->progressive_mode) {
+ entropy->cinfo = cinfo;
+ entropy->gather_statistics = gather_statistics;
+
+ /* We assume jcmaster.c already validated the scan parameters. */
+
+ /* Select execution routine */
+ if (cinfo->Ah == 0) {
+ if (cinfo->Ss == 0)
+ entropy->pub.encode_mcu = encode_mcu_DC_first;
+ else
+ entropy->pub.encode_mcu = encode_mcu_AC_first;
+ } else {
+ if (cinfo->Ss == 0)
+ entropy->pub.encode_mcu = encode_mcu_DC_refine;
+ else {
+ entropy->pub.encode_mcu = encode_mcu_AC_refine;
+ /* AC refinement needs a correction bit buffer */
+ if (entropy->bit_buffer == NULL)
+ entropy->bit_buffer = (char *)
+ (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+ MAX_CORR_BITS * SIZEOF(char));
+ }
+ }
+
+ /* Initialize AC stuff */
+ entropy->ac_tbl_no = cinfo->cur_comp_info[0]->ac_tbl_no;
+ entropy->EOBRUN = 0;
+ entropy->BE = 0;
+ } else {
+ if (gather_statistics)
+ entropy->pub.encode_mcu = encode_mcu_gather;
+ else
+ entropy->pub.encode_mcu = encode_mcu_huff;
+ }
+
+ for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+ compptr = cinfo->cur_comp_info[ci];
+ /* DC needs no table for refinement scan */
+ if (cinfo->Ss == 0 && cinfo->Ah == 0) {
+ tbl = compptr->dc_tbl_no;
+ if (gather_statistics) {
+ /* Check for invalid table index */
+ /* (make_c_derived_tbl does this in the other path) */
+ if (tbl < 0 || tbl >= NUM_HUFF_TBLS)
+ ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tbl);
+ /* Allocate and zero the statistics tables */
+ /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */
+ if (entropy->dc_count_ptrs[tbl] == NULL)
+ entropy->dc_count_ptrs[tbl] = (long *)
+ (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+ 257 * SIZEOF(long));
+ MEMZERO(entropy->dc_count_ptrs[tbl], 257 * SIZEOF(long));
+ } else {
+ /* Compute derived values for Huffman tables */
+ /* We may do this more than once for a table, but it's not expensive */
+ jpeg_make_c_derived_tbl(cinfo, TRUE, tbl,
+ & entropy->dc_derived_tbls[tbl]);
+ }
+ /* Initialize DC predictions to 0 */
+ entropy->saved.last_dc_val[ci] = 0;
+ }
+ /* AC needs no table when not present */
+ if (cinfo->Se) {
+ tbl = compptr->ac_tbl_no;
+ if (gather_statistics) {
+ if (tbl < 0 || tbl >= NUM_HUFF_TBLS)
+ ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tbl);
+ if (entropy->ac_count_ptrs[tbl] == NULL)
+ entropy->ac_count_ptrs[tbl] = (long *)
+ (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+ 257 * SIZEOF(long));
+ MEMZERO(entropy->ac_count_ptrs[tbl], 257 * SIZEOF(long));
+ } else {
+ jpeg_make_c_derived_tbl(cinfo, FALSE, tbl,
+ & entropy->ac_derived_tbls[tbl]);
+ }
+ }
+ }
+
+ /* Initialize bit buffer to empty */
+ entropy->saved.put_buffer = 0;
+ entropy->saved.put_bits = 0;
+
+ /* Initialize restart stuff */
+ entropy->restarts_to_go = cinfo->restart_interval;
+ entropy->next_restart_num = 0;
+}
/*
@@ -902,8 +1568,9 @@ jinit_huff_encoder (j_compress_ptr cinfo)
/* Mark tables unallocated */
for (i = 0; i < NUM_HUFF_TBLS; i++) {
entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;
-#ifdef ENTROPY_OPT_SUPPORTED
entropy->dc_count_ptrs[i] = entropy->ac_count_ptrs[i] = NULL;
-#endif
}
+
+ if (cinfo->progressive_mode)
+ entropy->bit_buffer = NULL; /* needed only in AC refinement scan */
}
diff --git a/src/3rdparty/libjpeg/jchuff.h b/src/3rdparty/libjpeg/jchuff.h
deleted file mode 100644
index a9599fc1e6..0000000000
--- a/src/3rdparty/libjpeg/jchuff.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * jchuff.h
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains declarations for Huffman entropy encoding routines
- * that are shared between the sequential encoder (jchuff.c) and the
- * progressive encoder (jcphuff.c). No other modules need to see these.
- */
-
-/* The legal range of a DCT coefficient is
- * -1024 .. +1023 for 8-bit data;
- * -16384 .. +16383 for 12-bit data.
- * Hence the magnitude should always fit in 10 or 14 bits respectively.
- */
-
-#if BITS_IN_JSAMPLE == 8
-#define MAX_COEF_BITS 10
-#else
-#define MAX_COEF_BITS 14
-#endif
-
-/* Derived data constructed for each Huffman table */
-
-typedef struct {
- unsigned int ehufco[256]; /* code for each symbol */
- char ehufsi[256]; /* length of code for each symbol */
- /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */
-} c_derived_tbl;
-
-/* Short forms of external names for systems with brain-damaged linkers. */
-
-#ifdef NEED_SHORT_EXTERNAL_NAMES
-#define jpeg_make_c_derived_tbl jMkCDerived
-#define jpeg_gen_optimal_table jGenOptTbl
-#endif /* NEED_SHORT_EXTERNAL_NAMES */
-
-/* Expand a Huffman table definition into the derived format */
-EXTERN(void) jpeg_make_c_derived_tbl
- JPP((j_compress_ptr cinfo, boolean isDC, int tblno,
- c_derived_tbl ** pdtbl));
-
-/* Generate an optimal table definition given the specified counts */
-EXTERN(void) jpeg_gen_optimal_table
- JPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[]));
diff --git a/src/3rdparty/libjpeg/jcinit.c b/src/3rdparty/libjpeg/jcinit.c
index 5efffe3316..0ba310f217 100644
--- a/src/3rdparty/libjpeg/jcinit.c
+++ b/src/3rdparty/libjpeg/jcinit.c
@@ -41,17 +41,10 @@ jinit_compress_master (j_compress_ptr cinfo)
/* Forward DCT */
jinit_forward_dct(cinfo);
/* Entropy encoding: either Huffman or arithmetic coding. */
- if (cinfo->arith_code) {
- ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
- } else {
- if (cinfo->progressive_mode) {
-#ifdef C_PROGRESSIVE_SUPPORTED
- jinit_phuff_encoder(cinfo);
-#else
- ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
- } else
- jinit_huff_encoder(cinfo);
+ if (cinfo->arith_code)
+ jinit_arith_encoder(cinfo);
+ else {
+ jinit_huff_encoder(cinfo);
}
/* Need a full-image coefficient buffer in any multi-pass mode. */
diff --git a/src/3rdparty/libjpeg/jcmainct.c b/src/3rdparty/libjpeg/jcmainct.c
index e0279a7e01..7de75d1675 100644
--- a/src/3rdparty/libjpeg/jcmainct.c
+++ b/src/3rdparty/libjpeg/jcmainct.c
@@ -118,17 +118,17 @@ process_data_simple_main (j_compress_ptr cinfo,
while (main->cur_iMCU_row < cinfo->total_iMCU_rows) {
/* Read input data if we haven't filled the main buffer yet */
- if (main->rowgroup_ctr < DCTSIZE)
+ if (main->rowgroup_ctr < (JDIMENSION) cinfo->min_DCT_v_scaled_size)
(*cinfo->prep->pre_process_data) (cinfo,
input_buf, in_row_ctr, in_rows_avail,
main->buffer, &main->rowgroup_ctr,
- (JDIMENSION) DCTSIZE);
+ (JDIMENSION) cinfo->min_DCT_v_scaled_size);
/* If we don't have a full iMCU row buffered, return to application for
* more data. Note that preprocessor will always pad to fill the iMCU row
* at the bottom of the image.
*/
- if (main->rowgroup_ctr != DCTSIZE)
+ if (main->rowgroup_ctr != (JDIMENSION) cinfo->min_DCT_v_scaled_size)
return;
/* Send the completed row to the compressor */
@@ -269,10 +269,10 @@ jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer)
ci++, compptr++) {
main->whole_image[ci] = (*cinfo->mem->request_virt_sarray)
((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
- compptr->width_in_blocks * DCTSIZE,
+ compptr->width_in_blocks * compptr->DCT_h_scaled_size,
(JDIMENSION) jround_up((long) compptr->height_in_blocks,
(long) compptr->v_samp_factor) * DCTSIZE,
- (JDIMENSION) (compptr->v_samp_factor * DCTSIZE));
+ (JDIMENSION) (compptr->v_samp_factor * compptr->DCT_v_scaled_size));
}
#else
ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
@@ -286,8 +286,8 @@ jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer)
ci++, compptr++) {
main->buffer[ci] = (*cinfo->mem->alloc_sarray)
((j_common_ptr) cinfo, JPOOL_IMAGE,
- compptr->width_in_blocks * DCTSIZE,
- (JDIMENSION) (compptr->v_samp_factor * DCTSIZE));
+ compptr->width_in_blocks * compptr->DCT_h_scaled_size,
+ (JDIMENSION) (compptr->v_samp_factor * compptr->DCT_v_scaled_size));
}
}
}
diff --git a/src/3rdparty/libjpeg/jcmarker.c b/src/3rdparty/libjpeg/jcmarker.c
index 3d1e6c6d52..2e28983424 100644
--- a/src/3rdparty/libjpeg/jcmarker.c
+++ b/src/3rdparty/libjpeg/jcmarker.c
@@ -2,6 +2,7 @@
* jcmarker.c
*
* Copyright (C) 1991-1998, Thomas G. Lane.
+ * Modified 2003-2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -153,21 +154,22 @@ emit_dqt (j_compress_ptr cinfo, int index)
ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, index);
prec = 0;
- for (i = 0; i < DCTSIZE2; i++) {
- if (qtbl->quantval[i] > 255)
+ for (i = 0; i <= cinfo->lim_Se; i++) {
+ if (qtbl->quantval[cinfo->natural_order[i]] > 255)
prec = 1;
}
if (! qtbl->sent_table) {
emit_marker(cinfo, M_DQT);
- emit_2bytes(cinfo, prec ? DCTSIZE2*2 + 1 + 2 : DCTSIZE2 + 1 + 2);
+ emit_2bytes(cinfo,
+ prec ? cinfo->lim_Se * 2 + 2 + 1 + 2 : cinfo->lim_Se + 1 + 1 + 2);
emit_byte(cinfo, index + (prec<<4));
- for (i = 0; i < DCTSIZE2; i++) {
+ for (i = 0; i <= cinfo->lim_Se; i++) {
/* The table entries must be emitted in zigzag order. */
- unsigned int qval = qtbl->quantval[jpeg_natural_order[i]];
+ unsigned int qval = qtbl->quantval[cinfo->natural_order[i]];
if (prec)
emit_byte(cinfo, (int) (qval >> 8));
emit_byte(cinfo, (int) (qval & 0xFF));
@@ -235,8 +237,12 @@ emit_dac (j_compress_ptr cinfo)
for (i = 0; i < cinfo->comps_in_scan; i++) {
compptr = cinfo->cur_comp_info[i];
- dc_in_use[compptr->dc_tbl_no] = 1;
- ac_in_use[compptr->ac_tbl_no] = 1;
+ /* DC needs no table for refinement scan */
+ if (cinfo->Ss == 0 && cinfo->Ah == 0)
+ dc_in_use[compptr->dc_tbl_no] = 1;
+ /* AC needs no table when not present */
+ if (cinfo->Se)
+ ac_in_use[compptr->ac_tbl_no] = 1;
}
length = 0;
@@ -285,13 +291,13 @@ emit_sof (j_compress_ptr cinfo, JPEG_MARKER code)
emit_2bytes(cinfo, 3 * cinfo->num_components + 2 + 5 + 1); /* length */
/* Make sure image isn't bigger than SOF field can handle */
- if ((long) cinfo->image_height > 65535L ||
- (long) cinfo->image_width > 65535L)
+ if ((long) cinfo->jpeg_height > 65535L ||
+ (long) cinfo->jpeg_width > 65535L)
ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) 65535);
emit_byte(cinfo, cinfo->data_precision);
- emit_2bytes(cinfo, (int) cinfo->image_height);
- emit_2bytes(cinfo, (int) cinfo->image_width);
+ emit_2bytes(cinfo, (int) cinfo->jpeg_height);
+ emit_2bytes(cinfo, (int) cinfo->jpeg_width);
emit_byte(cinfo, cinfo->num_components);
@@ -320,22 +326,16 @@ emit_sos (j_compress_ptr cinfo)
for (i = 0; i < cinfo->comps_in_scan; i++) {
compptr = cinfo->cur_comp_info[i];
emit_byte(cinfo, compptr->component_id);
- td = compptr->dc_tbl_no;
- ta = compptr->ac_tbl_no;
- if (cinfo->progressive_mode) {
- /* Progressive mode: only DC or only AC tables are used in one scan;
- * furthermore, Huffman coding of DC refinement uses no table at all.
- * We emit 0 for unused field(s); this is recommended by the P&M text
- * but does not seem to be specified in the standard.
- */
- if (cinfo->Ss == 0) {
- ta = 0; /* DC scan */
- if (cinfo->Ah != 0 && !cinfo->arith_code)
- td = 0; /* no DC table either */
- } else {
- td = 0; /* AC scan */
- }
- }
+
+ /* We emit 0 for unused field(s); this is recommended by the P&M text
+ * but does not seem to be specified in the standard.
+ */
+
+ /* DC needs no table for refinement scan */
+ td = cinfo->Ss == 0 && cinfo->Ah == 0 ? compptr->dc_tbl_no : 0;
+ /* AC needs no table when not present */
+ ta = cinfo->Se ? compptr->ac_tbl_no : 0;
+
emit_byte(cinfo, (td << 4) + ta);
}
@@ -346,6 +346,22 @@ emit_sos (j_compress_ptr cinfo)
LOCAL(void)
+emit_pseudo_sos (j_compress_ptr cinfo)
+/* Emit a pseudo SOS marker */
+{
+ emit_marker(cinfo, M_SOS);
+
+ emit_2bytes(cinfo, 2 + 1 + 3); /* length */
+
+ emit_byte(cinfo, 0); /* Ns */
+
+ emit_byte(cinfo, 0); /* Ss */
+ emit_byte(cinfo, cinfo->block_size * cinfo->block_size - 1); /* Se */
+ emit_byte(cinfo, 0); /* Ah/Al */
+}
+
+
+LOCAL(void)
emit_jfif_app0 (j_compress_ptr cinfo)
/* Emit a JFIF-compliant APP0 marker */
{
@@ -484,7 +500,7 @@ write_file_header (j_compress_ptr cinfo)
/*
* Write frame header.
- * This consists of DQT and SOFn markers.
+ * This consists of DQT and SOFn markers, and a conditional pseudo SOS marker.
* Note that we do not emit the SOF until we have emitted the DQT(s).
* This avoids compatibility problems with incorrect implementations that
* try to error-check the quant table numbers as soon as they see the SOF.
@@ -511,7 +527,7 @@ write_frame_header (j_compress_ptr cinfo)
* Note we assume that Huffman table numbers won't be changed later.
*/
if (cinfo->arith_code || cinfo->progressive_mode ||
- cinfo->data_precision != 8) {
+ cinfo->data_precision != 8 || cinfo->block_size != DCTSIZE) {
is_baseline = FALSE;
} else {
is_baseline = TRUE;
@@ -529,7 +545,10 @@ write_frame_header (j_compress_ptr cinfo)
/* Emit the proper SOF marker */
if (cinfo->arith_code) {
- emit_sof(cinfo, M_SOF9); /* SOF code for arithmetic coding */
+ if (cinfo->progressive_mode)
+ emit_sof(cinfo, M_SOF10); /* SOF code for progressive arithmetic */
+ else
+ emit_sof(cinfo, M_SOF9); /* SOF code for sequential arithmetic */
} else {
if (cinfo->progressive_mode)
emit_sof(cinfo, M_SOF2); /* SOF code for progressive Huffman */
@@ -538,6 +557,10 @@ write_frame_header (j_compress_ptr cinfo)
else
emit_sof(cinfo, M_SOF1); /* SOF code for non-baseline Huffman file */
}
+
+ /* Check to emit pseudo SOS marker */
+ if (cinfo->progressive_mode && cinfo->block_size != DCTSIZE)
+ emit_pseudo_sos(cinfo);
}
@@ -566,19 +589,12 @@ write_scan_header (j_compress_ptr cinfo)
*/
for (i = 0; i < cinfo->comps_in_scan; i++) {
compptr = cinfo->cur_comp_info[i];
- if (cinfo->progressive_mode) {
- /* Progressive mode: only DC or only AC tables are used in one scan */
- if (cinfo->Ss == 0) {
- if (cinfo->Ah == 0) /* DC needs no table for refinement scan */
- emit_dht(cinfo, compptr->dc_tbl_no, FALSE);
- } else {
- emit_dht(cinfo, compptr->ac_tbl_no, TRUE);
- }
- } else {
- /* Sequential mode: need both DC and AC tables */
+ /* DC needs no table for refinement scan */
+ if (cinfo->Ss == 0 && cinfo->Ah == 0)
emit_dht(cinfo, compptr->dc_tbl_no, FALSE);
+ /* AC needs no table when not present */
+ if (cinfo->Se)
emit_dht(cinfo, compptr->ac_tbl_no, TRUE);
- }
}
}
diff --git a/src/3rdparty/libjpeg/jcmaster.c b/src/3rdparty/libjpeg/jcmaster.c
index aab4020b87..5284e588d6 100644
--- a/src/3rdparty/libjpeg/jcmaster.c
+++ b/src/3rdparty/libjpeg/jcmaster.c
@@ -2,6 +2,7 @@
* jcmaster.c
*
* Copyright (C) 1991-1997, Thomas G. Lane.
+ * Modified 2003-2010 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -42,23 +43,204 @@ typedef my_comp_master * my_master_ptr;
* Support routines that do various essential calculations.
*/
+/*
+ * Compute JPEG image dimensions and related values.
+ * NOTE: this is exported for possible use by application.
+ * Hence it mustn't do anything that can't be done twice.
+ */
+
+GLOBAL(void)
+jpeg_calc_jpeg_dimensions (j_compress_ptr cinfo)
+/* Do computations that are needed before master selection phase */
+{
+#ifdef DCT_SCALING_SUPPORTED
+
+ /* Compute actual JPEG image dimensions and DCT scaling choices. */
+ if (cinfo->scale_num >= cinfo->scale_denom * 8) {
+ /* Provide 8/1 scaling */
+ cinfo->jpeg_width = cinfo->image_width << 3;
+ cinfo->jpeg_height = cinfo->image_height << 3;
+ cinfo->min_DCT_h_scaled_size = 1;
+ cinfo->min_DCT_v_scaled_size = 1;
+ } else if (cinfo->scale_num >= cinfo->scale_denom * 4) {
+ /* Provide 4/1 scaling */
+ cinfo->jpeg_width = cinfo->image_width << 2;
+ cinfo->jpeg_height = cinfo->image_height << 2;
+ cinfo->min_DCT_h_scaled_size = 2;
+ cinfo->min_DCT_v_scaled_size = 2;
+ } else if (cinfo->scale_num * 3 >= cinfo->scale_denom * 8) {
+ /* Provide 8/3 scaling */
+ cinfo->jpeg_width = (cinfo->image_width << 1) + (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 2, 3L);
+ cinfo->jpeg_height = (cinfo->image_height << 1) + (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 2, 3L);
+ cinfo->min_DCT_h_scaled_size = 3;
+ cinfo->min_DCT_v_scaled_size = 3;
+ } else if (cinfo->scale_num >= cinfo->scale_denom * 2) {
+ /* Provide 2/1 scaling */
+ cinfo->jpeg_width = cinfo->image_width << 1;
+ cinfo->jpeg_height = cinfo->image_height << 1;
+ cinfo->min_DCT_h_scaled_size = 4;
+ cinfo->min_DCT_v_scaled_size = 4;
+ } else if (cinfo->scale_num * 5 >= cinfo->scale_denom * 8) {
+ /* Provide 8/5 scaling */
+ cinfo->jpeg_width = cinfo->image_width + (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 3, 5L);
+ cinfo->jpeg_height = cinfo->image_height + (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 3, 5L);
+ cinfo->min_DCT_h_scaled_size = 5;
+ cinfo->min_DCT_v_scaled_size = 5;
+ } else if (cinfo->scale_num * 3 >= cinfo->scale_denom * 4) {
+ /* Provide 4/3 scaling */
+ cinfo->jpeg_width = cinfo->image_width + (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width, 3L);
+ cinfo->jpeg_height = cinfo->image_height + (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height, 3L);
+ cinfo->min_DCT_h_scaled_size = 6;
+ cinfo->min_DCT_v_scaled_size = 6;
+ } else if (cinfo->scale_num * 7 >= cinfo->scale_denom * 8) {
+ /* Provide 8/7 scaling */
+ cinfo->jpeg_width = cinfo->image_width + (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width, 7L);
+ cinfo->jpeg_height = cinfo->image_height + (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height, 7L);
+ cinfo->min_DCT_h_scaled_size = 7;
+ cinfo->min_DCT_v_scaled_size = 7;
+ } else if (cinfo->scale_num >= cinfo->scale_denom) {
+ /* Provide 1/1 scaling */
+ cinfo->jpeg_width = cinfo->image_width;
+ cinfo->jpeg_height = cinfo->image_height;
+ cinfo->min_DCT_h_scaled_size = 8;
+ cinfo->min_DCT_v_scaled_size = 8;
+ } else if (cinfo->scale_num * 9 >= cinfo->scale_denom * 8) {
+ /* Provide 8/9 scaling */
+ cinfo->jpeg_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 8, 9L);
+ cinfo->jpeg_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 8, 9L);
+ cinfo->min_DCT_h_scaled_size = 9;
+ cinfo->min_DCT_v_scaled_size = 9;
+ } else if (cinfo->scale_num * 5 >= cinfo->scale_denom * 4) {
+ /* Provide 4/5 scaling */
+ cinfo->jpeg_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 4, 5L);
+ cinfo->jpeg_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 4, 5L);
+ cinfo->min_DCT_h_scaled_size = 10;
+ cinfo->min_DCT_v_scaled_size = 10;
+ } else if (cinfo->scale_num * 11 >= cinfo->scale_denom * 8) {
+ /* Provide 8/11 scaling */
+ cinfo->jpeg_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 8, 11L);
+ cinfo->jpeg_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 8, 11L);
+ cinfo->min_DCT_h_scaled_size = 11;
+ cinfo->min_DCT_v_scaled_size = 11;
+ } else if (cinfo->scale_num * 3 >= cinfo->scale_denom * 2) {
+ /* Provide 2/3 scaling */
+ cinfo->jpeg_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 2, 3L);
+ cinfo->jpeg_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 2, 3L);
+ cinfo->min_DCT_h_scaled_size = 12;
+ cinfo->min_DCT_v_scaled_size = 12;
+ } else if (cinfo->scale_num * 13 >= cinfo->scale_denom * 8) {
+ /* Provide 8/13 scaling */
+ cinfo->jpeg_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 8, 13L);
+ cinfo->jpeg_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 8, 13L);
+ cinfo->min_DCT_h_scaled_size = 13;
+ cinfo->min_DCT_v_scaled_size = 13;
+ } else if (cinfo->scale_num * 7 >= cinfo->scale_denom * 4) {
+ /* Provide 4/7 scaling */
+ cinfo->jpeg_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 4, 7L);
+ cinfo->jpeg_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 4, 7L);
+ cinfo->min_DCT_h_scaled_size = 14;
+ cinfo->min_DCT_v_scaled_size = 14;
+ } else if (cinfo->scale_num * 15 >= cinfo->scale_denom * 8) {
+ /* Provide 8/15 scaling */
+ cinfo->jpeg_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 8, 15L);
+ cinfo->jpeg_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 8, 15L);
+ cinfo->min_DCT_h_scaled_size = 15;
+ cinfo->min_DCT_v_scaled_size = 15;
+ } else {
+ /* Provide 1/2 scaling */
+ cinfo->jpeg_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width, 2L);
+ cinfo->jpeg_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height, 2L);
+ cinfo->min_DCT_h_scaled_size = 16;
+ cinfo->min_DCT_v_scaled_size = 16;
+ }
+
+#else /* !DCT_SCALING_SUPPORTED */
+
+ /* Hardwire it to "no scaling" */
+ cinfo->jpeg_width = cinfo->image_width;
+ cinfo->jpeg_height = cinfo->image_height;
+ cinfo->min_DCT_h_scaled_size = DCTSIZE;
+ cinfo->min_DCT_v_scaled_size = DCTSIZE;
+
+#endif /* DCT_SCALING_SUPPORTED */
+
+ cinfo->block_size = DCTSIZE;
+ cinfo->natural_order = jpeg_natural_order;
+ cinfo->lim_Se = DCTSIZE2-1;
+}
+
+
+LOCAL(void)
+jpeg_calc_trans_dimensions (j_compress_ptr cinfo)
+{
+ if (cinfo->min_DCT_h_scaled_size < 1 || cinfo->min_DCT_h_scaled_size > 16
+ || cinfo->min_DCT_h_scaled_size != cinfo->min_DCT_v_scaled_size)
+ ERREXIT2(cinfo, JERR_BAD_DCTSIZE,
+ cinfo->min_DCT_h_scaled_size, cinfo->min_DCT_v_scaled_size);
+
+ cinfo->block_size = cinfo->min_DCT_h_scaled_size;
+
+ switch (cinfo->block_size) {
+ case 2: cinfo->natural_order = jpeg_natural_order2; break;
+ case 3: cinfo->natural_order = jpeg_natural_order3; break;
+ case 4: cinfo->natural_order = jpeg_natural_order4; break;
+ case 5: cinfo->natural_order = jpeg_natural_order5; break;
+ case 6: cinfo->natural_order = jpeg_natural_order6; break;
+ case 7: cinfo->natural_order = jpeg_natural_order7; break;
+ default: cinfo->natural_order = jpeg_natural_order; break;
+ }
+
+ cinfo->lim_Se = cinfo->block_size < DCTSIZE ?
+ cinfo->block_size * cinfo->block_size - 1 : DCTSIZE2-1;
+}
+
+
LOCAL(void)
-initial_setup (j_compress_ptr cinfo)
+initial_setup (j_compress_ptr cinfo, boolean transcode_only)
/* Do computations that are needed before master selection phase */
{
- int ci;
+ int ci, ssize;
jpeg_component_info *compptr;
long samplesperrow;
JDIMENSION jd_samplesperrow;
+ if (transcode_only)
+ jpeg_calc_trans_dimensions(cinfo);
+ else
+ jpeg_calc_jpeg_dimensions(cinfo);
+
/* Sanity check on image dimensions */
- if (cinfo->image_height <= 0 || cinfo->image_width <= 0
- || cinfo->num_components <= 0 || cinfo->input_components <= 0)
+ if (cinfo->jpeg_height <= 0 || cinfo->jpeg_width <= 0 ||
+ cinfo->num_components <= 0 || cinfo->input_components <= 0)
ERREXIT(cinfo, JERR_EMPTY_IMAGE);
/* Make sure image isn't bigger than I can handle */
- if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION ||
- (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION)
+ if ((long) cinfo->jpeg_height > (long) JPEG_MAX_DIMENSION ||
+ (long) cinfo->jpeg_width > (long) JPEG_MAX_DIMENSION)
ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION);
/* Width of an input scanline must be representable as JDIMENSION. */
@@ -95,22 +277,52 @@ initial_setup (j_compress_ptr cinfo)
ci++, compptr++) {
/* Fill in the correct component_index value; don't rely on application */
compptr->component_index = ci;
- /* For compression, we never do DCT scaling. */
- compptr->DCT_scaled_size = DCTSIZE;
+ /* In selecting the actual DCT scaling for each component, we try to
+ * scale down the chroma components via DCT scaling rather than downsampling.
+ * This saves time if the downsampler gets to use 1:1 scaling.
+ * Note this code adapts subsampling ratios which are powers of 2.
+ */
+ ssize = 1;
+#ifdef DCT_SCALING_SUPPORTED
+ while (cinfo->min_DCT_h_scaled_size * ssize <=
+ (cinfo->do_fancy_downsampling ? DCTSIZE : DCTSIZE / 2) &&
+ (cinfo->max_h_samp_factor % (compptr->h_samp_factor * ssize * 2)) == 0) {
+ ssize = ssize * 2;
+ }
+#endif
+ compptr->DCT_h_scaled_size = cinfo->min_DCT_h_scaled_size * ssize;
+ ssize = 1;
+#ifdef DCT_SCALING_SUPPORTED
+ while (cinfo->min_DCT_v_scaled_size * ssize <=
+ (cinfo->do_fancy_downsampling ? DCTSIZE : DCTSIZE / 2) &&
+ (cinfo->max_v_samp_factor % (compptr->v_samp_factor * ssize * 2)) == 0) {
+ ssize = ssize * 2;
+ }
+#endif
+ compptr->DCT_v_scaled_size = cinfo->min_DCT_v_scaled_size * ssize;
+
+ /* We don't support DCT ratios larger than 2. */
+ if (compptr->DCT_h_scaled_size > compptr->DCT_v_scaled_size * 2)
+ compptr->DCT_h_scaled_size = compptr->DCT_v_scaled_size * 2;
+ else if (compptr->DCT_v_scaled_size > compptr->DCT_h_scaled_size * 2)
+ compptr->DCT_v_scaled_size = compptr->DCT_h_scaled_size * 2;
+
/* Size in DCT blocks */
compptr->width_in_blocks = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,
- (long) (cinfo->max_h_samp_factor * DCTSIZE));
+ jdiv_round_up((long) cinfo->jpeg_width * (long) compptr->h_samp_factor,
+ (long) (cinfo->max_h_samp_factor * cinfo->block_size));
compptr->height_in_blocks = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,
- (long) (cinfo->max_v_samp_factor * DCTSIZE));
+ jdiv_round_up((long) cinfo->jpeg_height * (long) compptr->v_samp_factor,
+ (long) (cinfo->max_v_samp_factor * cinfo->block_size));
/* Size in samples */
compptr->downsampled_width = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,
- (long) cinfo->max_h_samp_factor);
+ jdiv_round_up((long) cinfo->jpeg_width *
+ (long) (compptr->h_samp_factor * compptr->DCT_h_scaled_size),
+ (long) (cinfo->max_h_samp_factor * cinfo->block_size));
compptr->downsampled_height = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,
- (long) cinfo->max_v_samp_factor);
+ jdiv_round_up((long) cinfo->jpeg_height *
+ (long) (compptr->v_samp_factor * compptr->DCT_v_scaled_size),
+ (long) (cinfo->max_v_samp_factor * cinfo->block_size));
/* Mark component needed (this flag isn't actually used for compression) */
compptr->component_needed = TRUE;
}
@@ -119,8 +331,8 @@ initial_setup (j_compress_ptr cinfo)
* main controller will call coefficient controller).
*/
cinfo->total_iMCU_rows = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height,
- (long) (cinfo->max_v_samp_factor*DCTSIZE));
+ jdiv_round_up((long) cinfo->jpeg_height,
+ (long) (cinfo->max_v_samp_factor * cinfo->block_size));
}
@@ -260,6 +472,39 @@ validate_script (j_compress_ptr cinfo)
}
}
+
+LOCAL(void)
+reduce_script (j_compress_ptr cinfo)
+/* Adapt scan script for use with reduced block size;
+ * assume that script has been validated before.
+ */
+{
+ jpeg_scan_info * scanptr;
+ int idxout, idxin;
+
+ /* Circumvent const declaration for this function */
+ scanptr = (jpeg_scan_info *) cinfo->scan_info;
+ idxout = 0;
+
+ for (idxin = 0; idxin < cinfo->num_scans; idxin++) {
+ /* After skipping, idxout becomes smaller than idxin */
+ if (idxin != idxout)
+ /* Copy rest of data;
+ * note we stay in given chunk of allocated memory.
+ */
+ scanptr[idxout] = scanptr[idxin];
+ if (scanptr[idxout].Ss > cinfo->lim_Se)
+ /* Entire scan out of range - skip this entry */
+ continue;
+ if (scanptr[idxout].Se > cinfo->lim_Se)
+ /* Limit scan to end of block */
+ scanptr[idxout].Se = cinfo->lim_Se;
+ idxout++;
+ }
+
+ cinfo->num_scans = idxout;
+}
+
#endif /* C_MULTISCAN_FILES_SUPPORTED */
@@ -280,10 +525,13 @@ select_scan_parameters (j_compress_ptr cinfo)
cinfo->cur_comp_info[ci] =
&cinfo->comp_info[scanptr->component_index[ci]];
}
- cinfo->Ss = scanptr->Ss;
- cinfo->Se = scanptr->Se;
- cinfo->Ah = scanptr->Ah;
- cinfo->Al = scanptr->Al;
+ if (cinfo->progressive_mode) {
+ cinfo->Ss = scanptr->Ss;
+ cinfo->Se = scanptr->Se;
+ cinfo->Ah = scanptr->Ah;
+ cinfo->Al = scanptr->Al;
+ return;
+ }
}
else
#endif
@@ -296,11 +544,11 @@ select_scan_parameters (j_compress_ptr cinfo)
for (ci = 0; ci < cinfo->num_components; ci++) {
cinfo->cur_comp_info[ci] = &cinfo->comp_info[ci];
}
- cinfo->Ss = 0;
- cinfo->Se = DCTSIZE2-1;
- cinfo->Ah = 0;
- cinfo->Al = 0;
}
+ cinfo->Ss = 0;
+ cinfo->Se = cinfo->block_size * cinfo->block_size - 1;
+ cinfo->Ah = 0;
+ cinfo->Al = 0;
}
@@ -325,7 +573,7 @@ per_scan_setup (j_compress_ptr cinfo)
compptr->MCU_width = 1;
compptr->MCU_height = 1;
compptr->MCU_blocks = 1;
- compptr->MCU_sample_width = DCTSIZE;
+ compptr->MCU_sample_width = compptr->DCT_h_scaled_size;
compptr->last_col_width = 1;
/* For noninterleaved scans, it is convenient to define last_row_height
* as the number of block rows present in the last iMCU row.
@@ -347,11 +595,11 @@ per_scan_setup (j_compress_ptr cinfo)
/* Overall image size in MCUs */
cinfo->MCUs_per_row = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_width,
- (long) (cinfo->max_h_samp_factor*DCTSIZE));
+ jdiv_round_up((long) cinfo->jpeg_width,
+ (long) (cinfo->max_h_samp_factor * cinfo->block_size));
cinfo->MCU_rows_in_scan = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height,
- (long) (cinfo->max_v_samp_factor*DCTSIZE));
+ jdiv_round_up((long) cinfo->jpeg_height,
+ (long) (cinfo->max_v_samp_factor * cinfo->block_size));
cinfo->blocks_in_MCU = 0;
@@ -361,7 +609,7 @@ per_scan_setup (j_compress_ptr cinfo)
compptr->MCU_width = compptr->h_samp_factor;
compptr->MCU_height = compptr->v_samp_factor;
compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height;
- compptr->MCU_sample_width = compptr->MCU_width * DCTSIZE;
+ compptr->MCU_sample_width = compptr->MCU_width * compptr->DCT_h_scaled_size;
/* Figure number of non-dummy blocks in last MCU column & row */
tmp = (int) (compptr->width_in_blocks % compptr->MCU_width);
if (tmp == 0) tmp = compptr->MCU_width;
@@ -433,7 +681,7 @@ prepare_for_pass (j_compress_ptr cinfo)
/* Do Huffman optimization for a scan after the first one. */
select_scan_parameters(cinfo);
per_scan_setup(cinfo);
- if (cinfo->Ss != 0 || cinfo->Ah == 0 || cinfo->arith_code) {
+ if (cinfo->Ss != 0 || cinfo->Ah == 0) {
(*cinfo->entropy->start_pass) (cinfo, TRUE);
(*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST);
master->pub.call_pass_startup = FALSE;
@@ -554,11 +802,13 @@ jinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only)
master->pub.is_last_pass = FALSE;
/* Validate parameters, determine derived values */
- initial_setup(cinfo);
+ initial_setup(cinfo, transcode_only);
if (cinfo->scan_info != NULL) {
#ifdef C_MULTISCAN_FILES_SUPPORTED
validate_script(cinfo);
+ if (cinfo->block_size < DCTSIZE)
+ reduce_script(cinfo);
#else
ERREXIT(cinfo, JERR_NOT_COMPILED);
#endif
@@ -567,8 +817,10 @@ jinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only)
cinfo->num_scans = 1;
}
- if (cinfo->progressive_mode) /* TEMPORARY HACK ??? */
- cinfo->optimize_coding = TRUE; /* assume default tables no good for progressive mode */
+ if ((cinfo->progressive_mode || cinfo->block_size < DCTSIZE) &&
+ !cinfo->arith_code) /* TEMPORARY HACK ??? */
+ /* assume default tables no good for progressive or downscale mode */
+ cinfo->optimize_coding = TRUE;
/* Initialize my private state */
if (transcode_only) {
diff --git a/src/3rdparty/libjpeg/jconfig.bcc b/src/3rdparty/libjpeg/jconfig.bcc
index c6c53ff63a..e4da3d72c2 100644
--- a/src/3rdparty/libjpeg/jconfig.bcc
+++ b/src/3rdparty/libjpeg/jconfig.bcc
@@ -1,5 +1,5 @@
/* jconfig.bcc --- jconfig.h for Borland C (Turbo C) on MS-DOS or OS/2. */
-/* see jconfig.doc for explanations */
+/* see jconfig.txt for explanations */
#define HAVE_PROTOTYPES
#define HAVE_UNSIGNED_CHAR
diff --git a/src/3rdparty/libjpeg/jconfig.cfg b/src/3rdparty/libjpeg/jconfig.cfg
index 36a04fa840..a23758a7b7 100644
--- a/src/3rdparty/libjpeg/jconfig.cfg
+++ b/src/3rdparty/libjpeg/jconfig.cfg
@@ -1,5 +1,5 @@
/* jconfig.cfg --- source file edited by configure script */
-/* see jconfig.doc for explanations */
+/* see jconfig.txt for explanations */
#undef HAVE_PROTOTYPES
#undef HAVE_UNSIGNED_CHAR
@@ -9,6 +9,7 @@
#undef CHAR_IS_UNSIGNED
#undef HAVE_STDDEF_H
#undef HAVE_STDLIB_H
+#undef HAVE_LOCALE_H
#undef NEED_BSD_STRINGS
#undef NEED_SYS_TYPES_H
#undef NEED_FAR_POINTERS
diff --git a/src/3rdparty/libjpeg/jconfig.dj b/src/3rdparty/libjpeg/jconfig.dj
index f759a9dbd6..a0d4092f20 100644
--- a/src/3rdparty/libjpeg/jconfig.dj
+++ b/src/3rdparty/libjpeg/jconfig.dj
@@ -1,5 +1,5 @@
/* jconfig.dj --- jconfig.h for DJGPP (Delorie's GNU C port) on MS-DOS. */
-/* see jconfig.doc for explanations */
+/* see jconfig.txt for explanations */
#define HAVE_PROTOTYPES
#define HAVE_UNSIGNED_CHAR
diff --git a/src/3rdparty/libjpeg/jconfig.doc b/src/3rdparty/libjpeg/jconfig.doc
deleted file mode 100644
index c18d1c064b..0000000000
--- a/src/3rdparty/libjpeg/jconfig.doc
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * jconfig.doc
- *
- * Copyright (C) 1991-1994, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file documents the configuration options that are required to
- * customize the JPEG software for a particular system.
- *
- * The actual configuration options for a particular installation are stored
- * in jconfig.h. On many machines, jconfig.h can be generated automatically
- * or copied from one of the "canned" jconfig files that we supply. But if
- * you need to generate a jconfig.h file by hand, this file tells you how.
- *
- * DO NOT EDIT THIS FILE --- IT WON'T ACCOMPLISH ANYTHING.
- * EDIT A COPY NAMED JCONFIG.H.
- */
-
-
-/*
- * These symbols indicate the properties of your machine or compiler.
- * #define the symbol if yes, #undef it if no.
- */
-
-/* Does your compiler support function prototypes?
- * (If not, you also need to use ansi2knr, see install.doc)
- */
-#define HAVE_PROTOTYPES
-
-/* Does your compiler support the declaration "unsigned char" ?
- * How about "unsigned short" ?
- */
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-
-/* Define "void" as "char" if your compiler doesn't know about type void.
- * NOTE: be sure to define void such that "void *" represents the most general
- * pointer type, e.g., that returned by malloc().
- */
-/* #define void char */
-
-/* Define "const" as empty if your compiler doesn't know the "const" keyword.
- */
-/* #define const */
-
-/* Define this if an ordinary "char" type is unsigned.
- * If you're not sure, leaving it undefined will work at some cost in speed.
- * If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal.
- */
-#undef CHAR_IS_UNSIGNED
-
-/* Define this if your system has an ANSI-conforming <stddef.h> file.
- */
-#define HAVE_STDDEF_H
-
-/* Define this if your system has an ANSI-conforming <stdlib.h> file.
- */
-#define HAVE_STDLIB_H
-
-/* Define this if your system does not have an ANSI/SysV <string.h>,
- * but does have a BSD-style <strings.h>.
- */
-#undef NEED_BSD_STRINGS
-
-/* Define this if your system does not provide typedef size_t in any of the
- * ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in
- * <sys/types.h> instead.
- */
-#undef NEED_SYS_TYPES_H
-
-/* For 80x86 machines, you need to define NEED_FAR_POINTERS,
- * unless you are using a large-data memory model or 80386 flat-memory mode.
- * On less brain-damaged CPUs this symbol must not be defined.
- * (Defining this symbol causes large data structures to be referenced through
- * "far" pointers and to be allocated with a special version of malloc.)
- */
-#undef NEED_FAR_POINTERS
-
-/* Define this if your linker needs global names to be unique in less
- * than the first 15 characters.
- */
-#undef NEED_SHORT_EXTERNAL_NAMES
-
-/* Although a real ANSI C compiler can deal perfectly well with pointers to
- * unspecified structures (see "incomplete types" in the spec), a few pre-ANSI
- * and pseudo-ANSI compilers get confused. To keep one of these bozos happy,
- * define INCOMPLETE_TYPES_BROKEN. This is not recommended unless you
- * actually get "missing structure definition" warnings or errors while
- * compiling the JPEG code.
- */
-#undef INCOMPLETE_TYPES_BROKEN
-
-
-/*
- * The following options affect code selection within the JPEG library,
- * but they don't need to be visible to applications using the library.
- * To minimize application namespace pollution, the symbols won't be
- * defined unless JPEG_INTERNALS has been defined.
- */
-
-#ifdef JPEG_INTERNALS
-
-/* Define this if your compiler implements ">>" on signed values as a logical
- * (unsigned) shift; leave it undefined if ">>" is a signed (arithmetic) shift,
- * which is the normal and rational definition.
- */
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-
-#endif /* JPEG_INTERNALS */
-
-
-/*
- * The remaining options do not affect the JPEG library proper,
- * but only the sample applications cjpeg/djpeg (see cjpeg.c, djpeg.c).
- * Other applications can ignore these.
- */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-/* These defines indicate which image (non-JPEG) file formats are allowed. */
-
-#define BMP_SUPPORTED /* BMP image file format */
-#define GIF_SUPPORTED /* GIF image file format */
-#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED /* Utah RLE image file format */
-#define TARGA_SUPPORTED /* Targa image file format */
-
-/* Define this if you want to name both input and output files on the command
- * line, rather than using stdout and optionally stdin. You MUST do this if
- * your system can't cope with binary I/O to stdin/stdout. See comments at
- * head of cjpeg.c or djpeg.c.
- */
-#undef TWO_FILE_COMMANDLINE
-
-/* Define this if your system needs explicit cleanup of temporary files.
- * This is crucial under MS-DOS, where the temporary "files" may be areas
- * of extended memory; on most other systems it's not as important.
- */
-#undef NEED_SIGNAL_CATCHER
-
-/* By default, we open image files with fopen(...,"rb") or fopen(...,"wb").
- * This is necessary on systems that distinguish text files from binary files,
- * and is harmless on most systems that don't. If you have one of the rare
- * systems that complains about the "b" spec, define this symbol.
- */
-#undef DONT_USE_B_MODE
-
-/* Define this if you want percent-done progress reports from cjpeg/djpeg.
- */
-#undef PROGRESS_REPORT
-
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/src/3rdparty/libjpeg/jconfig.h b/src/3rdparty/libjpeg/jconfig.h
index 3ba17c63d9..7e10d1bbae 100644
--- a/src/3rdparty/libjpeg/jconfig.h
+++ b/src/3rdparty/libjpeg/jconfig.h
@@ -1,5 +1,4 @@
-/* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */
-/* see jconfig.doc for explanations */
+/* see jconfig.txt for explanations */
#define HAVE_PROTOTYPES
#define HAVE_UNSIGNED_CHAR
diff --git a/src/3rdparty/libjpeg/jconfig.mac b/src/3rdparty/libjpeg/jconfig.mac
index 0de3efe24d..70ed66c187 100644
--- a/src/3rdparty/libjpeg/jconfig.mac
+++ b/src/3rdparty/libjpeg/jconfig.mac
@@ -1,5 +1,5 @@
/* jconfig.mac --- jconfig.h for CodeWarrior on Apple Macintosh */
-/* see jconfig.doc for explanations */
+/* see jconfig.txt for explanations */
#define HAVE_PROTOTYPES
#define HAVE_UNSIGNED_CHAR
diff --git a/src/3rdparty/libjpeg/jconfig.manx b/src/3rdparty/libjpeg/jconfig.manx
index 6dd0d008ea..cd529d7d15 100644
--- a/src/3rdparty/libjpeg/jconfig.manx
+++ b/src/3rdparty/libjpeg/jconfig.manx
@@ -1,5 +1,5 @@
/* jconfig.manx --- jconfig.h for Amiga systems using Manx Aztec C ver 5.x. */
-/* see jconfig.doc for explanations */
+/* see jconfig.txt for explanations */
#define HAVE_PROTOTYPES
#define HAVE_UNSIGNED_CHAR
diff --git a/src/3rdparty/libjpeg/jconfig.mc6 b/src/3rdparty/libjpeg/jconfig.mc6
index c55082df43..1b18523895 100644
--- a/src/3rdparty/libjpeg/jconfig.mc6
+++ b/src/3rdparty/libjpeg/jconfig.mc6
@@ -1,5 +1,5 @@
/* jconfig.mc6 --- jconfig.h for Microsoft C on MS-DOS, version 6.00A & up. */
-/* see jconfig.doc for explanations */
+/* see jconfig.txt for explanations */
#define HAVE_PROTOTYPES
#define HAVE_UNSIGNED_CHAR
diff --git a/src/3rdparty/libjpeg/jconfig.sas b/src/3rdparty/libjpeg/jconfig.sas
index efdac22294..b8a1819259 100644
--- a/src/3rdparty/libjpeg/jconfig.sas
+++ b/src/3rdparty/libjpeg/jconfig.sas
@@ -1,5 +1,5 @@
/* jconfig.sas --- jconfig.h for Amiga systems using SAS C 6.0 and up. */
-/* see jconfig.doc for explanations */
+/* see jconfig.txt for explanations */
#define HAVE_PROTOTYPES
#define HAVE_UNSIGNED_CHAR
diff --git a/src/3rdparty/libjpeg/jconfig.st b/src/3rdparty/libjpeg/jconfig.st
index 4421b7a1a6..5afa0b6ce5 100644
--- a/src/3rdparty/libjpeg/jconfig.st
+++ b/src/3rdparty/libjpeg/jconfig.st
@@ -1,5 +1,5 @@
/* jconfig.st --- jconfig.h for Atari ST/STE/TT using Pure C or Turbo C. */
-/* see jconfig.doc for explanations */
+/* see jconfig.txt for explanations */
#define HAVE_PROTOTYPES
#define HAVE_UNSIGNED_CHAR
diff --git a/src/3rdparty/libjpeg/jconfig.txt b/src/3rdparty/libjpeg/jconfig.txt
new file mode 100644
index 0000000000..8819e79172
--- /dev/null
+++ b/src/3rdparty/libjpeg/jconfig.txt
@@ -0,0 +1,155 @@
+/*
+ * jconfig.txt
+ *
+ * Copyright (C) 1991-1994, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file documents the configuration options that are required to
+ * customize the JPEG software for a particular system.
+ *
+ * The actual configuration options for a particular installation are stored
+ * in jconfig.h. On many machines, jconfig.h can be generated automatically
+ * or copied from one of the "canned" jconfig files that we supply. But if
+ * you need to generate a jconfig.h file by hand, this file tells you how.
+ *
+ * DO NOT EDIT THIS FILE --- IT WON'T ACCOMPLISH ANYTHING.
+ * EDIT A COPY NAMED JCONFIG.H.
+ */
+
+
+/*
+ * These symbols indicate the properties of your machine or compiler.
+ * #define the symbol if yes, #undef it if no.
+ */
+
+/* Does your compiler support function prototypes?
+ * (If not, you also need to use ansi2knr, see install.txt)
+ */
+#define HAVE_PROTOTYPES
+
+/* Does your compiler support the declaration "unsigned char" ?
+ * How about "unsigned short" ?
+ */
+#define HAVE_UNSIGNED_CHAR
+#define HAVE_UNSIGNED_SHORT
+
+/* Define "void" as "char" if your compiler doesn't know about type void.
+ * NOTE: be sure to define void such that "void *" represents the most general
+ * pointer type, e.g., that returned by malloc().
+ */
+/* #define void char */
+
+/* Define "const" as empty if your compiler doesn't know the "const" keyword.
+ */
+/* #define const */
+
+/* Define this if an ordinary "char" type is unsigned.
+ * If you're not sure, leaving it undefined will work at some cost in speed.
+ * If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal.
+ */
+#undef CHAR_IS_UNSIGNED
+
+/* Define this if your system has an ANSI-conforming <stddef.h> file.
+ */
+#define HAVE_STDDEF_H
+
+/* Define this if your system has an ANSI-conforming <stdlib.h> file.
+ */
+#define HAVE_STDLIB_H
+
+/* Define this if your system does not have an ANSI/SysV <string.h>,
+ * but does have a BSD-style <strings.h>.
+ */
+#undef NEED_BSD_STRINGS
+
+/* Define this if your system does not provide typedef size_t in any of the
+ * ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in
+ * <sys/types.h> instead.
+ */
+#undef NEED_SYS_TYPES_H
+
+/* For 80x86 machines, you need to define NEED_FAR_POINTERS,
+ * unless you are using a large-data memory model or 80386 flat-memory mode.
+ * On less brain-damaged CPUs this symbol must not be defined.
+ * (Defining this symbol causes large data structures to be referenced through
+ * "far" pointers and to be allocated with a special version of malloc.)
+ */
+#undef NEED_FAR_POINTERS
+
+/* Define this if your linker needs global names to be unique in less
+ * than the first 15 characters.
+ */
+#undef NEED_SHORT_EXTERNAL_NAMES
+
+/* Although a real ANSI C compiler can deal perfectly well with pointers to
+ * unspecified structures (see "incomplete types" in the spec), a few pre-ANSI
+ * and pseudo-ANSI compilers get confused. To keep one of these bozos happy,
+ * define INCOMPLETE_TYPES_BROKEN. This is not recommended unless you
+ * actually get "missing structure definition" warnings or errors while
+ * compiling the JPEG code.
+ */
+#undef INCOMPLETE_TYPES_BROKEN
+
+
+/*
+ * The following options affect code selection within the JPEG library,
+ * but they don't need to be visible to applications using the library.
+ * To minimize application namespace pollution, the symbols won't be
+ * defined unless JPEG_INTERNALS has been defined.
+ */
+
+#ifdef JPEG_INTERNALS
+
+/* Define this if your compiler implements ">>" on signed values as a logical
+ * (unsigned) shift; leave it undefined if ">>" is a signed (arithmetic) shift,
+ * which is the normal and rational definition.
+ */
+#undef RIGHT_SHIFT_IS_UNSIGNED
+
+
+#endif /* JPEG_INTERNALS */
+
+
+/*
+ * The remaining options do not affect the JPEG library proper,
+ * but only the sample applications cjpeg/djpeg (see cjpeg.c, djpeg.c).
+ * Other applications can ignore these.
+ */
+
+#ifdef JPEG_CJPEG_DJPEG
+
+/* These defines indicate which image (non-JPEG) file formats are allowed. */
+
+#define BMP_SUPPORTED /* BMP image file format */
+#define GIF_SUPPORTED /* GIF image file format */
+#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
+#undef RLE_SUPPORTED /* Utah RLE image file format */
+#define TARGA_SUPPORTED /* Targa image file format */
+
+/* Define this if you want to name both input and output files on the command
+ * line, rather than using stdout and optionally stdin. You MUST do this if
+ * your system can't cope with binary I/O to stdin/stdout. See comments at
+ * head of cjpeg.c or djpeg.c.
+ */
+#undef TWO_FILE_COMMANDLINE
+
+/* Define this if your system needs explicit cleanup of temporary files.
+ * This is crucial under MS-DOS, where the temporary "files" may be areas
+ * of extended memory; on most other systems it's not as important.
+ */
+#undef NEED_SIGNAL_CATCHER
+
+/* By default, we open image files with fopen(...,"rb") or fopen(...,"wb").
+ * This is necessary on systems that distinguish text files from binary files,
+ * and is harmless on most systems that don't. If you have one of the rare
+ * systems that complains about the "b" spec, define this symbol.
+ */
+#undef DONT_USE_B_MODE
+
+/* Define this if you want percent-done progress reports from cjpeg/djpeg.
+ */
+#undef PROGRESS_REPORT
+
+
+#endif /* JPEG_CJPEG_DJPEG */
diff --git a/src/3rdparty/libjpeg/jconfig.vc b/src/3rdparty/libjpeg/jconfig.vc
index 7e291c75bd..679404da4e 100644
--- a/src/3rdparty/libjpeg/jconfig.vc
+++ b/src/3rdparty/libjpeg/jconfig.vc
@@ -1,5 +1,5 @@
/* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */
-/* see jconfig.doc for explanations */
+/* see jconfig.txt for explanations */
#define HAVE_PROTOTYPES
#define HAVE_UNSIGNED_CHAR
diff --git a/src/3rdparty/libjpeg/jconfig.vms b/src/3rdparty/libjpeg/jconfig.vms
index 55a6ffba5c..8337b0b69b 100644
--- a/src/3rdparty/libjpeg/jconfig.vms
+++ b/src/3rdparty/libjpeg/jconfig.vms
@@ -1,5 +1,5 @@
/* jconfig.vms --- jconfig.h for use on Digital VMS. */
-/* see jconfig.doc for explanations */
+/* see jconfig.txt for explanations */
#define HAVE_PROTOTYPES
#define HAVE_UNSIGNED_CHAR
diff --git a/src/3rdparty/libjpeg/jconfig.wat b/src/3rdparty/libjpeg/jconfig.wat
index 6cc545baee..190cc75fd5 100644
--- a/src/3rdparty/libjpeg/jconfig.wat
+++ b/src/3rdparty/libjpeg/jconfig.wat
@@ -1,5 +1,5 @@
/* jconfig.wat --- jconfig.h for Watcom C/C++ on MS-DOS or OS/2. */
-/* see jconfig.doc for explanations */
+/* see jconfig.txt for explanations */
#define HAVE_PROTOTYPES
#define HAVE_UNSIGNED_CHAR
diff --git a/src/3rdparty/libjpeg/jcparam.c b/src/3rdparty/libjpeg/jcparam.c
index 6fc48f5365..c5e85dda55 100644
--- a/src/3rdparty/libjpeg/jcparam.c
+++ b/src/3rdparty/libjpeg/jcparam.c
@@ -2,6 +2,7 @@
* jcparam.c
*
* Copyright (C) 1991-1998, Thomas G. Lane.
+ * Modified 2003-2008 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -60,6 +61,47 @@ jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
}
+/* These are the sample quantization tables given in JPEG spec section K.1.
+ * The spec says that the values given produce "good" quality, and
+ * when divided by 2, "very good" quality.
+ */
+static const unsigned int std_luminance_quant_tbl[DCTSIZE2] = {
+ 16, 11, 10, 16, 24, 40, 51, 61,
+ 12, 12, 14, 19, 26, 58, 60, 55,
+ 14, 13, 16, 24, 40, 57, 69, 56,
+ 14, 17, 22, 29, 51, 87, 80, 62,
+ 18, 22, 37, 56, 68, 109, 103, 77,
+ 24, 35, 55, 64, 81, 104, 113, 92,
+ 49, 64, 78, 87, 103, 121, 120, 101,
+ 72, 92, 95, 98, 112, 100, 103, 99
+};
+static const unsigned int std_chrominance_quant_tbl[DCTSIZE2] = {
+ 17, 18, 24, 47, 99, 99, 99, 99,
+ 18, 21, 26, 66, 99, 99, 99, 99,
+ 24, 26, 56, 99, 99, 99, 99, 99,
+ 47, 66, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99
+};
+
+
+GLOBAL(void)
+jpeg_default_qtables (j_compress_ptr cinfo, boolean force_baseline)
+/* Set or change the 'quality' (quantization) setting, using default tables
+ * and straight percentage-scaling quality scales.
+ * This entry point allows different scalings for luminance and chrominance.
+ */
+{
+ /* Set up two quantization tables using the specified scaling */
+ jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl,
+ cinfo->q_scale_factor[0], force_baseline);
+ jpeg_add_quant_table(cinfo, 1, std_chrominance_quant_tbl,
+ cinfo->q_scale_factor[1], force_baseline);
+}
+
+
GLOBAL(void)
jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,
boolean force_baseline)
@@ -69,31 +111,6 @@ jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,
* applications that insist on a linear percentage scaling.
*/
{
- /* These are the sample quantization tables given in JPEG spec section K.1.
- * The spec says that the values given produce "good" quality, and
- * when divided by 2, "very good" quality.
- */
- static const unsigned int std_luminance_quant_tbl[DCTSIZE2] = {
- 16, 11, 10, 16, 24, 40, 51, 61,
- 12, 12, 14, 19, 26, 58, 60, 55,
- 14, 13, 16, 24, 40, 57, 69, 56,
- 14, 17, 22, 29, 51, 87, 80, 62,
- 18, 22, 37, 56, 68, 109, 103, 77,
- 24, 35, 55, 64, 81, 104, 113, 92,
- 49, 64, 78, 87, 103, 121, 120, 101,
- 72, 92, 95, 98, 112, 100, 103, 99
- };
- static const unsigned int std_chrominance_quant_tbl[DCTSIZE2] = {
- 17, 18, 24, 47, 99, 99, 99, 99,
- 18, 21, 26, 66, 99, 99, 99, 99,
- 24, 26, 56, 99, 99, 99, 99, 99,
- 47, 66, 99, 99, 99, 99, 99, 99,
- 99, 99, 99, 99, 99, 99, 99, 99,
- 99, 99, 99, 99, 99, 99, 99, 99,
- 99, 99, 99, 99, 99, 99, 99, 99,
- 99, 99, 99, 99, 99, 99, 99, 99
- };
-
/* Set up two quantization tables using the specified scaling */
jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl,
scale_factor, force_baseline);
@@ -284,6 +301,8 @@ jpeg_set_defaults (j_compress_ptr cinfo)
/* Initialize everything not dependent on the color space */
+ cinfo->scale_num = 1; /* 1:1 scaling */
+ cinfo->scale_denom = 1;
cinfo->data_precision = BITS_IN_JSAMPLE;
/* Set up two quantization tables using default quality of 75 */
jpeg_set_quality(cinfo, 75, TRUE);
@@ -320,6 +339,9 @@ jpeg_set_defaults (j_compress_ptr cinfo)
/* By default, use the simpler non-cosited sampling alignment */
cinfo->CCIR601_sampling = FALSE;
+ /* By default, apply fancy downsampling */
+ cinfo->do_fancy_downsampling = TRUE;
+
/* No input smoothing */
cinfo->smoothing_factor = 0;
diff --git a/src/3rdparty/libjpeg/jcphuff.c b/src/3rdparty/libjpeg/jcphuff.c
deleted file mode 100644
index 07f9178b01..0000000000
--- a/src/3rdparty/libjpeg/jcphuff.c
+++ /dev/null
@@ -1,833 +0,0 @@
-/*
- * jcphuff.c
- *
- * Copyright (C) 1995-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains Huffman entropy encoding routines for progressive JPEG.
- *
- * We do not support output suspension in this module, since the library
- * currently does not allow multiple-scan files to be written with output
- * suspension.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jchuff.h" /* Declarations shared with jchuff.c */
-
-#ifdef C_PROGRESSIVE_SUPPORTED
-
-/* Expanded entropy encoder object for progressive Huffman encoding. */
-
-typedef struct {
- struct jpeg_entropy_encoder pub; /* public fields */
-
- /* Mode flag: TRUE for optimization, FALSE for actual data output */
- boolean gather_statistics;
-
- /* Bit-level coding status.
- * next_output_byte/free_in_buffer are local copies of cinfo->dest fields.
- */
- JOCTET * next_output_byte; /* => next byte to write in buffer */
- size_t free_in_buffer; /* # of byte spaces remaining in buffer */
- INT32 put_buffer; /* current bit-accumulation buffer */
- int put_bits; /* # of bits now in it */
- j_compress_ptr cinfo; /* link to cinfo (needed for dump_buffer) */
-
- /* Coding status for DC components */
- int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */
-
- /* Coding status for AC components */
- int ac_tbl_no; /* the table number of the single component */
- unsigned int EOBRUN; /* run length of EOBs */
- unsigned int BE; /* # of buffered correction bits before MCU */
- char * bit_buffer; /* buffer for correction bits (1 per char) */
- /* packing correction bits tightly would save some space but cost time... */
-
- unsigned int restarts_to_go; /* MCUs left in this restart interval */
- int next_restart_num; /* next restart number to write (0-7) */
-
- /* Pointers to derived tables (these workspaces have image lifespan).
- * Since any one scan codes only DC or only AC, we only need one set
- * of tables, not one for DC and one for AC.
- */
- c_derived_tbl * derived_tbls[NUM_HUFF_TBLS];
-
- /* Statistics tables for optimization; again, one set is enough */
- long * count_ptrs[NUM_HUFF_TBLS];
-} phuff_entropy_encoder;
-
-typedef phuff_entropy_encoder * phuff_entropy_ptr;
-
-/* MAX_CORR_BITS is the number of bits the AC refinement correction-bit
- * buffer can hold. Larger sizes may slightly improve compression, but
- * 1000 is already well into the realm of overkill.
- * The minimum safe size is 64 bits.
- */
-
-#define MAX_CORR_BITS 1000 /* Max # of correction bits I can buffer */
-
-/* IRIGHT_SHIFT is like RIGHT_SHIFT, but works on int rather than INT32.
- * We assume that int right shift is unsigned if INT32 right shift is,
- * which should be safe.
- */
-
-#ifdef RIGHT_SHIFT_IS_UNSIGNED
-#define ISHIFT_TEMPS int ishift_temp;
-#define IRIGHT_SHIFT(x,shft) \
- ((ishift_temp = (x)) < 0 ? \
- (ishift_temp >> (shft)) | ((~0) << (16-(shft))) : \
- (ishift_temp >> (shft)))
-#else
-#define ISHIFT_TEMPS
-#define IRIGHT_SHIFT(x,shft) ((x) >> (shft))
-#endif
-
-/* Forward declarations */
-METHODDEF(boolean) encode_mcu_DC_first JPP((j_compress_ptr cinfo,
- JBLOCKROW *MCU_data));
-METHODDEF(boolean) encode_mcu_AC_first JPP((j_compress_ptr cinfo,
- JBLOCKROW *MCU_data));
-METHODDEF(boolean) encode_mcu_DC_refine JPP((j_compress_ptr cinfo,
- JBLOCKROW *MCU_data));
-METHODDEF(boolean) encode_mcu_AC_refine JPP((j_compress_ptr cinfo,
- JBLOCKROW *MCU_data));
-METHODDEF(void) finish_pass_phuff JPP((j_compress_ptr cinfo));
-METHODDEF(void) finish_pass_gather_phuff JPP((j_compress_ptr cinfo));
-
-
-/*
- * Initialize for a Huffman-compressed scan using progressive JPEG.
- */
-
-METHODDEF(void)
-start_pass_phuff (j_compress_ptr cinfo, boolean gather_statistics)
-{
- phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
- boolean is_DC_band;
- int ci, tbl;
- jpeg_component_info * compptr;
-
- entropy->cinfo = cinfo;
- entropy->gather_statistics = gather_statistics;
-
- is_DC_band = (cinfo->Ss == 0);
-
- /* We assume jcmaster.c already validated the scan parameters. */
-
- /* Select execution routines */
- if (cinfo->Ah == 0) {
- if (is_DC_band)
- entropy->pub.encode_mcu = encode_mcu_DC_first;
- else
- entropy->pub.encode_mcu = encode_mcu_AC_first;
- } else {
- if (is_DC_band)
- entropy->pub.encode_mcu = encode_mcu_DC_refine;
- else {
- entropy->pub.encode_mcu = encode_mcu_AC_refine;
- /* AC refinement needs a correction bit buffer */
- if (entropy->bit_buffer == NULL)
- entropy->bit_buffer = (char *)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- MAX_CORR_BITS * SIZEOF(char));
- }
- }
- if (gather_statistics)
- entropy->pub.finish_pass = finish_pass_gather_phuff;
- else
- entropy->pub.finish_pass = finish_pass_phuff;
-
- /* Only DC coefficients may be interleaved, so cinfo->comps_in_scan = 1
- * for AC coefficients.
- */
- for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
- compptr = cinfo->cur_comp_info[ci];
- /* Initialize DC predictions to 0 */
- entropy->last_dc_val[ci] = 0;
- /* Get table index */
- if (is_DC_band) {
- if (cinfo->Ah != 0) /* DC refinement needs no table */
- continue;
- tbl = compptr->dc_tbl_no;
- } else {
- entropy->ac_tbl_no = tbl = compptr->ac_tbl_no;
- }
- if (gather_statistics) {
- /* Check for invalid table index */
- /* (make_c_derived_tbl does this in the other path) */
- if (tbl < 0 || tbl >= NUM_HUFF_TBLS)
- ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tbl);
- /* Allocate and zero the statistics tables */
- /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */
- if (entropy->count_ptrs[tbl] == NULL)
- entropy->count_ptrs[tbl] = (long *)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- 257 * SIZEOF(long));
- MEMZERO(entropy->count_ptrs[tbl], 257 * SIZEOF(long));
- } else {
- /* Compute derived values for Huffman table */
- /* We may do this more than once for a table, but it's not expensive */
- jpeg_make_c_derived_tbl(cinfo, is_DC_band, tbl,
- & entropy->derived_tbls[tbl]);
- }
- }
-
- /* Initialize AC stuff */
- entropy->EOBRUN = 0;
- entropy->BE = 0;
-
- /* Initialize bit buffer to empty */
- entropy->put_buffer = 0;
- entropy->put_bits = 0;
-
- /* Initialize restart stuff */
- entropy->restarts_to_go = cinfo->restart_interval;
- entropy->next_restart_num = 0;
-}
-
-
-/* Outputting bytes to the file.
- * NB: these must be called only when actually outputting,
- * that is, entropy->gather_statistics == FALSE.
- */
-
-/* Emit a byte */
-#define emit_byte(entropy,val) \
- { *(entropy)->next_output_byte++ = (JOCTET) (val); \
- if (--(entropy)->free_in_buffer == 0) \
- dump_buffer(entropy); }
-
-
-LOCAL(void)
-dump_buffer (phuff_entropy_ptr entropy)
-/* Empty the output buffer; we do not support suspension in this module. */
-{
- struct jpeg_destination_mgr * dest = entropy->cinfo->dest;
-
- if (! (*dest->empty_output_buffer) (entropy->cinfo))
- ERREXIT(entropy->cinfo, JERR_CANT_SUSPEND);
- /* After a successful buffer dump, must reset buffer pointers */
- entropy->next_output_byte = dest->next_output_byte;
- entropy->free_in_buffer = dest->free_in_buffer;
-}
-
-
-/* Outputting bits to the file */
-
-/* Only the right 24 bits of put_buffer are used; the valid bits are
- * left-justified in this part. At most 16 bits can be passed to emit_bits
- * in one call, and we never retain more than 7 bits in put_buffer
- * between calls, so 24 bits are sufficient.
- */
-
-INLINE
-LOCAL(void)
-emit_bits (phuff_entropy_ptr entropy, unsigned int code, int size)
-/* Emit some bits, unless we are in gather mode */
-{
- /* This routine is heavily used, so it's worth coding tightly. */
- register INT32 put_buffer = (INT32) code;
- register int put_bits = entropy->put_bits;
-
- /* if size is 0, caller used an invalid Huffman table entry */
- if (size == 0)
- ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE);
-
- if (entropy->gather_statistics)
- return; /* do nothing if we're only getting stats */
-
- put_buffer &= (((INT32) 1)<<size) - 1; /* mask off any extra bits in code */
-
- put_bits += size; /* new number of bits in buffer */
-
- put_buffer <<= 24 - put_bits; /* align incoming bits */
-
- put_buffer |= entropy->put_buffer; /* and merge with old buffer contents */
-
- while (put_bits >= 8) {
- int c = (int) ((put_buffer >> 16) & 0xFF);
-
- emit_byte(entropy, c);
- if (c == 0xFF) { /* need to stuff a zero byte? */
- emit_byte(entropy, 0);
- }
- put_buffer <<= 8;
- put_bits -= 8;
- }
-
- entropy->put_buffer = put_buffer; /* update variables */
- entropy->put_bits = put_bits;
-}
-
-
-LOCAL(void)
-flush_bits (phuff_entropy_ptr entropy)
-{
- emit_bits(entropy, 0x7F, 7); /* fill any partial byte with ones */
- entropy->put_buffer = 0; /* and reset bit-buffer to empty */
- entropy->put_bits = 0;
-}
-
-
-/*
- * Emit (or just count) a Huffman symbol.
- */
-
-INLINE
-LOCAL(void)
-emit_symbol (phuff_entropy_ptr entropy, int tbl_no, int symbol)
-{
- if (entropy->gather_statistics)
- entropy->count_ptrs[tbl_no][symbol]++;
- else {
- c_derived_tbl * tbl = entropy->derived_tbls[tbl_no];
- emit_bits(entropy, tbl->ehufco[symbol], tbl->ehufsi[symbol]);
- }
-}
-
-
-/*
- * Emit bits from a correction bit buffer.
- */
-
-LOCAL(void)
-emit_buffered_bits (phuff_entropy_ptr entropy, char * bufstart,
- unsigned int nbits)
-{
- if (entropy->gather_statistics)
- return; /* no real work */
-
- while (nbits > 0) {
- emit_bits(entropy, (unsigned int) (*bufstart), 1);
- bufstart++;
- nbits--;
- }
-}
-
-
-/*
- * Emit any pending EOBRUN symbol.
- */
-
-LOCAL(void)
-emit_eobrun (phuff_entropy_ptr entropy)
-{
- register int temp, nbits;
-
- if (entropy->EOBRUN > 0) { /* if there is any pending EOBRUN */
- temp = entropy->EOBRUN;
- nbits = 0;
- while ((temp >>= 1))
- nbits++;
- /* safety check: shouldn't happen given limited correction-bit buffer */
- if (nbits > 14)
- ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE);
-
- emit_symbol(entropy, entropy->ac_tbl_no, nbits << 4);
- if (nbits)
- emit_bits(entropy, entropy->EOBRUN, nbits);
-
- entropy->EOBRUN = 0;
-
- /* Emit any buffered correction bits */
- emit_buffered_bits(entropy, entropy->bit_buffer, entropy->BE);
- entropy->BE = 0;
- }
-}
-
-
-/*
- * Emit a restart marker & resynchronize predictions.
- */
-
-LOCAL(void)
-emit_restart (phuff_entropy_ptr entropy, int restart_num)
-{
- int ci;
-
- emit_eobrun(entropy);
-
- if (! entropy->gather_statistics) {
- flush_bits(entropy);
- emit_byte(entropy, 0xFF);
- emit_byte(entropy, JPEG_RST0 + restart_num);
- }
-
- if (entropy->cinfo->Ss == 0) {
- /* Re-initialize DC predictions to 0 */
- for (ci = 0; ci < entropy->cinfo->comps_in_scan; ci++)
- entropy->last_dc_val[ci] = 0;
- } else {
- /* Re-initialize all AC-related fields to 0 */
- entropy->EOBRUN = 0;
- entropy->BE = 0;
- }
-}
-
-
-/*
- * MCU encoding for DC initial scan (either spectral selection,
- * or first pass of successive approximation).
- */
-
-METHODDEF(boolean)
-encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
-{
- phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
- register int temp, temp2;
- register int nbits;
- int blkn, ci;
- int Al = cinfo->Al;
- JBLOCKROW block;
- jpeg_component_info * compptr;
- ISHIFT_TEMPS
-
- entropy->next_output_byte = cinfo->dest->next_output_byte;
- entropy->free_in_buffer = cinfo->dest->free_in_buffer;
-
- /* Emit restart marker if needed */
- if (cinfo->restart_interval)
- if (entropy->restarts_to_go == 0)
- emit_restart(entropy, entropy->next_restart_num);
-
- /* Encode the MCU data blocks */
- for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
- block = MCU_data[blkn];
- ci = cinfo->MCU_membership[blkn];
- compptr = cinfo->cur_comp_info[ci];
-
- /* Compute the DC value after the required point transform by Al.
- * This is simply an arithmetic right shift.
- */
- temp2 = IRIGHT_SHIFT((int) ((*block)[0]), Al);
-
- /* DC differences are figured on the point-transformed values. */
- temp = temp2 - entropy->last_dc_val[ci];
- entropy->last_dc_val[ci] = temp2;
-
- /* Encode the DC coefficient difference per section G.1.2.1 */
- temp2 = temp;
- if (temp < 0) {
- temp = -temp; /* temp is abs value of input */
- /* For a negative input, want temp2 = bitwise complement of abs(input) */
- /* This code assumes we are on a two's complement machine */
- temp2--;
- }
-
- /* Find the number of bits needed for the magnitude of the coefficient */
- nbits = 0;
- while (temp) {
- nbits++;
- temp >>= 1;
- }
- /* Check for out-of-range coefficient values.
- * Since we're encoding a difference, the range limit is twice as much.
- */
- if (nbits > MAX_COEF_BITS+1)
- ERREXIT(cinfo, JERR_BAD_DCT_COEF);
-
- /* Count/emit the Huffman-coded symbol for the number of bits */
- emit_symbol(entropy, compptr->dc_tbl_no, nbits);
-
- /* Emit that number of bits of the value, if positive, */
- /* or the complement of its magnitude, if negative. */
- if (nbits) /* emit_bits rejects calls with size 0 */
- emit_bits(entropy, (unsigned int) temp2, nbits);
- }
-
- cinfo->dest->next_output_byte = entropy->next_output_byte;
- cinfo->dest->free_in_buffer = entropy->free_in_buffer;
-
- /* Update restart-interval state too */
- if (cinfo->restart_interval) {
- if (entropy->restarts_to_go == 0) {
- entropy->restarts_to_go = cinfo->restart_interval;
- entropy->next_restart_num++;
- entropy->next_restart_num &= 7;
- }
- entropy->restarts_to_go--;
- }
-
- return TRUE;
-}
-
-
-/*
- * MCU encoding for AC initial scan (either spectral selection,
- * or first pass of successive approximation).
- */
-
-METHODDEF(boolean)
-encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
-{
- phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
- register int temp, temp2;
- register int nbits;
- register int r, k;
- int Se = cinfo->Se;
- int Al = cinfo->Al;
- JBLOCKROW block;
-
- entropy->next_output_byte = cinfo->dest->next_output_byte;
- entropy->free_in_buffer = cinfo->dest->free_in_buffer;
-
- /* Emit restart marker if needed */
- if (cinfo->restart_interval)
- if (entropy->restarts_to_go == 0)
- emit_restart(entropy, entropy->next_restart_num);
-
- /* Encode the MCU data block */
- block = MCU_data[0];
-
- /* Encode the AC coefficients per section G.1.2.2, fig. G.3 */
-
- r = 0; /* r = run length of zeros */
-
- for (k = cinfo->Ss; k <= Se; k++) {
- if ((temp = (*block)[jpeg_natural_order[k]]) == 0) {
- r++;
- continue;
- }
- /* We must apply the point transform by Al. For AC coefficients this
- * is an integer division with rounding towards 0. To do this portably
- * in C, we shift after obtaining the absolute value; so the code is
- * interwoven with finding the abs value (temp) and output bits (temp2).
- */
- if (temp < 0) {
- temp = -temp; /* temp is abs value of input */
- temp >>= Al; /* apply the point transform */
- /* For a negative coef, want temp2 = bitwise complement of abs(coef) */
- temp2 = ~temp;
- } else {
- temp >>= Al; /* apply the point transform */
- temp2 = temp;
- }
- /* Watch out for case that nonzero coef is zero after point transform */
- if (temp == 0) {
- r++;
- continue;
- }
-
- /* Emit any pending EOBRUN */
- if (entropy->EOBRUN > 0)
- emit_eobrun(entropy);
- /* if run length > 15, must emit special run-length-16 codes (0xF0) */
- while (r > 15) {
- emit_symbol(entropy, entropy->ac_tbl_no, 0xF0);
- r -= 16;
- }
-
- /* Find the number of bits needed for the magnitude of the coefficient */
- nbits = 1; /* there must be at least one 1 bit */
- while ((temp >>= 1))
- nbits++;
- /* Check for out-of-range coefficient values */
- if (nbits > MAX_COEF_BITS)
- ERREXIT(cinfo, JERR_BAD_DCT_COEF);
-
- /* Count/emit Huffman symbol for run length / number of bits */
- emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + nbits);
-
- /* Emit that number of bits of the value, if positive, */
- /* or the complement of its magnitude, if negative. */
- emit_bits(entropy, (unsigned int) temp2, nbits);
-
- r = 0; /* reset zero run length */
- }
-
- if (r > 0) { /* If there are trailing zeroes, */
- entropy->EOBRUN++; /* count an EOB */
- if (entropy->EOBRUN == 0x7FFF)
- emit_eobrun(entropy); /* force it out to avoid overflow */
- }
-
- cinfo->dest->next_output_byte = entropy->next_output_byte;
- cinfo->dest->free_in_buffer = entropy->free_in_buffer;
-
- /* Update restart-interval state too */
- if (cinfo->restart_interval) {
- if (entropy->restarts_to_go == 0) {
- entropy->restarts_to_go = cinfo->restart_interval;
- entropy->next_restart_num++;
- entropy->next_restart_num &= 7;
- }
- entropy->restarts_to_go--;
- }
-
- return TRUE;
-}
-
-
-/*
- * MCU encoding for DC successive approximation refinement scan.
- * Note: we assume such scans can be multi-component, although the spec
- * is not very clear on the point.
- */
-
-METHODDEF(boolean)
-encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
-{
- phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
- register int temp;
- int blkn;
- int Al = cinfo->Al;
- JBLOCKROW block;
-
- entropy->next_output_byte = cinfo->dest->next_output_byte;
- entropy->free_in_buffer = cinfo->dest->free_in_buffer;
-
- /* Emit restart marker if needed */
- if (cinfo->restart_interval)
- if (entropy->restarts_to_go == 0)
- emit_restart(entropy, entropy->next_restart_num);
-
- /* Encode the MCU data blocks */
- for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
- block = MCU_data[blkn];
-
- /* We simply emit the Al'th bit of the DC coefficient value. */
- temp = (*block)[0];
- emit_bits(entropy, (unsigned int) (temp >> Al), 1);
- }
-
- cinfo->dest->next_output_byte = entropy->next_output_byte;
- cinfo->dest->free_in_buffer = entropy->free_in_buffer;
-
- /* Update restart-interval state too */
- if (cinfo->restart_interval) {
- if (entropy->restarts_to_go == 0) {
- entropy->restarts_to_go = cinfo->restart_interval;
- entropy->next_restart_num++;
- entropy->next_restart_num &= 7;
- }
- entropy->restarts_to_go--;
- }
-
- return TRUE;
-}
-
-
-/*
- * MCU encoding for AC successive approximation refinement scan.
- */
-
-METHODDEF(boolean)
-encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
-{
- phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
- register int temp;
- register int r, k;
- int EOB;
- char *BR_buffer;
- unsigned int BR;
- int Se = cinfo->Se;
- int Al = cinfo->Al;
- JBLOCKROW block;
- int absvalues[DCTSIZE2];
-
- entropy->next_output_byte = cinfo->dest->next_output_byte;
- entropy->free_in_buffer = cinfo->dest->free_in_buffer;
-
- /* Emit restart marker if needed */
- if (cinfo->restart_interval)
- if (entropy->restarts_to_go == 0)
- emit_restart(entropy, entropy->next_restart_num);
-
- /* Encode the MCU data block */
- block = MCU_data[0];
-
- /* It is convenient to make a pre-pass to determine the transformed
- * coefficients' absolute values and the EOB position.
- */
- EOB = 0;
- for (k = cinfo->Ss; k <= Se; k++) {
- temp = (*block)[jpeg_natural_order[k]];
- /* We must apply the point transform by Al. For AC coefficients this
- * is an integer division with rounding towards 0. To do this portably
- * in C, we shift after obtaining the absolute value.
- */
- if (temp < 0)
- temp = -temp; /* temp is abs value of input */
- temp >>= Al; /* apply the point transform */
- absvalues[k] = temp; /* save abs value for main pass */
- if (temp == 1)
- EOB = k; /* EOB = index of last newly-nonzero coef */
- }
-
- /* Encode the AC coefficients per section G.1.2.3, fig. G.7 */
-
- r = 0; /* r = run length of zeros */
- BR = 0; /* BR = count of buffered bits added now */
- BR_buffer = entropy->bit_buffer + entropy->BE; /* Append bits to buffer */
-
- for (k = cinfo->Ss; k <= Se; k++) {
- if ((temp = absvalues[k]) == 0) {
- r++;
- continue;
- }
-
- /* Emit any required ZRLs, but not if they can be folded into EOB */
- while (r > 15 && k <= EOB) {
- /* emit any pending EOBRUN and the BE correction bits */
- emit_eobrun(entropy);
- /* Emit ZRL */
- emit_symbol(entropy, entropy->ac_tbl_no, 0xF0);
- r -= 16;
- /* Emit buffered correction bits that must be associated with ZRL */
- emit_buffered_bits(entropy, BR_buffer, BR);
- BR_buffer = entropy->bit_buffer; /* BE bits are gone now */
- BR = 0;
- }
-
- /* If the coef was previously nonzero, it only needs a correction bit.
- * NOTE: a straight translation of the spec's figure G.7 would suggest
- * that we also need to test r > 15. But if r > 15, we can only get here
- * if k > EOB, which implies that this coefficient is not 1.
- */
- if (temp > 1) {
- /* The correction bit is the next bit of the absolute value. */
- BR_buffer[BR++] = (char) (temp & 1);
- continue;
- }
-
- /* Emit any pending EOBRUN and the BE correction bits */
- emit_eobrun(entropy);
-
- /* Count/emit Huffman symbol for run length / number of bits */
- emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + 1);
-
- /* Emit output bit for newly-nonzero coef */
- temp = ((*block)[jpeg_natural_order[k]] < 0) ? 0 : 1;
- emit_bits(entropy, (unsigned int) temp, 1);
-
- /* Emit buffered correction bits that must be associated with this code */
- emit_buffered_bits(entropy, BR_buffer, BR);
- BR_buffer = entropy->bit_buffer; /* BE bits are gone now */
- BR = 0;
- r = 0; /* reset zero run length */
- }
-
- if (r > 0 || BR > 0) { /* If there are trailing zeroes, */
- entropy->EOBRUN++; /* count an EOB */
- entropy->BE += BR; /* concat my correction bits to older ones */
- /* We force out the EOB if we risk either:
- * 1. overflow of the EOB counter;
- * 2. overflow of the correction bit buffer during the next MCU.
- */
- if (entropy->EOBRUN == 0x7FFF || entropy->BE > (MAX_CORR_BITS-DCTSIZE2+1))
- emit_eobrun(entropy);
- }
-
- cinfo->dest->next_output_byte = entropy->next_output_byte;
- cinfo->dest->free_in_buffer = entropy->free_in_buffer;
-
- /* Update restart-interval state too */
- if (cinfo->restart_interval) {
- if (entropy->restarts_to_go == 0) {
- entropy->restarts_to_go = cinfo->restart_interval;
- entropy->next_restart_num++;
- entropy->next_restart_num &= 7;
- }
- entropy->restarts_to_go--;
- }
-
- return TRUE;
-}
-
-
-/*
- * Finish up at the end of a Huffman-compressed progressive scan.
- */
-
-METHODDEF(void)
-finish_pass_phuff (j_compress_ptr cinfo)
-{
- phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
-
- entropy->next_output_byte = cinfo->dest->next_output_byte;
- entropy->free_in_buffer = cinfo->dest->free_in_buffer;
-
- /* Flush out any buffered data */
- emit_eobrun(entropy);
- flush_bits(entropy);
-
- cinfo->dest->next_output_byte = entropy->next_output_byte;
- cinfo->dest->free_in_buffer = entropy->free_in_buffer;
-}
-
-
-/*
- * Finish up a statistics-gathering pass and create the new Huffman tables.
- */
-
-METHODDEF(void)
-finish_pass_gather_phuff (j_compress_ptr cinfo)
-{
- phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
- boolean is_DC_band;
- int ci, tbl;
- jpeg_component_info * compptr;
- JHUFF_TBL **htblptr;
- boolean did[NUM_HUFF_TBLS];
-
- /* Flush out buffered data (all we care about is counting the EOB symbol) */
- emit_eobrun(entropy);
-
- is_DC_band = (cinfo->Ss == 0);
-
- /* It's important not to apply jpeg_gen_optimal_table more than once
- * per table, because it clobbers the input frequency counts!
- */
- MEMZERO(did, SIZEOF(did));
-
- for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
- compptr = cinfo->cur_comp_info[ci];
- if (is_DC_band) {
- if (cinfo->Ah != 0) /* DC refinement needs no table */
- continue;
- tbl = compptr->dc_tbl_no;
- } else {
- tbl = compptr->ac_tbl_no;
- }
- if (! did[tbl]) {
- if (is_DC_band)
- htblptr = & cinfo->dc_huff_tbl_ptrs[tbl];
- else
- htblptr = & cinfo->ac_huff_tbl_ptrs[tbl];
- if (*htblptr == NULL)
- *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);
- jpeg_gen_optimal_table(cinfo, *htblptr, entropy->count_ptrs[tbl]);
- did[tbl] = TRUE;
- }
- }
-}
-
-
-/*
- * Module initialization routine for progressive Huffman entropy encoding.
- */
-
-GLOBAL(void)
-jinit_phuff_encoder (j_compress_ptr cinfo)
-{
- phuff_entropy_ptr entropy;
- int i;
-
- entropy = (phuff_entropy_ptr)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- SIZEOF(phuff_entropy_encoder));
- cinfo->entropy = (struct jpeg_entropy_encoder *) entropy;
- entropy->pub.start_pass = start_pass_phuff;
-
- /* Mark tables unallocated */
- for (i = 0; i < NUM_HUFF_TBLS; i++) {
- entropy->derived_tbls[i] = NULL;
- entropy->count_ptrs[i] = NULL;
- }
- entropy->bit_buffer = NULL; /* needed only in AC refinement scan */
-}
-
-#endif /* C_PROGRESSIVE_SUPPORTED */
diff --git a/src/3rdparty/libjpeg/jcprepct.c b/src/3rdparty/libjpeg/jcprepct.c
index fa93333db2..be44cc4b45 100644
--- a/src/3rdparty/libjpeg/jcprepct.c
+++ b/src/3rdparty/libjpeg/jcprepct.c
@@ -173,10 +173,12 @@ pre_process_data (j_compress_ptr cinfo,
*out_row_group_ctr < out_row_groups_avail) {
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
+ numrows = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) /
+ cinfo->min_DCT_v_scaled_size;
expand_bottom_edge(output_buf[ci],
- compptr->width_in_blocks * DCTSIZE,
- (int) (*out_row_group_ctr * compptr->v_samp_factor),
- (int) (out_row_groups_avail * compptr->v_samp_factor));
+ compptr->width_in_blocks * compptr->DCT_h_scaled_size,
+ (int) (*out_row_group_ctr * numrows),
+ (int) (out_row_groups_avail * numrows));
}
*out_row_group_ctr = out_row_groups_avail;
break; /* can exit outer loop without test */
@@ -288,7 +290,8 @@ create_context_buffer (j_compress_ptr cinfo)
*/
true_buffer = (*cinfo->mem->alloc_sarray)
((j_common_ptr) cinfo, JPOOL_IMAGE,
- (JDIMENSION) (((long) compptr->width_in_blocks * DCTSIZE *
+ (JDIMENSION) (((long) compptr->width_in_blocks *
+ cinfo->min_DCT_h_scaled_size *
cinfo->max_h_samp_factor) / compptr->h_samp_factor),
(JDIMENSION) (3 * rgroup_height));
/* Copy true buffer row pointers into the middle of the fake row array */
@@ -346,7 +349,8 @@ jinit_c_prep_controller (j_compress_ptr cinfo, boolean need_full_buffer)
ci++, compptr++) {
prep->color_buf[ci] = (*cinfo->mem->alloc_sarray)
((j_common_ptr) cinfo, JPOOL_IMAGE,
- (JDIMENSION) (((long) compptr->width_in_blocks * DCTSIZE *
+ (JDIMENSION) (((long) compptr->width_in_blocks *
+ cinfo->min_DCT_h_scaled_size *
cinfo->max_h_samp_factor) / compptr->h_samp_factor),
(JDIMENSION) cinfo->max_v_samp_factor);
}
diff --git a/src/3rdparty/libjpeg/jcsample.c b/src/3rdparty/libjpeg/jcsample.c
index 212ec8757c..4d36f85f35 100644
--- a/src/3rdparty/libjpeg/jcsample.c
+++ b/src/3rdparty/libjpeg/jcsample.c
@@ -62,6 +62,15 @@ typedef struct {
/* Downsampling method pointers, one per component */
downsample1_ptr methods[MAX_COMPONENTS];
+
+ /* Height of an output row group for each component. */
+ int rowgroup_height[MAX_COMPONENTS];
+
+ /* These arrays save pixel expansion factors so that int_downsample need not
+ * recompute them each time. They are unused for other downsampling methods.
+ */
+ UINT8 h_expand[MAX_COMPONENTS];
+ UINT8 v_expand[MAX_COMPONENTS];
} my_downsampler;
typedef my_downsampler * my_downsample_ptr;
@@ -123,7 +132,8 @@ sep_downsample (j_compress_ptr cinfo,
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
in_ptr = input_buf[ci] + in_row_index;
- out_ptr = output_buf[ci] + (out_row_group_index * compptr->v_samp_factor);
+ out_ptr = output_buf[ci] +
+ (out_row_group_index * downsample->rowgroup_height[ci]);
(*downsample->methods[ci]) (cinfo, compptr, in_ptr, out_ptr);
}
}
@@ -140,14 +150,15 @@ METHODDEF(void)
int_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
JSAMPARRAY input_data, JSAMPARRAY output_data)
{
+ my_downsample_ptr downsample = (my_downsample_ptr) cinfo->downsample;
int inrow, outrow, h_expand, v_expand, numpix, numpix2, h, v;
JDIMENSION outcol, outcol_h; /* outcol_h == outcol*h_expand */
- JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;
+ JDIMENSION output_cols = compptr->width_in_blocks * compptr->DCT_h_scaled_size;
JSAMPROW inptr, outptr;
INT32 outvalue;
- h_expand = cinfo->max_h_samp_factor / compptr->h_samp_factor;
- v_expand = cinfo->max_v_samp_factor / compptr->v_samp_factor;
+ h_expand = downsample->h_expand[compptr->component_index];
+ v_expand = downsample->v_expand[compptr->component_index];
numpix = h_expand * v_expand;
numpix2 = numpix/2;
@@ -158,8 +169,8 @@ int_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
expand_right_edge(input_data, cinfo->max_v_samp_factor,
cinfo->image_width, output_cols * h_expand);
- inrow = 0;
- for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {
+ inrow = outrow = 0;
+ while (inrow < cinfo->max_v_samp_factor) {
outptr = output_data[outrow];
for (outcol = 0, outcol_h = 0; outcol < output_cols;
outcol++, outcol_h += h_expand) {
@@ -173,6 +184,7 @@ int_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
*outptr++ = (JSAMPLE) ((outvalue + numpix2) / numpix);
}
inrow += v_expand;
+ outrow++;
}
}
@@ -191,8 +203,8 @@ fullsize_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
jcopy_sample_rows(input_data, 0, output_data, 0,
cinfo->max_v_samp_factor, cinfo->image_width);
/* Edge-expand */
- expand_right_edge(output_data, cinfo->max_v_samp_factor,
- cinfo->image_width, compptr->width_in_blocks * DCTSIZE);
+ expand_right_edge(output_data, cinfo->max_v_samp_factor, cinfo->image_width,
+ compptr->width_in_blocks * compptr->DCT_h_scaled_size);
}
@@ -212,9 +224,9 @@ METHODDEF(void)
h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
JSAMPARRAY input_data, JSAMPARRAY output_data)
{
- int outrow;
+ int inrow;
JDIMENSION outcol;
- JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;
+ JDIMENSION output_cols = compptr->width_in_blocks * compptr->DCT_h_scaled_size;
register JSAMPROW inptr, outptr;
register int bias;
@@ -225,9 +237,9 @@ h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
expand_right_edge(input_data, cinfo->max_v_samp_factor,
cinfo->image_width, output_cols * 2);
- for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {
- outptr = output_data[outrow];
- inptr = input_data[outrow];
+ for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) {
+ outptr = output_data[inrow];
+ inptr = input_data[inrow];
bias = 0; /* bias = 0,1,0,1,... for successive samples */
for (outcol = 0; outcol < output_cols; outcol++) {
*outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr) + GETJSAMPLE(inptr[1])
@@ -251,7 +263,7 @@ h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
{
int inrow, outrow;
JDIMENSION outcol;
- JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;
+ JDIMENSION output_cols = compptr->width_in_blocks * compptr->DCT_h_scaled_size;
register JSAMPROW inptr0, inptr1, outptr;
register int bias;
@@ -262,8 +274,8 @@ h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
expand_right_edge(input_data, cinfo->max_v_samp_factor,
cinfo->image_width, output_cols * 2);
- inrow = 0;
- for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {
+ inrow = outrow = 0;
+ while (inrow < cinfo->max_v_samp_factor) {
outptr = output_data[outrow];
inptr0 = input_data[inrow];
inptr1 = input_data[inrow+1];
@@ -276,6 +288,7 @@ h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
inptr0 += 2; inptr1 += 2;
}
inrow += 2;
+ outrow++;
}
}
@@ -294,7 +307,7 @@ h2v2_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
{
int inrow, outrow;
JDIMENSION colctr;
- JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;
+ JDIMENSION output_cols = compptr->width_in_blocks * compptr->DCT_h_scaled_size;
register JSAMPROW inptr0, inptr1, above_ptr, below_ptr, outptr;
INT32 membersum, neighsum, memberscale, neighscale;
@@ -321,8 +334,8 @@ h2v2_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
memberscale = 16384 - cinfo->smoothing_factor * 80; /* scaled (1-5*SF)/4 */
neighscale = cinfo->smoothing_factor * 16; /* scaled SF/4 */
- inrow = 0;
- for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {
+ inrow = outrow = 0;
+ while (inrow < cinfo->max_v_samp_factor) {
outptr = output_data[outrow];
inptr0 = input_data[inrow];
inptr1 = input_data[inrow+1];
@@ -378,6 +391,7 @@ h2v2_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
*outptr = (JSAMPLE) ((membersum + 32768) >> 16);
inrow += 2;
+ outrow++;
}
}
@@ -392,9 +406,9 @@ METHODDEF(void)
fullsize_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info *compptr,
JSAMPARRAY input_data, JSAMPARRAY output_data)
{
- int outrow;
+ int inrow;
JDIMENSION colctr;
- JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;
+ JDIMENSION output_cols = compptr->width_in_blocks * compptr->DCT_h_scaled_size;
register JSAMPROW inptr, above_ptr, below_ptr, outptr;
INT32 membersum, neighsum, memberscale, neighscale;
int colsum, lastcolsum, nextcolsum;
@@ -415,11 +429,11 @@ fullsize_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info *compptr,
memberscale = 65536L - cinfo->smoothing_factor * 512L; /* scaled 1-8*SF */
neighscale = cinfo->smoothing_factor * 64; /* scaled SF */
- for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {
- outptr = output_data[outrow];
- inptr = input_data[outrow];
- above_ptr = input_data[outrow-1];
- below_ptr = input_data[outrow+1];
+ for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) {
+ outptr = output_data[inrow];
+ inptr = input_data[inrow];
+ above_ptr = input_data[inrow-1];
+ below_ptr = input_data[inrow+1];
/* Special case for first column */
colsum = GETJSAMPLE(*above_ptr++) + GETJSAMPLE(*below_ptr++) +
@@ -467,6 +481,7 @@ jinit_downsampler (j_compress_ptr cinfo)
int ci;
jpeg_component_info * compptr;
boolean smoothok = TRUE;
+ int h_in_group, v_in_group, h_out_group, v_out_group;
downsample = (my_downsample_ptr)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
@@ -482,8 +497,17 @@ jinit_downsampler (j_compress_ptr cinfo)
/* Verify we can handle the sampling factors, and set up method pointers */
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
- if (compptr->h_samp_factor == cinfo->max_h_samp_factor &&
- compptr->v_samp_factor == cinfo->max_v_samp_factor) {
+ /* Compute size of an "output group" for DCT scaling. This many samples
+ * are to be converted from max_h_samp_factor * max_v_samp_factor pixels.
+ */
+ h_out_group = (compptr->h_samp_factor * compptr->DCT_h_scaled_size) /
+ cinfo->min_DCT_h_scaled_size;
+ v_out_group = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) /
+ cinfo->min_DCT_v_scaled_size;
+ h_in_group = cinfo->max_h_samp_factor;
+ v_in_group = cinfo->max_v_samp_factor;
+ downsample->rowgroup_height[ci] = v_out_group; /* save for use later */
+ if (h_in_group == h_out_group && v_in_group == v_out_group) {
#ifdef INPUT_SMOOTHING_SUPPORTED
if (cinfo->smoothing_factor) {
downsample->methods[ci] = fullsize_smooth_downsample;
@@ -491,12 +515,12 @@ jinit_downsampler (j_compress_ptr cinfo)
} else
#endif
downsample->methods[ci] = fullsize_downsample;
- } else if (compptr->h_samp_factor * 2 == cinfo->max_h_samp_factor &&
- compptr->v_samp_factor == cinfo->max_v_samp_factor) {
+ } else if (h_in_group == h_out_group * 2 &&
+ v_in_group == v_out_group) {
smoothok = FALSE;
downsample->methods[ci] = h2v1_downsample;
- } else if (compptr->h_samp_factor * 2 == cinfo->max_h_samp_factor &&
- compptr->v_samp_factor * 2 == cinfo->max_v_samp_factor) {
+ } else if (h_in_group == h_out_group * 2 &&
+ v_in_group == v_out_group * 2) {
#ifdef INPUT_SMOOTHING_SUPPORTED
if (cinfo->smoothing_factor) {
downsample->methods[ci] = h2v2_smooth_downsample;
@@ -504,10 +528,12 @@ jinit_downsampler (j_compress_ptr cinfo)
} else
#endif
downsample->methods[ci] = h2v2_downsample;
- } else if ((cinfo->max_h_samp_factor % compptr->h_samp_factor) == 0 &&
- (cinfo->max_v_samp_factor % compptr->v_samp_factor) == 0) {
+ } else if ((h_in_group % h_out_group) == 0 &&
+ (v_in_group % v_out_group) == 0) {
smoothok = FALSE;
downsample->methods[ci] = int_downsample;
+ downsample->h_expand[ci] = (UINT8) (h_in_group / h_out_group);
+ downsample->v_expand[ci] = (UINT8) (v_in_group / v_out_group);
} else
ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL);
}
diff --git a/src/3rdparty/libjpeg/jctrans.c b/src/3rdparty/libjpeg/jctrans.c
index 0e6d70769d..cee6b0f343 100644
--- a/src/3rdparty/libjpeg/jctrans.c
+++ b/src/3rdparty/libjpeg/jctrans.c
@@ -2,6 +2,7 @@
* jctrans.c
*
* Copyright (C) 1995-1998, Thomas G. Lane.
+ * Modified 2000-2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -76,6 +77,10 @@ jpeg_copy_critical_parameters (j_decompress_ptr srcinfo,
dstinfo->image_height = srcinfo->image_height;
dstinfo->input_components = srcinfo->num_components;
dstinfo->in_color_space = srcinfo->jpeg_color_space;
+ dstinfo->jpeg_width = srcinfo->output_width;
+ dstinfo->jpeg_height = srcinfo->output_height;
+ dstinfo->min_DCT_h_scaled_size = srcinfo->min_DCT_h_scaled_size;
+ dstinfo->min_DCT_v_scaled_size = srcinfo->min_DCT_v_scaled_size;
/* Initialize all parameters to default values */
jpeg_set_defaults(dstinfo);
/* jpeg_set_defaults may choose wrong colorspace, eg YCbCr if input is RGB.
@@ -158,25 +163,14 @@ LOCAL(void)
transencode_master_selection (j_compress_ptr cinfo,
jvirt_barray_ptr * coef_arrays)
{
- /* Although we don't actually use input_components for transcoding,
- * jcmaster.c's initial_setup will complain if input_components is 0.
- */
- cinfo->input_components = 1;
/* Initialize master control (includes parameter checking/processing) */
jinit_c_master_control(cinfo, TRUE /* transcode only */);
/* Entropy encoding: either Huffman or arithmetic coding. */
- if (cinfo->arith_code) {
- ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
- } else {
- if (cinfo->progressive_mode) {
-#ifdef C_PROGRESSIVE_SUPPORTED
- jinit_phuff_encoder(cinfo);
-#else
- ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
- } else
- jinit_huff_encoder(cinfo);
+ if (cinfo->arith_code)
+ jinit_arith_encoder(cinfo);
+ else {
+ jinit_huff_encoder(cinfo);
}
/* We need a special coefficient buffer controller. */
diff --git a/src/3rdparty/libjpeg/jdapimin.c b/src/3rdparty/libjpeg/jdapimin.c
index cadb59fce3..7f1ce4c05b 100644
--- a/src/3rdparty/libjpeg/jdapimin.c
+++ b/src/3rdparty/libjpeg/jdapimin.c
@@ -2,6 +2,7 @@
* jdapimin.c
*
* Copyright (C) 1994-1998, Thomas G. Lane.
+ * Modified 2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -185,8 +186,8 @@ default_decompress_parms (j_decompress_ptr cinfo)
}
/* Set defaults for other decompression parameters. */
- cinfo->scale_num = 1; /* 1:1 scaling */
- cinfo->scale_denom = 1;
+ cinfo->scale_num = cinfo->block_size; /* 1:1 scaling */
+ cinfo->scale_denom = cinfo->block_size;
cinfo->output_gamma = 1.0;
cinfo->buffered_image = FALSE;
cinfo->raw_data_out = FALSE;
diff --git a/src/3rdparty/libjpeg/jdapistd.c b/src/3rdparty/libjpeg/jdapistd.c
index c8e3fa0c35..9d74537772 100644
--- a/src/3rdparty/libjpeg/jdapistd.c
+++ b/src/3rdparty/libjpeg/jdapistd.c
@@ -202,7 +202,7 @@ jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data,
}
/* Verify that at least one iMCU row can be returned. */
- lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size;
+ lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->min_DCT_v_scaled_size;
if (max_lines < lines_per_iMCU_row)
ERREXIT(cinfo, JERR_BUFFER_SIZE);
diff --git a/src/3rdparty/libjpeg/jdarith.c b/src/3rdparty/libjpeg/jdarith.c
new file mode 100644
index 0000000000..c858b248b6
--- /dev/null
+++ b/src/3rdparty/libjpeg/jdarith.c
@@ -0,0 +1,772 @@
+/*
+ * jdarith.c
+ *
+ * Developed 1997-2009 by Guido Vollbeding.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains portable arithmetic entropy decoding routines for JPEG
+ * (implementing the ISO/IEC IS 10918-1 and CCITT Recommendation ITU-T T.81).
+ *
+ * Both sequential and progressive modes are supported in this single module.
+ *
+ * Suspension is not currently supported in this module.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+
+
+/* Expanded entropy decoder object for arithmetic decoding. */
+
+typedef struct {
+ struct jpeg_entropy_decoder pub; /* public fields */
+
+ INT32 c; /* C register, base of coding interval + input bit buffer */
+ INT32 a; /* A register, normalized size of coding interval */
+ int ct; /* bit shift counter, # of bits left in bit buffer part of C */
+ /* init: ct = -16 */
+ /* run: ct = 0..7 */
+ /* error: ct = -1 */
+ int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */
+ int dc_context[MAX_COMPS_IN_SCAN]; /* context index for DC conditioning */
+
+ unsigned int restarts_to_go; /* MCUs left in this restart interval */
+
+ /* Pointers to statistics areas (these workspaces have image lifespan) */
+ unsigned char * dc_stats[NUM_ARITH_TBLS];
+ unsigned char * ac_stats[NUM_ARITH_TBLS];
+
+ /* Statistics bin for coding with fixed probability 0.5 */
+ unsigned char fixed_bin[4];
+} arith_entropy_decoder;
+
+typedef arith_entropy_decoder * arith_entropy_ptr;
+
+/* The following two definitions specify the allocation chunk size
+ * for the statistics area.
+ * According to sections F.1.4.4.1.3 and F.1.4.4.2, we need at least
+ * 49 statistics bins for DC, and 245 statistics bins for AC coding.
+ *
+ * We use a compact representation with 1 byte per statistics bin,
+ * thus the numbers directly represent byte sizes.
+ * This 1 byte per statistics bin contains the meaning of the MPS
+ * (more probable symbol) in the highest bit (mask 0x80), and the
+ * index into the probability estimation state machine table
+ * in the lower bits (mask 0x7F).
+ */
+
+#define DC_STAT_BINS 64
+#define AC_STAT_BINS 256
+
+
+LOCAL(int)
+get_byte (j_decompress_ptr cinfo)
+/* Read next input byte; we do not support suspension in this module. */
+{
+ struct jpeg_source_mgr * src = cinfo->src;
+
+ if (src->bytes_in_buffer == 0)
+ if (! (*src->fill_input_buffer) (cinfo))
+ ERREXIT(cinfo, JERR_CANT_SUSPEND);
+ src->bytes_in_buffer--;
+ return GETJOCTET(*src->next_input_byte++);
+}
+
+
+/*
+ * The core arithmetic decoding routine (common in JPEG and JBIG).
+ * This needs to go as fast as possible.
+ * Machine-dependent optimization facilities
+ * are not utilized in this portable implementation.
+ * However, this code should be fairly efficient and
+ * may be a good base for further optimizations anyway.
+ *
+ * Return value is 0 or 1 (binary decision).
+ *
+ * Note: I've changed the handling of the code base & bit
+ * buffer register C compared to other implementations
+ * based on the standards layout & procedures.
+ * While it also contains both the actual base of the
+ * coding interval (16 bits) and the next-bits buffer,
+ * the cut-point between these two parts is floating
+ * (instead of fixed) with the bit shift counter CT.
+ * Thus, we also need only one (variable instead of
+ * fixed size) shift for the LPS/MPS decision, and
+ * we can get away with any renormalization update
+ * of C (except for new data insertion, of course).
+ *
+ * I've also introduced a new scheme for accessing
+ * the probability estimation state machine table,
+ * derived from Markus Kuhn's JBIG implementation.
+ */
+
+LOCAL(int)
+arith_decode (j_decompress_ptr cinfo, unsigned char *st)
+{
+ register arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy;
+ register unsigned char nl, nm;
+ register INT32 qe, temp;
+ register int sv, data;
+
+ /* Renormalization & data input per section D.2.6 */
+ while (e->a < 0x8000L) {
+ if (--e->ct < 0) {
+ /* Need to fetch next data byte */
+ if (cinfo->unread_marker)
+ data = 0; /* stuff zero data */
+ else {
+ data = get_byte(cinfo); /* read next input byte */
+ if (data == 0xFF) { /* zero stuff or marker code */
+ do data = get_byte(cinfo);
+ while (data == 0xFF); /* swallow extra 0xFF bytes */
+ if (data == 0)
+ data = 0xFF; /* discard stuffed zero byte */
+ else {
+ /* Note: Different from the Huffman decoder, hitting
+ * a marker while processing the compressed data
+ * segment is legal in arithmetic coding.
+ * The convention is to supply zero data
+ * then until decoding is complete.
+ */
+ cinfo->unread_marker = data;
+ data = 0;
+ }
+ }
+ }
+ e->c = (e->c << 8) | data; /* insert data into C register */
+ if ((e->ct += 8) < 0) /* update bit shift counter */
+ /* Need more initial bytes */
+ if (++e->ct == 0)
+ /* Got 2 initial bytes -> re-init A and exit loop */
+ e->a = 0x8000L; /* => e->a = 0x10000L after loop exit */
+ }
+ e->a <<= 1;
+ }
+
+ /* Fetch values from our compact representation of Table D.2:
+ * Qe values and probability estimation state machine
+ */
+ sv = *st;
+ qe = jpeg_aritab[sv & 0x7F]; /* => Qe_Value */
+ nl = qe & 0xFF; qe >>= 8; /* Next_Index_LPS + Switch_MPS */
+ nm = qe & 0xFF; qe >>= 8; /* Next_Index_MPS */
+
+ /* Decode & estimation procedures per sections D.2.4 & D.2.5 */
+ temp = e->a - qe;
+ e->a = temp;
+ temp <<= e->ct;
+ if (e->c >= temp) {
+ e->c -= temp;
+ /* Conditional LPS (less probable symbol) exchange */
+ if (e->a < qe) {
+ e->a = qe;
+ *st = (sv & 0x80) ^ nm; /* Estimate_after_MPS */
+ } else {
+ e->a = qe;
+ *st = (sv & 0x80) ^ nl; /* Estimate_after_LPS */
+ sv ^= 0x80; /* Exchange LPS/MPS */
+ }
+ } else if (e->a < 0x8000L) {
+ /* Conditional MPS (more probable symbol) exchange */
+ if (e->a < qe) {
+ *st = (sv & 0x80) ^ nl; /* Estimate_after_LPS */
+ sv ^= 0x80; /* Exchange LPS/MPS */
+ } else {
+ *st = (sv & 0x80) ^ nm; /* Estimate_after_MPS */
+ }
+ }
+
+ return sv >> 7;
+}
+
+
+/*
+ * Check for a restart marker & resynchronize decoder.
+ */
+
+LOCAL(void)
+process_restart (j_decompress_ptr cinfo)
+{
+ arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
+ int ci;
+ jpeg_component_info * compptr;
+
+ /* Advance past the RSTn marker */
+ if (! (*cinfo->marker->read_restart_marker) (cinfo))
+ ERREXIT(cinfo, JERR_CANT_SUSPEND);
+
+ /* Re-initialize statistics areas */
+ for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+ compptr = cinfo->cur_comp_info[ci];
+ if (! cinfo->progressive_mode || (cinfo->Ss == 0 && cinfo->Ah == 0)) {
+ MEMZERO(entropy->dc_stats[compptr->dc_tbl_no], DC_STAT_BINS);
+ /* Reset DC predictions to 0 */
+ entropy->last_dc_val[ci] = 0;
+ entropy->dc_context[ci] = 0;
+ }
+ if ((! cinfo->progressive_mode && cinfo->lim_Se) ||
+ (cinfo->progressive_mode && cinfo->Ss)) {
+ MEMZERO(entropy->ac_stats[compptr->ac_tbl_no], AC_STAT_BINS);
+ }
+ }
+
+ /* Reset arithmetic decoding variables */
+ entropy->c = 0;
+ entropy->a = 0;
+ entropy->ct = -16; /* force reading 2 initial bytes to fill C */
+
+ /* Reset restart counter */
+ entropy->restarts_to_go = cinfo->restart_interval;
+}
+
+
+/*
+ * Arithmetic MCU decoding.
+ * Each of these routines decodes and returns one MCU's worth of
+ * arithmetic-compressed coefficients.
+ * The coefficients are reordered from zigzag order into natural array order,
+ * but are not dequantized.
+ *
+ * The i'th block of the MCU is stored into the block pointed to by
+ * MCU_data[i]. WE ASSUME THIS AREA IS INITIALLY ZEROED BY THE CALLER.
+ */
+
+/*
+ * MCU decoding for DC initial scan (either spectral selection,
+ * or first pass of successive approximation).
+ */
+
+METHODDEF(boolean)
+decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
+ JBLOCKROW block;
+ unsigned char *st;
+ int blkn, ci, tbl, sign;
+ int v, m;
+
+ /* Process restart marker if needed */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0)
+ process_restart(cinfo);
+ entropy->restarts_to_go--;
+ }
+
+ if (entropy->ct == -1) return TRUE; /* if error do nothing */
+
+ /* Outer loop handles each block in the MCU */
+
+ for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+ block = MCU_data[blkn];
+ ci = cinfo->MCU_membership[blkn];
+ tbl = cinfo->cur_comp_info[ci]->dc_tbl_no;
+
+ /* Sections F.2.4.1 & F.1.4.4.1: Decoding of DC coefficients */
+
+ /* Table F.4: Point to statistics bin S0 for DC coefficient coding */
+ st = entropy->dc_stats[tbl] + entropy->dc_context[ci];
+
+ /* Figure F.19: Decode_DC_DIFF */
+ if (arith_decode(cinfo, st) == 0)
+ entropy->dc_context[ci] = 0;
+ else {
+ /* Figure F.21: Decoding nonzero value v */
+ /* Figure F.22: Decoding the sign of v */
+ sign = arith_decode(cinfo, st + 1);
+ st += 2; st += sign;
+ /* Figure F.23: Decoding the magnitude category of v */
+ if ((m = arith_decode(cinfo, st)) != 0) {
+ st = entropy->dc_stats[tbl] + 20; /* Table F.4: X1 = 20 */
+ while (arith_decode(cinfo, st)) {
+ if ((m <<= 1) == 0x8000) {
+ WARNMS(cinfo, JWRN_ARITH_BAD_CODE);
+ entropy->ct = -1; /* magnitude overflow */
+ return TRUE;
+ }
+ st += 1;
+ }
+ }
+ /* Section F.1.4.4.1.2: Establish dc_context conditioning category */
+ if (m < (int) ((1L << cinfo->arith_dc_L[tbl]) >> 1))
+ entropy->dc_context[ci] = 0; /* zero diff category */
+ else if (m > (int) ((1L << cinfo->arith_dc_U[tbl]) >> 1))
+ entropy->dc_context[ci] = 12 + (sign * 4); /* large diff category */
+ else
+ entropy->dc_context[ci] = 4 + (sign * 4); /* small diff category */
+ v = m;
+ /* Figure F.24: Decoding the magnitude bit pattern of v */
+ st += 14;
+ while (m >>= 1)
+ if (arith_decode(cinfo, st)) v |= m;
+ v += 1; if (sign) v = -v;
+ entropy->last_dc_val[ci] += v;
+ }
+
+ /* Scale and output the DC coefficient (assumes jpeg_natural_order[0]=0) */
+ (*block)[0] = (JCOEF) (entropy->last_dc_val[ci] << cinfo->Al);
+ }
+
+ return TRUE;
+}
+
+
+/*
+ * MCU decoding for AC initial scan (either spectral selection,
+ * or first pass of successive approximation).
+ */
+
+METHODDEF(boolean)
+decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
+ JBLOCKROW block;
+ unsigned char *st;
+ int tbl, sign, k;
+ int v, m;
+ const int * natural_order;
+
+ /* Process restart marker if needed */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0)
+ process_restart(cinfo);
+ entropy->restarts_to_go--;
+ }
+
+ if (entropy->ct == -1) return TRUE; /* if error do nothing */
+
+ natural_order = cinfo->natural_order;
+
+ /* There is always only one block per MCU */
+ block = MCU_data[0];
+ tbl = cinfo->cur_comp_info[0]->ac_tbl_no;
+
+ /* Sections F.2.4.2 & F.1.4.4.2: Decoding of AC coefficients */
+
+ /* Figure F.20: Decode_AC_coefficients */
+ for (k = cinfo->Ss; k <= cinfo->Se; k++) {
+ st = entropy->ac_stats[tbl] + 3 * (k - 1);
+ if (arith_decode(cinfo, st)) break; /* EOB flag */
+ while (arith_decode(cinfo, st + 1) == 0) {
+ st += 3; k++;
+ if (k > cinfo->Se) {
+ WARNMS(cinfo, JWRN_ARITH_BAD_CODE);
+ entropy->ct = -1; /* spectral overflow */
+ return TRUE;
+ }
+ }
+ /* Figure F.21: Decoding nonzero value v */
+ /* Figure F.22: Decoding the sign of v */
+ sign = arith_decode(cinfo, entropy->fixed_bin);
+ st += 2;
+ /* Figure F.23: Decoding the magnitude category of v */
+ if ((m = arith_decode(cinfo, st)) != 0) {
+ if (arith_decode(cinfo, st)) {
+ m <<= 1;
+ st = entropy->ac_stats[tbl] +
+ (k <= cinfo->arith_ac_K[tbl] ? 189 : 217);
+ while (arith_decode(cinfo, st)) {
+ if ((m <<= 1) == 0x8000) {
+ WARNMS(cinfo, JWRN_ARITH_BAD_CODE);
+ entropy->ct = -1; /* magnitude overflow */
+ return TRUE;
+ }
+ st += 1;
+ }
+ }
+ }
+ v = m;
+ /* Figure F.24: Decoding the magnitude bit pattern of v */
+ st += 14;
+ while (m >>= 1)
+ if (arith_decode(cinfo, st)) v |= m;
+ v += 1; if (sign) v = -v;
+ /* Scale and output coefficient in natural (dezigzagged) order */
+ (*block)[natural_order[k]] = (JCOEF) (v << cinfo->Al);
+ }
+
+ return TRUE;
+}
+
+
+/*
+ * MCU decoding for DC successive approximation refinement scan.
+ */
+
+METHODDEF(boolean)
+decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
+ unsigned char *st;
+ int p1, blkn;
+
+ /* Process restart marker if needed */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0)
+ process_restart(cinfo);
+ entropy->restarts_to_go--;
+ }
+
+ st = entropy->fixed_bin; /* use fixed probability estimation */
+ p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */
+
+ /* Outer loop handles each block in the MCU */
+
+ for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+ /* Encoded data is simply the next bit of the two's-complement DC value */
+ if (arith_decode(cinfo, st))
+ MCU_data[blkn][0][0] |= p1;
+ }
+
+ return TRUE;
+}
+
+
+/*
+ * MCU decoding for AC successive approximation refinement scan.
+ */
+
+METHODDEF(boolean)
+decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
+ JBLOCKROW block;
+ JCOEFPTR thiscoef;
+ unsigned char *st;
+ int tbl, k, kex;
+ int p1, m1;
+ const int * natural_order;
+
+ /* Process restart marker if needed */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0)
+ process_restart(cinfo);
+ entropy->restarts_to_go--;
+ }
+
+ if (entropy->ct == -1) return TRUE; /* if error do nothing */
+
+ natural_order = cinfo->natural_order;
+
+ /* There is always only one block per MCU */
+ block = MCU_data[0];
+ tbl = cinfo->cur_comp_info[0]->ac_tbl_no;
+
+ p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */
+ m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */
+
+ /* Establish EOBx (previous stage end-of-block) index */
+ for (kex = cinfo->Se; kex > 0; kex--)
+ if ((*block)[natural_order[kex]]) break;
+
+ for (k = cinfo->Ss; k <= cinfo->Se; k++) {
+ st = entropy->ac_stats[tbl] + 3 * (k - 1);
+ if (k > kex)
+ if (arith_decode(cinfo, st)) break; /* EOB flag */
+ for (;;) {
+ thiscoef = *block + natural_order[k];
+ if (*thiscoef) { /* previously nonzero coef */
+ if (arith_decode(cinfo, st + 2)) {
+ if (*thiscoef < 0)
+ *thiscoef += m1;
+ else
+ *thiscoef += p1;
+ }
+ break;
+ }
+ if (arith_decode(cinfo, st + 1)) { /* newly nonzero coef */
+ if (arith_decode(cinfo, entropy->fixed_bin))
+ *thiscoef = m1;
+ else
+ *thiscoef = p1;
+ break;
+ }
+ st += 3; k++;
+ if (k > cinfo->Se) {
+ WARNMS(cinfo, JWRN_ARITH_BAD_CODE);
+ entropy->ct = -1; /* spectral overflow */
+ return TRUE;
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+
+/*
+ * Decode one MCU's worth of arithmetic-compressed coefficients.
+ */
+
+METHODDEF(boolean)
+decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
+ jpeg_component_info * compptr;
+ JBLOCKROW block;
+ unsigned char *st;
+ int blkn, ci, tbl, sign, k;
+ int v, m;
+ const int * natural_order;
+
+ /* Process restart marker if needed */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0)
+ process_restart(cinfo);
+ entropy->restarts_to_go--;
+ }
+
+ if (entropy->ct == -1) return TRUE; /* if error do nothing */
+
+ natural_order = cinfo->natural_order;
+
+ /* Outer loop handles each block in the MCU */
+
+ for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+ block = MCU_data[blkn];
+ ci = cinfo->MCU_membership[blkn];
+ compptr = cinfo->cur_comp_info[ci];
+
+ /* Sections F.2.4.1 & F.1.4.4.1: Decoding of DC coefficients */
+
+ tbl = compptr->dc_tbl_no;
+
+ /* Table F.4: Point to statistics bin S0 for DC coefficient coding */
+ st = entropy->dc_stats[tbl] + entropy->dc_context[ci];
+
+ /* Figure F.19: Decode_DC_DIFF */
+ if (arith_decode(cinfo, st) == 0)
+ entropy->dc_context[ci] = 0;
+ else {
+ /* Figure F.21: Decoding nonzero value v */
+ /* Figure F.22: Decoding the sign of v */
+ sign = arith_decode(cinfo, st + 1);
+ st += 2; st += sign;
+ /* Figure F.23: Decoding the magnitude category of v */
+ if ((m = arith_decode(cinfo, st)) != 0) {
+ st = entropy->dc_stats[tbl] + 20; /* Table F.4: X1 = 20 */
+ while (arith_decode(cinfo, st)) {
+ if ((m <<= 1) == 0x8000) {
+ WARNMS(cinfo, JWRN_ARITH_BAD_CODE);
+ entropy->ct = -1; /* magnitude overflow */
+ return TRUE;
+ }
+ st += 1;
+ }
+ }
+ /* Section F.1.4.4.1.2: Establish dc_context conditioning category */
+ if (m < (int) ((1L << cinfo->arith_dc_L[tbl]) >> 1))
+ entropy->dc_context[ci] = 0; /* zero diff category */
+ else if (m > (int) ((1L << cinfo->arith_dc_U[tbl]) >> 1))
+ entropy->dc_context[ci] = 12 + (sign * 4); /* large diff category */
+ else
+ entropy->dc_context[ci] = 4 + (sign * 4); /* small diff category */
+ v = m;
+ /* Figure F.24: Decoding the magnitude bit pattern of v */
+ st += 14;
+ while (m >>= 1)
+ if (arith_decode(cinfo, st)) v |= m;
+ v += 1; if (sign) v = -v;
+ entropy->last_dc_val[ci] += v;
+ }
+
+ (*block)[0] = (JCOEF) entropy->last_dc_val[ci];
+
+ /* Sections F.2.4.2 & F.1.4.4.2: Decoding of AC coefficients */
+
+ tbl = compptr->ac_tbl_no;
+
+ /* Figure F.20: Decode_AC_coefficients */
+ for (k = 1; k <= cinfo->lim_Se; k++) {
+ st = entropy->ac_stats[tbl] + 3 * (k - 1);
+ if (arith_decode(cinfo, st)) break; /* EOB flag */
+ while (arith_decode(cinfo, st + 1) == 0) {
+ st += 3; k++;
+ if (k > cinfo->lim_Se) {
+ WARNMS(cinfo, JWRN_ARITH_BAD_CODE);
+ entropy->ct = -1; /* spectral overflow */
+ return TRUE;
+ }
+ }
+ /* Figure F.21: Decoding nonzero value v */
+ /* Figure F.22: Decoding the sign of v */
+ sign = arith_decode(cinfo, entropy->fixed_bin);
+ st += 2;
+ /* Figure F.23: Decoding the magnitude category of v */
+ if ((m = arith_decode(cinfo, st)) != 0) {
+ if (arith_decode(cinfo, st)) {
+ m <<= 1;
+ st = entropy->ac_stats[tbl] +
+ (k <= cinfo->arith_ac_K[tbl] ? 189 : 217);
+ while (arith_decode(cinfo, st)) {
+ if ((m <<= 1) == 0x8000) {
+ WARNMS(cinfo, JWRN_ARITH_BAD_CODE);
+ entropy->ct = -1; /* magnitude overflow */
+ return TRUE;
+ }
+ st += 1;
+ }
+ }
+ }
+ v = m;
+ /* Figure F.24: Decoding the magnitude bit pattern of v */
+ st += 14;
+ while (m >>= 1)
+ if (arith_decode(cinfo, st)) v |= m;
+ v += 1; if (sign) v = -v;
+ (*block)[natural_order[k]] = (JCOEF) v;
+ }
+ }
+
+ return TRUE;
+}
+
+
+/*
+ * Initialize for an arithmetic-compressed scan.
+ */
+
+METHODDEF(void)
+start_pass (j_decompress_ptr cinfo)
+{
+ arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
+ int ci, tbl;
+ jpeg_component_info * compptr;
+
+ if (cinfo->progressive_mode) {
+ /* Validate progressive scan parameters */
+ if (cinfo->Ss == 0) {
+ if (cinfo->Se != 0)
+ goto bad;
+ } else {
+ /* need not check Ss/Se < 0 since they came from unsigned bytes */
+ if (cinfo->Se < cinfo->Ss || cinfo->Se > cinfo->lim_Se)
+ goto bad;
+ /* AC scans may have only one component */
+ if (cinfo->comps_in_scan != 1)
+ goto bad;
+ }
+ if (cinfo->Ah != 0) {
+ /* Successive approximation refinement scan: must have Al = Ah-1. */
+ if (cinfo->Ah-1 != cinfo->Al)
+ goto bad;
+ }
+ if (cinfo->Al > 13) { /* need not check for < 0 */
+ bad:
+ ERREXIT4(cinfo, JERR_BAD_PROGRESSION,
+ cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al);
+ }
+ /* Update progression status, and verify that scan order is legal.
+ * Note that inter-scan inconsistencies are treated as warnings
+ * not fatal errors ... not clear if this is right way to behave.
+ */
+ for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+ int coefi, cindex = cinfo->cur_comp_info[ci]->component_index;
+ int *coef_bit_ptr = & cinfo->coef_bits[cindex][0];
+ if (cinfo->Ss && coef_bit_ptr[0] < 0) /* AC without prior DC scan */
+ WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, 0);
+ for (coefi = cinfo->Ss; coefi <= cinfo->Se; coefi++) {
+ int expected = (coef_bit_ptr[coefi] < 0) ? 0 : coef_bit_ptr[coefi];
+ if (cinfo->Ah != expected)
+ WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, coefi);
+ coef_bit_ptr[coefi] = cinfo->Al;
+ }
+ }
+ /* Select MCU decoding routine */
+ if (cinfo->Ah == 0) {
+ if (cinfo->Ss == 0)
+ entropy->pub.decode_mcu = decode_mcu_DC_first;
+ else
+ entropy->pub.decode_mcu = decode_mcu_AC_first;
+ } else {
+ if (cinfo->Ss == 0)
+ entropy->pub.decode_mcu = decode_mcu_DC_refine;
+ else
+ entropy->pub.decode_mcu = decode_mcu_AC_refine;
+ }
+ } else {
+ /* Check that the scan parameters Ss, Se, Ah/Al are OK for sequential JPEG.
+ * This ought to be an error condition, but we make it a warning.
+ */
+ if (cinfo->Ss != 0 || cinfo->Ah != 0 || cinfo->Al != 0 ||
+ (cinfo->Se < DCTSIZE2 && cinfo->Se != cinfo->lim_Se))
+ WARNMS(cinfo, JWRN_NOT_SEQUENTIAL);
+ /* Select MCU decoding routine */
+ entropy->pub.decode_mcu = decode_mcu;
+ }
+
+ /* Allocate & initialize requested statistics areas */
+ for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+ compptr = cinfo->cur_comp_info[ci];
+ if (! cinfo->progressive_mode || (cinfo->Ss == 0 && cinfo->Ah == 0)) {
+ tbl = compptr->dc_tbl_no;
+ if (tbl < 0 || tbl >= NUM_ARITH_TBLS)
+ ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl);
+ if (entropy->dc_stats[tbl] == NULL)
+ entropy->dc_stats[tbl] = (unsigned char *) (*cinfo->mem->alloc_small)
+ ((j_common_ptr) cinfo, JPOOL_IMAGE, DC_STAT_BINS);
+ MEMZERO(entropy->dc_stats[tbl], DC_STAT_BINS);
+ /* Initialize DC predictions to 0 */
+ entropy->last_dc_val[ci] = 0;
+ entropy->dc_context[ci] = 0;
+ }
+ if ((! cinfo->progressive_mode && cinfo->lim_Se) ||
+ (cinfo->progressive_mode && cinfo->Ss)) {
+ tbl = compptr->ac_tbl_no;
+ if (tbl < 0 || tbl >= NUM_ARITH_TBLS)
+ ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl);
+ if (entropy->ac_stats[tbl] == NULL)
+ entropy->ac_stats[tbl] = (unsigned char *) (*cinfo->mem->alloc_small)
+ ((j_common_ptr) cinfo, JPOOL_IMAGE, AC_STAT_BINS);
+ MEMZERO(entropy->ac_stats[tbl], AC_STAT_BINS);
+ }
+ }
+
+ /* Initialize arithmetic decoding variables */
+ entropy->c = 0;
+ entropy->a = 0;
+ entropy->ct = -16; /* force reading 2 initial bytes to fill C */
+
+ /* Initialize restart counter */
+ entropy->restarts_to_go = cinfo->restart_interval;
+}
+
+
+/*
+ * Module initialization routine for arithmetic entropy decoding.
+ */
+
+GLOBAL(void)
+jinit_arith_decoder (j_decompress_ptr cinfo)
+{
+ arith_entropy_ptr entropy;
+ int i;
+
+ entropy = (arith_entropy_ptr)
+ (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+ SIZEOF(arith_entropy_decoder));
+ cinfo->entropy = (struct jpeg_entropy_decoder *) entropy;
+ entropy->pub.start_pass = start_pass;
+
+ /* Mark tables unallocated */
+ for (i = 0; i < NUM_ARITH_TBLS; i++) {
+ entropy->dc_stats[i] = NULL;
+ entropy->ac_stats[i] = NULL;
+ }
+
+ /* Initialize index for fixed probability estimation */
+ entropy->fixed_bin[0] = 113;
+
+ if (cinfo->progressive_mode) {
+ /* Create progression status table */
+ int *coef_bit_ptr, ci;
+ cinfo->coef_bits = (int (*)[DCTSIZE2])
+ (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+ cinfo->num_components*DCTSIZE2*SIZEOF(int));
+ coef_bit_ptr = & cinfo->coef_bits[0][0];
+ for (ci = 0; ci < cinfo->num_components; ci++)
+ for (i = 0; i < DCTSIZE2; i++)
+ *coef_bit_ptr++ = -1;
+ }
+}
diff --git a/src/3rdparty/libjpeg/jdatadst.c b/src/3rdparty/libjpeg/jdatadst.c
index a8f6fb0e02..472d5f3241 100644
--- a/src/3rdparty/libjpeg/jdatadst.c
+++ b/src/3rdparty/libjpeg/jdatadst.c
@@ -2,13 +2,14 @@
* jdatadst.c
*
* Copyright (C) 1994-1996, Thomas G. Lane.
+ * Modified 2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
* This file contains compression data destination routines for the case of
- * emitting JPEG data to a file (or any stdio stream). While these routines
- * are sufficient for most applications, some will want to use a different
- * destination manager.
+ * emitting JPEG data to memory or to a file (or any stdio stream).
+ * While these routines are sufficient for most applications,
+ * some will want to use a different destination manager.
* IMPORTANT: we assume that fwrite() will correctly transcribe an array of
* JOCTETs into 8-bit-wide elements on external storage. If char is wider
* than 8 bits on your machine, you may need to do some tweaking.
@@ -19,6 +20,11 @@
#include "jpeglib.h"
#include "jerror.h"
+#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare malloc(),free() */
+extern void * malloc JPP((size_t size));
+extern void free JPP((void *ptr));
+#endif
+
/* Expanded data destination object for stdio output */
@@ -34,6 +40,21 @@ typedef my_destination_mgr * my_dest_ptr;
#define OUTPUT_BUF_SIZE 4096 /* choose an efficiently fwrite'able size */
+/* Expanded data destination object for memory output */
+
+typedef struct {
+ struct jpeg_destination_mgr pub; /* public fields */
+
+ unsigned char ** outbuffer; /* target buffer */
+ unsigned long * outsize;
+ unsigned char * newbuffer; /* newly allocated buffer */
+ JOCTET * buffer; /* start of buffer */
+ size_t bufsize;
+} my_mem_destination_mgr;
+
+typedef my_mem_destination_mgr * my_mem_dest_ptr;
+
+
/*
* Initialize destination --- called by jpeg_start_compress
* before any data is actually written.
@@ -53,6 +74,12 @@ init_destination (j_compress_ptr cinfo)
dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;
}
+METHODDEF(void)
+init_mem_destination (j_compress_ptr cinfo)
+{
+ /* no work necessary here */
+}
+
/*
* Empty the output buffer --- called whenever buffer fills up.
@@ -92,6 +119,36 @@ empty_output_buffer (j_compress_ptr cinfo)
return TRUE;
}
+METHODDEF(boolean)
+empty_mem_output_buffer (j_compress_ptr cinfo)
+{
+ size_t nextsize;
+ JOCTET * nextbuffer;
+ my_mem_dest_ptr dest = (my_mem_dest_ptr) cinfo->dest;
+
+ /* Try to allocate new buffer with double size */
+ nextsize = dest->bufsize * 2;
+ nextbuffer = malloc(nextsize);
+
+ if (nextbuffer == NULL)
+ ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10);
+
+ MEMCOPY(nextbuffer, dest->buffer, dest->bufsize);
+
+ if (dest->newbuffer != NULL)
+ free(dest->newbuffer);
+
+ dest->newbuffer = nextbuffer;
+
+ dest->pub.next_output_byte = nextbuffer + dest->bufsize;
+ dest->pub.free_in_buffer = dest->bufsize;
+
+ dest->buffer = nextbuffer;
+ dest->bufsize = nextsize;
+
+ return TRUE;
+}
+
/*
* Terminate destination --- called by jpeg_finish_compress
@@ -119,6 +176,15 @@ term_destination (j_compress_ptr cinfo)
ERREXIT(cinfo, JERR_FILE_WRITE);
}
+METHODDEF(void)
+term_mem_destination (j_compress_ptr cinfo)
+{
+ my_mem_dest_ptr dest = (my_mem_dest_ptr) cinfo->dest;
+
+ *dest->outbuffer = dest->buffer;
+ *dest->outsize = dest->bufsize - dest->pub.free_in_buffer;
+}
+
/*
* Prepare for output to a stdio stream.
@@ -149,3 +215,53 @@ jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile)
dest->pub.term_destination = term_destination;
dest->outfile = outfile;
}
+
+
+/*
+ * Prepare for output to a memory buffer.
+ * The caller may supply an own initial buffer with appropriate size.
+ * Otherwise, or when the actual data output exceeds the given size,
+ * the library adapts the buffer size as necessary.
+ * The standard library functions malloc/free are used for allocating
+ * larger memory, so the buffer is available to the application after
+ * finishing compression, and then the application is responsible for
+ * freeing the requested memory.
+ */
+
+GLOBAL(void)
+jpeg_mem_dest (j_compress_ptr cinfo,
+ unsigned char ** outbuffer, unsigned long * outsize)
+{
+ my_mem_dest_ptr dest;
+
+ if (outbuffer == NULL || outsize == NULL) /* sanity check */
+ ERREXIT(cinfo, JERR_BUFFER_SIZE);
+
+ /* The destination object is made permanent so that multiple JPEG images
+ * can be written to the same buffer without re-executing jpeg_mem_dest.
+ */
+ if (cinfo->dest == NULL) { /* first time for this JPEG object? */
+ cinfo->dest = (struct jpeg_destination_mgr *)
+ (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
+ SIZEOF(my_mem_destination_mgr));
+ }
+
+ dest = (my_mem_dest_ptr) cinfo->dest;
+ dest->pub.init_destination = init_mem_destination;
+ dest->pub.empty_output_buffer = empty_mem_output_buffer;
+ dest->pub.term_destination = term_mem_destination;
+ dest->outbuffer = outbuffer;
+ dest->outsize = outsize;
+ dest->newbuffer = NULL;
+
+ if (*outbuffer == NULL || *outsize == 0) {
+ /* Allocate initial buffer */
+ dest->newbuffer = *outbuffer = malloc(OUTPUT_BUF_SIZE);
+ if (dest->newbuffer == NULL)
+ ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10);
+ *outsize = OUTPUT_BUF_SIZE;
+ }
+
+ dest->pub.next_output_byte = dest->buffer = *outbuffer;
+ dest->pub.free_in_buffer = dest->bufsize = *outsize;
+}
diff --git a/src/3rdparty/libjpeg/jdatasrc.c b/src/3rdparty/libjpeg/jdatasrc.c
index edc752bf5d..d3136dbac0 100644
--- a/src/3rdparty/libjpeg/jdatasrc.c
+++ b/src/3rdparty/libjpeg/jdatasrc.c
@@ -2,13 +2,14 @@
* jdatasrc.c
*
* Copyright (C) 1994-1996, Thomas G. Lane.
+ * Modified 2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
* This file contains decompression data source routines for the case of
- * reading JPEG data from a file (or any stdio stream). While these routines
- * are sufficient for most applications, some will want to use a different
- * source manager.
+ * reading JPEG data from memory or from a file (or any stdio stream).
+ * While these routines are sufficient for most applications,
+ * some will want to use a different source manager.
* IMPORTANT: we assume that fread() will correctly transcribe an array of
* JOCTETs from 8-bit-wide elements on external storage. If char is wider
* than 8 bits on your machine, you may need to do some tweaking.
@@ -52,6 +53,12 @@ init_source (j_decompress_ptr cinfo)
src->start_of_file = TRUE;
}
+METHODDEF(void)
+init_mem_source (j_decompress_ptr cinfo)
+{
+ /* no work necessary here */
+}
+
/*
* Fill the input buffer --- called whenever buffer is emptied.
@@ -111,6 +118,26 @@ fill_input_buffer (j_decompress_ptr cinfo)
return TRUE;
}
+METHODDEF(boolean)
+fill_mem_input_buffer (j_decompress_ptr cinfo)
+{
+ static JOCTET mybuffer[4];
+
+ /* The whole JPEG data is expected to reside in the supplied memory
+ * buffer, so any request for more data beyond the given buffer size
+ * is treated as an error.
+ */
+ WARNMS(cinfo, JWRN_JPEG_EOF);
+ /* Insert a fake EOI marker */
+ mybuffer[0] = (JOCTET) 0xFF;
+ mybuffer[1] = (JOCTET) JPEG_EOI;
+
+ cinfo->src->next_input_byte = mybuffer;
+ cinfo->src->bytes_in_buffer = 2;
+
+ return TRUE;
+}
+
/*
* Skip data --- used to skip over a potentially large amount of
@@ -127,22 +154,22 @@ fill_input_buffer (j_decompress_ptr cinfo)
METHODDEF(void)
skip_input_data (j_decompress_ptr cinfo, long num_bytes)
{
- my_src_ptr src = (my_src_ptr) cinfo->src;
+ struct jpeg_source_mgr * src = cinfo->src;
/* Just a dumb implementation for now. Could use fseek() except
* it doesn't work on pipes. Not clear that being smart is worth
* any trouble anyway --- large skips are infrequent.
*/
if (num_bytes > 0) {
- while (num_bytes > (long) src->pub.bytes_in_buffer) {
- num_bytes -= (long) src->pub.bytes_in_buffer;
+ while (num_bytes > (long) src->bytes_in_buffer) {
+ num_bytes -= (long) src->bytes_in_buffer;
(void) fill_input_buffer(cinfo);
/* note we assume that fill_input_buffer will never return FALSE,
* so suspension need not be handled.
*/
}
- src->pub.next_input_byte += (size_t) num_bytes;
- src->pub.bytes_in_buffer -= (size_t) num_bytes;
+ src->next_input_byte += (size_t) num_bytes;
+ src->bytes_in_buffer -= (size_t) num_bytes;
}
}
@@ -210,3 +237,38 @@ jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile)
src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */
src->pub.next_input_byte = NULL; /* until buffer loaded */
}
+
+
+/*
+ * Prepare for input from a supplied memory buffer.
+ * The buffer must contain the whole JPEG data.
+ */
+
+GLOBAL(void)
+jpeg_mem_src (j_decompress_ptr cinfo,
+ unsigned char * inbuffer, unsigned long insize)
+{
+ struct jpeg_source_mgr * src;
+
+ if (inbuffer == NULL || insize == 0) /* Treat empty input as fatal error */
+ ERREXIT(cinfo, JERR_INPUT_EMPTY);
+
+ /* The source object is made permanent so that a series of JPEG images
+ * can be read from the same buffer by calling jpeg_mem_src only before
+ * the first one.
+ */
+ if (cinfo->src == NULL) { /* first time for this JPEG object? */
+ cinfo->src = (struct jpeg_source_mgr *)
+ (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
+ SIZEOF(struct jpeg_source_mgr));
+ }
+
+ src = cinfo->src;
+ src->init_source = init_mem_source;
+ src->fill_input_buffer = fill_mem_input_buffer;
+ src->skip_input_data = skip_input_data;
+ src->resync_to_restart = jpeg_resync_to_restart; /* use default method */
+ src->term_source = term_source;
+ src->bytes_in_buffer = (size_t) insize;
+ src->next_input_byte = (JOCTET *) inbuffer;
+}
diff --git a/src/3rdparty/libjpeg/jdcoefct.c b/src/3rdparty/libjpeg/jdcoefct.c
index 4938d20fcb..462e92c612 100644
--- a/src/3rdparty/libjpeg/jdcoefct.c
+++ b/src/3rdparty/libjpeg/jdcoefct.c
@@ -187,7 +187,7 @@ decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
useful_width = (MCU_col_num < last_MCU_col) ? compptr->MCU_width
: compptr->last_col_width;
output_ptr = output_buf[compptr->component_index] +
- yoffset * compptr->DCT_scaled_size;
+ yoffset * compptr->DCT_v_scaled_size;
start_col = MCU_col_num * compptr->MCU_sample_width;
for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
if (cinfo->input_iMCU_row < last_iMCU_row ||
@@ -197,11 +197,11 @@ decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
(*inverse_DCT) (cinfo, compptr,
(JCOEFPTR) coef->MCU_buffer[blkn+xindex],
output_ptr, output_col);
- output_col += compptr->DCT_scaled_size;
+ output_col += compptr->DCT_h_scaled_size;
}
}
blkn += compptr->MCU_width;
- output_ptr += compptr->DCT_scaled_size;
+ output_ptr += compptr->DCT_v_scaled_size;
}
}
}
@@ -362,9 +362,9 @@ decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
(*inverse_DCT) (cinfo, compptr, (JCOEFPTR) buffer_ptr,
output_ptr, output_col);
buffer_ptr++;
- output_col += compptr->DCT_scaled_size;
+ output_col += compptr->DCT_h_scaled_size;
}
- output_ptr += compptr->DCT_scaled_size;
+ output_ptr += compptr->DCT_v_scaled_size;
}
}
@@ -654,9 +654,9 @@ decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
DC4 = DC5; DC5 = DC6;
DC7 = DC8; DC8 = DC9;
buffer_ptr++, prev_block_row++, next_block_row++;
- output_col += compptr->DCT_scaled_size;
+ output_col += compptr->DCT_h_scaled_size;
}
- output_ptr += compptr->DCT_scaled_size;
+ output_ptr += compptr->DCT_v_scaled_size;
}
}
diff --git a/src/3rdparty/libjpeg/jdct.h b/src/3rdparty/libjpeg/jdct.h
index 04192a266a..360dec80c9 100644
--- a/src/3rdparty/libjpeg/jdct.h
+++ b/src/3rdparty/libjpeg/jdct.h
@@ -14,11 +14,16 @@
/*
- * A forward DCT routine is given a pointer to a work area of type DCTELEM[];
- * the DCT is to be performed in-place in that buffer. Type DCTELEM is int
- * for 8-bit samples, INT32 for 12-bit samples. (NOTE: Floating-point DCT
- * implementations use an array of type FAST_FLOAT, instead.)
- * The DCT inputs are expected to be signed (range +-CENTERJSAMPLE).
+ * A forward DCT routine is given a pointer to an input sample array and
+ * a pointer to a work area of type DCTELEM[]; the DCT is to be performed
+ * in-place in that buffer. Type DCTELEM is int for 8-bit samples, INT32
+ * for 12-bit samples. (NOTE: Floating-point DCT implementations use an
+ * array of type FAST_FLOAT, instead.)
+ * The input data is to be fetched from the sample array starting at a
+ * specified column. (Any row offset needed will be applied to the array
+ * pointer before it is passed to the FDCT code.)
+ * Note that the number of samples fetched by the FDCT routine is
+ * DCT_h_scaled_size * DCT_v_scaled_size.
* The DCT outputs are returned scaled up by a factor of 8; they therefore
* have a range of +-8K for 8-bit data, +-128K for 12-bit data. This
* convention improves accuracy in integer implementations and saves some
@@ -32,8 +37,12 @@ typedef int DCTELEM; /* 16 or 32 bits is fine */
typedef INT32 DCTELEM; /* must have 32 bits */
#endif
-typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data));
-typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data));
+typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data,
+ JSAMPARRAY sample_data,
+ JDIMENSION start_col));
+typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data,
+ JSAMPARRAY sample_data,
+ JDIMENSION start_col));
/*
@@ -44,7 +53,7 @@ typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data));
* sample array starting at a specified column. (Any row offset needed will
* be applied to the array pointer before it is passed to the IDCT code.)
* Note that the number of samples emitted by the IDCT routine is
- * DCT_scaled_size * DCT_scaled_size.
+ * DCT_h_scaled_size * DCT_v_scaled_size.
*/
/* typedef inverse_DCT_method_ptr is declared in jpegint.h */
@@ -84,19 +93,143 @@ typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */
#define jpeg_fdct_islow jFDislow
#define jpeg_fdct_ifast jFDifast
#define jpeg_fdct_float jFDfloat
+#define jpeg_fdct_7x7 jFD7x7
+#define jpeg_fdct_6x6 jFD6x6
+#define jpeg_fdct_5x5 jFD5x5
+#define jpeg_fdct_4x4 jFD4x4
+#define jpeg_fdct_3x3 jFD3x3
+#define jpeg_fdct_2x2 jFD2x2
+#define jpeg_fdct_1x1 jFD1x1
+#define jpeg_fdct_9x9 jFD9x9
+#define jpeg_fdct_10x10 jFD10x10
+#define jpeg_fdct_11x11 jFD11x11
+#define jpeg_fdct_12x12 jFD12x12
+#define jpeg_fdct_13x13 jFD13x13
+#define jpeg_fdct_14x14 jFD14x14
+#define jpeg_fdct_15x15 jFD15x15
+#define jpeg_fdct_16x16 jFD16x16
+#define jpeg_fdct_16x8 jFD16x8
+#define jpeg_fdct_14x7 jFD14x7
+#define jpeg_fdct_12x6 jFD12x6
+#define jpeg_fdct_10x5 jFD10x5
+#define jpeg_fdct_8x4 jFD8x4
+#define jpeg_fdct_6x3 jFD6x3
+#define jpeg_fdct_4x2 jFD4x2
+#define jpeg_fdct_2x1 jFD2x1
+#define jpeg_fdct_8x16 jFD8x16
+#define jpeg_fdct_7x14 jFD7x14
+#define jpeg_fdct_6x12 jFD6x12
+#define jpeg_fdct_5x10 jFD5x10
+#define jpeg_fdct_4x8 jFD4x8
+#define jpeg_fdct_3x6 jFD3x6
+#define jpeg_fdct_2x4 jFD2x4
+#define jpeg_fdct_1x2 jFD1x2
#define jpeg_idct_islow jRDislow
#define jpeg_idct_ifast jRDifast
#define jpeg_idct_float jRDfloat
+#define jpeg_idct_7x7 jRD7x7
+#define jpeg_idct_6x6 jRD6x6
+#define jpeg_idct_5x5 jRD5x5
#define jpeg_idct_4x4 jRD4x4
+#define jpeg_idct_3x3 jRD3x3
#define jpeg_idct_2x2 jRD2x2
#define jpeg_idct_1x1 jRD1x1
+#define jpeg_idct_9x9 jRD9x9
+#define jpeg_idct_10x10 jRD10x10
+#define jpeg_idct_11x11 jRD11x11
+#define jpeg_idct_12x12 jRD12x12
+#define jpeg_idct_13x13 jRD13x13
+#define jpeg_idct_14x14 jRD14x14
+#define jpeg_idct_15x15 jRD15x15
+#define jpeg_idct_16x16 jRD16x16
+#define jpeg_idct_16x8 jRD16x8
+#define jpeg_idct_14x7 jRD14x7
+#define jpeg_idct_12x6 jRD12x6
+#define jpeg_idct_10x5 jRD10x5
+#define jpeg_idct_8x4 jRD8x4
+#define jpeg_idct_6x3 jRD6x3
+#define jpeg_idct_4x2 jRD4x2
+#define jpeg_idct_2x1 jRD2x1
+#define jpeg_idct_8x16 jRD8x16
+#define jpeg_idct_7x14 jRD7x14
+#define jpeg_idct_6x12 jRD6x12
+#define jpeg_idct_5x10 jRD5x10
+#define jpeg_idct_4x8 jRD4x8
+#define jpeg_idct_3x6 jRD3x8
+#define jpeg_idct_2x4 jRD2x4
+#define jpeg_idct_1x2 jRD1x2
#endif /* NEED_SHORT_EXTERNAL_NAMES */
/* Extern declarations for the forward and inverse DCT routines. */
-EXTERN(void) jpeg_fdct_islow JPP((DCTELEM * data));
-EXTERN(void) jpeg_fdct_ifast JPP((DCTELEM * data));
-EXTERN(void) jpeg_fdct_float JPP((FAST_FLOAT * data));
+EXTERN(void) jpeg_fdct_islow
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_ifast
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_float
+ JPP((FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_7x7
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_6x6
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_5x5
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_4x4
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_3x3
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_2x2
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_1x1
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_9x9
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_10x10
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_11x11
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_12x12
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_13x13
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_14x14
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_15x15
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_16x16
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_16x8
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_14x7
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_12x6
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_10x5
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_8x4
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_6x3
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_4x2
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_2x1
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_8x16
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_7x14
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_6x12
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_5x10
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_4x8
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_3x6
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_2x4
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
+EXTERN(void) jpeg_fdct_1x2
+ JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
EXTERN(void) jpeg_idct_islow
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
@@ -107,15 +240,99 @@ EXTERN(void) jpeg_idct_ifast
EXTERN(void) jpeg_idct_float
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_7x7
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_6x6
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_5x5
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_4x4
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_3x3
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_2x2
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
EXTERN(void) jpeg_idct_1x1
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_9x9
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_10x10
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_11x11
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_12x12
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_13x13
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_14x14
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_15x15
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_16x16
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_16x8
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_14x7
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_12x6
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_10x5
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_8x4
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_6x3
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_4x2
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_2x1
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_8x16
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_7x14
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_6x12
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_5x10
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_4x8
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_3x6
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_2x4
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+EXTERN(void) jpeg_idct_1x2
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
/*
diff --git a/src/3rdparty/libjpeg/jddctmgr.c b/src/3rdparty/libjpeg/jddctmgr.c
index bbf8d0e92f..bdbde3454d 100644
--- a/src/3rdparty/libjpeg/jddctmgr.c
+++ b/src/3rdparty/libjpeg/jddctmgr.c
@@ -98,22 +98,134 @@ start_pass (j_decompress_ptr cinfo)
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
/* Select the proper IDCT routine for this component's scaling */
- switch (compptr->DCT_scaled_size) {
+ switch ((compptr->DCT_h_scaled_size << 8) + compptr->DCT_v_scaled_size) {
#ifdef IDCT_SCALING_SUPPORTED
- case 1:
+ case ((1 << 8) + 1):
method_ptr = jpeg_idct_1x1;
- method = JDCT_ISLOW; /* jidctred uses islow-style table */
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
break;
- case 2:
+ case ((2 << 8) + 2):
method_ptr = jpeg_idct_2x2;
- method = JDCT_ISLOW; /* jidctred uses islow-style table */
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
break;
- case 4:
+ case ((3 << 8) + 3):
+ method_ptr = jpeg_idct_3x3;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((4 << 8) + 4):
method_ptr = jpeg_idct_4x4;
- method = JDCT_ISLOW; /* jidctred uses islow-style table */
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((5 << 8) + 5):
+ method_ptr = jpeg_idct_5x5;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((6 << 8) + 6):
+ method_ptr = jpeg_idct_6x6;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((7 << 8) + 7):
+ method_ptr = jpeg_idct_7x7;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((9 << 8) + 9):
+ method_ptr = jpeg_idct_9x9;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((10 << 8) + 10):
+ method_ptr = jpeg_idct_10x10;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((11 << 8) + 11):
+ method_ptr = jpeg_idct_11x11;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((12 << 8) + 12):
+ method_ptr = jpeg_idct_12x12;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((13 << 8) + 13):
+ method_ptr = jpeg_idct_13x13;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((14 << 8) + 14):
+ method_ptr = jpeg_idct_14x14;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((15 << 8) + 15):
+ method_ptr = jpeg_idct_15x15;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((16 << 8) + 16):
+ method_ptr = jpeg_idct_16x16;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((16 << 8) + 8):
+ method_ptr = jpeg_idct_16x8;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((14 << 8) + 7):
+ method_ptr = jpeg_idct_14x7;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((12 << 8) + 6):
+ method_ptr = jpeg_idct_12x6;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((10 << 8) + 5):
+ method_ptr = jpeg_idct_10x5;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((8 << 8) + 4):
+ method_ptr = jpeg_idct_8x4;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((6 << 8) + 3):
+ method_ptr = jpeg_idct_6x3;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((4 << 8) + 2):
+ method_ptr = jpeg_idct_4x2;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((2 << 8) + 1):
+ method_ptr = jpeg_idct_2x1;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((8 << 8) + 16):
+ method_ptr = jpeg_idct_8x16;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((7 << 8) + 14):
+ method_ptr = jpeg_idct_7x14;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((6 << 8) + 12):
+ method_ptr = jpeg_idct_6x12;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((5 << 8) + 10):
+ method_ptr = jpeg_idct_5x10;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((4 << 8) + 8):
+ method_ptr = jpeg_idct_4x8;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((3 << 8) + 6):
+ method_ptr = jpeg_idct_3x6;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((2 << 8) + 4):
+ method_ptr = jpeg_idct_2x4;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
+ break;
+ case ((1 << 8) + 2):
+ method_ptr = jpeg_idct_1x2;
+ method = JDCT_ISLOW; /* jidctint uses islow-style table */
break;
#endif
- case DCTSIZE:
+ case ((DCTSIZE << 8) + DCTSIZE):
switch (cinfo->dct_method) {
#ifdef DCT_ISLOW_SUPPORTED
case JDCT_ISLOW:
@@ -139,7 +251,8 @@ start_pass (j_decompress_ptr cinfo)
}
break;
default:
- ERREXIT1(cinfo, JERR_BAD_DCTSIZE, compptr->DCT_scaled_size);
+ ERREXIT2(cinfo, JERR_BAD_DCTSIZE,
+ compptr->DCT_h_scaled_size, compptr->DCT_v_scaled_size);
break;
}
idct->pub.inverse_DCT[ci] = method_ptr;
diff --git a/src/3rdparty/libjpeg/jdhuff.c b/src/3rdparty/libjpeg/jdhuff.c
index b5ba39f736..06f92fe47f 100644
--- a/src/3rdparty/libjpeg/jdhuff.c
+++ b/src/3rdparty/libjpeg/jdhuff.c
@@ -2,10 +2,12 @@
* jdhuff.c
*
* Copyright (C) 1991-1997, Thomas G. Lane.
+ * Modified 2006-2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
* This file contains Huffman entropy decoding routines.
+ * Both sequential and progressive modes are supported in this single module.
*
* Much of the complexity here has to do with supporting input suspension.
* If the data source module demands suspension, we want to be able to back
@@ -17,7 +19,173 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
-#include "jdhuff.h" /* Declarations shared with jdphuff.c */
+
+
+/* Derived data constructed for each Huffman table */
+
+#define HUFF_LOOKAHEAD 8 /* # of bits of lookahead */
+
+typedef struct {
+ /* Basic tables: (element [0] of each array is unused) */
+ INT32 maxcode[18]; /* largest code of length k (-1 if none) */
+ /* (maxcode[17] is a sentinel to ensure jpeg_huff_decode terminates) */
+ INT32 valoffset[17]; /* huffval[] offset for codes of length k */
+ /* valoffset[k] = huffval[] index of 1st symbol of code length k, less
+ * the smallest code of length k; so given a code of length k, the
+ * corresponding symbol is huffval[code + valoffset[k]]
+ */
+
+ /* Link to public Huffman table (needed only in jpeg_huff_decode) */
+ JHUFF_TBL *pub;
+
+ /* Lookahead tables: indexed by the next HUFF_LOOKAHEAD bits of
+ * the input data stream. If the next Huffman code is no more
+ * than HUFF_LOOKAHEAD bits long, we can obtain its length and
+ * the corresponding symbol directly from these tables.
+ */
+ int look_nbits[1<<HUFF_LOOKAHEAD]; /* # bits, or 0 if too long */
+ UINT8 look_sym[1<<HUFF_LOOKAHEAD]; /* symbol, or unused */
+} d_derived_tbl;
+
+
+/*
+ * Fetching the next N bits from the input stream is a time-critical operation
+ * for the Huffman decoders. We implement it with a combination of inline
+ * macros and out-of-line subroutines. Note that N (the number of bits
+ * demanded at one time) never exceeds 15 for JPEG use.
+ *
+ * We read source bytes into get_buffer and dole out bits as needed.
+ * If get_buffer already contains enough bits, they are fetched in-line
+ * by the macros CHECK_BIT_BUFFER and GET_BITS. When there aren't enough
+ * bits, jpeg_fill_bit_buffer is called; it will attempt to fill get_buffer
+ * as full as possible (not just to the number of bits needed; this
+ * prefetching reduces the overhead cost of calling jpeg_fill_bit_buffer).
+ * Note that jpeg_fill_bit_buffer may return FALSE to indicate suspension.
+ * On TRUE return, jpeg_fill_bit_buffer guarantees that get_buffer contains
+ * at least the requested number of bits --- dummy zeroes are inserted if
+ * necessary.
+ */
+
+typedef INT32 bit_buf_type; /* type of bit-extraction buffer */
+#define BIT_BUF_SIZE 32 /* size of buffer in bits */
+
+/* If long is > 32 bits on your machine, and shifting/masking longs is
+ * reasonably fast, making bit_buf_type be long and setting BIT_BUF_SIZE
+ * appropriately should be a win. Unfortunately we can't define the size
+ * with something like #define BIT_BUF_SIZE (sizeof(bit_buf_type)*8)
+ * because not all machines measure sizeof in 8-bit bytes.
+ */
+
+typedef struct { /* Bitreading state saved across MCUs */
+ bit_buf_type get_buffer; /* current bit-extraction buffer */
+ int bits_left; /* # of unused bits in it */
+} bitread_perm_state;
+
+typedef struct { /* Bitreading working state within an MCU */
+ /* Current data source location */
+ /* We need a copy, rather than munging the original, in case of suspension */
+ const JOCTET * next_input_byte; /* => next byte to read from source */
+ size_t bytes_in_buffer; /* # of bytes remaining in source buffer */
+ /* Bit input buffer --- note these values are kept in register variables,
+ * not in this struct, inside the inner loops.
+ */
+ bit_buf_type get_buffer; /* current bit-extraction buffer */
+ int bits_left; /* # of unused bits in it */
+ /* Pointer needed by jpeg_fill_bit_buffer. */
+ j_decompress_ptr cinfo; /* back link to decompress master record */
+} bitread_working_state;
+
+/* Macros to declare and load/save bitread local variables. */
+#define BITREAD_STATE_VARS \
+ register bit_buf_type get_buffer; \
+ register int bits_left; \
+ bitread_working_state br_state
+
+#define BITREAD_LOAD_STATE(cinfop,permstate) \
+ br_state.cinfo = cinfop; \
+ br_state.next_input_byte = cinfop->src->next_input_byte; \
+ br_state.bytes_in_buffer = cinfop->src->bytes_in_buffer; \
+ get_buffer = permstate.get_buffer; \
+ bits_left = permstate.bits_left;
+
+#define BITREAD_SAVE_STATE(cinfop,permstate) \
+ cinfop->src->next_input_byte = br_state.next_input_byte; \
+ cinfop->src->bytes_in_buffer = br_state.bytes_in_buffer; \
+ permstate.get_buffer = get_buffer; \
+ permstate.bits_left = bits_left
+
+/*
+ * These macros provide the in-line portion of bit fetching.
+ * Use CHECK_BIT_BUFFER to ensure there are N bits in get_buffer
+ * before using GET_BITS, PEEK_BITS, or DROP_BITS.
+ * The variables get_buffer and bits_left are assumed to be locals,
+ * but the state struct might not be (jpeg_huff_decode needs this).
+ * CHECK_BIT_BUFFER(state,n,action);
+ * Ensure there are N bits in get_buffer; if suspend, take action.
+ * val = GET_BITS(n);
+ * Fetch next N bits.
+ * val = PEEK_BITS(n);
+ * Fetch next N bits without removing them from the buffer.
+ * DROP_BITS(n);
+ * Discard next N bits.
+ * The value N should be a simple variable, not an expression, because it
+ * is evaluated multiple times.
+ */
+
+#define CHECK_BIT_BUFFER(state,nbits,action) \
+ { if (bits_left < (nbits)) { \
+ if (! jpeg_fill_bit_buffer(&(state),get_buffer,bits_left,nbits)) \
+ { action; } \
+ get_buffer = (state).get_buffer; bits_left = (state).bits_left; } }
+
+#define GET_BITS(nbits) \
+ (((int) (get_buffer >> (bits_left -= (nbits)))) & BIT_MASK(nbits))
+
+#define PEEK_BITS(nbits) \
+ (((int) (get_buffer >> (bits_left - (nbits)))) & BIT_MASK(nbits))
+
+#define DROP_BITS(nbits) \
+ (bits_left -= (nbits))
+
+
+/*
+ * Code for extracting next Huffman-coded symbol from input bit stream.
+ * Again, this is time-critical and we make the main paths be macros.
+ *
+ * We use a lookahead table to process codes of up to HUFF_LOOKAHEAD bits
+ * without looping. Usually, more than 95% of the Huffman codes will be 8
+ * or fewer bits long. The few overlength codes are handled with a loop,
+ * which need not be inline code.
+ *
+ * Notes about the HUFF_DECODE macro:
+ * 1. Near the end of the data segment, we may fail to get enough bits
+ * for a lookahead. In that case, we do it the hard way.
+ * 2. If the lookahead table contains no entry, the next code must be
+ * more than HUFF_LOOKAHEAD bits long.
+ * 3. jpeg_huff_decode returns -1 if forced to suspend.
+ */
+
+#define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \
+{ register int nb, look; \
+ if (bits_left < HUFF_LOOKAHEAD) { \
+ if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \
+ get_buffer = state.get_buffer; bits_left = state.bits_left; \
+ if (bits_left < HUFF_LOOKAHEAD) { \
+ nb = 1; goto slowlabel; \
+ } \
+ } \
+ look = PEEK_BITS(HUFF_LOOKAHEAD); \
+ if ((nb = htbl->look_nbits[look]) != 0) { \
+ DROP_BITS(nb); \
+ result = htbl->look_sym[look]; \
+ } else { \
+ nb = HUFF_LOOKAHEAD+1; \
+slowlabel: \
+ if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \
+ { failaction; } \
+ get_buffer = state.get_buffer; bits_left = state.bits_left; \
+ } \
+}
/*
@@ -28,7 +196,8 @@
*/
typedef struct {
- int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */
+ unsigned int EOBRUN; /* remaining EOBs in EOBRUN */
+ int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */
} savable_state;
/* This macro is to work around compilers with missing or broken
@@ -41,7 +210,8 @@ typedef struct {
#else
#if MAX_COMPS_IN_SCAN == 4
#define ASSIGN_STATE(dest,src) \
- ((dest).last_dc_val[0] = (src).last_dc_val[0], \
+ ((dest).EOBRUN = (src).EOBRUN, \
+ (dest).last_dc_val[0] = (src).last_dc_val[0], \
(dest).last_dc_val[1] = (src).last_dc_val[1], \
(dest).last_dc_val[2] = (src).last_dc_val[2], \
(dest).last_dc_val[3] = (src).last_dc_val[3])
@@ -59,8 +229,18 @@ typedef struct {
savable_state saved; /* Other state at start of MCU */
/* These fields are NOT loaded into local working state. */
+ boolean insufficient_data; /* set TRUE after emitting warning */
unsigned int restarts_to_go; /* MCUs left in this restart interval */
+ /* Following two fields used only in progressive mode */
+
+ /* Pointers to derived tables (these workspaces have image lifespan) */
+ d_derived_tbl * derived_tbls[NUM_HUFF_TBLS];
+
+ d_derived_tbl * ac_derived_tbl; /* active table during an AC scan */
+
+ /* Following fields used only in sequential mode */
+
/* Pointers to derived tables (these workspaces have image lifespan) */
d_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS];
d_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS];
@@ -71,81 +251,75 @@ typedef struct {
d_derived_tbl * dc_cur_tbls[D_MAX_BLOCKS_IN_MCU];
d_derived_tbl * ac_cur_tbls[D_MAX_BLOCKS_IN_MCU];
/* Whether we care about the DC and AC coefficient values for each block */
- boolean dc_needed[D_MAX_BLOCKS_IN_MCU];
- boolean ac_needed[D_MAX_BLOCKS_IN_MCU];
+ int coef_limit[D_MAX_BLOCKS_IN_MCU];
} huff_entropy_decoder;
typedef huff_entropy_decoder * huff_entropy_ptr;
-/*
- * Initialize for a Huffman-compressed scan.
- */
-
-METHODDEF(void)
-start_pass_huff_decoder (j_decompress_ptr cinfo)
-{
- huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
- int ci, blkn, dctbl, actbl;
- jpeg_component_info * compptr;
-
- /* Check that the scan parameters Ss, Se, Ah/Al are OK for sequential JPEG.
- * This ought to be an error condition, but we make it a warning because
- * there are some baseline files out there with all zeroes in these bytes.
- */
- if (cinfo->Ss != 0 || cinfo->Se != DCTSIZE2-1 ||
- cinfo->Ah != 0 || cinfo->Al != 0)
- WARNMS(cinfo, JWRN_NOT_SEQUENTIAL);
-
- for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
- compptr = cinfo->cur_comp_info[ci];
- dctbl = compptr->dc_tbl_no;
- actbl = compptr->ac_tbl_no;
- /* Compute derived values for Huffman tables */
- /* We may do this more than once for a table, but it's not expensive */
- jpeg_make_d_derived_tbl(cinfo, TRUE, dctbl,
- & entropy->dc_derived_tbls[dctbl]);
- jpeg_make_d_derived_tbl(cinfo, FALSE, actbl,
- & entropy->ac_derived_tbls[actbl]);
- /* Initialize DC predictions to 0 */
- entropy->saved.last_dc_val[ci] = 0;
- }
-
- /* Precalculate decoding info for each block in an MCU of this scan */
- for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
- ci = cinfo->MCU_membership[blkn];
- compptr = cinfo->cur_comp_info[ci];
- /* Precalculate which table to use for each block */
- entropy->dc_cur_tbls[blkn] = entropy->dc_derived_tbls[compptr->dc_tbl_no];
- entropy->ac_cur_tbls[blkn] = entropy->ac_derived_tbls[compptr->ac_tbl_no];
- /* Decide whether we really care about the coefficient values */
- if (compptr->component_needed) {
- entropy->dc_needed[blkn] = TRUE;
- /* we don't need the ACs if producing a 1/8th-size image */
- entropy->ac_needed[blkn] = (compptr->DCT_scaled_size > 1);
- } else {
- entropy->dc_needed[blkn] = entropy->ac_needed[blkn] = FALSE;
- }
- }
-
- /* Initialize bitread state variables */
- entropy->bitstate.bits_left = 0;
- entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */
- entropy->pub.insufficient_data = FALSE;
-
- /* Initialize restart counter */
- entropy->restarts_to_go = cinfo->restart_interval;
-}
+static const int jpeg_zigzag_order[8][8] = {
+ { 0, 1, 5, 6, 14, 15, 27, 28 },
+ { 2, 4, 7, 13, 16, 26, 29, 42 },
+ { 3, 8, 12, 17, 25, 30, 41, 43 },
+ { 9, 11, 18, 24, 31, 40, 44, 53 },
+ { 10, 19, 23, 32, 39, 45, 52, 54 },
+ { 20, 22, 33, 38, 46, 51, 55, 60 },
+ { 21, 34, 37, 47, 50, 56, 59, 61 },
+ { 35, 36, 48, 49, 57, 58, 62, 63 }
+};
+
+static const int jpeg_zigzag_order7[7][7] = {
+ { 0, 1, 5, 6, 14, 15, 27 },
+ { 2, 4, 7, 13, 16, 26, 28 },
+ { 3, 8, 12, 17, 25, 29, 38 },
+ { 9, 11, 18, 24, 30, 37, 39 },
+ { 10, 19, 23, 31, 36, 40, 45 },
+ { 20, 22, 32, 35, 41, 44, 46 },
+ { 21, 33, 34, 42, 43, 47, 48 }
+};
+
+static const int jpeg_zigzag_order6[6][6] = {
+ { 0, 1, 5, 6, 14, 15 },
+ { 2, 4, 7, 13, 16, 25 },
+ { 3, 8, 12, 17, 24, 26 },
+ { 9, 11, 18, 23, 27, 32 },
+ { 10, 19, 22, 28, 31, 33 },
+ { 20, 21, 29, 30, 34, 35 }
+};
+
+static const int jpeg_zigzag_order5[5][5] = {
+ { 0, 1, 5, 6, 14 },
+ { 2, 4, 7, 13, 15 },
+ { 3, 8, 12, 16, 21 },
+ { 9, 11, 17, 20, 22 },
+ { 10, 18, 19, 23, 24 }
+};
+
+static const int jpeg_zigzag_order4[4][4] = {
+ { 0, 1, 5, 6 },
+ { 2, 4, 7, 12 },
+ { 3, 8, 11, 13 },
+ { 9, 10, 14, 15 }
+};
+
+static const int jpeg_zigzag_order3[3][3] = {
+ { 0, 1, 5 },
+ { 2, 4, 6 },
+ { 3, 7, 8 }
+};
+
+static const int jpeg_zigzag_order2[2][2] = {
+ { 0, 1 },
+ { 2, 3 }
+};
/*
* Compute the derived values for a Huffman table.
* This routine also performs some validation checks on the table.
- *
- * Note this is also used by jdphuff.c.
*/
-GLOBAL(void)
+LOCAL(void)
jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno,
d_derived_tbl ** pdtbl)
{
@@ -267,8 +441,7 @@ jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno,
/*
- * Out-of-line code for bit fetching (shared with jdphuff.c).
- * See jdhuff.h for info about usage.
+ * Out-of-line code for bit fetching.
* Note: current values of get_buffer and bits_left are passed as parameters,
* but are returned in the corresponding fields of the state struct.
*
@@ -288,7 +461,7 @@ jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno,
#endif
-GLOBAL(boolean)
+LOCAL(boolean)
jpeg_fill_bit_buffer (bitread_working_state * state,
register bit_buf_type get_buffer, register int bits_left,
int nbits)
@@ -369,9 +542,9 @@ jpeg_fill_bit_buffer (bitread_working_state * state,
* We use a nonvolatile flag to ensure that only one warning message
* appears per data segment.
*/
- if (! cinfo->entropy->insufficient_data) {
+ if (! ((huff_entropy_ptr) cinfo->entropy)->insufficient_data) {
WARNMS(cinfo, JWRN_HIT_MARKER);
- cinfo->entropy->insufficient_data = TRUE;
+ ((huff_entropy_ptr) cinfo->entropy)->insufficient_data = TRUE;
}
/* Fill the buffer with zero bits */
get_buffer <<= MIN_GET_BITS - bits_left;
@@ -390,11 +563,32 @@ jpeg_fill_bit_buffer (bitread_working_state * state,
/*
+ * Figure F.12: extend sign bit.
+ * On some machines, a shift and sub will be faster than a table lookup.
+ */
+
+#ifdef AVOID_TABLES
+
+#define BIT_MASK(nbits) ((1<<(nbits))-1)
+#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) - ((1<<(s))-1) : (x))
+
+#else
+
+#define BIT_MASK(nbits) bmask[nbits]
+#define HUFF_EXTEND(x,s) ((x) <= bmask[(s) - 1] ? (x) - bmask[s] : (x))
+
+static const int bmask[16] = /* bmask[n] is mask for n rightmost bits */
+ { 0, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF,
+ 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF };
+
+#endif /* AVOID_TABLES */
+
+
+/*
* Out-of-line code for Huffman code decoding.
- * See jdhuff.h for info about usage.
*/
-GLOBAL(int)
+LOCAL(int)
jpeg_huff_decode (bitread_working_state * state,
register bit_buf_type get_buffer, register int bits_left,
d_derived_tbl * htbl, int min_bits)
@@ -434,32 +628,6 @@ jpeg_huff_decode (bitread_working_state * state,
/*
- * Figure F.12: extend sign bit.
- * On some machines, a shift and add will be faster than a table lookup.
- */
-
-#ifdef AVOID_TABLES
-
-#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x))
-
-#else
-
-#define HUFF_EXTEND(x,s) ((x) < extend_test[s] ? (x) + extend_offset[s] : (x))
-
-static const int extend_test[16] = /* entry n is 2**(n-1) */
- { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080,
- 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 };
-
-static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
- { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1,
- ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1,
- ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1,
- ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 };
-
-#endif /* AVOID_TABLES */
-
-
-/*
* Check for a restart marker & resynchronize decoder.
* Returns FALSE if must suspend.
*/
@@ -482,6 +650,8 @@ process_restart (j_decompress_ptr cinfo)
/* Re-initialize DC predictions to 0 */
for (ci = 0; ci < cinfo->comps_in_scan; ci++)
entropy->saved.last_dc_val[ci] = 0;
+ /* Re-init EOB run count, too */
+ entropy->saved.EOBRUN = 0;
/* Reset restart counter */
entropy->restarts_to_go = cinfo->restart_interval;
@@ -492,34 +662,47 @@ process_restart (j_decompress_ptr cinfo)
* leaving the flag set.
*/
if (cinfo->unread_marker == 0)
- entropy->pub.insufficient_data = FALSE;
+ entropy->insufficient_data = FALSE;
return TRUE;
}
/*
- * Decode and return one MCU's worth of Huffman-compressed coefficients.
+ * Huffman MCU decoding.
+ * Each of these routines decodes and returns one MCU's worth of
+ * Huffman-compressed coefficients.
* The coefficients are reordered from zigzag order into natural array order,
* but are not dequantized.
*
* The i'th block of the MCU is stored into the block pointed to by
- * MCU_data[i]. WE ASSUME THIS AREA HAS BEEN ZEROED BY THE CALLER.
+ * MCU_data[i]. WE ASSUME THIS AREA IS INITIALLY ZEROED BY THE CALLER.
* (Wholesale zeroing is usually a little faster than retail...)
*
- * Returns FALSE if data source requested suspension. In that case no
+ * We return FALSE if data source requested suspension. In that case no
* changes have been made to permanent state. (Exception: some output
* coefficients may already have been assigned. This is harmless for
- * this module, since we'll just re-assign them on the next call.)
+ * spectral selection, since we'll just re-assign them on the next call.
+ * Successive approximation AC refinement has to be more careful, however.)
+ */
+
+/*
+ * MCU decoding for DC initial scan (either spectral selection,
+ * or first pass of successive approximation).
*/
METHODDEF(boolean)
-decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
-{
+decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
+{
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
- int blkn;
+ int Al = cinfo->Al;
+ register int s, r;
+ int blkn, ci;
+ JBLOCKROW block;
BITREAD_STATE_VARS;
savable_state state;
+ d_derived_tbl * tbl;
+ jpeg_component_info * compptr;
/* Process restart marker if needed; may have to suspend */
if (cinfo->restart_interval) {
@@ -531,7 +714,7 @@ decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
/* If we've run out of data, just leave the MCU set to zeroes.
* This way, we return uniform gray for the remainder of the segment.
*/
- if (! entropy->pub.insufficient_data) {
+ if (! entropy->insufficient_data) {
/* Load up working state */
BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
@@ -540,79 +723,571 @@ decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
/* Outer loop handles each block in the MCU */
for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
- JBLOCKROW block = MCU_data[blkn];
- d_derived_tbl * dctbl = entropy->dc_cur_tbls[blkn];
- d_derived_tbl * actbl = entropy->ac_cur_tbls[blkn];
- register int s, k, r;
+ block = MCU_data[blkn];
+ ci = cinfo->MCU_membership[blkn];
+ compptr = cinfo->cur_comp_info[ci];
+ tbl = entropy->derived_tbls[compptr->dc_tbl_no];
/* Decode a single block's worth of coefficients */
/* Section F.2.2.1: decode the DC coefficient difference */
- HUFF_DECODE(s, br_state, dctbl, return FALSE, label1);
+ HUFF_DECODE(s, br_state, tbl, return FALSE, label1);
if (s) {
CHECK_BIT_BUFFER(br_state, s, return FALSE);
r = GET_BITS(s);
s = HUFF_EXTEND(r, s);
}
- if (entropy->dc_needed[blkn]) {
+ /* Convert DC difference to actual value, update last_dc_val */
+ s += state.last_dc_val[ci];
+ state.last_dc_val[ci] = s;
+ /* Scale and output the coefficient (assumes jpeg_natural_order[0]=0) */
+ (*block)[0] = (JCOEF) (s << Al);
+ }
+
+ /* Completed MCU, so update state */
+ BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
+ ASSIGN_STATE(entropy->saved, state);
+ }
+
+ /* Account for restart interval (no-op if not using restarts) */
+ entropy->restarts_to_go--;
+
+ return TRUE;
+}
+
+
+/*
+ * MCU decoding for AC initial scan (either spectral selection,
+ * or first pass of successive approximation).
+ */
+
+METHODDEF(boolean)
+decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+ register int s, k, r;
+ unsigned int EOBRUN;
+ int Se, Al;
+ const int * natural_order;
+ JBLOCKROW block;
+ BITREAD_STATE_VARS;
+ d_derived_tbl * tbl;
+
+ /* Process restart marker if needed; may have to suspend */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0)
+ if (! process_restart(cinfo))
+ return FALSE;
+ }
+
+ /* If we've run out of data, just leave the MCU set to zeroes.
+ * This way, we return uniform gray for the remainder of the segment.
+ */
+ if (! entropy->insufficient_data) {
+
+ Se = cinfo->Se;
+ Al = cinfo->Al;
+ natural_order = cinfo->natural_order;
+
+ /* Load up working state.
+ * We can avoid loading/saving bitread state if in an EOB run.
+ */
+ EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */
+
+ /* There is always only one block per MCU */
+
+ if (EOBRUN > 0) /* if it's a band of zeroes... */
+ EOBRUN--; /* ...process it now (we do nothing) */
+ else {
+ BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
+ block = MCU_data[0];
+ tbl = entropy->ac_derived_tbl;
+
+ for (k = cinfo->Ss; k <= Se; k++) {
+ HUFF_DECODE(s, br_state, tbl, return FALSE, label2);
+ r = s >> 4;
+ s &= 15;
+ if (s) {
+ k += r;
+ CHECK_BIT_BUFFER(br_state, s, return FALSE);
+ r = GET_BITS(s);
+ s = HUFF_EXTEND(r, s);
+ /* Scale and output coefficient in natural (dezigzagged) order */
+ (*block)[natural_order[k]] = (JCOEF) (s << Al);
+ } else {
+ if (r == 15) { /* ZRL */
+ k += 15; /* skip 15 zeroes in band */
+ } else { /* EOBr, run length is 2^r + appended bits */
+ EOBRUN = 1 << r;
+ if (r) { /* EOBr, r > 0 */
+ CHECK_BIT_BUFFER(br_state, r, return FALSE);
+ r = GET_BITS(r);
+ EOBRUN += r;
+ }
+ EOBRUN--; /* this band is processed at this moment */
+ break; /* force end-of-band */
+ }
+ }
+ }
+
+ BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
+ }
+
+ /* Completed MCU, so update state */
+ entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */
+ }
+
+ /* Account for restart interval (no-op if not using restarts) */
+ entropy->restarts_to_go--;
+
+ return TRUE;
+}
+
+
+/*
+ * MCU decoding for DC successive approximation refinement scan.
+ * Note: we assume such scans can be multi-component, although the spec
+ * is not very clear on the point.
+ */
+
+METHODDEF(boolean)
+decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+ int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */
+ int blkn;
+ JBLOCKROW block;
+ BITREAD_STATE_VARS;
+
+ /* Process restart marker if needed; may have to suspend */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0)
+ if (! process_restart(cinfo))
+ return FALSE;
+ }
+
+ /* Not worth the cycles to check insufficient_data here,
+ * since we will not change the data anyway if we read zeroes.
+ */
+
+ /* Load up working state */
+ BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
+
+ /* Outer loop handles each block in the MCU */
+
+ for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+ block = MCU_data[blkn];
+
+ /* Encoded data is simply the next bit of the two's-complement DC value */
+ CHECK_BIT_BUFFER(br_state, 1, return FALSE);
+ if (GET_BITS(1))
+ (*block)[0] |= p1;
+ /* Note: since we use |=, repeating the assignment later is safe */
+ }
+
+ /* Completed MCU, so update state */
+ BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
+
+ /* Account for restart interval (no-op if not using restarts) */
+ entropy->restarts_to_go--;
+
+ return TRUE;
+}
+
+
+/*
+ * MCU decoding for AC successive approximation refinement scan.
+ */
+
+METHODDEF(boolean)
+decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+ register int s, k, r;
+ unsigned int EOBRUN;
+ int Se, p1, m1;
+ const int * natural_order;
+ JBLOCKROW block;
+ JCOEFPTR thiscoef;
+ BITREAD_STATE_VARS;
+ d_derived_tbl * tbl;
+ int num_newnz;
+ int newnz_pos[DCTSIZE2];
+
+ /* Process restart marker if needed; may have to suspend */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0)
+ if (! process_restart(cinfo))
+ return FALSE;
+ }
+
+ /* If we've run out of data, don't modify the MCU.
+ */
+ if (! entropy->insufficient_data) {
+
+ Se = cinfo->Se;
+ p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */
+ m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */
+ natural_order = cinfo->natural_order;
+
+ /* Load up working state */
+ BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
+ EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */
+
+ /* There is always only one block per MCU */
+ block = MCU_data[0];
+ tbl = entropy->ac_derived_tbl;
+
+ /* If we are forced to suspend, we must undo the assignments to any newly
+ * nonzero coefficients in the block, because otherwise we'd get confused
+ * next time about which coefficients were already nonzero.
+ * But we need not undo addition of bits to already-nonzero coefficients;
+ * instead, we can test the current bit to see if we already did it.
+ */
+ num_newnz = 0;
+
+ /* initialize coefficient loop counter to start of band */
+ k = cinfo->Ss;
+
+ if (EOBRUN == 0) {
+ for (; k <= Se; k++) {
+ HUFF_DECODE(s, br_state, tbl, goto undoit, label3);
+ r = s >> 4;
+ s &= 15;
+ if (s) {
+ if (s != 1) /* size of new coef should always be 1 */
+ WARNMS(cinfo, JWRN_HUFF_BAD_CODE);
+ CHECK_BIT_BUFFER(br_state, 1, goto undoit);
+ if (GET_BITS(1))
+ s = p1; /* newly nonzero coef is positive */
+ else
+ s = m1; /* newly nonzero coef is negative */
+ } else {
+ if (r != 15) {
+ EOBRUN = 1 << r; /* EOBr, run length is 2^r + appended bits */
+ if (r) {
+ CHECK_BIT_BUFFER(br_state, r, goto undoit);
+ r = GET_BITS(r);
+ EOBRUN += r;
+ }
+ break; /* rest of block is handled by EOB logic */
+ }
+ /* note s = 0 for processing ZRL */
+ }
+ /* Advance over already-nonzero coefs and r still-zero coefs,
+ * appending correction bits to the nonzeroes. A correction bit is 1
+ * if the absolute value of the coefficient must be increased.
+ */
+ do {
+ thiscoef = *block + natural_order[k];
+ if (*thiscoef != 0) {
+ CHECK_BIT_BUFFER(br_state, 1, goto undoit);
+ if (GET_BITS(1)) {
+ if ((*thiscoef & p1) == 0) { /* do nothing if already set it */
+ if (*thiscoef >= 0)
+ *thiscoef += p1;
+ else
+ *thiscoef += m1;
+ }
+ }
+ } else {
+ if (--r < 0)
+ break; /* reached target zero coefficient */
+ }
+ k++;
+ } while (k <= Se);
+ if (s) {
+ int pos = natural_order[k];
+ /* Output newly nonzero coefficient */
+ (*block)[pos] = (JCOEF) s;
+ /* Remember its position in case we have to suspend */
+ newnz_pos[num_newnz++] = pos;
+ }
+ }
+ }
+
+ if (EOBRUN > 0) {
+ /* Scan any remaining coefficient positions after the end-of-band
+ * (the last newly nonzero coefficient, if any). Append a correction
+ * bit to each already-nonzero coefficient. A correction bit is 1
+ * if the absolute value of the coefficient must be increased.
+ */
+ for (; k <= Se; k++) {
+ thiscoef = *block + natural_order[k];
+ if (*thiscoef != 0) {
+ CHECK_BIT_BUFFER(br_state, 1, goto undoit);
+ if (GET_BITS(1)) {
+ if ((*thiscoef & p1) == 0) { /* do nothing if already changed it */
+ if (*thiscoef >= 0)
+ *thiscoef += p1;
+ else
+ *thiscoef += m1;
+ }
+ }
+ }
+ }
+ /* Count one block completed in EOB run */
+ EOBRUN--;
+ }
+
+ /* Completed MCU, so update state */
+ BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
+ entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */
+ }
+
+ /* Account for restart interval (no-op if not using restarts) */
+ entropy->restarts_to_go--;
+
+ return TRUE;
+
+undoit:
+ /* Re-zero any output coefficients that we made newly nonzero */
+ while (num_newnz > 0)
+ (*block)[newnz_pos[--num_newnz]] = 0;
+
+ return FALSE;
+}
+
+
+/*
+ * Decode one MCU's worth of Huffman-compressed coefficients,
+ * partial blocks.
+ */
+
+METHODDEF(boolean)
+decode_mcu_sub (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+ const int * natural_order;
+ int Se, blkn;
+ BITREAD_STATE_VARS;
+ savable_state state;
+
+ /* Process restart marker if needed; may have to suspend */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0)
+ if (! process_restart(cinfo))
+ return FALSE;
+ }
+
+ /* If we've run out of data, just leave the MCU set to zeroes.
+ * This way, we return uniform gray for the remainder of the segment.
+ */
+ if (! entropy->insufficient_data) {
+
+ natural_order = cinfo->natural_order;
+ Se = cinfo->lim_Se;
+
+ /* Load up working state */
+ BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
+ ASSIGN_STATE(state, entropy->saved);
+
+ /* Outer loop handles each block in the MCU */
+
+ for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+ JBLOCKROW block = MCU_data[blkn];
+ d_derived_tbl * htbl;
+ register int s, k, r;
+ int coef_limit, ci;
+
+ /* Decode a single block's worth of coefficients */
+
+ /* Section F.2.2.1: decode the DC coefficient difference */
+ htbl = entropy->dc_cur_tbls[blkn];
+ HUFF_DECODE(s, br_state, htbl, return FALSE, label1);
+
+ htbl = entropy->ac_cur_tbls[blkn];
+ k = 1;
+ coef_limit = entropy->coef_limit[blkn];
+ if (coef_limit) {
/* Convert DC difference to actual value, update last_dc_val */
- int ci = cinfo->MCU_membership[blkn];
+ if (s) {
+ CHECK_BIT_BUFFER(br_state, s, return FALSE);
+ r = GET_BITS(s);
+ s = HUFF_EXTEND(r, s);
+ }
+ ci = cinfo->MCU_membership[blkn];
s += state.last_dc_val[ci];
state.last_dc_val[ci] = s;
- /* Output the DC coefficient (assumes jpeg_natural_order[0] = 0) */
+ /* Output the DC coefficient */
(*block)[0] = (JCOEF) s;
- }
-
- if (entropy->ac_needed[blkn]) {
/* Section F.2.2.2: decode the AC coefficients */
/* Since zeroes are skipped, output area must be cleared beforehand */
- for (k = 1; k < DCTSIZE2; k++) {
- HUFF_DECODE(s, br_state, actbl, return FALSE, label2);
-
+ for (; k < coef_limit; k++) {
+ HUFF_DECODE(s, br_state, htbl, return FALSE, label2);
+
r = s >> 4;
s &= 15;
-
+
if (s) {
k += r;
CHECK_BIT_BUFFER(br_state, s, return FALSE);
r = GET_BITS(s);
s = HUFF_EXTEND(r, s);
/* Output coefficient in natural (dezigzagged) order.
- * Note: the extra entries in jpeg_natural_order[] will save us
- * if k >= DCTSIZE2, which could happen if the data is corrupted.
+ * Note: the extra entries in natural_order[] will save us
+ * if k > Se, which could happen if the data is corrupted.
*/
- (*block)[jpeg_natural_order[k]] = (JCOEF) s;
+ (*block)[natural_order[k]] = (JCOEF) s;
} else {
if (r != 15)
- break;
+ goto EndOfBlock;
k += 15;
}
}
-
} else {
+ if (s) {
+ CHECK_BIT_BUFFER(br_state, s, return FALSE);
+ DROP_BITS(s);
+ }
+ }
+
+ /* Section F.2.2.2: decode the AC coefficients */
+ /* In this path we just discard the values */
+ for (; k <= Se; k++) {
+ HUFF_DECODE(s, br_state, htbl, return FALSE, label3);
+
+ r = s >> 4;
+ s &= 15;
+
+ if (s) {
+ k += r;
+ CHECK_BIT_BUFFER(br_state, s, return FALSE);
+ DROP_BITS(s);
+ } else {
+ if (r != 15)
+ break;
+ k += 15;
+ }
+ }
+
+ EndOfBlock: ;
+ }
+
+ /* Completed MCU, so update state */
+ BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
+ ASSIGN_STATE(entropy->saved, state);
+ }
+
+ /* Account for restart interval (no-op if not using restarts) */
+ entropy->restarts_to_go--;
+
+ return TRUE;
+}
+
+
+/*
+ * Decode one MCU's worth of Huffman-compressed coefficients,
+ * full-size blocks.
+ */
+
+METHODDEF(boolean)
+decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
+{
+ huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+ int blkn;
+ BITREAD_STATE_VARS;
+ savable_state state;
+
+ /* Process restart marker if needed; may have to suspend */
+ if (cinfo->restart_interval) {
+ if (entropy->restarts_to_go == 0)
+ if (! process_restart(cinfo))
+ return FALSE;
+ }
+
+ /* If we've run out of data, just leave the MCU set to zeroes.
+ * This way, we return uniform gray for the remainder of the segment.
+ */
+ if (! entropy->insufficient_data) {
+
+ /* Load up working state */
+ BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
+ ASSIGN_STATE(state, entropy->saved);
+
+ /* Outer loop handles each block in the MCU */
+
+ for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+ JBLOCKROW block = MCU_data[blkn];
+ d_derived_tbl * htbl;
+ register int s, k, r;
+ int coef_limit, ci;
+
+ /* Decode a single block's worth of coefficients */
+
+ /* Section F.2.2.1: decode the DC coefficient difference */
+ htbl = entropy->dc_cur_tbls[blkn];
+ HUFF_DECODE(s, br_state, htbl, return FALSE, label1);
+
+ htbl = entropy->ac_cur_tbls[blkn];
+ k = 1;
+ coef_limit = entropy->coef_limit[blkn];
+ if (coef_limit) {
+ /* Convert DC difference to actual value, update last_dc_val */
+ if (s) {
+ CHECK_BIT_BUFFER(br_state, s, return FALSE);
+ r = GET_BITS(s);
+ s = HUFF_EXTEND(r, s);
+ }
+ ci = cinfo->MCU_membership[blkn];
+ s += state.last_dc_val[ci];
+ state.last_dc_val[ci] = s;
+ /* Output the DC coefficient */
+ (*block)[0] = (JCOEF) s;
/* Section F.2.2.2: decode the AC coefficients */
- /* In this path we just discard the values */
- for (k = 1; k < DCTSIZE2; k++) {
- HUFF_DECODE(s, br_state, actbl, return FALSE, label3);
-
+ /* Since zeroes are skipped, output area must be cleared beforehand */
+ for (; k < coef_limit; k++) {
+ HUFF_DECODE(s, br_state, htbl, return FALSE, label2);
+
r = s >> 4;
s &= 15;
-
+
if (s) {
k += r;
CHECK_BIT_BUFFER(br_state, s, return FALSE);
- DROP_BITS(s);
+ r = GET_BITS(s);
+ s = HUFF_EXTEND(r, s);
+ /* Output coefficient in natural (dezigzagged) order.
+ * Note: the extra entries in jpeg_natural_order[] will save us
+ * if k >= DCTSIZE2, which could happen if the data is corrupted.
+ */
+ (*block)[jpeg_natural_order[k]] = (JCOEF) s;
} else {
if (r != 15)
- break;
+ goto EndOfBlock;
k += 15;
}
}
+ } else {
+ if (s) {
+ CHECK_BIT_BUFFER(br_state, s, return FALSE);
+ DROP_BITS(s);
+ }
+ }
+
+ /* Section F.2.2.2: decode the AC coefficients */
+ /* In this path we just discard the values */
+ for (; k < DCTSIZE2; k++) {
+ HUFF_DECODE(s, br_state, htbl, return FALSE, label3);
+ r = s >> 4;
+ s &= 15;
+
+ if (s) {
+ k += r;
+ CHECK_BIT_BUFFER(br_state, s, return FALSE);
+ DROP_BITS(s);
+ } else {
+ if (r != 15)
+ break;
+ k += 15;
+ }
}
+
+ EndOfBlock: ;
}
/* Completed MCU, so update state */
@@ -628,6 +1303,205 @@ decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
/*
+ * Initialize for a Huffman-compressed scan.
+ */
+
+METHODDEF(void)
+start_pass_huff_decoder (j_decompress_ptr cinfo)
+{
+ huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
+ int ci, blkn, tbl, i;
+ jpeg_component_info * compptr;
+
+ if (cinfo->progressive_mode) {
+ /* Validate progressive scan parameters */
+ if (cinfo->Ss == 0) {
+ if (cinfo->Se != 0)
+ goto bad;
+ } else {
+ /* need not check Ss/Se < 0 since they came from unsigned bytes */
+ if (cinfo->Se < cinfo->Ss || cinfo->Se > cinfo->lim_Se)
+ goto bad;
+ /* AC scans may have only one component */
+ if (cinfo->comps_in_scan != 1)
+ goto bad;
+ }
+ if (cinfo->Ah != 0) {
+ /* Successive approximation refinement scan: must have Al = Ah-1. */
+ if (cinfo->Ah-1 != cinfo->Al)
+ goto bad;
+ }
+ if (cinfo->Al > 13) { /* need not check for < 0 */
+ /* Arguably the maximum Al value should be less than 13 for 8-bit precision,
+ * but the spec doesn't say so, and we try to be liberal about what we
+ * accept. Note: large Al values could result in out-of-range DC
+ * coefficients during early scans, leading to bizarre displays due to
+ * overflows in the IDCT math. But we won't crash.
+ */
+ bad:
+ ERREXIT4(cinfo, JERR_BAD_PROGRESSION,
+ cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al);
+ }
+ /* Update progression status, and verify that scan order is legal.
+ * Note that inter-scan inconsistencies are treated as warnings
+ * not fatal errors ... not clear if this is right way to behave.
+ */
+ for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+ int coefi, cindex = cinfo->cur_comp_info[ci]->component_index;
+ int *coef_bit_ptr = & cinfo->coef_bits[cindex][0];
+ if (cinfo->Ss && coef_bit_ptr[0] < 0) /* AC without prior DC scan */
+ WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, 0);
+ for (coefi = cinfo->Ss; coefi <= cinfo->Se; coefi++) {
+ int expected = (coef_bit_ptr[coefi] < 0) ? 0 : coef_bit_ptr[coefi];
+ if (cinfo->Ah != expected)
+ WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, coefi);
+ coef_bit_ptr[coefi] = cinfo->Al;
+ }
+ }
+
+ /* Select MCU decoding routine */
+ if (cinfo->Ah == 0) {
+ if (cinfo->Ss == 0)
+ entropy->pub.decode_mcu = decode_mcu_DC_first;
+ else
+ entropy->pub.decode_mcu = decode_mcu_AC_first;
+ } else {
+ if (cinfo->Ss == 0)
+ entropy->pub.decode_mcu = decode_mcu_DC_refine;
+ else
+ entropy->pub.decode_mcu = decode_mcu_AC_refine;
+ }
+
+ for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+ compptr = cinfo->cur_comp_info[ci];
+ /* Make sure requested tables are present, and compute derived tables.
+ * We may build same derived table more than once, but it's not expensive.
+ */
+ if (cinfo->Ss == 0) {
+ if (cinfo->Ah == 0) { /* DC refinement needs no table */
+ tbl = compptr->dc_tbl_no;
+ jpeg_make_d_derived_tbl(cinfo, TRUE, tbl,
+ & entropy->derived_tbls[tbl]);
+ }
+ } else {
+ tbl = compptr->ac_tbl_no;
+ jpeg_make_d_derived_tbl(cinfo, FALSE, tbl,
+ & entropy->derived_tbls[tbl]);
+ /* remember the single active table */
+ entropy->ac_derived_tbl = entropy->derived_tbls[tbl];
+ }
+ /* Initialize DC predictions to 0 */
+ entropy->saved.last_dc_val[ci] = 0;
+ }
+
+ /* Initialize private state variables */
+ entropy->saved.EOBRUN = 0;
+ } else {
+ /* Check that the scan parameters Ss, Se, Ah/Al are OK for sequential JPEG.
+ * This ought to be an error condition, but we make it a warning because
+ * there are some baseline files out there with all zeroes in these bytes.
+ */
+ if (cinfo->Ss != 0 || cinfo->Ah != 0 || cinfo->Al != 0 ||
+ ((cinfo->is_baseline || cinfo->Se < DCTSIZE2) &&
+ cinfo->Se != cinfo->lim_Se))
+ WARNMS(cinfo, JWRN_NOT_SEQUENTIAL);
+
+ /* Select MCU decoding routine */
+ /* We retain the hard-coded case for full-size blocks.
+ * This is not necessary, but it appears that this version is slightly
+ * more performant in the given implementation.
+ * With an improved implementation we would prefer a single optimized
+ * function.
+ */
+ if (cinfo->lim_Se != DCTSIZE2-1)
+ entropy->pub.decode_mcu = decode_mcu_sub;
+ else
+ entropy->pub.decode_mcu = decode_mcu;
+
+ for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+ compptr = cinfo->cur_comp_info[ci];
+ /* Compute derived values for Huffman tables */
+ /* We may do this more than once for a table, but it's not expensive */
+ tbl = compptr->dc_tbl_no;
+ jpeg_make_d_derived_tbl(cinfo, TRUE, tbl,
+ & entropy->dc_derived_tbls[tbl]);
+ if (cinfo->lim_Se) { /* AC needs no table when not present */
+ tbl = compptr->ac_tbl_no;
+ jpeg_make_d_derived_tbl(cinfo, FALSE, tbl,
+ & entropy->ac_derived_tbls[tbl]);
+ }
+ /* Initialize DC predictions to 0 */
+ entropy->saved.last_dc_val[ci] = 0;
+ }
+
+ /* Precalculate decoding info for each block in an MCU of this scan */
+ for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
+ ci = cinfo->MCU_membership[blkn];
+ compptr = cinfo->cur_comp_info[ci];
+ /* Precalculate which table to use for each block */
+ entropy->dc_cur_tbls[blkn] = entropy->dc_derived_tbls[compptr->dc_tbl_no];
+ entropy->ac_cur_tbls[blkn] = entropy->ac_derived_tbls[compptr->ac_tbl_no];
+ /* Decide whether we really care about the coefficient values */
+ if (compptr->component_needed) {
+ ci = compptr->DCT_v_scaled_size;
+ i = compptr->DCT_h_scaled_size;
+ switch (cinfo->lim_Se) {
+ case (1*1-1):
+ entropy->coef_limit[blkn] = 1;
+ break;
+ case (2*2-1):
+ if (ci <= 0 || ci > 2) ci = 2;
+ if (i <= 0 || i > 2) i = 2;
+ entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order2[ci - 1][i - 1];
+ break;
+ case (3*3-1):
+ if (ci <= 0 || ci > 3) ci = 3;
+ if (i <= 0 || i > 3) i = 3;
+ entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order3[ci - 1][i - 1];
+ break;
+ case (4*4-1):
+ if (ci <= 0 || ci > 4) ci = 4;
+ if (i <= 0 || i > 4) i = 4;
+ entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order4[ci - 1][i - 1];
+ break;
+ case (5*5-1):
+ if (ci <= 0 || ci > 5) ci = 5;
+ if (i <= 0 || i > 5) i = 5;
+ entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order5[ci - 1][i - 1];
+ break;
+ case (6*6-1):
+ if (ci <= 0 || ci > 6) ci = 6;
+ if (i <= 0 || i > 6) i = 6;
+ entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order6[ci - 1][i - 1];
+ break;
+ case (7*7-1):
+ if (ci <= 0 || ci > 7) ci = 7;
+ if (i <= 0 || i > 7) i = 7;
+ entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order7[ci - 1][i - 1];
+ break;
+ default:
+ if (ci <= 0 || ci > 8) ci = 8;
+ if (i <= 0 || i > 8) i = 8;
+ entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order[ci - 1][i - 1];
+ break;
+ }
+ } else {
+ entropy->coef_limit[blkn] = 0;
+ }
+ }
+ }
+
+ /* Initialize bitread state variables */
+ entropy->bitstate.bits_left = 0;
+ entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */
+ entropy->insufficient_data = FALSE;
+
+ /* Initialize restart counter */
+ entropy->restarts_to_go = cinfo->restart_interval;
+}
+
+
+/*
* Module initialization routine for Huffman entropy decoding.
*/
@@ -642,10 +1516,26 @@ jinit_huff_decoder (j_decompress_ptr cinfo)
SIZEOF(huff_entropy_decoder));
cinfo->entropy = (struct jpeg_entropy_decoder *) entropy;
entropy->pub.start_pass = start_pass_huff_decoder;
- entropy->pub.decode_mcu = decode_mcu;
- /* Mark tables unallocated */
- for (i = 0; i < NUM_HUFF_TBLS; i++) {
- entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;
+ if (cinfo->progressive_mode) {
+ /* Create progression status table */
+ int *coef_bit_ptr, ci;
+ cinfo->coef_bits = (int (*)[DCTSIZE2])
+ (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+ cinfo->num_components*DCTSIZE2*SIZEOF(int));
+ coef_bit_ptr = & cinfo->coef_bits[0][0];
+ for (ci = 0; ci < cinfo->num_components; ci++)
+ for (i = 0; i < DCTSIZE2; i++)
+ *coef_bit_ptr++ = -1;
+
+ /* Mark derived tables unallocated */
+ for (i = 0; i < NUM_HUFF_TBLS; i++) {
+ entropy->derived_tbls[i] = NULL;
+ }
+ } else {
+ /* Mark tables unallocated */
+ for (i = 0; i < NUM_HUFF_TBLS; i++) {
+ entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;
+ }
}
}
diff --git a/src/3rdparty/libjpeg/jdhuff.h b/src/3rdparty/libjpeg/jdhuff.h
deleted file mode 100644
index ae19b6cafd..0000000000
--- a/src/3rdparty/libjpeg/jdhuff.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * jdhuff.h
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains declarations for Huffman entropy decoding routines
- * that are shared between the sequential decoder (jdhuff.c) and the
- * progressive decoder (jdphuff.c). No other modules need to see these.
- */
-
-/* Short forms of external names for systems with brain-damaged linkers. */
-
-#ifdef NEED_SHORT_EXTERNAL_NAMES
-#define jpeg_make_d_derived_tbl jMkDDerived
-#define jpeg_fill_bit_buffer jFilBitBuf
-#define jpeg_huff_decode jHufDecode
-#endif /* NEED_SHORT_EXTERNAL_NAMES */
-
-
-/* Derived data constructed for each Huffman table */
-
-#define HUFF_LOOKAHEAD 8 /* # of bits of lookahead */
-
-typedef struct {
- /* Basic tables: (element [0] of each array is unused) */
- INT32 maxcode[18]; /* largest code of length k (-1 if none) */
- /* (maxcode[17] is a sentinel to ensure jpeg_huff_decode terminates) */
- INT32 valoffset[17]; /* huffval[] offset for codes of length k */
- /* valoffset[k] = huffval[] index of 1st symbol of code length k, less
- * the smallest code of length k; so given a code of length k, the
- * corresponding symbol is huffval[code + valoffset[k]]
- */
-
- /* Link to public Huffman table (needed only in jpeg_huff_decode) */
- JHUFF_TBL *pub;
-
- /* Lookahead tables: indexed by the next HUFF_LOOKAHEAD bits of
- * the input data stream. If the next Huffman code is no more
- * than HUFF_LOOKAHEAD bits long, we can obtain its length and
- * the corresponding symbol directly from these tables.
- */
- int look_nbits[1<<HUFF_LOOKAHEAD]; /* # bits, or 0 if too long */
- UINT8 look_sym[1<<HUFF_LOOKAHEAD]; /* symbol, or unused */
-} d_derived_tbl;
-
-/* Expand a Huffman table definition into the derived format */
-EXTERN(void) jpeg_make_d_derived_tbl
- JPP((j_decompress_ptr cinfo, boolean isDC, int tblno,
- d_derived_tbl ** pdtbl));
-
-
-/*
- * Fetching the next N bits from the input stream is a time-critical operation
- * for the Huffman decoders. We implement it with a combination of inline
- * macros and out-of-line subroutines. Note that N (the number of bits
- * demanded at one time) never exceeds 15 for JPEG use.
- *
- * We read source bytes into get_buffer and dole out bits as needed.
- * If get_buffer already contains enough bits, they are fetched in-line
- * by the macros CHECK_BIT_BUFFER and GET_BITS. When there aren't enough
- * bits, jpeg_fill_bit_buffer is called; it will attempt to fill get_buffer
- * as full as possible (not just to the number of bits needed; this
- * prefetching reduces the overhead cost of calling jpeg_fill_bit_buffer).
- * Note that jpeg_fill_bit_buffer may return FALSE to indicate suspension.
- * On TRUE return, jpeg_fill_bit_buffer guarantees that get_buffer contains
- * at least the requested number of bits --- dummy zeroes are inserted if
- * necessary.
- */
-
-typedef INT32 bit_buf_type; /* type of bit-extraction buffer */
-#define BIT_BUF_SIZE 32 /* size of buffer in bits */
-
-/* If long is > 32 bits on your machine, and shifting/masking longs is
- * reasonably fast, making bit_buf_type be long and setting BIT_BUF_SIZE
- * appropriately should be a win. Unfortunately we can't define the size
- * with something like #define BIT_BUF_SIZE (sizeof(bit_buf_type)*8)
- * because not all machines measure sizeof in 8-bit bytes.
- */
-
-typedef struct { /* Bitreading state saved across MCUs */
- bit_buf_type get_buffer; /* current bit-extraction buffer */
- int bits_left; /* # of unused bits in it */
-} bitread_perm_state;
-
-typedef struct { /* Bitreading working state within an MCU */
- /* Current data source location */
- /* We need a copy, rather than munging the original, in case of suspension */
- const JOCTET * next_input_byte; /* => next byte to read from source */
- size_t bytes_in_buffer; /* # of bytes remaining in source buffer */
- /* Bit input buffer --- note these values are kept in register variables,
- * not in this struct, inside the inner loops.
- */
- bit_buf_type get_buffer; /* current bit-extraction buffer */
- int bits_left; /* # of unused bits in it */
- /* Pointer needed by jpeg_fill_bit_buffer. */
- j_decompress_ptr cinfo; /* back link to decompress master record */
-} bitread_working_state;
-
-/* Macros to declare and load/save bitread local variables. */
-#define BITREAD_STATE_VARS \
- register bit_buf_type get_buffer; \
- register int bits_left; \
- bitread_working_state br_state
-
-#define BITREAD_LOAD_STATE(cinfop,permstate) \
- br_state.cinfo = cinfop; \
- br_state.next_input_byte = cinfop->src->next_input_byte; \
- br_state.bytes_in_buffer = cinfop->src->bytes_in_buffer; \
- get_buffer = permstate.get_buffer; \
- bits_left = permstate.bits_left;
-
-#define BITREAD_SAVE_STATE(cinfop,permstate) \
- cinfop->src->next_input_byte = br_state.next_input_byte; \
- cinfop->src->bytes_in_buffer = br_state.bytes_in_buffer; \
- permstate.get_buffer = get_buffer; \
- permstate.bits_left = bits_left
-
-/*
- * These macros provide the in-line portion of bit fetching.
- * Use CHECK_BIT_BUFFER to ensure there are N bits in get_buffer
- * before using GET_BITS, PEEK_BITS, or DROP_BITS.
- * The variables get_buffer and bits_left are assumed to be locals,
- * but the state struct might not be (jpeg_huff_decode needs this).
- * CHECK_BIT_BUFFER(state,n,action);
- * Ensure there are N bits in get_buffer; if suspend, take action.
- * val = GET_BITS(n);
- * Fetch next N bits.
- * val = PEEK_BITS(n);
- * Fetch next N bits without removing them from the buffer.
- * DROP_BITS(n);
- * Discard next N bits.
- * The value N should be a simple variable, not an expression, because it
- * is evaluated multiple times.
- */
-
-#define CHECK_BIT_BUFFER(state,nbits,action) \
- { if (bits_left < (nbits)) { \
- if (! jpeg_fill_bit_buffer(&(state),get_buffer,bits_left,nbits)) \
- { action; } \
- get_buffer = (state).get_buffer; bits_left = (state).bits_left; } }
-
-#define GET_BITS(nbits) \
- (((int) (get_buffer >> (bits_left -= (nbits)))) & ((1<<(nbits))-1))
-
-#define PEEK_BITS(nbits) \
- (((int) (get_buffer >> (bits_left - (nbits)))) & ((1<<(nbits))-1))
-
-#define DROP_BITS(nbits) \
- (bits_left -= (nbits))
-
-/* Load up the bit buffer to a depth of at least nbits */
-EXTERN(boolean) jpeg_fill_bit_buffer
- JPP((bitread_working_state * state, register bit_buf_type get_buffer,
- register int bits_left, int nbits));
-
-
-/*
- * Code for extracting next Huffman-coded symbol from input bit stream.
- * Again, this is time-critical and we make the main paths be macros.
- *
- * We use a lookahead table to process codes of up to HUFF_LOOKAHEAD bits
- * without looping. Usually, more than 95% of the Huffman codes will be 8
- * or fewer bits long. The few overlength codes are handled with a loop,
- * which need not be inline code.
- *
- * Notes about the HUFF_DECODE macro:
- * 1. Near the end of the data segment, we may fail to get enough bits
- * for a lookahead. In that case, we do it the hard way.
- * 2. If the lookahead table contains no entry, the next code must be
- * more than HUFF_LOOKAHEAD bits long.
- * 3. jpeg_huff_decode returns -1 if forced to suspend.
- */
-
-#define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \
-{ register int nb, look; \
- if (bits_left < HUFF_LOOKAHEAD) { \
- if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \
- get_buffer = state.get_buffer; bits_left = state.bits_left; \
- if (bits_left < HUFF_LOOKAHEAD) { \
- nb = 1; goto slowlabel; \
- } \
- } \
- look = PEEK_BITS(HUFF_LOOKAHEAD); \
- if ((nb = htbl->look_nbits[look]) != 0) { \
- DROP_BITS(nb); \
- result = htbl->look_sym[look]; \
- } else { \
- nb = HUFF_LOOKAHEAD+1; \
-slowlabel: \
- if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \
- { failaction; } \
- get_buffer = state.get_buffer; bits_left = state.bits_left; \
- } \
-}
-
-/* Out-of-line case for Huffman code fetching */
-EXTERN(int) jpeg_huff_decode
- JPP((bitread_working_state * state, register bit_buf_type get_buffer,
- register int bits_left, d_derived_tbl * htbl, int min_bits));
diff --git a/src/3rdparty/libjpeg/jdinput.c b/src/3rdparty/libjpeg/jdinput.c
index 0c2ac8f120..2c5c717b9c 100644
--- a/src/3rdparty/libjpeg/jdinput.c
+++ b/src/3rdparty/libjpeg/jdinput.c
@@ -2,13 +2,14 @@
* jdinput.c
*
* Copyright (C) 1991-1997, Thomas G. Lane.
+ * Modified 2002-2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
* This file contains input control logic for the JPEG decompressor.
* These routines are concerned with controlling the decompressor's input
* processing (marker reading and coefficient decoding). The actual input
- * reading is done in jdmarker.c, jdhuff.c, and jdphuff.c.
+ * reading is done in jdmarker.c, jdhuff.c, and jdarith.c.
*/
#define JPEG_INTERNALS
@@ -21,7 +22,7 @@
typedef struct {
struct jpeg_input_controller pub; /* public fields */
- boolean inheaders; /* TRUE until first SOS is reached */
+ int inheaders; /* Nonzero until first SOS is reached */
} my_input_controller;
typedef my_input_controller * my_inputctl_ptr;
@@ -35,6 +36,174 @@ METHODDEF(int) consume_markers JPP((j_decompress_ptr cinfo));
* Routines to calculate various quantities related to the size of the image.
*/
+
+/*
+ * Compute output image dimensions and related values.
+ * NOTE: this is exported for possible use by application.
+ * Hence it mustn't do anything that can't be done twice.
+ */
+
+GLOBAL(void)
+jpeg_core_output_dimensions (j_decompress_ptr cinfo)
+/* Do computations that are needed before master selection phase.
+ * This function is used for transcoding and full decompression.
+ */
+{
+#ifdef IDCT_SCALING_SUPPORTED
+ int ci;
+ jpeg_component_info *compptr;
+
+ /* Compute actual output image dimensions and DCT scaling choices. */
+ if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom) {
+ /* Provide 1/block_size scaling */
+ cinfo->output_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width, (long) cinfo->block_size);
+ cinfo->output_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height, (long) cinfo->block_size);
+ cinfo->min_DCT_h_scaled_size = 1;
+ cinfo->min_DCT_v_scaled_size = 1;
+ } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 2) {
+ /* Provide 2/block_size scaling */
+ cinfo->output_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 2L, (long) cinfo->block_size);
+ cinfo->output_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 2L, (long) cinfo->block_size);
+ cinfo->min_DCT_h_scaled_size = 2;
+ cinfo->min_DCT_v_scaled_size = 2;
+ } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 3) {
+ /* Provide 3/block_size scaling */
+ cinfo->output_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 3L, (long) cinfo->block_size);
+ cinfo->output_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 3L, (long) cinfo->block_size);
+ cinfo->min_DCT_h_scaled_size = 3;
+ cinfo->min_DCT_v_scaled_size = 3;
+ } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 4) {
+ /* Provide 4/block_size scaling */
+ cinfo->output_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 4L, (long) cinfo->block_size);
+ cinfo->output_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 4L, (long) cinfo->block_size);
+ cinfo->min_DCT_h_scaled_size = 4;
+ cinfo->min_DCT_v_scaled_size = 4;
+ } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 5) {
+ /* Provide 5/block_size scaling */
+ cinfo->output_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 5L, (long) cinfo->block_size);
+ cinfo->output_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 5L, (long) cinfo->block_size);
+ cinfo->min_DCT_h_scaled_size = 5;
+ cinfo->min_DCT_v_scaled_size = 5;
+ } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 6) {
+ /* Provide 6/block_size scaling */
+ cinfo->output_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 6L, (long) cinfo->block_size);
+ cinfo->output_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 6L, (long) cinfo->block_size);
+ cinfo->min_DCT_h_scaled_size = 6;
+ cinfo->min_DCT_v_scaled_size = 6;
+ } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 7) {
+ /* Provide 7/block_size scaling */
+ cinfo->output_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 7L, (long) cinfo->block_size);
+ cinfo->output_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 7L, (long) cinfo->block_size);
+ cinfo->min_DCT_h_scaled_size = 7;
+ cinfo->min_DCT_v_scaled_size = 7;
+ } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 8) {
+ /* Provide 8/block_size scaling */
+ cinfo->output_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 8L, (long) cinfo->block_size);
+ cinfo->output_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 8L, (long) cinfo->block_size);
+ cinfo->min_DCT_h_scaled_size = 8;
+ cinfo->min_DCT_v_scaled_size = 8;
+ } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 9) {
+ /* Provide 9/block_size scaling */
+ cinfo->output_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 9L, (long) cinfo->block_size);
+ cinfo->output_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 9L, (long) cinfo->block_size);
+ cinfo->min_DCT_h_scaled_size = 9;
+ cinfo->min_DCT_v_scaled_size = 9;
+ } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 10) {
+ /* Provide 10/block_size scaling */
+ cinfo->output_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 10L, (long) cinfo->block_size);
+ cinfo->output_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 10L, (long) cinfo->block_size);
+ cinfo->min_DCT_h_scaled_size = 10;
+ cinfo->min_DCT_v_scaled_size = 10;
+ } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 11) {
+ /* Provide 11/block_size scaling */
+ cinfo->output_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 11L, (long) cinfo->block_size);
+ cinfo->output_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 11L, (long) cinfo->block_size);
+ cinfo->min_DCT_h_scaled_size = 11;
+ cinfo->min_DCT_v_scaled_size = 11;
+ } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 12) {
+ /* Provide 12/block_size scaling */
+ cinfo->output_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 12L, (long) cinfo->block_size);
+ cinfo->output_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 12L, (long) cinfo->block_size);
+ cinfo->min_DCT_h_scaled_size = 12;
+ cinfo->min_DCT_v_scaled_size = 12;
+ } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 13) {
+ /* Provide 13/block_size scaling */
+ cinfo->output_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 13L, (long) cinfo->block_size);
+ cinfo->output_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 13L, (long) cinfo->block_size);
+ cinfo->min_DCT_h_scaled_size = 13;
+ cinfo->min_DCT_v_scaled_size = 13;
+ } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 14) {
+ /* Provide 14/block_size scaling */
+ cinfo->output_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 14L, (long) cinfo->block_size);
+ cinfo->output_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 14L, (long) cinfo->block_size);
+ cinfo->min_DCT_h_scaled_size = 14;
+ cinfo->min_DCT_v_scaled_size = 14;
+ } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 15) {
+ /* Provide 15/block_size scaling */
+ cinfo->output_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 15L, (long) cinfo->block_size);
+ cinfo->output_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 15L, (long) cinfo->block_size);
+ cinfo->min_DCT_h_scaled_size = 15;
+ cinfo->min_DCT_v_scaled_size = 15;
+ } else {
+ /* Provide 16/block_size scaling */
+ cinfo->output_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * 16L, (long) cinfo->block_size);
+ cinfo->output_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * 16L, (long) cinfo->block_size);
+ cinfo->min_DCT_h_scaled_size = 16;
+ cinfo->min_DCT_v_scaled_size = 16;
+ }
+
+ /* Recompute dimensions of components */
+ for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
+ ci++, compptr++) {
+ compptr->DCT_h_scaled_size = cinfo->min_DCT_h_scaled_size;
+ compptr->DCT_v_scaled_size = cinfo->min_DCT_v_scaled_size;
+ }
+
+#else /* !IDCT_SCALING_SUPPORTED */
+
+ /* Hardwire it to "no scaling" */
+ cinfo->output_width = cinfo->image_width;
+ cinfo->output_height = cinfo->image_height;
+ /* jdinput.c has already initialized DCT_scaled_size,
+ * and has computed unscaled downsampled_width and downsampled_height.
+ */
+
+#endif /* IDCT_SCALING_SUPPORTED */
+}
+
+
LOCAL(void)
initial_setup (j_decompress_ptr cinfo)
/* Called once, when first SOS marker is reached */
@@ -70,23 +239,121 @@ initial_setup (j_decompress_ptr cinfo)
compptr->v_samp_factor);
}
- /* We initialize DCT_scaled_size and min_DCT_scaled_size to DCTSIZE.
- * In the full decompressor, this will be overridden by jdmaster.c;
- * but in the transcoder, jdmaster.c is not used, so we must do it here.
+ /* Derive block_size, natural_order, and lim_Se */
+ if (cinfo->is_baseline || (cinfo->progressive_mode &&
+ cinfo->comps_in_scan)) { /* no pseudo SOS marker */
+ cinfo->block_size = DCTSIZE;
+ cinfo->natural_order = jpeg_natural_order;
+ cinfo->lim_Se = DCTSIZE2-1;
+ } else
+ switch (cinfo->Se) {
+ case (1*1-1):
+ cinfo->block_size = 1;
+ cinfo->natural_order = jpeg_natural_order; /* not needed */
+ cinfo->lim_Se = cinfo->Se;
+ break;
+ case (2*2-1):
+ cinfo->block_size = 2;
+ cinfo->natural_order = jpeg_natural_order2;
+ cinfo->lim_Se = cinfo->Se;
+ break;
+ case (3*3-1):
+ cinfo->block_size = 3;
+ cinfo->natural_order = jpeg_natural_order3;
+ cinfo->lim_Se = cinfo->Se;
+ break;
+ case (4*4-1):
+ cinfo->block_size = 4;
+ cinfo->natural_order = jpeg_natural_order4;
+ cinfo->lim_Se = cinfo->Se;
+ break;
+ case (5*5-1):
+ cinfo->block_size = 5;
+ cinfo->natural_order = jpeg_natural_order5;
+ cinfo->lim_Se = cinfo->Se;
+ break;
+ case (6*6-1):
+ cinfo->block_size = 6;
+ cinfo->natural_order = jpeg_natural_order6;
+ cinfo->lim_Se = cinfo->Se;
+ break;
+ case (7*7-1):
+ cinfo->block_size = 7;
+ cinfo->natural_order = jpeg_natural_order7;
+ cinfo->lim_Se = cinfo->Se;
+ break;
+ case (8*8-1):
+ cinfo->block_size = 8;
+ cinfo->natural_order = jpeg_natural_order;
+ cinfo->lim_Se = DCTSIZE2-1;
+ break;
+ case (9*9-1):
+ cinfo->block_size = 9;
+ cinfo->natural_order = jpeg_natural_order;
+ cinfo->lim_Se = DCTSIZE2-1;
+ break;
+ case (10*10-1):
+ cinfo->block_size = 10;
+ cinfo->natural_order = jpeg_natural_order;
+ cinfo->lim_Se = DCTSIZE2-1;
+ break;
+ case (11*11-1):
+ cinfo->block_size = 11;
+ cinfo->natural_order = jpeg_natural_order;
+ cinfo->lim_Se = DCTSIZE2-1;
+ break;
+ case (12*12-1):
+ cinfo->block_size = 12;
+ cinfo->natural_order = jpeg_natural_order;
+ cinfo->lim_Se = DCTSIZE2-1;
+ break;
+ case (13*13-1):
+ cinfo->block_size = 13;
+ cinfo->natural_order = jpeg_natural_order;
+ cinfo->lim_Se = DCTSIZE2-1;
+ break;
+ case (14*14-1):
+ cinfo->block_size = 14;
+ cinfo->natural_order = jpeg_natural_order;
+ cinfo->lim_Se = DCTSIZE2-1;
+ break;
+ case (15*15-1):
+ cinfo->block_size = 15;
+ cinfo->natural_order = jpeg_natural_order;
+ cinfo->lim_Se = DCTSIZE2-1;
+ break;
+ case (16*16-1):
+ cinfo->block_size = 16;
+ cinfo->natural_order = jpeg_natural_order;
+ cinfo->lim_Se = DCTSIZE2-1;
+ break;
+ default:
+ ERREXIT4(cinfo, JERR_BAD_PROGRESSION,
+ cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al);
+ break;
+ }
+
+ /* We initialize DCT_scaled_size and min_DCT_scaled_size to block_size.
+ * In the full decompressor,
+ * this will be overridden by jpeg_calc_output_dimensions in jdmaster.c;
+ * but in the transcoder,
+ * jpeg_calc_output_dimensions is not used, so we must do it here.
*/
- cinfo->min_DCT_scaled_size = DCTSIZE;
+ cinfo->min_DCT_h_scaled_size = cinfo->block_size;
+ cinfo->min_DCT_v_scaled_size = cinfo->block_size;
/* Compute dimensions of components */
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
- compptr->DCT_scaled_size = DCTSIZE;
+ compptr->DCT_h_scaled_size = cinfo->block_size;
+ compptr->DCT_v_scaled_size = cinfo->block_size;
/* Size in DCT blocks */
compptr->width_in_blocks = (JDIMENSION)
jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,
- (long) (cinfo->max_h_samp_factor * DCTSIZE));
+ (long) (cinfo->max_h_samp_factor * cinfo->block_size));
compptr->height_in_blocks = (JDIMENSION)
jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,
- (long) (cinfo->max_v_samp_factor * DCTSIZE));
+ (long) (cinfo->max_v_samp_factor * cinfo->block_size));
/* downsampled_width and downsampled_height will also be overridden by
* jdmaster.c if we are doing full decompression. The transcoder library
* doesn't use these values, but the calling application might.
@@ -107,7 +374,7 @@ initial_setup (j_decompress_ptr cinfo)
/* Compute number of fully interleaved MCU rows. */
cinfo->total_iMCU_rows = (JDIMENSION)
jdiv_round_up((long) cinfo->image_height,
- (long) (cinfo->max_v_samp_factor*DCTSIZE));
+ (long) (cinfo->max_v_samp_factor * cinfo->block_size));
/* Decide whether file contains multiple scans */
if (cinfo->comps_in_scan < cinfo->num_components || cinfo->progressive_mode)
@@ -138,7 +405,7 @@ per_scan_setup (j_decompress_ptr cinfo)
compptr->MCU_width = 1;
compptr->MCU_height = 1;
compptr->MCU_blocks = 1;
- compptr->MCU_sample_width = compptr->DCT_scaled_size;
+ compptr->MCU_sample_width = compptr->DCT_h_scaled_size;
compptr->last_col_width = 1;
/* For noninterleaved scans, it is convenient to define last_row_height
* as the number of block rows present in the last iMCU row.
@@ -161,10 +428,10 @@ per_scan_setup (j_decompress_ptr cinfo)
/* Overall image size in MCUs */
cinfo->MCUs_per_row = (JDIMENSION)
jdiv_round_up((long) cinfo->image_width,
- (long) (cinfo->max_h_samp_factor*DCTSIZE));
+ (long) (cinfo->max_h_samp_factor * cinfo->block_size));
cinfo->MCU_rows_in_scan = (JDIMENSION)
jdiv_round_up((long) cinfo->image_height,
- (long) (cinfo->max_v_samp_factor*DCTSIZE));
+ (long) (cinfo->max_v_samp_factor * cinfo->block_size));
cinfo->blocks_in_MCU = 0;
@@ -174,7 +441,7 @@ per_scan_setup (j_decompress_ptr cinfo)
compptr->MCU_width = compptr->h_samp_factor;
compptr->MCU_height = compptr->v_samp_factor;
compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height;
- compptr->MCU_sample_width = compptr->MCU_width * compptr->DCT_scaled_size;
+ compptr->MCU_sample_width = compptr->MCU_width * compptr->DCT_h_scaled_size;
/* Figure number of non-dummy blocks in last MCU column & row */
tmp = (int) (compptr->width_in_blocks % compptr->MCU_width);
if (tmp == 0) tmp = compptr->MCU_width;
@@ -282,6 +549,10 @@ finish_input_pass (j_decompress_ptr cinfo)
* The consume_input method pointer points either here or to the
* coefficient controller's consume_data routine, depending on whether
* we are reading a compressed data segment or inter-segment markers.
+ *
+ * Note: This function should NOT return a pseudo SOS marker (with zero
+ * component number) to the caller. A pseudo marker received by
+ * read_markers is processed and then skipped for other markers.
*/
METHODDEF(int)
@@ -293,41 +564,50 @@ consume_markers (j_decompress_ptr cinfo)
if (inputctl->pub.eoi_reached) /* After hitting EOI, read no further */
return JPEG_REACHED_EOI;
- val = (*cinfo->marker->read_markers) (cinfo);
-
- switch (val) {
- case JPEG_REACHED_SOS: /* Found SOS */
- if (inputctl->inheaders) { /* 1st SOS */
- initial_setup(cinfo);
- inputctl->inheaders = FALSE;
- /* Note: start_input_pass must be called by jdmaster.c
- * before any more input can be consumed. jdapimin.c is
- * responsible for enforcing this sequencing.
- */
- } else { /* 2nd or later SOS marker */
- if (! inputctl->pub.has_multiple_scans)
- ERREXIT(cinfo, JERR_EOI_EXPECTED); /* Oops, I wasn't expecting this! */
- start_input_pass(cinfo);
- }
- break;
- case JPEG_REACHED_EOI: /* Found EOI */
- inputctl->pub.eoi_reached = TRUE;
- if (inputctl->inheaders) { /* Tables-only datastream, apparently */
- if (cinfo->marker->saw_SOF)
- ERREXIT(cinfo, JERR_SOF_NO_SOS);
- } else {
- /* Prevent infinite loop in coef ctlr's decompress_data routine
- * if user set output_scan_number larger than number of scans.
- */
- if (cinfo->output_scan_number > cinfo->input_scan_number)
- cinfo->output_scan_number = cinfo->input_scan_number;
+ for (;;) { /* Loop to pass pseudo SOS marker */
+ val = (*cinfo->marker->read_markers) (cinfo);
+
+ switch (val) {
+ case JPEG_REACHED_SOS: /* Found SOS */
+ if (inputctl->inheaders) { /* 1st SOS */
+ if (inputctl->inheaders == 1)
+ initial_setup(cinfo);
+ if (cinfo->comps_in_scan == 0) { /* pseudo SOS marker */
+ inputctl->inheaders = 2;
+ break;
+ }
+ inputctl->inheaders = 0;
+ /* Note: start_input_pass must be called by jdmaster.c
+ * before any more input can be consumed. jdapimin.c is
+ * responsible for enforcing this sequencing.
+ */
+ } else { /* 2nd or later SOS marker */
+ if (! inputctl->pub.has_multiple_scans)
+ ERREXIT(cinfo, JERR_EOI_EXPECTED); /* Oops, I wasn't expecting this! */
+ if (cinfo->comps_in_scan == 0) /* unexpected pseudo SOS marker */
+ break;
+ start_input_pass(cinfo);
+ }
+ return val;
+ case JPEG_REACHED_EOI: /* Found EOI */
+ inputctl->pub.eoi_reached = TRUE;
+ if (inputctl->inheaders) { /* Tables-only datastream, apparently */
+ if (cinfo->marker->saw_SOF)
+ ERREXIT(cinfo, JERR_SOF_NO_SOS);
+ } else {
+ /* Prevent infinite loop in coef ctlr's decompress_data routine
+ * if user set output_scan_number larger than number of scans.
+ */
+ if (cinfo->output_scan_number > cinfo->input_scan_number)
+ cinfo->output_scan_number = cinfo->input_scan_number;
+ }
+ return val;
+ case JPEG_SUSPENDED:
+ return val;
+ default:
+ return val;
}
- break;
- case JPEG_SUSPENDED:
- break;
}
-
- return val;
}
@@ -343,7 +623,7 @@ reset_input_controller (j_decompress_ptr cinfo)
inputctl->pub.consume_input = consume_markers;
inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */
inputctl->pub.eoi_reached = FALSE;
- inputctl->inheaders = TRUE;
+ inputctl->inheaders = 1;
/* Reset other modules */
(*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo);
(*cinfo->marker->reset_marker_reader) (cinfo);
@@ -377,5 +657,5 @@ jinit_input_controller (j_decompress_ptr cinfo)
*/
inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */
inputctl->pub.eoi_reached = FALSE;
- inputctl->inheaders = TRUE;
+ inputctl->inheaders = 1;
}
diff --git a/src/3rdparty/libjpeg/jdmainct.c b/src/3rdparty/libjpeg/jdmainct.c
index 13c956f5de..02723ca732 100644
--- a/src/3rdparty/libjpeg/jdmainct.c
+++ b/src/3rdparty/libjpeg/jdmainct.c
@@ -161,7 +161,7 @@ alloc_funny_pointers (j_decompress_ptr cinfo)
{
my_main_ptr main = (my_main_ptr) cinfo->main;
int ci, rgroup;
- int M = cinfo->min_DCT_scaled_size;
+ int M = cinfo->min_DCT_v_scaled_size;
jpeg_component_info *compptr;
JSAMPARRAY xbuf;
@@ -175,8 +175,8 @@ alloc_funny_pointers (j_decompress_ptr cinfo)
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
- rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) /
- cinfo->min_DCT_scaled_size; /* height of a row group of component */
+ rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) /
+ cinfo->min_DCT_v_scaled_size; /* height of a row group of component */
/* Get space for pointer lists --- M+4 row groups in each list.
* We alloc both pointer lists with one call to save a few cycles.
*/
@@ -202,14 +202,14 @@ make_funny_pointers (j_decompress_ptr cinfo)
{
my_main_ptr main = (my_main_ptr) cinfo->main;
int ci, i, rgroup;
- int M = cinfo->min_DCT_scaled_size;
+ int M = cinfo->min_DCT_v_scaled_size;
jpeg_component_info *compptr;
JSAMPARRAY buf, xbuf0, xbuf1;
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
- rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) /
- cinfo->min_DCT_scaled_size; /* height of a row group of component */
+ rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) /
+ cinfo->min_DCT_v_scaled_size; /* height of a row group of component */
xbuf0 = main->xbuffer[0][ci];
xbuf1 = main->xbuffer[1][ci];
/* First copy the workspace pointers as-is */
@@ -242,14 +242,14 @@ set_wraparound_pointers (j_decompress_ptr cinfo)
{
my_main_ptr main = (my_main_ptr) cinfo->main;
int ci, i, rgroup;
- int M = cinfo->min_DCT_scaled_size;
+ int M = cinfo->min_DCT_v_scaled_size;
jpeg_component_info *compptr;
JSAMPARRAY xbuf0, xbuf1;
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
- rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) /
- cinfo->min_DCT_scaled_size; /* height of a row group of component */
+ rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) /
+ cinfo->min_DCT_v_scaled_size; /* height of a row group of component */
xbuf0 = main->xbuffer[0][ci];
xbuf1 = main->xbuffer[1][ci];
for (i = 0; i < rgroup; i++) {
@@ -277,8 +277,8 @@ set_bottom_pointers (j_decompress_ptr cinfo)
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
/* Count sample rows in one iMCU row and in one row group */
- iMCUheight = compptr->v_samp_factor * compptr->DCT_scaled_size;
- rgroup = iMCUheight / cinfo->min_DCT_scaled_size;
+ iMCUheight = compptr->v_samp_factor * compptr->DCT_v_scaled_size;
+ rgroup = iMCUheight / cinfo->min_DCT_v_scaled_size;
/* Count nondummy sample rows remaining for this component */
rows_left = (int) (compptr->downsampled_height % (JDIMENSION) iMCUheight);
if (rows_left == 0) rows_left = iMCUheight;
@@ -357,7 +357,7 @@ process_data_simple_main (j_decompress_ptr cinfo,
}
/* There are always min_DCT_scaled_size row groups in an iMCU row. */
- rowgroups_avail = (JDIMENSION) cinfo->min_DCT_scaled_size;
+ rowgroups_avail = (JDIMENSION) cinfo->min_DCT_v_scaled_size;
/* Note: at the bottom of the image, we may pass extra garbage row groups
* to the postprocessor. The postprocessor has to check for bottom
* of image anyway (at row resolution), so no point in us doing it too.
@@ -417,7 +417,7 @@ process_data_context_main (j_decompress_ptr cinfo,
case CTX_PREPARE_FOR_IMCU:
/* Prepare to process first M-1 row groups of this iMCU row */
main->rowgroup_ctr = 0;
- main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_scaled_size - 1);
+ main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_v_scaled_size - 1);
/* Check for bottom of image: if so, tweak pointers to "duplicate"
* the last sample row, and adjust rowgroups_avail to ignore padding rows.
*/
@@ -440,8 +440,8 @@ process_data_context_main (j_decompress_ptr cinfo,
main->buffer_full = FALSE;
/* Still need to process last row group of this iMCU row, */
/* which is saved at index M+1 of the other xbuffer */
- main->rowgroup_ctr = (JDIMENSION) (cinfo->min_DCT_scaled_size + 1);
- main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_scaled_size + 2);
+ main->rowgroup_ctr = (JDIMENSION) (cinfo->min_DCT_v_scaled_size + 1);
+ main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_v_scaled_size + 2);
main->context_state = CTX_POSTPONED_ROW;
}
}
@@ -492,21 +492,21 @@ jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
* ngroups is the number of row groups we need.
*/
if (cinfo->upsample->need_context_rows) {
- if (cinfo->min_DCT_scaled_size < 2) /* unsupported, see comments above */
+ if (cinfo->min_DCT_v_scaled_size < 2) /* unsupported, see comments above */
ERREXIT(cinfo, JERR_NOTIMPL);
alloc_funny_pointers(cinfo); /* Alloc space for xbuffer[] lists */
- ngroups = cinfo->min_DCT_scaled_size + 2;
+ ngroups = cinfo->min_DCT_v_scaled_size + 2;
} else {
- ngroups = cinfo->min_DCT_scaled_size;
+ ngroups = cinfo->min_DCT_v_scaled_size;
}
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
- rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) /
- cinfo->min_DCT_scaled_size; /* height of a row group of component */
+ rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) /
+ cinfo->min_DCT_v_scaled_size; /* height of a row group of component */
main->buffer[ci] = (*cinfo->mem->alloc_sarray)
((j_common_ptr) cinfo, JPOOL_IMAGE,
- compptr->width_in_blocks * compptr->DCT_scaled_size,
+ compptr->width_in_blocks * compptr->DCT_h_scaled_size,
(JDIMENSION) (rgroup * ngroups));
}
}
diff --git a/src/3rdparty/libjpeg/jdmarker.c b/src/3rdparty/libjpeg/jdmarker.c
index f4cca8cc83..f2a9cc4295 100644
--- a/src/3rdparty/libjpeg/jdmarker.c
+++ b/src/3rdparty/libjpeg/jdmarker.c
@@ -2,6 +2,7 @@
* jdmarker.c
*
* Copyright (C) 1991-1998, Thomas G. Lane.
+ * Modified 2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -234,7 +235,8 @@ get_soi (j_decompress_ptr cinfo)
LOCAL(boolean)
-get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith)
+get_sof (j_decompress_ptr cinfo, boolean is_baseline, boolean is_prog,
+ boolean is_arith)
/* Process a SOFn marker */
{
INT32 length;
@@ -242,6 +244,7 @@ get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith)
jpeg_component_info * compptr;
INPUT_VARS(cinfo);
+ cinfo->is_baseline = is_baseline;
cinfo->progressive_mode = is_prog;
cinfo->arith_code = is_arith;
@@ -315,7 +318,9 @@ get_sos (j_decompress_ptr cinfo)
TRACEMS1(cinfo, 1, JTRC_SOS, n);
- if (length != (n * 2 + 6) || n < 1 || n > MAX_COMPS_IN_SCAN)
+ if (length != (n * 2 + 6) || n > MAX_COMPS_IN_SCAN ||
+ (n == 0 && !cinfo->progressive_mode))
+ /* pseudo SOS marker only allowed in progressive mode */
ERREXIT(cinfo, JERR_BAD_LENGTH);
cinfo->comps_in_scan = n;
@@ -359,8 +364,8 @@ get_sos (j_decompress_ptr cinfo)
/* Prepare to scan data & restart markers */
cinfo->marker->next_restart_num = 0;
- /* Count another SOS marker */
- cinfo->input_scan_number++;
+ /* Count another (non-pseudo) SOS marker */
+ if (n) cinfo->input_scan_number++;
INPUT_SYNC(cinfo);
return TRUE;
@@ -490,16 +495,18 @@ LOCAL(boolean)
get_dqt (j_decompress_ptr cinfo)
/* Process a DQT marker */
{
- INT32 length;
- int n, i, prec;
+ INT32 length, count, i;
+ int n, prec;
unsigned int tmp;
JQUANT_TBL *quant_ptr;
+ const int *natural_order;
INPUT_VARS(cinfo);
INPUT_2BYTES(cinfo, length, return FALSE);
length -= 2;
while (length > 0) {
+ length--;
INPUT_BYTE(cinfo, n, return FALSE);
prec = n >> 4;
n &= 0x0F;
@@ -513,13 +520,43 @@ get_dqt (j_decompress_ptr cinfo)
cinfo->quant_tbl_ptrs[n] = jpeg_alloc_quant_table((j_common_ptr) cinfo);
quant_ptr = cinfo->quant_tbl_ptrs[n];
- for (i = 0; i < DCTSIZE2; i++) {
+ if (prec) {
+ if (length < DCTSIZE2 * 2) {
+ /* Initialize full table for safety. */
+ for (i = 0; i < DCTSIZE2; i++) {
+ quant_ptr->quantval[i] = 1;
+ }
+ count = length >> 1;
+ } else
+ count = DCTSIZE2;
+ } else {
+ if (length < DCTSIZE2) {
+ /* Initialize full table for safety. */
+ for (i = 0; i < DCTSIZE2; i++) {
+ quant_ptr->quantval[i] = 1;
+ }
+ count = length;
+ } else
+ count = DCTSIZE2;
+ }
+
+ switch (count) {
+ case (2*2): natural_order = jpeg_natural_order2; break;
+ case (3*3): natural_order = jpeg_natural_order3; break;
+ case (4*4): natural_order = jpeg_natural_order4; break;
+ case (5*5): natural_order = jpeg_natural_order5; break;
+ case (6*6): natural_order = jpeg_natural_order6; break;
+ case (7*7): natural_order = jpeg_natural_order7; break;
+ default: natural_order = jpeg_natural_order; break;
+ }
+
+ for (i = 0; i < count; i++) {
if (prec)
INPUT_2BYTES(cinfo, tmp, return FALSE);
else
INPUT_BYTE(cinfo, tmp, return FALSE);
/* We convert the zigzag-order table to natural array order. */
- quant_ptr->quantval[jpeg_natural_order[i]] = (UINT16) tmp;
+ quant_ptr->quantval[natural_order[i]] = (UINT16) tmp;
}
if (cinfo->err->trace_level >= 2) {
@@ -532,8 +569,8 @@ get_dqt (j_decompress_ptr cinfo)
}
}
- length -= DCTSIZE2+1;
- if (prec) length -= DCTSIZE2;
+ length -= count;
+ if (prec) length -= count;
}
if (length != 0)
@@ -946,6 +983,11 @@ first_marker (j_decompress_ptr cinfo)
*
* Returns same codes as are defined for jpeg_consume_input:
* JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.
+ *
+ * Note: This function may return a pseudo SOS marker (with zero
+ * component number) for treat by input controller's consume_input.
+ * consume_input itself should filter out (skip) the pseudo marker
+ * after processing for the caller.
*/
METHODDEF(int)
@@ -975,23 +1017,27 @@ read_markers (j_decompress_ptr cinfo)
break;
case M_SOF0: /* Baseline */
+ if (! get_sof(cinfo, TRUE, FALSE, FALSE))
+ return JPEG_SUSPENDED;
+ break;
+
case M_SOF1: /* Extended sequential, Huffman */
- if (! get_sof(cinfo, FALSE, FALSE))
+ if (! get_sof(cinfo, FALSE, FALSE, FALSE))
return JPEG_SUSPENDED;
break;
case M_SOF2: /* Progressive, Huffman */
- if (! get_sof(cinfo, TRUE, FALSE))
+ if (! get_sof(cinfo, FALSE, TRUE, FALSE))
return JPEG_SUSPENDED;
break;
case M_SOF9: /* Extended sequential, arithmetic */
- if (! get_sof(cinfo, FALSE, TRUE))
+ if (! get_sof(cinfo, FALSE, FALSE, TRUE))
return JPEG_SUSPENDED;
break;
case M_SOF10: /* Progressive, arithmetic */
- if (! get_sof(cinfo, TRUE, TRUE))
+ if (! get_sof(cinfo, FALSE, TRUE, TRUE))
return JPEG_SUSPENDED;
break;
diff --git a/src/3rdparty/libjpeg/jdmaster.c b/src/3rdparty/libjpeg/jdmaster.c
index 2802c5b7b2..8c1146e4fe 100644
--- a/src/3rdparty/libjpeg/jdmaster.c
+++ b/src/3rdparty/libjpeg/jdmaster.c
@@ -2,6 +2,7 @@
* jdmaster.c
*
* Copyright (C) 1991-1997, Thomas G. Lane.
+ * Modified 2002-2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -61,9 +62,12 @@ use_merged_upsample (j_decompress_ptr cinfo)
cinfo->comp_info[2].v_samp_factor != 1)
return FALSE;
/* furthermore, it doesn't work if we've scaled the IDCTs differently */
- if (cinfo->comp_info[0].DCT_scaled_size != cinfo->min_DCT_scaled_size ||
- cinfo->comp_info[1].DCT_scaled_size != cinfo->min_DCT_scaled_size ||
- cinfo->comp_info[2].DCT_scaled_size != cinfo->min_DCT_scaled_size)
+ if (cinfo->comp_info[0].DCT_h_scaled_size != cinfo->min_DCT_h_scaled_size ||
+ cinfo->comp_info[1].DCT_h_scaled_size != cinfo->min_DCT_h_scaled_size ||
+ cinfo->comp_info[2].DCT_h_scaled_size != cinfo->min_DCT_h_scaled_size ||
+ cinfo->comp_info[0].DCT_v_scaled_size != cinfo->min_DCT_v_scaled_size ||
+ cinfo->comp_info[1].DCT_v_scaled_size != cinfo->min_DCT_v_scaled_size ||
+ cinfo->comp_info[2].DCT_v_scaled_size != cinfo->min_DCT_v_scaled_size)
return FALSE;
/* ??? also need to test for upsample-time rescaling, when & if supported */
return TRUE; /* by golly, it'll work... */
@@ -82,7 +86,9 @@ use_merged_upsample (j_decompress_ptr cinfo)
GLOBAL(void)
jpeg_calc_output_dimensions (j_decompress_ptr cinfo)
-/* Do computations that are needed before master selection phase */
+/* Do computations that are needed before master selection phase.
+ * This function is used for full decompression.
+ */
{
#ifdef IDCT_SCALING_SUPPORTED
int ci;
@@ -93,52 +99,38 @@ jpeg_calc_output_dimensions (j_decompress_ptr cinfo)
if (cinfo->global_state != DSTATE_READY)
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
+ /* Compute core output image dimensions and DCT scaling choices. */
+ jpeg_core_output_dimensions(cinfo);
+
#ifdef IDCT_SCALING_SUPPORTED
- /* Compute actual output image dimensions and DCT scaling choices. */
- if (cinfo->scale_num * 8 <= cinfo->scale_denom) {
- /* Provide 1/8 scaling */
- cinfo->output_width = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_width, 8L);
- cinfo->output_height = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height, 8L);
- cinfo->min_DCT_scaled_size = 1;
- } else if (cinfo->scale_num * 4 <= cinfo->scale_denom) {
- /* Provide 1/4 scaling */
- cinfo->output_width = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_width, 4L);
- cinfo->output_height = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height, 4L);
- cinfo->min_DCT_scaled_size = 2;
- } else if (cinfo->scale_num * 2 <= cinfo->scale_denom) {
- /* Provide 1/2 scaling */
- cinfo->output_width = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_width, 2L);
- cinfo->output_height = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height, 2L);
- cinfo->min_DCT_scaled_size = 4;
- } else {
- /* Provide 1/1 scaling */
- cinfo->output_width = cinfo->image_width;
- cinfo->output_height = cinfo->image_height;
- cinfo->min_DCT_scaled_size = DCTSIZE;
- }
/* In selecting the actual DCT scaling for each component, we try to
* scale up the chroma components via IDCT scaling rather than upsampling.
* This saves time if the upsampler gets to use 1:1 scaling.
- * Note this code assumes that the supported DCT scalings are powers of 2.
+ * Note this code adapts subsampling ratios which are powers of 2.
*/
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
- int ssize = cinfo->min_DCT_scaled_size;
- while (ssize < DCTSIZE &&
- (compptr->h_samp_factor * ssize * 2 <=
- cinfo->max_h_samp_factor * cinfo->min_DCT_scaled_size) &&
- (compptr->v_samp_factor * ssize * 2 <=
- cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size)) {
+ int ssize = 1;
+ while (cinfo->min_DCT_h_scaled_size * ssize <=
+ (cinfo->do_fancy_upsampling ? DCTSIZE : DCTSIZE / 2) &&
+ (cinfo->max_h_samp_factor % (compptr->h_samp_factor * ssize * 2)) == 0) {
ssize = ssize * 2;
}
- compptr->DCT_scaled_size = ssize;
+ compptr->DCT_h_scaled_size = cinfo->min_DCT_h_scaled_size * ssize;
+ ssize = 1;
+ while (cinfo->min_DCT_v_scaled_size * ssize <=
+ (cinfo->do_fancy_upsampling ? DCTSIZE : DCTSIZE / 2) &&
+ (cinfo->max_v_samp_factor % (compptr->v_samp_factor * ssize * 2)) == 0) {
+ ssize = ssize * 2;
+ }
+ compptr->DCT_v_scaled_size = cinfo->min_DCT_v_scaled_size * ssize;
+
+ /* We don't support IDCT ratios larger than 2. */
+ if (compptr->DCT_h_scaled_size > compptr->DCT_v_scaled_size * 2)
+ compptr->DCT_h_scaled_size = compptr->DCT_v_scaled_size * 2;
+ else if (compptr->DCT_v_scaled_size > compptr->DCT_h_scaled_size * 2)
+ compptr->DCT_v_scaled_size = compptr->DCT_h_scaled_size * 2;
}
/* Recompute downsampled dimensions of components;
@@ -149,23 +141,14 @@ jpeg_calc_output_dimensions (j_decompress_ptr cinfo)
/* Size in samples, after IDCT scaling */
compptr->downsampled_width = (JDIMENSION)
jdiv_round_up((long) cinfo->image_width *
- (long) (compptr->h_samp_factor * compptr->DCT_scaled_size),
- (long) (cinfo->max_h_samp_factor * DCTSIZE));
+ (long) (compptr->h_samp_factor * compptr->DCT_h_scaled_size),
+ (long) (cinfo->max_h_samp_factor * cinfo->block_size));
compptr->downsampled_height = (JDIMENSION)
jdiv_round_up((long) cinfo->image_height *
- (long) (compptr->v_samp_factor * compptr->DCT_scaled_size),
- (long) (cinfo->max_v_samp_factor * DCTSIZE));
+ (long) (compptr->v_samp_factor * compptr->DCT_v_scaled_size),
+ (long) (cinfo->max_v_samp_factor * cinfo->block_size));
}
-#else /* !IDCT_SCALING_SUPPORTED */
-
- /* Hardwire it to "no scaling" */
- cinfo->output_width = cinfo->image_width;
- cinfo->output_height = cinfo->image_height;
- /* jdinput.c has already initialized DCT_scaled_size to DCTSIZE,
- * and has computed unscaled downsampled_width and downsampled_height.
- */
-
#endif /* IDCT_SCALING_SUPPORTED */
/* Report number of components in selected colorspace. */
@@ -372,17 +355,10 @@ master_selection (j_decompress_ptr cinfo)
/* Inverse DCT */
jinit_inverse_dct(cinfo);
/* Entropy decoding: either Huffman or arithmetic coding. */
- if (cinfo->arith_code) {
- ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
- } else {
- if (cinfo->progressive_mode) {
-#ifdef D_PROGRESSIVE_SUPPORTED
- jinit_phuff_decoder(cinfo);
-#else
- ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
- } else
- jinit_huff_decoder(cinfo);
+ if (cinfo->arith_code)
+ jinit_arith_decoder(cinfo);
+ else {
+ jinit_huff_decoder(cinfo);
}
/* Initialize principal buffer controllers. */
diff --git a/src/3rdparty/libjpeg/jdphuff.c b/src/3rdparty/libjpeg/jdphuff.c
deleted file mode 100644
index 2267809945..0000000000
--- a/src/3rdparty/libjpeg/jdphuff.c
+++ /dev/null
@@ -1,668 +0,0 @@
-/*
- * jdphuff.c
- *
- * Copyright (C) 1995-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains Huffman entropy decoding routines for progressive JPEG.
- *
- * Much of the complexity here has to do with supporting input suspension.
- * If the data source module demands suspension, we want to be able to back
- * up to the start of the current MCU. To do this, we copy state variables
- * into local working storage, and update them back to the permanent
- * storage only upon successful completion of an MCU.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jdhuff.h" /* Declarations shared with jdhuff.c */
-
-
-#ifdef D_PROGRESSIVE_SUPPORTED
-
-/*
- * Expanded entropy decoder object for progressive Huffman decoding.
- *
- * The savable_state subrecord contains fields that change within an MCU,
- * but must not be updated permanently until we complete the MCU.
- */
-
-typedef struct {
- unsigned int EOBRUN; /* remaining EOBs in EOBRUN */
- int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */
-} savable_state;
-
-/* This macro is to work around compilers with missing or broken
- * structure assignment. You'll need to fix this code if you have
- * such a compiler and you change MAX_COMPS_IN_SCAN.
- */
-
-#ifndef NO_STRUCT_ASSIGN
-#define ASSIGN_STATE(dest,src) ((dest) = (src))
-#else
-#if MAX_COMPS_IN_SCAN == 4
-#define ASSIGN_STATE(dest,src) \
- ((dest).EOBRUN = (src).EOBRUN, \
- (dest).last_dc_val[0] = (src).last_dc_val[0], \
- (dest).last_dc_val[1] = (src).last_dc_val[1], \
- (dest).last_dc_val[2] = (src).last_dc_val[2], \
- (dest).last_dc_val[3] = (src).last_dc_val[3])
-#endif
-#endif
-
-
-typedef struct {
- struct jpeg_entropy_decoder pub; /* public fields */
-
- /* These fields are loaded into local variables at start of each MCU.
- * In case of suspension, we exit WITHOUT updating them.
- */
- bitread_perm_state bitstate; /* Bit buffer at start of MCU */
- savable_state saved; /* Other state at start of MCU */
-
- /* These fields are NOT loaded into local working state. */
- unsigned int restarts_to_go; /* MCUs left in this restart interval */
-
- /* Pointers to derived tables (these workspaces have image lifespan) */
- d_derived_tbl * derived_tbls[NUM_HUFF_TBLS];
-
- d_derived_tbl * ac_derived_tbl; /* active table during an AC scan */
-} phuff_entropy_decoder;
-
-typedef phuff_entropy_decoder * phuff_entropy_ptr;
-
-/* Forward declarations */
-METHODDEF(boolean) decode_mcu_DC_first JPP((j_decompress_ptr cinfo,
- JBLOCKROW *MCU_data));
-METHODDEF(boolean) decode_mcu_AC_first JPP((j_decompress_ptr cinfo,
- JBLOCKROW *MCU_data));
-METHODDEF(boolean) decode_mcu_DC_refine JPP((j_decompress_ptr cinfo,
- JBLOCKROW *MCU_data));
-METHODDEF(boolean) decode_mcu_AC_refine JPP((j_decompress_ptr cinfo,
- JBLOCKROW *MCU_data));
-
-
-/*
- * Initialize for a Huffman-compressed scan.
- */
-
-METHODDEF(void)
-start_pass_phuff_decoder (j_decompress_ptr cinfo)
-{
- phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
- boolean is_DC_band, bad;
- int ci, coefi, tbl;
- int *coef_bit_ptr;
- jpeg_component_info * compptr;
-
- is_DC_band = (cinfo->Ss == 0);
-
- /* Validate scan parameters */
- bad = FALSE;
- if (is_DC_band) {
- if (cinfo->Se != 0)
- bad = TRUE;
- } else {
- /* need not check Ss/Se < 0 since they came from unsigned bytes */
- if (cinfo->Ss > cinfo->Se || cinfo->Se >= DCTSIZE2)
- bad = TRUE;
- /* AC scans may have only one component */
- if (cinfo->comps_in_scan != 1)
- bad = TRUE;
- }
- if (cinfo->Ah != 0) {
- /* Successive approximation refinement scan: must have Al = Ah-1. */
- if (cinfo->Al != cinfo->Ah-1)
- bad = TRUE;
- }
- if (cinfo->Al > 13) /* need not check for < 0 */
- bad = TRUE;
- /* Arguably the maximum Al value should be less than 13 for 8-bit precision,
- * but the spec doesn't say so, and we try to be liberal about what we
- * accept. Note: large Al values could result in out-of-range DC
- * coefficients during early scans, leading to bizarre displays due to
- * overflows in the IDCT math. But we won't crash.
- */
- if (bad)
- ERREXIT4(cinfo, JERR_BAD_PROGRESSION,
- cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al);
- /* Update progression status, and verify that scan order is legal.
- * Note that inter-scan inconsistencies are treated as warnings
- * not fatal errors ... not clear if this is right way to behave.
- */
- for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
- int cindex = cinfo->cur_comp_info[ci]->component_index;
- coef_bit_ptr = & cinfo->coef_bits[cindex][0];
- if (!is_DC_band && coef_bit_ptr[0] < 0) /* AC without prior DC scan */
- WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, 0);
- for (coefi = cinfo->Ss; coefi <= cinfo->Se; coefi++) {
- int expected = (coef_bit_ptr[coefi] < 0) ? 0 : coef_bit_ptr[coefi];
- if (cinfo->Ah != expected)
- WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, coefi);
- coef_bit_ptr[coefi] = cinfo->Al;
- }
- }
-
- /* Select MCU decoding routine */
- if (cinfo->Ah == 0) {
- if (is_DC_band)
- entropy->pub.decode_mcu = decode_mcu_DC_first;
- else
- entropy->pub.decode_mcu = decode_mcu_AC_first;
- } else {
- if (is_DC_band)
- entropy->pub.decode_mcu = decode_mcu_DC_refine;
- else
- entropy->pub.decode_mcu = decode_mcu_AC_refine;
- }
-
- for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
- compptr = cinfo->cur_comp_info[ci];
- /* Make sure requested tables are present, and compute derived tables.
- * We may build same derived table more than once, but it's not expensive.
- */
- if (is_DC_band) {
- if (cinfo->Ah == 0) { /* DC refinement needs no table */
- tbl = compptr->dc_tbl_no;
- jpeg_make_d_derived_tbl(cinfo, TRUE, tbl,
- & entropy->derived_tbls[tbl]);
- }
- } else {
- tbl = compptr->ac_tbl_no;
- jpeg_make_d_derived_tbl(cinfo, FALSE, tbl,
- & entropy->derived_tbls[tbl]);
- /* remember the single active table */
- entropy->ac_derived_tbl = entropy->derived_tbls[tbl];
- }
- /* Initialize DC predictions to 0 */
- entropy->saved.last_dc_val[ci] = 0;
- }
-
- /* Initialize bitread state variables */
- entropy->bitstate.bits_left = 0;
- entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */
- entropy->pub.insufficient_data = FALSE;
-
- /* Initialize private state variables */
- entropy->saved.EOBRUN = 0;
-
- /* Initialize restart counter */
- entropy->restarts_to_go = cinfo->restart_interval;
-}
-
-
-/*
- * Figure F.12: extend sign bit.
- * On some machines, a shift and add will be faster than a table lookup.
- */
-
-#ifdef AVOID_TABLES
-
-#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x))
-
-#else
-
-#define HUFF_EXTEND(x,s) ((x) < extend_test[s] ? (x) + extend_offset[s] : (x))
-
-static const int extend_test[16] = /* entry n is 2**(n-1) */
- { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080,
- 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 };
-
-static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
- { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1,
- ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1,
- ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1,
- ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 };
-
-#endif /* AVOID_TABLES */
-
-
-/*
- * Check for a restart marker & resynchronize decoder.
- * Returns FALSE if must suspend.
- */
-
-LOCAL(boolean)
-process_restart (j_decompress_ptr cinfo)
-{
- phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
- int ci;
-
- /* Throw away any unused bits remaining in bit buffer; */
- /* include any full bytes in next_marker's count of discarded bytes */
- cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8;
- entropy->bitstate.bits_left = 0;
-
- /* Advance past the RSTn marker */
- if (! (*cinfo->marker->read_restart_marker) (cinfo))
- return FALSE;
-
- /* Re-initialize DC predictions to 0 */
- for (ci = 0; ci < cinfo->comps_in_scan; ci++)
- entropy->saved.last_dc_val[ci] = 0;
- /* Re-init EOB run count, too */
- entropy->saved.EOBRUN = 0;
-
- /* Reset restart counter */
- entropy->restarts_to_go = cinfo->restart_interval;
-
- /* Reset out-of-data flag, unless read_restart_marker left us smack up
- * against a marker. In that case we will end up treating the next data
- * segment as empty, and we can avoid producing bogus output pixels by
- * leaving the flag set.
- */
- if (cinfo->unread_marker == 0)
- entropy->pub.insufficient_data = FALSE;
-
- return TRUE;
-}
-
-
-/*
- * Huffman MCU decoding.
- * Each of these routines decodes and returns one MCU's worth of
- * Huffman-compressed coefficients.
- * The coefficients are reordered from zigzag order into natural array order,
- * but are not dequantized.
- *
- * The i'th block of the MCU is stored into the block pointed to by
- * MCU_data[i]. WE ASSUME THIS AREA IS INITIALLY ZEROED BY THE CALLER.
- *
- * We return FALSE if data source requested suspension. In that case no
- * changes have been made to permanent state. (Exception: some output
- * coefficients may already have been assigned. This is harmless for
- * spectral selection, since we'll just re-assign them on the next call.
- * Successive approximation AC refinement has to be more careful, however.)
- */
-
-/*
- * MCU decoding for DC initial scan (either spectral selection,
- * or first pass of successive approximation).
- */
-
-METHODDEF(boolean)
-decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
-{
- phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
- int Al = cinfo->Al;
- register int s, r;
- int blkn, ci;
- JBLOCKROW block;
- BITREAD_STATE_VARS;
- savable_state state;
- d_derived_tbl * tbl;
- jpeg_component_info * compptr;
-
- /* Process restart marker if needed; may have to suspend */
- if (cinfo->restart_interval) {
- if (entropy->restarts_to_go == 0)
- if (! process_restart(cinfo))
- return FALSE;
- }
-
- /* If we've run out of data, just leave the MCU set to zeroes.
- * This way, we return uniform gray for the remainder of the segment.
- */
- if (! entropy->pub.insufficient_data) {
-
- /* Load up working state */
- BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
- ASSIGN_STATE(state, entropy->saved);
-
- /* Outer loop handles each block in the MCU */
-
- for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
- block = MCU_data[blkn];
- ci = cinfo->MCU_membership[blkn];
- compptr = cinfo->cur_comp_info[ci];
- tbl = entropy->derived_tbls[compptr->dc_tbl_no];
-
- /* Decode a single block's worth of coefficients */
-
- /* Section F.2.2.1: decode the DC coefficient difference */
- HUFF_DECODE(s, br_state, tbl, return FALSE, label1);
- if (s) {
- CHECK_BIT_BUFFER(br_state, s, return FALSE);
- r = GET_BITS(s);
- s = HUFF_EXTEND(r, s);
- }
-
- /* Convert DC difference to actual value, update last_dc_val */
- s += state.last_dc_val[ci];
- state.last_dc_val[ci] = s;
- /* Scale and output the coefficient (assumes jpeg_natural_order[0]=0) */
- (*block)[0] = (JCOEF) (s << Al);
- }
-
- /* Completed MCU, so update state */
- BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
- ASSIGN_STATE(entropy->saved, state);
- }
-
- /* Account for restart interval (no-op if not using restarts) */
- entropy->restarts_to_go--;
-
- return TRUE;
-}
-
-
-/*
- * MCU decoding for AC initial scan (either spectral selection,
- * or first pass of successive approximation).
- */
-
-METHODDEF(boolean)
-decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
-{
- phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
- int Se = cinfo->Se;
- int Al = cinfo->Al;
- register int s, k, r;
- unsigned int EOBRUN;
- JBLOCKROW block;
- BITREAD_STATE_VARS;
- d_derived_tbl * tbl;
-
- /* Process restart marker if needed; may have to suspend */
- if (cinfo->restart_interval) {
- if (entropy->restarts_to_go == 0)
- if (! process_restart(cinfo))
- return FALSE;
- }
-
- /* If we've run out of data, just leave the MCU set to zeroes.
- * This way, we return uniform gray for the remainder of the segment.
- */
- if (! entropy->pub.insufficient_data) {
-
- /* Load up working state.
- * We can avoid loading/saving bitread state if in an EOB run.
- */
- EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */
-
- /* There is always only one block per MCU */
-
- if (EOBRUN > 0) /* if it's a band of zeroes... */
- EOBRUN--; /* ...process it now (we do nothing) */
- else {
- BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
- block = MCU_data[0];
- tbl = entropy->ac_derived_tbl;
-
- for (k = cinfo->Ss; k <= Se; k++) {
- HUFF_DECODE(s, br_state, tbl, return FALSE, label2);
- r = s >> 4;
- s &= 15;
- if (s) {
- k += r;
- CHECK_BIT_BUFFER(br_state, s, return FALSE);
- r = GET_BITS(s);
- s = HUFF_EXTEND(r, s);
- /* Scale and output coefficient in natural (dezigzagged) order */
- (*block)[jpeg_natural_order[k]] = (JCOEF) (s << Al);
- } else {
- if (r == 15) { /* ZRL */
- k += 15; /* skip 15 zeroes in band */
- } else { /* EOBr, run length is 2^r + appended bits */
- EOBRUN = 1 << r;
- if (r) { /* EOBr, r > 0 */
- CHECK_BIT_BUFFER(br_state, r, return FALSE);
- r = GET_BITS(r);
- EOBRUN += r;
- }
- EOBRUN--; /* this band is processed at this moment */
- break; /* force end-of-band */
- }
- }
- }
-
- BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
- }
-
- /* Completed MCU, so update state */
- entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */
- }
-
- /* Account for restart interval (no-op if not using restarts) */
- entropy->restarts_to_go--;
-
- return TRUE;
-}
-
-
-/*
- * MCU decoding for DC successive approximation refinement scan.
- * Note: we assume such scans can be multi-component, although the spec
- * is not very clear on the point.
- */
-
-METHODDEF(boolean)
-decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
-{
- phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
- int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */
- int blkn;
- JBLOCKROW block;
- BITREAD_STATE_VARS;
-
- /* Process restart marker if needed; may have to suspend */
- if (cinfo->restart_interval) {
- if (entropy->restarts_to_go == 0)
- if (! process_restart(cinfo))
- return FALSE;
- }
-
- /* Not worth the cycles to check insufficient_data here,
- * since we will not change the data anyway if we read zeroes.
- */
-
- /* Load up working state */
- BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
-
- /* Outer loop handles each block in the MCU */
-
- for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
- block = MCU_data[blkn];
-
- /* Encoded data is simply the next bit of the two's-complement DC value */
- CHECK_BIT_BUFFER(br_state, 1, return FALSE);
- if (GET_BITS(1))
- (*block)[0] |= p1;
- /* Note: since we use |=, repeating the assignment later is safe */
- }
-
- /* Completed MCU, so update state */
- BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
-
- /* Account for restart interval (no-op if not using restarts) */
- entropy->restarts_to_go--;
-
- return TRUE;
-}
-
-
-/*
- * MCU decoding for AC successive approximation refinement scan.
- */
-
-METHODDEF(boolean)
-decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
-{
- phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
- int Se = cinfo->Se;
- int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */
- int m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */
- register int s, k, r;
- unsigned int EOBRUN;
- JBLOCKROW block;
- JCOEFPTR thiscoef;
- BITREAD_STATE_VARS;
- d_derived_tbl * tbl;
- int num_newnz;
- int newnz_pos[DCTSIZE2];
-
- /* Process restart marker if needed; may have to suspend */
- if (cinfo->restart_interval) {
- if (entropy->restarts_to_go == 0)
- if (! process_restart(cinfo))
- return FALSE;
- }
-
- /* If we've run out of data, don't modify the MCU.
- */
- if (! entropy->pub.insufficient_data) {
-
- /* Load up working state */
- BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
- EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */
-
- /* There is always only one block per MCU */
- block = MCU_data[0];
- tbl = entropy->ac_derived_tbl;
-
- /* If we are forced to suspend, we must undo the assignments to any newly
- * nonzero coefficients in the block, because otherwise we'd get confused
- * next time about which coefficients were already nonzero.
- * But we need not undo addition of bits to already-nonzero coefficients;
- * instead, we can test the current bit to see if we already did it.
- */
- num_newnz = 0;
-
- /* initialize coefficient loop counter to start of band */
- k = cinfo->Ss;
-
- if (EOBRUN == 0) {
- for (; k <= Se; k++) {
- HUFF_DECODE(s, br_state, tbl, goto undoit, label3);
- r = s >> 4;
- s &= 15;
- if (s) {
- if (s != 1) /* size of new coef should always be 1 */
- WARNMS(cinfo, JWRN_HUFF_BAD_CODE);
- CHECK_BIT_BUFFER(br_state, 1, goto undoit);
- if (GET_BITS(1))
- s = p1; /* newly nonzero coef is positive */
- else
- s = m1; /* newly nonzero coef is negative */
- } else {
- if (r != 15) {
- EOBRUN = 1 << r; /* EOBr, run length is 2^r + appended bits */
- if (r) {
- CHECK_BIT_BUFFER(br_state, r, goto undoit);
- r = GET_BITS(r);
- EOBRUN += r;
- }
- break; /* rest of block is handled by EOB logic */
- }
- /* note s = 0 for processing ZRL */
- }
- /* Advance over already-nonzero coefs and r still-zero coefs,
- * appending correction bits to the nonzeroes. A correction bit is 1
- * if the absolute value of the coefficient must be increased.
- */
- do {
- thiscoef = *block + jpeg_natural_order[k];
- if (*thiscoef != 0) {
- CHECK_BIT_BUFFER(br_state, 1, goto undoit);
- if (GET_BITS(1)) {
- if ((*thiscoef & p1) == 0) { /* do nothing if already set it */
- if (*thiscoef >= 0)
- *thiscoef += p1;
- else
- *thiscoef += m1;
- }
- }
- } else {
- if (--r < 0)
- break; /* reached target zero coefficient */
- }
- k++;
- } while (k <= Se);
- if (s) {
- int pos = jpeg_natural_order[k];
- /* Output newly nonzero coefficient */
- (*block)[pos] = (JCOEF) s;
- /* Remember its position in case we have to suspend */
- newnz_pos[num_newnz++] = pos;
- }
- }
- }
-
- if (EOBRUN > 0) {
- /* Scan any remaining coefficient positions after the end-of-band
- * (the last newly nonzero coefficient, if any). Append a correction
- * bit to each already-nonzero coefficient. A correction bit is 1
- * if the absolute value of the coefficient must be increased.
- */
- for (; k <= Se; k++) {
- thiscoef = *block + jpeg_natural_order[k];
- if (*thiscoef != 0) {
- CHECK_BIT_BUFFER(br_state, 1, goto undoit);
- if (GET_BITS(1)) {
- if ((*thiscoef & p1) == 0) { /* do nothing if already changed it */
- if (*thiscoef >= 0)
- *thiscoef += p1;
- else
- *thiscoef += m1;
- }
- }
- }
- }
- /* Count one block completed in EOB run */
- EOBRUN--;
- }
-
- /* Completed MCU, so update state */
- BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
- entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */
- }
-
- /* Account for restart interval (no-op if not using restarts) */
- entropy->restarts_to_go--;
-
- return TRUE;
-
-undoit:
- /* Re-zero any output coefficients that we made newly nonzero */
- while (num_newnz > 0)
- (*block)[newnz_pos[--num_newnz]] = 0;
-
- return FALSE;
-}
-
-
-/*
- * Module initialization routine for progressive Huffman entropy decoding.
- */
-
-GLOBAL(void)
-jinit_phuff_decoder (j_decompress_ptr cinfo)
-{
- phuff_entropy_ptr entropy;
- int *coef_bit_ptr;
- int ci, i;
-
- entropy = (phuff_entropy_ptr)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- SIZEOF(phuff_entropy_decoder));
- cinfo->entropy = (struct jpeg_entropy_decoder *) entropy;
- entropy->pub.start_pass = start_pass_phuff_decoder;
-
- /* Mark derived tables unallocated */
- for (i = 0; i < NUM_HUFF_TBLS; i++) {
- entropy->derived_tbls[i] = NULL;
- }
-
- /* Create progression status table */
- cinfo->coef_bits = (int (*)[DCTSIZE2])
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- cinfo->num_components*DCTSIZE2*SIZEOF(int));
- coef_bit_ptr = & cinfo->coef_bits[0][0];
- for (ci = 0; ci < cinfo->num_components; ci++)
- for (i = 0; i < DCTSIZE2; i++)
- *coef_bit_ptr++ = -1;
-}
-
-#endif /* D_PROGRESSIVE_SUPPORTED */
diff --git a/src/3rdparty/libjpeg/jdsample.c b/src/3rdparty/libjpeg/jdsample.c
index 80ffefb2a1..7bc8885b02 100644
--- a/src/3rdparty/libjpeg/jdsample.c
+++ b/src/3rdparty/libjpeg/jdsample.c
@@ -2,13 +2,14 @@
* jdsample.c
*
* Copyright (C) 1991-1996, Thomas G. Lane.
+ * Modified 2002-2008 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
* This file contains upsampling routines.
*
* Upsampling input data is counted in "row groups". A row group
- * is defined to be (v_samp_factor * DCT_scaled_size / min_DCT_scaled_size)
+ * is defined to be (v_samp_factor * DCT_v_scaled_size / min_DCT_v_scaled_size)
* sample rows of each component. Upsampling will normally produce
* max_v_samp_factor pixel rows from each row group (but this could vary
* if the upsampler is applying a scale factor of its own).
@@ -237,11 +238,11 @@ h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
register JSAMPROW inptr, outptr;
register JSAMPLE invalue;
JSAMPROW outend;
- int inrow;
+ int outrow;
- for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) {
- inptr = input_data[inrow];
- outptr = output_data[inrow];
+ for (outrow = 0; outrow < cinfo->max_v_samp_factor; outrow++) {
+ inptr = input_data[outrow];
+ outptr = output_data[outrow];
outend = outptr + cinfo->output_width;
while (outptr < outend) {
invalue = *inptr++; /* don't need GETJSAMPLE() here */
@@ -286,112 +287,6 @@ h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
/*
- * Fancy processing for the common case of 2:1 horizontal and 1:1 vertical.
- *
- * The upsampling algorithm is linear interpolation between pixel centers,
- * also known as a "triangle filter". This is a good compromise between
- * speed and visual quality. The centers of the output pixels are 1/4 and 3/4
- * of the way between input pixel centers.
- *
- * A note about the "bias" calculations: when rounding fractional values to
- * integer, we do not want to always round 0.5 up to the next integer.
- * If we did that, we'd introduce a noticeable bias towards larger values.
- * Instead, this code is arranged so that 0.5 will be rounded up or down at
- * alternate pixel locations (a simple ordered dither pattern).
- */
-
-METHODDEF(void)
-h2v1_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
-{
- JSAMPARRAY output_data = *output_data_ptr;
- register JSAMPROW inptr, outptr;
- register int invalue;
- register JDIMENSION colctr;
- int inrow;
-
- for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) {
- inptr = input_data[inrow];
- outptr = output_data[inrow];
- /* Special case for first column */
- invalue = GETJSAMPLE(*inptr++);
- *outptr++ = (JSAMPLE) invalue;
- *outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(*inptr) + 2) >> 2);
-
- for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) {
- /* General case: 3/4 * nearer pixel + 1/4 * further pixel */
- invalue = GETJSAMPLE(*inptr++) * 3;
- *outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(inptr[-2]) + 1) >> 2);
- *outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(*inptr) + 2) >> 2);
- }
-
- /* Special case for last column */
- invalue = GETJSAMPLE(*inptr);
- *outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(inptr[-1]) + 1) >> 2);
- *outptr++ = (JSAMPLE) invalue;
- }
-}
-
-
-/*
- * Fancy processing for the common case of 2:1 horizontal and 2:1 vertical.
- * Again a triangle filter; see comments for h2v1 case, above.
- *
- * It is OK for us to reference the adjacent input rows because we demanded
- * context from the main buffer controller (see initialization code).
- */
-
-METHODDEF(void)
-h2v2_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
-{
- JSAMPARRAY output_data = *output_data_ptr;
- register JSAMPROW inptr0, inptr1, outptr;
-#if BITS_IN_JSAMPLE == 8
- register int thiscolsum, lastcolsum, nextcolsum;
-#else
- register INT32 thiscolsum, lastcolsum, nextcolsum;
-#endif
- register JDIMENSION colctr;
- int inrow, outrow, v;
-
- inrow = outrow = 0;
- while (outrow < cinfo->max_v_samp_factor) {
- for (v = 0; v < 2; v++) {
- /* inptr0 points to nearest input row, inptr1 points to next nearest */
- inptr0 = input_data[inrow];
- if (v == 0) /* next nearest is row above */
- inptr1 = input_data[inrow-1];
- else /* next nearest is row below */
- inptr1 = input_data[inrow+1];
- outptr = output_data[outrow++];
-
- /* Special case for first column */
- thiscolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++);
- nextcolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++);
- *outptr++ = (JSAMPLE) ((thiscolsum * 4 + 8) >> 4);
- *outptr++ = (JSAMPLE) ((thiscolsum * 3 + nextcolsum + 7) >> 4);
- lastcolsum = thiscolsum; thiscolsum = nextcolsum;
-
- for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) {
- /* General case: 3/4 * nearer pixel + 1/4 * further pixel in each */
- /* dimension, thus 9/16, 3/16, 3/16, 1/16 overall */
- nextcolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++);
- *outptr++ = (JSAMPLE) ((thiscolsum * 3 + lastcolsum + 8) >> 4);
- *outptr++ = (JSAMPLE) ((thiscolsum * 3 + nextcolsum + 7) >> 4);
- lastcolsum = thiscolsum; thiscolsum = nextcolsum;
- }
-
- /* Special case for last column */
- *outptr++ = (JSAMPLE) ((thiscolsum * 3 + lastcolsum + 8) >> 4);
- *outptr++ = (JSAMPLE) ((thiscolsum * 4 + 7) >> 4);
- }
- inrow++;
- }
-}
-
-
-/*
* Module initialization routine for upsampling.
*/
@@ -401,7 +296,7 @@ jinit_upsampler (j_decompress_ptr cinfo)
my_upsample_ptr upsample;
int ci;
jpeg_component_info * compptr;
- boolean need_buffer, do_fancy;
+ boolean need_buffer;
int h_in_group, v_in_group, h_out_group, v_out_group;
upsample = (my_upsample_ptr)
@@ -415,11 +310,6 @@ jinit_upsampler (j_decompress_ptr cinfo)
if (cinfo->CCIR601_sampling) /* this isn't supported */
ERREXIT(cinfo, JERR_CCIR601_NOTIMPL);
- /* jdmainct.c doesn't support context rows when min_DCT_scaled_size = 1,
- * so don't ask for it.
- */
- do_fancy = cinfo->do_fancy_upsampling && cinfo->min_DCT_scaled_size > 1;
-
/* Verify we can handle the sampling factors, select per-component methods,
* and create storage as needed.
*/
@@ -428,10 +318,10 @@ jinit_upsampler (j_decompress_ptr cinfo)
/* Compute size of an "input group" after IDCT scaling. This many samples
* are to be converted to max_h_samp_factor * max_v_samp_factor pixels.
*/
- h_in_group = (compptr->h_samp_factor * compptr->DCT_scaled_size) /
- cinfo->min_DCT_scaled_size;
- v_in_group = (compptr->v_samp_factor * compptr->DCT_scaled_size) /
- cinfo->min_DCT_scaled_size;
+ h_in_group = (compptr->h_samp_factor * compptr->DCT_h_scaled_size) /
+ cinfo->min_DCT_h_scaled_size;
+ v_in_group = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) /
+ cinfo->min_DCT_v_scaled_size;
h_out_group = cinfo->max_h_samp_factor;
v_out_group = cinfo->max_v_samp_factor;
upsample->rowgroup_height[ci] = v_in_group; /* save for use later */
@@ -446,19 +336,12 @@ jinit_upsampler (j_decompress_ptr cinfo)
need_buffer = FALSE;
} else if (h_in_group * 2 == h_out_group &&
v_in_group == v_out_group) {
- /* Special cases for 2h1v upsampling */
- if (do_fancy && compptr->downsampled_width > 2)
- upsample->methods[ci] = h2v1_fancy_upsample;
- else
- upsample->methods[ci] = h2v1_upsample;
+ /* Special case for 2h1v upsampling */
+ upsample->methods[ci] = h2v1_upsample;
} else if (h_in_group * 2 == h_out_group &&
v_in_group * 2 == v_out_group) {
- /* Special cases for 2h2v upsampling */
- if (do_fancy && compptr->downsampled_width > 2) {
- upsample->methods[ci] = h2v2_fancy_upsample;
- upsample->pub.need_context_rows = TRUE;
- } else
- upsample->methods[ci] = h2v2_upsample;
+ /* Special case for 2h2v upsampling */
+ upsample->methods[ci] = h2v2_upsample;
} else if ((h_out_group % h_in_group) == 0 &&
(v_out_group % v_in_group) == 0) {
/* Generic integral-factors upsampling method */
diff --git a/src/3rdparty/libjpeg/jdtrans.c b/src/3rdparty/libjpeg/jdtrans.c
index 6c0ab715d3..22dd47fb5c 100644
--- a/src/3rdparty/libjpeg/jdtrans.c
+++ b/src/3rdparty/libjpeg/jdtrans.c
@@ -2,6 +2,7 @@
* jdtrans.c
*
* Copyright (C) 1995-1997, Thomas G. Lane.
+ * Modified 2000-2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -99,18 +100,14 @@ transdecode_master_selection (j_decompress_ptr cinfo)
/* This is effectively a buffered-image operation. */
cinfo->buffered_image = TRUE;
+ /* Compute output image dimensions and related values. */
+ jpeg_core_output_dimensions(cinfo);
+
/* Entropy decoding: either Huffman or arithmetic coding. */
- if (cinfo->arith_code) {
- ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
- } else {
- if (cinfo->progressive_mode) {
-#ifdef D_PROGRESSIVE_SUPPORTED
- jinit_phuff_decoder(cinfo);
-#else
- ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
- } else
- jinit_huff_decoder(cinfo);
+ if (cinfo->arith_code)
+ jinit_arith_decoder(cinfo);
+ else {
+ jinit_huff_decoder(cinfo);
}
/* Always get a full-image coefficient buffer. */
diff --git a/src/3rdparty/libjpeg/jerror.h b/src/3rdparty/libjpeg/jerror.h
index fc2fffeac2..1cfb2b19d8 100644
--- a/src/3rdparty/libjpeg/jerror.h
+++ b/src/3rdparty/libjpeg/jerror.h
@@ -2,6 +2,7 @@
* jerror.h
*
* Copyright (C) 1994-1997, Thomas G. Lane.
+ * Modified 1997-2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -39,14 +40,15 @@ typedef enum {
JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */
/* For maintenance convenience, list is alphabetical by message code name */
-JMESSAGE(JERR_ARITH_NOTIMPL,
- "Sorry, there are legal restrictions on arithmetic coding")
JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix")
JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix")
JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode")
JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS")
+JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request")
JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range")
-JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported")
+JMESSAGE(JERR_BAD_DCTSIZE, "DCT scaled block size %dx%d not supported")
+JMESSAGE(JERR_BAD_DROP_SAMPLING,
+ "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c")
JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition")
JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace")
JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace")
@@ -93,6 +95,7 @@ JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data")
JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change")
JMESSAGE(JERR_NOTIMPL, "Not implemented yet")
JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time")
+JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined")
JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported")
JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined")
JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image")
@@ -170,6 +173,7 @@ JMESSAGE(JTRC_UNKNOWN_IDS,
JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u")
JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u")
JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d")
+JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code")
JMESSAGE(JWRN_BOGUS_PROGRESSION,
"Inconsistent progression sequence for component %d coefficient %d")
JMESSAGE(JWRN_EXTRANEOUS_DATA,
@@ -227,6 +231,15 @@ JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines")
(cinfo)->err->msg_parm.i[2] = (p3), \
(cinfo)->err->msg_parm.i[3] = (p4), \
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
+#define ERREXIT6(cinfo,code,p1,p2,p3,p4,p5,p6) \
+ ((cinfo)->err->msg_code = (code), \
+ (cinfo)->err->msg_parm.i[0] = (p1), \
+ (cinfo)->err->msg_parm.i[1] = (p2), \
+ (cinfo)->err->msg_parm.i[2] = (p3), \
+ (cinfo)->err->msg_parm.i[3] = (p4), \
+ (cinfo)->err->msg_parm.i[4] = (p5), \
+ (cinfo)->err->msg_parm.i[5] = (p6), \
+ (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
#define ERREXITS(cinfo,code,str) \
((cinfo)->err->msg_code = (code), \
strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
diff --git a/src/3rdparty/libjpeg/jfdctflt.c b/src/3rdparty/libjpeg/jfdctflt.c
index 79d7a00787..74d0d862dc 100644
--- a/src/3rdparty/libjpeg/jfdctflt.c
+++ b/src/3rdparty/libjpeg/jfdctflt.c
@@ -2,6 +2,7 @@
* jfdctflt.c
*
* Copyright (C) 1994-1996, Thomas G. Lane.
+ * Modified 2003-2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -56,41 +57,46 @@
*/
GLOBAL(void)
-jpeg_fdct_float (FAST_FLOAT * data)
+jpeg_fdct_float (FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col)
{
FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
FAST_FLOAT tmp10, tmp11, tmp12, tmp13;
FAST_FLOAT z1, z2, z3, z4, z5, z11, z13;
FAST_FLOAT *dataptr;
+ JSAMPROW elemptr;
int ctr;
/* Pass 1: process rows. */
dataptr = data;
- for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
- tmp0 = dataptr[0] + dataptr[7];
- tmp7 = dataptr[0] - dataptr[7];
- tmp1 = dataptr[1] + dataptr[6];
- tmp6 = dataptr[1] - dataptr[6];
- tmp2 = dataptr[2] + dataptr[5];
- tmp5 = dataptr[2] - dataptr[5];
- tmp3 = dataptr[3] + dataptr[4];
- tmp4 = dataptr[3] - dataptr[4];
-
+ for (ctr = 0; ctr < DCTSIZE; ctr++) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Load data into workspace */
+ tmp0 = (FAST_FLOAT) (GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[7]));
+ tmp7 = (FAST_FLOAT) (GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[7]));
+ tmp1 = (FAST_FLOAT) (GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[6]));
+ tmp6 = (FAST_FLOAT) (GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[6]));
+ tmp2 = (FAST_FLOAT) (GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[5]));
+ tmp5 = (FAST_FLOAT) (GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[5]));
+ tmp3 = (FAST_FLOAT) (GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[4]));
+ tmp4 = (FAST_FLOAT) (GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[4]));
+
/* Even part */
-
+
tmp10 = tmp0 + tmp3; /* phase 2 */
tmp13 = tmp0 - tmp3;
tmp11 = tmp1 + tmp2;
tmp12 = tmp1 - tmp2;
-
- dataptr[0] = tmp10 + tmp11; /* phase 3 */
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = tmp10 + tmp11 - 8 * CENTERJSAMPLE; /* phase 3 */
dataptr[4] = tmp10 - tmp11;
-
+
z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */
dataptr[2] = tmp13 + z1; /* phase 5 */
dataptr[6] = tmp13 - z1;
-
+
/* Odd part */
tmp10 = tmp4 + tmp5; /* phase 2 */
@@ -126,21 +132,21 @@ jpeg_fdct_float (FAST_FLOAT * data)
tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];
tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];
tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];
-
+
/* Even part */
-
+
tmp10 = tmp0 + tmp3; /* phase 2 */
tmp13 = tmp0 - tmp3;
tmp11 = tmp1 + tmp2;
tmp12 = tmp1 - tmp2;
-
+
dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */
dataptr[DCTSIZE*4] = tmp10 - tmp11;
-
+
z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */
dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */
dataptr[DCTSIZE*6] = tmp13 - z1;
-
+
/* Odd part */
tmp10 = tmp4 + tmp5; /* phase 2 */
diff --git a/src/3rdparty/libjpeg/jfdctfst.c b/src/3rdparty/libjpeg/jfdctfst.c
index ccb378a3b4..8cad5f2293 100644
--- a/src/3rdparty/libjpeg/jfdctfst.c
+++ b/src/3rdparty/libjpeg/jfdctfst.c
@@ -2,6 +2,7 @@
* jfdctfst.c
*
* Copyright (C) 1994-1996, Thomas G. Lane.
+ * Modified 2003-2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -111,42 +112,47 @@
*/
GLOBAL(void)
-jpeg_fdct_ifast (DCTELEM * data)
+jpeg_fdct_ifast (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
{
DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
DCTELEM tmp10, tmp11, tmp12, tmp13;
DCTELEM z1, z2, z3, z4, z5, z11, z13;
DCTELEM *dataptr;
+ JSAMPROW elemptr;
int ctr;
SHIFT_TEMPS
/* Pass 1: process rows. */
dataptr = data;
- for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
- tmp0 = dataptr[0] + dataptr[7];
- tmp7 = dataptr[0] - dataptr[7];
- tmp1 = dataptr[1] + dataptr[6];
- tmp6 = dataptr[1] - dataptr[6];
- tmp2 = dataptr[2] + dataptr[5];
- tmp5 = dataptr[2] - dataptr[5];
- tmp3 = dataptr[3] + dataptr[4];
- tmp4 = dataptr[3] - dataptr[4];
-
+ for (ctr = 0; ctr < DCTSIZE; ctr++) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Load data into workspace */
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[7]);
+ tmp7 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[7]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[6]);
+ tmp6 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[6]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[5]);
+ tmp5 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[5]);
+ tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[4]);
+ tmp4 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[4]);
+
/* Even part */
-
+
tmp10 = tmp0 + tmp3; /* phase 2 */
tmp13 = tmp0 - tmp3;
tmp11 = tmp1 + tmp2;
tmp12 = tmp1 - tmp2;
-
- dataptr[0] = tmp10 + tmp11; /* phase 3 */
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = tmp10 + tmp11 - 8 * CENTERJSAMPLE; /* phase 3 */
dataptr[4] = tmp10 - tmp11;
-
+
z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */
dataptr[2] = tmp13 + z1; /* phase 5 */
dataptr[6] = tmp13 - z1;
-
+
/* Odd part */
tmp10 = tmp4 + tmp5; /* phase 2 */
@@ -182,21 +188,21 @@ jpeg_fdct_ifast (DCTELEM * data)
tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];
tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];
tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];
-
+
/* Even part */
-
+
tmp10 = tmp0 + tmp3; /* phase 2 */
tmp13 = tmp0 - tmp3;
tmp11 = tmp1 + tmp2;
tmp12 = tmp1 - tmp2;
-
+
dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */
dataptr[DCTSIZE*4] = tmp10 - tmp11;
-
+
z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */
dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */
dataptr[DCTSIZE*6] = tmp13 - z1;
-
+
/* Odd part */
tmp10 = tmp4 + tmp5; /* phase 2 */
diff --git a/src/3rdparty/libjpeg/jfdctint.c b/src/3rdparty/libjpeg/jfdctint.c
index 0a78b64aee..1dde58c499 100644
--- a/src/3rdparty/libjpeg/jfdctint.c
+++ b/src/3rdparty/libjpeg/jfdctint.c
@@ -2,6 +2,7 @@
* jfdctint.c
*
* Copyright (C) 1991-1996, Thomas G. Lane.
+ * Modification developed 2003-2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -21,6 +22,23 @@
* The advantage of this method is that no data path contains more than one
* multiplication; this allows a very simple and accurate implementation in
* scaled fixed-point arithmetic, with a minimal number of shifts.
+ *
+ * We also provide FDCT routines with various input sample block sizes for
+ * direct resolution reduction or enlargement and for direct resolving the
+ * common 2x1 and 1x2 subsampling cases without additional resampling: NxN
+ * (N=1...16), 2NxN, and Nx2N (N=1...8) pixels for one 8x8 output DCT block.
+ *
+ * For N<8 we fill the remaining block coefficients with zero.
+ * For N>8 we apply a partial N-point FDCT on the input samples, computing
+ * just the lower 8 frequency coefficients and discarding the rest.
+ *
+ * We must scale the output coefficients of the N-point FDCT appropriately
+ * to the standard 8-point FDCT level by 8/N per 1-D pass. This scaling
+ * is folded into the constant multipliers (pass 2) and/or final/initial
+ * shifting.
+ *
+ * CAUTION: We rely on the FIX() macro except for the N=1,2,4,8 cases
+ * since there would be too many additional constants to pre-calculate.
*/
#define JPEG_INTERNALS
@@ -36,7 +54,7 @@
*/
#if DCTSIZE != 8
- Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
+ Sorry, this code only copes with 8x8 DCT blocks. /* deliberate syntax err */
#endif
@@ -137,12 +155,13 @@
*/
GLOBAL(void)
-jpeg_fdct_islow (DCTELEM * data)
+jpeg_fdct_islow (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
{
- INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
+ INT32 tmp0, tmp1, tmp2, tmp3;
INT32 tmp10, tmp11, tmp12, tmp13;
- INT32 z1, z2, z3, z4, z5;
+ INT32 z1;
DCTELEM *dataptr;
+ JSAMPROW elemptr;
int ctr;
SHIFT_TEMPS
@@ -151,62 +170,74 @@ jpeg_fdct_islow (DCTELEM * data)
/* furthermore, we scale the results by 2**PASS1_BITS. */
dataptr = data;
- for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
- tmp0 = dataptr[0] + dataptr[7];
- tmp7 = dataptr[0] - dataptr[7];
- tmp1 = dataptr[1] + dataptr[6];
- tmp6 = dataptr[1] - dataptr[6];
- tmp2 = dataptr[2] + dataptr[5];
- tmp5 = dataptr[2] - dataptr[5];
- tmp3 = dataptr[3] + dataptr[4];
- tmp4 = dataptr[3] - dataptr[4];
-
+ for (ctr = 0; ctr < DCTSIZE; ctr++) {
+ elemptr = sample_data[ctr] + start_col;
+
/* Even part per LL&M figure 1 --- note that published figure is faulty;
* rotator "sqrt(2)*c1" should be "sqrt(2)*c6".
*/
-
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[7]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[6]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[5]);
+ tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[4]);
+
tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
+ tmp12 = tmp0 - tmp3;
tmp11 = tmp1 + tmp2;
- tmp12 = tmp1 - tmp2;
-
- dataptr[0] = (DCTELEM) ((tmp10 + tmp11) << PASS1_BITS);
+ tmp13 = tmp1 - tmp2;
+
+ tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[7]);
+ tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[6]);
+ tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[5]);
+ tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[4]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM) ((tmp10 + tmp11 - 8 * CENTERJSAMPLE) << PASS1_BITS);
dataptr[4] = (DCTELEM) ((tmp10 - tmp11) << PASS1_BITS);
-
+
z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100);
- dataptr[2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865),
- CONST_BITS-PASS1_BITS);
- dataptr[6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065),
- CONST_BITS-PASS1_BITS);
-
+ /* Add fudge factor here for final descale. */
+ z1 += ONE << (CONST_BITS-PASS1_BITS-1);
+ dataptr[2] = (DCTELEM) RIGHT_SHIFT(z1 + MULTIPLY(tmp12, FIX_0_765366865),
+ CONST_BITS-PASS1_BITS);
+ dataptr[6] = (DCTELEM) RIGHT_SHIFT(z1 - MULTIPLY(tmp13, FIX_1_847759065),
+ CONST_BITS-PASS1_BITS);
+
/* Odd part per figure 8 --- note paper omits factor of sqrt(2).
- * cK represents cos(K*pi/16).
- * i0..i3 in the paper are tmp4..tmp7 here.
+ * cK represents sqrt(2) * cos(K*pi/16).
+ * i0..i3 in the paper are tmp0..tmp3 here.
*/
-
- z1 = tmp4 + tmp7;
- z2 = tmp5 + tmp6;
- z3 = tmp4 + tmp6;
- z4 = tmp5 + tmp7;
- z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */
-
- tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
- tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
- tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
- tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
- z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
- z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
- z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
- z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
-
- z3 += z5;
- z4 += z5;
-
- dataptr[7] = (DCTELEM) DESCALE(tmp4 + z1 + z3, CONST_BITS-PASS1_BITS);
- dataptr[5] = (DCTELEM) DESCALE(tmp5 + z2 + z4, CONST_BITS-PASS1_BITS);
- dataptr[3] = (DCTELEM) DESCALE(tmp6 + z2 + z3, CONST_BITS-PASS1_BITS);
- dataptr[1] = (DCTELEM) DESCALE(tmp7 + z1 + z4, CONST_BITS-PASS1_BITS);
-
+
+ tmp10 = tmp0 + tmp3;
+ tmp11 = tmp1 + tmp2;
+ tmp12 = tmp0 + tmp2;
+ tmp13 = tmp1 + tmp3;
+ z1 = MULTIPLY(tmp12 + tmp13, FIX_1_175875602); /* c3 */
+ /* Add fudge factor here for final descale. */
+ z1 += ONE << (CONST_BITS-PASS1_BITS-1);
+
+ tmp0 = MULTIPLY(tmp0, FIX_1_501321110); /* c1+c3-c5-c7 */
+ tmp1 = MULTIPLY(tmp1, FIX_3_072711026); /* c1+c3+c5-c7 */
+ tmp2 = MULTIPLY(tmp2, FIX_2_053119869); /* c1+c3-c5+c7 */
+ tmp3 = MULTIPLY(tmp3, FIX_0_298631336); /* -c1+c3+c5-c7 */
+ tmp10 = MULTIPLY(tmp10, - FIX_0_899976223); /* c7-c3 */
+ tmp11 = MULTIPLY(tmp11, - FIX_2_562915447); /* -c1-c3 */
+ tmp12 = MULTIPLY(tmp12, - FIX_0_390180644); /* c5-c3 */
+ tmp13 = MULTIPLY(tmp13, - FIX_1_961570560); /* -c3-c5 */
+
+ tmp12 += z1;
+ tmp13 += z1;
+
+ dataptr[1] = (DCTELEM)
+ RIGHT_SHIFT(tmp0 + tmp10 + tmp12, CONST_BITS-PASS1_BITS);
+ dataptr[3] = (DCTELEM)
+ RIGHT_SHIFT(tmp1 + tmp11 + tmp13, CONST_BITS-PASS1_BITS);
+ dataptr[5] = (DCTELEM)
+ RIGHT_SHIFT(tmp2 + tmp11 + tmp12, CONST_BITS-PASS1_BITS);
+ dataptr[7] = (DCTELEM)
+ RIGHT_SHIFT(tmp3 + tmp10 + tmp13, CONST_BITS-PASS1_BITS);
+
dataptr += DCTSIZE; /* advance pointer to next row */
}
@@ -217,67 +248,4101 @@ jpeg_fdct_islow (DCTELEM * data)
dataptr = data;
for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+ /* Even part per LL&M figure 1 --- note that published figure is faulty;
+ * rotator "sqrt(2)*c1" should be "sqrt(2)*c6".
+ */
+
tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7];
- tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7];
tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6];
- tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6];
tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5];
- tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];
tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];
- tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];
-
+
+ /* Add fudge factor here for final descale. */
+ tmp10 = tmp0 + tmp3 + (ONE << (PASS1_BITS-1));
+ tmp12 = tmp0 - tmp3;
+ tmp11 = tmp1 + tmp2;
+ tmp13 = tmp1 - tmp2;
+
+ tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7];
+ tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6];
+ tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];
+ tmp3 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];
+
+ dataptr[DCTSIZE*0] = (DCTELEM) RIGHT_SHIFT(tmp10 + tmp11, PASS1_BITS);
+ dataptr[DCTSIZE*4] = (DCTELEM) RIGHT_SHIFT(tmp10 - tmp11, PASS1_BITS);
+
+ z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100);
+ /* Add fudge factor here for final descale. */
+ z1 += ONE << (CONST_BITS+PASS1_BITS-1);
+ dataptr[DCTSIZE*2] = (DCTELEM)
+ RIGHT_SHIFT(z1 + MULTIPLY(tmp12, FIX_0_765366865), CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*6] = (DCTELEM)
+ RIGHT_SHIFT(z1 - MULTIPLY(tmp13, FIX_1_847759065), CONST_BITS+PASS1_BITS);
+
+ /* Odd part per figure 8 --- note paper omits factor of sqrt(2).
+ * cK represents sqrt(2) * cos(K*pi/16).
+ * i0..i3 in the paper are tmp0..tmp3 here.
+ */
+
+ tmp10 = tmp0 + tmp3;
+ tmp11 = tmp1 + tmp2;
+ tmp12 = tmp0 + tmp2;
+ tmp13 = tmp1 + tmp3;
+ z1 = MULTIPLY(tmp12 + tmp13, FIX_1_175875602); /* c3 */
+ /* Add fudge factor here for final descale. */
+ z1 += ONE << (CONST_BITS+PASS1_BITS-1);
+
+ tmp0 = MULTIPLY(tmp0, FIX_1_501321110); /* c1+c3-c5-c7 */
+ tmp1 = MULTIPLY(tmp1, FIX_3_072711026); /* c1+c3+c5-c7 */
+ tmp2 = MULTIPLY(tmp2, FIX_2_053119869); /* c1+c3-c5+c7 */
+ tmp3 = MULTIPLY(tmp3, FIX_0_298631336); /* -c1+c3+c5-c7 */
+ tmp10 = MULTIPLY(tmp10, - FIX_0_899976223); /* c7-c3 */
+ tmp11 = MULTIPLY(tmp11, - FIX_2_562915447); /* -c1-c3 */
+ tmp12 = MULTIPLY(tmp12, - FIX_0_390180644); /* c5-c3 */
+ tmp13 = MULTIPLY(tmp13, - FIX_1_961570560); /* -c3-c5 */
+
+ tmp12 += z1;
+ tmp13 += z1;
+
+ dataptr[DCTSIZE*1] = (DCTELEM)
+ RIGHT_SHIFT(tmp0 + tmp10 + tmp12, CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*3] = (DCTELEM)
+ RIGHT_SHIFT(tmp1 + tmp11 + tmp13, CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*5] = (DCTELEM)
+ RIGHT_SHIFT(tmp2 + tmp11 + tmp12, CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*7] = (DCTELEM)
+ RIGHT_SHIFT(tmp3 + tmp10 + tmp13, CONST_BITS+PASS1_BITS);
+
+ dataptr++; /* advance pointer to next column */
+ }
+}
+
+#ifdef DCT_SCALING_SUPPORTED
+
+
+/*
+ * Perform the forward DCT on a 7x7 sample block.
+ */
+
+GLOBAL(void)
+jpeg_fdct_7x7 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3;
+ INT32 tmp10, tmp11, tmp12;
+ INT32 z1, z2, z3;
+ DCTELEM *dataptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pre-zero output coefficient block. */
+ MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2);
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+ /* cK represents sqrt(2) * cos(K*pi/14). */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 7; ctr++) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[6]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[5]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[4]);
+ tmp3 = GETJSAMPLE(elemptr[3]);
+
+ tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[6]);
+ tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[5]);
+ tmp12 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[4]);
+
+ z1 = tmp0 + tmp2;
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((z1 + tmp1 + tmp3 - 7 * CENTERJSAMPLE) << PASS1_BITS);
+ tmp3 += tmp3;
+ z1 -= tmp3;
+ z1 -= tmp3;
+ z1 = MULTIPLY(z1, FIX(0.353553391)); /* (c2+c6-c4)/2 */
+ z2 = MULTIPLY(tmp0 - tmp2, FIX(0.920609002)); /* (c2+c4-c6)/2 */
+ z3 = MULTIPLY(tmp1 - tmp2, FIX(0.314692123)); /* c6 */
+ dataptr[2] = (DCTELEM) DESCALE(z1 + z2 + z3, CONST_BITS-PASS1_BITS);
+ z1 -= z2;
+ z2 = MULTIPLY(tmp0 - tmp1, FIX(0.881747734)); /* c4 */
+ dataptr[4] = (DCTELEM)
+ DESCALE(z2 + z3 - MULTIPLY(tmp1 - tmp3, FIX(0.707106781)), /* c2+c6-c4 */
+ CONST_BITS-PASS1_BITS);
+ dataptr[6] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS-PASS1_BITS);
+
+ /* Odd part */
+
+ tmp1 = MULTIPLY(tmp10 + tmp11, FIX(0.935414347)); /* (c3+c1-c5)/2 */
+ tmp2 = MULTIPLY(tmp10 - tmp11, FIX(0.170262339)); /* (c3+c5-c1)/2 */
+ tmp0 = tmp1 - tmp2;
+ tmp1 += tmp2;
+ tmp2 = MULTIPLY(tmp11 + tmp12, - FIX(1.378756276)); /* -c1 */
+ tmp1 += tmp2;
+ tmp3 = MULTIPLY(tmp10 + tmp12, FIX(0.613604268)); /* c5 */
+ tmp0 += tmp3;
+ tmp2 += tmp3 + MULTIPLY(tmp12, FIX(1.870828693)); /* c3+c1-c5 */
+
+ dataptr[1] = (DCTELEM) DESCALE(tmp0, CONST_BITS-PASS1_BITS);
+ dataptr[3] = (DCTELEM) DESCALE(tmp1, CONST_BITS-PASS1_BITS);
+ dataptr[5] = (DCTELEM) DESCALE(tmp2, CONST_BITS-PASS1_BITS);
+
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ * We must also scale the output by (8/7)**2 = 64/49, which we fold
+ * into the constant multipliers:
+ * cK now represents sqrt(2) * cos(K*pi/14) * 64/49.
+ */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 7; ctr++) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*6];
+ tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*5];
+ tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*4];
+ tmp3 = dataptr[DCTSIZE*3];
+
+ tmp10 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*6];
+ tmp11 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*5];
+ tmp12 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*4];
+
+ z1 = tmp0 + tmp2;
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(z1 + tmp1 + tmp3, FIX(1.306122449)), /* 64/49 */
+ CONST_BITS+PASS1_BITS);
+ tmp3 += tmp3;
+ z1 -= tmp3;
+ z1 -= tmp3;
+ z1 = MULTIPLY(z1, FIX(0.461784020)); /* (c2+c6-c4)/2 */
+ z2 = MULTIPLY(tmp0 - tmp2, FIX(1.202428084)); /* (c2+c4-c6)/2 */
+ z3 = MULTIPLY(tmp1 - tmp2, FIX(0.411026446)); /* c6 */
+ dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + z2 + z3, CONST_BITS+PASS1_BITS);
+ z1 -= z2;
+ z2 = MULTIPLY(tmp0 - tmp1, FIX(1.151670509)); /* c4 */
+ dataptr[DCTSIZE*4] = (DCTELEM)
+ DESCALE(z2 + z3 - MULTIPLY(tmp1 - tmp3, FIX(0.923568041)), /* c2+c6-c4 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS+PASS1_BITS);
+
+ /* Odd part */
+
+ tmp1 = MULTIPLY(tmp10 + tmp11, FIX(1.221765677)); /* (c3+c1-c5)/2 */
+ tmp2 = MULTIPLY(tmp10 - tmp11, FIX(0.222383464)); /* (c3+c5-c1)/2 */
+ tmp0 = tmp1 - tmp2;
+ tmp1 += tmp2;
+ tmp2 = MULTIPLY(tmp11 + tmp12, - FIX(1.800824523)); /* -c1 */
+ tmp1 += tmp2;
+ tmp3 = MULTIPLY(tmp10 + tmp12, FIX(0.801442310)); /* c5 */
+ tmp0 += tmp3;
+ tmp2 += tmp3 + MULTIPLY(tmp12, FIX(2.443531355)); /* c3+c1-c5 */
+
+ dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp0, CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp1, CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp2, CONST_BITS+PASS1_BITS);
+
+ dataptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 6x6 sample block.
+ */
+
+GLOBAL(void)
+jpeg_fdct_6x6 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2;
+ INT32 tmp10, tmp11, tmp12;
+ DCTELEM *dataptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pre-zero output coefficient block. */
+ MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2);
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+ /* cK represents sqrt(2) * cos(K*pi/12). */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 6; ctr++) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[5]);
+ tmp11 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[4]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[3]);
+
+ tmp10 = tmp0 + tmp2;
+ tmp12 = tmp0 - tmp2;
+
+ tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[5]);
+ tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[4]);
+ tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[3]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((tmp10 + tmp11 - 6 * CENTERJSAMPLE) << PASS1_BITS);
+ dataptr[2] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp12, FIX(1.224744871)), /* c2 */
+ CONST_BITS-PASS1_BITS);
+ dataptr[4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp11 - tmp11, FIX(0.707106781)), /* c4 */
+ CONST_BITS-PASS1_BITS);
+
+ /* Odd part */
+
+ tmp10 = DESCALE(MULTIPLY(tmp0 + tmp2, FIX(0.366025404)), /* c5 */
+ CONST_BITS-PASS1_BITS);
+
+ dataptr[1] = (DCTELEM) (tmp10 + ((tmp0 + tmp1) << PASS1_BITS));
+ dataptr[3] = (DCTELEM) ((tmp0 - tmp1 - tmp2) << PASS1_BITS);
+ dataptr[5] = (DCTELEM) (tmp10 + ((tmp2 - tmp1) << PASS1_BITS));
+
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ * We must also scale the output by (8/6)**2 = 16/9, which we fold
+ * into the constant multipliers:
+ * cK now represents sqrt(2) * cos(K*pi/12) * 16/9.
+ */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 6; ctr++) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*5];
+ tmp11 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*4];
+ tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*3];
+
+ tmp10 = tmp0 + tmp2;
+ tmp12 = tmp0 - tmp2;
+
+ tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*5];
+ tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*4];
+ tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*3];
+
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 + tmp11, FIX(1.777777778)), /* 16/9 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*2] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp12, FIX(2.177324216)), /* c2 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp11 - tmp11, FIX(1.257078722)), /* c4 */
+ CONST_BITS+PASS1_BITS);
+
+ /* Odd part */
+
+ tmp10 = MULTIPLY(tmp0 + tmp2, FIX(0.650711829)); /* c5 */
+
+ dataptr[DCTSIZE*1] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp0 + tmp1, FIX(1.777777778)), /* 16/9 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*3] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0 - tmp1 - tmp2, FIX(1.777777778)), /* 16/9 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*5] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp2 - tmp1, FIX(1.777777778)), /* 16/9 */
+ CONST_BITS+PASS1_BITS);
+
+ dataptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 5x5 sample block.
+ */
+
+GLOBAL(void)
+jpeg_fdct_5x5 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2;
+ INT32 tmp10, tmp11;
+ DCTELEM *dataptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pre-zero output coefficient block. */
+ MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2);
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+ /* We scale the results further by 2 as part of output adaption */
+ /* scaling for different DCT size. */
+ /* cK represents sqrt(2) * cos(K*pi/10). */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 5; ctr++) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[4]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[3]);
+ tmp2 = GETJSAMPLE(elemptr[2]);
+
+ tmp10 = tmp0 + tmp1;
+ tmp11 = tmp0 - tmp1;
+
+ tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[4]);
+ tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[3]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((tmp10 + tmp2 - 5 * CENTERJSAMPLE) << (PASS1_BITS+1));
+ tmp11 = MULTIPLY(tmp11, FIX(0.790569415)); /* (c2+c4)/2 */
+ tmp10 -= tmp2 << 2;
+ tmp10 = MULTIPLY(tmp10, FIX(0.353553391)); /* (c2-c4)/2 */
+ dataptr[2] = (DCTELEM) DESCALE(tmp11 + tmp10, CONST_BITS-PASS1_BITS-1);
+ dataptr[4] = (DCTELEM) DESCALE(tmp11 - tmp10, CONST_BITS-PASS1_BITS-1);
+
+ /* Odd part */
+
+ tmp10 = MULTIPLY(tmp0 + tmp1, FIX(0.831253876)); /* c3 */
+
+ dataptr[1] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp0, FIX(0.513743148)), /* c1-c3 */
+ CONST_BITS-PASS1_BITS-1);
+ dataptr[3] = (DCTELEM)
+ DESCALE(tmp10 - MULTIPLY(tmp1, FIX(2.176250899)), /* c1+c3 */
+ CONST_BITS-PASS1_BITS-1);
+
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ * We must also scale the output by (8/5)**2 = 64/25, which we partially
+ * fold into the constant multipliers (other part was done in pass 1):
+ * cK now represents sqrt(2) * cos(K*pi/10) * 32/25.
+ */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 5; ctr++) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*4];
+ tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*3];
+ tmp2 = dataptr[DCTSIZE*2];
+
+ tmp10 = tmp0 + tmp1;
+ tmp11 = tmp0 - tmp1;
+
+ tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*4];
+ tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*3];
+
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 + tmp2, FIX(1.28)), /* 32/25 */
+ CONST_BITS+PASS1_BITS);
+ tmp11 = MULTIPLY(tmp11, FIX(1.011928851)); /* (c2+c4)/2 */
+ tmp10 -= tmp2 << 2;
+ tmp10 = MULTIPLY(tmp10, FIX(0.452548340)); /* (c2-c4)/2 */
+ dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(tmp11 + tmp10, CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp11 - tmp10, CONST_BITS+PASS1_BITS);
+
+ /* Odd part */
+
+ tmp10 = MULTIPLY(tmp0 + tmp1, FIX(1.064004961)); /* c3 */
+
+ dataptr[DCTSIZE*1] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp0, FIX(0.657591230)), /* c1-c3 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*3] = (DCTELEM)
+ DESCALE(tmp10 - MULTIPLY(tmp1, FIX(2.785601151)), /* c1+c3 */
+ CONST_BITS+PASS1_BITS);
+
+ dataptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 4x4 sample block.
+ */
+
+GLOBAL(void)
+jpeg_fdct_4x4 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1;
+ INT32 tmp10, tmp11;
+ DCTELEM *dataptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pre-zero output coefficient block. */
+ MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2);
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+ /* We must also scale the output by (8/4)**2 = 2**2, which we add here. */
+ /* cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point FDCT]. */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 4; ctr++) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[3]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[2]);
+
+ tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[3]);
+ tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[2]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((tmp0 + tmp1 - 4 * CENTERJSAMPLE) << (PASS1_BITS+2));
+ dataptr[2] = (DCTELEM) ((tmp0 - tmp1) << (PASS1_BITS+2));
+
+ /* Odd part */
+
+ tmp0 = MULTIPLY(tmp10 + tmp11, FIX_0_541196100); /* c6 */
+ /* Add fudge factor here for final descale. */
+ tmp0 += ONE << (CONST_BITS-PASS1_BITS-3);
+
+ dataptr[1] = (DCTELEM)
+ RIGHT_SHIFT(tmp0 + MULTIPLY(tmp10, FIX_0_765366865), /* c2-c6 */
+ CONST_BITS-PASS1_BITS-2);
+ dataptr[3] = (DCTELEM)
+ RIGHT_SHIFT(tmp0 - MULTIPLY(tmp11, FIX_1_847759065), /* c2+c6 */
+ CONST_BITS-PASS1_BITS-2);
+
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 4; ctr++) {
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*3] + (ONE << (PASS1_BITS-1));
+ tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*2];
+
+ tmp10 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*3];
+ tmp11 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*2];
+
+ dataptr[DCTSIZE*0] = (DCTELEM) RIGHT_SHIFT(tmp0 + tmp1, PASS1_BITS);
+ dataptr[DCTSIZE*2] = (DCTELEM) RIGHT_SHIFT(tmp0 - tmp1, PASS1_BITS);
+
+ /* Odd part */
+
+ tmp0 = MULTIPLY(tmp10 + tmp11, FIX_0_541196100); /* c6 */
+ /* Add fudge factor here for final descale. */
+ tmp0 += ONE << (CONST_BITS+PASS1_BITS-1);
+
+ dataptr[DCTSIZE*1] = (DCTELEM)
+ RIGHT_SHIFT(tmp0 + MULTIPLY(tmp10, FIX_0_765366865), /* c2-c6 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*3] = (DCTELEM)
+ RIGHT_SHIFT(tmp0 - MULTIPLY(tmp11, FIX_1_847759065), /* c2+c6 */
+ CONST_BITS+PASS1_BITS);
+
+ dataptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 3x3 sample block.
+ */
+
+GLOBAL(void)
+jpeg_fdct_3x3 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2;
+ DCTELEM *dataptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pre-zero output coefficient block. */
+ MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2);
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+ /* We scale the results further by 2**2 as part of output adaption */
+ /* scaling for different DCT size. */
+ /* cK represents sqrt(2) * cos(K*pi/6). */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 3; ctr++) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[2]);
+ tmp1 = GETJSAMPLE(elemptr[1]);
+
+ tmp2 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[2]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((tmp0 + tmp1 - 3 * CENTERJSAMPLE) << (PASS1_BITS+2));
+ dataptr[2] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0 - tmp1 - tmp1, FIX(0.707106781)), /* c2 */
+ CONST_BITS-PASS1_BITS-2);
+
+ /* Odd part */
+
+ dataptr[1] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp2, FIX(1.224744871)), /* c1 */
+ CONST_BITS-PASS1_BITS-2);
+
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ * We must also scale the output by (8/3)**2 = 64/9, which we partially
+ * fold into the constant multipliers (other part was done in pass 1):
+ * cK now represents sqrt(2) * cos(K*pi/6) * 16/9.
+ */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 3; ctr++) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*2];
+ tmp1 = dataptr[DCTSIZE*1];
+
+ tmp2 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*2];
+
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0 + tmp1, FIX(1.777777778)), /* 16/9 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*2] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0 - tmp1 - tmp1, FIX(1.257078722)), /* c2 */
+ CONST_BITS+PASS1_BITS);
+
+ /* Odd part */
+
+ dataptr[DCTSIZE*1] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp2, FIX(2.177324216)), /* c1 */
+ CONST_BITS+PASS1_BITS);
+
+ dataptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 2x2 sample block.
+ */
+
+GLOBAL(void)
+jpeg_fdct_2x2 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3;
+ JSAMPROW elemptr;
+
+ /* Pre-zero output coefficient block. */
+ MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2);
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT. */
+
+ /* Row 0 */
+ elemptr = sample_data[0] + start_col;
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[1]);
+ tmp1 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[1]);
+
+ /* Row 1 */
+ elemptr = sample_data[1] + start_col;
+
+ tmp2 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[1]);
+ tmp3 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[1]);
+
+ /* Pass 2: process columns.
+ * We leave the results scaled up by an overall factor of 8.
+ * We must also scale the output by (8/2)**2 = 2**4.
+ */
+
+ /* Column 0 */
+ /* Apply unsigned->signed conversion */
+ data[DCTSIZE*0] = (DCTELEM) ((tmp0 + tmp2 - 4 * CENTERJSAMPLE) << 4);
+ data[DCTSIZE*1] = (DCTELEM) ((tmp0 - tmp2) << 4);
+
+ /* Column 1 */
+ data[DCTSIZE*0+1] = (DCTELEM) ((tmp1 + tmp3) << 4);
+ data[DCTSIZE*1+1] = (DCTELEM) ((tmp1 - tmp3) << 4);
+}
+
+
+/*
+ * Perform the forward DCT on a 1x1 sample block.
+ */
+
+GLOBAL(void)
+jpeg_fdct_1x1 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ /* Pre-zero output coefficient block. */
+ MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2);
+
+ /* We leave the result scaled up by an overall factor of 8. */
+ /* We must also scale the output by (8/1)**2 = 2**6. */
+ /* Apply unsigned->signed conversion */
+ data[0] = (DCTELEM)
+ ((GETJSAMPLE(sample_data[0][start_col]) - CENTERJSAMPLE) << 6);
+}
+
+
+/*
+ * Perform the forward DCT on a 9x9 sample block.
+ */
+
+GLOBAL(void)
+jpeg_fdct_9x9 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp4;
+ INT32 tmp10, tmp11, tmp12, tmp13;
+ INT32 z1, z2;
+ DCTELEM workspace[8];
+ DCTELEM *dataptr;
+ DCTELEM *wsptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* we scale the results further by 2 as part of output adaption */
+ /* scaling for different DCT size. */
+ /* cK represents sqrt(2) * cos(K*pi/18). */
+
+ dataptr = data;
+ ctr = 0;
+ for (;;) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[8]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[7]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[6]);
+ tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[5]);
+ tmp4 = GETJSAMPLE(elemptr[4]);
+
+ tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[8]);
+ tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[7]);
+ tmp12 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[6]);
+ tmp13 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[5]);
+
+ z1 = tmp0 + tmp2 + tmp3;
+ z2 = tmp1 + tmp4;
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM) ((z1 + z2 - 9 * CENTERJSAMPLE) << 1);
+ dataptr[6] = (DCTELEM)
+ DESCALE(MULTIPLY(z1 - z2 - z2, FIX(0.707106781)), /* c6 */
+ CONST_BITS-1);
+ z1 = MULTIPLY(tmp0 - tmp2, FIX(1.328926049)); /* c2 */
+ z2 = MULTIPLY(tmp1 - tmp4 - tmp4, FIX(0.707106781)); /* c6 */
+ dataptr[2] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp2 - tmp3, FIX(1.083350441)) /* c4 */
+ + z1 + z2, CONST_BITS-1);
+ dataptr[4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp3 - tmp0, FIX(0.245575608)) /* c8 */
+ + z1 - z2, CONST_BITS-1);
+
+ /* Odd part */
+
+ dataptr[3] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp12 - tmp13, FIX(1.224744871)), /* c3 */
+ CONST_BITS-1);
+
+ tmp11 = MULTIPLY(tmp11, FIX(1.224744871)); /* c3 */
+ tmp0 = MULTIPLY(tmp10 + tmp12, FIX(0.909038955)); /* c5 */
+ tmp1 = MULTIPLY(tmp10 + tmp13, FIX(0.483689525)); /* c7 */
+
+ dataptr[1] = (DCTELEM) DESCALE(tmp11 + tmp0 + tmp1, CONST_BITS-1);
+
+ tmp2 = MULTIPLY(tmp12 - tmp13, FIX(1.392728481)); /* c1 */
+
+ dataptr[5] = (DCTELEM) DESCALE(tmp0 - tmp11 - tmp2, CONST_BITS-1);
+ dataptr[7] = (DCTELEM) DESCALE(tmp1 - tmp11 + tmp2, CONST_BITS-1);
+
+ ctr++;
+
+ if (ctr != DCTSIZE) {
+ if (ctr == 9)
+ break; /* Done. */
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ } else
+ dataptr = workspace; /* switch pointer to extended workspace */
+ }
+
+ /* Pass 2: process columns.
+ * We leave the results scaled up by an overall factor of 8.
+ * We must also scale the output by (8/9)**2 = 64/81, which we partially
+ * fold into the constant multipliers and final/initial shifting:
+ * cK now represents sqrt(2) * cos(K*pi/18) * 128/81.
+ */
+
+ dataptr = data;
+ wsptr = workspace;
+ for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*0];
+ tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*7];
+ tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*6];
+ tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*5];
+ tmp4 = dataptr[DCTSIZE*4];
+
+ tmp10 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*0];
+ tmp11 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*7];
+ tmp12 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*6];
+ tmp13 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*5];
+
+ z1 = tmp0 + tmp2 + tmp3;
+ z2 = tmp1 + tmp4;
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(z1 + z2, FIX(1.580246914)), /* 128/81 */
+ CONST_BITS+2);
+ dataptr[DCTSIZE*6] = (DCTELEM)
+ DESCALE(MULTIPLY(z1 - z2 - z2, FIX(1.117403309)), /* c6 */
+ CONST_BITS+2);
+ z1 = MULTIPLY(tmp0 - tmp2, FIX(2.100031287)); /* c2 */
+ z2 = MULTIPLY(tmp1 - tmp4 - tmp4, FIX(1.117403309)); /* c6 */
+ dataptr[DCTSIZE*2] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp2 - tmp3, FIX(1.711961190)) /* c4 */
+ + z1 + z2, CONST_BITS+2);
+ dataptr[DCTSIZE*4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp3 - tmp0, FIX(0.388070096)) /* c8 */
+ + z1 - z2, CONST_BITS+2);
+
+ /* Odd part */
+
+ dataptr[DCTSIZE*3] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp12 - tmp13, FIX(1.935399303)), /* c3 */
+ CONST_BITS+2);
+
+ tmp11 = MULTIPLY(tmp11, FIX(1.935399303)); /* c3 */
+ tmp0 = MULTIPLY(tmp10 + tmp12, FIX(1.436506004)); /* c5 */
+ tmp1 = MULTIPLY(tmp10 + tmp13, FIX(0.764348879)); /* c7 */
+
+ dataptr[DCTSIZE*1] = (DCTELEM)
+ DESCALE(tmp11 + tmp0 + tmp1, CONST_BITS+2);
+
+ tmp2 = MULTIPLY(tmp12 - tmp13, FIX(2.200854883)); /* c1 */
+
+ dataptr[DCTSIZE*5] = (DCTELEM)
+ DESCALE(tmp0 - tmp11 - tmp2, CONST_BITS+2);
+ dataptr[DCTSIZE*7] = (DCTELEM)
+ DESCALE(tmp1 - tmp11 + tmp2, CONST_BITS+2);
+
+ dataptr++; /* advance pointer to next column */
+ wsptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 10x10 sample block.
+ */
+
+GLOBAL(void)
+jpeg_fdct_10x10 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp4;
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14;
+ DCTELEM workspace[8*2];
+ DCTELEM *dataptr;
+ DCTELEM *wsptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* we scale the results further by 2 as part of output adaption */
+ /* scaling for different DCT size. */
+ /* cK represents sqrt(2) * cos(K*pi/20). */
+
+ dataptr = data;
+ ctr = 0;
+ for (;;) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[9]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[8]);
+ tmp12 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[7]);
+ tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[6]);
+ tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[5]);
+
+ tmp10 = tmp0 + tmp4;
+ tmp13 = tmp0 - tmp4;
+ tmp11 = tmp1 + tmp3;
+ tmp14 = tmp1 - tmp3;
+
+ tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[9]);
+ tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[8]);
+ tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[7]);
+ tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[6]);
+ tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[5]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((tmp10 + tmp11 + tmp12 - 10 * CENTERJSAMPLE) << 1);
+ tmp12 += tmp12;
+ dataptr[4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.144122806)) - /* c4 */
+ MULTIPLY(tmp11 - tmp12, FIX(0.437016024)), /* c8 */
+ CONST_BITS-1);
+ tmp10 = MULTIPLY(tmp13 + tmp14, FIX(0.831253876)); /* c6 */
+ dataptr[2] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp13, FIX(0.513743148)), /* c2-c6 */
+ CONST_BITS-1);
+ dataptr[6] = (DCTELEM)
+ DESCALE(tmp10 - MULTIPLY(tmp14, FIX(2.176250899)), /* c2+c6 */
+ CONST_BITS-1);
+
+ /* Odd part */
+
+ tmp10 = tmp0 + tmp4;
+ tmp11 = tmp1 - tmp3;
+ dataptr[5] = (DCTELEM) ((tmp10 - tmp11 - tmp2) << 1);
+ tmp2 <<= CONST_BITS;
+ dataptr[1] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0, FIX(1.396802247)) + /* c1 */
+ MULTIPLY(tmp1, FIX(1.260073511)) + tmp2 + /* c3 */
+ MULTIPLY(tmp3, FIX(0.642039522)) + /* c7 */
+ MULTIPLY(tmp4, FIX(0.221231742)), /* c9 */
+ CONST_BITS-1);
+ tmp12 = MULTIPLY(tmp0 - tmp4, FIX(0.951056516)) - /* (c3+c7)/2 */
+ MULTIPLY(tmp1 + tmp3, FIX(0.587785252)); /* (c1-c9)/2 */
+ tmp13 = MULTIPLY(tmp10 + tmp11, FIX(0.309016994)) + /* (c3-c7)/2 */
+ (tmp11 << (CONST_BITS - 1)) - tmp2;
+ dataptr[3] = (DCTELEM) DESCALE(tmp12 + tmp13, CONST_BITS-1);
+ dataptr[7] = (DCTELEM) DESCALE(tmp12 - tmp13, CONST_BITS-1);
+
+ ctr++;
+
+ if (ctr != DCTSIZE) {
+ if (ctr == 10)
+ break; /* Done. */
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ } else
+ dataptr = workspace; /* switch pointer to extended workspace */
+ }
+
+ /* Pass 2: process columns.
+ * We leave the results scaled up by an overall factor of 8.
+ * We must also scale the output by (8/10)**2 = 16/25, which we partially
+ * fold into the constant multipliers and final/initial shifting:
+ * cK now represents sqrt(2) * cos(K*pi/20) * 32/25.
+ */
+
+ dataptr = data;
+ wsptr = workspace;
+ for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*1];
+ tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*0];
+ tmp12 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*7];
+ tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*6];
+ tmp4 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*5];
+
+ tmp10 = tmp0 + tmp4;
+ tmp13 = tmp0 - tmp4;
+ tmp11 = tmp1 + tmp3;
+ tmp14 = tmp1 - tmp3;
+
+ tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*1];
+ tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*0];
+ tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*7];
+ tmp3 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*6];
+ tmp4 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*5];
+
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 + tmp11 + tmp12, FIX(1.28)), /* 32/25 */
+ CONST_BITS+2);
+ tmp12 += tmp12;
+ dataptr[DCTSIZE*4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.464477191)) - /* c4 */
+ MULTIPLY(tmp11 - tmp12, FIX(0.559380511)), /* c8 */
+ CONST_BITS+2);
+ tmp10 = MULTIPLY(tmp13 + tmp14, FIX(1.064004961)); /* c6 */
+ dataptr[DCTSIZE*2] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp13, FIX(0.657591230)), /* c2-c6 */
+ CONST_BITS+2);
+ dataptr[DCTSIZE*6] = (DCTELEM)
+ DESCALE(tmp10 - MULTIPLY(tmp14, FIX(2.785601151)), /* c2+c6 */
+ CONST_BITS+2);
+
+ /* Odd part */
+
+ tmp10 = tmp0 + tmp4;
+ tmp11 = tmp1 - tmp3;
+ dataptr[DCTSIZE*5] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp11 - tmp2, FIX(1.28)), /* 32/25 */
+ CONST_BITS+2);
+ tmp2 = MULTIPLY(tmp2, FIX(1.28)); /* 32/25 */
+ dataptr[DCTSIZE*1] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0, FIX(1.787906876)) + /* c1 */
+ MULTIPLY(tmp1, FIX(1.612894094)) + tmp2 + /* c3 */
+ MULTIPLY(tmp3, FIX(0.821810588)) + /* c7 */
+ MULTIPLY(tmp4, FIX(0.283176630)), /* c9 */
+ CONST_BITS+2);
+ tmp12 = MULTIPLY(tmp0 - tmp4, FIX(1.217352341)) - /* (c3+c7)/2 */
+ MULTIPLY(tmp1 + tmp3, FIX(0.752365123)); /* (c1-c9)/2 */
+ tmp13 = MULTIPLY(tmp10 + tmp11, FIX(0.395541753)) + /* (c3-c7)/2 */
+ MULTIPLY(tmp11, FIX(0.64)) - tmp2; /* 16/25 */
+ dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp12 + tmp13, CONST_BITS+2);
+ dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp12 - tmp13, CONST_BITS+2);
+
+ dataptr++; /* advance pointer to next column */
+ wsptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on an 11x11 sample block.
+ */
+
+GLOBAL(void)
+jpeg_fdct_11x11 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5;
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14;
+ INT32 z1, z2, z3;
+ DCTELEM workspace[8*3];
+ DCTELEM *dataptr;
+ DCTELEM *wsptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* we scale the results further by 2 as part of output adaption */
+ /* scaling for different DCT size. */
+ /* cK represents sqrt(2) * cos(K*pi/22). */
+
+ dataptr = data;
+ ctr = 0;
+ for (;;) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[10]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[9]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[8]);
+ tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[7]);
+ tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[6]);
+ tmp5 = GETJSAMPLE(elemptr[5]);
+
+ tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[10]);
+ tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[9]);
+ tmp12 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[8]);
+ tmp13 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[7]);
+ tmp14 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[6]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((tmp0 + tmp1 + tmp2 + tmp3 + tmp4 + tmp5 - 11 * CENTERJSAMPLE) << 1);
+ tmp5 += tmp5;
+ tmp0 -= tmp5;
+ tmp1 -= tmp5;
+ tmp2 -= tmp5;
+ tmp3 -= tmp5;
+ tmp4 -= tmp5;
+ z1 = MULTIPLY(tmp0 + tmp3, FIX(1.356927976)) + /* c2 */
+ MULTIPLY(tmp2 + tmp4, FIX(0.201263574)); /* c10 */
+ z2 = MULTIPLY(tmp1 - tmp3, FIX(0.926112931)); /* c6 */
+ z3 = MULTIPLY(tmp0 - tmp1, FIX(1.189712156)); /* c4 */
+ dataptr[2] = (DCTELEM)
+ DESCALE(z1 + z2 - MULTIPLY(tmp3, FIX(1.018300590)) /* c2+c8-c6 */
+ - MULTIPLY(tmp4, FIX(1.390975730)), /* c4+c10 */
+ CONST_BITS-1);
+ dataptr[4] = (DCTELEM)
+ DESCALE(z2 + z3 + MULTIPLY(tmp1, FIX(0.062335650)) /* c4-c6-c10 */
+ - MULTIPLY(tmp2, FIX(1.356927976)) /* c2 */
+ + MULTIPLY(tmp4, FIX(0.587485545)), /* c8 */
+ CONST_BITS-1);
+ dataptr[6] = (DCTELEM)
+ DESCALE(z1 + z3 - MULTIPLY(tmp0, FIX(1.620527200)) /* c2+c4-c6 */
+ - MULTIPLY(tmp2, FIX(0.788749120)), /* c8+c10 */
+ CONST_BITS-1);
+
+ /* Odd part */
+
+ tmp1 = MULTIPLY(tmp10 + tmp11, FIX(1.286413905)); /* c3 */
+ tmp2 = MULTIPLY(tmp10 + tmp12, FIX(1.068791298)); /* c5 */
+ tmp3 = MULTIPLY(tmp10 + tmp13, FIX(0.764581576)); /* c7 */
+ tmp0 = tmp1 + tmp2 + tmp3 - MULTIPLY(tmp10, FIX(1.719967871)) /* c7+c5+c3-c1 */
+ + MULTIPLY(tmp14, FIX(0.398430003)); /* c9 */
+ tmp4 = MULTIPLY(tmp11 + tmp12, - FIX(0.764581576)); /* -c7 */
+ tmp5 = MULTIPLY(tmp11 + tmp13, - FIX(1.399818907)); /* -c1 */
+ tmp1 += tmp4 + tmp5 + MULTIPLY(tmp11, FIX(1.276416582)) /* c9+c7+c1-c3 */
+ - MULTIPLY(tmp14, FIX(1.068791298)); /* c5 */
+ tmp10 = MULTIPLY(tmp12 + tmp13, FIX(0.398430003)); /* c9 */
+ tmp2 += tmp4 + tmp10 - MULTIPLY(tmp12, FIX(1.989053629)) /* c9+c5+c3-c7 */
+ + MULTIPLY(tmp14, FIX(1.399818907)); /* c1 */
+ tmp3 += tmp5 + tmp10 + MULTIPLY(tmp13, FIX(1.305598626)) /* c1+c5-c9-c7 */
+ - MULTIPLY(tmp14, FIX(1.286413905)); /* c3 */
+
+ dataptr[1] = (DCTELEM) DESCALE(tmp0, CONST_BITS-1);
+ dataptr[3] = (DCTELEM) DESCALE(tmp1, CONST_BITS-1);
+ dataptr[5] = (DCTELEM) DESCALE(tmp2, CONST_BITS-1);
+ dataptr[7] = (DCTELEM) DESCALE(tmp3, CONST_BITS-1);
+
+ ctr++;
+
+ if (ctr != DCTSIZE) {
+ if (ctr == 11)
+ break; /* Done. */
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ } else
+ dataptr = workspace; /* switch pointer to extended workspace */
+ }
+
+ /* Pass 2: process columns.
+ * We leave the results scaled up by an overall factor of 8.
+ * We must also scale the output by (8/11)**2 = 64/121, which we partially
+ * fold into the constant multipliers and final/initial shifting:
+ * cK now represents sqrt(2) * cos(K*pi/22) * 128/121.
+ */
+
+ dataptr = data;
+ wsptr = workspace;
+ for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*2];
+ tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*1];
+ tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*0];
+ tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*7];
+ tmp4 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*6];
+ tmp5 = dataptr[DCTSIZE*5];
+
+ tmp10 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*2];
+ tmp11 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*1];
+ tmp12 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*0];
+ tmp13 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*7];
+ tmp14 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*6];
+
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0 + tmp1 + tmp2 + tmp3 + tmp4 + tmp5,
+ FIX(1.057851240)), /* 128/121 */
+ CONST_BITS+2);
+ tmp5 += tmp5;
+ tmp0 -= tmp5;
+ tmp1 -= tmp5;
+ tmp2 -= tmp5;
+ tmp3 -= tmp5;
+ tmp4 -= tmp5;
+ z1 = MULTIPLY(tmp0 + tmp3, FIX(1.435427942)) + /* c2 */
+ MULTIPLY(tmp2 + tmp4, FIX(0.212906922)); /* c10 */
+ z2 = MULTIPLY(tmp1 - tmp3, FIX(0.979689713)); /* c6 */
+ z3 = MULTIPLY(tmp0 - tmp1, FIX(1.258538479)); /* c4 */
+ dataptr[DCTSIZE*2] = (DCTELEM)
+ DESCALE(z1 + z2 - MULTIPLY(tmp3, FIX(1.077210542)) /* c2+c8-c6 */
+ - MULTIPLY(tmp4, FIX(1.471445400)), /* c4+c10 */
+ CONST_BITS+2);
+ dataptr[DCTSIZE*4] = (DCTELEM)
+ DESCALE(z2 + z3 + MULTIPLY(tmp1, FIX(0.065941844)) /* c4-c6-c10 */
+ - MULTIPLY(tmp2, FIX(1.435427942)) /* c2 */
+ + MULTIPLY(tmp4, FIX(0.621472312)), /* c8 */
+ CONST_BITS+2);
+ dataptr[DCTSIZE*6] = (DCTELEM)
+ DESCALE(z1 + z3 - MULTIPLY(tmp0, FIX(1.714276708)) /* c2+c4-c6 */
+ - MULTIPLY(tmp2, FIX(0.834379234)), /* c8+c10 */
+ CONST_BITS+2);
+
+ /* Odd part */
+
+ tmp1 = MULTIPLY(tmp10 + tmp11, FIX(1.360834544)); /* c3 */
+ tmp2 = MULTIPLY(tmp10 + tmp12, FIX(1.130622199)); /* c5 */
+ tmp3 = MULTIPLY(tmp10 + tmp13, FIX(0.808813568)); /* c7 */
+ tmp0 = tmp1 + tmp2 + tmp3 - MULTIPLY(tmp10, FIX(1.819470145)) /* c7+c5+c3-c1 */
+ + MULTIPLY(tmp14, FIX(0.421479672)); /* c9 */
+ tmp4 = MULTIPLY(tmp11 + tmp12, - FIX(0.808813568)); /* -c7 */
+ tmp5 = MULTIPLY(tmp11 + tmp13, - FIX(1.480800167)); /* -c1 */
+ tmp1 += tmp4 + tmp5 + MULTIPLY(tmp11, FIX(1.350258864)) /* c9+c7+c1-c3 */
+ - MULTIPLY(tmp14, FIX(1.130622199)); /* c5 */
+ tmp10 = MULTIPLY(tmp12 + tmp13, FIX(0.421479672)); /* c9 */
+ tmp2 += tmp4 + tmp10 - MULTIPLY(tmp12, FIX(2.104122847)) /* c9+c5+c3-c7 */
+ + MULTIPLY(tmp14, FIX(1.480800167)); /* c1 */
+ tmp3 += tmp5 + tmp10 + MULTIPLY(tmp13, FIX(1.381129125)) /* c1+c5-c9-c7 */
+ - MULTIPLY(tmp14, FIX(1.360834544)); /* c3 */
+
+ dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp0, CONST_BITS+2);
+ dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp1, CONST_BITS+2);
+ dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp2, CONST_BITS+2);
+ dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp3, CONST_BITS+2);
+
+ dataptr++; /* advance pointer to next column */
+ wsptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 12x12 sample block.
+ */
+
+GLOBAL(void)
+jpeg_fdct_12x12 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5;
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15;
+ DCTELEM workspace[8*4];
+ DCTELEM *dataptr;
+ DCTELEM *wsptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT. */
+ /* cK represents sqrt(2) * cos(K*pi/24). */
+
+ dataptr = data;
+ ctr = 0;
+ for (;;) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[11]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[10]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[9]);
+ tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[8]);
+ tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[7]);
+ tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[6]);
+
+ tmp10 = tmp0 + tmp5;
+ tmp13 = tmp0 - tmp5;
+ tmp11 = tmp1 + tmp4;
+ tmp14 = tmp1 - tmp4;
+ tmp12 = tmp2 + tmp3;
+ tmp15 = tmp2 - tmp3;
+
+ tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[11]);
+ tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[10]);
+ tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[9]);
+ tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[8]);
+ tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[7]);
+ tmp5 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[6]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM) (tmp10 + tmp11 + tmp12 - 12 * CENTERJSAMPLE);
+ dataptr[6] = (DCTELEM) (tmp13 - tmp14 - tmp15);
+ dataptr[4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.224744871)), /* c4 */
+ CONST_BITS);
+ dataptr[2] = (DCTELEM)
+ DESCALE(tmp14 - tmp15 + MULTIPLY(tmp13 + tmp15, FIX(1.366025404)), /* c2 */
+ CONST_BITS);
+
+ /* Odd part */
+
+ tmp10 = MULTIPLY(tmp1 + tmp4, FIX_0_541196100); /* c9 */
+ tmp14 = tmp10 + MULTIPLY(tmp1, FIX_0_765366865); /* c3-c9 */
+ tmp15 = tmp10 - MULTIPLY(tmp4, FIX_1_847759065); /* c3+c9 */
+ tmp12 = MULTIPLY(tmp0 + tmp2, FIX(1.121971054)); /* c5 */
+ tmp13 = MULTIPLY(tmp0 + tmp3, FIX(0.860918669)); /* c7 */
+ tmp10 = tmp12 + tmp13 + tmp14 - MULTIPLY(tmp0, FIX(0.580774953)) /* c5+c7-c1 */
+ + MULTIPLY(tmp5, FIX(0.184591911)); /* c11 */
+ tmp11 = MULTIPLY(tmp2 + tmp3, - FIX(0.184591911)); /* -c11 */
+ tmp12 += tmp11 - tmp15 - MULTIPLY(tmp2, FIX(2.339493912)) /* c1+c5-c11 */
+ + MULTIPLY(tmp5, FIX(0.860918669)); /* c7 */
+ tmp13 += tmp11 - tmp14 + MULTIPLY(tmp3, FIX(0.725788011)) /* c1+c11-c7 */
+ - MULTIPLY(tmp5, FIX(1.121971054)); /* c5 */
+ tmp11 = tmp15 + MULTIPLY(tmp0 - tmp3, FIX(1.306562965)) /* c3 */
+ - MULTIPLY(tmp2 + tmp5, FIX_0_541196100); /* c9 */
+
+ dataptr[1] = (DCTELEM) DESCALE(tmp10, CONST_BITS);
+ dataptr[3] = (DCTELEM) DESCALE(tmp11, CONST_BITS);
+ dataptr[5] = (DCTELEM) DESCALE(tmp12, CONST_BITS);
+ dataptr[7] = (DCTELEM) DESCALE(tmp13, CONST_BITS);
+
+ ctr++;
+
+ if (ctr != DCTSIZE) {
+ if (ctr == 12)
+ break; /* Done. */
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ } else
+ dataptr = workspace; /* switch pointer to extended workspace */
+ }
+
+ /* Pass 2: process columns.
+ * We leave the results scaled up by an overall factor of 8.
+ * We must also scale the output by (8/12)**2 = 4/9, which we partially
+ * fold into the constant multipliers and final shifting:
+ * cK now represents sqrt(2) * cos(K*pi/24) * 8/9.
+ */
+
+ dataptr = data;
+ wsptr = workspace;
+ for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*3];
+ tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*2];
+ tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*1];
+ tmp3 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*0];
+ tmp4 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*7];
+ tmp5 = dataptr[DCTSIZE*5] + dataptr[DCTSIZE*6];
+
+ tmp10 = tmp0 + tmp5;
+ tmp13 = tmp0 - tmp5;
+ tmp11 = tmp1 + tmp4;
+ tmp14 = tmp1 - tmp4;
+ tmp12 = tmp2 + tmp3;
+ tmp15 = tmp2 - tmp3;
+
+ tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*3];
+ tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*2];
+ tmp2 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*1];
+ tmp3 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*0];
+ tmp4 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*7];
+ tmp5 = dataptr[DCTSIZE*5] - dataptr[DCTSIZE*6];
+
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 + tmp11 + tmp12, FIX(0.888888889)), /* 8/9 */
+ CONST_BITS+1);
+ dataptr[DCTSIZE*6] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp13 - tmp14 - tmp15, FIX(0.888888889)), /* 8/9 */
+ CONST_BITS+1);
+ dataptr[DCTSIZE*4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.088662108)), /* c4 */
+ CONST_BITS+1);
+ dataptr[DCTSIZE*2] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp14 - tmp15, FIX(0.888888889)) + /* 8/9 */
+ MULTIPLY(tmp13 + tmp15, FIX(1.214244803)), /* c2 */
+ CONST_BITS+1);
+
+ /* Odd part */
+
+ tmp10 = MULTIPLY(tmp1 + tmp4, FIX(0.481063200)); /* c9 */
+ tmp14 = tmp10 + MULTIPLY(tmp1, FIX(0.680326102)); /* c3-c9 */
+ tmp15 = tmp10 - MULTIPLY(tmp4, FIX(1.642452502)); /* c3+c9 */
+ tmp12 = MULTIPLY(tmp0 + tmp2, FIX(0.997307603)); /* c5 */
+ tmp13 = MULTIPLY(tmp0 + tmp3, FIX(0.765261039)); /* c7 */
+ tmp10 = tmp12 + tmp13 + tmp14 - MULTIPLY(tmp0, FIX(0.516244403)) /* c5+c7-c1 */
+ + MULTIPLY(tmp5, FIX(0.164081699)); /* c11 */
+ tmp11 = MULTIPLY(tmp2 + tmp3, - FIX(0.164081699)); /* -c11 */
+ tmp12 += tmp11 - tmp15 - MULTIPLY(tmp2, FIX(2.079550144)) /* c1+c5-c11 */
+ + MULTIPLY(tmp5, FIX(0.765261039)); /* c7 */
+ tmp13 += tmp11 - tmp14 + MULTIPLY(tmp3, FIX(0.645144899)) /* c1+c11-c7 */
+ - MULTIPLY(tmp5, FIX(0.997307603)); /* c5 */
+ tmp11 = tmp15 + MULTIPLY(tmp0 - tmp3, FIX(1.161389302)) /* c3 */
+ - MULTIPLY(tmp2 + tmp5, FIX(0.481063200)); /* c9 */
+
+ dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp10, CONST_BITS+1);
+ dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp11, CONST_BITS+1);
+ dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp12, CONST_BITS+1);
+ dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp13, CONST_BITS+1);
+
+ dataptr++; /* advance pointer to next column */
+ wsptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 13x13 sample block.
+ */
+
+GLOBAL(void)
+jpeg_fdct_13x13 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6;
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15;
+ INT32 z1, z2;
+ DCTELEM workspace[8*5];
+ DCTELEM *dataptr;
+ DCTELEM *wsptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT. */
+ /* cK represents sqrt(2) * cos(K*pi/26). */
+
+ dataptr = data;
+ ctr = 0;
+ for (;;) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[12]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[11]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[10]);
+ tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[9]);
+ tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[8]);
+ tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[7]);
+ tmp6 = GETJSAMPLE(elemptr[6]);
+
+ tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[12]);
+ tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[11]);
+ tmp12 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[10]);
+ tmp13 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[9]);
+ tmp14 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[8]);
+ tmp15 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[7]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ (tmp0 + tmp1 + tmp2 + tmp3 + tmp4 + tmp5 + tmp6 - 13 * CENTERJSAMPLE);
+ tmp6 += tmp6;
+ tmp0 -= tmp6;
+ tmp1 -= tmp6;
+ tmp2 -= tmp6;
+ tmp3 -= tmp6;
+ tmp4 -= tmp6;
+ tmp5 -= tmp6;
+ dataptr[2] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0, FIX(1.373119086)) + /* c2 */
+ MULTIPLY(tmp1, FIX(1.058554052)) + /* c6 */
+ MULTIPLY(tmp2, FIX(0.501487041)) - /* c10 */
+ MULTIPLY(tmp3, FIX(0.170464608)) - /* c12 */
+ MULTIPLY(tmp4, FIX(0.803364869)) - /* c8 */
+ MULTIPLY(tmp5, FIX(1.252223920)), /* c4 */
+ CONST_BITS);
+ z1 = MULTIPLY(tmp0 - tmp2, FIX(1.155388986)) - /* (c4+c6)/2 */
+ MULTIPLY(tmp3 - tmp4, FIX(0.435816023)) - /* (c2-c10)/2 */
+ MULTIPLY(tmp1 - tmp5, FIX(0.316450131)); /* (c8-c12)/2 */
+ z2 = MULTIPLY(tmp0 + tmp2, FIX(0.096834934)) - /* (c4-c6)/2 */
+ MULTIPLY(tmp3 + tmp4, FIX(0.937303064)) + /* (c2+c10)/2 */
+ MULTIPLY(tmp1 + tmp5, FIX(0.486914739)); /* (c8+c12)/2 */
+
+ dataptr[4] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS);
+ dataptr[6] = (DCTELEM) DESCALE(z1 - z2, CONST_BITS);
+
+ /* Odd part */
+
+ tmp1 = MULTIPLY(tmp10 + tmp11, FIX(1.322312651)); /* c3 */
+ tmp2 = MULTIPLY(tmp10 + tmp12, FIX(1.163874945)); /* c5 */
+ tmp3 = MULTIPLY(tmp10 + tmp13, FIX(0.937797057)) + /* c7 */
+ MULTIPLY(tmp14 + tmp15, FIX(0.338443458)); /* c11 */
+ tmp0 = tmp1 + tmp2 + tmp3 -
+ MULTIPLY(tmp10, FIX(2.020082300)) + /* c3+c5+c7-c1 */
+ MULTIPLY(tmp14, FIX(0.318774355)); /* c9-c11 */
+ tmp4 = MULTIPLY(tmp14 - tmp15, FIX(0.937797057)) - /* c7 */
+ MULTIPLY(tmp11 + tmp12, FIX(0.338443458)); /* c11 */
+ tmp5 = MULTIPLY(tmp11 + tmp13, - FIX(1.163874945)); /* -c5 */
+ tmp1 += tmp4 + tmp5 +
+ MULTIPLY(tmp11, FIX(0.837223564)) - /* c5+c9+c11-c3 */
+ MULTIPLY(tmp14, FIX(2.341699410)); /* c1+c7 */
+ tmp6 = MULTIPLY(tmp12 + tmp13, - FIX(0.657217813)); /* -c9 */
+ tmp2 += tmp4 + tmp6 -
+ MULTIPLY(tmp12, FIX(1.572116027)) + /* c1+c5-c9-c11 */
+ MULTIPLY(tmp15, FIX(2.260109708)); /* c3+c7 */
+ tmp3 += tmp5 + tmp6 +
+ MULTIPLY(tmp13, FIX(2.205608352)) - /* c3+c5+c9-c7 */
+ MULTIPLY(tmp15, FIX(1.742345811)); /* c1+c11 */
+
+ dataptr[1] = (DCTELEM) DESCALE(tmp0, CONST_BITS);
+ dataptr[3] = (DCTELEM) DESCALE(tmp1, CONST_BITS);
+ dataptr[5] = (DCTELEM) DESCALE(tmp2, CONST_BITS);
+ dataptr[7] = (DCTELEM) DESCALE(tmp3, CONST_BITS);
+
+ ctr++;
+
+ if (ctr != DCTSIZE) {
+ if (ctr == 13)
+ break; /* Done. */
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ } else
+ dataptr = workspace; /* switch pointer to extended workspace */
+ }
+
+ /* Pass 2: process columns.
+ * We leave the results scaled up by an overall factor of 8.
+ * We must also scale the output by (8/13)**2 = 64/169, which we partially
+ * fold into the constant multipliers and final shifting:
+ * cK now represents sqrt(2) * cos(K*pi/26) * 128/169.
+ */
+
+ dataptr = data;
+ wsptr = workspace;
+ for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*4];
+ tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*3];
+ tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*2];
+ tmp3 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*1];
+ tmp4 = dataptr[DCTSIZE*4] + wsptr[DCTSIZE*0];
+ tmp5 = dataptr[DCTSIZE*5] + dataptr[DCTSIZE*7];
+ tmp6 = dataptr[DCTSIZE*6];
+
+ tmp10 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*4];
+ tmp11 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*3];
+ tmp12 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*2];
+ tmp13 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*1];
+ tmp14 = dataptr[DCTSIZE*4] - wsptr[DCTSIZE*0];
+ tmp15 = dataptr[DCTSIZE*5] - dataptr[DCTSIZE*7];
+
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0 + tmp1 + tmp2 + tmp3 + tmp4 + tmp5 + tmp6,
+ FIX(0.757396450)), /* 128/169 */
+ CONST_BITS+1);
+ tmp6 += tmp6;
+ tmp0 -= tmp6;
+ tmp1 -= tmp6;
+ tmp2 -= tmp6;
+ tmp3 -= tmp6;
+ tmp4 -= tmp6;
+ tmp5 -= tmp6;
+ dataptr[DCTSIZE*2] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0, FIX(1.039995521)) + /* c2 */
+ MULTIPLY(tmp1, FIX(0.801745081)) + /* c6 */
+ MULTIPLY(tmp2, FIX(0.379824504)) - /* c10 */
+ MULTIPLY(tmp3, FIX(0.129109289)) - /* c12 */
+ MULTIPLY(tmp4, FIX(0.608465700)) - /* c8 */
+ MULTIPLY(tmp5, FIX(0.948429952)), /* c4 */
+ CONST_BITS+1);
+ z1 = MULTIPLY(tmp0 - tmp2, FIX(0.875087516)) - /* (c4+c6)/2 */
+ MULTIPLY(tmp3 - tmp4, FIX(0.330085509)) - /* (c2-c10)/2 */
+ MULTIPLY(tmp1 - tmp5, FIX(0.239678205)); /* (c8-c12)/2 */
+ z2 = MULTIPLY(tmp0 + tmp2, FIX(0.073342435)) - /* (c4-c6)/2 */
+ MULTIPLY(tmp3 + tmp4, FIX(0.709910013)) + /* (c2+c10)/2 */
+ MULTIPLY(tmp1 + tmp5, FIX(0.368787494)); /* (c8+c12)/2 */
+
+ dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS+1);
+ dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 - z2, CONST_BITS+1);
+
+ /* Odd part */
+
+ tmp1 = MULTIPLY(tmp10 + tmp11, FIX(1.001514908)); /* c3 */
+ tmp2 = MULTIPLY(tmp10 + tmp12, FIX(0.881514751)); /* c5 */
+ tmp3 = MULTIPLY(tmp10 + tmp13, FIX(0.710284161)) + /* c7 */
+ MULTIPLY(tmp14 + tmp15, FIX(0.256335874)); /* c11 */
+ tmp0 = tmp1 + tmp2 + tmp3 -
+ MULTIPLY(tmp10, FIX(1.530003162)) + /* c3+c5+c7-c1 */
+ MULTIPLY(tmp14, FIX(0.241438564)); /* c9-c11 */
+ tmp4 = MULTIPLY(tmp14 - tmp15, FIX(0.710284161)) - /* c7 */
+ MULTIPLY(tmp11 + tmp12, FIX(0.256335874)); /* c11 */
+ tmp5 = MULTIPLY(tmp11 + tmp13, - FIX(0.881514751)); /* -c5 */
+ tmp1 += tmp4 + tmp5 +
+ MULTIPLY(tmp11, FIX(0.634110155)) - /* c5+c9+c11-c3 */
+ MULTIPLY(tmp14, FIX(1.773594819)); /* c1+c7 */
+ tmp6 = MULTIPLY(tmp12 + tmp13, - FIX(0.497774438)); /* -c9 */
+ tmp2 += tmp4 + tmp6 -
+ MULTIPLY(tmp12, FIX(1.190715098)) + /* c1+c5-c9-c11 */
+ MULTIPLY(tmp15, FIX(1.711799069)); /* c3+c7 */
+ tmp3 += tmp5 + tmp6 +
+ MULTIPLY(tmp13, FIX(1.670519935)) - /* c3+c5+c9-c7 */
+ MULTIPLY(tmp15, FIX(1.319646532)); /* c1+c11 */
+
+ dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp0, CONST_BITS+1);
+ dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp1, CONST_BITS+1);
+ dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp2, CONST_BITS+1);
+ dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp3, CONST_BITS+1);
+
+ dataptr++; /* advance pointer to next column */
+ wsptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 14x14 sample block.
+ */
+
+GLOBAL(void)
+jpeg_fdct_14x14 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6;
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16;
+ DCTELEM workspace[8*6];
+ DCTELEM *dataptr;
+ DCTELEM *wsptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT. */
+ /* cK represents sqrt(2) * cos(K*pi/28). */
+
+ dataptr = data;
+ ctr = 0;
+ for (;;) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[13]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[12]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[11]);
+ tmp13 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[10]);
+ tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[9]);
+ tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[8]);
+ tmp6 = GETJSAMPLE(elemptr[6]) + GETJSAMPLE(elemptr[7]);
+
+ tmp10 = tmp0 + tmp6;
+ tmp14 = tmp0 - tmp6;
+ tmp11 = tmp1 + tmp5;
+ tmp15 = tmp1 - tmp5;
+ tmp12 = tmp2 + tmp4;
+ tmp16 = tmp2 - tmp4;
+
+ tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[13]);
+ tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[12]);
+ tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[11]);
+ tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[10]);
+ tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[9]);
+ tmp5 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[8]);
+ tmp6 = GETJSAMPLE(elemptr[6]) - GETJSAMPLE(elemptr[7]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ (tmp10 + tmp11 + tmp12 + tmp13 - 14 * CENTERJSAMPLE);
+ tmp13 += tmp13;
+ dataptr[4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp13, FIX(1.274162392)) + /* c4 */
+ MULTIPLY(tmp11 - tmp13, FIX(0.314692123)) - /* c12 */
+ MULTIPLY(tmp12 - tmp13, FIX(0.881747734)), /* c8 */
+ CONST_BITS);
+
+ tmp10 = MULTIPLY(tmp14 + tmp15, FIX(1.105676686)); /* c6 */
+
+ dataptr[2] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp14, FIX(0.273079590)) /* c2-c6 */
+ + MULTIPLY(tmp16, FIX(0.613604268)), /* c10 */
+ CONST_BITS);
+ dataptr[6] = (DCTELEM)
+ DESCALE(tmp10 - MULTIPLY(tmp15, FIX(1.719280954)) /* c6+c10 */
+ - MULTIPLY(tmp16, FIX(1.378756276)), /* c2 */
+ CONST_BITS);
+
+ /* Odd part */
+
+ tmp10 = tmp1 + tmp2;
+ tmp11 = tmp5 - tmp4;
+ dataptr[7] = (DCTELEM) (tmp0 - tmp10 + tmp3 - tmp11 - tmp6);
+ tmp3 <<= CONST_BITS;
+ tmp10 = MULTIPLY(tmp10, - FIX(0.158341681)); /* -c13 */
+ tmp11 = MULTIPLY(tmp11, FIX(1.405321284)); /* c1 */
+ tmp10 += tmp11 - tmp3;
+ tmp11 = MULTIPLY(tmp0 + tmp2, FIX(1.197448846)) + /* c5 */
+ MULTIPLY(tmp4 + tmp6, FIX(0.752406978)); /* c9 */
+ dataptr[5] = (DCTELEM)
+ DESCALE(tmp10 + tmp11 - MULTIPLY(tmp2, FIX(2.373959773)) /* c3+c5-c13 */
+ + MULTIPLY(tmp4, FIX(1.119999435)), /* c1+c11-c9 */
+ CONST_BITS);
+ tmp12 = MULTIPLY(tmp0 + tmp1, FIX(1.334852607)) + /* c3 */
+ MULTIPLY(tmp5 - tmp6, FIX(0.467085129)); /* c11 */
+ dataptr[3] = (DCTELEM)
+ DESCALE(tmp10 + tmp12 - MULTIPLY(tmp1, FIX(0.424103948)) /* c3-c9-c13 */
+ - MULTIPLY(tmp5, FIX(3.069855259)), /* c1+c5+c11 */
+ CONST_BITS);
+ dataptr[1] = (DCTELEM)
+ DESCALE(tmp11 + tmp12 + tmp3 + tmp6 -
+ MULTIPLY(tmp0 + tmp6, FIX(1.126980169)), /* c3+c5-c1 */
+ CONST_BITS);
+
+ ctr++;
+
+ if (ctr != DCTSIZE) {
+ if (ctr == 14)
+ break; /* Done. */
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ } else
+ dataptr = workspace; /* switch pointer to extended workspace */
+ }
+
+ /* Pass 2: process columns.
+ * We leave the results scaled up by an overall factor of 8.
+ * We must also scale the output by (8/14)**2 = 16/49, which we partially
+ * fold into the constant multipliers and final shifting:
+ * cK now represents sqrt(2) * cos(K*pi/28) * 32/49.
+ */
+
+ dataptr = data;
+ wsptr = workspace;
+ for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*5];
+ tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*4];
+ tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*3];
+ tmp13 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*2];
+ tmp4 = dataptr[DCTSIZE*4] + wsptr[DCTSIZE*1];
+ tmp5 = dataptr[DCTSIZE*5] + wsptr[DCTSIZE*0];
+ tmp6 = dataptr[DCTSIZE*6] + dataptr[DCTSIZE*7];
+
+ tmp10 = tmp0 + tmp6;
+ tmp14 = tmp0 - tmp6;
+ tmp11 = tmp1 + tmp5;
+ tmp15 = tmp1 - tmp5;
+ tmp12 = tmp2 + tmp4;
+ tmp16 = tmp2 - tmp4;
+
+ tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*5];
+ tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*4];
+ tmp2 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*3];
+ tmp3 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*2];
+ tmp4 = dataptr[DCTSIZE*4] - wsptr[DCTSIZE*1];
+ tmp5 = dataptr[DCTSIZE*5] - wsptr[DCTSIZE*0];
+ tmp6 = dataptr[DCTSIZE*6] - dataptr[DCTSIZE*7];
+
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 + tmp11 + tmp12 + tmp13,
+ FIX(0.653061224)), /* 32/49 */
+ CONST_BITS+1);
+ tmp13 += tmp13;
+ dataptr[DCTSIZE*4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp13, FIX(0.832106052)) + /* c4 */
+ MULTIPLY(tmp11 - tmp13, FIX(0.205513223)) - /* c12 */
+ MULTIPLY(tmp12 - tmp13, FIX(0.575835255)), /* c8 */
+ CONST_BITS+1);
+
+ tmp10 = MULTIPLY(tmp14 + tmp15, FIX(0.722074570)); /* c6 */
+
+ dataptr[DCTSIZE*2] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp14, FIX(0.178337691)) /* c2-c6 */
+ + MULTIPLY(tmp16, FIX(0.400721155)), /* c10 */
+ CONST_BITS+1);
+ dataptr[DCTSIZE*6] = (DCTELEM)
+ DESCALE(tmp10 - MULTIPLY(tmp15, FIX(1.122795725)) /* c6+c10 */
+ - MULTIPLY(tmp16, FIX(0.900412262)), /* c2 */
+ CONST_BITS+1);
+
+ /* Odd part */
+
+ tmp10 = tmp1 + tmp2;
+ tmp11 = tmp5 - tmp4;
+ dataptr[DCTSIZE*7] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0 - tmp10 + tmp3 - tmp11 - tmp6,
+ FIX(0.653061224)), /* 32/49 */
+ CONST_BITS+1);
+ tmp3 = MULTIPLY(tmp3 , FIX(0.653061224)); /* 32/49 */
+ tmp10 = MULTIPLY(tmp10, - FIX(0.103406812)); /* -c13 */
+ tmp11 = MULTIPLY(tmp11, FIX(0.917760839)); /* c1 */
+ tmp10 += tmp11 - tmp3;
+ tmp11 = MULTIPLY(tmp0 + tmp2, FIX(0.782007410)) + /* c5 */
+ MULTIPLY(tmp4 + tmp6, FIX(0.491367823)); /* c9 */
+ dataptr[DCTSIZE*5] = (DCTELEM)
+ DESCALE(tmp10 + tmp11 - MULTIPLY(tmp2, FIX(1.550341076)) /* c3+c5-c13 */
+ + MULTIPLY(tmp4, FIX(0.731428202)), /* c1+c11-c9 */
+ CONST_BITS+1);
+ tmp12 = MULTIPLY(tmp0 + tmp1, FIX(0.871740478)) + /* c3 */
+ MULTIPLY(tmp5 - tmp6, FIX(0.305035186)); /* c11 */
+ dataptr[DCTSIZE*3] = (DCTELEM)
+ DESCALE(tmp10 + tmp12 - MULTIPLY(tmp1, FIX(0.276965844)) /* c3-c9-c13 */
+ - MULTIPLY(tmp5, FIX(2.004803435)), /* c1+c5+c11 */
+ CONST_BITS+1);
+ dataptr[DCTSIZE*1] = (DCTELEM)
+ DESCALE(tmp11 + tmp12 + tmp3
+ - MULTIPLY(tmp0, FIX(0.735987049)) /* c3+c5-c1 */
+ - MULTIPLY(tmp6, FIX(0.082925825)), /* c9-c11-c13 */
+ CONST_BITS+1);
+
+ dataptr++; /* advance pointer to next column */
+ wsptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 15x15 sample block.
+ */
+
+GLOBAL(void)
+jpeg_fdct_15x15 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16;
+ INT32 z1, z2, z3;
+ DCTELEM workspace[8*7];
+ DCTELEM *dataptr;
+ DCTELEM *wsptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT. */
+ /* cK represents sqrt(2) * cos(K*pi/30). */
+
+ dataptr = data;
+ ctr = 0;
+ for (;;) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[14]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[13]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[12]);
+ tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[11]);
+ tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[10]);
+ tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[9]);
+ tmp6 = GETJSAMPLE(elemptr[6]) + GETJSAMPLE(elemptr[8]);
+ tmp7 = GETJSAMPLE(elemptr[7]);
+
+ tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[14]);
+ tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[13]);
+ tmp12 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[12]);
+ tmp13 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[11]);
+ tmp14 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[10]);
+ tmp15 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[9]);
+ tmp16 = GETJSAMPLE(elemptr[6]) - GETJSAMPLE(elemptr[8]);
+
+ z1 = tmp0 + tmp4 + tmp5;
+ z2 = tmp1 + tmp3 + tmp6;
+ z3 = tmp2 + tmp7;
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM) (z1 + z2 + z3 - 15 * CENTERJSAMPLE);
+ z3 += z3;
+ dataptr[6] = (DCTELEM)
+ DESCALE(MULTIPLY(z1 - z3, FIX(1.144122806)) - /* c6 */
+ MULTIPLY(z2 - z3, FIX(0.437016024)), /* c12 */
+ CONST_BITS);
+ tmp2 += ((tmp1 + tmp4) >> 1) - tmp7 - tmp7;
+ z1 = MULTIPLY(tmp3 - tmp2, FIX(1.531135173)) - /* c2+c14 */
+ MULTIPLY(tmp6 - tmp2, FIX(2.238241955)); /* c4+c8 */
+ z2 = MULTIPLY(tmp5 - tmp2, FIX(0.798468008)) - /* c8-c14 */
+ MULTIPLY(tmp0 - tmp2, FIX(0.091361227)); /* c2-c4 */
+ z3 = MULTIPLY(tmp0 - tmp3, FIX(1.383309603)) + /* c2 */
+ MULTIPLY(tmp6 - tmp5, FIX(0.946293579)) + /* c8 */
+ MULTIPLY(tmp1 - tmp4, FIX(0.790569415)); /* (c6+c12)/2 */
+
+ dataptr[2] = (DCTELEM) DESCALE(z1 + z3, CONST_BITS);
+ dataptr[4] = (DCTELEM) DESCALE(z2 + z3, CONST_BITS);
+
+ /* Odd part */
+
+ tmp2 = MULTIPLY(tmp10 - tmp12 - tmp13 + tmp15 + tmp16,
+ FIX(1.224744871)); /* c5 */
+ tmp1 = MULTIPLY(tmp10 - tmp14 - tmp15, FIX(1.344997024)) + /* c3 */
+ MULTIPLY(tmp11 - tmp13 - tmp16, FIX(0.831253876)); /* c9 */
+ tmp12 = MULTIPLY(tmp12, FIX(1.224744871)); /* c5 */
+ tmp4 = MULTIPLY(tmp10 - tmp16, FIX(1.406466353)) + /* c1 */
+ MULTIPLY(tmp11 + tmp14, FIX(1.344997024)) + /* c3 */
+ MULTIPLY(tmp13 + tmp15, FIX(0.575212477)); /* c11 */
+ tmp0 = MULTIPLY(tmp13, FIX(0.475753014)) - /* c7-c11 */
+ MULTIPLY(tmp14, FIX(0.513743148)) + /* c3-c9 */
+ MULTIPLY(tmp16, FIX(1.700497885)) + tmp4 + tmp12; /* c1+c13 */
+ tmp3 = MULTIPLY(tmp10, - FIX(0.355500862)) - /* -(c1-c7) */
+ MULTIPLY(tmp11, FIX(2.176250899)) - /* c3+c9 */
+ MULTIPLY(tmp15, FIX(0.869244010)) + tmp4 - tmp12; /* c11+c13 */
+
+ dataptr[1] = (DCTELEM) DESCALE(tmp0, CONST_BITS);
+ dataptr[3] = (DCTELEM) DESCALE(tmp1, CONST_BITS);
+ dataptr[5] = (DCTELEM) DESCALE(tmp2, CONST_BITS);
+ dataptr[7] = (DCTELEM) DESCALE(tmp3, CONST_BITS);
+
+ ctr++;
+
+ if (ctr != DCTSIZE) {
+ if (ctr == 15)
+ break; /* Done. */
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ } else
+ dataptr = workspace; /* switch pointer to extended workspace */
+ }
+
+ /* Pass 2: process columns.
+ * We leave the results scaled up by an overall factor of 8.
+ * We must also scale the output by (8/15)**2 = 64/225, which we partially
+ * fold into the constant multipliers and final shifting:
+ * cK now represents sqrt(2) * cos(K*pi/30) * 256/225.
+ */
+
+ dataptr = data;
+ wsptr = workspace;
+ for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*6];
+ tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*5];
+ tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*4];
+ tmp3 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*3];
+ tmp4 = dataptr[DCTSIZE*4] + wsptr[DCTSIZE*2];
+ tmp5 = dataptr[DCTSIZE*5] + wsptr[DCTSIZE*1];
+ tmp6 = dataptr[DCTSIZE*6] + wsptr[DCTSIZE*0];
+ tmp7 = dataptr[DCTSIZE*7];
+
+ tmp10 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*6];
+ tmp11 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*5];
+ tmp12 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*4];
+ tmp13 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*3];
+ tmp14 = dataptr[DCTSIZE*4] - wsptr[DCTSIZE*2];
+ tmp15 = dataptr[DCTSIZE*5] - wsptr[DCTSIZE*1];
+ tmp16 = dataptr[DCTSIZE*6] - wsptr[DCTSIZE*0];
+
+ z1 = tmp0 + tmp4 + tmp5;
+ z2 = tmp1 + tmp3 + tmp6;
+ z3 = tmp2 + tmp7;
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(z1 + z2 + z3, FIX(1.137777778)), /* 256/225 */
+ CONST_BITS+2);
+ z3 += z3;
+ dataptr[DCTSIZE*6] = (DCTELEM)
+ DESCALE(MULTIPLY(z1 - z3, FIX(1.301757503)) - /* c6 */
+ MULTIPLY(z2 - z3, FIX(0.497227121)), /* c12 */
+ CONST_BITS+2);
+ tmp2 += ((tmp1 + tmp4) >> 1) - tmp7 - tmp7;
+ z1 = MULTIPLY(tmp3 - tmp2, FIX(1.742091575)) - /* c2+c14 */
+ MULTIPLY(tmp6 - tmp2, FIX(2.546621957)); /* c4+c8 */
+ z2 = MULTIPLY(tmp5 - tmp2, FIX(0.908479156)) - /* c8-c14 */
+ MULTIPLY(tmp0 - tmp2, FIX(0.103948774)); /* c2-c4 */
+ z3 = MULTIPLY(tmp0 - tmp3, FIX(1.573898926)) + /* c2 */
+ MULTIPLY(tmp6 - tmp5, FIX(1.076671805)) + /* c8 */
+ MULTIPLY(tmp1 - tmp4, FIX(0.899492312)); /* (c6+c12)/2 */
+
+ dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + z3, CONST_BITS+2);
+ dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(z2 + z3, CONST_BITS+2);
+
+ /* Odd part */
+
+ tmp2 = MULTIPLY(tmp10 - tmp12 - tmp13 + tmp15 + tmp16,
+ FIX(1.393487498)); /* c5 */
+ tmp1 = MULTIPLY(tmp10 - tmp14 - tmp15, FIX(1.530307725)) + /* c3 */
+ MULTIPLY(tmp11 - tmp13 - tmp16, FIX(0.945782187)); /* c9 */
+ tmp12 = MULTIPLY(tmp12, FIX(1.393487498)); /* c5 */
+ tmp4 = MULTIPLY(tmp10 - tmp16, FIX(1.600246161)) + /* c1 */
+ MULTIPLY(tmp11 + tmp14, FIX(1.530307725)) + /* c3 */
+ MULTIPLY(tmp13 + tmp15, FIX(0.654463974)); /* c11 */
+ tmp0 = MULTIPLY(tmp13, FIX(0.541301207)) - /* c7-c11 */
+ MULTIPLY(tmp14, FIX(0.584525538)) + /* c3-c9 */
+ MULTIPLY(tmp16, FIX(1.934788705)) + tmp4 + tmp12; /* c1+c13 */
+ tmp3 = MULTIPLY(tmp10, - FIX(0.404480980)) - /* -(c1-c7) */
+ MULTIPLY(tmp11, FIX(2.476089912)) - /* c3+c9 */
+ MULTIPLY(tmp15, FIX(0.989006518)) + tmp4 - tmp12; /* c11+c13 */
+
+ dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp0, CONST_BITS+2);
+ dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp1, CONST_BITS+2);
+ dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp2, CONST_BITS+2);
+ dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp3, CONST_BITS+2);
+
+ dataptr++; /* advance pointer to next column */
+ wsptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 16x16 sample block.
+ */
+
+GLOBAL(void)
+jpeg_fdct_16x16 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16, tmp17;
+ DCTELEM workspace[DCTSIZE2];
+ DCTELEM *dataptr;
+ DCTELEM *wsptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+ /* cK represents sqrt(2) * cos(K*pi/32). */
+
+ dataptr = data;
+ ctr = 0;
+ for (;;) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[15]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[14]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[13]);
+ tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[12]);
+ tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[11]);
+ tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[10]);
+ tmp6 = GETJSAMPLE(elemptr[6]) + GETJSAMPLE(elemptr[9]);
+ tmp7 = GETJSAMPLE(elemptr[7]) + GETJSAMPLE(elemptr[8]);
+
+ tmp10 = tmp0 + tmp7;
+ tmp14 = tmp0 - tmp7;
+ tmp11 = tmp1 + tmp6;
+ tmp15 = tmp1 - tmp6;
+ tmp12 = tmp2 + tmp5;
+ tmp16 = tmp2 - tmp5;
+ tmp13 = tmp3 + tmp4;
+ tmp17 = tmp3 - tmp4;
+
+ tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[15]);
+ tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[14]);
+ tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[13]);
+ tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[12]);
+ tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[11]);
+ tmp5 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[10]);
+ tmp6 = GETJSAMPLE(elemptr[6]) - GETJSAMPLE(elemptr[9]);
+ tmp7 = GETJSAMPLE(elemptr[7]) - GETJSAMPLE(elemptr[8]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((tmp10 + tmp11 + tmp12 + tmp13 - 16 * CENTERJSAMPLE) << PASS1_BITS);
+ dataptr[4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp13, FIX(1.306562965)) + /* c4[16] = c2[8] */
+ MULTIPLY(tmp11 - tmp12, FIX_0_541196100), /* c12[16] = c6[8] */
+ CONST_BITS-PASS1_BITS);
+
+ tmp10 = MULTIPLY(tmp17 - tmp15, FIX(0.275899379)) + /* c14[16] = c7[8] */
+ MULTIPLY(tmp14 - tmp16, FIX(1.387039845)); /* c2[16] = c1[8] */
+
+ dataptr[2] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp15, FIX(1.451774982)) /* c6+c14 */
+ + MULTIPLY(tmp16, FIX(2.172734804)), /* c2+c10 */
+ CONST_BITS-PASS1_BITS);
+ dataptr[6] = (DCTELEM)
+ DESCALE(tmp10 - MULTIPLY(tmp14, FIX(0.211164243)) /* c2-c6 */
+ - MULTIPLY(tmp17, FIX(1.061594338)), /* c10+c14 */
+ CONST_BITS-PASS1_BITS);
+
+ /* Odd part */
+
+ tmp11 = MULTIPLY(tmp0 + tmp1, FIX(1.353318001)) + /* c3 */
+ MULTIPLY(tmp6 - tmp7, FIX(0.410524528)); /* c13 */
+ tmp12 = MULTIPLY(tmp0 + tmp2, FIX(1.247225013)) + /* c5 */
+ MULTIPLY(tmp5 + tmp7, FIX(0.666655658)); /* c11 */
+ tmp13 = MULTIPLY(tmp0 + tmp3, FIX(1.093201867)) + /* c7 */
+ MULTIPLY(tmp4 - tmp7, FIX(0.897167586)); /* c9 */
+ tmp14 = MULTIPLY(tmp1 + tmp2, FIX(0.138617169)) + /* c15 */
+ MULTIPLY(tmp6 - tmp5, FIX(1.407403738)); /* c1 */
+ tmp15 = MULTIPLY(tmp1 + tmp3, - FIX(0.666655658)) + /* -c11 */
+ MULTIPLY(tmp4 + tmp6, - FIX(1.247225013)); /* -c5 */
+ tmp16 = MULTIPLY(tmp2 + tmp3, - FIX(1.353318001)) + /* -c3 */
+ MULTIPLY(tmp5 - tmp4, FIX(0.410524528)); /* c13 */
+ tmp10 = tmp11 + tmp12 + tmp13 -
+ MULTIPLY(tmp0, FIX(2.286341144)) + /* c7+c5+c3-c1 */
+ MULTIPLY(tmp7, FIX(0.779653625)); /* c15+c13-c11+c9 */
+ tmp11 += tmp14 + tmp15 + MULTIPLY(tmp1, FIX(0.071888074)) /* c9-c3-c15+c11 */
+ - MULTIPLY(tmp6, FIX(1.663905119)); /* c7+c13+c1-c5 */
+ tmp12 += tmp14 + tmp16 - MULTIPLY(tmp2, FIX(1.125726048)) /* c7+c5+c15-c3 */
+ + MULTIPLY(tmp5, FIX(1.227391138)); /* c9-c11+c1-c13 */
+ tmp13 += tmp15 + tmp16 + MULTIPLY(tmp3, FIX(1.065388962)) /* c15+c3+c11-c7 */
+ + MULTIPLY(tmp4, FIX(2.167985692)); /* c1+c13+c5-c9 */
+
+ dataptr[1] = (DCTELEM) DESCALE(tmp10, CONST_BITS-PASS1_BITS);
+ dataptr[3] = (DCTELEM) DESCALE(tmp11, CONST_BITS-PASS1_BITS);
+ dataptr[5] = (DCTELEM) DESCALE(tmp12, CONST_BITS-PASS1_BITS);
+ dataptr[7] = (DCTELEM) DESCALE(tmp13, CONST_BITS-PASS1_BITS);
+
+ ctr++;
+
+ if (ctr != DCTSIZE) {
+ if (ctr == DCTSIZE * 2)
+ break; /* Done. */
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ } else
+ dataptr = workspace; /* switch pointer to extended workspace */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ * We must also scale the output by (8/16)**2 = 1/2**2.
+ */
+
+ dataptr = data;
+ wsptr = workspace;
+ for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*7];
+ tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*6];
+ tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*5];
+ tmp3 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*4];
+ tmp4 = dataptr[DCTSIZE*4] + wsptr[DCTSIZE*3];
+ tmp5 = dataptr[DCTSIZE*5] + wsptr[DCTSIZE*2];
+ tmp6 = dataptr[DCTSIZE*6] + wsptr[DCTSIZE*1];
+ tmp7 = dataptr[DCTSIZE*7] + wsptr[DCTSIZE*0];
+
+ tmp10 = tmp0 + tmp7;
+ tmp14 = tmp0 - tmp7;
+ tmp11 = tmp1 + tmp6;
+ tmp15 = tmp1 - tmp6;
+ tmp12 = tmp2 + tmp5;
+ tmp16 = tmp2 - tmp5;
+ tmp13 = tmp3 + tmp4;
+ tmp17 = tmp3 - tmp4;
+
+ tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*7];
+ tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*6];
+ tmp2 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*5];
+ tmp3 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*4];
+ tmp4 = dataptr[DCTSIZE*4] - wsptr[DCTSIZE*3];
+ tmp5 = dataptr[DCTSIZE*5] - wsptr[DCTSIZE*2];
+ tmp6 = dataptr[DCTSIZE*6] - wsptr[DCTSIZE*1];
+ tmp7 = dataptr[DCTSIZE*7] - wsptr[DCTSIZE*0];
+
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(tmp10 + tmp11 + tmp12 + tmp13, PASS1_BITS+2);
+ dataptr[DCTSIZE*4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp13, FIX(1.306562965)) + /* c4[16] = c2[8] */
+ MULTIPLY(tmp11 - tmp12, FIX_0_541196100), /* c12[16] = c6[8] */
+ CONST_BITS+PASS1_BITS+2);
+
+ tmp10 = MULTIPLY(tmp17 - tmp15, FIX(0.275899379)) + /* c14[16] = c7[8] */
+ MULTIPLY(tmp14 - tmp16, FIX(1.387039845)); /* c2[16] = c1[8] */
+
+ dataptr[DCTSIZE*2] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp15, FIX(1.451774982)) /* c6+c14 */
+ + MULTIPLY(tmp16, FIX(2.172734804)), /* c2+10 */
+ CONST_BITS+PASS1_BITS+2);
+ dataptr[DCTSIZE*6] = (DCTELEM)
+ DESCALE(tmp10 - MULTIPLY(tmp14, FIX(0.211164243)) /* c2-c6 */
+ - MULTIPLY(tmp17, FIX(1.061594338)), /* c10+c14 */
+ CONST_BITS+PASS1_BITS+2);
+
+ /* Odd part */
+
+ tmp11 = MULTIPLY(tmp0 + tmp1, FIX(1.353318001)) + /* c3 */
+ MULTIPLY(tmp6 - tmp7, FIX(0.410524528)); /* c13 */
+ tmp12 = MULTIPLY(tmp0 + tmp2, FIX(1.247225013)) + /* c5 */
+ MULTIPLY(tmp5 + tmp7, FIX(0.666655658)); /* c11 */
+ tmp13 = MULTIPLY(tmp0 + tmp3, FIX(1.093201867)) + /* c7 */
+ MULTIPLY(tmp4 - tmp7, FIX(0.897167586)); /* c9 */
+ tmp14 = MULTIPLY(tmp1 + tmp2, FIX(0.138617169)) + /* c15 */
+ MULTIPLY(tmp6 - tmp5, FIX(1.407403738)); /* c1 */
+ tmp15 = MULTIPLY(tmp1 + tmp3, - FIX(0.666655658)) + /* -c11 */
+ MULTIPLY(tmp4 + tmp6, - FIX(1.247225013)); /* -c5 */
+ tmp16 = MULTIPLY(tmp2 + tmp3, - FIX(1.353318001)) + /* -c3 */
+ MULTIPLY(tmp5 - tmp4, FIX(0.410524528)); /* c13 */
+ tmp10 = tmp11 + tmp12 + tmp13 -
+ MULTIPLY(tmp0, FIX(2.286341144)) + /* c7+c5+c3-c1 */
+ MULTIPLY(tmp7, FIX(0.779653625)); /* c15+c13-c11+c9 */
+ tmp11 += tmp14 + tmp15 + MULTIPLY(tmp1, FIX(0.071888074)) /* c9-c3-c15+c11 */
+ - MULTIPLY(tmp6, FIX(1.663905119)); /* c7+c13+c1-c5 */
+ tmp12 += tmp14 + tmp16 - MULTIPLY(tmp2, FIX(1.125726048)) /* c7+c5+c15-c3 */
+ + MULTIPLY(tmp5, FIX(1.227391138)); /* c9-c11+c1-c13 */
+ tmp13 += tmp15 + tmp16 + MULTIPLY(tmp3, FIX(1.065388962)) /* c15+c3+c11-c7 */
+ + MULTIPLY(tmp4, FIX(2.167985692)); /* c1+c13+c5-c9 */
+
+ dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp10, CONST_BITS+PASS1_BITS+2);
+ dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp11, CONST_BITS+PASS1_BITS+2);
+ dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp12, CONST_BITS+PASS1_BITS+2);
+ dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp13, CONST_BITS+PASS1_BITS+2);
+
+ dataptr++; /* advance pointer to next column */
+ wsptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 16x8 sample block.
+ *
+ * 16-point FDCT in pass 1 (rows), 8-point in pass 2 (columns).
+ */
+
+GLOBAL(void)
+jpeg_fdct_16x8 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16, tmp17;
+ INT32 z1;
+ DCTELEM *dataptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+ /* 16-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/32). */
+
+ dataptr = data;
+ ctr = 0;
+ for (ctr = 0; ctr < DCTSIZE; ctr++) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[15]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[14]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[13]);
+ tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[12]);
+ tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[11]);
+ tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[10]);
+ tmp6 = GETJSAMPLE(elemptr[6]) + GETJSAMPLE(elemptr[9]);
+ tmp7 = GETJSAMPLE(elemptr[7]) + GETJSAMPLE(elemptr[8]);
+
+ tmp10 = tmp0 + tmp7;
+ tmp14 = tmp0 - tmp7;
+ tmp11 = tmp1 + tmp6;
+ tmp15 = tmp1 - tmp6;
+ tmp12 = tmp2 + tmp5;
+ tmp16 = tmp2 - tmp5;
+ tmp13 = tmp3 + tmp4;
+ tmp17 = tmp3 - tmp4;
+
+ tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[15]);
+ tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[14]);
+ tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[13]);
+ tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[12]);
+ tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[11]);
+ tmp5 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[10]);
+ tmp6 = GETJSAMPLE(elemptr[6]) - GETJSAMPLE(elemptr[9]);
+ tmp7 = GETJSAMPLE(elemptr[7]) - GETJSAMPLE(elemptr[8]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((tmp10 + tmp11 + tmp12 + tmp13 - 16 * CENTERJSAMPLE) << PASS1_BITS);
+ dataptr[4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp13, FIX(1.306562965)) + /* c4[16] = c2[8] */
+ MULTIPLY(tmp11 - tmp12, FIX_0_541196100), /* c12[16] = c6[8] */
+ CONST_BITS-PASS1_BITS);
+
+ tmp10 = MULTIPLY(tmp17 - tmp15, FIX(0.275899379)) + /* c14[16] = c7[8] */
+ MULTIPLY(tmp14 - tmp16, FIX(1.387039845)); /* c2[16] = c1[8] */
+
+ dataptr[2] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp15, FIX(1.451774982)) /* c6+c14 */
+ + MULTIPLY(tmp16, FIX(2.172734804)), /* c2+c10 */
+ CONST_BITS-PASS1_BITS);
+ dataptr[6] = (DCTELEM)
+ DESCALE(tmp10 - MULTIPLY(tmp14, FIX(0.211164243)) /* c2-c6 */
+ - MULTIPLY(tmp17, FIX(1.061594338)), /* c10+c14 */
+ CONST_BITS-PASS1_BITS);
+
+ /* Odd part */
+
+ tmp11 = MULTIPLY(tmp0 + tmp1, FIX(1.353318001)) + /* c3 */
+ MULTIPLY(tmp6 - tmp7, FIX(0.410524528)); /* c13 */
+ tmp12 = MULTIPLY(tmp0 + tmp2, FIX(1.247225013)) + /* c5 */
+ MULTIPLY(tmp5 + tmp7, FIX(0.666655658)); /* c11 */
+ tmp13 = MULTIPLY(tmp0 + tmp3, FIX(1.093201867)) + /* c7 */
+ MULTIPLY(tmp4 - tmp7, FIX(0.897167586)); /* c9 */
+ tmp14 = MULTIPLY(tmp1 + tmp2, FIX(0.138617169)) + /* c15 */
+ MULTIPLY(tmp6 - tmp5, FIX(1.407403738)); /* c1 */
+ tmp15 = MULTIPLY(tmp1 + tmp3, - FIX(0.666655658)) + /* -c11 */
+ MULTIPLY(tmp4 + tmp6, - FIX(1.247225013)); /* -c5 */
+ tmp16 = MULTIPLY(tmp2 + tmp3, - FIX(1.353318001)) + /* -c3 */
+ MULTIPLY(tmp5 - tmp4, FIX(0.410524528)); /* c13 */
+ tmp10 = tmp11 + tmp12 + tmp13 -
+ MULTIPLY(tmp0, FIX(2.286341144)) + /* c7+c5+c3-c1 */
+ MULTIPLY(tmp7, FIX(0.779653625)); /* c15+c13-c11+c9 */
+ tmp11 += tmp14 + tmp15 + MULTIPLY(tmp1, FIX(0.071888074)) /* c9-c3-c15+c11 */
+ - MULTIPLY(tmp6, FIX(1.663905119)); /* c7+c13+c1-c5 */
+ tmp12 += tmp14 + tmp16 - MULTIPLY(tmp2, FIX(1.125726048)) /* c7+c5+c15-c3 */
+ + MULTIPLY(tmp5, FIX(1.227391138)); /* c9-c11+c1-c13 */
+ tmp13 += tmp15 + tmp16 + MULTIPLY(tmp3, FIX(1.065388962)) /* c15+c3+c11-c7 */
+ + MULTIPLY(tmp4, FIX(2.167985692)); /* c1+c13+c5-c9 */
+
+ dataptr[1] = (DCTELEM) DESCALE(tmp10, CONST_BITS-PASS1_BITS);
+ dataptr[3] = (DCTELEM) DESCALE(tmp11, CONST_BITS-PASS1_BITS);
+ dataptr[5] = (DCTELEM) DESCALE(tmp12, CONST_BITS-PASS1_BITS);
+ dataptr[7] = (DCTELEM) DESCALE(tmp13, CONST_BITS-PASS1_BITS);
+
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ * We must also scale the output by 8/16 = 1/2.
+ */
+
+ dataptr = data;
+ for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
/* Even part per LL&M figure 1 --- note that published figure is faulty;
* rotator "sqrt(2)*c1" should be "sqrt(2)*c6".
*/
-
+
+ tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7];
+ tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6];
+ tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5];
+ tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];
+
+ tmp10 = tmp0 + tmp3;
+ tmp12 = tmp0 - tmp3;
+ tmp11 = tmp1 + tmp2;
+ tmp13 = tmp1 - tmp2;
+
+ tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7];
+ tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6];
+ tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];
+ tmp3 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];
+
+ dataptr[DCTSIZE*0] = (DCTELEM) DESCALE(tmp10 + tmp11, PASS1_BITS+1);
+ dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp10 - tmp11, PASS1_BITS+1);
+
+ z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100);
+ dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, FIX_0_765366865),
+ CONST_BITS+PASS1_BITS+1);
+ dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 - MULTIPLY(tmp13, FIX_1_847759065),
+ CONST_BITS+PASS1_BITS+1);
+
+ /* Odd part per figure 8 --- note paper omits factor of sqrt(2).
+ * 8-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/16).
+ * i0..i3 in the paper are tmp0..tmp3 here.
+ */
+
+ tmp10 = tmp0 + tmp3;
+ tmp11 = tmp1 + tmp2;
+ tmp12 = tmp0 + tmp2;
+ tmp13 = tmp1 + tmp3;
+ z1 = MULTIPLY(tmp12 + tmp13, FIX_1_175875602); /* c3 */
+
+ tmp0 = MULTIPLY(tmp0, FIX_1_501321110); /* c1+c3-c5-c7 */
+ tmp1 = MULTIPLY(tmp1, FIX_3_072711026); /* c1+c3+c5-c7 */
+ tmp2 = MULTIPLY(tmp2, FIX_2_053119869); /* c1+c3-c5+c7 */
+ tmp3 = MULTIPLY(tmp3, FIX_0_298631336); /* -c1+c3+c5-c7 */
+ tmp10 = MULTIPLY(tmp10, - FIX_0_899976223); /* c7-c3 */
+ tmp11 = MULTIPLY(tmp11, - FIX_2_562915447); /* -c1-c3 */
+ tmp12 = MULTIPLY(tmp12, - FIX_0_390180644); /* c5-c3 */
+ tmp13 = MULTIPLY(tmp13, - FIX_1_961570560); /* -c3-c5 */
+
+ tmp12 += z1;
+ tmp13 += z1;
+
+ dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp0 + tmp10 + tmp12,
+ CONST_BITS+PASS1_BITS+1);
+ dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp1 + tmp11 + tmp13,
+ CONST_BITS+PASS1_BITS+1);
+ dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp2 + tmp11 + tmp12,
+ CONST_BITS+PASS1_BITS+1);
+ dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp3 + tmp10 + tmp13,
+ CONST_BITS+PASS1_BITS+1);
+
+ dataptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 14x7 sample block.
+ *
+ * 14-point FDCT in pass 1 (rows), 7-point in pass 2 (columns).
+ */
+
+GLOBAL(void)
+jpeg_fdct_14x7 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6;
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16;
+ INT32 z1, z2, z3;
+ DCTELEM *dataptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Zero bottom row of output coefficient block. */
+ MEMZERO(&data[DCTSIZE*7], SIZEOF(DCTELEM) * DCTSIZE);
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+ /* 14-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/28). */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 7; ctr++) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[13]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[12]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[11]);
+ tmp13 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[10]);
+ tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[9]);
+ tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[8]);
+ tmp6 = GETJSAMPLE(elemptr[6]) + GETJSAMPLE(elemptr[7]);
+
+ tmp10 = tmp0 + tmp6;
+ tmp14 = tmp0 - tmp6;
+ tmp11 = tmp1 + tmp5;
+ tmp15 = tmp1 - tmp5;
+ tmp12 = tmp2 + tmp4;
+ tmp16 = tmp2 - tmp4;
+
+ tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[13]);
+ tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[12]);
+ tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[11]);
+ tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[10]);
+ tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[9]);
+ tmp5 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[8]);
+ tmp6 = GETJSAMPLE(elemptr[6]) - GETJSAMPLE(elemptr[7]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((tmp10 + tmp11 + tmp12 + tmp13 - 14 * CENTERJSAMPLE) << PASS1_BITS);
+ tmp13 += tmp13;
+ dataptr[4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp13, FIX(1.274162392)) + /* c4 */
+ MULTIPLY(tmp11 - tmp13, FIX(0.314692123)) - /* c12 */
+ MULTIPLY(tmp12 - tmp13, FIX(0.881747734)), /* c8 */
+ CONST_BITS-PASS1_BITS);
+
+ tmp10 = MULTIPLY(tmp14 + tmp15, FIX(1.105676686)); /* c6 */
+
+ dataptr[2] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp14, FIX(0.273079590)) /* c2-c6 */
+ + MULTIPLY(tmp16, FIX(0.613604268)), /* c10 */
+ CONST_BITS-PASS1_BITS);
+ dataptr[6] = (DCTELEM)
+ DESCALE(tmp10 - MULTIPLY(tmp15, FIX(1.719280954)) /* c6+c10 */
+ - MULTIPLY(tmp16, FIX(1.378756276)), /* c2 */
+ CONST_BITS-PASS1_BITS);
+
+ /* Odd part */
+
+ tmp10 = tmp1 + tmp2;
+ tmp11 = tmp5 - tmp4;
+ dataptr[7] = (DCTELEM) ((tmp0 - tmp10 + tmp3 - tmp11 - tmp6) << PASS1_BITS);
+ tmp3 <<= CONST_BITS;
+ tmp10 = MULTIPLY(tmp10, - FIX(0.158341681)); /* -c13 */
+ tmp11 = MULTIPLY(tmp11, FIX(1.405321284)); /* c1 */
+ tmp10 += tmp11 - tmp3;
+ tmp11 = MULTIPLY(tmp0 + tmp2, FIX(1.197448846)) + /* c5 */
+ MULTIPLY(tmp4 + tmp6, FIX(0.752406978)); /* c9 */
+ dataptr[5] = (DCTELEM)
+ DESCALE(tmp10 + tmp11 - MULTIPLY(tmp2, FIX(2.373959773)) /* c3+c5-c13 */
+ + MULTIPLY(tmp4, FIX(1.119999435)), /* c1+c11-c9 */
+ CONST_BITS-PASS1_BITS);
+ tmp12 = MULTIPLY(tmp0 + tmp1, FIX(1.334852607)) + /* c3 */
+ MULTIPLY(tmp5 - tmp6, FIX(0.467085129)); /* c11 */
+ dataptr[3] = (DCTELEM)
+ DESCALE(tmp10 + tmp12 - MULTIPLY(tmp1, FIX(0.424103948)) /* c3-c9-c13 */
+ - MULTIPLY(tmp5, FIX(3.069855259)), /* c1+c5+c11 */
+ CONST_BITS-PASS1_BITS);
+ dataptr[1] = (DCTELEM)
+ DESCALE(tmp11 + tmp12 + tmp3 + tmp6 -
+ MULTIPLY(tmp0 + tmp6, FIX(1.126980169)), /* c3+c5-c1 */
+ CONST_BITS-PASS1_BITS);
+
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ * We must also scale the output by (8/14)*(8/7) = 32/49, which we
+ * partially fold into the constant multipliers and final shifting:
+ * 7-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/14) * 64/49.
+ */
+
+ dataptr = data;
+ for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*6];
+ tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*5];
+ tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*4];
+ tmp3 = dataptr[DCTSIZE*3];
+
+ tmp10 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*6];
+ tmp11 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*5];
+ tmp12 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*4];
+
+ z1 = tmp0 + tmp2;
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(z1 + tmp1 + tmp3, FIX(1.306122449)), /* 64/49 */
+ CONST_BITS+PASS1_BITS+1);
+ tmp3 += tmp3;
+ z1 -= tmp3;
+ z1 -= tmp3;
+ z1 = MULTIPLY(z1, FIX(0.461784020)); /* (c2+c6-c4)/2 */
+ z2 = MULTIPLY(tmp0 - tmp2, FIX(1.202428084)); /* (c2+c4-c6)/2 */
+ z3 = MULTIPLY(tmp1 - tmp2, FIX(0.411026446)); /* c6 */
+ dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + z2 + z3, CONST_BITS+PASS1_BITS+1);
+ z1 -= z2;
+ z2 = MULTIPLY(tmp0 - tmp1, FIX(1.151670509)); /* c4 */
+ dataptr[DCTSIZE*4] = (DCTELEM)
+ DESCALE(z2 + z3 - MULTIPLY(tmp1 - tmp3, FIX(0.923568041)), /* c2+c6-c4 */
+ CONST_BITS+PASS1_BITS+1);
+ dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS+PASS1_BITS+1);
+
+ /* Odd part */
+
+ tmp1 = MULTIPLY(tmp10 + tmp11, FIX(1.221765677)); /* (c3+c1-c5)/2 */
+ tmp2 = MULTIPLY(tmp10 - tmp11, FIX(0.222383464)); /* (c3+c5-c1)/2 */
+ tmp0 = tmp1 - tmp2;
+ tmp1 += tmp2;
+ tmp2 = MULTIPLY(tmp11 + tmp12, - FIX(1.800824523)); /* -c1 */
+ tmp1 += tmp2;
+ tmp3 = MULTIPLY(tmp10 + tmp12, FIX(0.801442310)); /* c5 */
+ tmp0 += tmp3;
+ tmp2 += tmp3 + MULTIPLY(tmp12, FIX(2.443531355)); /* c3+c1-c5 */
+
+ dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp0, CONST_BITS+PASS1_BITS+1);
+ dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp1, CONST_BITS+PASS1_BITS+1);
+ dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp2, CONST_BITS+PASS1_BITS+1);
+
+ dataptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 12x6 sample block.
+ *
+ * 12-point FDCT in pass 1 (rows), 6-point in pass 2 (columns).
+ */
+
+GLOBAL(void)
+jpeg_fdct_12x6 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5;
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15;
+ DCTELEM *dataptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Zero 2 bottom rows of output coefficient block. */
+ MEMZERO(&data[DCTSIZE*6], SIZEOF(DCTELEM) * DCTSIZE * 2);
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+ /* 12-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/24). */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 6; ctr++) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[11]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[10]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[9]);
+ tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[8]);
+ tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[7]);
+ tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[6]);
+
+ tmp10 = tmp0 + tmp5;
+ tmp13 = tmp0 - tmp5;
+ tmp11 = tmp1 + tmp4;
+ tmp14 = tmp1 - tmp4;
+ tmp12 = tmp2 + tmp3;
+ tmp15 = tmp2 - tmp3;
+
+ tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[11]);
+ tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[10]);
+ tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[9]);
+ tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[8]);
+ tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[7]);
+ tmp5 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[6]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((tmp10 + tmp11 + tmp12 - 12 * CENTERJSAMPLE) << PASS1_BITS);
+ dataptr[6] = (DCTELEM) ((tmp13 - tmp14 - tmp15) << PASS1_BITS);
+ dataptr[4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.224744871)), /* c4 */
+ CONST_BITS-PASS1_BITS);
+ dataptr[2] = (DCTELEM)
+ DESCALE(tmp14 - tmp15 + MULTIPLY(tmp13 + tmp15, FIX(1.366025404)), /* c2 */
+ CONST_BITS-PASS1_BITS);
+
+ /* Odd part */
+
+ tmp10 = MULTIPLY(tmp1 + tmp4, FIX_0_541196100); /* c9 */
+ tmp14 = tmp10 + MULTIPLY(tmp1, FIX_0_765366865); /* c3-c9 */
+ tmp15 = tmp10 - MULTIPLY(tmp4, FIX_1_847759065); /* c3+c9 */
+ tmp12 = MULTIPLY(tmp0 + tmp2, FIX(1.121971054)); /* c5 */
+ tmp13 = MULTIPLY(tmp0 + tmp3, FIX(0.860918669)); /* c7 */
+ tmp10 = tmp12 + tmp13 + tmp14 - MULTIPLY(tmp0, FIX(0.580774953)) /* c5+c7-c1 */
+ + MULTIPLY(tmp5, FIX(0.184591911)); /* c11 */
+ tmp11 = MULTIPLY(tmp2 + tmp3, - FIX(0.184591911)); /* -c11 */
+ tmp12 += tmp11 - tmp15 - MULTIPLY(tmp2, FIX(2.339493912)) /* c1+c5-c11 */
+ + MULTIPLY(tmp5, FIX(0.860918669)); /* c7 */
+ tmp13 += tmp11 - tmp14 + MULTIPLY(tmp3, FIX(0.725788011)) /* c1+c11-c7 */
+ - MULTIPLY(tmp5, FIX(1.121971054)); /* c5 */
+ tmp11 = tmp15 + MULTIPLY(tmp0 - tmp3, FIX(1.306562965)) /* c3 */
+ - MULTIPLY(tmp2 + tmp5, FIX_0_541196100); /* c9 */
+
+ dataptr[1] = (DCTELEM) DESCALE(tmp10, CONST_BITS-PASS1_BITS);
+ dataptr[3] = (DCTELEM) DESCALE(tmp11, CONST_BITS-PASS1_BITS);
+ dataptr[5] = (DCTELEM) DESCALE(tmp12, CONST_BITS-PASS1_BITS);
+ dataptr[7] = (DCTELEM) DESCALE(tmp13, CONST_BITS-PASS1_BITS);
+
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ * We must also scale the output by (8/12)*(8/6) = 8/9, which we
+ * partially fold into the constant multipliers and final shifting:
+ * 6-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/12) * 16/9.
+ */
+
+ dataptr = data;
+ for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*5];
+ tmp11 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*4];
+ tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*3];
+
+ tmp10 = tmp0 + tmp2;
+ tmp12 = tmp0 - tmp2;
+
+ tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*5];
+ tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*4];
+ tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*3];
+
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 + tmp11, FIX(1.777777778)), /* 16/9 */
+ CONST_BITS+PASS1_BITS+1);
+ dataptr[DCTSIZE*2] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp12, FIX(2.177324216)), /* c2 */
+ CONST_BITS+PASS1_BITS+1);
+ dataptr[DCTSIZE*4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp11 - tmp11, FIX(1.257078722)), /* c4 */
+ CONST_BITS+PASS1_BITS+1);
+
+ /* Odd part */
+
+ tmp10 = MULTIPLY(tmp0 + tmp2, FIX(0.650711829)); /* c5 */
+
+ dataptr[DCTSIZE*1] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp0 + tmp1, FIX(1.777777778)), /* 16/9 */
+ CONST_BITS+PASS1_BITS+1);
+ dataptr[DCTSIZE*3] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0 - tmp1 - tmp2, FIX(1.777777778)), /* 16/9 */
+ CONST_BITS+PASS1_BITS+1);
+ dataptr[DCTSIZE*5] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp2 - tmp1, FIX(1.777777778)), /* 16/9 */
+ CONST_BITS+PASS1_BITS+1);
+
+ dataptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 10x5 sample block.
+ *
+ * 10-point FDCT in pass 1 (rows), 5-point in pass 2 (columns).
+ */
+
+GLOBAL(void)
+jpeg_fdct_10x5 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp4;
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14;
+ DCTELEM *dataptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Zero 3 bottom rows of output coefficient block. */
+ MEMZERO(&data[DCTSIZE*5], SIZEOF(DCTELEM) * DCTSIZE * 3);
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+ /* 10-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/20). */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 5; ctr++) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[9]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[8]);
+ tmp12 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[7]);
+ tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[6]);
+ tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[5]);
+
+ tmp10 = tmp0 + tmp4;
+ tmp13 = tmp0 - tmp4;
+ tmp11 = tmp1 + tmp3;
+ tmp14 = tmp1 - tmp3;
+
+ tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[9]);
+ tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[8]);
+ tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[7]);
+ tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[6]);
+ tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[5]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((tmp10 + tmp11 + tmp12 - 10 * CENTERJSAMPLE) << PASS1_BITS);
+ tmp12 += tmp12;
+ dataptr[4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.144122806)) - /* c4 */
+ MULTIPLY(tmp11 - tmp12, FIX(0.437016024)), /* c8 */
+ CONST_BITS-PASS1_BITS);
+ tmp10 = MULTIPLY(tmp13 + tmp14, FIX(0.831253876)); /* c6 */
+ dataptr[2] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp13, FIX(0.513743148)), /* c2-c6 */
+ CONST_BITS-PASS1_BITS);
+ dataptr[6] = (DCTELEM)
+ DESCALE(tmp10 - MULTIPLY(tmp14, FIX(2.176250899)), /* c2+c6 */
+ CONST_BITS-PASS1_BITS);
+
+ /* Odd part */
+
+ tmp10 = tmp0 + tmp4;
+ tmp11 = tmp1 - tmp3;
+ dataptr[5] = (DCTELEM) ((tmp10 - tmp11 - tmp2) << PASS1_BITS);
+ tmp2 <<= CONST_BITS;
+ dataptr[1] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0, FIX(1.396802247)) + /* c1 */
+ MULTIPLY(tmp1, FIX(1.260073511)) + tmp2 + /* c3 */
+ MULTIPLY(tmp3, FIX(0.642039522)) + /* c7 */
+ MULTIPLY(tmp4, FIX(0.221231742)), /* c9 */
+ CONST_BITS-PASS1_BITS);
+ tmp12 = MULTIPLY(tmp0 - tmp4, FIX(0.951056516)) - /* (c3+c7)/2 */
+ MULTIPLY(tmp1 + tmp3, FIX(0.587785252)); /* (c1-c9)/2 */
+ tmp13 = MULTIPLY(tmp10 + tmp11, FIX(0.309016994)) + /* (c3-c7)/2 */
+ (tmp11 << (CONST_BITS - 1)) - tmp2;
+ dataptr[3] = (DCTELEM) DESCALE(tmp12 + tmp13, CONST_BITS-PASS1_BITS);
+ dataptr[7] = (DCTELEM) DESCALE(tmp12 - tmp13, CONST_BITS-PASS1_BITS);
+
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ * We must also scale the output by (8/10)*(8/5) = 32/25, which we
+ * fold into the constant multipliers:
+ * 5-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/10) * 32/25.
+ */
+
+ dataptr = data;
+ for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*4];
+ tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*3];
+ tmp2 = dataptr[DCTSIZE*2];
+
+ tmp10 = tmp0 + tmp1;
+ tmp11 = tmp0 - tmp1;
+
+ tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*4];
+ tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*3];
+
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 + tmp2, FIX(1.28)), /* 32/25 */
+ CONST_BITS+PASS1_BITS);
+ tmp11 = MULTIPLY(tmp11, FIX(1.011928851)); /* (c2+c4)/2 */
+ tmp10 -= tmp2 << 2;
+ tmp10 = MULTIPLY(tmp10, FIX(0.452548340)); /* (c2-c4)/2 */
+ dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(tmp11 + tmp10, CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp11 - tmp10, CONST_BITS+PASS1_BITS);
+
+ /* Odd part */
+
+ tmp10 = MULTIPLY(tmp0 + tmp1, FIX(1.064004961)); /* c3 */
+
+ dataptr[DCTSIZE*1] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp0, FIX(0.657591230)), /* c1-c3 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*3] = (DCTELEM)
+ DESCALE(tmp10 - MULTIPLY(tmp1, FIX(2.785601151)), /* c1+c3 */
+ CONST_BITS+PASS1_BITS);
+
+ dataptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on an 8x4 sample block.
+ *
+ * 8-point FDCT in pass 1 (rows), 4-point in pass 2 (columns).
+ */
+
+GLOBAL(void)
+jpeg_fdct_8x4 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3;
+ INT32 tmp10, tmp11, tmp12, tmp13;
+ INT32 z1;
+ DCTELEM *dataptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Zero 4 bottom rows of output coefficient block. */
+ MEMZERO(&data[DCTSIZE*4], SIZEOF(DCTELEM) * DCTSIZE * 4);
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+ /* We must also scale the output by 8/4 = 2, which we add here. */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 4; ctr++) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part per LL&M figure 1 --- note that published figure is faulty;
+ * rotator "sqrt(2)*c1" should be "sqrt(2)*c6".
+ */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[7]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[6]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[5]);
+ tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[4]);
+
+ tmp10 = tmp0 + tmp3;
+ tmp12 = tmp0 - tmp3;
+ tmp11 = tmp1 + tmp2;
+ tmp13 = tmp1 - tmp2;
+
+ tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[7]);
+ tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[6]);
+ tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[5]);
+ tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[4]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((tmp10 + tmp11 - 8 * CENTERJSAMPLE) << (PASS1_BITS+1));
+ dataptr[4] = (DCTELEM) ((tmp10 - tmp11) << (PASS1_BITS+1));
+
+ z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100);
+ /* Add fudge factor here for final descale. */
+ z1 += ONE << (CONST_BITS-PASS1_BITS-2);
+ dataptr[2] = (DCTELEM) RIGHT_SHIFT(z1 + MULTIPLY(tmp12, FIX_0_765366865),
+ CONST_BITS-PASS1_BITS-1);
+ dataptr[6] = (DCTELEM) RIGHT_SHIFT(z1 - MULTIPLY(tmp13, FIX_1_847759065),
+ CONST_BITS-PASS1_BITS-1);
+
+ /* Odd part per figure 8 --- note paper omits factor of sqrt(2).
+ * 8-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/16).
+ * i0..i3 in the paper are tmp0..tmp3 here.
+ */
+
+ tmp10 = tmp0 + tmp3;
+ tmp11 = tmp1 + tmp2;
+ tmp12 = tmp0 + tmp2;
+ tmp13 = tmp1 + tmp3;
+ z1 = MULTIPLY(tmp12 + tmp13, FIX_1_175875602); /* c3 */
+ /* Add fudge factor here for final descale. */
+ z1 += ONE << (CONST_BITS-PASS1_BITS-2);
+
+ tmp0 = MULTIPLY(tmp0, FIX_1_501321110); /* c1+c3-c5-c7 */
+ tmp1 = MULTIPLY(tmp1, FIX_3_072711026); /* c1+c3+c5-c7 */
+ tmp2 = MULTIPLY(tmp2, FIX_2_053119869); /* c1+c3-c5+c7 */
+ tmp3 = MULTIPLY(tmp3, FIX_0_298631336); /* -c1+c3+c5-c7 */
+ tmp10 = MULTIPLY(tmp10, - FIX_0_899976223); /* c7-c3 */
+ tmp11 = MULTIPLY(tmp11, - FIX_2_562915447); /* -c1-c3 */
+ tmp12 = MULTIPLY(tmp12, - FIX_0_390180644); /* c5-c3 */
+ tmp13 = MULTIPLY(tmp13, - FIX_1_961570560); /* -c3-c5 */
+
+ tmp12 += z1;
+ tmp13 += z1;
+
+ dataptr[1] = (DCTELEM)
+ RIGHT_SHIFT(tmp0 + tmp10 + tmp12, CONST_BITS-PASS1_BITS-1);
+ dataptr[3] = (DCTELEM)
+ RIGHT_SHIFT(tmp1 + tmp11 + tmp13, CONST_BITS-PASS1_BITS-1);
+ dataptr[5] = (DCTELEM)
+ RIGHT_SHIFT(tmp2 + tmp11 + tmp12, CONST_BITS-PASS1_BITS-1);
+ dataptr[7] = (DCTELEM)
+ RIGHT_SHIFT(tmp3 + tmp10 + tmp13, CONST_BITS-PASS1_BITS-1);
+
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ * 4-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/16).
+ */
+
+ dataptr = data;
+ for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*3] + (ONE << (PASS1_BITS-1));
+ tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*2];
+
+ tmp10 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*3];
+ tmp11 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*2];
+
+ dataptr[DCTSIZE*0] = (DCTELEM) RIGHT_SHIFT(tmp0 + tmp1, PASS1_BITS);
+ dataptr[DCTSIZE*2] = (DCTELEM) RIGHT_SHIFT(tmp0 - tmp1, PASS1_BITS);
+
+ /* Odd part */
+
+ tmp0 = MULTIPLY(tmp10 + tmp11, FIX_0_541196100); /* c6 */
+ /* Add fudge factor here for final descale. */
+ tmp0 += ONE << (CONST_BITS+PASS1_BITS-1);
+
+ dataptr[DCTSIZE*1] = (DCTELEM)
+ RIGHT_SHIFT(tmp0 + MULTIPLY(tmp10, FIX_0_765366865), /* c2-c6 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*3] = (DCTELEM)
+ RIGHT_SHIFT(tmp0 - MULTIPLY(tmp11, FIX_1_847759065), /* c2+c6 */
+ CONST_BITS+PASS1_BITS);
+
+ dataptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 6x3 sample block.
+ *
+ * 6-point FDCT in pass 1 (rows), 3-point in pass 2 (columns).
+ */
+
+GLOBAL(void)
+jpeg_fdct_6x3 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2;
+ INT32 tmp10, tmp11, tmp12;
+ DCTELEM *dataptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pre-zero output coefficient block. */
+ MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2);
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+ /* We scale the results further by 2 as part of output adaption */
+ /* scaling for different DCT size. */
+ /* 6-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/12). */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 3; ctr++) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[5]);
+ tmp11 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[4]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[3]);
+
+ tmp10 = tmp0 + tmp2;
+ tmp12 = tmp0 - tmp2;
+
+ tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[5]);
+ tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[4]);
+ tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[3]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((tmp10 + tmp11 - 6 * CENTERJSAMPLE) << (PASS1_BITS+1));
+ dataptr[2] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp12, FIX(1.224744871)), /* c2 */
+ CONST_BITS-PASS1_BITS-1);
+ dataptr[4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp11 - tmp11, FIX(0.707106781)), /* c4 */
+ CONST_BITS-PASS1_BITS-1);
+
+ /* Odd part */
+
+ tmp10 = DESCALE(MULTIPLY(tmp0 + tmp2, FIX(0.366025404)), /* c5 */
+ CONST_BITS-PASS1_BITS-1);
+
+ dataptr[1] = (DCTELEM) (tmp10 + ((tmp0 + tmp1) << (PASS1_BITS+1)));
+ dataptr[3] = (DCTELEM) ((tmp0 - tmp1 - tmp2) << (PASS1_BITS+1));
+ dataptr[5] = (DCTELEM) (tmp10 + ((tmp2 - tmp1) << (PASS1_BITS+1)));
+
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ * We must also scale the output by (8/6)*(8/3) = 32/9, which we partially
+ * fold into the constant multipliers (other part was done in pass 1):
+ * 3-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/6) * 16/9.
+ */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 6; ctr++) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*2];
+ tmp1 = dataptr[DCTSIZE*1];
+
+ tmp2 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*2];
+
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0 + tmp1, FIX(1.777777778)), /* 16/9 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*2] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0 - tmp1 - tmp1, FIX(1.257078722)), /* c2 */
+ CONST_BITS+PASS1_BITS);
+
+ /* Odd part */
+
+ dataptr[DCTSIZE*1] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp2, FIX(2.177324216)), /* c1 */
+ CONST_BITS+PASS1_BITS);
+
+ dataptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 4x2 sample block.
+ *
+ * 4-point FDCT in pass 1 (rows), 2-point in pass 2 (columns).
+ */
+
+GLOBAL(void)
+jpeg_fdct_4x2 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1;
+ INT32 tmp10, tmp11;
+ DCTELEM *dataptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pre-zero output coefficient block. */
+ MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2);
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+ /* We must also scale the output by (8/4)*(8/2) = 2**3, which we add here. */
+ /* 4-point FDCT kernel, */
+ /* cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point FDCT]. */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 2; ctr++) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[3]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[2]);
+
+ tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[3]);
+ tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[2]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((tmp0 + tmp1 - 4 * CENTERJSAMPLE) << (PASS1_BITS+3));
+ dataptr[2] = (DCTELEM) ((tmp0 - tmp1) << (PASS1_BITS+3));
+
+ /* Odd part */
+
+ tmp0 = MULTIPLY(tmp10 + tmp11, FIX_0_541196100); /* c6 */
+ /* Add fudge factor here for final descale. */
+ tmp0 += ONE << (CONST_BITS-PASS1_BITS-4);
+
+ dataptr[1] = (DCTELEM)
+ RIGHT_SHIFT(tmp0 + MULTIPLY(tmp10, FIX_0_765366865), /* c2-c6 */
+ CONST_BITS-PASS1_BITS-3);
+ dataptr[3] = (DCTELEM)
+ RIGHT_SHIFT(tmp0 - MULTIPLY(tmp11, FIX_1_847759065), /* c2+c6 */
+ CONST_BITS-PASS1_BITS-3);
+
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 4; ctr++) {
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp0 = dataptr[DCTSIZE*0] + (ONE << (PASS1_BITS-1));
+ tmp1 = dataptr[DCTSIZE*1];
+
+ dataptr[DCTSIZE*0] = (DCTELEM) RIGHT_SHIFT(tmp0 + tmp1, PASS1_BITS);
+
+ /* Odd part */
+
+ dataptr[DCTSIZE*1] = (DCTELEM) RIGHT_SHIFT(tmp0 - tmp1, PASS1_BITS);
+
+ dataptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 2x1 sample block.
+ *
+ * 2-point FDCT in pass 1 (rows), 1-point in pass 2 (columns).
+ */
+
+GLOBAL(void)
+jpeg_fdct_2x1 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1;
+ JSAMPROW elemptr;
+
+ /* Pre-zero output coefficient block. */
+ MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2);
+
+ elemptr = sample_data[0] + start_col;
+
+ tmp0 = GETJSAMPLE(elemptr[0]);
+ tmp1 = GETJSAMPLE(elemptr[1]);
+
+ /* We leave the results scaled up by an overall factor of 8.
+ * We must also scale the output by (8/2)*(8/1) = 2**5.
+ */
+
+ /* Even part */
+ /* Apply unsigned->signed conversion */
+ data[0] = (DCTELEM) ((tmp0 + tmp1 - 2 * CENTERJSAMPLE) << 5);
+
+ /* Odd part */
+ data[1] = (DCTELEM) ((tmp0 - tmp1) << 5);
+}
+
+
+/*
+ * Perform the forward DCT on an 8x16 sample block.
+ *
+ * 8-point FDCT in pass 1 (rows), 16-point in pass 2 (columns).
+ */
+
+GLOBAL(void)
+jpeg_fdct_8x16 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16, tmp17;
+ INT32 z1;
+ DCTELEM workspace[DCTSIZE2];
+ DCTELEM *dataptr;
+ DCTELEM *wsptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+
+ dataptr = data;
+ ctr = 0;
+ for (;;) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part per LL&M figure 1 --- note that published figure is faulty;
+ * rotator "sqrt(2)*c1" should be "sqrt(2)*c6".
+ */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[7]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[6]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[5]);
+ tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[4]);
+
tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
+ tmp12 = tmp0 - tmp3;
tmp11 = tmp1 + tmp2;
- tmp12 = tmp1 - tmp2;
-
- dataptr[DCTSIZE*0] = (DCTELEM) DESCALE(tmp10 + tmp11, PASS1_BITS);
- dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp10 - tmp11, PASS1_BITS);
-
+ tmp13 = tmp1 - tmp2;
+
+ tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[7]);
+ tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[6]);
+ tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[5]);
+ tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[4]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM) ((tmp10 + tmp11 - 8 * CENTERJSAMPLE) << PASS1_BITS);
+ dataptr[4] = (DCTELEM) ((tmp10 - tmp11) << PASS1_BITS);
+
z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100);
- dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865),
- CONST_BITS+PASS1_BITS);
- dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065),
- CONST_BITS+PASS1_BITS);
-
+ dataptr[2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, FIX_0_765366865),
+ CONST_BITS-PASS1_BITS);
+ dataptr[6] = (DCTELEM) DESCALE(z1 - MULTIPLY(tmp13, FIX_1_847759065),
+ CONST_BITS-PASS1_BITS);
+
/* Odd part per figure 8 --- note paper omits factor of sqrt(2).
- * cK represents cos(K*pi/16).
- * i0..i3 in the paper are tmp4..tmp7 here.
+ * 8-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/16).
+ * i0..i3 in the paper are tmp0..tmp3 here.
*/
-
- z1 = tmp4 + tmp7;
- z2 = tmp5 + tmp6;
- z3 = tmp4 + tmp6;
- z4 = tmp5 + tmp7;
- z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */
-
- tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
- tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
- tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
- tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
- z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
- z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
- z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
- z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
-
- z3 += z5;
- z4 += z5;
-
- dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp4 + z1 + z3,
- CONST_BITS+PASS1_BITS);
- dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp5 + z2 + z4,
- CONST_BITS+PASS1_BITS);
- dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp6 + z2 + z3,
- CONST_BITS+PASS1_BITS);
- dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp7 + z1 + z4,
- CONST_BITS+PASS1_BITS);
-
+
+ tmp10 = tmp0 + tmp3;
+ tmp11 = tmp1 + tmp2;
+ tmp12 = tmp0 + tmp2;
+ tmp13 = tmp1 + tmp3;
+ z1 = MULTIPLY(tmp12 + tmp13, FIX_1_175875602); /* c3 */
+
+ tmp0 = MULTIPLY(tmp0, FIX_1_501321110); /* c1+c3-c5-c7 */
+ tmp1 = MULTIPLY(tmp1, FIX_3_072711026); /* c1+c3+c5-c7 */
+ tmp2 = MULTIPLY(tmp2, FIX_2_053119869); /* c1+c3-c5+c7 */
+ tmp3 = MULTIPLY(tmp3, FIX_0_298631336); /* -c1+c3+c5-c7 */
+ tmp10 = MULTIPLY(tmp10, - FIX_0_899976223); /* c7-c3 */
+ tmp11 = MULTIPLY(tmp11, - FIX_2_562915447); /* -c1-c3 */
+ tmp12 = MULTIPLY(tmp12, - FIX_0_390180644); /* c5-c3 */
+ tmp13 = MULTIPLY(tmp13, - FIX_1_961570560); /* -c3-c5 */
+
+ tmp12 += z1;
+ tmp13 += z1;
+
+ dataptr[1] = (DCTELEM) DESCALE(tmp0 + tmp10 + tmp12, CONST_BITS-PASS1_BITS);
+ dataptr[3] = (DCTELEM) DESCALE(tmp1 + tmp11 + tmp13, CONST_BITS-PASS1_BITS);
+ dataptr[5] = (DCTELEM) DESCALE(tmp2 + tmp11 + tmp12, CONST_BITS-PASS1_BITS);
+ dataptr[7] = (DCTELEM) DESCALE(tmp3 + tmp10 + tmp13, CONST_BITS-PASS1_BITS);
+
+ ctr++;
+
+ if (ctr != DCTSIZE) {
+ if (ctr == DCTSIZE * 2)
+ break; /* Done. */
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ } else
+ dataptr = workspace; /* switch pointer to extended workspace */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ * We must also scale the output by 8/16 = 1/2.
+ * 16-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/32).
+ */
+
+ dataptr = data;
+ wsptr = workspace;
+ for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*7];
+ tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*6];
+ tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*5];
+ tmp3 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*4];
+ tmp4 = dataptr[DCTSIZE*4] + wsptr[DCTSIZE*3];
+ tmp5 = dataptr[DCTSIZE*5] + wsptr[DCTSIZE*2];
+ tmp6 = dataptr[DCTSIZE*6] + wsptr[DCTSIZE*1];
+ tmp7 = dataptr[DCTSIZE*7] + wsptr[DCTSIZE*0];
+
+ tmp10 = tmp0 + tmp7;
+ tmp14 = tmp0 - tmp7;
+ tmp11 = tmp1 + tmp6;
+ tmp15 = tmp1 - tmp6;
+ tmp12 = tmp2 + tmp5;
+ tmp16 = tmp2 - tmp5;
+ tmp13 = tmp3 + tmp4;
+ tmp17 = tmp3 - tmp4;
+
+ tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*7];
+ tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*6];
+ tmp2 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*5];
+ tmp3 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*4];
+ tmp4 = dataptr[DCTSIZE*4] - wsptr[DCTSIZE*3];
+ tmp5 = dataptr[DCTSIZE*5] - wsptr[DCTSIZE*2];
+ tmp6 = dataptr[DCTSIZE*6] - wsptr[DCTSIZE*1];
+ tmp7 = dataptr[DCTSIZE*7] - wsptr[DCTSIZE*0];
+
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(tmp10 + tmp11 + tmp12 + tmp13, PASS1_BITS+1);
+ dataptr[DCTSIZE*4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp13, FIX(1.306562965)) + /* c4[16] = c2[8] */
+ MULTIPLY(tmp11 - tmp12, FIX_0_541196100), /* c12[16] = c6[8] */
+ CONST_BITS+PASS1_BITS+1);
+
+ tmp10 = MULTIPLY(tmp17 - tmp15, FIX(0.275899379)) + /* c14[16] = c7[8] */
+ MULTIPLY(tmp14 - tmp16, FIX(1.387039845)); /* c2[16] = c1[8] */
+
+ dataptr[DCTSIZE*2] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp15, FIX(1.451774982)) /* c6+c14 */
+ + MULTIPLY(tmp16, FIX(2.172734804)), /* c2+c10 */
+ CONST_BITS+PASS1_BITS+1);
+ dataptr[DCTSIZE*6] = (DCTELEM)
+ DESCALE(tmp10 - MULTIPLY(tmp14, FIX(0.211164243)) /* c2-c6 */
+ - MULTIPLY(tmp17, FIX(1.061594338)), /* c10+c14 */
+ CONST_BITS+PASS1_BITS+1);
+
+ /* Odd part */
+
+ tmp11 = MULTIPLY(tmp0 + tmp1, FIX(1.353318001)) + /* c3 */
+ MULTIPLY(tmp6 - tmp7, FIX(0.410524528)); /* c13 */
+ tmp12 = MULTIPLY(tmp0 + tmp2, FIX(1.247225013)) + /* c5 */
+ MULTIPLY(tmp5 + tmp7, FIX(0.666655658)); /* c11 */
+ tmp13 = MULTIPLY(tmp0 + tmp3, FIX(1.093201867)) + /* c7 */
+ MULTIPLY(tmp4 - tmp7, FIX(0.897167586)); /* c9 */
+ tmp14 = MULTIPLY(tmp1 + tmp2, FIX(0.138617169)) + /* c15 */
+ MULTIPLY(tmp6 - tmp5, FIX(1.407403738)); /* c1 */
+ tmp15 = MULTIPLY(tmp1 + tmp3, - FIX(0.666655658)) + /* -c11 */
+ MULTIPLY(tmp4 + tmp6, - FIX(1.247225013)); /* -c5 */
+ tmp16 = MULTIPLY(tmp2 + tmp3, - FIX(1.353318001)) + /* -c3 */
+ MULTIPLY(tmp5 - tmp4, FIX(0.410524528)); /* c13 */
+ tmp10 = tmp11 + tmp12 + tmp13 -
+ MULTIPLY(tmp0, FIX(2.286341144)) + /* c7+c5+c3-c1 */
+ MULTIPLY(tmp7, FIX(0.779653625)); /* c15+c13-c11+c9 */
+ tmp11 += tmp14 + tmp15 + MULTIPLY(tmp1, FIX(0.071888074)) /* c9-c3-c15+c11 */
+ - MULTIPLY(tmp6, FIX(1.663905119)); /* c7+c13+c1-c5 */
+ tmp12 += tmp14 + tmp16 - MULTIPLY(tmp2, FIX(1.125726048)) /* c7+c5+c15-c3 */
+ + MULTIPLY(tmp5, FIX(1.227391138)); /* c9-c11+c1-c13 */
+ tmp13 += tmp15 + tmp16 + MULTIPLY(tmp3, FIX(1.065388962)) /* c15+c3+c11-c7 */
+ + MULTIPLY(tmp4, FIX(2.167985692)); /* c1+c13+c5-c9 */
+
+ dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp10, CONST_BITS+PASS1_BITS+1);
+ dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp11, CONST_BITS+PASS1_BITS+1);
+ dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp12, CONST_BITS+PASS1_BITS+1);
+ dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp13, CONST_BITS+PASS1_BITS+1);
+
dataptr++; /* advance pointer to next column */
+ wsptr++; /* advance pointer to next column */
}
}
+
+/*
+ * Perform the forward DCT on a 7x14 sample block.
+ *
+ * 7-point FDCT in pass 1 (rows), 14-point in pass 2 (columns).
+ */
+
+GLOBAL(void)
+jpeg_fdct_7x14 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6;
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16;
+ INT32 z1, z2, z3;
+ DCTELEM workspace[8*6];
+ DCTELEM *dataptr;
+ DCTELEM *wsptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pre-zero output coefficient block. */
+ MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2);
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+ /* 7-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/14). */
+
+ dataptr = data;
+ ctr = 0;
+ for (;;) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[6]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[5]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[4]);
+ tmp3 = GETJSAMPLE(elemptr[3]);
+
+ tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[6]);
+ tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[5]);
+ tmp12 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[4]);
+
+ z1 = tmp0 + tmp2;
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((z1 + tmp1 + tmp3 - 7 * CENTERJSAMPLE) << PASS1_BITS);
+ tmp3 += tmp3;
+ z1 -= tmp3;
+ z1 -= tmp3;
+ z1 = MULTIPLY(z1, FIX(0.353553391)); /* (c2+c6-c4)/2 */
+ z2 = MULTIPLY(tmp0 - tmp2, FIX(0.920609002)); /* (c2+c4-c6)/2 */
+ z3 = MULTIPLY(tmp1 - tmp2, FIX(0.314692123)); /* c6 */
+ dataptr[2] = (DCTELEM) DESCALE(z1 + z2 + z3, CONST_BITS-PASS1_BITS);
+ z1 -= z2;
+ z2 = MULTIPLY(tmp0 - tmp1, FIX(0.881747734)); /* c4 */
+ dataptr[4] = (DCTELEM)
+ DESCALE(z2 + z3 - MULTIPLY(tmp1 - tmp3, FIX(0.707106781)), /* c2+c6-c4 */
+ CONST_BITS-PASS1_BITS);
+ dataptr[6] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS-PASS1_BITS);
+
+ /* Odd part */
+
+ tmp1 = MULTIPLY(tmp10 + tmp11, FIX(0.935414347)); /* (c3+c1-c5)/2 */
+ tmp2 = MULTIPLY(tmp10 - tmp11, FIX(0.170262339)); /* (c3+c5-c1)/2 */
+ tmp0 = tmp1 - tmp2;
+ tmp1 += tmp2;
+ tmp2 = MULTIPLY(tmp11 + tmp12, - FIX(1.378756276)); /* -c1 */
+ tmp1 += tmp2;
+ tmp3 = MULTIPLY(tmp10 + tmp12, FIX(0.613604268)); /* c5 */
+ tmp0 += tmp3;
+ tmp2 += tmp3 + MULTIPLY(tmp12, FIX(1.870828693)); /* c3+c1-c5 */
+
+ dataptr[1] = (DCTELEM) DESCALE(tmp0, CONST_BITS-PASS1_BITS);
+ dataptr[3] = (DCTELEM) DESCALE(tmp1, CONST_BITS-PASS1_BITS);
+ dataptr[5] = (DCTELEM) DESCALE(tmp2, CONST_BITS-PASS1_BITS);
+
+ ctr++;
+
+ if (ctr != DCTSIZE) {
+ if (ctr == 14)
+ break; /* Done. */
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ } else
+ dataptr = workspace; /* switch pointer to extended workspace */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ * We must also scale the output by (8/7)*(8/14) = 32/49, which we
+ * fold into the constant multipliers:
+ * 14-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/28) * 32/49.
+ */
+
+ dataptr = data;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 7; ctr++) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*5];
+ tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*4];
+ tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*3];
+ tmp13 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*2];
+ tmp4 = dataptr[DCTSIZE*4] + wsptr[DCTSIZE*1];
+ tmp5 = dataptr[DCTSIZE*5] + wsptr[DCTSIZE*0];
+ tmp6 = dataptr[DCTSIZE*6] + dataptr[DCTSIZE*7];
+
+ tmp10 = tmp0 + tmp6;
+ tmp14 = tmp0 - tmp6;
+ tmp11 = tmp1 + tmp5;
+ tmp15 = tmp1 - tmp5;
+ tmp12 = tmp2 + tmp4;
+ tmp16 = tmp2 - tmp4;
+
+ tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*5];
+ tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*4];
+ tmp2 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*3];
+ tmp3 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*2];
+ tmp4 = dataptr[DCTSIZE*4] - wsptr[DCTSIZE*1];
+ tmp5 = dataptr[DCTSIZE*5] - wsptr[DCTSIZE*0];
+ tmp6 = dataptr[DCTSIZE*6] - dataptr[DCTSIZE*7];
+
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 + tmp11 + tmp12 + tmp13,
+ FIX(0.653061224)), /* 32/49 */
+ CONST_BITS+PASS1_BITS);
+ tmp13 += tmp13;
+ dataptr[DCTSIZE*4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp13, FIX(0.832106052)) + /* c4 */
+ MULTIPLY(tmp11 - tmp13, FIX(0.205513223)) - /* c12 */
+ MULTIPLY(tmp12 - tmp13, FIX(0.575835255)), /* c8 */
+ CONST_BITS+PASS1_BITS);
+
+ tmp10 = MULTIPLY(tmp14 + tmp15, FIX(0.722074570)); /* c6 */
+
+ dataptr[DCTSIZE*2] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp14, FIX(0.178337691)) /* c2-c6 */
+ + MULTIPLY(tmp16, FIX(0.400721155)), /* c10 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*6] = (DCTELEM)
+ DESCALE(tmp10 - MULTIPLY(tmp15, FIX(1.122795725)) /* c6+c10 */
+ - MULTIPLY(tmp16, FIX(0.900412262)), /* c2 */
+ CONST_BITS+PASS1_BITS);
+
+ /* Odd part */
+
+ tmp10 = tmp1 + tmp2;
+ tmp11 = tmp5 - tmp4;
+ dataptr[DCTSIZE*7] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0 - tmp10 + tmp3 - tmp11 - tmp6,
+ FIX(0.653061224)), /* 32/49 */
+ CONST_BITS+PASS1_BITS);
+ tmp3 = MULTIPLY(tmp3 , FIX(0.653061224)); /* 32/49 */
+ tmp10 = MULTIPLY(tmp10, - FIX(0.103406812)); /* -c13 */
+ tmp11 = MULTIPLY(tmp11, FIX(0.917760839)); /* c1 */
+ tmp10 += tmp11 - tmp3;
+ tmp11 = MULTIPLY(tmp0 + tmp2, FIX(0.782007410)) + /* c5 */
+ MULTIPLY(tmp4 + tmp6, FIX(0.491367823)); /* c9 */
+ dataptr[DCTSIZE*5] = (DCTELEM)
+ DESCALE(tmp10 + tmp11 - MULTIPLY(tmp2, FIX(1.550341076)) /* c3+c5-c13 */
+ + MULTIPLY(tmp4, FIX(0.731428202)), /* c1+c11-c9 */
+ CONST_BITS+PASS1_BITS);
+ tmp12 = MULTIPLY(tmp0 + tmp1, FIX(0.871740478)) + /* c3 */
+ MULTIPLY(tmp5 - tmp6, FIX(0.305035186)); /* c11 */
+ dataptr[DCTSIZE*3] = (DCTELEM)
+ DESCALE(tmp10 + tmp12 - MULTIPLY(tmp1, FIX(0.276965844)) /* c3-c9-c13 */
+ - MULTIPLY(tmp5, FIX(2.004803435)), /* c1+c5+c11 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*1] = (DCTELEM)
+ DESCALE(tmp11 + tmp12 + tmp3
+ - MULTIPLY(tmp0, FIX(0.735987049)) /* c3+c5-c1 */
+ - MULTIPLY(tmp6, FIX(0.082925825)), /* c9-c11-c13 */
+ CONST_BITS+PASS1_BITS);
+
+ dataptr++; /* advance pointer to next column */
+ wsptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 6x12 sample block.
+ *
+ * 6-point FDCT in pass 1 (rows), 12-point in pass 2 (columns).
+ */
+
+GLOBAL(void)
+jpeg_fdct_6x12 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5;
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15;
+ DCTELEM workspace[8*4];
+ DCTELEM *dataptr;
+ DCTELEM *wsptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pre-zero output coefficient block. */
+ MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2);
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+ /* 6-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/12). */
+
+ dataptr = data;
+ ctr = 0;
+ for (;;) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[5]);
+ tmp11 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[4]);
+ tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[3]);
+
+ tmp10 = tmp0 + tmp2;
+ tmp12 = tmp0 - tmp2;
+
+ tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[5]);
+ tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[4]);
+ tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[3]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((tmp10 + tmp11 - 6 * CENTERJSAMPLE) << PASS1_BITS);
+ dataptr[2] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp12, FIX(1.224744871)), /* c2 */
+ CONST_BITS-PASS1_BITS);
+ dataptr[4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp11 - tmp11, FIX(0.707106781)), /* c4 */
+ CONST_BITS-PASS1_BITS);
+
+ /* Odd part */
+
+ tmp10 = DESCALE(MULTIPLY(tmp0 + tmp2, FIX(0.366025404)), /* c5 */
+ CONST_BITS-PASS1_BITS);
+
+ dataptr[1] = (DCTELEM) (tmp10 + ((tmp0 + tmp1) << PASS1_BITS));
+ dataptr[3] = (DCTELEM) ((tmp0 - tmp1 - tmp2) << PASS1_BITS);
+ dataptr[5] = (DCTELEM) (tmp10 + ((tmp2 - tmp1) << PASS1_BITS));
+
+ ctr++;
+
+ if (ctr != DCTSIZE) {
+ if (ctr == 12)
+ break; /* Done. */
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ } else
+ dataptr = workspace; /* switch pointer to extended workspace */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ * We must also scale the output by (8/6)*(8/12) = 8/9, which we
+ * fold into the constant multipliers:
+ * 12-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/24) * 8/9.
+ */
+
+ dataptr = data;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 6; ctr++) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*3];
+ tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*2];
+ tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*1];
+ tmp3 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*0];
+ tmp4 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*7];
+ tmp5 = dataptr[DCTSIZE*5] + dataptr[DCTSIZE*6];
+
+ tmp10 = tmp0 + tmp5;
+ tmp13 = tmp0 - tmp5;
+ tmp11 = tmp1 + tmp4;
+ tmp14 = tmp1 - tmp4;
+ tmp12 = tmp2 + tmp3;
+ tmp15 = tmp2 - tmp3;
+
+ tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*3];
+ tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*2];
+ tmp2 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*1];
+ tmp3 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*0];
+ tmp4 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*7];
+ tmp5 = dataptr[DCTSIZE*5] - dataptr[DCTSIZE*6];
+
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 + tmp11 + tmp12, FIX(0.888888889)), /* 8/9 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*6] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp13 - tmp14 - tmp15, FIX(0.888888889)), /* 8/9 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.088662108)), /* c4 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*2] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp14 - tmp15, FIX(0.888888889)) + /* 8/9 */
+ MULTIPLY(tmp13 + tmp15, FIX(1.214244803)), /* c2 */
+ CONST_BITS+PASS1_BITS);
+
+ /* Odd part */
+
+ tmp10 = MULTIPLY(tmp1 + tmp4, FIX(0.481063200)); /* c9 */
+ tmp14 = tmp10 + MULTIPLY(tmp1, FIX(0.680326102)); /* c3-c9 */
+ tmp15 = tmp10 - MULTIPLY(tmp4, FIX(1.642452502)); /* c3+c9 */
+ tmp12 = MULTIPLY(tmp0 + tmp2, FIX(0.997307603)); /* c5 */
+ tmp13 = MULTIPLY(tmp0 + tmp3, FIX(0.765261039)); /* c7 */
+ tmp10 = tmp12 + tmp13 + tmp14 - MULTIPLY(tmp0, FIX(0.516244403)) /* c5+c7-c1 */
+ + MULTIPLY(tmp5, FIX(0.164081699)); /* c11 */
+ tmp11 = MULTIPLY(tmp2 + tmp3, - FIX(0.164081699)); /* -c11 */
+ tmp12 += tmp11 - tmp15 - MULTIPLY(tmp2, FIX(2.079550144)) /* c1+c5-c11 */
+ + MULTIPLY(tmp5, FIX(0.765261039)); /* c7 */
+ tmp13 += tmp11 - tmp14 + MULTIPLY(tmp3, FIX(0.645144899)) /* c1+c11-c7 */
+ - MULTIPLY(tmp5, FIX(0.997307603)); /* c5 */
+ tmp11 = tmp15 + MULTIPLY(tmp0 - tmp3, FIX(1.161389302)) /* c3 */
+ - MULTIPLY(tmp2 + tmp5, FIX(0.481063200)); /* c9 */
+
+ dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp10, CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp11, CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp12, CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp13, CONST_BITS+PASS1_BITS);
+
+ dataptr++; /* advance pointer to next column */
+ wsptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 5x10 sample block.
+ *
+ * 5-point FDCT in pass 1 (rows), 10-point in pass 2 (columns).
+ */
+
+GLOBAL(void)
+jpeg_fdct_5x10 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp4;
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14;
+ DCTELEM workspace[8*2];
+ DCTELEM *dataptr;
+ DCTELEM *wsptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pre-zero output coefficient block. */
+ MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2);
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+ /* 5-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/10). */
+
+ dataptr = data;
+ ctr = 0;
+ for (;;) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[4]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[3]);
+ tmp2 = GETJSAMPLE(elemptr[2]);
+
+ tmp10 = tmp0 + tmp1;
+ tmp11 = tmp0 - tmp1;
+
+ tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[4]);
+ tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[3]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((tmp10 + tmp2 - 5 * CENTERJSAMPLE) << PASS1_BITS);
+ tmp11 = MULTIPLY(tmp11, FIX(0.790569415)); /* (c2+c4)/2 */
+ tmp10 -= tmp2 << 2;
+ tmp10 = MULTIPLY(tmp10, FIX(0.353553391)); /* (c2-c4)/2 */
+ dataptr[2] = (DCTELEM) DESCALE(tmp11 + tmp10, CONST_BITS-PASS1_BITS);
+ dataptr[4] = (DCTELEM) DESCALE(tmp11 - tmp10, CONST_BITS-PASS1_BITS);
+
+ /* Odd part */
+
+ tmp10 = MULTIPLY(tmp0 + tmp1, FIX(0.831253876)); /* c3 */
+
+ dataptr[1] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp0, FIX(0.513743148)), /* c1-c3 */
+ CONST_BITS-PASS1_BITS);
+ dataptr[3] = (DCTELEM)
+ DESCALE(tmp10 - MULTIPLY(tmp1, FIX(2.176250899)), /* c1+c3 */
+ CONST_BITS-PASS1_BITS);
+
+ ctr++;
+
+ if (ctr != DCTSIZE) {
+ if (ctr == 10)
+ break; /* Done. */
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ } else
+ dataptr = workspace; /* switch pointer to extended workspace */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ * We must also scale the output by (8/5)*(8/10) = 32/25, which we
+ * fold into the constant multipliers:
+ * 10-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/20) * 32/25.
+ */
+
+ dataptr = data;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 5; ctr++) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*1];
+ tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*0];
+ tmp12 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*7];
+ tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*6];
+ tmp4 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*5];
+
+ tmp10 = tmp0 + tmp4;
+ tmp13 = tmp0 - tmp4;
+ tmp11 = tmp1 + tmp3;
+ tmp14 = tmp1 - tmp3;
+
+ tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*1];
+ tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*0];
+ tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*7];
+ tmp3 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*6];
+ tmp4 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*5];
+
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 + tmp11 + tmp12, FIX(1.28)), /* 32/25 */
+ CONST_BITS+PASS1_BITS);
+ tmp12 += tmp12;
+ dataptr[DCTSIZE*4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.464477191)) - /* c4 */
+ MULTIPLY(tmp11 - tmp12, FIX(0.559380511)), /* c8 */
+ CONST_BITS+PASS1_BITS);
+ tmp10 = MULTIPLY(tmp13 + tmp14, FIX(1.064004961)); /* c6 */
+ dataptr[DCTSIZE*2] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp13, FIX(0.657591230)), /* c2-c6 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*6] = (DCTELEM)
+ DESCALE(tmp10 - MULTIPLY(tmp14, FIX(2.785601151)), /* c2+c6 */
+ CONST_BITS+PASS1_BITS);
+
+ /* Odd part */
+
+ tmp10 = tmp0 + tmp4;
+ tmp11 = tmp1 - tmp3;
+ dataptr[DCTSIZE*5] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp11 - tmp2, FIX(1.28)), /* 32/25 */
+ CONST_BITS+PASS1_BITS);
+ tmp2 = MULTIPLY(tmp2, FIX(1.28)); /* 32/25 */
+ dataptr[DCTSIZE*1] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0, FIX(1.787906876)) + /* c1 */
+ MULTIPLY(tmp1, FIX(1.612894094)) + tmp2 + /* c3 */
+ MULTIPLY(tmp3, FIX(0.821810588)) + /* c7 */
+ MULTIPLY(tmp4, FIX(0.283176630)), /* c9 */
+ CONST_BITS+PASS1_BITS);
+ tmp12 = MULTIPLY(tmp0 - tmp4, FIX(1.217352341)) - /* (c3+c7)/2 */
+ MULTIPLY(tmp1 + tmp3, FIX(0.752365123)); /* (c1-c9)/2 */
+ tmp13 = MULTIPLY(tmp10 + tmp11, FIX(0.395541753)) + /* (c3-c7)/2 */
+ MULTIPLY(tmp11, FIX(0.64)) - tmp2; /* 16/25 */
+ dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp12 + tmp13, CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp12 - tmp13, CONST_BITS+PASS1_BITS);
+
+ dataptr++; /* advance pointer to next column */
+ wsptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 4x8 sample block.
+ *
+ * 4-point FDCT in pass 1 (rows), 8-point in pass 2 (columns).
+ */
+
+GLOBAL(void)
+jpeg_fdct_4x8 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3;
+ INT32 tmp10, tmp11, tmp12, tmp13;
+ INT32 z1;
+ DCTELEM *dataptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pre-zero output coefficient block. */
+ MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2);
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+ /* We must also scale the output by 8/4 = 2, which we add here. */
+ /* 4-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/16). */
+
+ dataptr = data;
+ for (ctr = 0; ctr < DCTSIZE; ctr++) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[3]);
+ tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[2]);
+
+ tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[3]);
+ tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[2]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((tmp0 + tmp1 - 4 * CENTERJSAMPLE) << (PASS1_BITS+1));
+ dataptr[2] = (DCTELEM) ((tmp0 - tmp1) << (PASS1_BITS+1));
+
+ /* Odd part */
+
+ tmp0 = MULTIPLY(tmp10 + tmp11, FIX_0_541196100); /* c6 */
+ /* Add fudge factor here for final descale. */
+ tmp0 += ONE << (CONST_BITS-PASS1_BITS-2);
+
+ dataptr[1] = (DCTELEM)
+ RIGHT_SHIFT(tmp0 + MULTIPLY(tmp10, FIX_0_765366865), /* c2-c6 */
+ CONST_BITS-PASS1_BITS-1);
+ dataptr[3] = (DCTELEM)
+ RIGHT_SHIFT(tmp0 - MULTIPLY(tmp11, FIX_1_847759065), /* c2+c6 */
+ CONST_BITS-PASS1_BITS-1);
+
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 4; ctr++) {
+ /* Even part per LL&M figure 1 --- note that published figure is faulty;
+ * rotator "sqrt(2)*c1" should be "sqrt(2)*c6".
+ */
+
+ tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7];
+ tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6];
+ tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5];
+ tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];
+
+ /* Add fudge factor here for final descale. */
+ tmp10 = tmp0 + tmp3 + (ONE << (PASS1_BITS-1));
+ tmp12 = tmp0 - tmp3;
+ tmp11 = tmp1 + tmp2;
+ tmp13 = tmp1 - tmp2;
+
+ tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7];
+ tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6];
+ tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];
+ tmp3 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];
+
+ dataptr[DCTSIZE*0] = (DCTELEM) RIGHT_SHIFT(tmp10 + tmp11, PASS1_BITS);
+ dataptr[DCTSIZE*4] = (DCTELEM) RIGHT_SHIFT(tmp10 - tmp11, PASS1_BITS);
+
+ z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100);
+ /* Add fudge factor here for final descale. */
+ z1 += ONE << (CONST_BITS+PASS1_BITS-1);
+ dataptr[DCTSIZE*2] = (DCTELEM)
+ RIGHT_SHIFT(z1 + MULTIPLY(tmp12, FIX_0_765366865), CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*6] = (DCTELEM)
+ RIGHT_SHIFT(z1 - MULTIPLY(tmp13, FIX_1_847759065), CONST_BITS+PASS1_BITS);
+
+ /* Odd part per figure 8 --- note paper omits factor of sqrt(2).
+ * 8-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/16).
+ * i0..i3 in the paper are tmp0..tmp3 here.
+ */
+
+ tmp10 = tmp0 + tmp3;
+ tmp11 = tmp1 + tmp2;
+ tmp12 = tmp0 + tmp2;
+ tmp13 = tmp1 + tmp3;
+ z1 = MULTIPLY(tmp12 + tmp13, FIX_1_175875602); /* c3 */
+ /* Add fudge factor here for final descale. */
+ z1 += ONE << (CONST_BITS+PASS1_BITS-1);
+
+ tmp0 = MULTIPLY(tmp0, FIX_1_501321110); /* c1+c3-c5-c7 */
+ tmp1 = MULTIPLY(tmp1, FIX_3_072711026); /* c1+c3+c5-c7 */
+ tmp2 = MULTIPLY(tmp2, FIX_2_053119869); /* c1+c3-c5+c7 */
+ tmp3 = MULTIPLY(tmp3, FIX_0_298631336); /* -c1+c3+c5-c7 */
+ tmp10 = MULTIPLY(tmp10, - FIX_0_899976223); /* c7-c3 */
+ tmp11 = MULTIPLY(tmp11, - FIX_2_562915447); /* -c1-c3 */
+ tmp12 = MULTIPLY(tmp12, - FIX_0_390180644); /* c5-c3 */
+ tmp13 = MULTIPLY(tmp13, - FIX_1_961570560); /* -c3-c5 */
+
+ tmp12 += z1;
+ tmp13 += z1;
+
+ dataptr[DCTSIZE*1] = (DCTELEM)
+ RIGHT_SHIFT(tmp0 + tmp10 + tmp12, CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*3] = (DCTELEM)
+ RIGHT_SHIFT(tmp1 + tmp11 + tmp13, CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*5] = (DCTELEM)
+ RIGHT_SHIFT(tmp2 + tmp11 + tmp12, CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*7] = (DCTELEM)
+ RIGHT_SHIFT(tmp3 + tmp10 + tmp13, CONST_BITS+PASS1_BITS);
+
+ dataptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 3x6 sample block.
+ *
+ * 3-point FDCT in pass 1 (rows), 6-point in pass 2 (columns).
+ */
+
+GLOBAL(void)
+jpeg_fdct_3x6 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1, tmp2;
+ INT32 tmp10, tmp11, tmp12;
+ DCTELEM *dataptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pre-zero output coefficient block. */
+ MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2);
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+ /* We scale the results further by 2 as part of output adaption */
+ /* scaling for different DCT size. */
+ /* 3-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/6). */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 6; ctr++) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[2]);
+ tmp1 = GETJSAMPLE(elemptr[1]);
+
+ tmp2 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[2]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM)
+ ((tmp0 + tmp1 - 3 * CENTERJSAMPLE) << (PASS1_BITS+1));
+ dataptr[2] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0 - tmp1 - tmp1, FIX(0.707106781)), /* c2 */
+ CONST_BITS-PASS1_BITS-1);
+
+ /* Odd part */
+
+ dataptr[1] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp2, FIX(1.224744871)), /* c1 */
+ CONST_BITS-PASS1_BITS-1);
+
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ }
+
+ /* Pass 2: process columns.
+ * We remove the PASS1_BITS scaling, but leave the results scaled up
+ * by an overall factor of 8.
+ * We must also scale the output by (8/6)*(8/3) = 32/9, which we partially
+ * fold into the constant multipliers (other part was done in pass 1):
+ * 6-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/12) * 16/9.
+ */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 3; ctr++) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*5];
+ tmp11 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*4];
+ tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*3];
+
+ tmp10 = tmp0 + tmp2;
+ tmp12 = tmp0 - tmp2;
+
+ tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*5];
+ tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*4];
+ tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*3];
+
+ dataptr[DCTSIZE*0] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 + tmp11, FIX(1.777777778)), /* 16/9 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*2] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp12, FIX(2.177324216)), /* c2 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*4] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp10 - tmp11 - tmp11, FIX(1.257078722)), /* c4 */
+ CONST_BITS+PASS1_BITS);
+
+ /* Odd part */
+
+ tmp10 = MULTIPLY(tmp0 + tmp2, FIX(0.650711829)); /* c5 */
+
+ dataptr[DCTSIZE*1] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp0 + tmp1, FIX(1.777777778)), /* 16/9 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*3] = (DCTELEM)
+ DESCALE(MULTIPLY(tmp0 - tmp1 - tmp2, FIX(1.777777778)), /* 16/9 */
+ CONST_BITS+PASS1_BITS);
+ dataptr[DCTSIZE*5] = (DCTELEM)
+ DESCALE(tmp10 + MULTIPLY(tmp2 - tmp1, FIX(1.777777778)), /* 16/9 */
+ CONST_BITS+PASS1_BITS);
+
+ dataptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 2x4 sample block.
+ *
+ * 2-point FDCT in pass 1 (rows), 4-point in pass 2 (columns).
+ */
+
+GLOBAL(void)
+jpeg_fdct_2x4 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1;
+ INT32 tmp10, tmp11;
+ DCTELEM *dataptr;
+ JSAMPROW elemptr;
+ int ctr;
+ SHIFT_TEMPS
+
+ /* Pre-zero output coefficient block. */
+ MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2);
+
+ /* Pass 1: process rows. */
+ /* Note results are scaled up by sqrt(8) compared to a true DCT. */
+ /* We must also scale the output by (8/2)*(8/4) = 2**3, which we add here. */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 4; ctr++) {
+ elemptr = sample_data[ctr] + start_col;
+
+ /* Even part */
+
+ tmp0 = GETJSAMPLE(elemptr[0]);
+ tmp1 = GETJSAMPLE(elemptr[1]);
+
+ /* Apply unsigned->signed conversion */
+ dataptr[0] = (DCTELEM) ((tmp0 + tmp1 - 2 * CENTERJSAMPLE) << 3);
+
+ /* Odd part */
+
+ dataptr[1] = (DCTELEM) ((tmp0 - tmp1) << 3);
+
+ dataptr += DCTSIZE; /* advance pointer to next row */
+ }
+
+ /* Pass 2: process columns.
+ * We leave the results scaled up by an overall factor of 8.
+ * 4-point FDCT kernel,
+ * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point FDCT].
+ */
+
+ dataptr = data;
+ for (ctr = 0; ctr < 2; ctr++) {
+ /* Even part */
+
+ tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*3];
+ tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*2];
+
+ tmp10 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*3];
+ tmp11 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*2];
+
+ dataptr[DCTSIZE*0] = (DCTELEM) (tmp0 + tmp1);
+ dataptr[DCTSIZE*2] = (DCTELEM) (tmp0 - tmp1);
+
+ /* Odd part */
+
+ tmp0 = MULTIPLY(tmp10 + tmp11, FIX_0_541196100); /* c6 */
+ /* Add fudge factor here for final descale. */
+ tmp0 += ONE << (CONST_BITS-1);
+
+ dataptr[DCTSIZE*1] = (DCTELEM)
+ RIGHT_SHIFT(tmp0 + MULTIPLY(tmp10, FIX_0_765366865), /* c2-c6 */
+ CONST_BITS);
+ dataptr[DCTSIZE*3] = (DCTELEM)
+ RIGHT_SHIFT(tmp0 - MULTIPLY(tmp11, FIX_1_847759065), /* c2+c6 */
+ CONST_BITS);
+
+ dataptr++; /* advance pointer to next column */
+ }
+}
+
+
+/*
+ * Perform the forward DCT on a 1x2 sample block.
+ *
+ * 1-point FDCT in pass 1 (rows), 2-point in pass 2 (columns).
+ */
+
+GLOBAL(void)
+jpeg_fdct_1x2 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
+{
+ INT32 tmp0, tmp1;
+
+ /* Pre-zero output coefficient block. */
+ MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2);
+
+ tmp0 = GETJSAMPLE(sample_data[0][start_col]);
+ tmp1 = GETJSAMPLE(sample_data[1][start_col]);
+
+ /* We leave the results scaled up by an overall factor of 8.
+ * We must also scale the output by (8/1)*(8/2) = 2**5.
+ */
+
+ /* Even part */
+ /* Apply unsigned->signed conversion */
+ data[DCTSIZE*0] = (DCTELEM) ((tmp0 + tmp1 - 2 * CENTERJSAMPLE) << 5);
+
+ /* Odd part */
+ data[DCTSIZE*1] = (DCTELEM) ((tmp0 - tmp1) << 5);
+}
+
+#endif /* DCT_SCALING_SUPPORTED */
#endif /* DCT_ISLOW_SUPPORTED */
diff --git a/src/3rdparty/libjpeg/jidctint.c b/src/3rdparty/libjpeg/jidctint.c
index a72b3207ca..dcdf7ce454 100644
--- a/src/3rdparty/libjpeg/jidctint.c
+++ b/src/3rdparty/libjpeg/jidctint.c
@@ -2,6 +2,7 @@
* jidctint.c
*
* Copyright (C) 1991-1998, Thomas G. Lane.
+ * Modification developed 2002-2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -23,6 +24,28 @@
* The advantage of this method is that no data path contains more than one
* multiplication; this allows a very simple and accurate implementation in
* scaled fixed-point arithmetic, with a minimal number of shifts.
+ *
+ * We also provide IDCT routines with various output sample block sizes for
+ * direct resolution reduction or enlargement and for direct resolving the
+ * common 2x1 and 1x2 subsampling cases without additional resampling: NxN
+ * (N=1...16), 2NxN, and Nx2N (N=1...8) pixels for one 8x8 input DCT block.
+ *
+ * For N<8 we simply take the corresponding low-frequency coefficients of
+ * the 8x8 input DCT block and apply an NxN point IDCT on the sub-block
+ * to yield the downscaled outputs.
+ * This can be seen as direct low-pass downsampling from the DCT domain
+ * point of view rather than the usual spatial domain point of view,
+ * yielding significant computational savings and results at least
+ * as good as common bilinear (averaging) spatial downsampling.
+ *
+ * For N>8 we apply a partial NxN IDCT on the 8 input coefficients as
+ * lower frequencies and higher frequencies assumed to be zero.
+ * It turns out that the computational effort is similar to the 8x8 IDCT
+ * regarding the output size.
+ * Furthermore, the scaling and descaling is the same for all IDCT sizes.
+ *
+ * CAUTION: We rely on the FIX() macro except for the N=1,2,4,8 cases
+ * since there would be too many additional constants to pre-calculate.
*/
#define JPEG_INTERNALS
@@ -38,7 +61,7 @@
*/
#if DCTSIZE != 8
- Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
+ Sorry, this code only copes with 8x8 DCT blocks. /* deliberate syntax err */
#endif
@@ -151,7 +174,7 @@ jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr,
{
INT32 tmp0, tmp1, tmp2, tmp3;
INT32 tmp10, tmp11, tmp12, tmp13;
- INT32 z1, z2, z3, z4, z5;
+ INT32 z1, z2, z3;
JCOEFPTR inptr;
ISLOW_MULT_TYPE * quantptr;
int * wsptr;
@@ -177,14 +200,14 @@ jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr,
* With typical images and quantization tables, half or more of the
* column DCT calculations can be simplified this way.
*/
-
+
if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 &&
inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 &&
inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 &&
inptr[DCTSIZE*7] == 0) {
/* AC terms all zero */
int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS;
-
+
wsptr[DCTSIZE*0] = dcval;
wsptr[DCTSIZE*1] = dcval;
wsptr[DCTSIZE*2] = dcval;
@@ -193,82 +216,84 @@ jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr,
wsptr[DCTSIZE*5] = dcval;
wsptr[DCTSIZE*6] = dcval;
wsptr[DCTSIZE*7] = dcval;
-
+
inptr++; /* advance pointers to next column */
quantptr++;
wsptr++;
continue;
}
-
+
/* Even part: reverse the even part of the forward DCT. */
/* The rotator is sqrt(2)*c(-6). */
z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
-
+
z1 = MULTIPLY(z2 + z3, FIX_0_541196100);
- tmp2 = z1 + MULTIPLY(z3, - FIX_1_847759065);
- tmp3 = z1 + MULTIPLY(z2, FIX_0_765366865);
-
+ tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865);
+ tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065);
+
z2 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ z2 <<= CONST_BITS;
+ z3 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ z2 += ONE << (CONST_BITS-PASS1_BITS-1);
+
+ tmp0 = z2 + z3;
+ tmp1 = z2 - z3;
+
+ tmp10 = tmp0 + tmp2;
+ tmp13 = tmp0 - tmp2;
+ tmp11 = tmp1 + tmp3;
+ tmp12 = tmp1 - tmp3;
- tmp0 = (z2 + z3) << CONST_BITS;
- tmp1 = (z2 - z3) << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp1 + tmp2;
- tmp12 = tmp1 - tmp2;
-
/* Odd part per figure 8; the matrix is unitary and hence its
* transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively.
*/
-
+
tmp0 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
tmp1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
tmp2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
tmp3 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
- z1 = tmp0 + tmp3;
- z2 = tmp1 + tmp2;
- z3 = tmp0 + tmp2;
- z4 = tmp1 + tmp3;
- z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */
-
+ z2 = tmp0 + tmp2;
+ z3 = tmp1 + tmp3;
+
+ z1 = MULTIPLY(z2 + z3, FIX_1_175875602); /* sqrt(2) * c3 */
+ z2 = MULTIPLY(z2, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
+ z3 = MULTIPLY(z3, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
+ z2 += z1;
+ z3 += z1;
+
+ z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
+ tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
+ tmp0 += z1 + z2;
+ tmp3 += z1 + z3;
+
+ z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
- tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
- z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
- z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
- z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
- z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
-
- z3 += z5;
- z4 += z5;
-
- tmp0 += z1 + z3;
- tmp1 += z2 + z4;
- tmp2 += z2 + z3;
- tmp3 += z1 + z4;
-
+ tmp1 += z1 + z3;
+ tmp2 += z1 + z2;
+
/* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */
-
- wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp3, CONST_BITS-PASS1_BITS);
- wsptr[DCTSIZE*7] = (int) DESCALE(tmp10 - tmp3, CONST_BITS-PASS1_BITS);
- wsptr[DCTSIZE*1] = (int) DESCALE(tmp11 + tmp2, CONST_BITS-PASS1_BITS);
- wsptr[DCTSIZE*6] = (int) DESCALE(tmp11 - tmp2, CONST_BITS-PASS1_BITS);
- wsptr[DCTSIZE*2] = (int) DESCALE(tmp12 + tmp1, CONST_BITS-PASS1_BITS);
- wsptr[DCTSIZE*5] = (int) DESCALE(tmp12 - tmp1, CONST_BITS-PASS1_BITS);
- wsptr[DCTSIZE*3] = (int) DESCALE(tmp13 + tmp0, CONST_BITS-PASS1_BITS);
- wsptr[DCTSIZE*4] = (int) DESCALE(tmp13 - tmp0, CONST_BITS-PASS1_BITS);
+
+ wsptr[DCTSIZE*0] = (int) RIGHT_SHIFT(tmp10 + tmp3, CONST_BITS-PASS1_BITS);
+ wsptr[DCTSIZE*7] = (int) RIGHT_SHIFT(tmp10 - tmp3, CONST_BITS-PASS1_BITS);
+ wsptr[DCTSIZE*1] = (int) RIGHT_SHIFT(tmp11 + tmp2, CONST_BITS-PASS1_BITS);
+ wsptr[DCTSIZE*6] = (int) RIGHT_SHIFT(tmp11 - tmp2, CONST_BITS-PASS1_BITS);
+ wsptr[DCTSIZE*2] = (int) RIGHT_SHIFT(tmp12 + tmp1, CONST_BITS-PASS1_BITS);
+ wsptr[DCTSIZE*5] = (int) RIGHT_SHIFT(tmp12 - tmp1, CONST_BITS-PASS1_BITS);
+ wsptr[DCTSIZE*3] = (int) RIGHT_SHIFT(tmp13 + tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[DCTSIZE*4] = (int) RIGHT_SHIFT(tmp13 - tmp0, CONST_BITS-PASS1_BITS);
inptr++; /* advance pointers to next column */
quantptr++;
wsptr++;
}
-
+
/* Pass 2: process rows from work array, store into output array. */
/* Note that we must descale the results by a factor of 8 == 2**3, */
/* and also undo the PASS1_BITS scaling. */
@@ -283,14 +308,14 @@ jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr,
* test takes more time than it's worth. In that case this section
* may be commented out.
*/
-
+
#ifndef NO_ZERO_ROW_TEST
if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 &&
wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) {
/* AC terms all zero */
JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3)
& RANGE_MASK];
-
+
outptr[0] = dcval;
outptr[1] = dcval;
outptr[2] = dcval;
@@ -304,86 +329,4809 @@ jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr,
continue;
}
#endif
-
+
/* Even part: reverse the even part of the forward DCT. */
/* The rotator is sqrt(2)*c(-6). */
z2 = (INT32) wsptr[2];
z3 = (INT32) wsptr[6];
+
+ z1 = MULTIPLY(z2 + z3, FIX_0_541196100);
+ tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865);
+ tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065);
+
+ /* Add fudge factor here for final descale. */
+ z2 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ z3 = (INT32) wsptr[4];
+
+ tmp0 = (z2 + z3) << CONST_BITS;
+ tmp1 = (z2 - z3) << CONST_BITS;
+
+ tmp10 = tmp0 + tmp2;
+ tmp13 = tmp0 - tmp2;
+ tmp11 = tmp1 + tmp3;
+ tmp12 = tmp1 - tmp3;
+
+ /* Odd part per figure 8; the matrix is unitary and hence its
+ * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively.
+ */
+
+ tmp0 = (INT32) wsptr[7];
+ tmp1 = (INT32) wsptr[5];
+ tmp2 = (INT32) wsptr[3];
+ tmp3 = (INT32) wsptr[1];
+
+ z2 = tmp0 + tmp2;
+ z3 = tmp1 + tmp3;
+
+ z1 = MULTIPLY(z2 + z3, FIX_1_175875602); /* sqrt(2) * c3 */
+ z2 = MULTIPLY(z2, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
+ z3 = MULTIPLY(z3, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
+ z2 += z1;
+ z3 += z1;
+
+ z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
+ tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
+ tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
+ tmp0 += z1 + z2;
+ tmp3 += z1 + z3;
+
+ z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
+ tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
+ tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
+ tmp1 += z1 + z3;
+ tmp2 += z1 + z2;
+
+ /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp3,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp3,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp1,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp1,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp13 + tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp13 - tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += DCTSIZE; /* advance pointer to next row */
+ }
+}
+
+#ifdef IDCT_SCALING_SUPPORTED
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 7x7 output block.
+ *
+ * Optimized algorithm with 12 multiplications in the 1-D kernel.
+ * cK represents sqrt(2) * cos(K*pi/14).
+ */
+
+GLOBAL(void)
+jpeg_idct_7x7 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp10, tmp11, tmp12, tmp13;
+ INT32 z1, z2, z3;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[7*7]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array. */
+
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 7; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ tmp13 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ tmp13 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ tmp13 += ONE << (CONST_BITS-PASS1_BITS-1);
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+
+ tmp10 = MULTIPLY(z2 - z3, FIX(0.881747734)); /* c4 */
+ tmp12 = MULTIPLY(z1 - z2, FIX(0.314692123)); /* c6 */
+ tmp11 = tmp10 + tmp12 + tmp13 - MULTIPLY(z2, FIX(1.841218003)); /* c2+c4-c6 */
+ tmp0 = z1 + z3;
+ z2 -= tmp0;
+ tmp0 = MULTIPLY(tmp0, FIX(1.274162392)) + tmp13; /* c2 */
+ tmp10 += tmp0 - MULTIPLY(z3, FIX(0.077722536)); /* c2-c4-c6 */
+ tmp12 += tmp0 - MULTIPLY(z1, FIX(2.470602249)); /* c2+c4+c6 */
+ tmp13 += MULTIPLY(z2, FIX(1.414213562)); /* c0 */
+
+ /* Odd part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+
+ tmp1 = MULTIPLY(z1 + z2, FIX(0.935414347)); /* (c3+c1-c5)/2 */
+ tmp2 = MULTIPLY(z1 - z2, FIX(0.170262339)); /* (c3+c5-c1)/2 */
+ tmp0 = tmp1 - tmp2;
+ tmp1 += tmp2;
+ tmp2 = MULTIPLY(z2 + z3, - FIX(1.378756276)); /* -c1 */
+ tmp1 += tmp2;
+ z2 = MULTIPLY(z1 + z3, FIX(0.613604268)); /* c5 */
+ tmp0 += z2;
+ tmp2 += z2 + MULTIPLY(z3, FIX(1.870828693)); /* c3+c1-c5 */
+
+ /* Final output stage */
+
+ wsptr[7*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[7*6] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[7*1] = (int) RIGHT_SHIFT(tmp11 + tmp1, CONST_BITS-PASS1_BITS);
+ wsptr[7*5] = (int) RIGHT_SHIFT(tmp11 - tmp1, CONST_BITS-PASS1_BITS);
+ wsptr[7*2] = (int) RIGHT_SHIFT(tmp12 + tmp2, CONST_BITS-PASS1_BITS);
+ wsptr[7*4] = (int) RIGHT_SHIFT(tmp12 - tmp2, CONST_BITS-PASS1_BITS);
+ wsptr[7*3] = (int) RIGHT_SHIFT(tmp13, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 7 rows from work array, store into output array. */
+
+ wsptr = workspace;
+ for (ctr = 0; ctr < 7; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp13 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ tmp13 <<= CONST_BITS;
+
+ z1 = (INT32) wsptr[2];
+ z2 = (INT32) wsptr[4];
+ z3 = (INT32) wsptr[6];
+
+ tmp10 = MULTIPLY(z2 - z3, FIX(0.881747734)); /* c4 */
+ tmp12 = MULTIPLY(z1 - z2, FIX(0.314692123)); /* c6 */
+ tmp11 = tmp10 + tmp12 + tmp13 - MULTIPLY(z2, FIX(1.841218003)); /* c2+c4-c6 */
+ tmp0 = z1 + z3;
+ z2 -= tmp0;
+ tmp0 = MULTIPLY(tmp0, FIX(1.274162392)) + tmp13; /* c2 */
+ tmp10 += tmp0 - MULTIPLY(z3, FIX(0.077722536)); /* c2-c4-c6 */
+ tmp12 += tmp0 - MULTIPLY(z1, FIX(2.470602249)); /* c2+c4+c6 */
+ tmp13 += MULTIPLY(z2, FIX(1.414213562)); /* c0 */
+
+ /* Odd part */
+
+ z1 = (INT32) wsptr[1];
+ z2 = (INT32) wsptr[3];
+ z3 = (INT32) wsptr[5];
+
+ tmp1 = MULTIPLY(z1 + z2, FIX(0.935414347)); /* (c3+c1-c5)/2 */
+ tmp2 = MULTIPLY(z1 - z2, FIX(0.170262339)); /* (c3+c5-c1)/2 */
+ tmp0 = tmp1 - tmp2;
+ tmp1 += tmp2;
+ tmp2 = MULTIPLY(z2 + z3, - FIX(1.378756276)); /* -c1 */
+ tmp1 += tmp2;
+ z2 = MULTIPLY(z1 + z3, FIX(0.613604268)); /* c5 */
+ tmp0 += z2;
+ tmp2 += z2 + MULTIPLY(z3, FIX(1.870828693)); /* c3+c1-c5 */
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp1,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp1,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 7; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a reduced-size 6x6 output block.
+ *
+ * Optimized algorithm with 3 multiplications in the 1-D kernel.
+ * cK represents sqrt(2) * cos(K*pi/12).
+ */
+
+GLOBAL(void)
+jpeg_idct_6x6 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp10, tmp11, tmp12;
+ INT32 z1, z2, z3;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[6*6]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array. */
+
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 6; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ tmp0 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ tmp0 += ONE << (CONST_BITS-PASS1_BITS-1);
+ tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ tmp10 = MULTIPLY(tmp2, FIX(0.707106781)); /* c4 */
+ tmp1 = tmp0 + tmp10;
+ tmp11 = RIGHT_SHIFT(tmp0 - tmp10 - tmp10, CONST_BITS-PASS1_BITS);
+ tmp10 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ tmp0 = MULTIPLY(tmp10, FIX(1.224744871)); /* c2 */
+ tmp10 = tmp1 + tmp0;
+ tmp12 = tmp1 - tmp0;
+
+ /* Odd part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+ tmp1 = MULTIPLY(z1 + z3, FIX(0.366025404)); /* c5 */
+ tmp0 = tmp1 + ((z1 + z2) << CONST_BITS);
+ tmp2 = tmp1 + ((z3 - z2) << CONST_BITS);
+ tmp1 = (z1 - z2 - z3) << PASS1_BITS;
+
+ /* Final output stage */
+
+ wsptr[6*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[6*5] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[6*1] = (int) (tmp11 + tmp1);
+ wsptr[6*4] = (int) (tmp11 - tmp1);
+ wsptr[6*2] = (int) RIGHT_SHIFT(tmp12 + tmp2, CONST_BITS-PASS1_BITS);
+ wsptr[6*3] = (int) RIGHT_SHIFT(tmp12 - tmp2, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 6 rows from work array, store into output array. */
+
+ wsptr = workspace;
+ for (ctr = 0; ctr < 6; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp0 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ tmp0 <<= CONST_BITS;
+ tmp2 = (INT32) wsptr[4];
+ tmp10 = MULTIPLY(tmp2, FIX(0.707106781)); /* c4 */
+ tmp1 = tmp0 + tmp10;
+ tmp11 = tmp0 - tmp10 - tmp10;
+ tmp10 = (INT32) wsptr[2];
+ tmp0 = MULTIPLY(tmp10, FIX(1.224744871)); /* c2 */
+ tmp10 = tmp1 + tmp0;
+ tmp12 = tmp1 - tmp0;
+
+ /* Odd part */
+
+ z1 = (INT32) wsptr[1];
+ z2 = (INT32) wsptr[3];
+ z3 = (INT32) wsptr[5];
+ tmp1 = MULTIPLY(z1 + z3, FIX(0.366025404)); /* c5 */
+ tmp0 = tmp1 + ((z1 + z2) << CONST_BITS);
+ tmp2 = tmp1 + ((z3 - z2) << CONST_BITS);
+ tmp1 = (z1 - z2 - z3) << CONST_BITS;
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp1,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp1,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 6; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a reduced-size 5x5 output block.
+ *
+ * Optimized algorithm with 5 multiplications in the 1-D kernel.
+ * cK represents sqrt(2) * cos(K*pi/10).
+ */
+
+GLOBAL(void)
+jpeg_idct_5x5 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp0, tmp1, tmp10, tmp11, tmp12;
+ INT32 z1, z2, z3;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[5*5]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array. */
+
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 5; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ tmp12 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ tmp12 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ tmp12 += ONE << (CONST_BITS-PASS1_BITS-1);
+ tmp0 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ tmp1 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ z1 = MULTIPLY(tmp0 + tmp1, FIX(0.790569415)); /* (c2+c4)/2 */
+ z2 = MULTIPLY(tmp0 - tmp1, FIX(0.353553391)); /* (c2-c4)/2 */
+ z3 = tmp12 + z2;
+ tmp10 = z3 + z1;
+ tmp11 = z3 - z1;
+ tmp12 -= z2 << 2;
+
+ /* Odd part */
+
+ z2 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+
+ z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c3 */
+ tmp0 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c1-c3 */
+ tmp1 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c1+c3 */
+
+ /* Final output stage */
+
+ wsptr[5*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[5*4] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[5*1] = (int) RIGHT_SHIFT(tmp11 + tmp1, CONST_BITS-PASS1_BITS);
+ wsptr[5*3] = (int) RIGHT_SHIFT(tmp11 - tmp1, CONST_BITS-PASS1_BITS);
+ wsptr[5*2] = (int) RIGHT_SHIFT(tmp12, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 5 rows from work array, store into output array. */
+
+ wsptr = workspace;
+ for (ctr = 0; ctr < 5; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp12 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ tmp12 <<= CONST_BITS;
+ tmp0 = (INT32) wsptr[2];
+ tmp1 = (INT32) wsptr[4];
+ z1 = MULTIPLY(tmp0 + tmp1, FIX(0.790569415)); /* (c2+c4)/2 */
+ z2 = MULTIPLY(tmp0 - tmp1, FIX(0.353553391)); /* (c2-c4)/2 */
+ z3 = tmp12 + z2;
+ tmp10 = z3 + z1;
+ tmp11 = z3 - z1;
+ tmp12 -= z2 << 2;
+
+ /* Odd part */
+
+ z2 = (INT32) wsptr[1];
+ z3 = (INT32) wsptr[3];
+
+ z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c3 */
+ tmp0 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c1-c3 */
+ tmp1 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c1+c3 */
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp1,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp1,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 5; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a reduced-size 4x4 output block.
+ *
+ * Optimized algorithm with 3 multiplications in the 1-D kernel.
+ * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point IDCT].
+ */
+
+GLOBAL(void)
+jpeg_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp0, tmp2, tmp10, tmp12;
+ INT32 z1, z2, z3;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[4*4]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array. */
+
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 4; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ tmp2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+
+ tmp10 = (tmp0 + tmp2) << PASS1_BITS;
+ tmp12 = (tmp0 - tmp2) << PASS1_BITS;
+
+ /* Odd part */
+ /* Same rotation as in the even part of the 8x8 LL&M IDCT */
+
+ z2 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+
+ z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */
+ /* Add fudge factor here for final descale. */
+ z1 += ONE << (CONST_BITS-PASS1_BITS-1);
+ tmp0 = RIGHT_SHIFT(z1 + MULTIPLY(z2, FIX_0_765366865), /* c2-c6 */
+ CONST_BITS-PASS1_BITS);
+ tmp2 = RIGHT_SHIFT(z1 - MULTIPLY(z3, FIX_1_847759065), /* c2+c6 */
+ CONST_BITS-PASS1_BITS);
+
+ /* Final output stage */
+
+ wsptr[4*0] = (int) (tmp10 + tmp0);
+ wsptr[4*3] = (int) (tmp10 - tmp0);
+ wsptr[4*1] = (int) (tmp12 + tmp2);
+ wsptr[4*2] = (int) (tmp12 - tmp2);
+ }
+
+ /* Pass 2: process 4 rows from work array, store into output array. */
+
+ wsptr = workspace;
+ for (ctr = 0; ctr < 4; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp0 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ tmp2 = (INT32) wsptr[2];
+
+ tmp10 = (tmp0 + tmp2) << CONST_BITS;
+ tmp12 = (tmp0 - tmp2) << CONST_BITS;
+
+ /* Odd part */
+ /* Same rotation as in the even part of the 8x8 LL&M IDCT */
+
+ z2 = (INT32) wsptr[1];
+ z3 = (INT32) wsptr[3];
+
+ z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */
+ tmp0 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */
+ tmp2 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 4; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a reduced-size 3x3 output block.
+ *
+ * Optimized algorithm with 2 multiplications in the 1-D kernel.
+ * cK represents sqrt(2) * cos(K*pi/6).
+ */
+
+GLOBAL(void)
+jpeg_idct_3x3 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp0, tmp2, tmp10, tmp12;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[3*3]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array. */
+
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 3; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ tmp0 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ tmp0 += ONE << (CONST_BITS-PASS1_BITS-1);
+ tmp2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ tmp12 = MULTIPLY(tmp2, FIX(0.707106781)); /* c2 */
+ tmp10 = tmp0 + tmp12;
+ tmp2 = tmp0 - tmp12 - tmp12;
+
+ /* Odd part */
+
+ tmp12 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ tmp0 = MULTIPLY(tmp12, FIX(1.224744871)); /* c1 */
+
+ /* Final output stage */
+
+ wsptr[3*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[3*2] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[3*1] = (int) RIGHT_SHIFT(tmp2, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 3 rows from work array, store into output array. */
+
+ wsptr = workspace;
+ for (ctr = 0; ctr < 3; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp0 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ tmp0 <<= CONST_BITS;
+ tmp2 = (INT32) wsptr[2];
+ tmp12 = MULTIPLY(tmp2, FIX(0.707106781)); /* c2 */
+ tmp10 = tmp0 + tmp12;
+ tmp2 = tmp0 - tmp12 - tmp12;
+
+ /* Odd part */
+
+ tmp12 = (INT32) wsptr[1];
+ tmp0 = MULTIPLY(tmp12, FIX(1.224744871)); /* c1 */
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 3; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a reduced-size 2x2 output block.
+ *
+ * Multiplication-less algorithm.
+ */
+
+GLOBAL(void)
+jpeg_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5;
+ ISLOW_MULT_TYPE * quantptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input. */
+
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+
+ /* Column 0 */
+ tmp4 = DEQUANTIZE(coef_block[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ tmp5 = DEQUANTIZE(coef_block[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ /* Add fudge factor here for final descale. */
+ tmp4 += ONE << 2;
+
+ tmp0 = tmp4 + tmp5;
+ tmp2 = tmp4 - tmp5;
+
+ /* Column 1 */
+ tmp4 = DEQUANTIZE(coef_block[DCTSIZE*0+1], quantptr[DCTSIZE*0+1]);
+ tmp5 = DEQUANTIZE(coef_block[DCTSIZE*1+1], quantptr[DCTSIZE*1+1]);
+
+ tmp1 = tmp4 + tmp5;
+ tmp3 = tmp4 - tmp5;
+
+ /* Pass 2: process 2 rows, store into output array. */
+
+ /* Row 0 */
+ outptr = output_buf[0] + output_col;
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp0 + tmp1, 3) & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp0 - tmp1, 3) & RANGE_MASK];
+
+ /* Row 1 */
+ outptr = output_buf[1] + output_col;
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp2 + tmp3, 3) & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp2 - tmp3, 3) & RANGE_MASK];
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a reduced-size 1x1 output block.
+ *
+ * We hardly need an inverse DCT routine for this: just take the
+ * average pixel value, which is one-eighth of the DC coefficient.
+ */
+
+GLOBAL(void)
+jpeg_idct_1x1 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ int dcval;
+ ISLOW_MULT_TYPE * quantptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ SHIFT_TEMPS
+
+ /* 1x1 is trivial: just take the DC coefficient divided by 8. */
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ dcval = DEQUANTIZE(coef_block[0], quantptr[0]);
+ dcval = (int) DESCALE((INT32) dcval, 3);
+
+ output_buf[0][output_col] = range_limit[dcval & RANGE_MASK];
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 9x9 output block.
+ *
+ * Optimized algorithm with 10 multiplications in the 1-D kernel.
+ * cK represents sqrt(2) * cos(K*pi/18).
+ */
+
+GLOBAL(void)
+jpeg_idct_9x9 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp10, tmp11, tmp12, tmp13, tmp14;
+ INT32 z1, z2, z3, z4;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[8*9]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array. */
+
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ tmp0 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ tmp0 += ONE << (CONST_BITS-PASS1_BITS-1);
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+
+ tmp3 = MULTIPLY(z3, FIX(0.707106781)); /* c6 */
+ tmp1 = tmp0 + tmp3;
+ tmp2 = tmp0 - tmp3 - tmp3;
+
+ tmp0 = MULTIPLY(z1 - z2, FIX(0.707106781)); /* c6 */
+ tmp11 = tmp2 + tmp0;
+ tmp14 = tmp2 - tmp0 - tmp0;
+
+ tmp0 = MULTIPLY(z1 + z2, FIX(1.328926049)); /* c2 */
+ tmp2 = MULTIPLY(z1, FIX(1.083350441)); /* c4 */
+ tmp3 = MULTIPLY(z2, FIX(0.245575608)); /* c8 */
+
+ tmp10 = tmp1 + tmp0 - tmp3;
+ tmp12 = tmp1 - tmp0 + tmp2;
+ tmp13 = tmp1 - tmp2 + tmp3;
+
+ /* Odd part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+ z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+
+ z2 = MULTIPLY(z2, - FIX(1.224744871)); /* -c3 */
+
+ tmp2 = MULTIPLY(z1 + z3, FIX(0.909038955)); /* c5 */
+ tmp3 = MULTIPLY(z1 + z4, FIX(0.483689525)); /* c7 */
+ tmp0 = tmp2 + tmp3 - z2;
+ tmp1 = MULTIPLY(z3 - z4, FIX(1.392728481)); /* c1 */
+ tmp2 += z2 - tmp1;
+ tmp3 += z2 + tmp1;
+ tmp1 = MULTIPLY(z1 - z3 - z4, FIX(1.224744871)); /* c3 */
+
+ /* Final output stage */
+
+ wsptr[8*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[8*8] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[8*1] = (int) RIGHT_SHIFT(tmp11 + tmp1, CONST_BITS-PASS1_BITS);
+ wsptr[8*7] = (int) RIGHT_SHIFT(tmp11 - tmp1, CONST_BITS-PASS1_BITS);
+ wsptr[8*2] = (int) RIGHT_SHIFT(tmp12 + tmp2, CONST_BITS-PASS1_BITS);
+ wsptr[8*6] = (int) RIGHT_SHIFT(tmp12 - tmp2, CONST_BITS-PASS1_BITS);
+ wsptr[8*3] = (int) RIGHT_SHIFT(tmp13 + tmp3, CONST_BITS-PASS1_BITS);
+ wsptr[8*5] = (int) RIGHT_SHIFT(tmp13 - tmp3, CONST_BITS-PASS1_BITS);
+ wsptr[8*4] = (int) RIGHT_SHIFT(tmp14, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 9 rows from work array, store into output array. */
+
+ wsptr = workspace;
+ for (ctr = 0; ctr < 9; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp0 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ tmp0 <<= CONST_BITS;
+
+ z1 = (INT32) wsptr[2];
+ z2 = (INT32) wsptr[4];
+ z3 = (INT32) wsptr[6];
+
+ tmp3 = MULTIPLY(z3, FIX(0.707106781)); /* c6 */
+ tmp1 = tmp0 + tmp3;
+ tmp2 = tmp0 - tmp3 - tmp3;
+
+ tmp0 = MULTIPLY(z1 - z2, FIX(0.707106781)); /* c6 */
+ tmp11 = tmp2 + tmp0;
+ tmp14 = tmp2 - tmp0 - tmp0;
+
+ tmp0 = MULTIPLY(z1 + z2, FIX(1.328926049)); /* c2 */
+ tmp2 = MULTIPLY(z1, FIX(1.083350441)); /* c4 */
+ tmp3 = MULTIPLY(z2, FIX(0.245575608)); /* c8 */
+
+ tmp10 = tmp1 + tmp0 - tmp3;
+ tmp12 = tmp1 - tmp0 + tmp2;
+ tmp13 = tmp1 - tmp2 + tmp3;
+
+ /* Odd part */
+
+ z1 = (INT32) wsptr[1];
+ z2 = (INT32) wsptr[3];
+ z3 = (INT32) wsptr[5];
+ z4 = (INT32) wsptr[7];
+
+ z2 = MULTIPLY(z2, - FIX(1.224744871)); /* -c3 */
+
+ tmp2 = MULTIPLY(z1 + z3, FIX(0.909038955)); /* c5 */
+ tmp3 = MULTIPLY(z1 + z4, FIX(0.483689525)); /* c7 */
+ tmp0 = tmp2 + tmp3 - z2;
+ tmp1 = MULTIPLY(z3 - z4, FIX(1.392728481)); /* c1 */
+ tmp2 += z2 - tmp1;
+ tmp3 += z2 + tmp1;
+ tmp1 = MULTIPLY(z1 - z3 - z4, FIX(1.224744871)); /* c3 */
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp1,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp1,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp13 + tmp3,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp13 - tmp3,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 8; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 10x10 output block.
+ *
+ * Optimized algorithm with 12 multiplications in the 1-D kernel.
+ * cK represents sqrt(2) * cos(K*pi/20).
+ */
+
+GLOBAL(void)
+jpeg_idct_10x10 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14;
+ INT32 tmp20, tmp21, tmp22, tmp23, tmp24;
+ INT32 z1, z2, z3, z4, z5;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[8*10]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array. */
+
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ z3 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ z3 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ z3 += ONE << (CONST_BITS-PASS1_BITS-1);
+ z4 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ z1 = MULTIPLY(z4, FIX(1.144122806)); /* c4 */
+ z2 = MULTIPLY(z4, FIX(0.437016024)); /* c8 */
+ tmp10 = z3 + z1;
+ tmp11 = z3 - z2;
+
+ tmp22 = RIGHT_SHIFT(z3 - ((z1 - z2) << 1), /* c0 = (c4-c8)*2 */
+ CONST_BITS-PASS1_BITS);
+
+ z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+
+ z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c6 */
+ tmp12 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c2-c6 */
+ tmp13 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c2+c6 */
+
+ tmp20 = tmp10 + tmp12;
+ tmp24 = tmp10 - tmp12;
+ tmp21 = tmp11 + tmp13;
+ tmp23 = tmp11 - tmp13;
+
+ /* Odd part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+ z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+
+ tmp11 = z2 + z4;
+ tmp13 = z2 - z4;
+
+ tmp12 = MULTIPLY(tmp13, FIX(0.309016994)); /* (c3-c7)/2 */
+ z5 = z3 << CONST_BITS;
+
+ z2 = MULTIPLY(tmp11, FIX(0.951056516)); /* (c3+c7)/2 */
+ z4 = z5 + tmp12;
+
+ tmp10 = MULTIPLY(z1, FIX(1.396802247)) + z2 + z4; /* c1 */
+ tmp14 = MULTIPLY(z1, FIX(0.221231742)) - z2 + z4; /* c9 */
+
+ z2 = MULTIPLY(tmp11, FIX(0.587785252)); /* (c1-c9)/2 */
+ z4 = z5 - tmp12 - (tmp13 << (CONST_BITS - 1));
+
+ tmp12 = (z1 - tmp13 - z3) << PASS1_BITS;
+
+ tmp11 = MULTIPLY(z1, FIX(1.260073511)) - z2 - z4; /* c3 */
+ tmp13 = MULTIPLY(z1, FIX(0.642039522)) - z2 + z4; /* c7 */
+
+ /* Final output stage */
+
+ wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*9] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[8*8] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[8*2] = (int) (tmp22 + tmp12);
+ wsptr[8*7] = (int) (tmp22 - tmp12);
+ wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS);
+ wsptr[8*6] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS);
+ wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS);
+ wsptr[8*5] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 10 rows from work array, store into output array. */
+
+ wsptr = workspace;
+ for (ctr = 0; ctr < 10; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ z3 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ z3 <<= CONST_BITS;
+ z4 = (INT32) wsptr[4];
+ z1 = MULTIPLY(z4, FIX(1.144122806)); /* c4 */
+ z2 = MULTIPLY(z4, FIX(0.437016024)); /* c8 */
+ tmp10 = z3 + z1;
+ tmp11 = z3 - z2;
+
+ tmp22 = z3 - ((z1 - z2) << 1); /* c0 = (c4-c8)*2 */
+
+ z2 = (INT32) wsptr[2];
+ z3 = (INT32) wsptr[6];
+
+ z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c6 */
+ tmp12 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c2-c6 */
+ tmp13 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c2+c6 */
+
+ tmp20 = tmp10 + tmp12;
+ tmp24 = tmp10 - tmp12;
+ tmp21 = tmp11 + tmp13;
+ tmp23 = tmp11 - tmp13;
+
+ /* Odd part */
+
+ z1 = (INT32) wsptr[1];
+ z2 = (INT32) wsptr[3];
+ z3 = (INT32) wsptr[5];
+ z3 <<= CONST_BITS;
+ z4 = (INT32) wsptr[7];
+
+ tmp11 = z2 + z4;
+ tmp13 = z2 - z4;
+
+ tmp12 = MULTIPLY(tmp13, FIX(0.309016994)); /* (c3-c7)/2 */
+
+ z2 = MULTIPLY(tmp11, FIX(0.951056516)); /* (c3+c7)/2 */
+ z4 = z3 + tmp12;
+
+ tmp10 = MULTIPLY(z1, FIX(1.396802247)) + z2 + z4; /* c1 */
+ tmp14 = MULTIPLY(z1, FIX(0.221231742)) - z2 + z4; /* c9 */
+
+ z2 = MULTIPLY(tmp11, FIX(0.587785252)); /* (c1-c9)/2 */
+ z4 = z3 - tmp12 - (tmp13 << (CONST_BITS - 1));
+
+ tmp12 = ((z1 - tmp13) << CONST_BITS) - z3;
+
+ tmp11 = MULTIPLY(z1, FIX(1.260073511)) - z2 - z4; /* c3 */
+ tmp13 = MULTIPLY(z1, FIX(0.642039522)) - z2 + z4; /* c7 */
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 8; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 11x11 output block.
+ *
+ * Optimized algorithm with 24 multiplications in the 1-D kernel.
+ * cK represents sqrt(2) * cos(K*pi/22).
+ */
+
+GLOBAL(void)
+jpeg_idct_11x11 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14;
+ INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25;
+ INT32 z1, z2, z3, z4;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[8*11]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array. */
+
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ tmp10 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ tmp10 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ tmp10 += ONE << (CONST_BITS-PASS1_BITS-1);
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+
+ tmp20 = MULTIPLY(z2 - z3, FIX(2.546640132)); /* c2+c4 */
+ tmp23 = MULTIPLY(z2 - z1, FIX(0.430815045)); /* c2-c6 */
+ z4 = z1 + z3;
+ tmp24 = MULTIPLY(z4, - FIX(1.155664402)); /* -(c2-c10) */
+ z4 -= z2;
+ tmp25 = tmp10 + MULTIPLY(z4, FIX(1.356927976)); /* c2 */
+ tmp21 = tmp20 + tmp23 + tmp25 -
+ MULTIPLY(z2, FIX(1.821790775)); /* c2+c4+c10-c6 */
+ tmp20 += tmp25 + MULTIPLY(z3, FIX(2.115825087)); /* c4+c6 */
+ tmp23 += tmp25 - MULTIPLY(z1, FIX(1.513598477)); /* c6+c8 */
+ tmp24 += tmp25;
+ tmp22 = tmp24 - MULTIPLY(z3, FIX(0.788749120)); /* c8+c10 */
+ tmp24 += MULTIPLY(z2, FIX(1.944413522)) - /* c2+c8 */
+ MULTIPLY(z1, FIX(1.390975730)); /* c4+c10 */
+ tmp25 = tmp10 - MULTIPLY(z4, FIX(1.414213562)); /* c0 */
+
+ /* Odd part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+ z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+
+ tmp11 = z1 + z2;
+ tmp14 = MULTIPLY(tmp11 + z3 + z4, FIX(0.398430003)); /* c9 */
+ tmp11 = MULTIPLY(tmp11, FIX(0.887983902)); /* c3-c9 */
+ tmp12 = MULTIPLY(z1 + z3, FIX(0.670361295)); /* c5-c9 */
+ tmp13 = tmp14 + MULTIPLY(z1 + z4, FIX(0.366151574)); /* c7-c9 */
+ tmp10 = tmp11 + tmp12 + tmp13 -
+ MULTIPLY(z1, FIX(0.923107866)); /* c7+c5+c3-c1-2*c9 */
+ z1 = tmp14 - MULTIPLY(z2 + z3, FIX(1.163011579)); /* c7+c9 */
+ tmp11 += z1 + MULTIPLY(z2, FIX(2.073276588)); /* c1+c7+3*c9-c3 */
+ tmp12 += z1 - MULTIPLY(z3, FIX(1.192193623)); /* c3+c5-c7-c9 */
+ z1 = MULTIPLY(z2 + z4, - FIX(1.798248910)); /* -(c1+c9) */
+ tmp11 += z1;
+ tmp13 += z1 + MULTIPLY(z4, FIX(2.102458632)); /* c1+c5+c9-c7 */
+ tmp14 += MULTIPLY(z2, - FIX(1.467221301)) + /* -(c5+c9) */
+ MULTIPLY(z3, FIX(1.001388905)) - /* c1-c9 */
+ MULTIPLY(z4, FIX(1.684843907)); /* c3+c9 */
+
+ /* Final output stage */
+
+ wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*10] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[8*9] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[8*8] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS);
+ wsptr[8*7] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS);
+ wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS);
+ wsptr[8*6] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS);
+ wsptr[8*5] = (int) RIGHT_SHIFT(tmp25, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 11 rows from work array, store into output array. */
+
+ wsptr = workspace;
+ for (ctr = 0; ctr < 11; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp10 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ tmp10 <<= CONST_BITS;
+
+ z1 = (INT32) wsptr[2];
+ z2 = (INT32) wsptr[4];
+ z3 = (INT32) wsptr[6];
+
+ tmp20 = MULTIPLY(z2 - z3, FIX(2.546640132)); /* c2+c4 */
+ tmp23 = MULTIPLY(z2 - z1, FIX(0.430815045)); /* c2-c6 */
+ z4 = z1 + z3;
+ tmp24 = MULTIPLY(z4, - FIX(1.155664402)); /* -(c2-c10) */
+ z4 -= z2;
+ tmp25 = tmp10 + MULTIPLY(z4, FIX(1.356927976)); /* c2 */
+ tmp21 = tmp20 + tmp23 + tmp25 -
+ MULTIPLY(z2, FIX(1.821790775)); /* c2+c4+c10-c6 */
+ tmp20 += tmp25 + MULTIPLY(z3, FIX(2.115825087)); /* c4+c6 */
+ tmp23 += tmp25 - MULTIPLY(z1, FIX(1.513598477)); /* c6+c8 */
+ tmp24 += tmp25;
+ tmp22 = tmp24 - MULTIPLY(z3, FIX(0.788749120)); /* c8+c10 */
+ tmp24 += MULTIPLY(z2, FIX(1.944413522)) - /* c2+c8 */
+ MULTIPLY(z1, FIX(1.390975730)); /* c4+c10 */
+ tmp25 = tmp10 - MULTIPLY(z4, FIX(1.414213562)); /* c0 */
+
+ /* Odd part */
+
+ z1 = (INT32) wsptr[1];
+ z2 = (INT32) wsptr[3];
+ z3 = (INT32) wsptr[5];
+ z4 = (INT32) wsptr[7];
+
+ tmp11 = z1 + z2;
+ tmp14 = MULTIPLY(tmp11 + z3 + z4, FIX(0.398430003)); /* c9 */
+ tmp11 = MULTIPLY(tmp11, FIX(0.887983902)); /* c3-c9 */
+ tmp12 = MULTIPLY(z1 + z3, FIX(0.670361295)); /* c5-c9 */
+ tmp13 = tmp14 + MULTIPLY(z1 + z4, FIX(0.366151574)); /* c7-c9 */
+ tmp10 = tmp11 + tmp12 + tmp13 -
+ MULTIPLY(z1, FIX(0.923107866)); /* c7+c5+c3-c1-2*c9 */
+ z1 = tmp14 - MULTIPLY(z2 + z3, FIX(1.163011579)); /* c7+c9 */
+ tmp11 += z1 + MULTIPLY(z2, FIX(2.073276588)); /* c1+c7+3*c9-c3 */
+ tmp12 += z1 - MULTIPLY(z3, FIX(1.192193623)); /* c3+c5-c7-c9 */
+ z1 = MULTIPLY(z2 + z4, - FIX(1.798248910)); /* -(c1+c9) */
+ tmp11 += z1;
+ tmp13 += z1 + MULTIPLY(z4, FIX(2.102458632)); /* c1+c5+c9-c7 */
+ tmp14 += MULTIPLY(z2, - FIX(1.467221301)) + /* -(c5+c9) */
+ MULTIPLY(z3, FIX(1.001388905)) - /* c1-c9 */
+ MULTIPLY(z4, FIX(1.684843907)); /* c3+c9 */
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 8; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 12x12 output block.
+ *
+ * Optimized algorithm with 15 multiplications in the 1-D kernel.
+ * cK represents sqrt(2) * cos(K*pi/24).
+ */
+
+GLOBAL(void)
+jpeg_idct_12x12 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15;
+ INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25;
+ INT32 z1, z2, z3, z4;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[8*12]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array. */
+
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ z3 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ z3 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ z3 += ONE << (CONST_BITS-PASS1_BITS-1);
+
+ z4 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ z4 = MULTIPLY(z4, FIX(1.224744871)); /* c4 */
+
+ tmp10 = z3 + z4;
+ tmp11 = z3 - z4;
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ z4 = MULTIPLY(z1, FIX(1.366025404)); /* c2 */
+ z1 <<= CONST_BITS;
+ z2 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+ z2 <<= CONST_BITS;
+
+ tmp12 = z1 - z2;
+
+ tmp21 = z3 + tmp12;
+ tmp24 = z3 - tmp12;
+
+ tmp12 = z4 + z2;
+
+ tmp20 = tmp10 + tmp12;
+ tmp25 = tmp10 - tmp12;
+
+ tmp12 = z4 - z1 - z2;
+
+ tmp22 = tmp11 + tmp12;
+ tmp23 = tmp11 - tmp12;
+
+ /* Odd part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+ z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+
+ tmp11 = MULTIPLY(z2, FIX(1.306562965)); /* c3 */
+ tmp14 = MULTIPLY(z2, - FIX_0_541196100); /* -c9 */
+
+ tmp10 = z1 + z3;
+ tmp15 = MULTIPLY(tmp10 + z4, FIX(0.860918669)); /* c7 */
+ tmp12 = tmp15 + MULTIPLY(tmp10, FIX(0.261052384)); /* c5-c7 */
+ tmp10 = tmp12 + tmp11 + MULTIPLY(z1, FIX(0.280143716)); /* c1-c5 */
+ tmp13 = MULTIPLY(z3 + z4, - FIX(1.045510580)); /* -(c7+c11) */
+ tmp12 += tmp13 + tmp14 - MULTIPLY(z3, FIX(1.478575242)); /* c1+c5-c7-c11 */
+ tmp13 += tmp15 - tmp11 + MULTIPLY(z4, FIX(1.586706681)); /* c1+c11 */
+ tmp15 += tmp14 - MULTIPLY(z1, FIX(0.676326758)) - /* c7-c11 */
+ MULTIPLY(z4, FIX(1.982889723)); /* c5+c7 */
+
+ z1 -= z4;
+ z2 -= z3;
+ z3 = MULTIPLY(z1 + z2, FIX_0_541196100); /* c9 */
+ tmp11 = z3 + MULTIPLY(z1, FIX_0_765366865); /* c3-c9 */
+ tmp14 = z3 - MULTIPLY(z2, FIX_1_847759065); /* c3+c9 */
+
+ /* Final output stage */
+
+ wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*11] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[8*10] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[8*9] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS);
+ wsptr[8*8] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS);
+ wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS);
+ wsptr[8*7] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS);
+ wsptr[8*5] = (int) RIGHT_SHIFT(tmp25 + tmp15, CONST_BITS-PASS1_BITS);
+ wsptr[8*6] = (int) RIGHT_SHIFT(tmp25 - tmp15, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 12 rows from work array, store into output array. */
+
+ wsptr = workspace;
+ for (ctr = 0; ctr < 12; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ z3 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ z3 <<= CONST_BITS;
+
+ z4 = (INT32) wsptr[4];
+ z4 = MULTIPLY(z4, FIX(1.224744871)); /* c4 */
+
+ tmp10 = z3 + z4;
+ tmp11 = z3 - z4;
+
+ z1 = (INT32) wsptr[2];
+ z4 = MULTIPLY(z1, FIX(1.366025404)); /* c2 */
+ z1 <<= CONST_BITS;
+ z2 = (INT32) wsptr[6];
+ z2 <<= CONST_BITS;
+
+ tmp12 = z1 - z2;
+
+ tmp21 = z3 + tmp12;
+ tmp24 = z3 - tmp12;
+
+ tmp12 = z4 + z2;
+
+ tmp20 = tmp10 + tmp12;
+ tmp25 = tmp10 - tmp12;
+
+ tmp12 = z4 - z1 - z2;
+
+ tmp22 = tmp11 + tmp12;
+ tmp23 = tmp11 - tmp12;
+
+ /* Odd part */
+
+ z1 = (INT32) wsptr[1];
+ z2 = (INT32) wsptr[3];
+ z3 = (INT32) wsptr[5];
+ z4 = (INT32) wsptr[7];
+
+ tmp11 = MULTIPLY(z2, FIX(1.306562965)); /* c3 */
+ tmp14 = MULTIPLY(z2, - FIX_0_541196100); /* -c9 */
+
+ tmp10 = z1 + z3;
+ tmp15 = MULTIPLY(tmp10 + z4, FIX(0.860918669)); /* c7 */
+ tmp12 = tmp15 + MULTIPLY(tmp10, FIX(0.261052384)); /* c5-c7 */
+ tmp10 = tmp12 + tmp11 + MULTIPLY(z1, FIX(0.280143716)); /* c1-c5 */
+ tmp13 = MULTIPLY(z3 + z4, - FIX(1.045510580)); /* -(c7+c11) */
+ tmp12 += tmp13 + tmp14 - MULTIPLY(z3, FIX(1.478575242)); /* c1+c5-c7-c11 */
+ tmp13 += tmp15 - tmp11 + MULTIPLY(z4, FIX(1.586706681)); /* c1+c11 */
+ tmp15 += tmp14 - MULTIPLY(z1, FIX(0.676326758)) - /* c7-c11 */
+ MULTIPLY(z4, FIX(1.982889723)); /* c5+c7 */
+
+ z1 -= z4;
+ z2 -= z3;
+ z3 = MULTIPLY(z1 + z2, FIX_0_541196100); /* c9 */
+ tmp11 = z3 + MULTIPLY(z1, FIX_0_765366865); /* c3-c9 */
+ tmp14 = z3 - MULTIPLY(z2, FIX_1_847759065); /* c3+c9 */
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp15,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp15,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 8; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 13x13 output block.
+ *
+ * Optimized algorithm with 29 multiplications in the 1-D kernel.
+ * cK represents sqrt(2) * cos(K*pi/26).
+ */
+
+GLOBAL(void)
+jpeg_idct_13x13 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15;
+ INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26;
+ INT32 z1, z2, z3, z4;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[8*13]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array. */
+
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ z1 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ z1 += ONE << (CONST_BITS-PASS1_BITS-1);
+
+ z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ z4 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+
+ tmp10 = z3 + z4;
+ tmp11 = z3 - z4;
+
+ tmp12 = MULTIPLY(tmp10, FIX(1.155388986)); /* (c4+c6)/2 */
+ tmp13 = MULTIPLY(tmp11, FIX(0.096834934)) + z1; /* (c4-c6)/2 */
+
+ tmp20 = MULTIPLY(z2, FIX(1.373119086)) + tmp12 + tmp13; /* c2 */
+ tmp22 = MULTIPLY(z2, FIX(0.501487041)) - tmp12 + tmp13; /* c10 */
+
+ tmp12 = MULTIPLY(tmp10, FIX(0.316450131)); /* (c8-c12)/2 */
+ tmp13 = MULTIPLY(tmp11, FIX(0.486914739)) + z1; /* (c8+c12)/2 */
+
+ tmp21 = MULTIPLY(z2, FIX(1.058554052)) - tmp12 + tmp13; /* c6 */
+ tmp25 = MULTIPLY(z2, - FIX(1.252223920)) + tmp12 + tmp13; /* c4 */
+
+ tmp12 = MULTIPLY(tmp10, FIX(0.435816023)); /* (c2-c10)/2 */
+ tmp13 = MULTIPLY(tmp11, FIX(0.937303064)) - z1; /* (c2+c10)/2 */
+
+ tmp23 = MULTIPLY(z2, - FIX(0.170464608)) - tmp12 - tmp13; /* c12 */
+ tmp24 = MULTIPLY(z2, - FIX(0.803364869)) + tmp12 - tmp13; /* c8 */
+
+ tmp26 = MULTIPLY(tmp11 - z2, FIX(1.414213562)) + z1; /* c0 */
+
+ /* Odd part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+ z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+
+ tmp11 = MULTIPLY(z1 + z2, FIX(1.322312651)); /* c3 */
+ tmp12 = MULTIPLY(z1 + z3, FIX(1.163874945)); /* c5 */
+ tmp15 = z1 + z4;
+ tmp13 = MULTIPLY(tmp15, FIX(0.937797057)); /* c7 */
+ tmp10 = tmp11 + tmp12 + tmp13 -
+ MULTIPLY(z1, FIX(2.020082300)); /* c7+c5+c3-c1 */
+ tmp14 = MULTIPLY(z2 + z3, - FIX(0.338443458)); /* -c11 */
+ tmp11 += tmp14 + MULTIPLY(z2, FIX(0.837223564)); /* c5+c9+c11-c3 */
+ tmp12 += tmp14 - MULTIPLY(z3, FIX(1.572116027)); /* c1+c5-c9-c11 */
+ tmp14 = MULTIPLY(z2 + z4, - FIX(1.163874945)); /* -c5 */
+ tmp11 += tmp14;
+ tmp13 += tmp14 + MULTIPLY(z4, FIX(2.205608352)); /* c3+c5+c9-c7 */
+ tmp14 = MULTIPLY(z3 + z4, - FIX(0.657217813)); /* -c9 */
+ tmp12 += tmp14;
+ tmp13 += tmp14;
+ tmp15 = MULTIPLY(tmp15, FIX(0.338443458)); /* c11 */
+ tmp14 = tmp15 + MULTIPLY(z1, FIX(0.318774355)) - /* c9-c11 */
+ MULTIPLY(z2, FIX(0.466105296)); /* c1-c7 */
+ z1 = MULTIPLY(z3 - z2, FIX(0.937797057)); /* c7 */
+ tmp14 += z1;
+ tmp15 += z1 + MULTIPLY(z3, FIX(0.384515595)) - /* c3-c7 */
+ MULTIPLY(z4, FIX(1.742345811)); /* c1+c11 */
+
+ /* Final output stage */
+
+ wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*12] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[8*11] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[8*10] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS);
+ wsptr[8*9] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS);
+ wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS);
+ wsptr[8*8] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS);
+ wsptr[8*5] = (int) RIGHT_SHIFT(tmp25 + tmp15, CONST_BITS-PASS1_BITS);
+ wsptr[8*7] = (int) RIGHT_SHIFT(tmp25 - tmp15, CONST_BITS-PASS1_BITS);
+ wsptr[8*6] = (int) RIGHT_SHIFT(tmp26, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 13 rows from work array, store into output array. */
+
+ wsptr = workspace;
+ for (ctr = 0; ctr < 13; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ z1 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ z1 <<= CONST_BITS;
+
+ z2 = (INT32) wsptr[2];
+ z3 = (INT32) wsptr[4];
+ z4 = (INT32) wsptr[6];
+
+ tmp10 = z3 + z4;
+ tmp11 = z3 - z4;
+
+ tmp12 = MULTIPLY(tmp10, FIX(1.155388986)); /* (c4+c6)/2 */
+ tmp13 = MULTIPLY(tmp11, FIX(0.096834934)) + z1; /* (c4-c6)/2 */
+
+ tmp20 = MULTIPLY(z2, FIX(1.373119086)) + tmp12 + tmp13; /* c2 */
+ tmp22 = MULTIPLY(z2, FIX(0.501487041)) - tmp12 + tmp13; /* c10 */
+
+ tmp12 = MULTIPLY(tmp10, FIX(0.316450131)); /* (c8-c12)/2 */
+ tmp13 = MULTIPLY(tmp11, FIX(0.486914739)) + z1; /* (c8+c12)/2 */
+
+ tmp21 = MULTIPLY(z2, FIX(1.058554052)) - tmp12 + tmp13; /* c6 */
+ tmp25 = MULTIPLY(z2, - FIX(1.252223920)) + tmp12 + tmp13; /* c4 */
+
+ tmp12 = MULTIPLY(tmp10, FIX(0.435816023)); /* (c2-c10)/2 */
+ tmp13 = MULTIPLY(tmp11, FIX(0.937303064)) - z1; /* (c2+c10)/2 */
+
+ tmp23 = MULTIPLY(z2, - FIX(0.170464608)) - tmp12 - tmp13; /* c12 */
+ tmp24 = MULTIPLY(z2, - FIX(0.803364869)) + tmp12 - tmp13; /* c8 */
+
+ tmp26 = MULTIPLY(tmp11 - z2, FIX(1.414213562)) + z1; /* c0 */
+
+ /* Odd part */
+
+ z1 = (INT32) wsptr[1];
+ z2 = (INT32) wsptr[3];
+ z3 = (INT32) wsptr[5];
+ z4 = (INT32) wsptr[7];
+
+ tmp11 = MULTIPLY(z1 + z2, FIX(1.322312651)); /* c3 */
+ tmp12 = MULTIPLY(z1 + z3, FIX(1.163874945)); /* c5 */
+ tmp15 = z1 + z4;
+ tmp13 = MULTIPLY(tmp15, FIX(0.937797057)); /* c7 */
+ tmp10 = tmp11 + tmp12 + tmp13 -
+ MULTIPLY(z1, FIX(2.020082300)); /* c7+c5+c3-c1 */
+ tmp14 = MULTIPLY(z2 + z3, - FIX(0.338443458)); /* -c11 */
+ tmp11 += tmp14 + MULTIPLY(z2, FIX(0.837223564)); /* c5+c9+c11-c3 */
+ tmp12 += tmp14 - MULTIPLY(z3, FIX(1.572116027)); /* c1+c5-c9-c11 */
+ tmp14 = MULTIPLY(z2 + z4, - FIX(1.163874945)); /* -c5 */
+ tmp11 += tmp14;
+ tmp13 += tmp14 + MULTIPLY(z4, FIX(2.205608352)); /* c3+c5+c9-c7 */
+ tmp14 = MULTIPLY(z3 + z4, - FIX(0.657217813)); /* -c9 */
+ tmp12 += tmp14;
+ tmp13 += tmp14;
+ tmp15 = MULTIPLY(tmp15, FIX(0.338443458)); /* c11 */
+ tmp14 = tmp15 + MULTIPLY(z1, FIX(0.318774355)) - /* c9-c11 */
+ MULTIPLY(z2, FIX(0.466105296)); /* c1-c7 */
+ z1 = MULTIPLY(z3 - z2, FIX(0.937797057)); /* c7 */
+ tmp14 += z1;
+ tmp15 += z1 + MULTIPLY(z3, FIX(0.384515595)) - /* c3-c7 */
+ MULTIPLY(z4, FIX(1.742345811)); /* c1+c11 */
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[12] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp15,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp15,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp26,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 8; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 14x14 output block.
+ *
+ * Optimized algorithm with 20 multiplications in the 1-D kernel.
+ * cK represents sqrt(2) * cos(K*pi/28).
+ */
+
+GLOBAL(void)
+jpeg_idct_14x14 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16;
+ INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26;
+ INT32 z1, z2, z3, z4;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[8*14]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array. */
+
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ z1 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ z1 += ONE << (CONST_BITS-PASS1_BITS-1);
+ z4 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ z2 = MULTIPLY(z4, FIX(1.274162392)); /* c4 */
+ z3 = MULTIPLY(z4, FIX(0.314692123)); /* c12 */
+ z4 = MULTIPLY(z4, FIX(0.881747734)); /* c8 */
+
+ tmp10 = z1 + z2;
+ tmp11 = z1 + z3;
+ tmp12 = z1 - z4;
+
+ tmp23 = RIGHT_SHIFT(z1 - ((z2 + z3 - z4) << 1), /* c0 = (c4+c12-c8)*2 */
+ CONST_BITS-PASS1_BITS);
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+
+ z3 = MULTIPLY(z1 + z2, FIX(1.105676686)); /* c6 */
+
+ tmp13 = z3 + MULTIPLY(z1, FIX(0.273079590)); /* c2-c6 */
+ tmp14 = z3 - MULTIPLY(z2, FIX(1.719280954)); /* c6+c10 */
+ tmp15 = MULTIPLY(z1, FIX(0.613604268)) - /* c10 */
+ MULTIPLY(z2, FIX(1.378756276)); /* c2 */
+
+ tmp20 = tmp10 + tmp13;
+ tmp26 = tmp10 - tmp13;
+ tmp21 = tmp11 + tmp14;
+ tmp25 = tmp11 - tmp14;
+ tmp22 = tmp12 + tmp15;
+ tmp24 = tmp12 - tmp15;
+
+ /* Odd part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+ z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+ tmp13 = z4 << CONST_BITS;
+
+ tmp14 = z1 + z3;
+ tmp11 = MULTIPLY(z1 + z2, FIX(1.334852607)); /* c3 */
+ tmp12 = MULTIPLY(tmp14, FIX(1.197448846)); /* c5 */
+ tmp10 = tmp11 + tmp12 + tmp13 - MULTIPLY(z1, FIX(1.126980169)); /* c3+c5-c1 */
+ tmp14 = MULTIPLY(tmp14, FIX(0.752406978)); /* c9 */
+ tmp16 = tmp14 - MULTIPLY(z1, FIX(1.061150426)); /* c9+c11-c13 */
+ z1 -= z2;
+ tmp15 = MULTIPLY(z1, FIX(0.467085129)) - tmp13; /* c11 */
+ tmp16 += tmp15;
+ z1 += z4;
+ z4 = MULTIPLY(z2 + z3, - FIX(0.158341681)) - tmp13; /* -c13 */
+ tmp11 += z4 - MULTIPLY(z2, FIX(0.424103948)); /* c3-c9-c13 */
+ tmp12 += z4 - MULTIPLY(z3, FIX(2.373959773)); /* c3+c5-c13 */
+ z4 = MULTIPLY(z3 - z2, FIX(1.405321284)); /* c1 */
+ tmp14 += z4 + tmp13 - MULTIPLY(z3, FIX(1.6906431334)); /* c1+c9-c11 */
+ tmp15 += z4 + MULTIPLY(z2, FIX(0.674957567)); /* c1+c11-c5 */
+
+ tmp13 = (z1 - z3) << PASS1_BITS;
+
+ /* Final output stage */
+
+ wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*13] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[8*12] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[8*11] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[8*3] = (int) (tmp23 + tmp13);
+ wsptr[8*10] = (int) (tmp23 - tmp13);
+ wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS);
+ wsptr[8*9] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS);
+ wsptr[8*5] = (int) RIGHT_SHIFT(tmp25 + tmp15, CONST_BITS-PASS1_BITS);
+ wsptr[8*8] = (int) RIGHT_SHIFT(tmp25 - tmp15, CONST_BITS-PASS1_BITS);
+ wsptr[8*6] = (int) RIGHT_SHIFT(tmp26 + tmp16, CONST_BITS-PASS1_BITS);
+ wsptr[8*7] = (int) RIGHT_SHIFT(tmp26 - tmp16, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 14 rows from work array, store into output array. */
+
+ wsptr = workspace;
+ for (ctr = 0; ctr < 14; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ z1 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ z1 <<= CONST_BITS;
+ z4 = (INT32) wsptr[4];
+ z2 = MULTIPLY(z4, FIX(1.274162392)); /* c4 */
+ z3 = MULTIPLY(z4, FIX(0.314692123)); /* c12 */
+ z4 = MULTIPLY(z4, FIX(0.881747734)); /* c8 */
+
+ tmp10 = z1 + z2;
+ tmp11 = z1 + z3;
+ tmp12 = z1 - z4;
+
+ tmp23 = z1 - ((z2 + z3 - z4) << 1); /* c0 = (c4+c12-c8)*2 */
+
+ z1 = (INT32) wsptr[2];
+ z2 = (INT32) wsptr[6];
+
+ z3 = MULTIPLY(z1 + z2, FIX(1.105676686)); /* c6 */
+
+ tmp13 = z3 + MULTIPLY(z1, FIX(0.273079590)); /* c2-c6 */
+ tmp14 = z3 - MULTIPLY(z2, FIX(1.719280954)); /* c6+c10 */
+ tmp15 = MULTIPLY(z1, FIX(0.613604268)) - /* c10 */
+ MULTIPLY(z2, FIX(1.378756276)); /* c2 */
+
+ tmp20 = tmp10 + tmp13;
+ tmp26 = tmp10 - tmp13;
+ tmp21 = tmp11 + tmp14;
+ tmp25 = tmp11 - tmp14;
+ tmp22 = tmp12 + tmp15;
+ tmp24 = tmp12 - tmp15;
+
+ /* Odd part */
+
+ z1 = (INT32) wsptr[1];
+ z2 = (INT32) wsptr[3];
+ z3 = (INT32) wsptr[5];
+ z4 = (INT32) wsptr[7];
+ z4 <<= CONST_BITS;
+
+ tmp14 = z1 + z3;
+ tmp11 = MULTIPLY(z1 + z2, FIX(1.334852607)); /* c3 */
+ tmp12 = MULTIPLY(tmp14, FIX(1.197448846)); /* c5 */
+ tmp10 = tmp11 + tmp12 + z4 - MULTIPLY(z1, FIX(1.126980169)); /* c3+c5-c1 */
+ tmp14 = MULTIPLY(tmp14, FIX(0.752406978)); /* c9 */
+ tmp16 = tmp14 - MULTIPLY(z1, FIX(1.061150426)); /* c9+c11-c13 */
+ z1 -= z2;
+ tmp15 = MULTIPLY(z1, FIX(0.467085129)) - z4; /* c11 */
+ tmp16 += tmp15;
+ tmp13 = MULTIPLY(z2 + z3, - FIX(0.158341681)) - z4; /* -c13 */
+ tmp11 += tmp13 - MULTIPLY(z2, FIX(0.424103948)); /* c3-c9-c13 */
+ tmp12 += tmp13 - MULTIPLY(z3, FIX(2.373959773)); /* c3+c5-c13 */
+ tmp13 = MULTIPLY(z3 - z2, FIX(1.405321284)); /* c1 */
+ tmp14 += tmp13 + z4 - MULTIPLY(z3, FIX(1.6906431334)); /* c1+c9-c11 */
+ tmp15 += tmp13 + MULTIPLY(z2, FIX(0.674957567)); /* c1+c11-c5 */
+
+ tmp13 = ((z1 - z3) << CONST_BITS) + z4;
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[13] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[12] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp15,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp15,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp26 + tmp16,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp26 - tmp16,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 8; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 15x15 output block.
+ *
+ * Optimized algorithm with 22 multiplications in the 1-D kernel.
+ * cK represents sqrt(2) * cos(K*pi/30).
+ */
+
+GLOBAL(void)
+jpeg_idct_15x15 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16;
+ INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26, tmp27;
+ INT32 z1, z2, z3, z4;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[8*15]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array. */
+
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ z1 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ z1 += ONE << (CONST_BITS-PASS1_BITS-1);
+
+ z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ z4 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+
+ tmp10 = MULTIPLY(z4, FIX(0.437016024)); /* c12 */
+ tmp11 = MULTIPLY(z4, FIX(1.144122806)); /* c6 */
+
+ tmp12 = z1 - tmp10;
+ tmp13 = z1 + tmp11;
+ z1 -= (tmp11 - tmp10) << 1; /* c0 = (c6-c12)*2 */
+
+ z4 = z2 - z3;
+ z3 += z2;
+ tmp10 = MULTIPLY(z3, FIX(1.337628990)); /* (c2+c4)/2 */
+ tmp11 = MULTIPLY(z4, FIX(0.045680613)); /* (c2-c4)/2 */
+ z2 = MULTIPLY(z2, FIX(1.439773946)); /* c4+c14 */
+
+ tmp20 = tmp13 + tmp10 + tmp11;
+ tmp23 = tmp12 - tmp10 + tmp11 + z2;
+
+ tmp10 = MULTIPLY(z3, FIX(0.547059574)); /* (c8+c14)/2 */
+ tmp11 = MULTIPLY(z4, FIX(0.399234004)); /* (c8-c14)/2 */
+
+ tmp25 = tmp13 - tmp10 - tmp11;
+ tmp26 = tmp12 + tmp10 - tmp11 - z2;
+
+ tmp10 = MULTIPLY(z3, FIX(0.790569415)); /* (c6+c12)/2 */
+ tmp11 = MULTIPLY(z4, FIX(0.353553391)); /* (c6-c12)/2 */
+
+ tmp21 = tmp12 + tmp10 + tmp11;
+ tmp24 = tmp13 - tmp10 + tmp11;
+ tmp11 += tmp11;
+ tmp22 = z1 + tmp11; /* c10 = c6-c12 */
+ tmp27 = z1 - tmp11 - tmp11; /* c0 = (c6-c12)*2 */
+
+ /* Odd part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ z4 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+ z3 = MULTIPLY(z4, FIX(1.224744871)); /* c5 */
+ z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+
+ tmp13 = z2 - z4;
+ tmp15 = MULTIPLY(z1 + tmp13, FIX(0.831253876)); /* c9 */
+ tmp11 = tmp15 + MULTIPLY(z1, FIX(0.513743148)); /* c3-c9 */
+ tmp14 = tmp15 - MULTIPLY(tmp13, FIX(2.176250899)); /* c3+c9 */
+
+ tmp13 = MULTIPLY(z2, - FIX(0.831253876)); /* -c9 */
+ tmp15 = MULTIPLY(z2, - FIX(1.344997024)); /* -c3 */
+ z2 = z1 - z4;
+ tmp12 = z3 + MULTIPLY(z2, FIX(1.406466353)); /* c1 */
+
+ tmp10 = tmp12 + MULTIPLY(z4, FIX(2.457431844)) - tmp15; /* c1+c7 */
+ tmp16 = tmp12 - MULTIPLY(z1, FIX(1.112434820)) + tmp13; /* c1-c13 */
+ tmp12 = MULTIPLY(z2, FIX(1.224744871)) - z3; /* c5 */
+ z2 = MULTIPLY(z1 + z4, FIX(0.575212477)); /* c11 */
+ tmp13 += z2 + MULTIPLY(z1, FIX(0.475753014)) - z3; /* c7-c11 */
+ tmp15 += z2 - MULTIPLY(z4, FIX(0.869244010)) + z3; /* c11+c13 */
+
+ /* Final output stage */
+
+ wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*14] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[8*13] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[8*12] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS);
+ wsptr[8*11] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS);
+ wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS);
+ wsptr[8*10] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS);
+ wsptr[8*5] = (int) RIGHT_SHIFT(tmp25 + tmp15, CONST_BITS-PASS1_BITS);
+ wsptr[8*9] = (int) RIGHT_SHIFT(tmp25 - tmp15, CONST_BITS-PASS1_BITS);
+ wsptr[8*6] = (int) RIGHT_SHIFT(tmp26 + tmp16, CONST_BITS-PASS1_BITS);
+ wsptr[8*8] = (int) RIGHT_SHIFT(tmp26 - tmp16, CONST_BITS-PASS1_BITS);
+ wsptr[8*7] = (int) RIGHT_SHIFT(tmp27, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 15 rows from work array, store into output array. */
+
+ wsptr = workspace;
+ for (ctr = 0; ctr < 15; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ z1 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ z1 <<= CONST_BITS;
+
+ z2 = (INT32) wsptr[2];
+ z3 = (INT32) wsptr[4];
+ z4 = (INT32) wsptr[6];
+
+ tmp10 = MULTIPLY(z4, FIX(0.437016024)); /* c12 */
+ tmp11 = MULTIPLY(z4, FIX(1.144122806)); /* c6 */
+
+ tmp12 = z1 - tmp10;
+ tmp13 = z1 + tmp11;
+ z1 -= (tmp11 - tmp10) << 1; /* c0 = (c6-c12)*2 */
+
+ z4 = z2 - z3;
+ z3 += z2;
+ tmp10 = MULTIPLY(z3, FIX(1.337628990)); /* (c2+c4)/2 */
+ tmp11 = MULTIPLY(z4, FIX(0.045680613)); /* (c2-c4)/2 */
+ z2 = MULTIPLY(z2, FIX(1.439773946)); /* c4+c14 */
+
+ tmp20 = tmp13 + tmp10 + tmp11;
+ tmp23 = tmp12 - tmp10 + tmp11 + z2;
+
+ tmp10 = MULTIPLY(z3, FIX(0.547059574)); /* (c8+c14)/2 */
+ tmp11 = MULTIPLY(z4, FIX(0.399234004)); /* (c8-c14)/2 */
+
+ tmp25 = tmp13 - tmp10 - tmp11;
+ tmp26 = tmp12 + tmp10 - tmp11 - z2;
+
+ tmp10 = MULTIPLY(z3, FIX(0.790569415)); /* (c6+c12)/2 */
+ tmp11 = MULTIPLY(z4, FIX(0.353553391)); /* (c6-c12)/2 */
+
+ tmp21 = tmp12 + tmp10 + tmp11;
+ tmp24 = tmp13 - tmp10 + tmp11;
+ tmp11 += tmp11;
+ tmp22 = z1 + tmp11; /* c10 = c6-c12 */
+ tmp27 = z1 - tmp11 - tmp11; /* c0 = (c6-c12)*2 */
+
+ /* Odd part */
+
+ z1 = (INT32) wsptr[1];
+ z2 = (INT32) wsptr[3];
+ z4 = (INT32) wsptr[5];
+ z3 = MULTIPLY(z4, FIX(1.224744871)); /* c5 */
+ z4 = (INT32) wsptr[7];
+
+ tmp13 = z2 - z4;
+ tmp15 = MULTIPLY(z1 + tmp13, FIX(0.831253876)); /* c9 */
+ tmp11 = tmp15 + MULTIPLY(z1, FIX(0.513743148)); /* c3-c9 */
+ tmp14 = tmp15 - MULTIPLY(tmp13, FIX(2.176250899)); /* c3+c9 */
+
+ tmp13 = MULTIPLY(z2, - FIX(0.831253876)); /* -c9 */
+ tmp15 = MULTIPLY(z2, - FIX(1.344997024)); /* -c3 */
+ z2 = z1 - z4;
+ tmp12 = z3 + MULTIPLY(z2, FIX(1.406466353)); /* c1 */
+
+ tmp10 = tmp12 + MULTIPLY(z4, FIX(2.457431844)) - tmp15; /* c1+c7 */
+ tmp16 = tmp12 - MULTIPLY(z1, FIX(1.112434820)) + tmp13; /* c1-c13 */
+ tmp12 = MULTIPLY(z2, FIX(1.224744871)) - z3; /* c5 */
+ z2 = MULTIPLY(z1 + z4, FIX(0.575212477)); /* c11 */
+ tmp13 += z2 + MULTIPLY(z1, FIX(0.475753014)) - z3; /* c7-c11 */
+ tmp15 += z2 - MULTIPLY(z4, FIX(0.869244010)) + z3; /* c11+c13 */
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[14] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[13] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[12] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp15,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp15,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp26 + tmp16,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp26 - tmp16,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp27,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 8; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 16x16 output block.
+ *
+ * Optimized algorithm with 28 multiplications in the 1-D kernel.
+ * cK represents sqrt(2) * cos(K*pi/32).
+ */
+
+GLOBAL(void)
+jpeg_idct_16x16 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp10, tmp11, tmp12, tmp13;
+ INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26, tmp27;
+ INT32 z1, z2, z3, z4;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[8*16]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array. */
+
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ tmp0 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ tmp0 += 1 << (CONST_BITS-PASS1_BITS-1);
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ tmp1 = MULTIPLY(z1, FIX(1.306562965)); /* c4[16] = c2[8] */
+ tmp2 = MULTIPLY(z1, FIX_0_541196100); /* c12[16] = c6[8] */
+
+ tmp10 = tmp0 + tmp1;
+ tmp11 = tmp0 - tmp1;
+ tmp12 = tmp0 + tmp2;
+ tmp13 = tmp0 - tmp2;
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+ z3 = z1 - z2;
+ z4 = MULTIPLY(z3, FIX(0.275899379)); /* c14[16] = c7[8] */
+ z3 = MULTIPLY(z3, FIX(1.387039845)); /* c2[16] = c1[8] */
+
+ tmp0 = z3 + MULTIPLY(z2, FIX_2_562915447); /* (c6+c2)[16] = (c3+c1)[8] */
+ tmp1 = z4 + MULTIPLY(z1, FIX_0_899976223); /* (c6-c14)[16] = (c3-c7)[8] */
+ tmp2 = z3 - MULTIPLY(z1, FIX(0.601344887)); /* (c2-c10)[16] = (c1-c5)[8] */
+ tmp3 = z4 - MULTIPLY(z2, FIX(0.509795579)); /* (c10-c14)[16] = (c5-c7)[8] */
+
+ tmp20 = tmp10 + tmp0;
+ tmp27 = tmp10 - tmp0;
+ tmp21 = tmp12 + tmp1;
+ tmp26 = tmp12 - tmp1;
+ tmp22 = tmp13 + tmp2;
+ tmp25 = tmp13 - tmp2;
+ tmp23 = tmp11 + tmp3;
+ tmp24 = tmp11 - tmp3;
+
+ /* Odd part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+ z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+
+ tmp11 = z1 + z3;
+
+ tmp1 = MULTIPLY(z1 + z2, FIX(1.353318001)); /* c3 */
+ tmp2 = MULTIPLY(tmp11, FIX(1.247225013)); /* c5 */
+ tmp3 = MULTIPLY(z1 + z4, FIX(1.093201867)); /* c7 */
+ tmp10 = MULTIPLY(z1 - z4, FIX(0.897167586)); /* c9 */
+ tmp11 = MULTIPLY(tmp11, FIX(0.666655658)); /* c11 */
+ tmp12 = MULTIPLY(z1 - z2, FIX(0.410524528)); /* c13 */
+ tmp0 = tmp1 + tmp2 + tmp3 -
+ MULTIPLY(z1, FIX(2.286341144)); /* c7+c5+c3-c1 */
+ tmp13 = tmp10 + tmp11 + tmp12 -
+ MULTIPLY(z1, FIX(1.835730603)); /* c9+c11+c13-c15 */
+ z1 = MULTIPLY(z2 + z3, FIX(0.138617169)); /* c15 */
+ tmp1 += z1 + MULTIPLY(z2, FIX(0.071888074)); /* c9+c11-c3-c15 */
+ tmp2 += z1 - MULTIPLY(z3, FIX(1.125726048)); /* c5+c7+c15-c3 */
+ z1 = MULTIPLY(z3 - z2, FIX(1.407403738)); /* c1 */
+ tmp11 += z1 - MULTIPLY(z3, FIX(0.766367282)); /* c1+c11-c9-c13 */
+ tmp12 += z1 + MULTIPLY(z2, FIX(1.971951411)); /* c1+c5+c13-c7 */
+ z2 += z4;
+ z1 = MULTIPLY(z2, - FIX(0.666655658)); /* -c11 */
+ tmp1 += z1;
+ tmp3 += z1 + MULTIPLY(z4, FIX(1.065388962)); /* c3+c11+c15-c7 */
+ z2 = MULTIPLY(z2, - FIX(1.247225013)); /* -c5 */
+ tmp10 += z2 + MULTIPLY(z4, FIX(3.141271809)); /* c1+c5+c9-c13 */
+ tmp12 += z2;
+ z2 = MULTIPLY(z3 + z4, - FIX(1.353318001)); /* -c3 */
+ tmp2 += z2;
+ tmp3 += z2;
+ z2 = MULTIPLY(z4 - z3, FIX(0.410524528)); /* c13 */
+ tmp10 += z2;
+ tmp11 += z2;
+
+ /* Final output stage */
+
+ wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[8*15] = (int) RIGHT_SHIFT(tmp20 - tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp1, CONST_BITS-PASS1_BITS);
+ wsptr[8*14] = (int) RIGHT_SHIFT(tmp21 - tmp1, CONST_BITS-PASS1_BITS);
+ wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp2, CONST_BITS-PASS1_BITS);
+ wsptr[8*13] = (int) RIGHT_SHIFT(tmp22 - tmp2, CONST_BITS-PASS1_BITS);
+ wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp3, CONST_BITS-PASS1_BITS);
+ wsptr[8*12] = (int) RIGHT_SHIFT(tmp23 - tmp3, CONST_BITS-PASS1_BITS);
+ wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*11] = (int) RIGHT_SHIFT(tmp24 - tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*5] = (int) RIGHT_SHIFT(tmp25 + tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[8*10] = (int) RIGHT_SHIFT(tmp25 - tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[8*6] = (int) RIGHT_SHIFT(tmp26 + tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[8*9] = (int) RIGHT_SHIFT(tmp26 - tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[8*7] = (int) RIGHT_SHIFT(tmp27 + tmp13, CONST_BITS-PASS1_BITS);
+ wsptr[8*8] = (int) RIGHT_SHIFT(tmp27 - tmp13, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 16 rows from work array, store into output array. */
+
+ wsptr = workspace;
+ for (ctr = 0; ctr < 16; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp0 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ tmp0 <<= CONST_BITS;
+
+ z1 = (INT32) wsptr[4];
+ tmp1 = MULTIPLY(z1, FIX(1.306562965)); /* c4[16] = c2[8] */
+ tmp2 = MULTIPLY(z1, FIX_0_541196100); /* c12[16] = c6[8] */
+
+ tmp10 = tmp0 + tmp1;
+ tmp11 = tmp0 - tmp1;
+ tmp12 = tmp0 + tmp2;
+ tmp13 = tmp0 - tmp2;
+
+ z1 = (INT32) wsptr[2];
+ z2 = (INT32) wsptr[6];
+ z3 = z1 - z2;
+ z4 = MULTIPLY(z3, FIX(0.275899379)); /* c14[16] = c7[8] */
+ z3 = MULTIPLY(z3, FIX(1.387039845)); /* c2[16] = c1[8] */
+
+ tmp0 = z3 + MULTIPLY(z2, FIX_2_562915447); /* (c6+c2)[16] = (c3+c1)[8] */
+ tmp1 = z4 + MULTIPLY(z1, FIX_0_899976223); /* (c6-c14)[16] = (c3-c7)[8] */
+ tmp2 = z3 - MULTIPLY(z1, FIX(0.601344887)); /* (c2-c10)[16] = (c1-c5)[8] */
+ tmp3 = z4 - MULTIPLY(z2, FIX(0.509795579)); /* (c10-c14)[16] = (c5-c7)[8] */
+
+ tmp20 = tmp10 + tmp0;
+ tmp27 = tmp10 - tmp0;
+ tmp21 = tmp12 + tmp1;
+ tmp26 = tmp12 - tmp1;
+ tmp22 = tmp13 + tmp2;
+ tmp25 = tmp13 - tmp2;
+ tmp23 = tmp11 + tmp3;
+ tmp24 = tmp11 - tmp3;
+
+ /* Odd part */
+
+ z1 = (INT32) wsptr[1];
+ z2 = (INT32) wsptr[3];
+ z3 = (INT32) wsptr[5];
+ z4 = (INT32) wsptr[7];
+
+ tmp11 = z1 + z3;
+
+ tmp1 = MULTIPLY(z1 + z2, FIX(1.353318001)); /* c3 */
+ tmp2 = MULTIPLY(tmp11, FIX(1.247225013)); /* c5 */
+ tmp3 = MULTIPLY(z1 + z4, FIX(1.093201867)); /* c7 */
+ tmp10 = MULTIPLY(z1 - z4, FIX(0.897167586)); /* c9 */
+ tmp11 = MULTIPLY(tmp11, FIX(0.666655658)); /* c11 */
+ tmp12 = MULTIPLY(z1 - z2, FIX(0.410524528)); /* c13 */
+ tmp0 = tmp1 + tmp2 + tmp3 -
+ MULTIPLY(z1, FIX(2.286341144)); /* c7+c5+c3-c1 */
+ tmp13 = tmp10 + tmp11 + tmp12 -
+ MULTIPLY(z1, FIX(1.835730603)); /* c9+c11+c13-c15 */
+ z1 = MULTIPLY(z2 + z3, FIX(0.138617169)); /* c15 */
+ tmp1 += z1 + MULTIPLY(z2, FIX(0.071888074)); /* c9+c11-c3-c15 */
+ tmp2 += z1 - MULTIPLY(z3, FIX(1.125726048)); /* c5+c7+c15-c3 */
+ z1 = MULTIPLY(z3 - z2, FIX(1.407403738)); /* c1 */
+ tmp11 += z1 - MULTIPLY(z3, FIX(0.766367282)); /* c1+c11-c9-c13 */
+ tmp12 += z1 + MULTIPLY(z2, FIX(1.971951411)); /* c1+c5+c13-c7 */
+ z2 += z4;
+ z1 = MULTIPLY(z2, - FIX(0.666655658)); /* -c11 */
+ tmp1 += z1;
+ tmp3 += z1 + MULTIPLY(z4, FIX(1.065388962)); /* c3+c11+c15-c7 */
+ z2 = MULTIPLY(z2, - FIX(1.247225013)); /* -c5 */
+ tmp10 += z2 + MULTIPLY(z4, FIX(3.141271809)); /* c1+c5+c9-c13 */
+ tmp12 += z2;
+ z2 = MULTIPLY(z3 + z4, - FIX(1.353318001)); /* -c3 */
+ tmp2 += z2;
+ tmp3 += z2;
+ z2 = MULTIPLY(z4 - z3, FIX(0.410524528)); /* c13 */
+ tmp10 += z2;
+ tmp11 += z2;
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[15] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp1,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[14] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp1,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[13] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp3,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[12] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp3,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp26 + tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp26 - tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp27 + tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp27 - tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 8; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 16x8 output block.
+ *
+ * 8-point IDCT in pass 1 (columns), 16-point in pass 2 (rows).
+ */
+
+GLOBAL(void)
+jpeg_idct_16x8 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp10, tmp11, tmp12, tmp13;
+ INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26, tmp27;
+ INT32 z1, z2, z3, z4;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[8*8]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array. */
+ /* Note results are scaled up by sqrt(8) compared to a true IDCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = DCTSIZE; ctr > 0; ctr--) {
+ /* Due to quantization, we will usually find that many of the input
+ * coefficients are zero, especially the AC terms. We can exploit this
+ * by short-circuiting the IDCT calculation for any column in which all
+ * the AC terms are zero. In that case each output is equal to the
+ * DC coefficient (with scale factor as needed).
+ * With typical images and quantization tables, half or more of the
+ * column DCT calculations can be simplified this way.
+ */
+
+ if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 &&
+ inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 &&
+ inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 &&
+ inptr[DCTSIZE*7] == 0) {
+ /* AC terms all zero */
+ int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS;
+
+ wsptr[DCTSIZE*0] = dcval;
+ wsptr[DCTSIZE*1] = dcval;
+ wsptr[DCTSIZE*2] = dcval;
+ wsptr[DCTSIZE*3] = dcval;
+ wsptr[DCTSIZE*4] = dcval;
+ wsptr[DCTSIZE*5] = dcval;
+ wsptr[DCTSIZE*6] = dcval;
+ wsptr[DCTSIZE*7] = dcval;
+
+ inptr++; /* advance pointers to next column */
+ quantptr++;
+ wsptr++;
+ continue;
+ }
+
+ /* Even part: reverse the even part of the forward DCT. */
+ /* The rotator is sqrt(2)*c(-6). */
+
+ z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
z1 = MULTIPLY(z2 + z3, FIX_0_541196100);
- tmp2 = z1 + MULTIPLY(z3, - FIX_1_847759065);
- tmp3 = z1 + MULTIPLY(z2, FIX_0_765366865);
+ tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865);
+ tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065);
- tmp0 = ((INT32) wsptr[0] + (INT32) wsptr[4]) << CONST_BITS;
- tmp1 = ((INT32) wsptr[0] - (INT32) wsptr[4]) << CONST_BITS;
+ z2 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ z2 <<= CONST_BITS;
+ z3 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ z2 += ONE << (CONST_BITS-PASS1_BITS-1);
+
+ tmp0 = z2 + z3;
+ tmp1 = z2 - z3;
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp1 + tmp2;
- tmp12 = tmp1 - tmp2;
+ tmp10 = tmp0 + tmp2;
+ tmp13 = tmp0 - tmp2;
+ tmp11 = tmp1 + tmp3;
+ tmp12 = tmp1 - tmp3;
/* Odd part per figure 8; the matrix is unitary and hence its
* transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively.
*/
+ tmp0 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+ tmp1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+ tmp2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ tmp3 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+
+ z2 = tmp0 + tmp2;
+ z3 = tmp1 + tmp3;
+
+ z1 = MULTIPLY(z2 + z3, FIX_1_175875602); /* sqrt(2) * c3 */
+ z2 = MULTIPLY(z2, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
+ z3 = MULTIPLY(z3, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
+ z2 += z1;
+ z3 += z1;
+
+ z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
+ tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
+ tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
+ tmp0 += z1 + z2;
+ tmp3 += z1 + z3;
+
+ z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
+ tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
+ tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
+ tmp1 += z1 + z3;
+ tmp2 += z1 + z2;
+
+ /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */
+
+ wsptr[DCTSIZE*0] = (int) RIGHT_SHIFT(tmp10 + tmp3, CONST_BITS-PASS1_BITS);
+ wsptr[DCTSIZE*7] = (int) RIGHT_SHIFT(tmp10 - tmp3, CONST_BITS-PASS1_BITS);
+ wsptr[DCTSIZE*1] = (int) RIGHT_SHIFT(tmp11 + tmp2, CONST_BITS-PASS1_BITS);
+ wsptr[DCTSIZE*6] = (int) RIGHT_SHIFT(tmp11 - tmp2, CONST_BITS-PASS1_BITS);
+ wsptr[DCTSIZE*2] = (int) RIGHT_SHIFT(tmp12 + tmp1, CONST_BITS-PASS1_BITS);
+ wsptr[DCTSIZE*5] = (int) RIGHT_SHIFT(tmp12 - tmp1, CONST_BITS-PASS1_BITS);
+ wsptr[DCTSIZE*3] = (int) RIGHT_SHIFT(tmp13 + tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[DCTSIZE*4] = (int) RIGHT_SHIFT(tmp13 - tmp0, CONST_BITS-PASS1_BITS);
+
+ inptr++; /* advance pointers to next column */
+ quantptr++;
+ wsptr++;
+ }
+
+ /* Pass 2: process 8 rows from work array, store into output array.
+ * 16-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/32).
+ */
+ wsptr = workspace;
+ for (ctr = 0; ctr < 8; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp0 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ tmp0 <<= CONST_BITS;
+
+ z1 = (INT32) wsptr[4];
+ tmp1 = MULTIPLY(z1, FIX(1.306562965)); /* c4[16] = c2[8] */
+ tmp2 = MULTIPLY(z1, FIX_0_541196100); /* c12[16] = c6[8] */
+
+ tmp10 = tmp0 + tmp1;
+ tmp11 = tmp0 - tmp1;
+ tmp12 = tmp0 + tmp2;
+ tmp13 = tmp0 - tmp2;
+
+ z1 = (INT32) wsptr[2];
+ z2 = (INT32) wsptr[6];
+ z3 = z1 - z2;
+ z4 = MULTIPLY(z3, FIX(0.275899379)); /* c14[16] = c7[8] */
+ z3 = MULTIPLY(z3, FIX(1.387039845)); /* c2[16] = c1[8] */
+
+ tmp0 = z3 + MULTIPLY(z2, FIX_2_562915447); /* (c6+c2)[16] = (c3+c1)[8] */
+ tmp1 = z4 + MULTIPLY(z1, FIX_0_899976223); /* (c6-c14)[16] = (c3-c7)[8] */
+ tmp2 = z3 - MULTIPLY(z1, FIX(0.601344887)); /* (c2-c10)[16] = (c1-c5)[8] */
+ tmp3 = z4 - MULTIPLY(z2, FIX(0.509795579)); /* (c10-c14)[16] = (c5-c7)[8] */
+
+ tmp20 = tmp10 + tmp0;
+ tmp27 = tmp10 - tmp0;
+ tmp21 = tmp12 + tmp1;
+ tmp26 = tmp12 - tmp1;
+ tmp22 = tmp13 + tmp2;
+ tmp25 = tmp13 - tmp2;
+ tmp23 = tmp11 + tmp3;
+ tmp24 = tmp11 - tmp3;
+
+ /* Odd part */
+
+ z1 = (INT32) wsptr[1];
+ z2 = (INT32) wsptr[3];
+ z3 = (INT32) wsptr[5];
+ z4 = (INT32) wsptr[7];
+
+ tmp11 = z1 + z3;
+
+ tmp1 = MULTIPLY(z1 + z2, FIX(1.353318001)); /* c3 */
+ tmp2 = MULTIPLY(tmp11, FIX(1.247225013)); /* c5 */
+ tmp3 = MULTIPLY(z1 + z4, FIX(1.093201867)); /* c7 */
+ tmp10 = MULTIPLY(z1 - z4, FIX(0.897167586)); /* c9 */
+ tmp11 = MULTIPLY(tmp11, FIX(0.666655658)); /* c11 */
+ tmp12 = MULTIPLY(z1 - z2, FIX(0.410524528)); /* c13 */
+ tmp0 = tmp1 + tmp2 + tmp3 -
+ MULTIPLY(z1, FIX(2.286341144)); /* c7+c5+c3-c1 */
+ tmp13 = tmp10 + tmp11 + tmp12 -
+ MULTIPLY(z1, FIX(1.835730603)); /* c9+c11+c13-c15 */
+ z1 = MULTIPLY(z2 + z3, FIX(0.138617169)); /* c15 */
+ tmp1 += z1 + MULTIPLY(z2, FIX(0.071888074)); /* c9+c11-c3-c15 */
+ tmp2 += z1 - MULTIPLY(z3, FIX(1.125726048)); /* c5+c7+c15-c3 */
+ z1 = MULTIPLY(z3 - z2, FIX(1.407403738)); /* c1 */
+ tmp11 += z1 - MULTIPLY(z3, FIX(0.766367282)); /* c1+c11-c9-c13 */
+ tmp12 += z1 + MULTIPLY(z2, FIX(1.971951411)); /* c1+c5+c13-c7 */
+ z2 += z4;
+ z1 = MULTIPLY(z2, - FIX(0.666655658)); /* -c11 */
+ tmp1 += z1;
+ tmp3 += z1 + MULTIPLY(z4, FIX(1.065388962)); /* c3+c11+c15-c7 */
+ z2 = MULTIPLY(z2, - FIX(1.247225013)); /* -c5 */
+ tmp10 += z2 + MULTIPLY(z4, FIX(3.141271809)); /* c1+c5+c9-c13 */
+ tmp12 += z2;
+ z2 = MULTIPLY(z3 + z4, - FIX(1.353318001)); /* -c3 */
+ tmp2 += z2;
+ tmp3 += z2;
+ z2 = MULTIPLY(z4 - z3, FIX(0.410524528)); /* c13 */
+ tmp10 += z2;
+ tmp11 += z2;
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[15] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp1,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[14] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp1,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[13] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp3,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[12] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp3,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp26 + tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp26 - tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp27 + tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp27 - tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 8; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 14x7 output block.
+ *
+ * 7-point IDCT in pass 1 (columns), 14-point in pass 2 (rows).
+ */
+
+GLOBAL(void)
+jpeg_idct_14x7 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16;
+ INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26;
+ INT32 z1, z2, z3, z4;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[8*7]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array.
+ * 7-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/14).
+ */
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ tmp23 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ tmp23 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ tmp23 += ONE << (CONST_BITS-PASS1_BITS-1);
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+
+ tmp20 = MULTIPLY(z2 - z3, FIX(0.881747734)); /* c4 */
+ tmp22 = MULTIPLY(z1 - z2, FIX(0.314692123)); /* c6 */
+ tmp21 = tmp20 + tmp22 + tmp23 - MULTIPLY(z2, FIX(1.841218003)); /* c2+c4-c6 */
+ tmp10 = z1 + z3;
+ z2 -= tmp10;
+ tmp10 = MULTIPLY(tmp10, FIX(1.274162392)) + tmp23; /* c2 */
+ tmp20 += tmp10 - MULTIPLY(z3, FIX(0.077722536)); /* c2-c4-c6 */
+ tmp22 += tmp10 - MULTIPLY(z1, FIX(2.470602249)); /* c2+c4+c6 */
+ tmp23 += MULTIPLY(z2, FIX(1.414213562)); /* c0 */
+
+ /* Odd part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+
+ tmp11 = MULTIPLY(z1 + z2, FIX(0.935414347)); /* (c3+c1-c5)/2 */
+ tmp12 = MULTIPLY(z1 - z2, FIX(0.170262339)); /* (c3+c5-c1)/2 */
+ tmp10 = tmp11 - tmp12;
+ tmp11 += tmp12;
+ tmp12 = MULTIPLY(z2 + z3, - FIX(1.378756276)); /* -c1 */
+ tmp11 += tmp12;
+ z2 = MULTIPLY(z1 + z3, FIX(0.613604268)); /* c5 */
+ tmp10 += z2;
+ tmp12 += z2 + MULTIPLY(z3, FIX(1.870828693)); /* c3+c1-c5 */
+
+ /* Final output stage */
+
+ wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*6] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[8*5] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[8*4] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[8*3] = (int) RIGHT_SHIFT(tmp23, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 7 rows from work array, store into output array.
+ * 14-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/28).
+ */
+ wsptr = workspace;
+ for (ctr = 0; ctr < 7; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ z1 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ z1 <<= CONST_BITS;
+ z4 = (INT32) wsptr[4];
+ z2 = MULTIPLY(z4, FIX(1.274162392)); /* c4 */
+ z3 = MULTIPLY(z4, FIX(0.314692123)); /* c12 */
+ z4 = MULTIPLY(z4, FIX(0.881747734)); /* c8 */
+
+ tmp10 = z1 + z2;
+ tmp11 = z1 + z3;
+ tmp12 = z1 - z4;
+
+ tmp23 = z1 - ((z2 + z3 - z4) << 1); /* c0 = (c4+c12-c8)*2 */
+
+ z1 = (INT32) wsptr[2];
+ z2 = (INT32) wsptr[6];
+
+ z3 = MULTIPLY(z1 + z2, FIX(1.105676686)); /* c6 */
+
+ tmp13 = z3 + MULTIPLY(z1, FIX(0.273079590)); /* c2-c6 */
+ tmp14 = z3 - MULTIPLY(z2, FIX(1.719280954)); /* c6+c10 */
+ tmp15 = MULTIPLY(z1, FIX(0.613604268)) - /* c10 */
+ MULTIPLY(z2, FIX(1.378756276)); /* c2 */
+
+ tmp20 = tmp10 + tmp13;
+ tmp26 = tmp10 - tmp13;
+ tmp21 = tmp11 + tmp14;
+ tmp25 = tmp11 - tmp14;
+ tmp22 = tmp12 + tmp15;
+ tmp24 = tmp12 - tmp15;
+
+ /* Odd part */
+
+ z1 = (INT32) wsptr[1];
+ z2 = (INT32) wsptr[3];
+ z3 = (INT32) wsptr[5];
+ z4 = (INT32) wsptr[7];
+ z4 <<= CONST_BITS;
+
+ tmp14 = z1 + z3;
+ tmp11 = MULTIPLY(z1 + z2, FIX(1.334852607)); /* c3 */
+ tmp12 = MULTIPLY(tmp14, FIX(1.197448846)); /* c5 */
+ tmp10 = tmp11 + tmp12 + z4 - MULTIPLY(z1, FIX(1.126980169)); /* c3+c5-c1 */
+ tmp14 = MULTIPLY(tmp14, FIX(0.752406978)); /* c9 */
+ tmp16 = tmp14 - MULTIPLY(z1, FIX(1.061150426)); /* c9+c11-c13 */
+ z1 -= z2;
+ tmp15 = MULTIPLY(z1, FIX(0.467085129)) - z4; /* c11 */
+ tmp16 += tmp15;
+ tmp13 = MULTIPLY(z2 + z3, - FIX(0.158341681)) - z4; /* -c13 */
+ tmp11 += tmp13 - MULTIPLY(z2, FIX(0.424103948)); /* c3-c9-c13 */
+ tmp12 += tmp13 - MULTIPLY(z3, FIX(2.373959773)); /* c3+c5-c13 */
+ tmp13 = MULTIPLY(z3 - z2, FIX(1.405321284)); /* c1 */
+ tmp14 += tmp13 + z4 - MULTIPLY(z3, FIX(1.6906431334)); /* c1+c9-c11 */
+ tmp15 += tmp13 + MULTIPLY(z2, FIX(0.674957567)); /* c1+c11-c5 */
+
+ tmp13 = ((z1 - z3) << CONST_BITS) + z4;
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[13] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[12] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp15,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp15,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp26 + tmp16,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp26 - tmp16,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 8; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 12x6 output block.
+ *
+ * 6-point IDCT in pass 1 (columns), 12-point in pass 2 (rows).
+ */
+
+GLOBAL(void)
+jpeg_idct_12x6 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15;
+ INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25;
+ INT32 z1, z2, z3, z4;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[8*6]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array.
+ * 6-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/12).
+ */
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ tmp10 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ tmp10 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ tmp10 += ONE << (CONST_BITS-PASS1_BITS-1);
+ tmp12 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ tmp20 = MULTIPLY(tmp12, FIX(0.707106781)); /* c4 */
+ tmp11 = tmp10 + tmp20;
+ tmp21 = RIGHT_SHIFT(tmp10 - tmp20 - tmp20, CONST_BITS-PASS1_BITS);
+ tmp20 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ tmp10 = MULTIPLY(tmp20, FIX(1.224744871)); /* c2 */
+ tmp20 = tmp11 + tmp10;
+ tmp22 = tmp11 - tmp10;
+
+ /* Odd part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+ tmp11 = MULTIPLY(z1 + z3, FIX(0.366025404)); /* c5 */
+ tmp10 = tmp11 + ((z1 + z2) << CONST_BITS);
+ tmp12 = tmp11 + ((z3 - z2) << CONST_BITS);
+ tmp11 = (z1 - z2 - z3) << PASS1_BITS;
+
+ /* Final output stage */
+
+ wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*5] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*1] = (int) (tmp21 + tmp11);
+ wsptr[8*4] = (int) (tmp21 - tmp11);
+ wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[8*3] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 6 rows from work array, store into output array.
+ * 12-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/24).
+ */
+ wsptr = workspace;
+ for (ctr = 0; ctr < 6; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ z3 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ z3 <<= CONST_BITS;
+
+ z4 = (INT32) wsptr[4];
+ z4 = MULTIPLY(z4, FIX(1.224744871)); /* c4 */
+
+ tmp10 = z3 + z4;
+ tmp11 = z3 - z4;
+
+ z1 = (INT32) wsptr[2];
+ z4 = MULTIPLY(z1, FIX(1.366025404)); /* c2 */
+ z1 <<= CONST_BITS;
+ z2 = (INT32) wsptr[6];
+ z2 <<= CONST_BITS;
+
+ tmp12 = z1 - z2;
+
+ tmp21 = z3 + tmp12;
+ tmp24 = z3 - tmp12;
+
+ tmp12 = z4 + z2;
+
+ tmp20 = tmp10 + tmp12;
+ tmp25 = tmp10 - tmp12;
+
+ tmp12 = z4 - z1 - z2;
+
+ tmp22 = tmp11 + tmp12;
+ tmp23 = tmp11 - tmp12;
+
+ /* Odd part */
+
+ z1 = (INT32) wsptr[1];
+ z2 = (INT32) wsptr[3];
+ z3 = (INT32) wsptr[5];
+ z4 = (INT32) wsptr[7];
+
+ tmp11 = MULTIPLY(z2, FIX(1.306562965)); /* c3 */
+ tmp14 = MULTIPLY(z2, - FIX_0_541196100); /* -c9 */
+
+ tmp10 = z1 + z3;
+ tmp15 = MULTIPLY(tmp10 + z4, FIX(0.860918669)); /* c7 */
+ tmp12 = tmp15 + MULTIPLY(tmp10, FIX(0.261052384)); /* c5-c7 */
+ tmp10 = tmp12 + tmp11 + MULTIPLY(z1, FIX(0.280143716)); /* c1-c5 */
+ tmp13 = MULTIPLY(z3 + z4, - FIX(1.045510580)); /* -(c7+c11) */
+ tmp12 += tmp13 + tmp14 - MULTIPLY(z3, FIX(1.478575242)); /* c1+c5-c7-c11 */
+ tmp13 += tmp15 - tmp11 + MULTIPLY(z4, FIX(1.586706681)); /* c1+c11 */
+ tmp15 += tmp14 - MULTIPLY(z1, FIX(0.676326758)) - /* c7-c11 */
+ MULTIPLY(z4, FIX(1.982889723)); /* c5+c7 */
+
+ z1 -= z4;
+ z2 -= z3;
+ z3 = MULTIPLY(z1 + z2, FIX_0_541196100); /* c9 */
+ tmp11 = z3 + MULTIPLY(z1, FIX_0_765366865); /* c3-c9 */
+ tmp14 = z3 - MULTIPLY(z2, FIX_1_847759065); /* c3+c9 */
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp15,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp15,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 8; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 10x5 output block.
+ *
+ * 5-point IDCT in pass 1 (columns), 10-point in pass 2 (rows).
+ */
+
+GLOBAL(void)
+jpeg_idct_10x5 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14;
+ INT32 tmp20, tmp21, tmp22, tmp23, tmp24;
+ INT32 z1, z2, z3, z4;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[8*5]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array.
+ * 5-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/10).
+ */
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ tmp12 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ tmp12 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ tmp12 += ONE << (CONST_BITS-PASS1_BITS-1);
+ tmp13 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ tmp14 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ z1 = MULTIPLY(tmp13 + tmp14, FIX(0.790569415)); /* (c2+c4)/2 */
+ z2 = MULTIPLY(tmp13 - tmp14, FIX(0.353553391)); /* (c2-c4)/2 */
+ z3 = tmp12 + z2;
+ tmp10 = z3 + z1;
+ tmp11 = z3 - z1;
+ tmp12 -= z2 << 2;
+
+ /* Odd part */
+
+ z2 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+
+ z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c3 */
+ tmp13 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c1-c3 */
+ tmp14 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c1+c3 */
+
+ /* Final output stage */
+
+ wsptr[8*0] = (int) RIGHT_SHIFT(tmp10 + tmp13, CONST_BITS-PASS1_BITS);
+ wsptr[8*4] = (int) RIGHT_SHIFT(tmp10 - tmp13, CONST_BITS-PASS1_BITS);
+ wsptr[8*1] = (int) RIGHT_SHIFT(tmp11 + tmp14, CONST_BITS-PASS1_BITS);
+ wsptr[8*3] = (int) RIGHT_SHIFT(tmp11 - tmp14, CONST_BITS-PASS1_BITS);
+ wsptr[8*2] = (int) RIGHT_SHIFT(tmp12, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 5 rows from work array, store into output array.
+ * 10-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/20).
+ */
+ wsptr = workspace;
+ for (ctr = 0; ctr < 5; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ z3 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ z3 <<= CONST_BITS;
+ z4 = (INT32) wsptr[4];
+ z1 = MULTIPLY(z4, FIX(1.144122806)); /* c4 */
+ z2 = MULTIPLY(z4, FIX(0.437016024)); /* c8 */
+ tmp10 = z3 + z1;
+ tmp11 = z3 - z2;
+
+ tmp22 = z3 - ((z1 - z2) << 1); /* c0 = (c4-c8)*2 */
+
+ z2 = (INT32) wsptr[2];
+ z3 = (INT32) wsptr[6];
+
+ z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c6 */
+ tmp12 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c2-c6 */
+ tmp13 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c2+c6 */
+
+ tmp20 = tmp10 + tmp12;
+ tmp24 = tmp10 - tmp12;
+ tmp21 = tmp11 + tmp13;
+ tmp23 = tmp11 - tmp13;
+
+ /* Odd part */
+
+ z1 = (INT32) wsptr[1];
+ z2 = (INT32) wsptr[3];
+ z3 = (INT32) wsptr[5];
+ z3 <<= CONST_BITS;
+ z4 = (INT32) wsptr[7];
+
+ tmp11 = z2 + z4;
+ tmp13 = z2 - z4;
+
+ tmp12 = MULTIPLY(tmp13, FIX(0.309016994)); /* (c3-c7)/2 */
+
+ z2 = MULTIPLY(tmp11, FIX(0.951056516)); /* (c3+c7)/2 */
+ z4 = z3 + tmp12;
+
+ tmp10 = MULTIPLY(z1, FIX(1.396802247)) + z2 + z4; /* c1 */
+ tmp14 = MULTIPLY(z1, FIX(0.221231742)) - z2 + z4; /* c9 */
+
+ z2 = MULTIPLY(tmp11, FIX(0.587785252)); /* (c1-c9)/2 */
+ z4 = z3 - tmp12 - (tmp13 << (CONST_BITS - 1));
+
+ tmp12 = ((z1 - tmp13) << CONST_BITS) - z3;
+
+ tmp11 = MULTIPLY(z1, FIX(1.260073511)) - z2 - z4; /* c3 */
+ tmp13 = MULTIPLY(z1, FIX(0.642039522)) - z2 + z4; /* c7 */
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 8; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 8x4 output block.
+ *
+ * 4-point IDCT in pass 1 (columns), 8-point in pass 2 (rows).
+ */
+
+GLOBAL(void)
+jpeg_idct_8x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3;
+ INT32 tmp10, tmp11, tmp12, tmp13;
+ INT32 z1, z2, z3;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[8*4]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array.
+ * 4-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/16).
+ */
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ tmp2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+
+ tmp10 = (tmp0 + tmp2) << PASS1_BITS;
+ tmp12 = (tmp0 - tmp2) << PASS1_BITS;
+
+ /* Odd part */
+ /* Same rotation as in the even part of the 8x8 LL&M IDCT */
+
+ z2 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+
+ z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */
+ /* Add fudge factor here for final descale. */
+ z1 += ONE << (CONST_BITS-PASS1_BITS-1);
+ tmp0 = RIGHT_SHIFT(z1 + MULTIPLY(z2, FIX_0_765366865), /* c2-c6 */
+ CONST_BITS-PASS1_BITS);
+ tmp2 = RIGHT_SHIFT(z1 - MULTIPLY(z3, FIX_1_847759065), /* c2+c6 */
+ CONST_BITS-PASS1_BITS);
+
+ /* Final output stage */
+
+ wsptr[8*0] = (int) (tmp10 + tmp0);
+ wsptr[8*3] = (int) (tmp10 - tmp0);
+ wsptr[8*1] = (int) (tmp12 + tmp2);
+ wsptr[8*2] = (int) (tmp12 - tmp2);
+ }
+
+ /* Pass 2: process rows from work array, store into output array. */
+ /* Note that we must descale the results by a factor of 8 == 2**3, */
+ /* and also undo the PASS1_BITS scaling. */
+
+ wsptr = workspace;
+ for (ctr = 0; ctr < 4; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part: reverse the even part of the forward DCT. */
+ /* The rotator is sqrt(2)*c(-6). */
+
+ z2 = (INT32) wsptr[2];
+ z3 = (INT32) wsptr[6];
+
+ z1 = MULTIPLY(z2 + z3, FIX_0_541196100);
+ tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865);
+ tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065);
+
+ /* Add fudge factor here for final descale. */
+ z2 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ z3 = (INT32) wsptr[4];
+
+ tmp0 = (z2 + z3) << CONST_BITS;
+ tmp1 = (z2 - z3) << CONST_BITS;
+
+ tmp10 = tmp0 + tmp2;
+ tmp13 = tmp0 - tmp2;
+ tmp11 = tmp1 + tmp3;
+ tmp12 = tmp1 - tmp3;
+
+ /* Odd part per figure 8; the matrix is unitary and hence its
+ * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively.
+ */
+
tmp0 = (INT32) wsptr[7];
tmp1 = (INT32) wsptr[5];
tmp2 = (INT32) wsptr[3];
tmp3 = (INT32) wsptr[1];
-
- z1 = tmp0 + tmp3;
- z2 = tmp1 + tmp2;
- z3 = tmp0 + tmp2;
- z4 = tmp1 + tmp3;
- z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */
-
+
+ z2 = tmp0 + tmp2;
+ z3 = tmp1 + tmp3;
+
+ z1 = MULTIPLY(z2 + z3, FIX_1_175875602); /* sqrt(2) * c3 */
+ z2 = MULTIPLY(z2, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
+ z3 = MULTIPLY(z3, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
+ z2 += z1;
+ z3 += z1;
+
+ z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
+ tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
+ tmp0 += z1 + z2;
+ tmp3 += z1 + z3;
+
+ z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
- tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
- z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
- z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
- z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
- z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
+ tmp1 += z1 + z3;
+ tmp2 += z1 + z2;
+
+ /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp3,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp3,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp1,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp1,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp13 + tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp13 - tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += DCTSIZE; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a reduced-size 6x3 output block.
+ *
+ * 3-point IDCT in pass 1 (columns), 6-point in pass 2 (rows).
+ */
+
+GLOBAL(void)
+jpeg_idct_6x3 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp10, tmp11, tmp12;
+ INT32 z1, z2, z3;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[6*3]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array.
+ * 3-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/6).
+ */
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 6; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ tmp0 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ tmp0 += ONE << (CONST_BITS-PASS1_BITS-1);
+ tmp2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ tmp12 = MULTIPLY(tmp2, FIX(0.707106781)); /* c2 */
+ tmp10 = tmp0 + tmp12;
+ tmp2 = tmp0 - tmp12 - tmp12;
+
+ /* Odd part */
+
+ tmp12 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ tmp0 = MULTIPLY(tmp12, FIX(1.224744871)); /* c1 */
+
+ /* Final output stage */
+
+ wsptr[6*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[6*2] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[6*1] = (int) RIGHT_SHIFT(tmp2, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 3 rows from work array, store into output array.
+ * 6-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/12).
+ */
+ wsptr = workspace;
+ for (ctr = 0; ctr < 3; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp0 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ tmp0 <<= CONST_BITS;
+ tmp2 = (INT32) wsptr[4];
+ tmp10 = MULTIPLY(tmp2, FIX(0.707106781)); /* c4 */
+ tmp1 = tmp0 + tmp10;
+ tmp11 = tmp0 - tmp10 - tmp10;
+ tmp10 = (INT32) wsptr[2];
+ tmp0 = MULTIPLY(tmp10, FIX(1.224744871)); /* c2 */
+ tmp10 = tmp1 + tmp0;
+ tmp12 = tmp1 - tmp0;
+
+ /* Odd part */
+
+ z1 = (INT32) wsptr[1];
+ z2 = (INT32) wsptr[3];
+ z3 = (INT32) wsptr[5];
+ tmp1 = MULTIPLY(z1 + z3, FIX(0.366025404)); /* c5 */
+ tmp0 = tmp1 + ((z1 + z2) << CONST_BITS);
+ tmp2 = tmp1 + ((z3 - z2) << CONST_BITS);
+ tmp1 = (z1 - z2 - z3) << CONST_BITS;
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp1,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp1,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 6; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 4x2 output block.
+ *
+ * 2-point IDCT in pass 1 (columns), 4-point in pass 2 (rows).
+ */
+
+GLOBAL(void)
+jpeg_idct_4x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp0, tmp2, tmp10, tmp12;
+ INT32 z1, z2, z3;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ INT32 * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ INT32 workspace[4*2]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array. */
+
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 4; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ tmp10 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+
+ /* Odd part */
+
+ tmp0 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+
+ /* Final output stage */
+
+ wsptr[4*0] = tmp10 + tmp0;
+ wsptr[4*1] = tmp10 - tmp0;
+ }
+
+ /* Pass 2: process 2 rows from work array, store into output array.
+ * 4-point IDCT kernel,
+ * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point IDCT].
+ */
+ wsptr = workspace;
+ for (ctr = 0; ctr < 2; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp0 = wsptr[0] + (ONE << 2);
+ tmp2 = wsptr[2];
+
+ tmp10 = (tmp0 + tmp2) << CONST_BITS;
+ tmp12 = (tmp0 - tmp2) << CONST_BITS;
+
+ /* Odd part */
+ /* Same rotation as in the even part of the 8x8 LL&M IDCT */
+
+ z2 = wsptr[1];
+ z3 = wsptr[3];
+
+ z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */
+ tmp0 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */
+ tmp2 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0,
+ CONST_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0,
+ CONST_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2,
+ CONST_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2,
+ CONST_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 4; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 2x1 output block.
+ *
+ * 1-point IDCT in pass 1 (columns), 2-point in pass 2 (rows).
+ */
+
+GLOBAL(void)
+jpeg_idct_2x1 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp0, tmp10;
+ ISLOW_MULT_TYPE * quantptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ SHIFT_TEMPS
+
+ /* Pass 1: empty. */
+
+ /* Pass 2: process 1 row from input, store into output array. */
+
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ outptr = output_buf[0] + output_col;
+
+ /* Even part */
+
+ tmp10 = DEQUANTIZE(coef_block[0], quantptr[0]);
+ /* Add fudge factor here for final descale. */
+ tmp10 += ONE << 2;
+
+ /* Odd part */
+
+ tmp0 = DEQUANTIZE(coef_block[1], quantptr[1]);
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, 3) & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, 3) & RANGE_MASK];
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 8x16 output block.
+ *
+ * 16-point IDCT in pass 1 (columns), 8-point in pass 2 (rows).
+ */
+
+GLOBAL(void)
+jpeg_idct_8x16 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3, tmp10, tmp11, tmp12, tmp13;
+ INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26, tmp27;
+ INT32 z1, z2, z3, z4;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[8*16]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array.
+ * 16-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/32).
+ */
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ tmp0 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ tmp0 += ONE << (CONST_BITS-PASS1_BITS-1);
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ tmp1 = MULTIPLY(z1, FIX(1.306562965)); /* c4[16] = c2[8] */
+ tmp2 = MULTIPLY(z1, FIX_0_541196100); /* c12[16] = c6[8] */
+
+ tmp10 = tmp0 + tmp1;
+ tmp11 = tmp0 - tmp1;
+ tmp12 = tmp0 + tmp2;
+ tmp13 = tmp0 - tmp2;
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+ z3 = z1 - z2;
+ z4 = MULTIPLY(z3, FIX(0.275899379)); /* c14[16] = c7[8] */
+ z3 = MULTIPLY(z3, FIX(1.387039845)); /* c2[16] = c1[8] */
+
+ tmp0 = z3 + MULTIPLY(z2, FIX_2_562915447); /* (c6+c2)[16] = (c3+c1)[8] */
+ tmp1 = z4 + MULTIPLY(z1, FIX_0_899976223); /* (c6-c14)[16] = (c3-c7)[8] */
+ tmp2 = z3 - MULTIPLY(z1, FIX(0.601344887)); /* (c2-c10)[16] = (c1-c5)[8] */
+ tmp3 = z4 - MULTIPLY(z2, FIX(0.509795579)); /* (c10-c14)[16] = (c5-c7)[8] */
+
+ tmp20 = tmp10 + tmp0;
+ tmp27 = tmp10 - tmp0;
+ tmp21 = tmp12 + tmp1;
+ tmp26 = tmp12 - tmp1;
+ tmp22 = tmp13 + tmp2;
+ tmp25 = tmp13 - tmp2;
+ tmp23 = tmp11 + tmp3;
+ tmp24 = tmp11 - tmp3;
+
+ /* Odd part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+ z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+
+ tmp11 = z1 + z3;
+
+ tmp1 = MULTIPLY(z1 + z2, FIX(1.353318001)); /* c3 */
+ tmp2 = MULTIPLY(tmp11, FIX(1.247225013)); /* c5 */
+ tmp3 = MULTIPLY(z1 + z4, FIX(1.093201867)); /* c7 */
+ tmp10 = MULTIPLY(z1 - z4, FIX(0.897167586)); /* c9 */
+ tmp11 = MULTIPLY(tmp11, FIX(0.666655658)); /* c11 */
+ tmp12 = MULTIPLY(z1 - z2, FIX(0.410524528)); /* c13 */
+ tmp0 = tmp1 + tmp2 + tmp3 -
+ MULTIPLY(z1, FIX(2.286341144)); /* c7+c5+c3-c1 */
+ tmp13 = tmp10 + tmp11 + tmp12 -
+ MULTIPLY(z1, FIX(1.835730603)); /* c9+c11+c13-c15 */
+ z1 = MULTIPLY(z2 + z3, FIX(0.138617169)); /* c15 */
+ tmp1 += z1 + MULTIPLY(z2, FIX(0.071888074)); /* c9+c11-c3-c15 */
+ tmp2 += z1 - MULTIPLY(z3, FIX(1.125726048)); /* c5+c7+c15-c3 */
+ z1 = MULTIPLY(z3 - z2, FIX(1.407403738)); /* c1 */
+ tmp11 += z1 - MULTIPLY(z3, FIX(0.766367282)); /* c1+c11-c9-c13 */
+ tmp12 += z1 + MULTIPLY(z2, FIX(1.971951411)); /* c1+c5+c13-c7 */
+ z2 += z4;
+ z1 = MULTIPLY(z2, - FIX(0.666655658)); /* -c11 */
+ tmp1 += z1;
+ tmp3 += z1 + MULTIPLY(z4, FIX(1.065388962)); /* c3+c11+c15-c7 */
+ z2 = MULTIPLY(z2, - FIX(1.247225013)); /* -c5 */
+ tmp10 += z2 + MULTIPLY(z4, FIX(3.141271809)); /* c1+c5+c9-c13 */
+ tmp12 += z2;
+ z2 = MULTIPLY(z3 + z4, - FIX(1.353318001)); /* -c3 */
+ tmp2 += z2;
+ tmp3 += z2;
+ z2 = MULTIPLY(z4 - z3, FIX(0.410524528)); /* c13 */
+ tmp10 += z2;
+ tmp11 += z2;
+
+ /* Final output stage */
+
+ wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[8*15] = (int) RIGHT_SHIFT(tmp20 - tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp1, CONST_BITS-PASS1_BITS);
+ wsptr[8*14] = (int) RIGHT_SHIFT(tmp21 - tmp1, CONST_BITS-PASS1_BITS);
+ wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp2, CONST_BITS-PASS1_BITS);
+ wsptr[8*13] = (int) RIGHT_SHIFT(tmp22 - tmp2, CONST_BITS-PASS1_BITS);
+ wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp3, CONST_BITS-PASS1_BITS);
+ wsptr[8*12] = (int) RIGHT_SHIFT(tmp23 - tmp3, CONST_BITS-PASS1_BITS);
+ wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*11] = (int) RIGHT_SHIFT(tmp24 - tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[8*5] = (int) RIGHT_SHIFT(tmp25 + tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[8*10] = (int) RIGHT_SHIFT(tmp25 - tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[8*6] = (int) RIGHT_SHIFT(tmp26 + tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[8*9] = (int) RIGHT_SHIFT(tmp26 - tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[8*7] = (int) RIGHT_SHIFT(tmp27 + tmp13, CONST_BITS-PASS1_BITS);
+ wsptr[8*8] = (int) RIGHT_SHIFT(tmp27 - tmp13, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process rows from work array, store into output array. */
+ /* Note that we must descale the results by a factor of 8 == 2**3, */
+ /* and also undo the PASS1_BITS scaling. */
+
+ wsptr = workspace;
+ for (ctr = 0; ctr < 16; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part: reverse the even part of the forward DCT. */
+ /* The rotator is sqrt(2)*c(-6). */
+
+ z2 = (INT32) wsptr[2];
+ z3 = (INT32) wsptr[6];
+
+ z1 = MULTIPLY(z2 + z3, FIX_0_541196100);
+ tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865);
+ tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065);
+
+ /* Add fudge factor here for final descale. */
+ z2 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ z3 = (INT32) wsptr[4];
+
+ tmp0 = (z2 + z3) << CONST_BITS;
+ tmp1 = (z2 - z3) << CONST_BITS;
+
+ tmp10 = tmp0 + tmp2;
+ tmp13 = tmp0 - tmp2;
+ tmp11 = tmp1 + tmp3;
+ tmp12 = tmp1 - tmp3;
+
+ /* Odd part per figure 8; the matrix is unitary and hence its
+ * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively.
+ */
- z3 += z5;
- z4 += z5;
+ tmp0 = (INT32) wsptr[7];
+ tmp1 = (INT32) wsptr[5];
+ tmp2 = (INT32) wsptr[3];
+ tmp3 = (INT32) wsptr[1];
- tmp0 += z1 + z3;
- tmp1 += z2 + z4;
- tmp2 += z2 + z3;
- tmp3 += z1 + z4;
+ z2 = tmp0 + tmp2;
+ z3 = tmp1 + tmp3;
+
+ z1 = MULTIPLY(z2 + z3, FIX_1_175875602); /* sqrt(2) * c3 */
+ z2 = MULTIPLY(z2, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
+ z3 = MULTIPLY(z3, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
+ z2 += z1;
+ z3 += z1;
+
+ z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
+ tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
+ tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
+ tmp0 += z1 + z2;
+ tmp3 += z1 + z3;
+
+ z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
+ tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
+ tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
+ tmp1 += z1 + z3;
+ tmp2 += z1 + z2;
/* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */
- outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp3,
- CONST_BITS+PASS1_BITS+3)
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp3,
+ CONST_BITS+PASS1_BITS+3)
& RANGE_MASK];
- outptr[7] = range_limit[(int) DESCALE(tmp10 - tmp3,
- CONST_BITS+PASS1_BITS+3)
+ outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp3,
+ CONST_BITS+PASS1_BITS+3)
& RANGE_MASK];
- outptr[1] = range_limit[(int) DESCALE(tmp11 + tmp2,
- CONST_BITS+PASS1_BITS+3)
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp2,
+ CONST_BITS+PASS1_BITS+3)
& RANGE_MASK];
- outptr[6] = range_limit[(int) DESCALE(tmp11 - tmp2,
- CONST_BITS+PASS1_BITS+3)
+ outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp2,
+ CONST_BITS+PASS1_BITS+3)
& RANGE_MASK];
- outptr[2] = range_limit[(int) DESCALE(tmp12 + tmp1,
- CONST_BITS+PASS1_BITS+3)
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp1,
+ CONST_BITS+PASS1_BITS+3)
& RANGE_MASK];
- outptr[5] = range_limit[(int) DESCALE(tmp12 - tmp1,
- CONST_BITS+PASS1_BITS+3)
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp1,
+ CONST_BITS+PASS1_BITS+3)
& RANGE_MASK];
- outptr[3] = range_limit[(int) DESCALE(tmp13 + tmp0,
- CONST_BITS+PASS1_BITS+3)
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp13 + tmp0,
+ CONST_BITS+PASS1_BITS+3)
& RANGE_MASK];
- outptr[4] = range_limit[(int) DESCALE(tmp13 - tmp0,
- CONST_BITS+PASS1_BITS+3)
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp13 - tmp0,
+ CONST_BITS+PASS1_BITS+3)
& RANGE_MASK];
wsptr += DCTSIZE; /* advance pointer to next row */
}
}
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 7x14 output block.
+ *
+ * 14-point IDCT in pass 1 (columns), 7-point in pass 2 (rows).
+ */
+
+GLOBAL(void)
+jpeg_idct_7x14 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16;
+ INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26;
+ INT32 z1, z2, z3, z4;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[7*14]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array.
+ * 14-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/28).
+ */
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 7; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ z1 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ z1 += ONE << (CONST_BITS-PASS1_BITS-1);
+ z4 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ z2 = MULTIPLY(z4, FIX(1.274162392)); /* c4 */
+ z3 = MULTIPLY(z4, FIX(0.314692123)); /* c12 */
+ z4 = MULTIPLY(z4, FIX(0.881747734)); /* c8 */
+
+ tmp10 = z1 + z2;
+ tmp11 = z1 + z3;
+ tmp12 = z1 - z4;
+
+ tmp23 = RIGHT_SHIFT(z1 - ((z2 + z3 - z4) << 1), /* c0 = (c4+c12-c8)*2 */
+ CONST_BITS-PASS1_BITS);
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+
+ z3 = MULTIPLY(z1 + z2, FIX(1.105676686)); /* c6 */
+
+ tmp13 = z3 + MULTIPLY(z1, FIX(0.273079590)); /* c2-c6 */
+ tmp14 = z3 - MULTIPLY(z2, FIX(1.719280954)); /* c6+c10 */
+ tmp15 = MULTIPLY(z1, FIX(0.613604268)) - /* c10 */
+ MULTIPLY(z2, FIX(1.378756276)); /* c2 */
+
+ tmp20 = tmp10 + tmp13;
+ tmp26 = tmp10 - tmp13;
+ tmp21 = tmp11 + tmp14;
+ tmp25 = tmp11 - tmp14;
+ tmp22 = tmp12 + tmp15;
+ tmp24 = tmp12 - tmp15;
+
+ /* Odd part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+ z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+ tmp13 = z4 << CONST_BITS;
+
+ tmp14 = z1 + z3;
+ tmp11 = MULTIPLY(z1 + z2, FIX(1.334852607)); /* c3 */
+ tmp12 = MULTIPLY(tmp14, FIX(1.197448846)); /* c5 */
+ tmp10 = tmp11 + tmp12 + tmp13 - MULTIPLY(z1, FIX(1.126980169)); /* c3+c5-c1 */
+ tmp14 = MULTIPLY(tmp14, FIX(0.752406978)); /* c9 */
+ tmp16 = tmp14 - MULTIPLY(z1, FIX(1.061150426)); /* c9+c11-c13 */
+ z1 -= z2;
+ tmp15 = MULTIPLY(z1, FIX(0.467085129)) - tmp13; /* c11 */
+ tmp16 += tmp15;
+ z1 += z4;
+ z4 = MULTIPLY(z2 + z3, - FIX(0.158341681)) - tmp13; /* -c13 */
+ tmp11 += z4 - MULTIPLY(z2, FIX(0.424103948)); /* c3-c9-c13 */
+ tmp12 += z4 - MULTIPLY(z3, FIX(2.373959773)); /* c3+c5-c13 */
+ z4 = MULTIPLY(z3 - z2, FIX(1.405321284)); /* c1 */
+ tmp14 += z4 + tmp13 - MULTIPLY(z3, FIX(1.6906431334)); /* c1+c9-c11 */
+ tmp15 += z4 + MULTIPLY(z2, FIX(0.674957567)); /* c1+c11-c5 */
+
+ tmp13 = (z1 - z3) << PASS1_BITS;
+
+ /* Final output stage */
+
+ wsptr[7*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[7*13] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[7*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[7*12] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[7*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[7*11] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[7*3] = (int) (tmp23 + tmp13);
+ wsptr[7*10] = (int) (tmp23 - tmp13);
+ wsptr[7*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS);
+ wsptr[7*9] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS);
+ wsptr[7*5] = (int) RIGHT_SHIFT(tmp25 + tmp15, CONST_BITS-PASS1_BITS);
+ wsptr[7*8] = (int) RIGHT_SHIFT(tmp25 - tmp15, CONST_BITS-PASS1_BITS);
+ wsptr[7*6] = (int) RIGHT_SHIFT(tmp26 + tmp16, CONST_BITS-PASS1_BITS);
+ wsptr[7*7] = (int) RIGHT_SHIFT(tmp26 - tmp16, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 14 rows from work array, store into output array.
+ * 7-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/14).
+ */
+ wsptr = workspace;
+ for (ctr = 0; ctr < 14; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp23 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ tmp23 <<= CONST_BITS;
+
+ z1 = (INT32) wsptr[2];
+ z2 = (INT32) wsptr[4];
+ z3 = (INT32) wsptr[6];
+
+ tmp20 = MULTIPLY(z2 - z3, FIX(0.881747734)); /* c4 */
+ tmp22 = MULTIPLY(z1 - z2, FIX(0.314692123)); /* c6 */
+ tmp21 = tmp20 + tmp22 + tmp23 - MULTIPLY(z2, FIX(1.841218003)); /* c2+c4-c6 */
+ tmp10 = z1 + z3;
+ z2 -= tmp10;
+ tmp10 = MULTIPLY(tmp10, FIX(1.274162392)) + tmp23; /* c2 */
+ tmp20 += tmp10 - MULTIPLY(z3, FIX(0.077722536)); /* c2-c4-c6 */
+ tmp22 += tmp10 - MULTIPLY(z1, FIX(2.470602249)); /* c2+c4+c6 */
+ tmp23 += MULTIPLY(z2, FIX(1.414213562)); /* c0 */
+
+ /* Odd part */
+
+ z1 = (INT32) wsptr[1];
+ z2 = (INT32) wsptr[3];
+ z3 = (INT32) wsptr[5];
+
+ tmp11 = MULTIPLY(z1 + z2, FIX(0.935414347)); /* (c3+c1-c5)/2 */
+ tmp12 = MULTIPLY(z1 - z2, FIX(0.170262339)); /* (c3+c5-c1)/2 */
+ tmp10 = tmp11 - tmp12;
+ tmp11 += tmp12;
+ tmp12 = MULTIPLY(z2 + z3, - FIX(1.378756276)); /* -c1 */
+ tmp11 += tmp12;
+ z2 = MULTIPLY(z1 + z3, FIX(0.613604268)); /* c5 */
+ tmp10 += z2;
+ tmp12 += z2 + MULTIPLY(z3, FIX(1.870828693)); /* c3+c1-c5 */
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 7; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 6x12 output block.
+ *
+ * 12-point IDCT in pass 1 (columns), 6-point in pass 2 (rows).
+ */
+
+GLOBAL(void)
+jpeg_idct_6x12 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15;
+ INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25;
+ INT32 z1, z2, z3, z4;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[6*12]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array.
+ * 12-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/24).
+ */
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 6; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ z3 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ z3 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ z3 += ONE << (CONST_BITS-PASS1_BITS-1);
+
+ z4 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ z4 = MULTIPLY(z4, FIX(1.224744871)); /* c4 */
+
+ tmp10 = z3 + z4;
+ tmp11 = z3 - z4;
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ z4 = MULTIPLY(z1, FIX(1.366025404)); /* c2 */
+ z1 <<= CONST_BITS;
+ z2 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+ z2 <<= CONST_BITS;
+
+ tmp12 = z1 - z2;
+
+ tmp21 = z3 + tmp12;
+ tmp24 = z3 - tmp12;
+
+ tmp12 = z4 + z2;
+
+ tmp20 = tmp10 + tmp12;
+ tmp25 = tmp10 - tmp12;
+
+ tmp12 = z4 - z1 - z2;
+
+ tmp22 = tmp11 + tmp12;
+ tmp23 = tmp11 - tmp12;
+
+ /* Odd part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+ z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+
+ tmp11 = MULTIPLY(z2, FIX(1.306562965)); /* c3 */
+ tmp14 = MULTIPLY(z2, - FIX_0_541196100); /* -c9 */
+
+ tmp10 = z1 + z3;
+ tmp15 = MULTIPLY(tmp10 + z4, FIX(0.860918669)); /* c7 */
+ tmp12 = tmp15 + MULTIPLY(tmp10, FIX(0.261052384)); /* c5-c7 */
+ tmp10 = tmp12 + tmp11 + MULTIPLY(z1, FIX(0.280143716)); /* c1-c5 */
+ tmp13 = MULTIPLY(z3 + z4, - FIX(1.045510580)); /* -(c7+c11) */
+ tmp12 += tmp13 + tmp14 - MULTIPLY(z3, FIX(1.478575242)); /* c1+c5-c7-c11 */
+ tmp13 += tmp15 - tmp11 + MULTIPLY(z4, FIX(1.586706681)); /* c1+c11 */
+ tmp15 += tmp14 - MULTIPLY(z1, FIX(0.676326758)) - /* c7-c11 */
+ MULTIPLY(z4, FIX(1.982889723)); /* c5+c7 */
+
+ z1 -= z4;
+ z2 -= z3;
+ z3 = MULTIPLY(z1 + z2, FIX_0_541196100); /* c9 */
+ tmp11 = z3 + MULTIPLY(z1, FIX_0_765366865); /* c3-c9 */
+ tmp14 = z3 - MULTIPLY(z2, FIX_1_847759065); /* c3+c9 */
+
+ /* Final output stage */
+
+ wsptr[6*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[6*11] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[6*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[6*10] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[6*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[6*9] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS);
+ wsptr[6*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS);
+ wsptr[6*8] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS);
+ wsptr[6*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS);
+ wsptr[6*7] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS);
+ wsptr[6*5] = (int) RIGHT_SHIFT(tmp25 + tmp15, CONST_BITS-PASS1_BITS);
+ wsptr[6*6] = (int) RIGHT_SHIFT(tmp25 - tmp15, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 12 rows from work array, store into output array.
+ * 6-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/12).
+ */
+ wsptr = workspace;
+ for (ctr = 0; ctr < 12; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp10 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ tmp10 <<= CONST_BITS;
+ tmp12 = (INT32) wsptr[4];
+ tmp20 = MULTIPLY(tmp12, FIX(0.707106781)); /* c4 */
+ tmp11 = tmp10 + tmp20;
+ tmp21 = tmp10 - tmp20 - tmp20;
+ tmp20 = (INT32) wsptr[2];
+ tmp10 = MULTIPLY(tmp20, FIX(1.224744871)); /* c2 */
+ tmp20 = tmp11 + tmp10;
+ tmp22 = tmp11 - tmp10;
+
+ /* Odd part */
+
+ z1 = (INT32) wsptr[1];
+ z2 = (INT32) wsptr[3];
+ z3 = (INT32) wsptr[5];
+ tmp11 = MULTIPLY(z1 + z3, FIX(0.366025404)); /* c5 */
+ tmp10 = tmp11 + ((z1 + z2) << CONST_BITS);
+ tmp12 = tmp11 + ((z3 - z2) << CONST_BITS);
+ tmp11 = (z1 - z2 - z3) << CONST_BITS;
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 6; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 5x10 output block.
+ *
+ * 10-point IDCT in pass 1 (columns), 5-point in pass 2 (rows).
+ */
+
+GLOBAL(void)
+jpeg_idct_5x10 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp10, tmp11, tmp12, tmp13, tmp14;
+ INT32 tmp20, tmp21, tmp22, tmp23, tmp24;
+ INT32 z1, z2, z3, z4, z5;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[5*10]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array.
+ * 10-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/20).
+ */
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 5; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ z3 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ z3 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ z3 += ONE << (CONST_BITS-PASS1_BITS-1);
+ z4 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ z1 = MULTIPLY(z4, FIX(1.144122806)); /* c4 */
+ z2 = MULTIPLY(z4, FIX(0.437016024)); /* c8 */
+ tmp10 = z3 + z1;
+ tmp11 = z3 - z2;
+
+ tmp22 = RIGHT_SHIFT(z3 - ((z1 - z2) << 1), /* c0 = (c4-c8)*2 */
+ CONST_BITS-PASS1_BITS);
+
+ z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+
+ z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c6 */
+ tmp12 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c2-c6 */
+ tmp13 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c2+c6 */
+
+ tmp20 = tmp10 + tmp12;
+ tmp24 = tmp10 - tmp12;
+ tmp21 = tmp11 + tmp13;
+ tmp23 = tmp11 - tmp13;
+
+ /* Odd part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+ z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+
+ tmp11 = z2 + z4;
+ tmp13 = z2 - z4;
+
+ tmp12 = MULTIPLY(tmp13, FIX(0.309016994)); /* (c3-c7)/2 */
+ z5 = z3 << CONST_BITS;
+
+ z2 = MULTIPLY(tmp11, FIX(0.951056516)); /* (c3+c7)/2 */
+ z4 = z5 + tmp12;
+
+ tmp10 = MULTIPLY(z1, FIX(1.396802247)) + z2 + z4; /* c1 */
+ tmp14 = MULTIPLY(z1, FIX(0.221231742)) - z2 + z4; /* c9 */
+
+ z2 = MULTIPLY(tmp11, FIX(0.587785252)); /* (c1-c9)/2 */
+ z4 = z5 - tmp12 - (tmp13 << (CONST_BITS - 1));
+
+ tmp12 = (z1 - tmp13 - z3) << PASS1_BITS;
+
+ tmp11 = MULTIPLY(z1, FIX(1.260073511)) - z2 - z4; /* c3 */
+ tmp13 = MULTIPLY(z1, FIX(0.642039522)) - z2 + z4; /* c7 */
+
+ /* Final output stage */
+
+ wsptr[5*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[5*9] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS);
+ wsptr[5*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[5*8] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS);
+ wsptr[5*2] = (int) (tmp22 + tmp12);
+ wsptr[5*7] = (int) (tmp22 - tmp12);
+ wsptr[5*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS);
+ wsptr[5*6] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS);
+ wsptr[5*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS);
+ wsptr[5*5] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 10 rows from work array, store into output array.
+ * 5-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/10).
+ */
+ wsptr = workspace;
+ for (ctr = 0; ctr < 10; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp12 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ tmp12 <<= CONST_BITS;
+ tmp13 = (INT32) wsptr[2];
+ tmp14 = (INT32) wsptr[4];
+ z1 = MULTIPLY(tmp13 + tmp14, FIX(0.790569415)); /* (c2+c4)/2 */
+ z2 = MULTIPLY(tmp13 - tmp14, FIX(0.353553391)); /* (c2-c4)/2 */
+ z3 = tmp12 + z2;
+ tmp10 = z3 + z1;
+ tmp11 = z3 - z1;
+ tmp12 -= z2 << 2;
+
+ /* Odd part */
+
+ z2 = (INT32) wsptr[1];
+ z3 = (INT32) wsptr[3];
+
+ z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c3 */
+ tmp13 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c1-c3 */
+ tmp14 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c1+c3 */
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp13,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp14,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 5; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 4x8 output block.
+ *
+ * 8-point IDCT in pass 1 (columns), 4-point in pass 2 (rows).
+ */
+
+GLOBAL(void)
+jpeg_idct_4x8 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp3;
+ INT32 tmp10, tmp11, tmp12, tmp13;
+ INT32 z1, z2, z3;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[4*8]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array. */
+ /* Note results are scaled up by sqrt(8) compared to a true IDCT; */
+ /* furthermore, we scale the results by 2**PASS1_BITS. */
+
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 4; ctr > 0; ctr--) {
+ /* Due to quantization, we will usually find that many of the input
+ * coefficients are zero, especially the AC terms. We can exploit this
+ * by short-circuiting the IDCT calculation for any column in which all
+ * the AC terms are zero. In that case each output is equal to the
+ * DC coefficient (with scale factor as needed).
+ * With typical images and quantization tables, half or more of the
+ * column DCT calculations can be simplified this way.
+ */
+
+ if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 &&
+ inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 &&
+ inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 &&
+ inptr[DCTSIZE*7] == 0) {
+ /* AC terms all zero */
+ int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS;
+
+ wsptr[4*0] = dcval;
+ wsptr[4*1] = dcval;
+ wsptr[4*2] = dcval;
+ wsptr[4*3] = dcval;
+ wsptr[4*4] = dcval;
+ wsptr[4*5] = dcval;
+ wsptr[4*6] = dcval;
+ wsptr[4*7] = dcval;
+
+ inptr++; /* advance pointers to next column */
+ quantptr++;
+ wsptr++;
+ continue;
+ }
+
+ /* Even part: reverse the even part of the forward DCT. */
+ /* The rotator is sqrt(2)*c(-6). */
+
+ z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
+
+ z1 = MULTIPLY(z2 + z3, FIX_0_541196100);
+ tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865);
+ tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065);
+
+ z2 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ z2 <<= CONST_BITS;
+ z3 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ z2 += ONE << (CONST_BITS-PASS1_BITS-1);
+
+ tmp0 = z2 + z3;
+ tmp1 = z2 - z3;
+
+ tmp10 = tmp0 + tmp2;
+ tmp13 = tmp0 - tmp2;
+ tmp11 = tmp1 + tmp3;
+ tmp12 = tmp1 - tmp3;
+
+ /* Odd part per figure 8; the matrix is unitary and hence its
+ * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively.
+ */
+
+ tmp0 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
+ tmp1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+ tmp2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ tmp3 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+
+ z2 = tmp0 + tmp2;
+ z3 = tmp1 + tmp3;
+
+ z1 = MULTIPLY(z2 + z3, FIX_1_175875602); /* sqrt(2) * c3 */
+ z2 = MULTIPLY(z2, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
+ z3 = MULTIPLY(z3, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
+ z2 += z1;
+ z3 += z1;
+
+ z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
+ tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
+ tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
+ tmp0 += z1 + z2;
+ tmp3 += z1 + z3;
+
+ z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
+ tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
+ tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
+ tmp1 += z1 + z3;
+ tmp2 += z1 + z2;
+
+ /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */
+
+ wsptr[4*0] = (int) RIGHT_SHIFT(tmp10 + tmp3, CONST_BITS-PASS1_BITS);
+ wsptr[4*7] = (int) RIGHT_SHIFT(tmp10 - tmp3, CONST_BITS-PASS1_BITS);
+ wsptr[4*1] = (int) RIGHT_SHIFT(tmp11 + tmp2, CONST_BITS-PASS1_BITS);
+ wsptr[4*6] = (int) RIGHT_SHIFT(tmp11 - tmp2, CONST_BITS-PASS1_BITS);
+ wsptr[4*2] = (int) RIGHT_SHIFT(tmp12 + tmp1, CONST_BITS-PASS1_BITS);
+ wsptr[4*5] = (int) RIGHT_SHIFT(tmp12 - tmp1, CONST_BITS-PASS1_BITS);
+ wsptr[4*3] = (int) RIGHT_SHIFT(tmp13 + tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[4*4] = (int) RIGHT_SHIFT(tmp13 - tmp0, CONST_BITS-PASS1_BITS);
+
+ inptr++; /* advance pointers to next column */
+ quantptr++;
+ wsptr++;
+ }
+
+ /* Pass 2: process 8 rows from work array, store into output array.
+ * 4-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/16).
+ */
+ wsptr = workspace;
+ for (ctr = 0; ctr < 8; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp0 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ tmp2 = (INT32) wsptr[2];
+
+ tmp10 = (tmp0 + tmp2) << CONST_BITS;
+ tmp12 = (tmp0 - tmp2) << CONST_BITS;
+
+ /* Odd part */
+ /* Same rotation as in the even part of the 8x8 LL&M IDCT */
+
+ z2 = (INT32) wsptr[1];
+ z3 = (INT32) wsptr[3];
+
+ z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */
+ tmp0 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */
+ tmp2 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 4; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a reduced-size 3x6 output block.
+ *
+ * 6-point IDCT in pass 1 (columns), 3-point in pass 2 (rows).
+ */
+
+GLOBAL(void)
+jpeg_idct_3x6 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp0, tmp1, tmp2, tmp10, tmp11, tmp12;
+ INT32 z1, z2, z3;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ int * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ int workspace[3*6]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array.
+ * 6-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/12).
+ */
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 3; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ tmp0 <<= CONST_BITS;
+ /* Add fudge factor here for final descale. */
+ tmp0 += ONE << (CONST_BITS-PASS1_BITS-1);
+ tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);
+ tmp10 = MULTIPLY(tmp2, FIX(0.707106781)); /* c4 */
+ tmp1 = tmp0 + tmp10;
+ tmp11 = RIGHT_SHIFT(tmp0 - tmp10 - tmp10, CONST_BITS-PASS1_BITS);
+ tmp10 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+ tmp0 = MULTIPLY(tmp10, FIX(1.224744871)); /* c2 */
+ tmp10 = tmp1 + tmp0;
+ tmp12 = tmp1 - tmp0;
+
+ /* Odd part */
+
+ z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
+ tmp1 = MULTIPLY(z1 + z3, FIX(0.366025404)); /* c5 */
+ tmp0 = tmp1 + ((z1 + z2) << CONST_BITS);
+ tmp2 = tmp1 + ((z3 - z2) << CONST_BITS);
+ tmp1 = (z1 - z2 - z3) << PASS1_BITS;
+
+ /* Final output stage */
+
+ wsptr[3*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[3*5] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS);
+ wsptr[3*1] = (int) (tmp11 + tmp1);
+ wsptr[3*4] = (int) (tmp11 - tmp1);
+ wsptr[3*2] = (int) RIGHT_SHIFT(tmp12 + tmp2, CONST_BITS-PASS1_BITS);
+ wsptr[3*3] = (int) RIGHT_SHIFT(tmp12 - tmp2, CONST_BITS-PASS1_BITS);
+ }
+
+ /* Pass 2: process 6 rows from work array, store into output array.
+ * 3-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/6).
+ */
+ wsptr = workspace;
+ for (ctr = 0; ctr < 6; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp0 = (INT32) wsptr[0] + (ONE << (PASS1_BITS+2));
+ tmp0 <<= CONST_BITS;
+ tmp2 = (INT32) wsptr[2];
+ tmp12 = MULTIPLY(tmp2, FIX(0.707106781)); /* c2 */
+ tmp10 = tmp0 + tmp12;
+ tmp2 = tmp0 - tmp12 - tmp12;
+
+ /* Odd part */
+
+ tmp12 = (INT32) wsptr[1];
+ tmp0 = MULTIPLY(tmp12, FIX(1.224744871)); /* c1 */
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp2,
+ CONST_BITS+PASS1_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 3; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 2x4 output block.
+ *
+ * 4-point IDCT in pass 1 (columns), 2-point in pass 2 (rows).
+ */
+
+GLOBAL(void)
+jpeg_idct_2x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp0, tmp2, tmp10, tmp12;
+ INT32 z1, z2, z3;
+ JCOEFPTR inptr;
+ ISLOW_MULT_TYPE * quantptr;
+ INT32 * wsptr;
+ JSAMPROW outptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ int ctr;
+ INT32 workspace[2*4]; /* buffers data between passes */
+ SHIFT_TEMPS
+
+ /* Pass 1: process columns from input, store into work array.
+ * 4-point IDCT kernel,
+ * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point IDCT].
+ */
+ inptr = coef_block;
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+ wsptr = workspace;
+ for (ctr = 0; ctr < 2; ctr++, inptr++, quantptr++, wsptr++) {
+ /* Even part */
+
+ tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ tmp2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
+
+ tmp10 = (tmp0 + tmp2) << CONST_BITS;
+ tmp12 = (tmp0 - tmp2) << CONST_BITS;
+
+ /* Odd part */
+ /* Same rotation as in the even part of the 8x8 LL&M IDCT */
+
+ z2 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
+ z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
+
+ z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */
+ tmp0 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */
+ tmp2 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */
+
+ /* Final output stage */
+
+ wsptr[2*0] = tmp10 + tmp0;
+ wsptr[2*3] = tmp10 - tmp0;
+ wsptr[2*1] = tmp12 + tmp2;
+ wsptr[2*2] = tmp12 - tmp2;
+ }
+
+ /* Pass 2: process 4 rows from work array, store into output array. */
+
+ wsptr = workspace;
+ for (ctr = 0; ctr < 4; ctr++) {
+ outptr = output_buf[ctr] + output_col;
+
+ /* Even part */
+
+ /* Add fudge factor here for final descale. */
+ tmp10 = wsptr[0] + (ONE << (CONST_BITS+2));
+
+ /* Odd part */
+
+ tmp0 = wsptr[1];
+
+ /* Final output stage */
+
+ outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS+3)
+ & RANGE_MASK];
+ outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS+3)
+ & RANGE_MASK];
+
+ wsptr += 2; /* advance pointer to next row */
+ }
+}
+
+
+/*
+ * Perform dequantization and inverse DCT on one block of coefficients,
+ * producing a 1x2 output block.
+ *
+ * 2-point IDCT in pass 1 (columns), 1-point in pass 2 (rows).
+ */
+
+GLOBAL(void)
+jpeg_idct_1x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf, JDIMENSION output_col)
+{
+ INT32 tmp0, tmp10;
+ ISLOW_MULT_TYPE * quantptr;
+ JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ SHIFT_TEMPS
+
+ /* Process 1 column from input, store into output array. */
+
+ quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
+
+ /* Even part */
+
+ tmp10 = DEQUANTIZE(coef_block[DCTSIZE*0], quantptr[DCTSIZE*0]);
+ /* Add fudge factor here for final descale. */
+ tmp10 += ONE << 2;
+
+ /* Odd part */
+
+ tmp0 = DEQUANTIZE(coef_block[DCTSIZE*1], quantptr[DCTSIZE*1]);
+
+ /* Final output stage */
+
+ output_buf[0][output_col] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, 3)
+ & RANGE_MASK];
+ output_buf[1][output_col] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, 3)
+ & RANGE_MASK];
+}
+
+#endif /* IDCT_SCALING_SUPPORTED */
#endif /* DCT_ISLOW_SUPPORTED */
diff --git a/src/3rdparty/libjpeg/jidctred.c b/src/3rdparty/libjpeg/jidctred.c
deleted file mode 100644
index 421f3c7ca1..0000000000
--- a/src/3rdparty/libjpeg/jidctred.c
+++ /dev/null
@@ -1,398 +0,0 @@
-/*
- * jidctred.c
- *
- * Copyright (C) 1994-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains inverse-DCT routines that produce reduced-size output:
- * either 4x4, 2x2, or 1x1 pixels from an 8x8 DCT block.
- *
- * The implementation is based on the Loeffler, Ligtenberg and Moschytz (LL&M)
- * algorithm used in jidctint.c. We simply replace each 8-to-8 1-D IDCT step
- * with an 8-to-4 step that produces the four averages of two adjacent outputs
- * (or an 8-to-2 step producing two averages of four outputs, for 2x2 output).
- * These steps were derived by computing the corresponding values at the end
- * of the normal LL&M code, then simplifying as much as possible.
- *
- * 1x1 is trivial: just take the DC coefficient divided by 8.
- *
- * See jidctint.c for additional comments.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jdct.h" /* Private declarations for DCT subsystem */
-
-#ifdef IDCT_SCALING_SUPPORTED
-
-
-/*
- * This module is specialized to the case DCTSIZE = 8.
- */
-
-#if DCTSIZE != 8
- Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
-#endif
-
-
-/* Scaling is the same as in jidctint.c. */
-
-#if BITS_IN_JSAMPLE == 8
-#define CONST_BITS 13
-#define PASS1_BITS 2
-#else
-#define CONST_BITS 13
-#define PASS1_BITS 1 /* lose a little precision to avoid overflow */
-#endif
-
-/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus
- * causing a lot of useless floating-point operations at run time.
- * To get around this we use the following pre-calculated constants.
- * If you change CONST_BITS you may want to add appropriate values.
- * (With a reasonable C compiler, you can just rely on the FIX() macro...)
- */
-
-#if CONST_BITS == 13
-#define FIX_0_211164243 ((INT32) 1730) /* FIX(0.211164243) */
-#define FIX_0_509795579 ((INT32) 4176) /* FIX(0.509795579) */
-#define FIX_0_601344887 ((INT32) 4926) /* FIX(0.601344887) */
-#define FIX_0_720959822 ((INT32) 5906) /* FIX(0.720959822) */
-#define FIX_0_765366865 ((INT32) 6270) /* FIX(0.765366865) */
-#define FIX_0_850430095 ((INT32) 6967) /* FIX(0.850430095) */
-#define FIX_0_899976223 ((INT32) 7373) /* FIX(0.899976223) */
-#define FIX_1_061594337 ((INT32) 8697) /* FIX(1.061594337) */
-#define FIX_1_272758580 ((INT32) 10426) /* FIX(1.272758580) */
-#define FIX_1_451774981 ((INT32) 11893) /* FIX(1.451774981) */
-#define FIX_1_847759065 ((INT32) 15137) /* FIX(1.847759065) */
-#define FIX_2_172734803 ((INT32) 17799) /* FIX(2.172734803) */
-#define FIX_2_562915447 ((INT32) 20995) /* FIX(2.562915447) */
-#define FIX_3_624509785 ((INT32) 29692) /* FIX(3.624509785) */
-#else
-#define FIX_0_211164243 FIX(0.211164243)
-#define FIX_0_509795579 FIX(0.509795579)
-#define FIX_0_601344887 FIX(0.601344887)
-#define FIX_0_720959822 FIX(0.720959822)
-#define FIX_0_765366865 FIX(0.765366865)
-#define FIX_0_850430095 FIX(0.850430095)
-#define FIX_0_899976223 FIX(0.899976223)
-#define FIX_1_061594337 FIX(1.061594337)
-#define FIX_1_272758580 FIX(1.272758580)
-#define FIX_1_451774981 FIX(1.451774981)
-#define FIX_1_847759065 FIX(1.847759065)
-#define FIX_2_172734803 FIX(2.172734803)
-#define FIX_2_562915447 FIX(2.562915447)
-#define FIX_3_624509785 FIX(3.624509785)
-#endif
-
-
-/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.
- * For 8-bit samples with the recommended scaling, all the variable
- * and constant values involved are no more than 16 bits wide, so a
- * 16x16->32 bit multiply can be used instead of a full 32x32 multiply.
- * For 12-bit samples, a full 32-bit multiplication will be needed.
- */
-
-#if BITS_IN_JSAMPLE == 8
-#define MULTIPLY(var,const) MULTIPLY16C16(var,const)
-#else
-#define MULTIPLY(var,const) ((var) * (const))
-#endif
-
-
-/* Dequantize a coefficient by multiplying it by the multiplier-table
- * entry; produce an int result. In this module, both inputs and result
- * are 16 bits or less, so either int or short multiply will work.
- */
-
-#define DEQUANTIZE(coef,quantval) (((ISLOW_MULT_TYPE) (coef)) * (quantval))
-
-
-/*
- * Perform dequantization and inverse DCT on one block of coefficients,
- * producing a reduced-size 4x4 output block.
- */
-
-GLOBAL(void)
-jpeg_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf, JDIMENSION output_col)
-{
- INT32 tmp0, tmp2, tmp10, tmp12;
- INT32 z1, z2, z3, z4;
- JCOEFPTR inptr;
- ISLOW_MULT_TYPE * quantptr;
- int * wsptr;
- JSAMPROW outptr;
- JSAMPLE *range_limit = IDCT_range_limit(cinfo);
- int ctr;
- int workspace[DCTSIZE*4]; /* buffers data between passes */
- SHIFT_TEMPS
-
- /* Pass 1: process columns from input, store into work array. */
-
- inptr = coef_block;
- quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
- wsptr = workspace;
- for (ctr = DCTSIZE; ctr > 0; inptr++, quantptr++, wsptr++, ctr--) {
- /* Don't bother to process column 4, because second pass won't use it */
- if (ctr == DCTSIZE-4)
- continue;
- if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 &&
- inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*5] == 0 &&
- inptr[DCTSIZE*6] == 0 && inptr[DCTSIZE*7] == 0) {
- /* AC terms all zero; we need not examine term 4 for 4x4 output */
- int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS;
-
- wsptr[DCTSIZE*0] = dcval;
- wsptr[DCTSIZE*1] = dcval;
- wsptr[DCTSIZE*2] = dcval;
- wsptr[DCTSIZE*3] = dcval;
-
- continue;
- }
-
- /* Even part */
-
- tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
- tmp0 <<= (CONST_BITS+1);
-
- z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);
- z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);
-
- tmp2 = MULTIPLY(z2, FIX_1_847759065) + MULTIPLY(z3, - FIX_0_765366865);
-
- tmp10 = tmp0 + tmp2;
- tmp12 = tmp0 - tmp2;
-
- /* Odd part */
-
- z1 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
- z2 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
- z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
- z4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
-
- tmp0 = MULTIPLY(z1, - FIX_0_211164243) /* sqrt(2) * (c3-c1) */
- + MULTIPLY(z2, FIX_1_451774981) /* sqrt(2) * (c3+c7) */
- + MULTIPLY(z3, - FIX_2_172734803) /* sqrt(2) * (-c1-c5) */
- + MULTIPLY(z4, FIX_1_061594337); /* sqrt(2) * (c5+c7) */
-
- tmp2 = MULTIPLY(z1, - FIX_0_509795579) /* sqrt(2) * (c7-c5) */
- + MULTIPLY(z2, - FIX_0_601344887) /* sqrt(2) * (c5-c1) */
- + MULTIPLY(z3, FIX_0_899976223) /* sqrt(2) * (c3-c7) */
- + MULTIPLY(z4, FIX_2_562915447); /* sqrt(2) * (c1+c3) */
-
- /* Final output stage */
-
- wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp2, CONST_BITS-PASS1_BITS+1);
- wsptr[DCTSIZE*3] = (int) DESCALE(tmp10 - tmp2, CONST_BITS-PASS1_BITS+1);
- wsptr[DCTSIZE*1] = (int) DESCALE(tmp12 + tmp0, CONST_BITS-PASS1_BITS+1);
- wsptr[DCTSIZE*2] = (int) DESCALE(tmp12 - tmp0, CONST_BITS-PASS1_BITS+1);
- }
-
- /* Pass 2: process 4 rows from work array, store into output array. */
-
- wsptr = workspace;
- for (ctr = 0; ctr < 4; ctr++) {
- outptr = output_buf[ctr] + output_col;
- /* It's not clear whether a zero row test is worthwhile here ... */
-
-#ifndef NO_ZERO_ROW_TEST
- if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 &&
- wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) {
- /* AC terms all zero */
- JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3)
- & RANGE_MASK];
-
- outptr[0] = dcval;
- outptr[1] = dcval;
- outptr[2] = dcval;
- outptr[3] = dcval;
-
- wsptr += DCTSIZE; /* advance pointer to next row */
- continue;
- }
-#endif
-
- /* Even part */
-
- tmp0 = ((INT32) wsptr[0]) << (CONST_BITS+1);
-
- tmp2 = MULTIPLY((INT32) wsptr[2], FIX_1_847759065)
- + MULTIPLY((INT32) wsptr[6], - FIX_0_765366865);
-
- tmp10 = tmp0 + tmp2;
- tmp12 = tmp0 - tmp2;
-
- /* Odd part */
-
- z1 = (INT32) wsptr[7];
- z2 = (INT32) wsptr[5];
- z3 = (INT32) wsptr[3];
- z4 = (INT32) wsptr[1];
-
- tmp0 = MULTIPLY(z1, - FIX_0_211164243) /* sqrt(2) * (c3-c1) */
- + MULTIPLY(z2, FIX_1_451774981) /* sqrt(2) * (c3+c7) */
- + MULTIPLY(z3, - FIX_2_172734803) /* sqrt(2) * (-c1-c5) */
- + MULTIPLY(z4, FIX_1_061594337); /* sqrt(2) * (c5+c7) */
-
- tmp2 = MULTIPLY(z1, - FIX_0_509795579) /* sqrt(2) * (c7-c5) */
- + MULTIPLY(z2, - FIX_0_601344887) /* sqrt(2) * (c5-c1) */
- + MULTIPLY(z3, FIX_0_899976223) /* sqrt(2) * (c3-c7) */
- + MULTIPLY(z4, FIX_2_562915447); /* sqrt(2) * (c1+c3) */
-
- /* Final output stage */
-
- outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp2,
- CONST_BITS+PASS1_BITS+3+1)
- & RANGE_MASK];
- outptr[3] = range_limit[(int) DESCALE(tmp10 - tmp2,
- CONST_BITS+PASS1_BITS+3+1)
- & RANGE_MASK];
- outptr[1] = range_limit[(int) DESCALE(tmp12 + tmp0,
- CONST_BITS+PASS1_BITS+3+1)
- & RANGE_MASK];
- outptr[2] = range_limit[(int) DESCALE(tmp12 - tmp0,
- CONST_BITS+PASS1_BITS+3+1)
- & RANGE_MASK];
-
- wsptr += DCTSIZE; /* advance pointer to next row */
- }
-}
-
-
-/*
- * Perform dequantization and inverse DCT on one block of coefficients,
- * producing a reduced-size 2x2 output block.
- */
-
-GLOBAL(void)
-jpeg_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf, JDIMENSION output_col)
-{
- INT32 tmp0, tmp10, z1;
- JCOEFPTR inptr;
- ISLOW_MULT_TYPE * quantptr;
- int * wsptr;
- JSAMPROW outptr;
- JSAMPLE *range_limit = IDCT_range_limit(cinfo);
- int ctr;
- int workspace[DCTSIZE*2]; /* buffers data between passes */
- SHIFT_TEMPS
-
- /* Pass 1: process columns from input, store into work array. */
-
- inptr = coef_block;
- quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
- wsptr = workspace;
- for (ctr = DCTSIZE; ctr > 0; inptr++, quantptr++, wsptr++, ctr--) {
- /* Don't bother to process columns 2,4,6 */
- if (ctr == DCTSIZE-2 || ctr == DCTSIZE-4 || ctr == DCTSIZE-6)
- continue;
- if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*3] == 0 &&
- inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*7] == 0) {
- /* AC terms all zero; we need not examine terms 2,4,6 for 2x2 output */
- int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS;
-
- wsptr[DCTSIZE*0] = dcval;
- wsptr[DCTSIZE*1] = dcval;
-
- continue;
- }
-
- /* Even part */
-
- z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);
- tmp10 = z1 << (CONST_BITS+2);
-
- /* Odd part */
-
- z1 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);
- tmp0 = MULTIPLY(z1, - FIX_0_720959822); /* sqrt(2) * (c7-c5+c3-c1) */
- z1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);
- tmp0 += MULTIPLY(z1, FIX_0_850430095); /* sqrt(2) * (-c1+c3+c5+c7) */
- z1 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);
- tmp0 += MULTIPLY(z1, - FIX_1_272758580); /* sqrt(2) * (-c1+c3-c5-c7) */
- z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);
- tmp0 += MULTIPLY(z1, FIX_3_624509785); /* sqrt(2) * (c1+c3+c5+c7) */
-
- /* Final output stage */
-
- wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp0, CONST_BITS-PASS1_BITS+2);
- wsptr[DCTSIZE*1] = (int) DESCALE(tmp10 - tmp0, CONST_BITS-PASS1_BITS+2);
- }
-
- /* Pass 2: process 2 rows from work array, store into output array. */
-
- wsptr = workspace;
- for (ctr = 0; ctr < 2; ctr++) {
- outptr = output_buf[ctr] + output_col;
- /* It's not clear whether a zero row test is worthwhile here ... */
-
-#ifndef NO_ZERO_ROW_TEST
- if (wsptr[1] == 0 && wsptr[3] == 0 && wsptr[5] == 0 && wsptr[7] == 0) {
- /* AC terms all zero */
- JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3)
- & RANGE_MASK];
-
- outptr[0] = dcval;
- outptr[1] = dcval;
-
- wsptr += DCTSIZE; /* advance pointer to next row */
- continue;
- }
-#endif
-
- /* Even part */
-
- tmp10 = ((INT32) wsptr[0]) << (CONST_BITS+2);
-
- /* Odd part */
-
- tmp0 = MULTIPLY((INT32) wsptr[7], - FIX_0_720959822) /* sqrt(2) * (c7-c5+c3-c1) */
- + MULTIPLY((INT32) wsptr[5], FIX_0_850430095) /* sqrt(2) * (-c1+c3+c5+c7) */
- + MULTIPLY((INT32) wsptr[3], - FIX_1_272758580) /* sqrt(2) * (-c1+c3-c5-c7) */
- + MULTIPLY((INT32) wsptr[1], FIX_3_624509785); /* sqrt(2) * (c1+c3+c5+c7) */
-
- /* Final output stage */
-
- outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp0,
- CONST_BITS+PASS1_BITS+3+2)
- & RANGE_MASK];
- outptr[1] = range_limit[(int) DESCALE(tmp10 - tmp0,
- CONST_BITS+PASS1_BITS+3+2)
- & RANGE_MASK];
-
- wsptr += DCTSIZE; /* advance pointer to next row */
- }
-}
-
-
-/*
- * Perform dequantization and inverse DCT on one block of coefficients,
- * producing a reduced-size 1x1 output block.
- */
-
-GLOBAL(void)
-jpeg_idct_1x1 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf, JDIMENSION output_col)
-{
- int dcval;
- ISLOW_MULT_TYPE * quantptr;
- JSAMPLE *range_limit = IDCT_range_limit(cinfo);
- SHIFT_TEMPS
-
- /* We hardly need an inverse DCT routine for this: just take the
- * average pixel value, which is one-eighth of the DC coefficient.
- */
- quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;
- dcval = DEQUANTIZE(coef_block[0], quantptr[0]);
- dcval = (int) DESCALE((INT32) dcval, 3);
-
- output_buf[0][output_col] = range_limit[dcval & RANGE_MASK];
-}
-
-#endif /* IDCT_SCALING_SUPPORTED */
diff --git a/src/3rdparty/libjpeg/jmemansi.c b/src/3rdparty/libjpeg/jmemansi.c
new file mode 100644
index 0000000000..2d93e49625
--- /dev/null
+++ b/src/3rdparty/libjpeg/jmemansi.c
@@ -0,0 +1,167 @@
+/*
+ * jmemansi.c
+ *
+ * Copyright (C) 1992-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file provides a simple generic implementation of the system-
+ * dependent portion of the JPEG memory manager. This implementation
+ * assumes that you have the ANSI-standard library routine tmpfile().
+ * Also, the problem of determining the amount of memory available
+ * is shoved onto the user.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jmemsys.h" /* import the system-dependent declarations */
+
+#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare malloc(),free() */
+extern void * malloc JPP((size_t size));
+extern void free JPP((void *ptr));
+#endif
+
+#ifndef SEEK_SET /* pre-ANSI systems may not define this; */
+#define SEEK_SET 0 /* if not, assume 0 is correct */
+#endif
+
+
+/*
+ * Memory allocation and freeing are controlled by the regular library
+ * routines malloc() and free().
+ */
+
+GLOBAL(void *)
+jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
+{
+ return (void *) malloc(sizeofobject);
+}
+
+GLOBAL(void)
+jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
+{
+ free(object);
+}
+
+
+/*
+ * "Large" objects are treated the same as "small" ones.
+ * NB: although we include FAR keywords in the routine declarations,
+ * this file won't actually work in 80x86 small/medium model; at least,
+ * you probably won't be able to process useful-size images in only 64KB.
+ */
+
+GLOBAL(void FAR *)
+jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
+{
+ return (void FAR *) malloc(sizeofobject);
+}
+
+GLOBAL(void)
+jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
+{
+ free(object);
+}
+
+
+/*
+ * This routine computes the total memory space available for allocation.
+ * It's impossible to do this in a portable way; our current solution is
+ * to make the user tell us (with a default value set at compile time).
+ * If you can actually get the available space, it's a good idea to subtract
+ * a slop factor of 5% or so.
+ */
+
+#ifndef DEFAULT_MAX_MEM /* so can override from makefile */
+#define DEFAULT_MAX_MEM 1000000L /* default: one megabyte */
+#endif
+
+GLOBAL(long)
+jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
+ long max_bytes_needed, long already_allocated)
+{
+ return cinfo->mem->max_memory_to_use - already_allocated;
+}
+
+
+/*
+ * Backing store (temporary file) management.
+ * Backing store objects are only used when the value returned by
+ * jpeg_mem_available is less than the total space needed. You can dispense
+ * with these routines if you have plenty of virtual memory; see jmemnobs.c.
+ */
+
+
+METHODDEF(void)
+read_backing_store (j_common_ptr cinfo, backing_store_ptr info,
+ void FAR * buffer_address,
+ long file_offset, long byte_count)
+{
+ if (fseek(info->temp_file, file_offset, SEEK_SET))
+ ERREXIT(cinfo, JERR_TFILE_SEEK);
+ if (JFREAD(info->temp_file, buffer_address, byte_count)
+ != (size_t) byte_count)
+ ERREXIT(cinfo, JERR_TFILE_READ);
+}
+
+
+METHODDEF(void)
+write_backing_store (j_common_ptr cinfo, backing_store_ptr info,
+ void FAR * buffer_address,
+ long file_offset, long byte_count)
+{
+ if (fseek(info->temp_file, file_offset, SEEK_SET))
+ ERREXIT(cinfo, JERR_TFILE_SEEK);
+ if (JFWRITE(info->temp_file, buffer_address, byte_count)
+ != (size_t) byte_count)
+ ERREXIT(cinfo, JERR_TFILE_WRITE);
+}
+
+
+METHODDEF(void)
+close_backing_store (j_common_ptr cinfo, backing_store_ptr info)
+{
+ fclose(info->temp_file);
+ /* Since this implementation uses tmpfile() to create the file,
+ * no explicit file deletion is needed.
+ */
+}
+
+
+/*
+ * Initial opening of a backing-store object.
+ *
+ * This version uses tmpfile(), which constructs a suitable file name
+ * behind the scenes. We don't have to use info->temp_name[] at all;
+ * indeed, we can't even find out the actual name of the temp file.
+ */
+
+GLOBAL(void)
+jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
+ long total_bytes_needed)
+{
+ if ((info->temp_file = tmpfile()) == NULL)
+ ERREXITS(cinfo, JERR_TFILE_CREATE, "");
+ info->read_backing_store = read_backing_store;
+ info->write_backing_store = write_backing_store;
+ info->close_backing_store = close_backing_store;
+}
+
+
+/*
+ * These routines take care of any system-dependent initialization and
+ * cleanup required.
+ */
+
+GLOBAL(long)
+jpeg_mem_init (j_common_ptr cinfo)
+{
+ return DEFAULT_MAX_MEM; /* default for max_memory_to_use */
+}
+
+GLOBAL(void)
+jpeg_mem_term (j_common_ptr cinfo)
+{
+ /* no work */
+}
diff --git a/src/3rdparty/libjpeg/jmemdos.c b/src/3rdparty/libjpeg/jmemdos.c
new file mode 100644
index 0000000000..60b45c6938
--- /dev/null
+++ b/src/3rdparty/libjpeg/jmemdos.c
@@ -0,0 +1,638 @@
+/*
+ * jmemdos.c
+ *
+ * Copyright (C) 1992-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file provides an MS-DOS-compatible implementation of the system-
+ * dependent portion of the JPEG memory manager. Temporary data can be
+ * stored in extended or expanded memory as well as in regular DOS files.
+ *
+ * If you use this file, you must be sure that NEED_FAR_POINTERS is defined
+ * if you compile in a small-data memory model; it should NOT be defined if
+ * you use a large-data memory model. This file is not recommended if you
+ * are using a flat-memory-space 386 environment such as DJGCC or Watcom C.
+ * Also, this code will NOT work if struct fields are aligned on greater than
+ * 2-byte boundaries.
+ *
+ * Based on code contributed by Ge' Weijers.
+ */
+
+/*
+ * If you have both extended and expanded memory, you may want to change the
+ * order in which they are tried in jopen_backing_store. On a 286 machine
+ * expanded memory is usually faster, since extended memory access involves
+ * an expensive protected-mode-and-back switch. On 386 and better, extended
+ * memory is usually faster. As distributed, the code tries extended memory
+ * first (what? not everyone has a 386? :-).
+ *
+ * You can disable use of extended/expanded memory entirely by altering these
+ * definitions or overriding them from the Makefile (eg, -DEMS_SUPPORTED=0).
+ */
+
+#ifndef XMS_SUPPORTED
+#define XMS_SUPPORTED 1
+#endif
+#ifndef EMS_SUPPORTED
+#define EMS_SUPPORTED 1
+#endif
+
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jmemsys.h" /* import the system-dependent declarations */
+
+#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare these */
+extern void * malloc JPP((size_t size));
+extern void free JPP((void *ptr));
+extern char * getenv JPP((const char * name));
+#endif
+
+#ifdef NEED_FAR_POINTERS
+
+#ifdef __TURBOC__
+/* These definitions work for Borland C (Turbo C) */
+#include <alloc.h> /* need farmalloc(), farfree() */
+#define far_malloc(x) farmalloc(x)
+#define far_free(x) farfree(x)
+#else
+/* These definitions work for Microsoft C and compatible compilers */
+#include <malloc.h> /* need _fmalloc(), _ffree() */
+#define far_malloc(x) _fmalloc(x)
+#define far_free(x) _ffree(x)
+#endif
+
+#else /* not NEED_FAR_POINTERS */
+
+#define far_malloc(x) malloc(x)
+#define far_free(x) free(x)
+
+#endif /* NEED_FAR_POINTERS */
+
+#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */
+#define READ_BINARY "r"
+#else
+#define READ_BINARY "rb"
+#endif
+
+#ifndef USE_MSDOS_MEMMGR /* make sure user got configuration right */
+ You forgot to define USE_MSDOS_MEMMGR in jconfig.h. /* deliberate syntax error */
+#endif
+
+#if MAX_ALLOC_CHUNK >= 65535L /* make sure jconfig.h got this right */
+ MAX_ALLOC_CHUNK should be less than 64K. /* deliberate syntax error */
+#endif
+
+
+/*
+ * Declarations for assembly-language support routines (see jmemdosa.asm).
+ *
+ * The functions are declared "far" as are all their pointer arguments;
+ * this ensures the assembly source code will work regardless of the
+ * compiler memory model. We assume "short" is 16 bits, "long" is 32.
+ */
+
+typedef void far * XMSDRIVER; /* actually a pointer to code */
+typedef struct { /* registers for calling XMS driver */
+ unsigned short ax, dx, bx;
+ void far * ds_si;
+ } XMScontext;
+typedef struct { /* registers for calling EMS driver */
+ unsigned short ax, dx, bx;
+ void far * ds_si;
+ } EMScontext;
+
+extern short far jdos_open JPP((short far * handle, char far * filename));
+extern short far jdos_close JPP((short handle));
+extern short far jdos_seek JPP((short handle, long offset));
+extern short far jdos_read JPP((short handle, void far * buffer,
+ unsigned short count));
+extern short far jdos_write JPP((short handle, void far * buffer,
+ unsigned short count));
+extern void far jxms_getdriver JPP((XMSDRIVER far *));
+extern void far jxms_calldriver JPP((XMSDRIVER, XMScontext far *));
+extern short far jems_available JPP((void));
+extern void far jems_calldriver JPP((EMScontext far *));
+
+
+/*
+ * Selection of a file name for a temporary file.
+ * This is highly system-dependent, and you may want to customize it.
+ */
+
+static int next_file_num; /* to distinguish among several temp files */
+
+LOCAL(void)
+select_file_name (char * fname)
+{
+ const char * env;
+ char * ptr;
+ FILE * tfile;
+
+ /* Keep generating file names till we find one that's not in use */
+ for (;;) {
+ /* Get temp directory name from environment TMP or TEMP variable;
+ * if none, use "."
+ */
+ if ((env = (const char *) getenv("TMP")) == NULL)
+ if ((env = (const char *) getenv("TEMP")) == NULL)
+ env = ".";
+ if (*env == '\0') /* null string means "." */
+ env = ".";
+ ptr = fname; /* copy name to fname */
+ while (*env != '\0')
+ *ptr++ = *env++;
+ if (ptr[-1] != '\\' && ptr[-1] != '/')
+ *ptr++ = '\\'; /* append backslash if not in env variable */
+ /* Append a suitable file name */
+ next_file_num++; /* advance counter */
+ sprintf(ptr, "JPG%03d.TMP", next_file_num);
+ /* Probe to see if file name is already in use */
+ if ((tfile = fopen(fname, READ_BINARY)) == NULL)
+ break;
+ fclose(tfile); /* oops, it's there; close tfile & try again */
+ }
+}
+
+
+/*
+ * Near-memory allocation and freeing are controlled by the regular library
+ * routines malloc() and free().
+ */
+
+GLOBAL(void *)
+jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
+{
+ return (void *) malloc(sizeofobject);
+}
+
+GLOBAL(void)
+jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
+{
+ free(object);
+}
+
+
+/*
+ * "Large" objects are allocated in far memory, if possible
+ */
+
+GLOBAL(void FAR *)
+jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
+{
+ return (void FAR *) far_malloc(sizeofobject);
+}
+
+GLOBAL(void)
+jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
+{
+ far_free(object);
+}
+
+
+/*
+ * This routine computes the total memory space available for allocation.
+ * It's impossible to do this in a portable way; our current solution is
+ * to make the user tell us (with a default value set at compile time).
+ * If you can actually get the available space, it's a good idea to subtract
+ * a slop factor of 5% or so.
+ */
+
+#ifndef DEFAULT_MAX_MEM /* so can override from makefile */
+#define DEFAULT_MAX_MEM 300000L /* for total usage about 450K */
+#endif
+
+GLOBAL(long)
+jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
+ long max_bytes_needed, long already_allocated)
+{
+ return cinfo->mem->max_memory_to_use - already_allocated;
+}
+
+
+/*
+ * Backing store (temporary file) management.
+ * Backing store objects are only used when the value returned by
+ * jpeg_mem_available is less than the total space needed. You can dispense
+ * with these routines if you have plenty of virtual memory; see jmemnobs.c.
+ */
+
+/*
+ * For MS-DOS we support three types of backing storage:
+ * 1. Conventional DOS files. We access these by direct DOS calls rather
+ * than via the stdio package. This provides a bit better performance,
+ * but the real reason is that the buffers to be read or written are FAR.
+ * The stdio library for small-data memory models can't cope with that.
+ * 2. Extended memory, accessed per the XMS V2.0 specification.
+ * 3. Expanded memory, accessed per the LIM/EMS 4.0 specification.
+ * You'll need copies of those specs to make sense of the related code.
+ * The specs are available by Internet FTP from the SIMTEL archives
+ * (oak.oakland.edu and its various mirror sites). See files
+ * pub/msdos/microsoft/xms20.arc and pub/msdos/info/limems41.zip.
+ */
+
+
+/*
+ * Access methods for a DOS file.
+ */
+
+
+METHODDEF(void)
+read_file_store (j_common_ptr cinfo, backing_store_ptr info,
+ void FAR * buffer_address,
+ long file_offset, long byte_count)
+{
+ if (jdos_seek(info->handle.file_handle, file_offset))
+ ERREXIT(cinfo, JERR_TFILE_SEEK);
+ /* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */
+ if (byte_count > 65535L) /* safety check */
+ ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK);
+ if (jdos_read(info->handle.file_handle, buffer_address,
+ (unsigned short) byte_count))
+ ERREXIT(cinfo, JERR_TFILE_READ);
+}
+
+
+METHODDEF(void)
+write_file_store (j_common_ptr cinfo, backing_store_ptr info,
+ void FAR * buffer_address,
+ long file_offset, long byte_count)
+{
+ if (jdos_seek(info->handle.file_handle, file_offset))
+ ERREXIT(cinfo, JERR_TFILE_SEEK);
+ /* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */
+ if (byte_count > 65535L) /* safety check */
+ ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK);
+ if (jdos_write(info->handle.file_handle, buffer_address,
+ (unsigned short) byte_count))
+ ERREXIT(cinfo, JERR_TFILE_WRITE);
+}
+
+
+METHODDEF(void)
+close_file_store (j_common_ptr cinfo, backing_store_ptr info)
+{
+ jdos_close(info->handle.file_handle); /* close the file */
+ remove(info->temp_name); /* delete the file */
+/* If your system doesn't have remove(), try unlink() instead.
+ * remove() is the ANSI-standard name for this function, but
+ * unlink() was more common in pre-ANSI systems.
+ */
+ TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name);
+}
+
+
+LOCAL(boolean)
+open_file_store (j_common_ptr cinfo, backing_store_ptr info,
+ long total_bytes_needed)
+{
+ short handle;
+
+ select_file_name(info->temp_name);
+ if (jdos_open((short far *) & handle, (char far *) info->temp_name)) {
+ /* might as well exit since jpeg_open_backing_store will fail anyway */
+ ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name);
+ return FALSE;
+ }
+ info->handle.file_handle = handle;
+ info->read_backing_store = read_file_store;
+ info->write_backing_store = write_file_store;
+ info->close_backing_store = close_file_store;
+ TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name);
+ return TRUE; /* succeeded */
+}
+
+
+/*
+ * Access methods for extended memory.
+ */
+
+#if XMS_SUPPORTED
+
+static XMSDRIVER xms_driver; /* saved address of XMS driver */
+
+typedef union { /* either long offset or real-mode pointer */
+ long offset;
+ void far * ptr;
+ } XMSPTR;
+
+typedef struct { /* XMS move specification structure */
+ long length;
+ XMSH src_handle;
+ XMSPTR src;
+ XMSH dst_handle;
+ XMSPTR dst;
+ } XMSspec;
+
+#define ODD(X) (((X) & 1L) != 0)
+
+
+METHODDEF(void)
+read_xms_store (j_common_ptr cinfo, backing_store_ptr info,
+ void FAR * buffer_address,
+ long file_offset, long byte_count)
+{
+ XMScontext ctx;
+ XMSspec spec;
+ char endbuffer[2];
+
+ /* The XMS driver can't cope with an odd length, so handle the last byte
+ * specially if byte_count is odd. We don't expect this to be common.
+ */
+
+ spec.length = byte_count & (~ 1L);
+ spec.src_handle = info->handle.xms_handle;
+ spec.src.offset = file_offset;
+ spec.dst_handle = 0;
+ spec.dst.ptr = buffer_address;
+
+ ctx.ds_si = (void far *) & spec;
+ ctx.ax = 0x0b00; /* EMB move */
+ jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
+ if (ctx.ax != 1)
+ ERREXIT(cinfo, JERR_XMS_READ);
+
+ if (ODD(byte_count)) {
+ read_xms_store(cinfo, info, (void FAR *) endbuffer,
+ file_offset + byte_count - 1L, 2L);
+ ((char FAR *) buffer_address)[byte_count - 1L] = endbuffer[0];
+ }
+}
+
+
+METHODDEF(void)
+write_xms_store (j_common_ptr cinfo, backing_store_ptr info,
+ void FAR * buffer_address,
+ long file_offset, long byte_count)
+{
+ XMScontext ctx;
+ XMSspec spec;
+ char endbuffer[2];
+
+ /* The XMS driver can't cope with an odd length, so handle the last byte
+ * specially if byte_count is odd. We don't expect this to be common.
+ */
+
+ spec.length = byte_count & (~ 1L);
+ spec.src_handle = 0;
+ spec.src.ptr = buffer_address;
+ spec.dst_handle = info->handle.xms_handle;
+ spec.dst.offset = file_offset;
+
+ ctx.ds_si = (void far *) & spec;
+ ctx.ax = 0x0b00; /* EMB move */
+ jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
+ if (ctx.ax != 1)
+ ERREXIT(cinfo, JERR_XMS_WRITE);
+
+ if (ODD(byte_count)) {
+ read_xms_store(cinfo, info, (void FAR *) endbuffer,
+ file_offset + byte_count - 1L, 2L);
+ endbuffer[0] = ((char FAR *) buffer_address)[byte_count - 1L];
+ write_xms_store(cinfo, info, (void FAR *) endbuffer,
+ file_offset + byte_count - 1L, 2L);
+ }
+}
+
+
+METHODDEF(void)
+close_xms_store (j_common_ptr cinfo, backing_store_ptr info)
+{
+ XMScontext ctx;
+
+ ctx.dx = info->handle.xms_handle;
+ ctx.ax = 0x0a00;
+ jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
+ TRACEMS1(cinfo, 1, JTRC_XMS_CLOSE, info->handle.xms_handle);
+ /* we ignore any error return from the driver */
+}
+
+
+LOCAL(boolean)
+open_xms_store (j_common_ptr cinfo, backing_store_ptr info,
+ long total_bytes_needed)
+{
+ XMScontext ctx;
+
+ /* Get address of XMS driver */
+ jxms_getdriver((XMSDRIVER far *) & xms_driver);
+ if (xms_driver == NULL)
+ return FALSE; /* no driver to be had */
+
+ /* Get version number, must be >= 2.00 */
+ ctx.ax = 0x0000;
+ jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
+ if (ctx.ax < (unsigned short) 0x0200)
+ return FALSE;
+
+ /* Try to get space (expressed in kilobytes) */
+ ctx.dx = (unsigned short) ((total_bytes_needed + 1023L) >> 10);
+ ctx.ax = 0x0900;
+ jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
+ if (ctx.ax != 1)
+ return FALSE;
+
+ /* Succeeded, save the handle and away we go */
+ info->handle.xms_handle = ctx.dx;
+ info->read_backing_store = read_xms_store;
+ info->write_backing_store = write_xms_store;
+ info->close_backing_store = close_xms_store;
+ TRACEMS1(cinfo, 1, JTRC_XMS_OPEN, ctx.dx);
+ return TRUE; /* succeeded */
+}
+
+#endif /* XMS_SUPPORTED */
+
+
+/*
+ * Access methods for expanded memory.
+ */
+
+#if EMS_SUPPORTED
+
+/* The EMS move specification structure requires word and long fields aligned
+ * at odd byte boundaries. Some compilers will align struct fields at even
+ * byte boundaries. While it's usually possible to force byte alignment,
+ * that causes an overall performance penalty and may pose problems in merging
+ * JPEG into a larger application. Instead we accept some rather dirty code
+ * here. Note this code would fail if the hardware did not allow odd-byte
+ * word & long accesses, but all 80x86 CPUs do.
+ */
+
+typedef void far * EMSPTR;
+
+typedef union { /* EMS move specification structure */
+ long length; /* It's easy to access first 4 bytes */
+ char bytes[18]; /* Misaligned fields in here! */
+ } EMSspec;
+
+/* Macros for accessing misaligned fields */
+#define FIELD_AT(spec,offset,type) (*((type *) &(spec.bytes[offset])))
+#define SRC_TYPE(spec) FIELD_AT(spec,4,char)
+#define SRC_HANDLE(spec) FIELD_AT(spec,5,EMSH)
+#define SRC_OFFSET(spec) FIELD_AT(spec,7,unsigned short)
+#define SRC_PAGE(spec) FIELD_AT(spec,9,unsigned short)
+#define SRC_PTR(spec) FIELD_AT(spec,7,EMSPTR)
+#define DST_TYPE(spec) FIELD_AT(spec,11,char)
+#define DST_HANDLE(spec) FIELD_AT(spec,12,EMSH)
+#define DST_OFFSET(spec) FIELD_AT(spec,14,unsigned short)
+#define DST_PAGE(spec) FIELD_AT(spec,16,unsigned short)
+#define DST_PTR(spec) FIELD_AT(spec,14,EMSPTR)
+
+#define EMSPAGESIZE 16384L /* gospel, see the EMS specs */
+
+#define HIBYTE(W) (((W) >> 8) & 0xFF)
+#define LOBYTE(W) ((W) & 0xFF)
+
+
+METHODDEF(void)
+read_ems_store (j_common_ptr cinfo, backing_store_ptr info,
+ void FAR * buffer_address,
+ long file_offset, long byte_count)
+{
+ EMScontext ctx;
+ EMSspec spec;
+
+ spec.length = byte_count;
+ SRC_TYPE(spec) = 1;
+ SRC_HANDLE(spec) = info->handle.ems_handle;
+ SRC_PAGE(spec) = (unsigned short) (file_offset / EMSPAGESIZE);
+ SRC_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE);
+ DST_TYPE(spec) = 0;
+ DST_HANDLE(spec) = 0;
+ DST_PTR(spec) = buffer_address;
+
+ ctx.ds_si = (void far *) & spec;
+ ctx.ax = 0x5700; /* move memory region */
+ jems_calldriver((EMScontext far *) & ctx);
+ if (HIBYTE(ctx.ax) != 0)
+ ERREXIT(cinfo, JERR_EMS_READ);
+}
+
+
+METHODDEF(void)
+write_ems_store (j_common_ptr cinfo, backing_store_ptr info,
+ void FAR * buffer_address,
+ long file_offset, long byte_count)
+{
+ EMScontext ctx;
+ EMSspec spec;
+
+ spec.length = byte_count;
+ SRC_TYPE(spec) = 0;
+ SRC_HANDLE(spec) = 0;
+ SRC_PTR(spec) = buffer_address;
+ DST_TYPE(spec) = 1;
+ DST_HANDLE(spec) = info->handle.ems_handle;
+ DST_PAGE(spec) = (unsigned short) (file_offset / EMSPAGESIZE);
+ DST_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE);
+
+ ctx.ds_si = (void far *) & spec;
+ ctx.ax = 0x5700; /* move memory region */
+ jems_calldriver((EMScontext far *) & ctx);
+ if (HIBYTE(ctx.ax) != 0)
+ ERREXIT(cinfo, JERR_EMS_WRITE);
+}
+
+
+METHODDEF(void)
+close_ems_store (j_common_ptr cinfo, backing_store_ptr info)
+{
+ EMScontext ctx;
+
+ ctx.ax = 0x4500;
+ ctx.dx = info->handle.ems_handle;
+ jems_calldriver((EMScontext far *) & ctx);
+ TRACEMS1(cinfo, 1, JTRC_EMS_CLOSE, info->handle.ems_handle);
+ /* we ignore any error return from the driver */
+}
+
+
+LOCAL(boolean)
+open_ems_store (j_common_ptr cinfo, backing_store_ptr info,
+ long total_bytes_needed)
+{
+ EMScontext ctx;
+
+ /* Is EMS driver there? */
+ if (! jems_available())
+ return FALSE;
+
+ /* Get status, make sure EMS is OK */
+ ctx.ax = 0x4000;
+ jems_calldriver((EMScontext far *) & ctx);
+ if (HIBYTE(ctx.ax) != 0)
+ return FALSE;
+
+ /* Get version, must be >= 4.0 */
+ ctx.ax = 0x4600;
+ jems_calldriver((EMScontext far *) & ctx);
+ if (HIBYTE(ctx.ax) != 0 || LOBYTE(ctx.ax) < 0x40)
+ return FALSE;
+
+ /* Try to allocate requested space */
+ ctx.ax = 0x4300;
+ ctx.bx = (unsigned short) ((total_bytes_needed + EMSPAGESIZE-1L) / EMSPAGESIZE);
+ jems_calldriver((EMScontext far *) & ctx);
+ if (HIBYTE(ctx.ax) != 0)
+ return FALSE;
+
+ /* Succeeded, save the handle and away we go */
+ info->handle.ems_handle = ctx.dx;
+ info->read_backing_store = read_ems_store;
+ info->write_backing_store = write_ems_store;
+ info->close_backing_store = close_ems_store;
+ TRACEMS1(cinfo, 1, JTRC_EMS_OPEN, ctx.dx);
+ return TRUE; /* succeeded */
+}
+
+#endif /* EMS_SUPPORTED */
+
+
+/*
+ * Initial opening of a backing-store object.
+ */
+
+GLOBAL(void)
+jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
+ long total_bytes_needed)
+{
+ /* Try extended memory, then expanded memory, then regular file. */
+#if XMS_SUPPORTED
+ if (open_xms_store(cinfo, info, total_bytes_needed))
+ return;
+#endif
+#if EMS_SUPPORTED
+ if (open_ems_store(cinfo, info, total_bytes_needed))
+ return;
+#endif
+ if (open_file_store(cinfo, info, total_bytes_needed))
+ return;
+ ERREXITS(cinfo, JERR_TFILE_CREATE, "");
+}
+
+
+/*
+ * These routines take care of any system-dependent initialization and
+ * cleanup required.
+ */
+
+GLOBAL(long)
+jpeg_mem_init (j_common_ptr cinfo)
+{
+ next_file_num = 0; /* initialize temp file name generator */
+ return DEFAULT_MAX_MEM; /* default for max_memory_to_use */
+}
+
+GLOBAL(void)
+jpeg_mem_term (j_common_ptr cinfo)
+{
+ /* Microsoft C, at least in v6.00A, will not successfully reclaim freed
+ * blocks of size > 32Kbytes unless we give it a kick in the rear, like so:
+ */
+#ifdef NEED_FHEAPMIN
+ _fheapmin();
+#endif
+}
diff --git a/src/3rdparty/libjpeg/jmemdosa.asm b/src/3rdparty/libjpeg/jmemdosa.asm
new file mode 100644
index 0000000000..ecd43729fe
--- /dev/null
+++ b/src/3rdparty/libjpeg/jmemdosa.asm
@@ -0,0 +1,379 @@
+;
+; jmemdosa.asm
+;
+; Copyright (C) 1992, Thomas G. Lane.
+; This file is part of the Independent JPEG Group's software.
+; For conditions of distribution and use, see the accompanying README file.
+;
+; This file contains low-level interface routines to support the MS-DOS
+; backing store manager (jmemdos.c). Routines are provided to access disk
+; files through direct DOS calls, and to access XMS and EMS drivers.
+;
+; This file should assemble with Microsoft's MASM or any compatible
+; assembler (including Borland's Turbo Assembler). If you haven't got
+; a compatible assembler, better fall back to jmemansi.c or jmemname.c.
+;
+; To minimize dependence on the C compiler's register usage conventions,
+; we save and restore all 8086 registers, even though most compilers only
+; require SI,DI,DS to be preserved. Also, we use only 16-bit-wide return
+; values, which everybody returns in AX.
+;
+; Based on code contributed by Ge' Weijers.
+;
+
+JMEMDOSA_TXT segment byte public 'CODE'
+
+ assume cs:JMEMDOSA_TXT
+
+ public _jdos_open
+ public _jdos_close
+ public _jdos_seek
+ public _jdos_read
+ public _jdos_write
+ public _jxms_getdriver
+ public _jxms_calldriver
+ public _jems_available
+ public _jems_calldriver
+
+;
+; short far jdos_open (short far * handle, char far * filename)
+;
+; Create and open a temporary file
+;
+_jdos_open proc far
+ push bp ; linkage
+ mov bp,sp
+ push si ; save all registers for safety
+ push di
+ push bx
+ push cx
+ push dx
+ push es
+ push ds
+ mov cx,0 ; normal file attributes
+ lds dx,dword ptr [bp+10] ; get filename pointer
+ mov ah,3ch ; create file
+ int 21h
+ jc open_err ; if failed, return error code
+ lds bx,dword ptr [bp+6] ; get handle pointer
+ mov word ptr [bx],ax ; save the handle
+ xor ax,ax ; return zero for OK
+open_err: pop ds ; restore registers and exit
+ pop es
+ pop dx
+ pop cx
+ pop bx
+ pop di
+ pop si
+ pop bp
+ ret
+_jdos_open endp
+
+
+;
+; short far jdos_close (short handle)
+;
+; Close the file handle
+;
+_jdos_close proc far
+ push bp ; linkage
+ mov bp,sp
+ push si ; save all registers for safety
+ push di
+ push bx
+ push cx
+ push dx
+ push es
+ push ds
+ mov bx,word ptr [bp+6] ; file handle
+ mov ah,3eh ; close file
+ int 21h
+ jc close_err ; if failed, return error code
+ xor ax,ax ; return zero for OK
+close_err: pop ds ; restore registers and exit
+ pop es
+ pop dx
+ pop cx
+ pop bx
+ pop di
+ pop si
+ pop bp
+ ret
+_jdos_close endp
+
+
+;
+; short far jdos_seek (short handle, long offset)
+;
+; Set file position
+;
+_jdos_seek proc far
+ push bp ; linkage
+ mov bp,sp
+ push si ; save all registers for safety
+ push di
+ push bx
+ push cx
+ push dx
+ push es
+ push ds
+ mov bx,word ptr [bp+6] ; file handle
+ mov dx,word ptr [bp+8] ; LS offset
+ mov cx,word ptr [bp+10] ; MS offset
+ mov ax,4200h ; absolute seek
+ int 21h
+ jc seek_err ; if failed, return error code
+ xor ax,ax ; return zero for OK
+seek_err: pop ds ; restore registers and exit
+ pop es
+ pop dx
+ pop cx
+ pop bx
+ pop di
+ pop si
+ pop bp
+ ret
+_jdos_seek endp
+
+
+;
+; short far jdos_read (short handle, void far * buffer, unsigned short count)
+;
+; Read from file
+;
+_jdos_read proc far
+ push bp ; linkage
+ mov bp,sp
+ push si ; save all registers for safety
+ push di
+ push bx
+ push cx
+ push dx
+ push es
+ push ds
+ mov bx,word ptr [bp+6] ; file handle
+ lds dx,dword ptr [bp+8] ; buffer address
+ mov cx,word ptr [bp+12] ; number of bytes
+ mov ah,3fh ; read file
+ int 21h
+ jc read_err ; if failed, return error code
+ cmp ax,word ptr [bp+12] ; make sure all bytes were read
+ je read_ok
+ mov ax,1 ; else return 1 for not OK
+ jmp short read_err
+read_ok: xor ax,ax ; return zero for OK
+read_err: pop ds ; restore registers and exit
+ pop es
+ pop dx
+ pop cx
+ pop bx
+ pop di
+ pop si
+ pop bp
+ ret
+_jdos_read endp
+
+
+;
+; short far jdos_write (short handle, void far * buffer, unsigned short count)
+;
+; Write to file
+;
+_jdos_write proc far
+ push bp ; linkage
+ mov bp,sp
+ push si ; save all registers for safety
+ push di
+ push bx
+ push cx
+ push dx
+ push es
+ push ds
+ mov bx,word ptr [bp+6] ; file handle
+ lds dx,dword ptr [bp+8] ; buffer address
+ mov cx,word ptr [bp+12] ; number of bytes
+ mov ah,40h ; write file
+ int 21h
+ jc write_err ; if failed, return error code
+ cmp ax,word ptr [bp+12] ; make sure all bytes written
+ je write_ok
+ mov ax,1 ; else return 1 for not OK
+ jmp short write_err
+write_ok: xor ax,ax ; return zero for OK
+write_err: pop ds ; restore registers and exit
+ pop es
+ pop dx
+ pop cx
+ pop bx
+ pop di
+ pop si
+ pop bp
+ ret
+_jdos_write endp
+
+
+;
+; void far jxms_getdriver (XMSDRIVER far *)
+;
+; Get the address of the XMS driver, or NULL if not available
+;
+_jxms_getdriver proc far
+ push bp ; linkage
+ mov bp,sp
+ push si ; save all registers for safety
+ push di
+ push bx
+ push cx
+ push dx
+ push es
+ push ds
+ mov ax,4300h ; call multiplex interrupt with
+ int 2fh ; a magic cookie, hex 4300
+ cmp al,80h ; AL should contain hex 80
+ je xmsavail
+ xor dx,dx ; no XMS driver available
+ xor ax,ax ; return a nil pointer
+ jmp short xmsavail_done
+xmsavail: mov ax,4310h ; fetch driver address with
+ int 2fh ; another magic cookie
+ mov dx,es ; copy address to dx:ax
+ mov ax,bx
+xmsavail_done: les bx,dword ptr [bp+6] ; get pointer to return value
+ mov word ptr es:[bx],ax
+ mov word ptr es:[bx+2],dx
+ pop ds ; restore registers and exit
+ pop es
+ pop dx
+ pop cx
+ pop bx
+ pop di
+ pop si
+ pop bp
+ ret
+_jxms_getdriver endp
+
+
+;
+; void far jxms_calldriver (XMSDRIVER, XMScontext far *)
+;
+; The XMScontext structure contains values for the AX,DX,BX,SI,DS registers.
+; These are loaded, the XMS call is performed, and the new values of the
+; AX,DX,BX registers are written back to the context structure.
+;
+_jxms_calldriver proc far
+ push bp ; linkage
+ mov bp,sp
+ push si ; save all registers for safety
+ push di
+ push bx
+ push cx
+ push dx
+ push es
+ push ds
+ les bx,dword ptr [bp+10] ; get XMScontext pointer
+ mov ax,word ptr es:[bx] ; load registers
+ mov dx,word ptr es:[bx+2]
+ mov si,word ptr es:[bx+6]
+ mov ds,word ptr es:[bx+8]
+ mov bx,word ptr es:[bx+4]
+ call dword ptr [bp+6] ; call the driver
+ mov cx,bx ; save returned BX for a sec
+ les bx,dword ptr [bp+10] ; get XMScontext pointer
+ mov word ptr es:[bx],ax ; put back ax,dx,bx
+ mov word ptr es:[bx+2],dx
+ mov word ptr es:[bx+4],cx
+ pop ds ; restore registers and exit
+ pop es
+ pop dx
+ pop cx
+ pop bx
+ pop di
+ pop si
+ pop bp
+ ret
+_jxms_calldriver endp
+
+
+;
+; short far jems_available (void)
+;
+; Have we got an EMS driver? (this comes straight from the EMS 4.0 specs)
+;
+_jems_available proc far
+ push si ; save all registers for safety
+ push di
+ push bx
+ push cx
+ push dx
+ push es
+ push ds
+ mov ax,3567h ; get interrupt vector 67h
+ int 21h
+ push cs
+ pop ds
+ mov di,000ah ; check offs 10 in returned seg
+ lea si,ASCII_device_name ; against literal string
+ mov cx,8
+ cld
+ repe cmpsb
+ jne no_ems
+ mov ax,1 ; match, it's there
+ jmp short avail_done
+no_ems: xor ax,ax ; it's not there
+avail_done: pop ds ; restore registers and exit
+ pop es
+ pop dx
+ pop cx
+ pop bx
+ pop di
+ pop si
+ ret
+
+ASCII_device_name db "EMMXXXX0"
+
+_jems_available endp
+
+
+;
+; void far jems_calldriver (EMScontext far *)
+;
+; The EMScontext structure contains values for the AX,DX,BX,SI,DS registers.
+; These are loaded, the EMS trap is performed, and the new values of the
+; AX,DX,BX registers are written back to the context structure.
+;
+_jems_calldriver proc far
+ push bp ; linkage
+ mov bp,sp
+ push si ; save all registers for safety
+ push di
+ push bx
+ push cx
+ push dx
+ push es
+ push ds
+ les bx,dword ptr [bp+6] ; get EMScontext pointer
+ mov ax,word ptr es:[bx] ; load registers
+ mov dx,word ptr es:[bx+2]
+ mov si,word ptr es:[bx+6]
+ mov ds,word ptr es:[bx+8]
+ mov bx,word ptr es:[bx+4]
+ int 67h ; call the EMS driver
+ mov cx,bx ; save returned BX for a sec
+ les bx,dword ptr [bp+6] ; get EMScontext pointer
+ mov word ptr es:[bx],ax ; put back ax,dx,bx
+ mov word ptr es:[bx+2],dx
+ mov word ptr es:[bx+4],cx
+ pop ds ; restore registers and exit
+ pop es
+ pop dx
+ pop cx
+ pop bx
+ pop di
+ pop si
+ pop bp
+ ret
+_jems_calldriver endp
+
+JMEMDOSA_TXT ends
+
+ end
diff --git a/src/3rdparty/libjpeg/jmemmac.c b/src/3rdparty/libjpeg/jmemmac.c
new file mode 100644
index 0000000000..106f9bea05
--- /dev/null
+++ b/src/3rdparty/libjpeg/jmemmac.c
@@ -0,0 +1,289 @@
+/*
+ * jmemmac.c
+ *
+ * Copyright (C) 1992-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * jmemmac.c provides an Apple Macintosh implementation of the system-
+ * dependent portion of the JPEG memory manager.
+ *
+ * If you use jmemmac.c, then you must define USE_MAC_MEMMGR in the
+ * JPEG_INTERNALS part of jconfig.h.
+ *
+ * jmemmac.c uses the Macintosh toolbox routines NewPtr and DisposePtr
+ * instead of malloc and free. It accurately determines the amount of
+ * memory available by using CompactMem. Notice that if left to its
+ * own devices, this code can chew up all available space in the
+ * application's zone, with the exception of the rather small "slop"
+ * factor computed in jpeg_mem_available(). The application can ensure
+ * that more space is left over by reducing max_memory_to_use.
+ *
+ * Large images are swapped to disk using temporary files and System 7.0+'s
+ * temporary folder functionality.
+ *
+ * Note that jmemmac.c depends on two features of MacOS that were first
+ * introduced in System 7: FindFolder and the FSSpec-based calls.
+ * If your application uses jmemmac.c and is run under System 6 or earlier,
+ * and the jpeg library decides it needs a temporary file, it will abort,
+ * printing error messages about requiring System 7. (If no temporary files
+ * are created, it will run fine.)
+ *
+ * If you want to use jmemmac.c in an application that might be used with
+ * System 6 or earlier, then you should remove dependencies on FindFolder
+ * and the FSSpec calls. You will need to replace FindFolder with some
+ * other mechanism for finding a place to put temporary files, and you
+ * should replace the FSSpec calls with their HFS equivalents:
+ *
+ * FSpDelete -> HDelete
+ * FSpGetFInfo -> HGetFInfo
+ * FSpCreate -> HCreate
+ * FSpOpenDF -> HOpen *** Note: not HOpenDF ***
+ * FSMakeFSSpec -> (fill in spec by hand.)
+ *
+ * (Use HOpen instead of HOpenDF. HOpen is just a glue-interface to PBHOpen,
+ * which is on all HFS macs. HOpenDF is a System 7 addition which avoids the
+ * ages-old problem of names starting with a period.)
+ *
+ * Contributed by Sam Bushell (jsam@iagu.on.net) and
+ * Dan Gildor (gyld@in-touch.com).
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jmemsys.h" /* import the system-dependent declarations */
+
+#ifndef USE_MAC_MEMMGR /* make sure user got configuration right */
+ You forgot to define USE_MAC_MEMMGR in jconfig.h. /* deliberate syntax error */
+#endif
+
+#include <Memory.h> /* we use the MacOS memory manager */
+#include <Files.h> /* we use the MacOS File stuff */
+#include <Folders.h> /* we use the MacOS HFS stuff */
+#include <Script.h> /* for smSystemScript */
+#include <Gestalt.h> /* we use Gestalt to test for specific functionality */
+
+#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */
+#define TEMP_FILE_NAME "JPG%03d.TMP"
+#endif
+
+static int next_file_num; /* to distinguish among several temp files */
+
+
+/*
+ * Memory allocation and freeing are controlled by the MacOS library
+ * routines NewPtr() and DisposePtr(), which allocate fixed-address
+ * storage. Unfortunately, the IJG library isn't smart enough to cope
+ * with relocatable storage.
+ */
+
+GLOBAL(void *)
+jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
+{
+ return (void *) NewPtr(sizeofobject);
+}
+
+GLOBAL(void)
+jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
+{
+ DisposePtr((Ptr) object);
+}
+
+
+/*
+ * "Large" objects are treated the same as "small" ones.
+ * NB: we include FAR keywords in the routine declarations simply for
+ * consistency with the rest of the IJG code; FAR should expand to empty
+ * on rational architectures like the Mac.
+ */
+
+GLOBAL(void FAR *)
+jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
+{
+ return (void FAR *) NewPtr(sizeofobject);
+}
+
+GLOBAL(void)
+jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
+{
+ DisposePtr((Ptr) object);
+}
+
+
+/*
+ * This routine computes the total memory space available for allocation.
+ */
+
+GLOBAL(long)
+jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
+ long max_bytes_needed, long already_allocated)
+{
+ long limit = cinfo->mem->max_memory_to_use - already_allocated;
+ long slop, mem;
+
+ /* Don't ask for more than what application has told us we may use */
+ if (max_bytes_needed > limit && limit > 0)
+ max_bytes_needed = limit;
+ /* Find whether there's a big enough free block in the heap.
+ * CompactMem tries to create a contiguous block of the requested size,
+ * and then returns the size of the largest free block (which could be
+ * much more or much less than we asked for).
+ * We add some slop to ensure we don't use up all available memory.
+ */
+ slop = max_bytes_needed / 16 + 32768L;
+ mem = CompactMem(max_bytes_needed + slop) - slop;
+ if (mem < 0)
+ mem = 0; /* sigh, couldn't even get the slop */
+ /* Don't take more than the application says we can have */
+ if (mem > limit && limit > 0)
+ mem = limit;
+ return mem;
+}
+
+
+/*
+ * Backing store (temporary file) management.
+ * Backing store objects are only used when the value returned by
+ * jpeg_mem_available is less than the total space needed. You can dispense
+ * with these routines if you have plenty of virtual memory; see jmemnobs.c.
+ */
+
+
+METHODDEF(void)
+read_backing_store (j_common_ptr cinfo, backing_store_ptr info,
+ void FAR * buffer_address,
+ long file_offset, long byte_count)
+{
+ long bytes = byte_count;
+ long retVal;
+
+ if ( SetFPos ( info->temp_file, fsFromStart, file_offset ) != noErr )
+ ERREXIT(cinfo, JERR_TFILE_SEEK);
+
+ retVal = FSRead ( info->temp_file, &bytes,
+ (unsigned char *) buffer_address );
+ if ( retVal != noErr || bytes != byte_count )
+ ERREXIT(cinfo, JERR_TFILE_READ);
+}
+
+
+METHODDEF(void)
+write_backing_store (j_common_ptr cinfo, backing_store_ptr info,
+ void FAR * buffer_address,
+ long file_offset, long byte_count)
+{
+ long bytes = byte_count;
+ long retVal;
+
+ if ( SetFPos ( info->temp_file, fsFromStart, file_offset ) != noErr )
+ ERREXIT(cinfo, JERR_TFILE_SEEK);
+
+ retVal = FSWrite ( info->temp_file, &bytes,
+ (unsigned char *) buffer_address );
+ if ( retVal != noErr || bytes != byte_count )
+ ERREXIT(cinfo, JERR_TFILE_WRITE);
+}
+
+
+METHODDEF(void)
+close_backing_store (j_common_ptr cinfo, backing_store_ptr info)
+{
+ FSClose ( info->temp_file );
+ FSpDelete ( &(info->tempSpec) );
+}
+
+
+/*
+ * Initial opening of a backing-store object.
+ *
+ * This version uses FindFolder to find the Temporary Items folder,
+ * and puts the temporary file in there.
+ */
+
+GLOBAL(void)
+jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
+ long total_bytes_needed)
+{
+ short tmpRef, vRefNum;
+ long dirID;
+ FInfo finderInfo;
+ FSSpec theSpec;
+ Str255 fName;
+ OSErr osErr;
+ long gestaltResponse = 0;
+
+ /* Check that FSSpec calls are available. */
+ osErr = Gestalt( gestaltFSAttr, &gestaltResponse );
+ if ( ( osErr != noErr )
+ || !( gestaltResponse & (1<<gestaltHasFSSpecCalls) ) )
+ ERREXITS(cinfo, JERR_TFILE_CREATE, "- System 7.0 or later required");
+ /* TO DO: add a proper error message to jerror.h. */
+
+ /* Check that FindFolder is available. */
+ osErr = Gestalt( gestaltFindFolderAttr, &gestaltResponse );
+ if ( ( osErr != noErr )
+ || !( gestaltResponse & (1<<gestaltFindFolderPresent) ) )
+ ERREXITS(cinfo, JERR_TFILE_CREATE, "- System 7.0 or later required.");
+ /* TO DO: add a proper error message to jerror.h. */
+
+ osErr = FindFolder ( kOnSystemDisk, kTemporaryFolderType, kCreateFolder,
+ &vRefNum, &dirID );
+ if ( osErr != noErr )
+ ERREXITS(cinfo, JERR_TFILE_CREATE, "- temporary items folder unavailable");
+ /* TO DO: Try putting the temp files somewhere else. */
+
+ /* Keep generating file names till we find one that's not in use */
+ for (;;) {
+ next_file_num++; /* advance counter */
+
+ sprintf(info->temp_name, TEMP_FILE_NAME, next_file_num);
+ strcpy ( (Ptr)fName+1, info->temp_name );
+ *fName = strlen (info->temp_name);
+ osErr = FSMakeFSSpec ( vRefNum, dirID, fName, &theSpec );
+
+ if ( (osErr = FSpGetFInfo ( &theSpec, &finderInfo ) ) != noErr )
+ break;
+ }
+
+ osErr = FSpCreate ( &theSpec, '????', '????', smSystemScript );
+ if ( osErr != noErr )
+ ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name);
+
+ osErr = FSpOpenDF ( &theSpec, fsRdWrPerm, &(info->temp_file) );
+ if ( osErr != noErr )
+ ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name);
+
+ info->tempSpec = theSpec;
+
+ info->read_backing_store = read_backing_store;
+ info->write_backing_store = write_backing_store;
+ info->close_backing_store = close_backing_store;
+ TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name);
+}
+
+
+/*
+ * These routines take care of any system-dependent initialization and
+ * cleanup required.
+ */
+
+GLOBAL(long)
+jpeg_mem_init (j_common_ptr cinfo)
+{
+ next_file_num = 0;
+
+ /* max_memory_to_use will be initialized to FreeMem()'s result;
+ * the calling application might later reduce it, for example
+ * to leave room to invoke multiple JPEG objects.
+ * Note that FreeMem returns the total number of free bytes;
+ * it may not be possible to allocate a single block of this size.
+ */
+ return FreeMem();
+}
+
+GLOBAL(void)
+jpeg_mem_term (j_common_ptr cinfo)
+{
+ /* no work */
+}
diff --git a/src/3rdparty/libjpeg/jmemname.c b/src/3rdparty/libjpeg/jmemname.c
new file mode 100644
index 0000000000..ed96dee1bc
--- /dev/null
+++ b/src/3rdparty/libjpeg/jmemname.c
@@ -0,0 +1,276 @@
+/*
+ * jmemname.c
+ *
+ * Copyright (C) 1992-1997, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file provides a generic implementation of the system-dependent
+ * portion of the JPEG memory manager. This implementation assumes that
+ * you must explicitly construct a name for each temp file.
+ * Also, the problem of determining the amount of memory available
+ * is shoved onto the user.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jmemsys.h" /* import the system-dependent declarations */
+
+#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare malloc(),free() */
+extern void * malloc JPP((size_t size));
+extern void free JPP((void *ptr));
+#endif
+
+#ifndef SEEK_SET /* pre-ANSI systems may not define this; */
+#define SEEK_SET 0 /* if not, assume 0 is correct */
+#endif
+
+#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */
+#define READ_BINARY "r"
+#define RW_BINARY "w+"
+#else
+#ifdef VMS /* VMS is very nonstandard */
+#define READ_BINARY "rb", "ctx=stm"
+#define RW_BINARY "w+b", "ctx=stm"
+#else /* standard ANSI-compliant case */
+#define READ_BINARY "rb"
+#define RW_BINARY "w+b"
+#endif
+#endif
+
+
+/*
+ * Selection of a file name for a temporary file.
+ * This is system-dependent!
+ *
+ * The code as given is suitable for most Unix systems, and it is easily
+ * modified for most non-Unix systems. Some notes:
+ * 1. The temp file is created in the directory named by TEMP_DIRECTORY.
+ * The default value is /usr/tmp, which is the conventional place for
+ * creating large temp files on Unix. On other systems you'll probably
+ * want to change the file location. You can do this by editing the
+ * #define, or (preferred) by defining TEMP_DIRECTORY in jconfig.h.
+ *
+ * 2. If you need to change the file name as well as its location,
+ * you can override the TEMP_FILE_NAME macro. (Note that this is
+ * actually a printf format string; it must contain %s and %d.)
+ * Few people should need to do this.
+ *
+ * 3. mktemp() is used to ensure that multiple processes running
+ * simultaneously won't select the same file names. If your system
+ * doesn't have mktemp(), define NO_MKTEMP to do it the hard way.
+ * (If you don't have <errno.h>, also define NO_ERRNO_H.)
+ *
+ * 4. You probably want to define NEED_SIGNAL_CATCHER so that cjpeg.c/djpeg.c
+ * will cause the temp files to be removed if you stop the program early.
+ */
+
+#ifndef TEMP_DIRECTORY /* can override from jconfig.h or Makefile */
+#define TEMP_DIRECTORY "/usr/tmp/" /* recommended setting for Unix */
+#endif
+
+static int next_file_num; /* to distinguish among several temp files */
+
+#ifdef NO_MKTEMP
+
+#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */
+#define TEMP_FILE_NAME "%sJPG%03d.TMP"
+#endif
+
+#ifndef NO_ERRNO_H
+#include <errno.h> /* to define ENOENT */
+#endif
+
+/* ANSI C specifies that errno is a macro, but on older systems it's more
+ * likely to be a plain int variable. And not all versions of errno.h
+ * bother to declare it, so we have to in order to be most portable. Thus:
+ */
+#ifndef errno
+extern int errno;
+#endif
+
+
+LOCAL(void)
+select_file_name (char * fname)
+{
+ FILE * tfile;
+
+ /* Keep generating file names till we find one that's not in use */
+ for (;;) {
+ next_file_num++; /* advance counter */
+ sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num);
+ if ((tfile = fopen(fname, READ_BINARY)) == NULL) {
+ /* fopen could have failed for a reason other than the file not
+ * being there; for example, file there but unreadable.
+ * If <errno.h> isn't available, then we cannot test the cause.
+ */
+#ifdef ENOENT
+ if (errno != ENOENT)
+ continue;
+#endif
+ break;
+ }
+ fclose(tfile); /* oops, it's there; close tfile & try again */
+ }
+}
+
+#else /* ! NO_MKTEMP */
+
+/* Note that mktemp() requires the initial filename to end in six X's */
+#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */
+#define TEMP_FILE_NAME "%sJPG%dXXXXXX"
+#endif
+
+LOCAL(void)
+select_file_name (char * fname)
+{
+ next_file_num++; /* advance counter */
+ sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num);
+ mktemp(fname); /* make sure file name is unique */
+ /* mktemp replaces the trailing XXXXXX with a unique string of characters */
+}
+
+#endif /* NO_MKTEMP */
+
+
+/*
+ * Memory allocation and freeing are controlled by the regular library
+ * routines malloc() and free().
+ */
+
+GLOBAL(void *)
+jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
+{
+ return (void *) malloc(sizeofobject);
+}
+
+GLOBAL(void)
+jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
+{
+ free(object);
+}
+
+
+/*
+ * "Large" objects are treated the same as "small" ones.
+ * NB: although we include FAR keywords in the routine declarations,
+ * this file won't actually work in 80x86 small/medium model; at least,
+ * you probably won't be able to process useful-size images in only 64KB.
+ */
+
+GLOBAL(void FAR *)
+jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
+{
+ return (void FAR *) malloc(sizeofobject);
+}
+
+GLOBAL(void)
+jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
+{
+ free(object);
+}
+
+
+/*
+ * This routine computes the total memory space available for allocation.
+ * It's impossible to do this in a portable way; our current solution is
+ * to make the user tell us (with a default value set at compile time).
+ * If you can actually get the available space, it's a good idea to subtract
+ * a slop factor of 5% or so.
+ */
+
+#ifndef DEFAULT_MAX_MEM /* so can override from makefile */
+#define DEFAULT_MAX_MEM 1000000L /* default: one megabyte */
+#endif
+
+GLOBAL(long)
+jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
+ long max_bytes_needed, long already_allocated)
+{
+ return cinfo->mem->max_memory_to_use - already_allocated;
+}
+
+
+/*
+ * Backing store (temporary file) management.
+ * Backing store objects are only used when the value returned by
+ * jpeg_mem_available is less than the total space needed. You can dispense
+ * with these routines if you have plenty of virtual memory; see jmemnobs.c.
+ */
+
+
+METHODDEF(void)
+read_backing_store (j_common_ptr cinfo, backing_store_ptr info,
+ void FAR * buffer_address,
+ long file_offset, long byte_count)
+{
+ if (fseek(info->temp_file, file_offset, SEEK_SET))
+ ERREXIT(cinfo, JERR_TFILE_SEEK);
+ if (JFREAD(info->temp_file, buffer_address, byte_count)
+ != (size_t) byte_count)
+ ERREXIT(cinfo, JERR_TFILE_READ);
+}
+
+
+METHODDEF(void)
+write_backing_store (j_common_ptr cinfo, backing_store_ptr info,
+ void FAR * buffer_address,
+ long file_offset, long byte_count)
+{
+ if (fseek(info->temp_file, file_offset, SEEK_SET))
+ ERREXIT(cinfo, JERR_TFILE_SEEK);
+ if (JFWRITE(info->temp_file, buffer_address, byte_count)
+ != (size_t) byte_count)
+ ERREXIT(cinfo, JERR_TFILE_WRITE);
+}
+
+
+METHODDEF(void)
+close_backing_store (j_common_ptr cinfo, backing_store_ptr info)
+{
+ fclose(info->temp_file); /* close the file */
+ unlink(info->temp_name); /* delete the file */
+/* If your system doesn't have unlink(), use remove() instead.
+ * remove() is the ANSI-standard name for this function, but if
+ * your system was ANSI you'd be using jmemansi.c, right?
+ */
+ TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name);
+}
+
+
+/*
+ * Initial opening of a backing-store object.
+ */
+
+GLOBAL(void)
+jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
+ long total_bytes_needed)
+{
+ select_file_name(info->temp_name);
+ if ((info->temp_file = fopen(info->temp_name, RW_BINARY)) == NULL)
+ ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name);
+ info->read_backing_store = read_backing_store;
+ info->write_backing_store = write_backing_store;
+ info->close_backing_store = close_backing_store;
+ TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name);
+}
+
+
+/*
+ * These routines take care of any system-dependent initialization and
+ * cleanup required.
+ */
+
+GLOBAL(long)
+jpeg_mem_init (j_common_ptr cinfo)
+{
+ next_file_num = 0; /* initialize temp file name generator */
+ return DEFAULT_MAX_MEM; /* default for max_memory_to_use */
+}
+
+GLOBAL(void)
+jpeg_mem_term (j_common_ptr cinfo)
+{
+ /* no work */
+}
diff --git a/src/3rdparty/libjpeg/jmorecfg.h b/src/3rdparty/libjpeg/jmorecfg.h
index b0b587065e..4c56cf3917 100644
--- a/src/3rdparty/libjpeg/jmorecfg.h
+++ b/src/3rdparty/libjpeg/jmorecfg.h
@@ -2,6 +2,7 @@
* jmorecfg.h
*
* Copyright (C) 1991-1997, Thomas G. Lane.
+ * Modified 1997-2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -157,9 +158,17 @@ typedef short INT16;
/* INT32 must hold at least signed 32-bit values. */
-#if !defined(XMD_H) && !defined(VXWORKS) /* X11/xmd.h correctly defines INT32 */
+#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
+#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */
+#ifndef _BASETSD_H /* MinGW is slightly different */
+#ifndef QGLOBAL_H /* Qt defines it in qglobal.h */
+#ifndef VXWORKS
typedef long INT32;
#endif
+#endif
+#endif
+#endif
+#endif
/* Datatype used for image dimensions. The JPEG standard only supports
* images up to 64K*64K due to 16-bit fields in SOF markers. Therefore
@@ -180,12 +189,12 @@ typedef unsigned int JDIMENSION;
* or code profilers that require it.
*/
+#if defined(VXWORKS) && defined(LOCAL)
+#undef LOCAL
+#endif
/* a function called through method pointers: */
#define METHODDEF(type) static type
/* a function used only in its module: */
-#if defined(VXWORKS) && defined(LOCAL)
-# undef LOCAL
-#endif
#define LOCAL(type) static type
/* a function referenced thru EXTERNs: */
#define GLOBAL(type) type
@@ -212,11 +221,13 @@ typedef unsigned int JDIMENSION;
* explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
*/
+#ifndef FAR
#ifdef NEED_FAR_POINTERS
#define FAR far
#else
#define FAR
#endif
+#endif
/*
@@ -259,8 +270,6 @@ typedef int boolean;
* (You may HAVE to do that if your compiler doesn't like null source files.)
*/
-/* Arithmetic coding is unsupported for legal reasons. Complaints to IBM. */
-
/* Capability options common to encoder and decoder: */
#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */
@@ -272,6 +281,7 @@ typedef int boolean;
#undef C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
+#define DCT_SCALING_SUPPORTED /* Input rescaling via DCT? (Requires DCT_ISLOW)*/
#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */
/* Note: if you selected 12-bit data precision, it is dangerous to turn off
* ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit
@@ -288,9 +298,9 @@ typedef int boolean;
#undef D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
+#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */
#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */
#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */
-#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */
#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */
#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */
#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */
diff --git a/src/3rdparty/libjpeg/jpegint.h b/src/3rdparty/libjpeg/jpegint.h
index 95b00d405c..0c27a4e4a0 100644
--- a/src/3rdparty/libjpeg/jpegint.h
+++ b/src/3rdparty/libjpeg/jpegint.h
@@ -2,6 +2,7 @@
* jpegint.h
*
* Copyright (C) 1991-1997, Thomas G. Lane.
+ * Modified 1997-2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -99,14 +100,16 @@ struct jpeg_downsampler {
};
/* Forward DCT (also controls coefficient quantization) */
+typedef JMETHOD(void, forward_DCT_ptr,
+ (j_compress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
+ JDIMENSION start_row, JDIMENSION start_col,
+ JDIMENSION num_blocks));
+
struct jpeg_forward_dct {
JMETHOD(void, start_pass, (j_compress_ptr cinfo));
- /* perhaps this should be an array??? */
- JMETHOD(void, forward_DCT, (j_compress_ptr cinfo,
- jpeg_component_info * compptr,
- JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
- JDIMENSION start_row, JDIMENSION start_col,
- JDIMENSION num_blocks));
+ /* It is useful to allow each component to have a separate FDCT method. */
+ forward_DCT_ptr forward_DCT[MAX_COMPONENTS];
};
/* Entropy encoding */
@@ -210,10 +213,6 @@ struct jpeg_entropy_decoder {
JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo,
JBLOCKROW *MCU_data));
-
- /* This is here to share code between baseline and progressive decoders; */
- /* other modules probably should not use it */
- boolean insufficient_data; /* set TRUE after emitting warning */
};
/* Inverse DCT (also performs dequantization) */
@@ -303,7 +302,7 @@ struct jpeg_color_quantizer {
#define jinit_downsampler jIDownsampler
#define jinit_forward_dct jIFDCT
#define jinit_huff_encoder jIHEncoder
-#define jinit_phuff_encoder jIPHEncoder
+#define jinit_arith_encoder jIAEncoder
#define jinit_marker_writer jIMWriter
#define jinit_master_decompress jIDMaster
#define jinit_d_main_controller jIDMainC
@@ -312,7 +311,7 @@ struct jpeg_color_quantizer {
#define jinit_input_controller jIInCtlr
#define jinit_marker_reader jIMReader
#define jinit_huff_decoder jIHDecoder
-#define jinit_phuff_decoder jIPHDecoder
+#define jinit_arith_decoder jIADecoder
#define jinit_inverse_dct jIIDCT
#define jinit_upsampler jIUpsampler
#define jinit_color_deconverter jIDColor
@@ -327,6 +326,13 @@ struct jpeg_color_quantizer {
#define jzero_far jZeroFar
#define jpeg_zigzag_order jZIGTable
#define jpeg_natural_order jZAGTable
+#define jpeg_natural_order7 jZAGTable7
+#define jpeg_natural_order6 jZAGTable6
+#define jpeg_natural_order5 jZAGTable5
+#define jpeg_natural_order4 jZAGTable4
+#define jpeg_natural_order3 jZAGTable3
+#define jpeg_natural_order2 jZAGTable2
+#define jpeg_aritab jAriTab
#endif /* NEED_SHORT_EXTERNAL_NAMES */
@@ -344,7 +350,7 @@ EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo));
EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo));
EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo));
EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_phuff_encoder JPP((j_compress_ptr cinfo));
+EXTERN(void) jinit_arith_encoder JPP((j_compress_ptr cinfo));
EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo));
/* Decompression module initialization routines */
EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo));
@@ -357,7 +363,7 @@ EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo,
EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo));
EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo));
EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_phuff_decoder JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_arith_decoder JPP((j_decompress_ptr cinfo));
EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo));
EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo));
EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo));
@@ -381,6 +387,15 @@ EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero));
extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */
#endif
extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */
+extern const int jpeg_natural_order7[]; /* zz to natural order for 7x7 block */
+extern const int jpeg_natural_order6[]; /* zz to natural order for 6x6 block */
+extern const int jpeg_natural_order5[]; /* zz to natural order for 5x5 block */
+extern const int jpeg_natural_order4[]; /* zz to natural order for 4x4 block */
+extern const int jpeg_natural_order3[]; /* zz to natural order for 3x3 block */
+extern const int jpeg_natural_order2[]; /* zz to natural order for 2x2 block */
+
+/* Arithmetic coding probability estimation tables in jaricom.c */
+extern const INT32 jpeg_aritab[];
/* Suppress undefined-structure complaints if necessary. */
diff --git a/src/3rdparty/libjpeg/jpeglib.h b/src/3rdparty/libjpeg/jpeglib.h
index d1be8ddeff..5039d4bf4c 100644
--- a/src/3rdparty/libjpeg/jpeglib.h
+++ b/src/3rdparty/libjpeg/jpeglib.h
@@ -2,6 +2,7 @@
* jpeglib.h
*
* Copyright (C) 1991-1998, Thomas G. Lane.
+ * Modified 2002-2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -26,11 +27,17 @@
#include "jmorecfg.h" /* seldom changed options */
+#ifdef __cplusplus
+#ifndef DONT_USE_EXTERN_C
+extern "C" {
+#endif
+#endif
+
/* Version ID for the JPEG library.
- * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60".
+ * Might be useful for tests like "#if JPEG_LIB_VERSION >= 80".
*/
-#define JPEG_LIB_VERSION 62 /* Version 6b */
+#define JPEG_LIB_VERSION 80 /* Version 8.0 */
/* Various constants determining the sizes of things.
@@ -138,18 +145,18 @@ typedef struct {
*/
JDIMENSION width_in_blocks;
JDIMENSION height_in_blocks;
- /* Size of a DCT block in samples. Always DCTSIZE for compression.
- * For decompression this is the size of the output from one DCT block,
- * reflecting any scaling we choose to apply during the IDCT step.
- * Values of 1,2,4,8 are likely to be supported. Note that different
- * components may receive different IDCT scalings.
+ /* Size of a DCT block in samples,
+ * reflecting any scaling we choose to apply during the DCT step.
+ * Values from 1 to 16 are supported.
+ * Note that different components may receive different DCT scalings.
*/
- int DCT_scaled_size;
+ int DCT_h_scaled_size;
+ int DCT_v_scaled_size;
/* The downsampled dimensions are the component's actual, unpadded number
- * of samples at the main buffer (preprocessing/compression interface), thus
- * downsampled_width = ceil(image_width * Hi/Hmax)
- * and similarly for height. For decompression, IDCT scaling is included, so
- * downsampled_width = ceil(image_width * Hi/Hmax * DCT_scaled_size/DCTSIZE)
+ * of samples at the main buffer (preprocessing/compression interface);
+ * DCT scaling is included, so
+ * downsampled_width = ceil(image_width * Hi/Hmax * DCT_h_scaled_size/DCTSIZE)
+ * and similarly for height.
*/
JDIMENSION downsampled_width; /* actual width in samples */
JDIMENSION downsampled_height; /* actual height in samples */
@@ -164,7 +171,7 @@ typedef struct {
int MCU_width; /* number of blocks per MCU, horizontally */
int MCU_height; /* number of blocks per MCU, vertically */
int MCU_blocks; /* MCU_width * MCU_height */
- int MCU_sample_width; /* MCU width in samples, MCU_width*DCT_scaled_size */
+ int MCU_sample_width; /* MCU width in samples: MCU_width * DCT_h_scaled_size */
int last_col_width; /* # of non-dummy blocks across in last MCU */
int last_row_height; /* # of non-dummy blocks down in last MCU */
@@ -291,6 +298,17 @@ struct jpeg_compress_struct {
* helper routines to simplify changing parameters.
*/
+ unsigned int scale_num, scale_denom; /* fraction by which to scale image */
+
+ JDIMENSION jpeg_width; /* scaled JPEG image width */
+ JDIMENSION jpeg_height; /* scaled JPEG image height */
+ /* Dimensions of actual JPEG image that will be written to file,
+ * derived from input dimensions by scaling factors above.
+ * These fields are computed by jpeg_start_compress().
+ * You can also use jpeg_calc_jpeg_dimensions() to determine these values
+ * in advance of calling jpeg_start_compress().
+ */
+
int data_precision; /* bits of precision in image data */
int num_components; /* # of color components in JPEG image */
@@ -298,14 +316,17 @@ struct jpeg_compress_struct {
jpeg_component_info * comp_info;
/* comp_info[i] describes component that appears i'th in SOF */
-
+
JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS];
- /* ptrs to coefficient quantization tables, or NULL if not defined */
-
+ int q_scale_factor[NUM_QUANT_TBLS];
+ /* ptrs to coefficient quantization tables, or NULL if not defined,
+ * and corresponding scale factors (percentage, initialized 100).
+ */
+
JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS];
JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS];
/* ptrs to Huffman coding tables, or NULL if not defined */
-
+
UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */
@@ -321,6 +342,7 @@ struct jpeg_compress_struct {
boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */
boolean optimize_coding; /* TRUE=optimize entropy encoding parms */
boolean CCIR601_sampling; /* TRUE=first samples are cosited */
+ boolean do_fancy_downsampling; /* TRUE=apply fancy downsampling */
int smoothing_factor; /* 1..100, or 0 for no input smoothing */
J_DCT_METHOD dct_method; /* DCT algorithm selector */
@@ -364,6 +386,9 @@ struct jpeg_compress_struct {
int max_h_samp_factor; /* largest h_samp_factor */
int max_v_samp_factor; /* largest v_samp_factor */
+ int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */
+ int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */
+
JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */
/* The coefficient controller receives data in units of MCU rows as defined
* for fully interleaved scans (whether the JPEG file is interleaved or not).
@@ -389,6 +414,10 @@ struct jpeg_compress_struct {
int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */
+ int block_size; /* the basic DCT block size: 1..16 */
+ const int * natural_order; /* natural-order position array */
+ int lim_Se; /* min( Se, DCTSIZE2-1 ) */
+
/*
* Links to compression subobjects (methods and private variables of modules)
*/
@@ -535,6 +564,7 @@ struct jpeg_decompress_struct {
jpeg_component_info * comp_info;
/* comp_info[i] describes component that appears i'th in SOF */
+ boolean is_baseline; /* TRUE if Baseline SOF0 encountered */
boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */
boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */
@@ -575,7 +605,8 @@ struct jpeg_decompress_struct {
int max_h_samp_factor; /* largest h_samp_factor */
int max_v_samp_factor; /* largest v_samp_factor */
- int min_DCT_scaled_size; /* smallest DCT_scaled_size of any component */
+ int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */
+ int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */
JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */
/* The coefficient controller's input and output progress is measured in
@@ -583,7 +614,7 @@ struct jpeg_decompress_struct {
* in fully interleaved JPEG scans, but are used whether the scan is
* interleaved or not. We define an iMCU row as v_samp_factor DCT block
* rows of each component. Therefore, the IDCT output contains
- * v_samp_factor*DCT_scaled_size sample rows of a component per iMCU row.
+ * v_samp_factor*DCT_v_scaled_size sample rows of a component per iMCU row.
*/
JSAMPLE * sample_range_limit; /* table for fast range-limiting */
@@ -607,6 +638,12 @@ struct jpeg_decompress_struct {
int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */
+ /* These fields are derived from Se of first SOS marker.
+ */
+ int block_size; /* the basic DCT block size: 1..16 */
+ const int * natural_order; /* natural-order position array for entropy decode */
+ int lim_Se; /* min( Se, DCTSIZE2-1 ) for entropy decode */
+
/* This field is shared between entropy decoder and marker parser.
* It is either zero or the code of a JPEG marker that has been
* read from the data source, but has not yet been processed.
@@ -836,11 +873,14 @@ typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
#define jpeg_destroy_decompress jDestDecompress
#define jpeg_stdio_dest jStdDest
#define jpeg_stdio_src jStdSrc
+#define jpeg_mem_dest jMemDest
+#define jpeg_mem_src jMemSrc
#define jpeg_set_defaults jSetDefaults
#define jpeg_set_colorspace jSetColorspace
#define jpeg_default_colorspace jDefColorspace
#define jpeg_set_quality jSetQuality
#define jpeg_set_linear_quality jSetLQuality
+#define jpeg_default_qtables jDefQTables
#define jpeg_add_quant_table jAddQuantTable
#define jpeg_quality_scaling jQualityScaling
#define jpeg_simple_progression jSimProgress
@@ -850,6 +890,7 @@ typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
#define jpeg_start_compress jStrtCompress
#define jpeg_write_scanlines jWrtScanlines
#define jpeg_finish_compress jFinCompress
+#define jpeg_calc_jpeg_dimensions jCjpegDimensions
#define jpeg_write_raw_data jWrtRawData
#define jpeg_write_marker jWrtMarker
#define jpeg_write_m_header jWrtMHeader
@@ -866,6 +907,7 @@ typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
#define jpeg_input_complete jInComplete
#define jpeg_new_colormap jNewCMap
#define jpeg_consume_input jConsumeInput
+#define jpeg_core_output_dimensions jCoreDimensions
#define jpeg_calc_output_dimensions jCalcDimensions
#define jpeg_save_markers jSaveMarkers
#define jpeg_set_marker_processor jSetMarker
@@ -910,6 +952,14 @@ EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo));
EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile));
EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile));
+/* Data source and destination managers: memory buffers. */
+EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
+ unsigned char ** outbuffer,
+ unsigned long * outsize));
+EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo,
+ unsigned char * inbuffer,
+ unsigned long insize));
+
/* Default parameter setup for compression */
EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo));
/* Compression parameter setup aids */
@@ -921,6 +971,8 @@ EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,
EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo,
int scale_factor,
boolean force_baseline));
+EXTERN(void) jpeg_default_qtables JPP((j_compress_ptr cinfo,
+ boolean force_baseline));
EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl,
const unsigned int *basic_table,
int scale_factor,
@@ -940,12 +992,15 @@ EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo,
JDIMENSION num_lines));
EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo));
+/* Precalculate JPEG dimensions for current compression parameters. */
+EXTERN(void) jpeg_calc_jpeg_dimensions JPP((j_compress_ptr cinfo));
+
/* Replaces jpeg_write_scanlines when writing raw downsampled data. */
EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo,
JSAMPIMAGE data,
JDIMENSION num_lines));
-/* Write a special marker. See libjpeg.doc concerning safe usage. */
+/* Write a special marker. See libjpeg.txt concerning safe usage. */
EXTERN(void) jpeg_write_marker
JPP((j_compress_ptr cinfo, int marker,
const JOCTET * dataptr, unsigned int datalen));
@@ -999,6 +1054,7 @@ EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo));
#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */
/* Precalculate output dimensions for current decompression parameters. */
+EXTERN(void) jpeg_core_output_dimensions JPP((j_decompress_ptr cinfo));
EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo));
/* Control saving of COM and APPn markers into marker_list. */
@@ -1093,4 +1149,10 @@ struct jpeg_color_quantizer { long dummy; };
#include "jerror.h" /* fetch error codes too */
#endif
+#ifdef __cplusplus
+#ifndef DONT_USE_EXTERN_C
+}
+#endif
+#endif
+
#endif /* JPEGLIB_H */
diff --git a/src/3rdparty/libjpeg/jpegtran.1 b/src/3rdparty/libjpeg/jpegtran.1
new file mode 100644
index 0000000000..0ad1bbc841
--- /dev/null
+++ b/src/3rdparty/libjpeg/jpegtran.1
@@ -0,0 +1,285 @@
+.TH JPEGTRAN 1 "28 December 2009"
+.SH NAME
+jpegtran \- lossless transformation of JPEG files
+.SH SYNOPSIS
+.B jpegtran
+[
+.I options
+]
+[
+.I filename
+]
+.LP
+.SH DESCRIPTION
+.LP
+.B jpegtran
+performs various useful transformations of JPEG files.
+It can translate the coded representation from one variant of JPEG to another,
+for example from baseline JPEG to progressive JPEG or vice versa. It can also
+perform some rearrangements of the image data, for example turning an image
+from landscape to portrait format by rotation.
+.PP
+.B jpegtran
+works by rearranging the compressed data (DCT coefficients), without
+ever fully decoding the image. Therefore, its transformations are lossless:
+there is no image degradation at all, which would not be true if you used
+.B djpeg
+followed by
+.B cjpeg
+to accomplish the same conversion. But by the same token,
+.B jpegtran
+cannot perform lossy operations such as changing the image quality.
+.PP
+.B jpegtran
+reads the named JPEG/JFIF file, or the standard input if no file is
+named, and produces a JPEG/JFIF file on the standard output.
+.SH OPTIONS
+All switch names may be abbreviated; for example,
+.B \-optimize
+may be written
+.B \-opt
+or
+.BR \-o .
+Upper and lower case are equivalent.
+British spellings are also accepted (e.g.,
+.BR \-optimise ),
+though for brevity these are not mentioned below.
+.PP
+To specify the coded JPEG representation used in the output file,
+.B jpegtran
+accepts a subset of the switches recognized by
+.BR cjpeg :
+.TP
+.B \-optimize
+Perform optimization of entropy encoding parameters.
+.TP
+.B \-progressive
+Create progressive JPEG file.
+.TP
+.BI \-restart " N"
+Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is
+attached to the number.
+.TP
+.B \-arithmetic
+Use arithmetic coding.
+.TP
+.BI \-scans " file"
+Use the scan script given in the specified text file.
+.PP
+See
+.BR cjpeg (1)
+for more details about these switches.
+If you specify none of these switches, you get a plain baseline-JPEG output
+file. The quality setting and so forth are determined by the input file.
+.PP
+The image can be losslessly transformed by giving one of these switches:
+.TP
+.B \-flip horizontal
+Mirror image horizontally (left-right).
+.TP
+.B \-flip vertical
+Mirror image vertically (top-bottom).
+.TP
+.B \-rotate 90
+Rotate image 90 degrees clockwise.
+.TP
+.B \-rotate 180
+Rotate image 180 degrees.
+.TP
+.B \-rotate 270
+Rotate image 270 degrees clockwise (or 90 ccw).
+.TP
+.B \-transpose
+Transpose image (across UL-to-LR axis).
+.TP
+.B \-transverse
+Transverse transpose (across UR-to-LL axis).
+.IP
+The transpose transformation has no restrictions regarding image dimensions.
+The other transformations operate rather oddly if the image dimensions are not
+a multiple of the iMCU size (usually 8 or 16 pixels), because they can only
+transform complete blocks of DCT coefficient data in the desired way.
+.IP
+.BR jpegtran 's
+default behavior when transforming an odd-size image is designed
+to preserve exact reversibility and mathematical consistency of the
+transformation set. As stated, transpose is able to flip the entire image
+area. Horizontal mirroring leaves any partial iMCU column at the right edge
+untouched, but is able to flip all rows of the image. Similarly, vertical
+mirroring leaves any partial iMCU row at the bottom edge untouched, but is
+able to flip all columns. The other transforms can be built up as sequences
+of transpose and flip operations; for consistency, their actions on edge
+pixels are defined to be the same as the end result of the corresponding
+transpose-and-flip sequence.
+.IP
+For practical use, you may prefer to discard any untransformable edge pixels
+rather than having a strange-looking strip along the right and/or bottom edges
+of a transformed image. To do this, add the
+.B \-trim
+switch:
+.TP
+.B \-trim
+Drop non-transformable edge blocks.
+.IP
+Obviously, a transformation with
+.B \-trim
+is not reversible, so strictly speaking
+.B jpegtran
+with this switch is not lossless. Also, the expected mathematical
+equivalences between the transformations no longer hold. For example,
+.B \-rot 270 -trim
+trims only the bottom edge, but
+.B \-rot 90 -trim
+followed by
+.B \-rot 180 -trim
+trims both edges.
+.IP
+If you are only interested in perfect transformation, add the
+.B \-perfect
+switch:
+.TP
+.B \-perfect
+Fails with an error if the transformation is not perfect.
+.IP
+For example you may want to do
+.IP
+.B (jpegtran \-rot 90 -perfect
+.I foo.jpg
+.B || djpeg
+.I foo.jpg
+.B | pnmflip \-r90 | cjpeg)
+.IP
+to do a perfect rotation if available or an approximated one if not.
+.PP
+We also offer a lossless-crop option, which discards data outside a given
+image region but losslessly preserves what is inside. Like the rotate and
+flip transforms, lossless crop is restricted by the current JPEG format: the
+upper left corner of the selected region must fall on an iMCU boundary. If
+this does not hold for the given crop parameters, we silently move the upper
+left corner up and/or left to make it so, simultaneously increasing the region
+dimensions to keep the lower right crop corner unchanged. (Thus, the output
+image covers at least the requested region, but may cover more.)
+
+The image can be losslessly cropped by giving the switch:
+.TP
+.B \-crop WxH+X+Y
+Crop to a rectangular subarea of width W, height H starting at point X,Y.
+.PP
+Other not-strictly-lossless transformation switches are:
+.TP
+.B \-grayscale
+Force grayscale output.
+.IP
+This option discards the chrominance channels if the input image is YCbCr
+(ie, a standard color JPEG), resulting in a grayscale JPEG file. The
+luminance channel is preserved exactly, so this is a better method of reducing
+to grayscale than decompression, conversion, and recompression. This switch
+is particularly handy for fixing a monochrome picture that was mistakenly
+encoded as a color JPEG. (In such a case, the space savings from getting rid
+of the near-empty chroma channels won't be large; but the decoding time for
+a grayscale JPEG is substantially less than that for a color JPEG.)
+.TP
+.BI \-scale " M/N"
+Scale the output image by a factor M/N.
+.IP
+Currently supported scale factors are M/N with all M from 1 to 16, where N is
+the source DCT size, which is 8 for baseline JPEG. If the /N part is omitted,
+then M specifies the DCT scaled size to be applied on the given input. For
+baseline JPEG this is equivalent to M/8 scaling, since the source DCT size
+for baseline JPEG is 8.
+.B Caution:
+An implementation of the JPEG SmartScale extension is required for this
+feature. SmartScale enabled JPEG is not yet widely implemented, so many
+decoders will be unable to view a SmartScale extended JPEG file at all.
+.PP
+.B jpegtran
+also recognizes these switches that control what to do with "extra" markers,
+such as comment blocks:
+.TP
+.B \-copy none
+Copy no extra markers from source file. This setting suppresses all
+comments and other excess baggage present in the source file.
+.TP
+.B \-copy comments
+Copy only comment markers. This setting copies comments from the source file,
+but discards any other inessential (for image display) data.
+.TP
+.B \-copy all
+Copy all extra markers. This setting preserves miscellaneous markers
+found in the source file, such as JFIF thumbnails, Exif data, and Photoshop
+settings. In some files these extra markers can be sizable.
+.IP
+The default behavior is
+.BR "\-copy comments" .
+(Note: in IJG releases v6 and v6a,
+.B jpegtran
+always did the equivalent of
+.BR "\-copy none" .)
+.PP
+Additional switches recognized by jpegtran are:
+.TP
+.BI \-maxmemory " N"
+Set limit for amount of memory to use in processing large images. Value is
+in thousands of bytes, or millions of bytes if "M" is attached to the
+number. For example,
+.B \-max 4m
+selects 4000000 bytes. If more space is needed, temporary files will be used.
+.TP
+.BI \-outfile " name"
+Send output image to the named file, not to standard output.
+.TP
+.B \-verbose
+Enable debug printout. More
+.BR \-v 's
+give more output. Also, version information is printed at startup.
+.TP
+.B \-debug
+Same as
+.BR \-verbose .
+.SH EXAMPLES
+.LP
+This example converts a baseline JPEG file to progressive form:
+.IP
+.B jpegtran \-progressive
+.I foo.jpg
+.B >
+.I fooprog.jpg
+.PP
+This example rotates an image 90 degrees clockwise, discarding any
+unrotatable edge pixels:
+.IP
+.B jpegtran \-rot 90 -trim
+.I foo.jpg
+.B >
+.I foo90.jpg
+.SH ENVIRONMENT
+.TP
+.B JPEGMEM
+If this environment variable is set, its value is the default memory limit.
+The value is specified as described for the
+.B \-maxmemory
+switch.
+.B JPEGMEM
+overrides the default value specified when the program was compiled, and
+itself is overridden by an explicit
+.BR \-maxmemory .
+.SH SEE ALSO
+.BR cjpeg (1),
+.BR djpeg (1),
+.BR rdjpgcom (1),
+.BR wrjpgcom (1)
+.br
+Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
+Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
+.SH AUTHOR
+Independent JPEG Group
+.SH BUGS
+The transform options can't transform odd-size images perfectly. Use
+.B \-trim
+or
+.B \-perfect
+if you don't like the results.
+.PP
+The entire image is read into memory and then written out again, even in
+cases where this isn't really necessary. Expect swapping on large images,
+especially when using the more complex transform options.
diff --git a/src/3rdparty/libjpeg/jutils.c b/src/3rdparty/libjpeg/jutils.c
index d18a955562..04351797cd 100644
--- a/src/3rdparty/libjpeg/jutils.c
+++ b/src/3rdparty/libjpeg/jutils.c
@@ -2,6 +2,7 @@
* jutils.c
*
* Copyright (C) 1991-1996, Thomas G. Lane.
+ * Modified 2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -63,6 +64,57 @@ const int jpeg_natural_order[DCTSIZE2+16] = {
63, 63, 63, 63, 63, 63, 63, 63
};
+const int jpeg_natural_order7[7*7+16] = {
+ 0, 1, 8, 16, 9, 2, 3, 10,
+ 17, 24, 32, 25, 18, 11, 4, 5,
+ 12, 19, 26, 33, 40, 48, 41, 34,
+ 27, 20, 13, 6, 14, 21, 28, 35,
+ 42, 49, 50, 43, 36, 29, 22, 30,
+ 37, 44, 51, 52, 45, 38, 46, 53,
+ 54,
+ 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
+ 63, 63, 63, 63, 63, 63, 63, 63
+};
+
+const int jpeg_natural_order6[6*6+16] = {
+ 0, 1, 8, 16, 9, 2, 3, 10,
+ 17, 24, 32, 25, 18, 11, 4, 5,
+ 12, 19, 26, 33, 40, 41, 34, 27,
+ 20, 13, 21, 28, 35, 42, 43, 36,
+ 29, 37, 44, 45,
+ 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
+ 63, 63, 63, 63, 63, 63, 63, 63
+};
+
+const int jpeg_natural_order5[5*5+16] = {
+ 0, 1, 8, 16, 9, 2, 3, 10,
+ 17, 24, 32, 25, 18, 11, 4, 12,
+ 19, 26, 33, 34, 27, 20, 28, 35,
+ 36,
+ 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
+ 63, 63, 63, 63, 63, 63, 63, 63
+};
+
+const int jpeg_natural_order4[4*4+16] = {
+ 0, 1, 8, 16, 9, 2, 3, 10,
+ 17, 24, 25, 18, 11, 19, 26, 27,
+ 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
+ 63, 63, 63, 63, 63, 63, 63, 63
+};
+
+const int jpeg_natural_order3[3*3+16] = {
+ 0, 1, 8, 16, 9, 2, 10, 17,
+ 18,
+ 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
+ 63, 63, 63, 63, 63, 63, 63, 63
+};
+
+const int jpeg_natural_order2[2*2+16] = {
+ 0, 1, 8, 9,
+ 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
+ 63, 63, 63, 63, 63, 63, 63, 63
+};
+
/*
* Arithmetic utilities
diff --git a/src/3rdparty/libjpeg/jversion.h b/src/3rdparty/libjpeg/jversion.h
index 6472c58d35..0c4e6ea6d5 100644
--- a/src/3rdparty/libjpeg/jversion.h
+++ b/src/3rdparty/libjpeg/jversion.h
@@ -1,7 +1,7 @@
/*
* jversion.h
*
- * Copyright (C) 1991-1998, Thomas G. Lane.
+ * Copyright (C) 1991-2010, Thomas G. Lane, Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -9,6 +9,6 @@
*/
-#define JVERSION "6b 27-Mar-1998"
+#define JVERSION "8 10-Jan-2010"
-#define JCOPYRIGHT "Copyright (C) 1998, Thomas G. Lane"
+#define JCOPYRIGHT "Copyright (C) 2010, Thomas G. Lane, Guido Vollbeding"
diff --git a/src/3rdparty/libjpeg/libjpeg.doc b/src/3rdparty/libjpeg/libjpeg.doc
deleted file mode 100644
index 689b206c07..0000000000
--- a/src/3rdparty/libjpeg/libjpeg.doc
+++ /dev/null
@@ -1,3006 +0,0 @@
-USING THE IJG JPEG LIBRARY
-
-Copyright (C) 1994-1998, Thomas G. Lane.
-This file is part of the Independent JPEG Group's software.
-For conditions of distribution and use, see the accompanying README file.
-
-
-This file describes how to use the IJG JPEG library within an application
-program. Read it if you want to write a program that uses the library.
-
-The file example.c provides heavily commented skeleton code for calling the
-JPEG library. Also see jpeglib.h (the include file to be used by application
-programs) for full details about data structures and function parameter lists.
-The library source code, of course, is the ultimate reference.
-
-Note that there have been *major* changes from the application interface
-presented by IJG version 4 and earlier versions. The old design had several
-inherent limitations, and it had accumulated a lot of cruft as we added
-features while trying to minimize application-interface changes. We have
-sacrificed backward compatibility in the version 5 rewrite, but we think the
-improvements justify this.
-
-
-TABLE OF CONTENTS
------------------
-
-Overview:
- Functions provided by the library
- Outline of typical usage
-Basic library usage:
- Data formats
- Compression details
- Decompression details
- Mechanics of usage: include files, linking, etc
-Advanced features:
- Compression parameter selection
- Decompression parameter selection
- Special color spaces
- Error handling
- Compressed data handling (source and destination managers)
- I/O suspension
- Progressive JPEG support
- Buffered-image mode
- Abbreviated datastreams and multiple images
- Special markers
- Raw (downsampled) image data
- Really raw data: DCT coefficients
- Progress monitoring
- Memory management
- Memory usage
- Library compile-time options
- Portability considerations
- Notes for MS-DOS implementors
-
-You should read at least the overview and basic usage sections before trying
-to program with the library. The sections on advanced features can be read
-if and when you need them.
-
-
-OVERVIEW
-========
-
-Functions provided by the library
----------------------------------
-
-The IJG JPEG library provides C code to read and write JPEG-compressed image
-files. The surrounding application program receives or supplies image data a
-scanline at a time, using a straightforward uncompressed image format. All
-details of color conversion and other preprocessing/postprocessing can be
-handled by the library.
-
-The library includes a substantial amount of code that is not covered by the
-JPEG standard but is necessary for typical applications of JPEG. These
-functions preprocess the image before JPEG compression or postprocess it after
-decompression. They include colorspace conversion, downsampling/upsampling,
-and color quantization. The application indirectly selects use of this code
-by specifying the format in which it wishes to supply or receive image data.
-For example, if colormapped output is requested, then the decompression
-library automatically invokes color quantization.
-
-A wide range of quality vs. speed tradeoffs are possible in JPEG processing,
-and even more so in decompression postprocessing. The decompression library
-provides multiple implementations that cover most of the useful tradeoffs,
-ranging from very-high-quality down to fast-preview operation. On the
-compression side we have generally not provided low-quality choices, since
-compression is normally less time-critical. It should be understood that the
-low-quality modes may not meet the JPEG standard's accuracy requirements;
-nonetheless, they are useful for viewers.
-
-A word about functions *not* provided by the library. We handle a subset of
-the ISO JPEG standard; most baseline, extended-sequential, and progressive
-JPEG processes are supported. (Our subset includes all features now in common
-use.) Unsupported ISO options include:
- * Hierarchical storage
- * Lossless JPEG
- * Arithmetic entropy coding (unsupported for legal reasons)
- * DNL marker
- * Nonintegral subsampling ratios
-We support both 8- and 12-bit data precision, but this is a compile-time
-choice rather than a run-time choice; hence it is difficult to use both
-precisions in a single application.
-
-By itself, the library handles only interchange JPEG datastreams --- in
-particular the widely used JFIF file format. The library can be used by
-surrounding code to process interchange or abbreviated JPEG datastreams that
-are embedded in more complex file formats. (For example, this library is
-used by the free LIBTIFF library to support JPEG compression in TIFF.)
-
-
-Outline of typical usage
-------------------------
-
-The rough outline of a JPEG compression operation is:
-
- Allocate and initialize a JPEG compression object
- Specify the destination for the compressed data (eg, a file)
- Set parameters for compression, including image size & colorspace
- jpeg_start_compress(...);
- while (scan lines remain to be written)
- jpeg_write_scanlines(...);
- jpeg_finish_compress(...);
- Release the JPEG compression object
-
-A JPEG compression object holds parameters and working state for the JPEG
-library. We make creation/destruction of the object separate from starting
-or finishing compression of an image; the same object can be re-used for a
-series of image compression operations. This makes it easy to re-use the
-same parameter settings for a sequence of images. Re-use of a JPEG object
-also has important implications for processing abbreviated JPEG datastreams,
-as discussed later.
-
-The image data to be compressed is supplied to jpeg_write_scanlines() from
-in-memory buffers. If the application is doing file-to-file compression,
-reading image data from the source file is the application's responsibility.
-The library emits compressed data by calling a "data destination manager",
-which typically will write the data into a file; but the application can
-provide its own destination manager to do something else.
-
-Similarly, the rough outline of a JPEG decompression operation is:
-
- Allocate and initialize a JPEG decompression object
- Specify the source of the compressed data (eg, a file)
- Call jpeg_read_header() to obtain image info
- Set parameters for decompression
- jpeg_start_decompress(...);
- while (scan lines remain to be read)
- jpeg_read_scanlines(...);
- jpeg_finish_decompress(...);
- Release the JPEG decompression object
-
-This is comparable to the compression outline except that reading the
-datastream header is a separate step. This is helpful because information
-about the image's size, colorspace, etc is available when the application
-selects decompression parameters. For example, the application can choose an
-output scaling ratio that will fit the image into the available screen size.
-
-The decompression library obtains compressed data by calling a data source
-manager, which typically will read the data from a file; but other behaviors
-can be obtained with a custom source manager. Decompressed data is delivered
-into in-memory buffers passed to jpeg_read_scanlines().
-
-It is possible to abort an incomplete compression or decompression operation
-by calling jpeg_abort(); or, if you do not need to retain the JPEG object,
-simply release it by calling jpeg_destroy().
-
-JPEG compression and decompression objects are two separate struct types.
-However, they share some common fields, and certain routines such as
-jpeg_destroy() can work on either type of object.
-
-The JPEG library has no static variables: all state is in the compression
-or decompression object. Therefore it is possible to process multiple
-compression and decompression operations concurrently, using multiple JPEG
-objects.
-
-Both compression and decompression can be done in an incremental memory-to-
-memory fashion, if suitable source/destination managers are used. See the
-section on "I/O suspension" for more details.
-
-
-BASIC LIBRARY USAGE
-===================
-
-Data formats
-------------
-
-Before diving into procedural details, it is helpful to understand the
-image data format that the JPEG library expects or returns.
-
-The standard input image format is a rectangular array of pixels, with each
-pixel having the same number of "component" or "sample" values (color
-channels). You must specify how many components there are and the colorspace
-interpretation of the components. Most applications will use RGB data
-(three components per pixel) or grayscale data (one component per pixel).
-PLEASE NOTE THAT RGB DATA IS THREE SAMPLES PER PIXEL, GRAYSCALE ONLY ONE.
-A remarkable number of people manage to miss this, only to find that their
-programs don't work with grayscale JPEG files.
-
-There is no provision for colormapped input. JPEG files are always full-color
-or full grayscale (or sometimes another colorspace such as CMYK). You can
-feed in a colormapped image by expanding it to full-color format. However
-JPEG often doesn't work very well with source data that has been colormapped,
-because of dithering noise. This is discussed in more detail in the JPEG FAQ
-and the other references mentioned in the README file.
-
-Pixels are stored by scanlines, with each scanline running from left to
-right. The component values for each pixel are adjacent in the row; for
-example, R,G,B,R,G,B,R,G,B,... for 24-bit RGB color. Each scanline is an
-array of data type JSAMPLE --- which is typically "unsigned char", unless
-you've changed jmorecfg.h. (You can also change the RGB pixel layout, say
-to B,G,R order, by modifying jmorecfg.h. But see the restrictions listed in
-that file before doing so.)
-
-A 2-D array of pixels is formed by making a list of pointers to the starts of
-scanlines; so the scanlines need not be physically adjacent in memory. Even
-if you process just one scanline at a time, you must make a one-element
-pointer array to conform to this structure. Pointers to JSAMPLE rows are of
-type JSAMPROW, and the pointer to the pointer array is of type JSAMPARRAY.
-
-The library accepts or supplies one or more complete scanlines per call.
-It is not possible to process part of a row at a time. Scanlines are always
-processed top-to-bottom. You can process an entire image in one call if you
-have it all in memory, but usually it's simplest to process one scanline at
-a time.
-
-For best results, source data values should have the precision specified by
-BITS_IN_JSAMPLE (normally 8 bits). For instance, if you choose to compress
-data that's only 6 bits/channel, you should left-justify each value in a
-byte before passing it to the compressor. If you need to compress data
-that has more than 8 bits/channel, compile with BITS_IN_JSAMPLE = 12.
-(See "Library compile-time options", later.)
-
-
-The data format returned by the decompressor is the same in all details,
-except that colormapped output is supported. (Again, a JPEG file is never
-colormapped. But you can ask the decompressor to perform on-the-fly color
-quantization to deliver colormapped output.) If you request colormapped
-output then the returned data array contains a single JSAMPLE per pixel;
-its value is an index into a color map. The color map is represented as
-a 2-D JSAMPARRAY in which each row holds the values of one color component,
-that is, colormap[i][j] is the value of the i'th color component for pixel
-value (map index) j. Note that since the colormap indexes are stored in
-JSAMPLEs, the maximum number of colors is limited by the size of JSAMPLE
-(ie, at most 256 colors for an 8-bit JPEG library).
-
-
-Compression details
--------------------
-
-Here we revisit the JPEG compression outline given in the overview.
-
-1. Allocate and initialize a JPEG compression object.
-
-A JPEG compression object is a "struct jpeg_compress_struct". (It also has
-a bunch of subsidiary structures which are allocated via malloc(), but the
-application doesn't control those directly.) This struct can be just a local
-variable in the calling routine, if a single routine is going to execute the
-whole JPEG compression sequence. Otherwise it can be static or allocated
-from malloc().
-
-You will also need a structure representing a JPEG error handler. The part
-of this that the library cares about is a "struct jpeg_error_mgr". If you
-are providing your own error handler, you'll typically want to embed the
-jpeg_error_mgr struct in a larger structure; this is discussed later under
-"Error handling". For now we'll assume you are just using the default error
-handler. The default error handler will print JPEG error/warning messages
-on stderr, and it will call exit() if a fatal error occurs.
-
-You must initialize the error handler structure, store a pointer to it into
-the JPEG object's "err" field, and then call jpeg_create_compress() to
-initialize the rest of the JPEG object.
-
-Typical code for this step, if you are using the default error handler, is
-
- struct jpeg_compress_struct cinfo;
- struct jpeg_error_mgr jerr;
- ...
- cinfo.err = jpeg_std_error(&jerr);
- jpeg_create_compress(&cinfo);
-
-jpeg_create_compress allocates a small amount of memory, so it could fail
-if you are out of memory. In that case it will exit via the error handler;
-that's why the error handler must be initialized first.
-
-
-2. Specify the destination for the compressed data (eg, a file).
-
-As previously mentioned, the JPEG library delivers compressed data to a
-"data destination" module. The library includes one data destination
-module which knows how to write to a stdio stream. You can use your own
-destination module if you want to do something else, as discussed later.
-
-If you use the standard destination module, you must open the target stdio
-stream beforehand. Typical code for this step looks like:
-
- FILE * outfile;
- ...
- if ((outfile = fopen(filename, "wb")) == NULL) {
- fprintf(stderr, "can't open %s\n", filename);
- exit(1);
- }
- jpeg_stdio_dest(&cinfo, outfile);
-
-where the last line invokes the standard destination module.
-
-WARNING: it is critical that the binary compressed data be delivered to the
-output file unchanged. On non-Unix systems the stdio library may perform
-newline translation or otherwise corrupt binary data. To suppress this
-behavior, you may need to use a "b" option to fopen (as shown above), or use
-setmode() or another routine to put the stdio stream in binary mode. See
-cjpeg.c and djpeg.c for code that has been found to work on many systems.
-
-You can select the data destination after setting other parameters (step 3),
-if that's more convenient. You may not change the destination between
-calling jpeg_start_compress() and jpeg_finish_compress().
-
-
-3. Set parameters for compression, including image size & colorspace.
-
-You must supply information about the source image by setting the following
-fields in the JPEG object (cinfo structure):
-
- image_width Width of image, in pixels
- image_height Height of image, in pixels
- input_components Number of color channels (samples per pixel)
- in_color_space Color space of source image
-
-The image dimensions are, hopefully, obvious. JPEG supports image dimensions
-of 1 to 64K pixels in either direction. The input color space is typically
-RGB or grayscale, and input_components is 3 or 1 accordingly. (See "Special
-color spaces", later, for more info.) The in_color_space field must be
-assigned one of the J_COLOR_SPACE enum constants, typically JCS_RGB or
-JCS_GRAYSCALE.
-
-JPEG has a large number of compression parameters that determine how the
-image is encoded. Most applications don't need or want to know about all
-these parameters. You can set all the parameters to reasonable defaults by
-calling jpeg_set_defaults(); then, if there are particular values you want
-to change, you can do so after that. The "Compression parameter selection"
-section tells about all the parameters.
-
-You must set in_color_space correctly before calling jpeg_set_defaults(),
-because the defaults depend on the source image colorspace. However the
-other three source image parameters need not be valid until you call
-jpeg_start_compress(). There's no harm in calling jpeg_set_defaults() more
-than once, if that happens to be convenient.
-
-Typical code for a 24-bit RGB source image is
-
- cinfo.image_width = Width; /* image width and height, in pixels */
- cinfo.image_height = Height;
- cinfo.input_components = 3; /* # of color components per pixel */
- cinfo.in_color_space = JCS_RGB; /* colorspace of input image */
-
- jpeg_set_defaults(&cinfo);
- /* Make optional parameter settings here */
-
-
-4. jpeg_start_compress(...);
-
-After you have established the data destination and set all the necessary
-source image info and other parameters, call jpeg_start_compress() to begin
-a compression cycle. This will initialize internal state, allocate working
-storage, and emit the first few bytes of the JPEG datastream header.
-
-Typical code:
-
- jpeg_start_compress(&cinfo, TRUE);
-
-The "TRUE" parameter ensures that a complete JPEG interchange datastream
-will be written. This is appropriate in most cases. If you think you might
-want to use an abbreviated datastream, read the section on abbreviated
-datastreams, below.
-
-Once you have called jpeg_start_compress(), you may not alter any JPEG
-parameters or other fields of the JPEG object until you have completed
-the compression cycle.
-
-
-5. while (scan lines remain to be written)
- jpeg_write_scanlines(...);
-
-Now write all the required image data by calling jpeg_write_scanlines()
-one or more times. You can pass one or more scanlines in each call, up
-to the total image height. In most applications it is convenient to pass
-just one or a few scanlines at a time. The expected format for the passed
-data is discussed under "Data formats", above.
-
-Image data should be written in top-to-bottom scanline order. The JPEG spec
-contains some weasel wording about how top and bottom are application-defined
-terms (a curious interpretation of the English language...) but if you want
-your files to be compatible with everyone else's, you WILL use top-to-bottom
-order. If the source data must be read in bottom-to-top order, you can use
-the JPEG library's virtual array mechanism to invert the data efficiently.
-Examples of this can be found in the sample application cjpeg.
-
-The library maintains a count of the number of scanlines written so far
-in the next_scanline field of the JPEG object. Usually you can just use
-this variable as the loop counter, so that the loop test looks like
-"while (cinfo.next_scanline < cinfo.image_height)".
-
-Code for this step depends heavily on the way that you store the source data.
-example.c shows the following code for the case of a full-size 2-D source
-array containing 3-byte RGB pixels:
-
- JSAMPROW row_pointer[1]; /* pointer to a single row */
- int row_stride; /* physical row width in buffer */
-
- row_stride = image_width * 3; /* JSAMPLEs per row in image_buffer */
-
- while (cinfo.next_scanline < cinfo.image_height) {
- row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride];
- jpeg_write_scanlines(&cinfo, row_pointer, 1);
- }
-
-jpeg_write_scanlines() returns the number of scanlines actually written.
-This will normally be equal to the number passed in, so you can usually
-ignore the return value. It is different in just two cases:
- * If you try to write more scanlines than the declared image height,
- the additional scanlines are ignored.
- * If you use a suspending data destination manager, output buffer overrun
- will cause the compressor to return before accepting all the passed lines.
- This feature is discussed under "I/O suspension", below. The normal
- stdio destination manager will NOT cause this to happen.
-In any case, the return value is the same as the change in the value of
-next_scanline.
-
-
-6. jpeg_finish_compress(...);
-
-After all the image data has been written, call jpeg_finish_compress() to
-complete the compression cycle. This step is ESSENTIAL to ensure that the
-last bufferload of data is written to the data destination.
-jpeg_finish_compress() also releases working memory associated with the JPEG
-object.
-
-Typical code:
-
- jpeg_finish_compress(&cinfo);
-
-If using the stdio destination manager, don't forget to close the output
-stdio stream (if necessary) afterwards.
-
-If you have requested a multi-pass operating mode, such as Huffman code
-optimization, jpeg_finish_compress() will perform the additional passes using
-data buffered by the first pass. In this case jpeg_finish_compress() may take
-quite a while to complete. With the default compression parameters, this will
-not happen.
-
-It is an error to call jpeg_finish_compress() before writing the necessary
-total number of scanlines. If you wish to abort compression, call
-jpeg_abort() as discussed below.
-
-After completing a compression cycle, you may dispose of the JPEG object
-as discussed next, or you may use it to compress another image. In that case
-return to step 2, 3, or 4 as appropriate. If you do not change the
-destination manager, the new datastream will be written to the same target.
-If you do not change any JPEG parameters, the new datastream will be written
-with the same parameters as before. Note that you can change the input image
-dimensions freely between cycles, but if you change the input colorspace, you
-should call jpeg_set_defaults() to adjust for the new colorspace; and then
-you'll need to repeat all of step 3.
-
-
-7. Release the JPEG compression object.
-
-When you are done with a JPEG compression object, destroy it by calling
-jpeg_destroy_compress(). This will free all subsidiary memory (regardless of
-the previous state of the object). Or you can call jpeg_destroy(), which
-works for either compression or decompression objects --- this may be more
-convenient if you are sharing code between compression and decompression
-cases. (Actually, these routines are equivalent except for the declared type
-of the passed pointer. To avoid gripes from ANSI C compilers, jpeg_destroy()
-should be passed a j_common_ptr.)
-
-If you allocated the jpeg_compress_struct structure from malloc(), freeing
-it is your responsibility --- jpeg_destroy() won't. Ditto for the error
-handler structure.
-
-Typical code:
-
- jpeg_destroy_compress(&cinfo);
-
-
-8. Aborting.
-
-If you decide to abort a compression cycle before finishing, you can clean up
-in either of two ways:
-
-* If you don't need the JPEG object any more, just call
- jpeg_destroy_compress() or jpeg_destroy() to release memory. This is
- legitimate at any point after calling jpeg_create_compress() --- in fact,
- it's safe even if jpeg_create_compress() fails.
-
-* If you want to re-use the JPEG object, call jpeg_abort_compress(), or call
- jpeg_abort() which works on both compression and decompression objects.
- This will return the object to an idle state, releasing any working memory.
- jpeg_abort() is allowed at any time after successful object creation.
-
-Note that cleaning up the data destination, if required, is your
-responsibility; neither of these routines will call term_destination().
-(See "Compressed data handling", below, for more about that.)
-
-jpeg_destroy() and jpeg_abort() are the only safe calls to make on a JPEG
-object that has reported an error by calling error_exit (see "Error handling"
-for more info). The internal state of such an object is likely to be out of
-whack. Either of these two routines will return the object to a known state.
-
-
-Decompression details
----------------------
-
-Here we revisit the JPEG decompression outline given in the overview.
-
-1. Allocate and initialize a JPEG decompression object.
-
-This is just like initialization for compression, as discussed above,
-except that the object is a "struct jpeg_decompress_struct" and you
-call jpeg_create_decompress(). Error handling is exactly the same.
-
-Typical code:
-
- struct jpeg_decompress_struct cinfo;
- struct jpeg_error_mgr jerr;
- ...
- cinfo.err = jpeg_std_error(&jerr);
- jpeg_create_decompress(&cinfo);
-
-(Both here and in the IJG code, we usually use variable name "cinfo" for
-both compression and decompression objects.)
-
-
-2. Specify the source of the compressed data (eg, a file).
-
-As previously mentioned, the JPEG library reads compressed data from a "data
-source" module. The library includes one data source module which knows how
-to read from a stdio stream. You can use your own source module if you want
-to do something else, as discussed later.
-
-If you use the standard source module, you must open the source stdio stream
-beforehand. Typical code for this step looks like:
-
- FILE * infile;
- ...
- if ((infile = fopen(filename, "rb")) == NULL) {
- fprintf(stderr, "can't open %s\n", filename);
- exit(1);
- }
- jpeg_stdio_src(&cinfo, infile);
-
-where the last line invokes the standard source module.
-
-WARNING: it is critical that the binary compressed data be read unchanged.
-On non-Unix systems the stdio library may perform newline translation or
-otherwise corrupt binary data. To suppress this behavior, you may need to use
-a "b" option to fopen (as shown above), or use setmode() or another routine to
-put the stdio stream in binary mode. See cjpeg.c and djpeg.c for code that
-has been found to work on many systems.
-
-You may not change the data source between calling jpeg_read_header() and
-jpeg_finish_decompress(). If you wish to read a series of JPEG images from
-a single source file, you should repeat the jpeg_read_header() to
-jpeg_finish_decompress() sequence without reinitializing either the JPEG
-object or the data source module; this prevents buffered input data from
-being discarded.
-
-
-3. Call jpeg_read_header() to obtain image info.
-
-Typical code for this step is just
-
- jpeg_read_header(&cinfo, TRUE);
-
-This will read the source datastream header markers, up to the beginning
-of the compressed data proper. On return, the image dimensions and other
-info have been stored in the JPEG object. The application may wish to
-consult this information before selecting decompression parameters.
-
-More complex code is necessary if
- * A suspending data source is used --- in that case jpeg_read_header()
- may return before it has read all the header data. See "I/O suspension",
- below. The normal stdio source manager will NOT cause this to happen.
- * Abbreviated JPEG files are to be processed --- see the section on
- abbreviated datastreams. Standard applications that deal only in
- interchange JPEG files need not be concerned with this case either.
-
-It is permissible to stop at this point if you just wanted to find out the
-image dimensions and other header info for a JPEG file. In that case,
-call jpeg_destroy() when you are done with the JPEG object, or call
-jpeg_abort() to return it to an idle state before selecting a new data
-source and reading another header.
-
-
-4. Set parameters for decompression.
-
-jpeg_read_header() sets appropriate default decompression parameters based on
-the properties of the image (in particular, its colorspace). However, you
-may well want to alter these defaults before beginning the decompression.
-For example, the default is to produce full color output from a color file.
-If you want colormapped output you must ask for it. Other options allow the
-returned image to be scaled and allow various speed/quality tradeoffs to be
-selected. "Decompression parameter selection", below, gives details.
-
-If the defaults are appropriate, nothing need be done at this step.
-
-Note that all default values are set by each call to jpeg_read_header().
-If you reuse a decompression object, you cannot expect your parameter
-settings to be preserved across cycles, as you can for compression.
-You must set desired parameter values each time.
-
-
-5. jpeg_start_decompress(...);
-
-Once the parameter values are satisfactory, call jpeg_start_decompress() to
-begin decompression. This will initialize internal state, allocate working
-memory, and prepare for returning data.
-
-Typical code is just
-
- jpeg_start_decompress(&cinfo);
-
-If you have requested a multi-pass operating mode, such as 2-pass color
-quantization, jpeg_start_decompress() will do everything needed before data
-output can begin. In this case jpeg_start_decompress() may take quite a while
-to complete. With a single-scan (non progressive) JPEG file and default
-decompression parameters, this will not happen; jpeg_start_decompress() will
-return quickly.
-
-After this call, the final output image dimensions, including any requested
-scaling, are available in the JPEG object; so is the selected colormap, if
-colormapped output has been requested. Useful fields include
-
- output_width image width and height, as scaled
- output_height
- out_color_components # of color components in out_color_space
- output_components # of color components returned per pixel
- colormap the selected colormap, if any
- actual_number_of_colors number of entries in colormap
-
-output_components is 1 (a colormap index) when quantizing colors; otherwise it
-equals out_color_components. It is the number of JSAMPLE values that will be
-emitted per pixel in the output arrays.
-
-Typically you will need to allocate data buffers to hold the incoming image.
-You will need output_width * output_components JSAMPLEs per scanline in your
-output buffer, and a total of output_height scanlines will be returned.
-
-Note: if you are using the JPEG library's internal memory manager to allocate
-data buffers (as djpeg does), then the manager's protocol requires that you
-request large buffers *before* calling jpeg_start_decompress(). This is a
-little tricky since the output_XXX fields are not normally valid then. You
-can make them valid by calling jpeg_calc_output_dimensions() after setting the
-relevant parameters (scaling, output color space, and quantization flag).
-
-
-6. while (scan lines remain to be read)
- jpeg_read_scanlines(...);
-
-Now you can read the decompressed image data by calling jpeg_read_scanlines()
-one or more times. At each call, you pass in the maximum number of scanlines
-to be read (ie, the height of your working buffer); jpeg_read_scanlines()
-will return up to that many lines. The return value is the number of lines
-actually read. The format of the returned data is discussed under "Data
-formats", above. Don't forget that grayscale and color JPEGs will return
-different data formats!
-
-Image data is returned in top-to-bottom scanline order. If you must write
-out the image in bottom-to-top order, you can use the JPEG library's virtual
-array mechanism to invert the data efficiently. Examples of this can be
-found in the sample application djpeg.
-
-The library maintains a count of the number of scanlines returned so far
-in the output_scanline field of the JPEG object. Usually you can just use
-this variable as the loop counter, so that the loop test looks like
-"while (cinfo.output_scanline < cinfo.output_height)". (Note that the test
-should NOT be against image_height, unless you never use scaling. The
-image_height field is the height of the original unscaled image.)
-The return value always equals the change in the value of output_scanline.
-
-If you don't use a suspending data source, it is safe to assume that
-jpeg_read_scanlines() reads at least one scanline per call, until the
-bottom of the image has been reached.
-
-If you use a buffer larger than one scanline, it is NOT safe to assume that
-jpeg_read_scanlines() fills it. (The current implementation returns only a
-few scanlines per call, no matter how large a buffer you pass.) So you must
-always provide a loop that calls jpeg_read_scanlines() repeatedly until the
-whole image has been read.
-
-
-7. jpeg_finish_decompress(...);
-
-After all the image data has been read, call jpeg_finish_decompress() to
-complete the decompression cycle. This causes working memory associated
-with the JPEG object to be released.
-
-Typical code:
-
- jpeg_finish_decompress(&cinfo);
-
-If using the stdio source manager, don't forget to close the source stdio
-stream if necessary.
-
-It is an error to call jpeg_finish_decompress() before reading the correct
-total number of scanlines. If you wish to abort decompression, call
-jpeg_abort() as discussed below.
-
-After completing a decompression cycle, you may dispose of the JPEG object as
-discussed next, or you may use it to decompress another image. In that case
-return to step 2 or 3 as appropriate. If you do not change the source
-manager, the next image will be read from the same source.
-
-
-8. Release the JPEG decompression object.
-
-When you are done with a JPEG decompression object, destroy it by calling
-jpeg_destroy_decompress() or jpeg_destroy(). The previous discussion of
-destroying compression objects applies here too.
-
-Typical code:
-
- jpeg_destroy_decompress(&cinfo);
-
-
-9. Aborting.
-
-You can abort a decompression cycle by calling jpeg_destroy_decompress() or
-jpeg_destroy() if you don't need the JPEG object any more, or
-jpeg_abort_decompress() or jpeg_abort() if you want to reuse the object.
-The previous discussion of aborting compression cycles applies here too.
-
-
-Mechanics of usage: include files, linking, etc
------------------------------------------------
-
-Applications using the JPEG library should include the header file jpeglib.h
-to obtain declarations of data types and routines. Before including
-jpeglib.h, include system headers that define at least the typedefs FILE and
-size_t. On ANSI-conforming systems, including <stdio.h> is sufficient; on
-older Unix systems, you may need <sys/types.h> to define size_t.
-
-If the application needs to refer to individual JPEG library error codes, also
-include jerror.h to define those symbols.
-
-jpeglib.h indirectly includes the files jconfig.h and jmorecfg.h. If you are
-installing the JPEG header files in a system directory, you will want to
-install all four files: jpeglib.h, jerror.h, jconfig.h, jmorecfg.h.
-
-The most convenient way to include the JPEG code into your executable program
-is to prepare a library file ("libjpeg.a", or a corresponding name on non-Unix
-machines) and reference it at your link step. If you use only half of the
-library (only compression or only decompression), only that much code will be
-included from the library, unless your linker is hopelessly brain-damaged.
-The supplied makefiles build libjpeg.a automatically (see install.doc).
-
-While you can build the JPEG library as a shared library if the whim strikes
-you, we don't really recommend it. The trouble with shared libraries is that
-at some point you'll probably try to substitute a new version of the library
-without recompiling the calling applications. That generally doesn't work
-because the parameter struct declarations usually change with each new
-version. In other words, the library's API is *not* guaranteed binary
-compatible across versions; we only try to ensure source-code compatibility.
-(In hindsight, it might have been smarter to hide the parameter structs from
-applications and introduce a ton of access functions instead. Too late now,
-however.)
-
-On some systems your application may need to set up a signal handler to ensure
-that temporary files are deleted if the program is interrupted. This is most
-critical if you are on MS-DOS and use the jmemdos.c memory manager back end;
-it will try to grab extended memory for temp files, and that space will NOT be
-freed automatically. See cjpeg.c or djpeg.c for an example signal handler.
-
-It may be worth pointing out that the core JPEG library does not actually
-require the stdio library: only the default source/destination managers and
-error handler need it. You can use the library in a stdio-less environment
-if you replace those modules and use jmemnobs.c (or another memory manager of
-your own devising). More info about the minimum system library requirements
-may be found in jinclude.h.
-
-
-ADVANCED FEATURES
-=================
-
-Compression parameter selection
--------------------------------
-
-This section describes all the optional parameters you can set for JPEG
-compression, as well as the "helper" routines provided to assist in this
-task. Proper setting of some parameters requires detailed understanding
-of the JPEG standard; if you don't know what a parameter is for, it's best
-not to mess with it! See REFERENCES in the README file for pointers to
-more info about JPEG.
-
-It's a good idea to call jpeg_set_defaults() first, even if you plan to set
-all the parameters; that way your code is more likely to work with future JPEG
-libraries that have additional parameters. For the same reason, we recommend
-you use a helper routine where one is provided, in preference to twiddling
-cinfo fields directly.
-
-The helper routines are:
-
-jpeg_set_defaults (j_compress_ptr cinfo)
- This routine sets all JPEG parameters to reasonable defaults, using
- only the input image's color space (field in_color_space, which must
- already be set in cinfo). Many applications will only need to use
- this routine and perhaps jpeg_set_quality().
-
-jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace)
- Sets the JPEG file's colorspace (field jpeg_color_space) as specified,
- and sets other color-space-dependent parameters appropriately. See
- "Special color spaces", below, before using this. A large number of
- parameters, including all per-component parameters, are set by this
- routine; if you want to twiddle individual parameters you should call
- jpeg_set_colorspace() before rather than after.
-
-jpeg_default_colorspace (j_compress_ptr cinfo)
- Selects an appropriate JPEG colorspace based on cinfo->in_color_space,
- and calls jpeg_set_colorspace(). This is actually a subroutine of
- jpeg_set_defaults(). It's broken out in case you want to change
- just the colorspace-dependent JPEG parameters.
-
-jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline)
- Constructs JPEG quantization tables appropriate for the indicated
- quality setting. The quality value is expressed on the 0..100 scale
- recommended by IJG (cjpeg's "-quality" switch uses this routine).
- Note that the exact mapping from quality values to tables may change
- in future IJG releases as more is learned about DCT quantization.
- If the force_baseline parameter is TRUE, then the quantization table
- entries are constrained to the range 1..255 for full JPEG baseline
- compatibility. In the current implementation, this only makes a
- difference for quality settings below 25, and it effectively prevents
- very small/low quality files from being generated. The IJG decoder
- is capable of reading the non-baseline files generated at low quality
- settings when force_baseline is FALSE, but other decoders may not be.
-
-jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,
- boolean force_baseline)
- Same as jpeg_set_quality() except that the generated tables are the
- sample tables given in the JPEC spec section K.1, multiplied by the
- specified scale factor (which is expressed as a percentage; thus
- scale_factor = 100 reproduces the spec's tables). Note that larger
- scale factors give lower quality. This entry point is useful for
- conforming to the Adobe PostScript DCT conventions, but we do not
- recommend linear scaling as a user-visible quality scale otherwise.
- force_baseline again constrains the computed table entries to 1..255.
-
-int jpeg_quality_scaling (int quality)
- Converts a value on the IJG-recommended quality scale to a linear
- scaling percentage. Note that this routine may change or go away
- in future releases --- IJG may choose to adopt a scaling method that
- can't be expressed as a simple scalar multiplier, in which case the
- premise of this routine collapses. Caveat user.
-
-jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
- const unsigned int *basic_table,
- int scale_factor, boolean force_baseline)
- Allows an arbitrary quantization table to be created. which_tbl
- indicates which table slot to fill. basic_table points to an array
- of 64 unsigned ints given in normal array order. These values are
- multiplied by scale_factor/100 and then clamped to the range 1..65535
- (or to 1..255 if force_baseline is TRUE).
- CAUTION: prior to library version 6a, jpeg_add_quant_table expected
- the basic table to be given in JPEG zigzag order. If you need to
- write code that works with either older or newer versions of this
- routine, you must check the library version number. Something like
- "#if JPEG_LIB_VERSION >= 61" is the right test.
-
-jpeg_simple_progression (j_compress_ptr cinfo)
- Generates a default scan script for writing a progressive-JPEG file.
- This is the recommended method of creating a progressive file,
- unless you want to make a custom scan sequence. You must ensure that
- the JPEG color space is set correctly before calling this routine.
-
-
-Compression parameters (cinfo fields) include:
-
-J_DCT_METHOD dct_method
- Selects the algorithm used for the DCT step. Choices are:
- JDCT_ISLOW: slow but accurate integer algorithm
- JDCT_IFAST: faster, less accurate integer method
- JDCT_FLOAT: floating-point method
- JDCT_DEFAULT: default method (normally JDCT_ISLOW)
- JDCT_FASTEST: fastest method (normally JDCT_IFAST)
- The FLOAT method is very slightly more accurate than the ISLOW method,
- but may give different results on different machines due to varying
- roundoff behavior. The integer methods should give the same results
- on all machines. On machines with sufficiently fast FP hardware, the
- floating-point method may also be the fastest. The IFAST method is
- considerably less accurate than the other two; its use is not
- recommended if high quality is a concern. JDCT_DEFAULT and
- JDCT_FASTEST are macros configurable by each installation.
-
-J_COLOR_SPACE jpeg_color_space
-int num_components
- The JPEG color space and corresponding number of components; see
- "Special color spaces", below, for more info. We recommend using
- jpeg_set_color_space() if you want to change these.
-
-boolean optimize_coding
- TRUE causes the compressor to compute optimal Huffman coding tables
- for the image. This requires an extra pass over the data and
- therefore costs a good deal of space and time. The default is
- FALSE, which tells the compressor to use the supplied or default
- Huffman tables. In most cases optimal tables save only a few percent
- of file size compared to the default tables. Note that when this is
- TRUE, you need not supply Huffman tables at all, and any you do
- supply will be overwritten.
-
-unsigned int restart_interval
-int restart_in_rows
- To emit restart markers in the JPEG file, set one of these nonzero.
- Set restart_interval to specify the exact interval in MCU blocks.
- Set restart_in_rows to specify the interval in MCU rows. (If
- restart_in_rows is not 0, then restart_interval is set after the
- image width in MCUs is computed.) Defaults are zero (no restarts).
- One restart marker per MCU row is often a good choice.
- NOTE: the overhead of restart markers is higher in grayscale JPEG
- files than in color files, and MUCH higher in progressive JPEGs.
- If you use restarts, you may want to use larger intervals in those
- cases.
-
-const jpeg_scan_info * scan_info
-int num_scans
- By default, scan_info is NULL; this causes the compressor to write a
- single-scan sequential JPEG file. If not NULL, scan_info points to
- an array of scan definition records of length num_scans. The
- compressor will then write a JPEG file having one scan for each scan
- definition record. This is used to generate noninterleaved or
- progressive JPEG files. The library checks that the scan array
- defines a valid JPEG scan sequence. (jpeg_simple_progression creates
- a suitable scan definition array for progressive JPEG.) This is
- discussed further under "Progressive JPEG support".
-
-int smoothing_factor
- If non-zero, the input image is smoothed; the value should be 1 for
- minimal smoothing to 100 for maximum smoothing. Consult jcsample.c
- for details of the smoothing algorithm. The default is zero.
-
-boolean write_JFIF_header
- If TRUE, a JFIF APP0 marker is emitted. jpeg_set_defaults() and
- jpeg_set_colorspace() set this TRUE if a JFIF-legal JPEG color space
- (ie, YCbCr or grayscale) is selected, otherwise FALSE.
-
-UINT8 JFIF_major_version
-UINT8 JFIF_minor_version
- The version number to be written into the JFIF marker.
- jpeg_set_defaults() initializes the version to 1.01 (major=minor=1).
- You should set it to 1.02 (major=1, minor=2) if you plan to write
- any JFIF 1.02 extension markers.
-
-UINT8 density_unit
-UINT16 X_density
-UINT16 Y_density
- The resolution information to be written into the JFIF marker;
- not used otherwise. density_unit may be 0 for unknown,
- 1 for dots/inch, or 2 for dots/cm. The default values are 0,1,1
- indicating square pixels of unknown size.
-
-boolean write_Adobe_marker
- If TRUE, an Adobe APP14 marker is emitted. jpeg_set_defaults() and
- jpeg_set_colorspace() set this TRUE if JPEG color space RGB, CMYK,
- or YCCK is selected, otherwise FALSE. It is generally a bad idea
- to set both write_JFIF_header and write_Adobe_marker. In fact,
- you probably shouldn't change the default settings at all --- the
- default behavior ensures that the JPEG file's color space can be
- recognized by the decoder.
-
-JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]
- Pointers to coefficient quantization tables, one per table slot,
- or NULL if no table is defined for a slot. Usually these should
- be set via one of the above helper routines; jpeg_add_quant_table()
- is general enough to define any quantization table. The other
- routines will set up table slot 0 for luminance quality and table
- slot 1 for chrominance.
-
-JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]
-JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]
- Pointers to Huffman coding tables, one per table slot, or NULL if
- no table is defined for a slot. Slots 0 and 1 are filled with the
- JPEG sample tables by jpeg_set_defaults(). If you need to allocate
- more table structures, jpeg_alloc_huff_table() may be used.
- Note that optimal Huffman tables can be computed for an image
- by setting optimize_coding, as discussed above; there's seldom
- any need to mess with providing your own Huffman tables.
-
-There are some additional cinfo fields which are not documented here
-because you currently can't change them; for example, you can't set
-arith_code TRUE because arithmetic coding is unsupported.
-
-
-Per-component parameters are stored in the struct cinfo.comp_info[i] for
-component number i. Note that components here refer to components of the
-JPEG color space, *not* the source image color space. A suitably large
-comp_info[] array is allocated by jpeg_set_defaults(); if you choose not
-to use that routine, it's up to you to allocate the array.
-
-int component_id
- The one-byte identifier code to be recorded in the JPEG file for
- this component. For the standard color spaces, we recommend you
- leave the default values alone.
-
-int h_samp_factor
-int v_samp_factor
- Horizontal and vertical sampling factors for the component; must
- be 1..4 according to the JPEG standard. Note that larger sampling
- factors indicate a higher-resolution component; many people find
- this behavior quite unintuitive. The default values are 2,2 for
- luminance components and 1,1 for chrominance components, except
- for grayscale where 1,1 is used.
-
-int quant_tbl_no
- Quantization table number for component. The default value is
- 0 for luminance components and 1 for chrominance components.
-
-int dc_tbl_no
-int ac_tbl_no
- DC and AC entropy coding table numbers. The default values are
- 0 for luminance components and 1 for chrominance components.
-
-int component_index
- Must equal the component's index in comp_info[]. (Beginning in
- release v6, the compressor library will fill this in automatically;
- you don't have to.)
-
-
-Decompression parameter selection
----------------------------------
-
-Decompression parameter selection is somewhat simpler than compression
-parameter selection, since all of the JPEG internal parameters are
-recorded in the source file and need not be supplied by the application.
-(Unless you are working with abbreviated files, in which case see
-"Abbreviated datastreams", below.) Decompression parameters control
-the postprocessing done on the image to deliver it in a format suitable
-for the application's use. Many of the parameters control speed/quality
-tradeoffs, in which faster decompression may be obtained at the price of
-a poorer-quality image. The defaults select the highest quality (slowest)
-processing.
-
-The following fields in the JPEG object are set by jpeg_read_header() and
-may be useful to the application in choosing decompression parameters:
-
-JDIMENSION image_width Width and height of image
-JDIMENSION image_height
-int num_components Number of color components
-J_COLOR_SPACE jpeg_color_space Colorspace of image
-boolean saw_JFIF_marker TRUE if a JFIF APP0 marker was seen
- UINT8 JFIF_major_version Version information from JFIF marker
- UINT8 JFIF_minor_version
- UINT8 density_unit Resolution data from JFIF marker
- UINT16 X_density
- UINT16 Y_density
-boolean saw_Adobe_marker TRUE if an Adobe APP14 marker was seen
- UINT8 Adobe_transform Color transform code from Adobe marker
-
-The JPEG color space, unfortunately, is something of a guess since the JPEG
-standard proper does not provide a way to record it. In practice most files
-adhere to the JFIF or Adobe conventions, and the decoder will recognize these
-correctly. See "Special color spaces", below, for more info.
-
-
-The decompression parameters that determine the basic properties of the
-returned image are:
-
-J_COLOR_SPACE out_color_space
- Output color space. jpeg_read_header() sets an appropriate default
- based on jpeg_color_space; typically it will be RGB or grayscale.
- The application can change this field to request output in a different
- colorspace. For example, set it to JCS_GRAYSCALE to get grayscale
- output from a color file. (This is useful for previewing: grayscale
- output is faster than full color since the color components need not
- be processed.) Note that not all possible color space transforms are
- currently implemented; you may need to extend jdcolor.c if you want an
- unusual conversion.
-
-unsigned int scale_num, scale_denom
- Scale the image by the fraction scale_num/scale_denom. Default is
- 1/1, or no scaling. Currently, the only supported scaling ratios
- are 1/1, 1/2, 1/4, and 1/8. (The library design allows for arbitrary
- scaling ratios but this is not likely to be implemented any time soon.)
- Smaller scaling ratios permit significantly faster decoding since
- fewer pixels need be processed and a simpler IDCT method can be used.
-
-boolean quantize_colors
- If set TRUE, colormapped output will be delivered. Default is FALSE,
- meaning that full-color output will be delivered.
-
-The next three parameters are relevant only if quantize_colors is TRUE.
-
-int desired_number_of_colors
- Maximum number of colors to use in generating a library-supplied color
- map (the actual number of colors is returned in a different field).
- Default 256. Ignored when the application supplies its own color map.
-
-boolean two_pass_quantize
- If TRUE, an extra pass over the image is made to select a custom color
- map for the image. This usually looks a lot better than the one-size-
- fits-all colormap that is used otherwise. Default is TRUE. Ignored
- when the application supplies its own color map.
-
-J_DITHER_MODE dither_mode
- Selects color dithering method. Supported values are:
- JDITHER_NONE no dithering: fast, very low quality
- JDITHER_ORDERED ordered dither: moderate speed and quality
- JDITHER_FS Floyd-Steinberg dither: slow, high quality
- Default is JDITHER_FS. (At present, ordered dither is implemented
- only in the single-pass, standard-colormap case. If you ask for
- ordered dither when two_pass_quantize is TRUE or when you supply
- an external color map, you'll get F-S dithering.)
-
-When quantize_colors is TRUE, the target color map is described by the next
-two fields. colormap is set to NULL by jpeg_read_header(). The application
-can supply a color map by setting colormap non-NULL and setting
-actual_number_of_colors to the map size. Otherwise, jpeg_start_decompress()
-selects a suitable color map and sets these two fields itself.
-[Implementation restriction: at present, an externally supplied colormap is
-only accepted for 3-component output color spaces.]
-
-JSAMPARRAY colormap
- The color map, represented as a 2-D pixel array of out_color_components
- rows and actual_number_of_colors columns. Ignored if not quantizing.
- CAUTION: if the JPEG library creates its own colormap, the storage
- pointed to by this field is released by jpeg_finish_decompress().
- Copy the colormap somewhere else first, if you want to save it.
-
-int actual_number_of_colors
- The number of colors in the color map.
-
-Additional decompression parameters that the application may set include:
-
-J_DCT_METHOD dct_method
- Selects the algorithm used for the DCT step. Choices are the same
- as described above for compression.
-
-boolean do_fancy_upsampling
- If TRUE, do careful upsampling of chroma components. If FALSE,
- a faster but sloppier method is used. Default is TRUE. The visual
- impact of the sloppier method is often very small.
-
-boolean do_block_smoothing
- If TRUE, interblock smoothing is applied in early stages of decoding
- progressive JPEG files; if FALSE, not. Default is TRUE. Early
- progression stages look "fuzzy" with smoothing, "blocky" without.
- In any case, block smoothing ceases to be applied after the first few
- AC coefficients are known to full accuracy, so it is relevant only
- when using buffered-image mode for progressive images.
-
-boolean enable_1pass_quant
-boolean enable_external_quant
-boolean enable_2pass_quant
- These are significant only in buffered-image mode, which is
- described in its own section below.
-
-
-The output image dimensions are given by the following fields. These are
-computed from the source image dimensions and the decompression parameters
-by jpeg_start_decompress(). You can also call jpeg_calc_output_dimensions()
-to obtain the values that will result from the current parameter settings.
-This can be useful if you are trying to pick a scaling ratio that will get
-close to a desired target size. It's also important if you are using the
-JPEG library's memory manager to allocate output buffer space, because you
-are supposed to request such buffers *before* jpeg_start_decompress().
-
-JDIMENSION output_width Actual dimensions of output image.
-JDIMENSION output_height
-int out_color_components Number of color components in out_color_space.
-int output_components Number of color components returned.
-int rec_outbuf_height Recommended height of scanline buffer.
-
-When quantizing colors, output_components is 1, indicating a single color map
-index per pixel. Otherwise it equals out_color_components. The output arrays
-are required to be output_width * output_components JSAMPLEs wide.
-
-rec_outbuf_height is the recommended minimum height (in scanlines) of the
-buffer passed to jpeg_read_scanlines(). If the buffer is smaller, the
-library will still work, but time will be wasted due to unnecessary data
-copying. In high-quality modes, rec_outbuf_height is always 1, but some
-faster, lower-quality modes set it to larger values (typically 2 to 4).
-If you are going to ask for a high-speed processing mode, you may as well
-go to the trouble of honoring rec_outbuf_height so as to avoid data copying.
-(An output buffer larger than rec_outbuf_height lines is OK, but won't
-provide any material speed improvement over that height.)
-
-
-Special color spaces
---------------------
-
-The JPEG standard itself is "color blind" and doesn't specify any particular
-color space. It is customary to convert color data to a luminance/chrominance
-color space before compressing, since this permits greater compression. The
-existing de-facto JPEG file format standards specify YCbCr or grayscale data
-(JFIF), or grayscale, RGB, YCbCr, CMYK, or YCCK (Adobe). For special
-applications such as multispectral images, other color spaces can be used,
-but it must be understood that such files will be unportable.
-
-The JPEG library can handle the most common colorspace conversions (namely
-RGB <=> YCbCr and CMYK <=> YCCK). It can also deal with data of an unknown
-color space, passing it through without conversion. If you deal extensively
-with an unusual color space, you can easily extend the library to understand
-additional color spaces and perform appropriate conversions.
-
-For compression, the source data's color space is specified by field
-in_color_space. This is transformed to the JPEG file's color space given
-by jpeg_color_space. jpeg_set_defaults() chooses a reasonable JPEG color
-space depending on in_color_space, but you can override this by calling
-jpeg_set_colorspace(). Of course you must select a supported transformation.
-jccolor.c currently supports the following transformations:
- RGB => YCbCr
- RGB => GRAYSCALE
- YCbCr => GRAYSCALE
- CMYK => YCCK
-plus the null transforms: GRAYSCALE => GRAYSCALE, RGB => RGB,
-YCbCr => YCbCr, CMYK => CMYK, YCCK => YCCK, and UNKNOWN => UNKNOWN.
-
-The de-facto file format standards (JFIF and Adobe) specify APPn markers that
-indicate the color space of the JPEG file. It is important to ensure that
-these are written correctly, or omitted if the JPEG file's color space is not
-one of the ones supported by the de-facto standards. jpeg_set_colorspace()
-will set the compression parameters to include or omit the APPn markers
-properly, so long as it is told the truth about the JPEG color space.
-For example, if you are writing some random 3-component color space without
-conversion, don't try to fake out the library by setting in_color_space and
-jpeg_color_space to JCS_YCbCr; use JCS_UNKNOWN. You may want to write an
-APPn marker of your own devising to identify the colorspace --- see "Special
-markers", below.
-
-When told that the color space is UNKNOWN, the library will default to using
-luminance-quality compression parameters for all color components. You may
-well want to change these parameters. See the source code for
-jpeg_set_colorspace(), in jcparam.c, for details.
-
-For decompression, the JPEG file's color space is given in jpeg_color_space,
-and this is transformed to the output color space out_color_space.
-jpeg_read_header's setting of jpeg_color_space can be relied on if the file
-conforms to JFIF or Adobe conventions, but otherwise it is no better than a
-guess. If you know the JPEG file's color space for certain, you can override
-jpeg_read_header's guess by setting jpeg_color_space. jpeg_read_header also
-selects a default output color space based on (its guess of) jpeg_color_space;
-set out_color_space to override this. Again, you must select a supported
-transformation. jdcolor.c currently supports
- YCbCr => GRAYSCALE
- YCbCr => RGB
- GRAYSCALE => RGB
- YCCK => CMYK
-as well as the null transforms. (Since GRAYSCALE=>RGB is provided, an
-application can force grayscale JPEGs to look like color JPEGs if it only
-wants to handle one case.)
-
-The two-pass color quantizer, jquant2.c, is specialized to handle RGB data
-(it weights distances appropriately for RGB colors). You'll need to modify
-the code if you want to use it for non-RGB output color spaces. Note that
-jquant2.c is used to map to an application-supplied colormap as well as for
-the normal two-pass colormap selection process.
-
-CAUTION: it appears that Adobe Photoshop writes inverted data in CMYK JPEG
-files: 0 represents 100% ink coverage, rather than 0% ink as you'd expect.
-This is arguably a bug in Photoshop, but if you need to work with Photoshop
-CMYK files, you will have to deal with it in your application. We cannot
-"fix" this in the library by inverting the data during the CMYK<=>YCCK
-transform, because that would break other applications, notably Ghostscript.
-Photoshop versions prior to 3.0 write EPS files containing JPEG-encoded CMYK
-data in the same inverted-YCCK representation used in bare JPEG files, but
-the surrounding PostScript code performs an inversion using the PS image
-operator. I am told that Photoshop 3.0 will write uninverted YCCK in
-EPS/JPEG files, and will omit the PS-level inversion. (But the data
-polarity used in bare JPEG files will not change in 3.0.) In either case,
-the JPEG library must not invert the data itself, or else Ghostscript would
-read these EPS files incorrectly.
-
-
-Error handling
---------------
-
-When the default error handler is used, any error detected inside the JPEG
-routines will cause a message to be printed on stderr, followed by exit().
-You can supply your own error handling routines to override this behavior
-and to control the treatment of nonfatal warnings and trace/debug messages.
-The file example.c illustrates the most common case, which is to have the
-application regain control after an error rather than exiting.
-
-The JPEG library never writes any message directly; it always goes through
-the error handling routines. Three classes of messages are recognized:
- * Fatal errors: the library cannot continue.
- * Warnings: the library can continue, but the data is corrupt, and a
- damaged output image is likely to result.
- * Trace/informational messages. These come with a trace level indicating
- the importance of the message; you can control the verbosity of the
- program by adjusting the maximum trace level that will be displayed.
-
-You may, if you wish, simply replace the entire JPEG error handling module
-(jerror.c) with your own code. However, you can avoid code duplication by
-only replacing some of the routines depending on the behavior you need.
-This is accomplished by calling jpeg_std_error() as usual, but then overriding
-some of the method pointers in the jpeg_error_mgr struct, as illustrated by
-example.c.
-
-All of the error handling routines will receive a pointer to the JPEG object
-(a j_common_ptr which points to either a jpeg_compress_struct or a
-jpeg_decompress_struct; if you need to tell which, test the is_decompressor
-field). This struct includes a pointer to the error manager struct in its
-"err" field. Frequently, custom error handler routines will need to access
-additional data which is not known to the JPEG library or the standard error
-handler. The most convenient way to do this is to embed either the JPEG
-object or the jpeg_error_mgr struct in a larger structure that contains
-additional fields; then casting the passed pointer provides access to the
-additional fields. Again, see example.c for one way to do it. (Beginning
-with IJG version 6b, there is also a void pointer "client_data" in each
-JPEG object, which the application can also use to find related data.
-The library does not touch client_data at all.)
-
-The individual methods that you might wish to override are:
-
-error_exit (j_common_ptr cinfo)
- Receives control for a fatal error. Information sufficient to
- generate the error message has been stored in cinfo->err; call
- output_message to display it. Control must NOT return to the caller;
- generally this routine will exit() or longjmp() somewhere.
- Typically you would override this routine to get rid of the exit()
- default behavior. Note that if you continue processing, you should
- clean up the JPEG object with jpeg_abort() or jpeg_destroy().
-
-output_message (j_common_ptr cinfo)
- Actual output of any JPEG message. Override this to send messages
- somewhere other than stderr. Note that this method does not know
- how to generate a message, only where to send it.
-
-format_message (j_common_ptr cinfo, char * buffer)
- Constructs a readable error message string based on the error info
- stored in cinfo->err. This method is called by output_message. Few
- applications should need to override this method. One possible
- reason for doing so is to implement dynamic switching of error message
- language.
-
-emit_message (j_common_ptr cinfo, int msg_level)
- Decide whether or not to emit a warning or trace message; if so,
- calls output_message. The main reason for overriding this method
- would be to abort on warnings. msg_level is -1 for warnings,
- 0 and up for trace messages.
-
-Only error_exit() and emit_message() are called from the rest of the JPEG
-library; the other two are internal to the error handler.
-
-The actual message texts are stored in an array of strings which is pointed to
-by the field err->jpeg_message_table. The messages are numbered from 0 to
-err->last_jpeg_message, and it is these code numbers that are used in the
-JPEG library code. You could replace the message texts (for instance, with
-messages in French or German) by changing the message table pointer. See
-jerror.h for the default texts. CAUTION: this table will almost certainly
-change or grow from one library version to the next.
-
-It may be useful for an application to add its own message texts that are
-handled by the same mechanism. The error handler supports a second "add-on"
-message table for this purpose. To define an addon table, set the pointer
-err->addon_message_table and the message numbers err->first_addon_message and
-err->last_addon_message. If you number the addon messages beginning at 1000
-or so, you won't have to worry about conflicts with the library's built-in
-messages. See the sample applications cjpeg/djpeg for an example of using
-addon messages (the addon messages are defined in cderror.h).
-
-Actual invocation of the error handler is done via macros defined in jerror.h:
- ERREXITn(...) for fatal errors
- WARNMSn(...) for corrupt-data warnings
- TRACEMSn(...) for trace and informational messages.
-These macros store the message code and any additional parameters into the
-error handler struct, then invoke the error_exit() or emit_message() method.
-The variants of each macro are for varying numbers of additional parameters.
-The additional parameters are inserted into the generated message using
-standard printf() format codes.
-
-See jerror.h and jerror.c for further details.
-
-
-Compressed data handling (source and destination managers)
-----------------------------------------------------------
-
-The JPEG compression library sends its compressed data to a "destination
-manager" module. The default destination manager just writes the data to a
-stdio stream, but you can provide your own manager to do something else.
-Similarly, the decompression library calls a "source manager" to obtain the
-compressed data; you can provide your own source manager if you want the data
-to come from somewhere other than a stdio stream.
-
-In both cases, compressed data is processed a bufferload at a time: the
-destination or source manager provides a work buffer, and the library invokes
-the manager only when the buffer is filled or emptied. (You could define a
-one-character buffer to force the manager to be invoked for each byte, but
-that would be rather inefficient.) The buffer's size and location are
-controlled by the manager, not by the library. For example, if you desired to
-decompress a JPEG datastream that was all in memory, you could just make the
-buffer pointer and length point to the original data in memory. Then the
-buffer-reload procedure would be invoked only if the decompressor ran off the
-end of the datastream, which would indicate an erroneous datastream.
-
-The work buffer is defined as an array of datatype JOCTET, which is generally
-"char" or "unsigned char". On a machine where char is not exactly 8 bits
-wide, you must define JOCTET as a wider data type and then modify the data
-source and destination modules to transcribe the work arrays into 8-bit units
-on external storage.
-
-A data destination manager struct contains a pointer and count defining the
-next byte to write in the work buffer and the remaining free space:
-
- JOCTET * next_output_byte; /* => next byte to write in buffer */
- size_t free_in_buffer; /* # of byte spaces remaining in buffer */
-
-The library increments the pointer and decrements the count until the buffer
-is filled. The manager's empty_output_buffer method must reset the pointer
-and count. The manager is expected to remember the buffer's starting address
-and total size in private fields not visible to the library.
-
-A data destination manager provides three methods:
-
-init_destination (j_compress_ptr cinfo)
- Initialize destination. This is called by jpeg_start_compress()
- before any data is actually written. It must initialize
- next_output_byte and free_in_buffer. free_in_buffer must be
- initialized to a positive value.
-
-empty_output_buffer (j_compress_ptr cinfo)
- This is called whenever the buffer has filled (free_in_buffer
- reaches zero). In typical applications, it should write out the
- *entire* buffer (use the saved start address and buffer length;
- ignore the current state of next_output_byte and free_in_buffer).
- Then reset the pointer & count to the start of the buffer, and
- return TRUE indicating that the buffer has been dumped.
- free_in_buffer must be set to a positive value when TRUE is
- returned. A FALSE return should only be used when I/O suspension is
- desired (this operating mode is discussed in the next section).
-
-term_destination (j_compress_ptr cinfo)
- Terminate destination --- called by jpeg_finish_compress() after all
- data has been written. In most applications, this must flush any
- data remaining in the buffer. Use either next_output_byte or
- free_in_buffer to determine how much data is in the buffer.
-
-term_destination() is NOT called by jpeg_abort() or jpeg_destroy(). If you
-want the destination manager to be cleaned up during an abort, you must do it
-yourself.
-
-You will also need code to create a jpeg_destination_mgr struct, fill in its
-method pointers, and insert a pointer to the struct into the "dest" field of
-the JPEG compression object. This can be done in-line in your setup code if
-you like, but it's probably cleaner to provide a separate routine similar to
-the jpeg_stdio_dest() routine of the supplied destination manager.
-
-Decompression source managers follow a parallel design, but with some
-additional frammishes. The source manager struct contains a pointer and count
-defining the next byte to read from the work buffer and the number of bytes
-remaining:
-
- const JOCTET * next_input_byte; /* => next byte to read from buffer */
- size_t bytes_in_buffer; /* # of bytes remaining in buffer */
-
-The library increments the pointer and decrements the count until the buffer
-is emptied. The manager's fill_input_buffer method must reset the pointer and
-count. In most applications, the manager must remember the buffer's starting
-address and total size in private fields not visible to the library.
-
-A data source manager provides five methods:
-
-init_source (j_decompress_ptr cinfo)
- Initialize source. This is called by jpeg_read_header() before any
- data is actually read. Unlike init_destination(), it may leave
- bytes_in_buffer set to 0 (in which case a fill_input_buffer() call
- will occur immediately).
-
-fill_input_buffer (j_decompress_ptr cinfo)
- This is called whenever bytes_in_buffer has reached zero and more
- data is wanted. In typical applications, it should read fresh data
- into the buffer (ignoring the current state of next_input_byte and
- bytes_in_buffer), reset the pointer & count to the start of the
- buffer, and return TRUE indicating that the buffer has been reloaded.
- It is not necessary to fill the buffer entirely, only to obtain at
- least one more byte. bytes_in_buffer MUST be set to a positive value
- if TRUE is returned. A FALSE return should only be used when I/O
- suspension is desired (this mode is discussed in the next section).
-
-skip_input_data (j_decompress_ptr cinfo, long num_bytes)
- Skip num_bytes worth of data. The buffer pointer and count should
- be advanced over num_bytes input bytes, refilling the buffer as
- needed. This is used to skip over a potentially large amount of
- uninteresting data (such as an APPn marker). In some applications
- it may be possible to optimize away the reading of the skipped data,
- but it's not clear that being smart is worth much trouble; large
- skips are uncommon. bytes_in_buffer may be zero on return.
- A zero or negative skip count should be treated as a no-op.
-
-resync_to_restart (j_decompress_ptr cinfo, int desired)
- This routine is called only when the decompressor has failed to find
- a restart (RSTn) marker where one is expected. Its mission is to
- find a suitable point for resuming decompression. For most
- applications, we recommend that you just use the default resync
- procedure, jpeg_resync_to_restart(). However, if you are able to back
- up in the input data stream, or if you have a-priori knowledge about
- the likely location of restart markers, you may be able to do better.
- Read the read_restart_marker() and jpeg_resync_to_restart() routines
- in jdmarker.c if you think you'd like to implement your own resync
- procedure.
-
-term_source (j_decompress_ptr cinfo)
- Terminate source --- called by jpeg_finish_decompress() after all
- data has been read. Often a no-op.
-
-For both fill_input_buffer() and skip_input_data(), there is no such thing
-as an EOF return. If the end of the file has been reached, the routine has
-a choice of exiting via ERREXIT() or inserting fake data into the buffer.
-In most cases, generating a warning message and inserting a fake EOI marker
-is the best course of action --- this will allow the decompressor to output
-however much of the image is there. In pathological cases, the decompressor
-may swallow the EOI and again demand data ... just keep feeding it fake EOIs.
-jdatasrc.c illustrates the recommended error recovery behavior.
-
-term_source() is NOT called by jpeg_abort() or jpeg_destroy(). If you want
-the source manager to be cleaned up during an abort, you must do it yourself.
-
-You will also need code to create a jpeg_source_mgr struct, fill in its method
-pointers, and insert a pointer to the struct into the "src" field of the JPEG
-decompression object. This can be done in-line in your setup code if you
-like, but it's probably cleaner to provide a separate routine similar to the
-jpeg_stdio_src() routine of the supplied source manager.
-
-For more information, consult the stdio source and destination managers
-in jdatasrc.c and jdatadst.c.
-
-
-I/O suspension
---------------
-
-Some applications need to use the JPEG library as an incremental memory-to-
-memory filter: when the compressed data buffer is filled or emptied, they want
-control to return to the outer loop, rather than expecting that the buffer can
-be emptied or reloaded within the data source/destination manager subroutine.
-The library supports this need by providing an "I/O suspension" mode, which we
-describe in this section.
-
-The I/O suspension mode is not a panacea: nothing is guaranteed about the
-maximum amount of time spent in any one call to the library, so it will not
-eliminate response-time problems in single-threaded applications. If you
-need guaranteed response time, we suggest you "bite the bullet" and implement
-a real multi-tasking capability.
-
-To use I/O suspension, cooperation is needed between the calling application
-and the data source or destination manager; you will always need a custom
-source/destination manager. (Please read the previous section if you haven't
-already.) The basic idea is that the empty_output_buffer() or
-fill_input_buffer() routine is a no-op, merely returning FALSE to indicate
-that it has done nothing. Upon seeing this, the JPEG library suspends
-operation and returns to its caller. The surrounding application is
-responsible for emptying or refilling the work buffer before calling the
-JPEG library again.
-
-Compression suspension:
-
-For compression suspension, use an empty_output_buffer() routine that returns
-FALSE; typically it will not do anything else. This will cause the
-compressor to return to the caller of jpeg_write_scanlines(), with the return
-value indicating that not all the supplied scanlines have been accepted.
-The application must make more room in the output buffer, adjust the output
-buffer pointer/count appropriately, and then call jpeg_write_scanlines()
-again, pointing to the first unconsumed scanline.
-
-When forced to suspend, the compressor will backtrack to a convenient stopping
-point (usually the start of the current MCU); it will regenerate some output
-data when restarted. Therefore, although empty_output_buffer() is only
-called when the buffer is filled, you should NOT write out the entire buffer
-after a suspension. Write only the data up to the current position of
-next_output_byte/free_in_buffer. The data beyond that point will be
-regenerated after resumption.
-
-Because of the backtracking behavior, a good-size output buffer is essential
-for efficiency; you don't want the compressor to suspend often. (In fact, an
-overly small buffer could lead to infinite looping, if a single MCU required
-more data than would fit in the buffer.) We recommend a buffer of at least
-several Kbytes. You may want to insert explicit code to ensure that you don't
-call jpeg_write_scanlines() unless there is a reasonable amount of space in
-the output buffer; in other words, flush the buffer before trying to compress
-more data.
-
-The compressor does not allow suspension while it is trying to write JPEG
-markers at the beginning and end of the file. This means that:
- * At the beginning of a compression operation, there must be enough free
- space in the output buffer to hold the header markers (typically 600 or
- so bytes). The recommended buffer size is bigger than this anyway, so
- this is not a problem as long as you start with an empty buffer. However,
- this restriction might catch you if you insert large special markers, such
- as a JFIF thumbnail image, without flushing the buffer afterwards.
- * When you call jpeg_finish_compress(), there must be enough space in the
- output buffer to emit any buffered data and the final EOI marker. In the
- current implementation, half a dozen bytes should suffice for this, but
- for safety's sake we recommend ensuring that at least 100 bytes are free
- before calling jpeg_finish_compress().
-
-A more significant restriction is that jpeg_finish_compress() cannot suspend.
-This means you cannot use suspension with multi-pass operating modes, namely
-Huffman code optimization and multiple-scan output. Those modes write the
-whole file during jpeg_finish_compress(), which will certainly result in
-buffer overrun. (Note that this restriction applies only to compression,
-not decompression. The decompressor supports input suspension in all of its
-operating modes.)
-
-Decompression suspension:
-
-For decompression suspension, use a fill_input_buffer() routine that simply
-returns FALSE (except perhaps during error recovery, as discussed below).
-This will cause the decompressor to return to its caller with an indication
-that suspension has occurred. This can happen at four places:
- * jpeg_read_header(): will return JPEG_SUSPENDED.
- * jpeg_start_decompress(): will return FALSE, rather than its usual TRUE.
- * jpeg_read_scanlines(): will return the number of scanlines already
- completed (possibly 0).
- * jpeg_finish_decompress(): will return FALSE, rather than its usual TRUE.
-The surrounding application must recognize these cases, load more data into
-the input buffer, and repeat the call. In the case of jpeg_read_scanlines(),
-increment the passed pointers past any scanlines successfully read.
-
-Just as with compression, the decompressor will typically backtrack to a
-convenient restart point before suspending. When fill_input_buffer() is
-called, next_input_byte/bytes_in_buffer point to the current restart point,
-which is where the decompressor will backtrack to if FALSE is returned.
-The data beyond that position must NOT be discarded if you suspend; it needs
-to be re-read upon resumption. In most implementations, you'll need to shift
-this data down to the start of your work buffer and then load more data after
-it. Again, this behavior means that a several-Kbyte work buffer is essential
-for decent performance; furthermore, you should load a reasonable amount of
-new data before resuming decompression. (If you loaded, say, only one new
-byte each time around, you could waste a LOT of cycles.)
-
-The skip_input_data() source manager routine requires special care in a
-suspension scenario. This routine is NOT granted the ability to suspend the
-decompressor; it can decrement bytes_in_buffer to zero, but no more. If the
-requested skip distance exceeds the amount of data currently in the input
-buffer, then skip_input_data() must set bytes_in_buffer to zero and record the
-additional skip distance somewhere else. The decompressor will immediately
-call fill_input_buffer(), which should return FALSE, which will cause a
-suspension return. The surrounding application must then arrange to discard
-the recorded number of bytes before it resumes loading the input buffer.
-(Yes, this design is rather baroque, but it avoids complexity in the far more
-common case where a non-suspending source manager is used.)
-
-If the input data has been exhausted, we recommend that you emit a warning
-and insert dummy EOI markers just as a non-suspending data source manager
-would do. This can be handled either in the surrounding application logic or
-within fill_input_buffer(); the latter is probably more efficient. If
-fill_input_buffer() knows that no more data is available, it can set the
-pointer/count to point to a dummy EOI marker and then return TRUE just as
-though it had read more data in a non-suspending situation.
-
-The decompressor does not attempt to suspend within standard JPEG markers;
-instead it will backtrack to the start of the marker and reprocess the whole
-marker next time. Hence the input buffer must be large enough to hold the
-longest standard marker in the file. Standard JPEG markers should normally
-not exceed a few hundred bytes each (DHT tables are typically the longest).
-We recommend at least a 2K buffer for performance reasons, which is much
-larger than any correct marker is likely to be. For robustness against
-damaged marker length counts, you may wish to insert a test in your
-application for the case that the input buffer is completely full and yet
-the decoder has suspended without consuming any data --- otherwise, if this
-situation did occur, it would lead to an endless loop. (The library can't
-provide this test since it has no idea whether "the buffer is full", or
-even whether there is a fixed-size input buffer.)
-
-The input buffer would need to be 64K to allow for arbitrary COM or APPn
-markers, but these are handled specially: they are either saved into allocated
-memory, or skipped over by calling skip_input_data(). In the former case,
-suspension is handled correctly, and in the latter case, the problem of
-buffer overrun is placed on skip_input_data's shoulders, as explained above.
-Note that if you provide your own marker handling routine for large markers,
-you should consider how to deal with buffer overflow.
-
-Multiple-buffer management:
-
-In some applications it is desirable to store the compressed data in a linked
-list of buffer areas, so as to avoid data copying. This can be handled by
-having empty_output_buffer() or fill_input_buffer() set the pointer and count
-to reference the next available buffer; FALSE is returned only if no more
-buffers are available. Although seemingly straightforward, there is a
-pitfall in this approach: the backtrack that occurs when FALSE is returned
-could back up into an earlier buffer. For example, when fill_input_buffer()
-is called, the current pointer & count indicate the backtrack restart point.
-Since fill_input_buffer() will set the pointer and count to refer to a new
-buffer, the restart position must be saved somewhere else. Suppose a second
-call to fill_input_buffer() occurs in the same library call, and no
-additional input data is available, so fill_input_buffer must return FALSE.
-If the JPEG library has not moved the pointer/count forward in the current
-buffer, then *the correct restart point is the saved position in the prior
-buffer*. Prior buffers may be discarded only after the library establishes
-a restart point within a later buffer. Similar remarks apply for output into
-a chain of buffers.
-
-The library will never attempt to backtrack over a skip_input_data() call,
-so any skipped data can be permanently discarded. You still have to deal
-with the case of skipping not-yet-received data, however.
-
-It's much simpler to use only a single buffer; when fill_input_buffer() is
-called, move any unconsumed data (beyond the current pointer/count) down to
-the beginning of this buffer and then load new data into the remaining buffer
-space. This approach requires a little more data copying but is far easier
-to get right.
-
-
-Progressive JPEG support
-------------------------
-
-Progressive JPEG rearranges the stored data into a series of scans of
-increasing quality. In situations where a JPEG file is transmitted across a
-slow communications link, a decoder can generate a low-quality image very
-quickly from the first scan, then gradually improve the displayed quality as
-more scans are received. The final image after all scans are complete is
-identical to that of a regular (sequential) JPEG file of the same quality
-setting. Progressive JPEG files are often slightly smaller than equivalent
-sequential JPEG files, but the possibility of incremental display is the main
-reason for using progressive JPEG.
-
-The IJG encoder library generates progressive JPEG files when given a
-suitable "scan script" defining how to divide the data into scans.
-Creation of progressive JPEG files is otherwise transparent to the encoder.
-Progressive JPEG files can also be read transparently by the decoder library.
-If the decoding application simply uses the library as defined above, it
-will receive a final decoded image without any indication that the file was
-progressive. Of course, this approach does not allow incremental display.
-To perform incremental display, an application needs to use the decoder
-library's "buffered-image" mode, in which it receives a decoded image
-multiple times.
-
-Each displayed scan requires about as much work to decode as a full JPEG
-image of the same size, so the decoder must be fairly fast in relation to the
-data transmission rate in order to make incremental display useful. However,
-it is possible to skip displaying the image and simply add the incoming bits
-to the decoder's coefficient buffer. This is fast because only Huffman
-decoding need be done, not IDCT, upsampling, colorspace conversion, etc.
-The IJG decoder library allows the application to switch dynamically between
-displaying the image and simply absorbing the incoming bits. A properly
-coded application can automatically adapt the number of display passes to
-suit the time available as the image is received. Also, a final
-higher-quality display cycle can be performed from the buffered data after
-the end of the file is reached.
-
-Progressive compression:
-
-To create a progressive JPEG file (or a multiple-scan sequential JPEG file),
-set the scan_info cinfo field to point to an array of scan descriptors, and
-perform compression as usual. Instead of constructing your own scan list,
-you can call the jpeg_simple_progression() helper routine to create a
-recommended progression sequence; this method should be used by all
-applications that don't want to get involved in the nitty-gritty of
-progressive scan sequence design. (If you want to provide user control of
-scan sequences, you may wish to borrow the scan script reading code found
-in rdswitch.c, so that you can read scan script files just like cjpeg's.)
-When scan_info is not NULL, the compression library will store DCT'd data
-into a buffer array as jpeg_write_scanlines() is called, and will emit all
-the requested scans during jpeg_finish_compress(). This implies that
-multiple-scan output cannot be created with a suspending data destination
-manager, since jpeg_finish_compress() does not support suspension. We
-should also note that the compressor currently forces Huffman optimization
-mode when creating a progressive JPEG file, because the default Huffman
-tables are unsuitable for progressive files.
-
-Progressive decompression:
-
-When buffered-image mode is not used, the decoder library will read all of
-a multi-scan file during jpeg_start_decompress(), so that it can provide a
-final decoded image. (Here "multi-scan" means either progressive or
-multi-scan sequential.) This makes multi-scan files transparent to the
-decoding application. However, existing applications that used suspending
-input with version 5 of the IJG library will need to be modified to check
-for a suspension return from jpeg_start_decompress().
-
-To perform incremental display, an application must use the library's
-buffered-image mode. This is described in the next section.
-
-
-Buffered-image mode
--------------------
-
-In buffered-image mode, the library stores the partially decoded image in a
-coefficient buffer, from which it can be read out as many times as desired.
-This mode is typically used for incremental display of progressive JPEG files,
-but it can be used with any JPEG file. Each scan of a progressive JPEG file
-adds more data (more detail) to the buffered image. The application can
-display in lockstep with the source file (one display pass per input scan),
-or it can allow input processing to outrun display processing. By making
-input and display processing run independently, it is possible for the
-application to adapt progressive display to a wide range of data transmission
-rates.
-
-The basic control flow for buffered-image decoding is
-
- jpeg_create_decompress()
- set data source
- jpeg_read_header()
- set overall decompression parameters
- cinfo.buffered_image = TRUE; /* select buffered-image mode */
- jpeg_start_decompress()
- for (each output pass) {
- adjust output decompression parameters if required
- jpeg_start_output() /* start a new output pass */
- for (all scanlines in image) {
- jpeg_read_scanlines()
- display scanlines
- }
- jpeg_finish_output() /* terminate output pass */
- }
- jpeg_finish_decompress()
- jpeg_destroy_decompress()
-
-This differs from ordinary unbuffered decoding in that there is an additional
-level of looping. The application can choose how many output passes to make
-and how to display each pass.
-
-The simplest approach to displaying progressive images is to do one display
-pass for each scan appearing in the input file. In this case the outer loop
-condition is typically
- while (! jpeg_input_complete(&cinfo))
-and the start-output call should read
- jpeg_start_output(&cinfo, cinfo.input_scan_number);
-The second parameter to jpeg_start_output() indicates which scan of the input
-file is to be displayed; the scans are numbered starting at 1 for this
-purpose. (You can use a loop counter starting at 1 if you like, but using
-the library's input scan counter is easier.) The library automatically reads
-data as necessary to complete each requested scan, and jpeg_finish_output()
-advances to the next scan or end-of-image marker (hence input_scan_number
-will be incremented by the time control arrives back at jpeg_start_output()).
-With this technique, data is read from the input file only as needed, and
-input and output processing run in lockstep.
-
-After reading the final scan and reaching the end of the input file, the
-buffered image remains available; it can be read additional times by
-repeating the jpeg_start_output()/jpeg_read_scanlines()/jpeg_finish_output()
-sequence. For example, a useful technique is to use fast one-pass color
-quantization for display passes made while the image is arriving, followed by
-a final display pass using two-pass quantization for highest quality. This
-is done by changing the library parameters before the final output pass.
-Changing parameters between passes is discussed in detail below.
-
-In general the last scan of a progressive file cannot be recognized as such
-until after it is read, so a post-input display pass is the best approach if
-you want special processing in the final pass.
-
-When done with the image, be sure to call jpeg_finish_decompress() to release
-the buffered image (or just use jpeg_destroy_decompress()).
-
-If input data arrives faster than it can be displayed, the application can
-cause the library to decode input data in advance of what's needed to produce
-output. This is done by calling the routine jpeg_consume_input().
-The return value is one of the following:
- JPEG_REACHED_SOS: reached an SOS marker (the start of a new scan)
- JPEG_REACHED_EOI: reached the EOI marker (end of image)
- JPEG_ROW_COMPLETED: completed reading one MCU row of compressed data
- JPEG_SCAN_COMPLETED: completed reading last MCU row of current scan
- JPEG_SUSPENDED: suspended before completing any of the above
-(JPEG_SUSPENDED can occur only if a suspending data source is used.) This
-routine can be called at any time after initializing the JPEG object. It
-reads some additional data and returns when one of the indicated significant
-events occurs. (If called after the EOI marker is reached, it will
-immediately return JPEG_REACHED_EOI without attempting to read more data.)
-
-The library's output processing will automatically call jpeg_consume_input()
-whenever the output processing overtakes the input; thus, simple lockstep
-display requires no direct calls to jpeg_consume_input(). But by adding
-calls to jpeg_consume_input(), you can absorb data in advance of what is
-being displayed. This has two benefits:
- * You can limit buildup of unprocessed data in your input buffer.
- * You can eliminate extra display passes by paying attention to the
- state of the library's input processing.
-
-The first of these benefits only requires interspersing calls to
-jpeg_consume_input() with your display operations and any other processing
-you may be doing. To avoid wasting cycles due to backtracking, it's best to
-call jpeg_consume_input() only after a hundred or so new bytes have arrived.
-This is discussed further under "I/O suspension", above. (Note: the JPEG
-library currently is not thread-safe. You must not call jpeg_consume_input()
-from one thread of control if a different library routine is working on the
-same JPEG object in another thread.)
-
-When input arrives fast enough that more than one new scan is available
-before you start a new output pass, you may as well skip the output pass
-corresponding to the completed scan. This occurs for free if you pass
-cinfo.input_scan_number as the target scan number to jpeg_start_output().
-The input_scan_number field is simply the index of the scan currently being
-consumed by the input processor. You can ensure that this is up-to-date by
-emptying the input buffer just before calling jpeg_start_output(): call
-jpeg_consume_input() repeatedly until it returns JPEG_SUSPENDED or
-JPEG_REACHED_EOI.
-
-The target scan number passed to jpeg_start_output() is saved in the
-cinfo.output_scan_number field. The library's output processing calls
-jpeg_consume_input() whenever the current input scan number and row within
-that scan is less than or equal to the current output scan number and row.
-Thus, input processing can "get ahead" of the output processing but is not
-allowed to "fall behind". You can achieve several different effects by
-manipulating this interlock rule. For example, if you pass a target scan
-number greater than the current input scan number, the output processor will
-wait until that scan starts to arrive before producing any output. (To avoid
-an infinite loop, the target scan number is automatically reset to the last
-scan number when the end of image is reached. Thus, if you specify a large
-target scan number, the library will just absorb the entire input file and
-then perform an output pass. This is effectively the same as what
-jpeg_start_decompress() does when you don't select buffered-image mode.)
-When you pass a target scan number equal to the current input scan number,
-the image is displayed no faster than the current input scan arrives. The
-final possibility is to pass a target scan number less than the current input
-scan number; this disables the input/output interlock and causes the output
-processor to simply display whatever it finds in the image buffer, without
-waiting for input. (However, the library will not accept a target scan
-number less than one, so you can't avoid waiting for the first scan.)
-
-When data is arriving faster than the output display processing can advance
-through the image, jpeg_consume_input() will store data into the buffered
-image beyond the point at which the output processing is reading data out
-again. If the input arrives fast enough, it may "wrap around" the buffer to
-the point where the input is more than one whole scan ahead of the output.
-If the output processing simply proceeds through its display pass without
-paying attention to the input, the effect seen on-screen is that the lower
-part of the image is one or more scans better in quality than the upper part.
-Then, when the next output scan is started, you have a choice of what target
-scan number to use. The recommended choice is to use the current input scan
-number at that time, which implies that you've skipped the output scans
-corresponding to the input scans that were completed while you processed the
-previous output scan. In this way, the decoder automatically adapts its
-speed to the arriving data, by skipping output scans as necessary to keep up
-with the arriving data.
-
-When using this strategy, you'll want to be sure that you perform a final
-output pass after receiving all the data; otherwise your last display may not
-be full quality across the whole screen. So the right outer loop logic is
-something like this:
- do {
- absorb any waiting input by calling jpeg_consume_input()
- final_pass = jpeg_input_complete(&cinfo);
- adjust output decompression parameters if required
- jpeg_start_output(&cinfo, cinfo.input_scan_number);
- ...
- jpeg_finish_output()
- } while (! final_pass);
-rather than quitting as soon as jpeg_input_complete() returns TRUE. This
-arrangement makes it simple to use higher-quality decoding parameters
-for the final pass. But if you don't want to use special parameters for
-the final pass, the right loop logic is like this:
- for (;;) {
- absorb any waiting input by calling jpeg_consume_input()
- jpeg_start_output(&cinfo, cinfo.input_scan_number);
- ...
- jpeg_finish_output()
- if (jpeg_input_complete(&cinfo) &&
- cinfo.input_scan_number == cinfo.output_scan_number)
- break;
- }
-In this case you don't need to know in advance whether an output pass is to
-be the last one, so it's not necessary to have reached EOF before starting
-the final output pass; rather, what you want to test is whether the output
-pass was performed in sync with the final input scan. This form of the loop
-will avoid an extra output pass whenever the decoder is able (or nearly able)
-to keep up with the incoming data.
-
-When the data transmission speed is high, you might begin a display pass,
-then find that much or all of the file has arrived before you can complete
-the pass. (You can detect this by noting the JPEG_REACHED_EOI return code
-from jpeg_consume_input(), or equivalently by testing jpeg_input_complete().)
-In this situation you may wish to abort the current display pass and start a
-new one using the newly arrived information. To do so, just call
-jpeg_finish_output() and then start a new pass with jpeg_start_output().
-
-A variant strategy is to abort and restart display if more than one complete
-scan arrives during an output pass; this can be detected by noting
-JPEG_REACHED_SOS returns and/or examining cinfo.input_scan_number. This
-idea should be employed with caution, however, since the display process
-might never get to the bottom of the image before being aborted, resulting
-in the lower part of the screen being several passes worse than the upper.
-In most cases it's probably best to abort an output pass only if the whole
-file has arrived and you want to begin the final output pass immediately.
-
-When receiving data across a communication link, we recommend always using
-the current input scan number for the output target scan number; if a
-higher-quality final pass is to be done, it should be started (aborting any
-incomplete output pass) as soon as the end of file is received. However,
-many other strategies are possible. For example, the application can examine
-the parameters of the current input scan and decide whether to display it or
-not. If the scan contains only chroma data, one might choose not to use it
-as the target scan, expecting that the scan will be small and will arrive
-quickly. To skip to the next scan, call jpeg_consume_input() until it
-returns JPEG_REACHED_SOS or JPEG_REACHED_EOI. Or just use the next higher
-number as the target scan for jpeg_start_output(); but that method doesn't
-let you inspect the next scan's parameters before deciding to display it.
-
-
-In buffered-image mode, jpeg_start_decompress() never performs input and
-thus never suspends. An application that uses input suspension with
-buffered-image mode must be prepared for suspension returns from these
-routines:
-* jpeg_start_output() performs input only if you request 2-pass quantization
- and the target scan isn't fully read yet. (This is discussed below.)
-* jpeg_read_scanlines(), as always, returns the number of scanlines that it
- was able to produce before suspending.
-* jpeg_finish_output() will read any markers following the target scan,
- up to the end of the file or the SOS marker that begins another scan.
- (But it reads no input if jpeg_consume_input() has already reached the
- end of the file or a SOS marker beyond the target output scan.)
-* jpeg_finish_decompress() will read until the end of file, and thus can
- suspend if the end hasn't already been reached (as can be tested by
- calling jpeg_input_complete()).
-jpeg_start_output(), jpeg_finish_output(), and jpeg_finish_decompress()
-all return TRUE if they completed their tasks, FALSE if they had to suspend.
-In the event of a FALSE return, the application must load more input data
-and repeat the call. Applications that use non-suspending data sources need
-not check the return values of these three routines.
-
-
-It is possible to change decoding parameters between output passes in the
-buffered-image mode. The decoder library currently supports only very
-limited changes of parameters. ONLY THE FOLLOWING parameter changes are
-allowed after jpeg_start_decompress() is called:
-* dct_method can be changed before each call to jpeg_start_output().
- For example, one could use a fast DCT method for early scans, changing
- to a higher quality method for the final scan.
-* dither_mode can be changed before each call to jpeg_start_output();
- of course this has no impact if not using color quantization. Typically
- one would use ordered dither for initial passes, then switch to
- Floyd-Steinberg dither for the final pass. Caution: changing dither mode
- can cause more memory to be allocated by the library. Although the amount
- of memory involved is not large (a scanline or so), it may cause the
- initial max_memory_to_use specification to be exceeded, which in the worst
- case would result in an out-of-memory failure.
-* do_block_smoothing can be changed before each call to jpeg_start_output().
- This setting is relevant only when decoding a progressive JPEG image.
- During the first DC-only scan, block smoothing provides a very "fuzzy" look
- instead of the very "blocky" look seen without it; which is better seems a
- matter of personal taste. But block smoothing is nearly always a win
- during later stages, especially when decoding a successive-approximation
- image: smoothing helps to hide the slight blockiness that otherwise shows
- up on smooth gradients until the lowest coefficient bits are sent.
-* Color quantization mode can be changed under the rules described below.
- You *cannot* change between full-color and quantized output (because that
- would alter the required I/O buffer sizes), but you can change which
- quantization method is used.
-
-When generating color-quantized output, changing quantization method is a
-very useful way of switching between high-speed and high-quality display.
-The library allows you to change among its three quantization methods:
-1. Single-pass quantization to a fixed color cube.
- Selected by cinfo.two_pass_quantize = FALSE and cinfo.colormap = NULL.
-2. Single-pass quantization to an application-supplied colormap.
- Selected by setting cinfo.colormap to point to the colormap (the value of
- two_pass_quantize is ignored); also set cinfo.actual_number_of_colors.
-3. Two-pass quantization to a colormap chosen specifically for the image.
- Selected by cinfo.two_pass_quantize = TRUE and cinfo.colormap = NULL.
- (This is the default setting selected by jpeg_read_header, but it is
- probably NOT what you want for the first pass of progressive display!)
-These methods offer successively better quality and lesser speed. However,
-only the first method is available for quantizing in non-RGB color spaces.
-
-IMPORTANT: because the different quantizer methods have very different
-working-storage requirements, the library requires you to indicate which
-one(s) you intend to use before you call jpeg_start_decompress(). (If we did
-not require this, the max_memory_to_use setting would be a complete fiction.)
-You do this by setting one or more of these three cinfo fields to TRUE:
- enable_1pass_quant Fixed color cube colormap
- enable_external_quant Externally-supplied colormap
- enable_2pass_quant Two-pass custom colormap
-All three are initialized FALSE by jpeg_read_header(). But
-jpeg_start_decompress() automatically sets TRUE the one selected by the
-current two_pass_quantize and colormap settings, so you only need to set the
-enable flags for any other quantization methods you plan to change to later.
-
-After setting the enable flags correctly at jpeg_start_decompress() time, you
-can change to any enabled quantization method by setting two_pass_quantize
-and colormap properly just before calling jpeg_start_output(). The following
-special rules apply:
-1. You must explicitly set cinfo.colormap to NULL when switching to 1-pass
- or 2-pass mode from a different mode, or when you want the 2-pass
- quantizer to be re-run to generate a new colormap.
-2. To switch to an external colormap, or to change to a different external
- colormap than was used on the prior pass, you must call
- jpeg_new_colormap() after setting cinfo.colormap.
-NOTE: if you want to use the same colormap as was used in the prior pass,
-you should not do either of these things. This will save some nontrivial
-switchover costs.
-(These requirements exist because cinfo.colormap will always be non-NULL
-after completing a prior output pass, since both the 1-pass and 2-pass
-quantizers set it to point to their output colormaps. Thus you have to
-do one of these two things to notify the library that something has changed.
-Yup, it's a bit klugy, but it's necessary to do it this way for backwards
-compatibility.)
-
-Note that in buffered-image mode, the library generates any requested colormap
-during jpeg_start_output(), not during jpeg_start_decompress().
-
-When using two-pass quantization, jpeg_start_output() makes a pass over the
-buffered image to determine the optimum color map; it therefore may take a
-significant amount of time, whereas ordinarily it does little work. The
-progress monitor hook is called during this pass, if defined. It is also
-important to realize that if the specified target scan number is greater than
-or equal to the current input scan number, jpeg_start_output() will attempt
-to consume input as it makes this pass. If you use a suspending data source,
-you need to check for a FALSE return from jpeg_start_output() under these
-conditions. The combination of 2-pass quantization and a not-yet-fully-read
-target scan is the only case in which jpeg_start_output() will consume input.
-
-
-Application authors who support buffered-image mode may be tempted to use it
-for all JPEG images, even single-scan ones. This will work, but it is
-inefficient: there is no need to create an image-sized coefficient buffer for
-single-scan images. Requesting buffered-image mode for such an image wastes
-memory. Worse, it can cost time on large images, since the buffered data has
-to be swapped out or written to a temporary file. If you are concerned about
-maximum performance on baseline JPEG files, you should use buffered-image
-mode only when the incoming file actually has multiple scans. This can be
-tested by calling jpeg_has_multiple_scans(), which will return a correct
-result at any time after jpeg_read_header() completes.
-
-It is also worth noting that when you use jpeg_consume_input() to let input
-processing get ahead of output processing, the resulting pattern of access to
-the coefficient buffer is quite nonsequential. It's best to use the memory
-manager jmemnobs.c if you can (ie, if you have enough real or virtual main
-memory). If not, at least make sure that max_memory_to_use is set as high as
-possible. If the JPEG memory manager has to use a temporary file, you will
-probably see a lot of disk traffic and poor performance. (This could be
-improved with additional work on the memory manager, but we haven't gotten
-around to it yet.)
-
-In some applications it may be convenient to use jpeg_consume_input() for all
-input processing, including reading the initial markers; that is, you may
-wish to call jpeg_consume_input() instead of jpeg_read_header() during
-startup. This works, but note that you must check for JPEG_REACHED_SOS and
-JPEG_REACHED_EOI return codes as the equivalent of jpeg_read_header's codes.
-Once the first SOS marker has been reached, you must call
-jpeg_start_decompress() before jpeg_consume_input() will consume more input;
-it'll just keep returning JPEG_REACHED_SOS until you do. If you read a
-tables-only file this way, jpeg_consume_input() will return JPEG_REACHED_EOI
-without ever returning JPEG_REACHED_SOS; be sure to check for this case.
-If this happens, the decompressor will not read any more input until you call
-jpeg_abort() to reset it. It is OK to call jpeg_consume_input() even when not
-using buffered-image mode, but in that case it's basically a no-op after the
-initial markers have been read: it will just return JPEG_SUSPENDED.
-
-
-Abbreviated datastreams and multiple images
--------------------------------------------
-
-A JPEG compression or decompression object can be reused to process multiple
-images. This saves a small amount of time per image by eliminating the
-"create" and "destroy" operations, but that isn't the real purpose of the
-feature. Rather, reuse of an object provides support for abbreviated JPEG
-datastreams. Object reuse can also simplify processing a series of images in
-a single input or output file. This section explains these features.
-
-A JPEG file normally contains several hundred bytes worth of quantization
-and Huffman tables. In a situation where many images will be stored or
-transmitted with identical tables, this may represent an annoying overhead.
-The JPEG standard therefore permits tables to be omitted. The standard
-defines three classes of JPEG datastreams:
- * "Interchange" datastreams contain an image and all tables needed to decode
- the image. These are the usual kind of JPEG file.
- * "Abbreviated image" datastreams contain an image, but are missing some or
- all of the tables needed to decode that image.
- * "Abbreviated table specification" (henceforth "tables-only") datastreams
- contain only table specifications.
-To decode an abbreviated image, it is necessary to load the missing table(s)
-into the decoder beforehand. This can be accomplished by reading a separate
-tables-only file. A variant scheme uses a series of images in which the first
-image is an interchange (complete) datastream, while subsequent ones are
-abbreviated and rely on the tables loaded by the first image. It is assumed
-that once the decoder has read a table, it will remember that table until a
-new definition for the same table number is encountered.
-
-It is the application designer's responsibility to figure out how to associate
-the correct tables with an abbreviated image. While abbreviated datastreams
-can be useful in a closed environment, their use is strongly discouraged in
-any situation where data exchange with other applications might be needed.
-Caveat designer.
-
-The JPEG library provides support for reading and writing any combination of
-tables-only datastreams and abbreviated images. In both compression and
-decompression objects, a quantization or Huffman table will be retained for
-the lifetime of the object, unless it is overwritten by a new table definition.
-
-
-To create abbreviated image datastreams, it is only necessary to tell the
-compressor not to emit some or all of the tables it is using. Each
-quantization and Huffman table struct contains a boolean field "sent_table",
-which normally is initialized to FALSE. For each table used by the image, the
-header-writing process emits the table and sets sent_table = TRUE unless it is
-already TRUE. (In normal usage, this prevents outputting the same table
-definition multiple times, as would otherwise occur because the chroma
-components typically share tables.) Thus, setting this field to TRUE before
-calling jpeg_start_compress() will prevent the table from being written at
-all.
-
-If you want to create a "pure" abbreviated image file containing no tables,
-just call "jpeg_suppress_tables(&cinfo, TRUE)" after constructing all the
-tables. If you want to emit some but not all tables, you'll need to set the
-individual sent_table fields directly.
-
-To create an abbreviated image, you must also call jpeg_start_compress()
-with a second parameter of FALSE, not TRUE. Otherwise jpeg_start_compress()
-will force all the sent_table fields to FALSE. (This is a safety feature to
-prevent abbreviated images from being created accidentally.)
-
-To create a tables-only file, perform the same parameter setup that you
-normally would, but instead of calling jpeg_start_compress() and so on, call
-jpeg_write_tables(&cinfo). This will write an abbreviated datastream
-containing only SOI, DQT and/or DHT markers, and EOI. All the quantization
-and Huffman tables that are currently defined in the compression object will
-be emitted unless their sent_tables flag is already TRUE, and then all the
-sent_tables flags will be set TRUE.
-
-A sure-fire way to create matching tables-only and abbreviated image files
-is to proceed as follows:
-
- create JPEG compression object
- set JPEG parameters
- set destination to tables-only file
- jpeg_write_tables(&cinfo);
- set destination to image file
- jpeg_start_compress(&cinfo, FALSE);
- write data...
- jpeg_finish_compress(&cinfo);
-
-Since the JPEG parameters are not altered between writing the table file and
-the abbreviated image file, the same tables are sure to be used. Of course,
-you can repeat the jpeg_start_compress() ... jpeg_finish_compress() sequence
-many times to produce many abbreviated image files matching the table file.
-
-You cannot suppress output of the computed Huffman tables when Huffman
-optimization is selected. (If you could, there'd be no way to decode the
-image...) Generally, you don't want to set optimize_coding = TRUE when
-you are trying to produce abbreviated files.
-
-In some cases you might want to compress an image using tables which are
-not stored in the application, but are defined in an interchange or
-tables-only file readable by the application. This can be done by setting up
-a JPEG decompression object to read the specification file, then copying the
-tables into your compression object. See jpeg_copy_critical_parameters()
-for an example of copying quantization tables.
-
-
-To read abbreviated image files, you simply need to load the proper tables
-into the decompression object before trying to read the abbreviated image.
-If the proper tables are stored in the application program, you can just
-allocate the table structs and fill in their contents directly. For example,
-to load a fixed quantization table into table slot "n":
-
- if (cinfo.quant_tbl_ptrs[n] == NULL)
- cinfo.quant_tbl_ptrs[n] = jpeg_alloc_quant_table((j_common_ptr) &cinfo);
- quant_ptr = cinfo.quant_tbl_ptrs[n]; /* quant_ptr is JQUANT_TBL* */
- for (i = 0; i < 64; i++) {
- /* Qtable[] is desired quantization table, in natural array order */
- quant_ptr->quantval[i] = Qtable[i];
- }
-
-Code to load a fixed Huffman table is typically (for AC table "n"):
-
- if (cinfo.ac_huff_tbl_ptrs[n] == NULL)
- cinfo.ac_huff_tbl_ptrs[n] = jpeg_alloc_huff_table((j_common_ptr) &cinfo);
- huff_ptr = cinfo.ac_huff_tbl_ptrs[n]; /* huff_ptr is JHUFF_TBL* */
- for (i = 1; i <= 16; i++) {
- /* counts[i] is number of Huffman codes of length i bits, i=1..16 */
- huff_ptr->bits[i] = counts[i];
- }
- for (i = 0; i < 256; i++) {
- /* symbols[] is the list of Huffman symbols, in code-length order */
- huff_ptr->huffval[i] = symbols[i];
- }
-
-(Note that trying to set cinfo.quant_tbl_ptrs[n] to point directly at a
-constant JQUANT_TBL object is not safe. If the incoming file happened to
-contain a quantization table definition, your master table would get
-overwritten! Instead allocate a working table copy and copy the master table
-into it, as illustrated above. Ditto for Huffman tables, of course.)
-
-You might want to read the tables from a tables-only file, rather than
-hard-wiring them into your application. The jpeg_read_header() call is
-sufficient to read a tables-only file. You must pass a second parameter of
-FALSE to indicate that you do not require an image to be present. Thus, the
-typical scenario is
-
- create JPEG decompression object
- set source to tables-only file
- jpeg_read_header(&cinfo, FALSE);
- set source to abbreviated image file
- jpeg_read_header(&cinfo, TRUE);
- set decompression parameters
- jpeg_start_decompress(&cinfo);
- read data...
- jpeg_finish_decompress(&cinfo);
-
-In some cases, you may want to read a file without knowing whether it contains
-an image or just tables. In that case, pass FALSE and check the return value
-from jpeg_read_header(): it will be JPEG_HEADER_OK if an image was found,
-JPEG_HEADER_TABLES_ONLY if only tables were found. (A third return value,
-JPEG_SUSPENDED, is possible when using a suspending data source manager.)
-Note that jpeg_read_header() will not complain if you read an abbreviated
-image for which you haven't loaded the missing tables; the missing-table check
-occurs later, in jpeg_start_decompress().
-
-
-It is possible to read a series of images from a single source file by
-repeating the jpeg_read_header() ... jpeg_finish_decompress() sequence,
-without releasing/recreating the JPEG object or the data source module.
-(If you did reinitialize, any partial bufferload left in the data source
-buffer at the end of one image would be discarded, causing you to lose the
-start of the next image.) When you use this method, stored tables are
-automatically carried forward, so some of the images can be abbreviated images
-that depend on tables from earlier images.
-
-If you intend to write a series of images into a single destination file,
-you might want to make a specialized data destination module that doesn't
-flush the output buffer at term_destination() time. This would speed things
-up by some trifling amount. Of course, you'd need to remember to flush the
-buffer after the last image. You can make the later images be abbreviated
-ones by passing FALSE to jpeg_start_compress().
-
-
-Special markers
----------------
-
-Some applications may need to insert or extract special data in the JPEG
-datastream. The JPEG standard provides marker types "COM" (comment) and
-"APP0" through "APP15" (application) to hold application-specific data.
-Unfortunately, the use of these markers is not specified by the standard.
-COM markers are fairly widely used to hold user-supplied text. The JFIF file
-format spec uses APP0 markers with specified initial strings to hold certain
-data. Adobe applications use APP14 markers beginning with the string "Adobe"
-for miscellaneous data. Other APPn markers are rarely seen, but might
-contain almost anything.
-
-If you wish to store user-supplied text, we recommend you use COM markers
-and place readable 7-bit ASCII text in them. Newline conventions are not
-standardized --- expect to find LF (Unix style), CR/LF (DOS style), or CR
-(Mac style). A robust COM reader should be able to cope with random binary
-garbage, including nulls, since some applications generate COM markers
-containing non-ASCII junk. (But yours should not be one of them.)
-
-For program-supplied data, use an APPn marker, and be sure to begin it with an
-identifying string so that you can tell whether the marker is actually yours.
-It's probably best to avoid using APP0 or APP14 for any private markers.
-(NOTE: the upcoming SPIFF standard will use APP8 markers; we recommend you
-not use APP8 markers for any private purposes, either.)
-
-Keep in mind that at most 65533 bytes can be put into one marker, but you
-can have as many markers as you like.
-
-By default, the IJG compression library will write a JFIF APP0 marker if the
-selected JPEG colorspace is grayscale or YCbCr, or an Adobe APP14 marker if
-the selected colorspace is RGB, CMYK, or YCCK. You can disable this, but
-we don't recommend it. The decompression library will recognize JFIF and
-Adobe markers and will set the JPEG colorspace properly when one is found.
-
-
-You can write special markers immediately following the datastream header by
-calling jpeg_write_marker() after jpeg_start_compress() and before the first
-call to jpeg_write_scanlines(). When you do this, the markers appear after
-the SOI and the JFIF APP0 and Adobe APP14 markers (if written), but before
-all else. Specify the marker type parameter as "JPEG_COM" for COM or
-"JPEG_APP0 + n" for APPn. (Actually, jpeg_write_marker will let you write
-any marker type, but we don't recommend writing any other kinds of marker.)
-For example, to write a user comment string pointed to by comment_text:
- jpeg_write_marker(cinfo, JPEG_COM, comment_text, strlen(comment_text));
-
-If it's not convenient to store all the marker data in memory at once,
-you can instead call jpeg_write_m_header() followed by multiple calls to
-jpeg_write_m_byte(). If you do it this way, it's your responsibility to
-call jpeg_write_m_byte() exactly the number of times given in the length
-parameter to jpeg_write_m_header(). (This method lets you empty the
-output buffer partway through a marker, which might be important when
-using a suspending data destination module. In any case, if you are using
-a suspending destination, you should flush its buffer after inserting
-any special markers. See "I/O suspension".)
-
-Or, if you prefer to synthesize the marker byte sequence yourself,
-you can just cram it straight into the data destination module.
-
-If you are writing JFIF 1.02 extension markers (thumbnail images), don't
-forget to set cinfo.JFIF_minor_version = 2 so that the encoder will write the
-correct JFIF version number in the JFIF header marker. The library's default
-is to write version 1.01, but that's wrong if you insert any 1.02 extension
-markers. (We could probably get away with just defaulting to 1.02, but there
-used to be broken decoders that would complain about unknown minor version
-numbers. To reduce compatibility risks it's safest not to write 1.02 unless
-you are actually using 1.02 extensions.)
-
-
-When reading, two methods of handling special markers are available:
-1. You can ask the library to save the contents of COM and/or APPn markers
-into memory, and then examine them at your leisure afterwards.
-2. You can supply your own routine to process COM and/or APPn markers
-on-the-fly as they are read.
-The first method is simpler to use, especially if you are using a suspending
-data source; writing a marker processor that copes with input suspension is
-not easy (consider what happens if the marker is longer than your available
-input buffer). However, the second method conserves memory since the marker
-data need not be kept around after it's been processed.
-
-For either method, you'd normally set up marker handling after creating a
-decompression object and before calling jpeg_read_header(), because the
-markers of interest will typically be near the head of the file and so will
-be scanned by jpeg_read_header. Once you've established a marker handling
-method, it will be used for the life of that decompression object
-(potentially many datastreams), unless you change it. Marker handling is
-determined separately for COM markers and for each APPn marker code.
-
-
-To save the contents of special markers in memory, call
- jpeg_save_markers(cinfo, marker_code, length_limit)
-where marker_code is the marker type to save, JPEG_COM or JPEG_APP0+n.
-(To arrange to save all the special marker types, you need to call this
-routine 17 times, for COM and APP0-APP15.) If the incoming marker is longer
-than length_limit data bytes, only length_limit bytes will be saved; this
-parameter allows you to avoid chewing up memory when you only need to see the
-first few bytes of a potentially large marker. If you want to save all the
-data, set length_limit to 0xFFFF; that is enough since marker lengths are only
-16 bits. As a special case, setting length_limit to 0 prevents that marker
-type from being saved at all. (That is the default behavior, in fact.)
-
-After jpeg_read_header() completes, you can examine the special markers by
-following the cinfo->marker_list pointer chain. All the special markers in
-the file appear in this list, in order of their occurrence in the file (but
-omitting any markers of types you didn't ask for). Both the original data
-length and the saved data length are recorded for each list entry; the latter
-will not exceed length_limit for the particular marker type. Note that these
-lengths exclude the marker length word, whereas the stored representation
-within the JPEG file includes it. (Hence the maximum data length is really
-only 65533.)
-
-It is possible that additional special markers appear in the file beyond the
-SOS marker at which jpeg_read_header stops; if so, the marker list will be
-extended during reading of the rest of the file. This is not expected to be
-common, however. If you are short on memory you may want to reset the length
-limit to zero for all marker types after finishing jpeg_read_header, to
-ensure that the max_memory_to_use setting cannot be exceeded due to addition
-of later markers.
-
-The marker list remains stored until you call jpeg_finish_decompress or
-jpeg_abort, at which point the memory is freed and the list is set to empty.
-(jpeg_destroy also releases the storage, of course.)
-
-Note that the library is internally interested in APP0 and APP14 markers;
-if you try to set a small nonzero length limit on these types, the library
-will silently force the length up to the minimum it wants. (But you can set
-a zero length limit to prevent them from being saved at all.) Also, in a
-16-bit environment, the maximum length limit may be constrained to less than
-65533 by malloc() limitations. It is therefore best not to assume that the
-effective length limit is exactly what you set it to be.
-
-
-If you want to supply your own marker-reading routine, you do it by calling
-jpeg_set_marker_processor(). A marker processor routine must have the
-signature
- boolean jpeg_marker_parser_method (j_decompress_ptr cinfo)
-Although the marker code is not explicitly passed, the routine can find it
-in cinfo->unread_marker. At the time of call, the marker proper has been
-read from the data source module. The processor routine is responsible for
-reading the marker length word and the remaining parameter bytes, if any.
-Return TRUE to indicate success. (FALSE should be returned only if you are
-using a suspending data source and it tells you to suspend. See the standard
-marker processors in jdmarker.c for appropriate coding methods if you need to
-use a suspending data source.)
-
-If you override the default APP0 or APP14 processors, it is up to you to
-recognize JFIF and Adobe markers if you want colorspace recognition to occur
-properly. We recommend copying and extending the default processors if you
-want to do that. (A better idea is to save these marker types for later
-examination by calling jpeg_save_markers(); that method doesn't interfere
-with the library's own processing of these markers.)
-
-jpeg_set_marker_processor() and jpeg_save_markers() are mutually exclusive
---- if you call one it overrides any previous call to the other, for the
-particular marker type specified.
-
-A simple example of an external COM processor can be found in djpeg.c.
-Also, see jpegtran.c for an example of using jpeg_save_markers.
-
-
-Raw (downsampled) image data
-----------------------------
-
-Some applications need to supply already-downsampled image data to the JPEG
-compressor, or to receive raw downsampled data from the decompressor. The
-library supports this requirement by allowing the application to write or
-read raw data, bypassing the normal preprocessing or postprocessing steps.
-The interface is different from the standard one and is somewhat harder to
-use. If your interest is merely in bypassing color conversion, we recommend
-that you use the standard interface and simply set jpeg_color_space =
-in_color_space (or jpeg_color_space = out_color_space for decompression).
-The mechanism described in this section is necessary only to supply or
-receive downsampled image data, in which not all components have the same
-dimensions.
-
-
-To compress raw data, you must supply the data in the colorspace to be used
-in the JPEG file (please read the earlier section on Special color spaces)
-and downsampled to the sampling factors specified in the JPEG parameters.
-You must supply the data in the format used internally by the JPEG library,
-namely a JSAMPIMAGE array. This is an array of pointers to two-dimensional
-arrays, each of type JSAMPARRAY. Each 2-D array holds the values for one
-color component. This structure is necessary since the components are of
-different sizes. If the image dimensions are not a multiple of the MCU size,
-you must also pad the data correctly (usually, this is done by replicating
-the last column and/or row). The data must be padded to a multiple of a DCT
-block in each component: that is, each downsampled row must contain a
-multiple of 8 valid samples, and there must be a multiple of 8 sample rows
-for each component. (For applications such as conversion of digital TV
-images, the standard image size is usually a multiple of the DCT block size,
-so that no padding need actually be done.)
-
-The procedure for compression of raw data is basically the same as normal
-compression, except that you call jpeg_write_raw_data() in place of
-jpeg_write_scanlines(). Before calling jpeg_start_compress(), you must do
-the following:
- * Set cinfo->raw_data_in to TRUE. (It is set FALSE by jpeg_set_defaults().)
- This notifies the library that you will be supplying raw data.
- * Ensure jpeg_color_space is correct --- an explicit jpeg_set_colorspace()
- call is a good idea. Note that since color conversion is bypassed,
- in_color_space is ignored, except that jpeg_set_defaults() uses it to
- choose the default jpeg_color_space setting.
- * Ensure the sampling factors, cinfo->comp_info[i].h_samp_factor and
- cinfo->comp_info[i].v_samp_factor, are correct. Since these indicate the
- dimensions of the data you are supplying, it's wise to set them
- explicitly, rather than assuming the library's defaults are what you want.
-
-To pass raw data to the library, call jpeg_write_raw_data() in place of
-jpeg_write_scanlines(). The two routines work similarly except that
-jpeg_write_raw_data takes a JSAMPIMAGE data array rather than JSAMPARRAY.
-The scanlines count passed to and returned from jpeg_write_raw_data is
-measured in terms of the component with the largest v_samp_factor.
-
-jpeg_write_raw_data() processes one MCU row per call, which is to say
-v_samp_factor*DCTSIZE sample rows of each component. The passed num_lines
-value must be at least max_v_samp_factor*DCTSIZE, and the return value will
-be exactly that amount (or possibly some multiple of that amount, in future
-library versions). This is true even on the last call at the bottom of the
-image; don't forget to pad your data as necessary.
-
-The required dimensions of the supplied data can be computed for each
-component as
- cinfo->comp_info[i].width_in_blocks*DCTSIZE samples per row
- cinfo->comp_info[i].height_in_blocks*DCTSIZE rows in image
-after jpeg_start_compress() has initialized those fields. If the valid data
-is smaller than this, it must be padded appropriately. For some sampling
-factors and image sizes, additional dummy DCT blocks are inserted to make
-the image a multiple of the MCU dimensions. The library creates such dummy
-blocks itself; it does not read them from your supplied data. Therefore you
-need never pad by more than DCTSIZE samples. An example may help here.
-Assume 2h2v downsampling of YCbCr data, that is
- cinfo->comp_info[0].h_samp_factor = 2 for Y
- cinfo->comp_info[0].v_samp_factor = 2
- cinfo->comp_info[1].h_samp_factor = 1 for Cb
- cinfo->comp_info[1].v_samp_factor = 1
- cinfo->comp_info[2].h_samp_factor = 1 for Cr
- cinfo->comp_info[2].v_samp_factor = 1
-and suppose that the nominal image dimensions (cinfo->image_width and
-cinfo->image_height) are 101x101 pixels. Then jpeg_start_compress() will
-compute downsampled_width = 101 and width_in_blocks = 13 for Y,
-downsampled_width = 51 and width_in_blocks = 7 for Cb and Cr (and the same
-for the height fields). You must pad the Y data to at least 13*8 = 104
-columns and rows, the Cb/Cr data to at least 7*8 = 56 columns and rows. The
-MCU height is max_v_samp_factor = 2 DCT rows so you must pass at least 16
-scanlines on each call to jpeg_write_raw_data(), which is to say 16 actual
-sample rows of Y and 8 each of Cb and Cr. A total of 7 MCU rows are needed,
-so you must pass a total of 7*16 = 112 "scanlines". The last DCT block row
-of Y data is dummy, so it doesn't matter what you pass for it in the data
-arrays, but the scanlines count must total up to 112 so that all of the Cb
-and Cr data gets passed.
-
-Output suspension is supported with raw-data compression: if the data
-destination module suspends, jpeg_write_raw_data() will return 0.
-In this case the same data rows must be passed again on the next call.
-
-
-Decompression with raw data output implies bypassing all postprocessing:
-you cannot ask for rescaling or color quantization, for instance. More
-seriously, you must deal with the color space and sampling factors present in
-the incoming file. If your application only handles, say, 2h1v YCbCr data,
-you must check for and fail on other color spaces or other sampling factors.
-The library will not convert to a different color space for you.
-
-To obtain raw data output, set cinfo->raw_data_out = TRUE before
-jpeg_start_decompress() (it is set FALSE by jpeg_read_header()). Be sure to
-verify that the color space and sampling factors are ones you can handle.
-Then call jpeg_read_raw_data() in place of jpeg_read_scanlines(). The
-decompression process is otherwise the same as usual.
-
-jpeg_read_raw_data() returns one MCU row per call, and thus you must pass a
-buffer of at least max_v_samp_factor*DCTSIZE scanlines (scanline counting is
-the same as for raw-data compression). The buffer you pass must be large
-enough to hold the actual data plus padding to DCT-block boundaries. As with
-compression, any entirely dummy DCT blocks are not processed so you need not
-allocate space for them, but the total scanline count includes them. The
-above example of computing buffer dimensions for raw-data compression is
-equally valid for decompression.
-
-Input suspension is supported with raw-data decompression: if the data source
-module suspends, jpeg_read_raw_data() will return 0. You can also use
-buffered-image mode to read raw data in multiple passes.
-
-
-Really raw data: DCT coefficients
----------------------------------
-
-It is possible to read or write the contents of a JPEG file as raw DCT
-coefficients. This facility is mainly intended for use in lossless
-transcoding between different JPEG file formats. Other possible applications
-include lossless cropping of a JPEG image, lossless reassembly of a
-multi-strip or multi-tile TIFF/JPEG file into a single JPEG datastream, etc.
-
-To read the contents of a JPEG file as DCT coefficients, open the file and do
-jpeg_read_header() as usual. But instead of calling jpeg_start_decompress()
-and jpeg_read_scanlines(), call jpeg_read_coefficients(). This will read the
-entire image into a set of virtual coefficient-block arrays, one array per
-component. The return value is a pointer to an array of virtual-array
-descriptors. Each virtual array can be accessed directly using the JPEG
-memory manager's access_virt_barray method (see Memory management, below,
-and also read structure.doc's discussion of virtual array handling). Or,
-for simple transcoding to a different JPEG file format, the array list can
-just be handed directly to jpeg_write_coefficients().
-
-Each block in the block arrays contains quantized coefficient values in
-normal array order (not JPEG zigzag order). The block arrays contain only
-DCT blocks containing real data; any entirely-dummy blocks added to fill out
-interleaved MCUs at the right or bottom edges of the image are discarded
-during reading and are not stored in the block arrays. (The size of each
-block array can be determined from the width_in_blocks and height_in_blocks
-fields of the component's comp_info entry.) This is also the data format
-expected by jpeg_write_coefficients().
-
-When you are done using the virtual arrays, call jpeg_finish_decompress()
-to release the array storage and return the decompression object to an idle
-state; or just call jpeg_destroy() if you don't need to reuse the object.
-
-If you use a suspending data source, jpeg_read_coefficients() will return
-NULL if it is forced to suspend; a non-NULL return value indicates successful
-completion. You need not test for a NULL return value when using a
-non-suspending data source.
-
-It is also possible to call jpeg_read_coefficients() to obtain access to the
-decoder's coefficient arrays during a normal decode cycle in buffered-image
-mode. This frammish might be useful for progressively displaying an incoming
-image and then re-encoding it without loss. To do this, decode in buffered-
-image mode as discussed previously, then call jpeg_read_coefficients() after
-the last jpeg_finish_output() call. The arrays will be available for your use
-until you call jpeg_finish_decompress().
-
-
-To write the contents of a JPEG file as DCT coefficients, you must provide
-the DCT coefficients stored in virtual block arrays. You can either pass
-block arrays read from an input JPEG file by jpeg_read_coefficients(), or
-allocate virtual arrays from the JPEG compression object and fill them
-yourself. In either case, jpeg_write_coefficients() is substituted for
-jpeg_start_compress() and jpeg_write_scanlines(). Thus the sequence is
- * Create compression object
- * Set all compression parameters as necessary
- * Request virtual arrays if needed
- * jpeg_write_coefficients()
- * jpeg_finish_compress()
- * Destroy or re-use compression object
-jpeg_write_coefficients() is passed a pointer to an array of virtual block
-array descriptors; the number of arrays is equal to cinfo.num_components.
-
-The virtual arrays need only have been requested, not realized, before
-jpeg_write_coefficients() is called. A side-effect of
-jpeg_write_coefficients() is to realize any virtual arrays that have been
-requested from the compression object's memory manager. Thus, when obtaining
-the virtual arrays from the compression object, you should fill the arrays
-after calling jpeg_write_coefficients(). The data is actually written out
-when you call jpeg_finish_compress(); jpeg_write_coefficients() only writes
-the file header.
-
-When writing raw DCT coefficients, it is crucial that the JPEG quantization
-tables and sampling factors match the way the data was encoded, or the
-resulting file will be invalid. For transcoding from an existing JPEG file,
-we recommend using jpeg_copy_critical_parameters(). This routine initializes
-all the compression parameters to default values (like jpeg_set_defaults()),
-then copies the critical information from a source decompression object.
-The decompression object should have just been used to read the entire
-JPEG input file --- that is, it should be awaiting jpeg_finish_decompress().
-
-jpeg_write_coefficients() marks all tables stored in the compression object
-as needing to be written to the output file (thus, it acts like
-jpeg_start_compress(cinfo, TRUE)). This is for safety's sake, to avoid
-emitting abbreviated JPEG files by accident. If you really want to emit an
-abbreviated JPEG file, call jpeg_suppress_tables(), or set the tables'
-individual sent_table flags, between calling jpeg_write_coefficients() and
-jpeg_finish_compress().
-
-
-Progress monitoring
--------------------
-
-Some applications may need to regain control from the JPEG library every so
-often. The typical use of this feature is to produce a percent-done bar or
-other progress display. (For a simple example, see cjpeg.c or djpeg.c.)
-Although you do get control back frequently during the data-transferring pass
-(the jpeg_read_scanlines or jpeg_write_scanlines loop), any additional passes
-will occur inside jpeg_finish_compress or jpeg_start_decompress; those
-routines may take a long time to execute, and you don't get control back
-until they are done.
-
-You can define a progress-monitor routine which will be called periodically
-by the library. No guarantees are made about how often this call will occur,
-so we don't recommend you use it for mouse tracking or anything like that.
-At present, a call will occur once per MCU row, scanline, or sample row
-group, whichever unit is convenient for the current processing mode; so the
-wider the image, the longer the time between calls. During the data
-transferring pass, only one call occurs per call of jpeg_read_scanlines or
-jpeg_write_scanlines, so don't pass a large number of scanlines at once if
-you want fine resolution in the progress count. (If you really need to use
-the callback mechanism for time-critical tasks like mouse tracking, you could
-insert additional calls inside some of the library's inner loops.)
-
-To establish a progress-monitor callback, create a struct jpeg_progress_mgr,
-fill in its progress_monitor field with a pointer to your callback routine,
-and set cinfo->progress to point to the struct. The callback will be called
-whenever cinfo->progress is non-NULL. (This pointer is set to NULL by
-jpeg_create_compress or jpeg_create_decompress; the library will not change
-it thereafter. So if you allocate dynamic storage for the progress struct,
-make sure it will live as long as the JPEG object does. Allocating from the
-JPEG memory manager with lifetime JPOOL_PERMANENT will work nicely.) You
-can use the same callback routine for both compression and decompression.
-
-The jpeg_progress_mgr struct contains four fields which are set by the library:
- long pass_counter; /* work units completed in this pass */
- long pass_limit; /* total number of work units in this pass */
- int completed_passes; /* passes completed so far */
- int total_passes; /* total number of passes expected */
-During any one pass, pass_counter increases from 0 up to (not including)
-pass_limit; the step size is usually but not necessarily 1. The pass_limit
-value may change from one pass to another. The expected total number of
-passes is in total_passes, and the number of passes already completed is in
-completed_passes. Thus the fraction of work completed may be estimated as
- completed_passes + (pass_counter/pass_limit)
- --------------------------------------------
- total_passes
-ignoring the fact that the passes may not be equal amounts of work.
-
-When decompressing, pass_limit can even change within a pass, because it
-depends on the number of scans in the JPEG file, which isn't always known in
-advance. The computed fraction-of-work-done may jump suddenly (if the library
-discovers it has overestimated the number of scans) or even decrease (in the
-opposite case). It is not wise to put great faith in the work estimate.
-
-When using the decompressor's buffered-image mode, the progress monitor work
-estimate is likely to be completely unhelpful, because the library has no way
-to know how many output passes will be demanded of it. Currently, the library
-sets total_passes based on the assumption that there will be one more output
-pass if the input file end hasn't yet been read (jpeg_input_complete() isn't
-TRUE), but no more output passes if the file end has been reached when the
-output pass is started. This means that total_passes will rise as additional
-output passes are requested. If you have a way of determining the input file
-size, estimating progress based on the fraction of the file that's been read
-will probably be more useful than using the library's value.
-
-
-Memory management
------------------
-
-This section covers some key facts about the JPEG library's built-in memory
-manager. For more info, please read structure.doc's section about the memory
-manager, and consult the source code if necessary.
-
-All memory and temporary file allocation within the library is done via the
-memory manager. If necessary, you can replace the "back end" of the memory
-manager to control allocation yourself (for example, if you don't want the
-library to use malloc() and free() for some reason).
-
-Some data is allocated "permanently" and will not be freed until the JPEG
-object is destroyed. Most data is allocated "per image" and is freed by
-jpeg_finish_compress, jpeg_finish_decompress, or jpeg_abort. You can call the
-memory manager yourself to allocate structures that will automatically be
-freed at these times. Typical code for this is
- ptr = (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, size);
-Use JPOOL_PERMANENT to get storage that lasts as long as the JPEG object.
-Use alloc_large instead of alloc_small for anything bigger than a few Kbytes.
-There are also alloc_sarray and alloc_barray routines that automatically
-build 2-D sample or block arrays.
-
-The library's minimum space requirements to process an image depend on the
-image's width, but not on its height, because the library ordinarily works
-with "strip" buffers that are as wide as the image but just a few rows high.
-Some operating modes (eg, two-pass color quantization) require full-image
-buffers. Such buffers are treated as "virtual arrays": only the current strip
-need be in memory, and the rest can be swapped out to a temporary file.
-
-If you use the simplest memory manager back end (jmemnobs.c), then no
-temporary files are used; virtual arrays are simply malloc()'d. Images bigger
-than memory can be processed only if your system supports virtual memory.
-The other memory manager back ends support temporary files of various flavors
-and thus work in machines without virtual memory. They may also be useful on
-Unix machines if you need to process images that exceed available swap space.
-
-When using temporary files, the library will make the in-memory buffers for
-its virtual arrays just big enough to stay within a "maximum memory" setting.
-Your application can set this limit by setting cinfo->mem->max_memory_to_use
-after creating the JPEG object. (Of course, there is still a minimum size for
-the buffers, so the max-memory setting is effective only if it is bigger than
-the minimum space needed.) If you allocate any large structures yourself, you
-must allocate them before jpeg_start_compress() or jpeg_start_decompress() in
-order to have them counted against the max memory limit. Also keep in mind
-that space allocated with alloc_small() is ignored, on the assumption that
-it's too small to be worth worrying about; so a reasonable safety margin
-should be left when setting max_memory_to_use.
-
-If you use the jmemname.c or jmemdos.c memory manager back end, it is
-important to clean up the JPEG object properly to ensure that the temporary
-files get deleted. (This is especially crucial with jmemdos.c, where the
-"temporary files" may be extended-memory segments; if they are not freed,
-DOS will require a reboot to recover the memory.) Thus, with these memory
-managers, it's a good idea to provide a signal handler that will trap any
-early exit from your program. The handler should call either jpeg_abort()
-or jpeg_destroy() for any active JPEG objects. A handler is not needed with
-jmemnobs.c, and shouldn't be necessary with jmemansi.c or jmemmac.c either,
-since the C library is supposed to take care of deleting files made with
-tmpfile().
-
-
-Memory usage
-------------
-
-Working memory requirements while performing compression or decompression
-depend on image dimensions, image characteristics (such as colorspace and
-JPEG process), and operating mode (application-selected options).
-
-As of v6b, the decompressor requires:
- 1. About 24K in more-or-less-fixed-size data. This varies a bit depending
- on operating mode and image characteristics (particularly color vs.
- grayscale), but it doesn't depend on image dimensions.
- 2. Strip buffers (of size proportional to the image width) for IDCT and
- upsampling results. The worst case for commonly used sampling factors
- is about 34 bytes * width in pixels for a color image. A grayscale image
- only needs about 8 bytes per pixel column.
- 3. A full-image DCT coefficient buffer is needed to decode a multi-scan JPEG
- file (including progressive JPEGs), or whenever you select buffered-image
- mode. This takes 2 bytes/coefficient. At typical 2x2 sampling, that's
- 3 bytes per pixel for a color image. Worst case (1x1 sampling) requires
- 6 bytes/pixel. For grayscale, figure 2 bytes/pixel.
- 4. To perform 2-pass color quantization, the decompressor also needs a
- 128K color lookup table and a full-image pixel buffer (3 bytes/pixel).
-This does not count any memory allocated by the application, such as a
-buffer to hold the final output image.
-
-The above figures are valid for 8-bit JPEG data precision and a machine with
-32-bit ints. For 12-bit JPEG data, double the size of the strip buffers and
-quantization pixel buffer. The "fixed-size" data will be somewhat smaller
-with 16-bit ints, larger with 64-bit ints. Also, CMYK or other unusual
-color spaces will require different amounts of space.
-
-The full-image coefficient and pixel buffers, if needed at all, do not
-have to be fully RAM resident; you can have the library use temporary
-files instead when the total memory usage would exceed a limit you set.
-(But if your OS supports virtual memory, it's probably better to just use
-jmemnobs and let the OS do the swapping.)
-
-The compressor's memory requirements are similar, except that it has no need
-for color quantization. Also, it needs a full-image DCT coefficient buffer
-if Huffman-table optimization is asked for, even if progressive mode is not
-requested.
-
-If you need more detailed information about memory usage in a particular
-situation, you can enable the MEM_STATS code in jmemmgr.c.
-
-
-Library compile-time options
-----------------------------
-
-A number of compile-time options are available by modifying jmorecfg.h.
-
-The JPEG standard provides for both the baseline 8-bit DCT process and
-a 12-bit DCT process. The IJG code supports 12-bit lossy JPEG if you define
-BITS_IN_JSAMPLE as 12 rather than 8. Note that this causes JSAMPLE to be
-larger than a char, so it affects the surrounding application's image data.
-The sample applications cjpeg and djpeg can support 12-bit mode only for PPM
-and GIF file formats; you must disable the other file formats to compile a
-12-bit cjpeg or djpeg. (install.doc has more information about that.)
-At present, a 12-bit library can handle *only* 12-bit images, not both
-precisions. (If you need to include both 8- and 12-bit libraries in a single
-application, you could probably do it by defining NEED_SHORT_EXTERNAL_NAMES
-for just one of the copies. You'd have to access the 8-bit and 12-bit copies
-from separate application source files. This is untested ... if you try it,
-we'd like to hear whether it works!)
-
-Note that a 12-bit library always compresses in Huffman optimization mode,
-in order to generate valid Huffman tables. This is necessary because our
-default Huffman tables only cover 8-bit data. If you need to output 12-bit
-files in one pass, you'll have to supply suitable default Huffman tables.
-You may also want to supply your own DCT quantization tables; the existing
-quality-scaling code has been developed for 8-bit use, and probably doesn't
-generate especially good tables for 12-bit.
-
-The maximum number of components (color channels) in the image is determined
-by MAX_COMPONENTS. The JPEG standard allows up to 255 components, but we
-expect that few applications will need more than four or so.
-
-On machines with unusual data type sizes, you may be able to improve
-performance or reduce memory space by tweaking the various typedefs in
-jmorecfg.h. In particular, on some RISC CPUs, access to arrays of "short"s
-is quite slow; consider trading memory for speed by making JCOEF, INT16, and
-UINT16 be "int" or "unsigned int". UINT8 is also a candidate to become int.
-You probably don't want to make JSAMPLE be int unless you have lots of memory
-to burn.
-
-You can reduce the size of the library by compiling out various optional
-functions. To do this, undefine xxx_SUPPORTED symbols as necessary.
-
-You can also save a few K by not having text error messages in the library;
-the standard error message table occupies about 5Kb. This is particularly
-reasonable for embedded applications where there's no good way to display
-a message anyway. To do this, remove the creation of the message table
-(jpeg_std_message_table[]) from jerror.c, and alter format_message to do
-something reasonable without it. You could output the numeric value of the
-message code number, for example. If you do this, you can also save a couple
-more K by modifying the TRACEMSn() macros in jerror.h to expand to nothing;
-you don't need trace capability anyway, right?
-
-
-Portability considerations
---------------------------
-
-The JPEG library has been written to be extremely portable; the sample
-applications cjpeg and djpeg are slightly less so. This section summarizes
-the design goals in this area. (If you encounter any bugs that cause the
-library to be less portable than is claimed here, we'd appreciate hearing
-about them.)
-
-The code works fine on ANSI C, C++, and pre-ANSI C compilers, using any of
-the popular system include file setups, and some not-so-popular ones too.
-See install.doc for configuration procedures.
-
-The code is not dependent on the exact sizes of the C data types. As
-distributed, we make the assumptions that
- char is at least 8 bits wide
- short is at least 16 bits wide
- int is at least 16 bits wide
- long is at least 32 bits wide
-(These are the minimum requirements of the ANSI C standard.) Wider types will
-work fine, although memory may be used inefficiently if char is much larger
-than 8 bits or short is much bigger than 16 bits. The code should work
-equally well with 16- or 32-bit ints.
-
-In a system where these assumptions are not met, you may be able to make the
-code work by modifying the typedefs in jmorecfg.h. However, you will probably
-have difficulty if int is less than 16 bits wide, since references to plain
-int abound in the code.
-
-char can be either signed or unsigned, although the code runs faster if an
-unsigned char type is available. If char is wider than 8 bits, you will need
-to redefine JOCTET and/or provide custom data source/destination managers so
-that JOCTET represents exactly 8 bits of data on external storage.
-
-The JPEG library proper does not assume ASCII representation of characters.
-But some of the image file I/O modules in cjpeg/djpeg do have ASCII
-dependencies in file-header manipulation; so does cjpeg's select_file_type()
-routine.
-
-The JPEG library does not rely heavily on the C library. In particular, C
-stdio is used only by the data source/destination modules and the error
-handler, all of which are application-replaceable. (cjpeg/djpeg are more
-heavily dependent on stdio.) malloc and free are called only from the memory
-manager "back end" module, so you can use a different memory allocator by
-replacing that one file.
-
-The code generally assumes that C names must be unique in the first 15
-characters. However, global function names can be made unique in the
-first 6 characters by defining NEED_SHORT_EXTERNAL_NAMES.
-
-More info about porting the code may be gleaned by reading jconfig.doc,
-jmorecfg.h, and jinclude.h.
-
-
-Notes for MS-DOS implementors
------------------------------
-
-The IJG code is designed to work efficiently in 80x86 "small" or "medium"
-memory models (i.e., data pointers are 16 bits unless explicitly declared
-"far"; code pointers can be either size). You may be able to use small
-model to compile cjpeg or djpeg by itself, but you will probably have to use
-medium model for any larger application. This won't make much difference in
-performance. You *will* take a noticeable performance hit if you use a
-large-data memory model (perhaps 10%-25%), and you should avoid "huge" model
-if at all possible.
-
-The JPEG library typically needs 2Kb-3Kb of stack space. It will also
-malloc about 20K-30K of near heap space while executing (and lots of far
-heap, but that doesn't count in this calculation). This figure will vary
-depending on selected operating mode, and to a lesser extent on image size.
-There is also about 5Kb-6Kb of constant data which will be allocated in the
-near data segment (about 4Kb of this is the error message table).
-Thus you have perhaps 20K available for other modules' static data and near
-heap space before you need to go to a larger memory model. The C library's
-static data will account for several K of this, but that still leaves a good
-deal for your needs. (If you are tight on space, you could reduce the sizes
-of the I/O buffers allocated by jdatasrc.c and jdatadst.c, say from 4K to
-1K. Another possibility is to move the error message table to far memory;
-this should be doable with only localized hacking on jerror.c.)
-
-About 2K of the near heap space is "permanent" memory that will not be
-released until you destroy the JPEG object. This is only an issue if you
-save a JPEG object between compression or decompression operations.
-
-Far data space may also be a tight resource when you are dealing with large
-images. The most memory-intensive case is decompression with two-pass color
-quantization, or single-pass quantization to an externally supplied color
-map. This requires a 128Kb color lookup table plus strip buffers amounting
-to about 40 bytes per column for typical sampling ratios (eg, about 25600
-bytes for a 640-pixel-wide image). You may not be able to process wide
-images if you have large data structures of your own.
-
-Of course, all of these concerns vanish if you use a 32-bit flat-memory-model
-compiler, such as DJGPP or Watcom C. We highly recommend flat model if you
-can use it; the JPEG library is significantly faster in flat model.
diff --git a/src/3rdparty/libjpeg/libjpeg.map b/src/3rdparty/libjpeg/libjpeg.map
new file mode 100644
index 0000000000..ac77dca781
--- /dev/null
+++ b/src/3rdparty/libjpeg/libjpeg.map
@@ -0,0 +1,4 @@
+LIBJPEG_8.0 {
+ global:
+ *;
+};
diff --git a/src/3rdparty/libjpeg/libjpeg.txt b/src/3rdparty/libjpeg/libjpeg.txt
new file mode 100644
index 0000000000..e5a85c0e3e
--- /dev/null
+++ b/src/3rdparty/libjpeg/libjpeg.txt
@@ -0,0 +1,3070 @@
+USING THE IJG JPEG LIBRARY
+
+Copyright (C) 1994-2009, Thomas G. Lane, Guido Vollbeding.
+This file is part of the Independent JPEG Group's software.
+For conditions of distribution and use, see the accompanying README file.
+
+
+This file describes how to use the IJG JPEG library within an application
+program. Read it if you want to write a program that uses the library.
+
+The file example.c provides heavily commented skeleton code for calling the
+JPEG library. Also see jpeglib.h (the include file to be used by application
+programs) for full details about data structures and function parameter lists.
+The library source code, of course, is the ultimate reference.
+
+Note that there have been *major* changes from the application interface
+presented by IJG version 4 and earlier versions. The old design had several
+inherent limitations, and it had accumulated a lot of cruft as we added
+features while trying to minimize application-interface changes. We have
+sacrificed backward compatibility in the version 5 rewrite, but we think the
+improvements justify this.
+
+
+TABLE OF CONTENTS
+-----------------
+
+Overview:
+ Functions provided by the library
+ Outline of typical usage
+Basic library usage:
+ Data formats
+ Compression details
+ Decompression details
+ Mechanics of usage: include files, linking, etc
+Advanced features:
+ Compression parameter selection
+ Decompression parameter selection
+ Special color spaces
+ Error handling
+ Compressed data handling (source and destination managers)
+ I/O suspension
+ Progressive JPEG support
+ Buffered-image mode
+ Abbreviated datastreams and multiple images
+ Special markers
+ Raw (downsampled) image data
+ Really raw data: DCT coefficients
+ Progress monitoring
+ Memory management
+ Memory usage
+ Library compile-time options
+ Portability considerations
+ Notes for MS-DOS implementors
+
+You should read at least the overview and basic usage sections before trying
+to program with the library. The sections on advanced features can be read
+if and when you need them.
+
+
+OVERVIEW
+========
+
+Functions provided by the library
+---------------------------------
+
+The IJG JPEG library provides C code to read and write JPEG-compressed image
+files. The surrounding application program receives or supplies image data a
+scanline at a time, using a straightforward uncompressed image format. All
+details of color conversion and other preprocessing/postprocessing can be
+handled by the library.
+
+The library includes a substantial amount of code that is not covered by the
+JPEG standard but is necessary for typical applications of JPEG. These
+functions preprocess the image before JPEG compression or postprocess it after
+decompression. They include colorspace conversion, downsampling/upsampling,
+and color quantization. The application indirectly selects use of this code
+by specifying the format in which it wishes to supply or receive image data.
+For example, if colormapped output is requested, then the decompression
+library automatically invokes color quantization.
+
+A wide range of quality vs. speed tradeoffs are possible in JPEG processing,
+and even more so in decompression postprocessing. The decompression library
+provides multiple implementations that cover most of the useful tradeoffs,
+ranging from very-high-quality down to fast-preview operation. On the
+compression side we have generally not provided low-quality choices, since
+compression is normally less time-critical. It should be understood that the
+low-quality modes may not meet the JPEG standard's accuracy requirements;
+nonetheless, they are useful for viewers.
+
+A word about functions *not* provided by the library. We handle a subset of
+the ISO JPEG standard; most baseline, extended-sequential, and progressive
+JPEG processes are supported. (Our subset includes all features now in common
+use.) Unsupported ISO options include:
+ * Hierarchical storage
+ * Lossless JPEG
+ * DNL marker
+ * Nonintegral subsampling ratios
+We support both 8- and 12-bit data precision, but this is a compile-time
+choice rather than a run-time choice; hence it is difficult to use both
+precisions in a single application.
+
+By itself, the library handles only interchange JPEG datastreams --- in
+particular the widely used JFIF file format. The library can be used by
+surrounding code to process interchange or abbreviated JPEG datastreams that
+are embedded in more complex file formats. (For example, this library is
+used by the free LIBTIFF library to support JPEG compression in TIFF.)
+
+
+Outline of typical usage
+------------------------
+
+The rough outline of a JPEG compression operation is:
+
+ Allocate and initialize a JPEG compression object
+ Specify the destination for the compressed data (eg, a file)
+ Set parameters for compression, including image size & colorspace
+ jpeg_start_compress(...);
+ while (scan lines remain to be written)
+ jpeg_write_scanlines(...);
+ jpeg_finish_compress(...);
+ Release the JPEG compression object
+
+A JPEG compression object holds parameters and working state for the JPEG
+library. We make creation/destruction of the object separate from starting
+or finishing compression of an image; the same object can be re-used for a
+series of image compression operations. This makes it easy to re-use the
+same parameter settings for a sequence of images. Re-use of a JPEG object
+also has important implications for processing abbreviated JPEG datastreams,
+as discussed later.
+
+The image data to be compressed is supplied to jpeg_write_scanlines() from
+in-memory buffers. If the application is doing file-to-file compression,
+reading image data from the source file is the application's responsibility.
+The library emits compressed data by calling a "data destination manager",
+which typically will write the data into a file; but the application can
+provide its own destination manager to do something else.
+
+Similarly, the rough outline of a JPEG decompression operation is:
+
+ Allocate and initialize a JPEG decompression object
+ Specify the source of the compressed data (eg, a file)
+ Call jpeg_read_header() to obtain image info
+ Set parameters for decompression
+ jpeg_start_decompress(...);
+ while (scan lines remain to be read)
+ jpeg_read_scanlines(...);
+ jpeg_finish_decompress(...);
+ Release the JPEG decompression object
+
+This is comparable to the compression outline except that reading the
+datastream header is a separate step. This is helpful because information
+about the image's size, colorspace, etc is available when the application
+selects decompression parameters. For example, the application can choose an
+output scaling ratio that will fit the image into the available screen size.
+
+The decompression library obtains compressed data by calling a data source
+manager, which typically will read the data from a file; but other behaviors
+can be obtained with a custom source manager. Decompressed data is delivered
+into in-memory buffers passed to jpeg_read_scanlines().
+
+It is possible to abort an incomplete compression or decompression operation
+by calling jpeg_abort(); or, if you do not need to retain the JPEG object,
+simply release it by calling jpeg_destroy().
+
+JPEG compression and decompression objects are two separate struct types.
+However, they share some common fields, and certain routines such as
+jpeg_destroy() can work on either type of object.
+
+The JPEG library has no static variables: all state is in the compression
+or decompression object. Therefore it is possible to process multiple
+compression and decompression operations concurrently, using multiple JPEG
+objects.
+
+Both compression and decompression can be done in an incremental memory-to-
+memory fashion, if suitable source/destination managers are used. See the
+section on "I/O suspension" for more details.
+
+
+BASIC LIBRARY USAGE
+===================
+
+Data formats
+------------
+
+Before diving into procedural details, it is helpful to understand the
+image data format that the JPEG library expects or returns.
+
+The standard input image format is a rectangular array of pixels, with each
+pixel having the same number of "component" or "sample" values (color
+channels). You must specify how many components there are and the colorspace
+interpretation of the components. Most applications will use RGB data
+(three components per pixel) or grayscale data (one component per pixel).
+PLEASE NOTE THAT RGB DATA IS THREE SAMPLES PER PIXEL, GRAYSCALE ONLY ONE.
+A remarkable number of people manage to miss this, only to find that their
+programs don't work with grayscale JPEG files.
+
+There is no provision for colormapped input. JPEG files are always full-color
+or full grayscale (or sometimes another colorspace such as CMYK). You can
+feed in a colormapped image by expanding it to full-color format. However
+JPEG often doesn't work very well with source data that has been colormapped,
+because of dithering noise. This is discussed in more detail in the JPEG FAQ
+and the other references mentioned in the README file.
+
+Pixels are stored by scanlines, with each scanline running from left to
+right. The component values for each pixel are adjacent in the row; for
+example, R,G,B,R,G,B,R,G,B,... for 24-bit RGB color. Each scanline is an
+array of data type JSAMPLE --- which is typically "unsigned char", unless
+you've changed jmorecfg.h. (You can also change the RGB pixel layout, say
+to B,G,R order, by modifying jmorecfg.h. But see the restrictions listed in
+that file before doing so.)
+
+A 2-D array of pixels is formed by making a list of pointers to the starts of
+scanlines; so the scanlines need not be physically adjacent in memory. Even
+if you process just one scanline at a time, you must make a one-element
+pointer array to conform to this structure. Pointers to JSAMPLE rows are of
+type JSAMPROW, and the pointer to the pointer array is of type JSAMPARRAY.
+
+The library accepts or supplies one or more complete scanlines per call.
+It is not possible to process part of a row at a time. Scanlines are always
+processed top-to-bottom. You can process an entire image in one call if you
+have it all in memory, but usually it's simplest to process one scanline at
+a time.
+
+For best results, source data values should have the precision specified by
+BITS_IN_JSAMPLE (normally 8 bits). For instance, if you choose to compress
+data that's only 6 bits/channel, you should left-justify each value in a
+byte before passing it to the compressor. If you need to compress data
+that has more than 8 bits/channel, compile with BITS_IN_JSAMPLE = 12.
+(See "Library compile-time options", later.)
+
+
+The data format returned by the decompressor is the same in all details,
+except that colormapped output is supported. (Again, a JPEG file is never
+colormapped. But you can ask the decompressor to perform on-the-fly color
+quantization to deliver colormapped output.) If you request colormapped
+output then the returned data array contains a single JSAMPLE per pixel;
+its value is an index into a color map. The color map is represented as
+a 2-D JSAMPARRAY in which each row holds the values of one color component,
+that is, colormap[i][j] is the value of the i'th color component for pixel
+value (map index) j. Note that since the colormap indexes are stored in
+JSAMPLEs, the maximum number of colors is limited by the size of JSAMPLE
+(ie, at most 256 colors for an 8-bit JPEG library).
+
+
+Compression details
+-------------------
+
+Here we revisit the JPEG compression outline given in the overview.
+
+1. Allocate and initialize a JPEG compression object.
+
+A JPEG compression object is a "struct jpeg_compress_struct". (It also has
+a bunch of subsidiary structures which are allocated via malloc(), but the
+application doesn't control those directly.) This struct can be just a local
+variable in the calling routine, if a single routine is going to execute the
+whole JPEG compression sequence. Otherwise it can be static or allocated
+from malloc().
+
+You will also need a structure representing a JPEG error handler. The part
+of this that the library cares about is a "struct jpeg_error_mgr". If you
+are providing your own error handler, you'll typically want to embed the
+jpeg_error_mgr struct in a larger structure; this is discussed later under
+"Error handling". For now we'll assume you are just using the default error
+handler. The default error handler will print JPEG error/warning messages
+on stderr, and it will call exit() if a fatal error occurs.
+
+You must initialize the error handler structure, store a pointer to it into
+the JPEG object's "err" field, and then call jpeg_create_compress() to
+initialize the rest of the JPEG object.
+
+Typical code for this step, if you are using the default error handler, is
+
+ struct jpeg_compress_struct cinfo;
+ struct jpeg_error_mgr jerr;
+ ...
+ cinfo.err = jpeg_std_error(&jerr);
+ jpeg_create_compress(&cinfo);
+
+jpeg_create_compress allocates a small amount of memory, so it could fail
+if you are out of memory. In that case it will exit via the error handler;
+that's why the error handler must be initialized first.
+
+
+2. Specify the destination for the compressed data (eg, a file).
+
+As previously mentioned, the JPEG library delivers compressed data to a
+"data destination" module. The library includes one data destination
+module which knows how to write to a stdio stream. You can use your own
+destination module if you want to do something else, as discussed later.
+
+If you use the standard destination module, you must open the target stdio
+stream beforehand. Typical code for this step looks like:
+
+ FILE * outfile;
+ ...
+ if ((outfile = fopen(filename, "wb")) == NULL) {
+ fprintf(stderr, "can't open %s\n", filename);
+ exit(1);
+ }
+ jpeg_stdio_dest(&cinfo, outfile);
+
+where the last line invokes the standard destination module.
+
+WARNING: it is critical that the binary compressed data be delivered to the
+output file unchanged. On non-Unix systems the stdio library may perform
+newline translation or otherwise corrupt binary data. To suppress this
+behavior, you may need to use a "b" option to fopen (as shown above), or use
+setmode() or another routine to put the stdio stream in binary mode. See
+cjpeg.c and djpeg.c for code that has been found to work on many systems.
+
+You can select the data destination after setting other parameters (step 3),
+if that's more convenient. You may not change the destination between
+calling jpeg_start_compress() and jpeg_finish_compress().
+
+
+3. Set parameters for compression, including image size & colorspace.
+
+You must supply information about the source image by setting the following
+fields in the JPEG object (cinfo structure):
+
+ image_width Width of image, in pixels
+ image_height Height of image, in pixels
+ input_components Number of color channels (samples per pixel)
+ in_color_space Color space of source image
+
+The image dimensions are, hopefully, obvious. JPEG supports image dimensions
+of 1 to 64K pixels in either direction. The input color space is typically
+RGB or grayscale, and input_components is 3 or 1 accordingly. (See "Special
+color spaces", later, for more info.) The in_color_space field must be
+assigned one of the J_COLOR_SPACE enum constants, typically JCS_RGB or
+JCS_GRAYSCALE.
+
+JPEG has a large number of compression parameters that determine how the
+image is encoded. Most applications don't need or want to know about all
+these parameters. You can set all the parameters to reasonable defaults by
+calling jpeg_set_defaults(); then, if there are particular values you want
+to change, you can do so after that. The "Compression parameter selection"
+section tells about all the parameters.
+
+You must set in_color_space correctly before calling jpeg_set_defaults(),
+because the defaults depend on the source image colorspace. However the
+other three source image parameters need not be valid until you call
+jpeg_start_compress(). There's no harm in calling jpeg_set_defaults() more
+than once, if that happens to be convenient.
+
+Typical code for a 24-bit RGB source image is
+
+ cinfo.image_width = Width; /* image width and height, in pixels */
+ cinfo.image_height = Height;
+ cinfo.input_components = 3; /* # of color components per pixel */
+ cinfo.in_color_space = JCS_RGB; /* colorspace of input image */
+
+ jpeg_set_defaults(&cinfo);
+ /* Make optional parameter settings here */
+
+
+4. jpeg_start_compress(...);
+
+After you have established the data destination and set all the necessary
+source image info and other parameters, call jpeg_start_compress() to begin
+a compression cycle. This will initialize internal state, allocate working
+storage, and emit the first few bytes of the JPEG datastream header.
+
+Typical code:
+
+ jpeg_start_compress(&cinfo, TRUE);
+
+The "TRUE" parameter ensures that a complete JPEG interchange datastream
+will be written. This is appropriate in most cases. If you think you might
+want to use an abbreviated datastream, read the section on abbreviated
+datastreams, below.
+
+Once you have called jpeg_start_compress(), you may not alter any JPEG
+parameters or other fields of the JPEG object until you have completed
+the compression cycle.
+
+
+5. while (scan lines remain to be written)
+ jpeg_write_scanlines(...);
+
+Now write all the required image data by calling jpeg_write_scanlines()
+one or more times. You can pass one or more scanlines in each call, up
+to the total image height. In most applications it is convenient to pass
+just one or a few scanlines at a time. The expected format for the passed
+data is discussed under "Data formats", above.
+
+Image data should be written in top-to-bottom scanline order. The JPEG spec
+contains some weasel wording about how top and bottom are application-defined
+terms (a curious interpretation of the English language...) but if you want
+your files to be compatible with everyone else's, you WILL use top-to-bottom
+order. If the source data must be read in bottom-to-top order, you can use
+the JPEG library's virtual array mechanism to invert the data efficiently.
+Examples of this can be found in the sample application cjpeg.
+
+The library maintains a count of the number of scanlines written so far
+in the next_scanline field of the JPEG object. Usually you can just use
+this variable as the loop counter, so that the loop test looks like
+"while (cinfo.next_scanline < cinfo.image_height)".
+
+Code for this step depends heavily on the way that you store the source data.
+example.c shows the following code for the case of a full-size 2-D source
+array containing 3-byte RGB pixels:
+
+ JSAMPROW row_pointer[1]; /* pointer to a single row */
+ int row_stride; /* physical row width in buffer */
+
+ row_stride = image_width * 3; /* JSAMPLEs per row in image_buffer */
+
+ while (cinfo.next_scanline < cinfo.image_height) {
+ row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride];
+ jpeg_write_scanlines(&cinfo, row_pointer, 1);
+ }
+
+jpeg_write_scanlines() returns the number of scanlines actually written.
+This will normally be equal to the number passed in, so you can usually
+ignore the return value. It is different in just two cases:
+ * If you try to write more scanlines than the declared image height,
+ the additional scanlines are ignored.
+ * If you use a suspending data destination manager, output buffer overrun
+ will cause the compressor to return before accepting all the passed lines.
+ This feature is discussed under "I/O suspension", below. The normal
+ stdio destination manager will NOT cause this to happen.
+In any case, the return value is the same as the change in the value of
+next_scanline.
+
+
+6. jpeg_finish_compress(...);
+
+After all the image data has been written, call jpeg_finish_compress() to
+complete the compression cycle. This step is ESSENTIAL to ensure that the
+last bufferload of data is written to the data destination.
+jpeg_finish_compress() also releases working memory associated with the JPEG
+object.
+
+Typical code:
+
+ jpeg_finish_compress(&cinfo);
+
+If using the stdio destination manager, don't forget to close the output
+stdio stream (if necessary) afterwards.
+
+If you have requested a multi-pass operating mode, such as Huffman code
+optimization, jpeg_finish_compress() will perform the additional passes using
+data buffered by the first pass. In this case jpeg_finish_compress() may take
+quite a while to complete. With the default compression parameters, this will
+not happen.
+
+It is an error to call jpeg_finish_compress() before writing the necessary
+total number of scanlines. If you wish to abort compression, call
+jpeg_abort() as discussed below.
+
+After completing a compression cycle, you may dispose of the JPEG object
+as discussed next, or you may use it to compress another image. In that case
+return to step 2, 3, or 4 as appropriate. If you do not change the
+destination manager, the new datastream will be written to the same target.
+If you do not change any JPEG parameters, the new datastream will be written
+with the same parameters as before. Note that you can change the input image
+dimensions freely between cycles, but if you change the input colorspace, you
+should call jpeg_set_defaults() to adjust for the new colorspace; and then
+you'll need to repeat all of step 3.
+
+
+7. Release the JPEG compression object.
+
+When you are done with a JPEG compression object, destroy it by calling
+jpeg_destroy_compress(). This will free all subsidiary memory (regardless of
+the previous state of the object). Or you can call jpeg_destroy(), which
+works for either compression or decompression objects --- this may be more
+convenient if you are sharing code between compression and decompression
+cases. (Actually, these routines are equivalent except for the declared type
+of the passed pointer. To avoid gripes from ANSI C compilers, jpeg_destroy()
+should be passed a j_common_ptr.)
+
+If you allocated the jpeg_compress_struct structure from malloc(), freeing
+it is your responsibility --- jpeg_destroy() won't. Ditto for the error
+handler structure.
+
+Typical code:
+
+ jpeg_destroy_compress(&cinfo);
+
+
+8. Aborting.
+
+If you decide to abort a compression cycle before finishing, you can clean up
+in either of two ways:
+
+* If you don't need the JPEG object any more, just call
+ jpeg_destroy_compress() or jpeg_destroy() to release memory. This is
+ legitimate at any point after calling jpeg_create_compress() --- in fact,
+ it's safe even if jpeg_create_compress() fails.
+
+* If you want to re-use the JPEG object, call jpeg_abort_compress(), or call
+ jpeg_abort() which works on both compression and decompression objects.
+ This will return the object to an idle state, releasing any working memory.
+ jpeg_abort() is allowed at any time after successful object creation.
+
+Note that cleaning up the data destination, if required, is your
+responsibility; neither of these routines will call term_destination().
+(See "Compressed data handling", below, for more about that.)
+
+jpeg_destroy() and jpeg_abort() are the only safe calls to make on a JPEG
+object that has reported an error by calling error_exit (see "Error handling"
+for more info). The internal state of such an object is likely to be out of
+whack. Either of these two routines will return the object to a known state.
+
+
+Decompression details
+---------------------
+
+Here we revisit the JPEG decompression outline given in the overview.
+
+1. Allocate and initialize a JPEG decompression object.
+
+This is just like initialization for compression, as discussed above,
+except that the object is a "struct jpeg_decompress_struct" and you
+call jpeg_create_decompress(). Error handling is exactly the same.
+
+Typical code:
+
+ struct jpeg_decompress_struct cinfo;
+ struct jpeg_error_mgr jerr;
+ ...
+ cinfo.err = jpeg_std_error(&jerr);
+ jpeg_create_decompress(&cinfo);
+
+(Both here and in the IJG code, we usually use variable name "cinfo" for
+both compression and decompression objects.)
+
+
+2. Specify the source of the compressed data (eg, a file).
+
+As previously mentioned, the JPEG library reads compressed data from a "data
+source" module. The library includes one data source module which knows how
+to read from a stdio stream. You can use your own source module if you want
+to do something else, as discussed later.
+
+If you use the standard source module, you must open the source stdio stream
+beforehand. Typical code for this step looks like:
+
+ FILE * infile;
+ ...
+ if ((infile = fopen(filename, "rb")) == NULL) {
+ fprintf(stderr, "can't open %s\n", filename);
+ exit(1);
+ }
+ jpeg_stdio_src(&cinfo, infile);
+
+where the last line invokes the standard source module.
+
+WARNING: it is critical that the binary compressed data be read unchanged.
+On non-Unix systems the stdio library may perform newline translation or
+otherwise corrupt binary data. To suppress this behavior, you may need to use
+a "b" option to fopen (as shown above), or use setmode() or another routine to
+put the stdio stream in binary mode. See cjpeg.c and djpeg.c for code that
+has been found to work on many systems.
+
+You may not change the data source between calling jpeg_read_header() and
+jpeg_finish_decompress(). If you wish to read a series of JPEG images from
+a single source file, you should repeat the jpeg_read_header() to
+jpeg_finish_decompress() sequence without reinitializing either the JPEG
+object or the data source module; this prevents buffered input data from
+being discarded.
+
+
+3. Call jpeg_read_header() to obtain image info.
+
+Typical code for this step is just
+
+ jpeg_read_header(&cinfo, TRUE);
+
+This will read the source datastream header markers, up to the beginning
+of the compressed data proper. On return, the image dimensions and other
+info have been stored in the JPEG object. The application may wish to
+consult this information before selecting decompression parameters.
+
+More complex code is necessary if
+ * A suspending data source is used --- in that case jpeg_read_header()
+ may return before it has read all the header data. See "I/O suspension",
+ below. The normal stdio source manager will NOT cause this to happen.
+ * Abbreviated JPEG files are to be processed --- see the section on
+ abbreviated datastreams. Standard applications that deal only in
+ interchange JPEG files need not be concerned with this case either.
+
+It is permissible to stop at this point if you just wanted to find out the
+image dimensions and other header info for a JPEG file. In that case,
+call jpeg_destroy() when you are done with the JPEG object, or call
+jpeg_abort() to return it to an idle state before selecting a new data
+source and reading another header.
+
+
+4. Set parameters for decompression.
+
+jpeg_read_header() sets appropriate default decompression parameters based on
+the properties of the image (in particular, its colorspace). However, you
+may well want to alter these defaults before beginning the decompression.
+For example, the default is to produce full color output from a color file.
+If you want colormapped output you must ask for it. Other options allow the
+returned image to be scaled and allow various speed/quality tradeoffs to be
+selected. "Decompression parameter selection", below, gives details.
+
+If the defaults are appropriate, nothing need be done at this step.
+
+Note that all default values are set by each call to jpeg_read_header().
+If you reuse a decompression object, you cannot expect your parameter
+settings to be preserved across cycles, as you can for compression.
+You must set desired parameter values each time.
+
+
+5. jpeg_start_decompress(...);
+
+Once the parameter values are satisfactory, call jpeg_start_decompress() to
+begin decompression. This will initialize internal state, allocate working
+memory, and prepare for returning data.
+
+Typical code is just
+
+ jpeg_start_decompress(&cinfo);
+
+If you have requested a multi-pass operating mode, such as 2-pass color
+quantization, jpeg_start_decompress() will do everything needed before data
+output can begin. In this case jpeg_start_decompress() may take quite a while
+to complete. With a single-scan (non progressive) JPEG file and default
+decompression parameters, this will not happen; jpeg_start_decompress() will
+return quickly.
+
+After this call, the final output image dimensions, including any requested
+scaling, are available in the JPEG object; so is the selected colormap, if
+colormapped output has been requested. Useful fields include
+
+ output_width image width and height, as scaled
+ output_height
+ out_color_components # of color components in out_color_space
+ output_components # of color components returned per pixel
+ colormap the selected colormap, if any
+ actual_number_of_colors number of entries in colormap
+
+output_components is 1 (a colormap index) when quantizing colors; otherwise it
+equals out_color_components. It is the number of JSAMPLE values that will be
+emitted per pixel in the output arrays.
+
+Typically you will need to allocate data buffers to hold the incoming image.
+You will need output_width * output_components JSAMPLEs per scanline in your
+output buffer, and a total of output_height scanlines will be returned.
+
+Note: if you are using the JPEG library's internal memory manager to allocate
+data buffers (as djpeg does), then the manager's protocol requires that you
+request large buffers *before* calling jpeg_start_decompress(). This is a
+little tricky since the output_XXX fields are not normally valid then. You
+can make them valid by calling jpeg_calc_output_dimensions() after setting the
+relevant parameters (scaling, output color space, and quantization flag).
+
+
+6. while (scan lines remain to be read)
+ jpeg_read_scanlines(...);
+
+Now you can read the decompressed image data by calling jpeg_read_scanlines()
+one or more times. At each call, you pass in the maximum number of scanlines
+to be read (ie, the height of your working buffer); jpeg_read_scanlines()
+will return up to that many lines. The return value is the number of lines
+actually read. The format of the returned data is discussed under "Data
+formats", above. Don't forget that grayscale and color JPEGs will return
+different data formats!
+
+Image data is returned in top-to-bottom scanline order. If you must write
+out the image in bottom-to-top order, you can use the JPEG library's virtual
+array mechanism to invert the data efficiently. Examples of this can be
+found in the sample application djpeg.
+
+The library maintains a count of the number of scanlines returned so far
+in the output_scanline field of the JPEG object. Usually you can just use
+this variable as the loop counter, so that the loop test looks like
+"while (cinfo.output_scanline < cinfo.output_height)". (Note that the test
+should NOT be against image_height, unless you never use scaling. The
+image_height field is the height of the original unscaled image.)
+The return value always equals the change in the value of output_scanline.
+
+If you don't use a suspending data source, it is safe to assume that
+jpeg_read_scanlines() reads at least one scanline per call, until the
+bottom of the image has been reached.
+
+If you use a buffer larger than one scanline, it is NOT safe to assume that
+jpeg_read_scanlines() fills it. (The current implementation returns only a
+few scanlines per call, no matter how large a buffer you pass.) So you must
+always provide a loop that calls jpeg_read_scanlines() repeatedly until the
+whole image has been read.
+
+
+7. jpeg_finish_decompress(...);
+
+After all the image data has been read, call jpeg_finish_decompress() to
+complete the decompression cycle. This causes working memory associated
+with the JPEG object to be released.
+
+Typical code:
+
+ jpeg_finish_decompress(&cinfo);
+
+If using the stdio source manager, don't forget to close the source stdio
+stream if necessary.
+
+It is an error to call jpeg_finish_decompress() before reading the correct
+total number of scanlines. If you wish to abort decompression, call
+jpeg_abort() as discussed below.
+
+After completing a decompression cycle, you may dispose of the JPEG object as
+discussed next, or you may use it to decompress another image. In that case
+return to step 2 or 3 as appropriate. If you do not change the source
+manager, the next image will be read from the same source.
+
+
+8. Release the JPEG decompression object.
+
+When you are done with a JPEG decompression object, destroy it by calling
+jpeg_destroy_decompress() or jpeg_destroy(). The previous discussion of
+destroying compression objects applies here too.
+
+Typical code:
+
+ jpeg_destroy_decompress(&cinfo);
+
+
+9. Aborting.
+
+You can abort a decompression cycle by calling jpeg_destroy_decompress() or
+jpeg_destroy() if you don't need the JPEG object any more, or
+jpeg_abort_decompress() or jpeg_abort() if you want to reuse the object.
+The previous discussion of aborting compression cycles applies here too.
+
+
+Mechanics of usage: include files, linking, etc
+-----------------------------------------------
+
+Applications using the JPEG library should include the header file jpeglib.h
+to obtain declarations of data types and routines. Before including
+jpeglib.h, include system headers that define at least the typedefs FILE and
+size_t. On ANSI-conforming systems, including <stdio.h> is sufficient; on
+older Unix systems, you may need <sys/types.h> to define size_t.
+
+If the application needs to refer to individual JPEG library error codes, also
+include jerror.h to define those symbols.
+
+jpeglib.h indirectly includes the files jconfig.h and jmorecfg.h. If you are
+installing the JPEG header files in a system directory, you will want to
+install all four files: jpeglib.h, jerror.h, jconfig.h, jmorecfg.h.
+
+The most convenient way to include the JPEG code into your executable program
+is to prepare a library file ("libjpeg.a", or a corresponding name on non-Unix
+machines) and reference it at your link step. If you use only half of the
+library (only compression or only decompression), only that much code will be
+included from the library, unless your linker is hopelessly brain-damaged.
+The supplied makefiles build libjpeg.a automatically (see install.txt).
+
+While you can build the JPEG library as a shared library if the whim strikes
+you, we don't really recommend it. The trouble with shared libraries is that
+at some point you'll probably try to substitute a new version of the library
+without recompiling the calling applications. That generally doesn't work
+because the parameter struct declarations usually change with each new
+version. In other words, the library's API is *not* guaranteed binary
+compatible across versions; we only try to ensure source-code compatibility.
+(In hindsight, it might have been smarter to hide the parameter structs from
+applications and introduce a ton of access functions instead. Too late now,
+however.)
+
+On some systems your application may need to set up a signal handler to ensure
+that temporary files are deleted if the program is interrupted. This is most
+critical if you are on MS-DOS and use the jmemdos.c memory manager back end;
+it will try to grab extended memory for temp files, and that space will NOT be
+freed automatically. See cjpeg.c or djpeg.c for an example signal handler.
+
+It may be worth pointing out that the core JPEG library does not actually
+require the stdio library: only the default source/destination managers and
+error handler need it. You can use the library in a stdio-less environment
+if you replace those modules and use jmemnobs.c (or another memory manager of
+your own devising). More info about the minimum system library requirements
+may be found in jinclude.h.
+
+
+ADVANCED FEATURES
+=================
+
+Compression parameter selection
+-------------------------------
+
+This section describes all the optional parameters you can set for JPEG
+compression, as well as the "helper" routines provided to assist in this
+task. Proper setting of some parameters requires detailed understanding
+of the JPEG standard; if you don't know what a parameter is for, it's best
+not to mess with it! See REFERENCES in the README file for pointers to
+more info about JPEG.
+
+It's a good idea to call jpeg_set_defaults() first, even if you plan to set
+all the parameters; that way your code is more likely to work with future JPEG
+libraries that have additional parameters. For the same reason, we recommend
+you use a helper routine where one is provided, in preference to twiddling
+cinfo fields directly.
+
+The helper routines are:
+
+jpeg_set_defaults (j_compress_ptr cinfo)
+ This routine sets all JPEG parameters to reasonable defaults, using
+ only the input image's color space (field in_color_space, which must
+ already be set in cinfo). Many applications will only need to use
+ this routine and perhaps jpeg_set_quality().
+
+jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace)
+ Sets the JPEG file's colorspace (field jpeg_color_space) as specified,
+ and sets other color-space-dependent parameters appropriately. See
+ "Special color spaces", below, before using this. A large number of
+ parameters, including all per-component parameters, are set by this
+ routine; if you want to twiddle individual parameters you should call
+ jpeg_set_colorspace() before rather than after.
+
+jpeg_default_colorspace (j_compress_ptr cinfo)
+ Selects an appropriate JPEG colorspace based on cinfo->in_color_space,
+ and calls jpeg_set_colorspace(). This is actually a subroutine of
+ jpeg_set_defaults(). It's broken out in case you want to change
+ just the colorspace-dependent JPEG parameters.
+
+jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline)
+ Constructs JPEG quantization tables appropriate for the indicated
+ quality setting. The quality value is expressed on the 0..100 scale
+ recommended by IJG (cjpeg's "-quality" switch uses this routine).
+ Note that the exact mapping from quality values to tables may change
+ in future IJG releases as more is learned about DCT quantization.
+ If the force_baseline parameter is TRUE, then the quantization table
+ entries are constrained to the range 1..255 for full JPEG baseline
+ compatibility. In the current implementation, this only makes a
+ difference for quality settings below 25, and it effectively prevents
+ very small/low quality files from being generated. The IJG decoder
+ is capable of reading the non-baseline files generated at low quality
+ settings when force_baseline is FALSE, but other decoders may not be.
+
+jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,
+ boolean force_baseline)
+ Same as jpeg_set_quality() except that the generated tables are the
+ sample tables given in the JPEC spec section K.1, multiplied by the
+ specified scale factor (which is expressed as a percentage; thus
+ scale_factor = 100 reproduces the spec's tables). Note that larger
+ scale factors give lower quality. This entry point is useful for
+ conforming to the Adobe PostScript DCT conventions, but we do not
+ recommend linear scaling as a user-visible quality scale otherwise.
+ force_baseline again constrains the computed table entries to 1..255.
+
+int jpeg_quality_scaling (int quality)
+ Converts a value on the IJG-recommended quality scale to a linear
+ scaling percentage. Note that this routine may change or go away
+ in future releases --- IJG may choose to adopt a scaling method that
+ can't be expressed as a simple scalar multiplier, in which case the
+ premise of this routine collapses. Caveat user.
+
+jpeg_default_qtables (j_compress_ptr cinfo, boolean force_baseline)
+ Set default quantization tables with linear q_scale_factor[] values
+ (see below).
+
+jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
+ const unsigned int *basic_table,
+ int scale_factor, boolean force_baseline)
+ Allows an arbitrary quantization table to be created. which_tbl
+ indicates which table slot to fill. basic_table points to an array
+ of 64 unsigned ints given in normal array order. These values are
+ multiplied by scale_factor/100 and then clamped to the range 1..65535
+ (or to 1..255 if force_baseline is TRUE).
+ CAUTION: prior to library version 6a, jpeg_add_quant_table expected
+ the basic table to be given in JPEG zigzag order. If you need to
+ write code that works with either older or newer versions of this
+ routine, you must check the library version number. Something like
+ "#if JPEG_LIB_VERSION >= 61" is the right test.
+
+jpeg_simple_progression (j_compress_ptr cinfo)
+ Generates a default scan script for writing a progressive-JPEG file.
+ This is the recommended method of creating a progressive file,
+ unless you want to make a custom scan sequence. You must ensure that
+ the JPEG color space is set correctly before calling this routine.
+
+
+Compression parameters (cinfo fields) include:
+
+J_DCT_METHOD dct_method
+ Selects the algorithm used for the DCT step. Choices are:
+ JDCT_ISLOW: slow but accurate integer algorithm
+ JDCT_IFAST: faster, less accurate integer method
+ JDCT_FLOAT: floating-point method
+ JDCT_DEFAULT: default method (normally JDCT_ISLOW)
+ JDCT_FASTEST: fastest method (normally JDCT_IFAST)
+ The FLOAT method is very slightly more accurate than the ISLOW method,
+ but may give different results on different machines due to varying
+ roundoff behavior. The integer methods should give the same results
+ on all machines. On machines with sufficiently fast FP hardware, the
+ floating-point method may also be the fastest. The IFAST method is
+ considerably less accurate than the other two; its use is not
+ recommended if high quality is a concern. JDCT_DEFAULT and
+ JDCT_FASTEST are macros configurable by each installation.
+
+unsigned int scale_num, scale_denom
+ Scale the image by the fraction scale_num/scale_denom. Default is
+ 1/1, or no scaling. Currently, the supported scaling ratios are
+ 8/N with all N from 1 to 16. (The library design allows for arbitrary
+ scaling ratios but this is not likely to be implemented any time soon.)
+
+J_COLOR_SPACE jpeg_color_space
+int num_components
+ The JPEG color space and corresponding number of components; see
+ "Special color spaces", below, for more info. We recommend using
+ jpeg_set_color_space() if you want to change these.
+
+boolean optimize_coding
+ TRUE causes the compressor to compute optimal Huffman coding tables
+ for the image. This requires an extra pass over the data and
+ therefore costs a good deal of space and time. The default is
+ FALSE, which tells the compressor to use the supplied or default
+ Huffman tables. In most cases optimal tables save only a few percent
+ of file size compared to the default tables. Note that when this is
+ TRUE, you need not supply Huffman tables at all, and any you do
+ supply will be overwritten.
+
+unsigned int restart_interval
+int restart_in_rows
+ To emit restart markers in the JPEG file, set one of these nonzero.
+ Set restart_interval to specify the exact interval in MCU blocks.
+ Set restart_in_rows to specify the interval in MCU rows. (If
+ restart_in_rows is not 0, then restart_interval is set after the
+ image width in MCUs is computed.) Defaults are zero (no restarts).
+ One restart marker per MCU row is often a good choice.
+ NOTE: the overhead of restart markers is higher in grayscale JPEG
+ files than in color files, and MUCH higher in progressive JPEGs.
+ If you use restarts, you may want to use larger intervals in those
+ cases.
+
+const jpeg_scan_info * scan_info
+int num_scans
+ By default, scan_info is NULL; this causes the compressor to write a
+ single-scan sequential JPEG file. If not NULL, scan_info points to
+ an array of scan definition records of length num_scans. The
+ compressor will then write a JPEG file having one scan for each scan
+ definition record. This is used to generate noninterleaved or
+ progressive JPEG files. The library checks that the scan array
+ defines a valid JPEG scan sequence. (jpeg_simple_progression creates
+ a suitable scan definition array for progressive JPEG.) This is
+ discussed further under "Progressive JPEG support".
+
+boolean do_fancy_downsampling
+ If TRUE, use direct DCT scaling with DCT size > 8 for downsampling
+ of chroma components.
+ If FALSE, use only DCT size <= 8 and simple separate downsampling.
+ Default is TRUE.
+ For better image stability in multiple generation compression cycles
+ it is preferable that this value matches the corresponding
+ do_fancy_upsampling value in decompression.
+
+int smoothing_factor
+ If non-zero, the input image is smoothed; the value should be 1 for
+ minimal smoothing to 100 for maximum smoothing. Consult jcsample.c
+ for details of the smoothing algorithm. The default is zero.
+
+boolean write_JFIF_header
+ If TRUE, a JFIF APP0 marker is emitted. jpeg_set_defaults() and
+ jpeg_set_colorspace() set this TRUE if a JFIF-legal JPEG color space
+ (ie, YCbCr or grayscale) is selected, otherwise FALSE.
+
+UINT8 JFIF_major_version
+UINT8 JFIF_minor_version
+ The version number to be written into the JFIF marker.
+ jpeg_set_defaults() initializes the version to 1.01 (major=minor=1).
+ You should set it to 1.02 (major=1, minor=2) if you plan to write
+ any JFIF 1.02 extension markers.
+
+UINT8 density_unit
+UINT16 X_density
+UINT16 Y_density
+ The resolution information to be written into the JFIF marker;
+ not used otherwise. density_unit may be 0 for unknown,
+ 1 for dots/inch, or 2 for dots/cm. The default values are 0,1,1
+ indicating square pixels of unknown size.
+
+boolean write_Adobe_marker
+ If TRUE, an Adobe APP14 marker is emitted. jpeg_set_defaults() and
+ jpeg_set_colorspace() set this TRUE if JPEG color space RGB, CMYK,
+ or YCCK is selected, otherwise FALSE. It is generally a bad idea
+ to set both write_JFIF_header and write_Adobe_marker. In fact,
+ you probably shouldn't change the default settings at all --- the
+ default behavior ensures that the JPEG file's color space can be
+ recognized by the decoder.
+
+JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]
+ Pointers to coefficient quantization tables, one per table slot,
+ or NULL if no table is defined for a slot. Usually these should
+ be set via one of the above helper routines; jpeg_add_quant_table()
+ is general enough to define any quantization table. The other
+ routines will set up table slot 0 for luminance quality and table
+ slot 1 for chrominance.
+
+int q_scale_factor[NUM_QUANT_TBLS]
+ Linear quantization scaling factors (percentage, initialized 100)
+ for use with jpeg_default_qtables().
+ See rdswitch.c and cjpeg.c for an example of usage.
+ Note that the q_scale_factor[] fields are the "linear" scales, so you
+ have to convert from user-defined ratings via jpeg_quality_scaling().
+ Here is an example code which corresponds to cjpeg -quality 90,70:
+
+ jpeg_set_defaults(cinfo);
+
+ /* Set luminance quality 90. */
+ cinfo->q_scale_factor[0] = jpeg_quality_scaling(90);
+ /* Set chrominance quality 70. */
+ cinfo->q_scale_factor[1] = jpeg_quality_scaling(70);
+
+ jpeg_default_qtables(cinfo, force_baseline);
+
+ CAUTION: You must also set 1x1 subsampling for efficient separate
+ color quality selection, since the default value used by library
+ is 2x2:
+
+ cinfo->comp_info[0].v_samp_factor = 1;
+ cinfo->comp_info[0].h_samp_factor = 1;
+
+JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]
+JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]
+ Pointers to Huffman coding tables, one per table slot, or NULL if
+ no table is defined for a slot. Slots 0 and 1 are filled with the
+ JPEG sample tables by jpeg_set_defaults(). If you need to allocate
+ more table structures, jpeg_alloc_huff_table() may be used.
+ Note that optimal Huffman tables can be computed for an image
+ by setting optimize_coding, as discussed above; there's seldom
+ any need to mess with providing your own Huffman tables.
+
+
+The actual dimensions of the JPEG image that will be written to the file are
+given by the following fields. These are computed from the input image
+dimensions and the compression parameters by jpeg_start_compress(). You can
+also call jpeg_calc_jpeg_dimensions() to obtain the values that will result
+from the current parameter settings. This can be useful if you are trying
+to pick a scaling ratio that will get close to a desired target size.
+
+JDIMENSION jpeg_width Actual dimensions of output image.
+JDIMENSION jpeg_height
+
+
+Per-component parameters are stored in the struct cinfo.comp_info[i] for
+component number i. Note that components here refer to components of the
+JPEG color space, *not* the source image color space. A suitably large
+comp_info[] array is allocated by jpeg_set_defaults(); if you choose not
+to use that routine, it's up to you to allocate the array.
+
+int component_id
+ The one-byte identifier code to be recorded in the JPEG file for
+ this component. For the standard color spaces, we recommend you
+ leave the default values alone.
+
+int h_samp_factor
+int v_samp_factor
+ Horizontal and vertical sampling factors for the component; must
+ be 1..4 according to the JPEG standard. Note that larger sampling
+ factors indicate a higher-resolution component; many people find
+ this behavior quite unintuitive. The default values are 2,2 for
+ luminance components and 1,1 for chrominance components, except
+ for grayscale where 1,1 is used.
+
+int quant_tbl_no
+ Quantization table number for component. The default value is
+ 0 for luminance components and 1 for chrominance components.
+
+int dc_tbl_no
+int ac_tbl_no
+ DC and AC entropy coding table numbers. The default values are
+ 0 for luminance components and 1 for chrominance components.
+
+int component_index
+ Must equal the component's index in comp_info[]. (Beginning in
+ release v6, the compressor library will fill this in automatically;
+ you don't have to.)
+
+
+Decompression parameter selection
+---------------------------------
+
+Decompression parameter selection is somewhat simpler than compression
+parameter selection, since all of the JPEG internal parameters are
+recorded in the source file and need not be supplied by the application.
+(Unless you are working with abbreviated files, in which case see
+"Abbreviated datastreams", below.) Decompression parameters control
+the postprocessing done on the image to deliver it in a format suitable
+for the application's use. Many of the parameters control speed/quality
+tradeoffs, in which faster decompression may be obtained at the price of
+a poorer-quality image. The defaults select the highest quality (slowest)
+processing.
+
+The following fields in the JPEG object are set by jpeg_read_header() and
+may be useful to the application in choosing decompression parameters:
+
+JDIMENSION image_width Width and height of image
+JDIMENSION image_height
+int num_components Number of color components
+J_COLOR_SPACE jpeg_color_space Colorspace of image
+boolean saw_JFIF_marker TRUE if a JFIF APP0 marker was seen
+ UINT8 JFIF_major_version Version information from JFIF marker
+ UINT8 JFIF_minor_version
+ UINT8 density_unit Resolution data from JFIF marker
+ UINT16 X_density
+ UINT16 Y_density
+boolean saw_Adobe_marker TRUE if an Adobe APP14 marker was seen
+ UINT8 Adobe_transform Color transform code from Adobe marker
+
+The JPEG color space, unfortunately, is something of a guess since the JPEG
+standard proper does not provide a way to record it. In practice most files
+adhere to the JFIF or Adobe conventions, and the decoder will recognize these
+correctly. See "Special color spaces", below, for more info.
+
+
+The decompression parameters that determine the basic properties of the
+returned image are:
+
+J_COLOR_SPACE out_color_space
+ Output color space. jpeg_read_header() sets an appropriate default
+ based on jpeg_color_space; typically it will be RGB or grayscale.
+ The application can change this field to request output in a different
+ colorspace. For example, set it to JCS_GRAYSCALE to get grayscale
+ output from a color file. (This is useful for previewing: grayscale
+ output is faster than full color since the color components need not
+ be processed.) Note that not all possible color space transforms are
+ currently implemented; you may need to extend jdcolor.c if you want an
+ unusual conversion.
+
+unsigned int scale_num, scale_denom
+ Scale the image by the fraction scale_num/scale_denom. Currently,
+ the supported scaling ratios are M/N with all M from 1 to 16, where
+ N is the source DCT size, which is 8 for baseline JPEG. (The library
+ design allows for arbitrary scaling ratios but this is not likely
+ to be implemented any time soon.) The values are initialized by
+ jpeg_read_header() with the source DCT size. For baseline JPEG
+ this is 8/8. If you change only the scale_num value while leaving
+ the other unchanged, then this specifies the DCT scaled size to be
+ applied on the given input. For baseline JPEG this is equivalent
+ to M/8 scaling, since the source DCT size for baseline JPEG is 8.
+ Smaller scaling ratios permit significantly faster decoding since
+ fewer pixels need be processed and a simpler IDCT method can be used.
+
+boolean quantize_colors
+ If set TRUE, colormapped output will be delivered. Default is FALSE,
+ meaning that full-color output will be delivered.
+
+The next three parameters are relevant only if quantize_colors is TRUE.
+
+int desired_number_of_colors
+ Maximum number of colors to use in generating a library-supplied color
+ map (the actual number of colors is returned in a different field).
+ Default 256. Ignored when the application supplies its own color map.
+
+boolean two_pass_quantize
+ If TRUE, an extra pass over the image is made to select a custom color
+ map for the image. This usually looks a lot better than the one-size-
+ fits-all colormap that is used otherwise. Default is TRUE. Ignored
+ when the application supplies its own color map.
+
+J_DITHER_MODE dither_mode
+ Selects color dithering method. Supported values are:
+ JDITHER_NONE no dithering: fast, very low quality
+ JDITHER_ORDERED ordered dither: moderate speed and quality
+ JDITHER_FS Floyd-Steinberg dither: slow, high quality
+ Default is JDITHER_FS. (At present, ordered dither is implemented
+ only in the single-pass, standard-colormap case. If you ask for
+ ordered dither when two_pass_quantize is TRUE or when you supply
+ an external color map, you'll get F-S dithering.)
+
+When quantize_colors is TRUE, the target color map is described by the next
+two fields. colormap is set to NULL by jpeg_read_header(). The application
+can supply a color map by setting colormap non-NULL and setting
+actual_number_of_colors to the map size. Otherwise, jpeg_start_decompress()
+selects a suitable color map and sets these two fields itself.
+[Implementation restriction: at present, an externally supplied colormap is
+only accepted for 3-component output color spaces.]
+
+JSAMPARRAY colormap
+ The color map, represented as a 2-D pixel array of out_color_components
+ rows and actual_number_of_colors columns. Ignored if not quantizing.
+ CAUTION: if the JPEG library creates its own colormap, the storage
+ pointed to by this field is released by jpeg_finish_decompress().
+ Copy the colormap somewhere else first, if you want to save it.
+
+int actual_number_of_colors
+ The number of colors in the color map.
+
+Additional decompression parameters that the application may set include:
+
+J_DCT_METHOD dct_method
+ Selects the algorithm used for the DCT step. Choices are the same
+ as described above for compression.
+
+boolean do_fancy_upsampling
+ If TRUE, use direct DCT scaling with DCT size > 8 for upsampling
+ of chroma components.
+ If FALSE, use only DCT size <= 8 and simple separate upsampling.
+ Default is TRUE.
+ For better image stability in multiple generation compression cycles
+ it is preferable that this value matches the corresponding
+ do_fancy_downsampling value in compression.
+
+boolean do_block_smoothing
+ If TRUE, interblock smoothing is applied in early stages of decoding
+ progressive JPEG files; if FALSE, not. Default is TRUE. Early
+ progression stages look "fuzzy" with smoothing, "blocky" without.
+ In any case, block smoothing ceases to be applied after the first few
+ AC coefficients are known to full accuracy, so it is relevant only
+ when using buffered-image mode for progressive images.
+
+boolean enable_1pass_quant
+boolean enable_external_quant
+boolean enable_2pass_quant
+ These are significant only in buffered-image mode, which is
+ described in its own section below.
+
+
+The output image dimensions are given by the following fields. These are
+computed from the source image dimensions and the decompression parameters
+by jpeg_start_decompress(). You can also call jpeg_calc_output_dimensions()
+to obtain the values that will result from the current parameter settings.
+This can be useful if you are trying to pick a scaling ratio that will get
+close to a desired target size. It's also important if you are using the
+JPEG library's memory manager to allocate output buffer space, because you
+are supposed to request such buffers *before* jpeg_start_decompress().
+
+JDIMENSION output_width Actual dimensions of output image.
+JDIMENSION output_height
+int out_color_components Number of color components in out_color_space.
+int output_components Number of color components returned.
+int rec_outbuf_height Recommended height of scanline buffer.
+
+When quantizing colors, output_components is 1, indicating a single color map
+index per pixel. Otherwise it equals out_color_components. The output arrays
+are required to be output_width * output_components JSAMPLEs wide.
+
+rec_outbuf_height is the recommended minimum height (in scanlines) of the
+buffer passed to jpeg_read_scanlines(). If the buffer is smaller, the
+library will still work, but time will be wasted due to unnecessary data
+copying. In high-quality modes, rec_outbuf_height is always 1, but some
+faster, lower-quality modes set it to larger values (typically 2 to 4).
+If you are going to ask for a high-speed processing mode, you may as well
+go to the trouble of honoring rec_outbuf_height so as to avoid data copying.
+(An output buffer larger than rec_outbuf_height lines is OK, but won't
+provide any material speed improvement over that height.)
+
+
+Special color spaces
+--------------------
+
+The JPEG standard itself is "color blind" and doesn't specify any particular
+color space. It is customary to convert color data to a luminance/chrominance
+color space before compressing, since this permits greater compression. The
+existing de-facto JPEG file format standards specify YCbCr or grayscale data
+(JFIF), or grayscale, RGB, YCbCr, CMYK, or YCCK (Adobe). For special
+applications such as multispectral images, other color spaces can be used,
+but it must be understood that such files will be unportable.
+
+The JPEG library can handle the most common colorspace conversions (namely
+RGB <=> YCbCr and CMYK <=> YCCK). It can also deal with data of an unknown
+color space, passing it through without conversion. If you deal extensively
+with an unusual color space, you can easily extend the library to understand
+additional color spaces and perform appropriate conversions.
+
+For compression, the source data's color space is specified by field
+in_color_space. This is transformed to the JPEG file's color space given
+by jpeg_color_space. jpeg_set_defaults() chooses a reasonable JPEG color
+space depending on in_color_space, but you can override this by calling
+jpeg_set_colorspace(). Of course you must select a supported transformation.
+jccolor.c currently supports the following transformations:
+ RGB => YCbCr
+ RGB => GRAYSCALE
+ YCbCr => GRAYSCALE
+ CMYK => YCCK
+plus the null transforms: GRAYSCALE => GRAYSCALE, RGB => RGB,
+YCbCr => YCbCr, CMYK => CMYK, YCCK => YCCK, and UNKNOWN => UNKNOWN.
+
+The de-facto file format standards (JFIF and Adobe) specify APPn markers that
+indicate the color space of the JPEG file. It is important to ensure that
+these are written correctly, or omitted if the JPEG file's color space is not
+one of the ones supported by the de-facto standards. jpeg_set_colorspace()
+will set the compression parameters to include or omit the APPn markers
+properly, so long as it is told the truth about the JPEG color space.
+For example, if you are writing some random 3-component color space without
+conversion, don't try to fake out the library by setting in_color_space and
+jpeg_color_space to JCS_YCbCr; use JCS_UNKNOWN. You may want to write an
+APPn marker of your own devising to identify the colorspace --- see "Special
+markers", below.
+
+When told that the color space is UNKNOWN, the library will default to using
+luminance-quality compression parameters for all color components. You may
+well want to change these parameters. See the source code for
+jpeg_set_colorspace(), in jcparam.c, for details.
+
+For decompression, the JPEG file's color space is given in jpeg_color_space,
+and this is transformed to the output color space out_color_space.
+jpeg_read_header's setting of jpeg_color_space can be relied on if the file
+conforms to JFIF or Adobe conventions, but otherwise it is no better than a
+guess. If you know the JPEG file's color space for certain, you can override
+jpeg_read_header's guess by setting jpeg_color_space. jpeg_read_header also
+selects a default output color space based on (its guess of) jpeg_color_space;
+set out_color_space to override this. Again, you must select a supported
+transformation. jdcolor.c currently supports
+ YCbCr => GRAYSCALE
+ YCbCr => RGB
+ GRAYSCALE => RGB
+ YCCK => CMYK
+as well as the null transforms. (Since GRAYSCALE=>RGB is provided, an
+application can force grayscale JPEGs to look like color JPEGs if it only
+wants to handle one case.)
+
+The two-pass color quantizer, jquant2.c, is specialized to handle RGB data
+(it weights distances appropriately for RGB colors). You'll need to modify
+the code if you want to use it for non-RGB output color spaces. Note that
+jquant2.c is used to map to an application-supplied colormap as well as for
+the normal two-pass colormap selection process.
+
+CAUTION: it appears that Adobe Photoshop writes inverted data in CMYK JPEG
+files: 0 represents 100% ink coverage, rather than 0% ink as you'd expect.
+This is arguably a bug in Photoshop, but if you need to work with Photoshop
+CMYK files, you will have to deal with it in your application. We cannot
+"fix" this in the library by inverting the data during the CMYK<=>YCCK
+transform, because that would break other applications, notably Ghostscript.
+Photoshop versions prior to 3.0 write EPS files containing JPEG-encoded CMYK
+data in the same inverted-YCCK representation used in bare JPEG files, but
+the surrounding PostScript code performs an inversion using the PS image
+operator. I am told that Photoshop 3.0 will write uninverted YCCK in
+EPS/JPEG files, and will omit the PS-level inversion. (But the data
+polarity used in bare JPEG files will not change in 3.0.) In either case,
+the JPEG library must not invert the data itself, or else Ghostscript would
+read these EPS files incorrectly.
+
+
+Error handling
+--------------
+
+When the default error handler is used, any error detected inside the JPEG
+routines will cause a message to be printed on stderr, followed by exit().
+You can supply your own error handling routines to override this behavior
+and to control the treatment of nonfatal warnings and trace/debug messages.
+The file example.c illustrates the most common case, which is to have the
+application regain control after an error rather than exiting.
+
+The JPEG library never writes any message directly; it always goes through
+the error handling routines. Three classes of messages are recognized:
+ * Fatal errors: the library cannot continue.
+ * Warnings: the library can continue, but the data is corrupt, and a
+ damaged output image is likely to result.
+ * Trace/informational messages. These come with a trace level indicating
+ the importance of the message; you can control the verbosity of the
+ program by adjusting the maximum trace level that will be displayed.
+
+You may, if you wish, simply replace the entire JPEG error handling module
+(jerror.c) with your own code. However, you can avoid code duplication by
+only replacing some of the routines depending on the behavior you need.
+This is accomplished by calling jpeg_std_error() as usual, but then overriding
+some of the method pointers in the jpeg_error_mgr struct, as illustrated by
+example.c.
+
+All of the error handling routines will receive a pointer to the JPEG object
+(a j_common_ptr which points to either a jpeg_compress_struct or a
+jpeg_decompress_struct; if you need to tell which, test the is_decompressor
+field). This struct includes a pointer to the error manager struct in its
+"err" field. Frequently, custom error handler routines will need to access
+additional data which is not known to the JPEG library or the standard error
+handler. The most convenient way to do this is to embed either the JPEG
+object or the jpeg_error_mgr struct in a larger structure that contains
+additional fields; then casting the passed pointer provides access to the
+additional fields. Again, see example.c for one way to do it. (Beginning
+with IJG version 6b, there is also a void pointer "client_data" in each
+JPEG object, which the application can also use to find related data.
+The library does not touch client_data at all.)
+
+The individual methods that you might wish to override are:
+
+error_exit (j_common_ptr cinfo)
+ Receives control for a fatal error. Information sufficient to
+ generate the error message has been stored in cinfo->err; call
+ output_message to display it. Control must NOT return to the caller;
+ generally this routine will exit() or longjmp() somewhere.
+ Typically you would override this routine to get rid of the exit()
+ default behavior. Note that if you continue processing, you should
+ clean up the JPEG object with jpeg_abort() or jpeg_destroy().
+
+output_message (j_common_ptr cinfo)
+ Actual output of any JPEG message. Override this to send messages
+ somewhere other than stderr. Note that this method does not know
+ how to generate a message, only where to send it.
+
+format_message (j_common_ptr cinfo, char * buffer)
+ Constructs a readable error message string based on the error info
+ stored in cinfo->err. This method is called by output_message. Few
+ applications should need to override this method. One possible
+ reason for doing so is to implement dynamic switching of error message
+ language.
+
+emit_message (j_common_ptr cinfo, int msg_level)
+ Decide whether or not to emit a warning or trace message; if so,
+ calls output_message. The main reason for overriding this method
+ would be to abort on warnings. msg_level is -1 for warnings,
+ 0 and up for trace messages.
+
+Only error_exit() and emit_message() are called from the rest of the JPEG
+library; the other two are internal to the error handler.
+
+The actual message texts are stored in an array of strings which is pointed to
+by the field err->jpeg_message_table. The messages are numbered from 0 to
+err->last_jpeg_message, and it is these code numbers that are used in the
+JPEG library code. You could replace the message texts (for instance, with
+messages in French or German) by changing the message table pointer. See
+jerror.h for the default texts. CAUTION: this table will almost certainly
+change or grow from one library version to the next.
+
+It may be useful for an application to add its own message texts that are
+handled by the same mechanism. The error handler supports a second "add-on"
+message table for this purpose. To define an addon table, set the pointer
+err->addon_message_table and the message numbers err->first_addon_message and
+err->last_addon_message. If you number the addon messages beginning at 1000
+or so, you won't have to worry about conflicts with the library's built-in
+messages. See the sample applications cjpeg/djpeg for an example of using
+addon messages (the addon messages are defined in cderror.h).
+
+Actual invocation of the error handler is done via macros defined in jerror.h:
+ ERREXITn(...) for fatal errors
+ WARNMSn(...) for corrupt-data warnings
+ TRACEMSn(...) for trace and informational messages.
+These macros store the message code and any additional parameters into the
+error handler struct, then invoke the error_exit() or emit_message() method.
+The variants of each macro are for varying numbers of additional parameters.
+The additional parameters are inserted into the generated message using
+standard printf() format codes.
+
+See jerror.h and jerror.c for further details.
+
+
+Compressed data handling (source and destination managers)
+----------------------------------------------------------
+
+The JPEG compression library sends its compressed data to a "destination
+manager" module. The default destination manager just writes the data to a
+memory buffer or to a stdio stream, but you can provide your own manager to
+do something else. Similarly, the decompression library calls a "source
+manager" to obtain the compressed data; you can provide your own source
+manager if you want the data to come from somewhere other than a memory
+buffer or a stdio stream.
+
+In both cases, compressed data is processed a bufferload at a time: the
+destination or source manager provides a work buffer, and the library invokes
+the manager only when the buffer is filled or emptied. (You could define a
+one-character buffer to force the manager to be invoked for each byte, but
+that would be rather inefficient.) The buffer's size and location are
+controlled by the manager, not by the library. For example, the memory
+source manager just makes the buffer pointer and length point to the original
+data in memory. In this case the buffer-reload procedure will be invoked
+only if the decompressor ran off the end of the datastream, which would
+indicate an erroneous datastream.
+
+The work buffer is defined as an array of datatype JOCTET, which is generally
+"char" or "unsigned char". On a machine where char is not exactly 8 bits
+wide, you must define JOCTET as a wider data type and then modify the data
+source and destination modules to transcribe the work arrays into 8-bit units
+on external storage.
+
+A data destination manager struct contains a pointer and count defining the
+next byte to write in the work buffer and the remaining free space:
+
+ JOCTET * next_output_byte; /* => next byte to write in buffer */
+ size_t free_in_buffer; /* # of byte spaces remaining in buffer */
+
+The library increments the pointer and decrements the count until the buffer
+is filled. The manager's empty_output_buffer method must reset the pointer
+and count. The manager is expected to remember the buffer's starting address
+and total size in private fields not visible to the library.
+
+A data destination manager provides three methods:
+
+init_destination (j_compress_ptr cinfo)
+ Initialize destination. This is called by jpeg_start_compress()
+ before any data is actually written. It must initialize
+ next_output_byte and free_in_buffer. free_in_buffer must be
+ initialized to a positive value.
+
+empty_output_buffer (j_compress_ptr cinfo)
+ This is called whenever the buffer has filled (free_in_buffer
+ reaches zero). In typical applications, it should write out the
+ *entire* buffer (use the saved start address and buffer length;
+ ignore the current state of next_output_byte and free_in_buffer).
+ Then reset the pointer & count to the start of the buffer, and
+ return TRUE indicating that the buffer has been dumped.
+ free_in_buffer must be set to a positive value when TRUE is
+ returned. A FALSE return should only be used when I/O suspension is
+ desired (this operating mode is discussed in the next section).
+
+term_destination (j_compress_ptr cinfo)
+ Terminate destination --- called by jpeg_finish_compress() after all
+ data has been written. In most applications, this must flush any
+ data remaining in the buffer. Use either next_output_byte or
+ free_in_buffer to determine how much data is in the buffer.
+
+term_destination() is NOT called by jpeg_abort() or jpeg_destroy(). If you
+want the destination manager to be cleaned up during an abort, you must do it
+yourself.
+
+You will also need code to create a jpeg_destination_mgr struct, fill in its
+method pointers, and insert a pointer to the struct into the "dest" field of
+the JPEG compression object. This can be done in-line in your setup code if
+you like, but it's probably cleaner to provide a separate routine similar to
+the jpeg_stdio_dest() or jpeg_mem_dest() routines of the supplied destination
+managers.
+
+Decompression source managers follow a parallel design, but with some
+additional frammishes. The source manager struct contains a pointer and count
+defining the next byte to read from the work buffer and the number of bytes
+remaining:
+
+ const JOCTET * next_input_byte; /* => next byte to read from buffer */
+ size_t bytes_in_buffer; /* # of bytes remaining in buffer */
+
+The library increments the pointer and decrements the count until the buffer
+is emptied. The manager's fill_input_buffer method must reset the pointer and
+count. In most applications, the manager must remember the buffer's starting
+address and total size in private fields not visible to the library.
+
+A data source manager provides five methods:
+
+init_source (j_decompress_ptr cinfo)
+ Initialize source. This is called by jpeg_read_header() before any
+ data is actually read. Unlike init_destination(), it may leave
+ bytes_in_buffer set to 0 (in which case a fill_input_buffer() call
+ will occur immediately).
+
+fill_input_buffer (j_decompress_ptr cinfo)
+ This is called whenever bytes_in_buffer has reached zero and more
+ data is wanted. In typical applications, it should read fresh data
+ into the buffer (ignoring the current state of next_input_byte and
+ bytes_in_buffer), reset the pointer & count to the start of the
+ buffer, and return TRUE indicating that the buffer has been reloaded.
+ It is not necessary to fill the buffer entirely, only to obtain at
+ least one more byte. bytes_in_buffer MUST be set to a positive value
+ if TRUE is returned. A FALSE return should only be used when I/O
+ suspension is desired (this mode is discussed in the next section).
+
+skip_input_data (j_decompress_ptr cinfo, long num_bytes)
+ Skip num_bytes worth of data. The buffer pointer and count should
+ be advanced over num_bytes input bytes, refilling the buffer as
+ needed. This is used to skip over a potentially large amount of
+ uninteresting data (such as an APPn marker). In some applications
+ it may be possible to optimize away the reading of the skipped data,
+ but it's not clear that being smart is worth much trouble; large
+ skips are uncommon. bytes_in_buffer may be zero on return.
+ A zero or negative skip count should be treated as a no-op.
+
+resync_to_restart (j_decompress_ptr cinfo, int desired)
+ This routine is called only when the decompressor has failed to find
+ a restart (RSTn) marker where one is expected. Its mission is to
+ find a suitable point for resuming decompression. For most
+ applications, we recommend that you just use the default resync
+ procedure, jpeg_resync_to_restart(). However, if you are able to back
+ up in the input data stream, or if you have a-priori knowledge about
+ the likely location of restart markers, you may be able to do better.
+ Read the read_restart_marker() and jpeg_resync_to_restart() routines
+ in jdmarker.c if you think you'd like to implement your own resync
+ procedure.
+
+term_source (j_decompress_ptr cinfo)
+ Terminate source --- called by jpeg_finish_decompress() after all
+ data has been read. Often a no-op.
+
+For both fill_input_buffer() and skip_input_data(), there is no such thing
+as an EOF return. If the end of the file has been reached, the routine has
+a choice of exiting via ERREXIT() or inserting fake data into the buffer.
+In most cases, generating a warning message and inserting a fake EOI marker
+is the best course of action --- this will allow the decompressor to output
+however much of the image is there. In pathological cases, the decompressor
+may swallow the EOI and again demand data ... just keep feeding it fake EOIs.
+jdatasrc.c illustrates the recommended error recovery behavior.
+
+term_source() is NOT called by jpeg_abort() or jpeg_destroy(). If you want
+the source manager to be cleaned up during an abort, you must do it yourself.
+
+You will also need code to create a jpeg_source_mgr struct, fill in its method
+pointers, and insert a pointer to the struct into the "src" field of the JPEG
+decompression object. This can be done in-line in your setup code if you
+like, but it's probably cleaner to provide a separate routine similar to the
+jpeg_stdio_src() or jpeg_mem_src() routines of the supplied source managers.
+
+For more information, consult the memory and stdio source and destination
+managers in jdatasrc.c and jdatadst.c.
+
+
+I/O suspension
+--------------
+
+Some applications need to use the JPEG library as an incremental memory-to-
+memory filter: when the compressed data buffer is filled or emptied, they want
+control to return to the outer loop, rather than expecting that the buffer can
+be emptied or reloaded within the data source/destination manager subroutine.
+The library supports this need by providing an "I/O suspension" mode, which we
+describe in this section.
+
+The I/O suspension mode is not a panacea: nothing is guaranteed about the
+maximum amount of time spent in any one call to the library, so it will not
+eliminate response-time problems in single-threaded applications. If you
+need guaranteed response time, we suggest you "bite the bullet" and implement
+a real multi-tasking capability.
+
+To use I/O suspension, cooperation is needed between the calling application
+and the data source or destination manager; you will always need a custom
+source/destination manager. (Please read the previous section if you haven't
+already.) The basic idea is that the empty_output_buffer() or
+fill_input_buffer() routine is a no-op, merely returning FALSE to indicate
+that it has done nothing. Upon seeing this, the JPEG library suspends
+operation and returns to its caller. The surrounding application is
+responsible for emptying or refilling the work buffer before calling the
+JPEG library again.
+
+Compression suspension:
+
+For compression suspension, use an empty_output_buffer() routine that returns
+FALSE; typically it will not do anything else. This will cause the
+compressor to return to the caller of jpeg_write_scanlines(), with the return
+value indicating that not all the supplied scanlines have been accepted.
+The application must make more room in the output buffer, adjust the output
+buffer pointer/count appropriately, and then call jpeg_write_scanlines()
+again, pointing to the first unconsumed scanline.
+
+When forced to suspend, the compressor will backtrack to a convenient stopping
+point (usually the start of the current MCU); it will regenerate some output
+data when restarted. Therefore, although empty_output_buffer() is only
+called when the buffer is filled, you should NOT write out the entire buffer
+after a suspension. Write only the data up to the current position of
+next_output_byte/free_in_buffer. The data beyond that point will be
+regenerated after resumption.
+
+Because of the backtracking behavior, a good-size output buffer is essential
+for efficiency; you don't want the compressor to suspend often. (In fact, an
+overly small buffer could lead to infinite looping, if a single MCU required
+more data than would fit in the buffer.) We recommend a buffer of at least
+several Kbytes. You may want to insert explicit code to ensure that you don't
+call jpeg_write_scanlines() unless there is a reasonable amount of space in
+the output buffer; in other words, flush the buffer before trying to compress
+more data.
+
+The compressor does not allow suspension while it is trying to write JPEG
+markers at the beginning and end of the file. This means that:
+ * At the beginning of a compression operation, there must be enough free
+ space in the output buffer to hold the header markers (typically 600 or
+ so bytes). The recommended buffer size is bigger than this anyway, so
+ this is not a problem as long as you start with an empty buffer. However,
+ this restriction might catch you if you insert large special markers, such
+ as a JFIF thumbnail image, without flushing the buffer afterwards.
+ * When you call jpeg_finish_compress(), there must be enough space in the
+ output buffer to emit any buffered data and the final EOI marker. In the
+ current implementation, half a dozen bytes should suffice for this, but
+ for safety's sake we recommend ensuring that at least 100 bytes are free
+ before calling jpeg_finish_compress().
+
+A more significant restriction is that jpeg_finish_compress() cannot suspend.
+This means you cannot use suspension with multi-pass operating modes, namely
+Huffman code optimization and multiple-scan output. Those modes write the
+whole file during jpeg_finish_compress(), which will certainly result in
+buffer overrun. (Note that this restriction applies only to compression,
+not decompression. The decompressor supports input suspension in all of its
+operating modes.)
+
+Decompression suspension:
+
+For decompression suspension, use a fill_input_buffer() routine that simply
+returns FALSE (except perhaps during error recovery, as discussed below).
+This will cause the decompressor to return to its caller with an indication
+that suspension has occurred. This can happen at four places:
+ * jpeg_read_header(): will return JPEG_SUSPENDED.
+ * jpeg_start_decompress(): will return FALSE, rather than its usual TRUE.
+ * jpeg_read_scanlines(): will return the number of scanlines already
+ completed (possibly 0).
+ * jpeg_finish_decompress(): will return FALSE, rather than its usual TRUE.
+The surrounding application must recognize these cases, load more data into
+the input buffer, and repeat the call. In the case of jpeg_read_scanlines(),
+increment the passed pointers past any scanlines successfully read.
+
+Just as with compression, the decompressor will typically backtrack to a
+convenient restart point before suspending. When fill_input_buffer() is
+called, next_input_byte/bytes_in_buffer point to the current restart point,
+which is where the decompressor will backtrack to if FALSE is returned.
+The data beyond that position must NOT be discarded if you suspend; it needs
+to be re-read upon resumption. In most implementations, you'll need to shift
+this data down to the start of your work buffer and then load more data after
+it. Again, this behavior means that a several-Kbyte work buffer is essential
+for decent performance; furthermore, you should load a reasonable amount of
+new data before resuming decompression. (If you loaded, say, only one new
+byte each time around, you could waste a LOT of cycles.)
+
+The skip_input_data() source manager routine requires special care in a
+suspension scenario. This routine is NOT granted the ability to suspend the
+decompressor; it can decrement bytes_in_buffer to zero, but no more. If the
+requested skip distance exceeds the amount of data currently in the input
+buffer, then skip_input_data() must set bytes_in_buffer to zero and record the
+additional skip distance somewhere else. The decompressor will immediately
+call fill_input_buffer(), which should return FALSE, which will cause a
+suspension return. The surrounding application must then arrange to discard
+the recorded number of bytes before it resumes loading the input buffer.
+(Yes, this design is rather baroque, but it avoids complexity in the far more
+common case where a non-suspending source manager is used.)
+
+If the input data has been exhausted, we recommend that you emit a warning
+and insert dummy EOI markers just as a non-suspending data source manager
+would do. This can be handled either in the surrounding application logic or
+within fill_input_buffer(); the latter is probably more efficient. If
+fill_input_buffer() knows that no more data is available, it can set the
+pointer/count to point to a dummy EOI marker and then return TRUE just as
+though it had read more data in a non-suspending situation.
+
+The decompressor does not attempt to suspend within standard JPEG markers;
+instead it will backtrack to the start of the marker and reprocess the whole
+marker next time. Hence the input buffer must be large enough to hold the
+longest standard marker in the file. Standard JPEG markers should normally
+not exceed a few hundred bytes each (DHT tables are typically the longest).
+We recommend at least a 2K buffer for performance reasons, which is much
+larger than any correct marker is likely to be. For robustness against
+damaged marker length counts, you may wish to insert a test in your
+application for the case that the input buffer is completely full and yet
+the decoder has suspended without consuming any data --- otherwise, if this
+situation did occur, it would lead to an endless loop. (The library can't
+provide this test since it has no idea whether "the buffer is full", or
+even whether there is a fixed-size input buffer.)
+
+The input buffer would need to be 64K to allow for arbitrary COM or APPn
+markers, but these are handled specially: they are either saved into allocated
+memory, or skipped over by calling skip_input_data(). In the former case,
+suspension is handled correctly, and in the latter case, the problem of
+buffer overrun is placed on skip_input_data's shoulders, as explained above.
+Note that if you provide your own marker handling routine for large markers,
+you should consider how to deal with buffer overflow.
+
+Multiple-buffer management:
+
+In some applications it is desirable to store the compressed data in a linked
+list of buffer areas, so as to avoid data copying. This can be handled by
+having empty_output_buffer() or fill_input_buffer() set the pointer and count
+to reference the next available buffer; FALSE is returned only if no more
+buffers are available. Although seemingly straightforward, there is a
+pitfall in this approach: the backtrack that occurs when FALSE is returned
+could back up into an earlier buffer. For example, when fill_input_buffer()
+is called, the current pointer & count indicate the backtrack restart point.
+Since fill_input_buffer() will set the pointer and count to refer to a new
+buffer, the restart position must be saved somewhere else. Suppose a second
+call to fill_input_buffer() occurs in the same library call, and no
+additional input data is available, so fill_input_buffer must return FALSE.
+If the JPEG library has not moved the pointer/count forward in the current
+buffer, then *the correct restart point is the saved position in the prior
+buffer*. Prior buffers may be discarded only after the library establishes
+a restart point within a later buffer. Similar remarks apply for output into
+a chain of buffers.
+
+The library will never attempt to backtrack over a skip_input_data() call,
+so any skipped data can be permanently discarded. You still have to deal
+with the case of skipping not-yet-received data, however.
+
+It's much simpler to use only a single buffer; when fill_input_buffer() is
+called, move any unconsumed data (beyond the current pointer/count) down to
+the beginning of this buffer and then load new data into the remaining buffer
+space. This approach requires a little more data copying but is far easier
+to get right.
+
+
+Progressive JPEG support
+------------------------
+
+Progressive JPEG rearranges the stored data into a series of scans of
+increasing quality. In situations where a JPEG file is transmitted across a
+slow communications link, a decoder can generate a low-quality image very
+quickly from the first scan, then gradually improve the displayed quality as
+more scans are received. The final image after all scans are complete is
+identical to that of a regular (sequential) JPEG file of the same quality
+setting. Progressive JPEG files are often slightly smaller than equivalent
+sequential JPEG files, but the possibility of incremental display is the main
+reason for using progressive JPEG.
+
+The IJG encoder library generates progressive JPEG files when given a
+suitable "scan script" defining how to divide the data into scans.
+Creation of progressive JPEG files is otherwise transparent to the encoder.
+Progressive JPEG files can also be read transparently by the decoder library.
+If the decoding application simply uses the library as defined above, it
+will receive a final decoded image without any indication that the file was
+progressive. Of course, this approach does not allow incremental display.
+To perform incremental display, an application needs to use the decoder
+library's "buffered-image" mode, in which it receives a decoded image
+multiple times.
+
+Each displayed scan requires about as much work to decode as a full JPEG
+image of the same size, so the decoder must be fairly fast in relation to the
+data transmission rate in order to make incremental display useful. However,
+it is possible to skip displaying the image and simply add the incoming bits
+to the decoder's coefficient buffer. This is fast because only Huffman
+decoding need be done, not IDCT, upsampling, colorspace conversion, etc.
+The IJG decoder library allows the application to switch dynamically between
+displaying the image and simply absorbing the incoming bits. A properly
+coded application can automatically adapt the number of display passes to
+suit the time available as the image is received. Also, a final
+higher-quality display cycle can be performed from the buffered data after
+the end of the file is reached.
+
+Progressive compression:
+
+To create a progressive JPEG file (or a multiple-scan sequential JPEG file),
+set the scan_info cinfo field to point to an array of scan descriptors, and
+perform compression as usual. Instead of constructing your own scan list,
+you can call the jpeg_simple_progression() helper routine to create a
+recommended progression sequence; this method should be used by all
+applications that don't want to get involved in the nitty-gritty of
+progressive scan sequence design. (If you want to provide user control of
+scan sequences, you may wish to borrow the scan script reading code found
+in rdswitch.c, so that you can read scan script files just like cjpeg's.)
+When scan_info is not NULL, the compression library will store DCT'd data
+into a buffer array as jpeg_write_scanlines() is called, and will emit all
+the requested scans during jpeg_finish_compress(). This implies that
+multiple-scan output cannot be created with a suspending data destination
+manager, since jpeg_finish_compress() does not support suspension. We
+should also note that the compressor currently forces Huffman optimization
+mode when creating a progressive JPEG file, because the default Huffman
+tables are unsuitable for progressive files.
+
+Progressive decompression:
+
+When buffered-image mode is not used, the decoder library will read all of
+a multi-scan file during jpeg_start_decompress(), so that it can provide a
+final decoded image. (Here "multi-scan" means either progressive or
+multi-scan sequential.) This makes multi-scan files transparent to the
+decoding application. However, existing applications that used suspending
+input with version 5 of the IJG library will need to be modified to check
+for a suspension return from jpeg_start_decompress().
+
+To perform incremental display, an application must use the library's
+buffered-image mode. This is described in the next section.
+
+
+Buffered-image mode
+-------------------
+
+In buffered-image mode, the library stores the partially decoded image in a
+coefficient buffer, from which it can be read out as many times as desired.
+This mode is typically used for incremental display of progressive JPEG files,
+but it can be used with any JPEG file. Each scan of a progressive JPEG file
+adds more data (more detail) to the buffered image. The application can
+display in lockstep with the source file (one display pass per input scan),
+or it can allow input processing to outrun display processing. By making
+input and display processing run independently, it is possible for the
+application to adapt progressive display to a wide range of data transmission
+rates.
+
+The basic control flow for buffered-image decoding is
+
+ jpeg_create_decompress()
+ set data source
+ jpeg_read_header()
+ set overall decompression parameters
+ cinfo.buffered_image = TRUE; /* select buffered-image mode */
+ jpeg_start_decompress()
+ for (each output pass) {
+ adjust output decompression parameters if required
+ jpeg_start_output() /* start a new output pass */
+ for (all scanlines in image) {
+ jpeg_read_scanlines()
+ display scanlines
+ }
+ jpeg_finish_output() /* terminate output pass */
+ }
+ jpeg_finish_decompress()
+ jpeg_destroy_decompress()
+
+This differs from ordinary unbuffered decoding in that there is an additional
+level of looping. The application can choose how many output passes to make
+and how to display each pass.
+
+The simplest approach to displaying progressive images is to do one display
+pass for each scan appearing in the input file. In this case the outer loop
+condition is typically
+ while (! jpeg_input_complete(&cinfo))
+and the start-output call should read
+ jpeg_start_output(&cinfo, cinfo.input_scan_number);
+The second parameter to jpeg_start_output() indicates which scan of the input
+file is to be displayed; the scans are numbered starting at 1 for this
+purpose. (You can use a loop counter starting at 1 if you like, but using
+the library's input scan counter is easier.) The library automatically reads
+data as necessary to complete each requested scan, and jpeg_finish_output()
+advances to the next scan or end-of-image marker (hence input_scan_number
+will be incremented by the time control arrives back at jpeg_start_output()).
+With this technique, data is read from the input file only as needed, and
+input and output processing run in lockstep.
+
+After reading the final scan and reaching the end of the input file, the
+buffered image remains available; it can be read additional times by
+repeating the jpeg_start_output()/jpeg_read_scanlines()/jpeg_finish_output()
+sequence. For example, a useful technique is to use fast one-pass color
+quantization for display passes made while the image is arriving, followed by
+a final display pass using two-pass quantization for highest quality. This
+is done by changing the library parameters before the final output pass.
+Changing parameters between passes is discussed in detail below.
+
+In general the last scan of a progressive file cannot be recognized as such
+until after it is read, so a post-input display pass is the best approach if
+you want special processing in the final pass.
+
+When done with the image, be sure to call jpeg_finish_decompress() to release
+the buffered image (or just use jpeg_destroy_decompress()).
+
+If input data arrives faster than it can be displayed, the application can
+cause the library to decode input data in advance of what's needed to produce
+output. This is done by calling the routine jpeg_consume_input().
+The return value is one of the following:
+ JPEG_REACHED_SOS: reached an SOS marker (the start of a new scan)
+ JPEG_REACHED_EOI: reached the EOI marker (end of image)
+ JPEG_ROW_COMPLETED: completed reading one MCU row of compressed data
+ JPEG_SCAN_COMPLETED: completed reading last MCU row of current scan
+ JPEG_SUSPENDED: suspended before completing any of the above
+(JPEG_SUSPENDED can occur only if a suspending data source is used.) This
+routine can be called at any time after initializing the JPEG object. It
+reads some additional data and returns when one of the indicated significant
+events occurs. (If called after the EOI marker is reached, it will
+immediately return JPEG_REACHED_EOI without attempting to read more data.)
+
+The library's output processing will automatically call jpeg_consume_input()
+whenever the output processing overtakes the input; thus, simple lockstep
+display requires no direct calls to jpeg_consume_input(). But by adding
+calls to jpeg_consume_input(), you can absorb data in advance of what is
+being displayed. This has two benefits:
+ * You can limit buildup of unprocessed data in your input buffer.
+ * You can eliminate extra display passes by paying attention to the
+ state of the library's input processing.
+
+The first of these benefits only requires interspersing calls to
+jpeg_consume_input() with your display operations and any other processing
+you may be doing. To avoid wasting cycles due to backtracking, it's best to
+call jpeg_consume_input() only after a hundred or so new bytes have arrived.
+This is discussed further under "I/O suspension", above. (Note: the JPEG
+library currently is not thread-safe. You must not call jpeg_consume_input()
+from one thread of control if a different library routine is working on the
+same JPEG object in another thread.)
+
+When input arrives fast enough that more than one new scan is available
+before you start a new output pass, you may as well skip the output pass
+corresponding to the completed scan. This occurs for free if you pass
+cinfo.input_scan_number as the target scan number to jpeg_start_output().
+The input_scan_number field is simply the index of the scan currently being
+consumed by the input processor. You can ensure that this is up-to-date by
+emptying the input buffer just before calling jpeg_start_output(): call
+jpeg_consume_input() repeatedly until it returns JPEG_SUSPENDED or
+JPEG_REACHED_EOI.
+
+The target scan number passed to jpeg_start_output() is saved in the
+cinfo.output_scan_number field. The library's output processing calls
+jpeg_consume_input() whenever the current input scan number and row within
+that scan is less than or equal to the current output scan number and row.
+Thus, input processing can "get ahead" of the output processing but is not
+allowed to "fall behind". You can achieve several different effects by
+manipulating this interlock rule. For example, if you pass a target scan
+number greater than the current input scan number, the output processor will
+wait until that scan starts to arrive before producing any output. (To avoid
+an infinite loop, the target scan number is automatically reset to the last
+scan number when the end of image is reached. Thus, if you specify a large
+target scan number, the library will just absorb the entire input file and
+then perform an output pass. This is effectively the same as what
+jpeg_start_decompress() does when you don't select buffered-image mode.)
+When you pass a target scan number equal to the current input scan number,
+the image is displayed no faster than the current input scan arrives. The
+final possibility is to pass a target scan number less than the current input
+scan number; this disables the input/output interlock and causes the output
+processor to simply display whatever it finds in the image buffer, without
+waiting for input. (However, the library will not accept a target scan
+number less than one, so you can't avoid waiting for the first scan.)
+
+When data is arriving faster than the output display processing can advance
+through the image, jpeg_consume_input() will store data into the buffered
+image beyond the point at which the output processing is reading data out
+again. If the input arrives fast enough, it may "wrap around" the buffer to
+the point where the input is more than one whole scan ahead of the output.
+If the output processing simply proceeds through its display pass without
+paying attention to the input, the effect seen on-screen is that the lower
+part of the image is one or more scans better in quality than the upper part.
+Then, when the next output scan is started, you have a choice of what target
+scan number to use. The recommended choice is to use the current input scan
+number at that time, which implies that you've skipped the output scans
+corresponding to the input scans that were completed while you processed the
+previous output scan. In this way, the decoder automatically adapts its
+speed to the arriving data, by skipping output scans as necessary to keep up
+with the arriving data.
+
+When using this strategy, you'll want to be sure that you perform a final
+output pass after receiving all the data; otherwise your last display may not
+be full quality across the whole screen. So the right outer loop logic is
+something like this:
+ do {
+ absorb any waiting input by calling jpeg_consume_input()
+ final_pass = jpeg_input_complete(&cinfo);
+ adjust output decompression parameters if required
+ jpeg_start_output(&cinfo, cinfo.input_scan_number);
+ ...
+ jpeg_finish_output()
+ } while (! final_pass);
+rather than quitting as soon as jpeg_input_complete() returns TRUE. This
+arrangement makes it simple to use higher-quality decoding parameters
+for the final pass. But if you don't want to use special parameters for
+the final pass, the right loop logic is like this:
+ for (;;) {
+ absorb any waiting input by calling jpeg_consume_input()
+ jpeg_start_output(&cinfo, cinfo.input_scan_number);
+ ...
+ jpeg_finish_output()
+ if (jpeg_input_complete(&cinfo) &&
+ cinfo.input_scan_number == cinfo.output_scan_number)
+ break;
+ }
+In this case you don't need to know in advance whether an output pass is to
+be the last one, so it's not necessary to have reached EOF before starting
+the final output pass; rather, what you want to test is whether the output
+pass was performed in sync with the final input scan. This form of the loop
+will avoid an extra output pass whenever the decoder is able (or nearly able)
+to keep up with the incoming data.
+
+When the data transmission speed is high, you might begin a display pass,
+then find that much or all of the file has arrived before you can complete
+the pass. (You can detect this by noting the JPEG_REACHED_EOI return code
+from jpeg_consume_input(), or equivalently by testing jpeg_input_complete().)
+In this situation you may wish to abort the current display pass and start a
+new one using the newly arrived information. To do so, just call
+jpeg_finish_output() and then start a new pass with jpeg_start_output().
+
+A variant strategy is to abort and restart display if more than one complete
+scan arrives during an output pass; this can be detected by noting
+JPEG_REACHED_SOS returns and/or examining cinfo.input_scan_number. This
+idea should be employed with caution, however, since the display process
+might never get to the bottom of the image before being aborted, resulting
+in the lower part of the screen being several passes worse than the upper.
+In most cases it's probably best to abort an output pass only if the whole
+file has arrived and you want to begin the final output pass immediately.
+
+When receiving data across a communication link, we recommend always using
+the current input scan number for the output target scan number; if a
+higher-quality final pass is to be done, it should be started (aborting any
+incomplete output pass) as soon as the end of file is received. However,
+many other strategies are possible. For example, the application can examine
+the parameters of the current input scan and decide whether to display it or
+not. If the scan contains only chroma data, one might choose not to use it
+as the target scan, expecting that the scan will be small and will arrive
+quickly. To skip to the next scan, call jpeg_consume_input() until it
+returns JPEG_REACHED_SOS or JPEG_REACHED_EOI. Or just use the next higher
+number as the target scan for jpeg_start_output(); but that method doesn't
+let you inspect the next scan's parameters before deciding to display it.
+
+
+In buffered-image mode, jpeg_start_decompress() never performs input and
+thus never suspends. An application that uses input suspension with
+buffered-image mode must be prepared for suspension returns from these
+routines:
+* jpeg_start_output() performs input only if you request 2-pass quantization
+ and the target scan isn't fully read yet. (This is discussed below.)
+* jpeg_read_scanlines(), as always, returns the number of scanlines that it
+ was able to produce before suspending.
+* jpeg_finish_output() will read any markers following the target scan,
+ up to the end of the file or the SOS marker that begins another scan.
+ (But it reads no input if jpeg_consume_input() has already reached the
+ end of the file or a SOS marker beyond the target output scan.)
+* jpeg_finish_decompress() will read until the end of file, and thus can
+ suspend if the end hasn't already been reached (as can be tested by
+ calling jpeg_input_complete()).
+jpeg_start_output(), jpeg_finish_output(), and jpeg_finish_decompress()
+all return TRUE if they completed their tasks, FALSE if they had to suspend.
+In the event of a FALSE return, the application must load more input data
+and repeat the call. Applications that use non-suspending data sources need
+not check the return values of these three routines.
+
+
+It is possible to change decoding parameters between output passes in the
+buffered-image mode. The decoder library currently supports only very
+limited changes of parameters. ONLY THE FOLLOWING parameter changes are
+allowed after jpeg_start_decompress() is called:
+* dct_method can be changed before each call to jpeg_start_output().
+ For example, one could use a fast DCT method for early scans, changing
+ to a higher quality method for the final scan.
+* dither_mode can be changed before each call to jpeg_start_output();
+ of course this has no impact if not using color quantization. Typically
+ one would use ordered dither for initial passes, then switch to
+ Floyd-Steinberg dither for the final pass. Caution: changing dither mode
+ can cause more memory to be allocated by the library. Although the amount
+ of memory involved is not large (a scanline or so), it may cause the
+ initial max_memory_to_use specification to be exceeded, which in the worst
+ case would result in an out-of-memory failure.
+* do_block_smoothing can be changed before each call to jpeg_start_output().
+ This setting is relevant only when decoding a progressive JPEG image.
+ During the first DC-only scan, block smoothing provides a very "fuzzy" look
+ instead of the very "blocky" look seen without it; which is better seems a
+ matter of personal taste. But block smoothing is nearly always a win
+ during later stages, especially when decoding a successive-approximation
+ image: smoothing helps to hide the slight blockiness that otherwise shows
+ up on smooth gradients until the lowest coefficient bits are sent.
+* Color quantization mode can be changed under the rules described below.
+ You *cannot* change between full-color and quantized output (because that
+ would alter the required I/O buffer sizes), but you can change which
+ quantization method is used.
+
+When generating color-quantized output, changing quantization method is a
+very useful way of switching between high-speed and high-quality display.
+The library allows you to change among its three quantization methods:
+1. Single-pass quantization to a fixed color cube.
+ Selected by cinfo.two_pass_quantize = FALSE and cinfo.colormap = NULL.
+2. Single-pass quantization to an application-supplied colormap.
+ Selected by setting cinfo.colormap to point to the colormap (the value of
+ two_pass_quantize is ignored); also set cinfo.actual_number_of_colors.
+3. Two-pass quantization to a colormap chosen specifically for the image.
+ Selected by cinfo.two_pass_quantize = TRUE and cinfo.colormap = NULL.
+ (This is the default setting selected by jpeg_read_header, but it is
+ probably NOT what you want for the first pass of progressive display!)
+These methods offer successively better quality and lesser speed. However,
+only the first method is available for quantizing in non-RGB color spaces.
+
+IMPORTANT: because the different quantizer methods have very different
+working-storage requirements, the library requires you to indicate which
+one(s) you intend to use before you call jpeg_start_decompress(). (If we did
+not require this, the max_memory_to_use setting would be a complete fiction.)
+You do this by setting one or more of these three cinfo fields to TRUE:
+ enable_1pass_quant Fixed color cube colormap
+ enable_external_quant Externally-supplied colormap
+ enable_2pass_quant Two-pass custom colormap
+All three are initialized FALSE by jpeg_read_header(). But
+jpeg_start_decompress() automatically sets TRUE the one selected by the
+current two_pass_quantize and colormap settings, so you only need to set the
+enable flags for any other quantization methods you plan to change to later.
+
+After setting the enable flags correctly at jpeg_start_decompress() time, you
+can change to any enabled quantization method by setting two_pass_quantize
+and colormap properly just before calling jpeg_start_output(). The following
+special rules apply:
+1. You must explicitly set cinfo.colormap to NULL when switching to 1-pass
+ or 2-pass mode from a different mode, or when you want the 2-pass
+ quantizer to be re-run to generate a new colormap.
+2. To switch to an external colormap, or to change to a different external
+ colormap than was used on the prior pass, you must call
+ jpeg_new_colormap() after setting cinfo.colormap.
+NOTE: if you want to use the same colormap as was used in the prior pass,
+you should not do either of these things. This will save some nontrivial
+switchover costs.
+(These requirements exist because cinfo.colormap will always be non-NULL
+after completing a prior output pass, since both the 1-pass and 2-pass
+quantizers set it to point to their output colormaps. Thus you have to
+do one of these two things to notify the library that something has changed.
+Yup, it's a bit klugy, but it's necessary to do it this way for backwards
+compatibility.)
+
+Note that in buffered-image mode, the library generates any requested colormap
+during jpeg_start_output(), not during jpeg_start_decompress().
+
+When using two-pass quantization, jpeg_start_output() makes a pass over the
+buffered image to determine the optimum color map; it therefore may take a
+significant amount of time, whereas ordinarily it does little work. The
+progress monitor hook is called during this pass, if defined. It is also
+important to realize that if the specified target scan number is greater than
+or equal to the current input scan number, jpeg_start_output() will attempt
+to consume input as it makes this pass. If you use a suspending data source,
+you need to check for a FALSE return from jpeg_start_output() under these
+conditions. The combination of 2-pass quantization and a not-yet-fully-read
+target scan is the only case in which jpeg_start_output() will consume input.
+
+
+Application authors who support buffered-image mode may be tempted to use it
+for all JPEG images, even single-scan ones. This will work, but it is
+inefficient: there is no need to create an image-sized coefficient buffer for
+single-scan images. Requesting buffered-image mode for such an image wastes
+memory. Worse, it can cost time on large images, since the buffered data has
+to be swapped out or written to a temporary file. If you are concerned about
+maximum performance on baseline JPEG files, you should use buffered-image
+mode only when the incoming file actually has multiple scans. This can be
+tested by calling jpeg_has_multiple_scans(), which will return a correct
+result at any time after jpeg_read_header() completes.
+
+It is also worth noting that when you use jpeg_consume_input() to let input
+processing get ahead of output processing, the resulting pattern of access to
+the coefficient buffer is quite nonsequential. It's best to use the memory
+manager jmemnobs.c if you can (ie, if you have enough real or virtual main
+memory). If not, at least make sure that max_memory_to_use is set as high as
+possible. If the JPEG memory manager has to use a temporary file, you will
+probably see a lot of disk traffic and poor performance. (This could be
+improved with additional work on the memory manager, but we haven't gotten
+around to it yet.)
+
+In some applications it may be convenient to use jpeg_consume_input() for all
+input processing, including reading the initial markers; that is, you may
+wish to call jpeg_consume_input() instead of jpeg_read_header() during
+startup. This works, but note that you must check for JPEG_REACHED_SOS and
+JPEG_REACHED_EOI return codes as the equivalent of jpeg_read_header's codes.
+Once the first SOS marker has been reached, you must call
+jpeg_start_decompress() before jpeg_consume_input() will consume more input;
+it'll just keep returning JPEG_REACHED_SOS until you do. If you read a
+tables-only file this way, jpeg_consume_input() will return JPEG_REACHED_EOI
+without ever returning JPEG_REACHED_SOS; be sure to check for this case.
+If this happens, the decompressor will not read any more input until you call
+jpeg_abort() to reset it. It is OK to call jpeg_consume_input() even when not
+using buffered-image mode, but in that case it's basically a no-op after the
+initial markers have been read: it will just return JPEG_SUSPENDED.
+
+
+Abbreviated datastreams and multiple images
+-------------------------------------------
+
+A JPEG compression or decompression object can be reused to process multiple
+images. This saves a small amount of time per image by eliminating the
+"create" and "destroy" operations, but that isn't the real purpose of the
+feature. Rather, reuse of an object provides support for abbreviated JPEG
+datastreams. Object reuse can also simplify processing a series of images in
+a single input or output file. This section explains these features.
+
+A JPEG file normally contains several hundred bytes worth of quantization
+and Huffman tables. In a situation where many images will be stored or
+transmitted with identical tables, this may represent an annoying overhead.
+The JPEG standard therefore permits tables to be omitted. The standard
+defines three classes of JPEG datastreams:
+ * "Interchange" datastreams contain an image and all tables needed to decode
+ the image. These are the usual kind of JPEG file.
+ * "Abbreviated image" datastreams contain an image, but are missing some or
+ all of the tables needed to decode that image.
+ * "Abbreviated table specification" (henceforth "tables-only") datastreams
+ contain only table specifications.
+To decode an abbreviated image, it is necessary to load the missing table(s)
+into the decoder beforehand. This can be accomplished by reading a separate
+tables-only file. A variant scheme uses a series of images in which the first
+image is an interchange (complete) datastream, while subsequent ones are
+abbreviated and rely on the tables loaded by the first image. It is assumed
+that once the decoder has read a table, it will remember that table until a
+new definition for the same table number is encountered.
+
+It is the application designer's responsibility to figure out how to associate
+the correct tables with an abbreviated image. While abbreviated datastreams
+can be useful in a closed environment, their use is strongly discouraged in
+any situation where data exchange with other applications might be needed.
+Caveat designer.
+
+The JPEG library provides support for reading and writing any combination of
+tables-only datastreams and abbreviated images. In both compression and
+decompression objects, a quantization or Huffman table will be retained for
+the lifetime of the object, unless it is overwritten by a new table definition.
+
+
+To create abbreviated image datastreams, it is only necessary to tell the
+compressor not to emit some or all of the tables it is using. Each
+quantization and Huffman table struct contains a boolean field "sent_table",
+which normally is initialized to FALSE. For each table used by the image, the
+header-writing process emits the table and sets sent_table = TRUE unless it is
+already TRUE. (In normal usage, this prevents outputting the same table
+definition multiple times, as would otherwise occur because the chroma
+components typically share tables.) Thus, setting this field to TRUE before
+calling jpeg_start_compress() will prevent the table from being written at
+all.
+
+If you want to create a "pure" abbreviated image file containing no tables,
+just call "jpeg_suppress_tables(&cinfo, TRUE)" after constructing all the
+tables. If you want to emit some but not all tables, you'll need to set the
+individual sent_table fields directly.
+
+To create an abbreviated image, you must also call jpeg_start_compress()
+with a second parameter of FALSE, not TRUE. Otherwise jpeg_start_compress()
+will force all the sent_table fields to FALSE. (This is a safety feature to
+prevent abbreviated images from being created accidentally.)
+
+To create a tables-only file, perform the same parameter setup that you
+normally would, but instead of calling jpeg_start_compress() and so on, call
+jpeg_write_tables(&cinfo). This will write an abbreviated datastream
+containing only SOI, DQT and/or DHT markers, and EOI. All the quantization
+and Huffman tables that are currently defined in the compression object will
+be emitted unless their sent_tables flag is already TRUE, and then all the
+sent_tables flags will be set TRUE.
+
+A sure-fire way to create matching tables-only and abbreviated image files
+is to proceed as follows:
+
+ create JPEG compression object
+ set JPEG parameters
+ set destination to tables-only file
+ jpeg_write_tables(&cinfo);
+ set destination to image file
+ jpeg_start_compress(&cinfo, FALSE);
+ write data...
+ jpeg_finish_compress(&cinfo);
+
+Since the JPEG parameters are not altered between writing the table file and
+the abbreviated image file, the same tables are sure to be used. Of course,
+you can repeat the jpeg_start_compress() ... jpeg_finish_compress() sequence
+many times to produce many abbreviated image files matching the table file.
+
+You cannot suppress output of the computed Huffman tables when Huffman
+optimization is selected. (If you could, there'd be no way to decode the
+image...) Generally, you don't want to set optimize_coding = TRUE when
+you are trying to produce abbreviated files.
+
+In some cases you might want to compress an image using tables which are
+not stored in the application, but are defined in an interchange or
+tables-only file readable by the application. This can be done by setting up
+a JPEG decompression object to read the specification file, then copying the
+tables into your compression object. See jpeg_copy_critical_parameters()
+for an example of copying quantization tables.
+
+
+To read abbreviated image files, you simply need to load the proper tables
+into the decompression object before trying to read the abbreviated image.
+If the proper tables are stored in the application program, you can just
+allocate the table structs and fill in their contents directly. For example,
+to load a fixed quantization table into table slot "n":
+
+ if (cinfo.quant_tbl_ptrs[n] == NULL)
+ cinfo.quant_tbl_ptrs[n] = jpeg_alloc_quant_table((j_common_ptr) &cinfo);
+ quant_ptr = cinfo.quant_tbl_ptrs[n]; /* quant_ptr is JQUANT_TBL* */
+ for (i = 0; i < 64; i++) {
+ /* Qtable[] is desired quantization table, in natural array order */
+ quant_ptr->quantval[i] = Qtable[i];
+ }
+
+Code to load a fixed Huffman table is typically (for AC table "n"):
+
+ if (cinfo.ac_huff_tbl_ptrs[n] == NULL)
+ cinfo.ac_huff_tbl_ptrs[n] = jpeg_alloc_huff_table((j_common_ptr) &cinfo);
+ huff_ptr = cinfo.ac_huff_tbl_ptrs[n]; /* huff_ptr is JHUFF_TBL* */
+ for (i = 1; i <= 16; i++) {
+ /* counts[i] is number of Huffman codes of length i bits, i=1..16 */
+ huff_ptr->bits[i] = counts[i];
+ }
+ for (i = 0; i < 256; i++) {
+ /* symbols[] is the list of Huffman symbols, in code-length order */
+ huff_ptr->huffval[i] = symbols[i];
+ }
+
+(Note that trying to set cinfo.quant_tbl_ptrs[n] to point directly at a
+constant JQUANT_TBL object is not safe. If the incoming file happened to
+contain a quantization table definition, your master table would get
+overwritten! Instead allocate a working table copy and copy the master table
+into it, as illustrated above. Ditto for Huffman tables, of course.)
+
+You might want to read the tables from a tables-only file, rather than
+hard-wiring them into your application. The jpeg_read_header() call is
+sufficient to read a tables-only file. You must pass a second parameter of
+FALSE to indicate that you do not require an image to be present. Thus, the
+typical scenario is
+
+ create JPEG decompression object
+ set source to tables-only file
+ jpeg_read_header(&cinfo, FALSE);
+ set source to abbreviated image file
+ jpeg_read_header(&cinfo, TRUE);
+ set decompression parameters
+ jpeg_start_decompress(&cinfo);
+ read data...
+ jpeg_finish_decompress(&cinfo);
+
+In some cases, you may want to read a file without knowing whether it contains
+an image or just tables. In that case, pass FALSE and check the return value
+from jpeg_read_header(): it will be JPEG_HEADER_OK if an image was found,
+JPEG_HEADER_TABLES_ONLY if only tables were found. (A third return value,
+JPEG_SUSPENDED, is possible when using a suspending data source manager.)
+Note that jpeg_read_header() will not complain if you read an abbreviated
+image for which you haven't loaded the missing tables; the missing-table check
+occurs later, in jpeg_start_decompress().
+
+
+It is possible to read a series of images from a single source file by
+repeating the jpeg_read_header() ... jpeg_finish_decompress() sequence,
+without releasing/recreating the JPEG object or the data source module.
+(If you did reinitialize, any partial bufferload left in the data source
+buffer at the end of one image would be discarded, causing you to lose the
+start of the next image.) When you use this method, stored tables are
+automatically carried forward, so some of the images can be abbreviated images
+that depend on tables from earlier images.
+
+If you intend to write a series of images into a single destination file,
+you might want to make a specialized data destination module that doesn't
+flush the output buffer at term_destination() time. This would speed things
+up by some trifling amount. Of course, you'd need to remember to flush the
+buffer after the last image. You can make the later images be abbreviated
+ones by passing FALSE to jpeg_start_compress().
+
+
+Special markers
+---------------
+
+Some applications may need to insert or extract special data in the JPEG
+datastream. The JPEG standard provides marker types "COM" (comment) and
+"APP0" through "APP15" (application) to hold application-specific data.
+Unfortunately, the use of these markers is not specified by the standard.
+COM markers are fairly widely used to hold user-supplied text. The JFIF file
+format spec uses APP0 markers with specified initial strings to hold certain
+data. Adobe applications use APP14 markers beginning with the string "Adobe"
+for miscellaneous data. Other APPn markers are rarely seen, but might
+contain almost anything.
+
+If you wish to store user-supplied text, we recommend you use COM markers
+and place readable 7-bit ASCII text in them. Newline conventions are not
+standardized --- expect to find LF (Unix style), CR/LF (DOS style), or CR
+(Mac style). A robust COM reader should be able to cope with random binary
+garbage, including nulls, since some applications generate COM markers
+containing non-ASCII junk. (But yours should not be one of them.)
+
+For program-supplied data, use an APPn marker, and be sure to begin it with an
+identifying string so that you can tell whether the marker is actually yours.
+It's probably best to avoid using APP0 or APP14 for any private markers.
+(NOTE: the upcoming SPIFF standard will use APP8 markers; we recommend you
+not use APP8 markers for any private purposes, either.)
+
+Keep in mind that at most 65533 bytes can be put into one marker, but you
+can have as many markers as you like.
+
+By default, the IJG compression library will write a JFIF APP0 marker if the
+selected JPEG colorspace is grayscale or YCbCr, or an Adobe APP14 marker if
+the selected colorspace is RGB, CMYK, or YCCK. You can disable this, but
+we don't recommend it. The decompression library will recognize JFIF and
+Adobe markers and will set the JPEG colorspace properly when one is found.
+
+
+You can write special markers immediately following the datastream header by
+calling jpeg_write_marker() after jpeg_start_compress() and before the first
+call to jpeg_write_scanlines(). When you do this, the markers appear after
+the SOI and the JFIF APP0 and Adobe APP14 markers (if written), but before
+all else. Specify the marker type parameter as "JPEG_COM" for COM or
+"JPEG_APP0 + n" for APPn. (Actually, jpeg_write_marker will let you write
+any marker type, but we don't recommend writing any other kinds of marker.)
+For example, to write a user comment string pointed to by comment_text:
+ jpeg_write_marker(cinfo, JPEG_COM, comment_text, strlen(comment_text));
+
+If it's not convenient to store all the marker data in memory at once,
+you can instead call jpeg_write_m_header() followed by multiple calls to
+jpeg_write_m_byte(). If you do it this way, it's your responsibility to
+call jpeg_write_m_byte() exactly the number of times given in the length
+parameter to jpeg_write_m_header(). (This method lets you empty the
+output buffer partway through a marker, which might be important when
+using a suspending data destination module. In any case, if you are using
+a suspending destination, you should flush its buffer after inserting
+any special markers. See "I/O suspension".)
+
+Or, if you prefer to synthesize the marker byte sequence yourself,
+you can just cram it straight into the data destination module.
+
+If you are writing JFIF 1.02 extension markers (thumbnail images), don't
+forget to set cinfo.JFIF_minor_version = 2 so that the encoder will write the
+correct JFIF version number in the JFIF header marker. The library's default
+is to write version 1.01, but that's wrong if you insert any 1.02 extension
+markers. (We could probably get away with just defaulting to 1.02, but there
+used to be broken decoders that would complain about unknown minor version
+numbers. To reduce compatibility risks it's safest not to write 1.02 unless
+you are actually using 1.02 extensions.)
+
+
+When reading, two methods of handling special markers are available:
+1. You can ask the library to save the contents of COM and/or APPn markers
+into memory, and then examine them at your leisure afterwards.
+2. You can supply your own routine to process COM and/or APPn markers
+on-the-fly as they are read.
+The first method is simpler to use, especially if you are using a suspending
+data source; writing a marker processor that copes with input suspension is
+not easy (consider what happens if the marker is longer than your available
+input buffer). However, the second method conserves memory since the marker
+data need not be kept around after it's been processed.
+
+For either method, you'd normally set up marker handling after creating a
+decompression object and before calling jpeg_read_header(), because the
+markers of interest will typically be near the head of the file and so will
+be scanned by jpeg_read_header. Once you've established a marker handling
+method, it will be used for the life of that decompression object
+(potentially many datastreams), unless you change it. Marker handling is
+determined separately for COM markers and for each APPn marker code.
+
+
+To save the contents of special markers in memory, call
+ jpeg_save_markers(cinfo, marker_code, length_limit)
+where marker_code is the marker type to save, JPEG_COM or JPEG_APP0+n.
+(To arrange to save all the special marker types, you need to call this
+routine 17 times, for COM and APP0-APP15.) If the incoming marker is longer
+than length_limit data bytes, only length_limit bytes will be saved; this
+parameter allows you to avoid chewing up memory when you only need to see the
+first few bytes of a potentially large marker. If you want to save all the
+data, set length_limit to 0xFFFF; that is enough since marker lengths are only
+16 bits. As a special case, setting length_limit to 0 prevents that marker
+type from being saved at all. (That is the default behavior, in fact.)
+
+After jpeg_read_header() completes, you can examine the special markers by
+following the cinfo->marker_list pointer chain. All the special markers in
+the file appear in this list, in order of their occurrence in the file (but
+omitting any markers of types you didn't ask for). Both the original data
+length and the saved data length are recorded for each list entry; the latter
+will not exceed length_limit for the particular marker type. Note that these
+lengths exclude the marker length word, whereas the stored representation
+within the JPEG file includes it. (Hence the maximum data length is really
+only 65533.)
+
+It is possible that additional special markers appear in the file beyond the
+SOS marker at which jpeg_read_header stops; if so, the marker list will be
+extended during reading of the rest of the file. This is not expected to be
+common, however. If you are short on memory you may want to reset the length
+limit to zero for all marker types after finishing jpeg_read_header, to
+ensure that the max_memory_to_use setting cannot be exceeded due to addition
+of later markers.
+
+The marker list remains stored until you call jpeg_finish_decompress or
+jpeg_abort, at which point the memory is freed and the list is set to empty.
+(jpeg_destroy also releases the storage, of course.)
+
+Note that the library is internally interested in APP0 and APP14 markers;
+if you try to set a small nonzero length limit on these types, the library
+will silently force the length up to the minimum it wants. (But you can set
+a zero length limit to prevent them from being saved at all.) Also, in a
+16-bit environment, the maximum length limit may be constrained to less than
+65533 by malloc() limitations. It is therefore best not to assume that the
+effective length limit is exactly what you set it to be.
+
+
+If you want to supply your own marker-reading routine, you do it by calling
+jpeg_set_marker_processor(). A marker processor routine must have the
+signature
+ boolean jpeg_marker_parser_method (j_decompress_ptr cinfo)
+Although the marker code is not explicitly passed, the routine can find it
+in cinfo->unread_marker. At the time of call, the marker proper has been
+read from the data source module. The processor routine is responsible for
+reading the marker length word and the remaining parameter bytes, if any.
+Return TRUE to indicate success. (FALSE should be returned only if you are
+using a suspending data source and it tells you to suspend. See the standard
+marker processors in jdmarker.c for appropriate coding methods if you need to
+use a suspending data source.)
+
+If you override the default APP0 or APP14 processors, it is up to you to
+recognize JFIF and Adobe markers if you want colorspace recognition to occur
+properly. We recommend copying and extending the default processors if you
+want to do that. (A better idea is to save these marker types for later
+examination by calling jpeg_save_markers(); that method doesn't interfere
+with the library's own processing of these markers.)
+
+jpeg_set_marker_processor() and jpeg_save_markers() are mutually exclusive
+--- if you call one it overrides any previous call to the other, for the
+particular marker type specified.
+
+A simple example of an external COM processor can be found in djpeg.c.
+Also, see jpegtran.c for an example of using jpeg_save_markers.
+
+
+Raw (downsampled) image data
+----------------------------
+
+Some applications need to supply already-downsampled image data to the JPEG
+compressor, or to receive raw downsampled data from the decompressor. The
+library supports this requirement by allowing the application to write or
+read raw data, bypassing the normal preprocessing or postprocessing steps.
+The interface is different from the standard one and is somewhat harder to
+use. If your interest is merely in bypassing color conversion, we recommend
+that you use the standard interface and simply set jpeg_color_space =
+in_color_space (or jpeg_color_space = out_color_space for decompression).
+The mechanism described in this section is necessary only to supply or
+receive downsampled image data, in which not all components have the same
+dimensions.
+
+
+To compress raw data, you must supply the data in the colorspace to be used
+in the JPEG file (please read the earlier section on Special color spaces)
+and downsampled to the sampling factors specified in the JPEG parameters.
+You must supply the data in the format used internally by the JPEG library,
+namely a JSAMPIMAGE array. This is an array of pointers to two-dimensional
+arrays, each of type JSAMPARRAY. Each 2-D array holds the values for one
+color component. This structure is necessary since the components are of
+different sizes. If the image dimensions are not a multiple of the MCU size,
+you must also pad the data correctly (usually, this is done by replicating
+the last column and/or row). The data must be padded to a multiple of a DCT
+block in each component: that is, each downsampled row must contain a
+multiple of 8 valid samples, and there must be a multiple of 8 sample rows
+for each component. (For applications such as conversion of digital TV
+images, the standard image size is usually a multiple of the DCT block size,
+so that no padding need actually be done.)
+
+The procedure for compression of raw data is basically the same as normal
+compression, except that you call jpeg_write_raw_data() in place of
+jpeg_write_scanlines(). Before calling jpeg_start_compress(), you must do
+the following:
+ * Set cinfo->raw_data_in to TRUE. (It is set FALSE by jpeg_set_defaults().)
+ This notifies the library that you will be supplying raw data.
+ Furthermore, set cinfo->do_fancy_downsampling to FALSE if you want to use
+ real downsampled data. (It is set TRUE by jpeg_set_defaults().)
+ * Ensure jpeg_color_space is correct --- an explicit jpeg_set_colorspace()
+ call is a good idea. Note that since color conversion is bypassed,
+ in_color_space is ignored, except that jpeg_set_defaults() uses it to
+ choose the default jpeg_color_space setting.
+ * Ensure the sampling factors, cinfo->comp_info[i].h_samp_factor and
+ cinfo->comp_info[i].v_samp_factor, are correct. Since these indicate the
+ dimensions of the data you are supplying, it's wise to set them
+ explicitly, rather than assuming the library's defaults are what you want.
+
+To pass raw data to the library, call jpeg_write_raw_data() in place of
+jpeg_write_scanlines(). The two routines work similarly except that
+jpeg_write_raw_data takes a JSAMPIMAGE data array rather than JSAMPARRAY.
+The scanlines count passed to and returned from jpeg_write_raw_data is
+measured in terms of the component with the largest v_samp_factor.
+
+jpeg_write_raw_data() processes one MCU row per call, which is to say
+v_samp_factor*DCTSIZE sample rows of each component. The passed num_lines
+value must be at least max_v_samp_factor*DCTSIZE, and the return value will
+be exactly that amount (or possibly some multiple of that amount, in future
+library versions). This is true even on the last call at the bottom of the
+image; don't forget to pad your data as necessary.
+
+The required dimensions of the supplied data can be computed for each
+component as
+ cinfo->comp_info[i].width_in_blocks*DCTSIZE samples per row
+ cinfo->comp_info[i].height_in_blocks*DCTSIZE rows in image
+after jpeg_start_compress() has initialized those fields. If the valid data
+is smaller than this, it must be padded appropriately. For some sampling
+factors and image sizes, additional dummy DCT blocks are inserted to make
+the image a multiple of the MCU dimensions. The library creates such dummy
+blocks itself; it does not read them from your supplied data. Therefore you
+need never pad by more than DCTSIZE samples. An example may help here.
+Assume 2h2v downsampling of YCbCr data, that is
+ cinfo->comp_info[0].h_samp_factor = 2 for Y
+ cinfo->comp_info[0].v_samp_factor = 2
+ cinfo->comp_info[1].h_samp_factor = 1 for Cb
+ cinfo->comp_info[1].v_samp_factor = 1
+ cinfo->comp_info[2].h_samp_factor = 1 for Cr
+ cinfo->comp_info[2].v_samp_factor = 1
+and suppose that the nominal image dimensions (cinfo->image_width and
+cinfo->image_height) are 101x101 pixels. Then jpeg_start_compress() will
+compute downsampled_width = 101 and width_in_blocks = 13 for Y,
+downsampled_width = 51 and width_in_blocks = 7 for Cb and Cr (and the same
+for the height fields). You must pad the Y data to at least 13*8 = 104
+columns and rows, the Cb/Cr data to at least 7*8 = 56 columns and rows. The
+MCU height is max_v_samp_factor = 2 DCT rows so you must pass at least 16
+scanlines on each call to jpeg_write_raw_data(), which is to say 16 actual
+sample rows of Y and 8 each of Cb and Cr. A total of 7 MCU rows are needed,
+so you must pass a total of 7*16 = 112 "scanlines". The last DCT block row
+of Y data is dummy, so it doesn't matter what you pass for it in the data
+arrays, but the scanlines count must total up to 112 so that all of the Cb
+and Cr data gets passed.
+
+Output suspension is supported with raw-data compression: if the data
+destination module suspends, jpeg_write_raw_data() will return 0.
+In this case the same data rows must be passed again on the next call.
+
+
+Decompression with raw data output implies bypassing all postprocessing.
+You must deal with the color space and sampling factors present in the
+incoming file. If your application only handles, say, 2h1v YCbCr data,
+you must check for and fail on other color spaces or other sampling factors.
+The library will not convert to a different color space for you.
+
+To obtain raw data output, set cinfo->raw_data_out = TRUE before
+jpeg_start_decompress() (it is set FALSE by jpeg_read_header()). Be sure to
+verify that the color space and sampling factors are ones you can handle.
+Furthermore, set cinfo->do_fancy_upsampling = FALSE if you want to get real
+downsampled data (it is set TRUE by jpeg_read_header()).
+Then call jpeg_read_raw_data() in place of jpeg_read_scanlines(). The
+decompression process is otherwise the same as usual.
+
+jpeg_read_raw_data() returns one MCU row per call, and thus you must pass a
+buffer of at least max_v_samp_factor*DCTSIZE scanlines (scanline counting is
+the same as for raw-data compression). The buffer you pass must be large
+enough to hold the actual data plus padding to DCT-block boundaries. As with
+compression, any entirely dummy DCT blocks are not processed so you need not
+allocate space for them, but the total scanline count includes them. The
+above example of computing buffer dimensions for raw-data compression is
+equally valid for decompression.
+
+Input suspension is supported with raw-data decompression: if the data source
+module suspends, jpeg_read_raw_data() will return 0. You can also use
+buffered-image mode to read raw data in multiple passes.
+
+
+Really raw data: DCT coefficients
+---------------------------------
+
+It is possible to read or write the contents of a JPEG file as raw DCT
+coefficients. This facility is mainly intended for use in lossless
+transcoding between different JPEG file formats. Other possible applications
+include lossless cropping of a JPEG image, lossless reassembly of a
+multi-strip or multi-tile TIFF/JPEG file into a single JPEG datastream, etc.
+
+To read the contents of a JPEG file as DCT coefficients, open the file and do
+jpeg_read_header() as usual. But instead of calling jpeg_start_decompress()
+and jpeg_read_scanlines(), call jpeg_read_coefficients(). This will read the
+entire image into a set of virtual coefficient-block arrays, one array per
+component. The return value is a pointer to an array of virtual-array
+descriptors. Each virtual array can be accessed directly using the JPEG
+memory manager's access_virt_barray method (see Memory management, below,
+and also read structure.txt's discussion of virtual array handling). Or,
+for simple transcoding to a different JPEG file format, the array list can
+just be handed directly to jpeg_write_coefficients().
+
+Each block in the block arrays contains quantized coefficient values in
+normal array order (not JPEG zigzag order). The block arrays contain only
+DCT blocks containing real data; any entirely-dummy blocks added to fill out
+interleaved MCUs at the right or bottom edges of the image are discarded
+during reading and are not stored in the block arrays. (The size of each
+block array can be determined from the width_in_blocks and height_in_blocks
+fields of the component's comp_info entry.) This is also the data format
+expected by jpeg_write_coefficients().
+
+When you are done using the virtual arrays, call jpeg_finish_decompress()
+to release the array storage and return the decompression object to an idle
+state; or just call jpeg_destroy() if you don't need to reuse the object.
+
+If you use a suspending data source, jpeg_read_coefficients() will return
+NULL if it is forced to suspend; a non-NULL return value indicates successful
+completion. You need not test for a NULL return value when using a
+non-suspending data source.
+
+It is also possible to call jpeg_read_coefficients() to obtain access to the
+decoder's coefficient arrays during a normal decode cycle in buffered-image
+mode. This frammish might be useful for progressively displaying an incoming
+image and then re-encoding it without loss. To do this, decode in buffered-
+image mode as discussed previously, then call jpeg_read_coefficients() after
+the last jpeg_finish_output() call. The arrays will be available for your use
+until you call jpeg_finish_decompress().
+
+
+To write the contents of a JPEG file as DCT coefficients, you must provide
+the DCT coefficients stored in virtual block arrays. You can either pass
+block arrays read from an input JPEG file by jpeg_read_coefficients(), or
+allocate virtual arrays from the JPEG compression object and fill them
+yourself. In either case, jpeg_write_coefficients() is substituted for
+jpeg_start_compress() and jpeg_write_scanlines(). Thus the sequence is
+ * Create compression object
+ * Set all compression parameters as necessary
+ * Request virtual arrays if needed
+ * jpeg_write_coefficients()
+ * jpeg_finish_compress()
+ * Destroy or re-use compression object
+jpeg_write_coefficients() is passed a pointer to an array of virtual block
+array descriptors; the number of arrays is equal to cinfo.num_components.
+
+The virtual arrays need only have been requested, not realized, before
+jpeg_write_coefficients() is called. A side-effect of
+jpeg_write_coefficients() is to realize any virtual arrays that have been
+requested from the compression object's memory manager. Thus, when obtaining
+the virtual arrays from the compression object, you should fill the arrays
+after calling jpeg_write_coefficients(). The data is actually written out
+when you call jpeg_finish_compress(); jpeg_write_coefficients() only writes
+the file header.
+
+When writing raw DCT coefficients, it is crucial that the JPEG quantization
+tables and sampling factors match the way the data was encoded, or the
+resulting file will be invalid. For transcoding from an existing JPEG file,
+we recommend using jpeg_copy_critical_parameters(). This routine initializes
+all the compression parameters to default values (like jpeg_set_defaults()),
+then copies the critical information from a source decompression object.
+The decompression object should have just been used to read the entire
+JPEG input file --- that is, it should be awaiting jpeg_finish_decompress().
+
+jpeg_write_coefficients() marks all tables stored in the compression object
+as needing to be written to the output file (thus, it acts like
+jpeg_start_compress(cinfo, TRUE)). This is for safety's sake, to avoid
+emitting abbreviated JPEG files by accident. If you really want to emit an
+abbreviated JPEG file, call jpeg_suppress_tables(), or set the tables'
+individual sent_table flags, between calling jpeg_write_coefficients() and
+jpeg_finish_compress().
+
+
+Progress monitoring
+-------------------
+
+Some applications may need to regain control from the JPEG library every so
+often. The typical use of this feature is to produce a percent-done bar or
+other progress display. (For a simple example, see cjpeg.c or djpeg.c.)
+Although you do get control back frequently during the data-transferring pass
+(the jpeg_read_scanlines or jpeg_write_scanlines loop), any additional passes
+will occur inside jpeg_finish_compress or jpeg_start_decompress; those
+routines may take a long time to execute, and you don't get control back
+until they are done.
+
+You can define a progress-monitor routine which will be called periodically
+by the library. No guarantees are made about how often this call will occur,
+so we don't recommend you use it for mouse tracking or anything like that.
+At present, a call will occur once per MCU row, scanline, or sample row
+group, whichever unit is convenient for the current processing mode; so the
+wider the image, the longer the time between calls. During the data
+transferring pass, only one call occurs per call of jpeg_read_scanlines or
+jpeg_write_scanlines, so don't pass a large number of scanlines at once if
+you want fine resolution in the progress count. (If you really need to use
+the callback mechanism for time-critical tasks like mouse tracking, you could
+insert additional calls inside some of the library's inner loops.)
+
+To establish a progress-monitor callback, create a struct jpeg_progress_mgr,
+fill in its progress_monitor field with a pointer to your callback routine,
+and set cinfo->progress to point to the struct. The callback will be called
+whenever cinfo->progress is non-NULL. (This pointer is set to NULL by
+jpeg_create_compress or jpeg_create_decompress; the library will not change
+it thereafter. So if you allocate dynamic storage for the progress struct,
+make sure it will live as long as the JPEG object does. Allocating from the
+JPEG memory manager with lifetime JPOOL_PERMANENT will work nicely.) You
+can use the same callback routine for both compression and decompression.
+
+The jpeg_progress_mgr struct contains four fields which are set by the library:
+ long pass_counter; /* work units completed in this pass */
+ long pass_limit; /* total number of work units in this pass */
+ int completed_passes; /* passes completed so far */
+ int total_passes; /* total number of passes expected */
+During any one pass, pass_counter increases from 0 up to (not including)
+pass_limit; the step size is usually but not necessarily 1. The pass_limit
+value may change from one pass to another. The expected total number of
+passes is in total_passes, and the number of passes already completed is in
+completed_passes. Thus the fraction of work completed may be estimated as
+ completed_passes + (pass_counter/pass_limit)
+ --------------------------------------------
+ total_passes
+ignoring the fact that the passes may not be equal amounts of work.
+
+When decompressing, pass_limit can even change within a pass, because it
+depends on the number of scans in the JPEG file, which isn't always known in
+advance. The computed fraction-of-work-done may jump suddenly (if the library
+discovers it has overestimated the number of scans) or even decrease (in the
+opposite case). It is not wise to put great faith in the work estimate.
+
+When using the decompressor's buffered-image mode, the progress monitor work
+estimate is likely to be completely unhelpful, because the library has no way
+to know how many output passes will be demanded of it. Currently, the library
+sets total_passes based on the assumption that there will be one more output
+pass if the input file end hasn't yet been read (jpeg_input_complete() isn't
+TRUE), but no more output passes if the file end has been reached when the
+output pass is started. This means that total_passes will rise as additional
+output passes are requested. If you have a way of determining the input file
+size, estimating progress based on the fraction of the file that's been read
+will probably be more useful than using the library's value.
+
+
+Memory management
+-----------------
+
+This section covers some key facts about the JPEG library's built-in memory
+manager. For more info, please read structure.txt's section about the memory
+manager, and consult the source code if necessary.
+
+All memory and temporary file allocation within the library is done via the
+memory manager. If necessary, you can replace the "back end" of the memory
+manager to control allocation yourself (for example, if you don't want the
+library to use malloc() and free() for some reason).
+
+Some data is allocated "permanently" and will not be freed until the JPEG
+object is destroyed. Most data is allocated "per image" and is freed by
+jpeg_finish_compress, jpeg_finish_decompress, or jpeg_abort. You can call the
+memory manager yourself to allocate structures that will automatically be
+freed at these times. Typical code for this is
+ ptr = (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, size);
+Use JPOOL_PERMANENT to get storage that lasts as long as the JPEG object.
+Use alloc_large instead of alloc_small for anything bigger than a few Kbytes.
+There are also alloc_sarray and alloc_barray routines that automatically
+build 2-D sample or block arrays.
+
+The library's minimum space requirements to process an image depend on the
+image's width, but not on its height, because the library ordinarily works
+with "strip" buffers that are as wide as the image but just a few rows high.
+Some operating modes (eg, two-pass color quantization) require full-image
+buffers. Such buffers are treated as "virtual arrays": only the current strip
+need be in memory, and the rest can be swapped out to a temporary file.
+
+If you use the simplest memory manager back end (jmemnobs.c), then no
+temporary files are used; virtual arrays are simply malloc()'d. Images bigger
+than memory can be processed only if your system supports virtual memory.
+The other memory manager back ends support temporary files of various flavors
+and thus work in machines without virtual memory. They may also be useful on
+Unix machines if you need to process images that exceed available swap space.
+
+When using temporary files, the library will make the in-memory buffers for
+its virtual arrays just big enough to stay within a "maximum memory" setting.
+Your application can set this limit by setting cinfo->mem->max_memory_to_use
+after creating the JPEG object. (Of course, there is still a minimum size for
+the buffers, so the max-memory setting is effective only if it is bigger than
+the minimum space needed.) If you allocate any large structures yourself, you
+must allocate them before jpeg_start_compress() or jpeg_start_decompress() in
+order to have them counted against the max memory limit. Also keep in mind
+that space allocated with alloc_small() is ignored, on the assumption that
+it's too small to be worth worrying about; so a reasonable safety margin
+should be left when setting max_memory_to_use.
+
+If you use the jmemname.c or jmemdos.c memory manager back end, it is
+important to clean up the JPEG object properly to ensure that the temporary
+files get deleted. (This is especially crucial with jmemdos.c, where the
+"temporary files" may be extended-memory segments; if they are not freed,
+DOS will require a reboot to recover the memory.) Thus, with these memory
+managers, it's a good idea to provide a signal handler that will trap any
+early exit from your program. The handler should call either jpeg_abort()
+or jpeg_destroy() for any active JPEG objects. A handler is not needed with
+jmemnobs.c, and shouldn't be necessary with jmemansi.c or jmemmac.c either,
+since the C library is supposed to take care of deleting files made with
+tmpfile().
+
+
+Memory usage
+------------
+
+Working memory requirements while performing compression or decompression
+depend on image dimensions, image characteristics (such as colorspace and
+JPEG process), and operating mode (application-selected options).
+
+As of v6b, the decompressor requires:
+ 1. About 24K in more-or-less-fixed-size data. This varies a bit depending
+ on operating mode and image characteristics (particularly color vs.
+ grayscale), but it doesn't depend on image dimensions.
+ 2. Strip buffers (of size proportional to the image width) for IDCT and
+ upsampling results. The worst case for commonly used sampling factors
+ is about 34 bytes * width in pixels for a color image. A grayscale image
+ only needs about 8 bytes per pixel column.
+ 3. A full-image DCT coefficient buffer is needed to decode a multi-scan JPEG
+ file (including progressive JPEGs), or whenever you select buffered-image
+ mode. This takes 2 bytes/coefficient. At typical 2x2 sampling, that's
+ 3 bytes per pixel for a color image. Worst case (1x1 sampling) requires
+ 6 bytes/pixel. For grayscale, figure 2 bytes/pixel.
+ 4. To perform 2-pass color quantization, the decompressor also needs a
+ 128K color lookup table and a full-image pixel buffer (3 bytes/pixel).
+This does not count any memory allocated by the application, such as a
+buffer to hold the final output image.
+
+The above figures are valid for 8-bit JPEG data precision and a machine with
+32-bit ints. For 12-bit JPEG data, double the size of the strip buffers and
+quantization pixel buffer. The "fixed-size" data will be somewhat smaller
+with 16-bit ints, larger with 64-bit ints. Also, CMYK or other unusual
+color spaces will require different amounts of space.
+
+The full-image coefficient and pixel buffers, if needed at all, do not
+have to be fully RAM resident; you can have the library use temporary
+files instead when the total memory usage would exceed a limit you set.
+(But if your OS supports virtual memory, it's probably better to just use
+jmemnobs and let the OS do the swapping.)
+
+The compressor's memory requirements are similar, except that it has no need
+for color quantization. Also, it needs a full-image DCT coefficient buffer
+if Huffman-table optimization is asked for, even if progressive mode is not
+requested.
+
+If you need more detailed information about memory usage in a particular
+situation, you can enable the MEM_STATS code in jmemmgr.c.
+
+
+Library compile-time options
+----------------------------
+
+A number of compile-time options are available by modifying jmorecfg.h.
+
+The JPEG standard provides for both the baseline 8-bit DCT process and
+a 12-bit DCT process. The IJG code supports 12-bit lossy JPEG if you define
+BITS_IN_JSAMPLE as 12 rather than 8. Note that this causes JSAMPLE to be
+larger than a char, so it affects the surrounding application's image data.
+The sample applications cjpeg and djpeg can support 12-bit mode only for PPM
+and GIF file formats; you must disable the other file formats to compile a
+12-bit cjpeg or djpeg. (install.txt has more information about that.)
+At present, a 12-bit library can handle *only* 12-bit images, not both
+precisions. (If you need to include both 8- and 12-bit libraries in a single
+application, you could probably do it by defining NEED_SHORT_EXTERNAL_NAMES
+for just one of the copies. You'd have to access the 8-bit and 12-bit copies
+from separate application source files. This is untested ... if you try it,
+we'd like to hear whether it works!)
+
+Note that a 12-bit library always compresses in Huffman optimization mode,
+in order to generate valid Huffman tables. This is necessary because our
+default Huffman tables only cover 8-bit data. If you need to output 12-bit
+files in one pass, you'll have to supply suitable default Huffman tables.
+You may also want to supply your own DCT quantization tables; the existing
+quality-scaling code has been developed for 8-bit use, and probably doesn't
+generate especially good tables for 12-bit.
+
+The maximum number of components (color channels) in the image is determined
+by MAX_COMPONENTS. The JPEG standard allows up to 255 components, but we
+expect that few applications will need more than four or so.
+
+On machines with unusual data type sizes, you may be able to improve
+performance or reduce memory space by tweaking the various typedefs in
+jmorecfg.h. In particular, on some RISC CPUs, access to arrays of "short"s
+is quite slow; consider trading memory for speed by making JCOEF, INT16, and
+UINT16 be "int" or "unsigned int". UINT8 is also a candidate to become int.
+You probably don't want to make JSAMPLE be int unless you have lots of memory
+to burn.
+
+You can reduce the size of the library by compiling out various optional
+functions. To do this, undefine xxx_SUPPORTED symbols as necessary.
+
+You can also save a few K by not having text error messages in the library;
+the standard error message table occupies about 5Kb. This is particularly
+reasonable for embedded applications where there's no good way to display
+a message anyway. To do this, remove the creation of the message table
+(jpeg_std_message_table[]) from jerror.c, and alter format_message to do
+something reasonable without it. You could output the numeric value of the
+message code number, for example. If you do this, you can also save a couple
+more K by modifying the TRACEMSn() macros in jerror.h to expand to nothing;
+you don't need trace capability anyway, right?
+
+
+Portability considerations
+--------------------------
+
+The JPEG library has been written to be extremely portable; the sample
+applications cjpeg and djpeg are slightly less so. This section summarizes
+the design goals in this area. (If you encounter any bugs that cause the
+library to be less portable than is claimed here, we'd appreciate hearing
+about them.)
+
+The code works fine on ANSI C, C++, and pre-ANSI C compilers, using any of
+the popular system include file setups, and some not-so-popular ones too.
+See install.txt for configuration procedures.
+
+The code is not dependent on the exact sizes of the C data types. As
+distributed, we make the assumptions that
+ char is at least 8 bits wide
+ short is at least 16 bits wide
+ int is at least 16 bits wide
+ long is at least 32 bits wide
+(These are the minimum requirements of the ANSI C standard.) Wider types will
+work fine, although memory may be used inefficiently if char is much larger
+than 8 bits or short is much bigger than 16 bits. The code should work
+equally well with 16- or 32-bit ints.
+
+In a system where these assumptions are not met, you may be able to make the
+code work by modifying the typedefs in jmorecfg.h. However, you will probably
+have difficulty if int is less than 16 bits wide, since references to plain
+int abound in the code.
+
+char can be either signed or unsigned, although the code runs faster if an
+unsigned char type is available. If char is wider than 8 bits, you will need
+to redefine JOCTET and/or provide custom data source/destination managers so
+that JOCTET represents exactly 8 bits of data on external storage.
+
+The JPEG library proper does not assume ASCII representation of characters.
+But some of the image file I/O modules in cjpeg/djpeg do have ASCII
+dependencies in file-header manipulation; so does cjpeg's select_file_type()
+routine.
+
+The JPEG library does not rely heavily on the C library. In particular, C
+stdio is used only by the data source/destination modules and the error
+handler, all of which are application-replaceable. (cjpeg/djpeg are more
+heavily dependent on stdio.) malloc and free are called only from the memory
+manager "back end" module, so you can use a different memory allocator by
+replacing that one file.
+
+The code generally assumes that C names must be unique in the first 15
+characters. However, global function names can be made unique in the
+first 6 characters by defining NEED_SHORT_EXTERNAL_NAMES.
+
+More info about porting the code may be gleaned by reading jconfig.txt,
+jmorecfg.h, and jinclude.h.
+
+
+Notes for MS-DOS implementors
+-----------------------------
+
+The IJG code is designed to work efficiently in 80x86 "small" or "medium"
+memory models (i.e., data pointers are 16 bits unless explicitly declared
+"far"; code pointers can be either size). You may be able to use small
+model to compile cjpeg or djpeg by itself, but you will probably have to use
+medium model for any larger application. This won't make much difference in
+performance. You *will* take a noticeable performance hit if you use a
+large-data memory model (perhaps 10%-25%), and you should avoid "huge" model
+if at all possible.
+
+The JPEG library typically needs 2Kb-3Kb of stack space. It will also
+malloc about 20K-30K of near heap space while executing (and lots of far
+heap, but that doesn't count in this calculation). This figure will vary
+depending on selected operating mode, and to a lesser extent on image size.
+There is also about 5Kb-6Kb of constant data which will be allocated in the
+near data segment (about 4Kb of this is the error message table).
+Thus you have perhaps 20K available for other modules' static data and near
+heap space before you need to go to a larger memory model. The C library's
+static data will account for several K of this, but that still leaves a good
+deal for your needs. (If you are tight on space, you could reduce the sizes
+of the I/O buffers allocated by jdatasrc.c and jdatadst.c, say from 4K to
+1K. Another possibility is to move the error message table to far memory;
+this should be doable with only localized hacking on jerror.c.)
+
+About 2K of the near heap space is "permanent" memory that will not be
+released until you destroy the JPEG object. This is only an issue if you
+save a JPEG object between compression or decompression operations.
+
+Far data space may also be a tight resource when you are dealing with large
+images. The most memory-intensive case is decompression with two-pass color
+quantization, or single-pass quantization to an externally supplied color
+map. This requires a 128Kb color lookup table plus strip buffers amounting
+to about 40 bytes per column for typical sampling ratios (eg, about 25600
+bytes for a 640-pixel-wide image). You may not be able to process wide
+images if you have large data structures of your own.
+
+Of course, all of these concerns vanish if you use a 32-bit flat-memory-model
+compiler, such as DJGPP or Watcom C. We highly recommend flat model if you
+can use it; the JPEG library is significantly faster in flat model.
diff --git a/src/3rdparty/libjpeg/makcjpeg.st b/src/3rdparty/libjpeg/makcjpeg.st
new file mode 100644
index 0000000000..628f533500
--- /dev/null
+++ b/src/3rdparty/libjpeg/makcjpeg.st
@@ -0,0 +1,36 @@
+; Project file for Independent JPEG Group's software
+;
+; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C.
+; Thanks to Frank Moehle, B. Setzepfandt, and Guido Vollbeding.
+;
+; To use this file, rename it to cjpeg.prj.
+; If you are using Turbo C, change filenames beginning with "pc..." to "tc..."
+; Read installation instructions before trying to make the program!
+;
+;
+; * * * Output file * * *
+cjpeg.ttp
+;
+; * * * COMPILER OPTIONS * * *
+.C[-P] ; absolute calls
+.C[-M] ; and no string merging, folks
+.C[-w-cln] ; no "constant is long" warnings
+.C[-w-par] ; no "parameter xxxx unused"
+.C[-w-rch] ; no "unreachable code"
+.C[-wsig] ; warn if significant digits may be lost
+=
+; * * * * List of modules * * * *
+pcstart.o
+cjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h)
+cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
+rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
+rdppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
+rdgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
+rdtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
+rdbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
+rdrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
+libjpeg.lib ; built by libjpeg.prj
+pcfltlib.lib ; floating point library
+; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED
+pcstdlib.lib ; standard library
+pcextlib.lib ; extended library
diff --git a/src/3rdparty/libjpeg/makdjpeg.st b/src/3rdparty/libjpeg/makdjpeg.st
new file mode 100644
index 0000000000..4b61404a6c
--- /dev/null
+++ b/src/3rdparty/libjpeg/makdjpeg.st
@@ -0,0 +1,36 @@
+; Project file for Independent JPEG Group's software
+;
+; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C.
+; Thanks to Frank Moehle, B. Setzepfandt, and Guido Vollbeding.
+;
+; To use this file, rename it to djpeg.prj.
+; If you are using Turbo C, change filenames beginning with "pc..." to "tc..."
+; Read installation instructions before trying to make the program!
+;
+;
+; * * * Output file * * *
+djpeg.ttp
+;
+; * * * COMPILER OPTIONS * * *
+.C[-P] ; absolute calls
+.C[-M] ; and no string merging, folks
+.C[-w-cln] ; no "constant is long" warnings
+.C[-w-par] ; no "parameter xxxx unused"
+.C[-w-rch] ; no "unreachable code"
+.C[-wsig] ; warn if significant digits may be lost
+=
+; * * * * List of modules * * * *
+pcstart.o
+djpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h)
+cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
+rdcolmap.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
+wrppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
+wrgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
+wrtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
+wrbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
+wrrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
+libjpeg.lib ; built by libjpeg.prj
+pcfltlib.lib ; floating point library
+; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED
+pcstdlib.lib ; standard library
+pcextlib.lib ; extended library
diff --git a/src/3rdparty/libjpeg/makeadsw.vc6 b/src/3rdparty/libjpeg/makeadsw.vc6
new file mode 100644
index 0000000000..80459c5320
--- /dev/null
+++ b/src/3rdparty/libjpeg/makeadsw.vc6
@@ -0,0 +1,77 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GEL™SCHT WERDEN!
+
+###############################################################################
+
+Project: "cjpeg"=".\cjpeg.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "djpeg"=".\djpeg.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "jpegtran"=".\jpegtran.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "rdjpgcom"=".\rdjpgcom.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "wrjpgcom"=".\wrjpgcom.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/src/3rdparty/libjpeg/makeasln.vc9 b/src/3rdparty/libjpeg/makeasln.vc9
new file mode 100644
index 0000000000..c88ba8d9fe
--- /dev/null
+++ b/src/3rdparty/libjpeg/makeasln.vc9
@@ -0,0 +1,33 @@
+‹¯¨
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual C++ Express 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cjpeg", "cjpeg.vcproj", "{B4F61778-C45D-45C6-9E87-06F03F50519F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "djpeg", "djpeg.vcproj", "{9B7E57AE-31CD-405E-8070-26A8303B9DC9}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpegtran", "jpegtran.vcproj", "{813C33AF-9031-49D2-BA19-93D600CDD404}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rdjpgcom", "rdjpgcom.vcproj", "{EB107F86-A8CC-4507-8115-88D31DDE4CDF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wrjpgcom", "wrjpgcom.vcproj", "{178670D7-FA7F-44A8-96C7-11B1CA14269C}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B4F61778-C45D-45C6-9E87-06F03F50519F}.Release|Win32.ActiveCfg = Release|Win32
+ {B4F61778-C45D-45C6-9E87-06F03F50519F}.Release|Win32.Build.0 = Release|Win32
+ {9B7E57AE-31CD-405E-8070-26A8303B9DC9}.Release|Win32.ActiveCfg = Release|Win32
+ {9B7E57AE-31CD-405E-8070-26A8303B9DC9}.Release|Win32.Build.0 = Release|Win32
+ {813C33AF-9031-49D2-BA19-93D600CDD404}.Release|Win32.ActiveCfg = Release|Win32
+ {813C33AF-9031-49D2-BA19-93D600CDD404}.Release|Win32.Build.0 = Release|Win32
+ {EB107F86-A8CC-4507-8115-88D31DDE4CDF}.Release|Win32.ActiveCfg = Release|Win32
+ {EB107F86-A8CC-4507-8115-88D31DDE4CDF}.Release|Win32.Build.0 = Release|Win32
+ {178670D7-FA7F-44A8-96C7-11B1CA14269C}.Release|Win32.ActiveCfg = Release|Win32
+ {178670D7-FA7F-44A8-96C7-11B1CA14269C}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/src/3rdparty/libjpeg/makecdep.vc6 b/src/3rdparty/libjpeg/makecdep.vc6
new file mode 100644
index 0000000000..11dff7779a
--- /dev/null
+++ b/src/3rdparty/libjpeg/makecdep.vc6
@@ -0,0 +1,82 @@
+# Microsoft Developer Studio erstellte Abh„ngigkeitsdatei, einbezogen von cjpeg.mak
+
+.\cdjpeg.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+
+
+.\cjpeg.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+ ".\jversion.h"\
+
+
+.\rdbmp.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+
+
+.\rdgif.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+
+
+.\rdppm.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+
+
+.\rdrle.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+
+
+.\rdswitch.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+
+
+.\rdtarga.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+
diff --git a/src/3rdparty/libjpeg/makecdsp.vc6 b/src/3rdparty/libjpeg/makecdsp.vc6
new file mode 100644
index 0000000000..3ab5965115
--- /dev/null
+++ b/src/3rdparty/libjpeg/makecdsp.vc6
@@ -0,0 +1,130 @@
+# Microsoft Developer Studio Project File - Name="cjpeg" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** NICHT BEARBEITEN **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=cjpeg - Win32
+!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl
+!MESSAGE
+!MESSAGE NMAKE /f "cjpeg.mak".
+!MESSAGE
+!MESSAGE Sie k÷nnen beim Ausfhren von NMAKE eine Konfiguration angeben
+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
+!MESSAGE
+!MESSAGE NMAKE /f "cjpeg.mak" CFG="cjpeg - Win32"
+!MESSAGE
+!MESSAGE Fr die Konfiguration stehen zur Auswahl:
+!MESSAGE
+!MESSAGE "cjpeg - Win32" (basierend auf "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\cjpeg\Release"
+# PROP BASE Intermediate_Dir ".\cjpeg\Release"
+# PROP BASE Target_Dir ".\cjpeg"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\cjpeg\Release"
+# PROP Intermediate_Dir ".\cjpeg\Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ".\cjpeg"
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# Begin Target
+
+# Name "cjpeg - Win32"
+# Begin Group "Quellcodedateien"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
+# Begin Source File
+
+SOURCE=.\cdjpeg.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\cjpeg.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\rdbmp.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\rdgif.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\rdppm.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\rdrle.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\rdswitch.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\rdtarga.c
+# End Source File
+# End Group
+# Begin Group "Header-Dateien"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
+# Begin Source File
+
+SOURCE=.\cderror.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\cdjpeg.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jconfig.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jerror.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jinclude.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jmorecfg.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jpeglib.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jversion.h
+# End Source File
+# End Group
+# Begin Group "Ressourcendateien"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/src/3rdparty/libjpeg/makecmak.vc6 b/src/3rdparty/libjpeg/makecmak.vc6
new file mode 100644
index 0000000000..bee03bf90d
--- /dev/null
+++ b/src/3rdparty/libjpeg/makecmak.vc6
@@ -0,0 +1,159 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on cjpeg.dsp
+!IF "$(CFG)" == ""
+CFG=cjpeg - Win32
+!MESSAGE Keine Konfiguration angegeben. cjpeg - Win32 wird als Standard verwendet.
+!ENDIF
+
+!IF "$(CFG)" != "cjpeg - Win32"
+!MESSAGE Ungültige Konfiguration "$(CFG)" angegeben.
+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
+!MESSAGE
+!MESSAGE NMAKE /f "cjpeg.mak" CFG="cjpeg - Win32"
+!MESSAGE
+!MESSAGE Für die Konfiguration stehen zur Auswahl:
+!MESSAGE
+!MESSAGE "cjpeg - Win32" (basierend auf "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR Eine ungültige Konfiguration wurde angegeben.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+CPP=cl.exe
+RSC=rc.exe
+OUTDIR=.\cjpeg\Release
+INTDIR=.\cjpeg\Release
+# Begin Custom Macros
+OutDir=.\cjpeg\Release
+# End Custom Macros
+
+ALL : "$(OUTDIR)\cjpeg.exe"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\cdjpeg.obj"
+ -@erase "$(INTDIR)\cjpeg.obj"
+ -@erase "$(INTDIR)\rdbmp.obj"
+ -@erase "$(INTDIR)\rdgif.obj"
+ -@erase "$(INTDIR)\rdppm.obj"
+ -@erase "$(INTDIR)\rdrle.obj"
+ -@erase "$(INTDIR)\rdswitch.obj"
+ -@erase "$(INTDIR)\rdtarga.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(OUTDIR)\cjpeg.exe"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\cjpeg.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\cjpeg.pdb" /machine:I386 /out:"$(OUTDIR)\cjpeg.exe"
+LINK32_OBJS= \
+ "$(INTDIR)\cdjpeg.obj" \
+ "$(INTDIR)\cjpeg.obj" \
+ "$(INTDIR)\rdbmp.obj" \
+ "$(INTDIR)\rdgif.obj" \
+ "$(INTDIR)\rdppm.obj" \
+ "$(INTDIR)\rdrle.obj" \
+ "$(INTDIR)\rdswitch.obj" \
+ "$(INTDIR)\rdtarga.obj"
+
+"$(OUTDIR)\cjpeg.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+CPP_PROJ=/nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /Fp"$(INTDIR)\cjpeg.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("cjpeg.dep")
+!INCLUDE "cjpeg.dep"
+!ELSE
+!MESSAGE Warning: cannot find "cjpeg.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "cjpeg - Win32"
+SOURCE=.\cdjpeg.c
+
+"$(INTDIR)\cdjpeg.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\cjpeg.c
+
+"$(INTDIR)\cjpeg.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\rdbmp.c
+
+"$(INTDIR)\rdbmp.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\rdgif.c
+
+"$(INTDIR)\rdgif.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\rdppm.c
+
+"$(INTDIR)\rdppm.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\rdrle.c
+
+"$(INTDIR)\rdrle.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\rdswitch.c
+
+"$(INTDIR)\rdswitch.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\rdtarga.c
+
+"$(INTDIR)\rdtarga.obj" : $(SOURCE) "$(INTDIR)"
+
+
+
+!ENDIF
+
diff --git a/src/3rdparty/libjpeg/makecvcp.vc9 b/src/3rdparty/libjpeg/makecvcp.vc9
new file mode 100644
index 0000000000..b38e6a1abc
--- /dev/null
+++ b/src/3rdparty/libjpeg/makecvcp.vc9
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="cjpeg"
+ ProjectGUID="{B4F61778-C45D-45C6-9E87-06F03F50519F}"
+ RootNamespace="cjpeg"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ProjectName)\$(ConfigurationName)"
+ IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="0"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ EnableIntrinsicFunctions="false"
+ EnableFiberSafeOptimizations="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Release\jpeg.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Quelldateien"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\cdjpeg.c"
+ >
+ </File>
+ <File
+ RelativePath=".\cjpeg.c"
+ >
+ </File>
+ <File
+ RelativePath=".\rdbmp.c"
+ >
+ </File>
+ <File
+ RelativePath=".\rdgif.c"
+ >
+ </File>
+ <File
+ RelativePath=".\rdppm.c"
+ >
+ </File>
+ <File
+ RelativePath=".\rdrle.c"
+ >
+ </File>
+ <File
+ RelativePath=".\rdswitch.c"
+ >
+ </File>
+ <File
+ RelativePath=".\rdtarga.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headerdateien"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\cderror.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cdjpeg.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jconfig.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jerror.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jinclude.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jmorecfg.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jpeglib.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jversion.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Ressourcendateien"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/3rdparty/libjpeg/makeddep.vc6 b/src/3rdparty/libjpeg/makeddep.vc6
new file mode 100644
index 0000000000..f911eba7d5
--- /dev/null
+++ b/src/3rdparty/libjpeg/makeddep.vc6
@@ -0,0 +1,82 @@
+# Microsoft Developer Studio erstellte Abh„ngigkeitsdatei, einbezogen von djpeg.mak
+
+.\cdjpeg.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+
+
+.\djpeg.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+ ".\jversion.h"\
+
+
+.\rdcolmap.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+
+
+.\wrbmp.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+
+
+.\wrgif.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+
+
+.\wrppm.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+
+
+.\wrrle.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+
+
+.\wrtarga.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+
diff --git a/src/3rdparty/libjpeg/makeddsp.vc6 b/src/3rdparty/libjpeg/makeddsp.vc6
new file mode 100644
index 0000000000..f583a0f6ab
--- /dev/null
+++ b/src/3rdparty/libjpeg/makeddsp.vc6
@@ -0,0 +1,130 @@
+# Microsoft Developer Studio Project File - Name="djpeg" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** NICHT BEARBEITEN **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=djpeg - Win32
+!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl
+!MESSAGE
+!MESSAGE NMAKE /f "djpeg.mak".
+!MESSAGE
+!MESSAGE Sie k÷nnen beim Ausfhren von NMAKE eine Konfiguration angeben
+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
+!MESSAGE
+!MESSAGE NMAKE /f "djpeg.mak" CFG="djpeg - Win32"
+!MESSAGE
+!MESSAGE Fr die Konfiguration stehen zur Auswahl:
+!MESSAGE
+!MESSAGE "djpeg - Win32" (basierend auf "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\djpeg\Release"
+# PROP BASE Intermediate_Dir ".\djpeg\Release"
+# PROP BASE Target_Dir ".\djpeg"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\djpeg\Release"
+# PROP Intermediate_Dir ".\djpeg\Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ".\djpeg"
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# Begin Target
+
+# Name "djpeg - Win32"
+# Begin Group "Quellcodedateien"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
+# Begin Source File
+
+SOURCE=.\cdjpeg.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\djpeg.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\rdcolmap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\wrbmp.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\wrgif.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\wrppm.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\wrrle.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\wrtarga.c
+# End Source File
+# End Group
+# Begin Group "Header-Dateien"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
+# Begin Source File
+
+SOURCE=.\cderror.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\cdjpeg.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jconfig.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jerror.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jinclude.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jmorecfg.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jpeglib.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jversion.h
+# End Source File
+# End Group
+# Begin Group "Ressourcendateien"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/src/3rdparty/libjpeg/makedmak.vc6 b/src/3rdparty/libjpeg/makedmak.vc6
new file mode 100644
index 0000000000..e16487ff44
--- /dev/null
+++ b/src/3rdparty/libjpeg/makedmak.vc6
@@ -0,0 +1,159 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on djpeg.dsp
+!IF "$(CFG)" == ""
+CFG=djpeg - Win32
+!MESSAGE Keine Konfiguration angegeben. djpeg - Win32 wird als Standard verwendet.
+!ENDIF
+
+!IF "$(CFG)" != "djpeg - Win32"
+!MESSAGE Ungültige Konfiguration "$(CFG)" angegeben.
+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
+!MESSAGE
+!MESSAGE NMAKE /f "djpeg.mak" CFG="djpeg - Win32"
+!MESSAGE
+!MESSAGE Für die Konfiguration stehen zur Auswahl:
+!MESSAGE
+!MESSAGE "djpeg - Win32" (basierend auf "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR Eine ungültige Konfiguration wurde angegeben.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+CPP=cl.exe
+RSC=rc.exe
+OUTDIR=.\djpeg\Release
+INTDIR=.\djpeg\Release
+# Begin Custom Macros
+OutDir=.\djpeg\Release
+# End Custom Macros
+
+ALL : "$(OUTDIR)\djpeg.exe"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\cdjpeg.obj"
+ -@erase "$(INTDIR)\djpeg.obj"
+ -@erase "$(INTDIR)\rdcolmap.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\wrbmp.obj"
+ -@erase "$(INTDIR)\wrgif.obj"
+ -@erase "$(INTDIR)\wrppm.obj"
+ -@erase "$(INTDIR)\wrrle.obj"
+ -@erase "$(INTDIR)\wrtarga.obj"
+ -@erase "$(OUTDIR)\djpeg.exe"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\djpeg.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\djpeg.pdb" /machine:I386 /out:"$(OUTDIR)\djpeg.exe"
+LINK32_OBJS= \
+ "$(INTDIR)\cdjpeg.obj" \
+ "$(INTDIR)\djpeg.obj" \
+ "$(INTDIR)\rdcolmap.obj" \
+ "$(INTDIR)\wrbmp.obj" \
+ "$(INTDIR)\wrgif.obj" \
+ "$(INTDIR)\wrppm.obj" \
+ "$(INTDIR)\wrrle.obj" \
+ "$(INTDIR)\wrtarga.obj"
+
+"$(OUTDIR)\djpeg.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+CPP_PROJ=/nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /Fp"$(INTDIR)\djpeg.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("djpeg.dep")
+!INCLUDE "djpeg.dep"
+!ELSE
+!MESSAGE Warning: cannot find "djpeg.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "djpeg - Win32"
+SOURCE=.\cdjpeg.c
+
+"$(INTDIR)\cdjpeg.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\djpeg.c
+
+"$(INTDIR)\djpeg.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\rdcolmap.c
+
+"$(INTDIR)\rdcolmap.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\wrbmp.c
+
+"$(INTDIR)\wrbmp.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\wrgif.c
+
+"$(INTDIR)\wrgif.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\wrppm.c
+
+"$(INTDIR)\wrppm.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\wrrle.c
+
+"$(INTDIR)\wrrle.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\wrtarga.c
+
+"$(INTDIR)\wrtarga.obj" : $(SOURCE) "$(INTDIR)"
+
+
+
+!ENDIF
+
diff --git a/src/3rdparty/libjpeg/makedvcp.vc9 b/src/3rdparty/libjpeg/makedvcp.vc9
new file mode 100644
index 0000000000..6f5bb1e5ba
--- /dev/null
+++ b/src/3rdparty/libjpeg/makedvcp.vc9
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="djpeg"
+ ProjectGUID="{9B7E57AE-31CD-405E-8070-26A8303B9DC9}"
+ RootNamespace="djpeg"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ProjectName)\$(ConfigurationName)"
+ IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="0"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ EnableIntrinsicFunctions="false"
+ EnableFiberSafeOptimizations="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Release\jpeg.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Quelldateien"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\cdjpeg.c"
+ >
+ </File>
+ <File
+ RelativePath=".\djpeg.c"
+ >
+ </File>
+ <File
+ RelativePath=".\rdcolmap.c"
+ >
+ </File>
+ <File
+ RelativePath=".\wrbmp.c"
+ >
+ </File>
+ <File
+ RelativePath=".\wrgif.c"
+ >
+ </File>
+ <File
+ RelativePath=".\wrppm.c"
+ >
+ </File>
+ <File
+ RelativePath=".\wrrle.c"
+ >
+ </File>
+ <File
+ RelativePath=".\wrtarga.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headerdateien"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\cderror.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cdjpeg.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jconfig.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jerror.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jinclude.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jmorecfg.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jpeglib.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jversion.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Ressourcendateien"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/3rdparty/libjpeg/makefile.ansi b/src/3rdparty/libjpeg/makefile.ansi
index 8291913593..30e41c9428 100644
--- a/src/3rdparty/libjpeg/makefile.ansi
+++ b/src/3rdparty/libjpeg/makefile.ansi
@@ -38,13 +38,13 @@ AR2= ranlib
# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
+LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
+ jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
+ jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
+ jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
+ jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
+ jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
+ jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
jquant2.c jutils.c jmemmgr.c
# memmgr back ends: compile only one of these into a working library
SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
@@ -54,38 +54,44 @@ APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
+INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
+ jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
+DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
+ wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
+ coderules.txt filelist.txt change.log
+MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
+ makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
+ makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
+ makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
+ maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
+ makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 \
+ makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \
+ makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \
+ makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \
+ makefile.vms makvms.opt
CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
+CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
+OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
+ libjpeg.map
TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
testimgp.jpg
DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
$(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
# library object files common to compression and decompression
-COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
+COMOBJECTS= jaricom.o jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
- jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
- jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \
- jfdctint.o
+CLIBOBJECTS= jcapimin.o jcapistd.o jcarith.o jctrans.o jcparam.o \
+ jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \
+ jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o jfdctfst.o \
+ jfdctflt.o jfdctint.o
# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
- jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
- jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \
- jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
+DLIBOBJECTS= jdapimin.o jdapistd.o jdarith.o jdtrans.o jdatasrc.o \
+ jdmaster.o jdinput.o jdmarker.o jdhuff.o jdmainct.o \
+ jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o \
+ jidctint.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
# These objectfiles are included in libjpeg.a
LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
# object files for sample applications (excluding library files)
@@ -118,9 +124,9 @@ rdjpgcom: rdjpgcom.o
wrjpgcom: wrjpgcom.o
$(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS)
-jconfig.h: jconfig.doc
+jconfig.h: jconfig.txt
echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
+ echo Please read the installation directions in install.txt.
exit 1
clean:
@@ -143,36 +149,37 @@ test: cjpeg djpeg jpegtran
cmp testorig.jpg testoutt.jpg
+jaricom.o: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcarith.o: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdarith.o: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
@@ -183,7 +190,6 @@ jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerro
jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
diff --git a/src/3rdparty/libjpeg/makefile.bcc b/src/3rdparty/libjpeg/makefile.bcc
index a1cfcde669..c9e231193d 100644
--- a/src/3rdparty/libjpeg/makefile.bcc
+++ b/src/3rdparty/libjpeg/makefile.bcc
@@ -65,13 +65,13 @@ SYSDEPMEMLIB= +jmemnobs.obj
# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
+LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
+ jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
+ jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
+ jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
+ jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
+ jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
+ jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
jquant2.c jutils.c jmemmgr.c
# memmgr back ends: compile only one of these into a working library
SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
@@ -81,39 +81,45 @@ APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
+INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
+ jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
+DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
+ wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
+ coderules.txt filelist.txt change.log
+MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
+ makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
+ makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
+ makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
+ maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
+ makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 \
+ makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \
+ makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \
+ makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \
+ makefile.vms makvms.opt
CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
+CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
+OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
+ libjpeg.map
TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
testimgp.jpg
DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
$(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
# library object files common to compression and decompression
-COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
+COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \
- jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \
- jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \
+CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj \
+ jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj \
+ jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj \
jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \
- jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \
- jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \
- jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \
- jquant1.obj jquant2.obj jdmerge.obj
+DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj \
+ jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj \
+ jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \
+ jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj \
+ jdmerge.obj
# These objectfiles are included in libjpeg.lib
LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
# object files for sample applications (excluding library files)
@@ -129,15 +135,15 @@ all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
libjpeg.lib: $(LIBOBJECTS)
- del libjpeg.lib
tlib libjpeg.lib /E /C @&&|
-+jcapimin.obj +jcapistd.obj +jctrans.obj +jcparam.obj +jdatadst.obj &
-+jcinit.obj +jcmaster.obj +jcmarker.obj +jcmainct.obj +jcprepct.obj &
-+jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj +jcphuff.obj &
++jcapimin.obj +jcapistd.obj +jcarith.obj +jctrans.obj +jcparam.obj &
++jdatadst.obj +jcinit.obj +jcmaster.obj +jcmarker.obj +jcmainct.obj &
++jcprepct.obj +jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj &
+jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj +jfdctint.obj +jdapimin.obj &
-+jdapistd.obj +jdtrans.obj +jdatasrc.obj +jdmaster.obj +jdinput.obj &
-+jdmarker.obj +jdhuff.obj +jdphuff.obj +jdmainct.obj +jdcoefct.obj &
++jdapistd.obj +jdarith.obj +jdtrans.obj +jdatasrc.obj +jdmaster.obj &
++jdinput.obj +jdmarker.obj +jdhuff.obj +jdmainct.obj +jdcoefct.obj &
+jdpostct.obj +jddctmgr.obj +jidctfst.obj +jidctflt.obj +jidctint.obj &
-+jidctred.obj +jdsample.obj +jdcolor.obj +jquant1.obj +jquant2.obj &
-+jdmerge.obj +jcomapi.obj +jutils.obj +jerror.obj +jmemmgr.obj &
++jdsample.obj +jdcolor.obj +jquant1.obj +jquant2.obj +jdmerge.obj &
++jaricom.obj +jcomapi.obj +jutils.obj +jerror.obj +jmemmgr.obj &
$(SYSDEPMEMLIB)
|
@@ -170,9 +176,9 @@ wrjpgcom.exe: wrjpgcom.c
.c.obj:
$(CC) $(CFLAGS) -c{ $<}
-jconfig.h: jconfig.doc
+jconfig.h: jconfig.txt
echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
+ echo Please read the installation directions in install.txt.
exit 1
clean:
@@ -212,36 +218,37 @@ test: cjpeg.exe djpeg.exe jpegtran.exe
!endif
+jaricom.obj: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcarith.obj: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdarith.obj: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
@@ -252,7 +259,6 @@ jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jer
jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
diff --git a/src/3rdparty/libjpeg/makefile.cfg b/src/3rdparty/libjpeg/makefile.cfg
deleted file mode 100644
index f25e42e3e6..0000000000
--- a/src/3rdparty/libjpeg/makefile.cfg
+++ /dev/null
@@ -1,319 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# makefile.cfg is edited by configure to produce a custom Makefile.
-
-# Read installation instructions before saying "make" !!
-
-# For compiling with source and object files in different directories.
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-# Where to install the programs and man pages.
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = $(exec_prefix)/bin
-libdir = $(exec_prefix)/lib
-includedir = $(prefix)/include
-binprefix =
-manprefix =
-manext = 1
-mandir = $(prefix)/man/man$(manext)
-
-# The name of your C compiler:
-CC= @CC@
-
-# You may need to adjust these cc options:
-CFLAGS= @CFLAGS@ @CPPFLAGS@ @INCLUDEFLAGS@
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-# However, any special defines for ansi2knr.c may be included here:
-ANSI2KNRFLAGS= @ANSI2KNRFLAGS@
-
-# Link-time cc options:
-LDFLAGS= @LDFLAGS@
-
-# To link any special libraries, add the necessary -l commands here.
-LDLIBS= @LIBS@
-
-# If using GNU libtool, LIBTOOL references it; if not, LIBTOOL is empty.
-LIBTOOL = @LIBTOOL@
-# $(O) expands to "lo" if using libtool, plain "o" if not.
-# Similarly, $(A) expands to "la" or "a".
-O = @O@
-A = @A@
-
-# Library version ID; libtool uses this for the shared library version number.
-# Note: we suggest this match the macro of the same name in jpeglib.h.
-JPEG_LIB_VERSION = @JPEG_LIB_VERSION@
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For Unix this is usually jmemnobs.o, but you may want
-# to use jmemansi.o or jmemname.o if you have limited swap space.
-SYSDEPMEM= @MEMORYMGR@
-
-# miscellaneous OS-dependent stuff
-SHELL= /bin/sh
-# linker
-LN= @LN@
-# file deletion command
-RM= rm -f
-# directory creation command
-MKDIR= mkdir
-# library (.a) file creation command
-AR= ar rc
-# second step in .a creation (use "touch" if not needed)
-AR2= @RANLIB@
-# installation program
-INSTALL= @INSTALL@
-INSTALL_PROGRAM= @INSTALL_PROGRAM@
-INSTALL_LIB= @INSTALL_LIB@
-INSTALL_DATA= @INSTALL_DATA@
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.$(O) jutils.$(O) jerror.$(O) jmemmgr.$(O) $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.$(O) jcapistd.$(O) jctrans.$(O) jcparam.$(O) \
- jdatadst.$(O) jcinit.$(O) jcmaster.$(O) jcmarker.$(O) jcmainct.$(O) \
- jcprepct.$(O) jccoefct.$(O) jccolor.$(O) jcsample.$(O) jchuff.$(O) \
- jcphuff.$(O) jcdctmgr.$(O) jfdctfst.$(O) jfdctflt.$(O) \
- jfdctint.$(O)
-# decompression library object files
-DLIBOBJECTS= jdapimin.$(O) jdapistd.$(O) jdtrans.$(O) jdatasrc.$(O) \
- jdmaster.$(O) jdinput.$(O) jdmarker.$(O) jdhuff.$(O) jdphuff.$(O) \
- jdmainct.$(O) jdcoefct.$(O) jdpostct.$(O) jddctmgr.$(O) \
- jidctfst.$(O) jidctflt.$(O) jidctint.$(O) jidctred.$(O) \
- jdsample.$(O) jdcolor.$(O) jquant1.$(O) jquant2.$(O) jdmerge.$(O)
-# These objectfiles are included in libjpeg.a
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.$(O) rdppm.$(O) rdgif.$(O) rdtarga.$(O) rdrle.$(O) \
- rdbmp.$(O) rdswitch.$(O) cdjpeg.$(O)
-DOBJECTS= djpeg.$(O) wrppm.$(O) wrgif.$(O) wrtarga.$(O) wrrle.$(O) \
- wrbmp.$(O) rdcolmap.$(O) cdjpeg.$(O)
-TROBJECTS= jpegtran.$(O) rdswitch.$(O) cdjpeg.$(O) transupp.$(O)
-
-
-all: @A2K_DEPS@ libjpeg.$(A) cjpeg djpeg jpegtran rdjpgcom wrjpgcom
-
-# Special compilation rules to support ansi2knr and libtool.
-.SUFFIXES: .lo .la
-
-# How to compile with libtool.
-@COM_LT@.c.lo:
-@COM_LT@ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$*.c
-
-# How to use ansi2knr, when not using libtool.
-@COM_A2K@.c.o:
-@COM_A2K@ ./ansi2knr $(srcdir)/$*.c knr/$*.c
-@COM_A2K@ $(CC) $(CFLAGS) -c knr/$*.c
-@COM_A2K@ $(RM) knr/$*.c
-
-# How to use ansi2knr AND libtool.
-@COM_A2K@.c.lo:
-@COM_A2K@ ./ansi2knr $(srcdir)/$*.c knr/$*.c
-@COM_A2K@ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c knr/$*.c
-@COM_A2K@ $(RM) knr/$*.c
-
-ansi2knr: ansi2knr.c
- $(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr $(srcdir)/ansi2knr.c
- $(MKDIR) knr
-
-# the library:
-
-# without libtool:
-libjpeg.a: @A2K_DEPS@ $(LIBOBJECTS)
- $(RM) libjpeg.a
- $(AR) libjpeg.a $(LIBOBJECTS)
- $(AR2) libjpeg.a
-
-# with libtool:
-libjpeg.la: @A2K_DEPS@ $(LIBOBJECTS)
- $(LIBTOOL) --mode=link $(CC) -o libjpeg.la $(LIBOBJECTS) \
- -rpath $(libdir) -version-info $(JPEG_LIB_VERSION)
-
-# sample programs:
-
-cjpeg: $(COBJECTS) libjpeg.$(A)
- $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.$(A) $(LDLIBS)
-
-djpeg: $(DOBJECTS) libjpeg.$(A)
- $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.$(A) $(LDLIBS)
-
-jpegtran: $(TROBJECTS) libjpeg.$(A)
- $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.$(A) $(LDLIBS)
-
-rdjpgcom: rdjpgcom.$(O)
- $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.$(O) $(LDLIBS)
-
-wrjpgcom: wrjpgcom.$(O)
- $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.$(O) $(LDLIBS)
-
-# Installation rules:
-
-install: cjpeg djpeg jpegtran rdjpgcom wrjpgcom @FORCE_INSTALL_LIB@
- $(INSTALL_PROGRAM) cjpeg $(bindir)/$(binprefix)cjpeg
- $(INSTALL_PROGRAM) djpeg $(bindir)/$(binprefix)djpeg
- $(INSTALL_PROGRAM) jpegtran $(bindir)/$(binprefix)jpegtran
- $(INSTALL_PROGRAM) rdjpgcom $(bindir)/$(binprefix)rdjpgcom
- $(INSTALL_PROGRAM) wrjpgcom $(bindir)/$(binprefix)wrjpgcom
- $(INSTALL_DATA) $(srcdir)/cjpeg.1 $(mandir)/$(manprefix)cjpeg.$(manext)
- $(INSTALL_DATA) $(srcdir)/djpeg.1 $(mandir)/$(manprefix)djpeg.$(manext)
- $(INSTALL_DATA) $(srcdir)/jpegtran.1 $(mandir)/$(manprefix)jpegtran.$(manext)
- $(INSTALL_DATA) $(srcdir)/rdjpgcom.1 $(mandir)/$(manprefix)rdjpgcom.$(manext)
- $(INSTALL_DATA) $(srcdir)/wrjpgcom.1 $(mandir)/$(manprefix)wrjpgcom.$(manext)
-
-install-lib: libjpeg.$(A) install-headers
- $(INSTALL_LIB) libjpeg.$(A) $(libdir)/$(binprefix)libjpeg.$(A)
-
-install-headers: jconfig.h
- $(INSTALL_DATA) jconfig.h $(includedir)/jconfig.h
- $(INSTALL_DATA) $(srcdir)/jpeglib.h $(includedir)/jpeglib.h
- $(INSTALL_DATA) $(srcdir)/jmorecfg.h $(includedir)/jmorecfg.h
- $(INSTALL_DATA) $(srcdir)/jerror.h $(includedir)/jerror.h
-
-clean:
- $(RM) *.o *.lo libjpeg.a libjpeg.la
- $(RM) cjpeg djpeg jpegtran rdjpgcom wrjpgcom
- $(RM) ansi2knr core testout* config.log config.status
- $(RM) -r knr .libs _libs
-
-distclean: clean
- $(RM) Makefile jconfig.h libtool config.cache
-
-test: cjpeg djpeg jpegtran
- $(RM) testout*
- ./djpeg -dct int -ppm -outfile testout.ppm $(srcdir)/testorig.jpg
- ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg
- ./cjpeg -dct int -outfile testout.jpg $(srcdir)/testimg.ppm
- ./djpeg -dct int -ppm -outfile testoutp.ppm $(srcdir)/testprog.jpg
- ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg $(srcdir)/testimg.ppm
- ./jpegtran -outfile testoutt.jpg $(srcdir)/testprog.jpg
- cmp $(srcdir)/testimg.ppm testout.ppm
- cmp $(srcdir)/testimg.bmp testout.bmp
- cmp $(srcdir)/testimg.jpg testout.jpg
- cmp $(srcdir)/testimg.ppm testoutp.ppm
- cmp $(srcdir)/testimgp.jpg testoutp.jpg
- cmp $(srcdir)/testorig.jpg testoutt.jpg
-
-check: test
-
-# Mistake catcher:
-
-jconfig.h: jconfig.doc
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
- exit 1
-
-# GNU Make likes to know which target names are not really files to be made:
-.PHONY: all install install-lib install-headers clean distclean test check
-
-
-jcapimin.$(O): jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.$(O): jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.$(O): jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.$(O): jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.$(O): jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.$(O): jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.$(O): jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.$(O): jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.$(O): jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.$(O): jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.$(O): jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.$(O): jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.$(O): jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.$(O): jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.$(O): jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.$(O): jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.$(O): jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.$(O): jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.$(O): jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.$(O): jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.$(O): jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.$(O): jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.$(O): jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.$(O): jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.$(O): jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.$(O): jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.$(O): jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.$(O): jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.$(O): jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.$(O): jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.$(O): jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.$(O): jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.$(O): jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.$(O): jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.$(O): jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.$(O): jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.$(O): jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.$(O): jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.$(O): jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.$(O): jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.$(O): jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.$(O): jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.$(O): jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.$(O): jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.$(O): jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.$(O): jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.$(O): jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.$(O): jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.$(O): jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.$(O): jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.$(O): cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.$(O): djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.$(O): jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.$(O): rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.$(O): wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.$(O): cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.$(O): rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.$(O): rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.$(O): transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.$(O): rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.$(O): wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.$(O): rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.$(O): wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.$(O): rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.$(O): wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.$(O): rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.$(O): wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.$(O): rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.$(O): wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/src/3rdparty/libjpeg/makefile.dj b/src/3rdparty/libjpeg/makefile.dj
index f766d25e38..14d0ee66c2 100644
--- a/src/3rdparty/libjpeg/makefile.dj
+++ b/src/3rdparty/libjpeg/makefile.dj
@@ -38,13 +38,13 @@ AR2= ranlib
# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
+LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
+ jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
+ jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
+ jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
+ jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
+ jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
+ jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
jquant2.c jutils.c jmemmgr.c
# memmgr back ends: compile only one of these into a working library
SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
@@ -54,38 +54,44 @@ APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
+INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
+ jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
+DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
+ wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
+ coderules.txt filelist.txt change.log
+MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
+ makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
+ makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
+ makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
+ maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
+ makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 \
+ makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \
+ makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \
+ makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \
+ makefile.vms makvms.opt
CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
+CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
+OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
+ libjpeg.map
TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
testimgp.jpg
DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
$(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
# library object files common to compression and decompression
-COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
+COMOBJECTS= jaricom.o jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
- jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
- jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \
- jfdctint.o
+CLIBOBJECTS= jcapimin.o jcapistd.o jcarith.o jctrans.o jcparam.o \
+ jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \
+ jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o jfdctfst.o \
+ jfdctflt.o jfdctint.o
# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
- jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
- jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \
- jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
+DLIBOBJECTS= jdapimin.o jdapistd.o jdarith.o jdtrans.o jdatasrc.o \
+ jdmaster.o jdinput.o jdmarker.o jdhuff.o jdmainct.o \
+ jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o \
+ jidctint.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
# These objectfiles are included in libjpeg.a
LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
# object files for sample applications (excluding library files)
@@ -118,9 +124,9 @@ rdjpgcom.exe: rdjpgcom.o
wrjpgcom.exe: wrjpgcom.o
$(LN) $(LDFLAGS) -o wrjpgcom.exe wrjpgcom.o $(LDLIBS)
-jconfig.h: jconfig.doc
+jconfig.h: jconfig.txt
echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
+ echo Please read the installation directions in install.txt.
exit 1
clean:
@@ -149,36 +155,37 @@ test: cjpeg.exe djpeg.exe jpegtran.exe
fc /b testorig.jpg testoutt.jpg
+jaricom.o: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcarith.o: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdarith.o: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
@@ -189,7 +196,6 @@ jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerro
jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
diff --git a/src/3rdparty/libjpeg/makefile.manx b/src/3rdparty/libjpeg/makefile.manx
index 4cb42d17ca..d1af57c21a 100644
--- a/src/3rdparty/libjpeg/makefile.manx
+++ b/src/3rdparty/libjpeg/makefile.manx
@@ -39,13 +39,13 @@ AR= lb
# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
+LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
+ jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
+ jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
+ jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
+ jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
+ jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
+ jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
jquant2.c jutils.c jmemmgr.c
# memmgr back ends: compile only one of these into a working library
SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
@@ -55,38 +55,44 @@ APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
+INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
+ jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
+DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
+ wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
+ coderules.txt filelist.txt change.log
+MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
+ makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
+ makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
+ makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
+ maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
+ makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 \
+ makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \
+ makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \
+ makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \
+ makefile.vms makvms.opt
CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
+CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
+OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
+ libjpeg.map
TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
testimgp.jpg
DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
$(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
# library object files common to compression and decompression
-COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
+COMOBJECTS= jaricom.o jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
- jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
- jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \
- jfdctint.o
+CLIBOBJECTS= jcapimin.o jcapistd.o jcarith.o jctrans.o jcparam.o \
+ jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \
+ jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o jfdctfst.o \
+ jfdctflt.o jfdctint.o
# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
- jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
- jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \
- jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
+DLIBOBJECTS= jdapimin.o jdapistd.o jdarith.o jdtrans.o jdatasrc.o \
+ jdmaster.o jdinput.o jdmarker.o jdhuff.o jdmainct.o \
+ jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o \
+ jidctint.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
# These objectfiles are included in libjpeg.lib
LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
# object files for sample applications (excluding library files)
@@ -118,9 +124,9 @@ rdjpgcom: rdjpgcom.o
wrjpgcom: wrjpgcom.o
$(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS)
-jconfig.h: jconfig.doc
+jconfig.h: jconfig.txt
echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
+ echo Please read the installation directions in install.txt.
exit 1
clean:
@@ -143,36 +149,37 @@ test: cjpeg djpeg jpegtran
cmp testorig.jpg testoutt.jpg
+jaricom.o: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcarith.o: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdarith.o: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
@@ -183,7 +190,6 @@ jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerro
jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
diff --git a/src/3rdparty/libjpeg/makefile.mc6 b/src/3rdparty/libjpeg/makefile.mc6
index 6aff054646..2e0c7475a8 100644
--- a/src/3rdparty/libjpeg/makefile.mc6
+++ b/src/3rdparty/libjpeg/makefile.mc6
@@ -27,7 +27,7 @@ CFLAGS = -AM -Oecigt -Gs -W3
# Put here the object file name for the correct system-dependent memory
# manager file. For DOS, we recommend jmemdos.c and jmemdosa.asm.
-# (But not for Windows; see install.doc if you use this makefile for Windows.)
+# (But not for Windows; see install.txt if you use this makefile for Windows.)
SYSDEPMEM= jmemdos.obj jmemdosa.obj
# SYSDEPMEMLIB must list the same files with "+" signs for the librarian.
SYSDEPMEMLIB= +jmemdos.obj +jmemdosa.obj
@@ -36,13 +36,13 @@ SYSDEPMEMLIB= +jmemdos.obj +jmemdosa.obj
# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
+LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
+ jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
+ jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
+ jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
+ jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
+ jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
+ jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
jquant2.c jutils.c jmemmgr.c
# memmgr back ends: compile only one of these into a working library
SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
@@ -52,39 +52,45 @@ APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
+INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
+ jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
+DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
+ wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
+ coderules.txt filelist.txt change.log
+MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
+ makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
+ makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
+ makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
+ maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
+ makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 \
+ makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \
+ makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \
+ makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \
+ makefile.vms makvms.opt
CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
+CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
+OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
+ libjpeg.map
TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
testimgp.jpg
DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
$(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
# library object files common to compression and decompression
-COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
+COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \
- jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \
- jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \
+CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj \
+ jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj \
+ jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj \
jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \
- jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \
- jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \
- jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \
- jquant1.obj jquant2.obj jdmerge.obj
+DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj \
+ jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj \
+ jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \
+ jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj \
+ jdmerge.obj
# These objectfiles are included in libjpeg.lib
LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
# object files for sample applications (excluding library files)
@@ -110,19 +116,19 @@ $(RFILE) : makefile
echo libjpeg.lib >$(RFILE)
# silly want-to-create-it prompt:
echo y >>$(RFILE)
- echo +jcapimin.obj +jcapistd.obj +jctrans.obj +jcparam.obj & >>$(RFILE)
- echo +jdatadst.obj +jcinit.obj +jcmaster.obj +jcmarker.obj & >>$(RFILE)
- echo +jcmainct.obj +jcprepct.obj +jccoefct.obj & >>$(RFILE)
- echo +jccolor.obj +jcsample.obj +jchuff.obj +jcphuff.obj & >>$(RFILE)
+ echo +jcapimin.obj +jcapistd.obj +jcarith.obj +jctrans.obj & >>$(RFILE)
+ echo +jcparam.obj +jdatadst.obj +jcinit.obj +jcmaster.obj & >>$(RFILE)
+ echo +jcmarker.obj +jcmainct.obj +jcprepct.obj & >>$(RFILE)
+ echo +jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj & >>$(RFILE)
echo +jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj & >>$(RFILE)
echo +jfdctint.obj +jdapimin.obj +jdapistd.obj & >>$(RFILE)
- echo +jdtrans.obj +jdatasrc.obj +jdmaster.obj +jdinput.obj & >>$(RFILE)
- echo +jdmarker.obj +jdhuff.obj +jdphuff.obj +jdmainct.obj & >>$(RFILE)
+ echo +jdarith.obj +jdtrans.obj +jdatasrc.obj +jdmaster.obj & >>$(RFILE)
+ echo +jdinput.obj +jdmarker.obj +jdhuff.obj +jdmainct.obj & >>$(RFILE)
echo +jdcoefct.obj +jdpostct.obj +jddctmgr.obj & >>$(RFILE)
echo +jidctfst.obj +jidctflt.obj +jidctint.obj & >>$(RFILE)
- echo +jidctred.obj +jdsample.obj +jdcolor.obj +jquant1.obj & >>$(RFILE)
- echo +jquant2.obj +jdmerge.obj +jcomapi.obj +jutils.obj & >>$(RFILE)
- echo +jerror.obj +jmemmgr.obj & >>$(RFILE)
+ echo +jdsample.obj +jdcolor.obj +jquant1.obj & >>$(RFILE)
+ echo +jquant2.obj +jdmerge.obj +jaricom.obj +jcomapi.obj & >>$(RFILE)
+ echo +jutils.obj +jerror.obj +jmemmgr.obj & >>$(RFILE)
echo $(SYSDEPMEMLIB) ; >>$(RFILE)
cjpeg.exe: $(COBJECTS) libjpeg.lib
@@ -145,9 +151,9 @@ rdjpgcom.exe: rdjpgcom.c
wrjpgcom.exe: wrjpgcom.c
$(CC) -AL -O -W3 wrjpgcom.c
-jconfig.h: jconfig.doc
+jconfig.h: jconfig.txt
echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
+ echo Please read the installation directions in install.txt.
exit 1
clean:
@@ -176,36 +182,37 @@ test: cjpeg.exe djpeg.exe jpegtran.exe
fc /b testorig.jpg testoutt.jpg
+jaricom.obj: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcarith.obj: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdarith.obj: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
@@ -216,7 +223,6 @@ jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jer
jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
diff --git a/src/3rdparty/libjpeg/makefile.mms b/src/3rdparty/libjpeg/makefile.mms
index cf130e5b9f..992c25f306 100644
--- a/src/3rdparty/libjpeg/makefile.mms
+++ b/src/3rdparty/libjpeg/makefile.mms
@@ -25,13 +25,13 @@ SYSDEPMEM= jmemnobs.obj
# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
+LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
+ jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
+ jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
+ jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
+ jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
+ jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
+ jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
jquant2.c jutils.c jmemmgr.c
# memmgr back ends: compile only one of these into a working library
SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
@@ -41,39 +41,45 @@ APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
+INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
+ jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
+DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
+ wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
+ coderules.txt filelist.txt change.log
+MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
+ makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
+ makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
+ makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
+ maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
+ makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 \
+ makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \
+ makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \
+ makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \
+ makefile.vms makvms.opt
CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
+CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
+OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
+ libjpeg.map
TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
testimgp.jpg
DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
$(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
# library object files common to compression and decompression
-COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
+COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \
- jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \
- jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \
+CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj \
+ jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj \
+ jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj \
jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \
- jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \
- jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \
- jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \
- jquant1.obj jquant2.obj jdmerge.obj
+DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj \
+ jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj \
+ jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \
+ jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj \
+ jdmerge.obj
# These objectfiles are included in libjpeg.olb
LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
# object files for sample applications (excluding library files)
@@ -88,14 +94,14 @@ COBJLIST= cjpeg.obj,rdppm.obj,rdgif.obj,rdtarga.obj,rdrle.obj,rdbmp.obj,\
DOBJLIST= djpeg.obj,wrppm.obj,wrgif.obj,wrtarga.obj,wrrle.obj,wrbmp.obj,\
rdcolmap.obj,cdjpeg.obj
TROBJLIST= jpegtran.obj,rdswitch.obj,cdjpeg.obj,transupp.obj
-LIBOBJLIST= jcapimin.obj,jcapistd.obj,jctrans.obj,jcparam.obj,jdatadst.obj,\
- jcinit.obj,jcmaster.obj,jcmarker.obj,jcmainct.obj,jcprepct.obj,\
- jccoefct.obj,jccolor.obj,jcsample.obj,jchuff.obj,jcphuff.obj,\
- jcdctmgr.obj,jfdctfst.obj,jfdctflt.obj,jfdctint.obj,jdapimin.obj,\
- jdapistd.obj,jdtrans.obj,jdatasrc.obj,jdmaster.obj,jdinput.obj,\
- jdmarker.obj,jdhuff.obj,jdphuff.obj,jdmainct.obj,jdcoefct.obj,\
- jdpostct.obj,jddctmgr.obj,jidctfst.obj,jidctflt.obj,jidctint.obj,\
- jidctred.obj,jdsample.obj,jdcolor.obj,jquant1.obj,jquant2.obj,\
+LIBOBJLIST= jaricom.obj,jcapimin.obj,jcapistd.obj,jcarith.obj,jctrans.obj,\
+ jcparam.obj,jdatadst.obj,jcinit.obj,jcmaster.obj,jcmarker.obj,\
+ jcmainct.obj,jcprepct.obj,jccoefct.obj,jccolor.obj,jcsample.obj,\
+ jchuff.obj,jcdctmgr.obj,jfdctfst.obj,jfdctflt.obj,jfdctint.obj,\
+ jdapimin.obj,jdapistd.obj,jdarith.obj,jdtrans.obj,jdatasrc.obj,\
+ jdmaster.obj,jdinput.obj,jdmarker.obj,jdhuff.obj,jdmainct.obj,\
+ jdcoefct.obj,jdpostct.obj,jddctmgr.obj,jidctfst.obj,jidctflt.obj,\
+ jidctint.obj,jdsample.obj,jdcolor.obj,jquant1.obj,jquant2.obj,\
jdmerge.obj,jcomapi.obj,jutils.obj,jerror.obj,jmemmgr.obj,$(SYSDEPMEM)
@@ -147,36 +153,37 @@ test : cjpeg.exe djpeg.exe jpegtran.exe
- Backup /Compare/Log testorig.jpg testoutt.jpg
+jaricom.obj : jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapimin.obj : jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapistd.obj : jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcarith.obj : jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccoefct.obj : jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccolor.obj : jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcdctmgr.obj : jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj : jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jchuff.obj : jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcinit.obj : jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmainct.obj : jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmarker.obj : jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmaster.obj : jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcomapi.obj : jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcparam.obj : jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.obj : jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
jcprepct.obj : jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcsample.obj : jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jctrans.obj : jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapimin.obj : jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapistd.obj : jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdarith.obj : jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdatadst.obj : jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdatasrc.obj : jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdcoefct.obj : jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdcolor.obj : jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jddctmgr.obj : jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj : jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdhuff.obj : jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdinput.obj : jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmainct.obj : jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmarker.obj : jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmaster.obj : jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmerge.obj : jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.obj : jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
jdpostct.obj : jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdsample.obj : jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdtrans.obj : jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
@@ -187,7 +194,6 @@ jfdctint.obj : jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h je
jidctflt.obj : jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctfst.obj : jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctint.obj : jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.obj : jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jquant1.obj : jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jquant2.obj : jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jutils.obj : jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
diff --git a/src/3rdparty/libjpeg/makefile.sas b/src/3rdparty/libjpeg/makefile.sas
index f296faf069..c7a030c27b 100644
--- a/src/3rdparty/libjpeg/makefile.sas
+++ b/src/3rdparty/libjpeg/makefile.sas
@@ -47,13 +47,13 @@ AR= oml
# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
+LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
+ jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
+ jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
+ jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
+ jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
+ jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
+ jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
jquant2.c jutils.c jmemmgr.c
# memmgr back ends: compile only one of these into a working library
SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
@@ -63,38 +63,44 @@ APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
+INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
+ jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
+DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
+ wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
+ coderules.txt filelist.txt change.log
+MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
+ makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
+ makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
+ makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
+ maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
+ makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 \
+ makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \
+ makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \
+ makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \
+ makefile.vms makvms.opt
CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
+CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
+OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
+ libjpeg.map
TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
testimgp.jpg
DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
$(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
# library object files common to compression and decompression
-COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
+COMOBJECTS= jaricom.o jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
- jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
- jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \
- jfdctint.o
+CLIBOBJECTS= jcapimin.o jcapistd.o jcarith.o jctrans.o jcparam.o \
+ jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \
+ jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o jfdctfst.o \
+ jfdctflt.o jfdctint.o
# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
- jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
- jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \
- jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
+DLIBOBJECTS= jdapimin.o jdapistd.o jdarith.o jdtrans.o jdatasrc.o \
+ jdmaster.o jdinput.o jdmarker.o jdhuff.o jdmainct.o \
+ jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o \
+ jidctint.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
# These objectfiles are included in libjpeg.lib
LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
# object files for sample applications (excluding library files)
@@ -155,9 +161,9 @@ FROM LIB:c.o wrjpgcom.o
LIB $(LDLIBS)
<
-jconfig.h: jconfig.doc
+jconfig.h: jconfig.txt
echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
+ echo Please read the installation directions in install.txt.
exit 1
clean:
@@ -181,36 +187,37 @@ test: cjpeg djpeg jpegtran
cmp testorig.jpg testoutt.jpg
+jaricom.o: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcarith.o: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdarith.o: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
@@ -221,7 +228,6 @@ jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerro
jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
diff --git a/src/3rdparty/libjpeg/makefile.unix b/src/3rdparty/libjpeg/makefile.unix
index 00455ab6a8..90332e3f67 100644
--- a/src/3rdparty/libjpeg/makefile.unix
+++ b/src/3rdparty/libjpeg/makefile.unix
@@ -42,13 +42,13 @@ AR2= ranlib
# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
+LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
+ jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
+ jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
+ jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
+ jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
+ jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
+ jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
jquant2.c jutils.c jmemmgr.c
# memmgr back ends: compile only one of these into a working library
SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
@@ -58,38 +58,44 @@ APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
+INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
+ jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
+DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
+ wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
+ coderules.txt filelist.txt change.log
+MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
+ makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
+ makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
+ makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
+ maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
+ makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 \
+ makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \
+ makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \
+ makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \
+ makefile.vms makvms.opt
CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
+CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
+OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
+ libjpeg.map
TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
testimgp.jpg
DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
$(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
# library object files common to compression and decompression
-COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
+COMOBJECTS= jaricom.o jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
- jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
- jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \
- jfdctint.o
+CLIBOBJECTS= jcapimin.o jcapistd.o jcarith.o jctrans.o jcparam.o \
+ jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \
+ jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o jfdctfst.o \
+ jfdctflt.o jfdctint.o
# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
- jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
- jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \
- jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
+DLIBOBJECTS= jdapimin.o jdapistd.o jdarith.o jdtrans.o jdatasrc.o \
+ jdmaster.o jdinput.o jdmarker.o jdhuff.o jdmainct.o \
+ jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o \
+ jidctint.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
# These objectfiles are included in libjpeg.a
LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
# object files for sample applications (excluding library files)
@@ -132,9 +138,9 @@ rdjpgcom: rdjpgcom.o
wrjpgcom: wrjpgcom.o
$(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS)
-jconfig.h: jconfig.doc
+jconfig.h: jconfig.txt
echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
+ echo Please read the installation directions in install.txt.
exit 1
clean:
@@ -157,36 +163,37 @@ test: cjpeg djpeg jpegtran
cmp testorig.jpg testoutt.jpg
+jaricom.o: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcarith.o: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdarith.o: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
@@ -197,7 +204,6 @@ jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerro
jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
diff --git a/src/3rdparty/libjpeg/makefile.vc b/src/3rdparty/libjpeg/makefile.vc
index 2acf069402..41b998f126 100644
--- a/src/3rdparty/libjpeg/makefile.vc
+++ b/src/3rdparty/libjpeg/makefile.vc
@@ -35,13 +35,13 @@ RM= del
# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
+LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
+ jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
+ jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
+ jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
+ jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
+ jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
+ jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
jquant2.c jutils.c jmemmgr.c
# memmgr back ends: compile only one of these into a working library
SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
@@ -51,39 +51,45 @@ APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
+INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
+ jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
+DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
+ wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
+ coderules.txt filelist.txt change.log
+MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
+ makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
+ makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
+ makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
+ maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
+ makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 \
+ makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \
+ makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \
+ makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \
+ makefile.vms makvms.opt
CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
+CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
+OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
+ libjpeg.map
TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
testimgp.jpg
DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
$(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
# library object files common to compression and decompression
-COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
+COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \
- jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \
- jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \
+CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj \
+ jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj \
+ jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj \
jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \
- jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \
- jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \
- jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \
- jquant1.obj jquant2.obj jdmerge.obj
+DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj \
+ jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj \
+ jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \
+ jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj \
+ jdmerge.obj
# These objectfiles are included in libjpeg.lib
LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
# object files for sample applications (excluding library files)
@@ -140,36 +146,37 @@ test: cjpeg.exe djpeg.exe jpegtran.exe
fc /b testorig.jpg testoutt.jpg
+jaricom.obj: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcarith.obj: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdarith.obj: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
@@ -180,7 +187,6 @@ jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jer
jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
diff --git a/src/3rdparty/libjpeg/makefile.vms b/src/3rdparty/libjpeg/makefile.vms
index a42358d05c..a07d070d82 100644
--- a/src/3rdparty/libjpeg/makefile.vms
+++ b/src/3rdparty/libjpeg/makefile.vms
@@ -26,8 +26,10 @@ $ EndIf
$
$ DoCompile := CC /NoDebug /Optimize /NoList
$!
+$ DoCompile jaricom.c
$ DoCompile jcapimin.c
$ DoCompile jcapistd.c
+$ DoCompile jcarith.c
$ DoCompile jctrans.c
$ DoCompile jcparam.c
$ DoCompile jdatadst.c
@@ -40,20 +42,19 @@ $ DoCompile jccoefct.c
$ DoCompile jccolor.c
$ DoCompile jcsample.c
$ DoCompile jchuff.c
-$ DoCompile jcphuff.c
$ DoCompile jcdctmgr.c
$ DoCompile jfdctfst.c
$ DoCompile jfdctflt.c
$ DoCompile jfdctint.c
$ DoCompile jdapimin.c
$ DoCompile jdapistd.c
+$ DoCompile jdarith.c
$ DoCompile jdtrans.c
$ DoCompile jdatasrc.c
$ DoCompile jdmaster.c
$ DoCompile jdinput.c
$ DoCompile jdmarker.c
$ DoCompile jdhuff.c
-$ DoCompile jdphuff.c
$ DoCompile jdmainct.c
$ DoCompile jdcoefct.c
$ DoCompile jdpostct.c
@@ -61,7 +62,6 @@ $ DoCompile jddctmgr.c
$ DoCompile jidctfst.c
$ DoCompile jidctflt.c
$ DoCompile jidctint.c
-$ DoCompile jidctred.c
$ DoCompile jdsample.c
$ DoCompile jdcolor.c
$ DoCompile jquant1.c
@@ -73,14 +73,14 @@ $ DoCompile jerror.c
$ DoCompile jmemmgr.c
$ DoCompile jmemnobs.c
$!
-$ Library /Create libjpeg.olb jcapimin.obj,jcapistd.obj,jctrans.obj, -
- jcparam.obj,jdatadst.obj,jcinit.obj,jcmaster.obj,jcmarker.obj, -
- jcmainct.obj,jcprepct.obj,jccoefct.obj,jccolor.obj,jcsample.obj, -
- jchuff.obj,jcphuff.obj,jcdctmgr.obj,jfdctfst.obj,jfdctflt.obj, -
- jfdctint.obj,jdapimin.obj,jdapistd.obj,jdtrans.obj,jdatasrc.obj, -
- jdmaster.obj,jdinput.obj,jdmarker.obj,jdhuff.obj,jdphuff.obj, -
- jdmainct.obj,jdcoefct.obj,jdpostct.obj,jddctmgr.obj,jidctfst.obj, -
- jidctflt.obj,jidctint.obj,jidctred.obj,jdsample.obj,jdcolor.obj, -
+$ Library /Create libjpeg.olb jaricom.obj,jcapimin.obj,jcapistd.obj, -
+ jcarith.obj,jctrans.obj,jcparam.obj,jdatadst.obj,jcinit.obj, -
+ jcmaster.obj,jcmarker.obj,jcmainct.obj,jcprepct.obj,jccoefct.obj, -
+ jccolor.obj,jcsample.obj,jchuff.obj,jcdctmgr.obj,jfdctfst.obj, -
+ jfdctflt.obj,jfdctint.obj,jdapimin.obj,jdapistd.obj,jdarith.obj, -
+ jdtrans.obj,jdatasrc.obj,jdmaster.obj,jdinput.obj,jdmarker.obj, -
+ jdhuff.obj,jdmainct.obj,jdcoefct.obj,jdpostct.obj,jddctmgr.obj, -
+ jidctfst.obj,jidctflt.obj,jidctint.obj,jdsample.obj,jdcolor.obj, -
jquant1.obj,jquant2.obj,jdmerge.obj,jcomapi.obj,jutils.obj, -
jerror.obj,jmemmgr.obj,jmemnobs.obj
$!
diff --git a/src/3rdparty/libjpeg/makefile.wat b/src/3rdparty/libjpeg/makefile.wat
index d953e466f8..f7ef6e6b13 100644
--- a/src/3rdparty/libjpeg/makefile.wat
+++ b/src/3rdparty/libjpeg/makefile.wat
@@ -37,13 +37,13 @@ SYSDEPMEM= jmemnobs.obj
# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c &
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c &
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c &
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c &
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c &
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c &
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c &
+LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c &
+ jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c &
+ jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c &
+ jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c &
+ jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c &
+ jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c &
+ jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c &
jquant2.c jutils.c jmemmgr.c
# memmgr back ends: compile only one of these into a working library
SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
@@ -53,39 +53,45 @@ APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c &
rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h &
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
+INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h &
+ jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 &
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc &
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc &
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds &
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st &
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms &
- makvms.opt
+DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 &
+ wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt &
+ coderules.txt filelist.txt change.log
+MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc &
+ makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 &
+ makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 &
+ makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 &
+ maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 &
+ makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 &
+ makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 &
+ makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st &
+ makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms &
+ makefile.vms makvms.opt
CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat &
jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas &
jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
+CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
+OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm &
+ libjpeg.map
TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg &
testimgp.jpg
DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) &
$(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
# library object files common to compression and decompression
-COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
+COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj &
- jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj &
- jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj &
+CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj &
+ jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj &
+ jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj &
jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj &
- jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj &
- jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj &
- jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj &
- jquant1.obj jquant2.obj jdmerge.obj
+DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj &
+ jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj &
+ jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj &
+ jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj &
+ jdmerge.obj
# These objectfiles are included in libjpeg.lib
LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
# object files for sample applications (excluding library files)
@@ -120,9 +126,9 @@ wrjpgcom.exe: wrjpgcom.c
.c.obj:
$(CC) $(CFLAGS) -c $<
-jconfig.h: jconfig.doc
+jconfig.h: jconfig.txt
echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
+ echo Please read the installation directions in install.txt.
exit 1
clean: .SYMBOLIC
@@ -162,36 +168,37 @@ test: cjpeg.exe djpeg.exe jpegtran.exe .SYMBOLIC
!endif
+jaricom.obj: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcarith.obj: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdarith.obj: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
@@ -202,7 +209,6 @@ jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jer
jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
diff --git a/src/3rdparty/libjpeg/makejdep.vc6 b/src/3rdparty/libjpeg/makejdep.vc6
new file mode 100644
index 0000000000..1065b2140b
--- /dev/null
+++ b/src/3rdparty/libjpeg/makejdep.vc6
@@ -0,0 +1,423 @@
+# Microsoft Developer Studio erstellte Abh„ngigkeitsdatei, einbezogen von jpeg.mak
+
+.\jaricom.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jcapimin.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jcapistd.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jcarith.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jccoefct.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jccolor.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jcdctmgr.c : \
+ ".\jconfig.h"\
+ ".\jdct.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jchuff.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jcinit.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jcmainct.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jcmarker.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jcmaster.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jcomapi.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jcparam.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jcprepct.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jcsample.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jctrans.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jdapimin.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jdapistd.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jdarith.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jdatadst.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+
+
+.\jdatasrc.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+
+
+.\jdcoefct.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jdcolor.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jddctmgr.c : \
+ ".\jconfig.h"\
+ ".\jdct.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jdhuff.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jdinput.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jdmainct.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jdmarker.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jdmaster.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jdmerge.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jdpostct.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jdsample.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jdtrans.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jerror.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+ ".\jversion.h"\
+
+
+.\jfdctflt.c : \
+ ".\jconfig.h"\
+ ".\jdct.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jfdctfst.c : \
+ ".\jconfig.h"\
+ ".\jdct.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jfdctint.c : \
+ ".\jconfig.h"\
+ ".\jdct.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jidctflt.c : \
+ ".\jconfig.h"\
+ ".\jdct.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jidctfst.c : \
+ ".\jconfig.h"\
+ ".\jdct.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jidctint.c : \
+ ".\jconfig.h"\
+ ".\jdct.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jmemmgr.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmemsys.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jmemnobs.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmemsys.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jquant1.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jquant2.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
+
+.\jutils.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+
diff --git a/src/3rdparty/libjpeg/makejdsp.vc6 b/src/3rdparty/libjpeg/makejdsp.vc6
new file mode 100644
index 0000000000..738f1ab4b7
--- /dev/null
+++ b/src/3rdparty/libjpeg/makejdsp.vc6
@@ -0,0 +1,285 @@
+# Microsoft Developer Studio Project File - Name="jpeg" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** NICHT BEARBEITEN **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=jpeg - Win32
+!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl
+!MESSAGE
+!MESSAGE NMAKE /f "jpeg.mak".
+!MESSAGE
+!MESSAGE Sie k÷nnen beim Ausfhren von NMAKE eine Konfiguration angeben
+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
+!MESSAGE
+!MESSAGE NMAKE /f "jpeg.mak" CFG="jpeg - Win32"
+!MESSAGE
+!MESSAGE Fr die Konfiguration stehen zur Auswahl:
+!MESSAGE
+!MESSAGE "jpeg - Win32" (basierend auf "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\Release"
+# PROP BASE Intermediate_Dir ".\Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\Release"
+# PROP Intermediate_Dir ".\Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
+# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD BASE RSC /l 0x407
+# ADD RSC /l 0x407
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+# Begin Target
+
+# Name "jpeg - Win32"
+# Begin Group "Quellcodedateien"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
+# Begin Source File
+
+SOURCE=.\jaricom.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcapimin.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcapistd.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcarith.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jccoefct.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jccolor.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcdctmgr.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jchuff.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcinit.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcmainct.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcmarker.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcmaster.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcomapi.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcparam.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcprepct.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcsample.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jctrans.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdapimin.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdapistd.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdarith.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdatadst.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdatasrc.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdcoefct.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdcolor.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jddctmgr.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdhuff.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdinput.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdmainct.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdmarker.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdmaster.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdmerge.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdpostct.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdsample.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdtrans.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jerror.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jfdctflt.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jfdctfst.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jfdctint.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jidctflt.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jidctfst.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jidctint.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jmemmgr.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jmemnobs.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jquant1.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jquant2.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jutils.c
+# End Source File
+# End Group
+# Begin Group "Header-Dateien"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
+# Begin Source File
+
+SOURCE=.\jconfig.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdct.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jerror.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jinclude.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jmemsys.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jmorecfg.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jpegint.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jpeglib.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jversion.h
+# End Source File
+# End Group
+# Begin Group "Ressourcendateien"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/src/3rdparty/libjpeg/makejdsw.vc6 b/src/3rdparty/libjpeg/makejdsw.vc6
new file mode 100644
index 0000000000..d11fab1d55
--- /dev/null
+++ b/src/3rdparty/libjpeg/makejdsw.vc6
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GEL™SCHT WERDEN!
+
+###############################################################################
+
+Project: "jpeg"=".\jpeg.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/src/3rdparty/libjpeg/makejmak.vc6 b/src/3rdparty/libjpeg/makejmak.vc6
new file mode 100644
index 0000000000..1107336b23
--- /dev/null
+++ b/src/3rdparty/libjpeg/makejmak.vc6
@@ -0,0 +1,425 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on jpeg.dsp
+!IF "$(CFG)" == ""
+CFG=jpeg - Win32
+!MESSAGE Keine Konfiguration angegeben. jpeg - Win32 wird als Standard verwendet.
+!ENDIF
+
+!IF "$(CFG)" != "jpeg - Win32"
+!MESSAGE Ungültige Konfiguration "$(CFG)" angegeben.
+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
+!MESSAGE
+!MESSAGE NMAKE /f "jpeg.mak" CFG="jpeg - Win32"
+!MESSAGE
+!MESSAGE Für die Konfiguration stehen zur Auswahl:
+!MESSAGE
+!MESSAGE "jpeg - Win32" (basierend auf "Win32 (x86) Static Library")
+!MESSAGE
+!ERROR Eine ungültige Konfiguration wurde angegeben.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+OUTDIR=.\Release
+INTDIR=.\Release
+# Begin Custom Macros
+OutDir=.\Release
+# End Custom Macros
+
+ALL : "$(OUTDIR)\jpeg.lib"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\jaricom.obj"
+ -@erase "$(INTDIR)\jcapimin.obj"
+ -@erase "$(INTDIR)\jcapistd.obj"
+ -@erase "$(INTDIR)\jcarith.obj"
+ -@erase "$(INTDIR)\jccoefct.obj"
+ -@erase "$(INTDIR)\jccolor.obj"
+ -@erase "$(INTDIR)\jcdctmgr.obj"
+ -@erase "$(INTDIR)\jchuff.obj"
+ -@erase "$(INTDIR)\jcinit.obj"
+ -@erase "$(INTDIR)\jcmainct.obj"
+ -@erase "$(INTDIR)\jcmarker.obj"
+ -@erase "$(INTDIR)\jcmaster.obj"
+ -@erase "$(INTDIR)\jcomapi.obj"
+ -@erase "$(INTDIR)\jcparam.obj"
+ -@erase "$(INTDIR)\jcprepct.obj"
+ -@erase "$(INTDIR)\jcsample.obj"
+ -@erase "$(INTDIR)\jctrans.obj"
+ -@erase "$(INTDIR)\jdapimin.obj"
+ -@erase "$(INTDIR)\jdapistd.obj"
+ -@erase "$(INTDIR)\jdarith.obj"
+ -@erase "$(INTDIR)\jdatadst.obj"
+ -@erase "$(INTDIR)\jdatasrc.obj"
+ -@erase "$(INTDIR)\jdcoefct.obj"
+ -@erase "$(INTDIR)\jdcolor.obj"
+ -@erase "$(INTDIR)\jddctmgr.obj"
+ -@erase "$(INTDIR)\jdhuff.obj"
+ -@erase "$(INTDIR)\jdinput.obj"
+ -@erase "$(INTDIR)\jdmainct.obj"
+ -@erase "$(INTDIR)\jdmarker.obj"
+ -@erase "$(INTDIR)\jdmaster.obj"
+ -@erase "$(INTDIR)\jdmerge.obj"
+ -@erase "$(INTDIR)\jdpostct.obj"
+ -@erase "$(INTDIR)\jdsample.obj"
+ -@erase "$(INTDIR)\jdtrans.obj"
+ -@erase "$(INTDIR)\jerror.obj"
+ -@erase "$(INTDIR)\jfdctflt.obj"
+ -@erase "$(INTDIR)\jfdctfst.obj"
+ -@erase "$(INTDIR)\jfdctint.obj"
+ -@erase "$(INTDIR)\jidctflt.obj"
+ -@erase "$(INTDIR)\jidctfst.obj"
+ -@erase "$(INTDIR)\jidctint.obj"
+ -@erase "$(INTDIR)\jmemmgr.obj"
+ -@erase "$(INTDIR)\jmemnobs.obj"
+ -@erase "$(INTDIR)\jquant1.obj"
+ -@erase "$(INTDIR)\jquant2.obj"
+ -@erase "$(INTDIR)\jutils.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(OUTDIR)\jpeg.lib"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fp"$(INTDIR)\jpeg.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\jpeg.bsc"
+BSC32_SBRS= \
+
+LIB32=link.exe -lib
+LIB32_FLAGS=/nologo /out:"$(OUTDIR)\jpeg.lib"
+LIB32_OBJS= \
+ "$(INTDIR)\jaricom.obj" \
+ "$(INTDIR)\jcapimin.obj" \
+ "$(INTDIR)\jcapistd.obj" \
+ "$(INTDIR)\jcarith.obj" \
+ "$(INTDIR)\jccoefct.obj" \
+ "$(INTDIR)\jccolor.obj" \
+ "$(INTDIR)\jcdctmgr.obj" \
+ "$(INTDIR)\jchuff.obj" \
+ "$(INTDIR)\jcinit.obj" \
+ "$(INTDIR)\jcmainct.obj" \
+ "$(INTDIR)\jcmarker.obj" \
+ "$(INTDIR)\jcmaster.obj" \
+ "$(INTDIR)\jcomapi.obj" \
+ "$(INTDIR)\jcparam.obj" \
+ "$(INTDIR)\jcprepct.obj" \
+ "$(INTDIR)\jcsample.obj" \
+ "$(INTDIR)\jctrans.obj" \
+ "$(INTDIR)\jdapimin.obj" \
+ "$(INTDIR)\jdapistd.obj" \
+ "$(INTDIR)\jdarith.obj" \
+ "$(INTDIR)\jdatadst.obj" \
+ "$(INTDIR)\jdatasrc.obj" \
+ "$(INTDIR)\jdcoefct.obj" \
+ "$(INTDIR)\jdcolor.obj" \
+ "$(INTDIR)\jddctmgr.obj" \
+ "$(INTDIR)\jdhuff.obj" \
+ "$(INTDIR)\jdinput.obj" \
+ "$(INTDIR)\jdmainct.obj" \
+ "$(INTDIR)\jdmarker.obj" \
+ "$(INTDIR)\jdmaster.obj" \
+ "$(INTDIR)\jdmerge.obj" \
+ "$(INTDIR)\jdpostct.obj" \
+ "$(INTDIR)\jdsample.obj" \
+ "$(INTDIR)\jdtrans.obj" \
+ "$(INTDIR)\jerror.obj" \
+ "$(INTDIR)\jfdctflt.obj" \
+ "$(INTDIR)\jfdctfst.obj" \
+ "$(INTDIR)\jfdctint.obj" \
+ "$(INTDIR)\jidctflt.obj" \
+ "$(INTDIR)\jidctfst.obj" \
+ "$(INTDIR)\jidctint.obj" \
+ "$(INTDIR)\jmemmgr.obj" \
+ "$(INTDIR)\jmemnobs.obj" \
+ "$(INTDIR)\jquant1.obj" \
+ "$(INTDIR)\jquant2.obj" \
+ "$(INTDIR)\jutils.obj"
+
+"$(OUTDIR)\jpeg.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
+ $(LIB32) @<<
+ $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
+<<
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("jpeg.dep")
+!INCLUDE "jpeg.dep"
+!ELSE
+!MESSAGE Warning: cannot find "jpeg.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "jpeg - Win32"
+SOURCE=.\jaricom.c
+
+"$(INTDIR)\jaricom.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jcapimin.c
+
+"$(INTDIR)\jcapimin.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jcapistd.c
+
+"$(INTDIR)\jcapistd.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jcarith.c
+
+"$(INTDIR)\jcarith.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jccoefct.c
+
+"$(INTDIR)\jccoefct.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jccolor.c
+
+"$(INTDIR)\jccolor.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jcdctmgr.c
+
+"$(INTDIR)\jcdctmgr.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jchuff.c
+
+"$(INTDIR)\jchuff.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jcinit.c
+
+"$(INTDIR)\jcinit.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jcmainct.c
+
+"$(INTDIR)\jcmainct.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jcmarker.c
+
+"$(INTDIR)\jcmarker.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jcmaster.c
+
+"$(INTDIR)\jcmaster.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jcomapi.c
+
+"$(INTDIR)\jcomapi.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jcparam.c
+
+"$(INTDIR)\jcparam.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jcprepct.c
+
+"$(INTDIR)\jcprepct.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jcsample.c
+
+"$(INTDIR)\jcsample.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jctrans.c
+
+"$(INTDIR)\jctrans.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jdapimin.c
+
+"$(INTDIR)\jdapimin.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jdapistd.c
+
+"$(INTDIR)\jdapistd.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jdarith.c
+
+"$(INTDIR)\jdarith.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jdatadst.c
+
+"$(INTDIR)\jdatadst.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jdatasrc.c
+
+"$(INTDIR)\jdatasrc.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jdcoefct.c
+
+"$(INTDIR)\jdcoefct.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jdcolor.c
+
+"$(INTDIR)\jdcolor.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jddctmgr.c
+
+"$(INTDIR)\jddctmgr.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jdhuff.c
+
+"$(INTDIR)\jdhuff.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jdinput.c
+
+"$(INTDIR)\jdinput.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jdmainct.c
+
+"$(INTDIR)\jdmainct.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jdmarker.c
+
+"$(INTDIR)\jdmarker.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jdmaster.c
+
+"$(INTDIR)\jdmaster.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jdmerge.c
+
+"$(INTDIR)\jdmerge.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jdpostct.c
+
+"$(INTDIR)\jdpostct.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jdsample.c
+
+"$(INTDIR)\jdsample.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jdtrans.c
+
+"$(INTDIR)\jdtrans.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jerror.c
+
+"$(INTDIR)\jerror.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jfdctflt.c
+
+"$(INTDIR)\jfdctflt.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jfdctfst.c
+
+"$(INTDIR)\jfdctfst.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jfdctint.c
+
+"$(INTDIR)\jfdctint.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jidctflt.c
+
+"$(INTDIR)\jidctflt.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jidctfst.c
+
+"$(INTDIR)\jidctfst.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jidctint.c
+
+"$(INTDIR)\jidctint.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jmemmgr.c
+
+"$(INTDIR)\jmemmgr.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jmemnobs.c
+
+"$(INTDIR)\jmemnobs.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jquant1.c
+
+"$(INTDIR)\jquant1.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jquant2.c
+
+"$(INTDIR)\jquant2.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jutils.c
+
+"$(INTDIR)\jutils.obj" : $(SOURCE) "$(INTDIR)"
+
+
+
+!ENDIF
+
diff --git a/src/3rdparty/libjpeg/makejsln.vc9 b/src/3rdparty/libjpeg/makejsln.vc9
new file mode 100644
index 0000000000..ddb6a30d5d
--- /dev/null
+++ b/src/3rdparty/libjpeg/makejsln.vc9
@@ -0,0 +1,17 @@
+‹¯¨
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual C++ Express 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg", "jpeg.vcproj", "{E61592E1-28F4-4AFC-9EE1-9BE833A061C1}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {E61592E1-28F4-4AFC-9EE1-9BE833A061C1}.Release|Win32.ActiveCfg = Release|Win32
+ {E61592E1-28F4-4AFC-9EE1-9BE833A061C1}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/src/3rdparty/libjpeg/makejvcp.vc9 b/src/3rdparty/libjpeg/makejvcp.vc9
new file mode 100644
index 0000000000..b08809b023
--- /dev/null
+++ b/src/3rdparty/libjpeg/makejvcp.vc9
@@ -0,0 +1,328 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="jpeg"
+ ProjectGUID="{E61592E1-28F4-4AFC-9EE1-9BE833A061C1}"
+ RootNamespace="jpeg"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ CharacterSet="0"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ EnableIntrinsicFunctions="false"
+ EnableFiberSafeOptimizations="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Quelldateien"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\jaricom.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jcapimin.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jcapistd.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jcarith.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jccoefct.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jccolor.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jcdctmgr.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jchuff.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jcinit.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jcmainct.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jcmarker.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jcmaster.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jcomapi.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jcparam.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jcprepct.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jcsample.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jctrans.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jdapimin.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jdapistd.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jdarith.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jdatadst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jdatasrc.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jdcoefct.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jdcolor.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jddctmgr.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jdhuff.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jdinput.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jdmainct.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jdmarker.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jdmaster.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jdmerge.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jdpostct.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jdsample.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jdtrans.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jerror.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jfdctflt.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jfdctfst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jfdctint.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jidctflt.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jidctfst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jidctint.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jmemmgr.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jmemnobs.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jquant1.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jquant2.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jutils.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headerdateien"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\jconfig.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jdct.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jerror.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jinclude.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jmemsys.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jmorecfg.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jpegint.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jpeglib.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jversion.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Ressourcendateien"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/3rdparty/libjpeg/makeproj.mac b/src/3rdparty/libjpeg/makeproj.mac
new file mode 100644
index 0000000000..e5b510238b
--- /dev/null
+++ b/src/3rdparty/libjpeg/makeproj.mac
@@ -0,0 +1,213 @@
+--
+-- makeproj.mac
+--
+-- This AppleScript builds Code Warrior PRO Release 2 project files for the
+-- libjpeg library as well as the test programs 'cjpeg', 'djpeg', 'jpegtran'.
+-- (We'd distribute real project files, except they're not text
+-- and would create maintenance headaches.)
+--
+-- The script then compiles and links the library and the test programs.
+-- NOTE: if you haven't already created a 'jconfig.h' file, the script
+-- automatically copies 'jconfig.mac' to 'jconfig.h'.
+--
+-- To use this script, you must have AppleScript 1.1 or later installed
+-- and a suitable AppleScript editor like Script Editor or Script Debugger
+-- (http://www.latenightsw.com). Open this file with your AppleScript
+-- editor and execute the "run" command to build the projects.
+--
+-- Thanks to Dan Sears and Don Agro for this script.
+-- Questions about this script can be addressed to dogpark@interlog.com
+--
+
+on run
+
+ choose folder with prompt ">>> Select IJG source folder <<<"
+ set ijg_folder to result
+
+ choose folder with prompt ">>> Select MetroWerks folder <<<"
+ set cw_folder to result
+
+ -- if jconfig.h doesn't already exist, copy jconfig.mac
+
+ tell application "Finder"
+ if not (exists file "jconfig.h" of ijg_folder) then
+ duplicate {file "jconfig.mac" of folder ijg_folder}
+ select file "jconfig.mac copy" of folder ijg_folder
+ set name of selection to "jconfig.h"
+ end if
+ end tell
+
+ tell application "CodeWarrior IDE 2.1"
+ with timeout of 10000 seconds
+
+ -- create libjpeg project
+
+ activate
+ Create Project (ijg_folder as string) & "libjpeg.proj"
+ Set Preferences of panel "Target Settings" to {Target Name:"libjpeg"}
+ Set Preferences of panel "PPC Project" to {File Name:"libjpeg"}
+ Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"}
+ Set Preferences of panel "PPC Project" to {Project Type:library}
+ Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true}
+ Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true}
+ Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC}
+ Set Preferences of panel "PPC Linker" to {Generate SYM File:false}
+
+ Add Files (ijg_folder as string) & "jaricom.c" To Segment 1
+ Add Files (ijg_folder as string) & "jcapimin.c" To Segment 1
+ Add Files (ijg_folder as string) & "jcapistd.c" To Segment 1
+ Add Files (ijg_folder as string) & "jcarith.c" To Segment 1
+ Add Files (ijg_folder as string) & "jctrans.c" To Segment 1
+ Add Files (ijg_folder as string) & "jcparam.c" To Segment 1
+ Add Files (ijg_folder as string) & "jdatadst.c" To Segment 1
+ Add Files (ijg_folder as string) & "jcinit.c" To Segment 1
+ Add Files (ijg_folder as string) & "jcmaster.c" To Segment 1
+ Add Files (ijg_folder as string) & "jcmarker.c" To Segment 1
+ Add Files (ijg_folder as string) & "jcmainct.c" To Segment 1
+ Add Files (ijg_folder as string) & "jcprepct.c" To Segment 1
+ Add Files (ijg_folder as string) & "jccoefct.c" To Segment 1
+ Add Files (ijg_folder as string) & "jccolor.c" To Segment 1
+ Add Files (ijg_folder as string) & "jcsample.c" To Segment 1
+ Add Files (ijg_folder as string) & "jchuff.c" To Segment 1
+ Add Files (ijg_folder as string) & "jcdctmgr.c" To Segment 1
+ Add Files (ijg_folder as string) & "jfdctfst.c" To Segment 1
+ Add Files (ijg_folder as string) & "jfdctflt.c" To Segment 1
+ Add Files (ijg_folder as string) & "jfdctint.c" To Segment 1
+ Add Files (ijg_folder as string) & "jdapimin.c" To Segment 1
+ Add Files (ijg_folder as string) & "jdapistd.c" To Segment 1
+ Add Files (ijg_folder as string) & "jdarith.c" To Segment 1
+ Add Files (ijg_folder as string) & "jdtrans.c" To Segment 1
+ Add Files (ijg_folder as string) & "jdatasrc.c" To Segment 1
+ Add Files (ijg_folder as string) & "jdmaster.c" To Segment 1
+ Add Files (ijg_folder as string) & "jdinput.c" To Segment 1
+ Add Files (ijg_folder as string) & "jdmarker.c" To Segment 1
+ Add Files (ijg_folder as string) & "jdhuff.c" To Segment 1
+ Add Files (ijg_folder as string) & "jdmainct.c" To Segment 1
+ Add Files (ijg_folder as string) & "jdcoefct.c" To Segment 1
+ Add Files (ijg_folder as string) & "jdpostct.c" To Segment 1
+ Add Files (ijg_folder as string) & "jddctmgr.c" To Segment 1
+ Add Files (ijg_folder as string) & "jidctfst.c" To Segment 1
+ Add Files (ijg_folder as string) & "jidctflt.c" To Segment 1
+ Add Files (ijg_folder as string) & "jidctint.c" To Segment 1
+ Add Files (ijg_folder as string) & "jdsample.c" To Segment 1
+ Add Files (ijg_folder as string) & "jdcolor.c" To Segment 1
+ Add Files (ijg_folder as string) & "jquant1.c" To Segment 1
+ Add Files (ijg_folder as string) & "jquant2.c" To Segment 1
+ Add Files (ijg_folder as string) & "jdmerge.c" To Segment 1
+ Add Files (ijg_folder as string) & "jcomapi.c" To Segment 1
+ Add Files (ijg_folder as string) & "jutils.c" To Segment 1
+ Add Files (ijg_folder as string) & "jerror.c" To Segment 1
+ Add Files (ijg_folder as string) & "jmemmgr.c" To Segment 1
+ Add Files (ijg_folder as string) & "jmemmac.c" To Segment 1
+
+ -- compile and link the library
+
+ Make Project
+ Close Project
+
+ -- create cjpeg project
+
+ activate
+ Create Project (ijg_folder as string) & "cjpeg.proj"
+ Set Preferences of panel "Target Settings" to {Target Name:"cjpeg"}
+ Set Preferences of panel "PPC Project" to {File Name:"cjpeg"}
+ Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"}
+ Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true}
+ Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true}
+ Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC}
+ Set Preferences of panel "PPC Linker" to {Generate SYM File:false}
+
+ Add Files (ijg_folder as string) & "cjpeg.c" To Segment 1
+ Add Files (ijg_folder as string) & "rdppm.c" To Segment 1
+ Add Files (ijg_folder as string) & "rdgif.c" To Segment 1
+ Add Files (ijg_folder as string) & "rdtarga.c" To Segment 1
+ Add Files (ijg_folder as string) & "rdrle.c" To Segment 1
+ Add Files (ijg_folder as string) & "rdbmp.c" To Segment 1
+ Add Files (ijg_folder as string) & "rdswitch.c" To Segment 1
+ Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1
+
+ Add Files (ijg_folder as string) & "libjpeg" To Segment 2
+
+ Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3
+ Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3
+ Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3
+
+ Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4
+ Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4
+
+ -- compile and link cjpeg
+
+ Make Project
+ Close Project
+
+ -- create djpeg project
+
+ activate
+ Create Project (ijg_folder as string) & "djpeg.proj"
+ Set Preferences of panel "Target Settings" to {Target Name:"djpeg"}
+ Set Preferences of panel "PPC Project" to {File Name:"djpeg"}
+ Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"}
+ Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true}
+ Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true}
+ Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC}
+ Set Preferences of panel "PPC Linker" to {Generate SYM File:false}
+
+ Add Files (ijg_folder as string) & "djpeg.c" To Segment 1
+ Add Files (ijg_folder as string) & "wrppm.c" To Segment 1
+ Add Files (ijg_folder as string) & "wrgif.c" To Segment 1
+ Add Files (ijg_folder as string) & "wrtarga.c" To Segment 1
+ Add Files (ijg_folder as string) & "wrrle.c" To Segment 1
+ Add Files (ijg_folder as string) & "wrbmp.c" To Segment 1
+ Add Files (ijg_folder as string) & "rdcolmap.c" To Segment 1
+ Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1
+
+ Add Files (ijg_folder as string) & "libjpeg" To Segment 2
+
+ Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3
+ Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3
+ Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3
+
+ Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4
+ Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4
+
+ -- compile and link djpeg
+
+ Make Project
+ Close Project
+
+ -- create jpegtran project
+
+ activate
+ Create Project (ijg_folder as string) & "jpegtran.proj"
+ Set Preferences of panel "Target Settings" to {Target Name:"jpegtran"}
+ Set Preferences of panel "PPC Project" to {File Name:"jpegtran"}
+ Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"}
+ Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true}
+ Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true}
+ Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC}
+ Set Preferences of panel "PPC Linker" to {Generate SYM File:false}
+
+ Add Files (ijg_folder as string) & "jpegtran.c" To Segment 1
+ Add Files (ijg_folder as string) & "rdswitch.c" To Segment 1
+ Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1
+ Add Files (ijg_folder as string) & "transupp.c" To Segment 1
+
+ Add Files (ijg_folder as string) & "libjpeg" To Segment 2
+
+ Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3
+ Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3
+ Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3
+
+ Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4
+ Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4
+
+ -- compile and link jpegtran
+
+ Make Project
+ Close Project
+
+ quit
+
+ end timeout
+ end tell
+end run
diff --git a/src/3rdparty/libjpeg/makerdep.vc6 b/src/3rdparty/libjpeg/makerdep.vc6
new file mode 100644
index 0000000000..94748d011a
--- /dev/null
+++ b/src/3rdparty/libjpeg/makerdep.vc6
@@ -0,0 +1,6 @@
+# Microsoft Developer Studio erstellte Abh„ngigkeitsdatei, einbezogen von rdjpgcom.mak
+
+.\rdjpgcom.c : \
+ ".\jconfig.h"\
+ ".\jinclude.h"\
+
diff --git a/src/3rdparty/libjpeg/makerdsp.vc6 b/src/3rdparty/libjpeg/makerdsp.vc6
new file mode 100644
index 0000000000..60de09af10
--- /dev/null
+++ b/src/3rdparty/libjpeg/makerdsp.vc6
@@ -0,0 +1,78 @@
+# Microsoft Developer Studio Project File - Name="rdjpgcom" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** NICHT BEARBEITEN **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=rdjpgcom - Win32
+!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl
+!MESSAGE
+!MESSAGE NMAKE /f "rdjpgcom.mak".
+!MESSAGE
+!MESSAGE Sie k÷nnen beim Ausfhren von NMAKE eine Konfiguration angeben
+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
+!MESSAGE
+!MESSAGE NMAKE /f "rdjpgcom.mak" CFG="rdjpgcom - Win32"
+!MESSAGE
+!MESSAGE Fr die Konfiguration stehen zur Auswahl:
+!MESSAGE
+!MESSAGE "rdjpgcom - Win32" (basierend auf "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\rdjpgcom\Release"
+# PROP BASE Intermediate_Dir ".\rdjpgcom\Release"
+# PROP BASE Target_Dir ".\rdjpgcom"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\rdjpgcom\Release"
+# PROP Intermediate_Dir ".\rdjpgcom\Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ".\rdjpgcom"
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# Begin Target
+
+# Name "rdjpgcom - Win32"
+# Begin Group "Quellcodedateien"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
+# Begin Source File
+
+SOURCE=.\rdjpgcom.c
+# End Source File
+# End Group
+# Begin Group "Header-Dateien"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
+# Begin Source File
+
+SOURCE=.\jconfig.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jinclude.h
+# End Source File
+# End Group
+# Begin Group "Ressourcendateien"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/src/3rdparty/libjpeg/makermak.vc6 b/src/3rdparty/libjpeg/makermak.vc6
new file mode 100644
index 0000000000..6d2d4c738f
--- /dev/null
+++ b/src/3rdparty/libjpeg/makermak.vc6
@@ -0,0 +1,110 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on rdjpgcom.dsp
+!IF "$(CFG)" == ""
+CFG=rdjpgcom - Win32
+!MESSAGE Keine Konfiguration angegeben. rdjpgcom - Win32 wird als Standard verwendet.
+!ENDIF
+
+!IF "$(CFG)" != "rdjpgcom - Win32"
+!MESSAGE Ungültige Konfiguration "$(CFG)" angegeben.
+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
+!MESSAGE
+!MESSAGE NMAKE /f "rdjpgcom.mak" CFG="rdjpgcom - Win32"
+!MESSAGE
+!MESSAGE Für die Konfiguration stehen zur Auswahl:
+!MESSAGE
+!MESSAGE "rdjpgcom - Win32" (basierend auf "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR Eine ungültige Konfiguration wurde angegeben.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+CPP=cl.exe
+RSC=rc.exe
+OUTDIR=.\rdjpgcom\Release
+INTDIR=.\rdjpgcom\Release
+# Begin Custom Macros
+OutDir=.\rdjpgcom\Release
+# End Custom Macros
+
+ALL : "$(OUTDIR)\rdjpgcom.exe"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\rdjpgcom.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(OUTDIR)\rdjpgcom.exe"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\rdjpgcom.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\rdjpgcom.pdb" /machine:I386 /out:"$(OUTDIR)\rdjpgcom.exe"
+LINK32_OBJS= \
+ "$(INTDIR)\rdjpgcom.obj"
+
+"$(OUTDIR)\rdjpgcom.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+CPP_PROJ=/nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /Fp"$(INTDIR)\rdjpgcom.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("rdjpgcom.dep")
+!INCLUDE "rdjpgcom.dep"
+!ELSE
+!MESSAGE Warning: cannot find "rdjpgcom.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "rdjpgcom - Win32"
+SOURCE=.\rdjpgcom.c
+
+"$(INTDIR)\rdjpgcom.obj" : $(SOURCE) "$(INTDIR)"
+
+
+
+!ENDIF
+
diff --git a/src/3rdparty/libjpeg/makervcp.vc9 b/src/3rdparty/libjpeg/makervcp.vc9
new file mode 100644
index 0000000000..2f73ffcd16
--- /dev/null
+++ b/src/3rdparty/libjpeg/makervcp.vc9
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="rdjpgcom"
+ ProjectGUID="{EB107F86-A8CC-4507-8115-88D31DDE4CDF}"
+ RootNamespace="rdjpgcom"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ProjectName)\$(ConfigurationName)"
+ IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="0"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ EnableIntrinsicFunctions="false"
+ EnableFiberSafeOptimizations="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Quelldateien"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\rdjpgcom.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headerdateien"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\jconfig.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jinclude.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Ressourcendateien"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/3rdparty/libjpeg/maketdep.vc6 b/src/3rdparty/libjpeg/maketdep.vc6
new file mode 100644
index 0000000000..e177ecbf6f
--- /dev/null
+++ b/src/3rdparty/libjpeg/maketdep.vc6
@@ -0,0 +1,43 @@
+# Microsoft Developer Studio erstellte Abh„ngigkeitsdatei, einbezogen von jpegtran.mak
+
+.\cdjpeg.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+
+
+.\jpegtran.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+ ".\jversion.h"\
+ ".\transupp.h"\
+
+
+.\rdswitch.c : \
+ ".\cderror.h"\
+ ".\cdjpeg.h"\
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpeglib.h"\
+
+
+.\transupp.c : \
+ ".\jconfig.h"\
+ ".\jerror.h"\
+ ".\jinclude.h"\
+ ".\jmorecfg.h"\
+ ".\jpegint.h"\
+ ".\jpeglib.h"\
+ ".\transupp.h"\
+
diff --git a/src/3rdparty/libjpeg/maketdsp.vc6 b/src/3rdparty/libjpeg/maketdsp.vc6
new file mode 100644
index 0000000000..fe1ae9a3cb
--- /dev/null
+++ b/src/3rdparty/libjpeg/maketdsp.vc6
@@ -0,0 +1,122 @@
+# Microsoft Developer Studio Project File - Name="jpegtran" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** NICHT BEARBEITEN **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=jpegtran - Win32
+!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl
+!MESSAGE
+!MESSAGE NMAKE /f "jpegtran.mak".
+!MESSAGE
+!MESSAGE Sie k÷nnen beim Ausfhren von NMAKE eine Konfiguration angeben
+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
+!MESSAGE
+!MESSAGE NMAKE /f "jpegtran.mak" CFG="jpegtran - Win32"
+!MESSAGE
+!MESSAGE Fr die Konfiguration stehen zur Auswahl:
+!MESSAGE
+!MESSAGE "jpegtran - Win32" (basierend auf "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\jpegtran\Release"
+# PROP BASE Intermediate_Dir ".\jpegtran\Release"
+# PROP BASE Target_Dir ".\jpegtran"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\jpegtran\Release"
+# PROP Intermediate_Dir ".\jpegtran\Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ".\jpegtran"
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# Begin Target
+
+# Name "jpegtran - Win32"
+# Begin Group "Quellcodedateien"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
+# Begin Source File
+
+SOURCE=.\cdjpeg.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jpegtran.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\rdswitch.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\transupp.c
+# End Source File
+# End Group
+# Begin Group "Header-Dateien"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
+# Begin Source File
+
+SOURCE=.\cderror.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\cdjpeg.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jconfig.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jerror.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jinclude.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jmorecfg.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jpegint.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jpeglib.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jversion.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\transupp.h
+# End Source File
+# End Group
+# Begin Group "Ressourcendateien"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/src/3rdparty/libjpeg/maketmak.vc6 b/src/3rdparty/libjpeg/maketmak.vc6
new file mode 100644
index 0000000000..a0de38c06d
--- /dev/null
+++ b/src/3rdparty/libjpeg/maketmak.vc6
@@ -0,0 +1,131 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on jpegtran.dsp
+!IF "$(CFG)" == ""
+CFG=jpegtran - Win32
+!MESSAGE Keine Konfiguration angegeben. jpegtran - Win32 wird als Standard verwendet.
+!ENDIF
+
+!IF "$(CFG)" != "jpegtran - Win32"
+!MESSAGE Ungültige Konfiguration "$(CFG)" angegeben.
+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
+!MESSAGE
+!MESSAGE NMAKE /f "jpegtran.mak" CFG="jpegtran - Win32"
+!MESSAGE
+!MESSAGE Für die Konfiguration stehen zur Auswahl:
+!MESSAGE
+!MESSAGE "jpegtran - Win32" (basierend auf "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR Eine ungültige Konfiguration wurde angegeben.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+CPP=cl.exe
+RSC=rc.exe
+OUTDIR=.\jpegtran\Release
+INTDIR=.\jpegtran\Release
+# Begin Custom Macros
+OutDir=.\jpegtran\Release
+# End Custom Macros
+
+ALL : "$(OUTDIR)\jpegtran.exe"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\cdjpeg.obj"
+ -@erase "$(INTDIR)\jpegtran.obj"
+ -@erase "$(INTDIR)\rdswitch.obj"
+ -@erase "$(INTDIR)\transupp.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(OUTDIR)\jpegtran.exe"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\jpegtran.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\jpegtran.pdb" /machine:I386 /out:"$(OUTDIR)\jpegtran.exe"
+LINK32_OBJS= \
+ "$(INTDIR)\cdjpeg.obj" \
+ "$(INTDIR)\jpegtran.obj" \
+ "$(INTDIR)\rdswitch.obj" \
+ "$(INTDIR)\transupp.obj"
+
+"$(OUTDIR)\jpegtran.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+CPP_PROJ=/nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /Fp"$(INTDIR)\jpegtran.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("jpegtran.dep")
+!INCLUDE "jpegtran.dep"
+!ELSE
+!MESSAGE Warning: cannot find "jpegtran.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "jpegtran - Win32"
+SOURCE=.\cdjpeg.c
+
+"$(INTDIR)\cdjpeg.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\jpegtran.c
+
+"$(INTDIR)\jpegtran.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\rdswitch.c
+
+"$(INTDIR)\rdswitch.obj" : $(SOURCE) "$(INTDIR)"
+
+
+SOURCE=.\transupp.c
+
+"$(INTDIR)\transupp.obj" : $(SOURCE) "$(INTDIR)"
+
+
+
+!ENDIF
+
diff --git a/src/3rdparty/libjpeg/maketvcp.vc9 b/src/3rdparty/libjpeg/maketvcp.vc9
new file mode 100644
index 0000000000..af0348ddef
--- /dev/null
+++ b/src/3rdparty/libjpeg/maketvcp.vc9
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="jpegtran"
+ ProjectGUID="{813C33AF-9031-49D2-BA19-93D600CDD404}"
+ RootNamespace="jpegtran"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ProjectName)\$(ConfigurationName)"
+ IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="0"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ EnableIntrinsicFunctions="false"
+ EnableFiberSafeOptimizations="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Release\jpeg.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Quelldateien"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\cdjpeg.c"
+ >
+ </File>
+ <File
+ RelativePath=".\jpegtran.c"
+ >
+ </File>
+ <File
+ RelativePath=".\rdswitch.c"
+ >
+ </File>
+ <File
+ RelativePath=".\transupp.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headerdateien"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\cderror.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cdjpeg.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jconfig.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jerror.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jinclude.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jmorecfg.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jpegint.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jpeglib.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jversion.h"
+ >
+ </File>
+ <File
+ RelativePath=".\transupp.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Ressourcendateien"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/3rdparty/libjpeg/makewdep.vc6 b/src/3rdparty/libjpeg/makewdep.vc6
new file mode 100644
index 0000000000..15929bfe47
--- /dev/null
+++ b/src/3rdparty/libjpeg/makewdep.vc6
@@ -0,0 +1,6 @@
+# Microsoft Developer Studio erstellte Abh„ngigkeitsdatei, einbezogen von wrjpgcom.mak
+
+.\wrjpgcom.c : \
+ ".\jconfig.h"\
+ ".\jinclude.h"\
+
diff --git a/src/3rdparty/libjpeg/makewdsp.vc6 b/src/3rdparty/libjpeg/makewdsp.vc6
new file mode 100644
index 0000000000..2063b1a5cf
--- /dev/null
+++ b/src/3rdparty/libjpeg/makewdsp.vc6
@@ -0,0 +1,78 @@
+# Microsoft Developer Studio Project File - Name="wrjpgcom" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** NICHT BEARBEITEN **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=wrjpgcom - Win32
+!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl
+!MESSAGE
+!MESSAGE NMAKE /f "wrjpgcom.mak".
+!MESSAGE
+!MESSAGE Sie k÷nnen beim Ausfhren von NMAKE eine Konfiguration angeben
+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
+!MESSAGE
+!MESSAGE NMAKE /f "wrjpgcom.mak" CFG="wrjpgcom - Win32"
+!MESSAGE
+!MESSAGE Fr die Konfiguration stehen zur Auswahl:
+!MESSAGE
+!MESSAGE "wrjpgcom - Win32" (basierend auf "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\wrjpgcom\Release"
+# PROP BASE Intermediate_Dir ".\wrjpgcom\Release"
+# PROP BASE Target_Dir ".\wrjpgcom"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\wrjpgcom\Release"
+# PROP Intermediate_Dir ".\wrjpgcom\Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ".\wrjpgcom"
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# Begin Target
+
+# Name "wrjpgcom - Win32"
+# Begin Group "Quellcodedateien"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
+# Begin Source File
+
+SOURCE=.\wrjpgcom.c
+# End Source File
+# End Group
+# Begin Group "Header-Dateien"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
+# Begin Source File
+
+SOURCE=.\jconfig.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jinclude.h
+# End Source File
+# End Group
+# Begin Group "Ressourcendateien"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/src/3rdparty/libjpeg/makewmak.vc6 b/src/3rdparty/libjpeg/makewmak.vc6
new file mode 100644
index 0000000000..22b9086275
--- /dev/null
+++ b/src/3rdparty/libjpeg/makewmak.vc6
@@ -0,0 +1,110 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on wrjpgcom.dsp
+!IF "$(CFG)" == ""
+CFG=wrjpgcom - Win32
+!MESSAGE Keine Konfiguration angegeben. wrjpgcom - Win32 wird als Standard verwendet.
+!ENDIF
+
+!IF "$(CFG)" != "wrjpgcom - Win32"
+!MESSAGE Ungültige Konfiguration "$(CFG)" angegeben.
+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
+!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
+!MESSAGE
+!MESSAGE NMAKE /f "wrjpgcom.mak" CFG="wrjpgcom - Win32"
+!MESSAGE
+!MESSAGE Für die Konfiguration stehen zur Auswahl:
+!MESSAGE
+!MESSAGE "wrjpgcom - Win32" (basierend auf "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR Eine ungültige Konfiguration wurde angegeben.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+CPP=cl.exe
+RSC=rc.exe
+OUTDIR=.\wrjpgcom\Release
+INTDIR=.\wrjpgcom\Release
+# Begin Custom Macros
+OutDir=.\wrjpgcom\Release
+# End Custom Macros
+
+ALL : "$(OUTDIR)\wrjpgcom.exe"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\wrjpgcom.obj"
+ -@erase "$(OUTDIR)\wrjpgcom.exe"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\wrjpgcom.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\wrjpgcom.pdb" /machine:I386 /out:"$(OUTDIR)\wrjpgcom.exe"
+LINK32_OBJS= \
+ "$(INTDIR)\wrjpgcom.obj"
+
+"$(OUTDIR)\wrjpgcom.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+CPP_PROJ=/nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /Fp"$(INTDIR)\wrjpgcom.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("wrjpgcom.dep")
+!INCLUDE "wrjpgcom.dep"
+!ELSE
+!MESSAGE Warning: cannot find "wrjpgcom.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "wrjpgcom - Win32"
+SOURCE=.\wrjpgcom.c
+
+"$(INTDIR)\wrjpgcom.obj" : $(SOURCE) "$(INTDIR)"
+
+
+
+!ENDIF
+
diff --git a/src/3rdparty/libjpeg/makewvcp.vc9 b/src/3rdparty/libjpeg/makewvcp.vc9
new file mode 100644
index 0000000000..196de0cc42
--- /dev/null
+++ b/src/3rdparty/libjpeg/makewvcp.vc9
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="wrjpgcom"
+ ProjectGUID="{178670D7-FA7F-44A8-96C7-11B1CA14269C}"
+ RootNamespace="wrjpgcom"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ProjectName)\$(ConfigurationName)"
+ IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="0"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ EnableIntrinsicFunctions="false"
+ EnableFiberSafeOptimizations="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Quelldateien"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\wrjpgcom.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headerdateien"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\jconfig.h"
+ >
+ </File>
+ <File
+ RelativePath=".\jinclude.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Ressourcendateien"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/3rdparty/libjpeg/makljpeg.st b/src/3rdparty/libjpeg/makljpeg.st
new file mode 100644
index 0000000000..cc1ba015f7
--- /dev/null
+++ b/src/3rdparty/libjpeg/makljpeg.st
@@ -0,0 +1,68 @@
+; Project file for Independent JPEG Group's software
+;
+; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C.
+; Thanks to Frank Moehle, B. Setzepfandt, and Guido Vollbeding.
+;
+; To use this file, rename it to libjpeg.prj.
+; Read installation instructions before trying to make the program!
+;
+;
+; * * * Output file * * *
+libjpeg.lib
+;
+; * * * COMPILER OPTIONS * * *
+.C[-P] ; absolute calls
+.C[-M] ; and no string merging, folks
+.C[-w-cln] ; no "constant is long" warnings
+.C[-w-par] ; no "parameter xxxx unused"
+.C[-w-rch] ; no "unreachable code"
+.C[-wsig] ; warn if significant digits may be lost
+.L[-J] ; link new Obj-format (so we get a library)
+=
+; * * * * List of modules * * * *
+jaricom.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jcapimin.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jcapistd.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jcarith.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jccoefct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jccolor.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jcdctmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
+jchuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jcinit.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jcmainct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jcmarker.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jcmaster.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jcomapi.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jcparam.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jcprepct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jcsample.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jctrans.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jdapimin.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jdapistd.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jdarith.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jdatadst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h)
+jdatasrc.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h)
+jdcoefct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jdcolor.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jddctmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
+jdhuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jdinput.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jdmainct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jdmarker.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jdmaster.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jdmerge.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jdpostct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jdsample.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jdtrans.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jerror.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jversion.h,jerror.h)
+jfdctflt.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
+jfdctfst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
+jfdctint.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
+jidctflt.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
+jidctfst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
+jidctint.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
+jquant1.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jquant2.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jutils.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
+jmemmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jmemsys.h)
+jmemansi.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jmemsys.h)
diff --git a/src/3rdparty/libjpeg/maktjpeg.st b/src/3rdparty/libjpeg/maktjpeg.st
new file mode 100644
index 0000000000..43f078a950
--- /dev/null
+++ b/src/3rdparty/libjpeg/maktjpeg.st
@@ -0,0 +1,30 @@
+; Project file for Independent JPEG Group's software
+;
+; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C.
+; Thanks to Frank Moehle, B. Setzepfandt, and Guido Vollbeding.
+;
+; To use this file, rename it to jpegtran.prj.
+; If you are using Turbo C, change filenames beginning with "pc..." to "tc..."
+; Read installation instructions before trying to make the program!
+;
+;
+; * * * Output file * * *
+jpegtran.ttp
+;
+; * * * COMPILER OPTIONS * * *
+.C[-P] ; absolute calls
+.C[-M] ; and no string merging, folks
+.C[-w-cln] ; no "constant is long" warnings
+.C[-w-par] ; no "parameter xxxx unused"
+.C[-w-rch] ; no "unreachable code"
+.C[-wsig] ; warn if significant digits may be lost
+=
+; * * * * List of modules * * * *
+pcstart.o
+jpegtran.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,transupp.h,jversion.h)
+cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
+rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
+transupp.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,transupp.h)
+libjpeg.lib ; built by libjpeg.prj
+pcstdlib.lib ; standard library
+pcextlib.lib ; extended library
diff --git a/src/3rdparty/libjpeg/makvms.opt b/src/3rdparty/libjpeg/makvms.opt
new file mode 100644
index 0000000000..675e8fe98a
--- /dev/null
+++ b/src/3rdparty/libjpeg/makvms.opt
@@ -0,0 +1,4 @@
+! A pointer to the VAX/VMS C Run-Time Shareable Library.
+! This file is needed by makefile.mms and makefile.vms,
+! but only for the older VAX C compiler. DEC C does not need it.
+Sys$Library:VAXCRTL.EXE /Share
diff --git a/src/3rdparty/libjpeg/rdjpgcom.1 b/src/3rdparty/libjpeg/rdjpgcom.1
new file mode 100644
index 0000000000..97611df813
--- /dev/null
+++ b/src/3rdparty/libjpeg/rdjpgcom.1
@@ -0,0 +1,63 @@
+.TH RDJPGCOM 1 "02 April 2009"
+.SH NAME
+rdjpgcom \- display text comments from a JPEG file
+.SH SYNOPSIS
+.B rdjpgcom
+[
+.B \-raw
+]
+[
+.B \-verbose
+]
+[
+.I filename
+]
+.LP
+.SH DESCRIPTION
+.LP
+.B rdjpgcom
+reads the named JPEG/JFIF file, or the standard input if no file is named,
+and prints any text comments found in the file on the standard output.
+.PP
+The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file.
+Although the standard doesn't actually define what COM blocks are for, they
+are widely used to hold user-supplied text strings. This lets you add
+annotations, titles, index terms, etc to your JPEG files, and later retrieve
+them as text. COM blocks do not interfere with the image stored in the JPEG
+file. The maximum size of a COM block is 64K, but you can have as many of
+them as you like in one JPEG file.
+.SH OPTIONS
+.TP
+.B \-raw
+Normally
+.B rdjpgcom
+escapes non-printable characters in comments, for security reasons.
+This option avoids that.
+.PP
+.B \-verbose
+Causes
+.B rdjpgcom
+to also display the JPEG image dimensions.
+.PP
+Switch names may be abbreviated, and are not case sensitive.
+.SH HINTS
+.B rdjpgcom
+does not depend on the IJG JPEG library. Its source code is intended as an
+illustration of the minimum amount of code required to parse a JPEG file
+header correctly.
+.PP
+In
+.B \-verbose
+mode,
+.B rdjpgcom
+will also attempt to print the contents of any "APP12" markers as text.
+Some digital cameras produce APP12 markers containing useful textual
+information. If you like, you can modify the source code to print
+other APPn marker types as well.
+.SH SEE ALSO
+.BR cjpeg (1),
+.BR djpeg (1),
+.BR jpegtran (1),
+.BR wrjpgcom (1)
+.SH AUTHOR
+Independent JPEG Group
diff --git a/src/3rdparty/libjpeg/structure.doc b/src/3rdparty/libjpeg/structure.doc
deleted file mode 100644
index 51c9def7e5..0000000000
--- a/src/3rdparty/libjpeg/structure.doc
+++ /dev/null
@@ -1,948 +0,0 @@
-IJG JPEG LIBRARY: SYSTEM ARCHITECTURE
-
-Copyright (C) 1991-1995, Thomas G. Lane.
-This file is part of the Independent JPEG Group's software.
-For conditions of distribution and use, see the accompanying README file.
-
-
-This file provides an overview of the architecture of the IJG JPEG software;
-that is, the functions of the various modules in the system and the interfaces
-between modules. For more precise details about any data structure or calling
-convention, see the include files and comments in the source code.
-
-We assume that the reader is already somewhat familiar with the JPEG standard.
-The README file includes references for learning about JPEG. The file
-libjpeg.doc describes the library from the viewpoint of an application
-programmer using the library; it's best to read that file before this one.
-Also, the file coderules.doc describes the coding style conventions we use.
-
-In this document, JPEG-specific terminology follows the JPEG standard:
- A "component" means a color channel, e.g., Red or Luminance.
- A "sample" is a single component value (i.e., one number in the image data).
- A "coefficient" is a frequency coefficient (a DCT transform output number).
- A "block" is an 8x8 group of samples or coefficients.
- An "MCU" (minimum coded unit) is an interleaved set of blocks of size
- determined by the sampling factors, or a single block in a
- noninterleaved scan.
-We do not use the terms "pixel" and "sample" interchangeably. When we say
-pixel, we mean an element of the full-size image, while a sample is an element
-of the downsampled image. Thus the number of samples may vary across
-components while the number of pixels does not. (This terminology is not used
-rigorously throughout the code, but it is used in places where confusion would
-otherwise result.)
-
-
-*** System features ***
-
-The IJG distribution contains two parts:
- * A subroutine library for JPEG compression and decompression.
- * cjpeg/djpeg, two sample applications that use the library to transform
- JFIF JPEG files to and from several other image formats.
-cjpeg/djpeg are of no great intellectual complexity: they merely add a simple
-command-line user interface and I/O routines for several uncompressed image
-formats. This document concentrates on the library itself.
-
-We desire the library to be capable of supporting all JPEG baseline, extended
-sequential, and progressive DCT processes. Hierarchical processes are not
-supported.
-
-The library does not support the lossless (spatial) JPEG process. Lossless
-JPEG shares little or no code with lossy JPEG, and would normally be used
-without the extensive pre- and post-processing provided by this library.
-We feel that lossless JPEG is better handled by a separate library.
-
-Within these limits, any set of compression parameters allowed by the JPEG
-spec should be readable for decompression. (We can be more restrictive about
-what formats we can generate.) Although the system design allows for all
-parameter values, some uncommon settings are not yet implemented and may
-never be; nonintegral sampling ratios are the prime example. Furthermore,
-we treat 8-bit vs. 12-bit data precision as a compile-time switch, not a
-run-time option, because most machines can store 8-bit pixels much more
-compactly than 12-bit.
-
-For legal reasons, JPEG arithmetic coding is not currently supported, but
-extending the library to include it would be straightforward.
-
-By itself, the library handles only interchange JPEG datastreams --- in
-particular the widely used JFIF file format. The library can be used by
-surrounding code to process interchange or abbreviated JPEG datastreams that
-are embedded in more complex file formats. (For example, libtiff uses this
-library to implement JPEG compression within the TIFF file format.)
-
-The library includes a substantial amount of code that is not covered by the
-JPEG standard but is necessary for typical applications of JPEG. These
-functions preprocess the image before JPEG compression or postprocess it after
-decompression. They include colorspace conversion, downsampling/upsampling,
-and color quantization. This code can be omitted if not needed.
-
-A wide range of quality vs. speed tradeoffs are possible in JPEG processing,
-and even more so in decompression postprocessing. The decompression library
-provides multiple implementations that cover most of the useful tradeoffs,
-ranging from very-high-quality down to fast-preview operation. On the
-compression side we have generally not provided low-quality choices, since
-compression is normally less time-critical. It should be understood that the
-low-quality modes may not meet the JPEG standard's accuracy requirements;
-nonetheless, they are useful for viewers.
-
-
-*** Portability issues ***
-
-Portability is an essential requirement for the library. The key portability
-issues that show up at the level of system architecture are:
-
-1. Memory usage. We want the code to be able to run on PC-class machines
-with limited memory. Images should therefore be processed sequentially (in
-strips), to avoid holding the whole image in memory at once. Where a
-full-image buffer is necessary, we should be able to use either virtual memory
-or temporary files.
-
-2. Near/far pointer distinction. To run efficiently on 80x86 machines, the
-code should distinguish "small" objects (kept in near data space) from
-"large" ones (kept in far data space). This is an annoying restriction, but
-fortunately it does not impact code quality for less brain-damaged machines,
-and the source code clutter turns out to be minimal with sufficient use of
-pointer typedefs.
-
-3. Data precision. We assume that "char" is at least 8 bits, "short" and
-"int" at least 16, "long" at least 32. The code will work fine with larger
-data sizes, although memory may be used inefficiently in some cases. However,
-the JPEG compressed datastream must ultimately appear on external storage as a
-sequence of 8-bit bytes if it is to conform to the standard. This may pose a
-problem on machines where char is wider than 8 bits. The library represents
-compressed data as an array of values of typedef JOCTET. If no data type
-exactly 8 bits wide is available, custom data source and data destination
-modules must be written to unpack and pack the chosen JOCTET datatype into
-8-bit external representation.
-
-
-*** System overview ***
-
-The compressor and decompressor are each divided into two main sections:
-the JPEG compressor or decompressor proper, and the preprocessing or
-postprocessing functions. The interface between these two sections is the
-image data that the official JPEG spec regards as its input or output: this
-data is in the colorspace to be used for compression, and it is downsampled
-to the sampling factors to be used. The preprocessing and postprocessing
-steps are responsible for converting a normal image representation to or from
-this form. (Those few applications that want to deal with YCbCr downsampled
-data can skip the preprocessing or postprocessing step.)
-
-Looking more closely, the compressor library contains the following main
-elements:
-
- Preprocessing:
- * Color space conversion (e.g., RGB to YCbCr).
- * Edge expansion and downsampling. Optionally, this step can do simple
- smoothing --- this is often helpful for low-quality source data.
- JPEG proper:
- * MCU assembly, DCT, quantization.
- * Entropy coding (sequential or progressive, Huffman or arithmetic).
-
-In addition to these modules we need overall control, marker generation,
-and support code (memory management & error handling). There is also a
-module responsible for physically writing the output data --- typically
-this is just an interface to fwrite(), but some applications may need to
-do something else with the data.
-
-The decompressor library contains the following main elements:
-
- JPEG proper:
- * Entropy decoding (sequential or progressive, Huffman or arithmetic).
- * Dequantization, inverse DCT, MCU disassembly.
- Postprocessing:
- * Upsampling. Optionally, this step may be able to do more general
- rescaling of the image.
- * Color space conversion (e.g., YCbCr to RGB). This step may also
- provide gamma adjustment [ currently it does not ].
- * Optional color quantization (e.g., reduction to 256 colors).
- * Optional color precision reduction (e.g., 24-bit to 15-bit color).
- [This feature is not currently implemented.]
-
-We also need overall control, marker parsing, and a data source module.
-The support code (memory management & error handling) can be shared with
-the compression half of the library.
-
-There may be several implementations of each of these elements, particularly
-in the decompressor, where a wide range of speed/quality tradeoffs is very
-useful. It must be understood that some of the best speedups involve
-merging adjacent steps in the pipeline. For example, upsampling, color space
-conversion, and color quantization might all be done at once when using a
-low-quality ordered-dither technique. The system architecture is designed to
-allow such merging where appropriate.
-
-
-Note: it is convenient to regard edge expansion (padding to block boundaries)
-as a preprocessing/postprocessing function, even though the JPEG spec includes
-it in compression/decompression. We do this because downsampling/upsampling
-can be simplified a little if they work on padded data: it's not necessary to
-have special cases at the right and bottom edges. Therefore the interface
-buffer is always an integral number of blocks wide and high, and we expect
-compression preprocessing to pad the source data properly. Padding will occur
-only to the next block (8-sample) boundary. In an interleaved-scan situation,
-additional dummy blocks may be used to fill out MCUs, but the MCU assembly and
-disassembly logic will create or discard these blocks internally. (This is
-advantageous for speed reasons, since we avoid DCTing the dummy blocks.
-It also permits a small reduction in file size, because the compressor can
-choose dummy block contents so as to minimize their size in compressed form.
-Finally, it makes the interface buffer specification independent of whether
-the file is actually interleaved or not.) Applications that wish to deal
-directly with the downsampled data must provide similar buffering and padding
-for odd-sized images.
-
-
-*** Poor man's object-oriented programming ***
-
-It should be clear by now that we have a lot of quasi-independent processing
-steps, many of which have several possible behaviors. To avoid cluttering the
-code with lots of switch statements, we use a simple form of object-style
-programming to separate out the different possibilities.
-
-For example, two different color quantization algorithms could be implemented
-as two separate modules that present the same external interface; at runtime,
-the calling code will access the proper module indirectly through an "object".
-
-We can get the limited features we need while staying within portable C.
-The basic tool is a function pointer. An "object" is just a struct
-containing one or more function pointer fields, each of which corresponds to
-a method name in real object-oriented languages. During initialization we
-fill in the function pointers with references to whichever module we have
-determined we need to use in this run. Then invocation of the module is done
-by indirecting through a function pointer; on most machines this is no more
-expensive than a switch statement, which would be the only other way of
-making the required run-time choice. The really significant benefit, of
-course, is keeping the source code clean and well structured.
-
-We can also arrange to have private storage that varies between different
-implementations of the same kind of object. We do this by making all the
-module-specific object structs be separately allocated entities, which will
-be accessed via pointers in the master compression or decompression struct.
-The "public" fields or methods for a given kind of object are specified by
-a commonly known struct. But a module's initialization code can allocate
-a larger struct that contains the common struct as its first member, plus
-additional private fields. With appropriate pointer casting, the module's
-internal functions can access these private fields. (For a simple example,
-see jdatadst.c, which implements the external interface specified by struct
-jpeg_destination_mgr, but adds extra fields.)
-
-(Of course this would all be a lot easier if we were using C++, but we are
-not yet prepared to assume that everyone has a C++ compiler.)
-
-An important benefit of this scheme is that it is easy to provide multiple
-versions of any method, each tuned to a particular case. While a lot of
-precalculation might be done to select an optimal implementation of a method,
-the cost per invocation is constant. For example, the upsampling step might
-have a "generic" method, plus one or more "hardwired" methods for the most
-popular sampling factors; the hardwired methods would be faster because they'd
-use straight-line code instead of for-loops. The cost to determine which
-method to use is paid only once, at startup, and the selection criteria are
-hidden from the callers of the method.
-
-This plan differs a little bit from usual object-oriented structures, in that
-only one instance of each object class will exist during execution. The
-reason for having the class structure is that on different runs we may create
-different instances (choose to execute different modules). You can think of
-the term "method" as denoting the common interface presented by a particular
-set of interchangeable functions, and "object" as denoting a group of related
-methods, or the total shared interface behavior of a group of modules.
-
-
-*** Overall control structure ***
-
-We previously mentioned the need for overall control logic in the compression
-and decompression libraries. In IJG implementations prior to v5, overall
-control was mostly provided by "pipeline control" modules, which proved to be
-large, unwieldy, and hard to understand. To improve the situation, the
-control logic has been subdivided into multiple modules. The control modules
-consist of:
-
-1. Master control for module selection and initialization. This has two
-responsibilities:
-
- 1A. Startup initialization at the beginning of image processing.
- The individual processing modules to be used in this run are selected
- and given initialization calls.
-
- 1B. Per-pass control. This determines how many passes will be performed
- and calls each active processing module to configure itself
- appropriately at the beginning of each pass. End-of-pass processing,
- where necessary, is also invoked from the master control module.
-
- Method selection is partially distributed, in that a particular processing
- module may contain several possible implementations of a particular method,
- which it will select among when given its initialization call. The master
- control code need only be concerned with decisions that affect more than
- one module.
-
-2. Data buffering control. A separate control module exists for each
- inter-processing-step data buffer. This module is responsible for
- invoking the processing steps that write or read that data buffer.
-
-Each buffer controller sees the world as follows:
-
-input data => processing step A => buffer => processing step B => output data
- | | |
- ------------------ controller ------------------
-
-The controller knows the dataflow requirements of steps A and B: how much data
-they want to accept in one chunk and how much they output in one chunk. Its
-function is to manage its buffer and call A and B at the proper times.
-
-A data buffer control module may itself be viewed as a processing step by a
-higher-level control module; thus the control modules form a binary tree with
-elementary processing steps at the leaves of the tree.
-
-The control modules are objects. A considerable amount of flexibility can
-be had by replacing implementations of a control module. For example:
-* Merging of adjacent steps in the pipeline is done by replacing a control
- module and its pair of processing-step modules with a single processing-
- step module. (Hence the possible merges are determined by the tree of
- control modules.)
-* In some processing modes, a given interstep buffer need only be a "strip"
- buffer large enough to accommodate the desired data chunk sizes. In other
- modes, a full-image buffer is needed and several passes are required.
- The control module determines which kind of buffer is used and manipulates
- virtual array buffers as needed. One or both processing steps may be
- unaware of the multi-pass behavior.
-
-In theory, we might be able to make all of the data buffer controllers
-interchangeable and provide just one set of implementations for all. In
-practice, each one contains considerable special-case processing for its
-particular job. The buffer controller concept should be regarded as an
-overall system structuring principle, not as a complete description of the
-task performed by any one controller.
-
-
-*** Compression object structure ***
-
-Here is a sketch of the logical structure of the JPEG compression library:
-
- |-- Colorspace conversion
- |-- Preprocessing controller --|
- | |-- Downsampling
-Main controller --|
- | |-- Forward DCT, quantize
- |-- Coefficient controller --|
- |-- Entropy encoding
-
-This sketch also describes the flow of control (subroutine calls) during
-typical image data processing. Each of the components shown in the diagram is
-an "object" which may have several different implementations available. One
-or more source code files contain the actual implementation(s) of each object.
-
-The objects shown above are:
-
-* Main controller: buffer controller for the subsampled-data buffer, which
- holds the preprocessed input data. This controller invokes preprocessing to
- fill the subsampled-data buffer, and JPEG compression to empty it. There is
- usually no need for a full-image buffer here; a strip buffer is adequate.
-
-* Preprocessing controller: buffer controller for the downsampling input data
- buffer, which lies between colorspace conversion and downsampling. Note
- that a unified conversion/downsampling module would probably replace this
- controller entirely.
-
-* Colorspace conversion: converts application image data into the desired
- JPEG color space; also changes the data from pixel-interleaved layout to
- separate component planes. Processes one pixel row at a time.
-
-* Downsampling: performs reduction of chroma components as required.
- Optionally may perform pixel-level smoothing as well. Processes a "row
- group" at a time, where a row group is defined as Vmax pixel rows of each
- component before downsampling, and Vk sample rows afterwards (remember Vk
- differs across components). Some downsampling or smoothing algorithms may
- require context rows above and below the current row group; the
- preprocessing controller is responsible for supplying these rows via proper
- buffering. The downsampler is responsible for edge expansion at the right
- edge (i.e., extending each sample row to a multiple of 8 samples); but the
- preprocessing controller is responsible for vertical edge expansion (i.e.,
- duplicating the bottom sample row as needed to make a multiple of 8 rows).
-
-* Coefficient controller: buffer controller for the DCT-coefficient data.
- This controller handles MCU assembly, including insertion of dummy DCT
- blocks when needed at the right or bottom edge. When performing
- Huffman-code optimization or emitting a multiscan JPEG file, this
- controller is responsible for buffering the full image. The equivalent of
- one fully interleaved MCU row of subsampled data is processed per call,
- even when the JPEG file is noninterleaved.
-
-* Forward DCT and quantization: Perform DCT, quantize, and emit coefficients.
- Works on one or more DCT blocks at a time. (Note: the coefficients are now
- emitted in normal array order, which the entropy encoder is expected to
- convert to zigzag order as necessary. Prior versions of the IJG code did
- the conversion to zigzag order within the quantization step.)
-
-* Entropy encoding: Perform Huffman or arithmetic entropy coding and emit the
- coded data to the data destination module. Works on one MCU per call.
- For progressive JPEG, the same DCT blocks are fed to the entropy coder
- during each pass, and the coder must emit the appropriate subset of
- coefficients.
-
-In addition to the above objects, the compression library includes these
-objects:
-
-* Master control: determines the number of passes required, controls overall
- and per-pass initialization of the other modules.
-
-* Marker writing: generates JPEG markers (except for RSTn, which is emitted
- by the entropy encoder when needed).
-
-* Data destination manager: writes the output JPEG datastream to its final
- destination (e.g., a file). The destination manager supplied with the
- library knows how to write to a stdio stream; for other behaviors, the
- surrounding application may provide its own destination manager.
-
-* Memory manager: allocates and releases memory, controls virtual arrays
- (with backing store management, where required).
-
-* Error handler: performs formatting and output of error and trace messages;
- determines handling of nonfatal errors. The surrounding application may
- override some or all of this object's methods to change error handling.
-
-* Progress monitor: supports output of "percent-done" progress reports.
- This object represents an optional callback to the surrounding application:
- if wanted, it must be supplied by the application.
-
-The error handler, destination manager, and progress monitor objects are
-defined as separate objects in order to simplify application-specific
-customization of the JPEG library. A surrounding application may override
-individual methods or supply its own all-new implementation of one of these
-objects. The object interfaces for these objects are therefore treated as
-part of the application interface of the library, whereas the other objects
-are internal to the library.
-
-The error handler and memory manager are shared by JPEG compression and
-decompression; the progress monitor, if used, may be shared as well.
-
-
-*** Decompression object structure ***
-
-Here is a sketch of the logical structure of the JPEG decompression library:
-
- |-- Entropy decoding
- |-- Coefficient controller --|
- | |-- Dequantize, Inverse DCT
-Main controller --|
- | |-- Upsampling
- |-- Postprocessing controller --| |-- Colorspace conversion
- |-- Color quantization
- |-- Color precision reduction
-
-As before, this diagram also represents typical control flow. The objects
-shown are:
-
-* Main controller: buffer controller for the subsampled-data buffer, which
- holds the output of JPEG decompression proper. This controller's primary
- task is to feed the postprocessing procedure. Some upsampling algorithms
- may require context rows above and below the current row group; when this
- is true, the main controller is responsible for managing its buffer so as
- to make context rows available. In the current design, the main buffer is
- always a strip buffer; a full-image buffer is never required.
-
-* Coefficient controller: buffer controller for the DCT-coefficient data.
- This controller handles MCU disassembly, including deletion of any dummy
- DCT blocks at the right or bottom edge. When reading a multiscan JPEG
- file, this controller is responsible for buffering the full image.
- (Buffering DCT coefficients, rather than samples, is necessary to support
- progressive JPEG.) The equivalent of one fully interleaved MCU row of
- subsampled data is processed per call, even when the source JPEG file is
- noninterleaved.
-
-* Entropy decoding: Read coded data from the data source module and perform
- Huffman or arithmetic entropy decoding. Works on one MCU per call.
- For progressive JPEG decoding, the coefficient controller supplies the prior
- coefficients of each MCU (initially all zeroes), which the entropy decoder
- modifies in each scan.
-
-* Dequantization and inverse DCT: like it says. Note that the coefficients
- buffered by the coefficient controller have NOT been dequantized; we
- merge dequantization and inverse DCT into a single step for speed reasons.
- When scaled-down output is asked for, simplified DCT algorithms may be used
- that emit only 1x1, 2x2, or 4x4 samples per DCT block, not the full 8x8.
- Works on one DCT block at a time.
-
-* Postprocessing controller: buffer controller for the color quantization
- input buffer, when quantization is in use. (Without quantization, this
- controller just calls the upsampler.) For two-pass quantization, this
- controller is responsible for buffering the full-image data.
-
-* Upsampling: restores chroma components to full size. (May support more
- general output rescaling, too. Note that if undersized DCT outputs have
- been emitted by the DCT module, this module must adjust so that properly
- sized outputs are created.) Works on one row group at a time. This module
- also calls the color conversion module, so its top level is effectively a
- buffer controller for the upsampling->color conversion buffer. However, in
- all but the highest-quality operating modes, upsampling and color
- conversion are likely to be merged into a single step.
-
-* Colorspace conversion: convert from JPEG color space to output color space,
- and change data layout from separate component planes to pixel-interleaved.
- Works on one pixel row at a time.
-
-* Color quantization: reduce the data to colormapped form, using either an
- externally specified colormap or an internally generated one. This module
- is not used for full-color output. Works on one pixel row at a time; may
- require two passes to generate a color map. Note that the output will
- always be a single component representing colormap indexes. In the current
- design, the output values are JSAMPLEs, so an 8-bit compilation cannot
- quantize to more than 256 colors. This is unlikely to be a problem in
- practice.
-
-* Color reduction: this module handles color precision reduction, e.g.,
- generating 15-bit color (5 bits/primary) from JPEG's 24-bit output.
- Not quite clear yet how this should be handled... should we merge it with
- colorspace conversion???
-
-Note that some high-speed operating modes might condense the entire
-postprocessing sequence to a single module (upsample, color convert, and
-quantize in one step).
-
-In addition to the above objects, the decompression library includes these
-objects:
-
-* Master control: determines the number of passes required, controls overall
- and per-pass initialization of the other modules. This is subdivided into
- input and output control: jdinput.c controls only input-side processing,
- while jdmaster.c handles overall initialization and output-side control.
-
-* Marker reading: decodes JPEG markers (except for RSTn).
-
-* Data source manager: supplies the input JPEG datastream. The source
- manager supplied with the library knows how to read from a stdio stream;
- for other behaviors, the surrounding application may provide its own source
- manager.
-
-* Memory manager: same as for compression library.
-
-* Error handler: same as for compression library.
-
-* Progress monitor: same as for compression library.
-
-As with compression, the data source manager, error handler, and progress
-monitor are candidates for replacement by a surrounding application.
-
-
-*** Decompression input and output separation ***
-
-To support efficient incremental display of progressive JPEG files, the
-decompressor is divided into two sections that can run independently:
-
-1. Data input includes marker parsing, entropy decoding, and input into the
- coefficient controller's DCT coefficient buffer. Note that this
- processing is relatively cheap and fast.
-
-2. Data output reads from the DCT coefficient buffer and performs the IDCT
- and all postprocessing steps.
-
-For a progressive JPEG file, the data input processing is allowed to get
-arbitrarily far ahead of the data output processing. (This occurs only
-if the application calls jpeg_consume_input(); otherwise input and output
-run in lockstep, since the input section is called only when the output
-section needs more data.) In this way the application can avoid making
-extra display passes when data is arriving faster than the display pass
-can run. Furthermore, it is possible to abort an output pass without
-losing anything, since the coefficient buffer is read-only as far as the
-output section is concerned. See libjpeg.doc for more detail.
-
-A full-image coefficient array is only created if the JPEG file has multiple
-scans (or if the application specifies buffered-image mode anyway). When
-reading a single-scan file, the coefficient controller normally creates only
-a one-MCU buffer, so input and output processing must run in lockstep in this
-case. jpeg_consume_input() is effectively a no-op in this situation.
-
-The main impact of dividing the decompressor in this fashion is that we must
-be very careful with shared variables in the cinfo data structure. Each
-variable that can change during the course of decompression must be
-classified as belonging to data input or data output, and each section must
-look only at its own variables. For example, the data output section may not
-depend on any of the variables that describe the current scan in the JPEG
-file, because these may change as the data input section advances into a new
-scan.
-
-The progress monitor is (somewhat arbitrarily) defined to treat input of the
-file as one pass when buffered-image mode is not used, and to ignore data
-input work completely when buffered-image mode is used. Note that the
-library has no reliable way to predict the number of passes when dealing
-with a progressive JPEG file, nor can it predict the number of output passes
-in buffered-image mode. So the work estimate is inherently bogus anyway.
-
-No comparable division is currently made in the compression library, because
-there isn't any real need for it.
-
-
-*** Data formats ***
-
-Arrays of pixel sample values use the following data structure:
-
- typedef something JSAMPLE; a pixel component value, 0..MAXJSAMPLE
- typedef JSAMPLE *JSAMPROW; ptr to a row of samples
- typedef JSAMPROW *JSAMPARRAY; ptr to a list of rows
- typedef JSAMPARRAY *JSAMPIMAGE; ptr to a list of color-component arrays
-
-The basic element type JSAMPLE will typically be one of unsigned char,
-(signed) char, or short. Short will be used if samples wider than 8 bits are
-to be supported (this is a compile-time option). Otherwise, unsigned char is
-used if possible. If the compiler only supports signed chars, then it is
-necessary to mask off the value when reading. Thus, all reads of JSAMPLE
-values must be coded as "GETJSAMPLE(value)", where the macro will be defined
-as "((value) & 0xFF)" on signed-char machines and "((int) (value))" elsewhere.
-
-With these conventions, JSAMPLE values can be assumed to be >= 0. This helps
-simplify correct rounding during downsampling, etc. The JPEG standard's
-specification that sample values run from -128..127 is accommodated by
-subtracting 128 just as the sample value is copied into the source array for
-the DCT step (this will be an array of signed ints). Similarly, during
-decompression the output of the IDCT step will be immediately shifted back to
-0..255. (NB: different values are required when 12-bit samples are in use.
-The code is written in terms of MAXJSAMPLE and CENTERJSAMPLE, which will be
-defined as 255 and 128 respectively in an 8-bit implementation, and as 4095
-and 2048 in a 12-bit implementation.)
-
-We use a pointer per row, rather than a two-dimensional JSAMPLE array. This
-choice costs only a small amount of memory and has several benefits:
-* Code using the data structure doesn't need to know the allocated width of
- the rows. This simplifies edge expansion/compression, since we can work
- in an array that's wider than the logical picture width.
-* Indexing doesn't require multiplication; this is a performance win on many
- machines.
-* Arrays with more than 64K total elements can be supported even on machines
- where malloc() cannot allocate chunks larger than 64K.
-* The rows forming a component array may be allocated at different times
- without extra copying. This trick allows some speedups in smoothing steps
- that need access to the previous and next rows.
-
-Note that each color component is stored in a separate array; we don't use the
-traditional layout in which the components of a pixel are stored together.
-This simplifies coding of modules that work on each component independently,
-because they don't need to know how many components there are. Furthermore,
-we can read or write each component to a temporary file independently, which
-is helpful when dealing with noninterleaved JPEG files.
-
-In general, a specific sample value is accessed by code such as
- GETJSAMPLE(image[colorcomponent][row][col])
-where col is measured from the image left edge, but row is measured from the
-first sample row currently in memory. Either of the first two indexings can
-be precomputed by copying the relevant pointer.
-
-
-Since most image-processing applications prefer to work on images in which
-the components of a pixel are stored together, the data passed to or from the
-surrounding application uses the traditional convention: a single pixel is
-represented by N consecutive JSAMPLE values, and an image row is an array of
-(# of color components)*(image width) JSAMPLEs. One or more rows of data can
-be represented by a pointer of type JSAMPARRAY in this scheme. This scheme is
-converted to component-wise storage inside the JPEG library. (Applications
-that want to skip JPEG preprocessing or postprocessing will have to contend
-with component-wise storage.)
-
-
-Arrays of DCT-coefficient values use the following data structure:
-
- typedef short JCOEF; a 16-bit signed integer
- typedef JCOEF JBLOCK[DCTSIZE2]; an 8x8 block of coefficients
- typedef JBLOCK *JBLOCKROW; ptr to one horizontal row of 8x8 blocks
- typedef JBLOCKROW *JBLOCKARRAY; ptr to a list of such rows
- typedef JBLOCKARRAY *JBLOCKIMAGE; ptr to a list of color component arrays
-
-The underlying type is at least a 16-bit signed integer; while "short" is big
-enough on all machines of interest, on some machines it is preferable to use
-"int" for speed reasons, despite the storage cost. Coefficients are grouped
-into 8x8 blocks (but we always use #defines DCTSIZE and DCTSIZE2 rather than
-"8" and "64").
-
-The contents of a coefficient block may be in either "natural" or zigzagged
-order, and may be true values or divided by the quantization coefficients,
-depending on where the block is in the processing pipeline. In the current
-library, coefficient blocks are kept in natural order everywhere; the entropy
-codecs zigzag or dezigzag the data as it is written or read. The blocks
-contain quantized coefficients everywhere outside the DCT/IDCT subsystems.
-(This latter decision may need to be revisited to support variable
-quantization a la JPEG Part 3.)
-
-Notice that the allocation unit is now a row of 8x8 blocks, corresponding to
-eight rows of samples. Otherwise the structure is much the same as for
-samples, and for the same reasons.
-
-On machines where malloc() can't handle a request bigger than 64Kb, this data
-structure limits us to rows of less than 512 JBLOCKs, or a picture width of
-4000+ pixels. This seems an acceptable restriction.
-
-
-On 80x86 machines, the bottom-level pointer types (JSAMPROW and JBLOCKROW)
-must be declared as "far" pointers, but the upper levels can be "near"
-(implying that the pointer lists are allocated in the DS segment).
-We use a #define symbol FAR, which expands to the "far" keyword when
-compiling on 80x86 machines and to nothing elsewhere.
-
-
-*** Suspendable processing ***
-
-In some applications it is desirable to use the JPEG library as an
-incremental, memory-to-memory filter. In this situation the data source or
-destination may be a limited-size buffer, and we can't rely on being able to
-empty or refill the buffer at arbitrary times. Instead the application would
-like to have control return from the library at buffer overflow/underrun, and
-then resume compression or decompression at a later time.
-
-This scenario is supported for simple cases. (For anything more complex, we
-recommend that the application "bite the bullet" and develop real multitasking
-capability.) The libjpeg.doc file goes into more detail about the usage and
-limitations of this capability; here we address the implications for library
-structure.
-
-The essence of the problem is that the entropy codec (coder or decoder) must
-be prepared to stop at arbitrary times. In turn, the controllers that call
-the entropy codec must be able to stop before having produced or consumed all
-the data that they normally would handle in one call. That part is reasonably
-straightforward: we make the controller call interfaces include "progress
-counters" which indicate the number of data chunks successfully processed, and
-we require callers to test the counter rather than just assume all of the data
-was processed.
-
-Rather than trying to restart at an arbitrary point, the current Huffman
-codecs are designed to restart at the beginning of the current MCU after a
-suspension due to buffer overflow/underrun. At the start of each call, the
-codec's internal state is loaded from permanent storage (in the JPEG object
-structures) into local variables. On successful completion of the MCU, the
-permanent state is updated. (This copying is not very expensive, and may even
-lead to *improved* performance if the local variables can be registerized.)
-If a suspension occurs, the codec simply returns without updating the state,
-thus effectively reverting to the start of the MCU. Note that this implies
-leaving some data unprocessed in the source/destination buffer (ie, the
-compressed partial MCU). The data source/destination module interfaces are
-specified so as to make this possible. This also implies that the data buffer
-must be large enough to hold a worst-case compressed MCU; a couple thousand
-bytes should be enough.
-
-In a successive-approximation AC refinement scan, the progressive Huffman
-decoder has to be able to undo assignments of newly nonzero coefficients if it
-suspends before the MCU is complete, since decoding requires distinguishing
-previously-zero and previously-nonzero coefficients. This is a bit tedious
-but probably won't have much effect on performance. Other variants of Huffman
-decoding need not worry about this, since they will just store the same values
-again if forced to repeat the MCU.
-
-This approach would probably not work for an arithmetic codec, since its
-modifiable state is quite large and couldn't be copied cheaply. Instead it
-would have to suspend and resume exactly at the point of the buffer end.
-
-The JPEG marker reader is designed to cope with suspension at an arbitrary
-point. It does so by backing up to the start of the marker parameter segment,
-so the data buffer must be big enough to hold the largest marker of interest.
-Again, a couple KB should be adequate. (A special "skip" convention is used
-to bypass COM and APPn markers, so these can be larger than the buffer size
-without causing problems; otherwise a 64K buffer would be needed in the worst
-case.)
-
-The JPEG marker writer currently does *not* cope with suspension. I feel that
-this is not necessary; it is much easier simply to require the application to
-ensure there is enough buffer space before starting. (An empty 2K buffer is
-more than sufficient for the header markers; and ensuring there are a dozen or
-two bytes available before calling jpeg_finish_compress() will suffice for the
-trailer.) This would not work for writing multi-scan JPEG files, but
-we simply do not intend to support that capability with suspension.
-
-
-*** Memory manager services ***
-
-The JPEG library's memory manager controls allocation and deallocation of
-memory, and it manages large "virtual" data arrays on machines where the
-operating system does not provide virtual memory. Note that the same
-memory manager serves both compression and decompression operations.
-
-In all cases, allocated objects are tied to a particular compression or
-decompression master record, and they will be released when that master
-record is destroyed.
-
-The memory manager does not provide explicit deallocation of objects.
-Instead, objects are created in "pools" of free storage, and a whole pool
-can be freed at once. This approach helps prevent storage-leak bugs, and
-it speeds up operations whenever malloc/free are slow (as they often are).
-The pools can be regarded as lifetime identifiers for objects. Two
-pools/lifetimes are defined:
- * JPOOL_PERMANENT lasts until master record is destroyed
- * JPOOL_IMAGE lasts until done with image (JPEG datastream)
-Permanent lifetime is used for parameters and tables that should be carried
-across from one datastream to another; this includes all application-visible
-parameters. Image lifetime is used for everything else. (A third lifetime,
-JPOOL_PASS = one processing pass, was originally planned. However it was
-dropped as not being worthwhile. The actual usage patterns are such that the
-peak memory usage would be about the same anyway; and having per-pass storage
-substantially complicates the virtual memory allocation rules --- see below.)
-
-The memory manager deals with three kinds of object:
-1. "Small" objects. Typically these require no more than 10K-20K total.
-2. "Large" objects. These may require tens to hundreds of K depending on
- image size. Semantically they behave the same as small objects, but we
- distinguish them for two reasons:
- * On MS-DOS machines, large objects are referenced by FAR pointers,
- small objects by NEAR pointers.
- * Pool allocation heuristics may differ for large and small objects.
- Note that individual "large" objects cannot exceed the size allowed by
- type size_t, which may be 64K or less on some machines.
-3. "Virtual" objects. These are large 2-D arrays of JSAMPLEs or JBLOCKs
- (typically large enough for the entire image being processed). The
- memory manager provides stripwise access to these arrays. On machines
- without virtual memory, the rest of the array may be swapped out to a
- temporary file.
-
-(Note: JSAMPARRAY and JBLOCKARRAY data structures are a combination of large
-objects for the data proper and small objects for the row pointers. For
-convenience and speed, the memory manager provides single routines to create
-these structures. Similarly, virtual arrays include a small control block
-and a JSAMPARRAY or JBLOCKARRAY working buffer, all created with one call.)
-
-In the present implementation, virtual arrays are only permitted to have image
-lifespan. (Permanent lifespan would not be reasonable, and pass lifespan is
-not very useful since a virtual array's raison d'etre is to store data for
-multiple passes through the image.) We also expect that only "small" objects
-will be given permanent lifespan, though this restriction is not required by
-the memory manager.
-
-In a non-virtual-memory machine, some performance benefit can be gained by
-making the in-memory buffers for virtual arrays be as large as possible.
-(For small images, the buffers might fit entirely in memory, so blind
-swapping would be very wasteful.) The memory manager will adjust the height
-of the buffers to fit within a prespecified maximum memory usage. In order
-to do this in a reasonably optimal fashion, the manager needs to allocate all
-of the virtual arrays at once. Therefore, there isn't a one-step allocation
-routine for virtual arrays; instead, there is a "request" routine that simply
-allocates the control block, and a "realize" routine (called just once) that
-determines space allocation and creates all of the actual buffers. The
-realize routine must allow for space occupied by non-virtual large objects.
-(We don't bother to factor in the space needed for small objects, on the
-grounds that it isn't worth the trouble.)
-
-To support all this, we establish the following protocol for doing business
-with the memory manager:
- 1. Modules must request virtual arrays (which may have only image lifespan)
- during the initial setup phase, i.e., in their jinit_xxx routines.
- 2. All "large" objects (including JSAMPARRAYs and JBLOCKARRAYs) must also be
- allocated during initial setup.
- 3. realize_virt_arrays will be called at the completion of initial setup.
- The above conventions ensure that sufficient information is available
- for it to choose a good size for virtual array buffers.
-Small objects of any lifespan may be allocated at any time. We expect that
-the total space used for small objects will be small enough to be negligible
-in the realize_virt_arrays computation.
-
-In a virtual-memory machine, we simply pretend that the available space is
-infinite, thus causing realize_virt_arrays to decide that it can allocate all
-the virtual arrays as full-size in-memory buffers. The overhead of the
-virtual-array access protocol is very small when no swapping occurs.
-
-A virtual array can be specified to be "pre-zeroed"; when this flag is set,
-never-yet-written sections of the array are set to zero before being made
-available to the caller. If this flag is not set, never-written sections
-of the array contain garbage. (This feature exists primarily because the
-equivalent logic would otherwise be needed in jdcoefct.c for progressive
-JPEG mode; we may as well make it available for possible other uses.)
-
-The first write pass on a virtual array is required to occur in top-to-bottom
-order; read passes, as well as any write passes after the first one, may
-access the array in any order. This restriction exists partly to simplify
-the virtual array control logic, and partly because some file systems may not
-support seeking beyond the current end-of-file in a temporary file. The main
-implication of this restriction is that rearrangement of rows (such as
-converting top-to-bottom data order to bottom-to-top) must be handled while
-reading data out of the virtual array, not while putting it in.
-
-
-*** Memory manager internal structure ***
-
-To isolate system dependencies as much as possible, we have broken the
-memory manager into two parts. There is a reasonably system-independent
-"front end" (jmemmgr.c) and a "back end" that contains only the code
-likely to change across systems. All of the memory management methods
-outlined above are implemented by the front end. The back end provides
-the following routines for use by the front end (none of these routines
-are known to the rest of the JPEG code):
-
-jpeg_mem_init, jpeg_mem_term system-dependent initialization/shutdown
-
-jpeg_get_small, jpeg_free_small interface to malloc and free library routines
- (or their equivalents)
-
-jpeg_get_large, jpeg_free_large interface to FAR malloc/free in MSDOS machines;
- else usually the same as
- jpeg_get_small/jpeg_free_small
-
-jpeg_mem_available estimate available memory
-
-jpeg_open_backing_store create a backing-store object
-
-read_backing_store, manipulate a backing-store object
-write_backing_store,
-close_backing_store
-
-On some systems there will be more than one type of backing-store object
-(specifically, in MS-DOS a backing store file might be an area of extended
-memory as well as a disk file). jpeg_open_backing_store is responsible for
-choosing how to implement a given object. The read/write/close routines
-are method pointers in the structure that describes a given object; this
-lets them be different for different object types.
-
-It may be necessary to ensure that backing store objects are explicitly
-released upon abnormal program termination. For example, MS-DOS won't free
-extended memory by itself. To support this, we will expect the main program
-or surrounding application to arrange to call self_destruct (typically via
-jpeg_destroy) upon abnormal termination. This may require a SIGINT signal
-handler or equivalent. We don't want to have the back end module install its
-own signal handler, because that would pre-empt the surrounding application's
-ability to control signal handling.
-
-The IJG distribution includes several memory manager back end implementations.
-Usually the same back end should be suitable for all applications on a given
-system, but it is possible for an application to supply its own back end at
-need.
-
-
-*** Implications of DNL marker ***
-
-Some JPEG files may use a DNL marker to postpone definition of the image
-height (this would be useful for a fax-like scanner's output, for instance).
-In these files the SOF marker claims the image height is 0, and you only
-find out the true image height at the end of the first scan.
-
-We could read these files as follows:
-1. Upon seeing zero image height, replace it by 65535 (the maximum allowed).
-2. When the DNL is found, update the image height in the global image
- descriptor.
-This implies that control modules must avoid making copies of the image
-height, and must re-test for termination after each MCU row. This would
-be easy enough to do.
-
-In cases where image-size data structures are allocated, this approach will
-result in very inefficient use of virtual memory or much-larger-than-necessary
-temporary files. This seems acceptable for something that probably won't be a
-mainstream usage. People might have to forgo use of memory-hogging options
-(such as two-pass color quantization or noninterleaved JPEG files) if they
-want efficient conversion of such files. (One could improve efficiency by
-demanding a user-supplied upper bound for the height, less than 65536; in most
-cases it could be much less.)
-
-The standard also permits the SOF marker to overestimate the image height,
-with a DNL to give the true, smaller height at the end of the first scan.
-This would solve the space problems if the overestimate wasn't too great.
-However, it implies that you don't even know whether DNL will be used.
-
-This leads to a couple of very serious objections:
-1. Testing for a DNL marker must occur in the inner loop of the decompressor's
- Huffman decoder; this implies a speed penalty whether the feature is used
- or not.
-2. There is no way to hide the last-minute change in image height from an
- application using the decoder. Thus *every* application using the IJG
- library would suffer a complexity penalty whether it cared about DNL or
- not.
-We currently do not support DNL because of these problems.
-
-A different approach is to insist that DNL-using files be preprocessed by a
-separate program that reads ahead to the DNL, then goes back and fixes the SOF
-marker. This is a much simpler solution and is probably far more efficient.
-Even if one wants piped input, buffering the first scan of the JPEG file needs
-a lot smaller temp file than is implied by the maximum-height method. For
-this approach we'd simply treat DNL as a no-op in the decompressor (at most,
-check that it matches the SOF image height).
-
-We will not worry about making the compressor capable of outputting DNL.
-Something similar to the first scheme above could be applied if anyone ever
-wants to make that work.
diff --git a/src/3rdparty/libjpeg/structure.txt b/src/3rdparty/libjpeg/structure.txt
new file mode 100644
index 0000000000..fe88701e31
--- /dev/null
+++ b/src/3rdparty/libjpeg/structure.txt
@@ -0,0 +1,945 @@
+IJG JPEG LIBRARY: SYSTEM ARCHITECTURE
+
+Copyright (C) 1991-2009, Thomas G. Lane, Guido Vollbeding.
+This file is part of the Independent JPEG Group's software.
+For conditions of distribution and use, see the accompanying README file.
+
+
+This file provides an overview of the architecture of the IJG JPEG software;
+that is, the functions of the various modules in the system and the interfaces
+between modules. For more precise details about any data structure or calling
+convention, see the include files and comments in the source code.
+
+We assume that the reader is already somewhat familiar with the JPEG standard.
+The README file includes references for learning about JPEG. The file
+libjpeg.txt describes the library from the viewpoint of an application
+programmer using the library; it's best to read that file before this one.
+Also, the file coderules.txt describes the coding style conventions we use.
+
+In this document, JPEG-specific terminology follows the JPEG standard:
+ A "component" means a color channel, e.g., Red or Luminance.
+ A "sample" is a single component value (i.e., one number in the image data).
+ A "coefficient" is a frequency coefficient (a DCT transform output number).
+ A "block" is an 8x8 group of samples or coefficients.
+ An "MCU" (minimum coded unit) is an interleaved set of blocks of size
+ determined by the sampling factors, or a single block in a
+ noninterleaved scan.
+We do not use the terms "pixel" and "sample" interchangeably. When we say
+pixel, we mean an element of the full-size image, while a sample is an element
+of the downsampled image. Thus the number of samples may vary across
+components while the number of pixels does not. (This terminology is not used
+rigorously throughout the code, but it is used in places where confusion would
+otherwise result.)
+
+
+*** System features ***
+
+The IJG distribution contains two parts:
+ * A subroutine library for JPEG compression and decompression.
+ * cjpeg/djpeg, two sample applications that use the library to transform
+ JFIF JPEG files to and from several other image formats.
+cjpeg/djpeg are of no great intellectual complexity: they merely add a simple
+command-line user interface and I/O routines for several uncompressed image
+formats. This document concentrates on the library itself.
+
+We desire the library to be capable of supporting all JPEG baseline, extended
+sequential, and progressive DCT processes. Hierarchical processes are not
+supported.
+
+The library does not support the lossless (spatial) JPEG process. Lossless
+JPEG shares little or no code with lossy JPEG, and would normally be used
+without the extensive pre- and post-processing provided by this library.
+We feel that lossless JPEG is better handled by a separate library.
+
+Within these limits, any set of compression parameters allowed by the JPEG
+spec should be readable for decompression. (We can be more restrictive about
+what formats we can generate.) Although the system design allows for all
+parameter values, some uncommon settings are not yet implemented and may
+never be; nonintegral sampling ratios are the prime example. Furthermore,
+we treat 8-bit vs. 12-bit data precision as a compile-time switch, not a
+run-time option, because most machines can store 8-bit pixels much more
+compactly than 12-bit.
+
+By itself, the library handles only interchange JPEG datastreams --- in
+particular the widely used JFIF file format. The library can be used by
+surrounding code to process interchange or abbreviated JPEG datastreams that
+are embedded in more complex file formats. (For example, libtiff uses this
+library to implement JPEG compression within the TIFF file format.)
+
+The library includes a substantial amount of code that is not covered by the
+JPEG standard but is necessary for typical applications of JPEG. These
+functions preprocess the image before JPEG compression or postprocess it after
+decompression. They include colorspace conversion, downsampling/upsampling,
+and color quantization. This code can be omitted if not needed.
+
+A wide range of quality vs. speed tradeoffs are possible in JPEG processing,
+and even more so in decompression postprocessing. The decompression library
+provides multiple implementations that cover most of the useful tradeoffs,
+ranging from very-high-quality down to fast-preview operation. On the
+compression side we have generally not provided low-quality choices, since
+compression is normally less time-critical. It should be understood that the
+low-quality modes may not meet the JPEG standard's accuracy requirements;
+nonetheless, they are useful for viewers.
+
+
+*** Portability issues ***
+
+Portability is an essential requirement for the library. The key portability
+issues that show up at the level of system architecture are:
+
+1. Memory usage. We want the code to be able to run on PC-class machines
+with limited memory. Images should therefore be processed sequentially (in
+strips), to avoid holding the whole image in memory at once. Where a
+full-image buffer is necessary, we should be able to use either virtual memory
+or temporary files.
+
+2. Near/far pointer distinction. To run efficiently on 80x86 machines, the
+code should distinguish "small" objects (kept in near data space) from
+"large" ones (kept in far data space). This is an annoying restriction, but
+fortunately it does not impact code quality for less brain-damaged machines,
+and the source code clutter turns out to be minimal with sufficient use of
+pointer typedefs.
+
+3. Data precision. We assume that "char" is at least 8 bits, "short" and
+"int" at least 16, "long" at least 32. The code will work fine with larger
+data sizes, although memory may be used inefficiently in some cases. However,
+the JPEG compressed datastream must ultimately appear on external storage as a
+sequence of 8-bit bytes if it is to conform to the standard. This may pose a
+problem on machines where char is wider than 8 bits. The library represents
+compressed data as an array of values of typedef JOCTET. If no data type
+exactly 8 bits wide is available, custom data source and data destination
+modules must be written to unpack and pack the chosen JOCTET datatype into
+8-bit external representation.
+
+
+*** System overview ***
+
+The compressor and decompressor are each divided into two main sections:
+the JPEG compressor or decompressor proper, and the preprocessing or
+postprocessing functions. The interface between these two sections is the
+image data that the official JPEG spec regards as its input or output: this
+data is in the colorspace to be used for compression, and it is downsampled
+to the sampling factors to be used. The preprocessing and postprocessing
+steps are responsible for converting a normal image representation to or from
+this form. (Those few applications that want to deal with YCbCr downsampled
+data can skip the preprocessing or postprocessing step.)
+
+Looking more closely, the compressor library contains the following main
+elements:
+
+ Preprocessing:
+ * Color space conversion (e.g., RGB to YCbCr).
+ * Edge expansion and downsampling. Optionally, this step can do simple
+ smoothing --- this is often helpful for low-quality source data.
+ JPEG proper:
+ * MCU assembly, DCT, quantization.
+ * Entropy coding (sequential or progressive, Huffman or arithmetic).
+
+In addition to these modules we need overall control, marker generation,
+and support code (memory management & error handling). There is also a
+module responsible for physically writing the output data --- typically
+this is just an interface to fwrite(), but some applications may need to
+do something else with the data.
+
+The decompressor library contains the following main elements:
+
+ JPEG proper:
+ * Entropy decoding (sequential or progressive, Huffman or arithmetic).
+ * Dequantization, inverse DCT, MCU disassembly.
+ Postprocessing:
+ * Upsampling. Optionally, this step may be able to do more general
+ rescaling of the image.
+ * Color space conversion (e.g., YCbCr to RGB). This step may also
+ provide gamma adjustment [ currently it does not ].
+ * Optional color quantization (e.g., reduction to 256 colors).
+ * Optional color precision reduction (e.g., 24-bit to 15-bit color).
+ [This feature is not currently implemented.]
+
+We also need overall control, marker parsing, and a data source module.
+The support code (memory management & error handling) can be shared with
+the compression half of the library.
+
+There may be several implementations of each of these elements, particularly
+in the decompressor, where a wide range of speed/quality tradeoffs is very
+useful. It must be understood that some of the best speedups involve
+merging adjacent steps in the pipeline. For example, upsampling, color space
+conversion, and color quantization might all be done at once when using a
+low-quality ordered-dither technique. The system architecture is designed to
+allow such merging where appropriate.
+
+
+Note: it is convenient to regard edge expansion (padding to block boundaries)
+as a preprocessing/postprocessing function, even though the JPEG spec includes
+it in compression/decompression. We do this because downsampling/upsampling
+can be simplified a little if they work on padded data: it's not necessary to
+have special cases at the right and bottom edges. Therefore the interface
+buffer is always an integral number of blocks wide and high, and we expect
+compression preprocessing to pad the source data properly. Padding will occur
+only to the next block (8-sample) boundary. In an interleaved-scan situation,
+additional dummy blocks may be used to fill out MCUs, but the MCU assembly and
+disassembly logic will create or discard these blocks internally. (This is
+advantageous for speed reasons, since we avoid DCTing the dummy blocks.
+It also permits a small reduction in file size, because the compressor can
+choose dummy block contents so as to minimize their size in compressed form.
+Finally, it makes the interface buffer specification independent of whether
+the file is actually interleaved or not.) Applications that wish to deal
+directly with the downsampled data must provide similar buffering and padding
+for odd-sized images.
+
+
+*** Poor man's object-oriented programming ***
+
+It should be clear by now that we have a lot of quasi-independent processing
+steps, many of which have several possible behaviors. To avoid cluttering the
+code with lots of switch statements, we use a simple form of object-style
+programming to separate out the different possibilities.
+
+For example, two different color quantization algorithms could be implemented
+as two separate modules that present the same external interface; at runtime,
+the calling code will access the proper module indirectly through an "object".
+
+We can get the limited features we need while staying within portable C.
+The basic tool is a function pointer. An "object" is just a struct
+containing one or more function pointer fields, each of which corresponds to
+a method name in real object-oriented languages. During initialization we
+fill in the function pointers with references to whichever module we have
+determined we need to use in this run. Then invocation of the module is done
+by indirecting through a function pointer; on most machines this is no more
+expensive than a switch statement, which would be the only other way of
+making the required run-time choice. The really significant benefit, of
+course, is keeping the source code clean and well structured.
+
+We can also arrange to have private storage that varies between different
+implementations of the same kind of object. We do this by making all the
+module-specific object structs be separately allocated entities, which will
+be accessed via pointers in the master compression or decompression struct.
+The "public" fields or methods for a given kind of object are specified by
+a commonly known struct. But a module's initialization code can allocate
+a larger struct that contains the common struct as its first member, plus
+additional private fields. With appropriate pointer casting, the module's
+internal functions can access these private fields. (For a simple example,
+see jdatadst.c, which implements the external interface specified by struct
+jpeg_destination_mgr, but adds extra fields.)
+
+(Of course this would all be a lot easier if we were using C++, but we are
+not yet prepared to assume that everyone has a C++ compiler.)
+
+An important benefit of this scheme is that it is easy to provide multiple
+versions of any method, each tuned to a particular case. While a lot of
+precalculation might be done to select an optimal implementation of a method,
+the cost per invocation is constant. For example, the upsampling step might
+have a "generic" method, plus one or more "hardwired" methods for the most
+popular sampling factors; the hardwired methods would be faster because they'd
+use straight-line code instead of for-loops. The cost to determine which
+method to use is paid only once, at startup, and the selection criteria are
+hidden from the callers of the method.
+
+This plan differs a little bit from usual object-oriented structures, in that
+only one instance of each object class will exist during execution. The
+reason for having the class structure is that on different runs we may create
+different instances (choose to execute different modules). You can think of
+the term "method" as denoting the common interface presented by a particular
+set of interchangeable functions, and "object" as denoting a group of related
+methods, or the total shared interface behavior of a group of modules.
+
+
+*** Overall control structure ***
+
+We previously mentioned the need for overall control logic in the compression
+and decompression libraries. In IJG implementations prior to v5, overall
+control was mostly provided by "pipeline control" modules, which proved to be
+large, unwieldy, and hard to understand. To improve the situation, the
+control logic has been subdivided into multiple modules. The control modules
+consist of:
+
+1. Master control for module selection and initialization. This has two
+responsibilities:
+
+ 1A. Startup initialization at the beginning of image processing.
+ The individual processing modules to be used in this run are selected
+ and given initialization calls.
+
+ 1B. Per-pass control. This determines how many passes will be performed
+ and calls each active processing module to configure itself
+ appropriately at the beginning of each pass. End-of-pass processing,
+ where necessary, is also invoked from the master control module.
+
+ Method selection is partially distributed, in that a particular processing
+ module may contain several possible implementations of a particular method,
+ which it will select among when given its initialization call. The master
+ control code need only be concerned with decisions that affect more than
+ one module.
+
+2. Data buffering control. A separate control module exists for each
+ inter-processing-step data buffer. This module is responsible for
+ invoking the processing steps that write or read that data buffer.
+
+Each buffer controller sees the world as follows:
+
+input data => processing step A => buffer => processing step B => output data
+ | | |
+ ------------------ controller ------------------
+
+The controller knows the dataflow requirements of steps A and B: how much data
+they want to accept in one chunk and how much they output in one chunk. Its
+function is to manage its buffer and call A and B at the proper times.
+
+A data buffer control module may itself be viewed as a processing step by a
+higher-level control module; thus the control modules form a binary tree with
+elementary processing steps at the leaves of the tree.
+
+The control modules are objects. A considerable amount of flexibility can
+be had by replacing implementations of a control module. For example:
+* Merging of adjacent steps in the pipeline is done by replacing a control
+ module and its pair of processing-step modules with a single processing-
+ step module. (Hence the possible merges are determined by the tree of
+ control modules.)
+* In some processing modes, a given interstep buffer need only be a "strip"
+ buffer large enough to accommodate the desired data chunk sizes. In other
+ modes, a full-image buffer is needed and several passes are required.
+ The control module determines which kind of buffer is used and manipulates
+ virtual array buffers as needed. One or both processing steps may be
+ unaware of the multi-pass behavior.
+
+In theory, we might be able to make all of the data buffer controllers
+interchangeable and provide just one set of implementations for all. In
+practice, each one contains considerable special-case processing for its
+particular job. The buffer controller concept should be regarded as an
+overall system structuring principle, not as a complete description of the
+task performed by any one controller.
+
+
+*** Compression object structure ***
+
+Here is a sketch of the logical structure of the JPEG compression library:
+
+ |-- Colorspace conversion
+ |-- Preprocessing controller --|
+ | |-- Downsampling
+Main controller --|
+ | |-- Forward DCT, quantize
+ |-- Coefficient controller --|
+ |-- Entropy encoding
+
+This sketch also describes the flow of control (subroutine calls) during
+typical image data processing. Each of the components shown in the diagram is
+an "object" which may have several different implementations available. One
+or more source code files contain the actual implementation(s) of each object.
+
+The objects shown above are:
+
+* Main controller: buffer controller for the subsampled-data buffer, which
+ holds the preprocessed input data. This controller invokes preprocessing to
+ fill the subsampled-data buffer, and JPEG compression to empty it. There is
+ usually no need for a full-image buffer here; a strip buffer is adequate.
+
+* Preprocessing controller: buffer controller for the downsampling input data
+ buffer, which lies between colorspace conversion and downsampling. Note
+ that a unified conversion/downsampling module would probably replace this
+ controller entirely.
+
+* Colorspace conversion: converts application image data into the desired
+ JPEG color space; also changes the data from pixel-interleaved layout to
+ separate component planes. Processes one pixel row at a time.
+
+* Downsampling: performs reduction of chroma components as required.
+ Optionally may perform pixel-level smoothing as well. Processes a "row
+ group" at a time, where a row group is defined as Vmax pixel rows of each
+ component before downsampling, and Vk sample rows afterwards (remember Vk
+ differs across components). Some downsampling or smoothing algorithms may
+ require context rows above and below the current row group; the
+ preprocessing controller is responsible for supplying these rows via proper
+ buffering. The downsampler is responsible for edge expansion at the right
+ edge (i.e., extending each sample row to a multiple of 8 samples); but the
+ preprocessing controller is responsible for vertical edge expansion (i.e.,
+ duplicating the bottom sample row as needed to make a multiple of 8 rows).
+
+* Coefficient controller: buffer controller for the DCT-coefficient data.
+ This controller handles MCU assembly, including insertion of dummy DCT
+ blocks when needed at the right or bottom edge. When performing
+ Huffman-code optimization or emitting a multiscan JPEG file, this
+ controller is responsible for buffering the full image. The equivalent of
+ one fully interleaved MCU row of subsampled data is processed per call,
+ even when the JPEG file is noninterleaved.
+
+* Forward DCT and quantization: Perform DCT, quantize, and emit coefficients.
+ Works on one or more DCT blocks at a time. (Note: the coefficients are now
+ emitted in normal array order, which the entropy encoder is expected to
+ convert to zigzag order as necessary. Prior versions of the IJG code did
+ the conversion to zigzag order within the quantization step.)
+
+* Entropy encoding: Perform Huffman or arithmetic entropy coding and emit the
+ coded data to the data destination module. Works on one MCU per call.
+ For progressive JPEG, the same DCT blocks are fed to the entropy coder
+ during each pass, and the coder must emit the appropriate subset of
+ coefficients.
+
+In addition to the above objects, the compression library includes these
+objects:
+
+* Master control: determines the number of passes required, controls overall
+ and per-pass initialization of the other modules.
+
+* Marker writing: generates JPEG markers (except for RSTn, which is emitted
+ by the entropy encoder when needed).
+
+* Data destination manager: writes the output JPEG datastream to its final
+ destination (e.g., a file). The destination manager supplied with the
+ library knows how to write to a stdio stream; for other behaviors, the
+ surrounding application may provide its own destination manager.
+
+* Memory manager: allocates and releases memory, controls virtual arrays
+ (with backing store management, where required).
+
+* Error handler: performs formatting and output of error and trace messages;
+ determines handling of nonfatal errors. The surrounding application may
+ override some or all of this object's methods to change error handling.
+
+* Progress monitor: supports output of "percent-done" progress reports.
+ This object represents an optional callback to the surrounding application:
+ if wanted, it must be supplied by the application.
+
+The error handler, destination manager, and progress monitor objects are
+defined as separate objects in order to simplify application-specific
+customization of the JPEG library. A surrounding application may override
+individual methods or supply its own all-new implementation of one of these
+objects. The object interfaces for these objects are therefore treated as
+part of the application interface of the library, whereas the other objects
+are internal to the library.
+
+The error handler and memory manager are shared by JPEG compression and
+decompression; the progress monitor, if used, may be shared as well.
+
+
+*** Decompression object structure ***
+
+Here is a sketch of the logical structure of the JPEG decompression library:
+
+ |-- Entropy decoding
+ |-- Coefficient controller --|
+ | |-- Dequantize, Inverse DCT
+Main controller --|
+ | |-- Upsampling
+ |-- Postprocessing controller --| |-- Colorspace conversion
+ |-- Color quantization
+ |-- Color precision reduction
+
+As before, this diagram also represents typical control flow. The objects
+shown are:
+
+* Main controller: buffer controller for the subsampled-data buffer, which
+ holds the output of JPEG decompression proper. This controller's primary
+ task is to feed the postprocessing procedure. Some upsampling algorithms
+ may require context rows above and below the current row group; when this
+ is true, the main controller is responsible for managing its buffer so as
+ to make context rows available. In the current design, the main buffer is
+ always a strip buffer; a full-image buffer is never required.
+
+* Coefficient controller: buffer controller for the DCT-coefficient data.
+ This controller handles MCU disassembly, including deletion of any dummy
+ DCT blocks at the right or bottom edge. When reading a multiscan JPEG
+ file, this controller is responsible for buffering the full image.
+ (Buffering DCT coefficients, rather than samples, is necessary to support
+ progressive JPEG.) The equivalent of one fully interleaved MCU row of
+ subsampled data is processed per call, even when the source JPEG file is
+ noninterleaved.
+
+* Entropy decoding: Read coded data from the data source module and perform
+ Huffman or arithmetic entropy decoding. Works on one MCU per call.
+ For progressive JPEG decoding, the coefficient controller supplies the prior
+ coefficients of each MCU (initially all zeroes), which the entropy decoder
+ modifies in each scan.
+
+* Dequantization and inverse DCT: like it says. Note that the coefficients
+ buffered by the coefficient controller have NOT been dequantized; we
+ merge dequantization and inverse DCT into a single step for speed reasons.
+ When scaled-down output is asked for, simplified DCT algorithms may be used
+ that need fewer coefficients and emit fewer samples per DCT block, not the
+ full 8x8. Works on one DCT block at a time.
+
+* Postprocessing controller: buffer controller for the color quantization
+ input buffer, when quantization is in use. (Without quantization, this
+ controller just calls the upsampler.) For two-pass quantization, this
+ controller is responsible for buffering the full-image data.
+
+* Upsampling: restores chroma components to full size. (May support more
+ general output rescaling, too. Note that if undersized DCT outputs have
+ been emitted by the DCT module, this module must adjust so that properly
+ sized outputs are created.) Works on one row group at a time. This module
+ also calls the color conversion module, so its top level is effectively a
+ buffer controller for the upsampling->color conversion buffer. However, in
+ all but the highest-quality operating modes, upsampling and color
+ conversion are likely to be merged into a single step.
+
+* Colorspace conversion: convert from JPEG color space to output color space,
+ and change data layout from separate component planes to pixel-interleaved.
+ Works on one pixel row at a time.
+
+* Color quantization: reduce the data to colormapped form, using either an
+ externally specified colormap or an internally generated one. This module
+ is not used for full-color output. Works on one pixel row at a time; may
+ require two passes to generate a color map. Note that the output will
+ always be a single component representing colormap indexes. In the current
+ design, the output values are JSAMPLEs, so an 8-bit compilation cannot
+ quantize to more than 256 colors. This is unlikely to be a problem in
+ practice.
+
+* Color reduction: this module handles color precision reduction, e.g.,
+ generating 15-bit color (5 bits/primary) from JPEG's 24-bit output.
+ Not quite clear yet how this should be handled... should we merge it with
+ colorspace conversion???
+
+Note that some high-speed operating modes might condense the entire
+postprocessing sequence to a single module (upsample, color convert, and
+quantize in one step).
+
+In addition to the above objects, the decompression library includes these
+objects:
+
+* Master control: determines the number of passes required, controls overall
+ and per-pass initialization of the other modules. This is subdivided into
+ input and output control: jdinput.c controls only input-side processing,
+ while jdmaster.c handles overall initialization and output-side control.
+
+* Marker reading: decodes JPEG markers (except for RSTn).
+
+* Data source manager: supplies the input JPEG datastream. The source
+ manager supplied with the library knows how to read from a stdio stream;
+ for other behaviors, the surrounding application may provide its own source
+ manager.
+
+* Memory manager: same as for compression library.
+
+* Error handler: same as for compression library.
+
+* Progress monitor: same as for compression library.
+
+As with compression, the data source manager, error handler, and progress
+monitor are candidates for replacement by a surrounding application.
+
+
+*** Decompression input and output separation ***
+
+To support efficient incremental display of progressive JPEG files, the
+decompressor is divided into two sections that can run independently:
+
+1. Data input includes marker parsing, entropy decoding, and input into the
+ coefficient controller's DCT coefficient buffer. Note that this
+ processing is relatively cheap and fast.
+
+2. Data output reads from the DCT coefficient buffer and performs the IDCT
+ and all postprocessing steps.
+
+For a progressive JPEG file, the data input processing is allowed to get
+arbitrarily far ahead of the data output processing. (This occurs only
+if the application calls jpeg_consume_input(); otherwise input and output
+run in lockstep, since the input section is called only when the output
+section needs more data.) In this way the application can avoid making
+extra display passes when data is arriving faster than the display pass
+can run. Furthermore, it is possible to abort an output pass without
+losing anything, since the coefficient buffer is read-only as far as the
+output section is concerned. See libjpeg.txt for more detail.
+
+A full-image coefficient array is only created if the JPEG file has multiple
+scans (or if the application specifies buffered-image mode anyway). When
+reading a single-scan file, the coefficient controller normally creates only
+a one-MCU buffer, so input and output processing must run in lockstep in this
+case. jpeg_consume_input() is effectively a no-op in this situation.
+
+The main impact of dividing the decompressor in this fashion is that we must
+be very careful with shared variables in the cinfo data structure. Each
+variable that can change during the course of decompression must be
+classified as belonging to data input or data output, and each section must
+look only at its own variables. For example, the data output section may not
+depend on any of the variables that describe the current scan in the JPEG
+file, because these may change as the data input section advances into a new
+scan.
+
+The progress monitor is (somewhat arbitrarily) defined to treat input of the
+file as one pass when buffered-image mode is not used, and to ignore data
+input work completely when buffered-image mode is used. Note that the
+library has no reliable way to predict the number of passes when dealing
+with a progressive JPEG file, nor can it predict the number of output passes
+in buffered-image mode. So the work estimate is inherently bogus anyway.
+
+No comparable division is currently made in the compression library, because
+there isn't any real need for it.
+
+
+*** Data formats ***
+
+Arrays of pixel sample values use the following data structure:
+
+ typedef something JSAMPLE; a pixel component value, 0..MAXJSAMPLE
+ typedef JSAMPLE *JSAMPROW; ptr to a row of samples
+ typedef JSAMPROW *JSAMPARRAY; ptr to a list of rows
+ typedef JSAMPARRAY *JSAMPIMAGE; ptr to a list of color-component arrays
+
+The basic element type JSAMPLE will typically be one of unsigned char,
+(signed) char, or short. Short will be used if samples wider than 8 bits are
+to be supported (this is a compile-time option). Otherwise, unsigned char is
+used if possible. If the compiler only supports signed chars, then it is
+necessary to mask off the value when reading. Thus, all reads of JSAMPLE
+values must be coded as "GETJSAMPLE(value)", where the macro will be defined
+as "((value) & 0xFF)" on signed-char machines and "((int) (value))" elsewhere.
+
+With these conventions, JSAMPLE values can be assumed to be >= 0. This helps
+simplify correct rounding during downsampling, etc. The JPEG standard's
+specification that sample values run from -128..127 is accommodated by
+subtracting 128 from the sample value in the DCT step. Similarly, during
+decompression the output of the IDCT step will be immediately shifted back to
+0..255. (NB: different values are required when 12-bit samples are in use.
+The code is written in terms of MAXJSAMPLE and CENTERJSAMPLE, which will be
+defined as 255 and 128 respectively in an 8-bit implementation, and as 4095
+and 2048 in a 12-bit implementation.)
+
+We use a pointer per row, rather than a two-dimensional JSAMPLE array. This
+choice costs only a small amount of memory and has several benefits:
+* Code using the data structure doesn't need to know the allocated width of
+ the rows. This simplifies edge expansion/compression, since we can work
+ in an array that's wider than the logical picture width.
+* Indexing doesn't require multiplication; this is a performance win on many
+ machines.
+* Arrays with more than 64K total elements can be supported even on machines
+ where malloc() cannot allocate chunks larger than 64K.
+* The rows forming a component array may be allocated at different times
+ without extra copying. This trick allows some speedups in smoothing steps
+ that need access to the previous and next rows.
+
+Note that each color component is stored in a separate array; we don't use the
+traditional layout in which the components of a pixel are stored together.
+This simplifies coding of modules that work on each component independently,
+because they don't need to know how many components there are. Furthermore,
+we can read or write each component to a temporary file independently, which
+is helpful when dealing with noninterleaved JPEG files.
+
+In general, a specific sample value is accessed by code such as
+ GETJSAMPLE(image[colorcomponent][row][col])
+where col is measured from the image left edge, but row is measured from the
+first sample row currently in memory. Either of the first two indexings can
+be precomputed by copying the relevant pointer.
+
+
+Since most image-processing applications prefer to work on images in which
+the components of a pixel are stored together, the data passed to or from the
+surrounding application uses the traditional convention: a single pixel is
+represented by N consecutive JSAMPLE values, and an image row is an array of
+(# of color components)*(image width) JSAMPLEs. One or more rows of data can
+be represented by a pointer of type JSAMPARRAY in this scheme. This scheme is
+converted to component-wise storage inside the JPEG library. (Applications
+that want to skip JPEG preprocessing or postprocessing will have to contend
+with component-wise storage.)
+
+
+Arrays of DCT-coefficient values use the following data structure:
+
+ typedef short JCOEF; a 16-bit signed integer
+ typedef JCOEF JBLOCK[DCTSIZE2]; an 8x8 block of coefficients
+ typedef JBLOCK *JBLOCKROW; ptr to one horizontal row of 8x8 blocks
+ typedef JBLOCKROW *JBLOCKARRAY; ptr to a list of such rows
+ typedef JBLOCKARRAY *JBLOCKIMAGE; ptr to a list of color component arrays
+
+The underlying type is at least a 16-bit signed integer; while "short" is big
+enough on all machines of interest, on some machines it is preferable to use
+"int" for speed reasons, despite the storage cost. Coefficients are grouped
+into 8x8 blocks (but we always use #defines DCTSIZE and DCTSIZE2 rather than
+"8" and "64").
+
+The contents of a coefficient block may be in either "natural" or zigzagged
+order, and may be true values or divided by the quantization coefficients,
+depending on where the block is in the processing pipeline. In the current
+library, coefficient blocks are kept in natural order everywhere; the entropy
+codecs zigzag or dezigzag the data as it is written or read. The blocks
+contain quantized coefficients everywhere outside the DCT/IDCT subsystems.
+(This latter decision may need to be revisited to support variable
+quantization a la JPEG Part 3.)
+
+Notice that the allocation unit is now a row of 8x8 blocks, corresponding to
+eight rows of samples. Otherwise the structure is much the same as for
+samples, and for the same reasons.
+
+On machines where malloc() can't handle a request bigger than 64Kb, this data
+structure limits us to rows of less than 512 JBLOCKs, or a picture width of
+4000+ pixels. This seems an acceptable restriction.
+
+
+On 80x86 machines, the bottom-level pointer types (JSAMPROW and JBLOCKROW)
+must be declared as "far" pointers, but the upper levels can be "near"
+(implying that the pointer lists are allocated in the DS segment).
+We use a #define symbol FAR, which expands to the "far" keyword when
+compiling on 80x86 machines and to nothing elsewhere.
+
+
+*** Suspendable processing ***
+
+In some applications it is desirable to use the JPEG library as an
+incremental, memory-to-memory filter. In this situation the data source or
+destination may be a limited-size buffer, and we can't rely on being able to
+empty or refill the buffer at arbitrary times. Instead the application would
+like to have control return from the library at buffer overflow/underrun, and
+then resume compression or decompression at a later time.
+
+This scenario is supported for simple cases. (For anything more complex, we
+recommend that the application "bite the bullet" and develop real multitasking
+capability.) The libjpeg.txt file goes into more detail about the usage and
+limitations of this capability; here we address the implications for library
+structure.
+
+The essence of the problem is that the entropy codec (coder or decoder) must
+be prepared to stop at arbitrary times. In turn, the controllers that call
+the entropy codec must be able to stop before having produced or consumed all
+the data that they normally would handle in one call. That part is reasonably
+straightforward: we make the controller call interfaces include "progress
+counters" which indicate the number of data chunks successfully processed, and
+we require callers to test the counter rather than just assume all of the data
+was processed.
+
+Rather than trying to restart at an arbitrary point, the current Huffman
+codecs are designed to restart at the beginning of the current MCU after a
+suspension due to buffer overflow/underrun. At the start of each call, the
+codec's internal state is loaded from permanent storage (in the JPEG object
+structures) into local variables. On successful completion of the MCU, the
+permanent state is updated. (This copying is not very expensive, and may even
+lead to *improved* performance if the local variables can be registerized.)
+If a suspension occurs, the codec simply returns without updating the state,
+thus effectively reverting to the start of the MCU. Note that this implies
+leaving some data unprocessed in the source/destination buffer (ie, the
+compressed partial MCU). The data source/destination module interfaces are
+specified so as to make this possible. This also implies that the data buffer
+must be large enough to hold a worst-case compressed MCU; a couple thousand
+bytes should be enough.
+
+In a successive-approximation AC refinement scan, the progressive Huffman
+decoder has to be able to undo assignments of newly nonzero coefficients if it
+suspends before the MCU is complete, since decoding requires distinguishing
+previously-zero and previously-nonzero coefficients. This is a bit tedious
+but probably won't have much effect on performance. Other variants of Huffman
+decoding need not worry about this, since they will just store the same values
+again if forced to repeat the MCU.
+
+This approach would probably not work for an arithmetic codec, since its
+modifiable state is quite large and couldn't be copied cheaply. Instead it
+would have to suspend and resume exactly at the point of the buffer end.
+
+The JPEG marker reader is designed to cope with suspension at an arbitrary
+point. It does so by backing up to the start of the marker parameter segment,
+so the data buffer must be big enough to hold the largest marker of interest.
+Again, a couple KB should be adequate. (A special "skip" convention is used
+to bypass COM and APPn markers, so these can be larger than the buffer size
+without causing problems; otherwise a 64K buffer would be needed in the worst
+case.)
+
+The JPEG marker writer currently does *not* cope with suspension.
+We feel that this is not necessary; it is much easier simply to require
+the application to ensure there is enough buffer space before starting. (An
+empty 2K buffer is more than sufficient for the header markers; and ensuring
+there are a dozen or two bytes available before calling jpeg_finish_compress()
+will suffice for the trailer.) This would not work for writing multi-scan
+JPEG files, but we simply do not intend to support that capability with
+suspension.
+
+
+*** Memory manager services ***
+
+The JPEG library's memory manager controls allocation and deallocation of
+memory, and it manages large "virtual" data arrays on machines where the
+operating system does not provide virtual memory. Note that the same
+memory manager serves both compression and decompression operations.
+
+In all cases, allocated objects are tied to a particular compression or
+decompression master record, and they will be released when that master
+record is destroyed.
+
+The memory manager does not provide explicit deallocation of objects.
+Instead, objects are created in "pools" of free storage, and a whole pool
+can be freed at once. This approach helps prevent storage-leak bugs, and
+it speeds up operations whenever malloc/free are slow (as they often are).
+The pools can be regarded as lifetime identifiers for objects. Two
+pools/lifetimes are defined:
+ * JPOOL_PERMANENT lasts until master record is destroyed
+ * JPOOL_IMAGE lasts until done with image (JPEG datastream)
+Permanent lifetime is used for parameters and tables that should be carried
+across from one datastream to another; this includes all application-visible
+parameters. Image lifetime is used for everything else. (A third lifetime,
+JPOOL_PASS = one processing pass, was originally planned. However it was
+dropped as not being worthwhile. The actual usage patterns are such that the
+peak memory usage would be about the same anyway; and having per-pass storage
+substantially complicates the virtual memory allocation rules --- see below.)
+
+The memory manager deals with three kinds of object:
+1. "Small" objects. Typically these require no more than 10K-20K total.
+2. "Large" objects. These may require tens to hundreds of K depending on
+ image size. Semantically they behave the same as small objects, but we
+ distinguish them for two reasons:
+ * On MS-DOS machines, large objects are referenced by FAR pointers,
+ small objects by NEAR pointers.
+ * Pool allocation heuristics may differ for large and small objects.
+ Note that individual "large" objects cannot exceed the size allowed by
+ type size_t, which may be 64K or less on some machines.
+3. "Virtual" objects. These are large 2-D arrays of JSAMPLEs or JBLOCKs
+ (typically large enough for the entire image being processed). The
+ memory manager provides stripwise access to these arrays. On machines
+ without virtual memory, the rest of the array may be swapped out to a
+ temporary file.
+
+(Note: JSAMPARRAY and JBLOCKARRAY data structures are a combination of large
+objects for the data proper and small objects for the row pointers. For
+convenience and speed, the memory manager provides single routines to create
+these structures. Similarly, virtual arrays include a small control block
+and a JSAMPARRAY or JBLOCKARRAY working buffer, all created with one call.)
+
+In the present implementation, virtual arrays are only permitted to have image
+lifespan. (Permanent lifespan would not be reasonable, and pass lifespan is
+not very useful since a virtual array's raison d'etre is to store data for
+multiple passes through the image.) We also expect that only "small" objects
+will be given permanent lifespan, though this restriction is not required by
+the memory manager.
+
+In a non-virtual-memory machine, some performance benefit can be gained by
+making the in-memory buffers for virtual arrays be as large as possible.
+(For small images, the buffers might fit entirely in memory, so blind
+swapping would be very wasteful.) The memory manager will adjust the height
+of the buffers to fit within a prespecified maximum memory usage. In order
+to do this in a reasonably optimal fashion, the manager needs to allocate all
+of the virtual arrays at once. Therefore, there isn't a one-step allocation
+routine for virtual arrays; instead, there is a "request" routine that simply
+allocates the control block, and a "realize" routine (called just once) that
+determines space allocation and creates all of the actual buffers. The
+realize routine must allow for space occupied by non-virtual large objects.
+(We don't bother to factor in the space needed for small objects, on the
+grounds that it isn't worth the trouble.)
+
+To support all this, we establish the following protocol for doing business
+with the memory manager:
+ 1. Modules must request virtual arrays (which may have only image lifespan)
+ during the initial setup phase, i.e., in their jinit_xxx routines.
+ 2. All "large" objects (including JSAMPARRAYs and JBLOCKARRAYs) must also be
+ allocated during initial setup.
+ 3. realize_virt_arrays will be called at the completion of initial setup.
+ The above conventions ensure that sufficient information is available
+ for it to choose a good size for virtual array buffers.
+Small objects of any lifespan may be allocated at any time. We expect that
+the total space used for small objects will be small enough to be negligible
+in the realize_virt_arrays computation.
+
+In a virtual-memory machine, we simply pretend that the available space is
+infinite, thus causing realize_virt_arrays to decide that it can allocate all
+the virtual arrays as full-size in-memory buffers. The overhead of the
+virtual-array access protocol is very small when no swapping occurs.
+
+A virtual array can be specified to be "pre-zeroed"; when this flag is set,
+never-yet-written sections of the array are set to zero before being made
+available to the caller. If this flag is not set, never-written sections
+of the array contain garbage. (This feature exists primarily because the
+equivalent logic would otherwise be needed in jdcoefct.c for progressive
+JPEG mode; we may as well make it available for possible other uses.)
+
+The first write pass on a virtual array is required to occur in top-to-bottom
+order; read passes, as well as any write passes after the first one, may
+access the array in any order. This restriction exists partly to simplify
+the virtual array control logic, and partly because some file systems may not
+support seeking beyond the current end-of-file in a temporary file. The main
+implication of this restriction is that rearrangement of rows (such as
+converting top-to-bottom data order to bottom-to-top) must be handled while
+reading data out of the virtual array, not while putting it in.
+
+
+*** Memory manager internal structure ***
+
+To isolate system dependencies as much as possible, we have broken the
+memory manager into two parts. There is a reasonably system-independent
+"front end" (jmemmgr.c) and a "back end" that contains only the code
+likely to change across systems. All of the memory management methods
+outlined above are implemented by the front end. The back end provides
+the following routines for use by the front end (none of these routines
+are known to the rest of the JPEG code):
+
+jpeg_mem_init, jpeg_mem_term system-dependent initialization/shutdown
+
+jpeg_get_small, jpeg_free_small interface to malloc and free library routines
+ (or their equivalents)
+
+jpeg_get_large, jpeg_free_large interface to FAR malloc/free in MSDOS machines;
+ else usually the same as
+ jpeg_get_small/jpeg_free_small
+
+jpeg_mem_available estimate available memory
+
+jpeg_open_backing_store create a backing-store object
+
+read_backing_store, manipulate a backing-store object
+write_backing_store,
+close_backing_store
+
+On some systems there will be more than one type of backing-store object
+(specifically, in MS-DOS a backing store file might be an area of extended
+memory as well as a disk file). jpeg_open_backing_store is responsible for
+choosing how to implement a given object. The read/write/close routines
+are method pointers in the structure that describes a given object; this
+lets them be different for different object types.
+
+It may be necessary to ensure that backing store objects are explicitly
+released upon abnormal program termination. For example, MS-DOS won't free
+extended memory by itself. To support this, we will expect the main program
+or surrounding application to arrange to call self_destruct (typically via
+jpeg_destroy) upon abnormal termination. This may require a SIGINT signal
+handler or equivalent. We don't want to have the back end module install its
+own signal handler, because that would pre-empt the surrounding application's
+ability to control signal handling.
+
+The IJG distribution includes several memory manager back end implementations.
+Usually the same back end should be suitable for all applications on a given
+system, but it is possible for an application to supply its own back end at
+need.
+
+
+*** Implications of DNL marker ***
+
+Some JPEG files may use a DNL marker to postpone definition of the image
+height (this would be useful for a fax-like scanner's output, for instance).
+In these files the SOF marker claims the image height is 0, and you only
+find out the true image height at the end of the first scan.
+
+We could read these files as follows:
+1. Upon seeing zero image height, replace it by 65535 (the maximum allowed).
+2. When the DNL is found, update the image height in the global image
+ descriptor.
+This implies that control modules must avoid making copies of the image
+height, and must re-test for termination after each MCU row. This would
+be easy enough to do.
+
+In cases where image-size data structures are allocated, this approach will
+result in very inefficient use of virtual memory or much-larger-than-necessary
+temporary files. This seems acceptable for something that probably won't be a
+mainstream usage. People might have to forgo use of memory-hogging options
+(such as two-pass color quantization or noninterleaved JPEG files) if they
+want efficient conversion of such files. (One could improve efficiency by
+demanding a user-supplied upper bound for the height, less than 65536; in most
+cases it could be much less.)
+
+The standard also permits the SOF marker to overestimate the image height,
+with a DNL to give the true, smaller height at the end of the first scan.
+This would solve the space problems if the overestimate wasn't too great.
+However, it implies that you don't even know whether DNL will be used.
+
+This leads to a couple of very serious objections:
+1. Testing for a DNL marker must occur in the inner loop of the decompressor's
+ Huffman decoder; this implies a speed penalty whether the feature is used
+ or not.
+2. There is no way to hide the last-minute change in image height from an
+ application using the decoder. Thus *every* application using the IJG
+ library would suffer a complexity penalty whether it cared about DNL or
+ not.
+We currently do not support DNL because of these problems.
+
+A different approach is to insist that DNL-using files be preprocessed by a
+separate program that reads ahead to the DNL, then goes back and fixes the SOF
+marker. This is a much simpler solution and is probably far more efficient.
+Even if one wants piped input, buffering the first scan of the JPEG file needs
+a lot smaller temp file than is implied by the maximum-height method. For
+this approach we'd simply treat DNL as a no-op in the decompressor (at most,
+check that it matches the SOF image height).
+
+We will not worry about making the compressor capable of outputting DNL.
+Something similar to the first scheme above could be applied if anyone ever
+wants to make that work.
diff --git a/src/3rdparty/libjpeg/transupp.h b/src/3rdparty/libjpeg/transupp.h
new file mode 100644
index 0000000000..7c16c19c44
--- /dev/null
+++ b/src/3rdparty/libjpeg/transupp.h
@@ -0,0 +1,210 @@
+/*
+ * transupp.h
+ *
+ * Copyright (C) 1997-2009, Thomas G. Lane, Guido Vollbeding.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains declarations for image transformation routines and
+ * other utility code used by the jpegtran sample application. These are
+ * NOT part of the core JPEG library. But we keep these routines separate
+ * from jpegtran.c to ease the task of maintaining jpegtran-like programs
+ * that have other user interfaces.
+ *
+ * NOTE: all the routines declared here have very specific requirements
+ * about when they are to be executed during the reading and writing of the
+ * source and destination files. See the comments in transupp.c, or see
+ * jpegtran.c for an example of correct usage.
+ */
+
+/* If you happen not to want the image transform support, disable it here */
+#ifndef TRANSFORMS_SUPPORTED
+#define TRANSFORMS_SUPPORTED 1 /* 0 disables transform code */
+#endif
+
+/*
+ * Although rotating and flipping data expressed as DCT coefficients is not
+ * hard, there is an asymmetry in the JPEG format specification for images
+ * whose dimensions aren't multiples of the iMCU size. The right and bottom
+ * image edges are padded out to the next iMCU boundary with junk data; but
+ * no padding is possible at the top and left edges. If we were to flip
+ * the whole image including the pad data, then pad garbage would become
+ * visible at the top and/or left, and real pixels would disappear into the
+ * pad margins --- perhaps permanently, since encoders & decoders may not
+ * bother to preserve DCT blocks that appear to be completely outside the
+ * nominal image area. So, we have to exclude any partial iMCUs from the
+ * basic transformation.
+ *
+ * Transpose is the only transformation that can handle partial iMCUs at the
+ * right and bottom edges completely cleanly. flip_h can flip partial iMCUs
+ * at the bottom, but leaves any partial iMCUs at the right edge untouched.
+ * Similarly flip_v leaves any partial iMCUs at the bottom edge untouched.
+ * The other transforms are defined as combinations of these basic transforms
+ * and process edge blocks in a way that preserves the equivalence.
+ *
+ * The "trim" option causes untransformable partial iMCUs to be dropped;
+ * this is not strictly lossless, but it usually gives the best-looking
+ * result for odd-size images. Note that when this option is active,
+ * the expected mathematical equivalences between the transforms may not hold.
+ * (For example, -rot 270 -trim trims only the bottom edge, but -rot 90 -trim
+ * followed by -rot 180 -trim trims both edges.)
+ *
+ * We also offer a lossless-crop option, which discards data outside a given
+ * image region but losslessly preserves what is inside. Like the rotate and
+ * flip transforms, lossless crop is restricted by the JPEG format: the upper
+ * left corner of the selected region must fall on an iMCU boundary. If this
+ * does not hold for the given crop parameters, we silently move the upper left
+ * corner up and/or left to make it so, simultaneously increasing the region
+ * dimensions to keep the lower right crop corner unchanged. (Thus, the
+ * output image covers at least the requested region, but may cover more.)
+ *
+ * We also provide a lossless-resize option, which is kind of a lossless-crop
+ * operation in the DCT coefficient block domain - it discards higher-order
+ * coefficients and losslessly preserves lower-order coefficients of a
+ * sub-block.
+ *
+ * Rotate/flip transform, resize, and crop can be requested together in a
+ * single invocation. The crop is applied last --- that is, the crop region
+ * is specified in terms of the destination image after transform/resize.
+ *
+ * We also offer a "force to grayscale" option, which simply discards the
+ * chrominance channels of a YCbCr image. This is lossless in the sense that
+ * the luminance channel is preserved exactly. It's not the same kind of
+ * thing as the rotate/flip transformations, but it's convenient to handle it
+ * as part of this package, mainly because the transformation routines have to
+ * be aware of the option to know how many components to work on.
+ */
+
+
+/* Short forms of external names for systems with brain-damaged linkers. */
+
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+#define jtransform_parse_crop_spec jTrParCrop
+#define jtransform_request_workspace jTrRequest
+#define jtransform_adjust_parameters jTrAdjust
+#define jtransform_execute_transform jTrExec
+#define jtransform_perfect_transform jTrPerfect
+#define jcopy_markers_setup jCMrkSetup
+#define jcopy_markers_execute jCMrkExec
+#endif /* NEED_SHORT_EXTERNAL_NAMES */
+
+
+/*
+ * Codes for supported types of image transformations.
+ */
+
+typedef enum {
+ JXFORM_NONE, /* no transformation */
+ JXFORM_FLIP_H, /* horizontal flip */
+ JXFORM_FLIP_V, /* vertical flip */
+ JXFORM_TRANSPOSE, /* transpose across UL-to-LR axis */
+ JXFORM_TRANSVERSE, /* transpose across UR-to-LL axis */
+ JXFORM_ROT_90, /* 90-degree clockwise rotation */
+ JXFORM_ROT_180, /* 180-degree rotation */
+ JXFORM_ROT_270 /* 270-degree clockwise (or 90 ccw) */
+} JXFORM_CODE;
+
+/*
+ * Codes for crop parameters, which can individually be unspecified,
+ * positive, or negative. (Negative width or height makes no sense, though.)
+ */
+
+typedef enum {
+ JCROP_UNSET,
+ JCROP_POS,
+ JCROP_NEG
+} JCROP_CODE;
+
+/*
+ * Transform parameters struct.
+ * NB: application must not change any elements of this struct after
+ * calling jtransform_request_workspace.
+ */
+
+typedef struct {
+ /* Options: set by caller */
+ JXFORM_CODE transform; /* image transform operator */
+ boolean perfect; /* if TRUE, fail if partial MCUs are requested */
+ boolean trim; /* if TRUE, trim partial MCUs as needed */
+ boolean force_grayscale; /* if TRUE, convert color image to grayscale */
+ boolean crop; /* if TRUE, crop source image */
+
+ /* Crop parameters: application need not set these unless crop is TRUE.
+ * These can be filled in by jtransform_parse_crop_spec().
+ */
+ JDIMENSION crop_width; /* Width of selected region */
+ JCROP_CODE crop_width_set;
+ JDIMENSION crop_height; /* Height of selected region */
+ JCROP_CODE crop_height_set;
+ JDIMENSION crop_xoffset; /* X offset of selected region */
+ JCROP_CODE crop_xoffset_set; /* (negative measures from right edge) */
+ JDIMENSION crop_yoffset; /* Y offset of selected region */
+ JCROP_CODE crop_yoffset_set; /* (negative measures from bottom edge) */
+
+ /* Internal workspace: caller should not touch these */
+ int num_components; /* # of components in workspace */
+ jvirt_barray_ptr * workspace_coef_arrays; /* workspace for transformations */
+ JDIMENSION output_width; /* cropped destination dimensions */
+ JDIMENSION output_height;
+ JDIMENSION x_crop_offset; /* destination crop offsets measured in iMCUs */
+ JDIMENSION y_crop_offset;
+ int iMCU_sample_width; /* destination iMCU size */
+ int iMCU_sample_height;
+} jpeg_transform_info;
+
+
+#if TRANSFORMS_SUPPORTED
+
+/* Parse a crop specification (written in X11 geometry style) */
+EXTERN(boolean) jtransform_parse_crop_spec
+ JPP((jpeg_transform_info *info, const char *spec));
+/* Request any required workspace */
+EXTERN(boolean) jtransform_request_workspace
+ JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info));
+/* Adjust output image parameters */
+EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters
+ JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
+ jvirt_barray_ptr *src_coef_arrays,
+ jpeg_transform_info *info));
+/* Execute the actual transformation, if any */
+EXTERN(void) jtransform_execute_transform
+ JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
+ jvirt_barray_ptr *src_coef_arrays,
+ jpeg_transform_info *info));
+/* Determine whether lossless transformation is perfectly
+ * possible for a specified image and transformation.
+ */
+EXTERN(boolean) jtransform_perfect_transform
+ JPP((JDIMENSION image_width, JDIMENSION image_height,
+ int MCU_width, int MCU_height,
+ JXFORM_CODE transform));
+
+/* jtransform_execute_transform used to be called
+ * jtransform_execute_transformation, but some compilers complain about
+ * routine names that long. This macro is here to avoid breaking any
+ * old source code that uses the original name...
+ */
+#define jtransform_execute_transformation jtransform_execute_transform
+
+#endif /* TRANSFORMS_SUPPORTED */
+
+
+/*
+ * Support for copying optional markers from source to destination file.
+ */
+
+typedef enum {
+ JCOPYOPT_NONE, /* copy no optional markers */
+ JCOPYOPT_COMMENTS, /* copy only comment (COM) markers */
+ JCOPYOPT_ALL /* copy all optional markers */
+} JCOPY_OPTION;
+
+#define JCOPYOPT_DEFAULT JCOPYOPT_COMMENTS /* recommended default */
+
+/* Setup decompression object to save desired markers in memory */
+EXTERN(void) jcopy_markers_setup
+ JPP((j_decompress_ptr srcinfo, JCOPY_OPTION option));
+/* Copy markers saved in the given source object to the destination object */
+EXTERN(void) jcopy_markers_execute
+ JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
+ JCOPY_OPTION option));
diff --git a/src/3rdparty/libjpeg/usage.doc b/src/3rdparty/libjpeg/usage.doc
deleted file mode 100644
index 8c4970af05..0000000000
--- a/src/3rdparty/libjpeg/usage.doc
+++ /dev/null
@@ -1,562 +0,0 @@
-USAGE instructions for the Independent JPEG Group's JPEG software
-=================================================================
-
-This file describes usage of the JPEG conversion programs cjpeg and djpeg,
-as well as the utility programs jpegtran, rdjpgcom and wrjpgcom. (See
-the other documentation files if you wish to use the JPEG library within
-your own programs.)
-
-If you are on a Unix machine you may prefer to read the Unix-style manual
-pages in files cjpeg.1, djpeg.1, jpegtran.1, rdjpgcom.1, wrjpgcom.1.
-
-
-INTRODUCTION
-
-These programs implement JPEG image compression and decompression. JPEG
-(pronounced "jay-peg") is a standardized compression method for full-color
-and gray-scale images. JPEG is designed to handle "real-world" scenes,
-for example scanned photographs. Cartoons, line drawings, and other
-non-realistic images are not JPEG's strong suit; on that sort of material
-you may get poor image quality and/or little compression.
-
-JPEG is lossy, meaning that the output image is not necessarily identical to
-the input image. Hence you should not use JPEG if you have to have identical
-output bits. However, on typical real-world images, very good compression
-levels can be obtained with no visible change, and amazingly high compression
-is possible if you can tolerate a low-quality image. You can trade off image
-quality against file size by adjusting the compressor's "quality" setting.
-
-
-GENERAL USAGE
-
-We provide two programs, cjpeg to compress an image file into JPEG format,
-and djpeg to decompress a JPEG file back into a conventional image format.
-
-On Unix-like systems, you say:
- cjpeg [switches] [imagefile] >jpegfile
-or
- djpeg [switches] [jpegfile] >imagefile
-The programs read the specified input file, or standard input if none is
-named. They always write to standard output (with trace/error messages to
-standard error). These conventions are handy for piping images between
-programs.
-
-On most non-Unix systems, you say:
- cjpeg [switches] imagefile jpegfile
-or
- djpeg [switches] jpegfile imagefile
-i.e., both the input and output files are named on the command line. This
-style is a little more foolproof, and it loses no functionality if you don't
-have pipes. (You can get this style on Unix too, if you prefer, by defining
-TWO_FILE_COMMANDLINE when you compile the programs; see install.doc.)
-
-You can also say:
- cjpeg [switches] -outfile jpegfile imagefile
-or
- djpeg [switches] -outfile imagefile jpegfile
-This syntax works on all systems, so it is useful for scripts.
-
-The currently supported image file formats are: PPM (PBMPLUS color format),
-PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster Toolkit
-format). (RLE is supported only if the URT library is available.)
-cjpeg recognizes the input image format automatically, with the exception
-of some Targa-format files. You have to tell djpeg which format to generate.
-
-JPEG files are in the defacto standard JFIF file format. There are other,
-less widely used JPEG-based file formats, but we don't support them.
-
-All switch names may be abbreviated; for example, -grayscale may be written
--gray or -gr. Most of the "basic" switches can be abbreviated to as little as
-one letter. Upper and lower case are equivalent (-BMP is the same as -bmp).
-British spellings are also accepted (e.g., -greyscale), though for brevity
-these are not mentioned below.
-
-
-CJPEG DETAILS
-
-The basic command line switches for cjpeg are:
-
- -quality N Scale quantization tables to adjust image quality.
- Quality is 0 (worst) to 100 (best); default is 75.
- (See below for more info.)
-
- -grayscale Create monochrome JPEG file from color input.
- Be sure to use this switch when compressing a grayscale
- BMP file, because cjpeg isn't bright enough to notice
- whether a BMP file uses only shades of gray. By
- saying -grayscale, you'll get a smaller JPEG file that
- takes less time to process.
-
- -optimize Perform optimization of entropy encoding parameters.
- Without this, default encoding parameters are used.
- -optimize usually makes the JPEG file a little smaller,
- but cjpeg runs somewhat slower and needs much more
- memory. Image quality and speed of decompression are
- unaffected by -optimize.
-
- -progressive Create progressive JPEG file (see below).
-
- -targa Input file is Targa format. Targa files that contain
- an "identification" field will not be automatically
- recognized by cjpeg; for such files you must specify
- -targa to make cjpeg treat the input as Targa format.
- For most Targa files, you won't need this switch.
-
-The -quality switch lets you trade off compressed file size against quality of
-the reconstructed image: the higher the quality setting, the larger the JPEG
-file, and the closer the output image will be to the original input. Normally
-you want to use the lowest quality setting (smallest file) that decompresses
-into something visually indistinguishable from the original image. For this
-purpose the quality setting should be between 50 and 95; the default of 75 is
-often about right. If you see defects at -quality 75, then go up 5 or 10
-counts at a time until you are happy with the output image. (The optimal
-setting will vary from one image to another.)
-
--quality 100 will generate a quantization table of all 1's, minimizing loss
-in the quantization step (but there is still information loss in subsampling,
-as well as roundoff error). This setting is mainly of interest for
-experimental purposes. Quality values above about 95 are NOT recommended for
-normal use; the compressed file size goes up dramatically for hardly any gain
-in output image quality.
-
-In the other direction, quality values below 50 will produce very small files
-of low image quality. Settings around 5 to 10 might be useful in preparing an
-index of a large image library, for example. Try -quality 2 (or so) for some
-amusing Cubist effects. (Note: quality values below about 25 generate 2-byte
-quantization tables, which are considered optional in the JPEG standard.
-cjpeg emits a warning message when you give such a quality value, because some
-other JPEG programs may be unable to decode the resulting file. Use -baseline
-if you need to ensure compatibility at low quality values.)
-
-The -progressive switch creates a "progressive JPEG" file. In this type of
-JPEG file, the data is stored in multiple scans of increasing quality. If the
-file is being transmitted over a slow communications link, the decoder can use
-the first scan to display a low-quality image very quickly, and can then
-improve the display with each subsequent scan. The final image is exactly
-equivalent to a standard JPEG file of the same quality setting, and the total
-file size is about the same --- often a little smaller. CAUTION: progressive
-JPEG is not yet widely implemented, so many decoders will be unable to view a
-progressive JPEG file at all.
-
-Switches for advanced users:
-
- -dct int Use integer DCT method (default).
- -dct fast Use fast integer DCT (less accurate).
- -dct float Use floating-point DCT method.
- The float method is very slightly more accurate than
- the int method, but is much slower unless your machine
- has very fast floating-point hardware. Also note that
- results of the floating-point method may vary slightly
- across machines, while the integer methods should give
- the same results everywhere. The fast integer method
- is much less accurate than the other two.
-
- -restart N Emit a JPEG restart marker every N MCU rows, or every
- N MCU blocks if "B" is attached to the number.
- -restart 0 (the default) means no restart markers.
-
- -smooth N Smooth the input image to eliminate dithering noise.
- N, ranging from 1 to 100, indicates the strength of
- smoothing. 0 (the default) means no smoothing.
-
- -maxmemory N Set limit for amount of memory to use in processing
- large images. Value is in thousands of bytes, or
- millions of bytes if "M" is attached to the number.
- For example, -max 4m selects 4000000 bytes. If more
- space is needed, temporary files will be used.
-
- -verbose Enable debug printout. More -v's give more printout.
- or -debug Also, version information is printed at startup.
-
-The -restart option inserts extra markers that allow a JPEG decoder to
-resynchronize after a transmission error. Without restart markers, any damage
-to a compressed file will usually ruin the image from the point of the error
-to the end of the image; with restart markers, the damage is usually confined
-to the portion of the image up to the next restart marker. Of course, the
-restart markers occupy extra space. We recommend -restart 1 for images that
-will be transmitted across unreliable networks such as Usenet.
-
-The -smooth option filters the input to eliminate fine-scale noise. This is
-often useful when converting dithered images to JPEG: a moderate smoothing
-factor of 10 to 50 gets rid of dithering patterns in the input file, resulting
-in a smaller JPEG file and a better-looking image. Too large a smoothing
-factor will visibly blur the image, however.
-
-Switches for wizards:
-
- -baseline Force baseline-compatible quantization tables to be
- generated. This clamps quantization values to 8 bits
- even at low quality settings. (This switch is poorly
- named, since it does not ensure that the output is
- actually baseline JPEG. For example, you can use
- -baseline and -progressive together.)
-
- -qtables file Use the quantization tables given in the specified
- text file.
-
- -qslots N[,...] Select which quantization table to use for each color
- component.
-
- -sample HxV[,...] Set JPEG sampling factors for each color component.
-
- -scans file Use the scan script given in the specified text file.
-
-The "wizard" switches are intended for experimentation with JPEG. If you
-don't know what you are doing, DON'T USE THEM. These switches are documented
-further in the file wizard.doc.
-
-
-DJPEG DETAILS
-
-The basic command line switches for djpeg are:
-
- -colors N Reduce image to at most N colors. This reduces the
- or -quantize N number of colors used in the output image, so that it
- can be displayed on a colormapped display or stored in
- a colormapped file format. For example, if you have
- an 8-bit display, you'd need to reduce to 256 or fewer
- colors. (-colors is the recommended name, -quantize
- is provided only for backwards compatibility.)
-
- -fast Select recommended processing options for fast, low
- quality output. (The default options are chosen for
- highest quality output.) Currently, this is equivalent
- to "-dct fast -nosmooth -onepass -dither ordered".
-
- -grayscale Force gray-scale output even if JPEG file is color.
- Useful for viewing on monochrome displays; also,
- djpeg runs noticeably faster in this mode.
-
- -scale M/N Scale the output image by a factor M/N. Currently
- the scale factor must be 1/1, 1/2, 1/4, or 1/8.
- Scaling is handy if the image is larger than your
- screen; also, djpeg runs much faster when scaling
- down the output.
-
- -bmp Select BMP output format (Windows flavor). 8-bit
- colormapped format is emitted if -colors or -grayscale
- is specified, or if the JPEG file is gray-scale;
- otherwise, 24-bit full-color format is emitted.
-
- -gif Select GIF output format. Since GIF does not support
- more than 256 colors, -colors 256 is assumed (unless
- you specify a smaller number of colors). If you
- specify -fast, the default number of colors is 216.
-
- -os2 Select BMP output format (OS/2 1.x flavor). 8-bit
- colormapped format is emitted if -colors or -grayscale
- is specified, or if the JPEG file is gray-scale;
- otherwise, 24-bit full-color format is emitted.
-
- -pnm Select PBMPLUS (PPM/PGM) output format (this is the
- default format). PGM is emitted if the JPEG file is
- gray-scale or if -grayscale is specified; otherwise
- PPM is emitted.
-
- -rle Select RLE output format. (Requires URT library.)
-
- -targa Select Targa output format. Gray-scale format is
- emitted if the JPEG file is gray-scale or if
- -grayscale is specified; otherwise, colormapped format
- is emitted if -colors is specified; otherwise, 24-bit
- full-color format is emitted.
-
-Switches for advanced users:
-
- -dct int Use integer DCT method (default).
- -dct fast Use fast integer DCT (less accurate).
- -dct float Use floating-point DCT method.
- The float method is very slightly more accurate than
- the int method, but is much slower unless your machine
- has very fast floating-point hardware. Also note that
- results of the floating-point method may vary slightly
- across machines, while the integer methods should give
- the same results everywhere. The fast integer method
- is much less accurate than the other two.
-
- -dither fs Use Floyd-Steinberg dithering in color quantization.
- -dither ordered Use ordered dithering in color quantization.
- -dither none Do not use dithering in color quantization.
- By default, Floyd-Steinberg dithering is applied when
- quantizing colors; this is slow but usually produces
- the best results. Ordered dither is a compromise
- between speed and quality; no dithering is fast but
- usually looks awful. Note that these switches have
- no effect unless color quantization is being done.
- Ordered dither is only available in -onepass mode.
-
- -map FILE Quantize to the colors used in the specified image
- file. This is useful for producing multiple files
- with identical color maps, or for forcing a predefined
- set of colors to be used. The FILE must be a GIF
- or PPM file. This option overrides -colors and
- -onepass.
-
- -nosmooth Use a faster, lower-quality upsampling routine.
-
- -onepass Use one-pass instead of two-pass color quantization.
- The one-pass method is faster and needs less memory,
- but it produces a lower-quality image. -onepass is
- ignored unless you also say -colors N. Also,
- the one-pass method is always used for gray-scale
- output (the two-pass method is no improvement then).
-
- -maxmemory N Set limit for amount of memory to use in processing
- large images. Value is in thousands of bytes, or
- millions of bytes if "M" is attached to the number.
- For example, -max 4m selects 4000000 bytes. If more
- space is needed, temporary files will be used.
-
- -verbose Enable debug printout. More -v's give more printout.
- or -debug Also, version information is printed at startup.
-
-
-HINTS FOR CJPEG
-
-Color GIF files are not the ideal input for JPEG; JPEG is really intended for
-compressing full-color (24-bit) images. In particular, don't try to convert
-cartoons, line drawings, and other images that have only a few distinct
-colors. GIF works great on these, JPEG does not. If you want to convert a
-GIF to JPEG, you should experiment with cjpeg's -quality and -smooth options
-to get a satisfactory conversion. -smooth 10 or so is often helpful.
-
-Avoid running an image through a series of JPEG compression/decompression
-cycles. Image quality loss will accumulate; after ten or so cycles the image
-may be noticeably worse than it was after one cycle. It's best to use a
-lossless format while manipulating an image, then convert to JPEG format when
-you are ready to file the image away.
-
-The -optimize option to cjpeg is worth using when you are making a "final"
-version for posting or archiving. It's also a win when you are using low
-quality settings to make very small JPEG files; the percentage improvement
-is often a lot more than it is on larger files. (At present, -optimize
-mode is always selected when generating progressive JPEG files.)
-
-GIF input files are no longer supported, to avoid the Unisys LZW patent.
-Use a Unisys-licensed program if you need to read a GIF file. (Conversion
-of GIF files to JPEG is usually a bad idea anyway.)
-
-
-HINTS FOR DJPEG
-
-To get a quick preview of an image, use the -grayscale and/or -scale switches.
-"-grayscale -scale 1/8" is the fastest case.
-
-Several options are available that trade off image quality to gain speed.
-"-fast" turns on the recommended settings.
-
-"-dct fast" and/or "-nosmooth" gain speed at a small sacrifice in quality.
-When producing a color-quantized image, "-onepass -dither ordered" is fast but
-much lower quality than the default behavior. "-dither none" may give
-acceptable results in two-pass mode, but is seldom tolerable in one-pass mode.
-
-If you are fortunate enough to have very fast floating point hardware,
-"-dct float" may be even faster than "-dct fast". But on most machines
-"-dct float" is slower than "-dct int"; in this case it is not worth using,
-because its theoretical accuracy advantage is too small to be significant
-in practice.
-
-Two-pass color quantization requires a good deal of memory; on MS-DOS machines
-it may run out of memory even with -maxmemory 0. In that case you can still
-decompress, with some loss of image quality, by specifying -onepass for
-one-pass quantization.
-
-To avoid the Unisys LZW patent, djpeg produces uncompressed GIF files. These
-are larger than they should be, but are readable by standard GIF decoders.
-
-
-HINTS FOR BOTH PROGRAMS
-
-If more space is needed than will fit in the available main memory (as
-determined by -maxmemory), temporary files will be used. (MS-DOS versions
-will try to get extended or expanded memory first.) The temporary files are
-often rather large: in typical cases they occupy three bytes per pixel, for
-example 3*800*600 = 1.44Mb for an 800x600 image. If you don't have enough
-free disk space, leave out -progressive and -optimize (for cjpeg) or specify
--onepass (for djpeg).
-
-On MS-DOS, the temporary files are created in the directory named by the TMP
-or TEMP environment variable, or in the current directory if neither of those
-exist. Amiga implementations put the temp files in the directory named by
-JPEGTMP:, so be sure to assign JPEGTMP: to a disk partition with adequate free
-space.
-
-The default memory usage limit (-maxmemory) is set when the software is
-compiled. If you get an "insufficient memory" error, try specifying a smaller
--maxmemory value, even -maxmemory 0 to use the absolute minimum space. You
-may want to recompile with a smaller default value if this happens often.
-
-On machines that have "environment" variables, you can define the environment
-variable JPEGMEM to set the default memory limit. The value is specified as
-described for the -maxmemory switch. JPEGMEM overrides the default value
-specified when the program was compiled, and itself is overridden by an
-explicit -maxmemory switch.
-
-On MS-DOS machines, -maxmemory is the amount of main (conventional) memory to
-use. (Extended or expanded memory is also used if available.) Most
-DOS-specific versions of this software do their own memory space estimation
-and do not need you to specify -maxmemory.
-
-
-JPEGTRAN
-
-jpegtran performs various useful transformations of JPEG files.
-It can translate the coded representation from one variant of JPEG to another,
-for example from baseline JPEG to progressive JPEG or vice versa. It can also
-perform some rearrangements of the image data, for example turning an image
-from landscape to portrait format by rotation.
-
-jpegtran works by rearranging the compressed data (DCT coefficients), without
-ever fully decoding the image. Therefore, its transformations are lossless:
-there is no image degradation at all, which would not be true if you used
-djpeg followed by cjpeg to accomplish the same conversion. But by the same
-token, jpegtran cannot perform lossy operations such as changing the image
-quality.
-
-jpegtran uses a command line syntax similar to cjpeg or djpeg.
-On Unix-like systems, you say:
- jpegtran [switches] [inputfile] >outputfile
-On most non-Unix systems, you say:
- jpegtran [switches] inputfile outputfile
-where both the input and output files are JPEG files.
-
-To specify the coded JPEG representation used in the output file,
-jpegtran accepts a subset of the switches recognized by cjpeg:
- -optimize Perform optimization of entropy encoding parameters.
- -progressive Create progressive JPEG file.
- -restart N Emit a JPEG restart marker every N MCU rows, or every
- N MCU blocks if "B" is attached to the number.
- -scans file Use the scan script given in the specified text file.
-See the previous discussion of cjpeg for more details about these switches.
-If you specify none of these switches, you get a plain baseline-JPEG output
-file. The quality setting and so forth are determined by the input file.
-
-The image can be losslessly transformed by giving one of these switches:
- -flip horizontal Mirror image horizontally (left-right).
- -flip vertical Mirror image vertically (top-bottom).
- -rotate 90 Rotate image 90 degrees clockwise.
- -rotate 180 Rotate image 180 degrees.
- -rotate 270 Rotate image 270 degrees clockwise (or 90 ccw).
- -transpose Transpose image (across UL-to-LR axis).
- -transverse Transverse transpose (across UR-to-LL axis).
-
-The transpose transformation has no restrictions regarding image dimensions.
-The other transformations operate rather oddly if the image dimensions are not
-a multiple of the iMCU size (usually 8 or 16 pixels), because they can only
-transform complete blocks of DCT coefficient data in the desired way.
-
-jpegtran's default behavior when transforming an odd-size image is designed
-to preserve exact reversibility and mathematical consistency of the
-transformation set. As stated, transpose is able to flip the entire image
-area. Horizontal mirroring leaves any partial iMCU column at the right edge
-untouched, but is able to flip all rows of the image. Similarly, vertical
-mirroring leaves any partial iMCU row at the bottom edge untouched, but is
-able to flip all columns. The other transforms can be built up as sequences
-of transpose and flip operations; for consistency, their actions on edge
-pixels are defined to be the same as the end result of the corresponding
-transpose-and-flip sequence.
-
-For practical use, you may prefer to discard any untransformable edge pixels
-rather than having a strange-looking strip along the right and/or bottom edges
-of a transformed image. To do this, add the -trim switch:
- -trim Drop non-transformable edge blocks.
-Obviously, a transformation with -trim is not reversible, so strictly speaking
-jpegtran with this switch is not lossless. Also, the expected mathematical
-equivalences between the transformations no longer hold. For example,
-"-rot 270 -trim" trims only the bottom edge, but "-rot 90 -trim" followed by
-"-rot 180 -trim" trims both edges.
-
-Another not-strictly-lossless transformation switch is:
- -grayscale Force grayscale output.
-This option discards the chrominance channels if the input image is YCbCr
-(ie, a standard color JPEG), resulting in a grayscale JPEG file. The
-luminance channel is preserved exactly, so this is a better method of reducing
-to grayscale than decompression, conversion, and recompression. This switch
-is particularly handy for fixing a monochrome picture that was mistakenly
-encoded as a color JPEG. (In such a case, the space savings from getting rid
-of the near-empty chroma channels won't be large; but the decoding time for
-a grayscale JPEG is substantially less than that for a color JPEG.)
-
-jpegtran also recognizes these switches that control what to do with "extra"
-markers, such as comment blocks:
- -copy none Copy no extra markers from source file. This setting
- suppresses all comments and other excess baggage
- present in the source file.
- -copy comments Copy only comment markers. This setting copies
- comments from the source file, but discards
- any other inessential data.
- -copy all Copy all extra markers. This setting preserves
- miscellaneous markers found in the source file, such
- as JFIF thumbnails and Photoshop settings. In some
- files these extra markers can be sizable.
-The default behavior is -copy comments. (Note: in IJG releases v6 and v6a,
-jpegtran always did the equivalent of -copy none.)
-
-Additional switches recognized by jpegtran are:
- -outfile filename
- -maxmemory N
- -verbose
- -debug
-These work the same as in cjpeg or djpeg.
-
-
-THE COMMENT UTILITIES
-
-The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file.
-Although the standard doesn't actually define what COM blocks are for, they
-are widely used to hold user-supplied text strings. This lets you add
-annotations, titles, index terms, etc to your JPEG files, and later retrieve
-them as text. COM blocks do not interfere with the image stored in the JPEG
-file. The maximum size of a COM block is 64K, but you can have as many of
-them as you like in one JPEG file.
-
-We provide two utility programs to display COM block contents and add COM
-blocks to a JPEG file.
-
-rdjpgcom searches a JPEG file and prints the contents of any COM blocks on
-standard output. The command line syntax is
- rdjpgcom [-verbose] [inputfilename]
-The switch "-verbose" (or just "-v") causes rdjpgcom to also display the JPEG
-image dimensions. If you omit the input file name from the command line,
-the JPEG file is read from standard input. (This may not work on some
-operating systems, if binary data can't be read from stdin.)
-
-wrjpgcom adds a COM block, containing text you provide, to a JPEG file.
-Ordinarily, the COM block is added after any existing COM blocks, but you
-can delete the old COM blocks if you wish. wrjpgcom produces a new JPEG
-file; it does not modify the input file. DO NOT try to overwrite the input
-file by directing wrjpgcom's output back into it; on most systems this will
-just destroy your file.
-
-The command line syntax for wrjpgcom is similar to cjpeg's. On Unix-like
-systems, it is
- wrjpgcom [switches] [inputfilename]
-The output file is written to standard output. The input file comes from
-the named file, or from standard input if no input file is named.
-
-On most non-Unix systems, the syntax is
- wrjpgcom [switches] inputfilename outputfilename
-where both input and output file names must be given explicitly.
-
-wrjpgcom understands three switches:
- -replace Delete any existing COM blocks from the file.
- -comment "Comment text" Supply new COM text on command line.
- -cfile name Read text for new COM block from named file.
-(Switch names can be abbreviated.) If you have only one line of comment text
-to add, you can provide it on the command line with -comment. The comment
-text must be surrounded with quotes so that it is treated as a single
-argument. Longer comments can be read from a text file.
-
-If you give neither -comment nor -cfile, then wrjpgcom will read the comment
-text from standard input. (In this case an input image file name MUST be
-supplied, so that the source JPEG file comes from somewhere else.) You can
-enter multiple lines, up to 64KB worth. Type an end-of-file indicator
-(usually control-D or control-Z) to terminate the comment text entry.
-
-wrjpgcom will not add a COM block if the provided comment string is empty.
-Therefore -replace -comment "" can be used to delete all COM blocks from a
-file.
-
-These utility programs do not depend on the IJG JPEG library. In
-particular, the source code for rdjpgcom is intended as an illustration of
-the minimum amount of code required to parse a JPEG file header correctly.
diff --git a/src/3rdparty/libjpeg/usage.txt b/src/3rdparty/libjpeg/usage.txt
new file mode 100644
index 0000000000..6e8546a6a4
--- /dev/null
+++ b/src/3rdparty/libjpeg/usage.txt
@@ -0,0 +1,617 @@
+USAGE instructions for the Independent JPEG Group's JPEG software
+=================================================================
+
+This file describes usage of the JPEG conversion programs cjpeg and djpeg,
+as well as the utility programs jpegtran, rdjpgcom and wrjpgcom. (See
+the other documentation files if you wish to use the JPEG library within
+your own programs.)
+
+If you are on a Unix machine you may prefer to read the Unix-style manual
+pages in files cjpeg.1, djpeg.1, jpegtran.1, rdjpgcom.1, wrjpgcom.1.
+
+
+INTRODUCTION
+
+These programs implement JPEG image encoding, decoding, and transcoding.
+JPEG (pronounced "jay-peg") is a standardized compression method for
+full-color and gray-scale images.
+
+
+GENERAL USAGE
+
+We provide two programs, cjpeg to compress an image file into JPEG format,
+and djpeg to decompress a JPEG file back into a conventional image format.
+
+On Unix-like systems, you say:
+ cjpeg [switches] [imagefile] >jpegfile
+or
+ djpeg [switches] [jpegfile] >imagefile
+The programs read the specified input file, or standard input if none is
+named. They always write to standard output (with trace/error messages to
+standard error). These conventions are handy for piping images between
+programs.
+
+On most non-Unix systems, you say:
+ cjpeg [switches] imagefile jpegfile
+or
+ djpeg [switches] jpegfile imagefile
+i.e., both the input and output files are named on the command line. This
+style is a little more foolproof, and it loses no functionality if you don't
+have pipes. (You can get this style on Unix too, if you prefer, by defining
+TWO_FILE_COMMANDLINE when you compile the programs; see install.txt.)
+
+You can also say:
+ cjpeg [switches] -outfile jpegfile imagefile
+or
+ djpeg [switches] -outfile imagefile jpegfile
+This syntax works on all systems, so it is useful for scripts.
+
+The currently supported image file formats are: PPM (PBMPLUS color format),
+PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster Toolkit
+format). (RLE is supported only if the URT library is available.)
+cjpeg recognizes the input image format automatically, with the exception
+of some Targa-format files. You have to tell djpeg which format to generate.
+
+JPEG files are in the defacto standard JFIF file format. There are other,
+less widely used JPEG-based file formats, but we don't support them.
+
+All switch names may be abbreviated; for example, -grayscale may be written
+-gray or -gr. Most of the "basic" switches can be abbreviated to as little as
+one letter. Upper and lower case are equivalent (-BMP is the same as -bmp).
+British spellings are also accepted (e.g., -greyscale), though for brevity
+these are not mentioned below.
+
+
+CJPEG DETAILS
+
+The basic command line switches for cjpeg are:
+
+ -quality N[,...] Scale quantization tables to adjust image quality.
+ Quality is 0 (worst) to 100 (best); default is 75.
+ (See below for more info.)
+
+ -grayscale Create monochrome JPEG file from color input.
+ Be sure to use this switch when compressing a grayscale
+ BMP file, because cjpeg isn't bright enough to notice
+ whether a BMP file uses only shades of gray. By
+ saying -grayscale, you'll get a smaller JPEG file that
+ takes less time to process.
+
+ -optimize Perform optimization of entropy encoding parameters.
+ Without this, default encoding parameters are used.
+ -optimize usually makes the JPEG file a little smaller,
+ but cjpeg runs somewhat slower and needs much more
+ memory. Image quality and speed of decompression are
+ unaffected by -optimize.
+
+ -progressive Create progressive JPEG file (see below).
+
+ -scale M/N Scale the output image by a factor M/N. Currently
+ supported scale factors are 8/N with all N from 1 to
+ 16.
+
+ -targa Input file is Targa format. Targa files that contain
+ an "identification" field will not be automatically
+ recognized by cjpeg; for such files you must specify
+ -targa to make cjpeg treat the input as Targa format.
+ For most Targa files, you won't need this switch.
+
+The -quality switch lets you trade off compressed file size against quality of
+the reconstructed image: the higher the quality setting, the larger the JPEG
+file, and the closer the output image will be to the original input. Normally
+you want to use the lowest quality setting (smallest file) that decompresses
+into something visually indistinguishable from the original image. For this
+purpose the quality setting should be between 50 and 95; the default of 75 is
+often about right. If you see defects at -quality 75, then go up 5 or 10
+counts at a time until you are happy with the output image. (The optimal
+setting will vary from one image to another.)
+
+-quality 100 will generate a quantization table of all 1's, minimizing loss
+in the quantization step (but there is still information loss in subsampling,
+as well as roundoff error). This setting is mainly of interest for
+experimental purposes. Quality values above about 95 are NOT recommended for
+normal use; the compressed file size goes up dramatically for hardly any gain
+in output image quality.
+
+In the other direction, quality values below 50 will produce very small files
+of low image quality. Settings around 5 to 10 might be useful in preparing an
+index of a large image library, for example. Try -quality 2 (or so) for some
+amusing Cubist effects. (Note: quality values below about 25 generate 2-byte
+quantization tables, which are considered optional in the JPEG standard.
+cjpeg emits a warning message when you give such a quality value, because some
+other JPEG programs may be unable to decode the resulting file. Use -baseline
+if you need to ensure compatibility at low quality values.)
+
+The -quality option has been extended in IJG version 7 for support of separate
+quality settings for luminance and chrominance (or in general, for every
+provided quantization table slot). This feature is useful for high-quality
+applications which cannot accept the damage of color data by coarse
+subsampling settings. You can now easily reduce the color data amount more
+smoothly with finer control without separate subsampling. The resulting file
+is fully compliant with standard JPEG decoders.
+Note that the -quality ratings refer to the quantization table slots, and that
+the last value is replicated if there are more q-table slots than parameters.
+The default q-table slots are 0 for luminance and 1 for chrominance with
+default tables as given in the JPEG standard. This is compatible with the old
+behaviour in case that only one parameter is given, which is then used for
+both luminance and chrominance (slots 0 and 1). More or custom quantization
+tables can be set with -qtables and assigned to components with -qslots
+parameter (see the "wizard" switches below).
+CAUTION: You must explicitly add -sample 1x1 for efficient separate color
+quality selection, since the default value used by library is 2x2!
+
+The -progressive switch creates a "progressive JPEG" file. In this type of
+JPEG file, the data is stored in multiple scans of increasing quality. If the
+file is being transmitted over a slow communications link, the decoder can use
+the first scan to display a low-quality image very quickly, and can then
+improve the display with each subsequent scan. The final image is exactly
+equivalent to a standard JPEG file of the same quality setting, and the total
+file size is about the same --- often a little smaller.
+
+Switches for advanced users:
+
+ -dct int Use integer DCT method (default).
+ -dct fast Use fast integer DCT (less accurate).
+ -dct float Use floating-point DCT method.
+ The float method is very slightly more accurate than
+ the int method, but is much slower unless your machine
+ has very fast floating-point hardware. Also note that
+ results of the floating-point method may vary slightly
+ across machines, while the integer methods should give
+ the same results everywhere. The fast integer method
+ is much less accurate than the other two.
+
+ -nosmooth Don't use high-quality downsampling.
+
+ -restart N Emit a JPEG restart marker every N MCU rows, or every
+ N MCU blocks if "B" is attached to the number.
+ -restart 0 (the default) means no restart markers.
+
+ -smooth N Smooth the input image to eliminate dithering noise.
+ N, ranging from 1 to 100, indicates the strength of
+ smoothing. 0 (the default) means no smoothing.
+
+ -maxmemory N Set limit for amount of memory to use in processing
+ large images. Value is in thousands of bytes, or
+ millions of bytes if "M" is attached to the number.
+ For example, -max 4m selects 4000000 bytes. If more
+ space is needed, temporary files will be used.
+
+ -verbose Enable debug printout. More -v's give more printout.
+ or -debug Also, version information is printed at startup.
+
+The -restart option inserts extra markers that allow a JPEG decoder to
+resynchronize after a transmission error. Without restart markers, any damage
+to a compressed file will usually ruin the image from the point of the error
+to the end of the image; with restart markers, the damage is usually confined
+to the portion of the image up to the next restart marker. Of course, the
+restart markers occupy extra space. We recommend -restart 1 for images that
+will be transmitted across unreliable networks such as Usenet.
+
+The -smooth option filters the input to eliminate fine-scale noise. This is
+often useful when converting dithered images to JPEG: a moderate smoothing
+factor of 10 to 50 gets rid of dithering patterns in the input file, resulting
+in a smaller JPEG file and a better-looking image. Too large a smoothing
+factor will visibly blur the image, however.
+
+Switches for wizards:
+
+ -arithmetic Use arithmetic coding. CAUTION: arithmetic coded JPEG
+ is not yet widely implemented, so many decoders will
+ be unable to view an arithmetic coded JPEG file at
+ all.
+
+ -baseline Force baseline-compatible quantization tables to be
+ generated. This clamps quantization values to 8 bits
+ even at low quality settings. (This switch is poorly
+ named, since it does not ensure that the output is
+ actually baseline JPEG. For example, you can use
+ -baseline and -progressive together.)
+
+ -qtables file Use the quantization tables given in the specified
+ text file.
+
+ -qslots N[,...] Select which quantization table to use for each color
+ component.
+
+ -sample HxV[,...] Set JPEG sampling factors for each color component.
+
+ -scans file Use the scan script given in the specified text file.
+
+The "wizard" switches are intended for experimentation with JPEG. If you
+don't know what you are doing, DON'T USE THEM. These switches are documented
+further in the file wizard.txt.
+
+
+DJPEG DETAILS
+
+The basic command line switches for djpeg are:
+
+ -colors N Reduce image to at most N colors. This reduces the
+ or -quantize N number of colors used in the output image, so that it
+ can be displayed on a colormapped display or stored in
+ a colormapped file format. For example, if you have
+ an 8-bit display, you'd need to reduce to 256 or fewer
+ colors. (-colors is the recommended name, -quantize
+ is provided only for backwards compatibility.)
+
+ -fast Select recommended processing options for fast, low
+ quality output. (The default options are chosen for
+ highest quality output.) Currently, this is equivalent
+ to "-dct fast -nosmooth -onepass -dither ordered".
+
+ -grayscale Force gray-scale output even if JPEG file is color.
+ Useful for viewing on monochrome displays; also,
+ djpeg runs noticeably faster in this mode.
+
+ -scale M/N Scale the output image by a factor M/N. Currently
+ supported scale factors are M/N with all M from 1 to
+ 16, where N is the source DCT size, which is 8 for
+ baseline JPEG. If the /N part is omitted, then M
+ specifies the DCT scaled size to be applied on the
+ given input. For baseline JPEG this is equivalent to
+ M/8 scaling, since the source DCT size for baseline
+ JPEG is 8. Scaling is handy if the image is larger
+ than your screen; also, djpeg runs much faster when
+ scaling down the output.
+
+ -bmp Select BMP output format (Windows flavor). 8-bit
+ colormapped format is emitted if -colors or -grayscale
+ is specified, or if the JPEG file is gray-scale;
+ otherwise, 24-bit full-color format is emitted.
+
+ -gif Select GIF output format. Since GIF does not support
+ more than 256 colors, -colors 256 is assumed (unless
+ you specify a smaller number of colors). If you
+ specify -fast, the default number of colors is 216.
+
+ -os2 Select BMP output format (OS/2 1.x flavor). 8-bit
+ colormapped format is emitted if -colors or -grayscale
+ is specified, or if the JPEG file is gray-scale;
+ otherwise, 24-bit full-color format is emitted.
+
+ -pnm Select PBMPLUS (PPM/PGM) output format (this is the
+ default format). PGM is emitted if the JPEG file is
+ gray-scale or if -grayscale is specified; otherwise
+ PPM is emitted.
+
+ -rle Select RLE output format. (Requires URT library.)
+
+ -targa Select Targa output format. Gray-scale format is
+ emitted if the JPEG file is gray-scale or if
+ -grayscale is specified; otherwise, colormapped format
+ is emitted if -colors is specified; otherwise, 24-bit
+ full-color format is emitted.
+
+Switches for advanced users:
+
+ -dct int Use integer DCT method (default).
+ -dct fast Use fast integer DCT (less accurate).
+ -dct float Use floating-point DCT method.
+ The float method is very slightly more accurate than
+ the int method, but is much slower unless your machine
+ has very fast floating-point hardware. Also note that
+ results of the floating-point method may vary slightly
+ across machines, while the integer methods should give
+ the same results everywhere. The fast integer method
+ is much less accurate than the other two.
+
+ -dither fs Use Floyd-Steinberg dithering in color quantization.
+ -dither ordered Use ordered dithering in color quantization.
+ -dither none Do not use dithering in color quantization.
+ By default, Floyd-Steinberg dithering is applied when
+ quantizing colors; this is slow but usually produces
+ the best results. Ordered dither is a compromise
+ between speed and quality; no dithering is fast but
+ usually looks awful. Note that these switches have
+ no effect unless color quantization is being done.
+ Ordered dither is only available in -onepass mode.
+
+ -map FILE Quantize to the colors used in the specified image
+ file. This is useful for producing multiple files
+ with identical color maps, or for forcing a predefined
+ set of colors to be used. The FILE must be a GIF
+ or PPM file. This option overrides -colors and
+ -onepass.
+
+ -nosmooth Don't use high-quality upsampling.
+
+ -onepass Use one-pass instead of two-pass color quantization.
+ The one-pass method is faster and needs less memory,
+ but it produces a lower-quality image. -onepass is
+ ignored unless you also say -colors N. Also,
+ the one-pass method is always used for gray-scale
+ output (the two-pass method is no improvement then).
+
+ -maxmemory N Set limit for amount of memory to use in processing
+ large images. Value is in thousands of bytes, or
+ millions of bytes if "M" is attached to the number.
+ For example, -max 4m selects 4000000 bytes. If more
+ space is needed, temporary files will be used.
+
+ -verbose Enable debug printout. More -v's give more printout.
+ or -debug Also, version information is printed at startup.
+
+
+HINTS FOR CJPEG
+
+Color GIF files are not the ideal input for JPEG; JPEG is really intended for
+compressing full-color (24-bit) images. In particular, don't try to convert
+cartoons, line drawings, and other images that have only a few distinct
+colors. GIF works great on these, JPEG does not. If you want to convert a
+GIF to JPEG, you should experiment with cjpeg's -quality and -smooth options
+to get a satisfactory conversion. -smooth 10 or so is often helpful.
+
+Avoid running an image through a series of JPEG compression/decompression
+cycles. Image quality loss will accumulate; after ten or so cycles the image
+may be noticeably worse than it was after one cycle. It's best to use a
+lossless format while manipulating an image, then convert to JPEG format when
+you are ready to file the image away.
+
+The -optimize option to cjpeg is worth using when you are making a "final"
+version for posting or archiving. It's also a win when you are using low
+quality settings to make very small JPEG files; the percentage improvement
+is often a lot more than it is on larger files. (At present, -optimize
+mode is always selected when generating progressive JPEG files.)
+
+GIF input files are no longer supported, to avoid the Unisys LZW patent.
+(Conversion of GIF files to JPEG is usually a bad idea anyway.)
+
+
+HINTS FOR DJPEG
+
+To get a quick preview of an image, use the -grayscale and/or -scale switches.
+"-grayscale -scale 1/8" is the fastest case.
+
+Several options are available that trade off image quality to gain speed.
+"-fast" turns on the recommended settings.
+
+"-dct fast" and/or "-nosmooth" gain speed at a small sacrifice in quality.
+When producing a color-quantized image, "-onepass -dither ordered" is fast but
+much lower quality than the default behavior. "-dither none" may give
+acceptable results in two-pass mode, but is seldom tolerable in one-pass mode.
+
+If you are fortunate enough to have very fast floating point hardware,
+"-dct float" may be even faster than "-dct fast". But on most machines
+"-dct float" is slower than "-dct int"; in this case it is not worth using,
+because its theoretical accuracy advantage is too small to be significant
+in practice.
+
+Two-pass color quantization requires a good deal of memory; on MS-DOS machines
+it may run out of memory even with -maxmemory 0. In that case you can still
+decompress, with some loss of image quality, by specifying -onepass for
+one-pass quantization.
+
+To avoid the Unisys LZW patent, djpeg produces uncompressed GIF files. These
+are larger than they should be, but are readable by standard GIF decoders.
+
+
+HINTS FOR BOTH PROGRAMS
+
+If more space is needed than will fit in the available main memory (as
+determined by -maxmemory), temporary files will be used. (MS-DOS versions
+will try to get extended or expanded memory first.) The temporary files are
+often rather large: in typical cases they occupy three bytes per pixel, for
+example 3*800*600 = 1.44Mb for an 800x600 image. If you don't have enough
+free disk space, leave out -progressive and -optimize (for cjpeg) or specify
+-onepass (for djpeg).
+
+On MS-DOS, the temporary files are created in the directory named by the TMP
+or TEMP environment variable, or in the current directory if neither of those
+exist. Amiga implementations put the temp files in the directory named by
+JPEGTMP:, so be sure to assign JPEGTMP: to a disk partition with adequate free
+space.
+
+The default memory usage limit (-maxmemory) is set when the software is
+compiled. If you get an "insufficient memory" error, try specifying a smaller
+-maxmemory value, even -maxmemory 0 to use the absolute minimum space. You
+may want to recompile with a smaller default value if this happens often.
+
+On machines that have "environment" variables, you can define the environment
+variable JPEGMEM to set the default memory limit. The value is specified as
+described for the -maxmemory switch. JPEGMEM overrides the default value
+specified when the program was compiled, and itself is overridden by an
+explicit -maxmemory switch.
+
+On MS-DOS machines, -maxmemory is the amount of main (conventional) memory to
+use. (Extended or expanded memory is also used if available.) Most
+DOS-specific versions of this software do their own memory space estimation
+and do not need you to specify -maxmemory.
+
+
+JPEGTRAN
+
+jpegtran performs various useful transformations of JPEG files.
+It can translate the coded representation from one variant of JPEG to another,
+for example from baseline JPEG to progressive JPEG or vice versa. It can also
+perform some rearrangements of the image data, for example turning an image
+from landscape to portrait format by rotation.
+
+jpegtran works by rearranging the compressed data (DCT coefficients), without
+ever fully decoding the image. Therefore, its transformations are lossless:
+there is no image degradation at all, which would not be true if you used
+djpeg followed by cjpeg to accomplish the same conversion. But by the same
+token, jpegtran cannot perform lossy operations such as changing the image
+quality.
+
+jpegtran uses a command line syntax similar to cjpeg or djpeg.
+On Unix-like systems, you say:
+ jpegtran [switches] [inputfile] >outputfile
+On most non-Unix systems, you say:
+ jpegtran [switches] inputfile outputfile
+where both the input and output files are JPEG files.
+
+To specify the coded JPEG representation used in the output file,
+jpegtran accepts a subset of the switches recognized by cjpeg:
+ -optimize Perform optimization of entropy encoding parameters.
+ -progressive Create progressive JPEG file.
+ -restart N Emit a JPEG restart marker every N MCU rows, or every
+ N MCU blocks if "B" is attached to the number.
+ -arithmetic Use arithmetic coding.
+ -scans file Use the scan script given in the specified text file.
+See the previous discussion of cjpeg for more details about these switches.
+If you specify none of these switches, you get a plain baseline-JPEG output
+file. The quality setting and so forth are determined by the input file.
+
+The image can be losslessly transformed by giving one of these switches:
+ -flip horizontal Mirror image horizontally (left-right).
+ -flip vertical Mirror image vertically (top-bottom).
+ -rotate 90 Rotate image 90 degrees clockwise.
+ -rotate 180 Rotate image 180 degrees.
+ -rotate 270 Rotate image 270 degrees clockwise (or 90 ccw).
+ -transpose Transpose image (across UL-to-LR axis).
+ -transverse Transverse transpose (across UR-to-LL axis).
+
+The transpose transformation has no restrictions regarding image dimensions.
+The other transformations operate rather oddly if the image dimensions are not
+a multiple of the iMCU size (usually 8 or 16 pixels), because they can only
+transform complete blocks of DCT coefficient data in the desired way.
+
+jpegtran's default behavior when transforming an odd-size image is designed
+to preserve exact reversibility and mathematical consistency of the
+transformation set. As stated, transpose is able to flip the entire image
+area. Horizontal mirroring leaves any partial iMCU column at the right edge
+untouched, but is able to flip all rows of the image. Similarly, vertical
+mirroring leaves any partial iMCU row at the bottom edge untouched, but is
+able to flip all columns. The other transforms can be built up as sequences
+of transpose and flip operations; for consistency, their actions on edge
+pixels are defined to be the same as the end result of the corresponding
+transpose-and-flip sequence.
+
+For practical use, you may prefer to discard any untransformable edge pixels
+rather than having a strange-looking strip along the right and/or bottom edges
+of a transformed image. To do this, add the -trim switch:
+ -trim Drop non-transformable edge blocks.
+Obviously, a transformation with -trim is not reversible, so strictly speaking
+jpegtran with this switch is not lossless. Also, the expected mathematical
+equivalences between the transformations no longer hold. For example,
+"-rot 270 -trim" trims only the bottom edge, but "-rot 90 -trim" followed by
+"-rot 180 -trim" trims both edges.
+
+If you are only interested in perfect transformation, add the -perfect switch:
+ -perfect Fails with an error if the transformation is not
+ perfect.
+For example you may want to do
+ jpegtran -rot 90 -perfect foo.jpg || djpeg foo.jpg | pnmflip -r90 | cjpeg
+to do a perfect rotation if available or an approximated one if not.
+
+We also offer a lossless-crop option, which discards data outside a given
+image region but losslessly preserves what is inside. Like the rotate and
+flip transforms, lossless crop is restricted by the current JPEG format: the
+upper left corner of the selected region must fall on an iMCU boundary. If
+this does not hold for the given crop parameters, we silently move the upper
+left corner up and/or left to make it so, simultaneously increasing the region
+dimensions to keep the lower right crop corner unchanged. (Thus, the output
+image covers at least the requested region, but may cover more.)
+
+The image can be losslessly cropped by giving the switch:
+ -crop WxH+X+Y Crop to a rectangular subarea of width W, height H
+ starting at point X,Y.
+
+Other not-strictly-lossless transformation switches are:
+
+ -grayscale Force grayscale output.
+This option discards the chrominance channels if the input image is YCbCr
+(ie, a standard color JPEG), resulting in a grayscale JPEG file. The
+luminance channel is preserved exactly, so this is a better method of reducing
+to grayscale than decompression, conversion, and recompression. This switch
+is particularly handy for fixing a monochrome picture that was mistakenly
+encoded as a color JPEG. (In such a case, the space savings from getting rid
+of the near-empty chroma channels won't be large; but the decoding time for
+a grayscale JPEG is substantially less than that for a color JPEG.)
+
+ -scale M/N Scale the output image by a factor M/N.
+Currently supported scale factors are M/N with all M from 1 to 16, where N is
+the source DCT size, which is 8 for baseline JPEG. If the /N part is omitted,
+then M specifies the DCT scaled size to be applied on the given input. For
+baseline JPEG this is equivalent to M/8 scaling, since the source DCT size
+for baseline JPEG is 8. CAUTION: An implementation of the JPEG SmartScale
+extension is required for this feature. SmartScale enabled JPEG is not yet
+widely implemented, so many decoders will be unable to view a SmartScale
+extended JPEG file at all.
+
+jpegtran also recognizes these switches that control what to do with "extra"
+markers, such as comment blocks:
+ -copy none Copy no extra markers from source file. This setting
+ suppresses all comments and other excess baggage
+ present in the source file.
+ -copy comments Copy only comment markers. This setting copies
+ comments from the source file, but discards
+ any other inessential (for image display) data.
+ -copy all Copy all extra markers. This setting preserves
+ miscellaneous markers found in the source file, such
+ as JFIF thumbnails, Exif data, and Photoshop settings.
+ In some files these extra markers can be sizable.
+The default behavior is -copy comments. (Note: in IJG releases v6 and v6a,
+jpegtran always did the equivalent of -copy none.)
+
+Additional switches recognized by jpegtran are:
+ -outfile filename
+ -maxmemory N
+ -verbose
+ -debug
+These work the same as in cjpeg or djpeg.
+
+
+THE COMMENT UTILITIES
+
+The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file.
+Although the standard doesn't actually define what COM blocks are for, they
+are widely used to hold user-supplied text strings. This lets you add
+annotations, titles, index terms, etc to your JPEG files, and later retrieve
+them as text. COM blocks do not interfere with the image stored in the JPEG
+file. The maximum size of a COM block is 64K, but you can have as many of
+them as you like in one JPEG file.
+
+We provide two utility programs to display COM block contents and add COM
+blocks to a JPEG file.
+
+rdjpgcom searches a JPEG file and prints the contents of any COM blocks on
+standard output. The command line syntax is
+ rdjpgcom [-raw] [-verbose] [inputfilename]
+The switch "-raw" (or just "-r") causes rdjpgcom to also output non-printable
+characters in comments, which are normally escaped for security reasons.
+The switch "-verbose" (or just "-v") causes rdjpgcom to also display the JPEG
+image dimensions. If you omit the input file name from the command line,
+the JPEG file is read from standard input. (This may not work on some
+operating systems, if binary data can't be read from stdin.)
+
+wrjpgcom adds a COM block, containing text you provide, to a JPEG file.
+Ordinarily, the COM block is added after any existing COM blocks, but you
+can delete the old COM blocks if you wish. wrjpgcom produces a new JPEG
+file; it does not modify the input file. DO NOT try to overwrite the input
+file by directing wrjpgcom's output back into it; on most systems this will
+just destroy your file.
+
+The command line syntax for wrjpgcom is similar to cjpeg's. On Unix-like
+systems, it is
+ wrjpgcom [switches] [inputfilename]
+The output file is written to standard output. The input file comes from
+the named file, or from standard input if no input file is named.
+
+On most non-Unix systems, the syntax is
+ wrjpgcom [switches] inputfilename outputfilename
+where both input and output file names must be given explicitly.
+
+wrjpgcom understands three switches:
+ -replace Delete any existing COM blocks from the file.
+ -comment "Comment text" Supply new COM text on command line.
+ -cfile name Read text for new COM block from named file.
+(Switch names can be abbreviated.) If you have only one line of comment text
+to add, you can provide it on the command line with -comment. The comment
+text must be surrounded with quotes so that it is treated as a single
+argument. Longer comments can be read from a text file.
+
+If you give neither -comment nor -cfile, then wrjpgcom will read the comment
+text from standard input. (In this case an input image file name MUST be
+supplied, so that the source JPEG file comes from somewhere else.) You can
+enter multiple lines, up to 64KB worth. Type an end-of-file indicator
+(usually control-D or control-Z) to terminate the comment text entry.
+
+wrjpgcom will not add a COM block if the provided comment string is empty.
+Therefore -replace -comment "" can be used to delete all COM blocks from a
+file.
+
+These utility programs do not depend on the IJG JPEG library. In
+particular, the source code for rdjpgcom is intended as an illustration of
+the minimum amount of code required to parse a JPEG file header correctly.
diff --git a/src/3rdparty/libjpeg/wizard.doc b/src/3rdparty/libjpeg/wizard.txt
index 54170b227d..54170b227d 100644
--- a/src/3rdparty/libjpeg/wizard.doc
+++ b/src/3rdparty/libjpeg/wizard.txt
diff --git a/src/3rdparty/libjpeg/wrjpgcom.1 b/src/3rdparty/libjpeg/wrjpgcom.1
new file mode 100644
index 0000000000..d419a99993
--- /dev/null
+++ b/src/3rdparty/libjpeg/wrjpgcom.1
@@ -0,0 +1,103 @@
+.TH WRJPGCOM 1 "15 June 1995"
+.SH NAME
+wrjpgcom \- insert text comments into a JPEG file
+.SH SYNOPSIS
+.B wrjpgcom
+[
+.B \-replace
+]
+[
+.BI \-comment " text"
+]
+[
+.BI \-cfile " name"
+]
+[
+.I filename
+]
+.LP
+.SH DESCRIPTION
+.LP
+.B wrjpgcom
+reads the named JPEG/JFIF file, or the standard input if no file is named,
+and generates a new JPEG/JFIF file on standard output. A comment block is
+added to the file.
+.PP
+The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file.
+Although the standard doesn't actually define what COM blocks are for, they
+are widely used to hold user-supplied text strings. This lets you add
+annotations, titles, index terms, etc to your JPEG files, and later retrieve
+them as text. COM blocks do not interfere with the image stored in the JPEG
+file. The maximum size of a COM block is 64K, but you can have as many of
+them as you like in one JPEG file.
+.PP
+.B wrjpgcom
+adds a COM block, containing text you provide, to a JPEG file.
+Ordinarily, the COM block is added after any existing COM blocks; but you
+can delete the old COM blocks if you wish.
+.SH OPTIONS
+Switch names may be abbreviated, and are not case sensitive.
+.TP
+.B \-replace
+Delete any existing COM blocks from the file.
+.TP
+.BI \-comment " text"
+Supply text for new COM block on command line.
+.TP
+.BI \-cfile " name"
+Read text for new COM block from named file.
+.PP
+If you have only one line of comment text to add, you can provide it on the
+command line with
+.BR \-comment .
+The comment text must be surrounded with quotes so that it is treated as a
+single argument. Longer comments can be read from a text file.
+.PP
+If you give neither
+.B \-comment
+nor
+.BR \-cfile ,
+then
+.B wrjpgcom
+will read the comment text from standard input. (In this case an input image
+file name MUST be supplied, so that the source JPEG file comes from somewhere
+else.) You can enter multiple lines, up to 64KB worth. Type an end-of-file
+indicator (usually control-D) to terminate the comment text entry.
+.PP
+.B wrjpgcom
+will not add a COM block if the provided comment string is empty. Therefore
+\fB\-replace \-comment ""\fR can be used to delete all COM blocks from a file.
+.SH EXAMPLES
+.LP
+Add a short comment to in.jpg, producing out.jpg:
+.IP
+.B wrjpgcom \-c
+\fI"View of my back yard" in.jpg
+.B >
+.I out.jpg
+.PP
+Attach a long comment previously stored in comment.txt:
+.IP
+.B wrjpgcom
+.I in.jpg
+.B <
+.I comment.txt
+.B >
+.I out.jpg
+.PP
+or equivalently
+.IP
+.B wrjpgcom
+.B -cfile
+.I comment.txt
+.B <
+.I in.jpg
+.B >
+.I out.jpg
+.SH SEE ALSO
+.BR cjpeg (1),
+.BR djpeg (1),
+.BR jpegtran (1),
+.BR rdjpgcom (1)
+.SH AUTHOR
+Independent JPEG Group
diff --git a/src/3rdparty/libpng/ANNOUNCE b/src/3rdparty/libpng/ANNOUNCE
index b73bbb5eb6..8bb11d2415 100644
--- a/src/3rdparty/libpng/ANNOUNCE
+++ b/src/3rdparty/libpng/ANNOUNCE
@@ -1,5 +1,5 @@
-Libpng 1.2.40 - September 10, 2009
+Libpng 1.4.0 - January 3, 2010
This is a public release of libpng, intended for use in production codes.
@@ -8,49 +8,352 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
- libpng-1.2.40.tar.xz (LZMA-compressed, recommended)
- libpng-1.2.40.tar.gz
- libpng-1.2.40.tar.bz2
-
-Source files with LF line endings (for Unix/Linux) without the
-"configure" script
-
- libpng-1.2.40-no-config.tar.xz (LZMA-compressed, recommended)
- libpng-1.2.40-no-config.tar.gz
- libpng-1.2.40-no-config.tar.bz2
+ libpng-1.4.0.tar.xz (LZMA-compressed, recommended)
+ libpng-1.4.0.tar.gz
+ libpng-1.4.0.tar.bz2
Source files with CRLF line endings (for Windows), without the
"configure" script
- lpng1240.zip
- lpng1240.7z
- lpng1240.tar.bz2
-
-Project files
-
- libpng-1.2.40-project-netware.zip
- libpng-1.2.40-project-wince.zip
+ lpng140.zip
+ lpng140.7z
Other information:
- libpng-1.2.40-README.txt
- libpng-1.2.40-KNOWNBUGS.txt
- libpng-1.2.40-LICENSE.txt
- libpng-1.2.40-Y2K-compliance.txt
- libpng-1.2.40-[previous version]-diff.txt
+ libpng-1.4.0-README.txt
+ libpng-1.4.0-LICENSE.txt
-Changes since the last public release (1.2.39):
+Changes since the last public release (1.2.10):
-version 1.2.40 [September 10, 2009]
+version 1.4.0 [January 3, 2010]
- Removed an extra png_debug() recently added to png_write_find_filter().
- Fixed incorrect #ifdef in pngset.c regarding unknown chunk support.
+ Enabled iTXt support (changes png_struct, thus requires so-number change).
+ Cleaned up PNG_ASSEMBLER_CODE_SUPPORTED vs PNG_MMX_CODE_SUPPORTED
+ Eliminated PNG_1_0_X and PNG_1_2_X macros.
+ Removed deprecated functions png_read_init, png_write_init, png_info_init,
+ png_permit_empty_plte, png_set_gray_1_2_4_to_8, and removed the
+ deprecated macro PNG_MAX_UINT.
+ Moved "PNG_INTERNAL" parts of png.h and pngconf.h into pngintrn.h
+ Removed all WIN32_WCE #ifdefs except those involving the
+ time.h "tm" structure (Cosmin)
+ Reduced dependency on C-runtime library when on Windows (Simon-Pierre)
+ Replaced sprintf() with png_sprintf() (Simon-Pierre)
+ Revised makefiles to avoid making links to libpng.so.*
+ Added a note in libpng.txt that png_set_sig_bytes(8) can be used when
+ writing an embedded PNG without the 8-byte signature.
+ Updated scripts/pngos2.def, pngw32.def, and projects/wince/png32ce.def
+ Added PNG_NO_GET_INT_32 and PNG_NO_SAVE_INT_32 macros.
+ Scripts/libpng.pc.in contained "configure" style version info and would
+ not work with makefiles.
+ Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid
+ buffer overflow.
+ Fixed bug in example.c (png_set_palette_rgb -> png_set_palette_to_rgb))
+ Changed sonum from 0 to 1.
+ Removed unused prototype for png_check_sig() from png.h
+ Prepended "#! /bin/sh" to ltmail.sh and contrib/pngminus/*.sh (Cosmin).
+ Avoided potential buffer overflow and optimized buffer in
+ png_write_sCAL(), png_write_sCAL_s() (Cosmin).
+ Removed the include directories and libraries from CFLAGS and LDFLAGS
+ in scripts/makefile.gcc (Nelson A. de Oliveira, Cosmin).
+ Exported png_write_sig (Cosmin).
+ Optimized buffer in png_handle_cHRM() (Cosmin).
+ Allow zero-length IDAT chunks after the entire zlib datastream, but not
+ after another intervening chunk type.
+ Set pHYs = 2835 x 2835 pixels per meter, and added
+ pngtest now produces, and made some cosmetic changes to pngtest output.
+ sCAL = 0.352778e-3 x 0.352778e-3 meters, in pngtest.png (Cosmin).
+ Added png_set_benign_errors(), png_benign_error(), png_chunk_benign_error().
+ Revised INSTALL and autogen.sh
+ Fixed typo in several makefiles (-W1 should be -Wl)
+ Added typedef for png_int_32 and png_uint_32 on 64-bit systems.
+ Added one zero element to png_gamma_shift[] array in pngrtran.c to avoid
+ reading out of bounds.
+ Added demonstration of user chunk support in pngtest.c, to support the
+ public sTER chunk and a private vpAg chunk.
+ Removed ordinals from scripts/pngw32.def and removed png_info_int and
+ png_set_gray_1_2_4_to_8 entries.
+ Inline call of png_get_uint_32() in png_get_uint_31().
+ Removed WINCE and Netware projects.
+ Removed standalone Y2KINFO file.
+ Removed AC_FUNC_MALLOC from configure.ac.
+ Added a warning when writing iCCP profile with mismatched profile length.
+ Patched pnggccrd.c to assemble on x86_64 platforms.
+ Moved chunk header reading into a separate function png_read_chunk_header()
+ in pngrutil.c. The chunk header (len+sig) is now serialized in a single
+ operation (Cosmin).
+ Implemented support for I/O states. Added png_ptr member io_state, and
+ functions png_get_io_chunk_name() and png_get_io_state() in pngget.c
+ (Cosmin).
+ Added png_get_io_chunk_name and png_get_io_state to scripts/*.def (Cosmin).
+ Renamed scripts/pngw32.* to scripts/pngwin.* (Cosmin).
+ Removed the include directories and libraries from CFLAGS and LDFLAGS
+ in scripts/makefile.gcc (Cosmin).
+ Used png_save_uint_32() to set vpAg width and height in pngtest.c (Cosmin).
+ Cast to proper type when getting/setting vpAg units in pngtest.c (Cosmin).
+ Added pngintrn.h to the Visual C++ projects (Cosmin).
+ Removed scripts/list (Cosmin).
+ Updated copyright year in scripts/pngwin.def (Cosmin).
+ Removed PNG_TYPECAST_NULL and used standard NULL consistently (Cosmin).
+ Disallowed the user to redefine png_size_t, and enforced a consistent use
+ of png_size_t across libpng (Cosmin).
+ Changed the type of png_ptr->rowbytes, PNG_ROWBYTES() and friends
+ to png_size_t (Cosmin).
+ Removed png_convert_size() and replaced png_sizeof with sizeof (Cosmin).
+ Removed some unnecessary type casts (Cosmin).
+ Changed prototype of png_get_compression_buffer_size() and
+ png_set_compression_buffer_size() to work with png_size_t instead of
+ png_uint_32 (Cosmin).
+ Removed png_memcpy_check() and png_memset_check() (Cosmin).
+ Fixed a typo (png_byte --> png_bytep) in libpng.3 and libpng.txt (Cosmin).
+ Clarified that png_zalloc() does not clear the allocated memory,
+ and png_zalloc() and png_zfree() cannot be PNGAPI (Cosmin).
+ Renamed png_mem_size_t to png_alloc_size_t, fixed its definition in
+ pngconf.h, and used it in all memory allocation functions (Cosmin).
+ Renamed pngintrn.h to pngpriv.h, added a comment at the top of the file
+ mentioning that the symbols declared in that file are private, and
+ updated the scripts and the Visual C++ projects accordingly (Cosmin).
+ Removing trailing '.' from the warning and error messages (Cosmin).
+ Revised many of the makefiles to write their defines in pngdefs.h.
+ Changed "logical" to "bitwise" in the documentation.
+ Work around Intel-Mac compiler bug by setting PNG_NO_MMX_CODE in pngconf.h
+ Add a typecast to stifle compiler warning in pngrutil.c
+ Detect and fix attempt to write wrong iCCP profile length.
+ Fix potential buffer overflow in sPLT chunk handler.
+ Fix Makefile.am to not try to link to noexistent files.
+ Check all exported functions for NULL png_ptr.
+ Built Makefile.in with automake-1.9.6 instead of 1.9.2.
+ Add "install: all" in Makefile.am so "configure; make install" will work.
+ Added a typecast in png_zalloc().
+ Changed "new_key[79] = '\0';" to "(*new_key)[79] = '\0';" in pngwutil.c
+ Add "png_bytep" typecast to profile while calculating length in pngwutil.c
+ Added scripts/CMakeLists.txt
+ Added "png_ptr->num_trans=0" before error return in png_handle_tRNS,
+ to eliminate a vulnerability (CVE-2007-2554, CERT VU#684664)
+ Added png_ptr->unknown_chunk to hold working unknown chunk data, so it
+ can be free'ed in case of error. Revised unknown chunk handling in
+ pngrutil.c and pngpread.c to use this structure.
+ Prefer PNG_USE_PNGVCRD when _MSC_VER is defined in pngconf.h
+ Revised pngvcrd.c for improved efficiency.
+ Moved local array "chunkdata" from pngrutil.c to the png_struct, so
+ it will be freed by png_read_destroy() in case of a read error (Kurt
+ Christensen).
+ Change "purpose" and "buffer" to png_ptr->chunkdata to avoid memory leaking.
+ Change all "chunkdata" to "png_ptr->chunkdata" in png_decompress_chunk(),
+ and remove "chunkdata" from parameter list.
+ Put a call to png_check_chunk_name() in png_read_chunk_header().
+ Removed two calls to png_check_chunk_name() occuring later in the process.
+ Define PNG_NO_ERROR_NUMBERS by default in pngconf.h
+ Added png_push_have_buffer() function to pngpread.c
+ Eliminated PNG_BIG_ENDIAN_SUPPORTED and associated png_get_* macros.
+ Made inline expansion of png_get_*() optional with PNG_USE_READ_MACROS.
+ Eliminated all PNG_USELESS_TESTS and PNG_CORRECT_PALETTE_SUPPORTED code.
+ Synced contrib directory and configure files with libpng-1.2.30beta06.
+ Changed "-Wall" to "-W -Wall" in the CFLAGS in all makefiles (Cosmin Truta)
+ Declared png_ptr "volatile" in pngread.c and pngwrite.c to avoid warnings.
+ Updated contrib/visupng/cexcept.h to version 2.0.1
+ Added PNG_LITERAL_CHARACTER macros for #, [, and ].
+ Moved newline character from individual png_debug messages into the
+ png_debug macros.
+ Allow user to #define their own png_debug, png_debug1, and png_debug2.
+ Added PNG_STRING_NEWLINE macro
+ Added PNG_STRING_COPYRIGHT macro.
+ Added non-ISO versions of png_debug macros.
+ Added PNG_WRITE_FLUSH_SUPPORTED and PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED
+ blocks around new png_flush() call.
+ Revised PNG_NO_STDIO version of png_write_flush()
+ Added png_get|set_chunk_cache_max() to limit the total number of sPLT,
+ text, and unknown chunks that can be stored.
+ Shortened tIME_string to 29 bytes in pngtest.c
+ Revised makefile.darwin to fix shared library numbering.
+ Change png_set_gray_1_2_4_to_8() to png_set_expand_gray_1_2_4_to_8()
+ in example.c (debian bug report)
+ Sync with tEXt vulnerability fix in libpng-1.2.33rc02.
+ Added png_check_cHRM in png.c and moved checking from pngget.c, pngrutil.c,
+ and pngwrite.c
+ Added check for zero-area RGB cHRM triange in png_check_cHRM() and
+ png_check_cHRM_fixed().
+ Revised png_warning() to write its message on standard output by default
+ when warning_fn is NULL.
+ Eliminated png_check_cHRM(). Instead, always use png_check_cHRM_fixed().
+ In png_check_cHRM_fixed(), ensure white_y is > 0, and removed redundant
+ check for all-zero coordinates that is detected by the triangle check.
+ Rearranged test expressions in png_check_cHRM_fixed() to avoid internal
+ overflows.
+ Added PNG_NO_CHECK_cHRM conditional.
+ Fixed string vs pointer-to-string error in png_check_keyword().
+ Added PNG_NO_CHECK_cHRM conditional.
+ Merge png_debug with version 1.2.34beta04.
+ Removed redundant check for key==NULL before calling png_check_keyword()
+ to ensure that new_key gets initialized and removed extra warning
+ (Merge with version 1.2.34beta05 -- Arvan Pritchard).
+ Added PNG_TRANSFORM_STRIP_FILLER_BEFORE and PNG_TRANSFORM_STRIP_FILLER_AFTER
+ conditionals and deprecated PNG_TRANSFORM_STRIP_FILLER (Jim Barry).
+ Turned off PNG_READ_DITHER_SUPPORTED by default.
+ Combined several instances of png_malloc(); png_memset() into png_calloc().
+ Fixed order of #ifdef directives in the png_debug defines in png.h
+ (bug introduced in libpng-1.2.34).
+ Revised comments in png_set_read_fn() and png_set_write_fn().
+ Use png_calloc() instead of png_malloc() to allocate big_row_buf when
+ reading an interlaced file, to avoid a possible UMR.
+ Revised libpng*.txt and png.h documentation about use of png_write_flush()
+ and png_set_write_fn().
+ Removed fflush() from pngtest.c.
+ Added "#define PNG_NO_WRITE_FLUSH" to contrib/pngminim/encoder/pngusr.h
+ Removed fflush() from pngtest.c.
+ Added "#define PNG_NO_WRITE_FLUSH" to contrib/pngminim/encoder/pngusr.h
+ Added a section on differences between 1.0.x and 1.2.x to libpng.3/libpng.txt
+ Fixed potential memory leak of "new_name" in png_write_iCCP() (Ralph Giles)
+ Added "ifndef PNG_SKIP_SETJMP_CHECK" block in pngconf.h to allow
+ application code writers to bypass the check for multiple inclusion
+ of setjmp.h when they know that it is safe to ignore the situation.
+ Eliminated internal use of setjmp() in pngread.c and pngwrite.c
+ Eliminated deprecated png_read_init_3() and png_write_init_3() functions.
+ Renamed "user_chunk_data" to "my_user_chunk_data" in pngtest.c to suppress
+ "shadowed declaration" warning from gcc-4.3.3.
+ Renamed "gamma" to "png_gamma" in pngset.c to avoid "shadowed declaration"
+ warning about a global "gamma" variable in math.h on some platforms.
+ Removed pngprefs.h and MMX from makefiles
+ Rebuilt configure scripts with autoconf-2.63 instead of 2.62
+ Clarified usage of sig_bit versus sig_bit_p in example.c (Vincent Torri)
+ Reformated sources in libpng style (3-space intentation, comment format)
+ Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG)
+ Added sections about the git repository and our coding style to the
+ documentation
+ Relocated misplaced #endif in pngwrite.c, sCAL chunk handler.
+ Conditionally compile png_read_finish_row() which is not used by
+ progressive readers.
+ Added contrib/pngminim/preader to demonstrate building minimal progressive
+ decoder, based on contrib/gregbook with embedded libpng and zlib.
+ In contrib/pngminim/*, renamed "makefile.std" to "makefile", since there
+ is only one makefile in those directories, and revised the README files
+ accordingly.
+ Added "#define PNG_NO_WRITE_SWAP" to contrib/pngminim/encoder/pngusr.h
+ and "define PNG_NO_READ_SWAP" to decoder/pngusr.h and preader/pngusr.h
+ Added a section in the documentation about using png_get_io_ptr() in
+ configure scripts to detect the presence of libpng.
+ Revised libpng*.txt and libpng.3 to mention calling png_set_IHDR()
+ multiple times and to specify the sample order in the tRNS chunk,
+ because the ISO PNG specification has a typo in the tRNS table.
+ Changed several PNG_UNKNOWN_CHUNK_SUPPORTED to
+ PNG_HANDLE_AS_UNKNOWN_SUPPORTED, to make the png_set_keep mechanism
+ available for ignoring known chunks even when not saving unknown chunks.
+ Adopted preference for consistent use of "#ifdef" and "#ifndef" versus
+ "#if defined()" and "if !defined()" where possible.
+ Eliminated PNG_LEGACY_SUPPORTED code.
+ Moved the various unknown chunk macro definitions outside of the
+ PNG_READ|WRITE_ANCILLARY_CHUNK_SUPPORTED blocks.
+ Added a reference to the libpng license in each file.
+ Relocated INVERT_ALPHA within png_read_png() and png_write_png().
+ Added high-level API transform PNG_TRANSFORM_GRAY_TO_RGB.
+ Added an "xcode" project to the projects directory (Alam Arias).
+ Avoid some tests in filter selection in pngwutil.c
+ Avoid a possible NULL dereference in debug build, in png_set_text_2().
+ (bug introduced in libpng-0.95, discovered by Evan Rouault)
+ Rebuilt configure scripts with autoconf-2.65
+ Replaced *.tar.lzma with *.tar.xz in distribution. Get the xz codec
+ from <http://tukaani.org/xz>.
+ Reject attempt to write iCCP chunk with negative embedded profile length
+ (JD Chen)
+ Changed "trans" to "trans_alpha" and changed "trans_values" to "trans_color".
+ Removed lpXYZ.tar.bz2 (with CRLF), KNOWNBUG, libpng-x.y.z-KNOWNBUG.txt,
+ and the "noconfig" files from the distribution.
+ Moved CMakeLists.txt from scripts into the main libpng directory.
Various bugfixes and improvements to CMakeLists.txt (Philip Lowman)
+ Converted all PNG_NO_* tests to PNG_*_SUPPORTED everywhere except pngconf.h
+ Eliminated PNG_NO_FREE_ME and PNG_FREE_ME_SUPPORTED macros.
+ Use png_malloc plus a loop instead of png_calloc() to initialize
+ row_pointers in png_read_png().
+ Eliminated PNG_GLOBAL_ARRAYS and PNG_LOCAL_ARRAYS; always use local arrays.
+ Eliminated PNG_CALLOC_SUPPORTED macro and always provide png_calloc().
+ Removed scripts/libpng.icc
+ Changed typecast of filler from png_byte to png_uint_16 in png_set_filler().
+ (Dennis Gustafsson)
+ Eliminated unused PNG_FLAG_FREE_* defines from pngpriv.h
+ Expanded TAB characters in pngrtran.c
+ Removed PNG_CONST from all "PNG_CONST PNG_CHNK" declarations to avoid
+ compiler complaints about doubly declaring things "const".
+ Eliminated unused png_ptr->row_buf_size
+ Changed all "#if [!]defined(X)" to "if[n]def X" where possible.
+ Moved redundant IHDR checking into new png_check_IHDR() in png.c
+ and report all errors found in the IHDR data.
+ Eliminated useless call to png_check_cHRM() from pngset.c
+ Eliminated a shadowed declaration of "pp" in png_handle_sPLT().
+ Patched ltmain.sh for wince support.
+ Added PNG_CONVERT_tIME_SUPPORTED macro.
+ Make inclusion of time.h in pngconf.h depend on PNG_CONVERT_tIME_SUPPORTED
+ Make #define PNG_CONVERT_tIME_SUPPORTED depend on PNG_WRITE_tIME_SUPPORTED
+ Updated scripts/pngw32.def and projects/wince/png32ce.def
+ Copied projects/wince/png32ce.def to the scripts directory.
+ Added scripts/makefile.cegcc
+ Revised libpng*.txt to describe differences from 1.2.40 to 1.4.0
+ Added PNG_DEPSTRUCT, PNG_DEPRECATED, PNG_USE_RESULT, PNG_NORETURN, and
+ PNG_ALLOCATED macros to detect deprecated direct access to the
+ png_struct or info_struct members and other deprecated usage in
+ applications (John Bowler).
+ Updated scripts/makefile* to add "-DPNG_CONFIGURE_LIBPNG" to CFLAGS,
+ to prevent warnings about direct access to png structs by libpng
+ functions while building libpng. They need to be tested, especially
+ those using compilers other than gcc.
+ Updated CMakeLists.txt to add "-DPNG_CONFIGURE_LIBPNG" to the definitions.
+ Updated projects/visualc6 and visualc71 with "/d PNG_CONFIGURE_LIBPNG".
+ They should work but still need to be updated to remove
+ references to pnggccrd.c or pngvcrd.c and ASM building.
+ Added README.txt to the beos, cbuilder5, netware, and xcode projects warning
+ that they need to be updated, to remove references to pnggccrd.c and
+ pngvcrd.c and to depend on pngpriv.h
+ Removed three direct references to read_info_ptr members in pngtest.c
+ that were detected by the new PNG_DEPSTRUCT macro.
+ Moved the png_debug macro definitions and the png_read_destroy(),
+ png_write_destroy() and png_far_to_near() prototypes from png.h
+ to pngpriv.h (John Bowler)
+ Moved the synopsis lines for png_read_destroy(), png_write_destroy()
+ png_debug(), png_debug1(), and png_debug2() from libpng.3 to libpngpf.3.
+ Removed the obsolete, unused pnggccrd.c and pngvcrd.c files.
+ Removed dependency of pngtest.o on pngpriv.h in the makefiles.
+ Added -DPNG_CONFIGURE_LIBPNG to contrib/pngminm/*/makefile
+ Changed png_check_sig() to !png_sig_cmp() in contrib programs.
+ Corrected the png_get_IHDR() call in contrib/gregbook/readpng2.c
+ Changed pngminim/*/gather.sh to stop trying to remove pnggccrd.c and pngvcrd.c
+ Added dependency on pngpriv.h in contrib/pngminim/*/makefile
+ Revised Makefile.am to use libpng.sys while building libpng.so
+ so that only PNG_EXPORT functions are exported.
+ Removed the deprecated png_check_sig() function/macro.
+ Removed recently removed function names from scripts/*.def
+ Added PNG_PRIVATE macro definition in pngconf.h for possible future use.
+ Removed projects/beos and netware.txt; no one seems to be supporting them.
+ Moved libpng-config.in and libpng.pc-configure.in out of the scripts
+ directory, to libpng-config.in and libpng.pc.in, respectively, and
+ modified Makefile.am and configure.ac accordingly. Now "configure"
+ needs nothing from the "scripts" directory.
+ Removed ASM builds from projects/visualc6 and projects/visualc71
+ Removed scripts/makefile.nommx and makefile.vcawin32
+ Revised CMakeLists.txt to account for new location of libpng-config.in
+ and libpng.pc.in
+ Updated INSTALL to reflect removal and relocation of files.
+ Moved descriptions of makefiles and other scripts out of INSTALL into
+ scripts/README.txt
+ Updated the copyright year in scripts/pngwin.rc from 2006 to 2009.
+ Removed obsolete comments about ASM from projects/visualc71/README_zlib.txt
+ Align row_buf on 16-byte boundary in memory.
+ Make the 'png_jmpbuf' macro expand to a call that records the correct
+ longjmp function as well as returning a pointer to the setjmp
+ jmp_buf buffer, and marked direct access to jmpbuf 'deprecated'.
+ (John Bowler)
+ Changed "/255" to "/255.0" in background calculations to make it clear
+ that the 255 is used as a double.
+ Added "#define PNG_NO_PEDANTIC_WARNINGS" in the libpng source files.
+ Revised scripts/makefile.netbsd, makefile.openbsd, and makefile.sco
+ to put png.h and pngconf.h in $prefix/include, like the other scripts,
+ instead of in $prefix/include/libpng. Also revised makefile.sco
+ to put them in $prefix/include/libpng14 instead of in
+ $prefix/include/libpng/libpng14.
+ Added "bit_depth" parameter to the private png_build_gamma_table() function.
+ Use png_calloc() instead of png_malloc(); png_memset() in pngrutil.c
+ Avoid deprecated references to png_ptr-io_ptr and png_ptr->error_ptr
+ in pngtest.c
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
-
-Send comments/corrections/commendations to png-mng-implement at lists.sf.net
-(subscription required; visit
+(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe) or to glennrp at users.sourceforge.net
diff --git a/src/3rdparty/libpng/CHANGES b/src/3rdparty/libpng/CHANGES
index 9bb8ac88b1..df44f166ec 100644
--- a/src/3rdparty/libpng/CHANGES
+++ b/src/3rdparty/libpng/CHANGES
@@ -1,4 +1,5 @@
-/*
+#if 0
+libpng_changes(){ /*
CHANGES - changes for libpng
version 0.2
@@ -539,7 +540,7 @@ version 1.0.5d [November 29, 1999]
Eliminated pngtypes.h; use macros instead to declare PNG_CHNK arrays.
Renamed "PNG_GLOBAL_ARRAYS" to "PNG_USE_GLOBAL_ARRAYS" and made available
to applications a macro "PNG_USE_LOCAL_ARRAYS".
- Remove all the new declarations with #ifdef/#endif when
+ comment out (with #ifdef) all the new declarations when
PNG_USE_GLOBAL_ARRAYS is defined.
Added PNG_EXPORT_VAR macro to accommodate making DLL's.
version 1.0.5e [November 30, 1999]
@@ -1301,7 +1302,7 @@ version 1.2.6beta4 [July 28, 2004]
Added PNG_NO_SEQUENTIAL_READ_SUPPORTED macro to conditionally remove
sequential read support.
Added some "#if PNG_WRITE_SUPPORTED" blocks.
- Removed some redundancy with #ifdef/#endif in png_malloc_default().
+ Added #ifdef to remove some redundancy in png_malloc_default().
Use png_malloc instead of png_zalloc to allocate the pallete.
version 1.0.16rc1 and 1.2.6rc1 [August 4, 2004]
Fixed buffer overflow vulnerability in png_handle_tRNS()
@@ -1371,8 +1372,8 @@ version 1.2.8beta1 [November 1, 2004]
Fixed bug, introduced in libpng-1.2.7, that overruns a buffer during
strip alpha operation in png_do_strip_filler().
Added PNG_1_2_X definition in pngconf.h
- Comment out with #ifdef/#endif png_info_init in png.c and png_read_init
- in pngread.c (as of 1.3.0)
+ Use #ifdef to comment out png_info_init in png.c and png_read_init in
+ pngread.c (as of 1.3.0)
version 1.2.8beta2 [November 2, 2004]
Reduce color_type to a nonalpha type after strip alpha operation in
png_do_strip_filler().
@@ -1671,7 +1672,7 @@ version 1.2.15rc2 [December 21, 2006]
Added scripts/makefile.nommx
version 1.2.15rc3 [December 25, 2006]
- Fixed shared library numbering error that was introduced in 1.2.15beta6.
+ Fixed shared library numbering error that was intruduced in 1.2.15beta6.
version 1.2.15rc4 [December 27, 2006]
Fixed handling of rgb_to_gray when png_ptr->color.gray isn't set.
@@ -1679,7 +1680,7 @@ version 1.2.15rc4 [December 27, 2006]
version 1.2.15rc5 [December 31, 2006]
Revised handling of rgb_to_gray.
-version 1.0.23, 1.2.15 [January 5, 2007]
+version 1.2.15 [January 5, 2007]
Added some (unsigned long) typecasts in pngtest.c to avoid printing errors.
version 1.2.16beta1 [January 6, 2007]
@@ -1688,7 +1689,7 @@ version 1.2.16beta1 [January 6, 2007]
version 1.2.16beta2 [January 16, 2007]
Revised scripts/CMakeLists.txt
-version 1.0.24, 1.2.16 [January 31, 2007]
+version 1.2.16 [January 31, 2007]
No changes.
version 1.2.17beta1 [March 6, 2007]
@@ -1759,8 +1760,8 @@ version 1.2.19beta6 [May 22, 2007]
version 1.2.19beta7 [May 22, 2007]
Squelched png_squelch_warnings() in pnggccrd.c and added
- an #ifdef PNG_MMX_CODE_SUPPORTED/#endif block around the declarations
- that caused the warnings that png_squelch_warnings was squelching.
+ an #ifdef PNG_MMX_CODE_SUPPORTED block around the declarations that caused
+ the warnings that png_squelch_warnings was squelching.
version 1.2.19beta8 [May 22, 2007]
Removed __MMX__ from test in pngconf.h.
@@ -1773,636 +1774,385 @@ version 1.2.19beta9 [May 23, 2007]
version 1.2.19beta10 [May 24, 2007]
Resquelched png_squelch_warnings(), use "__attribute__((used))" instead.
-version 1.2.19beta11 [May 28, 2007]
- Return 0 from png_get_sPLT() and png_get_unknown_chunks() if png_ptr is NULL;
- changed three remaining instances of png_strcpy() to png_strncpy() (David
- Hill).
- Make test for NULL row_buf at the beginning of png_do_read_transformations
- unconditional.
-
-version 1.2.19beta12 [May 28, 2007]
- Revised pnggccrd.c.
-
-version 1.2.19beta13 [June 14, 2007]
- Prefer PNG_USE_PNGVCRD when _MSC_VER is defined in pngconf.h
-
-version 1.2.19beta14 [June 16, 2007]
- Fix bug with handling of 16-bit transparency, introduced in 1.2.19beta2
-
-version 1.2.19beta15 [June 17, 2007]
- Revised pnggccrd.c.
-
-version 1.2.19beta16 [June 18, 2007]
- Revised pnggccrd.c again.
- Updated contrib/gregbook.
- Changed '#include "pnggccrd.c"' to 'include "$srcdir/pnggccrd.c"'
- in configure.ac
-
-version 1.2.19beta17 [June 19, 2007]
- Revised many of the makefiles, to set -DPNG_NO_MMX_CODE where needed
- and to not use -O3 unless -DPNG_NO_MMX_CODE is also set.
-
-version 1.2.19beta18 [June 23, 2007]
- Replaced some C++ style comments with C style comments in pnggccrd.c.
- Copied optimized C code from pnggccrd.c to pngrutil.c, removed dependency
- on pnggccrd.o from many makefiles.
- Added sl and dylib to list of extensions be installed by Makefile.am
-
-version 1.2.19beta19 [June 28, 2007]
- Fixed testing PNG_RGB_TO_GRAY_ERR & PNG_RGB_TO_GRAY_WARN in pngrtran.c
- More cleanup of pnggccrd.c and pngvcrd.c
-
-version 1.2.19beta20 [June 29, 2007]
- Rebuilt Makefile.in and configure using libtool-1.5.24.
- Fixed typo in pnggccrd.c
-
-version 1.2.19beta21 [June 30, 2007]
- More revision of pnggccrd.c
- Added "test" target to Makefile.in and Makefile.am
-
-version 1.2.19beta22 [July 3, 2007]
- Added info about pngrutil/pnggccrd/pngvcrd to png_get_header_version()
- Fix type definition of dummy_value_a, b in pnggccrd.c
-
-version 1.2.19beta23 [July 10, 2007]
- Revert change to type definition of dummy_value_a, b in pnggccrd.c
- Make sure __PIC__ is defined in pnggccrd.c when PIC is defined.
- Require gcc-4.1 or better to use PNG_HAVE_MMX_FILTER_ROW on x86_64 platforms
-
-version 1.2.19beta24 [July 14, 2007]
- Added PNG_NO_READ_FILTER, PNG_NO_WRITE_FILTER, PNG_NO_WARNING macros.
- Added contrib/pngminim to demonstrate building minimal encoder and decoder
-
-version 1.2.19beta25 [July 15, 2007]
- Removed the new PNG_NO_READ_FILTER macro since it would make the library
- unable to read valid PNG files, and filtering is at the heart of the
- PNG format.
-
-version 1.2.19beta26 [July 16, 2007]
- Changed "png_free(str)" to "png_free(png_ptr,str)" in pngrutil.c WinCE
- code (Yves Piguet). This bug was introduced in libpng-1.2.14.
- Updated scripts/CMakeLists.txt
- Relocated a misplaced #endif in pnggccrd.c
-
-version 1.2.19beta27 [July 17, 2007]
- Fixed incorrect stride and number of bytes copied (was 4 instead of
- 6 bytes) in the cleanup loop of pnggccrd.c and pngvcrd.c for handling
- the end of 48-bit interlaced rows (Glenn R-P).
-
-version 1.2.19beta28 [July 19, 2007]
- Removed requirement for gcc-4.1 or better to use PNG_HAVE_MMX_FILTER_ROW
- on x86_64 platforms
- Added png_warning() in pngrutil.c for short iCCP, iTXt, sPLT, or zTXT chunks.
- Revised pngtest.c so warnings are displayed regardless of PNG_NO_STDIO.
-
-version 1.2.19beta29 [July 20, 2007]
- Fix typo in pnggccrd.c (%%eax should be %%ax in secondloop48)
-
-version 1.2.19beta30 [July 26, 2007]
- Revised pnggccrd.c
-
-version 1.2.19beta31 [July 27, 2007]
- Fix typos in pnggccrd.c
-
-version 1.0.27rc1 and 1.2.19rc1 [July 31, 2007]
- Disable PNG_MMX_CODE_SUPPORTED when PNG_ASSEMBLER_CODE_SUPPORTED is off.
- Enable PNG_MMX_READ_FILTER_* by default, except when gcc-3.x is being
- used (they were inadvertently disabled in libpng-1.2.19beta23).
- Fix some debugging statements in pnggccrd.c and pngrutil.c
- Added information about disabling the MMX code in libpng documentation.
-
-version 1.0.27rc2 and 1.2.19rc2 [August 4, 2007]
- Removed some "#if 0" blocks.
- Made a global struct local in pngvcrd.c to make it thread safe.
- Issue a png_error() if application attempts to transform a row tht
- has not been initialized.
-
-version 1.0.27rc3 and 1.2.19rc3 [August 9, 2007]
- Slightly revised pngvcrd.c
-
-version 1.0.27rc4 and 1.2.19rc4 [August 9, 2007]
- Revised pnggccrd.c debugging change of rc1, which was broken.
- Revised scripts/CMakeLists.txt
- Change default to PNG_NO_GLOBAL_ARRAYS for MSVC.
- Turn off PNG_FLAG_ROW_INIT flag when setting transforms that expand pixels.
-
-version 1.0.27rc5 and 1.2.19rc5 [August 10, 2007]
- Fix typo (missing '"') in pnggccrd.c
- Revise handling of png_strtod in recent versions of WINCE
-
-version 1.0.27rc6 and 1.2.19rc6 [August 15, 2007]
- Fix typo (missing ',') in contrib/gregbook/readpng2.c
- Undid row initialization error exit added to rc2 and rc4.
-
-version 1.0.27 and 1.2.19 [August 18, 2007]
- Conditionally restored row initialization error exit.
-
-version 1.2.20beta01 [August 19, 2007]
- Fixed problem with compiling pnggccrd.c on Intel-Apple platforms.
- Changed png_malloc() to png_malloc_warn() in png_set_sPLT().
- Added PNG_NO_ERROR_TEXT feature, with demo in contrib/pngminim
- Removed define PNG_WARN_UNINITIALIZED_ROW 1 /* 0: warning; 1: error */
- because it caused some trouble.
-
-version 1.2.20beta02 [August 20, 2007]
- Avoid compiling pnggccrd.c on Intel-Apple platforms.
-
-version 1.2.20beta03 [August 20, 2007]
- Added "/D PNG_NO_MMX_CODE" to the non-mmx builds of projects/visualc6
- and visualc71.
-
-version 1.2.20beta04 [August 21, 2007]
- Revised pngvcrd.c for improved efficiency (Steve Snyder).
-
-version 1.2.20rc1 [August 23, 2007]
- Revised pngconf.h to set PNG_NO_MMX_CODE for gcc-3.x compilers.
-
-version 1.2.20rc2 [August 27, 2007]
- Revised scripts/CMakeLists.txt
- Revised #ifdefs to ensure one and only one of pnggccrd.c, pngvcrd.c,
- or part of pngrutil.c is selected.
-
-version 1.2.20rc3 [August 30, 2007]
- Remove a little more code in pngwutil.c when PNG_NO_WRITE_FILTER is selected.
- Added /D _CRT_SECURE_NO_WARNINGS to visual6c and visualc71 projects.
- Compile png_mmx_support() in png.c even when PNG_NO_MMX_CODE is defined.
- Restored a "superfluous" #ifdef that was removed from 1.2.20rc2 pnggccrd.c,
- breaking the png_mmx_support() function.
-
-version 1.2.20rc4 [September 1, 2007]
- Removed Intel contributions (MMX, Optimized C).
-
-version 1.2.20rc5 [September 2, 2007]
- Restored configure and Makefile.in to rc3 and put a snippet of code in
- pnggccrd.c, to ensure configure makes the same PNG_NO_MMX_CODE selection
-
-version 1.2.20rc6 [September 2, 2007]
- Fixed bugs in scripts/CMakeLists.txt
- Removed pngvcrd.c references from msvc projects.
-
-version 1.0.28 and 1.2.20 [September 8, 2007]
- Removed "(NO READ SUPPORT)" from png_get_header_version() string.
-
-version 1.2.21beta1 [September 14, 2007]
- Fixed various mistakes reported by George Cook and Jeff Phillips:
- logical vs bitwise NOT in pngrtran.c, bug introduced in 1.2.19rc2
- 16-bit cheap transparency expansion, bug introduced in 1.2.19beta2
- errors with sizeof(unknown_chunk.name), bugs introduced in 1.2.19beta11
- <= compare with unsigned var in pngset.c, should be ==.
-
-version 1.2.21beta2 [September 18, 2007]
- Removed some extraneous typecasts.
-
-version 1.2.21rc1 [September 25, 2007]
- Fixed potential out-of-bounds reads in png_handle_pCAL() and
- png_handle_ztXt() ("flayer" results reported by Tavis Ormandy).
-
-version 1.2.21rc2 [September 26, 2007]
- Fixed potential out-of-bounds reads in png_handle_sCAL(),
- png_handle_iTXt(), and png_push_read_tEXt().
- Remove some PNG_CONST declarations from pngwutil.c to avoid compiler warnings
- Revised makefiles to update paths in libpng.pc properly.
-
-version 1.2.21rc3 [September 27, 2007]
- Revised makefiles to update "Libs" in libpng.pc properly.
-
-version 1.0.29 and 1.2.21rc3 [October 4, 2007]
- No changes.
-
-version 1.2.22beta1 [October 4, 2007]
- Again, fixed logical vs bitwise NOT in pngrtran.c, bug introduced
- in 1.2.19rc2
-
-version 1.2.22beta2 [October 5, 2007]
- Fixed string length error in pngset.c (caused crashes while decoding iCCP)
- Add terminating NULL after each instance of png_strncpy().
-
-version 1.2.22beta3 [October 6, 2007]
- Fix two off-by-one terminating NULL after png_strncpy().
-
-version 1.2.22beta4 [October 7, 2007]
- Changed some 0 to '\0'.
-
-version 1.0.30rc1 and 1.2.22rc1 [October 8, 2007]
- No changes.
-
-version 1.0.30 and 1.2.22 [October 13, 2007]
- No changes.
-
-version 1.2.23beta01 [October 15, 2007]
- Reduced number of invocations of png_strlen() in pngset.c.
- Changed [azAZ09_] to [_abcde...89] in Makefile.am for better localization.
-
-version 1.2.23beta02 [October 16, 2007]
- Eliminated png_strncpy() and png_strcpy() (Pierre Poissinger)
- Changed $AN to $(AN) in Makefile.am.
-
-version 1.2.23beta03 [October 16, 2007]
- Fixed off-by-one error in pngset.c
- Restore statement to set last character of buffer to \0 in pngerror.c
-
-version 1.2.23beta04 [October 23, 2007]
- Reject attempt to set all-zero cHRM values.
-
-version 1.2.23beta05 [October 26, 2007]
- Add missing quotes in projects/visualc6, lost in version 1.2.20rc3
-
-version 1.2.23rc01 [November 2, 2007]
- No changes.
-
-version 1.2.23 [November 6, 2007]
- No changes.
-
-version 1.2.24beta01 [November 19, 2007]
- Moved misplaced test for malloc failure in png_set_sPLT(). This bug was
- introduced in libpng-1.2.20beta01.
- Ifdef out avg_row etc from png.h and pngwrite.c when PNG_NO_WRITE_FILTER
- Do not use png_ptr->free_fn and png_ptr->mem_fn in png_destroy_read_struct()
- when png_ptr is NULL (Marshall Clow).
- Updated handling of symbol prefixes in Makefile.am and configure.ac (Mike
- Frysinger).
-
-version 1.2.24beta02 [November 30, 2007]
- Removed a useless test and fixed incorrect test in png_set_cHRM_fixed()
- (David Hill).
-
-version 1.2.24rc01 [December 7, 2007]
- No changes.
-
-version 1.2.24 [December 14, 2007]
- Make sure not to redefine _BSD_SOURCE in pngconf.h
- Revised gather.sh and makefile.std in contrib/pngminim to avoid compiling
- unused files.
-
-version 1.2.25beta01 [January 7, 2008]
- Fixed bug with unknown chunk handling, introduced in version 1.2.17rc2
-
-version 1.2.25beta02 [January 10, 2008]
- Prevent gamma from being applied twice.
-
-version 1.2.25rc01 [January 17, 2008]
- No changes.
-
-version 1.2.25beta03 [January 22, 2008]
- Fixed some continue-after-malloc-failure errors in pngset.c (David Hill)
- Check for info_ptr == NULL in png_read_info() and png_process_data().
- Check for possible use of NULL user_png_ver[] in png_create_read_struct().
- Change "if (swidth == NULL)" to "if (sheight == NULL)" in png_handle_sCAL
- (bug introduced in libpng-1.2.4/1.0.13).
- Return from png_destroy_read_struct() if png_ptr_ptr is NULL.
- Fix overflow of "msg" in png_decompress_chunk().
-
-version 1.2.25beta04 [January 26, 2008]
- Work around Coverity bug report by slightly refactoring
- png_read_push_finish_row()
-
-version 1.2.25beta05 [January 31, 2008]
- Added libpng-1.2.25beta05.tar.lzma to distribution. Get the lzma codec
- from <http://tukaani.org/lzma>.
- Added lp1225b05.7z to distribution. Get the 7-zip decoder from
- from <http://www.7-zip.org>.
- Fixed some broken links in the README file.
-
-version 1.2.25beta06 [February 6, 2008]
- Refactored png_read_push_finish_row() again, trying to satisfy Coverity.
- Fixed potential NULL dereference of png_ptr in png_destroy_write_struct();
- clarified potential NULL dereference of png_ptr in png_destroy_read_struct();
- fixed potential NULL dereference of info_ptr in png_handle_bKGD();
- fixed potential NULL dereference of user_png_ver[] in
- png_create_write_struct_2(). (Coverity)
-
-version 1.2.25rc02 [February 10, 2008]
- Reset png_ptr->pass in png_read_push_finish_row() before break.
- Changed "pass" from png_byte to int.
-
-version 1.2.25 and 1.0.31 [February 18, 2008]
- No changes.
-
-version 1.2.26beta01 [February 21, 2008]
- Added missing "(" in pngmem.c. Bug introduced in libpng-1.2.2/1.0.13
-
-version 1.2.26beta02 [March 12, 2008]
- Refined error message returned from deflateInit2 in pngwutil.c
- Check IHDR length in png_push_read_chunk() before saving it.
-
-version 1.2.26beta03 [March 16, 2008]
- Revised contrib/gregbook to handle premature end-of-file and file
- read errors correctly.
-
-version 1.2.26beta04 [March 18, 2008]
- Free png_ptr->big_row_buf and png_ptr->prev_row before allocating
- new copies in png_read_start_row(). Bug introduced in libpng-1.2.22.
-
-version 1.2.26beta05 [March 19, 2008]
- Removed extra png_free() added in libpng-1.2.26beta04.
-
-version 1.2.26beta06 [March 19, 2008]
- Avoid reallocating big_row_buf and prev_row when the size does not increase.
-
-version 1.2.26rc01 [March 26, 2008]
- Ifdef out some code that is unused when interlacing is not supported.
-
-versions 1.0.32 and 1.2.26 [April 2, 2008]
- No changes.
-
-version 1.2.27beta01 [April 12, 2008]
- Fixed bug (introduced in libpng-1.0.5h) with handling zero-length
- unknown chunks.
- Added more information about png_set_keep_unknown_chunks() to the
- documentation.
- Reject tRNS chunk with out-of-range samples instead of masking off
- the invalid high bits as done in since libpng-1.2.19beta5.
-
-version 1.2.27beta02 [April 13, 2008]
- Revised documentation about unknown chunk and user chunk handling.
- Keep tRNS chunk with out-of-range samples and issue a png_warning().
-
-version 1.2.27beta03 [April 14, 2008]
- Added check for NULL ptr in TURBOC version of png_free_default().
- Removed several unnecessary checks for NULL before calling png_free().
- Revised png_set_tRNS() so that calling it twice removes and invalidates
- the previous call.
- Revised pngtest to check for out-of-range tRNS samples.
-
-version 1.2.27beta04 [April 18, 2008]
- Added AC_LIBTOOL_WIN32_DLL to configure.ac
- Rebuilt Makefile.in, aclocal.m4, and configure with autoconf-2.62
-
-version 1.2.27beta05 [April 19, 2008]
- Added MAINTAINERCLEANFILES variable to Makefile.am
-
-version 1.2.27beta06 [April 21, 2008]
- Avoid changing color_type from GRAY to RGB by
- png_set_expand_gray_1_2_4_to_8().
-
-version 1.2.27rc01 [April 23, 2008]
- Fix broken URL for rfc2083 in png.5 and libpng-*.txt
+version 1.4.0beta1 [April 20, 2006]
+ Enabled iTXt support (changes png_struct, thus requires so-number change).
+ Cleaned up PNG_ASSEMBLER_CODE_SUPPORTED vs PNG_MMX_CODE_SUPPORTED
+ Eliminated PNG_1_0_X and PNG_1_2_X macros.
+ Removed deprecated functions png_read_init, png_write_init, png_info_init,
+ png_permit_empty_plte, png_set_gray_1_2_4_to_8, png_check_sig, and
+ removed the deprecated macro PNG_MAX_UINT.
+ Moved "PNG_INTERNAL" parts of png.h and pngconf.h into pngintrn.h
+ Removed many WIN32_WCE #ifdefs (Cosmin).
+ Reduced dependency on C-runtime library when on Windows (Simon-Pierre)
+ Replaced sprintf() with png_sprintf() (Simon-Pierre)
+
+version 1.4.0beta2 [April 20, 2006]
+ Revised makefiles and configure to avoid making links to libpng.so.*
+ Moved some leftover MMX-related defines from pngconf.h to pngintrn.h
+ Updated scripts/pngos2.def, pngw32.def, and projects/wince/png32ce.def
-version 1.0.33 and 1.2.27 [April 30, 2008]
- No changes.
+version 1.4.0beta3 [May 10, 2006]
+ Updated scripts/pngw32.def to comment out MMX functions.
+ Added PNG_NO_GET_INT_32 and PNG_NO_SAVE_INT_32 macros.
+ Scripts/libpng.pc.in contained "configure" style version info and would
+ not work with makefiles.
+ Revised pngconf.h and added pngconf.h.in, so makefiles and configure can
+ pass defines to libpng and applications.
-version 1.0.34 and 1.2.28 [April 30, 2008]
- Rebuilt Makefile.in, aclocal.m4, and configure with autoconf-2.61
- due to backward incompatibilities.
- Removed a stray object file from contrib/gregbook
+version 1.4.0beta4 [May 11, 2006]
+ Revised configure.ac, Makefile.am, and many of the makefiles to write
+ their defines in pngconf.h.
-version 1.2.29beta01 [May 1, 2008]
- Removed some stray *.diff and *.orig files
+version 1.4.0beta5 [May 15, 2006]
+ Added a missing semicolon in Makefile.am and Makefile.in
+ Deleted extraneous square brackets from configure.ac
-version 1.2.29beta02 [May 1, 2008]
- Reverted Makefile.in, aclocal.m4, and configure to the libpng-1.2.26
- versions.
+version 1.4.0beta6 [June 2, 2006]
+ Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid
+ buffer overflow.
+ Changed sonum from 0 to 1.
+ Removed unused prototype for png_check_sig() from png.h
+
+version 1.4.0beta7 [June 16, 2006]
+ Exported png_write_sig (Cosmin).
+ Optimized buffer in png_handle_cHRM() (Cosmin).
+ Set pHYs = 2835 x 2835 pixels per meter, and added
+ sCAL = 0.352778e-3 x 0.352778e-3 meters, in pngtest.png (Cosmin).
+ Added png_set_benign_errors(), png_benign_error(), png_chunk_benign_error().
+ Added typedef for png_int_32 and png_uint_32 on 64-bit systems.
+ Added "(unsigned long)" typecast on png_uint_32 variables in printf lists.
+
+version 1.4.0beta8 [June 22, 2006]
+ Added demonstration of user chunk support in pngtest.c, to support the
+ public sTER chunk and a private vpAg chunk.
+
+version 1.4.0beta9 [July 3, 2006]
+ Removed ordinals from scripts/pngw32.def and removed png_info_int and
+ png_set_gray_1_2_4_to_8 entries.
+ Inline call of png_get_uint_32() in png_get_uint_31().
+ Use png_get_uint_31() to get vpAg width and height in pngtest.c
+ Removed WINCE and Netware projects.
+ Removed standalone Y2KINFO file.
+
+version 1.4.0beta10 [July 12, 2006]
+ Eliminated automatic copy of pngconf.h to pngconf.h.in from configure and
+ some makefiles, because it was not working reliably. Instead, distribute
+ pngconf.h.in along with pngconf.h and cause configure and some of the
+ makefiles to update pngconf.h from pngconf.h.in.
+ Added pngconf.h to DEPENDENCIES in Makefile.am
+
+version 1.4.0beta11 [August 19, 2006]
+ Removed AC_FUNC_MALLOC from configure.ac.
+ Added a warning when writing iCCP profile with mismatched profile length.
+ Patched pnggccrd.c to assemble on x86_64 platforms.
+ Moved chunk header reading into a separate function png_read_chunk_header()
+ in pngrutil.c. The chunk header (len+sig) is now serialized in a single
+ operation (Cosmin).
+ Implemented support for I/O states. Added png_ptr member io_state, and
+ functions png_get_io_chunk_name() and png_get_io_state() in pngget.c
+ (Cosmin).
+ Added png_get_io_chunk_name and png_get_io_state to scripts/*.def (Cosmin).
+ Renamed scripts/pngw32.* to scripts/pngwin.* (Cosmin).
+ Removed the include directories and libraries from CFLAGS and LDFLAGS
+ in scripts/makefile.gcc (Cosmin).
+ Used png_save_uint_32() to set vpAg width and height in pngtest.c (Cosmin).
+ Cast to proper type when getting/setting vpAg units in pngtest.c (Cosmin).
+ Added pngintrn.h to the Visual C++ projects (Cosmin).
+ Removed scripts/list (Cosmin).
+ Updated copyright year in scripts/pngwin.def (Cosmin).
+ Removed PNG_TYPECAST_NULL and used standard NULL consistently (Cosmin).
+ Disallowed the user to redefine png_size_t, and enforced a consistent use
+ of png_size_t across libpng (Cosmin).
+ Changed the type of png_ptr->rowbytes, PNG_ROWBYTES() and friends
+ to png_size_t (Cosmin).
+ Removed png_convert_size() and replaced png_sizeof with sizeof (Cosmin).
+ Removed some unnecessary type casts (Cosmin).
+ Changed prototype of png_get_compression_buffer_size() and
+ png_set_compression_buffer_size() to work with png_size_t instead of
+ png_uint_32 (Cosmin).
+ Removed png_memcpy_check() and png_memset_check() (Cosmin).
+ Fixed a typo (png_byte --> png_bytep) in libpng.3 and libpng.txt (Cosmin).
+ Clarified that png_zalloc() does not clear the allocated memory,
+ and png_zalloc() and png_zfree() cannot be PNGAPI (Cosmin).
+ Renamed png_mem_size_t to png_alloc_size_t, fixed its definition in
+ pngconf.h, and used it in all memory allocation functions (Cosmin).
+ Renamed pngintrn.h to pngpriv.h, added a comment at the top of the file
+ mentioning that the symbols declared in that file are private, and
+ updated the scripts and the Visual C++ projects accordingly (Cosmin).
+ Removed circular references between pngconf.h and pngconf.h.in in
+ scripts/makefile.vc*win32 (Cosmin).
+ Removing trailing '.' from the warning and error messages (Cosmin).
+ Added pngdefs.h that is built by makefile or configure, instead of
+ pngconf.h.in (Glenn).
+ Detect and fix attempt to write wrong iCCP profile length.
-version 1.2.29beta03 [May 2, 2008]
- Added --force to autogen libtoolize options and --force-missing to
- automake options.
- Changed $(ECHO) to echo in Makefile.am and Makefile.in
- Updated all configure files to autoconf-2.62
- Comment out pnggcrd.c code with #ifdef/#endif if using MSC_VER
+version 1.4.0beta12 [October 19, 2006]
+ Changed "logical" to "bitwise" in the documentation.
+ Work around Intel-Mac compiler bug by setting PNG_NO_MMX_CODE in pngconf.h
+ Add a typecast to stifle compiler warning in pngrutil.c
-version 1.2.29rc01 [May 4, 2008]
- No changes.
+version 1.4.0beta13 [November 10, 2006]
+ Fix potential buffer overflow in sPLT chunk handler.
+ Fix Makefile.am to not try to link to noexistent files.
-version 1.0.35 and 1.2.29 [May 8, 2008]
- No changes.
+version 1.4.0beta14 [November 15, 2006]
+ Check all exported functions for NULL png_ptr.
-version 1.0.37 [May 9, 2008]
- Updated Makefile.in and configure (omitted version 1.0.36).
+version 1.4.0beta15 [November 17, 2006]
+ Relocated two misplaced tests for NULL png_ptr.
+ Built Makefile.in with automake-1.9.6 instead of 1.9.2.
+ Build configure with autoconf-2.60 instead of 2.59
+ Add "install: all" in Makefile.am so "configure; make install" will work.
-version 1.2.30beta01 [May 29, 2008]
- Updated libpng.pc-configure.in and libpng-config.in per debian bug reports.
+version 1.4.0beta16 [November 17, 2006]
+ Added a typecast in png_zalloc().
-version 1.2.30beta02 [June 25, 2008]
- Restored png_flush(png_ptr) at the end of png_write_end(), that was
- removed from libpng-1.0.9beta03.
+version 1.4.0beta17 [December 4, 2006]
+ Changed "new_key[79] = '\0';" to "(*new_key)[79] = '\0';" in pngwutil.c
+ Add "png_bytep" typecast to profile while calculating length in pngwutil.c
-version 1.2.30beta03 [July 6, 2008]
- Merged some cosmetic whitespace changes from libpng-1.4.0beta19.
- Inline call of png_get_uint_32() in png_get_uint_31(), as in 1.4.0beta19.
- Added demo of decoding vpAg and sTER chunks to pngtest.c, from 1.4.0beta19.
- Changed PNGMAJ from 0 to 12 in makefile.darwin, which does not like 0.
- Added new private function png_read_chunk_header() from 1.4.0beta19.
- Merge reading of chunk length and chunk type into a single 8-byte read.
- Merge writing of chunk length and chunk type into a single 8-byte write.
+version 1.4.0beta18 [December 7, 2006]
+ Added scripts/CMakeLists.txt
-version 1.2.30beta04 [July 10, 2008]
- Merged more cosmetic whitespace changes from libpng-1.4.0beta19.
+version 1.4.0beta19 [May 16, 2007]
+ Revised scripts/CMakeLists.txt
+ Rebuilt configure and Makefile.in with newer tools.
+ Added conditional #undef jmpbuf in pngtest.c to undo #define in AIX headers.
+ Added scripts/makefile.nommx
-version 1.0.38rc01, 1.2.30rc01 [July 18, 2008]
- No changes.
+version 1.4.0beta20 [July 9, 2008]
+ Moved several PNG_HAVE_* macros from pngpriv.h to png.h because applications
+ calling set_unknown_chunk_location() need them.
+ Moved several macro definitions from pngpriv.h to pngconf.h
+ Merge with changes to the 1.2.X branch, as of 1.2.30beta04.
+ Deleted all use of the MMX assembler code and Intel-licensed optimizations.
+ Revised makefile.mingw
-version 1.0.38rc02, 1.2.30rc02 [July 21, 2008]
+version 1.4.0beta21 [July 21, 2008]
Moved local array "chunkdata" from pngrutil.c to the png_struct, so
it will be freed by png_read_destroy() in case of a read error (Kurt
Christensen).
-version 1.0.38rc03, 1.2.30rc03 [July 21, 2008]
- Changed "purpose" and "buffer" to png_ptr->chunkdata to avoid memory leaking.
+version 1.4.0beta22 [July 21, 2008]
+ Change "purpose" and "buffer" to png_ptr->chunkdata to avoid memory leaking.
-version 1.0.38rc04, 1.2.30rc04 [July 22, 2008]
- Changed "chunkdata = NULL" to "png_ptr->chunkdata = NULL" several places in
+version 1.4.0beta23 [July 22, 2008]
+ Change "chunkdata = NULL" to "png_ptr->chunkdata = NULL" several places in
png_decompress_chunk().
-version 1.0.38rc05, 1.2.30rc05 [July 25, 2008]
- Changed all remaining "chunkdata" to "png_ptr->chunkdata" in
- png_decompress_chunk() and remove chunkdata from parameter list.
+version 1.4.0beta24 [July 25, 2008]
+ Change all remaining "chunkdata" to "png_ptr->chunkdata" in
+ png_decompress_chunk(), and remove "chunkdata" from parameter list.
Put a call to png_check_chunk_name() in png_read_chunk_header().
Revised png_check_chunk_name() to reject a name with a lowercase 3rd byte.
Removed two calls to png_check_chunk_name() occuring later in the process.
+ Define PNG_NO_ERROR_NUMBERS by default in pngconf.h
-version 1.0.38rc06, 1.2.30rc06 [July 29, 2008]
+version 1.4.0beta25 [July 30, 2008]
Added a call to png_check_chunk_name() in pngpread.c
Reverted png_check_chunk_name() to accept a name with a lowercase 3rd byte.
+ Added png_push_have_buffer() function to pngpread.c
+ Eliminated PNG_BIG_ENDIAN_SUPPORTED and associated png_get_* macros.
+ Made inline expansion of png_get_*() optional with PNG_USE_READ_MACROS.
+ Eliminated all PNG_USELESS_TESTS and PNG_CORRECT_PALETTE_SUPPORTED code.
+ Synced contrib directory and configure files with libpng-1.2.30beta06.
+ Eliminated no-longer-used pngdefs.h (but it's still built in the makefiles)
+ Relocated a misplaced "#endif /* PNG_NO_WRITE_FILTER */" in pngwutil.c
-version 1.0.38r07, 1.2.30r07 [August 2, 2008]
+version 1.4.0beta26 [August 4, 2008]
+ Removed png_push_have_buffer() function in pngpread.c. It increased the
+ compiled library size slightly.
Changed "-Wall" to "-W -Wall" in the CFLAGS in all makefiles (Cosmin Truta)
Declared png_ptr "volatile" in pngread.c and pngwrite.c to avoid warnings.
- Added code in pngset.c to quiet compiler warnings.
Updated contrib/visupng/cexcept.h to version 2.0.1
- Relocated a misplaced "#endif /* PNG_NO_WRITE_FILTER */" in pngwutil.c
+ Added PNG_LITERAL_CHARACTER macros for #, [, and ].
-version 1.0.38r08, 1.2.30r08 [August 2, 2008]
- Enclose "volatile" declarations in #ifdef PNG_SETJMP_SUPPORTED (Cosmin).
+version 1.4.0beta27 [August 5, 2008]
+ Revised usage of PNG_LITERAL_SHARP in pngerror.c.
+ Moved newline character from individual png_debug messages into the
+ png_debug macros.
+ Allow user to #define their own png_debug, png_debug1, and png_debug2.
-version 1.0.38, 1.2.30 [August 14, 2008]
- No changes.
+version 1.4.0beta28 [August 5, 2008]
+ Revised usage of PNG_LITERAL_SHARP in pngerror.c.
+ Added PNG_STRING_NEWLINE macro
+
+version 1.4.0beta29 [August 9, 2008]
+ Revised usage of PNG_STRING_NEWLINE to work on non-ISO compilers.
+ Added PNG_STRING_COPYRIGHT macro.
+ Added non-ISO versions of png_debug macros.
-version 1.2.31rc01 [August 19, 2008]
+version 1.4.0beta30 [August 14, 2008]
+ Added premultiplied alpha feature (Volker Wiendl).
+
+version 1.4.0beta31 [August 18, 2008]
+ Moved png_set_premultiply_alpha from pngtrans.c to pngrtran.c
Removed extra crc check at the end of png_handle_cHRM(). Bug introduced
- in libpng-1.2.30beta03 (Heiko Nitzsche).
+ in libpng-1.4.0beta20.
-version 1.2.31rc02 [August 19, 2008]
+version 1.4.0beta32 [August 19, 2008]
Added PNG_WRITE_FLUSH_SUPPORTED block around new png_flush() call.
+ Revised PNG_NO_STDIO version of png_write_flush()
-version 1.2.31rc03 [August 19, 2008]
- Added PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED block, off by default, around
- new png_flush().
-
-version 1.0.39, 1.2.31 [August 21, 2008]
- No changes.
+version 1.4.0beta33 [August 20, 2008]
+ Added png_get|set_chunk_cache_max() to limit the total number of sPLT,
+ text, and unknown chunks that can be stored.
-version 1.2.32beta01 [September 6, 2008]
- Shortened tIME_string to 29 bytes in pngtest.c (bug introduced in
- libpng-1.2.22).
+version 1.4.0beta34 [September 6, 2008]
+ Shortened tIME_string to 29 bytes in pngtest.c
Fixed off-by-one error introduced in png_push_read_zTXt() function in
libpng-1.2.30beta04/pngpread.c (Harald van Dijk)
- These bugs have been given the vulnerability id CVE-2008-3964.
-
-version 1.0.40, 1.2.32 [September 18, 2008]
- No changes.
-version 1.2.33beta01 [October 6, 2008]
+version 1.4.0beta35 [October 6, 2008]
+ Changed "trans_values" to "trans_color".
+ Changed so-number from 0 to 14. Some OS do not like 0.
Revised makefile.darwin to fix shared library numbering.
Change png_set_gray_1_2_4_to_8() to png_set_expand_gray_1_2_4_to_8()
in example.c (debian bug report)
-version 1.2.33rc01 [October 15, 2008]
- No changes.
+version 1.4.0beta36 [October 25, 2008]
+ Sync with tEXt vulnerability fix in libpng-1.2.33rc02.
-version 1.0.41rc01, version 1.2.33rc02 [October 23, 2008]
- Changed remaining "key" to "png_ptr->chunkdata" in png_handle_tEXt()
- to avoid memory leak after memory failure while reading tEXt chunk.`
+version 1.4.0beta37 [November 13, 2008]
+ Added png_check_cHRM in png.c and moved checking from pngget.c, pngrutil.c,
+ and pngwrite.c
-version 1.2.33 [October 31, 2008]
- No changes.
+version 1.4.0beta38 [November 22, 2008]
+ Added check for zero-area RGB cHRM triangle in png_check_cHRM() and
+ png_check_cHRM_fixed().
-version 1.2.34beta01 [November 27, 2008]
- Revised png_warning() to write its message on standard output by default
- when warning_fn is NULL. This was the behavior prior to libpng-1.2.9beta9.
- Fixed string vs pointer-to-string error in png_check_keyword().
- Added png_check_cHRM_fixed() in png.c and moved checking from pngget.c,
- pngrutil.c, and pngwrite.c, and eliminated floating point cHRM checking.
- Added check for zero-area RGB cHRM triangle in png_check_cHRM_fixed().
- In png_check_cHRM_fixed(), ensure white_y is > 0, and removed redundant
- check for all-zero coordinates that is detected by the triangle check.
+version 1.4.0beta39 [November 23, 2008]
Revised png_warning() to write its message on standard output by default
when warning_fn is NULL.
-version 1.2.34beta02 [November 28, 2008]
- Corrected off-by-one error in bKGD validity check in png_write_bKGD()
- and in png_handle_bKGD().
+version 1.4.0beta40 [November 24, 2008]
+ Eliminated png_check_cHRM(). Instead, always use png_check_cHRM_fixed().
+ In png_check_cHRM_fixed(), ensure white_y is > 0, and removed redundant
+ check for all-zero coordinates that is detected by the triangle check.
-version 1.2.34beta03 [December 1, 2008]
- Revised bKGD validity check to use >= x instead of > x + 1
- Merged with png_debug from libpng-1.4.0 to remove newlines.
+version 1.4.0beta41 [November 26, 2008]
+ Fixed string vs pointer-to-string error in png_check_keyword().
+ Rearranged test expressions in png_check_cHRM_fixed() to avoid internal
+ overflows.
+ Added PNG_NO_CHECK_cHRM conditional.
-version 1.2.34beta04 [December 2, 2008]
- More merging with png_debug from libpng-1.4.0 to remove newlines.
+version 1.4.0beta42, 43 [December 1, 2008]
+ Merge png_debug with version 1.2.34beta04.
-version 1.2.34beta05 [December 5, 2008]
+version 1.4.0beta44 [December 6, 2008]
Removed redundant check for key==NULL before calling png_check_keyword()
to ensure that new_key gets initialized and removed extra warning
- (Arvan Pritchard).
+ (Merge with version 1.2.34beta05 -- Arvan Pritchard).
-version 1.2.34beta06 [December 9, 2008]
+version 1.4.0beta45 [December 9, 2008]
In png_write_png(), respect the placement of the filler bytes in an earlier
call to png_set_filler() (Jim Barry).
-version 1.2.34beta07 [December 9, 2008]
+version 1.4.0beta46 [December 10, 2008]
Undid previous change and added PNG_TRANSFORM_STRIP_FILLER_BEFORE and
PNG_TRANSFORM_STRIP_FILLER_AFTER conditionals and deprecated
PNG_TRANSFORM_STRIP_FILLER (Jim Barry).
-version 1.0.42rc01, 1.2.34rc01 [December 11, 2008]
- No changes.
-
-version 1.0.42, 1.2.34 [December 18, 2008]
- No changes.
-
-version 1.2.35beta01 [February 4, 2009]
- Zero out some arrays of pointers after png_malloc(). (Tavis Ormandy)
-
-version 1.2.35beta02 [February 4, 2009]
- Zero out more arrays of pointers after png_malloc().
-
-version 1.2.35beta03 [February 5, 2009]
- Use png_memset() instead of a loop to intialize pointers. We realize
- this will not work on platforms where the NULL pointer is not all zeroes.
-
-version 1.2.35rc01 [February 11, 2009]
- No changes.
+version 1.4.0beta47 [December 15, 2008]
+ Turned off PNG_READ_DITHER_SUPPORTED by default.
+
+version 1.4.0beta48 [February 14, 2009]
+ Added new exported function png_calloc().
+ Combined several instances of png_malloc(); png_memset() into png_calloc().
+ Removed prototype for png_freeptr() that was added in libpng-1.4.0beta24
+ but was never defined.
+
+version 1.4.0beta49 [February 28, 2009]
+ Added png_fileno() macro to pngconf.h, used in pngwio.c
+ Corrected order of #ifdef's in png_debug definition in png.h
+ Fixed bug introduced in libpng-1.4.0beta48 with the memset arguments
+ for pcal_params.
+ Fixed order of #ifdef directives in the png_debug defines in png.h
+ (bug introduced in libpng-1.2.34/1.4.0beta29).
+ Revised comments in png_set_read_fn() and png_set_write_fn().
-version 1.2.35rc02 [February 12, 2009]
- Fix typo in new png_memset call in pngset.c (png_color should be png_charp)
+version 1.4.0beta50 [March 18, 2009]
+ Use png_calloc() instead of png_malloc() to allocate big_row_buf when
+ reading an interlaced file, to avoid a possible UMR.
+ Undid revision of PNG_NO_STDIO version of png_write_flush(). Users
+ having trouble with fflush() can build with PNG_NO_WRITE_FLUSH defined
+ or supply their own flush_fn() replacement.
+ Revised libpng*.txt and png.h documentation about use of png_write_flush()
+ and png_set_write_fn().
+ Removed fflush() from pngtest.c.
+ Added "#define PNG_NO_WRITE_FLUSH" to contrib/pngminim/encoder/pngusr.h
-version 1.0.43 and 1.2.35 [February 14, 2009]
- No changes.
+version 1.4.0beta51 [March 21, 2009]
+ Removed new png_fileno() macro from pngconf.h .
-version 1.2.36beta01 [February 28, 2009]
- Revised comments in png_set_read_fn() and png_set_write_fn().
- Revised order of #ifdef's and indentation in png_debug definitions of png.h
- bug introduced in libpng-1.2.34.
-
-version 1.2.36beta02 [March 21, 2009]
- Use png_memset() after png_malloc() of big_row_buf when reading an
- interlaced file, to avoid a possible UMR.
- Undid recent revision of PNG_NO_STDIO version of png_write_flush(). Users
- having trouble with fflush() can build with PNG_NO_WRITE_FLUSH defined.
- Revised libpng*.txt documentation about use of png_write_flush().
+version 1.4.0beta52 [March 27, 2009]
+ Relocated png_do_chop() ahead of building gamma tables in pngrtran.c
+ This avoids building 16-bit gamma tables unnecessarily.
Removed fflush() from pngtest.c.
Added "#define PNG_NO_WRITE_FLUSH" to contrib/pngminim/encoder/pngusr.h
-
-version 1.2.36beta03 [March 27, 2009]
- Relocated misplaced PNG_1_0_X define in png.h that caused the prototype
- for png_set_strip_error_numbers() to be omitted from PNG_NO_ASSEMBLER_CODE
- builds. This bug was introduced in libpng-1.2.15beta4.
Added a section on differences between 1.0.x and 1.2.x to libpng.3/libpng.txt
-version 1.2.36beta04 [April 5, 2009]
+version 1.4.0beta53 [April 1, 2009]
+ Removed some remaining MMX macros from pngpriv.h
Fixed potential memory leak of "new_name" in png_write_iCCP() (Ralph Giles)
-version 1.2.36beta05 [April 24, 2009]
+version 1.4.0beta54 [April 13, 2009]
Added "ifndef PNG_SKIP_SETJMP_CHECK" block in pngconf.h to allow
application code writers to bypass the check for multiple inclusion
of setjmp.h when they know that it is safe to ignore the situation.
- Made some cosmetic changes to whitespace in pngtest output.
+ Eliminated internal use of setjmp() in pngread.c and pngwrite.c
+ Reordered ancillary chunks in pngtest.png to be the same as what
+ pngtest now produces, and made some cosmetic changes to pngtest output.
+ Eliminated deprecated png_read_init_3() and png_write_init_3() functions.
+
+version 1.4.0beta55 [April 15, 2009]
+ Simplified error handling in pngread.c and pngwrite.c by putting
+ the new png_read_cleanup() and png_write_cleanup() functions inline.
+
+version 1.4.0beta56 [April 25, 2009]
Renamed "user_chunk_data" to "my_user_chunk_data" in pngtest.c to suppress
"shadowed declaration" warning from gcc-4.3.3.
Renamed "gamma" to "png_gamma" in pngset.c to avoid "shadowed declaration"
warning about a global "gamma" variable in math.h on some platforms.
-version 1.2.36rc01 [April 30, 2009]
- No changes.
-
-version 1.0.44 and 1.2.36 [May 7, 2009]
- No changes.
+version 1.4.0beta57 [May 2, 2009]
+ Removed prototype for png_freeptr() that was added in libpng-1.4.0beta24
+ but was never defined (again).
+ Rebuilt configure scripts with autoconf-2.63 instead of 2.62
+ Removed pngprefs.h and MMX from makefiles
-version 1.2.37beta01 [May 14, 2009]
- Fixed inconsistency in pngrutil.c, introduced in libpng-1.2.36. The
- memset() was using "png_ptr->rowbytes" instead of "row_bytes", which
- the corresponding png_malloc() uses (Joe Drew).
+version 1.4.0beta58 [May 14, 2009]
+ Changed pngw32.def to pngwin.def in makefile.mingw (typo was intruduced
+ in beta57).
Clarified usage of sig_bit versus sig_bit_p in example.c (Vincent Torri)
- Updated some of the makefiles in the scripts directory (merged with
- those in libpng-1.4.0beta57).
-version 1.2.37beta02 [May 19, 2009]
- Fixed typo in libpng documentation (FILTER_AVE should be FILTER_AVG)
+version 1.4.0beta59 [May 15, 2009]
+ Reformated sources in libpng style (3-space intentation, comment format)
+ Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG)
+ Added sections about the git repository and our coding style to the
+ documentation
Relocated misplaced #endif in pngwrite.c, sCAL chunk handler.
+
+version 1.4.0beta60 [May 19, 2009]
Conditionally compile png_read_finish_row() which is not used by
progressive readers.
Added contrib/pngminim/preader to demonstrate building minimal progressive
decoder, based on contrib/gregbook with embedded libpng and zlib.
-version 1.2.37beta03 [May 20, 2009]
+version 1.4.0beta61 [May 20, 2009]
In contrib/pngminim/*, renamed "makefile.std" to "makefile", since there
is only one makefile in those directories, and revised the README files
accordingly.
- Reformated sources in libpng style (3-space indentation, comment format)
-
-version 1.2.37rc01 [May 27, 2009]
- No changes.
+ More reformatting of comments, mostly to capitalize sentences.
-versions 1.2.37 and 1.0.45 [June 4, 2009]
- Reformatted several remaining "else statement;" and "if () statement;" into
- two lines.
+version 1.4.0beta62 [June 2, 2009]
Added "#define PNG_NO_WRITE_SWAP" to contrib/pngminim/encoder/pngusr.h
and "define PNG_NO_READ_SWAP" to decoder/pngusr.h and preader/pngusr.h
- Added sections about the git repository and our coding style to the
- documentation (merged from libpng-1.4.0beta62)
+ Reformatted several remaining "else statement" into two lines.
Added a section to the libpng documentation about using png_get_io_ptr()
in configure scripts to detect the presence of libpng.
-version 1.2.38beta01 [June 17, 2009]
+version 1.4.0beta63 [June 15, 2009]
Revised libpng*.txt and libpng.3 to mention calling png_set_IHDR()
multiple times and to specify the sample order in the tRNS chunk,
because the ISO PNG specification has a typo in the tRNS table.
@@ -2411,62 +2161,301 @@ version 1.2.38beta01 [June 17, 2009]
available for ignoring known chunks even when not saving unknown chunks.
Adopted preference for consistent use of "#ifdef" and "#ifndef" versus
"#if defined()" and "if !defined()" where possible.
- Added PNG_NO_HANDLE_AS_UNKNOWN in the PNG_LEGACY_SUPPORTED block of
- pngconf.h, and moved the various unknown chunk macro definitions
- outside of the PNG_READ|WRITE_ANCILLARY_CHUNK_SUPPORTED blocks.
-version 1.0.46 [June 18, 2009]
- Removed some editing cruft from scripts/libpng.pc.in and some makefiles.
+version 1.4.0beta64 [June 24, 2009]
+ Eliminated PNG_LEGACY_SUPPORTED code.
+ Moved the various unknown chunk macro definitions outside of the
+ PNG_READ|WRITE_ANCILLARY_CHUNK_SUPPORTED blocks.
-version 1.2.38rc01 [June 24, 2009]
- No changes.
+version 1.4.0beta65 [June 26, 2009]
+ Added a reference to the libpng license in each file.
-version 1.2.38rc02 [June 29, 2009]
- Added a reference to the libpng license in each source file.
+version 1.4.0beta66 [June 27, 2009]
+ Refer to the libpng license instead of the libpng license in each file.
-version 1.2.38rc03 [July 11, 2009]
- Revised references to the libpng license in pngconf.h and contrib/visupng
- source files.
- Rebuilt configure scripts with autoconf-2.63.
+version 1.4.0beta67 [July 6, 2009]
+ Relocated INVERT_ALPHA within png_read_png() and png_write_png().
+ Added high-level API transform PNG_TRANSFORM_GRAY_TO_RGB.
+ Added an "xcode" project to the projects directory (Alam Arias).
-version 1.0.47 and 1.2.38 [July 16, 2009]
- No changes.
+version 1.4.0beta68 [July 19, 2009]
+ Avoid some tests in filter selection in pngwutil.c
-version 1.2.39beta01 [July 25, 2009]
+version 1.4.0beta69 [July 25, 2009]
+ Simplified the new filter-selection test. This runs faster in the
+ common "PNG_ALL_FILTERS" and PNG_FILTER_NONE cases.
+ Removed extraneous declaration from the new call to png_read_gray_to_rgb()
+ (bug introduced in libpng-1.4.0beta67).
+ Fixed up xcode project (Alam Arias)
Added a prototype for png_64bit_product() in png.c
-version 1.2.39beta02 [July 27, 2009]
+version 1.4.0beta70 [July 27, 2009]
Avoid a possible NULL dereference in debug build, in png_set_text_2().
(bug introduced in libpng-0.95, discovered by Evan Rouault)
-version 1.2.39beta03 [July 29, 2009]
- Relocated new png_64_bit_product() prototype into png.h
- Expanded the information about prototypes in the libpng style section of
- the documentation.
+version 1.4.0beta71 [July 29, 2009]
Rebuilt configure scripts with autoconf-2.64.
-version 1.2.39beta04 [August 1, 2009]
- Replaced *.tar.lzma with *.txz in distribution. Get the xz codec
+version 1.4.0beta72 [August 1, 2009]
+ Replaced *.tar.lzma with *.tar.xz in distribution. Get the xz codec
from <http://tukaani.org/xz>.
-version 1.2.39beta05 [August 1, 2009]
+version 1.4.0beta73 [August 1, 2009]
Reject attempt to write iCCP chunk with negative embedded profile length
(JD Chen)
-version 1.2.39c01 [August 6, 2009]
- No changes.
+version 1.4.0beta74 [August 8, 2009]
+ Changed png_ptr and info_ptr member "trans" to "trans_alpha".
-version 1.2.39 and 1.0.48 [August 13, 2009]
- No changes.
-
-version 1.2.40beta01 [August 20, 2009]
+version 1.4.0beta75 [August 21, 2009]
Removed an extra png_debug() recently added to png_write_find_filter().
Fixed incorrect #ifdef in pngset.c regarding unknown chunk support.
-version 1.2.40rc01 [September 2, 2009]
+version 1.4.0beta76 [August 22, 2009]
+ Moved an incorrectly located test in png_read_row() in pngread.c
+
+version 1.4.0beta77 [August 27, 2009]
+ Removed lpXYZ.tar.bz2 (with CRLF), KNOWNBUG, libpng-x.y.z-KNOWNBUG.txt,
+ and the "noconfig" files from the distribution.
+ Moved CMakeLists.txt from scripts into the main libpng directory.
Various bugfixes and improvements to CMakeLists.txt (Philip Lowman)
-version 1.2.40 and 1.0.49 [September 10, 2009]
+version 1.4.0beta78 [August 31, 2009]
+ Converted all PNG_NO_* tests to PNG_*_SUPPORTED everywhere except pngconf.h
+ Eliminated PNG_NO_FREE_ME and PNG_FREE_ME_SUPPORTED macros.
+ Use png_malloc plus a loop instead of png_calloc() to initialize
+ row_pointers in png_read_png().
+
+version 1.4.0beta79 [September 1, 2009]
+ Eliminated PNG_GLOBAL_ARRAYS and PNG_LOCAL_ARRAYS; always use local arrays.
+ Eliminated PNG_CALLOC_SUPPORTED macro and always provide png_calloc().
+
+version 1.4.0beta80 [September 17, 2009]
+ Removed scripts/libpng.icc
+ Changed typecast of filler from png_byte to png_uint_16 in png_set_filler().
+ (Dennis Gustafsson)
+ Fixed typo introduced in beta78 in pngtest.c ("#if def " should be "#ifdef ")
+
+version 1.4.0beta81 [September 23, 2009]
+ Eliminated unused PNG_FLAG_FREE_* defines from pngpriv.h
+ Expanded TAB characters in pngrtran.c
+ Removed PNG_CONST from all "PNG_CONST PNG_CHNK" declarations to avoid
+ compiler complaints about doubly declaring things "const".
+ Changed all "#if [!]defined(X)" to "if[n]def X" where possible.
+ Eliminated unused png_ptr->row_buf_size
+
+version 1.4.0beta82 [September 25, 2009]
+ Moved redundant IHDR checking into new png_check_IHDR() in png.c
+ and report all errors found in the IHDR data.
+ Eliminated useless call to png_check_cHRM() from pngset.c
+
+version 1.4.0beta83 [September 25, 2009]
+ Revised png_check_IHDR() to eliminate bogus complaint about filter_type.
+
+version 1.4.0beta84 [September 30, 2009]
+ Fixed some inconsistent indentation in pngconf.h
+ Revised png_check_IHDR() to add a test for width variable less than 32-bit.
+
+version 1.4.0beta85 [October 1, 2009]
+ Revised png_check_IHDR() again, to check info_ptr members instead of
+ the contents of the returned parameters.
+
+version 1.4.0beta86 [October 9, 2009]
+ Updated the "xcode" project (Alam Arias).
+ Eliminated a shadowed declaration of "pp" in png_handle_sPLT().
+
+version 1.4.0rc01 [October 19, 2009]
+ Trivial cosmetic changes.
+
+version 1.4.0beta87 [October 30, 2009]
+ Moved version 1.4.0 back into beta.
+
+version 1.4.0beta88 [October 30, 2009]
+ Revised libpng*.txt section about differences between 1.2.x and 1.4.0
+ because most of the new features have now been ported back to 1.2.41
+
+version 1.4.0beta89 [November 1, 2009]
+ More bugfixes and improvements to CMakeLists.txt (Philip Lowman)
+ Removed a harmless extra png_set_invert_alpha() from pngwrite.c
+ Apply png_user_chunk_cache_max within png_decompress_chunk().
+ Merged libpng-1.2.41.txt with libpng-1.4.0.txt where appropriate.
+
+version 1.4.0beta90 [November 2, 2009]
+ Removed all remaining WIN32_WCE #ifdefs except those involving the
+ time.h "tm" structure
+
+version 1.4.0beta91 [November 3, 2009]
+ Updated scripts/pngw32.def and projects/wince/png32ce.def
+ Copied projects/wince/png32ce.def to the scripts directory.
+ Added scripts/makefile.wce
+ Patched ltmain.sh for wince support.
+ Added PNG_CONVERT_tIME_SUPPORTED macro.
+
+version 1.4.0beta92 [November 4, 2009]
+ Make inclusion of time.h in pngconf.h depend on PNG_CONVERT_tIME_SUPPORTED
+ Make #define PNG_CONVERT_tIME_SUPPORTED depend on PNG_WRITE_tIME_SUPPORTED
+ Revised libpng*.txt to describe differences from 1.2.40 to 1.4.0 (instead
+ of differences from 1.2.41 to 1.4.0)
+
+version 1.4.0beta93 [November 7, 2009]
+ Added PNG_DEPSTRUCT, PNG_DEPRECATED, PNG_USE_RESULT, PNG_NORETURN, and
+ PNG_ALLOCATED macros to detect deprecated direct access to the
+ png_struct or info_struct members and other deprecated usage in
+ applications (John Bowler).
+ Updated scripts/makefile* to add "-DPNG_CONFIGURE_LIBPNG" to CFLAGS,
+ to prevent warnings about direct access to png structs by libpng
+ functions while building libpng. They need to be tested, especially
+ those using compilers other than gcc.
+ Updated projects/visualc6 and visualc71 with "/d PNG_CONFIGURE_LIBPNG".
+ They should work but still need to be updated to remove
+ references to pnggccrd.c or pngvcrd.c and ASM building.
+ Added README.txt to the beos, cbuilder5, netware, and xcode projects warning
+ that they need to be updated, to remove references to pnggccrd.c and
+ pngvcrd.c and to depend on pngpriv.h
+ Removed three direct references to read_info_ptr members in pngtest.c
+ that were detected by the new PNG_DEPSTRUCT macro.
+ Moved the png_debug macro definitions and the png_read_destroy(),
+ png_write_destroy() and png_far_to_near() prototypes from png.h
+ to pngpriv.h (John Bowler)
+ Moved the synopsis lines for png_read_destroy(), png_write_destroy()
+ png_debug(), png_debug1(), and png_debug2() from libpng.3 to libpngpf.3.
+
+version 1.4.0beta94 [November 9, 2009]
+ Removed the obsolete, unused pnggccrd.c and pngvcrd.c files.
+ Updated CMakeLists.txt to add "-DPNG_CONFIGURE_LIBPNG" to the definitions.
+ Removed dependency of pngtest.o on pngpriv.h in the makefiles.
+ Only #define PNG_DEPSTRUCT, etc. in pngconf.h if not already defined.
+
+version 1.4.0beta95 [November 10, 2009]
+ Changed png_check_sig() to !png_sig_cmp() in contrib programs.
+ Added -DPNG_CONFIGURE_LIBPNG to contrib/pngminm/*/makefile
+ Changed png_check_sig() to !png_sig_cmp() in contrib programs.
+ Corrected the png_get_IHDR() call in contrib/gregbook/readpng2.c
+ Changed pngminim/*/gather.sh to stop trying to remove pnggccrd.c and pngvcrd.c
+ Added dependency on pngpriv.h in contrib/pngminim/*/makefile
+
+version 1.4.0beta96 [November 12, 2009]
+ Renamed scripts/makefile.wce to scripts/makefile.cegcc
+ Revised Makefile.am to use libpng.sys while building libpng.so
+ so that only PNG_EXPORT functions are exported.
+ Removed the deprecated png_check_sig() function/macro.
+ Removed recently removed function names from scripts/*.def
+ Revised pngtest.png to put chunks in the same order written by pngtest
+ (evidently the same change made in libpng-1.0beta54 was lost).
+ Added PNG_PRIVATE macro definition in pngconf.h for possible future use.
+
+version 1.4.0beta97 [November 13, 2009]
+ Restored pngtest.png to the libpng-1.4.0beta7 version.
+ Removed projects/beos and netware.txt; no one seems to be supporting them.
+ Revised Makefile.in
+
+version 1.4.0beta98 [November 13, 2009]
+ Added the "xcode" project to zip distributions,
+ Fixed a typo in scripts/pngwin.def introduced in beta97.
+
+version 1.4.0beta99 [November 14, 2009]
+ Moved libpng-config.in and libpng.pc-configure.in out of the scripts
+ directory, to libpng-config.in and libpng-pc.in, respectively, and
+ modified Makefile.am and configure.ac accordingly. Now "configure"
+ needs nothing from the "scripts" directory.
+ Avoid redefining PNG_CONST in pngconf.h
+
+version 1.4.0beta100 [November 14, 2009]
+ Removed ASM builds from projects/visualc6 and projects/visualc71
+ Removed scripts/makefile.nommx and makefile.vcawin32
+ Revised CMakeLists.txt to account for new location of libpng-config.in
+ and libpng-pc.in
+ Updated INSTALL to reflect removal and relocation of files.
+
+version 1.4.0beta101 [November 14, 2009]
+ Restored the binary files (*.jpg, *.png, some project files) that were
+ accidentally deleted from the zip and 7z distributions when the xcode
+ project was added.
+
+version 1.4.0beta102 [November 18, 2009]
+ Added libpng-config.in and libpng-pc.in to the zip and 7z distributions.
+ Fixed a typo in projects/visualc6/pngtest.dsp, introduced in beta100.
+ Moved descriptions of makefiles and other scripts out of INSTALL into
+ scripts/README.txt
+ Updated the copyright year in scripts/pngwin.rc from 2006 to 2009.
+
+version 1.4.0beta103 [November 21, 2009]
+ Removed obsolete comments about ASM from projects/visualc71/README_zlib.txt
+ Align row_buf on 16-byte boundary in memory.
+ Restored the PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED guard around the call
+ to png_flush() after png_write_IEND(). See 1.4.0beta32, 1.4.0beta50
+ changes above and 1.2.30, 1.2.30rc01 and rc03 in 1.2.41 CHANGES. Someone
+ needs this feature.
+ Make the 'png_jmpbuf' macro expand to a call that records the correct
+ longjmp function as well as returning a pointer to the setjmp
+ jmp_buf buffer, and marked direct access to jmpbuf 'deprecated'.
+ (John Bowler)
+
+version 1.4.0beta104 [November 22, 2009]
+ Removed png_longjmp_ptr from scripts/*.def and libpng.3
+ Rebuilt configure scripts with autoconf-2.65
+
+version 1.4.0beta105 [November 25, 2009]
+ Use fast integer PNG_DIVIDE_BY_255() or PNG_DIVIDE_BY_65535()
+ to accomplish alpha premultiplication when
+ PNG_READ_COMPOSITE_NODIV_SUPPORTED is defined.
+ Changed "/255" to "/255.0" in background calculations to make it clear
+ that the 255 is used as a double.
+
+version 1.4.0beta106 [November 27, 2009]
+ Removed premultiplied alpha feature.
+
+version 1.4.0beta107 [December 4, 2009]
+ Updated README
+ Added "#define PNG_NO_PEDANTIC_WARNINGS" in the libpng source files.
+ Removed "-DPNG_CONFIGURE_LIBPNG" from the makefiles and projects.
+ Revised scripts/makefile.netbsd, makefile.openbsd, and makefile.sco
+ to put png.h and pngconf.h in $prefix/include, like the other scripts,
+ instead of in $prefix/include/libpng. Also revised makefile.sco
+ to put them in $prefix/include/libpng14 instead of in
+ $prefix/include/libpng/libpng14.
+
+version 1.4.0beta108 [December 11, 2009]
+ Removed leftover "-DPNG_CONFIGURE_LIBPNG" from contrib/pngminim/*/makefile
+ Relocated png_do_chop() to its original position in pngrtran.c; the
+ change in version 1.2.41beta08 caused transparency to be handled wrong
+ in some 16-bit datastreams (Yusaku Sugai).
+
+version 1.4.0beta109 [December 13, 2009]
+ Added "bit_depth" parameter to the private png_build_gamma_table() function.
+ Pass bit_depth=8 to png_build_gamma_table() when bit_depth is 16 but the
+ PNG_16_TO_8 transform has been set, to avoid unnecessary build of 16-bit
+ tables.
+
+version 1.4.0rc02 [December 20, 2009]
+ Declared png_cleanup_needed "volatile" in pngread.c and pngwrite.c
+
+version 1.4.0rc03 [December 22, 2009]
+ Renamed libpng-pc.in back to libpng.pc.in and revised CMakeLists.txt
+ (revising the change in 1.4.0beta99)
+
+version 1.4.0rc04 [December 25, 2009]
+ Swapped PNG_UNKNOWN_CHUNKS_SUPPORTED and PNG_HANDLE_AS_UNKNOWN_SUPPORTED
+ in pngset.c to be consistent with other changes in version 1.2.38.
+
+version 1.4.0rc05 [December 25, 2009]
+ Changed "libpng-pc.in" to "libpng.pc.in" in configure.ac, configure, and
+ Makefile.in to be consistent with changes in libpng-1.4.0rc03
+
+version 1.4.0rc06 [December 29, 2009]
+ Reverted the gamma_table changes from libpng-1.4.0beta109.
+ Fixed some indentation errors.
+
+version 1.4.0rc07 [January 1, 2010]
+ Revised libpng*.txt and libpng.3 about 1.2.x->1.4.x differences.
+ Use png_calloc() instead of png_malloc(); png_memset() in pngrutil.c
+ Update copyright year to 2010.
+
+version 1.4.0rc08 [January 2, 2010]
+ Avoid deprecated references to png_ptr-io_ptr and png_ptr->error_ptr
+ in pngtest.c
+
+version 1.4.0 [January 3, 2010]
No changes.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
@@ -2476,4 +2465,5 @@ to subscribe)
or to glennrp at users.sourceforge.net
Glenn R-P
-*/
+*/ }
+#endif
diff --git a/src/3rdparty/libpng/CMakeLists.txt b/src/3rdparty/libpng/CMakeLists.txt
new file mode 100644
index 0000000000..a95e0ec43b
--- /dev/null
+++ b/src/3rdparty/libpng/CMakeLists.txt
@@ -0,0 +1,265 @@
+cmake_minimum_required(VERSION 2.4.3)
+if(UNIX AND NOT DEFINED CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of
+ build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug
+ Release RelWithDebInfo MinSizeRel.")
+endif()
+
+project(PNG C)
+enable_testing()
+
+# Copyright (C) 2007-2010 Glenn Randers-Pehrson
+
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+set(PNGLIB_MAJOR 1)
+set(PNGLIB_MINOR 4)
+set(PNGLIB_RELEASE 0)
+set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
+set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
+
+set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
+
+# needed packages
+find_package(ZLIB REQUIRED)
+include_directories(${ZLIB_INCLUDE_DIR})
+
+if(NOT WIN32)
+ find_library(M_LIBRARY
+ NAMES m
+ PATHS /usr/lib /usr/local/lib
+ )
+ if(NOT M_LIBRARY)
+ message(STATUS
+ "math library 'libm' not found - floating point support disabled")
+ endif()
+else()
+ # not needed on windows
+ set(M_LIBRARY "")
+endif()
+
+# COMMAND LINE OPTIONS
+if(DEFINED PNG_SHARED)
+ option(PNG_SHARED "Build shared lib" ${PNG_SHARED})
+else()
+ option(PNG_SHARED "Build shared lib" ON)
+endif()
+if(DEFINED PNG_STATIC)
+ option(PNG_STATIC "Build static lib" ${PNG_STATIC})
+else()
+ option(PNG_STATIC "Build static lib" ON)
+endif()
+
+if(MINGW)
+ option(PNG_TESTS "Build pngtest" NO)
+else(MINGW)
+ option(PNG_TESTS "Build pngtest" YES)
+endif(MINGW)
+
+option(PNG_NO_CONSOLE_IO "FIXME" YES)
+option(PNG_NO_STDIO "FIXME" YES)
+option(PNG_DEBUG "Build with debug output" NO)
+option(PNGARG "FIXME" YES)
+#TODO:
+# PNG_CONSOLE_IO_SUPPORTED
+
+# maybe needs improving, but currently I don't know when we can enable what :)
+set(png_asm_tmp "OFF")
+if(NOT WIN32)
+ find_program(uname_executable NAMES uname PATHS /bin /usr/bin /usr/local/bin)
+ if(uname_executable)
+ EXEC_PROGRAM(${uname_executable} ARGS --machine OUTPUT_VARIABLE uname_output)
+ if("uname_output" MATCHES "^.*i[1-9]86.*$")
+ set(png_asm_tmp "ON")
+ else("uname_output" MATCHES "^.*i[1-9]86.*$")
+ set(png_asm_tmp "OFF")
+ endif("uname_output" MATCHES "^.*i[1-9]86.*$")
+ endif(uname_executable)
+else()
+ # this env var is normally only set on win64
+ SET(TEXT "ProgramFiles(x86)")
+ if("$ENV{${TEXT}}" STREQUAL "")
+ set(png_asm_tmp "ON")
+ endif("$ENV{${TEXT}}" STREQUAL "")
+endif()
+
+# SET LIBNAME
+set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
+
+# to distinguish between debug and release lib
+set(CMAKE_DEBUG_POSTFIX "d")
+
+
+# OUR SOURCES
+set(libpng_sources
+ png.h
+ pngconf.h
+ pngpriv.h
+ png.c
+ pngerror.c
+ pngget.c
+ pngmem.c
+ pngpread.c
+ pngread.c
+ pngrio.c
+ pngrtran.c
+ pngrutil.c
+ pngset.c
+ pngtrans.c
+ pngwio.c
+ pngwrite.c
+ pngwtran.c
+ pngwutil.c
+)
+set(pngtest_sources
+ pngtest.c
+)
+# SOME NEEDED DEFINITIONS
+
+add_definitions(-DPNG_CONFIGURE_LIBPNG)
+
+if(MSVC)
+ add_definitions(-DPNG_NO_MODULEDEF -D_CRT_SECURE_NO_DEPRECATE)
+endif(MSVC)
+
+if(PNG_SHARED OR NOT MSVC)
+ #if building msvc static this has NOT to be defined
+ add_definitions(-DZLIB_DLL)
+endif()
+
+if(PNG_CONSOLE_IO_SUPPORTED)
+ add_definitions(-DPNG_CONSOLE_IO_SUPPORTED)
+endif()
+
+if(PNG_NO_CONSOLE_IO)
+ add_definitions(-DPNG_NO_CONSOLE_IO)
+endif()
+
+if(PNG_NO_STDIO)
+ add_definitions(-DPNG_NO_STDIO)
+endif()
+
+if(PNG_DEBUG)
+ add_definitions(-DPNG_DEBUG)
+endif()
+
+if(NOT M_LIBRARY AND NOT WIN32)
+ add_definitions(-DPNG_NO_FLOATING_POINT_SUPPORTED)
+endif()
+
+# NOW BUILD OUR TARGET
+include_directories(${PNG_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
+
+if(PNG_SHARED)
+ add_library(${PNG_LIB_NAME} SHARED ${libpng_sources})
+ if(MSVC)
+ # msvc does not append 'lib' - do it here to have consistent name
+ set_target_properties(${PNG_LIB_NAME} PROPERTIES PREFIX "lib")
+ endif()
+ target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY})
+endif()
+
+if(PNG_STATIC)
+# does not work without changing name
+ set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static)
+ add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources})
+ if(MSVC)
+ # msvc does not append 'lib' - do it here to have consistent name
+ set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES PREFIX "lib")
+ endif()
+endif()
+
+
+if(PNG_SHARED AND WIN32)
+ set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL)
+endif()
+
+if(PNG_TESTS AND PNG_SHARED)
+# does not work with msvc due to png_lib_ver issue
+ add_executable(pngtest ${pngtest_sources})
+ target_link_libraries(pngtest ${PNG_LIB_NAME})
+ add_test(pngtest pngtest ${PNG_SOURCE_DIR}/pngtest.png)
+endif()
+
+
+# CREATE PKGCONFIG FILES
+# we use the same files like ./configure, so we have to set its vars
+set(prefix ${CMAKE_INSTALL_PREFIX})
+set(exec_prefix ${CMAKE_INSTALL_PREFIX})
+set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
+set(includedir ${CMAKE_INSTALL_PREFIX}/include)
+
+configure_file(${PNG_SOURCE_DIR}/libpng.pc.in
+ ${PNG_BINARY_DIR}/libpng.pc)
+configure_file(${PNG_SOURCE_DIR}/libpng-config.in
+ ${PNG_BINARY_DIR}/libpng-config)
+configure_file(${PNG_SOURCE_DIR}/libpng.pc.in
+ ${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc)
+configure_file(${PNG_SOURCE_DIR}/libpng-config.in
+ ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config)
+
+# SET UP LINKS
+if(PNG_SHARED)
+ set_target_properties(${PNG_LIB_NAME} PROPERTIES
+# VERSION 14.${PNGLIB_RELEASE}.1.4.0
+ VERSION 14.${PNGLIB_RELEASE}.0
+ SOVERSION 14
+ CLEAN_DIRECT_OUTPUT 1)
+endif()
+if(PNG_STATIC)
+ if(NOT WIN32)
+ # that's uncool on win32 - it overwrites our static import lib...
+ set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES
+ OUTPUT_NAME ${PNG_LIB_NAME}
+ CLEAN_DIRECT_OUTPUT 1)
+ endif()
+endif()
+
+# INSTALL
+if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
+ if(PNG_SHARED)
+ install(TARGETS ${PNG_LIB_NAME}
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
+ endif()
+ if(PNG_STATIC)
+ install(TARGETS ${PNG_LIB_NAME_STATIC}
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
+ endif()
+endif()
+
+if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
+ install(FILES png.h pngconf.h pngpriv.h DESTINATION include)
+ install(FILES png.h pngconf.h pngpriv.h DESTINATION include/${PNGLIB_NAME})
+endif()
+if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL )
+ install(PROGRAMS ${PNG_BINARY_DIR}/libpng-config DESTINATION bin)
+ install(PROGRAMS ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin)
+endif()
+if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
+ install(FILES libpng.3 libpngpf.3 DESTINATION man/man3)
+ install(FILES png.5 DESTINATION man/man5)
+ install(FILES ${PNG_BINARY_DIR}/libpng.pc DESTINATION lib/pkgconfig)
+ install(FILES ${PNG_BINARY_DIR}/libpng-config DESTINATION bin)
+ install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc DESTINATION lib/pkgconfig)
+ install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin)
+endif()
+
+# what's with libpng.txt and all the extra files?
+
+
+# UNINSTALL
+# do we need this?
+
+
+# DIST
+# do we need this?
+
+# to create msvc import lib for mingw compiled shared lib
+# pexports libpng.dll > libpng.def
+# lib /def:libpng.def /machine:x86
+
diff --git a/src/3rdparty/libpng/INSTALL b/src/3rdparty/libpng/INSTALL
index 2986ae3bea..79f02e7793 100644
--- a/src/3rdparty/libpng/INSTALL
+++ b/src/3rdparty/libpng/INSTALL
@@ -1,5 +1,5 @@
-Installing libpng version 1.2.40 - September 10, 2009
+Installing libpng version 1.4.0 - January 3, 2010
On Unix/Linux and similar systems, you can simply type
@@ -25,27 +25,29 @@ Instead, you can use one of the custom-built makefiles in the
make test
make install
-Or you can use one of the "projects" in the "projects" directory.
-
-If you want to use "cmake" (see www.cmake.org), copy CMakeLists.txt
-from the "scripts" directory to this directory and type
+The files that are presently available in the scripts directory
+are listed and described in scripts/README.txt.
- cmake . [-DPNG_MMX=YES] -DCMAKE_INSTALL_PREFIX=/path
- make
- make install
+Or you can use one of the "projects" in the "projects" directory.
Before installing libpng, you must first install zlib, if it
is not already on your system. zlib can usually be found
wherever you got libpng. zlib can be placed in another directory,
at the same level as libpng.
+If you want to use "cmake" (see www.cmake.org), type
+
+ cmake . -DCMAKE_INSTALL_PREFIX=/path
+ make
+ make install
+
If your system already has a preinstalled zlib you will still need
to have access to the zlib.h and zconf.h include files that
correspond to the version of zlib that's installed.
You can rename the directories that you downloaded (they
-might be called "libpng-1.2.40" or "lpng109" and "zlib-1.2.1"
-or "zlib121") so that you have directories called "zlib" and "libpng".
+might be called "libpng-1.4.0" or "libpng14" and "zlib-1.2.3"
+or "zlib123") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this:
@@ -55,19 +57,26 @@ Your directory structure should look like this:
README
*.h
*.c
+ CMakeLists.txt => "cmake" script
+ configuration files:
+ configure.ac, configure, Makefile.am, Makefile.in,
+ autogen.sh, config.guess, ltmain.sh, missing,
+ aclocal.m4, config.h.in, config.sub,
+ depcomp, install-sh, mkinstalldirs, test-pngtest.sh
contrib
gregbook
+ pngminim
pngminus
pngsuite
visupng
projects
- beos
- c5builder (Borland)
+ cbuilder5 (Borland)
visualc6 (msvc)
- netware.txt
- wince.txt
+ visualc71
+ xcode
scripts
makefile.*
+ *.def (module definition files)
pngtest.png
etc.
zlib
@@ -82,80 +91,13 @@ distribution of libpng. It is available in both tar.gz (UNIX style line
endings) and zip (DOS style line endings) formats.
If you are building libpng with MSVC, you can enter the
-libpng projects\visualc6 directory and follow the instructions in
-projects\visualc6\README.txt.
+libpng projects\visualc6 or visualc71 directory and follow the instructions
+in README.txt.
-You can build libpng for WindowsCE by downloading and installing
-the projects\wince directory as instructed in the projects\wince.txt file, and
-then following the instructions in the README* files. Similarly, you can
-build libpng for Netware or Beos as instructed in projects\netware.txt
-or projects\beos.
-
-Else enter the zlib directory and follow the instructions in zlib/README,
+Otherwise enter the zlib directory and follow the instructions in zlib/README,
then come back here and run "configure" or choose the appropriate
makefile.sys in the scripts directory.
-The files that are presently available in the scripts directory
-include
-
- CMakeLists.txt => "cmake" script
- makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
- makefile.elf => Linux/ELF makefile symbol versioning,
- gcc, creates libpng12.so.0.1.2.40)
- makefile.linux => Linux/ELF makefile
- (gcc, creates libpng12.so.0.1.2.40)
- makefile.gcc => Generic makefile (gcc, creates static libpng.a)
- makefile.knr => Archaic UNIX Makefile that converts files with
- ansi2knr (Requires ansi2knr.c from
- ftp://ftp.cs.wisc.edu/ghost)
- makefile.aix => AIX/gcc makefile
- makefile.cygwin => Cygwin/gcc makefile
- makefile.darwin => Darwin makefile, can use on MacosX
- makefile.dec => DEC Alpha UNIX makefile
- makefile.freebsd => FreeBSD makefile
- makefile.hpgcc => HPUX makefile using gcc
- makefile.hpux => HPUX (10.20 and 11.00) makefile
- makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64-bit
- makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
- makefile.intel => Intel C/C++ version 4.0 and later
- libpng.icc => Project file for IBM VisualAge/C++ version 4.0 or later
- makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD, makes libpng.so.
- makefile.ne12bsd => NetBSD/cc makefile, uses PNGGCCRD,
- makes libpng12.so
- makefile.openbsd => OpenBSD makefile
- makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
- makefile.sggcc => Silicon Graphics (gcc,
- creates libpng12.so.0.1.2.40)
- makefile.sunos => Sun makefile
- makefile.solaris => Solaris 2.X makefile (gcc,
- creates libpng12.so.0.1.2.40)
- makefile.solaris-x86 => Solaris/intelMMX 2.X makefile (gcc,
- creates libpng12.so.0.1.2.40)
- makefile.so9 => Solaris 9 makefile (gcc,
- creates libpng12.so.0.1.2.40)
- makefile.32sunu => Sun Ultra 32-bit makefile
- makefile.64sunu => Sun Ultra 64-bit makefile
- makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
- makefile.mips => MIPS makefile
- makefile.acorn => Acorn makefile
- makefile.amiga => Amiga makefile
- smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC compiler
- (Requires SCOPTIONS, copied from scripts/SCOPTIONS.ppc)
- makefile.atari => Atari makefile
- makefile.beos => BEOS makefile for X86
- makefile.bor => Borland makefile (uses bcc)
- makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode)
- makefile.tc3 => Turbo C 3.0 makefile
- makefile.dj2 => DJGPP 2 makefile
- makefile.msc => Microsoft C makefile
- makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and later
- makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
- pngos2.def => OS/2 module definition file used by makefile.os2
- makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model
- makevms.com => VMS build script
- descrip.mms => VMS makefile for MMS or MMK
- SCOPTIONS.ppc => Used with smakefile.ppc
-
Copy the file (or files) that you need from the
scripts directory into this directory, for example
@@ -185,9 +127,11 @@ run "make install".
If you encounter a compiler error message complaining about the
lines
+
__png.h__ already includes setjmp.h;
__dont__ include it again.;
-This means you have compiled another module that includes setjmp.h,
+
+this means you have compiled another module that includes setjmp.h,
which is hazardous because the two modules might not include exactly
the same setjmp.h. If you are sure that you know what you are doing
and that they are exactly the same, then you can comment out or
diff --git a/src/3rdparty/libpng/KNOWNBUG b/src/3rdparty/libpng/KNOWNBUG
deleted file mode 100644
index 5e0c96ff45..0000000000
--- a/src/3rdparty/libpng/KNOWNBUG
+++ /dev/null
@@ -1,22 +0,0 @@
-
-Known bugs in libpng version 1.2.40
-
-1. February 23, 2006: The custom makefiles don't build libpng with -lz.
-
- STATUS: This is a subject of debate. The change will probably be made
- as a part of a major overhaul of the makefiles in libpng version 1.4.0.
-
-2. February 24, 2006: The Makefile generated by the "configure" script
- fails to install symbolic links
- libpng12.so => libpng12.so.0.1.2.9betaN
- that are generated by the custom makefiles.
-
-3. September 4, 2007: There is a report that pngtest crashes on MacOS 10.
-
- STATUS: workarounds are
- 1) Compile without optimization (crashes are observed with
- -arch i386 and -O2 or -O3, using gcc-4.0.1).
- 2) Compile pngtest.c with PNG_DEBUG defined (the bug goes away if
- you try to look at it).
- 3) Ignore the crash. The library itself seems to be OK.
-
diff --git a/src/3rdparty/libpng/LICENSE b/src/3rdparty/libpng/LICENSE
index 93dd04a15b..7462ec3515 100644
--- a/src/3rdparty/libpng/LICENSE
+++ b/src/3rdparty/libpng/LICENSE
@@ -10,8 +10,8 @@ this sentence.
This code is released under the libpng license.
-libpng versions 1.2.6, August 15, 2004, through 1.2.40, September 10, 2009, are
-Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are
+libpng versions 1.2.6, August 15, 2004, through 1.4.0, January 3, 2010, are
+Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@@ -108,4 +108,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-September 10, 2009
+January 3, 2010
diff --git a/src/3rdparty/libpng/README b/src/3rdparty/libpng/README
index 171b65a45a..68d7a8e454 100644
--- a/src/3rdparty/libpng/README
+++ b/src/3rdparty/libpng/README
@@ -1,15 +1,11 @@
-README for libpng version 1.2.40 - September 10, 2009 (shared library 12.0)
+README for libpng version 1.4.0 - January 3, 2010 (shared library 14.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
Libpng comes in several distribution formats. Get libpng-*.tar.gz,
-libpng-*.tar.lzma, or libpng-*.tar.bz2 if you want UNIX-style line
-endings in the text files, or lpng*.7z or lpng*.zip if you want DOS-style
-line endings. You can get UNIX-style line endings from the *.zip file
-by using "unzip -a" but there seems to be no simple way to recover
-UNIX-style line endings from the *.7z file. The *.tar.lzma file is
-recommended for *NIX users instead.
+libpng-*.tar.xz or libpng-*.tar.bz2 if you want UNIX-style line endings
+in the text files, or lpng*.zip if you want DOS-style line endings.
Version 0.89 was the first official release of libpng. Don't let the
fact that it's the first release fool you. The libpng library has been in
@@ -58,9 +54,9 @@ to set different actions based on whether the CRC error occurred in a
critical or an ancillary chunk.
The changes made to the library, and bugs fixed are based on discussions
-on the png-mng-implement mailing list
-and not on material submitted privately to Guy, Andreas, or Glenn. They will
-forward any good suggestions to the list.
+on the PNG-implement mailing list and not on material submitted
+privately to Guy, Andreas, or Glenn. They will forward any good
+suggestions to the list.
For a detailed description on using libpng, read libpng.txt. For
examples of libpng in a program, see example.c and pngtest.c. For usage
@@ -81,12 +77,12 @@ compression library that is useful for more things than just PNG files.
You can use zlib as a drop-in replacement for fread() and fwrite() if
you are so inclined.
-zlib should be available at the same place that libpng is, or at
-ftp://ftp.simplesystems.org/pub/png/src/
+zlib should be available at the same place that libpng is, or at.
+ftp://ftp.info-zip.org/pub/infozip/zlib
You may also want a copy of the PNG specification. It is available
as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
-these at http://www.libpng.org/pub/png/pngdocs.html
+these at http://www.libpng.org/pub/png/documents/
This code is currently being archived at libpng.sf.net in the
[DOWNLOAD] area, and on CompuServe, Lib 20 (PNG SUPPORT)
@@ -105,23 +101,24 @@ Finally, if you get any warning messages when compiling libpng
fix. Please mention "libpng" somewhere in the subject line. Thanks.
This release was created and will be supported by myself (of course
-based in a large way on Guy's and Andreas' earlier work), and the PNG group.
+based in a large way on Guy's and Andreas' earlier work), and the PNG
+development group.
-Send comments/corrections/commendations to png-mng-implement at lists.sf.net
-(subscription required; visit
+Send comments/corrections/commendations to png-mng-implement at
+lists.sourceforge.net (subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe) or to glennrp at users.sourceforge.net
You can't reach Guy, the original libpng author, at the addresses
-given in previous versions of this document. He and Andreas will read mail
-addressed to the png-mng-implement list, however.
+given in previous versions of this document. He and Andreas will
+read mail addressed to the png-implement list, however.
Please do not send general questions about PNG. Send them to
-the (png-mng-misc at lists.sourceforge.net, subscription required, visit
-https://lists.sourceforge.net/lists/listinfo/png-mng-implement to subscribe)
+the (png-list at ccrc.wustl.edu, subscription required, write to
+majordomo at ccrc.wustl.edu with "subscribe png-list" in your message).
On the other hand,
please do not send libpng questions to that address, send them to me
-or to the png-mng-implement list. I'll
+or to the png-implement list. I'll
get them in the end anyway. If you have a question about something
in the PNG specification that is related to using libpng, send it
to me. Send me any questions that start with "I was using libpng,
@@ -129,7 +126,7 @@ and ...". If in doubt, send questions to me. I'll bounce them
to others, if necessary.
Please do not send suggestions on how to change PNG. We have
-been discussing PNG for twelve years now, and it is official and
+been discussing PNG for nine years now, and it is official and
finished. If you have suggestions for libpng, however, I'll
gladly listen. Even if your suggestion is not used immediately,
it may be used later.
@@ -144,7 +141,6 @@ Files in this distribution:
TODO => Things not implemented in the current library
Y2KINFO => Statement of Y2K compliance
example.c => Example code for using libpng functions
- libpng-*-*-diff.txt => Diff from previous release
libpng.3 => manual page for libpng (includes libpng.txt)
libpng.txt => Description of libpng and its functions
libpngpf.3 => manual page for libpng's private functions
@@ -178,28 +174,20 @@ Files in this distribution:
pngminus => Simple pnm2png and png2pnm programs
pngsuite => Test images
visupng => Contains a MSVC workspace for VisualPng
- projects => Contains project files and workspaces for building DLL
- beos => Contains a Beos workspace for building libpng
- c5builder => Contains a Borland workspace for building libpng
- and zlib
- visualc6 => Contains a Microsoft Visual C++ (MSVC) workspace
- for building libpng and zlib
- netware.txt => Contains instructions for downloading a set of
- project files for building libpng and zlib on
- Netware.
- wince.txt => Contains instructions for downloading a Microsoft
- Visual C++ (Windows CD Toolkit) workspace for
- building libpng and zlib on WindowsCE
+ projects => Contains project files and workspaces for
+ building a DLL
+ c5builder => Contains a Borland workspace for building
+ libpng and zlib
+ visualc6 => Contains a Microsoft Visual C++ (MSVC)
+ workspace for building libpng and zlib
scripts => Directory containing scripts for building libpng:
descrip.mms => VMS makefile for MMS or MMK
- makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
+ makefile.std => Generic UNIX makefile (cc, creates static
+ libpng.a)
makefile.elf => Linux/ELF makefile symbol versioning,
- gcc, creates libpng12.so.0.1.2.40)
+ gcc, creates libpng14.so.14.1.4.0)
makefile.linux => Linux/ELF makefile
- (gcc, creates libpng12.so.0.1.2.40)
- makefile.gcmmx => Linux/ELF makefile
- (gcc, creates libpng12.so.0.1.2.40,
- uses assembler code tuned for Intel MMX platform)
+ (gcc, creates libpng14.so.14.1.4.0)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
@@ -214,18 +202,19 @@ Files in this distribution:
makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64 bit
makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
makefile.intel => Intel C/C++ version 4.0 and later
- libpng.icc => Project file, IBM VisualAge/C++ 4.0 or later
- makefile.netbsd => NetBSD/cc makefile, PNGGCCRD, makes libpng.so.
- makefile.ne12bsd => NetBSD/cc makefile, PNGGCCRD, makes libpng12.so
+ makefile.mingw => Mingw/gcc makefile
+ makefile.netbsd => NetBSD/cc makefile, makes libpng.so.
+ makefile.ne14bsd => NetBSD/cc makefile, makes
+ libpng14.so
makefile.openbsd => OpenBSD makefile
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
makefile.sggcc => Silicon Graphics
- (gcc, creates libpng12.so.0.1.2.40)
+ (gcc, creates libpng14.so.14.1.4.0)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile
- (gcc, creates libpng12.so.0.1.2.40)
+ (gcc, creates libpng14.so.14.1.4.0)
makefile.so9 => Solaris 9 makefile
- (gcc, creates libpng12.so.0.1.2.40)
+ (gcc, creates libpng14.so.14.1.4.0)
makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
@@ -242,25 +231,26 @@ Files in this distribution:
makefile.tc3 => Turbo C 3.0 makefile
makefile.dj2 => DJGPP 2 makefile
makefile.msc => Microsoft C makefile
- makefile.vcawin32=> makefile for Microsoft Visual C++ 5.0 and
- later (uses assembler code tuned for Intel MMX
- platform)
makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and
later (does not use assembler code)
makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
- pngos2.def => OS/2 module definition file used by makefile.os2
+ png32ce.def => module definition for makefile.cegccg
+ pngos2.def => OS/2 module definition file used by
+ makefile.os2
+ pngwin.def => module definition file used by
+ makefile.cygwin and makefile.mingw
makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model
makevms.com => VMS build script
SCOPTIONS.ppc => Used with smakefile.ppc
Good luck, and happy coding.
--Glenn Randers-Pehrson (current maintainer)
+-Glenn Randers-Pehrson (current maintainer, since 1998)
Internet: glennrp at users.sourceforge.net
-Andreas Eric Dilger (former maintainer, 1996-1997)
Internet: adilger at enel.ucalgary.ca
- Web: http://members.shaw.ca/adilger/
+ Web: http://www-mddsp.enel.ucalgary.ca/People/adilger/
-Guy Eric Schalnat (original author and former maintainer, 1995-1996)
(formerly of Group 42, Inc)
diff --git a/src/3rdparty/libpng/TODO b/src/3rdparty/libpng/TODO
index face7658c6..7fe1ddf100 100644
--- a/src/3rdparty/libpng/TODO
+++ b/src/3rdparty/libpng/TODO
@@ -1,3 +1,4 @@
+/*
TODO - list of things to do for libpng:
Final bug fixes.
@@ -17,9 +18,14 @@ Better filter selection
(counting huffman bits/precompression? filter inertia? filter costs?).
Histogram creation.
Text conversion between different code pages (Latin-1 -> Mac and DOS).
-Should we always malloc 2^bit_depth PLTE/tRNS/hIST entries for safety?
Build gamma tables using fixed point (and do away with floating point entirely).
+Avoid building gamma tables whenever possible.
Use greater precision when changing to linear gamma for compositing against
background and doing rgb-to-gray transformation.
Investigate pre-incremented loop counters and other loop constructions.
Add interpolated method of handling interlacing.
+Provide for conditional compilation of 16-bit support (except for the
+ initial stripping down to 8-bits when reading a 16-bit PNG datastream).
+Switch to the simpler zlib (zlib/libpng) license if legally possible.
+
+*/
diff --git a/src/3rdparty/libpng/Y2KINFO b/src/3rdparty/libpng/Y2KINFO
deleted file mode 100644
index e31bb7f161..0000000000
--- a/src/3rdparty/libpng/Y2KINFO
+++ /dev/null
@@ -1,55 +0,0 @@
- Y2K compliance in libpng:
- =========================
-
- September 10, 2009
-
- Since the PNG Development group is an ad-hoc body, we can't make
- an official declaration.
-
- This is your unofficial assurance that libpng from version 0.71 and
- upward through 1.2.40 are Y2K compliant. It is my belief that earlier
- versions were also Y2K compliant.
-
- Libpng only has three year fields. One is a 2-byte unsigned integer
- that will hold years up to 65535. The other two hold the date in text
- format, and will hold years up to 9999.
-
- The integer is
- "png_uint_16 year" in png_time_struct.
-
- The strings are
- "png_charp time_buffer" in png_struct and
- "near_time_buffer", which is a local character string in png.c.
-
- There are seven time-related functions:
-
- png_convert_to_rfc_1123() in png.c
- (formerly png_convert_to_rfc_1152() in error)
- png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c
- png_convert_from_time_t() in pngwrite.c
- png_get_tIME() in pngget.c
- png_handle_tIME() in pngrutil.c, called in pngread.c
- png_set_tIME() in pngset.c
- png_write_tIME() in pngwutil.c, called in pngwrite.c
-
- All appear to handle dates properly in a Y2K environment. The
- png_convert_from_time_t() function calls gmtime() to convert from system
- clock time, which returns (year - 1900), which we properly convert to
- the full 4-digit year. There is a possibility that applications using
- libpng are not passing 4-digit years into the png_convert_to_rfc_1123()
- function, or that they are incorrectly passing only a 2-digit year
- instead of "year - 1900" into the png_convert_from_struct_tm() function,
- but this is not under our control. The libpng documentation has always
- stated that it works with 4-digit years, and the APIs have been
- documented as such.
-
- The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned
- integer to hold the year, and can hold years as large as 65535.
-
- zlib, upon which libpng depends, is also Y2K compliant. It contains
- no date-related code.
-
-
- Glenn Randers-Pehrson
- libpng maintainer
- PNG Development Group
diff --git a/src/3rdparty/libpng/aclocal.m4 b/src/3rdparty/libpng/aclocal.m4
new file mode 100644
index 0000000000..27bc57cf43
--- /dev/null
+++ b/src/3rdparty/libpng/aclocal.m4
@@ -0,0 +1,8949 @@
+# generated automatically by aclocal 1.11 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
+[m4_warning([this file was generated for autoconf 2.65.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool 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.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
+
+# serial 56 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+ [m4_default([$3],
+ [m4_fatal([Libtool version $1 or higher is required],
+ 63)])],
+ [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+ *\ * | *\ *)
+ AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+ case $cc_temp in
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+_LT_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ _LT_PATH_MAGIC
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+ [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME. Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+ [m4_ifval([$1], [$1], [$2])])
+ lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+ m4_ifval([$4],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+ lt_dict_add_subkey([lt_decl_dict], [$2],
+ [tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+ [0], [m4_fatal([$0: too few arguments: $#])],
+ [1], [m4_fatal([$0: too few arguments: $#: $1])],
+ [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+ [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+ [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+ m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_if([$2], [],
+ m4_quote(lt_decl_varnames),
+ m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+ lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'. VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly. In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+ [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+# # Some comment about what VAR is for.
+# visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+ [description])))[]dnl
+m4_pushdef([_libtool_name],
+ m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+ [0], [_libtool_name=[$]$1],
+ [1], [_libtool_name=$lt_[]$1],
+ [2], [_libtool_name=$lt_[]$1],
+ [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+ m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'. Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+ dnl If the libtool generation code has been placed in $CONFIG_LT,
+ dnl instead of duplicating it all over again into config.status,
+ dnl then we will have config.status run $CONFIG_LT later, so it
+ dnl needs to know what name is stored there:
+ [AC_CONFIG_COMMANDS([libtool],
+ [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+ dnl If the libtool generation code is destined for config.status,
+ dnl expand the accumulated commands and init code now:
+ [AC_CONFIG_COMMANDS([libtool],
+ [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\[$]0 --fallback-echo"')dnl "
+ lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
+ ;;
+esac
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+cat >"$CONFIG_LT" <<_LTEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate a libtool stub with the current configuration.
+
+lt_cl_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AS_SHELL_SANITIZE
+_AS_PREPARE
+
+exec AS_MESSAGE_FD>&1
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+ echo
+ AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+ case $[1] in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+ *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+if test "$no_create" != yes; then
+ lt_cl_success=:
+ test "$silent" = yes &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+ exec AS_MESSAGE_LOG_FD>/dev/null
+ $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+ exec AS_MESSAGE_LOG_FD>>config.log
+ $lt_cl_success || AS_EXIT(1)
+fi
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars. Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+ m4_if(_LT_TAG, [C], [
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+ _LT_PROG_LTMAIN
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ _LT_PROG_XSI_SHELLFNS
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+# autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Fortran], [_LT_LANG(FC)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+ [LT_SUPPORTED_TAG([$1])dnl
+ m4_append([_LT_TAGS], [$1 ])dnl
+ m4_define([_LT_LANG_]$1[_enabled], [])dnl
+ _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [LT_LANG(CXX)],
+ [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [LT_LANG(F77)],
+ [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+ [LT_LANG(FC)],
+ [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [m4_ifdef([AC_PROG_GCJ],
+ [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([A][M_PROG_GCJ],
+ [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([LT_PROG_GCJ],
+ [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+ [LT_LANG(RC)],
+ [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+ case $host_os in
+ rhapsody* | darwin*)
+ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+ AC_CHECK_TOOL([LIPO], [lipo], [:])
+ AC_CHECK_TOOL([OTOOL], [otool], [:])
+ AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+ _LT_DECL([], [DSYMUTIL], [1],
+ [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+ _LT_DECL([], [NMEDIT], [1],
+ [Tool to change global to local symbols on Mac OS X])
+ _LT_DECL([], [LIPO], [1],
+ [Tool to manipulate fat objects and archives on Mac OS X])
+ _LT_DECL([], [OTOOL], [1],
+ [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+ _LT_DECL([], [OTOOL64], [1],
+ [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+ [lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi])
+ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+ [lt_cv_ld_exported_symbols_list],
+ [lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [lt_cv_ld_exported_symbols_list=yes],
+ [lt_cv_ld_exported_symbols_list=no])
+ LDFLAGS="$save_LDFLAGS"
+ ])
+ case $host_os in
+ rhapsody* | darwin1.[[012]])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[[012]]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES
+# --------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+ m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=echo
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ m4_if([$1], [CXX],
+[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ fi
+],[])
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX
+# -----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+ [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_SHELL_INIT
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[_LT_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X[$]1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+[$]*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "[$]0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(lt_ECHO)
+])
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1],
+ [An echo program that does not interpret backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+ [AS_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_LANG_PUSH(C)
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LANG_POP])
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[AC_CHECK_TOOL(AR, ar, false)
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1])
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+ [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+ [Commands used to build an old-style archive])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ fi
+ $RM conftest*
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$5], , :, [$5])
+else
+ m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $3"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ else
+ $2=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$4], , :, [$4])
+else
+ m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+ [$4]
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}]
+_LT_EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) $1 ;;
+ x$lt_dlneed_uscore) $2 ;;
+ x$lt_dlunknown|x*) $3 ;;
+ esac
+ else :
+ # compilation failed
+ $3
+ fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen="shl_load"],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen="dlopen"],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ chmod u+w . 2>&AS_MESSAGE_LOG_FD
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+ [Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links="nottested"
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ AC_MSG_CHECKING([if we can lock with hard links])
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ AC_MSG_RESULT([$hard_links])
+ if test "$hard_links" = no; then
+ AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+ [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+ [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+ test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+ test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+ # Linking always hardcodes the temporary library directory.
+ _LT_TAGVAR(hardcode_action, $1)=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ _LT_TAGVAR(hardcode_action, $1)=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+ test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+ [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+ [], [
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[[4-9]]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[[01]] | aix4.[[01]].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[[45]]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[[123]]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[[3-9]]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+ [shlibpath_overrides_runpath=yes])])
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+ [Variables whose values should be saved in libtool wrapper scripts and
+ restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+ [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+ [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+ [[List of archive names. First name is the real one, the rest are links.
+ The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+ [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [postinstall_cmds], [2],
+ [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+ [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+ [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+ [[As "finish_cmds", except a single script fragment to be evaled but
+ not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+ [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+ [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+ [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$1; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[[45]]*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[[3-9]]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+ [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+ [Command to use when deplibs_check_method == "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+ AC_SUBST([DUMPBIN])
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+ [lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+ cat conftest.out >&AS_MESSAGE_LOG_FD
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+ _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ lt_cv_prog_compiler_rtti_exceptions,
+ [-fno-rtti -fno-exceptions], [],
+ [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+ [Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[[BCDT]]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[[ABCDGISTW]]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris*)
+ symcode='[[BDRT]]'
+ ;;
+sco3.2v5*)
+ symcode='[[DT]]'
+ ;;
+sysv4.2uw2*)
+ symcode='[[DT]]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[[ABDT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK ['"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx]"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+ [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+ [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+ [lt_cv_sys_global_symbol_to_c_name_address], [1],
+ [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+ [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+ [Transform the output of nm in a C name address pair when lib prefix is needed])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+m4_if([$1], [CXX], [
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[[4-9]]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ aCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64 which still supported -KPIC.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xlc* | xlC*)
+ # IBM XL 8.0 on PPC
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd*)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+],
+[
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC (with -KPIC) is the default.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ ccc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All Alpha code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xl*)
+ # IBM XL C 8.0/Fortran 10.1 on PPC
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All OSF/1 code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ rdos*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ unicos*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+])
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+ ;;
+esac
+AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+ [How to pass a linker flag through the compiler])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+ [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+ [Additional compiler flags for building library objects])
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+ _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+ $lt_tmp_static_flag,
+ [],
+ [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+ [Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ case $host_os in
+ aix[[4-9]]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ ;;
+ cygwin* | mingw* | cegcc*)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+], [
+ runpath_var=
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)=
+ _LT_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_TAGVAR(compiler_needs_object, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(hardcode_automatic, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(inherit_rpath, $1)=no
+ _LT_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_TAGVAR(module_cmds, $1)=
+ _LT_TAGVAR(module_expsym_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ _LT_TAGVAR(include_expsyms, $1)=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[[3-9]]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ tmp_sharedflag='--shared' ;;
+ xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+
+ if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+ runpath_var=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[[45]]*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ freebsd1*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ AC_LINK_IFELSE(int foo(void) {},
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ )
+ LDFLAGS="$save_LDFLAGS"
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ ;;
+ motorola)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+ [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+ # Assume -lc should be added
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $_LT_TAGVAR(archive_cmds, $1) in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+ pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+ then
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+ [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+ [enable_shared_with_static_runtimes], [0],
+ [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+ [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+ [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+ [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+ [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+ [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+ [Commands used to build a loadable module if different from building
+ a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+ [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+ [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+ [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+ [Flag to hardcode $libdir into a binary during linking.
+ This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
+ [[If ld is used when linking, flag to hardcode $libdir into a binary
+ during linking. This must work even if $libdir does not exist]])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+ [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary and the resulting library dependency is
+ "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+ library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+ [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+ [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+ [Set to "yes" if building a shared library automatically hardcodes DIR
+ into the library and all subsequent libraries and executables linked
+ against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+ [Set to yes if linker adds runtime paths of dependent libraries
+ to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+ [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [fix_srcfile_path], [1],
+ [Fix the shell variable $srcfile for the compiler])
+_LT_TAGDECL([], [always_export_symbols], [0],
+ [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+ [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+ [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+ [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+ [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [file_list_spec], [1],
+ [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+ LT_SYS_DLOPEN_SELF
+ _LT_CMD_STRIPLIB
+
+ # Report which library types will actually be built
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_PROG_CXX
+# ------------
+# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
+# compiler, we have our own version here.
+m4_defun([_LT_PROG_CXX],
+[
+pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
+AC_PROG_CXX
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ AC_PROG_CXXCPP
+else
+ _lt_caught_CXX_error=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_CXX
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_CXX], [])
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[AC_REQUIRE([_LT_PROG_CXX])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ else
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+ LT_PATH_LD
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ freebsd[[12]]*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ freebsd-elf*)
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ hpux9*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+ fi
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
+ _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+ _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+ $RANLIB $oldlib'
+ _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 will use weak symbols
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ xl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=echo
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ case $host in
+ osf3*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ fi
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+ test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+ _LT_TAGVAR(GCC, $1)="$GXX"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+_LT_EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case $p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ else
+ prev=
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ case $p in
+ -L* | -R*)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+ _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+ fi
+ fi
+ ;;
+
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+ _LT_TAGVAR(predep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+ _LT_TAGVAR(postdep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ _LT_TAGVAR(predep_objects,$1)=
+ _LT_TAGVAR(postdep_objects,$1)=
+ _LT_TAGVAR(postdeps,$1)=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+ [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+ [Dependencies to place before and after the objects being linked to
+ create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+ [The library search path used internally by the compiler when linking
+ a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_PROG_F77
+# ------------
+# Since AC_PROG_F77 is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_F77],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
+AC_PROG_F77
+if test -z "$F77" || test "X$F77" = "Xno"; then
+ _lt_disable_F77=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_F77
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_F77], [])
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_REQUIRE([_LT_PROG_F77])dnl
+AC_LANG_PUSH(Fortran 77)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ CC=${F77-"f77"}
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+ GCC=$G77
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$G77"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC="$lt_save_CC"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_PROG_FC
+# -----------
+# Since AC_PROG_FC is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_FC],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
+AC_PROG_FC
+if test -z "$FC" || test "X$FC" = "Xno"; then
+ _lt_disable_FC=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_FC
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_FC], [])
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_REQUIRE([_LT_PROG_FC])dnl
+AC_LANG_PUSH(Fortran)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ CC=${FC-"f95"}
+ compiler=$CC
+ GCC=$ac_cv_fc_compiler_gnu
+
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC="$lt_save_CC"
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC="$lt_save_CC"
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+ :
+ _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+ [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_XSI_SHELLFNS
+# ---------------------
+# Bourne and XSI compatible variants of some useful shell functions.
+m4_defun([_LT_PROG_XSI_SHELLFNS],
+[case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=$(( $[*] ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=${#1}
+}
+
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+dnl func_dirname_and_basename
+dnl A portable version of this function is already defined in general.m4sh
+dnl so there is no need for it here.
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[[^=]]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "$[@]"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$[1]+=\$[2]"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$[1]=\$$[1]\$[2]"
+}
+
+_LT_EOF
+ ;;
+ esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it. Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+ _LT_MANGLE_DEFUN([$1], [$2]),
+ [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME. If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+ dnl
+ dnl Simply set some default values (i.e off) if boolean options were not
+ dnl specified:
+ _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+ ])
+ _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+ ])
+ dnl
+ dnl If no reference was made to various pairs of opposing options, then
+ dnl we run the default mode handler for the pair. For example, if neither
+ dnl `shared' nor `disable-shared' was passed, we enable building of shared
+ dnl archives by default:
+ _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+ _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+ [_LT_ENABLE_FAST_INSTALL])
+ ])
+])# _LT_SET_OPTIONS
+
+
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS], [0], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+ [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+ [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+ _LT_DECL([build_old_libs], [enable_static], [0],
+ [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+ [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+ [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+ [AS_HELP_STRING([--with-pic],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [pic_mode="$withval"],
+ [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+ [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+ [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+ [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+ [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+ [m4_define([_LTDL_TYPE], [convenience])])
+
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+ [$#], [2], [[$2]],
+ [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+ [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+ [$#], 1, [],
+ [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+ m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+ [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+ [m4_foreach([_Lt_suffix],
+ ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+ [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+ [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+ [lt_append([$1], [$2], [$3])$4],
+ [$5])],
+ [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+ m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+ m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+ [$5],
+ [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+ [lt_join(m4_quote(m4_default([$4], [[, ]])),
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+ [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
+
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+#
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# Generated from ltversion.in.
+
+# serial 3017 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.2.6b])
+m4_define([LT_PACKAGE_REVISION], [1.3017])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.2.6b'
+macro_revision='1.3017'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
+
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 4 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else. This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 10
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 16
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well. Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
diff --git a/src/3rdparty/libpng/autogen.sh b/src/3rdparty/libpng/autogen.sh
new file mode 100755
index 0000000000..77b63087c8
--- /dev/null
+++ b/src/3rdparty/libpng/autogen.sh
@@ -0,0 +1,25 @@
+#! /bin/sh
+# a quick hack script to generate necessary files from
+# auto* tools.
+#
+# WARNING: if you run this you will change the versions
+# of the tools which are used and, maybe, required!
+ touch Makefile.am configure.ac
+{
+ echo "running libtoolize" >&2
+ libtoolize --force --copy --automake
+} && {
+ echo "running aclocal" >&2
+ aclocal
+} && {
+ echo "running autoheader [ignore the warnings]" >&2
+ autoheader
+} && {
+ echo "running automake" >&2
+ automake --force-missing --foreign -a -c
+} && {
+ echo "running autoconf" >&2
+ autoconf
+} &&
+ echo "autogen complete" >&2 ||
+ echo "ERROR: autogen.sh failed, autogen is incomplete" >&2
diff --git a/src/3rdparty/libpng/config.guess b/src/3rdparty/libpng/config.guess
new file mode 100755
index 0000000000..da83314608
--- /dev/null
+++ b/src/3rdparty/libpng/config.guess
@@ -0,0 +1,1561 @@
+#! /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
+# Free Software Foundation, Inc.
+
+timestamp='2009-04-27'
+
+# 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 <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. 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 <config-patches@gnu.org>."
+
+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 __ELF__ >/dev/null
+ 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 <stdio.h> /* 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 <sys/systemcfg.h>
+
+ 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 <stdlib.h>
+ #include <unistd.h>
+
+ 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 __LP64__ >/dev/null
+ 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 <unistd.h>
+ 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 ;;
+ 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:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #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; }
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #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 ld.so.1 >/dev/null
+ 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"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #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.0*:*)
+ 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' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/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.0*:*)
+ 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 <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # 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 <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#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 <sys/param.h>
+ 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 <sys/param.h>
+# 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 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> 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/libpng/config.h.in b/src/3rdparty/libpng/config.h.in
new file mode 100644
index 0000000000..fb2349568c
--- /dev/null
+++ b/src/3rdparty/libpng/config.h.in
@@ -0,0 +1,86 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
+/* Define to 1 if you have the `z' library (-lz). */
+#undef HAVE_LIBZ
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `memset' function. */
+#undef HAVE_MEMSET
+
+/* Define to 1 if you have the `pow' function. */
+#undef HAVE_POW
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
diff --git a/src/3rdparty/libpng/config.sub b/src/3rdparty/libpng/config.sub
new file mode 100755
index 0000000000..a39437d015
--- /dev/null
+++ b/src/3rdparty/libpng/config.sub
@@ -0,0 +1,1686 @@
+#! /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
+# Free Software Foundation, Inc.
+
+timestamp='2009-04-17'
+
+# 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 <config-patches@gnu.org>. 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 <config-patches@gnu.org>."
+
+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
+ ;;
+ -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
+ ;;
+ 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* | -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
+ ;;
+ -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/libpng/configure b/src/3rdparty/libpng/configure
index 4871efc8c6..347d34b4a5 100755
--- a/src/3rdparty/libpng/configure
+++ b/src/3rdparty/libpng/configure
@@ -1,13 +1,13839 @@
-#!/bin/sh
-echo "
- There is no \"configure\" script in this distribution of
- libpng-1.2.40.
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.65 for libpng 1.4.0.
+#
+# Report bugs to <png-mng-implement@lists.sourceforge.net>.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
- Instead, please copy the appropriate makefile for your system from the
- \"scripts\" directory. Read the INSTALL file for more details.
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
- Update, July 2004: you can get a \"configure\" based distribution
- from the libpng distribution sites. Download the file
- libpng-1.2.40.tar.gz, libpng-1.2.40.tar.lzma, or libpng-1.2.40.tar.bz2
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: png-mng-implement@lists.sourceforge.net about your
+$0: system, including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with status $?, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$?; test $as_status -eq 0 && as_status=1
+ if test "$3"; then
+ as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ fi
+ $as_echo "$as_me: error: $1" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+$*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='libpng'
+PACKAGE_TARNAME='libpng'
+PACKAGE_VERSION='1.4.0'
+PACKAGE_STRING='libpng 1.4.0'
+PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
+PACKAGE_URL=''
+
+ac_unique_file="pngget.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+binconfigs
+pkgconfigdir
+PNGLIB_RELEASE
+PNGLIB_MINOR
+PNGLIB_MAJOR
+PNGLIB_VERSION
+SYMBOL_PREFIX
+HAVE_LD_VERSION_SCRIPT_FALSE
+HAVE_LD_VERSION_SCRIPT_TRUE
+LIBPNG_DEFINES
+LIBOBJS
+POW_LIB
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+lt_ECHO
+RANLIB
+AR
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LIBTOOL
+LN_S
+OBJDUMP
+DLLTOOL
+AS
+CPP
+LD
+FGREP
+EGREP
+GREP
+SED
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_maintainer_mode
+enable_dependency_tracking
+with_gnu_ld
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+enable_libtool_lock
+with_pkgconfigdir
+with_binconfigs
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information."
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures libpng 1.4.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/libpng]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of libpng 1.4.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-static[=PKGS] build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+ --disable-libtool-lock avoid locking (might break parallel builds)
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-pic try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-pkgconfigdir Use the specified pkgconfig dir (default is
+ libdir/pkgconfig)
+ --with-binconfigs Generate shell libpng-config scripts as well as
+ pkg-config data [default=yes]
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <png-mng-implement@lists.sourceforge.net>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+libpng configure 1.4.0
+generated by GNU Autoconf 2.65
+
+Copyright (C) 2009 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( cat <<\_ASBOX
+## ------------------------------------------------------ ##
+## Report this to png-mng-implement@lists.sourceforge.net ##
+## ------------------------------------------------------ ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_type
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by libpng $as_me 1.4.0, which was
+generated by GNU Autoconf 2.65. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+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 || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ ac_site_file1=$CONFIG_SITE
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+am__api_version='1.11'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ for ac_t in install-sh install.sh shtool; do
+ if test -f "$ac_dir/$ac_t"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/$ac_t -c"
+ break 2
+ fi
+ done
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if test "${ac_cv_path_mkdir+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='libpng'
+ VERSION='1.4.0'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+PNGLIB_VERSION=1.4.0
+PNGLIB_MAJOR=1
+PNGLIB_MINOR=4
+PNGLIB_RELEASE=0
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+# Checks for programs.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "no acceptable C compiler found in \$PATH
+See \`config.log' for more details." "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "C compiler cannot create executables
+See \`config.log' for more details." "$LINENO" 5; }; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if test "${ac_cv_path_SED+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if test "${ac_cv_path_FGREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+ then ac_cv_path_FGREP="$GREP -F"
+ else
+ if test -z "$FGREP"; then
+ ac_path_FGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in fgrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+ # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'FGREP' >> "conftest.nl"
+ "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_FGREP="$ac_path_FGREP"
+ ac_path_FGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_FGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_FGREP"; then
+ as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_FGREP=$FGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}sed", so it can be a program name with args.
+set dummy ${ac_tool_prefix}sed; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_SED+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$SED"; then
+ ac_cv_prog_SED="$SED" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_SED="${ac_tool_prefix}sed"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+SED=$ac_cv_prog_SED
+if test -n "$SED"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
+$as_echo "$SED" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_SED"; then
+ ac_ct_SED=$SED
+ # Extract the first word of "sed", so it can be a program name with args.
+set dummy sed; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_SED+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_SED"; then
+ ac_cv_prog_ac_ct_SED="$ac_ct_SED" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_SED="sed"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_SED=$ac_cv_prog_ac_ct_SED
+if test -n "$ac_ct_SED"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_SED" >&5
+$as_echo "$ac_ct_SED" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_SED" = x; then
+ SED=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ SED=$ac_ct_SED
+ fi
+else
+ SED="$ac_cv_prog_SED"
+fi
+
+enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AS+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AS="as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AS" = x; then
+ AS="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AS=$ac_ct_AS
+ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+ ac_ct_DLLTOOL=$DLLTOOL
+ # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DLLTOOL"; then
+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DLLTOOL" = x; then
+ DLLTOOL="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DLLTOOL=$ac_ct_DLLTOOL
+ fi
+else
+ DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+ ;;
+esac
+
+test -z "$AS" && AS=as
+
+
+
+
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+case `pwd` in
+ *\ * | *\ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.2.6b'
+macro_revision='1.3017'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test "${lt_cv_path_NM+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_DUMPBIN" && break
+done
+
+ if test "x$ac_ct_DUMPBIN" = x; then
+ DUMPBIN=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DUMPBIN=$ac_ct_DUMPBIN
+ fi
+fi
+
+
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if test "${lt_cv_nm_interface+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:5153: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:5156: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:5159: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if test "${lt_cv_ld_reload_flag+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if test "${lt_cv_deplibs_check_method+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[45]*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+ enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line 6351 "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if test "${lt_cv_cc_needs_belf+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_cc_needs_belf=yes
+else
+ lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+ case $host_os in
+ rhapsody* | darwin*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DSYMUTIL"; then
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+ ac_ct_DSYMUTIL=$DSYMUTIL
+ # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DSYMUTIL"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DSYMUTIL" = x; then
+ DSYMUTIL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DSYMUTIL=$ac_ct_DSYMUTIL
+ fi
+else
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_NMEDIT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NMEDIT"; then
+ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+ ac_ct_NMEDIT=$NMEDIT
+ # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_NMEDIT"; then
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_NMEDIT" = x; then
+ NMEDIT=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ NMEDIT=$ac_ct_NMEDIT
+ fi
+else
+ NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_LIPO+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LIPO"; then
+ ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+ ac_ct_LIPO=$LIPO
+ # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LIPO"; then
+ ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_LIPO="lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LIPO" = x; then
+ LIPO=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LIPO=$ac_ct_LIPO
+ fi
+else
+ LIPO="$ac_cv_prog_LIPO"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL"; then
+ ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+ ac_ct_OTOOL=$OTOOL
+ # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL"; then
+ ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL="otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL" = x; then
+ OTOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL=$ac_ct_OTOOL
+ fi
+else
+ OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL64+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL64"; then
+ ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+ ac_ct_OTOOL64=$OTOOL64
+ # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL64"; then
+ ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL64="otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL64" = x; then
+ OTOOL64=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL64=$ac_ct_OTOOL64
+ fi
+else
+ OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_ld_exported_symbols_list=yes
+else
+ lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[012]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in dlfcn.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+# Set options
+
+
+
+ enable_dlopen=no
+
+
+
+ # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+ # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_static=yes
+fi
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+ withval=$with_pic; pic_mode="$withval"
+else
+ pic_mode=default
+fi
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+ # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+ enableval=$enable_fast_install; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if test "${lt_cv_objdir+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:7738: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:7742: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+
+ if test "$GCC" = yes; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='--shared'
+ lt_prog_compiler_static='--static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ xl*)
+ # IBM XL C 8.0/Fortran 10.1 on PPC
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
+$as_echo "$lt_prog_compiler_pic" >&6; }
+
+
+
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:8077: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:8081: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:8182: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:8186: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:8237: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:8241: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+ if test "$hard_links" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec=
+ tmp_sharedflag='--shared' ;;
+ xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld='-rpath $libdir'
+ archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" = no; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ export_dynamic_flag_spec='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ always_export_symbols=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' ${wl}-bernotok'
+ allow_undefined_flag=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ archive_cmds_need_lc=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ whole_archive_flag_spec=''
+ link_all_deplibs=yes
+ allow_undefined_flag="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=echo
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+
+ else
+ ld_shlibs=no
+ fi
+
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld='+b $libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo(void) {}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='${wl}-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='${wl}-z,text'
+ allow_undefined_flag='${wl}-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ archive_cmds_need_lc=no
+ else
+ archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
+$as_echo "$archive_cmds_need_lc" >&6; }
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+ shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test "X$hardcode_automatic" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ test "$hardcode_minus_L" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+ if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+
+fi
+
+ ;;
+
+ *)
+ ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = x""yes; then :
+ lt_cv_dlopen="shl_load"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_shl_load=yes
+else
+ ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_svld_dlopen=yes
+else
+ ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_dld_link=yes
+else
+ ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 10604 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self_static+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 10700 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report which library types will actually be built
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+# Checks for header files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+for ac_header in malloc.h stdlib.h string.h strings.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if test "${ac_cv_c_const+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset cs;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ pcpcc = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ if (s) return 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ if (!foo) return 0;
+ }
+ return !cs[0] && !zero.x;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_const=yes
+else
+ ac_cv_c_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
+$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+if test "${ac_cv_struct_tm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm tm;
+ int *p = &tm.tm_sec;
+ return !p;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_struct_tm=time.h
+else
+ ac_cv_struct_tm=sys/time.h
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
+$as_echo "$ac_cv_struct_tm" >&6; }
+if test $ac_cv_struct_tm = sys/time.h; then
+
+$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
+
+fi
+
+
+# Checks for library functions.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
+$as_echo_n "checking for working strtod... " >&6; }
+if test "${ac_cv_func_strtod+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_strtod=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+$ac_includes_default
+#ifndef strtod
+double strtod ();
+#endif
+int
+main()
+{
+ {
+ /* Some versions of Linux strtod mis-parse strings with leading '+'. */
+ char *string = " +69";
+ char *term;
+ double value;
+ value = strtod (string, &term);
+ if (value != 69 || term != (string + 4))
+ return 1;
+ }
+
+ {
+ /* Under Solaris 2.4, strtod returns the wrong value for the
+ terminating character under some conditions. */
+ char *string = "NaN";
+ char *term;
+ strtod (string, &term);
+ if (term != string && *(term - 1) == 0)
+ return 1;
+ }
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_strtod=yes
+else
+ ac_cv_func_strtod=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
+$as_echo "$ac_cv_func_strtod" >&6; }
+if test $ac_cv_func_strtod = no; then
+ case " $LIBOBJS " in
+ *" strtod.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
+ ;;
+esac
+
+ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
+if test "x$ac_cv_func_pow" = x""yes; then :
+
+fi
+
+if test $ac_cv_func_pow = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
+$as_echo_n "checking for pow in -lm... " >&6; }
+if test "${ac_cv_lib_m_pow+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pow ();
+int
+main ()
+{
+return pow ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_pow=yes
+else
+ ac_cv_lib_m_pow=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
+$as_echo "$ac_cv_lib_m_pow" >&6; }
+if test "x$ac_cv_lib_m_pow" = x""yes; then :
+ POW_LIB=-lm
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
+$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
+fi
+
+fi
+
+fi
+
+for ac_func in memset
+do :
+ ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
+if test "x$ac_cv_func_memset" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_MEMSET 1
+_ACEOF
+
+else
+ as_fn_error "memset not found in libc" "$LINENO" 5
+fi
+done
+
+for ac_func in pow
+do :
+ ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
+if test "x$ac_cv_func_pow" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_POW 1
+_ACEOF
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
+$as_echo_n "checking for pow in -lm... " >&6; }
+if test "${ac_cv_lib_m_pow+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pow ();
+int
+main ()
+{
+return pow ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_pow=yes
+else
+ ac_cv_lib_m_pow=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
+$as_echo "$ac_cv_lib_m_pow" >&6; }
+if test "x$ac_cv_lib_m_pow" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+else
+ as_fn_error "cannot find pow" "$LINENO" 5
+fi
+
+fi
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlibVersion in -lz" >&5
+$as_echo_n "checking for zlibVersion in -lz... " >&6; }
+if test "${ac_cv_lib_z_zlibVersion+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char zlibVersion ();
+int
+main ()
+{
+return zlibVersion ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_z_zlibVersion=yes
+else
+ ac_cv_lib_z_zlibVersion=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_zlibVersion" >&5
+$as_echo "$ac_cv_lib_z_zlibVersion" >&6; }
+if test "x$ac_cv_lib_z_zlibVersion" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+ LIBS="-lz $LIBS"
+
+else
+ as_fn_error "zlib not installed" "$LINENO" 5
+fi
+
+
+LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
+LIBPNG_DEFINES=$LIBPNG_DEFINES
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libraries can be versioned" >&5
+$as_echo_n "checking if libraries can be versioned... " >&6; }
+GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
+if test "$GLD"; then
+ have_ld_version_script=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ have_ld_version_script=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** You have not enabled versioned symbols." >&5
+$as_echo "$as_me: WARNING: *** You have not enabled versioned symbols." >&2;}
+fi
+ if test "$have_ld_version_script" = "yes"; then
+ HAVE_LD_VERSION_SCRIPT_TRUE=
+ HAVE_LD_VERSION_SCRIPT_FALSE='#'
+else
+ HAVE_LD_VERSION_SCRIPT_TRUE='#'
+ HAVE_LD_VERSION_SCRIPT_FALSE=
+fi
+
+
+if test "$have_ld_version_script" = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symbol prefix" >&5
+$as_echo_n "checking for symbol prefix... " >&6; }
+ SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
+ | ${CPP-${CC-gcc} -E} - 2>&1 \
+ | ${EGREP-grep} "^PREFIX=" \
+ | ${SED-sed} "s:^PREFIX=::"`
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMBOL_PREFIX" >&5
+$as_echo "$SYMBOL_PREFIX" >&6; }
+fi
+
+# Substitutions for .in files
+
+
+
+
+
+# Additional arguments (and substitutions)
+# Allow the pkg-config directory to be set
+
+# Check whether --with-pkgconfigdir was given.
+if test "${with_pkgconfigdir+set}" = set; then :
+ withval=$with_pkgconfigdir; pkgconfigdir=${withval}
+else
+ pkgconfigdir='${libdir}/pkgconfig'
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: pkgconfig directory is ${pkgconfigdir}" >&5
+$as_echo "$as_me: pkgconfig directory is ${pkgconfigdir}" >&6;}
+
+# Make the *-config binary config scripts optional
+
+# Check whether --with-binconfigs was given.
+if test "${with_binconfigs+set}" = set; then :
+ withval=$with_binconfigs; if test "${withval}" = no; then
+ binconfigs=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: libpng-config scripts will not be built" >&5
+$as_echo "$as_me: libpng-config scripts will not be built" >&6;}
+ else
+ binconfigs='${binconfigs}'
+ fi
+else
+ binconfigs='${binconfigs}'
+fi
+
+
+
+# Config files, substituting as above
+ac_config_files="$ac_config_files Makefile libpng.pc:libpng.pc.in"
+
+ac_config_files="$ac_config_files libpng-config:libpng-config.in"
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_LD_VERSION_SCRIPT_TRUE}" && test -z "${HAVE_LD_VERSION_SCRIPT_FALSE}"; then
+ as_fn_error "conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with status $?, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$?; test $as_status -eq 0 && as_status=1
+ if test "$3"; then
+ as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ fi
+ $as_echo "$as_me: error: $1" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by libpng $as_me 1.4.0, which was
+generated by GNU Autoconf 2.65. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <png-mng-implement@lists.sourceforge.net>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+libpng config.status 1.4.0
+configured by $0, generated by GNU Autoconf 2.65,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2009 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
+LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+ ;;
+esac
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "libpng.pc") CONFIG_FILES="$CONFIG_FILES libpng.pc:libpng.pc.in" ;;
+ "libpng-config") CONFIG_FILES="$CONFIG_FILES libpng-config:libpng-config.in" ;;
+
+ *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+ || as_fn_error "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_t"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+ } >"$tmp/config.h" \
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$tmp/config.h" "$ac_file" \
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool 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.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# Assembler program.
+AS=$AS
+
+# DLL creation program.
+DLLTOOL=$DLLTOOL
+
+# Object dumper program.
+OBJDUMP=$OBJDUMP
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=$(( $* ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=${#1}
+}
+
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "$@"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1+=\$2"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1=\$$1\$2"
+}
+
+_LT_EOF
+ ;;
+ esac
+
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+ ;;
+ "libpng-config":F) chmod +x libpng-config ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit $?
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
diff --git a/src/3rdparty/libpng/configure.ac b/src/3rdparty/libpng/configure.ac
new file mode 100644
index 0000000000..dcdde1ebc7
--- /dev/null
+++ b/src/3rdparty/libpng/configure.ac
@@ -0,0 +1,124 @@
+# configure.ac
+
+dnl Process this file with autoconf to produce a configure script.
+dnl
+dnl Minor upgrades (compatible ABI): increment the package version
+dnl (third field in two places below) and set the PNGLIB_RELEASE
+dnl variable.
+dnl
+dnl Major upgrades (incompatible ABI): increment the package major
+dnl version (second field, or first if desired), set the minor
+dnl to 0, set PNGLIB_MAJOR below *and* follow the instructions in
+dnl Makefile.am to upgrade the package name.
+
+dnl This is here to prevent earlier autoconf from being used, it
+dnl should not be necessary to regenerate configure if the time
+dnl stamps are correct
+AC_PREREQ(2.59)
+
+dnl Version number stuff here:
+
+AC_INIT([libpng], [1.4.0], [png-mng-implement@lists.sourceforge.net])
+AM_INIT_AUTOMAKE
+dnl stop configure from automagically running automake
+AM_MAINTAINER_MODE
+
+PNGLIB_VERSION=1.4.0
+PNGLIB_MAJOR=1
+PNGLIB_MINOR=4
+PNGLIB_RELEASE=0
+
+dnl End of version number stuff
+
+AC_CONFIG_SRCDIR([pngget.c])
+AM_CONFIG_HEADER(config.h)
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_LD
+AC_PROG_CPP
+AC_CHECK_TOOL(SED, sed, :)
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_PROG_LIBTOOL
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([malloc.h stdlib.h string.h strings.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_TYPE_SIZE_T
+AC_STRUCT_TM
+
+# Checks for library functions.
+AC_FUNC_STRTOD
+AC_CHECK_FUNCS([memset], , AC_ERROR([memset not found in libc]))
+AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_ERROR([cannot find pow])) )
+AC_CHECK_LIB(z, zlibVersion, , AC_ERROR([zlib not installed]))
+
+LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
+LIBPNG_DEFINES=$LIBPNG_DEFINES
+AC_SUBST(LIBPNG_DEFINES)
+
+AC_MSG_CHECKING([if libraries can be versioned])
+GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
+if test "$GLD"; then
+ have_ld_version_script=yes
+ AC_MSG_RESULT(yes)
+else
+ have_ld_version_script=no
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN(*** You have not enabled versioned symbols.)
+fi
+AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
+
+if test "$have_ld_version_script" = "yes"; then
+ AC_MSG_CHECKING([for symbol prefix])
+ SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
+ | ${CPP-${CC-gcc} -E} - 2>&1 \
+ | ${EGREP-grep} "^PREFIX=" \
+ | ${SED-sed} "s:^PREFIX=::"`
+ AC_SUBST(SYMBOL_PREFIX)
+ AC_MSG_RESULT($SYMBOL_PREFIX)
+fi
+
+# Substitutions for .in files
+AC_SUBST(PNGLIB_VERSION)
+AC_SUBST(PNGLIB_MAJOR)
+AC_SUBST(PNGLIB_MINOR)
+AC_SUBST(PNGLIB_RELEASE)
+
+# Additional arguments (and substitutions)
+# Allow the pkg-config directory to be set
+AC_ARG_WITH(pkgconfigdir,
+ AC_HELP_STRING([--with-pkgconfigdir],
+ [Use the specified pkgconfig dir (default is libdir/pkgconfig)]),
+ [pkgconfigdir=${withval}],
+ [pkgconfigdir='${libdir}/pkgconfig'])
+
+AC_SUBST([pkgconfigdir])
+AC_MSG_NOTICE([pkgconfig directory is ${pkgconfigdir}])
+
+# Make the *-config binary config scripts optional
+AC_ARG_WITH(binconfigs,
+ AC_HELP_STRING([--with-binconfigs],
+ [Generate shell libpng-config scripts as well as pkg-config data]
+ [@<:@default=yes@:>@]),
+ [if test "${withval}" = no; then
+ binconfigs=
+ AC_MSG_NOTICE([libpng-config scripts will not be built])
+ else
+ binconfigs='${binconfigs}'
+ fi],
+ [binconfigs='${binconfigs}'])
+AC_SUBST([binconfigs])
+
+# Config files, substituting as above
+AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in])
+AC_CONFIG_FILES([libpng-config:libpng-config.in],
+ [chmod +x libpng-config])
+
+AC_OUTPUT
diff --git a/src/3rdparty/libpng/depcomp b/src/3rdparty/libpng/depcomp
new file mode 100755
index 0000000000..df8eea7e4c
--- /dev/null
+++ b/src/3rdparty/libpng/depcomp
@@ -0,0 +1,630 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
+# Software Foundation, Inc.
+
+# This program 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, 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, see <http://www.gnu.org/licenses/>.
+
+# 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 Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by `PROGRAMS ARGS'.
+ object Object file output by `PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputing dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u="sed s,\\\\\\\\,/,g"
+ depmode=msvisualcpp
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+ tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'. On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like `#:fec' to the end of the
+ # dependency line.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+ tr '
+' ' ' >> "$depfile"
+ echo >> "$depfile"
+
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts `$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
+ "$@" -Wc,-M
+ else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
+ "$@" -M
+ fi
+ stat=$?
+
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form `foo.o: dependent.h'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+icc)
+ # Intel's C compiler understands `-MD -MF file'. However on
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # ICC 7.0 will fill foo.d with something like
+ # foo.o: sub/foo.c
+ # foo.o: sub/foo.h
+ # which is wrong. We want:
+ # sub/foo.o: sub/foo.c
+ # sub/foo.o: sub/foo.h
+ # sub/foo.c:
+ # sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add `dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in `foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+ if test "$libtool" = yes; then
+ # With Tru64 cc, shared objects can also be used to make a
+ # static library. This mechanism is used in libtool 1.4 series to
+ # handle both shared and static libraries in a single compilation.
+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+ #
+ # With libtool 1.5 this exception was removed, and libtool now
+ # generates 2 separate objects for the 2 libraries. These two
+ # compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
+ tmpdepfile2=$dir$base.o.d # libtool 1.5
+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.o.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ tmpdepfile4=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no eat=no
+ for arg
+ do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E |
+ sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ echo " " >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/src/3rdparty/libpng/example.c b/src/3rdparty/libpng/example.c
index dcf38de8c2..8c5d87b668 100644
--- a/src/3rdparty/libpng/example.c
+++ b/src/3rdparty/libpng/example.c
@@ -2,9 +2,9 @@
#if 0 /* in case someone actually tries to compile this */
/* example.c - an example of using libpng
- * Last changed in libpng 1.2.37 [June 4, 2009]
+ * Last changed in libpng 1.4.0 [January 3, 2010]
* This file has been placed in the public domain by the authors.
- * Maintained 1998-2009 Glenn Randers-Pehrson
+ * Maintained 1998-2010 Glenn Randers-Pehrson
* Maintained 1996, 1997 Andreas Dilger)
* Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*/
@@ -121,7 +121,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
if (info_ptr == NULL)
{
fclose(fp);
- png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
+ png_destroy_read_struct(&png_ptr, NULL, NULL);
return (ERROR);
}
@@ -133,7 +133,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
if (setjmp(png_jmpbuf(png_ptr)))
{
/* Free all of the memory associated with the png_ptr and info_ptr */
- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
fclose(fp);
/* If we get here, we had a problem reading the file */
return (ERROR);
@@ -164,7 +164,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
* adjustment), then you can read the entire image (including
* pixels) into the info structure with this call:
*/
- png_read_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL);
+ png_read_png(png_ptr, info_ptr, png_transforms, NULL);
#else
/* OK, you're doing it the hard way, with the lower-level functions */
@@ -175,7 +175,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
png_read_info(png_ptr, info_ptr);
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
- &interlace_type, int_p_NULL, int_p_NULL);
+ &interlace_type, NULL, NULL);
/* Set up the data transformations you want. Note that these are all
* optional. Only call them if you want/need them. Many of the
@@ -286,7 +286,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
png_color std_color_cube[MAX_SCREEN_COLORS];
png_set_dither(png_ptr, std_color_cube, MAX_SCREEN_COLORS,
- MAX_SCREEN_COLORS, png_uint_16p_NULL, 0);
+ MAX_SCREEN_COLORS, NULL, 0);
}
/* This reduces the image to the palette supplied in the file */
else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette))
@@ -365,17 +365,17 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
#ifdef single /* Read the image a single row at a time */
for (y = 0; y < height; y++)
{
- png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL, 1);
+ png_read_rows(png_ptr, &row_pointers[y], NULL, 1);
}
#else no_single /* Read the image several rows at a time */
for (y = 0; y < height; y += number_of_rows)
{
#ifdef sparkle /* Read the image using the "sparkle" effect. */
- png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL,
+ png_read_rows(png_ptr, &row_pointers[y], NULL,
number_of_rows);
#else no_sparkle /* Read the image using the "rectangle" effect */
- png_read_rows(png_ptr, png_bytepp_NULL, &row_pointers[y],
+ png_read_rows(png_ptr, NULL, &row_pointers[y],
number_of_rows);
#endif no_sparkle /* Use only one of these two methods */
}
@@ -392,7 +392,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
/* At this point you have read the entire image */
/* Clean up after the read, and free any memory allocated - REQUIRED */
- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
/* Close the file */
fclose(fp);
@@ -425,13 +425,13 @@ initialize_png_reader(png_structp *png_ptr, png_infop *info_ptr)
if (*info_ptr == NULL)
{
- png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);
+ png_destroy_read_struct(png_ptr, info_ptr, NULL);
return (ERROR);
}
if (setjmp(png_jmpbuf((*png_ptr))))
{
- png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);
+ png_destroy_read_struct(png_ptr, info_ptr, NULL);
return (ERROR);
}
@@ -460,7 +460,7 @@ process_data(png_structp *png_ptr, png_infop *info_ptr,
if (setjmp(png_jmpbuf((*png_ptr))))
{
/* Free the png_ptr and info_ptr memory on error */
- png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);
+ png_destroy_read_struct(png_ptr, info_ptr, NULL);
return (ERROR);
}
@@ -593,7 +593,7 @@ void write_png(char *file_name /* , ... other image information ... */)
if (info_ptr == NULL)
{
fclose(fp);
- png_destroy_write_struct(&png_ptr, png_infopp_NULL);
+ png_destroy_write_struct(&png_ptr, NULL);
return (ERROR);
}
@@ -628,7 +628,7 @@ void write_png(char *file_name /* , ... other image information ... */)
* image info living in the structure. You could "|" many
* PNG_TRANSFORM flags into the png_transforms integer here.
*/
- png_write_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL);
+ png_write_png(png_ptr, info_ptr, png_transforms, NULL);
#else
/* This is the hard way */
diff --git a/src/3rdparty/libpng/install-sh b/src/3rdparty/libpng/install-sh
new file mode 100755
index 0000000000..6781b987bd
--- /dev/null
+++ b/src/3rdparty/libpng/install-sh
@@ -0,0 +1,520 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2009-04-28.21; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ shift;;
+
+ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dst_arg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst;;
+ esac
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ -*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test -z "$d" && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/src/3rdparty/libpng/libpng-1.2.40.txt b/src/3rdparty/libpng/libpng-1.2.40.txt
deleted file mode 100644
index 019c886b99..0000000000
--- a/src/3rdparty/libpng/libpng-1.2.40.txt
+++ /dev/null
@@ -1,3112 +0,0 @@
-libpng.txt - A description on how to use and modify libpng
-
- libpng version 1.2.40 - September 10, 2009
- Updated and distributed by Glenn Randers-Pehrson
- <glennrp at users.sourceforge.net>
- Copyright (c) 1998-2009 Glenn Randers-Pehrson
-
- This document is released under the libpng license.
- For conditions of distribution and use, see the disclaimer
- and license in png.h
-
- Based on:
-
- libpng versions 0.97, January 1998, through 1.2.40 - September 10, 2009
- Updated and distributed by Glenn Randers-Pehrson
- Copyright (c) 1998-2009 Glenn Randers-Pehrson
-
- libpng 1.0 beta 6 version 0.96 May 28, 1997
- Updated and distributed by Andreas Dilger
- Copyright (c) 1996, 1997 Andreas Dilger
-
- libpng 1.0 beta 2 - version 0.88 January 26, 1996
- For conditions of distribution and use, see copyright
- notice in png.h. Copyright (c) 1995, 1996 Guy Eric
- Schalnat, Group 42, Inc.
-
- Updated/rewritten per request in the libpng FAQ
- Copyright (c) 1995, 1996 Frank J. T. Wojcik
- December 18, 1995 & January 20, 1996
-
-I. Introduction
-
-This file describes how to use and modify the PNG reference library
-(known as libpng) for your own use. There are five sections to this
-file: introduction, structures, reading, writing, and modification and
-configuration notes for various special platforms. In addition to this
-file, example.c is a good starting point for using the library, as
-it is heavily commented and should include everything most people
-will need. We assume that libpng is already installed; see the
-INSTALL file for instructions on how to install libpng.
-
-For examples of libpng usage, see the files "example.c", "pngtest.c",
-and the files in the "contrib" directory, all of which are included in the
-libpng distribution.
-
-Libpng was written as a companion to the PNG specification, as a way
-of reducing the amount of time and effort it takes to support the PNG
-file format in application programs.
-
-The PNG specification (second edition), November 2003, is available as
-a W3C Recommendation and as an ISO Standard (ISO/IEC 15948:2003 (E)) at
-<http://www.w3.org/TR/2003/REC-PNG-20031110/
-The W3C and ISO documents have identical technical content.
-
-The PNG-1.2 specification is available at
-<http://www.libpng.org/pub/png/documents/>. It is technically equivalent
-to the PNG specification (second edition) but has some additional material.
-
-The PNG-1.0 specification is available
-as RFC 2083 <http://www.libpng.org/pub/png/documents/> and as a
-W3C Recommendation <http://www.w3.org/TR/REC.png.html>.
-
-Some additional chunks are described in the special-purpose public chunks
-documents at <http://www.libpng.org/pub/png/documents/>.
-
-Other information
-about PNG, and the latest version of libpng, can be found at the PNG home
-page, <http://www.libpng.org/pub/png/>.
-
-Most users will not have to modify the library significantly; advanced
-users may want to modify it more. All attempts were made to make it as
-complete as possible, while keeping the code easy to understand.
-Currently, this library only supports C. Support for other languages
-is being considered.
-
-Libpng has been designed to handle multiple sessions at one time,
-to be easily modifiable, to be portable to the vast majority of
-machines (ANSI, K&R, 16-, 32-, and 64-bit) available, and to be easy
-to use. The ultimate goal of libpng is to promote the acceptance of
-the PNG file format in whatever way possible. While there is still
-work to be done (see the TODO file), libpng should cover the
-majority of the needs of its users.
-
-Libpng uses zlib for its compression and decompression of PNG files.
-Further information about zlib, and the latest version of zlib, can
-be found at the zlib home page, <http://www.info-zip.org/pub/infozip/zlib/>.
-The zlib compression utility is a general purpose utility that is
-useful for more than PNG files, and can be used without libpng.
-See the documentation delivered with zlib for more details.
-You can usually find the source files for the zlib utility wherever you
-find the libpng source files.
-
-Libpng is thread safe, provided the threads are using different
-instances of the structures. Each thread should have its own
-png_struct and png_info instances, and thus its own image.
-Libpng does not protect itself against two threads using the
-same instance of a structure.
-
-II. Structures
-
-There are two main structures that are important to libpng, png_struct
-and png_info. The first, png_struct, is an internal structure that
-will not, for the most part, be used by a user except as the first
-variable passed to every libpng function call.
-
-The png_info structure is designed to provide information about the
-PNG file. At one time, the fields of png_info were intended to be
-directly accessible to the user. However, this tended to cause problems
-with applications using dynamically loaded libraries, and as a result
-a set of interface functions for png_info (the png_get_*() and png_set_*()
-functions) was developed. The fields of png_info are still available for
-older applications, but it is suggested that applications use the new
-interfaces if at all possible.
-
-Applications that do make direct access to the members of png_struct (except
-for png_ptr->jmpbuf) must be recompiled whenever the library is updated,
-and applications that make direct access to the members of png_info must
-be recompiled if they were compiled or loaded with libpng version 1.0.6,
-in which the members were in a different order. In version 1.0.7, the
-members of the png_info structure reverted to the old order, as they were
-in versions 0.97c through 1.0.5. Starting with version 2.0.0, both
-structures are going to be hidden, and the contents of the structures will
-only be accessible through the png_get/png_set functions.
-
-The png.h header file is an invaluable reference for programming with libpng.
-And while I'm on the topic, make sure you include the libpng header file:
-
-#include <png.h>
-
-III. Reading
-
-We'll now walk you through the possible functions to call when reading
-in a PNG file sequentially, briefly explaining the syntax and purpose
-of each one. See example.c and png.h for more detail. While
-progressive reading is covered in the next section, you will still
-need some of the functions discussed in this section to read a PNG
-file.
-
-Setup
-
-You will want to do the I/O initialization(*) before you get into libpng,
-so if it doesn't work, you don't have much to undo. Of course, you
-will also want to insure that you are, in fact, dealing with a PNG
-file. Libpng provides a simple check to see if a file is a PNG file.
-To use it, pass in the first 1 to 8 bytes of the file to the function
-png_sig_cmp(), and it will return 0 (false) if the bytes match the
-corresponding bytes of the PNG signature, or nonzero (true) otherwise.
-Of course, the more bytes you pass in, the greater the accuracy of the
-prediction.
-
-If you are intending to keep the file pointer open for use in libpng,
-you must ensure you don't read more than 8 bytes from the beginning
-of the file, and you also have to make a call to png_set_sig_bytes_read()
-with the number of bytes you read from the beginning. Libpng will
-then only check the bytes (if any) that your program didn't read.
-
-(*): If you are not using the standard I/O functions, you will need
-to replace them with custom functions. See the discussion under
-Customizing libpng.
-
-
- FILE *fp = fopen(file_name, "rb");
- if (!fp)
- {
- return (ERROR);
- }
- fread(header, 1, number, fp);
- is_png = !png_sig_cmp(header, 0, number);
- if (!is_png)
- {
- return (NOT_PNG);
- }
-
-
-Next, png_struct and png_info need to be allocated and initialized. In
-order to ensure that the size of these structures is correct even with a
-dynamically linked libpng, there are functions to initialize and
-allocate the structures. We also pass the library version, optional
-pointers to error handling functions, and a pointer to a data struct for
-use by the error functions, if necessary (the pointer and functions can
-be NULL if the default error handlers are to be used). See the section
-on Changes to Libpng below regarding the old initialization functions.
-The structure allocation functions quietly return NULL if they fail to
-create the structure, so your application should check for that.
-
- png_structp png_ptr = png_create_read_struct
- (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
- user_error_fn, user_warning_fn);
- if (!png_ptr)
- return (ERROR);
-
- png_infop info_ptr = png_create_info_struct(png_ptr);
- if (!info_ptr)
- {
- png_destroy_read_struct(&png_ptr,
- (png_infopp)NULL, (png_infopp)NULL);
- return (ERROR);
- }
-
- png_infop end_info = png_create_info_struct(png_ptr);
- if (!end_info)
- {
- png_destroy_read_struct(&png_ptr, &info_ptr,
- (png_infopp)NULL);
- return (ERROR);
- }
-
-If you want to use your own memory allocation routines,
-define PNG_USER_MEM_SUPPORTED and use
-png_create_read_struct_2() instead of png_create_read_struct():
-
- png_structp png_ptr = png_create_read_struct_2
- (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
- user_error_fn, user_warning_fn, (png_voidp)
- user_mem_ptr, user_malloc_fn, user_free_fn);
-
-The error handling routines passed to png_create_read_struct()
-and the memory alloc/free routines passed to png_create_struct_2()
-are only necessary if you are not using the libpng supplied error
-handling and memory alloc/free functions.
-
-When libpng encounters an error, it expects to longjmp back
-to your routine. Therefore, you will need to call setjmp and pass
-your png_jmpbuf(png_ptr). If you read the file from different
-routines, you will need to update the jmpbuf field every time you enter
-a new routine that will call a png_*() function.
-
-See your documentation of setjmp/longjmp for your compiler for more
-information on setjmp/longjmp. See the discussion on libpng error
-handling in the Customizing Libpng section below for more information
-on the libpng error handling. If an error occurs, and libpng longjmp's
-back to your setjmp, you will want to call png_destroy_read_struct() to
-free any memory.
-
- if (setjmp(png_jmpbuf(png_ptr)))
- {
- png_destroy_read_struct(&png_ptr, &info_ptr,
- &end_info);
- fclose(fp);
- return (ERROR);
- }
-
-If you would rather avoid the complexity of setjmp/longjmp issues,
-you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case
-errors will result in a call to PNG_ABORT() which defaults to abort().
-
-Now you need to set up the input code. The default for libpng is to
-use the C function fread(). If you use this, you will need to pass a
-valid FILE * in the function png_init_io(). Be sure that the file is
-opened in binary mode. If you wish to handle reading data in another
-way, you need not call the png_init_io() function, but you must then
-implement the libpng I/O methods discussed in the Customizing Libpng
-section below.
-
- png_init_io(png_ptr, fp);
-
-If you had previously opened the file and read any of the signature from
-the beginning in order to see if this was a PNG file, you need to let
-libpng know that there are some bytes missing from the start of the file.
-
- png_set_sig_bytes(png_ptr, number);
-
-Setting up callback code
-
-You can set up a callback function to handle any unknown chunks in the
-input stream. You must supply the function
-
- read_chunk_callback(png_ptr ptr,
- png_unknown_chunkp chunk);
- {
- /* The unknown chunk structure contains your
- chunk data, along with similar data for any other
- unknown chunks: */
-
- png_byte name[5];
- png_byte *data;
- png_size_t size;
-
- /* Note that libpng has already taken care of
- the CRC handling */
-
- /* put your code here. Search for your chunk in the
- unknown chunk structure, process it, and return one
- of the following: */
-
- return (-n); /* chunk had an error */
- return (0); /* did not recognize */
- return (n); /* success */
- }
-
-(You can give your function another name that you like instead of
-"read_chunk_callback")
-
-To inform libpng about your function, use
-
- png_set_read_user_chunk_fn(png_ptr, user_chunk_ptr,
- read_chunk_callback);
-
-This names not only the callback function, but also a user pointer that
-you can retrieve with
-
- png_get_user_chunk_ptr(png_ptr);
-
-If you call the png_set_read_user_chunk_fn() function, then all unknown
-chunks will be saved when read, in case your callback function will need
-one or more of them. This behavior can be changed with the
-png_set_keep_unknown_chunks() function, described below.
-
-At this point, you can set up a callback function that will be
-called after each row has been read, which you can use to control
-a progress meter or the like. It's demonstrated in pngtest.c.
-You must supply a function
-
- void read_row_callback(png_ptr ptr, png_uint_32 row,
- int pass);
- {
- /* put your code here */
- }
-
-(You can give it another name that you like instead of "read_row_callback")
-
-To inform libpng about your function, use
-
- png_set_read_status_fn(png_ptr, read_row_callback);
-
-Unknown-chunk handling
-
-Now you get to set the way the library processes unknown chunks in the
-input PNG stream. Both known and unknown chunks will be read. Normal
-behavior is that known chunks will be parsed into information in
-various info_ptr members while unknown chunks will be discarded. This
-behavior can be wasteful if your application will never use some known
-chunk types. To change this, you can call:
-
- png_set_keep_unknown_chunks(png_ptr, keep,
- chunk_list, num_chunks);
- keep - 0: default unknown chunk handling
- 1: ignore; do not keep
- 2: keep only if safe-to-copy
- 3: keep even if unsafe-to-copy
- You can use these definitions:
- PNG_HANDLE_CHUNK_AS_DEFAULT 0
- PNG_HANDLE_CHUNK_NEVER 1
- PNG_HANDLE_CHUNK_IF_SAFE 2
- PNG_HANDLE_CHUNK_ALWAYS 3
- chunk_list - list of chunks affected (a byte string,
- five bytes per chunk, NULL or '\0' if
- num_chunks is 0)
- num_chunks - number of chunks affected; if 0, all
- unknown chunks are affected. If nonzero,
- only the chunks in the list are affected
-
-Unknown chunks declared in this way will be saved as raw data onto a
-list of png_unknown_chunk structures. If a chunk that is normally
-known to libpng is named in the list, it will be handled as unknown,
-according to the "keep" directive. If a chunk is named in successive
-instances of png_set_keep_unknown_chunks(), the final instance will
-take precedence. The IHDR and IEND chunks should not be named in
-chunk_list; if they are, libpng will process them normally anyway.
-
-Here is an example of the usage of png_set_keep_unknown_chunks(),
-where the private "vpAg" chunk will later be processed by a user chunk
-callback function:
-
- png_byte vpAg[5]={118, 112, 65, 103, (png_byte) '\0'};
-
- #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
- png_byte unused_chunks[]=
- {
- 104, 73, 83, 84, (png_byte) '\0', /* hIST */
- 105, 84, 88, 116, (png_byte) '\0', /* iTXt */
- 112, 67, 65, 76, (png_byte) '\0', /* pCAL */
- 115, 67, 65, 76, (png_byte) '\0', /* sCAL */
- 115, 80, 76, 84, (png_byte) '\0', /* sPLT */
- 116, 73, 77, 69, (png_byte) '\0', /* tIME */
- };
- #endif
-
- ...
-
- #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
- /* ignore all unknown chunks: */
- png_set_keep_unknown_chunks(read_ptr, 1, NULL, 0);
- /* except for vpAg: */
- png_set_keep_unknown_chunks(read_ptr, 2, vpAg, 1);
- /* also ignore unused known chunks: */
- png_set_keep_unknown_chunks(read_ptr, 1, unused_chunks,
- (int)sizeof(unused_chunks)/5);
- #endif
-
-User limits
-
-The PNG specification allows the width and height of an image to be as
-large as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns.
-Since very few applications really need to process such large images,
-we have imposed an arbitrary 1-million limit on rows and columns.
-Larger images will be rejected immediately with a png_error() call. If
-you wish to override this limit, you can use
-
- png_set_user_limits(png_ptr, width_max, height_max);
-
-to set your own limits, or use width_max = height_max = 0x7fffffffL
-to allow all valid dimensions (libpng may reject some very large images
-anyway because of potential buffer overflow conditions).
-
-You should put this statement after you create the PNG structure and
-before calling png_read_info(), png_read_png(), or png_process_data().
-If you need to retrieve the limits that are being applied, use
-
- width_max = png_get_user_width_max(png_ptr);
- height_max = png_get_user_height_max(png_ptr);
-
-The high-level read interface
-
-At this point there are two ways to proceed; through the high-level
-read interface, or through a sequence of low-level read operations.
-You can use the high-level interface if (a) you are willing to read
-the entire image into memory, and (b) the input transformations
-you want to do are limited to the following set:
-
- PNG_TRANSFORM_IDENTITY No transformation
- PNG_TRANSFORM_STRIP_16 Strip 16-bit samples to
- 8 bits
- PNG_TRANSFORM_STRIP_ALPHA Discard the alpha channel
- PNG_TRANSFORM_PACKING Expand 1, 2 and 4-bit
- samples to bytes
- PNG_TRANSFORM_PACKSWAP Change order of packed
- pixels to LSB first
- PNG_TRANSFORM_EXPAND Perform set_expand()
- PNG_TRANSFORM_INVERT_MONO Invert monochrome images
- PNG_TRANSFORM_SHIFT Normalize pixels to the
- sBIT depth
- PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA
- to BGRA
- PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA
- to AG
- PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity
- to transparency
- PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples
-
-(This excludes setting a background color, doing gamma transformation,
-dithering, and setting filler.) If this is the case, simply do this:
-
- png_read_png(png_ptr, info_ptr, png_transforms, NULL)
-
-where png_transforms is an integer containing the bitwise OR of
-some set of transformation flags. This call is equivalent to png_read_info(),
-followed the set of transformations indicated by the transform mask,
-then png_read_image(), and finally png_read_end().
-
-(The final parameter of this call is not yet used. Someday it might point
-to transformation parameters required by some future input transform.)
-
-You must use png_transforms and not call any png_set_transform() functions
-when you use png_read_png().
-
-After you have called png_read_png(), you can retrieve the image data
-with
-
- row_pointers = png_get_rows(png_ptr, info_ptr);
-
-where row_pointers is an array of pointers to the pixel data for each row:
-
- png_bytep row_pointers[height];
-
-If you know your image size and pixel size ahead of time, you can allocate
-row_pointers prior to calling png_read_png() with
-
- if (height > PNG_UINT_32_MAX/png_sizeof(png_byte))
- png_error (png_ptr,
- "Image is too tall to process in memory");
- if (width > PNG_UINT_32_MAX/pixel_size)
- png_error (png_ptr,
- "Image is too wide to process in memory");
- row_pointers = png_malloc(png_ptr,
- height*png_sizeof(png_bytep));
- for (int i=0; i<height, i++)
- row_pointers[i]=NULL; /* security precaution */
- for (int i=0; i<height, i++)
- row_pointers[i]=png_malloc(png_ptr,
- width*pixel_size);
- png_set_rows(png_ptr, info_ptr, &row_pointers);
-
-Alternatively you could allocate your image in one big block and define
-row_pointers[i] to point into the proper places in your block.
-
-If you use png_set_rows(), the application is responsible for freeing
-row_pointers (and row_pointers[i], if they were separately allocated).
-
-If you don't allocate row_pointers ahead of time, png_read_png() will
-do it, and it'll be free'ed when you call png_destroy_*().
-
-The low-level read interface
-
-If you are going the low-level route, you are now ready to read all
-the file information up to the actual image data. You do this with a
-call to png_read_info().
-
- png_read_info(png_ptr, info_ptr);
-
-This will process all chunks up to but not including the image data.
-
-Querying the info structure
-
-Functions are used to get the information from the info_ptr once it
-has been read. Note that these fields may not be completely filled
-in until png_read_end() has read the chunk data following the image.
-
- png_get_IHDR(png_ptr, info_ptr, &width, &height,
- &bit_depth, &color_type, &interlace_type,
- &compression_type, &filter_method);
-
- width - holds the width of the image
- in pixels (up to 2^31).
- height - holds the height of the image
- in pixels (up to 2^31).
- bit_depth - holds the bit depth of one of the
- image channels. (valid values are
- 1, 2, 4, 8, 16 and depend also on
- the color_type. See also
- significant bits (sBIT) below).
- color_type - describes which color/alpha channels
- are present.
- PNG_COLOR_TYPE_GRAY
- (bit depths 1, 2, 4, 8, 16)
- PNG_COLOR_TYPE_GRAY_ALPHA
- (bit depths 8, 16)
- PNG_COLOR_TYPE_PALETTE
- (bit depths 1, 2, 4, 8)
- PNG_COLOR_TYPE_RGB
- (bit_depths 8, 16)
- PNG_COLOR_TYPE_RGB_ALPHA
- (bit_depths 8, 16)
-
- PNG_COLOR_MASK_PALETTE
- PNG_COLOR_MASK_COLOR
- PNG_COLOR_MASK_ALPHA
-
- filter_method - (must be PNG_FILTER_TYPE_BASE
- for PNG 1.0, and can also be
- PNG_INTRAPIXEL_DIFFERENCING if
- the PNG datastream is embedded in
- a MNG-1.0 datastream)
- compression_type - (must be PNG_COMPRESSION_TYPE_BASE
- for PNG 1.0)
- interlace_type - (PNG_INTERLACE_NONE or
- PNG_INTERLACE_ADAM7)
- Any or all of interlace_type, compression_type, of
- filter_method can be NULL if you are
- not interested in their values.
-
- channels = png_get_channels(png_ptr, info_ptr);
- channels - number of channels of info for the
- color type (valid values are 1 (GRAY,
- PALETTE), 2 (GRAY_ALPHA), 3 (RGB),
- 4 (RGB_ALPHA or RGB + filler byte))
- rowbytes = png_get_rowbytes(png_ptr, info_ptr);
- rowbytes - number of bytes needed to hold a row
-
- signature = png_get_signature(png_ptr, info_ptr);
- signature - holds the signature read from the
- file (if any). The data is kept in
- the same offset it would be if the
- whole signature were read (i.e. if an
- application had already read in 4
- bytes of signature before starting
- libpng, the remaining 4 bytes would
- be in signature[4] through signature[7]
- (see png_set_sig_bytes())).
-
-
- width = png_get_image_width(png_ptr,
- info_ptr);
- height = png_get_image_height(png_ptr,
- info_ptr);
- bit_depth = png_get_bit_depth(png_ptr,
- info_ptr);
- color_type = png_get_color_type(png_ptr,
- info_ptr);
- filter_method = png_get_filter_type(png_ptr,
- info_ptr);
- compression_type = png_get_compression_type(png_ptr,
- info_ptr);
- interlace_type = png_get_interlace_type(png_ptr,
- info_ptr);
-
-
-These are also important, but their validity depends on whether the chunk
-has been read. The png_get_valid(png_ptr, info_ptr, PNG_INFO_<chunk>) and
-png_get_<chunk>(png_ptr, info_ptr, ...) functions return non-zero if the
-data has been read, or zero if it is missing. The parameters to the
-png_get_<chunk> are set directly if they are simple data types, or a pointer
-into the info_ptr is returned for any complex types.
-
- png_get_PLTE(png_ptr, info_ptr, &palette,
- &num_palette);
- palette - the palette for the file
- (array of png_color)
- num_palette - number of entries in the palette
-
- png_get_gAMA(png_ptr, info_ptr, &gamma);
- gamma - the gamma the file is written
- at (PNG_INFO_gAMA)
-
- png_get_sRGB(png_ptr, info_ptr, &srgb_intent);
- srgb_intent - the rendering intent (PNG_INFO_sRGB)
- The presence of the sRGB chunk
- means that the pixel data is in the
- sRGB color space. This chunk also
- implies specific values of gAMA and
- cHRM.
-
- png_get_iCCP(png_ptr, info_ptr, &name,
- &compression_type, &profile, &proflen);
- name - The profile name.
- compression - The compression type; always
- PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
- You may give NULL to this argument to
- ignore it.
- profile - International Color Consortium color
- profile data. May contain NULs.
- proflen - length of profile data in bytes.
-
- png_get_sBIT(png_ptr, info_ptr, &sig_bit);
- sig_bit - the number of significant bits for
- (PNG_INFO_sBIT) each of the gray,
- red, green, and blue channels,
- whichever are appropriate for the
- given color type (png_color_16)
-
- png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans,
- &trans_values);
- trans - array of transparent entries for
- palette (PNG_INFO_tRNS)
- trans_values - graylevel or color sample values of
- the single transparent color for
- non-paletted images (PNG_INFO_tRNS)
- num_trans - number of transparent entries
- (PNG_INFO_tRNS)
-
- png_get_hIST(png_ptr, info_ptr, &hist);
- (PNG_INFO_hIST)
- hist - histogram of palette (array of
- png_uint_16)
-
- png_get_tIME(png_ptr, info_ptr, &mod_time);
- mod_time - time image was last modified
- (PNG_VALID_tIME)
-
- png_get_bKGD(png_ptr, info_ptr, &background);
- background - background color (PNG_VALID_bKGD)
- valid 16-bit red, green and blue
- values, regardless of color_type
-
- num_comments = png_get_text(png_ptr, info_ptr,
- &text_ptr, &num_text);
- num_comments - number of comments
- text_ptr - array of png_text holding image
- comments
- text_ptr[i].compression - type of compression used
- on "text" PNG_TEXT_COMPRESSION_NONE
- PNG_TEXT_COMPRESSION_zTXt
- PNG_ITXT_COMPRESSION_NONE
- PNG_ITXT_COMPRESSION_zTXt
- text_ptr[i].key - keyword for comment. Must contain
- 1-79 characters.
- text_ptr[i].text - text comments for current
- keyword. Can be empty.
- text_ptr[i].text_length - length of text string,
- after decompression, 0 for iTXt
- text_ptr[i].itxt_length - length of itxt string,
- after decompression, 0 for tEXt/zTXt
- text_ptr[i].lang - language of comment (empty
- string for unknown).
- text_ptr[i].lang_key - keyword in UTF-8
- (empty string for unknown).
- num_text - number of comments (same as
- num_comments; you can put NULL here
- to avoid the duplication)
- Note while png_set_text() will accept text, language,
- and translated keywords that can be NULL pointers, the
- structure returned by png_get_text will always contain
- regular zero-terminated C strings. They might be
- empty strings but they will never be NULL pointers.
-
- num_spalettes = png_get_sPLT(png_ptr, info_ptr,
- &palette_ptr);
- palette_ptr - array of palette structures holding
- contents of one or more sPLT chunks
- read.
- num_spalettes - number of sPLT chunks read.
-
- png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y,
- &unit_type);
- offset_x - positive offset from the left edge
- of the screen
- offset_y - positive offset from the top edge
- of the screen
- unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER
-
- png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y,
- &unit_type);
- res_x - pixels/unit physical resolution in
- x direction
- res_y - pixels/unit physical resolution in
- x direction
- unit_type - PNG_RESOLUTION_UNKNOWN,
- PNG_RESOLUTION_METER
-
- png_get_sCAL(png_ptr, info_ptr, &unit, &width,
- &height)
- unit - physical scale units (an integer)
- width - width of a pixel in physical scale units
- height - height of a pixel in physical scale units
- (width and height are doubles)
-
- png_get_sCAL_s(png_ptr, info_ptr, &unit, &width,
- &height)
- unit - physical scale units (an integer)
- width - width of a pixel in physical scale units
- height - height of a pixel in physical scale units
- (width and height are strings like "2.54")
-
- num_unknown_chunks = png_get_unknown_chunks(png_ptr,
- info_ptr, &unknowns)
- unknowns - array of png_unknown_chunk
- structures holding unknown chunks
- unknowns[i].name - name of unknown chunk
- unknowns[i].data - data of unknown chunk
- unknowns[i].size - size of unknown chunk's data
- unknowns[i].location - position of chunk in file
-
- The value of "i" corresponds to the order in which the
- chunks were read from the PNG file or inserted with the
- png_set_unknown_chunks() function.
-
-The data from the pHYs chunk can be retrieved in several convenient
-forms:
-
- res_x = png_get_x_pixels_per_meter(png_ptr,
- info_ptr)
- res_y = png_get_y_pixels_per_meter(png_ptr,
- info_ptr)
- res_x_and_y = png_get_pixels_per_meter(png_ptr,
- info_ptr)
- res_x = png_get_x_pixels_per_inch(png_ptr,
- info_ptr)
- res_y = png_get_y_pixels_per_inch(png_ptr,
- info_ptr)
- res_x_and_y = png_get_pixels_per_inch(png_ptr,
- info_ptr)
- aspect_ratio = png_get_pixel_aspect_ratio(png_ptr,
- info_ptr)
-
- (Each of these returns 0 [signifying "unknown"] if
- the data is not present or if res_x is 0;
- res_x_and_y is 0 if res_x != res_y)
-
-The data from the oFFs chunk can be retrieved in several convenient
-forms:
-
- x_offset = png_get_x_offset_microns(png_ptr, info_ptr);
- y_offset = png_get_y_offset_microns(png_ptr, info_ptr);
- x_offset = png_get_x_offset_inches(png_ptr, info_ptr);
- y_offset = png_get_y_offset_inches(png_ptr, info_ptr);
-
- (Each of these returns 0 [signifying "unknown" if both
- x and y are 0] if the data is not present or if the
- chunk is present but the unit is the pixel)
-
-For more information, see the png_info definition in png.h and the
-PNG specification for chunk contents. Be careful with trusting
-rowbytes, as some of the transformations could increase the space
-needed to hold a row (expand, filler, gray_to_rgb, etc.).
-See png_read_update_info(), below.
-
-A quick word about text_ptr and num_text. PNG stores comments in
-keyword/text pairs, one pair per chunk, with no limit on the number
-of text chunks, and a 2^31 byte limit on their size. While there are
-suggested keywords, there is no requirement to restrict the use to these
-strings. It is strongly suggested that keywords and text be sensible
-to humans (that's the point), so don't use abbreviations. Non-printing
-symbols are not allowed. See the PNG specification for more details.
-There is also no requirement to have text after the keyword.
-
-Keywords should be limited to 79 Latin-1 characters without leading or
-trailing spaces, but non-consecutive spaces are allowed within the
-keyword. It is possible to have the same keyword any number of times.
-The text_ptr is an array of png_text structures, each holding a
-pointer to a language string, a pointer to a keyword and a pointer to
-a text string. The text string, language code, and translated
-keyword may be empty or NULL pointers. The keyword/text
-pairs are put into the array in the order that they are received.
-However, some or all of the text chunks may be after the image, so, to
-make sure you have read all the text chunks, don't mess with these
-until after you read the stuff after the image. This will be
-mentioned again below in the discussion that goes with png_read_end().
-
-Input transformations
-
-After you've read the header information, you can set up the library
-to handle any special transformations of the image data. The various
-ways to transform the data will be described in the order that they
-should occur. This is important, as some of these change the color
-type and/or bit depth of the data, and some others only work on
-certain color types and bit depths. Even though each transformation
-checks to see if it has data that it can do something with, you should
-make sure to only enable a transformation if it will be valid for the
-data. For example, don't swap red and blue on grayscale data.
-
-The colors used for the background and transparency values should be
-supplied in the same format/depth as the current image data. They
-are stored in the same format/depth as the image data in a bKGD or tRNS
-chunk, so this is what libpng expects for this data. The colors are
-transformed to keep in sync with the image data when an application
-calls the png_read_update_info() routine (see below).
-
-Data will be decoded into the supplied row buffers packed into bytes
-unless the library has been told to transform it into another format.
-For example, 4 bit/pixel paletted or grayscale data will be returned
-2 pixels/byte with the leftmost pixel in the high-order bits of the
-byte, unless png_set_packing() is called. 8-bit RGB data will be stored
-in RGB RGB RGB format unless png_set_filler() or png_set_add_alpha()
-is called to insert filler bytes, either before or after each RGB triplet.
-16-bit RGB data will be returned RRGGBB RRGGBB, with the most significant
-byte of the color value first, unless png_set_strip_16() is called to
-transform it to regular RGB RGB triplets, or png_set_filler() or
-png_set_add alpha() is called to insert filler bytes, either before or
-after each RRGGBB triplet. Similarly, 8-bit or 16-bit grayscale data can
-be modified with
-png_set_filler(), png_set_add_alpha(), or png_set_strip_16().
-
-The following code transforms grayscale images of less than 8 to 8 bits,
-changes paletted images to RGB, and adds a full alpha channel if there is
-transparency information in a tRNS chunk. This is most useful on
-grayscale images with bit depths of 2 or 4 or if there is a multiple-image
-viewing application that wishes to treat all images in the same way.
-
- if (color_type == PNG_COLOR_TYPE_PALETTE)
- png_set_palette_to_rgb(png_ptr);
-
- if (color_type == PNG_COLOR_TYPE_GRAY &&
- bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr);
-
- if (png_get_valid(png_ptr, info_ptr,
- PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr);
-
-These three functions are actually aliases for png_set_expand(), added
-in libpng version 1.0.4, with the function names expanded to improve code
-readability. In some future version they may actually do different
-things.
-
-As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was
-added. It expands the sample depth without changing tRNS to alpha.
-
-PNG can have files with 16 bits per channel. If you only can handle
-8 bits per channel, this will strip the pixels down to 8 bit.
-
- if (bit_depth == 16)
- png_set_strip_16(png_ptr);
-
-If, for some reason, you don't need the alpha channel on an image,
-and you want to remove it rather than combining it with the background
-(but the image author certainly had in mind that you *would* combine
-it with the background, so that's what you should probably do):
-
- if (color_type & PNG_COLOR_MASK_ALPHA)
- png_set_strip_alpha(png_ptr);
-
-In PNG files, the alpha channel in an image
-is the level of opacity. If you need the alpha channel in an image to
-be the level of transparency instead of opacity, you can invert the
-alpha channel (or the tRNS chunk data) after it's read, so that 0 is
-fully opaque and 255 (in 8-bit or paletted images) or 65535 (in 16-bit
-images) is fully transparent, with
-
- png_set_invert_alpha(png_ptr);
-
-PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as
-they can, resulting in, for example, 8 pixels per byte for 1 bit
-files. This code expands to 1 pixel per byte without changing the
-values of the pixels:
-
- if (bit_depth < 8)
- png_set_packing(png_ptr);
-
-PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels
-stored in a PNG image have been "scaled" or "shifted" up to the next
-higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] to
-8 bits/sample in the range [0, 255]). However, it is also possible to
-convert the PNG pixel data back to the original bit depth of the image.
-This call reduces the pixels back down to the original bit depth:
-
- png_color_8p sig_bit;
-
- if (png_get_sBIT(png_ptr, info_ptr, &sig_bit))
- png_set_shift(png_ptr, sig_bit);
-
-PNG files store 3-color pixels in red, green, blue order. This code
-changes the storage of the pixels to blue, green, red:
-
- if (color_type == PNG_COLOR_TYPE_RGB ||
- color_type == PNG_COLOR_TYPE_RGB_ALPHA)
- png_set_bgr(png_ptr);
-
-PNG files store RGB pixels packed into 3 or 6 bytes. This code expands them
-into 4 or 8 bytes for windowing systems that need them in this format:
-
- if (color_type == PNG_COLOR_TYPE_RGB)
- png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE);
-
-where "filler" is the 8 or 16-bit number to fill with, and the location is
-either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether
-you want the filler before the RGB or after. This transformation
-does not affect images that already have full alpha channels. To add an
-opaque alpha channel, use filler=0xff or 0xffff and PNG_FILLER_AFTER which
-will generate RGBA pixels.
-
-Note that png_set_filler() does not change the color type. If you want
-to do that, you can add a true alpha channel with
-
- if (color_type == PNG_COLOR_TYPE_RGB ||
- color_type == PNG_COLOR_TYPE_GRAY)
- png_set_add_alpha(png_ptr, filler, PNG_FILLER_AFTER);
-
-where "filler" contains the alpha value to assign to each pixel.
-This function was added in libpng-1.2.7.
-
-If you are reading an image with an alpha channel, and you need the
-data as ARGB instead of the normal PNG format RGBA:
-
- if (color_type == PNG_COLOR_TYPE_RGB_ALPHA)
- png_set_swap_alpha(png_ptr);
-
-For some uses, you may want a grayscale image to be represented as
-RGB. This code will do that conversion:
-
- if (color_type == PNG_COLOR_TYPE_GRAY ||
- color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
- png_set_gray_to_rgb(png_ptr);
-
-Conversely, you can convert an RGB or RGBA image to grayscale or grayscale
-with alpha.
-
- if (color_type == PNG_COLOR_TYPE_RGB ||
- color_type == PNG_COLOR_TYPE_RGB_ALPHA)
- png_set_rgb_to_gray_fixed(png_ptr, error_action,
- int red_weight, int green_weight);
-
- error_action = 1: silently do the conversion
- error_action = 2: issue a warning if the original
- image has any pixel where
- red != green or red != blue
- error_action = 3: issue an error and abort the
- conversion if the original
- image has any pixel where
- red != green or red != blue
-
- red_weight: weight of red component times 100000
- green_weight: weight of green component times 100000
- If either weight is negative, default
- weights (21268, 71514) are used.
-
-If you have set error_action = 1 or 2, you can
-later check whether the image really was gray, after processing
-the image rows, with the png_get_rgb_to_gray_status(png_ptr) function.
-It will return a png_byte that is zero if the image was gray or
-1 if there were any non-gray pixels. bKGD and sBIT data
-will be silently converted to grayscale, using the green channel
-data, regardless of the error_action setting.
-
-With red_weight+green_weight<=100000,
-the normalized graylevel is computed:
-
- int rw = red_weight * 65536;
- int gw = green_weight * 65536;
- int bw = 65536 - (rw + gw);
- gray = (rw*red + gw*green + bw*blue)/65536;
-
-The default values approximate those recommended in the Charles
-Poynton's Color FAQ, <http://www.inforamp.net/~poynton/>
-Copyright (c) 1998-01-04 Charles Poynton <poynton at inforamp.net>
-
- Y = 0.212671 * R + 0.715160 * G + 0.072169 * B
-
-Libpng approximates this with
-
- Y = 0.21268 * R + 0.7151 * G + 0.07217 * B
-
-which can be expressed with integers as
-
- Y = (6969 * R + 23434 * G + 2365 * B)/32768
-
-The calculation is done in a linear colorspace, if the image gamma
-is known.
-
-If you have a grayscale and you are using png_set_expand_depth(),
-png_set_expand(), or png_set_gray_to_rgb to change to truecolor or to
-a higher bit-depth, you must either supply the background color as a gray
-value at the original file bit-depth (need_expand = 1) or else supply the
-background color as an RGB triplet at the final, expanded bit depth
-(need_expand = 0). Similarly, if you are reading a paletted image, you
-must either supply the background color as a palette index (need_expand = 1)
-or as an RGB triplet that may or may not be in the palette (need_expand = 0).
-
- png_color_16 my_background;
- png_color_16p image_background;
-
- if (png_get_bKGD(png_ptr, info_ptr, &image_background))
- png_set_background(png_ptr, image_background,
- PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
- else
- png_set_background(png_ptr, &my_background,
- PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0);
-
-The png_set_background() function tells libpng to composite images
-with alpha or simple transparency against the supplied background
-color. If the PNG file contains a bKGD chunk (PNG_INFO_bKGD valid),
-you may use this color, or supply another color more suitable for
-the current display (e.g., the background color from a web page). You
-need to tell libpng whether the color is in the gamma space of the
-display (PNG_BACKGROUND_GAMMA_SCREEN for colors you supply), the file
-(PNG_BACKGROUND_GAMMA_FILE for colors from the bKGD chunk), or one
-that is neither of these gammas (PNG_BACKGROUND_GAMMA_UNIQUE - I don't
-know why anyone would use this, but it's here).
-
-To properly display PNG images on any kind of system, the application needs
-to know what the display gamma is. Ideally, the user will know this, and
-the application will allow them to set it. One method of allowing the user
-to set the display gamma separately for each system is to check for a
-SCREEN_GAMMA or DISPLAY_GAMMA environment variable, which will hopefully be
-correctly set.
-
-Note that display_gamma is the overall gamma correction required to produce
-pleasing results, which depends on the lighting conditions in the surrounding
-environment. In a dim or brightly lit room, no compensation other than
-the physical gamma exponent of the monitor is needed, while in a dark room
-a slightly smaller exponent is better.
-
- double gamma, screen_gamma;
-
- if (/* We have a user-defined screen
- gamma value */)
- {
- screen_gamma = user_defined_screen_gamma;
- }
- /* One way that applications can share the same
- screen gamma value */
- else if ((gamma_str = getenv("SCREEN_GAMMA"))
- != NULL)
- {
- screen_gamma = (double)atof(gamma_str);
- }
- /* If we don't have another value */
- else
- {
- screen_gamma = 2.2; /* A good guess for a
- PC monitor in a bright office or a dim room */
- screen_gamma = 2.0; /* A good guess for a
- PC monitor in a dark room */
- screen_gamma = 1.7 or 1.0; /* A good
- guess for Mac systems */
- }
-
-The png_set_gamma() function handles gamma transformations of the data.
-Pass both the file gamma and the current screen_gamma. If the file does
-not have a gamma value, you can pass one anyway if you have an idea what
-it is (usually 0.45455 is a good guess for GIF images on PCs). Note
-that file gammas are inverted from screen gammas. See the discussions
-on gamma in the PNG specification for an excellent description of what
-gamma is, and why all applications should support it. It is strongly
-recommended that PNG viewers support gamma correction.
-
- if (png_get_gAMA(png_ptr, info_ptr, &gamma))
- png_set_gamma(png_ptr, screen_gamma, gamma);
- else
- png_set_gamma(png_ptr, screen_gamma, 0.45455);
-
-If you need to reduce an RGB file to a paletted file, or if a paletted
-file has more entries then will fit on your screen, png_set_dither()
-will do that. Note that this is a simple match dither that merely
-finds the closest color available. This should work fairly well with
-optimized palettes, and fairly badly with linear color cubes. If you
-pass a palette that is larger then maximum_colors, the file will
-reduce the number of colors in the palette so it will fit into
-maximum_colors. If there is a histogram, it will use it to make
-more intelligent choices when reducing the palette. If there is no
-histogram, it may not do as good a job.
-
- if (color_type & PNG_COLOR_MASK_COLOR)
- {
- if (png_get_valid(png_ptr, info_ptr,
- PNG_INFO_PLTE))
- {
- png_uint_16p histogram = NULL;
-
- png_get_hIST(png_ptr, info_ptr,
- &histogram);
- png_set_dither(png_ptr, palette, num_palette,
- max_screen_colors, histogram, 1);
- }
- else
- {
- png_color std_color_cube[MAX_SCREEN_COLORS] =
- { ... colors ... };
-
- png_set_dither(png_ptr, std_color_cube,
- MAX_SCREEN_COLORS, MAX_SCREEN_COLORS,
- NULL,0);
- }
- }
-
-PNG files describe monochrome as black being zero and white being one.
-The following code will reverse this (make black be one and white be
-zero):
-
- if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY)
- png_set_invert_mono(png_ptr);
-
-This function can also be used to invert grayscale and gray-alpha images:
-
- if (color_type == PNG_COLOR_TYPE_GRAY ||
- color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
- png_set_invert_mono(png_ptr);
-
-PNG files store 16 bit pixels in network byte order (big-endian,
-ie. most significant bits first). This code changes the storage to the
-other way (little-endian, i.e. least significant bits first, the
-way PCs store them):
-
- if (bit_depth == 16)
- png_set_swap(png_ptr);
-
-If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you
-need to change the order the pixels are packed into bytes, you can use:
-
- if (bit_depth < 8)
- png_set_packswap(png_ptr);
-
-Finally, you can write your own transformation function if none of
-the existing ones meets your needs. This is done by setting a callback
-with
-
- png_set_read_user_transform_fn(png_ptr,
- read_transform_fn);
-
-You must supply the function
-
- void read_transform_fn(png_ptr ptr, row_info_ptr
- row_info, png_bytep data)
-
-See pngtest.c for a working example. Your function will be called
-after all of the other transformations have been processed.
-
-You can also set up a pointer to a user structure for use by your
-callback function, and you can inform libpng that your transform
-function will change the number of channels or bit depth with the
-function
-
- png_set_user_transform_info(png_ptr, user_ptr,
- user_depth, user_channels);
-
-The user's application, not libpng, is responsible for allocating and
-freeing any memory required for the user structure.
-
-You can retrieve the pointer via the function
-png_get_user_transform_ptr(). For example:
-
- voidp read_user_transform_ptr =
- png_get_user_transform_ptr(png_ptr);
-
-The last thing to handle is interlacing; this is covered in detail below,
-but you must call the function here if you want libpng to handle expansion
-of the interlaced image.
-
- number_of_passes = png_set_interlace_handling(png_ptr);
-
-After setting the transformations, libpng can update your png_info
-structure to reflect any transformations you've requested with this
-call. This is most useful to update the info structure's rowbytes
-field so you can use it to allocate your image memory. This function
-will also update your palette with the correct screen_gamma and
-background if these have been given with the calls above.
-
- png_read_update_info(png_ptr, info_ptr);
-
-After you call png_read_update_info(), you can allocate any
-memory you need to hold the image. The row data is simply
-raw byte data for all forms of images. As the actual allocation
-varies among applications, no example will be given. If you
-are allocating one large chunk, you will need to build an
-array of pointers to each row, as it will be needed for some
-of the functions below.
-
-Reading image data
-
-After you've allocated memory, you can read the image data.
-The simplest way to do this is in one function call. If you are
-allocating enough memory to hold the whole image, you can just
-call png_read_image() and libpng will read in all the image data
-and put it in the memory area supplied. You will need to pass in
-an array of pointers to each row.
-
-This function automatically handles interlacing, so you don't need
-to call png_set_interlace_handling() or call this function multiple
-times, or any of that other stuff necessary with png_read_rows().
-
- png_read_image(png_ptr, row_pointers);
-
-where row_pointers is:
-
- png_bytep row_pointers[height];
-
-You can point to void or char or whatever you use for pixels.
-
-If you don't want to read in the whole image at once, you can
-use png_read_rows() instead. If there is no interlacing (check
-interlace_type == PNG_INTERLACE_NONE), this is simple:
-
- png_read_rows(png_ptr, row_pointers, NULL,
- number_of_rows);
-
-where row_pointers is the same as in the png_read_image() call.
-
-If you are doing this just one row at a time, you can do this with
-a single row_pointer instead of an array of row_pointers:
-
- png_bytep row_pointer = row;
- png_read_row(png_ptr, row_pointer, NULL);
-
-If the file is interlaced (interlace_type != 0 in the IHDR chunk), things
-get somewhat harder. The only current (PNG Specification version 1.2)
-interlacing type for PNG is (interlace_type == PNG_INTERLACE_ADAM7)
-is a somewhat complicated 2D interlace scheme, known as Adam7, that
-breaks down an image into seven smaller images of varying size, based
-on an 8x8 grid.
-
-libpng can fill out those images or it can give them to you "as is".
-If you want them filled out, there are two ways to do that. The one
-mentioned in the PNG specification is to expand each pixel to cover
-those pixels that have not been read yet (the "rectangle" method).
-This results in a blocky image for the first pass, which gradually
-smooths out as more pixels are read. The other method is the "sparkle"
-method, where pixels are drawn only in their final locations, with the
-rest of the image remaining whatever colors they were initialized to
-before the start of the read. The first method usually looks better,
-but tends to be slower, as there are more pixels to put in the rows.
-
-If you don't want libpng to handle the interlacing details, just call
-png_read_rows() seven times to read in all seven images. Each of the
-images is a valid image by itself, or they can all be combined on an
-8x8 grid to form a single image (although if you intend to combine them
-you would be far better off using the libpng interlace handling).
-
-The first pass will return an image 1/8 as wide as the entire image
-(every 8th column starting in column 0) and 1/8 as high as the original
-(every 8th row starting in row 0), the second will be 1/8 as wide
-(starting in column 4) and 1/8 as high (also starting in row 0). The
-third pass will be 1/4 as wide (every 4th pixel starting in column 0) and
-1/8 as high (every 8th row starting in row 4), and the fourth pass will
-be 1/4 as wide and 1/4 as high (every 4th column starting in column 2,
-and every 4th row starting in row 0). The fifth pass will return an
-image 1/2 as wide, and 1/4 as high (starting at column 0 and row 2),
-while the sixth pass will be 1/2 as wide and 1/2 as high as the original
-(starting in column 1 and row 0). The seventh and final pass will be as
-wide as the original, and 1/2 as high, containing all of the odd
-numbered scanlines. Phew!
-
-If you want libpng to expand the images, call this before calling
-png_start_read_image() or png_read_update_info():
-
- if (interlace_type == PNG_INTERLACE_ADAM7)
- number_of_passes
- = png_set_interlace_handling(png_ptr);
-
-This will return the number of passes needed. Currently, this
-is seven, but may change if another interlace type is added.
-This function can be called even if the file is not interlaced,
-where it will return one pass.
-
-If you are not going to display the image after each pass, but are
-going to wait until the entire image is read in, use the sparkle
-effect. This effect is faster and the end result of either method
-is exactly the same. If you are planning on displaying the image
-after each pass, the "rectangle" effect is generally considered the
-better looking one.
-
-If you only want the "sparkle" effect, just call png_read_rows() as
-normal, with the third parameter NULL. Make sure you make pass over
-the image number_of_passes times, and you don't change the data in the
-rows between calls. You can change the locations of the data, just
-not the data. Each pass only writes the pixels appropriate for that
-pass, and assumes the data from previous passes is still valid.
-
- png_read_rows(png_ptr, row_pointers, NULL,
- number_of_rows);
-
-If you only want the first effect (the rectangles), do the same as
-before except pass the row buffer in the third parameter, and leave
-the second parameter NULL.
-
- png_read_rows(png_ptr, NULL, row_pointers,
- number_of_rows);
-
-Finishing a sequential read
-
-After you are finished reading the image through the
-low-level interface, you can finish reading the file. If you are
-interested in comments or time, which may be stored either before or
-after the image data, you should pass the separate png_info struct if
-you want to keep the comments from before and after the image
-separate. If you are not interested, you can pass NULL.
-
- png_read_end(png_ptr, end_info);
-
-When you are done, you can free all memory allocated by libpng like this:
-
- png_destroy_read_struct(&png_ptr, &info_ptr,
- &end_info);
-
-It is also possible to individually free the info_ptr members that
-point to libpng-allocated storage with the following function:
-
- png_free_data(png_ptr, info_ptr, mask, seq)
- mask - identifies data to be freed, a mask
- containing the bitwise OR of one or
- more of
- PNG_FREE_PLTE, PNG_FREE_TRNS,
- PNG_FREE_HIST, PNG_FREE_ICCP,
- PNG_FREE_PCAL, PNG_FREE_ROWS,
- PNG_FREE_SCAL, PNG_FREE_SPLT,
- PNG_FREE_TEXT, PNG_FREE_UNKN,
- or simply PNG_FREE_ALL
- seq - sequence number of item to be freed
- (-1 for all items)
-
-This function may be safely called when the relevant storage has
-already been freed, or has not yet been allocated, or was allocated
-by the user and not by libpng, and will in those
-cases do nothing. The "seq" parameter is ignored if only one item
-of the selected data type, such as PLTE, is allowed. If "seq" is not
--1, and multiple items are allowed for the data type identified in
-the mask, such as text or sPLT, only the n'th item in the structure
-is freed, where n is "seq".
-
-The default behavior is only to free data that was allocated internally
-by libpng. This can be changed, so that libpng will not free the data,
-or so that it will free data that was allocated by the user with png_malloc()
-or png_zalloc() and passed in via a png_set_*() function, with
-
- png_data_freer(png_ptr, info_ptr, freer, mask)
- mask - which data elements are affected
- same choices as in png_free_data()
- freer - one of
- PNG_DESTROY_WILL_FREE_DATA
- PNG_SET_WILL_FREE_DATA
- PNG_USER_WILL_FREE_DATA
-
-This function only affects data that has already been allocated.
-You can call this function after reading the PNG data but before calling
-any png_set_*() functions, to control whether the user or the png_set_*()
-function is responsible for freeing any existing data that might be present,
-and again after the png_set_*() functions to control whether the user
-or png_destroy_*() is supposed to free the data. When the user assumes
-responsibility for libpng-allocated data, the application must use
-png_free() to free it, and when the user transfers responsibility to libpng
-for data that the user has allocated, the user must have used png_malloc()
-or png_zalloc() to allocate it.
-
-If you allocated your row_pointers in a single block, as suggested above in
-the description of the high level read interface, you must not transfer
-responsibility for freeing it to the png_set_rows or png_read_destroy function,
-because they would also try to free the individual row_pointers[i].
-
-If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword
-separately, do not transfer responsibility for freeing text_ptr to libpng,
-because when libpng fills a png_text structure it combines these members with
-the key member, and png_free_data() will free only text_ptr.key. Similarly,
-if you transfer responsibility for free'ing text_ptr from libpng to your
-application, your application must not separately free those members.
-
-The png_free_data() function will turn off the "valid" flag for anything
-it frees. If you need to turn the flag off for a chunk that was freed by your
-application instead of by libpng, you can use
-
- png_set_invalid(png_ptr, info_ptr, mask);
- mask - identifies the chunks to be made invalid,
- containing the bitwise OR of one or
- more of
- PNG_INFO_gAMA, PNG_INFO_sBIT,
- PNG_INFO_cHRM, PNG_INFO_PLTE,
- PNG_INFO_tRNS, PNG_INFO_bKGD,
- PNG_INFO_hIST, PNG_INFO_pHYs,
- PNG_INFO_oFFs, PNG_INFO_tIME,
- PNG_INFO_pCAL, PNG_INFO_sRGB,
- PNG_INFO_iCCP, PNG_INFO_sPLT,
- PNG_INFO_sCAL, PNG_INFO_IDAT
-
-For a more compact example of reading a PNG image, see the file example.c.
-
-Reading PNG files progressively
-
-The progressive reader is slightly different then the non-progressive
-reader. Instead of calling png_read_info(), png_read_rows(), and
-png_read_end(), you make one call to png_process_data(), which calls
-callbacks when it has the info, a row, or the end of the image. You
-set up these callbacks with png_set_progressive_read_fn(). You don't
-have to worry about the input/output functions of libpng, as you are
-giving the library the data directly in png_process_data(). I will
-assume that you have read the section on reading PNG files above,
-so I will only highlight the differences (although I will show
-all of the code).
-
-png_structp png_ptr;
-png_infop info_ptr;
-
- /* An example code fragment of how you would
- initialize the progressive reader in your
- application. */
- int
- initialize_png_reader()
- {
- png_ptr = png_create_read_struct
- (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
- user_error_fn, user_warning_fn);
- if (!png_ptr)
- return (ERROR);
- info_ptr = png_create_info_struct(png_ptr);
- if (!info_ptr)
- {
- png_destroy_read_struct(&png_ptr, (png_infopp)NULL,
- (png_infopp)NULL);
- return (ERROR);
- }
-
- if (setjmp(png_jmpbuf(png_ptr)))
- {
- png_destroy_read_struct(&png_ptr, &info_ptr,
- (png_infopp)NULL);
- return (ERROR);
- }
-
- /* This one's new. You can provide functions
- to be called when the header info is valid,
- when each row is completed, and when the image
- is finished. If you aren't using all functions,
- you can specify NULL parameters. Even when all
- three functions are NULL, you need to call
- png_set_progressive_read_fn(). You can use
- any struct as the user_ptr (cast to a void pointer
- for the function call), and retrieve the pointer
- from inside the callbacks using the function
-
- png_get_progressive_ptr(png_ptr);
-
- which will return a void pointer, which you have
- to cast appropriately.
- */
- png_set_progressive_read_fn(png_ptr, (void *)user_ptr,
- info_callback, row_callback, end_callback);
-
- return 0;
- }
-
- /* A code fragment that you call as you receive blocks
- of data */
- int
- process_data(png_bytep buffer, png_uint_32 length)
- {
- if (setjmp(png_jmpbuf(png_ptr)))
- {
- png_destroy_read_struct(&png_ptr, &info_ptr,
- (png_infopp)NULL);
- return (ERROR);
- }
-
- /* This one's new also. Simply give it a chunk
- of data from the file stream (in order, of
- course). On machines with segmented memory
- models machines, don't give it any more than
- 64K. The library seems to run fine with sizes
- of 4K. Although you can give it much less if
- necessary (I assume you can give it chunks of
- 1 byte, I haven't tried less then 256 bytes
- yet). When this function returns, you may
- want to display any rows that were generated
- in the row callback if you don't already do
- so there.
- */
- png_process_data(png_ptr, info_ptr, buffer, length);
- return 0;
- }
-
- /* This function is called (as set by
- png_set_progressive_read_fn() above) when enough data
- has been supplied so all of the header has been
- read.
- */
- void
- info_callback(png_structp png_ptr, png_infop info)
- {
- /* Do any setup here, including setting any of
- the transformations mentioned in the Reading
- PNG files section. For now, you _must_ call
- either png_start_read_image() or
- png_read_update_info() after all the
- transformations are set (even if you don't set
- any). You may start getting rows before
- png_process_data() returns, so this is your
- last chance to prepare for that.
- */
- }
-
- /* This function is called when each row of image
- data is complete */
- void
- row_callback(png_structp png_ptr, png_bytep new_row,
- png_uint_32 row_num, int pass)
- {
- /* If the image is interlaced, and you turned
- on the interlace handler, this function will
- be called for every row in every pass. Some
- of these rows will not be changed from the
- previous pass. When the row is not changed,
- the new_row variable will be NULL. The rows
- and passes are called in order, so you don't
- really need the row_num and pass, but I'm
- supplying them because it may make your life
- easier.
-
- For the non-NULL rows of interlaced images,
- you must call png_progressive_combine_row()
- passing in the row and the old row. You can
- call this function for NULL rows (it will just
- return) and for non-interlaced images (it just
- does the memcpy for you) if it will make the
- code easier. Thus, you can just do this for
- all cases:
- */
-
- png_progressive_combine_row(png_ptr, old_row,
- new_row);
-
- /* where old_row is what was displayed for
- previously for the row. Note that the first
- pass (pass == 0, really) will completely cover
- the old row, so the rows do not have to be
- initialized. After the first pass (and only
- for interlaced images), you will have to pass
- the current row, and the function will combine
- the old row and the new row.
- */
- }
-
- void
- end_callback(png_structp png_ptr, png_infop info)
- {
- /* This function is called after the whole image
- has been read, including any chunks after the
- image (up to and including the IEND). You
- will usually have the same info chunk as you
- had in the header, although some data may have
- been added to the comments and time fields.
-
- Most people won't do much here, perhaps setting
- a flag that marks the image as finished.
- */
- }
-
-
-
-IV. Writing
-
-Much of this is very similar to reading. However, everything of
-importance is repeated here, so you won't have to constantly look
-back up in the reading section to understand writing.
-
-Setup
-
-You will want to do the I/O initialization before you get into libpng,
-so if it doesn't work, you don't have anything to undo. If you are not
-using the standard I/O functions, you will need to replace them with
-custom writing functions. See the discussion under Customizing libpng.
-
- FILE *fp = fopen(file_name, "wb");
- if (!fp)
- {
- return (ERROR);
- }
-
-Next, png_struct and png_info need to be allocated and initialized.
-As these can be both relatively large, you may not want to store these
-on the stack, unless you have stack space to spare. Of course, you
-will want to check if they return NULL. If you are also reading,
-you won't want to name your read structure and your write structure
-both "png_ptr"; you can call them anything you like, such as
-"read_ptr" and "write_ptr". Look at pngtest.c, for example.
-
- png_structp png_ptr = png_create_write_struct
- (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
- user_error_fn, user_warning_fn);
- if (!png_ptr)
- return (ERROR);
-
- png_infop info_ptr = png_create_info_struct(png_ptr);
- if (!info_ptr)
- {
- png_destroy_write_struct(&png_ptr,
- (png_infopp)NULL);
- return (ERROR);
- }
-
-If you want to use your own memory allocation routines,
-define PNG_USER_MEM_SUPPORTED and use
-png_create_write_struct_2() instead of png_create_write_struct():
-
- png_structp png_ptr = png_create_write_struct_2
- (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
- user_error_fn, user_warning_fn, (png_voidp)
- user_mem_ptr, user_malloc_fn, user_free_fn);
-
-After you have these structures, you will need to set up the
-error handling. When libpng encounters an error, it expects to
-longjmp() back to your routine. Therefore, you will need to call
-setjmp() and pass the png_jmpbuf(png_ptr). If you
-write the file from different routines, you will need to update
-the png_jmpbuf(png_ptr) every time you enter a new routine that will
-call a png_*() function. See your documentation of setjmp/longjmp
-for your compiler for more information on setjmp/longjmp. See
-the discussion on libpng error handling in the Customizing Libpng
-section below for more information on the libpng error handling.
-
- if (setjmp(png_jmpbuf(png_ptr)))
- {
- png_destroy_write_struct(&png_ptr, &info_ptr);
- fclose(fp);
- return (ERROR);
- }
- ...
- return;
-
-If you would rather avoid the complexity of setjmp/longjmp issues,
-you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case
-errors will result in a call to PNG_ABORT() which defaults to abort().
-
-Now you need to set up the output code. The default for libpng is to
-use the C function fwrite(). If you use this, you will need to pass a
-valid FILE * in the function png_init_io(). Be sure that the file is
-opened in binary mode. Again, if you wish to handle writing data in
-another way, see the discussion on libpng I/O handling in the Customizing
-Libpng section below.
-
- png_init_io(png_ptr, fp);
-
-If you are embedding your PNG into a datastream such as MNG, and don't
-want libpng to write the 8-byte signature, or if you have already
-written the signature in your application, use
-
- png_set_sig_bytes(png_ptr, 8);
-
-to inform libpng that it should not write a signature.
-
-Write callbacks
-
-At this point, you can set up a callback function that will be
-called after each row has been written, which you can use to control
-a progress meter or the like. It's demonstrated in pngtest.c.
-You must supply a function
-
- void write_row_callback(png_ptr, png_uint_32 row,
- int pass);
- {
- /* put your code here */
- }
-
-(You can give it another name that you like instead of "write_row_callback")
-
-To inform libpng about your function, use
-
- png_set_write_status_fn(png_ptr, write_row_callback);
-
-You now have the option of modifying how the compression library will
-run. The following functions are mainly for testing, but may be useful
-in some cases, like if you need to write PNG files extremely fast and
-are willing to give up some compression, or if you want to get the
-maximum possible compression at the expense of slower writing. If you
-have no special needs in this area, let the library do what it wants by
-not calling this function at all, as it has been tuned to deliver a good
-speed/compression ratio. The second parameter to png_set_filter() is
-the filter method, for which the only valid values are 0 (as of the
-July 1999 PNG specification, version 1.2) or 64 (if you are writing
-a PNG datastream that is to be embedded in a MNG datastream). The third
-parameter is a flag that indicates which filter type(s) are to be tested
-for each scanline. See the PNG specification for details on the specific filter
-types.
-
-
- /* turn on or off filtering, and/or choose
- specific filters. You can use either a single
- PNG_FILTER_VALUE_NAME or the bitwise OR of one
- or more PNG_FILTER_NAME masks. */
- png_set_filter(png_ptr, 0,
- PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE |
- PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB |
- PNG_FILTER_UP | PNG_FILTER_VALUE_UP |
- PNG_FILTER_AVG | PNG_FILTER_VALUE_AVG |
- PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH|
- PNG_ALL_FILTERS);
-
-If an application
-wants to start and stop using particular filters during compression,
-it should start out with all of the filters (to ensure that the previous
-row of pixels will be stored in case it's needed later), and then add
-and remove them after the start of compression.
-
-If you are writing a PNG datastream that is to be embedded in a MNG
-datastream, the second parameter can be either 0 or 64.
-
-The png_set_compression_*() functions interface to the zlib compression
-library, and should mostly be ignored unless you really know what you are
-doing. The only generally useful call is png_set_compression_level()
-which changes how much time zlib spends on trying to compress the image
-data. See the Compression Library (zlib.h and algorithm.txt, distributed
-with zlib) for details on the compression levels.
-
- /* set the zlib compression level */
- png_set_compression_level(png_ptr,
- Z_BEST_COMPRESSION);
-
- /* set other zlib parameters */
- png_set_compression_mem_level(png_ptr, 8);
- png_set_compression_strategy(png_ptr,
- Z_DEFAULT_STRATEGY);
- png_set_compression_window_bits(png_ptr, 15);
- png_set_compression_method(png_ptr, 8);
- png_set_compression_buffer_size(png_ptr, 8192)
-
-extern PNG_EXPORT(void,png_set_zbuf_size)
-
-Setting the contents of info for output
-
-You now need to fill in the png_info structure with all the data you
-wish to write before the actual image. Note that the only thing you
-are allowed to write after the image is the text chunks and the time
-chunk (as of PNG Specification 1.2, anyway). See png_write_end() and
-the latest PNG specification for more information on that. If you
-wish to write them before the image, fill them in now, and flag that
-data as being valid. If you want to wait until after the data, don't
-fill them until png_write_end(). For all the fields in png_info and
-their data types, see png.h. For explanations of what the fields
-contain, see the PNG specification.
-
-Some of the more important parts of the png_info are:
-
- png_set_IHDR(png_ptr, info_ptr, width, height,
- bit_depth, color_type, interlace_type,
- compression_type, filter_method)
- width - holds the width of the image
- in pixels (up to 2^31).
- height - holds the height of the image
- in pixels (up to 2^31).
- bit_depth - holds the bit depth of one of the
- image channels.
- (valid values are 1, 2, 4, 8, 16
- and depend also on the
- color_type. See also significant
- bits (sBIT) below).
- color_type - describes which color/alpha
- channels are present.
- PNG_COLOR_TYPE_GRAY
- (bit depths 1, 2, 4, 8, 16)
- PNG_COLOR_TYPE_GRAY_ALPHA
- (bit depths 8, 16)
- PNG_COLOR_TYPE_PALETTE
- (bit depths 1, 2, 4, 8)
- PNG_COLOR_TYPE_RGB
- (bit_depths 8, 16)
- PNG_COLOR_TYPE_RGB_ALPHA
- (bit_depths 8, 16)
-
- PNG_COLOR_MASK_PALETTE
- PNG_COLOR_MASK_COLOR
- PNG_COLOR_MASK_ALPHA
-
- interlace_type - PNG_INTERLACE_NONE or
- PNG_INTERLACE_ADAM7
- compression_type - (must be
- PNG_COMPRESSION_TYPE_DEFAULT)
- filter_method - (must be PNG_FILTER_TYPE_DEFAULT
- or, if you are writing a PNG to
- be embedded in a MNG datastream,
- can also be
- PNG_INTRAPIXEL_DIFFERENCING)
-
-If you call png_set_IHDR(), the call must appear before any of the
-other png_set_*() functions, because they might require access to some of
-the IHDR settings. The remaining png_set_*() functions can be called
-in any order.
-
-If you wish, you can reset the compression_type, interlace_type, or
-filter_method later by calling png_set_IHDR() again; if you do this, the
-width, height, bit_depth, and color_type must be the same in each call.
-
- png_set_PLTE(png_ptr, info_ptr, palette,
- num_palette);
- palette - the palette for the file
- (array of png_color)
- num_palette - number of entries in the palette
-
- png_set_gAMA(png_ptr, info_ptr, gamma);
- gamma - the gamma the image was created
- at (PNG_INFO_gAMA)
-
- png_set_sRGB(png_ptr, info_ptr, srgb_intent);
- srgb_intent - the rendering intent
- (PNG_INFO_sRGB) The presence of
- the sRGB chunk means that the pixel
- data is in the sRGB color space.
- This chunk also implies specific
- values of gAMA and cHRM. Rendering
- intent is the CSS-1 property that
- has been defined by the International
- Color Consortium
- (http://www.color.org).
- It can be one of
- PNG_sRGB_INTENT_SATURATION,
- PNG_sRGB_INTENT_PERCEPTUAL,
- PNG_sRGB_INTENT_ABSOLUTE, or
- PNG_sRGB_INTENT_RELATIVE.
-
-
- png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr,
- srgb_intent);
- srgb_intent - the rendering intent
- (PNG_INFO_sRGB) The presence of the
- sRGB chunk means that the pixel
- data is in the sRGB color space.
- This function also causes gAMA and
- cHRM chunks with the specific values
- that are consistent with sRGB to be
- written.
-
- png_set_iCCP(png_ptr, info_ptr, name, compression_type,
- profile, proflen);
- name - The profile name.
- compression - The compression type; always
- PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
- You may give NULL to this argument to
- ignore it.
- profile - International Color Consortium color
- profile data. May contain NULs.
- proflen - length of profile data in bytes.
-
- png_set_sBIT(png_ptr, info_ptr, sig_bit);
- sig_bit - the number of significant bits for
- (PNG_INFO_sBIT) each of the gray, red,
- green, and blue channels, whichever are
- appropriate for the given color type
- (png_color_16)
-
- png_set_tRNS(png_ptr, info_ptr, trans, num_trans,
- trans_values);
- trans - array of transparent entries for
- palette (PNG_INFO_tRNS)
- trans_values - graylevel or color sample values
- (in order red, green, blue) of the
- single transparent color for
- non-paletted images (PNG_INFO_tRNS)
- num_trans - number of transparent entries
- (PNG_INFO_tRNS)
-
- png_set_hIST(png_ptr, info_ptr, hist);
- (PNG_INFO_hIST)
- hist - histogram of palette (array of
- png_uint_16)
-
- png_set_tIME(png_ptr, info_ptr, mod_time);
- mod_time - time image was last modified
- (PNG_VALID_tIME)
-
- png_set_bKGD(png_ptr, info_ptr, background);
- background - background color (PNG_VALID_bKGD)
-
- png_set_text(png_ptr, info_ptr, text_ptr, num_text);
- text_ptr - array of png_text holding image
- comments
- text_ptr[i].compression - type of compression used
- on "text" PNG_TEXT_COMPRESSION_NONE
- PNG_TEXT_COMPRESSION_zTXt
- PNG_ITXT_COMPRESSION_NONE
- PNG_ITXT_COMPRESSION_zTXt
- text_ptr[i].key - keyword for comment. Must contain
- 1-79 characters.
- text_ptr[i].text - text comments for current
- keyword. Can be NULL or empty.
- text_ptr[i].text_length - length of text string,
- after decompression, 0 for iTXt
- text_ptr[i].itxt_length - length of itxt string,
- after decompression, 0 for tEXt/zTXt
- text_ptr[i].lang - language of comment (NULL or
- empty for unknown).
- text_ptr[i].translated_keyword - keyword in UTF-8 (NULL
- or empty for unknown).
- num_text - number of comments
-
- png_set_sPLT(png_ptr, info_ptr, &palette_ptr,
- num_spalettes);
- palette_ptr - array of png_sPLT_struct structures
- to be added to the list of palettes
- in the info structure.
- num_spalettes - number of palette structures to be
- added.
-
- png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y,
- unit_type);
- offset_x - positive offset from the left
- edge of the screen
- offset_y - positive offset from the top
- edge of the screen
- unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER
-
- png_set_pHYs(png_ptr, info_ptr, res_x, res_y,
- unit_type);
- res_x - pixels/unit physical resolution
- in x direction
- res_y - pixels/unit physical resolution
- in y direction
- unit_type - PNG_RESOLUTION_UNKNOWN,
- PNG_RESOLUTION_METER
-
- png_set_sCAL(png_ptr, info_ptr, unit, width, height)
- unit - physical scale units (an integer)
- width - width of a pixel in physical scale units
- height - height of a pixel in physical scale units
- (width and height are doubles)
-
- png_set_sCAL_s(png_ptr, info_ptr, unit, width, height)
- unit - physical scale units (an integer)
- width - width of a pixel in physical scale units
- height - height of a pixel in physical scale units
- (width and height are strings like "2.54")
-
- png_set_unknown_chunks(png_ptr, info_ptr, &unknowns,
- num_unknowns)
- unknowns - array of png_unknown_chunk
- structures holding unknown chunks
- unknowns[i].name - name of unknown chunk
- unknowns[i].data - data of unknown chunk
- unknowns[i].size - size of unknown chunk's data
- unknowns[i].location - position to write chunk in file
- 0: do not write chunk
- PNG_HAVE_IHDR: before PLTE
- PNG_HAVE_PLTE: before IDAT
- PNG_AFTER_IDAT: after IDAT
-
-The "location" member is set automatically according to
-what part of the output file has already been written.
-You can change its value after calling png_set_unknown_chunks()
-as demonstrated in pngtest.c. Within each of the "locations",
-the chunks are sequenced according to their position in the
-structure (that is, the value of "i", which is the order in which
-the chunk was either read from the input file or defined with
-png_set_unknown_chunks).
-
-A quick word about text and num_text. text is an array of png_text
-structures. num_text is the number of valid structures in the array.
-Each png_text structure holds a language code, a keyword, a text value,
-and a compression type.
-
-The compression types have the same valid numbers as the compression
-types of the image data. Currently, the only valid number is zero.
-However, you can store text either compressed or uncompressed, unlike
-images, which always have to be compressed. So if you don't want the
-text compressed, set the compression type to PNG_TEXT_COMPRESSION_NONE.
-Because tEXt and zTXt chunks don't have a language field, if you
-specify PNG_TEXT_COMPRESSION_NONE or PNG_TEXT_COMPRESSION_zTXt
-any language code or translated keyword will not be written out.
-
-Until text gets around 1000 bytes, it is not worth compressing it.
-After the text has been written out to the file, the compression type
-is set to PNG_TEXT_COMPRESSION_NONE_WR or PNG_TEXT_COMPRESSION_zTXt_WR,
-so that it isn't written out again at the end (in case you are calling
-png_write_end() with the same struct.
-
-The keywords that are given in the PNG Specification are:
-
- Title Short (one line) title or
- caption for image
- Author Name of image's creator
- Description Description of image (possibly long)
- Copyright Copyright notice
- Creation Time Time of original image creation
- (usually RFC 1123 format, see below)
- Software Software used to create the image
- Disclaimer Legal disclaimer
- Warning Warning of nature of content
- Source Device used to create the image
- Comment Miscellaneous comment; conversion
- from other image format
-
-The keyword-text pairs work like this. Keywords should be short
-simple descriptions of what the comment is about. Some typical
-keywords are found in the PNG specification, as is some recommendations
-on keywords. You can repeat keywords in a file. You can even write
-some text before the image and some after. For example, you may want
-to put a description of the image before the image, but leave the
-disclaimer until after, so viewers working over modem connections
-don't have to wait for the disclaimer to go over the modem before
-they start seeing the image. Finally, keywords should be full
-words, not abbreviations. Keywords and text are in the ISO 8859-1
-(Latin-1) character set (a superset of regular ASCII) and can not
-contain NUL characters, and should not contain control or other
-unprintable characters. To make the comments widely readable, stick
-with basic ASCII, and avoid machine specific character set extensions
-like the IBM-PC character set. The keyword must be present, but
-you can leave off the text string on non-compressed pairs.
-Compressed pairs must have a text string, as only the text string
-is compressed anyway, so the compression would be meaningless.
-
-PNG supports modification time via the png_time structure. Two
-conversion routines are provided, png_convert_from_time_t() for
-time_t and png_convert_from_struct_tm() for struct tm. The
-time_t routine uses gmtime(). You don't have to use either of
-these, but if you wish to fill in the png_time structure directly,
-you should provide the time in universal time (GMT) if possible
-instead of your local time. Note that the year number is the full
-year (e.g. 1998, rather than 98 - PNG is year 2000 compliant!), and
-that months start with 1.
-
-If you want to store the time of the original image creation, you should
-use a plain tEXt chunk with the "Creation Time" keyword. This is
-necessary because the "creation time" of a PNG image is somewhat vague,
-depending on whether you mean the PNG file, the time the image was
-created in a non-PNG format, a still photo from which the image was
-scanned, or possibly the subject matter itself. In order to facilitate
-machine-readable dates, it is recommended that the "Creation Time"
-tEXt chunk use RFC 1123 format dates (e.g. "22 May 1997 18:07:10 GMT"),
-although this isn't a requirement. Unlike the tIME chunk, the
-"Creation Time" tEXt chunk is not expected to be automatically changed
-by the software. To facilitate the use of RFC 1123 dates, a function
-png_convert_to_rfc1123(png_timep) is provided to convert from PNG
-time to an RFC 1123 format string.
-
-Writing unknown chunks
-
-You can use the png_set_unknown_chunks function to queue up chunks
-for writing. You give it a chunk name, raw data, and a size; that's
-all there is to it. The chunks will be written by the next following
-png_write_info_before_PLTE, png_write_info, or png_write_end function.
-Any chunks previously read into the info structure's unknown-chunk
-list will also be written out in a sequence that satisfies the PNG
-specification's ordering rules.
-
-The high-level write interface
-
-At this point there are two ways to proceed; through the high-level
-write interface, or through a sequence of low-level write operations.
-You can use the high-level interface if your image data is present
-in the info structure. All defined output
-transformations are permitted, enabled by the following masks.
-
- PNG_TRANSFORM_IDENTITY No transformation
- PNG_TRANSFORM_PACKING Pack 1, 2 and 4-bit samples
- PNG_TRANSFORM_PACKSWAP Change order of packed
- pixels to LSB first
- PNG_TRANSFORM_INVERT_MONO Invert monochrome images
- PNG_TRANSFORM_SHIFT Normalize pixels to the
- sBIT depth
- PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA
- to BGRA
- PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA
- to AG
- PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity
- to transparency
- PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples
- PNG_TRANSFORM_STRIP_FILLER Strip out filler
- bytes (deprecated).
- PNG_TRANSFORM_STRIP_FILLER_BEFORE Strip out leading
- filler bytes
- PNG_TRANSFORM_STRIP_FILLER_AFTER Strip out trailing
- filler bytes
-
-If you have valid image data in the info structure (you can use
-png_set_rows() to put image data in the info structure), simply do this:
-
- png_write_png(png_ptr, info_ptr, png_transforms, NULL)
-
-where png_transforms is an integer containing the bitwise OR of some set of
-transformation flags. This call is equivalent to png_write_info(),
-followed the set of transformations indicated by the transform mask,
-then png_write_image(), and finally png_write_end().
-
-(The final parameter of this call is not yet used. Someday it might point
-to transformation parameters required by some future output transform.)
-
-You must use png_transforms and not call any png_set_transform() functions
-when you use png_write_png().
-
-The low-level write interface
-
-If you are going the low-level route instead, you are now ready to
-write all the file information up to the actual image data. You do
-this with a call to png_write_info().
-
- png_write_info(png_ptr, info_ptr);
-
-Note that there is one transformation you may need to do before
-png_write_info(). In PNG files, the alpha channel in an image is the
-level of opacity. If your data is supplied as a level of
-transparency, you can invert the alpha channel before you write it, so
-that 0 is fully transparent and 255 (in 8-bit or paletted images) or
-65535 (in 16-bit images) is fully opaque, with
-
- png_set_invert_alpha(png_ptr);
-
-This must appear before png_write_info() instead of later with the
-other transformations because in the case of paletted images the tRNS
-chunk data has to be inverted before the tRNS chunk is written. If
-your image is not a paletted image, the tRNS data (which in such cases
-represents a single color to be rendered as transparent) won't need to
-be changed, and you can safely do this transformation after your
-png_write_info() call.
-
-If you need to write a private chunk that you want to appear before
-the PLTE chunk when PLTE is present, you can write the PNG info in
-two steps, and insert code to write your own chunk between them:
-
- png_write_info_before_PLTE(png_ptr, info_ptr);
- png_set_unknown_chunks(png_ptr, info_ptr, ...);
- png_write_info(png_ptr, info_ptr);
-
-After you've written the file information, you can set up the library
-to handle any special transformations of the image data. The various
-ways to transform the data will be described in the order that they
-should occur. This is important, as some of these change the color
-type and/or bit depth of the data, and some others only work on
-certain color types and bit depths. Even though each transformation
-checks to see if it has data that it can do something with, you should
-make sure to only enable a transformation if it will be valid for the
-data. For example, don't swap red and blue on grayscale data.
-
-PNG files store RGB pixels packed into 3 or 6 bytes. This code tells
-the library to strip input data that has 4 or 8 bytes per pixel down
-to 3 or 6 bytes (or strip 2 or 4-byte grayscale+filler data to 1 or 2
-bytes per pixel).
-
- png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE);
-
-where the 0 is unused, and the location is either PNG_FILLER_BEFORE or
-PNG_FILLER_AFTER, depending upon whether the filler byte in the pixel
-is stored XRGB or RGBX.
-
-PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as
-they can, resulting in, for example, 8 pixels per byte for 1 bit files.
-If the data is supplied at 1 pixel per byte, use this code, which will
-correctly pack the pixels into a single byte:
-
- png_set_packing(png_ptr);
-
-PNG files reduce possible bit depths to 1, 2, 4, 8, and 16. If your
-data is of another bit depth, you can write an sBIT chunk into the
-file so that decoders can recover the original data if desired.
-
- /* Set the true bit depth of the image data */
- if (color_type & PNG_COLOR_MASK_COLOR)
- {
- sig_bit.red = true_bit_depth;
- sig_bit.green = true_bit_depth;
- sig_bit.blue = true_bit_depth;
- }
- else
- {
- sig_bit.gray = true_bit_depth;
- }
- if (color_type & PNG_COLOR_MASK_ALPHA)
- {
- sig_bit.alpha = true_bit_depth;
- }
-
- png_set_sBIT(png_ptr, info_ptr, &sig_bit);
-
-If the data is stored in the row buffer in a bit depth other than
-one supported by PNG (e.g. 3 bit data in the range 0-7 for a 4-bit PNG),
-this will scale the values to appear to be the correct bit depth as
-is required by PNG.
-
- png_set_shift(png_ptr, &sig_bit);
-
-PNG files store 16 bit pixels in network byte order (big-endian,
-ie. most significant bits first). This code would be used if they are
-supplied the other way (little-endian, i.e. least significant bits
-first, the way PCs store them):
-
- if (bit_depth > 8)
- png_set_swap(png_ptr);
-
-If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you
-need to change the order the pixels are packed into bytes, you can use:
-
- if (bit_depth < 8)
- png_set_packswap(png_ptr);
-
-PNG files store 3 color pixels in red, green, blue order. This code
-would be used if they are supplied as blue, green, red:
-
- png_set_bgr(png_ptr);
-
-PNG files describe monochrome as black being zero and white being
-one. This code would be used if the pixels are supplied with this reversed
-(black being one and white being zero):
-
- png_set_invert_mono(png_ptr);
-
-Finally, you can write your own transformation function if none of
-the existing ones meets your needs. This is done by setting a callback
-with
-
- png_set_write_user_transform_fn(png_ptr,
- write_transform_fn);
-
-You must supply the function
-
- void write_transform_fn(png_ptr ptr, row_info_ptr
- row_info, png_bytep data)
-
-See pngtest.c for a working example. Your function will be called
-before any of the other transformations are processed.
-
-You can also set up a pointer to a user structure for use by your
-callback function.
-
- png_set_user_transform_info(png_ptr, user_ptr, 0, 0);
-
-The user_channels and user_depth parameters of this function are ignored
-when writing; you can set them to zero as shown.
-
-You can retrieve the pointer via the function png_get_user_transform_ptr().
-For example:
-
- voidp write_user_transform_ptr =
- png_get_user_transform_ptr(png_ptr);
-
-It is possible to have libpng flush any pending output, either manually,
-or automatically after a certain number of lines have been written. To
-flush the output stream a single time call:
-
- png_write_flush(png_ptr);
-
-and to have libpng flush the output stream periodically after a certain
-number of scanlines have been written, call:
-
- png_set_flush(png_ptr, nrows);
-
-Note that the distance between rows is from the last time png_write_flush()
-was called, or the first row of the image if it has never been called.
-So if you write 50 lines, and then png_set_flush 25, it will flush the
-output on the next scanline, and every 25 lines thereafter, unless
-png_write_flush() is called before 25 more lines have been written.
-If nrows is too small (less than about 10 lines for a 640 pixel wide
-RGB image) the image compression may decrease noticeably (although this
-may be acceptable for real-time applications). Infrequent flushing will
-only degrade the compression performance by a few percent over images
-that do not use flushing.
-
-Writing the image data
-
-That's it for the transformations. Now you can write the image data.
-The simplest way to do this is in one function call. If you have the
-whole image in memory, you can just call png_write_image() and libpng
-will write the image. You will need to pass in an array of pointers to
-each row. This function automatically handles interlacing, so you don't
-need to call png_set_interlace_handling() or call this function multiple
-times, or any of that other stuff necessary with png_write_rows().
-
- png_write_image(png_ptr, row_pointers);
-
-where row_pointers is:
-
- png_byte *row_pointers[height];
-
-You can point to void or char or whatever you use for pixels.
-
-If you don't want to write the whole image at once, you can
-use png_write_rows() instead. If the file is not interlaced,
-this is simple:
-
- png_write_rows(png_ptr, row_pointers,
- number_of_rows);
-
-row_pointers is the same as in the png_write_image() call.
-
-If you are just writing one row at a time, you can do this with
-a single row_pointer instead of an array of row_pointers:
-
- png_bytep row_pointer = row;
-
- png_write_row(png_ptr, row_pointer);
-
-When the file is interlaced, things can get a good deal more
-complicated. The only currently (as of the PNG Specification
-version 1.2, dated July 1999) defined interlacing scheme for PNG files
-is the "Adam7" interlace scheme, that breaks down an
-image into seven smaller images of varying size. libpng will build
-these images for you, or you can do them yourself. If you want to
-build them yourself, see the PNG specification for details of which
-pixels to write when.
-
-If you don't want libpng to handle the interlacing details, just
-use png_set_interlace_handling() and call png_write_rows() the
-correct number of times to write all seven sub-images.
-
-If you want libpng to build the sub-images, call this before you start
-writing any rows:
-
- number_of_passes =
- png_set_interlace_handling(png_ptr);
-
-This will return the number of passes needed. Currently, this
-is seven, but may change if another interlace type is added.
-
-Then write the complete image number_of_passes times.
-
- png_write_rows(png_ptr, row_pointers,
- number_of_rows);
-
-As some of these rows are not used, and thus return immediately,
-you may want to read about interlacing in the PNG specification,
-and only update the rows that are actually used.
-
-Finishing a sequential write
-
-After you are finished writing the image, you should finish writing
-the file. If you are interested in writing comments or time, you should
-pass an appropriately filled png_info pointer. If you are not interested,
-you can pass NULL.
-
- png_write_end(png_ptr, info_ptr);
-
-When you are done, you can free all memory used by libpng like this:
-
- png_destroy_write_struct(&png_ptr, &info_ptr);
-
-It is also possible to individually free the info_ptr members that
-point to libpng-allocated storage with the following function:
-
- png_free_data(png_ptr, info_ptr, mask, seq)
- mask - identifies data to be freed, a mask
- containing the bitwise OR of one or
- more of
- PNG_FREE_PLTE, PNG_FREE_TRNS,
- PNG_FREE_HIST, PNG_FREE_ICCP,
- PNG_FREE_PCAL, PNG_FREE_ROWS,
- PNG_FREE_SCAL, PNG_FREE_SPLT,
- PNG_FREE_TEXT, PNG_FREE_UNKN,
- or simply PNG_FREE_ALL
- seq - sequence number of item to be freed
- (-1 for all items)
-
-This function may be safely called when the relevant storage has
-already been freed, or has not yet been allocated, or was allocated
-by the user and not by libpng, and will in those
-cases do nothing. The "seq" parameter is ignored if only one item
-of the selected data type, such as PLTE, is allowed. If "seq" is not
--1, and multiple items are allowed for the data type identified in
-the mask, such as text or sPLT, only the n'th item in the structure
-is freed, where n is "seq".
-
-If you allocated data such as a palette that you passed
-in to libpng with png_set_*, you must not free it until just before the call to
-png_destroy_write_struct().
-
-The default behavior is only to free data that was allocated internally
-by libpng. This can be changed, so that libpng will not free the data,
-or so that it will free data that was allocated by the user with png_malloc()
-or png_zalloc() and passed in via a png_set_*() function, with
-
- png_data_freer(png_ptr, info_ptr, freer, mask)
- mask - which data elements are affected
- same choices as in png_free_data()
- freer - one of
- PNG_DESTROY_WILL_FREE_DATA
- PNG_SET_WILL_FREE_DATA
- PNG_USER_WILL_FREE_DATA
-
-For example, to transfer responsibility for some data from a read structure
-to a write structure, you could use
-
- png_data_freer(read_ptr, read_info_ptr,
- PNG_USER_WILL_FREE_DATA,
- PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST)
- png_data_freer(write_ptr, write_info_ptr,
- PNG_DESTROY_WILL_FREE_DATA,
- PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST)
-
-thereby briefly reassigning responsibility for freeing to the user but
-immediately afterwards reassigning it once more to the write_destroy
-function. Having done this, it would then be safe to destroy the read
-structure and continue to use the PLTE, tRNS, and hIST data in the write
-structure.
-
-This function only affects data that has already been allocated.
-You can call this function before calling after the png_set_*() functions
-to control whether the user or png_destroy_*() is supposed to free the data.
-When the user assumes responsibility for libpng-allocated data, the
-application must use
-png_free() to free it, and when the user transfers responsibility to libpng
-for data that the user has allocated, the user must have used png_malloc()
-or png_zalloc() to allocate it.
-
-If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword
-separately, do not transfer responsibility for freeing text_ptr to libpng,
-because when libpng fills a png_text structure it combines these members with
-the key member, and png_free_data() will free only text_ptr.key. Similarly,
-if you transfer responsibility for free'ing text_ptr from libpng to your
-application, your application must not separately free those members.
-For a more compact example of writing a PNG image, see the file example.c.
-
-V. Modifying/Customizing libpng:
-
-There are two issues here. The first is changing how libpng does
-standard things like memory allocation, input/output, and error handling.
-The second deals with more complicated things like adding new chunks,
-adding new transformations, and generally changing how libpng works.
-Both of those are compile-time issues; that is, they are generally
-determined at the time the code is written, and there is rarely a need
-to provide the user with a means of changing them.
-
-Memory allocation, input/output, and error handling
-
-All of the memory allocation, input/output, and error handling in libpng
-goes through callbacks that are user-settable. The default routines are
-in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change
-these functions, call the appropriate png_set_*_fn() function.
-
-Memory allocation is done through the functions png_malloc()
-and png_free(). These currently just call the standard C functions. If
-your pointers can't access more then 64K at a time, you will want to set
-MAXSEG_64K in zlib.h. Since it is unlikely that the method of handling
-memory allocation on a platform will change between applications, these
-functions must be modified in the library at compile time. If you prefer
-to use a different method of allocating and freeing data, you can use
-png_create_read_struct_2() or png_create_write_struct_2() to register
-your own functions as described above.
-These functions also provide a void pointer that can be retrieved via
-
- mem_ptr=png_get_mem_ptr(png_ptr);
-
-Your replacement memory functions must have prototypes as follows:
-
- png_voidp malloc_fn(png_structp png_ptr,
- png_size_t size);
- void free_fn(png_structp png_ptr, png_voidp ptr);
-
-Your malloc_fn() must return NULL in case of failure. The png_malloc()
-function will normally call png_error() if it receives a NULL from the
-system memory allocator or from your replacement malloc_fn().
-
-Your free_fn() will never be called with a NULL ptr, since libpng's
-png_free() checks for NULL before calling free_fn().
-
-Input/Output in libpng is done through png_read() and png_write(),
-which currently just call fread() and fwrite(). The FILE * is stored in
-png_struct and is initialized via png_init_io(). If you wish to change
-the method of I/O, the library supplies callbacks that you can set
-through the function png_set_read_fn() and png_set_write_fn() at run
-time, instead of calling the png_init_io() function. These functions
-also provide a void pointer that can be retrieved via the function
-png_get_io_ptr(). For example:
-
- png_set_read_fn(png_structp read_ptr,
- voidp read_io_ptr, png_rw_ptr read_data_fn)
-
- png_set_write_fn(png_structp write_ptr,
- voidp write_io_ptr, png_rw_ptr write_data_fn,
- png_flush_ptr output_flush_fn);
-
- voidp read_io_ptr = png_get_io_ptr(read_ptr);
- voidp write_io_ptr = png_get_io_ptr(write_ptr);
-
-The replacement I/O functions must have prototypes as follows:
-
- void user_read_data(png_structp png_ptr,
- png_bytep data, png_size_t length);
- void user_write_data(png_structp png_ptr,
- png_bytep data, png_size_t length);
- void user_flush_data(png_structp png_ptr);
-
-The user_read_data() function is responsible for detecting and
-handling end-of-data errors.
-
-Supplying NULL for the read, write, or flush functions sets them back
-to using the default C stream functions, which expect the io_ptr to
-point to a standard *FILE structure. It is probably a mistake
-to use NULL for one of write_data_fn and output_flush_fn but not both
-of them, unless you have built libpng with PNG_NO_WRITE_FLUSH defined.
-It is an error to read from a write stream, and vice versa.
-
-Error handling in libpng is done through png_error() and png_warning().
-Errors handled through png_error() are fatal, meaning that png_error()
-should never return to its caller. Currently, this is handled via
-setjmp() and longjmp() (unless you have compiled libpng with
-PNG_SETJMP_NOT_SUPPORTED, in which case it is handled via PNG_ABORT()),
-but you could change this to do things like exit() if you should wish.
-
-On non-fatal errors, png_warning() is called
-to print a warning message, and then control returns to the calling code.
-By default png_error() and png_warning() print a message on stderr via
-fprintf() unless the library is compiled with PNG_NO_CONSOLE_IO defined
-(because you don't want the messages) or PNG_NO_STDIO defined (because
-fprintf() isn't available). If you wish to change the behavior of the error
-functions, you will need to set up your own message callbacks. These
-functions are normally supplied at the time that the png_struct is created.
-It is also possible to redirect errors and warnings to your own replacement
-functions after png_create_*_struct() has been called by calling:
-
- png_set_error_fn(png_structp png_ptr,
- png_voidp error_ptr, png_error_ptr error_fn,
- png_error_ptr warning_fn);
-
- png_voidp error_ptr = png_get_error_ptr(png_ptr);
-
-If NULL is supplied for either error_fn or warning_fn, then the libpng
-default function will be used, calling fprintf() and/or longjmp() if a
-problem is encountered. The replacement error functions should have
-parameters as follows:
-
- void user_error_fn(png_structp png_ptr,
- png_const_charp error_msg);
- void user_warning_fn(png_structp png_ptr,
- png_const_charp warning_msg);
-
-The motivation behind using setjmp() and longjmp() is the C++ throw and
-catch exception handling methods. This makes the code much easier to write,
-as there is no need to check every return code of every function call.
-However, there are some uncertainties about the status of local variables
-after a longjmp, so the user may want to be careful about doing anything after
-setjmp returns non-zero besides returning itself. Consult your compiler
-documentation for more details. For an alternative approach, you may wish
-to use the "cexcept" facility (see http://cexcept.sourceforge.net).
-
-Custom chunks
-
-If you need to read or write custom chunks, you may need to get deeper
-into the libpng code. The library now has mechanisms for storing
-and writing chunks of unknown type; you can even declare callbacks
-for custom chunks. However, this may not be good enough if the
-library code itself needs to know about interactions between your
-chunk and existing `intrinsic' chunks.
-
-If you need to write a new intrinsic chunk, first read the PNG
-specification. Acquire a first level of
-understanding of how it works. Pay particular attention to the
-sections that describe chunk names, and look at how other chunks were
-designed, so you can do things similarly. Second, check out the
-sections of libpng that read and write chunks. Try to find a chunk
-that is similar to yours and use it as a template. More details can
-be found in the comments inside the code. It is best to handle unknown
-chunks in a generic method, via callback functions, instead of by
-modifying libpng functions.
-
-If you wish to write your own transformation for the data, look through
-the part of the code that does the transformations, and check out some of
-the simpler ones to get an idea of how they work. Try to find a similar
-transformation to the one you want to add and copy off of it. More details
-can be found in the comments inside the code itself.
-
-Configuring for 16 bit platforms
-
-You will want to look into zconf.h to tell zlib (and thus libpng) that
-it cannot allocate more then 64K at a time. Even if you can, the memory
-won't be accessible. So limit zlib and libpng to 64K by defining MAXSEG_64K.
-
-Configuring for DOS
-
-For DOS users who only have access to the lower 640K, you will
-have to limit zlib's memory usage via a png_set_compression_mem_level()
-call. See zlib.h or zconf.h in the zlib library for more information.
-
-Configuring for Medium Model
-
-Libpng's support for medium model has been tested on most of the popular
-compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets
-defined, and FAR gets defined to far in pngconf.h, and you should be
-all set. Everything in the library (except for zlib's structure) is
-expecting far data. You must use the typedefs with the p or pp on
-the end for pointers (or at least look at them and be careful). Make
-note that the rows of data are defined as png_bytepp, which is an
-unsigned char far * far *.
-
-Configuring for gui/windowing platforms:
-
-You will need to write new error and warning functions that use the GUI
-interface, as described previously, and set them to be the error and
-warning functions at the time that png_create_*_struct() is called,
-in order to have them available during the structure initialization.
-They can be changed later via png_set_error_fn(). On some compilers,
-you may also have to change the memory allocators (png_malloc, etc.).
-
-Configuring for compiler xxx:
-
-All includes for libpng are in pngconf.h. If you need to add, change
-or delete an include, this is the place to do it.
-The includes that are not needed outside libpng are protected by the
-PNG_INTERNAL definition, which is only defined for those routines inside
-libpng itself. The files in libpng proper only include png.h, which
-includes pngconf.h.
-
-Configuring zlib:
-
-There are special functions to configure the compression. Perhaps the
-most useful one changes the compression level, which currently uses
-input compression values in the range 0 - 9. The library normally
-uses the default compression level (Z_DEFAULT_COMPRESSION = 6). Tests
-have shown that for a large majority of images, compression values in
-the range 3-6 compress nearly as well as higher levels, and do so much
-faster. For online applications it may be desirable to have maximum speed
-(Z_BEST_SPEED = 1). With versions of zlib after v0.99, you can also
-specify no compression (Z_NO_COMPRESSION = 0), but this would create
-files larger than just storing the raw bitmap. You can specify the
-compression level by calling:
-
- png_set_compression_level(png_ptr, level);
-
-Another useful one is to reduce the memory level used by the library.
-The memory level defaults to 8, but it can be lowered if you are
-short on memory (running DOS, for example, where you only have 640K).
-Note that the memory level does have an effect on compression; among
-other things, lower levels will result in sections of incompressible
-data being emitted in smaller stored blocks, with a correspondingly
-larger relative overhead of up to 15% in the worst case.
-
- png_set_compression_mem_level(png_ptr, level);
-
-The other functions are for configuring zlib. They are not recommended
-for normal use and may result in writing an invalid PNG file. See
-zlib.h for more information on what these mean.
-
- png_set_compression_strategy(png_ptr,
- strategy);
- png_set_compression_window_bits(png_ptr,
- window_bits);
- png_set_compression_method(png_ptr, method);
- png_set_compression_buffer_size(png_ptr, size);
-
-Controlling row filtering
-
-If you want to control whether libpng uses filtering or not, which
-filters are used, and how it goes about picking row filters, you
-can call one of these functions. The selection and configuration
-of row filters can have a significant impact on the size and
-encoding speed and a somewhat lesser impact on the decoding speed
-of an image. Filtering is enabled by default for RGB and grayscale
-images (with and without alpha), but not for paletted images nor
-for any images with bit depths less than 8 bits/pixel.
-
-The 'method' parameter sets the main filtering method, which is
-currently only '0' in the PNG 1.2 specification. The 'filters'
-parameter sets which filter(s), if any, should be used for each
-scanline. Possible values are PNG_ALL_FILTERS and PNG_NO_FILTERS
-to turn filtering on and off, respectively.
-
-Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB,
-PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise
-ORed together with '|' to specify one or more filters to use.
-These filters are described in more detail in the PNG specification.
-If you intend to change the filter type during the course of writing
-the image, you should start with flags set for all of the filters
-you intend to use so that libpng can initialize its internal
-structures appropriately for all of the filter types. (Note that this
-means the first row must always be adaptively filtered, because libpng
-currently does not allocate the filter buffers until png_write_row()
-is called for the first time.)
-
- filters = PNG_FILTER_NONE | PNG_FILTER_SUB
- PNG_FILTER_UP | PNG_FILTER_AVG |
- PNG_FILTER_PAETH | PNG_ALL_FILTERS;
-
- png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE,
- filters);
- The second parameter can also be
- PNG_INTRAPIXEL_DIFFERENCING if you are
- writing a PNG to be embedded in a MNG
- datastream. This parameter must be the
- same as the value of filter_method used
- in png_set_IHDR().
-
-It is also possible to influence how libpng chooses from among the
-available filters. This is done in one or both of two ways - by
-telling it how important it is to keep the same filter for successive
-rows, and by telling it the relative computational costs of the filters.
-
- double weights[3] = {1.5, 1.3, 1.1},
- costs[PNG_FILTER_VALUE_LAST] =
- {1.0, 1.3, 1.3, 1.5, 1.7};
-
- png_set_filter_heuristics(png_ptr,
- PNG_FILTER_HEURISTIC_WEIGHTED, 3,
- weights, costs);
-
-The weights are multiplying factors that indicate to libpng that the
-row filter should be the same for successive rows unless another row filter
-is that many times better than the previous filter. In the above example,
-if the previous 3 filters were SUB, SUB, NONE, the SUB filter could have a
-"sum of absolute differences" 1.5 x 1.3 times higher than other filters
-and still be chosen, while the NONE filter could have a sum 1.1 times
-higher than other filters and still be chosen. Unspecified weights are
-taken to be 1.0, and the specified weights should probably be declining
-like those above in order to emphasize recent filters over older filters.
-
-The filter costs specify for each filter type a relative decoding cost
-to be considered when selecting row filters. This means that filters
-with higher costs are less likely to be chosen over filters with lower
-costs, unless their "sum of absolute differences" is that much smaller.
-The costs do not necessarily reflect the exact computational speeds of
-the various filters, since this would unduly influence the final image
-size.
-
-Note that the numbers above were invented purely for this example and
-are given only to help explain the function usage. Little testing has
-been done to find optimum values for either the costs or the weights.
-
-Removing unwanted object code
-
-There are a bunch of #define's in pngconf.h that control what parts of
-libpng are compiled. All the defines end in _SUPPORTED. If you are
-never going to use a capability, you can change the #define to #undef
-before recompiling libpng and save yourself code and data space, or
-you can turn off individual capabilities with defines that begin with
-PNG_NO_.
-
-You can also turn all of the transforms and ancillary chunk capabilities
-off en masse with compiler directives that define
-PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS,
-or all four,
-along with directives to turn on any of the capabilities that you do
-want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable
-the extra transformations but still leave the library fully capable of reading
-and writing PNG files with all known public chunks
-Use of the PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive
-produces a library that is incapable of reading or writing ancillary chunks.
-If you are not using the progressive reading capability, you can
-turn that off with PNG_NO_PROGRESSIVE_READ (don't confuse
-this with the INTERLACING capability, which you'll still have).
-
-All the reading and writing specific code are in separate files, so the
-linker should only grab the files it needs. However, if you want to
-make sure, or if you are building a stand alone library, all the
-reading files start with pngr and all the writing files start with
-pngw. The files that don't match either (like png.c, pngtrans.c, etc.)
-are used for both reading and writing, and always need to be included.
-The progressive reader is in pngpread.c
-
-If you are creating or distributing a dynamically linked library (a .so
-or DLL file), you should not remove or disable any parts of the library,
-as this will cause applications linked with different versions of the
-library to fail if they call functions not available in your library.
-The size of the library itself should not be an issue, because only
-those sections that are actually used will be loaded into memory.
-
-Requesting debug printout
-
-The macro definition PNG_DEBUG can be used to request debugging
-printout. Set it to an integer value in the range 0 to 3. Higher
-numbers result in increasing amounts of debugging information. The
-information is printed to the "stderr" file, unless another file
-name is specified in the PNG_DEBUG_FILE macro definition.
-
-When PNG_DEBUG > 0, the following functions (macros) become available:
-
- png_debug(level, message)
- png_debug1(level, message, p1)
- png_debug2(level, message, p1, p2)
-
-in which "level" is compared to PNG_DEBUG to decide whether to print
-the message, "message" is the formatted string to be printed,
-and p1 and p2 are parameters that are to be embedded in the string
-according to printf-style formatting directives. For example,
-
- png_debug1(2, "foo=%d\n", foo);
-
-is expanded to
-
- if(PNG_DEBUG > 2)
- fprintf(PNG_DEBUG_FILE, "foo=%d\n", foo);
-
-When PNG_DEBUG is defined but is zero, the macros aren't defined, but you
-can still use PNG_DEBUG to control your own debugging:
-
- #ifdef PNG_DEBUG
- fprintf(stderr, ...
- #endif
-
-When PNG_DEBUG = 1, the macros are defined, but only png_debug statements
-having level = 0 will be printed. There aren't any such statements in
-this version of libpng, but if you insert some they will be printed.
-
-VI. MNG support
-
-The MNG specification (available at http://www.libpng.org/pub/mng) allows
-certain extensions to PNG for PNG images that are embedded in MNG datastreams.
-Libpng can support some of these extensions. To enable them, use the
-png_permit_mng_features() function:
-
- feature_set = png_permit_mng_features(png_ptr, mask)
- mask is a png_uint_32 containing the bitwise OR of the
- features you want to enable. These include
- PNG_FLAG_MNG_EMPTY_PLTE
- PNG_FLAG_MNG_FILTER_64
- PNG_ALL_MNG_FEATURES
- feature_set is a png_uint_32 that is the bitwise AND of
- your mask with the set of MNG features that is
- supported by the version of libpng that you are using.
-
-It is an error to use this function when reading or writing a standalone
-PNG file with the PNG 8-byte signature. The PNG datastream must be wrapped
-in a MNG datastream. As a minimum, it must have the MNG 8-byte signature
-and the MHDR and MEND chunks. Libpng does not provide support for these
-or any other MNG chunks; your application must provide its own support for
-them. You may wish to consider using libmng (available at
-http://www.libmng.com) instead.
-
-VII. Changes to Libpng from version 0.88
-
-It should be noted that versions of libpng later than 0.96 are not
-distributed by the original libpng author, Guy Schalnat, nor by
-Andreas Dilger, who had taken over from Guy during 1996 and 1997, and
-distributed versions 0.89 through 0.96, but rather by another member
-of the original PNG Group, Glenn Randers-Pehrson. Guy and Andreas are
-still alive and well, but they have moved on to other things.
-
-The old libpng functions png_read_init(), png_write_init(),
-png_info_init(), png_read_destroy(), and png_write_destroy() have been
-moved to PNG_INTERNAL in version 0.95 to discourage their use. These
-functions will be removed from libpng version 2.0.0.
-
-The preferred method of creating and initializing the libpng structures is
-via the png_create_read_struct(), png_create_write_struct(), and
-png_create_info_struct() because they isolate the size of the structures
-from the application, allow version error checking, and also allow the
-use of custom error handling routines during the initialization, which
-the old functions do not. The functions png_read_destroy() and
-png_write_destroy() do not actually free the memory that libpng
-allocated for these structs, but just reset the data structures, so they
-can be used instead of png_destroy_read_struct() and
-png_destroy_write_struct() if you feel there is too much system overhead
-allocating and freeing the png_struct for each image read.
-
-Setting the error callbacks via png_set_message_fn() before
-png_read_init() as was suggested in libpng-0.88 is no longer supported
-because this caused applications that do not use custom error functions
-to fail if the png_ptr was not initialized to zero. It is still possible
-to set the error callbacks AFTER png_read_init(), or to change them with
-png_set_error_fn(), which is essentially the same function, but with a new
-name to force compilation errors with applications that try to use the old
-method.
-
-Starting with version 1.0.7, you can find out which version of the library
-you are using at run-time:
-
- png_uint_32 libpng_vn = png_access_version_number();
-
-The number libpng_vn is constructed from the major version, minor
-version with leading zero, and release number with leading zero,
-(e.g., libpng_vn for version 1.0.7 is 10007).
-
-You can also check which version of png.h you used when compiling your
-application:
-
- png_uint_32 application_vn = PNG_LIBPNG_VER;
-
-VIII. Changes to Libpng from version 1.0.x to 1.2.x
-
-Support for user memory management was enabled by default. To
-accomplish this, the functions png_create_read_struct_2(),
-png_create_write_struct_2(), png_set_mem_fn(), png_get_mem_ptr(),
-png_malloc_default(), and png_free_default() were added.
-
-Support for certain MNG features was enabled.
-
-Support for numbered error messages was added. However, we never got
-around to actually numbering the error messages. The function
-png_set_strip_error_numbers() was added (Note: the prototype for this
-function was inadvertently removed from png.h in PNG_NO_ASSEMBLER_CODE
-builds of libpng-1.2.15. It was restored in libpng-1.2.36).
-
-The png_malloc_warn() function was added at libpng-1.2.3. This issues
-a png_warning and returns NULL instead of aborting when it fails to
-acquire the requested memory allocation.
-
-Support for setting user limits on image width and height was enabled
-by default. The functions png_set_user_limits(), png_get_user_width_max(),
-and png_get_user_height_max() were added at libpng-1.2.6.
-
-The png_set_add_alpha() function was added at libpng-1.2.7.
-
-The function png_set_expand_gray_1_2_4_to_8() was added at libpng-1.2.9.
-Unlike png_set_gray_1_2_4_to_8(), the new function does not expand the
-tRNS chunk to alpha. The png_set_gray_1_2_4_to_8() function is
-deprecated.
-
-A number of macro definitions in support of runtime selection of
-assembler code features (especially Intel MMX code support) were
-added at libpng-1.2.0:
-
- PNG_ASM_FLAG_MMX_SUPPORT_COMPILED
- PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU
- PNG_ASM_FLAG_MMX_READ_COMBINE_ROW
- PNG_ASM_FLAG_MMX_READ_INTERLACE
- PNG_ASM_FLAG_MMX_READ_FILTER_SUB
- PNG_ASM_FLAG_MMX_READ_FILTER_UP
- PNG_ASM_FLAG_MMX_READ_FILTER_AVG
- PNG_ASM_FLAG_MMX_READ_FILTER_PAETH
- PNG_ASM_FLAGS_INITIALIZED
- PNG_MMX_READ_FLAGS
- PNG_MMX_FLAGS
- PNG_MMX_WRITE_FLAGS
- PNG_MMX_FLAGS
-
-We added the following functions in support of runtime
-selection of assembler code features:
-
- png_get_mmx_flagmask()
- png_set_mmx_thresholds()
- png_get_asm_flags()
- png_get_mmx_bitdepth_threshold()
- png_get_mmx_rowbytes_threshold()
- png_set_asm_flags()
-
-We replaced all of these functions with simple stubs in libpng-1.2.20,
-when the Intel assembler code was removed due to a licensing issue.
-
-IX. (Omitted)
-
-X. Detecting libpng
-
-The png_get_io_ptr() function has been present since libpng-0.88, has never
-changed, and is unaffected by conditional compilation macros. It is the
-best choice for use in configure scripts for detecting the presence of any
-libpng version since 0.88. In an autoconf "configure.in" you could use
-
- AC_CHECK_LIB(png, png_get_io_ptr, ...
-
-XI. Source code repository
-
-Since about February 2009, version 1.2.34, libpng has been under "git" source
-control. The git repository was built from old libpng-x.y.z.tar.gz files
-going back to version 0.70. You can access the git repository (read only)
-at
-
- git://libpng.git.sourceforge.net/gitroot/libpng
-
-or you can browse it via "gitweb" at
-
- http://libpng.git.sourceforge.net/git/gitweb.cgi?p=libpng
-
-Patches can be sent to glennrp at users.sourceforge.net or to
-png-mng-implement at lists.sourceforge.net or you can upload them to
-the libpng bug tracker at
-
- http://libpng.sourceforge.net
-
-XII. Coding style
-
-Our coding style is similar to the "Allman" style, with curly
-braces on separate lines:
-
- if (condition)
- {
- action;
- }
-
- else if (another condition)
- {
- another action;
- }
-
-The braces can be omitted from simple one-line actions:
-
- if (condition)
- return (0);
-
-We use 3-space indentation, except for continued statements which
-are usually indented the same as the first line of the statement
-plus four more spaces.
-
-Comments appear with the leading "/*" at the same indentation as
-the statement that follows the comment:
-
- /* Single-line comment */
- statement;
-
- /* Multiple-line
- * comment
- */
- statement;
-
-Very short comments can be placed at the end of the statement
-to which they pertain:
-
- statement; /* comment */
-
-We don't use C++ style ("//") comments. We have, however,
-used them in the past in some now-abandoned MMX assembler
-code.
-
-Functions and their curly braces are not indented, and
-exported functions are marked with PNGAPI:
-
- /* This is a public function that is visible to
- * application programers. It does thus-and-so.
- */
- void PNGAPI
- png_exported_function(png_ptr, png_info, foo)
- {
- body;
- }
-
-The prototypes for all exported functions appear in png.h,
-above the comment that says
-
- /* Maintainer: Put new public prototypes here ... */
-
-We mark all non-exported functions with "/* PRIVATE */"":
-
- void /* PRIVATE */
- png_non_exported_function(png_ptr, png_info, foo)
- {
- body;
- }
-
-The prototypes for non-exported functions (except for those in
-pngtest) appear in
-the PNG_INTERNAL section of png.h
-above the comment that says
-
- /* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
-
-The names of all exported functions and variables begin
-with "png_", and all publicly visible C preprocessor
-macros begin with "PNG_".
-
-We put a space after each comma and after each semicolon
-in "for" statments, and we put spaces before and after each
-C binary operator and after "for" or "while". We don't
-put a space between a typecast and the expression being
-cast, nor do we put one between a function name and the
-left parenthesis that follows it:
-
- for (i = 2; i > 0; --i)
- x[i] = a(x) + (int)b;
-
-We prefer #ifdef and #ifndef to #if defined() and if !defined()
-when there is only one macro being tested.
-
-Other rules can be inferred by inspecting the libpng
-source.
-
-XIII. Y2K Compliance in libpng
-
-September 10, 2009
-
-Since the PNG Development group is an ad-hoc body, we can't make
-an official declaration.
-
-This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.2.40 are Y2K compliant. It is my belief that earlier
-versions were also Y2K compliant.
-
-Libpng only has three year fields. One is a 2-byte unsigned integer that
-will hold years up to 65535. The other two hold the date in text
-format, and will hold years up to 9999.
-
-The integer is
- "png_uint_16 year" in png_time_struct.
-
-The strings are
- "png_charp time_buffer" in png_struct and
- "near_time_buffer", which is a local character string in png.c.
-
-There are seven time-related functions:
-
- png_convert_to_rfc_1123() in png.c
- (formerly png_convert_to_rfc_1152() in error)
- png_convert_from_struct_tm() in pngwrite.c, called
- in pngwrite.c
- png_convert_from_time_t() in pngwrite.c
- png_get_tIME() in pngget.c
- png_handle_tIME() in pngrutil.c, called in pngread.c
- png_set_tIME() in pngset.c
- png_write_tIME() in pngwutil.c, called in pngwrite.c
-
-All appear to handle dates properly in a Y2K environment. The
-png_convert_from_time_t() function calls gmtime() to convert from system
-clock time, which returns (year - 1900), which we properly convert to
-the full 4-digit year. There is a possibility that applications using
-libpng are not passing 4-digit years into the png_convert_to_rfc_1123()
-function, or that they are incorrectly passing only a 2-digit year
-instead of "year - 1900" into the png_convert_from_struct_tm() function,
-but this is not under our control. The libpng documentation has always
-stated that it works with 4-digit years, and the APIs have been
-documented as such.
-
-The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned
-integer to hold the year, and can hold years as large as 65535.
-
-zlib, upon which libpng depends, is also Y2K compliant. It contains
-no date-related code.
-
-
- Glenn Randers-Pehrson
- libpng maintainer
- PNG Development Group
diff --git a/src/3rdparty/libpng/libpng-1.4.0.txt b/src/3rdparty/libpng/libpng-1.4.0.txt
new file mode 100644
index 0000000000..3da0aa88df
--- /dev/null
+++ b/src/3rdparty/libpng/libpng-1.4.0.txt
@@ -0,0 +1,3277 @@
+libpng.txt - A description on how to use and modify libpng
+
+ libpng version 1.4.0 - January 3, 2010
+ Updated and distributed by Glenn Randers-Pehrson
+ <glennrp at users.sourceforge.net>
+ Copyright (c) 1998-2009 Glenn Randers-Pehrson
+
+ This document is released under the libpng license.
+ For conditions of distribution and use, see the disclaimer
+ and license in png.h
+
+ Based on:
+
+ libpng versions 0.97, January 1998, through 1.4.0 - January 3, 2010
+ Updated and distributed by Glenn Randers-Pehrson
+ Copyright (c) 1998-2009 Glenn Randers-Pehrson
+
+ libpng 1.0 beta 6 version 0.96 May 28, 1997
+ Updated and distributed by Andreas Dilger
+ Copyright (c) 1996, 1997 Andreas Dilger
+
+ libpng 1.0 beta 2 - version 0.88 January 26, 1996
+ For conditions of distribution and use, see copyright
+ notice in png.h. Copyright (c) 1995, 1996 Guy Eric
+ Schalnat, Group 42, Inc.
+
+ Updated/rewritten per request in the libpng FAQ
+ Copyright (c) 1995, 1996 Frank J. T. Wojcik
+ December 18, 1995 & January 20, 1996
+
+I. Introduction
+
+This file describes how to use and modify the PNG reference library
+(known as libpng) for your own use. There are five sections to this
+file: introduction, structures, reading, writing, and modification and
+configuration notes for various special platforms. In addition to this
+file, example.c is a good starting point for using the library, as
+it is heavily commented and should include everything most people
+will need. We assume that libpng is already installed; see the
+INSTALL file for instructions on how to install libpng.
+
+For examples of libpng usage, see the files "example.c", "pngtest.c",
+and the files in the "contrib" directory, all of which are included in
+the libpng distribution.
+
+Libpng was written as a companion to the PNG specification, as a way
+of reducing the amount of time and effort it takes to support the PNG
+file format in application programs.
+
+The PNG specification (second edition), November 2003, is available as
+a W3C Recommendation and as an ISO Standard (ISO/IEC 15948:2003 (E)) at
+<http://www.w3.org/TR/2003/REC-PNG-20031110/
+The W3C and ISO documents have identical technical content.
+
+The PNG-1.2 specification is available at
+<http://www.libpng.org/pub/png/documents/>. It is technically equivalent
+to the PNG specification (second edition) but has some additional material.
+
+The PNG-1.0 specification is available
+as RFC 2083 <http://www.libpng.org/pub/png/documents/> and as a
+W3C Recommendation <http://www.w3.org/TR/REC.png.html>.
+
+Some additional chunks are described in the special-purpose public chunks
+documents at <http://www.libpng.org/pub/png/documents/>.
+
+Other information
+about PNG, and the latest version of libpng, can be found at the PNG home
+page, <http://www.libpng.org/pub/png/>.
+
+Most users will not have to modify the library significantly; advanced
+users may want to modify it more. All attempts were made to make it as
+complete as possible, while keeping the code easy to understand.
+Currently, this library only supports C. Support for other languages
+is being considered.
+
+Libpng has been designed to handle multiple sessions at one time,
+to be easily modifiable, to be portable to the vast majority of
+machines (ANSI, K&R, 16-, 32-, and 64-bit) available, and to be easy
+to use. The ultimate goal of libpng is to promote the acceptance of
+the PNG file format in whatever way possible. While there is still
+work to be done (see the TODO file), libpng should cover the
+majority of the needs of its users.
+
+Libpng uses zlib for its compression and decompression of PNG files.
+Further information about zlib, and the latest version of zlib, can
+be found at the zlib home page, <http://www.info-zip.org/pub/infozip/zlib/>.
+The zlib compression utility is a general purpose utility that is
+useful for more than PNG files, and can be used without libpng.
+See the documentation delivered with zlib for more details.
+You can usually find the source files for the zlib utility wherever you
+find the libpng source files.
+
+Libpng is thread safe, provided the threads are using different
+instances of the structures. Each thread should have its own
+png_struct and png_info instances, and thus its own image.
+Libpng does not protect itself against two threads using the
+same instance of a structure.
+
+II. Structures
+
+There are two main structures that are important to libpng, png_struct
+and png_info. The first, png_struct, is an internal structure that
+will not, for the most part, be used by a user except as the first
+variable passed to every libpng function call.
+
+The png_info structure is designed to provide information about the
+PNG file. At one time, the fields of png_info were intended to be
+directly accessible to the user. However, this tended to cause problems
+with applications using dynamically loaded libraries, and as a result
+a set of interface functions for png_info (the png_get_*() and png_set_*()
+functions) was developed. The fields of png_info are still available for
+older applications, but it is suggested that applications use the new
+interfaces if at all possible.
+
+Applications that do make direct access to the members of png_struct (except
+for png_ptr->jmpbuf) must be recompiled whenever the library is updated,
+and applications that make direct access to the members of png_info must
+be recompiled if they were compiled or loaded with libpng version 1.0.6,
+in which the members were in a different order. In version 1.0.7, the
+members of the png_info structure reverted to the old order, as they were
+in versions 0.97c through 1.0.5. Starting with version 2.0.0, both
+structures are going to be hidden, and the contents of the structures will
+only be accessible through the png_get/png_set functions.
+
+The png.h header file is an invaluable reference for programming with libpng.
+And while I'm on the topic, make sure you include the libpng header file:
+
+#include <png.h>
+
+III. Reading
+
+We'll now walk you through the possible functions to call when reading
+in a PNG file sequentially, briefly explaining the syntax and purpose
+of each one. See example.c and png.h for more detail. While
+progressive reading is covered in the next section, you will still
+need some of the functions discussed in this section to read a PNG
+file.
+
+Setup
+
+You will want to do the I/O initialization(*) before you get into libpng,
+so if it doesn't work, you don't have much to undo. Of course, you
+will also want to insure that you are, in fact, dealing with a PNG
+file. Libpng provides a simple check to see if a file is a PNG file.
+To use it, pass in the first 1 to 8 bytes of the file to the function
+png_sig_cmp(), and it will return 0 (false) if the bytes match the
+corresponding bytes of the PNG signature, or nonzero (true) otherwise.
+Of course, the more bytes you pass in, the greater the accuracy of the
+prediction.
+
+If you are intending to keep the file pointer open for use in libpng,
+you must ensure you don't read more than 8 bytes from the beginning
+of the file, and you also have to make a call to png_set_sig_bytes_read()
+with the number of bytes you read from the beginning. Libpng will
+then only check the bytes (if any) that your program didn't read.
+
+(*): If you are not using the standard I/O functions, you will need
+to replace them with custom functions. See the discussion under
+Customizing libpng.
+
+
+ FILE *fp = fopen(file_name, "rb");
+ if (!fp)
+ {
+ return (ERROR);
+ }
+ fread(header, 1, number, fp);
+ is_png = !png_sig_cmp(header, 0, number);
+ if (!is_png)
+ {
+ return (NOT_PNG);
+ }
+
+
+Next, png_struct and png_info need to be allocated and initialized. In
+order to ensure that the size of these structures is correct even with a
+dynamically linked libpng, there are functions to initialize and
+allocate the structures. We also pass the library version, optional
+pointers to error handling functions, and a pointer to a data struct for
+use by the error functions, if necessary (the pointer and functions can
+be NULL if the default error handlers are to be used). See the section
+on Changes to Libpng below regarding the old initialization functions.
+The structure allocation functions quietly return NULL if they fail to
+create the structure, so your application should check for that.
+
+ png_structp png_ptr = png_create_read_struct
+ (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
+ user_error_fn, user_warning_fn);
+ if (!png_ptr)
+ return (ERROR);
+
+ png_infop info_ptr = png_create_info_struct(png_ptr);
+ if (!info_ptr)
+ {
+ png_destroy_read_struct(&png_ptr,
+ (png_infopp)NULL, (png_infopp)NULL);
+ return (ERROR);
+ }
+
+ png_infop end_info = png_create_info_struct(png_ptr);
+ if (!end_info)
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr,
+ (png_infopp)NULL);
+ return (ERROR);
+ }
+
+If you want to use your own memory allocation routines,
+define PNG_USER_MEM_SUPPORTED and use
+png_create_read_struct_2() instead of png_create_read_struct():
+
+ png_structp png_ptr = png_create_read_struct_2
+ (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
+ user_error_fn, user_warning_fn, (png_voidp)
+ user_mem_ptr, user_malloc_fn, user_free_fn);
+
+The error handling routines passed to png_create_read_struct()
+and the memory alloc/free routines passed to png_create_struct_2()
+are only necessary if you are not using the libpng supplied error
+handling and memory alloc/free functions.
+
+When libpng encounters an error, it expects to longjmp back
+to your routine. Therefore, you will need to call setjmp and pass
+your png_jmpbuf(png_ptr). If you read the file from different
+routines, you will need to update the jmpbuf field every time you enter
+a new routine that will call a png_*() function.
+
+See your documentation of setjmp/longjmp for your compiler for more
+information on setjmp/longjmp. See the discussion on libpng error
+handling in the Customizing Libpng section below for more information
+on the libpng error handling. If an error occurs, and libpng longjmp's
+back to your setjmp, you will want to call png_destroy_read_struct() to
+free any memory.
+
+ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr,
+ &end_info);
+ fclose(fp);
+ return (ERROR);
+ }
+
+If you would rather avoid the complexity of setjmp/longjmp issues,
+you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case
+errors will result in a call to PNG_ABORT() which defaults to abort().
+
+Now you need to set up the input code. The default for libpng is to
+use the C function fread(). If you use this, you will need to pass a
+valid FILE * in the function png_init_io(). Be sure that the file is
+opened in binary mode. If you wish to handle reading data in another
+way, you need not call the png_init_io() function, but you must then
+implement the libpng I/O methods discussed in the Customizing Libpng
+section below.
+
+ png_init_io(png_ptr, fp);
+
+If you had previously opened the file and read any of the signature from
+the beginning in order to see if this was a PNG file, you need to let
+libpng know that there are some bytes missing from the start of the file.
+
+ png_set_sig_bytes(png_ptr, number);
+
+Setting up callback code
+
+You can set up a callback function to handle any unknown chunks in the
+input stream. You must supply the function
+
+ read_chunk_callback(png_ptr ptr,
+ png_unknown_chunkp chunk);
+ {
+ /* The unknown chunk structure contains your
+ chunk data, along with similar data for any other
+ unknown chunks: */
+
+ png_byte name[5];
+ png_byte *data;
+ png_size_t size;
+
+ /* Note that libpng has already taken care of
+ the CRC handling */
+
+ /* put your code here. Search for your chunk in the
+ unknown chunk structure, process it, and return one
+ of the following: */
+
+ return (-n); /* chunk had an error */
+ return (0); /* did not recognize */
+ return (n); /* success */
+ }
+
+(You can give your function another name that you like instead of
+"read_chunk_callback")
+
+To inform libpng about your function, use
+
+ png_set_read_user_chunk_fn(png_ptr, user_chunk_ptr,
+ read_chunk_callback);
+
+This names not only the callback function, but also a user pointer that
+you can retrieve with
+
+ png_get_user_chunk_ptr(png_ptr);
+
+If you call the png_set_read_user_chunk_fn() function, then all unknown
+chunks will be saved when read, in case your callback function will need
+one or more of them. This behavior can be changed with the
+png_set_keep_unknown_chunks() function, described below.
+
+At this point, you can set up a callback function that will be
+called after each row has been read, which you can use to control
+a progress meter or the like. It's demonstrated in pngtest.c.
+You must supply a function
+
+ void read_row_callback(png_ptr ptr, png_uint_32 row,
+ int pass);
+ {
+ /* put your code here */
+ }
+
+(You can give it another name that you like instead of "read_row_callback")
+
+To inform libpng about your function, use
+
+ png_set_read_status_fn(png_ptr, read_row_callback);
+
+Unknown-chunk handling
+
+Now you get to set the way the library processes unknown chunks in the
+input PNG stream. Both known and unknown chunks will be read. Normal
+behavior is that known chunks will be parsed into information in
+various info_ptr members while unknown chunks will be discarded. This
+behavior can be wasteful if your application will never use some known
+chunk types. To change this, you can call:
+
+ png_set_keep_unknown_chunks(png_ptr, keep,
+ chunk_list, num_chunks);
+ keep - 0: default unknown chunk handling
+ 1: ignore; do not keep
+ 2: keep only if safe-to-copy
+ 3: keep even if unsafe-to-copy
+ You can use these definitions:
+ PNG_HANDLE_CHUNK_AS_DEFAULT 0
+ PNG_HANDLE_CHUNK_NEVER 1
+ PNG_HANDLE_CHUNK_IF_SAFE 2
+ PNG_HANDLE_CHUNK_ALWAYS 3
+ chunk_list - list of chunks affected (a byte string,
+ five bytes per chunk, NULL or '\0' if
+ num_chunks is 0)
+ num_chunks - number of chunks affected; if 0, all
+ unknown chunks are affected. If nonzero,
+ only the chunks in the list are affected
+
+Unknown chunks declared in this way will be saved as raw data onto a
+list of png_unknown_chunk structures. If a chunk that is normally
+known to libpng is named in the list, it will be handled as unknown,
+according to the "keep" directive. If a chunk is named in successive
+instances of png_set_keep_unknown_chunks(), the final instance will
+take precedence. The IHDR and IEND chunks should not be named in
+chunk_list; if they are, libpng will process them normally anyway.
+
+Here is an example of the usage of png_set_keep_unknown_chunks(),
+where the private "vpAg" chunk will later be processed by a user chunk
+callback function:
+
+ png_byte vpAg[5]={118, 112, 65, 103, (png_byte) '\0'};
+
+ #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
+ png_byte unused_chunks[]=
+ {
+ 104, 73, 83, 84, (png_byte) '\0', /* hIST */
+ 105, 84, 88, 116, (png_byte) '\0', /* iTXt */
+ 112, 67, 65, 76, (png_byte) '\0', /* pCAL */
+ 115, 67, 65, 76, (png_byte) '\0', /* sCAL */
+ 115, 80, 76, 84, (png_byte) '\0', /* sPLT */
+ 116, 73, 77, 69, (png_byte) '\0', /* tIME */
+ };
+ #endif
+
+ ...
+
+ #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
+ /* ignore all unknown chunks: */
+ png_set_keep_unknown_chunks(read_ptr, 1, NULL, 0);
+ /* except for vpAg: */
+ png_set_keep_unknown_chunks(read_ptr, 2, vpAg, 1);
+ /* also ignore unused known chunks: */
+ png_set_keep_unknown_chunks(read_ptr, 1, unused_chunks,
+ (int)sizeof(unused_chunks)/5);
+ #endif
+
+User limits
+
+The PNG specification allows the width and height of an image to be as
+large as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns.
+Since very few applications really need to process such large images,
+we have imposed an arbitrary 1-million limit on rows and columns.
+Larger images will be rejected immediately with a png_error() call. If
+you wish to override this limit, you can use
+
+ png_set_user_limits(png_ptr, width_max, height_max);
+
+to set your own limits, or use width_max = height_max = 0x7fffffffL
+to allow all valid dimensions (libpng may reject some very large images
+anyway because of potential buffer overflow conditions).
+
+You should put this statement after you create the PNG structure and
+before calling png_read_info(), png_read_png(), or png_process_data().
+If you need to retrieve the limits that are being applied, use
+
+ width_max = png_get_user_width_max(png_ptr);
+ height_max = png_get_user_height_max(png_ptr);
+
+The PNG specification sets no limit on the number of ancillary chunks
+allowed in a PNG datastream. You can impose a limit on the total number
+of sPLT, tEXt, iTXt, zTXt, and unknown chunks that will be stored, with
+
+ png_set_chunk_cache_max(png_ptr, user_chunk_cache_max);
+
+where 0x7fffffffL means unlimited. You can retrieve this limit with
+
+ chunk_cache_max = png_get_chunk_cache_max(png_ptr);
+
+This limit also applies to the number of buffers that can be allocated
+by png_decompress_chunk() while decompressing iTXt, zTXt, and iCCP chunks.
+
+The high-level read interface
+
+At this point there are two ways to proceed; through the high-level
+read interface, or through a sequence of low-level read operations.
+You can use the high-level interface if (a) you are willing to read
+the entire image into memory, and (b) the input transformations
+you want to do are limited to the following set:
+
+ PNG_TRANSFORM_IDENTITY No transformation
+ PNG_TRANSFORM_STRIP_16 Strip 16-bit samples to
+ 8 bits
+ PNG_TRANSFORM_STRIP_ALPHA Discard the alpha channel
+ PNG_TRANSFORM_PACKING Expand 1, 2 and 4-bit
+ samples to bytes
+ PNG_TRANSFORM_PACKSWAP Change order of packed
+ pixels to LSB first
+ PNG_TRANSFORM_EXPAND Perform set_expand()
+ PNG_TRANSFORM_INVERT_MONO Invert monochrome images
+ PNG_TRANSFORM_SHIFT Normalize pixels to the
+ sBIT depth
+ PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA
+ to BGRA
+ PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA
+ to AG
+ PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity
+ to transparency
+ PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples
+ PNG_TRANSFORM_GRAY_TO_RGB Expand grayscale samples
+ to RGB (or GA to RGBA)
+
+(This excludes setting a background color, doing gamma transformation,
+dithering, and setting filler.) If this is the case, simply do this:
+
+ png_read_png(png_ptr, info_ptr, png_transforms, NULL)
+
+where png_transforms is an integer containing the bitwise OR of some
+set of transformation flags. This call is equivalent to png_read_info(),
+followed the set of transformations indicated by the transform mask,
+then png_read_image(), and finally png_read_end().
+
+(The final parameter of this call is not yet used. Someday it might point
+to transformation parameters required by some future input transform.)
+
+You must use png_transforms and not call any png_set_transform() functions
+when you use png_read_png().
+
+After you have called png_read_png(), you can retrieve the image data
+with
+
+ row_pointers = png_get_rows(png_ptr, info_ptr);
+
+where row_pointers is an array of pointers to the pixel data for each row:
+
+ png_bytep row_pointers[height];
+
+If you know your image size and pixel size ahead of time, you can allocate
+row_pointers prior to calling png_read_png() with
+
+ if (height > PNG_UINT_32_MAX/png_sizeof(png_byte))
+ png_error (png_ptr,
+ "Image is too tall to process in memory");
+ if (width > PNG_UINT_32_MAX/pixel_size)
+ png_error (png_ptr,
+ "Image is too wide to process in memory");
+ row_pointers = png_malloc(png_ptr,
+ height*png_sizeof(png_bytep));
+ for (int i=0; i<height, i++)
+ row_pointers[i]=NULL; /* security precaution */
+ for (int i=0; i<height, i++)
+ row_pointers[i]=png_malloc(png_ptr,
+ width*pixel_size);
+ png_set_rows(png_ptr, info_ptr, &row_pointers);
+
+Alternatively you could allocate your image in one big block and define
+row_pointers[i] to point into the proper places in your block.
+
+If you use png_set_rows(), the application is responsible for freeing
+row_pointers (and row_pointers[i], if they were separately allocated).
+
+If you don't allocate row_pointers ahead of time, png_read_png() will
+do it, and it'll be free'ed when you call png_destroy_*().
+
+The low-level read interface
+
+If you are going the low-level route, you are now ready to read all
+the file information up to the actual image data. You do this with a
+call to png_read_info().
+
+ png_read_info(png_ptr, info_ptr);
+
+This will process all chunks up to but not including the image data.
+
+Querying the info structure
+
+Functions are used to get the information from the info_ptr once it
+has been read. Note that these fields may not be completely filled
+in until png_read_end() has read the chunk data following the image.
+
+ png_get_IHDR(png_ptr, info_ptr, &width, &height,
+ &bit_depth, &color_type, &interlace_type,
+ &compression_type, &filter_method);
+
+ width - holds the width of the image
+ in pixels (up to 2^31).
+ height - holds the height of the image
+ in pixels (up to 2^31).
+ bit_depth - holds the bit depth of one of the
+ image channels. (valid values are
+ 1, 2, 4, 8, 16 and depend also on
+ the color_type. See also
+ significant bits (sBIT) below).
+ color_type - describes which color/alpha channels
+ are present.
+ PNG_COLOR_TYPE_GRAY
+ (bit depths 1, 2, 4, 8, 16)
+ PNG_COLOR_TYPE_GRAY_ALPHA
+ (bit depths 8, 16)
+ PNG_COLOR_TYPE_PALETTE
+ (bit depths 1, 2, 4, 8)
+ PNG_COLOR_TYPE_RGB
+ (bit_depths 8, 16)
+ PNG_COLOR_TYPE_RGB_ALPHA
+ (bit_depths 8, 16)
+
+ PNG_COLOR_MASK_PALETTE
+ PNG_COLOR_MASK_COLOR
+ PNG_COLOR_MASK_ALPHA
+
+ filter_method - (must be PNG_FILTER_TYPE_BASE
+ for PNG 1.0, and can also be
+ PNG_INTRAPIXEL_DIFFERENCING if
+ the PNG datastream is embedded in
+ a MNG-1.0 datastream)
+ compression_type - (must be PNG_COMPRESSION_TYPE_BASE
+ for PNG 1.0)
+ interlace_type - (PNG_INTERLACE_NONE or
+ PNG_INTERLACE_ADAM7)
+
+ Any or all of interlace_type, compression_type, or
+ filter_method can be NULL if you are
+ not interested in their values.
+
+ Note that png_get_IHDR() returns 32-bit data into
+ the application's width and height variables.
+ This is an unsafe situation if these are 16-bit
+ variables. In such situations, the
+ png_get_image_width() and png_get_image_height()
+ functions described below are safer.
+
+ width = png_get_image_width(png_ptr,
+ info_ptr);
+ height = png_get_image_height(png_ptr,
+ info_ptr);
+ bit_depth = png_get_bit_depth(png_ptr,
+ info_ptr);
+ color_type = png_get_color_type(png_ptr,
+ info_ptr);
+ filter_method = png_get_filter_type(png_ptr,
+ info_ptr);
+ compression_type = png_get_compression_type(png_ptr,
+ info_ptr);
+ interlace_type = png_get_interlace_type(png_ptr,
+ info_ptr);
+
+ channels = png_get_channels(png_ptr, info_ptr);
+ channels - number of channels of info for the
+ color type (valid values are 1 (GRAY,
+ PALETTE), 2 (GRAY_ALPHA), 3 (RGB),
+ 4 (RGB_ALPHA or RGB + filler byte))
+ rowbytes = png_get_rowbytes(png_ptr, info_ptr);
+ rowbytes - number of bytes needed to hold a row
+
+ signature = png_get_signature(png_ptr, info_ptr);
+ signature - holds the signature read from the
+ file (if any). The data is kept in
+ the same offset it would be if the
+ whole signature were read (i.e. if an
+ application had already read in 4
+ bytes of signature before starting
+ libpng, the remaining 4 bytes would
+ be in signature[4] through signature[7]
+ (see png_set_sig_bytes())).
+
+These are also important, but their validity depends on whether the chunk
+has been read. The png_get_valid(png_ptr, info_ptr, PNG_INFO_<chunk>) and
+png_get_<chunk>(png_ptr, info_ptr, ...) functions return non-zero if the
+data has been read, or zero if it is missing. The parameters to the
+png_get_<chunk> are set directly if they are simple data types, or a
+pointer into the info_ptr is returned for any complex types.
+
+ png_get_PLTE(png_ptr, info_ptr, &palette,
+ &num_palette);
+ palette - the palette for the file
+ (array of png_color)
+ num_palette - number of entries in the palette
+
+ png_get_gAMA(png_ptr, info_ptr, &gamma);
+ gamma - the gamma the file is written
+ at (PNG_INFO_gAMA)
+
+ png_get_sRGB(png_ptr, info_ptr, &srgb_intent);
+ srgb_intent - the rendering intent (PNG_INFO_sRGB)
+ The presence of the sRGB chunk
+ means that the pixel data is in the
+ sRGB color space. This chunk also
+ implies specific values of gAMA and
+ cHRM.
+
+ png_get_iCCP(png_ptr, info_ptr, &name,
+ &compression_type, &profile, &proflen);
+ name - The profile name.
+ compression - The compression type; always
+ PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
+ You may give NULL to this argument to
+ ignore it.
+ profile - International Color Consortium color
+ profile data. May contain NULs.
+ proflen - length of profile data in bytes.
+
+ png_get_sBIT(png_ptr, info_ptr, &sig_bit);
+ sig_bit - the number of significant bits for
+ (PNG_INFO_sBIT) each of the gray,
+ red, green, and blue channels,
+ whichever are appropriate for the
+ given color type (png_color_16)
+
+ png_get_tRNS(png_ptr, info_ptr, &trans_alpha,
+ &num_trans, &trans_color);
+ trans_alpha - array of alpha (transparency)
+ entries for palette (PNG_INFO_tRNS)
+ trans_color - graylevel or color sample values of
+ the single transparent color for
+ non-paletted images (PNG_INFO_tRNS)
+ num_trans - number of transparent entries
+ (PNG_INFO_tRNS)
+
+ png_get_hIST(png_ptr, info_ptr, &hist);
+ (PNG_INFO_hIST)
+ hist - histogram of palette (array of
+ png_uint_16)
+
+ png_get_tIME(png_ptr, info_ptr, &mod_time);
+ mod_time - time image was last modified
+ (PNG_VALID_tIME)
+
+ png_get_bKGD(png_ptr, info_ptr, &background);
+ background - background color (PNG_VALID_bKGD)
+ valid 16-bit red, green and blue
+ values, regardless of color_type
+
+ num_comments = png_get_text(png_ptr, info_ptr,
+ &text_ptr, &num_text);
+ num_comments - number of comments
+ text_ptr - array of png_text holding image
+ comments
+ text_ptr[i].compression - type of compression used
+ on "text" PNG_TEXT_COMPRESSION_NONE
+ PNG_TEXT_COMPRESSION_zTXt
+ PNG_ITXT_COMPRESSION_NONE
+ PNG_ITXT_COMPRESSION_zTXt
+ text_ptr[i].key - keyword for comment. Must contain
+ 1-79 characters.
+ text_ptr[i].text - text comments for current
+ keyword. Can be empty.
+ text_ptr[i].text_length - length of text string,
+ after decompression, 0 for iTXt
+ text_ptr[i].itxt_length - length of itxt string,
+ after decompression, 0 for tEXt/zTXt
+ text_ptr[i].lang - language of comment (empty
+ string for unknown).
+ text_ptr[i].lang_key - keyword in UTF-8
+ (empty string for unknown).
+ Note that the itxt_length, lang, and lang_key
+ members of the text_ptr structure only exist
+ when the library is built with iTXt chunk support.
+
+ num_text - number of comments (same as
+ num_comments; you can put NULL here
+ to avoid the duplication)
+ Note while png_set_text() will accept text, language,
+ and translated keywords that can be NULL pointers, the
+ structure returned by png_get_text will always contain
+ regular zero-terminated C strings. They might be
+ empty strings but they will never be NULL pointers.
+
+ num_spalettes = png_get_sPLT(png_ptr, info_ptr,
+ &palette_ptr);
+ palette_ptr - array of palette structures holding
+ contents of one or more sPLT chunks
+ read.
+ num_spalettes - number of sPLT chunks read.
+
+ png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y,
+ &unit_type);
+ offset_x - positive offset from the left edge
+ of the screen
+ offset_y - positive offset from the top edge
+ of the screen
+ unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER
+
+ png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y,
+ &unit_type);
+ res_x - pixels/unit physical resolution in
+ x direction
+ res_y - pixels/unit physical resolution in
+ x direction
+ unit_type - PNG_RESOLUTION_UNKNOWN,
+ PNG_RESOLUTION_METER
+
+ png_get_sCAL(png_ptr, info_ptr, &unit, &width,
+ &height)
+ unit - physical scale units (an integer)
+ width - width of a pixel in physical scale units
+ height - height of a pixel in physical scale units
+ (width and height are doubles)
+
+ png_get_sCAL_s(png_ptr, info_ptr, &unit, &width,
+ &height)
+ unit - physical scale units (an integer)
+ width - width of a pixel in physical scale units
+ height - height of a pixel in physical scale units
+ (width and height are strings like "2.54")
+
+ num_unknown_chunks = png_get_unknown_chunks(png_ptr,
+ info_ptr, &unknowns)
+ unknowns - array of png_unknown_chunk
+ structures holding unknown chunks
+ unknowns[i].name - name of unknown chunk
+ unknowns[i].data - data of unknown chunk
+ unknowns[i].size - size of unknown chunk's data
+ unknowns[i].location - position of chunk in file
+
+ The value of "i" corresponds to the order in which the
+ chunks were read from the PNG file or inserted with the
+ png_set_unknown_chunks() function.
+
+The data from the pHYs chunk can be retrieved in several convenient
+forms:
+
+ res_x = png_get_x_pixels_per_meter(png_ptr,
+ info_ptr)
+ res_y = png_get_y_pixels_per_meter(png_ptr,
+ info_ptr)
+ res_x_and_y = png_get_pixels_per_meter(png_ptr,
+ info_ptr)
+ res_x = png_get_x_pixels_per_inch(png_ptr,
+ info_ptr)
+ res_y = png_get_y_pixels_per_inch(png_ptr,
+ info_ptr)
+ res_x_and_y = png_get_pixels_per_inch(png_ptr,
+ info_ptr)
+ aspect_ratio = png_get_pixel_aspect_ratio(png_ptr,
+ info_ptr)
+
+ (Each of these returns 0 [signifying "unknown"] if
+ the data is not present or if res_x is 0;
+ res_x_and_y is 0 if res_x != res_y)
+
+The data from the oFFs chunk can be retrieved in several convenient
+forms:
+
+ x_offset = png_get_x_offset_microns(png_ptr, info_ptr);
+ y_offset = png_get_y_offset_microns(png_ptr, info_ptr);
+ x_offset = png_get_x_offset_inches(png_ptr, info_ptr);
+ y_offset = png_get_y_offset_inches(png_ptr, info_ptr);
+
+ (Each of these returns 0 [signifying "unknown" if both
+ x and y are 0] if the data is not present or if the
+ chunk is present but the unit is the pixel)
+
+For more information, see the png_info definition in png.h and the
+PNG specification for chunk contents. Be careful with trusting
+rowbytes, as some of the transformations could increase the space
+needed to hold a row (expand, filler, gray_to_rgb, etc.).
+See png_read_update_info(), below.
+
+A quick word about text_ptr and num_text. PNG stores comments in
+keyword/text pairs, one pair per chunk, with no limit on the number
+of text chunks, and a 2^31 byte limit on their size. While there are
+suggested keywords, there is no requirement to restrict the use to these
+strings. It is strongly suggested that keywords and text be sensible
+to humans (that's the point), so don't use abbreviations. Non-printing
+symbols are not allowed. See the PNG specification for more details.
+There is also no requirement to have text after the keyword.
+
+Keywords should be limited to 79 Latin-1 characters without leading or
+trailing spaces, but non-consecutive spaces are allowed within the
+keyword. It is possible to have the same keyword any number of times.
+The text_ptr is an array of png_text structures, each holding a
+pointer to a language string, a pointer to a keyword and a pointer to
+a text string. The text string, language code, and translated
+keyword may be empty or NULL pointers. The keyword/text
+pairs are put into the array in the order that they are received.
+However, some or all of the text chunks may be after the image, so, to
+make sure you have read all the text chunks, don't mess with these
+until after you read the stuff after the image. This will be
+mentioned again below in the discussion that goes with png_read_end().
+
+Input transformations
+
+After you've read the header information, you can set up the library
+to handle any special transformations of the image data. The various
+ways to transform the data will be described in the order that they
+should occur. This is important, as some of these change the color
+type and/or bit depth of the data, and some others only work on
+certain color types and bit depths. Even though each transformation
+checks to see if it has data that it can do something with, you should
+make sure to only enable a transformation if it will be valid for the
+data. For example, don't swap red and blue on grayscale data.
+
+The colors used for the background and transparency values should be
+supplied in the same format/depth as the current image data. They
+are stored in the same format/depth as the image data in a bKGD or tRNS
+chunk, so this is what libpng expects for this data. The colors are
+transformed to keep in sync with the image data when an application
+calls the png_read_update_info() routine (see below).
+
+Data will be decoded into the supplied row buffers packed into bytes
+unless the library has been told to transform it into another format.
+For example, 4 bit/pixel paletted or grayscale data will be returned
+2 pixels/byte with the leftmost pixel in the high-order bits of the
+byte, unless png_set_packing() is called. 8-bit RGB data will be stored
+in RGB RGB RGB format unless png_set_filler() or png_set_add_alpha()
+is called to insert filler bytes, either before or after each RGB triplet.
+16-bit RGB data will be returned RRGGBB RRGGBB, with the most significant
+byte of the color value first, unless png_set_strip_16() is called to
+transform it to regular RGB RGB triplets, or png_set_filler() or
+png_set_add alpha() is called to insert filler bytes, either before or
+after each RRGGBB triplet. Similarly, 8-bit or 16-bit grayscale data can
+be modified with
+png_set_filler(), png_set_add_alpha(), or png_set_strip_16().
+
+The following code transforms grayscale images of less than 8 to 8 bits,
+changes paletted images to RGB, and adds a full alpha channel if there is
+transparency information in a tRNS chunk. This is most useful on
+grayscale images with bit depths of 2 or 4 or if there is a multiple-image
+viewing application that wishes to treat all images in the same way.
+
+ if (color_type == PNG_COLOR_TYPE_PALETTE)
+ png_set_palette_to_rgb(png_ptr);
+
+ if (color_type == PNG_COLOR_TYPE_GRAY &&
+ bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr);
+
+ if (png_get_valid(png_ptr, info_ptr,
+ PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr);
+
+These three functions are actually aliases for png_set_expand(), added
+in libpng version 1.0.4, with the function names expanded to improve code
+readability. In some future version they may actually do different
+things.
+
+As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was
+added. It expands the sample depth without changing tRNS to alpha.
+
+As of libpng version 1.4.0, not all possible expansions are supported.
+
+In the following table, the 01 means grayscale with depth<8, 31 means
+indexed with depth<8, other numerals represent the color type, "T" means
+the tRNS chunk is present, A means an alpha channel is present, and O
+means tRNS or alpha is present but all pixels in the image are opaque.
+
+ FROM 01 31 0 0T 0O 2 2T 2O 3 3T 3O 4A 4O 6A 6O
+ TO
+ 01 -
+ 31 -
+ 0 1 -
+ 0T -
+ 0O -
+ 2 GX -
+ 2T -
+ 2O -
+ 3 1 -
+ 3T -
+ 3O -
+ 4A T -
+ 4O -
+ 6A GX TX TX -
+ 6O GX TX -
+
+Within the matrix,
+ "-" means the transformation is not supported.
+ "X" means the transformation is obtained by png_set_expand().
+ "1" means the transformation is obtained by
+ png_set_expand_gray_1_2_4_to_8
+ "G" means the transformation is obtained by
+ png_set_gray_to_rgb().
+ "P" means the transformation is obtained by
+ png_set_expand_palette_to_rgb().
+ "T" means the transformation is obtained by
+ png_set_tRNS_to_alpha().
+
+PNG can have files with 16 bits per channel. If you only can handle
+8 bits per channel, this will strip the pixels down to 8 bit.
+
+ if (bit_depth == 16)
+ png_set_strip_16(png_ptr);
+
+If, for some reason, you don't need the alpha channel on an image,
+and you want to remove it rather than combining it with the background
+(but the image author certainly had in mind that you *would* combine
+it with the background, so that's what you should probably do):
+
+ if (color_type & PNG_COLOR_MASK_ALPHA)
+ png_set_strip_alpha(png_ptr);
+
+In PNG files, the alpha channel in an image
+is the level of opacity. If you need the alpha channel in an image to
+be the level of transparency instead of opacity, you can invert the
+alpha channel (or the tRNS chunk data) after it's read, so that 0 is
+fully opaque and 255 (in 8-bit or paletted images) or 65535 (in 16-bit
+images) is fully transparent, with
+
+ png_set_invert_alpha(png_ptr);
+
+PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as
+they can, resulting in, for example, 8 pixels per byte for 1 bit
+files. This code expands to 1 pixel per byte without changing the
+values of the pixels:
+
+ if (bit_depth < 8)
+ png_set_packing(png_ptr);
+
+PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels
+stored in a PNG image have been "scaled" or "shifted" up to the next
+higher possible bit depth (e.g. from 5 bits/sample in the range [0,31]
+to 8 bits/sample in the range [0, 255]). However, it is also possible
+to convert the PNG pixel data back to the original bit depth of the
+image. This call reduces the pixels back down to the original bit depth:
+
+ png_color_8p sig_bit;
+
+ if (png_get_sBIT(png_ptr, info_ptr, &sig_bit))
+ png_set_shift(png_ptr, sig_bit);
+
+PNG files store 3-color pixels in red, green, blue order. This code
+changes the storage of the pixels to blue, green, red:
+
+ if (color_type == PNG_COLOR_TYPE_RGB ||
+ color_type == PNG_COLOR_TYPE_RGB_ALPHA)
+ png_set_bgr(png_ptr);
+
+PNG files store RGB pixels packed into 3 or 6 bytes. This code expands them
+into 4 or 8 bytes for windowing systems that need them in this format:
+
+ if (color_type == PNG_COLOR_TYPE_RGB)
+ png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE);
+
+where "filler" is the 8 or 16-bit number to fill with, and the location is
+either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether
+you want the filler before the RGB or after. This transformation
+does not affect images that already have full alpha channels. To add an
+opaque alpha channel, use filler=0xff or 0xffff and PNG_FILLER_AFTER which
+will generate RGBA pixels.
+
+Note that png_set_filler() does not change the color type. If you want
+to do that, you can add a true alpha channel with
+
+ if (color_type == PNG_COLOR_TYPE_RGB ||
+ color_type == PNG_COLOR_TYPE_GRAY)
+ png_set_add_alpha(png_ptr, filler, PNG_FILLER_AFTER);
+
+where "filler" contains the alpha value to assign to each pixel.
+This function was added in libpng-1.2.7.
+
+If you are reading an image with an alpha channel, and you need the
+data as ARGB instead of the normal PNG format RGBA:
+
+ if (color_type == PNG_COLOR_TYPE_RGB_ALPHA)
+ png_set_swap_alpha(png_ptr);
+
+For some uses, you may want a grayscale image to be represented as
+RGB. This code will do that conversion:
+
+ if (color_type == PNG_COLOR_TYPE_GRAY ||
+ color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ png_set_gray_to_rgb(png_ptr);
+
+Conversely, you can convert an RGB or RGBA image to grayscale or grayscale
+with alpha.
+
+ if (color_type == PNG_COLOR_TYPE_RGB ||
+ color_type == PNG_COLOR_TYPE_RGB_ALPHA)
+ png_set_rgb_to_gray_fixed(png_ptr, error_action,
+ int red_weight, int green_weight);
+
+ error_action = 1: silently do the conversion
+ error_action = 2: issue a warning if the original
+ image has any pixel where
+ red != green or red != blue
+ error_action = 3: issue an error and abort the
+ conversion if the original
+ image has any pixel where
+ red != green or red != blue
+
+ red_weight: weight of red component times 100000
+ green_weight: weight of green component times 100000
+ If either weight is negative, default
+ weights (21268, 71514) are used.
+
+If you have set error_action = 1 or 2, you can
+later check whether the image really was gray, after processing
+the image rows, with the png_get_rgb_to_gray_status(png_ptr) function.
+It will return a png_byte that is zero if the image was gray or
+1 if there were any non-gray pixels. bKGD and sBIT data
+will be silently converted to grayscale, using the green channel
+data, regardless of the error_action setting.
+
+With red_weight+green_weight<=100000,
+the normalized graylevel is computed:
+
+ int rw = red_weight * 65536;
+ int gw = green_weight * 65536;
+ int bw = 65536 - (rw + gw);
+ gray = (rw*red + gw*green + bw*blue)/65536;
+
+The default values approximate those recommended in the Charles
+Poynton's Color FAQ, <http://www.inforamp.net/~poynton/>
+Copyright (c) 1998-01-04 Charles Poynton <poynton at inforamp.net>
+
+ Y = 0.212671 * R + 0.715160 * G + 0.072169 * B
+
+Libpng approximates this with
+
+ Y = 0.21268 * R + 0.7151 * G + 0.07217 * B
+
+which can be expressed with integers as
+
+ Y = (6969 * R + 23434 * G + 2365 * B)/32768
+
+The calculation is done in a linear colorspace, if the image gamma
+is known.
+
+If you have a grayscale and you are using png_set_expand_depth(),
+png_set_expand(), or png_set_gray_to_rgb to change to truecolor or to
+a higher bit-depth, you must either supply the background color as a gray
+value at the original file bit-depth (need_expand = 1) or else supply the
+background color as an RGB triplet at the final, expanded bit depth
+(need_expand = 0). Similarly, if you are reading a paletted image, you
+must either supply the background color as a palette index (need_expand = 1)
+or as an RGB triplet that may or may not be in the palette (need_expand = 0).
+
+ png_color_16 my_background;
+ png_color_16p image_background;
+
+ if (png_get_bKGD(png_ptr, info_ptr, &image_background))
+ png_set_background(png_ptr, image_background,
+ PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
+ else
+ png_set_background(png_ptr, &my_background,
+ PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0);
+
+The png_set_background() function tells libpng to composite images
+with alpha or simple transparency against the supplied background
+color. If the PNG file contains a bKGD chunk (PNG_INFO_bKGD valid),
+you may use this color, or supply another color more suitable for
+the current display (e.g., the background color from a web page). You
+need to tell libpng whether the color is in the gamma space of the
+display (PNG_BACKGROUND_GAMMA_SCREEN for colors you supply), the file
+(PNG_BACKGROUND_GAMMA_FILE for colors from the bKGD chunk), or one
+that is neither of these gammas (PNG_BACKGROUND_GAMMA_UNIQUE - I don't
+know why anyone would use this, but it's here).
+
+To properly display PNG images on any kind of system, the application needs
+to know what the display gamma is. Ideally, the user will know this, and
+the application will allow them to set it. One method of allowing the user
+to set the display gamma separately for each system is to check for a
+SCREEN_GAMMA or DISPLAY_GAMMA environment variable, which will hopefully be
+correctly set.
+
+Note that display_gamma is the overall gamma correction required to produce
+pleasing results, which depends on the lighting conditions in the surrounding
+environment. In a dim or brightly lit room, no compensation other than
+the physical gamma exponent of the monitor is needed, while in a dark room
+a slightly smaller exponent is better.
+
+ double gamma, screen_gamma;
+
+ if (/* We have a user-defined screen
+ gamma value */)
+ {
+ screen_gamma = user_defined_screen_gamma;
+ }
+ /* One way that applications can share the same
+ screen gamma value */
+ else if ((gamma_str = getenv("SCREEN_GAMMA"))
+ != NULL)
+ {
+ screen_gamma = (double)atof(gamma_str);
+ }
+ /* If we don't have another value */
+ else
+ {
+ screen_gamma = 2.2; /* A good guess for a
+ PC monitor in a bright office or a dim room */
+ screen_gamma = 2.0; /* A good guess for a
+ PC monitor in a dark room */
+ screen_gamma = 1.7 or 1.0; /* A good
+ guess for Mac systems */
+ }
+
+The png_set_gamma() function handles gamma transformations of the data.
+Pass both the file gamma and the current screen_gamma. If the file does
+not have a gamma value, you can pass one anyway if you have an idea what
+it is (usually 0.45455 is a good guess for GIF images on PCs). Note
+that file gammas are inverted from screen gammas. See the discussions
+on gamma in the PNG specification for an excellent description of what
+gamma is, and why all applications should support it. It is strongly
+recommended that PNG viewers support gamma correction.
+
+ if (png_get_gAMA(png_ptr, info_ptr, &gamma))
+ png_set_gamma(png_ptr, screen_gamma, gamma);
+ else
+ png_set_gamma(png_ptr, screen_gamma, 0.45455);
+
+PNG files describe monochrome as black being zero and white being one.
+The following code will reverse this (make black be one and white be
+zero):
+
+ if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY)
+ png_set_invert_mono(png_ptr);
+
+This function can also be used to invert grayscale and gray-alpha images:
+
+ if (color_type == PNG_COLOR_TYPE_GRAY ||
+ color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ png_set_invert_mono(png_ptr);
+
+PNG files store 16 bit pixels in network byte order (big-endian,
+ie. most significant bits first). This code changes the storage to the
+other way (little-endian, i.e. least significant bits first, the
+way PCs store them):
+
+ if (bit_depth == 16)
+ png_set_swap(png_ptr);
+
+If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you
+need to change the order the pixels are packed into bytes, you can use:
+
+ if (bit_depth < 8)
+ png_set_packswap(png_ptr);
+
+Finally, you can write your own transformation function if none of
+the existing ones meets your needs. This is done by setting a callback
+with
+
+ png_set_read_user_transform_fn(png_ptr,
+ read_transform_fn);
+
+You must supply the function
+
+ void read_transform_fn(png_ptr ptr, row_info_ptr
+ row_info, png_bytep data)
+
+See pngtest.c for a working example. Your function will be called
+after all of the other transformations have been processed.
+
+You can also set up a pointer to a user structure for use by your
+callback function, and you can inform libpng that your transform
+function will change the number of channels or bit depth with the
+function
+
+ png_set_user_transform_info(png_ptr, user_ptr,
+ user_depth, user_channels);
+
+The user's application, not libpng, is responsible for allocating and
+freeing any memory required for the user structure.
+
+You can retrieve the pointer via the function
+png_get_user_transform_ptr(). For example:
+
+ voidp read_user_transform_ptr =
+ png_get_user_transform_ptr(png_ptr);
+
+The last thing to handle is interlacing; this is covered in detail below,
+but you must call the function here if you want libpng to handle expansion
+of the interlaced image.
+
+ number_of_passes = png_set_interlace_handling(png_ptr);
+
+After setting the transformations, libpng can update your png_info
+structure to reflect any transformations you've requested with this
+call. This is most useful to update the info structure's rowbytes
+field so you can use it to allocate your image memory. This function
+will also update your palette with the correct screen_gamma and
+background if these have been given with the calls above.
+
+ png_read_update_info(png_ptr, info_ptr);
+
+After you call png_read_update_info(), you can allocate any
+memory you need to hold the image. The row data is simply
+raw byte data for all forms of images. As the actual allocation
+varies among applications, no example will be given. If you
+are allocating one large chunk, you will need to build an
+array of pointers to each row, as it will be needed for some
+of the functions below.
+
+Reading image data
+
+After you've allocated memory, you can read the image data.
+The simplest way to do this is in one function call. If you are
+allocating enough memory to hold the whole image, you can just
+call png_read_image() and libpng will read in all the image data
+and put it in the memory area supplied. You will need to pass in
+an array of pointers to each row.
+
+This function automatically handles interlacing, so you don't need
+to call png_set_interlace_handling() or call this function multiple
+times, or any of that other stuff necessary with png_read_rows().
+
+ png_read_image(png_ptr, row_pointers);
+
+where row_pointers is:
+
+ png_bytep row_pointers[height];
+
+You can point to void or char or whatever you use for pixels.
+
+If you don't want to read in the whole image at once, you can
+use png_read_rows() instead. If there is no interlacing (check
+interlace_type == PNG_INTERLACE_NONE), this is simple:
+
+ png_read_rows(png_ptr, row_pointers, NULL,
+ number_of_rows);
+
+where row_pointers is the same as in the png_read_image() call.
+
+If you are doing this just one row at a time, you can do this with
+a single row_pointer instead of an array of row_pointers:
+
+ png_bytep row_pointer = row;
+ png_read_row(png_ptr, row_pointer, NULL);
+
+If the file is interlaced (interlace_type != 0 in the IHDR chunk), things
+get somewhat harder. The only current (PNG Specification version 1.2)
+interlacing type for PNG is (interlace_type == PNG_INTERLACE_ADAM7)
+is a somewhat complicated 2D interlace scheme, known as Adam7, that
+breaks down an image into seven smaller images of varying size, based
+on an 8x8 grid.
+
+libpng can fill out those images or it can give them to you "as is".
+If you want them filled out, there are two ways to do that. The one
+mentioned in the PNG specification is to expand each pixel to cover
+those pixels that have not been read yet (the "rectangle" method).
+This results in a blocky image for the first pass, which gradually
+smooths out as more pixels are read. The other method is the "sparkle"
+method, where pixels are drawn only in their final locations, with the
+rest of the image remaining whatever colors they were initialized to
+before the start of the read. The first method usually looks better,
+but tends to be slower, as there are more pixels to put in the rows.
+
+If you don't want libpng to handle the interlacing details, just call
+png_read_rows() seven times to read in all seven images. Each of the
+images is a valid image by itself, or they can all be combined on an
+8x8 grid to form a single image (although if you intend to combine them
+you would be far better off using the libpng interlace handling).
+
+The first pass will return an image 1/8 as wide as the entire image
+(every 8th column starting in column 0) and 1/8 as high as the original
+(every 8th row starting in row 0), the second will be 1/8 as wide
+(starting in column 4) and 1/8 as high (also starting in row 0). The
+third pass will be 1/4 as wide (every 4th pixel starting in column 0) and
+1/8 as high (every 8th row starting in row 4), and the fourth pass will
+be 1/4 as wide and 1/4 as high (every 4th column starting in column 2,
+and every 4th row starting in row 0). The fifth pass will return an
+image 1/2 as wide, and 1/4 as high (starting at column 0 and row 2),
+while the sixth pass will be 1/2 as wide and 1/2 as high as the original
+(starting in column 1 and row 0). The seventh and final pass will be as
+wide as the original, and 1/2 as high, containing all of the odd
+numbered scanlines. Phew!
+
+If you want libpng to expand the images, call this before calling
+png_start_read_image() or png_read_update_info():
+
+ if (interlace_type == PNG_INTERLACE_ADAM7)
+ number_of_passes
+ = png_set_interlace_handling(png_ptr);
+
+This will return the number of passes needed. Currently, this
+is seven, but may change if another interlace type is added.
+This function can be called even if the file is not interlaced,
+where it will return one pass.
+
+If you are not going to display the image after each pass, but are
+going to wait until the entire image is read in, use the sparkle
+effect. This effect is faster and the end result of either method
+is exactly the same. If you are planning on displaying the image
+after each pass, the "rectangle" effect is generally considered the
+better looking one.
+
+If you only want the "sparkle" effect, just call png_read_rows() as
+normal, with the third parameter NULL. Make sure you make pass over
+the image number_of_passes times, and you don't change the data in the
+rows between calls. You can change the locations of the data, just
+not the data. Each pass only writes the pixels appropriate for that
+pass, and assumes the data from previous passes is still valid.
+
+ png_read_rows(png_ptr, row_pointers, NULL,
+ number_of_rows);
+
+If you only want the first effect (the rectangles), do the same as
+before except pass the row buffer in the third parameter, and leave
+the second parameter NULL.
+
+ png_read_rows(png_ptr, NULL, row_pointers,
+ number_of_rows);
+
+Finishing a sequential read
+
+After you are finished reading the image through the
+low-level interface, you can finish reading the file. If you are
+interested in comments or time, which may be stored either before or
+after the image data, you should pass the separate png_info struct if
+you want to keep the comments from before and after the image
+separate. If you are not interested, you can pass NULL.
+
+ png_read_end(png_ptr, end_info);
+
+When you are done, you can free all memory allocated by libpng like this:
+
+ png_destroy_read_struct(&png_ptr, &info_ptr,
+ &end_info);
+
+It is also possible to individually free the info_ptr members that
+point to libpng-allocated storage with the following function:
+
+ png_free_data(png_ptr, info_ptr, mask, seq)
+ mask - identifies data to be freed, a mask
+ containing the bitwise OR of one or
+ more of
+ PNG_FREE_PLTE, PNG_FREE_TRNS,
+ PNG_FREE_HIST, PNG_FREE_ICCP,
+ PNG_FREE_PCAL, PNG_FREE_ROWS,
+ PNG_FREE_SCAL, PNG_FREE_SPLT,
+ PNG_FREE_TEXT, PNG_FREE_UNKN,
+ or simply PNG_FREE_ALL
+ seq - sequence number of item to be freed
+ (-1 for all items)
+
+This function may be safely called when the relevant storage has
+already been freed, or has not yet been allocated, or was allocated
+by the user and not by libpng, and will in those cases do nothing.
+The "seq" parameter is ignored if only one item of the selected data
+type, such as PLTE, is allowed. If "seq" is not -1, and multiple items
+are allowed for the data type identified in the mask, such as text or
+sPLT, only the n'th item in the structure is freed, where n is "seq".
+
+The default behavior is only to free data that was allocated internally
+by libpng. This can be changed, so that libpng will not free the data,
+or so that it will free data that was allocated by the user with png_malloc()
+or png_zalloc() and passed in via a png_set_*() function, with
+
+ png_data_freer(png_ptr, info_ptr, freer, mask)
+ mask - which data elements are affected
+ same choices as in png_free_data()
+ freer - one of
+ PNG_DESTROY_WILL_FREE_DATA
+ PNG_SET_WILL_FREE_DATA
+ PNG_USER_WILL_FREE_DATA
+
+This function only affects data that has already been allocated.
+You can call this function after reading the PNG data but before calling
+any png_set_*() functions, to control whether the user or the png_set_*()
+function is responsible for freeing any existing data that might be present,
+and again after the png_set_*() functions to control whether the user
+or png_destroy_*() is supposed to free the data. When the user assumes
+responsibility for libpng-allocated data, the application must use
+png_free() to free it, and when the user transfers responsibility to libpng
+for data that the user has allocated, the user must have used png_malloc()
+or png_zalloc() to allocate it.
+
+If you allocated your row_pointers in a single block, as suggested above in
+the description of the high level read interface, you must not transfer
+responsibility for freeing it to the png_set_rows or png_read_destroy function,
+because they would also try to free the individual row_pointers[i].
+
+If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword
+separately, do not transfer responsibility for freeing text_ptr to libpng,
+because when libpng fills a png_text structure it combines these members with
+the key member, and png_free_data() will free only text_ptr.key. Similarly,
+if you transfer responsibility for free'ing text_ptr from libpng to your
+application, your application must not separately free those members.
+
+The png_free_data() function will turn off the "valid" flag for anything
+it frees. If you need to turn the flag off for a chunk that was freed by
+your application instead of by libpng, you can use
+
+ png_set_invalid(png_ptr, info_ptr, mask);
+ mask - identifies the chunks to be made invalid,
+ containing the bitwise OR of one or
+ more of
+ PNG_INFO_gAMA, PNG_INFO_sBIT,
+ PNG_INFO_cHRM, PNG_INFO_PLTE,
+ PNG_INFO_tRNS, PNG_INFO_bKGD,
+ PNG_INFO_hIST, PNG_INFO_pHYs,
+ PNG_INFO_oFFs, PNG_INFO_tIME,
+ PNG_INFO_pCAL, PNG_INFO_sRGB,
+ PNG_INFO_iCCP, PNG_INFO_sPLT,
+ PNG_INFO_sCAL, PNG_INFO_IDAT
+
+For a more compact example of reading a PNG image, see the file example.c.
+
+Reading PNG files progressively
+
+The progressive reader is slightly different then the non-progressive
+reader. Instead of calling png_read_info(), png_read_rows(), and
+png_read_end(), you make one call to png_process_data(), which calls
+callbacks when it has the info, a row, or the end of the image. You
+set up these callbacks with png_set_progressive_read_fn(). You don't
+have to worry about the input/output functions of libpng, as you are
+giving the library the data directly in png_process_data(). I will
+assume that you have read the section on reading PNG files above,
+so I will only highlight the differences (although I will show
+all of the code).
+
+png_structp png_ptr;
+png_infop info_ptr;
+
+ /* An example code fragment of how you would
+ initialize the progressive reader in your
+ application. */
+ int
+ initialize_png_reader()
+ {
+ png_ptr = png_create_read_struct
+ (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
+ user_error_fn, user_warning_fn);
+ if (!png_ptr)
+ return (ERROR);
+ info_ptr = png_create_info_struct(png_ptr);
+ if (!info_ptr)
+ {
+ png_destroy_read_struct(&png_ptr, (png_infopp)NULL,
+ (png_infopp)NULL);
+ return (ERROR);
+ }
+
+ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr,
+ (png_infopp)NULL);
+ return (ERROR);
+ }
+
+ /* This one's new. You can provide functions
+ to be called when the header info is valid,
+ when each row is completed, and when the image
+ is finished. If you aren't using all functions,
+ you can specify NULL parameters. Even when all
+ three functions are NULL, you need to call
+ png_set_progressive_read_fn(). You can use
+ any struct as the user_ptr (cast to a void pointer
+ for the function call), and retrieve the pointer
+ from inside the callbacks using the function
+
+ png_get_progressive_ptr(png_ptr);
+
+ which will return a void pointer, which you have
+ to cast appropriately.
+ */
+ png_set_progressive_read_fn(png_ptr, (void *)user_ptr,
+ info_callback, row_callback, end_callback);
+
+ return 0;
+ }
+
+ /* A code fragment that you call as you receive blocks
+ of data */
+ int
+ process_data(png_bytep buffer, png_uint_32 length)
+ {
+ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr,
+ (png_infopp)NULL);
+ return (ERROR);
+ }
+
+ /* This one's new also. Simply give it a chunk
+ of data from the file stream (in order, of
+ course). On machines with segmented memory
+ models machines, don't give it any more than
+ 64K. The library seems to run fine with sizes
+ of 4K. Although you can give it much less if
+ necessary (I assume you can give it chunks of
+ 1 byte, I haven't tried less then 256 bytes
+ yet). When this function returns, you may
+ want to display any rows that were generated
+ in the row callback if you don't already do
+ so there.
+ */
+ png_process_data(png_ptr, info_ptr, buffer, length);
+ return 0;
+ }
+
+ /* This function is called (as set by
+ png_set_progressive_read_fn() above) when enough data
+ has been supplied so all of the header has been
+ read.
+ */
+ void
+ info_callback(png_structp png_ptr, png_infop info)
+ {
+ /* Do any setup here, including setting any of
+ the transformations mentioned in the Reading
+ PNG files section. For now, you _must_ call
+ either png_start_read_image() or
+ png_read_update_info() after all the
+ transformations are set (even if you don't set
+ any). You may start getting rows before
+ png_process_data() returns, so this is your
+ last chance to prepare for that.
+ */
+ }
+
+ /* This function is called when each row of image
+ data is complete */
+ void
+ row_callback(png_structp png_ptr, png_bytep new_row,
+ png_uint_32 row_num, int pass)
+ {
+ /* If the image is interlaced, and you turned
+ on the interlace handler, this function will
+ be called for every row in every pass. Some
+ of these rows will not be changed from the
+ previous pass. When the row is not changed,
+ the new_row variable will be NULL. The rows
+ and passes are called in order, so you don't
+ really need the row_num and pass, but I'm
+ supplying them because it may make your life
+ easier.
+
+ For the non-NULL rows of interlaced images,
+ you must call png_progressive_combine_row()
+ passing in the row and the old row. You can
+ call this function for NULL rows (it will just
+ return) and for non-interlaced images (it just
+ does the memcpy for you) if it will make the
+ code easier. Thus, you can just do this for
+ all cases:
+ */
+
+ png_progressive_combine_row(png_ptr, old_row,
+ new_row);
+
+ /* where old_row is what was displayed for
+ previously for the row. Note that the first
+ pass (pass == 0, really) will completely cover
+ the old row, so the rows do not have to be
+ initialized. After the first pass (and only
+ for interlaced images), you will have to pass
+ the current row, and the function will combine
+ the old row and the new row.
+ */
+ }
+
+ void
+ end_callback(png_structp png_ptr, png_infop info)
+ {
+ /* This function is called after the whole image
+ has been read, including any chunks after the
+ image (up to and including the IEND). You
+ will usually have the same info chunk as you
+ had in the header, although some data may have
+ been added to the comments and time fields.
+
+ Most people won't do much here, perhaps setting
+ a flag that marks the image as finished.
+ */
+ }
+
+
+
+IV. Writing
+
+Much of this is very similar to reading. However, everything of
+importance is repeated here, so you won't have to constantly look
+back up in the reading section to understand writing.
+
+Setup
+
+You will want to do the I/O initialization before you get into libpng,
+so if it doesn't work, you don't have anything to undo. If you are not
+using the standard I/O functions, you will need to replace them with
+custom writing functions. See the discussion under Customizing libpng.
+
+ FILE *fp = fopen(file_name, "wb");
+ if (!fp)
+ {
+ return (ERROR);
+ }
+
+Next, png_struct and png_info need to be allocated and initialized.
+As these can be both relatively large, you may not want to store these
+on the stack, unless you have stack space to spare. Of course, you
+will want to check if they return NULL. If you are also reading,
+you won't want to name your read structure and your write structure
+both "png_ptr"; you can call them anything you like, such as
+"read_ptr" and "write_ptr". Look at pngtest.c, for example.
+
+ png_structp png_ptr = png_create_write_struct
+ (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
+ user_error_fn, user_warning_fn);
+ if (!png_ptr)
+ return (ERROR);
+
+ png_infop info_ptr = png_create_info_struct(png_ptr);
+ if (!info_ptr)
+ {
+ png_destroy_write_struct(&png_ptr,
+ (png_infopp)NULL);
+ return (ERROR);
+ }
+
+If you want to use your own memory allocation routines,
+define PNG_USER_MEM_SUPPORTED and use
+png_create_write_struct_2() instead of png_create_write_struct():
+
+ png_structp png_ptr = png_create_write_struct_2
+ (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
+ user_error_fn, user_warning_fn, (png_voidp)
+ user_mem_ptr, user_malloc_fn, user_free_fn);
+
+After you have these structures, you will need to set up the
+error handling. When libpng encounters an error, it expects to
+longjmp() back to your routine. Therefore, you will need to call
+setjmp() and pass the png_jmpbuf(png_ptr). If you
+write the file from different routines, you will need to update
+the png_jmpbuf(png_ptr) every time you enter a new routine that will
+call a png_*() function. See your documentation of setjmp/longjmp
+for your compiler for more information on setjmp/longjmp. See
+the discussion on libpng error handling in the Customizing Libpng
+section below for more information on the libpng error handling.
+
+ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ fclose(fp);
+ return (ERROR);
+ }
+ ...
+ return;
+
+If you would rather avoid the complexity of setjmp/longjmp issues,
+you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case
+errors will result in a call to PNG_ABORT() which defaults to abort().
+
+Now you need to set up the output code. The default for libpng is to
+use the C function fwrite(). If you use this, you will need to pass a
+valid FILE * in the function png_init_io(). Be sure that the file is
+opened in binary mode. Again, if you wish to handle writing data in
+another way, see the discussion on libpng I/O handling in the Customizing
+Libpng section below.
+
+ png_init_io(png_ptr, fp);
+
+If you are embedding your PNG into a datastream such as MNG, and don't
+want libpng to write the 8-byte signature, or if you have already
+written the signature in your application, use
+
+ png_set_sig_bytes(png_ptr, 8);
+
+to inform libpng that it should not write a signature.
+
+Write callbacks
+
+At this point, you can set up a callback function that will be
+called after each row has been written, which you can use to control
+a progress meter or the like. It's demonstrated in pngtest.c.
+You must supply a function
+
+ void write_row_callback(png_ptr, png_uint_32 row,
+ int pass);
+ {
+ /* put your code here */
+ }
+
+(You can give it another name that you like instead of "write_row_callback")
+
+To inform libpng about your function, use
+
+ png_set_write_status_fn(png_ptr, write_row_callback);
+
+You now have the option of modifying how the compression library will
+run. The following functions are mainly for testing, but may be useful
+in some cases, like if you need to write PNG files extremely fast and
+are willing to give up some compression, or if you want to get the
+maximum possible compression at the expense of slower writing. If you
+have no special needs in this area, let the library do what it wants by
+not calling this function at all, as it has been tuned to deliver a good
+speed/compression ratio. The second parameter to png_set_filter() is
+the filter method, for which the only valid values are 0 (as of the
+July 1999 PNG specification, version 1.2) or 64 (if you are writing
+a PNG datastream that is to be embedded in a MNG datastream). The third
+parameter is a flag that indicates which filter type(s) are to be tested
+for each scanline. See the PNG specification for details on the specific
+filter types.
+
+
+ /* turn on or off filtering, and/or choose
+ specific filters. You can use either a single
+ PNG_FILTER_VALUE_NAME or the bitwise OR of one
+ or more PNG_FILTER_NAME masks. */
+ png_set_filter(png_ptr, 0,
+ PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE |
+ PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB |
+ PNG_FILTER_UP | PNG_FILTER_VALUE_UP |
+ PNG_FILTER_AVG | PNG_FILTER_VALUE_AVG |
+ PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH|
+ PNG_ALL_FILTERS);
+
+If an application
+wants to start and stop using particular filters during compression,
+it should start out with all of the filters (to ensure that the previous
+row of pixels will be stored in case it's needed later), and then add
+and remove them after the start of compression.
+
+If you are writing a PNG datastream that is to be embedded in a MNG
+datastream, the second parameter can be either 0 or 64.
+
+The png_set_compression_*() functions interface to the zlib compression
+library, and should mostly be ignored unless you really know what you are
+doing. The only generally useful call is png_set_compression_level()
+which changes how much time zlib spends on trying to compress the image
+data. See the Compression Library (zlib.h and algorithm.txt, distributed
+with zlib) for details on the compression levels.
+
+ /* set the zlib compression level */
+ png_set_compression_level(png_ptr,
+ Z_BEST_COMPRESSION);
+
+ /* set other zlib parameters */
+ png_set_compression_mem_level(png_ptr, 8);
+ png_set_compression_strategy(png_ptr,
+ Z_DEFAULT_STRATEGY);
+ png_set_compression_window_bits(png_ptr, 15);
+ png_set_compression_method(png_ptr, 8);
+ png_set_compression_buffer_size(png_ptr, 8192)
+
+extern PNG_EXPORT(void,png_set_zbuf_size)
+
+Setting the contents of info for output
+
+You now need to fill in the png_info structure with all the data you
+wish to write before the actual image. Note that the only thing you
+are allowed to write after the image is the text chunks and the time
+chunk (as of PNG Specification 1.2, anyway). See png_write_end() and
+the latest PNG specification for more information on that. If you
+wish to write them before the image, fill them in now, and flag that
+data as being valid. If you want to wait until after the data, don't
+fill them until png_write_end(). For all the fields in png_info and
+their data types, see png.h. For explanations of what the fields
+contain, see the PNG specification.
+
+Some of the more important parts of the png_info are:
+
+ png_set_IHDR(png_ptr, info_ptr, width, height,
+ bit_depth, color_type, interlace_type,
+ compression_type, filter_method)
+ width - holds the width of the image
+ in pixels (up to 2^31).
+ height - holds the height of the image
+ in pixels (up to 2^31).
+ bit_depth - holds the bit depth of one of the
+ image channels.
+ (valid values are 1, 2, 4, 8, 16
+ and depend also on the
+ color_type. See also significant
+ bits (sBIT) below).
+ color_type - describes which color/alpha
+ channels are present.
+ PNG_COLOR_TYPE_GRAY
+ (bit depths 1, 2, 4, 8, 16)
+ PNG_COLOR_TYPE_GRAY_ALPHA
+ (bit depths 8, 16)
+ PNG_COLOR_TYPE_PALETTE
+ (bit depths 1, 2, 4, 8)
+ PNG_COLOR_TYPE_RGB
+ (bit_depths 8, 16)
+ PNG_COLOR_TYPE_RGB_ALPHA
+ (bit_depths 8, 16)
+
+ PNG_COLOR_MASK_PALETTE
+ PNG_COLOR_MASK_COLOR
+ PNG_COLOR_MASK_ALPHA
+
+ interlace_type - PNG_INTERLACE_NONE or
+ PNG_INTERLACE_ADAM7
+ compression_type - (must be
+ PNG_COMPRESSION_TYPE_DEFAULT)
+ filter_method - (must be PNG_FILTER_TYPE_DEFAULT
+ or, if you are writing a PNG to
+ be embedded in a MNG datastream,
+ can also be
+ PNG_INTRAPIXEL_DIFFERENCING)
+
+If you call png_set_IHDR(), the call must appear before any of the
+other png_set_*() functions, because they might require access to some of
+the IHDR settings. The remaining png_set_*() functions can be called
+in any order.
+
+If you wish, you can reset the compression_type, interlace_type, or
+filter_method later by calling png_set_IHDR() again; if you do this, the
+width, height, bit_depth, and color_type must be the same in each call.
+
+ png_set_PLTE(png_ptr, info_ptr, palette,
+ num_palette);
+ palette - the palette for the file
+ (array of png_color)
+ num_palette - number of entries in the palette
+
+ png_set_gAMA(png_ptr, info_ptr, gamma);
+ gamma - the gamma the image was created
+ at (PNG_INFO_gAMA)
+
+ png_set_sRGB(png_ptr, info_ptr, srgb_intent);
+ srgb_intent - the rendering intent
+ (PNG_INFO_sRGB) The presence of
+ the sRGB chunk means that the pixel
+ data is in the sRGB color space.
+ This chunk also implies specific
+ values of gAMA and cHRM. Rendering
+ intent is the CSS-1 property that
+ has been defined by the International
+ Color Consortium
+ (http://www.color.org).
+ It can be one of
+ PNG_sRGB_INTENT_SATURATION,
+ PNG_sRGB_INTENT_PERCEPTUAL,
+ PNG_sRGB_INTENT_ABSOLUTE, or
+ PNG_sRGB_INTENT_RELATIVE.
+
+
+ png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr,
+ srgb_intent);
+ srgb_intent - the rendering intent
+ (PNG_INFO_sRGB) The presence of the
+ sRGB chunk means that the pixel
+ data is in the sRGB color space.
+ This function also causes gAMA and
+ cHRM chunks with the specific values
+ that are consistent with sRGB to be
+ written.
+
+ png_set_iCCP(png_ptr, info_ptr, name, compression_type,
+ profile, proflen);
+ name - The profile name.
+ compression - The compression type; always
+ PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
+ You may give NULL to this argument to
+ ignore it.
+ profile - International Color Consortium color
+ profile data. May contain NULs.
+ proflen - length of profile data in bytes.
+
+ png_set_sBIT(png_ptr, info_ptr, sig_bit);
+ sig_bit - the number of significant bits for
+ (PNG_INFO_sBIT) each of the gray, red,
+ green, and blue channels, whichever are
+ appropriate for the given color type
+ (png_color_16)
+
+ png_set_tRNS(png_ptr, info_ptr, trans_alpha,
+ num_trans, trans_color);
+ trans_alpha - array of alpha (transparency)
+ entries for palette (PNG_INFO_tRNS)
+ trans_color - graylevel or color sample values
+ (in order red, green, blue) of the
+ single transparent color for
+ non-paletted images (PNG_INFO_tRNS)
+ num_trans - number of transparent entries
+ (PNG_INFO_tRNS)
+
+ png_set_hIST(png_ptr, info_ptr, hist);
+ (PNG_INFO_hIST)
+ hist - histogram of palette (array of
+ png_uint_16)
+
+ png_set_tIME(png_ptr, info_ptr, mod_time);
+ mod_time - time image was last modified
+ (PNG_VALID_tIME)
+
+ png_set_bKGD(png_ptr, info_ptr, background);
+ background - background color (PNG_VALID_bKGD)
+
+ png_set_text(png_ptr, info_ptr, text_ptr, num_text);
+ text_ptr - array of png_text holding image
+ comments
+ text_ptr[i].compression - type of compression used
+ on "text" PNG_TEXT_COMPRESSION_NONE
+ PNG_TEXT_COMPRESSION_zTXt
+ PNG_ITXT_COMPRESSION_NONE
+ PNG_ITXT_COMPRESSION_zTXt
+ text_ptr[i].key - keyword for comment. Must contain
+ 1-79 characters.
+ text_ptr[i].text - text comments for current
+ keyword. Can be NULL or empty.
+ text_ptr[i].text_length - length of text string,
+ after decompression, 0 for iTXt
+ text_ptr[i].itxt_length - length of itxt string,
+ after decompression, 0 for tEXt/zTXt
+ text_ptr[i].lang - language of comment (NULL or
+ empty for unknown).
+ text_ptr[i].translated_keyword - keyword in UTF-8 (NULL
+ or empty for unknown).
+ Note that the itxt_length, lang, and lang_key
+ members of the text_ptr structure only exist
+ when the library is built with iTXt chunk support.
+
+ num_text - number of comments
+
+ png_set_sPLT(png_ptr, info_ptr, &palette_ptr,
+ num_spalettes);
+ palette_ptr - array of png_sPLT_struct structures
+ to be added to the list of palettes
+ in the info structure.
+ num_spalettes - number of palette structures to be
+ added.
+
+ png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y,
+ unit_type);
+ offset_x - positive offset from the left
+ edge of the screen
+ offset_y - positive offset from the top
+ edge of the screen
+ unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER
+
+ png_set_pHYs(png_ptr, info_ptr, res_x, res_y,
+ unit_type);
+ res_x - pixels/unit physical resolution
+ in x direction
+ res_y - pixels/unit physical resolution
+ in y direction
+ unit_type - PNG_RESOLUTION_UNKNOWN,
+ PNG_RESOLUTION_METER
+
+ png_set_sCAL(png_ptr, info_ptr, unit, width, height)
+ unit - physical scale units (an integer)
+ width - width of a pixel in physical scale units
+ height - height of a pixel in physical scale units
+ (width and height are doubles)
+
+ png_set_sCAL_s(png_ptr, info_ptr, unit, width, height)
+ unit - physical scale units (an integer)
+ width - width of a pixel in physical scale units
+ height - height of a pixel in physical scale units
+ (width and height are strings like "2.54")
+
+ png_set_unknown_chunks(png_ptr, info_ptr, &unknowns,
+ num_unknowns)
+ unknowns - array of png_unknown_chunk
+ structures holding unknown chunks
+ unknowns[i].name - name of unknown chunk
+ unknowns[i].data - data of unknown chunk
+ unknowns[i].size - size of unknown chunk's data
+ unknowns[i].location - position to write chunk in file
+ 0: do not write chunk
+ PNG_HAVE_IHDR: before PLTE
+ PNG_HAVE_PLTE: before IDAT
+ PNG_AFTER_IDAT: after IDAT
+
+The "location" member is set automatically according to
+what part of the output file has already been written.
+You can change its value after calling png_set_unknown_chunks()
+as demonstrated in pngtest.c. Within each of the "locations",
+the chunks are sequenced according to their position in the
+structure (that is, the value of "i", which is the order in which
+the chunk was either read from the input file or defined with
+png_set_unknown_chunks).
+
+A quick word about text and num_text. text is an array of png_text
+structures. num_text is the number of valid structures in the array.
+Each png_text structure holds a language code, a keyword, a text value,
+and a compression type.
+
+The compression types have the same valid numbers as the compression
+types of the image data. Currently, the only valid number is zero.
+However, you can store text either compressed or uncompressed, unlike
+images, which always have to be compressed. So if you don't want the
+text compressed, set the compression type to PNG_TEXT_COMPRESSION_NONE.
+Because tEXt and zTXt chunks don't have a language field, if you
+specify PNG_TEXT_COMPRESSION_NONE or PNG_TEXT_COMPRESSION_zTXt
+any language code or translated keyword will not be written out.
+
+Until text gets around 1000 bytes, it is not worth compressing it.
+After the text has been written out to the file, the compression type
+is set to PNG_TEXT_COMPRESSION_NONE_WR or PNG_TEXT_COMPRESSION_zTXt_WR,
+so that it isn't written out again at the end (in case you are calling
+png_write_end() with the same struct.
+
+The keywords that are given in the PNG Specification are:
+
+ Title Short (one line) title or
+ caption for image
+ Author Name of image's creator
+ Description Description of image (possibly long)
+ Copyright Copyright notice
+ Creation Time Time of original image creation
+ (usually RFC 1123 format, see below)
+ Software Software used to create the image
+ Disclaimer Legal disclaimer
+ Warning Warning of nature of content
+ Source Device used to create the image
+ Comment Miscellaneous comment; conversion
+ from other image format
+
+The keyword-text pairs work like this. Keywords should be short
+simple descriptions of what the comment is about. Some typical
+keywords are found in the PNG specification, as is some recommendations
+on keywords. You can repeat keywords in a file. You can even write
+some text before the image and some after. For example, you may want
+to put a description of the image before the image, but leave the
+disclaimer until after, so viewers working over modem connections
+don't have to wait for the disclaimer to go over the modem before
+they start seeing the image. Finally, keywords should be full
+words, not abbreviations. Keywords and text are in the ISO 8859-1
+(Latin-1) character set (a superset of regular ASCII) and can not
+contain NUL characters, and should not contain control or other
+unprintable characters. To make the comments widely readable, stick
+with basic ASCII, and avoid machine specific character set extensions
+like the IBM-PC character set. The keyword must be present, but
+you can leave off the text string on non-compressed pairs.
+Compressed pairs must have a text string, as only the text string
+is compressed anyway, so the compression would be meaningless.
+
+PNG supports modification time via the png_time structure. Two
+conversion routines are provided, png_convert_from_time_t() for
+time_t and png_convert_from_struct_tm() for struct tm. The
+time_t routine uses gmtime(). You don't have to use either of
+these, but if you wish to fill in the png_time structure directly,
+you should provide the time in universal time (GMT) if possible
+instead of your local time. Note that the year number is the full
+year (e.g. 1998, rather than 98 - PNG is year 2000 compliant!), and
+that months start with 1.
+
+If you want to store the time of the original image creation, you should
+use a plain tEXt chunk with the "Creation Time" keyword. This is
+necessary because the "creation time" of a PNG image is somewhat vague,
+depending on whether you mean the PNG file, the time the image was
+created in a non-PNG format, a still photo from which the image was
+scanned, or possibly the subject matter itself. In order to facilitate
+machine-readable dates, it is recommended that the "Creation Time"
+tEXt chunk use RFC 1123 format dates (e.g. "22 May 1997 18:07:10 GMT"),
+although this isn't a requirement. Unlike the tIME chunk, the
+"Creation Time" tEXt chunk is not expected to be automatically changed
+by the software. To facilitate the use of RFC 1123 dates, a function
+png_convert_to_rfc1123(png_timep) is provided to convert from PNG
+time to an RFC 1123 format string.
+
+Writing unknown chunks
+
+You can use the png_set_unknown_chunks function to queue up chunks
+for writing. You give it a chunk name, raw data, and a size; that's
+all there is to it. The chunks will be written by the next following
+png_write_info_before_PLTE, png_write_info, or png_write_end function.
+Any chunks previously read into the info structure's unknown-chunk
+list will also be written out in a sequence that satisfies the PNG
+specification's ordering rules.
+
+The high-level write interface
+
+At this point there are two ways to proceed; through the high-level
+write interface, or through a sequence of low-level write operations.
+You can use the high-level interface if your image data is present
+in the info structure. All defined output
+transformations are permitted, enabled by the following masks.
+
+ PNG_TRANSFORM_IDENTITY No transformation
+ PNG_TRANSFORM_PACKING Pack 1, 2 and 4-bit samples
+ PNG_TRANSFORM_PACKSWAP Change order of packed
+ pixels to LSB first
+ PNG_TRANSFORM_INVERT_MONO Invert monochrome images
+ PNG_TRANSFORM_SHIFT Normalize pixels to the
+ sBIT depth
+ PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA
+ to BGRA
+ PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA
+ to AG
+ PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity
+ to transparency
+ PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples
+ PNG_TRANSFORM_STRIP_FILLER Strip out filler
+ bytes (deprecated).
+ PNG_TRANSFORM_STRIP_FILLER_BEFORE Strip out leading
+ filler bytes
+ PNG_TRANSFORM_STRIP_FILLER_AFTER Strip out trailing
+ filler bytes
+
+If you have valid image data in the info structure (you can use
+png_set_rows() to put image data in the info structure), simply do this:
+
+ png_write_png(png_ptr, info_ptr, png_transforms, NULL)
+
+where png_transforms is an integer containing the bitwise OR of some set of
+transformation flags. This call is equivalent to png_write_info(),
+followed the set of transformations indicated by the transform mask,
+then png_write_image(), and finally png_write_end().
+
+(The final parameter of this call is not yet used. Someday it might point
+to transformation parameters required by some future output transform.)
+
+You must use png_transforms and not call any png_set_transform() functions
+when you use png_write_png().
+
+The low-level write interface
+
+If you are going the low-level route instead, you are now ready to
+write all the file information up to the actual image data. You do
+this with a call to png_write_info().
+
+ png_write_info(png_ptr, info_ptr);
+
+Note that there is one transformation you may need to do before
+png_write_info(). In PNG files, the alpha channel in an image is the
+level of opacity. If your data is supplied as a level of transparency,
+you can invert the alpha channel before you write it, so that 0 is
+fully transparent and 255 (in 8-bit or paletted images) or 65535
+(in 16-bit images) is fully opaque, with
+
+ png_set_invert_alpha(png_ptr);
+
+This must appear before png_write_info() instead of later with the
+other transformations because in the case of paletted images the tRNS
+chunk data has to be inverted before the tRNS chunk is written. If
+your image is not a paletted image, the tRNS data (which in such cases
+represents a single color to be rendered as transparent) won't need to
+be changed, and you can safely do this transformation after your
+png_write_info() call.
+
+If you need to write a private chunk that you want to appear before
+the PLTE chunk when PLTE is present, you can write the PNG info in
+two steps, and insert code to write your own chunk between them:
+
+ png_write_info_before_PLTE(png_ptr, info_ptr);
+ png_set_unknown_chunks(png_ptr, info_ptr, ...);
+ png_write_info(png_ptr, info_ptr);
+
+After you've written the file information, you can set up the library
+to handle any special transformations of the image data. The various
+ways to transform the data will be described in the order that they
+should occur. This is important, as some of these change the color
+type and/or bit depth of the data, and some others only work on
+certain color types and bit depths. Even though each transformation
+checks to see if it has data that it can do something with, you should
+make sure to only enable a transformation if it will be valid for the
+data. For example, don't swap red and blue on grayscale data.
+
+PNG files store RGB pixels packed into 3 or 6 bytes. This code tells
+the library to strip input data that has 4 or 8 bytes per pixel down
+to 3 or 6 bytes (or strip 2 or 4-byte grayscale+filler data to 1 or 2
+bytes per pixel).
+
+ png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE);
+
+where the 0 is unused, and the location is either PNG_FILLER_BEFORE or
+PNG_FILLER_AFTER, depending upon whether the filler byte in the pixel
+is stored XRGB or RGBX.
+
+PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as
+they can, resulting in, for example, 8 pixels per byte for 1 bit files.
+If the data is supplied at 1 pixel per byte, use this code, which will
+correctly pack the pixels into a single byte:
+
+ png_set_packing(png_ptr);
+
+PNG files reduce possible bit depths to 1, 2, 4, 8, and 16. If your
+data is of another bit depth, you can write an sBIT chunk into the
+file so that decoders can recover the original data if desired.
+
+ /* Set the true bit depth of the image data */
+ if (color_type & PNG_COLOR_MASK_COLOR)
+ {
+ sig_bit.red = true_bit_depth;
+ sig_bit.green = true_bit_depth;
+ sig_bit.blue = true_bit_depth;
+ }
+ else
+ {
+ sig_bit.gray = true_bit_depth;
+ }
+ if (color_type & PNG_COLOR_MASK_ALPHA)
+ {
+ sig_bit.alpha = true_bit_depth;
+ }
+
+ png_set_sBIT(png_ptr, info_ptr, &sig_bit);
+
+If the data is stored in the row buffer in a bit depth other than
+one supported by PNG (e.g. 3 bit data in the range 0-7 for a 4-bit PNG),
+this will scale the values to appear to be the correct bit depth as
+is required by PNG.
+
+ png_set_shift(png_ptr, &sig_bit);
+
+PNG files store 16 bit pixels in network byte order (big-endian,
+ie. most significant bits first). This code would be used if they are
+supplied the other way (little-endian, i.e. least significant bits
+first, the way PCs store them):
+
+ if (bit_depth > 8)
+ png_set_swap(png_ptr);
+
+If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you
+need to change the order the pixels are packed into bytes, you can use:
+
+ if (bit_depth < 8)
+ png_set_packswap(png_ptr);
+
+PNG files store 3 color pixels in red, green, blue order. This code
+would be used if they are supplied as blue, green, red:
+
+ png_set_bgr(png_ptr);
+
+PNG files describe monochrome as black being zero and white being
+one. This code would be used if the pixels are supplied with this reversed
+(black being one and white being zero):
+
+ png_set_invert_mono(png_ptr);
+
+Finally, you can write your own transformation function if none of
+the existing ones meets your needs. This is done by setting a callback
+with
+
+ png_set_write_user_transform_fn(png_ptr,
+ write_transform_fn);
+
+You must supply the function
+
+ void write_transform_fn(png_ptr ptr, row_info_ptr
+ row_info, png_bytep data)
+
+See pngtest.c for a working example. Your function will be called
+before any of the other transformations are processed.
+
+You can also set up a pointer to a user structure for use by your
+callback function.
+
+ png_set_user_transform_info(png_ptr, user_ptr, 0, 0);
+
+The user_channels and user_depth parameters of this function are ignored
+when writing; you can set them to zero as shown.
+
+You can retrieve the pointer via the function png_get_user_transform_ptr().
+For example:
+
+ voidp write_user_transform_ptr =
+ png_get_user_transform_ptr(png_ptr);
+
+It is possible to have libpng flush any pending output, either manually,
+or automatically after a certain number of lines have been written. To
+flush the output stream a single time call:
+
+ png_write_flush(png_ptr);
+
+and to have libpng flush the output stream periodically after a certain
+number of scanlines have been written, call:
+
+ png_set_flush(png_ptr, nrows);
+
+Note that the distance between rows is from the last time png_write_flush()
+was called, or the first row of the image if it has never been called.
+So if you write 50 lines, and then png_set_flush 25, it will flush the
+output on the next scanline, and every 25 lines thereafter, unless
+png_write_flush() is called before 25 more lines have been written.
+If nrows is too small (less than about 10 lines for a 640 pixel wide
+RGB image) the image compression may decrease noticeably (although this
+may be acceptable for real-time applications). Infrequent flushing will
+only degrade the compression performance by a few percent over images
+that do not use flushing.
+
+Writing the image data
+
+That's it for the transformations. Now you can write the image data.
+The simplest way to do this is in one function call. If you have the
+whole image in memory, you can just call png_write_image() and libpng
+will write the image. You will need to pass in an array of pointers to
+each row. This function automatically handles interlacing, so you don't
+need to call png_set_interlace_handling() or call this function multiple
+times, or any of that other stuff necessary with png_write_rows().
+
+ png_write_image(png_ptr, row_pointers);
+
+where row_pointers is:
+
+ png_byte *row_pointers[height];
+
+You can point to void or char or whatever you use for pixels.
+
+If you don't want to write the whole image at once, you can
+use png_write_rows() instead. If the file is not interlaced,
+this is simple:
+
+ png_write_rows(png_ptr, row_pointers,
+ number_of_rows);
+
+row_pointers is the same as in the png_write_image() call.
+
+If you are just writing one row at a time, you can do this with
+a single row_pointer instead of an array of row_pointers:
+
+ png_bytep row_pointer = row;
+
+ png_write_row(png_ptr, row_pointer);
+
+When the file is interlaced, things can get a good deal more complicated.
+The only currently (as of the PNG Specification version 1.2, dated July
+1999) defined interlacing scheme for PNG files is the "Adam7" interlace
+scheme, that breaks down an image into seven smaller images of varying
+size. libpng will build these images for you, or you can do them
+yourself. If you want to build them yourself, see the PNG specification
+for details of which pixels to write when.
+
+If you don't want libpng to handle the interlacing details, just
+use png_set_interlace_handling() and call png_write_rows() the
+correct number of times to write all seven sub-images.
+
+If you want libpng to build the sub-images, call this before you start
+writing any rows:
+
+ number_of_passes =
+ png_set_interlace_handling(png_ptr);
+
+This will return the number of passes needed. Currently, this is seven,
+but may change if another interlace type is added.
+
+Then write the complete image number_of_passes times.
+
+ png_write_rows(png_ptr, row_pointers,
+ number_of_rows);
+
+As some of these rows are not used, and thus return immediately, you may
+want to read about interlacing in the PNG specification, and only update
+the rows that are actually used.
+
+Finishing a sequential write
+
+After you are finished writing the image, you should finish writing
+the file. If you are interested in writing comments or time, you should
+pass an appropriately filled png_info pointer. If you are not interested,
+you can pass NULL.
+
+ png_write_end(png_ptr, info_ptr);
+
+When you are done, you can free all memory used by libpng like this:
+
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+
+It is also possible to individually free the info_ptr members that
+point to libpng-allocated storage with the following function:
+
+ png_free_data(png_ptr, info_ptr, mask, seq)
+ mask - identifies data to be freed, a mask
+ containing the bitwise OR of one or
+ more of
+ PNG_FREE_PLTE, PNG_FREE_TRNS,
+ PNG_FREE_HIST, PNG_FREE_ICCP,
+ PNG_FREE_PCAL, PNG_FREE_ROWS,
+ PNG_FREE_SCAL, PNG_FREE_SPLT,
+ PNG_FREE_TEXT, PNG_FREE_UNKN,
+ or simply PNG_FREE_ALL
+ seq - sequence number of item to be freed
+ (-1 for all items)
+
+This function may be safely called when the relevant storage has
+already been freed, or has not yet been allocated, or was allocated
+by the user and not by libpng, and will in those cases do nothing.
+The "seq" parameter is ignored if only one item of the selected data
+type, such as PLTE, is allowed. If "seq" is not -1, and multiple items
+are allowed for the data type identified in the mask, such as text or
+sPLT, only the n'th item in the structure is freed, where n is "seq".
+
+If you allocated data such as a palette that you passed in to libpng
+with png_set_*, you must not free it until just before the call to
+png_destroy_write_struct().
+
+The default behavior is only to free data that was allocated internally
+by libpng. This can be changed, so that libpng will not free the data,
+or so that it will free data that was allocated by the user with png_malloc()
+or png_zalloc() and passed in via a png_set_*() function, with
+
+ png_data_freer(png_ptr, info_ptr, freer, mask)
+ mask - which data elements are affected
+ same choices as in png_free_data()
+ freer - one of
+ PNG_DESTROY_WILL_FREE_DATA
+ PNG_SET_WILL_FREE_DATA
+ PNG_USER_WILL_FREE_DATA
+
+For example, to transfer responsibility for some data from a read structure
+to a write structure, you could use
+
+ png_data_freer(read_ptr, read_info_ptr,
+ PNG_USER_WILL_FREE_DATA,
+ PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST)
+ png_data_freer(write_ptr, write_info_ptr,
+ PNG_DESTROY_WILL_FREE_DATA,
+ PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST)
+
+thereby briefly reassigning responsibility for freeing to the user but
+immediately afterwards reassigning it once more to the write_destroy
+function. Having done this, it would then be safe to destroy the read
+structure and continue to use the PLTE, tRNS, and hIST data in the write
+structure.
+
+This function only affects data that has already been allocated.
+You can call this function before calling after the png_set_*() functions
+to control whether the user or png_destroy_*() is supposed to free the data.
+When the user assumes responsibility for libpng-allocated data, the
+application must use
+png_free() to free it, and when the user transfers responsibility to libpng
+for data that the user has allocated, the user must have used png_malloc()
+or png_zalloc() to allocate it.
+
+If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword
+separately, do not transfer responsibility for freeing text_ptr to libpng,
+because when libpng fills a png_text structure it combines these members with
+the key member, and png_free_data() will free only text_ptr.key. Similarly,
+if you transfer responsibility for free'ing text_ptr from libpng to your
+application, your application must not separately free those members.
+For a more compact example of writing a PNG image, see the file example.c.
+
+V. Modifying/Customizing libpng:
+
+There are two issues here. The first is changing how libpng does
+standard things like memory allocation, input/output, and error handling.
+The second deals with more complicated things like adding new chunks,
+adding new transformations, and generally changing how libpng works.
+Both of those are compile-time issues; that is, they are generally
+determined at the time the code is written, and there is rarely a need
+to provide the user with a means of changing them.
+
+Memory allocation, input/output, and error handling
+
+All of the memory allocation, input/output, and error handling in libpng
+goes through callbacks that are user-settable. The default routines are
+in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change
+these functions, call the appropriate png_set_*_fn() function.
+
+Memory allocation is done through the functions png_malloc(), png_calloc(),
+and png_free(). These currently just call the standard C functions.
+png_calloc() calls png_malloc() and then png_memset() to clear the newly
+allocated memory to zero. If your pointers can't access more then 64K
+at a time, you will want to set MAXSEG_64K in zlib.h. Since it is
+unlikely that the method of handling memory allocation on a platform
+will change between applications, these functions must be modified in
+the library at compile time. If you prefer to use a different method
+of allocating and freeing data, you can use png_create_read_struct_2() or
+png_create_write_struct_2() to register your own functions as described
+above. These functions also provide a void pointer that can be retrieved
+via
+
+ mem_ptr=png_get_mem_ptr(png_ptr);
+
+Your replacement memory functions must have prototypes as follows:
+
+ png_voidp malloc_fn(png_structp png_ptr,
+ png_size_t size);
+ void free_fn(png_structp png_ptr, png_voidp ptr);
+
+Your malloc_fn() must return NULL in case of failure. The png_malloc()
+function will normally call png_error() if it receives a NULL from the
+system memory allocator or from your replacement malloc_fn().
+
+Your free_fn() will never be called with a NULL ptr, since libpng's
+png_free() checks for NULL before calling free_fn().
+
+Input/Output in libpng is done through png_read() and png_write(),
+which currently just call fread() and fwrite(). The FILE * is stored in
+png_struct and is initialized via png_init_io(). If you wish to change
+the method of I/O, the library supplies callbacks that you can set
+through the function png_set_read_fn() and png_set_write_fn() at run
+time, instead of calling the png_init_io() function. These functions
+also provide a void pointer that can be retrieved via the function
+png_get_io_ptr(). For example:
+
+ png_set_read_fn(png_structp read_ptr,
+ voidp read_io_ptr, png_rw_ptr read_data_fn)
+
+ png_set_write_fn(png_structp write_ptr,
+ voidp write_io_ptr, png_rw_ptr write_data_fn,
+ png_flush_ptr output_flush_fn);
+
+ voidp read_io_ptr = png_get_io_ptr(read_ptr);
+ voidp write_io_ptr = png_get_io_ptr(write_ptr);
+
+The replacement I/O functions must have prototypes as follows:
+
+ void user_read_data(png_structp png_ptr,
+ png_bytep data, png_size_t length);
+ void user_write_data(png_structp png_ptr,
+ png_bytep data, png_size_t length);
+ void user_flush_data(png_structp png_ptr);
+
+The user_read_data() function is responsible for detecting and
+handling end-of-data errors.
+
+Supplying NULL for the read, write, or flush functions sets them back
+to using the default C stream functions, which expect the io_ptr to
+point to a standard *FILE structure. It is probably a mistake
+to use NULL for one of write_data_fn and output_flush_fn but not both
+of them, unless you have built libpng with PNG_NO_WRITE_FLUSH defined.
+It is an error to read from a write stream, and vice versa.
+
+Error handling in libpng is done through png_error() and png_warning().
+Errors handled through png_error() are fatal, meaning that png_error()
+should never return to its caller. Currently, this is handled via
+setjmp() and longjmp() (unless you have compiled libpng with
+PNG_SETJMP_NOT_SUPPORTED, in which case it is handled via PNG_ABORT()),
+but you could change this to do things like exit() if you should wish.
+
+On non-fatal errors, png_warning() is called
+to print a warning message, and then control returns to the calling code.
+By default png_error() and png_warning() print a message on stderr via
+fprintf() unless the library is compiled with PNG_NO_CONSOLE_IO defined
+(because you don't want the messages) or PNG_NO_STDIO defined (because
+fprintf() isn't available). If you wish to change the behavior of the error
+functions, you will need to set up your own message callbacks. These
+functions are normally supplied at the time that the png_struct is created.
+It is also possible to redirect errors and warnings to your own replacement
+functions after png_create_*_struct() has been called by calling:
+
+ png_set_error_fn(png_structp png_ptr,
+ png_voidp error_ptr, png_error_ptr error_fn,
+ png_error_ptr warning_fn);
+
+ png_voidp error_ptr = png_get_error_ptr(png_ptr);
+
+If NULL is supplied for either error_fn or warning_fn, then the libpng
+default function will be used, calling fprintf() and/or longjmp() if a
+problem is encountered. The replacement error functions should have
+parameters as follows:
+
+ void user_error_fn(png_structp png_ptr,
+ png_const_charp error_msg);
+ void user_warning_fn(png_structp png_ptr,
+ png_const_charp warning_msg);
+
+The motivation behind using setjmp() and longjmp() is the C++ throw and
+catch exception handling methods. This makes the code much easier to write,
+as there is no need to check every return code of every function call.
+However, there are some uncertainties about the status of local variables
+after a longjmp, so the user may want to be careful about doing anything
+after setjmp returns non-zero besides returning itself. Consult your
+compiler documentation for more details. For an alternative approach, you
+may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net).
+
+Custom chunks
+
+If you need to read or write custom chunks, you may need to get deeper
+into the libpng code. The library now has mechanisms for storing
+and writing chunks of unknown type; you can even declare callbacks
+for custom chunks. However, this may not be good enough if the
+library code itself needs to know about interactions between your
+chunk and existing `intrinsic' chunks.
+
+If you need to write a new intrinsic chunk, first read the PNG
+specification. Acquire a first level of understanding of how it works.
+Pay particular attention to the sections that describe chunk names,
+and look at how other chunks were designed, so you can do things
+similarly. Second, check out the sections of libpng that read and
+write chunks. Try to find a chunk that is similar to yours and use
+it as a template. More details can be found in the comments inside
+the code. It is best to handle unknown chunks in a generic method,
+via callback functions, instead of by modifying libpng functions.
+
+If you wish to write your own transformation for the data, look through
+the part of the code that does the transformations, and check out some of
+the simpler ones to get an idea of how they work. Try to find a similar
+transformation to the one you want to add and copy off of it. More details
+can be found in the comments inside the code itself.
+
+Configuring for 16 bit platforms
+
+You will want to look into zconf.h to tell zlib (and thus libpng) that
+it cannot allocate more then 64K at a time. Even if you can, the memory
+won't be accessible. So limit zlib and libpng to 64K by defining MAXSEG_64K.
+
+Configuring for DOS
+
+For DOS users who only have access to the lower 640K, you will
+have to limit zlib's memory usage via a png_set_compression_mem_level()
+call. See zlib.h or zconf.h in the zlib library for more information.
+
+Configuring for Medium Model
+
+Libpng's support for medium model has been tested on most of the popular
+compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets
+defined, and FAR gets defined to far in pngconf.h, and you should be
+all set. Everything in the library (except for zlib's structure) is
+expecting far data. You must use the typedefs with the p or pp on
+the end for pointers (or at least look at them and be careful). Make
+note that the rows of data are defined as png_bytepp, which is an
+unsigned char far * far *.
+
+Configuring for gui/windowing platforms:
+
+You will need to write new error and warning functions that use the GUI
+interface, as described previously, and set them to be the error and
+warning functions at the time that png_create_*_struct() is called,
+in order to have them available during the structure initialization.
+They can be changed later via png_set_error_fn(). On some compilers,
+you may also have to change the memory allocators (png_malloc, etc.).
+
+Configuring for compiler xxx:
+
+All includes for libpng are in pngconf.h. If you need to add, change
+or delete an include, this is the place to do it.
+The includes that are not needed outside libpng are placed in pngpriv.h,
+which is only used by the routines inside libpng itself.
+The files in libpng proper only include pngpriv.h and png.h, which
+in turn includes pngconf.h.
+
+Configuring zlib:
+
+There are special functions to configure the compression. Perhaps the
+most useful one changes the compression level, which currently uses
+input compression values in the range 0 - 9. The library normally
+uses the default compression level (Z_DEFAULT_COMPRESSION = 6). Tests
+have shown that for a large majority of images, compression values in
+the range 3-6 compress nearly as well as higher levels, and do so much
+faster. For online applications it may be desirable to have maximum speed
+(Z_BEST_SPEED = 1). With versions of zlib after v0.99, you can also
+specify no compression (Z_NO_COMPRESSION = 0), but this would create
+files larger than just storing the raw bitmap. You can specify the
+compression level by calling:
+
+ png_set_compression_level(png_ptr, level);
+
+Another useful one is to reduce the memory level used by the library.
+The memory level defaults to 8, but it can be lowered if you are
+short on memory (running DOS, for example, where you only have 640K).
+Note that the memory level does have an effect on compression; among
+other things, lower levels will result in sections of incompressible
+data being emitted in smaller stored blocks, with a correspondingly
+larger relative overhead of up to 15% in the worst case.
+
+ png_set_compression_mem_level(png_ptr, level);
+
+The other functions are for configuring zlib. They are not recommended
+for normal use and may result in writing an invalid PNG file. See
+zlib.h for more information on what these mean.
+
+ png_set_compression_strategy(png_ptr,
+ strategy);
+ png_set_compression_window_bits(png_ptr,
+ window_bits);
+ png_set_compression_method(png_ptr, method);
+ png_set_compression_buffer_size(png_ptr, size);
+
+Controlling row filtering
+
+If you want to control whether libpng uses filtering or not, which
+filters are used, and how it goes about picking row filters, you
+can call one of these functions. The selection and configuration
+of row filters can have a significant impact on the size and
+encoding speed and a somewhat lesser impact on the decoding speed
+of an image. Filtering is enabled by default for RGB and grayscale
+images (with and without alpha), but not for paletted images nor
+for any images with bit depths less than 8 bits/pixel.
+
+The 'method' parameter sets the main filtering method, which is
+currently only '0' in the PNG 1.2 specification. The 'filters'
+parameter sets which filter(s), if any, should be used for each
+scanline. Possible values are PNG_ALL_FILTERS and PNG_NO_FILTERS
+to turn filtering on and off, respectively.
+
+Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB,
+PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise
+ORed together with '|' to specify one or more filters to use.
+These filters are described in more detail in the PNG specification.
+If you intend to change the filter type during the course of writing
+the image, you should start with flags set for all of the filters
+you intend to use so that libpng can initialize its internal
+structures appropriately for all of the filter types. (Note that this
+means the first row must always be adaptively filtered, because libpng
+currently does not allocate the filter buffers until png_write_row()
+is called for the first time.)
+
+ filters = PNG_FILTER_NONE | PNG_FILTER_SUB
+ PNG_FILTER_UP | PNG_FILTER_AVG |
+ PNG_FILTER_PAETH | PNG_ALL_FILTERS;
+
+ png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE,
+ filters);
+ The second parameter can also be
+ PNG_INTRAPIXEL_DIFFERENCING if you are
+ writing a PNG to be embedded in a MNG
+ datastream. This parameter must be the
+ same as the value of filter_method used
+ in png_set_IHDR().
+
+It is also possible to influence how libpng chooses from among the
+available filters. This is done in one or both of two ways - by
+telling it how important it is to keep the same filter for successive
+rows, and by telling it the relative computational costs of the filters.
+
+ double weights[3] = {1.5, 1.3, 1.1},
+ costs[PNG_FILTER_VALUE_LAST] =
+ {1.0, 1.3, 1.3, 1.5, 1.7};
+
+ png_set_filter_heuristics(png_ptr,
+ PNG_FILTER_HEURISTIC_WEIGHTED, 3,
+ weights, costs);
+
+The weights are multiplying factors that indicate to libpng that the
+row filter should be the same for successive rows unless another row filter
+is that many times better than the previous filter. In the above example,
+if the previous 3 filters were SUB, SUB, NONE, the SUB filter could have a
+"sum of absolute differences" 1.5 x 1.3 times higher than other filters
+and still be chosen, while the NONE filter could have a sum 1.1 times
+higher than other filters and still be chosen. Unspecified weights are
+taken to be 1.0, and the specified weights should probably be declining
+like those above in order to emphasize recent filters over older filters.
+
+The filter costs specify for each filter type a relative decoding cost
+to be considered when selecting row filters. This means that filters
+with higher costs are less likely to be chosen over filters with lower
+costs, unless their "sum of absolute differences" is that much smaller.
+The costs do not necessarily reflect the exact computational speeds of
+the various filters, since this would unduly influence the final image
+size.
+
+Note that the numbers above were invented purely for this example and
+are given only to help explain the function usage. Little testing has
+been done to find optimum values for either the costs or the weights.
+
+Removing unwanted object code
+
+There are a bunch of #define's in pngconf.h that control what parts of
+libpng are compiled. All the defines end in _SUPPORTED. If you are
+never going to use a capability, you can change the #define to #undef
+before recompiling libpng and save yourself code and data space, or
+you can turn off individual capabilities with defines that begin with
+PNG_NO_.
+
+You can also turn all of the transforms and ancillary chunk capabilities
+off en masse with compiler directives that define
+PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS,
+or all four,
+along with directives to turn on any of the capabilities that you do
+want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable the extra
+transformations but still leave the library fully capable of reading
+and writing PNG files with all known public chunks. Use of the
+PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive produces a library
+that is incapable of reading or writing ancillary chunks. If you are
+not using the progressive reading capability, you can turn that off
+with PNG_NO_PROGRESSIVE_READ (don't confuse this with the INTERLACING
+capability, which you'll still have).
+
+All the reading and writing specific code are in separate files, so the
+linker should only grab the files it needs. However, if you want to
+make sure, or if you are building a stand alone library, all the
+reading files start with pngr and all the writing files start with
+pngw. The files that don't match either (like png.c, pngtrans.c, etc.)
+are used for both reading and writing, and always need to be included.
+The progressive reader is in pngpread.c
+
+If you are creating or distributing a dynamically linked library (a .so
+or DLL file), you should not remove or disable any parts of the library,
+as this will cause applications linked with different versions of the
+library to fail if they call functions not available in your library.
+The size of the library itself should not be an issue, because only
+those sections that are actually used will be loaded into memory.
+
+Requesting debug printout
+
+The macro definition PNG_DEBUG can be used to request debugging
+printout. Set it to an integer value in the range 0 to 3. Higher
+numbers result in increasing amounts of debugging information. The
+information is printed to the "stderr" file, unless another file
+name is specified in the PNG_DEBUG_FILE macro definition.
+
+When PNG_DEBUG > 0, the following functions (macros) become available:
+
+ png_debug(level, message)
+ png_debug1(level, message, p1)
+ png_debug2(level, message, p1, p2)
+
+in which "level" is compared to PNG_DEBUG to decide whether to print
+the message, "message" is the formatted string to be printed,
+and p1 and p2 are parameters that are to be embedded in the string
+according to printf-style formatting directives. For example,
+
+ png_debug1(2, "foo=%d\n", foo);
+
+is expanded to
+
+ if(PNG_DEBUG > 2)
+ fprintf(PNG_DEBUG_FILE, "foo=%d\n", foo);
+
+When PNG_DEBUG is defined but is zero, the macros aren't defined, but you
+can still use PNG_DEBUG to control your own debugging:
+
+ #ifdef PNG_DEBUG
+ fprintf(stderr, ...
+ #endif
+
+When PNG_DEBUG = 1, the macros are defined, but only png_debug statements
+having level = 0 will be printed. There aren't any such statements in
+this version of libpng, but if you insert some they will be printed.
+
+VI. MNG support
+
+The MNG specification (available at http://www.libpng.org/pub/mng) allows
+certain extensions to PNG for PNG images that are embedded in MNG datastreams.
+Libpng can support some of these extensions. To enable them, use the
+png_permit_mng_features() function:
+
+ feature_set = png_permit_mng_features(png_ptr, mask)
+ mask is a png_uint_32 containing the bitwise OR of the
+ features you want to enable. These include
+ PNG_FLAG_MNG_EMPTY_PLTE
+ PNG_FLAG_MNG_FILTER_64
+ PNG_ALL_MNG_FEATURES
+ feature_set is a png_uint_32 that is the bitwise AND of
+ your mask with the set of MNG features that is
+ supported by the version of libpng that you are using.
+
+It is an error to use this function when reading or writing a standalone
+PNG file with the PNG 8-byte signature. The PNG datastream must be wrapped
+in a MNG datastream. As a minimum, it must have the MNG 8-byte signature
+and the MHDR and MEND chunks. Libpng does not provide support for these
+or any other MNG chunks; your application must provide its own support for
+them. You may wish to consider using libmng (available at
+http://www.libmng.com) instead.
+
+VII. Changes to Libpng from version 0.88
+
+It should be noted that versions of libpng later than 0.96 are not
+distributed by the original libpng author, Guy Schalnat, nor by
+Andreas Dilger, who had taken over from Guy during 1996 and 1997, and
+distributed versions 0.89 through 0.96, but rather by another member
+of the original PNG Group, Glenn Randers-Pehrson. Guy and Andreas are
+still alive and well, but they have moved on to other things.
+
+The old libpng functions png_read_init(), png_write_init(),
+png_info_init(), png_read_destroy(), and png_write_destroy() have been
+moved to PNG_INTERNAL in version 0.95 to discourage their use. These
+functions will be removed from libpng version 2.0.0.
+
+The preferred method of creating and initializing the libpng structures is
+via the png_create_read_struct(), png_create_write_struct(), and
+png_create_info_struct() because they isolate the size of the structures
+from the application, allow version error checking, and also allow the
+use of custom error handling routines during the initialization, which
+the old functions do not. The functions png_read_destroy() and
+png_write_destroy() do not actually free the memory that libpng
+allocated for these structs, but just reset the data structures, so they
+can be used instead of png_destroy_read_struct() and
+png_destroy_write_struct() if you feel there is too much system overhead
+allocating and freeing the png_struct for each image read.
+
+Setting the error callbacks via png_set_message_fn() before
+png_read_init() as was suggested in libpng-0.88 is no longer supported
+because this caused applications that do not use custom error functions
+to fail if the png_ptr was not initialized to zero. It is still possible
+to set the error callbacks AFTER png_read_init(), or to change them with
+png_set_error_fn(), which is essentially the same function, but with a new
+name to force compilation errors with applications that try to use the old
+method.
+
+Starting with version 1.0.7, you can find out which version of the library
+you are using at run-time:
+
+ png_uint_32 libpng_vn = png_access_version_number();
+
+The number libpng_vn is constructed from the major version, minor
+version with leading zero, and release number with leading zero,
+(e.g., libpng_vn for version 1.0.7 is 10007).
+
+You can also check which version of png.h you used when compiling your
+application:
+
+ png_uint_32 application_vn = PNG_LIBPNG_VER;
+
+VIII. Changes to Libpng from version 1.0.x to 1.2.x
+
+Support for user memory management was enabled by default. To
+accomplish this, the functions png_create_read_struct_2(),
+png_create_write_struct_2(), png_set_mem_fn(), png_get_mem_ptr(),
+png_malloc_default(), and png_free_default() were added.
+
+Support for the iTXt chunk has been enabled by default as of
+version 1.2.41.
+
+Support for certain MNG features was enabled.
+
+Support for numbered error messages was added. However, we never got
+around to actually numbering the error messages. The function
+png_set_strip_error_numbers() was added (Note: the prototype for this
+function was inadvertently removed from png.h in PNG_NO_ASSEMBLER_CODE
+builds of libpng-1.2.15. It was restored in libpng-1.2.36).
+
+The png_malloc_warn() function was added at libpng-1.2.3. This issues
+a png_warning and returns NULL instead of aborting when it fails to
+acquire the requested memory allocation.
+
+Support for setting user limits on image width and height was enabled
+by default. The functions png_set_user_limits(), png_get_user_width_max(),
+and png_get_user_height_max() were added at libpng-1.2.6.
+
+The png_set_add_alpha() function was added at libpng-1.2.7.
+
+The function png_set_expand_gray_1_2_4_to_8() was added at libpng-1.2.9.
+Unlike png_set_gray_1_2_4_to_8(), the new function does not expand the
+tRNS chunk to alpha. The png_set_gray_1_2_4_to_8() function is
+deprecated.
+
+A number of macro definitions in support of runtime selection of
+assembler code features (especially Intel MMX code support) were
+added at libpng-1.2.0:
+
+ PNG_ASM_FLAG_MMX_SUPPORT_COMPILED
+ PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU
+ PNG_ASM_FLAG_MMX_READ_COMBINE_ROW
+ PNG_ASM_FLAG_MMX_READ_INTERLACE
+ PNG_ASM_FLAG_MMX_READ_FILTER_SUB
+ PNG_ASM_FLAG_MMX_READ_FILTER_UP
+ PNG_ASM_FLAG_MMX_READ_FILTER_AVG
+ PNG_ASM_FLAG_MMX_READ_FILTER_PAETH
+ PNG_ASM_FLAGS_INITIALIZED
+ PNG_MMX_READ_FLAGS
+ PNG_MMX_FLAGS
+ PNG_MMX_WRITE_FLAGS
+ PNG_MMX_FLAGS
+
+We added the following functions in support of runtime
+selection of assembler code features:
+
+ png_get_mmx_flagmask()
+ png_set_mmx_thresholds()
+ png_get_asm_flags()
+ png_get_mmx_bitdepth_threshold()
+ png_get_mmx_rowbytes_threshold()
+ png_set_asm_flags()
+
+We replaced all of these functions with simple stubs in libpng-1.2.20,
+when the Intel assembler code was removed due to a licensing issue.
+
+These macros are deprecated:
+
+ PNG_READ_TRANSFORMS_NOT_SUPPORTED
+ PNG_PROGRESSIVE_READ_NOT_SUPPORTED
+ PNG_NO_SEQUENTIAL_READ_SUPPORTED
+ PNG_WRITE_TRANSFORMS_NOT_SUPPORTED
+ PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED
+ PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED
+
+They have been replaced, respectively, by:
+
+ PNG_NO_READ_TRANSFORMS
+ PNG_NO_PROGRESSIVE_READ
+ PNG_NO_SEQUENTIAL_READ
+ PNG_NO_WRITE_TRANSFORMS
+ PNG_NO_READ_ANCILLARY_CHUNKS
+ PNG_NO_WRITE_ANCILLARY_CHUNKS
+
+PNG_MAX_UINT was replaced with PNG_UINT_31_MAX. It has been
+deprecated since libpng-1.0.16 and libpng-1.2.6.
+
+The function
+ png_check_sig(sig, num)
+was replaced with
+ !png_sig_cmp(sig, 0, num)
+It has been deprecated since libpng-0.90.
+
+The function
+ png_set_gray_1_2_4_to_8()
+which also expands tRNS to alpha was replaced with
+ png_set_expand_gray_1_2_4_to_8()
+which does not. It has been deprecated since libpng-1.0.18 and 1.2.9.
+
+IX. Changes to Libpng from version 1.0.x/1.2.x to 1.4.x
+
+Private libpng prototypes and macro definitions were moved from
+png.h and pngconf.h into a new pngpriv.h header file.
+
+Functions png_set_benign_errors(), png_benign_error(), and
+png_chunk_benign_error() were added.
+
+Support for setting the maximum amount of memory that the application
+will allocate for reading chunks was added, as a security measure.
+The functions png_set_chunk_cache_max() and png_get_chunk_cache_max()
+were added to the library.
+
+We implemented support for I/O states by adding png_ptr member io_state
+and functions png_get_io_chunk_name() and png_get_io_state() in pngget.c
+
+We added PNG_TRANSFORM_GRAY_TO_RGB to the available high-level
+input transforms.
+
+Checking for and reporting of errors in the IHDR chunk is more thorough.
+
+Support for global arrays was removed, to improve thread safety.
+
+Some obsolete/deprecated macros and functions have been removed.
+
+Typecasted NULL definitions such as
+ #define png_voidp_NULL (png_voidp)NULL
+were eliminated. If you used these in your application, just use
+NULL instead.
+
+The png_struct and info_struct members "trans" and "trans_values" were
+changed to "trans_alpha" and "trans_color", respectively.
+
+The obsolete, unused pnggccrd.c and pngvcrd.c files and related makefiles
+were removed.
+
+The PNG_1_0_X and PNG_1_2_X macros were eliminated.
+
+The PNG_LEGACY_SUPPORTED macro was eliminated.
+
+Many WIN32_WCE #ifdefs were removed.
+
+The functions png_read_init(info_ptr), png_write_init(info_ptr),
+png_info_init(info_ptr), png_read_destroy(), and png_write_destroy()
+have been removed. They have been deprecated since libpng-0.95.
+
+The png_permit_empty_plte() was removed. It has been deprecated
+since libpng-1.0.9. Use png_permit_mng_features() instead.
+
+We removed the obsolete stub functions png_get_mmx_flagmask(),
+png_set_mmx_thresholds(), png_get_asm_flags(),
+png_get_mmx_bitdepth_threshold(), png_get_mmx_rowbytes_threshold(),
+png_set_asm_flags(), and png_mmx_supported()
+
+We removed the obsolete png_check_sig(), png_memcpy_check(), and
+png_memset_check() functions. Instead use !png_sig_cmp(), png_memcpy(),
+and png_memset(), respectively.
+
+The function png_set_gray_1_2_4_to_8() was removed. It has been
+deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with
+png_set_expand_gray_1_2_4_to_8() because the former function also
+expanded palette images.
+
+We changed the prototype for png_malloc() from
+ png_malloc(png_structp png_ptr, png_uint_32 size)
+to
+ png_malloc(png_structp png_ptr, png_alloc_size_t size)
+
+The png_calloc() function was added and is used in place of
+of "png_malloc(); png_memset();" except in the case in png_read_png()
+where the array consists of pointers; in this case a "for" loop is used
+after the png_malloc() to set the pointers to NULL, to give robust.
+behavior in case the application runs out of memory part-way through
+the process.
+
+We changed the prototypes of png_get_compression_buffer_size() and
+png_set_compression_buffer_size() to work with png_size_t instead of
+png_uint_32.
+
+Support for numbered error messages was removed by default, since we
+never got around to actually numbering the error messages. The function
+png_set_strip_error_numbers() was removed from the library by default.
+
+The png_zalloc() and png_zfree() functions are no longer exported.
+The png_zalloc() function no longer zeroes out the memory that it
+allocates.
+
+We removed the trailing '.' from the warning and error messages.
+
+X. Detecting libpng
+
+The png_get_io_ptr() function has been present since libpng-0.88, has never
+changed, and is unaffected by conditional compilation macros. It is the
+best choice for use in configure scripts for detecting the presence of any
+libpng version since 0.88. In an autoconf "configure.in" you could use
+
+ AC_CHECK_LIB(png, png_get_io_ptr, ...
+
+XI. Source code repository
+
+Since about February 2009, version 1.2.34, libpng has been under "git" source
+control. The git repository was built from old libpng-x.y.z.tar.gz files
+going back to version 0.70. You can access the git repository (read only)
+at
+
+ git://libpng.git.sourceforge.net/gitroot/libpng
+
+or you can browse it via "gitweb" at
+
+ http://libpng.git.sourceforge.net/git/gitweb.cgi?p=libpng
+
+Patches can be sent to glennrp at users.sourceforge.net or to
+png-mng-implement at lists.sourceforge.net or you can upload them to
+the libpng bug tracker at
+
+ http://libpng.sourceforge.net
+
+XII. Coding style
+
+Our coding style is similar to the "Allman" style, with curly
+braces on separate lines:
+
+ if (condition)
+ {
+ action;
+ }
+
+ else if (another condition)
+ {
+ another action;
+ }
+
+The braces can be omitted from simple one-line actions:
+
+ if (condition)
+ return (0);
+
+We use 3-space indentation, except for continued statements which
+are usually indented the same as the first line of the statement
+plus four more spaces.
+
+For macro definitions we use 2-space indentation, always leaving the "#"
+in the first column.
+
+ #ifndef PNG_NO_FEATURE
+ # ifndef PNG_FEATURE_SUPPORTED
+ # define PNG_FEATURE_SUPPORTED
+ # endif
+ #endif
+
+Comments appear with the leading "/*" at the same indentation as
+the statement that follows the comment:
+
+ /* Single-line comment */
+ statement;
+
+ /* Multiple-line
+ * comment
+ */
+ statement;
+
+Very short comments can be placed at the end of the statement
+to which they pertain:
+
+ statement; /* comment */
+
+We don't use C++ style ("//") comments. We have, however,
+used them in the past in some now-abandoned MMX assembler
+code.
+
+Functions and their curly braces are not indented, and
+exported functions are marked with PNGAPI:
+
+ /* This is a public function that is visible to
+ * application programers. It does thus-and-so.
+ */
+ void PNGAPI
+ png_exported_function(png_ptr, png_info, foo)
+ {
+ body;
+ }
+
+The prototypes for all exported functions appear in png.h,
+above the comment that says
+
+ /* Maintainer: Put new public prototypes here ... */
+
+We mark all non-exported functions with "/* PRIVATE */"":
+
+ void /* PRIVATE */
+ png_non_exported_function(png_ptr, png_info, foo)
+ {
+ body;
+ }
+
+The prototypes for non-exported functions (except for those in
+pngtest) appear in
+pngpriv.h
+above the comment that says
+
+ /* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
+
+The names of all exported functions and variables begin
+with "png_", and all publicly visible C preprocessor
+macros begin with "PNG_".
+
+We put a space after each comma and after each semicolon
+in "for" statments, and we put spaces before and after each
+C binary operator and after "for" or "while". We don't
+put a space between a typecast and the expression being
+cast, nor do we put one between a function name and the
+left parenthesis that follows it:
+
+ for (i = 2; i > 0; --i)
+ y[i] = a(x) + (int)b;
+
+We prefer #ifdef and #ifndef to #if defined() and if !defined()
+when there is only one macro being tested.
+
+We do not use the TAB character for indentation in the C sources.
+
+Lines do not exceed 80 characters.
+
+Other rules can be inferred by inspecting the libpng source.
+
+XIII. Y2K Compliance in libpng
+
+January 3, 2010
+
+Since the PNG Development group is an ad-hoc body, we can't make
+an official declaration.
+
+This is your unofficial assurance that libpng from version 0.71 and
+upward through 1.4.0 are Y2K compliant. It is my belief that earlier
+versions were also Y2K compliant.
+
+Libpng only has three year fields. One is a 2-byte unsigned integer that
+will hold years up to 65535. The other two hold the date in text
+format, and will hold years up to 9999.
+
+The integer is
+ "png_uint_16 year" in png_time_struct.
+
+The strings are
+ "png_charp time_buffer" in png_struct and
+ "near_time_buffer", which is a local character string in png.c.
+
+There are seven time-related functions:
+
+ png_convert_to_rfc_1123() in png.c
+ (formerly png_convert_to_rfc_1152() in error)
+ png_convert_from_struct_tm() in pngwrite.c, called
+ in pngwrite.c
+ png_convert_from_time_t() in pngwrite.c
+ png_get_tIME() in pngget.c
+ png_handle_tIME() in pngrutil.c, called in pngread.c
+ png_set_tIME() in pngset.c
+ png_write_tIME() in pngwutil.c, called in pngwrite.c
+
+All appear to handle dates properly in a Y2K environment. The
+png_convert_from_time_t() function calls gmtime() to convert from system
+clock time, which returns (year - 1900), which we properly convert to
+the full 4-digit year. There is a possibility that applications using
+libpng are not passing 4-digit years into the png_convert_to_rfc_1123()
+function, or that they are incorrectly passing only a 2-digit year
+instead of "year - 1900" into the png_convert_from_struct_tm() function,
+but this is not under our control. The libpng documentation has always
+stated that it works with 4-digit years, and the APIs have been
+documented as such.
+
+The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned
+integer to hold the year, and can hold years as large as 65535.
+
+zlib, upon which libpng depends, is also Y2K compliant. It contains
+no date-related code.
+
+
+ Glenn Randers-Pehrson
+ libpng maintainer
+ PNG Development Group
diff --git a/src/3rdparty/libpng/libpng-config.in b/src/3rdparty/libpng/libpng-config.in
new file mode 100755
index 0000000000..2987cef8ee
--- /dev/null
+++ b/src/3rdparty/libpng/libpng-config.in
@@ -0,0 +1,127 @@
+#! /bin/sh
+
+# libpng-config
+# provides configuration info for libpng.
+
+# Copyright (C) 2002, 2004, 2006, 2007 Glenn Randers-Pehrson
+
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Modeled after libxml-config.
+
+version="@PNGLIB_VERSION@"
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+libdir="@libdir@"
+includedir="@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
+libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
+all_libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ @LIBS@"
+I_opts="-I${includedir}"
+L_opts="-L${libdir}"
+R_opts=""
+cppflags=""
+ccopts=""
+ldopts=""
+
+usage()
+{
+ cat <<EOF
+Usage: $0 [OPTION] ...
+
+Known values for OPTION are:
+
+ --prefix print libpng prefix
+ --libdir print path to directory containing library
+ --libs print library linking information
+ --ccopts print compiler options
+ --cppflags print pre-processor flags
+ --cflags print preprocessor flags, I_opts, and compiler options
+ --I_opts print "-I" include options
+ --L_opts print linker "-L" flags for dynamic linking
+ --R_opts print dynamic linker "-R" or "-rpath" flags
+ --ldopts print linker options
+ --ldflags print linker flags (ldopts, L_opts, R_opts, and libs)
+ --static revise subsequent outputs for static linking
+ --help print this help and exit
+ --version print version information
+EOF
+
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1
+fi
+
+while test $# -gt 0; do
+ case "$1" in
+
+ --prefix)
+ echo ${prefix}
+ ;;
+
+ --version)
+ echo ${version}
+ exit 0
+ ;;
+
+ --help)
+ usage 0
+ ;;
+
+ --ccopts)
+ echo ${ccopts}
+ ;;
+
+ --cppflags)
+ echo ${cppflags}
+ ;;
+
+ --cflags)
+ echo ${I_opts} ${cppflags} ${ccopts}
+ ;;
+
+ --libdir)
+ echo ${libdir}
+ ;;
+
+ --libs)
+ echo ${libs}
+ ;;
+
+ --I_opts)
+ echo ${I_opts}
+ ;;
+
+ --L_opts)
+ echo ${L_opts}
+ ;;
+
+ --R_opts)
+ echo ${R_opts}
+ ;;
+
+ --ldopts)
+ echo ${ldopts}
+ ;;
+
+ --ldflags)
+ echo ${ldopts} ${L_opts} ${R_opts} ${libs}
+ ;;
+
+ --static)
+ R_opts=""
+ libs=${all_libs}
+ ;;
+
+ *)
+ usage
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+exit 0
diff --git a/src/3rdparty/libpng/libpng.3 b/src/3rdparty/libpng/libpng.3
index 65b368624e..6b77fde4e7 100644
--- a/src/3rdparty/libpng/libpng.3
+++ b/src/3rdparty/libpng/libpng.3
@@ -1,6 +1,6 @@
-.TH LIBPNG 3 "September 10, 2009"
+.TH LIBPNG 3 "January 3, 2010"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
+libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
.SH SYNOPSIS
\fI\fB
@@ -12,7 +12,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fBint png_check_sig (png_bytep \fP\fIsig\fP\fB, int \fInum\fP\fB);\fP
+\fBvoid png_benign_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP
+
+\fI\fB
+
+\fBvoid png_chunk_benign_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP
\fI\fB
@@ -56,18 +60,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fBint png_debug(int \fP\fIlevel\fP\fB, png_const_charp \fImessage\fP\fB);\fP
-
-\fI\fB
-
-\fBint png_debug1(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fIp1\fP\fB);\fP
-
-\fI\fB
-
-\fBint png_debug2(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fP\fIp1\fP\fB, \fIp2\fP\fB);\fP
-
-\fI\fB
-
\fBvoid png_destroy_info_struct (png_structp \fP\fIpng_ptr\fP\fB, png_infopp \fIinfo_ptr_ptr\fP\fB);\fP
\fI\fB
@@ -120,10 +112,18 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
+\fBpng_uint_32 png_get_chunk_cache_max (png_structp \fIpng_ptr\fP\fB);\fP
+
+\fI\fB
+
\fBpng_byte png_get_color_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
+\fBpng_uint_32 png_get_compression_buffer_size (png_structp \fIpng_ptr\fP\fB);\fP
+
+\fI\fB
+
\fBpng_byte png_get_compression_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
@@ -176,12 +176,8 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fB#if \fI!defined(PNG_1_0_X)
-
\fBpng_int_32 png_get_int_32 (png_bytep \fIbuf\fP\fB);\fP
-\fI\fB#endif
-
\fI\fB
\fBpng_byte png_get_interlace_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
@@ -262,11 +258,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fBpng_uint_32 png_get_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fI*trans\fP\fB, int \fP\fI*num_trans\fP\fB, png_color_16p \fI*trans_values\fP\fB);\fP
+\fBpng_uint_32 png_get_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fI*trans\fP\fB, int \fP\fI*num_trans\fP\fB, png_color_16p \fI*trans_color\fP\fB);\fP
\fI\fB
-\fB#if \fI!defined(PNG_1_0_X)
+\fB/* This function is really an inline macro. \fI*/
\fBpng_uint_16 png_get_uint_16 (png_bytep \fIbuf\fP\fB);\fP
@@ -276,9 +272,9 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fBpng_uint_32 png_get_uint_32 (png_bytep \fIbuf\fP\fB);\fP
+\fB/* This function is really an inline macro. \fI*/
-\fI\fB#endif
+\fBpng_uint_32 png_get_uint_32 (png_bytep \fIbuf\fP\fB);\fP
\fI\fB
@@ -330,10 +326,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fBpng_uint_32 png_get_compression_buffer_size (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
\fBint png_handle_as_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP
\fI\fB
@@ -342,19 +334,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fBDEPRECATED: void png_info_init (png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBDEPRECATED: void png_info_init_2 (png_infopp \fP\fIptr_ptr\fP\fB, png_size_t \fIpng_info_struct_size\fP\fB);\fP
+\fBpng_voidp png_malloc (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP
\fI\fB
-\fBpng_voidp png_malloc (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP
-
-\fI\fB
-
-\fBpng_voidp png_malloc_default(png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP
+\fBpng_voidp png_malloc_default(png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP
\fI\fB
@@ -362,22 +346,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fBpng_voidp png_memcpy_check (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIs1\fP\fB, png_voidp \fP\fIs2\fP\fB, png_uint_32 \fIsize\fP\fB);\fP
-
-\fI\fB
-
\fBvoidp png_memset (png_voidp \fP\fIs1\fP\fB, int \fP\fIvalue\fP\fB, png_size_t \fIsize\fP\fB);\fP
\fI\fB
-\fBpng_voidp png_memset_check (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIs1\fP\fB, int \fP\fIvalue\fP\fB, png_uint_32 \fIsize\fP\fB);\fP
-
-\fI\fB
-
-\fBDEPRECATED: void png_permit_empty_plte (png_structp \fP\fIpng_ptr\fP\fB, int \fIempty_plte_permitted\fP\fB);\fP
-
-\fI\fB
-
\fBvoid png_process_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_size\fP\fB);\fP
\fI\fB
@@ -386,10 +358,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fBvoid png_read_destroy (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_infop \fIend_info_ptr\fP\fB);\fP
-
-\fI\fB
-
\fBvoid png_read_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
@@ -398,14 +366,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fBDEPRECATED: void png_read_init (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBDEPRECATED: void png_read_init_2 (png_structpp \fP\fIptr_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP
-
-\fI\fB
-
\fBvoid png_read_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
@@ -426,8 +386,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fB#if \fI!defined(PNG_1_0_X)
-
\fBpng_save_int_32 (png_bytep \fP\fIbuf\fP\fB, png_int_32 \fIi\fP\fB);\fP
\fI\fB
@@ -442,8 +400,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fBvoid png_set_add_alpha (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, int \fIflags\fP\fB);\fP
-\fI\fB#endif
-
\fI\fB
\fBvoid png_set_background (png_structp \fP\fIpng_ptr\fP\fB, png_color_16p \fP\fIbackground_color\fP\fB, int \fP\fIbackground_gamma_code\fP\fB, int \fP\fIneed_expand\fP\fB, double \fIbackground_gamma\fP\fB);\fP
@@ -466,6 +422,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
+\fBvoid png_set_chunk_cache_max (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIuser_chunk_cache_max\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_set_compression_level (png_structp \fP\fIpng_ptr\fP\fB, int \fIlevel\fP\fB);\fP
\fI\fB
@@ -574,6 +534,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
+\fBjmp_buf* png_set_longjmp_fn (png_structp \fP\fIpng_ptr\fP\fB, png_longjmp_ptr \fP\fIlongjmp_fn\fP\fB, size_t \fIjmp_buf_size\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_set_mem_fn(png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP
\fI\fB
@@ -686,7 +650,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fBvoid png_set_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fP\fInum_trans\fP\fB, png_color_16p \fItrans_values\fP\fB);\fP
+\fBvoid png_set_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fP\fInum_trans\fP\fB, png_color_16p \fItrans_color\fP\fB);\fP
\fI\fB
@@ -758,10 +722,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fBvoid png_write_destroy (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
\fBvoid png_write_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
@@ -774,14 +734,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fBDEPRECATED: void png_write_init (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBDEPRECATED: void png_write_init_2 (png_structpp \fP\fIptr_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP
-
-\fI\fB
-
\fBvoid png_write_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
@@ -802,6 +754,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
+\fBvoid png_write_sig (png_structp \fIpng_ptr\fP\fB);\fP
+
+\fI\fB
+
\fBvoidpf png_zalloc (voidpf \fP\fIpng_ptr\fP\fB, uInt \fP\fIitems\fP\fB, uInt \fIsize\fP\fB);\fP
\fI\fB
@@ -821,7 +777,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng.txt - A description on how to use and modify libpng
- libpng version 1.2.40 - September 10, 2009
+ libpng version 1.4.0 - January 3, 2010
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@@ -832,7 +788,7 @@ libpng.txt - A description on how to use and modify libpng
Based on:
- libpng versions 0.97, January 1998, through 1.2.40 - September 10, 2009
+ libpng versions 0.97, January 1998, through 1.4.0 - January 3, 2010
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@@ -861,8 +817,8 @@ will need. We assume that libpng is already installed; see the
INSTALL file for instructions on how to install libpng.
For examples of libpng usage, see the files "example.c", "pngtest.c",
-and the files in the "contrib" directory, all of which are included in the
-libpng distribution.
+and the files in the "contrib" directory, all of which are included in
+the libpng distribution.
Libpng was written as a companion to the PNG specification, as a way
of reducing the amount of time and effort it takes to support the PNG
@@ -1231,6 +1187,19 @@ If you need to retrieve the limits that are being applied, use
width_max = png_get_user_width_max(png_ptr);
height_max = png_get_user_height_max(png_ptr);
+The PNG specification sets no limit on the number of ancillary chunks
+allowed in a PNG datastream. You can impose a limit on the total number
+of sPLT, tEXt, iTXt, zTXt, and unknown chunks that will be stored, with
+
+ png_set_chunk_cache_max(png_ptr, user_chunk_cache_max);
+
+where 0x7fffffffL means unlimited. You can retrieve this limit with
+
+ chunk_cache_max = png_get_chunk_cache_max(png_ptr);
+
+This limit also applies to the number of buffers that can be allocated
+by png_decompress_chunk() while decompressing iTXt, zTXt, and iCCP chunks.
+
.SS The high-level read interface
At this point there are two ways to proceed; through the high-level
@@ -1258,14 +1227,16 @@ you want to do are limited to the following set:
PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity
to transparency
PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples
+ PNG_TRANSFORM_GRAY_TO_RGB Expand grayscale samples
+ to RGB (or GA to RGBA)
(This excludes setting a background color, doing gamma transformation,
dithering, and setting filler.) If this is the case, simply do this:
png_read_png(png_ptr, info_ptr, png_transforms, NULL)
-where png_transforms is an integer containing the bitwise OR of
-some set of transformation flags. This call is equivalent to png_read_info(),
+where png_transforms is an integer containing the bitwise OR of some
+set of transformation flags. This call is equivalent to png_read_info(),
followed the set of transformations indicated by the transform mask,
then png_read_image(), and finally png_read_end().
@@ -1366,10 +1337,33 @@ in until png_read_end() has read the chunk data following the image.
for PNG 1.0)
interlace_type - (PNG_INTERLACE_NONE or
PNG_INTERLACE_ADAM7)
- Any or all of interlace_type, compression_type, of
+
+ Any or all of interlace_type, compression_type, or
filter_method can be NULL if you are
not interested in their values.
+ Note that png_get_IHDR() returns 32-bit data into
+ the application's width and height variables.
+ This is an unsafe situation if these are 16-bit
+ variables. In such situations, the
+ png_get_image_width() and png_get_image_height()
+ functions described below are safer.
+
+ width = png_get_image_width(png_ptr,
+ info_ptr);
+ height = png_get_image_height(png_ptr,
+ info_ptr);
+ bit_depth = png_get_bit_depth(png_ptr,
+ info_ptr);
+ color_type = png_get_color_type(png_ptr,
+ info_ptr);
+ filter_method = png_get_filter_type(png_ptr,
+ info_ptr);
+ compression_type = png_get_compression_type(png_ptr,
+ info_ptr);
+ interlace_type = png_get_interlace_type(png_ptr,
+ info_ptr);
+
channels = png_get_channels(png_ptr, info_ptr);
channels - number of channels of info for the
color type (valid values are 1 (GRAY,
@@ -1389,29 +1383,12 @@ in until png_read_end() has read the chunk data following the image.
be in signature[4] through signature[7]
(see png_set_sig_bytes())).
-
- width = png_get_image_width(png_ptr,
- info_ptr);
- height = png_get_image_height(png_ptr,
- info_ptr);
- bit_depth = png_get_bit_depth(png_ptr,
- info_ptr);
- color_type = png_get_color_type(png_ptr,
- info_ptr);
- filter_method = png_get_filter_type(png_ptr,
- info_ptr);
- compression_type = png_get_compression_type(png_ptr,
- info_ptr);
- interlace_type = png_get_interlace_type(png_ptr,
- info_ptr);
-
-
These are also important, but their validity depends on whether the chunk
has been read. The png_get_valid(png_ptr, info_ptr, PNG_INFO_<chunk>) and
png_get_<chunk>(png_ptr, info_ptr, ...) functions return non-zero if the
data has been read, or zero if it is missing. The parameters to the
-png_get_<chunk> are set directly if they are simple data types, or a pointer
-into the info_ptr is returned for any complex types.
+png_get_<chunk> are set directly if they are simple data types, or a
+pointer into the info_ptr is returned for any complex types.
png_get_PLTE(png_ptr, info_ptr, &palette,
&num_palette);
@@ -1449,11 +1426,11 @@ into the info_ptr is returned for any complex types.
whichever are appropriate for the
given color type (png_color_16)
- png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans,
- &trans_values);
- trans - array of transparent entries for
- palette (PNG_INFO_tRNS)
- trans_values - graylevel or color sample values of
+ png_get_tRNS(png_ptr, info_ptr, &trans_alpha,
+ &num_trans, &trans_color);
+ trans_alpha - array of alpha (transparency)
+ entries for palette (PNG_INFO_tRNS)
+ trans_color - graylevel or color sample values of
the single transparent color for
non-paletted images (PNG_INFO_tRNS)
num_trans - number of transparent entries
@@ -1495,6 +1472,10 @@ into the info_ptr is returned for any complex types.
string for unknown).
text_ptr[i].lang_key - keyword in UTF-8
(empty string for unknown).
+ Note that the itxt_length, lang, and lang_key
+ members of the text_ptr structure only exist
+ when the library is built with iTXt chunk support.
+
num_text - number of comments (same as
num_comments; you can put NULL here
to avoid the duplication)
@@ -1674,6 +1655,43 @@ things.
As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was
added. It expands the sample depth without changing tRNS to alpha.
+As of libpng version 1.4.0, not all possible expansions are supported.
+
+In the following table, the 01 means grayscale with depth<8, 31 means
+indexed with depth<8, other numerals represent the color type, "T" means
+the tRNS chunk is present, A means an alpha channel is present, and O
+means tRNS or alpha is present but all pixels in the image are opaque.
+
+ FROM 01 31 0 0T 0O 2 2T 2O 3 3T 3O 4A 4O 6A 6O
+ TO
+ 01 -
+ 31 -
+ 0 1 -
+ 0T -
+ 0O -
+ 2 GX -
+ 2T -
+ 2O -
+ 3 1 -
+ 3T -
+ 3O -
+ 4A T -
+ 4O -
+ 6A GX TX TX -
+ 6O GX TX -
+
+Within the matrix,
+ "-" means the transformation is not supported.
+ "X" means the transformation is obtained by png_set_expand().
+ "1" means the transformation is obtained by
+ png_set_expand_gray_1_2_4_to_8
+ "G" means the transformation is obtained by
+ png_set_gray_to_rgb().
+ "P" means the transformation is obtained by
+ png_set_expand_palette_to_rgb().
+ "T" means the transformation is obtained by
+ png_set_tRNS_to_alpha().
+
PNG can have files with 16 bits per channel. If you only can handle
8 bits per channel, this will strip the pixels down to 8 bit.
@@ -1707,10 +1725,10 @@ values of the pixels:
PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels
stored in a PNG image have been "scaled" or "shifted" up to the next
-higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] to
-8 bits/sample in the range [0, 255]). However, it is also possible to
-convert the PNG pixel data back to the original bit depth of the image.
-This call reduces the pixels back down to the original bit depth:
+higher possible bit depth (e.g. from 5 bits/sample in the range [0,31]
+to 8 bits/sample in the range [0, 255]). However, it is also possible
+to convert the PNG pixel data back to the original bit depth of the
+image. This call reduces the pixels back down to the original bit depth:
png_color_8p sig_bit;
@@ -1897,40 +1915,6 @@ recommended that PNG viewers support gamma correction.
else
png_set_gamma(png_ptr, screen_gamma, 0.45455);
-If you need to reduce an RGB file to a paletted file, or if a paletted
-file has more entries then will fit on your screen, png_set_dither()
-will do that. Note that this is a simple match dither that merely
-finds the closest color available. This should work fairly well with
-optimized palettes, and fairly badly with linear color cubes. If you
-pass a palette that is larger then maximum_colors, the file will
-reduce the number of colors in the palette so it will fit into
-maximum_colors. If there is a histogram, it will use it to make
-more intelligent choices when reducing the palette. If there is no
-histogram, it may not do as good a job.
-
- if (color_type & PNG_COLOR_MASK_COLOR)
- {
- if (png_get_valid(png_ptr, info_ptr,
- PNG_INFO_PLTE))
- {
- png_uint_16p histogram = NULL;
-
- png_get_hIST(png_ptr, info_ptr,
- &histogram);
- png_set_dither(png_ptr, palette, num_palette,
- max_screen_colors, histogram, 1);
- }
- else
- {
- png_color std_color_cube[MAX_SCREEN_COLORS] =
- { ... colors ... };
-
- png_set_dither(png_ptr, std_color_cube,
- MAX_SCREEN_COLORS, MAX_SCREEN_COLORS,
- NULL,0);
- }
- }
-
PNG files describe monochrome as black being zero and white being one.
The following code will reverse this (make black be one and white be
zero):
@@ -2157,12 +2141,11 @@ point to libpng-allocated storage with the following function:
This function may be safely called when the relevant storage has
already been freed, or has not yet been allocated, or was allocated
-by the user and not by libpng, and will in those
-cases do nothing. The "seq" parameter is ignored if only one item
-of the selected data type, such as PLTE, is allowed. If "seq" is not
--1, and multiple items are allowed for the data type identified in
-the mask, such as text or sPLT, only the n'th item in the structure
-is freed, where n is "seq".
+by the user and not by libpng, and will in those cases do nothing.
+The "seq" parameter is ignored if only one item of the selected data
+type, such as PLTE, is allowed. If "seq" is not -1, and multiple items
+are allowed for the data type identified in the mask, such as text or
+sPLT, only the n'th item in the structure is freed, where n is "seq".
The default behavior is only to free data that was allocated internally
by libpng. This can be changed, so that libpng will not free the data,
@@ -2201,8 +2184,8 @@ if you transfer responsibility for free'ing text_ptr from libpng to your
application, your application must not separately free those members.
The png_free_data() function will turn off the "valid" flag for anything
-it frees. If you need to turn the flag off for a chunk that was freed by your
-application instead of by libpng, you can use
+it frees. If you need to turn the flag off for a chunk that was freed by
+your application instead of by libpng, you can use
png_set_invalid(png_ptr, info_ptr, mask);
mask - identifies the chunks to be made invalid,
@@ -2512,8 +2495,8 @@ the filter method, for which the only valid values are 0 (as of the
July 1999 PNG specification, version 1.2) or 64 (if you are writing
a PNG datastream that is to be embedded in a MNG datastream). The third
parameter is a flag that indicates which filter type(s) are to be tested
-for each scanline. See the PNG specification for details on the specific filter
-types.
+for each scanline. See the PNG specification for details on the specific
+filter types.
/* turn on or off filtering, and/or choose
@@ -2679,11 +2662,11 @@ width, height, bit_depth, and color_type must be the same in each call.
appropriate for the given color type
(png_color_16)
- png_set_tRNS(png_ptr, info_ptr, trans, num_trans,
- trans_values);
- trans - array of transparent entries for
- palette (PNG_INFO_tRNS)
- trans_values - graylevel or color sample values
+ png_set_tRNS(png_ptr, info_ptr, trans_alpha,
+ num_trans, trans_color);
+ trans_alpha - array of alpha (transparency)
+ entries for palette (PNG_INFO_tRNS)
+ trans_color - graylevel or color sample values
(in order red, green, blue) of the
single transparent color for
non-paletted images (PNG_INFO_tRNS)
@@ -2722,6 +2705,10 @@ width, height, bit_depth, and color_type must be the same in each call.
empty for unknown).
text_ptr[i].translated_keyword - keyword in UTF-8 (NULL
or empty for unknown).
+ Note that the itxt_length, lang, and lang_key
+ members of the text_ptr structure only exist
+ when the library is built with iTXt chunk support.
+
num_text - number of comments
png_set_sPLT(png_ptr, info_ptr, &palette_ptr,
@@ -2927,10 +2914,10 @@ this with a call to png_write_info().
Note that there is one transformation you may need to do before
png_write_info(). In PNG files, the alpha channel in an image is the
-level of opacity. If your data is supplied as a level of
-transparency, you can invert the alpha channel before you write it, so
-that 0 is fully transparent and 255 (in 8-bit or paletted images) or
-65535 (in 16-bit images) is fully opaque, with
+level of opacity. If your data is supplied as a level of transparency,
+you can invert the alpha channel before you write it, so that 0 is
+fully transparent and 255 (in 8-bit or paletted images) or 65535
+(in 16-bit images) is fully opaque, with
png_set_invert_alpha(png_ptr);
@@ -3117,14 +3104,13 @@ a single row_pointer instead of an array of row_pointers:
png_write_row(png_ptr, row_pointer);
-When the file is interlaced, things can get a good deal more
-complicated. The only currently (as of the PNG Specification
-version 1.2, dated July 1999) defined interlacing scheme for PNG files
-is the "Adam7" interlace scheme, that breaks down an
-image into seven smaller images of varying size. libpng will build
-these images for you, or you can do them yourself. If you want to
-build them yourself, see the PNG specification for details of which
-pixels to write when.
+When the file is interlaced, things can get a good deal more complicated.
+The only currently (as of the PNG Specification version 1.2, dated July
+1999) defined interlacing scheme for PNG files is the "Adam7" interlace
+scheme, that breaks down an image into seven smaller images of varying
+size. libpng will build these images for you, or you can do them
+yourself. If you want to build them yourself, see the PNG specification
+for details of which pixels to write when.
If you don't want libpng to handle the interlacing details, just
use png_set_interlace_handling() and call png_write_rows() the
@@ -3136,17 +3122,17 @@ writing any rows:
number_of_passes =
png_set_interlace_handling(png_ptr);
-This will return the number of passes needed. Currently, this
-is seven, but may change if another interlace type is added.
+This will return the number of passes needed. Currently, this is seven,
+but may change if another interlace type is added.
Then write the complete image number_of_passes times.
png_write_rows(png_ptr, row_pointers,
number_of_rows);
-As some of these rows are not used, and thus return immediately,
-you may want to read about interlacing in the PNG specification,
-and only update the rows that are actually used.
+As some of these rows are not used, and thus return immediately, you may
+want to read about interlacing in the PNG specification, and only update
+the rows that are actually used.
.SS Finishing a sequential write
@@ -3179,15 +3165,14 @@ point to libpng-allocated storage with the following function:
This function may be safely called when the relevant storage has
already been freed, or has not yet been allocated, or was allocated
-by the user and not by libpng, and will in those
-cases do nothing. The "seq" parameter is ignored if only one item
-of the selected data type, such as PLTE, is allowed. If "seq" is not
--1, and multiple items are allowed for the data type identified in
-the mask, such as text or sPLT, only the n'th item in the structure
-is freed, where n is "seq".
-
-If you allocated data such as a palette that you passed
-in to libpng with png_set_*, you must not free it until just before the call to
+by the user and not by libpng, and will in those cases do nothing.
+The "seq" parameter is ignored if only one item of the selected data
+type, such as PLTE, is allowed. If "seq" is not -1, and multiple items
+are allowed for the data type identified in the mask, such as text or
+sPLT, only the n'th item in the structure is freed, where n is "seq".
+
+If you allocated data such as a palette that you passed in to libpng
+with png_set_*, you must not free it until just before the call to
png_destroy_write_struct().
The default behavior is only to free data that was allocated internally
@@ -3253,16 +3238,18 @@ goes through callbacks that are user-settable. The default routines are
in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change
these functions, call the appropriate png_set_*_fn() function.
-Memory allocation is done through the functions png_malloc()
-and png_free(). These currently just call the standard C functions. If
-your pointers can't access more then 64K at a time, you will want to set
-MAXSEG_64K in zlib.h. Since it is unlikely that the method of handling
-memory allocation on a platform will change between applications, these
-functions must be modified in the library at compile time. If you prefer
-to use a different method of allocating and freeing data, you can use
-png_create_read_struct_2() or png_create_write_struct_2() to register
-your own functions as described above.
-These functions also provide a void pointer that can be retrieved via
+Memory allocation is done through the functions png_malloc(), png_calloc(),
+and png_free(). These currently just call the standard C functions.
+png_calloc() calls png_malloc() and then png_memset() to clear the newly
+allocated memory to zero. If your pointers can't access more then 64K
+at a time, you will want to set MAXSEG_64K in zlib.h. Since it is
+unlikely that the method of handling memory allocation on a platform
+will change between applications, these functions must be modified in
+the library at compile time. If you prefer to use a different method
+of allocating and freeing data, you can use png_create_read_struct_2() or
+png_create_write_struct_2() to register your own functions as described
+above. These functions also provide a void pointer that can be retrieved
+via
mem_ptr=png_get_mem_ptr(png_ptr);
@@ -3354,10 +3341,10 @@ The motivation behind using setjmp() and longjmp() is the C++ throw and
catch exception handling methods. This makes the code much easier to write,
as there is no need to check every return code of every function call.
However, there are some uncertainties about the status of local variables
-after a longjmp, so the user may want to be careful about doing anything after
-setjmp returns non-zero besides returning itself. Consult your compiler
-documentation for more details. For an alternative approach, you may wish
-to use the "cexcept" facility (see http://cexcept.sourceforge.net).
+after a longjmp, so the user may want to be careful about doing anything
+after setjmp returns non-zero besides returning itself. Consult your
+compiler documentation for more details. For an alternative approach, you
+may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net).
.SS Custom chunks
@@ -3369,15 +3356,14 @@ library code itself needs to know about interactions between your
chunk and existing `intrinsic' chunks.
If you need to write a new intrinsic chunk, first read the PNG
-specification. Acquire a first level of
-understanding of how it works. Pay particular attention to the
-sections that describe chunk names, and look at how other chunks were
-designed, so you can do things similarly. Second, check out the
-sections of libpng that read and write chunks. Try to find a chunk
-that is similar to yours and use it as a template. More details can
-be found in the comments inside the code. It is best to handle unknown
-chunks in a generic method, via callback functions, instead of by
-modifying libpng functions.
+specification. Acquire a first level of understanding of how it works.
+Pay particular attention to the sections that describe chunk names,
+and look at how other chunks were designed, so you can do things
+similarly. Second, check out the sections of libpng that read and
+write chunks. Try to find a chunk that is similar to yours and use
+it as a template. More details can be found in the comments inside
+the code. It is best to handle unknown chunks in a generic method,
+via callback functions, instead of by modifying libpng functions.
If you wish to write your own transformation for the data, look through
the part of the code that does the transformations, and check out some of
@@ -3421,10 +3407,10 @@ you may also have to change the memory allocators (png_malloc, etc.).
All includes for libpng are in pngconf.h. If you need to add, change
or delete an include, this is the place to do it.
-The includes that are not needed outside libpng are protected by the
-PNG_INTERNAL definition, which is only defined for those routines inside
-libpng itself. The files in libpng proper only include png.h, which
-includes pngconf.h.
+The includes that are not needed outside libpng are placed in pngpriv.h,
+which is only used by the routines inside libpng itself.
+The files in libpng proper only include pngpriv.h and png.h, which
+in turn includes pngconf.h.
.SS Configuring zlib:
@@ -3554,14 +3540,14 @@ off en masse with compiler directives that define
PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS,
or all four,
along with directives to turn on any of the capabilities that you do
-want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable
-the extra transformations but still leave the library fully capable of reading
-and writing PNG files with all known public chunks
-Use of the PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive
-produces a library that is incapable of reading or writing ancillary chunks.
-If you are not using the progressive reading capability, you can
-turn that off with PNG_NO_PROGRESSIVE_READ (don't confuse
-this with the INTERLACING capability, which you'll still have).
+want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable the extra
+transformations but still leave the library fully capable of reading
+and writing PNG files with all known public chunks. Use of the
+PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive produces a library
+that is incapable of reading or writing ancillary chunks. If you are
+not using the progressive reading capability, you can turn that off
+with PNG_NO_PROGRESSIVE_READ (don't confuse this with the INTERLACING
+capability, which you'll still have).
All the reading and writing specific code are in separate files, so the
linker should only grab the files it needs. However, if you want to
@@ -3696,6 +3682,9 @@ accomplish this, the functions png_create_read_struct_2(),
png_create_write_struct_2(), png_set_mem_fn(), png_get_mem_ptr(),
png_malloc_default(), and png_free_default() were added.
+Support for the iTXt chunk has been enabled by default as of
+version 1.2.41.
+
Support for certain MNG features was enabled.
Support for numbered error messages was added. However, we never got
@@ -3750,7 +3739,127 @@ selection of assembler code features:
We replaced all of these functions with simple stubs in libpng-1.2.20,
when the Intel assembler code was removed due to a licensing issue.
-.SH IX. (Omitted)
+These macros are deprecated:
+
+ PNG_READ_TRANSFORMS_NOT_SUPPORTED
+ PNG_PROGRESSIVE_READ_NOT_SUPPORTED
+ PNG_NO_SEQUENTIAL_READ_SUPPORTED
+ PNG_WRITE_TRANSFORMS_NOT_SUPPORTED
+ PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED
+ PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED
+
+They have been replaced, respectively, by:
+
+ PNG_NO_READ_TRANSFORMS
+ PNG_NO_PROGRESSIVE_READ
+ PNG_NO_SEQUENTIAL_READ
+ PNG_NO_WRITE_TRANSFORMS
+ PNG_NO_READ_ANCILLARY_CHUNKS
+ PNG_NO_WRITE_ANCILLARY_CHUNKS
+
+PNG_MAX_UINT was replaced with PNG_UINT_31_MAX. It has been
+deprecated since libpng-1.0.16 and libpng-1.2.6.
+
+The function
+ png_check_sig(sig, num)
+was replaced with
+ !png_sig_cmp(sig, 0, num)
+It has been deprecated since libpng-0.90.
+
+The function
+ png_set_gray_1_2_4_to_8()
+which also expands tRNS to alpha was replaced with
+ png_set_expand_gray_1_2_4_to_8()
+which does not. It has been deprecated since libpng-1.0.18 and 1.2.9.
+
+.SH IX. Changes to Libpng from version 1.0.x/1.2.x to 1.4.x
+
+Private libpng prototypes and macro definitions were moved from
+png.h and pngconf.h into a new pngpriv.h header file.
+
+Functions png_set_benign_errors(), png_benign_error(), and
+png_chunk_benign_error() were added.
+
+Support for setting the maximum amount of memory that the application
+will allocate for reading chunks was added, as a security measure.
+The functions png_set_chunk_cache_max() and png_get_chunk_cache_max()
+were added to the library.
+
+We implemented support for I/O states by adding png_ptr member io_state
+and functions png_get_io_chunk_name() and png_get_io_state() in pngget.c
+
+We added PNG_TRANSFORM_GRAY_TO_RGB to the available high-level
+input transforms.
+
+Checking for and reporting of errors in the IHDR chunk is more thorough.
+
+Support for global arrays was removed, to improve thread safety.
+
+Some obsolete/deprecated macros and functions have been removed.
+
+Typecasted NULL definitions such as
+ #define png_voidp_NULL (png_voidp)NULL
+were eliminated. If you used these in your application, just use
+NULL instead.
+
+The png_struct and info_struct members "trans" and "trans_values" were
+changed to "trans_alpha" and "trans_color", respectively.
+
+The obsolete, unused pnggccrd.c and pngvcrd.c files and related makefiles
+were removed.
+
+The PNG_1_0_X and PNG_1_2_X macros were eliminated.
+
+The PNG_LEGACY_SUPPORTED macro was eliminated.
+
+Many WIN32_WCE #ifdefs were removed.
+
+The functions png_read_init(info_ptr), png_write_init(info_ptr),
+png_info_init(info_ptr), png_read_destroy(), and png_write_destroy()
+have been removed. They have been deprecated since libpng-0.95.
+
+The png_permit_empty_plte() was removed. It has been deprecated
+since libpng-1.0.9. Use png_permit_mng_features() instead.
+
+We removed the obsolete stub functions png_get_mmx_flagmask(),
+png_set_mmx_thresholds(), png_get_asm_flags(),
+png_get_mmx_bitdepth_threshold(), png_get_mmx_rowbytes_threshold(),
+png_set_asm_flags(), and png_mmx_supported()
+
+We removed the obsolete png_check_sig(), png_memcpy_check(), and
+png_memset_check() functions. Instead use !png_sig_cmp(), png_memcpy(),
+and png_memset(), respectively.
+
+The function png_set_gray_1_2_4_to_8() was removed. It has been
+deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with
+png_set_expand_gray_1_2_4_to_8() because the former function also
+expanded palette images.
+
+We changed the prototype for png_malloc() from
+ png_malloc(png_structp png_ptr, png_uint_32 size)
+to
+ png_malloc(png_structp png_ptr, png_alloc_size_t size)
+
+The png_calloc() function was added and is used in place of
+of "png_malloc(); png_memset();" except in the case in png_read_png()
+where the array consists of pointers; in this case a "for" loop is used
+after the png_malloc() to set the pointers to NULL, to give robust.
+behavior in case the application runs out of memory part-way through
+the process.
+
+We changed the prototypes of png_get_compression_buffer_size() and
+png_set_compression_buffer_size() to work with png_size_t instead of
+png_uint_32.
+
+Support for numbered error messages was removed by default, since we
+never got around to actually numbering the error messages. The function
+png_set_strip_error_numbers() was removed from the library by default.
+
+The png_zalloc() and png_zfree() functions are no longer exported.
+The png_zalloc() function no longer zeroes out the memory that it
+allocates.
+
+We removed the trailing '.' from the warning and error messages.
.SH X. Detecting libpng
@@ -3804,6 +3913,15 @@ We use 3-space indentation, except for continued statements which
are usually indented the same as the first line of the statement
plus four more spaces.
+For macro definitions we use 2-space indentation, always leaving the "#"
+in the first column.
+
+ #ifndef PNG_NO_FEATURE
+ # ifndef PNG_FEATURE_SUPPORTED
+ # define PNG_FEATURE_SUPPORTED
+ # endif
+ #endif
+
Comments appear with the leading "/*" at the same indentation as
the statement that follows the comment:
@@ -3851,7 +3969,7 @@ We mark all non-exported functions with "/* PRIVATE */"":
The prototypes for non-exported functions (except for those in
pngtest) appear in
-the PNG_INTERNAL section of png.h
+pngpriv.h
above the comment that says
/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
@@ -3868,23 +3986,26 @@ cast, nor do we put one between a function name and the
left parenthesis that follows it:
for (i = 2; i > 0; --i)
- x[i] = a(x) + (int)b;
+ y[i] = a(x) + (int)b;
We prefer #ifdef and #ifndef to #if defined() and if !defined()
when there is only one macro being tested.
-Other rules can be inferred by inspecting the libpng
-source.
+We do not use the TAB character for indentation in the C sources.
+
+Lines do not exceed 80 characters.
+
+Other rules can be inferred by inspecting the libpng source.
.SH XIII. Y2K Compliance in libpng
-September 10, 2009
+January 3, 2010
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.2.40 are Y2K compliant. It is my belief that earlier
+upward through 1.4.0 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that
@@ -4028,144 +4149,35 @@ the first widely used release:
1.0.16 10 10016 10.so.0.1.0.16
1.2.6 13 10206 12.so.0.1.2.6
1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2
- 1.0.17rc1 10 10017 10.so.0.1.0.17rc1
+ 1.0.17rc1 10 10017 12.so.0.1.0.17rc1
1.2.7rc1 13 10207 12.so.0.1.2.7rc1
- 1.0.17 10 10017 10.so.0.1.0.17
+ 1.0.17 10 10017 12.so.0.1.0.17
1.2.7 13 10207 12.so.0.1.2.7
1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5
- 1.0.18rc1-5 10 10018 10.so.0.1.0.18rc1-5
+ 1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5
1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5
- 1.0.18 10 10018 10.so.0.1.0.18
+ 1.0.18 10 10018 12.so.0.1.0.18
1.2.8 13 10208 12.so.0.1.2.8
1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3
1.2.9beta4-11 13 10209 12.so.0.9[.0]
1.2.9rc1 13 10209 12.so.0.9[.0]
1.2.9 13 10209 12.so.0.9[.0]
- 1.2.10beta1-8 13 10210 12.so.0.10[.0]
- 1.2.10rc1-3 13 10210 12.so.0.10[.0]
+ 1.2.10beta1-7 13 10210 12.so.0.10[.0]
+ 1.2.10rc1-2 13 10210 12.so.0.10[.0]
1.2.10 13 10210 12.so.0.10[.0]
- 1.2.11beta1-4 13 10211 12.so.0.11[.0]
- 1.0.19rc1-5 10 10019 10.so.0.19[.0]
- 1.2.11rc1-5 13 10211 12.so.0.11[.0]
- 1.0.19 10 10019 10.so.0.19[.0]
+ 1.4.0beta1-6 14 10400 14.so.0.0[.0]
+ 1.2.11beta1-4 13 10210 12.so.0.11[.0]
+ 1.4.0beta7-8 14 10400 14.so.0.0[.0]
1.2.11 13 10211 12.so.0.11[.0]
- 1.0.20 10 10020 10.so.0.20[.0]
1.2.12 13 10212 12.so.0.12[.0]
- 1.2.13beta1 13 10213 12.so.0.13[.0]
- 1.0.21 10 10021 10.so.0.21[.0]
+ 1.4.0beta9-14 14 10400 14.so.0.0[.0]
1.2.13 13 10213 12.so.0.13[.0]
- 1.2.14beta1-2 13 10214 12.so.0.14[.0]
- 1.0.22rc1 10 10022 10.so.0.22[.0]
- 1.2.14rc1 13 10214 12.so.0.14[.0]
- 1.2.15beta1-6 13 10215 12.so.0.15[.0]
- 1.0.23rc1-5 10 10023 10.so.0.23[.0]
- 1.2.15rc1-5 13 10215 12.so.0.15[.0]
- 1.0.23 10 10023 10.so.0.23[.0]
- 1.2.15 13 10215 12.so.0.15[.0]
- 1.2.16beta1-2 13 10216 12.so.0.16[.0]
- 1.2.16rc1 13 10216 12.so.0.16[.0]
- 1.0.24 10 10024 10.so.0.24[.0]
- 1.2.16 13 10216 12.so.0.16[.0]
- 1.2.17beta1-2 13 10217 12.so.0.17[.0]
- 1.0.25rc1 10 10025 10.so.0.25[.0]
- 1.2.17rc1-3 13 10217 12.so.0.17[.0]
- 1.0.25 10 10025 10.so.0.25[.0]
- 1.2.17 13 10217 12.so.0.17[.0]
- 1.0.26 10 10026 10.so.0.26[.0]
- 1.2.18 13 10218 12.so.0.18[.0]
- 1.2.19beta1-31 13 10219 12.so.0.19[.0]
- 1.0.27rc1-6 10 10027 10.so.0.27[.0]
- 1.2.19rc1-6 13 10219 12.so.0.19[.0]
- 1.0.27 10 10027 10.so.0.27[.0]
- 1.2.19 13 10219 12.so.0.19[.0]
- 1.2.20beta01-04 13 10220 12.so.0.20[.0]
- 1.0.28rc1-6 10 10028 10.so.0.28[.0]
- 1.2.20rc1-6 13 10220 12.so.0.20[.0]
- 1.0.28 10 10028 10.so.0.28[.0]
- 1.2.20 13 10220 12.so.0.20[.0]
- 1.2.21beta1-2 13 10221 12.so.0.21[.0]
- 1.2.21rc1-3 13 10221 12.so.0.21[.0]
- 1.0.29 10 10029 10.so.0.29[.0]
- 1.2.21 13 10221 12.so.0.21[.0]
- 1.2.22beta1-4 13 10222 12.so.0.22[.0]
- 1.0.30rc1 13 10030 10.so.0.30[.0]
- 1.2.22rc1 13 10222 12.so.0.22[.0]
- 1.0.30 10 10030 10.so.0.30[.0]
- 1.2.22 13 10222 12.so.0.22[.0]
- 1.2.23beta01-05 13 10223 12.so.0.23[.0]
- 1.2.23rc01 13 10223 12.so.0.23[.0]
- 1.2.23 13 10223 12.so.0.23[.0]
- 1.2.24beta01-02 13 10224 12.so.0.24[.0]
- 1.2.24rc01 13 10224 12.so.0.24[.0]
- 1.2.24 13 10224 12.so.0.24[.0]
- 1.2.25beta01-06 13 10225 12.so.0.25[.0]
- 1.2.25rc01-02 13 10225 12.so.0.25[.0]
- 1.0.31 10 10031 10.so.0.31[.0]
- 1.2.25 13 10225 12.so.0.25[.0]
- 1.2.26beta01-06 13 10226 12.so.0.26[.0]
- 1.2.26rc01 13 10226 12.so.0.26[.0]
- 1.2.26 13 10226 12.so.0.26[.0]
- 1.0.32 10 10032 10.so.0.32[.0]
- 1.2.27beta01-06 13 10227 12.so.0.27[.0]
- 1.2.27rc01 13 10227 12.so.0.27[.0]
- 1.0.33 10 10033 10.so.0.33[.0]
- 1.2.27 13 10227 12.so.0.27[.0]
- 1.0.34 10 10034 10.so.0.34[.0]
- 1.2.28 13 10228 12.so.0.28[.0]
- 1.2.29beta01-03 13 10229 12.so.0.29[.0]
- 1.2.29rc01 13 10229 12.so.0.29[.0]
- 1.0.35 10 10035 10.so.0.35[.0]
- 1.2.29 13 10229 12.so.0.29[.0]
- 1.0.37 10 10037 10.so.0.37[.0]
- 1.2.30beta01-04 13 10230 12.so.0.30[.0]
- 1.0.38rc01-08 10 10038 10.so.0.38[.0]
- 1.2.30rc01-08 13 10230 12.so.0.30[.0]
- 1.0.38 10 10038 10.so.0.38[.0]
- 1.2.30 13 10230 12.so.0.30[.0]
- 1.0.39rc01-03 10 10039 10.so.0.39[.0]
- 1.2.31rc01-03 13 10231 12.so.0.31[.0]
- 1.0.39 10 10039 10.so.0.39[.0]
- 1.2.31 13 10231 12.so.0.31[.0]
- 1.2.32beta01-02 13 10232 12.so.0.32[.0]
- 1.0.40rc01 10 10040 10.so.0.40[.0]
- 1.2.32rc01 13 10232 12.so.0.32[.0]
- 1.0.40 10 10040 10.so.0.40[.0]
- 1.2.32 13 10232 12.so.0.32[.0]
- 1.2.33beta01-02 13 10233 12.so.0.33[.0]
- 1.2.33rc01-02 13 10233 12.so.0.33[.0]
- 1.0.41rc01 10 10041 10.so.0.41[.0]
- 1.2.33 13 10233 12.so.0.33[.0]
- 1.0.41 10 10041 10.so.0.41[.0]
- 1.2.34beta01-07 13 10234 12.so.0.34[.0]
- 1.0.42rc01 10 10042 10.so.0.42[.0]
- 1.2.34rc01 13 10234 12.so.0.34[.0]
- 1.0.42 10 10042 10.so.0.42[.0]
- 1.2.34 13 10234 12.so.0.34[.0]
- 1.2.35beta01-03 13 10235 12.so.0.35[.0]
- 1.0.43rc01-02 10 10043 10.so.0.43[.0]
- 1.2.35rc01-02 13 10235 12.so.0.35[.0]
- 1.0.43 10 10043 10.so.0.43[.0]
- 1.2.35 13 10235 12.so.0.35[.0]
- 1.2.36beta01-05 13 10236 12.so.0.36[.0]
- 1.2.36rc01 13 10236 12.so.0.36[.0]
- 1.0.44 10 10044 10.so.0.44[.0]
- 1.2.36 13 10236 12.so.0.36[.0]
- 1.2.37beta01-03 13 10237 12.so.0.37[.0]
- 1.2.37rc01 13 10237 12.so.0.37[.0]
- 1.2.37 13 10237 12.so.0.37[.0]
- 1.2.45 10 10045 12.so.0.45[.0]
- 1.0.46 10 10046 10.so.0.46[.0]
- 1.2.38beta01 13 10238 12.so.0.38[.0]
- 1.2.38rc01-03 13 10238 12.so.0.38[.0]
- 1.0.47 10 10047 10.so.0.47[.0]
- 1.2.38 13 10238 12.so.0.38[.0]
- 1.2.39beta01-05 13 10239 12.so.0.39[.0]
- 1.2.39rc01 13 10239 12.so.0.39[.0]
- 1.0.48 10 10048 10.so.0.48[.0]
- 1.2.39 13 10239 12.so.0.39[.0]
- 1.2.40rc01 13 10240 12.so.0.40[.0]
- 1.0.49 10 10049 10.so.0.49[.0]
- 1.2.40 13 10240 12.so.0.40[.0]
+ 1.4.0beta15-36 14 10400 14.so.0.0[.0]
+ 1.4.0beta37-87 14 10400 14.so.14.0[.0]
+ 1.4.0rc01 14 10400 14.so.14.0[.0]
+ 1.4.0beta88-109 14 10400 14.so.14.0[.0]
+ 1.4.0rc02-08 14 10400 14.so.14.0[.0]
+ 1.4.0 14 10400 14.so.14.0[.0]
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
@@ -4178,7 +4190,7 @@ version 1.0.6j; from then on they were given the upcoming public
release number plus "betaNN" or "rcN".
.SH "SEE ALSO"
-.IR libpngpf(3) ", " png(5)
+libpngpf(3), png(5)
.LP
.IR libpng :
.IP
@@ -4201,7 +4213,7 @@ ftp://ftp.info-zip.org/pub/infozip/zlib
.I libpng
or at
.br
-ftp://ftp.rfc-editor.org:/in-notes/rfc2083.txt
+ftp://ds.internic.net/rfc/rfc2083.txt
.br
or (as a W3C Recommendation) at
.br
@@ -4221,7 +4233,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
-Libpng version 1.2.40 - September 10, 2009:
+Libpng version 1.4.0 - January 3, 2010:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@@ -4244,8 +4256,8 @@ this sentence.
This code is released under the libpng license.
-libpng versions 1.2.6, August 15, 2004, through 1.2.40, September 10, 2009, are
-Copyright (c) 2004,2006-2008 Glenn Randers-Pehrson, and are
+libpng versions 1.2.6, August 15, 2004, through 1.4.0, January 3, 2010, are
+Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@@ -4343,7 +4355,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-September 10, 2009
+January 3, 2010
.\" end of man page
diff --git a/src/3rdparty/libpng/libpng.pc.in b/src/3rdparty/libpng/libpng.pc.in
new file mode 100644
index 0000000000..3e7e2c58a7
--- /dev/null
+++ b/src/3rdparty/libpng/libpng.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
+
+Name: libpng
+Description: Loads and saves PNG files
+Version: @PNGLIB_VERSION@
+Libs: -L${libdir} -lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
+Libs.private: @LIBS@
+Cflags: -I${includedir}
diff --git a/src/3rdparty/libpng/libpngpf.3 b/src/3rdparty/libpng/libpngpf.3
index a1e030df05..f323764760 100644
--- a/src/3rdparty/libpng/libpngpf.3
+++ b/src/3rdparty/libpng/libpngpf.3
@@ -1,15 +1,21 @@
-.TH LIBPNGPF 3 "September 10, 2009"
+.TH LIBPNGPF 3 "January 3, 2010"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
+libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
(private functions)
.SH SYNOPSIS
\fB#include <png.h>\fP
+\fB#include \fI"pngpriv.h"
+
\fI\fB
+\fBvoid png_64bit_product (long \fP\fIv1\fP\fB, long \fP\fIv2\fP\fB, unsigned long \fI*hi_product,
+
+\fBunsigned long \fI*lo_product\fP\fB);\fP
+
\fI\fB
-\fBvoid png_build_gamma_table (png_structp \fIpng_ptr\fP\fB);\fP
+\fBvoid png_build_gamma_table (png_structp \fP\fIpng_ptr\fP\fB, png_byte \fIbit_depth\fP\fB);\fP
\fI\fB
@@ -27,6 +33,12 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
+\fBint png_check_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_fixed_point \fP\fIint_white_x\fP\fB, png_fixed_point \fP\fIint_white_y\fP\fB, png_fixed_point \fP\fIint_red_x\fP\fB, png_fixed_point \fP\fIint_red_y\fP\fB, png_fixed_point \fP\fIint_green_x\fP\fB, png_fixed_point \fP\fIint_green_y\fP\fB, png_fixed_point \fP\fIint_blue_x\fP\fB, png_fixed_point \fIint_blue_y\fP\fB);\fP
+
+\fI\fB
+
+\fI\fB
+
\fBvoid png_check_chunk_name (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP
\fI\fB
@@ -39,6 +51,12 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
+\fBvoid png_check_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIwidth\fP\fB, png_uint_32 \fP\fIheight\fP\fB, int \fP\fIbit_depth\fP\fB, int \fP\fIcolor_type\fP\fB, int \fP\fIinterlace_type\fP\fB, int \fP\fIcompression_type\fP\fB, int \fIfilter_type\fP\fB);\fP
+
+\fI\fB
+
+\fI\fB
+
\fBvoid png_combine_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fImask\fP\fB);\fP
\fI\fB
@@ -81,7 +99,19 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fBvoid png_decompress_chunk (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcomp_type\fP\fB, png_charp \fP\fIchunkdata\fP\fB, png_size_t \fP\fIchunklength\fP\fB, png_size_t \fP\fIprefix_length\fP\fB, png_size_t \fI*data_length\fP\fB);\fP
+\fBint png_debug(int \fP\fIlevel\fP\fB, png_const_charp \fImessage\fP\fB);\fP
+
+\fI\fB
+
+\fBint png_debug1(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fIp1\fP\fB);\fP
+
+\fI\fB
+
+\fBint png_debug2(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fP\fIp1\fP\fB, \fIp2\fP\fB);\fP
+
+\fI\fB
+
+\fBvoid png_decompress_chunk (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcomp_type\fP\fB, png_size_t \fP\fIchunklength\fP\fB, png_size_t \fP\fIprefix_length\fP\fB, png_size_t \fI*data_length\fP\fB);\fP
\fI\fB
@@ -99,7 +129,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fBvoid png_do_background (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fP\fItrans_values\fP\fB, png_color_16p \fP\fIbackground\fP\fB, png_color_16p \fP\fIbackground_1\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_bytep \fP\fIgamma_from_1\fP\fB, png_bytep \fP\fIgamma_to_1\fP\fB, png_uint_16pp \fP\fIgamma_16\fP\fB, png_uint_16pp \fP\fIgamma_16_from_1\fP\fB, png_uint_16pp \fP\fIgamma_16_to_1\fP\fB, int \fIgamma_shift\fP\fB);\fP
+\fBvoid png_do_background (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fP\fItrans_color\fP\fB, png_color_16p \fP\fIbackground\fP\fB, png_color_16p \fP\fIbackground_1\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_bytep \fP\fIgamma_from_1\fP\fB, png_bytep \fP\fIgamma_to_1\fP\fB, png_uint_16pp \fP\fIgamma_16\fP\fB, png_uint_16pp \fP\fIgamma_16_from_1\fP\fB, png_uint_16pp \fP\fIgamma_16_to_1\fP\fB, int \fIgamma_shift\fP\fB);\fP
\fI\fB
@@ -181,8 +211,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fI\fB
-
\fBvoid png_do_read_swap_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
\fI\fB
@@ -537,16 +565,12 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fBpng_uint_32 png_read_chunk_header (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
\fBvoid png_read_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP
\fI\fB
+\fBvoid png_read_destroy (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_infop \fIend_info_ptr\fP\fB);\fP
+
\fI\fB
\fBvoid png_read_filter_row (png_structp \fP\fIpng_ptr\fP\fB, png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIprev_row\fP\fB, int \fIfilter\fP\fB);\fP
@@ -607,6 +631,8 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
+\fBvoid png_write_destroy (png_structp \fIpng_ptr\fP\fB);\fP
+
\fI\fB
\fBvoid png_write_filtered_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIfiltered_row\fP\fB);\fP
@@ -717,12 +743,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.40
\fI\fB
-\fBvoid png_write_sig (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
\fBvoid png_write_sRGB (png_structp \fP\fIpng_ptr\fP\fB, int \fIintent\fP\fB);\fP
\fI\fB
@@ -785,6 +805,6 @@ are listed alphabetically here as an aid to libpng maintainers.
See png.h for more information on these functions.
.SH SEE ALSO
-.IR libpng(3) ", " png(5)
+libpng(3), png(5)
.SH AUTHOR
Glenn Randers-Pehrson
diff --git a/src/3rdparty/libpng/ltmain.sh b/src/3rdparty/libpng/ltmain.sh
new file mode 100755
index 0000000000..a72f2fd78b
--- /dev/null
+++ b/src/3rdparty/libpng/ltmain.sh
@@ -0,0 +1,8406 @@
+# Generated from ltmain.m4sh.
+
+# ltmain.sh (GNU libtool) 2.2.6b
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 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.
+
+# GNU Libtool 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.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+# --config show all configuration variables
+# --debug enable verbose shell tracing
+# -n, --dry-run display commands without modifying any files
+# --features display basic configuration information and exit
+# --mode=MODE use operation mode MODE
+# --preserve-dup-deps don't remove duplicate dependency libraries
+# --quiet, --silent don't print informational messages
+# --tag=TAG use configuration variables from tag TAG
+# -v, --verbose print informational messages (default)
+# --version print version information
+# -h, --help print short or long help message
+#
+# MODE must be one of the following:
+#
+# clean remove files from the build directory
+# compile compile a source file into a libtool object
+# execute automatically set library path, then run a program
+# finish complete the installation of libtool libraries
+# install install libraries or executables
+# link create a library or an executable
+# uninstall remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+# host-triplet: $host
+# shell: $SHELL
+# compiler: $LTCC
+# compiler flags: $LTCFLAGS
+# linker: $LD (gnu? $with_gnu_ld)
+# $progname: (GNU libtool) 2.2.6b
+# automake: $automake_version
+# autoconf: $autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=2.2.6b
+TIMESTAMP=""
+package_revision=1.3017
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# NLS nuisances: We save the old values to restore during execute mode.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+ fi"
+done
+
+$lt_unset CDPATH
+
+
+
+
+
+: ${CP="cp -f"}
+: ${ECHO="echo"}
+: ${EGREP="/bin/grep -E"}
+: ${FGREP="/bin/grep -F"}
+: ${GREP="/bin/grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="/bin/sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" $lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# Generated shell functions inserted here.
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+# In the unlikely event $progname began with a '-', it would play havoc with
+# func_echo (imagine progname=-n), so we prepend ./ in that case:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+case $progname in
+ -*) progname=./$progname ;;
+esac
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=$func_dirname_result
+ progdir=`cd "$progdir" && pwd`
+ progpath="$progdir/$progname"
+ ;;
+ *)
+ save_IFS="$IFS"
+ IFS=:
+ for progdir in $PATH; do
+ IFS="$save_IFS"
+ test -x "$progdir/$progname" && break
+ done
+ IFS="$save_IFS"
+ test -n "$progdir" || progdir=`pwd`
+ progpath="$progdir/$progname"
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+ s/$bs4/&\\
+/g
+ s/^$bs2$dollar/$bs&/
+ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+ s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+ $ECHO "$progname${mode+: }$mode: $*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $opt_verbose && func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+ $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
+
+ # bash bug again:
+ :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ func_error ${1+"$@"}
+ func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information." ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ my_directory_path="$1"
+ my_dir_list=
+
+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+ # Protect directory names starting with `-'
+ case $my_directory_path in
+ -*) my_directory_path="./$my_directory_path" ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$my_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ my_dir_list="$my_directory_path:$my_dir_list"
+
+ # If the last portion added has no slash in it, the list is done
+ case $my_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
+ done
+ my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
+
+ save_mkdir_p_IFS="$IFS"; IFS=':'
+ for my_dir in $my_dir_list; do
+ IFS="$save_mkdir_p_IFS"
+ # mkdir can fail with a `File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$my_dir" 2>/dev/null || :
+ done
+ IFS="$save_mkdir_p_IFS"
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$my_directory_path" || \
+ func_fatal_error "Failed to create \`$1'"
+ fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$opt_dry_run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || \
+ func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+ fi
+
+ $ECHO "X$my_tmpdir" | $Xsed
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+ case $1 in
+ *[\\\`\"\$]*)
+ func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
+ *)
+ func_quote_for_eval_unquoted_result="$1" ;;
+ esac
+
+ case $func_quote_for_eval_unquoted_result in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and and variable
+ # expansion for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+ ;;
+ *)
+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+ esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ case $1 in
+ *[\\\`\"]*)
+ my_arg=`$ECHO "X$1" | $Xsed \
+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ my_arg="$1" ;;
+ esac
+
+ case $my_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ my_arg="\"$my_arg\""
+ ;;
+ esac
+
+ func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$my_cmd"
+ my_status=$?
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$lt_user_locale
+ $my_cmd"
+ my_status=$?
+ eval "$lt_safe_locale"
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
+ s/^# //
+ s/^# *$//
+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $SED -n '/^# Usage:/,/# -h/ {
+ s/^# //
+ s/^# *$//
+ s/\$progname/'$progname'/
+ p
+ }' < "$progpath"
+ $ECHO
+ $ECHO "run \`$progname --help | more' for full usage"
+ exit $?
+}
+
+# func_help
+# Echo long help message to standard output and exit.
+func_help ()
+{
+ $SED -n '/^# Usage:/,/# Report bugs to/ {
+ s/^# //
+ s/^# *$//
+ s*\$progname*'$progname'*
+ s*\$host*'"$host"'*
+ s*\$SHELL*'"$SHELL"'*
+ s*\$LTCC*'"$LTCC"'*
+ s*\$LTCFLAGS*'"$LTCFLAGS"'*
+ s*\$LD*'"$LD"'*
+ s/\$with_gnu_ld/'"$with_gnu_ld"'/
+ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ func_error "missing argument for $1"
+ exit_cmd=exit
+}
+
+exit_cmd=:
+
+
+
+
+
+# Check that we have a working $ECHO.
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell, and then maybe $ECHO will work.
+ exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit $EXIT_SUCCESS
+fi
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+# $mode is unset
+nonopt=
+execute_dlfiles=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+opt_dry_run=false
+opt_duplicate_deps=false
+opt_silent=false
+opt_debug=:
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func_error ${1+"$@"}
+ func_error "See the $PACKAGE documentation for more information."
+ func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+ $ECHO "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ $ECHO "enable shared libraries"
+ else
+ $ECHO "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ $ECHO "enable static libraries"
+ else
+ $ECHO "disable static libraries"
+ fi
+
+ exit $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname="$1"
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
+
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+# Parse options once, thoroughly. This comes as soon as possible in
+# the script to make things like `libtool --version' happen quickly.
+{
+
+ # Shorthand for --mode=foo, only valid as the first argument
+ case $1 in
+ clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+ compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+ execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+ finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+ link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+ esac
+
+ # Parse non-mode specific arguments:
+ while test "$#" -gt 0; do
+ opt="$1"
+ shift
+
+ case $opt in
+ --config) func_config ;;
+
+ --debug) preserve_args="$preserve_args $opt"
+ func_echo "enabling shell trace mode"
+ opt_debug='set -x'
+ $opt_debug
+ ;;
+
+ -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ execute_dlfiles="$execute_dlfiles $1"
+ shift
+ ;;
+
+ --dry-run | -n) opt_dry_run=: ;;
+ --features) func_features ;;
+ --finish) mode="finish" ;;
+
+ --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ case $1 in
+ # Valid mode arguments:
+ clean) ;;
+ compile) ;;
+ execute) ;;
+ finish) ;;
+ install) ;;
+ link) ;;
+ relink) ;;
+ uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $opt"
+ exit_cmd=exit
+ break
+ ;;
+ esac
+
+ mode="$1"
+ shift
+ ;;
+
+ --preserve-dup-deps)
+ opt_duplicate_deps=: ;;
+
+ --quiet|--silent) preserve_args="$preserve_args $opt"
+ opt_silent=:
+ ;;
+
+ --verbose| -v) preserve_args="$preserve_args $opt"
+ opt_silent=false
+ ;;
+
+ --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ preserve_args="$preserve_args $opt $1"
+ func_enable_tag "$1" # tagname is set here
+ shift
+ ;;
+
+ # Separate optargs to long options:
+ -dlopen=*|--mode=*|--tag=*)
+ func_opt_split "$opt"
+ set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
+ shift
+ ;;
+
+ -\?|-h) func_usage ;;
+ --help) opt_help=: ;;
+ --version) func_version ;;
+
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
+
+ *) nonopt="$opt"
+ break
+ ;;
+ esac
+ done
+
+
+ case $host in
+ *cygwin* | *mingw* | *pw32* | *cegcc*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
+ ;;
+ esac
+
+ # Having warned about all mis-specified options, bail out if
+ # anything was wrong.
+ $exit_cmd $EXIT_FAILURE
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+$opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ func_fatal_configuration "not configured to build any kind of library"
+ fi
+
+ test -z "$mode" && func_fatal_error "error: you must specify a MODE."
+
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$execute_dlfiles" && test "$mode" != execute; then
+ func_error "unrecognized option \`-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$progname --help --mode=$mode' for more information."
+}
+
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ test -f "$1" &&
+ $SED -e 4q "$1" 2>/dev/null \
+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case "$lalib_p_line" in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_ltwrapper_scriptname_result=""
+ if func_ltwrapper_executable_p "$1"; then
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+ fi
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $opt_debug
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$save_ifs
+ eval cmd=\"$cmd\"
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $opt_debug
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $opt_debug
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_quote_for_eval "$arg"
+ CC_quoted="$CC_quoted $func_quote_for_eval_result"
+ done
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_quote_for_eval "$arg"
+ CC_quoted="$CC_quoted $func_quote_for_eval_result"
+ done
+ case "$@ " in
+ " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with \`--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=${1}
+ if test "$build_libtool_libs" = yes; then
+ write_lobj=\'${2}\'
+ else
+ write_lobj=none
+ fi
+
+ if test "$build_old_libs" = yes; then
+ write_oldobj=\'${3}\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "${write_libobj}"
+ }
+}
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $opt_debug
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg="$arg"
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj="$arg"
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify \`-o' more than once"
+ arg_mode=target
+ continue
+ ;;
+
+ -pie | -fpie | -fPIE)
+ pie_flag="$pie_flag $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ later="$later $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs="$IFS"; IFS=','
+ for arg in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$arg"
+ lastarg="$lastarg $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ base_compile="$base_compile $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg="$srcfile"
+ srcfile="$arg"
+ ;;
+ esac # case $arg
+ ;;
+ esac # case $arg_mode
+
+ # Aesthetically quote the previous argument.
+ func_quote_for_eval "$lastarg"
+ base_compile="$base_compile $func_quote_for_eval_result"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+ target)
+ func_fatal_error "you must specify a target with \`-o'"
+ ;;
+ *)
+ # Get the name of the library object.
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj="$func_basename_result"
+ }
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ case $libobj in
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.obj | *.sx)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
+ esac
+
+ case $libobj in
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+ func_fatal_error "cannot determine name of library object from \`$libobj'"
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name \`$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname="$func_basename_result"
+ xdir="$func_dirname_result"
+ lobj=${xdir}$objdir/$objname
+
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ removelist="$removelist $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ removelist="$removelist $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ if test -n "$fix_srcfile_path"; then
+ eval srcfile=\"$fix_srcfile_path\"
+ fi
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test "$pic_mode" != no; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ command="$command -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ if test "$pic_mode" != yes; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test "$compiler_c_o" = yes; then
+ command="$command -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ command="$command$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+test "$mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to building PIC objects only
+ -prefer-non-pic try to building non-PIC objects only
+ -shared do not build a \`.o' file suitable for static linking
+ -static only build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify objects
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode \`$mode'"
+ ;;
+ esac
+
+ $ECHO
+ $ECHO "Try \`$progname --help' for more information about other modes."
+
+ exit $?
+}
+
+ # Now that we've collected a possible --mode arg, show help if necessary
+ $opt_help && func_mode_help
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $opt_debug
+ # The first argument is the command name.
+ cmd="$nonopt"
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $execute_dlfiles; do
+ test -f "$file" \
+ || func_fatal_help "\`$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "\`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+
+ if test -f "$dir/$objdir/$dlname"; then
+ dir="$dir/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ ;;
+
+ *)
+ func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -*) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_quote_for_eval "$file"
+ args="$args $func_quote_for_eval_result"
+ done
+
+ if test "X$opt_dry_run" = Xfalse; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd="\$cmd$args"
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ $ECHO "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $opt_debug
+ libdirs="$nonopt"
+ admincmds=
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for dir
+ do
+ libdirs="$libdirs $dir"
+ done
+
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_silent && exit $EXIT_SUCCESS
+
+ $ECHO "X----------------------------------------------------------------------" | $Xsed
+ $ECHO "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ $ECHO
+ $ECHO "If you ever happen to want to link against installed libraries"
+ $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
+ $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ $ECHO "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ $ECHO " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
+ $ECHO " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ $ECHO
+
+ $ECHO "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ $ECHO "pages."
+ ;;
+ *)
+ $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ $ECHO "X----------------------------------------------------------------------" | $Xsed
+ exit $EXIT_SUCCESS
+}
+
+test "$mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $opt_debug
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ # Allow the use of GNU shtool's install command.
+ $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ install_prog="$install_prog$func_quote_for_eval_result"
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ for arg
+ do
+ if test -n "$dest"; then
+ files="$files $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f)
+ case " $install_prog " in
+ *[\\\ /]cp\ *) ;;
+ *) prev=$arg ;;
+ esac
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ install_prog="$install_prog $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prev' option requires an argument"
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir="$func_dirname_result"
+ destname="$func_basename_result"
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "\`$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "\`$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ staticlibs="$staticlibs $file"
+ ;;
+
+ *.la)
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir="$func_dirname_result"
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking \`$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname="$1"
+ shift
+
+ srcname="$realname"
+ test -n "$relink_command" && srcname="$realname"T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme="$stripme"
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=""
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try `ln -sf' first, because the `ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name="$func_basename_result"
+ instname="$dir/$name"i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to \`$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=""
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=".exe"
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+ finalize=yes
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "\`$lib' has not been installed in \`$libdir'"
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if test "$finalize" = yes; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file="$func_basename_result"
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_silent || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink \`$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ func_warning "cannot relink \`$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name="$func_basename_result"
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $opt_debug
+ my_outputname="$1"
+ my_originator="$2"
+ my_pic_p="${3-no}"
+ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms="${my_outputname}S.c"
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${my_outputname}.nm"
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ func_verbose "generating symbol list for \`$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_verbose "extracting global C symbols from \`$progfile'"
+ $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$outputname.exp"
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from \`$dlprefile'"
+ func_basename "$dlprefile"
+ name="$func_basename_result"
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+/* DATA imports from DLLs on WIN32 con't be const, because
+ runtime relocations are performed -- see ld's documentation
+ on pseudo-relocs. */"
+ lt_dlsym_const= ;;
+ *osf5*)
+ echo >> "$output_objdir/$my_dlsyms" "\
+/* This system does not cope well with relocations in const data */"
+ lt_dlsym_const= ;;
+ *)
+ lt_dlsym_const=const ;;
+ esac
+
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+extern $lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+$lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+ { \"$my_originator\", (void *) 0 },"
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ if test "X$my_pic_p" != Xno; then
+ pic_flag_for_symtable=" $pic_flag"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) symtab_cflags="$symtab_cflags $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj="$output_objdir/${my_outputname}S.$objext"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for \`$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+ $opt_debug
+ win32_libid_type="unknown"
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+ win32_nmres=`eval $NM -f posix -A $1 |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $opt_debug
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $opt_debug
+ my_gentop="$1"; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=""
+ my_xlib=""
+ my_xabs=""
+ my_xdir=""
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib="$func_basename_result"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ darwin_base_archive=`basename "$darwin_archive"`
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches ; do
+ func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+ done
+
+ func_extract_archives_result="$my_oldobjs"
+}
+
+
+
+# func_emit_wrapper_part1 [arg=no]
+#
+# Emit the first part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part1 ()
+{
+ func_emit_wrapper_part1_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_part1_arg1=$1
+ fi
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ ECHO=\"$qecho\"
+ file=\"\$0\"
+ # Make sure echo works.
+ if test \"X\$1\" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+ elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
+ # Yippee, \$ECHO works!
+ :
+ else
+ # Restart under the correct shell, and then maybe \$ECHO will work.
+ exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+ fi
+ fi\
+"
+ $ECHO "\
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+ done
+"
+}
+# end: func_emit_wrapper_part1
+
+# func_emit_wrapper_part2 [arg=no]
+#
+# Emit the second part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part2 ()
+{
+ func_emit_wrapper_part2_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_part2_arg1=$1
+ fi
+
+ $ECHO "\
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ $ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ # fixup the dll searchpath if we need to.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+# end: func_emit_wrapper_part2
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_arg1=$1
+ fi
+
+ # split this up so that func_emit_cwrapperexe_src
+ # can call each part independently.
+ func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
+ func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
+}
+
+
+# func_to_host_path arg
+#
+# Convert paths to host format when used with build tools.
+# Intended for use with "native" mingw (where libtool itself
+# is running under the msys shell), or in the following cross-
+# build environments:
+# $build $host
+# mingw (msys) mingw [e.g. native]
+# cygwin mingw
+# *nix + wine mingw
+# where wine is equipped with the `winepath' executable.
+# In the native mingw case, the (msys) shell automatically
+# converts paths for any non-msys applications it launches,
+# but that facility isn't available from inside the cwrapper.
+# Similar accommodations are necessary for $host mingw and
+# $build cygwin. Calling this function does no harm for other
+# $host/$build combinations not listed above.
+#
+# ARG is the path (on $build) that should be converted to
+# the proper representation for $host. The result is stored
+# in $func_to_host_path_result.
+func_to_host_path ()
+{
+ func_to_host_path_result="$1"
+ if test -n "$1" ; then
+ case $host in
+ *mingw* )
+ lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+ case $build in
+ *mingw* ) # actually, msys
+ # awkward: cmd appends spaces to result
+ lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+ func_to_host_path_tmp1=`( cmd //c echo "$1" |\
+ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ *cygwin* )
+ func_to_host_path_tmp1=`cygpath -w "$1"`
+ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ * )
+ # Unfortunately, winepath does not exit with a non-zero
+ # error code, so we are forced to check the contents of
+ # stdout. On the other hand, if the command is not
+ # found, the shell will set an exit code of 127 and print
+ # *an error message* to stdout. So we must check for both
+ # error code of zero AND non-empty stdout, which explains
+ # the odd construction:
+ func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
+ if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
+ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ else
+ # Allow warning below.
+ func_to_host_path_result=""
+ fi
+ ;;
+ esac
+ if test -z "$func_to_host_path_result" ; then
+ func_error "Could not determine host path corresponding to"
+ func_error " '$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback:
+ func_to_host_path_result="$1"
+ fi
+ ;;
+ esac
+ fi
+}
+# end: func_to_host_path
+
+# func_to_host_pathlist arg
+#
+# Convert pathlists to host format when used with build tools.
+# See func_to_host_path(), above. This function supports the
+# following $build/$host combinations (but does no harm for
+# combinations not listed here):
+# $build $host
+# mingw (msys) mingw [e.g. native]
+# cygwin mingw
+# *nix + wine mingw
+#
+# Path separators are also converted from $build format to
+# $host format. If ARG begins or ends with a path separator
+# character, it is preserved (but converted to $host format)
+# on output.
+#
+# ARG is a pathlist (on $build) that should be converted to
+# the proper representation on $host. The result is stored
+# in $func_to_host_pathlist_result.
+func_to_host_pathlist ()
+{
+ func_to_host_pathlist_result="$1"
+ if test -n "$1" ; then
+ case $host in
+ *mingw* )
+ lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+ # Remove leading and trailing path separator characters from
+ # ARG. msys behavior is inconsistent here, cygpath turns them
+ # into '.;' and ';.', and winepath ignores them completely.
+ func_to_host_pathlist_tmp2="$1"
+ # Once set for this call, this variable should not be
+ # reassigned. It is used in tha fallback case.
+ func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
+ $SED -e 's|^:*||' -e 's|:*$||'`
+ case $build in
+ *mingw* ) # Actually, msys.
+ # Awkward: cmd appends spaces to result.
+ lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+ func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
+ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ *cygwin* )
+ func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
+ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ * )
+ # unfortunately, winepath doesn't convert pathlists
+ func_to_host_pathlist_result=""
+ func_to_host_pathlist_oldIFS=$IFS
+ IFS=:
+ for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
+ IFS=$func_to_host_pathlist_oldIFS
+ if test -n "$func_to_host_pathlist_f" ; then
+ func_to_host_path "$func_to_host_pathlist_f"
+ if test -n "$func_to_host_path_result" ; then
+ if test -z "$func_to_host_pathlist_result" ; then
+ func_to_host_pathlist_result="$func_to_host_path_result"
+ else
+ func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
+ fi
+ fi
+ fi
+ IFS=:
+ done
+ IFS=$func_to_host_pathlist_oldIFS
+ ;;
+ esac
+ if test -z "$func_to_host_pathlist_result" ; then
+ func_error "Could not determine the host path(s) corresponding to"
+ func_error " '$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback. This may break if $1 contains DOS-style drive
+ # specifications. The fix is not to complicate the expression
+ # below, but for the user to provide a working wine installation
+ # with winepath so that path translation in the cross-to-mingw
+ # case works properly.
+ lt_replace_pathsep_nix_to_dos="s|:|;|g"
+ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
+ $SED -e "$lt_replace_pathsep_nix_to_dos"`
+ fi
+ # Now, add the leading and trailing path separators back
+ case "$1" in
+ :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
+ ;;
+ esac
+ case "$1" in
+ *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+}
+# end: func_to_host_pathlist
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+
+ Currently, it simply execs the wrapper *script* "$SHELL $output",
+ but could eventually absorb all of the scripts functionality and
+ exec $objdir/$outputname directly.
+*/
+EOF
+ cat <<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+# define setmode _setmode
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# define HAVE_SETENV
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+#ifdef _MSC_VER
+# define S_IXUSR _S_IEXEC
+# define stat _stat
+# ifndef _INTPTR_T_DEFINED
+# define intptr_t int
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifdef __CYGWIN__
+# define FOPEN_WB "wb"
+#endif
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#undef LTWRAPPER_DEBUGPRINTF
+#if defined DEBUGWRAPPER
+# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
+static void
+ltwrapper_debugprintf (const char *fmt, ...)
+{
+ va_list args;
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+}
+#else
+# define LTWRAPPER_DEBUGPRINTF(args)
+#endif
+
+const char *program_name = NULL;
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_opt_process_env_set (const char *arg);
+void lt_opt_process_env_prepend (const char *arg);
+void lt_opt_process_env_append (const char *arg);
+int lt_split_name_value (const char *arg, char** name, char** value);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+
+static const char *script_text_part1 =
+EOF
+
+ func_emit_wrapper_part1 yes |
+ $SED -e 's/\([\\"]\)/\\\1/g' \
+ -e 's/^/ "/' -e 's/$/\\n"/'
+ echo ";"
+ cat <<EOF
+
+static const char *script_text_part2 =
+EOF
+ func_emit_wrapper_part2 yes |
+ $SED -e 's/\([\\"]\)/\\\1/g' \
+ -e 's/^/ "/' -e 's/$/\\n"/'
+ echo ";"
+
+ cat <<EOF
+const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ func_to_host_pathlist "$temp_rpath"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_pathlist "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result";
+EOF
+ else
+ cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE = "";
+EOF
+ fi
+
+ if test "$fast_install" = yes; then
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+ else
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+ fi
+
+
+ cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX "--lt-"
+#define LTWRAPPER_OPTION_PREFIX_LENGTH 5
+
+static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH;
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+
+static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
+static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
+ /* argument is putenv-style "foo=bar", value of foo is set to bar */
+
+static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
+static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
+ /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
+
+static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
+static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
+ /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int newargc;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *actual_cwrapper_name;
+ char *target_name;
+ char *lt_argv_zero;
+ intptr_t rval = 127;
+
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
+ LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
+
+ /* very simple arg parsing; don't want to rely on getopt */
+ for (i = 1; i < argc; i++)
+ {
+ if (strcmp (argv[i], dumpscript_opt) == 0)
+ {
+EOF
+ case "$host" in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<"EOF"
+ printf ("%s", script_text_part1);
+ printf ("%s", script_text_part2);
+ return 0;
+ }
+ }
+
+ newargz = XMALLOC (char *, argc + 1);
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal ("Couldn't find %s", argv[0]);
+ LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
+ tmp_pathspec));
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
+ actual_cwrapper_path));
+ XFREE (tmp_pathspec);
+
+ actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+ /* wrapper name transforms */
+ strendzap (actual_cwrapper_name, ".exe");
+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+ XFREE (actual_cwrapper_name);
+ actual_cwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ /* target_name transforms -- use actual target program name; might have lt- prefix */
+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+ strendzap (target_name, ".exe");
+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+ XFREE (target_name);
+ target_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
+ target_name));
+EOF
+
+ cat <<EOF
+ newargz[0] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+ strcpy (newargz[0], actual_cwrapper_path);
+ strcat (newargz[0], "$objdir");
+ strcat (newargz[0], "/");
+EOF
+
+ cat <<"EOF"
+ /* stop here, and copy so we don't have to do this twice */
+ tmp_pathspec = xstrdup (newargz[0]);
+
+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+ strcat (newargz[0], actual_cwrapper_name);
+
+ /* DO want the lt- prefix here if it exists, so use target_name */
+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+ XFREE (tmp_pathspec);
+ tmp_pathspec = NULL;
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[0], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (target_name);
+ XFREE (actual_cwrapper_path);
+ XFREE (actual_cwrapper_name);
+
+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
+ {
+ if (argv[i][env_set_opt_len] == '=')
+ {
+ const char *p = argv[i] + env_set_opt_len + 1;
+ lt_opt_process_env_set (p);
+ }
+ else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
+ {
+ lt_opt_process_env_set (argv[++i]); /* don't copy */
+ }
+ else
+ lt_fatal ("%s missing required argument", env_set_opt);
+ continue;
+ }
+ if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
+ {
+ if (argv[i][env_prepend_opt_len] == '=')
+ {
+ const char *p = argv[i] + env_prepend_opt_len + 1;
+ lt_opt_process_env_prepend (p);
+ }
+ else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
+ {
+ lt_opt_process_env_prepend (argv[++i]); /* don't copy */
+ }
+ else
+ lt_fatal ("%s missing required argument", env_prepend_opt);
+ continue;
+ }
+ if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
+ {
+ if (argv[i][env_append_opt_len] == '=')
+ {
+ const char *p = argv[i] + env_append_opt_len + 1;
+ lt_opt_process_env_append (p);
+ }
+ else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
+ {
+ lt_opt_process_env_append (argv[++i]); /* don't copy */
+ }
+ else
+ lt_fatal ("%s missing required argument", env_append_opt);
+ continue;
+ }
+ if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
+ {
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+ namespace, but it is not one of the ones we know about and
+ have already dealt with, above (inluding dump-script), then
+ report an error. Otherwise, targets might begin to believe
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+ namespace. The first time any user complains about this, we'll
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+ or a configure.ac-settable value.
+ */
+ lt_fatal ("Unrecognized option in %s namespace: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+ LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
+ for (i = 0; i < newargc; i++)
+ {
+ LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal ("Memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
+ path ? (*path ? path : "EMPTY!") : "NULL!"));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
+ path ? (*path ? path : "EMPTY!") : "NULL!"));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ int tmp_len;
+ char *concat_name;
+
+ LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
+ wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
+ tmp_pathspec));
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ char *errstr = strerror (errno);
+ lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal ("Could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (strcmp (str, pat) == 0)
+ *str = '\0';
+ }
+ return str;
+}
+
+static void
+lt_error_core (int exit_status, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s: %s: ", program_name, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+ va_end (ap);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
+ (name ? name : "<NULL>"),
+ (value ? value : "<NULL>")));
+ {
+#ifdef HAVE_SETENV
+ /* always make a copy, for consistency with !HAVE_SETENV */
+ char *str = xstrdup (value);
+ setenv (name, str, 1);
+#else
+ int len = strlen (name) + 1 + strlen (value) + 1;
+ char *str = XMALLOC (char, len);
+ sprintf (str, "%s=%s", name, value);
+ if (putenv (str) != EXIT_SUCCESS)
+ {
+ XFREE (str);
+ }
+#endif
+ }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+ char *new_value;
+ if (orig_value && *orig_value)
+ {
+ int orig_value_len = strlen (orig_value);
+ int add_len = strlen (add);
+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
+ if (to_end)
+ {
+ strcpy (new_value, orig_value);
+ strcpy (new_value + orig_value_len, add);
+ }
+ else
+ {
+ strcpy (new_value, add);
+ strcpy (new_value + add_len, orig_value);
+ }
+ }
+ else
+ {
+ new_value = xstrdup (add);
+ }
+ return new_value;
+}
+
+int
+lt_split_name_value (const char *arg, char** name, char** value)
+{
+ const char *p;
+ int len;
+ if (!arg || !*arg)
+ return 1;
+
+ p = strchr (arg, (int)'=');
+
+ if (!p)
+ return 1;
+
+ *value = xstrdup (++p);
+
+ len = strlen (arg) - strlen (*value);
+ *name = XMALLOC (char, len);
+ strncpy (*name, arg, len-1);
+ (*name)[len - 1] = '\0';
+
+ return 0;
+}
+
+void
+lt_opt_process_env_set (const char *arg)
+{
+ char *name = NULL;
+ char *value = NULL;
+
+ if (lt_split_name_value (arg, &name, &value) != 0)
+ {
+ XFREE (name);
+ XFREE (value);
+ lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
+ }
+
+ lt_setenv (name, value);
+ XFREE (name);
+ XFREE (value);
+}
+
+void
+lt_opt_process_env_prepend (const char *arg)
+{
+ char *name = NULL;
+ char *value = NULL;
+ char *new_value = NULL;
+
+ if (lt_split_name_value (arg, &name, &value) != 0)
+ {
+ XFREE (name);
+ XFREE (value);
+ lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
+ }
+
+ new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ XFREE (name);
+ XFREE (value);
+}
+
+void
+lt_opt_process_env_append (const char *arg)
+{
+ char *name = NULL;
+ char *value = NULL;
+ char *new_value = NULL;
+
+ if (lt_split_name_value (arg, &name, &value) != 0)
+ {
+ XFREE (name);
+ XFREE (value);
+ lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
+ }
+
+ new_value = lt_extend_str (getenv (name), value, 1);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ XFREE (name);
+ XFREE (value);
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ (name ? name : "<NULL>"),
+ (value ? value : "<NULL>")));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ /* some systems can't cope with a ':'-terminated path #' */
+ int len = strlen (new_value);
+ while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ {
+ new_value[len-1] = '\0';
+ }
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+ LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ (name ? name : "<NULL>"),
+ (value ? value : "<NULL>")));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $opt_debug
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module="${wl}-single_module"
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg="$1"
+ shift
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=yes
+ fi
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ else
+ dlprefiles="$dlprefiles $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ test -f "$arg" \
+ || func_fatal_error "symbol file \`$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir="$arg"
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# moreargs="$moreargs $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file \`$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test "$prev" = rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) rpath="$rpath $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) xrpath="$xrpath $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds="$arg"
+ prev=
+ continue
+ ;;
+ weak)
+ weak_libs="$weak_libs $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $wl$qarg"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg="$arg"
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+ fi
+ if test "X$arg" = "X-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname '-L' '' "$arg"
+ dir=$func_stripname_result
+ if test -z "$dir"; then
+ if test "$#" -gt 0; then
+ func_fatal_error "require no space between \`-L' and \`$1'"
+ else
+ func_fatal_error "need path for \`-L' option"
+ fi
+ fi
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of \`$dir'"
+ dir="$absdir"
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "*) ;;
+ *)
+ deplibs="$deplibs -L$dir"
+ lib_search_path="$lib_search_path $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ ::) dllsearchpath=$dir;;
+ *) dllsearchpath="$dllsearchpath:$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ deplibs="$deplibs System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
+ esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot)
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module="${wl}-multi_module"
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "\`-no-install' is ignored for $host"
+ func_warning "assuming \`-no-fast-install' instead"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ arg="$arg $wl$func_quote_for_eval_result"
+ compiler_flags="$compiler_flags $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ arg="$arg $wl$func_quote_for_eval_result"
+ compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
+ linker_flags="$linker_flags $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+ # -r[0-9][0-9]* specifies the processor on the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+ # +DA*, +DD* enable 64-bit mode on the HP compiler
+ # -q* pass through compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* pass through architecture-specific
+ # compiler args for GCC
+ # -F/path gives path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+ # @file GCC response files
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ compiler_flags="$compiler_flags $arg"
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ *.$objext)
+ # A standard object.
+ objs="$objs $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ deplibs="$deplibs $arg"
+ old_deplibs="$old_deplibs $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ if test "$prev" = dlfiles; then
+ # This library was specified with -dlopen.
+ dlfiles="$dlfiles $arg"
+ prev=
+ elif test "$prev" = dlprefiles; then
+ # The library was specified with -dlpreopen.
+ dlprefiles="$dlprefiles $arg"
+ prev=
+ else
+ deplibs="$deplibs $arg"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prevarg' option requires an argument"
+
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ outputname="$func_basename_result"
+ libobjs_save="$libobjs"
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ func_dirname "$output" "/" ""
+ output_objdir="$func_dirname_result$objdir"
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if $opt_duplicate_deps ; then
+ case "$libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ libs="$libs $deplib"
+ done
+
+ if test "$linkmode" = lib; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if $opt_duplicate_compiler_generated_deps; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+ esac
+ pre_post_deps="$pre_post_deps $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=no
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test "$linkmode,$pass" = "lib,link"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs="$tmp_deplibs"
+ fi
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
+ deplibs=
+ fi
+ if test "$linkmode" = prog; then
+ case $pass in
+ dlopen) libs="$dlfiles" ;;
+ dlpreopen) libs="$dlprefiles" ;;
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+ esac
+ fi
+ if test "$linkmode,$pass" = "lib,dlpreopen"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ case $lib in
+ *.la) func_source "$lib" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) deplibs="$deplibs $deplib" ;;
+ esac
+ done
+ done
+ libs="$dlprefiles"
+ fi
+ if test "$pass" = dlopen; then
+ # Collect dlpreopened libraries
+ save_deplibs="$deplibs"
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags $deplib"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ func_warning "\`-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test "$linkmode" = lib; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib="$searchdir/lib${name}${search_ext}"
+ if test -f "$lib"; then
+ if test "$search_ext" = ".la"; then
+ found=yes
+ else
+ found=no
+ fi
+ break 2
+ fi
+ done
+ done
+ if test "$found" != yes; then
+ # deplib doesn't seem to be a libtool library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ else # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll="$l"
+ done
+ if test "X$ll" = "X$old_library" ; then # only static version available
+ found=no
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+ lib=$ladir/$old_library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ fi
+ ;; # -l
+ *.ltframework)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test "$pass" = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ prog)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test "$pass" = scan; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ *)
+ func_warning "\`-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test "$pass" = link; then
+ func_stripname '-R' '' "$deplib"
+ dir=$func_stripname_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la) lib="$deplib" ;;
+ *.$libext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
+ $ECHO
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because the file extensions .$libext of this argument makes me believe"
+ $ECHO "*** that it is just a static archive that I should not use here."
+ else
+ $ECHO
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test "$pass" != link; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ elif test "$linkmode" = prog; then
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ newdlprefiles="$newdlprefiles $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ newdlfiles="$newdlfiles $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=yes
+ continue
+ ;;
+ esac # case $deplib
+
+ if test "$found" = yes || test -f "$lib"; then :
+ else
+ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+ fi
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+ test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+ test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+ fi
+
+ if test "$pass" = conv; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ convenience="$convenience $ladir/$objdir/$old_library"
+ old_convenience="$old_convenience $ladir/$objdir/$old_library"
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ func_fatal_error "\`$lib' is not a convenience library"
+ fi
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+ if test -z "$linklib"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+
+ # This library was specified with -dlopen.
+ if test "$pass" = dlopen; then
+ if test -z "$libdir"; then
+ func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+ fi
+ if test -z "$dlname" ||
+ test "$dlopen_support" != yes ||
+ test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ dlprefiles="$dlprefiles $lib $dependency_libs"
+ else
+ newdlfiles="$newdlfiles $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ func_warning "cannot determine absolute directory name of \`$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
+ abs_ladir="$ladir"
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ laname="$func_basename_result"
+
+ # Find the relevant object directory and library name.
+ if test "X$installed" = Xyes; then
+ if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library \`$lib' was moved."
+ dir="$ladir"
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+ dir="$libdir"
+ absdir="$libdir"
+ fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir="$ladir"
+ absdir="$abs_ladir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ fi
+ fi # $installed = yes
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
+
+ # This library was specified with -dlpreopen.
+ if test "$pass" = dlpreopen; then
+ if test -z "$libdir" && test "$linkmode" = prog; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+ fi
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ newdlprefiles="$newdlprefiles $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ newdlprefiles="$newdlprefiles $dir/$dlname"
+ else
+ newdlprefiles="$newdlprefiles $dir/$linklib"
+ fi
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test "$linkmode" = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test "$linkmode" = prog && test "$pass" != link; then
+ newlib_search_path="$newlib_search_path $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=no
+ if test "$link_all_deplibs" != no || test -z "$library_names" ||
+ test "$build_libtool_libs" = no; then
+ linkalldeplibs=yes
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if test "$linkalldeplibs" = yes; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test "$linkmode,$pass" = "prog,link"; then
+ if test -n "$library_names" &&
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath:" in
+ *"$absdir:"*) ;;
+ *) temp_rpath="$temp_rpath$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test "$use_static_libs" = built && test "$installed" = yes; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw* | *cegcc*)
+ # No point in relinking DLLs because paths are not encoded
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=no
+ ;;
+ *)
+ if test "$installed" = no; then
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=""
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule="$dlpremoduletest"
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+ $ECHO
+ if test "$linkmode" = prog; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ if test "$linkmode" = lib &&
+ test "$hardcode_into_libs" = yes; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname="$dlname"
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw* | *cegcc*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot="$soname"
+ func_basename "$soroot"
+ soname="$func_basename_result"
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ func_verbose "extracting exported symbol list from \`$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ func_verbose "generating import library for \`$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test "$linkmode" = prog || test "$mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ add="$dir/$linklib"
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we can not
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null ; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library" ; then
+ $ECHO
+ $ECHO "*** And there doesn't seem to be a static archive available"
+ $ECHO "*** The link will probably fail, sorry"
+ else
+ add="$dir/$old_library"
+ fi
+ elif test -n "$old_library"; then
+ add="$dir/$old_library"
+ fi
+ fi
+ esac
+ elif test "$hardcode_minus_L" = no; then
+ case $host in
+ *-*-sunos*) add_shlibpath="$dir" ;;
+ esac
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$dir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ func_fatal_configuration "unsupported hardcode properties"
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+ esac
+ fi
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test "$hardcode_direct" != yes &&
+ test "$hardcode_minus_L" != yes &&
+ test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test "$linkmode" = prog || test "$mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ add="-l$name"
+ elif test "$hardcode_automatic" = yes; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ fi
+
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test "$linkmode" = prog; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test "$build_libtool_libs" = yes; then
+ # Not a shared library
+ if test "$deplibs_check_method" != pass_all; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ $ECHO
+ $ECHO "*** Warning: This system can not link to static lib archive $lib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have."
+ if test "$module" = yes; then
+ $ECHO "*** But as you try to build a module library, libtool will still create "
+ $ECHO "*** a static module, that should work as long as the dlopening application"
+ $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ $ECHO
+ $ECHO "*** However, this would only work if libtool was able to extract symbol"
+ $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $ECHO "*** not find such a program. So, this module is probably useless."
+ $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test "$linkmode" = lib; then
+ if test -n "$dependency_libs" &&
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) xrpath="$xrpath $temp_xrpath";;
+ esac;;
+ *) temp_deplibs="$temp_deplibs $libdir";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ newlib_search_path="$newlib_search_path $absdir"
+ # Link against this library
+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+
+ if test "$link_all_deplibs" != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) path="$deplib" ;;
+ *.la)
+ func_dirname "$deplib" "" "."
+ dir="$func_dirname_result"
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ func_warning "cannot determine absolute directory name of \`$dir'"
+ absdir="$dir"
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names" ; then
+ for tmp in $deplibrary_names ; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl" ; then
+ depdepl="$absdir/$objdir/$depdepl"
+ darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+ linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path="-L$absdir/$objdir"
+ ;;
+ esac
+ else
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "\`$deplib' seems to be moved"
+
+ path="-L$absdir"
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test "$pass" = link; then
+ if test "$linkmode" = "prog"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
+ dependency_libs="$newdependency_libs"
+ if test "$pass" = dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test "$pass" != dlopen; then
+ if test "$pass" != conv; then
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) lib_search_path="$lib_search_path $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ fi
+
+ if test "$linkmode,$pass" != "prog,link"; then
+ vars="deplibs"
+ else
+ vars="compile_deplibs finalize_deplibs"
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs ; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=""
+ ;;
+ esac
+ if test -n "$i" ; then
+ tmp_libs="$tmp_libs $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test "$linkmode" = prog; then
+ dlfiles="$newdlfiles"
+ fi
+ if test "$linkmode" = prog || test "$linkmode" = lib; then
+ dlprefiles="$newdlprefiles"
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "\`-export-symbols' is ignored for archives"
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs="$output"
+ objs="$objs$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test "$module" = no && \
+ func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test "$deplibs_check_method" != pass_all; then
+ func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+ else
+ $ECHO
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ libobjs="$libobjs $objs"
+ fi
+ fi
+
+ test "$dlself" != no && \
+ func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test "$#" -gt 1 && \
+ func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+ install_libdir="$1"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a `.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ shift
+ IFS="$save_ifs"
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to \`-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major="$1"
+ number_minor="$2"
+ number_revision="$3"
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # which has an extra 1 added just for fun
+ #
+ case $version_type in
+ darwin|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
+ ;;
+ irix|nonstopux)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_minor"
+ lt_irix_increment=no
+ ;;
+ esac
+ ;;
+ no)
+ current="$1"
+ revision="$2"
+ age="$3"
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "CURRENT \`$current' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $revision in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "REVISION \`$revision' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $age in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "AGE \`$age' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ func_error "AGE \`$age' is greater than the current interface number \`$current'"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ func_arith $current + 1
+ minor_current=$func_arith_result
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ irix | nonstopux)
+ if test "X$lt_irix_increment" = "Xno"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring="$verstring_prefix$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test "$loop" -ne 0; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring_prefix$major.$iface:$verstring"
+ done
+
+ # Before this point, $major must not contain `.'.
+ major=.$major
+ versuffix="$major.$revision"
+ ;;
+
+ linux)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test "$loop" -ne 0; do
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ verstring="$verstring:${current}.0"
+ ;;
+
+ qnx)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 filesystems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type \`$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring="0.0"
+ ;;
+ esac
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ func_warning "undefined symbols not allowed in $host shared libraries"
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" "yes"
+ libobjs="$libobjs $symfileobj"
+ test "X$libobjs" = "X " && libobjs=
+
+ if test "$mode" != relink; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext | *.gcno)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+ if test "X$precious_files_regex" != "X"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ removelist="$removelist $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
+ # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ temp_xrpath="$temp_xrpath -R$libdir"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles="$dlfiles"
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) dlfiles="$dlfiles $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles="$dlprefiles"
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) dlprefiles="$dlprefiles $lib" ;;
+ esac
+ done
+
+ if test "$build_libtool_libs" = yes; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ deplibs="$deplibs System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test "$build_libtool_need_lc" = "yes"; then
+ deplibs="$deplibs -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which I believe you do not have"
+ $ECHO "*** because a test_compile did reveal that the linker did not use it for"
+ $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ newdeplibs="$newdeplibs $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ ldd_output=`ldd conftest`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because a test_compile did reveal that the linker did not use this one"
+ $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ $ECHO "*** make it link in! You will probably need to install it or some"
+ $ECHO "*** library that it depends on before this library will be fully"
+ $ECHO "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ newdeplibs="$newdeplibs $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib="$potent_lib" # see symlink-check above in file_magic test
+ if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=""
+ tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
+ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ for i in $predeps $postdeps ; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
+ done
+ fi
+ if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
+ $GREP . >/dev/null; then
+ $ECHO
+ if test "X$deplibs_check_method" = "Xnone"; then
+ $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ $ECHO "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ $ECHO "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ fi
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ $ECHO
+ $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ $ECHO "*** a static module, that should work as long as the dlopening"
+ $ECHO "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ $ECHO
+ $ECHO "*** However, this would only work if libtool was able to extract symbol"
+ $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $ECHO "*** not find such a program. So, this module is probably useless."
+ $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ $ECHO "*** The inter-library dependencies that have been dropped here will be"
+ $ECHO "*** automatically added whenever a program is linked with this library"
+ $ECHO "*** or is declared to -dlopen it."
+
+ if test "$allow_undefined" = no; then
+ $ECHO
+ $ECHO "*** Since this library must not contain undefined symbols,"
+ $ECHO "*** because either the platform does not support them or"
+ $ECHO "*** it was explicitly requested with -no-undefined,"
+ $ECHO "*** libtool will only create a static version of it."
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+ if test "$hardcode_into_libs" = yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath="$finalize_rpath"
+ test "$mode" != relink && rpath="$compile_rpath$rpath"
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ dep_rpath="$dep_rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ if test -n "$hardcode_libdir_flag_spec_ld"; then
+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ else
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ fi
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath="$finalize_shlibpath"
+ test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib="$output_objdir/$realname"
+ linknames=
+ for link
+ do
+ linknames="$linknames $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols="$output_objdir/$libname.uexp"
+ delfiles="$delfiles $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols="$export_symbols"
+ export_symbols=
+ always_export_symbols=yes
+ fi
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ func_len " $cmd"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ tmp_deplibs="$tmp_deplibs $test_deplib"
+ ;;
+ esac
+ done
+ deplibs="$tmp_deplibs"
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test "$compiler_needs_object" = yes &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $convenience
+ libobjs="$libobjs $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ linker_flags="$linker_flags $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test "$mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test "X$skipped_export" != "X:" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+ output=${output_objdir}/${output_la}.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ $ECHO 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ $ECHO "$obj" >> $output
+ done
+ $ECHO ')' >> $output
+ delfiles="$delfiles $output"
+ elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+ output=${output_objdir}/${output_la}.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test "$compiler_needs_object" = yes; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ $ECHO "$obj" >> $output
+ done
+ delfiles="$delfiles $output"
+ output=$firstobj\"$file_list_spec$output\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-${k}.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test "X$objlist" = X ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test "$k" -eq 1 ; then
+ # The first file doesn't have a previous command to add.
+ eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-${k}.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-${k}.$objext
+ objlist=$obj
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+ fi
+ delfiles="$delfiles $output"
+
+ else
+ output=
+ fi
+
+ if ${skipped_export-false}; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ fi
+
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ if ${skipped_export-false}; then
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ fi
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ libobjs="$libobjs $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for objects"
+
+ case $output in
+ *.lo)
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+ else
+ gentop="$output_objdir/${obj}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # Create the old-style object.
+ reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+ output="$obj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$build_libtool_libs" != yes; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ fi
+
+ if test -n "$pic_flag" || test "$pic_mode" != default; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output="$libobj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for programs"
+
+ test "$preload" = yes \
+ && test "$dlopen_support" = unknown \
+ && test "$dlopen_self" = unknown \
+ && test "$dlopen_self_static" = unknown && \
+ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test "$tagname" = CXX ; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ compile_command="$compile_command ${wl}-bind_at_load"
+ finalize_command="$finalize_command ${wl}-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
+ compile_command="$compile_command $compile_deplibs"
+ finalize_command="$finalize_command $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ ::) dllsearchpath=$libdir;;
+ *) dllsearchpath="$dllsearchpath:$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath="$rpath"
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ fi
+
+ func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=yes
+ case $host in
+ *cygwin* | *mingw* )
+ if test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ *cegcc)
+ # Disable wrappers for cegcc, we are cross compiling anyway.
+ wrappers_required=no
+ ;;
+ *)
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ esac
+ if test "$wrappers_required" = no; then
+ # Replace the output file specification.
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ # Delete the generated files.
+ if test -f "$output_objdir/${outputname}S.${objext}"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+ fi
+
+ exit $exit_status
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$no_install" = yes; then
+ # We don't need to create a wrapper script.
+ link_command="$compile_var$compile_command$compile_rpath"
+ # Replace the output file specification.
+ link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $opt_dry_run || $RM $output
+ # Link the executable and exit
+ func_show_eval "$link_command" 'exit $?'
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "\`$output' will be relinked during installation"
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # Replace the output file specification.
+ link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Quote $ECHO for shipping.
+ if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
+ case $progpath in
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+ esac
+ qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
+ else
+ qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # The wrapper executable is built using the $host compiler,
+ # because it contains $host paths and files. If cross-
+ # compiling, it, like the target executable, must be
+ # executed on the $host or under an emulation environment.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host" ; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$old_deplibs $non_pic_objects"
+ if test "$preload" = yes && test -f "$symfileobj"; then
+ oldobjs="$oldobjs $symfileobj"
+ fi
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $addlibs
+ oldobjs="$oldobjs $func_extract_archives_result"
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ cmds=$old_archive_from_new_cmds
+ else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ oldobjs="$oldobjs $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $ECHO "copying selected object files to avoid basename conflicts..."
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase="$func_basename_result"
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ oldobjs="$oldobjs $gentop/$newobj"
+ ;;
+ *) oldobjs="$oldobjs $obj" ;;
+ esac
+ done
+ fi
+ eval cmds=\"$old_archive_cmds\"
+
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj" ; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test "X$oldobjs" = "X" ; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ if test "$hardcode_automatic" = yes ; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test "$installed" = yes; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output="$output_objdir/$outputname"i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ func_basename "$deplib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ newdependency_libs="$newdependency_libs $libdir/$name"
+ ;;
+ *) newdependency_libs="$newdependency_libs $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+ newdlfiles=
+
+ for lib in $dlfiles; do
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ newdlfiles="$newdlfiles $libdir/$name"
+ ;;
+ *) newdlfiles="$newdlfiles $lib" ;;
+ esac
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ newdlprefiles="$newdlprefiles $libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles="$newdlprefiles"
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlfiles="$newdlfiles $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlprefiles="$newdlprefiles $abs"
+ done
+ dlprefiles="$newdlprefiles"
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test "$installed" = no && test "$need_relink" = yes; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+{ test "$mode" = link || test "$mode" = relink; } &&
+ func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $opt_debug
+ RM="$nonopt"
+ files=
+ rmforce=
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ for arg
+ do
+ case $arg in
+ -f) RM="$RM $arg"; rmforce=yes ;;
+ -*) RM="$RM $arg" ;;
+ *) files="$files $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ origobjdir="$objdir"
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ if test "X$dir" = X.; then
+ objdir="$origobjdir"
+ else
+ objdir="$dir/$origobjdir"
+ fi
+ func_basename "$file"
+ name="$func_basename_result"
+ test "$mode" = uninstall && objdir="$dir"
+
+ # Remember objdir for removal later, being careful to avoid duplicates
+ if test "$mode" = clean; then
+ case " $rmdirs " in
+ *" $objdir "*) ;;
+ *) rmdirs="$rmdirs $objdir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif test "$rmforce" = yes; then
+ continue
+ fi
+
+ rmfiles="$file"
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ rmfiles="$rmfiles $objdir/$n"
+ done
+ test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+ case "$mode" in
+ clean)
+ case " $library_names " in
+ # " " in the beginning catches empty $dlname
+ *" $dlname "*) ;;
+ *) rmfiles="$rmfiles $objdir/$dlname" ;;
+ esac
+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+ ;;
+ uninstall)
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ func_source $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" &&
+ test "$pic_object" != none; then
+ rmfiles="$rmfiles $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" &&
+ test "$non_pic_object" != none; then
+ rmfiles="$rmfiles $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test "$mode" = clean ; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ rmfiles="$rmfiles $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ rmfiles="$rmfiles $objdir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name" ; then
+ rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+ objdir="$origobjdir"
+
+ # Try to remove the ${objdir}s in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+{ test "$mode" = uninstall || test "$mode" = clean; } &&
+ func_mode_uninstall ${1+"$@"}
+
+test -z "$mode" && {
+ help="$generic_help"
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode \`$mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
diff --git a/src/3rdparty/libpng/missing b/src/3rdparty/libpng/missing
new file mode 100755
index 0000000000..28055d2ae6
--- /dev/null
+++ b/src/3rdparty/libpng/missing
@@ -0,0 +1,376 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program 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, 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, see <http://www.gnu.org/licenses/>.
+
+# 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.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program). This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+ lex*|yacc*)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ tar*)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
+ *)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
+ fi
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+ aclocal*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case $f in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te*)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison*|yacc*)
+ echo 1>&2 "\
+WARNING: \`$1' $msg. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if test $# -ne 1; then
+ eval LASTARG="\${$#}"
+ case $LASTARG in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f y.tab.h; then
+ echo >y.tab.h
+ fi
+ if test ! -f y.tab.c; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex*|flex*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if test $# -ne 1; then
+ eval LASTARG="\${$#}"
+ case $LASTARG in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f lex.yy.c; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit $?
+ fi
+ ;;
+
+ makeinfo*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ # The file to touch is that specified with -o ...
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -z "$file"; then
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
+ touch $file
+ ;;
+
+ tar*)
+ shift
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case $firstarg in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case $firstarg in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequisites for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/src/3rdparty/libpng/mkinstalldirs b/src/3rdparty/libpng/mkinstalldirs
new file mode 100755
index 0000000000..4191a45dbd
--- /dev/null
+++ b/src/3rdparty/libpng/mkinstalldirs
@@ -0,0 +1,162 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+
+scriptversion=2009-04-28.21; # UTC
+
+# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain.
+#
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+nl='
+'
+IFS=" "" $nl"
+errstatus=0
+dirmode=
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
+
+Create each directory DIR (with mode MODE, if specified), including all
+leading file name components.
+
+Report bugs to <bug-automake@gnu.org>."
+
+# process command line arguments
+while test $# -gt 0 ; do
+ case $1 in
+ -h | --help | --h*) # -h for help
+ echo "$usage"
+ exit $?
+ ;;
+ -m) # -m PERM arg
+ shift
+ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+ dirmode=$1
+ shift
+ ;;
+ --version)
+ echo "$0 $scriptversion"
+ exit $?
+ ;;
+ --) # stop option processing
+ shift
+ break
+ ;;
+ -*) # unknown option
+ echo "$usage" 1>&2
+ exit 1
+ ;;
+ *) # first non-opt arg
+ break
+ ;;
+ esac
+done
+
+for file
+do
+ if test -d "$file"; then
+ shift
+ else
+ break
+ fi
+done
+
+case $# in
+ 0) exit 0 ;;
+esac
+
+# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
+# mkdir -p a/c at the same time, both will detect that a is missing,
+# one will create a, then the other will try to create a and die with
+# a "File exists" error. This is a problem when calling mkinstalldirs
+# from a parallel make. We use --version in the probe to restrict
+# ourselves to GNU mkdir, which is thread-safe.
+case $dirmode in
+ '')
+ if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ echo "mkdir -p -- $*"
+ exec mkdir -p -- "$@"
+ else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ test -d ./-p && rmdir ./-p
+ test -d ./--version && rmdir ./--version
+ fi
+ ;;
+ *)
+ if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
+ test ! -d ./--version; then
+ echo "mkdir -m $dirmode -p -- $*"
+ exec mkdir -m "$dirmode" -p -- "$@"
+ else
+ # Clean up after NextStep and OpenStep mkdir.
+ for d in ./-m ./-p ./--version "./$dirmode";
+ do
+ test -d $d && rmdir $d
+ done
+ fi
+ ;;
+esac
+
+for file
+do
+ case $file in
+ /*) pathcomp=/ ;;
+ *) pathcomp= ;;
+ esac
+ oIFS=$IFS
+ IFS=/
+ set fnord $file
+ shift
+ IFS=$oIFS
+
+ for d
+ do
+ test "x$d" = x && continue
+
+ pathcomp=$pathcomp$d
+ case $pathcomp in
+ -*) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp"
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ else
+ if test ! -z "$dirmode"; then
+ echo "chmod $dirmode $pathcomp"
+ lasterr=
+ chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+ if test ! -z "$lasterr"; then
+ errstatus=$lasterr
+ fi
+ fi
+ fi
+ fi
+
+ pathcomp=$pathcomp/
+ done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/src/3rdparty/libpng/png.5 b/src/3rdparty/libpng/png.5
index 30923ba115..6f904a9fb9 100644
--- a/src/3rdparty/libpng/png.5
+++ b/src/3rdparty/libpng/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "September 10, 2009"
+.TH PNG 5 "January 3, 2010"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION
@@ -18,7 +18,7 @@ gamma and chromaticity data for improved color matching on heterogeneous
platforms.
.SH "SEE ALSO"
-.IR libpng(3) ", " zlib(3) ", " deflate(5) ", and " zlib(5)
+.IR libpng(3), zlib(3), deflate(5), and zlib(5)
.LP
PNG specification (second edition), November 2003:
.IP
@@ -35,7 +35,7 @@ PNG 1.0 specification, October 1996:
RFC 2083
.IP
.br
-ftp://ftp.rfc-editor.org:/in-notes/rfc2083.txt
+ftp://ds.internic.net/rfc/rfc2083.txt
.br
or (as a W3C Recommendation) at
.br
diff --git a/src/3rdparty/libpng/png.c b/src/3rdparty/libpng/png.c
index be1bd3a14d..a845a4783a 100644
--- a/src/3rdparty/libpng/png.c
+++ b/src/3rdparty/libpng/png.c
@@ -1,8 +1,8 @@
/* png.c - location for general purpose libpng functions
*
- * Last changed in libpng 1.2.39 [August 13, 2009]
- * Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.0 [January 3, 2010]
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -11,79 +11,17 @@
* and license in png.h
*/
-#define PNG_INTERNAL
#define PNG_NO_EXTERN
+#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
+#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_2_40 Your_png_h_is_not_version_1_2_40;
+typedef version_1_4_0 Your_png_h_is_not_version_1_4_0;
/* Version information for C files. This had better match the version
- * string defined in png.h. */
-
-#ifdef PNG_USE_GLOBAL_ARRAYS
-/* png_libpng_ver was changed to a function in version 1.0.5c */
-PNG_CONST char png_libpng_ver[18] = PNG_LIBPNG_VER_STRING;
-
-#ifdef PNG_READ_SUPPORTED
-
-/* png_sig was changed to a function in version 1.0.5c */
-/* Place to hold the signature string for a PNG file. */
-PNG_CONST png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10};
-#endif /* PNG_READ_SUPPORTED */
-
-/* Invoke global declarations for constant strings for known chunk types */
-PNG_IHDR;
-PNG_IDAT;
-PNG_IEND;
-PNG_PLTE;
-PNG_bKGD;
-PNG_cHRM;
-PNG_gAMA;
-PNG_hIST;
-PNG_iCCP;
-PNG_iTXt;
-PNG_oFFs;
-PNG_pCAL;
-PNG_sCAL;
-PNG_pHYs;
-PNG_sBIT;
-PNG_sPLT;
-PNG_sRGB;
-PNG_tEXt;
-PNG_tIME;
-PNG_tRNS;
-PNG_zTXt;
-
-#ifdef PNG_READ_SUPPORTED
-/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
-
-/* Start of interlace block */
-PNG_CONST int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};
-
-/* Offset to next interlace block */
-PNG_CONST int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
-
-/* Start of interlace block in the y direction */
-PNG_CONST int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1};
-
-/* Offset to next interlace block in the y direction */
-PNG_CONST int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};
-
-/* Height of interlace block. This is not currently used - if you need
- * it, uncomment it here and in png.h
-PNG_CONST int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
-*/
-
-/* Mask to determine which pixels are valid in a pass */
-PNG_CONST int FARDATA png_pass_mask[] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
-
-/* Mask to determine which pixels to overwrite while displaying */
-PNG_CONST int FARDATA png_pass_dsp_mask[]
- = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};
-
-#endif /* PNG_READ_SUPPORTED */
-#endif /* PNG_USE_GLOBAL_ARRAYS */
+ * string defined in png.h.
+ */
/* Tells libpng that we have already handled the first "num_bytes" bytes
* of the PNG file signature. If the PNG data is embedded into another
@@ -95,11 +33,13 @@ PNG_CONST int FARDATA png_pass_dsp_mask[]
void PNGAPI
png_set_sig_bytes(png_structp png_ptr, int num_bytes)
{
+ png_debug(1, "in png_set_sig_bytes");
+
if (png_ptr == NULL)
return;
- png_debug(1, "in png_set_sig_bytes");
+
if (num_bytes > 8)
- png_error(png_ptr, "Too many bytes for PNG signature.");
+ png_error(png_ptr, "Too many bytes for PNG signature");
png_ptr->sig_bytes = (png_byte)(num_bytes < 0 ? 0 : num_bytes);
}
@@ -130,32 +70,17 @@ png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check)
return ((int)(png_memcmp(&sig[start], &png_signature[start], num_to_check)));
}
-#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
-/* (Obsolete) function to check signature bytes. It does not allow one
- * to check a partial signature. This function might be removed in the
- * future - use png_sig_cmp(). Returns true (nonzero) if the file is PNG.
- */
-int PNGAPI
-png_check_sig(png_bytep sig, int num)
-{
- return ((int)!png_sig_cmp(sig, (png_size_t)0, (png_size_t)num));
-}
-#endif
#endif /* PNG_READ_SUPPORTED */
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
/* Function to allocate memory for zlib and clear it to 0. */
-#ifdef PNG_1_0_X
-voidpf PNGAPI
-#else
voidpf /* PRIVATE */
-#endif
png_zalloc(voidpf png_ptr, uInt items, uInt size)
{
png_voidp ptr;
png_structp p=(png_structp)png_ptr;
png_uint_32 save_flags=p->flags;
- png_uint_32 num_bytes;
+ png_alloc_size_t num_bytes;
if (png_ptr == NULL)
return (NULL);
@@ -164,36 +89,17 @@ png_zalloc(voidpf png_ptr, uInt items, uInt size)
png_warning (p, "Potential overflow in png_zalloc()");
return (NULL);
}
- num_bytes = (png_uint_32)items * size;
+ num_bytes = (png_alloc_size_t)items * size;
p->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK;
ptr = (png_voidp)png_malloc((png_structp)png_ptr, num_bytes);
p->flags=save_flags;
-#if defined(PNG_1_0_X) && !defined(PNG_NO_ZALLOC_ZERO)
- if (ptr == NULL)
- return ((voidpf)ptr);
-
- if (num_bytes > (png_uint_32)0x8000L)
- {
- png_memset(ptr, 0, (png_size_t)0x8000L);
- png_memset((png_bytep)ptr + (png_size_t)0x8000L, 0,
- (png_size_t)(num_bytes - (png_uint_32)0x8000L));
- }
- else
- {
- png_memset(ptr, 0, (png_size_t)num_bytes);
- }
-#endif
return ((voidpf)ptr);
}
/* Function to free memory for zlib */
-#ifdef PNG_1_0_X
-void PNGAPI
-#else
void /* PRIVATE */
-#endif
png_zfree(voidpf png_ptr, voidpf ptr)
{
png_free((png_structp)png_ptr, (png_voidp)ptr);
@@ -246,8 +152,10 @@ png_create_info_struct(png_structp png_ptr)
png_infop info_ptr;
png_debug(1, "in png_create_info_struct");
+
if (png_ptr == NULL)
return (NULL);
+
#ifdef PNG_USER_MEM_SUPPORTED
info_ptr = (png_infop)png_create_struct_2(PNG_STRUCT_INFO,
png_ptr->malloc_fn, png_ptr->mem_ptr);
@@ -269,10 +177,12 @@ void PNGAPI
png_destroy_info_struct(png_structp png_ptr, png_infopp info_ptr_ptr)
{
png_infop info_ptr = NULL;
+
+ png_debug(1, "in png_destroy_info_struct");
+
if (png_ptr == NULL)
return;
- png_debug(1, "in png_destroy_info_struct");
if (info_ptr_ptr != NULL)
info_ptr = *info_ptr_ptr;
@@ -294,26 +204,17 @@ png_destroy_info_struct(png_structp png_ptr, png_infopp info_ptr_ptr)
* and applications using it are urged to use png_create_info_struct()
* instead.
*/
-#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
-#undef png_info_init
-void PNGAPI
-png_info_init(png_infop info_ptr)
-{
- /* We only come here via pre-1.0.12-compiled applications */
- png_info_init_3(&info_ptr, 0);
-}
-#endif
void PNGAPI
png_info_init_3(png_infopp ptr_ptr, png_size_t png_info_struct_size)
{
png_infop info_ptr = *ptr_ptr;
+ png_debug(1, "in png_info_init_3");
+
if (info_ptr == NULL)
return;
- png_debug(1, "in png_info_init_3");
-
if (png_sizeof(png_info) > png_info_struct_size)
{
png_destroy_struct(info_ptr);
@@ -325,39 +226,36 @@ png_info_init_3(png_infopp ptr_ptr, png_size_t png_info_struct_size)
png_memset(info_ptr, 0, png_sizeof(png_info));
}
-#ifdef PNG_FREE_ME_SUPPORTED
void PNGAPI
png_data_freer(png_structp png_ptr, png_infop info_ptr,
int freer, png_uint_32 mask)
{
png_debug(1, "in png_data_freer");
+
if (png_ptr == NULL || info_ptr == NULL)
return;
+
if (freer == PNG_DESTROY_WILL_FREE_DATA)
info_ptr->free_me |= mask;
else if (freer == PNG_USER_WILL_FREE_DATA)
info_ptr->free_me &= ~mask;
else
png_warning(png_ptr,
- "Unknown freer parameter in png_data_freer.");
+ "Unknown freer parameter in png_data_freer");
}
-#endif
void PNGAPI
png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
int num)
{
png_debug(1, "in png_free_data");
+
if (png_ptr == NULL || info_ptr == NULL)
return;
-#if defined(PNG_TEXT_SUPPORTED)
+#ifdef PNG_TEXT_SUPPORTED
/* Free text item num or (if num == -1) all text items */
-#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_TEXT) & info_ptr->free_me)
-#else
- if (mask & PNG_FREE_TEXT)
-#endif
{
if (num != -1)
{
@@ -379,30 +277,19 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
}
#endif
-#if defined(PNG_tRNS_SUPPORTED)
+#ifdef PNG_tRNS_SUPPORTED
/* Free any tRNS entry */
-#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_TRNS) & info_ptr->free_me)
-#else
- if ((mask & PNG_FREE_TRNS) && (png_ptr->flags & PNG_FLAG_FREE_TRNS))
-#endif
{
- png_free(png_ptr, info_ptr->trans);
- info_ptr->trans = NULL;
+ png_free(png_ptr, info_ptr->trans_alpha);
+ info_ptr->trans_alpha = NULL;
info_ptr->valid &= ~PNG_INFO_tRNS;
-#ifndef PNG_FREE_ME_SUPPORTED
- png_ptr->flags &= ~PNG_FLAG_FREE_TRNS;
-#endif
}
#endif
-#if defined(PNG_sCAL_SUPPORTED)
+#ifdef PNG_sCAL_SUPPORTED
/* Free any sCAL entry */
-#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_SCAL) & info_ptr->free_me)
-#else
- if (mask & PNG_FREE_SCAL)
-#endif
{
#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)
png_free(png_ptr, info_ptr->scal_s_width);
@@ -414,13 +301,9 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
}
#endif
-#if defined(PNG_pCAL_SUPPORTED)
+#ifdef PNG_pCAL_SUPPORTED
/* Free any pCAL entry */
-#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_PCAL) & info_ptr->free_me)
-#else
- if (mask & PNG_FREE_PCAL)
-#endif
{
png_free(png_ptr, info_ptr->pcal_purpose);
png_free(png_ptr, info_ptr->pcal_units);
@@ -432,7 +315,7 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
for (i = 0; i < (int)info_ptr->pcal_nparams; i++)
{
png_free(png_ptr, info_ptr->pcal_params[i]);
- info_ptr->pcal_params[i]=NULL;
+ info_ptr->pcal_params[i] = NULL;
}
png_free(png_ptr, info_ptr->pcal_params);
info_ptr->pcal_params = NULL;
@@ -441,13 +324,9 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
}
#endif
-#if defined(PNG_iCCP_SUPPORTED)
+#ifdef PNG_iCCP_SUPPORTED
/* Free any iCCP entry */
-#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_ICCP) & info_ptr->free_me)
-#else
- if (mask & PNG_FREE_ICCP)
-#endif
{
png_free(png_ptr, info_ptr->iccp_name);
png_free(png_ptr, info_ptr->iccp_profile);
@@ -457,13 +336,9 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
}
#endif
-#if defined(PNG_sPLT_SUPPORTED)
+#ifdef PNG_sPLT_SUPPORTED
/* Free a given sPLT entry, or (if num == -1) all sPLT entries */
-#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_SPLT) & info_ptr->free_me)
-#else
- if (mask & PNG_FREE_SPLT)
-#endif
{
if (num != -1)
{
@@ -492,18 +367,14 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
}
#endif
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
if (png_ptr->unknown_chunk.data)
{
png_free(png_ptr, png_ptr->unknown_chunk.data);
png_ptr->unknown_chunk.data = NULL;
}
-#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_UNKN) & info_ptr->free_me)
-#else
- if (mask & PNG_FREE_UNKN)
-#endif
{
if (num != -1)
{
@@ -530,46 +401,28 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
}
#endif
-#if defined(PNG_hIST_SUPPORTED)
+#ifdef PNG_hIST_SUPPORTED
/* Free any hIST entry */
-#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_HIST) & info_ptr->free_me)
-#else
- if ((mask & PNG_FREE_HIST) && (png_ptr->flags & PNG_FLAG_FREE_HIST))
-#endif
{
png_free(png_ptr, info_ptr->hist);
info_ptr->hist = NULL;
info_ptr->valid &= ~PNG_INFO_hIST;
-#ifndef PNG_FREE_ME_SUPPORTED
- png_ptr->flags &= ~PNG_FLAG_FREE_HIST;
-#endif
}
#endif
/* Free any PLTE entry that was internally allocated */
-#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_PLTE) & info_ptr->free_me)
-#else
- if ((mask & PNG_FREE_PLTE) && (png_ptr->flags & PNG_FLAG_FREE_PLTE))
-#endif
{
png_zfree(png_ptr, info_ptr->palette);
info_ptr->palette = NULL;
info_ptr->valid &= ~PNG_INFO_PLTE;
-#ifndef PNG_FREE_ME_SUPPORTED
- png_ptr->flags &= ~PNG_FLAG_FREE_PLTE;
-#endif
info_ptr->num_palette = 0;
}
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
+#ifdef PNG_INFO_IMAGE_SUPPORTED
/* Free any image bits attached to the info structure */
-#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_ROWS) & info_ptr->free_me)
-#else
- if (mask & PNG_FREE_ROWS)
-#endif
{
if (info_ptr->row_pointers)
{
@@ -577,21 +430,19 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
for (row = 0; row < (int)info_ptr->height; row++)
{
png_free(png_ptr, info_ptr->row_pointers[row]);
- info_ptr->row_pointers[row]=NULL;
+ info_ptr->row_pointers[row] = NULL;
}
png_free(png_ptr, info_ptr->row_pointers);
- info_ptr->row_pointers=NULL;
+ info_ptr->row_pointers = NULL;
}
info_ptr->valid &= ~PNG_INFO_IDAT;
}
#endif
-#ifdef PNG_FREE_ME_SUPPORTED
if (num == -1)
info_ptr->free_me &= ~mask;
else
info_ptr->free_me &= ~(mask & ~PNG_FREE_MUL);
-#endif
}
/* This is an internal routine to free any memory that the info struct is
@@ -605,11 +456,11 @@ png_info_destroy(png_structp png_ptr, png_infop info_ptr)
png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1);
-#if defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
+#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
if (png_ptr->num_chunk_list)
{
png_free(png_ptr, png_ptr->chunk_list);
- png_ptr->chunk_list=NULL;
+ png_ptr->chunk_list = NULL;
png_ptr->num_chunk_list = 0;
}
#endif
@@ -631,7 +482,7 @@ png_get_io_ptr(png_structp png_ptr)
}
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
-#if !defined(PNG_NO_STDIO)
+#ifdef PNG_STDIO_SUPPORTED
/* Initialize the default input/output functions for the PNG file. If you
* use your own read or write routines, you can call either png_set_read_fn()
* or png_set_write_fn() instead of png_init_io(). If you have defined
@@ -642,13 +493,15 @@ void PNGAPI
png_init_io(png_structp png_ptr, png_FILE_p fp)
{
png_debug(1, "in png_init_io");
+
if (png_ptr == NULL)
return;
+
png_ptr->io_ptr = (png_voidp)fp;
}
#endif
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
+#ifdef PNG_TIME_RFC1123_SUPPORTED
/* Convert the supplied time into an RFC 1123 string suitable for use in
* a "Creation Time" or other text-based time string.
*/
@@ -667,17 +520,6 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
png_sizeof(char)));
}
-#if defined(_WIN32_WCE)
- {
- wchar_t time_buf[29];
- wsprintf(time_buf, TEXT("%d %S %d %02d:%02d:%02d +0000"),
- ptime->day % 32, short_months[(ptime->month - 1) % 12],
- ptime->year, ptime->hour % 24, ptime->minute % 60,
- ptime->second % 61);
- WideCharToMultiByte(CP_ACP, 0, time_buf, -1, png_ptr->time_buffer, 29,
- NULL, NULL);
- }
-#else
#ifdef USE_FAR_KEYWORD
{
char near_time_buf[29];
@@ -694,7 +536,6 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
ptime->year, ptime->hour % 24, ptime->minute % 60,
ptime->second % 61);
#endif
-#endif /* _WIN32_WCE */
return ((png_charp)png_ptr->time_buffer);
}
#endif /* PNG_TIME_RFC1123_SUPPORTED */
@@ -705,10 +546,23 @@ png_charp PNGAPI
png_get_copyright(png_structp png_ptr)
{
png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
- return ((png_charp) "\n libpng version 1.2.40 - September 10, 2009\n\
- Copyright (c) 1998-2009 Glenn Randers-Pehrson\n\
- Copyright (c) 1996-1997 Andreas Dilger\n\
- Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");
+#ifdef PNG_STRING_COPYRIGHT
+ return PNG_STRING_COPYRIGHT
+#else
+#ifdef __STDC__
+ return ((png_charp) PNG_STRING_NEWLINE \
+ "libpng version 1.4.0 - January 3, 2010" PNG_STRING_NEWLINE \
+ "Copyright (c) 1998-2010 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
+ "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
+ "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
+ PNG_STRING_NEWLINE);
+#else
+ return ((png_charp) "libpng version 1.4.0 - January 3, 2010\
+ Copyright (c) 1998-2010 Glenn Randers-Pehrson\
+ Copyright (c) 1996-1997 Andreas Dilger\
+ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.");
+#endif
+#endif
}
/* The following return the library version as a short string in the
@@ -740,11 +594,15 @@ png_get_header_version(png_structp png_ptr)
{
/* Returns longer string containing both version and date */
png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
+#ifdef __STDC__
return ((png_charp) PNG_HEADER_VERSION_STRING
#ifndef PNG_READ_SUPPORTED
" (NO READ SUPPORT)"
#endif
- "\n");
+ PNG_STRING_NEWLINE);
+#else
+ return ((png_charp) PNG_HEADER_VERSION_STRING);
+#endif
}
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
@@ -784,17 +642,6 @@ png_access_version_number(void)
}
-#if defined(PNG_READ_SUPPORTED) && defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-#if !defined(PNG_1_0_X)
-/* This function was added to libpng 1.2.0 */
-int PNGAPI
-png_mmx_support(void)
-{
- /* Obsolete, to be removed from libpng-1.4.0 */
- return -1;
-}
-#endif /* PNG_1_0_X */
-#endif /* PNG_READ_SUPPORTED && PNG_ASSEMBLER_CODE_SUPPORTED */
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#ifdef PNG_SIZE_T
@@ -810,8 +657,8 @@ png_convert_size(size_t size)
#endif /* PNG_SIZE_T */
/* Added at libpng version 1.2.34 and 1.4.0 (moved from pngset.c) */
-#if defined(PNG_cHRM_SUPPORTED)
-#if !defined(PNG_NO_CHECK_cHRM)
+#ifdef PNG_cHRM_SUPPORTED
+#ifdef PNG_CHECK_cHRM_SUPPORTED
/*
* Multiply two 32-bit numbers, V1 and V2, using 32-bit
@@ -863,6 +710,7 @@ png_check_cHRM_fixed(png_structp png_ptr,
unsigned long xy_hi,xy_lo,yx_hi,yx_lo;
png_debug(1, "in function png_check_cHRM_fixed");
+
if (png_ptr == NULL)
return 0;
@@ -921,6 +769,148 @@ png_check_cHRM_fixed(png_structp png_ptr,
return ret;
}
-#endif /* NO_PNG_CHECK_cHRM */
+#endif /* PNG_CHECK_cHRM_SUPPORTED */
#endif /* PNG_cHRM_SUPPORTED */
+
+void /* PRIVATE */
+png_check_IHDR(png_structp png_ptr,
+ png_uint_32 width, png_uint_32 height, int bit_depth,
+ int color_type, int interlace_type, int compression_type,
+ int filter_type)
+{
+ int error = 0;
+
+ /* Check for width and height valid values */
+ if (width == 0)
+ {
+ png_warning(png_ptr, "Image width is zero in IHDR");
+ error = 1;
+ }
+
+ if (height == 0)
+ {
+ png_warning(png_ptr, "Image height is zero in IHDR");
+ error = 1;
+ }
+
+#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+ if (width > png_ptr->user_width_max || width > PNG_USER_WIDTH_MAX)
+#else
+ if (width > PNG_USER_WIDTH_MAX)
+#endif
+ {
+ png_warning(png_ptr, "Image width exceeds user limit in IHDR");
+ error = 1;
+ }
+
+#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+ if (height > png_ptr->user_height_max || height > PNG_USER_HEIGHT_MAX)
+#else
+ if (height > PNG_USER_HEIGHT_MAX)
+#endif
+ {
+ png_warning(png_ptr, "Image height exceeds user limit in IHDR");
+ error = 1;
+ }
+
+ if (width > PNG_UINT_31_MAX)
+ {
+ png_warning(png_ptr, "Invalid image width in IHDR");
+ error = 1;
+ }
+
+ if ( height > PNG_UINT_31_MAX)
+ {
+ png_warning(png_ptr, "Invalid image height in IHDR");
+ error = 1;
+ }
+
+ if ( width > (PNG_UINT_32_MAX
+ >> 3) /* 8-byte RGBA pixels */
+ - 64 /* bigrowbuf hack */
+ - 1 /* filter byte */
+ - 7*8 /* rounding of width to multiple of 8 pixels */
+ - 8) /* extra max_pixel_depth pad */
+ png_warning(png_ptr, "Width is too large for libpng to process pixels");
+
+ /* Check other values */
+ if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 &&
+ bit_depth != 8 && bit_depth != 16)
+ {
+ png_warning(png_ptr, "Invalid bit depth in IHDR");
+ error = 1;
+ }
+
+ if (color_type < 0 || color_type == 1 ||
+ color_type == 5 || color_type > 6)
+ {
+ png_warning(png_ptr, "Invalid color type in IHDR");
+ error = 1;
+ }
+
+ if (((color_type == PNG_COLOR_TYPE_PALETTE) && bit_depth > 8) ||
+ ((color_type == PNG_COLOR_TYPE_RGB ||
+ color_type == PNG_COLOR_TYPE_GRAY_ALPHA ||
+ color_type == PNG_COLOR_TYPE_RGB_ALPHA) && bit_depth < 8))
+ {
+ png_warning(png_ptr, "Invalid color type/bit depth combination in IHDR");
+ error = 1;
+ }
+
+ if (interlace_type >= PNG_INTERLACE_LAST)
+ {
+ png_warning(png_ptr, "Unknown interlace method in IHDR");
+ error = 1;
+ }
+
+ if (compression_type != PNG_COMPRESSION_TYPE_BASE)
+ {
+ png_warning(png_ptr, "Unknown compression method in IHDR");
+ error = 1;
+ }
+
+#ifdef PNG_MNG_FEATURES_SUPPORTED
+ /* Accept filter_method 64 (intrapixel differencing) only if
+ * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and
+ * 2. Libpng did not read a PNG signature (this filter_method is only
+ * used in PNG datastreams that are embedded in MNG datastreams) and
+ * 3. The application called png_permit_mng_features with a mask that
+ * included PNG_FLAG_MNG_FILTER_64 and
+ * 4. The filter_method is 64 and
+ * 5. The color_type is RGB or RGBA
+ */
+ if ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) &&
+ png_ptr->mng_features_permitted)
+ png_warning(png_ptr, "MNG features are not allowed in a PNG datastream");
+
+ if (filter_type != PNG_FILTER_TYPE_BASE)
+ {
+ if (!((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
+ (filter_type == PNG_INTRAPIXEL_DIFFERENCING) &&
+ ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) == 0) &&
+ (color_type == PNG_COLOR_TYPE_RGB ||
+ color_type == PNG_COLOR_TYPE_RGB_ALPHA)))
+ {
+ png_warning(png_ptr, "Unknown filter method in IHDR");
+ error = 1;
+ }
+
+ if (png_ptr->mode & PNG_HAVE_PNG_SIGNATURE)
+ {
+ png_warning(png_ptr, "Invalid filter method in IHDR");
+ error = 1;
+ }
+ }
+
+#else
+ if (filter_type != PNG_FILTER_TYPE_BASE)
+ {
+ png_warning(png_ptr, "Unknown filter method in IHDR");
+ error = 1;
+ }
+#endif
+
+ if (error == 1)
+ png_error(png_ptr, "Invalid IHDR data");
+}
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
diff --git a/src/3rdparty/libpng/png.h b/src/3rdparty/libpng/png.h
index d95339d7e4..5ea2b0d829 100644
--- a/src/3rdparty/libpng/png.h
+++ b/src/3rdparty/libpng/png.h
@@ -1,7 +1,8 @@
+
/* png.h - header file for PNG reference library
*
- * libpng version 1.2.40 - September 10, 2009
- * Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ * libpng version 1.4.0 - January 3, 2010
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -10,7 +11,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
- * libpng versions 0.97, January 1998, through 1.2.40 - September 10, 2009: Glenn
+ * libpng versions 0.97, January 1998, through 1.4.0 - January 3, 2010: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@@ -104,147 +105,35 @@
* 1.0.16 10 10016 10.so.0.1.0.16
* 1.2.6 13 10206 12.so.0.1.2.6
* 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2
- * 1.0.17rc1 10 10017 10.so.0.1.0.17rc1
+ * 1.0.17rc1 10 10017 12.so.0.1.0.17rc1
* 1.2.7rc1 13 10207 12.so.0.1.2.7rc1
- * 1.0.17 10 10017 10.so.0.1.0.17
+ * 1.0.17 10 10017 12.so.0.1.0.17
* 1.2.7 13 10207 12.so.0.1.2.7
* 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5
- * 1.0.18rc1-5 10 10018 10.so.0.1.0.18rc1-5
+ * 1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5
* 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5
- * 1.0.18 10 10018 10.so.0.1.0.18
+ * 1.0.18 10 10018 12.so.0.1.0.18
* 1.2.8 13 10208 12.so.0.1.2.8
* 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3
* 1.2.9beta4-11 13 10209 12.so.0.9[.0]
* 1.2.9rc1 13 10209 12.so.0.9[.0]
* 1.2.9 13 10209 12.so.0.9[.0]
- * 1.2.10beta1-8 13 10210 12.so.0.10[.0]
- * 1.2.10rc1-3 13 10210 12.so.0.10[.0]
+ * 1.2.10beta1-7 13 10210 12.so.0.10[.0]
+ * 1.2.10rc1-2 13 10210 12.so.0.10[.0]
* 1.2.10 13 10210 12.so.0.10[.0]
+ * 1.4.0beta1-5 14 10400 14.so.0.0[.0]
* 1.2.11beta1-4 13 10211 12.so.0.11[.0]
- * 1.0.19rc1-5 10 10019 10.so.0.19[.0]
- * 1.2.11rc1-5 13 10211 12.so.0.11[.0]
- * 1.0.19 10 10019 10.so.0.19[.0]
+ * 1.4.0beta7-8 14 10400 14.so.0.0[.0]
* 1.2.11 13 10211 12.so.0.11[.0]
- * 1.0.20 10 10020 10.so.0.20[.0]
* 1.2.12 13 10212 12.so.0.12[.0]
- * 1.2.13beta1 13 10213 12.so.0.13[.0]
- * 1.0.21 10 10021 10.so.0.21[.0]
+ * 1.4.0beta9-14 14 10400 14.so.0.0[.0]
* 1.2.13 13 10213 12.so.0.13[.0]
- * 1.2.14beta1-2 13 10214 12.so.0.14[.0]
- * 1.0.22rc1 10 10022 10.so.0.22[.0]
- * 1.2.14rc1 13 10214 12.so.0.14[.0]
- * 1.0.22 10 10022 10.so.0.22[.0]
- * 1.2.14 13 10214 12.so.0.14[.0]
- * 1.2.15beta1-6 13 10215 12.so.0.15[.0]
- * 1.0.23rc1-5 10 10023 10.so.0.23[.0]
- * 1.2.15rc1-5 13 10215 12.so.0.15[.0]
- * 1.0.23 10 10023 10.so.0.23[.0]
- * 1.2.15 13 10215 12.so.0.15[.0]
- * 1.2.16beta1-2 13 10216 12.so.0.16[.0]
- * 1.2.16rc1 13 10216 12.so.0.16[.0]
- * 1.0.24 10 10024 10.so.0.24[.0]
- * 1.2.16 13 10216 12.so.0.16[.0]
- * 1.2.17beta1-2 13 10217 12.so.0.17[.0]
- * 1.0.25rc1 10 10025 10.so.0.25[.0]
- * 1.2.17rc1-3 13 10217 12.so.0.17[.0]
- * 1.0.25 10 10025 10.so.0.25[.0]
- * 1.2.17 13 10217 12.so.0.17[.0]
- * 1.0.26 10 10026 10.so.0.26[.0]
- * 1.2.18 13 10218 12.so.0.18[.0]
- * 1.2.19beta1-31 13 10219 12.so.0.19[.0]
- * 1.0.27rc1-6 10 10027 10.so.0.27[.0]
- * 1.2.19rc1-6 13 10219 12.so.0.19[.0]
- * 1.0.27 10 10027 10.so.0.27[.0]
- * 1.2.19 13 10219 12.so.0.19[.0]
- * 1.2.20beta01-04 13 10220 12.so.0.20[.0]
- * 1.0.28rc1-6 10 10028 10.so.0.28[.0]
- * 1.2.20rc1-6 13 10220 12.so.0.20[.0]
- * 1.0.28 10 10028 10.so.0.28[.0]
- * 1.2.20 13 10220 12.so.0.20[.0]
- * 1.2.21beta1-2 13 10221 12.so.0.21[.0]
- * 1.2.21rc1-3 13 10221 12.so.0.21[.0]
- * 1.0.29 10 10029 10.so.0.29[.0]
- * 1.2.21 13 10221 12.so.0.21[.0]
- * 1.2.22beta1-4 13 10222 12.so.0.22[.0]
- * 1.0.30rc1 10 10030 10.so.0.30[.0]
- * 1.2.22rc1 13 10222 12.so.0.22[.0]
- * 1.0.30 10 10030 10.so.0.30[.0]
- * 1.2.22 13 10222 12.so.0.22[.0]
- * 1.2.23beta01-05 13 10223 12.so.0.23[.0]
- * 1.2.23rc01 13 10223 12.so.0.23[.0]
- * 1.2.23 13 10223 12.so.0.23[.0]
- * 1.2.24beta01-02 13 10224 12.so.0.24[.0]
- * 1.2.24rc01 13 10224 12.so.0.24[.0]
- * 1.2.24 13 10224 12.so.0.24[.0]
- * 1.2.25beta01-06 13 10225 12.so.0.25[.0]
- * 1.2.25rc01-02 13 10225 12.so.0.25[.0]
- * 1.0.31 10 10031 10.so.0.31[.0]
- * 1.2.25 13 10225 12.so.0.25[.0]
- * 1.2.26beta01-06 13 10226 12.so.0.26[.0]
- * 1.2.26rc01 13 10226 12.so.0.26[.0]
- * 1.2.26 13 10226 12.so.0.26[.0]
- * 1.0.32 10 10032 10.so.0.32[.0]
- * 1.2.27beta01-06 13 10227 12.so.0.27[.0]
- * 1.2.27rc01 13 10227 12.so.0.27[.0]
- * 1.0.33 10 10033 10.so.0.33[.0]
- * 1.2.27 13 10227 12.so.0.27[.0]
- * 1.0.34 10 10034 10.so.0.34[.0]
- * 1.2.28 13 10228 12.so.0.28[.0]
- * 1.2.29beta01-03 13 10229 12.so.0.29[.0]
- * 1.2.29rc01 13 10229 12.so.0.29[.0]
- * 1.0.35 10 10035 10.so.0.35[.0]
- * 1.2.29 13 10229 12.so.0.29[.0]
- * 1.0.37 10 10037 10.so.0.37[.0]
- * 1.2.30beta01-04 13 10230 12.so.0.30[.0]
- * 1.0.38rc01-08 10 10038 10.so.0.38[.0]
- * 1.2.30rc01-08 13 10230 12.so.0.30[.0]
- * 1.0.38 10 10038 10.so.0.38[.0]
- * 1.2.30 13 10230 12.so.0.30[.0]
- * 1.0.39rc01-03 10 10039 10.so.0.39[.0]
- * 1.2.31rc01-03 13 10231 12.so.0.31[.0]
- * 1.0.39 10 10039 10.so.0.39[.0]
- * 1.2.31 13 10231 12.so.0.31[.0]
- * 1.2.32beta01-02 13 10232 12.so.0.32[.0]
- * 1.0.40rc01 10 10040 10.so.0.40[.0]
- * 1.2.32rc01 13 10232 12.so.0.32[.0]
- * 1.0.40 10 10040 10.so.0.40[.0]
- * 1.2.32 13 10232 12.so.0.32[.0]
- * 1.2.33beta01-02 13 10233 12.so.0.33[.0]
- * 1.2.33rc01-02 13 10233 12.so.0.33[.0]
- * 1.0.41rc01 10 10041 10.so.0.41[.0]
- * 1.2.33 13 10233 12.so.0.33[.0]
- * 1.0.41 10 10041 10.so.0.41[.0]
- * 1.2.34beta01-07 13 10234 12.so.0.34[.0]
- * 1.0.42rc01 10 10042 10.so.0.42[.0]
- * 1.2.34rc01 13 10234 12.so.0.34[.0]
- * 1.0.42 10 10042 10.so.0.42[.0]
- * 1.2.34 13 10234 12.so.0.34[.0]
- * 1.2.35beta01-03 13 10235 12.so.0.35[.0]
- * 1.0.43rc01-02 10 10043 10.so.0.43[.0]
- * 1.2.35rc01-02 13 10235 12.so.0.35[.0]
- * 1.0.43 10 10043 10.so.0.43[.0]
- * 1.2.35 13 10235 12.so.0.35[.0]
- * 1.2.36beta01-05 13 10236 12.so.0.36[.0]
- * 1.2.36rc01 13 10236 12.so.0.36[.0]
- * 1.0.44 10 10044 10.so.0.44[.0]
- * 1.2.36 13 10236 12.so.0.36[.0]
- * 1.2.37beta01-03 13 10237 12.so.0.37[.0]
- * 1.2.37rc01 13 10237 12.so.0.37[.0]
- * 1.2.37 13 10237 12.so.0.37[.0]
- * 1.2.45 10 10045 12.so.0.45[.0]
- * 1.0.46 10 10046 10.so.0.46[.0]
- * 1.2.38beta01 13 10238 12.so.0.38[.0]
- * 1.2.38rc01-03 13 10238 12.so.0.38[.0]
- * 1.0.47 10 10047 10.so.0.47[.0]
- * 1.2.38 13 10238 12.so.0.38[.0]
- * 1.2.39beta01-05 13 10239 12.so.0.39[.0]
- * 1.2.39rc01 13 10239 12.so.0.39[.0]
- * 1.0.48 10 10048 10.so.0.48[.0]
- * 1.2.39 13 10239 12.so.0.39[.0]
- * 1.2.40beta01 13 10240 12.so.0.40[.0]
- * 1.2.40rc01 13 10240 12.so.0.40[.0]
- * 1.0.49 10 10049 10.so.0.49[.0]
- * 1.2.40 13 10240 12.so.0.40[.0]
+ * 1.4.0beta15-36 14 10400 14.so.0.0[.0]
+ * 1.4.0beta37-87 14 10400 14.so.14.0[.0]
+ * 1.4.0rc01 14 10400 14.so.14.0[.0]
+ * 1.4.0beta88-109 14 10400 14.so.14.0[.0]
+ * 1.4.0rc02-08 14 10400 14.so.14.0[.0]
+ * 1.4.0 14 10400 14.so.14.0[.0]
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@@ -254,7 +143,7 @@
* to the source version x.y.z (leading zeros in y and z). Beta versions
* were given the previous public release number plus a letter, until
* version 1.0.6j; from then on they were given the upcoming public
- * release number plus "betaNN" or "rcNN".
+ * release number plus "betaNN" or "rcN".
*
* Binary incompatibility exists only when applications make direct access
* to the info_ptr or png_ptr members through png.h, and the compiled
@@ -276,8 +165,8 @@
*
* This code is released under the libpng license.
*
- * libpng versions 1.2.6, August 15, 2004, through 1.2.40, September 10, 2009, are
- * Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are
+ * libpng versions 1.2.6, August 15, 2004, through 1.4.0, January 3, 2010, are
+ * Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors:
*
@@ -365,7 +254,7 @@
* A "png_get_copyright" function is available, for convenient use in "about"
* boxes and the like:
*
- * printf("%s",png_get_copyright(NULL));
+ * printf("%s",png_get_copyright(NULL));
*
* Also, the PNG logo (in PNG format, of course) is supplied in the
* files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
@@ -388,13 +277,13 @@
* Y2K compliance in libpng:
* =========================
*
- * September 10, 2009
+ * January 3, 2010
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
- * upward through 1.2.40 are Y2K compliant. It is my belief that earlier
+ * upward through 1.4.0 are Y2K compliant. It is my belief that earlier
* versions were also Y2K compliant.
*
* Libpng only has three year fields. One is a 2-byte unsigned integer
@@ -450,17 +339,17 @@
*/
/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.2.40"
+#define PNG_LIBPNG_VER_STRING "1.4.0"
#define PNG_HEADER_VERSION_STRING \
- " libpng version 1.2.40 - September 10, 2009\n"
+ " libpng version 1.4.0 - January 3, 2010\n"
-#define PNG_LIBPNG_VER_SONUM 0
-#define PNG_LIBPNG_VER_DLLNUM 13
+#define PNG_LIBPNG_VER_SONUM 14
+#define PNG_LIBPNG_VER_DLLNUM 14
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
-#define PNG_LIBPNG_VER_MINOR 2
-#define PNG_LIBPNG_VER_RELEASE 40
+#define PNG_LIBPNG_VER_MINOR 4
+#define PNG_LIBPNG_VER_RELEASE 0
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
*/
@@ -482,7 +371,7 @@
#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
PNG_LIBPNG_BUILD_PRIVATE */
-#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE
+#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_BETA
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
* We must not include leading zeros.
@@ -490,19 +379,24 @@
* version 1.0.0 was mis-numbered 100 instead of 10000). From
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
*/
-#define PNG_LIBPNG_VER 10240 /* 1.2.40 */
+#define PNG_LIBPNG_VER 10400 /* 1.4.0 */
#ifndef PNG_VERSION_INFO_ONLY
/* Include the compression library's header */
#include "zlib.h"
#endif
+#ifdef _AIX
+#define jmpbuf __jmpbuf
+#endif
+
/* Include all user configurable info, including optional assembler routines */
#include "pngconf.h"
/*
- * Added at libpng-1.2.8 */
-/* Ref MSDN: Private as priority over Special
+ * Added at libpng-1.2.8
+ *
+ * Ref MSDN: Private as priority over Special
* VS_FF_PRIVATEBUILD File *was not* built using standard release
* procedures. If this value is given, the StringFileInfo block must
* contain a PrivateBuild string.
@@ -513,11 +407,11 @@
* StringFileInfo block must contain a SpecialBuild string.
*/
-#if defined(PNG_USER_PRIVATEBUILD)
+#ifdef PNG_USER_PRIVATEBUILD
# define PNG_LIBPNG_BUILD_TYPE \
(PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE)
#else
-# if defined(PNG_LIBPNG_SPECIALBUILD)
+# ifdef PNG_LIBPNG_SPECIALBUILD
# define PNG_LIBPNG_BUILD_TYPE \
(PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL)
# else
@@ -538,65 +432,12 @@ extern "C" {
* which applications aren't expected to use directly.
*/
-#ifndef PNG_NO_TYPECAST_NULL
-#define int_p_NULL (int *)NULL
-#define png_bytep_NULL (png_bytep)NULL
-#define png_bytepp_NULL (png_bytepp)NULL
-#define png_doublep_NULL (png_doublep)NULL
-#define png_error_ptr_NULL (png_error_ptr)NULL
-#define png_flush_ptr_NULL (png_flush_ptr)NULL
-#define png_free_ptr_NULL (png_free_ptr)NULL
-#define png_infopp_NULL (png_infopp)NULL
-#define png_malloc_ptr_NULL (png_malloc_ptr)NULL
-#define png_read_status_ptr_NULL (png_read_status_ptr)NULL
-#define png_rw_ptr_NULL (png_rw_ptr)NULL
-#define png_structp_NULL (png_structp)NULL
-#define png_uint_16p_NULL (png_uint_16p)NULL
-#define png_voidp_NULL (png_voidp)NULL
-#define png_write_status_ptr_NULL (png_write_status_ptr)NULL
-#else
-#define int_p_NULL NULL
-#define png_bytep_NULL NULL
-#define png_bytepp_NULL NULL
-#define png_doublep_NULL NULL
-#define png_error_ptr_NULL NULL
-#define png_flush_ptr_NULL NULL
-#define png_free_ptr_NULL NULL
-#define png_infopp_NULL NULL
-#define png_malloc_ptr_NULL NULL
-#define png_read_status_ptr_NULL NULL
-#define png_rw_ptr_NULL NULL
-#define png_structp_NULL NULL
-#define png_uint_16p_NULL NULL
-#define png_voidp_NULL NULL
-#define png_write_status_ptr_NULL NULL
-#endif
-
/* Variables declared in png.c - only it needs to define PNG_NO_EXTERN */
#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
/* Version information for C files, stored in png.c. This had better match
* the version above.
*/
-#ifdef PNG_USE_GLOBAL_ARRAYS
-PNG_EXPORT_VAR (PNG_CONST char) png_libpng_ver[18];
- /* Need room for 99.99.99beta99z */
-#else
#define png_libpng_ver png_get_header_ver(NULL)
-#endif
-
-#ifdef PNG_USE_GLOBAL_ARRAYS
-/* This was removed in version 1.0.5c */
-/* Structures to facilitate easy interlacing. See png.c for more details */
-PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_start[7];
-PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_inc[7];
-PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_ystart[7];
-PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_yinc[7];
-PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_mask[7];
-PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_dsp_mask[7];
-/* This isn't currently used. If you need it, see png.c for more details.
-PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_height[7];
-*/
-#endif
#endif /* PNG_NO_EXTERN */
@@ -698,8 +539,7 @@ typedef png_text FAR * FAR * png_textpp;
#endif
/* Supported compression types for text in PNG files (tEXt, and zTXt).
- * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed.
- */
+ * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. */
#define PNG_TEXT_COMPRESSION_NONE_WR -3
#define PNG_TEXT_COMPRESSION_zTXt_WR -2
#define PNG_TEXT_COMPRESSION_NONE -1
@@ -733,10 +573,9 @@ typedef png_time FAR * FAR * png_timepp;
* up private chunks for output even though the library doesn't actually
* know about their semantics.
*/
-#define PNG_CHUNK_NAME_LENGTH 5
typedef struct png_unknown_chunk_t
{
- png_byte name[PNG_CHUNK_NAME_LENGTH];
+ png_byte name[5];
png_byte *data;
png_size_t size;
@@ -789,26 +628,26 @@ typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp;
*/
typedef struct png_info_struct
{
- /* The following are necessary for every PNG file */
- png_uint_32 width; /* width of image in pixels (from IHDR) */
- png_uint_32 height; /* height of image in pixels (from IHDR) */
- png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */
- png_uint_32 rowbytes; /* bytes needed to hold an untransformed row */
- png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */
- png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */
- png_uint_16 num_trans; /* number of transparent palette color (tRNS) */
- png_byte bit_depth; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */
- png_byte color_type; /* see PNG_COLOR_TYPE_ below (from IHDR) */
+ /* the following are necessary for every PNG file */
+ png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels (from IHDR) */
+ png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels (from IHDR) */
+ png_uint_32 valid PNG_DEPSTRUCT; /* valid chunk data (see PNG_INFO_ below) */
+ png_size_t rowbytes PNG_DEPSTRUCT; /* bytes needed to hold an untransformed row */
+ png_colorp palette PNG_DEPSTRUCT; /* array of color values (valid & PNG_INFO_PLTE) */
+ png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in "palette" (PLTE) */
+ png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparent palette color (tRNS) */
+ png_byte bit_depth PNG_DEPSTRUCT; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */
+ png_byte color_type PNG_DEPSTRUCT; /* see PNG_COLOR_TYPE_ below (from IHDR) */
/* The following three should have been named *_method not *_type */
- png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */
- png_byte filter_type; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */
- png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
+ png_byte compression_type PNG_DEPSTRUCT; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */
+ png_byte filter_type PNG_DEPSTRUCT; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */
+ png_byte interlace_type PNG_DEPSTRUCT; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
/* The following is informational only on read, and not used on writes. */
- png_byte channels; /* number of data channels per pixel (1, 2, 3, 4) */
- png_byte pixel_depth; /* number of bits per pixel */
- png_byte spare_byte; /* to align the data, and for future use */
- png_byte signature[8]; /* magic bytes read by libpng from start of file */
+ png_byte channels PNG_DEPSTRUCT; /* number of data channels per pixel (1, 2, 3, 4) */
+ png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */
+ png_byte spare_byte PNG_DEPSTRUCT; /* to align the data, and for future use */
+ png_byte signature[8] PNG_DEPSTRUCT; /* magic bytes read by libpng from start of file */
/* The rest of the data is optional. If you are reading, check the
* valid field to see if the information in these are valid. If you
@@ -821,16 +660,16 @@ typedef struct png_info_struct
* on which the image was created, normally in the range [1.0, 2.5].
* Data is valid if (valid & PNG_INFO_gAMA) is non-zero.
*/
- float gamma; /* gamma value of image, if (valid & PNG_INFO_gAMA) */
+ float gamma PNG_DEPSTRUCT; /* gamma value of image, if (valid & PNG_INFO_gAMA) */
#endif
-#if defined(PNG_sRGB_SUPPORTED)
+#ifdef PNG_sRGB_SUPPORTED
/* GR-P, 0.96a */
/* Data valid if (valid & PNG_INFO_sRGB) non-zero. */
- png_byte srgb_intent; /* sRGB rendering intent [0, 1, 2, or 3] */
+ png_byte srgb_intent PNG_DEPSTRUCT; /* sRGB rendering intent [0, 1, 2, or 3] */
#endif
-#if defined(PNG_TEXT_SUPPORTED)
+#ifdef PNG_TEXT_SUPPORTED
/* The tEXt, and zTXt chunks contain human-readable textual data in
* uncompressed, compressed, and optionally compressed forms, respectively.
* The data in "text" is an array of pointers to uncompressed,
@@ -839,26 +678,26 @@ typedef struct png_info_struct
* unique, and the text string may be empty. Any number of text chunks may
* be in an image.
*/
- int num_text; /* number of comments read/to write */
- int max_text; /* current size of text array */
- png_textp text; /* array of comments read/to write */
+ int num_text PNG_DEPSTRUCT; /* number of comments read/to write */
+ int max_text PNG_DEPSTRUCT; /* current size of text array */
+ png_textp text PNG_DEPSTRUCT; /* array of comments read/to write */
#endif /* PNG_TEXT_SUPPORTED */
-#if defined(PNG_tIME_SUPPORTED)
+#ifdef PNG_tIME_SUPPORTED
/* The tIME chunk holds the last time the displayed image data was
* modified. See the png_time struct for the contents of this struct.
*/
- png_time mod_time;
+ png_time mod_time PNG_DEPSTRUCT;
#endif
-#if defined(PNG_sBIT_SUPPORTED)
+#ifdef PNG_sBIT_SUPPORTED
/* The sBIT chunk specifies the number of significant high-order bits
* in the pixel data. Values are in the range [1, bit_depth], and are
* only specified for the channels in the pixel data. The contents of
* the low-order bits is not specified. Data is valid if
* (valid & PNG_INFO_sBIT) is non-zero.
*/
- png_color_8 sig_bit; /* significant bits in color channels */
+ png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in color channels */
#endif
#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \
@@ -872,8 +711,8 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
* single color specified that should be treated as fully transparent.
* Data is valid if (valid & PNG_INFO_tRNS) is non-zero.
*/
- png_bytep trans; /* transparent values for paletted image */
- png_color_16 trans_values; /* transparent color for non-palette image */
+ png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for paletted image */
+ png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for non-palette image */
#endif
#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
@@ -883,38 +722,38 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
* in "background" are normally in the same color space/depth as the
* pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero.
*/
- png_color_16 background;
+ png_color_16 background PNG_DEPSTRUCT;
#endif
-#if defined(PNG_oFFs_SUPPORTED)
+#ifdef PNG_oFFs_SUPPORTED
/* The oFFs chunk gives the offset in "offset_unit_type" units rightwards
* and downwards from the top-left corner of the display, page, or other
* application-specific co-ordinate space. See the PNG_OFFSET_ defines
* below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero.
*/
- png_int_32 x_offset; /* x offset on page */
- png_int_32 y_offset; /* y offset on page */
- png_byte offset_unit_type; /* offset units type */
+ png_int_32 x_offset PNG_DEPSTRUCT; /* x offset on page */
+ png_int_32 y_offset PNG_DEPSTRUCT; /* y offset on page */
+ png_byte offset_unit_type PNG_DEPSTRUCT; /* offset units type */
#endif
-#if defined(PNG_pHYs_SUPPORTED)
+#ifdef PNG_pHYs_SUPPORTED
/* The pHYs chunk gives the physical pixel density of the image for
* display or printing in "phys_unit_type" units (see PNG_RESOLUTION_
* defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero.
*/
- png_uint_32 x_pixels_per_unit; /* horizontal pixel density */
- png_uint_32 y_pixels_per_unit; /* vertical pixel density */
- png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */
+ png_uint_32 x_pixels_per_unit PNG_DEPSTRUCT; /* horizontal pixel density */
+ png_uint_32 y_pixels_per_unit PNG_DEPSTRUCT; /* vertical pixel density */
+ png_byte phys_unit_type PNG_DEPSTRUCT; /* resolution type (see PNG_RESOLUTION_ below) */
#endif
-#if defined(PNG_hIST_SUPPORTED)
+#ifdef PNG_hIST_SUPPORTED
/* The hIST chunk contains the relative frequency or importance of the
* various palette entries, so that a viewer can intelligently select a
* reduced-color palette, if required. Data is an array of "num_palette"
* values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST)
* is non-zero.
*/
- png_uint_16p hist;
+ png_uint_16p hist PNG_DEPSTRUCT;
#endif
#ifdef PNG_cHRM_SUPPORTED
@@ -925,18 +764,18 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
* [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero.
*/
#ifdef PNG_FLOATING_POINT_SUPPORTED
- float x_white;
- float y_white;
- float x_red;
- float y_red;
- float x_green;
- float y_green;
- float x_blue;
- float y_blue;
+ float x_white PNG_DEPSTRUCT;
+ float y_white PNG_DEPSTRUCT;
+ float x_red PNG_DEPSTRUCT;
+ float y_red PNG_DEPSTRUCT;
+ float x_green PNG_DEPSTRUCT;
+ float y_green PNG_DEPSTRUCT;
+ float x_blue PNG_DEPSTRUCT;
+ float y_blue PNG_DEPSTRUCT;
#endif
#endif
-#if defined(PNG_pCAL_SUPPORTED)
+#ifdef PNG_pCAL_SUPPORTED
/* The pCAL chunk describes a transformation between the stored pixel
* values and original physical data values used to create the image.
* The integer range [0, 2^bit_depth - 1] maps to the floating-point
@@ -948,43 +787,41 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
* implemented, and for a description of the ASCII parameter strings.
* Data values are valid if (valid & PNG_INFO_pCAL) non-zero.
*/
- png_charp pcal_purpose; /* pCAL chunk description string */
- png_int_32 pcal_X0; /* minimum value */
- png_int_32 pcal_X1; /* maximum value */
- png_charp pcal_units; /* Latin-1 string giving physical units */
- png_charpp pcal_params; /* ASCII strings containing parameter values */
- png_byte pcal_type; /* equation type (see PNG_EQUATION_ below) */
- png_byte pcal_nparams; /* number of parameters given in pcal_params */
+ png_charp pcal_purpose PNG_DEPSTRUCT; /* pCAL chunk description string */
+ png_int_32 pcal_X0 PNG_DEPSTRUCT; /* minimum value */
+ png_int_32 pcal_X1 PNG_DEPSTRUCT; /* maximum value */
+ png_charp pcal_units PNG_DEPSTRUCT; /* Latin-1 string giving physical units */
+ png_charpp pcal_params PNG_DEPSTRUCT; /* ASCII strings containing parameter values */
+ png_byte pcal_type PNG_DEPSTRUCT; /* equation type (see PNG_EQUATION_ below) */
+ png_byte pcal_nparams PNG_DEPSTRUCT; /* number of parameters given in pcal_params */
#endif
/* New members added in libpng-1.0.6 */
-#ifdef PNG_FREE_ME_SUPPORTED
- png_uint_32 free_me; /* flags items libpng is responsible for freeing */
-#endif
+ png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is responsible for freeing */
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \
defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
/* Storage for unknown chunks that the library doesn't recognize. */
- png_unknown_chunkp unknown_chunks;
- png_size_t unknown_chunks_num;
+ png_unknown_chunkp unknown_chunks PNG_DEPSTRUCT;
+ png_size_t unknown_chunks_num PNG_DEPSTRUCT;
#endif
-#if defined(PNG_iCCP_SUPPORTED)
+#ifdef PNG_iCCP_SUPPORTED
/* iCCP chunk data. */
- png_charp iccp_name; /* profile name */
- png_charp iccp_profile; /* International Color Consortium profile data */
+ png_charp iccp_name PNG_DEPSTRUCT; /* profile name */
+ png_charp iccp_profile PNG_DEPSTRUCT; /* International Color Consortium profile data */
/* Note to maintainer: should be png_bytep */
- png_uint_32 iccp_proflen; /* ICC profile data length */
- png_byte iccp_compression; /* Always zero */
+ png_uint_32 iccp_proflen PNG_DEPSTRUCT; /* ICC profile data length */
+ png_byte iccp_compression PNG_DEPSTRUCT; /* Always zero */
#endif
-#if defined(PNG_sPLT_SUPPORTED)
+#ifdef PNG_sPLT_SUPPORTED
/* Data on sPLT chunks (there may be more than one). */
- png_sPLT_tp splt_palettes;
- png_uint_32 splt_palettes_num;
+ png_sPLT_tp splt_palettes PNG_DEPSTRUCT;
+ png_uint_32 splt_palettes_num PNG_DEPSTRUCT;
#endif
-#if defined(PNG_sCAL_SUPPORTED)
+#ifdef PNG_sCAL_SUPPORTED
/* The sCAL chunk describes the actual physical dimensions of the
* subject matter of the graphic. The chunk contains a unit specification
* a byte value, and two ASCII strings representing floating-point
@@ -992,36 +829,36 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
* in the image. This external representation is converted to double
* here. Data values are valid if (valid & PNG_INFO_sCAL) is non-zero.
*/
- png_byte scal_unit; /* unit of physical scale */
+ png_byte scal_unit PNG_DEPSTRUCT; /* unit of physical scale */
#ifdef PNG_FLOATING_POINT_SUPPORTED
- double scal_pixel_width; /* width of one pixel */
- double scal_pixel_height; /* height of one pixel */
+ double scal_pixel_width PNG_DEPSTRUCT; /* width of one pixel */
+ double scal_pixel_height PNG_DEPSTRUCT; /* height of one pixel */
#endif
#ifdef PNG_FIXED_POINT_SUPPORTED
- png_charp scal_s_width; /* string containing height */
- png_charp scal_s_height; /* string containing width */
+ png_charp scal_s_width PNG_DEPSTRUCT; /* string containing height */
+ png_charp scal_s_height PNG_DEPSTRUCT; /* string containing width */
#endif
#endif
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
+#ifdef PNG_INFO_IMAGE_SUPPORTED
/* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) non-zero */
/* Data valid if (valid & PNG_INFO_IDAT) non-zero */
- png_bytepp row_pointers; /* the image bits */
+ png_bytepp row_pointers PNG_DEPSTRUCT; /* the image bits */
#endif
#if defined(PNG_FIXED_POINT_SUPPORTED) && defined(PNG_gAMA_SUPPORTED)
- png_fixed_point int_gamma; /* gamma of image, if (valid & PNG_INFO_gAMA) */
+ png_fixed_point int_gamma PNG_DEPSTRUCT; /* gamma of image, if (valid & PNG_INFO_gAMA) */
#endif
#if defined(PNG_cHRM_SUPPORTED) && defined(PNG_FIXED_POINT_SUPPORTED)
- png_fixed_point int_x_white;
- png_fixed_point int_y_white;
- png_fixed_point int_x_red;
- png_fixed_point int_y_red;
- png_fixed_point int_x_green;
- png_fixed_point int_y_green;
- png_fixed_point int_x_blue;
- png_fixed_point int_y_blue;
+ png_fixed_point int_x_white PNG_DEPSTRUCT;
+ png_fixed_point int_y_white PNG_DEPSTRUCT;
+ png_fixed_point int_x_red PNG_DEPSTRUCT;
+ png_fixed_point int_y_red PNG_DEPSTRUCT;
+ png_fixed_point int_x_green PNG_DEPSTRUCT;
+ png_fixed_point int_y_green PNG_DEPSTRUCT;
+ png_fixed_point int_x_blue PNG_DEPSTRUCT;
+ png_fixed_point int_y_blue PNG_DEPSTRUCT;
#endif
} png_info;
@@ -1033,10 +870,6 @@ typedef png_info FAR * FAR * png_infopp;
#define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL)
#define PNG_UINT_32_MAX ((png_uint_32)(-1))
#define PNG_SIZE_MAX ((png_size_t)(-1))
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-/* PNG_MAX_UINT is deprecated; use PNG_UINT_31_MAX instead. */
-#define PNG_MAX_UINT PNG_UINT_31_MAX
-#endif
/* These describe the color_type field in png_info. */
/* color type masks */
@@ -1133,7 +966,7 @@ typedef png_info FAR * FAR * png_infopp;
typedef struct png_row_info_struct
{
png_uint_32 width; /* width of row */
- png_uint_32 rowbytes; /* number of bytes in row */
+ png_size_t rowbytes; /* number of bytes in row */
png_byte color_type; /* color type of row */
png_byte bit_depth; /* bit depth of row */
png_byte channels; /* number of channels (1, 2, 3, or 4) */
@@ -1168,18 +1001,24 @@ typedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep,
#endif
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
- defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
- defined(PNG_LEGACY_SUPPORTED)
+ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
typedef void (PNGAPI *png_user_transform_ptr) PNGARG((png_structp,
png_row_infop, png_bytep));
#endif
-#if defined(PNG_USER_CHUNKS_SUPPORTED)
+#ifdef PNG_USER_CHUNKS_SUPPORTED
typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, png_unknown_chunkp));
#endif
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp));
#endif
+#ifdef PNG_SETJMP_SUPPORTED
+/* This must match the function definition in <setjmp.h>, and the
+ * application must include this before png.h to obtain the definition
+ * of jmp_buf.
+ */
+typedef void (PNGAPI *png_longjmp_ptr) PNGARG((jmp_buf, int));
+#endif
/* Transform masks for the high-level interface */
#define PNG_TRANSFORM_IDENTITY 0x0000 /* read and write */
@@ -1194,17 +1033,19 @@ typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp));
#define PNG_TRANSFORM_SWAP_ALPHA 0x0100 /* read and write */
#define PNG_TRANSFORM_SWAP_ENDIAN 0x0200 /* read and write */
#define PNG_TRANSFORM_INVERT_ALPHA 0x0400 /* read and write */
-#define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* write only, deprecated */
+#define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* write only */
/* Added to libpng-1.2.34 */
-#define PNG_TRANSFORM_STRIP_FILLER_BEFORE 0x0800 /* write only */
-#define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* write only */
+#define PNG_TRANSFORM_STRIP_FILLER_BEFORE PNG_TRANSFORM_STRIP_FILLER
+#define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* write only */
+/* Added to libpng-1.4.0 */
+#define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */
/* Flags for MNG supported features */
#define PNG_FLAG_MNG_EMPTY_PLTE 0x01
#define PNG_FLAG_MNG_FILTER_64 0x04
#define PNG_ALL_MNG_FEATURES 0x05
-typedef png_voidp (*png_malloc_ptr) PNGARG((png_structp, png_size_t));
+typedef png_voidp (*png_malloc_ptr) PNGARG((png_structp, png_alloc_size_t));
typedef void (*png_free_ptr) PNGARG((png_structp, png_voidp));
/* The structure that holds the information to read and write PNG files.
@@ -1217,221 +1058,215 @@ typedef void (*png_free_ptr) PNGARG((png_structp, png_voidp));
struct png_struct_def
{
#ifdef PNG_SETJMP_SUPPORTED
- jmp_buf jmpbuf; /* used in png_error */
+ jmp_buf jmpbuf PNG_DEPSTRUCT; /* used in png_error */
+ png_longjmp_ptr longjmp_fn PNG_DEPSTRUCT;/* setjmp non-local goto function. */
#endif
- png_error_ptr error_fn; /* function for printing errors and aborting */
- png_error_ptr warning_fn; /* function for printing warnings */
- png_voidp error_ptr; /* user supplied struct for error functions */
- png_rw_ptr write_data_fn; /* function for writing output data */
- png_rw_ptr read_data_fn; /* function for reading input data */
- png_voidp io_ptr; /* ptr to application struct for I/O functions */
+ png_error_ptr error_fn PNG_DEPSTRUCT; /* function for printing errors and aborting */
+ png_error_ptr warning_fn PNG_DEPSTRUCT; /* function for printing warnings */
+ png_voidp error_ptr PNG_DEPSTRUCT; /* user supplied struct for error functions */
+ png_rw_ptr write_data_fn PNG_DEPSTRUCT; /* function for writing output data */
+ png_rw_ptr read_data_fn PNG_DEPSTRUCT; /* function for reading input data */
+ png_voidp io_ptr PNG_DEPSTRUCT; /* ptr to application struct for I/O functions */
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
- png_user_transform_ptr read_user_transform_fn; /* user read transform */
+#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
+ png_user_transform_ptr read_user_transform_fn PNG_DEPSTRUCT; /* user read transform */
#endif
-#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
- png_user_transform_ptr write_user_transform_fn; /* user write transform */
+#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
+ png_user_transform_ptr write_user_transform_fn PNG_DEPSTRUCT; /* user write transform */
#endif
/* These were added in libpng-1.0.2 */
-#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
+#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
- png_voidp user_transform_ptr; /* user supplied struct for user transform */
- png_byte user_transform_depth; /* bit depth of user transformed pixels */
- png_byte user_transform_channels; /* channels in user transformed pixels */
-#endif
-#endif
-
- png_uint_32 mode; /* tells us where we are in the PNG file */
- png_uint_32 flags; /* flags indicating various things to libpng */
- png_uint_32 transformations; /* which transformations to perform */
-
- z_stream zstream; /* pointer to decompression structure (below) */
- png_bytep zbuf; /* buffer for zlib */
- png_size_t zbuf_size; /* size of zbuf */
- int zlib_level; /* holds zlib compression level */
- int zlib_method; /* holds zlib compression method */
- int zlib_window_bits; /* holds zlib compression window bits */
- int zlib_mem_level; /* holds zlib compression memory level */
- int zlib_strategy; /* holds zlib compression strategy */
-
- png_uint_32 width; /* width of image in pixels */
- png_uint_32 height; /* height of image in pixels */
- png_uint_32 num_rows; /* number of rows in current pass */
- png_uint_32 usr_width; /* width of row at start of write */
- png_uint_32 rowbytes; /* size of row in bytes */
- png_uint_32 irowbytes; /* size of current interlaced row in bytes */
- png_uint_32 iwidth; /* width of current interlaced row in pixels */
- png_uint_32 row_number; /* current row in interlace pass */
- png_bytep prev_row; /* buffer to save previous (unfiltered) row */
- png_bytep row_buf; /* buffer to save current (unfiltered) row */
-#ifndef PNG_NO_WRITE_FILTER
- png_bytep sub_row; /* buffer to save "sub" row when filtering */
- png_bytep up_row; /* buffer to save "up" row when filtering */
- png_bytep avg_row; /* buffer to save "avg" row when filtering */
- png_bytep paeth_row; /* buffer to save "Paeth" row when filtering */
-#endif
- png_row_info row_info; /* used for transformation routines */
-
- png_uint_32 idat_size; /* current IDAT size for read */
- png_uint_32 crc; /* current chunk CRC value */
- png_colorp palette; /* palette from the input file */
- png_uint_16 num_palette; /* number of color entries in palette */
- png_uint_16 num_trans; /* number of transparency values */
- png_byte chunk_name[5]; /* null-terminated name of current chunk */
- png_byte compression; /* file compression type (always 0) */
- png_byte filter; /* file filter type (always 0) */
- png_byte interlaced; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
- png_byte pass; /* current interlace pass (0 - 6) */
- png_byte do_filter; /* row filter flags (see PNG_FILTER_ below ) */
- png_byte color_type; /* color type of file */
- png_byte bit_depth; /* bit depth of file */
- png_byte usr_bit_depth; /* bit depth of users row */
- png_byte pixel_depth; /* number of bits per pixel */
- png_byte channels; /* number of channels in file */
- png_byte usr_channels; /* channels at start of write */
- png_byte sig_bytes; /* magic bytes read/written from start of file */
+ png_voidp user_transform_ptr PNG_DEPSTRUCT; /* user supplied struct for user transform */
+ png_byte user_transform_depth PNG_DEPSTRUCT; /* bit depth of user transformed pixels */
+ png_byte user_transform_channels PNG_DEPSTRUCT; /* channels in user transformed pixels */
+#endif
+#endif
+
+ png_uint_32 mode PNG_DEPSTRUCT; /* tells us where we are in the PNG file */
+ png_uint_32 flags PNG_DEPSTRUCT; /* flags indicating various things to libpng */
+ png_uint_32 transformations PNG_DEPSTRUCT; /* which transformations to perform */
+
+ z_stream zstream PNG_DEPSTRUCT; /* pointer to decompression structure (below) */
+ png_bytep zbuf PNG_DEPSTRUCT; /* buffer for zlib */
+ png_size_t zbuf_size PNG_DEPSTRUCT; /* size of zbuf */
+ int zlib_level PNG_DEPSTRUCT; /* holds zlib compression level */
+ int zlib_method PNG_DEPSTRUCT; /* holds zlib compression method */
+ int zlib_window_bits PNG_DEPSTRUCT; /* holds zlib compression window bits */
+ int zlib_mem_level PNG_DEPSTRUCT; /* holds zlib compression memory level */
+ int zlib_strategy PNG_DEPSTRUCT; /* holds zlib compression strategy */
+
+ png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels */
+ png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels */
+ png_uint_32 num_rows PNG_DEPSTRUCT; /* number of rows in current pass */
+ png_uint_32 usr_width PNG_DEPSTRUCT; /* width of row at start of write */
+ png_size_t rowbytes PNG_DEPSTRUCT; /* size of row in bytes */
+ png_size_t irowbytes PNG_DEPSTRUCT; /* size of current interlaced row in bytes */
+ png_uint_32 iwidth PNG_DEPSTRUCT; /* width of current interlaced row in pixels */
+ png_uint_32 row_number PNG_DEPSTRUCT; /* current row in interlace pass */
+ png_bytep prev_row PNG_DEPSTRUCT; /* buffer to save previous (unfiltered) row */
+ png_bytep row_buf PNG_DEPSTRUCT; /* buffer to save current (unfiltered) row */
+ png_bytep sub_row PNG_DEPSTRUCT; /* buffer to save "sub" row when filtering */
+ png_bytep up_row PNG_DEPSTRUCT; /* buffer to save "up" row when filtering */
+ png_bytep avg_row PNG_DEPSTRUCT; /* buffer to save "avg" row when filtering */
+ png_bytep paeth_row PNG_DEPSTRUCT; /* buffer to save "Paeth" row when filtering */
+ png_row_info row_info PNG_DEPSTRUCT; /* used for transformation routines */
+
+ png_uint_32 idat_size PNG_DEPSTRUCT; /* current IDAT size for read */
+ png_uint_32 crc PNG_DEPSTRUCT; /* current chunk CRC value */
+ png_colorp palette PNG_DEPSTRUCT; /* palette from the input file */
+ png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in palette */
+ png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparency values */
+ png_byte chunk_name[5] PNG_DEPSTRUCT; /* null-terminated name of current chunk */
+ png_byte compression PNG_DEPSTRUCT; /* file compression type (always 0) */
+ png_byte filter PNG_DEPSTRUCT; /* file filter type (always 0) */
+ png_byte interlaced PNG_DEPSTRUCT; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
+ png_byte pass PNG_DEPSTRUCT; /* current interlace pass (0 - 6) */
+ png_byte do_filter PNG_DEPSTRUCT; /* row filter flags (see PNG_FILTER_ below ) */
+ png_byte color_type PNG_DEPSTRUCT; /* color type of file */
+ png_byte bit_depth PNG_DEPSTRUCT; /* bit depth of file */
+ png_byte usr_bit_depth PNG_DEPSTRUCT; /* bit depth of users row */
+ png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */
+ png_byte channels PNG_DEPSTRUCT; /* number of channels in file */
+ png_byte usr_channels PNG_DEPSTRUCT; /* channels at start of write */
+ png_byte sig_bytes PNG_DEPSTRUCT; /* magic bytes read/written from start of file */
#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
-#ifdef PNG_LEGACY_SUPPORTED
- png_byte filler; /* filler byte for pixel expansion */
-#else
- png_uint_16 filler; /* filler bytes for pixel expansion */
-#endif
+ png_uint_16 filler PNG_DEPSTRUCT; /* filler bytes for pixel expansion */
#endif
-#if defined(PNG_bKGD_SUPPORTED)
- png_byte background_gamma_type;
+#ifdef PNG_bKGD_SUPPORTED
+ png_byte background_gamma_type PNG_DEPSTRUCT;
# ifdef PNG_FLOATING_POINT_SUPPORTED
- float background_gamma;
+ float background_gamma PNG_DEPSTRUCT;
# endif
- png_color_16 background; /* background color in screen gamma space */
-#if defined(PNG_READ_GAMMA_SUPPORTED)
- png_color_16 background_1; /* background normalized to gamma 1.0 */
+ png_color_16 background PNG_DEPSTRUCT; /* background color in screen gamma space */
+#ifdef PNG_READ_GAMMA_SUPPORTED
+ png_color_16 background_1 PNG_DEPSTRUCT; /* background normalized to gamma 1.0 */
#endif
#endif /* PNG_bKGD_SUPPORTED */
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
- png_flush_ptr output_flush_fn; /* Function for flushing output */
- png_uint_32 flush_dist; /* how many rows apart to flush, 0 - no flush */
- png_uint_32 flush_rows; /* number of rows written since last flush */
+#ifdef PNG_WRITE_FLUSH_SUPPORTED
+ png_flush_ptr output_flush_fn PNG_DEPSTRUCT; /* Function for flushing output */
+ png_uint_32 flush_dist PNG_DEPSTRUCT; /* how many rows apart to flush, 0 - no flush */
+ png_uint_32 flush_rows PNG_DEPSTRUCT; /* number of rows written since last flush */
#endif
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
- int gamma_shift; /* number of "insignificant" bits 16-bit gamma */
+ int gamma_shift PNG_DEPSTRUCT; /* number of "insignificant" bits 16-bit gamma */
#ifdef PNG_FLOATING_POINT_SUPPORTED
- float gamma; /* file gamma value */
- float screen_gamma; /* screen gamma value (display_exponent) */
+ float gamma PNG_DEPSTRUCT; /* file gamma value */
+ float screen_gamma PNG_DEPSTRUCT; /* screen gamma value (display_exponent) */
#endif
#endif
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
- png_bytep gamma_table; /* gamma table for 8-bit depth files */
- png_bytep gamma_from_1; /* converts from 1.0 to screen */
- png_bytep gamma_to_1; /* converts from file to 1.0 */
- png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */
- png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */
- png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */
+ png_bytep gamma_table PNG_DEPSTRUCT; /* gamma table for 8-bit depth files */
+ png_bytep gamma_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */
+ png_bytep gamma_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */
+ png_uint_16pp gamma_16_table PNG_DEPSTRUCT; /* gamma table for 16-bit depth files */
+ png_uint_16pp gamma_16_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */
+ png_uint_16pp gamma_16_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */
#endif
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED)
- png_color_8 sig_bit; /* significant bits in each available channel */
+ png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in each available channel */
#endif
#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
- png_color_8 shift; /* shift for significant bit tranformation */
+ png_color_8 shift PNG_DEPSTRUCT; /* shift for significant bit tranformation */
#endif
#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \
|| defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
- png_bytep trans; /* transparency values for paletted files */
- png_color_16 trans_values; /* transparency values for non-paletted files */
+ png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for paletted files */
+ png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for non-paletted files */
#endif
- png_read_status_ptr read_row_fn; /* called after each row is decoded */
- png_write_status_ptr write_row_fn; /* called after each row is encoded */
+ png_read_status_ptr read_row_fn PNG_DEPSTRUCT; /* called after each row is decoded */
+ png_write_status_ptr write_row_fn PNG_DEPSTRUCT; /* called after each row is encoded */
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
- png_progressive_info_ptr info_fn; /* called after header data fully read */
- png_progressive_row_ptr row_fn; /* called after each prog. row is decoded */
- png_progressive_end_ptr end_fn; /* called after image is complete */
- png_bytep save_buffer_ptr; /* current location in save_buffer */
- png_bytep save_buffer; /* buffer for previously read data */
- png_bytep current_buffer_ptr; /* current location in current_buffer */
- png_bytep current_buffer; /* buffer for recently used data */
- png_uint_32 push_length; /* size of current input chunk */
- png_uint_32 skip_length; /* bytes to skip in input data */
- png_size_t save_buffer_size; /* amount of data now in save_buffer */
- png_size_t save_buffer_max; /* total size of save_buffer */
- png_size_t buffer_size; /* total amount of available input data */
- png_size_t current_buffer_size; /* amount of data now in current_buffer */
- int process_mode; /* what push library is currently doing */
- int cur_palette; /* current push library palette index */
-
-# if defined(PNG_TEXT_SUPPORTED)
- png_size_t current_text_size; /* current size of text input data */
- png_size_t current_text_left; /* how much text left to read in input */
- png_charp current_text; /* current text chunk buffer */
- png_charp current_text_ptr; /* current location in current_text */
-# endif /* PNG_TEXT_SUPPORTED */
+ png_progressive_info_ptr info_fn PNG_DEPSTRUCT; /* called after header data fully read */
+ png_progressive_row_ptr row_fn PNG_DEPSTRUCT; /* called after each prog. row is decoded */
+ png_progressive_end_ptr end_fn PNG_DEPSTRUCT; /* called after image is complete */
+ png_bytep save_buffer_ptr PNG_DEPSTRUCT; /* current location in save_buffer */
+ png_bytep save_buffer PNG_DEPSTRUCT; /* buffer for previously read data */
+ png_bytep current_buffer_ptr PNG_DEPSTRUCT; /* current location in current_buffer */
+ png_bytep current_buffer PNG_DEPSTRUCT; /* buffer for recently used data */
+ png_uint_32 push_length PNG_DEPSTRUCT; /* size of current input chunk */
+ png_uint_32 skip_length PNG_DEPSTRUCT; /* bytes to skip in input data */
+ png_size_t save_buffer_size PNG_DEPSTRUCT; /* amount of data now in save_buffer */
+ png_size_t save_buffer_max PNG_DEPSTRUCT; /* total size of save_buffer */
+ png_size_t buffer_size PNG_DEPSTRUCT; /* total amount of available input data */
+ png_size_t current_buffer_size PNG_DEPSTRUCT; /* amount of data now in current_buffer */
+ int process_mode PNG_DEPSTRUCT; /* what push library is currently doing */
+ int cur_palette PNG_DEPSTRUCT; /* current push library palette index */
+
+# ifdef PNG_TEXT_SUPPORTED
+ png_size_t current_text_size PNG_DEPSTRUCT; /* current size of text input data */
+ png_size_t current_text_left PNG_DEPSTRUCT; /* how much text left to read in input */
+ png_charp current_text PNG_DEPSTRUCT; /* current text chunk buffer */
+ png_charp current_text_ptr PNG_DEPSTRUCT; /* current location in current_text */
+# endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */
+
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
-/* for the Borland special 64K segment handler */
- png_bytepp offset_table_ptr;
- png_bytep offset_table;
- png_uint_16 offset_table_number;
- png_uint_16 offset_table_count;
- png_uint_16 offset_table_count_free;
+/* For the Borland special 64K segment handler */
+ png_bytepp offset_table_ptr PNG_DEPSTRUCT;
+ png_bytep offset_table PNG_DEPSTRUCT;
+ png_uint_16 offset_table_number PNG_DEPSTRUCT;
+ png_uint_16 offset_table_count PNG_DEPSTRUCT;
+ png_uint_16 offset_table_count_free PNG_DEPSTRUCT;
#endif
-#if defined(PNG_READ_DITHER_SUPPORTED)
- png_bytep palette_lookup; /* lookup table for dithering */
- png_bytep dither_index; /* index translation for palette files */
+#ifdef PNG_READ_DITHER_SUPPORTED
+ png_bytep palette_lookup PNG_DEPSTRUCT; /* lookup table for dithering */
+ png_bytep dither_index PNG_DEPSTRUCT; /* index translation for palette files */
#endif
#if defined(PNG_READ_DITHER_SUPPORTED) || defined(PNG_hIST_SUPPORTED)
- png_uint_16p hist; /* histogram */
+ png_uint_16p hist PNG_DEPSTRUCT; /* histogram */
#endif
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
- png_byte heuristic_method; /* heuristic for row filter selection */
- png_byte num_prev_filters; /* number of weights for previous rows */
- png_bytep prev_filters; /* filter type(s) of previous row(s) */
- png_uint_16p filter_weights; /* weight(s) for previous line(s) */
- png_uint_16p inv_filter_weights; /* 1/weight(s) for previous line(s) */
- png_uint_16p filter_costs; /* relative filter calculation cost */
- png_uint_16p inv_filter_costs; /* 1/relative filter calculation cost */
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
+ png_byte heuristic_method PNG_DEPSTRUCT; /* heuristic for row filter selection */
+ png_byte num_prev_filters PNG_DEPSTRUCT; /* number of weights for previous rows */
+ png_bytep prev_filters PNG_DEPSTRUCT; /* filter type(s) of previous row(s) */
+ png_uint_16p filter_weights PNG_DEPSTRUCT; /* weight(s) for previous line(s) */
+ png_uint_16p inv_filter_weights PNG_DEPSTRUCT; /* 1/weight(s) for previous line(s) */
+ png_uint_16p filter_costs PNG_DEPSTRUCT; /* relative filter calculation cost */
+ png_uint_16p inv_filter_costs PNG_DEPSTRUCT; /* 1/relative filter calculation cost */
#endif
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
- png_charp time_buffer; /* String to hold RFC 1123 time text */
+#ifdef PNG_TIME_RFC1123_SUPPORTED
+ png_charp time_buffer PNG_DEPSTRUCT; /* String to hold RFC 1123 time text */
#endif
/* New members added in libpng-1.0.6 */
-#ifdef PNG_FREE_ME_SUPPORTED
- png_uint_32 free_me; /* flags items libpng is responsible for freeing */
-#endif
+ png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is responsible for freeing */
-#if defined(PNG_USER_CHUNKS_SUPPORTED)
- png_voidp user_chunk_ptr;
- png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */
+#ifdef PNG_USER_CHUNKS_SUPPORTED
+ png_voidp user_chunk_ptr PNG_DEPSTRUCT;
+ png_user_chunk_ptr read_user_chunk_fn PNG_DEPSTRUCT; /* user read chunk handler */
#endif
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
- int num_chunk_list;
- png_bytep chunk_list;
+ int num_chunk_list PNG_DEPSTRUCT;
+ png_bytep chunk_list PNG_DEPSTRUCT;
#endif
/* New members added in libpng-1.0.3 */
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
- png_byte rgb_to_gray_status;
+#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
+ png_byte rgb_to_gray_status PNG_DEPSTRUCT;
/* These were changed from png_byte in libpng-1.0.6 */
- png_uint_16 rgb_to_gray_red_coeff;
- png_uint_16 rgb_to_gray_green_coeff;
- png_uint_16 rgb_to_gray_blue_coeff;
+ png_uint_16 rgb_to_gray_red_coeff PNG_DEPSTRUCT;
+ png_uint_16 rgb_to_gray_green_coeff PNG_DEPSTRUCT;
+ png_uint_16 rgb_to_gray_blue_coeff PNG_DEPSTRUCT;
#endif
/* New member added in libpng-1.0.4 (renamed in 1.0.9) */
@@ -1439,85 +1274,76 @@ struct png_struct_def
defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
/* Changed from png_byte to png_uint_32 at version 1.2.0 */
-#ifdef PNG_1_0_X
- png_byte mng_features_permitted;
-#else
- png_uint_32 mng_features_permitted;
-#endif /* PNG_1_0_X */
+ png_uint_32 mng_features_permitted PNG_DEPSTRUCT;
#endif
/* New member added in libpng-1.0.7 */
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
- png_fixed_point int_gamma;
+ png_fixed_point int_gamma PNG_DEPSTRUCT;
#endif
/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
- png_byte filter_type;
-#endif
-
-#if defined(PNG_1_0_X)
-/* New member added in libpng-1.0.10, ifdef'ed out in 1.2.0 */
- png_uint_32 row_buf_size;
+#ifdef PNG_MNG_FEATURES_SUPPORTED
+ png_byte filter_type PNG_DEPSTRUCT;
#endif
/* New members added in libpng-1.2.0 */
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-# if !defined(PNG_1_0_X)
-# if defined(PNG_MMX_CODE_SUPPORTED)
- png_byte mmx_bitdepth_threshold;
- png_uint_32 mmx_rowbytes_threshold;
-# endif
- png_uint_32 asm_flags;
-# endif
-#endif
/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */
#ifdef PNG_USER_MEM_SUPPORTED
- png_voidp mem_ptr; /* user supplied struct for mem functions */
- png_malloc_ptr malloc_fn; /* function for allocating memory */
- png_free_ptr free_fn; /* function for freeing memory */
+ png_voidp mem_ptr PNG_DEPSTRUCT; /* user supplied struct for mem functions */
+ png_malloc_ptr malloc_fn PNG_DEPSTRUCT; /* function for allocating memory */
+ png_free_ptr free_fn PNG_DEPSTRUCT; /* function for freeing memory */
#endif
/* New member added in libpng-1.0.13 and 1.2.0 */
- png_bytep big_row_buf; /* buffer to save current (unfiltered) row */
+ png_bytep big_row_buf PNG_DEPSTRUCT; /* buffer to save current (unfiltered) row */
-#if defined(PNG_READ_DITHER_SUPPORTED)
+#ifdef PNG_READ_DITHER_SUPPORTED
/* The following three members were added at version 1.0.14 and 1.2.4 */
- png_bytep dither_sort; /* working sort array */
- png_bytep index_to_palette; /* where the original index currently is */
- /* in the palette */
- png_bytep palette_to_index; /* which original index points to this */
- /* palette color */
+ png_bytep dither_sort PNG_DEPSTRUCT; /* working sort array */
+ png_bytep index_to_palette PNG_DEPSTRUCT; /* where the original index currently is */
+ /* in the palette */
+ png_bytep palette_to_index PNG_DEPSTRUCT; /* which original index points to this */
+ /* palette color */
#endif
/* New members added in libpng-1.0.16 and 1.2.6 */
- png_byte compression_type;
+ png_byte compression_type PNG_DEPSTRUCT;
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
- png_uint_32 user_width_max;
- png_uint_32 user_height_max;
+ png_uint_32 user_width_max PNG_DEPSTRUCT;
+ png_uint_32 user_height_max PNG_DEPSTRUCT;
+ /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown
+ * chunks that can be stored (0x7fffffff means unlimited).
+ */
+ png_uint_32 user_chunk_cache_max PNG_DEPSTRUCT;
#endif
/* New member added in libpng-1.0.25 and 1.2.17 */
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
/* Storage for unknown chunk that the library doesn't recognize. */
- png_unknown_chunk unknown_chunk;
+ png_unknown_chunk unknown_chunk PNG_DEPSTRUCT;
#endif
/* New members added in libpng-1.2.26 */
- png_uint_32 old_big_row_buf_size, old_prev_row_size;
+ png_uint_32 old_big_row_buf_size PNG_DEPSTRUCT;
+ png_uint_32 old_prev_row_size PNG_DEPSTRUCT;
/* New member added in libpng-1.2.30 */
- png_charp chunkdata; /* buffer for reading chunk data */
+ png_charp chunkdata PNG_DEPSTRUCT; /* buffer for reading chunk data */
+/* New member added in libpng-1.4.0 */
+#ifdef PNG_IO_STATE_SUPPORTED
+ png_uint_32 io_state PNG_DEPSTRUCT;
+#endif
};
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
-typedef png_structp version_1_2_40;
+typedef png_structp version_1_4_0;
typedef png_struct FAR * FAR * png_structpp;
@@ -1544,29 +1370,44 @@ extern PNG_EXPORT(void,png_set_sig_bytes) PNGARG((png_structp png_ptr,
extern PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start,
png_size_t num_to_check));
-/* Simple signature checking function. This is the same as calling
- * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n).
- */
-extern PNG_EXPORT(int,png_check_sig) PNGARG((png_bytep sig, int num));
-
/* Allocate and initialize png_ptr struct for reading, and any other memory. */
extern PNG_EXPORT(png_structp,png_create_read_struct)
PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
- png_error_ptr error_fn, png_error_ptr warn_fn));
+ png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED;
/* Allocate and initialize png_ptr struct for writing, and any other memory */
extern PNG_EXPORT(png_structp,png_create_write_struct)
PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
- png_error_ptr error_fn, png_error_ptr warn_fn));
+ png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED;
#ifdef PNG_WRITE_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_compression_buffer_size)
+extern PNG_EXPORT(png_size_t,png_get_compression_buffer_size)
PNGARG((png_structp png_ptr));
#endif
#ifdef PNG_WRITE_SUPPORTED
extern PNG_EXPORT(void,png_set_compression_buffer_size)
- PNGARG((png_structp png_ptr, png_uint_32 size));
+ PNGARG((png_structp png_ptr, png_size_t size));
+#endif
+
+/* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp
+ * match up.
+ */
+#ifdef PNG_SETJMP_SUPPORTED
+/* This function returns the jmp_buf built in to *png_ptr. It must be
+ * supplied with an appropriate 'longjmp' function to use on that jmp_buf
+ * unless the default error function is overridden in which case NULL is
+ * acceptable. The size of the jmp_buf is checked against the actual size
+ * allocated by the library - the call will return NULL on a mismatch
+ * indicating an ABI mismatch.
+ */
+extern PNG_EXPORT(jmp_buf*, png_set_longjmp_fn)
+ PNGARG((png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t jmp_buf_size));
+# define png_jmpbuf(png_ptr) \
+ (*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf)))
+#else
+# define png_jmpbuf(png_ptr) \
+ (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP)
#endif
/* Reset the compression stream */
@@ -1577,13 +1418,16 @@ extern PNG_EXPORT(int,png_reset_zstream) PNGARG((png_structp png_ptr));
extern PNG_EXPORT(png_structp,png_create_read_struct_2)
PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
- png_malloc_ptr malloc_fn, png_free_ptr free_fn));
+ png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED;
extern PNG_EXPORT(png_structp,png_create_write_struct_2)
PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
- png_malloc_ptr malloc_fn, png_free_ptr free_fn));
+ png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED;
#endif
+/* Write the PNG file signature. */
+extern PNG_EXPORT(void,png_write_sig) PNGARG((png_structp png_ptr));
+
/* Write a PNG chunk - size, type, (optional) data, CRC. */
extern PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr,
png_bytep chunk_name, png_bytep data, png_size_t length));
@@ -1601,15 +1445,7 @@ extern PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr));
/* Allocate and initialize the info structure */
extern PNG_EXPORT(png_infop,png_create_info_struct)
- PNGARG((png_structp png_ptr));
-
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-/* Initialize the info structure (old interface - DEPRECATED) */
-extern PNG_EXPORT(void,png_info_init) PNGARG((png_infop info_ptr));
-#undef png_info_init
-#define png_info_init(info_ptr) png_info_init_3(&info_ptr,\
- png_sizeof(png_info));
-#endif
+ PNGARG((png_structp png_ptr)) PNG_ALLOCATED;
extern PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr,
png_size_t png_info_struct_size));
@@ -1620,20 +1456,18 @@ extern PNG_EXPORT(void,png_write_info_before_PLTE) PNGARG((png_structp png_ptr,
extern PNG_EXPORT(void,png_write_info) PNGARG((png_structp png_ptr,
png_infop info_ptr));
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read the information before the actual image data. */
extern PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr,
png_infop info_ptr));
#endif
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
+#ifdef PNG_TIME_RFC1123_SUPPORTED
extern PNG_EXPORT(png_charp,png_convert_to_rfc1123)
PNGARG((png_structp png_ptr, png_timep ptime));
#endif
-#if !defined(_WIN32_WCE)
-/* "time.h" functions are not supported on WindowsCE */
-#if defined(PNG_WRITE_tIME_SUPPORTED)
+#ifdef PNG_CONVERT_tIME_SUPPORTED
/* Convert from a struct tm to png_time */
extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime,
struct tm FAR * ttime));
@@ -1641,22 +1475,15 @@ extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime,
/* Convert from time_t to png_time. Uses gmtime() */
extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime,
time_t ttime));
-#endif /* PNG_WRITE_tIME_SUPPORTED */
-#endif /* _WIN32_WCE */
+#endif /* PNG_CONVERT_tIME_SUPPORTED */
-#if defined(PNG_READ_EXPAND_SUPPORTED)
+#ifdef PNG_READ_EXPAND_SUPPORTED
/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */
extern PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr));
-#if !defined(PNG_1_0_X)
extern PNG_EXPORT(void,png_set_expand_gray_1_2_4_to_8) PNGARG((png_structp
png_ptr));
-#endif
extern PNG_EXPORT(void,png_set_palette_to_rgb) PNGARG((png_structp png_ptr));
extern PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr));
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-/* Deprecated */
-extern PNG_EXPORT(void,png_set_gray_1_2_4_to_8) PNGARG((png_structp png_ptr));
-#endif
#endif
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
@@ -1664,12 +1491,12 @@ extern PNG_EXPORT(void,png_set_gray_1_2_4_to_8) PNGARG((png_structp png_ptr));
extern PNG_EXPORT(void,png_set_bgr) PNGARG((png_structp png_ptr));
#endif
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
+#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
/* Expand the grayscale to 24-bit RGB if necessary. */
extern PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr));
#endif
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
+#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
/* Reduce RGB to grayscale. */
#ifdef PNG_FLOATING_POINT_SUPPORTED
extern PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr,
@@ -1684,7 +1511,7 @@ extern PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_structp
extern PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth,
png_colorp palette));
-#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
+#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED
extern PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr));
#endif
@@ -1706,10 +1533,8 @@ extern PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr,
#define PNG_FILLER_BEFORE 0
#define PNG_FILLER_AFTER 1
/* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */
-#if !defined(PNG_1_0_X)
extern PNG_EXPORT(void,png_set_add_alpha) PNGARG((png_structp png_ptr,
png_uint_32 filler, int flags));
-#endif
#endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */
#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
@@ -1744,7 +1569,7 @@ extern PNG_EXPORT(int,png_set_interlace_handling) PNGARG((png_structp png_ptr));
extern PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr));
#endif
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
+#ifdef PNG_READ_BACKGROUND_SUPPORTED
/* Handle alpha and tRNS by replacing with a background color. */
#ifdef PNG_FLOATING_POINT_SUPPORTED
extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr,
@@ -1757,19 +1582,19 @@ extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr,
#define PNG_BACKGROUND_GAMMA_UNIQUE 3
#endif
-#if defined(PNG_READ_16_TO_8_SUPPORTED)
+#ifdef PNG_READ_16_TO_8_SUPPORTED
/* Strip the second byte of information from a 16-bit depth file. */
extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr));
#endif
-#if defined(PNG_READ_DITHER_SUPPORTED)
+#ifdef PNG_READ_DITHER_SUPPORTED
/* Turn on dithering, and reduce the palette to the number of colors available. */
extern PNG_EXPORT(void,png_set_dither) PNGARG((png_structp png_ptr,
png_colorp palette, int num_palette, int maximum_colors,
png_uint_16p histogram, int full_dither));
#endif
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
/* Handle gamma correction. Screen_gamma=(display_exponent) */
#ifdef PNG_FLOATING_POINT_SUPPORTED
extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr,
@@ -1777,17 +1602,8 @@ extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr,
#endif
#endif
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
- defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
-/* Permit or disallow empty PLTE (0: not permitted, 1: permitted) */
-/* Deprecated and will be removed. Use png_permit_mng_features() instead. */
-extern PNG_EXPORT(void,png_permit_empty_plte) PNGARG((png_structp png_ptr,
- int empty_plte_permitted));
-#endif
-#endif
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
+#ifdef PNG_WRITE_FLUSH_SUPPORTED
/* Set how many lines between output flushes - 0 for no flushing */
extern PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows));
/* Flush the current PNG output buffer */
@@ -1801,20 +1617,20 @@ extern PNG_EXPORT(void,png_start_read_image) PNGARG((png_structp png_ptr));
extern PNG_EXPORT(void,png_read_update_info) PNGARG((png_structp png_ptr,
png_infop info_ptr));
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read one or more rows of image data. */
extern PNG_EXPORT(void,png_read_rows) PNGARG((png_structp png_ptr,
png_bytepp row, png_bytepp display_row, png_uint_32 num_rows));
#endif
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read a row of data. */
extern PNG_EXPORT(void,png_read_row) PNGARG((png_structp png_ptr,
png_bytep row,
png_bytep display_row));
#endif
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read the whole image into memory at once. */
extern PNG_EXPORT(void,png_read_image) PNGARG((png_structp png_ptr,
png_bytepp image));
@@ -1832,11 +1648,11 @@ extern PNG_EXPORT(void,png_write_rows) PNGARG((png_structp png_ptr,
extern PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr,
png_bytepp image));
-/* Writes the end of the PNG file. */
+/* Write the end of the PNG file. */
extern PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr,
png_infop info_ptr));
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read the end of the PNG file. */
extern PNG_EXPORT(void,png_read_end) PNGARG((png_structp png_ptr,
png_infop info_ptr));
@@ -1850,17 +1666,10 @@ extern PNG_EXPORT(void,png_destroy_info_struct) PNGARG((png_structp png_ptr,
extern PNG_EXPORT(void,png_destroy_read_struct) PNGARG((png_structpp
png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr));
-/* Free all memory used by the read (old method - NOT DLL EXPORTED) */
-extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_infop end_info_ptr));
-
/* Free any memory associated with the png_struct and the png_info_structs */
extern PNG_EXPORT(void,png_destroy_write_struct)
PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr));
-/* Free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */
-extern void png_write_destroy PNGARG((png_structp png_ptr));
-
/* Set the libpng method of handling chunk CRC errors */
extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr,
int crit_action, int ancil_action));
@@ -1919,7 +1728,7 @@ extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method,
#define PNG_FILTER_VALUE_PAETH 4
#define PNG_FILTER_VALUE_LAST 5
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) /* EXPERIMENTAL */
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* EXPERIMENTAL */
/* The "heuristic_method" is given by one of the PNG_FILTER_HEURISTIC_
* defines, either the default (minimum-sum-of-absolute-differences), or
* the experimental method (weighted-minimum-sum-of-absolute-differences).
@@ -1994,7 +1803,7 @@ extern PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr,
* more information.
*/
-#if !defined(PNG_NO_STDIO)
+#ifdef PNG_STDIO_SUPPORTED
/* Initialize the input/output for the PNG file to the default functions. */
extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, png_FILE_p fp));
#endif
@@ -2047,21 +1856,18 @@ extern PNG_EXPORT(void,png_set_mem_fn) PNGARG((png_structp png_ptr,
extern PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_structp png_ptr));
#endif
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
- defined(PNG_LEGACY_SUPPORTED)
+#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
extern PNG_EXPORT(void,png_set_read_user_transform_fn) PNGARG((png_structp
png_ptr, png_user_transform_ptr read_user_transform_fn));
#endif
-#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
- defined(PNG_LEGACY_SUPPORTED)
+#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
extern PNG_EXPORT(void,png_set_write_user_transform_fn) PNGARG((png_structp
png_ptr, png_user_transform_ptr write_user_transform_fn));
#endif
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
- defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
- defined(PNG_LEGACY_SUPPORTED)
+ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
extern PNG_EXPORT(void,png_set_user_transform_info) PNGARG((png_structp
png_ptr, png_voidp user_transform_ptr, int user_transform_depth,
int user_transform_channels));
@@ -2102,38 +1908,25 @@ extern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr,
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
extern PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr,
- png_uint_32 size));
+ png_alloc_size_t size)) PNG_ALLOCATED;
+/* Added at libpng version 1.4.0 */
+extern PNG_EXPORT(png_voidp,png_calloc) PNGARG((png_structp png_ptr,
+ png_alloc_size_t size)) PNG_ALLOCATED;
-#if defined(PNG_1_0_X)
-# define png_malloc_warn png_malloc
-#else
/* Added at libpng version 1.2.4 */
extern PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr,
- png_uint_32 size));
-#endif
+ png_alloc_size_t size)) PNG_ALLOCATED;
/* Frees a pointer allocated by png_malloc() */
extern PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr));
-#if defined(PNG_1_0_X)
-/* Function to allocate memory for zlib. */
-extern PNG_EXPORT(voidpf,png_zalloc) PNGARG((voidpf png_ptr, uInt items,
- uInt size));
-
-/* Function to free memory for zlib */
-extern PNG_EXPORT(void,png_zfree) PNGARG((voidpf png_ptr, voidpf ptr));
-#endif
-
/* Free data that was allocated internally */
extern PNG_EXPORT(void,png_free_data) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 free_me, int num));
-#ifdef PNG_FREE_ME_SUPPORTED
/* Reassign responsibility for freeing existing data, whether allocated
- * by libpng or by the application
- */
+ * by libpng or by the application */
extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr,
png_infop info_ptr, int freer, png_uint_32 mask));
-#endif
/* Assignments for png_data_freer */
#define PNG_DESTROY_WILL_FREE_DATA 1
#define PNG_SET_WILL_FREE_DATA 1
@@ -2155,46 +1948,46 @@ extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr,
#ifdef PNG_USER_MEM_SUPPORTED
extern PNG_EXPORT(png_voidp,png_malloc_default) PNGARG((png_structp png_ptr,
- png_uint_32 size));
+ png_alloc_size_t size)) PNG_ALLOCATED;
extern PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr,
png_voidp ptr));
#endif
-extern PNG_EXPORT(png_voidp,png_memcpy_check) PNGARG((png_structp png_ptr,
- png_voidp s1, png_voidp s2, png_uint_32 size));
-
-extern PNG_EXPORT(png_voidp,png_memset_check) PNGARG((png_structp png_ptr,
- png_voidp s1, int value, png_uint_32 size));
-
-#if defined(USE_FAR_KEYWORD) /* memory model conversion function */
-extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr,
- int check));
-#endif /* USE_FAR_KEYWORD */
-
#ifndef PNG_NO_ERROR_TEXT
/* Fatal error in PNG image of libpng - can't continue */
extern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr,
- png_const_charp error_message));
+ png_const_charp error_message)) PNG_NORETURN;
/* The same, but the chunk name is prepended to the error string. */
extern PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr,
- png_const_charp error_message));
+ png_const_charp error_message)) PNG_NORETURN;
+
#else
/* Fatal error in PNG image of libpng - can't continue */
-extern PNG_EXPORT(void,png_err) PNGARG((png_structp png_ptr));
+extern PNG_EXPORT(void,png_err) PNGARG((png_structp png_ptr)) PNG_NORETURN;
#endif
-#ifndef PNG_NO_WARNINGS
/* Non-fatal error in libpng. Can continue, but may have a problem. */
extern PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr,
png_const_charp warning_message));
-#ifdef PNG_READ_SUPPORTED
/* Non-fatal error in libpng, chunk name is prepended to message. */
extern PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr,
png_const_charp warning_message));
-#endif /* PNG_READ_SUPPORTED */
-#endif /* PNG_NO_WARNINGS */
+
+#ifdef PNG_BENIGN_ERRORS_SUPPORTED
+/* Benign error in libpng. Can continue, but may have a problem.
+ * User can choose whether to handle as a fatal error or as a warning. */
+extern PNG_EXPORT(void,png_benign_error) PNGARG((png_structp png_ptr,
+ png_const_charp warning_message));
+
+/* Same, chunk name is prepended to message. */
+extern PNG_EXPORT(void,png_chunk_benign_error) PNGARG((png_structp png_ptr,
+ png_const_charp warning_message));
+
+extern PNG_EXPORT(void,png_set_benign_errors) PNGARG((png_structp
+ png_ptr, int allowed));
+#endif
/* The png_set_<chunk> functions are for storing values in the png_info_struct.
* Similarly, the png_get_<chunk> calls are used to read values from the
@@ -2213,10 +2006,10 @@ extern PNG_EXPORT(png_uint_32,png_get_valid) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 flag));
/* Returns number of bytes needed to hold a transformed row. */
-extern PNG_EXPORT(png_uint_32,png_get_rowbytes) PNGARG((png_structp png_ptr,
+extern PNG_EXPORT(png_size_t,png_get_rowbytes) PNGARG((png_structp png_ptr,
png_infop info_ptr));
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
+#ifdef PNG_INFO_IMAGE_SUPPORTED
/* Returns row_pointers, which is an array of pointers to scanlines that was
* returned from png_read_png().
*/
@@ -2292,17 +2085,17 @@ png_ptr, png_infop info_ptr));
extern PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_structp png_ptr,
png_infop info_ptr));
-#if defined(PNG_bKGD_SUPPORTED)
+#ifdef PNG_bKGD_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_color_16p *background));
#endif
-#if defined(PNG_bKGD_SUPPORTED)
+#ifdef PNG_bKGD_SUPPORTED
extern PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_color_16p background));
#endif
-#if defined(PNG_cHRM_SUPPORTED)
+#ifdef PNG_cHRM_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr,
png_infop info_ptr, double *white_x, double *white_y, double *red_x,
@@ -2318,7 +2111,7 @@ extern PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr,
#endif
#endif
-#if defined(PNG_cHRM_SUPPORTED)
+#ifdef PNG_cHRM_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
extern PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr,
png_infop info_ptr, double white_x, double white_y, double red_x,
@@ -2333,7 +2126,7 @@ extern PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr,
#endif
#endif
-#if defined(PNG_gAMA_SUPPORTED)
+#ifdef PNG_gAMA_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr,
png_infop info_ptr, double *file_gamma));
@@ -2342,7 +2135,7 @@ extern PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_fixed_point *int_file_gamma));
#endif
-#if defined(PNG_gAMA_SUPPORTED)
+#ifdef PNG_gAMA_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
extern PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr,
png_infop info_ptr, double file_gamma));
@@ -2351,12 +2144,12 @@ extern PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_fixed_point int_file_gamma));
#endif
-#if defined(PNG_hIST_SUPPORTED)
+#ifdef PNG_hIST_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_16p *hist));
#endif
-#if defined(PNG_hIST_SUPPORTED)
+#ifdef PNG_hIST_SUPPORTED
extern PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_16p hist));
#endif
@@ -2371,36 +2164,36 @@ extern PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr,
int color_type, int interlace_method, int compression_method,
int filter_method));
-#if defined(PNG_oFFs_SUPPORTED)
+#ifdef PNG_oFFs_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y,
int *unit_type));
#endif
-#if defined(PNG_oFFs_SUPPORTED)
+#ifdef PNG_oFFs_SUPPORTED
extern PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y,
int unit_type));
#endif
-#if defined(PNG_pCAL_SUPPORTED)
+#ifdef PNG_pCAL_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1,
int *type, int *nparams, png_charp *units, png_charpp *params));
#endif
-#if defined(PNG_pCAL_SUPPORTED)
+#ifdef PNG_pCAL_SUPPORTED
extern PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1,
int type, int nparams, png_charp units, png_charpp params));
#endif
-#if defined(PNG_pHYs_SUPPORTED)
+#ifdef PNG_pHYs_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
#endif
-#if defined(PNG_pHYs_SUPPORTED)
+#ifdef PNG_pHYs_SUPPORTED
extern PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type));
#endif
@@ -2411,97 +2204,96 @@ extern PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr,
extern PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_colorp palette, int num_palette));
-#if defined(PNG_sBIT_SUPPORTED)
+#ifdef PNG_sBIT_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_color_8p *sig_bit));
#endif
-#if defined(PNG_sBIT_SUPPORTED)
+#ifdef PNG_sBIT_SUPPORTED
extern PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_color_8p sig_bit));
#endif
-#if defined(PNG_sRGB_SUPPORTED)
+#ifdef PNG_sRGB_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr,
png_infop info_ptr, int *intent));
#endif
-#if defined(PNG_sRGB_SUPPORTED)
+#ifdef PNG_sRGB_SUPPORTED
extern PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr,
png_infop info_ptr, int intent));
extern PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr,
png_infop info_ptr, int intent));
#endif
-#if defined(PNG_iCCP_SUPPORTED)
+#ifdef PNG_iCCP_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_charpp name, int *compression_type,
png_charpp profile, png_uint_32 *proflen));
/* Note to maintainer: profile should be png_bytepp */
#endif
-#if defined(PNG_iCCP_SUPPORTED)
+#ifdef PNG_iCCP_SUPPORTED
extern PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_charp name, int compression_type,
png_charp profile, png_uint_32 proflen));
/* Note to maintainer: profile should be png_bytep */
#endif
-#if defined(PNG_sPLT_SUPPORTED)
+#ifdef PNG_sPLT_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_sPLT_tpp entries));
#endif
-#if defined(PNG_sPLT_SUPPORTED)
+#ifdef PNG_sPLT_SUPPORTED
extern PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_sPLT_tp entries, int nentries));
#endif
-#if defined(PNG_TEXT_SUPPORTED)
+#ifdef PNG_TEXT_SUPPORTED
/* png_get_text also returns the number of text chunks in *num_text */
extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_textp *text_ptr, int *num_text));
#endif
-/*
- * Note while png_set_text() will accept a structure whose text,
- * language, and translated keywords are NULL pointers, the structure
- * returned by png_get_text will always contain regular
- * zero-terminated C strings. They might be empty strings but
- * they will never be NULL pointers.
+/* Note while png_set_text() will accept a structure whose text,
+ * language, and translated keywords are NULL pointers, the structure
+ * returned by png_get_text will always contain regular
+ * zero-terminated C strings. They might be empty strings but
+ * they will never be NULL pointers.
*/
-#if defined(PNG_TEXT_SUPPORTED)
+#ifdef PNG_TEXT_SUPPORTED
extern PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_textp text_ptr, int num_text));
#endif
-#if defined(PNG_tIME_SUPPORTED)
+#ifdef PNG_tIME_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_timep *mod_time));
#endif
-#if defined(PNG_tIME_SUPPORTED)
+#ifdef PNG_tIME_SUPPORTED
extern PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_timep mod_time));
#endif
-#if defined(PNG_tRNS_SUPPORTED)
+#ifdef PNG_tRNS_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_bytep *trans, int *num_trans,
- png_color_16p *trans_values));
+ png_infop info_ptr, png_bytep *trans_alpha, int *num_trans,
+ png_color_16p *trans_color));
#endif
-#if defined(PNG_tRNS_SUPPORTED)
+#ifdef PNG_tRNS_SUPPORTED
extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_bytep trans, int num_trans,
- png_color_16p trans_values));
+ png_infop info_ptr, png_bytep trans_alpha, int num_trans,
+ png_color_16p trans_color));
#endif
-#if defined(PNG_tRNS_SUPPORTED)
+#ifdef PNG_tRNS_SUPPORTED
#endif
-#if defined(PNG_sCAL_SUPPORTED)
+#ifdef PNG_sCAL_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr,
png_infop info_ptr, int *unit, double *width, double *height));
@@ -2513,7 +2305,7 @@ extern PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr,
#endif
#endif /* PNG_sCAL_SUPPORTED */
-#if defined(PNG_sCAL_SUPPORTED)
+#ifdef PNG_sCAL_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
extern PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr,
png_infop info_ptr, int unit, double width, double height));
@@ -2540,7 +2332,7 @@ extern PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp
PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep
chunk_name));
#endif
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
extern PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns));
extern PNG_EXPORT(void, png_set_unknown_chunk_location)
@@ -2556,7 +2348,7 @@ extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp
extern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr,
png_infop info_ptr, int mask));
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
+#ifdef PNG_INFO_IMAGE_SUPPORTED
/* The "params" pointer is currently not used and is for future expansion. */
extern PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr,
png_infop info_ptr,
@@ -2568,113 +2360,6 @@ extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr,
png_voidp params));
#endif
-/* Define PNG_DEBUG at compile time for debugging information. Higher
- * numbers for PNG_DEBUG mean more debugging information. This has
- * only been added since version 0.95 so it is not implemented throughout
- * libpng yet, but more support will be added as needed.
- */
-#ifdef PNG_DEBUG
-#if (PNG_DEBUG > 0)
-#if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER)
-#include <crtdbg.h>
-#if (PNG_DEBUG > 1)
-#ifndef _DEBUG
-# define _DEBUG
-#endif
-#ifndef png_debug
-#define png_debug(l,m) _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE)
-#endif
-#ifndef png_debug1
-#define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1)
-#endif
-#ifndef png_debug2
-#define png_debug2(l,m,p1,p2) _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2)
-#endif
-#endif
-#else /* PNG_DEBUG_FILE || !_MSC_VER */
-#ifndef PNG_DEBUG_FILE
-#define PNG_DEBUG_FILE stderr
-#endif /* PNG_DEBUG_FILE */
-
-#if (PNG_DEBUG > 1)
-/* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on non-ISO
- * compilers.
- */
-# ifdef __STDC__
-# ifndef png_debug
-# define png_debug(l,m) \
- { \
- int num_tabs=l; \
- fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
- (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \
- }
-# endif
-# ifndef png_debug1
-# define png_debug1(l,m,p1) \
- { \
- int num_tabs=l; \
- fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
- (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \
- }
-# endif
-# ifndef png_debug2
-# define png_debug2(l,m,p1,p2) \
- { \
- int num_tabs=l; \
- fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
- (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \
- }
-# endif
-# else /* __STDC __ */
-# ifndef png_debug
-# define png_debug(l,m) \
- { \
- int num_tabs=l; \
- char format[256]; \
- snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
- (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
- m,PNG_STRING_NEWLINE); \
- fprintf(PNG_DEBUG_FILE,format); \
- }
-# endif
-# ifndef png_debug1
-# define png_debug1(l,m,p1) \
- { \
- int num_tabs=l; \
- char format[256]; \
- snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
- (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
- m,PNG_STRING_NEWLINE); \
- fprintf(PNG_DEBUG_FILE,format,p1); \
- }
-# endif
-# ifndef png_debug2
-# define png_debug2(l,m,p1,p2) \
- { \
- int num_tabs=l; \
- char format[256]; \
- snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
- (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
- m,PNG_STRING_NEWLINE); \
- fprintf(PNG_DEBUG_FILE,format,p1,p2); \
- }
-# endif
-# endif /* __STDC __ */
-#endif /* (PNG_DEBUG > 1) */
-
-#endif /* _MSC_VER */
-#endif /* (PNG_DEBUG > 0) */
-#endif /* PNG_DEBUG */
-#ifndef png_debug
-#define png_debug(l, m)
-#endif
-#ifndef png_debug1
-#define png_debug1(l, m, p1)
-#endif
-#ifndef png_debug2
-#define png_debug2(l, m, p1, p2)
-#endif
-
extern PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr));
extern PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr));
extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr));
@@ -2691,74 +2376,6 @@ extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp
#define PNG_HANDLE_CHUNK_IF_SAFE 2
#define PNG_HANDLE_CHUNK_ALWAYS 3
-/* Added to version 1.2.0 */
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-#if defined(PNG_MMX_CODE_SUPPORTED)
-#define PNG_ASM_FLAG_MMX_SUPPORT_COMPILED 0x01 /* not user-settable */
-#define PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU 0x02 /* not user-settable */
-#define PNG_ASM_FLAG_MMX_READ_COMBINE_ROW 0x04
-#define PNG_ASM_FLAG_MMX_READ_INTERLACE 0x08
-#define PNG_ASM_FLAG_MMX_READ_FILTER_SUB 0x10
-#define PNG_ASM_FLAG_MMX_READ_FILTER_UP 0x20
-#define PNG_ASM_FLAG_MMX_READ_FILTER_AVG 0x40
-#define PNG_ASM_FLAG_MMX_READ_FILTER_PAETH 0x80
-#define PNG_ASM_FLAGS_INITIALIZED 0x80000000 /* not user-settable */
-
-#define PNG_MMX_READ_FLAGS ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \
- | PNG_ASM_FLAG_MMX_READ_INTERLACE \
- | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \
- | PNG_ASM_FLAG_MMX_READ_FILTER_UP \
- | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \
- | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH )
-#define PNG_MMX_WRITE_FLAGS ( 0 )
-
-#define PNG_MMX_FLAGS ( PNG_ASM_FLAG_MMX_SUPPORT_COMPILED \
- | PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU \
- | PNG_MMX_READ_FLAGS \
- | PNG_MMX_WRITE_FLAGS )
-
-#define PNG_SELECT_READ 1
-#define PNG_SELECT_WRITE 2
-#endif /* PNG_MMX_CODE_SUPPORTED */
-
-#if !defined(PNG_1_0_X)
-/* pngget.c */
-extern PNG_EXPORT(png_uint_32,png_get_mmx_flagmask)
- PNGARG((int flag_select, int *compilerID));
-
-/* pngget.c */
-extern PNG_EXPORT(png_uint_32,png_get_asm_flagmask)
- PNGARG((int flag_select));
-
-/* pngget.c */
-extern PNG_EXPORT(png_uint_32,png_get_asm_flags)
- PNGARG((png_structp png_ptr));
-
-/* pngget.c */
-extern PNG_EXPORT(png_byte,png_get_mmx_bitdepth_threshold)
- PNGARG((png_structp png_ptr));
-
-/* pngget.c */
-extern PNG_EXPORT(png_uint_32,png_get_mmx_rowbytes_threshold)
- PNGARG((png_structp png_ptr));
-
-/* pngset.c */
-extern PNG_EXPORT(void,png_set_asm_flags)
- PNGARG((png_structp png_ptr, png_uint_32 asm_flags));
-
-/* pngset.c */
-extern PNG_EXPORT(void,png_set_mmx_thresholds)
- PNGARG((png_structp png_ptr, png_byte mmx_bitdepth_threshold,
- png_uint_32 mmx_rowbytes_threshold));
-
-#endif /* PNG_1_0_X */
-
-#if !defined(PNG_1_0_X)
-/* png.c, pnggccrd.c, or pngvcrd.c */
-extern PNG_EXPORT(int,png_mmx_support) PNGARG((void));
-#endif /* PNG_1_0_X */
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
-
/* Strip the prepended error numbers ("#nnn ") from error and warning
* messages before passing them to the error or warning handler.
*/
@@ -2767,7 +2384,7 @@ extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp
png_ptr, png_uint_32 strip_mode));
#endif
-/* Added at libpng-1.2.6 */
+/* Added in libpng-1.2.6 */
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
extern PNG_EXPORT(void,png_set_user_limits) PNGARG((png_structp
png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max));
@@ -2775,11 +2392,56 @@ extern PNG_EXPORT(png_uint_32,png_get_user_width_max) PNGARG((png_structp
png_ptr));
extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp
png_ptr));
+/* Added in libpng-1.4.0 */
+extern PNG_EXPORT(void,png_set_chunk_cache_max) PNGARG((png_structp
+ png_ptr, png_uint_32 user_chunk_cache_max));
+extern PNG_EXPORT(png_uint_32,png_get_chunk_cache_max)
+ PNGARG((png_structp png_ptr));
#endif
+#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED)
+PNG_EXPORT(png_uint_32,png_get_pixels_per_inch) PNGARG((png_structp png_ptr,
+png_infop info_ptr));
+
+PNG_EXPORT(png_uint_32,png_get_x_pixels_per_inch) PNGARG((png_structp png_ptr,
+png_infop info_ptr));
-/* Maintainer: Put new public prototypes here ^, in libpng.3, and in
- * project defs
+PNG_EXPORT(png_uint_32,png_get_y_pixels_per_inch) PNGARG((png_structp png_ptr,
+png_infop info_ptr));
+
+PNG_EXPORT(float,png_get_x_offset_inches) PNGARG((png_structp png_ptr,
+png_infop info_ptr));
+
+PNG_EXPORT(float,png_get_y_offset_inches) PNGARG((png_structp png_ptr,
+png_infop info_ptr));
+
+#ifdef PNG_pHYs_SUPPORTED
+PNG_EXPORT(png_uint_32,png_get_pHYs_dpi) PNGARG((png_structp png_ptr,
+png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
+#endif /* PNG_pHYs_SUPPORTED */
+#endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */
+
+/* Added in libpng-1.4.0 */
+#ifdef PNG_IO_STATE_SUPPORTED
+extern PNG_EXPORT(png_uint_32,png_get_io_state) PNGARG((png_structp png_ptr));
+
+extern PNG_EXPORT(png_bytep,png_get_io_chunk_name)
+ PNGARG((png_structp png_ptr));
+
+/* The flags returned by png_get_io_state() are the following: */
+#define PNG_IO_NONE 0x0000 /* no I/O at this moment */
+#define PNG_IO_READING 0x0001 /* currently reading */
+#define PNG_IO_WRITING 0x0002 /* currently writing */
+#define PNG_IO_SIGNATURE 0x0010 /* currently at the file signature */
+#define PNG_IO_CHUNK_HDR 0x0020 /* currently at the chunk header */
+#define PNG_IO_CHUNK_DATA 0x0040 /* currently at the chunk data */
+#define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */
+#define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */
+#define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */
+#endif /* ?PNG_IO_STATE_SUPPORTED */
+
+/* Maintainer: Put new public prototypes here ^, in libpng.3, and project
+ * defs
*/
#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
@@ -2820,32 +2482,41 @@ extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp
(composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \
(png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) + \
(png_uint_32)32767) / (png_uint_32)65535L)
-
#endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */
-/* Inline macros to do direct reads of bytes from the input buffer. These
- * require that you are using an architecture that uses PNG byte ordering
- * (MSB first) and supports unaligned data storage. I think that PowerPC
- * in big-endian mode and 680x0 are the only ones that will support this.
- * The x86 line of processors definitely do not. The png_get_int_32()
- * routine also assumes we are using two's complement format for negative
- * values, which is almost certainly true.
- */
-#if defined(PNG_READ_BIG_ENDIAN_SUPPORTED)
-# define png_get_uint_32(buf) ( *((png_uint_32p) (buf)))
-# define png_get_uint_16(buf) ( *((png_uint_16p) (buf)))
-# define png_get_int_32(buf) ( *((png_int_32p) (buf)))
+#ifdef PNG_USE_READ_MACROS
+/* Inline macros to do direct reads of bytes from the input buffer.
+ * The png_get_int_32() routine assumes we are using two's complement
+ * format for negative values, which is almost certainly true.
+ */
+/* We could make special-case BIG_ENDIAN macros that do direct reads here */
+# define png_get_uint_32(buf) \
+ (((png_uint_32)(*(buf)) << 24) + \
+ ((png_uint_32)(*((buf) + 1)) << 16) + \
+ ((png_uint_32)(*((buf) + 2)) << 8) + \
+ ((png_uint_32)(*((buf) + 3))))
+# define png_get_uint_16(buf) \
+ (((png_uint_32)(*(buf)) << 8) + \
+ ((png_uint_32)(*((buf) + 1))))
+#ifdef PNG_GET_INT_32_SUPPORTED
+# define png_get_int_32(buf) \
+ (((png_int_32)(*(buf)) << 24) + \
+ ((png_int_32)(*((buf) + 1)) << 16) + \
+ ((png_int_32)(*((buf) + 2)) << 8) + \
+ ((png_int_32)(*((buf) + 3))))
+#endif
#else
extern PNG_EXPORT(png_uint_32,png_get_uint_32) PNGARG((png_bytep buf));
extern PNG_EXPORT(png_uint_16,png_get_uint_16) PNGARG((png_bytep buf));
+#ifdef PNG_GET_INT_32_SUPPORTED
extern PNG_EXPORT(png_int_32,png_get_int_32) PNGARG((png_bytep buf));
-#endif /* !PNG_READ_BIG_ENDIAN_SUPPORTED */
+#endif
+#endif
extern PNG_EXPORT(png_uint_32,png_get_uint_31)
PNGARG((png_structp png_ptr, png_bytep buf));
/* No png_get_int_16 -- may be added if there's a real need for it. */
-/* Place a 32-bit number into a buffer in PNG byte order (big-endian).
- */
+/* Place a 32-bit number into a buffer in PNG byte order (big-endian). */
extern PNG_EXPORT(void,png_save_uint_32)
PNGARG((png_bytep buf, png_uint_32 i));
extern PNG_EXPORT(void,png_save_int_32)
@@ -2861,861 +2532,16 @@ extern PNG_EXPORT(void,png_save_uint_16)
/* ************************************************************************* */
-/* These next functions are used internally in the code. They generally
- * shouldn't be used unless you are writing code to add or replace some
- * functionality in libpng. More information about most functions can
- * be found in the files where the functions are located.
- */
-
-
-/* Various modes of operation, that are visible to applications because
- * they are used for unknown chunk location.
+/* Various modes of operation. Note that after an init, mode is set to
+ * zero automatically when the structure is created.
*/
#define PNG_HAVE_IHDR 0x01
#define PNG_HAVE_PLTE 0x02
#define PNG_HAVE_IDAT 0x04
#define PNG_AFTER_IDAT 0x08 /* Have complete zlib datastream */
#define PNG_HAVE_IEND 0x10
-
-#if defined(PNG_INTERNAL)
-
-/* More modes of operation. Note that after an init, mode is set to
- * zero automatically when the structure is created.
- */
#define PNG_HAVE_gAMA 0x20
#define PNG_HAVE_cHRM 0x40
-#define PNG_HAVE_sRGB 0x80
-#define PNG_HAVE_CHUNK_HEADER 0x100
-#define PNG_WROTE_tIME 0x200
-#define PNG_WROTE_INFO_BEFORE_PLTE 0x400
-#define PNG_BACKGROUND_IS_GRAY 0x800
-#define PNG_HAVE_PNG_SIGNATURE 0x1000
-#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
-
-/* Flags for the transformations the PNG library does on the image data */
-#define PNG_BGR 0x0001
-#define PNG_INTERLACE 0x0002
-#define PNG_PACK 0x0004
-#define PNG_SHIFT 0x0008
-#define PNG_SWAP_BYTES 0x0010
-#define PNG_INVERT_MONO 0x0020
-#define PNG_DITHER 0x0040
-#define PNG_BACKGROUND 0x0080
-#define PNG_BACKGROUND_EXPAND 0x0100
- /* 0x0200 unused */
-#define PNG_16_TO_8 0x0400
-#define PNG_RGBA 0x0800
-#define PNG_EXPAND 0x1000
-#define PNG_GAMMA 0x2000
-#define PNG_GRAY_TO_RGB 0x4000
-#define PNG_FILLER 0x8000L
-#define PNG_PACKSWAP 0x10000L
-#define PNG_SWAP_ALPHA 0x20000L
-#define PNG_STRIP_ALPHA 0x40000L
-#define PNG_INVERT_ALPHA 0x80000L
-#define PNG_USER_TRANSFORM 0x100000L
-#define PNG_RGB_TO_GRAY_ERR 0x200000L
-#define PNG_RGB_TO_GRAY_WARN 0x400000L
-#define PNG_RGB_TO_GRAY 0x600000L /* two bits, RGB_TO_GRAY_ERR|WARN */
- /* 0x800000L Unused */
-#define PNG_ADD_ALPHA 0x1000000L /* Added to libpng-1.2.7 */
-#define PNG_EXPAND_tRNS 0x2000000L /* Added to libpng-1.2.9 */
- /* 0x4000000L unused */
- /* 0x8000000L unused */
- /* 0x10000000L unused */
- /* 0x20000000L unused */
- /* 0x40000000L unused */
-
-/* Flags for png_create_struct */
-#define PNG_STRUCT_PNG 0x0001
-#define PNG_STRUCT_INFO 0x0002
-
-/* Scaling factor for filter heuristic weighting calculations */
-#define PNG_WEIGHT_SHIFT 8
-#define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT))
-#define PNG_COST_SHIFT 3
-#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT))
-
-/* Flags for the png_ptr->flags rather than declaring a byte for each one */
-#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001
-#define PNG_FLAG_ZLIB_CUSTOM_LEVEL 0x0002
-#define PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL 0x0004
-#define PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS 0x0008
-#define PNG_FLAG_ZLIB_CUSTOM_METHOD 0x0010
-#define PNG_FLAG_ZLIB_FINISHED 0x0020
-#define PNG_FLAG_ROW_INIT 0x0040
-#define PNG_FLAG_FILLER_AFTER 0x0080
-#define PNG_FLAG_CRC_ANCILLARY_USE 0x0100
-#define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200
-#define PNG_FLAG_CRC_CRITICAL_USE 0x0400
-#define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800
-#define PNG_FLAG_FREE_PLTE 0x1000
-#define PNG_FLAG_FREE_TRNS 0x2000
-#define PNG_FLAG_FREE_HIST 0x4000
-#define PNG_FLAG_KEEP_UNKNOWN_CHUNKS 0x8000L
-#define PNG_FLAG_KEEP_UNSAFE_CHUNKS 0x10000L
-#define PNG_FLAG_LIBRARY_MISMATCH 0x20000L
-#define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000L
-#define PNG_FLAG_STRIP_ERROR_TEXT 0x80000L
-#define PNG_FLAG_MALLOC_NULL_MEM_OK 0x100000L
-#define PNG_FLAG_ADD_ALPHA 0x200000L /* Added to libpng-1.2.8 */
-#define PNG_FLAG_STRIP_ALPHA 0x400000L /* Added to libpng-1.2.8 */
- /* 0x800000L unused */
- /* 0x1000000L unused */
- /* 0x2000000L unused */
- /* 0x4000000L unused */
- /* 0x8000000L unused */
- /* 0x10000000L unused */
- /* 0x20000000L unused */
- /* 0x40000000L unused */
-
-#define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \
- PNG_FLAG_CRC_ANCILLARY_NOWARN)
-
-#define PNG_FLAG_CRC_CRITICAL_MASK (PNG_FLAG_CRC_CRITICAL_USE | \
- PNG_FLAG_CRC_CRITICAL_IGNORE)
-
-#define PNG_FLAG_CRC_MASK (PNG_FLAG_CRC_ANCILLARY_MASK | \
- PNG_FLAG_CRC_CRITICAL_MASK)
-
-/* Save typing and make code easier to understand */
-
-#define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \
- abs((int)((c1).green) - (int)((c2).green)) + \
- abs((int)((c1).blue) - (int)((c2).blue)))
-
-/* Added to libpng-1.2.6 JB */
-#define PNG_ROWBYTES(pixel_bits, width) \
- ((pixel_bits) >= 8 ? \
- ((width) * (((png_uint_32)(pixel_bits)) >> 3)) : \
- (( ((width) * ((png_uint_32)(pixel_bits))) + 7) >> 3) )
-
-/* PNG_OUT_OF_RANGE returns true if value is outside the range
- * ideal-delta..ideal+delta. Each argument is evaluated twice.
- * "ideal" and "delta" should be constants, normally simple
- * integers, "value" a variable. Added to libpng-1.2.6 JB
- */
-#define PNG_OUT_OF_RANGE(value, ideal, delta) \
- ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )
-
-/* Variables declared in png.c - only it needs to define PNG_NO_EXTERN */
-#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
-/* Place to hold the signature string for a PNG file. */
-#ifdef PNG_USE_GLOBAL_ARRAYS
- PNG_EXPORT_VAR (PNG_CONST png_byte FARDATA) png_sig[8];
-#else
-#endif
-#endif /* PNG_NO_EXTERN */
-
-/* Constant strings for known chunk types. If you need to add a chunk,
- * define the name here, and add an invocation of the macro in png.c and
- * wherever it's needed.
- */
-#define PNG_IHDR png_byte png_IHDR[5] = { 73, 72, 68, 82, '\0'}
-#define PNG_IDAT png_byte png_IDAT[5] = { 73, 68, 65, 84, '\0'}
-#define PNG_IEND png_byte png_IEND[5] = { 73, 69, 78, 68, '\0'}
-#define PNG_PLTE png_byte png_PLTE[5] = { 80, 76, 84, 69, '\0'}
-#define PNG_bKGD png_byte png_bKGD[5] = { 98, 75, 71, 68, '\0'}
-#define PNG_cHRM png_byte png_cHRM[5] = { 99, 72, 82, 77, '\0'}
-#define PNG_gAMA png_byte png_gAMA[5] = {103, 65, 77, 65, '\0'}
-#define PNG_hIST png_byte png_hIST[5] = {104, 73, 83, 84, '\0'}
-#define PNG_iCCP png_byte png_iCCP[5] = {105, 67, 67, 80, '\0'}
-#define PNG_iTXt png_byte png_iTXt[5] = {105, 84, 88, 116, '\0'}
-#define PNG_oFFs png_byte png_oFFs[5] = {111, 70, 70, 115, '\0'}
-#define PNG_pCAL png_byte png_pCAL[5] = {112, 67, 65, 76, '\0'}
-#define PNG_sCAL png_byte png_sCAL[5] = {115, 67, 65, 76, '\0'}
-#define PNG_pHYs png_byte png_pHYs[5] = {112, 72, 89, 115, '\0'}
-#define PNG_sBIT png_byte png_sBIT[5] = {115, 66, 73, 84, '\0'}
-#define PNG_sPLT png_byte png_sPLT[5] = {115, 80, 76, 84, '\0'}
-#define PNG_sRGB png_byte png_sRGB[5] = {115, 82, 71, 66, '\0'}
-#define PNG_tEXt png_byte png_tEXt[5] = {116, 69, 88, 116, '\0'}
-#define PNG_tIME png_byte png_tIME[5] = {116, 73, 77, 69, '\0'}
-#define PNG_tRNS png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'}
-#define PNG_zTXt png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'}
-
-#ifdef PNG_USE_GLOBAL_ARRAYS
-PNG_EXPORT_VAR (png_byte FARDATA) png_IHDR[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_IDAT[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_IEND[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_PLTE[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_bKGD[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_cHRM[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_gAMA[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_hIST[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_iCCP[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_iTXt[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_oFFs[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_pCAL[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_sCAL[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_pHYs[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_sBIT[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_sPLT[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_sRGB[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_tEXt[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_tIME[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_tRNS[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_zTXt[5];
-#endif /* PNG_USE_GLOBAL_ARRAYS */
-
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-/* Initialize png_ptr struct for reading, and allocate any other memory.
- * (old interface - DEPRECATED - use png_create_read_struct instead).
- */
-extern PNG_EXPORT(void,png_read_init) PNGARG((png_structp png_ptr));
-#undef png_read_init
-#define png_read_init(png_ptr) png_read_init_3(&png_ptr, \
- PNG_LIBPNG_VER_STRING, png_sizeof(png_struct));
-#endif
-
-extern PNG_EXPORT(void,png_read_init_3) PNGARG((png_structpp ptr_ptr,
- png_const_charp user_png_ver, png_size_t png_struct_size));
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-extern PNG_EXPORT(void,png_read_init_2) PNGARG((png_structp png_ptr,
- png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t
- png_info_size));
-#endif
-
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-/* Initialize png_ptr struct for writing, and allocate any other memory.
- * (old interface - DEPRECATED - use png_create_write_struct instead).
- */
-extern PNG_EXPORT(void,png_write_init) PNGARG((png_structp png_ptr));
-#undef png_write_init
-#define png_write_init(png_ptr) png_write_init_3(&png_ptr, \
- PNG_LIBPNG_VER_STRING, png_sizeof(png_struct));
-#endif
-
-extern PNG_EXPORT(void,png_write_init_3) PNGARG((png_structpp ptr_ptr,
- png_const_charp user_png_ver, png_size_t png_struct_size));
-extern PNG_EXPORT(void,png_write_init_2) PNGARG((png_structp png_ptr,
- png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t
- png_info_size));
-
-/* Allocate memory for an internal libpng struct */
-PNG_EXTERN png_voidp png_create_struct PNGARG((int type));
-
-/* Free memory from internal libpng struct */
-PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr));
-
-PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr
- malloc_fn, png_voidp mem_ptr));
-PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr,
- png_free_ptr free_fn, png_voidp mem_ptr));
-
-/* Free any memory that info_ptr points to and reset struct. */
-PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr,
- png_infop info_ptr));
-
-#ifndef PNG_1_0_X
-/* Function to allocate memory for zlib. */
-PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, uInt size));
-
-/* Function to free memory for zlib */
-PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr));
-
-#ifdef PNG_SIZE_T
-/* Function to convert a sizeof an item to png_sizeof item */
- PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size));
-#endif
-
-/* Next four functions are used internally as callbacks. PNGAPI is required
- * but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3.
- */
-
-PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr,
- png_bytep data, png_size_t length));
-
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-PNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr,
- png_bytep buffer, png_size_t length));
-#endif
-
-PNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr,
- png_bytep data, png_size_t length));
-
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
-#if !defined(PNG_NO_STDIO)
-PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr));
-#endif
-#endif
-#else /* PNG_1_0_X */
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-PNG_EXTERN void png_push_fill_buffer PNGARG((png_structp png_ptr,
- png_bytep buffer, png_size_t length));
-#endif
-#endif /* PNG_1_0_X */
-
-/* Reset the CRC variable */
-PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr));
-
-/* Write the "data" buffer to whatever output you are using. */
-PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data,
- png_size_t length));
-
-/* Read data from whatever input you are using into the "data" buffer */
-PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data,
- png_size_t length));
-
-/* Read bytes into buf, and update png_ptr->crc */
-PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf,
- png_size_t length));
-
-/* Decompress data in a chunk that uses compression */
-#if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \
- defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED)
-PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr,
- int comp_type, png_size_t chunklength,
- png_size_t prefix_length, png_size_t *data_length));
-#endif
-
-/* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */
-PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip));
-
-/* Read the CRC from the file and compare it to the libpng calculated CRC */
-PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr));
-
-/* Calculate the CRC over a section of data. Note that we are only
- * passing a maximum of 64K on systems that have this as a memory limit,
- * since this is the maximum buffer size we can specify.
- */
-PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr,
- png_size_t length));
-
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
-PNG_EXTERN void png_flush PNGARG((png_structp png_ptr));
-#endif
-
-/* Simple function to write the signature */
-PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr));
-
-/* Write various chunks */
-
-/* Write the IHDR chunk, and update the png_struct with the necessary
- * information.
- */
-PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width,
- png_uint_32 height,
- int bit_depth, int color_type, int compression_method, int filter_method,
- int interlace_method));
-
-PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette,
- png_uint_32 num_pal));
-
-PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data,
- png_size_t length));
-
-PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr));
-
-#if defined(PNG_WRITE_gAMA_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma));
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, png_fixed_point
- file_gamma));
-#endif
-#endif
-
-#if defined(PNG_WRITE_sBIT_SUPPORTED)
-PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit,
- int color_type));
-#endif
-
-#if defined(PNG_WRITE_cHRM_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr,
- double white_x, double white_y,
- double red_x, double red_y, double green_x, double green_y,
- double blue_x, double blue_y));
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr,
- png_fixed_point int_white_x, png_fixed_point int_white_y,
- png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
- int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
- png_fixed_point int_blue_y));
-#endif
-#endif
-
-#if defined(PNG_WRITE_sRGB_SUPPORTED)
-PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr,
- int intent));
-#endif
-
-#if defined(PNG_WRITE_iCCP_SUPPORTED)
-PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr,
- png_charp name, int compression_type,
- png_charp profile, int proflen));
- /* Note to maintainer: profile should be png_bytep */
-#endif
-
-#if defined(PNG_WRITE_sPLT_SUPPORTED)
-PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr,
- png_sPLT_tp palette));
-#endif
-
-#if defined(PNG_WRITE_tRNS_SUPPORTED)
-PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans,
- png_color_16p values, int number, int color_type));
-#endif
-
-#if defined(PNG_WRITE_bKGD_SUPPORTED)
-PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr,
- png_color_16p values, int color_type));
-#endif
-
-#if defined(PNG_WRITE_hIST_SUPPORTED)
-PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist,
- int num_hist));
-#endif
-
-#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \
- defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)
-PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr,
- png_charp key, png_charpp new_key));
-#endif
-
-#if defined(PNG_WRITE_tEXt_SUPPORTED)
-PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key,
- png_charp text, png_size_t text_len));
-#endif
-
-#if defined(PNG_WRITE_zTXt_SUPPORTED)
-PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key,
- png_charp text, png_size_t text_len, int compression));
-#endif
-
-#if defined(PNG_WRITE_iTXt_SUPPORTED)
-PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr,
- int compression, png_charp key, png_charp lang, png_charp lang_key,
- png_charp text));
-#endif
-
-#if defined(PNG_TEXT_SUPPORTED) /* Added at version 1.0.14 and 1.2.4 */
-PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_textp text_ptr, int num_text));
-#endif
-
-#if defined(PNG_WRITE_oFFs_SUPPORTED)
-PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr,
- png_int_32 x_offset, png_int_32 y_offset, int unit_type));
-#endif
-
-#if defined(PNG_WRITE_pCAL_SUPPORTED)
-PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose,
- png_int_32 X0, png_int_32 X1, int type, int nparams,
- png_charp units, png_charpp params));
-#endif
-
-#if defined(PNG_WRITE_pHYs_SUPPORTED)
-PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr,
- png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit,
- int unit_type));
-#endif
-
-#if defined(PNG_WRITE_tIME_SUPPORTED)
-PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr,
- png_timep mod_time));
-#endif
-
-#if defined(PNG_WRITE_sCAL_SUPPORTED)
-#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
-PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr,
- int unit, double width, double height));
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr,
- int unit, png_charp width, png_charp height));
-#endif
-#endif
-#endif
-
-/* Called when finished processing a row of data */
-PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr));
-
-/* Internal use only. Called before first row of data */
-PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr));
-
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr));
-#endif
-
-/* Combine a row of data, dealing with alpha, etc. if requested */
-PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row,
- int mask));
-
-#if defined(PNG_READ_INTERLACING_SUPPORTED)
-/* Expand an interlaced row */
-/* OLD pre-1.0.9 interface:
-PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info,
- png_bytep row, int pass, png_uint_32 transformations));
- */
-PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr));
-#endif
-
-/* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */
-
-#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
-/* Grab pixels out of a row for an interlaced pass */
-PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info,
- png_bytep row, int pass));
-#endif
-
-/* Unfilter a row */
-PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr,
- png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter));
-
-/* Choose the best filter to use and filter the row data */
-PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr,
- png_row_infop row_info));
-
-/* Write out the filtered row. */
-PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr,
- png_bytep filtered_row));
-/* Finish a row while reading, dealing with interlacing passes, etc. */
-PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr));
-
-/* Initialize the row buffers, etc. */
-PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr));
-/* Optional call to update the users info structure */
-PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr,
- png_infop info_ptr));
-
-/* These are the functions that do the transformations */
-#if defined(PNG_READ_FILLER_SUPPORTED)
-PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info,
- png_bytep row, png_uint_32 filler, png_uint_32 flags));
-#endif
-
-#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED)
-PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info,
- png_bytep row));
-#endif
-
-#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
-PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info,
- png_bytep row));
-#endif
-
-#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED)
-PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info,
- png_bytep row));
-#endif
-
-#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
-PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info,
- png_bytep row));
-#endif
-
-#if defined(PNG_WRITE_FILLER_SUPPORTED) || \
- defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
-PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info,
- png_bytep row, png_uint_32 flags));
-#endif
-
-#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
-PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row));
-#endif
-
-#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED)
-PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row));
-#endif
-
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop
- row_info, png_bytep row));
-#endif
-
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
-PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info,
- png_bytep row));
-#endif
-
-#if defined(PNG_READ_PACK_SUPPORTED)
-PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, png_bytep row));
-#endif
-
-#if defined(PNG_READ_SHIFT_SUPPORTED)
-PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row,
- png_color_8p sig_bits));
-#endif
-
-#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
-PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, png_bytep row));
-#endif
-
-#if defined(PNG_READ_16_TO_8_SUPPORTED)
-PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row));
-#endif
-
-#if defined(PNG_READ_DITHER_SUPPORTED)
-PNG_EXTERN void png_do_dither PNGARG((png_row_infop row_info,
- png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup));
-
-# if defined(PNG_CORRECT_PALETTE_SUPPORTED)
-PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr,
- png_colorp palette, int num_palette));
-# endif
-#endif
-
-#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
-PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, png_bytep row));
-#endif
-
-#if defined(PNG_WRITE_PACK_SUPPORTED)
-PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info,
- png_bytep row, png_uint_32 bit_depth));
-#endif
-
-#if defined(PNG_WRITE_SHIFT_SUPPORTED)
-PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row,
- png_color_8p bit_depth));
-#endif
-
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
- png_color_16p trans_values, png_color_16p background,
- png_color_16p background_1,
- png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,
- png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1,
- png_uint_16pp gamma_16_to_1, int gamma_shift));
-#else
-PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
- png_color_16p trans_values, png_color_16p background));
-#endif
-#endif
-
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row,
- png_bytep gamma_table, png_uint_16pp gamma_16_table,
- int gamma_shift));
-#endif
-
-#if defined(PNG_READ_EXPAND_SUPPORTED)
-PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info,
- png_bytep row, png_colorp palette, png_bytep trans, int num_trans));
-PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info,
- png_bytep row, png_color_16p trans_value));
-#endif
-
-/* The following decodes the appropriate chunks, and does error correction,
- * then calls the appropriate callback for the chunk if it is valid.
- */
-
-/* Decode the IHDR chunk */
-PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-
-#if defined(PNG_READ_bKGD_SUPPORTED)
-PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_cHRM_SUPPORTED)
-PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_gAMA_SUPPORTED)
-PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_hIST_SUPPORTED)
-PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_iCCP_SUPPORTED)
-extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-#endif /* PNG_READ_iCCP_SUPPORTED */
-
-#if defined(PNG_READ_iTXt_SUPPORTED)
-PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_oFFs_SUPPORTED)
-PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_pCAL_SUPPORTED)
-PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_pHYs_SUPPORTED)
-PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_sBIT_SUPPORTED)
-PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_sCAL_SUPPORTED)
-PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_sPLT_SUPPORTED)
-extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-#endif /* PNG_READ_sPLT_SUPPORTED */
-
-#if defined(PNG_READ_sRGB_SUPPORTED)
-PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_tEXt_SUPPORTED)
-PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_tIME_SUPPORTED)
-PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_tRNS_SUPPORTED)
-PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_zTXt_SUPPORTED)
-PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
-#endif
-
-PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_32 length));
-
-PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr,
- png_bytep chunk_name));
-
-/* Handle the transformations for reading and writing */
-PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr));
-PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr));
-
-PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr));
-
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr,
- png_infop info_ptr));
-PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr,
- png_infop info_ptr));
-PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr));
-PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr,
- png_uint_32 length));
-PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr));
-PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr));
-PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr,
- png_bytep buffer, png_size_t buffer_length));
-PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr));
-PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr,
- png_bytep buffer, png_size_t buffer_length));
-PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr));
-PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_32 length));
-PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr,
- png_infop info_ptr));
-PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr,
- png_infop info_ptr));
-PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row));
-PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr,
- png_infop info_ptr));
-PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr,
- png_infop info_ptr));
-PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr));
-#if defined(PNG_READ_tEXt_SUPPORTED)
-PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_32 length));
-PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr,
- png_infop info_ptr));
-#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
-PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_32 length));
-PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr,
- png_infop info_ptr));
-#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
-PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_32 length));
-PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr,
- png_infop info_ptr));
-#endif
-
-#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
-
-#ifdef PNG_MNG_FEATURES_SUPPORTED
-PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info,
- png_bytep row));
-PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info,
- png_bytep row));
-#endif
-
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-#if defined(PNG_MMX_CODE_SUPPORTED)
-/* png.c */ /* PRIVATE */
-PNG_EXTERN void png_init_mmx_flags PNGARG((png_structp png_ptr));
-#endif
-#endif
-
-#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED)
-PNG_EXTERN png_uint_32 png_get_pixels_per_inch PNGARG((png_structp png_ptr,
-png_infop info_ptr));
-
-PNG_EXTERN png_uint_32 png_get_x_pixels_per_inch PNGARG((png_structp png_ptr,
-png_infop info_ptr));
-
-PNG_EXTERN png_uint_32 png_get_y_pixels_per_inch PNGARG((png_structp png_ptr,
-png_infop info_ptr));
-
-PNG_EXTERN float png_get_x_offset_inches PNGARG((png_structp png_ptr,
-png_infop info_ptr));
-
-PNG_EXTERN float png_get_y_offset_inches PNGARG((png_structp png_ptr,
-png_infop info_ptr));
-
-#if defined(PNG_pHYs_SUPPORTED)
-PNG_EXTERN png_uint_32 png_get_pHYs_dpi PNGARG((png_structp png_ptr,
-png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
-#endif /* PNG_pHYs_SUPPORTED */
-#endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */
-
-/* Read the chunk header (length + type name) */
-PNG_EXTERN png_uint_32 png_read_chunk_header PNGARG((png_structp png_ptr));
-
-/* Added at libpng version 1.2.34 */
-#if defined(PNG_cHRM_SUPPORTED)
-PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr,
- png_fixed_point int_white_x, png_fixed_point int_white_y,
- png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
- int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
- png_fixed_point int_blue_y));
-#endif
-
-#if defined(PNG_cHRM_SUPPORTED)
-#if !defined(PNG_NO_CHECK_cHRM)
-/* Added at libpng version 1.2.34 */
-PNG_EXTERN void png_64bit_product (long v1, long v2, unsigned long *hi_product,
- unsigned long *lo_product);
-#endif
-#endif
-
-/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
-
-#endif /* PNG_INTERNAL */
#ifdef __cplusplus
}
diff --git a/src/3rdparty/libpng/pngconf.h b/src/3rdparty/libpng/pngconf.h
index c1c1d92818..1f8bef88a4 100644
--- a/src/3rdparty/libpng/pngconf.h
+++ b/src/3rdparty/libpng/pngconf.h
@@ -1,14 +1,16 @@
/* pngconf.h - machine configurable file for libpng
*
- * libpng version 1.2.40 - September 10, 2009
- * Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ * libpng version 1.4.0 - January 3, 2010
+ * For conditions of distribution and use, see copyright notice in png.h
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
+ *
*/
/* Any machine specific code is near the front of this file, so if you
@@ -20,9 +22,22 @@
#ifndef PNGCONF_H
#define PNGCONF_H
-#define PNG_1_2_X
+#ifndef PNG_NO_LIMITS_H
+# include <limits.h>
+#endif
+
+/* Added at libpng-1.2.9 */
+
+/* config.h is created by and PNG_CONFIGURE_LIBPNG is set by the "configure" script. */
+#ifdef PNG_CONFIGURE_LIBPNG
+# ifdef HAVE_CONFIG_H
+# include "config.h"
+# endif
+#endif
/*
+ * Added at libpng-1.2.8
+ *
* PNG_USER_CONFIG has to be defined on the compiler command line. This
* includes the resource compiler for Windows DLL configurations.
*/
@@ -30,19 +45,10 @@
# ifndef PNG_USER_PRIVATEBUILD
# define PNG_USER_PRIVATEBUILD
# endif
-#include "pngusr.h"
-#endif
-
-/* PNG_CONFIGURE_LIBPNG is set by the "configure" script. */
-#ifdef PNG_CONFIGURE_LIBPNG
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+# include "pngusr.h"
#endif
/*
- * Added at libpng-1.2.8
- *
* If you create a private DLL you need to define in "pngusr.h" the followings:
* #define PNG_USER_PRIVATEBUILD <Describes by whom and why this version of
* the DLL was built>
@@ -62,29 +68,21 @@
*/
#ifdef __STDC__
-#ifdef SPECIALBUILD
-# pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\
- are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.")
-#endif
+# ifdef SPECIALBUILD
+# pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\
+ are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.")
+# endif
-#ifdef PRIVATEBUILD
-# pragma message("PRIVATEBUILD is deprecated.\
- Use PNG_USER_PRIVATEBUILD instead.")
-# define PNG_USER_PRIVATEBUILD PRIVATEBUILD
-#endif
+# ifdef PRIVATEBUILD
+# pragma message("PRIVATEBUILD is deprecated.\
+ Use PNG_USER_PRIVATEBUILD instead.")
+# define PNG_USER_PRIVATEBUILD PRIVATEBUILD
+# endif
#endif /* __STDC__ */
-#ifndef PNG_VERSION_INFO_ONLY
-
/* End of material added to libpng-1.2.8 */
-/* Added at libpng-1.2.19, removed at libpng-1.2.20 because it caused trouble
- Restored at libpng-1.2.21 */
-#if !defined(PNG_NO_WARN_UNINITIALIZED_ROW) && \
- !defined(PNG_WARN_UNINITIALIZED_ROW)
-# define PNG_WARN_UNINITIALIZED_ROW 1
-#endif
-/* End of material added at libpng-1.2.19/1.2.21 */
+#ifndef PNG_VERSION_INFO_ONLY
/* This is the size of the compression buffer, and thus the size of
* an IDAT chunk. Make this whatever size you feel is best for your
@@ -115,20 +113,57 @@
# define PNG_WRITE_SUPPORTED
#endif
+/* Enabled in 1.4.0. */
+#ifdef PNG_ALLOW_BENIGN_ERRORS
+# define png_benign_error png_warning
+# define png_chunk_benign_error png_chunk_warning
+#else
+# ifndef PNG_BENIGN_ERRORS_SUPPORTED
+# define png_benign_error png_error
+# define png_chunk_benign_error png_chunk_error
+# endif
+#endif
+
+/* Added at libpng version 1.4.0 */
+#if !defined(PNG_NO_WARNINGS) && !defined(PNG_WARNINGS_SUPPORTED)
+# define PNG_WARNINGS_SUPPORTED
+#endif
+
+/* Added at libpng version 1.4.0 */
+#if !defined(PNG_NO_ERROR_TEXT) && !defined(PNG_ERROR_TEXT_SUPPORTED)
+# define PNG_ERROR_TEXT_SUPPORTED
+#endif
+
+/* Added at libpng version 1.4.0 */
+#if !defined(PNG_NO_CHECK_cHRM) && !defined(PNG_CHECK_cHRM_SUPPORTED)
+# define PNG_CHECK_cHRM_SUPPORTED
+#endif
+
+/* Added at libpng version 1.4.0 */
+#if !defined(PNG_NO_ALIGNED_MEMORY) && !defined(PNG_ALIGNED_MEMORY_SUPPORTED)
+# define PNG_ALIGNED_MEMORY_SUPPORTED
+#endif
+
/* Enabled by default in 1.2.0. You can disable this if you don't need to
support PNGs that are embedded in MNG datastreams */
-#if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES)
+#ifndef PNG_NO_MNG_FEATURES
# ifndef PNG_MNG_FEATURES_SUPPORTED
# define PNG_MNG_FEATURES_SUPPORTED
# endif
#endif
+/* Added at libpng version 1.4.0 */
#ifndef PNG_NO_FLOATING_POINT_SUPPORTED
# ifndef PNG_FLOATING_POINT_SUPPORTED
# define PNG_FLOATING_POINT_SUPPORTED
# endif
#endif
+/* Added at libpng-1.4.0beta49 for testing (this test is no longer used
+ in libpng and png_calloc() is always present)
+ */
+#define PNG_CALLOC_SUPPORTED
+
/* If you are running on a machine where you cannot allocate more
* than 64K of memory at once, uncomment this. While libpng will not
* normally need that much memory in a chunk (unless you load up a very
@@ -172,46 +207,46 @@
* we don't need to worry about PNG_STATIC or ALL_STATIC when it comes
* to __declspec() stuff. However, we DO need to worry about
* PNG_BUILD_DLL and PNG_STATIC because those change some defaults
- * such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed.
+ * such as CONSOLE_IO.
*/
-#if defined(__CYGWIN__)
-# if defined(ALL_STATIC)
-# if defined(PNG_BUILD_DLL)
+#ifdef __CYGWIN__
+# ifdef ALL_STATIC
+# ifdef PNG_BUILD_DLL
# undef PNG_BUILD_DLL
# endif
-# if defined(PNG_USE_DLL)
+# ifdef PNG_USE_DLL
# undef PNG_USE_DLL
# endif
-# if defined(PNG_DLL)
+# ifdef PNG_DLL
# undef PNG_DLL
# endif
-# if !defined(PNG_STATIC)
+# ifndef PNG_STATIC
# define PNG_STATIC
# endif
# else
-# if defined (PNG_BUILD_DLL)
-# if defined(PNG_STATIC)
+# ifdef PNG_BUILD_DLL
+# ifdef PNG_STATIC
# undef PNG_STATIC
# endif
-# if defined(PNG_USE_DLL)
+# ifdef PNG_USE_DLL
# undef PNG_USE_DLL
# endif
-# if !defined(PNG_DLL)
+# ifndef PNG_DLL
# define PNG_DLL
# endif
# else
-# if defined(PNG_STATIC)
-# if defined(PNG_USE_DLL)
+# ifdef PNG_STATIC
+# ifdef PNG_USE_DLL
# undef PNG_USE_DLL
# endif
-# if defined(PNG_DLL)
+# ifdef PNG_DLL
# undef PNG_DLL
# endif
# else
-# if !defined(PNG_USE_DLL)
+# ifndef PNG_USE_DLL
# define PNG_USE_DLL
# endif
-# if !defined(PNG_DLL)
+# ifndef PNG_DLL
# define PNG_DLL
# endif
# endif
@@ -232,22 +267,14 @@
* #define PNG_NO_STDIO
*/
-#if defined(_WIN32_WCE)
-# include <windows.h>
- /* Console I/O functions are not supported on WindowsCE */
-# define PNG_NO_CONSOLE_IO
- /* abort() may not be supported on some/all Windows CE platforms */
-# define PNG_ABORT() exit(-1)
-# ifdef PNG_DEBUG
-# undef PNG_DEBUG
-# endif
+#if !defined(PNG_NO_STDIO) && !defined(PNG_STDIO_SUPPORTED)
+# define PNG_STDIO_SUPPORTED
#endif
+
#ifdef PNG_BUILD_DLL
-# ifndef PNG_CONSOLE_IO_SUPPORTED
-# ifndef PNG_NO_CONSOLE_IO
-# define PNG_NO_CONSOLE_IO
-# endif
+# if !defined(PNG_CONSOLE_IO_SUPPORTED) && !defined(PNG_NO_CONSOLE_IO)
+# define PNG_NO_CONSOLE_IO
# endif
#endif
@@ -261,12 +288,13 @@
# endif
# endif
# else
-# if !defined(_WIN32_WCE)
-/* "stdio.h" functions are not supported on WindowsCE */
-# include <stdio.h>
-# endif
+# include <stdio.h>
# endif
+#if !(defined PNG_NO_CONSOLE_IO) && !defined(PNG_CONSOLE_IO_SUPPORTED)
+# define PNG_CONSOLE_IO_SUPPORTED
+#endif
+
/* This macro protects us against machines that don't have function
* prototypes (ie K&R style headers). If your compiler does not handle
* function prototypes, define this macro and use the included ansi2knr.
@@ -282,14 +310,10 @@
#ifdef _NO_PROTO
# define PNGARG(arglist) ()
-# ifndef PNG_TYPECAST_NULL
-# define PNG_TYPECAST_NULL
-# endif
#else
# define PNGARG(arglist) arglist
#endif /* _NO_PROTO */
-
#endif /* OF */
#endif /* PNGARG */
@@ -305,12 +329,14 @@
# endif
#endif
-/* enough people need this for various reasons to include it here */
+/* Enough people need this for various reasons to include it here */
#if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE)
# include <sys/types.h>
#endif
-#if !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED)
+/* PNG_SETJMP_NOT_SUPPORTED and PNG_NO_SETJMP_SUPPORTED are deprecated. */
+#if !defined(PNG_NO_SETJMP) && \
+ !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED)
# define PNG_SETJMP_SUPPORTED
#endif
@@ -341,14 +367,15 @@
# endif /* __linux__ */
# endif /* PNG_SKIP_SETJMP_CHECK */
- /* include setjmp.h for error handling */
+ /* Include setjmp.h for error handling */
# include <setjmp.h>
# ifdef __linux__
# ifdef PNG_SAVE_BSD_SOURCE
-# ifndef _BSD_SOURCE
-# define _BSD_SOURCE
+# ifdef _BSD_SOURCE
+# undef _BSD_SOURCE
# endif
+# define _BSD_SOURCE
# undef PNG_SAVE_BSD_SOURCE
# endif
# endif /* __linux__ */
@@ -361,59 +388,6 @@
#endif
/* Other defines for things like memory and the like can go here. */
-#ifdef PNG_INTERNAL
-
-#include <stdlib.h>
-
-/* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which
- * aren't usually used outside the library (as far as I know), so it is
- * debatable if they should be exported at all. In the future, when it is
- * possible to have run-time registry of chunk-handling functions, some of
- * these will be made available again.
-#define PNG_EXTERN extern
- */
-#define PNG_EXTERN
-
-/* Other defines specific to compilers can go here. Try to keep
- * them inside an appropriate ifdef/endif pair for portability.
- */
-
-#if defined(PNG_FLOATING_POINT_SUPPORTED)
-# if defined(MACOS)
- /* We need to check that <math.h> hasn't already been included earlier
- * as it seems it doesn't agree with <fp.h>, yet we should really use
- * <fp.h> if possible.
- */
-# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
-# include <fp.h>
-# endif
-# else
-# include <math.h>
-# endif
-# if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
- /* Amiga SAS/C: We must include builtin FPU functions when compiling using
- * MATH=68881
- */
-# include <m68881.h>
-# endif
-#endif
-
-/* Codewarrior on NT has linking problems without this. */
-#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)
-# define PNG_ALWAYS_EXTERN
-#endif
-
-/* This provides the non-ANSI (far) memory allocation routines. */
-#if defined(__TURBOC__) && defined(__MSDOS__)
-# include <mem.h>
-# include <alloc.h>
-#endif
-
-/* I have no idea why is this necessary... */
-#if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \
- defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__))
-# include <malloc.h>
-#endif
/* This controls how fine the dithering gets. As this allocates
* a largish chunk of memory (32K), those who are not as concerned
@@ -447,17 +421,17 @@
# define PNG_GAMMA_THRESHOLD 0.05
#endif
-#endif /* PNG_INTERNAL */
-
/* The following uses const char * instead of char * for error
* and warning message functions, so some compilers won't complain.
* If you do not want to use const, define PNG_NO_CONST here.
*/
-#ifndef PNG_NO_CONST
-# define PNG_CONST const
-#else
-# define PNG_CONST
+#ifndef PNG_CONST
+# ifndef PNG_NO_CONST
+# define PNG_CONST const
+# else
+# define PNG_CONST
+# endif
#endif
/* The following defines give you the ability to remove code from the
@@ -477,85 +451,25 @@
/* Any features you will not be using can be undef'ed here */
/* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user
- * to turn it off with "*TRANSFORMS_NOT_SUPPORTED" or *PNG_NO_*_TRANSFORMS
- * on the compile line, then pick and choose which ones to define without
- * having to edit this file. It is safe to use the *TRANSFORMS_NOT_SUPPORTED
+ * to turn it off with PNG_NO_READ|WRITE_TRANSFORMS on the compile line,
+ * then pick and choose which ones to define without having to edit this
+ * file. It is safe to use the PNG_NO_READ|WRITE_TRANSFORMS
* if you only want to have a png-compliant reader/writer but don't need
* any of the extra transformations. This saves about 80 kbytes in a
* typical installation of the library. (PNG_NO_* form added in version
- * 1.0.1c, for consistency)
- */
-
-/* The size of the png_text structure changed in libpng-1.0.6 when
- * iTXt support was added. iTXt support was turned off by default through
- * libpng-1.2.x, to support old apps that malloc the png_text structure
- * instead of calling png_set_text() and letting libpng malloc it. It
- * will be turned on by default in libpng-1.4.0.
+ * 1.0.1c, for consistency; PNG_*_TRANSFORMS_NOT_SUPPORTED deprecated in
+ * 1.4.0)
*/
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-# ifndef PNG_NO_iTXt_SUPPORTED
-# define PNG_NO_iTXt_SUPPORTED
-# endif
-# ifndef PNG_NO_READ_iTXt
-# define PNG_NO_READ_iTXt
-# endif
-# ifndef PNG_NO_WRITE_iTXt
-# define PNG_NO_WRITE_iTXt
-# endif
-#endif
-
-#if !defined(PNG_NO_iTXt_SUPPORTED)
-# if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)
-# define PNG_READ_iTXt
-# endif
-# if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)
-# define PNG_WRITE_iTXt
-# endif
-#endif
-
-/* The following support, added after version 1.0.0, can be turned off here en
- * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility
- * with old applications that require the length of png_struct and png_info
- * to remain unchanged.
- */
-
-#ifdef PNG_LEGACY_SUPPORTED
-# define PNG_NO_FREE_ME
-# define PNG_NO_READ_UNKNOWN_CHUNKS
-# define PNG_NO_WRITE_UNKNOWN_CHUNKS
-# define PNG_NO_HANDLE_AS_UNKNOWN
-# define PNG_NO_READ_USER_CHUNKS
-# define PNG_NO_READ_iCCP
-# define PNG_NO_WRITE_iCCP
-# define PNG_NO_READ_iTXt
-# define PNG_NO_WRITE_iTXt
-# define PNG_NO_READ_sCAL
-# define PNG_NO_WRITE_sCAL
-# define PNG_NO_READ_sPLT
-# define PNG_NO_WRITE_sPLT
-# define PNG_NO_INFO_IMAGE
-# define PNG_NO_READ_RGB_TO_GRAY
-# define PNG_NO_READ_USER_TRANSFORM
-# define PNG_NO_WRITE_USER_TRANSFORM
-# define PNG_NO_USER_MEM
-# define PNG_NO_READ_EMPTY_PLTE
-# define PNG_NO_MNG_FEATURES
-# define PNG_NO_FIXED_POINT_SUPPORTED
-#endif
-
/* Ignore attempt to turn off both floating and fixed point support */
#if !defined(PNG_FLOATING_POINT_SUPPORTED) || \
!defined(PNG_NO_FIXED_POINT_SUPPORTED)
# define PNG_FIXED_POINT_SUPPORTED
#endif
-#ifndef PNG_NO_FREE_ME
-# define PNG_FREE_ME_SUPPORTED
-#endif
-
#ifdef PNG_READ_SUPPORTED
+/* PNG_READ_TRANSFORMS_NOT_SUPPORTED is deprecated. */
#if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \
!defined(PNG_NO_READ_TRANSFORMS)
# define PNG_READ_TRANSFORMS_SUPPORTED
@@ -583,9 +497,11 @@
# ifndef PNG_NO_READ_INVERT
# define PNG_READ_INVERT_SUPPORTED
# endif
+#if 0 /* removed from libpng-1.4.0 */
# ifndef PNG_NO_READ_DITHER
# define PNG_READ_DITHER_SUPPORTED
# endif
+#endif /* 0 */
# ifndef PNG_NO_READ_BACKGROUND
# define PNG_READ_BACKGROUND_SUPPORTED
# endif
@@ -618,33 +534,41 @@
# endif
#endif /* PNG_READ_TRANSFORMS_SUPPORTED */
+/* PNG_PROGRESSIVE_READ_NOT_SUPPORTED is deprecated. */
#if !defined(PNG_NO_PROGRESSIVE_READ) && \
- !defined(PNG_PROGRESSIVE_READ_SUPPORTED) /* if you don't do progressive */
-# define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */
-#endif /* about interlacing capability! You'll */
- /* still have interlacing unless you change the following line: */
+ !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED) /* if you don't do progressive */
+# define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */
+#endif /* about interlacing capability! You'll */
+ /* still have interlacing unless you change the following define: */
+
+#define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */
-#define PNG_READ_INTERLACING_SUPPORTED /* required in PNG-compliant decoders */
+/* PNG_NO_SEQUENTIAL_READ_SUPPORTED is deprecated. */
+#if !defined(PNG_NO_SEQUENTIAL_READ) && \
+ !defined(PNG_SEQUENTIAL_READ_SUPPORTED) && \
+ !defined(PNG_NO_SEQUENTIAL_READ_SUPPORTED)
+# define PNG_SEQUENTIAL_READ_SUPPORTED
+#endif
#ifndef PNG_NO_READ_COMPOSITE_NODIV
# ifndef PNG_NO_READ_COMPOSITED_NODIV /* libpng-1.0.x misspelling */
-# define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */
+# define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */
# endif
#endif
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-/* Deprecated, will be removed from version 2.0.0.
- Use PNG_MNG_FEATURES_SUPPORTED instead. */
-#ifndef PNG_NO_READ_EMPTY_PLTE
-# define PNG_READ_EMPTY_PLTE_SUPPORTED
-#endif
+#if !defined(PNG_NO_GET_INT_32) || defined(PNG_READ_oFFS_SUPPORTED) || \
+ defined(PNG_READ_pCAL_SUPPORTED)
+# ifndef PNG_GET_INT_32_SUPPORTED
+# define PNG_GET_INT_32_SUPPORTED
+# endif
#endif
#endif /* PNG_READ_SUPPORTED */
#ifdef PNG_WRITE_SUPPORTED
-# if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \
+/* PNG_WRITE_TRANSFORMS_NOT_SUPPORTED is deprecated. */
+#if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \
!defined(PNG_NO_WRITE_TRANSFORMS)
# define PNG_WRITE_TRANSFORMS_SUPPORTED
#endif
@@ -684,9 +608,10 @@
#if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \
!defined(PNG_WRITE_INTERLACING_SUPPORTED)
-#define PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant
- encoders, but can cause trouble
- if left undefined */
+ /* This is not required for PNG-compliant encoders, but can cause
+ * trouble if left undefined
+ */
+# define PNG_WRITE_INTERLACING_SUPPORTED
#endif
#if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \
@@ -699,20 +624,16 @@
# define PNG_WRITE_FLUSH_SUPPORTED
#endif
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-/* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */
-#ifndef PNG_NO_WRITE_EMPTY_PLTE
-# define PNG_WRITE_EMPTY_PLTE_SUPPORTED
-#endif
+#if !defined(PNG_NO_SAVE_INT_32) || defined(PNG_WRITE_oFFS_SUPPORTED) || \
+ defined(PNG_WRITE_pCAL_SUPPORTED)
+# ifndef PNG_SAVE_INT_32_SUPPORTED
+# define PNG_SAVE_INT_32_SUPPORTED
+# endif
#endif
#endif /* PNG_WRITE_SUPPORTED */
-#ifndef PNG_1_0_X
-# ifndef PNG_NO_ERROR_NUMBERS
-# define PNG_ERROR_NUMBERS_SUPPORTED
-# endif
-#endif /* PNG_1_0_X */
+#define PNG_NO_ERROR_NUMBERS
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
@@ -721,7 +642,7 @@
# endif
#endif
-#ifndef PNG_NO_STDIO
+#if defined(PNG_STDIO_SUPPORTED) && !defined(PNG_TIME_RFC1123_SUPPORTED)
# define PNG_TIME_RFC1123_SUPPORTED
#endif
@@ -745,64 +666,19 @@
# define PNG_EASY_ACCESS_SUPPORTED
#endif
-/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0
- * and removed from version 1.2.20. The following will be removed
- * from libpng-1.4.0
-*/
-
-#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_OPTIMIZED_CODE)
-# ifndef PNG_OPTIMIZED_CODE_SUPPORTED
-# define PNG_OPTIMIZED_CODE_SUPPORTED
-# endif
-#endif
-
-#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
-# ifndef PNG_ASSEMBLER_CODE_SUPPORTED
-# define PNG_ASSEMBLER_CODE_SUPPORTED
-# endif
-
-# if defined(__GNUC__) && defined(__x86_64__) && (__GNUC__ < 4)
- /* work around 64-bit gcc compiler bugs in gcc-3.x */
-# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
-# define PNG_NO_MMX_CODE
-# endif
-# endif
-
-# if defined(__APPLE__)
-# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
-# define PNG_NO_MMX_CODE
-# endif
-# endif
-
-# if (defined(__MWERKS__) && ((__MWERKS__ < 0x0900) || macintosh))
-# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
-# define PNG_NO_MMX_CODE
-# endif
-# endif
-
-# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
-# define PNG_MMX_CODE_SUPPORTED
-# endif
-
-#endif
-/* end of obsolete code to be removed from libpng-1.4.0 */
-
-#if !defined(PNG_1_0_X)
+/* Added at libpng-1.2.0 */
#if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
# define PNG_USER_MEM_SUPPORTED
#endif
-#endif /* PNG_1_0_X */
/* Added at libpng-1.2.6 */
-#if !defined(PNG_1_0_X)
#ifndef PNG_SET_USER_LIMITS_SUPPORTED
-#if !defined(PNG_NO_SET_USER_LIMITS) && !defined(PNG_SET_USER_LIMITS_SUPPORTED)
-# define PNG_SET_USER_LIMITS_SUPPORTED
-#endif
+# ifndef PNG_NO_SET_USER_LIMITS
+# define PNG_SET_USER_LIMITS_SUPPORTED
+# endif
#endif
-#endif /* PNG_1_0_X */
-/* Added at libpng-1.0.16 and 1.2.6. To accept all valid PNGS no matter
+/* Added at libpng-1.0.16 and 1.2.6. To accept all valid PNGs no matter
* how large, set these limits to 0x7fffffffL
*/
#ifndef PNG_USER_WIDTH_MAX
@@ -812,14 +688,32 @@
# define PNG_USER_HEIGHT_MAX 1000000L
#endif
-/* Added at libpng-1.2.34 and 1.4.0 */
+/* Added at libpng-1.4.0 */
+#ifndef PNG_USER_CHUNK_CACHE_MAX
+# define PNG_USER_CHUNK_CACHE_MAX 0x7fffffffL
+#endif
+
+/* Added at libpng-1.4.0 */
+#if !defined(PNG_NO_IO_STATE) && !defined(PNG_IO_STATE_SUPPORTED)
+# define PNG_IO_STATE_SUPPORTED
+#endif
+
+#ifndef PNG_LITERAL_SHARP
+# define PNG_LITERAL_SHARP 0x23
+#endif
+#ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET
+# define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b
+#endif
+#ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET
+# define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d
+#endif
#ifndef PNG_STRING_NEWLINE
#define PNG_STRING_NEWLINE "\n"
#endif
/* These are currently experimental features, define them if you want */
-/* very little testing */
+/* Very little testing */
/*
#ifdef PNG_READ_SUPPORTED
# ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
@@ -836,16 +730,17 @@
#endif
*/
-/* Buggy compilers (e.g., gcc 2.7.2.2) need this */
-/*
-#define PNG_NO_POINTER_INDEXING
-*/
+#if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS)
+# define PNG_USE_READ_MACROS
+#endif
+
+/* Buggy compilers (e.g., gcc 2.7.2.2) need PNG_NO_POINTER_INDEXING */
+
+#if !defined(PNG_NO_POINTER_INDEXING) && \
+ !defined(PNG_POINTER_INDEXING_SUPPORTED)
+# define PNG_POINTER_INDEXING_SUPPORTED
+#endif
-/* These functions are turned off by default, as they will be phased out. */
-/*
-#define PNG_USELESS_TESTS_SUPPORTED
-#define PNG_CORRECT_PALETTE_SUPPORTED
-*/
/* Any chunks you are not interested in, you can undef here. The
* ones that allocate memory may be expecially important (hIST,
@@ -853,12 +748,21 @@
* a bit smaller.
*/
+/* The size of the png_text structure changed in libpng-1.0.6 when
+ * iTXt support was added. iTXt support was turned off by default through
+ * libpng-1.2.x, to support old apps that malloc the png_text structure
+ * instead of calling png_set_text() and letting libpng malloc it. It
+ * was turned on by default in libpng-1.4.0.
+ */
+
+/* PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED is deprecated. */
#if defined(PNG_READ_SUPPORTED) && \
!defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
!defined(PNG_NO_READ_ANCILLARY_CHUNKS)
# define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
#endif
+/* PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED is deprecated. */
#if defined(PNG_WRITE_SUPPORTED) && \
!defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
!defined(PNG_NO_WRITE_ANCILLARY_CHUNKS)
@@ -872,6 +776,7 @@
# define PNG_NO_READ_tEXt
# define PNG_NO_READ_zTXt
#endif
+
#ifndef PNG_NO_READ_bKGD
# define PNG_READ_bKGD_SUPPORTED
# define PNG_bKGD_SUPPORTED
@@ -972,7 +877,6 @@
# undef PNG_NO_HANDLE_AS_UNKNOWN
# endif
#endif
-
#ifndef PNG_NO_HANDLE_AS_UNKNOWN
# ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
# define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
@@ -1099,15 +1003,29 @@
# endif
#endif
+#ifdef PNG_WRITE_tIME_SUPPORTED
+# ifndef PNG_NO_CONVERT_tIME
+# ifndef _WIN32_WCE
+/* The "tm" structure is not supported on WindowsCE */
+# ifndef PNG_CONVERT_tIME_SUPPORTED
+# define PNG_CONVERT_tIME_SUPPORTED
+# endif
+# endif
+# endif
+#endif
+
#endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */
+#if !defined(PNG_NO_WRITE_FILTER) && !defined(PNG_WRITE_FILTER_SUPPORTED)
+# define PNG_WRITE_FILTER_SUPPORTED
+#endif
+
#ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS
# define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
# ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
# define PNG_UNKNOWN_CHUNKS_SUPPORTED
# endif
#endif
-
#ifndef PNG_NO_HANDLE_AS_UNKNOWN
# ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
# define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
@@ -1123,12 +1041,10 @@
# define PNG_INFO_IMAGE_SUPPORTED
#endif
-/* need the time information for reading tIME chunks */
-#if defined(PNG_tIME_SUPPORTED)
-# if !defined(_WIN32_WCE)
+/* Need the time information for converting tIME chunks */
+#ifdef PNG_CONVERT_tIME_SUPPORTED
/* "time.h" functions are not supported on WindowsCE */
# include <time.h>
-# endif
#endif
/* Some typedefs to get us started. These should be safe on most of the
@@ -1136,28 +1052,29 @@
* numbers suggest (a png_uint_32 must be at least 32 bits long), but they
* don't have to be exactly that size. Some compilers dislike passing
* unsigned shorts as function parameters, so you may be better off using
- * unsigned int for png_uint_16. Likewise, for 64-bit systems, you may
- * want to have unsigned int for png_uint_32 instead of unsigned long.
+ * unsigned int for png_uint_16.
*/
+#if defined(INT_MAX) && (INT_MAX > 0x7ffffffeL)
+typedef unsigned int png_uint_32;
+typedef int png_int_32;
+#else
typedef unsigned long png_uint_32;
typedef long png_int_32;
+#endif
typedef unsigned short png_uint_16;
typedef short png_int_16;
typedef unsigned char png_byte;
-/* This is usually size_t. It is typedef'ed just in case you need it to
- change (I'm not sure if you will or not, so I thought I'd be safe) */
-#ifdef PNG_SIZE_T
- typedef PNG_SIZE_T png_size_t;
-# define png_sizeof(x) png_convert_size(sizeof(x))
+#ifdef PNG_NO_SIZE_T
+ typedef unsigned int png_size_t;
#else
typedef size_t png_size_t;
-# define png_sizeof(x) sizeof(x)
#endif
+#define png_sizeof(x) sizeof(x)
/* The following is needed for medium model support. It cannot be in the
- * PNG_INTERNAL section. Needs modification for other compilers besides
+ * pngpriv.h header. Needs modification for other compilers besides
* MSC. Model independent support declares all arrays and pointers to be
* large using the far keyword. The zlib version used must also support
* model independent data. As of version zlib 1.0.4, the necessary changes
@@ -1166,7 +1083,8 @@ typedef unsigned char png_byte;
*/
/* Separate compiler dependencies (problem here is that zlib.h always
- defines FAR. (SJT) */
+ * defines FAR. (SJT)
+ */
#ifdef __BORLANDC__
# if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
# define LDATA 1
@@ -1197,8 +1115,8 @@ typedef unsigned char png_byte;
*/
/* MSC Medium model */
-#if defined(FAR)
-# if defined(M_I86MM)
+#ifdef FAR
+# ifdef M_I86MM
# define USE_FAR_KEYWORD
# define FARDATA FAR
# include <dos.h>
@@ -1231,12 +1149,8 @@ typedef char FAR * png_charp;
typedef png_fixed_point FAR * png_fixed_point_p;
#ifndef PNG_NO_STDIO
-#if defined(_WIN32_WCE)
-typedef HANDLE png_FILE_p;
-#else
typedef FILE * png_FILE_p;
#endif
-#endif
#ifdef PNG_FLOATING_POINT_SUPPORTED
typedef double FAR * png_doublep;
@@ -1258,20 +1172,7 @@ typedef double FAR * FAR * png_doublepp;
/* Pointers to pointers to pointers; i.e., pointer to array */
typedef char FAR * FAR * FAR * png_charppp;
-#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
-/* SPC - Is this stuff deprecated? */
-/* It'll be removed as of libpng-1.4.0 - GR-P */
-/* libpng typedefs for types in zlib. If zlib changes
- * or another compression library is used, then change these.
- * Eliminates need to change all the source files.
- */
-typedef charf * png_zcharp;
-typedef charf * FAR * png_zcharpp;
-typedef z_stream FAR * png_zstreamp;
-#endif /* (PNG_1_0_X) || defined(PNG_1_2_X) */
-
-/*
- * Define PNG_BUILD_DLL if the module being built is a Windows
+/* Define PNG_BUILD_DLL if the module being built is a Windows
* LIBPNG DLL.
*
* Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL.
@@ -1291,50 +1192,16 @@ typedef z_stream FAR * png_zstreamp;
#if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))
# define PNG_DLL
#endif
-/* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib.
- * When building a static lib, default to no GLOBAL ARRAYS, but allow
- * command-line override
- */
-#if defined(__CYGWIN__)
-# if !defined(PNG_STATIC)
-# if defined(PNG_USE_GLOBAL_ARRAYS)
-# undef PNG_USE_GLOBAL_ARRAYS
-# endif
-# if !defined(PNG_USE_LOCAL_ARRAYS)
-# define PNG_USE_LOCAL_ARRAYS
-# endif
-# else
-# if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS)
-# if defined(PNG_USE_GLOBAL_ARRAYS)
-# undef PNG_USE_GLOBAL_ARRAYS
-# endif
-# endif
-# endif
-# if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
-# define PNG_USE_LOCAL_ARRAYS
-# endif
-#endif
-
-/* Do not use global arrays (helps with building DLL's)
- * They are no longer used in libpng itself, since version 1.0.5c,
- * but might be required for some pre-1.0.5c applications.
- */
-#if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
-# if defined(PNG_NO_GLOBAL_ARRAYS) || \
- (defined(__GNUC__) && defined(PNG_DLL)) || defined(_MSC_VER)
-# define PNG_USE_LOCAL_ARRAYS
-# else
-# define PNG_USE_GLOBAL_ARRAYS
-# endif
-#endif
-#if defined(__CYGWIN__)
+#ifdef __CYGWIN__
# undef PNGAPI
# define PNGAPI __cdecl
# undef PNG_IMPEXP
# define PNG_IMPEXP
#endif
+#define PNG_USE_LOCAL_ARRAYS /* Not used in libpng, defined for legacy apps */
+
/* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall",
* you may get warnings regarding the linkage of png_zalloc and png_zfree.
* Don't ignore those warnings; you must also reset the default calling
@@ -1371,43 +1238,42 @@ typedef z_stream FAR * png_zstreamp;
# define PNG_IMPEXP
# endif
-# if !defined(PNG_IMPEXP)
-
-# define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol
-# define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol
-
- /* Borland/Microsoft */
-# if defined(_MSC_VER) || defined(__BORLANDC__)
-# if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500)
-# define PNG_EXPORT PNG_EXPORT_TYPE1
-# else
-# define PNG_EXPORT PNG_EXPORT_TYPE2
-# if defined(PNG_BUILD_DLL)
-# define PNG_IMPEXP __export
-# else
-# define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in
- VC++ */
-# endif /* Exists in Borland C++ for
- C++ classes (== huge) */
-# endif
-# endif
+# ifndef PNG_IMPEXP
-# if !defined(PNG_IMPEXP)
-# if defined(PNG_BUILD_DLL)
-# define PNG_IMPEXP __declspec(dllexport)
-# else
-# define PNG_IMPEXP __declspec(dllimport)
-# endif
-# endif
+# define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol
+# define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol
+
+ /* Borland/Microsoft */
+# if defined(_MSC_VER) || defined(__BORLANDC__)
+# if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500)
+# define PNG_EXPORT PNG_EXPORT_TYPE1
+# else
+# define PNG_EXPORT PNG_EXPORT_TYPE2
+# ifdef PNG_BUILD_DLL
+# define PNG_IMPEXP __export
+# else
+# define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in VC++ */
+# endif /* Exists in Borland C++ for
+ C++ classes (== huge) */
+# endif
+# endif
+
+# ifndef PNG_IMPEXP
+# ifdef PNG_BUILD_DLL
+# define PNG_IMPEXP __declspec(dllexport)
+# else
+# define PNG_IMPEXP __declspec(dllimport)
+# endif
+# endif
# endif /* PNG_IMPEXP */
#else /* !(DLL || non-cygwin WINDOWS) */
# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
-# ifndef PNGAPI
-# define PNGAPI _System
-# endif
+# ifndef PNGAPI
+# define PNGAPI _System
+# endif
# else
-# if 0 /* ... other platforms, with other meanings */
-# endif
+# if 0 /* ... other platforms, with other meanings */
+# endif
# endif
# if !defined(PNG_IMPEXP)
@@ -1430,79 +1296,186 @@ typedef z_stream FAR * png_zstreamp;
# ifndef PNG_EXPORT
# define PNG_EXPORT(type,symbol) PNG_FUNCTION_EXPORT symbol END
# endif
-# ifdef PNG_USE_GLOBAL_ARRAYS
-# ifndef PNG_EXPORT_VAR
-# define PNG_EXPORT_VAR(type) PNG_DATA_EXPORT
-# endif
-# endif
#endif
#ifndef PNG_EXPORT
# define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol
#endif
-#ifdef PNG_USE_GLOBAL_ARRAYS
-# ifndef PNG_EXPORT_VAR
-# define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
+/* Support for compiler specific function attributes. These are used
+ * so that where compiler support is available incorrect use of API
+ * functions in png.h will generate compiler warnings.
+ *
+ * Added at libpng-1.2.41.
+ */
+
+#ifndef PNG_NO_PEDANTIC_WARNINGS
+# ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED
+# define PNG_PEDANTIC_WARNINGS_SUPPORTED
# endif
#endif
-/* User may want to use these so they are not in PNG_INTERNAL. Any library
- * functions that are passed far data must be model independent.
+#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED
+/* Support for compiler specific function attributes. These are used
+ * so that where compiler support is available incorrect use of API
+ * functions in png.h will generate compiler warnings. Added at libpng
+ * version 1.2.41.
*/
+# ifdef __GNUC__
+# ifndef PNG_USE_RESULT
+# define PNG_USE_RESULT __attribute__((__warn_unused_result__))
+# endif
+# ifndef PNG_NORETURN
+# define PNG_NORETURN __attribute__((__noreturn__))
+# endif
+# ifndef PNG_ALLOCATED
+# define PNG_ALLOCATED __attribute__((__malloc__))
+# endif
-#ifndef PNG_ABORT
-# define PNG_ABORT() abort()
+ /* This specifically protects structure members that should only be
+ * accessed from within the library, therefore should be empty during
+ * a library build.
+ */
+# ifndef PNG_DEPRECATED
+# define PNG_DEPRECATED __attribute__((__deprecated__))
+# endif
+# ifndef PNG_DEPSTRUCT
+# define PNG_DEPSTRUCT __attribute__((__deprecated__))
+# endif
+# ifndef PNG_PRIVATE
+# if 0 /* Doesn't work so we use deprecated instead*/
+# define PNG_PRIVATE \
+ __attribute__((warning("This function is not exported by libpng.")))
+# else
+# define PNG_PRIVATE \
+ __attribute__((__deprecated__))
+# endif
+# endif /* PNG_PRIVATE */
+# endif /* __GNUC__ */
+#endif /* PNG_PEDANTIC_WARNINGS */
+
+#ifndef PNG_DEPRECATED
+# define PNG_DEPRECATED /* Use of this function is deprecated */
+#endif
+#ifndef PNG_USE_RESULT
+# define PNG_USE_RESULT /* The result of this function must be checked */
+#endif
+#ifndef PNG_NORETURN
+# define PNG_NORETURN /* This function does not return */
+#endif
+#ifndef PNG_ALLOCATED
+# define PNG_ALLOCATED /* The result of the function is new memory */
+#endif
+#ifndef PNG_DEPSTRUCT
+# define PNG_DEPSTRUCT /* Access to this struct member is deprecated */
+#endif
+#ifndef PNG_PRIVATE
+# define PNG_PRIVATE /* This is a private libpng function */
#endif
-#ifdef PNG_SETJMP_SUPPORTED
-# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
-#else
-# define png_jmpbuf(png_ptr) \
- (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED)
+/* Users may want to use these so they are not private. Any library
+ * functions that are passed far data must be model-independent.
+ */
+
+/* memory model/platform independent fns */
+#ifndef PNG_ABORT
+# if defined(_WINDOWS_) || defined(_WIN32_WCE)
+# define PNG_ABORT() ExitProcess(0)
+# else
+# define PNG_ABORT() abort()
+# endif
#endif
-#if defined(USE_FAR_KEYWORD) /* memory model independent fns */
-/* use this to make far-to-near assignments */
+#ifdef USE_FAR_KEYWORD
+/* Use this to make far-to-near assignments */
# define CHECK 1
# define NOCHECK 0
# define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
# define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
-# define png_snprintf _fsnprintf /* Added to v 1.2.19 */
+# define png_strcpy _fstrcpy
+# define png_strncpy _fstrncpy /* Added to v 1.2.6 */
# define png_strlen _fstrlen
# define png_memcmp _fmemcmp /* SJT: added */
# define png_memcpy _fmemcpy
# define png_memset _fmemset
-#else /* use the usual functions */
-# define CVT_PTR(ptr) (ptr)
-# define CVT_PTR_NOCHECK(ptr) (ptr)
-# ifndef PNG_NO_SNPRINTF
-# ifdef _MSC_VER
-# define png_snprintf _snprintf /* Added to v 1.2.19 */
-# define png_snprintf2 _snprintf
-# define png_snprintf6 _snprintf
+# define png_sprintf sprintf
+#else
+# ifdef _WINDOWS_ /* Favor Windows over C runtime fns */
+# define CVT_PTR(ptr) (ptr)
+# define CVT_PTR_NOCHECK(ptr) (ptr)
+# define png_strcpy lstrcpyA
+# define png_strncpy lstrcpynA
+# define png_strlen lstrlenA
+# define png_memcmp memcmp
+# define png_memcpy CopyMemory
+# define png_memset memset
+# define png_sprintf wsprintfA
+# else
+# define CVT_PTR(ptr) (ptr)
+# define CVT_PTR_NOCHECK(ptr) (ptr)
+# define png_strcpy strcpy
+# define png_strncpy strncpy /* Added to v 1.2.6 */
+# define png_strlen strlen
+# define png_memcmp memcmp /* SJT: added */
+# define png_memcpy memcpy
+# define png_memset memset
+# define png_sprintf sprintf
+# ifndef PNG_NO_SNPRINTF
+# ifdef _MSC_VER
+# define png_snprintf _snprintf /* Added to v 1.2.19 */
+# define png_snprintf2 _snprintf
+# define png_snprintf6 _snprintf
+# else
+# define png_snprintf snprintf /* Added to v 1.2.19 */
+# define png_snprintf2 snprintf
+# define png_snprintf6 snprintf
+# endif
# else
-# define png_snprintf snprintf /* Added to v 1.2.19 */
-# define png_snprintf2 snprintf
-# define png_snprintf6 snprintf
+ /* You don't have or don't want to use snprintf(). Caution: Using
+ * sprintf instead of snprintf exposes your application to accidental
+ * or malevolent buffer overflows. If you don't have snprintf()
+ * as a general rule you should provide one (you can get one from
+ * Portable OpenSSH).
+ */
+# define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1)
+# define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2)
+# define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \
+ sprintf(s1,fmt,x1,x2,x3,x4,x5,x6)
# endif
+# endif
+#endif
+
+/* png_alloc_size_t is guaranteed to be no smaller than png_size_t,
+ * and no smaller than png_uint_32. Casts from png_size_t or png_uint_32
+ * to png_alloc_size_t are not necessary; in fact, it is recommended
+ * not to use them at all so that the compiler can complain when something
+ * turns out to be problematic.
+ * Casts in the other direction (from png_alloc_size_t to png_size_t or
+ * png_uint_32) should be explicitly applied; however, we do not expect
+ * to encounter practical situations that require such conversions.
+ */
+#if defined(__TURBOC__) && !defined(__FLAT__)
+# define png_mem_alloc farmalloc
+# define png_mem_free farfree
+ typedef unsigned long png_alloc_size_t;
+#else
+# if defined(_MSC_VER) && defined(MAXSEG_64K)
+# define png_mem_alloc(s) halloc(s, 1)
+# define png_mem_free hfree
+ typedef unsigned long png_alloc_size_t;
# else
- /* You don't have or don't want to use snprintf(). Caution: Using
- * sprintf instead of snprintf exposes your application to accidental
- * or malevolent buffer overflows. If you don't have snprintf()
- * as a general rule you should provide one (you can get one from
- * Portable OpenSSH). */
-# define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1)
-# define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2)
-# define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \
- sprintf(s1,fmt,x1,x2,x3,x4,x5,x6)
-# endif
-# define png_strlen strlen
-# define png_memcmp memcmp /* SJT: added */
-# define png_memcpy memcpy
-# define png_memset memset
-#endif
-/* End of memory model independent support */
+# if defined(_WINDOWS_) && (!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL)
+# define png_mem_alloc(s) HeapAlloc(GetProcessHeap(), 0, s)
+# define png_mem_free(p) HeapFree(GetProcessHeap(), 0, p)
+ typedef DWORD png_alloc_size_t;
+# else
+# define png_mem_alloc malloc
+# define png_mem_free free
+ typedef png_size_t png_alloc_size_t;
+# endif
+# endif
+#endif
+/* End of memory model/platform independent support */
/* Just a little check that someone hasn't tried to define something
* contradictory.
@@ -1512,6 +1485,7 @@ typedef z_stream FAR * png_zstreamp;
# define PNG_ZBUF_SIZE 65536L
#endif
+
/* Added at libpng-1.2.8 */
#endif /* PNG_VERSION_INFO_ONLY */
diff --git a/src/3rdparty/libpng/pngerror.c b/src/3rdparty/libpng/pngerror.c
index d68416b384..633eae29f9 100644
--- a/src/3rdparty/libpng/pngerror.c
+++ b/src/3rdparty/libpng/pngerror.c
@@ -1,8 +1,8 @@
/* pngerror.c - stub functions for i/o and memory allocation
*
- * Last changed in libpng 1.2.37 [June 4, 2009]
- * Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.0 [January 3, 2010]
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -16,25 +16,26 @@
* at each function.
*/
-#define PNG_INTERNAL
+#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
+#include "pngpriv.h"
static void /* PRIVATE */
png_default_error PNGARG((png_structp png_ptr,
- png_const_charp error_message));
-#ifndef PNG_NO_WARNINGS
+ png_const_charp error_message)) PNG_NORETURN;
+#ifdef PNG_WARNINGS_SUPPORTED
static void /* PRIVATE */
png_default_warning PNGARG((png_structp png_ptr,
png_const_charp warning_message));
-#endif /* PNG_NO_WARNINGS */
+#endif /* PNG_WARNINGS_SUPPORTED */
/* This function is called whenever there is a fatal error. This function
* should not be changed. If there is a need to handle errors differently,
* you should supply a replacement error function and use png_set_error_fn()
* to replace the error function at run-time.
*/
-#ifndef PNG_NO_ERROR_TEXT
+#ifdef PNG_ERROR_TEXT_SUPPORTED
void PNGAPI
png_error(png_structp png_ptr, png_const_charp error_message)
{
@@ -45,7 +46,7 @@ png_error(png_structp png_ptr, png_const_charp error_message)
if (png_ptr->flags&
(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
{
- if (*error_message == '#')
+ if (*error_message == PNG_LITERAL_SHARP)
{
/* Strip "#nnnn " from beginning of error message. */
int offset;
@@ -93,9 +94,9 @@ png_err(png_structp png_ptr)
use the default handler, which will not return. */
png_default_error(png_ptr, '\0');
}
-#endif /* PNG_NO_ERROR_TEXT */
+#endif /* PNG_ERROR_TEXT_SUPPORTED */
-#ifndef PNG_NO_WARNINGS
+#ifdef PNG_WARNINGS_SUPPORTED
/* This function is called whenever there is a non-fatal error. This function
* should not be changed. If there is a need to handle warnings differently,
* you should supply a replacement warning function and use
@@ -112,7 +113,7 @@ png_warning(png_structp png_ptr, png_const_charp warning_message)
(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
#endif
{
- if (*warning_message == '#')
+ if (*warning_message == PNG_LITERAL_SHARP)
{
for (offset = 1; offset < 15; offset++)
if (warning_message[offset] == ' ')
@@ -125,8 +126,18 @@ png_warning(png_structp png_ptr, png_const_charp warning_message)
else
png_default_warning(png_ptr, warning_message + offset);
}
-#endif /* PNG_NO_WARNINGS */
+#endif /* PNG_WARNINGS_SUPPORTED */
+#ifdef PNG_BENIGN_ERRORS_SUPPORTED
+void PNGAPI
+png_benign_error(png_structp png_ptr, png_const_charp error_message)
+{
+ if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN)
+ png_warning(png_ptr, error_message);
+ else
+ png_error(png_ptr, error_message);
+}
+#endif
/* These utilities are used internally to build an error message that relates
* to the current chunk. The chunk name comes from png_ptr->chunk_name,
@@ -141,8 +152,7 @@ static PNG_CONST char png_digit[16] = {
};
#define PNG_MAX_ERROR_TEXT 64
-
-#if !defined(PNG_NO_WARNINGS) || !defined(PNG_NO_ERROR_TEXT)
+#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_ERROR_TEXT_SUPPORTED)
static void /* PRIVATE */
png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
error_message)
@@ -154,10 +164,10 @@ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
int c = png_ptr->chunk_name[iin++];
if (isnonalpha(c))
{
- buffer[iout++] = '[';
+ buffer[iout++] = PNG_LITERAL_LEFT_SQUARE_BRACKET;
buffer[iout++] = png_digit[(c & 0xf0) >> 4];
buffer[iout++] = png_digit[c & 0x0f];
- buffer[iout++] = ']';
+ buffer[iout++] = PNG_LITERAL_RIGHT_SQUARE_BRACKET;
}
else
{
@@ -190,9 +200,9 @@ png_chunk_error(png_structp png_ptr, png_const_charp error_message)
}
}
#endif /* PNG_READ_SUPPORTED */
-#endif /* !defined(PNG_NO_WARNINGS) || !defined(PNG_NO_ERROR_TEXT) */
+#endif /* PNG_WARNINGS_SUPPORTED || PNG_ERROR_TEXT_SUPPORTED */
-#ifndef PNG_NO_WARNINGS
+#ifdef PNG_WARNINGS_SUPPORTED
void PNGAPI
png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
{
@@ -205,8 +215,36 @@ png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
png_warning(png_ptr, msg);
}
}
-#endif /* PNG_NO_WARNINGS */
+#endif /* PNG_WARNINGS_SUPPORTED */
+
+#ifdef PNG_READ_SUPPORTED
+#ifdef PNG_BENIGN_ERRORS_SUPPORTED
+void PNGAPI
+png_chunk_benign_error(png_structp png_ptr, png_const_charp error_message)
+{
+ if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN)
+ png_chunk_warning(png_ptr, error_message);
+ else
+ png_chunk_error(png_ptr, error_message);
+}
+#endif
+#endif /* PNG_READ_SUPPORTED */
+#ifdef PNG_SETJMP_SUPPORTED
+/* This API only exists if ANSI-C style error handling is used,
+ * otherwise it is necessary for png_default_error to be overridden.
+ */
+jmp_buf* PNGAPI
+png_set_longjmp_fn(png_structp png_ptr, png_longjmp_ptr longjmp_fn,
+ size_t jmp_buf_size)
+{
+ if (png_ptr == NULL || jmp_buf_size != png_sizeof(jmp_buf))
+ return NULL;
+
+ png_ptr->longjmp_fn = longjmp_fn;
+ return &png_ptr->jmpbuf;
+}
+#endif
/* This is the default error handling function. Note that replacements for
* this function MUST NOT RETURN, or the program will likely crash. This
@@ -216,9 +254,9 @@ png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
static void /* PRIVATE */
png_default_error(png_structp png_ptr, png_const_charp error_message)
{
-#ifndef PNG_NO_CONSOLE_IO
+#ifdef PNG_CONSOLE_IO_SUPPORTED
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
- if (*error_message == '#')
+ if (*error_message == PNG_LITERAL_SHARP)
{
/* Strip "#nnnn " from beginning of error message. */
int offset;
@@ -252,27 +290,27 @@ png_default_error(png_structp png_ptr, png_const_charp error_message)
#endif
#ifdef PNG_SETJMP_SUPPORTED
- if (png_ptr)
+ if (png_ptr && png_ptr->longjmp_fn)
{
# ifdef USE_FAR_KEYWORD
{
jmp_buf jmpbuf;
png_memcpy(jmpbuf, png_ptr->jmpbuf, png_sizeof(jmp_buf));
- longjmp(jmpbuf, 1);
+ png_ptr->longjmp_fn(jmpbuf, 1);
}
# else
- longjmp(png_ptr->jmpbuf, 1);
+ png_ptr->longjmp_fn(png_ptr->jmpbuf, 1);
# endif
}
-#else
- PNG_ABORT();
#endif
-#ifdef PNG_NO_CONSOLE_IO
+ /* Here if not setjmp support or if png_ptr is null. */
+ PNG_ABORT();
+#ifndef PNG_CONSOLE_IO_SUPPORTED
error_message = error_message; /* Make compiler happy */
#endif
}
-#ifndef PNG_NO_WARNINGS
+#ifdef PNG_WARNINGS_SUPPORTED
/* This function is called when there is a warning, but the library thinks
* it can continue anyway. Replacement functions don't have to do anything
* here if you don't want them to. In the default configuration, png_ptr is
@@ -281,9 +319,9 @@ png_default_error(png_structp png_ptr, png_const_charp error_message)
static void /* PRIVATE */
png_default_warning(png_structp png_ptr, png_const_charp warning_message)
{
-#ifndef PNG_NO_CONSOLE_IO
+#ifdef PNG_CONSOLE_IO_SUPPORTED
# ifdef PNG_ERROR_NUMBERS_SUPPORTED
- if (*warning_message == '#')
+ if (*warning_message == PNG_LITERAL_SHARP)
{
int offset;
char warning_number[16];
@@ -318,7 +356,7 @@ png_default_warning(png_structp png_ptr, png_const_charp warning_message)
#endif
png_ptr = png_ptr; /* Make compiler happy */
}
-#endif /* PNG_NO_WARNINGS */
+#endif /* PNG_WARNINGS_SUPPORTED */
/* This function is called when the application wants to use another method
* of handling errors and warnings. Note that the error function MUST NOT
diff --git a/src/3rdparty/libpng/pnggccrd.c b/src/3rdparty/libpng/pnggccrd.c
deleted file mode 100644
index e61523e77a..0000000000
--- a/src/3rdparty/libpng/pnggccrd.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* pnggccrd.c was removed from libpng-1.2.20. */
-
-/* This code snippet is for use by configure's compilation test. */
-
-#if (!defined _MSC_VER) && \
- defined(PNG_ASSEMBLER_CODE_SUPPORTED) && \
- defined(PNG_MMX_CODE_SUPPORTED)
-
-int PNGAPI png_dummy_mmx_support(void);
-
-static int _mmx_supported = 2; // 0: no MMX; 1: MMX supported; 2: not tested
-
-int PNGAPI
-png_dummy_mmx_support(void) __attribute__((noinline));
-
-int PNGAPI
-png_dummy_mmx_support(void)
-{
- int result;
-#if defined(PNG_MMX_CODE_SUPPORTED) // superfluous, but what the heck
- __asm__ __volatile__ (
-#if defined(__x86_64__)
- "pushq %%rbx \n\t" // rbx gets clobbered by CPUID instruction
- "pushq %%rcx \n\t" // so does rcx...
- "pushq %%rdx \n\t" // ...and rdx (but rcx & rdx safe on Linux)
- "pushfq \n\t" // save Eflag to stack
- "popq %%rax \n\t" // get Eflag from stack into rax
- "movq %%rax, %%rcx \n\t" // make another copy of Eflag in rcx
- "xorl $0x200000, %%eax \n\t" // toggle ID bit in Eflag (i.e., bit 21)
- "pushq %%rax \n\t" // save modified Eflag back to stack
- "popfq \n\t" // restore modified value to Eflag reg
- "pushfq \n\t" // save Eflag to stack
- "popq %%rax \n\t" // get Eflag from stack
- "pushq %%rcx \n\t" // save original Eflag to stack
- "popfq \n\t" // restore original Eflag
-#else
- "pushl %%ebx \n\t" // ebx gets clobbered by CPUID instruction
- "pushl %%ecx \n\t" // so does ecx...
- "pushl %%edx \n\t" // ...and edx (but ecx & edx safe on Linux)
- "pushfl \n\t" // save Eflag to stack
- "popl %%eax \n\t" // get Eflag from stack into eax
- "movl %%eax, %%ecx \n\t" // make another copy of Eflag in ecx
- "xorl $0x200000, %%eax \n\t" // toggle ID bit in Eflag (i.e., bit 21)
- "pushl %%eax \n\t" // save modified Eflag back to stack
- "popfl \n\t" // restore modified value to Eflag reg
- "pushfl \n\t" // save Eflag to stack
- "popl %%eax \n\t" // get Eflag from stack
- "pushl %%ecx \n\t" // save original Eflag to stack
- "popfl \n\t" // restore original Eflag
-#endif
- "xorl %%ecx, %%eax \n\t" // compare new Eflag with original Eflag
- "jz 0f \n\t" // if same, CPUID instr. is not supported
-
- "xorl %%eax, %%eax \n\t" // set eax to zero
-// ".byte 0x0f, 0xa2 \n\t" // CPUID instruction (two-byte opcode)
- "cpuid \n\t" // get the CPU identification info
- "cmpl $1, %%eax \n\t" // make sure eax return non-zero value
- "jl 0f \n\t" // if eax is zero, MMX is not supported
-
- "xorl %%eax, %%eax \n\t" // set eax to zero and...
- "incl %%eax \n\t" // ...increment eax to 1. This pair is
- // faster than the instruction "mov eax, 1"
- "cpuid \n\t" // get the CPU identification info again
- "andl $0x800000, %%edx \n\t" // mask out all bits but MMX bit (23)
- "cmpl $0, %%edx \n\t" // 0 = MMX not supported
- "jz 0f \n\t" // non-zero = yes, MMX IS supported
-
- "movl $1, %%eax \n\t" // set return value to 1
- "jmp 1f \n\t" // DONE: have MMX support
-
- "0: \n\t" // .NOT_SUPPORTED: target label for jump instructions
- "movl $0, %%eax \n\t" // set return value to 0
- "1: \n\t" // .RETURN: target label for jump instructions
-#if defined(__x86_64__)
- "popq %%rdx \n\t" // restore rdx
- "popq %%rcx \n\t" // restore rcx
- "popq %%rbx \n\t" // restore rbx
-#else
- "popl %%edx \n\t" // restore edx
- "popl %%ecx \n\t" // restore ecx
- "popl %%ebx \n\t" // restore ebx
-#endif
-
-// "ret \n\t" // DONE: no MMX support
- // (fall through to standard C "ret")
-
- : "=a" (result) // output list
-
- : // any variables used on input (none)
-
- // no clobber list
-// , "%ebx", "%ecx", "%edx" // GRR: we handle these manually
-// , "memory" // if write to a variable gcc thought was in a reg
-// , "cc" // "condition codes" (flag bits)
- );
- _mmx_supported = result;
-#else
- _mmx_supported = 0;
-#endif /* PNG_MMX_CODE_SUPPORTED */
-
- return _mmx_supported;
-}
-#endif
diff --git a/src/3rdparty/libpng/pngget.c b/src/3rdparty/libpng/pngget.c
index 38e4f9eefe..8611b85850 100644
--- a/src/3rdparty/libpng/pngget.c
+++ b/src/3rdparty/libpng/pngget.c
@@ -1,8 +1,8 @@
/* pngget.c - retrieval of values from info struct
*
- * Last changed in libpng 1.2.37 [June 4, 2009]
- * Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.0 [January 3, 2010]
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -12,9 +12,10 @@
*
*/
-#define PNG_INTERNAL
+#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
+#include "pngpriv.h"
png_uint_32 PNGAPI
png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)
@@ -26,7 +27,7 @@ png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)
return(0);
}
-png_uint_32 PNGAPI
+png_size_t PNGAPI
png_get_rowbytes(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
@@ -36,7 +37,7 @@ png_get_rowbytes(png_structp png_ptr, png_infop info_ptr)
return(0);
}
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
+#ifdef PNG_INFO_IMAGE_SUPPORTED
png_bytepp PNGAPI
png_get_rows(png_structp png_ptr, png_infop info_ptr)
{
@@ -117,7 +118,7 @@ png_uint_32 PNGAPI
png_get_x_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
-#if defined(PNG_pHYs_SUPPORTED)
+#ifdef PNG_pHYs_SUPPORTED
if (info_ptr->valid & PNG_INFO_pHYs)
{
png_debug1(1, "in %s retrieval function", "png_get_x_pixels_per_meter");
@@ -138,7 +139,7 @@ png_uint_32 PNGAPI
png_get_y_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
-#if defined(PNG_pHYs_SUPPORTED)
+#ifdef PNG_pHYs_SUPPORTED
if (info_ptr->valid & PNG_INFO_pHYs)
{
png_debug1(1, "in %s retrieval function", "png_get_y_pixels_per_meter");
@@ -159,7 +160,7 @@ png_uint_32 PNGAPI
png_get_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
-#if defined(PNG_pHYs_SUPPORTED)
+#ifdef PNG_pHYs_SUPPORTED
if (info_ptr->valid & PNG_INFO_pHYs)
{
png_debug1(1, "in %s retrieval function", "png_get_pixels_per_meter");
@@ -182,13 +183,15 @@ float PNGAPI
png_get_pixel_aspect_ratio(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
-#if defined(PNG_pHYs_SUPPORTED)
+#ifdef PNG_pHYs_SUPPORTED
if (info_ptr->valid & PNG_INFO_pHYs)
{
png_debug1(1, "in %s retrieval function", "png_get_aspect_ratio");
+
if (info_ptr->x_pixels_per_unit == 0)
return ((float)0.0);
+
else
return ((float)((float)info_ptr->y_pixels_per_unit
/(float)info_ptr->x_pixels_per_unit));
@@ -204,7 +207,7 @@ png_int_32 PNGAPI
png_get_x_offset_microns(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
-#if defined(PNG_oFFs_SUPPORTED)
+#ifdef PNG_oFFs_SUPPORTED
if (info_ptr->valid & PNG_INFO_oFFs)
{
@@ -227,7 +230,7 @@ png_get_y_offset_microns(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
-#if defined(PNG_oFFs_SUPPORTED)
+#ifdef PNG_oFFs_SUPPORTED
if (info_ptr->valid & PNG_INFO_oFFs)
{
png_debug1(1, "in %s retrieval function", "png_get_y_offset_microns");
@@ -249,7 +252,7 @@ png_get_x_offset_pixels(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
-#if defined(PNG_oFFs_SUPPORTED)
+#ifdef PNG_oFFs_SUPPORTED
if (info_ptr->valid & PNG_INFO_oFFs)
{
png_debug1(1, "in %s retrieval function", "png_get_x_offset_microns");
@@ -271,7 +274,7 @@ png_get_y_offset_pixels(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
-#if defined(PNG_oFFs_SUPPORTED)
+#ifdef PNG_oFFs_SUPPORTED
if (info_ptr->valid & PNG_INFO_oFFs)
{
png_debug1(1, "in %s retrieval function", "png_get_y_offset_microns");
@@ -324,7 +327,7 @@ png_get_y_offset_inches(png_structp png_ptr, png_infop info_ptr)
*.00003937);
}
-#if defined(PNG_pHYs_SUPPORTED)
+#ifdef PNG_pHYs_SUPPORTED
png_uint_32 PNGAPI
png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr,
png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)
@@ -334,6 +337,7 @@ png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr,
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs))
{
png_debug1(1, "in %s retrieval function", "pHYs");
+
if (res_x != NULL)
{
*res_x = info_ptr->x_pixels_per_unit;
@@ -382,7 +386,7 @@ png_get_signature(png_structp png_ptr, png_infop info_ptr)
return (NULL);
}
-#if defined(PNG_bKGD_SUPPORTED)
+#ifdef PNG_bKGD_SUPPORTED
png_uint_32 PNGAPI
png_get_bKGD(png_structp png_ptr, png_infop info_ptr,
png_color_16p *background)
@@ -391,6 +395,7 @@ png_get_bKGD(png_structp png_ptr, png_infop info_ptr,
&& background != NULL)
{
png_debug1(1, "in %s retrieval function", "bKGD");
+
*background = &(info_ptr->background);
return (PNG_INFO_bKGD);
}
@@ -398,7 +403,7 @@ png_get_bKGD(png_structp png_ptr, png_infop info_ptr,
}
#endif
-#if defined(PNG_cHRM_SUPPORTED)
+#ifdef PNG_cHRM_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
png_uint_32 PNGAPI
png_get_cHRM(png_structp png_ptr, png_infop info_ptr,
@@ -408,6 +413,7 @@ png_get_cHRM(png_structp png_ptr, png_infop info_ptr,
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))
{
png_debug1(1, "in %s retrieval function", "cHRM");
+
if (white_x != NULL)
*white_x = (double)info_ptr->x_white;
if (white_y != NULL)
@@ -436,9 +442,10 @@ png_get_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
png_fixed_point *red_y, png_fixed_point *green_x, png_fixed_point *green_y,
png_fixed_point *blue_x, png_fixed_point *blue_y)
{
+ png_debug1(1, "in %s retrieval function", "cHRM");
+
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))
{
- png_debug1(1, "in %s retrieval function", "cHRM");
if (white_x != NULL)
*white_x = info_ptr->int_x_white;
if (white_y != NULL)
@@ -462,15 +469,16 @@ png_get_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
#endif
#endif
-#if defined(PNG_gAMA_SUPPORTED)
+#ifdef PNG_gAMA_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
png_uint_32 PNGAPI
png_get_gAMA(png_structp png_ptr, png_infop info_ptr, double *file_gamma)
{
+ png_debug1(1, "in %s retrieval function", "gAMA");
+
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)
&& file_gamma != NULL)
{
- png_debug1(1, "in %s retrieval function", "gAMA");
*file_gamma = (double)info_ptr->gamma;
return (PNG_INFO_gAMA);
}
@@ -482,10 +490,11 @@ png_uint_32 PNGAPI
png_get_gAMA_fixed(png_structp png_ptr, png_infop info_ptr,
png_fixed_point *int_file_gamma)
{
+ png_debug1(1, "in %s retrieval function", "gAMA");
+
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)
&& int_file_gamma != NULL)
{
- png_debug1(1, "in %s retrieval function", "gAMA");
*int_file_gamma = info_ptr->int_gamma;
return (PNG_INFO_gAMA);
}
@@ -494,14 +503,15 @@ png_get_gAMA_fixed(png_structp png_ptr, png_infop info_ptr,
#endif
#endif
-#if defined(PNG_sRGB_SUPPORTED)
+#ifdef PNG_sRGB_SUPPORTED
png_uint_32 PNGAPI
png_get_sRGB(png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent)
{
+ png_debug1(1, "in %s retrieval function", "sRGB");
+
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB)
&& file_srgb_intent != NULL)
{
- png_debug1(1, "in %s retrieval function", "sRGB");
*file_srgb_intent = (int)info_ptr->srgb_intent;
return (PNG_INFO_sRGB);
}
@@ -509,16 +519,17 @@ png_get_sRGB(png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent)
}
#endif
-#if defined(PNG_iCCP_SUPPORTED)
+#ifdef PNG_iCCP_SUPPORTED
png_uint_32 PNGAPI
png_get_iCCP(png_structp png_ptr, png_infop info_ptr,
png_charpp name, int *compression_type,
png_charpp profile, png_uint_32 *proflen)
{
+ png_debug1(1, "in %s retrieval function", "iCCP");
+
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP)
&& name != NULL && profile != NULL && proflen != NULL)
{
- png_debug1(1, "in %s retrieval function", "iCCP");
*name = info_ptr->iccp_name;
*profile = info_ptr->iccp_profile;
/* Compression_type is a dummy so the API won't have to change
@@ -532,7 +543,7 @@ png_get_iCCP(png_structp png_ptr, png_infop info_ptr,
}
#endif
-#if defined(PNG_sPLT_SUPPORTED)
+#ifdef PNG_sPLT_SUPPORTED
png_uint_32 PNGAPI
png_get_sPLT(png_structp png_ptr, png_infop info_ptr,
png_sPLT_tpp spalettes)
@@ -546,14 +557,15 @@ png_get_sPLT(png_structp png_ptr, png_infop info_ptr,
}
#endif
-#if defined(PNG_hIST_SUPPORTED)
+#ifdef PNG_hIST_SUPPORTED
png_uint_32 PNGAPI
png_get_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist)
{
+ png_debug1(1, "in %s retrieval function", "hIST");
+
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST)
&& hist != NULL)
{
- png_debug1(1, "in %s retrieval function", "hIST");
*hist = info_ptr->hist;
return (PNG_INFO_hIST);
}
@@ -568,62 +580,48 @@ png_get_IHDR(png_structp png_ptr, png_infop info_ptr,
int *filter_type)
{
- if (png_ptr != NULL && info_ptr != NULL && width != NULL && height != NULL &&
- bit_depth != NULL && color_type != NULL)
- {
- png_debug1(1, "in %s retrieval function", "IHDR");
- *width = info_ptr->width;
- *height = info_ptr->height;
- *bit_depth = info_ptr->bit_depth;
- if (info_ptr->bit_depth < 1 || info_ptr->bit_depth > 16)
- png_error(png_ptr, "Invalid bit depth");
-
- *color_type = info_ptr->color_type;
+ png_debug1(1, "in %s retrieval function", "IHDR");
- if (info_ptr->color_type > 6)
- png_error(png_ptr, "Invalid color type");
-
- if (compression_type != NULL)
- *compression_type = info_ptr->compression_type;
+ if (png_ptr == NULL || info_ptr == NULL || width == NULL ||
+ height == NULL || bit_depth == NULL || color_type == NULL)
+ return (0);
- if (filter_type != NULL)
- *filter_type = info_ptr->filter_type;
+ *width = info_ptr->width;
+ *height = info_ptr->height;
+ *bit_depth = info_ptr->bit_depth;
+ *color_type = info_ptr->color_type;
- if (interlace_type != NULL)
- *interlace_type = info_ptr->interlace_type;
+ if (compression_type != NULL)
+ *compression_type = info_ptr->compression_type;
- /* Check for potential overflow of rowbytes */
- if (*width == 0 || *width > PNG_UINT_31_MAX)
- png_error(png_ptr, "Invalid image width");
+ if (filter_type != NULL)
+ *filter_type = info_ptr->filter_type;
- if (*height == 0 || *height > PNG_UINT_31_MAX)
- png_error(png_ptr, "Invalid image height");
+ if (interlace_type != NULL)
+ *interlace_type = info_ptr->interlace_type;
- if (info_ptr->width > (PNG_UINT_32_MAX
- >> 3) /* 8-byte RGBA pixels */
- - 64 /* bigrowbuf hack */
- - 1 /* filter byte */
- - 7*8 /* rounding of width to multiple of 8 pixels */
- - 8) /* extra max_pixel_depth pad */
- {
- png_warning(png_ptr,
- "Width too large for libpng to process image data.");
- }
+ /* This is redundant if we can be sure that the info_ptr values were all
+ * assigned in png_set_IHDR(). We do the check anyhow in case an
+ * application has ignored our advice not to mess with the members
+ * of info_ptr directly.
+ */
+ png_check_IHDR (png_ptr, info_ptr->width, info_ptr->height,
+ info_ptr->bit_depth, info_ptr->color_type, info_ptr->interlace_type,
+ info_ptr->compression_type, info_ptr->filter_type);
- return (1);
- }
- return (0);
+ return (1);
}
-#if defined(PNG_oFFs_SUPPORTED)
+#ifdef PNG_oFFs_SUPPORTED
png_uint_32 PNGAPI
png_get_oFFs(png_structp png_ptr, png_infop info_ptr,
png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)
{
+ png_debug1(1, "in %s retrieval function", "oFFs");
+
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)
&& offset_x != NULL && offset_y != NULL && unit_type != NULL)
{
- png_debug1(1, "in %s retrieval function", "oFFs");
*offset_x = info_ptr->x_offset;
*offset_y = info_ptr->y_offset;
*unit_type = (int)info_ptr->offset_unit_type;
@@ -633,17 +631,18 @@ png_get_oFFs(png_structp png_ptr, png_infop info_ptr,
}
#endif
-#if defined(PNG_pCAL_SUPPORTED)
+#ifdef PNG_pCAL_SUPPORTED
png_uint_32 PNGAPI
png_get_pCAL(png_structp png_ptr, png_infop info_ptr,
png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams,
png_charp *units, png_charpp *params)
{
+ png_debug1(1, "in %s retrieval function", "pCAL");
+
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL)
&& purpose != NULL && X0 != NULL && X1 != NULL && type != NULL &&
nparams != NULL && units != NULL && params != NULL)
{
- png_debug1(1, "in %s retrieval function", "pCAL");
*purpose = info_ptr->pcal_purpose;
*X0 = info_ptr->pcal_X0;
*X1 = info_ptr->pcal_X1;
@@ -657,7 +656,7 @@ png_get_pCAL(png_structp png_ptr, png_infop info_ptr,
}
#endif
-#if defined(PNG_sCAL_SUPPORTED)
+#ifdef PNG_sCAL_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
png_uint_32 PNGAPI
png_get_sCAL(png_structp png_ptr, png_infop info_ptr,
@@ -693,18 +692,18 @@ png_get_sCAL_s(png_structp png_ptr, png_infop info_ptr,
#endif
#endif
-#if defined(PNG_pHYs_SUPPORTED)
+#ifdef PNG_pHYs_SUPPORTED
png_uint_32 PNGAPI
png_get_pHYs(png_structp png_ptr, png_infop info_ptr,
png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)
{
png_uint_32 retval = 0;
+ png_debug1(1, "in %s retrieval function", "pHYs");
+
if (png_ptr != NULL && info_ptr != NULL &&
(info_ptr->valid & PNG_INFO_pHYs))
{
- png_debug1(1, "in %s retrieval function", "pHYs");
-
if (res_x != NULL)
{
*res_x = info_ptr->x_pixels_per_unit;
@@ -731,10 +730,11 @@ png_uint_32 PNGAPI
png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette,
int *num_palette)
{
+ png_debug1(1, "in %s retrieval function", "PLTE");
+
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_PLTE)
&& palette != NULL)
{
- png_debug1(1, "in %s retrieval function", "PLTE");
*palette = info_ptr->palette;
*num_palette = info_ptr->num_palette;
png_debug1(3, "num_palette = %d", *num_palette);
@@ -743,14 +743,15 @@ png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette,
return (0);
}
-#if defined(PNG_sBIT_SUPPORTED)
+#ifdef PNG_sBIT_SUPPORTED
png_uint_32 PNGAPI
png_get_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit)
{
+ png_debug1(1, "in %s retrieval function", "sBIT");
+
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT)
&& sig_bit != NULL)
{
- png_debug1(1, "in %s retrieval function", "sBIT");
*sig_bit = &(info_ptr->sig_bit);
return (PNG_INFO_sBIT);
}
@@ -758,7 +759,7 @@ png_get_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit)
}
#endif
-#if defined(PNG_TEXT_SUPPORTED)
+#ifdef PNG_TEXT_SUPPORTED
png_uint_32 PNGAPI
png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr,
int *num_text)
@@ -783,14 +784,15 @@ png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr,
}
#endif
-#if defined(PNG_tIME_SUPPORTED)
+#ifdef PNG_tIME_SUPPORTED
png_uint_32 PNGAPI
png_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time)
{
+ png_debug1(1, "in %s retrieval function", "tIME");
+
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME)
&& mod_time != NULL)
{
- png_debug1(1, "in %s retrieval function", "tIME");
*mod_time = &(info_ptr->mod_time);
return (PNG_INFO_tIME);
}
@@ -798,36 +800,37 @@ png_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time)
}
#endif
-#if defined(PNG_tRNS_SUPPORTED)
+#ifdef PNG_tRNS_SUPPORTED
png_uint_32 PNGAPI
png_get_tRNS(png_structp png_ptr, png_infop info_ptr,
- png_bytep *trans, int *num_trans, png_color_16p *trans_values)
+ png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color)
{
png_uint_32 retval = 0;
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS))
{
png_debug1(1, "in %s retrieval function", "tRNS");
+
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
{
- if (trans != NULL)
+ if (trans_alpha != NULL)
{
- *trans = info_ptr->trans;
+ *trans_alpha = info_ptr->trans_alpha;
retval |= PNG_INFO_tRNS;
}
- if (trans_values != NULL)
- *trans_values = &(info_ptr->trans_values);
+ if (trans_color != NULL)
+ *trans_color = &(info_ptr->trans_color);
}
else /* if (info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) */
{
- if (trans_values != NULL)
+ if (trans_color != NULL)
{
- *trans_values = &(info_ptr->trans_values);
+ *trans_color = &(info_ptr->trans_color);
retval |= PNG_INFO_tRNS;
}
- if (trans != NULL)
- *trans = NULL;
+ if (trans_alpha != NULL)
+ *trans_alpha = NULL;
}
if (num_trans != NULL)
{
@@ -839,7 +842,7 @@ png_get_tRNS(png_structp png_ptr, png_infop info_ptr,
}
#endif
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
png_uint_32 PNGAPI
png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr,
png_unknown_chunkpp unknowns)
@@ -853,7 +856,7 @@ png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr,
}
#endif
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
+#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
png_byte PNGAPI
png_get_rgb_to_gray_status (png_structp png_ptr)
{
@@ -861,7 +864,7 @@ png_get_rgb_to_gray_status (png_structp png_ptr)
}
#endif
-#if defined(PNG_USER_CHUNKS_SUPPORTED)
+#ifdef PNG_USER_CHUNKS_SUPPORTED
png_voidp PNGAPI
png_get_user_chunk_ptr(png_structp png_ptr)
{
@@ -870,74 +873,47 @@ png_get_user_chunk_ptr(png_structp png_ptr)
#endif
#ifdef PNG_WRITE_SUPPORTED
-png_uint_32 PNGAPI
+png_size_t PNGAPI
png_get_compression_buffer_size(png_structp png_ptr)
{
- return (png_uint_32)(png_ptr? png_ptr->zbuf_size : 0L);
+ return (png_ptr ? png_ptr->zbuf_size : 0L);
}
#endif
-#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
-#ifndef PNG_1_0_X
-/* This function was added to libpng 1.2.0 and should exist by default */
-png_uint_32 PNGAPI
-png_get_asm_flags (png_structp png_ptr)
-{
- /* Obsolete, to be removed from libpng-1.4.0 */
- return (png_ptr? 0L: 0L);
-}
-/* This function was added to libpng 1.2.0 and should exist by default */
+#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+/* These functions were added to libpng 1.2.6 */
png_uint_32 PNGAPI
-png_get_asm_flagmask (int flag_select)
+png_get_user_width_max (png_structp png_ptr)
{
- /* Obsolete, to be removed from libpng-1.4.0 */
- flag_select=flag_select;
- return 0L;
+ return (png_ptr? png_ptr->user_width_max : 0);
}
-
- /* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */
-/* This function was added to libpng 1.2.0 */
png_uint_32 PNGAPI
-png_get_mmx_flagmask (int flag_select, int *compilerID)
-{
- /* Obsolete, to be removed from libpng-1.4.0 */
- flag_select=flag_select;
- *compilerID = -1; /* unknown (i.e., no asm/MMX code compiled) */
- return 0L;
-}
-
-/* This function was added to libpng 1.2.0 */
-png_byte PNGAPI
-png_get_mmx_bitdepth_threshold (png_structp png_ptr)
+png_get_user_height_max (png_structp png_ptr)
{
- /* Obsolete, to be removed from libpng-1.4.0 */
- return (png_ptr? 0: 0);
+ return (png_ptr? png_ptr->user_height_max : 0);
}
-
-/* This function was added to libpng 1.2.0 */
+/* This function was added to libpng 1.4.0 */
png_uint_32 PNGAPI
-png_get_mmx_rowbytes_threshold (png_structp png_ptr)
+png_get_chunk_cache_max (png_structp png_ptr)
{
- /* Obsolete, to be removed from libpng-1.4.0 */
- return (png_ptr? 0L: 0L);
+ return (png_ptr? png_ptr->user_chunk_cache_max? 0x7fffffffL :
+ png_ptr->user_chunk_cache_max - 1 : 0);
}
-#endif /* ?PNG_1_0_X */
-#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
+#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
-/* These functions were added to libpng 1.2.6 */
+#ifdef PNG_IO_STATE_SUPPORTED
png_uint_32 PNGAPI
-png_get_user_width_max (png_structp png_ptr)
+png_get_io_state (png_structp png_ptr)
{
- return (png_ptr? png_ptr->user_width_max : 0);
+ return png_ptr->io_state;
}
-png_uint_32 PNGAPI
-png_get_user_height_max (png_structp png_ptr)
+
+png_bytep PNGAPI
+png_get_io_chunk_name (png_structp png_ptr)
{
- return (png_ptr? png_ptr->user_height_max : 0);
+ return png_ptr->chunk_name;
}
-#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
-
+#endif /* ?PNG_IO_STATE_SUPPORTED */
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
diff --git a/src/3rdparty/libpng/pngmem.c b/src/3rdparty/libpng/pngmem.c
index e190cc3bf7..dee2966567 100644
--- a/src/3rdparty/libpng/pngmem.c
+++ b/src/3rdparty/libpng/pngmem.c
@@ -1,8 +1,8 @@
/* pngmem.c - stub functions for memory allocation
*
- * Last changed in libpng 1.2.37 [June 4, 2009]
- * Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.0 [January 3, 2010]
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -17,9 +17,10 @@
* identify the replacement functions.
*/
-#define PNG_INTERNAL
+#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
+#include "pngpriv.h"
/* Borland DOS special memory handler */
#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
@@ -31,7 +32,7 @@ png_voidp /* PRIVATE */
png_create_struct(int type)
{
#ifdef PNG_USER_MEM_SUPPORTED
- return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL));
+ return (png_create_struct_2(type, NULL, NULL));
}
/* Alternate version of png_create_struct, for use with user-defined malloc. */
@@ -70,7 +71,7 @@ void /* PRIVATE */
png_destroy_struct(png_voidp struct_ptr)
{
#ifdef PNG_USER_MEM_SUPPORTED
- png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL);
+ png_destroy_struct_2(struct_ptr, NULL, NULL);
}
/* Free memory allocated by a png_create_struct() call */
@@ -114,9 +115,19 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
* result, we would be truncating potentially larger memory requests
* (which should cause a fatal error) and introducing major problems.
*/
+png_voidp PNGAPI
+png_calloc(png_structp png_ptr, png_alloc_size_t size)
+{
+ png_voidp ret;
+
+ ret = (png_malloc(png_ptr, size));
+ if (ret != NULL)
+ png_memset(ret,0,(png_size_t)size);
+ return (ret);
+}
png_voidp PNGAPI
-png_malloc(png_structp png_ptr, png_uint_32 size)
+png_malloc(png_structp png_ptr, png_alloc_size_t size)
{
png_voidp ret;
@@ -129,12 +140,12 @@ png_malloc(png_structp png_ptr, png_uint_32 size)
else
ret = (png_malloc_default(png_ptr, size));
if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
- png_error(png_ptr, "Out of memory!");
+ png_error(png_ptr, "Out of memory");
return (ret);
}
png_voidp PNGAPI
-png_malloc_default(png_structp png_ptr, png_uint_32 size)
+png_malloc_default(png_structp png_ptr, png_alloc_size_t size)
{
png_voidp ret;
#endif /* PNG_USER_MEM_SUPPORTED */
@@ -190,9 +201,9 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
{
#ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
- png_error(png_ptr, "Out Of Memory."); /* Note "O" and "M" */
+ png_error(png_ptr, "Out Of Memory"); /* Note "O" and "M" */
else
- png_warning(png_ptr, "Out Of Memory.");
+ png_warning(png_ptr, "Out Of Memory");
#endif
return (NULL);
}
@@ -218,9 +229,9 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
{
#ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
- png_error(png_ptr, "Out Of memory."); /* Note "O" and "M" */
+ png_error(png_ptr, "Out Of memory"); /* Note "O" and "M" */
else
- png_warning(png_ptr, "Out Of memory.");
+ png_warning(png_ptr, "Out Of memory");
#endif
return (NULL);
}
@@ -247,9 +258,9 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
{
#ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
- png_error(png_ptr, "Out of Memory."); /* Note "o" and "M" */
+ png_error(png_ptr, "Out of Memory"); /* Note "o" and "M" */
else
- png_warning(png_ptr, "Out of Memory.");
+ png_warning(png_ptr, "Out of Memory");
#endif
return (NULL);
}
@@ -263,9 +274,9 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
if (ret == NULL)
{
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
- png_error(png_ptr, "Out of memory."); /* Note "o" and "m" */
+ png_error(png_ptr, "Out of memory"); /* Note "o" and "m" */
else
- png_warning(png_ptr, "Out of memory."); /* Note "o" and "m" */
+ png_warning(png_ptr, "Out of memory"); /* Note "o" and "m" */
}
#endif
@@ -337,7 +348,7 @@ png_voidp /* PRIVATE */
png_create_struct(int type)
{
#ifdef PNG_USER_MEM_SUPPORTED
- return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL));
+ return (png_create_struct_2(type, NULL, NULL));
}
/* Allocate memory for a png_struct or a png_info. The malloc and
@@ -391,7 +402,7 @@ void /* PRIVATE */
png_destroy_struct(png_voidp struct_ptr)
{
#ifdef PNG_USER_MEM_SUPPORTED
- png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL);
+ png_destroy_struct_2(struct_ptr, NULL, NULL);
}
/* Free memory allocated by a png_create_struct() call */
@@ -431,9 +442,19 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
* have the ability to do that.
*/
+png_voidp PNGAPI
+png_calloc(png_structp png_ptr, png_alloc_size_t size)
+{
+ png_voidp ret;
+
+ ret = (png_malloc(png_ptr, size));
+ if (ret != NULL)
+ png_memset(ret,0,(png_size_t)size);
+ return (ret);
+}
png_voidp PNGAPI
-png_malloc(png_structp png_ptr, png_uint_32 size)
+png_malloc(png_structp png_ptr, png_alloc_size_t size)
{
png_voidp ret;
@@ -446,12 +467,12 @@ png_malloc(png_structp png_ptr, png_uint_32 size)
else
ret = (png_malloc_default(png_ptr, size));
if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
- png_error(png_ptr, "Out of Memory!");
+ png_error(png_ptr, "Out of Memory");
return (ret);
}
png_voidp PNGAPI
-png_malloc_default(png_structp png_ptr, png_uint_32 size)
+png_malloc_default(png_structp png_ptr, png_alloc_size_t size)
{
png_voidp ret;
#endif /* PNG_USER_MEM_SUPPORTED */
@@ -538,16 +559,13 @@ png_free_default(png_structp png_ptr, png_voidp ptr)
#endif /* Not Borland DOS special memory handler */
-#if defined(PNG_1_0_X)
-# define png_malloc_warn png_malloc
-#else
/* This function was added at libpng version 1.2.3. The png_malloc_warn()
* function will set up png_malloc() to issue a png_warning and return NULL
* instead of issuing a png_error, if it fails to allocate the requested
* memory.
*/
png_voidp PNGAPI
-png_malloc_warn(png_structp png_ptr, png_uint_32 size)
+png_malloc_warn(png_structp png_ptr, png_alloc_size_t size)
{
png_voidp ptr;
png_uint_32 save_flags;
@@ -560,34 +578,7 @@ png_malloc_warn(png_structp png_ptr, png_uint_32 size)
png_ptr->flags=save_flags;
return(ptr);
}
-#endif
-
-png_voidp PNGAPI
-png_memcpy_check (png_structp png_ptr, png_voidp s1, png_voidp s2,
- png_uint_32 length)
-{
- png_size_t size;
-
- size = (png_size_t)length;
- if ((png_uint_32)size != length)
- png_error(png_ptr, "Overflow in png_memcpy_check.");
-
- return(png_memcpy (s1, s2, size));
-}
-png_voidp PNGAPI
-png_memset_check (png_structp png_ptr, png_voidp s1, int value,
- png_uint_32 length)
-{
- png_size_t size;
-
- size = (png_size_t)length;
- if ((png_uint_32)size != length)
- png_error(png_ptr, "Overflow in png_memset_check.");
-
- return (png_memset (s1, value, size));
-
-}
#ifdef PNG_USER_MEM_SUPPORTED
/* This function is called when the application wants to use another method
diff --git a/src/3rdparty/libpng/pngpread.c b/src/3rdparty/libpng/pngpread.c
index 7adb7b854f..e3d311107a 100644
--- a/src/3rdparty/libpng/pngpread.c
+++ b/src/3rdparty/libpng/pngpread.c
@@ -1,8 +1,8 @@
/* pngpread.c - read a png file in push mode
*
- * Last changed in libpng 1.2.38 [July 16, 2009]
- * Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.0 [January 3, 2010]
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -11,9 +11,10 @@
* and license in png.h
*/
-#define PNG_INTERNAL
+#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
+#include "pngpriv.h"
/* Push model modes */
#define PNG_READ_SIG_MODE 0
@@ -70,7 +71,7 @@ png_process_some_data(png_structp png_ptr, png_infop info_ptr)
break;
}
-#if defined(PNG_READ_tEXt_SUPPORTED)
+#ifdef PNG_READ_tEXt_SUPPORTED
case PNG_READ_tEXt_MODE:
{
png_push_read_tEXt(png_ptr, info_ptr);
@@ -78,7 +79,7 @@ png_process_some_data(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
+#ifdef PNG_READ_zTXt_SUPPORTED
case PNG_READ_zTXt_MODE:
{
png_push_read_zTXt(png_ptr, info_ptr);
@@ -86,7 +87,7 @@ png_process_some_data(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
+#ifdef PNG_READ_iTXt_SUPPORTED
case PNG_READ_iTXt_MODE:
{
png_push_read_iTXt(png_ptr, info_ptr);
@@ -149,63 +150,62 @@ png_push_read_sig(png_structp png_ptr, png_infop info_ptr)
void /* PRIVATE */
png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
- PNG_CONST PNG_IHDR;
- PNG_CONST PNG_IDAT;
- PNG_CONST PNG_IEND;
- PNG_CONST PNG_PLTE;
-#if defined(PNG_READ_bKGD_SUPPORTED)
- PNG_CONST PNG_bKGD;
+ PNG_IHDR;
+ PNG_IDAT;
+ PNG_IEND;
+ PNG_PLTE;
+#ifdef PNG_READ_bKGD_SUPPORTED
+ PNG_bKGD;
#endif
-#if defined(PNG_READ_cHRM_SUPPORTED)
- PNG_CONST PNG_cHRM;
+#ifdef PNG_READ_cHRM_SUPPORTED
+ PNG_cHRM;
#endif
-#if defined(PNG_READ_gAMA_SUPPORTED)
- PNG_CONST PNG_gAMA;
+#ifdef PNG_READ_gAMA_SUPPORTED
+ PNG_gAMA;
#endif
-#if defined(PNG_READ_hIST_SUPPORTED)
- PNG_CONST PNG_hIST;
+#ifdef PNG_READ_hIST_SUPPORTED
+ PNG_hIST;
#endif
-#if defined(PNG_READ_iCCP_SUPPORTED)
- PNG_CONST PNG_iCCP;
+#ifdef PNG_READ_iCCP_SUPPORTED
+ PNG_iCCP;
#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
- PNG_CONST PNG_iTXt;
+#ifdef PNG_READ_iTXt_SUPPORTED
+ PNG_iTXt;
#endif
-#if defined(PNG_READ_oFFs_SUPPORTED)
- PNG_CONST PNG_oFFs;
+#ifdef PNG_READ_oFFs_SUPPORTED
+ PNG_oFFs;
#endif
-#if defined(PNG_READ_pCAL_SUPPORTED)
- PNG_CONST PNG_pCAL;
+#ifdef PNG_READ_pCAL_SUPPORTED
+ PNG_pCAL;
#endif
-#if defined(PNG_READ_pHYs_SUPPORTED)
- PNG_CONST PNG_pHYs;
+#ifdef PNG_READ_pHYs_SUPPORTED
+ PNG_pHYs;
#endif
-#if defined(PNG_READ_sBIT_SUPPORTED)
- PNG_CONST PNG_sBIT;
+#ifdef PNG_READ_sBIT_SUPPORTED
+ PNG_sBIT;
#endif
-#if defined(PNG_READ_sCAL_SUPPORTED)
- PNG_CONST PNG_sCAL;
+#ifdef PNG_READ_sCAL_SUPPORTED
+ PNG_sCAL;
#endif
-#if defined(PNG_READ_sRGB_SUPPORTED)
- PNG_CONST PNG_sRGB;
+#ifdef PNG_READ_sRGB_SUPPORTED
+ PNG_sRGB;
#endif
-#if defined(PNG_READ_sPLT_SUPPORTED)
- PNG_CONST PNG_sPLT;
+#ifdef PNG_READ_sPLT_SUPPORTED
+ PNG_sPLT;
#endif
-#if defined(PNG_READ_tEXt_SUPPORTED)
- PNG_CONST PNG_tEXt;
+#ifdef PNG_READ_tEXt_SUPPORTED
+ PNG_tEXt;
#endif
-#if defined(PNG_READ_tIME_SUPPORTED)
- PNG_CONST PNG_tIME;
+#ifdef PNG_READ_tIME_SUPPORTED
+ PNG_tIME;
#endif
-#if defined(PNG_READ_tRNS_SUPPORTED)
- PNG_CONST PNG_tRNS;
+#ifdef PNG_READ_tRNS_SUPPORTED
+ PNG_tRNS;
#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
- PNG_CONST PNG_zTXt;
+#ifdef PNG_READ_zTXt_SUPPORTED
+ PNG_zTXt;
#endif
-#endif /* PNG_USE_LOCAL_ARRAYS */
+
/* First we make sure we have enough data for the 4 byte chunk name
* and the 4 byte chunk length before proceeding with decoding the
* chunk data. To fully decode each of these chunks, we also make
@@ -322,7 +322,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
return;
if (png_ptr->mode & PNG_AFTER_IDAT)
- png_error(png_ptr, "Too many IDAT's found");
+ png_benign_error(png_ptr, "Too many IDATs found");
}
png_ptr->idat_size = png_ptr->push_length;
@@ -334,7 +334,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
return;
}
-#if defined(PNG_READ_gAMA_SUPPORTED)
+#ifdef PNG_READ_gAMA_SUPPORTED
else if (!png_memcmp(png_ptr->chunk_name, png_gAMA, 4))
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
@@ -347,7 +347,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_sBIT_SUPPORTED)
+#ifdef PNG_READ_sBIT_SUPPORTED
else if (!png_memcmp(png_ptr->chunk_name, png_sBIT, 4))
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
@@ -360,7 +360,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_cHRM_SUPPORTED)
+#ifdef PNG_READ_cHRM_SUPPORTED
else if (!png_memcmp(png_ptr->chunk_name, png_cHRM, 4))
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
@@ -373,7 +373,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_sRGB_SUPPORTED)
+#ifdef PNG_READ_sRGB_SUPPORTED
else if (!png_memcmp(png_ptr->chunk_name, png_sRGB, 4))
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
@@ -386,7 +386,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_iCCP_SUPPORTED)
+#ifdef PNG_READ_iCCP_SUPPORTED
else if (!png_memcmp(png_ptr->chunk_name, png_iCCP, 4))
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
@@ -399,7 +399,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_sPLT_SUPPORTED)
+#ifdef PNG_READ_sPLT_SUPPORTED
else if (!png_memcmp(png_ptr->chunk_name, png_sPLT, 4))
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
@@ -412,7 +412,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_tRNS_SUPPORTED)
+#ifdef PNG_READ_tRNS_SUPPORTED
else if (!png_memcmp(png_ptr->chunk_name, png_tRNS, 4))
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
@@ -425,7 +425,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_bKGD_SUPPORTED)
+#ifdef PNG_READ_bKGD_SUPPORTED
else if (!png_memcmp(png_ptr->chunk_name, png_bKGD, 4))
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
@@ -438,7 +438,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_hIST_SUPPORTED)
+#ifdef PNG_READ_hIST_SUPPORTED
else if (!png_memcmp(png_ptr->chunk_name, png_hIST, 4))
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
@@ -451,7 +451,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_pHYs_SUPPORTED)
+#ifdef PNG_READ_pHYs_SUPPORTED
else if (!png_memcmp(png_ptr->chunk_name, png_pHYs, 4))
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
@@ -464,7 +464,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_oFFs_SUPPORTED)
+#ifdef PNG_READ_oFFs_SUPPORTED
else if (!png_memcmp(png_ptr->chunk_name, png_oFFs, 4))
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
@@ -477,7 +477,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_pCAL_SUPPORTED)
+#ifdef PNG_READ_pCAL_SUPPORTED
else if (!png_memcmp(png_ptr->chunk_name, png_pCAL, 4))
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
@@ -490,7 +490,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_sCAL_SUPPORTED)
+#ifdef PNG_READ_sCAL_SUPPORTED
else if (!png_memcmp(png_ptr->chunk_name, png_sCAL, 4))
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
@@ -503,7 +503,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_tIME_SUPPORTED)
+#ifdef PNG_READ_tIME_SUPPORTED
else if (!png_memcmp(png_ptr->chunk_name, png_tIME, 4))
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
@@ -516,7 +516,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_tEXt_SUPPORTED)
+#ifdef PNG_READ_tEXt_SUPPORTED
else if (!png_memcmp(png_ptr->chunk_name, png_tEXt, 4))
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
@@ -529,7 +529,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
+#ifdef PNG_READ_zTXt_SUPPORTED
else if (!png_memcmp(png_ptr->chunk_name, png_zTXt, 4))
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
@@ -542,7 +542,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
+#ifdef PNG_READ_iTXt_SUPPORTED
else if (!png_memcmp(png_ptr->chunk_name, png_iTXt, 4))
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
@@ -699,7 +699,7 @@ png_push_save_buffer(png_structp png_ptr)
new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256;
old_buffer = png_ptr->save_buffer;
png_ptr->save_buffer = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)new_max);
+ (png_size_t)new_max);
png_memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size);
png_free(png_ptr, old_buffer);
png_ptr->save_buffer_max = new_max;
@@ -728,9 +728,7 @@ png_push_restore_buffer(png_structp png_ptr, png_bytep buffer,
void /* PRIVATE */
png_push_read_IDAT(png_structp png_ptr)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
- PNG_CONST PNG_IDAT;
-#endif
+ PNG_IDAT;
if (!(png_ptr->mode & PNG_HAVE_CHUNK_HEADER))
{
png_byte chunk_length[4];
@@ -827,7 +825,7 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer,
int ret;
if ((png_ptr->flags & PNG_FLAG_ZLIB_FINISHED) && buffer_length)
- png_error(png_ptr, "Extra compression data");
+ png_benign_error(png_ptr, "Extra compression data");
png_ptr->zstream.next_in = buffer;
png_ptr->zstream.avail_in = (uInt)buffer_length;
@@ -839,7 +837,7 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer,
if (ret == Z_STREAM_END)
{
if (png_ptr->zstream.avail_in)
- png_error(png_ptr, "Extra compressed data");
+ png_benign_error(png_ptr, "Extra compressed data");
if (!(png_ptr->zstream.avail_out))
{
@@ -859,7 +857,7 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer,
if (!(png_ptr->zstream.avail_out))
{
if ((
-#if defined(PNG_READ_INTERLACING_SUPPORTED)
+#ifdef PNG_READ_INTERLACING_SUPPORTED
png_ptr->interlaced && png_ptr->pass > 6) ||
(!png_ptr->interlaced &&
#endif
@@ -896,13 +894,12 @@ png_push_process_row(png_structp png_ptr)
png_ptr->row_buf + 1, png_ptr->prev_row + 1,
(int)(png_ptr->row_buf[0]));
- png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf,
- png_ptr->rowbytes + 1);
+ png_memcpy(png_ptr->prev_row, png_ptr->row_buf, png_ptr->rowbytes + 1);
if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA))
png_do_read_transformations(png_ptr);
-#if defined(PNG_READ_INTERLACING_SUPPORTED)
+#ifdef PNG_READ_INTERLACING_SUPPORTED
/* Blow up interlaced rows to full size */
if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE))
{
@@ -928,7 +925,7 @@ png_push_process_row(png_structp png_ptr)
{
for (i = 0; i < 4 && png_ptr->pass == 2; i++)
{
- png_push_have_row(png_ptr, png_bytep_NULL);
+ png_push_have_row(png_ptr, NULL);
png_read_push_finish_row(png_ptr);
}
}
@@ -937,14 +934,14 @@ png_push_process_row(png_structp png_ptr)
{
for (i = 0; i < 2 && png_ptr->pass == 4; i++)
{
- png_push_have_row(png_ptr, png_bytep_NULL);
+ png_push_have_row(png_ptr, NULL);
png_read_push_finish_row(png_ptr);
}
}
if (png_ptr->pass == 6 && png_ptr->height <= 4)
{
- png_push_have_row(png_ptr, png_bytep_NULL);
+ png_push_have_row(png_ptr, NULL);
png_read_push_finish_row(png_ptr);
}
@@ -964,7 +961,7 @@ png_push_process_row(png_structp png_ptr)
{
for (i = 0; i < 4 && png_ptr->pass == 2; i++)
{
- png_push_have_row(png_ptr, png_bytep_NULL);
+ png_push_have_row(png_ptr, NULL);
png_read_push_finish_row(png_ptr);
}
}
@@ -984,7 +981,7 @@ png_push_process_row(png_structp png_ptr)
for (i = 0; i < 4 && png_ptr->pass == 2; i++)
{
- png_push_have_row(png_ptr, png_bytep_NULL);
+ png_push_have_row(png_ptr, NULL);
png_read_push_finish_row(png_ptr);
}
@@ -992,7 +989,7 @@ png_push_process_row(png_structp png_ptr)
{
for (i = 0; i < 2 && png_ptr->pass == 4; i++)
{
- png_push_have_row(png_ptr, png_bytep_NULL);
+ png_push_have_row(png_ptr, NULL);
png_read_push_finish_row(png_ptr);
}
}
@@ -1014,7 +1011,7 @@ png_push_process_row(png_structp png_ptr)
{
for (i = 0; i < 2 && png_ptr->pass == 4; i++)
{
- png_push_have_row(png_ptr, png_bytep_NULL);
+ png_push_have_row(png_ptr, NULL);
png_read_push_finish_row(png_ptr);
}
}
@@ -1034,13 +1031,13 @@ png_push_process_row(png_structp png_ptr)
for (i = 0; i < 2 && png_ptr->pass == 4; i++)
{
- png_push_have_row(png_ptr, png_bytep_NULL);
+ png_push_have_row(png_ptr, NULL);
png_read_push_finish_row(png_ptr);
}
if (png_ptr->pass == 6) /* Pass 5 might be empty */
{
- png_push_have_row(png_ptr, png_bytep_NULL);
+ png_push_have_row(png_ptr, NULL);
png_read_push_finish_row(png_ptr);
}
@@ -1059,7 +1056,7 @@ png_push_process_row(png_structp png_ptr)
if (png_ptr->pass == 6) /* Skip top generated row */
{
- png_push_have_row(png_ptr, png_bytep_NULL);
+ png_push_have_row(png_ptr, NULL);
png_read_push_finish_row(png_ptr);
}
@@ -1073,7 +1070,7 @@ png_push_process_row(png_structp png_ptr)
if (png_ptr->pass != 6)
break;
- png_push_have_row(png_ptr, png_bytep_NULL);
+ png_push_have_row(png_ptr, NULL);
png_read_push_finish_row(png_ptr);
}
}
@@ -1089,7 +1086,6 @@ png_push_process_row(png_structp png_ptr)
void /* PRIVATE */
png_read_push_finish_row(png_structp png_ptr)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Start of interlace block */
@@ -1108,17 +1104,16 @@ png_read_push_finish_row(png_structp png_ptr)
* it, uncomment it here and in png.h
PNG_CONST int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
*/
-#endif
png_ptr->row_number++;
if (png_ptr->row_number < png_ptr->num_rows)
return;
-#if defined(PNG_READ_INTERLACING_SUPPORTED)
+#ifdef PNG_READ_INTERLACING_SUPPORTED
if (png_ptr->interlaced)
{
png_ptr->row_number = 0;
- png_memset_check(png_ptr, png_ptr->prev_row, 0,
+ png_memset(png_ptr->prev_row, 0,
png_ptr->rowbytes + 1);
do
{
@@ -1155,7 +1150,7 @@ png_read_push_finish_row(png_structp png_ptr)
#endif /* PNG_READ_INTERLACING_SUPPORTED */
}
-#if defined(PNG_READ_tEXt_SUPPORTED)
+#ifdef PNG_READ_tEXt_SUPPORTED
void /* PRIVATE */
png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
length)
@@ -1178,7 +1173,7 @@ png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
#endif
png_ptr->current_text = (png_charp)png_malloc(png_ptr,
- (png_uint_32)(length + 1));
+ (png_size_t)(length + 1));
png_ptr->current_text[length] = '\0';
png_ptr->current_text_ptr = png_ptr->current_text;
png_ptr->current_text_size = (png_size_t)length;
@@ -1218,7 +1213,7 @@ png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr)
png_push_crc_finish(png_ptr);
-#if defined(PNG_MAX_MALLOC_64K)
+#ifdef PNG_MAX_MALLOC_64K
if (png_ptr->skip_length)
return;
#endif
@@ -1232,7 +1227,7 @@ png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr)
text++;
text_ptr = (png_textp)png_malloc(png_ptr,
- (png_uint_32)png_sizeof(png_text));
+ png_sizeof(png_text));
text_ptr->compression = PNG_TEXT_COMPRESSION_NONE;
text_ptr->key = key;
#ifdef PNG_iTXt_SUPPORTED
@@ -1248,12 +1243,12 @@ png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr)
png_ptr->current_text = NULL;
if (ret)
- png_warning(png_ptr, "Insufficient memory to store text chunk.");
+ png_warning(png_ptr, "Insufficient memory to store text chunk");
}
}
#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
+#ifdef PNG_READ_zTXt_SUPPORTED
void /* PRIVATE */
png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
length)
@@ -1278,7 +1273,7 @@ png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
#endif
png_ptr->current_text = (png_charp)png_malloc(png_ptr,
- (png_uint_32)(length + 1));
+ (png_size_t)(length + 1));
png_ptr->current_text[length] = '\0';
png_ptr->current_text_ptr = png_ptr->current_text;
png_ptr->current_text_size = (png_size_t)length;
@@ -1371,7 +1366,7 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr)
if (text == NULL)
{
text = (png_charp)png_malloc(png_ptr,
- (png_uint_32)(png_ptr->zbuf_size
+ (png_ptr->zbuf_size
- png_ptr->zstream.avail_out + key_size + 1));
png_memcpy(text + key_size, png_ptr->zbuf,
@@ -1390,7 +1385,7 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr)
tmp = text;
text = (png_charp)png_malloc(png_ptr, text_size +
- (png_uint_32)(png_ptr->zbuf_size
+ (png_ptr->zbuf_size
- png_ptr->zstream.avail_out + 1));
png_memcpy(text, tmp, text_size);
@@ -1434,7 +1429,7 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr)
text += key_size;
text_ptr = (png_textp)png_malloc(png_ptr,
- (png_uint_32)png_sizeof(png_text));
+ png_sizeof(png_text));
text_ptr->compression = PNG_TEXT_COMPRESSION_zTXt;
text_ptr->key = key;
#ifdef PNG_iTXt_SUPPORTED
@@ -1449,12 +1444,12 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr)
png_free(png_ptr, text_ptr);
if (ret)
- png_warning(png_ptr, "Insufficient memory to store text chunk.");
+ png_warning(png_ptr, "Insufficient memory to store text chunk");
}
}
#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
+#ifdef PNG_READ_iTXt_SUPPORTED
void /* PRIVATE */
png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
length)
@@ -1477,7 +1472,7 @@ png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
#endif
png_ptr->current_text = (png_charp)png_malloc(png_ptr,
- (png_uint_32)(length + 1));
+ (png_size_t)(length + 1));
png_ptr->current_text[length] = '\0';
png_ptr->current_text_ptr = png_ptr->current_text;
png_ptr->current_text_size = (png_size_t)length;
@@ -1521,7 +1516,7 @@ png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr)
png_push_crc_finish(png_ptr);
-#if defined(PNG_MAX_MALLOC_64K)
+#ifdef PNG_MAX_MALLOC_64K
if (png_ptr->skip_length)
return;
#endif
@@ -1554,7 +1549,7 @@ png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr)
text++;
text_ptr = (png_textp)png_malloc(png_ptr,
- (png_uint_32)png_sizeof(png_text));
+ png_sizeof(png_text));
text_ptr->compression = comp_flag + 2;
text_ptr->key = key;
@@ -1570,7 +1565,7 @@ png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr)
png_free(png_ptr, text_ptr);
if (ret)
- png_warning(png_ptr, "Insufficient memory to store iTXt chunk.");
+ png_warning(png_ptr, "Insufficient memory to store iTXt chunk");
}
}
#endif
@@ -1587,10 +1582,10 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32
if (!(png_ptr->chunk_name[0] & 0x20))
{
-#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=
PNG_HANDLE_CHUNK_ALWAYS
-#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
+#ifdef PNG_READ_USER_CHUNKS_SUPPORTED
&& png_ptr->read_user_chunk_fn == NULL
#endif
)
@@ -1600,7 +1595,7 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32
info_ptr = info_ptr; /* To quiet some compiler warnings */
}
-#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
if (png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS)
{
#ifdef PNG_MAX_MALLOC_64K
@@ -1625,11 +1620,11 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32
else
{
png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)length);
+ (png_size_t)length);
png_crc_read(png_ptr, (png_bytep)png_ptr->unknown_chunk.data, length);
}
-#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
+#ifdef PNG_READ_USER_CHUNKS_SUPPORTED
if (png_ptr->read_user_chunk_fn != NULL)
{
/* Callback to user unknown chunk handler */
@@ -1690,10 +1685,9 @@ void PNGAPI
png_progressive_combine_row (png_structp png_ptr,
png_bytep old_row, png_bytep new_row)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_CONST int FARDATA png_pass_dsp_mask[7] =
{0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};
-#endif
+
if (png_ptr == NULL)
return;
diff --git a/src/3rdparty/libpng/pngpriv.h b/src/3rdparty/libpng/pngpriv.h
new file mode 100644
index 0000000000..87a4ba60a4
--- /dev/null
+++ b/src/3rdparty/libpng/pngpriv.h
@@ -0,0 +1,957 @@
+
+/* pngpriv.h - private declarations for use inside libpng
+ *
+ * libpng version 1.4.0 - January 3, 2010
+ * For conditions of distribution and use, see copyright notice in png.h
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
+ * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ *
+ * This code is released under the libpng license.
+ * For conditions of distribution and use, see the disclaimer
+ * and license in png.h
+ */
+
+/* The symbols declared in this file (including the functions declared
+ * as PNG_EXTERN) are PRIVATE. They are not part of the libpng public
+ * interface, and are not recommended for use by regular applications.
+ * Some of them may become public in the future; others may stay private,
+ * change in an incompatible way, or even disappear.
+ * Although the libpng users are not forbidden to include this header,
+ * they should be well aware of the issues that may arise from doing so.
+ */
+
+#ifndef PNGPRIV_H
+#define PNGPRIV_H
+
+#ifndef PNG_VERSION_INFO_ONLY
+
+#include <stdlib.h>
+
+/* The functions exported by PNG_EXTERN are internal functions, which
+ * aren't usually used outside the library (as far as I know), so it is
+ * debatable if they should be exported at all. In the future, when it
+ * is possible to have run-time registry of chunk-handling functions,
+ * some of these will be made available again.
+#define PNG_EXTERN extern
+ */
+#define PNG_EXTERN
+
+/* Other defines specific to compilers can go here. Try to keep
+ * them inside an appropriate ifdef/endif pair for portability.
+ */
+
+#ifdef PNG_FLOATING_POINT_SUPPORTED
+# ifdef MACOS
+ /* We need to check that <math.h> hasn't already been included earlier
+ * as it seems it doesn't agree with <fp.h>, yet we should really use
+ * <fp.h> if possible.
+ */
+# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
+# include <fp.h>
+# endif
+# else
+# include <math.h>
+# endif
+# if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
+ /* Amiga SAS/C: We must include builtin FPU functions when compiling using
+ * MATH=68881
+ */
+# include <m68881.h>
+# endif
+#endif
+
+/* Codewarrior on NT has linking problems without this. */
+#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)
+# define PNG_ALWAYS_EXTERN
+#endif
+
+/* This provides the non-ANSI (far) memory allocation routines. */
+#if defined(__TURBOC__) && defined(__MSDOS__)
+# include <mem.h>
+# include <alloc.h>
+#endif
+
+#if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \
+ defined(_WIN32) || defined(__WIN32__)
+# if !defined(__SYMBIAN32__)
+# include <windows.h> /* defines _WINDOWS_ macro */
+# endif
+/* I have no idea why is this necessary... */
+# ifdef _MSC_VER
+# include <malloc.h>
+# endif
+#endif
+
+/* Various modes of operation. Note that after an init, mode is set to
+ * zero automatically when the structure is created.
+ */
+#define PNG_HAVE_IHDR 0x01
+#define PNG_HAVE_PLTE 0x02
+#define PNG_HAVE_IDAT 0x04
+#define PNG_AFTER_IDAT 0x08 /* Have complete zlib datastream */
+#define PNG_HAVE_IEND 0x10
+#define PNG_HAVE_gAMA 0x20
+#define PNG_HAVE_cHRM 0x40
+#define PNG_HAVE_sRGB 0x80
+#define PNG_HAVE_CHUNK_HEADER 0x100
+#define PNG_WROTE_tIME 0x200
+#define PNG_WROTE_INFO_BEFORE_PLTE 0x400
+#define PNG_BACKGROUND_IS_GRAY 0x800
+#define PNG_HAVE_PNG_SIGNATURE 0x1000
+#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
+
+/* Flags for the transformations the PNG library does on the image data */
+#define PNG_BGR 0x0001
+#define PNG_INTERLACE 0x0002
+#define PNG_PACK 0x0004
+#define PNG_SHIFT 0x0008
+#define PNG_SWAP_BYTES 0x0010
+#define PNG_INVERT_MONO 0x0020
+#define PNG_DITHER 0x0040
+#define PNG_BACKGROUND 0x0080
+#define PNG_BACKGROUND_EXPAND 0x0100
+ /* 0x0200 unused */
+#define PNG_16_TO_8 0x0400
+#define PNG_RGBA 0x0800
+#define PNG_EXPAND 0x1000
+#define PNG_GAMMA 0x2000
+#define PNG_GRAY_TO_RGB 0x4000
+#define PNG_FILLER 0x8000L
+#define PNG_PACKSWAP 0x10000L
+#define PNG_SWAP_ALPHA 0x20000L
+#define PNG_STRIP_ALPHA 0x40000L
+#define PNG_INVERT_ALPHA 0x80000L
+#define PNG_USER_TRANSFORM 0x100000L
+#define PNG_RGB_TO_GRAY_ERR 0x200000L
+#define PNG_RGB_TO_GRAY_WARN 0x400000L
+#define PNG_RGB_TO_GRAY 0x600000L /* two bits, RGB_TO_GRAY_ERR|WARN */
+ /* 0x800000L Unused */
+#define PNG_ADD_ALPHA 0x1000000L /* Added to libpng-1.2.7 */
+#define PNG_EXPAND_tRNS 0x2000000L /* Added to libpng-1.2.9 */
+ /* 0x4000000L unused */
+ /* 0x8000000L unused */
+ /* 0x10000000L unused */
+ /* 0x20000000L unused */
+ /* 0x40000000L unused */
+
+/* Flags for png_create_struct */
+#define PNG_STRUCT_PNG 0x0001
+#define PNG_STRUCT_INFO 0x0002
+
+/* Scaling factor for filter heuristic weighting calculations */
+#define PNG_WEIGHT_SHIFT 8
+#define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT))
+#define PNG_COST_SHIFT 3
+#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT))
+
+/* Flags for the png_ptr->flags rather than declaring a byte for each one */
+#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001
+#define PNG_FLAG_ZLIB_CUSTOM_LEVEL 0x0002
+#define PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL 0x0004
+#define PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS 0x0008
+#define PNG_FLAG_ZLIB_CUSTOM_METHOD 0x0010
+#define PNG_FLAG_ZLIB_FINISHED 0x0020
+#define PNG_FLAG_ROW_INIT 0x0040
+#define PNG_FLAG_FILLER_AFTER 0x0080
+#define PNG_FLAG_CRC_ANCILLARY_USE 0x0100
+#define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200
+#define PNG_FLAG_CRC_CRITICAL_USE 0x0400
+#define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800
+ /* 0x1000 unused */
+ /* 0x2000 unused */
+ /* 0x4000 unused */
+#define PNG_FLAG_KEEP_UNKNOWN_CHUNKS 0x8000L
+#define PNG_FLAG_KEEP_UNSAFE_CHUNKS 0x10000L
+#define PNG_FLAG_LIBRARY_MISMATCH 0x20000L
+#define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000L
+#define PNG_FLAG_STRIP_ERROR_TEXT 0x80000L
+#define PNG_FLAG_MALLOC_NULL_MEM_OK 0x100000L
+#define PNG_FLAG_ADD_ALPHA 0x200000L /* Added to libpng-1.2.8 */
+#define PNG_FLAG_STRIP_ALPHA 0x400000L /* Added to libpng-1.2.8 */
+#define PNG_FLAG_BENIGN_ERRORS_WARN 0x800000L /* Added to libpng-1.4.0 */
+ /* 0x1000000L unused */
+ /* 0x2000000L unused */
+ /* 0x4000000L unused */
+ /* 0x8000000L unused */
+ /* 0x10000000L unused */
+ /* 0x20000000L unused */
+ /* 0x40000000L unused */
+
+#define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \
+ PNG_FLAG_CRC_ANCILLARY_NOWARN)
+
+#define PNG_FLAG_CRC_CRITICAL_MASK (PNG_FLAG_CRC_CRITICAL_USE | \
+ PNG_FLAG_CRC_CRITICAL_IGNORE)
+
+#define PNG_FLAG_CRC_MASK (PNG_FLAG_CRC_ANCILLARY_MASK | \
+ PNG_FLAG_CRC_CRITICAL_MASK)
+
+/* Save typing and make code easier to understand */
+
+#define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \
+ abs((int)((c1).green) - (int)((c2).green)) + \
+ abs((int)((c1).blue) - (int)((c2).blue)))
+
+/* Added to libpng-1.2.6 JB */
+#define PNG_ROWBYTES(pixel_bits, width) \
+ ((pixel_bits) >= 8 ? \
+ ((png_size_t)(width) * (((png_size_t)(pixel_bits)) >> 3)) : \
+ (( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3) )
+
+/* PNG_OUT_OF_RANGE returns true if value is outside the range
+ * ideal-delta..ideal+delta. Each argument is evaluated twice.
+ * "ideal" and "delta" should be constants, normally simple
+ * integers, "value" a variable. Added to libpng-1.2.6 JB
+ */
+#define PNG_OUT_OF_RANGE(value, ideal, delta) \
+ ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )
+
+/* Constant strings for known chunk types. If you need to add a chunk,
+ * define the name here, and add an invocation of the macro wherever it's
+ * needed.
+ */
+#define PNG_IHDR PNG_CONST png_byte png_IHDR[5] = { 73, 72, 68, 82, '\0'}
+#define PNG_IDAT PNG_CONST png_byte png_IDAT[5] = { 73, 68, 65, 84, '\0'}
+#define PNG_IEND PNG_CONST png_byte png_IEND[5] = { 73, 69, 78, 68, '\0'}
+#define PNG_PLTE PNG_CONST png_byte png_PLTE[5] = { 80, 76, 84, 69, '\0'}
+#define PNG_bKGD PNG_CONST png_byte png_bKGD[5] = { 98, 75, 71, 68, '\0'}
+#define PNG_cHRM PNG_CONST png_byte png_cHRM[5] = { 99, 72, 82, 77, '\0'}
+#define PNG_gAMA PNG_CONST png_byte png_gAMA[5] = {103, 65, 77, 65, '\0'}
+#define PNG_hIST PNG_CONST png_byte png_hIST[5] = {104, 73, 83, 84, '\0'}
+#define PNG_iCCP PNG_CONST png_byte png_iCCP[5] = {105, 67, 67, 80, '\0'}
+#define PNG_iTXt PNG_CONST png_byte png_iTXt[5] = {105, 84, 88, 116, '\0'}
+#define PNG_oFFs PNG_CONST png_byte png_oFFs[5] = {111, 70, 70, 115, '\0'}
+#define PNG_pCAL PNG_CONST png_byte png_pCAL[5] = {112, 67, 65, 76, '\0'}
+#define PNG_sCAL PNG_CONST png_byte png_sCAL[5] = {115, 67, 65, 76, '\0'}
+#define PNG_pHYs PNG_CONST png_byte png_pHYs[5] = {112, 72, 89, 115, '\0'}
+#define PNG_sBIT PNG_CONST png_byte png_sBIT[5] = {115, 66, 73, 84, '\0'}
+#define PNG_sPLT PNG_CONST png_byte png_sPLT[5] = {115, 80, 76, 84, '\0'}
+#define PNG_sRGB PNG_CONST png_byte png_sRGB[5] = {115, 82, 71, 66, '\0'}
+#define PNG_sTER PNG_CONST png_byte png_sTER[5] = {115, 84, 69, 82, '\0'}
+#define PNG_tEXt PNG_CONST png_byte png_tEXt[5] = {116, 69, 88, 116, '\0'}
+#define PNG_tIME PNG_CONST png_byte png_tIME[5] = {116, 73, 77, 69, '\0'}
+#define PNG_tRNS PNG_CONST png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'}
+#define PNG_zTXt PNG_CONST png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'}
+
+
+/* Inhibit C++ name-mangling for libpng functions but not for system calls. */
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/* These functions are used internally in the code. They generally
+ * shouldn't be used unless you are writing code to add or replace some
+ * functionality in libpng. More information about most functions can
+ * be found in the files where the functions are located.
+ */
+
+/* Allocate memory for an internal libpng struct */
+PNG_EXTERN png_voidp png_create_struct PNGARG((int type));
+
+/* Free memory from internal libpng struct */
+PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr));
+
+PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr
+ malloc_fn, png_voidp mem_ptr));
+PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr,
+ png_free_ptr free_fn, png_voidp mem_ptr));
+
+/* Free any memory that info_ptr points to and reset struct. */
+PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr,
+ png_infop info_ptr));
+
+/* Function to allocate memory for zlib. PNGAPI is disallowed. */
+PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, uInt size));
+
+/* Function to free memory for zlib. PNGAPI is disallowed. */
+PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr));
+
+/* Next four functions are used internally as callbacks. PNGAPI is required
+ * but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3. */
+
+PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr,
+ png_bytep data, png_size_t length));
+
+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
+PNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr,
+ png_bytep buffer, png_size_t length));
+#endif
+
+PNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr,
+ png_bytep data, png_size_t length));
+
+#ifdef PNG_WRITE_FLUSH_SUPPORTED
+#ifdef PNG_STDIO_SUPPORTED
+PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr));
+#endif
+#endif
+
+/* Reset the CRC variable */
+PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr));
+
+/* Write the "data" buffer to whatever output you are using */
+PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data,
+ png_size_t length));
+
+/* Read the chunk header (length + type name) */
+PNG_EXTERN png_uint_32 png_read_chunk_header PNGARG((png_structp png_ptr));
+
+/* Read data from whatever input you are using into the "data" buffer */
+PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data,
+ png_size_t length));
+
+/* Read bytes into buf, and update png_ptr->crc */
+PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf,
+ png_size_t length));
+
+/* Decompress data in a chunk that uses compression */
+#if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \
+ defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED)
+PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr,
+ int comp_type, png_size_t chunklength, png_size_t prefix_length,
+ png_size_t *data_length));
+#endif
+
+/* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */
+PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip));
+
+/* Read the CRC from the file and compare it to the libpng calculated CRC */
+PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr));
+
+/* Calculate the CRC over a section of data. Note that we are only
+ * passing a maximum of 64K on systems that have this as a memory limit,
+ * since this is the maximum buffer size we can specify.
+ */
+PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr,
+ png_size_t length));
+
+#ifdef PNG_WRITE_FLUSH_SUPPORTED
+PNG_EXTERN void png_flush PNGARG((png_structp png_ptr));
+#endif
+
+/* Write various chunks */
+
+/* Write the IHDR chunk, and update the png_struct with the necessary
+ * information.
+ */
+PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width,
+ png_uint_32 height,
+ int bit_depth, int color_type, int compression_method, int filter_method,
+ int interlace_method));
+
+PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette,
+ png_uint_32 num_pal));
+
+PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data,
+ png_size_t length));
+
+PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr));
+
+#ifdef PNG_WRITE_gAMA_SUPPORTED
+#ifdef PNG_FLOATING_POINT_SUPPORTED
+PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma));
+#endif
+#ifdef PNG_FIXED_POINT_SUPPORTED
+PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, png_fixed_point
+ file_gamma));
+#endif
+#endif
+
+#ifdef PNG_WRITE_sBIT_SUPPORTED
+PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit,
+ int color_type));
+#endif
+
+#ifdef PNG_WRITE_cHRM_SUPPORTED
+#ifdef PNG_FLOATING_POINT_SUPPORTED
+PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr,
+ double white_x, double white_y,
+ double red_x, double red_y, double green_x, double green_y,
+ double blue_x, double blue_y));
+#endif
+PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr,
+ png_fixed_point int_white_x, png_fixed_point int_white_y,
+ png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
+ int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
+ png_fixed_point int_blue_y));
+#endif
+
+#ifdef PNG_WRITE_sRGB_SUPPORTED
+PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr,
+ int intent));
+#endif
+
+#ifdef PNG_WRITE_iCCP_SUPPORTED
+PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr,
+ png_charp name, int compression_type,
+ png_charp profile, int proflen));
+ /* Note to maintainer: profile should be png_bytep */
+#endif
+
+#ifdef PNG_WRITE_sPLT_SUPPORTED
+PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr,
+ png_sPLT_tp palette));
+#endif
+
+#ifdef PNG_WRITE_tRNS_SUPPORTED
+PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans,
+ png_color_16p values, int number, int color_type));
+#endif
+
+#ifdef PNG_WRITE_bKGD_SUPPORTED
+PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr,
+ png_color_16p values, int color_type));
+#endif
+
+#ifdef PNG_WRITE_hIST_SUPPORTED
+PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist,
+ int num_hist));
+#endif
+
+#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \
+ defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)
+PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr,
+ png_charp key, png_charpp new_key));
+#endif
+
+#ifdef PNG_WRITE_tEXt_SUPPORTED
+PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key,
+ png_charp text, png_size_t text_len));
+#endif
+
+#ifdef PNG_WRITE_zTXt_SUPPORTED
+PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key,
+ png_charp text, png_size_t text_len, int compression));
+#endif
+
+#ifdef PNG_WRITE_iTXt_SUPPORTED
+PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr,
+ int compression, png_charp key, png_charp lang, png_charp lang_key,
+ png_charp text));
+#endif
+
+#ifdef PNG_TEXT_SUPPORTED /* Added at version 1.0.14 and 1.2.4 */
+PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr,
+ png_infop info_ptr, png_textp text_ptr, int num_text));
+#endif
+
+#ifdef PNG_WRITE_oFFs_SUPPORTED
+PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr,
+ png_int_32 x_offset, png_int_32 y_offset, int unit_type));
+#endif
+
+#ifdef PNG_WRITE_pCAL_SUPPORTED
+PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose,
+ png_int_32 X0, png_int_32 X1, int type, int nparams,
+ png_charp units, png_charpp params));
+#endif
+
+#ifdef PNG_WRITE_pHYs_SUPPORTED
+PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr,
+ png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit,
+ int unit_type));
+#endif
+
+#ifdef PNG_WRITE_tIME_SUPPORTED
+PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr,
+ png_timep mod_time));
+#endif
+
+#ifdef PNG_WRITE_sCAL_SUPPORTED
+#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED)
+PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr,
+ int unit, double width, double height));
+#else
+#ifdef PNG_FIXED_POINT_SUPPORTED
+PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr,
+ int unit, png_charp width, png_charp height));
+#endif
+#endif
+#endif
+
+/* Called when finished processing a row of data */
+PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr));
+
+/* Internal use only. Called before first row of data */
+PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr));
+
+#ifdef PNG_READ_GAMMA_SUPPORTED
+PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr,
+ png_byte bit_depth));
+#endif
+
+/* Combine a row of data, dealing with alpha, etc. if requested */
+PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row,
+ int mask));
+
+#ifdef PNG_READ_INTERLACING_SUPPORTED
+/* Expand an interlaced row */
+/* OLD pre-1.0.9 interface:
+PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info,
+ png_bytep row, int pass, png_uint_32 transformations));
+ */
+PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr));
+#endif
+
+/* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */
+
+#ifdef PNG_WRITE_INTERLACING_SUPPORTED
+/* Grab pixels out of a row for an interlaced pass */
+PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info,
+ png_bytep row, int pass));
+#endif
+
+/* Unfilter a row */
+PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr,
+ png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter));
+
+/* Choose the best filter to use and filter the row data */
+PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr,
+ png_row_infop row_info));
+
+/* Write out the filtered row. */
+PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr,
+ png_bytep filtered_row));
+/* Finish a row while reading, dealing with interlacing passes, etc. */
+PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr));
+
+/* Initialize the row buffers, etc. */
+PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr));
+/* Optional call to update the users info structure */
+PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr,
+ png_infop info_ptr));
+
+/* These are the functions that do the transformations */
+#ifdef PNG_READ_FILLER_SUPPORTED
+PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info,
+ png_bytep row, png_uint_32 filler, png_uint_32 flags));
+#endif
+
+#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED
+PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info,
+ png_bytep row));
+#endif
+
+#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
+PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info,
+ png_bytep row));
+#endif
+
+#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
+PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info,
+ png_bytep row));
+#endif
+
+#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
+PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info,
+ png_bytep row));
+#endif
+
+#if defined(PNG_WRITE_FILLER_SUPPORTED) || \
+ defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
+PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info,
+ png_bytep row, png_uint_32 flags));
+#endif
+
+#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
+PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row));
+#endif
+
+#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED)
+PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row));
+#endif
+
+#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
+PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop
+ row_info, png_bytep row));
+#endif
+
+#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
+PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info,
+ png_bytep row));
+#endif
+
+#ifdef PNG_READ_PACK_SUPPORTED
+PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, png_bytep row));
+#endif
+
+#ifdef PNG_READ_SHIFT_SUPPORTED
+PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row,
+ png_color_8p sig_bits));
+#endif
+
+#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
+PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, png_bytep row));
+#endif
+
+#ifdef PNG_READ_16_TO_8_SUPPORTED
+PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row));
+#endif
+
+#ifdef PNG_READ_DITHER_SUPPORTED
+PNG_EXTERN void png_do_dither PNGARG((png_row_infop row_info,
+ png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup));
+
+# ifdef PNG_CORRECT_PALETTE_SUPPORTED
+PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr,
+ png_colorp palette, int num_palette));
+# endif
+#endif
+
+#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
+PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, png_bytep row));
+#endif
+
+#ifdef PNG_WRITE_PACK_SUPPORTED
+PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info,
+ png_bytep row, png_uint_32 bit_depth));
+#endif
+
+#ifdef PNG_WRITE_SHIFT_SUPPORTED
+PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row,
+ png_color_8p bit_depth));
+#endif
+
+#ifdef PNG_READ_BACKGROUND_SUPPORTED
+#ifdef PNG_READ_GAMMA_SUPPORTED
+PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
+ png_color_16p trans_color, png_color_16p background,
+ png_color_16p background_1,
+ png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,
+ png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1,
+ png_uint_16pp gamma_16_to_1, int gamma_shift));
+#else
+PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
+ png_color_16p trans_color, png_color_16p background));
+#endif
+#endif
+
+#ifdef PNG_READ_GAMMA_SUPPORTED
+PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row,
+ png_bytep gamma_table, png_uint_16pp gamma_16_table,
+ int gamma_shift));
+#endif
+
+#ifdef PNG_READ_EXPAND_SUPPORTED
+PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info,
+ png_bytep row, png_colorp palette, png_bytep trans, int num_trans));
+PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info,
+ png_bytep row, png_color_16p trans_value));
+#endif
+
+/* The following decodes the appropriate chunks, and does error correction,
+ * then calls the appropriate callback for the chunk if it is valid.
+ */
+
+/* Decode the IHDR chunk */
+PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+
+#ifdef PNG_READ_bKGD_SUPPORTED
+PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_cHRM_SUPPORTED
+PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_gAMA_SUPPORTED
+PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_hIST_SUPPORTED
+PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_iCCP_SUPPORTED
+extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+#endif /* PNG_READ_iCCP_SUPPORTED */
+
+#ifdef PNG_READ_iTXt_SUPPORTED
+PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_oFFs_SUPPORTED
+PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_pCAL_SUPPORTED
+PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_pHYs_SUPPORTED
+PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_sBIT_SUPPORTED
+PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_sCAL_SUPPORTED
+PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_sPLT_SUPPORTED
+extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+#endif /* PNG_READ_sPLT_SUPPORTED */
+
+#ifdef PNG_READ_sRGB_SUPPORTED
+PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_tEXt_SUPPORTED
+PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_tIME_SUPPORTED
+PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_tRNS_SUPPORTED
+PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+#endif
+
+#ifdef PNG_READ_zTXt_SUPPORTED
+PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
+#endif
+
+PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,
+ png_infop info_ptr, png_uint_32 length));
+
+PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr,
+ png_bytep chunk_name));
+
+/* Handle the transformations for reading and writing */
+PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr));
+PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr));
+
+PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr));
+
+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
+PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr,
+ png_infop info_ptr));
+PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr,
+ png_infop info_ptr));
+PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr));
+PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr,
+ png_uint_32 length));
+PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr));
+PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr));
+PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr,
+ png_bytep buffer, png_size_t buffer_length));
+PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr));
+PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr,
+ png_bytep buffer, png_size_t buffer_length));
+PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr));
+PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr,
+ png_infop info_ptr, png_uint_32 length));
+PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr,
+ png_infop info_ptr));
+PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr,
+ png_infop info_ptr));
+PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row));
+PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr,
+ png_infop info_ptr));
+PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr,
+ png_infop info_ptr));
+PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr));
+#ifdef PNG_READ_tEXt_SUPPORTED
+PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr,
+ png_infop info_ptr, png_uint_32 length));
+PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr,
+ png_infop info_ptr));
+#endif
+#ifdef PNG_READ_zTXt_SUPPORTED
+PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr,
+ png_infop info_ptr, png_uint_32 length));
+PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr,
+ png_infop info_ptr));
+#endif
+#ifdef PNG_READ_iTXt_SUPPORTED
+PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr,
+ png_infop info_ptr, png_uint_32 length));
+PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr,
+ png_infop info_ptr));
+#endif
+
+#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
+
+#ifdef PNG_MNG_FEATURES_SUPPORTED
+PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info,
+ png_bytep row));
+PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info,
+ png_bytep row));
+#endif
+
+/* Added at libpng version 1.4.0 */
+#ifdef PNG_cHRM_SUPPORTED
+PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr,
+ png_fixed_point int_white_x, png_fixed_point int_white_y,
+ png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
+ int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
+ png_fixed_point int_blue_y));
+#endif
+
+#ifdef PNG_cHRM_SUPPORTED
+#ifdef PNG_CHECK_cHRM_SUPPORTED
+/* Added at libpng version 1.2.34 and 1.4.0 */
+PNG_EXTERN void png_64bit_product PNGARG((long v1, long v2,
+ unsigned long *hi_product, unsigned long *lo_product));
+#endif
+#endif
+
+/* Added at libpng version 1.4.0 */
+PNG_EXTERN void png_check_IHDR PNGARG((png_structp png_ptr,
+ png_uint_32 width, png_uint_32 height, int bit_depth,
+ int color_type, int interlace_type, int compression_type,
+ int filter_type));
+
+/* Free all memory used by the read (old method - NOT DLL EXPORTED) */
+extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_infop end_info_ptr));
+
+/* Free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */
+extern void png_write_destroy PNGARG((png_structp png_ptr));
+
+#ifdef USE_FAR_KEYWORD /* memory model conversion function */
+extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr,
+ int check));
+#endif /* USE_FAR_KEYWORD */
+
+/* Define PNG_DEBUG at compile time for debugging information. Higher
+ * numbers for PNG_DEBUG mean more debugging information. This has
+ * only been added since version 0.95 so it is not implemented throughout
+ * libpng yet, but more support will be added as needed.
+ */
+#ifdef PNG_DEBUG
+#if (PNG_DEBUG > 0)
+#if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER)
+#include <crtdbg.h>
+#if (PNG_DEBUG > 1)
+#ifndef _DEBUG
+# define _DEBUG
+#endif
+#ifndef png_debug
+#define png_debug(l,m) _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE)
+#endif
+#ifndef png_debug1
+#define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1)
+#endif
+#ifndef png_debug2
+#define png_debug2(l,m,p1,p2) _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2)
+#endif
+#endif
+#else /* PNG_DEBUG_FILE || !_MSC_VER */
+#ifndef PNG_DEBUG_FILE
+#define PNG_DEBUG_FILE stderr
+#endif /* PNG_DEBUG_FILE */
+
+#if (PNG_DEBUG > 1)
+/* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on
+ * non-ISO compilers
+ */
+# ifdef __STDC__
+# ifndef png_debug
+# define png_debug(l,m) \
+ { \
+ int num_tabs=l; \
+ fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
+ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \
+ }
+# endif
+# ifndef png_debug1
+# define png_debug1(l,m,p1) \
+ { \
+ int num_tabs=l; \
+ fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
+ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \
+ }
+# endif
+# ifndef png_debug2
+# define png_debug2(l,m,p1,p2) \
+ { \
+ int num_tabs=l; \
+ fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
+ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \
+ }
+# endif
+# else /* __STDC __ */
+# ifndef png_debug
+# define png_debug(l,m) \
+ { \
+ int num_tabs=l; \
+ char format[256]; \
+ snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
+ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
+ m,PNG_STRING_NEWLINE); \
+ fprintf(PNG_DEBUG_FILE,format); \
+ }
+# endif
+# ifndef png_debug1
+# define png_debug1(l,m,p1) \
+ { \
+ int num_tabs=l; \
+ char format[256]; \
+ snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
+ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
+ m,PNG_STRING_NEWLINE); \
+ fprintf(PNG_DEBUG_FILE,format,p1); \
+ }
+# endif
+# ifndef png_debug2
+# define png_debug2(l,m,p1,p2) \
+ { \
+ int num_tabs=l; \
+ char format[256]; \
+ snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
+ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
+ m,PNG_STRING_NEWLINE); \
+ fprintf(PNG_DEBUG_FILE,format,p1,p2); \
+ }
+# endif
+# endif /* __STDC __ */
+#endif /* (PNG_DEBUG > 1) */
+
+#endif /* _MSC_VER */
+#endif /* (PNG_DEBUG > 0) */
+#endif /* PNG_DEBUG */
+#ifndef png_debug
+#define png_debug(l, m)
+#endif
+#ifndef png_debug1
+#define png_debug1(l, m, p1)
+#endif
+#ifndef png_debug2
+#define png_debug2(l, m, p1, p2)
+#endif
+
+/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PNG_VERSION_INFO_ONLY */
+#endif /* PNGPRIV_H */
diff --git a/src/3rdparty/libpng/pngread.c b/src/3rdparty/libpng/pngread.c
index a4cbb3e226..1b3a3f575a 100644
--- a/src/3rdparty/libpng/pngread.c
+++ b/src/3rdparty/libpng/pngread.c
@@ -1,8 +1,8 @@
/* pngread.c - read a PNG file
*
- * Last changed in libpng 1.2.37 [June 4, 2009]
- * Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.0 [January 3, 2010]
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -14,9 +14,11 @@
* read a PNG file or stream.
*/
-#define PNG_INTERNAL
+#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
-#if defined(PNG_READ_SUPPORTED)
+#ifdef PNG_READ_SUPPORTED
+#include "pngpriv.h"
+
/* Create a PNG structure for reading, and allocate any memory needed. */
png_structp PNGAPI
@@ -26,7 +28,7 @@ png_create_read_struct(png_const_charp user_png_ver, png_voidp error_ptr,
#ifdef PNG_USER_MEM_SUPPORTED
return (png_create_read_struct_2(user_png_ver, error_ptr, error_fn,
- warn_fn, png_voidp_NULL, png_malloc_ptr_NULL, png_free_ptr_NULL));
+ warn_fn, NULL, NULL, NULL));
}
/* Alternate create PNG structure for reading, and allocate any memory needed. */
@@ -41,6 +43,7 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
volatile
#endif
png_structp png_ptr;
+ volatile int png_cleanup_needed = 0;
#ifdef PNG_SETJMP_SUPPORTED
#ifdef USE_FAR_KEYWORD
@@ -51,9 +54,10 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
int i;
png_debug(1, "in png_create_read_struct");
+
#ifdef PNG_USER_MEM_SUPPORTED
png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG,
- (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr);
+ malloc_fn, mem_ptr);
#else
png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG);
#endif
@@ -62,31 +66,26 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
/* Added at libpng-1.2.6 */
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
- png_ptr->user_width_max=PNG_USER_WIDTH_MAX;
- png_ptr->user_height_max=PNG_USER_HEIGHT_MAX;
+ png_ptr->user_width_max = PNG_USER_WIDTH_MAX;
+ png_ptr->user_height_max = PNG_USER_HEIGHT_MAX;
+ /* Added at libpng-1.4.0 */
+ png_ptr->user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX;
#endif
#ifdef PNG_SETJMP_SUPPORTED
+/* Applications that neglect to set up their own setjmp() and then
+ encounter a png_error() will longjmp here. Since the jmpbuf is
+ then meaningless we abort instead of returning. */
#ifdef USE_FAR_KEYWORD
if (setjmp(jmpbuf))
#else
- if (setjmp(png_ptr->jmpbuf))
+ if (setjmp(png_jmpbuf(png_ptr))) /* Sets longjmp to match setjmp */
#endif
- {
- png_free(png_ptr, png_ptr->zbuf);
- png_ptr->zbuf = NULL;
-#ifdef PNG_USER_MEM_SUPPORTED
- png_destroy_struct_2((png_voidp)png_ptr,
- (png_free_ptr)free_fn, (png_voidp)mem_ptr);
-#else
- png_destroy_struct((png_voidp)png_ptr);
-#endif
- return (NULL);
- }
+ PNG_ABORT();
#ifdef USE_FAR_KEYWORD
- png_memcpy(png_ptr->jmpbuf, jmpbuf, png_sizeof(jmp_buf));
-#endif
+ png_memcpy(png_jmpbuf(png_ptr), jmpbuf, png_sizeof(jmp_buf));
#endif
+#endif /* PNG_SETJMP_SUPPORTED */
#ifdef PNG_USER_MEM_SUPPORTED
png_set_mem_fn(png_ptr, mem_ptr, malloc_fn, free_fn);
@@ -96,230 +95,105 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
if (user_png_ver)
{
- i = 0;
- do
- {
- if (user_png_ver[i] != png_libpng_ver[i])
- png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
- } while (png_libpng_ver[i++]);
- }
- else
- png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
-
-
- if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH)
- {
- /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so
- * we must recompile any applications that use any older library version.
- * For versions after libpng 1.0, we will be compatible, so we need
- * only check the first digit.
- */
- if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] ||
- (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) ||
- (user_png_ver[0] == '0' && user_png_ver[2] < '9'))
- {
-#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
- char msg[80];
- if (user_png_ver)
- {
- png_snprintf(msg, 80,
- "Application was compiled with png.h from libpng-%.20s",
- user_png_ver);
- png_warning(png_ptr, msg);
- }
- png_snprintf(msg, 80,
+ i = 0;
+ do
+ {
+ if (user_png_ver[i] != png_libpng_ver[i])
+ png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
+ } while (png_libpng_ver[i++]);
+ }
+ else
+ png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
+
+
+ if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH)
+ {
+ /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so
+ * we must recompile any applications that use any older library version.
+ * For versions after libpng 1.0, we will be compatible, so we need
+ * only check the first digit.
+ */
+ if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] ||
+ (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) ||
+ (user_png_ver[0] == '0' && user_png_ver[2] < '9'))
+ {
+#ifdef PNG_STDIO_SUPPORTED
+ char msg[80];
+ if (user_png_ver)
+ {
+ png_snprintf(msg, 80,
+ "Application was compiled with png.h from libpng-%.20s",
+ user_png_ver);
+ png_warning(png_ptr, msg);
+ }
+ png_snprintf(msg, 80,
"Application is running with png.c from libpng-%.20s",
- png_libpng_ver);
- png_warning(png_ptr, msg);
+ png_libpng_ver);
+ png_warning(png_ptr, msg);
#endif
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
- png_ptr->flags = 0;
+ png_ptr->flags = 0;
#endif
- png_error(png_ptr,
- "Incompatible libpng version in application and library");
- }
+ png_warning(png_ptr,
+ "Incompatible libpng version in application and library");
+
+ png_cleanup_needed = 1;
+ }
}
+ if (!png_cleanup_needed)
+ {
/* Initialize zbuf - compression buffer */
png_ptr->zbuf_size = PNG_ZBUF_SIZE;
- png_ptr->zbuf = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)png_ptr->zbuf_size);
+ png_ptr->zbuf = (png_bytep)png_malloc_warn(png_ptr,
+ png_ptr->zbuf_size);
+ if (png_ptr->zbuf == NULL)
+ png_cleanup_needed = 1;
+ }
png_ptr->zstream.zalloc = png_zalloc;
png_ptr->zstream.zfree = png_zfree;
png_ptr->zstream.opaque = (voidpf)png_ptr;
- switch (inflateInit(&png_ptr->zstream))
+ if (!png_cleanup_needed)
{
- case Z_OK: /* Do nothing */ break;
- case Z_MEM_ERROR:
- case Z_STREAM_ERROR: png_error(png_ptr, "zlib memory error"); break;
- case Z_VERSION_ERROR: png_error(png_ptr, "zlib version error"); break;
- default: png_error(png_ptr, "Unknown zlib error");
- }
-
- png_ptr->zstream.next_out = png_ptr->zbuf;
- png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
-
- png_set_read_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL);
-
-#ifdef PNG_SETJMP_SUPPORTED
-/* Applications that neglect to set up their own setjmp() and then encounter
- a png_error() will longjmp here. Since the jmpbuf is then meaningless we
- abort instead of returning. */
-#ifdef USE_FAR_KEYWORD
- if (setjmp(jmpbuf))
- PNG_ABORT();
- png_memcpy(png_ptr->jmpbuf, jmpbuf, png_sizeof(jmp_buf));
-#else
- if (setjmp(png_ptr->jmpbuf))
- PNG_ABORT();
-#endif
-#endif
- return (png_ptr);
-}
-
-#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
-/* Initialize PNG structure for reading, and allocate any memory needed.
- This interface is deprecated in favour of the png_create_read_struct(),
- and it will disappear as of libpng-1.3.0. */
-#undef png_read_init
-void PNGAPI
-png_read_init(png_structp png_ptr)
-{
- /* We only come here via pre-1.0.7-compiled applications */
- png_read_init_2(png_ptr, "1.0.6 or earlier", 0, 0);
-}
-
-void PNGAPI
-png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver,
- png_size_t png_struct_size, png_size_t png_info_size)
-{
- /* We only come here via pre-1.0.12-compiled applications */
- if (png_ptr == NULL)
- return;
-#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
- if (png_sizeof(png_struct) > png_struct_size ||
- png_sizeof(png_info) > png_info_size)
- {
- char msg[80];
- png_ptr->warning_fn = NULL;
- if (user_png_ver)
+ switch (inflateInit(&png_ptr->zstream))
{
- png_snprintf(msg, 80,
- "Application was compiled with png.h from libpng-%.20s",
- user_png_ver);
- png_warning(png_ptr, msg);
+ case Z_OK: /* Do nothing */ break;
+ case Z_MEM_ERROR:
+ case Z_STREAM_ERROR: png_warning(png_ptr, "zlib memory error");
+ png_cleanup_needed = 1; break;
+ case Z_VERSION_ERROR: png_warning(png_ptr, "zlib version error");
+ png_cleanup_needed = 1; break;
+ default: png_warning(png_ptr, "Unknown zlib error");
+ png_cleanup_needed = 1;
}
- png_snprintf(msg, 80,
- "Application is running with png.c from libpng-%.20s",
- png_libpng_ver);
- png_warning(png_ptr, msg);
}
-#endif
- if (png_sizeof(png_struct) > png_struct_size)
- {
- png_ptr->error_fn = NULL;
-#ifdef PNG_ERROR_NUMBERS_SUPPORTED
- png_ptr->flags = 0;
-#endif
- png_error(png_ptr,
- "The png struct allocated by the application for reading is too small.");
- }
- if (png_sizeof(png_info) > png_info_size)
- {
- png_ptr->error_fn = NULL;
-#ifdef PNG_ERROR_NUMBERS_SUPPORTED
- png_ptr->flags = 0;
-#endif
- png_error(png_ptr,
- "The info struct allocated by application for reading is too small.");
- }
- png_read_init_3(&png_ptr, user_png_ver, png_struct_size);
-}
-#endif /* PNG_1_0_X || PNG_1_2_X */
-
-void PNGAPI
-png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
- png_size_t png_struct_size)
-{
-#ifdef PNG_SETJMP_SUPPORTED
- jmp_buf tmp_jmp; /* to save current jump buffer */
-#endif
-
- int i = 0;
-
- png_structp png_ptr=*ptr_ptr;
- if (png_ptr == NULL)
- return;
-
- do
+ if (png_cleanup_needed)
{
- if (user_png_ver[i] != png_libpng_ver[i])
- {
-#ifdef PNG_LEGACY_SUPPORTED
- png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
+ /* Clean up PNG structure and deallocate any memory. */
+ png_free(png_ptr, png_ptr->zbuf);
+ png_ptr->zbuf = NULL;
+#ifdef PNG_USER_MEM_SUPPORTED
+ png_destroy_struct_2((png_voidp)png_ptr,
+ (png_free_ptr)free_fn, (png_voidp)mem_ptr);
#else
- png_ptr->warning_fn = NULL;
- png_warning(png_ptr,
- "Application uses deprecated png_read_init() and should be recompiled.");
- break;
-#endif
- }
- } while (png_libpng_ver[i++]);
-
- png_debug(1, "in png_read_init_3");
-
-#ifdef PNG_SETJMP_SUPPORTED
- /* Save jump buffer and error functions */
- png_memcpy(tmp_jmp, png_ptr->jmpbuf, png_sizeof(jmp_buf));
-#endif
-
- if (png_sizeof(png_struct) > png_struct_size)
- {
- png_destroy_struct(png_ptr);
- *ptr_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG);
- png_ptr = *ptr_ptr;
- }
-
- /* Reset all variables to 0 */
- png_memset(png_ptr, 0, png_sizeof(png_struct));
-
-#ifdef PNG_SETJMP_SUPPORTED
- /* Restore jump buffer */
- png_memcpy(png_ptr->jmpbuf, tmp_jmp, png_sizeof(jmp_buf));
-#endif
-
- /* Added at libpng-1.2.6 */
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
- png_ptr->user_width_max=PNG_USER_WIDTH_MAX;
- png_ptr->user_height_max=PNG_USER_HEIGHT_MAX;
+ png_destroy_struct((png_voidp)png_ptr);
#endif
-
- /* Initialize zbuf - compression buffer */
- png_ptr->zbuf_size = PNG_ZBUF_SIZE;
- png_ptr->zbuf = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)png_ptr->zbuf_size);
- png_ptr->zstream.zalloc = png_zalloc;
- png_ptr->zstream.zfree = png_zfree;
- png_ptr->zstream.opaque = (voidpf)png_ptr;
-
- switch (inflateInit(&png_ptr->zstream))
- {
- case Z_OK: /* Do nothing */ break;
- case Z_MEM_ERROR:
- case Z_STREAM_ERROR: png_error(png_ptr, "zlib memory"); break;
- case Z_VERSION_ERROR: png_error(png_ptr, "zlib version"); break;
- default: png_error(png_ptr, "Unknown zlib error");
+ return (NULL);
}
png_ptr->zstream.next_out = png_ptr->zbuf;
png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
- png_set_read_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL);
+ png_set_read_fn(png_ptr, NULL, NULL);
+
+
+ return (png_ptr);
}
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
+
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read the information before the actual image data. This has been
* changed in v0.90 to allow reading a file that already has the magic
* bytes read from the stream. You can tell libpng how many bytes have
@@ -331,15 +205,21 @@ png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
void PNGAPI
png_read_info(png_structp png_ptr, png_infop info_ptr)
{
+ png_debug(1, "in png_read_info");
+
if (png_ptr == NULL || info_ptr == NULL)
return;
- png_debug(1, "in png_read_info");
+
/* If we haven't checked all of the PNG signature bytes, do so now. */
if (png_ptr->sig_bytes < 8)
{
png_size_t num_checked = png_ptr->sig_bytes,
num_to_check = 8 - num_checked;
+#ifdef PNG_IO_STATE_SUPPORTED
+ png_ptr->io_state = PNG_IO_READING | PNG_IO_SIGNATURE;
+#endif
+
png_read_data(png_ptr, &(info_ptr->signature[num_checked]), num_to_check);
png_ptr->sig_bytes = 8;
@@ -357,63 +237,61 @@ png_read_info(png_structp png_ptr, png_infop info_ptr)
for (;;)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
- PNG_CONST PNG_IHDR;
- PNG_CONST PNG_IDAT;
- PNG_CONST PNG_IEND;
- PNG_CONST PNG_PLTE;
-#if defined(PNG_READ_bKGD_SUPPORTED)
- PNG_CONST PNG_bKGD;
+ PNG_IHDR;
+ PNG_IDAT;
+ PNG_IEND;
+ PNG_PLTE;
+#ifdef PNG_READ_bKGD_SUPPORTED
+ PNG_bKGD;
#endif
-#if defined(PNG_READ_cHRM_SUPPORTED)
- PNG_CONST PNG_cHRM;
+#ifdef PNG_READ_cHRM_SUPPORTED
+ PNG_cHRM;
#endif
-#if defined(PNG_READ_gAMA_SUPPORTED)
- PNG_CONST PNG_gAMA;
+#ifdef PNG_READ_gAMA_SUPPORTED
+ PNG_gAMA;
#endif
-#if defined(PNG_READ_hIST_SUPPORTED)
- PNG_CONST PNG_hIST;
+#ifdef PNG_READ_hIST_SUPPORTED
+ PNG_hIST;
#endif
-#if defined(PNG_READ_iCCP_SUPPORTED)
- PNG_CONST PNG_iCCP;
+#ifdef PNG_READ_iCCP_SUPPORTED
+ PNG_iCCP;
#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
- PNG_CONST PNG_iTXt;
+#ifdef PNG_READ_iTXt_SUPPORTED
+ PNG_iTXt;
#endif
-#if defined(PNG_READ_oFFs_SUPPORTED)
- PNG_CONST PNG_oFFs;
+#ifdef PNG_READ_oFFs_SUPPORTED
+ PNG_oFFs;
#endif
-#if defined(PNG_READ_pCAL_SUPPORTED)
- PNG_CONST PNG_pCAL;
+#ifdef PNG_READ_pCAL_SUPPORTED
+ PNG_pCAL;
#endif
-#if defined(PNG_READ_pHYs_SUPPORTED)
- PNG_CONST PNG_pHYs;
+#ifdef PNG_READ_pHYs_SUPPORTED
+ PNG_pHYs;
#endif
-#if defined(PNG_READ_sBIT_SUPPORTED)
- PNG_CONST PNG_sBIT;
+#ifdef PNG_READ_sBIT_SUPPORTED
+ PNG_sBIT;
#endif
-#if defined(PNG_READ_sCAL_SUPPORTED)
- PNG_CONST PNG_sCAL;
+#ifdef PNG_READ_sCAL_SUPPORTED
+ PNG_sCAL;
#endif
-#if defined(PNG_READ_sPLT_SUPPORTED)
- PNG_CONST PNG_sPLT;
+#ifdef PNG_READ_sPLT_SUPPORTED
+ PNG_sPLT;
#endif
-#if defined(PNG_READ_sRGB_SUPPORTED)
- PNG_CONST PNG_sRGB;
+#ifdef PNG_READ_sRGB_SUPPORTED
+ PNG_sRGB;
#endif
-#if defined(PNG_READ_tEXt_SUPPORTED)
- PNG_CONST PNG_tEXt;
+#ifdef PNG_READ_tEXt_SUPPORTED
+ PNG_tEXt;
#endif
-#if defined(PNG_READ_tIME_SUPPORTED)
- PNG_CONST PNG_tIME;
+#ifdef PNG_READ_tIME_SUPPORTED
+ PNG_tIME;
#endif
-#if defined(PNG_READ_tRNS_SUPPORTED)
- PNG_CONST PNG_tRNS;
+#ifdef PNG_READ_tRNS_SUPPORTED
+ PNG_tRNS;
#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
- PNG_CONST PNG_zTXt;
+#ifdef PNG_READ_zTXt_SUPPORTED
+ PNG_zTXt;
#endif
-#endif /* PNG_USE_LOCAL_ARRAYS */
png_uint_32 length = png_read_chunk_header(png_ptr);
PNG_CONST png_bytep chunk_name = png_ptr->chunk_name;
@@ -461,71 +339,71 @@ png_read_info(png_structp png_ptr, png_infop info_ptr)
png_ptr->mode |= PNG_HAVE_IDAT;
break;
}
-#if defined(PNG_READ_bKGD_SUPPORTED)
+#ifdef PNG_READ_bKGD_SUPPORTED
else if (!png_memcmp(chunk_name, png_bKGD, 4))
png_handle_bKGD(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_cHRM_SUPPORTED)
+#ifdef PNG_READ_cHRM_SUPPORTED
else if (!png_memcmp(chunk_name, png_cHRM, 4))
png_handle_cHRM(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_gAMA_SUPPORTED)
+#ifdef PNG_READ_gAMA_SUPPORTED
else if (!png_memcmp(chunk_name, png_gAMA, 4))
png_handle_gAMA(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_hIST_SUPPORTED)
+#ifdef PNG_READ_hIST_SUPPORTED
else if (!png_memcmp(chunk_name, png_hIST, 4))
png_handle_hIST(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_oFFs_SUPPORTED)
+#ifdef PNG_READ_oFFs_SUPPORTED
else if (!png_memcmp(chunk_name, png_oFFs, 4))
png_handle_oFFs(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_pCAL_SUPPORTED)
+#ifdef PNG_READ_pCAL_SUPPORTED
else if (!png_memcmp(chunk_name, png_pCAL, 4))
png_handle_pCAL(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_sCAL_SUPPORTED)
+#ifdef PNG_READ_sCAL_SUPPORTED
else if (!png_memcmp(chunk_name, png_sCAL, 4))
png_handle_sCAL(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_pHYs_SUPPORTED)
+#ifdef PNG_READ_pHYs_SUPPORTED
else if (!png_memcmp(chunk_name, png_pHYs, 4))
png_handle_pHYs(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_sBIT_SUPPORTED)
+#ifdef PNG_READ_sBIT_SUPPORTED
else if (!png_memcmp(chunk_name, png_sBIT, 4))
png_handle_sBIT(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_sRGB_SUPPORTED)
+#ifdef PNG_READ_sRGB_SUPPORTED
else if (!png_memcmp(chunk_name, png_sRGB, 4))
png_handle_sRGB(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_iCCP_SUPPORTED)
+#ifdef PNG_READ_iCCP_SUPPORTED
else if (!png_memcmp(chunk_name, png_iCCP, 4))
png_handle_iCCP(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_sPLT_SUPPORTED)
+#ifdef PNG_READ_sPLT_SUPPORTED
else if (!png_memcmp(chunk_name, png_sPLT, 4))
png_handle_sPLT(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_tEXt_SUPPORTED)
+#ifdef PNG_READ_tEXt_SUPPORTED
else if (!png_memcmp(chunk_name, png_tEXt, 4))
png_handle_tEXt(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_tIME_SUPPORTED)
+#ifdef PNG_READ_tIME_SUPPORTED
else if (!png_memcmp(chunk_name, png_tIME, 4))
png_handle_tIME(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_tRNS_SUPPORTED)
+#ifdef PNG_READ_tRNS_SUPPORTED
else if (!png_memcmp(chunk_name, png_tRNS, 4))
png_handle_tRNS(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
+#ifdef PNG_READ_zTXt_SUPPORTED
else if (!png_memcmp(chunk_name, png_zTXt, 4))
png_handle_zTXt(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
+#ifdef PNG_READ_iTXt_SUPPORTED
else if (!png_memcmp(chunk_name, png_iTXt, 4))
png_handle_iTXt(png_ptr, info_ptr, length);
#endif
@@ -533,13 +411,14 @@ png_read_info(png_structp png_ptr, png_infop info_ptr)
png_handle_unknown(png_ptr, info_ptr, length);
}
}
-#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
+#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
/* Optional call to update the users info_ptr structure */
void PNGAPI
png_read_update_info(png_structp png_ptr, png_infop info_ptr)
{
png_debug(1, "in png_read_update_info");
+
if (png_ptr == NULL)
return;
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
@@ -547,10 +426,11 @@ png_read_update_info(png_structp png_ptr, png_infop info_ptr)
else
png_warning(png_ptr,
"Ignoring extra png_read_update_info() call; row buffer not reallocated");
+
png_read_transform_info(png_ptr, info_ptr);
}
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Initialize palette, background, etc, after transformations
* are set, but before any reading takes place. This allows
* the user to obtain a gamma-corrected palette, for example.
@@ -560,28 +440,30 @@ void PNGAPI
png_start_read_image(png_structp png_ptr)
{
png_debug(1, "in png_start_read_image");
+
if (png_ptr == NULL)
return;
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
png_read_start_row(png_ptr);
}
-#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
+#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
void PNGAPI
png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
- PNG_CONST PNG_IDAT;
+ PNG_IDAT;
PNG_CONST int png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55,
0xff};
PNG_CONST int png_pass_mask[7] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
-#endif
int ret;
+
if (png_ptr == NULL)
return;
+
png_debug2(1, "in png_read_row (row %lu, pass %d)",
- png_ptr->row_number, png_ptr->pass);
+ (unsigned long) png_ptr->row_number, png_ptr->pass);
+
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
png_read_start_row(png_ptr);
if (png_ptr->row_number == 0 && png_ptr->pass == 0)
@@ -589,35 +471,35 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
/* Check for transforms that have been set but were defined out */
#if defined(PNG_WRITE_INVERT_SUPPORTED) && !defined(PNG_READ_INVERT_SUPPORTED)
if (png_ptr->transformations & PNG_INVERT_MONO)
- png_warning(png_ptr, "PNG_READ_INVERT_SUPPORTED is not defined.");
+ png_warning(png_ptr, "PNG_READ_INVERT_SUPPORTED is not defined");
#endif
#if defined(PNG_WRITE_FILLER_SUPPORTED) && !defined(PNG_READ_FILLER_SUPPORTED)
if (png_ptr->transformations & PNG_FILLER)
- png_warning(png_ptr, "PNG_READ_FILLER_SUPPORTED is not defined.");
+ png_warning(png_ptr, "PNG_READ_FILLER_SUPPORTED is not defined");
#endif
#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && !defined(PNG_READ_PACKSWAP_SUPPORTED)
if (png_ptr->transformations & PNG_PACKSWAP)
- png_warning(png_ptr, "PNG_READ_PACKSWAP_SUPPORTED is not defined.");
+ png_warning(png_ptr, "PNG_READ_PACKSWAP_SUPPORTED is not defined");
#endif
#if defined(PNG_WRITE_PACK_SUPPORTED) && !defined(PNG_READ_PACK_SUPPORTED)
if (png_ptr->transformations & PNG_PACK)
- png_warning(png_ptr, "PNG_READ_PACK_SUPPORTED is not defined.");
+ png_warning(png_ptr, "PNG_READ_PACK_SUPPORTED is not defined");
#endif
#if defined(PNG_WRITE_SHIFT_SUPPORTED) && !defined(PNG_READ_SHIFT_SUPPORTED)
if (png_ptr->transformations & PNG_SHIFT)
- png_warning(png_ptr, "PNG_READ_SHIFT_SUPPORTED is not defined.");
+ png_warning(png_ptr, "PNG_READ_SHIFT_SUPPORTED is not defined");
#endif
#if defined(PNG_WRITE_BGR_SUPPORTED) && !defined(PNG_READ_BGR_SUPPORTED)
if (png_ptr->transformations & PNG_BGR)
- png_warning(png_ptr, "PNG_READ_BGR_SUPPORTED is not defined.");
+ png_warning(png_ptr, "PNG_READ_BGR_SUPPORTED is not defined");
#endif
#if defined(PNG_WRITE_SWAP_SUPPORTED) && !defined(PNG_READ_SWAP_SUPPORTED)
if (png_ptr->transformations & PNG_SWAP_BYTES)
- png_warning(png_ptr, "PNG_READ_SWAP_SUPPORTED is not defined.");
+ png_warning(png_ptr, "PNG_READ_SWAP_SUPPORTED is not defined");
#endif
}
-#if defined(PNG_READ_INTERLACING_SUPPORTED)
+#ifdef PNG_READ_INTERLACING_SUPPORTED
/* If interlaced and we do not need a new row, combine row and return */
if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE))
{
@@ -724,7 +606,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
{
if (png_ptr->zstream.avail_out || png_ptr->zstream.avail_in ||
png_ptr->idat_size)
- png_error(png_ptr, "Extra compressed data");
+ png_benign_error(png_ptr, "Extra compressed data");
png_ptr->mode |= PNG_AFTER_IDAT;
png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
break;
@@ -748,10 +630,9 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
png_ptr->row_buf + 1, png_ptr->prev_row + 1,
(int)(png_ptr->row_buf[0]));
- png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf,
- png_ptr->rowbytes + 1);
+ png_memcpy(png_ptr->prev_row, png_ptr->row_buf, png_ptr->rowbytes + 1);
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
+#ifdef PNG_MNG_FEATURES_SUPPORTED
if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
(png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING))
{
@@ -764,7 +645,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA))
png_do_read_transformations(png_ptr);
-#if defined(PNG_READ_INTERLACING_SUPPORTED)
+#ifdef PNG_READ_INTERLACING_SUPPORTED
/* Blow up interlaced rows to full size */
if (png_ptr->interlaced &&
(png_ptr->transformations & PNG_INTERLACE))
@@ -796,9 +677,9 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
if (png_ptr->read_row_fn != NULL)
(*(png_ptr->read_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass);
}
-#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
+#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read one or more rows of image data. If the image is interlaced,
* and png_set_interlace_handling() has been called, the rows need to
* contain the contents of the rows from the previous pass. If the
@@ -832,6 +713,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
png_bytepp dp;
png_debug(1, "in png_read_rows");
+
if (png_ptr == NULL)
return;
rp = row;
@@ -848,20 +730,20 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
for (i = 0; i < num_rows; i++)
{
png_bytep rptr = *rp;
- png_read_row(png_ptr, rptr, png_bytep_NULL);
+ png_read_row(png_ptr, rptr, NULL);
rp++;
}
else if (dp != NULL)
for (i = 0; i < num_rows; i++)
{
png_bytep dptr = *dp;
- png_read_row(png_ptr, png_bytep_NULL, dptr);
+ png_read_row(png_ptr, NULL, dptr);
dp++;
}
}
-#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
+#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read the entire image. If the image has an alpha channel or a tRNS
* chunk, and you have called png_handle_alpha()[*], you will need to
* initialize the image to the current image that PNG will be overlaying.
@@ -882,6 +764,7 @@ png_read_image(png_structp png_ptr, png_bytepp image)
png_bytepp rp;
png_debug(1, "in png_read_image");
+
if (png_ptr == NULL)
return;
@@ -890,7 +773,7 @@ png_read_image(png_structp png_ptr, png_bytepp image)
#else
if (png_ptr->interlaced)
png_error(png_ptr,
- "Cannot read interlaced image -- interlace handler disabled.");
+ "Cannot read interlaced image -- interlace handler disabled");
pass = 1;
#endif
@@ -903,14 +786,14 @@ png_read_image(png_structp png_ptr, png_bytepp image)
rp = image;
for (i = 0; i < image_height; i++)
{
- png_read_row(png_ptr, *rp, png_bytep_NULL);
+ png_read_row(png_ptr, *rp, NULL);
rp++;
}
}
}
-#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
+#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read the end of the PNG file. Will not read past the end of the
* file, will verify the end is accurate, and will read any comments
* or time information at the end of the file, if info is not NULL.
@@ -919,69 +802,68 @@ void PNGAPI
png_read_end(png_structp png_ptr, png_infop info_ptr)
{
png_debug(1, "in png_read_end");
+
if (png_ptr == NULL)
return;
png_crc_finish(png_ptr, 0); /* Finish off CRC from last IDAT chunk */
do
{
-#ifdef PNG_USE_LOCAL_ARRAYS
- PNG_CONST PNG_IHDR;
- PNG_CONST PNG_IDAT;
- PNG_CONST PNG_IEND;
- PNG_CONST PNG_PLTE;
-#if defined(PNG_READ_bKGD_SUPPORTED)
- PNG_CONST PNG_bKGD;
+ PNG_IHDR;
+ PNG_IDAT;
+ PNG_IEND;
+ PNG_PLTE;
+#ifdef PNG_READ_bKGD_SUPPORTED
+ PNG_bKGD;
#endif
-#if defined(PNG_READ_cHRM_SUPPORTED)
- PNG_CONST PNG_cHRM;
+#ifdef PNG_READ_cHRM_SUPPORTED
+ PNG_cHRM;
#endif
-#if defined(PNG_READ_gAMA_SUPPORTED)
- PNG_CONST PNG_gAMA;
+#ifdef PNG_READ_gAMA_SUPPORTED
+ PNG_gAMA;
#endif
-#if defined(PNG_READ_hIST_SUPPORTED)
- PNG_CONST PNG_hIST;
+#ifdef PNG_READ_hIST_SUPPORTED
+ PNG_hIST;
#endif
-#if defined(PNG_READ_iCCP_SUPPORTED)
- PNG_CONST PNG_iCCP;
+#ifdef PNG_READ_iCCP_SUPPORTED
+ PNG_iCCP;
#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
- PNG_CONST PNG_iTXt;
+#ifdef PNG_READ_iTXt_SUPPORTED
+ PNG_iTXt;
#endif
-#if defined(PNG_READ_oFFs_SUPPORTED)
- PNG_CONST PNG_oFFs;
+#ifdef PNG_READ_oFFs_SUPPORTED
+ PNG_oFFs;
#endif
-#if defined(PNG_READ_pCAL_SUPPORTED)
- PNG_CONST PNG_pCAL;
+#ifdef PNG_READ_pCAL_SUPPORTED
+ PNG_pCAL;
#endif
-#if defined(PNG_READ_pHYs_SUPPORTED)
- PNG_CONST PNG_pHYs;
+#ifdef PNG_READ_pHYs_SUPPORTED
+ PNG_pHYs;
#endif
-#if defined(PNG_READ_sBIT_SUPPORTED)
- PNG_CONST PNG_sBIT;
+#ifdef PNG_READ_sBIT_SUPPORTED
+ PNG_sBIT;
#endif
-#if defined(PNG_READ_sCAL_SUPPORTED)
- PNG_CONST PNG_sCAL;
+#ifdef PNG_READ_sCAL_SUPPORTED
+ PNG_sCAL;
#endif
-#if defined(PNG_READ_sPLT_SUPPORTED)
- PNG_CONST PNG_sPLT;
+#ifdef PNG_READ_sPLT_SUPPORTED
+ PNG_sPLT;
#endif
-#if defined(PNG_READ_sRGB_SUPPORTED)
- PNG_CONST PNG_sRGB;
+#ifdef PNG_READ_sRGB_SUPPORTED
+ PNG_sRGB;
#endif
-#if defined(PNG_READ_tEXt_SUPPORTED)
- PNG_CONST PNG_tEXt;
+#ifdef PNG_READ_tEXt_SUPPORTED
+ PNG_tEXt;
#endif
-#if defined(PNG_READ_tIME_SUPPORTED)
- PNG_CONST PNG_tIME;
+#ifdef PNG_READ_tIME_SUPPORTED
+ PNG_tIME;
#endif
-#if defined(PNG_READ_tRNS_SUPPORTED)
- PNG_CONST PNG_tRNS;
+#ifdef PNG_READ_tRNS_SUPPORTED
+ PNG_tRNS;
#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
- PNG_CONST PNG_zTXt;
+#ifdef PNG_READ_zTXt_SUPPORTED
+ PNG_zTXt;
#endif
-#endif /* PNG_USE_LOCAL_ARRAYS */
png_uint_32 length = png_read_chunk_header(png_ptr);
PNG_CONST png_bytep chunk_name = png_ptr->chunk_name;
@@ -995,7 +877,7 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
if (!png_memcmp(chunk_name, png_IDAT, 4))
{
if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))
- png_error(png_ptr, "Too many IDAT's found");
+ png_benign_error(png_ptr, "Too many IDATs found");
}
png_handle_unknown(png_ptr, info_ptr, length);
if (!png_memcmp(chunk_name, png_PLTE, 4))
@@ -1008,76 +890,76 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
* read, but not after other chunks have been read.
*/
if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))
- png_error(png_ptr, "Too many IDAT's found");
+ png_benign_error(png_ptr, "Too many IDATs found");
png_crc_finish(png_ptr, length);
}
else if (!png_memcmp(chunk_name, png_PLTE, 4))
png_handle_PLTE(png_ptr, info_ptr, length);
-#if defined(PNG_READ_bKGD_SUPPORTED)
+#ifdef PNG_READ_bKGD_SUPPORTED
else if (!png_memcmp(chunk_name, png_bKGD, 4))
png_handle_bKGD(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_cHRM_SUPPORTED)
+#ifdef PNG_READ_cHRM_SUPPORTED
else if (!png_memcmp(chunk_name, png_cHRM, 4))
png_handle_cHRM(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_gAMA_SUPPORTED)
+#ifdef PNG_READ_gAMA_SUPPORTED
else if (!png_memcmp(chunk_name, png_gAMA, 4))
png_handle_gAMA(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_hIST_SUPPORTED)
+#ifdef PNG_READ_hIST_SUPPORTED
else if (!png_memcmp(chunk_name, png_hIST, 4))
png_handle_hIST(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_oFFs_SUPPORTED)
+#ifdef PNG_READ_oFFs_SUPPORTED
else if (!png_memcmp(chunk_name, png_oFFs, 4))
png_handle_oFFs(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_pCAL_SUPPORTED)
+#ifdef PNG_READ_pCAL_SUPPORTED
else if (!png_memcmp(chunk_name, png_pCAL, 4))
png_handle_pCAL(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_sCAL_SUPPORTED)
+#ifdef PNG_READ_sCAL_SUPPORTED
else if (!png_memcmp(chunk_name, png_sCAL, 4))
png_handle_sCAL(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_pHYs_SUPPORTED)
+#ifdef PNG_READ_pHYs_SUPPORTED
else if (!png_memcmp(chunk_name, png_pHYs, 4))
png_handle_pHYs(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_sBIT_SUPPORTED)
+#ifdef PNG_READ_sBIT_SUPPORTED
else if (!png_memcmp(chunk_name, png_sBIT, 4))
png_handle_sBIT(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_sRGB_SUPPORTED)
+#ifdef PNG_READ_sRGB_SUPPORTED
else if (!png_memcmp(chunk_name, png_sRGB, 4))
png_handle_sRGB(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_iCCP_SUPPORTED)
+#ifdef PNG_READ_iCCP_SUPPORTED
else if (!png_memcmp(chunk_name, png_iCCP, 4))
png_handle_iCCP(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_sPLT_SUPPORTED)
+#ifdef PNG_READ_sPLT_SUPPORTED
else if (!png_memcmp(chunk_name, png_sPLT, 4))
png_handle_sPLT(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_tEXt_SUPPORTED)
+#ifdef PNG_READ_tEXt_SUPPORTED
else if (!png_memcmp(chunk_name, png_tEXt, 4))
png_handle_tEXt(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_tIME_SUPPORTED)
+#ifdef PNG_READ_tIME_SUPPORTED
else if (!png_memcmp(chunk_name, png_tIME, 4))
png_handle_tIME(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_tRNS_SUPPORTED)
+#ifdef PNG_READ_tRNS_SUPPORTED
else if (!png_memcmp(chunk_name, png_tRNS, 4))
png_handle_tRNS(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
+#ifdef PNG_READ_zTXt_SUPPORTED
else if (!png_memcmp(chunk_name, png_zTXt, 4))
png_handle_zTXt(png_ptr, info_ptr, length);
#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
+#ifdef PNG_READ_iTXt_SUPPORTED
else if (!png_memcmp(chunk_name, png_iTXt, 4))
png_handle_iTXt(png_ptr, info_ptr, length);
#endif
@@ -1085,7 +967,7 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
png_handle_unknown(png_ptr, info_ptr, length);
} while (!(png_ptr->mode & PNG_HAVE_IEND));
}
-#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
+#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
/* Free all memory used by the read */
void PNGAPI
@@ -1100,6 +982,7 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
#endif
png_debug(1, "in png_destroy_read_struct");
+
if (png_ptr_ptr != NULL)
png_ptr = *png_ptr_ptr;
if (png_ptr == NULL)
@@ -1120,7 +1003,7 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
if (info_ptr != NULL)
{
-#if defined(PNG_TEXT_SUPPORTED)
+#ifdef PNG_TEXT_SUPPORTED
png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, -1);
#endif
@@ -1135,7 +1018,7 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
if (end_info_ptr != NULL)
{
-#if defined(PNG_READ_TEXT_SUPPORTED)
+#ifdef PNG_READ_TEXT_SUPPORTED
png_free_data(png_ptr, end_info_ptr, PNG_FREE_TEXT, -1);
#endif
#ifdef PNG_USER_MEM_SUPPORTED
@@ -1174,6 +1057,7 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr
#endif
png_debug(1, "in png_read_destroy");
+
if (info_ptr != NULL)
png_info_destroy(png_ptr, info_ptr);
@@ -1184,50 +1068,32 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr
png_free(png_ptr, png_ptr->big_row_buf);
png_free(png_ptr, png_ptr->prev_row);
png_free(png_ptr, png_ptr->chunkdata);
-#if defined(PNG_READ_DITHER_SUPPORTED)
+#ifdef PNG_READ_DITHER_SUPPORTED
png_free(png_ptr, png_ptr->palette_lookup);
png_free(png_ptr, png_ptr->dither_index);
#endif
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
png_free(png_ptr, png_ptr->gamma_table);
#endif
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
+#ifdef PNG_READ_BACKGROUND_SUPPORTED
png_free(png_ptr, png_ptr->gamma_from_1);
png_free(png_ptr, png_ptr->gamma_to_1);
#endif
-#ifdef PNG_FREE_ME_SUPPORTED
if (png_ptr->free_me & PNG_FREE_PLTE)
png_zfree(png_ptr, png_ptr->palette);
png_ptr->free_me &= ~PNG_FREE_PLTE;
-#else
- if (png_ptr->flags & PNG_FLAG_FREE_PLTE)
- png_zfree(png_ptr, png_ptr->palette);
- png_ptr->flags &= ~PNG_FLAG_FREE_PLTE;
-#endif
#if defined(PNG_tRNS_SUPPORTED) || \
defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
-#ifdef PNG_FREE_ME_SUPPORTED
if (png_ptr->free_me & PNG_FREE_TRNS)
- png_free(png_ptr, png_ptr->trans);
+ png_free(png_ptr, png_ptr->trans_alpha);
png_ptr->free_me &= ~PNG_FREE_TRNS;
-#else
- if (png_ptr->flags & PNG_FLAG_FREE_TRNS)
- png_free(png_ptr, png_ptr->trans);
- png_ptr->flags &= ~PNG_FLAG_FREE_TRNS;
-#endif
#endif
-#if defined(PNG_READ_hIST_SUPPORTED)
-#ifdef PNG_FREE_ME_SUPPORTED
+#ifdef PNG_READ_hIST_SUPPORTED
if (png_ptr->free_me & PNG_FREE_HIST)
png_free(png_ptr, png_ptr->hist);
png_ptr->free_me &= ~PNG_FREE_HIST;
-#else
- if (png_ptr->flags & PNG_FLAG_FREE_HIST)
- png_free(png_ptr, png_ptr->hist);
- png_ptr->flags &= ~PNG_FLAG_FREE_HIST;
#endif
-#endif
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
if (png_ptr->gamma_16_table != NULL)
{
int i;
@@ -1238,7 +1104,7 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr
}
png_free(png_ptr, png_ptr->gamma_16_table);
}
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
+#ifdef PNG_READ_BACKGROUND_SUPPORTED
if (png_ptr->gamma_16_from_1 != NULL)
{
int i;
@@ -1261,7 +1127,7 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr
}
#endif
#endif
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
+#ifdef PNG_TIME_RFC1123_SUPPORTED
png_free(png_ptr, png_ptr->time_buffer);
#endif
@@ -1314,8 +1180,8 @@ png_set_read_status_fn(png_structp png_ptr, png_read_status_ptr read_row_fn)
}
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
+#ifdef PNG_INFO_IMAGE_SUPPORTED
void PNGAPI
png_read_png(png_structp png_ptr, png_infop info_ptr,
int transforms,
@@ -1325,12 +1191,6 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
if (png_ptr == NULL)
return;
-#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED)
- /* Invert the alpha channel from opacity to transparency
- */
- if (transforms & PNG_TRANSFORM_INVERT_ALPHA)
- png_set_invert_alpha(png_ptr);
-#endif
/* png_read_info() gives us all of the information from the
* PNG file before the first IDAT (image data chunk).
@@ -1341,14 +1201,14 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
/* -------------- image transformations start here ------------------- */
-#if defined(PNG_READ_16_TO_8_SUPPORTED)
+#ifdef PNG_READ_16_TO_8_SUPPORTED
/* Tell libpng to strip 16 bit/color files down to 8 bits per color.
*/
if (transforms & PNG_TRANSFORM_STRIP_16)
png_set_strip_16(png_ptr);
#endif
-#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
+#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED
/* Strip alpha bytes from the input data without combining with
* the background (not recommended).
*/
@@ -1364,7 +1224,7 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
png_set_packing(png_ptr);
#endif
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
+#ifdef PNG_READ_PACKSWAP_SUPPORTED
/* Change the order of packed pixels to least significant bit first
* (not useful if you are using png_set_packing).
*/
@@ -1372,7 +1232,7 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
png_set_packswap(png_ptr);
#endif
-#if defined(PNG_READ_EXPAND_SUPPORTED)
+#ifdef PNG_READ_EXPAND_SUPPORTED
/* Expand paletted colors into true RGB triplets
* Expand grayscale images to full 8 bits from 1, 2, or 4 bits/pixel
* Expand paletted or RGB images with transparency to full alpha
@@ -1388,14 +1248,14 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
/* We don't handle background color or gamma transformation or dithering.
*/
-#if defined(PNG_READ_INVERT_SUPPORTED)
+#ifdef PNG_READ_INVERT_SUPPORTED
/* Invert monochrome files to have 0 as white and 1 as black
*/
if (transforms & PNG_TRANSFORM_INVERT_MONO)
png_set_invert_mono(png_ptr);
#endif
-#if defined(PNG_READ_SHIFT_SUPPORTED)
+#ifdef PNG_READ_SHIFT_SUPPORTED
/* If you want to shift the pixel values from the range [0,255] or
* [0,65535] to the original [0,7] or [0,31], or whatever range the
* colors were originally in:
@@ -1410,27 +1270,43 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
}
#endif
-#if defined(PNG_READ_BGR_SUPPORTED)
+#ifdef PNG_READ_BGR_SUPPORTED
/* Flip the RGB pixels to BGR (or RGBA to BGRA)
*/
if (transforms & PNG_TRANSFORM_BGR)
png_set_bgr(png_ptr);
#endif
-#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED)
+#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED
/* Swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR)
*/
if (transforms & PNG_TRANSFORM_SWAP_ALPHA)
png_set_swap_alpha(png_ptr);
#endif
-#if defined(PNG_READ_SWAP_SUPPORTED)
+#ifdef PNG_READ_SWAP_SUPPORTED
/* Swap bytes of 16 bit files to least significant byte first
*/
if (transforms & PNG_TRANSFORM_SWAP_ENDIAN)
png_set_swap(png_ptr);
#endif
+/* Added at libpng-1.2.41 */
+#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
+ /* Invert the alpha channel from opacity to transparency
+ */
+ if (transforms & PNG_TRANSFORM_INVERT_ALPHA)
+ png_set_invert_alpha(png_ptr);
+#endif
+
+/* Added at libpng-1.2.41 */
+#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
+ /* Expand grayscale image to RGB
+ */
+ if (transforms & PNG_TRANSFORM_GRAY_TO_RGB)
+ png_set_gray_to_rgb(png_ptr);
+#endif
+
/* We don't handle adding filler bytes */
/* Optional call to gamma correct and add the background to the palette
@@ -1441,18 +1317,18 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
/* -------------- image transformations end here ------------------- */
-#ifdef PNG_FREE_ME_SUPPORTED
png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0);
-#endif
if (info_ptr->row_pointers == NULL)
{
+ png_uint_32 iptr;
+
info_ptr->row_pointers = (png_bytepp)png_malloc(png_ptr,
info_ptr->height * png_sizeof(png_bytep));
- png_memset(info_ptr->row_pointers, 0, info_ptr->height
- * png_sizeof(png_bytep));
-#ifdef PNG_FREE_ME_SUPPORTED
+ for (iptr=0; iptr<info_ptr->height; iptr++)
+ info_ptr->row_pointers[iptr] = NULL;
+
info_ptr->free_me |= PNG_FREE_ROWS;
-#endif
+
for (row = 0; row < (int)info_ptr->height; row++)
info_ptr->row_pointers[row] = (png_bytep)png_malloc(png_ptr,
png_get_rowbytes(png_ptr, info_ptr));
@@ -1469,5 +1345,5 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
}
#endif /* PNG_INFO_IMAGE_SUPPORTED */
-#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
+#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
#endif /* PNG_READ_SUPPORTED */
diff --git a/src/3rdparty/libpng/pngrio.c b/src/3rdparty/libpng/pngrio.c
index 2267bca9a9..53f2a45279 100644
--- a/src/3rdparty/libpng/pngrio.c
+++ b/src/3rdparty/libpng/pngrio.c
@@ -1,8 +1,8 @@
/* pngrio.c - functions for data input
*
- * Last changed in libpng 1.2.37 [June 4, 2009]
- * Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.0 [January 3, 2010]
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -18,9 +18,10 @@
* libpng use it at run time with png_set_read_fn(...).
*/
-#define PNG_INTERNAL
+#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
-#if defined(PNG_READ_SUPPORTED)
+#ifdef PNG_READ_SUPPORTED
+#include "pngpriv.h"
/* Read the data from whatever input you are using. The default routine
* reads from a file pointer. Note that this routine sometimes gets called
@@ -32,13 +33,14 @@ void /* PRIVATE */
png_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
png_debug1(4, "reading %d bytes", (int)length);
+
if (png_ptr->read_data_fn != NULL)
(*(png_ptr->read_data_fn))(png_ptr, data, length);
else
png_error(png_ptr, "Call to NULL read function");
}
-#if !defined(PNG_NO_STDIO)
+#ifdef PNG_STDIO_SUPPORTED
/* This is the function that does the actual reading of data. If you are
* not reading from a standard C stream, you should create a replacement
* read_data function and use it at run time with png_set_read_fn(), rather
@@ -55,13 +57,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
/* fread() returns 0 on error, so it is OK to store this in a png_size_t
* instead of an int, which is what fread() actually returns.
*/
-#if defined(_WIN32_WCE)
- if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
- check = 0;
-#else
- check = (png_size_t)fread(data, (png_size_t)1, length,
- (png_FILE_p)png_ptr->io_ptr);
-#endif
+ check = fread(data, 1, length, (png_FILE_p)png_ptr->io_ptr);
if (check != length)
png_error(png_ptr, "Read Error");
@@ -78,7 +74,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
static void PNGAPI
png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
- int check;
+ png_size_t check;
png_byte *n_data;
png_FILE_p io_ptr;
@@ -89,12 +85,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
if ((png_bytep)n_data == data)
{
-#if defined(_WIN32_WCE)
- if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
- check = 0;
-#else
check = fread(n_data, 1, length, io_ptr);
-#endif
}
else
{
@@ -105,12 +96,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
do
{
read = MIN(NEAR_BUF_SIZE, remaining);
-#if defined(_WIN32_WCE)
- if ( !ReadFile((HANDLE)(io_ptr), buf, read, &err, NULL) )
- err = 0;
-#else
- err = fread(buf, (png_size_t)1, read, io_ptr);
-#endif
+ err = fread(buf, 1, read, io_ptr);
png_memcpy(data, buf, read); /* copy far buffer to near buffer */
if (err != read)
break;
@@ -151,7 +137,7 @@ png_set_read_fn(png_structp png_ptr, png_voidp io_ptr,
return;
png_ptr->io_ptr = io_ptr;
-#if !defined(PNG_NO_STDIO)
+#ifdef PNG_STDIO_SUPPORTED
if (read_data_fn != NULL)
png_ptr->read_data_fn = read_data_fn;
else
@@ -167,10 +153,10 @@ png_set_read_fn(png_structp png_ptr, png_voidp io_ptr,
png_warning(png_ptr,
"It's an error to set both read_data_fn and write_data_fn in the ");
png_warning(png_ptr,
- "same structure. Resetting write_data_fn to NULL.");
+ "same structure. Resetting write_data_fn to NULL");
}
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
+#ifdef PNG_WRITE_FLUSH_SUPPORTED
png_ptr->output_flush_fn = NULL;
#endif
}
diff --git a/src/3rdparty/libpng/pngrtran.c b/src/3rdparty/libpng/pngrtran.c
index d7e6b4a95a..30aa5dc381 100644
--- a/src/3rdparty/libpng/pngrtran.c
+++ b/src/3rdparty/libpng/pngrtran.c
@@ -1,8 +1,8 @@
/* pngrtran.c - transforms the data in a row for PNG readers
*
- * Last changed in libpng 1.2.38 [July 16, 2009]
- * Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.0 [January 3, 2010]
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -16,18 +16,21 @@
* in pngtrans.c.
*/
-#define PNG_INTERNAL
+#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
-#if defined(PNG_READ_SUPPORTED)
+#ifdef PNG_READ_SUPPORTED
+#include "pngpriv.h"
/* Set the action on getting a CRC error for an ancillary or critical chunk. */
void PNGAPI
png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action)
{
png_debug(1, "in png_set_crc_action");
- /* Tell libpng how we react to CRC errors in critical chunks */
+
if (png_ptr == NULL)
return;
+
+ /* Tell libpng how we react to CRC errors in critical chunks */
switch (crit_action)
{
case PNG_CRC_NO_CHANGE: /* Leave setting as is */
@@ -46,7 +49,7 @@ png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action)
case PNG_CRC_WARN_DISCARD: /* Not a valid action for critical data */
png_warning(png_ptr,
- "Can't discard critical data on CRC error.");
+ "Can't discard critical data on CRC error");
case PNG_CRC_ERROR_QUIT: /* Error/quit */
case PNG_CRC_DEFAULT:
@@ -55,6 +58,7 @@ png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action)
break;
}
+ /* Tell libpng how we react to CRC errors in ancillary chunks */
switch (ancil_action)
{
case PNG_CRC_NO_CHANGE: /* Leave setting as is */
@@ -94,6 +98,7 @@ png_set_background(png_structp png_ptr,
int need_expand, double background_gamma)
{
png_debug(1, "in png_set_background");
+
if (png_ptr == NULL)
return;
if (background_gamma_code == PNG_BACKGROUND_GAMMA_UNKNOWN)
@@ -111,30 +116,32 @@ png_set_background(png_structp png_ptr,
}
#endif
-#if defined(PNG_READ_16_TO_8_SUPPORTED)
+#ifdef PNG_READ_16_TO_8_SUPPORTED
/* Strip 16 bit depth files to 8 bit depth */
void PNGAPI
png_set_strip_16(png_structp png_ptr)
{
png_debug(1, "in png_set_strip_16");
+
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_16_TO_8;
}
#endif
-#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
+#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED
void PNGAPI
png_set_strip_alpha(png_structp png_ptr)
{
png_debug(1, "in png_set_strip_alpha");
+
if (png_ptr == NULL)
return;
png_ptr->flags |= PNG_FLAG_STRIP_ALPHA;
}
#endif
-#if defined(PNG_READ_DITHER_SUPPORTED)
+#ifdef PNG_READ_DITHER_SUPPORTED
/* Dither file to 8 bit. Supply a palette, the current number
* of elements in the palette, the maximum number of elements
* allowed, and a histogram if possible. If the current number
@@ -159,6 +166,7 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
int full_dither)
{
png_debug(1, "in png_set_dither");
+
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_DITHER;
@@ -328,9 +336,8 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
png_ptr->palette_to_index[i] = (png_byte)i;
}
- hash = (png_dsortpp)png_malloc(png_ptr, (png_uint_32)(769 *
+ hash = (png_dsortpp)png_calloc(png_ptr, (png_uint_32)(769 *
png_sizeof(png_dsortp)));
- png_memset(hash, 0, 769 * png_sizeof(png_dsortp));
num_new_palette = num_palette;
@@ -476,14 +483,12 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
int num_green = (1 << PNG_DITHER_GREEN_BITS);
int num_blue = (1 << PNG_DITHER_BLUE_BITS);
png_size_t num_entries = ((png_size_t)1 << total_bits);
- png_ptr->palette_lookup = (png_bytep )png_malloc(png_ptr,
+
+ png_ptr->palette_lookup = (png_bytep )png_calloc(png_ptr,
(png_uint_32)(num_entries * png_sizeof(png_byte)));
- png_memset(png_ptr->palette_lookup, 0, num_entries *
- png_sizeof(png_byte));
distance = (png_bytep)png_malloc(png_ptr, (png_uint_32)(num_entries *
png_sizeof(png_byte)));
-
png_memset(distance, 0xff, num_entries * png_sizeof(png_byte));
for (i = 0; i < num_palette; i++)
@@ -544,8 +549,10 @@ void PNGAPI
png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma)
{
png_debug(1, "in png_set_gamma");
+
if (png_ptr == NULL)
return;
+
if ((fabs(scrn_gamma * file_gamma - 1.0) > PNG_GAMMA_THRESHOLD) ||
(png_ptr->color_type & PNG_COLOR_MASK_ALPHA) ||
(png_ptr->color_type == PNG_COLOR_TYPE_PALETTE))
@@ -555,7 +562,7 @@ png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma)
}
#endif
-#if defined(PNG_READ_EXPAND_SUPPORTED)
+#ifdef PNG_READ_EXPAND_SUPPORTED
/* Expand paletted images to RGB, expand grayscale images of
* less than 8-bit depth to 8-bit depth, and expand tRNS chunks
* to alpha channels.
@@ -564,8 +571,10 @@ void PNGAPI
png_set_expand(png_structp png_ptr)
{
png_debug(1, "in png_set_expand");
+
if (png_ptr == NULL)
return;
+
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
}
@@ -583,8 +592,9 @@ png_set_expand(png_structp png_ptr)
* More to the point, these functions make it obvious what libpng will be
* doing, whereas "expand" can (and does) mean any number of things.
*
- * GRP 20060307: In libpng-1.4.0, png_set_gray_1_2_4_to_8() was modified
- * to expand only the sample depth but not to expand the tRNS to alpha.
+ * GRP 20060307: In libpng-1.2.9, png_set_gray_1_2_4_to_8() was modified
+ * to expand only the sample depth but not to expand the tRNS to alpha
+ * and its name was changed to png_set_expand_gray_1_2_4_to_8().
*/
/* Expand paletted images to RGB. */
@@ -592,37 +602,27 @@ void PNGAPI
png_set_palette_to_rgb(png_structp png_ptr)
{
png_debug(1, "in png_set_palette_to_rgb");
+
if (png_ptr == NULL)
return;
+
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
}
-#if !defined(PNG_1_0_X)
/* Expand grayscale images of less than 8-bit depth to 8 bits. */
void PNGAPI
png_set_expand_gray_1_2_4_to_8(png_structp png_ptr)
{
png_debug(1, "in png_set_expand_gray_1_2_4_to_8");
+
if (png_ptr == NULL)
return;
+
png_ptr->transformations |= PNG_EXPAND;
png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
}
-#endif
-#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
-/* Expand grayscale images of less than 8-bit depth to 8 bits. */
-/* Deprecated as of libpng-1.2.9 */
-void PNGAPI
-png_set_gray_1_2_4_to_8(png_structp png_ptr)
-{
- png_debug(1, "in png_set_gray_1_2_4_to_8");
- if (png_ptr == NULL)
- return;
- png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
-}
-#endif
/* Expand tRNS chunks to alpha channels. */
@@ -630,23 +630,25 @@ void PNGAPI
png_set_tRNS_to_alpha(png_structp png_ptr)
{
png_debug(1, "in png_set_tRNS_to_alpha");
+
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
}
#endif /* defined(PNG_READ_EXPAND_SUPPORTED) */
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
+#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
void PNGAPI
png_set_gray_to_rgb(png_structp png_ptr)
{
png_debug(1, "in png_set_gray_to_rgb");
+
png_ptr->transformations |= PNG_GRAY_TO_RGB;
png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
}
#endif
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-#if defined(PNG_FLOATING_POINT_SUPPORTED)
+#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
+#ifdef PNG_FLOATING_POINT_SUPPORTED
/* Convert a RGB image to a grayscale of the same width. This allows us,
* for example, to convert a 24 bpp RGB image into an 8 bpp grayscale image.
*/
@@ -668,8 +670,10 @@ png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action,
png_fixed_point red, png_fixed_point green)
{
png_debug(1, "in png_set_rgb_to_gray");
+
if (png_ptr == NULL)
return;
+
switch(error_action)
{
case 1: png_ptr->transformations |= PNG_RGB_TO_GRAY;
@@ -681,12 +685,12 @@ png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action,
case 3: png_ptr->transformations |= PNG_RGB_TO_GRAY_ERR;
}
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-#if defined(PNG_READ_EXPAND_SUPPORTED)
+#ifdef PNG_READ_EXPAND_SUPPORTED
png_ptr->transformations |= PNG_EXPAND;
#else
{
png_warning(png_ptr,
- "Cannot do RGB_TO_GRAY without EXPAND_SUPPORTED.");
+ "Cannot do RGB_TO_GRAY without EXPAND_SUPPORTED");
png_ptr->transformations &= ~PNG_RGB_TO_GRAY;
}
#endif
@@ -717,24 +721,20 @@ png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action,
#endif
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
- defined(PNG_LEGACY_SUPPORTED) || \
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
void PNGAPI
png_set_read_user_transform_fn(png_structp png_ptr, png_user_transform_ptr
read_user_transform_fn)
{
png_debug(1, "in png_set_read_user_transform_fn");
+
if (png_ptr == NULL)
return;
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
+
+#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
png_ptr->transformations |= PNG_USER_TRANSFORM;
png_ptr->read_user_transform_fn = read_user_transform_fn;
#endif
-#ifdef PNG_LEGACY_SUPPORTED
- if (read_user_transform_fn)
- png_warning(png_ptr,
- "This version of libpng does not support user transforms");
-#endif
}
#endif
@@ -745,9 +745,7 @@ void /* PRIVATE */
png_init_read_transformations(png_structp png_ptr)
{
png_debug(1, "in png_init_read_transformations");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- if (png_ptr != NULL)
-#endif
+
{
#if defined(PNG_READ_BACKGROUND_SUPPORTED) || defined(PNG_READ_SHIFT_SUPPORTED) \
|| defined(PNG_READ_GAMMA_SUPPORTED)
@@ -756,7 +754,7 @@ png_init_read_transformations(png_structp png_ptr)
#if defined(PNG_READ_EXPAND_SUPPORTED) && defined(PNG_READ_BACKGROUND_SUPPORTED)
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
+#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
/* Detect gray background and attempt to enable optimization
* for gray --> RGB case
*
@@ -796,9 +794,9 @@ png_init_read_transformations(png_structp png_ptr)
= png_ptr->background.blue = png_ptr->background.gray;
if (!(png_ptr->transformations & PNG_EXPAND_tRNS))
{
- png_ptr->trans_values.gray *= (png_uint_16)0xff;
- png_ptr->trans_values.red = png_ptr->trans_values.green
- = png_ptr->trans_values.blue = png_ptr->trans_values.gray;
+ png_ptr->trans_color.gray *= (png_uint_16)0xff;
+ png_ptr->trans_color.red = png_ptr->trans_color.green
+ = png_ptr->trans_color.blue = png_ptr->trans_color.gray;
}
break;
@@ -808,9 +806,9 @@ png_init_read_transformations(png_structp png_ptr)
= png_ptr->background.blue = png_ptr->background.gray;
if (!(png_ptr->transformations & PNG_EXPAND_tRNS))
{
- png_ptr->trans_values.gray *= (png_uint_16)0x55;
- png_ptr->trans_values.red = png_ptr->trans_values.green
- = png_ptr->trans_values.blue = png_ptr->trans_values.gray;
+ png_ptr->trans_color.gray *= (png_uint_16)0x55;
+ png_ptr->trans_color.red = png_ptr->trans_color.green
+ = png_ptr->trans_color.blue = png_ptr->trans_color.gray;
}
break;
@@ -820,9 +818,9 @@ png_init_read_transformations(png_structp png_ptr)
= png_ptr->background.blue = png_ptr->background.gray;
if (!(png_ptr->transformations & PNG_EXPAND_tRNS))
{
- png_ptr->trans_values.gray *= (png_uint_16)0x11;
- png_ptr->trans_values.red = png_ptr->trans_values.green
- = png_ptr->trans_values.blue = png_ptr->trans_values.gray;
+ png_ptr->trans_color.gray *= (png_uint_16)0x11;
+ png_ptr->trans_color.red = png_ptr->trans_color.green
+ = png_ptr->trans_color.blue = png_ptr->trans_color.gray;
}
break;
@@ -843,10 +841,10 @@ png_init_read_transformations(png_structp png_ptr)
png_ptr->background.blue =
png_ptr->palette[png_ptr->background.index].blue;
-#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED)
+#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
if (png_ptr->transformations & PNG_INVERT_ALPHA)
{
-#if defined(PNG_READ_EXPAND_SUPPORTED)
+#ifdef PNG_READ_EXPAND_SUPPORTED
if (!(png_ptr->transformations & PNG_EXPAND_tRNS))
#endif
{
@@ -856,7 +854,7 @@ png_init_read_transformations(png_structp png_ptr)
int i, istop;
istop=(int)png_ptr->num_trans;
for (i=0; i<istop; i++)
- png_ptr->trans[i] = (png_byte)(255 - png_ptr->trans[i]);
+ png_ptr->trans_alpha[i] = (png_byte)(255 - png_ptr->trans_alpha[i]);
}
}
#endif
@@ -878,7 +876,7 @@ png_init_read_transformations(png_structp png_ptr)
k=0;
for (i=0; i<png_ptr->num_trans; i++)
{
- if (png_ptr->trans[i] != 0 && png_ptr->trans[i] != 0xff)
+ if (png_ptr->trans_alpha[i] != 0 && png_ptr->trans_alpha[i] != 0xff)
k=1; /* Partial transparency is present */
}
if (k == 0)
@@ -888,8 +886,9 @@ png_init_read_transformations(png_structp png_ptr)
if ((png_ptr->transformations & (PNG_GAMMA | PNG_RGB_TO_GRAY)) &&
png_ptr->gamma != 0.0)
{
- png_build_gamma_table(png_ptr);
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
+ png_build_gamma_table(png_ptr, png_ptr->bit_depth);
+
+#ifdef PNG_READ_BACKGROUND_SUPPORTED
if (png_ptr->transformations & PNG_BACKGROUND)
{
if (color_type == PNG_COLOR_TYPE_PALETTE)
@@ -944,42 +943,42 @@ png_init_read_transformations(png_structp png_ptr)
else
{
back.red = (png_byte)(pow(
- (double)png_ptr->background.red/255, gs) * 255.0 + .5);
+ (double)png_ptr->background.red/255.0, gs) * 255.0 + .5);
back.green = (png_byte)(pow(
- (double)png_ptr->background.green/255, gs) * 255.0 + .5);
+ (double)png_ptr->background.green/255.0, gs) * 255.0 + .5);
back.blue = (png_byte)(pow(
- (double)png_ptr->background.blue/255, gs) * 255.0 + .5);
+ (double)png_ptr->background.blue/255.0, gs) * 255.0 + .5);
}
back_1.red = (png_byte)(pow(
- (double)png_ptr->background.red/255, g) * 255.0 + .5);
+ (double)png_ptr->background.red/255.0, g) * 255.0 + .5);
back_1.green = (png_byte)(pow(
- (double)png_ptr->background.green/255, g) * 255.0 + .5);
+ (double)png_ptr->background.green/255.0, g) * 255.0 + .5);
back_1.blue = (png_byte)(pow(
- (double)png_ptr->background.blue/255, g) * 255.0 + .5);
+ (double)png_ptr->background.blue/255.0, g) * 255.0 + .5);
}
for (i = 0; i < num_palette; i++)
{
- if (i < (int)png_ptr->num_trans && png_ptr->trans[i] != 0xff)
+ if (i < (int)png_ptr->num_trans && png_ptr->trans_alpha[i] != 0xff)
{
- if (png_ptr->trans[i] == 0)
+ if (png_ptr->trans_alpha[i] == 0)
{
palette[i] = back;
}
- else /* if (png_ptr->trans[i] != 0xff) */
+ else /* if (png_ptr->trans_alpha[i] != 0xff) */
{
png_byte v, w;
v = png_ptr->gamma_to_1[palette[i].red];
- png_composite(w, v, png_ptr->trans[i], back_1.red);
+ png_composite(w, v, png_ptr->trans_alpha[i], back_1.red);
palette[i].red = png_ptr->gamma_from_1[w];
v = png_ptr->gamma_to_1[palette[i].green];
- png_composite(w, v, png_ptr->trans[i], back_1.green);
+ png_composite(w, v, png_ptr->trans_alpha[i], back_1.green);
palette[i].green = png_ptr->gamma_from_1[w];
v = png_ptr->gamma_to_1[palette[i].blue];
- png_composite(w, v, png_ptr->trans[i], back_1.blue);
+ png_composite(w, v, png_ptr->trans_alpha[i], back_1.blue);
palette[i].blue = png_ptr->gamma_from_1[w];
}
}
@@ -990,14 +989,14 @@ png_init_read_transformations(png_structp png_ptr)
palette[i].blue = png_ptr->gamma_table[palette[i].blue];
}
}
- /* Prevent the transformations being done again, and make sure
- * that the now spurious alpha channel is stripped - the code
- * has just reduced background composition and gamma correction
- * to a simple alpha channel strip.
- */
- png_ptr->transformations &= ~PNG_BACKGROUND;
- png_ptr->transformations &= ~PNG_GAMMA;
- png_ptr->transformations |= PNG_STRIP_ALPHA;
+ /* Prevent the transformations being done again, and make sure
+ * that the now spurious alpha channel is stripped - the code
+ * has just reduced background composition and gamma correction
+ * to a simple alpha channel strip.
+ */
+ png_ptr->transformations &= ~PNG_BACKGROUND;
+ png_ptr->transformations &= ~PNG_GAMMA;
+ png_ptr->transformations |= PNG_STRIP_ALPHA;
}
/* if (png_ptr->background_gamma_type!=PNG_BACKGROUND_GAMMA_UNKNOWN) */
else
@@ -1075,15 +1074,15 @@ png_init_read_transformations(png_structp png_ptr)
palette[i].blue = png_ptr->gamma_table[palette[i].blue];
}
- /* Done the gamma correction. */
- png_ptr->transformations &= ~PNG_GAMMA;
+ /* Done the gamma correction. */
+ png_ptr->transformations &= ~PNG_GAMMA;
}
}
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
+#ifdef PNG_READ_BACKGROUND_SUPPORTED
else
#endif
#endif /* PNG_READ_GAMMA_SUPPORTED && PNG_FLOATING_POINT_SUPPORTED */
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
+#ifdef PNG_READ_BACKGROUND_SUPPORTED
/* No GAMMA transformation */
if ((png_ptr->transformations & PNG_BACKGROUND) &&
(color_type == PNG_COLOR_TYPE_PALETTE))
@@ -1099,19 +1098,19 @@ png_init_read_transformations(png_structp png_ptr)
for (i = 0; i < istop; i++)
{
- if (png_ptr->trans[i] == 0)
+ if (png_ptr->trans_alpha[i] == 0)
{
palette[i] = back;
}
- else if (png_ptr->trans[i] != 0xff)
+ else if (png_ptr->trans_alpha[i] != 0xff)
{
/* The png_composite() macro is defined in png.h */
png_composite(palette[i].red, palette[i].red,
- png_ptr->trans[i], back.red);
+ png_ptr->trans_alpha[i], back.red);
png_composite(palette[i].green, palette[i].green,
- png_ptr->trans[i], back.green);
+ png_ptr->trans_alpha[i], back.green);
png_composite(palette[i].blue, palette[i].blue,
- png_ptr->trans[i], back.blue);
+ png_ptr->trans_alpha[i], back.blue);
}
}
@@ -1121,7 +1120,7 @@ png_init_read_transformations(png_structp png_ptr)
}
#endif /* PNG_READ_BACKGROUND_SUPPORTED */
-#if defined(PNG_READ_SHIFT_SUPPORTED)
+#ifdef PNG_READ_SHIFT_SUPPORTED
if ((png_ptr->transformations & PNG_SHIFT) &&
(color_type == PNG_COLOR_TYPE_PALETTE))
{
@@ -1161,7 +1160,8 @@ void /* PRIVATE */
png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
{
png_debug(1, "in png_read_transform_info");
-#if defined(PNG_READ_EXPAND_SUPPORTED)
+
+#ifdef PNG_READ_EXPAND_SUPPORTED
if (png_ptr->transformations & PNG_EXPAND)
{
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
@@ -1188,7 +1188,7 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
+#ifdef PNG_READ_BACKGROUND_SUPPORTED
if (png_ptr->transformations & PNG_BACKGROUND)
{
info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA;
@@ -1197,7 +1197,7 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
if (png_ptr->transformations & PNG_GAMMA)
{
#ifdef PNG_FLOATING_POINT_SUPPORTED
@@ -1209,22 +1209,22 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_16_TO_8_SUPPORTED)
+#ifdef PNG_READ_16_TO_8_SUPPORTED
if ((png_ptr->transformations & PNG_16_TO_8) && (info_ptr->bit_depth == 16))
info_ptr->bit_depth = 8;
#endif
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
+#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
if (png_ptr->transformations & PNG_GRAY_TO_RGB)
info_ptr->color_type |= PNG_COLOR_MASK_COLOR;
#endif
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
+#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
if (png_ptr->transformations & PNG_RGB_TO_GRAY)
info_ptr->color_type &= ~PNG_COLOR_MASK_COLOR;
#endif
-#if defined(PNG_READ_DITHER_SUPPORTED)
+#ifdef PNG_READ_DITHER_SUPPORTED
if (png_ptr->transformations & PNG_DITHER)
{
if (((info_ptr->color_type == PNG_COLOR_TYPE_RGB) ||
@@ -1236,7 +1236,7 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
}
#endif
-#if defined(PNG_READ_PACK_SUPPORTED)
+#ifdef PNG_READ_PACK_SUPPORTED
if ((png_ptr->transformations & PNG_PACK) && (info_ptr->bit_depth < 8))
info_ptr->bit_depth = 8;
#endif
@@ -1248,7 +1248,7 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
else
info_ptr->channels = 1;
-#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
+#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED
if (png_ptr->flags & PNG_FLAG_STRIP_ALPHA)
info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA;
#endif
@@ -1256,7 +1256,7 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
info_ptr->channels++;
-#if defined(PNG_READ_FILLER_SUPPORTED)
+#ifdef PNG_READ_FILLER_SUPPORTED
/* STRIP_ALPHA and FILLER allowed: MASK_ALPHA bit stripped above */
if ((png_ptr->transformations & PNG_FILLER) &&
((info_ptr->color_type == PNG_COLOR_TYPE_RGB) ||
@@ -1264,10 +1264,8 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
{
info_ptr->channels++;
/* If adding a true alpha channel not just filler */
-#if !defined(PNG_1_0_X)
if (png_ptr->transformations & PNG_ADD_ALPHA)
info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
-#endif
}
#endif
@@ -1287,7 +1285,7 @@ defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, info_ptr->width);
-#if !defined(PNG_READ_EXPAND_SUPPORTED)
+#ifndef PNG_READ_EXPAND_SUPPORTED
if (png_ptr)
return;
#endif
@@ -1301,9 +1299,10 @@ void /* PRIVATE */
png_do_read_transformations(png_structp png_ptr)
{
png_debug(1, "in png_do_read_transformations");
+
if (png_ptr->row_buf == NULL)
{
-#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
+#ifdef PNG_STDIO_SUPPORTED
char msg[50];
png_snprintf2(msg, 50,
@@ -1327,20 +1326,20 @@ png_do_read_transformations(png_structp png_ptr)
#endif
#endif
-#if defined(PNG_READ_EXPAND_SUPPORTED)
+#ifdef PNG_READ_EXPAND_SUPPORTED
if (png_ptr->transformations & PNG_EXPAND)
{
if (png_ptr->row_info.color_type == PNG_COLOR_TYPE_PALETTE)
{
png_do_expand_palette(&(png_ptr->row_info), png_ptr->row_buf + 1,
- png_ptr->palette, png_ptr->trans, png_ptr->num_trans);
+ png_ptr->palette, png_ptr->trans_alpha, png_ptr->num_trans);
}
else
{
if (png_ptr->num_trans &&
(png_ptr->transformations & PNG_EXPAND_tRNS))
png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1,
- &(png_ptr->trans_values));
+ &(png_ptr->trans_color));
else
png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1,
NULL);
@@ -1348,13 +1347,13 @@ png_do_read_transformations(png_structp png_ptr)
}
#endif
-#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
+#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED
if (png_ptr->flags & PNG_FLAG_STRIP_ALPHA)
png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,
PNG_FLAG_FILLER_AFTER | (png_ptr->flags & PNG_FLAG_STRIP_ALPHA));
#endif
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
+#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
if (png_ptr->transformations & PNG_RGB_TO_GRAY)
{
int rgb_error =
@@ -1403,7 +1402,7 @@ png_do_read_transformations(png_structp png_ptr)
* transform appropriately, then it would save a lot of work/time.
*/
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
+#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
/* If gray -> RGB, do so now only if background is non-gray; else do later
* for performance reasons
*/
@@ -1412,13 +1411,13 @@ png_do_read_transformations(png_structp png_ptr)
png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
+#ifdef PNG_READ_BACKGROUND_SUPPORTED
if ((png_ptr->transformations & PNG_BACKGROUND) &&
((png_ptr->num_trans != 0 ) ||
(png_ptr->color_type & PNG_COLOR_MASK_ALPHA)))
png_do_background(&(png_ptr->row_info), png_ptr->row_buf + 1,
- &(png_ptr->trans_values), &(png_ptr->background)
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+ &(png_ptr->trans_color), &(png_ptr->background)
+#ifdef PNG_READ_GAMMA_SUPPORTED
, &(png_ptr->background_1),
png_ptr->gamma_table, png_ptr->gamma_from_1,
png_ptr->gamma_to_1, png_ptr->gamma_16_table,
@@ -1428,9 +1427,9 @@ png_do_read_transformations(png_structp png_ptr)
);
#endif
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
if ((png_ptr->transformations & PNG_GAMMA) &&
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
+#ifdef PNG_READ_BACKGROUND_SUPPORTED
!((png_ptr->transformations & PNG_BACKGROUND) &&
((png_ptr->num_trans != 0) ||
(png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) &&
@@ -1441,12 +1440,12 @@ png_do_read_transformations(png_structp png_ptr)
png_ptr->gamma_shift);
#endif
-#if defined(PNG_READ_16_TO_8_SUPPORTED)
+#ifdef PNG_READ_16_TO_8_SUPPORTED
if (png_ptr->transformations & PNG_16_TO_8)
png_do_chop(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
-#if defined(PNG_READ_DITHER_SUPPORTED)
+#ifdef PNG_READ_DITHER_SUPPORTED
if (png_ptr->transformations & PNG_DITHER)
{
png_do_dither((png_row_infop)&(png_ptr->row_info), png_ptr->row_buf + 1,
@@ -1456,61 +1455,61 @@ png_do_read_transformations(png_structp png_ptr)
}
#endif
-#if defined(PNG_READ_INVERT_SUPPORTED)
+#ifdef PNG_READ_INVERT_SUPPORTED
if (png_ptr->transformations & PNG_INVERT_MONO)
png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
-#if defined(PNG_READ_SHIFT_SUPPORTED)
+#ifdef PNG_READ_SHIFT_SUPPORTED
if (png_ptr->transformations & PNG_SHIFT)
png_do_unshift(&(png_ptr->row_info), png_ptr->row_buf + 1,
&(png_ptr->shift));
#endif
-#if defined(PNG_READ_PACK_SUPPORTED)
+#ifdef PNG_READ_PACK_SUPPORTED
if (png_ptr->transformations & PNG_PACK)
png_do_unpack(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
-#if defined(PNG_READ_BGR_SUPPORTED)
+#ifdef PNG_READ_BGR_SUPPORTED
if (png_ptr->transformations & PNG_BGR)
png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
+#ifdef PNG_READ_PACKSWAP_SUPPORTED
if (png_ptr->transformations & PNG_PACKSWAP)
png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
+#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
/* If gray -> RGB, do so now only if we did not do so above */
if ((png_ptr->transformations & PNG_GRAY_TO_RGB) &&
(png_ptr->mode & PNG_BACKGROUND_IS_GRAY))
png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
-#if defined(PNG_READ_FILLER_SUPPORTED)
+#ifdef PNG_READ_FILLER_SUPPORTED
if (png_ptr->transformations & PNG_FILLER)
png_do_read_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,
(png_uint_32)png_ptr->filler, png_ptr->flags);
#endif
-#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED)
+#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
if (png_ptr->transformations & PNG_INVERT_ALPHA)
png_do_read_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
-#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED)
+#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED
if (png_ptr->transformations & PNG_SWAP_ALPHA)
png_do_read_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
-#if defined(PNG_READ_SWAP_SUPPORTED)
+#ifdef PNG_READ_SWAP_SUPPORTED
if (png_ptr->transformations & PNG_SWAP_BYTES)
png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
+#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
if (png_ptr->transformations & PNG_USER_TRANSFORM)
{
if (png_ptr->read_user_transform_fn != NULL)
@@ -1524,7 +1523,7 @@ png_do_read_transformations(png_structp png_ptr)
/* png_byte channels; number of channels (1-4) */
/* png_byte pixel_depth; bits per pixel (depth*channels) */
png_ptr->row_buf + 1); /* start of pixel data for row */
-#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
+#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
if (png_ptr->user_transform_depth)
png_ptr->row_info.bit_depth = png_ptr->user_transform_depth;
if (png_ptr->user_transform_channels)
@@ -1539,7 +1538,7 @@ png_do_read_transformations(png_structp png_ptr)
}
-#if defined(PNG_READ_PACK_SUPPORTED)
+#ifdef PNG_READ_PACK_SUPPORTED
/* Unpack pixels of 1, 2, or 4 bits per pixel into 1 byte per pixel,
* without changing the actual values. Thus, if you had a row with
* a bit depth of 1, you would end up with bytes that only contained
@@ -1550,11 +1549,8 @@ void /* PRIVATE */
png_do_unpack(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_unpack");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- if (row != NULL && row_info != NULL && row_info->bit_depth < 8)
-#else
+
if (row_info->bit_depth < 8)
-#endif
{
png_uint_32 i;
png_uint_32 row_width=row_info->width;
@@ -1632,7 +1628,7 @@ png_do_unpack(png_row_infop row_info, png_bytep row)
}
#endif
-#if defined(PNG_READ_SHIFT_SUPPORTED)
+#ifdef PNG_READ_SHIFT_SUPPORTED
/* Reverse the effects of png_do_shift. This routine merely shifts the
* pixels back to their significant bits values. Thus, if you have
* a row of bit depth 8, but only 5 are significant, this will shift
@@ -1642,10 +1638,8 @@ void /* PRIVATE */
png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits)
{
png_debug(1, "in png_do_unshift");
+
if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- row != NULL && row_info != NULL && sig_bits != NULL &&
-#endif
row_info->color_type != PNG_COLOR_TYPE_PALETTE)
{
int shift[4];
@@ -1745,17 +1739,14 @@ png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits)
}
#endif
-#if defined(PNG_READ_16_TO_8_SUPPORTED)
+#ifdef PNG_READ_16_TO_8_SUPPORTED
/* Chop rows of bit depth 16 down to 8 */
void /* PRIVATE */
png_do_chop(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_chop");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- if (row != NULL && row_info != NULL && row_info->bit_depth == 16)
-#else
+
if (row_info->bit_depth == 16)
-#endif
{
png_bytep sp = row;
png_bytep dp = row;
@@ -1764,7 +1755,7 @@ png_do_chop(png_row_infop row_info, png_bytep row)
for (i = 0; i<istop; i++, sp += 2, dp++)
{
-#if defined(PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED)
+#ifdef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
/* This does a more accurate scaling of the 16-bit color
* value, rather than a simple low-byte truncation.
*
@@ -1803,14 +1794,12 @@ png_do_chop(png_row_infop row_info, png_bytep row)
}
#endif
-#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED)
+#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED
void /* PRIVATE */
png_do_read_swap_alpha(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_read_swap_alpha");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- if (row != NULL && row_info != NULL)
-#endif
+
{
png_uint_32 row_width = row_info->width;
if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
@@ -1895,14 +1884,12 @@ png_do_read_swap_alpha(png_row_infop row_info, png_bytep row)
}
#endif
-#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED)
+#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
void /* PRIVATE */
png_do_read_invert_alpha(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_read_invert_alpha");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- if (row != NULL && row_info != NULL)
-#endif
+
{
png_uint_32 row_width = row_info->width;
if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
@@ -1993,7 +1980,7 @@ png_do_read_invert_alpha(png_row_infop row_info, png_bytep row)
}
#endif
-#if defined(PNG_READ_FILLER_SUPPORTED)
+#ifdef PNG_READ_FILLER_SUPPORTED
/* Add filler channel if we have RGB color */
void /* PRIVATE */
png_do_read_filler(png_row_infop row_info, png_bytep row,
@@ -2006,10 +1993,8 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
png_byte lo_filler = (png_byte)(filler & 0xff);
png_debug(1, "in png_do_read_filler");
+
if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- row != NULL && row_info != NULL &&
-#endif
row_info->color_type == PNG_COLOR_TYPE_GRAY)
{
if (row_info->bit_depth == 8)
@@ -2169,7 +2154,7 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
}
#endif
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
+#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
/* Expand grayscale files to RGB, with or without alpha */
void /* PRIVATE */
png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
@@ -2178,10 +2163,8 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
png_uint_32 row_width = row_info->width;
png_debug(1, "in png_do_gray_to_rgb");
+
if (row_info->bit_depth >= 8 &&
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- row != NULL && row_info != NULL &&
-#endif
!(row_info->color_type & PNG_COLOR_MASK_COLOR))
{
if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
@@ -2252,7 +2235,7 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
}
#endif
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
+#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
/* Reduce RGB files to grayscale, with or without alpha
* using the equation given in Poynton's ColorFAQ at
* <http://www.inforamp.net/~poynton/> (THIS LINK IS DEAD June 2008)
@@ -2284,10 +2267,8 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
int rgb_error = 0;
png_debug(1, "in png_do_rgb_to_gray");
+
if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- row != NULL && row_info != NULL &&
-#endif
(row_info->color_type & PNG_COLOR_MASK_COLOR))
{
png_uint_32 rc = png_ptr->rgb_to_gray_red_coeff;
@@ -2522,6 +2503,7 @@ png_build_grayscale_palette(int bit_depth, png_colorp palette)
int v;
png_debug(1, "in png_do_build_grayscale_palette");
+
if (palette == NULL)
return;
@@ -2561,197 +2543,16 @@ png_build_grayscale_palette(int bit_depth, png_colorp palette)
}
}
-/* This function is currently unused. Do we really need it? */
-#if defined(PNG_READ_DITHER_SUPPORTED) && defined(PNG_CORRECT_PALETTE_SUPPORTED)
-void /* PRIVATE */
-png_correct_palette(png_structp png_ptr, png_colorp palette,
- int num_palette)
-{
- png_debug(1, "in png_correct_palette");
-#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \
- defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)
- if (png_ptr->transformations & (PNG_GAMMA | PNG_BACKGROUND))
- {
- png_color back, back_1;
-
- if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_FILE)
- {
- back.red = png_ptr->gamma_table[png_ptr->background.red];
- back.green = png_ptr->gamma_table[png_ptr->background.green];
- back.blue = png_ptr->gamma_table[png_ptr->background.blue];
-
- back_1.red = png_ptr->gamma_to_1[png_ptr->background.red];
- back_1.green = png_ptr->gamma_to_1[png_ptr->background.green];
- back_1.blue = png_ptr->gamma_to_1[png_ptr->background.blue];
- }
- else
- {
- double g;
-
- g = 1.0 / (png_ptr->background_gamma * png_ptr->screen_gamma);
-
- if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_SCREEN ||
- fabs(g - 1.0) < PNG_GAMMA_THRESHOLD)
- {
- back.red = png_ptr->background.red;
- back.green = png_ptr->background.green;
- back.blue = png_ptr->background.blue;
- }
- else
- {
- back.red =
- (png_byte)(pow((double)png_ptr->background.red/255, g) *
- 255.0 + 0.5);
- back.green =
- (png_byte)(pow((double)png_ptr->background.green/255, g) *
- 255.0 + 0.5);
- back.blue =
- (png_byte)(pow((double)png_ptr->background.blue/255, g) *
- 255.0 + 0.5);
- }
-
- g = 1.0 / png_ptr->background_gamma;
-
- back_1.red =
- (png_byte)(pow((double)png_ptr->background.red/255, g) *
- 255.0 + 0.5);
- back_1.green =
- (png_byte)(pow((double)png_ptr->background.green/255, g) *
- 255.0 + 0.5);
- back_1.blue =
- (png_byte)(pow((double)png_ptr->background.blue/255, g) *
- 255.0 + 0.5);
- }
-
- if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
- {
- png_uint_32 i;
-
- for (i = 0; i < (png_uint_32)num_palette; i++)
- {
- if (i < png_ptr->num_trans && png_ptr->trans[i] == 0)
- {
- palette[i] = back;
- }
- else if (i < png_ptr->num_trans && png_ptr->trans[i] != 0xff)
- {
- png_byte v, w;
-
- v = png_ptr->gamma_to_1[png_ptr->palette[i].red];
- png_composite(w, v, png_ptr->trans[i], back_1.red);
- palette[i].red = png_ptr->gamma_from_1[w];
-
- v = png_ptr->gamma_to_1[png_ptr->palette[i].green];
- png_composite(w, v, png_ptr->trans[i], back_1.green);
- palette[i].green = png_ptr->gamma_from_1[w];
-
- v = png_ptr->gamma_to_1[png_ptr->palette[i].blue];
- png_composite(w, v, png_ptr->trans[i], back_1.blue);
- palette[i].blue = png_ptr->gamma_from_1[w];
- }
- else
- {
- palette[i].red = png_ptr->gamma_table[palette[i].red];
- palette[i].green = png_ptr->gamma_table[palette[i].green];
- palette[i].blue = png_ptr->gamma_table[palette[i].blue];
- }
- }
- }
- else
- {
- int i;
- for (i = 0; i < num_palette; i++)
- {
- if (palette[i].red == (png_byte)png_ptr->trans_values.gray)
- {
- palette[i] = back;
- }
- else
- {
- palette[i].red = png_ptr->gamma_table[palette[i].red];
- palette[i].green = png_ptr->gamma_table[palette[i].green];
- palette[i].blue = png_ptr->gamma_table[palette[i].blue];
- }
- }
- }
- }
- else
-#endif
-#if defined(PNG_READ_GAMMA_SUPPORTED)
- if (png_ptr->transformations & PNG_GAMMA)
- {
- int i;
-
- for (i = 0; i < num_palette; i++)
- {
- palette[i].red = png_ptr->gamma_table[palette[i].red];
- palette[i].green = png_ptr->gamma_table[palette[i].green];
- palette[i].blue = png_ptr->gamma_table[palette[i].blue];
- }
- }
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
- else
-#endif
-#endif
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
- if (png_ptr->transformations & PNG_BACKGROUND)
- {
- if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
- {
- png_color back;
-
- back.red = (png_byte)png_ptr->background.red;
- back.green = (png_byte)png_ptr->background.green;
- back.blue = (png_byte)png_ptr->background.blue;
-
- for (i = 0; i < (int)png_ptr->num_trans; i++)
- {
- if (png_ptr->trans[i] == 0)
- {
- palette[i].red = back.red;
- palette[i].green = back.green;
- palette[i].blue = back.blue;
- }
- else if (png_ptr->trans[i] != 0xff)
- {
- png_composite(palette[i].red, png_ptr->palette[i].red,
- png_ptr->trans[i], back.red);
- png_composite(palette[i].green, png_ptr->palette[i].green,
- png_ptr->trans[i], back.green);
- png_composite(palette[i].blue, png_ptr->palette[i].blue,
- png_ptr->trans[i], back.blue);
- }
- }
- }
- else /* Assume grayscale palette (what else could it be?) */
- {
- int i;
-
- for (i = 0; i < num_palette; i++)
- {
- if (i == (png_byte)png_ptr->trans_values.gray)
- {
- palette[i].red = (png_byte)png_ptr->background.red;
- palette[i].green = (png_byte)png_ptr->background.green;
- palette[i].blue = (png_byte)png_ptr->background.blue;
- }
- }
- }
- }
-#endif
-}
-#endif
-
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
+#ifdef PNG_READ_BACKGROUND_SUPPORTED
/* Replace any alpha or transparency with the supplied background color.
* "background" is already in the screen gamma, while "background_1" is
* at a gamma of 1.0. Paletted files have already been taken care of.
*/
void /* PRIVATE */
png_do_background(png_row_infop row_info, png_bytep row,
- png_color_16p trans_values, png_color_16p background
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+ png_color_16p trans_color, png_color_16p background
+#ifdef PNG_READ_GAMMA_SUPPORTED
, png_color_16p background_1,
png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,
png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1,
@@ -2765,12 +2566,10 @@ png_do_background(png_row_infop row_info, png_bytep row,
int shift;
png_debug(1, "in png_do_background");
+
if (background != NULL &&
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- row != NULL && row_info != NULL &&
-#endif
(!(row_info->color_type & PNG_COLOR_MASK_ALPHA) ||
- (row_info->color_type != PNG_COLOR_TYPE_PALETTE && trans_values)))
+ (row_info->color_type != PNG_COLOR_TYPE_PALETTE && trans_color)))
{
switch (row_info->color_type)
{
@@ -2785,7 +2584,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
for (i = 0; i < row_width; i++)
{
if ((png_uint_16)((*sp >> shift) & 0x01)
- == trans_values->gray)
+ == trans_color->gray)
{
*sp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff);
*sp |= (png_byte)(background->gray << shift);
@@ -2803,7 +2602,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
case 2:
{
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
if (gamma_table != NULL)
{
sp = row;
@@ -2811,7 +2610,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
for (i = 0; i < row_width; i++)
{
if ((png_uint_16)((*sp >> shift) & 0x03)
- == trans_values->gray)
+ == trans_color->gray)
{
*sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);
*sp |= (png_byte)(background->gray << shift);
@@ -2841,7 +2640,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
for (i = 0; i < row_width; i++)
{
if ((png_uint_16)((*sp >> shift) & 0x03)
- == trans_values->gray)
+ == trans_color->gray)
{
*sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);
*sp |= (png_byte)(background->gray << shift);
@@ -2860,7 +2659,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
case 4:
{
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
if (gamma_table != NULL)
{
sp = row;
@@ -2868,7 +2667,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
for (i = 0; i < row_width; i++)
{
if ((png_uint_16)((*sp >> shift) & 0x0f)
- == trans_values->gray)
+ == trans_color->gray)
{
*sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);
*sp |= (png_byte)(background->gray << shift);
@@ -2898,7 +2697,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
for (i = 0; i < row_width; i++)
{
if ((png_uint_16)((*sp >> shift) & 0x0f)
- == trans_values->gray)
+ == trans_color->gray)
{
*sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);
*sp |= (png_byte)(background->gray << shift);
@@ -2917,13 +2716,13 @@ png_do_background(png_row_infop row_info, png_bytep row,
case 8:
{
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
if (gamma_table != NULL)
{
sp = row;
for (i = 0; i < row_width; i++, sp++)
{
- if (*sp == trans_values->gray)
+ if (*sp == trans_color->gray)
{
*sp = (png_byte)background->gray;
}
@@ -2939,7 +2738,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
sp = row;
for (i = 0; i < row_width; i++, sp++)
{
- if (*sp == trans_values->gray)
+ if (*sp == trans_color->gray)
{
*sp = (png_byte)background->gray;
}
@@ -2950,7 +2749,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
case 16:
{
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
if (gamma_16 != NULL)
{
sp = row;
@@ -2959,7 +2758,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
png_uint_16 v;
v = (png_uint_16)(((*sp) << 8) + *(sp + 1));
- if (v == trans_values->gray)
+ if (v == trans_color->gray)
{
/* Background is already in screen gamma */
*sp = (png_byte)((background->gray >> 8) & 0xff);
@@ -2982,7 +2781,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
png_uint_16 v;
v = (png_uint_16)(((*sp) << 8) + *(sp + 1));
- if (v == trans_values->gray)
+ if (v == trans_color->gray)
{
*sp = (png_byte)((background->gray >> 8) & 0xff);
*(sp + 1) = (png_byte)(background->gray & 0xff);
@@ -2999,15 +2798,15 @@ png_do_background(png_row_infop row_info, png_bytep row,
{
if (row_info->bit_depth == 8)
{
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
if (gamma_table != NULL)
{
sp = row;
for (i = 0; i < row_width; i++, sp += 3)
{
- if (*sp == trans_values->red &&
- *(sp + 1) == trans_values->green &&
- *(sp + 2) == trans_values->blue)
+ if (*sp == trans_color->red &&
+ *(sp + 1) == trans_color->green &&
+ *(sp + 2) == trans_color->blue)
{
*sp = (png_byte)background->red;
*(sp + 1) = (png_byte)background->green;
@@ -3027,9 +2826,9 @@ png_do_background(png_row_infop row_info, png_bytep row,
sp = row;
for (i = 0; i < row_width; i++, sp += 3)
{
- if (*sp == trans_values->red &&
- *(sp + 1) == trans_values->green &&
- *(sp + 2) == trans_values->blue)
+ if (*sp == trans_color->red &&
+ *(sp + 1) == trans_color->green &&
+ *(sp + 2) == trans_color->blue)
{
*sp = (png_byte)background->red;
*(sp + 1) = (png_byte)background->green;
@@ -3040,7 +2839,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
}
else /* if (row_info->bit_depth == 16) */
{
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
if (gamma_16 != NULL)
{
sp = row;
@@ -3049,8 +2848,8 @@ png_do_background(png_row_infop row_info, png_bytep row,
png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1));
png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3));
png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5));
- if (r == trans_values->red && g == trans_values->green &&
- b == trans_values->blue)
+ if (r == trans_color->red && g == trans_color->green &&
+ b == trans_color->blue)
{
/* Background is already in screen gamma */
*sp = (png_byte)((background->red >> 8) & 0xff);
@@ -3084,8 +2883,8 @@ png_do_background(png_row_infop row_info, png_bytep row,
png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3));
png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5));
- if (r == trans_values->red && g == trans_values->green &&
- b == trans_values->blue)
+ if (r == trans_color->red && g == trans_color->green &&
+ b == trans_color->blue)
{
*sp = (png_byte)((background->red >> 8) & 0xff);
*(sp + 1) = (png_byte)(background->red & 0xff);
@@ -3104,7 +2903,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
{
if (row_info->bit_depth == 8)
{
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
if (gamma_to_1 != NULL && gamma_from_1 != NULL &&
gamma_table != NULL)
{
@@ -3146,7 +2945,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
{
*dp = *sp;
}
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
else if (a == 0)
{
*dp = (png_byte)background->gray;
@@ -3163,7 +2962,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
}
else /* if (png_ptr->bit_depth == 16) */
{
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
if (gamma_16 != NULL && gamma_16_from_1 != NULL &&
gamma_16_to_1 != NULL)
{
@@ -3181,7 +2980,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
*dp = (png_byte)((v >> 8) & 0xff);
*(dp + 1) = (png_byte)(v & 0xff);
}
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
else if (a == 0)
#else
else
@@ -3191,7 +2990,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
*dp = (png_byte)((background->gray >> 8) & 0xff);
*(dp + 1) = (png_byte)(background->gray & 0xff);
}
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
else
{
png_uint_16 g, v, w;
@@ -3217,7 +3016,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
{
png_memcpy(dp, sp, 2);
}
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
else if (a == 0)
#else
else
@@ -3226,7 +3025,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
*dp = (png_byte)((background->gray >> 8) & 0xff);
*(dp + 1) = (png_byte)(background->gray & 0xff);
}
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
else
{
png_uint_16 g, v;
@@ -3247,7 +3046,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
{
if (row_info->bit_depth == 8)
{
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
if (gamma_to_1 != NULL && gamma_from_1 != NULL &&
gamma_table != NULL)
{
@@ -3320,7 +3119,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
}
else /* if (row_info->bit_depth == 16) */
{
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
if (gamma_16 != NULL && gamma_16_from_1 != NULL &&
gamma_16_to_1 != NULL)
{
@@ -3437,7 +3236,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
}
#endif
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
/* Gamma correct the image, avoiding the alpha channel. Make sure
* you do this after you deal with the transparency issue on grayscale
* or RGB images. If your bit depth is 8, use gamma_table, if it
@@ -3454,10 +3253,8 @@ png_do_gamma(png_row_infop row_info, png_bytep row,
png_uint_32 row_width=row_info->width;
png_debug(1, "in png_do_gamma");
+
if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- row != NULL && row_info != NULL &&
-#endif
((row_info->bit_depth <= 8 && gamma_table != NULL) ||
(row_info->bit_depth == 16 && gamma_16_table != NULL)))
{
@@ -3628,13 +3425,13 @@ png_do_gamma(png_row_infop row_info, png_bytep row,
}
#endif
-#if defined(PNG_READ_EXPAND_SUPPORTED)
+#ifdef PNG_READ_EXPAND_SUPPORTED
/* Expands a palette row to an RGB or RGBA row depending
* upon whether you supply trans and num_trans.
*/
void /* PRIVATE */
png_do_expand_palette(png_row_infop row_info, png_bytep row,
- png_colorp palette, png_bytep trans, int num_trans)
+ png_colorp palette, png_bytep trans_alpha, int num_trans)
{
int shift, value;
png_bytep sp, dp;
@@ -3642,10 +3439,8 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
png_uint_32 row_width=row_info->width;
png_debug(1, "in png_do_expand_palette");
+
if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- row != NULL && row_info != NULL &&
-#endif
row_info->color_type == PNG_COLOR_TYPE_PALETTE)
{
if (row_info->bit_depth < 8)
@@ -3728,7 +3523,7 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
{
case 8:
{
- if (trans != NULL)
+ if (trans_alpha != NULL)
{
sp = row + (png_size_t)row_width - 1;
dp = row + (png_size_t)(row_width << 2) - 1;
@@ -3738,7 +3533,7 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
if ((int)(*sp) >= num_trans)
*dp-- = 0xff;
else
- *dp-- = trans[*sp];
+ *dp-- = trans_alpha[*sp];
*dp-- = palette[*sp].blue;
*dp-- = palette[*sp].green;
*dp-- = palette[*sp].red;
@@ -3788,9 +3583,7 @@ png_do_expand(png_row_infop row_info, png_bytep row,
png_uint_32 row_width=row_info->width;
png_debug(1, "in png_do_expand");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- if (row != NULL && row_info != NULL)
-#endif
+
{
if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
{
@@ -3989,7 +3782,7 @@ png_do_expand(png_row_infop row_info, png_bytep row,
}
#endif
-#if defined(PNG_READ_DITHER_SUPPORTED)
+#ifdef PNG_READ_DITHER_SUPPORTED
void /* PRIVATE */
png_do_dither(png_row_infop row_info, png_bytep row,
png_bytep palette_lookup, png_bytep dither_lookup)
@@ -3999,9 +3792,7 @@ png_do_dither(png_row_infop row_info, png_bytep row,
png_uint_32 row_width=row_info->width;
png_debug(1, "in png_do_dither");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- if (row != NULL && row_info != NULL)
-#endif
+
{
if (row_info->color_type == PNG_COLOR_TYPE_RGB &&
palette_lookup && row_info->bit_depth == 8)
@@ -4081,7 +3872,7 @@ png_do_dither(png_row_infop row_info, png_bytep row,
#endif
#ifdef PNG_FLOATING_POINT_SUPPORTED
-#if defined(PNG_READ_GAMMA_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
static PNG_CONST int png_gamma_shift[] =
{0x10, 0x21, 0x42, 0x84, 0x110, 0x248, 0x550, 0xff0, 0x00};
@@ -4089,13 +3880,42 @@ static PNG_CONST int png_gamma_shift[] =
* tables, we don't make a full table if we are reducing to 8-bit in
* the future. Note also how the gamma_16 tables are segmented so that
* we don't need to allocate > 64K chunks for a full 16-bit table.
+ *
+ * See the PNG extensions document for an integer algorithm for creating
+ * the gamma tables. Maybe we will implement that here someday.
+ *
+ * We should only reach this point if
+ *
+ * the file_gamma is known (i.e., the gAMA or sRGB chunk is present,
+ * or the application has provided a file_gamma)
+ *
+ * AND
+ * {
+ * the screen_gamma is known
+ *
+ * OR
+ *
+ * RGB_to_gray transformation is being performed
+ * }
+ *
+ * AND
+ * {
+ * the screen_gamma is different from the reciprocal of the
+ * file_gamma by more than the specified threshold
+ *
+ * OR
+ *
+ * a background color has been specified and the file_gamma
+ * and screen_gamma are not 1.0, within the specified threshold.
+ * }
*/
+
void /* PRIVATE */
-png_build_gamma_table(png_structp png_ptr)
+png_build_gamma_table(png_structp png_ptr, png_byte bit_depth)
{
png_debug(1, "in png_build_gamma_table");
- if (png_ptr->bit_depth <= 8)
+ if (bit_depth <= 8)
{
int i;
double g;
@@ -4199,9 +4019,8 @@ png_build_gamma_table(png_structp png_ptr)
else
g = 1.0;
- png_ptr->gamma_16_table = (png_uint_16pp)png_malloc(png_ptr,
+ png_ptr->gamma_16_table = (png_uint_16pp)png_calloc(png_ptr,
(png_uint_32)(num * png_sizeof(png_uint_16p)));
- png_memset(png_ptr->gamma_16_table, 0, num * png_sizeof(png_uint_16p));
if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND))
{
@@ -4261,9 +4080,8 @@ png_build_gamma_table(png_structp png_ptr)
g = 1.0 / (png_ptr->gamma);
- png_ptr->gamma_16_to_1 = (png_uint_16pp)png_malloc(png_ptr,
+ png_ptr->gamma_16_to_1 = (png_uint_16pp)png_calloc(png_ptr,
(png_uint_32)(num * png_sizeof(png_uint_16p )));
- png_memset(png_ptr->gamma_16_to_1, 0, num * png_sizeof(png_uint_16p));
for (i = 0; i < num; i++)
{
@@ -4286,10 +4104,8 @@ png_build_gamma_table(png_structp png_ptr)
else
g = png_ptr->gamma; /* Probably doing rgb_to_gray */
- png_ptr->gamma_16_from_1 = (png_uint_16pp)png_malloc(png_ptr,
+ png_ptr->gamma_16_from_1 = (png_uint_16pp)png_calloc(png_ptr,
(png_uint_32)(num * png_sizeof(png_uint_16p)));
- png_memset(png_ptr->gamma_16_from_1, 0,
- num * png_sizeof(png_uint_16p));
for (i = 0; i < num; i++)
{
@@ -4314,16 +4130,14 @@ png_build_gamma_table(png_structp png_ptr)
/* To do: install integer version of png_build_gamma_table here */
#endif
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
+#ifdef PNG_MNG_FEATURES_SUPPORTED
/* Undoes intrapixel differencing */
void /* PRIVATE */
png_do_read_intrapixel(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_read_intrapixel");
+
if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- row != NULL && row_info != NULL &&
-#endif
(row_info->color_type & PNG_COLOR_MASK_COLOR))
{
int bytes_per_pixel;
diff --git a/src/3rdparty/libpng/pngrutil.c b/src/3rdparty/libpng/pngrutil.c
index f656dfbdfd..d971e8f18a 100644
--- a/src/3rdparty/libpng/pngrutil.c
+++ b/src/3rdparty/libpng/pngrutil.c
@@ -1,8 +1,8 @@
/* pngrutil.c - utilities to read a PNG file
*
- * Last changed in libpng 1.2.38 [July 16, 2009]
- * Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.0 [January 3, 2010]
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -14,57 +14,21 @@
* libpng itself during the course of reading an image.
*/
-#define PNG_INTERNAL
+#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
-#if defined(PNG_READ_SUPPORTED)
+#ifdef PNG_READ_SUPPORTED
+#include "pngpriv.h"
-#if defined(_WIN32_WCE) && (_WIN32_WCE<0x500)
-# define WIN32_WCE_OLD
-#endif
-
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-# if defined(WIN32_WCE_OLD)
-/* The strtod() function is not supported on WindowsCE */
-__inline double png_strtod(png_structp png_ptr, PNG_CONST char *nptr, char **endptr)
-{
- double result = 0;
- int len;
- wchar_t *str, *end;
-
- len = MultiByteToWideChar(CP_ACP, 0, nptr, -1, NULL, 0);
- str = (wchar_t *)png_malloc(png_ptr, len * png_sizeof(wchar_t));
- if ( NULL != str )
- {
- MultiByteToWideChar(CP_ACP, 0, nptr, -1, str, len);
- result = wcstod(str, &end);
- len = WideCharToMultiByte(CP_ACP, 0, end, -1, NULL, 0, NULL, NULL);
- *endptr = (char *)nptr + (png_strlen(nptr) - len + 1);
- png_free(png_ptr, str);
- }
- return result;
-}
-# else
# define png_strtod(p,a,b) strtod(a,b)
-# endif
-#endif
-
png_uint_32 PNGAPI
png_get_uint_31(png_structp png_ptr, png_bytep buf)
{
-#ifdef PNG_READ_BIG_ENDIAN_SUPPORTED
png_uint_32 i = png_get_uint_32(buf);
-#else
- /* Avoid an extra function call by inlining the result. */
- png_uint_32 i = ((png_uint_32)(*buf) << 24) +
- ((png_uint_32)(*(buf + 1)) << 16) +
- ((png_uint_32)(*(buf + 2)) << 8) +
- (png_uint_32)(*(buf + 3));
-#endif
if (i > PNG_UINT_31_MAX)
- png_error(png_ptr, "PNG unsigned integer out of range.");
+ png_error(png_ptr, "PNG unsigned integer out of range");
return (i);
}
-#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED
+#ifndef PNG_USE_READ_MACROS
/* Grab an unsigned 32-bit integer from a buffer in big-endian format. */
png_uint_32 PNGAPI
png_get_uint_32(png_bytep buf)
@@ -101,7 +65,7 @@ png_get_uint_16(png_bytep buf)
return (i);
}
-#endif /* PNG_READ_BIG_ENDIAN_SUPPORTED */
+#endif /* PNG_USE_READ_MACROS */
/* Read the chunk header (length + type name).
* Put the type name into png_ptr->chunk_name, and return the length.
@@ -112,6 +76,13 @@ png_read_chunk_header(png_structp png_ptr)
png_byte buf[8];
png_uint_32 length;
+#ifdef PNG_IO_STATE_SUPPORTED
+ /* Inform the I/O callback that the chunk header is being read.
+ * PNG_IO_CHUNK_HDR requires a single I/O call.
+ */
+ png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_HDR;
+#endif
+
/* Read the length and the chunk name */
png_read_data(png_ptr, buf, 8);
length = png_get_uint_31(png_ptr, buf);
@@ -129,6 +100,13 @@ png_read_chunk_header(png_structp png_ptr)
/* Check to see if chunk name is valid */
png_check_chunk_name(png_ptr, png_ptr->chunk_name);
+#ifdef PNG_IO_STATE_SUPPORTED
+ /* Inform the I/O callback that chunk data will (possibly) be read.
+ * PNG_IO_CHUNK_DATA does NOT require a specific number of I/O calls.
+ */
+ png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_DATA;
+#endif
+
return length;
}
@@ -173,7 +151,8 @@ png_crc_finish(png_structp png_ptr, png_uint_32 skip)
}
else
{
- png_chunk_error(png_ptr, "CRC error");
+ png_chunk_benign_error(png_ptr, "CRC error");
+ return (0);
}
return (1);
}
@@ -203,6 +182,12 @@ png_crc_error(png_structp png_ptr)
need_crc = 0;
}
+#ifdef PNG_IO_STATE_SUPPORTED
+ /* Inform the I/O callback that the chunk CRC is being read */
+ /* PNG_IO_CHUNK_CRC requires the I/O to be done at once */
+ png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_CRC;
+#endif
+
png_read_data(png_ptr, crc_bytes, 4);
if (need_crc)
@@ -228,7 +213,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
png_size_t chunklength,
png_size_t prefix_size, png_size_t *newlength)
{
- static PNG_CONST char msg[] = "Error decoding compressed text";
+ static PNG_CONST char msg[] = "Error decoding compressed chunk";
png_charp text;
png_size_t text_size;
@@ -290,7 +275,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
png_error(png_ptr,
- "Not enough memory to decompress chunk.");
+ "Not enough memory to decompress chunk");
}
png_memcpy(text + prefix_size, png_ptr->zbuf,
text_size - prefix_size);
@@ -302,16 +287,30 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
png_charp tmp;
tmp = text;
- text = (png_charp)png_malloc_warn(png_ptr,
- (png_uint_32)(text_size +
- png_ptr->zbuf_size - png_ptr->zstream.avail_out + 1));
+#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+ if ((png_ptr->user_chunk_cache_max != 0) &&
+ (--png_ptr->user_chunk_cache_max == 0))
+ {
+ png_warning(png_ptr, "No space in chunk cache");
+ text = NULL;
+ }
+
+ else
+ {
+#endif
+ text = (png_charp)png_malloc_warn(png_ptr,
+ (png_size_t)(text_size +
+ png_ptr->zbuf_size - png_ptr->zstream.avail_out + 1));
+#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+ }
+#endif
if (text == NULL)
{
png_free(png_ptr, tmp);
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
png_error(png_ptr,
- "Not enough memory to decompress chunk..");
+ "Not enough memory to decompress chunk");
}
png_memcpy(text, tmp, text_size);
png_free(png_ptr, tmp);
@@ -331,7 +330,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
}
if (ret != Z_STREAM_END)
{
-#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
+#ifdef PNG_STDIO_SUPPORTED
char umsg[52];
if (ret == Z_BUF_ERROR)
@@ -362,7 +361,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
{
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
- png_error(png_ptr, "Not enough memory for text.");
+ png_error(png_ptr, "Not enough memory for text");
}
png_memcpy(text, png_ptr->chunkdata, prefix_size);
}
@@ -378,7 +377,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
}
else /* if (comp_type != PNG_COMPRESSION_TYPE_BASE) */
{
-#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
+#ifdef PNG_STDIO_SUPPORTED
char umsg[50];
png_snprintf(umsg, 50, "Unknown zTXt compression type %d", comp_type);
@@ -430,7 +429,7 @@ png_handle_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->bit_depth = (png_byte)bit_depth;
png_ptr->interlaced = (png_byte)interlace_type;
png_ptr->color_type = (png_byte)color_type;
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
+#ifdef PNG_MNG_FEATURES_SUPPORTED
png_ptr->filter_type = (png_byte)filter_type;
#endif
png_ptr->compression_type = (png_byte)compression_type;
@@ -473,7 +472,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
png_color palette[PNG_MAX_PALETTE_LENGTH];
int num, i;
-#ifndef PNG_NO_POINTER_INDEXING
+#ifdef PNG_POINTER_INDEXING_SUPPORTED
png_colorp pal_ptr;
#endif
@@ -501,7 +500,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_crc_finish(png_ptr, length);
return;
}
-#if !defined(PNG_READ_OPT_PLTE_SUPPORTED)
+#ifndef PNG_READ_OPT_PLTE_SUPPORTED
if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE)
{
png_crc_finish(png_ptr, length);
@@ -526,7 +525,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
num = (int)length / 3;
-#ifndef PNG_NO_POINTER_INDEXING
+#ifdef PNG_POINTER_INDEXING_SUPPORTED
for (i = 0, pal_ptr = palette; i < num; i++, pal_ptr++)
{
png_byte buf[3];
@@ -554,13 +553,13 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
* have an RGB image, the PLTE can be considered ancillary, so
* we will act as though it is.
*/
-#if !defined(PNG_READ_OPT_PLTE_SUPPORTED)
+#ifndef PNG_READ_OPT_PLTE_SUPPORTED
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
#endif
{
png_crc_finish(png_ptr, 0);
}
-#if !defined(PNG_READ_OPT_PLTE_SUPPORTED)
+#ifndef PNG_READ_OPT_PLTE_SUPPORTED
else if (png_crc_error(png_ptr)) /* Only if we have a CRC error */
{
/* If we don't want to use the data from an ancillary chunk,
@@ -571,7 +570,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
if (png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN)
{
- png_chunk_error(png_ptr, "CRC error");
+ png_chunk_benign_error(png_ptr, "CRC error");
}
else
{
@@ -589,7 +588,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_set_PLTE(png_ptr, info_ptr, palette, num);
-#if defined(PNG_READ_tRNS_SUPPORTED)
+#ifdef PNG_READ_tRNS_SUPPORTED
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
{
if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS))
@@ -631,7 +630,7 @@ png_handle_IEND(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
info_ptr = info_ptr; /* Quiet compiler warnings about unused info_ptr */
}
-#if defined(PNG_READ_gAMA_SUPPORTED)
+#ifdef PNG_READ_gAMA_SUPPORTED
void /* PRIVATE */
png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
@@ -656,7 +655,7 @@ png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_warning(png_ptr, "Out of place gAMA chunk");
if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)
-#if defined(PNG_READ_sRGB_SUPPORTED)
+#ifdef PNG_READ_sRGB_SUPPORTED
&& !(info_ptr->valid & PNG_INFO_sRGB)
#endif
)
@@ -686,13 +685,13 @@ png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
return;
}
-#if defined(PNG_READ_sRGB_SUPPORTED)
+#ifdef PNG_READ_sRGB_SUPPORTED
if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB))
if (PNG_OUT_OF_RANGE(igamma, 45500L, 500))
{
png_warning(png_ptr,
"Ignoring incorrect gAMA value when sRGB is also present");
-#ifndef PNG_NO_CONSOLE_IO
+#ifdef PNG_CONSOLE_IO_SUPPORTED
fprintf(stderr, "gamma = (%d/100000)", (int)igamma);
#endif
return;
@@ -712,7 +711,7 @@ png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
#endif
-#if defined(PNG_READ_sBIT_SUPPORTED)
+#ifdef PNG_READ_sBIT_SUPPORTED
void /* PRIVATE */
png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
@@ -778,7 +777,7 @@ png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
#endif
-#if defined(PNG_READ_cHRM_SUPPORTED)
+#ifdef PNG_READ_cHRM_SUPPORTED
void /* PRIVATE */
png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
@@ -806,7 +805,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_warning(png_ptr, "Missing PLTE before cHRM");
if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)
-#if defined(PNG_READ_sRGB_SUPPORTED)
+#ifdef PNG_READ_sRGB_SUPPORTED
&& !(info_ptr->valid & PNG_INFO_sRGB)
#endif
)
@@ -858,7 +857,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
blue_y = (float)int_y_blue / (float)100000.0;
#endif
-#if defined(PNG_READ_sRGB_SUPPORTED)
+#ifdef PNG_READ_sRGB_SUPPORTED
if ((info_ptr != NULL) && (info_ptr->valid & PNG_INFO_sRGB))
{
if (PNG_OUT_OF_RANGE(int_x_white, 31270, 1000) ||
@@ -872,7 +871,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
png_warning(png_ptr,
"Ignoring incorrect cHRM value when sRGB is also present");
-#ifndef PNG_NO_CONSOLE_IO
+#ifdef PNG_CONSOLE_IO_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
fprintf(stderr, "wx=%f, wy=%f, rx=%f, ry=%f\n",
white_x, white_y, red_x, red_y);
@@ -884,7 +883,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
fprintf(stderr, "gx=%ld, gy=%ld, bx=%ld, by=%ld\n",
int_x_green, int_y_green, int_x_blue, int_y_blue);
#endif
-#endif /* PNG_NO_CONSOLE_IO */
+#endif /* PNG_CONSOLE_IO_SUPPORTED */
}
return;
}
@@ -902,7 +901,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
#endif
-#if defined(PNG_READ_sRGB_SUPPORTED)
+#ifdef PNG_READ_sRGB_SUPPORTED
void /* PRIVATE */
png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
@@ -964,7 +963,7 @@ png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
png_warning(png_ptr,
"Ignoring incorrect gAMA value when sRGB is also present");
-#ifndef PNG_NO_CONSOLE_IO
+#ifdef PNG_CONSOLE_IO_SUPPORTED
# ifdef PNG_FIXED_POINT_SUPPORTED
fprintf(stderr, "incorrect gamma=(%d/100000)\n",
(int)png_ptr->int_gamma);
@@ -1000,7 +999,7 @@ png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
#endif /* PNG_READ_sRGB_SUPPORTED */
-#if defined(PNG_READ_iCCP_SUPPORTED)
+#ifdef PNG_READ_iCCP_SUPPORTED
void /* PRIVATE */
png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
/* Note: this does not properly handle chunks that are > 64K under DOS */
@@ -1109,7 +1108,7 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
- png_warning(png_ptr, "Ignoring truncated iCCP profile.");
+ png_warning(png_ptr, "Ignoring truncated iCCP profile");
return;
}
@@ -1120,14 +1119,14 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
#endif /* PNG_READ_iCCP_SUPPORTED */
-#if defined(PNG_READ_sPLT_SUPPORTED)
+#ifdef PNG_READ_sPLT_SUPPORTED
void /* PRIVATE */
png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
/* Note: this does not properly handle chunks that are > 64K under DOS */
{
png_bytep entry_start;
png_sPLT_t new_palette;
-#ifdef PNG_NO_POINTER_INDEXING
+#ifdef PNG_POINTER_INDEXING_SUPPORTED
png_sPLT_entryp pp;
#endif
int data_length, entry_size, i;
@@ -1136,6 +1135,23 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_debug(1, "in png_handle_sPLT");
+#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+
+ if (png_ptr->user_chunk_cache_max != 0)
+ {
+ if (png_ptr->user_chunk_cache_max == 1)
+ {
+ png_crc_finish(png_ptr, length);
+ return;
+ }
+ if (--png_ptr->user_chunk_cache_max == 1)
+ {
+ png_warning(png_ptr, "No space in chunk cache for sPLT");
+ png_crc_finish(png_ptr, length);
+ return;
+ }
+ }
+#endif
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before sPLT");
@@ -1210,10 +1226,10 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
return;
}
-#ifndef PNG_NO_POINTER_INDEXING
+#ifdef PNG_POINTER_INDEXING_SUPPORTED
for (i = 0; i < new_palette.nentries; i++)
{
- png_sPLT_entryp pp = new_palette.entries + i;
+ pp = new_palette.entries + i;
if (new_palette.depth == 8)
{
@@ -1265,7 +1281,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
#endif /* PNG_READ_sPLT_SUPPORTED */
-#if defined(PNG_READ_tRNS_SUPPORTED)
+#ifdef PNG_READ_tRNS_SUPPORTED
void /* PRIVATE */
png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
@@ -1301,7 +1317,7 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_crc_read(png_ptr, buf, 2);
png_ptr->num_trans = 1;
- png_ptr->trans_values.gray = png_get_uint_16(buf);
+ png_ptr->trans_color.gray = png_get_uint_16(buf);
}
else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB)
{
@@ -1315,9 +1331,9 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
png_crc_read(png_ptr, buf, (png_size_t)length);
png_ptr->num_trans = 1;
- png_ptr->trans_values.red = png_get_uint_16(buf);
- png_ptr->trans_values.green = png_get_uint_16(buf + 2);
- png_ptr->trans_values.blue = png_get_uint_16(buf + 4);
+ png_ptr->trans_color.red = png_get_uint_16(buf);
+ png_ptr->trans_color.green = png_get_uint_16(buf + 2);
+ png_ptr->trans_color.blue = png_get_uint_16(buf + 4);
}
else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
{
@@ -1356,11 +1372,11 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
png_set_tRNS(png_ptr, info_ptr, readbuf, png_ptr->num_trans,
- &(png_ptr->trans_values));
+ &(png_ptr->trans_color));
}
#endif
-#if defined(PNG_READ_bKGD_SUPPORTED)
+#ifdef PNG_READ_bKGD_SUPPORTED
void /* PRIVATE */
png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
@@ -1449,7 +1465,7 @@ png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
#endif
-#if defined(PNG_READ_hIST_SUPPORTED)
+#ifdef PNG_READ_hIST_SUPPORTED
void /* PRIVATE */
png_handle_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
@@ -1503,7 +1519,7 @@ png_handle_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
#endif
-#if defined(PNG_READ_pHYs_SUPPORTED)
+#ifdef PNG_READ_pHYs_SUPPORTED
void /* PRIVATE */
png_handle_pHYs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
@@ -1546,7 +1562,7 @@ png_handle_pHYs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
#endif
-#if defined(PNG_READ_oFFs_SUPPORTED)
+#ifdef PNG_READ_oFFs_SUPPORTED
void /* PRIVATE */
png_handle_oFFs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
@@ -1589,7 +1605,7 @@ png_handle_oFFs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
#endif
-#if defined(PNG_READ_pCAL_SUPPORTED)
+#ifdef PNG_READ_pCAL_SUPPORTED
/* Read the pCAL chunk (described in the PNG Extensions document) */
void /* PRIVATE */
png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
@@ -1624,7 +1640,7 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
if (png_ptr->chunkdata == NULL)
{
- png_warning(png_ptr, "No memory for pCAL purpose.");
+ png_warning(png_ptr, "No memory for pCAL purpose");
return;
}
slength = (png_size_t)length;
@@ -1685,12 +1701,12 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_debug(3, "Allocating pCAL parameters array");
params = (png_charpp)png_malloc_warn(png_ptr,
- (png_uint_32)(nparams * png_sizeof(png_charp))) ;
+ (png_size_t)(nparams * png_sizeof(png_charp)));
if (params == NULL)
{
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
- png_warning(png_ptr, "No memory for pCAL params.");
+ png_warning(png_ptr, "No memory for pCAL params");
return;
}
@@ -1723,7 +1739,7 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
#endif
-#if defined(PNG_READ_sCAL_SUPPORTED)
+#ifdef PNG_READ_sCAL_SUPPORTED
/* Read the sCAL chunk */
void /* PRIVATE */
png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
@@ -1793,7 +1809,7 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_warning(png_ptr, "Out of memory while processing sCAL chunk width");
return;
}
- png_memcpy(swidth, ep, (png_size_t)png_strlen(ep));
+ png_memcpy(swidth, ep, png_strlen(ep));
#endif
#endif
@@ -1828,7 +1844,7 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_warning(png_ptr, "Out of memory while processing sCAL chunk height");
return;
}
- png_memcpy(sheight, ep, (png_size_t)png_strlen(ep));
+ png_memcpy(sheight, ep, png_strlen(ep));
#endif
#endif
@@ -1866,7 +1882,7 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
#endif
-#if defined(PNG_READ_tIME_SUPPORTED)
+#ifdef PNG_READ_tIME_SUPPORTED
void /* PRIVATE */
png_handle_tIME(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
@@ -1909,7 +1925,7 @@ png_handle_tIME(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
#endif
-#if defined(PNG_READ_tEXt_SUPPORTED)
+#ifdef PNG_READ_tEXt_SUPPORTED
/* Note: this does not properly handle chunks that are > 64K under DOS */
void /* PRIVATE */
png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
@@ -1923,6 +1939,22 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_debug(1, "in png_handle_tEXt");
+#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+ if (png_ptr->user_chunk_cache_max != 0)
+ {
+ if (png_ptr->user_chunk_cache_max == 1)
+ {
+ png_crc_finish(png_ptr, length);
+ return;
+ }
+ if (--png_ptr->user_chunk_cache_max == 1)
+ {
+ png_warning(png_ptr, "No space in chunk cache for tEXt");
+ png_crc_finish(png_ptr, length);
+ return;
+ }
+ }
+#endif
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before tEXt");
@@ -1944,7 +1976,7 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
if (png_ptr->chunkdata == NULL)
{
- png_warning(png_ptr, "No memory to process text chunk.");
+ png_warning(png_ptr, "No memory to process text chunk");
return;
}
slength = (png_size_t)length;
@@ -1968,10 +2000,10 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
text++;
text_ptr = (png_textp)png_malloc_warn(png_ptr,
- (png_uint_32)png_sizeof(png_text));
+ png_sizeof(png_text));
if (text_ptr == NULL)
{
- png_warning(png_ptr, "Not enough memory to process text chunk.");
+ png_warning(png_ptr, "Not enough memory to process text chunk");
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
return;
@@ -1992,11 +2024,11 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->chunkdata = NULL;
png_free(png_ptr, text_ptr);
if (ret)
- png_warning(png_ptr, "Insufficient memory to process text chunk.");
+ png_warning(png_ptr, "Insufficient memory to process text chunk");
}
#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
+#ifdef PNG_READ_zTXt_SUPPORTED
/* Note: this does not correctly handle chunks that are > 64K under DOS */
void /* PRIVATE */
png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
@@ -2009,6 +2041,22 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_debug(1, "in png_handle_zTXt");
+#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+ if (png_ptr->user_chunk_cache_max != 0)
+ {
+ if (png_ptr->user_chunk_cache_max == 1)
+ {
+ png_crc_finish(png_ptr, length);
+ return;
+ }
+ if (--png_ptr->user_chunk_cache_max == 1)
+ {
+ png_warning(png_ptr, "No space in chunk cache for zTXt");
+ png_crc_finish(png_ptr, length);
+ return;
+ }
+ }
+#endif
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before zTXt");
@@ -2031,7 +2079,7 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
if (png_ptr->chunkdata == NULL)
{
- png_warning(png_ptr, "Out of memory processing zTXt chunk.");
+ png_warning(png_ptr, "Out of memory processing zTXt chunk");
return;
}
slength = (png_size_t)length;
@@ -2072,10 +2120,10 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
(png_size_t)length, prefix_len, &data_len);
text_ptr = (png_textp)png_malloc_warn(png_ptr,
- (png_uint_32)png_sizeof(png_text));
+ png_sizeof(png_text));
if (text_ptr == NULL)
{
- png_warning(png_ptr, "Not enough memory to process zTXt chunk.");
+ png_warning(png_ptr, "Not enough memory to process zTXt chunk");
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
return;
@@ -2096,11 +2144,11 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
if (ret)
- png_error(png_ptr, "Insufficient memory to store zTXt chunk.");
+ png_error(png_ptr, "Insufficient memory to store zTXt chunk");
}
#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
+#ifdef PNG_READ_iTXt_SUPPORTED
/* Note: this does not correctly handle chunks that are > 64K under DOS */
void /* PRIVATE */
png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
@@ -2114,6 +2162,22 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_debug(1, "in png_handle_iTXt");
+#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+ if (png_ptr->user_chunk_cache_max != 0)
+ {
+ if (png_ptr->user_chunk_cache_max == 1)
+ {
+ png_crc_finish(png_ptr, length);
+ return;
+ }
+ if (--png_ptr->user_chunk_cache_max == 1)
+ {
+ png_warning(png_ptr, "No space in chunk cache for iTXt");
+ png_crc_finish(png_ptr, length);
+ return;
+ }
+ }
+#endif
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before iTXt");
@@ -2136,7 +2200,7 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
if (png_ptr->chunkdata == NULL)
{
- png_warning(png_ptr, "No memory to process iTXt chunk.");
+ png_warning(png_ptr, "No memory to process iTXt chunk");
return;
}
slength = (png_size_t)length;
@@ -2204,10 +2268,10 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
else
data_len = png_strlen(png_ptr->chunkdata + prefix_len);
text_ptr = (png_textp)png_malloc_warn(png_ptr,
- (png_uint_32)png_sizeof(png_text));
+ png_sizeof(png_text));
if (text_ptr == NULL)
{
- png_warning(png_ptr, "Not enough memory to process iTXt chunk.");
+ png_warning(png_ptr, "Not enough memory to process iTXt chunk");
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
return;
@@ -2226,7 +2290,7 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
if (ret)
- png_error(png_ptr, "Insufficient memory to store iTXt chunk.");
+ png_error(png_ptr, "Insufficient memory to store iTXt chunk");
}
#endif
@@ -2242,22 +2306,36 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_debug(1, "in png_handle_unknown");
+#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+ if (png_ptr->user_chunk_cache_max != 0)
+ {
+ if (png_ptr->user_chunk_cache_max == 1)
+ {
+ png_crc_finish(png_ptr, length);
+ return;
+ }
+ if (--png_ptr->user_chunk_cache_max == 1)
+ {
+ png_warning(png_ptr, "No space in chunk cache for unknown chunk");
+ png_crc_finish(png_ptr, length);
+ return;
+ }
+ }
+#endif
if (png_ptr->mode & PNG_HAVE_IDAT)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
- PNG_CONST PNG_IDAT;
-#endif
+ PNG_IDAT;
if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) /* Not an IDAT */
png_ptr->mode |= PNG_AFTER_IDAT;
}
if (!(png_ptr->chunk_name[0] & 0x20))
{
-#if defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
+#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=
PNG_HANDLE_CHUNK_ALWAYS
-#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
+#ifdef PNG_READ_USER_CHUNKS_SUPPORTED
&& png_ptr->read_user_chunk_fn == NULL
#endif
)
@@ -2265,9 +2343,9 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_chunk_error(png_ptr, "unknown critical chunk");
}
-#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
if ((png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS)
-#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
+#ifdef PNG_READ_USER_CHUNKS_SUPPORTED
|| (png_ptr->read_user_chunk_fn != NULL)
#endif
)
@@ -2292,7 +2370,7 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr, length);
png_crc_read(png_ptr, (png_bytep)png_ptr->unknown_chunk.data, length);
}
-#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
+#ifdef PNG_READ_USER_CHUNKS_SUPPORTED
if (png_ptr->read_user_chunk_fn != NULL)
{
/* Callback to user unknown chunk handler */
@@ -2304,7 +2382,7 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (ret == 0)
{
if (!(png_ptr->chunk_name[0] & 0x20))
-#if defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
+#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=
PNG_HANDLE_CHUNK_ALWAYS)
#endif
@@ -2325,7 +2403,7 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_crc_finish(png_ptr, skip);
-#if !defined(PNG_READ_USER_CHUNKS_SUPPORTED)
+#ifndef PNG_READ_USER_CHUNKS_SUPPORTED
info_ptr = info_ptr; /* Quiet compiler warnings about unused info_ptr */
#endif
}
@@ -2383,7 +2461,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
png_uint_32 i;
png_uint_32 row_width = png_ptr->width;
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
+#ifdef PNG_READ_PACKSWAP_SUPPORTED
if (png_ptr->transformations & PNG_PACKSWAP)
{
s_start = 0;
@@ -2438,7 +2516,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
png_uint_32 row_width = png_ptr->width;
int value;
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
+#ifdef PNG_READ_PACKSWAP_SUPPORTED
if (png_ptr->transformations & PNG_PACKSWAP)
{
s_start = 0;
@@ -2490,7 +2568,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
png_uint_32 row_width = png_ptr->width;
int value;
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
+#ifdef PNG_READ_PACKSWAP_SUPPORTED
if (png_ptr->transformations & PNG_PACKSWAP)
{
s_start = 0;
@@ -2573,11 +2651,9 @@ png_do_read_interlace(png_structp png_ptr)
png_bytep row = png_ptr->row_buf + 1;
int pass = png_ptr->pass;
png_uint_32 transformations = png_ptr->transformations;
-#ifdef PNG_USE_LOCAL_ARRAYS
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Offset to next interlace block */
PNG_CONST int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
-#endif
png_debug(1, "in png_do_read_interlace");
if (row != NULL && row_info != NULL)
@@ -2599,7 +2675,7 @@ png_do_read_interlace(png_structp png_ptr)
png_uint_32 i;
int j;
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
+#ifdef PNG_READ_PACKSWAP_SUPPORTED
if (transformations & PNG_PACKSWAP)
{
sshift = (int)((row_info->width + 7) & 0x07);
@@ -2652,7 +2728,7 @@ png_do_read_interlace(png_structp png_ptr)
int jstop = png_pass_inc[pass];
png_uint_32 i;
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
+#ifdef PNG_READ_PACKSWAP_SUPPORTED
if (transformations & PNG_PACKSWAP)
{
sshift = (int)(((row_info->width + 3) & 0x03) << 1);
@@ -2708,7 +2784,7 @@ png_do_read_interlace(png_structp png_ptr)
png_uint_32 i;
int jstop = png_pass_inc[pass];
-#if defined(PNG_READ_PACKSWAP_SUPPORTED)
+#ifdef PNG_READ_PACKSWAP_SUPPORTED
if (transformations & PNG_PACKSWAP)
{
sshift = (int)(((row_info->width + 1) & 0x01) << 2);
@@ -2782,7 +2858,7 @@ png_do_read_interlace(png_structp png_ptr)
row_info->width = final_width;
row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, final_width);
}
-#if !defined(PNG_READ_PACKSWAP_SUPPORTED)
+#ifndef PNG_READ_PACKSWAP_SUPPORTED
transformations = transformations; /* Silence compiler warning */
#endif
}
@@ -2911,11 +2987,10 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row,
}
}
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
void /* PRIVATE */
png_read_finish_row(png_structp png_ptr)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
#ifdef PNG_READ_INTERLACING_SUPPORTED
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
@@ -2931,7 +3006,6 @@ png_read_finish_row(png_structp png_ptr)
/* Offset to next interlace block in the y direction */
PNG_CONST int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};
#endif /* PNG_READ_INTERLACING_SUPPORTED */
-#endif
png_debug(1, "in png_read_finish_row");
png_ptr->row_number++;
@@ -2942,7 +3016,7 @@ png_read_finish_row(png_structp png_ptr)
if (png_ptr->interlaced)
{
png_ptr->row_number = 0;
- png_memset_check(png_ptr, png_ptr->prev_row, 0,
+ png_memset(png_ptr->prev_row, 0,
png_ptr->rowbytes + 1);
do
{
@@ -2977,9 +3051,7 @@ png_read_finish_row(png_structp png_ptr)
if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))
{
-#ifdef PNG_USE_LOCAL_ARRAYS
- PNG_CONST PNG_IDAT;
-#endif
+ PNG_IDAT;
char extra;
int ret;
@@ -3026,7 +3098,7 @@ png_read_finish_row(png_structp png_ptr)
if (!(png_ptr->zstream.avail_out))
{
- png_warning(png_ptr, "Extra compressed data.");
+ png_warning(png_ptr, "Extra compressed data");
png_ptr->mode |= PNG_AFTER_IDAT;
png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
break;
@@ -3043,12 +3115,11 @@ png_read_finish_row(png_structp png_ptr)
png_ptr->mode |= PNG_AFTER_IDAT;
}
-#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
+#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
void /* PRIVATE */
png_read_start_row(png_structp png_ptr)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
#ifdef PNG_READ_INTERLACING_SUPPORTED
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
@@ -3064,7 +3135,6 @@ png_read_start_row(png_structp png_ptr)
/* Offset to next interlace block in the y direction */
PNG_CONST int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};
#endif
-#endif
int max_pixel_depth;
png_size_t row_bytes;
@@ -3098,12 +3168,12 @@ png_read_start_row(png_structp png_ptr)
}
max_pixel_depth = png_ptr->pixel_depth;
-#if defined(PNG_READ_PACK_SUPPORTED)
+#ifdef PNG_READ_PACK_SUPPORTED
if ((png_ptr->transformations & PNG_PACK) && png_ptr->bit_depth < 8)
max_pixel_depth = 8;
#endif
-#if defined(PNG_READ_EXPAND_SUPPORTED)
+#ifdef PNG_READ_EXPAND_SUPPORTED
if (png_ptr->transformations & PNG_EXPAND)
{
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
@@ -3131,7 +3201,7 @@ png_read_start_row(png_structp png_ptr)
}
#endif
-#if defined(PNG_READ_FILLER_SUPPORTED)
+#ifdef PNG_READ_FILLER_SUPPORTED
if (png_ptr->transformations & (PNG_FILLER))
{
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
@@ -3153,14 +3223,14 @@ png_read_start_row(png_structp png_ptr)
}
#endif
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
+#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
if (png_ptr->transformations & PNG_GRAY_TO_RGB)
{
if (
-#if defined(PNG_READ_EXPAND_SUPPORTED)
+#ifdef PNG_READ_EXPAND_SUPPORTED
(png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND)) ||
#endif
-#if defined(PNG_READ_FILLER_SUPPORTED)
+#ifdef PNG_READ_FILLER_SUPPORTED
(png_ptr->transformations & (PNG_FILLER)) ||
#endif
png_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
@@ -3212,33 +3282,47 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
png_error(png_ptr, "This image requires a row greater than 64KB");
#endif
- if (row_bytes + 64 > png_ptr->old_big_row_buf_size)
+ if (row_bytes + 48 > png_ptr->old_big_row_buf_size)
{
png_free(png_ptr, png_ptr->big_row_buf);
- png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr, row_bytes + 64);
if (png_ptr->interlaced)
- png_memset(png_ptr->big_row_buf, 0, row_bytes + 64);
+ png_ptr->big_row_buf = (png_bytep)png_calloc(png_ptr,
+ row_bytes + 48);
+ else
+ png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr,
+ row_bytes + 48);
+ png_ptr->old_big_row_buf_size = row_bytes + 48;
+
+#ifdef PNG_ALIGNED_MEMORY_SUPPORTED
+ /* Use 16-byte aligned memory for row_buf with at least 16 bytes
+ * of padding before and after row_buf.
+ */
+ png_ptr->row_buf = png_ptr->big_row_buf + 32
+ - (((png_alloc_size_t)&(png_ptr->big_row_buf[0]) + 15) % 16);
+ png_ptr->old_big_row_buf_size = row_bytes + 48;
+#else
+ /* Use 32 bytes of padding before and 16 bytes after row_buf. */
png_ptr->row_buf = png_ptr->big_row_buf + 32;
- png_ptr->old_big_row_buf_size = row_bytes + 64;
+#endif
+ png_ptr->old_big_row_buf_size = row_bytes + 48;
}
#ifdef PNG_MAX_MALLOC_64K
- if ((png_uint_32)row_bytes + 1 > (png_uint_32)65536L)
+ if ((png_uint_32)png_ptr->rowbytes + 1 > (png_uint_32)65536L)
png_error(png_ptr, "This image requires a row greater than 64KB");
#endif
- if ((png_uint_32)row_bytes > (png_uint_32)(PNG_SIZE_MAX - 1))
- png_error(png_ptr, "Row has too many bytes to allocate in memory.");
+ if ((png_uint_32)png_ptr->rowbytes > (png_uint_32)(PNG_SIZE_MAX - 1))
+ png_error(png_ptr, "Row has too many bytes to allocate in memory");
- if (row_bytes + 1 > png_ptr->old_prev_row_size)
+ if (png_ptr->rowbytes + 1 > png_ptr->old_prev_row_size)
{
png_free(png_ptr, png_ptr->prev_row);
png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, (png_uint_32)(
- row_bytes + 1));
- png_memset_check(png_ptr, png_ptr->prev_row, 0, row_bytes + 1);
- png_ptr->old_prev_row_size = row_bytes + 1;
+ png_ptr->rowbytes + 1));
+ png_ptr->old_prev_row_size = png_ptr->rowbytes + 1;
}
- png_ptr->rowbytes = row_bytes;
+ png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
png_debug1(3, "width = %lu,", png_ptr->width);
png_debug1(3, "height = %lu,", png_ptr->height);
diff --git a/src/3rdparty/libpng/pngset.c b/src/3rdparty/libpng/pngset.c
index 9e1b885610..adb401604d 100644
--- a/src/3rdparty/libpng/pngset.c
+++ b/src/3rdparty/libpng/pngset.c
@@ -1,8 +1,8 @@
/* pngset.c - storage of image information into info struct
*
- * Last changed in libpng 1.2.40 [September 10, 2009]
- * Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.0 [January 3, 2010]
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -16,11 +16,12 @@
* info struct and allows us to change the structure in the future.
*/
-#define PNG_INTERNAL
+#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
+#include "pngpriv.h"
-#if defined(PNG_bKGD_SUPPORTED)
+#ifdef PNG_bKGD_SUPPORTED
void PNGAPI
png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background)
{
@@ -34,7 +35,7 @@ png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background)
}
#endif
-#if defined(PNG_cHRM_SUPPORTED)
+#ifdef PNG_cHRM_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
void PNGAPI
png_set_cHRM(png_structp png_ptr, png_infop info_ptr,
@@ -80,7 +81,7 @@ png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
if (png_ptr == NULL || info_ptr == NULL)
return;
-#if !defined(PNG_NO_CHECK_cHRM)
+#ifdef PNG_CHECK_cHRM_SUPPORTED
if (png_check_cHRM_fixed(png_ptr,
white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y))
#endif
@@ -109,7 +110,7 @@ png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
#endif /* PNG_FIXED_POINT_SUPPORTED */
#endif /* PNG_cHRM_SUPPORTED */
-#if defined(PNG_gAMA_SUPPORTED)
+#ifdef PNG_gAMA_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
void PNGAPI
png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma)
@@ -176,7 +177,7 @@ png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point
}
#endif
-#if defined(PNG_hIST_SUPPORTED)
+#ifdef PNG_hIST_SUPPORTED
void PNGAPI
png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)
{
@@ -191,21 +192,19 @@ png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)
> PNG_MAX_PALETTE_LENGTH)
{
png_warning(png_ptr,
- "Invalid palette size, hIST allocation skipped.");
+ "Invalid palette size, hIST allocation skipped");
return;
}
-#ifdef PNG_FREE_ME_SUPPORTED
png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0);
-#endif
/* Changed from info->num_palette to PNG_MAX_PALETTE_LENGTH in
* version 1.2.1
*/
png_ptr->hist = (png_uint_16p)png_malloc_warn(png_ptr,
- (png_uint_32)(PNG_MAX_PALETTE_LENGTH * png_sizeof(png_uint_16)));
+ PNG_MAX_PALETTE_LENGTH * png_sizeof(png_uint_16));
if (png_ptr->hist == NULL)
{
- png_warning(png_ptr, "Insufficient memory for hIST chunk data.");
+ png_warning(png_ptr, "Insufficient memory for hIST chunk data");
return;
}
@@ -214,11 +213,7 @@ png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)
info_ptr->hist = png_ptr->hist;
info_ptr->valid |= PNG_INFO_hIST;
-#ifdef PNG_FREE_ME_SUPPORTED
info_ptr->free_me |= PNG_FREE_HIST;
-#else
- png_ptr->flags |= PNG_FLAG_FREE_HIST;
-#endif
}
#endif
@@ -233,82 +228,18 @@ png_set_IHDR(png_structp png_ptr, png_infop info_ptr,
if (png_ptr == NULL || info_ptr == NULL)
return;
- /* Check for width and height valid values */
- if (width == 0 || height == 0)
- png_error(png_ptr, "Image width or height is zero in IHDR");
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
- if (width > png_ptr->user_width_max || height > png_ptr->user_height_max)
- png_error(png_ptr, "image size exceeds user limits in IHDR");
-#else
- if (width > PNG_USER_WIDTH_MAX || height > PNG_USER_HEIGHT_MAX)
- png_error(png_ptr, "image size exceeds user limits in IHDR");
-#endif
- if (width > PNG_UINT_31_MAX || height > PNG_UINT_31_MAX)
- png_error(png_ptr, "Invalid image size in IHDR");
- if ( width > (PNG_UINT_32_MAX
- >> 3) /* 8-byte RGBA pixels */
- - 64 /* bigrowbuf hack */
- - 1 /* filter byte */
- - 7*8 /* rounding of width to multiple of 8 pixels */
- - 8) /* extra max_pixel_depth pad */
- png_warning(png_ptr, "Width is too large for libpng to process pixels");
-
- /* Check other values */
- if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 &&
- bit_depth != 8 && bit_depth != 16)
- png_error(png_ptr, "Invalid bit depth in IHDR");
-
- if (color_type < 0 || color_type == 1 ||
- color_type == 5 || color_type > 6)
- png_error(png_ptr, "Invalid color type in IHDR");
-
- if (((color_type == PNG_COLOR_TYPE_PALETTE) && bit_depth > 8) ||
- ((color_type == PNG_COLOR_TYPE_RGB ||
- color_type == PNG_COLOR_TYPE_GRAY_ALPHA ||
- color_type == PNG_COLOR_TYPE_RGB_ALPHA) && bit_depth < 8))
- png_error(png_ptr, "Invalid color type/bit depth combination in IHDR");
-
- if (interlace_type >= PNG_INTERLACE_LAST)
- png_error(png_ptr, "Unknown interlace method in IHDR");
-
- if (compression_type != PNG_COMPRESSION_TYPE_BASE)
- png_error(png_ptr, "Unknown compression method in IHDR");
-
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
- /* Accept filter_method 64 (intrapixel differencing) only if
- * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and
- * 2. Libpng did not read a PNG signature (this filter_method is only
- * used in PNG datastreams that are embedded in MNG datastreams) and
- * 3. The application called png_permit_mng_features with a mask that
- * included PNG_FLAG_MNG_FILTER_64 and
- * 4. The filter_method is 64 and
- * 5. The color_type is RGB or RGBA
- */
- if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)&&png_ptr->mng_features_permitted)
- png_warning(png_ptr, "MNG features are not allowed in a PNG datastream");
- if (filter_type != PNG_FILTER_TYPE_BASE)
- {
- if (!((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
- (filter_type == PNG_INTRAPIXEL_DIFFERENCING) &&
- ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) &&
- (color_type == PNG_COLOR_TYPE_RGB ||
- color_type == PNG_COLOR_TYPE_RGB_ALPHA)))
- png_error(png_ptr, "Unknown filter method in IHDR");
- if (png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)
- png_warning(png_ptr, "Invalid filter method in IHDR");
- }
-#else
- if (filter_type != PNG_FILTER_TYPE_BASE)
- png_error(png_ptr, "Unknown filter method in IHDR");
-#endif
-
info_ptr->width = width;
info_ptr->height = height;
info_ptr->bit_depth = (png_byte)bit_depth;
- info_ptr->color_type =(png_byte) color_type;
+ info_ptr->color_type = (png_byte)color_type;
info_ptr->compression_type = (png_byte)compression_type;
info_ptr->filter_type = (png_byte)filter_type;
info_ptr->interlace_type = (png_byte)interlace_type;
+
+ png_check_IHDR (png_ptr, info_ptr->width, info_ptr->height,
+ info_ptr->bit_depth, info_ptr->color_type, info_ptr->interlace_type,
+ info_ptr->compression_type, info_ptr->filter_type);
+
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
info_ptr->channels = 1;
else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
@@ -326,12 +257,12 @@ png_set_IHDR(png_structp png_ptr, png_infop info_ptr,
- 1 /* filter byte */
- 7*8 /* rounding of width to multiple of 8 pixels */
- 8) /* extra max_pixel_depth pad */
- info_ptr->rowbytes = (png_size_t)0;
+ info_ptr->rowbytes = 0;
else
info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width);
}
-#if defined(PNG_oFFs_SUPPORTED)
+#ifdef PNG_oFFs_SUPPORTED
void PNGAPI
png_set_oFFs(png_structp png_ptr, png_infop info_ptr,
png_int_32 offset_x, png_int_32 offset_y, int unit_type)
@@ -348,13 +279,13 @@ png_set_oFFs(png_structp png_ptr, png_infop info_ptr,
}
#endif
-#if defined(PNG_pCAL_SUPPORTED)
+#ifdef PNG_pCAL_SUPPORTED
void PNGAPI
png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams,
png_charp units, png_charpp params)
{
- png_uint_32 length;
+ png_size_t length;
int i;
png_debug1(1, "in %s storage function", "pCAL");
@@ -368,10 +299,10 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
info_ptr->pcal_purpose = (png_charp)png_malloc_warn(png_ptr, length);
if (info_ptr->pcal_purpose == NULL)
{
- png_warning(png_ptr, "Insufficient memory for pCAL purpose.");
+ png_warning(png_ptr, "Insufficient memory for pCAL purpose");
return;
}
- png_memcpy(info_ptr->pcal_purpose, purpose, (png_size_t)length);
+ png_memcpy(info_ptr->pcal_purpose, purpose, length);
png_debug(3, "storing X0, X1, type, and nparams in info");
info_ptr->pcal_X0 = X0;
@@ -385,16 +316,16 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
info_ptr->pcal_units = (png_charp)png_malloc_warn(png_ptr, length);
if (info_ptr->pcal_units == NULL)
{
- png_warning(png_ptr, "Insufficient memory for pCAL units.");
+ png_warning(png_ptr, "Insufficient memory for pCAL units");
return;
}
- png_memcpy(info_ptr->pcal_units, units, (png_size_t)length);
+ png_memcpy(info_ptr->pcal_units, units, length);
info_ptr->pcal_params = (png_charpp)png_malloc_warn(png_ptr,
- (png_uint_32)((nparams + 1) * png_sizeof(png_charp)));
+ (png_size_t)((nparams + 1) * png_sizeof(png_charp)));
if (info_ptr->pcal_params == NULL)
{
- png_warning(png_ptr, "Insufficient memory for pCAL params.");
+ png_warning(png_ptr, "Insufficient memory for pCAL params");
return;
}
@@ -408,16 +339,14 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
info_ptr->pcal_params[i] = (png_charp)png_malloc_warn(png_ptr, length);
if (info_ptr->pcal_params[i] == NULL)
{
- png_warning(png_ptr, "Insufficient memory for pCAL parameter.");
+ png_warning(png_ptr, "Insufficient memory for pCAL parameter");
return;
}
- png_memcpy(info_ptr->pcal_params[i], params[i], (png_size_t)length);
+ png_memcpy(info_ptr->pcal_params[i], params[i], length);
}
info_ptr->valid |= PNG_INFO_pCAL;
-#ifdef PNG_FREE_ME_SUPPORTED
info_ptr->free_me |= PNG_FREE_PCAL;
-#endif
}
#endif
@@ -444,7 +373,7 @@ void PNGAPI
png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr,
int unit, png_charp swidth, png_charp sheight)
{
- png_uint_32 length;
+ png_size_t length;
png_debug1(1, "in %s storage function", "sCAL");
@@ -460,10 +389,10 @@ png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr,
if (info_ptr->scal_s_width == NULL)
{
png_warning(png_ptr,
- "Memory allocation failed while processing sCAL.");
+ "Memory allocation failed while processing sCAL");
return;
}
- png_memcpy(info_ptr->scal_s_width, swidth, (png_size_t)length);
+ png_memcpy(info_ptr->scal_s_width, swidth, length);
length = png_strlen(sheight) + 1;
png_debug1(3, "allocating unit for info (%u bytes)",
@@ -474,20 +403,18 @@ png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr,
png_free (png_ptr, info_ptr->scal_s_width);
info_ptr->scal_s_width = NULL;
png_warning(png_ptr,
- "Memory allocation failed while processing sCAL.");
+ "Memory allocation failed while processing sCAL");
return;
}
- png_memcpy(info_ptr->scal_s_height, sheight, (png_size_t)length);
+ png_memcpy(info_ptr->scal_s_height, sheight, length);
info_ptr->valid |= PNG_INFO_sCAL;
-#ifdef PNG_FREE_ME_SUPPORTED
info_ptr->free_me |= PNG_FREE_SCAL;
-#endif
}
#endif
#endif
#endif
-#if defined(PNG_pHYs_SUPPORTED)
+#ifdef PNG_pHYs_SUPPORTED
void PNGAPI
png_set_pHYs(png_structp png_ptr, png_infop info_ptr,
png_uint_32 res_x, png_uint_32 res_y, int unit_type)
@@ -525,37 +452,28 @@ png_set_PLTE(png_structp png_ptr, png_infop info_ptr,
}
}
- /*
- * It may not actually be necessary to set png_ptr->palette here;
+ /* It may not actually be necessary to set png_ptr->palette here;
* we do it for backward compatibility with the way the png_handle_tRNS
* function used to do the allocation.
*/
-#ifdef PNG_FREE_ME_SUPPORTED
png_free_data(png_ptr, info_ptr, PNG_FREE_PLTE, 0);
-#endif
/* Changed in libpng-1.2.1 to allocate PNG_MAX_PALETTE_LENGTH instead
* of num_palette entries, in case of an invalid PNG file that has
* too-large sample values.
*/
- png_ptr->palette = (png_colorp)png_malloc(png_ptr,
+ png_ptr->palette = (png_colorp)png_calloc(png_ptr,
PNG_MAX_PALETTE_LENGTH * png_sizeof(png_color));
- png_memset(png_ptr->palette, 0, PNG_MAX_PALETTE_LENGTH *
- png_sizeof(png_color));
png_memcpy(png_ptr->palette, palette, num_palette * png_sizeof(png_color));
info_ptr->palette = png_ptr->palette;
info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette;
-#ifdef PNG_FREE_ME_SUPPORTED
info_ptr->free_me |= PNG_FREE_PLTE;
-#else
- png_ptr->flags |= PNG_FLAG_FREE_PLTE;
-#endif
info_ptr->valid |= PNG_INFO_PLTE;
}
-#if defined(PNG_sBIT_SUPPORTED)
+#ifdef PNG_sBIT_SUPPORTED
void PNGAPI
png_set_sBIT(png_structp png_ptr, png_infop info_ptr,
png_color_8p sig_bit)
@@ -570,7 +488,7 @@ png_set_sBIT(png_structp png_ptr, png_infop info_ptr,
}
#endif
-#if defined(PNG_sRGB_SUPPORTED)
+#ifdef PNG_sRGB_SUPPORTED
void PNGAPI
png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int intent)
{
@@ -587,7 +505,7 @@ void PNGAPI
png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr,
int intent)
{
-#if defined(PNG_gAMA_SUPPORTED)
+#ifdef PNG_gAMA_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
float file_gamma;
#endif
@@ -595,7 +513,7 @@ png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr,
png_fixed_point int_file_gamma;
#endif
#endif
-#if defined(PNG_cHRM_SUPPORTED)
+#ifdef PNG_cHRM_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
float white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y;
#endif
@@ -609,7 +527,7 @@ png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr,
png_set_sRGB(png_ptr, info_ptr, intent);
-#if defined(PNG_gAMA_SUPPORTED)
+#ifdef PNG_gAMA_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
file_gamma = (float).45455;
png_set_gAMA(png_ptr, info_ptr, file_gamma);
@@ -620,7 +538,7 @@ png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr,
#endif
#endif
-#if defined(PNG_cHRM_SUPPORTED)
+#ifdef PNG_cHRM_SUPPORTED
int_white_x = 31270L;
int_white_y = 32900L;
int_red_x = 64000L;
@@ -641,28 +559,21 @@ png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr,
blue_y = (float).06;
#endif
-#if !defined(PNG_NO_CHECK_cHRM)
- if (png_check_cHRM_fixed(png_ptr,
- int_white_x, int_white_y, int_red_x, int_red_y, int_green_x,
- int_green_y, int_blue_x, int_blue_y))
-#endif
- {
#ifdef PNG_FIXED_POINT_SUPPORTED
- png_set_cHRM_fixed(png_ptr, info_ptr,
- int_white_x, int_white_y, int_red_x, int_red_y, int_green_x,
- int_green_y, int_blue_x, int_blue_y);
+ png_set_cHRM_fixed(png_ptr, info_ptr,
+ int_white_x, int_white_y, int_red_x, int_red_y, int_green_x,
+ int_green_y, int_blue_x, int_blue_y);
#endif
#ifdef PNG_FLOATING_POINT_SUPPORTED
- png_set_cHRM(png_ptr, info_ptr,
- white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y);
+ png_set_cHRM(png_ptr, info_ptr,
+ white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y);
#endif
- }
#endif /* cHRM */
}
#endif /* sRGB */
-#if defined(PNG_iCCP_SUPPORTED)
+#ifdef PNG_iCCP_SUPPORTED
void PNGAPI
png_set_iCCP(png_structp png_ptr, png_infop info_ptr,
png_charp name, int compression_type,
@@ -681,7 +592,7 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr,
new_iccp_name = (png_charp)png_malloc_warn(png_ptr, length);
if (new_iccp_name == NULL)
{
- png_warning(png_ptr, "Insufficient memory to process iCCP chunk.");
+ png_warning(png_ptr, "Insufficient memory to process iCCP chunk");
return;
}
png_memcpy(new_iccp_name, name, length);
@@ -690,7 +601,7 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr,
{
png_free (png_ptr, new_iccp_name);
png_warning(png_ptr,
- "Insufficient memory to process iCCP profile.");
+ "Insufficient memory to process iCCP profile");
return;
}
png_memcpy(new_iccp_profile, profile, (png_size_t)proflen);
@@ -701,16 +612,15 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr,
info_ptr->iccp_name = new_iccp_name;
info_ptr->iccp_profile = new_iccp_profile;
/* Compression is always zero but is here so the API and info structure
- * does not have to change if we introduce multiple compression types */
+ * does not have to change if we introduce multiple compression types
+ */
info_ptr->iccp_compression = (png_byte)compression_type;
-#ifdef PNG_FREE_ME_SUPPORTED
info_ptr->free_me |= PNG_FREE_ICCP;
-#endif
info_ptr->valid |= PNG_INFO_iCCP;
}
#endif
-#if defined(PNG_TEXT_SUPPORTED)
+#ifdef PNG_TEXT_SUPPORTED
void PNGAPI
png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
int num_text)
@@ -748,7 +658,7 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
info_ptr->max_text = info_ptr->num_text + num_text + 8;
old_text = info_ptr->text;
info_ptr->text = (png_textp)png_malloc_warn(png_ptr,
- (png_uint_32)(info_ptr->max_text * png_sizeof(png_text)));
+ (png_size_t)(info_ptr->max_text * png_sizeof(png_text)));
if (info_ptr->text == NULL)
{
png_free(png_ptr, old_text);
@@ -763,12 +673,10 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
info_ptr->max_text = num_text + 8;
info_ptr->num_text = 0;
info_ptr->text = (png_textp)png_malloc_warn(png_ptr,
- (png_uint_32)(info_ptr->max_text * png_sizeof(png_text)));
+ (png_size_t)(info_ptr->max_text * png_sizeof(png_text)));
if (info_ptr->text == NULL)
return(1);
-#ifdef PNG_FREE_ME_SUPPORTED
info_ptr->free_me |= PNG_FREE_TEXT;
-#endif
}
png_debug1(3, "allocated %d entries for info_ptr->text",
info_ptr->max_text);
@@ -789,10 +697,12 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
lang_len = 0;
lang_key_len = 0;
}
+
else
#ifdef PNG_iTXt_SUPPORTED
{
/* Set iTXt data */
+
if (text_ptr[i].lang != NULL)
lang_len = png_strlen(text_ptr[i].lang);
else
@@ -802,9 +712,9 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
else
lang_key_len = 0;
}
-#else
+#else /* PNG_iTXt_SUPPORTED */
{
- png_warning(png_ptr, "iTXt chunk not supported.");
+ png_warning(png_ptr, "iTXt chunk not supported");
continue;
}
#endif
@@ -819,6 +729,7 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
#endif
textp->compression = PNG_TEXT_COMPRESSION_NONE;
}
+
else
{
text_length = png_strlen(text_ptr[i].text);
@@ -826,12 +737,12 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
}
textp->key = (png_charp)png_malloc_warn(png_ptr,
- (png_uint_32)
+ (png_size_t)
(key_len + text_length + lang_len + lang_key_len + 4));
if (textp->key == NULL)
return(1);
png_debug2(2, "Allocated %lu bytes at %x in png_set_text",
- (png_uint_32)
+ (unsigned long)(png_uint_32)
(key_len + lang_len + lang_key_len + text_length + 4),
(int)textp->key);
@@ -870,6 +781,7 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
}
else
#endif
+
{
textp->text_length = text_length;
#ifdef PNG_iTXt_SUPPORTED
@@ -883,7 +795,7 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
}
#endif
-#if defined(PNG_tIME_SUPPORTED)
+#ifdef PNG_tIME_SUPPORTED
void PNGAPI
png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time)
{
@@ -898,47 +810,44 @@ png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time)
}
#endif
-#if defined(PNG_tRNS_SUPPORTED)
+#ifdef PNG_tRNS_SUPPORTED
void PNGAPI
png_set_tRNS(png_structp png_ptr, png_infop info_ptr,
- png_bytep trans, int num_trans, png_color_16p trans_values)
+ png_bytep trans_alpha, int num_trans, png_color_16p trans_color)
{
png_debug1(1, "in %s storage function", "tRNS");
if (png_ptr == NULL || info_ptr == NULL)
return;
- if (trans != NULL)
+ if (trans_alpha != NULL)
{
- /*
- * It may not actually be necessary to set png_ptr->trans here;
+ /* It may not actually be necessary to set png_ptr->trans_alpha here;
* we do it for backward compatibility with the way the png_handle_tRNS
* function used to do the allocation.
*/
-#ifdef PNG_FREE_ME_SUPPORTED
png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0);
-#endif
/* Changed from num_trans to PNG_MAX_PALETTE_LENGTH in version 1.2.1 */
- png_ptr->trans = info_ptr->trans = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)PNG_MAX_PALETTE_LENGTH);
+ png_ptr->trans_alpha = info_ptr->trans_alpha = (png_bytep)png_malloc(png_ptr,
+ (png_size_t)PNG_MAX_PALETTE_LENGTH);
if (num_trans > 0 && num_trans <= PNG_MAX_PALETTE_LENGTH)
- png_memcpy(info_ptr->trans, trans, (png_size_t)num_trans);
+ png_memcpy(info_ptr->trans_alpha, trans_alpha, (png_size_t)num_trans);
}
- if (trans_values != NULL)
+ if (trans_color != NULL)
{
int sample_max = (1 << info_ptr->bit_depth);
if ((info_ptr->color_type == PNG_COLOR_TYPE_GRAY &&
- (int)trans_values->gray > sample_max) ||
+ (int)trans_color->gray > sample_max) ||
(info_ptr->color_type == PNG_COLOR_TYPE_RGB &&
- ((int)trans_values->red > sample_max ||
- (int)trans_values->green > sample_max ||
- (int)trans_values->blue > sample_max)))
+ ((int)trans_color->red > sample_max ||
+ (int)trans_color->green > sample_max ||
+ (int)trans_color->blue > sample_max)))
png_warning(png_ptr,
"tRNS chunk has out-of-range samples for bit_depth");
- png_memcpy(&(info_ptr->trans_values), trans_values,
+ png_memcpy(&(info_ptr->trans_color), trans_color,
png_sizeof(png_color_16));
if (num_trans == 0)
num_trans = 1;
@@ -948,16 +857,12 @@ png_set_tRNS(png_structp png_ptr, png_infop info_ptr,
if (num_trans != 0)
{
info_ptr->valid |= PNG_INFO_tRNS;
-#ifdef PNG_FREE_ME_SUPPORTED
info_ptr->free_me |= PNG_FREE_TRNS;
-#else
- png_ptr->flags |= PNG_FLAG_FREE_TRNS;
-#endif
}
}
#endif
-#if defined(PNG_sPLT_SUPPORTED)
+#ifdef PNG_sPLT_SUPPORTED
void PNGAPI
png_set_sPLT(png_structp png_ptr,
png_infop info_ptr, png_sPLT_tp entries, int nentries)
@@ -977,15 +882,15 @@ png_set_sPLT(png_structp png_ptr,
np = (png_sPLT_tp)png_malloc_warn(png_ptr,
(info_ptr->splt_palettes_num + nentries) *
- (png_uint_32)png_sizeof(png_sPLT_t));
+ (png_size_t)png_sizeof(png_sPLT_t));
if (np == NULL)
{
- png_warning(png_ptr, "No memory for sPLT palettes.");
- return;
+ png_warning(png_ptr, "No memory for sPLT palettes");
+ return;
}
png_memcpy(np, info_ptr->splt_palettes,
- info_ptr->splt_palettes_num * png_sizeof(png_sPLT_t));
+ info_ptr->splt_palettes_num * png_sizeof(png_sPLT_t));
png_free(png_ptr, info_ptr->splt_palettes);
info_ptr->splt_palettes=NULL;
@@ -996,7 +901,7 @@ png_set_sPLT(png_structp png_ptr,
png_uint_32 length;
length = png_strlen(from->name) + 1;
- to->name = (png_charp)png_malloc_warn(png_ptr, length);
+ to->name = (png_charp)png_malloc_warn(png_ptr, (png_size_t)length);
if (to->name == NULL)
{
png_warning(png_ptr,
@@ -1005,7 +910,7 @@ png_set_sPLT(png_structp png_ptr,
}
png_memcpy(to->name, from->name, length);
to->entries = (png_sPLT_entryp)png_malloc_warn(png_ptr,
- (png_uint_32)(from->nentries * png_sizeof(png_sPLT_entry)));
+ (png_size_t)(from->nentries * png_sizeof(png_sPLT_entry)));
if (to->entries == NULL)
{
png_warning(png_ptr,
@@ -1023,13 +928,11 @@ png_set_sPLT(png_structp png_ptr,
info_ptr->splt_palettes = np;
info_ptr->splt_palettes_num += nentries;
info_ptr->valid |= PNG_INFO_sPLT;
-#ifdef PNG_FREE_ME_SUPPORTED
info_ptr->free_me |= PNG_FREE_SPLT;
-#endif
}
#endif /* PNG_sPLT_SUPPORTED */
-#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
+#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
void PNGAPI
png_set_unknown_chunks(png_structp png_ptr,
png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)
@@ -1041,28 +944,27 @@ png_set_unknown_chunks(png_structp png_ptr,
return;
np = (png_unknown_chunkp)png_malloc_warn(png_ptr,
- (png_uint_32)((info_ptr->unknown_chunks_num + num_unknowns) *
+ (png_size_t)((info_ptr->unknown_chunks_num + num_unknowns) *
png_sizeof(png_unknown_chunk)));
if (np == NULL)
{
png_warning(png_ptr,
- "Out of memory while processing unknown chunk.");
+ "Out of memory while processing unknown chunk");
return;
}
png_memcpy(np, info_ptr->unknown_chunks,
- info_ptr->unknown_chunks_num * png_sizeof(png_unknown_chunk));
+ info_ptr->unknown_chunks_num * png_sizeof(png_unknown_chunk));
png_free(png_ptr, info_ptr->unknown_chunks);
- info_ptr->unknown_chunks=NULL;
+ info_ptr->unknown_chunks = NULL;
for (i = 0; i < num_unknowns; i++)
{
png_unknown_chunkp to = np + info_ptr->unknown_chunks_num + i;
png_unknown_chunkp from = unknowns + i;
- png_memcpy((png_charp)to->name,
- (png_charp)from->name,
- png_sizeof(from->name));
+ png_memcpy((png_charp)to->name, (png_charp)from->name,
+ png_sizeof(from->name));
to->name[png_sizeof(to->name)-1] = '\0';
to->size = from->size;
/* Note our location in the read or write sequence */
@@ -1073,11 +975,11 @@ png_set_unknown_chunks(png_structp png_ptr,
else
{
to->data = (png_bytep)png_malloc_warn(png_ptr,
- (png_uint_32)from->size);
+ (png_size_t)from->size);
if (to->data == NULL)
{
png_warning(png_ptr,
- "Out of memory while processing unknown chunk.");
+ "Out of memory while processing unknown chunk");
to->size = 0;
}
else
@@ -1087,41 +989,20 @@ png_set_unknown_chunks(png_structp png_ptr,
info_ptr->unknown_chunks = np;
info_ptr->unknown_chunks_num += num_unknowns;
-#ifdef PNG_FREE_ME_SUPPORTED
info_ptr->free_me |= PNG_FREE_UNKN;
-#endif
}
void PNGAPI
png_set_unknown_chunk_location(png_structp png_ptr, png_infop info_ptr,
int chunk, int location)
{
if (png_ptr != NULL && info_ptr != NULL && chunk >= 0 && chunk <
- (int)info_ptr->unknown_chunks_num)
+ (int)info_ptr->unknown_chunks_num)
info_ptr->unknown_chunks[chunk].location = (png_byte)location;
}
#endif
-#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
-#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
- defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
-void PNGAPI
-png_permit_empty_plte (png_structp png_ptr, int empty_plte_permitted)
-{
- /* This function is deprecated in favor of png_permit_mng_features()
- and will be removed from libpng-1.3.0 */
-
- png_debug(1, "in png_permit_empty_plte, DEPRECATED.");
-
- if (png_ptr == NULL)
- return;
- png_ptr->mng_features_permitted = (png_byte)
- ((png_ptr->mng_features_permitted & (~PNG_FLAG_MNG_EMPTY_PLTE)) |
- ((empty_plte_permitted & PNG_FLAG_MNG_EMPTY_PLTE)));
-}
-#endif
-#endif
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
+#ifdef PNG_MNG_FEATURES_SUPPORTED
png_uint_32 PNGAPI
png_permit_mng_features (png_structp png_ptr, png_uint_32 mng_features)
{
@@ -1135,7 +1016,7 @@ png_permit_mng_features (png_structp png_ptr, png_uint_32 mng_features)
}
#endif
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
void PNGAPI
png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep
chunk_list, int num_chunks)
@@ -1161,28 +1042,26 @@ png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep
return;
old_num_chunks = png_ptr->num_chunk_list;
new_list=(png_bytep)png_malloc(png_ptr,
- (png_uint_32)
- (5*(num_chunks + old_num_chunks)));
+ (png_size_t)
+ (5*(num_chunks + old_num_chunks)));
if (png_ptr->chunk_list != NULL)
{
png_memcpy(new_list, png_ptr->chunk_list,
- (png_size_t)(5*old_num_chunks));
+ (png_size_t)(5*old_num_chunks));
png_free(png_ptr, png_ptr->chunk_list);
png_ptr->chunk_list=NULL;
}
png_memcpy(new_list + 5*old_num_chunks, chunk_list,
- (png_size_t)(5*num_chunks));
+ (png_size_t)(5*num_chunks));
for (p = new_list + 5*old_num_chunks + 4, i = 0; i<num_chunks; i++, p += 5)
*p=(png_byte)keep;
png_ptr->num_chunk_list = old_num_chunks + num_chunks;
png_ptr->chunk_list = new_list;
-#ifdef PNG_FREE_ME_SUPPORTED
png_ptr->free_me |= PNG_FREE_LIST;
-#endif
}
#endif
-#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
+#ifdef PNG_READ_USER_CHUNKS_SUPPORTED
void PNGAPI
png_set_read_user_chunk_fn(png_structp png_ptr, png_voidp user_chunk_ptr,
png_user_chunk_ptr read_user_chunk_fn)
@@ -1197,7 +1076,7 @@ png_set_read_user_chunk_fn(png_structp png_ptr, png_voidp user_chunk_ptr,
}
#endif
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
+#ifdef PNG_INFO_IMAGE_SUPPORTED
void PNGAPI
png_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers)
{
@@ -1217,12 +1096,12 @@ png_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers)
#ifdef PNG_WRITE_SUPPORTED
void PNGAPI
png_set_compression_buffer_size(png_structp png_ptr,
- png_uint_32 size)
+ png_size_t size)
{
if (png_ptr == NULL)
return;
png_free(png_ptr, png_ptr->zbuf);
- png_ptr->zbuf_size = (png_size_t)size;
+ png_ptr->zbuf_size = size;
png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, size);
png_ptr->zstream.next_out = png_ptr->zbuf;
png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
@@ -1237,32 +1116,6 @@ png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask)
}
-#ifndef PNG_1_0_X
-#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
-/* Function was added to libpng 1.2.0 and should always exist by default */
-void PNGAPI
-png_set_asm_flags (png_structp png_ptr, png_uint_32 asm_flags)
-{
-/* Obsolete as of libpng-1.2.20 and will be removed from libpng-1.4.0 */
- if (png_ptr != NULL)
- png_ptr->asm_flags = 0;
- asm_flags = asm_flags; /* Quiet the compiler */
-}
-
-/* This function was added to libpng 1.2.0 */
-void PNGAPI
-png_set_mmx_thresholds (png_structp png_ptr,
- png_byte mmx_bitdepth_threshold,
- png_uint_32 mmx_rowbytes_threshold)
-{
-/* Obsolete as of libpng-1.2.20 and will be removed from libpng-1.4.0 */
- if (png_ptr == NULL)
- return;
- /* Quiet the compiler */
- mmx_bitdepth_threshold = mmx_bitdepth_threshold;
- mmx_rowbytes_threshold = mmx_rowbytes_threshold;
-}
-#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
/* This function was added to libpng 1.2.6 */
@@ -1279,7 +1132,32 @@ png_set_user_limits (png_structp png_ptr, png_uint_32 user_width_max,
png_ptr->user_width_max = user_width_max;
png_ptr->user_height_max = user_height_max;
}
+/* This function was added to libpng 1.4.0 */
+void PNGAPI
+png_set_chunk_cache_max (png_structp png_ptr,
+ png_uint_32 user_chunk_cache_max)
+{
+ if (png_ptr == NULL)
+ return;
+ png_ptr->user_chunk_cache_max = user_chunk_cache_max;
+ if (user_chunk_cache_max == 0x7fffffffL) /* Unlimited */
+ png_ptr->user_chunk_cache_max = 0;
+ else
+ png_ptr->user_chunk_cache_max = user_chunk_cache_max + 1;
+}
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
-#endif /* ?PNG_1_0_X */
+
+#ifdef PNG_BENIGN_ERRORS_SUPPORTED
+void PNGAPI
+png_set_benign_errors(png_structp png_ptr, int allowed)
+{
+ png_debug(1, "in png_set_benign_errors");
+
+ if (allowed)
+ png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN;
+ else
+ png_ptr->flags &= ~PNG_FLAG_BENIGN_ERRORS_WARN;
+}
+#endif /* PNG_BENIGN_ERRORS_SUPPORTED */
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
diff --git a/src/3rdparty/libpng/pngtest.c b/src/3rdparty/libpng/pngtest.c
index 4142fd8204..4b70404c41 100644
--- a/src/3rdparty/libpng/pngtest.c
+++ b/src/3rdparty/libpng/pngtest.c
@@ -1,8 +1,8 @@
/* pngtest.c - a simple test program to test libpng
*
- * Last changed in libpng 1.2.37 [June 4, 2009]
- * Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.0 [January 3, 2010]
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -32,34 +32,14 @@
*/
#include "png.h"
+#include "pngpriv.h"
-#if defined(_WIN32_WCE)
-# if _WIN32_WCE < 211
- __error__ (f|w)printf functions are not supported on old WindowsCE.;
-# endif
-# include <windows.h>
-# include <stdlib.h>
-# define READFILE(file, data, length, check) \
- if (ReadFile(file, data, length, &check, NULL)) check = 0
-# define WRITEFILE(file, data, length, check)) \
- if (WriteFile(file, data, length, &check, NULL)) check = 0
-# define FCLOSE(file) CloseHandle(file)
-#else
# include <stdio.h>
# include <stdlib.h>
-# define READFILE(file, data, length, check) \
- check=(png_size_t)fread(data, (png_size_t)1, length, file)
-# define WRITEFILE(file, data, length, check) \
- check=(png_size_t)fwrite(data, (png_size_t)1, length, file)
# define FCLOSE(file) fclose(file)
-#endif
-#if defined(PNG_NO_STDIO)
-# if defined(_WIN32_WCE)
- typedef HANDLE png_FILE_p;
-# else
+#ifndef PNG_STDIO_SUPPORTED
typedef FILE * png_FILE_p;
-# endif
#endif
/* Makes pngtest verbose so we can find problems (needs to be before png.h) */
@@ -75,7 +55,7 @@
#define PNGTEST_TIMING
*/
-#ifdef PNG_NO_FLOATING_POINT_SUPPORTED
+#ifndef PNG_FLOATING_POINT_SUPPORTED
#undef PNGTEST_TIMING
#endif
@@ -84,7 +64,7 @@ static float t_start, t_stop, t_decode, t_encode, t_misc;
#include <time.h>
#endif
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
+#ifdef PNG_TIME_RFC1123_SUPPORTED
#define PNG_tIME_STRING_LENGTH 29
static int tIME_chunk_present = 0;
static char tIME_string[PNG_tIME_STRING_LENGTH] = "tIME chunk is not present";
@@ -118,14 +98,8 @@ static int status_dots_requested = 0;
static int status_dots = 1;
void
-#ifdef PNG_1_0_X
-PNGAPI
-#endif
read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass);
void
-#ifdef PNG_1_0_X
-PNGAPI
-#endif
read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
{
if (png_ptr == NULL || row_number > PNG_UINT_31_MAX)
@@ -146,14 +120,8 @@ read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
}
void
-#ifdef PNG_1_0_X
-PNGAPI
-#endif
write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass);
void
-#ifdef PNG_1_0_X
-PNGAPI
-#endif
write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
{
if (png_ptr == NULL || row_number > PNG_UINT_31_MAX || pass > 7)
@@ -162,21 +130,15 @@ write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
}
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
+#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
/* Example of using user transform callback (we don't transform anything,
* but merely examine the row filters. We set this to 256 rather than
* 5 in case illegal filter values are present.)
*/
static png_uint_32 filters_used[256];
void
-#ifdef PNG_1_0_X
-PNGAPI
-#endif
count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data);
void
-#ifdef PNG_1_0_X
-PNGAPI
-#endif
count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data)
{
if (png_ptr != NULL && row_info != NULL)
@@ -184,7 +146,7 @@ count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data)
}
#endif
-#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
+#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
/* Example of using user transform callback (we don't transform anything,
* but merely count the zero samples)
*/
@@ -192,14 +154,8 @@ count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data)
static png_uint_32 zero_samples;
void
-#ifdef PNG_1_0_X
-PNGAPI
-#endif
count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data);
void
-#ifdef PNG_1_0_X
-PNGAPI
-#endif
count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data)
{
png_bytep dp = data;
@@ -297,7 +253,7 @@ count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data)
static int wrote_question = 0;
-#if defined(PNG_NO_STDIO)
+#ifndef PNG_STDIO_SUPPORTED
/* START of code to validate stdio-free compilation */
/* These copies of the default read/write functions come from pngrio.c and
* pngwio.c. They allow "don't include stdio" testing of the library.
@@ -311,12 +267,17 @@ static int wrote_question = 0;
static void
pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
- png_size_t check;
+ png_size_t check = 0;
+ png_voidp io_ptr;
/* fread() returns 0 on error, so it is OK to store this in a png_size_t
* instead of an int, which is what fread() actually returns.
*/
- READFILE((png_FILE_p)png_ptr->io_ptr, data, length, check);
+ io_ptr = png_get_io_ptr(png_ptr);
+ if (io_ptr != NULL)
+ {
+ check = fread(data, 1, length, (png_FILE_p)io_ptr);
+ }
if (check != length)
{
@@ -335,7 +296,7 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
static void
pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
- int check;
+ png_size_t check;
png_byte *n_data;
png_FILE_p io_ptr;
@@ -344,7 +305,7 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
if ((png_bytep)n_data == data)
{
- READFILE(io_ptr, n_data, length, check);
+ check = fread(n_data, 1, length, io_ptr);
}
else
{
@@ -355,7 +316,7 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
do
{
read = MIN(NEAR_BUF_SIZE, remaining);
- READFILE(io_ptr, buf, 1, err);
+ err = fread(buf, 1, 1, io_ptr);
png_memcpy(data, buf, read); /* Copy far buffer to near buffer */
if (err != read)
break;
@@ -371,7 +332,7 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
}
#endif /* USE_FAR_KEYWORD */
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
+#ifdef PNG_WRITE_FLUSH_SUPPORTED
static void
pngtest_flush(png_structp png_ptr)
{
@@ -389,9 +350,9 @@ pngtest_flush(png_structp png_ptr)
static void
pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
- png_uint_32 check;
+ png_size_t check;
- WRITEFILE((png_FILE_p)png_ptr->io_ptr, data, length, check);
+ check = fwrite(data, 1, length, (png_FILE_p)png_ptr->io_ptr);
if (check != length)
{
png_error(png_ptr, "Write Error");
@@ -409,7 +370,7 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
static void
pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
- png_uint_32 check;
+ png_size_t check;
png_byte *near_data; /* Needs to be "png_byte *" instead of "png_bytep" */
png_FILE_p io_ptr;
@@ -418,7 +379,7 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
if ((png_bytep)near_data == data)
{
- WRITEFILE(io_ptr, near_data, length, check);
+ check = fwrite(near_data, 1, length, io_ptr);
}
else
{
@@ -430,7 +391,7 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
written = MIN(NEAR_BUF_SIZE, remaining);
png_memcpy(buf, data, written); /* Copy far buffer to near buffer */
- WRITEFILE(io_ptr, buf, written, err);
+ err = fwrite(buf, 1, written, io_ptr);
if (err != written)
break;
else
@@ -456,9 +417,12 @@ static void
pngtest_warning(png_structp png_ptr, png_const_charp message)
{
PNG_CONST char *name = "UNKNOWN (ERROR!)";
- if (png_ptr != NULL && png_ptr->error_ptr != NULL)
- name = png_ptr->error_ptr;
- fprintf(STDERR, "%s: libpng warning: %s\n", name, message);
+ char *test;
+ test = png_get_error_ptr(png_ptr);
+ if (test == NULL)
+ fprintf(STDERR, "%s: libpng warning: %s\n", name, message);
+ else
+ fprintf(STDERR, "%s: libpng warning: %s\n", test, message);
}
/* This is the default error handling function. Note that replacements for
@@ -474,7 +438,7 @@ pngtest_error(png_structp png_ptr, png_const_charp message)
* actually OK in this case.
*/
}
-#endif /* PNG_NO_STDIO */
+#endif /* !PNG_STDIO_SUPPORTED */
/* END of code to validate stdio-free compilation */
/* START of code to validate memory allocation and deallocation */
@@ -491,7 +455,7 @@ pngtest_error(png_structp png_ptr, png_const_charp message)
*/
typedef struct memory_information
{
- png_uint_32 size;
+ png_alloc_size_t size;
png_voidp pointer;
struct memory_information FAR *next;
} memory_information;
@@ -503,11 +467,12 @@ static int maximum_allocation = 0;
static int total_allocation = 0;
static int num_allocations = 0;
-png_voidp png_debug_malloc PNGARG((png_structp png_ptr, png_uint_32 size));
+png_voidp png_debug_malloc
+ PNGARG((png_structp png_ptr, png_alloc_size_t size));
void png_debug_free PNGARG((png_structp png_ptr, png_voidp ptr));
png_voidp
-png_debug_malloc(png_structp png_ptr, png_uint_32 size)
+png_debug_malloc(png_structp png_ptr, png_alloc_size_t size)
{
/* png_malloc has already tested for NULL; png_create_struct calls
@@ -524,24 +489,23 @@ png_debug_malloc(png_structp png_ptr, png_uint_32 size)
memory_infop pinfo;
png_set_mem_fn(png_ptr, NULL, NULL, NULL);
pinfo = (memory_infop)png_malloc(png_ptr,
- (png_uint_32)png_sizeof(*pinfo));
+ png_sizeof(*pinfo));
pinfo->size = size;
current_allocation += size;
total_allocation += size;
num_allocations ++;
if (current_allocation > maximum_allocation)
maximum_allocation = current_allocation;
- pinfo->pointer = (png_voidp)png_malloc(png_ptr, size);
+ pinfo->pointer = png_malloc(png_ptr, size);
/* Restore malloc_fn and free_fn */
png_set_mem_fn(png_ptr,
- png_voidp_NULL, (png_malloc_ptr)png_debug_malloc,
- (png_free_ptr)png_debug_free);
+ NULL, png_debug_malloc, png_debug_free);
if (size != 0 && pinfo->pointer == NULL)
{
current_allocation -= size;
total_allocation -= size;
png_error(png_ptr,
- "out of memory in pngtest->png_debug_malloc.");
+ "out of memory in pngtest->png_debug_malloc");
}
pinfo->next = pinformation;
pinformation = pinfo;
@@ -607,7 +571,7 @@ png_debug_free(png_structp png_ptr, png_voidp ptr)
/* Demonstration of user chunk support of the sTER and vpAg chunks */
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
/* (sTER is a public chunk not yet known by libpng. vpAg is a private
chunk used in ImageMagick to store "virtual page" size). */
@@ -701,30 +665,17 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#endif
#endif
-#if defined(_WIN32_WCE)
- TCHAR path[MAX_PATH];
-#endif
char inbuf[256], outbuf[256];
row_buf = NULL;
-#if defined(_WIN32_WCE)
- MultiByteToWideChar(CP_ACP, 0, inname, -1, path, MAX_PATH);
- if ((fpin = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE)
-#else
if ((fpin = fopen(inname, "rb")) == NULL)
-#endif
{
fprintf(STDERR, "Could not find input file %s\n", inname);
return (1);
}
-#if defined(_WIN32_WCE)
- MultiByteToWideChar(CP_ACP, 0, outname, -1, path, MAX_PATH);
- if ((fpout = CreateFile(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL)) == INVALID_HANDLE_VALUE)
-#else
if ((fpout = fopen(outname, "wb")) == NULL)
-#endif
{
fprintf(STDERR, "Could not open output file %s\n", outname);
FCLOSE(fpin);
@@ -734,20 +685,19 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
png_debug(0, "Allocating read and write structures");
#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG
read_ptr =
- png_create_read_struct_2(PNG_LIBPNG_VER_STRING, png_voidp_NULL,
- png_error_ptr_NULL, png_error_ptr_NULL, png_voidp_NULL,
+ png_create_read_struct_2(PNG_LIBPNG_VER_STRING, NULL,
+ NULL, NULL, NULL,
(png_malloc_ptr)png_debug_malloc, (png_free_ptr)png_debug_free);
#else
read_ptr =
- png_create_read_struct(PNG_LIBPNG_VER_STRING, png_voidp_NULL,
- png_error_ptr_NULL, png_error_ptr_NULL);
+ png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
#endif
-#if defined(PNG_NO_STDIO)
+#ifndef PNG_STDIO_SUPPORTED
png_set_error_fn(read_ptr, (png_voidp)inname, pngtest_error,
pngtest_warning);
#endif
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
user_chunk_data[0] = 0;
user_chunk_data[1] = 0;
user_chunk_data[2] = 0;
@@ -759,15 +709,13 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#ifdef PNG_WRITE_SUPPORTED
#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG
write_ptr =
- png_create_write_struct_2(PNG_LIBPNG_VER_STRING, png_voidp_NULL,
- png_error_ptr_NULL, png_error_ptr_NULL, png_voidp_NULL,
- (png_malloc_ptr)png_debug_malloc, (png_free_ptr)png_debug_free);
+ png_create_write_struct_2(PNG_LIBPNG_VER_STRING, NULL,
+ NULL, NULL, NULL, png_debug_malloc, png_debug_free);
#else
write_ptr =
- png_create_write_struct(PNG_LIBPNG_VER_STRING, png_voidp_NULL,
- png_error_ptr_NULL, png_error_ptr_NULL);
+ png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
#endif
-#if defined(PNG_NO_STDIO)
+#ifndef PNG_STDIO_SUPPORTED
png_set_error_fn(write_ptr, (png_voidp)inname, pngtest_error,
pngtest_warning);
#endif
@@ -829,7 +777,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#endif
png_debug(0, "Initializing input and output streams");
-#if !defined(PNG_NO_STDIO)
+#ifdef PNG_STDIO_SUPPORTED
png_init_io(read_ptr, fpin);
# ifdef PNG_WRITE_SUPPORTED
png_init_io(write_ptr, fpout);
@@ -838,7 +786,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
png_set_read_fn(read_ptr, (png_voidp)fpin, pngtest_read_data);
# ifdef PNG_WRITE_SUPPORTED
png_set_write_fn(write_ptr, (png_voidp)fpout, pngtest_write_data,
-# if defined(PNG_WRITE_FLUSH_SUPPORTED)
+# ifdef PNG_WRITE_FLUSH_SUPPORTED
pngtest_flush);
# else
NULL);
@@ -855,12 +803,12 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
else
{
#ifdef PNG_WRITE_SUPPORTED
- png_set_write_status_fn(write_ptr, png_write_status_ptr_NULL);
+ png_set_write_status_fn(write_ptr, NULL);
#endif
- png_set_read_status_fn(read_ptr, png_read_status_ptr_NULL);
+ png_set_read_status_fn(read_ptr, NULL);
}
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
+#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
{
int i;
for (i = 0; i<256; i++)
@@ -868,24 +816,24 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
png_set_read_user_transform_fn(read_ptr, count_filters);
}
#endif
-#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
+#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
zero_samples = 0;
png_set_write_user_transform_fn(write_ptr, count_zero_samples);
#endif
-#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
# ifndef PNG_HANDLE_CHUNK_ALWAYS
# define PNG_HANDLE_CHUNK_ALWAYS 3
# endif
png_set_keep_unknown_chunks(read_ptr, PNG_HANDLE_CHUNK_ALWAYS,
- png_bytep_NULL, 0);
+ NULL, 0);
#endif
-#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
# ifndef PNG_HANDLE_CHUNK_IF_SAFE
# define PNG_HANDLE_CHUNK_IF_SAFE 2
# endif
png_set_keep_unknown_chunks(write_ptr, PNG_HANDLE_CHUNK_IF_SAFE,
- png_bytep_NULL, 0);
+ NULL, 0);
#endif
png_debug(0, "Reading info struct");
@@ -899,15 +847,15 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
&color_type, &interlace_type, &compression_type, &filter_type))
{
png_set_IHDR(write_ptr, write_info_ptr, width, height, bit_depth,
-#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
+#ifdef PNG_WRITE_INTERLACING_SUPPORTED
color_type, interlace_type, compression_type, filter_type);
#else
color_type, PNG_INTERLACE_NONE, compression_type, filter_type);
#endif
}
}
-#if defined(PNG_FIXED_POINT_SUPPORTED)
-#if defined(PNG_cHRM_SUPPORTED)
+#ifdef PNG_FIXED_POINT_SUPPORTED
+#ifdef PNG_cHRM_SUPPORTED
{
png_fixed_point white_x, white_y, red_x, red_y, green_x, green_y, blue_x,
blue_y;
@@ -919,7 +867,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
}
#endif
-#if defined(PNG_gAMA_SUPPORTED)
+#ifdef PNG_gAMA_SUPPORTED
{
png_fixed_point gamma;
@@ -928,8 +876,8 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
#endif
#else /* Use floating point versions */
-#if defined(PNG_FLOATING_POINT_SUPPORTED)
-#if defined(PNG_cHRM_SUPPORTED)
+#ifdef PNG_FLOATING_POINT_SUPPORTED
+#ifdef PNG_cHRM_SUPPORTED
{
double white_x, white_y, red_x, red_y, green_x, green_y, blue_x,
blue_y;
@@ -941,7 +889,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
}
#endif
-#if defined(PNG_gAMA_SUPPORTED)
+#ifdef PNG_gAMA_SUPPORTED
{
double gamma;
@@ -951,7 +899,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#endif
#endif /* Floating point */
#endif /* Fixed point */
-#if defined(PNG_iCCP_SUPPORTED)
+#ifdef PNG_iCCP_SUPPORTED
{
png_charp name;
png_charp profile;
@@ -966,7 +914,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
}
#endif
-#if defined(PNG_sRGB_SUPPORTED)
+#ifdef PNG_sRGB_SUPPORTED
{
int intent;
@@ -981,7 +929,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
if (png_get_PLTE(read_ptr, read_info_ptr, &palette, &num_palette))
png_set_PLTE(write_ptr, write_info_ptr, palette, num_palette);
}
-#if defined(PNG_bKGD_SUPPORTED)
+#ifdef PNG_bKGD_SUPPORTED
{
png_color_16p background;
@@ -991,7 +939,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
}
#endif
-#if defined(PNG_hIST_SUPPORTED)
+#ifdef PNG_hIST_SUPPORTED
{
png_uint_16p hist;
@@ -999,7 +947,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
png_set_hIST(write_ptr, write_info_ptr, hist);
}
#endif
-#if defined(PNG_oFFs_SUPPORTED)
+#ifdef PNG_oFFs_SUPPORTED
{
png_int_32 offset_x, offset_y;
int unit_type;
@@ -1011,7 +959,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
}
#endif
-#if defined(PNG_pCAL_SUPPORTED)
+#ifdef PNG_pCAL_SUPPORTED
{
png_charp purpose, units;
png_charpp params;
@@ -1026,7 +974,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
}
#endif
-#if defined(PNG_pHYs_SUPPORTED)
+#ifdef PNG_pHYs_SUPPORTED
{
png_uint_32 res_x, res_y;
int unit_type;
@@ -1035,7 +983,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
png_set_pHYs(write_ptr, write_info_ptr, res_x, res_y, unit_type);
}
#endif
-#if defined(PNG_sBIT_SUPPORTED)
+#ifdef PNG_sBIT_SUPPORTED
{
png_color_8p sig_bit;
@@ -1043,7 +991,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
png_set_sBIT(write_ptr, write_info_ptr, sig_bit);
}
#endif
-#if defined(PNG_sCAL_SUPPORTED)
+#ifdef PNG_sCAL_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
{
int unit;
@@ -1070,7 +1018,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#endif
#endif
#endif
-#if defined(PNG_TEXT_SUPPORTED)
+#ifdef PNG_TEXT_SUPPORTED
{
png_textp text_ptr;
int num_text;
@@ -1082,14 +1030,14 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
}
#endif
-#if defined(PNG_tIME_SUPPORTED)
+#ifdef PNG_tIME_SUPPORTED
{
png_timep mod_time;
if (png_get_tIME(read_ptr, read_info_ptr, &mod_time))
{
png_set_tIME(write_ptr, write_info_ptr, mod_time);
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
+#ifdef PNG_TIME_RFC1123_SUPPORTED
/* We have to use png_memcpy instead of "=" because the string
* pointed to by png_convert_to_rfc1123() gets free'ed before
* we use it.
@@ -1103,29 +1051,29 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
}
#endif
-#if defined(PNG_tRNS_SUPPORTED)
+#ifdef PNG_tRNS_SUPPORTED
{
- png_bytep trans;
+ png_bytep trans_alpha;
int num_trans;
- png_color_16p trans_values;
+ png_color_16p trans_color;
- if (png_get_tRNS(read_ptr, read_info_ptr, &trans, &num_trans,
- &trans_values))
+ if (png_get_tRNS(read_ptr, read_info_ptr, &trans_alpha, &num_trans,
+ &trans_color))
{
- int sample_max = (1 << read_info_ptr->bit_depth);
+ int sample_max = (1 << bit_depth);
/* libpng doesn't reject a tRNS chunk with out-of-range samples */
- if (!((read_info_ptr->color_type == PNG_COLOR_TYPE_GRAY &&
- (int)trans_values->gray > sample_max) ||
- (read_info_ptr->color_type == PNG_COLOR_TYPE_RGB &&
- ((int)trans_values->red > sample_max ||
- (int)trans_values->green > sample_max ||
- (int)trans_values->blue > sample_max))))
- png_set_tRNS(write_ptr, write_info_ptr, trans, num_trans,
- trans_values);
+ if (!((color_type == PNG_COLOR_TYPE_GRAY &&
+ (int)trans_color->gray > sample_max) ||
+ (color_type == PNG_COLOR_TYPE_RGB &&
+ ((int)trans_color->red > sample_max ||
+ (int)trans_color->green > sample_max ||
+ (int)trans_color->blue > sample_max))))
+ png_set_tRNS(write_ptr, write_info_ptr, trans_alpha, num_trans,
+ trans_color);
}
}
#endif
-#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
{
png_unknown_chunkp unknowns;
int num_unknowns = (int)png_get_unknown_chunks(read_ptr, read_info_ptr,
@@ -1154,7 +1102,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
*/
png_write_info(write_ptr, write_info_ptr);
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
if (user_chunk_data[0] != 0)
{
png_byte png_sTER[5] = {115, 84, 69, 82, '\0'};
@@ -1224,7 +1172,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
png_debug2(0, "0x%08lx (%ld bytes)", (unsigned long)row_buf,
png_get_rowbytes(read_ptr, read_info_ptr));
#endif /* !SINGLE_ROWBUF_ALLOC */
- png_read_rows(read_ptr, (png_bytepp)&row_buf, png_bytepp_NULL, 1);
+ png_read_rows(read_ptr, (png_bytepp)&row_buf, NULL, 1);
#ifdef PNG_WRITE_SUPPORTED
#ifdef PNGTEST_TIMING
@@ -1248,17 +1196,17 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
}
-#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
png_free_data(read_ptr, read_info_ptr, PNG_FREE_UNKN, -1);
#endif
-#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
png_free_data(write_ptr, write_info_ptr, PNG_FREE_UNKN, -1);
#endif
png_debug(0, "Reading and writing end_info data");
png_read_end(read_ptr, end_info_ptr);
-#if defined(PNG_TEXT_SUPPORTED)
+#ifdef PNG_TEXT_SUPPORTED
{
png_textp text_ptr;
int num_text;
@@ -1270,14 +1218,14 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
}
#endif
-#if defined(PNG_tIME_SUPPORTED)
+#ifdef PNG_tIME_SUPPORTED
{
png_timep mod_time;
if (png_get_tIME(read_ptr, end_info_ptr, &mod_time))
{
png_set_tIME(write_ptr, write_end_info_ptr, mod_time);
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
+#ifdef PNG_TIME_RFC1123_SUPPORTED
/* We have to use png_memcpy instead of "=" because the string
pointed to by png_convert_to_rfc1123() gets free'ed before
we use it */
@@ -1290,7 +1238,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
}
#endif
-#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
{
png_unknown_chunkp unknowns;
int num_unknowns;
@@ -1346,23 +1294,13 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
FCLOSE(fpout);
png_debug(0, "Opening files for comparison");
-#if defined(_WIN32_WCE)
- MultiByteToWideChar(CP_ACP, 0, inname, -1, path, MAX_PATH);
- if ((fpin = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE)
-#else
if ((fpin = fopen(inname, "rb")) == NULL)
-#endif
{
fprintf(STDERR, "Could not find file %s\n", inname);
return (1);
}
-#if defined(_WIN32_WCE)
- MultiByteToWideChar(CP_ACP, 0, outname, -1, path, MAX_PATH);
- if ((fpout = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE)
-#else
if ((fpout = fopen(outname, "rb")) == NULL)
-#endif
{
fprintf(STDERR, "Could not find file %s\n", outname);
FCLOSE(fpin);
@@ -1373,8 +1311,8 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
{
png_size_t num_in, num_out;
- READFILE(fpin, inbuf, 1, num_in);
- READFILE(fpout, outbuf, 1, num_out);
+ num_in = fread(inbuf, 1, 1, fpin);
+ num_out = fread(outbuf, 1, 1, fpout);
if (num_in != num_out)
{
@@ -1527,7 +1465,7 @@ main(int argc, char *argv[])
#endif
for (i=2; i<argc; ++i)
{
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
+#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
int k;
#endif
int kerror;
@@ -1535,19 +1473,19 @@ main(int argc, char *argv[])
kerror = test_one_file(argv[i], outname);
if (kerror == 0)
{
-#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
+#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
fprintf(STDERR, "\n PASS (%lu zero samples)\n",
(unsigned long)zero_samples);
#else
fprintf(STDERR, " PASS\n");
#endif
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
+#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
for (k = 0; k<256; k++)
if (filters_used[k])
fprintf(STDERR, " Filter %d was used %lu times\n",
k, (unsigned long)filters_used[k]);
#endif
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
+#ifdef PNG_TIME_RFC1123_SUPPORTED
if (tIME_chunk_present != 0)
fprintf(STDERR, " tIME = %s\n", tIME_string);
tIME_chunk_present = 0;
@@ -1607,23 +1545,23 @@ main(int argc, char *argv[])
{
if (verbose == 1 || i == 2)
{
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
+#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
int k;
#endif
-#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
+#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
fprintf(STDERR, "\n PASS (%lu zero samples)\n",
(unsigned long)zero_samples);
#else
fprintf(STDERR, " PASS\n");
#endif
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
+#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
for (k = 0; k<256; k++)
if (filters_used[k])
fprintf(STDERR, " Filter %d was used %lu times\n",
k,
(unsigned long)filters_used[k]);
#endif
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
+#ifdef PNG_TIME_RFC1123_SUPPORTED
if (tIME_chunk_present != 0)
fprintf(STDERR, " tIME = %s\n", tIME_string);
#endif /* PNG_TIME_RFC1123_SUPPORTED */
@@ -1689,4 +1627,4 @@ main(int argc, char *argv[])
}
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_2_40 your_png_h_is_not_version_1_2_40;
+typedef version_1_4_0 your_png_h_is_not_version_1_4_0;
diff --git a/src/3rdparty/libpng/pngtest.png b/src/3rdparty/libpng/pngtest.png
index f3a6df4483..cfdd36f28b 100644
--- a/src/3rdparty/libpng/pngtest.png
+++ b/src/3rdparty/libpng/pngtest.png
Binary files differ
diff --git a/src/3rdparty/libpng/pngtrans.c b/src/3rdparty/libpng/pngtrans.c
index 6e1870c596..7b217bb3b3 100644
--- a/src/3rdparty/libpng/pngtrans.c
+++ b/src/3rdparty/libpng/pngtrans.c
@@ -1,8 +1,8 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
- * Last changed in libpng 1.2.36 [May 14, 2009]
- * Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.0 [January 3, 2010]
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -11,9 +11,10 @@
* and license in png.h
*/
-#define PNG_INTERNAL
+#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
+#include "pngpriv.h"
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
/* Turn on BGR-to-RGB mapping */
@@ -21,6 +22,7 @@ void PNGAPI
png_set_bgr(png_structp png_ptr)
{
png_debug(1, "in png_set_bgr");
+
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_BGR;
@@ -33,6 +35,7 @@ void PNGAPI
png_set_swap(png_structp png_ptr)
{
png_debug(1, "in png_set_swap");
+
if (png_ptr == NULL)
return;
if (png_ptr->bit_depth == 16)
@@ -46,6 +49,7 @@ void PNGAPI
png_set_packing(png_structp png_ptr)
{
png_debug(1, "in png_set_packing");
+
if (png_ptr == NULL)
return;
if (png_ptr->bit_depth < 8)
@@ -62,6 +66,7 @@ void PNGAPI
png_set_packswap(png_structp png_ptr)
{
png_debug(1, "in png_set_packswap");
+
if (png_ptr == NULL)
return;
if (png_ptr->bit_depth < 8)
@@ -74,6 +79,7 @@ void PNGAPI
png_set_shift(png_structp png_ptr, png_color_8p true_bits)
{
png_debug(1, "in png_set_shift");
+
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_SHIFT;
@@ -87,6 +93,7 @@ int PNGAPI
png_set_interlace_handling(png_structp png_ptr)
{
png_debug(1, "in png_set_interlace handling");
+
if (png_ptr && png_ptr->interlaced)
{
png_ptr->transformations |= PNG_INTERLACE;
@@ -107,10 +114,11 @@ void PNGAPI
png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc)
{
png_debug(1, "in png_set_filler");
+
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_FILLER;
- png_ptr->filler = (png_byte)filler;
+ png_ptr->filler = (png_uint_16)filler;
if (filler_loc == PNG_FILLER_AFTER)
png_ptr->flags |= PNG_FLAG_FILLER_AFTER;
else
@@ -135,18 +143,17 @@ png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc)
}
}
-#if !defined(PNG_1_0_X)
/* Added to libpng-1.2.7 */
void PNGAPI
png_set_add_alpha(png_structp png_ptr, png_uint_32 filler, int filler_loc)
{
png_debug(1, "in png_set_add_alpha");
+
if (png_ptr == NULL)
return;
png_set_filler(png_ptr, filler, filler_loc);
png_ptr->transformations |= PNG_ADD_ALPHA;
}
-#endif
#endif
@@ -156,6 +163,7 @@ void PNGAPI
png_set_swap_alpha(png_structp png_ptr)
{
png_debug(1, "in png_set_swap_alpha");
+
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_SWAP_ALPHA;
@@ -168,6 +176,7 @@ void PNGAPI
png_set_invert_alpha(png_structp png_ptr)
{
png_debug(1, "in png_set_invert_alpha");
+
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_INVERT_ALPHA;
@@ -179,6 +188,7 @@ void PNGAPI
png_set_invert_mono(png_structp png_ptr)
{
png_debug(1, "in png_set_invert_mono");
+
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_INVERT_MONO;
@@ -189,13 +199,10 @@ void /* PRIVATE */
png_do_invert(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_invert");
+
/* This test removed from libpng version 1.0.13 and 1.2.0:
* if (row_info->bit_depth == 1 &&
*/
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- if (row == NULL || row_info == NULL)
- return;
-#endif
if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
{
png_bytep rp = row;
@@ -244,10 +251,8 @@ void /* PRIVATE */
png_do_swap(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_swap");
+
if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- row != NULL && row_info != NULL &&
-#endif
row_info->bit_depth == 16)
{
png_bytep rp = row;
@@ -375,10 +380,8 @@ void /* PRIVATE */
png_do_packswap(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_packswap");
+
if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- row != NULL && row_info != NULL &&
-#endif
row_info->bit_depth < 8)
{
png_bytep rp, end, table;
@@ -407,9 +410,7 @@ void /* PRIVATE */
png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags)
{
png_debug(1, "in png_do_strip_filler");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- if (row != NULL && row_info != NULL)
-#endif
+
{
png_bytep sp=row;
png_bytep dp=row;
@@ -565,10 +566,8 @@ void /* PRIVATE */
png_do_bgr(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_bgr");
+
if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- row != NULL && row_info != NULL &&
-#endif
(row_info->color_type & PNG_COLOR_MASK_COLOR))
{
png_uint_32 row_width = row_info->width;
@@ -637,16 +636,16 @@ png_do_bgr(png_row_infop row_info, png_bytep row)
#endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
- defined(PNG_LEGACY_SUPPORTED) || \
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
void PNGAPI
png_set_user_transform_info(png_structp png_ptr, png_voidp
user_transform_ptr, int user_transform_depth, int user_transform_channels)
{
png_debug(1, "in png_set_user_transform_info");
+
if (png_ptr == NULL)
return;
-#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
+#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
png_ptr->user_transform_ptr = user_transform_ptr;
png_ptr->user_transform_depth = (png_byte)user_transform_depth;
png_ptr->user_transform_channels = (png_byte)user_transform_channels;
@@ -668,7 +667,7 @@ png_get_user_transform_ptr(png_structp png_ptr)
{
if (png_ptr == NULL)
return (NULL);
-#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
+#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
return ((png_voidp)png_ptr->user_transform_ptr);
#else
return (NULL);
diff --git a/src/3rdparty/libpng/pngvcrd.c b/src/3rdparty/libpng/pngvcrd.c
deleted file mode 100644
index ce4233efe7..0000000000
--- a/src/3rdparty/libpng/pngvcrd.c
+++ /dev/null
@@ -1 +0,0 @@
-/* pnggvrd.c was removed from libpng-1.2.20. */
diff --git a/src/3rdparty/libpng/pngwio.c b/src/3rdparty/libpng/pngwio.c
index f77b2dbd96..f4d995b182 100644
--- a/src/3rdparty/libpng/pngwio.c
+++ b/src/3rdparty/libpng/pngwio.c
@@ -1,8 +1,8 @@
/* pngwio.c - functions for data output
*
- * Last changed in libpng 1.2.37 [June 4, 2009]
- * Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.0 [January 3, 2010]
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -18,9 +18,10 @@
* them at run time with png_set_write_fn(...).
*/
-#define PNG_INTERNAL
+#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#ifdef PNG_WRITE_SUPPORTED
+#include "pngpriv.h"
/* Write the data to whatever output you are using. The default routine
* writes to a file pointer. Note that this routine sometimes gets called
@@ -38,7 +39,7 @@ png_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
png_error(png_ptr, "Call to NULL write function");
}
-#if !defined(PNG_NO_STDIO)
+#ifdef PNG_STDIO_SUPPORTED
/* This is the function that does the actual writing of data. If you are
* not writing to a standard C stream, you should create a replacement
* write_data function and use it at run time with png_set_write_fn(), rather
@@ -52,12 +53,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
if (png_ptr == NULL)
return;
-#if defined(_WIN32_WCE)
- if ( !WriteFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
- check = 0;
-#else
check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr));
-#endif
if (check != length)
png_error(png_ptr, "Write Error");
}
@@ -84,12 +80,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
if ((png_bytep)near_data == data)
{
-#if defined(_WIN32_WCE)
- if ( !WriteFile(io_ptr, near_data, length, &check, NULL) )
- check = 0;
-#else
check = fwrite(near_data, 1, length, io_ptr);
-#endif
}
else
{
@@ -101,12 +92,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
written = MIN(NEAR_BUF_SIZE, remaining);
png_memcpy(buf, data, written); /* Copy far buffer to near buffer */
-#if defined(_WIN32_WCE)
- if ( !WriteFile(io_ptr, buf, written, &err, NULL) )
- err = 0;
-#else
err = fwrite(buf, 1, written, io_ptr);
-#endif
if (err != written)
break;
@@ -129,7 +115,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
* to disk). After png_flush is called, there should be no data pending
* writing in any buffers.
*/
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
+#ifdef PNG_WRITE_FLUSH_SUPPORTED
void /* PRIVATE */
png_flush(png_structp png_ptr)
{
@@ -137,19 +123,15 @@ png_flush(png_structp png_ptr)
(*(png_ptr->output_flush_fn))(png_ptr);
}
-#if !defined(PNG_NO_STDIO)
+#ifdef PNG_STDIO_SUPPORTED
void PNGAPI
png_default_flush(png_structp png_ptr)
{
-#if !defined(_WIN32_WCE)
png_FILE_p io_ptr;
-#endif
if (png_ptr == NULL)
return;
-#if !defined(_WIN32_WCE)
io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
fflush(io_ptr);
-#endif
}
#endif
#endif
@@ -192,7 +174,7 @@ png_set_write_fn(png_structp png_ptr, png_voidp io_ptr,
png_ptr->io_ptr = io_ptr;
-#if !defined(PNG_NO_STDIO)
+#ifdef PNG_STDIO_SUPPORTED
if (write_data_fn != NULL)
png_ptr->write_data_fn = write_data_fn;
@@ -202,8 +184,8 @@ png_set_write_fn(png_structp png_ptr, png_voidp io_ptr,
png_ptr->write_data_fn = write_data_fn;
#endif
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
-#if !defined(PNG_NO_STDIO)
+#ifdef PNG_WRITE_FLUSH_SUPPORTED
+#ifdef PNG_STDIO_SUPPORTED
if (output_flush_fn != NULL)
png_ptr->output_flush_fn = output_flush_fn;
@@ -221,12 +203,12 @@ png_set_write_fn(png_structp png_ptr, png_voidp io_ptr,
png_warning(png_ptr,
"Attempted to set both read_data_fn and write_data_fn in");
png_warning(png_ptr,
- "the same structure. Resetting read_data_fn to NULL.");
+ "the same structure. Resetting read_data_fn to NULL");
}
}
-#if defined(USE_FAR_KEYWORD)
-#if defined(_MSC_VER)
+#ifdef USE_FAR_KEYWORD
+#ifdef _MSC_VER
void *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check)
{
void *near_ptr;
diff --git a/src/3rdparty/libpng/pngwrite.c b/src/3rdparty/libpng/pngwrite.c
index 0987612d1f..01a7f60e59 100644
--- a/src/3rdparty/libpng/pngwrite.c
+++ b/src/3rdparty/libpng/pngwrite.c
@@ -1,8 +1,8 @@
/* pngwrite.c - general routines to write a PNG file
*
- * Last changed in libpng 1.2.37 [June 4, 2009]
- * Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.0 [January 3, 2010]
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -12,9 +12,10 @@
*/
/* Get internal access to png.h */
-#define PNG_INTERNAL
+#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#ifdef PNG_WRITE_SUPPORTED
+#include "pngpriv.h"
/* Writes all the PNG information. This is the suggested way to use the
* library. If you have a new chunk to add, make a function to write it,
@@ -29,23 +30,25 @@ void PNGAPI
png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr)
{
png_debug(1, "in png_write_info_before_PLTE");
+
if (png_ptr == NULL || info_ptr == NULL)
return;
if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE))
{
- png_write_sig(png_ptr); /* Write PNG signature */
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
+ /* Write PNG signature */
+ png_write_sig(png_ptr);
+#ifdef PNG_MNG_FEATURES_SUPPORTED
if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)&&(png_ptr->mng_features_permitted))
{
png_warning(png_ptr, "MNG features are not allowed in a PNG datastream");
- png_ptr->mng_features_permitted=0;
+ png_ptr->mng_features_permitted = 0;
}
#endif
/* Write IHDR information. */
png_write_IHDR(png_ptr, info_ptr->width, info_ptr->height,
info_ptr->bit_depth, info_ptr->color_type, info_ptr->compression_type,
info_ptr->filter_type,
-#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
+#ifdef PNG_WRITE_INTERLACING_SUPPORTED
info_ptr->interlace_type);
#else
0);
@@ -53,7 +56,7 @@ png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr)
/* The rest of these check to see if the valid field has the appropriate
* flag set, and if it does, writes the chunk.
*/
-#if defined(PNG_WRITE_gAMA_SUPPORTED)
+#ifdef PNG_WRITE_gAMA_SUPPORTED
if (info_ptr->valid & PNG_INFO_gAMA)
{
# ifdef PNG_FLOATING_POINT_SUPPORTED
@@ -65,20 +68,20 @@ png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr)
#endif
}
#endif
-#if defined(PNG_WRITE_sRGB_SUPPORTED)
+#ifdef PNG_WRITE_sRGB_SUPPORTED
if (info_ptr->valid & PNG_INFO_sRGB)
png_write_sRGB(png_ptr, (int)info_ptr->srgb_intent);
#endif
-#if defined(PNG_WRITE_iCCP_SUPPORTED)
+#ifdef PNG_WRITE_iCCP_SUPPORTED
if (info_ptr->valid & PNG_INFO_iCCP)
png_write_iCCP(png_ptr, info_ptr->iccp_name, PNG_COMPRESSION_TYPE_BASE,
info_ptr->iccp_profile, (int)info_ptr->iccp_proflen);
#endif
-#if defined(PNG_WRITE_sBIT_SUPPORTED)
+#ifdef PNG_WRITE_sBIT_SUPPORTED
if (info_ptr->valid & PNG_INFO_sBIT)
png_write_sBIT(png_ptr, &(info_ptr->sig_bit), info_ptr->color_type);
#endif
-#if defined(PNG_WRITE_cHRM_SUPPORTED)
+#ifdef PNG_WRITE_cHRM_SUPPORTED
if (info_ptr->valid & PNG_INFO_cHRM)
{
#ifdef PNG_FLOATING_POINT_SUPPORTED
@@ -98,7 +101,7 @@ png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr)
#endif
}
#endif
-#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
if (info_ptr->unknown_chunks_num)
{
png_unknown_chunk *up;
@@ -109,7 +112,7 @@ png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr)
up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num;
up++)
{
- int keep=png_handle_as_unknown(png_ptr, up->name);
+ int keep = png_handle_as_unknown(png_ptr, up->name);
if (keep != PNG_HANDLE_CHUNK_NEVER &&
up->location && !(up->location & PNG_HAVE_PLTE) &&
!(up->location & PNG_HAVE_IDAT) &&
@@ -147,47 +150,47 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
png_error(png_ptr, "Valid palette required for paletted images");
-#if defined(PNG_WRITE_tRNS_SUPPORTED)
+#ifdef PNG_WRITE_tRNS_SUPPORTED
if (info_ptr->valid & PNG_INFO_tRNS)
{
-#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
+#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
/* Invert the alpha channel (in tRNS) */
if ((png_ptr->transformations & PNG_INVERT_ALPHA) &&
info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
{
int j;
- for (j=0; j<(int)info_ptr->num_trans; j++)
- info_ptr->trans[j] = (png_byte)(255 - info_ptr->trans[j]);
+ for (j = 0; j<(int)info_ptr->num_trans; j++)
+ info_ptr->trans_alpha[j] = (png_byte)(255 - info_ptr->trans_alpha[j]);
}
#endif
- png_write_tRNS(png_ptr, info_ptr->trans, &(info_ptr->trans_values),
+ png_write_tRNS(png_ptr, info_ptr->trans_alpha, &(info_ptr->trans_color),
info_ptr->num_trans, info_ptr->color_type);
}
#endif
-#if defined(PNG_WRITE_bKGD_SUPPORTED)
+#ifdef PNG_WRITE_bKGD_SUPPORTED
if (info_ptr->valid & PNG_INFO_bKGD)
png_write_bKGD(png_ptr, &(info_ptr->background), info_ptr->color_type);
#endif
-#if defined(PNG_WRITE_hIST_SUPPORTED)
+#ifdef PNG_WRITE_hIST_SUPPORTED
if (info_ptr->valid & PNG_INFO_hIST)
png_write_hIST(png_ptr, info_ptr->hist, info_ptr->num_palette);
#endif
-#if defined(PNG_WRITE_oFFs_SUPPORTED)
+#ifdef PNG_WRITE_oFFs_SUPPORTED
if (info_ptr->valid & PNG_INFO_oFFs)
png_write_oFFs(png_ptr, info_ptr->x_offset, info_ptr->y_offset,
info_ptr->offset_unit_type);
#endif
-#if defined(PNG_WRITE_pCAL_SUPPORTED)
+#ifdef PNG_WRITE_pCAL_SUPPORTED
if (info_ptr->valid & PNG_INFO_pCAL)
png_write_pCAL(png_ptr, info_ptr->pcal_purpose, info_ptr->pcal_X0,
info_ptr->pcal_X1, info_ptr->pcal_type, info_ptr->pcal_nparams,
info_ptr->pcal_units, info_ptr->pcal_params);
#endif
-#if defined(PNG_sCAL_SUPPORTED)
+#ifdef PNG_sCAL_SUPPORTED
if (info_ptr->valid & PNG_INFO_sCAL)
-#if defined(PNG_WRITE_sCAL_SUPPORTED)
-#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
+#ifdef PNG_WRITE_sCAL_SUPPORTED
+#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED)
png_write_sCAL(png_ptr, (int)info_ptr->scal_unit,
info_ptr->scal_pixel_width, info_ptr->scal_pixel_height);
#else /* !FLOATING_POINT */
@@ -198,17 +201,17 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
#endif /* FLOATING_POINT */
#else /* !WRITE_sCAL */
png_warning(png_ptr,
- "png_write_sCAL not supported; sCAL chunk not written.");
+ "png_write_sCAL not supported; sCAL chunk not written");
#endif /* WRITE_sCAL */
#endif /* sCAL */
-#if defined(PNG_WRITE_pHYs_SUPPORTED)
+#ifdef PNG_WRITE_pHYs_SUPPORTED
if (info_ptr->valid & PNG_INFO_pHYs)
png_write_pHYs(png_ptr, info_ptr->x_pixels_per_unit,
info_ptr->y_pixels_per_unit, info_ptr->phys_unit_type);
#endif /* pHYs */
-#if defined(PNG_WRITE_tIME_SUPPORTED)
+#ifdef PNG_WRITE_tIME_SUPPORTED
if (info_ptr->valid & PNG_INFO_tIME)
{
png_write_tIME(png_ptr, &(info_ptr->mod_time));
@@ -216,13 +219,13 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
}
#endif /* tIME */
-#if defined(PNG_WRITE_sPLT_SUPPORTED)
+#ifdef PNG_WRITE_sPLT_SUPPORTED
if (info_ptr->valid & PNG_INFO_sPLT)
for (i = 0; i < (int)info_ptr->splt_palettes_num; i++)
png_write_sPLT(png_ptr, info_ptr->splt_palettes + i);
#endif /* sPLT */
-#if defined(PNG_WRITE_TEXT_SUPPORTED)
+#ifdef PNG_WRITE_TEXT_SUPPORTED
/* Check to see if we need to write text chunks */
for (i = 0; i < info_ptr->num_text; i++)
{
@@ -231,7 +234,7 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
/* An internationalized chunk? */
if (info_ptr->text[i].compression > 0)
{
-#if defined(PNG_WRITE_iTXt_SUPPORTED)
+#ifdef PNG_WRITE_iTXt_SUPPORTED
/* Write international chunk */
png_write_iTXt(png_ptr,
info_ptr->text[i].compression,
@@ -248,7 +251,7 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
/* If we want a compressed text chunk */
else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_zTXt)
{
-#if defined(PNG_WRITE_zTXt_SUPPORTED)
+#ifdef PNG_WRITE_zTXt_SUPPORTED
/* Write compressed chunk */
png_write_zTXt(png_ptr, info_ptr->text[i].key,
info_ptr->text[i].text, 0,
@@ -261,7 +264,7 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
}
else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE)
{
-#if defined(PNG_WRITE_tEXt_SUPPORTED)
+#ifdef PNG_WRITE_tEXt_SUPPORTED
/* Write uncompressed chunk */
png_write_tEXt(png_ptr, info_ptr->text[i].key,
info_ptr->text[i].text,
@@ -276,18 +279,18 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
}
#endif /* tEXt */
-#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
if (info_ptr->unknown_chunks_num)
{
- png_unknown_chunk *up;
+ png_unknown_chunk *up;
- png_debug(5, "writing extra chunks");
+ png_debug(5, "writing extra chunks");
- for (up = info_ptr->unknown_chunks;
- up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num;
- up++)
- {
- int keep=png_handle_as_unknown(png_ptr, up->name);
+ for (up = info_ptr->unknown_chunks;
+ up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num;
+ up++)
+ {
+ int keep = png_handle_as_unknown(png_ptr, up->name);
if (keep != PNG_HANDLE_CHUNK_NEVER &&
up->location && (up->location & PNG_HAVE_PLTE) &&
!(up->location & PNG_HAVE_IDAT) &&
@@ -296,7 +299,7 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
{
png_write_chunk(png_ptr, up->name, up->data, up->size);
}
- }
+ }
}
#endif
}
@@ -310,6 +313,7 @@ void PNGAPI
png_write_end(png_structp png_ptr, png_infop info_ptr)
{
png_debug(1, "in png_write_end");
+
if (png_ptr == NULL)
return;
if (!(png_ptr->mode & PNG_HAVE_IDAT))
@@ -318,16 +322,16 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
/* See if user wants us to write information chunks */
if (info_ptr != NULL)
{
-#if defined(PNG_WRITE_TEXT_SUPPORTED)
- int i; /* Local index variable */
+#ifdef PNG_WRITE_TEXT_SUPPORTED
+ int i; /* local index variable */
#endif
-#if defined(PNG_WRITE_tIME_SUPPORTED)
+#ifdef PNG_WRITE_tIME_SUPPORTED
/* Check to see if user has supplied a time chunk */
if ((info_ptr->valid & PNG_INFO_tIME) &&
!(png_ptr->mode & PNG_WROTE_tIME))
png_write_tIME(png_ptr, &(info_ptr->mod_time));
#endif
-#if defined(PNG_WRITE_TEXT_SUPPORTED)
+#ifdef PNG_WRITE_TEXT_SUPPORTED
/* Loop through comment chunks */
for (i = 0; i < info_ptr->num_text; i++)
{
@@ -336,23 +340,23 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
/* An internationalized chunk? */
if (info_ptr->text[i].compression > 0)
{
-#if defined(PNG_WRITE_iTXt_SUPPORTED)
- /* Write international chunk */
- png_write_iTXt(png_ptr,
- info_ptr->text[i].compression,
- info_ptr->text[i].key,
- info_ptr->text[i].lang,
- info_ptr->text[i].lang_key,
- info_ptr->text[i].text);
+#ifdef PNG_WRITE_iTXt_SUPPORTED
+ /* Write international chunk */
+ png_write_iTXt(png_ptr,
+ info_ptr->text[i].compression,
+ info_ptr->text[i].key,
+ info_ptr->text[i].lang,
+ info_ptr->text[i].lang_key,
+ info_ptr->text[i].text);
#else
- png_warning(png_ptr, "Unable to write international text");
+ png_warning(png_ptr, "Unable to write international text");
#endif
- /* Mark this chunk as written */
- info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
+ /* Mark this chunk as written */
+ info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
}
else if (info_ptr->text[i].compression >= PNG_TEXT_COMPRESSION_zTXt)
{
-#if defined(PNG_WRITE_zTXt_SUPPORTED)
+#ifdef PNG_WRITE_zTXt_SUPPORTED
/* Write compressed chunk */
png_write_zTXt(png_ptr, info_ptr->text[i].key,
info_ptr->text[i].text, 0,
@@ -365,7 +369,7 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
}
else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE)
{
-#if defined(PNG_WRITE_tEXt_SUPPORTED)
+#ifdef PNG_WRITE_tEXt_SUPPORTED
/* Write uncompressed chunk */
png_write_tEXt(png_ptr, info_ptr->text[i].key,
info_ptr->text[i].text, 0);
@@ -378,18 +382,18 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
}
}
#endif
-#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
if (info_ptr->unknown_chunks_num)
{
- png_unknown_chunk *up;
+ png_unknown_chunk *up;
- png_debug(5, "writing extra chunks");
+ png_debug(5, "writing extra chunks");
- for (up = info_ptr->unknown_chunks;
- up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num;
- up++)
- {
- int keep=png_handle_as_unknown(png_ptr, up->name);
+ for (up = info_ptr->unknown_chunks;
+ up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num;
+ up++)
+ {
+ int keep = png_handle_as_unknown(png_ptr, up->name);
if (keep != PNG_HANDLE_CHUNK_NEVER &&
up->location && (up->location & PNG_AFTER_IDAT) &&
((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||
@@ -397,7 +401,7 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
{
png_write_chunk(png_ptr, up->name, up->data, up->size);
}
- }
+ }
}
#endif
}
@@ -411,22 +415,22 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
* do not set png_ptr->output_flush_fn to crash. If your application
* experiences a problem, please try building libpng with
* PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED defined, and report the event to
- * png-mng-implement at lists.sf.net . This kludge will be removed
- * from libpng-1.4.0.
+ * png-mng-implement at lists.sf.net .
*/
-#if defined(PNG_WRITE_FLUSH_SUPPORTED) && \
- defined(PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED)
+#ifdef PNG_WRITE_FLUSH_SUPPORTED
+# ifdef PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED
png_flush(png_ptr);
+# endif
#endif
}
-#if defined(PNG_WRITE_tIME_SUPPORTED)
-#if !defined(_WIN32_WCE)
-/* "time.h" functions are not supported on WindowsCE */
+#ifdef PNG_CONVERT_tIME_SUPPORTED
+/* "tm" structure is not supported on WindowsCE */
void PNGAPI
png_convert_from_struct_tm(png_timep ptime, struct tm FAR * ttime)
{
png_debug(1, "in png_convert_from_struct_tm");
+
ptime->year = (png_uint_16)(1900 + ttime->tm_year);
ptime->month = (png_byte)(ttime->tm_mon + 1);
ptime->day = (png_byte)ttime->tm_mday;
@@ -441,11 +445,11 @@ png_convert_from_time_t(png_timep ptime, time_t ttime)
struct tm *tbuf;
png_debug(1, "in png_convert_from_time_t");
+
tbuf = gmtime(&ttime);
png_convert_from_struct_tm(ptime, tbuf);
}
#endif
-#endif
/* Initialize png_ptr structure, and allocate any memory needed */
png_structp PNGAPI
@@ -454,7 +458,7 @@ png_create_write_struct(png_const_charp user_png_ver, png_voidp error_ptr,
{
#ifdef PNG_USER_MEM_SUPPORTED
return (png_create_write_struct_2(user_png_ver, error_ptr, error_fn,
- warn_fn, png_voidp_NULL, png_malloc_ptr_NULL, png_free_ptr_NULL));
+ warn_fn, NULL, NULL, NULL));
}
/* Alternate initialize png_ptr structure, and allocate any memory needed */
@@ -464,17 +468,20 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
png_malloc_ptr malloc_fn, png_free_ptr free_fn)
{
#endif /* PNG_USER_MEM_SUPPORTED */
+ volatile int png_cleanup_needed = 0;
#ifdef PNG_SETJMP_SUPPORTED
- volatile
+ volatile
#endif
- png_structp png_ptr;
+ png_structp png_ptr;
#ifdef PNG_SETJMP_SUPPORTED
#ifdef USE_FAR_KEYWORD
jmp_buf jmpbuf;
#endif
#endif
int i;
+
png_debug(1, "in png_create_write_struct");
+
#ifdef PNG_USER_MEM_SUPPORTED
png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG,
(png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr);
@@ -486,25 +493,23 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
/* Added at libpng-1.2.6 */
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
- png_ptr->user_width_max=PNG_USER_WIDTH_MAX;
- png_ptr->user_height_max=PNG_USER_HEIGHT_MAX;
+ png_ptr->user_width_max = PNG_USER_WIDTH_MAX;
+ png_ptr->user_height_max = PNG_USER_HEIGHT_MAX;
#endif
#ifdef PNG_SETJMP_SUPPORTED
+/* Applications that neglect to set up their own setjmp() and then
+ encounter a png_error() will longjmp here. Since the jmpbuf is
+ then meaningless we abort instead of returning. */
#ifdef USE_FAR_KEYWORD
if (setjmp(jmpbuf))
#else
- if (setjmp(png_ptr->jmpbuf))
+ if (setjmp(png_jmpbuf(png_ptr))) /* sets longjmp to match setjmp */
#endif
- {
- png_free(png_ptr, png_ptr->zbuf);
- png_ptr->zbuf=NULL;
- png_destroy_struct(png_ptr);
- return (NULL);
- }
#ifdef USE_FAR_KEYWORD
- png_memcpy(png_ptr->jmpbuf, jmpbuf, png_sizeof(jmp_buf));
+ png_memcpy(png_jmpbuf(png_ptr), jmpbuf, png_sizeof(jmp_buf));
#endif
+ PNG_ABORT();
#endif
#ifdef PNG_USER_MEM_SUPPORTED
@@ -514,12 +519,12 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
if (user_png_ver)
{
- i=0;
- do
- {
- if (user_png_ver[i] != png_libpng_ver[i])
- png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
- } while (png_libpng_ver[i++]);
+ i = 0;
+ do
+ {
+ if (user_png_ver[i] != png_libpng_ver[i])
+ png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
+ } while (png_libpng_ver[i++]);
}
if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH)
@@ -533,14 +538,14 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
(user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) ||
(user_png_ver[0] == '0' && user_png_ver[2] < '9'))
{
-#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
+#ifdef PNG_STDIO_SUPPORTED
char msg[80];
if (user_png_ver)
{
- png_snprintf(msg, 80,
- "Application was compiled with png.h from libpng-%.20s",
- user_png_ver);
- png_warning(png_ptr, msg);
+ png_snprintf(msg, 80,
+ "Application was compiled with png.h from libpng-%.20s",
+ user_png_ver);
+ png_warning(png_ptr, msg);
}
png_snprintf(msg, 80,
"Application is running with png.c from libpng-%.20s",
@@ -548,172 +553,48 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
png_warning(png_ptr, msg);
#endif
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
- png_ptr->flags=0;
+ png_ptr->flags = 0;
#endif
- png_error(png_ptr,
+ png_warning(png_ptr,
"Incompatible libpng version in application and library");
+ png_cleanup_needed = 1;
}
}
/* Initialize zbuf - compression buffer */
png_ptr->zbuf_size = PNG_ZBUF_SIZE;
- png_ptr->zbuf = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)png_ptr->zbuf_size);
-
- png_set_write_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL,
- png_flush_ptr_NULL);
-
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
- png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT,
- 1, png_doublep_NULL, png_doublep_NULL);
-#endif
-
-#ifdef PNG_SETJMP_SUPPORTED
-/* Applications that neglect to set up their own setjmp() and then encounter
- a png_error() will longjmp here. Since the jmpbuf is then meaningless we
- abort instead of returning. */
-#ifdef USE_FAR_KEYWORD
- if (setjmp(jmpbuf))
- PNG_ABORT();
- png_memcpy(png_ptr->jmpbuf, jmpbuf, png_sizeof(jmp_buf));
-#else
- if (setjmp(png_ptr->jmpbuf))
- PNG_ABORT();
-#endif
-#endif
- return (png_ptr);
-}
-
-/* Initialize png_ptr structure, and allocate any memory needed */
-#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
-/* Deprecated. */
-#undef png_write_init
-void PNGAPI
-png_write_init(png_structp png_ptr)
-{
- /* We only come here via pre-1.0.7-compiled applications */
- png_write_init_2(png_ptr, "1.0.6 or earlier", 0, 0);
-}
-
-void PNGAPI
-png_write_init_2(png_structp png_ptr, png_const_charp user_png_ver,
- png_size_t png_struct_size, png_size_t png_info_size)
-{
- /* We only come here via pre-1.0.12-compiled applications */
- if (png_ptr == NULL) return;
-#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
- if (png_sizeof(png_struct) > png_struct_size ||
- png_sizeof(png_info) > png_info_size)
+ if (!png_cleanup_needed)
{
- char msg[80];
- png_ptr->warning_fn=NULL;
- if (user_png_ver)
- {
- png_snprintf(msg, 80,
- "Application was compiled with png.h from libpng-%.20s",
- user_png_ver);
- png_warning(png_ptr, msg);
- }
- png_snprintf(msg, 80,
- "Application is running with png.c from libpng-%.20s",
- png_libpng_ver);
- png_warning(png_ptr, msg);
+ png_ptr->zbuf = (png_bytep)png_malloc_warn(png_ptr,
+ png_ptr->zbuf_size);
+ if (png_ptr->zbuf == NULL)
+ png_cleanup_needed = 1;
}
-#endif
- if (png_sizeof(png_struct) > png_struct_size)
- {
- png_ptr->error_fn=NULL;
-#ifdef PNG_ERROR_NUMBERS_SUPPORTED
- png_ptr->flags=0;
-#endif
- png_error(png_ptr,
- "The png struct allocated by the application for writing is too small.");
- }
- if (png_sizeof(png_info) > png_info_size)
- {
- png_ptr->error_fn=NULL;
-#ifdef PNG_ERROR_NUMBERS_SUPPORTED
- png_ptr->flags=0;
-#endif
- png_error(png_ptr,
- "The info struct allocated by the application for writing is too small.");
- }
- png_write_init_3(&png_ptr, user_png_ver, png_struct_size);
-}
-#endif /* PNG_1_0_X || PNG_1_2_X */
-
-
-void PNGAPI
-png_write_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
- png_size_t png_struct_size)
-{
- png_structp png_ptr=*ptr_ptr;
-#ifdef PNG_SETJMP_SUPPORTED
- jmp_buf tmp_jmp; /* To save current jump buffer */
-#endif
-
- int i = 0;
-
- if (png_ptr == NULL)
- return;
-
- do
+ if (png_cleanup_needed)
{
- if (user_png_ver[i] != png_libpng_ver[i])
- {
-#ifdef PNG_LEGACY_SUPPORTED
- png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
+ /* Clean up PNG structure and deallocate any memory. */
+ png_free(png_ptr, png_ptr->zbuf);
+ png_ptr->zbuf = NULL;
+#ifdef PNG_USER_MEM_SUPPORTED
+ png_destroy_struct_2((png_voidp)png_ptr,
+ (png_free_ptr)free_fn, (png_voidp)mem_ptr);
#else
- png_ptr->warning_fn=NULL;
- png_warning(png_ptr,
- "Application uses deprecated png_write_init() and should be recompiled.");
- break;
-#endif
- }
- } while (png_libpng_ver[i++]);
-
- png_debug(1, "in png_write_init_3");
-
-#ifdef PNG_SETJMP_SUPPORTED
- /* Save jump buffer and error functions */
- png_memcpy(tmp_jmp, png_ptr->jmpbuf, png_sizeof(jmp_buf));
-#endif
-
- if (png_sizeof(png_struct) > png_struct_size)
- {
- png_destroy_struct(png_ptr);
- png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG);
- *ptr_ptr = png_ptr;
- }
-
- /* Reset all variables to 0 */
- png_memset(png_ptr, 0, png_sizeof(png_struct));
-
- /* Added at libpng-1.2.6 */
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
- png_ptr->user_width_max=PNG_USER_WIDTH_MAX;
- png_ptr->user_height_max=PNG_USER_HEIGHT_MAX;
+ png_destroy_struct((png_voidp)png_ptr);
#endif
+ return (NULL);
+ }
-#ifdef PNG_SETJMP_SUPPORTED
- /* Restore jump buffer */
- png_memcpy(png_ptr->jmpbuf, tmp_jmp, png_sizeof(jmp_buf));
-#endif
-
- png_set_write_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL,
- png_flush_ptr_NULL);
-
- /* Initialize zbuf - compression buffer */
- png_ptr->zbuf_size = PNG_ZBUF_SIZE;
- png_ptr->zbuf = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)png_ptr->zbuf_size);
+ png_set_write_fn(png_ptr, NULL, NULL, NULL);
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT,
- 1, png_doublep_NULL, png_doublep_NULL);
+ 1, NULL, NULL);
#endif
+
+ return (png_ptr);
}
+
/* Write a few rows of image data. If the image is interlaced,
* either you will have to write the 7 sub images, or, if you
* have called png_set_interlace_handling(), you will have to
@@ -723,8 +604,8 @@ void PNGAPI
png_write_rows(png_structp png_ptr, png_bytepp row,
png_uint_32 num_rows)
{
- png_uint_32 i; /* Row counter */
- png_bytepp rp; /* Row pointer */
+ png_uint_32 i; /* row counter */
+ png_bytepp rp; /* row pointer */
png_debug(1, "in png_write_rows");
@@ -744,15 +625,16 @@ png_write_rows(png_structp png_ptr, png_bytepp row,
void PNGAPI
png_write_image(png_structp png_ptr, png_bytepp image)
{
- png_uint_32 i; /* Row index */
- int pass, num_pass; /* Pass variables */
- png_bytepp rp; /* Points to current row */
+ png_uint_32 i; /* row index */
+ int pass, num_pass; /* pass variables */
+ png_bytepp rp; /* points to current row */
if (png_ptr == NULL)
return;
png_debug(1, "in png_write_image");
-#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
+
+#ifdef PNG_WRITE_INTERLACING_SUPPORTED
/* Initialize interlace handling. If image is not interlaced,
* this will set pass to 1
*/
@@ -777,6 +659,7 @@ png_write_row(png_structp png_ptr, png_bytep row)
{
if (png_ptr == NULL)
return;
+
png_debug2(1, "in png_write_row (row %ld, pass %d)",
png_ptr->row_number, png_ptr->pass);
@@ -786,42 +669,42 @@ png_write_row(png_structp png_ptr, png_bytep row)
/* Make sure we wrote the header info */
if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE))
png_error(png_ptr,
- "png_write_info was never called before png_write_row.");
+ "png_write_info was never called before png_write_row");
/* Check for transforms that have been set but were defined out */
#if !defined(PNG_WRITE_INVERT_SUPPORTED) && defined(PNG_READ_INVERT_SUPPORTED)
if (png_ptr->transformations & PNG_INVERT_MONO)
- png_warning(png_ptr, "PNG_WRITE_INVERT_SUPPORTED is not defined.");
+ png_warning(png_ptr, "PNG_WRITE_INVERT_SUPPORTED is not defined");
#endif
#if !defined(PNG_WRITE_FILLER_SUPPORTED) && defined(PNG_READ_FILLER_SUPPORTED)
if (png_ptr->transformations & PNG_FILLER)
- png_warning(png_ptr, "PNG_WRITE_FILLER_SUPPORTED is not defined.");
+ png_warning(png_ptr, "PNG_WRITE_FILLER_SUPPORTED is not defined");
#endif
#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && defined(PNG_READ_PACKSWAP_SUPPORTED)
if (png_ptr->transformations & PNG_PACKSWAP)
- png_warning(png_ptr, "PNG_WRITE_PACKSWAP_SUPPORTED is not defined.");
+ png_warning(png_ptr, "PNG_WRITE_PACKSWAP_SUPPORTED is not defined");
#endif
#if !defined(PNG_WRITE_PACK_SUPPORTED) && defined(PNG_READ_PACK_SUPPORTED)
if (png_ptr->transformations & PNG_PACK)
- png_warning(png_ptr, "PNG_WRITE_PACK_SUPPORTED is not defined.");
+ png_warning(png_ptr, "PNG_WRITE_PACK_SUPPORTED is not defined");
#endif
#if !defined(PNG_WRITE_SHIFT_SUPPORTED) && defined(PNG_READ_SHIFT_SUPPORTED)
if (png_ptr->transformations & PNG_SHIFT)
- png_warning(png_ptr, "PNG_WRITE_SHIFT_SUPPORTED is not defined.");
+ png_warning(png_ptr, "PNG_WRITE_SHIFT_SUPPORTED is not defined");
#endif
#if !defined(PNG_WRITE_BGR_SUPPORTED) && defined(PNG_READ_BGR_SUPPORTED)
if (png_ptr->transformations & PNG_BGR)
- png_warning(png_ptr, "PNG_WRITE_BGR_SUPPORTED is not defined.");
+ png_warning(png_ptr, "PNG_WRITE_BGR_SUPPORTED is not defined");
#endif
#if !defined(PNG_WRITE_SWAP_SUPPORTED) && defined(PNG_READ_SWAP_SUPPORTED)
if (png_ptr->transformations & PNG_SWAP_BYTES)
- png_warning(png_ptr, "PNG_WRITE_SWAP_SUPPORTED is not defined.");
+ png_warning(png_ptr, "PNG_WRITE_SWAP_SUPPORTED is not defined");
#endif
png_write_start_row(png_ptr);
}
-#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
+#ifdef PNG_WRITE_INTERLACING_SUPPORTED
/* If interlaced and not interested in row, return */
if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE))
{
@@ -899,10 +782,9 @@ png_write_row(png_structp png_ptr, png_bytep row)
png_debug1(3, "row_info->rowbytes = %lu", png_ptr->row_info.rowbytes);
/* Copy user's row into buffer, leaving room for filter byte. */
- png_memcpy_check(png_ptr, png_ptr->row_buf + 1, row,
- png_ptr->row_info.rowbytes);
+ png_memcpy(png_ptr->row_buf + 1, row, png_ptr->row_info.rowbytes);
-#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
+#ifdef PNG_WRITE_INTERLACING_SUPPORTED
/* Handle interlacing */
if (png_ptr->interlaced && png_ptr->pass < 6 &&
(png_ptr->transformations & PNG_INTERLACE))
@@ -922,7 +804,7 @@ png_write_row(png_structp png_ptr, png_bytep row)
if (png_ptr->transformations)
png_do_write_transformations(png_ptr);
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
+#ifdef PNG_MNG_FEATURES_SUPPORTED
/* Write filter_method 64 (intrapixel differencing) only if
* 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and
* 2. Libpng did not write a PNG signature (this filter_method is only
@@ -947,12 +829,13 @@ png_write_row(png_structp png_ptr, png_bytep row)
(*(png_ptr->write_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass);
}
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
+#ifdef PNG_WRITE_FLUSH_SUPPORTED
/* Set the automatic flush interval or 0 to turn flushing off */
void PNGAPI
png_set_flush(png_structp png_ptr, int nrows)
{
png_debug(1, "in png_set_flush");
+
if (png_ptr == NULL)
return;
png_ptr->flush_dist = (nrows < 0 ? 0 : nrows);
@@ -965,6 +848,7 @@ png_write_flush(png_structp png_ptr)
int wrote_IDAT;
png_debug(1, "in png_write_flush");
+
if (png_ptr == NULL)
return;
/* We have already written out all of the data */
@@ -1025,6 +909,7 @@ png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)
#endif
png_debug(1, "in png_destroy_write_struct");
+
if (png_ptr_ptr != NULL)
{
png_ptr = *png_ptr_ptr;
@@ -1051,11 +936,10 @@ png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)
{
png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1);
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
+#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
if (png_ptr->num_chunk_list)
{
png_free(png_ptr, png_ptr->chunk_list);
- png_ptr->chunk_list=NULL;
png_ptr->num_chunk_list = 0;
}
#endif
@@ -1099,13 +983,14 @@ png_write_destroy(png_structp png_ptr)
#endif
png_debug(1, "in png_write_destroy");
+
/* Free any memory zlib uses */
deflateEnd(&png_ptr->zstream);
/* Free our memory. png_free checks NULL for us. */
png_free(png_ptr, png_ptr->zbuf);
png_free(png_ptr, png_ptr->row_buf);
-#ifndef PNG_NO_WRITE_FILTER
+#ifdef PNG_WRITE_FILTER_SUPPORTED
png_free(png_ptr, png_ptr->prev_row);
png_free(png_ptr, png_ptr->sub_row);
png_free(png_ptr, png_ptr->up_row);
@@ -1113,11 +998,11 @@ png_write_destroy(png_structp png_ptr)
png_free(png_ptr, png_ptr->paeth_row);
#endif
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
+#ifdef PNG_TIME_RFC1123_SUPPORTED
png_free(png_ptr, png_ptr->time_buffer);
#endif
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
png_free(png_ptr, png_ptr->prev_filters);
png_free(png_ptr, png_ptr->filter_weights);
png_free(png_ptr, png_ptr->inv_filter_weights);
@@ -1156,9 +1041,10 @@ void PNGAPI
png_set_filter(png_structp png_ptr, int method, int filters)
{
png_debug(1, "in png_set_filter");
+
if (png_ptr == NULL)
return;
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
+#ifdef PNG_MNG_FEATURES_SUPPORTED
if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
(method == PNG_INTRAPIXEL_DIFFERENCING))
method = PNG_FILTER_TYPE_BASE;
@@ -1167,26 +1053,26 @@ png_set_filter(png_structp png_ptr, int method, int filters)
{
switch (filters & (PNG_ALL_FILTERS | 0x07))
{
-#ifndef PNG_NO_WRITE_FILTER
+#ifdef PNG_WRITE_FILTER_SUPPORTED
case 5:
case 6:
case 7: png_warning(png_ptr, "Unknown row filter for method 0");
-#endif /* PNG_NO_WRITE_FILTER */
+#endif /* PNG_WRITE_FILTER_SUPPORTED */
case PNG_FILTER_VALUE_NONE:
- png_ptr->do_filter=PNG_FILTER_NONE; break;
-#ifndef PNG_NO_WRITE_FILTER
+ png_ptr->do_filter = PNG_FILTER_NONE; break;
+#ifdef PNG_WRITE_FILTER_SUPPORTED
case PNG_FILTER_VALUE_SUB:
- png_ptr->do_filter=PNG_FILTER_SUB; break;
+ png_ptr->do_filter = PNG_FILTER_SUB; break;
case PNG_FILTER_VALUE_UP:
- png_ptr->do_filter=PNG_FILTER_UP; break;
+ png_ptr->do_filter = PNG_FILTER_UP; break;
case PNG_FILTER_VALUE_AVG:
- png_ptr->do_filter=PNG_FILTER_AVG; break;
+ png_ptr->do_filter = PNG_FILTER_AVG; break;
case PNG_FILTER_VALUE_PAETH:
- png_ptr->do_filter=PNG_FILTER_PAETH; break;
+ png_ptr->do_filter = PNG_FILTER_PAETH; break;
default: png_ptr->do_filter = (png_byte)filters; break;
#else
default: png_warning(png_ptr, "Unknown row filter for method 0");
-#endif /* PNG_NO_WRITE_FILTER */
+#endif /* PNG_WRITE_FILTER_SUPPORTED */
}
/* If we have allocated the row_buf, this means we have already started
@@ -1200,7 +1086,7 @@ png_set_filter(png_structp png_ptr, int method, int filters)
*/
if (png_ptr->row_buf != NULL)
{
-#ifndef PNG_NO_WRITE_FILTER
+#ifdef PNG_WRITE_FILTER_SUPPORTED
if ((png_ptr->do_filter & PNG_FILTER_SUB) && png_ptr->sub_row == NULL)
{
png_ptr->sub_row = (png_bytep)png_malloc(png_ptr,
@@ -1255,7 +1141,7 @@ png_set_filter(png_structp png_ptr, int method, int filters)
}
if (png_ptr->do_filter == PNG_NO_FILTERS)
-#endif /* PNG_NO_WRITE_FILTER */
+#endif /* PNG_WRITE_FILTER_SUPPORTED */
png_ptr->do_filter = PNG_FILTER_NONE;
}
}
@@ -1270,7 +1156,7 @@ png_set_filter(png_structp png_ptr, int method, int filters)
* filtered data going to zlib more consistent, hopefully resulting in
* better compression.
*/
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) /* GRR 970116 */
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* GRR 970116 */
void PNGAPI
png_set_filter_heuristics(png_structp png_ptr, int heuristic_method,
int num_weights, png_doublep filter_weights,
@@ -1279,6 +1165,7 @@ png_set_filter_heuristics(png_structp png_ptr, int heuristic_method,
int i;
png_debug(1, "in png_set_filter_heuristics");
+
if (png_ptr == NULL)
return;
if (heuristic_method >= PNG_FILTER_HEURISTIC_LAST)
@@ -1393,6 +1280,7 @@ void PNGAPI
png_set_compression_level(png_structp png_ptr, int level)
{
png_debug(1, "in png_set_compression_level");
+
if (png_ptr == NULL)
return;
png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_LEVEL;
@@ -1403,6 +1291,7 @@ void PNGAPI
png_set_compression_mem_level(png_structp png_ptr, int mem_level)
{
png_debug(1, "in png_set_compression_mem_level");
+
if (png_ptr == NULL)
return;
png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL;
@@ -1413,6 +1302,7 @@ void PNGAPI
png_set_compression_strategy(png_structp png_ptr, int strategy)
{
png_debug(1, "in png_set_compression_strategy");
+
if (png_ptr == NULL)
return;
png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_STRATEGY;
@@ -1433,7 +1323,7 @@ png_set_compression_window_bits(png_structp png_ptr, int window_bits)
if (window_bits == 8)
{
png_warning(png_ptr, "Compression window is being reset to 512");
- window_bits=9;
+ window_bits = 9;
}
#endif
png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS;
@@ -1444,6 +1334,7 @@ void PNGAPI
png_set_compression_method(png_structp png_ptr, int method)
{
png_debug(1, "in png_set_compression_method");
+
if (png_ptr == NULL)
return;
if (method != 8)
@@ -1460,12 +1351,13 @@ png_set_write_status_fn(png_structp png_ptr, png_write_status_ptr write_row_fn)
png_ptr->write_row_fn = write_row_fn;
}
-#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
+#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
void PNGAPI
png_set_write_user_transform_fn(png_structp png_ptr, png_user_transform_ptr
write_user_transform_fn)
{
png_debug(1, "in png_set_write_user_transform_fn");
+
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_USER_TRANSFORM;
@@ -1474,31 +1366,26 @@ png_set_write_user_transform_fn(png_structp png_ptr, png_user_transform_ptr
#endif
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
+#ifdef PNG_INFO_IMAGE_SUPPORTED
void PNGAPI
png_write_png(png_structp png_ptr, png_infop info_ptr,
int transforms, voidp params)
{
if (png_ptr == NULL || info_ptr == NULL)
return;
-#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
- /* Invert the alpha channel from opacity to transparency */
- if (transforms & PNG_TRANSFORM_INVERT_ALPHA)
- png_set_invert_alpha(png_ptr);
-#endif
/* Write the file header information. */
png_write_info(png_ptr, info_ptr);
/* ------ these transformations don't touch the info structure ------- */
-#if defined(PNG_WRITE_INVERT_SUPPORTED)
+#ifdef PNG_WRITE_INVERT_SUPPORTED
/* Invert monochrome pixels */
if (transforms & PNG_TRANSFORM_INVERT_MONO)
png_set_invert_mono(png_ptr);
#endif
-#if defined(PNG_WRITE_SHIFT_SUPPORTED)
+#ifdef PNG_WRITE_SHIFT_SUPPORTED
/* Shift the pixels up to a legal bit depth and fill in
* as appropriate to correctly scale the image.
*/
@@ -1507,19 +1394,19 @@ png_write_png(png_structp png_ptr, png_infop info_ptr,
png_set_shift(png_ptr, &info_ptr->sig_bit);
#endif
-#if defined(PNG_WRITE_PACK_SUPPORTED)
+#ifdef PNG_WRITE_PACK_SUPPORTED
/* Pack pixels into bytes */
if (transforms & PNG_TRANSFORM_PACKING)
png_set_packing(png_ptr);
#endif
-#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
+#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
/* Swap location of alpha bytes from ARGB to RGBA */
if (transforms & PNG_TRANSFORM_SWAP_ALPHA)
png_set_swap_alpha(png_ptr);
#endif
-#if defined(PNG_WRITE_FILLER_SUPPORTED)
+#ifdef PNG_WRITE_FILLER_SUPPORTED
/* Pack XRGB/RGBX/ARGB/RGBA into * RGB (4 channels -> 3 channels) */
if (transforms & PNG_TRANSFORM_STRIP_FILLER_AFTER)
png_set_filler(png_ptr, 0, PNG_FILLER_AFTER);
@@ -1527,24 +1414,30 @@ png_write_png(png_structp png_ptr, png_infop info_ptr,
png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE);
#endif
-#if defined(PNG_WRITE_BGR_SUPPORTED)
+#ifdef PNG_WRITE_BGR_SUPPORTED
/* Flip BGR pixels to RGB */
if (transforms & PNG_TRANSFORM_BGR)
png_set_bgr(png_ptr);
#endif
-#if defined(PNG_WRITE_SWAP_SUPPORTED)
+#ifdef PNG_WRITE_SWAP_SUPPORTED
/* Swap bytes of 16-bit files to most significant byte first */
if (transforms & PNG_TRANSFORM_SWAP_ENDIAN)
png_set_swap(png_ptr);
#endif
-#if defined(PNG_WRITE_PACKSWAP_SUPPORTED)
+#ifdef PNG_WRITE_PACKSWAP_SUPPORTED
/* Swap bits of 1, 2, 4 bit packed pixel formats */
if (transforms & PNG_TRANSFORM_PACKSWAP)
png_set_packswap(png_ptr);
#endif
+#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
+ /* Invert the alpha channel from opacity to transparency */
+ if (transforms & PNG_TRANSFORM_INVERT_ALPHA)
+ png_set_invert_alpha(png_ptr);
+#endif
+
/* ----------------------- end of transformations ------------------- */
/* Write the bits */
diff --git a/src/3rdparty/libpng/pngwtran.c b/src/3rdparty/libpng/pngwtran.c
index 88a7d3cbf3..9c8a6e7a96 100644
--- a/src/3rdparty/libpng/pngwtran.c
+++ b/src/3rdparty/libpng/pngwtran.c
@@ -1,8 +1,8 @@
/* pngwtran.c - transforms the data in a row for PNG writers
*
- * Last changed in libpng 1.2.37 [June 4, 2009]
- * Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.0 [January 3, 2010]
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -11,9 +11,10 @@
* and license in png.h
*/
-#define PNG_INTERNAL
+#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#ifdef PNG_WRITE_SUPPORTED
+#include "pngpriv.h"
/* Transform the data according to the user's wishes. The order of
* transformations is significant.
@@ -26,7 +27,7 @@ png_do_write_transformations(png_structp png_ptr)
if (png_ptr == NULL)
return;
-#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
+#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
if (png_ptr->transformations & PNG_USER_TRANSFORM)
if (png_ptr->write_user_transform_fn != NULL)
(*(png_ptr->write_user_transform_fn)) /* User write transform function */
@@ -40,48 +41,48 @@ png_do_write_transformations(png_structp png_ptr)
/* png_byte pixel_depth; bits per pixel (depth*channels) */
png_ptr->row_buf + 1); /* start of pixel data for row */
#endif
-#if defined(PNG_WRITE_FILLER_SUPPORTED)
+#ifdef PNG_WRITE_FILLER_SUPPORTED
if (png_ptr->transformations & PNG_FILLER)
png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,
png_ptr->flags);
#endif
-#if defined(PNG_WRITE_PACKSWAP_SUPPORTED)
+#ifdef PNG_WRITE_PACKSWAP_SUPPORTED
if (png_ptr->transformations & PNG_PACKSWAP)
png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
-#if defined(PNG_WRITE_PACK_SUPPORTED)
+#ifdef PNG_WRITE_PACK_SUPPORTED
if (png_ptr->transformations & PNG_PACK)
png_do_pack(&(png_ptr->row_info), png_ptr->row_buf + 1,
(png_uint_32)png_ptr->bit_depth);
#endif
-#if defined(PNG_WRITE_SWAP_SUPPORTED)
+#ifdef PNG_WRITE_SWAP_SUPPORTED
if (png_ptr->transformations & PNG_SWAP_BYTES)
png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
-#if defined(PNG_WRITE_SHIFT_SUPPORTED)
+#ifdef PNG_WRITE_SHIFT_SUPPORTED
if (png_ptr->transformations & PNG_SHIFT)
png_do_shift(&(png_ptr->row_info), png_ptr->row_buf + 1,
&(png_ptr->shift));
#endif
-#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
+#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
if (png_ptr->transformations & PNG_SWAP_ALPHA)
png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
-#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
+#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
if (png_ptr->transformations & PNG_INVERT_ALPHA)
png_do_write_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
-#if defined(PNG_WRITE_BGR_SUPPORTED)
+#ifdef PNG_WRITE_BGR_SUPPORTED
if (png_ptr->transformations & PNG_BGR)
png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
-#if defined(PNG_WRITE_INVERT_SUPPORTED)
+#ifdef PNG_WRITE_INVERT_SUPPORTED
if (png_ptr->transformations & PNG_INVERT_MONO)
png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
}
-#if defined(PNG_WRITE_PACK_SUPPORTED)
+#ifdef PNG_WRITE_PACK_SUPPORTED
/* Pack pixels into bytes. Pass the true bit depth in bit_depth. The
* row_info bit depth should be 8 (one pixel per byte). The channels
* should be 1 (this only happens on grayscale and paletted images).
@@ -90,10 +91,8 @@ void /* PRIVATE */
png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
{
png_debug(1, "in png_do_pack");
+
if (row_info->bit_depth == 8 &&
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- row != NULL && row_info != NULL &&
-#endif
row_info->channels == 1)
{
switch ((int)bit_depth)
@@ -204,7 +203,7 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
}
#endif
-#if defined(PNG_WRITE_SHIFT_SUPPORTED)
+#ifdef PNG_WRITE_SHIFT_SUPPORTED
/* Shift pixel values to take advantage of whole range. Pass the
* true number of bits in bit_depth. The row should be packed
* according to row_info->bit_depth. Thus, if you had a row of
@@ -216,11 +215,8 @@ void /* PRIVATE */
png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth)
{
png_debug(1, "in png_do_shift");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- if (row != NULL && row_info != NULL &&
-#else
+
if (
-#endif
row_info->color_type != PNG_COLOR_TYPE_PALETTE)
{
int shift_start[4], shift_dec[4];
@@ -335,14 +331,12 @@ png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth)
}
#endif
-#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
+#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
void /* PRIVATE */
png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_write_swap_alpha");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- if (row != NULL && row_info != NULL)
-#endif
+
{
if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
{
@@ -423,14 +417,12 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
}
#endif
-#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
+#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
void /* PRIVATE */
png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_write_invert_alpha");
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- if (row != NULL && row_info != NULL)
-#endif
+
{
if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
{
@@ -512,16 +504,14 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
}
#endif
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
+#ifdef PNG_MNG_FEATURES_SUPPORTED
/* Undoes intrapixel differencing */
void /* PRIVATE */
png_do_write_intrapixel(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_write_intrapixel");
+
if (
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- row != NULL && row_info != NULL &&
-#endif
(row_info->color_type & PNG_COLOR_MASK_COLOR))
{
int bytes_per_pixel;
diff --git a/src/3rdparty/libpng/pngwutil.c b/src/3rdparty/libpng/pngwutil.c
index f52495c072..eddac5b33a 100644
--- a/src/3rdparty/libpng/pngwutil.c
+++ b/src/3rdparty/libpng/pngwutil.c
@@ -1,8 +1,8 @@
/* pngwutil.c - utilities to write a PNG file
*
- * Last changed in libpng 1.2.40 [September 10, 2009]
- * Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.0 [January 3, 2010]
+ * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -11,9 +11,10 @@
* and license in png.h
*/
-#define PNG_INTERNAL
+#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#ifdef PNG_WRITE_SUPPORTED
+#include "pngpriv.h"
/* Place a 32-bit number into a buffer in PNG byte order. We work
* with unsigned numbers for convenience, although one supported
@@ -28,6 +29,7 @@ png_save_uint_32(png_bytep buf, png_uint_32 i)
buf[3] = (png_byte)(i & 0xff);
}
+#ifdef PNG_SAVE_INT_32_SUPPORTED
/* The png_save_int_32 function assumes integers are stored in two's
* complement format. If this isn't the case, then this routine needs to
* be modified to write data in two's complement format.
@@ -40,6 +42,7 @@ png_save_int_32(png_bytep buf, png_int_32 i)
buf[2] = (png_byte)((i >> 8) & 0xff);
buf[3] = (png_byte)(i & 0xff);
}
+#endif
/* Place a 16-bit number into a buffer in PNG byte order.
* The parameter is declared unsigned int, not png_uint_16,
@@ -58,11 +61,16 @@ png_save_uint_16(png_bytep buf, unsigned int i)
* we should call png_set_sig_bytes() to tell libpng how many of the
* bytes have already been written.
*/
-void /* PRIVATE */
+void PNGAPI
png_write_sig(png_structp png_ptr)
{
png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
+#ifdef PNG_IO_STATE_SUPPORTED
+ /* Inform the I/O callback that the signature is being written */
+ png_ptr->io_state = PNG_IO_WRITING | PNG_IO_SIGNATURE;
+#endif
+
/* Write the rest of the 8 byte signature */
png_write_data(png_ptr, &png_signature[png_ptr->sig_bytes],
(png_size_t)(8 - png_ptr->sig_bytes));
@@ -106,6 +114,13 @@ png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name,
if (png_ptr == NULL)
return;
+#ifdef PNG_IO_STATE_SUPPORTED
+ /* Inform the I/O callback that the chunk header is being written.
+ * PNG_IO_CHUNK_HDR requires a single I/O call.
+ */
+ png_ptr->io_state = PNG_IO_WRITING | PNG_IO_CHUNK_HDR;
+#endif
+
/* Write the length and the chunk name */
png_save_uint_32(buf, length);
png_memcpy(buf + 4, chunk_name, 4);
@@ -114,7 +129,14 @@ png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name,
png_memcpy(png_ptr->chunk_name, chunk_name, 4);
/* Reset the crc and run it over the chunk name */
png_reset_crc(png_ptr);
- png_calculate_crc(png_ptr, chunk_name, (png_size_t)4);
+ png_calculate_crc(png_ptr, chunk_name, 4);
+
+#ifdef PNG_IO_STATE_SUPPORTED
+ /* Inform the I/O callback that chunk data will (possibly) be written.
+ * PNG_IO_CHUNK_DATA does NOT require a specific number of I/O calls.
+ */
+ png_ptr->io_state = PNG_IO_WRITING | PNG_IO_CHUNK_DATA;
+#endif
}
/* Write the data of a PNG chunk started with png_write_chunk_start().
@@ -146,6 +168,13 @@ png_write_chunk_end(png_structp png_ptr)
if (png_ptr == NULL) return;
+#ifdef PNG_IO_STATE_SUPPORTED
+ /* Inform the I/O callback that the chunk CRC is being written.
+ * PNG_IO_CHUNK_CRC requires a single I/O function call.
+ */
+ png_ptr->io_state = PNG_IO_WRITING | PNG_IO_CHUNK_CRC;
+#endif
+
/* Write the crc in a single operation */
png_save_uint_32(buf, png_ptr->crc);
@@ -192,7 +221,7 @@ png_text_compress(png_structp png_ptr,
if (compression >= PNG_TEXT_COMPRESSION_LAST)
{
-#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
+#ifdef PNG_STDIO_SUPPORTED
char msg[50];
png_snprintf(msg, 50, "Unknown compression type %d", compression);
png_warning(png_ptr, msg);
@@ -251,7 +280,7 @@ png_text_compress(png_structp png_ptr,
old_ptr = comp->output_ptr;
comp->output_ptr = (png_charpp)png_malloc(png_ptr,
- (png_uint_32)
+ (png_alloc_size_t)
(comp->max_output_ptr * png_sizeof(png_charpp)));
png_memcpy(comp->output_ptr, old_ptr, old_max
* png_sizeof(png_charp));
@@ -259,14 +288,14 @@ png_text_compress(png_structp png_ptr,
}
else
comp->output_ptr = (png_charpp)png_malloc(png_ptr,
- (png_uint_32)
+ (png_alloc_size_t)
(comp->max_output_ptr * png_sizeof(png_charp)));
}
/* Save the data */
comp->output_ptr[comp->num_output_ptr] =
(png_charp)png_malloc(png_ptr,
- (png_uint_32)png_ptr->zbuf_size);
+ (png_alloc_size_t)png_ptr->zbuf_size);
png_memcpy(comp->output_ptr[comp->num_output_ptr], png_ptr->zbuf,
png_ptr->zbuf_size);
comp->num_output_ptr++;
@@ -303,7 +332,7 @@ png_text_compress(png_structp png_ptr,
old_ptr = comp->output_ptr;
/* This could be optimized to realloc() */
comp->output_ptr = (png_charpp)png_malloc(png_ptr,
- (png_uint_32)(comp->max_output_ptr *
+ (png_alloc_size_t)(comp->max_output_ptr *
png_sizeof(png_charp)));
png_memcpy(comp->output_ptr, old_ptr,
old_max * png_sizeof(png_charp));
@@ -311,14 +340,14 @@ png_text_compress(png_structp png_ptr,
}
else
comp->output_ptr = (png_charpp)png_malloc(png_ptr,
- (png_uint_32)(comp->max_output_ptr *
+ (png_alloc_size_t)(comp->max_output_ptr *
png_sizeof(png_charp)));
}
/* Save the data */
comp->output_ptr[comp->num_output_ptr] =
(png_charp)png_malloc(png_ptr,
- (png_uint_32)png_ptr->zbuf_size);
+ (png_alloc_size_t)png_ptr->zbuf_size);
png_memcpy(comp->output_ptr[comp->num_output_ptr], png_ptr->zbuf,
png_ptr->zbuf_size);
comp->num_output_ptr++;
@@ -366,11 +395,9 @@ png_write_compressed_data_out(png_structp png_ptr, compression_state *comp)
png_write_chunk_data(png_ptr, (png_bytep)comp->output_ptr[i],
(png_size_t)png_ptr->zbuf_size);
png_free(png_ptr, comp->output_ptr[i]);
- comp->output_ptr[i]=NULL;
}
if (comp->max_output_ptr != 0)
png_free(png_ptr, comp->output_ptr);
- comp->output_ptr=NULL;
/* Write anything left in zbuf */
if (png_ptr->zstream.avail_out < (png_uint_32)png_ptr->zbuf_size)
png_write_chunk_data(png_ptr, png_ptr->zbuf,
@@ -391,9 +418,7 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
int bit_depth, int color_type, int compression_type, int filter_type,
int interlace_type)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_IHDR;
-#endif
int ret;
png_byte buf[13]; /* Buffer to store the IHDR info */
@@ -459,7 +484,7 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
* 5. The color_type is RGB or RGBA
*/
if (
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
+#ifdef PNG_MNG_FEATURES_SUPPORTED
!((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) &&
(color_type == PNG_COLOR_TYPE_RGB ||
@@ -487,7 +512,7 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
png_ptr->bit_depth = (png_byte)bit_depth;
png_ptr->color_type = (png_byte)color_type;
png_ptr->interlaced = (png_byte)interlace_type;
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
+#ifdef PNG_MNG_FEATURES_SUPPORTED
png_ptr->filter_type = (png_byte)filter_type;
#endif
png_ptr->compression_type = (png_byte)compression_type;
@@ -569,9 +594,7 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
void /* PRIVATE */
png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_PLTE;
-#endif
png_uint_32 i;
png_colorp pal_ptr;
png_byte buf[3];
@@ -579,7 +602,7 @@ png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal)
png_debug(1, "in png_write_PLTE");
if ((
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
+#ifdef PNG_MNG_FEATURES_SUPPORTED
!(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) &&
#endif
num_pal == 0) || num_pal > 256)
@@ -607,7 +630,7 @@ png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal)
png_write_chunk_start(png_ptr, (png_bytep)png_PLTE,
(png_uint_32)(num_pal * 3));
-#ifndef PNG_NO_POINTER_INDEXING
+#ifdef PNG_POINTER_INDEXING_SUPPORTED
for (i = 0, pal_ptr = palette; i < num_pal; i++, pal_ptr++)
{
buf[0] = pal_ptr->red;
@@ -634,9 +657,7 @@ png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal)
void /* PRIVATE */
png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_IDAT;
-#endif
png_debug(1, "in png_write_IDAT");
@@ -689,26 +710,22 @@ png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length)
void /* PRIVATE */
png_write_IEND(png_structp png_ptr)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_IEND;
-#endif
png_debug(1, "in png_write_IEND");
- png_write_chunk(png_ptr, (png_bytep)png_IEND, png_bytep_NULL,
+ png_write_chunk(png_ptr, (png_bytep)png_IEND, NULL,
(png_size_t)0);
png_ptr->mode |= PNG_HAVE_IEND;
}
-#if defined(PNG_WRITE_gAMA_SUPPORTED)
+#ifdef PNG_WRITE_gAMA_SUPPORTED
/* Write a gAMA chunk */
#ifdef PNG_FLOATING_POINT_SUPPORTED
void /* PRIVATE */
png_write_gAMA(png_structp png_ptr, double file_gamma)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_gAMA;
-#endif
png_uint_32 igamma;
png_byte buf[4];
@@ -724,9 +741,7 @@ png_write_gAMA(png_structp png_ptr, double file_gamma)
void /* PRIVATE */
png_write_gAMA_fixed(png_structp png_ptr, png_fixed_point file_gamma)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_gAMA;
-#endif
png_byte buf[4];
png_debug(1, "in png_write_gAMA");
@@ -738,14 +753,12 @@ png_write_gAMA_fixed(png_structp png_ptr, png_fixed_point file_gamma)
#endif
#endif
-#if defined(PNG_WRITE_sRGB_SUPPORTED)
+#ifdef PNG_WRITE_sRGB_SUPPORTED
/* Write a sRGB chunk */
void /* PRIVATE */
png_write_sRGB(png_structp png_ptr, int srgb_intent)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_sRGB;
-#endif
png_byte buf[1];
png_debug(1, "in png_write_sRGB");
@@ -758,15 +771,13 @@ png_write_sRGB(png_structp png_ptr, int srgb_intent)
}
#endif
-#if defined(PNG_WRITE_iCCP_SUPPORTED)
+#ifdef PNG_WRITE_iCCP_SUPPORTED
/* Write an iCCP chunk */
void /* PRIVATE */
png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
png_charp profile, int profile_len)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_iCCP;
-#endif
png_size_t name_len;
png_charp new_name;
compression_state comp;
@@ -839,21 +850,19 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
}
#endif
-#if defined(PNG_WRITE_sPLT_SUPPORTED)
+#ifdef PNG_WRITE_sPLT_SUPPORTED
/* Write a sPLT chunk */
void /* PRIVATE */
png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_sPLT;
-#endif
png_size_t name_len;
png_charp new_name;
png_byte entrybuf[10];
- int entry_size = (spalette->depth == 8 ? 6 : 10);
- int palette_size = entry_size * spalette->nentries;
+ png_size_t entry_size = (spalette->depth == 8 ? 6 : 10);
+ png_size_t palette_size = entry_size * spalette->nentries;
png_sPLT_entryp ep;
-#ifdef PNG_NO_POINTER_INDEXING
+#ifndef PNG_POINTER_INDEXING_SUPPORTED
int i;
#endif
@@ -870,7 +879,7 @@ png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette)
png_write_chunk_data(png_ptr, (png_bytep)&spalette->depth, (png_size_t)1);
/* Loop through each palette entry, writing appropriately */
-#ifndef PNG_NO_POINTER_INDEXING
+#ifdef PNG_POINTER_INDEXING_SUPPORTED
for (ep = spalette->entries; ep<spalette->entries + spalette->nentries; ep++)
{
if (spalette->depth == 8)
@@ -920,14 +929,12 @@ png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette)
}
#endif
-#if defined(PNG_WRITE_sBIT_SUPPORTED)
+#ifdef PNG_WRITE_sBIT_SUPPORTED
/* Write the sBIT chunk */
void /* PRIVATE */
png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_sBIT;
-#endif
png_byte buf[4];
png_size_t size;
@@ -977,7 +984,7 @@ png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type)
}
#endif
-#if defined(PNG_WRITE_cHRM_SUPPORTED)
+#ifdef PNG_WRITE_cHRM_SUPPORTED
/* Write the cHRM chunk */
#ifdef PNG_FLOATING_POINT_SUPPORTED
void /* PRIVATE */
@@ -985,9 +992,7 @@ png_write_cHRM(png_structp png_ptr, double white_x, double white_y,
double red_x, double red_y, double green_x, double green_y,
double blue_x, double blue_y)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_cHRM;
-#endif
png_byte buf[32];
png_fixed_point int_white_x, int_white_y, int_red_x, int_red_y,
@@ -1004,7 +1009,7 @@ png_write_cHRM(png_structp png_ptr, double white_x, double white_y,
int_blue_x = (png_uint_32)(blue_x * 100000.0 + 0.5);
int_blue_y = (png_uint_32)(blue_y * 100000.0 + 0.5);
-#if !defined(PNG_NO_CHECK_cHRM)
+#ifdef PNG_CHECK_cHRM_SUPPORTED
if (png_check_cHRM_fixed(png_ptr, int_white_x, int_white_y,
int_red_x, int_red_y, int_green_x, int_green_y, int_blue_x, int_blue_y))
#endif
@@ -1034,15 +1039,13 @@ png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x,
png_fixed_point green_x, png_fixed_point green_y, png_fixed_point blue_x,
png_fixed_point blue_y)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_cHRM;
-#endif
png_byte buf[32];
png_debug(1, "in png_write_cHRM");
/* Each value is saved in 1/100,000ths */
-#if !defined(PNG_NO_CHECK_cHRM)
+#ifdef PNG_CHECK_cHRM_SUPPORTED
if (png_check_cHRM_fixed(png_ptr, white_x, white_y, red_x, red_y,
green_x, green_y, blue_x, blue_y))
#endif
@@ -1065,15 +1068,13 @@ png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x,
#endif
#endif
-#if defined(PNG_WRITE_tRNS_SUPPORTED)
+#ifdef PNG_WRITE_tRNS_SUPPORTED
/* Write the tRNS chunk */
void /* PRIVATE */
-png_write_tRNS(png_structp png_ptr, png_bytep trans, png_color_16p tran,
+png_write_tRNS(png_structp png_ptr, png_bytep trans_alpha, png_color_16p tran,
int num_trans, int color_type)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_tRNS;
-#endif
png_byte buf[6];
png_debug(1, "in png_write_tRNS");
@@ -1086,7 +1087,7 @@ png_write_tRNS(png_structp png_ptr, png_bytep trans, png_color_16p tran,
return;
}
/* Write the chunk out as it is */
- png_write_chunk(png_ptr, (png_bytep)png_tRNS, trans,
+ png_write_chunk(png_ptr, (png_bytep)png_tRNS, trans_alpha,
(png_size_t)num_trans);
}
else if (color_type == PNG_COLOR_TYPE_GRAY)
@@ -1122,14 +1123,12 @@ png_write_tRNS(png_structp png_ptr, png_bytep trans, png_color_16p tran,
}
#endif
-#if defined(PNG_WRITE_bKGD_SUPPORTED)
+#ifdef PNG_WRITE_bKGD_SUPPORTED
/* Write the background chunk */
void /* PRIVATE */
png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_bKGD;
-#endif
png_byte buf[6];
png_debug(1, "in png_write_bKGD");
@@ -1137,7 +1136,7 @@ png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type)
if (color_type == PNG_COLOR_TYPE_PALETTE)
{
if (
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
+#ifdef PNG_MNG_FEATURES_SUPPORTED
(png_ptr->num_palette ||
(!(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE))) &&
#endif
@@ -1176,14 +1175,12 @@ png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type)
}
#endif
-#if defined(PNG_WRITE_hIST_SUPPORTED)
+#ifdef PNG_WRITE_hIST_SUPPORTED
/* Write the histogram */
void /* PRIVATE */
png_write_hIST(png_structp png_ptr, png_uint_16p hist, int num_hist)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_hIST;
-#endif
int i;
png_byte buf[3];
@@ -1253,7 +1250,7 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key)
if ((png_byte)*kp < 0x20 ||
((png_byte)*kp > 0x7E && (png_byte)*kp < 0xA1))
{
-#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
+#ifdef PNG_STDIO_SUPPORTED
char msg[40];
png_snprintf(msg, 40,
@@ -1325,7 +1322,6 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key)
if (key_len == 0)
{
png_free(png_ptr, *new_key);
- *new_key=NULL;
png_warning(png_ptr, "Zero length keyword");
}
@@ -1340,15 +1336,13 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key)
}
#endif
-#if defined(PNG_WRITE_tEXt_SUPPORTED)
+#ifdef PNG_WRITE_tEXt_SUPPORTED
/* Write a tEXt chunk */
void /* PRIVATE */
png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text,
png_size_t text_len)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_tEXt;
-#endif
png_size_t key_len;
png_charp new_key;
@@ -1381,15 +1375,13 @@ png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text,
}
#endif
-#if defined(PNG_WRITE_zTXt_SUPPORTED)
+#ifdef PNG_WRITE_zTXt_SUPPORTED
/* Write a compressed text chunk */
void /* PRIVATE */
png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text,
png_size_t text_len, int compression)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_zTXt;
-#endif
png_size_t key_len;
char buf[1];
png_charp new_key;
@@ -1441,15 +1433,13 @@ png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text,
}
#endif
-#if defined(PNG_WRITE_iTXt_SUPPORTED)
+#ifdef PNG_WRITE_iTXt_SUPPORTED
/* Write an iTXt chunk */
void /* PRIVATE */
png_write_iTXt(png_structp png_ptr, int compression, png_charp key,
png_charp lang, png_charp lang_key, png_charp text)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_iTXt;
-#endif
png_size_t lang_len, key_len, lang_key_len, text_len;
png_charp new_lang;
png_charp new_key = NULL;
@@ -1530,15 +1520,13 @@ png_write_iTXt(png_structp png_ptr, int compression, png_charp key,
}
#endif
-#if defined(PNG_WRITE_oFFs_SUPPORTED)
+#ifdef PNG_WRITE_oFFs_SUPPORTED
/* Write the oFFs chunk */
void /* PRIVATE */
png_write_oFFs(png_structp png_ptr, png_int_32 x_offset, png_int_32 y_offset,
int unit_type)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_oFFs;
-#endif
png_byte buf[9];
png_debug(1, "in png_write_oFFs");
@@ -1553,15 +1541,13 @@ png_write_oFFs(png_structp png_ptr, png_int_32 x_offset, png_int_32 y_offset,
png_write_chunk(png_ptr, (png_bytep)png_oFFs, buf, (png_size_t)9);
}
#endif
-#if defined(PNG_WRITE_pCAL_SUPPORTED)
+#ifdef PNG_WRITE_pCAL_SUPPORTED
/* Write the pCAL chunk (described in the PNG extensions document) */
void /* PRIVATE */
png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0,
png_int_32 X1, int type, int nparams, png_charp units, png_charpp params)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_pCAL;
-#endif
png_size_t purpose_len, units_len, total_len;
png_uint_32p params_len;
png_byte buf[10];
@@ -1580,7 +1566,7 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0,
total_len = purpose_len + units_len + 10;
params_len = (png_uint_32p)png_malloc(png_ptr,
- (png_uint_32)(nparams * png_sizeof(png_uint_32)));
+ (png_alloc_size_t)(nparams * png_sizeof(png_uint_32)));
/* Find the length of each parameter, making sure we don't count the
null terminator for the last parameter. */
@@ -1616,42 +1602,23 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0,
}
#endif
-#if defined(PNG_WRITE_sCAL_SUPPORTED)
+#ifdef PNG_WRITE_sCAL_SUPPORTED
/* Write the sCAL chunk */
-#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
+#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED)
void /* PRIVATE */
png_write_sCAL(png_structp png_ptr, int unit, double width, double height)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_sCAL;
-#endif
char buf[64];
png_size_t total_len;
png_debug(1, "in png_write_sCAL");
buf[0] = (char)unit;
-#if defined(_WIN32_WCE)
-/* sprintf() function is not supported on WindowsCE */
- {
- wchar_t wc_buf[32];
- size_t wc_len;
- swprintf(wc_buf, TEXT("%12.12e"), width);
- wc_len = wcslen(wc_buf);
- WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, buf + 1, wc_len, NULL, NULL);
- total_len = wc_len + 2;
- swprintf(wc_buf, TEXT("%12.12e"), height);
- wc_len = wcslen(wc_buf);
- WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, buf + total_len, wc_len,
- NULL, NULL);
- total_len += wc_len;
- }
-#else
png_snprintf(buf + 1, 63, "%12.12e", width);
total_len = 1 + png_strlen(buf + 1) + 1;
png_snprintf(buf + total_len, 64-total_len, "%12.12e", height);
total_len += png_strlen(buf + total_len);
-#endif
png_debug1(3, "sCAL total length = %u", (unsigned int)total_len);
png_write_chunk(png_ptr, (png_bytep)png_sCAL, (png_bytep)buf, total_len);
@@ -1662,9 +1629,7 @@ void /* PRIVATE */
png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width,
png_charp height)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_sCAL;
-#endif
png_byte buf[64];
png_size_t wlen, hlen, total_len;
@@ -1690,16 +1655,14 @@ png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width,
#endif
#endif
-#if defined(PNG_WRITE_pHYs_SUPPORTED)
+#ifdef PNG_WRITE_pHYs_SUPPORTED
/* Write the pHYs chunk */
void /* PRIVATE */
png_write_pHYs(png_structp png_ptr, png_uint_32 x_pixels_per_unit,
png_uint_32 y_pixels_per_unit,
int unit_type)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_pHYs;
-#endif
png_byte buf[9];
png_debug(1, "in png_write_pHYs");
@@ -1715,16 +1678,14 @@ png_write_pHYs(png_structp png_ptr, png_uint_32 x_pixels_per_unit,
}
#endif
-#if defined(PNG_WRITE_tIME_SUPPORTED)
+#ifdef PNG_WRITE_tIME_SUPPORTED
/* Write the tIME chunk. Use either png_convert_from_struct_tm()
* or png_convert_from_time_t(), or fill in the structure yourself.
*/
void /* PRIVATE */
png_write_tIME(png_structp png_ptr, png_timep mod_time)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
PNG_tIME;
-#endif
png_byte buf[7];
png_debug(1, "in png_write_tIME");
@@ -1753,7 +1714,6 @@ void /* PRIVATE */
png_write_start_row(png_structp png_ptr)
{
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
-#ifdef PNG_USE_LOCAL_ARRAYS
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Start of interlace block */
@@ -1768,7 +1728,6 @@ png_write_start_row(png_structp png_ptr)
/* Offset to next interlace block in the y direction */
int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};
#endif
-#endif
png_size_t buf_size;
@@ -1779,48 +1738,47 @@ png_write_start_row(png_structp png_ptr)
/* Set up row buffer */
png_ptr->row_buf = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)buf_size);
+ (png_alloc_size_t)buf_size);
png_ptr->row_buf[0] = PNG_FILTER_VALUE_NONE;
-#ifndef PNG_NO_WRITE_FILTER
+#ifdef PNG_WRITE_FILTER_SUPPORTED
/* Set up filtering buffer, if using this filter */
if (png_ptr->do_filter & PNG_FILTER_SUB)
{
png_ptr->sub_row = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)(png_ptr->rowbytes + 1));
+ (png_alloc_size_t)(png_ptr->rowbytes + 1));
png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB;
}
/* We only need to keep the previous row if we are using one of these. */
if (png_ptr->do_filter & (PNG_FILTER_AVG | PNG_FILTER_UP | PNG_FILTER_PAETH))
{
- /* Set up previous row buffer */
- png_ptr->prev_row = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)buf_size);
- png_memset(png_ptr->prev_row, 0, buf_size);
+ /* Set up previous row buffer */
+ png_ptr->prev_row = (png_bytep)png_calloc(png_ptr,
+ (png_alloc_size_t)buf_size);
if (png_ptr->do_filter & PNG_FILTER_UP)
{
png_ptr->up_row = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)(png_ptr->rowbytes + 1));
+ (png_size_t)(png_ptr->rowbytes + 1));
png_ptr->up_row[0] = PNG_FILTER_VALUE_UP;
}
if (png_ptr->do_filter & PNG_FILTER_AVG)
{
png_ptr->avg_row = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)(png_ptr->rowbytes + 1));
+ (png_alloc_size_t)(png_ptr->rowbytes + 1));
png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG;
}
if (png_ptr->do_filter & PNG_FILTER_PAETH)
{
png_ptr->paeth_row = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)(png_ptr->rowbytes + 1));
+ (png_size_t)(png_ptr->rowbytes + 1));
png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH;
}
}
-#endif /* PNG_NO_WRITE_FILTER */
+#endif /* PNG_WRITE_FILTER_SUPPORTED */
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
/* If interlaced, we need to set up width and height of pass */
@@ -1854,7 +1812,6 @@ void /* PRIVATE */
png_write_finish_row(png_structp png_ptr)
{
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
-#ifdef PNG_USE_LOCAL_ARRAYS
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Start of interlace block */
@@ -1869,7 +1826,6 @@ png_write_finish_row(png_structp png_ptr)
/* Offset to next interlace block in the y direction */
int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};
#endif
-#endif
int ret;
@@ -1962,7 +1918,7 @@ png_write_finish_row(png_structp png_ptr)
png_ptr->zstream.data_type = Z_BINARY;
}
-#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
+#ifdef PNG_WRITE_INTERLACING_SUPPORTED
/* Pick out the correct pixels for the interlace pass.
* The basic idea here is to go through the row with a source
* pointer and a destination pointer (sp and dp), and copy the
@@ -1973,7 +1929,6 @@ png_write_finish_row(png_structp png_ptr)
void /* PRIVATE */
png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
{
-#ifdef PNG_USE_LOCAL_ARRAYS
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Start of interlace block */
@@ -1981,16 +1936,11 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
/* Offset to next interlace block */
int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
-#endif
png_debug(1, "in png_do_write_interlace");
/* We don't have to do anything on the last pass (6) */
-#if defined(PNG_USELESS_TESTS_SUPPORTED)
- if (row != NULL && row_info != NULL && pass < 6)
-#else
if (pass < 6)
-#endif
{
/* Each pixel depth is handled separately */
switch (row_info->pixel_depth)
@@ -2146,7 +2096,7 @@ void /* PRIVATE */
png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
{
png_bytep best_row;
-#ifndef PNG_NO_WRITE_FILTER
+#ifdef PNG_WRITE_FILTER_SUPPORTED
png_bytep prev_row, row_buf;
png_uint_32 mins, bpp;
png_byte filter_to_do = png_ptr->do_filter;
@@ -2157,13 +2107,21 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
png_debug(1, "in png_write_find_filter");
+#ifndef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
+ if (png_ptr->row_number == 0 && filter_to_do == PNG_ALL_FILTERS)
+ {
+ /* These will never be selected so we need not test them. */
+ filter_to_do &= ~(PNG_FILTER_UP | PNG_FILTER_PAETH);
+ }
+#endif
+
/* Find out how many bytes offset each pixel is */
bpp = (row_info->pixel_depth + 7) >> 3;
prev_row = png_ptr->prev_row;
#endif
best_row = png_ptr->row_buf;
-#ifndef PNG_NO_WRITE_FILTER
+#ifdef PNG_WRITE_FILTER_SUPPORTED
row_buf = best_row;
mins = PNG_MAXSUM;
@@ -2206,7 +2164,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
sum += (v < 128) ? v : 256 - v;
}
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
{
png_uint_32 sumhi, sumlo;
@@ -2270,7 +2228,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
png_uint_32 i;
int v;
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
/* We temporarily increase the "minimum sum" by the factor we
* would reduce the sum of this filter, so that we can do the
* early exit comparison without scaling the sum each time.
@@ -2323,7 +2281,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
break;
}
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
{
int j;
@@ -2384,7 +2342,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
int v;
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
{
int j;
@@ -2426,7 +2384,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
break;
}
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
{
int j;
@@ -2489,7 +2447,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
png_uint_32 i;
int v;
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
{
int j;
@@ -2538,7 +2496,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
break;
}
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
{
int j;
@@ -2622,7 +2580,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
png_uint_32 i;
int v;
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
{
int j;
@@ -2703,7 +2661,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
break;
}
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
{
int j;
@@ -2739,13 +2697,13 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
best_row = png_ptr->paeth_row;
}
}
-#endif /* PNG_NO_WRITE_FILTER */
+#endif /* PNG_WRITE_FILTER_SUPPORTED */
/* Do the actual writing of the filtered row data from the chosen filter. */
png_write_filtered_row(png_ptr, best_row);
-#ifndef PNG_NO_WRITE_FILTER
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
+#ifdef PNG_WRITE_FILTER_SUPPORTED
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
/* Save the type of filter we picked this time for future calculations */
if (png_ptr->num_prev_filters > 0)
{
@@ -2757,7 +2715,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
png_ptr->prev_filters[j] = best_row[0];
}
#endif
-#endif /* PNG_NO_WRITE_FILTER */
+#endif /* PNG_WRITE_FILTER_SUPPORTED */
}
@@ -2812,7 +2770,7 @@ png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row)
/* Finish row - updates counters and flushes zlib if last row */
png_write_finish_row(png_ptr);
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
+#ifdef PNG_WRITE_FLUSH_SUPPORTED
png_ptr->flush_rows++;
if (png_ptr->flush_dist > 0 &&
diff --git a/src/3rdparty/libpng/projects/beos/x86-shared.proj b/src/3rdparty/libpng/projects/beos/x86-shared.proj
deleted file mode 100644
index 6d2e3c3199..0000000000
--- a/src/3rdparty/libpng/projects/beos/x86-shared.proj
+++ /dev/null
Binary files differ
diff --git a/src/3rdparty/libpng/projects/beos/x86-shared.txt b/src/3rdparty/libpng/projects/beos/x86-shared.txt
deleted file mode 100644
index 0cd4d9db4c..0000000000
--- a/src/3rdparty/libpng/projects/beos/x86-shared.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-This project builds a shared library version of libpng on x86 BeOS.
-
-It defines PNG_USE_PNGGCCRD, which activates the assembly code in
-pnggccrd.c; this hasn't been extensively tested on BeOS.
-
-To install:
-
-1) build
-
- Note: As of version 1.0.10, you'll get a fair number of warnings when
- you compile pnggccrd.c. As far as I know, these are harmless,
- but it would be better if someone fixed them.
-
-2) copy and png.h, pngconf.h somewhere; /boot/home/config/include (which
- you'll have to make) is a good choice
-
-3) copy libpng.so to /boot/home/config/lib
-
-4) build your libpng.so applications (remember to include libz.a as
- well when you link)
-
-- Chris Herborth, March 27, 2001
diff --git a/src/3rdparty/libpng/projects/beos/x86-static.proj b/src/3rdparty/libpng/projects/beos/x86-static.proj
deleted file mode 100644
index 37c0753664..0000000000
--- a/src/3rdparty/libpng/projects/beos/x86-static.proj
+++ /dev/null
Binary files differ
diff --git a/src/3rdparty/libpng/projects/beos/x86-static.txt b/src/3rdparty/libpng/projects/beos/x86-static.txt
deleted file mode 100644
index bb80aaa5fa..0000000000
--- a/src/3rdparty/libpng/projects/beos/x86-static.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-This project builds a static library version of libpng on x86 BeOS.
-
-It defines PNG_USE_PNGGCCRD, which activates the assembly code in
-pnggccrd.c; this hasn't been extensively tested on BeOS.
-
-To install:
-
-1) build
-
- Note: As of version 1.0.10, you'll get a fair number of warnings when
- you compile pnggccrd.c. As far as I know, these are harmless,
- but it would be better if someone fixed them.
-
-2) copy and png.h, pngconf.h somewhere; /boot/home/config/include (which
- you'll have to make) is a good choice
-
-3) copy libpng.a to /boot/home/config/lib
-
-4) build your libpng.a applications (remember to include libz.a as
- well when you link)
-
-- Chris Herborth, March 27, 2001
diff --git a/src/3rdparty/libpng/projects/cbuilder5/README.txt b/src/3rdparty/libpng/projects/cbuilder5/README.txt
new file mode 100644
index 0000000000..9efaa4b6c4
--- /dev/null
+++ b/src/3rdparty/libpng/projects/cbuilder5/README.txt
@@ -0,0 +1,11 @@
+The cbuilder5 project has not been updated to libpng-1.4.0.
+
+It needs to depend on pngpriv.h
+
+It needs to *not* depend on pnggccrd.c or pngvcrd.c
+
+It needs to DEFINE PNG_NO_PEDANTIC_WARNING while building
+the library, but not while building an application.
+
+If an updated version is not received, this project will
+be removed when libpng-1.4.0 is released.
diff --git a/src/3rdparty/libpng/projects/netware.txt b/src/3rdparty/libpng/projects/netware.txt
deleted file mode 100644
index 178361da8f..0000000000
--- a/src/3rdparty/libpng/projects/netware.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-A set of project files is available for Netware. Get
-libpng-1.2.5-project-netware.zip from a libpng distribution
-site such as http://libpng.sourceforge.net
-
-Put the zip file in this directory (projects) and then run
-"unzip -a libpng-1.2.5-project-netware.zip"
diff --git a/src/3rdparty/libpng/projects/visualc6/README.txt b/src/3rdparty/libpng/projects/visualc6/README.txt
index d34980d575..b650e9e4c1 100644
--- a/src/3rdparty/libpng/projects/visualc6/README.txt
+++ b/src/3rdparty/libpng/projects/visualc6/README.txt
@@ -2,6 +2,8 @@ Microsoft Developer Studio Project File, Format Version 6.00 for libpng.
Copyright (C) 2000-2004 Simon-Pierre Cadieux.
Copyright (C) 2004 Cosmin Truta.
+
+This code is released under the libpng license.
For conditions of distribution and use, see copyright notice in png.h
@@ -31,15 +33,11 @@ To use:
This project builds the libpng binaries as follows:
-* Win32_DLL_Release\libpng13.dll DLL build
-* Win32_DLL_Debug\libpng13d.dll DLL build (debug version)
-* Win32_DLL_ASM_Release\libpng13.dll DLL build using ASM code
-* Win32_DLL_ASM_Debug\libpng13d.dll DLL build using ASM (debug version)
-* Win32_DLL_VB\libpng13vb.dll DLL build for Visual Basic, using stdcall
+* Win32_DLL_Release\libpng14.dll DLL build
+* Win32_DLL_Debug\libpng14d.dll DLL build (debug version)
+* Win32_DLL_VB\libpng14vb.dll DLL build for Visual Basic, using stdcall
* Win32_LIB_Release\libpng.lib static build
* Win32_LIB_Debug\libpngd.lib static build (debug version)
-* Win32_LIB_ASM_Release\libpng.lib static build using ASM code
-* Win32_LIB_ASM_Debug\libpngd.lib static build using ASM (debug version)
Notes:
diff --git a/src/3rdparty/libpng/projects/visualc6/libpng.dsp b/src/3rdparty/libpng/projects/visualc6/libpng.dsp
index 6f611f7d3a..6704255ab8 100644
--- a/src/3rdparty/libpng/projects/visualc6/libpng.dsp
+++ b/src/3rdparty/libpng/projects/visualc6/libpng.dsp
@@ -20,13 +20,9 @@ CFG=libpng - Win32 DLL Release
!MESSAGE
!MESSAGE "libpng - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "libpng - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "libpng - Win32 DLL ASM Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "libpng - Win32 DLL ASM Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "libpng - Win32 DLL VB" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "libpng - Win32 LIB Release" (based on "Win32 (x86) Static Library")
!MESSAGE "libpng - Win32 LIB Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE "libpng - Win32 LIB ASM Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "libpng - Win32 LIB ASM Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
@@ -50,20 +46,20 @@ CFG=libpng - Win32 DLL Release
CPP=cl.exe
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_BUILD_DLL" /D "PNG_NO_MMX_CODE" /D "ZLIB_DLL" /D "_CRT_SECURE_NO_WARNINGS" /FD /c
+# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
MTL=midl.exe
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG"
+# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
+# ADD RSC /l 0x409 /i "..\.." /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /machine:I386
-# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_Release\libpng13.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release"
+# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_Release\libpng14.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug"
@@ -81,82 +77,20 @@ LINK32=link.exe
CPP=cl.exe
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "PNG_NO_MMX_CODE" /D PNG_DEBUG=1 /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /D "_CRT_SECURE_NO_WARNINGS" /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D PNG_DEBUG=1 /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /FD /GZ /c
# SUBTRACT CPP /YX /Yc /Yu
MTL=midl.exe
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /i "..\.." /d "_DEBUG" /d PNG_DEBUG=1
+# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "_DEBUG"
+# ADD RSC /l 0x409 /i "..\.." /d "PNG_NO_PEDANTIC_WARNINGS" /d "_DEBUG" /d PNG_DEBUG=1
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 zlib1d.lib /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\libpng13d.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Debug"
-
-!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "libpng___Win32_DLL_ASM_Release"
-# PROP BASE Intermediate_Dir "libpng___Win32_DLL_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_ASM_Release"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_USE_PNGVCRD" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /D "PNG_LIBPNG_SPECIALBUILD" /D "_CRT_SECURE_NO_WARNINGS" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG" /d PNG_LIBPNG_SPECIALBUILD=""""Use MMX instructions""""
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /dll /machine:I386
-# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_ASM_Release\libpng13.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Release"
-
-!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "libpng___Win32_DLL_ASM_Debug"
-# PROP BASE Intermediate_Dir "libpng___Win32_DLL_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_ASM_Debug"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D PNG_DEBUG=1 /D "PNG_USE_PNGVCRD" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /D "PNG_LIBPNG_SPECIALBUILD" /D "_CRT_SECURE_NO_WARNINGS" /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /i "..\.." /d "_DEBUG" /d PNG_DEBUG=1 /d PNG_LIBPNG_SPECIALBUILD=""""Use MMX instructions""""
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 zlib1d.lib /nologo /dll /debug /machine:I386 /out:"Win32_DLL_ASM_Debug\libpng13d.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Debug"
+# ADD LINK32 zlib1d.lib /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\libpng14d.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Debug"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB"
@@ -174,23 +108,23 @@ LINK32=link.exe
CPP=cl.exe
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /D PNGAPI=__stdcall /D "PNG_NO_MODULEDEF" /D "PNG_LIBPNG_SPECIALBUILD" /D "_CRT_SECURE_NO_WARNINGS" /FD /c
+# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /D PNGAPI=__stdcall /D "PNG_NO_MODULEDEF" /D "PNG_LIBPNG_SPECIALBUILD" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
MTL=midl.exe
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG" /dPNG_LIBPNG_DLLFNAME_POSTFIX=""""VB"""" /dPNG_LIBPNG_SPECIALBUILD=""""__stdcall calling convention used for exported functions""""
+# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
+# ADD RSC /l 0x409 /i "..\.." /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG" /dPNG_LIBPNG_DLLFNAME_POSTFIX=""""VB"""" /dPNG_LIBPNG_SPECIALBUILD=""""__stdcall calling convention used for exported functions""""
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /machine:I386
-# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_VB\libpng13vb.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release"
+# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_VB\libpng14vb.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release"
# Begin Special Build Tool
OutDir=.\Win32_DLL_VB
-TargetName=libpng13vb
+TargetName=libpng14vb
SOURCE="$(InputPath)"
PostBuild_Cmds=echo Deleting $(targetname) import library and export file (Not required for VB projects) del $(outdir)\$(targetname).lib del $(outdir)\$(targetname).exp
# End Special Build Tool
@@ -210,11 +144,11 @@ PostBuild_Cmds=echo Deleting $(targetname) import library and export file (No
CPP=cl.exe
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "PNG_NO_MMX_CODE" /D "WIN32" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /FD /c
+# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG"
+# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
+# ADD RSC /l 0x409 /i "..\.." /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
@@ -237,11 +171,11 @@ LIB32=link.exe -lib
CPP=cl.exe
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "PNG_NO_MMX_CODE" /D PNG_DEBUG=1 /D "_CRT_SECURE_NO_WARNINGS" /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D PNG_DEBUG=1 /FD /GZ /c
# SUBTRACT CPP /YX /Yc /Yu
RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
+# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "_DEBUG"
+# ADD RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
@@ -249,73 +183,15 @@ LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"Win32_LIB_Debug\libpngd.lib"
-!ELSEIF "$(CFG)" == "libpng - Win32 LIB ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "libpng___Win32_LIB_ASM_Release"
-# PROP BASE Intermediate_Dir "libpng___Win32_LIB_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_ASM_Release"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_USE_PNGVCRD" /D "PNG_LIBPNG_SPECIALBUILD" /D "_CRT_SECURE_NO_WARNINGS" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "libpng - Win32 LIB ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "libpng___Win32_LIB_ASM_Debug"
-# PROP BASE Intermediate_Dir "libpng___Win32_LIB_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_ASM_Debug"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D PNG_DEBUG=1 /D "PNG_USE_PNGVCRD" /D "PNG_LIBPNG_SPECIALBUILD" /D "_CRT_SECURE_NO_WARNINGS" /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"Win32_LIB_ASM_Debug\libpngd.lib"
-
-!ENDIF
+!ENDIF
# Begin Target
# Name "libpng - Win32 DLL Release"
# Name "libpng - Win32 DLL Debug"
-# Name "libpng - Win32 DLL ASM Release"
-# Name "libpng - Win32 DLL ASM Debug"
# Name "libpng - Win32 DLL VB"
# Name "libpng - Win32 LIB Release"
# Name "libpng - Win32 LIB Debug"
-# Name "libpng - Win32 LIB ASM Release"
-# Name "libpng - Win32 LIB ASM Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
@@ -365,16 +241,12 @@ SOURCE=..\..\pngtrans.c
# End Source File
# Begin Source File
-SOURCE=..\..\scripts\pngw32.def
+SOURCE=..\..\scripts\pngwin.def
!IF "$(CFG)" == "libpng - Win32 DLL Release"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug"
-!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM Release"
-
-!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM Debug"
-
!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB"
# PROP Exclude_From_Build 1
@@ -387,15 +259,7 @@ SOURCE=..\..\scripts\pngw32.def
# PROP Exclude_From_Build 1
-!ELSEIF "$(CFG)" == "libpng - Win32 LIB ASM Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "libpng - Win32 LIB ASM Debug"
-
-# PROP Exclude_From_Build 1
-
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
@@ -426,22 +290,22 @@ SOURCE=..\..\png.h
SOURCE=..\..\pngconf.h
# End Source File
+# Begin Source File
+
+SOURCE=..\..\pngpriv.h
+# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
-SOURCE=..\..\scripts\pngw32.rc
+SOURCE=..\..\scripts\pngwin.rc
!IF "$(CFG)" == "libpng - Win32 DLL Release"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug"
-!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM Release"
-
-!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM Debug"
-
!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB"
!ELSEIF "$(CFG)" == "libpng - Win32 LIB Release"
@@ -452,15 +316,7 @@ SOURCE=..\..\scripts\pngw32.rc
# PROP Exclude_From_Build 1
-!ELSEIF "$(CFG)" == "libpng - Win32 LIB ASM Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "libpng - Win32 LIB ASM Debug"
-
-# PROP Exclude_From_Build 1
-
-!ENDIF
+!ENDIF
# End Source File
# End Group
diff --git a/src/3rdparty/libpng/projects/visualc6/pngtest.dsp b/src/3rdparty/libpng/projects/visualc6/pngtest.dsp
index 2e5845c958..d3cb0682cb 100644
--- a/src/3rdparty/libpng/projects/visualc6/pngtest.dsp
+++ b/src/3rdparty/libpng/projects/visualc6/pngtest.dsp
@@ -19,12 +19,8 @@ CFG=pngtest - Win32 DLL Release
!MESSAGE
!MESSAGE "pngtest - Win32 DLL Release" (based on "Win32 (x86) Console Application")
!MESSAGE "pngtest - Win32 DLL Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "pngtest - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "pngtest - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application")
!MESSAGE "pngtest - Win32 LIB Release" (based on "Win32 (x86) Console Application")
!MESSAGE "pngtest - Win32 LIB Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "pngtest - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "pngtest - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
@@ -49,7 +45,7 @@ RSC=rc.exe
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
+# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
@@ -58,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
-# ADD LINK32 Win32_DLL_Release\libpng13.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Release\zlib1.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 Win32_DLL_Release\libpng14.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Release\zlib1.lib /nologo /subsystem:console /machine:I386
# Begin Special Build Tool
OutDir=.\Win32_DLL_Release
SOURCE="$(InputPath)"
@@ -81,7 +77,7 @@ PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_Rele
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
@@ -90,7 +86,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 Win32_DLL_Debug\libpng13d.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Debug\zlib1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 Win32_DLL_Debug\libpng14d.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Debug\zlib1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# Begin Special Build Tool
OutDir=.\Win32_DLL_Debug
SOURCE="$(InputPath)"
@@ -98,70 +94,6 @@ PostBuild_Desc=[Run Test]
PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_Debug; $(outdir)\pngtest.exe ..\..\pngtest.png
# End Special Build Tool
-!ELSEIF "$(CFG)" == "pngtest - Win32 DLL ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "pngtest___Win32_DLL_ASM_Release"
-# PROP BASE Intermediate_Dir "pngtest___Win32_DLL_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_ASM_Release"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
-# ADD LINK32 Win32_DLL_ASM_Release\libpng13.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Release\zlib1.lib /nologo /subsystem:console /machine:I386
-# Begin Special Build Tool
-OutDir=.\Win32_DLL_ASM_Release
-SOURCE="$(InputPath)"
-PostBuild_Desc=[Run Test]
-PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Release; $(outdir)\pngtest.exe ..\..\pngtest.png
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "pngtest - Win32 DLL ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "pngtest___Win32_DLL_ASM_Debug"
-# PROP BASE Intermediate_Dir "pngtest___Win32_DLL_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_ASM_Debug"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 Win32_DLL_ASM_Debug\libpng13d.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Debug\zlib1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# Begin Special Build Tool
-OutDir=.\Win32_DLL_ASM_Debug
-SOURCE="$(InputPath)"
-PostBuild_Desc=[Run Test]
-PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Debug; $(outdir)\pngtest.exe ..\..\pngtest.png
-# End Special Build Tool
-
!ELSEIF "$(CFG)" == "pngtest - Win32 LIB Release"
# PROP BASE Use_MFC 0
@@ -226,82 +158,14 @@ PostBuild_Desc=[Run Test]
PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
# End Special Build Tool
-!ELSEIF "$(CFG)" == "pngtest - Win32 LIB ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "pngtest___Win32_LIB_ASM_Release"
-# PROP BASE Intermediate_Dir "pngtest___Win32_LIB_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_ASM_Release"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
-# ADD LINK32 Win32_LIB_ASM_Release\libpng.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_ASM_Release\zlib.lib /nologo /subsystem:console /machine:I386
-# Begin Special Build Tool
-OutDir=.\Win32_LIB_ASM_Release
-SOURCE="$(InputPath)"
-PostBuild_Desc=[Run Test]
-PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "pngtest - Win32 LIB ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "pngtest___Win32_LIB_ASM_Debug"
-# PROP BASE Intermediate_Dir "pngtest___Win32_LIB_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_ASM_Debug"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 Win32_LIB_ASM_Debug\libpngd.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_ASM_Debug\zlibd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# Begin Special Build Tool
-OutDir=.\Win32_LIB_ASM_Debug
-SOURCE="$(InputPath)"
-PostBuild_Desc=[Run Test]
-PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
-# End Special Build Tool
-
!ENDIF
# Begin Target
# Name "pngtest - Win32 DLL Release"
# Name "pngtest - Win32 DLL Debug"
-# Name "pngtest - Win32 DLL ASM Release"
-# Name "pngtest - Win32 DLL ASM Debug"
# Name "pngtest - Win32 LIB Release"
# Name "pngtest - Win32 LIB Debug"
-# Name "pngtest - Win32 LIB ASM Release"
-# Name "pngtest - Win32 LIB ASM Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
diff --git a/src/3rdparty/libpng/projects/visualc71/PRJ0041.mak b/src/3rdparty/libpng/projects/visualc71/PRJ0041.mak
index 3a597b0232..e15e12b55f 100644
--- a/src/3rdparty/libpng/projects/visualc71/PRJ0041.mak
+++ b/src/3rdparty/libpng/projects/visualc71/PRJ0041.mak
@@ -1,5 +1,5 @@
# Prevent "Cannot find missing dependency..." warnings while compiling
-# pngw32.rc (PRJ0041).
+# pngwin.rc (PRJ0041).
all: $(IntDir)\alloc.h \
$(IntDir)\fp.h \
diff --git a/src/3rdparty/libpng/projects/visualc71/README.txt b/src/3rdparty/libpng/projects/visualc71/README.txt
index 7bd63327e3..7d51eed16c 100644
--- a/src/3rdparty/libpng/projects/visualc71/README.txt
+++ b/src/3rdparty/libpng/projects/visualc71/README.txt
@@ -1,6 +1,8 @@
Microsoft Developer Studio Project File, Format Version 7.10 for libpng.
Copyright (C) 2004 Simon-Pierre Cadieux.
+
+This code is released under the libpng license.
For conditions of distribution and use, see copyright notice in png.h
Assumptions:
@@ -32,15 +34,11 @@ To use:
This project builds the libpng binaries as follows:
-* Win32_DLL_Release\libpng13.dll DLL build
-* Win32_DLL_Debug\libpng13d.dll DLL build (debug version)
-* Win32_DLL_ASM_Release\libpng13.dll DLL build using ASM code
-* Win32_DLL_ASM_Debug\libpng13d.dll DLL build using ASM (debug version)
-* Win32_DLL_VB\libpng13vb.dll DLL build for Visual Basic, using stdcall
+* Win32_DLL_Release\libpng14.dll DLL build
+* Win32_DLL_Debug\libpng14d.dll DLL build (debug version)
+* Win32_DLL_VB\libpng14vb.dll DLL build for Visual Basic, using stdcall
* Win32_LIB_Release\libpng.lib static build
* Win32_LIB_Debug\libpngd.lib static build (debug version)
-* Win32_LIB_ASM_Release\libpng.lib static build using ASM code
-* Win32_LIB_ASM_Debug\libpngd.lib static build using ASM (debug version)
Notes:
diff --git a/src/3rdparty/libpng/projects/visualc71/README_zlib.txt b/src/3rdparty/libpng/projects/visualc71/README_zlib.txt
index ff6a5c7cbe..cc7389965a 100644
--- a/src/3rdparty/libpng/projects/visualc71/README_zlib.txt
+++ b/src/3rdparty/libpng/projects/visualc71/README_zlib.txt
@@ -6,6 +6,8 @@ Microsoft Developer Studio Project File, Format Version 7.10 for zlib.
Copyright (C) 2004 Simon-Pierre Cadieux.
Copyright (C) 2004 Cosmin Truta.
+
+This code is released under the libpng license.
For conditions of distribution and use, see copyright notice in zlib.h.
@@ -35,10 +37,6 @@ This project builds the zlib binaries as follows:
* Win32_DLL_Release\zlib1.dll DLL build
* Win32_DLL_Debug\zlib1d.dll DLL build (debug version)
-* Win32_DLL_ASM_Release\zlib1.dll DLL build using ASM code
-* Win32_DLL_ASM_Debug\zlib1d.dll DLL build using ASM code (debug version)
* Win32_LIB_Release\zlib.lib static build
* Win32_LIB_Debug\zlibd.lib static build (debug version)
-* Win32_LIB_ASM_Release\zlib.lib static build using ASM code
-* Win32_LIB_ASM_Debug\zlibd.lib static build using ASM code (debug version)
diff --git a/src/3rdparty/libpng/projects/visualc71/libpng.sln b/src/3rdparty/libpng/projects/visualc71/libpng.sln
deleted file mode 100644
index 7f75b0c6b4..0000000000
--- a/src/3rdparty/libpng/projects/visualc71/libpng.sln
+++ /dev/null
@@ -1,88 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libpng.vcproj", "{0008960E-E0DD-41A6-8265-00B31DDB4C21}"
- ProjectSection(ProjectDependencies) = postProject
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0} = {2D4F8105-7D21-454C-9932-B47CAB71A5C0}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pngtest", "pngtest.vcproj", "{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}"
- ProjectSection(ProjectDependencies) = postProject
- {0008960E-E0DD-41A6-8265-00B31DDB4C21} = {0008960E-E0DD-41A6-8265-00B31DDB4C21}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib.vcproj", "{2D4F8105-7D21-454C-9932-B47CAB71A5C0}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- DLL ASM Debug = DLL ASM Debug
- DLL ASM Release = DLL ASM Release
- DLL Debug = DLL Debug
- DLL Release = DLL Release
- DLL VB = DLL VB
- LIB ASM Debug = LIB ASM Debug
- LIB ASM Release = LIB ASM Release
- LIB Debug = LIB Debug
- LIB Release = LIB Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Debug.ActiveCfg = DLL ASM Debug|Win32
- {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Debug.Build.0 = DLL ASM Debug|Win32
- {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Release.ActiveCfg = DLL ASM Release|Win32
- {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Release.Build.0 = DLL ASM Release|Win32
- {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Debug.ActiveCfg = DLL Debug|Win32
- {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Debug.Build.0 = DLL Debug|Win32
- {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Release.ActiveCfg = DLL Release|Win32
- {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Release.Build.0 = DLL Release|Win32
- {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL VB.ActiveCfg = DLL VB|Win32
- {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL VB.Build.0 = DLL VB|Win32
- {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Debug.ActiveCfg = LIB ASM Debug|Win32
- {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Debug.Build.0 = LIB ASM Debug|Win32
- {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Release.ActiveCfg = LIB ASM Release|Win32
- {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Release.Build.0 = LIB ASM Release|Win32
- {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Debug.ActiveCfg = LIB Debug|Win32
- {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Debug.Build.0 = LIB Debug|Win32
- {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Release.ActiveCfg = LIB Release|Win32
- {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Release.Build.0 = LIB Release|Win32
- {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Debug.ActiveCfg = DLL ASM Debug|Win32
- {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Debug.Build.0 = DLL ASM Debug|Win32
- {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Release.ActiveCfg = DLL ASM Release|Win32
- {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Release.Build.0 = DLL ASM Release|Win32
- {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Debug.ActiveCfg = DLL Debug|Win32
- {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Debug.Build.0 = DLL Debug|Win32
- {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Release.ActiveCfg = DLL Release|Win32
- {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Release.Build.0 = DLL Release|Win32
- {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL VB.ActiveCfg = DLL VB|Win32
- {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL VB.Build.0 = DLL VB|Win32
- {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Debug.ActiveCfg = LIB ASM Debug|Win32
- {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Debug.Build.0 = LIB ASM Debug|Win32
- {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Release.ActiveCfg = LIB ASM Release|Win32
- {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Release.Build.0 = LIB ASM Release|Win32
- {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Debug.ActiveCfg = LIB Debug|Win32
- {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Debug.Build.0 = LIB Debug|Win32
- {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Release.ActiveCfg = LIB Release|Win32
- {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Release.Build.0 = LIB Release|Win32
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Debug.ActiveCfg = DLL ASM Debug|Win32
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Debug.Build.0 = DLL ASM Debug|Win32
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Release.ActiveCfg = DLL ASM Release|Win32
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Release.Build.0 = DLL ASM Release|Win32
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Debug.ActiveCfg = DLL Debug|Win32
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Debug.Build.0 = DLL Debug|Win32
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Release.ActiveCfg = DLL Release|Win32
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Release.Build.0 = DLL Release|Win32
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL VB.ActiveCfg = DLL Release|Win32
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL VB.Build.0 = DLL Release|Win32
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Debug.ActiveCfg = LIB ASM Debug|Win32
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Debug.Build.0 = LIB ASM Debug|Win32
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Release.ActiveCfg = LIB ASM Release|Win32
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Release.Build.0 = LIB ASM Release|Win32
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Debug.ActiveCfg = LIB Debug|Win32
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Debug.Build.0 = LIB Debug|Win32
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Release.ActiveCfg = LIB Release|Win32
- {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Release.Build.0 = LIB Release|Win32
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/src/3rdparty/libpng/projects/visualc71/libpng.vcproj b/src/3rdparty/libpng/projects/visualc71/libpng.vcproj
deleted file mode 100644
index 794e289d86..0000000000
--- a/src/3rdparty/libpng/projects/visualc71/libpng.vcproj
+++ /dev/null
@@ -1,702 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="libpng"
- RootNamespace="libpng">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="DLL Release|Win32"
- OutputDirectory=".\Win32_DLL_Release"
- IntermediateDirectory=".\Win32_DLL_Release"
- ConfigurationType="2">
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..;..\..\..\zlib"
- PreprocessorDefinitions="WIN32;PNG_NO_MMX_CODE;NDEBUG;PNG_BUILD_DLL;ZLIB_DLL;_CRT_SECURE_NO_WARNINGS"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- UsePrecompiledHeader="3"
- PrecompiledHeaderThrough="png.h"
- WarningLevel="3"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/libpng13.dll"
- LinkIncremental="1"
- ModuleDefinitionFile="..\..\scripts\pngw32.def"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG;_CRT_SECURE_NO_WARNINGS"
- Culture="1033"
- AdditionalIncludeDirectories="..\..;..\..\..\zlib;$(IntDir)"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="DLL Debug|Win32"
- OutputDirectory=".\Win32_DLL_Debug"
- IntermediateDirectory=".\Win32_DLL_Debug"
- ConfigurationType="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..;..\..\..\zlib"
- PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;PNG_NO_MMX_CODE;PNG_DEBUG=1;PNG_BUILD_DLL;ZLIB_DLL;_CRT_SECURE_NO_WARNINGS"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="3"
- PrecompiledHeaderThrough="png.h"
- WarningLevel="3"
- DebugInformationFormat="4"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/libpng13d.dll"
- ModuleDefinitionFile="..\..\scripts\pngw32.def"
- GenerateDebugInformation="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG,PNG_DEBUG=1;_CRT_SECURE_NO_WARNINGS"
- Culture="1033"
- AdditionalIncludeDirectories="..\..;..\..\..\zlib;$(IntDir)"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="DLL ASM Release|Win32"
- OutputDirectory=".\Win32_DLL_ASM_Release"
- IntermediateDirectory=".\Win32_DLL_ASM_Release"
- ConfigurationType="2">
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..;..\..\..\zlib"
- PreprocessorDefinitions="WIN32;NDEBUG;PNG_USE_PNGVCRD;PNG_BUILD_DLL;ZLIB_DLL;PNG_LIBPNG_SPECIALBUILD;_CRT_SECURE_NO_WARNINGS"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- UsePrecompiledHeader="3"
- PrecompiledHeaderThrough="png.h"
- WarningLevel="3"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/libpng13.dll"
- LinkIncremental="1"
- ModuleDefinitionFile="..\..\scripts\pngw32.def"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- AdditionalOptions="/d PNG_LIBPNG_SPECIALBUILD=&quot;&quot;&quot;&quot;Use MMX instructions&quot;&quot;&quot;&quot;"
- PreprocessorDefinitions="NDEBUG;_CRT_SECURE_NO_WARNINGS"
- Culture="1033"
- AdditionalIncludeDirectories="..\..;..\..\..\zlib;$(IntDir)"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="DLL ASM Debug|Win32"
- OutputDirectory=".\Win32_DLL_ASM_Debug"
- IntermediateDirectory=".\Win32_DLL_ASM_Debug"
- ConfigurationType="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..;..\..\..\zlib"
- PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;PNG_DEBUG=1;PNG_USE_PNGVCRD;PNG_BUILD_DLL;ZLIB_DLL;PNG_LIBPNG_SPECIALBUILD;_CRT_SECURE_NO_WARNINGS"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="3"
- PrecompiledHeaderThrough="png.h"
- WarningLevel="3"
- DebugInformationFormat="4"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/libpng13d.dll"
- ModuleDefinitionFile="..\..\scripts\pngw32.def"
- GenerateDebugInformation="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- AdditionalOptions="/d PNG_LIBPNG_SPECIALBUILD=&quot;&quot;&quot;&quot;Use MMX instructions&quot;&quot;&quot;&quot;"
- PreprocessorDefinitions="_DEBUG,PNG_DEBUG=1;_CRT_SECURE_NO_WARNINGS"
- Culture="1033"
- AdditionalIncludeDirectories="..\..;..\..\..\zlib;$(IntDir)"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="DLL VB|Win32"
- OutputDirectory=".\Win32_DLL_VB"
- IntermediateDirectory=".\Win32_DLL_VB"
- ConfigurationType="2">
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..;..\..\..\zlib"
- PreprocessorDefinitions="WIN32;NDEBUG;PNG_BUILD_DLL;ZLIB_DLL;PNGAPI=__stdcall;PNG_NO_MMX_CODE;PNG_NO_MODULEDEF;PNG_LIBPNG_SPECIALBUILD;_CRT_SECURE_NO_WARNINGS"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- UsePrecompiledHeader="3"
- PrecompiledHeaderThrough="png.h"
- WarningLevel="3"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/libpng13vb.dll"
- LinkIncremental="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- AdditionalOptions="/d PNG_LIBPNG_DLLFNAME_POSTFIX=&quot;&quot;&quot;&quot;VB&quot;&quot;&quot;&quot; /d PNG_LIBPNG_SPECIALBUILD=&quot;&quot;&quot;&quot;__stdcall calling convention used for exported functions&quot;&quot;&quot;&quot;"
- PreprocessorDefinitions="NDEBUG;_CRT_SECURE_NO_WARNINGS"
- Culture="1033"
- AdditionalIncludeDirectories="..\..;..\..\..\zlib;$(IntDir)"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="LIB Release|Win32"
- OutputDirectory=".\Win32_LIB_Release"
- IntermediateDirectory=".\Win32_LIB_Release"
- ConfigurationType="4">
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..;..\..\..\zlib"
- PreprocessorDefinitions="PNG_NO_MMX_CODE;WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- UsePrecompiledHeader="3"
- PrecompiledHeaderThrough="png.h"
- WarningLevel="3"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)/libpng.lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="LIB Debug|Win32"
- OutputDirectory=".\Win32_LIB_Debug"
- IntermediateDirectory=".\Win32_LIB_Debug"
- ConfigurationType="4">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..;..\..\..\zlib"
- PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;PNG_NO_MMX_CODE;PNG_DEBUG=1;_CRT_SECURE_NO_WARNINGS"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="3"
- PrecompiledHeaderThrough="png.h"
- WarningLevel="3"
- DebugInformationFormat="4"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)/libpngd.lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="LIB ASM Release|Win32"
- OutputDirectory=".\Win32_LIB_ASM_Release"
- IntermediateDirectory=".\Win32_LIB_ASM_Release"
- ConfigurationType="4">
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..,..\..\..\zlib"
- PreprocessorDefinitions="WIN32;NDEBUG;PNG_USE_PNGVCRD;PNG_LIBPNG_SPECIALBUILD;_CRT_SECURE_NO_WARNINGS"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- UsePrecompiledHeader="3"
- PrecompiledHeaderThrough="png.h"
- WarningLevel="3"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)/libpng.lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="LIB ASM Debug|Win32"
- OutputDirectory=".\Win32_LIB_ASM_Debug"
- IntermediateDirectory=".\Win32_LIB_ASM_Debug"
- ConfigurationType="4">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..,..\..\..\zlib"
- PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;PNG_DEBUG=1;PNG_USE_PNGVCRD;PNG_LIBPNG_SPECIALBUILD;_CRT_SECURE_NO_WARNINGS"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="3"
- PrecompiledHeaderThrough="png.h"
- WarningLevel="3"
- DebugInformationFormat="4"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)/libpngd.lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
- <File
- RelativePath="..\..\png.c">
- <FileConfiguration
- Name="DLL Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL ASM Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL ASM Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL VB|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB ASM Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB ASM Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\pngerror.c">
- <FileConfiguration
- Name="DLL Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL ASM Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL ASM Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL VB|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB ASM Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB ASM Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\pngget.c">
- </File>
- <File
- RelativePath="..\..\pngmem.c">
- </File>
- <File
- RelativePath="..\..\pngpread.c">
- </File>
- <File
- RelativePath="..\..\pngread.c">
- </File>
- <File
- RelativePath="..\..\pngrio.c">
- </File>
- <File
- RelativePath="..\..\pngrtran.c">
- </File>
- <File
- RelativePath="..\..\pngrutil.c">
- </File>
- <File
- RelativePath="..\..\pngset.c">
- </File>
- <File
- RelativePath="..\..\pngtrans.c">
- </File>
- <File
- RelativePath="..\..\scripts\pngw32.def">
- <FileConfiguration
- Name="DLL VB|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCustomBuildTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB Release|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCustomBuildTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB Debug|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCustomBuildTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB ASM Release|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCustomBuildTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB ASM Debug|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCustomBuildTool"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\pngwio.c">
- </File>
- <File
- RelativePath="..\..\pngwrite.c">
- </File>
- <File
- RelativePath="..\..\pngwtran.c">
- </File>
- <File
- RelativePath="..\..\pngwutil.c">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl">
- <File
- RelativePath="..\..\png.h">
- </File>
- <File
- RelativePath="..\..\pngconf.h">
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
- <File
- RelativePath="..\..\scripts\pngw32.rc">
- <FileConfiguration
- Name="LIB Release|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCResourceCompilerTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB Debug|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCResourceCompilerTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB ASM Release|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCResourceCompilerTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB ASM Debug|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCResourceCompilerTool"/>
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\PRJ0041.mak">
- <FileConfiguration
- Name="DLL Release|Win32">
- <Tool
- Name="VCCustomBuildTool"
- Description="Create dummy include files to prevent &quot;Cannot find missing dependency...&quot; warnings."
- CommandLine="nmake -f PRJ0041.mak IntDir=$(IntDir)"
- Outputs="$(IntDir)\alloc.h;$(IntDir)\fp.h;$(IntDir)\m68881.h;$(IntDir)\mem.h;$(IntDir)\pngusr.h;$(IntDir)\strings.h;$(IntDir)\unistd.h;$(IntDir)\unixio.h"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL Debug|Win32">
- <Tool
- Name="VCCustomBuildTool"
- Description="Create dummy include files to prevent &quot;Cannot find missing dependency...&quot; warnings."
- CommandLine="nmake -f PRJ0041.mak IntDir=$(IntDir)"
- Outputs="$(IntDir)\alloc.h;$(IntDir)\fp.h;$(IntDir)\m68881.h;$(IntDir)\mem.h;$(IntDir)\pngusr.h;$(IntDir)\strings.h;$(IntDir)\unistd.h;$(IntDir)\unixio.h"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL ASM Release|Win32">
- <Tool
- Name="VCCustomBuildTool"
- Description="Create dummy include files to prevent &quot;Cannot find missing dependency...&quot; warnings."
- CommandLine="nmake -f PRJ0041.mak IntDir=$(IntDir)"
- Outputs="$(IntDir)\alloc.h;$(IntDir)\fp.h;$(IntDir)\m68881.h;$(IntDir)\mem.h;$(IntDir)\pngusr.h;$(IntDir)\strings.h;$(IntDir)\unistd.h;$(IntDir)\unixio.h"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL ASM Debug|Win32">
- <Tool
- Name="VCCustomBuildTool"
- Description="Create dummy include files to prevent &quot;Cannot find missing dependency...&quot; warnings."
- CommandLine="nmake -f PRJ0041.mak IntDir=$(IntDir)"
- Outputs="$(IntDir)\alloc.h;$(IntDir)\fp.h;$(IntDir)\m68881.h;$(IntDir)\mem.h;$(IntDir)\pngusr.h;$(IntDir)\strings.h;$(IntDir)\unistd.h;$(IntDir)\unixio.h"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL VB|Win32">
- <Tool
- Name="VCCustomBuildTool"
- Description="Create dummy include files to prevent &quot;Cannot find missing dependency...&quot; warnings."
- CommandLine="nmake -f PRJ0041.mak IntDir=$(IntDir)"
- Outputs="$(IntDir)\alloc.h;$(IntDir)\fp.h;$(IntDir)\m68881.h;$(IntDir)\mem.h;$(IntDir)\pngusr.h;$(IntDir)\strings.h;$(IntDir)\unistd.h;$(IntDir)\unixio.h"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="README.txt">
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/src/3rdparty/libpng/projects/visualc71/pngtest.vcproj b/src/3rdparty/libpng/projects/visualc71/pngtest.vcproj
deleted file mode 100644
index 210566c5a1..0000000000
--- a/src/3rdparty/libpng/projects/visualc71/pngtest.vcproj
+++ /dev/null
@@ -1,459 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="pngtest"
- RootNamespace="pngtest">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="DLL Release|Win32"
- OutputDirectory=".\Win32_DLL_Release\Test"
- IntermediateDirectory=".\Win32_DLL_Release\Test"
- ConfigurationType="1">
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\zlib"
- PreprocessorDefinitions="WIN32;NDEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- WarningLevel="3"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"
- Description="Testing..."
- CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
-$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
- Outputs="$(IntDir)\pngout.png"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/pngtest.exe"
- LinkIncremental="1"
- SubSystem="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="DLL Debug|Win32"
- OutputDirectory=".\Win32_DLL_Debug\Test"
- IntermediateDirectory=".\Win32_DLL_Debug\Test"
- ConfigurationType="1">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\zlib"
- PreprocessorDefinitions="WIN32;_DEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- WarningLevel="3"
- DebugInformationFormat="4"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"
- Description="Testing..."
- CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
-$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
- Outputs="$(IntDir)\pngout.png"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/pngtest.exe"
- GenerateDebugInformation="TRUE"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="DLL ASM Release|Win32"
- OutputDirectory=".\Win32_DLL_ASM_Release\Test"
- IntermediateDirectory=".\Win32_DLL_ASM_Release\Test"
- ConfigurationType="1">
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\zlib"
- PreprocessorDefinitions="WIN32;NDEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- WarningLevel="3"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"
- Description="Testing..."
- CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
-$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
- Outputs="$(IntDir)\pngout.png"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/pngtest.exe"
- LinkIncremental="1"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="DLL ASM Debug|Win32"
- OutputDirectory=".\Win32_DLL_ASM_Debug\Test"
- IntermediateDirectory=".\Win32_DLL_ASM_Debug\Test"
- ConfigurationType="1">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\zlib"
- PreprocessorDefinitions="WIN32;_DEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- WarningLevel="3"
- DebugInformationFormat="4"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"
- Description="Testing..."
- CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
-$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
- Outputs="$(IntDir)\pngout.png"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/pngtest.exe"
- GenerateDebugInformation="TRUE"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="DLL VB|Win32"
- OutputDirectory=".\Win32_DLL_VB\Test"
- IntermediateDirectory=".\Win32_DLL_VB\Test"
- ConfigurationType="1">
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\zlib"
- PreprocessorDefinitions="WIN32;NDEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS;PNGAPI=__stdcall"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- WarningLevel="2"
- CallingConvention="2"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"
- Description="Testing..."
- CommandLine="set path=$(OutDir)\..;$(OutDir)\..\..\Win32_DLL_Release\ZLib
-$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
- Outputs="$(IntDir)\pngout.png"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/pngtest.exe"
- LinkIncremental="1"
- IgnoreDefaultLibraryNames="$(IntDir)\libpng13vb.lib"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="LIB Release|Win32"
- OutputDirectory=".\Win32_LIB_Release\Test"
- IntermediateDirectory=".\Win32_LIB_Release\Test"
- ConfigurationType="1">
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\zlib"
- PreprocessorDefinitions="WIN32;_DEBUG;PNG_NO_GLOBAL_ARRAYS"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- WarningLevel="3"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"
- Description="Testing..."
- CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
-$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
- Outputs="$(IntDir)\pngout.png"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/pngtest.exe"
- LinkIncremental="1"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="LIB Debug|Win32"
- OutputDirectory=".\Win32_LIB_Debug\Test"
- IntermediateDirectory=".\Win32_LIB_Debug\Test"
- ConfigurationType="1">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\zlib"
- PreprocessorDefinitions="WIN32;_DEBUG;PNG_NO_GLOBAL_ARRAYS"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- WarningLevel="3"
- DebugInformationFormat="4"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"
- Description="Testing..."
- CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
-$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
- Outputs="$(IntDir)\pngout.png"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/pngtest.exe"
- GenerateDebugInformation="TRUE"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="LIB ASM Release|Win32"
- OutputDirectory=".\Win32_LIB_ASM_Release\Test"
- IntermediateDirectory=".\Win32_LIB_ASM_Release\Test"
- ConfigurationType="1">
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\zlib"
- PreprocessorDefinitions="WIN32;NDEBUG;PNG_NO_GLOBAL_ARRAYS"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- WarningLevel="3"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"
- Description="Testing..."
- CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
-$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
- Outputs="$(IntDir)\pngout.png"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/pngtest.exe"
- LinkIncremental="1"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="LIB ASM Debug|Win32"
- OutputDirectory=".\Win32_LIB_ASM_Debug\Test"
- IntermediateDirectory=".\Win32_LIB_ASM_Debug\Test"
- ConfigurationType="1">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\zlib"
- PreprocessorDefinitions="WIN32;_DEBUG;PNG_NO_GLOBAL_ARRAYS"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- WarningLevel="3"
- DebugInformationFormat="4"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"
- Description="Testing..."
- CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
-$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
- Outputs="$(IntDir)\pngout.png"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/pngtest.exe"
- GenerateDebugInformation="TRUE"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
- <File
- RelativePath="..\..\pngtest.c">
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/src/3rdparty/libpng/projects/visualc71/zlib.vcproj b/src/3rdparty/libpng/projects/visualc71/zlib.vcproj
deleted file mode 100644
index bc0a2bf332..0000000000
--- a/src/3rdparty/libpng/projects/visualc71/zlib.vcproj
+++ /dev/null
@@ -1,670 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="zlib">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="DLL Release|Win32"
- OutputDirectory=".\Win32_DLL_Release\ZLib"
- IntermediateDirectory=".\Win32_DLL_Release\ZLib"
- ConfigurationType="2">
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\zlib"
- PreprocessorDefinitions="WIN32;NDEBUG"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- WarningLevel="3"
- CompileAs="1"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\zlib1.dll"
- LinkIncremental="1"
- ModuleDefinitionFile="..\..\..\zlib\win32\zlib.def"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="DLL Debug|Win32"
- OutputDirectory=".\Win32_DLL_Debug\ZLib"
- IntermediateDirectory=".\Win32_DLL_Debug\ZLib"
- ConfigurationType="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\zlib"
- PreprocessorDefinitions="WIN32;_DEBUG"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- WarningLevel="3"
- DebugInformationFormat="4"
- CompileAs="1"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\zlib1d.dll"
- ModuleDefinitionFile="..\..\..\zlib\win32\zlib.def"
- GenerateDebugInformation="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="DLL ASM Release|Win32"
- OutputDirectory=".\Win32_DLL_ASM_Release\ZLib"
- IntermediateDirectory=".\Win32_DLL_ASM_Release\ZLib"
- ConfigurationType="2">
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\zlib"
- PreprocessorDefinitions="WIN32;NDEBUG;ASMV;ASMINF"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- WarningLevel="3"
- CompileAs="1"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\zlib1.dll"
- LinkIncremental="1"
- ModuleDefinitionFile="..\..\..\zlib\win32\zlib.def"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="DLL ASM Debug|Win32"
- OutputDirectory=".\Win32_DLL_ASM_Debug\ZLib"
- IntermediateDirectory=".\Win32_DLL_ASM_Debug\ZLib"
- ConfigurationType="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\zlib"
- PreprocessorDefinitions="WIN32;_DEBUG;ASMV;ASMINF"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- WarningLevel="3"
- DebugInformationFormat="4"
- CompileAs="1"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\zlib1d.dll"
- ModuleDefinitionFile="..\..\..\zlib\win32\zlib.def"
- GenerateDebugInformation="TRUE"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="LIB Release|Win32"
- OutputDirectory=".\Win32_LIB_Release\ZLib"
- IntermediateDirectory=".\Win32_LIB_Release\ZLib"
- ConfigurationType="4">
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\zlib"
- PreprocessorDefinitions="WIN32;NDEBUG"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- WarningLevel="3"
- CompileAs="1"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\zlib.lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="LIB Debug|Win32"
- OutputDirectory=".\Win32_LIB_Debug\ZLib"
- IntermediateDirectory=".\Win32_LIB_Debug\ZLib"
- ConfigurationType="4">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\zlib"
- PreprocessorDefinitions="WIN32;_DEBUG"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- WarningLevel="3"
- DebugInformationFormat="4"
- CompileAs="1"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\zlibd.lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="LIB ASM Release|Win32"
- OutputDirectory=".\Win32_LIB_ASM_Release\ZLib"
- IntermediateDirectory=".\Win32_LIB_ASM_Release\ZLib"
- ConfigurationType="4">
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\zlib"
- PreprocessorDefinitions="WIN32;NDEBUG;ASMV;ASMINF"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- WarningLevel="3"
- CompileAs="1"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\zlib.lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="LIB ASM Debug|Win32"
- OutputDirectory=".\Win32_LIB_ASM_Debug\ZLib"
- IntermediateDirectory=".\Win32_LIB_ASM_Debug\ZLib"
- ConfigurationType="4">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\zlib"
- PreprocessorDefinitions="WIN32;_DEBUG;ASMV;ASMINF"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- WarningLevel="3"
- DebugInformationFormat="4"
- CompileAs="1"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLibrarianTool"
- OutputFile="$(OutDir)\zlibd.lib"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
- <File
- RelativePath="..\..\..\zlib\adler32.c">
- </File>
- <File
- RelativePath="..\..\..\zlib\compress.c">
- </File>
- <File
- RelativePath="..\..\..\zlib\crc32.c">
- </File>
- <File
- RelativePath="..\..\..\zlib\deflate.c">
- </File>
- <File
- RelativePath="..\..\..\zlib\gzio.c">
- </File>
- <File
- RelativePath="..\..\..\zlib\infback.c">
- </File>
- <File
- RelativePath="..\..\..\zlib\inffast.c">
- </File>
- <File
- RelativePath="..\..\..\zlib\inflate.c">
- </File>
- <File
- RelativePath="..\..\..\zlib\inftrees.c">
- </File>
- <File
- RelativePath="..\..\..\zlib\trees.c">
- </File>
- <File
- RelativePath="..\..\..\zlib\uncompr.c">
- </File>
- <File
- RelativePath="..\..\..\zlib\win32\zlib.def">
- <FileConfiguration
- Name="LIB Release|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCustomBuildTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB Debug|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCustomBuildTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB ASM Release|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCustomBuildTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB ASM Debug|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCustomBuildTool"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\zlib\zutil.c">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl">
- <File
- RelativePath="..\..\..\zlib\crc32.h">
- </File>
- <File
- RelativePath="..\..\..\zlib\deflate.h">
- </File>
- <File
- RelativePath="..\..\..\zlib\inffast.h">
- </File>
- <File
- RelativePath="..\..\..\zlib\inffixed.h">
- </File>
- <File
- RelativePath="..\..\..\zlib\inflate.h">
- </File>
- <File
- RelativePath="..\..\..\zlib\inftrees.h">
- </File>
- <File
- RelativePath="..\..\..\zlib\trees.h">
- </File>
- <File
- RelativePath="..\..\..\zlib\zconf.h">
- </File>
- <File
- RelativePath="..\..\..\zlib\zlib.h">
- </File>
- <File
- RelativePath="..\..\..\zlib\zutil.h">
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
- <File
- RelativePath="..\..\..\zlib\win32\zlib1.rc">
- <FileConfiguration
- Name="LIB Release|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCResourceCompilerTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB Debug|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCResourceCompilerTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB ASM Release|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCResourceCompilerTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB ASM Debug|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCResourceCompilerTool"/>
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Assembler Files (Unsupported)"
- Filter="asm;obj;c;cpp;cxx;h;hpp;hxx">
- <File
- RelativePath="..\..\..\zlib\contrib\masmx86\gvmat32.asm">
- <FileConfiguration
- Name="DLL Release|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCustomBuildTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL Debug|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCustomBuildTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL ASM Release|Win32">
- <Tool
- Name="VCCustomBuildTool"
- Description="Assembling..."
- CommandLine="ml /nologo /c /Cx /coff /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
-"
- Outputs="$(IntDir)\$(InputName).obj"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL ASM Debug|Win32">
- <Tool
- Name="VCCustomBuildTool"
- Description="Assembling..."
- CommandLine="ml /nologo /c /Cx /coff /Zi /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
-"
- Outputs="$(IntDir)\$(InputName).obj"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB Release|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCustomBuildTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB Debug|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCustomBuildTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB ASM Release|Win32">
- <Tool
- Name="VCCustomBuildTool"
- Description="Assembling..."
- CommandLine="ml /nologo /c /Cx /coff /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
-"
- Outputs="$(IntDir)\$(InputName).obj"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB ASM Debug|Win32">
- <Tool
- Name="VCCustomBuildTool"
- Description="Assembling..."
- CommandLine="ml /nologo /c /Cx /coff /Zi /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
-"
- Outputs="$(IntDir)\$(InputName).obj"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\zlib\contrib\masmx86\gvmat32c.c">
- <FileConfiguration
- Name="DLL Release|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCLCompilerTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL Debug|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCLCompilerTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL ASM Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\.."/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL ASM Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\.."/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB Release|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCLCompilerTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB Debug|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCLCompilerTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB ASM Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\.."/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB ASM Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\.."/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\zlib\contrib\masmx86\inffas32.asm">
- <FileConfiguration
- Name="DLL Release|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCustomBuildTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL Debug|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCustomBuildTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL ASM Release|Win32">
- <Tool
- Name="VCCustomBuildTool"
- Description="Assembling..."
- CommandLine="ml /nologo /c /Cx /coff /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
-"
- Outputs="$(IntDir)\$(InputName).obj"/>
- </FileConfiguration>
- <FileConfiguration
- Name="DLL ASM Debug|Win32">
- <Tool
- Name="VCCustomBuildTool"
- Description="Assembling..."
- CommandLine="ml /nologo /c /Cx /coff /Zi /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
-"
- Outputs="$(IntDir)\$(InputName).obj"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB Release|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCustomBuildTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB Debug|Win32"
- ExcludedFromBuild="TRUE">
- <Tool
- Name="VCCustomBuildTool"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB ASM Release|Win32">
- <Tool
- Name="VCCustomBuildTool"
- Description="Assembling..."
- CommandLine="ml /nologo /c /Cx /coff /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
-"
- Outputs="$(IntDir)\$(InputName).obj"/>
- </FileConfiguration>
- <FileConfiguration
- Name="LIB ASM Debug|Win32">
- <Tool
- Name="VCCustomBuildTool"
- Description="Assembling..."
- CommandLine="ml /nologo /c /Cx /coff /Zi /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
-"
- Outputs="$(IntDir)\$(InputName).obj"/>
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath="README.txt">
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/src/3rdparty/libpng/projects/wince.txt b/src/3rdparty/libpng/projects/wince.txt
deleted file mode 100644
index a1a26c0bc6..0000000000
--- a/src/3rdparty/libpng/projects/wince.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-A set of project files is available for WinCE. Get
-libpng-1.2.5-project-wince.zip from a libpng distribution
-site such as http://libpng.sourceforge.net
-
-Put the zip file in this directory (projects) and then run
-"unzip -a libpng-1.2.5-project-wince.zip"
diff --git a/src/3rdparty/libpng/projects/xcode/Info.plist b/src/3rdparty/libpng/projects/xcode/Info.plist
new file mode 100644
index 0000000000..0b525dffff
--- /dev/null
+++ b/src/3rdparty/libpng/projects/xcode/Info.plist
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>libpng</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.apple.carbonframeworktemplate</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CSResourcesFileMapped</key>
+ <true/>
+</dict>
+</plist>
diff --git a/src/3rdparty/libpng/projects/xcode/README.txt b/src/3rdparty/libpng/projects/xcode/README.txt
new file mode 100644
index 0000000000..440149d67c
--- /dev/null
+++ b/src/3rdparty/libpng/projects/xcode/README.txt
@@ -0,0 +1,9 @@
+The xcode project has not been entirely updated to libpng-1.4.0.
+
+It needs to *not* depend on pnggccrd.c or pngvcrd.c
+
+It needs to PNG_NO_PEDANTIC_WARNINGS in the CFLAGS while building
+the library, but not while building an application.
+
+If an updated version is not received, this project will
+be removed when libpng-1.4.0 is released.
diff --git a/src/3rdparty/libpng/projects/xcode/libpng.xcodeproj/.gitignore b/src/3rdparty/libpng/projects/xcode/libpng.xcodeproj/.gitignore
new file mode 100644
index 0000000000..0a2b14bae9
--- /dev/null
+++ b/src/3rdparty/libpng/projects/xcode/libpng.xcodeproj/.gitignore
@@ -0,0 +1,2 @@
+*.mode1*
+*.pbxuser
diff --git a/src/3rdparty/libpng/projects/xcode/libpng.xcodeproj/project.pbxproj b/src/3rdparty/libpng/projects/xcode/libpng.xcodeproj/project.pbxproj
new file mode 100644
index 0000000000..1171a39a8c
--- /dev/null
+++ b/src/3rdparty/libpng/projects/xcode/libpng.xcodeproj/project.pbxproj
@@ -0,0 +1,353 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 44;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 14461C7109C3C37F005840C0 /* png.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C5D09C3C37F005840C0 /* png.c */; };
+ 14461C7209C3C37F005840C0 /* png.h in Headers */ = {isa = PBXBuildFile; fileRef = 14461C5E09C3C37F005840C0 /* png.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 14461C7309C3C37F005840C0 /* pngconf.h in Headers */ = {isa = PBXBuildFile; fileRef = 14461C5F09C3C37F005840C0 /* pngconf.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 14461C7409C3C37F005840C0 /* pngerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6009C3C37F005840C0 /* pngerror.c */; };
+ 14461C7509C3C37F005840C0 /* pnggccrd.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6109C3C37F005840C0 /* pnggccrd.c */; };
+ 14461C7609C3C37F005840C0 /* pngget.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6209C3C37F005840C0 /* pngget.c */; };
+ 14461C7709C3C37F005840C0 /* pngmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6309C3C37F005840C0 /* pngmem.c */; };
+ 14461C7809C3C37F005840C0 /* pngpread.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6409C3C37F005840C0 /* pngpread.c */; };
+ 14461C7909C3C37F005840C0 /* pngread.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6509C3C37F005840C0 /* pngread.c */; };
+ 14461C7A09C3C37F005840C0 /* pngrio.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6609C3C37F005840C0 /* pngrio.c */; };
+ 14461C7B09C3C37F005840C0 /* pngrtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6709C3C37F005840C0 /* pngrtran.c */; };
+ 14461C7C09C3C37F005840C0 /* pngrutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6809C3C37F005840C0 /* pngrutil.c */; };
+ 14461C7D09C3C37F005840C0 /* pngset.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6909C3C37F005840C0 /* pngset.c */; };
+ 14461C7F09C3C37F005840C0 /* pngtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6B09C3C37F005840C0 /* pngtrans.c */; };
+ 14461C8009C3C37F005840C0 /* pngvcrd.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6C09C3C37F005840C0 /* pngvcrd.c */; };
+ 14461C8109C3C37F005840C0 /* pngwio.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6D09C3C37F005840C0 /* pngwio.c */; };
+ 14461C8209C3C37F005840C0 /* pngwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6E09C3C37F005840C0 /* pngwrite.c */; };
+ 14461C8309C3C37F005840C0 /* pngwtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6F09C3C37F005840C0 /* pngwtran.c */; };
+ 14461C8409C3C37F005840C0 /* pngwutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C7009C3C37F005840C0 /* pngwutil.c */; };
+ 67FA470510693F6B0078FB9E /* pngpriv.h in Headers */ = {isa = PBXBuildFile; fileRef = 67FA470410693F6B0078FB9E /* pngpriv.h */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 14461C5D09C3C37F005840C0 /* png.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = png.c; path = ../../png.c; sourceTree = SOURCE_ROOT; };
+ 14461C5E09C3C37F005840C0 /* png.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = png.h; path = ../../png.h; sourceTree = SOURCE_ROOT; };
+ 14461C5F09C3C37F005840C0 /* pngconf.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = pngconf.h; path = ../../pngconf.h; sourceTree = SOURCE_ROOT; };
+ 14461C6009C3C37F005840C0 /* pngerror.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngerror.c; path = ../../pngerror.c; sourceTree = SOURCE_ROOT; };
+ 14461C6109C3C37F005840C0 /* pnggccrd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pnggccrd.c; path = ../../pnggccrd.c; sourceTree = SOURCE_ROOT; };
+ 14461C6209C3C37F005840C0 /* pngget.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngget.c; path = ../../pngget.c; sourceTree = SOURCE_ROOT; };
+ 14461C6309C3C37F005840C0 /* pngmem.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngmem.c; path = ../../pngmem.c; sourceTree = SOURCE_ROOT; };
+ 14461C6409C3C37F005840C0 /* pngpread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngpread.c; path = ../../pngpread.c; sourceTree = SOURCE_ROOT; };
+ 14461C6509C3C37F005840C0 /* pngread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngread.c; path = ../../pngread.c; sourceTree = SOURCE_ROOT; };
+ 14461C6609C3C37F005840C0 /* pngrio.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngrio.c; path = ../../pngrio.c; sourceTree = SOURCE_ROOT; };
+ 14461C6709C3C37F005840C0 /* pngrtran.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngrtran.c; path = ../../pngrtran.c; sourceTree = SOURCE_ROOT; };
+ 14461C6809C3C37F005840C0 /* pngrutil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngrutil.c; path = ../../pngrutil.c; sourceTree = SOURCE_ROOT; };
+ 14461C6909C3C37F005840C0 /* pngset.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngset.c; path = ../../pngset.c; sourceTree = SOURCE_ROOT; };
+ 14461C6B09C3C37F005840C0 /* pngtrans.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngtrans.c; path = ../../pngtrans.c; sourceTree = SOURCE_ROOT; };
+ 14461C6C09C3C37F005840C0 /* pngvcrd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngvcrd.c; path = ../../pngvcrd.c; sourceTree = SOURCE_ROOT; };
+ 14461C6D09C3C37F005840C0 /* pngwio.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwio.c; path = ../../pngwio.c; sourceTree = SOURCE_ROOT; };
+ 14461C6E09C3C37F005840C0 /* pngwrite.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwrite.c; path = ../../pngwrite.c; sourceTree = SOURCE_ROOT; };
+ 14461C6F09C3C37F005840C0 /* pngwtran.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwtran.c; path = ../../pngwtran.c; sourceTree = SOURCE_ROOT; };
+ 14461C7009C3C37F005840C0 /* pngwutil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwutil.c; path = ../../pngwutil.c; sourceTree = SOURCE_ROOT; };
+ 67FA470410693F6B0078FB9E /* pngpriv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pngpriv.h; path = ../../pngpriv.h; sourceTree = SOURCE_ROOT; };
+ 8D07F2C70486CC7A007CD1D0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
+ 8D07F2C80486CC7A007CD1D0 /* libpng.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = libpng.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8D07F2C30486CC7A007CD1D0 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 034768DDFF38A45A11DB9C8B /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8D07F2C80486CC7A007CD1D0 /* libpng.framework */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 0867D691FE84028FC02AAC07 /* libpng */ = {
+ isa = PBXGroup;
+ children = (
+ 08FB77ACFE841707C02AAC07 /* Source */,
+ 089C1665FE841158C02AAC07 /* Resources */,
+ 034768DDFF38A45A11DB9C8B /* Products */,
+ );
+ name = libpng;
+ sourceTree = "<group>";
+ };
+ 089C1665FE841158C02AAC07 /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 8D07F2C70486CC7A007CD1D0 /* Info.plist */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 08FB77ACFE841707C02AAC07 /* Source */ = {
+ isa = PBXGroup;
+ children = (
+ 67FA470410693F6B0078FB9E /* pngpriv.h */,
+ 14461C5D09C3C37F005840C0 /* png.c */,
+ 14461C5E09C3C37F005840C0 /* png.h */,
+ 14461C5F09C3C37F005840C0 /* pngconf.h */,
+ 14461C6009C3C37F005840C0 /* pngerror.c */,
+ 14461C6109C3C37F005840C0 /* pnggccrd.c */,
+ 14461C6209C3C37F005840C0 /* pngget.c */,
+ 14461C6309C3C37F005840C0 /* pngmem.c */,
+ 14461C6409C3C37F005840C0 /* pngpread.c */,
+ 14461C6509C3C37F005840C0 /* pngread.c */,
+ 14461C6609C3C37F005840C0 /* pngrio.c */,
+ 14461C6709C3C37F005840C0 /* pngrtran.c */,
+ 14461C6809C3C37F005840C0 /* pngrutil.c */,
+ 14461C6909C3C37F005840C0 /* pngset.c */,
+ 14461C6B09C3C37F005840C0 /* pngtrans.c */,
+ 14461C6C09C3C37F005840C0 /* pngvcrd.c */,
+ 14461C6D09C3C37F005840C0 /* pngwio.c */,
+ 14461C6E09C3C37F005840C0 /* pngwrite.c */,
+ 14461C6F09C3C37F005840C0 /* pngwtran.c */,
+ 14461C7009C3C37F005840C0 /* pngwutil.c */,
+ );
+ name = Source;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ 8D07F2BD0486CC7A007CD1D0 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 14461C7209C3C37F005840C0 /* png.h in Headers */,
+ 14461C7309C3C37F005840C0 /* pngconf.h in Headers */,
+ 67FA470510693F6B0078FB9E /* pngpriv.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ 8D07F2BC0486CC7A007CD1D0 /* libpng */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "libpng" */;
+ buildPhases = (
+ 8D07F2BD0486CC7A007CD1D0 /* Headers */,
+ 8D07F2BF0486CC7A007CD1D0 /* Resources */,
+ 8D07F2C10486CC7A007CD1D0 /* Sources */,
+ 8D07F2C30486CC7A007CD1D0 /* Frameworks */,
+ 8D07F2C50486CC7A007CD1D0 /* Rez */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = libpng;
+ productInstallPath = "$(HOME)/Library/Frameworks";
+ productName = libpng;
+ productReference = 8D07F2C80486CC7A007CD1D0 /* libpng.framework */;
+ productType = "com.apple.product-type.framework";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 0867D690FE84028FC02AAC07 /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = 4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "libpng" */;
+ compatibilityVersion = "Xcode 2.4";
+ hasScannedForEncodings = 1;
+ mainGroup = 0867D691FE84028FC02AAC07 /* libpng */;
+ productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */;
+ projectDirPath = "";
+ projectRoot = ../..;
+ targets = (
+ 8D07F2BC0486CC7A007CD1D0 /* libpng */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8D07F2BF0486CC7A007CD1D0 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXRezBuildPhase section */
+ 8D07F2C50486CC7A007CD1D0 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXRezBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8D07F2C10486CC7A007CD1D0 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 14461C7109C3C37F005840C0 /* png.c in Sources */,
+ 14461C7409C3C37F005840C0 /* pngerror.c in Sources */,
+ 14461C7509C3C37F005840C0 /* pnggccrd.c in Sources */,
+ 14461C7609C3C37F005840C0 /* pngget.c in Sources */,
+ 14461C7709C3C37F005840C0 /* pngmem.c in Sources */,
+ 14461C7809C3C37F005840C0 /* pngpread.c in Sources */,
+ 14461C7909C3C37F005840C0 /* pngread.c in Sources */,
+ 14461C7A09C3C37F005840C0 /* pngrio.c in Sources */,
+ 14461C7B09C3C37F005840C0 /* pngrtran.c in Sources */,
+ 14461C7C09C3C37F005840C0 /* pngrutil.c in Sources */,
+ 14461C7D09C3C37F005840C0 /* pngset.c in Sources */,
+ 14461C7F09C3C37F005840C0 /* pngtrans.c in Sources */,
+ 14461C8009C3C37F005840C0 /* pngvcrd.c in Sources */,
+ 14461C8109C3C37F005840C0 /* pngwio.c in Sources */,
+ 14461C8209C3C37F005840C0 /* pngwrite.c in Sources */,
+ 14461C8309C3C37F005840C0 /* pngwtran.c in Sources */,
+ 14461C8409C3C37F005840C0 /* pngwutil.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 4FADC24308B4156D00ABE55E /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DYLIB_COMPATIBILITY_VERSION = 14;
+ DYLIB_CURRENT_VERSION = 14;
+ FRAMEWORK_VERSION = 1.4.0;
+ GCC_PRECOMPILE_PREFIX_HEADER = NO;
+ GCC_PREFIX_HEADER = "";
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "@executable_path/../Frameworks";
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ OTHER_LDFLAGS = "-lz";
+ PRODUCT_NAME = libpng;
+ WRAPPER_EXTENSION = framework;
+ };
+ name = Debug;
+ };
+ 4FADC24408B4156D00ABE55E /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DYLIB_COMPATIBILITY_VERSION = 14;
+ DYLIB_CURRENT_VERSION = 14;
+ FRAMEWORK_VERSION = 1.4.0;
+ GCC_PRECOMPILE_PREFIX_HEADER = NO;
+ GCC_PREFIX_HEADER = "";
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "@executable_path/../Frameworks";
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ OTHER_LDFLAGS = "-lz";
+ PRODUCT_NAME = libpng;
+ WRAPPER_EXTENSION = framework;
+ };
+ name = Release;
+ };
+ 4FADC24708B4156D00ABE55E /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ i386,
+ ppc,
+ ppc64,
+ x86_64,
+ );
+ DEPLOYMENT_POSTPROCESSING = YES;
+ GCC_ENABLE_CPP_EXCEPTIONS = NO;
+ GCC_ENABLE_CPP_RTTI = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
+ GCC_VERSION_i386 = 4.0;
+ GCC_VERSION_ppc = 3.3;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.5;
+ "MACOSX_DEPLOYMENT_TARGET[arch=i386]" = 10.4;
+ "MACOSX_DEPLOYMENT_TARGET[arch=ppc]" = 10.2;
+ MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
+ MACOSX_DEPLOYMENT_TARGET_ppc = 10.2;
+ PREBINDING = NO;
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+ "SDKROOT[arch=i386]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
+ "SDKROOT[arch=ppc]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.3.9.sdk";
+ SDKROOT_i386 = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
+ SDKROOT_ppc = "$(DEVELOPER_SDK_DIR)/MacOSX10.3.9.sdk";
+ ZERO_LINK = NO;
+ };
+ name = Debug;
+ };
+ 4FADC24808B4156D00ABE55E /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ i386,
+ ppc,
+ ppc64,
+ x86_64,
+ );
+ GCC_ENABLE_CPP_EXCEPTIONS = NO;
+ GCC_ENABLE_CPP_RTTI = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_OPTIMIZATION_LEVEL = 2;
+ GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
+ GCC_VERSION_i386 = 4.0;
+ GCC_VERSION_ppc = 3.3;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.5;
+ "MACOSX_DEPLOYMENT_TARGET[arch=i386]" = 10.4;
+ "MACOSX_DEPLOYMENT_TARGET[arch=ppc]" = 10.2;
+ MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
+ MACOSX_DEPLOYMENT_TARGET_ppc = 10.2;
+ PREBINDING = NO;
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+ "SDKROOT[arch=i386]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
+ "SDKROOT[arch=ppc]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.3.9.sdk";
+ SDKROOT_i386 = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
+ SDKROOT_ppc = "$(DEVELOPER_SDK_DIR)/MacOSX10.3.9.sdk";
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "libpng" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4FADC24308B4156D00ABE55E /* Debug */,
+ 4FADC24408B4156D00ABE55E /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "libpng" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4FADC24708B4156D00ABE55E /* Debug */,
+ 4FADC24808B4156D00ABE55E /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
+}
diff --git a/src/3rdparty/libpng/scripts/CMakeLists.txt b/src/3rdparty/libpng/scripts/CMakeLists.txt
deleted file mode 100644
index c040c03c28..0000000000
--- a/src/3rdparty/libpng/scripts/CMakeLists.txt
+++ /dev/null
@@ -1,253 +0,0 @@
-project(PNG C)
-cmake_minimum_required(VERSION 2.4.3)
-
-# Copyright (C) 2007 Glenn Randers-Pehrson
-
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-set(PNGLIB_MAJOR 1)
-set(PNGLIB_MINOR 2)
-set(PNGLIB_RELEASE 40)
-set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
-set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
-
-set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
-
-# needed packages
-find_package(ZLIB REQUIRED)
-include_directories(${ZLIB_INCLUDE_DIR})
-
-if(NOT WIN32)
- find_library(M_LIBRARY
- NAMES m
- PATHS /usr/lib /usr/local/lib
- )
- if(NOT M_LIBRARY)
- message(STATUS
- "math library 'libm' not found - floating point support disabled")
- endif()
-else()
- # not needed on windows
- set(M_LIBRARY "")
-endif()
-
-# COMMAND LINE OPTIONS
-if(DEFINED PNG_SHARED)
- option(PNG_SHARED "Build shared lib" ${PNG_SHARED})
-else()
- option(PNG_SHARED "Build shared lib" ON)
-endif()
-if(DEFINED PNG_STATIC)
- option(PNG_STATIC "Build static lib" ${PNG_STATIC})
-else()
- option(PNG_STATIC "Build static lib" ON)
-endif()
-
-if(MINGW)
- option(PNG_TESTS "Build pngtest" NO)
-else(MINGW)
- option(PNG_TESTS "Build pngtest" YES)
-endif(MINGW)
-
-option(PNG_NO_CONSOLE_IO "FIXME" YES)
-option(PNG_NO_STDIO "FIXME" YES)
-option(PNG_DEBUG "Build with debug output" NO)
-option(PNGARG "FIXME" YES)
-#TODO:
-# PNG_CONSOLE_IO_SUPPORTED
-
-# maybe needs improving, but currently I don't know when we can enable what :)
-set(png_asm_tmp "OFF")
-if(NOT WIN32)
- find_program(uname_executable NAMES uname PATHS /bin /usr/bin /usr/local/bin)
- if(uname_executable)
- EXEC_PROGRAM(${uname_executable} ARGS --machine OUTPUT_VARIABLE uname_output)
- if("uname_output" MATCHES "^.*i[1-9]86.*$")
- set(png_asm_tmp "ON")
- else("uname_output" MATCHES "^.*i[1-9]86.*$")
- set(png_asm_tmp "OFF")
- endif("uname_output" MATCHES "^.*i[1-9]86.*$")
- endif(uname_executable)
-else()
- # this env var is normally only set on win64
- SET(TEXT "ProgramFiles(x86)")
- if("$ENV{${TEXT}}" STREQUAL "")
- set(png_asm_tmp "ON")
- endif("$ENV{${TEXT}}" STREQUAL "")
-endif()
-
-# SET LIBNAME
-set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
-
-# to distinguish between debug and release lib
-set(CMAKE_DEBUG_POSTFIX "d")
-
-
-# OUR SOURCES
-set(libpng_sources
- png.h
- pngconf.h
- png.c
- pngerror.c
- pngget.c
- pngmem.c
- pngpread.c
- pngread.c
- pngrio.c
- pngrtran.c
- pngrutil.c
- pngset.c
- pngtrans.c
- pngwio.c
- pngwrite.c
- pngwtran.c
- pngwutil.c
-)
-set(pngtest_sources
- pngtest.c
-)
-# SOME NEEDED DEFINITIONS
-if(MSVC)
- add_definitions(-DPNG_NO_MODULEDEF -D_CRT_SECURE_NO_DEPRECATE)
-endif(MSVC)
-
-if(PNG_SHARED OR NOT MSVC)
- #if building msvc static this has NOT do be defined
- add_definitions(-DZLIB_DLL)
-endif()
-
-add_definitions(-DLIBPNG_NO_MMX)
-add_definitions(-DPNG_NO_MMX_CODE)
-
-if(PNG_CONSOLE_IO_SUPPORTED)
- add_definitions(-DPNG_CONSOLE_IO_SUPPORTED)
-endif()
-
-if(PNG_NO_CONSOLE_IO)
- add_definitions(-DPNG_NO_CONSOLE_IO)
-endif()
-
-if(PNG_NO_STDIO)
- add_definitions(-DPNG_NO_STDIO)
-endif()
-
-if(PNG_DEBUG)
- add_definitions(-DPNG_DEBUG)
-endif()
-
-if(NOT M_LIBRARY AND NOT WIN32)
- add_definitions(-DPNG_NO_FLOATING_POINT_SUPPORTED)
-endif()
-
-# NOW BUILD OUR TARGET
-include_directories(${PNG_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
-
-if(PNG_SHARED)
- add_library(${PNG_LIB_NAME} SHARED ${libpng_sources})
- if(MSVC)
- # msvc does not append 'lib' - do it here to have consistent name
- set_target_properties(${PNG_LIB_NAME} PROPERTIES PREFIX "lib")
- endif()
- target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY})
-endif()
-
-if(PNG_STATIC)
-# does not work without changing name
- set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static)
- add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources})
- if(MSVC)
- # msvc does not append 'lib' - do it here to have consistent name
- set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES PREFIX "lib")
- endif()
-endif()
-
-
-if(PNG_SHARED AND WIN32)
- set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL)
-endif()
-
-if(PNG_TESTS AND PNG_SHARED)
-# does not work with msvc due to png_lib_ver issue
- add_executable(pngtest ${pngtest_sources})
- target_link_libraries(pngtest ${PNG_LIB_NAME})
-# add_test(pngtest ${PNG_SOURCE_DIR}/pngtest.png)
-endif()
-
-
-# CREATE PKGCONFIG FILES
-# we use the same files like ./configure, so we have to set its vars
-set(prefix ${CMAKE_INSTALL_PREFIX})
-set(exec_prefix ${CMAKE_INSTALL_PREFIX})
-set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
-set(includedir ${CMAKE_INSTALL_PREFIX}/include)
-
-configure_file(${PNG_SOURCE_DIR}/scripts/libpng.pc.in
- ${PNG_BINARY_DIR}/libpng.pc)
-configure_file(${PNG_SOURCE_DIR}/scripts/libpng-config.in
- ${PNG_BINARY_DIR}/libpng-config)
-configure_file(${PNG_SOURCE_DIR}/scripts/libpng.pc.in
- ${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc)
-configure_file(${PNG_SOURCE_DIR}/scripts/libpng-config.in
- ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config)
-
-# SET UP LINKS
-if(PNG_SHARED)
- set_target_properties(${PNG_LIB_NAME} PROPERTIES
-# VERSION 0.${PNGLIB_RELEASE}.1.2.40
- VERSION 0.${PNGLIB_RELEASE}.0
- SOVERSION 0
- CLEAN_DIRECT_OUTPUT 1)
-endif()
-if(PNG_STATIC)
- if(NOT WIN32)
- # that's uncool on win32 - it overwrites our static import lib...
- set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES
- OUTPUT_NAME ${PNG_LIB_NAME}
- CLEAN_DIRECT_OUTPUT 1)
- endif()
-endif()
-
-# INSTALL
-if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
- if(PNG_SHARED)
- install(TARGETS ${PNG_LIB_NAME}
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib)
- endif()
- if(PNG_STATIC)
- install(TARGETS ${PNG_LIB_NAME_STATIC}
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib)
- endif()
-endif()
-
-if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
-install(FILES png.h pngconf.h DESTINATION include)
-install(FILES png.h pngconf.h DESTINATION include/${PNGLIB_NAME})
-endif()
-if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
- install(FILES libpng.3 libpngpf.3 DESTINATION man/man3)
- install(FILES png.5 DESTINATION man/man5)
- install(FILES ${PNG_BINARY_DIR}/libpng.pc DESTINATION lib/pkgconfig)
- install(FILES ${PNG_BINARY_DIR}/libpng-config DESTINATION bin)
- install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc DESTINATION lib/pkgconfig)
- install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin)
-endif()
-
-# what's with libpng.txt and all the extra files?
-
-
-# UNINSTALL
-# do we need this?
-
-
-# DIST
-# do we need this?
-
-# to create msvc import lib for mingw compiled shared lib
-# pexports libpng.dll > libpng.def
-# lib /def:libpng.def /machine:x86
-
diff --git a/src/3rdparty/libpng/scripts/README.txt b/src/3rdparty/libpng/scripts/README.txt
new file mode 100644
index 0000000000..fa7ffed957
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/README.txt
@@ -0,0 +1,67 @@
+
+Makefiles for libpng version 1.4.0 - January 3, 2010
+
+ makefile.linux => Linux/ELF makefile
+ (gcc, creates libpng14.so.14.1.4.0)
+ makefile.gcc => Generic makefile (gcc, creates static libpng.a)
+ makefile.knr => Archaic UNIX Makefile that converts files with
+ ansi2knr (Requires ansi2knr.c from
+ ftp://ftp.cs.wisc.edu/ghost)
+ makefile.acorn => Acorn makefile
+ makefile.aix => AIX/gcc makefile
+ makefile.amiga => Amiga makefile
+ makefile.atari => Atari makefile
+ makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode)
+ makefile.beos => beos makefile
+ makefile.bor => Borland makefile (uses bcc)
+ makefile.cegcc => minge32ce for Windows CE makefile
+ makefile.cygwin => Cygwin/gcc makefile
+ makefile.darwin => Darwin makefile, can use on MacosX
+ makefile.dec => DEC Alpha UNIX makefile
+ makefile.dj2 => DJGPP 2 makefile
+ makefile.elf => Linux/ELF makefile symbol versioning,
+ gcc, creates libpng14.so.14.1.4.0)
+ makefile.freebsd => FreeBSD makefile
+ makefile.gcc => Generic gcc makefile
+ makefile.hpgcc => HPUX makefile using gcc
+ makefile.hpux => HPUX (10.20 and 11.00) makefile
+ makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64-bit
+ makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
+ makefile.intel => Intel C/C++ version 4.0 and later
+ makefile.mingw => Mingw makefile
+ makefile.mips => MIPS makefile
+ makefile.msc => Microsoft C makefile
+ makefile.netbsd => NetBSD/cc makefile, makes libpng.so.
+ makefile.openbsd => OpenBSD makefile
+ makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
+ makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
+ makefile.sggcc => Silicon Graphics (gcc,
+ creates libpng14.so.14.1.4.0)
+ makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
+ makefile.solaris => Solaris 2.X makefile (gcc,
+ creates libpng14.so.14.1.4.0)
+ makefile.so9 => Solaris 9 makefile (gcc,
+ creates libpng14.so.14.1.4.0)
+ makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
+ makefile.sunos => Sun makefile
+ makefile.32sunu => Sun Ultra 32-bit makefile
+ makefile.64sunu => Sun Ultra 64-bit makefile
+ makefile.tc3 => Turbo C 3.0 makefile
+ makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and later
+ makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model
+ makevms.com => VMS build script
+ smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC compiler
+ (Requires SCOPTIONS, copied from scripts/SCOPTIONS.ppc)
+
+Other supporting scripts:
+ descrip.mms => VMS makefile for MMS or MMK
+ libpng-config-body.in => used by several makefiles to create libpng-config
+ libpng-config-head.in => used by several makefiles to create libpng-config
+ libpng.pc.in => Used by several makefiles to create libpng.pc
+ pngos2.def => OS/2 module definition file used by makefile.os2
+ pngwin.def => Module definitions for makefile.cygwin and mingw
+ png32ce.def => Module definition file used by makefile.cegcc
+ pngwin.rc => Used by the visualc6 and visualc71 projects.
+ SCOPTIONS.ppc => Used with smakefile.ppc
+
+Further information can be found in comments in the individual makefiles.
diff --git a/src/3rdparty/libpng/scripts/descrip.mms b/src/3rdparty/libpng/scripts/descrip.mms
index f3a8d7bab7..d0642c0347 100644
--- a/src/3rdparty/libpng/scripts/descrip.mms
+++ b/src/3rdparty/libpng/scripts/descrip.mms
@@ -33,20 +33,20 @@ clean :
# Other dependencies.
-png.obj : png.h, pngconf.h
-pngpread.obj : png.h, pngconf.h
-pngset.obj : png.h, pngconf.h
-pngget.obj : png.h, pngconf.h
-pngread.obj : png.h, pngconf.h
-pngrtran.obj : png.h, pngconf.h
-pngrutil.obj : png.h, pngconf.h
-pngerror.obj : png.h, pngconf.h
-pngmem.obj : png.h, pngconf.h
-pngrio.obj : png.h, pngconf.h
-pngwio.obj : png.h, pngconf.h
-pngtrans.obj : png.h, pngconf.h
-pngwrite.obj : png.h, pngconf.h
-pngwtran.obj : png.h, pngconf.h
-pngwutil.obj : png.h, pngconf.h
+png.obj : png.h, pngconf.h, pngpriv.h
+pngpread.obj : png.h, pngconf.h, pngpriv.h
+pngset.obj : png.h, pngconf.h, pngpriv.h
+pngget.obj : png.h, pngconf.h, pngpriv.h
+pngread.obj : png.h, pngconf.h, pngpriv.h
+pngrtran.obj : png.h, pngconf.h, pngpriv.h
+pngrutil.obj : png.h, pngconf.h, pngpriv.h
+pngerror.obj : png.h, pngconf.h, pngpriv.h
+pngmem.obj : png.h, pngconf.h, pngpriv.h
+pngrio.obj : png.h, pngconf.h, pngpriv.h
+pngwio.obj : png.h, pngconf.h, pngpriv.h
+pngtrans.obj : png.h, pngconf.h, pngpriv.h
+pngwrite.obj : png.h, pngconf.h, pngpriv.h
+pngwtran.obj : png.h, pngconf.h, pngpriv.h
+pngwutil.obj : png.h, pngconf.h, pngpriv.h
pngtest.obj : png.h, pngconf.h
diff --git a/src/3rdparty/libpng/scripts/libpng-config-head.in b/src/3rdparty/libpng/scripts/libpng-config-head.in
index 38fcc086d1..01e725447e 100755
--- a/src/3rdparty/libpng/scripts/libpng-config-head.in
+++ b/src/3rdparty/libpng/scripts/libpng-config-head.in
@@ -11,7 +11,7 @@
# Modeled after libxml-config.
-version=1.2.40
+version=1.4.0
prefix=""
libdir=""
libs=""
diff --git a/src/3rdparty/libpng/scripts/libpng-config.in b/src/3rdparty/libpng/scripts/libpng-config.in
deleted file mode 100755
index 7ae7d50f20..0000000000
--- a/src/3rdparty/libpng/scripts/libpng-config.in
+++ /dev/null
@@ -1,127 +0,0 @@
-#! /bin/sh
-
-# libpng-config
-# provides configuration info for libpng.
-
-# Copyright (C) 2002, 2004, 2006, 2007 Glenn Randers-Pehrson
-
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Modeled after libxml-config.
-
-version="@PNGLIB_VERSION@"
-prefix="@prefix@"
-exec_prefix="@exec_prefix@"
-libdir="@libdir@"
-includedir="@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
-libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
-all_libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ @LIBS@"
-I_opts="-I${includedir}"
-L_opts="-L${libdir}"
-R_opts=""
-cppflags=""
-ccopts="@LIBPNG_NO_MMX@"
-ldopts=""
-
-usage()
-{
- cat <<EOF
-Usage: $0 [OPTION] ...
-
-Known values for OPTION are:
-
- --prefix print libpng prefix
- --libdir print path to directory containing library
- --libs print library linking information
- --ccopts print compiler options
- --cppflags print pre-processor flags
- --cflags print preprocessor flags, I_opts, and compiler options
- --I_opts print "-I" include options
- --L_opts print linker "-L" flags for dynamic linking
- --R_opts print dynamic linker "-R" or "-rpath" flags
- --ldopts print linker options
- --ldflags print linker flags (ldopts, L_opts, R_opts, and libs)
- --static revise subsequent outputs for static linking
- --help print this help and exit
- --version print version information
-EOF
-
- exit $1
-}
-
-if test $# -eq 0; then
- usage 1
-fi
-
-while test $# -gt 0; do
- case "$1" in
-
- --prefix)
- echo ${prefix}
- ;;
-
- --version)
- echo ${version}
- exit 0
- ;;
-
- --help)
- usage 0
- ;;
-
- --ccopts)
- echo ${ccopts}
- ;;
-
- --cppflags)
- echo ${cppflags}
- ;;
-
- --cflags)
- echo ${I_opts} ${cppflags} ${ccopts}
- ;;
-
- --libdir)
- echo ${libdir}
- ;;
-
- --libs)
- echo ${libs}
- ;;
-
- --I_opts)
- echo ${I_opts}
- ;;
-
- --L_opts)
- echo ${L_opts}
- ;;
-
- --R_opts)
- echo ${R_opts}
- ;;
-
- --ldopts)
- echo ${ldopts}
- ;;
-
- --ldflags)
- echo ${ldopts} ${L_opts} ${R_opts} ${libs}
- ;;
-
- --static)
- R_opts=""
- libs=${all_libs}
- ;;
-
- *)
- usage
- exit 1
- ;;
- esac
- shift
-done
-
-exit 0
diff --git a/src/3rdparty/libpng/scripts/libpng.icc b/src/3rdparty/libpng/scripts/libpng.icc
deleted file mode 100644
index 6635963501..0000000000
--- a/src/3rdparty/libpng/scripts/libpng.icc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Project file for libpng (static)
-// IBM VisualAge/C++ version 4.0 or later
-// Copyright (C) 2000 Cosmin Truta
-//
-// This code is released under the libpng license.
-// For conditions of distribution and use, see the disclaimer
-// and license in png.h
-//
-// Notes:
-// All modules are compiled in C mode
-// Tested with IBM VAC++ 4.0 under Win32
-// Expected to work with IBM VAC++ 4.0 or later under OS/2 and Win32
-// Can be easily adapted for IBM VAC++ 4.0 or later under AIX
-
-option incl(searchpath, "../zlib"), opt(level, "2"),
- link(libsearchpath, "../zlib")
-{
- target type(lib) "libpng.lib"
- {
- source type(c) "png.c"
- source type(c) "pngerror.c"
- source type(c) "pngget.c"
- source type(c) "pngmem.c"
- source type(c) "pngpread.c"
- source type(c) "pngread.c"
- source type(c) "pngrio.c"
- source type(c) "pngrtran.c"
- source type(c) "pngrutil.c"
- source type(c) "pngset.c"
- source type(c) "pngtrans.c"
- source type(c) "pngwio.c"
- source type(c) "pngwrite.c"
- source type(c) "pngwtran.c"
- source type(c) "pngwutil.c"
- }
-}
-
-option incl(searchpath, "../zlib"), opt(level, "2"),
- link(libsearchpath, "../zlib")
-{
- target type(exe) "pngtest.exe"
- {
- source type(c) "pngtest.c"
- source type(lib) "libpng.lib"
- source type(lib) "zlib.lib"
- }
-}
diff --git a/src/3rdparty/libpng/scripts/libpng.pc-configure.in b/src/3rdparty/libpng/scripts/libpng.pc-configure.in
deleted file mode 100644
index cadb555021..0000000000
--- a/src/3rdparty/libpng/scripts/libpng.pc-configure.in
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
-
-Name: libpng
-Description: Loads and saves PNG files
-Version: @PNGLIB_VERSION@
-Libs: -L${libdir} -lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
-Libs.private: @LIBS@
-Cflags: -I${includedir} @LIBPNG_NO_MMX@
diff --git a/src/3rdparty/libpng/scripts/libpng.pc.in b/src/3rdparty/libpng/scripts/libpng.pc.in
index f4ab0d2891..573df5adb2 100644
--- a/src/3rdparty/libpng/scripts/libpng.pc.in
+++ b/src/3rdparty/libpng/scripts/libpng.pc.in
@@ -1,10 +1,10 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
-includedir=@includedir@/libpng12
+includedir=@includedir@/libpng14
Name: libpng
Description: Loads and saves PNG files
-Version: 1.2.40
-Libs: -L${libdir} -lpng12
+Version: 1.4.0
+Libs: -L${libdir} -lpng14
Cflags: -I${includedir}
diff --git a/src/3rdparty/libpng/scripts/makefile.32sunu b/src/3rdparty/libpng/scripts/makefile.32sunu
index 2ce4a3a905..3ae51f6ed0 100644
--- a/src/3rdparty/libpng/scripts/makefile.32sunu
+++ b/src/3rdparty/libpng/scripts/makefile.32sunu
@@ -9,9 +9,9 @@
# and license in png.h
# Library name:
-LIBNAME=libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.40
+LIBNAME=libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
@@ -19,8 +19,8 @@ LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
LIBSOVER=$(LIBNAME).so.$(PNGVER)
OLDSO=libpng.so
-OLDSOMAJ=libpng.so.3
-OLDSOVER=libpng.so.3.$(PNGMIN)
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
# Utilities:
CC=cc
@@ -33,7 +33,7 @@ RM_F=/bin/rm -f
SUN_CC_FLAGS=-fast -xtarget=ultra
SUN_LD_FLAGS=-fast -xtarget=ultra
-# where make install puts libpng.a, libpng12.so and libpng12/png.h
+# where make install puts libpng.a, libpng14.so and libpng14/png.h
prefix=/a
exec_prefix=$(prefix)
@@ -95,7 +95,7 @@ libpng.pc:
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
libpng-config:
( cat scripts/libpng-config-head.in; \
@@ -106,7 +106,7 @@ libpng-config:
echo R_opts=\"-R$(LIBPATH)\"; \
echo ccopts=\"-xtarget=ultra\"; \
echo ldopts=\"-xtarget=ultra\"; \
- echo libs=\"-lpng12 -lz -lm\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
@@ -238,20 +238,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.64sunu b/src/3rdparty/libpng/scripts/makefile.64sunu
index 134e7924fc..3a04d977e5 100644
--- a/src/3rdparty/libpng/scripts/makefile.64sunu
+++ b/src/3rdparty/libpng/scripts/makefile.64sunu
@@ -9,9 +9,9 @@
# and license in png.h
# Library name:
-LIBNAME=libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.40
+LIBNAME=libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
@@ -19,8 +19,8 @@ LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
LIBSOVER=$(LIBNAME).so.$(PNGVER)
OLDSO=libpng.so
-OLDSOMAJ=libpng.so.3
-OLDSOVER=libpng.so.3.$(PNGMIN)
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
# Utilities:
CC=cc
@@ -33,7 +33,7 @@ RM_F=/bin/rm -f
SUN_CC_FLAGS=-fast -xtarget=ultra -xarch=v9
SUN_LD_FLAGS=-fast -xtarget=ultra -xarch=v9
-# where make install puts libpng.a, libpng12.so and libpng12/png.h
+# where make install puts libpng.a, libpng14.so and libpng14/png.h
prefix=/a
exec_prefix=$(prefix)
@@ -51,7 +51,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
# $(WARNMORE) -g -DPNG_DEBUG=5
-LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
+LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
INCPATH=$(prefix)/include
LIBPATH=$(exec_prefix)/lib
@@ -95,7 +95,7 @@ libpng.pc:
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
libpng-config:
( cat scripts/libpng-config-head.in; \
@@ -106,7 +106,7 @@ libpng-config:
echo R_opts=\"-R$(LIBPATH)\"; \
echo ccopts=\"-xtarget=ultra -xarch=v9\"; \
echo ldopts=\"-xtarget=ultra -xarch=v9\"; \
- echo libs=\"-lpng12 -lz -lm\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
@@ -238,20 +238,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.aix b/src/3rdparty/libpng/scripts/makefile.aix
index 2cb6e67787..e6e1a8909d 100644
--- a/src/3rdparty/libpng/scripts/makefile.aix
+++ b/src/3rdparty/libpng/scripts/makefile.aix
@@ -3,7 +3,7 @@
# Copyright (C) 2000 Cosmin Truta
# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
@@ -21,9 +21,9 @@ RANLIB = ranlib
RM_F = rm -f
LN_SF = ln -f -s
-LIBNAME=libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.40
+LIBNAME=libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
prefix=/usr/local
@@ -49,7 +49,7 @@ CRELEASE = -O2
LDRELEASE = -s
WARNMORE=-W -Wall
CFLAGS = -I$(ZLIBINC) $(WARNMORE) $(CRELEASE)
-LDFLAGS = -L. -L$(ZLIBLIB) -lpng12 -lz -lm $(LDRELEASE)
+LDFLAGS = -L. -L$(ZLIBLIB) -lpng14 -lz -lm $(LDRELEASE)
# File extensions
O=.o
@@ -97,20 +97,20 @@ install: $(LIBNAME)$(A)
clean:
$(RM_F) *.o $(LIBNAME)$(A) pngtest pngout.png
-png$(O): png.h pngconf.h
-pngerror$(O): png.h pngconf.h
-pngget$(O): png.h pngconf.h
-pngmem$(O): png.h pngconf.h
-pngpread$(O): png.h pngconf.h
-pngread$(O): png.h pngconf.h
-pngrio$(O): png.h pngconf.h
-pngrtran$(O): png.h pngconf.h
-pngrutil$(O): png.h pngconf.h
-pngset$(O): png.h pngconf.h
-pngtrans$(O): png.h pngconf.h
-pngwio$(O): png.h pngconf.h
-pngwrite$(O): png.h pngconf.h
-pngwtran$(O): png.h pngconf.h
-pngwutil$(O): png.h pngconf.h
+png$(O): png.h pngconf.h pngpriv.h
+pngerror$(O): png.h pngconf.h pngpriv.h
+pngget$(O): png.h pngconf.h pngpriv.h
+pngmem$(O): png.h pngconf.h pngpriv.h
+pngpread$(O): png.h pngconf.h pngpriv.h
+pngread$(O): png.h pngconf.h pngpriv.h
+pngrio$(O): png.h pngconf.h pngpriv.h
+pngrtran$(O): png.h pngconf.h pngpriv.h
+pngrutil$(O): png.h pngconf.h pngpriv.h
+pngset$(O): png.h pngconf.h pngpriv.h
+pngtrans$(O): png.h pngconf.h pngpriv.h
+pngwio$(O): png.h pngconf.h pngpriv.h
+pngwrite$(O): png.h pngconf.h pngpriv.h
+pngwtran$(O): png.h pngconf.h pngpriv.h
+pngwutil$(O): png.h pngconf.h pngpriv.h
pngtest$(O): png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.amiga b/src/3rdparty/libpng/scripts/makefile.amiga
index 50977c7b03..8bf0f455f1 100644
--- a/src/3rdparty/libpng/scripts/makefile.amiga
+++ b/src/3rdparty/libpng/scripts/makefile.amiga
@@ -1,7 +1,7 @@
# Commodore Amiga Makefile
# makefile for libpng and SAS C V6.5x compiler
# Copyright (C) 1995-2000 Wolf Faust
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
diff --git a/src/3rdparty/libpng/scripts/makefile.atari b/src/3rdparty/libpng/scripts/makefile.atari
index 944337d99b..0e1ca72cfb 100644
--- a/src/3rdparty/libpng/scripts/makefile.atari
+++ b/src/3rdparty/libpng/scripts/makefile.atari
@@ -1,11 +1,11 @@
# makefile for libpng
# Copyright (C) 2002 Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
-
+#
# Modified for LC56/ATARI assumes libz.lib is in same dir and uses default
# rules for library management
#
diff --git a/src/3rdparty/libpng/scripts/makefile.bc32 b/src/3rdparty/libpng/scripts/makefile.bc32
index 4b96231b54..2020e6e75b 100644
--- a/src/3rdparty/libpng/scripts/makefile.bc32
+++ b/src/3rdparty/libpng/scripts/makefile.bc32
@@ -109,21 +109,21 @@ test: pngtest.exe
## Minor Targets
-png.obj: png.c png.h pngconf.h
-pngerror.obj: pngerror.c png.h pngconf.h
-pngget.obj: pngget.c png.h pngconf.h
-pngmem.obj: pngmem.c png.h pngconf.h
-pngpread.obj: pngpread.c png.h pngconf.h
-pngread.obj: pngread.c png.h pngconf.h
-pngrio.obj: pngrio.c png.h pngconf.h
-pngrtran.obj: pngrtran.c png.h pngconf.h
-pngrutil.obj: pngrutil.c png.h pngconf.h
-pngset.obj: pngset.c png.h pngconf.h
-pngtrans.obj: pngtrans.c png.h pngconf.h
-pngwio.obj: pngwio.c png.h pngconf.h
-pngwrite.obj: pngwrite.c png.h pngconf.h
-pngwtran.obj: pngwtran.c png.h pngconf.h
-pngwutil.obj: pngwutil.c png.h pngconf.h
+png.obj: png.c png.h pngconf.h pngpriv.h
+pngerror.obj: pngerror.c png.h pngconf.h pngpriv.h
+pngget.obj: pngget.c png.h pngconf.h pngpriv.h
+pngmem.obj: pngmem.c png.h pngconf.h pngpriv.h
+pngpread.obj: pngpread.c png.h pngconf.h pngpriv.h
+pngread.obj: pngread.c png.h pngconf.h pngpriv.h
+pngrio.obj: pngrio.c png.h pngconf.h pngpriv.h
+pngrtran.obj: pngrtran.c png.h pngconf.h pngpriv.h
+pngrutil.obj: pngrutil.c png.h pngconf.h pngpriv.h
+pngset.obj: pngset.c png.h pngconf.h pngpriv.h
+pngtrans.obj: pngtrans.c png.h pngconf.h pngpriv.h
+pngwio.obj: pngwio.c png.h pngconf.h pngpriv.h
+pngwrite.obj: pngwrite.c png.h pngconf.h pngpriv.h
+pngwtran.obj: pngwtran.c png.h pngconf.h pngpriv.h
+pngwutil.obj: pngwutil.c png.h pngconf.h pngpriv.h
pngtest.obj: pngtest.c png.h pngconf.h
$(LIBNAME): $(OBJS)
diff --git a/src/3rdparty/libpng/scripts/makefile.beos b/src/3rdparty/libpng/scripts/makefile.beos
index 5dbf14c430..0b184d6a25 100644
--- a/src/3rdparty/libpng/scripts/makefile.beos
+++ b/src/3rdparty/libpng/scripts/makefile.beos
@@ -3,15 +3,15 @@
# Copyright (C) 2002, 2006, 2008 Glenn Randers-Pehrson
# Copyright (C) 1999 Greg Roelofs
# Copyright (C) 1996, 1997 Andreas Dilger
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# Library name:
-LIBNAME=libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.40
+LIBNAME=libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
@@ -19,8 +19,8 @@ LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
LIBSOVER=$(LIBNAME).so.$(PNGVER)
OLDSO=libpng.so
-OLDSOMAJ=libpng.so.3
-OLDSOVER=libpng.so.3.$(PNGMIN)
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
# Utilities:
CC=gcc
@@ -49,7 +49,7 @@ CFLAGS=-I$(ZLIBINC) -W -Wall -O1 -funroll-loops \
# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz
-# where make install puts libpng.a, libpng12.so*, and png.h
+# where make install puts libpng.a, libpng14.so*, and png.h
prefix=/usr/local
exec_prefix=$(prefix)
INCPATH=$(prefix)/include
@@ -91,13 +91,13 @@ libpng.pc:
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
libpng-config:
( cat scripts/libpng-config-head.in; \
echo prefix=\"$(prefix)\"; \
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo libs=\"-lpng12 -lz \"; \
+ echo libs=\"-lpng14 -lz \"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
@@ -117,7 +117,7 @@ $(OLDSOVER): $(OBJSDLL)
$(OLDSOVER) $(OBJSDLL) $(LDFLAGS)
pngtest: pngtest.o $(LIBSO)
- $(CC) -L$(ZLIBLIB) -L. -lz -lpng12 -o pngtest pngtest.o
+ $(CC) -L$(ZLIBLIB) -L. -lz -lpng14 -o pngtest pngtest.o
test: pngtest
./pngtest
@@ -211,20 +211,20 @@ clean:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.bor b/src/3rdparty/libpng/scripts/makefile.bor
index 0a8ef001d4..dcc3c633c0 100644
--- a/src/3rdparty/libpng/scripts/makefile.bor
+++ b/src/3rdparty/libpng/scripts/makefile.bor
@@ -117,21 +117,21 @@ test: pngtest$(MODEL).exe
## Minor Targets
-png.obj: png.c png.h pngconf.h
-pngerror.obj: pngerror.c png.h pngconf.h
-pngget.obj: pngget.c png.h pngconf.h
-pngmem.obj: pngmem.c png.h pngconf.h
-pngpread.obj: pngpread.c png.h pngconf.h
-pngread.obj: pngread.c png.h pngconf.h
-pngrio.obj: pngrio.c png.h pngconf.h
-pngrtran.obj: pngrtran.c png.h pngconf.h
-pngrutil.obj: pngrutil.c png.h pngconf.h
-pngset.obj: pngset.c png.h pngconf.h
-pngtrans.obj: pngtrans.c png.h pngconf.h
-pngwio.obj: pngwio.c png.h pngconf.h
-pngwrite.obj: pngwrite.c png.h pngconf.h
-pngwtran.obj: pngwtran.c png.h pngconf.h
-pngwutil.obj: pngwutil.c png.h pngconf.h
+png.obj: png.c png.h pngconf.h pngpriv.h
+pngerror.obj: pngerror.c png.h pngconf.h pngpriv.h
+pngget.obj: pngget.c png.h pngconf.h pngpriv.h
+pngmem.obj: pngmem.c png.h pngconf.h pngpriv.h
+pngpread.obj: pngpread.c png.h pngconf.h pngpriv.h
+pngread.obj: pngread.c png.h pngconf.h pngpriv.h
+pngrio.obj: pngrio.c png.h pngconf.h pngpriv.h
+pngrtran.obj: pngrtran.c png.h pngconf.h pngpriv.h
+pngrutil.obj: pngrutil.c png.h pngconf.h pngpriv.h
+pngset.obj: pngset.c png.h pngconf.h pngpriv.h
+pngtrans.obj: pngtrans.c png.h pngconf.h pngpriv.h
+pngwio.obj: pngwio.c png.h pngconf.h pngpriv.h
+pngwrite.obj: pngwrite.c png.h pngconf.h pngpriv.h
+pngwtran.obj: pngwtran.c png.h pngconf.h pngpriv.h
+pngwutil.obj: pngwutil.c png.h pngconf.h pngpriv.h
$(LIBNAME): $(OBJS)
-del $(LIBNAME)
@@ -139,7 +139,7 @@ $(LIBNAME): $(OBJS)
$(LIBOBJS), libpng$(MODEL)
|
-pngtest$(MODEL).obj: pngtest.c
+pngtest$(MODEL).obj: pngtest.c png.h pngconf.h
$(CC) $(CFLAGS) -opngtest$(MODEL) -c pngtest.c
pngtest$(MODEL).exe: pngtest$(MODEL).obj
diff --git a/src/3rdparty/libpng/scripts/makefile.cegcc b/src/3rdparty/libpng/scripts/makefile.cegcc
new file mode 100644
index 0000000000..5b023df94b
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.cegcc
@@ -0,0 +1,113 @@
+# Makefile for creating Windows CE release archives, with the
+# mingw32ce compiler.
+
+# Last updated: 22-Jul-2008
+
+# Copyright (C) 2008 Vincent Torri
+
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# To get some help, type
+#
+# make help
+#
+# To create the archives
+#
+# make
+#
+# To remove everything, type:
+#
+# make clean
+
+VERMAJ = 1
+VERMIN = 4
+VERMIC = 0
+VER = $(VERMAJ).$(VERMIN).$(VERMIC)
+NAME = libpng
+PACKAGE = $(NAME)-$(VER)
+
+BIN = libpng14-0.dll libpng-14.dll
+LIB = libpng14.a libpng14.dll.a libpng.a libpng.dll.a scripts/png32ce.def
+INCLUDE = png.h pngconf.h pngpriv.h
+PC = libpng14.pc libpng.pc
+
+MANIFESTVERBIN = "Libpng-$(VER): Binary files"
+MANIFESTVERDEV = "Libpng-$(VER): Developer files"
+MANIFESTVERDESC = "Libpng: the official PNG reference library"
+
+all: $(NAME)
+
+$(NAME): remove-old copy-src compilation copy manifest archive
+ @echo " * Removal of the directories"
+ @rm -rf $(PACKAGE)/ $(PACKAGE)-bin/ $(PACKAGE)-dev/
+
+remove-old:
+ @echo " * Removal of the old files"
+ @rm -rf $(PACKAGE)-bin*
+ @rm -rf $(PACKAGE)-dev*
+
+copy-src:
+ @echo " * Copy of source files"
+ @cp -R ../src/$(PACKAGE) .
+ @echo " * Creation of directories and files"
+ @mkdir -p $(PACKAGE)-bin/bin
+ @mkdir -p $(PACKAGE)-bin/manifest
+ @mkdir -p $(PACKAGE)-dev/lib/pkgconfig
+ @mkdir -p $(PACKAGE)-dev/include/$(NAME)$(VERMAJ)$(VERMIN)
+ @mkdir -p $(PACKAGE)-dev/manifest
+ @touch $(PACKAGE)-bin/manifest/$(PACKAGE)-bin.mft
+ @touch $(PACKAGE)-bin/manifest/$(PACKAGE)-bin.ver
+ @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.mft
+ @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.ver
+
+compilation:
+ @echo " * Compilation of $(PACKAGE)"
+ cd $(PACKAGE) && CPPFLAGS="$(CPPFLAGS) -DPNG_BUILD_DLL -DPNG_CONSOLE_IO_SUPPORTED -DPNG_NO_MMX_CODE -D_WIN32_WCE=0x0420" CFLAGS="$(CFLAGS) -mms-bitfields -O3 -pipe -fomit-frame-pointer" LDFLAGS="$(LDFLAGS) -Wl,--enable-auto-import -Wl,-s" ./configure --prefix=/opt/wince --host=arm-mingw32ce && make
+
+copy:
+ @echo " * Copy of binary and development files"
+ @for i in $(BIN); do \
+ cp $(PACKAGE)/.libs/$$i $(PACKAGE)-bin/bin; \
+ done
+ @for i in $(LIB); do \
+ cp $(PACKAGE)/.libs/$$i $(PACKAGE)-dev/lib; \
+ done
+ @for i in $(INCLUDE); do \
+ cp $(PACKAGE)/$$i $(PACKAGE)-dev/include/$(NAME)$(VERMAJ)$(VERMIN); \
+ done
+ @for i in $(PC); do \
+ cp $(PACKAGE)/$$i $(PACKAGE)-dev/lib/pkgconfig; \
+ done
+
+manifest:
+ @echo " * Creation of the manifest"
+ @cd $(PACKAGE)-bin && find * >> manifest/$(PACKAGE)-bin.mft
+ @cd $(PACKAGE)-bin && \
+ echo $(MANIFESTVERBIN) >> manifest/$(PACKAGE)-bin.ver && \
+ echo $(MANIFESTVERDESC) >> manifest/$(PACKAGE)-bin.ver
+ @cd $(PACKAGE)-dev && find * >> manifest/$(PACKAGE)-dev.mft
+ @cd $(PACKAGE)-dev && \
+ echo $(MANIFESTVERDEV) >> manifest/$(PACKAGE)-dev.ver && \
+ echo $(MANIFESTVERDESC) >> manifest/$(PACKAGE)-dev.ver
+
+archive:
+ @echo " * Creation of the archives"
+ @tar cf $(PACKAGE)-bin.tar $(PACKAGE)-bin
+ @bzip2 -9 $(PACKAGE)-bin.tar
+ @tar cf $(PACKAGE)-dev.tar $(PACKAGE)-dev
+ @bzip2 -9 $(PACKAGE)-dev.tar
+
+clean:
+ @echo " * Cleaning"
+ @rm -rf $(PACKAGE)*
+
+help:
+ @echo
+ @echo "To create the archives, type:"
+ @echo " make"
+ @echo
+ @echo "To remove everything, type:"
+ @echo " make clean"
+ @echo
diff --git a/src/3rdparty/libpng/scripts/makefile.cygwin b/src/3rdparty/libpng/scripts/makefile.cygwin
index 2a19090c7e..bdd904e7c2 100644
--- a/src/3rdparty/libpng/scripts/makefile.cygwin
+++ b/src/3rdparty/libpng/scripts/makefile.cygwin
@@ -7,7 +7,7 @@
# and Glenn Randers-Pehrson, based on makefile for linux-elf w/mmx by:
# Copyright (C) 1998-2000 Greg Roelofs
# Copyright (C) 1996, 1997 Andreas Dilger
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
@@ -61,23 +61,14 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-Wmissing-declarations -Wtraditional -Wcast-align \
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-### if you don't need thread safety, but want the asm accel
-#CFLAGS= $(strip $(MINGW_CCFLAGS) -DPNG_THREAD_UNSAFE_OK \
-# $(addprefix -I,$(ZLIBINC)) -W -Wall -O $(ALIGN) -funroll-loops \
-# -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
-### if you need thread safety and want (minimal) asm accel
-#CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
-# -W -Wall -O $(ALIGN) -funroll-loops \
-# -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
-### Normal (non-asm) compilation
CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
- -W -Wall -O3 $(ALIGN) -funroll-loops -DPNG_NO_MMX_CODE \
+ -W -Wall -O3 $(ALIGN) -funroll-loops \
-fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
-LIBNAME = libpng12
-PNGMAJ = 0
-CYGDLL = 12
-PNGMIN = 1.2.40
+LIBNAME = libpng14
+PNGMAJ = 14
+CYGDLL = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB=cygpng$(CYGDLL).dll
@@ -141,7 +132,7 @@ libpng.pc: scripts/libpng.pc.in
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz! > libpng.pc
+ -e s!-lpng14!-lpng14\ -lz! > libpng.pc
libpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in
@echo -e Making $(LIBNAME) libpng-config file for this libpng \
@@ -163,7 +154,7 @@ $(STATLIB): $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
-$(SHAREDDEF): scripts/pngw32.def
+$(SHAREDDEF): scripts/pngwin.def
cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \
sed -e 's/\([^;]*\);/;/' > $@
@@ -254,16 +245,16 @@ test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) $(CFLAGS) \
- `$(BINPATH)/libpng12-config --cflags` pngtest.c \
+ `$(BINPATH)/libpng14-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) \
- -o pngtestd `$(BINPATH)/libpng12-config --ldflags`
+ -o pngtestd `$(BINPATH)/libpng14-config --ldflags`
./pngtestd pngtest.png
test-installed:
$(CC) $(CFLAGS) \
- `$(BINPATH)/libpng12-config --cflags` pngtest.c \
+ `$(BINPATH)/libpng14-config --cflags` pngtest.c \
-L$(ZLIBLIB) \
- -o pngtesti$(EXE) `$(BINPATH)/libpng12-config --ldflags`
+ -o pngtesti$(EXE) `$(BINPATH)/libpng14-config --ldflags`
./pngtesti$(EXE) pngtest.png
clean:
@@ -279,21 +270,21 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o png.pic.o: png.h pngconf.h png.c
-pngerror.o pngerror.pic.o: png.h pngconf.h pngerror.c
-pngrio.o pngrio.pic.o: png.h pngconf.h pngrio.c
-pngwio.o pngwio.pic.o: png.h pngconf.h pngwio.c
-pngmem.o pngmem.pic.o: png.h pngconf.h pngmem.c
-pngset.o pngset.pic.o: png.h pngconf.h pngset.c
-pngget.o pngget.pic.o: png.h pngconf.h pngget.c
-pngread.o pngread.pic.o: png.h pngconf.h pngread.c
-pngrtran.o pngrtran.pic.o: png.h pngconf.h pngrtran.c
-pngrutil.o pngrutil.pic.o: png.h pngconf.h pngrutil.c
-pngtrans.o pngtrans.pic.o: png.h pngconf.h pngtrans.c
-pngwrite.o pngwrite.pic.o: png.h pngconf.h pngwrite.c
-pngwtran.o pngwtran.pic.o: png.h pngconf.h pngwtran.c
-pngwutil.o pngwutil.pic.o: png.h pngconf.h pngwutil.c
-pngpread.o pngpread.pic.o: png.h pngconf.h pngpread.c
+png.o png.pic.o: png.h pngconf.h pngpriv.h png.c
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h pngerror.c
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h pngrio.c
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h pngwio.c
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h pngmem.c
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h pngset.c
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h pngget.c
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h pngread.c
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h pngrtran.c
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h pngrutil.c
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h pngtrans.c
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h pngwrite.c
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h pngwtran.c
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h pngwutil.c
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngpread.c
pngtest.o: png.h pngconf.h pngtest.c
pngtest-stat.o: png.h pngconf.h pngtest.c
diff --git a/src/3rdparty/libpng/scripts/makefile.darwin b/src/3rdparty/libpng/scripts/makefile.darwin
index c07880fb92..a35ad70283 100644
--- a/src/3rdparty/libpng/scripts/makefile.darwin
+++ b/src/3rdparty/libpng/scripts/makefile.darwin
@@ -4,12 +4,12 @@
# derived from makefile.linux:
# Copyright (C) 1998, 1999 Greg Roelofs
# Copyright (C) 1996, 1997 Andreas Dilger
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
-# where "make install" puts libpng.a, libpng12.dylib, png.h and pngconf.h
+# where "make install" puts libpng.a, libpng14.dylib, png.h and pngconf.h
prefix=/usr/local
exec_prefix=$(prefix)
@@ -20,9 +20,9 @@ ZLIBLIB=../zlib
ZLIBINC=../zlib
# Library name:
-LIBNAME = libpng12
-PNGMAJ = 12
-PNGMIN = 1.2.40
+LIBNAME = libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
@@ -30,8 +30,8 @@ LIBSO=$(LIBNAME).dylib
LIBSOMAJ=$(LIBNAME).$(PNGMAJ).dylib
LIBSOVER=$(LIBNAME).$(PNGVER).dylib
OLDSO=libpng.dylib
-OLDSOMAJ=libpng.3.dylib
-OLDSOVER=libpng.3.$(PNGMIN).dylib
+OLDSOMAJ=libpng.14.dylib
+OLDSOVER=libpng.14.$(PNGMIN).dylib
# Utilities:
CC=cc
@@ -41,9 +41,9 @@ LN_SF=ln -sf
RANLIB=ranlib
RM_F=/bin/rm -f
-# CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE
+# CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops
CFLAGS=-I$(ZLIBINC) -W -Wall -O -funroll-loops
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz
+LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz
INCPATH=$(prefix)/include
LIBPATH=$(exec_prefix)/lib
@@ -87,14 +87,14 @@ libpng.pc:
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz! > libpng.pc
+ -e s!-lpng14!-lpng14\ -lz! > libpng.pc
libpng-config:
( cat scripts/libpng-config-head.in; \
echo prefix=\"$(prefix)\"; \
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
echo L_opts=\"-L$(LIBPATH)\"; \
- echo libs=\"-lpng12 -lz\"; \
+ echo libs=\"-lpng14 -lz\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
@@ -107,14 +107,14 @@ $(LIBSOMAJ): $(LIBSOVER)
$(LIBSOVER): $(OBJSDLL)
$(CC) -dynamiclib \
-install_name $(LIBPATH)/$(LIBSOMAJ) \
- -current_version 0 -compatibility_version 0 \
+ -current_version 14 -compatibility_version 14 \
-o $(LIBSOVER) \
$(OBJSDLL) -L$(ZLIBLIB) -lz
$(OLDSOVER): $(OBJSDLL)
$(CC) -dynamiclib \
-install_name $(LIBPATH)/$(OLDSOMAJ) \
- -current_version 3 -compatibility_version 3 \
+ -current_version 14 -compatibility_version 14 \
-o $(OLDSOVER) \
$(OBJSDLL) -L$(ZLIBLIB) -lz
@@ -218,20 +218,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.dec b/src/3rdparty/libpng/scripts/makefile.dec
index b8f99dba98..eb1fd14ae3 100644
--- a/src/3rdparty/libpng/scripts/makefile.dec
+++ b/src/3rdparty/libpng/scripts/makefile.dec
@@ -1,24 +1,24 @@
# makefile for libpng on DEC Alpha Unix
# Copyright (C) 2000-2002, 2006 Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# Library name:
-PNGMAJ = 0
-PNGMIN = 1.2.40
+PNGMAJ = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
-LIBNAME = libpng12
+LIBNAME = libpng14
# Shared library names:
LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
LIBSOVER=$(LIBNAME).so.$(PNGVER)
OLDSO=libpng.so
-OLDSOMAJ=libpng.so.3
-OLDSOVER=libpng.so.3.$(PNGMIN)
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
# Utilities:
AR_RC=ar rc
@@ -75,7 +75,7 @@ libpng.pc:
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
libpng-config:
( cat scripts/libpng-config-head.in; \
@@ -83,7 +83,7 @@ libpng-config:
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
echo ccopts=\"-std\"; \
echo L_opts=\"-L$(LIBPATH)\"; \
- echo libs=\"-lpng12 -lz -lm\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
@@ -198,20 +198,20 @@ clean:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.dj2 b/src/3rdparty/libpng/scripts/makefile.dj2
index 28821a4ac7..021e969cfd 100644
--- a/src/3rdparty/libpng/scripts/makefile.dj2
+++ b/src/3rdparty/libpng/scripts/makefile.dj2
@@ -1,7 +1,7 @@
# DJGPP (DOS gcc) makefile for libpng
# Copyright (C) 2002, 2006, 2009 Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
@@ -39,20 +39,20 @@ clean:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.elf b/src/3rdparty/libpng/scripts/makefile.elf
index 126a9a14bd..7d70af18c0 100644
--- a/src/3rdparty/libpng/scripts/makefile.elf
+++ b/src/3rdparty/libpng/scripts/makefile.elf
@@ -1,8 +1,8 @@
-# makefile for libpng.a and libpng12.so on Linux ELF with gcc
+# makefile for libpng.a and libpng14.so on Linux ELF with gcc
# Copyright (C) 1998, 1999, 2002, 2006, 2008 Greg Roelofs
# and Glenn Randers-Pehrson
# Copyright (C) 1996, 1997 Andreas Dilger
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
@@ -10,13 +10,13 @@
# Modified for Debian by Junichi Uekawa and Josselin Mouette
# Major modifications are:
# * link libpng explicitly with libz and libm
-# * $(OLDSO).3 is a symlink rather than a different library
+# * $(OLDSO).14 is a symlink rather than a different library
# * versioned symbols
# Library name:
-LIBNAME = libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.40
+LIBNAME = libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
@@ -24,8 +24,8 @@ LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
LIBSOVER=$(LIBNAME).so.$(PNGVER)
OLDSO=libpng.so
-OLDSOMAJ=libpng.so.3
-OLDSOVER=libpng.so.3.$(PNGMIN)
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
# Utilities:
AR_RC=ar rc
@@ -35,8 +35,8 @@ LN_SF=ln -sf
RANLIB=ranlib
RM_F=/bin/rm -f
-# where "make install" puts libpng12.a, libpng12.so*,
-# libpng12/png.h and libpng12/pngconf.h
+# where "make install" puts libpng14.a, libpng14.so*,
+# libpng14/png.h and libpng14/pngconf.h
# Prefix must be a full pathname.
prefix=/usr/local
exec_prefix=$(prefix)
@@ -60,7 +60,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
CFLAGS=-W -Wall -D_REENTRANT -O2 \
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
-LDFLAGS=-L. -lpng12
+LDFLAGS=-L. -lpng14
LDFLAGS_A=libpng.a -lz -lm
LIBADDFLAGS=-lz -lm
@@ -107,11 +107,11 @@ libpng.pc:
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
libpng.syms: png.h pngconf.h
$(CC) $(CFLAGS) -E -DPNG_BUILDSYMS -DPNG_INTERNAL png.h |\
- awk -F '[\t [\\]();]' -v PNGMAJ=$(PNGMAJ) 'BEGIN{printf("PNG12_%s {global:\n",PNGMAJ)}\
+ awk -F '[\t [\\]();]' -v PNGMAJ=$(PNGMAJ) 'BEGIN{printf("PNG14_%s {global:\n",PNGMAJ)}\
{ for (i=1;i+2<=NF;++i)\
if ($$(i)=="PNG_FUNCTION_EXPORT" && $$(i+2)=="END")\
print $$(i+1) ";";\
@@ -128,8 +128,8 @@ libpng-config:
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
echo L_opts=\"\"; \
echo R_opts=\"\"; \
- echo libs=\"-lpng12\"; \
- echo all_libs=\"-lpng12 $(LIBADDFLAGS)\"; \
+ echo libs=\"-lpng14\"; \
+ echo all_libs=\"-lpng14 $(LIBADDFLAGS)\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
@@ -260,20 +260,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.freebsd b/src/3rdparty/libpng/scripts/makefile.freebsd
index d9df1ee321..c0014afbda 100644
--- a/src/3rdparty/libpng/scripts/makefile.freebsd
+++ b/src/3rdparty/libpng/scripts/makefile.freebsd
@@ -1,12 +1,12 @@
# makefile for libpng under FreeBSD
# Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
PREFIX?= /usr/local
-SHLIB_VER?= 5
+SHLIB_VER?= 14
LIB= png
SHLIB_MAJOR= ${SHLIB_VER}
@@ -17,7 +17,7 @@ NOOBJ= YES
# where make install puts libpng.a and png.h
DESTDIR= ${PREFIX}
LIBDIR= /lib
-INCS= png.h pngconf.h
+INCS= png.h pngconf.h pngpriv.h
INCSDIR= /include/libpng
INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk
MAN= libpng.3 libpngpf.3 png.5
@@ -28,9 +28,6 @@ LDADD+= -lm -lz
DPADD+= ${LIBM} ${LIBZ}
CFLAGS+= -I.
-.if (${MACHINE_ARCH} != "i386")
-CFLAGS+= -DPNG_NO_MMX_CODE
-.endif
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
diff --git a/src/3rdparty/libpng/scripts/makefile.gcc b/src/3rdparty/libpng/scripts/makefile.gcc
index d1fb8674a8..b31adee604 100644
--- a/src/3rdparty/libpng/scripts/makefile.gcc
+++ b/src/3rdparty/libpng/scripts/makefile.gcc
@@ -2,7 +2,7 @@
# Copyright (C) 2008 Glenn Randers-Pehrson
# Copyright (C) 2000 Cosmin Truta
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
@@ -64,20 +64,20 @@ pngtest$(EXE): pngtest$(O) libpng$(A)
clean:
$(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png
-png$(O): png.h pngconf.h
-pngerror$(O): png.h pngconf.h
-pngget$(O): png.h pngconf.h
-pngmem$(O): png.h pngconf.h
-pngpread$(O): png.h pngconf.h
-pngread$(O): png.h pngconf.h
-pngrio$(O): png.h pngconf.h
-pngrtran$(O): png.h pngconf.h
-pngrutil$(O): png.h pngconf.h
-pngset$(O): png.h pngconf.h
-pngtrans$(O): png.h pngconf.h
-pngwio$(O): png.h pngconf.h
-pngwrite$(O): png.h pngconf.h
-pngwtran$(O): png.h pngconf.h
-pngwutil$(O): png.h pngconf.h
+png$(O): png.h pngconf.h pngpriv.h
+pngerror$(O): png.h pngconf.h pngpriv.h
+pngget$(O): png.h pngconf.h pngpriv.h
+pngmem$(O): png.h pngconf.h pngpriv.h
+pngpread$(O): png.h pngconf.h pngpriv.h
+pngread$(O): png.h pngconf.h pngpriv.h
+pngrio$(O): png.h pngconf.h pngpriv.h
+pngrtran$(O): png.h pngconf.h pngpriv.h
+pngrutil$(O): png.h pngconf.h pngpriv.h
+pngset$(O): png.h pngconf.h pngpriv.h
+pngtrans$(O): png.h pngconf.h pngpriv.h
+pngwio$(O): png.h pngconf.h pngpriv.h
+pngwrite$(O): png.h pngconf.h pngpriv.h
+pngwtran$(O): png.h pngconf.h pngpriv.h
+pngwutil$(O): png.h pngconf.h pngpriv.h
pngtest$(O): png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.gcmmx b/src/3rdparty/libpng/scripts/makefile.gcmmx
deleted file mode 100644
index b569e878d4..0000000000
--- a/src/3rdparty/libpng/scripts/makefile.gcmmx
+++ /dev/null
@@ -1,274 +0,0 @@
-# makefile for libpng.a and libpng12.so on Linux ELF with gcc using MMX
-# assembler code
-# Copyright 2002, 2006, 2008 Greg Roelofs and Glenn Randers-Pehrson
-# Copyright 1998-2001 Greg Roelofs
-# Copyright 1996-1997 Andreas Dilger
-
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# CAUTION: Do not use this makefile with gcc versions 2.7.2.2 and earlier.
-
-# NOTE: When testing MMX performance on a multitasking system, make sure
-# there are no floating-point programs (e.g., SETI@Home) running in
-# the background! Context switches between MMX and FPU are expensive.
-
-# Library name:
-LIBNAME = libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.40
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-# Shared library names:
-LIBSO=$(LIBNAME).so
-LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOVER=$(LIBNAME).so.$(PNGVER)
-OLDSO=libpng.so
-OLDSOMAJ=libpng.so.3
-OLDSOVER=libpng.so.3.$(PNGMIN)
-
-# Utilities:
-CC = gcc
-LD = $(CC)
-AR_RC = ar rc
-LN_SF = ln -sf
-MKDIR_P = mkdir -p
-RANLIB = ranlib
-RM_F = /bin/rm -f
-
-# where "make install" puts libpng12.a, libpng12.so*,
-# libpng12/png.h and libpng12/pngconf.h
-# Prefix must be a full pathname.
-prefix=/usr/local
-exec_prefix=$(prefix)
-
-# Where the zlib library and include files are located.
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-ALIGN=
-# for i386:
-#ALIGN=-malign-loops=2 -malign-functions=2
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
- -Wmissing-declarations -Wtraditional -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-
-# for pgcc version 2.95.1, -O3 is buggy; don't use it.
-
-# Remove -DPNG_THREAD_UNSAFE_OK if you need thread safety
-### for generic gcc:
-CFLAGS=-DPNG_THREAD_UNSAFE_OK -I$(ZLIBINC) -W -Wall -O \
- $(ALIGN) -funroll-loops \
- -fomit-frame-pointer # $(WARNMORE) -g -DPNG_DEBUG=5
-### for gcc 2.95.2 on 686:
-#CFLAGS=-DPNG_THREAD_UNSAFE_OK -I$(ZLIBINC) -W -Wall -O \
-# -mcpu=i686 -malign-double -ffast-math -fstrict-aliasing \
-# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer
-### for gcc 2.7.2.3 on 486 and up:
-#CFLAGS=-DPNG_THREAD_UNSAFE_OK -I$(ZLIBINC) -W -Wall -O \
-# -m486 -malign-double -ffast-math \
-# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer
-
-LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
-LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
-
-
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES: .c .o .pic.o
-
-.c.pic.o:
- $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
-
-all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo cppflags=\"-DPNG_THREAD_UNSAFE_OK \"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
- echo libs=\"-lpng12 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBSO): $(LIBSOMAJ)
- $(LN_SF) $(LIBSOMAJ) $(LIBSO)
-
-$(LIBSOMAJ): $(LIBSOVER)
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
-
-$(LIBSOVER): $(OBJSDLL)
- $(CC) -shared -Wl,-soname,$(LIBSOMAJ) \
- -o $(LIBSOVER) \
- $(OBJSDLL)
-
-$(OLDSOVER): $(OBJSDLL)
- $(CC) -shared -Wl,-soname,$(OLDSOMAJ) \
- -o $(OLDSOVER) \
- $(OBJSDLL)
-
-pngtest: pngtest.o $(LIBSO)
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-pngtest-static: pngtest.o libpng.a
- $(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
-
-test: pngtest pngtest-static
- @echo ""
- @echo " Running pngtest dynamically linked with $(LIBSO):"
- @echo ""
- ./pngtest
- @echo ""
- @echo " Running pngtest statically linked with libpng.a:"
- @echo ""
- ./pngtest-static
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOVER) libpng.pc \
- $(OLDSOVER)
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSO)
- -@$(RM_F) $(DL)/$(OLDSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSOVER)*
- cp $(LIBSOVER) $(DL)
- cp $(OLDSOVER) $(DL)
- chmod 755 $(DL)/$(LIBSOVER)
- chmod 755 $(DL)/$(OLDSOVER)
- (cd $(DL); \
- $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
- $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
- $(LN_SF) $(LIBSOMAJ) $(LIBSO))
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
- -@$(RM_F) $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- $(CC) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
-
-clean:
- $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
- $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
- $(OLDSOVER) \
- libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-png.o png.pic.o: png.h pngconf.h png.c
-pngerror.o pngerror.pic.o: png.h pngconf.h pngerror.c
-pngrio.o pngrio.pic.o: png.h pngconf.h pngrio.c
-pngwio.o pngwio.pic.o: png.h pngconf.h pngwio.c
-pngmem.o pngmem.pic.o: png.h pngconf.h pngmem.c
-pngset.o pngset.pic.o: png.h pngconf.h pngset.c
-pngget.o pngget.pic.o: png.h pngconf.h pngget.c
-pngread.o pngread.pic.o: png.h pngconf.h pngread.c
-pngrtran.o pngrtran.pic.o: png.h pngconf.h pngrtran.c
-pngrutil.o pngrutil.pic.o: png.h pngconf.h pngrutil.c
-pngtrans.o pngtrans.pic.o: png.h pngconf.h pngtrans.c
-pngwrite.o pngwrite.pic.o: png.h pngconf.h pngwrite.c
-pngwtran.o pngwtran.pic.o: png.h pngconf.h pngwtran.c
-pngwutil.o pngwutil.pic.o: png.h pngconf.h pngwutil.c
-pngpread.o pngpread.pic.o: png.h pngconf.h pngpread.c
-
-pngtest.o: png.h pngconf.h pngtest.c
diff --git a/src/3rdparty/libpng/scripts/makefile.hp64 b/src/3rdparty/libpng/scripts/makefile.hp64
index 27f6c234cd..300421aa6d 100644
--- a/src/3rdparty/libpng/scripts/makefile.hp64
+++ b/src/3rdparty/libpng/scripts/makefile.hp64
@@ -2,7 +2,7 @@
# Copyright (C) 1999-2002, 2006, 2009 Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
@@ -19,9 +19,9 @@ ZLIBINC=/opt/zlib/include
# SHAREDLIB=libz.sl
# Library name:
-LIBNAME = libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.40
+LIBNAME = libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
@@ -29,8 +29,8 @@ LIBSO=$(LIBNAME).sl
LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
LIBSOVER=$(LIBNAME).sl.$(PNGVER)
OLDSO=libpng.sl
-OLDSOMAJ=libpng.sl.3
-OLDSOVER=libpng.sl.3.$(PNGMIN)
+OLDSOMAJ=libpng.sl.14
+OLDSOVER=libpng.sl.14.$(PNGMIN)
# Utilities:
AR_RC=ar rc
@@ -48,7 +48,7 @@ CCFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
-# where make install puts libpng.a, libpng12.sl, and png.h
+# where make install puts libpng.a, libpng14.sl, and png.h
prefix=/opt/libpng
exec_prefix=$(prefix)
INCPATH=$(prefix)/include
@@ -93,7 +93,7 @@ libpng.pc:
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
libpng-config:
( cat scripts/libpng-config-head.in; \
@@ -101,7 +101,7 @@ libpng-config:
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
echo ccopts=\"-Ae +DA1.1 +DS2.0\"; \
echo L_opts=\"-L$(LIBPATH)\"; \
- echo libs=\"-lpng12 -lz -lm\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
@@ -220,20 +220,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.hpgcc b/src/3rdparty/libpng/scripts/makefile.hpgcc
index dc05d5a02d..5a147e69c0 100644
--- a/src/3rdparty/libpng/scripts/makefile.hpgcc
+++ b/src/3rdparty/libpng/scripts/makefile.hpgcc
@@ -3,15 +3,15 @@
# Copyright (C) 2001, Laurent faillie
# Copyright (C) 1998, 1999 Greg Roelofs
# Copyright (C) 1996, 1997 Andreas Dilger
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# Library name:
-LIBNAME = libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.40
+LIBNAME = libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
@@ -19,8 +19,8 @@ LIBSO=$(LIBNAME).sl
LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
LIBSOVER=$(LIBNAME).sl.$(PNGVER)
OLDSO=libpng.sl
-OLDSOMAJ=libpng.sl.3
-OLDSOVER=libpng.sl.3.$(PNGMIN)
+OLDSOMAJ=libpng.sl.14
+OLDSOVER=libpng.sl.14.$(PNGMIN)
# Utilities:
CC=gcc
@@ -58,8 +58,8 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
-#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm
+#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng14 -lz -lm
+LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz -lm
INCPATH=$(prefix)/include
LIBPATH=$(exec_prefix)/lib
@@ -103,13 +103,13 @@ libpng.pc:
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
libpng-config:
( cat scripts/libpng-config-head.in; \
echo prefix=\"$(prefix)\"; \
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo libs=\"-lpng12 -lz -lm\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
@@ -229,20 +229,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.hpux b/src/3rdparty/libpng/scripts/makefile.hpux
index 31602190f7..4966fa9349 100644
--- a/src/3rdparty/libpng/scripts/makefile.hpux
+++ b/src/3rdparty/libpng/scripts/makefile.hpux
@@ -2,7 +2,7 @@
# Copyright (C) 1999-2002, 2006 Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
@@ -19,9 +19,9 @@ ZLIBINC=/opt/zlib/include
# SHAREDLIB=libz.sl
# Library name:
-LIBNAME = libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.40
+LIBNAME = libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
@@ -29,8 +29,8 @@ LIBSO=$(LIBNAME).sl
LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
LIBSOVER=$(LIBNAME).sl.$(PNGVER)
OLDSO=libpng.sl
-OLDSOMAJ=libpng.sl.3
-OLDSOVER=libpng.sl.3.$(PNGMIN)
+OLDSOMAJ=libpng.sl.14
+OLDSOVER=libpng.sl.14.$(PNGMIN)
# Utilities:
AR_RC=ar rc
@@ -40,7 +40,7 @@ LN_SF=ln -sf
RANLIB=ranlib
RM_F=/bin/rm -f
-# where make install puts libpng.a, libpng12.sl, and png.h
+# where make install puts libpng.a, libpng14.sl, and png.h
prefix=/opt/libpng
exec_prefix=$(prefix)
INCPATH=$(prefix)/include
@@ -48,7 +48,7 @@ LIBPATH=$(exec_prefix)/lib
MANPATH=$(prefix)/man
BINPATH=$(exec_prefix)/bin
-CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0 -DPNG_NO_MMX_CODE
+CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
# Caution: be sure you have built zlib with the same CFLAGS.
CCFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
@@ -90,7 +90,7 @@ libpng.pc:
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
libpng-config:
( cat scripts/libpng-config-head.in; \
@@ -98,7 +98,7 @@ libpng-config:
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
echo ccopts=\"-Ae +DA1.1 +DS2.0\"; \
echo L_opts=\"-L$(LIBPATH)\"; \
- echo libs=\"-lpng12 -lz -lm\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
@@ -217,20 +217,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.ibmc b/src/3rdparty/libpng/scripts/makefile.ibmc
index 35d7f56101..b0b445ab26 100644
--- a/src/3rdparty/libpng/scripts/makefile.ibmc
+++ b/src/3rdparty/libpng/scripts/makefile.ibmc
@@ -2,11 +2,11 @@
# IBM C version 3.x for Win32 and OS/2
# Copyright (C) 2006 Glenn Randers-Pehrson
# Copyright (C) 2000 Cosmin Truta
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
-
+#
# Notes:
# Derived from makefile.std
# All modules are compiled in C mode
@@ -58,20 +58,20 @@ clean:
$(RM) pngtest$(E)
$(RM) pngout.png
-png$(O): png.h pngconf.h
-pngerror$(O): png.h pngconf.h
-pngget$(O): png.h pngconf.h
-pngmem$(O): png.h pngconf.h
-pngpread$(O): png.h pngconf.h
-pngread$(O): png.h pngconf.h
-pngrio$(O): png.h pngconf.h
-pngrtran$(O): png.h pngconf.h
-pngrutil$(O): png.h pngconf.h
-pngset$(O): png.h pngconf.h
-pngtrans$(O): png.h pngconf.h
-pngwio$(O): png.h pngconf.h
-pngwrite$(O): png.h pngconf.h
-pngwtran$(O): png.h pngconf.h
-pngwutil$(O): png.h pngconf.h
+png$(O): png.h pngconf.h pngpriv.h
+pngerror$(O): png.h pngconf.h pngpriv.h
+pngget$(O): png.h pngconf.h pngpriv.h
+pngmem$(O): png.h pngconf.h pngpriv.h
+pngpread$(O): png.h pngconf.h pngpriv.h
+pngread$(O): png.h pngconf.h pngpriv.h
+pngrio$(O): png.h pngconf.h pngpriv.h
+pngrtran$(O): png.h pngconf.h pngpriv.h
+pngrutil$(O): png.h pngconf.h pngpriv.h
+pngset$(O): png.h pngconf.h pngpriv.h
+pngtrans$(O): png.h pngconf.h pngpriv.h
+pngwio$(O): png.h pngconf.h pngpriv.h
+pngwrite$(O): png.h pngconf.h pngpriv.h
+pngwtran$(O): png.h pngconf.h pngpriv.h
+pngwutil$(O): png.h pngconf.h pngpriv.h
pngtest$(O): png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.intel b/src/3rdparty/libpng/scripts/makefile.intel
index 88a2957601..fb705e121d 100644
--- a/src/3rdparty/libpng/scripts/makefile.intel
+++ b/src/3rdparty/libpng/scripts/makefile.intel
@@ -4,13 +4,13 @@
# Copyright (C) 2006 Glenn Randers-Pehrson
# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is
# copyright 1995 Guy Eric Schalnat, Group 42, Inc.
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
-
+#
# To use, do "nmake /f scripts\makefile.intel"
-
+#
# ------------------- Intel C/C++ Compiler 4.0 and later -------------------
# Where the zlib library and include files are located
@@ -44,49 +44,49 @@ pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
all: test
-png$(O): png.h pngconf.h
+png$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngset$(O): png.h pngconf.h
+pngset$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngget$(O): png.h pngconf.h
+pngget$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngread$(O): png.h pngconf.h
+pngread$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngpread$(O): png.h pngconf.h
+pngpread$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngrtran$(O): png.h pngconf.h
+pngrtran$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngrutil$(O): png.h pngconf.h
+pngrutil$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngerror$(O): png.h pngconf.h
+pngerror$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngmem$(O): png.h pngconf.h
+pngmem$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngrio$(O): png.h pngconf.h
+pngrio$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngwio$(O): png.h pngconf.h
+pngwio$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngtrans$(O): png.h pngconf.h
+pngtrans$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngwrite$(O): png.h pngconf.h
+pngwrite$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngwtran$(O): png.h pngconf.h
+pngwtran$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngwutil$(O): png.h pngconf.h
+pngwutil$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
libpng.lib: $(OBJS)
diff --git a/src/3rdparty/libpng/scripts/makefile.knr b/src/3rdparty/libpng/scripts/makefile.knr
index 7b465856d7..75cb1b58aa 100644
--- a/src/3rdparty/libpng/scripts/makefile.knr
+++ b/src/3rdparty/libpng/scripts/makefile.knr
@@ -1,11 +1,11 @@
# makefile for libpng
# Copyright (C) 2002, 2006, 2009 Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
-
+#
# This makefile requires the file ansi2knr.c, which you can get
# from the Ghostscript ftp site at ftp://ftp.cs.wisc.edu/ghost/
# If you have libjpeg, you probably already have ansi2knr.c in the jpeg
@@ -84,20 +84,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.linux b/src/3rdparty/libpng/scripts/makefile.linux
index ba60a218d3..8d02d5a493 100644
--- a/src/3rdparty/libpng/scripts/makefile.linux
+++ b/src/3rdparty/libpng/scripts/makefile.linux
@@ -1,16 +1,16 @@
-# makefile for libpng.a and libpng12.so on Linux ELF with gcc
+# makefile for libpng.a and libpng14.so on Linux ELF with gcc
# Copyright (C) 1998, 1999, 2002, 2006, 2008 Greg Roelofs and
# Glenn Randers-Pehrson
# Copyright (C) 1996, 1997 Andreas Dilger
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# Library name:
-LIBNAME = libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.40
+LIBNAME = libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
@@ -18,8 +18,8 @@ LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
LIBSOVER=$(LIBNAME).so.$(PNGVER)
OLDSO=libpng.so
-OLDSOMAJ=libpng.so.3
-OLDSOVER=libpng.so.3.$(PNGMIN)
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
# Utilities:
AR_RC=ar rc
@@ -29,8 +29,8 @@ LN_SF=ln -sf
RANLIB=ranlib
RM_F=/bin/rm -f
-# where "make install" puts libpng12.a, libpng12.so*,
-# libpng12/png.h and libpng12/pngconf.h
+# where "make install" puts libpng14.a, libpng14.so*,
+# libpng14/png.h and libpng14/pngconf.h
# Prefix must be a full pathname.
prefix=/usr/local
exec_prefix=$(prefix)
@@ -51,10 +51,10 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
-CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \
+CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops \
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
-LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
+LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng14 -lz -lm
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
INCPATH=$(prefix)/include
@@ -99,7 +99,7 @@ libpng.pc:
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
libpng-config:
( cat scripts/libpng-config-head.in; \
@@ -107,7 +107,7 @@ libpng-config:
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
echo L_opts=\"-L$(LIBPATH)\"; \
echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
- echo libs=\"-lpng12 -lz -lm\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
@@ -234,20 +234,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.mingw b/src/3rdparty/libpng/scripts/makefile.mingw
index 50c52ea561..8faad93151 100644
--- a/src/3rdparty/libpng/scripts/makefile.mingw
+++ b/src/3rdparty/libpng/scripts/makefile.mingw
@@ -7,7 +7,7 @@
# and Glenn Randers-Pehrson, based on makefile for linux-elf w/mmx by:
# Copyright (C) 1998-2000, 2007 Greg Roelofs
# Copyright (C) 1996, 1997 Andreas Dilger
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
@@ -61,23 +61,14 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-Wmissing-declarations -Wtraditional -Wcast-align \
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-### if you don't need thread safety, but want the asm accel
-#CFLAGS= $(strip $(MINGW_CCFLAGS) -DPNG_THREAD_UNSAFE_OK \
-# $(addprefix -I,$(ZLIBINC)) -W -Wall -O $(ALIGN) -funroll-loops \
-# -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
-### if you need thread safety and want (minimal) asm accel
-#CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
-# -W -Wall -O $(ALIGN) -funroll-loops \
-# -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
-### Normal (non-asm) compilation
CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
- -W -Wall -O3 $(ALIGN) -funroll-loops -DPNG_NO_MMX_CODE \
+ -W -Wall -O3 $(ALIGN) -funroll-loops \
-fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
-LIBNAME = libpng12
-PNGMAJ = 0
-MINGDLL = 12
-PNGMIN = 1.2.40
+LIBNAME = libpng14
+PNGMAJ = 14
+MINGDLL = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB=libpng$(MINGDLL).dll
@@ -138,7 +129,7 @@ libpng.pc: scripts/libpng.pc.in
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
-e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
libpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in
@echo -e Making $(LIBNAME) libpng-config file for this libpng \
@@ -160,7 +151,7 @@ $(STATLIB): $(OBJS)
$(AR) rc $@ $(OBJS)
$(RANLIB) $@
-$(SHAREDDEF): scripts/pngw32.def
+$(SHAREDDEF): scripts/pngwin.def
cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \
sed -e 's/\([^;]*\);/;/' > $@
@@ -245,16 +236,16 @@ test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) $(CFLAGS) \
- `$(BINPATH)/libpng12-config --cflags` pngtest.c \
+ `$(BINPATH)/libpng14-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) \
- -o pngtestd `$(BINPATH)/libpng12-config --ldflags`
+ -o pngtestd `$(BINPATH)/libpng14-config --ldflags`
./pngtestd pngtest.png
test-installed:
$(CC) $(CFLAGS) \
- `$(BINPATH)/libpng12-config --cflags` pngtest.c \
+ `$(BINPATH)/libpng14-config --cflags` pngtest.c \
-L$(ZLIBLIB) \
- -o pngtesti$(EXE) `$(BINPATH)/libpng12-config --ldflags`
+ -o pngtesti$(EXE) `$(BINPATH)/libpng14-config --ldflags`
./pngtesti$(EXE) pngtest.png
clean:
@@ -270,20 +261,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o png.pic.o: png.h pngconf.h png.c
-pngerror.o pngerror.pic.o: png.h pngconf.h pngerror.c
-pngrio.o pngrio.pic.o: png.h pngconf.h pngrio.c
-pngwio.o pngwio.pic.o: png.h pngconf.h pngwio.c
-pngmem.o pngmem.pic.o: png.h pngconf.h pngmem.c
-pngset.o pngset.pic.o: png.h pngconf.h pngset.c
-pngget.o pngget.pic.o: png.h pngconf.h pngget.c
-pngread.o pngread.pic.o: png.h pngconf.h pngread.c
-pngrtran.o pngrtran.pic.o: png.h pngconf.h pngrtran.c
-pngrutil.o pngrutil.pic.o: png.h pngconf.h pngrutil.c
-pngtrans.o pngtrans.pic.o: png.h pngconf.h pngtrans.c
-pngwrite.o pngwrite.pic.o: png.h pngconf.h pngwrite.c
-pngwtran.o pngwtran.pic.o: png.h pngconf.h pngwtran.c
-pngwutil.o pngwutil.pic.o: png.h pngconf.h pngwutil.c
-pngpread.o pngpread.pic.o: png.h pngconf.h pngpread.c
+png.o png.pic.o: png.h pngconf.h pngpriv.h png.c
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h pngerror.c
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h pngrio.c
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h pngwio.c
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h pngmem.c
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h pngset.c
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h pngget.c
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h pngread.c
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h pngrtran.c
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h pngrutil.c
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h pngtrans.c
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h pngwrite.c
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h pngwtran.c
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h pngwutil.c
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngpread.c
pngtest.o pngtest.pic.o: png.h pngconf.h pngtest.c
diff --git a/src/3rdparty/libpng/scripts/makefile.mips b/src/3rdparty/libpng/scripts/makefile.mips
index 0e7484f3ff..5e1040ed4c 100644
--- a/src/3rdparty/libpng/scripts/makefile.mips
+++ b/src/3rdparty/libpng/scripts/makefile.mips
@@ -1,7 +1,7 @@
# makefile for libpng
# Copyright (C) Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
@@ -68,20 +68,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.msc b/src/3rdparty/libpng/scripts/makefile.msc
index ab95ff8018..e74464440e 100644
--- a/src/3rdparty/libpng/scripts/makefile.msc
+++ b/src/3rdparty/libpng/scripts/makefile.msc
@@ -1,11 +1,11 @@
# makefile for libpng
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
# Copyright (C) 2006, 2009 Glenn Randers-Pehrson
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
-
+#
# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
# -------- Microsoft C 5.1 and later, does not use assembler code --------
@@ -27,49 +27,49 @@ OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
all: libpng.lib
-png$(O): png.h pngconf.h
+png$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngset$(O): png.h pngconf.h
+pngset$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngget$(O): png.h pngconf.h
+pngget$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngread$(O): png.h pngconf.h
+pngread$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngpread$(O): png.h pngconf.h
+pngpread$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngrtran$(O): png.h pngconf.h
+pngrtran$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngrutil$(O): png.h pngconf.h
+pngrutil$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngerror$(O): png.h pngconf.h
+pngerror$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngmem$(O): png.h pngconf.h
+pngmem$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngrio$(O): png.h pngconf.h
+pngrio$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngwio$(O): png.h pngconf.h
+pngwio$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngtrans$(O): png.h pngconf.h
+pngtrans$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngwrite$(O): png.h pngconf.h
+pngwrite$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngwtran$(O): png.h pngconf.h
+pngwtran$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngwutil$(O): png.h pngconf.h
+pngwutil$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
diff --git a/src/3rdparty/libpng/scripts/makefile.ne12bsd b/src/3rdparty/libpng/scripts/makefile.ne12bsd
index 7457cbbc2a..acf9c3cd9f 100644
--- a/src/3rdparty/libpng/scripts/makefile.ne12bsd
+++ b/src/3rdparty/libpng/scripts/makefile.ne12bsd
@@ -3,7 +3,7 @@
# make includes && make install
# Copyright (C) 2002 Patrick R.L. Welche
# Copyright (C) 2007, 2009 Glenn Randers-Pehrson
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
@@ -13,11 +13,11 @@
LOCALBASE?=/usr/local
LIBDIR= ${LOCALBASE}/lib
MANDIR= ${LOCALBASE}/man
-INCSDIR=${LOCALBASE}/include/libpng12
+INCSDIR=${LOCALBASE}/include/libpng14
-LIB= png12
+LIB= png14
SHLIB_MAJOR= 0
-SHLIB_MINOR= 1.2.40
+SHLIB_MINOR= 1.4.0
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c
@@ -29,10 +29,7 @@ CPPFLAGS+=-I${.CURDIR}
# We should be able to do something like this instead of the manual
# uncommenting, but it core dumps for me at the moment:
# .if ${MACHINE_ARCH} == "i386"
-# CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK
# MKLINT= no
-# .else
- CPPFLAGS+=-DPNG_NO_MMX_CODE
# .endif
CLEANFILES+=pngtest.o pngtest
diff --git a/src/3rdparty/libpng/scripts/makefile.netbsd b/src/3rdparty/libpng/scripts/makefile.netbsd
index b334bfde7c..ef470f83d2 100644
--- a/src/3rdparty/libpng/scripts/makefile.netbsd
+++ b/src/3rdparty/libpng/scripts/makefile.netbsd
@@ -2,22 +2,22 @@
# make obj && make depend && make && make test
# make includes && make install
# Copyright (C) 2002 Patrick R.L. Welche
-# Copyright (C) 2007, 2009 Glenn Randers-Pehrson
-
+# Copyright (C) 2007-2009 Glenn Randers-Pehrson
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
-# You should also run makefile.ne0bsd
+# You should also run makefile.ne14bsd
LOCALBASE?=/usr/local
LIBDIR= ${LOCALBASE}/lib
MANDIR= ${LOCALBASE}/man
-INCSDIR=${LOCALBASE}/include/libpng
+INCSDIR=${LOCALBASE}/include
LIB= png
SHLIB_MAJOR= 3
-SHLIB_MINOR= 1.2.40
+SHLIB_MINOR= 1.4.0
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c
@@ -29,10 +29,7 @@ CPPFLAGS+=-I${.CURDIR}
# We should be able to do something like this instead of the manual
# uncommenting, but it core dumps for me at the moment:
# .if ${MACHINE_ARCH} == "i386"
-# CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK
# MKLINT= no
-# .else
- CPPFLAGS+=-DPNG_NO_MMX_CODE
# .endif
CLEANFILES+=pngtest.o pngtest
diff --git a/src/3rdparty/libpng/scripts/makefile.nommx b/src/3rdparty/libpng/scripts/makefile.nommx
deleted file mode 100644
index e2297d806c..0000000000
--- a/src/3rdparty/libpng/scripts/makefile.nommx
+++ /dev/null
@@ -1,255 +0,0 @@
-# makefile for libpng.a and libpng12.so on Linux ELF with gcc
-# Copyright (C) 1998, 1999, 2002, 2006-2008 Greg Roelofs and
-# Glenn Randers-Pehrson
-# Copyright (C) 1996, 1997 Andreas Dilger
-
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Library name:
-LIBNAME = libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.40
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-# Shared library names:
-LIBSO=$(LIBNAME).so
-LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOVER=$(LIBNAME).so.$(PNGVER)
-OLDSO=libpng.so
-OLDSOMAJ=libpng.so.3
-OLDSOVER=libpng.so.3.$(PNGMIN)
-
-# Utilities:
-AR_RC=ar rc
-CC=gcc
-MKDIR_P=mkdir -p
-LN_SF=ln -sf
-RANLIB=ranlib
-RM_F=/bin/rm -f
-
-# where "make install" puts libpng12.a, libpng12.so*,
-# libpng12/png.h and libpng12/pngconf.h
-# Prefix must be a full pathname.
-prefix=/usr/local
-exec_prefix=$(prefix)
-
-# Where the zlib library and include files are located.
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-ALIGN=
-# for i386:
-#ALIGN=-malign-loops=2 -malign-functions=2
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
- -Wmissing-declarations -Wtraditional -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-
-# for pgcc version 2.95.1, -O3 is buggy; don't use it.
-
-CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \
- $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
-
-LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
-LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
-
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES: .c .o .pic.o
-
-.c.pic.o:
- $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
-
-all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz\ -lm! \
- -e s!Cflags: !Cflags:\ -DPNG_NO_MMX_CODE!> libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME) -DPNG_NO_MMX_CODE\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
- echo libs=\"-lpng12 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBSO): $(LIBSOMAJ)
- $(LN_SF) $(LIBSOMAJ) $(LIBSO)
-
-$(LIBSOMAJ): $(LIBSOVER)
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
-
-$(LIBSOVER): $(OBJSDLL)
- $(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL)
-
-$(OLDSOVER): $(OBJSDLL)
- $(CC) -shared -Wl,-soname,$(OLDSOMAJ) \
- -o $(OLDSOVER) \
- $(OBJSDLL)
-
-pngtest: pngtest.o $(LIBSO)
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-pngtest-static: pngtest.o libpng.a
- $(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
-
-test: pngtest pngtest-static
- @echo ""
- @echo " Running pngtest dynamically linked with $(LIBSO):"
- @echo ""
- ./pngtest
- @echo ""
- @echo " Running pngtest statically linked with libpng.a:"
- @echo ""
- ./pngtest-static
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOVER) libpng.pc \
- $(OLDSOVER)
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSO)
- -@$(RM_F) $(DL)/$(OLDSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSOVER)*
- cp $(LIBSOVER) $(DL)
- cp $(OLDSOVER) $(DL)
- chmod 755 $(DL)/$(LIBSOVER)
- chmod 755 $(DL)/$(OLDSOVER)
- (cd $(DL); \
- $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
- $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
- $(LN_SF) $(LIBSOMAJ) $(LIBSO))
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
- -@$(RM_F) $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- $(CC) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
-
-clean:
- $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
- $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
- $(OLDSOVER) \
- libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h png.c
-pngerror.o pngerror.pic.o: png.h pngconf.h pngerror.c
-pngrio.o pngrio.pic.o: png.h pngconf.h pngrio.c
-pngwio.o pngwio.pic.o: png.h pngconf.h pngwio.c
-pngmem.o pngmem.pic.o: png.h pngconf.h pngmem.c
-pngset.o pngset.pic.o: png.h pngconf.h pngset.c
-pngget.o pngget.pic.o: png.h pngconf.h pngget.c
-pngread.o pngread.pic.o: png.h pngconf.h pngread.c
-pngrtran.o pngrtran.pic.o: png.h pngconf.h pngrtran.c
-pngrutil.o pngrutil.pic.o: png.h pngconf.h pngrutil.c
-pngtrans.o pngtrans.pic.o: png.h pngconf.h pngtrans.c
-pngwrite.o pngwrite.pic.o: png.h pngconf.h pngwrite.c
-pngwtran.o pngwtran.pic.o: png.h pngconf.h pngwtran.c
-pngwutil.o pngwutil.pic.o: png.h pngconf.h pngwutil.c
-pngpread.o pngpread.pic.o: png.h pngconf.h pngpread.c
-
-pngtest.o: png.h pngconf.h pngtest.c
diff --git a/src/3rdparty/libpng/scripts/makefile.openbsd b/src/3rdparty/libpng/scripts/makefile.openbsd
index 533c6b82de..c92428467b 100644
--- a/src/3rdparty/libpng/scripts/makefile.openbsd
+++ b/src/3rdparty/libpng/scripts/makefile.openbsd
@@ -1,7 +1,7 @@
# makefile for libpng
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-# Copyright (C) 2007-2008 Glenn Randers-Pehrson
-
+# Copyright (C) 2007-2009 Glenn Randers-Pehrson
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
@@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib
MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 0
-SHLIB_MINOR= 1.2.40
+SHLIB_MINOR= 1.4.0
LIB= png
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
@@ -21,7 +21,7 @@ SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
HDRS= png.h pngconf.h
CFLAGS+= -W -Wall
-CPPFLAGS+= -I${.CURDIR} -DPNG_NO_MMX_CODE
+CPPFLAGS+= -I${.CURDIR}
NOPROFILE= Yes
@@ -42,7 +42,7 @@ test: pngtest
beforeinstall:
if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \
- ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include/libpng; \
+ ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include; \
fi
if [ ! -d ${DESTDIR}${LIBDIR} ]; then \
${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \
@@ -67,7 +67,7 @@ afterinstall:
@rm -f ${DESTDIR}${PREFIX}/include/pngconf.h
@rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true
${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
- -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include/libpng
+ -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
-m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
diff --git a/src/3rdparty/libpng/scripts/makefile.os2 b/src/3rdparty/libpng/scripts/makefile.os2
index 2df76adc93..affb03c1a7 100644
--- a/src/3rdparty/libpng/scripts/makefile.os2
+++ b/src/3rdparty/libpng/scripts/makefile.os2
@@ -1,5 +1,5 @@
# makefile for libpng on OS/2 with gcc
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
@@ -53,20 +53,20 @@ clean:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.sco b/src/3rdparty/libpng/scripts/makefile.sco
index 186f79d10c..22bb976607 100644
--- a/src/3rdparty/libpng/scripts/makefile.sco
+++ b/src/3rdparty/libpng/scripts/makefile.sco
@@ -4,15 +4,15 @@
# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
# Copyright (C) 1998 Greg Roelofs
# Copyright (C) 1996, 1997 Andreas Dilger
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# Library name:
-LIBNAME = libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.40
+LIBNAME = libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
@@ -20,8 +20,8 @@ LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
LIBSOVER=$(LIBNAME).so.$(PNGVER)
OLDSO=libpng.so
-OLDSOMAJ=libpng.so.3
-OLDSOVER=libpng.so.3.$(PNGMIN)
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
# Utilities:
CC=cc
@@ -41,10 +41,10 @@ exec_prefix=$(prefix)
ZLIBLIB=../zlib
ZLIBINC=../zlib
-CFLAGS= -dy -belf -I$(ZLIBINC) -O3 -DPNG_NO_MMX_CODE
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm
+CFLAGS= -dy -belf -I$(ZLIBINC) -O3
+LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz -lm
-INCPATH=$(prefix)/include/libpng
+INCPATH=$(prefix)/include
LIBPATH=$(exec_prefix)/lib
MANPATH=$(prefix)/man
BINPATH=$(exec_prefix)/bin
@@ -86,7 +86,7 @@ libpng.pc:
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
libpng-config:
( cat scripts/libpng-config-head.in; \
@@ -94,7 +94,7 @@ libpng-config:
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
echo ccopts=\"-belf\"; \
echo L_opts=\"-L$(LIBPATH)\"; \
- echo libs=\"-lpng12 -lz -lm\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
@@ -213,20 +213,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.sggcc b/src/3rdparty/libpng/scripts/makefile.sggcc
index 3b5f7f2211..bcc9d01d66 100644
--- a/src/3rdparty/libpng/scripts/makefile.sggcc
+++ b/src/3rdparty/libpng/scripts/makefile.sggcc
@@ -1,15 +1,15 @@
-# makefile for libpng.a and libpng12.so, SGI IRIX with 'cc'
+# makefile for libpng.a and libpng14.so, SGI IRIX with 'cc'
# Copyright (C) 2001-2002, 2006 Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# Library name:
-LIBNAME=libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.40
+LIBNAME=libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
@@ -17,8 +17,8 @@ LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
LIBSOVER=$(LIBNAME).so.$(PNGVER)
OLDSO=libpng.so
-OLDSOMAJ=libpng.so.3
-OLDSOVER=libpng.so.3.$(PNGMIN)
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
# Utilities:
AR_RC=ar rc
@@ -28,7 +28,7 @@ LN_SF=ln -sf
RANLIB=echo
RM_F=/bin/rm -f
-# Where make install puts libpng.a, libpng12.so, and libpng12/png.h
+# Where make install puts libpng.a, libpng14.so, and libpng14/png.h
# Prefix must be a full pathname.
prefix=/usr/local
@@ -47,7 +47,7 @@ ZLIBINC=../zlib
ABI=
WARNMORE= # -g -DPNG_DEBUG=5
-CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -fPIC -mabi=n32 -DPNG_NO_MMX_CODE
+CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -fPIC -mabi=n32
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
-set_version sgi$(PNGMAJ).0
@@ -93,18 +93,18 @@ libpng.pc:
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
libpng-config:
( cat scripts/libpng-config-head.in; \
echo prefix=\"$(prefix)\"; \
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
echo ccopts=\"$(ABI)\"; \
- echo cppflags=\"-DPNG_NO_MMX_CODE\"; \
+ echo cppflags=\"\"; \
echo ldopts=\"$(ABI)\"; \
echo L_opts=\"-L$(LIBPATH)\"; \
echo libdir=\"$(LIBPATH)\"; \
- echo libs=\"-lpng12 -lz -lm\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
@@ -224,20 +224,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.sgi b/src/3rdparty/libpng/scripts/makefile.sgi
index cb48d8f28f..c7550f1cf5 100644
--- a/src/3rdparty/libpng/scripts/makefile.sgi
+++ b/src/3rdparty/libpng/scripts/makefile.sgi
@@ -1,15 +1,15 @@
-# makefile for libpng.a and libpng12.so, SGI IRIX with 'cc'
+# makefile for libpng.a and libpng14.so, SGI IRIX with 'cc'
# Copyright (C) 2001-2002, 2006, 2007 Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# Library name:
-LIBNAME=libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.40
+LIBNAME=libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
@@ -17,8 +17,8 @@ LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
LIBSOVER=$(LIBNAME).so.$(PNGVER)
OLDSO=libpng.so
-OLDSOMAJ=libpng.so.3
-OLDSOVER=libpng.so.3.$(PNGMIN)
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
# Utilities:
AR_RC=ar rc
@@ -28,7 +28,7 @@ LN_SF=ln -sf
RANLIB=echo
RM_F=/bin/rm -f
-# Where make install puts libpng.a, libpng12.so, and libpng12/png.h
+# Where make install puts libpng.a, libpng14.so, and libpng14/png.h
# Prefix must be a full pathname.
prefix=/usr/local
@@ -48,9 +48,9 @@ ABI=
WARNMORE=-fullwarn
# Note: -KPIC is the default anyhow
-#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC -DPNG_NO_MMX_CODE # -g -DPNG_DEBUG=5
-CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -DPNG_NO_MMX_CODE
-LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng12 -lz -lm
+#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC # -g -DPNG_DEBUG=5
+CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE)
+LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng14 -lz -lm
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
-set_version sgi$(PNGMAJ).0
@@ -96,18 +96,17 @@ libpng.pc:
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
libpng-config:
( cat scripts/libpng-config-head.in; \
echo prefix=\"$(prefix)\"; \
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo cppflags=\"-DPNG_NO_MMX_CODE\"; \
echo ccopts=\"$(ABI)\"; \
echo ldopts=\"$(ABI)\"; \
echo L_opts=\"-L$(LIBPATH)\"; \
echo libdir=\"$(LIBPATH)\"; \
- echo libs=\"-lpng12 -lz -lm\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
@@ -229,20 +228,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.so9 b/src/3rdparty/libpng/scripts/makefile.so9
index d182f4d5a4..fb09b9ecbd 100644
--- a/src/3rdparty/libpng/scripts/makefile.so9
+++ b/src/3rdparty/libpng/scripts/makefile.so9
@@ -4,24 +4,24 @@
# Copyright (C) 2002, 2006, 2008 Glenn Randers-Pehrson
# Copyright (C) 1998-2001 Greg Roelofs
# Copyright (C) 1996-1997 Andreas Dilger
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# Library name:
-PNGMAJ = 0
-PNGMIN = 1.2.40
+PNGMAJ = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
-LIBNAME = libpng12
+LIBNAME = libpng14
# Shared library names:
LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
LIBSOVER=$(LIBNAME).so.$(PNGVER)
OLDSO=libpng.so
-OLDSOMAJ=libpng.so.3
-OLDSOVER=libpng.so.3.$(PNGMIN)
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
# Utilities:
# gcc 2.95 doesn't work.
@@ -52,7 +52,7 @@ ZLIBINC=/usr/include
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
#CFLAGS=-I$(ZLIBINC) -W -Wall -O3 $(WARNMORE) -g -DPNG_DEBUG=5 -DPNG_NO_MMX_CODE
CFLAGS=-I$(ZLIBINC) -O3 -DPNG_NO_MMX_CODE
-LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
+LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
INCPATH=$(prefix)/include
LIBPATH=$(exec_prefix)/lib
@@ -96,7 +96,7 @@ libpng.pc:
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
libpng-config:
( cat scripts/libpng-config-head.in; \
@@ -104,7 +104,7 @@ libpng-config:
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
echo L_opts=\"-L$(LIBPATH)\"; \
echo R_opts=\"-R$(LIBPATH)\"; \
- echo libs=\"-lpng12 -lz -lm\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
@@ -235,20 +235,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.solaris b/src/3rdparty/libpng/scripts/makefile.solaris
index 65c1c08614..6c4adfc8a9 100644
--- a/src/3rdparty/libpng/scripts/makefile.solaris
+++ b/src/3rdparty/libpng/scripts/makefile.solaris
@@ -3,15 +3,15 @@
# Contributed by William L. Sebok, based on makefile.linux
# Copyright (C) 1998 Greg Roelofs
# Copyright (C) 1996, 1997 Andreas Dilger
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# Library name:
-LIBNAME = libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.40
+LIBNAME = libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
@@ -19,8 +19,8 @@ LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
LIBSOVER=$(LIBNAME).so.$(PNGVER)
OLDSO=libpng.so
-OLDSOMAJ=libpng.so.3
-OLDSOVER=libpng.so.3.$(PNGMIN)
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
# Utilities:
AR_RC=ar rc
@@ -30,7 +30,7 @@ LN_SF=ln -f -s
RANLIB=echo
RM_F=/bin/rm -f
-# Where make install puts libpng.a, libpng12.so*, and png.h
+# Where make install puts libpng.a, libpng14.so*, and png.h
prefix=/usr/local
exec_prefix=$(prefix)
@@ -46,9 +46,9 @@ ZLIBINC=/usr/local/include
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-Wmissing-declarations -Wtraditional -Wcast-align \
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-CFLAGS=-I$(ZLIBINC) -W -Wall -O -DPNG_NO_MMX_CODE; \
+CFLAGS=-I$(ZLIBINC) -W -Wall -O \
# $(WARNMORE) -g -DPNG_DEBUG=5
-LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
+LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
INCPATH=$(prefix)/include
LIBPATH=$(exec_prefix)/lib
@@ -92,16 +92,16 @@ libpng.pc:
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
libpng-config:
( cat scripts/libpng-config-head.in; \
echo prefix=\"$(prefix)\"; \
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo cppflags=\"-DPNG_NO_MMX_CODE\"; \
+ echo cppflags=\"\"; \
echo L_opts=\"-L$(LIBPATH)\"; \
echo R_opts=\"-R$(LIBPATH)\"; \
- echo libs=\"-lpng12 -lz -lm\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
@@ -232,20 +232,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.solaris-x86 b/src/3rdparty/libpng/scripts/makefile.solaris-x86
index 581916ef45..8ee7be1408 100644
--- a/src/3rdparty/libpng/scripts/makefile.solaris-x86
+++ b/src/3rdparty/libpng/scripts/makefile.solaris-x86
@@ -9,9 +9,9 @@
# and license in png.h
# Library name:
-LIBNAME = libpng12
-PNGMAJ = 0
-PNGMIN = 1.2.40
+LIBNAME = libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
@@ -19,8 +19,8 @@ LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
LIBSOVER=$(LIBNAME).so.$(PNGVER)
OLDSO=libpng.so
-OLDSOMAJ=libpng.so.3
-OLDSOVER=libpng.so.3.$(PNGMIN)
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
# Utilities:
AR_RC=ar rc
@@ -30,7 +30,7 @@ LN_SF=ln -f -s
RANLIB=echo
RM_F=/bin/rm -f
-# Where make install puts libpng.a, libpng12.so*, and png.h
+# Where make install puts libpng.a, libpng14.so*, and png.h
prefix=/usr/local
exec_prefix=$(prefix)
@@ -48,7 +48,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
CFLAGS=-I$(ZLIBINC) -W -Wall -O \
# $(WARNMORE) -g -DPNG_DEBUG=5
-LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
+LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
INCPATH=$(prefix)/include
LIBPATH=$(exec_prefix)/lib
@@ -92,7 +92,7 @@ libpng.pc:
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
- -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
libpng-config:
( cat scripts/libpng-config-head.in; \
@@ -101,7 +101,7 @@ libpng-config:
echo cppflags=\""; \
echo L_opts=\"-L$(LIBPATH)\"; \
echo R_opts=\"-R$(LIBPATH)\"; \
- echo libs=\"-lpng12 -lz -lm\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
@@ -232,20 +232,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.std b/src/3rdparty/libpng/scripts/makefile.std
index bb5268a2a2..afb885ad0f 100644
--- a/src/3rdparty/libpng/scripts/makefile.std
+++ b/src/3rdparty/libpng/scripts/makefile.std
@@ -1,7 +1,7 @@
# makefile for libpng
# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
@@ -76,20 +76,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.sunos b/src/3rdparty/libpng/scripts/makefile.sunos
index 31dff77c10..984379c0c5 100644
--- a/src/3rdparty/libpng/scripts/makefile.sunos
+++ b/src/3rdparty/libpng/scripts/makefile.sunos
@@ -1,7 +1,7 @@
# makefile for libpng
# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
@@ -81,20 +81,20 @@ writelock:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.tc3 b/src/3rdparty/libpng/scripts/makefile.tc3
index 21435a68ed..bf6ade6d5b 100644
--- a/src/3rdparty/libpng/scripts/makefile.tc3
+++ b/src/3rdparty/libpng/scripts/makefile.tc3
@@ -30,52 +30,52 @@ pngtest: pngtest$(E)
test: pngtest$(E)
pngtest$(E)
-png$(O): png.h pngconf.h
+png$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c
-pngset$(O): png.h pngconf.h
+pngset$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c
-pngget$(O): png.h pngconf.h
+pngget$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c
-pngread$(O): png.h pngconf.h
+pngread$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c
-pngpread$(O): png.h pngconf.h
+pngpread$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c
-pngrtran$(O): png.h pngconf.h
+pngrtran$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c
-pngrutil$(O): png.h pngconf.h
+pngrutil$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c
-pngerror$(O): png.h pngconf.h
+pngerror$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c
-pngmem$(O): png.h pngconf.h
+pngmem$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c
-pngrio$(O): png.h pngconf.h
+pngrio$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c
-pngwio$(O): png.h pngconf.h
+pngwio$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c
pngtest$(O): png.h pngconf.h
$(CC) -c $(CFLAGS) $*.c
-pngtrans$(O): png.h pngconf.h
+pngtrans$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c
-pngwrite$(O): png.h pngconf.h
+pngwrite$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c
-pngwtran$(O): png.h pngconf.h
+pngwtran$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c
-pngwutil$(O): png.h pngconf.h
+pngwutil$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c
libpng$(MODEL).lib: $(OBJS1) $(OBJS2) $(OBJS3)
diff --git a/src/3rdparty/libpng/scripts/makefile.vcawin32 b/src/3rdparty/libpng/scripts/makefile.vcawin32
deleted file mode 100644
index 0b89d84e2f..0000000000
--- a/src/3rdparty/libpng/scripts/makefile.vcawin32
+++ /dev/null
@@ -1,104 +0,0 @@
-# makefile for libpng
-# Copyright (C) 2006,2009 Glenn Randers-Pehrson
-# Copyright (C) 1998 Tim Wegner
-
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
-# To use, do "nmake /f scripts\makefile.vcawin32"
-
-# -------- Microsoft Visual C++ 2.0 and later, no assembler code --------
-# If you don't want to use assembler (MMX) code, use makefile.vcwin32 instead.
-
-# Compiler, linker, librarian, and other tools
-CC = cl
-LD = link
-AR = lib
-CFLAGS = -nologo -DPNG_USE_PNGVCRD -MD -O2 -W3 -I..\zlib
-LDFLAGS = -nologo
-ARFLAGS = -nologo
-RM = del
-
-# File extensions
-O=.obj
-
-#uncomment next to put error messages in a file
-#ERRFILE= >> pngerrs.log
-
-# Variables
-OBJS1 = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O)
-OBJS2 = pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O)
-OBJS3 = pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
-OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
-
-# Targets
-all: libpng.lib
-
-png$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngset$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngget$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngread$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngpread$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngrtran$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngrutil$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngerror$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngmem$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngrio$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwio$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngtrans$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwrite$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwtran$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwutil$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-libpng.lib: $(OBJS)
- -$(RM) $@
- $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE)
-
-pngtest$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngtest.exe: pngtest$(O) libpng.lib
- $(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE)
-
-test: pngtest.exe
- pngtest
-
-clean:
- -$(RM) *$(O)
- -$(RM) libpng.lib
- -$(RM) pngtest.exe
- -$(RM) pngout.png
-
-# End of makefile for libpng
-
diff --git a/src/3rdparty/libpng/scripts/makefile.vcwin32 b/src/3rdparty/libpng/scripts/makefile.vcwin32
index 8cd806a996..a65f1c1127 100644
--- a/src/3rdparty/libpng/scripts/makefile.vcwin32
+++ b/src/3rdparty/libpng/scripts/makefile.vcwin32
@@ -1,22 +1,21 @@
# makefile for libpng
# Copyright (C) 1998 Tim Wegner
# Copyright (C) 2006,2009 Glenn Randers-Pehrson
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
-
+#
# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
# To use, do "nmake /f scripts\makefile.vcwin32"
# -------- Microsoft Visual C++ 2.0 and later, no assembler code --------
-# If you want to use assembler (MMX) code, use makefile.vcawin32 instead.
# Compiler, linker, librarian, and other tools
CC = cl
LD = link
AR = lib
-CFLAGS = -nologo -DPNG_NO_MMX_CODE -MD -O2 -W3 -I..\zlib
+CFLAGS = -nologo -MD -O2 -W3 -I..\zlib
LDFLAGS = -nologo
ARFLAGS = -nologo
RM = del
@@ -36,49 +35,49 @@ OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
# Targets
all: libpng.lib
-png$(O): png.h pngconf.h
+png$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngset$(O): png.h pngconf.h
+pngset$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngget$(O): png.h pngconf.h
+pngget$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngread$(O): png.h pngconf.h
+pngread$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngpread$(O): png.h pngconf.h
+pngpread$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngrtran$(O): png.h pngconf.h
+pngrtran$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngrutil$(O): png.h pngconf.h
+pngrutil$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngerror$(O): png.h pngconf.h
+pngerror$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngmem$(O): png.h pngconf.h
+pngmem$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngrio$(O): png.h pngconf.h
+pngrio$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngwio$(O): png.h pngconf.h
+pngwio$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngtrans$(O): png.h pngconf.h
+pngtrans$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngwrite$(O): png.h pngconf.h
+pngwrite$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngwtran$(O): png.h pngconf.h
+pngwtran$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-pngwutil$(O): png.h pngconf.h
+pngwutil$(O): png.h pngconf.h pngpriv.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
libpng.lib: $(OBJS)
diff --git a/src/3rdparty/libpng/scripts/makefile.watcom b/src/3rdparty/libpng/scripts/makefile.watcom
index bbfeeeb77f..db4d534f41 100644
--- a/src/3rdparty/libpng/scripts/makefile.watcom
+++ b/src/3rdparty/libpng/scripts/makefile.watcom
@@ -3,7 +3,7 @@
# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is
# copyright 1995 Guy Eric Schalnat, Group 42, Inc.
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
@@ -49,52 +49,52 @@ OBJS3=pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
all: test
-png$(O): png.h pngconf.h
+png$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngset$(O): png.h pngconf.h
+pngset$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngget$(O): png.h pngconf.h
+pngget$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngread$(O): png.h pngconf.h
+pngread$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngpread$(O): png.h pngconf.h
+pngpread$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngrtran$(O): png.h pngconf.h
+pngrtran$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngrutil$(O): png.h pngconf.h
+pngrutil$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngerror$(O): png.h pngconf.h
+pngerror$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngmem$(O): png.h pngconf.h
+pngmem$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngrio$(O): png.h pngconf.h
+pngrio$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngwio$(O): png.h pngconf.h
+pngwio$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
pngtest$(O): png.h pngconf.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngtrans$(O): png.h pngconf.h
+pngtrans$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngwrite$(O): png.h pngconf.h
+pngwrite$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngwtran$(O): png.h pngconf.h
+pngwtran$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
-pngwutil$(O): png.h pngconf.h
+pngwutil$(O): png.h pngconf.h pngpriv.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
diff --git a/src/3rdparty/libpng/scripts/makevms.com b/src/3rdparty/libpng/scripts/makevms.com
index 36d1190674..2fa9d0d639 100644
--- a/src/3rdparty/libpng/scripts/makevms.com
+++ b/src/3rdparty/libpng/scripts/makevms.com
@@ -54,35 +54,35 @@ $ if make.eqs.""
$ then
$ dele pngtest.obj;*
$ CALL MAKE png.OBJ "cc ''CCOPT' png" -
- png.c png.h pngconf.h
+ png.c png.h pngconf.h pngpriv.h
$ CALL MAKE pngset.OBJ "cc ''CCOPT' pngset" -
- pngset.c png.h pngconf.h
+ pngset.c png.h pngconf.h pngpriv.h
$ CALL MAKE pngget.OBJ "cc ''CCOPT' pngget" -
- pngget.c png.h pngconf.h
+ pngget.c png.h pngconf.h pngpriv.h
$ CALL MAKE pngread.OBJ "cc ''CCOPT' pngread" -
- pngread.c png.h pngconf.h
+ pngread.c png.h pngconf.h pngpriv.h
$ CALL MAKE pngpread.OBJ "cc ''CCOPT' pngpread" -
- pngpread.c png.h pngconf.h
+ pngpread.c png.h pngconf.h pngpriv.h
$ CALL MAKE pngrtran.OBJ "cc ''CCOPT' pngrtran" -
- pngrtran.c png.h pngconf.h
+ pngrtran.c png.h pngconf.h pngpriv.h
$ CALL MAKE pngrutil.OBJ "cc ''CCOPT' pngrutil" -
- pngrutil.c png.h pngconf.h
+ pngrutil.c png.h pngconf.h pngpriv.h
$ CALL MAKE pngerror.OBJ "cc ''CCOPT' pngerror" -
- pngerror.c png.h pngconf.h
+ pngerror.c png.h pngconf.h pngpriv.h
$ CALL MAKE pngmem.OBJ "cc ''CCOPT' pngmem" -
- pngmem.c png.h pngconf.h
+ pngmem.c png.h pngconf.h pngpriv.h
$ CALL MAKE pngrio.OBJ "cc ''CCOPT' pngrio" -
- pngrio.c png.h pngconf.h
+ pngrio.c png.h pngconf.h pngpriv.h
$ CALL MAKE pngwio.OBJ "cc ''CCOPT' pngwio" -
- pngwio.c png.h pngconf.h
+ pngwio.c png.h pngconf.h pngpriv.h
$ CALL MAKE pngtrans.OBJ "cc ''CCOPT' pngtrans" -
- pngtrans.c png.h pngconf.h
+ pngtrans.c png.h pngconf.h pngpriv.h
$ CALL MAKE pngwrite.OBJ "cc ''CCOPT' pngwrite" -
- pngwrite.c png.h pngconf.h
+ pngwrite.c png.h pngconf.h pngpriv.h
$ CALL MAKE pngwtran.OBJ "cc ''CCOPT' pngwtran" -
- pngwtran.c png.h pngconf.h
+ pngwtran.c png.h pngconf.h pngpriv.h
$ CALL MAKE pngwutil.OBJ "cc ''CCOPT' pngwutil" -
- pngwutil.c png.h pngconf.h
+ pngwutil.c png.h pngconf.h pngpriv.h
$ write sys$output "Building Libpng ..."
$ CALL MAKE libpng.OLB "lib/crea libpng.olb *.obj" *.OBJ
$ write sys$output "Building pngtest..."
diff --git a/src/3rdparty/libpng/scripts/png32ce.def b/src/3rdparty/libpng/scripts/png32ce.def
new file mode 100644
index 0000000000..7e3b235ea1
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/png32ce.def
@@ -0,0 +1,257 @@
+;------------------------------------------
+; LIBPNG module definition file for Windows
+;------------------------------------------
+
+LIBRARY lpngce
+
+ png_memcpy_check
+ png_memset_check
+ png_set_dither
+ png_read_init_3
+ png_write_init_3
+ png_set_strip_error_numbers
+ png_get_uint_32
+ png_get_uint_16
+ png_get_int_32
+
+EXPORTS
+;Version 1.4.0
+ png_build_grayscale_palette @1
+; png_check_sig @2
+ png_chunk_error @3
+ png_chunk_warning @4
+; png_convert_from_struct_tm @5
+; png_convert_from_time_t @6
+ png_create_info_struct @7
+ png_create_read_struct @8
+ png_create_write_struct @9
+ png_data_freer @10
+ png_destroy_info_struct @11
+ png_destroy_read_struct @12
+ png_destroy_write_struct @13
+ png_error @14
+ png_free @15
+ png_free_data @16
+ png_get_IHDR @17
+ png_get_PLTE @18
+ png_get_bKGD @19
+ png_get_bit_depth @20
+ png_get_cHRM @21
+ png_get_cHRM_fixed @22
+ png_get_channels @23
+ png_get_color_type @24
+ png_get_compression_buffer_size @25
+ png_get_compression_type @26
+ png_get_copyright @27
+ png_get_error_ptr @28
+ png_get_filter_type @29
+ png_get_gAMA @30
+ png_get_gAMA_fixed @31
+ png_get_hIST @32
+ png_get_header_ver @33
+ png_get_header_version @34
+ png_get_iCCP @35
+ png_get_image_height @36
+ png_get_image_width @37
+ png_get_interlace_type @38
+ png_get_io_ptr @39
+ png_get_libpng_ver @40
+ png_get_oFFs @41
+ png_get_pCAL @42
+ png_get_pHYs @43
+ png_get_pixel_aspect_ratio @44
+ png_get_pixels_per_meter @45
+ png_get_progressive_ptr @46
+ png_get_rgb_to_gray_status @47
+ png_get_rowbytes @48
+ png_get_rows @49
+ png_get_sBIT @50
+ png_get_sCAL @51
+ png_get_sPLT @52
+ png_get_sRGB @53
+ png_get_signature @54
+ png_get_tIME @55
+ png_get_tRNS @56
+ png_get_text @57
+ png_get_unknown_chunks @58
+ png_get_user_chunk_ptr @59
+ png_get_user_transform_ptr @60
+ png_get_valid @61
+ png_get_x_offset_microns @62
+ png_get_x_offset_pixels @63
+ png_get_x_pixels_per_meter @64
+ png_get_y_offset_microns @65
+ png_get_y_offset_pixels @66
+ png_get_y_pixels_per_meter @67
+ png_malloc @68
+; png_memcpy_check @69
+; png_memset_check @70
+ png_permit_empty_plte @71
+ png_process_data @72
+ png_progressive_combine_row @73
+ png_read_end @74
+ png_read_image @75
+ png_read_info @76
+; png_read_init is deprecated
+ png_read_init @77
+ png_read_png @78
+ png_read_row @79
+ png_read_rows @80
+ png_read_update_info @81
+ png_reset_zstream @82
+ png_set_IHDR @83
+ png_set_PLTE @84
+ png_set_bKGD @85
+ png_set_background @86
+ png_set_bgr @87
+ png_set_cHRM @88
+ png_set_cHRM_fixed @89
+ png_set_compression_buffer_size @90
+ png_set_compression_level @91
+ png_set_compression_mem_level @92
+ png_set_compression_method @93
+ png_set_compression_strategy @94
+ png_set_compression_window_bits @95
+ png_set_crc_action @96
+; png_set_dither @97
+ png_set_error_fn @98
+ png_set_expand @99
+ png_set_filler @100
+ png_set_filter @101
+ png_set_filter_heuristics @102
+ png_set_flush @103
+ png_set_gAMA @104
+ png_set_gAMA_fixed @105
+ png_set_gamma @106
+ png_set_gray_1_2_4_to_8 @107 ; deprecated
+ png_set_gray_to_rgb @108
+ png_set_hIST @109
+ png_set_iCCP @110
+ png_set_interlace_handling @111
+ png_set_invert_alpha @112
+ png_set_invert_mono @113
+ png_set_keep_unknown_chunks @114
+ png_set_oFFs @115
+ png_set_pCAL @116
+ png_set_pHYs @117
+ png_set_packing @118
+ png_set_packswap @119
+ png_set_palette_to_rgb @120
+ png_set_progressive_read_fn @121
+ png_set_read_fn @122
+ png_set_read_status_fn @123
+ png_set_read_user_chunk_fn @124
+ png_set_read_user_transform_fn @125
+ png_set_rgb_to_gray @126
+ png_set_rgb_to_gray_fixed @127
+ png_set_rows @128
+ png_set_sBIT @129
+ png_set_sCAL @130
+ png_set_sPLT @131
+ png_set_sRGB @132
+ png_set_sRGB_gAMA_and_cHRM @133
+ png_set_shift @134
+ png_set_sig_bytes @135
+ png_set_strip_16 @136
+ png_set_strip_alpha @137
+ png_set_swap @138
+ png_set_swap_alpha @139
+ png_set_tIME @140
+ png_set_tRNS @141
+ png_set_tRNS_to_alpha @142
+ png_set_text @143
+ png_set_unknown_chunk_location @144
+ png_set_unknown_chunks @145
+ png_set_user_transform_info @146
+ png_set_write_fn @147
+ png_set_write_status_fn @148
+ png_set_write_user_transform_fn @149
+ png_sig_cmp @150
+ png_start_read_image @151
+ png_warning @152
+ png_write_chunk @153
+ png_write_chunk_data @154
+ png_write_chunk_end @155
+ png_write_chunk_start @156
+ png_write_end @157
+ png_write_flush @158
+ png_write_image @159
+ png_write_info @160
+ png_write_info_before_PLTE @161
+; png_write_init is deprecated
+ png_write_init @162
+ png_write_png @163
+ png_write_row @164
+ png_write_rows @165
+; png_read_init_2 and png_write_init_2 are deprecated.
+ png_read_init_2 @166
+ png_write_init_2 @167
+ png_access_version_number @168
+; png_sig_bytes @169
+; png_libpng_ver @170
+ png_init_io @171
+ png_convert_to_rfc1123 @172
+ png_set_invalid @173
+; Added at version 1.0.12
+; For compatiblity with 1.0.7-1.0.11
+ png_info_init @174
+; png_read_init_3 @175
+; png_write_init_3 @176
+ png_info_init_3 @177
+ png_destroy_struct @178
+; Added at version 1.2.0
+; For use with PNG_USER_MEM_SUPPORTED
+; png_destroy_struct_2 @179
+; png_create_read_struct_2 @180
+; png_create_write_struct_2 @181
+; png_malloc_default @182
+; png_free_default @183
+; MNG features
+; png_permit_mng_features @184
+; MMX support
+; png_mmx_support @185
+; png_get_mmx_flagmask @186
+; png_get_asm_flagmask @187
+; png_get_asm_flags @188
+; png_get_mmx_bitdepth_threshold @189
+; png_get_mmx_rowbytes_threshold @190
+; png_set_asm_flags @191
+; png_init_mmx_flags @192
+; Strip error numbers
+; png_set_strip_error_numbers @193
+; Added at version 1.2.2
+ png_handle_as_unknown @179
+ png_zalloc @180
+ png_zfree @181
+; png_handle_as_unknown @194
+; png_zalloc @195
+; png_zfree @196
+; Added at version 1.2.6
+ png_malloc_warn @195
+ png_get_user_height_max @196
+ png_get_user_width_max @197
+ png_set_user_limits @198
+; Added at version 1.2.7
+ png_set_add_alpha @199
+; Added at version 1.2.9
+; png_get_uint_32 @200
+ png_save_uint_32 @201
+; png_get_uint_16 @202
+ png_save_uint_16 @203
+; png_get_int_32 @204
+ png_save_int_32 @205
+ png_get_uint_31 @206
+ png_set_expand_gray_1_2_4_to_8 @207
+; Added at version 1.2.41
+ png_write_sig @208
+ png_benign_error @209
+ png_benign_chunk_error @210
+ png_set_benign_error @211
+ png_get_io_chunk_name @212
+ png_get_io_state @213
+ png_set_premultiply_alpha @214
+ png_get_chunk_cache_max @215
+ png_set_chunk_cache_max @216
+ png_check_cHRM_fixed @217
+ png_calloc @218
+ png_set_longjmp_fn @219
diff --git a/src/3rdparty/libpng/scripts/pngos2.def b/src/3rdparty/libpng/scripts/pngos2.def
index 0f371c851b..2d80eb456a 100644
--- a/src/3rdparty/libpng/scripts/pngos2.def
+++ b/src/3rdparty/libpng/scripts/pngos2.def
@@ -2,7 +2,7 @@
; PNG.LIB module definition file for OS/2
;----------------------------------------
-; Version 1.2.40
+; Version 1.4.0
LIBRARY PNG
DESCRIPTION "PNG image compression library for OS/2"
@@ -11,9 +11,7 @@ DATA PRELOAD MOVEABLE MULTIPLE
EXPORTS
-
png_build_grayscale_palette
- png_check_sig
png_chunk_error
png_chunk_warning
png_convert_from_struct_tm
@@ -80,15 +78,11 @@ EXPORTS
png_get_y_offset_pixels
png_get_y_pixels_per_meter
png_malloc
- png_memcpy_check
- png_memset_check
- png_permit_empty_plte
png_process_data
png_progressive_combine_row
png_read_end
png_read_image
png_read_info
-; png_read_init ; deprecated
png_read_png
png_read_row
png_read_rows
@@ -108,7 +102,6 @@ EXPORTS
png_set_compression_strategy
png_set_compression_window_bits
png_set_crc_action
- png_set_dither
png_set_error_fn
png_set_expand
png_set_filler
@@ -118,7 +111,6 @@ EXPORTS
png_set_gAMA
png_set_gAMA_fixed
png_set_gamma
-; png_set_gray_1_2_4_to_8 ; deprecated as of libpng-1.2.9
png_set_gray_to_rgb
png_set_hIST
png_set_iCCP
@@ -173,28 +165,18 @@ EXPORTS
png_write_image
png_write_info
png_write_info_before_PLTE
-; png_write_init ; deprecated
png_write_png
png_write_row
png_write_rows
- png_read_init_2
- png_write_init_2
+ png_write_sig
png_access_version_number
png_init_io
png_convert_to_rfc1123
png_set_invalid
; Added at version 1.2.0:
- png_mmx_support
png_permit_empty_plte
png_permit_mng_features
- png_get_mmx_flagmask
- png_get_asm_flagmask
- png_get_asm_flags
- png_get_mmx_bitdepth_threshold
- png_get_mmx_rowbytes_threshold
- png_set_asm_flags
- png_init_mmx_flags
; Added at version 1.2.2:
png_handle_as_unknown
@@ -214,16 +196,28 @@ EXPORTS
png_set_add_alpha
; Added at version 1.2.9
- png_get_uint_32
png_save_uint_32
- png_get_uint_16
png_save_uint_16
- png_get_int_32
png_save_int_32
png_get_uint_31
png_set_expand_gray_1_2_4_to_8
+; Added at version 1.2.41
+ png_write_sig
+; png_benign_error
+; png_benign_chunk_error
+; png_set_benign_error
+ png_get_io_chunk_name
+ png_get_io_state
+ png_set_premultiply_alpha
+ png_get_chunk_cache_max
+ png_set_chunk_cache_max
+ png_check_cHRM_fixed
+ png_calloc
+ png_set_longjmp_fn
+
; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS
+ png_libpng_ver
png_pass_start
png_pass_inc
png_pass_ystart
diff --git a/src/3rdparty/libpng/scripts/pngw32.def b/src/3rdparty/libpng/scripts/pngw32.def
deleted file mode 100644
index e455018b76..0000000000
--- a/src/3rdparty/libpng/scripts/pngw32.def
+++ /dev/null
@@ -1,239 +0,0 @@
-;------------------------------------------
-; LIBPNG module definition file for Windows
-;------------------------------------------
-
-LIBRARY
-
-EXPORTS
-;Version 1.2.40
- png_build_grayscale_palette @1
- png_check_sig @2
- png_chunk_error @3
- png_chunk_warning @4
- png_convert_from_struct_tm @5
- png_convert_from_time_t @6
- png_create_info_struct @7
- png_create_read_struct @8
- png_create_write_struct @9
- png_data_freer @10
- png_destroy_info_struct @11
- png_destroy_read_struct @12
- png_destroy_write_struct @13
- png_error @14
- png_free @15
- png_free_data @16
- png_get_IHDR @17
- png_get_PLTE @18
- png_get_bKGD @19
- png_get_bit_depth @20
- png_get_cHRM @21
- png_get_cHRM_fixed @22
- png_get_channels @23
- png_get_color_type @24
- png_get_compression_buffer_size @25
- png_get_compression_type @26
- png_get_copyright @27
- png_get_error_ptr @28
- png_get_filter_type @29
- png_get_gAMA @30
- png_get_gAMA_fixed @31
- png_get_hIST @32
- png_get_header_ver @33
- png_get_header_version @34
- png_get_iCCP @35
- png_get_image_height @36
- png_get_image_width @37
- png_get_interlace_type @38
- png_get_io_ptr @39
- ; png_get_libpng_ver @40
- png_get_oFFs @41
- png_get_pCAL @42
- png_get_pHYs @43
- png_get_pixel_aspect_ratio @44
- png_get_pixels_per_meter @45
- png_get_progressive_ptr @46
- png_get_rgb_to_gray_status @47
- png_get_rowbytes @48
- png_get_rows @49
- png_get_sBIT @50
- png_get_sCAL @51
- png_get_sPLT @52
- png_get_sRGB @53
- png_get_signature @54
- png_get_tIME @55
- png_get_tRNS @56
- png_get_text @57
- png_get_unknown_chunks @58
- png_get_user_chunk_ptr @59
- png_get_user_transform_ptr @60
- png_get_valid @61
- png_get_x_offset_microns @62
- png_get_x_offset_pixels @63
- png_get_x_pixels_per_meter @64
- png_get_y_offset_microns @65
- png_get_y_offset_pixels @66
- png_get_y_pixels_per_meter @67
- png_malloc @68
- png_memcpy_check @69
- png_memset_check @70
-; png_permit_empty_plte is deprecated
- png_permit_empty_plte @71
- png_process_data @72
- png_progressive_combine_row @73
- png_read_end @74
- png_read_image @75
- png_read_info @76
-; png_read_init is deprecated
- png_read_init @77
- png_read_png @78
- png_read_row @79
- png_read_rows @80
- png_read_update_info @81
- png_reset_zstream @82
- png_set_IHDR @83
- png_set_PLTE @84
- png_set_bKGD @85
- png_set_background @86
- png_set_bgr @87
- png_set_cHRM @88
- png_set_cHRM_fixed @89
- png_set_compression_buffer_size @90
- png_set_compression_level @91
- png_set_compression_mem_level @92
- png_set_compression_method @93
- png_set_compression_strategy @94
- png_set_compression_window_bits @95
- png_set_crc_action @96
- png_set_dither @97
- png_set_error_fn @98
- png_set_expand @99
- png_set_filler @100
- png_set_filter @101
- png_set_filter_heuristics @102
- png_set_flush @103
- png_set_gAMA @104
- png_set_gAMA_fixed @105
- png_set_gamma @106
-; png_set_gray_1_2_4_to_8 is deprecated
- png_set_gray_1_2_4_to_8 @107
- png_set_gray_to_rgb @108
- png_set_hIST @109
- png_set_iCCP @110
- png_set_interlace_handling @111
- png_set_invert_alpha @112
- png_set_invert_mono @113
- png_set_keep_unknown_chunks @114
- png_set_oFFs @115
- png_set_pCAL @116
- png_set_pHYs @117
- png_set_packing @118
- png_set_packswap @119
- png_set_palette_to_rgb @120
- png_set_progressive_read_fn @121
- png_set_read_fn @122
- png_set_read_status_fn @123
- png_set_read_user_chunk_fn @124
- png_set_read_user_transform_fn @125
- png_set_rgb_to_gray @126
- png_set_rgb_to_gray_fixed @127
- png_set_rows @128
- png_set_sBIT @129
- png_set_sCAL @130
- png_set_sPLT @131
- png_set_sRGB @132
- png_set_sRGB_gAMA_and_cHRM @133
- png_set_shift @134
- png_set_sig_bytes @135
- png_set_strip_16 @136
- png_set_strip_alpha @137
- png_set_swap @138
- png_set_swap_alpha @139
- png_set_tIME @140
- png_set_tRNS @141
- png_set_tRNS_to_alpha @142
- png_set_text @143
- png_set_unknown_chunk_location @144
- png_set_unknown_chunks @145
- png_set_user_transform_info @146
- png_set_write_fn @147
- png_set_write_status_fn @148
- png_set_write_user_transform_fn @149
- png_sig_cmp @150
- png_start_read_image @151
- png_warning @152
- png_write_chunk @153
- png_write_chunk_data @154
- png_write_chunk_end @155
- png_write_chunk_start @156
- png_write_end @157
- png_write_flush @158
- png_write_image @159
- png_write_info @160
- png_write_info_before_PLTE @161
-; png_write_init is deprecated
- png_write_init @162
- png_write_png @163
- png_write_row @164
- png_write_rows @165
-; png_read_init_2 and png_write_init_2 are deprecated.
- png_read_init_2 @166
- png_write_init_2 @167
- png_access_version_number @168
-; png_sig_bytes @169
-; Removed from version 1.2.20
-; png_libpng_ver @170
-;
- png_init_io @171
- png_convert_to_rfc1123 @172
- png_set_invalid @173
-; Added at version 1.0.12
-; For compatibility with 1.0.7-1.0.11
-; png_info_init @174
-; png_read_init_3, png_info_init_3, and png_write_init_3 are deprecated.
- png_read_init_3 @175
- png_write_init_3 @176
- png_info_init_3 @177
- png_destroy_struct @178
-; Added at version 1.2.0
-; For use with PNG_USER_MEM_SUPPORTED
- png_destroy_struct_2 @179
- png_create_read_struct_2 @180
- png_create_write_struct_2 @181
- png_malloc_default @182
- png_free_default @183
-; MNG features
- png_permit_mng_features @184
-; MMX support
- png_mmx_support @185
-; png_get_mmx_flagmask @186
- png_get_asm_flagmask @187
- png_get_asm_flags @188
-; png_get_mmx_bitdepth_threshold @189
-; png_get_mmx_rowbytes_threshold @190
- png_set_asm_flags @191
-; png_init_mmx_flags @192
-; Strip error numbers
- png_set_strip_error_numbers @193
-; Added at version 1.2.2
- png_handle_as_unknown @194
-; Added at version 1.2.2 and deleted from 1.2.3
-; png_zalloc @195
-; png_zfree @196
-; Added at version 1.2.4
- png_malloc_warn @195
-; Added at version 1.2.6
- png_malloc_warn @195
- png_get_user_height_max @196
- png_get_user_width_max @197
- png_set_user_limits @198
-; Added at version 1.2.7
- png_set_add_alpha @199
-; Added at version 1.2.9
- png_get_uint_32 @200
- png_save_uint_32 @201
- png_get_uint_16 @202
- png_save_uint_16 @203
- png_get_int_32 @204
- png_save_int_32 @205
- png_get_uint_31 @206
- png_set_expand_gray_1_2_4_to_8 @207
diff --git a/src/3rdparty/libpng/scripts/pngw32.rc b/src/3rdparty/libpng/scripts/pngw32.rc
deleted file mode 100644
index 02e30e299b..0000000000
--- a/src/3rdparty/libpng/scripts/pngw32.rc
+++ /dev/null
@@ -1,112 +0,0 @@
-#define PNG_VERSION_INFO_ONLY
-
-#include <windows.h>
-#include "../png.h"
-
-#define _QUOTE(x) # x
-#define QUOTE(x) _QUOTE(x)
-
-#define PNG_LIBPNG_DLLFNAME "LIBPNG"
-
-/* Support deprecated PRIVATEBUILD macro */
-#if defined(PRIVATEBUILD) && !defined(PNG_USER_PRIVATEBUILD)
-# define PNG_USER_PRIVATEBUILD PRIVATEBUILD
-#endif
-
-#if defined(PNG_USER_DLLFNAME_POSTFIX) && !defined(PNG_USER_PRIVATEBUILD)
-# error "PNG_USER_PRIVATEBUILD must be defined as a string describing the\
- custom changes made to the library."
-#endif
-
-/* Prioritize PNG_USER_x over PNG_LIBPNG_x */
-#ifdef PNG_USER_DLLFNAME_POSTFIX
-# undef PNG_LIBPNG_DLLFNAME_POSTFIX
-# define PNG_LIBPNG_DLLFNAME_POSTFIX PNG_USER_DLLFNAME_POSTFIX
-#endif
-
-#ifdef PNG_USER_VERSIONINFO_COMMENTS
-# undef PNG_LIBPNG_VERSIONINFO_COMMENTS
-# define PNG_LIBPNG_VERSIONINFO_COMMENTS PNG_USER_VERSIONINFO_COMMENTS
-#endif
-
-#if defined(PNG_DEBUG) && (PNG_DEBUG > 0)
-# define VS_DEBUG VS_FF_DEBUG
-# ifndef PNG_LIBPNG_DLLFNAME_POSTFIX
-# define PNG_LIBPNG_DLLFNAME_POSTFIX "D"
-# endif /* PNG_LIBPNG_DLLFNAME_POSTFIX */
-# ifndef PNG_LIBPNG_VERSIONINFO_COMMENTS
-# define PNG_LIBPNG_VERSIONINFO_COMMENTS "PNG_DEBUG=" QUOTE(PNG_DEBUG)
-# endif /* PNG_LIBPNG_VERSIONINFO_COMMENTS */
-#else
-# define VS_DEBUG 0
-# ifndef PNG_LIBPNG_DLLFNAME_POSTFIX
-# define PNG_LIBPNG_DLLFNAME_POSTFIX
-# endif /* PNG_LIBPNG_DLLFNAME_POSTFIX */
-#endif /* defined(DEBUG)... */
-
-#ifdef PNG_USER_PRIVATEBUILD
-# define VS_PRIVATEBUILD VS_FF_PRIVATEBUILD
-#else
-# define VS_PRIVATEBUILD 0
-#endif /* PNG_USER_PRIVATEBUILD */
-
-#ifdef PNG_LIBPNG_SPECIALBUILD
-# define VS_SPECIALBUILD VS_FF_SPECIALBUILD
-#else
-# define VS_SPECIALBUILD 0
-#endif /* PNG_LIBPNG_BUILD_SPECIAL */
-
-#if ((PNG_LIBPNG_BUILD_BASE_TYPE & PNG_LIBPNG_RELEASE_STATUS_MASK) !=\
- PNG_LIBPNG_BUILD_STABLE)
-# define VS_PRERELEASE VS_FF_PRERELEASE
-# define VS_PATCHED 0
-#else
-# define VS_PRERELEASE 0
-# if (PNG_LIBPNG_BUILD_BASE_TYPE & PNG_LIBPNG_BUILD_PATCHED)
-# define VS_PATCHED VS_FF_PATCHED
-# else
-# define VS_PATCHED 0
-# endif
-#endif
-
-VS_VERSION_INFO VERSIONINFO
-FILEVERSION PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE, PNG_LIBPNG_VER_BUILD
-PRODUCTVERSION PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE, PNG_LIBPNG_VER_BUILD
-FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
-FILEFLAGS VS_DEBUG | VS_PRIVATEBUILD | VS_SPECIALBUILD | VS_PRERELEASE | VS_PATCHED
-FILEOS VOS__WINDOWS32
-FILETYPE VFT_DLL
-FILESUBTYPE VFT2_UNKNOWN
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN BLOCK "040904E4" /* Language type = U.S English(0x0409) and Character Set = Windows, Multilingual(0x04E4) */
- BEGIN
-#ifdef PNG_LIBPNG_VERSIONINFO_COMMENTS
- VALUE "Comments", PNG_LIBPNG_VERSIONINFO_COMMENTS "\000"
-#endif /* PNG_LIBPNG_VERSIONINFO_COMMENTS */
-#ifdef PNG_USER_VERSIONINFO_COMPANYNAME
- VALUE "CompanyName", PNG_USER_VERSIONINFO_COMPANYNAME "\000"
-#endif /* PNG_USER_VERSIONINFO_COMPANYNAME */
- VALUE "FileDescription", "PNG image compression library\000"
- VALUE "FileVersion", PNG_LIBPNG_VER_STRING "\000"
- VALUE "InternalName", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) PNG_LIBPNG_DLLFNAME_POSTFIX " (Windows 32 bit)\000"
- VALUE "LegalCopyright", "\251 1998-2004 Glenn Randers-Pehrson et al.\000"
-#ifdef PNG_USER_VERSIONINFO_LEGALTRADEMARKS
- VALUE "LegalTrademarks", PNG_USER_VERSIONINFO_LEGALTRADEMARKS "\000"
-#endif /* PNG_USER_VERSIONINFO_LEGALTRADEMARKS */
- VALUE "OriginalFilename", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) PNG_LIBPNG_DLLFNAME_POSTFIX ".DLL\000"
-#ifdef PNG_USER_PRIVATEBUILD
- VALUE "PrivateBuild", PNG_USER_PRIVATEBUILD "\000"
-#endif /* PNG_USER_PRIVATEBUILD */
- VALUE "ProductName", "LibPNG\000"
- VALUE "ProductVersion", "1\000"
-#ifdef PNG_LIBPNG_SPECIALBUILD
- VALUE "SpecialBuild", PNG_LIBPNG_SPECIALBUILD "\000"
-#endif /* PNG_LIBPNG_SPECIALBUILD */
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x0409, 0x04E4
- END
-END
diff --git a/src/3rdparty/libpng/scripts/pngwin.def b/src/3rdparty/libpng/scripts/pngwin.def
new file mode 100644
index 0000000000..657e3b4228
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/pngwin.def
@@ -0,0 +1,212 @@
+;------------------------------------------
+; LIBPNG module definition file for Windows
+;------------------------------------------
+
+LIBRARY
+
+EXPORTS
+;Version 1.4.0
+ png_build_grayscale_palette
+ png_chunk_error
+ png_chunk_warning
+ png_convert_from_struct_tm
+ png_convert_from_time_t
+ png_create_info_struct
+ png_create_read_struct
+ png_create_write_struct
+ png_data_freer
+ png_destroy_info_struct
+ png_destroy_read_struct
+ png_destroy_write_struct
+ png_error
+ png_free
+ png_free_data
+ png_get_IHDR
+ png_get_PLTE
+ png_get_bKGD
+ png_get_bit_depth
+ png_get_cHRM
+ png_get_cHRM_fixed
+ png_get_channels
+ png_get_color_type
+ png_get_compression_buffer_size
+ png_get_compression_type
+ png_get_copyright
+ png_get_error_ptr
+ png_get_filter_type
+ png_get_gAMA
+ png_get_gAMA_fixed
+ png_get_hIST
+ png_get_header_ver
+ png_get_header_version
+ png_get_iCCP
+ png_get_image_height
+ png_get_image_width
+ png_get_interlace_type
+ png_get_io_ptr
+ png_get_libpng_ver
+ png_get_oFFs
+ png_get_pCAL
+ png_get_pHYs
+ png_get_pixel_aspect_ratio
+ png_get_pixels_per_meter
+ png_get_progressive_ptr
+ png_get_rgb_to_gray_status
+ png_get_rowbytes
+ png_get_rows
+ png_get_sBIT
+ png_get_sCAL
+ png_get_sPLT
+ png_get_sRGB
+ png_get_signature
+ png_get_tIME
+ png_get_tRNS
+ png_get_text
+ png_get_unknown_chunks
+ png_get_user_chunk_ptr
+ png_get_user_transform_ptr
+ png_get_valid
+ png_get_x_offset_microns
+ png_get_x_offset_pixels
+ png_get_x_pixels_per_meter
+ png_get_y_offset_microns
+ png_get_y_offset_pixels
+ png_get_y_pixels_per_meter
+ png_malloc
+ png_process_data
+ png_progressive_combine_row
+ png_read_end
+ png_read_image
+ png_read_info
+ png_read_png
+ png_read_row
+ png_read_rows
+ png_read_update_info
+ png_reset_zstream
+ png_set_IHDR
+ png_set_PLTE
+ png_set_bKGD
+ png_set_background
+ png_set_bgr
+ png_set_cHRM
+ png_set_cHRM_fixed
+ png_set_compression_buffer_size
+ png_set_compression_level
+ png_set_compression_mem_level
+ png_set_compression_method
+ png_set_compression_strategy
+ png_set_compression_window_bits
+ png_set_crc_action
+ png_set_error_fn
+ png_set_expand
+ png_set_filler
+ png_set_filter
+ png_set_filter_heuristics
+ png_set_flush
+ png_set_gAMA
+ png_set_gAMA_fixed
+ png_set_gamma
+ png_set_gray_to_rgb
+ png_set_hIST
+ png_set_iCCP
+ png_set_interlace_handling
+ png_set_invert_alpha
+ png_set_invert_mono
+ png_set_keep_unknown_chunks
+ png_set_oFFs
+ png_set_pCAL
+ png_set_pHYs
+ png_set_packing
+ png_set_packswap
+ png_set_palette_to_rgb
+ png_set_progressive_read_fn
+ png_set_read_fn
+ png_set_read_status_fn
+ png_set_read_user_chunk_fn
+ png_set_read_user_transform_fn
+ png_set_rgb_to_gray
+ png_set_rgb_to_gray_fixed
+ png_set_rows
+ png_set_sBIT
+ png_set_sCAL
+ png_set_sPLT
+ png_set_sRGB
+ png_set_sRGB_gAMA_and_cHRM
+ png_set_shift
+ png_set_sig_bytes
+ png_set_strip_16
+ png_set_strip_alpha
+ png_set_swap
+ png_set_swap_alpha
+ png_set_tIME
+ png_set_tRNS
+ png_set_tRNS_to_alpha
+ png_set_text
+ png_set_unknown_chunk_location
+ png_set_unknown_chunks
+ png_set_user_transform_info
+ png_set_write_fn
+ png_set_write_status_fn
+ png_set_write_user_transform_fn
+ png_sig_cmp
+ png_start_read_image
+ png_warning
+ png_write_chunk
+ png_write_chunk_data
+ png_write_chunk_end
+ png_write_chunk_start
+ png_write_end
+ png_write_flush
+ png_write_image
+ png_write_info
+ png_write_info_before_PLTE
+ png_write_png
+ png_write_row
+ png_write_rows
+ png_access_version_number
+ png_init_io
+ png_convert_to_rfc1123
+ png_set_invalid
+; Added at version 1.0.12
+ png_info_init_3
+ png_destroy_struct
+; Added at version 1.2.0
+; For use with PNG_USER_MEM_SUPPORTED
+ png_destroy_struct_2
+ png_create_read_struct_2
+ png_create_write_struct_2
+ png_malloc_default
+ png_free_default
+; MNG features
+ png_permit_mng_features
+; Added at version 1.2.2
+ png_handle_as_unknown
+; Added at version 1.2.2 and deleted from 1.2.3
+; png_zalloc
+; png_zfree
+; Added at version 1.2.4
+ png_malloc_warn
+ png_get_user_height_max
+ png_get_user_width_max
+ png_set_user_limits
+; Added at version 1.2.7
+ png_set_add_alpha
+; Added at version 1.2.9
+ png_save_uint_32
+ png_save_uint_16
+ png_save_int_32
+ png_get_uint_31
+ png_set_expand_gray_1_2_4_to_8
+; Added at version 1.2.41
+ png_write_sig
+; png_benign_error
+; png_benign_chunk_error
+; png_set_benign_error
+ png_get_io_chunk_name
+ png_get_io_state
+ png_set_premultiply_alpha
+ png_get_chunk_cache_max
+ png_set_chunk_cache_max
+ png_check_cHRM_fixed
+ png_calloc
+ png_set_longjmp_fn
diff --git a/src/3rdparty/libpng/scripts/pngwin.rc b/src/3rdparty/libpng/scripts/pngwin.rc
new file mode 100644
index 0000000000..9335cbbe03
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/pngwin.rc
@@ -0,0 +1,112 @@
+#define PNG_VERSION_INFO_ONLY
+
+#include <windows.h>
+#include "../png.h"
+
+#define _QUOTE(x) # x
+#define QUOTE(x) _QUOTE(x)
+
+#define PNG_LIBPNG_DLLFNAME "LIBPNG"
+
+/* Support deprecated PRIVATEBUILD macro */
+#if defined(PRIVATEBUILD) && !defined(PNG_USER_PRIVATEBUILD)
+# define PNG_USER_PRIVATEBUILD PRIVATEBUILD
+#endif
+
+#if defined(PNG_USER_DLLFNAME_POSTFIX) && !defined(PNG_USER_PRIVATEBUILD)
+# error "PNG_USER_PRIVATEBUILD must be defined as a string describing the\
+ custom changes made to the library."
+#endif
+
+/* Prioritize PNG_USER_x over PNG_LIBPNG_x */
+#ifdef PNG_USER_DLLFNAME_POSTFIX
+# undef PNG_LIBPNG_DLLFNAME_POSTFIX
+# define PNG_LIBPNG_DLLFNAME_POSTFIX PNG_USER_DLLFNAME_POSTFIX
+#endif
+
+#ifdef PNG_USER_VERSIONINFO_COMMENTS
+# undef PNG_LIBPNG_VERSIONINFO_COMMENTS
+# define PNG_LIBPNG_VERSIONINFO_COMMENTS PNG_USER_VERSIONINFO_COMMENTS
+#endif
+
+#if defined(PNG_DEBUG) && (PNG_DEBUG > 0)
+# define VS_DEBUG VS_FF_DEBUG
+# ifndef PNG_LIBPNG_DLLFNAME_POSTFIX
+# define PNG_LIBPNG_DLLFNAME_POSTFIX "D"
+# endif /* PNG_LIBPNG_DLLFNAME_POSTFIX */
+# ifndef PNG_LIBPNG_VERSIONINFO_COMMENTS
+# define PNG_LIBPNG_VERSIONINFO_COMMENTS "PNG_DEBUG=" QUOTE(PNG_DEBUG)
+# endif /* PNG_LIBPNG_VERSIONINFO_COMMENTS */
+#else
+# define VS_DEBUG 0
+# ifndef PNG_LIBPNG_DLLFNAME_POSTFIX
+# define PNG_LIBPNG_DLLFNAME_POSTFIX
+# endif /* PNG_LIBPNG_DLLFNAME_POSTFIX */
+#endif /* defined(DEBUG)... */
+
+#ifdef PNG_USER_PRIVATEBUILD
+# define VS_PRIVATEBUILD VS_FF_PRIVATEBUILD
+#else
+# define VS_PRIVATEBUILD 0
+#endif /* PNG_USER_PRIVATEBUILD */
+
+#ifdef PNG_LIBPNG_SPECIALBUILD
+# define VS_SPECIALBUILD VS_FF_SPECIALBUILD
+#else
+# define VS_SPECIALBUILD 0
+#endif /* PNG_LIBPNG_BUILD_SPECIAL */
+
+#if ((PNG_LIBPNG_BUILD_BASE_TYPE & PNG_LIBPNG_RELEASE_STATUS_MASK) !=\
+ PNG_LIBPNG_BUILD_STABLE)
+# define VS_PRERELEASE VS_FF_PRERELEASE
+# define VS_PATCHED 0
+#else
+# define VS_PRERELEASE 0
+# if (PNG_LIBPNG_BUILD_BASE_TYPE & PNG_LIBPNG_BUILD_PATCHED)
+# define VS_PATCHED VS_FF_PATCHED
+# else
+# define VS_PATCHED 0
+# endif
+#endif
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE, PNG_LIBPNG_VER_BUILD
+PRODUCTVERSION PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE, PNG_LIBPNG_VER_BUILD
+FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+FILEFLAGS VS_DEBUG | VS_PRIVATEBUILD | VS_SPECIALBUILD | VS_PRERELEASE | VS_PATCHED
+FILEOS VOS__WINDOWS32
+FILETYPE VFT_DLL
+FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN BLOCK "040904E4" /* Language type = U.S English(0x0409) and Character Set = Windows, Multilingual(0x04E4) */
+ BEGIN
+#ifdef PNG_LIBPNG_VERSIONINFO_COMMENTS
+ VALUE "Comments", PNG_LIBPNG_VERSIONINFO_COMMENTS "\000"
+#endif /* PNG_LIBPNG_VERSIONINFO_COMMENTS */
+#ifdef PNG_USER_VERSIONINFO_COMPANYNAME
+ VALUE "CompanyName", PNG_USER_VERSIONINFO_COMPANYNAME "\000"
+#endif /* PNG_USER_VERSIONINFO_COMPANYNAME */
+ VALUE "FileDescription", "PNG image compression library\000"
+ VALUE "FileVersion", PNG_LIBPNG_VER_STRING "\000"
+ VALUE "InternalName", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) PNG_LIBPNG_DLLFNAME_POSTFIX " (Windows 32 bit)\000"
+ VALUE "LegalCopyright", "\251 1998-2009 Glenn Randers-Pehrson et al.\000"
+#ifdef PNG_USER_VERSIONINFO_LEGALTRADEMARKS
+ VALUE "LegalTrademarks", PNG_USER_VERSIONINFO_LEGALTRADEMARKS "\000"
+#endif /* PNG_USER_VERSIONINFO_LEGALTRADEMARKS */
+ VALUE "OriginalFilename", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) PNG_LIBPNG_DLLFNAME_POSTFIX ".DLL\000"
+#ifdef PNG_USER_PRIVATEBUILD
+ VALUE "PrivateBuild", PNG_USER_PRIVATEBUILD "\000"
+#endif /* PNG_USER_PRIVATEBUILD */
+ VALUE "ProductName", "LibPNG\000"
+ VALUE "ProductVersion", "1\000"
+#ifdef PNG_LIBPNG_SPECIALBUILD
+ VALUE "SpecialBuild", PNG_LIBPNG_SPECIALBUILD "\000"
+#endif /* PNG_LIBPNG_SPECIALBUILD */
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0x04E4
+ END
+END
diff --git a/src/3rdparty/libpng/scripts/smakefile.ppc b/src/3rdparty/libpng/scripts/smakefile.ppc
index 91df6c13d2..531c693f6a 100644
--- a/src/3rdparty/libpng/scripts/smakefile.ppc
+++ b/src/3rdparty/libpng/scripts/smakefile.ppc
@@ -1,7 +1,7 @@
# Amiga powerUP (TM) Makefile
# makefile for libpng and SAS C V6.58/7.00 PPC compiler
# Copyright (C) 1998 by Andreas R. Kleinert
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
diff --git a/src/3rdparty/libpng/test-pngtest.sh b/src/3rdparty/libpng/test-pngtest.sh
new file mode 100755
index 0000000000..c134a8a848
--- /dev/null
+++ b/src/3rdparty/libpng/test-pngtest.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+./pngtest ${srcdir}/pngtest.png
diff --git a/src/3rdparty/libtiff/ChangeLog b/src/3rdparty/libtiff/ChangeLog
index 7d09b1b180..20cb7538fd 100644
--- a/src/3rdparty/libtiff/ChangeLog
+++ b/src/3rdparty/libtiff/ChangeLog
@@ -1,3 +1,731 @@
+2009-11-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff 3.9.2 released.
+
+2009-11-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * tools/tiffcrop.c: Updated tiffcrop from Richard Nolde. This
+ version has undergone substantial testing with arbitrary sample
+ bit depths. Also eliminates GCC compilation warnings.
+
+2009-11-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * port/libport.h: Added header file for porting prototypes and
+ extern declarations.
+
+2009-10-31 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_dirwrite.c (TIFFWriteAnyArray): Add missing break
+ statement so writing an array of TIFF_DOUBLE works.
+
+2009-10-29 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_dirread.c: Eliminate GCC "dereferencing type-punned
+ pointer" warnings.
+
+2009-10-28 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * html/tools.html: Add manual page links, and a summary
+ description of tiffcrop.
+
+2009-10-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * configure.ac: x86_64 should use the same fill order as i386.
+
+2009-09-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * tools/tiffcrop.c, man/tiffcrop.1: New tiffcrop from Richard
+ Nolde. Major updates to add significant functionality for reading
+ and writing tile based images with bit depths not a multiple of 8
+ which cannot be handled by tiffcp.
+
+2009-09-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_ojpeg.c (OJPEGWriteHeaderInfo): IJG JPEG 7 needs
+ do_fancy_upsampling=FALSE in order to read raw data. Resolves
+ "Bug 2090 - OJPEG crash with libjpeg v7".
+ http://bugzilla.maptools.org/show_bug.cgi?id=2090
+
+2009-08-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * contrib/iptcutil/iptcutil.c,
+ libtiff/tif_getimage.c,libtiff/tif_jpeg.c,libtiff/tif_ojpeg.c,tools/tiffcrop.c,tools/tiffgt.c:
+ Applied patch from Oden Eriksson to allow building with GCC using
+ the "-Wformat -Werror=format-security" flags.
+
+2009-08-28 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff 3.9.1 released.
+
+2009-08-28 Frank Warmerdam <warmerdam@pobox.com>
+
+ * libtiff/tif_dirwrite.c: Back out changes from 2007-11-22 that
+ resulted in the final strip not being written in some circumstances.
+ http://bugzilla.maptools.org/show_bug.cgi?id=2088
+
+2009-08-27 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_write.c (TIFFAppendToStrip): Remove cast which
+ caused libtiff to output a wrong last strip with byte-count and
+ strip-offset of zero. This cast was added on the day of the 3.9.0
+ release.
+
+ * libtiff/tif_config.vc.h: tiffiop.h needs the TIFF_INT64_T and
+ TIFF_UINT64_T defines in order to compile. Copy existing
+ definitions from tiffconf.vc.h.
+
+2009-08-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * test/Makefile.am (AUTOMAKE_OPTIONS): Colorized tests was not
+ actually activated since it needed to be enabled in this
+ Makefile.am. Also activated parallel-tests mode since it offers
+ useful features such as per-test .log files and a summary test
+ report .log file.
+
+2009-08-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff 3.9.0 released.
+
+ * libtiff/tif_print.c (TIFFPrintDirectory): Applied patch for "tag
+ error may cause segfault in tif_print.c."
+ http://bugzilla.maptools.org/show_bug.cgi?id=1896
+
+ * tools/{rgb2ycbcr.c, tiff2rgba.c}: Applied patch for
+ CVE-2009-2347 libtiff: integer overflows in various inter-color
+ space conversion tools.
+ http://bugzilla.maptools.org/show_bug.cgi?id=2079
+
+ * configure.ac: Updated autotools. Autoconf 2.64, Automake 1.11,
+ libtool 2.2.6. Enabled support for silent build rules
+ (--enable-silent-rules or 'make V=0') and colorized tests.
+
+2009-06-30 Frank Warmerdam <warmerdam@pobox.com>
+
+ * libtiff/tif_luv.c: correct return codes from encoderow to be
+ 1 on success instead of zero.
+ http://bugzilla.maptools.org/show_bug.cgi?id=2069
+
+2009-06-22 Frank Warmerdam <warmerdam@pobox.com>
+
+ * libtiff/tif_lzw.c: Fix buffer underflow bug.
+ http://bugzilla.maptools.org/show_bug.cgi?id=2065
+
+2009-06-03 Frank Warmerdam <warmerdam@pobox.com>
+
+ * libtiff/tif_write.c: do not override the planar configuration to be
+ contig for one sample files if planar configuration is already set.
+ http://bugzilla.maptools.org/show_bug.cgi?id=2057
+
+2009-02-12 Frank Warmerdam <warmerdam@pobox.com>
+
+ * libtiff/tif_luv.c: Fix handling of tiled logluv images.
+ http://bugzilla.maptools.org/show_bug.cgi?id=2005
+
+2009-01-23 Frank Warmerdam <warmerdam@pobox.com>
+
+ * libtiff/tif_predict.c: Add support for 32bit integer horz. predictors.
+ http://bugzilla.maptools.org/show_bug.cgi?id=1911
+
+2009-01-20 Frank Warmerdam <warmerdam@pobox.com>
+
+ * tools/tiffsplit.c: fix sampleformat to be shortv instead of longv.
+
+2009-01-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * tools/tiff2ps.c: Remove spurious message printed to stderr.
+
+2009-01-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * tools/tiff2ps.c: Incorporated significant functionality update
+ from Richard Nolde. In particular, support for rotating the image
+ by 90, 180, 270, and 'auto' has been added.
+
+ * tools/tiffcrop.c: Incorporated significant functionality update
+ from Richard Nolde.
+
+2009-01-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tiffiop.h: Add private type declarations for int64, and
+ uint64 so that bundled utilities (like tiffcrop) can use it when
+ necessary.
+
+2009-01-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * configure.ac: Updated to test for 64-bit types. This version of
+ the library does not require a 64-bit type, but tiffcrop needs it.
+
+2008-12-31 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * Update to use current FSF autotools versions.
+ * libtiff/tiffio.h: GCC will now validate format specifications
+ for TIFFError(), TIFFErrorExt(), TIFFWarning(), and
+ TIFFWarningExt() in order to reveal bugs. Cleaned up resulting
+ warnings throughout for 32 bit build only.
+
+2008-12-31 Frank Warmerdam <warmerdam@pobox.com>
+
+ * tools/tiffcrop.c, man/tiffcrop.1: A major update from Richard
+ Nolde.
+
+2008-12-21 Frank Warmerdam <warmerdam@pobox.com>
+
+ * libtiff/tif_jpeg.c: Avoid errors if the application writes a full
+ strip for the last partial strip in a jpeg compressed file.
+ http://bugzilla.maptools.org/show_bug.cgi?id=1981
+
+2008-12-21 Frank Warmerdam <warmerdam@pobox.com>
+
+ * libtiff/tif_getimage.c, tiffio.h: More ABI corrections.
+ Removed SubsamplingHor/Ver from TIFFRGBAImage structure.
+ http://bugzilla.maptools.org/show_bug.cgi?id=1980
+
+2008-12-18 Frank Warmerdam <warmerdam@pobox.com>
+
+ * libtiff/tif_getimage.c,tiffio.h: removed all use of UaToAa and
+ Bitmap16to8 arrays in TIFFRGBAImage structure to restore ABI
+ compatability. These were just an attempt to speed up processing
+ with precalculated tables.
+ http://bugzilla.maptools.org/show_bug.cgi?id=1979
+
+ * libtiff/tif_codec.c: Avoid printing c->name if it does not exist.
+
+2008-10-21 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * libtiff/tif_jbig.c: Support the JBIG-KIT 2.0 (compatibility with
+ the older versions retained).
+
+2008-09-05 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * tools/tiffsplit.c: Use dynamically allocated array instead of static
+ when constructing output file names.
+
+2008-09-03 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * tools/tiffsplit.c: Get rid of unsafe strcpy()/strcat() calls when
+ doing the filename/path construction.
+
+ * tools/tiff2pdf.c: More appropriate format string in
+ t2p_write_pdf_string(); avoid signed/unsigned mismatch.
+
+ * libtiff/tif_lzw.c: Properly zero out the codetable. As per bug
+
+ http://bugzilla.maptools.org/show_bug.cgi?id=1929
+
+ * libtiff/tif_lzw.c: Properly zero out the string table. Fixes
+ CVE-2008-2327 security issue.
+
+2008-05-24 Frank Warmerdam <warmerdam@pobox.com>
+
+ * tif_codec.c: Avoid NULL pointer dereferencing for exotic
+ compression codec codes.
+
+ * tif_dirread.c: zero tif->tif_dir after freeing the directory
+ in TIFFReadCustomDirectory(). I don't exactly remember why this
+ was important.
+
+ * tif_dirwrite.c: Fix potential memory leak writing large double
+ tags.
+
+ * tif_dirread.c: Fix unchecked malloc result.
+
+2008-01-30 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * tif_fax3.c: Make find0span() and find1span() non-inline to
+ make MSVC 6.0 compiler happy.
+
+2007-11-26 Frank Warmerdam <warmerdam@pobox.com>
+
+ * tif_fax3.c: fix leak of FAXCS state (per bug 1603).
+
+2007-11-23 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * configure.com, libtiff/tif_vms.c: Better OpenVMS support. Patches
+ from Alexey Chupahin.
+
+2007-11-22 Frank Warmerdam <warmerdam@pobox.com>
+
+ * tif_write.c: Rip out the fancy logic in TIFFAppendToStrip() for
+ establishing if an existing tile can be rewritten to the same location
+ by comparing the current size to all the other blocks in the same
+ directory. This is dangerous in many situations and can easily
+ corrupt a file. (observed in esoteric GDAL situation that's hard to
+ document). This change involves leaving the stripbytecount[] values
+ unaltered till TIFFAppendToStrip(). Now we only write a block back
+ to the same location it used to be at if the new data is the same
+ size or smaller - otherwise we move it to the end of file.
+
+ * tif_dirwrite.c: Try to avoid writing out a full readbuffer of tile
+ data when writing the directory just because we have BEENWRITING at
+ some point in the past. This was causing odd junk to be written out
+ in a tile of data when a single tile had an interleaving of reading
+ and writing with reading last. (highlighted by gdal
+ autotest/gcore/tif_write.py test 7.
+
+ * tif_predict.c: use working buffer in PredictorEncodeTile to avoid
+ modifying callers buffer.
+ http://trac.osgeo.org/gdal/ticket/1965
+
+ * tif_predict.c/h, tif_lzw.c, tif_zip.c: Improvements so that
+ predictor based encoding and decoding works in read-write update
+ mode properly.
+ http://trac.osgeo.org/gdal/ticket/1948
+
+2007-10-05 Frank Warmerdam <warmerdam@pobox.com>
+
+ * tools/tiff2pdf.c: Fixed setting of alpha value per report on list.
+
+2007-09-13 Frank Warmerdam <warmerdam@pobox.com>
+
+ * tif_dirinfo.c: _TIFFMergeFields() now only merges in field
+ definitions that are missing. Existing definitions are silently
+ ignored. (Bug #1585)
+
+2007-07-18 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * libtiff/{Makefile.am, Makefile.v}: Do not distribute tiffconf.h,
+ remove tif_config.h/tiffconf.h during cleaning. As per bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1573
+
+2007-07-13 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * libtiff 3.9.0beta released.
+
+2007-07-12 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * tools/tiff2pdf.c: Added missed extern optind as per bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1567
+
+2007-07-03 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * tools/tiff2ps.c: Added support 16-bit images as per bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1566
+
+ Patch from William Bader.
+
+ * tools/tiff2pdf.c: Fix for TIFFTAG_JPEGTABLES tag fetching and
+ significant upgrade of the whole utility as per bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1560
+
+ Now we don't need tiffiop.h in tiff2pdf anymore and will open output
+ PDF file using TIFFClientOpen() machinery as it is implemented
+ by Leon Bottou.
+
+2007-06-29 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_dirinfo.c (_TIFFFindFieldInfo): Don't attempt to
+ bsearch() on a NULL fieldinfo list.
+ (_TIFFFindFieldInfoByName): Don't attempt to
+ lfind() on a NULL fieldinfo list.
+
+2007-05-01 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * libtiff/tif_dirwrite.c: Fixed problem introduced with a fix for a
+ byte swapping issue
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1363
+
+ As per bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1550
+
+2007-04-27 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * tools/tiff2pdf.c: Check the tmpfile() return status as per bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=154
+
+2007-04-07 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * libtiff/{tif_dir.h, tif_dirread.c, tif_dirinfo.c, tif_jpeg.c,
+ tif_fax3.c, tif_jbig.c, tif_luv.c, tif_ojpeg.c, tif_pixarlog.c,
+ tif_predict.c, tif_zip.c}: Finally fix bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1274
+
+ by introducing _TIFFMergeFieldInfo() returning integer error status
+ instead of void in case of problems with field merging (e.g., if the
+ field with such a tag already registered). TIFFMergeFieldInfo() in
+ public API remains void. Use _TIFFMergeFieldInfo() everywhere and
+ check returned value.
+
+2007-04-07 Frank Warmerdam <warmerdam@pobox.com>
+
+ * contrib/addtiffo/tif_overview.c: Fix problems with odd sized output
+ blocks in TIFF_DownSample_Subsampled() (bug 1542).
+
+2007-04-06 Frank Warmerdam <warmerdam@pobox.com>
+
+ * libtiff/tif_jpeg.c: Changed JPEGInitializeLibJPEG() so that it
+ will convert from decompressor to compressor or compress to decompress
+ if required by the force arguments. This works around a problem in
+ where the JPEGFixupTestSubsampling() may cause a decompressor to
+ be setup on a directory when later a compressor is required with the
+ force flag set. Occurs with the addtiffo program for instance.
+
+2007-04-06 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * libtiff/tif_dirwrite.c: Fixed swapping of byte arrays stored
+ in-place in tag offsets as per bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1363
+
+ * tools/tiffcrop.c, man/tiffcrop.1: Significant update in
+ functionality from Richard Nolde. As per bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1525
+
+2007-03-28 Frank Warmerdam <warmerdam@pobox.com>
+
+ * libtiff/tif_fax3.c: "inline static" -> "static inline" for IRIC CC.
+
+2007-03-07 Joris Van Damme <joris.at.lebbeke@skynet.be>
+
+ * libtiff/tif_getimage.c: workaround for 'Fractional scanline' error reading
+ OJPEG images with rowsperstrip that is not a multiple of vertical subsampling
+ factor. This bug is mentioned in:
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1390
+ http://www.asmail.be/msg0054766825.html
+
+2007-03-07 Joris Van Damme <joris.at.lebbeke@skynet.be>
+
+ * libtiff/tif_win32.c: made inclusion of windows.h unconditional
+
+ * libtiff/tif_win32.c: replaced preprocessor indication for consiously
+ unused arguments by standard C indication for the same
+
+2007-02-27 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * libtiff/tif_dirread.c: Use uint32 type instead of tsize_t in byte
+ counters in TIFFFetchData(). Should finally fix the issue
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=890
+
+2007-02-24 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * tools/tiffset.c: Properly handle tags with TIFF_VARIABLE writecount.
+ As per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1350
+
+ * libtiff/tif_dirread.c: Added special function to handle
+ SubjectDistance EXIF tag as per bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1362
+
+ * tools/tiff2pdf.c: Do not assume inches when the resolution units
+ do not specified. As per bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1366
+
+ * tools/{tiffcp.c, tiffcrop.c}: Do not change RowsPerStrip value if
+ it was set as infinite. As per bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1368
+
+ * tools/tiffcrop.c, man/tiffcrop.1: New tiffcrop utility contributed
+ by Richard Nolde. As per bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1383
+
+2007-02-22 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * libtiff/tif_dir.c: Workaround for incorrect TIFFs with
+ ExtraSamples == 999 produced by Corel Draw. As per bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1490
+
+ * libtiff/{tif_dirread.c, tif_read.c}: Type of the byte counters
+ changed from tsize_t to uint32 to be able to work with data arrays
+ larger than 2GB. Fixes bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=890
+
+ Idea submitted by Matt Hancher.
+
+2007-01-31 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * tools/tif2rgba.c: This utility does not work properly on big-endian
+ architectures. It was fixed including the bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1149
+
+2007-01-15 Mateusz Loskot <mateusz@loskot.net>
+
+ * Submitted libtiff port for Windows CE platform
+ * libtiff/tif_config.wince.h: Added configuration header for WinCE.
+ * libtiff/tiffconf.wince.h: Ported old configuration header for WinCE.
+ * libtiff/tif_wince.c: Added WinCE-specific implementation of some
+ functons from tif_win32.c.
+ * libtiff/tif_win32.c: Disabled some functions already reimplemented in tif_wince.c.
+ * libtiff/tiffiop.h, port/lfind.c: Added conditional include of some
+ standard header files for Windows CE build.
+ * tools/tiffinfoce.c: Ported tiffinfo utility for Windows CE.
+
+2006-11-19 Frank Warmerdam <warmerdam@pobox.com>
+
+ * libtiff/tif_write.c: TIFFAppendToStrip() - clear sorted flag if
+ we move a strip.
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1359
+
+2006-10-13 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * libtiff/tif_dir.c: More fixes for vulnerabilities, reported
+ in Gentoo bug ():
+
+ http://bugs.gentoo.org/show_bug.cgi?id=142383
+
+ * libtiff/contrib/dbs/xtiff/xtiff.c: Make xtiff utility compilable.
+ Though it is still far from the state of being working and useful.
+
+2006-10-12 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * libtiff/tif_fax3.c: Save the state of printdir codec dependent
+ method.
+
+ * libtiff/tif_jpeg.c: Save the state of printdir codec dependent method
+ as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1273
+
+ * libtiff/tif_win32.c: Fixed problem with offset value manipulation
+ as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1322
+
+ * libtiff/{tif_read.c, tif_jpeg.c, tif_dir.c}: More fixes for
+ vulnerabilities, reported in Gentoo bug ():
+
+ http://bugs.gentoo.org/show_bug.cgi?id=142383
+
+2006-09-28 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * libtiff/{tif_fax3.c, tif_next.c, tif_pixarlog.c}: Fixed multiple
+ vulnerabilities, as per Gentoo bug ():
+
+ http://bugs.gentoo.org/show_bug.cgi?id=142383
+
+2006-09-27 Frank Warmerdam <warmerdam@pobox.com>
+
+ * libtiff/tif_lzw.c, libtiff/tif_zip.c: Fixed problems with mixing
+ encoding and decoding on the same read-write TIFF handle. The LZW
+ code can now maintain encode and decode state at the same time. The
+ ZIP code will switch back and forth as needed.
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=757
+
+2006-09-20 Frank Warmerdam <warmerdam@pobox.com>
+
+ * libtiff: Rename config.h.vc and tif_config.h.vc to config.vc.h and
+ tif_config.vc.h for easier identification by folks using an IDE.
+
+2006-07-25 Frank Warmerdam <warmerdam@pobox.com>
+
+ * tif_msdos.c: Avoid handle leak for failed opens. c/o Thierry Pierron
+
+2006-07-19 Frank Warmerdam <warmerdam@pobox.com>
+
+ * tif_dirwrite.c: take care not to flush out buffer of strip/tile
+ data in _TIFFWriteDirectory if TIFF_BEENWRITING not set. Relates
+ to bug report by Peng Gao with black strip at bottom of images.
+
+2006-07-12 Frank Warmerdam <warmerdam@pobox.com>
+
+ * tif_dirwrite.c: make sure to use uint32 for wordcount in
+ TIFFWriteNormanTag if writecount is VARIABLE2 for ASCII fields.
+ It already seems to have been done for other field types. Needed
+ for "tiffset" on files with geotiff ascii text.
+
+2006-07-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * {configure.ac, libtiff/tif_config.h.vc, libtiff/tif_jbig.c}
+ (JBIGDecode): jbg_newlen is not available in older JBIG-KIT and
+ its use does not appear to be required, so use it only when it is
+ available.
+
+2006-06-24 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * libtiff/tif_dirinfo.c: Added missed EXIF tag ColorSpace (40961).
+
+ * libtiff/tif_dirread.c: Move IFD fetching code in the separate
+ function TIFFFetchDirectory() avoiding code duplication in
+ TIFFReadDirectory() and TIFFReadCustomDirectory().
+
+2006-06-19 Frank Warmerdam <warmerdam@pobox.com>
+
+ * tools/tiff2pdf.c: Fix handling of -q values.
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=587
+
+2006-06-17 Frank Warmerdam <warmerdam@pobox.com>
+
+ * tif_readdir.c: Added case in EstimateStripByteCounts() for tiled
+ files. Modified TIFFReadDirectory() to not invoke
+ EstimateStripByteCounts() for case where entry 0 and 1 are unequal
+ but one of them is zero.
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1204
+
+2006-06-08 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * libtiff/{tif_open.c, tif_dirread.c, tiffiop.h}: Move IFD looping
+ checking code in the separate function TIFFCheckDirOffset().
+
+ * libtiff/tif_aux.c: Added _TIFFCheckRealloc() function.
+
+ * tools/tiffcmp.c: Fixed floating point comparison logic as per bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1191
+
+ * libtiff/tif_fax3.c: Fixed problems in fax decoder as per bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1194
+
+ * tools/tiff2pdf.c: Fixed buffer overflow condition in
+ t2p_write_pdf_string() as per bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1196
+
+2006-06-07 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * {configure, configure.ac, libtiff/tif_jbig.c, tools/tiffcp.c}: Added
+ support for JBIG compression scheme (34661 code) contributed by Lee
+ Howard. As per bug
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=896
+
+ * configure, configure.ac: OJPEG support enabled by default.
+
+ * contrib/ojpeg/: Removed. New OJPEG support does not need this patch.
+
+2006-06-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/{tif_dirinfo.c, tif_print.c} : Fix crash in
+ TIFFPrintDirectory(). Joris Van Damme authored the fix.
+
+2006-04-21 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * tools/tiff2pdf.c: Unified line ending characters (always use '\n')
+ as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1163
+
+ * README.vms, Makefile.am, configure.com, libtiff/{Makefile.am,
+ tif_config.h-vms, tif_stream.cxx, tif_vms.c, tiffconf.h-vms}:
+ Added support for OpenVMS by Alexey Chupahin, elvis_75@mail.ru.
+
+2006-04-20 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * tools/{fax2ps.c, fax2tiff.c, ppm2tiff.c, ras2tiff.c, tiff2pdf.c}:
+ Properly set the binary mode for stdin stream as per bug
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1141
+
+ * man/{bmp2tiff.1, fax2ps.1, fax2tiff.1, gif2tiff.1, ras2tiff.1,
+ raw2tiff.1, rgb2ycbcr.1, sgi2tiff.1, tiff2bw.1, tiff2pdf.1, tiff2ps.1,
+ tiff2rgba.1, tiffcmp.1, tiffcp.1, tiffdither.1, tiffdump.1, tiffgt.1,
+ tiffset.1}: Improvements in page formatting as per bug
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1140
+
+ * html/tools.html, html/man/Makefile.am, tools/tiff2pdf.c: Fixed
+ typos as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1139
+
+2006-04-18 Frank Warmerdam <warmerdam@pobox.com>
+
+ * nmake.opt: use /EHsc for VS2005 compatibility. Also define
+ _CRT_SECURE_NO_DEPRECATE to avoid noise on VS2005.
+
+2006-04-12 Joris Van Damme <joris.at.lebbeke@skynet.be>
+
+ * libtiff/tif_getimage.c: Added support for planarconfig separate
+ non-subsampled YCbCr (i.e. separate YCbCr with subsampling [1,1])
+
+2006-04-11 Joris Van Damme <joris.at.lebbeke@skynet.be>
+
+ * libtiff/tif_getimage.c: Revision of all RGB(A) put routines
+ - Conversion of unassociated alpha to associated alpha now done with
+ more performant LUT, and calculation more correct
+ - Conversion of 16bit data to 8bit data now done with
+ more performant LUT, and calculation more correct
+ - Bugfix of handling of 16bit RGB with unassociated alpha
+
+2006-04-11 Joris Van Damme <joris.at.lebbeke@skynet.be>
+
+ * libtiff/tif_getimage.c:
+ - When there is no alpha, gtTileSeparate and gtStripSeparate allocated
+ buffer for alpha strile and filled it, only to never read it back.
+ Removed allocation and fill.
+ - Minor rename of vars in gtTileSeparate and gtStripSeparate
+ anticipating planned functionality extension
+
+2006-04-08 Joris Van Damme <joris.at.lebbeke@skynet.be>
+
+ * libtiff/tif_getimage.c: renamed pickTileContigCase to PickContigCase
+ and pickTileSeparateCase to PickSeparateCase as both work on strips as
+ well
+
+ * libtiff/tif_getimage.c: moved img->get selection from
+ TIFFRGBAImageBegin into PickContigCase and PickSeparateCase to create
+ logical hook for planned functionality extension
+
+2006-04-08 Joris Van Damme <joris.at.lebbeke@skynet.be>
+
+ * libtiff/tif_ojpeg.c: resolved memory leak that was a consequence
+ of inappropriate use of jpeg_abort instead of jpeg_destroy
+
+2006-04-07 Joris Van Damme <joris.at.lebbeke@skynet.be>
+
+ * libtiff/tif_getimage.c: replaced usage of TIFFScanlineSize in
+ gtStripContig with TIFFNewScanlineSize so as to fix buggy behaviour
+ on subsampled images - this ought to get sorted when we feel brave
+ enough to replace TIFFScanlineSize alltogether
+
+ * libtiff/tif_ojpeg.c: fixed bug in OJPEGReadSkip
+
+2006-04-04 Joris Van Damme <joris.at.lebbeke@skynet.be>
+
+ * libtiff/tiffio.h: added new type tstrile_t
+
+ * libtiff/tif_dir.h: changed types of td_stripsperimage and td_nstrips
+ to new tstrile_t, types of td_stripoffset and td_stripbytecount to
+ toff_t*
+
+ * libtiff/tif_ojpeg.c: totally new implementation
+
+ * libtiff/tif_dirread.c: added several hacks to suit new support of
+ OJPEG
+
+ * libtiff/tif_getimage.c: removed TIFFTAG_JPEGCOLORMODE handling
+ of OJPEG images in favor of tif_getimage.c native handling of
+ YCbCr and desubsampling
+
+2006-03-29 Frank Warmerdam <warmerdam@pobox.com>
+
+ * libtiff/tif_jpeg.c: JPEGVSetField() so that altering the photometric
+ interpretation causes the "upsampled" flag to be recomputed. Fixes
+ peculiar bug where photometric flag had to be set before jpegcolormode
+ flag.
+
+2006-03-25 Joris Van Damme <joris.at.lebbeke@skynet.be>
+
+ * libtiff/tif_jpeg.c: strip size related bugfix in encode raw
+
+ * libtiff/tif_strip.c: temporarilly added two new versions of
+ TIFFScanlineSize
+ - TIFFNewScanlineSize: proposed new version, after all related
+ issues and side-effects are sorted out
+ - TIFFOldScanlineSize: old version, from prior to 2006-03-21 change
+ This needs further sorting out.
+
+2006-03-25 Joris Van Damme <joris.at.lebbeke@skynet.be>
+
+ * contrib/addtiffo/tif_ovrcache.c: bugfix to correctly pass size
+ of last truncated strip data to TIFFWriteEncodedStrip
+
+2006-03-25 Joris Van Damme <joris.at.lebbeke@skynet.be>
+
+ * libtiff/{tif_jpeg.c, tif_strip.c}: bugfix of tif_jpeg decode raw
+
+2006-03-25 Joris Van Damme <joris.at.lebbeke@skynet.be>
+
+ * libtiff/tif_getimage.c: bugfix/rewrite of putcontig8bitYCbCr22tile
+
+ * libtiff/tif_getimage.c: added putcontig8bitYCbCr12tile
+
+ * libtiff/tif_read.c: added support for new TIFF_NOREADRAW flag to
+ prepare the path for new tif_ojpeg.c
+
2006-03-23 Andrey Kiselev <dron@ak4719.spb.edu>
* libtiff 3.8.2 released.
diff --git a/src/3rdparty/libtiff/HOWTO-RELEASE b/src/3rdparty/libtiff/HOWTO-RELEASE
index 97baedc679..d6035a5c85 100644
--- a/src/3rdparty/libtiff/HOWTO-RELEASE
+++ b/src/3rdparty/libtiff/HOWTO-RELEASE
@@ -1,57 +1,105 @@
HOWTO-RELEASE:
-Notes on releasing. You will need appropriate autoconf, automake and libtool
-utilities to release a package.
+Notes on releasing.
-1. Commit any unsaved changes.
+0. Make sure that you have current FSF releases of autoconf, automake,
+ and libtool packages installed under a common installation prefix
+ and that these tools are in your executable search path prior to
+ any other installed versions. Versions delivered with Linux may be
+ altered so it is best to install official FSF releases. GNU 'm4'
+ 1.4.6 or later is needed in order to avoid bugs in m4. These
+ packages may be downloaded from the following ftp locations:
+
+ autoconf - ftp://ftp.gnu.org/pub/gnu/autoconf
+ automake - ftp://ftp.gnu.org/pub/gnu/automake
+ libtool - ftp://ftp.gnu.org/pub/gnu/libtool
-2. "make clean"
+ Release builds should only be done on a system with a functioning
+ and correctly set system clock and on a filesystem which accurately
+ records file update times. Use of GNU make is recommended.
-3. Create html/vX.X.html. Take ChangeLog entries and html-ify in there.
+1. Commit any unsaved changes.
+
+2. Create html/vX.X.html. Take ChangeLog entries and html-ify in there.
Easist thing to do is take html/vX.(X-1).html and use it as a template.
Add that file to the list of EXTRA_DIST files in the html/Makefile.am.
-3.5. Update html/index.html to refer to this new page as the current release.
+3. Update html/index.html to refer to this new page as the current release.
-4. Increment version in configure.ac. Put 'alpha' or 'beta' after
- the version, if applicable.
+4. Increment the release version in configure.ac. Put 'alpha' or
+ 'beta' after the version, if applicable. For example:
- eg.
- 3.5.7
- or
- 3.5.8beta
+ 3.9.1
+ or
+ 3.9.1beta
Version should be updated in two places: in the second argument of the
AC_INIT macro and in LIBTIFF_xxx_VERSION variables.
-5. autoconf
+5. Add an entry to Changelog similar to:
+
+ * libtiff 3.9.1 released.
+
+6. In the source tree do
+
+ ./autogen.sh
+
+ This step may be skipped if you have already been using a
+ maintainer build with current autoconf, automake, and libtool
+ packages. It is only needed when updating tool versions.
+
+7. It is recommended (but not required) to build outside of the source
+ tree so that the source tree is kept in a pristine state. This
+ also allows sharing the source directory on several networked
+ systems. For example:
-6. sh configure
+ mkdir libtiff-build
+ cd libtiff-build
+ /path/to/libtiff/configure --enable-maintainer-mode
-7. make release -- this will update "RELEASE-DATE" and "VERSION" in the top
- level dir, and libtiff/tiffvers.h.
+ otherwise do
-8. Please verify that the version info in RELEASE-DATE, VERSION and
- libtiff/tiffvers.h is right.
+ ./configure --enable-maintainer-mode
-9. make; make distcheck (to test).
+8. In the build tree do
-10. make distclean
+ make release
-11. cvs commit
+ This will update "RELEASE-DATE", "VERSION", and libtiff/tiffvers.h
+ in the source tree.
-12. cvs tag Release-v3-5-7 (or the appropriate name for the release)
+9. In the source tree, verify that the version info in RELEASE-DATE,
+ VERSION and libtiff/tiffvers.h is right.
+
+10. In the build tree do
+
+ make
+ make distcheck
+
+ If 'make distcheck' fails, then correct any issues until it
+ succeeds.
-13. configure; make dist
Two files with names tiff-version.tar.gz and tiff-version.zip will
- be created in the top level package directory.
+ be created in the top level build directory.
+
+11. In the source tree do
+
+ 'cvs commit'.
+
+12. In the source tree do
+
+ cvs tag Release-v3-9-1
+
+ (or the appropriate name for the release)
+
+13. Copy release packages from the build tree to the
+ ftp.remotesensing.org ftp site.
-14. Copy to ftp.remotesensing.org ftp site.
- scp tiff-*.tar.gz ftp.remotesensing.org:/var/ftp/libtiff/
- scp tiff-*.zip ftp.remotesensing.org:/var/ftp/libtiff/
+ scp tiff-*.tar.gz tiff-*.zip \
+ frankw@upload.osgeo.org:/osgeo/download/libtiff
-15. Announce to list, tiff@lists.maptools.org
+14. Announce to list, tiff@lists.maptools.org
-16. Update libtiff page on freshmeat with new version announcement.
+15. Update libtiff page on freshmeat with new version announcement.
diff --git a/src/3rdparty/libtiff/Makefile.am b/src/3rdparty/libtiff/Makefile.am
deleted file mode 100644
index 20bd1d8f69..0000000000
--- a/src/3rdparty/libtiff/Makefile.am
+++ /dev/null
@@ -1,54 +0,0 @@
-# Tag Image File Format (TIFF) Software
-#
-# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-#
-# Permission to use, copy, modify, distribute, and sell this software and
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-#
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-#
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-
-# Process this file with automake to produce Makefile.in.
-
-docdir = $(LIBTIFF_DOCDIR)
-
-AUTOMAKE_OPTIONS = dist-zip foreign
-ACLOCAL_AMFLAGS = -I ./m4
-
-docfiles = \
- COPYRIGHT \
- ChangeLog \
- README \
- RELEASE-DATE \
- TODO \
- VERSION
-
-EXTRA_DIST = \
- HOWTO-RELEASE \
- Makefile.vc \
- SConstruct \
- autogen.sh \
- nmake.opt
-
-dist_doc_DATA = $(docfiles)
-
-SUBDIRS = port libtiff tools contrib test man html
-
-release:
- (rm -f RELEASE-DATE && echo $(LIBTIFF_RELEASE_DATE) > RELEASE-DATE)
- (rm -f VERSION && echo $(LIBTIFF_VERSION) > VERSION)
- (rm -f ./libtiff/tiffvers.h && sed 's,LIBTIFF_VERSION,$(LIBTIFF_VERSION),;s,LIBTIFF_RELEASE_DATE,$(LIBTIFF_RELEASE_DATE),' ./libtiff/tiffvers.h.in > ./libtiff/tiffvers.h)
-
diff --git a/src/3rdparty/libtiff/Makefile.in b/src/3rdparty/libtiff/Makefile.in
deleted file mode 100644
index 87523e5a06..0000000000
--- a/src/3rdparty/libtiff/Makefile.in
+++ /dev/null
@@ -1,724 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# Tag Image File Format (TIFF) Software
-#
-# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-#
-# Permission to use, copy, modify, distribute, and sell this software and
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-#
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-#
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-
-# Process this file with automake to produce Makefile.in.
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \
- $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/configure ChangeLog TODO config/compile \
- config/config.guess config/config.sub config/depcomp \
- config/install-sh config/ltmain.sh config/missing \
- config/mkinstalldirs
-subdir = .
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
- $(top_builddir)/libtiff/tiffconf.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(docdir)"
-dist_docDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(dist_doc_DATA)
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-am__remove_distdir = \
- { test ! -d $(distdir) \
- || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -fr $(distdir); }; }
-DIST_ARCHIVES = $(distdir).tar.gz $(distdir).zip
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GLUT_CFLAGS = @GLUT_CFLAGS@
-GLUT_LIBS = @GLUT_LIBS@
-GLU_CFLAGS = @GLU_CFLAGS@
-GLU_LIBS = @GLU_LIBS@
-GL_CFLAGS = @GL_CFLAGS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
-HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
-HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
-HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
-HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
-HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBDIR = @LIBDIR@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
-LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
-LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
-LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
-LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
-LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
-LIBTIFF_VERSION = @LIBTIFF_VERSION@
-LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-NM = @NM@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-X_CFLAGS = @X_CFLAGS@
-X_EXTRA_LIBS = @X_EXTRA_LIBS@
-X_LIBS = @X_LIBS@
-X_PRE_LIBS = @X_PRE_LIBS@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-acx_pthread_config = @acx_pthread_config@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-docdir = $(LIBTIFF_DOCDIR)
-AUTOMAKE_OPTIONS = dist-zip foreign
-ACLOCAL_AMFLAGS = -I ./m4
-docfiles = \
- COPYRIGHT \
- ChangeLog \
- README \
- RELEASE-DATE \
- TODO \
- VERSION
-
-EXTRA_DIST = \
- HOWTO-RELEASE \
- Makefile.vc \
- SConstruct \
- autogen.sh \
- nmake.opt
-
-dist_doc_DATA = $(docfiles)
-SUBDIRS = port libtiff tools contrib test man html
-all: all-recursive
-
-.SUFFIXES:
-am--refresh:
- @:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
- cd $(srcdir) && $(AUTOMAKE) --foreign \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- echo ' $(SHELL) ./config.status'; \
- $(SHELL) ./config.status;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-install-dist_docDATA: $(dist_doc_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
- @list='$(dist_doc_DATA)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(dist_docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \
- $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
- done
-
-uninstall-dist_docDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(dist_doc_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \
- rm -f "$(DESTDIR)$(docdir)/$$f"; \
- done
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- $(am__remove_distdir)
- mkdir $(distdir)
- $(mkdir_p) $(distdir)/config $(distdir)/m4
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
- || exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
- distdir) \
- || exit 1; \
- fi; \
- done
- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
- ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
- || chmod -R a+r $(distdir)
-dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
-
-dist-bzip2: distdir
- tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
- $(am__remove_distdir)
-
-dist-tarZ: distdir
- tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__remove_distdir)
-
-dist-shar: distdir
- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
- $(am__remove_distdir)
-dist-zip: distdir
- -rm -f $(distdir).zip
- zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
-
-dist dist-all: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- -rm -f $(distdir).zip
- zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- case '$(DIST_ARCHIVES)' in \
- *.tar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
- *.tar.bz2*) \
- bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.Z*) \
- uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
- *.shar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
- *.zip*) \
- unzip $(distdir).zip ;;\
- esac
- chmod -R a-w $(distdir); chmod a+w $(distdir)
- mkdir $(distdir)/_build
- mkdir $(distdir)/_inst
- chmod a-w $(distdir)
- dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
- && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
- && cd $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
- $(DISTCHECK_CONFIGURE_FLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) uninstall \
- && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
- distuninstallcheck \
- && chmod -R a-w "$$dc_install_base" \
- && ({ \
- (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
- distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
- } || { rm -rf "$$dc_destdir"; exit 1; }) \
- && rm -rf "$$dc_destdir" \
- && $(MAKE) $(AM_MAKEFLAGS) dist \
- && rm -rf $(DIST_ARCHIVES) \
- && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
- $(am__remove_distdir)
- @(echo "$(distdir) archives ready for distribution: "; \
- list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
- sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
-distuninstallcheck:
- @cd $(distuninstallcheck_dir) \
- && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
- || { echo "ERROR: files left after uninstall:" ; \
- if test -n "$(DESTDIR)"; then \
- echo " (check DESTDIR support)"; \
- fi ; \
- $(distuninstallcheck_listfiles) ; \
- exit 1; } >&2
-distcleancheck: distclean
- @if test '$(srcdir)' = . ; then \
- echo "ERROR: distcleancheck can only run from a VPATH build" ; \
- exit 1 ; \
- fi
- @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
- || { echo "ERROR: files left in build directory after distclean:" ; \
- $(distcleancheck_listfiles) ; \
- exit 1; } >&2
-check-am: all-am
-check: check-recursive
-all-am: Makefile $(DATA)
-installdirs: installdirs-recursive
-installdirs-am:
- for dir in "$(DESTDIR)$(docdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am: install-dist_docDATA
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf $(top_srcdir)/autom4te.cache
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-dist_docDATA uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
- check-am clean clean-generic clean-libtool clean-recursive \
- ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
- dist-shar dist-tarZ dist-zip distcheck distclean \
- distclean-generic distclean-libtool distclean-recursive \
- distclean-tags distcleancheck distdir distuninstallcheck dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dist_docDATA install-exec \
- install-exec-am install-info install-info-am install-man \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- maintainer-clean-recursive mostlyclean mostlyclean-generic \
- mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
- tags tags-recursive uninstall uninstall-am \
- uninstall-dist_docDATA uninstall-info-am
-
-
-release:
- (rm -f RELEASE-DATE && echo $(LIBTIFF_RELEASE_DATE) > RELEASE-DATE)
- (rm -f VERSION && echo $(LIBTIFF_VERSION) > VERSION)
- (rm -f ./libtiff/tiffvers.h && sed 's,LIBTIFF_VERSION,$(LIBTIFF_VERSION),;s,LIBTIFF_RELEASE_DATE,$(LIBTIFF_RELEASE_DATE),' ./libtiff/tiffvers.h.in > ./libtiff/tiffvers.h)
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/3rdparty/libtiff/Makefile.vc b/src/3rdparty/libtiff/Makefile.vc
deleted file mode 100644
index 7ffefc2c32..0000000000
--- a/src/3rdparty/libtiff/Makefile.vc
+++ /dev/null
@@ -1,59 +0,0 @@
-# $Id: Makefile.vc,v 1.5 2006/03/23 14:54:00 dron Exp $
-#
-# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-#
-# Permission to use, copy, modify, distribute, and sell this software and
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-#
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-#
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-#
-# Makefile for MS Visual C and Watcom C compilers.
-# Edit nmake.opt file if you want to ajust building options.
-#
-# To build:
-# C:\libtiff> nmake /f makefile.vc
-
-!INCLUDE nmake.opt
-
-all: port lib tools
-
-port::
- cd port
- $(MAKE) /f Makefile.vc
- cd..
-
-lib: port
- cd libtiff
- $(MAKE) /f Makefile.vc
- cd..
-
-tools: lib
- cd tools
- $(MAKE) /f Makefile.vc
- cd ..
-
-clean:
- cd port
- $(MAKE) /f Makefile.vc clean
- cd..
- cd libtiff
- $(MAKE) /f Makefile.vc clean
- cd..
- cd tools
- $(MAKE) /f Makefile.vc clean
- cd ..
-
diff --git a/src/3rdparty/libtiff/README.vms b/src/3rdparty/libtiff/README.vms
new file mode 100644
index 0000000000..44d9663927
--- /dev/null
+++ b/src/3rdparty/libtiff/README.vms
@@ -0,0 +1,12 @@
+Dear OpenVMS user
+to make this library, execute
+$@CONFIGURE
+$@BUILD
+
+Build process should be error and warning free. When process will be finished,
+LIBTIFF$STRATUP.COM file containing all required definitions, will be created.
+Please call it from system startup procedure or individual user procedure LOGIN.COM
+To link software with libtiff, use TIFF:LIBTIFF.OPT
+
+best regards,
+Alexey Chupahin, elvis_75@mail.ru
diff --git a/src/3rdparty/libtiff/RELEASE-DATE b/src/3rdparty/libtiff/RELEASE-DATE
index 14ad11c67d..1f15bfe5c4 100644
--- a/src/3rdparty/libtiff/RELEASE-DATE
+++ b/src/3rdparty/libtiff/RELEASE-DATE
@@ -1 +1 @@
-20060323
+20091104
diff --git a/src/3rdparty/libtiff/SConstruct b/src/3rdparty/libtiff/SConstruct
index 3285157bf4..682246ea06 100644
--- a/src/3rdparty/libtiff/SConstruct
+++ b/src/3rdparty/libtiff/SConstruct
@@ -1,4 +1,4 @@
-# $Id: SConstruct,v 1.2 2006/03/23 14:54:00 dron Exp $
+# $Id: SConstruct,v 1.4 2007/02/24 15:03:47 dron Exp $
# Tag Image File Format (TIFF) Software
#
@@ -76,7 +76,7 @@ Export([ 'env', 'idir_prefix', 'idir_lib', 'idir_bin', 'idir_inc', 'idir_doc' ])
# Now proceed to system feature checks
target_cpu, target_vendor, target_kernel, target_os = \
- os.popen("./config.guess").readlines()[0].split("-")
+ os.popen("./config/config.guess").readlines()[0].split("-")
def Define(context, key, have):
import SCons.Conftest
@@ -132,6 +132,7 @@ if target_os != 'cygwin' \
# Check for system headers
conf.CheckCHeader('assert.h')
conf.CheckCHeader('fcntl.h')
+conf.CheckCHeader('io.h')
conf.CheckCHeader('limits.h')
conf.CheckCHeader('malloc.h')
conf.CheckCHeader('search.h')
@@ -145,6 +146,7 @@ conf.CheckFunc('memmove')
conf.CheckFunc('memset')
conf.CheckFunc('mmap')
conf.CheckFunc('pow')
+conf.CheckFunc('setmode')
conf.CheckFunc('sqrt')
conf.CheckFunc('strchr')
conf.CheckFunc('strrchr')
diff --git a/src/3rdparty/libtiff/VERSION b/src/3rdparty/libtiff/VERSION
index a08ffae0ca..2009c7dfad 100644
--- a/src/3rdparty/libtiff/VERSION
+++ b/src/3rdparty/libtiff/VERSION
@@ -1 +1 @@
-3.8.2
+3.9.2
diff --git a/src/3rdparty/libtiff/aclocal.m4 b/src/3rdparty/libtiff/aclocal.m4
deleted file mode 100644
index eff669bda6..0000000000
--- a/src/3rdparty/libtiff/aclocal.m4
+++ /dev/null
@@ -1,7281 +0,0 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-
-# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
-
-
-# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
-# -----------------------------------------------------------
-# If this macro is not defined by Autoconf, define it here.
-m4_ifdef([AC_PROVIDE_IFELSE],
- [],
- [m4_define([AC_PROVIDE_IFELSE],
- [m4_ifdef([AC_PROVIDE_$1],
- [$2], [$3])])])
-
-
-# AC_PROG_LIBTOOL
-# ---------------
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
- AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [AC_LIBTOOL_CXX],
- [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
- ])])
-dnl And a similar setup for Fortran 77 support
- AC_PROVIDE_IFELSE([AC_PROG_F77],
- [AC_LIBTOOL_F77],
- [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
-])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
- AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [ifdef([AC_PROG_GCJ],
- [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
- ifdef([A][M_PROG_GCJ],
- [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
- ifdef([LT_AC_PROG_GCJ],
- [define([LT_AC_PROG_GCJ],
- defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
-])])# AC_PROG_LIBTOOL
-
-
-# _AC_PROG_LIBTOOL
-# ----------------
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Prevent multiple expansion
-define([AC_PROG_LIBTOOL], [])
-])# _AC_PROG_LIBTOOL
-
-
-# AC_LIBTOOL_SETUP
-# ----------------
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.50)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-
-AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
-dnl
-
-AC_LIBTOOL_SYS_MAX_CMD_LEN
-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-AC_LIBTOOL_OBJDIR
-
-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-_LT_AC_PROG_ECHO_BACKSLASH
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
-[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
-
-# Same as above, but do not quote variable references.
-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Constants:
-rm="rm -f"
-
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-AC_CHECK_TOOL(AR, ar, false)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$SED" && SED=sed
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
-test -z "$ac_objext" && ac_objext=o
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- AC_PATH_MAGIC
- fi
- ;;
-esac
-
-AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
-enable_win32_dll=yes, enable_win32_dll=no)
-
-AC_ARG_ENABLE([libtool-lock],
- [AC_HELP_STRING([--disable-libtool-lock],
- [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-AC_ARG_WITH([pic],
- [AC_HELP_STRING([--with-pic],
- [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
- [pic_mode="$withval"],
- [pic_mode=default])
-test -z "$pic_mode" && pic_mode=default
-
-# Use C for the default configuration in the libtool script
-tagname=
-AC_LIBTOOL_LANG_C_CONFIG
-_LT_AC_TAGCONFIG
-])# AC_LIBTOOL_SETUP
-
-
-# _LT_AC_SYS_COMPILER
-# -------------------
-AC_DEFUN([_LT_AC_SYS_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_AC_SYS_COMPILER
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
-AC_DEFUN([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
- case $cc_temp in
- compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
- distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-])
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-AC_DEFUN([_LT_COMPILER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-AC_DEFUN([_LT_LINKER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
-])# _LT_LINKER_BOILERPLATE
-
-
-# _LT_AC_SYS_LIBPATH_AIX
-# ----------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_AC_SYS_LIBPATH_AIX
-
-
-# _LT_AC_SHELL_INIT(ARG)
-# ----------------------
-AC_DEFUN([_LT_AC_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
- [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
- [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_AC_SHELL_INIT
-
-
-# _LT_AC_PROG_ECHO_BACKSLASH
-# --------------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
-[_LT_AC_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$ECHO in
-X*--fallback-echo)
- # Remove one level of quotation (which was required for Make).
- ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
- ;;
-esac
-
-echo=${ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X[$]1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
- # Yippee, $echo works!
- :
-else
- # Restart under the correct shell.
- exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<EOF
-[$]*
-EOF
- exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$ECHO"; then
-if test "X${echo_test_string+set}" != Xset; then
-# find a string as large as possible, as long as the shell can cope with it
- for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if (echo_test_string=`eval $cmd`) 2>/dev/null &&
- echo_test_string=`eval $cmd` &&
- (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
- then
- break
- fi
- done
-fi
-
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- :
-else
- # The Solaris, AIX, and Digital Unix default echo programs unquote
- # backslashes. This makes it impossible to quote backslashes using
- # echo "$something" | sed 's/\\/\\\\/g'
- #
- # So, first we look for a working echo in the user's PATH.
-
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for dir in $PATH /usr/ucb; do
- IFS="$lt_save_ifs"
- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- echo="$dir/echo"
- break
- fi
- done
- IFS="$lt_save_ifs"
-
- if test "X$echo" = Xecho; then
- # We didn't find a better echo, so look for alternatives.
- if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # This shell has a builtin print -r that does the trick.
- echo='print -r'
- elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
- test "X$CONFIG_SHELL" != X/bin/ksh; then
- # If we have ksh, try running configure again with it.
- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
- export ORIGINAL_CONFIG_SHELL
- CONFIG_SHELL=/bin/ksh
- export CONFIG_SHELL
- exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
- else
- # Try using printf.
- echo='printf %s\n'
- if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # Cool, printf works
- :
- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
- export CONFIG_SHELL
- SHELL="$CONFIG_SHELL"
- export SHELL
- echo="$CONFIG_SHELL [$]0 --fallback-echo"
- elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- echo="$CONFIG_SHELL [$]0 --fallback-echo"
- else
- # maybe with a smaller string...
- prev=:
-
- for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
- if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
- then
- break
- fi
- prev="$cmd"
- done
-
- if test "$prev" != 'sed 50q "[$]0"'; then
- echo_test_string=`eval $prev`
- export echo_test_string
- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
- else
- # Oops. We lost completely, so just stick with echo.
- echo=echo
- fi
- fi
- fi
- fi
-fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-ECHO=$echo
-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
- ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
-
-AC_SUBST(ECHO)
-])])# _LT_AC_PROG_ECHO_BACKSLASH
-
-
-# _LT_AC_LOCK
-# -----------
-AC_DEFUN([_LT_AC_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
- [AC_HELP_STRING([--disable-libtool-lock],
- [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_PUSH(C)
- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_POP])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-sparc*-*solaris*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *64-bit*)
- case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *) LD="${LD-ld} -64" ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
- ])
-esac
-
-need_locks="$enable_libtool_lock"
-
-])# _LT_AC_LOCK
-
-
-# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
-[AC_REQUIRE([LT_AC_PROG_SED])
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$3"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- fi
- $rm conftest*
-])
-
-if test x"[$]$2" = xyes; then
- ifelse([$5], , :, [$5])
-else
- ifelse([$6], , :, [$6])
-fi
-])# AC_LIBTOOL_COMPILER_OPTION
-
-
-# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [ACTION-SUCCESS], [ACTION-FAILURE])
-# ------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
-[AC_CACHE_CHECK([$1], [$2],
- [$2=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $3"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&AS_MESSAGE_LOG_FD
- $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- else
- $2=yes
- fi
- fi
- $rm conftest*
- LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
- ifelse([$4], , :, [$4])
-else
- ifelse([$5], , :, [$5])
-fi
-])# AC_LIBTOOL_LINKER_OPTION
-
-
-# AC_LIBTOOL_SYS_MAX_CMD_LEN
-# --------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
-[# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
-
- cygwin* | mingw*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
-
- interix*)
- # We know the value 262144 and hardcode it with a safety zone (like BSD)
- lt_cv_sys_max_cmd_len=196608
- ;;
-
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- sco3.2v5*)
- lt_cv_sys_max_cmd_len=102400
- ;;
- sysv5* | sco5v6* | sysv4.2uw2*)
- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
- if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
- else
- lt_cv_sys_max_cmd_len=32768
- fi
- ;;
- *)
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
- = "XX$teststring") >/dev/null 2>&1 &&
- new_result=`expr "X$teststring" : ".*" 2>&1` &&
- lt_cv_sys_max_cmd_len=$new_result &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- teststring=
- # Add a significant safety factor because C++ compilers can tack on massive
- # amounts of additional arguments before passing them to the linker.
- # It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- ;;
- esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
- AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
- AC_MSG_RESULT(none)
-fi
-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
-
-
-# _LT_AC_CHECK_DLFCN
-# ------------------
-AC_DEFUN([_LT_AC_CHECK_DLFCN],
-[AC_CHECK_HEADERS(dlfcn.h)dnl
-])# _LT_AC_CHECK_DLFCN
-
-
-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ---------------------------------------------------------------------
-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
- [$4]
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- exit (status);
-}]
-EOF
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) $1 ;;
- x$lt_dlneed_uscore) $2 ;;
- x$lt_dlunknown|x*) $3 ;;
- esac
- else :
- # compilation failed
- $3
- fi
-fi
-rm -fr conftest*
-])# _LT_AC_TRY_DLOPEN_SELF
-
-
-# AC_LIBTOOL_DLOPEN_SELF
-# ----------------------
-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-else
- lt_cv_dlopen=no
- lt_cv_dlopen_libs=
-
- case $host_os in
- beos*)
- lt_cv_dlopen="load_add_on"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
- mingw* | pw32*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- cygwin*)
- lt_cv_dlopen="dlopen"
- lt_cv_dlopen_libs=
- ;;
-
- darwin*)
- # if libdl is installed we need to link against it
- AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ])
- ;;
-
- *)
- AC_CHECK_FUNC([shl_load],
- [lt_cv_dlopen="shl_load"],
- [AC_CHECK_LIB([dld], [shl_load],
- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
- [AC_CHECK_FUNC([dlopen],
- [lt_cv_dlopen="dlopen"],
- [AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
- [AC_CHECK_LIB([svld], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
- [AC_CHECK_LIB([dld], [dld_link],
- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
- ])
- ])
- ])
- ])
- ])
- ;;
- esac
-
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
- enable_dlopen=no
- fi
-
- case $lt_cv_dlopen in
- dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS="$LDFLAGS"
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- AC_CACHE_CHECK([whether a program can dlopen itself],
- lt_cv_dlopen_self, [dnl
- _LT_AC_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
- lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
- ])
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
- lt_cv_dlopen_self_static, [dnl
- _LT_AC_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
- lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
- ])
- fi
-
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
- ;;
- esac
-
- case $lt_cv_dlopen_self in
- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
- *) enable_dlopen_self=unknown ;;
- esac
-
- case $lt_cv_dlopen_self_static in
- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
- *) enable_dlopen_self_static=unknown ;;
- esac
-fi
-])# AC_LIBTOOL_DLOPEN_SELF
-
-
-# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
-# ---------------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler
-AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
- [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
- [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
- $rm -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
- fi
- fi
- chmod u+w . 2>&AS_MESSAGE_LOG_FD
- $rm conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
- $rm out/* && rmdir out
- cd ..
- rmdir conftest
- $rm conftest*
-])
-])# AC_LIBTOOL_PROG_CC_C_O
-
-
-# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
-# -----------------------------------------
-# Check to see if we can do hard links to lock some files if needed
-AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
-[AC_REQUIRE([_LT_AC_LOCK])dnl
-
-hard_links="nottested"
-if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- AC_MSG_CHECKING([if we can lock with hard links])
- hard_links=yes
- $rm conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- AC_MSG_RESULT([$hard_links])
- if test "$hard_links" = no; then
- AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
-
-
-# AC_LIBTOOL_OBJDIR
-# -----------------
-AC_DEFUN([AC_LIBTOOL_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- lt_cv_objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-])# AC_LIBTOOL_OBJDIR
-
-
-# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
-# ----------------------------------------------
-# Check hardcoding attributes.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_AC_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
- test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
- test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
-
- # We can hardcode non-existant directories.
- if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
- test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
- # Linking always hardcodes the temporary library directory.
- _LT_AC_TAGVAR(hardcode_action, $1)=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- _LT_AC_TAGVAR(hardcode_action, $1)=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
-
-
-# AC_LIBTOOL_SYS_LIB_STRIP
-# ------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
-[striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- AC_MSG_RESULT([yes])
-else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP" ; then
- striplib="$STRIP -x"
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
-fi
- ;;
- *)
- AC_MSG_RESULT([no])
- ;;
- esac
-fi
-])# AC_LIBTOOL_SYS_LIB_STRIP
-
-
-# AC_LIBTOOL_SYS_DYNAMIC_LINKER
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
-[AC_MSG_CHECKING([dynamic linker characteristics])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix4* | aix5*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[[01]] | aix4.[[01]].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[[45]]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $rm \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[[123]]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[[01]]* | freebsdelf3.[[01]]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
- freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- freebsd*) # from 4.6 on
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-interix3*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-netbsdelf*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='NetBSD ld.elf_so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-nto-qnx*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[[89]] | openbsd2.[[89]].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- export_dynamic_flag_spec='${wl}-Blargedynsym'
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- shlibpath_overrides_runpath=no
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- shlibpath_overrides_runpath=yes
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
-
-
-# _LT_AC_TAGCONFIG
-# ----------------
-AC_DEFUN([_LT_AC_TAGCONFIG],
-[AC_ARG_WITH([tags],
- [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
- [include additional configurations @<:@automatic@:>@])],
- [tagnames="$withval"])
-
-if test -f "$ltmain" && test -n "$tagnames"; then
- if test ! -f "${ofile}"; then
- AC_MSG_WARN([output file `$ofile' does not exist])
- fi
-
- if test -z "$LTCC"; then
- eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
- if test -z "$LTCC"; then
- AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
- else
- AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
- fi
- fi
- if test -z "$LTCFLAGS"; then
- eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
- fi
-
- # Extract list of available tagged configurations in $ofile.
- # Note that this assumes the entire list is on one line.
- available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
-
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for tagname in $tagnames; do
- IFS="$lt_save_ifs"
- # Check whether tagname contains only valid characters
- case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
- "") ;;
- *) AC_MSG_ERROR([invalid tag name: $tagname])
- ;;
- esac
-
- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
- then
- AC_MSG_ERROR([tag name \"$tagname\" already exists])
- fi
-
- # Update the list of available tags.
- if test -n "$tagname"; then
- echo appending configuration tag \"$tagname\" to $ofile
-
- case $tagname in
- CXX)
- if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
- AC_LIBTOOL_LANG_CXX_CONFIG
- else
- tagname=""
- fi
- ;;
-
- F77)
- if test -n "$F77" && test "X$F77" != "Xno"; then
- AC_LIBTOOL_LANG_F77_CONFIG
- else
- tagname=""
- fi
- ;;
-
- GCJ)
- if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
- AC_LIBTOOL_LANG_GCJ_CONFIG
- else
- tagname=""
- fi
- ;;
-
- RC)
- AC_LIBTOOL_LANG_RC_CONFIG
- ;;
-
- *)
- AC_MSG_ERROR([Unsupported tag name: $tagname])
- ;;
- esac
-
- # Append the new tag name to the list of available tags.
- if test -n "$tagname" ; then
- available_tags="$available_tags $tagname"
- fi
- fi
- done
- IFS="$lt_save_ifs"
-
- # Now substitute the updated list of available tags.
- if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
- mv "${ofile}T" "$ofile"
- chmod +x "$ofile"
- else
- rm -f "${ofile}T"
- AC_MSG_ERROR([unable to update list of available tagged configurations.])
- fi
-fi
-])# _LT_AC_TAGCONFIG
-
-
-# AC_LIBTOOL_DLOPEN
-# -----------------
-# enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN],
- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_DLOPEN
-
-
-# AC_LIBTOOL_WIN32_DLL
-# --------------------
-# declare package support for building win32 DLLs
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_WIN32_DLL
-
-
-# AC_ENABLE_SHARED([DEFAULT])
-# ---------------------------
-# implement the --enable-shared flag
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([shared],
- [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
- [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
-])# AC_ENABLE_SHARED
-
-
-# AC_DISABLE_SHARED
-# -----------------
-# set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)
-])# AC_DISABLE_SHARED
-
-
-# AC_ENABLE_STATIC([DEFAULT])
-# ---------------------------
-# implement the --enable-static flag
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([static],
- [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
- [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_static=]AC_ENABLE_STATIC_DEFAULT)
-])# AC_ENABLE_STATIC
-
-
-# AC_DISABLE_STATIC
-# -----------------
-# set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)
-])# AC_DISABLE_STATIC
-
-
-# AC_ENABLE_FAST_INSTALL([DEFAULT])
-# ---------------------------------
-# implement the --enable-fast-install flag
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([fast-install],
- [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
- [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
-])# AC_ENABLE_FAST_INSTALL
-
-
-# AC_DISABLE_FAST_INSTALL
-# -----------------------
-# set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)
-])# AC_DISABLE_FAST_INSTALL
-
-
-# AC_LIBTOOL_PICMODE([MODE])
-# --------------------------
-# implement the --with-pic flag
-# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)
-])# AC_LIBTOOL_PICMODE
-
-
-# AC_PROG_EGREP
-# -------------
-# This is predefined starting with Autoconf 2.54, so this conditional
-# definition can be removed once we require Autoconf 2.54 or later.
-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
-[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
- [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi])
- EGREP=$ac_cv_prog_egrep
- AC_SUBST([EGREP])
-])])
-
-
-# AC_PATH_TOOL_PREFIX
-# -------------------
-# find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] | ?:[\\/]*])
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="ifelse([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- AC_MSG_RESULT($MAGIC_CMD)
-else
- AC_MSG_RESULT(no)
-fi
-])# AC_PATH_TOOL_PREFIX
-
-
-# AC_PATH_MAGIC
-# -------------
-# find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
- else
- MAGIC_CMD=:
- fi
-fi
-])# AC_PATH_MAGIC
-
-
-# AC_PROG_LD
-# ----------
-# find the pathname to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH([gnu-ld],
- [AC_HELP_STRING([--with-gnu-ld],
- [assume the C compiler uses GNU ld @<:@default=no@:>@])],
- [test "$withval" = no || with_gnu_ld=yes],
- [with_gnu_ld=no])
-AC_REQUIRE([LT_AC_PROG_SED])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by $CC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]]* | ?:[[\\/]]*)
- re_direlt='/[[^/]][[^/]]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])# AC_PROG_LD
-
-
-# AC_PROG_LD_GNU
-# --------------
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# AC_PROG_LD_GNU
-
-
-# AC_PROG_LD_RELOAD_FLAG
-# ----------------------
-# find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files],
- lt_cv_ld_reload_flag,
- [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
- darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
- else
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- fi
- ;;
-esac
-])# AC_PROG_LD_RELOAD_FLAG
-
-
-# AC_DEPLIBS_CHECK_METHOD
-# -----------------------
-# how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependent libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix4* | aix5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi[[45]]*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin*)
- # func_win32_libid is a shell function defined in ltmain.sh
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- ;;
-
-mingw* | pw32*)
- # Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump'.
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-freebsd* | dragonfly*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
- case $host_cpu in
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- hppa*64*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
- ;;
- *)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- esac
- ;;
-
-interix3*)
- # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
- fi
- ;;
-
-newos6*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-nto-qnx*)
- lt_cv_deplibs_check_method=unknown
- ;;
-
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
- fi
- ;;
-
-osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.3*)
- case $host_vendor in
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- sequent)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
- ;;
- sni)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
- siemens)
- lt_cv_deplibs_check_method=pass_all
- ;;
- pc)
- lt_cv_deplibs_check_method=pass_all
- ;;
- esac
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-])# AC_DEPLIBS_CHECK_METHOD
-
-
-# AC_PROG_NM
-# ----------
-# find the pathname to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
- lt_nm_to_check="$lt_nm_to_check nm"
- fi
- for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
- done
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-])# AC_PROG_NM
-
-
-# AC_CHECK_LIBM
-# -------------
-# check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
- # These system don't have libm, or don't need it
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, cos, LIBM="-lm")
- ;;
-esac
-])# AC_CHECK_LIBM
-
-
-# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl convenience library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-convenience to the configure arguments. Note that
-# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
-# it is assumed to be `libltdl'. LIBLTDL will be prefixed with
-# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
-# (note the single quotes!). If your package is not flat and you're not
-# using automake, define top_builddir and top_srcdir appropriately in
-# the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case $enable_ltdl_convenience in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
- LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
- # For backwards non-gettext consistent compatibility...
- INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_CONVENIENCE
-
-
-# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl installable library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-install to the configure arguments. Note that
-# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
-# and an installed libltdl is not found, it is assumed to be `libltdl'.
-# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
-# '${top_srcdir}/' (note the single quotes!). If your package is not
-# flat and you're not using automake, define top_builddir and top_srcdir
-# appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, lt_dlinit,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
- LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- LTDLINCL=
- fi
- # For backwards non-gettext consistent compatibility...
- INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_INSTALLABLE
-
-
-# AC_LIBTOOL_CXX
-# --------------
-# enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX],
-[AC_REQUIRE([_LT_AC_LANG_CXX])
-])# AC_LIBTOOL_CXX
-
-
-# _LT_AC_LANG_CXX
-# ---------------
-AC_DEFUN([_LT_AC_LANG_CXX],
-[AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
-])# _LT_AC_LANG_CXX
-
-# _LT_AC_PROG_CXXCPP
-# ------------------
-AC_DEFUN([_LT_AC_PROG_CXXCPP],
-[
-AC_REQUIRE([AC_PROG_CXX])
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
- AC_PROG_CXXCPP
-fi
-])# _LT_AC_PROG_CXXCPP
-
-# AC_LIBTOOL_F77
-# --------------
-# enable support for Fortran 77 libraries
-AC_DEFUN([AC_LIBTOOL_F77],
-[AC_REQUIRE([_LT_AC_LANG_F77])
-])# AC_LIBTOOL_F77
-
-
-# _LT_AC_LANG_F77
-# ---------------
-AC_DEFUN([_LT_AC_LANG_F77],
-[AC_REQUIRE([AC_PROG_F77])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
-])# _LT_AC_LANG_F77
-
-
-# AC_LIBTOOL_GCJ
-# --------------
-# enable support for GCJ libraries
-AC_DEFUN([AC_LIBTOOL_GCJ],
-[AC_REQUIRE([_LT_AC_LANG_GCJ])
-])# AC_LIBTOOL_GCJ
-
-
-# _LT_AC_LANG_GCJ
-# ---------------
-AC_DEFUN([_LT_AC_LANG_GCJ],
-[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
- [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
- [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
- [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
-])# _LT_AC_LANG_GCJ
-
-
-# AC_LIBTOOL_RC
-# -------------
-# enable support for Windows resource files
-AC_DEFUN([AC_LIBTOOL_RC],
-[AC_REQUIRE([LT_AC_PROG_RC])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
-])# AC_LIBTOOL_RC
-
-
-# AC_LIBTOOL_LANG_C_CONFIG
-# ------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined. Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
-AC_DEFUN([_LT_AC_LANG_C_CONFIG],
-[lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}\n'
-
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_DLOPEN_SELF
-
-# Report which library types will actually be built
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
-
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
-aix4* | aix5*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
-esac
-AC_MSG_RESULT([$enable_shared])
-
-AC_MSG_CHECKING([whether to build static libraries])
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-AC_MSG_RESULT([$enable_static])
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_C_CONFIG
-
-
-# AC_LIBTOOL_LANG_CXX_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined. Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
-AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
-[AC_LANG_PUSH(C++)
-AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
-
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
-_LT_AC_TAGVAR(always_export_symbols, $1)=no
-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_direct, $1)=no
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
-_LT_AC_TAGVAR(module_cmds, $1)=
-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_AC_TAGVAR(no_undefined_flag, $1)=
-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Dependencies to place before and after the object being linked:
-_LT_AC_TAGVAR(predep_objects, $1)=
-_LT_AC_TAGVAR(postdep_objects, $1)=
-_LT_AC_TAGVAR(predeps, $1)=
-_LT_AC_TAGVAR(postdeps, $1)=
-_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC=$CC
-lt_save_LD=$LD
-lt_save_GCC=$GCC
-GCC=$GXX
-lt_save_with_gnu_ld=$with_gnu_ld
-lt_save_path_LD=$lt_cv_path_LD
-if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
-else
- $as_unset lt_cv_prog_gnu_ld
-fi
-if test -n "${lt_cv_path_LDCXX+set}"; then
- lt_cv_path_LD=$lt_cv_path_LDCXX
-else
- $as_unset lt_cv_path_LD
-fi
-test -z "${LDCXX+set}" || LD=$LDCXX
-CC=${CXX-"c++"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-
-# We don't want -fno-exception wen compiling C++ code, so set the
-# no_builtin_flag separately
-if test "$GXX" = yes; then
- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-else
- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-fi
-
-if test "$GXX" = yes; then
- # Set up default GNU C++ configuration
-
- AC_PROG_LD
-
- # Check if GNU C++ uses GNU ld as the underlying linker, since the
- # archiving commands below assume that GNU ld is being used.
- if test "$with_gnu_ld" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # If archive_cmds runs LD, not CC, wlarc should be empty
- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
- # investigate it a little bit more. (MM)
- wlarc='${wl}'
-
- # ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
- grep 'no-whole-archive' > /dev/null; then
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- else
- with_gnu_ld=no
- wlarc=
-
- # A generic and very simple default shared library creation
- # command for GNU C++ for the case where it uses the native
- # linker, instead of GNU ld. If possible, this setting should
- # overridden to take advantage of the native linker features on
- # the platform it is being used on.
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- fi
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-else
- GXX=no
- with_gnu_ld=no
- wlarc=
-fi
-
-# PORTME: fill in a description of your system's C++ link characteristics
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-_LT_AC_TAGVAR(ld_shlibs, $1)=yes
-case $host_os in
- aix3*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- aix4* | aix5*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
- for ld_flag in $LDFLAGS; do
- case $ld_flag in
- *-brtl*)
- aix_use_runtimelinking=yes
- break
- ;;
- esac
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_AC_TAGVAR(archive_cmds, $1)=''
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
- if test "$GXX" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" && \
- strings "$collect2name" | grep resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- else
- # We have old collect2
- _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an empty executable.
- _LT_AC_SYS_LIBPATH_AIX
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an empty executable.
- _LT_AC_SYS_LIBPATH_AIX
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- beos*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- chorus*)
- case $cc_basename in
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- cygwin* | mingw* | pw32*)
- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
- # as there is no search path for DLLs.
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_AC_TAGVAR(always_export_symbols, $1)=no
- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- darwin* | rhapsody*)
- case $host_os in
- rhapsody* | darwin1.[[012]])
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[[012]])
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- fi
- ;;
- esac
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
- if test "$GXX" = yes ; then
- lt_int_apple_cc_single_mod=no
- output_verbose_link_cmd='echo'
- if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
- lt_int_apple_cc_single_mod=yes
- fi
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- fi
- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- case $cc_basename in
- xlc*)
- output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- ;;
- *)
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- fi
- ;;
-
- dgux*)
- case $cc_basename in
- ec++*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
- freebsd[[12]]*)
- # C++ shared libraries reported to be fairly broken before switch to ELF
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- freebsd-elf*)
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- ;;
- freebsd* | dragonfly*)
- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
- # conventions
- _LT_AC_TAGVAR(ld_shlibs, $1)=yes
- ;;
- gnu*)
- ;;
- hpux9*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- *)
- if test "$GXX" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
- hpux10*|hpux11*)
- if test $with_gnu_ld = no; then
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- ;;
- *)
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
- esac
- fi
- case $host_cpu in
- hppa*64*|ia64*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- *)
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
- ;;
- esac
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- case $host_cpu in
- hppa*64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- *)
- if test "$GXX" = yes; then
- if test $with_gnu_ld = no; then
- case $host_cpu in
- hppa*64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- fi
- else
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
- interix3*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
- irix5* | irix6*)
- case $cc_basename in
- CC*)
- # SGI C++
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
- # Archives containing C++ object files must be created using
- # "CC -ar", where "CC" is the IRIX C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
- ;;
- *)
- if test "$GXX" = yes; then
- if test "$with_gnu_ld" = no; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
- fi
- fi
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
- ;;
- esac
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
- linux* | k*bsd*-gnu)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
- ;;
- icpc*)
- # Intel C++
- with_gnu_ld=yes
- # version 8.0 and above of icpc choke on multiply defined symbols
- # if we add $predep_objects and $postdep_objects, however 7.1 and
- # earlier do not add the objects themselves.
- case `$CC -V 2>&1` in
- *"Version 7."*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- *) # Version 8.0 or newer
- tmp_idyn=
- case $host_cpu in
- ia64*) tmp_idyn=' -i_dynamic';;
- esac
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- esac
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
- ;;
- pgCC*)
- # Portland Group C++ compiler
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
- ;;
- cxx*)
- # Compaq C++
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
- runpath_var=LD_RUN_PATH
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- esac
- ;;
- lynxos*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- m88k*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- mvs*)
- case $cc_basename in
- cxx*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
- netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
- wlarc=
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- fi
- # Workaround some broken pre-1.5 toolchains
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
- ;;
- openbsd2*)
- # C++ shared libraries are fairly broken
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- openbsd*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- fi
- output_verbose_link_cmd='echo'
- ;;
- osf3*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-
- ;;
- RCC*)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- cxx*)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- *)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
- else
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
- osf4* | osf5*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Archives containing C++ object files must be created using
- # the KAI C++ compiler.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
- ;;
- RCC*)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- cxx*)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
- echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
- $rm $lib.exp'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- *)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
- else
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
- psos*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- lcc*)
- # Lucid
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The C++ compiler is used as linker so we must use $wl
- # flag to pass the commands to the underlying system
- # linker. We must also pass each convience library through
- # to the system linker between allextract/defaultextract.
- # The C++ compiler will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
- ;;
- esac
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
- # The C++ compiler must be used to create the archive.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
- ;;
- *)
- # GNU C++ compiler with Solaris linker
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
- if $CC --version | grep -v '^2\.7' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
- else
- # g++ 2.7 appears to require `-G' NOT `-shared' on this
- # platform.
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
- fi
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
- fi
- ;;
- esac
- ;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- # For security reasons, it is highly recommended that you always
- # use absolute paths for naming shared libraries, and exclude the
- # DT_RUNPATH tag from executables and libraries. But doing so
- # requires that you compile everything twice, which is a pain.
- # So that behaviour is only enabled if SCOABSPATH is set to a
- # non-empty value in the environment. Most likely only useful for
- # creating official distributions of packages.
- # This is a hack until libtool officially supports absolute path
- # names for shared libraries.
- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
- vxworks*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
-esac
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_AC_TAGVAR(GCC, $1)="$GXX"
-_LT_AC_TAGVAR(LD, $1)="$LD"
-
-AC_LIBTOOL_POSTDEP_PREDEP($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC=$lt_save_CC
-LDCXX=$LD
-LD=$lt_save_LD
-GCC=$lt_save_GCC
-with_gnu_ldcxx=$with_gnu_ld
-with_gnu_ld=$lt_save_with_gnu_ld
-lt_cv_path_LDCXX=$lt_cv_path_LD
-lt_cv_path_LD=$lt_save_path_LD
-lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
-lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-])# AC_LIBTOOL_LANG_CXX_CONFIG
-
-# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
-# ------------------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library. It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
-int a;
-void foo (void) { a = 0; }
-EOF
-],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
-class Foo
-{
-public:
- Foo (void) { a = 0; }
-private:
- int a;
-};
-EOF
-],[$1],[F77],[cat > conftest.$ac_ext <<EOF
- subroutine foo
- implicit none
- integer*4 a
- a=0
- return
- end
-EOF
-],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
-public class foo {
- private int a;
- public void bar (void) {
- a = 0;
- }
-};
-EOF
-])
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
- # Parse the compiler output and extract the necessary
- # objects, libraries and library flags.
-
- # Sentinel used to keep track of whether or not we are before
- # the conftest object file.
- pre_test_object_deps_done=no
-
- # The `*' in the case matches for architectures that use `case' in
- # $output_verbose_cmd can trigger glob expansion during the loop
- # eval without this substitution.
- output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
-
- for p in `eval $output_verbose_link_cmd`; do
- case $p in
-
- -L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
- # Remove the space.
- if test $p = "-L" \
- || test $p = "-R"; then
- prev=$p
- continue
- else
- prev=
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- case $p in
- -L* | -R*)
- # Internal compiler library paths should come after those
- # provided the user. The postdeps already come after the
- # user supplied libs so there is no need to process them.
- if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
- _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
- else
- _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
- fi
- ;;
- # The "-l" case would never come before the object being
- # linked, so don't bother handling this case.
- esac
- else
- if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
- _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
- else
- _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
- fi
- fi
- ;;
-
- *.$objext)
- # This assumes that the test object file only shows up
- # once in the compiler output.
- if test "$p" = "conftest.$objext"; then
- pre_test_object_deps_done=yes
- continue
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
- _LT_AC_TAGVAR(predep_objects, $1)="$p"
- else
- _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
- fi
- else
- if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
- _LT_AC_TAGVAR(postdep_objects, $1)="$p"
- else
- _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
- fi
- fi
- ;;
-
- *) ;; # Ignore the rest.
-
- esac
- done
-
- # Clean up.
- rm -f a.out a.exe
-else
- echo "libtool.m4: error: problem compiling $1 test program"
-fi
-
-$rm -f confest.$objext
-
-# PORTME: override above test on systems where it is broken
-ifelse([$1],[CXX],
-[case $host_os in
-interix3*)
- # Interix 3.5 installs completely hosed .la files for C++, so rather than
- # hack all around it, let's just trust "g++" to DTRT.
- _LT_AC_TAGVAR(predep_objects,$1)=
- _LT_AC_TAGVAR(postdep_objects,$1)=
- _LT_AC_TAGVAR(postdeps,$1)=
- ;;
-
-solaris*)
- case $cc_basename in
- CC*)
- # Adding this requires a known-good setup of shared libraries for
- # Sun compiler versions before 5.6, else PIC objects from an old
- # archive will be linked into the output, leading to subtle bugs.
- _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
- ;;
- esac
- ;;
-esac
-])
-
-case " $_LT_AC_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
-])# AC_LIBTOOL_POSTDEP_PREDEP
-
-# AC_LIBTOOL_LANG_F77_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined. Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
-AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
-[AC_REQUIRE([AC_PROG_F77])
-AC_LANG_PUSH(Fortran 77)
-
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
-_LT_AC_TAGVAR(always_export_symbols, $1)=no
-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_direct, $1)=no
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
-_LT_AC_TAGVAR(module_cmds, $1)=
-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_AC_TAGVAR(no_undefined_flag, $1)=
-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code=" subroutine t\n return\n end\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code=" program t\n end\n"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${F77-"f77"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
-
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-aix4* | aix5*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
-esac
-AC_MSG_RESULT([$enable_shared])
-
-AC_MSG_CHECKING([whether to build static libraries])
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-AC_MSG_RESULT([$enable_static])
-
-_LT_AC_TAGVAR(GCC, $1)="$G77"
-_LT_AC_TAGVAR(LD, $1)="$LD"
-
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_F77_CONFIG
-
-
-# AC_LIBTOOL_LANG_GCJ_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined. Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
-AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${GCJ-"gcj"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_GCJ_CONFIG
-
-
-# AC_LIBTOOL_LANG_RC_CONFIG
-# -------------------------
-# Ensure that the configuration vars for the Windows resource compiler are
-# suitably defined. Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
-AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${RC-"windres"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_RC_CONFIG
-
-
-# AC_LIBTOOL_CONFIG([TAGNAME])
-# ----------------------------
-# If TAGNAME is not passed, then create an initial libtool script
-# with a default configuration from the untagged config vars. Otherwise
-# add code to config.status for appending the configuration named by
-# TAGNAME from the matching tagged config vars.
-AC_DEFUN([AC_LIBTOOL_CONFIG],
-[# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
- # See if we are running on zsh, and set the options which allow our commands through
- # without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
- # Now quote all the things that may contain metacharacters while being
- # careful not to overquote the AC_SUBSTed values. We take copies of the
- # variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
- SED SHELL STRIP \
- libname_spec library_names_spec soname_spec extract_expsyms_cmds \
- old_striplib striplib file_magic_cmd finish_cmds finish_eval \
- deplibs_check_method reload_flag reload_cmds need_locks \
- lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
- lt_cv_sys_global_symbol_to_c_name_address \
- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
- old_postinstall_cmds old_postuninstall_cmds \
- _LT_AC_TAGVAR(compiler, $1) \
- _LT_AC_TAGVAR(CC, $1) \
- _LT_AC_TAGVAR(LD, $1) \
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
- _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
- _LT_AC_TAGVAR(old_archive_cmds, $1) \
- _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
- _LT_AC_TAGVAR(predep_objects, $1) \
- _LT_AC_TAGVAR(postdep_objects, $1) \
- _LT_AC_TAGVAR(predeps, $1) \
- _LT_AC_TAGVAR(postdeps, $1) \
- _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
- _LT_AC_TAGVAR(archive_cmds, $1) \
- _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
- _LT_AC_TAGVAR(postinstall_cmds, $1) \
- _LT_AC_TAGVAR(postuninstall_cmds, $1) \
- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
- _LT_AC_TAGVAR(allow_undefined_flag, $1) \
- _LT_AC_TAGVAR(no_undefined_flag, $1) \
- _LT_AC_TAGVAR(export_symbols_cmds, $1) \
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
- _LT_AC_TAGVAR(hardcode_automatic, $1) \
- _LT_AC_TAGVAR(module_cmds, $1) \
- _LT_AC_TAGVAR(module_expsym_cmds, $1) \
- _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
- _LT_AC_TAGVAR(exclude_expsyms, $1) \
- _LT_AC_TAGVAR(include_expsyms, $1); do
-
- case $var in
- _LT_AC_TAGVAR(old_archive_cmds, $1) | \
- _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
- _LT_AC_TAGVAR(archive_cmds, $1) | \
- _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
- _LT_AC_TAGVAR(module_cmds, $1) | \
- _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
- _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
- extract_expsyms_cmds | reload_cmds | finish_cmds | \
- postinstall_cmds | postuninstall_cmds | \
- old_postinstall_cmds | old_postuninstall_cmds | \
- sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
- # Double-quote double-evaled strings.
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
- ;;
- *)
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
- ;;
- esac
- done
-
- case $lt_echo in
- *'\[$]0 --fallback-echo"')
- lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
- ;;
- esac
-
-ifelse([$1], [],
- [cfgfile="${ofile}T"
- trap "$rm \"$cfgfile\"; exit 1" 1 2 15
- $rm -f "$cfgfile"
- AC_MSG_NOTICE([creating $ofile])],
- [cfgfile="$ofile"])
-
- cat <<__EOF__ >> "$cfgfile"
-ifelse([$1], [],
-[#! $SHELL
-
-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program 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.
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="$SED -e 1s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-# The names of the tagged configurations supported by this script.
-available_tags=
-
-# ### BEGIN LIBTOOL CONFIG],
-[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
-
-# A language-specific compiler.
-CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
-
-# Is the compiler the GNU C compiler?
-with_gcc=$_LT_AC_TAGVAR(GCC, $1)
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$lt_STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
-archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
-module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
-
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
-
-# Symbols that must always be exported.
-include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
-
-ifelse([$1],[],
-[# ### END LIBTOOL CONFIG],
-[# ### END LIBTOOL TAG CONFIG: $tagname])
-
-__EOF__
-
-ifelse([$1],[], [
- case $host_os in
- aix3*)
- cat <<\EOF >> "$cfgfile"
-
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-EOF
- ;;
- esac
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
-
- mv -f "$cfgfile" "$ofile" || \
- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
- chmod +x "$ofile"
-])
-else
- # If there is no Makefile yet, we rely on a make rule to execute
- # `config.status --recheck' to rerun these tests and create the
- # libtool script then.
- ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
- if test -f "$ltmain_in"; then
- test -f Makefile && make "$ltmain"
- fi
-fi
-])# AC_LIBTOOL_CONFIG
-
-
-# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-
-_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-
- AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
- lt_cv_prog_compiler_rtti_exceptions,
- [-fno-rtti -fno-exceptions], [],
- [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
-
-
-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-# ---------------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_NM])
-AC_REQUIRE([AC_OBJEXT])
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[[BCDT]]'
- ;;
-cygwin* | mingw* | pw32*)
- symcode='[[ABCDGISTW]]'
- ;;
-hpux*) # Its linker distinguishes data from code symbols
- if test "$host_cpu" = ia64; then
- symcode='[[ABCDEGRST]]'
- fi
- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
- ;;
-linux* | k*bsd*-gnu)
- if test "$host_cpu" = ia64; then
- symcode='[[ABCDGIRSTW]]'
- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
- fi
- ;;
-irix* | nonstopux*)
- symcode='[[BCDEGRST]]'
- ;;
-osf*)
- symcode='[[BCDEGQRST]]'
- ;;
-solaris*)
- symcode='[[BDRT]]'
- ;;
-sco3.2v5*)
- symcode='[[DT]]'
- ;;
-sysv4.2uw2*)
- symcode='[[DT]]'
- ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
- symcode='[[ABDT]]'
- ;;
-sysv4)
- symcode='[[DFNSTU]]'
- ;;
-esac
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
- opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
- symcode='[[ABCDGIRSTW]]' ;;
-esac
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
- symxfrm="\\1 $ac_symprfx\\2 \\2"
-
- # Write the raw and C identifiers.
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
-
- # Check to see that the pipe works correctly.
- pipe_works=no
-
- rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
-
- if AC_TRY_EVAL(ac_compile); then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- else
- rm -f "$nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if grep ' nm_test_var$' "$nlist" >/dev/null; then
- if grep ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
- # Now generate the symbol file.
- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
-
- cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- lt_ptr_t address;
-}
-lt_preloaded_symbols[[]] =
-{
-EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
- cat <<\EOF >> conftest.$ac_ext
- {0, (lt_ptr_t) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- lt_save_LIBS="$LIBS"
- lt_save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
- pipe_works=yes
- fi
- LIBS="$lt_save_LIBS"
- CFLAGS="$lt_save_CFLAGS"
- else
- echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
- break
- else
- lt_cv_sys_global_symbol_pipe=
- fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- AC_MSG_RESULT(failed)
-else
- AC_MSG_RESULT(ok)
-fi
-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-
-
-# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
-# ---------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
-[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
-
-AC_MSG_CHECKING([for $compiler option to produce PIC])
- ifelse([$1],[CXX],[
- # C++ specific cases for pic, static, wl, etc.
- if test "$GXX" = yes; then
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
- amigaos*)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
- ;;
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
- mingw* | os2* | pw32*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
- ;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- ;;
- *djgpp*)
- # DJGPP does not support shared libraries at all
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- interix3*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
- fi
- ;;
- hpux*)
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- ;;
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- ;;
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- else
- case $host_os in
- aix4* | aix5*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- else
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- chorus*)
- case $cc_basename in
- cxch68*)
- # Green Hills C++ Compiler
- # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
- ;;
- esac
- ;;
- darwin*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- case $cc_basename in
- xlc*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- ;;
- esac
- ;;
- dgux*)
- case $cc_basename in
- ec++*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- freebsd* | dragonfly*)
- # FreeBSD uses GNU C++
- ;;
- hpux9* | hpux10* | hpux11*)
- case $cc_basename in
- CC*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- if test "$host_cpu" != ia64; then
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- fi
- ;;
- aCC*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- ;;
- esac
- ;;
- *)
- ;;
- esac
- ;;
- interix*)
- # This is c89, which is MS Visual C++ (no shared libs)
- # Anyone wants to do a port?
- ;;
- irix5* | irix6* | nonstopux*)
- case $cc_basename in
- CC*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- # CC pic flag -KPIC is the default.
- ;;
- *)
- ;;
- esac
- ;;
- linux* | k*bsd*-gnu)
- case $cc_basename in
- KCC*)
- # KAI C++ Compiler
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- icpc* | ecpc*)
- # Intel C++
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- pgCC*)
- # Portland Group C++ compiler.
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- cxx*)
- # Compaq C++
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- lynxos*)
- ;;
- m88k*)
- ;;
- mvs*)
- case $cc_basename in
- cxx*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
- ;;
- *)
- ;;
- esac
- ;;
- netbsd* | netbsdelf*-gnu)
- ;;
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- ;;
- RCC*)
- # Rational C++ 2.4.1
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- cxx*)
- # Digital/Compaq C++
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- psos*)
- ;;
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- ;;
- *)
- ;;
- esac
- ;;
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- lcc*)
- # Lucid
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- ;;
- *)
- ;;
- esac
- ;;
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- case $cc_basename in
- CC*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- esac
- ;;
- vxworks*)
- ;;
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
- esac
- fi
-],
-[
- if test "$GCC" = yes; then
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- amigaos*)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
- ;;
-
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
-
- mingw* | pw32* | os2*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- ;;
-
- interix3*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
-
- msdosdjgpp*)
- # Just because we use GCC doesn't mean we suddenly get shared libraries
- # on systems that don't support them.
- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- enable_shared=no
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
- fi
- ;;
-
- hpux*)
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- ;;
-
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- else
- # PORTME Check for flag to pass linker flags through the system compiler.
- case $host_os in
- aix*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- else
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- darwin*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- case $cc_basename in
- xlc*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- ;;
- esac
- ;;
-
- mingw* | pw32* | os2*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
- ;;
-
- hpux9* | hpux10* | hpux11*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- ;;
- esac
- # Is there a better lt_prog_compiler_static that works with the bundled CC?
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- ;;
-
- irix5* | irix6* | nonstopux*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # PIC (with -KPIC) is the default.
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- newsos6)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- linux* | k*bsd*-gnu)
- case $cc_basename in
- icc* | ecc*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- ccc*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # All Alpha code is PIC.
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- esac
- ;;
-
- osf3* | osf4* | osf5*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # All OSF/1 code is PIC.
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- solaris*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- case $cc_basename in
- f77* | f90* | f95*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
- esac
- ;;
-
- sunos4*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- unicos*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
-
- uts4*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
- esac
- fi
-])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
- _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
- [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
- [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
- "" | " "*) ;;
- *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
- esac],
- [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
- ;;
-esac
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
- _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
- $lt_tmp_static_flag,
- [],
- [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
-])
-
-
-# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
-# ------------------------------------
-# See if the linker supports building shared libraries.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-ifelse([$1],[CXX],[
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- case $host_os in
- aix4* | aix5*)
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
- else
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
- fi
- ;;
- pw32*)
- _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
- ;;
- cygwin* | mingw*)
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- linux* | k*bsd*-gnu)
- _LT_AC_TAGVAR(link_all_deplibs, $1)=no
- ;;
- *)
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- esac
-],[
- runpath_var=
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=
- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
- _LT_AC_TAGVAR(archive_cmds, $1)=
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
- _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
- _LT_AC_TAGVAR(hardcode_automatic, $1)=no
- _LT_AC_TAGVAR(module_cmds, $1)=
- _LT_AC_TAGVAR(module_expsym_cmds, $1)=
- _LT_AC_TAGVAR(always_export_symbols, $1)=no
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- # include_expsyms should be a list of space-separated symbols to be *always*
- # included in the symbol list
- _LT_AC_TAGVAR(include_expsyms, $1)=
- # exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
- _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
- # platforms (ab)use it in PIC code, but their linkers get confused if
- # the symbol is explicitly referenced. Since portable code cannot
- # rely on this symbol name, it's probably fine to never include it in
- # preloaded symbol tables.
- extract_expsyms_cmds=
- # Just being paranoid about ensuring that cc_basename is set.
- _LT_CC_BASENAME([$compiler])
- case $host_os in
- cygwin* | mingw* | pw32*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
- esac
-
- _LT_AC_TAGVAR(ld_shlibs, $1)=yes
- if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- runpath_var=LD_RUN_PATH
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- supports_anon_versioning=no
- case `$LD -v 2>/dev/null` in
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix3* | aix4* | aix5*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- cat <<EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
- fi
- ;;
-
- amigaos*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-
- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
- # that the semantics of dynamic libraries on AmigaOS, at least up
- # to version 4, is to share data among multiple programs linked
- # with the same dynamic library. Since this doesn't match the
- # behavior of shared libraries on other platforms, we can't use
- # them.
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- beos*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- cygwin* | mingw* | pw32*)
- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
- # as there is no search path for DLLs.
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_AC_TAGVAR(always_export_symbols, $1)=no
- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
-
- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- interix3*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
-
- linux* | k*bsd*-gnu)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- tmp_addflag=
- case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
- tmp_addflag=' -i_dynamic' ;;
- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
- tmp_addflag=' -i_dynamic -nofor_main' ;;
- ifc* | ifort*) # Intel Fortran compiler
- tmp_addflag=' -nofor_main' ;;
- esac
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
- if test $supports_anon_versioning = yes; then
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- $echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
- _LT_AC_TAGVAR(link_all_deplibs, $1)=no
- else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris*)
- if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- cat <<EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-EOF
- elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- ;;
- *)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
- else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- sunos4*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
-
- if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
- runpath_var=
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
- fi
- ;;
-
- aix4* | aix5*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
- else
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
- fi
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_AC_TAGVAR(archive_cmds, $1)=''
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
- if test "$GCC" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" && \
- strings "$collect2name" | grep resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- else
- # We have old collect2
- _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an empty executable.
- _LT_AC_SYS_LIBPATH_AIX
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an empty executable.
- _LT_AC_SYS_LIBPATH_AIX
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- # see comment about different semantics on the GNU ld section
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- bsdi[[45]]*)
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
- ;;
-
- cygwin* | mingw* | pw32*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
- # FIXME: Should let the user specify the lib program.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
- _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- ;;
-
- darwin* | rhapsody*)
- case $host_os in
- rhapsody* | darwin1.[[012]])
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[[012]])
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- fi
- ;;
- esac
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
- if test "$GCC" = yes ; then
- output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- case $cc_basename in
- xlc*)
- output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- ;;
- *)
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- fi
- ;;
-
- dgux*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- freebsd1*)
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- hpux9*)
- if test "$GCC" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- fi
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
-
- hpux10*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
- fi
- if test "$with_gnu_ld" = no; then
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- fi
- ;;
-
- hpux11*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case $host_cpu in
- hppa*64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- else
- case $host_cpu in
- hppa*64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- fi
- if test "$with_gnu_ld" = no; then
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- *)
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- fi
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
- fi
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- netbsd* | netbsdelf*-gnu)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- newsos6)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- openbsd*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- else
- case $host_os in
- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- ;;
-
- os2*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- if test "$GCC" = yes; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- else
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
-
- # Both c and cxx compiler support -rpath directly
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- fi
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
-
- solaris*)
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
- else
- wlarc=''
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
- fi
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The compiler driver will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- case $wlarc in
- '')
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
- *)
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
- esac
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- sunos4*)
- if test "x$host_vendor" = xsequent; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv4)
- case $host_vendor in
- sni)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
- ;;
- siemens)
- ## LD is ld it makes a PLAMLIB
- ## CC just makes a GrossModule.
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- ;;
- motorola)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- runpath_var='LD_RUN_PATH'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv4.3*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- _LT_AC_TAGVAR(ld_shlibs, $1)=yes
- fi
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- uts4*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *)
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- fi
-])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
-x|xyes)
- # Assume -lc should be added
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $_LT_AC_TAGVAR(archive_cmds, $1) in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- AC_MSG_CHECKING([whether -lc should be explicitly linked in])
- $rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
- pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=
- if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
- then
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- else
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
- fi
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $rm conftest*
- AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
- ;;
- esac
- fi
- ;;
-esac
-])# AC_LIBTOOL_PROG_LD_SHLIBS
-
-
-# _LT_AC_FILE_LTDLL_C
-# -------------------
-# Be careful that the start marker always follows a newline.
-AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# # ifdef __CYGWIN32__
-# # define __CYGWIN__ __CYGWIN32__
-# # endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-# __hDllInstance_base = hInst;
-# return TRUE;
-# }
-# /* ltdll.c ends here */
-])# _LT_AC_FILE_LTDLL_C
-
-
-# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
-# ---------------------------------
-AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
-
-
-# old names
-AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
-
-# This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])
-
-AC_DEFUN([LT_AC_PROG_GCJ],
-[AC_CHECK_TOOL(GCJ, gcj, no)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
- AC_SUBST(GCJFLAGS)
-])
-
-AC_DEFUN([LT_AC_PROG_RC],
-[AC_CHECK_TOOL(RC, windres, no)
-])
-
-# NOTE: This macro has been submitted for inclusion into #
-# GNU Autoconf as AC_PROG_SED. When it is available in #
-# a released version of Autoconf we should remove this #
-# macro and use it instead. #
-# LT_AC_PROG_SED
-# --------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible. Prefer GNU sed if found.
-AC_DEFUN([LT_AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for lt_ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
- lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
- fi
- done
- done
-done
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
- test ! -f $lt_ac_sed && continue
- cat /dev/null > conftest.in
- lt_ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >conftest.in
- # Check for GNU sed and select it if it is found.
- if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
- lt_cv_path_SED=$lt_ac_sed
- break
- fi
- while true; do
- cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
- cp conftest.in conftest.nl
- echo >>conftest.nl
- $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
- cmp -s conftest.out conftest.nl || break
- # 10000 chars as input seems more than enough
- test $lt_ac_count -gt 10 && break
- lt_ac_count=`expr $lt_ac_count + 1`
- if test $lt_ac_count -gt $lt_ac_max; then
- lt_ac_max=$lt_ac_count
- lt_cv_path_SED=$lt_ac_sed
- fi
- done
-done
-])
-SED=$lt_cv_path_SED
-AC_MSG_RESULT([$SED])
-])
-
-# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.9.6])])
-
-# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory. The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run. This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-# fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-# fails if $ac_aux_dir is absolute,
-# fails when called from a subdirectory in a VPATH build with
-# a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir. In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
-# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-# MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH. The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 7
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
- AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery. Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
- [$1], CXX, [depcc="$CXX" am_compiler_list=],
- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
- [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
- [depcc="$$1" am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
- [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_$1_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
- fi
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- case $depmode in
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- none) break ;;
- esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
- if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_$1_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
-])
-
-# Generate code to set up dependency tracking. -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-#serial 3
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # So let's grep whole file.
- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
-done
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
- [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Do all the work for Automake. -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 12
-
-# This macro actually does too much. Some checks are only needed if
-# your package does certain things. But this isn't really a big deal.
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out. PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition. After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
-dnl Autoconf wants to disallow AM_ names. We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
- else
- CYGPATH_W=echo
- fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
- [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
- [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-])
-])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated. The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $1 | $1:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot. For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
-# From Jim Meyering
-
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT([$USE_MAINTAINER_MODE])
- AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
-# Check to see how 'make' treats includes. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
- am__include=include
- am__quote=
- _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- am__include=.include
- am__quote="\""
- _am_result=BSD
- fi
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# Copyright (C) 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# AM_PROG_CC_C_O
-# --------------
-# Like AC_PROG_CC_C_O, but changed for automake.
-AC_DEFUN([AM_PROG_CC_C_O],
-[AC_REQUIRE([AC_PROG_CC_C_O])dnl
-AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
-if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-])
-
-# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake. There are at least two reasons why we must not
-# use `-m 0755':
-# - it causes special bits like SGID to be ignored,
-# - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out. Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
-AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # We used to keeping the `.' as first argument, in order to
- # allow $(mkdir_p) to be used without argument. As in
- # $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined. However this is wrong
- # for two reasons:
- # 1. if the package is installed by a user who cannot write `.'
- # make install will fail,
- # 2. the above comment should most certainly read
- # $(mkdir_p) $(DESTDIR)$(somedir)
- # so it does not work when $(somedir) is undefined and
- # $(DESTDIR) is not.
- # To support the latter case, we have to write
- # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
- # so the `.' trick is pointless.
- mkdir_p='mkdir -p --'
-else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
- # exists.
- for d in ./-p ./--version;
- do
- test -d $d && rmdir $d
- done
- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
- if test -f "$ac_aux_dir/mkinstalldirs"; then
- mkdir_p='$(mkinstalldirs)'
- else
- mkdir_p='$(install_sh) -d'
- fi
-fi
-AC_SUBST([mkdir_p])])
-
-# Helper functions for option handling. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME. Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Check to make sure that the build environment is sane. -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftest.file`
- fi
- rm -f conftest.file
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "$[2]" = conftest.file
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries. This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
- AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Check how to create a tarball. -*- Autoconf -*-
-
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-# tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-# $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
- [m4_case([$1], [ustar],, [pax],,
- [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
- case $_am_tool in
- gnutar)
- for _am_tar in tar gnutar gtar;
- do
- AM_RUN_LOG([$_am_tar --version]) && break
- done
- am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
- am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
- am__untar="$_am_tar -xf -"
- ;;
- plaintar)
- # Must skip GNU tar: if it does not support --format= it doesn't create
- # ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
- am__tar='tar chf - "$$tardir"'
- am__tar_='tar chf - "$tardir"'
- am__untar='tar xf -'
- ;;
- pax)
- am__tar='pax -L -x $1 -w "$$tardir"'
- am__tar_='pax -L -x $1 -w "$tardir"'
- am__untar='pax -r'
- ;;
- cpio)
- am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
- am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
- am__untar='cpio -i -H $1 -d'
- ;;
- none)
- am__tar=false
- am__tar_=false
- am__untar=false
- ;;
- esac
-
- # If the value was cached, stop now. We just wanted to have am__tar
- # and am__untar set.
- test -n "${am_cv_prog_tar_$1}" && break
-
- # tar/untar a dummy directory, and stop if the command works
- rm -rf conftest.dir
- mkdir conftest.dir
- echo GrepMe > conftest.dir/file
- AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
- rm -rf conftest.dir
- if test -s conftest.tar; then
- AM_RUN_LOG([$am__untar <conftest.tar])
- grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
- fi
-done
-rm -rf conftest.dir
-
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
-
-m4_include([m4/acinclude.m4])
-m4_include([m4/libtool.m4])
-m4_include([m4/ltoptions.m4])
-m4_include([m4/ltsugar.m4])
-m4_include([m4/ltversion.m4])
diff --git a/src/3rdparty/libtiff/autogen.sh b/src/3rdparty/libtiff/autogen.sh
deleted file mode 100755
index 1849c4a4d7..0000000000
--- a/src/3rdparty/libtiff/autogen.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-set -x
-#libtoolize --force --copy
-aclocal -I ./m4
-autoheader
-automake --foreign --add-missing --copy
-autoconf
-
diff --git a/src/3rdparty/libtiff/config/compile b/src/3rdparty/libtiff/config/compile
deleted file mode 100755
index 1b1d232169..0000000000
--- a/src/3rdparty/libtiff/config/compile
+++ /dev/null
@@ -1,142 +0,0 @@
-#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
-
-scriptversion=2005-05-14.22
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
-# Written by Tom Tromey <tromey@cygnus.com>.
-#
-# This program 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, 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.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case $1 in
- '')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
- exit 1;
- ;;
- -h | --h*)
- cat <<\EOF
-Usage: compile [--help] [--version] PROGRAM [ARGS]
-
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
-arguments, and rename the output as expected.
-
-If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
- exit $?
- ;;
- -v | --v*)
- echo "compile $scriptversion"
- exit $?
- ;;
-esac
-
-ofile=
-cfile=
-eat=
-
-for arg
-do
- if test -n "$eat"; then
- eat=
- else
- case $1 in
- -o)
- # configure might choose to run compile as `compile cc -o foo foo.c'.
- # So we strip `-o arg' only if arg is an object.
- eat=1
- case $2 in
- *.o | *.obj)
- ofile=$2
- ;;
- *)
- set x "$@" -o "$2"
- shift
- ;;
- esac
- ;;
- *.c)
- cfile=$1
- set x "$@" "$1"
- shift
- ;;
- *)
- set x "$@" "$1"
- shift
- ;;
- esac
- fi
- shift
-done
-
-if test -z "$ofile" || test -z "$cfile"; then
- # If no `-o' option was seen then we might have been invoked from a
- # pattern rule where we don't need one. That is ok -- this is a
- # normal compilation that the losing compiler can handle. If no
- # `.c' file was seen then we are probably linking. That is also
- # ok.
- exec "$@"
-fi
-
-# Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
-
-# Create the lock directory.
-# Note: use `[/.-]' here to ensure that we don't use the same name
-# that we are using for the .o file. Also, base the name on the expected
-# object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
-while true; do
- if mkdir "$lockdir" >/dev/null 2>&1; then
- break
- fi
- sleep 1
-done
-# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir '$lockdir'; exit 1" 1 2 15
-
-# Run the compile.
-"$@"
-ret=$?
-
-if test -f "$cofile"; then
- mv "$cofile" "$ofile"
-elif test -f "${cofile}bj"; then
- mv "${cofile}bj" "$ofile"
-fi
-
-rmdir "$lockdir"
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/src/3rdparty/libtiff/config/config.guess b/src/3rdparty/libtiff/config/config.guess
deleted file mode 100755
index c38553dc74..0000000000
--- a/src/3rdparty/libtiff/config/config.guess
+++ /dev/null
@@ -1,1497 +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 Free Software Foundation, Inc.
-
-timestamp='2006-02-23'
-
-# 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 <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>. 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 <config-patches@gnu.org>."
-
-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
-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 ;;
- *) 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 __ELF__ >/dev/null
- 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 powerppc-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 ;;
- 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.*:*)
- echo i386-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 <stdio.h> /* 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 <sys/systemcfg.h>
-
- 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:*:[45])
- 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 <stdlib.h>
- #include <unistd.h>
-
- 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 __LP64__ >/dev/null
- 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 <unistd.h>
- 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/[-(].*//'` ;;
- *)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- esac
- exit ;;
- i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
- i*:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:MSYS_NT-*:*:*)
- 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 ;;
- x86:Interix*:[345]*)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- EM64T:Interix*:[345]*)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-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:*:*)
- 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:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips
- #undef mipsel
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mipsel
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips
- #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; }
- ;;
- mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips64
- #undef mips64el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
- #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 ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- 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 ;;
- 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"
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #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(__sun)
- 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.0*:*)
- 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' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
- elif /bin/uname -X 2>/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 i386.
- echo i386-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; } ;;
- 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.0*:*)
- 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 <Richard.M.Bartel@ccMail.Census.GOV>
- echo i586-unisys-sysv4
- exit ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes <hewes@openmarket.com>.
- # 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 ;;
- 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 ;;
- 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 ;;
-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 <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#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 <sys/param.h>
- 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 <sys/param.h>
-# 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 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> 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/libtiff/config/config.sub b/src/3rdparty/libtiff/config/config.sub
deleted file mode 100755
index ad9f395711..0000000000
--- a/src/3rdparty/libtiff/config/config.sub
+++ /dev/null
@@ -1,1608 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-timestamp='2006-02-23'
-
-# 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 <config-patches@gnu.org>. 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 <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-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* | \
- 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
- ;;
- -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 \
- | bfin \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | fr30 | frv \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | i370 | i860 | i960 | ia64 \
- | ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64vr | mips64vrel \
- | mips64orion | mips64orionel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | mt \
- | msp430 \
- | nios | nios2 \
- | ns16k | ns32k \
- | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- | pyramid \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b \
- | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
- | v850 | v850e \
- | we32k \
- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k)
- basic_machine=$basic_machine-unknown
- ;;
- m32c)
- 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-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
- | clipper-* | craynv-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* | iq2000-* \
- | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64orion-* | mips64orionel-* \
- | 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[23]e-* | sh[34]eb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
- | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tron-* \
- | v850-* | v850e-* | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa-* \
- | ymp-* \
- | z8k-*)
- ;;
- m32c-*)
- ;;
- # 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
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- 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
- ;;
- cr16c)
- basic_machine=cr16c-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
- ;;
- 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
- ;;
- 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
- ;;
- 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
- ;;
- 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
- ;;
- sei)
- basic_machine=mips-sei
- os=-seiux
- ;;
- sequent)
- basic_machine=i386-sequent
- ;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
- 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
- ;;
- 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
- ;;
- 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[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
- ;;
- sparc | sparcv8 | sparcv9 | sparcv9b)
- 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* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
- | -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* \
- | -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*)
- # 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
- ;;
- -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
- *-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
- ;;
- 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
- ;;
- -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/libtiff/config/depcomp b/src/3rdparty/libtiff/config/depcomp
deleted file mode 100755
index 04701da536..0000000000
--- a/src/3rdparty/libtiff/config/depcomp
+++ /dev/null
@@ -1,530 +0,0 @@
-#! /bin/sh
-# depcomp - compile a program generating dependencies as side-effects
-
-scriptversion=2005-07-09.11
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-# This program 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, 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 Alexandre Oliva <oliva@dcc.unicamp.br>.
-
-case $1 in
- '')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
- exit 1;
- ;;
- -h | --h*)
- cat <<\EOF
-Usage: depcomp [--help] [--version] PROGRAM [ARGS]
-
-Run PROGRAMS ARGS to compile a file, generating dependencies
-as side-effects.
-
-Environment variables:
- depmode Dependency tracking mode.
- source Source file read by `PROGRAMS ARGS'.
- object Object file output by `PROGRAMS ARGS'.
- DEPDIR directory where to store dependencies.
- depfile Dependency file to output.
- tmpdepfile Temporary file to use when outputing dependencies.
- libtool Whether libtool is used (yes/no).
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
- exit $?
- ;;
- -v | --v*)
- echo "depcomp $scriptversion"
- exit $?
- ;;
-esac
-
-if test -z "$depmode" || test -z "$source" || test -z "$object"; then
- echo "depcomp: Variables source, object and depmode must be set" 1>&2
- exit 1
-fi
-
-# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
-depfile=${depfile-`echo "$object" |
- sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
-tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
-
-rm -f "$tmpdepfile"
-
-# Some modes work just like other modes, but use different flags. We
-# parameterize here, but still list the modes in the big case below,
-# to make depend.m4 easier to write. Note that we *cannot* use a case
-# here, because this file can only contain one case statement.
-if test "$depmode" = hp; then
- # HP compiler uses -M and no extra arg.
- gccflag=-M
- depmode=gcc
-fi
-
-if test "$depmode" = dashXmstdout; then
- # This is just like dashmstdout with a different argument.
- dashmflag=-xM
- depmode=dashmstdout
-fi
-
-case "$depmode" in
-gcc3)
-## gcc 3 implements dependency tracking that does exactly what
-## we want. Yay! Note: for some reason libtool 1.4 doesn't like
-## it if -MD -MP comes after the -MF stuff. Hmm.
- "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- mv "$tmpdepfile" "$depfile"
- ;;
-
-gcc)
-## There are various ways to get dependency output from gcc. Here's
-## why we pick this rather obscure method:
-## - Don't want to use -MD because we'd like the dependencies to end
-## up in a subdir. Having to rename by hand is ugly.
-## (We might end up doing this anyway to support other compilers.)
-## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-## -MM, not -M (despite what the docs say).
-## - Using -M directly means running the compiler twice (even worse
-## than renaming).
- if test -z "$gccflag"; then
- gccflag=-MD,
- fi
- "$@" -Wp,"$gccflag$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
- echo "$object : \\" > "$depfile"
- alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
- sed -e 's/^[^:]*: / /' \
- -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
-## The problem is that when a header file which appears in a .P file
-## is deleted, the dependency causes make to die (because there is
-## typically no way to rebuild the header). We avoid this by adding
-## dummy dependencies for each header file. Too bad gcc doesn't do
-## this for us directly.
- tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'. On the theory
-## that the space means something, we add a space to the output as
-## well.
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-hp)
- # This case exists only to let depend.m4 do its work. It works by
- # looking at the text of this script. This case will never be run,
- # since it is checked for above.
- exit 1
- ;;
-
-sgi)
- if test "$libtool" = yes; then
- "$@" "-Wp,-MDupdate,$tmpdepfile"
- else
- "$@" -MDupdate "$tmpdepfile"
- fi
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
-
- if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
- echo "$object : \\" > "$depfile"
-
- # Clip off the initial element (the dependent). Don't try to be
- # clever and replace this with sed code, as IRIX sed won't handle
- # lines with more than a fixed number of characters (4096 in
- # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
- # the IRIX cc adds comments like `#:fec' to the end of the
- # dependency line.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
- tr '
-' ' ' >> $depfile
- echo >> $depfile
-
- # The second pass generates a dummy entry for each header file.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
- >> $depfile
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
-
-aix)
- # The C for AIX Compiler uses -M and outputs the dependencies
- # in a .u file. In older versions, this file always lives in the
- # current directory. Also, the AIX compiler puts `$object:' at the
- # start of each line; $object doesn't have directory information.
- # Version 6 uses the directory in both cases.
- stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
- tmpdepfile="$stripped.u"
- if test "$libtool" = yes; then
- "$@" -Wc,-M
- else
- "$@" -M
- fi
- stat=$?
-
- if test -f "$tmpdepfile"; then :
- else
- stripped=`echo "$stripped" | sed 's,^.*/,,'`
- tmpdepfile="$stripped.u"
- fi
-
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
-
- if test -f "$tmpdepfile"; then
- outname="$stripped.o"
- # Each line is of the form `foo.o: dependent.h'.
- # Do two passes, one to just change these to
- # `$object: dependent.h' and one to simply `dependent.h:'.
- sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
- sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
-
-icc)
- # Intel's C compiler understands `-MD -MF file'. However on
- # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
- # ICC 7.0 will fill foo.d with something like
- # foo.o: sub/foo.c
- # foo.o: sub/foo.h
- # which is wrong. We want:
- # sub/foo.o: sub/foo.c
- # sub/foo.o: sub/foo.h
- # sub/foo.c:
- # sub/foo.h:
- # ICC 7.1 will output
- # foo.o: sub/foo.c sub/foo.h
- # and will wrap long lines using \ :
- # foo.o: sub/foo.c ... \
- # sub/foo.h ... \
- # ...
-
- "$@" -MD -MF "$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
- # Each line is of the form `foo.o: dependent.h',
- # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
- # Do two passes, one to just change these to
- # `$object: dependent.h' and one to simply `dependent.h:'.
- sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
- # Some versions of the HPUX 10.20 sed can't process this invocation
- # correctly. Breaking it into two sed invocations is a workaround.
- sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
- sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-tru64)
- # The Tru64 compiler uses -MD to generate dependencies as a side
- # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
- # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
- # dependencies in `foo.d' instead, so we check for that too.
- # Subdirectories are respected.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
- if test "$libtool" = yes; then
- # With Tru64 cc, shared objects can also be used to make a
- # static library. This mecanism is used in libtool 1.4 series to
- # handle both shared and static libraries in a single compilation.
- # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
- #
- # With libtool 1.5 this exception was removed, and libtool now
- # generates 2 separate objects for the 2 libraries. These two
- # compilations output dependencies in in $dir.libs/$base.o.d and
- # in $dir$base.o.d. We have to check for both files, because
- # one of the two compilations can be disabled. We should prefer
- # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
- # automatically cleaned when .libs/ is deleted, while ignoring
- # the former would cause a distcleancheck panic.
- tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
- tmpdepfile2=$dir$base.o.d # libtool 1.5
- tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
- tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
- "$@" -Wc,-MD
- else
- tmpdepfile1=$dir$base.o.d
- tmpdepfile2=$dir$base.d
- tmpdepfile3=$dir$base.d
- tmpdepfile4=$dir$base.d
- "$@" -MD
- fi
-
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- exit $stat
- fi
-
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- do
- test -f "$tmpdepfile" && break
- done
- if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
-
-#nosideeffect)
- # This comment above is used by automake to tell side-effect
- # dependency tracking mechanisms from slower ones.
-
-dashmstdout)
- # Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout, regardless of -o.
- "$@" || exit $?
-
- # Remove the call to Libtool.
- if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
- shift
- done
- shift
- fi
-
- # Remove `-o $object'.
- IFS=" "
- for arg
- do
- case $arg in
- -o)
- shift
- ;;
- $object)
- shift
- ;;
- *)
- set fnord "$@" "$arg"
- shift # fnord
- shift # $arg
- ;;
- esac
- done
-
- test -z "$dashmflag" && dashmflag=-M
- # Require at least two characters before searching for `:'
- # in the target name. This is to cope with DOS-style filenames:
- # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
- "$@" $dashmflag |
- sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
- rm -f "$depfile"
- cat < "$tmpdepfile" > "$depfile"
- tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-dashXmstdout)
- # This case only exists to satisfy depend.m4. It is never actually
- # run, as this mode is specially recognized in the preamble.
- exit 1
- ;;
-
-makedepend)
- "$@" || exit $?
- # Remove any Libtool call
- if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
- shift
- done
- shift
- fi
- # X makedepend
- shift
- cleared=no
- for arg in "$@"; do
- case $cleared in
- no)
- set ""; shift
- cleared=yes ;;
- esac
- case "$arg" in
- -D*|-I*)
- set fnord "$@" "$arg"; shift ;;
- # Strip any option that makedepend may not understand. Remove
- # the object too, otherwise makedepend will parse it as a source file.
- -*|$object)
- ;;
- *)
- set fnord "$@" "$arg"; shift ;;
- esac
- done
- obj_suffix="`echo $object | sed 's/^.*\././'`"
- touch "$tmpdepfile"
- ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
- rm -f "$depfile"
- cat < "$tmpdepfile" > "$depfile"
- sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile" "$tmpdepfile".bak
- ;;
-
-cpp)
- # Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout.
- "$@" || exit $?
-
- # Remove the call to Libtool.
- if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
- shift
- done
- shift
- fi
-
- # Remove `-o $object'.
- IFS=" "
- for arg
- do
- case $arg in
- -o)
- shift
- ;;
- $object)
- shift
- ;;
- *)
- set fnord "$@" "$arg"
- shift # fnord
- shift # $arg
- ;;
- esac
- done
-
- "$@" -E |
- sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
- -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
- sed '$ s: \\$::' > "$tmpdepfile"
- rm -f "$depfile"
- echo "$object : \\" > "$depfile"
- cat < "$tmpdepfile" >> "$depfile"
- sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-msvisualcpp)
- # Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout, regardless of -o,
- # because we must use -o when running libtool.
- "$@" || exit $?
- IFS=" "
- for arg
- do
- case "$arg" in
- "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
- set fnord "$@"
- shift
- shift
- ;;
- *)
- set fnord "$@" "$arg"
- shift
- shift
- ;;
- esac
- done
- "$@" -E |
- sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
- rm -f "$depfile"
- echo "$object : \\" > "$depfile"
- . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
- echo " " >> "$depfile"
- . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-none)
- exec "$@"
- ;;
-
-*)
- echo "Unknown depmode $depmode" 1>&2
- exit 1
- ;;
-esac
-
-exit 0
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/src/3rdparty/libtiff/config/install-sh b/src/3rdparty/libtiff/config/install-sh
deleted file mode 100755
index 4d4a9519ea..0000000000
--- a/src/3rdparty/libtiff/config/install-sh
+++ /dev/null
@@ -1,323 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2005-05-14.22
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch. It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-chmodcmd="$chmodprog 0755"
-chowncmd=
-chgrpcmd=
-stripcmd=
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=
-dst=
-dir_arg=
-dstarg=
-no_target_directory=
-
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
- or: $0 [OPTION]... SRCFILES... DIRECTORY
- or: $0 [OPTION]... -t DIRECTORY SRCFILES...
- or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
--c (ignored)
--d create directories instead of installing files.
--g GROUP $chgrpprog installed files to GROUP.
--m MODE $chmodprog installed files to MODE.
--o USER $chownprog installed files to USER.
--s $stripprog installed files.
--t DIRECTORY install into DIRECTORY.
--T report an error if DSTFILE is a directory.
---help display this help and exit.
---version display version info and exit.
-
-Environment variables override the default commands:
- CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
-"
-
-while test -n "$1"; do
- case $1 in
- -c) shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- --help) echo "$usage"; exit $?;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd=$stripprog
- shift
- continue;;
-
- -t) dstarg=$2
- shift
- shift
- continue;;
-
- -T) no_target_directory=true
- shift
- continue;;
-
- --version) echo "$0 $scriptversion"; exit $?;;
-
- *) # When -d is used, all remaining arguments are directories to create.
- # When -t is used, the destination is already specified.
- test -n "$dir_arg$dstarg" && break
- # Otherwise, the last argument is the destination. Remove it from $@.
- for arg
- do
- if test -n "$dstarg"; then
- # $@ is not empty: it contains at least $arg.
- set fnord "$@" "$dstarg"
- shift # fnord
- fi
- shift # arg
- dstarg=$arg
- done
- break;;
- esac
-done
-
-if test -z "$1"; then
- if test -z "$dir_arg"; then
- echo "$0: no input file specified." >&2
- exit 1
- fi
- # It's OK to call `install-sh -d' without argument.
- # This can happen when creating conditional directories.
- exit 0
-fi
-
-for src
-do
- # Protect names starting with `-'.
- case $src in
- -*) src=./$src ;;
- esac
-
- if test -n "$dir_arg"; then
- dst=$src
- src=
-
- if test -d "$dst"; then
- mkdircmd=:
- chmodcmd=
- else
- mkdircmd=$mkdirprog
- fi
- else
- # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
- # might cause directories to be created, which would be especially bad
- # if $src (and thus $dsttmp) contains '*'.
- if test ! -f "$src" && test ! -d "$src"; then
- echo "$0: $src does not exist." >&2
- exit 1
- fi
-
- if test -z "$dstarg"; then
- echo "$0: no destination specified." >&2
- exit 1
- fi
-
- dst=$dstarg
- # Protect names starting with `-'.
- case $dst in
- -*) dst=./$dst ;;
- esac
-
- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
- if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dstarg: Is a directory" >&2
- exit 1
- fi
- dst=$dst/`basename "$src"`
- fi
- fi
-
- # This sed command emulates the dirname command.
- dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
-
- # Make sure that the destination directory exists.
-
- # Skip lots of stat calls in the usual case.
- if test ! -d "$dstdir"; then
- defaultIFS='
- '
- IFS="${IFS-$defaultIFS}"
-
- oIFS=$IFS
- # Some sh's can't handle IFS=/ for some reason.
- IFS='%'
- set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
- shift
- IFS=$oIFS
-
- pathcomp=
-
- while test $# -ne 0 ; do
- pathcomp=$pathcomp$1
- shift
- if test ! -d "$pathcomp"; then
- $mkdirprog "$pathcomp"
- # mkdir can fail with a `File exist' error in case several
- # install-sh are creating the directory concurrently. This
- # is OK.
- test -d "$pathcomp" || exit
- fi
- pathcomp=$pathcomp/
- done
- fi
-
- if test -n "$dir_arg"; then
- $doit $mkdircmd "$dst" \
- && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
- && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
- && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
- && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
- else
- dstfile=`basename "$dst"`
-
- # Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
-
- # Trap to clean up those temp files at exit.
- trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
- trap '(exit $?); exit' 1 2 13 15
-
- # Copy the file name to the temp name.
- $doit $cpprog "$src" "$dsttmp" &&
-
- # and set any options; do chmod last to preserve setuid bits.
- #
- # If any of these fail, we abort the whole thing. If we want to
- # ignore errors from any of these, just make sure not to ignore
- # errors from the above "$doit $cpprog $src $dsttmp" command.
- #
- { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
- && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
- && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
- && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
-
- # Now rename the file to the real destination.
- { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
- || {
- # The rename failed, perhaps because mv can't rename something else
- # to itself, or perhaps because mv is so ancient that it does not
- # support -f.
-
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- if test -f "$dstdir/$dstfile"; then
- $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
- || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
- || {
- echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
- (exit 1); exit 1
- }
- else
- :
- fi
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
- }
- }
- fi || { (exit 1); exit 1; }
-done
-
-# The final little trick to "correctly" pass the exit status to the exit trap.
-{
- (exit 0); exit 0
-}
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/src/3rdparty/libtiff/config/ltmain.sh b/src/3rdparty/libtiff/config/ltmain.sh
deleted file mode 100755
index 365b6634e4..0000000000
--- a/src/3rdparty/libtiff/config/ltmain.sh
+++ /dev/null
@@ -1,7339 +0,0 @@
-# Generated from ltmain.m4sh; do not edit by hand
-
-# ltmain.sh (GNU libtool 1.2248 2006/01/21 17:40:19) 2.1a
-# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
-# 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.
-
-# This program 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.
-
-# Usage: $progname [OPTION]... [MODE-ARG]...
-#
-# Provide generalized library-building support services.
-#
-# --config show all configuration variables
-# --debug enable verbose shell tracing
-# -n, --dry-run display commands without modifying any files
-# --features display basic configuration information and exit
-# --mode=MODE use operation mode MODE
-# --preserve-dup-deps don't remove duplicate dependency libraries
-# --quiet, --silent don't print informational messages
-# --tag=TAG use configuration variables from tag TAG
-# -v, --verbose print informational messages (default)
-# --version print version information
-# -h, --help print short or long help message
-#
-# MODE must be one of the following:
-#
-# clean remove files from the build directory
-# compile compile a source file into a libtool object
-# execute automatically set library path, then run a program
-# finish complete the installation of libtool libraries
-# install install libraries or executables
-# link create a library or an executable
-# uninstall remove libraries from an installed directory
-#
-# MODE-ARGS vary depending on the MODE.
-# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
-#
-# When reporting a bug, please describe a test case to reproduce it and
-# include the following information:
-#
-# host-triplet: powerpc-apple-darwin8.2.0
-# shell: $SHELL
-# compiler: $LTCC
-# compiler flags: $LTCFLAGS
-# linker: $LD (gnu? $with_gnu_ld)
-# $progname: (GNU libtool 1.2248 2006/01/21 17:40:19) 2.1a
-# automake: $automake_version
-# autoconf: $autoconf_version
-#
-# Report bugs to <bug-libtool@gnu.org>.
-
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION=2.1a
-TIMESTAMP=" 1.2248 2006/01/21 17:40:19"
-package_revision=1.2248
-
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-$as_unset CDPATH
-
-
-
-: ${CP="cp -f"}
-: ${ECHO="echo"}
-: ${EGREP="grep -E"}
-: ${FGREP="grep -F"}
-: ${GREP="grep"}
-: ${LN_S="ln -s"}
-: ${MAKE="make"}
-: ${MKDIR="mkdir"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-: ${SED="/usr/bin/sed"}
-: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
-: ${Xsed="$SED -e 1s/^X//"}
-
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
-EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
-
-exit_status=$EXIT_SUCCESS
-
-# Make sure IFS has a sensible default
-lt_nl='
-'
-IFS=" $lt_nl"
-
-dirname="s,/[^/]*$,,"
-basename="s,^.*/,,"
-
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
-
-# The name of this program:
-# In the unlikely event $progname began with a '-', it would play havoc with
-# func_echo (imagine progname=-n), so we prepend ./ in that case:
-progname=`$ECHO "X$progpath" | $Xsed -e "$basename" -e 's,^-,./-,'`
-
-# Make sure we have an absolute path for reexecution:
-case $progpath in
- [\\/]*|[A-Za-z]:\\*) ;;
- *[\\/]*)
- progdir=`$ECHO "X$progpath" | $Xsed -e "$dirname"`
- progdir=`cd "$progdir" && pwd`
- progpath="$progdir/$progname"
- ;;
- *)
- save_IFS="$IFS"
- IFS=:
- for progdir in $PATH; do
- IFS="$save_IFS"
- test -x "$progdir/$progname" && break
- done
- IFS="$save_IFS"
- test -n "$progdir" || progdir=`pwd`
- progpath="$progdir/$progname"
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Re-`\' parameter expansions in output of double_quote_subst that were
-# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
-# in input to double_quote_subst, that '$' was protected from expansion.
-# Since each input `\' is now two `\'s, look for any number of runs of
-# four `\'s followed by two `\'s and then a '$'. `\' that '$'. Note
-# that the embedded single quotes serve only to enhance readability.
-sed_double_backslash='s/^\(\(''\\\\''\\\\''\)*''\\\\''\)\$/\1\\$/;
- s/\([^\\]\(''\\\\''\\\\''\)*''\\\\''\)\$/\1\\$/g'
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
- # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
- SP2NL='tr \040 \012'
- NL2SP='tr \015\012 \040\040'
- ;;
- *) # EBCDIC based system
- SP2NL='tr \100 \n'
- NL2SP='tr \r\n \100\100'
- ;;
-esac
-
-# Standard options:
-opt_dry_run=false
-opt_help=false
-opt_quiet=false
-opt_verbose=false
-
-# func_echo arg...
-# Echo program name prefixed message, along with the current mode
-# name if it has been set yet.
-func_echo ()
-{
- $ECHO "$progname${mode+: }$mode: "${1+"$@"}
-}
-
-# func_verbose arg...
-# Echo program name prefixed message in verbose mode only.
-func_verbose ()
-{
- $opt_verbose && func_echo ${1+"$@"}
-
- # A bug in bash halts the script if the last line of a function
- # fails when set -e is in force, so we need another command to
- # work around that:
- :
-}
-
-# func_error arg...
-# Echo program name prefixed message to standard error.
-func_error ()
-{
- $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
-}
-
-# func_warning arg...
-# Echo program name prefixed warning message to standard error.
-func_warning ()
-{
- $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
-}
-
-# func_fatal_error arg...
-# Echo program name prefixed message to standard error, and exit.
-func_fatal_error ()
-{
- func_error ${1+"$@"}
- exit $EXIT_FAILURE
-}
-
-# func_fatal_help arg...
-# Echo program name prefixed message to standard error, followed by
-# a help hint, and exit.
-func_fatal_help ()
-{
- func_error ${1+"$@"}
- func_fatal_error "$help"
-}
-help="Try \`$progname --help' for more information." ## default
-
-
-# func_grep expression filename
-# Check whether EXPRESSION matches any line of FILENAME, without output.
-func_grep ()
-{
- $GREP "$1" "$2" >/dev/null 2>&1
-}
-
-
-# func_mkdir_p directory-path
-# Make sure the entire path to DIRECTORY-PATH is available.
-func_mkdir_p ()
-{
- my_directory_path="$1"
- my_dir_list=
-
- if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
-
- # Protect directory names starting with `-'
- case $my_directory_path in
- -*) my_directory_path="./$my_directory_path" ;;
- esac
-
- # While some portion of DIR does not yet exist...
- while test ! -d "$my_directory_path"; do
- # ...make a list in topmost first order. Use a colon delimited
- # list incase some portion of path contains whitespace.
- my_dir_list="$my_directory_path:$my_dir_list"
-
- # If the last portion added has no slash in it, the list is done
- case $my_directory_path in */*) ;; *) break ;; esac
-
- # ...otherwise throw away the child directory and loop
- my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
- done
- my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
-
- save_mkdir_p_IFS="$IFS"; IFS=':'
- for my_dir in $my_dir_list; do
- IFS="$save_mkdir_p_IFS"
- # mkdir can fail with a `File exist' error if two processes
- # try to create one of the directories concurrently. Don't
- # stop in that case!
- $MKDIR "$my_dir" 2>/dev/null || :
- done
- IFS="$save_mkdir_p_IFS"
-
- # Bail out if we (or some other process) failed to create a directory.
- test -d "$my_directory_path" || \
- func_fatal_error "Failed to create \`$1'"
- fi
-}
-
-
-# func_mktempdir [string]
-# Make a temporary directory that won't clash with other running
-# libtool processes, and avoids race conditions if possible. If
-# given, STRING is the basename for that directory.
-func_mktempdir ()
-{
- my_template="${TMPDIR-/tmp}/${1-$progname}"
-
- if test "$opt_dry_run" = ":"; then
- # Return a directory name, but don't create it in dry-run mode
- my_tmpdir="${my_template}-$$"
- else
-
- # If mktemp works, use that first and foremost
- my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
-
- if test ! -d "$my_tmpdir"; then
- # Failing that, at least try and use $RANDOM to avoid a race
- my_tmpdir="${my_template}-${RANDOM-0}$$"
-
- save_mktempdir_umask=`umask`
- umask 0077
- $MKDIR "$my_tmpdir"
- umask $save_mktempdir_umask
- fi
-
- # If we're not in dry-run mode, bomb out on failure
- test -d "$my_tmpdir" || \
- func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
- fi
-
- $ECHO "X$my_tmpdir" | $Xsed
-}
-
-
-# func_quote_for_eval arg
-# Aesthetically quote ARG to be evaled later.
-# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
-# is double-quoted, suitable for a subsequent eval, whereas
-# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
-# which are still active within double quotes backslashified.
-func_quote_for_eval ()
-{
- case $1 in
- *[\\\`\"\$]*)
- func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
- *)
- func_quote_for_eval_unquoted_result="$1" ;;
- esac
-
- case $func_quote_for_eval_unquoted_result in
- # Double-quote args containing shell metacharacters to delay
- # word splitting, command substitution and and variable
- # expansion for a subsequent eval.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
- ;;
- *)
- func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
- esac
-}
-
-
-# func_quote_for_expand arg
-# Aesthetically quote ARG to be evaled later; same as above,
-# but do not quote variable references.
-func_quote_for_expand ()
-{
- case $1 in
- *[\\\`\"]*)
- my_arg=`$ECHO "X$1" | $Xsed \
- -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
- *)
- my_arg="$1" ;;
- esac
-
- case $my_arg in
- # Double-quote args containing shell metacharacters to delay
- # word splitting and command substitution for a subsequent eval.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- my_arg="\"$my_arg\""
- ;;
- esac
-
- func_quote_for_expand_result="$my_arg"
-}
-
-
-# func_show_eval cmd [fail_exp]
-# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
-# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it.
-func_show_eval ()
-{
- my_cmd="$1"
- my_fail_exp="${2-:}"
-
- ${opt_silent-false} || {
- func_quote_for_expand "$my_cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
-
- if ${opt_dry_run-false}; then :; else
- eval "$my_cmd"
- my_status=$?
- if test "$my_status" -eq 0; then :; else
- eval "(exit $my_status); $my_fail_exp"
- fi
- fi
-}
-
-
-# func_version
-# Echo version message to standard output and exit.
-func_version ()
-{
- $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
- s/^# //
- s/^# *$//
- s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
- p
- }' < "$progpath"
- exit $?
-}
-
-# func_usage
-# Echo short help message to standard output and exit.
-func_usage ()
-{
- $SED -n '/^# Usage:/,/# -h/ {
- s/^# //
- s/^# *$//
- s/\$progname/'$progname'/
- p
- }' < "$progpath"
- $ECHO
- $ECHO "run \`$progname --help | more' for full usage"
- exit $?
-}
-
-# func_help
-# Echo long help message to standard output and exit.
-func_help ()
-{
- $SED -n '/^# Usage:/,/# Report bugs to/ {
- s/^# //
- s/^# *$//
- s*\$progname*'$progname'*
- s*\$SHELL*'"$SHELL"'*
- s*\$LTCC*'"$LTCC"'*
- s*\$LTCFLAGS*'"$LTCFLAGS"'*
- s*\$LD*'"$LD"'*
- s/\$with_gnu_ld/'"$with_gnu_ld"'/
- s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
- s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
- p
- }' < "$progpath"
- exit $?
-}
-
-# func_missing_arg argname
-# Echo program name prefixed message to standard error and set global
-# exit_cmd.
-func_missing_arg ()
-{
- func_error "missing argument for $1"
- exit_cmd=exit
-}
-
-exit_cmd=:
-
-
-# Check that we have a working $ECHO.
-if test "X$1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X$1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
- # Yippee, $ECHO works!
- :
-else
- # Restart under the correct shell, and then maybe $ECHO will work.
- exec $SHELL "$progpath" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<EOF
-$*
-EOF
- exit $EXIT_SUCCESS
-fi
-
-magic="%%%MAGIC variable%%%"
-
-
-# Global variables.
-# $mode is unset
-nonopt=
-execute_dlfiles=
-preserve_args=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-
-opt_dry_run=false
-opt_duplicate_deps=false
-opt_silent=false
-opt_debug=:
-
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end. This prevents here-documents from being
-# left over by shells.
-exec_cmd=
-
-# func_fatal_configuration arg...
-# Echo program name prefixed message to standard error, followed by
-# a configuration failure hint, and exit.
-func_fatal_configuration ()
-{
- func_error ${1+"$@"}
- func_error "See the $PACKAGE documentation for more information."
- func_fatal_error "Fatal configuration error."
-}
-
-
-# func_config
-# Display the configuration for all the tags in this script.
-func_config ()
-{
- re_begincf='^# ### BEGIN LIBTOOL'
- re_endcf='^# ### END LIBTOOL'
-
- # Default configuration.
- $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
-
- # Now print the configurations for the tags.
- for tagname in $taglist; do
- $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
- done
-
- exit $?
-}
-
-# func_features
-# Display the features supported by this script.
-func_features ()
-{
- $ECHO "host: $host"
- if test "$build_libtool_libs" = yes; then
- $ECHO "enable shared libraries"
- else
- $ECHO "disable shared libraries"
- fi
- if test "$build_old_libs" = yes; then
- $ECHO "enable static libraries"
- else
- $ECHO "disable static libraries"
- fi
-
- exit $?
-}
-
-# func_enable_tag tagname
-# Verify that TAGNAME is valid, and either flag an error and exit, or
-# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
-# variable here.
-func_enable_tag ()
-{
- # Global variable:
- tagname="$1"
-
- re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
- re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
- sed_extractcf="/$re_begincf/,/$re_endcf/p"
-
- # Validate tagname.
- case $tagname in
- *[!-_A-Za-z0-9,/]*)
- func_fatal_error "invalid tag name: $tagname"
- ;;
- esac
-
- # Don't test for the "default" C tag, as we know it's
- # there but not specially marked.
- case $tagname in
- CC) ;;
- *)
- if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
- taglist="$taglist $tagname"
-
- # Evaluate the configuration. Be careful to quote the path
- # and the sed script, to avoid splitting on whitespace, but
- # also don't use non-portable quotes within backquotes within
- # quotes we have to do it in 2 steps:
- extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
- eval "$extractedcf"
- else
- func_error "ignoring unknown tag $tagname"
- fi
- ;;
- esac
-}
-
-
-func_mode_help ()
-{
- # We need to display help for each of the modes.
- case $mode in
- "")
- # Generic help is extracted from the usage comments
- # at the start of this file.
- func_help
- ;;
-
- clean)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
-
-Remove files from the build directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, object or program, all the files associated
-with it are deleted. Otherwise, only FILE itself is deleted using RM."
- ;;
-
- compile)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-Compile a source file into a libtool library object.
-
-This mode accepts the following additional options:
-
- -o OUTPUT-FILE set the output file name to OUTPUT-FILE
- -no-suppress do not suppress compiler output for multiple passes
- -prefer-pic try to building PIC objects only
- -prefer-non-pic try to building non-PIC objects only
- -shared do not build a \`.o' file suitable for static linking
- -static only build a \`.o' file suitable for static linking
-
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
- ;;
-
- execute)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
- -dlopen FILE add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
- ;;
-
- finish)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges. Use
-the \`--dry-run' option if you just want to see what would be executed."
- ;;
-
- install)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command. The first component should be
-either the \`install' or \`cp' program.
-
-The following components of INSTALL-COMMAND are treated specially:
-
- -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
- ;;
-
- link)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
-
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
- -all-static do not do any dynamic linking at all
- -avoid-version do not add a version suffix if possible
- -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
- -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
- -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
- -export-symbols SYMFILE
- try to export only the symbols listed in SYMFILE
- -export-symbols-regex REGEX
- try to export only the symbols matching REGEX
- -LLIBDIR search LIBDIR for required installed libraries
- -lNAME OUTPUT-FILE requires the installed library libNAME
- -module build a library that can dlopened
- -no-fast-install disable the fast-install mode
- -no-install link a not-installable executable
- -no-undefined declare that a library does not refer to external symbols
- -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
- -objectlist FILE Use a list of object files found in FILE to specify objects
- -precious-files-regex REGEX
- don't remove output files matching REGEX
- -release RELEASE specify package release information
- -rpath LIBDIR the created library will eventually be installed in LIBDIR
- -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
- -shared only do dynamic linking of libtool libraries
- -shrext SUFFIX override the standard shared library file extension
- -static do not do any dynamic linking of libtool libraries
- -version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
- -weak LIBNAME declare that the target provides the LIBNAME interface
-
-All other options (arguments beginning with \`-') are ignored.
-
-Every other argument is treated as a filename. Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
-required, except when creating a convenience library.
-
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
-is created, otherwise an executable program is created."
- ;;
-
- uninstall)
- $ECHO \
-"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
- ;;
-
- *)
- func_fatal_help "invalid operation mode \`$mode'"
- ;;
- esac
-
- $ECHO
- $ECHO "Try \`$progname --help' for more information about other modes."
-
- exit $?
-}
-
-# TEST SUITE MARKER ## NON-FUNCTION
-# Parse options once, thoroughly. This comes as soon as possible in
-# the script to make things like `libtool --version' happen quickly.
-{
- # sed scripts:
- my_sed_single_opt='1s/^\(..\).*$/\1/;q'
- my_sed_single_rest='1s/^..\(.*\)$/\1/;q'
- my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
- my_sed_long_arg='1s/^-[^=]*=//'
-
- # Shorthand for --mode=foo, only valid as the first argument
- case $1 in
- clean|clea|cle|cl)
- shift; set dummy --mode clean ${1+"$@"}; shift
- ;;
- compile|compil|compi|comp|com|co|c)
- shift; set dummy --mode compile ${1+"$@"}; shift
- ;;
- execute|execut|execu|exec|exe|ex|e)
- shift; set dummy --mode execute ${1+"$@"}; shift
- ;;
- finish|finis|fini|fin|fi|f)
- shift; set dummy --mode finish ${1+"$@"}; shift
- ;;
- install|instal|insta|inst|ins|in|i)
- shift; set dummy --mode install ${1+"$@"}; shift
- ;;
- link|lin|li|l)
- shift; set dummy --mode link ${1+"$@"}; shift
- ;;
- uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
- shift; set dummy --mode uninstall ${1+"$@"}; shift
- ;;
- esac
-
- # Parse non-mode specific arguments:
- while test "$#" -gt 0; do
- opt="$1"
- shift
-
- case $opt in
- --config) func_config ;;
-
- --debug) preserve_args="$preserve_args $opt"
- func_echo "enabling shell trace mode"
- opt_debug='set -x'
- $opt_debug
- ;;
-
- -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
- execute_dlfiles="$execute_dlfiles $1"
- shift
- ;;
-
- --dry-run | -n) opt_dry_run=: ;;
- --features) func_features ;;
- --finish) mode="finish" ;;
-
- --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
- case $1 in
- # Valid mode arguments:
- clean) ;;
- compile) ;;
- execute) ;;
- finish) ;;
- install) ;;
- link) ;;
- relink) ;;
- uninstall) ;;
-
- # Catch anything else as an error
- *) func_error "invalid argument for $opt"
- exit_cmd=exit
- break
- ;;
- esac
-
- mode="$1"
- shift
- ;;
-
- --preserve-dup-deps)
- opt_duplicate_deps=: ;;
-
- --quiet|--silent) preserve_args="$preserve_args $opt"
- opt_silent=:
- ;;
-
- --verbose| -v) preserve_args="$preserve_args $opt"
- opt_silent=false
- ;;
-
- --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
- preserve_args="$preserve_args $opt $1"
- func_enable_tag "$1" # tagname is set here
- shift
- ;;
-
- # Separate optargs to long options:
- -dlopen=*|--mode=*|--tag=*)
- arg=`$ECHO "X$opt" | $Xsed -e "$my_sed_long_arg"`
- opt=`$ECHO "X$opt" | $Xsed -e "$my_sed_long_opt"`
- set dummy "$opt" "$arg" ${1+"$@"}
- shift
- ;;
-
- # Separate optargs to short options:
-# -x*|-y*)
-# arg=`$ECHO "X$opt" |$Xsed -e "$my_sed_single_rest"`
-# opt=`$ECHO "X$opt" |$Xsed -e "$my_sed_single_opt"`
-# set dummy "$opt" "$arg" ${1+"$@"}
-# shift
-# ;;
-
- # Separate non-argument short options:
-# -z*|-z*|-y*)
-# rest=`$ECHO "X$opt" |$Xsed -e "$my_sed_single_rest"`
-# opt=`$ECHO "X$opt" |$Xsed -e "$my_sed_single_opt"`
-# set dummy "$opt" "-$rest" ${1+"$@"}
-# shift
-# ;;
-
- -\?|-h) func_usage ;;
- --help) opt_help=: ;;
- --version) func_version ;;
-
- -*) func_fatal_help "unrecognized option \`$opt'" ;;
-
- *) nonopt="$opt"
- break
- ;;
- esac
- done
-
- # Now that we've collected a possible --mode arg, show help if necessary
- $opt_help && func_mode_help
-
- case $host in
- *cygwin* | *mingw* | *pw32*)
- # don't eliminate duplications in $postdeps and $predeps
- opt_duplicate_compiler_generated_deps=:
- ;;
- *)
- opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
- ;;
- esac
-
- # Having warned about all mis-specified options, bail out if
- # anything was wrong.
- $exit_cmd $EXIT_FAILURE
-}
-# TEST SUITE MARKER ## BEGIN SOURCABLE
-
-# func_check_version_match
-# Ensure that we are using m4 macros, and libtool script from the same
-# release of libtool.
-func_check_version_match ()
-{
- if test "$package_revision" != "$macro_revision"; then
- if test "$VERSION" != "$macro_version"; then
- if test -z "$macro_version"; then
- cat >&2 <<_LT_EOF
-$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from an older release.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
- else
- cat >&2 <<_LT_EOF
-$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
- fi
- else
- cat >&2 <<_LT_EOF
-$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
-$progname: but the definition of this LT_INIT comes from revision $macro_revision.
-$progname: You should recreate aclocal.m4 with macros from revision $package_revision
-$progname: of $PACKAGE $VERSION and run autoconf again.
-_LT_EOF
- fi
-
- exit $EXIT_MISMATCH
- fi
-}
-
-
-# func_lalib_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_lalib_p ()
-{
- $SED -e 4q "$1" 2>/dev/null \
- | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
-}
-
-# func_lalib_unsafe_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
-# This function implements the same check as func_lalib_p without
-# resorting to external programs. To this end, it redirects stdin and
-# closes it afterwards, without saving the original file descriptor.
-# As a safety measure, use it only where a negative result would be
-# fatal anyway. Works if `file' does not exist.
-func_lalib_unsafe_p ()
-{
- lalib_p=no
- if test -r "$1" && exec 5<&1 <"$1"; then
- for lalib_p_l in 1 2 3 4
- do
- read lalib_p_line
- case "$lalib_p_line" in
- \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
- esac
- done
- exec 1<&5 5<&-
- fi
- test "$lalib_p" = yes
-}
-
-# func_ltwrapper_p file
-# True iff FILE is a libtool wrapper script.
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_p ()
-{
- func_lalib_p "$1"
-}
-
-
-# func_execute_cmds commands fail_cmd
-# Execute tilde-delimited COMMANDS.
-# If FAIL_CMD is given, eval that upon failure.
-# FAIL_CMD may read-access the current command in variable CMD!
-func_execute_cmds ()
-{
- $opt_debug
- save_ifs=$IFS; IFS='~'
- for cmd in $1; do
- IFS=$save_ifs
- eval cmd=\"$cmd\"
- func_show_eval "$cmd" "${2-:}"
- done
- IFS=$save_ifs
-}
-
-
-# func_source file
-# Source FILE, adding directory component if necessary.
-# Note that it is not necessary on cygwin/mingw to append a dot to
-# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
-# behavior happens only for exec(3), not for open(2)! Also, sourcing
-# `FILE.' does not work on cygwin managed mounts.
-func_source ()
-{
- $opt_debug
- case $1 in
- */* | *\\*) . "$1" ;;
- *) . "./$1" ;;
- esac
-}
-
-
-# Generated shell functions inserted here.
-
-
-# func_win32_libid arg
-# return the library type of file 'arg'
-#
-# Need a lot of goo to handle *both* DLLs and import libs
-# Has to be a shell function in order to 'eat' the argument
-# that is supplied when $file_magic_command is called.
-func_win32_libid ()
-{
- $opt_debug
- win32_libid_type="unknown"
- win32_fileres=`file -L $1 2>/dev/null`
- case $win32_fileres in
- *ar\ archive\ import\ library*) # definitely import
- win32_libid_type="x86 archive import"
- ;;
- *ar\ archive*) # could be an import, or static
- if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
- $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
- win32_nmres=`eval $NM -f posix -A $1 |
- $SED -n -e '
- 1,100{
- / I /{
- s,.*,import,
- p
- q
- }
- }'`
- case $win32_nmres in
- import*) win32_libid_type="x86 archive import";;
- *) win32_libid_type="x86 archive static";;
- esac
- fi
- ;;
- *DLL*)
- win32_libid_type="x86 DLL"
- ;;
- *executable*) # but shell scripts are "executable" too...
- case $win32_fileres in
- *MS\ Windows\ PE\ Intel*)
- win32_libid_type="x86 DLL"
- ;;
- esac
- ;;
- esac
- $ECHO "$win32_libid_type"
-}
-
-
-
-# func_infer_tag arg
-# Infer tagged configuration to use if any are available and
-# if one wasn't chosen via the "--tag" command line option.
-# Only attempt this if the compiler in the base compile
-# command doesn't match the default compiler.
-# arg is usually of the form 'gcc ...'
-func_infer_tag ()
-{
- $opt_debug
- if test -n "$available_tags" && test -z "$tagname"; then
- CC_quoted=
- for arg in $CC; do
- func_quote_for_eval "$arg"
- CC_quoted="$CC_quoted $func_quote_for_eval_result"
- done
- case $@ in
- # Blanks in the command may have been stripped by the calling shell,
- # but not from the CC environment variable when configure was run.
- " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
- # Blanks at the start of $base_compile will cause this to fail
- # if we don't check for them as well.
- *)
- for z in $available_tags; do
- if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
- # Evaluate the configuration.
- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
- CC_quoted=
- for arg in $CC; do
- # Double-quote args containing other shell metacharacters.
- func_quote_for_eval "$arg"
- CC_quoted="$CC_quoted $func_quote_for_eval_result"
- done
- case "$@ " in
- " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
- # The compiler in the base compile command matches
- # the one in the tagged configuration.
- # Assume this is the tagged configuration we want.
- tagname=$z
- break
- ;;
- esac
- fi
- done
- # If $tagname still isn't set, then no tagged configuration
- # was found and let the user know that the "--tag" command
- # line option must be used.
- if test -z "$tagname"; then
- func_echo "unable to infer tagged configuration"
- func_fatal_error "specify a tag with \`--tag'"
-# else
-# func_verbose "using $tagname tagged configuration"
- fi
- ;;
- esac
- fi
-}
-
-
-
-# func_generate_dlsyms outputname originator pic_p
-# Extract symbols from dlprefiles and create ${outputname}S.o with
-# a dlpreopen symbol table.
-func_generate_dlsyms ()
-{
- $opt_debug
- my_outputname="$1"
- my_originator="$2"
- my_pic_p="${3-no}"
- my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
- my_dlsyms=
-
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- if test -n "$NM" && test -n "$global_symbol_pipe"; then
- my_dlsyms="${my_outputname}S.c"
- else
- func_error "not configured to extract global symbols from dlpreopened files"
- fi
- fi
-
- if test -n "$my_dlsyms"; then
- case $my_dlsyms in
- "") ;;
- *.c)
- # Discover the nlist of each of the dlfiles.
- nlist="$output_objdir/${my_outputname}.nm"
-
- func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
-
- # Parse the name list into a source file.
- func_echo "creating $output_objdir/$my_dlsyms"
-
- $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
-/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
-/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* External symbol declarations for the compiler. */\
-"
-
- if test "$dlself" = yes; then
- func_echo "generating symbol list for \`$output'"
-
- $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
-
- # Add our own program objects to the symbol list.
- progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- for progfile in $progfiles; do
- func_echo "extracting global C symbols from \`$progfile'"
- $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
- done
-
- if test -n "$exclude_expsyms"; then
- $opt_dry_run || {
- eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
- eval '$MV "$nlist"T "$nlist"'
- }
- fi
-
- if test -n "$export_symbols_regex"; then
- $opt_dry_run || {
- eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
- eval '$MV "$nlist"T "$nlist"'
- }
- fi
-
- # Prepare the list of exported symbols
- if test -z "$export_symbols"; then
- export_symbols="$output_objdir/$outputname.exp"
- $opt_dry_run || {
- $RM $export_symbols
- eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
- case $host in
- *cygwin* | *mingw* )
- eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
- eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
- ;;
- esac
- }
- else
- $opt_dry_run || {
- eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
- eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
- eval '$MV "$nlist"T "$nlist"'
- case $host in
- *cygwin | *mingw* )
- eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
- eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
- ;;
- esac
- }
- fi
- fi
-
- for dlprefile in $dlprefiles; do
- func_echo "extracting global C symbols from \`$dlprefile'"
- func_basename "$dlprefile"
- name="$func_basename_result"
- $opt_dry_run || {
- eval '$ECHO ": $name " >> "$nlist"'
- eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
- }
- done
-
- $opt_dry_run || {
- # Make sure we have at least an empty file.
- test -f "$nlist" || : > "$nlist"
-
- if test -n "$exclude_expsyms"; then
- $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
- $MV "$nlist"T "$nlist"
- fi
-
- # Try sorting and uniquifying the output.
- if $GREP -v "^: " < "$nlist" |
- if sort -k 3 </dev/null >/dev/null 2>&1; then
- sort -k 3
- else
- sort +2
- fi |
- uniq > "$nlist"S; then
- :
- else
- $GREP -v "^: " < "$nlist" > "$nlist"S
- fi
-
- if test -f "$nlist"S; then
- eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
- else
- $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
- fi
-
- $ECHO >> "$output_objdir/$my_dlsyms" "\
-
-/* The mapping between symbol names and symbols. */
-"
- case $host in
- *cygwin* | *mingw* )
- $ECHO >> "$output_objdir/$my_dlsyms" "\
-/* DATA imports from DLLs on WIN32 con't be const, because
- runtime relocations are performed -- see ld's documentation
- on pseudo-relocs. */
- struct {
-"
- ;;
- *)
- $ECHO >> "$output_objdir/$my_dlsyms" "\
-const struct {
-"
- ;;
- esac
-
- $ECHO >> "$output_objdir/$my_dlsyms" "\
- const char *name;
- void *address;
-}
-lt_${my_prefix}_LTX_preloaded_symbols[] =
-{\
- { \"$my_originator\", (void *) 0 },
-"
-
- eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
-
- $ECHO >> "$output_objdir/$my_dlsyms" "\
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt_${my_prefix}_LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif\
-"
- } # !$opt_dry_run
-
- pic_flag_for_symtable=
- case "$compile_command " in
- *" -static "*) ;;
- *)
- case $host in
- # compiling the symbol table file with pic_flag works around
- # a FreeBSD bug that causes programs to crash when -lm is
- # linked before any other PIC object. But we must not use
- # pic_flag when linking with -static. The problem exists in
- # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
- *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
- pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
- *-*-hpux*)
- pic_flag_for_symtable=" $pic_flag" ;;
- *)
- if test "X$my_pic_p" != Xno; then
- pic_flag_for_symtable=" $pic_flag"
- fi
- ;;
- esac
- ;;
- esac
- symtab_cflags=
- for arg in $LTCFLAGS; do
- case $arg in
- -pie | -fpie | -fPIE) ;;
- *) symtab_cflags="$symtab_cflags $arg" ;;
- esac
- done
-
- # Now compile the dynamic symbol file.
- func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
-
- # Clean up the generated files.
- func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
-
- # Transform the symbol file into the correct name.
- symfileobj="$output_objdir/${my_outputname}S.$objext"
- case $host in
- *cygwin* | *mingw* )
- if test -f "$output_objdir/$my_outputname.def"; then
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
- else
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- fi
- ;;
- *)
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- ;;
- esac
- ;;
- *)
- func_fatal_error "unknown suffix for \`$my_dlsyms'"
- ;;
- esac
- else
- # We keep going just in case the user didn't refer to
- # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
- # really was required.
-
- # Nullify the symbol file.
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
- fi
-}
-
-# func_extract_an_archive dir oldlib
-func_extract_an_archive ()
-{
- $opt_debug
- f_ex_an_ar_dir="$1"; shift
- f_ex_an_ar_oldlib="$1"
- func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" 'exit $?'
- if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
- fi
-}
-
-
-# func_extract_archives gentop oldlib ...
-func_extract_archives ()
-{
- $opt_debug
- my_gentop="$1"; shift
- my_oldlibs=${1+"$@"}
- my_oldobjs=""
- my_xlib=""
- my_xabs=""
- my_xdir=""
-
- for my_xlib in $my_oldlibs; do
- # Extract the objects.
- case $my_xlib in
- [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
- *) my_xabs=`pwd`"/$my_xlib" ;;
- esac
- func_basename "$my_xlib"
- my_xlib="$func_basename_result"
- my_xdir="$my_gentop/$my_xlib"
-
- func_mkdir_p "$my_xdir"
-
- case $host in
- *-darwin*)
- func_echo "Extracting $my_xabs"
- # Do not bother doing anything if just a dry run
- $opt_dry_run || {
- darwin_orig_dir=`pwd`
- cd $my_xdir || exit $?
- darwin_archive=$my_xabs
- darwin_curdir=`pwd`
- darwin_base_archive=`basename $darwin_archive`
- darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
- if test -n "$darwin_arches"; then
- darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
- darwin_arch=
- func_echo "$darwin_base_archive has multiple architectures $darwin_arches"
- for darwin_arch in $darwin_arches ; do
- func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
- lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
- cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
- func_extract_an_archive "`pwd`" "${darwin_base_archive}"
- cd "$darwin_curdir"
- $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
- done # $darwin_arches
- ## Okay now we've a bunch of thin objects, gotta fatten them up :)
- darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
- darwin_file=
- darwin_files=
- for darwin_file in $darwin_filelist; do
- darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
- lipo -create -output "$darwin_file" $darwin_files
- done # $darwin_filelist
- $RM -rf unfat-$$
- cd "$darwin_orig_dir"
- else
- cd $darwin_orig_dir
- func_extract_an_archive "$my_xdir" "$my_xabs"
- fi # $darwin_arches
- } # !$opt_dry_run
- ;;
- *)
- func_extract_an_archive "$my_xdir" "$my_xabs"
- ;;
- esac
- my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
- done
-
- func_extract_archives_result="$my_oldobjs"
-}
-
-
-# func_mode_compile arg...
-func_mode_compile ()
-{
- $opt_debug
- # Get the compilation command and the source file.
- base_compile=
- srcfile="$nonopt" # always keep a non-empty value in "srcfile"
- suppress_opt=yes
- suppress_output=
- arg_mode=normal
- libobj=
- later=
- pie_flag=
-
- for arg
- do
- case $arg_mode in
- arg )
- # do not "continue". Instead, add this to base_compile
- lastarg="$arg"
- arg_mode=normal
- ;;
-
- target )
- libobj="$arg"
- arg_mode=normal
- continue
- ;;
-
- normal )
- # Accept any command-line options.
- case $arg in
- -o)
- test -n "$libobj" && \
- func_fatal_error "you cannot specify \`-o' more than once"
- arg_mode=target
- continue
- ;;
-
- -pie | -fpie | -fPIE)
- pie_flag="$pie_flag $arg"
- continue
- ;;
-
- -shared | -static | -prefer-pic | -prefer-non-pic)
- later="$later $arg"
- continue
- ;;
-
- -no-suppress)
- suppress_opt=no
- continue
- ;;
-
- -Xcompiler)
- arg_mode=arg # the next one goes into the "base_compile" arg list
- continue # The current "srcfile" will either be retained or
- ;; # replaced later. I would guess that would be a bug.
-
- -Wc,*)
- func_stripname '-Wc,' '' "$arg"
- args=$func_stripname_result
- lastarg=
- save_ifs="$IFS"; IFS=','
- for arg in $args; do
- IFS="$save_ifs"
- func_quote_for_eval "$arg"
- lastarg="$lastarg $func_quote_for_eval_result"
- done
- IFS="$save_ifs"
- func_stripname ' ' '' "$lastarg"
- lastarg=$func_stripname_result
-
- # Add the arguments to base_compile.
- base_compile="$base_compile $lastarg"
- continue
- ;;
-
- *)
- # Accept the current argument as the source file.
- # The previous "srcfile" becomes the current argument.
- #
- lastarg="$srcfile"
- srcfile="$arg"
- ;;
- esac # case $arg
- ;;
- esac # case $arg_mode
-
- # Aesthetically quote the previous argument.
- func_quote_for_eval "$lastarg"
- base_compile="$base_compile $func_quote_for_eval_result"
- done # for arg
-
- case $arg_mode in
- arg)
- func_fatal_error "you must specify an argument for -Xcompile"
- ;;
- target)
- func_fatal_error "you must specify a target with \`-o'"
- ;;
- *)
- # Get the name of the library object.
- test -z "$libobj" && {
- func_basename "$srcfile"
- libobj="$func_basename_result"
- }
- ;;
- esac
-
- # Recognize several different file suffixes.
- # If the user specifies -o file.o, it is replaced with file.lo
- xform='[cCFSifmso]'
- case $libobj in
- *.ada) xform=ada ;;
- *.adb) xform=adb ;;
- *.ads) xform=ads ;;
- *.asm) xform=asm ;;
- *.c++) xform=c++ ;;
- *.cc) xform=cc ;;
- *.ii) xform=ii ;;
- *.class) xform=class ;;
- *.cpp) xform=cpp ;;
- *.cxx) xform=cxx ;;
- *.f90) xform=f90 ;;
- *.for) xform=for ;;
- *.java) xform=java ;;
- *.obj) xform=obj ;;
- esac
-
- libobj=`$ECHO "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
-
- case $libobj in
- *.lo) obj=`$ECHO "X$libobj" | $Xsed -e "$lo2o"` ;;
- *)
- func_fatal_error "cannot determine name of library object from \`$libobj'"
- ;;
- esac
-
- func_infer_tag $base_compile
-
- for arg in $later; do
- case $arg in
- -shared)
- test "$build_libtool_libs" != yes && \
- func_fatal_configuration "can not build a shared library"
- build_old_libs=no
- continue
- ;;
-
- -static)
- build_libtool_libs=no
- build_old_libs=yes
- continue
- ;;
-
- -prefer-pic)
- pic_mode=yes
- continue
- ;;
-
- -prefer-non-pic)
- pic_mode=no
- continue
- ;;
- esac
- done
-
- func_quote_for_eval "$libobj"
- test "X$libobj" != "X$func_quote_for_eval_result" \
- && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
- && func_warning "libobj name \`$libobj' may not contain shell special characters."
- func_basename "$obj"
- objname="$func_basename_result"
- func_dirname "$obj" "/" ""
- xdir="$func_dirname_result"
- lobj=${xdir}$objdir/$objname
-
- test -z "$base_compile" && \
- func_fatal_help "you must specify a compilation command"
-
- # Delete any leftover library objects.
- if test "$build_old_libs" = yes; then
- removelist="$obj $lobj $libobj ${libobj}T"
- else
- removelist="$lobj $libobj ${libobj}T"
- fi
-
- $opt_dry_run || $RM $removelist
- trap "$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE" 1 2 15
-
- # On Cygwin there's no "real" PIC flag so we must build both object types
- case $host_os in
- cygwin* | mingw* | pw32* | os2*)
- pic_mode=default
- ;;
- esac
- if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
- # non-PIC code in shared libraries is not supported
- pic_mode=default
- fi
-
- # Calculate the filename of the output object if compiler does
- # not support -o with -c
- if test "$compiler_c_o" = no; then
- output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
- lockfile="$output_obj.lock"
- removelist="$removelist $output_obj $lockfile"
- trap "$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE" 1 2 15
- else
- output_obj=
- need_locks=no
- lockfile=
- fi
-
- # Lock this critical section if it is needed
- # We use this script file to make the link, it avoids creating a new file
- if test "$need_locks" = yes; then
- until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
- func_echo "Waiting for $lockfile to be removed"
- sleep 2
- done
- elif test "$need_locks" = warn; then
- if test -f "$lockfile"; then
- $ECHO "\
-*** ERROR, $lockfile exists and contains:
-`cat $lockfile 2>/dev/null`
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
- $opt_dry_run || $RM $removelist
- exit $EXIT_FAILURE
- fi
- $ECHO "$srcfile" > "$lockfile"
- fi
-
- if test -n "$fix_srcfile_path"; then
- eval srcfile=\"$fix_srcfile_path\"
- fi
- func_quote_for_eval "$srcfile"
- qsrcfile=$func_quote_for_eval_result
-
- $opt_dry_run || $RM "$libobj" "${libobj}T"
-
- # Create a libtool object file (analogous to a ".la" file),
- # but don't create it if we're doing a dry run.
- $opt_dry_run || cat > ${libobj}T <<EOF
-# $libobj - a libtool object file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-EOF
-
- # Only build a PIC object if we are building libtool libraries.
- if test "$build_libtool_libs" = yes; then
- # Without this assignment, base_compile gets emptied.
- fbsd_hideous_sh_bug=$base_compile
-
- if test "$pic_mode" != no; then
- command="$base_compile $qsrcfile $pic_flag"
- else
- # Don't build PIC code
- command="$base_compile $qsrcfile"
- fi
-
- func_mkdir_p "$xdir$objdir"
-
- if test -z "$output_obj"; then
- # Place PIC objects in $objdir
- command="$command -o $lobj"
- fi
-
- $opt_dry_run || $RM "$lobj" "$output_obj"
-
- func_show_eval "$command" \
- 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
-
- if test "$need_locks" = warn &&
- test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
- $ECHO "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
- $opt_dry_run || $RM $removelist
- exit $EXIT_FAILURE
- fi
-
- # Just move the object if needed, then go on to compile the next one
- if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
- func_show_eval '$MV "$output_obj" "$lobj"' \
- 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
- fi
-
- # Append the name of the PIC object to the libtool object file.
- $opt_dry_run || cat >> ${libobj}T <<EOF
-pic_object='$objdir/$objname'
-
-EOF
-
- # Allow error messages only from the first compilation.
- if test "$suppress_opt" = yes; then
- suppress_output=' >/dev/null 2>&1'
- fi
- else
- # No PIC object so indicate it doesn't exist in the libtool
- # object file.
- $opt_dry_run || cat >> ${libobj}T <<EOF
-pic_object=none
-
-EOF
- fi
-
- # Only build a position-dependent object if we build old libraries.
- if test "$build_old_libs" = yes; then
- if test "$pic_mode" != yes; then
- # Don't build PIC code
- command="$base_compile $qsrcfile$pie_flag"
- else
- command="$base_compile $qsrcfile $pic_flag"
- fi
- if test "$compiler_c_o" = yes; then
- command="$command -o $obj"
- fi
-
- # Suppress compiler output if we already did a PIC compilation.
- command="$command$suppress_output"
- $opt_dry_run || $RM "$obj" "$output_obj"
- func_show_eval "$command" \
- '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
-
- if test "$need_locks" = warn &&
- test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
- $ECHO "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together. If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
- $opt_dry_run || $RM $removelist
- exit $EXIT_FAILURE
- fi
-
- # Just move the object if needed
- if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
- func_show_eval '$MV "$output_obj" "$obj"' \
- 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
- fi
-
- # Append the name of the non-PIC object the libtool object file.
- # Only append if the libtool object file exists.
- $opt_dry_run || cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object='$objname'
-
-EOF
- else
- # Append the name of the non-PIC object the libtool object file.
- # Only append if the libtool object file exists.
- $opt_dry_run || cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object=none
-
-EOF
- fi
-
- $opt_dry_run || {
- $MV "${libobj}T" "${libobj}"
-
- # Unlock the critical section if it was locked
- if test "$need_locks" != no; then
- $RM "$lockfile"
- fi
- }
-
- exit $EXIT_SUCCESS
-}
-
-
-# func_mode_execute arg...
-func_mode_execute ()
-{
- $opt_debug
- # The first argument is the command name.
- cmd="$nonopt"
- test -z "$cmd" && \
- func_fatal_help "you must specify a COMMAND"
-
- # Handle -dlopen flags immediately.
- for file in $execute_dlfiles; do
- test -f "$file" \
- || func_fatal_help "\`$file' is not a file"
-
- dir=
- case $file in
- *.la)
- # Check to see that this really is a libtool archive.
- func_lalib_unsafe_p "$file" \
- || func_fatal_help "\`$lib' is not a valid libtool archive"
-
- # Read the libtool library.
- dlname=
- library_names=
- func_source "$file"
-
- # Skip this library if it cannot be dlopened.
- if test -z "$dlname"; then
- # Warn if it was a shared library.
- test -n "$library_names" && \
- func_warning "\`$file' was not linked with \`-export-dynamic'"
- continue
- fi
-
- func_dirname "$file" "" "."
- dir="$func_dirname_result"
-
- if test -f "$dir/$objdir/$dlname"; then
- dir="$dir/$objdir"
- else
- func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
- fi
- ;;
-
- *.lo)
- # Just add the directory containing the .lo file.
- func_dirname "$file" "" "."
- dir="$func_dirname_result"
- ;;
-
- *)
- func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
- continue
- ;;
- esac
-
- # Get the absolute pathname.
- absdir=`cd "$dir" && pwd`
- test -n "$absdir" && dir="$absdir"
-
- # Now add the directory to shlibpath_var.
- if eval "test -z \"\$$shlibpath_var\""; then
- eval "$shlibpath_var=\"\$dir\""
- else
- eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
- fi
- done
-
- # This variable tells wrapper scripts just to set shlibpath_var
- # rather than running their programs.
- libtool_execute_magic="$magic"
-
- # Check if any of the arguments is a wrapper script.
- args=
- for file
- do
- case $file in
- -*) ;;
- *)
- # Do a test to see if this is really a libtool program.
- if func_ltwrapper_p "$file"; then
- func_source "$file"
-
- # Transform arg to wrapped name.
- file="$progdir/$program"
- fi
- ;;
- esac
- # Quote arguments (to preserve shell metacharacters).
- func_quote_for_eval "$file"
- args="$args $func_quote_for_eval_result"
- done
-
- if test "X$opt_dry_run" = Xfalse; then
- if test -n "$shlibpath_var"; then
- # Export the shlibpath_var.
- eval "export $shlibpath_var"
- fi
-
- # Restore saved environment variables
- if test "${save_LC_ALL+set}" = set; then
- LC_ALL="$save_LC_ALL"; export LC_ALL
- fi
- if test "${save_LANG+set}" = set; then
- LANG="$save_LANG"; export LANG
- fi
-
- # Now prepare to actually exec the command.
- exec_cmd="\$cmd$args"
- else
- # Display what would be done.
- if test -n "$shlibpath_var"; then
- eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
- $ECHO "export $shlibpath_var"
- fi
- $ECHO "$cmd$args"
- exit $EXIT_SUCCESS
- fi
-}
-
-
-# func_mode_finish arg...
-func_mode_finish ()
-{
- $opt_debug
- libdirs="$nonopt"
- admincmds=
-
- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
- for dir
- do
- libdirs="$libdirs $dir"
- done
-
- for libdir in $libdirs; do
- if test -n "$finish_cmds"; then
- # Do each command in the finish commands.
- func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
-'"$cmd"'"'
- fi
- if test -n "$finish_eval"; then
- # Do the single finish_eval.
- eval cmds=\"$finish_eval\"
- $opt_dry_run || eval "$cmds" || admincmds="$admincmds
- $cmds"
- fi
- done
- fi
-
- # Exit here if they wanted silent mode.
- $opt_silent && exit $EXIT_SUCCESS
-
- $ECHO "X----------------------------------------------------------------------" | $Xsed
- $ECHO "Libraries have been installed in:"
- for libdir in $libdirs; do
- $ECHO " $libdir"
- done
- $ECHO
- $ECHO "If you ever happen to want to link against installed libraries"
- $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
- $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
- $ECHO "flag during linking and do at least one of the following:"
- if test -n "$shlibpath_var"; then
- $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
- $ECHO " during execution"
- fi
- if test -n "$runpath_var"; then
- $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
- $ECHO " during linking"
- fi
- if test -n "$hardcode_libdir_flag_spec"; then
- libdir=LIBDIR
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- $ECHO " - use the \`$flag' linker flag"
- fi
- if test -n "$admincmds"; then
- $ECHO " - have your system administrator run these commands:$admincmds"
- fi
- if test -f /etc/ld.so.conf; then
- $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
- fi
- $ECHO
-
- $ECHO "See any operating system documentation about shared libraries for"
- case $host in
- solaris2.[6789]|solaris2.1[0-9])
- $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
- $ECHO "pages."
- ;;
- *)
- $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
- ;;
- esac
- $ECHO "X----------------------------------------------------------------------" | $Xsed
- exit $EXIT_SUCCESS
-}
-
-
-# func_mode_install arg...
-func_mode_install ()
-{
- $opt_debug
- # There may be an optional sh(1) argument at the beginning of
- # install_prog (especially on Windows NT).
- if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
- # Allow the use of GNU shtool's install command.
- $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
- # Aesthetically quote it.
- func_quote_for_eval "$nonopt"
- install_prog="$func_quote_for_eval_result "
- arg=$1
- shift
- else
- install_prog=
- arg=$nonopt
- fi
-
- # The real first argument should be the name of the installation program.
- # Aesthetically quote it.
- func_quote_for_eval "$arg"
- install_prog="$install_prog$func_quote_for_eval_result"
-
- # We need to accept at least all the BSD install flags.
- dest=
- files=
- opts=
- prev=
- install_type=
- isdir=no
- stripme=
- for arg
- do
- if test -n "$dest"; then
- files="$files $dest"
- dest=$arg
- continue
- fi
-
- case $arg in
- -d) isdir=yes ;;
- -f)
- case " $install_prog " in
- *[\\\ /]cp\ *) ;;
- *) prev=$arg ;;
- esac
- ;;
- -g | -m | -o)
- prev=$arg
- ;;
- -s)
- stripme=" -s"
- continue
- ;;
- -*)
- ;;
- *)
- # If the previous option needed an argument, then skip it.
- if test -n "$prev"; then
- prev=
- else
- dest=$arg
- continue
- fi
- ;;
- esac
-
- # Aesthetically quote the argument.
- func_quote_for_eval "$arg"
- install_prog="$install_prog $func_quote_for_eval_result"
- done
-
- test -z "$install_prog" && \
- func_fatal_help "you must specify an install program"
-
- test -n "$prev" && \
- func_fatal_help "the \`$prev' option requires an argument"
-
- if test -z "$files"; then
- if test -z "$dest"; then
- func_fatal_help "no file or destination specified"
- else
- func_fatal_help "you must specify a destination"
- fi
- fi
-
- # Strip any trailing slash from the destination.
- func_stripname '' '/' "$dest"
- dest=$func_stripname_result
-
- # Check to see that the destination is a directory.
- test -d "$dest" && isdir=yes
- if test "$isdir" = yes; then
- destdir="$dest"
- destname=
- else
- func_dirname "$dest" "" "."
- destdir="$func_dirname_result"
- func_basename "$dest"
- destname="$func_basename_result"
-
- # Not a directory, so check to see that there is only one file specified.
- set dummy $files; shift
- test "$#" -gt 1 && \
- func_fatal_help "\`$dest' is not a directory"
- fi
- case $destdir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- for file in $files; do
- case $file in
- *.lo) ;;
- *)
- func_fatal_help "\`$destdir' must be an absolute directory name"
- ;;
- esac
- done
- ;;
- esac
-
- # This variable tells wrapper scripts just to set variables rather
- # than running their programs.
- libtool_install_magic="$magic"
-
- staticlibs=
- future_libdirs=
- current_libdirs=
- for file in $files; do
-
- # Do each installation.
- case $file in
- *.$libext)
- # Do the static libraries later.
- staticlibs="$staticlibs $file"
- ;;
-
- *.la)
- # Check to see that this really is a libtool archive.
- func_lalib_unsafe_p "$file" \
- || func_fatal_help "\`$file' is not a valid libtool archive"
-
- library_names=
- old_library=
- relink_command=
- func_source "$file"
-
- # Add the libdir to current_libdirs if it is the destination.
- if test "X$destdir" = "X$libdir"; then
- case "$current_libdirs " in
- *" $libdir "*) ;;
- *) current_libdirs="$current_libdirs $libdir" ;;
- esac
- else
- # Note the libdir as a future libdir.
- case "$future_libdirs " in
- *" $libdir "*) ;;
- *) future_libdirs="$future_libdirs $libdir" ;;
- esac
- fi
-
- func_dirname "$file" "/" ""
- dir="$func_dirname_result"
- dir="$dir$objdir"
-
- if test -n "$relink_command"; then
- # Determine the prefix the user has applied to our future dir.
- inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
-
- # Don't allow the user to place us outside of our expected
- # location b/c this prevents finding dependent libraries that
- # are installed to the same prefix.
- # At present, this check doesn't affect windows .dll's that
- # are installed into $libdir/../bin (currently, that works fine)
- # but it's something to keep an eye on.
- test "$inst_prefix_dir" = "$destdir" && \
- func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
-
- if test -n "$inst_prefix_dir"; then
- # Stick the inst_prefix_dir data into the link command.
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
- else
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
- fi
-
- func_warning "relinking \`$file'"
- func_show_eval "$relink_command" \
- 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
- fi
-
- # See the names of the shared library.
- set dummy $library_names; shift
- if test -n "$1"; then
- realname="$1"
- shift
-
- srcname="$realname"
- test -n "$relink_command" && srcname="$realname"T
-
- # Install the shared library and build the symlinks.
- func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
- 'exit $?'
- tstripme="$stripme"
- case $host_os in
- cygwin* | mingw* | pw32*)
- case $realname in
- *.dll.a)
- tstripme=""
- ;;
- esac
- ;;
- esac
- if test -n "$tstripme" && test -n "$striplib"; then
- func_show_eval "$striplib $destdir/$realname" 'exit $?'
- fi
-
- if test "$#" -gt 0; then
- # Delete the old symlinks, and create new ones.
- # Try `ln -sf' first, because the `ln' binary might depend on
- # the symlink we replace! Solaris /bin/ln does not understand -f,
- # so we also need to try rm && ln -s.
- for linkname
- do
- test "$linkname" != "$realname" \
- && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
- done
- fi
-
- # Do each command in the postinstall commands.
- lib="$destdir/$realname"
- func_execute_cmds "$postinstall_cmds" 'exit $?'
- fi
-
- # Install the pseudo-library for information purposes.
- func_basename "$file"
- name="$func_basename_result"
- instname="$dir/$name"i
- func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
-
- # Maybe install the static library, too.
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
- ;;
-
- *.lo)
- # Install (i.e. copy) a libtool object.
-
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- func_basename "$file"
- destfile="$func_basename_result"
- destfile="$destdir/$destfile"
- fi
-
- # Deduce the name of the destination old-style object file.
- case $destfile in
- *.lo)
- staticdest=`$ECHO "X$destfile" | $Xsed -e "$lo2o"`
- ;;
- *.$objext)
- staticdest="$destfile"
- destfile=
- ;;
- *)
- func_fatal_help "cannot copy a libtool object to \`$destfile'"
- ;;
- esac
-
- # Install the libtool object if requested.
- test -n "$destfile" && \
- func_show_eval "$install_prog $file $destfile" 'exit $?'
-
- # Install the old object if enabled.
- if test "$build_old_libs" = yes; then
- # Deduce the name of the old-style object file.
- staticobj=`$ECHO "X$file" | $Xsed -e "$lo2o"`
- func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
- fi
- exit $EXIT_SUCCESS
- ;;
-
- *)
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- func_basename "$file"
- destfile="$func_basename_result"
- destfile="$destdir/$destfile"
- fi
-
- # If the file is missing, and there is a .exe on the end, strip it
- # because it is most likely a libtool script we actually want to
- # install
- stripped_ext=""
- case $file in
- *.exe)
- if test ! -f "$file"; then
- func_stripname '' '.exe' "$file"
- file=$func_stripname_result
- stripped_ext=".exe"
- fi
- ;;
- esac
-
- # Do a test to see if this is really a libtool program.
- case $host in
- *cygwin*|*mingw*)
- func_stripname '' '.exe' "$file"
- wrapper=$func_stripname_result
- ;;
- *)
- wrapper=$file
- ;;
- esac
- if func_ltwrapper_p "$wrapper"; then
- notinst_deplibs=
- relink_command=
-
- func_source "$wrapper"
-
- # Check the variables that should have been set.
- test -z "$generated_by_libtool_version" && \
- func_fatal_error "invalid libtool wrapper script \`$wrapper'"
-
- finalize=yes
- for lib in $notinst_deplibs; do
- # Check to see that each library is installed.
- libdir=
- if test -f "$lib"; then
- func_source "$lib"
- fi
- libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
- if test -n "$libdir" && test ! -f "$libfile"; then
- func_warning "\`$lib' has not been installed in \`$libdir'"
- finalize=no
- fi
- done
-
- relink_command=
- func_source "$wrapper"
-
- outputname=
- if test "$fast_install" = no && test -n "$relink_command"; then
- $opt_dry_run || {
- if test "$finalize" = yes; then
- tmpdir=`func_mktempdir`
- func_basename "$file$stripped_ext"
- file="$func_basename_result"
- outputname="$tmpdir/$file"
- # Replace the output file specification.
- relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
-
- $opt_silent || {
- func_quote_for_expand "$relink_command"
- eval "func_echo $func_quote_for_expand_result"
- }
- if eval "$relink_command"; then :
- else
- func_error "error: relink \`$file' with the above command before installing it"
- $opt_dry_run || ${RM}r "$tmpdir"
- continue
- fi
- file="$outputname"
- else
- func_warning "cannot relink \`$file'"
- fi
- }
- else
- # Install the binary that we compiled earlier.
- file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
- fi
- fi
-
- # remove .exe since cygwin /usr/bin/install will append another
- # one anyway
- case $install_prog,$host in
- */usr/bin/install*,*cygwin*)
- case $file:$destfile in
- *.exe:*.exe)
- # this is ok
- ;;
- *.exe:*)
- destfile=$destfile.exe
- ;;
- *:*.exe)
- func_stripname '' '.exe' "$destfile"
- destfile=$func_stripname_result
- ;;
- esac
- ;;
- esac
- func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
- $opt_dry_run || if test -n "$outputname"; then
- ${RM}r "$tmpdir"
- fi
- ;;
- esac
- done
-
- for file in $staticlibs; do
- func_basename "$file"
- name="$func_basename_result"
-
- # Set up the ranlib parameters.
- oldlib="$destdir/$name"
-
- func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
-
- if test -n "$stripme" && test -n "$old_striplib"; then
- func_show_eval "$old_striplib $oldlib" 'exit $?'
- fi
-
- # Do each command in the postinstall commands.
- func_execute_cmds "$old_postinstall_cmds" 'exit $?'
- done
-
- test -n "$future_libdirs" && \
- func_warning "remember to run \`$progname --finish$future_libdirs'"
-
- if test -n "$current_libdirs"; then
- # Maybe just do a dry run.
- $opt_dry_run && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
- else
- exit $EXIT_SUCCESS
- fi
-}
-
-
-# func_mode_link arg...
-func_mode_link ()
-{
- $opt_debug
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- # It is impossible to link a dll without this setting, and
- # we shouldn't force the makefile maintainer to figure out
- # which system we are compiling for in order to pass an extra
- # flag for every libtool invocation.
- # allow_undefined=no
-
- # FIXME: Unfortunately, there are problems with the above when trying
- # to make a dll which has undefined symbols, in which case not
- # even a static library is built. For now, we need to specify
- # -no-undefined on the libtool link line when we can be certain
- # that all symbols are satisfied, otherwise we get a static library.
- allow_undefined=yes
- ;;
- *)
- allow_undefined=yes
- ;;
- esac
- libtool_args="$nonopt"
- base_compile="$nonopt $@"
- compile_command="$nonopt"
- finalize_command="$nonopt"
-
- compile_rpath=
- finalize_rpath=
- compile_shlibpath=
- finalize_shlibpath=
- convenience=
- old_convenience=
- deplibs=
- old_deplibs=
- compiler_flags=
- linker_flags=
- dllsearchpath=
- lib_search_path=`pwd`
- inst_prefix_dir=
- new_inherited_linker_flags=
-
- avoid_version=no
- dlfiles=
- dlprefiles=
- dlself=no
- export_dynamic=no
- export_symbols=
- export_symbols_regex=
- generated=
- libobjs=
- ltlibs=
- module=no
- no_install=no
- objs=
- non_pic_objects=
- precious_files_regex=
- prefer_static_libs=no
- preload=no
- prev=
- prevarg=
- release=
- rpath=
- xrpath=
- perm_rpath=
- temp_rpath=
- thread_safe=no
- vinfo=
- vinfo_number=no
- weak_libs=
- single_module="${wl}-single_module"
- func_infer_tag $base_compile
-
- # We need to know -static, to get the right output filenames.
- for arg
- do
- case $arg in
- -shared)
- test "$build_libtool_libs" != yes && \
- func_fatal_configuration "can not build a shared library"
- build_old_libs=no
- break
- ;;
- -all-static | -static)
- if test "X$arg" = "X-all-static"; then
- if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
- func_warning "complete static linking is impossible in this configuration"
- fi
- if test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- # See comment for -static flag below, for more details.
- compile_command="$compile_command $link_static_flag"
- finalize_command="$finalize_command $link_static_flag"
- fi
- prefer_static_libs=yes
- else
- if test -z "$pic_flag" && test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- prefer_static_libs=built
- fi
- build_libtool_libs=no
- build_old_libs=yes
- break
- ;;
- esac
- done
-
- # See if our shared archives depend on static archives.
- test -n "$old_archive_from_new_cmds" && build_old_libs=yes
-
- # Go through the arguments, transforming them on the way.
- while test "$#" -gt 0; do
- arg="$1"
- shift
- func_quote_for_eval "$arg"
- qarg="$func_quote_for_eval_unquoted_result"
- libtool_args="$libtool_args $func_quote_for_eval_result"
-
- # If the previous option needs an argument, assign it.
- if test -n "$prev"; then
- case $prev in
- output)
- compile_command="$compile_command @OUTPUT@"
- finalize_command="$finalize_command @OUTPUT@"
- ;;
- esac
-
- case $prev in
- dlfiles|dlprefiles)
- if test "$preload" = no; then
- # Add the symbol object into the linking commands.
- compile_command="$compile_command @SYMFILE@"
- finalize_command="$finalize_command @SYMFILE@"
- preload=yes
- fi
- case $arg in
- *.la | *.lo) ;; # We handle these cases below.
- force)
- if test "$dlself" = no; then
- dlself=needless
- export_dynamic=yes
- fi
- prev=
- continue
- ;;
- self)
- if test "$prev" = dlprefiles; then
- dlself=yes
- elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
- dlself=yes
- else
- dlself=needless
- export_dynamic=yes
- fi
- prev=
- continue
- ;;
- *)
- if test "$prev" = dlfiles; then
- dlfiles="$dlfiles $arg"
- else
- dlprefiles="$dlprefiles $arg"
- fi
- prev=
- continue
- ;;
- esac
- ;;
- expsyms)
- export_symbols="$arg"
- test -f "$arg" \
- || func_fatal_error "symbol file \`$arg' does not exist"
- prev=
- continue
- ;;
- expsyms_regex)
- export_symbols_regex="$arg"
- prev=
- continue
- ;;
- framework)
- case $host in
- *-*-darwin*)
- case "$deplibs " in
- *" $qarg.ltframework "*) ;;
- *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
- ;;
- esac
- ;;
- esac
- prev=
- continue
- ;;
- inst_prefix)
- inst_prefix_dir="$arg"
- prev=
- continue
- ;;
- objectlist)
- if test -f "$arg"; then
- save_arg=$arg
- moreargs=
- for fil in `cat "$save_arg"`
- do
-# moreargs="$moreargs $fil"
- arg=$fil
- # A libtool-controlled object.
-
- # Check to see that this really is a libtool object.
- if func_lalib_unsafe_p "$arg"; then
- pic_object=
- non_pic_object=
-
- # Read the .lo file
- func_source "$arg"
-
- if test -z "$pic_object" ||
- test -z "$non_pic_object" ||
- test "$pic_object" = none &&
- test "$non_pic_object" = none; then
- func_fatal_error "cannot find name of object for \`$arg'"
- fi
-
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- if test "$pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- pic_object="$xdir$pic_object"
-
- if test "$prev" = dlfiles; then
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $pic_object"
- prev=
- continue
- else
- # If libtool objects are unsupported, then we need to preload.
- prev=dlprefiles
- fi
- fi
-
- # CHECK ME: I think I busted this. -Ossama
- if test "$prev" = dlprefiles; then
- # Preload the old-style object.
- dlprefiles="$dlprefiles $pic_object"
- prev=
- fi
-
- # A PIC object.
- libobjs="$libobjs $pic_object"
- arg="$pic_object"
- fi
-
- # Non-PIC object.
- if test "$non_pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- non_pic_object="$xdir$non_pic_object"
-
- # A standard non-PIC object
- non_pic_objects="$non_pic_objects $non_pic_object"
- if test -z "$pic_object" || test "$pic_object" = none ; then
- arg="$non_pic_object"
- fi
- else
- # If the PIC object exists, use it instead.
- # $xdir was prepended to $pic_object above.
- non_pic_object="$pic_object"
- non_pic_objects="$non_pic_objects $non_pic_object"
- fi
- else
- # Only an error if not doing a dry-run.
- if $opt_dry_run; then
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- pic_object=`$ECHO "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
- non_pic_object=`$ECHO "X${xdir}${arg}" | $Xsed -e "$lo2o"`
- libobjs="$libobjs $pic_object"
- non_pic_objects="$non_pic_objects $non_pic_object"
- else
- func_fatal_error "\`$arg' is not a valid libtool object"
- fi
- fi
- done
- else
- func_fatal_error "link input file \`$arg' does not exist"
- fi
- arg=$save_arg
- prev=
- continue
- ;;
- precious_regex)
- precious_files_regex="$arg"
- prev=
- continue
- ;;
- release)
- release="-$arg"
- prev=
- continue
- ;;
- rpath | xrpath)
- # We need an absolute path.
- case $arg in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- func_fatal_error "only absolute run-paths are allowed"
- ;;
- esac
- if test "$prev" = rpath; then
- case "$rpath " in
- *" $arg "*) ;;
- *) rpath="$rpath $arg" ;;
- esac
- else
- case "$xrpath " in
- *" $arg "*) ;;
- *) xrpath="$xrpath $arg" ;;
- esac
- fi
- prev=
- continue
- ;;
- shrext)
- shrext_cmds="$arg"
- prev=
- continue
- ;;
- weak)
- weak_libs="$weak_libs $arg"
- prev=
- continue
- ;;
- xcclinker)
- linker_flags="$linker_flags $qarg"
- compiler_flags="$compiler_flags $qarg"
- prev=
- compile_command="$compile_command $qarg"
- finalize_command="$finalize_command $qarg"
- continue
- ;;
- xcompiler)
- compiler_flags="$compiler_flags $qarg"
- prev=
- compile_command="$compile_command $qarg"
- finalize_command="$finalize_command $qarg"
- continue
- ;;
- xlinker)
- linker_flags="$linker_flags $qarg"
- compiler_flags="$compiler_flags $wl$qarg"
- prev=
- compile_command="$compile_command $wl$qarg"
- finalize_command="$finalize_command $wl$qarg"
- continue
- ;;
- *)
- eval "$prev=\"\$arg\""
- prev=
- continue
- ;;
- esac
- fi # test -n "$prev"
-
- prevarg="$arg"
-
- case $arg in
- -all-static)
- # The effects of -all-static are defined in a previous loop.
- continue
- ;;
-
- -allow-undefined)
- # FIXME: remove this flag sometime in the future.
- func_fatal_error "\`-allow-undefined' must not be used because it is the default"
- ;;
-
- -avoid-version)
- avoid_version=yes
- continue
- ;;
-
- -dlopen)
- prev=dlfiles
- continue
- ;;
-
- -dlpreopen)
- prev=dlprefiles
- continue
- ;;
-
- -export-dynamic)
- export_dynamic=yes
- continue
- ;;
-
- -export-symbols | -export-symbols-regex)
- if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
- func_fatal_error "more than one -exported-symbols argument is not allowed"
- fi
- if test "X$arg" = "X-export-symbols"; then
- prev=expsyms
- else
- prev=expsyms_regex
- fi
- continue
- ;;
-
- -framework)
- prev=framework
- continue
- ;;
-
- -inst-prefix-dir)
- prev=inst_prefix
- continue
- ;;
-
- # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
- # so, if we see these flags be careful not to treat them like -L
- -L[A-Z][A-Z]*:*)
- case $with_gcc/$host in
- no/*-*-irix* | /*-*-irix*)
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- ;;
- esac
- continue
- ;;
-
- -L*)
- func_stripname '-L' '' "$arg"
- dir=$func_stripname_result
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- absdir=`cd "$dir" && pwd`
- test -z "$absdir" && \
- func_fatal_error "cannot determine absolute directory name of \`$dir'"
- dir="$absdir"
- ;;
- esac
- case "$deplibs " in
- *" -L$dir "*) ;;
- *)
- deplibs="$deplibs -L$dir"
- lib_search_path="$lib_search_path $dir"
- ;;
- esac
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
- case :$dllsearchpath: in
- *":$dir:"*) ;;
- *) dllsearchpath="$dllsearchpath:$dir";;
- esac
- case :$dllsearchpath: in
- *":$testbindir:"*) ;;
- *) dllsearchpath="$dllsearchpath:$testbindir";;
- esac
- ;;
- esac
- continue
- ;;
-
- -l*)
- if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
- # These systems don't actually have a C or math library (as such)
- continue
- ;;
- *-*-os2*)
- # These systems don't actually have a C library (as such)
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc due to us having libc/libc_r.
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-rhapsody* | *-*-darwin1.[012])
- # Rhapsody C and math libraries are in the System framework
- deplibs="$deplibs System.ltframework"
- continue
- ;;
- *-*-sco3.2v5* | *-*-sco5v6*)
- # Causes problems with __ctype
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
- # Compiler inserts libc in the correct place for threads to work
- test "X$arg" = "X-lc" && continue
- ;;
- esac
- elif test "X$arg" = "X-lc_r"; then
- case $host in
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc_r directly, use -pthread flag.
- continue
- ;;
- esac
- fi
- deplibs="$deplibs $arg"
- continue
- ;;
-
- -module)
- module=yes
- continue
- ;;
-
- # Tru64 UNIX uses -model [arg] to determine the layout of C++
- # classes, name mangling, and exception handling.
- # Darwin uses the -arch flag to determine output architecture.
- -model|-arch|-isysroot)
- compile_command="$compile_command $arg"
- compiler_flags="$compiler_flags $arg"
- finalize_command="$finalize_command $arg"
- prev=xcompiler
- continue
- ;;
-
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
- compiler_flags="$compiler_flags $arg"
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- case "$new_inherited_linker_flags " in
- *" $arg "*) ;;
- * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
- esac
- continue
- ;;
-
- -multi_module)
- single_module="${wl}-multi_module"
- continue
- ;;
-
- -no-fast-install)
- fast_install=no
- continue
- ;;
-
- -no-install)
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- # The PATH hackery in wrapper scripts is required on Windows
- # in order for the loader to find any dlls it needs.
- func_warning "\`-no-install' is ignored for $host"
- func_warning "assuming \`-no-fast-install' instead"
- fast_install=no
- ;;
- *) no_install=yes ;;
- esac
- continue
- ;;
-
- -no-undefined)
- allow_undefined=no
- continue
- ;;
-
- -objectlist)
- prev=objectlist
- continue
- ;;
-
- -o) prev=output ;;
-
- -precious-files-regex)
- prev=precious_regex
- continue
- ;;
-
- -release)
- prev=release
- continue
- ;;
-
- -rpath)
- prev=rpath
- continue
- ;;
-
- -R)
- prev=xrpath
- continue
- ;;
-
- -R*)
- func_stripname '-R' '' "$arg"
- dir=$func_stripname_result
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- func_fatal_error "only absolute run-paths are allowed"
- ;;
- esac
- case "$xrpath " in
- *" $dir "*) ;;
- *) xrpath="$xrpath $dir" ;;
- esac
- continue
- ;;
-
- -shared)
- # The effects of -shared are defined in a previous loop.
- continue
- ;;
-
- -shrext)
- prev=shrext
- continue
- ;;
-
- -static)
- # The effects of -static are defined in a previous loop.
- # We used to do the same as -all-static on platforms that
- # didn't have a PIC flag, but the assumption that the effects
- # would be equivalent was wrong. It would break on at least
- # Digital Unix and AIX.
- continue
- ;;
-
- -thread-safe)
- thread_safe=yes
- continue
- ;;
-
- -version-info)
- prev=vinfo
- continue
- ;;
-
- -version-number)
- prev=vinfo
- vinfo_number=yes
- continue
- ;;
-
- -weak)
- prev=weak
- continue
- ;;
-
- -Wc,*)
- func_stripname '-Wc,' '' "$arg"
- args=$func_stripname_result
- arg=
- save_ifs="$IFS"; IFS=','
- for flag in $args; do
- IFS="$save_ifs"
- func_quote_for_eval "$flag"
- arg="$arg $wl$func_quote_for_eval_result"
- compiler_flags="$compiler_flags $func_quote_for_eval_result"
- done
- IFS="$save_ifs"
- func_stripname ' ' '' "$arg"
- arg=$func_stripname_result
- ;;
-
- -Wl,*)
- func_stripname '-Wl,' '' "$arg"
- args=$func_stripname_result
- arg=
- save_ifs="$IFS"; IFS=','
- for flag in $args; do
- IFS="$save_ifs"
- func_quote_for_eval "$flag"
- arg="$arg $wl$func_quote_for_eval_result"
- compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
- linker_flags="$linker_flags $func_quote_for_eval_result"
- done
- IFS="$save_ifs"
- func_stripname ' ' '' "$arg"
- arg=$func_stripname_result
- ;;
-
- -Xcompiler)
- prev=xcompiler
- continue
- ;;
-
- -Xlinker)
- prev=xlinker
- continue
- ;;
-
- -XCClinker)
- prev=xcclinker
- continue
- ;;
-
- # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
- # -r[0-9][0-9]* specifies the processor on the SGI compiler
- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
- # +DA*, +DD* enable 64-bit mode on the HP compiler
- # -q* pass through compiler args for the IBM compiler
- # -m*, -t[45]*, -txscale* pass through architecture-specific
- # compiler args for GCC
- # @file GCC response files
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
- -t[45]*|-txscale*|@*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- compiler_flags="$compiler_flags $arg"
- continue
- ;;
-
- # Some other compiler flag.
- -* | +*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- ;;
-
- *.$objext)
- # A standard object.
- objs="$objs $arg"
- ;;
-
- *.lo)
- # A libtool-controlled object.
-
- # Check to see that this really is a libtool object.
- if func_lalib_unsafe_p "$arg"; then
- pic_object=
- non_pic_object=
-
- # Read the .lo file
- func_source "$arg"
-
- if test -z "$pic_object" ||
- test -z "$non_pic_object" ||
- test "$pic_object" = none &&
- test "$non_pic_object" = none; then
- func_fatal_error "cannot find name of object for \`$arg'"
- fi
-
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- if test "$pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- pic_object="$xdir$pic_object"
-
- if test "$prev" = dlfiles; then
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $pic_object"
- prev=
- continue
- else
- # If libtool objects are unsupported, then we need to preload.
- prev=dlprefiles
- fi
- fi
-
- # CHECK ME: I think I busted this. -Ossama
- if test "$prev" = dlprefiles; then
- # Preload the old-style object.
- dlprefiles="$dlprefiles $pic_object"
- prev=
- fi
-
- # A PIC object.
- libobjs="$libobjs $pic_object"
- arg="$pic_object"
- fi
-
- # Non-PIC object.
- if test "$non_pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- non_pic_object="$xdir$non_pic_object"
-
- # A standard non-PIC object
- non_pic_objects="$non_pic_objects $non_pic_object"
- if test -z "$pic_object" || test "$pic_object" = none ; then
- arg="$non_pic_object"
- fi
- else
- # If the PIC object exists, use it instead.
- # $xdir was prepended to $pic_object above.
- non_pic_object="$pic_object"
- non_pic_objects="$non_pic_objects $non_pic_object"
- fi
- else
- # Only an error if not doing a dry-run.
- if $opt_dry_run; then
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- pic_object=`$ECHO "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
- non_pic_object=`$ECHO "X${xdir}${arg}" | $Xsed -e "$lo2o"`
- libobjs="$libobjs $pic_object"
- non_pic_objects="$non_pic_objects $non_pic_object"
- else
- func_fatal_error "\`$arg' is not a valid libtool object"
- fi
- fi
- ;;
-
- *.$libext)
- # An archive.
- deplibs="$deplibs $arg"
- old_deplibs="$old_deplibs $arg"
- continue
- ;;
-
- *.la)
- # A libtool-controlled library.
-
- if test "$prev" = dlfiles; then
- # This library was specified with -dlopen.
- dlfiles="$dlfiles $arg"
- prev=
- elif test "$prev" = dlprefiles; then
- # The library was specified with -dlpreopen.
- dlprefiles="$dlprefiles $arg"
- prev=
- else
- deplibs="$deplibs $arg"
- fi
- continue
- ;;
-
- # Some other compiler argument.
- *)
- # Unknown arguments in both finalize_command and compile_command need
- # to be aesthetically quoted because they are evaled later.
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- ;;
- esac # arg
-
- # Now actually substitute the argument into the commands.
- if test -n "$arg"; then
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- fi
- done # argument parsing loop
-
- test -n "$prev" && \
- func_fatal_help "the \`$prevarg' option requires an argument"
-
- if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
- eval arg=\"$export_dynamic_flag_spec\"
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- fi
-
- oldlibs=
- # calculate the name of the file, without its directory
- func_basename "$output"
- outputname="$func_basename_result"
- libobjs_save="$libobjs"
-
- if test -n "$shlibpath_var"; then
- # get the directories listed in $shlibpath_var
- eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
- else
- shlib_search_path=
- fi
- eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
- eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
-
- func_dirname "$output" "/" ""
- output_objdir="$func_dirname_result$objdir"
- # Create the object directory.
- func_mkdir_p "$output_objdir"
-
- # Determine the type of output
- case $output in
- "")
- func_fatal_help "you must specify an output file"
- ;;
- *.$libext) linkmode=oldlib ;;
- *.lo | *.$objext) linkmode=obj ;;
- *.la) linkmode=lib ;;
- *) linkmode=prog ;; # Anything else should be a program.
- esac
-
- specialdeplibs=
-
- libs=
- # Find all interdependent deplibs by searching for libraries
- # that are linked more than once (e.g. -la -lb -la)
- for deplib in $deplibs; do
- if $opt_duplicate_deps ; then
- case "$libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- libs="$libs $deplib"
- done
-
- if test "$linkmode" = lib; then
- libs="$predeps $libs $compiler_lib_search_path $postdeps"
-
- # Compute libraries that are listed more than once in $predeps
- # $postdeps and mark them as special (i.e., whose duplicates are
- # not to be eliminated).
- pre_post_deps=
- if $opt_duplicate_compiler_generated_deps; then
- for pre_post_dep in $predeps $postdeps; do
- case "$pre_post_deps " in
- *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
- esac
- pre_post_deps="$pre_post_deps $pre_post_dep"
- done
- fi
- pre_post_deps=
- fi
-
- deplibs=
- newdependency_libs=
- newlib_search_path=
- need_relink=no # whether we're linking any uninstalled libtool libraries
- notinst_deplibs= # not-installed libtool libraries
- notinst_path= # paths that contain not-installed libtool libraries
-
- case $linkmode in
- lib)
- passes="conv dlpreopen link"
- for file in $dlfiles $dlprefiles; do
- case $file in
- *.la) ;;
- *)
- func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
- ;;
- esac
- done
- ;;
- prog)
- compile_deplibs=
- finalize_deplibs=
- alldeplibs=no
- newdlfiles=
- newdlprefiles=
- passes="conv scan dlopen dlpreopen link"
- ;;
- *) passes="conv"
- ;;
- esac
-
- for pass in $passes; do
- # The preopen pass in lib mode reverses $deplibs; put it back here
- # so that -L comes before libs that need it for instance...
- if test "$linkmode,$pass" = "lib,link"; then
- ## FIXME: Find the place where the list is rebuilt in the wrong
- ## order, and fix it there properly
- tmp_deplibs=
- for deplib in $deplibs; do
- tmp_deplibs="$deplib $tmp_deplibs"
- done
- deplibs="$tmp_deplibs"
- fi
-
- if test "$linkmode,$pass" = "lib,link" ||
- test "$linkmode,$pass" = "prog,scan"; then
- libs="$deplibs"
- deplibs=
- fi
- if test "$linkmode" = prog; then
- case $pass in
- dlopen) libs="$dlfiles" ;;
- dlpreopen) libs="$dlprefiles" ;;
- link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
- esac
- fi
- if test "$linkmode,$pass" = "lib,dlpreopen"; then
- # Collect and forward deplibs of preopened libtool libs
- for lib in $dlprefiles; do
- # Ignore non-libtool-libs
- dependency_libs=
- case $lib in
- *.la) func_source "$lib" ;;
- esac
-
- # Collect preopened libtool deplibs, except any this library
- # has declared as weak libs
- for deplib in $dependency_libs; do
- deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
- case " $weak_libs " in
- *" $deplib_base "*) ;;
- *) deplibs="$deplibs $deplib" ;;
- esac
- done
- done
- libs="$dlprefiles"
- fi
- if test "$pass" = dlopen; then
- # Collect dlpreopened libraries
- save_deplibs="$deplibs"
- deplibs=
- fi
-
- for deplib in $libs; do
- lib=
- found=no
- case $deplib in
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- compiler_flags="$compiler_flags $deplib"
- if test "$linkmode" = lib ; then
- case "$new_inherited_linker_flags " in
- *" $deplib "*) ;;
- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
- esac
- fi
- fi
- continue
- ;;
- -l*)
- if test "$linkmode" != lib && test "$linkmode" != prog; then
- func_warning "\`-l' is ignored for archives/objects"
- continue
- fi
- func_stripname '-l' '' "$deplib"
- name=$func_stripname_result
- for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
- for search_ext in .la $std_shrext .so .a; do
- # Search the libtool library
- lib="$searchdir/lib${name}${search_ext}"
- if test -f "$lib"; then
- if test "$search_ext" = ".la"; then
- found=yes
- else
- found=no
- fi
- break 2
- fi
- done
- done
- if test "$found" != yes; then
- # deplib doesn't seem to be a libtool library
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
- fi
- continue
- else # deplib is a libtool library
- # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
- # We need to do some special things here, and not later.
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $deplib "*)
- if func_lalib_p "$lib"; then
- library_names=
- old_library=
- func_source "$lib"
- for l in $old_library $library_names; do
- ll="$l"
- done
- if test "X$ll" = "X$old_library" ; then # only static version available
- found=no
- func_dirname "$lib" "" "."
- ladir="$func_dirname_result"
- lib=$ladir/$old_library
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
- fi
- continue
- fi
- fi
- ;;
- *) ;;
- esac
- fi
- fi
- ;; # -l
- *.ltframework)
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- if test "$linkmode" = lib ; then
- case "$new_inherited_linker_flags " in
- *" $deplib "*) ;;
- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
- esac
- fi
- fi
- continue
- ;;
- -L*)
- case $linkmode in
- lib)
- deplibs="$deplib $deplibs"
- test "$pass" = conv && continue
- newdependency_libs="$deplib $newdependency_libs"
- func_stripname '-L' '' "$deplib"
- newlib_search_path="$newlib_search_path $func_stripname_result"
- ;;
- prog)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- continue
- fi
- if test "$pass" = scan; then
- deplibs="$deplib $deplibs"
- else
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- fi
- func_stripname '-L' '' "$deplib"
- newlib_search_path="$newlib_search_path $func_stripname_result"
- ;;
- *)
- func_warning "\`-L' is ignored for archives/objects"
- ;;
- esac # linkmode
- continue
- ;; # -L
- -R*)
- if test "$pass" = link; then
- func_stripname '-R' '' "$deplib"
- dir=$func_stripname_result
- # Make sure the xrpath contains only unique directories.
- case "$xrpath " in
- *" $dir "*) ;;
- *) xrpath="$xrpath $dir" ;;
- esac
- fi
- deplibs="$deplib $deplibs"
- continue
- ;;
- *.la) lib="$deplib" ;;
- *.$libext)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- continue
- fi
- case $linkmode in
- lib)
- # Linking convenience modules into shared libraries is allowed,
- # but linking other static libraries is non-portable.
- case " $dlpreconveniencelibs " in
- *" $lib "*) ;;
- *)
- valid_a_lib=no
- case $deplibs_check_method in
- match_pattern*)
- set dummy $deplibs_check_method; shift
- match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
- if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
- | $EGREP "$match_pattern_regex" > /dev/null; then
- valid_a_lib=yes
- fi
- ;;
- pass_all)
- valid_a_lib=yes
- ;;
- esac
- if test "$valid_a_lib" != yes; then
- $ECHO
- $ECHO "*** Warning: Trying to link with static lib archive $deplib."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have"
- $ECHO "*** because the file extensions .$libext of this argument makes me believe"
- $ECHO "*** that it is just a static archive that I should not use here."
- else
- $ECHO
- $ECHO "*** Warning: Linking the shared library $output against the"
- $ECHO "*** static library $deplib is not portable!"
- deplibs="$deplib $deplibs"
- fi
- ;;
- esac
- continue
- ;;
- prog)
- if test "$pass" != link; then
- deplibs="$deplib $deplibs"
- else
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- fi
- continue
- ;;
- esac # linkmode
- ;; # *.$libext
- *.lo | *.$objext)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- elif test "$linkmode" = prog; then
- if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
- # If there is no dlopen support or we're linking statically,
- # we need to preload.
- newdlprefiles="$newdlprefiles $deplib"
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- newdlfiles="$newdlfiles $deplib"
- fi
- fi
- continue
- ;;
- %DEPLIBS%)
- alldeplibs=yes
- continue
- ;;
- esac # case $deplib
-
- if test "$found" = yes || test -f "$lib"; then :
- else
- func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
- fi
-
- # Check to see that this really is a libtool archive.
- func_lalib_unsafe_p "$lib" \
- || func_fatal_error "\`$lib' is not a valid libtool archive"
-
- func_dirname "$lib" "" "."
- ladir="$func_dirname_result"
-
- dlname=
- dlopen=
- dlpreopen=
- libdir=
- library_names=
- old_library=
- inherited_linker_flags=
- # If the library was installed with an old release of libtool,
- # it will not redefine variables installed, or shouldnotlink
- installed=yes
- shouldnotlink=no
- avoidtemprpath=
-
-
- # Read the .la file
- func_source "$lib"
-
- # Convert "-framework foo" to "foo.ltframework"
- if test -n "$inherited_linker_flags"; then
- tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
- for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
- case " $new_inherited_linker_flags " in
- *" $tmp_inherited_linker_flag "*) ;;
- *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
- esac
- done
- fi
- dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
- finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
- else
- compiler_flags="$compiler_flags $inherited_linker_flags"
- fi
- if test "$linkmode,$pass" = "lib,link" ||
- test "$linkmode,$pass" = "prog,scan" ||
- { test "$linkmode" != prog && test "$linkmode" != lib; }; then
- test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
- test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
- fi
-
- if test "$pass" = conv; then
- # Only check for convenience libraries
- deplibs="$lib $deplibs"
- if test -z "$libdir"; then
- if test -z "$old_library"; then
- func_fatal_error "cannot find name of link library for \`$lib'"
- fi
- # It is a libtool convenience library, so add in its objects.
- convenience="$convenience $ladir/$objdir/$old_library"
- old_convenience="$old_convenience $ladir/$objdir/$old_library"
- elif test "$linkmode" != prog && test "$linkmode" != lib; then
- func_fatal_error "\`$lib' is not a convenience library"
- fi
- tmp_libs=
- for deplib in $dependency_libs; do
- deplibs="$deplib $deplibs"
- if $opt_duplicate_deps ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done
- continue
- fi # $pass = conv
-
-
- # Get the name of the library we link against.
- linklib=
- for l in $old_library $library_names; do
- linklib="$l"
- done
- if test -z "$linklib"; then
- func_fatal_error "cannot find name of link library for \`$lib'"
- fi
-
- # This library was specified with -dlopen.
- if test "$pass" = dlopen; then
- if test -z "$libdir"; then
- func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
- fi
- if test -z "$dlname" ||
- test "$dlopen_support" != yes ||
- test "$build_libtool_libs" = no; then
- # If there is no dlname, no dlopen support or we're linking
- # statically, we need to preload. We also need to preload any
- # dependent libraries so libltdl's deplib preloader doesn't
- # bomb out in the load deplibs phase.
- dlprefiles="$dlprefiles $lib $dependency_libs"
- else
- newdlfiles="$newdlfiles $lib"
- fi
- continue
- fi # $pass = dlopen
-
- # We need an absolute path.
- case $ladir in
- [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
- *)
- abs_ladir=`cd "$ladir" && pwd`
- if test -z "$abs_ladir"; then
- func_warning "cannot determine absolute directory name of \`$ladir'"
- func_warning "passing it literally to the linker, although it might fail"
- abs_ladir="$ladir"
- fi
- ;;
- esac
- func_basename "$lib"
- laname="$func_basename_result"
-
- # Find the relevant object directory and library name.
- if test "X$installed" = Xyes; then
- if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- func_warning "library \`$lib' was moved."
- dir="$ladir"
- absdir="$abs_ladir"
- libdir="$abs_ladir"
- else
- dir="$libdir"
- absdir="$libdir"
- fi
- test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
- else
- if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- dir="$ladir"
- absdir="$abs_ladir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
- else
- dir="$ladir/$objdir"
- absdir="$abs_ladir/$objdir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
- fi
- fi # $installed = yes
- func_stripname 'lib' '.la' "$laname"
- name=$func_stripname_result
-
- # This library was specified with -dlpreopen.
- if test "$pass" = dlpreopen; then
- if test -z "$libdir" && test "$linkmode" = prog; then
- func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
- fi
- # Prefer using a static library (so that no silly _DYNAMIC symbols
- # are required to link).
- if test -n "$old_library"; then
- newdlprefiles="$newdlprefiles $dir/$old_library"
- # Keep a list of preopened convenience libraries to check
- # that they are being used correctly in the link pass.
- test -z "$libdir" && \
- dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
- # Otherwise, use the dlname, so that lt_dlopen finds it.
- elif test -n "$dlname"; then
- newdlprefiles="$newdlprefiles $dir/$dlname"
- else
- newdlprefiles="$newdlprefiles $dir/$linklib"
- fi
- fi # $pass = dlpreopen
-
- if test -z "$libdir"; then
- # Link the convenience library
- if test "$linkmode" = lib; then
- deplibs="$dir/$old_library $deplibs"
- elif test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$dir/$old_library $compile_deplibs"
- finalize_deplibs="$dir/$old_library $finalize_deplibs"
- else
- deplibs="$lib $deplibs" # used for prog,scan pass
- fi
- continue
- fi
-
-
- if test "$linkmode" = prog && test "$pass" != link; then
- newlib_search_path="$newlib_search_path $ladir"
- deplibs="$lib $deplibs"
-
- linkalldeplibs=no
- if test "$link_all_deplibs" != no || test -z "$library_names" ||
- test "$build_libtool_libs" = no; then
- linkalldeplibs=yes
- fi
-
- tmp_libs=
- for deplib in $dependency_libs; do
- case $deplib in
- -L*) func_stripname '-L' '' "$deplib"
- newlib_search_path="$newlib_search_path $func_stripname_result"
- ;;
- esac
- # Need to link against all dependency_libs?
- if test "$linkalldeplibs" = yes; then
- deplibs="$deplib $deplibs"
- else
- # Need to hardcode shared library paths
- # or/and link against static libraries
- newdependency_libs="$deplib $newdependency_libs"
- fi
- if $opt_duplicate_deps ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done # for deplib
- continue
- fi # $linkmode = prog...
-
- if test "$linkmode,$pass" = "prog,link"; then
- if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
- # We need to hardcode the library path
- if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
- # Make sure the rpath contains only unique directories.
- case "$temp_rpath " in
- *"$absdir:"*) ;;
- *) temp_rpath="$temp_rpath$absdir:" ;;
- esac
- fi
-
- # Hardcode the library path.
- # Skip directories that are in the system default run-time
- # search path.
- case " $sys_lib_dlsearch_path " in
- *" $absdir "*) ;;
- *)
- case "$compile_rpath " in
- *" $absdir "*) ;;
- *) compile_rpath="$compile_rpath $absdir"
- esac
- ;;
- esac
- case " $sys_lib_dlsearch_path " in
- *" $libdir "*) ;;
- *)
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir"
- esac
- ;;
- esac
- fi # $linkmode,$pass = prog,link...
-
- if test "$alldeplibs" = yes &&
- { test "$deplibs_check_method" = pass_all ||
- { test "$build_libtool_libs" = yes &&
- test -n "$library_names"; }; }; then
- # We only need to search for static libraries
- continue
- fi
- fi
-
- link_static=no # Whether the deplib will be linked statically
- use_static_libs=$prefer_static_libs
- if test "$use_static_libs" = built && test "$installed" = yes; then
- use_static_libs=no
- fi
- if test -n "$library_names" &&
- { test "$use_static_libs" = no || test -z "$old_library"; }; then
- case $host in
- *cygwin* | *mingw*)
- # No point in relinking DLLs because paths are not encoded
- notinst_deplibs="$notinst_deplibs $lib"
- need_relink=no
- ;;
- *)
- if test "$installed" = no; then
- notinst_deplibs="$notinst_deplibs $lib"
- need_relink=yes
- fi
- ;;
- esac
- # This is a shared library
-
- # Warn about portability, can't link against -module's on some
- # systems (darwin). Don't bleat about dlopened modules though!
- dlopenmodule=""
- for dlpremoduletest in $dlprefiles; do
- if test "X$dlpremoduletest" = "X$lib"; then
- dlopenmodule="$dlpremoduletest"
- break
- fi
- done
- if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
- $ECHO
- if test "$linkmode" = prog; then
- $ECHO "*** Warning: Linking the executable $output against the loadable module"
- else
- $ECHO "*** Warning: Linking the shared library $output against the loadable module"
- fi
- $ECHO "*** $linklib is not portable!"
- fi
- if test "$linkmode" = lib &&
- test "$hardcode_into_libs" = yes; then
- # Hardcode the library path.
- # Skip directories that are in the system default run-time
- # search path.
- case " $sys_lib_dlsearch_path " in
- *" $absdir "*) ;;
- *)
- case "$compile_rpath " in
- *" $absdir "*) ;;
- *) compile_rpath="$compile_rpath $absdir"
- esac
- ;;
- esac
- case " $sys_lib_dlsearch_path " in
- *" $libdir "*) ;;
- *)
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir"
- esac
- ;;
- esac
- fi
-
- if test -n "$old_archive_from_expsyms_cmds"; then
- # figure out the soname
- set dummy $library_names
- shift
- realname="$1"
- shift
- libname=`eval "\\$ECHO \"$libname_spec\""`
- # use dlname if we got it. it's perfectly good, no?
- if test -n "$dlname"; then
- soname="$dlname"
- elif test -n "$soname_spec"; then
- # bleh windows
- case $host in
- *cygwin* | mingw*)
- major=`expr $current - $age`
- versuffix="-$major"
- ;;
- esac
- eval soname=\"$soname_spec\"
- else
- soname="$realname"
- fi
-
- # Make a new name for the extract_expsyms_cmds to use
- soroot="$soname"
- func_basename "$soroot"
- soname="$func_basename_result"
- func_stripname 'lib' '.dll' "$soname"
- newlib=libimp-$func_stripname_result.a
-
- # If the library has no export list, then create one now
- if test -f "$output_objdir/$soname-def"; then :
- else
- func_echo "extracting exported symbol list from \`$soname'"
- func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
- fi
-
- # Create $newlib
- if test -f "$output_objdir/$newlib"; then :; else
- func_echo "generating import library for \`$soname'"
- func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
- fi
- # make sure the library variables are pointing to the new library
- dir=$output_objdir
- linklib=$newlib
- fi # test -n "$old_archive_from_expsyms_cmds"
-
- if test "$linkmode" = prog || test "$mode" != relink; then
- add_shlibpath=
- add_dir=
- add=
- lib_linked=yes
- case $hardcode_action in
- immediate | unsupported)
- if test "$hardcode_direct" = no; then
- add="$dir/$linklib"
- case $host in
- *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
- *-*-sysv4*uw2*) add_dir="-L$dir" ;;
- *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
- *-*-unixware7*) add_dir="-L$dir" ;;
- *-*-darwin* )
- # if the lib is a (non-dlopened) module then we can not
- # link against it, someone is ignoring the earlier warnings
- if /usr/bin/file -L $add 2> /dev/null |
- $GREP ": [^:]* bundle" >/dev/null ; then
- if test "X$dlopenmodule" != "X$lib"; then
- $ECHO "*** Warning: lib $linklib is a module, not a shared library"
- if test -z "$old_library" ; then
- $ECHO
- $ECHO "*** And there doesn't seem to be a static archive available"
- $ECHO "*** The link will probably fail, sorry"
- else
- add="$dir/$old_library"
- fi
- elif test -n "$old_library"; then
- add="$dir/$old_library"
- fi
- fi
- esac
- elif test "$hardcode_minus_L" = no; then
- case $host in
- *-*-sunos*) add_shlibpath="$dir" ;;
- esac
- add_dir="-L$dir"
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = no; then
- add_shlibpath="$dir"
- add="-l$name"
- else
- lib_linked=no
- fi
- ;;
- relink)
- if test "$hardcode_direct" = yes; then
- add="$dir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$dir"
- # Try looking first in the location we're being installed to.
- if test -n "$inst_prefix_dir"; then
- case $libdir in
- [\\/]*)
- add_dir="$add_dir -L$inst_prefix_dir$libdir"
- ;;
- esac
- fi
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- add_shlibpath="$dir"
- add="-l$name"
- else
- lib_linked=no
- fi
- ;;
- *) lib_linked=no ;;
- esac
-
- if test "$lib_linked" != yes; then
- func_fatal_configuration "unsupported hardcode properties"
- fi
-
- if test -n "$add_shlibpath"; then
- case :$compile_shlibpath: in
- *":$add_shlibpath:"*) ;;
- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
- esac
- fi
- if test "$linkmode" = prog; then
- test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
- test -n "$add" && compile_deplibs="$add $compile_deplibs"
- else
- test -n "$add_dir" && deplibs="$add_dir $deplibs"
- test -n "$add" && deplibs="$add $deplibs"
- if test "$hardcode_direct" != yes &&
- test "$hardcode_minus_L" != yes &&
- test "$hardcode_shlibpath_var" = yes; then
- case :$finalize_shlibpath: in
- *":$libdir:"*) ;;
- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
- esac
- fi
- fi
- fi
-
- if test "$linkmode" = prog || test "$mode" = relink; then
- add_shlibpath=
- add_dir=
- add=
- # Finalize command for both is simple: just hardcode it.
- if test "$hardcode_direct" = yes; then
- add="$libdir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$libdir"
- add="-l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- case :$finalize_shlibpath: in
- *":$libdir:"*) ;;
- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
- esac
- add="-l$name"
- elif test "$hardcode_automatic" = yes; then
- if test -n "$inst_prefix_dir" &&
- test -f "$inst_prefix_dir$libdir/$linklib" ; then
- add="$inst_prefix_dir$libdir/$linklib"
- else
- add="$libdir/$linklib"
- fi
- else
- # We cannot seem to hardcode it, guess we'll fake it.
- add_dir="-L$libdir"
- # Try looking first in the location we're being installed to.
- if test -n "$inst_prefix_dir"; then
- case $libdir in
- [\\/]*)
- add_dir="$add_dir -L$inst_prefix_dir$libdir"
- ;;
- esac
- fi
- add="-l$name"
- fi
-
- if test "$linkmode" = prog; then
- test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
- test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
- else
- test -n "$add_dir" && deplibs="$add_dir $deplibs"
- test -n "$add" && deplibs="$add $deplibs"
- fi
- fi
- elif test "$linkmode" = prog; then
- # Here we assume that one of hardcode_direct or hardcode_minus_L
- # is not unsupported. This is valid on all known static and
- # shared platforms.
- if test "$hardcode_direct" != unsupported; then
- test -n "$old_library" && linklib="$old_library"
- compile_deplibs="$dir/$linklib $compile_deplibs"
- finalize_deplibs="$dir/$linklib $finalize_deplibs"
- else
- compile_deplibs="-l$name -L$dir $compile_deplibs"
- finalize_deplibs="-l$name -L$dir $finalize_deplibs"
- fi
- elif test "$build_libtool_libs" = yes; then
- # Not a shared library
- if test "$deplibs_check_method" != pass_all; then
- # We're trying link a shared library against a static one
- # but the system doesn't support it.
-
- # Just print a warning and add the library to dependency_libs so
- # that the program can be linked against the static library.
- $ECHO
- $ECHO "*** Warning: This system can not link to static lib archive $lib."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have."
- if test "$module" = yes; then
- $ECHO "*** But as you try to build a module library, libtool will still create "
- $ECHO "*** a static module, that should work as long as the dlopening application"
- $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
- if test -z "$global_symbol_pipe"; then
- $ECHO
- $ECHO "*** However, this would only work if libtool was able to extract symbol"
- $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
- $ECHO "*** not find such a program. So, this module is probably useless."
- $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
- fi
- if test "$build_old_libs" = no; then
- build_libtool_libs=module
- build_old_libs=yes
- else
- build_libtool_libs=no
- fi
- fi
- else
- deplibs="$dir/$old_library $deplibs"
- link_static=yes
- fi
- fi # link shared/static library?
-
- if test "$linkmode" = lib; then
- if test -n "$dependency_libs" &&
- { test "$hardcode_into_libs" != yes ||
- test "$build_old_libs" = yes ||
- test "$link_static" = yes; }; then
- # Extract -R from dependency_libs
- temp_deplibs=
- for libdir in $dependency_libs; do
- case $libdir in
- -R*) func_stripname '-R' '' "$libdir"
- temp_xrpath=$func_stripname_result
- case " $xrpath " in
- *" $temp_xrpath "*) ;;
- *) xrpath="$xrpath $temp_xrpath";;
- esac;;
- *) temp_deplibs="$temp_deplibs $libdir";;
- esac
- done
- dependency_libs="$temp_deplibs"
- fi
-
- newlib_search_path="$newlib_search_path $absdir"
- # Link against this library
- test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
- # ... and its dependency_libs
- tmp_libs=
- for deplib in $dependency_libs; do
- newdependency_libs="$deplib $newdependency_libs"
- if $opt_duplicate_deps ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done
-
- if test "$link_all_deplibs" != no; then
- # Add the search paths of all dependency libraries
- for deplib in $dependency_libs; do
- case $deplib in
- -L*) path="$deplib" ;;
- *.la)
- func_dirname "$deplib" "" "."
- dir="$func_dirname_result"
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
- *)
- absdir=`cd "$dir" && pwd`
- if test -z "$absdir"; then
- func_warning "cannot determine absolute directory name of \`$dir'"
- absdir="$dir"
- fi
- ;;
- esac
- if $GREP "^installed=no" $deplib > /dev/null; then
- case $host in
- *-*-darwin*)
- depdepl=
- eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
- if test -n "$deplibrary_names" ; then
- for tmp in $deplibrary_names ; do
- depdepl=$tmp
- done
- if test -f "$absdir/$objdir/$depdepl" ; then
- depdepl="$absdir/$objdir/$depdepl"
- darwin_install_name=`otool -L $depdepl | $SED -n -e '3q;2,2p' | $SED -e 's/(.*//'`
- darwin_install_name=`$ECHO $darwin_install_name`
- compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
- linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
- path=
- fi
- fi
- ;;
- *)
- path="-L$absdir/$objdir"
- ;;
- esac
- else
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- test -z "$libdir" && \
- func_fatal_error "\`$deplib' is not a valid libtool archive"
- test "$absdir" != "$libdir" && \
- func_warning "\`$deplib' seems to be moved"
-
- path="-L$absdir"
- fi
- ;;
- esac
- case " $deplibs " in
- *" $path "*) ;;
- *) deplibs="$path $deplibs" ;;
- esac
- done
- fi # link_all_deplibs != no
- fi # linkmode = lib
- done # for deplib in $libs
- dependency_libs="$newdependency_libs"
- if test "$pass" = dlpreopen; then
- # Link the dlpreopened libraries before other libraries
- for deplib in $save_deplibs; do
- deplibs="$deplib $deplibs"
- done
- fi
- if test "$pass" != dlopen; then
- if test "$pass" != conv; then
- # Make sure lib_search_path contains only unique directories.
- lib_search_path=
- for dir in $newlib_search_path; do
- case "$lib_search_path " in
- *" $dir "*) ;;
- *) lib_search_path="$lib_search_path $dir" ;;
- esac
- done
- newlib_search_path=
- fi
-
- if test "$linkmode,$pass" != "prog,link"; then
- vars="deplibs"
- else
- vars="compile_deplibs finalize_deplibs"
- fi
- for var in $vars dependency_libs; do
- # Add libraries to $var in reverse order
- eval tmp_libs=\"\$$var\"
- new_libs=
- for deplib in $tmp_libs; do
- # FIXME: Pedantically, this is the right thing to do, so
- # that some nasty dependency loop isn't accidentally
- # broken:
- #new_libs="$deplib $new_libs"
- # Pragmatically, this seems to cause very few problems in
- # practice:
- case $deplib in
- -L*) new_libs="$deplib $new_libs" ;;
- -R*) ;;
- *)
- # And here is the reason: when a library appears more
- # than once as an explicit dependence of a library, or
- # is implicitly linked in more than once by the
- # compiler, it is considered special, and multiple
- # occurrences thereof are not removed. Compare this
- # with having the same library being listed as a
- # dependency of multiple other libraries: in this case,
- # we know (pedantically, we assume) the library does not
- # need to be listed more than once, so we keep only the
- # last copy. This is not always right, but it is rare
- # enough that we require users that really mean to play
- # such unportable linking tricks to link the library
- # using -Wl,-lname, so that libtool does not consider it
- # for duplicate removal.
- case " $specialdeplibs " in
- *" $deplib "*) new_libs="$deplib $new_libs" ;;
- *)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$deplib $new_libs" ;;
- esac
- ;;
- esac
- ;;
- esac
- done
- tmp_libs=
- for deplib in $new_libs; do
- case $deplib in
- -L*)
- case " $tmp_libs " in
- *" $deplib "*) ;;
- *) tmp_libs="$tmp_libs $deplib" ;;
- esac
- ;;
- *) tmp_libs="$tmp_libs $deplib" ;;
- esac
- done
- eval $var=\"$tmp_libs\"
- done # for var
- fi
- # Last step: remove runtime libs from dependency_libs
- # (they stay in deplibs)
- tmp_libs=
- for i in $dependency_libs ; do
- case " $predeps $postdeps $compiler_lib_search_path " in
- *" $i "*)
- i=""
- ;;
- esac
- if test -n "$i" ; then
- tmp_libs="$tmp_libs $i"
- fi
- done
- dependency_libs=$tmp_libs
- done # for pass
- if test "$linkmode" = prog; then
- dlfiles="$newdlfiles"
- fi
- if test "$linkmode" = prog || test "$linkmode" = lib; then
- dlprefiles="$newdlprefiles"
- fi
-
- case $linkmode in
- oldlib)
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- func_warning "\`-dlopen' is ignored for archives"
- fi
-
- test -n "$deplibs" && \
- func_warning "\`-l' and \`-L' are ignored for archives"
-
-
- test -n "$rpath" && \
- func_warning "\`-rpath' is ignored for archives"
-
- test -n "$xrpath" && \
- func_warning "\`-R' is ignored for archives"
-
- test -n "$vinfo" && \
- func_warning "\`-version-info/-version-number' is ignored for archives"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for archives"
-
- test -n "$export_symbols$export_symbols_regex" && \
- func_warning "\`-export-symbols' is ignored for archives"
-
- # Now set the variables for building old libraries.
- build_libtool_libs=no
- oldlibs="$output"
- objs="$objs$old_deplibs"
- ;;
-
- lib)
- # Make sure we only generate libraries of the form `libNAME.la'.
- case $outputname in
- lib*)
- func_stripname 'lib' '.la' "$outputname"
- name=$func_stripname_result
- eval shared_ext=\"$shrext_cmds\"
- eval libname=\"$libname_spec\"
- ;;
- *)
- test "$module" = no && \
- func_fatal_help "libtool library \`$output' must begin with \`lib'"
-
- if test "$need_lib_prefix" != no; then
- # Add the "lib" prefix for modules if required
- func_stripname '' '.la' "$outputname"
- name=$func_stripname_result
- eval shared_ext=\"$shrext_cmds\"
- eval libname=\"$libname_spec\"
- else
- func_stripname '' '.la' "$outputname"
- libname=$func_stripname_result
- fi
- ;;
- esac
-
- if test -n "$objs"; then
- if test "$deplibs_check_method" != pass_all; then
- func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
- else
- $ECHO
- $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
- $ECHO "*** objects $objs is not portable!"
- libobjs="$libobjs $objs"
- fi
- fi
-
- test "$dlself" != no && \
- func_warning "\`-dlopen self' is ignored for libtool libraries"
-
- set dummy $rpath
- shift
- test "$#" -gt 1 && \
- func_warning "ignoring multiple \`-rpath's for a libtool library"
-
- install_libdir="$1"
-
- oldlibs=
- if test -z "$rpath"; then
- if test "$build_libtool_libs" = yes; then
- # Building a libtool convenience library.
- # Some compilers have problems with a `.al' extension so
- # convenience libraries should have the same extension an
- # archive normally would.
- oldlibs="$output_objdir/$libname.$libext $oldlibs"
- build_libtool_libs=convenience
- build_old_libs=yes
- fi
-
- test -n "$vinfo" && \
- func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for convenience libraries"
- else
-
- # Parse the version information argument.
- save_ifs="$IFS"; IFS=':'
- set dummy $vinfo 0 0 0
- shift
- IFS="$save_ifs"
-
- test -n "$7" && \
- func_fatal_help "too many parameters to \`-version-info'"
-
- # convert absolute version numbers to libtool ages
- # this retains compatibility with .la files and attempts
- # to make the code below a bit more comprehensible
-
- case $vinfo_number in
- yes)
- number_major="$1"
- number_minor="$2"
- number_revision="$3"
- #
- # There are really only two kinds -- those that
- # use the current revision as the major version
- # and those that subtract age and use age as
- # a minor version. But, then there is irix
- # which has an extra 1 added just for fun
- #
- case $version_type in
- darwin|linux|osf|windows)
- current=`expr $number_major + $number_minor`
- age="$number_minor"
- revision="$number_revision"
- ;;
- freebsd-aout|freebsd-elf|sunos)
- current="$number_major"
- revision="$number_minor"
- age="0"
- ;;
- irix|nonstopux)
- current=`expr $number_major + $number_minor - 1`
- age="$number_minor"
- revision="$number_minor"
- ;;
- esac
- ;;
- no)
- current="$1"
- revision="$2"
- age="$3"
- ;;
- esac
-
- # Check that each of the things are valid numbers.
- case $current in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- func_error "CURRENT \`$current' must be a nonnegative integer"
- func_fatal_error "\`$vinfo' is not valid version information"
- ;;
- esac
-
- case $revision in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- func_error "REVISION \`$revision' must be a nonnegative integer"
- func_fatal_error "\`$vinfo' is not valid version information"
- ;;
- esac
-
- case $age in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- func_error "AGE \`$age' must be a nonnegative integer"
- func_fatal_error "\`$vinfo' is not valid version information"
- ;;
- esac
-
- if test "$age" -gt "$current"; then
- func_error "AGE \`$age' is greater than the current interface number \`$current'"
- func_fatal_error "\`$vinfo' is not valid version information"
- fi
-
- # Calculate the version variables.
- major=
- versuffix=
- verstring=
- case $version_type in
- none) ;;
-
- darwin)
- # Like Linux, but with the current version available in
- # verstring for coding it into the library header
- major=.`expr $current - $age`
- versuffix="$major.$age.$revision"
- # Darwin ld doesn't like 0 for these options...
- minor_current=`expr $current + 1`
- verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
- ;;
-
- freebsd-aout)
- major=".$current"
- versuffix=".$current.$revision";
- ;;
-
- freebsd-elf)
- major=".$current"
- versuffix=".$current"
- ;;
-
- irix | nonstopux)
- major=`expr $current - $age + 1`
-
- case $version_type in
- nonstopux) verstring_prefix=nonstopux ;;
- *) verstring_prefix=sgi ;;
- esac
- verstring="$verstring_prefix$major.$revision"
-
- # Add in all the interfaces that we are compatible with.
- loop=$revision
- while test "$loop" -ne 0; do
- iface=`expr $revision - $loop`
- loop=`expr $loop - 1`
- verstring="$verstring_prefix$major.$iface:$verstring"
- done
-
- # Before this point, $major must not contain `.'.
- major=.$major
- versuffix="$major.$revision"
- ;;
-
- linux)
- major=.`expr $current - $age`
- versuffix="$major.$age.$revision"
- ;;
-
- osf)
- major=.`expr $current - $age`
- versuffix=".$current.$age.$revision"
- verstring="$current.$age.$revision"
-
- # Add in all the interfaces that we are compatible with.
- loop=$age
- while test "$loop" -ne 0; do
- iface=`expr $current - $loop`
- loop=`expr $loop - 1`
- verstring="$verstring:${iface}.0"
- done
-
- # Make executables depend on our current version.
- verstring="$verstring:${current}.0"
- ;;
-
- qnx)
- major=".$current"
- versuffix=".$current"
- ;;
-
- sunos)
- major=".$current"
- versuffix=".$current.$revision"
- ;;
-
- windows)
- # Use '-' rather than '.', since we only want one
- # extension on DOS 8.3 filesystems.
- major=`expr $current - $age`
- versuffix="-$major"
- ;;
-
- *)
- func_fatal_configuration "unknown library version type \`$version_type'"
- ;;
- esac
-
- # Clear the version info if we defaulted, and they specified a release.
- if test -z "$vinfo" && test -n "$release"; then
- major=
- case $version_type in
- darwin)
- # we can't check for "0.0" in archive_cmds due to quoting
- # problems, so we reset it completely
- verstring=
- ;;
- *)
- verstring="0.0"
- ;;
- esac
- if test "$need_version" = no; then
- versuffix=
- else
- versuffix=".0.0"
- fi
- fi
-
- # Remove version info from name if versioning should be avoided
- if test "$avoid_version" = yes && test "$need_version" = no; then
- major=
- versuffix=
- verstring=""
- fi
-
- # Check to see if the archive will have undefined symbols.
- if test "$allow_undefined" = yes; then
- if test "$allow_undefined_flag" = unsupported; then
- func_warning "undefined symbols not allowed in $host shared libraries"
- build_libtool_libs=no
- build_old_libs=yes
- fi
- else
- # Don't allow undefined symbols.
- allow_undefined_flag="$no_undefined_flag"
- fi
-
- fi
-
- func_generate_dlsyms "$libname" "$libname" "yes"
- libobjs="$libobjs $symfileobj"
-
- if test "$mode" != relink; then
- # Remove our outputs, but don't remove object files since they
- # may have been created when compiling PIC objects.
- removelist=
- tempremovelist=`$ECHO "$output_objdir/*"`
- for p in $tempremovelist; do
- case $p in
- *.$objext)
- ;;
- $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
- if test "X$precious_files_regex" != "X"; then
- if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
- then
- continue
- fi
- fi
- removelist="$removelist $p"
- ;;
- *) ;;
- esac
- done
- test -n "$removelist" && \
- func_show_eval "${RM}r \$removelist"
- fi
-
- # Now set the variables for building old libraries.
- if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
- oldlibs="$oldlibs $output_objdir/$libname.$libext"
-
- # Transform .lo files to .o files.
- oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
- fi
-
- # Eliminate all temporary directories.
- for path in $notinst_path; do
- lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e 's% $path % %g'`
- deplibs=`$ECHO "X$deplibs " | $Xsed -e 's% -L$path % %g'`
- dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e 's% -L$path % %g'`
- done
-
- if test -n "$xrpath"; then
- # If the user specified any rpath flags, then add them.
- temp_xrpath=
- for libdir in $xrpath; do
- temp_xrpath="$temp_xrpath -R$libdir"
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir" ;;
- esac
- done
- if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
- dependency_libs="$temp_xrpath $dependency_libs"
- fi
- fi
-
- # Make sure dlfiles contains only unique files that won't be dlpreopened
- old_dlfiles="$dlfiles"
- dlfiles=
- for lib in $old_dlfiles; do
- case " $dlprefiles $dlfiles " in
- *" $lib "*) ;;
- *) dlfiles="$dlfiles $lib" ;;
- esac
- done
-
- # Make sure dlprefiles contains only unique files
- old_dlprefiles="$dlprefiles"
- dlprefiles=
- for lib in $old_dlprefiles; do
- case "$dlprefiles " in
- *" $lib "*) ;;
- *) dlprefiles="$dlprefiles $lib" ;;
- esac
- done
-
- if test "$build_libtool_libs" = yes; then
- if test -n "$rpath"; then
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
- # these systems don't actually have a c library (as such)!
- ;;
- *-*-rhapsody* | *-*-darwin1.[012])
- # Rhapsody C library is in the System framework
- deplibs="$deplibs System.ltframework"
- ;;
- *-*-netbsd*)
- # Don't link with libc until the a.out ld.so is fixed.
- ;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc due to us having libc/libc_r.
- ;;
- *-*-sco3.2v5* | *-*-sco5v6*)
- # Causes problems with __ctype
- ;;
- *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
- # Compiler inserts libc in the correct place for threads to work
- ;;
- *)
- # Add libc to deplibs on all other systems if necessary.
- if test "$build_libtool_need_lc" = "yes"; then
- deplibs="$deplibs -lc"
- fi
- ;;
- esac
- fi
-
- # Transform deplibs into only deplibs that can be linked in shared.
- name_save=$name
- libname_save=$libname
- release_save=$release
- versuffix_save=$versuffix
- major_save=$major
- # I'm not sure if I'm treating the release correctly. I think
- # release should show up in the -l (ie -lgmp5) so we don't want to
- # add it in twice. Is that correct?
- release=""
- versuffix=""
- major=""
- newdeplibs=
- droppeddeps=no
- case $deplibs_check_method in
- pass_all)
- # Don't check for shared/static. Everything works.
- # This might be a little naive. We might want to check
- # whether the library exists or not. But this is on
- # osf3 & osf4 and I'm not really sure... Just
- # implementing what was already the behavior.
- newdeplibs=$deplibs
- ;;
- test_compile)
- # This code stresses the "libraries are programs" paradigm to its
- # limits. Maybe even breaks it. We compile a program, linking it
- # against the deplibs as a proxy for the library. Then we can check
- # whether they linked in statically or dynamically with ldd.
- $opt_dry_run || $RM conftest.c
- cat > conftest.c <<EOF
- int main() { return 0; }
-EOF
- $opt_dry_run || $RM conftest
- $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
- if test "$?" -eq 0 ; then
- ldd_output=`ldd conftest`
- for i in $deplibs; do
- name=`expr $i : '-l\(.*\)'`
- # If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" -ne "0"; then
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $i "*)
- newdeplibs="$newdeplibs $i"
- i=""
- ;;
- esac
- fi
- if test -n "$i" ; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
- set dummy $deplib_matches; shift
- deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: dynamic linker does not accept needed library $i."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which I believe you do not have"
- $ECHO "*** because a test_compile did reveal that the linker did not use it for"
- $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
- fi
- fi
- else
- newdeplibs="$newdeplibs $i"
- fi
- done
- else
- # Error occurred in the first compile. Let's try to salvage
- # the situation: Compile a separate program for each library.
- for i in $deplibs; do
- name=`expr $i : '-l\(.*\)'`
- # If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" != "0"; then
- $opt_dry_run || $RM conftest
- $LTCC $LTCFLAGS -o conftest conftest.c $i
- # Did it work?
- if test "$?" -eq 0 ; then
- ldd_output=`ldd conftest`
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $i "*)
- newdeplibs="$newdeplibs $i"
- i=""
- ;;
- esac
- fi
- if test -n "$i" ; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
- set dummy $deplib_matches; shift
- deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: dynamic linker does not accept needed library $i."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have"
- $ECHO "*** because a test_compile did reveal that the linker did not use this one"
- $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
- fi
- fi
- else
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
- $ECHO "*** make it link in! You will probably need to install it or some"
- $ECHO "*** library that it depends on before this library will be fully"
- $ECHO "*** functional. Installing it before continuing would be even better."
- fi
- else
- newdeplibs="$newdeplibs $i"
- fi
- done
- fi
- ;;
- file_magic*)
- set dummy $deplibs_check_method; shift
- file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
- for a_deplib in $deplibs; do
- name=`expr $a_deplib : '-l\(.*\)'`
- # If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" != "0"; then
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $a_deplib "*)
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- ;;
- esac
- fi
- if test -n "$a_deplib" ; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
- for potent_lib in $potential_libs; do
- # Follow soft links.
- if ls -lLd "$potent_lib" 2>/dev/null |
- $GREP " -> " >/dev/null; then
- continue
- fi
- # The statement above tries to avoid entering an
- # endless loop below, in case of cyclic links.
- # We might still enter an endless loop, since a link
- # loop can be closed while we follow links,
- # but so what?
- potlib="$potent_lib"
- while test -h "$potlib" 2>/dev/null; do
- potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
- case $potliblink in
- [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
- *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
- esac
- done
- if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
- $SED -e 10q |
- $EGREP "$file_magic_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- break 2
- fi
- done
- done
- fi
- if test -n "$a_deplib" ; then
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have"
- $ECHO "*** because I did check the linker path looking for a file starting"
- if test -z "$potlib" ; then
- $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
- else
- $ECHO "*** with $libname and none of the candidates passed a file format test"
- $ECHO "*** using a file magic. Last file checked: $potlib"
- fi
- fi
- else
- # Add a -L argument.
- newdeplibs="$newdeplibs $a_deplib"
- fi
- done # Gone through all deplibs.
- ;;
- match_pattern*)
- set dummy $deplibs_check_method; shift
- match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
- for a_deplib in $deplibs; do
- name=`expr $a_deplib : '-l\(.*\)'`
- # If $name is empty we are operating on a -L argument.
- if test -n "$name" && test "$name" != "0"; then
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $a_deplib "*)
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- ;;
- esac
- fi
- if test -n "$a_deplib" ; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
- for potent_lib in $potential_libs; do
- potlib="$potent_lib" # see symlink-check above in file_magic test
- if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
- $EGREP "$match_pattern_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- break 2
- fi
- done
- done
- fi
- if test -n "$a_deplib" ; then
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
- $ECHO "*** I have the capability to make that library automatically link in when"
- $ECHO "*** you link to this library. But I can only do this if you have a"
- $ECHO "*** shared version of the library, which you do not appear to have"
- $ECHO "*** because I did check the linker path looking for a file starting"
- if test -z "$potlib" ; then
- $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
- else
- $ECHO "*** with $libname and none of the candidates passed a file format test"
- $ECHO "*** using a regex pattern. Last file checked: $potlib"
- fi
- fi
- else
- # Add a -L argument.
- newdeplibs="$newdeplibs $a_deplib"
- fi
- done # Gone through all deplibs.
- ;;
- none | unknown | *)
- newdeplibs=""
- tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
- -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- for i in $predeps $postdeps ; do
- # can't use Xsed below, because $i might contain '/'
- tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
- done
- fi
- if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
- $GREP . >/dev/null; then
- $ECHO
- if test "X$deplibs_check_method" = "Xnone"; then
- $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
- else
- $ECHO "*** Warning: inter-library dependencies are not known to be supported."
- fi
- $ECHO "*** All declared inter-library dependencies are being dropped."
- droppeddeps=yes
- fi
- ;;
- esac
- versuffix=$versuffix_save
- major=$major_save
- release=$release_save
- libname=$libname_save
- name=$name_save
-
- case $host in
- *-*-rhapsody* | *-*-darwin1.[012])
- # On Rhapsody replace the C library with the System framework
- newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
- ;;
- esac
-
- if test "$droppeddeps" = yes; then
- if test "$module" = yes; then
- $ECHO
- $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
- $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
- $ECHO "*** a static module, that should work as long as the dlopening"
- $ECHO "*** application is linked with the -dlopen flag."
- if test -z "$global_symbol_pipe"; then
- $ECHO
- $ECHO "*** However, this would only work if libtool was able to extract symbol"
- $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
- $ECHO "*** not find such a program. So, this module is probably useless."
- $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
- fi
- if test "$build_old_libs" = no; then
- oldlibs="$output_objdir/$libname.$libext"
- build_libtool_libs=module
- build_old_libs=yes
- else
- build_libtool_libs=no
- fi
- else
- $ECHO "*** The inter-library dependencies that have been dropped here will be"
- $ECHO "*** automatically added whenever a program is linked with this library"
- $ECHO "*** or is declared to -dlopen it."
-
- if test "$allow_undefined" = no; then
- $ECHO
- $ECHO "*** Since this library must not contain undefined symbols,"
- $ECHO "*** because either the platform does not support them or"
- $ECHO "*** it was explicitly requested with -no-undefined,"
- $ECHO "*** libtool will only create a static version of it."
- if test "$build_old_libs" = no; then
- oldlibs="$output_objdir/$libname.$libext"
- build_libtool_libs=module
- build_old_libs=yes
- else
- build_libtool_libs=no
- fi
- fi
- fi
- fi
- # Done checking deplibs!
- deplibs=$newdeplibs
- fi
- # Time to change all our "foo.ltframework" stuff back to "-framework foo"
- case $host in
- *-*-darwin*)
- newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- ;;
- esac
-
- # move library search paths that coincide with paths to not yet
- # installed libraries to the beginning of the library search list
- new_libs=
- for path in $notinst_path; do
- case " $new_libs " in
- *" -L$path/$objdir "*) ;;
- *)
- case " $deplibs " in
- *" -L$path/$objdir "*)
- new_libs="$new_libs -L$path/$objdir" ;;
- esac
- ;;
- esac
- done
- for deplib in $deplibs; do
- case $deplib in
- -L*)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- done
- deplibs="$new_libs"
-
- # All the library-specific variables (install_libdir is set above).
- library_names=
- old_library=
- dlname=
-
- # Test again, we may have decided not to build it any more
- if test "$build_libtool_libs" = yes; then
- if test "$hardcode_into_libs" = yes; then
- # Hardcode the library paths
- hardcode_libdirs=
- dep_rpath=
- rpath="$finalize_rpath"
- test "$mode" != relink && rpath="$compile_rpath$rpath"
- for libdir in $rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- dep_rpath="$dep_rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- if test -n "$hardcode_libdir_flag_spec_ld"; then
- eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
- else
- eval dep_rpath=\"$hardcode_libdir_flag_spec\"
- fi
- fi
- if test -n "$runpath_var" && test -n "$perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $perm_rpath; do
- rpath="$rpath$dir:"
- done
- eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
- fi
- test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
- fi
-
- shlibpath="$finalize_shlibpath"
- test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
- if test -n "$shlibpath"; then
- eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
- fi
-
- # Get the real and link names of the library.
- eval shared_ext=\"$shrext_cmds\"
- eval library_names=\"$library_names_spec\"
- set dummy $library_names
- shift
- realname="$1"
- shift
-
- if test -n "$soname_spec"; then
- eval soname=\"$soname_spec\"
- else
- soname="$realname"
- fi
- if test -z "$dlname"; then
- dlname=$soname
- fi
-
- lib="$output_objdir/$realname"
- linknames=
- for link
- do
- linknames="$linknames $link"
- done
-
- # Use standard objects if they are pic
- test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-
- delfiles=
- if test -n "$export_symbols" && test -n "$include_expsyms"; then
- $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
- export_symbols="$output_objdir/$libname.uexp"
- delfiles="$delfiles $export_symbols"
- fi
-
- orig_export_symbols=
- case $host_os in
- cygwin* | mingw*)
- if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
- # exporting using user supplied symfile
- if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
- # and it's NOT already a .def file. Must figure out
- # which of the given symbols are data symbols and tag
- # them as such. So, trigger use of export_symbols_cmds.
- # export_symbols gets reassigned inside the "prepare
- # the list of exported symbols" if statement, so the
- # include_expsyms logic still works.
- orig_export_symbols="$export_symbols"
- export_symbols=
- always_export_symbols=yes
- fi
- fi
- ;;
- esac
-
- # Prepare the list of exported symbols
- if test -z "$export_symbols"; then
- if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
- func_echo "generating symbol list for \`$libname.la'"
- export_symbols="$output_objdir/$libname.exp"
- $opt_dry_run || $RM $export_symbols
- cmds=$export_symbols_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- if len=`expr "X$cmd" : ".*"` &&
- test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- func_show_eval "$cmd" 'exit $?'
- skipped_export=false
- else
- # The command line is too long to execute in one step.
- func_echo "using reloadable object file for export list..."
- skipped_export=:
- # Break out early, otherwise skipped_export may be
- # set to false by a later but shorter cmd.
- break
- fi
- done
- IFS="$save_ifs"
- if test -n "$export_symbols_regex"; then
- func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
- func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
- fi
- fi
- fi
-
- if test -n "$export_symbols" && test -n "$include_expsyms"; then
- tmp_export_symbols="$export_symbols"
- test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
- $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
- fi
-
- if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
- # The given exports_symbols file has to be filtered, so filter it.
- func_echo "filter symbol list for \`$libname.la' to tag DATA exports"
- # FIXME: $output_objdir/$libname.filter potentially contains lots of
- # 's' commands which not all seds can handle. GNU sed should be fine
- # though. Also, the filter scales superlinearly with the number of
- # global variables. join(1) would be nice here, but unfortunately
- # isn't a blessed tool.
- $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
- export_symbols=$output_objdir/$libname.def
- $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
- fi
-
- tmp_deplibs=
- for test_deplib in $deplibs; do
- case " $convenience " in
- *" $test_deplib "*) ;;
- *)
- tmp_deplibs="$tmp_deplibs $test_deplib"
- ;;
- esac
- done
- deplibs="$tmp_deplibs"
-
- if test -n "$convenience"; then
- if test -n "$whole_archive_flag_spec"; then
- save_libobjs=$libobjs
- eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
- else
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $convenience
- libobjs="$libobjs $func_extract_archives_result"
- fi
- fi
-
- if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
- eval flag=\"$thread_safe_flag_spec\"
- linker_flags="$linker_flags $flag"
- fi
-
- # Make a backup of the uninstalled library when relinking
- if test "$mode" = relink; then
- $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
- fi
-
- # Do each of the archive commands.
- if test "$module" = yes && test -n "$module_cmds" ; then
- if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
- eval test_cmds=\"$module_expsym_cmds\"
- cmds=$module_expsym_cmds
- else
- eval test_cmds=\"$module_cmds\"
- cmds=$module_cmds
- fi
- else
- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- eval test_cmds=\"$archive_expsym_cmds\"
- cmds=$archive_expsym_cmds
- else
- eval test_cmds=\"$archive_cmds\"
- cmds=$archive_cmds
- fi
- fi
-
- if test "X$skipped_export" != "X:" &&
- len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
- test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- :
- else
- # The command line is too long to link in one step, link piecewise
- # or, if using GNU ld and skipped_export is not :, use a linker
- # script.
-
- # Save the value of $output and $libobjs because we want to
- # use them later. If we have whole_archive_flag_spec, we
- # want to use save_libobjs as it was before
- # whole_archive_flag_spec was expanded, because we can't
- # assume the linker understands whole_archive_flag_spec.
- # This may have to be revisited, in case too many
- # convenience libraries get linked in and end up exceeding
- # the spec.
- if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
- save_libobjs=$libobjs
- fi
- save_output=$output
- output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
-
- # Clear the reloadable object creation command queue and
- # initialize k to one.
- test_cmds=
- concat_cmds=
- objlist=
- last_robj=
- k=1
-
- if test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
- output=${output_objdir}/${output_la}.lnkscript
- func_echo "creating GNU ld script: $output"
- $ECHO 'INPUT (' > $output
- for obj in $save_libobjs
- do
- $ECHO \""$obj"\" >> $output
- done
- $ECHO ')' >> $output
- delfiles="$delfiles $output"
- elif test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
- output=${output_objdir}/${output_la}.lnk
- func_echo "creating linker input file list: $output"
- : > $output
- for obj in $save_libobjs
- do
- $ECHO "$obj" >> $output
- done
- delfiles="$delfiles $output"
- output=\"$file_list_spec$output\"
- else
- func_echo "creating reloadable object files..."
- output=$output_objdir/$output_la-${k}.$objext
- # Loop over the list of objects to be linked.
- for obj in $save_libobjs
- do
- eval test_cmds=\"$reload_cmds $objlist $last_robj\"
- if test "X$objlist" = X ||
- { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
- test "$len" -le "$max_cmd_len"; }; then
- objlist="$objlist $obj"
- else
- # The command $test_cmds is almost too long, add a
- # command to the queue.
- if test "$k" -eq 1 ; then
- # The first file doesn't have a previous command to add.
- eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
- else
- # All subsequent reloadable object files will link in
- # the last one created.
- eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
- fi
- last_robj=$output_objdir/$output_la-${k}.$objext
- k=`expr $k + 1`
- output=$output_objdir/$output_la-${k}.$objext
- objlist=$obj
- len=1
- fi
- done
- # Handle the remaining objects by creating one last
- # reloadable object file. All subsequent reloadable object
- # files will link in the last one created.
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
-
- if ${skipped_export-false}; then
- func_echo "generating symbol list for \`$libname.la'"
- export_symbols="$output_objdir/$libname.exp"
- $opt_dry_run || $RM $export_symbols
- libobjs=$output
- # Append the command to create the export file.
- eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
- fi
-
- # Set up a command to remove the reloadable object files
- # after they are used.
- i=0
- while test "$i" -lt "$k"
- do
- i=`expr $i + 1`
- delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
- done
-
- func_echo "creating a temporary reloadable object file: $output"
-
- # Loop through the commands generated above and execute them.
- save_ifs="$IFS"; IFS='~'
- for cmd in $concat_cmds; do
- IFS="$save_ifs"
- $opt_silent || {
- func_quote_for_expand "$cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
- $opt_dry_run || eval "$cmd" || {
- lt_exit=$?
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- ( cd "$output_objdir" && \
- $RM "${realname}T" && \
- $MV "${realname}U" "$realname" )
- fi
-
- exit $lt_exit
- }
- done
- IFS="$save_ifs"
- fi
-
- libobjs=$output
- # Restore the value of output.
- output=$save_output
-
- if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
- eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
- fi
- # Expand the library linking commands again to reset the
- # value of $libobjs for piecewise linking.
-
- # Do each of the archive commands.
- if test "$module" = yes && test -n "$module_cmds" ; then
- if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
- cmds=$module_expsym_cmds
- else
- cmds=$module_cmds
- fi
- else
- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- cmds=$archive_expsym_cmds
- else
- cmds=$archive_cmds
- fi
- fi
- fi
-
- if test -n "$delfiles"; then
- # Append the command to remove temporary files to $cmds.
- eval cmds=\"\$cmds~\$RM $delfiles\"
- fi
-
- # Add any objects from preloaded convenience libraries
- if test -n "$dlprefiles"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $dlprefiles
- libobjs="$libobjs $func_extract_archives_result"
- fi
-
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $opt_silent || {
- func_quote_for_expand "$cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
- $opt_dry_run || eval "$cmd" || {
- lt_exit=$?
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- ( cd "$output_objdir" && \
- $RM "${realname}T" && \
- $MV "${realname}U" "$realname" )
- fi
-
- exit $lt_exit
- }
- done
- IFS="$save_ifs"
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
-
- if test -n "$convenience"; then
- if test -z "$whole_archive_flag_spec"; then
- func_show_eval '${RM}r "$gentop"'
- fi
- fi
-
- exit $EXIT_SUCCESS
- fi
-
- # Create links to the real library.
- for linkname in $linknames; do
- if test "$realname" != "$linkname"; then
- func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
- fi
- done
-
- # If -module or -export-dynamic was specified, set the dlname.
- if test "$module" = yes || test "$export_dynamic" = yes; then
- # On all known operating systems, these are identical.
- dlname="$soname"
- fi
- fi
- ;;
-
- obj)
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- func_warning "\`-dlopen' is ignored for objects"
- fi
-
- test -n "$deplibs" && \
- func_warning "\`-l' and \`-L' are ignored for objects"
-
- test -n "$rpath" && \
- func_warning "\`-rpath' is ignored for objects"
-
- test -n "$xrpath" && \
- func_warning "\`-R' is ignored for objects"
-
- test -n "$vinfo" && \
- func_warning "\`-version-info' is ignored for objects"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for objects"
-
- case $output in
- *.lo)
- test -n "$objs$old_deplibs" && \
- func_fatal_error "cannot build library object \`$output' from non-libtool objects"
-
- libobj="$output"
- obj=`$ECHO "X$output" | $Xsed -e "$lo2o"`
- ;;
- *)
- libobj=
- obj="$output"
- ;;
- esac
-
- # Delete the old objects.
- $opt_dry_run || $RM $obj $libobj
-
- # Objects from convenience libraries. This assumes
- # single-version convenience libraries. Whenever we create
- # different ones for PIC/non-PIC, this we'll have to duplicate
- # the extraction.
- reload_conv_objs=
- gentop=
- # reload_cmds runs $LD directly, so let us get rid of
- # -Wl from whole_archive_flag_spec
- wl=
-
- if test -n "$convenience"; then
- if test -n "$whole_archive_flag_spec"; then
- eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
- else
- gentop="$output_objdir/${obj}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $convenience
- reload_conv_objs="$reload_objs $func_extract_archives_result"
- fi
- fi
-
- # Create the old-style object.
- reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
-
- output="$obj"
- func_execute_cmds "$reload_cmds" 'exit $?'
-
- # Exit if we aren't doing a library object file.
- if test -z "$libobj"; then
- if test -n "$gentop"; then
- func_show_eval '${RM}r "$gentop"'
- fi
-
- exit $EXIT_SUCCESS
- fi
-
- if test "$build_libtool_libs" != yes; then
- if test -n "$gentop"; then
- func_show_eval '${RM}r "$gentop"'
- fi
-
- # Create an invalid libtool object if no PIC, so that we don't
- # accidentally link it into a program.
- # $show "echo timestamp > $libobj"
- # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
- exit $EXIT_SUCCESS
- fi
-
- if test -n "$pic_flag" || test "$pic_mode" != default; then
- # Only do commands if we really have different PIC objects.
- reload_objs="$libobjs $reload_conv_objs"
- output="$libobj"
- func_execute_cmds "$reload_cmds" 'exit $?'
- fi
-
- if test -n "$gentop"; then
- func_show_eval '${RM}r "$gentop"'
- fi
-
- exit $EXIT_SUCCESS
- ;;
-
- prog)
- case $host in
- *cygwin*) func_stripname '' '.exe' "$output"
- output=$func_stripname_result.exe;;
- esac
- test -n "$vinfo" && \
- func_warning "\`-version-info' is ignored for programs"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for programs"
-
- test "$preload" = yes \
- && test "$dlopen_support" = unknown \
- && test "$dlopen_self" = unknown \
- && test "$dlopen_self_static" = unknown && \
- func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
-
- case $host in
- *-*-rhapsody* | *-*-darwin1.[012])
- # On Rhapsody replace the C library is the System framework
- compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
- finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
- ;;
- esac
-
- case $host in
- *-*-darwin*)
- # Don't allow lazy linking, it breaks C++ global constructors
- # But is supposedly fixed on 10.4 or later (yay!).
- if test "$tagname" = CXX ; then
- case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
- 10.[0123])
- compile_command="$compile_command ${wl}-bind_at_load"
- finalize_command="$finalize_command ${wl}-bind_at_load"
- ;;
- esac
- fi
- # Time to change all our "foo.ltframework" stuff back to "-framework foo"
- compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- ;;
- esac
-
-
- # move library search paths that coincide with paths to not yet
- # installed libraries to the beginning of the library search list
- new_libs=
- for path in $notinst_path; do
- case " $new_libs " in
- *" -L$path/$objdir "*) ;;
- *)
- case " $compile_deplibs " in
- *" -L$path/$objdir "*)
- new_libs="$new_libs -L$path/$objdir" ;;
- esac
- ;;
- esac
- done
- for deplib in $compile_deplibs; do
- case $deplib in
- -L*)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- done
- compile_deplibs="$new_libs"
-
-
- compile_command="$compile_command $compile_deplibs"
- finalize_command="$finalize_command $finalize_deplibs"
-
- if test -n "$rpath$xrpath"; then
- # If the user specified any rpath flags, then add them.
- for libdir in $rpath $xrpath; do
- # This is the magic to use -rpath.
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir" ;;
- esac
- done
- fi
-
- # Now hardcode the library paths
- rpath=
- hardcode_libdirs=
- for libdir in $compile_rpath $finalize_rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- rpath="$rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
- case :$dllsearchpath: in
- *":$libdir:"*) ;;
- *) dllsearchpath="$dllsearchpath:$libdir";;
- esac
- case :$dllsearchpath: in
- *":$testbindir:"*) ;;
- *) dllsearchpath="$dllsearchpath:$testbindir";;
- esac
- ;;
- esac
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- eval rpath=\" $hardcode_libdir_flag_spec\"
- fi
- compile_rpath="$rpath"
-
- rpath=
- hardcode_libdirs=
- for libdir in $finalize_rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- rpath="$rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$finalize_perm_rpath " in
- *" $libdir "*) ;;
- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
- esac
- fi
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- eval rpath=\" $hardcode_libdir_flag_spec\"
- fi
- finalize_rpath="$rpath"
-
- if test -n "$libobjs" && test "$build_old_libs" = yes; then
- # Transform all the library objects into standard objects.
- compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- fi
-
- func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
-
- # template prelinking step
- if test -n "$prelink_cmds"; then
- func_execute_cmds "$prelink_cmds" 'exit $?'
- fi
-
- wrappers_required=yes
- case $host in
- *cygwin* | *mingw* )
- if test "$build_libtool_libs" != yes; then
- wrappers_required=no
- fi
- ;;
- *)
- if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
- wrappers_required=no
- fi
- ;;
- esac
- if test "$wrappers_required" = no; then
- # Replace the output file specification.
- compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
- link_command="$compile_command$compile_rpath"
-
- # We have no uninstalled library dependencies, so finalize right now.
- exit_status=0
- func_show_eval "$link_command" 'exit_status=$?'
-
- # Delete the generated files.
- if test -f "$output_objdir/${outputname}S.${objext}"; then
- func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
- fi
-
- exit $exit_status
- fi
-
- if test -n "$compile_shlibpath$finalize_shlibpath"; then
- compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
- fi
- if test -n "$finalize_shlibpath"; then
- finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
- fi
-
- compile_var=
- finalize_var=
- if test -n "$runpath_var"; then
- if test -n "$perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $perm_rpath; do
- rpath="$rpath$dir:"
- done
- compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
- fi
- if test -n "$finalize_perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $finalize_perm_rpath; do
- rpath="$rpath$dir:"
- done
- finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
- fi
- fi
-
- if test "$no_install" = yes; then
- # We don't need to create a wrapper script.
- link_command="$compile_var$compile_command$compile_rpath"
- # Replace the output file specification.
- link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
- # Delete the old output file.
- $opt_dry_run || $RM $output
- # Link the executable and exit
- func_show_eval "$link_command" 'exit $?'
- exit $EXIT_SUCCESS
- fi
-
- if test "$hardcode_action" = relink; then
- # Fast installation is not supported
- link_command="$compile_var$compile_command$compile_rpath"
- relink_command="$finalize_var$finalize_command$finalize_rpath"
-
- func_warning "this platform does not like uninstalled shared libraries"
- func_warning "\`$output' will be relinked during installation"
- else
- if test "$fast_install" != no; then
- link_command="$finalize_var$compile_command$finalize_rpath"
- if test "$fast_install" = yes; then
- relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
- else
- # fast_install is set to needless
- relink_command=
- fi
- else
- link_command="$compile_var$compile_command$compile_rpath"
- relink_command="$finalize_var$finalize_command$finalize_rpath"
- fi
- fi
-
- # Replace the output file specification.
- link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
-
- # Delete the old output files.
- $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
-
- func_show_eval "$link_command" 'exit $?'
-
- # Now create the wrapper script.
- func_echo "creating $output"
-
- # Quote the relink command for shipping.
- if test -n "$relink_command"; then
- # Preserve any variables that may affect compiler behavior
- for var in $variables_saved_for_relink; do
- if eval test -z \"\${$var+set}\"; then
- relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
- elif eval var_value=\$$var; test -z "$var_value"; then
- relink_command="$var=; export $var; $relink_command"
- else
- func_quote_for_eval "$var_value"
- relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
- fi
- done
- relink_command="(cd `pwd`; $relink_command)"
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
- fi
-
- # Quote $ECHO for shipping.
- if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
- case $progpath in
- [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
- *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
- esac
- qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
- else
- qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
- fi
-
- # Only actually do things if not in dry run mode.
- $opt_dry_run || {
- # win32 will think the script is a binary if it has
- # a .exe suffix, so we strip it off here.
- case $output in
- *.exe) func_stripname '' '.exe' "$output"
- output=$func_stripname_result ;;
- esac
- # test for cygwin because mv fails w/o .exe extensions
- case $host in
- *cygwin*)
- exeext=.exe
- func_stripname '' '.exe' "$outputname"
- outputname=$func_stripname_result ;;
- *) exeext= ;;
- esac
- case $host in
- *cygwin* | *mingw* )
- output_name=`basename $output`
- output_path=`dirname $output`
- cwrappersource="$output_path/$objdir/lt-$output_name.c"
- cwrapper="$output_path/$output_name.exe"
- $RM $cwrappersource $cwrapper
- trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
-
- cat > $cwrappersource <<EOF
-
-/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
- Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-
- The $output program cannot be directly executed until all the libtool
- libraries that it depends on are installed.
-
- This wrapper executable should never be moved out of the build directory.
- If it is, it will not operate correctly.
-
- Currently, it simply execs the wrapper *script* "/bin/sh $output",
- but could eventually absorb all of the scripts functionality and
- exec $objdir/$outputname directly.
-*/
-EOF
- cat >> $cwrappersource<<"EOF"
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/stat.h>
-
-#if defined(PATH_MAX)
-# define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
-# define LT_PATHMAX MAXPATHLEN
-#else
-# define LT_PATHMAX 1024
-#endif
-
-#ifndef DIR_SEPARATOR
-# define DIR_SEPARATOR '/'
-# define PATH_SEPARATOR ':'
-#endif
-
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
- defined (__OS2__)
-# define HAVE_DOS_BASED_FILE_SYSTEM
-# ifndef DIR_SEPARATOR_2
-# define DIR_SEPARATOR_2 '\\'
-# endif
-# ifndef PATH_SEPARATOR_2
-# define PATH_SEPARATOR_2 ';'
-# endif
-#endif
-
-#ifndef DIR_SEPARATOR_2
-# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-#else /* DIR_SEPARATOR_2 */
-# define IS_DIR_SEPARATOR(ch) \
- (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-#endif /* DIR_SEPARATOR_2 */
-
-#ifndef PATH_SEPARATOR_2
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
-#else /* PATH_SEPARATOR_2 */
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
-#endif /* PATH_SEPARATOR_2 */
-
-#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
-#define XFREE(stale) do { \
- if (stale) { free ((void *) stale); stale = 0; } \
-} while (0)
-
-/* -DDEBUG is fairly common in CFLAGS. */
-#undef DEBUG
-#if defined DEBUGWRAPPER
-# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
-#else
-# define DEBUG(format, ...)
-#endif
-
-const char *program_name = NULL;
-
-void * xmalloc (size_t num);
-char * xstrdup (const char *string);
-const char * base_name (const char *name);
-char * find_executable(const char *wrapper);
-int check_executable(const char *path);
-char * strendzap(char *str, const char *pat);
-void lt_fatal (const char *message, ...);
-
-int
-main (int argc, char *argv[])
-{
- char **newargz;
- int i;
-
- program_name = (char *) xstrdup (base_name (argv[0]));
- DEBUG("(main) argv[0] : %s\n",argv[0]);
- DEBUG("(main) program_name : %s\n",program_name);
- newargz = XMALLOC(char *, argc+2);
-EOF
-
- cat >> $cwrappersource <<EOF
- newargz[0] = (char *) xstrdup("$SHELL");
-EOF
-
- cat >> $cwrappersource <<"EOF"
- newargz[1] = find_executable(argv[0]);
- if (newargz[1] == NULL)
- lt_fatal("Couldn't find %s", argv[0]);
- DEBUG("(main) found exe at : %s\n",newargz[1]);
- /* we know the script has the same name, without the .exe */
- /* so make sure newargz[1] doesn't end in .exe */
- strendzap(newargz[1],".exe");
- for (i = 1; i < argc; i++)
- newargz[i+1] = xstrdup(argv[i]);
- newargz[argc+1] = NULL;
-
- for (i=0; i<argc+1; i++)
- {
- DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
- ;
- }
-
-EOF
-
- case $host_os in
- mingw*)
- cat >> $cwrappersource <<EOF
- execv("$SHELL",(char const **)newargz);
-EOF
- ;;
- *)
- cat >> $cwrappersource <<EOF
- execv("$SHELL",newargz);
-EOF
- ;;
- esac
-
- cat >> $cwrappersource <<"EOF"
- return 127;
-}
-
-void *
-xmalloc (size_t num)
-{
- void * p = (void *) malloc (num);
- if (!p)
- lt_fatal ("Memory exhausted");
-
- return p;
-}
-
-char *
-xstrdup (const char *string)
-{
- return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
-;
-}
-
-const char *
-base_name (const char *name)
-{
- const char *base;
-
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- /* Skip over the disk name in MSDOS pathnames. */
- if (isalpha ((unsigned char)name[0]) && name[1] == ':')
- name += 2;
-#endif
-
- for (base = name; *name; name++)
- if (IS_DIR_SEPARATOR (*name))
- base = name + 1;
- return base;
-}
-
-int
-check_executable(const char * path)
-{
- struct stat st;
-
- DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
- if ((!path) || (!*path))
- return 0;
-
- if ((stat (path, &st) >= 0) &&
- (
- /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
-#if defined (S_IXOTH)
- ((st.st_mode & S_IXOTH) == S_IXOTH) ||
-#endif
-#if defined (S_IXGRP)
- ((st.st_mode & S_IXGRP) == S_IXGRP) ||
-#endif
- ((st.st_mode & S_IXUSR) == S_IXUSR))
- )
- return 1;
- else
- return 0;
-}
-
-/* Searches for the full path of the wrapper. Returns
- newly allocated full path name if found, NULL otherwise */
-char *
-find_executable (const char* wrapper)
-{
- int has_slash = 0;
- const char* p;
- const char* p_next;
- /* static buffer for getcwd */
- char tmp[LT_PATHMAX + 1];
- int tmp_len;
- char* concat_name;
-
- DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
-
- if ((wrapper == NULL) || (*wrapper == '\0'))
- return NULL;
-
- /* Absolute path? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
- {
- concat_name = xstrdup (wrapper);
- if (check_executable(concat_name))
- return concat_name;
- XFREE(concat_name);
- }
- else
- {
-#endif
- if (IS_DIR_SEPARATOR (wrapper[0]))
- {
- concat_name = xstrdup (wrapper);
- if (check_executable(concat_name))
- return concat_name;
- XFREE(concat_name);
- }
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- }
-#endif
-
- for (p = wrapper; *p; p++)
- if (*p == '/')
- {
- has_slash = 1;
- break;
- }
- if (!has_slash)
- {
- /* no slashes; search PATH */
- const char* path = getenv ("PATH");
- if (path != NULL)
- {
- for (p = path; *p; p = p_next)
- {
- const char* q;
- size_t p_len;
- for (q = p; *q; q++)
- if (IS_PATH_SEPARATOR(*q))
- break;
- p_len = q - p;
- p_next = (*q == '\0' ? q : q + 1);
- if (p_len == 0)
- {
- /* empty path: current directory */
- if (getcwd (tmp, LT_PATHMAX) == NULL)
- lt_fatal ("getcwd failed");
- tmp_len = strlen(tmp);
- concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
- memcpy (concat_name, tmp, tmp_len);
- concat_name[tmp_len] = '/';
- strcpy (concat_name + tmp_len + 1, wrapper);
- }
- else
- {
- concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
- memcpy (concat_name, p, p_len);
- concat_name[p_len] = '/';
- strcpy (concat_name + p_len + 1, wrapper);
- }
- if (check_executable(concat_name))
- return concat_name;
- XFREE(concat_name);
- }
- }
- /* not found in PATH; assume curdir */
- }
- /* Relative path | not found in path: prepend cwd */
- if (getcwd (tmp, LT_PATHMAX) == NULL)
- lt_fatal ("getcwd failed");
- tmp_len = strlen(tmp);
- concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
- memcpy (concat_name, tmp, tmp_len);
- concat_name[tmp_len] = '/';
- strcpy (concat_name + tmp_len + 1, wrapper);
-
- if (check_executable(concat_name))
- return concat_name;
- XFREE(concat_name);
- return NULL;
-}
-
-char *
-strendzap(char *str, const char *pat)
-{
- size_t len, patlen;
-
- assert(str != NULL);
- assert(pat != NULL);
-
- len = strlen(str);
- patlen = strlen(pat);
-
- if (patlen <= len)
- {
- str += len - patlen;
- if (strcmp(str, pat) == 0)
- *str = '\0';
- }
- return str;
-}
-
-static void
-lt_error_core (int exit_status, const char * mode,
- const char * message, va_list ap)
-{
- fprintf (stderr, "%s: %s: ", program_name, mode);
- vfprintf (stderr, message, ap);
- fprintf (stderr, ".\n");
-
- if (exit_status >= 0)
- exit (exit_status);
-}
-
-void
-lt_fatal (const char *message, ...)
-{
- va_list ap;
- va_start (ap, message);
- lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
- va_end (ap);
-}
-EOF
- # we should really use a build-platform specific compiler
- # here, but OTOH, the wrappers (shell script and this C one)
- # are only useful if you want to execute the "real" binary.
- # Since the "real" binary is built for $host, then this
- # wrapper might as well be built for $host, too.
- $opt_dry_run || $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
- ;;
- esac
- $RM $output
- trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
-
- $ECHO > $output "\
-#! $SHELL
-
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# The $output program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of the build directory.
-# If it is, it will not operate correctly.
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='${SED} -e 1s/^X//'
-sed_quote_subst='$sed_quote_subst'
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-relink_command=\"$relink_command\"
-
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
- # install mode needs the following variables:
- generated_by_libtool_version='$macro_version'
- notinst_deplibs='$notinst_deplibs'
-else
- # When we are sourced in execute mode, \$file and \$ECHO are already set.
- if test \"\$libtool_execute_magic\" != \"$magic\"; then
- ECHO=\"$qecho\"
- file=\"\$0\"
- # Make sure echo works.
- if test \"X\$1\" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
- elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
- # Yippee, \$ECHO works!
- :
- else
- # Restart under the correct shell, and then maybe \$ECHO will work.
- exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
- fi
- fi\
-"
- $ECHO >> $output "\
-
- # Find the directory that this script lives in.
- thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
- test \"x\$thisdir\" = \"x\$file\" && thisdir=.
-
- # Follow symbolic links until we get to the real thisdir.
- file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
- while test -n \"\$file\"; do
- destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
-
- # If there was a directory component, then change thisdir.
- if test \"x\$destdir\" != \"x\$file\"; then
- case \"\$destdir\" in
- [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
- *) thisdir=\"\$thisdir/\$destdir\" ;;
- esac
- fi
-
- file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
- file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
- done
-
- # Try to get the absolute directory name.
- absdir=\`cd \"\$thisdir\" && pwd\`
- test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
-
- if test "$fast_install" = yes; then
- $ECHO >> $output "\
- program=lt-'$outputname'$exeext
- progdir=\"\$thisdir/$objdir\"
-
- if test ! -f \"\$progdir/\$program\" ||
- { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
- test \"X\$file\" != \"X\$progdir/\$program\"; }; then
-
- file=\"\$\$-\$program\"
-
- if test ! -d \"\$progdir\"; then
- $MKDIR \"\$progdir\"
- else
- $RM \"\$progdir/\$file\"
- fi"
-
- $ECHO >> $output "\
-
- # relink executable if necessary
- if test -n \"\$relink_command\"; then
- if relink_command_output=\`eval \$relink_command 2>&1\`; then :
- else
- $ECHO \"\$relink_command_output\" >&2
- $RM \"\$progdir/\$file\"
- exit 1
- fi
- fi
-
- $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
- { $RM \"\$progdir/\$program\";
- $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
- $RM \"\$progdir/\$file\"
- fi"
- else
- $ECHO >> $output "\
- program='$outputname'
- progdir=\"\$thisdir/$objdir\"
-"
- fi
-
- $ECHO >> $output "\
-
- if test -f \"\$progdir/\$program\"; then"
-
- # Export our shlibpath_var if we have one.
- if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
- $ECHO >> $output "\
- # Add our own library path to $shlibpath_var
- $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
-
- # Some systems cannot cope with colon-terminated $shlibpath_var
- # The second colon is a workaround for a bug in BeOS R4 sed
- $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
-
- export $shlibpath_var
-"
- fi
-
- # fixup the dll searchpath if we need to.
- if test -n "$dllsearchpath"; then
- $ECHO >> $output "\
- # Add the dll search path components to the executable PATH
- PATH=$dllsearchpath:\$PATH
-"
- fi
-
- $ECHO >> $output "\
- if test \"\$libtool_execute_magic\" != \"$magic\"; then
- # Run the actual program with our arguments.
-"
- case $host in
- # Backslashes separate directories on plain windows
- *-*-mingw | *-*-os2*)
- $ECHO >> $output "\
- exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-"
- ;;
-
- *)
- $ECHO >> $output "\
- exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
- ;;
- esac
- $ECHO >> $output "\
- \$ECHO \"\$0: cannot exec \$program \${1+\"\$@\"}\"
- exit 1
- fi
- else
- # The program doesn't exist.
- \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
- \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
- $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
- exit 1
- fi
-fi\
-"
- chmod +x $output
- }
- exit $EXIT_SUCCESS
- ;;
- esac
-
- # See if we need to build an old-fashioned archive.
- for oldlib in $oldlibs; do
-
- if test "$build_libtool_libs" = convenience; then
- oldobjs="$libobjs_save $symfileobj"
- addlibs="$convenience"
- build_libtool_libs=no
- else
- if test "$build_libtool_libs" = module; then
- oldobjs="$libobjs_save"
- build_libtool_libs=no
- else
- oldobjs="$old_deplibs $non_pic_objects"
- if test "$preload" = yes && test -f "$symfileobj"; then
- oldobjs="$oldobjs $symfileobj"
- fi
- fi
- addlibs="$old_convenience"
- fi
-
- if test -n "$addlibs"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $addlibs
- oldobjs="$oldobjs $func_extract_archives_result"
- fi
-
- # Do each command in the archive commands.
- if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
- cmds=$old_archive_from_new_cmds
- else
-
- # Add any objects from preloaded convenience libraries
- if test -n "$dlprefiles"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $dlprefiles
- oldobjs="$oldobjs $func_extract_archives_result"
- fi
-
- # POSIX demands no paths to be encoded in archives. We have
- # to avoid creating archives with duplicate basenames if we
- # might have to extract them afterwards, e.g., when creating a
- # static archive out of a convenience library, or when linking
- # the entirety of a libtool archive into another (currently
- # not supported by libtool).
- if (for obj in $oldobjs
- do
- func_basename "$obj"
- $ECHO "$func_basename_result"
- done | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- $ECHO "copying selected object files to avoid basename conflicts..."
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
- func_mkdir_p "$gentop"
- save_oldobjs=$oldobjs
- oldobjs=
- counter=1
- for obj in $save_oldobjs
- do
- func_basename "$obj"
- objbase="$func_basename_result"
- case " $oldobjs " in
- " ") oldobjs=$obj ;;
- *[\ /]"$objbase "*)
- while :; do
- # Make sure we don't pick an alternate name that also
- # overlaps.
- newobj=lt$counter-$objbase
- counter=`expr $counter + 1`
- case " $oldobjs " in
- *[\ /]"$newobj "*) ;;
- *) if test ! -f "$gentop/$newobj"; then break; fi ;;
- esac
- done
- func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
- oldobjs="$oldobjs $gentop/$newobj"
- ;;
- *) oldobjs="$oldobjs $obj" ;;
- esac
- done
- fi
- eval cmds=\"$old_archive_cmds\"
-
- if len=`expr "X$cmds" : ".*" 2>/dev/null` &&
- test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- cmds=$old_archive_cmds
- else
- # the command line is too long to link in one step, link in parts
- func_echo "using piecewise archive linking..."
- save_RANLIB=$RANLIB
- RANLIB=:
- objlist=
- concat_cmds=
- save_oldobjs=$oldobjs
- # Is there a better way of finding the last object in the list?
- for obj in $save_oldobjs
- do
- last_oldobj=$obj
- done
- for obj in $save_oldobjs
- do
- oldobjs="$objlist $obj"
- objlist="$objlist $obj"
- eval test_cmds=\"$old_archive_cmds\"
- if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
- test "$len" -le "$max_cmd_len"; then
- :
- else
- # the above command should be used before it gets too long
- oldobjs=$objlist
- if test "$obj" = "$last_oldobj" ; then
- RANLIB=$save_RANLIB
- fi
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
- objlist=
- fi
- done
- RANLIB=$save_RANLIB
- oldobjs=$objlist
- if test "X$oldobjs" = "X" ; then
- eval cmds=\"\$concat_cmds\"
- else
- eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
- fi
- fi
- fi
- func_execute_cmds "$cmds" 'exit $?'
- done
-
- test -n "$generated" && \
- func_show_eval "${RM}r$generated"
-
- # Now create the libtool archive.
- case $output in
- *.la)
- old_library=
- test "$build_old_libs" = yes && old_library="$libname.$libext"
- func_echo "creating $output"
-
- # Preserve any variables that may affect compiler behavior
- for var in $variables_saved_for_relink; do
- if eval test -z \"\${$var+set}\"; then
- relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
- elif eval var_value=\$$var; test -z "$var_value"; then
- relink_command="$var=; export $var; $relink_command"
- else
- func_quote_for_eval "$var_value"
- relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
- fi
- done
- # Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
- if test "$hardcode_automatic" = yes ; then
- relink_command=
- fi
-
- # Only create the output if not a dry run.
- $opt_dry_run || {
- for installed in no yes; do
- if test "$installed" = yes; then
- if test -z "$install_libdir"; then
- break
- fi
- output="$output_objdir/$outputname"i
- # Replace all uninstalled libtool libraries with the installed ones
- newdependency_libs=
- for deplib in $dependency_libs; do
- case $deplib in
- *.la)
- func_basename "$deplib"
- name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- test -z "$libdir" && \
- func_fatal_error "\`$deplib' is not a valid libtool archive"
- newdependency_libs="$newdependency_libs $libdir/$name"
- ;;
- *) newdependency_libs="$newdependency_libs $deplib" ;;
- esac
- done
- dependency_libs="$newdependency_libs"
- newdlfiles=
-
- for lib in $dlfiles; do
- case $lib in
- *.la)
- func_basename "$lib"
- name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- test -z "$libdir" && \
- func_fatal_error "\`$lib' is not a valid libtool archive"
- newdlfiles="$newdlfiles $libdir/$name"
- ;;
- *) newdlfiles="$newdlfiles $lib" ;;
- esac
- done
- dlfiles="$newdlfiles"
- newdlprefiles=
- for lib in $dlprefiles; do
- case $lib in
- *.la)
- # Only pass preopened files to the pseudo-archive (for
- # eventual linking with the app. that links it) if we
- # didn't already link the preopened objects directly into
- # the library:
- func_basename "$lib"
- name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- test -z "$libdir" && \
- func_fatal_error "\`$lib' is not a valid libtool archive"
- newdlprefiles="$newdlprefiles $libdir/$name"
- ;;
- esac
- done
- dlprefiles="$newdlprefiles"
- else
- newdlfiles=
- for lib in $dlfiles; do
- case $lib in
- [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
- *) abs=`pwd`"/$lib" ;;
- esac
- newdlfiles="$newdlfiles $abs"
- done
- dlfiles="$newdlfiles"
- newdlprefiles=
- for lib in $dlprefiles; do
- case $lib in
- [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
- *) abs=`pwd`"/$lib" ;;
- esac
- newdlprefiles="$newdlprefiles $abs"
- done
- dlprefiles="$newdlprefiles"
- fi
- $RM $output
- # place dlname in correct position for cygwin
- tdlname=$dlname
- case $host,$output,$installed,$module,$dlname in
- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
- esac
- $ECHO > $output "\
-# $outputname - a libtool library file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname='$tdlname'
-
-# Names of this library.
-library_names='$library_names'
-
-# The name of the static archive.
-old_library='$old_library'
-
-# Linker flags that can not go in dependency_libs.
-inherited_linker_flags='$new_inherited_linker_flags'
-
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
-
-# Names of additional weak libraries provided by this library
-weak_library_names='$weak_libs'
-
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
-
-# Is this an already installed library?
-installed=$installed
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=$module
-
-# Files to dlopen/dlpreopen
-dlopen='$dlfiles'
-dlpreopen='$dlprefiles'
-
-# Directory that this library needs to be installed in:
-libdir='$install_libdir'"
- if test "$installed" = no && test "$need_relink" = yes; then
- $ECHO >> $output "\
-relink_command=\"$relink_command\""
- fi
- done
- }
-
- # Do a symbolic link so that the libtool archive can be found in
- # LD_LIBRARY_PATH before the program is installed.
- func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
- ;;
- esac
- exit $EXIT_SUCCESS
-}
-
-
-# func_mode_uninstall arg...
-func_mode_uninstall ()
-{
- $opt_debug
- RM="$nonopt"
- files=
- rmforce=
- exit_status=0
-
- # This variable tells wrapper scripts just to set variables rather
- # than running their programs.
- libtool_install_magic="$magic"
-
- for arg
- do
- case $arg in
- -f) RM="$RM $arg"; rmforce=yes ;;
- -*) RM="$RM $arg" ;;
- *) files="$files $arg" ;;
- esac
- done
-
- test -z "$RM" && \
- func_fatal_help "you must specify an RM program"
-
- rmdirs=
-
- origobjdir="$objdir"
- for file in $files; do
- func_dirname "$file" "" "."
- dir="$func_dirname_result"
- if test "X$dir" = X.; then
- objdir="$origobjdir"
- else
- objdir="$dir/$origobjdir"
- fi
- func_basename "$file"
- name="$func_basename_result"
- test "$mode" = uninstall && objdir="$dir"
-
- # Remember objdir for removal later, being careful to avoid duplicates
- if test "$mode" = clean; then
- case " $rmdirs " in
- *" $objdir "*) ;;
- *) rmdirs="$rmdirs $objdir" ;;
- esac
- fi
-
- # Don't error if the file doesn't exist and rm -f was used.
- if { test -L "$file"; } >/dev/null 2>&1 ||
- { test -h "$file"; } >/dev/null 2>&1 ||
- test -f "$file"; then
- :
- elif test -d "$file"; then
- exit_status=1
- continue
- elif test "$rmforce" = yes; then
- continue
- fi
-
- rmfiles="$file"
-
- case $name in
- *.la)
- # Possibly a libtool archive, so verify it.
- if func_lalib_p "$file"; then
- . $dir/$name
-
- # Delete the libtool libraries and symlinks.
- for n in $library_names; do
- rmfiles="$rmfiles $objdir/$n"
- done
- test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
-
- case "$mode" in
- clean)
- case " $library_names " in
- # " " in the beginning catches empty $dlname
- *" $dlname "*) ;;
- *) rmfiles="$rmfiles $objdir/$dlname" ;;
- esac
- test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
- ;;
- uninstall)
- if test -n "$library_names"; then
- # Do each command in the postuninstall commands.
- func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
- fi
-
- if test -n "$old_library"; then
- # Do each command in the old_postuninstall commands.
- func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
- fi
- # FIXME: should reinstall the best remaining shared library.
- ;;
- esac
- fi
- ;;
-
- *.lo)
- # Possibly a libtool object, so verify it.
- if func_lalib_p "$file"; then
-
- # Read the .lo file
- . $dir/$name
-
- # Add PIC object to the list of files to remove.
- if test -n "$pic_object" &&
- test "$pic_object" != none; then
- rmfiles="$rmfiles $dir/$pic_object"
- fi
-
- # Add non-PIC object to the list of files to remove.
- if test -n "$non_pic_object" &&
- test "$non_pic_object" != none; then
- rmfiles="$rmfiles $dir/$non_pic_object"
- fi
- fi
- ;;
-
- *)
- if test "$mode" = clean ; then
- noexename=$name
- case $file in
- *.exe)
- func_stripname '' '.exe' "$file"
- file=$func_stripname_result
- func_stripname '' '.exe' "$name"
- noexename=$func_stripname_result
- # $file with .exe has already been added to rmfiles,
- # add $file without .exe
- rmfiles="$rmfiles $file"
- ;;
- esac
- # Do a test to see if this is a libtool program.
- if func_ltwrapper_p "$file"; then
- relink_command=
- . $dir/$noexename
-
- # note $name still contains .exe if it was in $file originally
- # as does the version of $file that was added into $rmfiles
- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
- if test "$fast_install" = yes && test -n "$relink_command"; then
- rmfiles="$rmfiles $objdir/lt-$name"
- fi
- if test "X$noexename" != "X$name" ; then
- rmfiles="$rmfiles $objdir/lt-${noexename}.c"
- fi
- fi
- fi
- ;;
- esac
- func_show_eval "$RM $rmfiles" 'exit_status=1'
- done
- objdir="$origobjdir"
-
- # Try to remove the ${objdir}s in the directories where we deleted files
- for dir in $rmdirs; do
- if test -d "$dir"; then
- func_show_eval "rmdir $dir >/dev/null 2>&1"
- fi
- done
-
- exit $exit_status
-}
-
-
-# TEST SUITE MARKER ## NON-FUNCTION
-## ----------- ##
-## Main. ##
-## ----------- ##
-
-{
- # Sanity checks first:
- func_check_version_match
-
- if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
- func_fatal_configuration "not configured to build any kind of library"
- fi
-
- test -z "$mode" && func_fatal_error "error: you must specify a MODE."
-
-
- # Darwin sucks
- eval std_shrext=\"$shrext_cmds\"
-
-
- # Only execute mode is allowed to have -dlopen flags.
- if test -n "$execute_dlfiles" && test "$mode" != execute; then
- func_error "unrecognized option \`-dlopen'"
- $ECHO "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Change the help message to a mode-specific one.
- generic_help="$help"
- help="Try \`$progname --help --mode=$mode' for more information."
-
- case $mode in
- compile) func_mode_compile ${1+"$@"} ;;
- execute) func_mode_execute ${1+"$@"} ;;
- finish) func_mode_finish ${1+"$@"} ;;
- install) func_mode_install ${1+"$@"} ;;
- link|relink) func_mode_link ${1+"$@"} ;;
- uninstall|clean) func_mode_uninstall ${1+"$@"} ;;
-
- "") help="$generic_help"
- func_fatal_help "you must specify a MODE"
- ;;
- esac
-
- test -z "$exec_cmd" && \
- func_fatal_help "invalid operation mode \`$mode'"
-
- if test -n "$exec_cmd"; then
- eval exec "$exec_cmd"
- exit $EXIT_FAILURE
- fi
-}
-
-exit $exit_status
-
-
-# The TAGs below are defined such that we never get into a situation
-# in which we disable both kinds of libraries. Given conflicting
-# choices, we go for a static library, that is the most portable,
-# since we can't tell whether shared libraries were disabled because
-# the user asked for that or because the platform doesn't support
-# them. This is particularly important on AIX, because we don't
-# support having both static and shared libraries enabled at the same
-# time on that platform, so we default to a shared-only configuration.
-# If a disable-shared tag is given, we'll fallback to a static-only
-# configuration. But we'll never go from static-only to shared-only.
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-build_libtool_libs=no
-build_old_libs=yes
-# ### END LIBTOOL TAG CONFIG: disable-shared
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-static
-build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
-# ### END LIBTOOL TAG CONFIG: disable-static
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
diff --git a/src/3rdparty/libtiff/config/missing b/src/3rdparty/libtiff/config/missing
deleted file mode 100755
index 894e786e16..0000000000
--- a/src/3rdparty/libtiff/config/missing
+++ /dev/null
@@ -1,360 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-
-scriptversion=2005-06-08.21
-
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
-
-# This program 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, 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.
-
-if test $# -eq 0; then
- echo 1>&2 "Try \`$0 --help' for more information"
- exit 1
-fi
-
-run=:
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
- configure_ac=configure.ac
-else
- configure_ac=configure.in
-fi
-
-msg="missing on your system"
-
-case "$1" in
---run)
- # Try to run requested program, and just exit if it succeeds.
- run=
- shift
- "$@" && exit 0
- # Exit code 63 means version mismatch. This often happens
- # when the user try to use an ancient version of a tool on
- # a file that requires a minimum version. In this case we
- # we should proceed has if the program had been absent, or
- # if --run hadn't been passed.
- if test $? = 63; then
- run=:
- msg="probably too old"
- fi
- ;;
-
- -h|--h|--he|--hel|--help)
- echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
- -h, --help display this help and exit
- -v, --version output version information and exit
- --run try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
- aclocal touch file \`aclocal.m4'
- autoconf touch file \`configure'
- autoheader touch file \`config.h.in'
- automake touch all \`Makefile.in' files
- bison create \`y.tab.[ch]', if possible, from existing .[ch]
- flex create \`lex.yy.c', if possible, from existing .c
- help2man touch the output file
- lex create \`lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- tar try tar, gnutar, gtar, then tar without non-portable flags
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]
-
-Send bug reports to <bug-automake@gnu.org>."
- exit $?
- ;;
-
- -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing $scriptversion (GNU Automake)"
- exit $?
- ;;
-
- -*)
- echo 1>&2 "$0: Unknown \`$1' option"
- echo 1>&2 "Try \`$0 --help' for more information"
- exit 1
- ;;
-
-esac
-
-# Now exit if we have it, but it failed. Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).
-case "$1" in
- lex|yacc)
- # Not GNU programs, they don't have --version.
- ;;
-
- tar)
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- exit 1
- fi
- ;;
-
- *)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- # Could not run --version or --help. This is probably someone
- # running `$TOOL --version' or `$TOOL --help' to check whether
- # $TOOL exists and not knowing $TOOL uses missing.
- exit 1
- fi
- ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
- aclocal*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acinclude.m4' or \`${configure_ac}'. You might want
- to install the \`Automake' and \`Perl' packages. Grab them from
- any GNU archive site."
- touch aclocal.m4
- ;;
-
- autoconf)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`${configure_ac}'. You might want to install the
- \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
- archive site."
- touch configure
- ;;
-
- autoheader)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acconfig.h' or \`${configure_ac}'. You might want
- to install the \`Autoconf' and \`GNU m4' packages. Grab them
- from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
- test -z "$files" && files="config.h"
- touch_files=
- for f in $files; do
- case "$f" in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
- ;;
-
- automake*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
- You might want to install the \`Automake' and \`Perl' packages.
- Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
- ;;
-
- autom4te)
- echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
- You might have modified some files without having the
- proper tools for further handling them.
- You can get \`$1' as part of \`Autoconf' from any GNU
- archive site."
-
- file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
- test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo "#! /bin/sh"
- echo "# Created by GNU Automake missing as a replacement of"
- echo "# $ $@"
- echo "exit 0"
- chmod +x $file
- exit 1
- fi
- ;;
-
- bison|yacc)
- echo 1>&2 "\
-WARNING: \`$1' $msg. You should only need it if
- you modified a \`.y' file. You may need the \`Bison' package
- in order for those modifications to take effect. You can get
- \`Bison' from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if [ $# -ne 1 ]; then
- eval LASTARG="\${$#}"
- case "$LASTARG" in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if [ ! -f y.tab.h ]; then
- echo >y.tab.h
- fi
- if [ ! -f y.tab.c ]; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- lex|flex)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.l' file. You may need the \`Flex' package
- in order for those modifications to take effect. You can get
- \`Flex' from any GNU archive site."
- rm -f lex.yy.c
- if [ $# -ne 1 ]; then
- eval LASTARG="\${$#}"
- case "$LASTARG" in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if [ ! -f lex.yy.c ]; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- help2man)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a dependency of a manual page. You may need the
- \`Help2man' package in order for those modifications to take
- effect. You can get \`Help2man' from any GNU archive site."
-
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
- fi
- if [ -f "$file" ]; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit 1
- fi
- ;;
-
- makeinfo)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.texi' or \`.texinfo' file, or any other file
- indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy \`make' (AIX,
- DU, IRIX). You might want to install the \`Texinfo' package or
- the \`GNU make' package. Grab either from any GNU archive site."
- # The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- # ... or it is the one specified with @setfilename ...
- infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
- # ... or it is derived from the source name (dir/f.texi becomes f.info)
- test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
- fi
- # If the file does not exist, the user really needs makeinfo;
- # let's fail without touching anything.
- test -f $file || exit 1
- touch $file
- ;;
-
- tar)
- shift
-
- # We have already tried tar in the generic part.
- # Look for gnutar/gtar before invocation to avoid ugly error
- # messages.
- if (gnutar --version > /dev/null 2>&1); then
- gnutar "$@" && exit 0
- fi
- if (gtar --version > /dev/null 2>&1); then
- gtar "$@" && exit 0
- fi
- firstarg="$1"
- if shift; then
- case "$firstarg" in
- *o*)
- firstarg=`echo "$firstarg" | sed s/o//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- case "$firstarg" in
- *h*)
- firstarg=`echo "$firstarg" | sed s/h//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- fi
-
- echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
- You may want to install GNU tar or Free paxutils, or check the
- command line arguments."
- exit 1
- ;;
-
- *)
- echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
- You might have modified some files without having the
- proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequisites for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing \`$1' program."
- exit 1
- ;;
-esac
-
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/src/3rdparty/libtiff/config/mkinstalldirs b/src/3rdparty/libtiff/config/mkinstalldirs
deleted file mode 100755
index 6fbe5e1176..0000000000
--- a/src/3rdparty/libtiff/config/mkinstalldirs
+++ /dev/null
@@ -1,150 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-
-scriptversion=2004-02-15.20
-
-# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain.
-#
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-errstatus=0
-dirmode=""
-
-usage="\
-Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
-
-Create each directory DIR (with mode MODE, if specified), including all
-leading file name components.
-
-Report bugs to <bug-automake@gnu.org>."
-
-# process command line arguments
-while test $# -gt 0 ; do
- case $1 in
- -h | --help | --h*) # -h for help
- echo "$usage"
- exit 0
- ;;
- -m) # -m PERM arg
- shift
- test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
- dirmode=$1
- shift
- ;;
- --version)
- echo "$0 $scriptversion"
- exit 0
- ;;
- --) # stop option processing
- shift
- break
- ;;
- -*) # unknown option
- echo "$usage" 1>&2
- exit 1
- ;;
- *) # first non-opt arg
- break
- ;;
- esac
-done
-
-for file
-do
- if test -d "$file"; then
- shift
- else
- break
- fi
-done
-
-case $# in
- 0) exit 0 ;;
-esac
-
-# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
-# mkdir -p a/c at the same time, both will detect that a is missing,
-# one will create a, then the other will try to create a and die with
-# a "File exists" error. This is a problem when calling mkinstalldirs
-# from a parallel make. We use --version in the probe to restrict
-# ourselves to GNU mkdir, which is thread-safe.
-case $dirmode in
- '')
- if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- echo "mkdir -p -- $*"
- exec mkdir -p -- "$@"
- else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
- # exists.
- test -d ./-p && rmdir ./-p
- test -d ./--version && rmdir ./--version
- fi
- ;;
- *)
- if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
- test ! -d ./--version; then
- echo "mkdir -m $dirmode -p -- $*"
- exec mkdir -m "$dirmode" -p -- "$@"
- else
- # Clean up after NextStep and OpenStep mkdir.
- for d in ./-m ./-p ./--version "./$dirmode";
- do
- test -d $d && rmdir $d
- done
- fi
- ;;
-esac
-
-for file
-do
- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
- shift
-
- pathcomp=
- for d
- do
- pathcomp="$pathcomp$d"
- case $pathcomp in
- -*) pathcomp=./$pathcomp ;;
- esac
-
- if test ! -d "$pathcomp"; then
- echo "mkdir $pathcomp"
-
- mkdir "$pathcomp" || lasterr=$?
-
- if test ! -d "$pathcomp"; then
- errstatus=$lasterr
- else
- if test ! -z "$dirmode"; then
- echo "chmod $dirmode $pathcomp"
- lasterr=""
- chmod "$dirmode" "$pathcomp" || lasterr=$?
-
- if test ! -z "$lasterr"; then
- errstatus=$lasterr
- fi
- fi
- fi
- fi
-
- pathcomp="$pathcomp/"
- done
-done
-
-exit $errstatus
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/src/3rdparty/libtiff/configure b/src/3rdparty/libtiff/configure
deleted file mode 100755
index 35215a5c17..0000000000
--- a/src/3rdparty/libtiff/configure
+++ /dev/null
@@ -1,22598 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for LibTIFF Software 3.8.2.
-#
-# Report bugs to <tiff@lists.maptools.org>.
-#
-# Copyright (C) 2003 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
- # Remove one level of quotation (which was required for Make).
- ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
- ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X$1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X$1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
- # Yippee, $ECHO works!
- :
-else
- # Restart under the correct shell.
- exec $SHELL "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<_LT_EOF
-$*
-_LT_EOF
- exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
- if test "X${echo_test_string+set}" != Xset; then
- # find a string as large as possible, as long as the shell can cope with it
- for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
- { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
- then
- break
- fi
- done
- fi
-
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- :
- else
- # The Solaris, AIX, and Digital Unix default echo programs unquote
- # backslashes. This makes it impossible to quote backslashes using
- # echo "$something" | sed 's/\\/\\\\/g'
- #
- # So, first we look for a working echo in the user's PATH.
-
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for dir in $PATH /usr/ucb; do
- IFS="$lt_save_ifs"
- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$dir/echo"
- break
- fi
- done
- IFS="$lt_save_ifs"
-
- if test "X$ECHO" = Xecho; then
- # We didn't find a better echo, so look for alternatives.
- if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # This shell has a builtin print -r that does the trick.
- ECHO='print -r'
- elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
- test "X$CONFIG_SHELL" != X/bin/ksh; then
- # If we have ksh, try running configure again with it.
- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
- export ORIGINAL_CONFIG_SHELL
- CONFIG_SHELL=/bin/ksh
- export CONFIG_SHELL
- exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
- else
- # Try using printf.
- ECHO='printf %s\n'
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # Cool, printf works
- :
- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
- export CONFIG_SHELL
- SHELL="$CONFIG_SHELL"
- export SHELL
- ECHO="$CONFIG_SHELL $0 --fallback-echo"
- elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$CONFIG_SHELL $0 --fallback-echo"
- else
- # maybe with a smaller string...
- prev=:
-
- for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
- if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
- then
- break
- fi
- prev="$cmd"
- done
-
- if test "$prev" != 'sed 50q "$0"'; then
- echo_test_string=`eval $prev`
- export echo_test_string
- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
- else
- # Oops. We lost completely, so just stick with echo.
- ECHO=echo
- fi
- fi
- fi
- fi
- fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
- lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
-fi
-
-
-
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME='LibTIFF Software'
-PACKAGE_TARNAME='tiff'
-PACKAGE_VERSION='3.8.2'
-PACKAGE_STRING='LibTIFF Software 3.8.2'
-PACKAGE_BUGREPORT='tiff@lists.maptools.org'
-
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#if STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# if HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
-#endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
-# include <memory.h>
-# endif
-# include <string.h>
-#endif
-#if HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-# include <stdint.h>
-# endif
-#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTIFF_MAJOR_VERSION LIBTIFF_MINOR_VERSION LIBTIFF_MICRO_VERSION LIBTIFF_ALPHA_VERSION LIBTIFF_VERSION LIBTIFF_VERSION_INFO LIBTIFF_RELEASE_DATE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S LIBTOOL SED EGREP FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM AR ac_ct_AR RANLIB ac_ct_RANLIB lt_ECHO CPP AS ac_ct_AS DLLTOOL ac_ct_DLLTOOL OBJDUMP ac_ct_OBJDUMP LIBOBJS HAVE_RPATH_TRUE HAVE_RPATH_FALSE LIBTIFF_DOCDIR HAVE_CXX_TRUE HAVE_CXX_FALSE X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS GL_CFLAGS GL_LIBS CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP GLU_CFLAGS GLU_LIBS GLUT_CFLAGS GLUT_LIBS HAVE_OPENGL_TRUE HAVE_OPENGL_FALSE LIBDIR LTLIBOBJS'
-ac_subst_files=''
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-ac_prev=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_option in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
-ac_env_CXX_set=${CXX+set}
-ac_env_CXX_value=$CXX
-ac_cv_env_CXX_set=${CXX+set}
-ac_cv_env_CXX_value=$CXX
-ac_env_CXXFLAGS_set=${CXXFLAGS+set}
-ac_env_CXXFLAGS_value=$CXXFLAGS
-ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
-ac_cv_env_CXXFLAGS_value=$CXXFLAGS
-ac_env_CXXCPP_set=${CXXCPP+set}
-ac_env_CXXCPP_value=$CXXCPP
-ac_cv_env_CXXCPP_set=${CXXCPP+set}
-ac_cv_env_CXXCPP_value=$CXXCPP
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures LibTIFF Software 3.8.2 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-_ACEOF
-
- cat <<_ACEOF
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
-_ACEOF
-
- cat <<\_ACEOF
-
-Program names:
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-
-X features:
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
- --target=TARGET configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
- case $ac_init_help in
- short | recursive ) echo "Configuration of LibTIFF Software 3.8.2:";;
- esac
- cat <<\_ACEOF
-
-Optional Features:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer
- --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors
- --enable-shared[=PKGS]
- build shared libraries [default=yes]
- --enable-static[=PKGS]
- build static libraries [default=yes]
- --enable-fast-install[=PKGS]
- optimize for fast installation [default=yes]
- --disable-libtool-lock avoid locking (might break parallel builds)
- --enable-rpath Enable runtime linker paths (-R libtool option)
- --disable-largefile omit support for large files
- --disable-ccitt disable support for CCITT Group 3 & 4 algorithms
- --disable-packbits disable support for Macintosh PackBits algorithm
- --disable-lzw disable support for LZW algorithm
- --disable-thunder disable support for ThunderScan 4-bit RLE algorithm
- --disable-next disable support for NeXT 2-bit RLE algorithm
- --disable-logluv disable support for LogLuv high dynamic range
- encoding
- --disable-mdi disable support for Microsoft Document Imaging
- --disable-zlib disable Zlib usage (required for Deflate
- compression, enabled by default)
- --disable-pixarlog disable support for Pixar log-format algorithm
- (requires Zlib)
- --disable-jpeg disable IJG JPEG library usage (required for JPEG
- compression, enabled by default)
- --enable-old-jpeg enable support for Old JPEG compresson (read
- contrib/ojpeg/README first! Compilation fails with
- unpatched IJG JPEG library)
- --enable-cxx enable C++ stream API building (requires C++
- compiler)
- --disable-strip-chopping
- disable support for strip chopping (whether or not
- to convert single-strip uncompressed images to
- mutiple strips of specified size to reduce memory
- usage)
- --disable-extrasample-as-alpha
- the RGBA interface will treat a fourth sample with
- no EXTRASAMPLE_ value as being ASSOCALPHA. Many
- packages produce RGBA files but don't mark the alpha
- properly
- --disable-check-ycbcr-subsampling
- disable picking up YCbCr subsampling info from the
- JPEG data stream to support files lacking the tag
-
-Optional Packages:
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-pic try to use only PIC/non-PIC objects [default=use
- both]
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]
- --with-docdir=DIR directory where documentation should be installed
- --with-zlib-include-dir=DIR
- location of Zlib headers
- --with-zlib-lib-dir=DIR location of Zlib library binary
- --with-jpeg-include-dir=DIR
- location of IJG JPEG library headers
- --with-jpeg-lib-dir=DIR location of IJG JPEG library binary
- --with-x use the X Window System
- --with-apple-opengl-framework
- use Apple OpenGL framework (Mac OS X only)
- --with-default-strip-size=SIZE
- default size of the strip in bytes (when strip
- chopping enabled) [default=8192]
-
-Some influential environment variables:
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
- nonstandard directory <lib dir>
- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
- headers in a nonstandard directory <include dir>
- CPP C preprocessor
- CXX C++ compiler command
- CXXFLAGS C++ compiler flags
- CXXCPP C++ preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to <tiff@lists.maptools.org>.
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- echo
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd "$ac_popdir"
- done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
- cat <<\_ACEOF
-LibTIFF Software configure 3.8.2
-generated by GNU Autoconf 2.59
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by LibTIFF Software $as_me 3.8.2, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-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 || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_sep=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-{
- (set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
- *)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-}
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- sed "/^$/d" confdefs.h | sort
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
- ' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
- eval ac_new_val="\$ac_env_${ac_var}_value"
- case $ac_old_set,$ac_new_set in
- set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_aux_dir=
-for ac_dir in config $srcdir/config; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f $ac_dir/shtool; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
- { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
-case m4 in
- [\\/]* | ?:[\\/]* ) ac_macro_dir=m4 ;;
- *) ac_macro_dir=$srcdir/m4 ;;
-esac
-if test -d "$ac_macro_dir"; then :
-else
- { { echo "$as_me:$LINENO: error: cannot find macro directory \`m4'" >&5
-echo "$as_me: error: cannot find macro directory \`m4'" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
- { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
- ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
- ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6
-if test "${ac_cv_target+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_target_alias=$target_alias
-test "x$ac_cv_target_alias" = "x" &&
- ac_cv_target_alias=$ac_cv_host_alias
-ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6
-target=$ac_cv_target
-target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-am__api_version="1.9"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL=$ac_install_sh
- fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftest.file`
- fi
- rm -f conftest.file
- if test "$*" != "X $srcdir/configure conftest.file" \
- && test "$*" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" >&2;}
- { (exit 1); exit 1; }; }
- fi
-
- test "$2" = conftest.file
- )
-then
- # Ok.
- :
-else
- { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
- { (exit 1); exit 1; }; }
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,$program_prefix,;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$,$program_suffix,;$program_transform_name"
-# Double any \ or $. echo might interpret backslashes.
-# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm conftest.sed
-
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # We used to keeping the `.' as first argument, in order to
- # allow $(mkdir_p) to be used without argument. As in
- # $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined. However this is wrong
- # for two reasons:
- # 1. if the package is installed by a user who cannot write `.'
- # make install will fail,
- # 2. the above comment should most certainly read
- # $(mkdir_p) $(DESTDIR)$(somedir)
- # so it does not work when $(somedir) is undefined and
- # $(DESTDIR) is not.
- # To support the latter case, we have to write
- # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
- # so the `.' trick is pointless.
- mkdir_p='mkdir -p --'
-else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
- # exists.
- for d in ./-p ./--version;
- do
- test -d $d && rmdir $d
- done
- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
- if test -f "$ac_aux_dir/mkinstalldirs"; then
- mkdir_p='$(mkinstalldirs)'
- else
- mkdir_p='$(install_sh) -d'
- fi
-fi
-
-for ac_prog in gawk mawk nawk awk
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AWK+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$AWK"; then
- ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AWK="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
- echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$AWK" && break
-done
-
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.make <<\_ACEOF
-all:
- @echo 'ac_maketemp="$(MAKE)"'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftest.make
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- SET_MAKE=
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
- { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
- else
- CYGPATH_W=echo
- fi
-fi
-
-
-# Define the identity of the package.
- PACKAGE='tiff'
- VERSION='3.8.2'
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_STRIP="strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- STRIP=$ac_ct_STRIP
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
-
-
-
-echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
-echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi;
- echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
-echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
-
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-LIBTIFF_MAJOR_VERSION=3
-LIBTIFF_MINOR_VERSION=8
-LIBTIFF_MICRO_VERSION=2
-LIBTIFF_ALPHA_VERSION=
-LIBTIFF_VERSION=$LIBTIFF_MAJOR_VERSION.$LIBTIFF_MINOR_VERSION.$LIBTIFF_MICRO_VERSION$LIBTIFF_ALPHA_VERSION
-LIBTIFF_RELEASE_DATE=`date +"%Y%m%d"`
-
-# This is a special hack for OpenBSD and MirOS systems. The dynamic linker
-# in OpenBSD uses some special semantics for shared libraries. Their soname
-# contains only two numbers, major and minor.
-# See http://bugzilla.remotesensing.org/show_bug.cgi?id=838 for details.
-case "$target_os" in
- openbsd* | mirbsd*)
- LIBTIFF_VERSION_INFO=$LIBTIFF_MAJOR_VERSION$LIBTIFF_MINOR_VERSION:$LIBTIFF_MICRO_VERSION$LIBTIFF_ALPHA_VERSION:0
- ;;
- *)
- LIBTIFF_VERSION_INFO=$LIBTIFF_MAJOR_VERSION:$LIBTIFF_MINOR_VERSION:$LIBTIFF_MICRO_VERSION$LIBTIFF_ALPHA_VERSION
- ;;
-esac
-
-
-
-
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CC" && break
-done
-
- CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
- break;;
- * )
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
- * ) break;;
- esac
-done
-else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-DEPDIR="${am__leading_dot}deps"
-
- ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
- am__include=include
- am__quote=
- _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- am__include=.include
- am__quote="\""
- _am_result=BSD
- fi
-fi
-
-
-echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
- enableval="$enable_dependency_tracking"
-
-fi;
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
-
-
-if test "x$enable_dependency_tracking" != xno; then
- AMDEP_TRUE=
- AMDEP_FALSE='#'
-else
- AMDEP_TRUE='#'
- AMDEP_FALSE=
-fi
-
-
-
-
-depcc="$CC" am_compiler_list=
-
-echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_CC_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- case $depmode in
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- none) break ;;
- esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
- if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CC_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
-
-
-if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
- am__fastdepCC_TRUE=
- am__fastdepCC_FALSE='#'
-else
- am__fastdepCC_TRUE='#'
- am__fastdepCC_FALSE=
-fi
-
-
-if test "x$CC" != xcc; then
- echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
-echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
-else
- echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
-echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
-fi
-set dummy $CC; ac_cc=`echo $2 |
- sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-# Make sure it works both with $CC and with simple cc.
-# We do the test twice because some compilers refuse to overwrite an
-# existing .o file with -o, though they will create one.
-ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
-if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); };
-then
- eval ac_cv_prog_cc_${ac_cc}_c_o=yes
- if test "x$CC" != xcc; then
- # Test first that cc exists at all.
- if { ac_try='cc -c conftest.$ac_ext >&5'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
- if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); };
- then
- # cc works too.
- :
- else
- # cc exists but doesn't like -o.
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
- fi
- fi
- fi
-else
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
-fi
-rm -f conftest*
-
-fi
-if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_MINUS_C_MINUS_O 1
-_ACEOF
-
-fi
-
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-
-
-
- ansi=
- if test -z "$ansi"; then
- msg="for C compiler warning flags"
- else
- msg="for C compiler warning and ANSI conformance flags"
- fi
- echo "$as_me:$LINENO: checking $msg" >&5
-echo $ECHO_N "checking $msg... $ECHO_C" >&6
-if test "${vl_cv_prog_cc_warnings+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- if test -n "$CC"; then
- cat > conftest.c <<EOF
-int main(int argc, char **argv) { return 0; }
-EOF
-
- if test "$GCC" = "yes"; then
- if test -z "$ansi"; then
- vl_cv_prog_cc_warnings="-Wall -W"
- else
- vl_cv_prog_cc_warnings="-Wall -W -ansi -pedantic"
- fi
-
-
- elif $CC -V 2>&1 | grep -i "WorkShop" > /dev/null 2>&1 &&
- $CC -c -v -Xc conftest.c > /dev/null 2>&1 &&
- test -f conftest.o; then
- if test -z "$ansi"; then
- vl_cv_prog_cc_warnings="-v"
- else
- vl_cv_prog_cc_warnings="-v -Xc"
- fi
-
- elif $CC -V 2>&1 | grep -i "Digital UNIX Compiler" > /dev/null 2>&1 &&
- $CC -c -verbose -w0 -warnprotos -std1 conftest.c > /dev/null 2>&1 &&
- test -f conftest.o; then
- if test -z "$ansi"; then
- vl_cv_prog_cc_warnings="-verbose -w0 -warnprotos"
- else
- vl_cv_prog_cc_warnings="-verbose -w0 -warnprotos -std1"
- fi
-
- elif $CC 2>&1 | grep -i "C for AIX Compiler" > /dev/null 2>&1 &&
- $CC -c -qlanglvl=ansi -qinfo=all conftest.c > /dev/null 2>&1 &&
- test -f conftest.o; then
- if test -z "$ansi"; then
- vl_cv_prog_cc_warnings="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd"
- else
- vl_cv_prog_cc_warnings="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd -qlanglvl=ansi"
- fi
-
- elif $CC -version 2>&1 | grep -i "MIPSpro Compilers" > /dev/null 2>&1 &&
- $CC -c -fullwarn -ansi -ansiE conftest.c > /dev/null 2>&1 &&
- test -f conftest.o; then
- if test -z "$ansi"; then
- vl_cv_prog_cc_warnings="-fullwarn"
- else
- vl_cv_prog_cc_warnings="-fullwarn -ansi -ansiE"
- fi
-
- elif what $CC 2>&1 | grep -i "HP C Compiler" > /dev/null 2>&1 &&
- $CC -c -Aa +w1 conftest.c > /dev/null 2>&1 &&
- test -f conftest.o; then
- if test -z "$ansi"; then
- vl_cv_prog_cc_warnings="+w1"
- else
- vl_cv_prog_cc_warnings="+w1 -Aa"
- fi
-
- elif $CC -V 2>&1 | grep "/SX" > /dev/null 2>&1 &&
- $CC -c -pvctl,fullmsg -Xc conftest.c > /dev/null 2>&1 &&
- test -f conftest.o; then
- if test -z "$ansi"; then
- vl_cv_prog_cc_warnings="-pvctl,fullmsg"
- else
- vl_cv_prog_cc_warnings="-pvctl,fullmsg -Xc"
- fi
-
- elif $CC -V 2>&1 | grep -i "Cray" > /dev/null 2>&1 &&
- $CC -c -h msglevel 2 conftest.c > /dev/null 2>&1 &&
- test -f conftest.o; then
- if test -z "$ansi"; then
- vl_cv_prog_cc_warnings="-h msglevel 2"
- else
- vl_cv_prog_cc_warnings="-h msglevel 2 -h conform"
- fi
-
- fi
- rm -f conftest.*
- fi
- if test -n "$vl_cv_prog_cc_warnings"; then
- CFLAGS="$CFLAGS $vl_cv_prog_cc_warnings"
- else
- vl_cv_prog_cc_warnings="unknown"
- fi
-
-fi
-echo "$as_me:$LINENO: result: $vl_cv_prog_cc_warnings" >&5
-echo "${ECHO_T}$vl_cv_prog_cc_warnings" >&6
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL=$ac_install_sh
- fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
- echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6
-fi
-
-
-
-macro_version='2.1a'
-macro_revision='1.2248'
-
-
-
-
-
-
-
-
-
-
-
-
-ltmain="$ac_aux_dir/ltmain.sh"
-
-# Set options
-
-enable_dlopen=no
-
-
-enable_win32_dll=no
-
-
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_shared=yes
-fi;
-
-
-
-
-
-
-
-
-# Check whether --enable-static or --disable-static was given.
-if test "${enable_static+set}" = set; then
- enableval="$enable_static"
- p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_static=yes
-fi;
-
-
-
-
-
-
-
-
-
-# Check whether --with-pic or --without-pic was given.
-if test "${with_pic+set}" = set; then
- withval="$with_pic"
- pic_mode="$withval"
-else
- pic_mode=default
-fi;
-
-test -z "$pic_mode" && pic_mode=default
-
-
-
-
-
-
-
-# Check whether --enable-fast-install or --disable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
- enableval="$enable_fast_install"
- p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_fast_install=yes
-fi;
-
-
-
-
-
-
-
-
-echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
-echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
-if test "${lt_cv_path_SED+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for lt_ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
- lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
- fi
- done
- done
-done
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
- test ! -f $lt_ac_sed && continue
- cat /dev/null > conftest.in
- lt_ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >conftest.in
- # Check for GNU sed and select it if it is found.
- if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
- lt_cv_path_SED=$lt_ac_sed
- break
- fi
- while true; do
- cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
- cp conftest.in conftest.nl
- echo >>conftest.nl
- $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
- cmp -s conftest.out conftest.nl || break
- # 10000 chars as input seems more than enough
- test $lt_ac_count -gt 10 && break
- lt_ac_count=`expr $lt_ac_count + 1`
- if test $lt_ac_count -gt $lt_ac_max; then
- lt_ac_max=$lt_ac_count
- lt_cv_path_SED=$lt_ac_sed
- fi
- done
-done
-
-fi
-
-SED=$lt_cv_path_SED
-
-echo "$as_me:$LINENO: result: $SED" >&5
-echo "${ECHO_T}$SED" >&6
-
-test -z "$SED" && SED=sed
-
-
-
-
-
-
-
-
-
-
-
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
-echo "$as_me:$LINENO: checking for fgrep" >&5
-echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
-if test "${ac_cv_prog_fgrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1
- then ac_cv_prog_fgrep='grep -F'
- else ac_cv_prog_fgrep='fgrep'
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_fgrep" >&5
-echo "${ECHO_T}$ac_cv_prog_fgrep" >&6
- FGREP=$ac_cv_prog_fgrep
-
-
-test -z "$GREP" && GREP=grep
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
- withval="$with_gnu_ld"
- test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi;
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- echo "$as_me:$LINENO: checking for ld used by $CC" >&5
-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | ?:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
- while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
-else
- echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
-fi
-if test "${lt_cv_path_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-
-
-
-
-
-
-
-
-echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
-echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6
-if test "${lt_cv_path_NM+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
- lt_nm_to_check="$lt_nm_to_check nm"
- fi
- for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
- done
- : ${lt_cv_path_NM=no}
-fi
-fi
-echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
-echo "${ECHO_T}$lt_cv_path_NM" >&6
-if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
-else
- # Didn't find any BSD compatible name lister, look for dumpbin.
- if test -n "$ac_tool_prefix"; then
- for ac_prog in "dumpbin -symbols" "link -dump -symbols"
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_DUMPBIN+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$DUMPBIN"; then
- ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-DUMPBIN=$ac_cv_prog_DUMPBIN
-if test -n "$DUMPBIN"; then
- echo "$as_me:$LINENO: result: $DUMPBIN" >&5
-echo "${ECHO_T}$DUMPBIN" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$DUMPBIN" && break
- done
-fi
-if test -z "$DUMPBIN"; then
- ac_ct_DUMPBIN=$DUMPBIN
- for ac_prog in "dumpbin -symbols" "link -dump -symbols"
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_DUMPBIN"; then
- ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
-if test -n "$ac_ct_DUMPBIN"; then
- echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
-echo "${ECHO_T}$ac_ct_DUMPBIN" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_DUMPBIN" && break
-done
-test -n "$ac_ct_DUMPBIN" || ac_ct_DUMPBIN=":"
-
- DUMPBIN=$ac_ct_DUMPBIN
-fi
-
-
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
- fi
-fi
-test -z "$NM" && NM=nm
-
-
-
-
-
-
-echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
-echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6
-if test "${lt_cv_nm_interface+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_nm_interface="BSD nm"
- echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:4065: $ac_compile\"" >&5)
- (eval "$ac_compile" 2>conftest.err)
- cat conftest.err >&5
- (eval echo "\"\$as_me:4068: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
- (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
- cat conftest.err >&5
- (eval echo "\"\$as_me:4071: output\"" >&5)
- cat conftest.out >&5
- if $GREP 'External.*some_variable' conftest.out > /dev/null; then
- lt_cv_nm_interface="MS dumpbin"
- fi
- rm -f conftest*
-fi
-echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
-echo "${ECHO_T}$lt_cv_nm_interface" >&6
-
-# find the maximum length of command line arguments
-echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
-echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
-
- cygwin* | mingw*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
-
- interix*)
- # We know the value 262144 and hardcode it with a safety zone (like BSD)
- lt_cv_sys_max_cmd_len=196608
- ;;
-
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- sco3.2v5*)
- lt_cv_sys_max_cmd_len=102400
- ;;
- sysv5* | sco5v6* | sysv4.2uw2*)
- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
- if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
- else
- lt_cv_sys_max_cmd_len=32768
- fi
- ;;
- *)
- # Make teststring a little bigger before we do anything with it.
- # a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
- teststring=$teststring$teststring
- done
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
- = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- # Only check the string length outside the loop.
- lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
- teststring=
- # Add a significant safety factor because C++ compilers can tack on massive
- # amounts of additional arguments before passing them to the linker.
- # It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- ;;
- esac
-
-fi
-
-if test -n $lt_cv_sys_max_cmd_len ; then
- echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
-echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
-else
- echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-
-
-
-
-
-
-: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-
-echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
-echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&6
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
- = c,a/b,, ) >/dev/null 2>&1 \
- && xsi_shell=yes
-echo "$as_me:$LINENO: result: $xsi_shell" >&5
-echo "${ECHO_T}$xsi_shell" >&6
-
-
-echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
-if test "${lt_cv_ld_reload_flag+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
- darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
- else
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- fi
- ;;
-esac
-
-
-
-
-
-
-
-
-
-
-echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
-echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
-if test "${lt_cv_deplibs_check_method+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix4* | aix5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi[45]*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin*)
- # func_win32_libid is a shell function defined in ltmain.sh
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- ;;
-
- # Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump'.
-mingw* | pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-freebsd* | kfreebsd*-gnu | dragonfly*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
- case $host_cpu in
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- hppa*64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
- ;;
- *)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- esac
- ;;
-
-interix3*)
- # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-netbsd* | knetbsd*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
- fi
- ;;
-
-newos6*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-*nto* | *qnx*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- fi
- ;;
-
-osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-rdos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.3*)
- case $host_vendor in
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- sequent)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
- ;;
- sni)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
- siemens)
- lt_cv_deplibs_check_method=pass_all
- ;;
- pc)
- lt_cv_deplibs_check_method=pass_all
- ;;
- esac
- ;;
-
-tpf*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-esac
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
-echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-
-
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
- echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_AR"; then
- ac_ct_AR=$AR
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_AR"; then
- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AR="ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
- echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- AR=$ac_ct_AR
-else
- AR="$ac_cv_prog_AR"
-fi
-
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-
-
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_STRIP="strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- STRIP=$ac_ct_STRIP
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-test -z "$STRIP" && STRIP=:
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- RANLIB=$ac_ct_RANLIB
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-test -z "$RANLIB" && RANLIB=:
-
-
-
-
-
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
-echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[BCDEGRST]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[BCDT]'
- ;;
-cygwin* | mingw* | pw32*)
- symcode='[ABCDGISTW]'
- ;;
-hpux*)
- if test "$host_cpu" = ia64; then
- symcode='[ABCDEGRST]'
- fi
- ;;
-irix* | nonstopux*)
- symcode='[BCDEGRST]'
- ;;
-osf*)
- symcode='[BCDEGQRST]'
- ;;
-solaris*)
- symcode='[BDRT]'
- ;;
-sco3.2v5*)
- symcode='[DT]'
- ;;
-sysv4.2uw2*)
- symcode='[DT]'
- ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
- symcode='[ABDT]'
- ;;
-sysv4)
- symcode='[DFNSTU]'
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
- symcode='[ABCDGIRSTW]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
- opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
- symxfrm="\\1 $ac_symprfx\\2 \\2"
-
- # Write the raw and C identifiers.
- if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function
- # and D for any global variable.
- # Also find C++ and __fastcall symbols from MSVC++,
- # which start with @ or ?.
- lt_cv_sys_global_symbol_pipe="$AWK '"\
-" {last_section=section; section=\$ 3};"\
-" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-" \$ 0!~/External *\|/{next};"\
-" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-" {if(hide[section]) next};"\
-" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-" s[1]~/^[@?]/{print s[1], s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-" ' prfx=^$ac_symprfx"
- else
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
- fi
-
- # Check to see that the pipe works correctly.
- pipe_works=no
-
- rm -f conftest*
- cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
- (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && test -s "$nlist"; then
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- else
- rm -f "$nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
- if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<_LT_EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
- # Now generate the symbol file.
- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
- cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- void *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[] =
-{
- { "@PROGRAM@", (void *) 0 },
-_LT_EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
- cat <<\_LT_EOF >> conftest.$ac_ext
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- lt_save_LIBS="$LIBS"
- lt_save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && test -s conftest${ac_exeext}; then
- pipe_works=yes
- fi
- LIBS="$lt_save_LIBS"
- CFLAGS="$lt_save_CFLAGS"
- else
- echo "cannot find nm_test_func in $nlist" >&5
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&5
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
- fi
- else
- echo "$progname: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
- break
- else
- lt_cv_sys_global_symbol_pipe=
- fi
-done
-
-fi
-
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- echo "$as_me:$LINENO: result: failed" >&5
-echo "${ECHO_T}failed" >&6
-else
- echo "$as_me:$LINENO: result: ok" >&5
-echo "${ECHO_T}ok" >&6
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
-
-fi;
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 5062 "configure"' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*|s390*-*tpf*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
-if test "${lt_cv_cc_needs_belf+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- lt_cv_cc_needs_belf=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-lt_cv_cc_needs_belf=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-sparc*-*solaris*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case `/usr/bin/file conftest.o` in
- *64-bit*)
- case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *) LD="${LD-ld} -64" ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-esac
-
-need_locks="$enable_libtool_lock"
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
-else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_stdc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_stdc=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then
- :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then
- :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then
- :
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ctype.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- exit(2);
- exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-for ac_header in dlfcn.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-test -z "$LN_S" && LN_S="ln -s"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-echo "$as_me:$LINENO: checking for objdir" >&5
-echo $ECHO_N "checking for objdir... $ECHO_C" >&6
-if test "${lt_cv_objdir+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- lt_cv_objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-fi
-echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
-echo "${ECHO_T}$lt_cv_objdir" >&6
-objdir=$lt_cv_objdir
-
-
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define LT_OBJDIR "$lt_cv_objdir/"
-_ACEOF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $MAGIC_CMD in
-[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-
-
-
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- echo "$as_me:$LINENO: checking for file" >&5
-echo $ECHO_N "checking for file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $MAGIC_CMD in
-[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-
- else
- MAGIC_CMD=:
- fi
-fi
-
- fi
- ;;
-esac
-
-# Use C for the default configuration in the libtool script
-
-lt_save_CC="$CC"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-objext=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}\n'
-
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM conftest*
-
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
-
-lt_prog_compiler_no_builtin_flag=
-
-if test "$GCC" = yes; then
- lt_prog_compiler_no_builtin_flag=' -fno-builtin'
-
- echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_prog_compiler_rtti_exceptions=no
- ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="-fno-rtti -fno-exceptions"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6152: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:6156: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_rtti_exceptions=yes
- fi
- fi
- $RM conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
-
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
- lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
-else
- :
-fi
-
-fi
-
-
-
-
-
-
- lt_prog_compiler_wl=
-lt_prog_compiler_pic=
-lt_prog_compiler_static=
-
-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
-
- if test "$GCC" = yes; then
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_static='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static='-Bstatic'
- fi
- ;;
-
- amigaos*)
- if test "$host_cpu" = m68k; then
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
- fi
- ;;
-
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
-
- mingw* | pw32* | os2*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- lt_prog_compiler_pic='-DDLL_EXPORT'
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_prog_compiler_pic='-fno-common'
- ;;
-
- hpux*)
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic='-fPIC'
- ;;
- esac
- ;;
-
- interix3*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
-
- msdosdjgpp*)
- # Just because we use GCC doesn't mean we suddenly get shared libraries
- # on systems that don't support them.
- lt_prog_compiler_can_build_shared=no
- enable_shared=no
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic='-fPIC -shared'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- lt_prog_compiler_pic=-Kconform_pic
- fi
- ;;
-
- *)
- lt_prog_compiler_pic='-fPIC'
- ;;
- esac
- else
- # PORTME Check for flag to pass linker flags through the system compiler.
- case $host_os in
- aix*)
- lt_prog_compiler_wl='-Wl,'
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static='-Bstatic'
- else
- lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- darwin*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- case $cc_basename in
- xlc*)
- lt_prog_compiler_pic='-qnocommon'
- lt_prog_compiler_wl='-Wl,'
- ;;
- esac
- ;;
-
- mingw* | pw32* | os2*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- lt_prog_compiler_pic='-DDLL_EXPORT'
- ;;
-
- hpux9* | hpux10* | hpux11*)
- lt_prog_compiler_wl='-Wl,'
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic='+Z'
- ;;
- esac
- # Is there a better lt_prog_compiler_static that works with the bundled CC?
- lt_prog_compiler_static='${wl}-a ${wl}archive'
- ;;
-
- irix5* | irix6* | nonstopux*)
- lt_prog_compiler_wl='-Wl,'
- # PIC (with -KPIC) is the default.
- lt_prog_compiler_static='-non_shared'
- ;;
-
- linux*)
- case $cc_basename in
- icc* | ecc*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-static'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-fpic'
- lt_prog_compiler_static='-Bstatic'
- ;;
- ccc*)
- lt_prog_compiler_wl='-Wl,'
- # All Alpha code is PIC.
- lt_prog_compiler_static='-non_shared'
- ;;
- esac
- ;;
-
- newsos6)
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic='-fPIC -shared'
- ;;
-
- osf3* | osf4* | osf5*)
- lt_prog_compiler_wl='-Wl,'
- # All OSF/1 code is PIC.
- lt_prog_compiler_static='-non_shared'
- ;;
-
- rdos*)
- lt_prog_compiler_static='-non_shared'
- ;;
-
- solaris*)
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- case $cc_basename in
- f77* | f90* | f95*)
- lt_prog_compiler_wl='-Qoption ld ';;
- *)
- lt_prog_compiler_wl='-Wl,';;
- esac
- ;;
-
- sunos4*)
- lt_prog_compiler_wl='-Qoption ld '
- lt_prog_compiler_pic='-PIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- lt_prog_compiler_pic='-Kconform_pic'
- lt_prog_compiler_static='-Bstatic'
- fi
- ;;
-
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- unicos*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_can_build_shared=no
- ;;
-
- uts4*)
- lt_prog_compiler_pic='-pic'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- *)
- lt_prog_compiler_can_build_shared=no
- ;;
- esac
- fi
-
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- lt_prog_compiler_pic=
- ;;
- *)
- lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
- ;;
-esac
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic" >&6
-
-
-
-
-
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic"; then
- echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
-if test "${lt_prog_compiler_pic_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_prog_compiler_pic_works=no
- ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6456: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:6460: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_pic_works=yes
- fi
- fi
- $RM conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
-
-if test x"$lt_prog_compiler_pic_works" = xyes; then
- case $lt_prog_compiler_pic in
- "" | " "*) ;;
- *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
- esac
-else
- lt_prog_compiler_pic=
- lt_prog_compiler_can_build_shared=no
-fi
-
-fi
-
-
-
-
-
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
-if test "${lt_prog_compiler_static_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_prog_compiler_static_works=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&5
- $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_static_works=yes
- fi
- else
- lt_prog_compiler_static_works=yes
- fi
- fi
- $RM conftest*
- LDFLAGS="$save_LDFLAGS"
-
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
-
-if test x"$lt_prog_compiler_static_works" = xyes; then
- :
-else
- lt_prog_compiler_static=
-fi
-
-
-
-
-
-
-
- echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_prog_compiler_c_o=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6561: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:6565: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
-
-
-
-
-
-
- echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_prog_compiler_c_o=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6616: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:6620: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
-
-
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
- hard_links=yes
- $RM conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6
- if test "$hard_links" = no; then
- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-
-
-
-
-
-
- echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
-
- runpath_var=
- allow_undefined_flag=
- always_export_symbols=no
- archive_cmds=
- archive_expsym_cmds=
- enable_shared_with_static_runtimes=no
- export_dynamic_flag_spec=
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- hardcode_automatic=no
- hardcode_direct=no
- hardcode_libdir_flag_spec=
- hardcode_libdir_flag_spec_ld=
- hardcode_libdir_separator=
- hardcode_minus_L=no
- hardcode_shlibpath_var=unsupported
- inherit_rpath=no
- link_all_deplibs=unknown
- module_cmds=
- module_expsym_cmds=
- old_archive_from_new_cmds=
- old_archive_from_expsyms_cmds=
- thread_safe_flag_spec=
- whole_archive_flag_spec=
- # include_expsyms should be a list of space-separated symbols to be *always*
- # included in the symbol list
- include_expsyms=
- # exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
- exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
- # platforms (ab)use it in PIC code, but their linkers get confused if
- # the symbol is explicitly referenced. Since portable code cannot
- # rely on this symbol name, it's probably fine to never include it in
- # preloaded symbol tables.
- extract_expsyms_cmds=
-
- case $host_os in
- cygwin* | mingw* | pw32*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
- esac
-
- ld_shlibs=yes
- if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec='${wl}--export-dynamic'
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec=
- fi
- supports_anon_versioning=no
- case `$LD -v 2>&1` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix3* | aix4* | aix5*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-_LT_EOF
- fi
- ;;
-
- amigaos*)
- if test "$host_cpu" = m68k; then
- archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- fi
-
- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
- # that the semantics of dynamic libraries on AmigaOS, at least up
- # to version 4, is to share data among multiple programs linked
- # with the same dynamic library. Since this doesn't match the
- # behavior of shared libraries on other platforms, we can't use
- # them.
- ld_shlibs=no
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- cygwin* | mingw* | pw32*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
- # as there is no search path for DLLs.
- hardcode_libdir_flag_spec='-L$libdir'
- allow_undefined_flag=unsupported
- always_export_symbols=no
- enable_shared_with_static_runtimes=yes
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- interix3*)
- hardcode_direct=no
- hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
-
- linux*|tpf*)
- tmp_diet=no
- if test "$host_os" = linux-dietlibc; then
- case $cc_basename in
- diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
- esac
- fi
- if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test "$tmp_diet" = no
- then
- tmp_addflag=
- case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
- tmp_addflag=' -i_dynamic' ;;
- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
- tmp_addflag=' -i_dynamic -nofor_main' ;;
- ifc* | ifort*) # Intel Fortran compiler
- tmp_addflag=' -nofor_main' ;;
- esac
-
- archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
- if test "x$supports_anon_versioning" = xyes; then
- archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~echo "local: *; };" >> $output_objdir/$libname.ver~$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
- else
- ld_shlibs=no
- fi
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- ;;
- *)
- # For security reasons, it is highly recommended that you always
- # use absolute paths for naming shared libraries, and exclude the
- # DT_RUNPATH tag from executables and libraries. But doing so
- # requires that you compile everything twice, which is a pain.
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
- esac
- ;;
-
- sunos4*)
- archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- *)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
- esac
-
- if test "$ld_shlibs" = no; then
- runpath_var=
- hardcode_libdir_flag_spec=
- export_dynamic_flag_spec=
- whole_archive_flag_spec=
- fi
- else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- allow_undefined_flag=unsupported
- always_export_symbols=yes
- archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- hardcode_minus_L=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct=unsupported
- fi
- ;;
-
- aix4* | aix5*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix5*)
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- archive_cmds=''
- hardcode_direct=yes
- hardcode_libdir_separator=':'
- link_all_deplibs=yes
- file_list_spec='${wl}-f,'
-
- if test "$GCC" = yes; then
- case $host_os in aix4.[012]|aix4.[012].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- hardcode_direct=yes
- else
- # We have old collect2
- hardcode_direct=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- hardcode_minus_L=yes
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_libdir_separator=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- always_export_symbols=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- allow_undefined_flag='-berok'
- # Determine the default libpath from the value encoded in an
- # empty executable.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
- allow_undefined_flag="-z nodefs"
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- no_undefined_flag=' ${wl}-bernotok'
- allow_undefined_flag=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec='$convenience'
- archive_cmds_need_lc=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- if test "$host_cpu" = m68k; then
- archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- fi
- # see comment about different semantics on the GNU ld section
- ld_shlibs=no
- ;;
-
- bsdi[45]*)
- export_dynamic_flag_spec=-rdynamic
- ;;
-
- cygwin* | mingw* | pw32*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec=' '
- allow_undefined_flag=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- old_archive_from_new_cmds='true'
- # FIXME: Should let the user specify the lib program.
- old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
- fix_srcfile_path='`cygpath -w "$srcfile"`'
- enable_shared_with_static_runtimes=yes
- ;;
-
- darwin* | rhapsody*)
- case $host_os in
- rhapsody* | darwin1.[012])
- allow_undefined_flag='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
- 10.[012])
- allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- ;;
- esac
- archive_cmds_need_lc=no
- hardcode_direct=no
- hardcode_automatic=yes
- hardcode_shlibpath_var=unsupported
- whole_archive_flag_spec=''
- link_all_deplibs=yes
- if test "$GCC" = yes ; then
- if test "${lt_cv_apple_cc_single_mod+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
- # By default we will add the -single_module flag. You can override
- # by either setting the environment variable LT_MULTI_MODULE
- # non-empty at configure time, or by adding -multi-module to the
- # link flags.
- echo "int foo(void){return 1;}" > conftest.c
- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
- -dynamiclib ${wl}-single_module conftest.c
- if test -f libconftest.dylib; then
- lt_cv_apple_cc_single_mod=yes
- rm libconftest.dylib
- fi
- rm conftest.$ac_ext
- fi
-fi
-
- output_verbose_link_cmd=echo
- if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
- archive_cmds='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $single_module -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- module_expsym_cmds='sed -e "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- case $cc_basename in
- xlc*)
- output_verbose_link_cmd=echo
- archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $verstring'
- module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- module_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- ;;
- *)
- ld_shlibs=no
- ;;
- esac
- fi
- ;;
-
- dgux*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- freebsd1*)
- ld_shlibs=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu | dragonfly*)
- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- hpux9*)
- if test "$GCC" = yes; then
- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- fi
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- export_dynamic_flag_spec='${wl}-E'
- ;;
-
- hpux10*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
- fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_flag_spec_ld='+b $libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
- export_dynamic_flag_spec='${wl}-E'
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- fi
- ;;
-
- hpux11*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case $host_cpu in
- hppa*64*)
- archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- else
- case $host_cpu in
- hppa*64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- hardcode_direct=no
- hardcode_shlibpath_var=no
- ;;
- *)
- hardcode_direct=yes
- export_dynamic_flag_spec='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- ;;
- esac
- fi
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- # Try to use the -exported_symbol ld option, if it does not
- # work, assume that -exports_file does not work either and
- # implicitly export all symbols.
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
- cat >conftest.$ac_ext <<_ACEOF
-int foo(void) {}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
- else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- inherit_rpath=yes
- link_all_deplibs=yes
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- newsos6)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_shlibpath_var=no
- ;;
-
- *nto* | *qnx*)
- ;;
-
- openbsd*)
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
- else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- *)
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- ;;
-
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- allow_undefined_flag=unsupported
- archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared${allow_undefined_flag} -input $lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-
- # Both c and cxx compiler support -rpath directly
- hardcode_libdir_flag_spec='-rpath $libdir'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_separator=:
- ;;
-
- solaris*)
- no_undefined_flag=' -z defs'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- else
- case `$CC -V 2>&1` in
- *"Compilers 5.0"*)
- wlarc=''
- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
- ;;
- *)
- wlarc='${wl}'
- archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- ;;
- esac
- fi
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_shlibpath_var=no
- case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *)
- # The compiler driver will combine linker options so we
- # cannot just pass the convenience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- case $wlarc in
- '')
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
- *)
- whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
- esac
- link_all_deplibs=yes
- ;;
-
- sunos4*)
- if test "x$host_vendor" = xsequent; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- sysv4)
- case $host_vendor in
- sni)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes # is this really true???
- ;;
- siemens)
- ## LD is ld it makes a PLAMLIB
- ## CC just makes a GrossModule.
- archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- reload_cmds='$CC -r -o $output$reload_objs'
- hardcode_direct=no
- ;;
- motorola)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var=no
- ;;
-
- sysv4.3*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- export_dynamic_flag_spec='-Bexport'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ld_shlibs=yes
- fi
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag='${wl}-z,text'
- archive_cmds_need_lc=no
- hardcode_shlibpath_var=no
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- no_undefined_flag='${wl}-z,text'
- allow_undefined_flag='${wl}-z,nodefs'
- archive_cmds_need_lc=no
- hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-R,$libdir'
- hardcode_libdir_separator=':'
- link_all_deplibs=yes
- export_dynamic_flag_spec='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- uts4*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- *)
- ld_shlibs=no
- ;;
- esac
-
- if test x$host_vendor = xsni; then
- case $host in
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- export_dynamic_flag_spec='${wl}-Blargedynsym'
- ;;
- esac
- fi
- fi
-
-echo "$as_me:$LINENO: result: $ld_shlibs" >&5
-echo "${ECHO_T}$ld_shlibs" >&6
-test "$ld_shlibs" = no && can_build_shared=no
-
-with_gnu_ld=$with_gnu_ld
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc" in
-x|xyes)
- # Assume -lc should be added
- archive_cmds_need_lc=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $archive_cmds in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
- $RM conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_prog_compiler_wl
- pic_flag=$lt_prog_compiler_pic
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$allow_undefined_flag
- allow_undefined_flag=
- if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
- (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
- then
- archive_cmds_need_lc=no
- else
- archive_cmds_need_lc=yes
- fi
- allow_undefined_flag=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $RM conftest*
- echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
-echo "${ECHO_T}$archive_cmds_need_lc" >&6
- ;;
- esac
- fi
- ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
-withGCC=$GCC
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$withGCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$sys_lib_search_path_spec" | $GREP ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix4* | aix5*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[01] | aix4.[01].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- if test "$host_cpu" = m68k; then
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- else
- dynamic_linker=no
- fi
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[45]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $withGCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$withGCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | $GREP "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-kfreebsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[123]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[01]* | freebsdelf3.[01]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
- freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- freebsd*) # from 4.6 on
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-interix3*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-knetbsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-*nto* | *qnx*)
- version_type=qnx
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='ldqnx.so'
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[89] | openbsd2.[89].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-tpf*)
- # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" ||
- test -n "$runpath_var" ||
- test "X$hardcode_automatic" = "Xyes" ; then
-
- # We can hardcode non-existent directories.
- if test "$hardcode_direct" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
- test "$hardcode_minus_L" != no; then
- # Linking always hardcodes the temporary library directory.
- hardcode_action=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- hardcode_action=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- hardcode_action=unsupported
-fi
-echo "$as_me:$LINENO: result: $hardcode_action" >&5
-echo "${ECHO_T}$hardcode_action" >&6
-
-if test "$hardcode_action" = relink ||
- test "$inherit_rpath" = yes; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-
-
-
-
-
-
- if test "x$enable_dlopen" != xyes; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-else
- lt_cv_dlopen=no
- lt_cv_dlopen_libs=
-
- case $host_os in
- beos*)
- lt_cv_dlopen="load_add_on"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
- mingw* | pw32*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- cygwin*)
- lt_cv_dlopen="dlopen"
- lt_cv_dlopen_libs=
- ;;
-
- darwin*)
- # if libdl is installed we need to link against it
- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dl_dlopen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dl_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
-if test $ac_cv_lib_dl_dlopen = yes; then
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
-
-fi
-
- ;;
-
- *)
- echo "$as_me:$LINENO: checking for shl_load" >&5
-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
-if test "${ac_cv_func_shl_load+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define shl_load innocuous_shl_load
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char shl_load (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef shl_load
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char shl_load ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_shl_load) || defined (__stub___shl_load)
-choke me
-#else
-char (*f) () = shl_load;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != shl_load;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_shl_load=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_shl_load=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
-echo "${ECHO_T}$ac_cv_func_shl_load" >&6
-if test $ac_cv_func_shl_load = yes; then
- lt_cv_dlopen="shl_load"
-else
- echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char shl_load ();
-int
-main ()
-{
-shl_load ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dld_shl_load=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dld_shl_load=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
-if test $ac_cv_lib_dld_shl_load = yes; then
- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
-else
- echo "$as_me:$LINENO: checking for dlopen" >&5
-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
-if test "${ac_cv_func_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define dlopen innocuous_dlopen
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char dlopen (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef dlopen
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_dlopen) || defined (__stub___dlopen)
-choke me
-#else
-char (*f) () = dlopen;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != dlopen;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_dlopen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
-echo "${ECHO_T}$ac_cv_func_dlopen" >&6
-if test $ac_cv_func_dlopen = yes; then
- lt_cv_dlopen="dlopen"
-else
- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dl_dlopen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dl_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
-if test $ac_cv_lib_dl_dlopen = yes; then
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
- echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
-echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_svld_dlopen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_svld_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
-if test $ac_cv_lib_svld_dlopen = yes; then
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
-else
- echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
-echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dld_link ();
-int
-main ()
-{
-dld_link ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dld_dld_link=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dld_dld_link=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
-if test $ac_cv_lib_dld_dld_link = yes; then
- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
- ;;
- esac
-
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
- enable_dlopen=no
- fi
-
- case $lt_cv_dlopen in
- dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS="$LDFLAGS"
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
-echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
-if test "${lt_cv_dlopen_self+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then :
- lt_cv_dlopen_self=cross
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-#line 9311 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- exit (status);
-}
-_LT_EOF
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&5 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
- x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
- x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self" >&6
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
-echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
-if test "${lt_cv_dlopen_self_static+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then :
- lt_cv_dlopen_self_static=cross
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-#line 9411 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- exit (status);
-}
-_LT_EOF
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&5 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
- x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
- x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self_static=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
- fi
-
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
- ;;
- esac
-
- case $lt_cv_dlopen_self in
- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
- *) enable_dlopen_self=unknown ;;
- esac
-
- case $lt_cv_dlopen_self_static in
- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
- *) enable_dlopen_self_static=unknown ;;
- esac
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-striplib=
-old_striplib=
-echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP" ; then
- striplib="$STRIP -x"
- old_striplib="$STRIP -S"
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- fi
- ;;
- *)
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- ;;
- esac
-fi
-
-
-
-
-
-
-
-
-
-
-
-
- # Report which library types will actually be built
- echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $can_build_shared" >&5
-echo "${ECHO_T}$can_build_shared" >&6
-
- echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
- aix4* | aix5*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6
-
- echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- echo "$as_me:$LINENO: result: $enable_static" >&5
-echo "${ECHO_T}$enable_static" >&6
-
-
-
-
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
-
-
-
-
-
-
-
-
-
-
-
-
-
- ac_config_commands="$ac_config_commands libtool"
-
-
-
-
-# Only expand once:
-
-
-enable_win32_dll=yes
-
-case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AS+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-AS=$ac_cv_prog_AS
-if test -n "$AS"; then
- echo "$as_me:$LINENO: result: $AS" >&5
-echo "${ECHO_T}$AS" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_AS"; then
- ac_ct_AS=$AS
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_AS"; then
- ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AS="as"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false"
-fi
-fi
-ac_ct_AS=$ac_cv_prog_ac_ct_AS
-if test -n "$ac_ct_AS"; then
- echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
-echo "${ECHO_T}$ac_ct_AS" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- AS=$ac_ct_AS
-else
- AS="$ac_cv_prog_AS"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_DLLTOOL+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-DLLTOOL=$ac_cv_prog_DLLTOOL
-if test -n "$DLLTOOL"; then
- echo "$as_me:$LINENO: result: $DLLTOOL" >&5
-echo "${ECHO_T}$DLLTOOL" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_DLLTOOL"; then
- ac_ct_DLLTOOL=$DLLTOOL
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_DLLTOOL"; then
- ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_DLLTOOL="dlltool"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false"
-fi
-fi
-ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
-if test -n "$ac_ct_DLLTOOL"; then
- echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
-echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- DLLTOOL=$ac_ct_DLLTOOL
-else
- DLLTOOL="$ac_cv_prog_DLLTOOL"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_OBJDUMP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-OBJDUMP=$ac_cv_prog_OBJDUMP
-if test -n "$OBJDUMP"; then
- echo "$as_me:$LINENO: result: $OBJDUMP" >&5
-echo "${ECHO_T}$OBJDUMP" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_OBJDUMP"; then
- ac_ct_OBJDUMP=$OBJDUMP
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_OBJDUMP"; then
- ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_OBJDUMP="objdump"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false"
-fi
-fi
-ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
-if test -n "$ac_ct_OBJDUMP"; then
- echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
-echo "${ECHO_T}$ac_ct_OBJDUMP" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- OBJDUMP=$ac_ct_OBJDUMP
-else
- OBJDUMP="$ac_cv_prog_OBJDUMP"
-fi
-
- ;;
-esac
-
-test -z "$AS" && AS=as
-
-
-
-
-
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-
-
-
-
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-
-
-
-
-
-
-
-
-
-echo "$as_me:$LINENO: checking for main in -lc" >&5
-echo $ECHO_N "checking for main in -lc... $ECHO_C" >&6
-if test "${ac_cv_lib_c_main+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-
-int
-main ()
-{
-main ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_c_main=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_c_main=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_c_main" >&5
-echo "${ECHO_T}$ac_cv_lib_c_main" >&6
-if test $ac_cv_lib_c_main = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBC 1
-_ACEOF
-
- LIBS="-lc $LIBS"
-
-fi
-
-
-case "$target_os" in
- cygwin* | mingw32* | beos* | darwin*)
- ;;
- *)
-
-echo "$as_me:$LINENO: checking for main in -lm" >&5
-echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
-if test "${ac_cv_lib_m_main+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-
-int
-main ()
-{
-main ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_m_main=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_m_main=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
-echo "${ECHO_T}$ac_cv_lib_m_main" >&6
-if test $ac_cv_lib_m_main = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBM 1
-_ACEOF
-
- LIBS="-lm $LIBS"
-
-fi
-
- ;;
-esac
-
-
-
-
-
-
-
-
-for ac_header in assert.h fcntl.h limits.h malloc.h search.h sys/time.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## -------------------------------------- ##
-## Report this to tiff@lists.maptools.org ##
-## -------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-if test "${ac_cv_c_const+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
- typedef int charset[2];
- const charset x;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *ccp;
- char **p;
- /* NEC SVR4.0.2 mips cc rejects this. */
- struct point {int x, y;};
- static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in
- an arm of an if-expression whose if-part is not a constant
- expression */
- const char *g = "string";
- ccp = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++ccp;
- p = (char**) ccp;
- ccp = (char const *const *) p;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
- }
- { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
- }
- { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
- }
- { /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
- }
- { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
- }
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_const=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_const=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
-if test $ac_cv_c_const = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define const
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6
-if test "${ac_cv_c_inline+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#endif
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_inline=$ac_kw; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-echo "${ECHO_T}$ac_cv_c_inline" >&6
-
-
-case $ac_cv_c_inline in
- inline | yes) ;;
- *)
- case $ac_cv_c_inline in
- no) ac_val=;;
- *) ac_val=$ac_cv_c_inline;;
- esac
- cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
-echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
-if test "${ac_cv_c_bigendian+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # See if sys/param.h defines the BYTE_ORDER macro.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/param.h>
-
-int
-main ()
-{
-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
- bogus endian macros
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- # It does; now see whether it defined to BIG_ENDIAN or not.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/param.h>
-
-int
-main ()
-{
-#if BYTE_ORDER != BIG_ENDIAN
- not big endian
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_bigendian=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_bigendian=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-# It does not; compile a test program.
-if test "$cross_compiling" = yes; then
- # try to guess the endianness by grepping values into an object file
- ac_cv_c_bigendian=unknown
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
-short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
-int
-main ()
-{
- _ascii (); _ebcdic ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
- ac_cv_c_bigendian=yes
-fi
-if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
- if test "$ac_cv_c_bigendian" = unknown; then
- ac_cv_c_bigendian=no
- else
- # finding both strings is unlikely to happen, but who knows?
- ac_cv_c_bigendian=unknown
- fi
-fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-main ()
-{
- /* Are we little or big endian? From Harbison&Steele. */
- union
- {
- long l;
- char c[sizeof (long)];
- } u;
- u.l = 1;
- exit (u.c[sizeof (long) - 1] == 1);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_bigendian=no
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_c_bigendian=yes
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
-echo "${ECHO_T}$ac_cv_c_bigendian" >&6
-case $ac_cv_c_bigendian in
- yes)
-
-cat >>confdefs.h <<\_ACEOF
-#define WORDS_BIGENDIAN 1
-_ACEOF
- ;;
- no)
- ;;
- *)
- { { echo "$as_me:$LINENO: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&5
-echo "$as_me: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-
-echo "$as_me:$LINENO: checking for off_t" >&5
-echo $ECHO_N "checking for off_t... $ECHO_C" >&6
-if test "${ac_cv_type_off_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((off_t *) 0)
- return 0;
-if (sizeof (off_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_off_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_off_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
-echo "${ECHO_T}$ac_cv_type_off_t" >&6
-if test $ac_cv_type_off_t = yes; then
- :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define off_t long
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-if test "${ac_cv_type_size_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((size_t *) 0)
- return 0;
-if (sizeof (size_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_size_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_size_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
-if test $ac_cv_type_size_t = yes; then
- :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for int" >&5
-echo $ECHO_N "checking for int... $ECHO_C" >&6
-if test "${ac_cv_type_int+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((int *) 0)
- return 0;
-if (sizeof (int))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_int=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_int=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
-echo "${ECHO_T}$ac_cv_type_int" >&6
-
-echo "$as_me:$LINENO: checking size of int" >&5
-echo $ECHO_N "checking size of int... $ECHO_C" >&6
-if test "${ac_cv_sizeof_int+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$ac_cv_type_int" = yes; then
- # The cast to unsigned long works around a bug in the HP C Compiler
- # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
- # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
- # This bug is HP SR number 8606223364.
- if test "$cross_compiling" = yes; then
- # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_lo=0 ac_mid=0
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr $ac_mid + 1`
- if test $ac_lo -le $ac_mid; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=-1 ac_mid=-1
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_lo=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_hi=`expr '(' $ac_mid ')' - 1`
- if test $ac_mid -le $ac_hi; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo= ac_hi=
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=$ac_mid
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_int=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (int), 77
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-else
- if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
-echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
- { (exit 1); exit 1; }; }
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-long longval () { return (long) (sizeof (int)); }
-unsigned long ulongval () { return (long) (sizeof (int)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
- FILE *f = fopen ("conftest.val", "w");
- if (! f)
- exit (1);
- if (((long) (sizeof (int))) < 0)
- {
- long i = longval ();
- if (i != ((long) (sizeof (int))))
- exit (1);
- fprintf (f, "%ld\n", i);
- }
- else
- {
- unsigned long i = ulongval ();
- if (i != ((long) (sizeof (int))))
- exit (1);
- fprintf (f, "%lu\n", i);
- }
- exit (ferror (f) || fclose (f) != 0);
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_sizeof_int=`cat conftest.val`
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (int), 77
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.val
-else
- ac_cv_sizeof_int=0
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
-echo "${ECHO_T}$ac_cv_sizeof_int" >&6
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
-
-
-echo "$as_me:$LINENO: checking for long" >&5
-echo $ECHO_N "checking for long... $ECHO_C" >&6
-if test "${ac_cv_type_long+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((long *) 0)
- return 0;
-if (sizeof (long))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_long=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_long=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
-echo "${ECHO_T}$ac_cv_type_long" >&6
-
-echo "$as_me:$LINENO: checking size of long" >&5
-echo $ECHO_N "checking size of long... $ECHO_C" >&6
-if test "${ac_cv_sizeof_long+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$ac_cv_type_long" = yes; then
- # The cast to unsigned long works around a bug in the HP C Compiler
- # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
- # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
- # This bug is HP SR number 8606223364.
- if test "$cross_compiling" = yes; then
- # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_lo=0 ac_mid=0
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr $ac_mid + 1`
- if test $ac_lo -le $ac_mid; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=-1 ac_mid=-1
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_lo=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_hi=`expr '(' $ac_mid ')' - 1`
- if test $ac_mid -le $ac_hi; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo= ac_hi=
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=$ac_mid
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_long=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long), 77
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-else
- if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
-echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
- { (exit 1); exit 1; }; }
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-long longval () { return (long) (sizeof (long)); }
-unsigned long ulongval () { return (long) (sizeof (long)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
- FILE *f = fopen ("conftest.val", "w");
- if (! f)
- exit (1);
- if (((long) (sizeof (long))) < 0)
- {
- long i = longval ();
- if (i != ((long) (sizeof (long))))
- exit (1);
- fprintf (f, "%ld\n", i);
- }
- else
- {
- unsigned long i = ulongval ();
- if (i != ((long) (sizeof (long))))
- exit (1);
- fprintf (f, "%lu\n", i);
- }
- exit (ferror (f) || fclose (f) != 0);
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_sizeof_long=`cat conftest.val`
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long), 77
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.val
-else
- ac_cv_sizeof_long=0
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
-echo "${ECHO_T}$ac_cv_sizeof_long" >&6
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
-
-echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
-echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
-if test "${ac_cv_header_time+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-
-int
-main ()
-{
-if ((struct tm *) 0)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_time=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_time=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
-echo "${ECHO_T}$ac_cv_header_time" >&6
-if test $ac_cv_header_time = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define TIME_WITH_SYS_TIME 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
-echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
-if test "${ac_cv_struct_tm+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <time.h>
-
-int
-main ()
-{
-struct tm *tp; tp->tm_sec;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_struct_tm=time.h
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_struct_tm=sys/time.h
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
-echo "${ECHO_T}$ac_cv_struct_tm" >&6
-if test $ac_cv_struct_tm = sys/time.h; then
-
-cat >>confdefs.h <<\_ACEOF
-#define TM_IN_SYS_TIME 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for int8" >&5
-echo $ECHO_N "checking for int8... $ECHO_C" >&6
-if test "${ac_cv_type_int8+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-
-
-int
-main ()
-{
-if ((int8 *) 0)
- return 0;
-if (sizeof (int8))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_int8=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_int8=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
-echo "${ECHO_T}$ac_cv_type_int8" >&6
-if test $ac_cv_type_int8 = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT8 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for int16" >&5
-echo $ECHO_N "checking for int16... $ECHO_C" >&6
-if test "${ac_cv_type_int16+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-
-
-int
-main ()
-{
-if ((int16 *) 0)
- return 0;
-if (sizeof (int16))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_int16=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_int16=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int16" >&5
-echo "${ECHO_T}$ac_cv_type_int16" >&6
-if test $ac_cv_type_int16 = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT16 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for int32" >&5
-echo $ECHO_N "checking for int32... $ECHO_C" >&6
-if test "${ac_cv_type_int32+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-
-
-int
-main ()
-{
-if ((int32 *) 0)
- return 0;
-if (sizeof (int32))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_int32=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_int32=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int32" >&5
-echo "${ECHO_T}$ac_cv_type_int32" >&6
-if test $ac_cv_type_int32 = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT32 1
-_ACEOF
-
-
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in floor isascii memmove memset mmap pow sqrt strchr strrchr strstr strtol
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
-for ac_func in getopt
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- case $LIBOBJS in
- "$ac_func.$ac_objext" | \
- *" $ac_func.$ac_objext" | \
- "$ac_func.$ac_objext "* | \
- *" $ac_func.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
-esac
-
-fi
-done
-
-
-
-for ac_func in strcasecmp
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- case $LIBOBJS in
- "$ac_func.$ac_objext" | \
- *" $ac_func.$ac_objext" | \
- "$ac_func.$ac_objext "* | \
- *" $ac_func.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
-esac
-
-fi
-done
-
-
-
-for ac_func in strtoul
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- case $LIBOBJS in
- "$ac_func.$ac_objext" | \
- *" $ac_func.$ac_objext" | \
- "$ac_func.$ac_objext "* | \
- *" $ac_func.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
-esac
-
-fi
-done
-
-
-
-for ac_func in lfind
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- case $LIBOBJS in
- "$ac_func.$ac_objext" | \
- *" $ac_func.$ac_objext" | \
- "$ac_func.$ac_objext "* | \
- *" $ac_func.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
-esac
-
-fi
-done
-
-
-
-echo "$as_me:$LINENO: checking native cpu bit order" >&5
-echo $ECHO_N "checking native cpu bit order... $ECHO_C" >&6
-case "$target_cpu" in
- i*86*)
- HOST_FILLORDER=FILLORDER_LSB2MSB
- echo "$as_me:$LINENO: result: lsb2msb" >&5
-echo "${ECHO_T}lsb2msb" >&6
- ;;
- *)
- HOST_FILLORDER=FILLORDER_MSB2LSB
- echo "$as_me:$LINENO: result: msb2lsb" >&5
-echo "${ECHO_T}msb2lsb" >&6
- ;;
-esac
-
-cat >>confdefs.h <<_ACEOF
-#define HOST_FILLORDER $HOST_FILLORDER
-_ACEOF
-
-
-if test "$ac_cv_c_bigendian" = yes ; then
- HOST_BIGENDIAN=1
-else
- HOST_BIGENDIAN=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HOST_BIGENDIAN $HOST_BIGENDIAN
-_ACEOF
-
-
-#_POSIX_C_SOURCE=2
-#AC_DEFINE_UNQUOTED(_POSIX_C_SOURCE, $_POSIX_C_SOURCE, [Define this macro to a positive integer to control which POSIX functionality is made available.])
-
-HAVE_IEEEFP=1
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_IEEEFP $HAVE_IEEEFP
-_ACEOF
-
-
-
-# Check whether --enable-rpath or --disable-rpath was given.
-if test "${enable_rpath+set}" = set; then
- enableval="$enable_rpath"
- HAVE_RPATH=$enableval
-else
- HAVE_RPATH=no
-fi;
-
-
-if test "$HAVE_RPATH" = "yes"; then
- HAVE_RPATH_TRUE=
- HAVE_RPATH_FALSE='#'
-else
- HAVE_RPATH_TRUE='#'
- HAVE_RPATH_FALSE=
-fi
-
-
-
-# Check whether --enable-largefile or --disable-largefile was given.
-if test "${enable_largefile+set}" = set; then
- enableval="$enable_largefile"
-
-fi;
-if test "$enable_largefile" != no; then
-
- echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
-echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
-if test "${ac_cv_sys_largefile_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_sys_largefile_CC=no
- if test "$GCC" != yes; then
- ac_save_CC=$CC
- while :; do
- # IRIX 6.2 and later do not support large files by default,
- # so use the C compiler's -n32 option if that helps.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
- CC="$CC -n32"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_sys_largefile_CC=' -n32'; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
- break
- done
- CC=$ac_save_CC
- rm -f conftest.$ac_ext
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
-echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
- if test "$ac_cv_sys_largefile_CC" != no; then
- CC=$CC$ac_cv_sys_largefile_CC
- fi
-
- echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
-echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
-if test "${ac_cv_sys_file_offset_bits+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- while :; do
- ac_cv_sys_file_offset_bits=no
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#define _FILE_OFFSET_BITS 64
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_sys_file_offset_bits=64; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- break
-done
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
-echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
-if test "$ac_cv_sys_file_offset_bits" != no; then
-
-cat >>confdefs.h <<_ACEOF
-#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
-_ACEOF
-
-fi
-rm -f conftest*
- echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
-echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
-if test "${ac_cv_sys_large_files+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- while :; do
- ac_cv_sys_large_files=no
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#define _LARGE_FILES 1
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_sys_large_files=1; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- break
-done
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
-echo "${ECHO_T}$ac_cv_sys_large_files" >&6
-if test "$ac_cv_sys_large_files" != no; then
-
-cat >>confdefs.h <<_ACEOF
-#define _LARGE_FILES $ac_cv_sys_large_files
-_ACEOF
-
-fi
-rm -f conftest*
-fi
-
-
-
-LIBTIFF_DOCDIR=\${prefix}/share/doc/${PACKAGE}-${LIBTIFF_VERSION}
-
-
-# Check whether --with-docdir or --without-docdir was given.
-if test "${with_docdir+set}" = set; then
- withval="$with_docdir"
-
-fi;
-if test "x$with_docdir" != "x" ; then
- LIBTIFF_DOCDIR=$with_docdir
-fi
-
-
-
-
-# Check whether --enable-ccitt or --disable-ccitt was given.
-if test "${enable_ccitt+set}" = set; then
- enableval="$enable_ccitt"
- HAVE_CCITT=$enableval
-else
- HAVE_CCITT=yes
-fi;
-
-if test "$HAVE_CCITT" = "yes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define CCITT_SUPPORT 1
-_ACEOF
-
-fi
-
-# Check whether --enable-packbits or --disable-packbits was given.
-if test "${enable_packbits+set}" = set; then
- enableval="$enable_packbits"
- HAVE_PACKBITS=$enableval
-else
- HAVE_PACKBITS=yes
-fi;
-
-if test "$HAVE_PACKBITS" = "yes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define PACKBITS_SUPPORT 1
-_ACEOF
-
-fi
-
-# Check whether --enable-lzw or --disable-lzw was given.
-if test "${enable_lzw+set}" = set; then
- enableval="$enable_lzw"
- HAVE_LZW=$enableval
-else
- HAVE_LZW=yes
-fi;
-
-if test "$HAVE_LZW" = "yes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define LZW_SUPPORT 1
-_ACEOF
-
-fi
-
-# Check whether --enable-thunder or --disable-thunder was given.
-if test "${enable_thunder+set}" = set; then
- enableval="$enable_thunder"
- HAVE_THUNDER=$enableval
-else
- HAVE_THUNDER=yes
-fi;
-
-if test "$HAVE_THUNDER" = "yes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define THUNDER_SUPPORT 1
-_ACEOF
-
-fi
-
-HAVE_NEXT=yes
-
-# Check whether --enable-next or --disable-next was given.
-if test "${enable_next+set}" = set; then
- enableval="$enable_next"
- HAVE_NEXT=$enableval
-else
- HAVE_NEXT=yes
-fi;
-
-if test "$HAVE_NEXT" = "yes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NEXT_SUPPORT 1
-_ACEOF
-
-fi
-
-# Check whether --enable-logluv or --disable-logluv was given.
-if test "${enable_logluv+set}" = set; then
- enableval="$enable_logluv"
- HAVE_LOGLUV=$enableval
-else
- HAVE_LOGLUV=yes
-fi;
-
-if test "$HAVE_LOGLUV" = "yes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define LOGLUV_SUPPORT 1
-_ACEOF
-
-fi
-
-
-# Check whether --enable-mdi or --disable-mdi was given.
-if test "${enable_mdi+set}" = set; then
- enableval="$enable_mdi"
- HAVE_MDI=$enableval
-else
- HAVE_MDI=yes
-fi;
-
-if test "$HAVE_MDI" = "yes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define MDI_SUPPORT 1
-_ACEOF
-
-fi
-
-
-HAVE_ZLIB=no
-
-# Check whether --enable-zlib or --disable-zlib was given.
-if test "${enable_zlib+set}" = set; then
- enableval="$enable_zlib"
-
-fi;
-
-# Check whether --with-zlib-include-dir or --without-zlib-include-dir was given.
-if test "${with_zlib_include_dir+set}" = set; then
- withval="$with_zlib_include_dir"
-
-fi;
-
-# Check whether --with-zlib-lib-dir or --without-zlib-lib-dir was given.
-if test "${with_zlib_lib_dir+set}" = set; then
- withval="$with_zlib_lib_dir"
-
-fi;
-
-if test "x$enable_zlib" != "xno" ; then
-
- if test "x$with_zlib_lib_dir" != "x" ; then
- LDFLAGS="-L$with_zlib_lib_dir $LDFLAGS"
- fi
-
- echo "$as_me:$LINENO: checking for inflateEnd in -lz" >&5
-echo $ECHO_N "checking for inflateEnd in -lz... $ECHO_C" >&6
-if test "${ac_cv_lib_z_inflateEnd+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char inflateEnd ();
-int
-main ()
-{
-inflateEnd ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_z_inflateEnd=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_z_inflateEnd=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateEnd" >&5
-echo "${ECHO_T}$ac_cv_lib_z_inflateEnd" >&6
-if test $ac_cv_lib_z_inflateEnd = yes; then
- zlib_lib=yes
-else
- zlib_lib=no
-fi
-
- if test "$zlib_lib" = "no" -a "x$with_zlib_lib_dir" != "x"; then
- { { echo "$as_me:$LINENO: error: Zlib library not found at $with_zlib_lib_dir" >&5
-echo "$as_me: error: Zlib library not found at $with_zlib_lib_dir" >&2;}
- { (exit 1); exit 1; }; }
- fi
-
- if test "x$with_zlib_include_dir" != "x" ; then
- CPPFLAGS="-I$with_zlib_include_dir $CPPFLAGS"
- fi
- if test "${ac_cv_header_zlib_h+set}" = set; then
- echo "$as_me:$LINENO: checking for zlib.h" >&5
-echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
-if test "${ac_cv_header_zlib_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
-echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking zlib.h usability" >&5
-echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <zlib.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking zlib.h presence" >&5
-echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <zlib.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## -------------------------------------- ##
-## Report this to tiff@lists.maptools.org ##
-## -------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for zlib.h" >&5
-echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
-if test "${ac_cv_header_zlib_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_zlib_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
-echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
-
-fi
-if test $ac_cv_header_zlib_h = yes; then
- zlib_h=yes
-else
- zlib_h=no
-fi
-
-
- if test "$zlib_h" = "no" -a "x$with_zlib_include_dir" != "x" ; then
- { { echo "$as_me:$LINENO: error: Zlib headers not found at $with_zlib_include_dir" >&5
-echo "$as_me: error: Zlib headers not found at $with_zlib_include_dir" >&2;}
- { (exit 1); exit 1; }; }
- fi
-
- if test "$zlib_lib" = "yes" -a "$zlib_h" = "yes" ; then
- HAVE_ZLIB=yes
- fi
-
-fi
-
-if test "$HAVE_ZLIB" = "yes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define ZIP_SUPPORT 1
-_ACEOF
-
- LIBS="-lz $LIBS"
-
- if test "$HAVE_RPATH" = "yes" -a "x$with_zlib_lib_dir" != "x" ; then
- LIBDIR="-R $with_zlib_lib_dir $LIBDIR"
- fi
-
-fi
-
-
-# Check whether --enable-pixarlog or --disable-pixarlog was given.
-if test "${enable_pixarlog+set}" = set; then
- enableval="$enable_pixarlog"
- HAVE_PIXARLOG=$enableval
-else
- HAVE_PIXARLOG=yes
-fi;
-
-if test "$HAVE_ZLIB" = "yes" -a "$HAVE_PIXARLOG" = "yes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define PIXARLOG_SUPPORT 1
-_ACEOF
-
-else
- HAVE_PIXARLOG=no
-fi
-
-
-HAVE_JPEG=no
-
-# Check whether --enable-jpeg or --disable-jpeg was given.
-if test "${enable_jpeg+set}" = set; then
- enableval="$enable_jpeg"
-
-fi;
-
-# Check whether --with-jpeg-include-dir or --without-jpeg-include-dir was given.
-if test "${with_jpeg_include_dir+set}" = set; then
- withval="$with_jpeg_include_dir"
-
-fi;
-
-# Check whether --with-jpeg-lib-dir or --without-jpeg-lib-dir was given.
-if test "${with_jpeg_lib_dir+set}" = set; then
- withval="$with_jpeg_lib_dir"
-
-fi;
-
-if test "x$enable_jpeg" != "xno" ; then
-
- if test "x$with_jpeg_lib_dir" != "x" ; then
- LDFLAGS="-L$with_jpeg_lib_dir $LDFLAGS"
-
- fi
-
- echo "$as_me:$LINENO: checking for jpeg_read_scanlines in -ljpeg" >&5
-echo $ECHO_N "checking for jpeg_read_scanlines in -ljpeg... $ECHO_C" >&6
-if test "${ac_cv_lib_jpeg_jpeg_read_scanlines+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ljpeg $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char jpeg_read_scanlines ();
-int
-main ()
-{
-jpeg_read_scanlines ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_jpeg_jpeg_read_scanlines=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_jpeg_jpeg_read_scanlines=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_read_scanlines" >&5
-echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_read_scanlines" >&6
-if test $ac_cv_lib_jpeg_jpeg_read_scanlines = yes; then
- jpeg_lib=yes
-else
- jpeg_lib=no
-fi
-
- if test "$jpeg_lib" = "no" -a "x$with_jpeg_lib_dir" != "x" ; then
- { { echo "$as_me:$LINENO: error: IJG JPEG library not found at $with_jpeg_lib_dir" >&5
-echo "$as_me: error: IJG JPEG library not found at $with_jpeg_lib_dir" >&2;}
- { (exit 1); exit 1; }; }
- fi
-
- if test "x$with_jpeg_include_dir" != "x" ; then
- CPPFLAGS="-I$with_jpeg_include_dir $CPPFLAGS"
- fi
- if test "${ac_cv_header_jpeglib_h+set}" = set; then
- echo "$as_me:$LINENO: checking for jpeglib.h" >&5
-echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
-if test "${ac_cv_header_jpeglib_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
-echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
-echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <jpeglib.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
-echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <jpeglib.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: jpeglib.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: jpeglib.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## -------------------------------------- ##
-## Report this to tiff@lists.maptools.org ##
-## -------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for jpeglib.h" >&5
-echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
-if test "${ac_cv_header_jpeglib_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_jpeglib_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
-echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
-
-fi
-if test $ac_cv_header_jpeglib_h = yes; then
- jpeg_h=yes
-else
- jpeg_h=no
-fi
-
-
- if test "$jpeg_h" = "no" -a "x$with_jpeg_include_dir" != "x" ; then
- { { echo "$as_me:$LINENO: error: IJG JPEG library headers not found at $with_jpeg_include_dir" >&5
-echo "$as_me: error: IJG JPEG library headers not found at $with_jpeg_include_dir" >&2;}
- { (exit 1); exit 1; }; }
- fi
-
- if test "$jpeg_lib" = "yes" -a "$jpeg_h" = "yes" ; then
- HAVE_JPEG=yes
- fi
-
-fi
-
-if test "$HAVE_JPEG" = "yes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define JPEG_SUPPORT 1
-_ACEOF
-
- LIBS="-ljpeg $LIBS"
-
- if test "$HAVE_RPATH" = "yes" -a "x$with_jpeg_lib_dir" != "x" ; then
- LIBDIR="-R $with_jpeg_lib_dir $LIBDIR"
- fi
-
-fi
-
-
-# Check whether --enable-old-jpeg or --disable-old-jpeg was given.
-if test "${enable_old_jpeg+set}" = set; then
- enableval="$enable_old_jpeg"
- HAVE_OJPEG=$enableval
-else
- HAVE_OJPEG=no
-fi;
-
-if test "$HAVE_JPEG" = "yes" -a "$HAVE_OJPEG" = "yes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define OJPEG_SUPPORT 1
-_ACEOF
-
-else
- HAVE_OJPEG=no
-fi
-
-
-# Check whether --enable-cxx or --disable-cxx was given.
-if test "${enable_cxx+set}" = set; then
- enableval="$enable_cxx"
- HAVE_CXX=$enableval
-else
- HAVE_CXX=yes
-fi;
-
-if test "$HAVE_CXX" = "yes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define CXX_SUPPORT 1
-_ACEOF
-
-else
- HAVE_CXX=no
-fi
-
-
-
-if test "$HAVE_CXX" = "yes"; then
- HAVE_CXX_TRUE=
- HAVE_CXX_FALSE='#'
-else
- HAVE_CXX_TRUE='#'
- HAVE_CXX_FALSE=
-fi
-
-
-
-HAVE_OPENGL=no
-
-
-if test "x$ac_path_x_has_been_run" != xyes; then
- echo "$as_me:$LINENO: checking for X" >&5
-echo $ECHO_N "checking for X... $ECHO_C" >&6
-
-ac_path_x_has_been_run=yes
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
- withval="$with_x"
-
-fi;
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
- # The user explicitly disabled X.
- have_x=disabled
-else
- if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
- # Both variables are already set.
- have_x=yes
- else
- if test "${ac_cv_have_x+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=no ac_x_libraries=no
-rm -fr conftest.dir
-if mkdir conftest.dir; then
- cd conftest.dir
- # Make sure to not put "make" in the Imakefile rules, since we grep it out.
- cat >Imakefile <<'_ACEOF'
-acfindx:
- @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-_ACEOF
- if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
- # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
- eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
- # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
- for ac_extension in a so sl; do
- if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
- test -f $ac_im_libdir/libX11.$ac_extension; then
- ac_im_usrlibdir=$ac_im_libdir; break
- fi
- done
- # Screen out bogus values from the imake configuration. They are
- # bogus both because they are the default anyway, and because
- # using them would break gcc on systems where it needs fixed includes.
- case $ac_im_incroot in
- /usr/include) ;;
- *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
- esac
- case $ac_im_usrlibdir in
- /usr/lib | /lib) ;;
- *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
- esac
- fi
- cd ..
- rm -fr conftest.dir
-fi
-
-# Standard set of common directories for X headers.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-ac_x_header_dirs='
-/usr/X11/include
-/usr/X11R6/include
-/usr/X11R5/include
-/usr/X11R4/include
-
-/usr/include/X11
-/usr/include/X11R6
-/usr/include/X11R5
-/usr/include/X11R4
-
-/usr/local/X11/include
-/usr/local/X11R6/include
-/usr/local/X11R5/include
-/usr/local/X11R4/include
-
-/usr/local/include/X11
-/usr/local/include/X11R6
-/usr/local/include/X11R5
-/usr/local/include/X11R4
-
-/usr/X386/include
-/usr/x386/include
-/usr/XFree86/include/X11
-
-/usr/include
-/usr/local/include
-/usr/unsupported/include
-/usr/athena/include
-/usr/local/x11r5/include
-/usr/lpp/Xamples/include
-
-/usr/openwin/include
-/usr/openwin/share/include'
-
-if test "$ac_x_includes" = no; then
- # Guess where to find include files, by looking for a specified header file.
- # First, try using that file with no special directory specified.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <X11/Xlib.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- for ac_dir in $ac_x_header_dirs; do
- if test -r "$ac_dir/X11/Xlib.h"; then
- ac_x_includes=$ac_dir
- break
- fi
-done
-fi
-rm -f conftest.err conftest.$ac_ext
-fi # $ac_x_includes = no
-
-if test "$ac_x_libraries" = no; then
- # Check for the libraries.
- # See if we find them without any special options.
- # Don't add to $LIBS permanently.
- ac_save_LIBS=$LIBS
- LIBS="-lX11 $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <X11/Xlib.h>
-int
-main ()
-{
-XrmInitialize ()
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- LIBS=$ac_save_LIBS
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-LIBS=$ac_save_LIBS
-for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
-do
- # Don't even attempt the hair of trying to link an X program!
- for ac_extension in a so sl; do
- if test -r $ac_dir/libX11.$ac_extension; then
- ac_x_libraries=$ac_dir
- break 2
- fi
- done
-done
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi # $ac_x_libraries = no
-
-if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
- # Didn't find X anywhere. Cache the known absence of X.
- ac_cv_have_x="have_x=no"
-else
- # Record where we found X for the cache.
- ac_cv_have_x="have_x=yes \
- ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
-
- fi
- eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
- echo "$as_me:$LINENO: result: $have_x" >&5
-echo "${ECHO_T}$have_x" >&6
- no_x=yes
-else
- # If each of the values was on the command line, it overrides each guess.
- test "x$x_includes" = xNONE && x_includes=$ac_x_includes
- test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
- # Update the cache value to reflect the command line values.
- ac_cv_have_x="have_x=yes \
- ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
- # It might be that x_includes is empty (headers are found in the
- # standard search path. Then output the corresponding message
- ac_out_x_includes=$x_includes
- test "x$x_includes" = x && ac_out_x_includes="in standard search path"
- echo "$as_me:$LINENO: result: libraries $x_libraries, headers $ac_out_x_includes" >&5
-echo "${ECHO_T}libraries $x_libraries, headers $ac_out_x_includes" >&6
-fi
-
-fi
-if test "$no_x" = yes; then
- # Not all programs may use this symbol, but it does not hurt to define it.
-
-cat >>confdefs.h <<\_ACEOF
-#define X_DISPLAY_MISSING 1
-_ACEOF
-
- X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
-else
- if test -n "$x_includes"; then
- X_CFLAGS="$X_CFLAGS -I$x_includes"
- fi
-
- # It would also be nice to do this for all -L options, not just this one.
- if test -n "$x_libraries"; then
- X_LIBS="$X_LIBS -L$x_libraries"
- # For Solaris; some versions of Sun CC require a space after -R and
- # others require no space. Words are not sufficient . . . .
- case `(uname -sr) 2>/dev/null` in
- "SunOS 5"*)
- echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
-echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
- ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_R_nospace=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_R_nospace=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test $ac_R_nospace = yes; then
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- X_LIBS="$X_LIBS -R$x_libraries"
- else
- LIBS="$ac_xsave_LIBS -R $x_libraries"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_R_space=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_R_space=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test $ac_R_space = yes; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- X_LIBS="$X_LIBS -R $x_libraries"
- else
- echo "$as_me:$LINENO: result: neither works" >&5
-echo "${ECHO_T}neither works" >&6
- fi
- fi
- LIBS=$ac_xsave_LIBS
- esac
- fi
-
- # Check for system-dependent libraries X programs must link with.
- # Do this before checking for the system-independent R6 libraries
- # (-lICE), since we may need -lsocket or whatever for X linking.
-
- if test "$ISC" = yes; then
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
- else
- # Martyn Johnson says this is needed for Ultrix, if the X
- # libraries were built with DECnet support. And Karl Berry says
- # the Alpha needs dnet_stub (dnet does not exist).
- ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char XOpenDisplay ();
-int
-main ()
-{
-XOpenDisplay ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
-echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
-if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldnet $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dnet_ntoa ();
-int
-main ()
-{
-dnet_ntoa ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dnet_dnet_ntoa=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dnet_dnet_ntoa=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
-echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
-if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
- X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
-fi
-
- if test $ac_cv_lib_dnet_dnet_ntoa = no; then
- echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
-echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
-if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldnet_stub $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dnet_ntoa ();
-int
-main ()
-{
-dnet_ntoa ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dnet_stub_dnet_ntoa=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dnet_stub_dnet_ntoa=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
-echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
-if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
- X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
-fi
-
- fi
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LIBS="$ac_xsave_LIBS"
-
- # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
- # to get the SysV transport functions.
- # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
- # needs -lnsl.
- # The nsl library prevents programs from opening the X display
- # on Irix 5.2, according to T.E. Dickey.
- # The functions gethostbyname, getservbyname, and inet_addr are
- # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
- echo "$as_me:$LINENO: checking for gethostbyname" >&5
-echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
-if test "${ac_cv_func_gethostbyname+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define gethostbyname innocuous_gethostbyname
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char gethostbyname (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef gethostbyname
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char gethostbyname ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
-choke me
-#else
-char (*f) () = gethostbyname;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != gethostbyname;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_gethostbyname=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_gethostbyname=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
-echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
-
- if test $ac_cv_func_gethostbyname = no; then
- echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
-echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
-if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnsl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char gethostbyname ();
-int
-main ()
-{
-gethostbyname ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_nsl_gethostbyname=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_nsl_gethostbyname=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
-echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
-if test $ac_cv_lib_nsl_gethostbyname = yes; then
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
-fi
-
- if test $ac_cv_lib_nsl_gethostbyname = no; then
- echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
-echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
-if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbsd $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char gethostbyname ();
-int
-main ()
-{
-gethostbyname ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_bsd_gethostbyname=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_bsd_gethostbyname=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
-echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
-if test $ac_cv_lib_bsd_gethostbyname = yes; then
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
-fi
-
- fi
- fi
-
- # lieder@skyler.mavd.honeywell.com says without -lsocket,
- # socket/setsockopt and other routines are undefined under SCO ODT
- # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
- # on later versions), says Simon Leinen: it contains gethostby*
- # variants that don't use the name server (or something). -lsocket
- # must be given before -lnsl if both are needed. We assume that
- # if connect needs -lnsl, so does gethostbyname.
- echo "$as_me:$LINENO: checking for connect" >&5
-echo $ECHO_N "checking for connect... $ECHO_C" >&6
-if test "${ac_cv_func_connect+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define connect to an innocuous variant, in case <limits.h> declares connect.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define connect innocuous_connect
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char connect (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef connect
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char connect ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_connect) || defined (__stub___connect)
-choke me
-#else
-char (*f) () = connect;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != connect;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_connect=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_connect=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
-echo "${ECHO_T}$ac_cv_func_connect" >&6
-
- if test $ac_cv_func_connect = no; then
- echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
-echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
-if test "${ac_cv_lib_socket_connect+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char connect ();
-int
-main ()
-{
-connect ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_socket_connect=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_socket_connect=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
-echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
-if test $ac_cv_lib_socket_connect = yes; then
- X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
-fi
-
- fi
-
- # Guillermo Gomez says -lposix is necessary on A/UX.
- echo "$as_me:$LINENO: checking for remove" >&5
-echo $ECHO_N "checking for remove... $ECHO_C" >&6
-if test "${ac_cv_func_remove+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define remove to an innocuous variant, in case <limits.h> declares remove.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define remove innocuous_remove
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char remove (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef remove
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char remove ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_remove) || defined (__stub___remove)
-choke me
-#else
-char (*f) () = remove;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != remove;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_remove=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_remove=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
-echo "${ECHO_T}$ac_cv_func_remove" >&6
-
- if test $ac_cv_func_remove = no; then
- echo "$as_me:$LINENO: checking for remove in -lposix" >&5
-echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
-if test "${ac_cv_lib_posix_remove+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lposix $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char remove ();
-int
-main ()
-{
-remove ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_posix_remove=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_posix_remove=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
-echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
-if test $ac_cv_lib_posix_remove = yes; then
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
-fi
-
- fi
-
- # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
- echo "$as_me:$LINENO: checking for shmat" >&5
-echo $ECHO_N "checking for shmat... $ECHO_C" >&6
-if test "${ac_cv_func_shmat+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define shmat innocuous_shmat
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char shmat (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef shmat
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char shmat ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_shmat) || defined (__stub___shmat)
-choke me
-#else
-char (*f) () = shmat;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != shmat;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_shmat=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_shmat=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
-echo "${ECHO_T}$ac_cv_func_shmat" >&6
-
- if test $ac_cv_func_shmat = no; then
- echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
-echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
-if test "${ac_cv_lib_ipc_shmat+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lipc $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char shmat ();
-int
-main ()
-{
-shmat ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_ipc_shmat=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_ipc_shmat=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
-echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
-if test $ac_cv_lib_ipc_shmat = yes; then
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
-fi
-
- fi
- fi
-
- # Check for libraries that X11R6 Xt/Xaw programs need.
- ac_save_LDFLAGS=$LDFLAGS
- test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
- # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
- # check for ICE first), but we must link in the order -lSM -lICE or
- # we get undefined symbols. So assume we have SM if we have ICE.
- # These have to be linked with before -lX11, unlike the other
- # libraries we check for below, so use a different variable.
- # John Interrante, Karl Berry
- echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
-echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
-if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lICE $X_EXTRA_LIBS $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char IceConnectionNumber ();
-int
-main ()
-{
-IceConnectionNumber ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_ICE_IceConnectionNumber=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_ICE_IceConnectionNumber=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
-echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
-if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
- X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
-fi
-
- LDFLAGS=$ac_save_LDFLAGS
-
-fi
-
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-acx_pthread_ok=no
-
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
-echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char pthread_join ();
-int
-main ()
-{
-pthread_join ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- acx_pthread_ok=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
-echo "${ECHO_T}$acx_pthread_ok" >&6
- if test x"$acx_pthread_ok" = xno; then
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
- fi
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try. Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
-
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
-
-# The ordering *is* (sometimes) important. Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-# other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-# doesn't hurt to check since this sometimes defines pthreads too;
-# also defines -D_REENTRANT)
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
-
-case "${host_cpu}-${host_os}" in
- *solaris*)
-
- # On Solaris (at least, for some versions), libc contains stubbed
- # (non-functional) versions of the pthreads routines, so link-based
- # tests will erroneously succeed. (We need to link with -pthread or
- # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
- # a function called by this macro, so we could check for that, but
- # who knows whether they'll stub that too in a future libc.) So,
- # we'll just look for -pthreads and -lpthread first:
-
- acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
- ;;
-esac
-
-if test x"$acx_pthread_ok" = xno; then
-for flag in $acx_pthread_flags; do
-
- case $flag in
- none)
- echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
-echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
- ;;
-
- -*)
- echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
-echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
- PTHREAD_CFLAGS="$flag"
- ;;
-
- pthread-config)
- # Extract the first word of "pthread-config", so it can be a program name with args.
-set dummy pthread-config; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$acx_pthread_config"; then
- ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_acx_pthread_config="yes"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
-fi
-fi
-acx_pthread_config=$ac_cv_prog_acx_pthread_config
-if test -n "$acx_pthread_config"; then
- echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
-echo "${ECHO_T}$acx_pthread_config" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- if test x"$acx_pthread_config" = xno; then continue; fi
- PTHREAD_CFLAGS="`pthread-config --cflags`"
- PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
- ;;
-
- *)
- echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
-echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
- PTHREAD_LIBS="-l$flag"
- ;;
- esac
-
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
- # Check for various functions. We must include pthread.h,
- # since some functions may be macros. (On the Sequent, we
- # need a special flag -Kthread to make this header compile.)
- # We check for pthread_join because it is in -lpthread on IRIX
- # while pthread_create is in libc. We check for pthread_attr_init
- # due to DEC craziness with -lpthreads. We check for
- # pthread_cleanup_push because it is one of the few pthread
- # functions on Solaris that doesn't have a non-functional libc stub.
- # We try pthread_create on general principles.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <pthread.h>
-int
-main ()
-{
-pthread_t th; pthread_join(th, 0);
- pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- acx_pthread_ok=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
- echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
-echo "${ECHO_T}$acx_pthread_ok" >&6
- if test "x$acx_pthread_ok" = xyes; then
- break;
- fi
-
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
-done
-fi
-
-# Various other checks:
-if test "x$acx_pthread_ok" = xyes; then
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
- # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
-echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
- attr_name=unknown
- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <pthread.h>
-int
-main ()
-{
-int attr=$attr;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- attr_name=$attr; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- done
- echo "$as_me:$LINENO: result: $attr_name" >&5
-echo "${ECHO_T}$attr_name" >&6
- if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
-
-cat >>confdefs.h <<_ACEOF
-#define PTHREAD_CREATE_JOINABLE $attr_name
-_ACEOF
-
- fi
-
- echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
-echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
- flag=no
- case "${host_cpu}-${host_os}" in
- *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
- *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
- esac
- echo "$as_me:$LINENO: result: ${flag}" >&5
-echo "${ECHO_T}${flag}" >&6
- if test "x$flag" != xno; then
- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
- fi
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
- # More AIX lossage: must compile with cc_r
- # Extract the first word of "cc_r", so it can be a program name with args.
-set dummy cc_r; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$PTHREAD_CC"; then
- ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_PTHREAD_CC="cc_r"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
-fi
-fi
-PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
-if test -n "$PTHREAD_CC"; then
- echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
-echo "${ECHO_T}$PTHREAD_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-else
- PTHREAD_CC="$CC"
-fi
-
-
-
-
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PTHREAD 1
-_ACEOF
-
- :
-else
- acx_pthread_ok=no
-
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-#
-# There isn't a reliable way to know we should use the Apple OpenGL framework
-# without a configure option. A Mac OS X user may have installed an
-# alternative GL implementation (e.g., Mesa), which may or may not depend on X.
-#
-
-# Check whether --with-apple-opengl-framework or --without-apple-opengl-framework was given.
-if test "${with_apple_opengl_framework+set}" = set; then
- withval="$with_apple_opengl_framework"
-
-fi;
-if test "X$with_apple_opengl_framework" = "Xyes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_APPLE_OPENGL_FRAMEWORK 1
-_ACEOF
-
- GL_LIBS="-framework OpenGL"
-else
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
- echo "$as_me:$LINENO: checking whether we are using the Microsoft C compiler" >&5
-echo $ECHO_N "checking whether we are using the Microsoft C compiler... $ECHO_C" >&6
-if test "${ax_cv_c_compiler_ms+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef _MSC_VER
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ax_compiler_ms=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ax_compiler_ms=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ax_cv_c_compiler_ms=$ax_compiler_ms
-
-fi
-echo "$as_me:$LINENO: result: $ax_cv_c_compiler_ms" >&5
-echo "${ECHO_T}$ax_cv_c_compiler_ms" >&6
- if test X$ax_compiler_ms = Xno; then
- GL_CFLAGS="${PTHREAD_CFLAGS}"
- GL_LIBS="${PTHREAD_LIBS} -lm"
- fi
-
- #
- # Use x_includes and x_libraries if they have been set (presumably by
- # AC_PATH_X).
- #
- if test "X$no_x" != "Xyes"; then
- if test -n "$x_includes"; then
- GL_CFLAGS="-I${x_includes} ${GL_CFLAGS}"
- fi
- if test -n "$x_libraries"; then
- GL_LIBS="-L${x_libraries} -lX11 ${GL_LIBS}"
- fi
- fi
-
-
-for ac_header in windows.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## -------------------------------------- ##
-## Report this to tiff@lists.maptools.org ##
-## -------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
- echo "$as_me:$LINENO: checking for OpenGL library" >&5
-echo $ECHO_N "checking for OpenGL library... $ECHO_C" >&6
-if test "${ax_cv_check_gl_libgl+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ax_cv_check_gl_libgl="no"
- ax_save_CPPFLAGS="${CPPFLAGS}"
- CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}"
- ax_save_LIBS="${LIBS}"
- LIBS=""
- ax_check_libs="-lopengl32 -lGL"
- for ax_lib in ${ax_check_libs}; do
- if test X$ax_compiler_ms = Xyes; then
- ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`
- else
- ax_try_lib="${ax_lib}"
- fi
- LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-# if HAVE_WINDOWS_H && defined(_WIN32)
-# include <windows.h>
-# endif
-# include <GL/gl.h>
-int
-main ()
-{
-glBegin(0)
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ax_cv_check_gl_libgl="${ax_try_lib}"; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- done
- LIBS=${ax_save_LIBS}
- CPPFLAGS=${ax_save_CPPFLAGS}
-fi
-echo "$as_me:$LINENO: result: $ax_cv_check_gl_libgl" >&5
-echo "${ECHO_T}$ax_cv_check_gl_libgl" >&6
-
- if test "X${ax_cv_check_gl_libgl}" = "Xno"; then
- no_gl="yes"
- GL_CFLAGS=""
- GL_LIBS=""
- else
- GL_LIBS="${ax_cv_check_gl_libgl} ${GL_LIBS}"
- fi
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-
-
-
-
-
-
-ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CXX" && break
- done
-fi
-if test -z "$CXX"; then
- ac_ct_CXX=$CXX
- for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CXX="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CXX" && break
-done
-test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
-
- CXX=$ac_ct_CXX
-fi
-
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C++ compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
-GXX=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-CXXFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cxx_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cxx_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cxx_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
-if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
- if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-g"
- fi
-else
- if test "$GXX" = yes; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS=
- fi
-fi
-for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-depcc="$CXX" am_compiler_list=
-
-echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_CXX_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- case $depmode in
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- none) break ;;
- esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
- if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CXX_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_CXX_dependencies_compiler_type=none
-fi
-
-fi
-echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
-CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
-
-
-
-if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
- am__fastdepCXX_TRUE=
- am__fastdepCXX_FALSE='#'
-else
- am__fastdepCXX_TRUE='#'
- am__fastdepCXX_FALSE=
-fi
-
-
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
- ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
-echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
-if test -z "$CXXCPP"; then
- if test "${ac_cv_prog_CXXCPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Double quotes because CXXCPP needs to be expanded
- for CXXCPP in "$CXX -E" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_cxx_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_cxx_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- break
-fi
-
- done
- ac_cv_prog_CXXCPP=$CXXCPP
-
-fi
- CXXCPP=$ac_cv_prog_CXXCPP
-else
- ac_cv_prog_CXXCPP=$CXXCPP
-fi
-echo "$as_me:$LINENO: result: $CXXCPP" >&5
-echo "${ECHO_T}$CXXCPP" >&6
-ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_cxx_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_cxx_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
-else
- _lt_caught_CXX_error=yes
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-else
- _lt_caught_CXX_error=yes
-fi
-
-
-
-ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CXX" && break
- done
-fi
-if test -z "$CXX"; then
- ac_ct_CXX=$CXX
- for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CXX="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CXX" && break
-done
-test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
-
- CXX=$ac_ct_CXX
-fi
-
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C++ compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
-GXX=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-CXXFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cxx_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cxx_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cxx_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
-if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
- if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-g"
- fi
-else
- if test "$GXX" = yes; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS=
- fi
-fi
-for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-depcc="$CXX" am_compiler_list=
-
-echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_CXX_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- case $depmode in
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- none) break ;;
- esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
- if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CXX_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_CXX_dependencies_compiler_type=none
-fi
-
-fi
-echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
-CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
-
-
-
-if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
- am__fastdepCXX_TRUE=
- am__fastdepCXX_FALSE='#'
-else
- am__fastdepCXX_TRUE='#'
- am__fastdepCXX_FALSE=
-fi
-
-
-ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-archive_cmds_need_lc_CXX=no
-allow_undefined_flag_CXX=
-always_export_symbols_CXX=no
-archive_expsym_cmds_CXX=
-export_dynamic_flag_spec_CXX=
-hardcode_direct_CXX=no
-hardcode_libdir_flag_spec_CXX=
-hardcode_libdir_flag_spec_ld_CXX=
-hardcode_libdir_separator_CXX=
-hardcode_minus_L_CXX=no
-hardcode_shlibpath_var_CXX=unsupported
-hardcode_automatic_CXX=no
-inherit_rpath_CXX=no
-module_cmds_CXX=
-module_expsym_cmds_CXX=
-link_all_deplibs_CXX=unknown
-old_archive_cmds_CXX=$old_archive_cmds
-no_undefined_flag_CXX=
-whole_archive_flag_spec_CXX=
-enable_shared_with_static_runtimes_CXX=no
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-objext_CXX=$objext
-
-# No sense in running all these tests if we already determined that
-# the CXX compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="int some_variable = 0;\n"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
- # save warnings/boilerplate of simple test code
- ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-
- ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM conftest*
-
-
- # Allow CC to be a program name with arguments.
- lt_save_CC=$CC
- lt_save_LD=$LD
- lt_save_GCC=$GCC
- GCC=$GXX
- lt_save_with_gnu_ld=$with_gnu_ld
- lt_save_path_LD=$lt_cv_path_LD
- if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
- else
- $as_unset lt_cv_prog_gnu_ld
- fi
- if test -n "${lt_cv_path_LDCXX+set}"; then
- lt_cv_path_LD=$lt_cv_path_LDCXX
- else
- $as_unset lt_cv_path_LD
- fi
- test -z "${LDCXX+set}" || LD=$LDCXX
- CC=${CXX-"c++"}
- compiler=$CC
- compiler_CXX=$CC
- for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
- if test -n "$compiler"; then
- # We don't want -fno-exception when compiling C++ code, so set the
- # no_builtin_flag separately
- if test "$GXX" = yes; then
- lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
- else
- lt_prog_compiler_no_builtin_flag_CXX=
- fi
-
- if test "$GXX" = yes; then
- # Set up default GNU C++ configuration
-
-
-
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
- withval="$with_gnu_ld"
- test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi;
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- echo "$as_me:$LINENO: checking for ld used by $CC" >&5
-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | ?:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
- while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
-else
- echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
-fi
-if test "${lt_cv_path_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-
-
-
-
-
- # Check if GNU C++ uses GNU ld as the underlying linker, since the
- # archiving commands below assume that GNU ld is being used.
- if test "$with_gnu_ld" = yes; then
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-
- # If archive_cmds runs LD, not CC, wlarc should be empty
- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
- # investigate it a little bit more. (MM)
- wlarc='${wl}'
-
- # ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" |
- $GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec_CXX=
- fi
- else
- with_gnu_ld=no
- wlarc=
-
- # A generic and very simple default shared library creation
- # command for GNU C++ for the case where it uses the native
- # linker, instead of GNU ld. If possible, this setting should
- # overridden to take advantage of the native linker features on
- # the platform it is being used on.
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- fi
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
- else
- GXX=no
- with_gnu_ld=no
- wlarc=
- fi
-
- # PORTME: fill in a description of your system's C++ link characteristics
- echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
- ld_shlibs_CXX=yes
- case $host_os in
- aix3*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- aix4* | aix5*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix5*)
- for ld_flag in $LDFLAGS; do
- case $ld_flag in
- *-brtl*)
- aix_use_runtimelinking=yes
- break
- ;;
- esac
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- archive_cmds_CXX=''
- hardcode_direct_CXX=yes
- hardcode_libdir_separator_CXX=':'
- link_all_deplibs_CXX=yes
- file_list_spec_CXX='${wl}-f,'
-
- if test "$GXX" = yes; then
- case $host_os in aix4.[012]|aix4.[012].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- hardcode_direct_CXX=yes
- else
- # We have old collect2
- hardcode_direct_CXX=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- hardcode_minus_L_CXX=yes
- hardcode_libdir_flag_spec_CXX='-L$libdir'
- hardcode_libdir_separator_CXX=
- fi
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to
- # export.
- always_export_symbols_CXX=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- allow_undefined_flag_CXX='-berok'
- # Determine the default libpath from the value encoded in an empty
- # executable.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
-
- archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
- allow_undefined_flag_CXX="-z nodefs"
- archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- no_undefined_flag_CXX=' ${wl}-bernotok'
- allow_undefined_flag_CXX=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec_CXX='$convenience'
- archive_cmds_need_lc_CXX=yes
- # This is similar to how AIX traditionally builds its shared
- # libraries.
- archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag_CXX=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- ld_shlibs_CXX=no
- fi
- ;;
-
- chorus*)
- case $cc_basename in
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
-
- cygwin* | mingw* | pw32*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
- # as there is no search path for DLLs.
- hardcode_libdir_flag_spec_CXX='-L$libdir'
- allow_undefined_flag_CXX=unsupported
- always_export_symbols_CXX=no
- enable_shared_with_static_runtimes_CXX=yes
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- ld_shlibs_CXX=no
- fi
- ;;
- darwin* | rhapsody*)
- case $host_os in
- rhapsody* | darwin1.[012])
- allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
- 10.[012])
- allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- ;;
- esac
- archive_cmds_need_lc_CXX=no
- hardcode_direct_CXX=no
- hardcode_automatic_CXX=yes
- hardcode_shlibpath_var_CXX=unsupported
- whole_archive_flag_spec_CXX=''
- link_all_deplibs_CXX=yes
-
- if test "$GXX" = yes ; then
- if test "${lt_cv_apple_cc_single_mod+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
- # By default we will add the -single_module flag. You can override
- # by either setting the environment variable LT_MULTI_MODULE
- # non-empty at configure time, or by adding -multi-module to the
- # link flags.
- echo "int foo(void){return 1;}" > conftest.c
- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
- -dynamiclib ${wl}-single_module conftest.c
- if test -f libconftest.dylib; then
- lt_cv_apple_cc_single_mod=yes
- rm libconftest.dylib
- fi
- rm conftest.$ac_ext
- fi
-fi
-
- output_verbose_link_cmd=echo
- if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
- archive_cmds_CXX='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- archive_expsym_cmds_CXX='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- archive_expsym_cmds_CXX='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- module_expsym_cmds_CXX='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- case $cc_basename in
- xlc*)
- output_verbose_link_cmd=echo
- archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO "$rpath/$soname"` $verstring'
- module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag,
- # it doesn't exist in older darwin lds
- archive_expsym_cmds_CXX='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- module_expsym_cmds_CXX='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- ;;
- *)
- ld_shlibs_CXX=no
- ;;
- esac
- fi
- ;;
-
- dgux*)
- case $cc_basename in
- ec++*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
-
- freebsd[12]*)
- # C++ shared libraries reported to be fairly broken before
- # switch to ELF
- ld_shlibs_CXX=no
- ;;
-
- freebsd-elf*)
- archive_cmds_need_lc_CXX=no
- ;;
-
- freebsd* | kfreebsd*-gnu | dragonfly*)
- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
- # conventions
- ld_shlibs_CXX=yes
- ;;
-
- gnu*)
- ;;
-
- hpux9*)
- hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
- export_dynamic_flag_spec_CXX='${wl}-E'
- hardcode_direct_CXX=yes
- hardcode_minus_L_CXX=yes # Not in the search PATH,
- # but as the default
- # location of the library.
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- aCC*)
- archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes; then
- archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- fi
- ;;
- esac
- ;;
-
- hpux10*|hpux11*)
- if test $with_gnu_ld = no; then
- hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- ;;
- *)
- export_dynamic_flag_spec_CXX='${wl}-E'
- ;;
- esac
- fi
- case $host_cpu in
- hppa*64*|ia64*)
- hardcode_direct_CXX=no
- hardcode_shlibpath_var_CXX=no
- ;;
- *)
- hardcode_direct_CXX=yes
- hardcode_minus_L_CXX=yes # Not in the search PATH,
- # but as the default
- # location of the library.
- ;;
- esac
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- aCC*)
- case $host_cpu in
- hppa*64*)
- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes; then
- if test $with_gnu_ld = no; then
- case $host_cpu in
- hppa*64*)
- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- fi
- else
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- fi
- ;;
- esac
- ;;
-
- interix3*)
- hardcode_direct_CXX=no
- hardcode_shlibpath_var_CXX=no
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_CXX='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
- irix5* | irix6*)
- case $cc_basename in
- CC*)
- # SGI C++
- archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-
- # Archives containing C++ object files must be created using
- # "CC -ar", where "CC" is the IRIX C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
- ;;
- *)
- if test "$GXX" = yes; then
- if test "$with_gnu_ld" = no; then
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
- fi
- fi
- link_all_deplibs_CXX=yes
- ;;
- esac
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
- inherit_rpath_CXX=yes
- ;;
-
- linux*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
- ;;
- icpc* | ecpc* )
- # Intel C++
- with_gnu_ld=yes
- # version 8.0 and above of icpc choke on multiply defined symbols
- # if we add $predep_objects and $postdep_objects, however 7.1 and
- # earlier do not add the objects themselves.
- case `$CC -V 2>&1` in
- *"Version 7."*)
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- *) # Version 8.0 or newer
- tmp_idyn=
- case $host_cpu in
- ia64*) tmp_idyn=' -i_dynamic';;
- esac
- archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- esac
- archive_cmds_need_lc_CXX=no
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
- whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
- ;;
- pgCC*)
- # Portland Group C++ compiler
- case `$CC -V` in
- *pgCC\ [1-5]*)
- prelink_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
- old_archive_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
- $RANLIB $oldlib'
- archive_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- archive_expsym_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- *) # Version 6 will use weak symbols
- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- esac
-
- hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
- whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- ;;
- cxx*)
- # Compaq C++
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec_CXX='-rpath $libdir'
- hardcode_libdir_separator_CXX=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- esac
- ;;
-
- lynxos*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
-
- m88k*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
-
- mvs*)
- case $cc_basename in
- cxx*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
- wlarc=
- hardcode_libdir_flag_spec_CXX='-R$libdir'
- hardcode_direct_CXX=yes
- hardcode_shlibpath_var_CXX=no
- fi
- # Workaround some broken pre-1.5 toolchains
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
- ;;
-
- *nto* | *qnx*)
- ld_shlibs_CXX=yes
- ;;
-
- openbsd2*)
- # C++ shared libraries are fairly broken
- ld_shlibs_CXX=no
- ;;
-
- openbsd*)
- hardcode_direct_CXX=yes
- hardcode_shlibpath_var_CXX=no
- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- export_dynamic_flag_spec_CXX='${wl}-E'
- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- fi
- output_verbose_link_cmd=echo
- ;;
-
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- hardcode_libdir_separator_CXX=:
-
- # Archives containing C++ object files must be created using
- # the KAI C++ compiler.
- case $host in
- osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
- *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
- esac
- ;;
- RCC*)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- cxx*)
- case $host in
- osf3*)
- allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- ;;
- *)
- allow_undefined_flag_CXX=' -expect_unresolved \*'
- archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
- echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
- $RM $lib.exp'
- hardcode_libdir_flag_spec_CXX='-rpath $libdir'
- ;;
- esac
-
- hardcode_libdir_separator_CXX=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
- case $host in
- osf3*)
- archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- ;;
- *)
- archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- ;;
- esac
-
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
- else
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- fi
- ;;
- esac
- ;;
-
- psos*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
-
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- lcc*)
- # Lucid
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
-
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- archive_cmds_need_lc_CXX=yes
- no_undefined_flag_CXX=' -zdefs'
- archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- hardcode_libdir_flag_spec_CXX='-R$libdir'
- hardcode_shlibpath_var_CXX=no
- case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *)
- # The C++ compiler is used as linker so we must use $wl
- # flag to pass the commands to the underlying system
- # linker. We must also pass each convenience library through
- # to the system linker between allextract/defaultextract.
- # The C++ compiler will combine linker options so we
- # cannot just pass the convenience library names through
- # without $wl.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
- ;;
- esac
- link_all_deplibs_CXX=yes
-
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
- ;;
- gcx*)
- # Green Hills C++ Compiler
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
- # The C++ compiler must be used to create the archive.
- old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
- ;;
- *)
- # GNU C++ compiler with Solaris linker
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
- if $CC --version | $GREP -v '^2\.7' > /dev/null; then
- archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
- else
- # g++ 2.7 appears to require `-G' NOT `-shared' on this
- # platform.
- archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
- fi
-
- hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
- fi
- ;;
- esac
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag_CXX='${wl}-z,text'
- archive_cmds_need_lc_CXX=no
- hardcode_shlibpath_var_CXX=no
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- no_undefined_flag_CXX='${wl}-z,text'
- allow_undefined_flag_CXX='${wl}-z,nodefs'
- archive_cmds_need_lc_CXX=no
- hardcode_shlibpath_var_CXX=no
- hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
- hardcode_libdir_separator_CXX=':'
- link_all_deplibs_CXX=yes
- export_dynamic_flag_spec_CXX='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
-
- vxworks*)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
-
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
-
- echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
-echo "${ECHO_T}$ld_shlibs_CXX" >&6
- test "$ld_shlibs_CXX" = no && can_build_shared=no
-
- GCC_CXX="$GXX"
- LD_CXX="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- # Dependencies to place before and after the object being linked:
-predep_objects_CXX=
-postdep_objects_CXX=
-predeps_CXX=
-postdeps_CXX=
-compiler_lib_search_path_CXX=
-
-cat > conftest.$ac_ext <<_LT_EOF
-class Foo
-{
-public:
- Foo (void) { a = 0; }
-private:
- int a;
-};
-_LT_EOF
-
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Parse the compiler output and extract the necessary
- # objects, libraries and library flags.
-
- # Sentinel used to keep track of whether or not we are before
- # the conftest object file.
- pre_test_object_deps_done=no
-
- # The `*' in the case matches for architectures that use `case' in
- # $output_verbose_cmd can trigger glob expansion during the loop
- # eval without this substitution.
- output_verbose_link_cmd=`$ECHO "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
-
- for p in `eval $output_verbose_link_cmd`; do
- case $p in
-
- -L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
- # Remove the space.
- if test $p = "-L" ||
- test $p = "-R"; then
- prev=$p
- continue
- else
- prev=
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- case $p in
- -L* | -R*)
- # Internal compiler library paths should come after those
- # provided the user. The postdeps already come after the
- # user supplied libs so there is no need to process them.
- if test -z "$compiler_lib_search_path_CXX"; then
- compiler_lib_search_path_CXX="${prev}${p}"
- else
- compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
- fi
- ;;
- # The "-l" case would never come before the object being
- # linked, so don't bother handling this case.
- esac
- else
- if test -z "$postdeps_CXX"; then
- postdeps_CXX="${prev}${p}"
- else
- postdeps_CXX="${postdeps_CXX} ${prev}${p}"
- fi
- fi
- ;;
-
- *.$objext)
- # This assumes that the test object file only shows up
- # once in the compiler output.
- if test "$p" = "conftest.$objext"; then
- pre_test_object_deps_done=yes
- continue
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- if test -z "$predep_objects_CXX"; then
- predep_objects_CXX="$p"
- else
- predep_objects_CXX="$predep_objects_CXX $p"
- fi
- else
- if test -z "$postdep_objects_CXX"; then
- postdep_objects_CXX="$p"
- else
- postdep_objects_CXX="$postdep_objects_CXX $p"
- fi
- fi
- ;;
-
- *) ;; # Ignore the rest.
-
- esac
- done
-
- # Clean up.
- rm -f a.out a.exe
-else
- echo "libtool.m4: error: problem compiling CXX test program"
-fi
-
-$RM -f confest.$objext
-
-# PORTME: override above test on systems where it is broken
-case $host_os in
-interix3*)
- # Interix 3.5 installs completely hosed .la files for C++, so rather than
- # hack all around it, let's just trust "g++" to DTRT.
- predep_objects_CXX=
- postdep_objects_CXX=
- postdeps_CXX=
- ;;
-
-solaris*)
- case $cc_basename in
- CC*)
- # Adding this requires a known-good setup of shared libraries for
- # Sun compiler versions before 5.6, else PIC objects from an old
- # archive will be linked into the output, leading to subtle bugs.
- postdeps_CXX='-lCstd -lCrun'
- ;;
- esac
- ;;
-esac
-
-
-case " $postdeps_CXX " in
-*" -lc "*) archive_cmds_need_lc_CXX=no ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- lt_prog_compiler_wl_CXX=
-lt_prog_compiler_pic_CXX=
-lt_prog_compiler_static_CXX=
-
-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
-
- # C++ specific cases for pic, static, wl, etc.
- if test "$GXX" = yes; then
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static_CXX='-Bstatic'
- fi
- ;;
- amigaos*)
- if test "$host_cpu" = m68k; then
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
- fi
- ;;
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
- mingw* | os2* | pw32*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
- ;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_prog_compiler_pic_CXX='-fno-common'
- ;;
- *djgpp*)
- # DJGPP does not support shared libraries at all
- lt_prog_compiler_pic_CXX=
- ;;
- interix3*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- lt_prog_compiler_pic_CXX=-Kconform_pic
- fi
- ;;
- hpux*)
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- ;;
- *)
- lt_prog_compiler_pic_CXX='-fPIC'
- ;;
- esac
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic_CXX='-fPIC -shared'
- ;;
- *)
- lt_prog_compiler_pic_CXX='-fPIC'
- ;;
- esac
- else
- case $host_os in
- aix4* | aix5*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static_CXX='-Bstatic'
- else
- lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- chorus*)
- case $cc_basename in
- cxch68*)
- # Green Hills C++ Compiler
- # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
- ;;
- esac
- ;;
- darwin*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- case $cc_basename in
- xlc*)
- lt_prog_compiler_pic_CXX='-qnocommon'
- lt_prog_compiler_wl_CXX='-Wl,'
- ;;
- esac
- ;;
- dgux*)
- case $cc_basename in
- ec++*)
- lt_prog_compiler_pic_CXX='-KPIC'
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- lt_prog_compiler_pic_CXX='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- freebsd* | kfreebsd*-gnu | dragonfly*)
- # FreeBSD uses GNU C++
- ;;
- hpux9* | hpux10* | hpux11*)
- case $cc_basename in
- CC*)
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
- if test "$host_cpu" != ia64; then
- lt_prog_compiler_pic_CXX='+Z'
- fi
- ;;
- aCC*)
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic_CXX='+Z'
- ;;
- esac
- ;;
- *)
- ;;
- esac
- ;;
- interix*)
- # This is c89, which is MS Visual C++ (no shared libs)
- # Anyone wants to do a port?
- ;;
- irix5* | irix6* | nonstopux*)
- case $cc_basename in
- CC*)
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='-non_shared'
- # CC pic flag -KPIC is the default.
- ;;
- *)
- ;;
- esac
- ;;
- linux*)
- case $cc_basename in
- KCC*)
- # KAI C++ Compiler
- lt_prog_compiler_wl_CXX='--backend -Wl,'
- lt_prog_compiler_pic_CXX='-fPIC'
- ;;
- icpc* | ecpc* )
- # Intel C++
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_pic_CXX='-KPIC'
- lt_prog_compiler_static_CXX='-static'
- ;;
- pgCC*)
- # Portland Group C++ compiler
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_pic_CXX='-fpic'
- lt_prog_compiler_static_CXX='-Bstatic'
- ;;
- cxx*)
- # Compaq C++
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- lt_prog_compiler_pic_CXX=
- lt_prog_compiler_static_CXX='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- lynxos*)
- ;;
- m88k*)
- ;;
- mvs*)
- case $cc_basename in
- cxx*)
- lt_prog_compiler_pic_CXX='-W c,exportall'
- ;;
- *)
- ;;
- esac
- ;;
- netbsd*)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic_CXX='-fPIC -shared'
- ;;
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- lt_prog_compiler_wl_CXX='--backend -Wl,'
- ;;
- RCC*)
- # Rational C++ 2.4.1
- lt_prog_compiler_pic_CXX='-pic'
- ;;
- cxx*)
- # Digital/Compaq C++
- lt_prog_compiler_wl_CXX='-Wl,'
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- lt_prog_compiler_pic_CXX=
- lt_prog_compiler_static_CXX='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- psos*)
- ;;
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- lt_prog_compiler_pic_CXX='-KPIC'
- lt_prog_compiler_static_CXX='-Bstatic'
- lt_prog_compiler_wl_CXX='-Qoption ld '
- ;;
- gcx*)
- # Green Hills C++ Compiler
- lt_prog_compiler_pic_CXX='-PIC'
- ;;
- *)
- ;;
- esac
- ;;
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- lt_prog_compiler_pic_CXX='-pic'
- lt_prog_compiler_static_CXX='-Bstatic'
- ;;
- lcc*)
- # Lucid
- lt_prog_compiler_pic_CXX='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- case $cc_basename in
- CC*)
- lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_pic_CXX='-KPIC'
- lt_prog_compiler_static_CXX='-Bstatic'
- ;;
- esac
- ;;
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- lt_prog_compiler_pic_CXX='-KPIC'
- ;;
- *)
- ;;
- esac
- ;;
- vxworks*)
- ;;
- *)
- lt_prog_compiler_can_build_shared_CXX=no
- ;;
- esac
- fi
-
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- lt_prog_compiler_pic_CXX=
- ;;
- *)
- lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
- ;;
-esac
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6
-
-
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic_CXX"; then
- echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6
-if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_prog_compiler_pic_works_CXX=no
- ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18653: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:18657: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_pic_works_CXX=yes
- fi
- fi
- $RM conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6
-
-if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
- case $lt_prog_compiler_pic_CXX in
- "" | " "*) ;;
- *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
- esac
-else
- lt_prog_compiler_pic_CXX=
- lt_prog_compiler_can_build_shared_CXX=no
-fi
-
-fi
-
-
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
-if test "${lt_prog_compiler_static_works_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_prog_compiler_static_works_CXX=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&5
- $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- lt_prog_compiler_static_works_CXX=yes
- fi
- else
- lt_prog_compiler_static_works_CXX=yes
- fi
- fi
- $RM conftest*
- LDFLAGS="$save_LDFLAGS"
-
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6
-
-if test x"$lt_prog_compiler_static_works_CXX" = xyes; then
- :
-else
- lt_prog_compiler_static_CXX=
-fi
-
-
-
-
- echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_prog_compiler_c_o_CXX=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18752: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:18756: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o_CXX=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6
-
-
-
- echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_prog_compiler_c_o_CXX=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18804: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:18808: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o_CXX=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6
-
-
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
- hard_links=yes
- $RM conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6
- if test "$hard_links" = no; then
- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-
-
-
- echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
-
- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- case $host_os in
- aix4* | aix5*)
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- ;;
- pw32*)
- export_symbols_cmds_CXX="$ltdll_cmds"
- ;;
- cygwin* | mingw*)
- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- *)
- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- esac
-
-echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
-echo "${ECHO_T}$ld_shlibs_CXX" >&6
-test "$ld_shlibs_CXX" = no && can_build_shared=no
-
-with_gnu_ld_CXX=$with_gnu_ld
-
-
-
-
-
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc_CXX" in
-x|xyes)
- # Assume -lc should be added
- archive_cmds_need_lc_CXX=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $archive_cmds_CXX in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
- $RM conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_prog_compiler_wl_CXX
- pic_flag=$lt_prog_compiler_pic_CXX
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
- allow_undefined_flag_CXX=
- if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
- (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
- then
- archive_cmds_need_lc_CXX=no
- else
- archive_cmds_need_lc_CXX=yes
- fi
- allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $RM conftest*
- echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6
- ;;
- esac
- fi
- ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
-withGCC=$GXX
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$withGCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$sys_lib_search_path_spec" | $GREP ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix4* | aix5*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[01] | aix4.[01].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- if test "$host_cpu" = m68k; then
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- else
- dynamic_linker=no
- fi
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[45]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $withGCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$withGCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | $GREP "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-kfreebsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[123]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[01]* | freebsdelf3.[01]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
- freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- freebsd*) # from 4.6 on
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-interix3*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-knetbsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-*nto* | *qnx*)
- version_type=qnx
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='ldqnx.so'
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[89] | openbsd2.[89].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-tpf*)
- # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
-hardcode_action_CXX=
-if test -n "$hardcode_libdir_flag_spec_CXX" ||
- test -n "$runpath_var_CXX" ||
- test "X$hardcode_automatic_CXX" = "Xyes" ; then
-
- # We can hardcode non-existent directories.
- if test "$hardcode_direct_CXX" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
- test "$hardcode_minus_L_CXX" != no; then
- # Linking always hardcodes the temporary library directory.
- hardcode_action_CXX=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- hardcode_action_CXX=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- hardcode_action_CXX=unsupported
-fi
-echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
-echo "${ECHO_T}$hardcode_action_CXX" >&6
-
-if test "$hardcode_action_CXX" = relink ||
- test "$inherit_rpath_CXX" = yes; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-
-
-
-
-
-
-
- fi # test -n "$compiler"
-
- CC=$lt_save_CC
- LDCXX=$LD
- LD=$lt_save_LD
- GCC=$lt_save_GCC
- with_gnu_ld=$lt_save_with_gnu_ld
- lt_cv_path_LDCXX=$lt_cv_path_LD
- lt_cv_path_LD=$lt_save_path_LD
- lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
- lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-GLU_CFLAGS="${GL_CFLAGS}"
-if test "X${with_apple_opengl_framework}" != "Xyes"; then
- echo "$as_me:$LINENO: checking for OpenGL Utility library" >&5
-echo $ECHO_N "checking for OpenGL Utility library... $ECHO_C" >&6
-if test "${ax_cv_check_glu_libglu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ax_cv_check_glu_libglu="no"
- ax_save_CPPFLAGS="${CPPFLAGS}"
- CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}"
- ax_save_LIBS="${LIBS}"
- LIBS=""
- ax_check_libs="-lglu32 -lGLU"
- for ax_lib in ${ax_check_libs}; do
- if test X$ax_compiler_ms = Xyes; then
- ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`
- else
- ax_try_lib="${ax_lib}"
- fi
- LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}"
- #
- # libGLU typically links with libstdc++ on POSIX platforms. However,
- # setting the language to C++ means that test program source is named
- # "conftest.cc"; and Microsoft cl doesn't know what to do with such a
- # file.
- #
- ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
- if test X$ax_compiler_ms = Xyes; then
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- fi
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-# if HAVE_WINDOWS_H && defined(_WIN32)
-# include <windows.h>
-# endif
-# include <GL/glu.h>
-int
-main ()
-{
-gluBeginCurve(0)
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ax_cv_check_glu_libglu="${ax_try_lib}"; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test X$ax_compiler_ms = Xyes; then
- ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
- fi
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- done
- LIBS=${ax_save_LIBS}
- CPPFLAGS=${ax_save_CPPFLAGS}
-fi
-echo "$as_me:$LINENO: result: $ax_cv_check_glu_libglu" >&5
-echo "${ECHO_T}$ax_cv_check_glu_libglu" >&6
- if test "X${ax_cv_check_glu_libglu}" = "Xno"; then
- no_glu="yes"
- GLU_CFLAGS=""
- GLU_LIBS=""
- else
- GLU_LIBS="${ax_cv_check_glu_libglu} ${GL_LIBS}"
- fi
-fi
-
-
-
-
-if test "X$with_apple_opengl_framework" = "Xyes"; then
- GLUT_CFLAGS="${GLU_CFLAGS}"
- GLUT_LIBS="-framework GLUT -lobjc ${GL_LIBS}"
-else
- GLUT_CFLAGS=${GLU_CFLAGS}
- GLUT_LIBS=${GLU_LIBS}
-
- #
- # If X is present, assume GLUT depends on it.
- #
- if test "X${no_x}" != "Xyes"; then
- GLUT_LIBS="${X_PRE_LIBS} -lXmu -lXi ${X_EXTRA_LIBS} ${GLUT_LIBS}"
- fi
-
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
- ax_save_CPPFLAGS="${CPPFLAGS}"
- CPPFLAGS="${GLUT_CFLAGS} ${CPPFLAGS}"
-
- echo "$as_me:$LINENO: checking for GLUT library" >&5
-echo $ECHO_N "checking for GLUT library... $ECHO_C" >&6
-if test "${ax_cv_check_glut_libglut+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ax_cv_check_glut_libglut="no"
- ax_save_LIBS="${LIBS}"
- LIBS=""
- ax_check_libs="-lglut32 -lglut"
- for ax_lib in ${ax_check_libs}; do
- if test X$ax_compiler_ms = Xyes; then
- ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`
- else
- ax_try_lib="${ax_lib}"
- fi
- LIBS="${ax_try_lib} ${GLUT_LIBS} ${ax_save_LIBS}"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-# if HAVE_WINDOWS_H && defined(_WIN32)
-# include <windows.h>
-# endif
-# include <GL/glut.h>
-int
-main ()
-{
-glutMainLoop()
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ax_cv_check_glut_libglut="${ax_try_lib}"; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- done
- LIBS=${ax_save_LIBS}
-
-fi
-echo "$as_me:$LINENO: result: $ax_cv_check_glut_libglut" >&5
-echo "${ECHO_T}$ax_cv_check_glut_libglut" >&6
- CPPFLAGS="${ax_save_CPPFLAGS}"
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
- if test "X${ax_cv_check_glut_libglut}" = "Xno"; then
- no_glut="yes"
- GLUT_CFLAGS=""
- GLUT_LIBS=""
- else
- GLUT_LIBS="${ax_cv_check_glut_libglut} ${GLUT_LIBS}"
- fi
-fi
-
-
-
-
-
-if test "$no_x" != "yes" -a "$no_gl" != "yes" \
- -a "$no_glu" != "yes" -a "$no_glut" != "yes" ; then
- HAVE_OPENGL=yes
-fi
-
-
-
-if test "$HAVE_OPENGL" = "yes"; then
- HAVE_OPENGL_TRUE=
- HAVE_OPENGL_FALSE='#'
-else
- HAVE_OPENGL_TRUE='#'
- HAVE_OPENGL_FALSE=
-fi
-
-
-
-
-# Check whether --enable-strip-chopping or --disable-strip-chopping was given.
-if test "${enable_strip_chopping+set}" = set; then
- enableval="$enable_strip_chopping"
- HAVE_STRIPCHOP=$enableval
-else
- HAVE_STRIPCHOP=yes
-fi;
-
-# Check whether --with-default-strip-size or --without-default-strip-size was given.
-if test "${with_default_strip_size+set}" = set; then
- withval="$with_default_strip_size"
-
-fi;
-
-if test "$HAVE_STRIPCHOP" = "yes" \
- -a "x$with_default_strip_size" != "xno"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP
-_ACEOF
-
-
- if test "x$with_default_strip_size" = "x" \
- -o "x$with_default_strip_size" = "xyes"; then
- with_default_strip_size="8192"
- fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define STRIP_SIZE_DEFAULT $with_default_strip_size
-_ACEOF
-
-
-fi
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SUBIFD_SUPPORT 1
-_ACEOF
-
-
-
-# Check whether --enable-extrasample-as-alpha or --disable-extrasample-as-alpha was given.
-if test "${enable_extrasample_as_alpha+set}" = set; then
- enableval="$enable_extrasample_as_alpha"
- HAVE_EXTRASAMPLE_AS_ALPHA=$enableval
-else
- HAVE_EXTRASAMPLE_AS_ALPHA=yes
-fi;
-
-if test "$HAVE_EXTRASAMPLE_AS_ALPHA" = "yes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1
-_ACEOF
-
-fi
-
-
-# Check whether --enable-check-ycbcr-subsampling or --disable-check-ycbcr-subsampling was given.
-if test "${enable_check_ycbcr_subsampling+set}" = set; then
- enableval="$enable_check_ycbcr_subsampling"
- CHECK_JPEG_YCBCR_SUBSAMPLING=$enableval
-else
- CHECK_JPEG_YCBCR_SUBSAMPLING=yes
-fi;
-
-if test "$CHECK_JPEG_YCBCR_SUBSAMPLING" = "yes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define CHECK_JPEG_YCBCR_SUBSAMPLING 1
-_ACEOF
-
-fi
-
-
-
-
- ac_config_headers="$ac_config_headers libtiff/tif_config.h libtiff/tiffconf.h"
-
-
- ac_config_files="$ac_config_files Makefile contrib/Makefile contrib/acorn/Makefile contrib/addtiffo/Makefile contrib/dbs/Makefile contrib/dbs/xtiff/Makefile contrib/iptcutil/Makefile contrib/mac-cw/Makefile contrib/mac-mpw/Makefile contrib/mfs/Makefile contrib/ojpeg/Makefile contrib/pds/Makefile contrib/ras/Makefile contrib/stream/Makefile contrib/tags/Makefile contrib/win_dib/Makefile html/Makefile html/images/Makefile html/man/Makefile libtiff/Makefile man/Makefile port/Makefile test/Makefile tools/Makefile"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "${HAVE_RPATH_TRUE}" && test -z "${HAVE_RPATH_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_RPATH\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_RPATH\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "${HAVE_CXX_TRUE}" && test -z "${HAVE_CXX_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_CXX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_CXX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "${HAVE_OPENGL_TRUE}" && test -z "${HAVE_OPENGL_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_OPENGL\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_OPENGL\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by LibTIFF Software $as_me 3.8.2, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
- --header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Configuration commands:
-$config_commands
-
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-LibTIFF Software config.status 3.8.2
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "x$1" : 'x\([^=]*\)='`
- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- -*)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
- esac
-
- case $ac_option in
- # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1" ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-#
-# INIT-COMMANDS section.
-#
-
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
-macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
-enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
-pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
-enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
-host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
-host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
-host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
-build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
-build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
-build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
-SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
-Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
-GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
-EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
-FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
-LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
-NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
-LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
-max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
-ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
-exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
-reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
-reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
-file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
-AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
-AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
-RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
-old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
-CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
-GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
-objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
-SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
-ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
-MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
-need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
-libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
-shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
-export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
-allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
-inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
-link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
-fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
-always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
-export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
-variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
-need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
-version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
-runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
-libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
-soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
-old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
-striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
-AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`'
-DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`'
-OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
-predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`'
-postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`'
-predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`'
-postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`'
-LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# Quote evaled strings.
-for var in SED \
-GREP \
-EGREP \
-FGREP \
-LD \
-NM \
-LN_S \
-reload_flag \
-deplibs_check_method \
-file_magic_cmd \
-AR \
-AR_FLAGS \
-STRIP \
-RANLIB \
-CC \
-CFLAGS \
-compiler \
-lt_cv_sys_global_symbol_pipe \
-lt_cv_sys_global_symbol_to_cdecl \
-lt_cv_sys_global_symbol_to_c_name_address \
-SHELL \
-ECHO \
-lt_prog_compiler_no_builtin_flag \
-lt_prog_compiler_wl \
-lt_prog_compiler_pic \
-lt_prog_compiler_static \
-lt_cv_prog_compiler_c_o \
-need_locks \
-shrext_cmds \
-export_dynamic_flag_spec \
-whole_archive_flag_spec \
-with_gnu_ld \
-allow_undefined_flag \
-no_undefined_flag \
-hardcode_libdir_flag_spec \
-hardcode_libdir_flag_spec_ld \
-hardcode_libdir_separator \
-fix_srcfile_path \
-exclude_expsyms \
-include_expsyms \
-file_list_spec \
-variables_saved_for_relink \
-libname_spec \
-library_names_spec \
-soname_spec \
-finish_eval \
-old_striplib \
-striplib \
-predep_objects \
-postdep_objects \
-predeps \
-postdeps \
-compiler_lib_search_path \
-LD_CXX \
-compiler_CXX \
-lt_prog_compiler_no_builtin_flag_CXX \
-lt_prog_compiler_wl_CXX \
-lt_prog_compiler_pic_CXX \
-lt_prog_compiler_static_CXX \
-lt_cv_prog_compiler_c_o_CXX \
-export_dynamic_flag_spec_CXX \
-whole_archive_flag_spec_CXX \
-with_gnu_ld_CXX \
-allow_undefined_flag_CXX \
-no_undefined_flag_CXX \
-hardcode_libdir_flag_spec_CXX \
-hardcode_libdir_flag_spec_ld_CXX \
-hardcode_libdir_separator_CXX \
-fix_srcfile_path_CXX \
-exclude_expsyms_CXX \
-include_expsyms_CXX \
-file_list_spec_CXX \
-predep_objects_CXX \
-postdep_objects_CXX \
-predeps_CXX \
-postdeps_CXX \
-compiler_lib_search_path_CXX; do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Double-quote double-evaled strings.
-for var in reload_cmds \
-old_postinstall_cmds \
-old_postuninstall_cmds \
-old_archive_cmds \
-extract_expsyms_cmds \
-old_archive_from_new_cmds \
-old_archive_from_expsyms_cmds \
-archive_cmds \
-archive_expsym_cmds \
-module_cmds \
-module_expsym_cmds \
-export_symbols_cmds \
-prelink_cmds \
-postinstall_cmds \
-postuninstall_cmds \
-finish_cmds \
-sys_lib_search_path_spec \
-sys_lib_dlsearch_path_spec \
-old_archive_cmds_CXX \
-old_archive_from_new_cmds_CXX \
-old_archive_from_expsyms_cmds_CXX \
-archive_cmds_CXX \
-archive_expsym_cmds_CXX \
-module_cmds_CXX \
-module_expsym_cmds_CXX \
-export_symbols_cmds_CXX \
-prelink_cmds_CXX; do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
- ;;
-esac
-
-ac_aux_dir='$ac_aux_dir'
-xsi_shell='$xsi_shell'
-
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-
- PACKAGE='$PACKAGE'
- VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
- RM='$RM'
- ofile='$ofile'
-
-
-
-
-
-
-_ACEOF
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "contrib/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;;
- "contrib/acorn/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/acorn/Makefile" ;;
- "contrib/addtiffo/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/addtiffo/Makefile" ;;
- "contrib/dbs/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/dbs/Makefile" ;;
- "contrib/dbs/xtiff/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/dbs/xtiff/Makefile" ;;
- "contrib/iptcutil/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/iptcutil/Makefile" ;;
- "contrib/mac-cw/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/mac-cw/Makefile" ;;
- "contrib/mac-mpw/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/mac-mpw/Makefile" ;;
- "contrib/mfs/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/mfs/Makefile" ;;
- "contrib/ojpeg/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/ojpeg/Makefile" ;;
- "contrib/pds/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/pds/Makefile" ;;
- "contrib/ras/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/ras/Makefile" ;;
- "contrib/stream/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/stream/Makefile" ;;
- "contrib/tags/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/tags/Makefile" ;;
- "contrib/win_dib/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/win_dib/Makefile" ;;
- "html/Makefile" ) CONFIG_FILES="$CONFIG_FILES html/Makefile" ;;
- "html/images/Makefile" ) CONFIG_FILES="$CONFIG_FILES html/images/Makefile" ;;
- "html/man/Makefile" ) CONFIG_FILES="$CONFIG_FILES html/man/Makefile" ;;
- "libtiff/Makefile" ) CONFIG_FILES="$CONFIG_FILES libtiff/Makefile" ;;
- "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
- "port/Makefile" ) CONFIG_FILES="$CONFIG_FILES port/Makefile" ;;
- "test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
- "tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
- "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- "libtool" ) CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
- "libtiff/tif_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS libtiff/tif_config.h" ;;
- "libtiff/tiffconf.h" ) CONFIG_HEADERS="$CONFIG_HEADERS libtiff/tiffconf.h" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@target@,$target,;t t
-s,@target_cpu@,$target_cpu,;t t
-s,@target_vendor@,$target_vendor,;t t
-s,@target_os@,$target_os,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@CYGPATH_W@,$CYGPATH_W,;t t
-s,@PACKAGE@,$PACKAGE,;t t
-s,@VERSION@,$VERSION,;t t
-s,@ACLOCAL@,$ACLOCAL,;t t
-s,@AUTOCONF@,$AUTOCONF,;t t
-s,@AUTOMAKE@,$AUTOMAKE,;t t
-s,@AUTOHEADER@,$AUTOHEADER,;t t
-s,@MAKEINFO@,$MAKEINFO,;t t
-s,@install_sh@,$install_sh,;t t
-s,@STRIP@,$STRIP,;t t
-s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
-s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
-s,@mkdir_p@,$mkdir_p,;t t
-s,@AWK@,$AWK,;t t
-s,@SET_MAKE@,$SET_MAKE,;t t
-s,@am__leading_dot@,$am__leading_dot,;t t
-s,@AMTAR@,$AMTAR,;t t
-s,@am__tar@,$am__tar,;t t
-s,@am__untar@,$am__untar,;t t
-s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
-s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
-s,@MAINT@,$MAINT,;t t
-s,@LIBTIFF_MAJOR_VERSION@,$LIBTIFF_MAJOR_VERSION,;t t
-s,@LIBTIFF_MINOR_VERSION@,$LIBTIFF_MINOR_VERSION,;t t
-s,@LIBTIFF_MICRO_VERSION@,$LIBTIFF_MICRO_VERSION,;t t
-s,@LIBTIFF_ALPHA_VERSION@,$LIBTIFF_ALPHA_VERSION,;t t
-s,@LIBTIFF_VERSION@,$LIBTIFF_VERSION,;t t
-s,@LIBTIFF_VERSION_INFO@,$LIBTIFF_VERSION_INFO,;t t
-s,@LIBTIFF_RELEASE_DATE@,$LIBTIFF_RELEASE_DATE,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@DEPDIR@,$DEPDIR,;t t
-s,@am__include@,$am__include,;t t
-s,@am__quote@,$am__quote,;t t
-s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
-s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
-s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
-s,@CCDEPMODE@,$CCDEPMODE,;t t
-s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
-s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
-s,@LN_S@,$LN_S,;t t
-s,@LIBTOOL@,$LIBTOOL,;t t
-s,@SED@,$SED,;t t
-s,@EGREP@,$EGREP,;t t
-s,@FGREP@,$FGREP,;t t
-s,@GREP@,$GREP,;t t
-s,@LD@,$LD,;t t
-s,@DUMPBIN@,$DUMPBIN,;t t
-s,@ac_ct_DUMPBIN@,$ac_ct_DUMPBIN,;t t
-s,@NM@,$NM,;t t
-s,@AR@,$AR,;t t
-s,@ac_ct_AR@,$ac_ct_AR,;t t
-s,@RANLIB@,$RANLIB,;t t
-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@lt_ECHO@,$lt_ECHO,;t t
-s,@CPP@,$CPP,;t t
-s,@AS@,$AS,;t t
-s,@ac_ct_AS@,$ac_ct_AS,;t t
-s,@DLLTOOL@,$DLLTOOL,;t t
-s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
-s,@OBJDUMP@,$OBJDUMP,;t t
-s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@HAVE_RPATH_TRUE@,$HAVE_RPATH_TRUE,;t t
-s,@HAVE_RPATH_FALSE@,$HAVE_RPATH_FALSE,;t t
-s,@LIBTIFF_DOCDIR@,$LIBTIFF_DOCDIR,;t t
-s,@HAVE_CXX_TRUE@,$HAVE_CXX_TRUE,;t t
-s,@HAVE_CXX_FALSE@,$HAVE_CXX_FALSE,;t t
-s,@X_CFLAGS@,$X_CFLAGS,;t t
-s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
-s,@X_LIBS@,$X_LIBS,;t t
-s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
-s,@acx_pthread_config@,$acx_pthread_config,;t t
-s,@PTHREAD_CC@,$PTHREAD_CC,;t t
-s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
-s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
-s,@GL_CFLAGS@,$GL_CFLAGS,;t t
-s,@GL_LIBS@,$GL_LIBS,;t t
-s,@CXX@,$CXX,;t t
-s,@CXXFLAGS@,$CXXFLAGS,;t t
-s,@ac_ct_CXX@,$ac_ct_CXX,;t t
-s,@CXXDEPMODE@,$CXXDEPMODE,;t t
-s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
-s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
-s,@CXXCPP@,$CXXCPP,;t t
-s,@GLU_CFLAGS@,$GLU_CFLAGS,;t t
-s,@GLU_LIBS@,$GLU_LIBS,;t t
-s,@GLUT_CFLAGS@,$GLUT_CFLAGS,;t t
-s,@GLUT_LIBS@,$GLUT_LIBS,;t t
-s,@HAVE_OPENGL_TRUE@,$HAVE_OPENGL_TRUE,;t t
-s,@HAVE_OPENGL_FALSE@,$HAVE_OPENGL_FALSE,;t t
-s,@LIBDIR@,$LIBDIR,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
- esac
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_HEADER section.
-#
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- # Do quote $f, to prevent DOS paths from being IFS'd.
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
- # Remove the trailing spaces.
- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
-
-_ACEOF
-
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h. The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status. Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless. Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #undef with comments. This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >>conftest.undefs <<\_ACEOF
-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
-
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo ' :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
-do
- # Write a limited-size here document to $tmp/defines.sed.
- echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#define' lines.
- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/defines.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
- rm -f conftest.defines
- mv conftest.tail conftest.defines
-done
-rm -f conftest.defines
-echo ' fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
- # Write a limited-size here document to $tmp/undefs.sed.
- echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#undef'
- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/undefs.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
- rm -f conftest.undefs
- mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
-
-cat >>$CONFIG_STATUS <<\_ACEOF
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- echo "/* Generated by configure. */" >$tmp/config.h
- else
- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
- fi
- cat $tmp/in >>$tmp/config.h
- rm -f $tmp/in
- if test x"$ac_file" != x-; then
- if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
- else
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- rm -f $ac_file
- mv $tmp/config.h $ac_file
- fi
- else
- cat $tmp/config.h
- rm -f $tmp/config.h
- fi
-# Compute $ac_file's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $ac_file | $ac_file:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
-$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X$ac_file : 'X\(//\)[^/]' \| \
- X$ac_file : 'X\(//\)$' \| \
- X$ac_file : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X$ac_file |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`/stamp-h$_am_stamp_count
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_COMMANDS section.
-#
-for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
- ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
- ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_dest" : 'X\(//\)[^/]' \| \
- X"$ac_dest" : 'X\(//\)$' \| \
- X"$ac_dest" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_dest" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
-echo "$as_me: executing $ac_dest commands" >&6;}
- case $ac_dest in
- depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # So let's grep whole file.
- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- dirpart=`(dirname "$mf") 2>/dev/null ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$mf" : 'X\(//\)[^/]' \| \
- X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$mf" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`(dirname "$file") 2>/dev/null ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$file" : 'X\(//\)[^/]' \| \
- X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p $dirpart/$fdir
- else
- as_dir=$dirpart/$fdir
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
-echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
- { (exit 1); exit 1; }; }; }
-
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
-done
- ;;
- libtool )
-
- # See if we are running on zsh, and set the options which allow our
- # commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
-
- cfgfile="${ofile}T"
- trap "$RM \"$cfgfile\"; exit 1" 1 2 15
- $RM "$cfgfile"
-
- cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006 Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program 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.
-
-# TEST SUITE MARKER ## BEGIN SOURCABLE
-
-# The names of the tagged configurations supported by this script.
-available_tags="CXX "
-
-# ### BEGIN LIBTOOL CONFIG
-
-# Which release of libtool.m4 was used?
-macro_version=$macro_version
-macro_revision=$macro_revision
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# What type of objects to build.
-pic_mode=$pic_mode
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="\$SED -e 1s/^X//"
-
-# A grep program that handles long lines.
-GREP=$lt_GREP
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# A literal string matcher.
-FGREP=$lt_FGREP
-
-# A BSD- or MS-compatible name lister.
-NM=$lt_NM
-
-# Whether we need soft or hard links.
-LN_S=$lt_LN_S
-
-# What is the maximum length of a command?
-max_cmd_len=$max_cmd_len
-
-# Object file suffix (normally "o").
-objext=$ac_objext
-
-# Executable file suffix (normally "").
-exeext=$exeext
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == "file_magic".
-file_magic_cmd=$lt_file_magic_cmd
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A symbol stripping program.
-STRIP=$lt_STRIP
-
-# Commands used to install an old-style archive.
-RANLIB=$lt_RANLIB
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# A C compiler.
-LTCC=$lt_CC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_CFLAGS
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration.
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair.
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# An echo program that does not interpret backslashes.
-ECHO=$lt_ECHO
-
-# Used to examine libraries when file_magic_cmd begins with "file".
-MAGIC_CMD=$MAGIC_CMD
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Old archive suffix (normally "a").
-libext=$libext
-
-# Shared library suffix (normally ".so").
-shrext_cmds=$lt_shrext_cmds
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at link time.
-variables_saved_for_relink=$lt_variables_saved_for_relink
-
-# Do we need the "lib" prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Library versioning type.
-version_type=$version_type
-
-# Shared library runtime path variable.
-runpath_var=$runpath_var
-
-# Shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Command to use after installation of a shared archive.
-postinstall_cmds=$lt_postinstall_cmds
-
-# Command to use after uninstallation of a shared archive.
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# As "finish_cmds", except a single script fragment to be evaled but
-# not shown.
-finish_eval=$lt_finish_eval
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Compile-time system search path for libraries.
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries.
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Assembler program.
-AS=$AS
-
-# DLL creation program.
-DLLTOOL=$DLLTOOL
-
-# Object dumper program.
-OBJDUMP=$OBJDUMP
-
-
-# The linker used to build libraries.
-LD=$lt_LD
-
-# Commands used to build an old-style archive.
-old_archive_cmds=$lt_old_archive_cmds
-
-# A language specific compiler.
-CC=$lt_compiler
-
-# Is the compiler the GNU compiler?
-with_gcc=$GCC
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc
-
-# Whether or not to disallow shared libs when runtime libs are static.
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
-
-# Commands used to build a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
-
-# Commands used to build a loadable module if different from building
-# a shared archive.
-module_cmds=$lt_module_cmds
-module_expsym_cmds=$lt_module_expsym_cmds
-
-# Whether we are building with GNU ld or not.
-with_gnu_ld=$lt_with_gnu_ld
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag
-
-# Flag that enforces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
-
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking. This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
-
-# Whether we need a single "-rpath" flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary.
-hardcode_direct=$hardcode_direct
-
-# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
-# into the resulting binary.
-hardcode_minus_L=$hardcode_minus_L
-
-# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
-# into the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
-
-# Set to "yes" if building a shared library automatically hardcodes DIR
-# into the library and all subsequent libraries and executables linked
-# against it.
-hardcode_automatic=$hardcode_automatic
-
-# Set to yes if linker adds runtime paths of dependent libraries
-# to runtime path list.
-inherit_rpath=$inherit_rpath
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
-
-# Set to "yes" if exported symbols are required.
-always_export_symbols=$always_export_symbols
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms
-
-# Commands necessary for linking programs (against libraries) with templates.
-prelink_cmds=$lt_prelink_cmds
-
-# Specify filename containing input files.
-file_list_spec=$lt_file_list_spec
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
-
-# Dependencies to place before and after the objects being linked to
-# create a shared library.
-predep_objects=$lt_predep_objects
-postdep_objects=$lt_postdep_objects
-predeps=$lt_predeps
-postdeps=$lt_postdeps
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path
-
-# ### END LIBTOOL CONFIG
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-_LT_EOF
-
- case $host_os in
- aix3*)
- cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-_LT_EOF
- ;;
- esac
-
-
-ltmain="$ac_aux_dir/ltmain.sh"
-
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- case $xsi_shell in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
- # positional parameters, so assign one to ordinary parameter first.
- func_stripname_result=${3}
- func_stripname_result=${func_stripname_result#"${1}"}
- func_stripname_result=${func_stripname_result%"${2}"}
-}
-_LT_EOF
- ;;
- *) # Bourne compatible functions.
- cat << \_LT_EOF >> "$cfgfile"
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- # Extract subdirectory from the argument.
- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
- case ${2} in
- .*) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
- *) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
- esac
-}
-_LT_EOF
-esac
-
-
- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- mv -f "$cfgfile" "$ofile" ||
- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
- chmod +x "$ofile"
-
-
- cat <<_LT_EOF >> "$ofile"
-
-# ### BEGIN LIBTOOL TAG CONFIG: CXX
-
-# The linker used to build libraries.
-LD=$lt_LD_CXX
-
-# Commands used to build an old-style archive.
-old_archive_cmds=$lt_old_archive_cmds_CXX
-
-# A language specific compiler.
-CC=$lt_compiler_CXX
-
-# Is the compiler the GNU compiler?
-with_gcc=$GCC_CXX
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_CXX
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_CXX
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_CXX
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_CXX
-
-# Whether or not to disallow shared libs when runtime libs are static.
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
-
-# Commands used to build a shared archive.
-archive_cmds=$lt_archive_cmds_CXX
-archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
-
-# Commands used to build a loadable module if different from building
-# a shared archive.
-module_cmds=$lt_module_cmds_CXX
-module_expsym_cmds=$lt_module_expsym_cmds_CXX
-
-# Whether we are building with GNU ld or not.
-with_gnu_ld=$lt_with_gnu_ld_CXX
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_CXX
-
-# Flag that enforces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_CXX
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
-
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking. This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
-
-# Whether we need a single "-rpath" flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary.
-hardcode_direct=$hardcode_direct_CXX
-
-# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
-# into the resulting binary.
-hardcode_minus_L=$hardcode_minus_L_CXX
-
-# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
-# into the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
-
-# Set to "yes" if building a shared library automatically hardcodes DIR
-# into the library and all subsequent libraries and executables linked
-# against it.
-hardcode_automatic=$hardcode_automatic_CXX
-
-# Set to yes if linker adds runtime paths of dependent libraries
-# to runtime path list.
-inherit_rpath=$inherit_rpath_CXX
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_CXX
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path_CXX
-
-# Set to "yes" if exported symbols are required.
-always_export_symbols=$always_export_symbols_CXX
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_CXX
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_CXX
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_CXX
-
-# Commands necessary for linking programs (against libraries) with templates.
-prelink_cmds=$lt_prelink_cmds_CXX
-
-# Specify filename containing input files.
-file_list_spec=$lt_file_list_spec_CXX
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_CXX
-
-# Dependencies to place before and after the objects being linked to
-# create a shared library.
-predep_objects=$lt_predep_objects_CXX
-postdep_objects=$lt_postdep_objects_CXX
-predeps=$lt_predeps_CXX
-postdeps=$lt_postdeps_CXX
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
-
-# ### END LIBTOOL TAG CONFIG: CXX
-_LT_EOF
-
- ;;
- esac
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
-fi
-
-
-
-echo ""
-echo "Libtiff is now configured for ${host}"
-echo ""
-echo " Installation directory: ${prefix}"
-echo " Documentation directory: ${LIBTIFF_DOCDIR}"
-echo " C compiler: ${CC} ${CFLAGS}"
-echo " C++ compiler: ${CXX} ${CXXFLAGS}"
-echo " Enable runtime linker paths: ${HAVE_RPATH}"
-echo " Support Microsoft Document Imaging: ${HAVE_MDI}"
-echo ""
-echo " Support for internal codecs:"
-echo " CCITT Group 3 & 4 algorithms: ${HAVE_CCITT}"
-echo " Macintosh PackBits algorithm: ${HAVE_PACKBITS}"
-echo " LZW algorithm: ${HAVE_LZW}"
-echo " ThunderScan 4-bit RLE algorithm: ${HAVE_THUNDER}"
-echo " NeXT 2-bit RLE algorithm: ${HAVE_NEXT}"
-echo " LogLuv high dynamic range encoding: ${HAVE_LOGLUV}"
-echo ""
-echo " Support for external codecs:"
-echo " ZLIB support: ${HAVE_ZLIB}"
-echo " Pixar log-format algorithm: ${HAVE_PIXARLOG}"
-echo " JPEG support: ${HAVE_JPEG}"
-echo " Old JPEG support: ${HAVE_OJPEG}"
-echo ""
-echo " C++ support: ${HAVE_CXX}"
-echo ""
-echo " OpenGL support: ${HAVE_OPENGL}"
-echo ""
-
diff --git a/src/3rdparty/libtiff/configure.ac b/src/3rdparty/libtiff/configure.ac
deleted file mode 100644
index e5406cda2d..0000000000
--- a/src/3rdparty/libtiff/configure.ac
+++ /dev/null
@@ -1,568 +0,0 @@
-dnl -*- Autoconf -*-
-dnl Tag Image File Format (TIFF) Software
-dnl
-dnl Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this software and
-dnl its documentation for any purpose is hereby granted without fee, provided
-dnl that (i) the above copyright notices and this permission notice appear in
-dnl all copies of the software and related documentation, and (ii) the names of
-dnl Sam Leffler and Silicon Graphics may not be used in any advertising or
-dnl publicity relating to the software without the specific, prior written
-dnl permission of Sam Leffler and Silicon Graphics.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-dnl EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-dnl WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-dnl
-dnl IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-dnl ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-dnl OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-dnl WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-dnl LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-dnl OF THIS SOFTWARE.
-
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.59)
-AC_INIT([LibTIFF Software], 3.8.2, [tiff@lists.maptools.org], tiff)
-AC_CONFIG_AUX_DIR(config)
-AC_CONFIG_MACRO_DIR(m4)
-AC_LANG(C)
-
-dnl Compute the canonical target-system type variable
-AC_CANONICAL_TARGET
-
-AM_INIT_AUTOMAKE
-dnl Do not rebuild generated files every time
-AM_MAINTAINER_MODE
-
-dnl Versioning.
-dnl Don't fill the ALPHA_VERSION field, if not applicable.
-LIBTIFF_MAJOR_VERSION=3
-LIBTIFF_MINOR_VERSION=8
-LIBTIFF_MICRO_VERSION=2
-LIBTIFF_ALPHA_VERSION=
-LIBTIFF_VERSION=$LIBTIFF_MAJOR_VERSION.$LIBTIFF_MINOR_VERSION.$LIBTIFF_MICRO_VERSION$LIBTIFF_ALPHA_VERSION
-dnl This will be used with the 'make release' target
-LIBTIFF_RELEASE_DATE=`date +"%Y%m%d"`
-
-# This is a special hack for OpenBSD and MirOS systems. The dynamic linker
-# in OpenBSD uses some special semantics for shared libraries. Their soname
-# contains only two numbers, major and minor.
-# See http://bugzilla.remotesensing.org/show_bug.cgi?id=838 for details.
-case "$target_os" in
- openbsd* | mirbsd*)
- LIBTIFF_VERSION_INFO=$LIBTIFF_MAJOR_VERSION$LIBTIFF_MINOR_VERSION:$LIBTIFF_MICRO_VERSION$LIBTIFF_ALPHA_VERSION:0
- ;;
- *)
- LIBTIFF_VERSION_INFO=$LIBTIFF_MAJOR_VERSION:$LIBTIFF_MINOR_VERSION:$LIBTIFF_MICRO_VERSION$LIBTIFF_ALPHA_VERSION
- ;;
-esac
-
-AC_SUBST(LIBTIFF_MAJOR_VERSION)
-AC_SUBST(LIBTIFF_MINOR_VERSION)
-AC_SUBST(LIBTIFF_MICRO_VERSION)
-AC_SUBST(LIBTIFF_ALPHA_VERSION)
-AC_SUBST(LIBTIFF_VERSION)
-AC_SUBST(LIBTIFF_VERSION_INFO)
-AC_SUBST(LIBTIFF_RELEASE_DATE)
-
-dnl Checks for programs.
-AC_PROG_CC
-AM_PROG_CC_C_O
-
-dnl We want warnings. As many warnings as possible.
-VL_PROG_CC_WARNINGS()
-
-AC_PROG_INSTALL
-AC_PROG_LN_S
-AC_PROG_LIBTOOL
-AC_LIBTOOL_WIN32_DLL
-
-dnl Checks for libraries.
-AC_CHECK_LIB([c], [main])
-
-dnl We don't need to add math library at all targets
-case "$target_os" in
- cygwin* | mingw32* | beos* | darwin*)
- ;;
- *)
- AC_CHECK_LIB(m,main,,,)
- ;;
-esac
-
-dnl Checks for header files.
-AC_CHECK_HEADERS([assert.h fcntl.h limits.h malloc.h search.h sys/time.h unistd.h])
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_C_INLINE
-AC_C_BIGENDIAN
-AC_TYPE_OFF_T
-AC_TYPE_SIZE_T
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(long)
-AC_HEADER_TIME
-AC_STRUCT_TM
-dnl Some compilers (IBM VisualAge) has these types defined, so check it here:
-AC_CHECK_TYPES([int8, int16, int32],,,
-[
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-])
-
-dnl Checks for library functions.
-AC_CHECK_FUNCS([floor isascii memmove memset mmap pow sqrt strchr strrchr strstr strtol])
-
-dnl Will use local replacements for unavailable functions
-AC_REPLACE_FUNCS(getopt)
-AC_REPLACE_FUNCS(strcasecmp)
-AC_REPLACE_FUNCS(strtoul)
-AC_REPLACE_FUNCS(lfind)
-
-dnl ---------------------------------------------------------------------------
-dnl Check the native cpu bit order.
-dnl ---------------------------------------------------------------------------
-AC_MSG_CHECKING([native cpu bit order])
-case "$target_cpu" in
- i*86*)
- HOST_FILLORDER=FILLORDER_LSB2MSB
- AC_MSG_RESULT([lsb2msb])
- ;;
- *)
- HOST_FILLORDER=FILLORDER_MSB2LSB
- AC_MSG_RESULT([msb2lsb])
- ;;
-esac
-AC_DEFINE_UNQUOTED(HOST_FILLORDER, $HOST_FILLORDER, [Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB)])
-
-dnl ---------------------------------------------------------------------------
-dnl Configure legacy tifconf.h HOST_BIGENDIAN.
-dnl ---------------------------------------------------------------------------
-if test "$ac_cv_c_bigendian" = yes ; then
- HOST_BIGENDIAN=1
-else
- HOST_BIGENDIAN=0
-fi
-AC_DEFINE_UNQUOTED(HOST_BIGENDIAN,$HOST_BIGENDIAN,[Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian (Intel)])
-
-dnl ---------------------------------------------------------------------------
-dnl Make the POSIX.2 features available.
-dnl ---------------------------------------------------------------------------
-#_POSIX_C_SOURCE=2
-#AC_DEFINE_UNQUOTED(_POSIX_C_SOURCE, $_POSIX_C_SOURCE, [Define this macro to a positive integer to control which POSIX functionality is made available.])
-
-dnl ---------------------------------------------------------------------------
-dnl Set the floating point format.
-dnl FIXME: write appropriate test.
-dnl ---------------------------------------------------------------------------
-HAVE_IEEEFP=1
-AC_DEFINE_UNQUOTED(HAVE_IEEEFP, $HAVE_IEEEFP, [Define as 0 or 1 according to the floating point format suported by the machine])
-
-dnl ---------------------------------------------------------------------------
-dnl Enable run-time paths to libraries usage.
-dnl ---------------------------------------------------------------------------
-
-AC_ARG_ENABLE(rpath,
- AS_HELP_STRING([--enable-rpath],
- [Enable runtime linker paths (-R libtool option)]),
- [HAVE_RPATH=$enableval], [HAVE_RPATH=no])
-AM_CONDITIONAL(HAVE_RPATH, test "$HAVE_RPATH" = "yes")
-
-dnl ---------------------------------------------------------------------------
-dnl Support large files.
-dnl ---------------------------------------------------------------------------
-
-AC_SYS_LARGEFILE
-
-dnl ---------------------------------------------------------------------------
-dnl Point to path where we should install documentation.
-dnl ---------------------------------------------------------------------------
-
-LIBTIFF_DOCDIR=\${prefix}/share/doc/${PACKAGE}-${LIBTIFF_VERSION}
-
-AC_ARG_WITH(docdir,
- AS_HELP_STRING([--with-docdir=DIR],
- [directory where documentation should be installed]),,)
-if test "x$with_docdir" != "x" ; then
- LIBTIFF_DOCDIR=$with_docdir
-fi
-
-AC_SUBST(LIBTIFF_DOCDIR)
-
-dnl ---------------------------------------------------------------------------
-dnl Switch on/off internal codecs.
-dnl ---------------------------------------------------------------------------
-
-AC_ARG_ENABLE(ccitt,
- AS_HELP_STRING([--disable-ccitt],
- [disable support for CCITT Group 3 & 4 algorithms]),
- [HAVE_CCITT=$enableval], [HAVE_CCITT=yes])
-
-if test "$HAVE_CCITT" = "yes" ; then
- AC_DEFINE(CCITT_SUPPORT,1,[Support CCITT Group 3 & 4 algorithms])
-fi
-
-AC_ARG_ENABLE(packbits,
- AS_HELP_STRING([--disable-packbits],
- [disable support for Macintosh PackBits algorithm]),
- [HAVE_PACKBITS=$enableval], [HAVE_PACKBITS=yes])
-
-if test "$HAVE_PACKBITS" = "yes" ; then
- AC_DEFINE(PACKBITS_SUPPORT,1,[Support Macintosh PackBits algorithm])
-fi
-
-AC_ARG_ENABLE(lzw,
- AS_HELP_STRING([--disable-lzw],
- [disable support for LZW algorithm]),
- [HAVE_LZW=$enableval], [HAVE_LZW=yes])
-
-if test "$HAVE_LZW" = "yes" ; then
- AC_DEFINE(LZW_SUPPORT,1,[Support LZW algorithm])
-fi
-
-AC_ARG_ENABLE(thunder,
- AS_HELP_STRING([--disable-thunder],
- [disable support for ThunderScan 4-bit RLE algorithm]),
- [HAVE_THUNDER=$enableval], [HAVE_THUNDER=yes])
-
-if test "$HAVE_THUNDER" = "yes" ; then
- AC_DEFINE(THUNDER_SUPPORT,1,[Support ThunderScan 4-bit RLE algorithm])
-fi
-
-HAVE_NEXT=yes
-
-AC_ARG_ENABLE(next,
- AS_HELP_STRING([--disable-next],
- [disable support for NeXT 2-bit RLE algorithm]),
- [HAVE_NEXT=$enableval], [HAVE_NEXT=yes])
-
-if test "$HAVE_NEXT" = "yes" ; then
- AC_DEFINE(NEXT_SUPPORT,1,[Support NeXT 2-bit RLE algorithm])
-fi
-
-AC_ARG_ENABLE(logluv,
- AS_HELP_STRING([--disable-logluv],
- [disable support for LogLuv high dynamic range encoding]),
- [HAVE_LOGLUV=$enableval], [HAVE_LOGLUV=yes])
-
-if test "$HAVE_LOGLUV" = "yes" ; then
- AC_DEFINE(LOGLUV_SUPPORT,1,[Support LogLuv high dynamic range encoding])
-fi
-
-dnl ---------------------------------------------------------------------------
-dnl Switch on/off support for Microsoft Document Imaging
-dnl ---------------------------------------------------------------------------
-
-AC_ARG_ENABLE(mdi,
- AS_HELP_STRING([--disable-mdi],
- [disable support for Microsoft Document Imaging]),
- [HAVE_MDI=$enableval], [HAVE_MDI=yes])
-
-if test "$HAVE_MDI" = "yes" ; then
- AC_DEFINE(MDI_SUPPORT,1,[Support Microsoft Document Imaging format])
-fi
-
-dnl ---------------------------------------------------------------------------
-dnl Check for ZLIB.
-dnl ---------------------------------------------------------------------------
-
-HAVE_ZLIB=no
-
-AC_ARG_ENABLE(zlib,
- AS_HELP_STRING([--disable-zlib],
- [disable Zlib usage (required for Deflate compression, enabled by default)]),,)
-AC_ARG_WITH(zlib-include-dir,
- AS_HELP_STRING([--with-zlib-include-dir=DIR],
- [location of Zlib headers]),,)
-AC_ARG_WITH(zlib-lib-dir,
- AS_HELP_STRING([--with-zlib-lib-dir=DIR],
- [location of Zlib library binary]),,)
-
-if test "x$enable_zlib" != "xno" ; then
-
- if test "x$with_zlib_lib_dir" != "x" ; then
- LDFLAGS="-L$with_zlib_lib_dir $LDFLAGS"
- fi
-
- AC_CHECK_LIB(z, inflateEnd, [zlib_lib=yes], [zlib_lib=no],)
- if test "$zlib_lib" = "no" -a "x$with_zlib_lib_dir" != "x"; then
- AC_MSG_ERROR([Zlib library not found at $with_zlib_lib_dir])
- fi
-
- if test "x$with_zlib_include_dir" != "x" ; then
- CPPFLAGS="-I$with_zlib_include_dir $CPPFLAGS"
- fi
- AC_CHECK_HEADER(zlib.h, [zlib_h=yes], [zlib_h=no])
- if test "$zlib_h" = "no" -a "x$with_zlib_include_dir" != "x" ; then
- AC_MSG_ERROR([Zlib headers not found at $with_zlib_include_dir])
- fi
-
- if test "$zlib_lib" = "yes" -a "$zlib_h" = "yes" ; then
- HAVE_ZLIB=yes
- fi
-
-fi
-
-if test "$HAVE_ZLIB" = "yes" ; then
- AC_DEFINE(ZIP_SUPPORT,1,[Support Deflate compression])
- LIBS="-lz $LIBS"
-
- if test "$HAVE_RPATH" = "yes" -a "x$with_zlib_lib_dir" != "x" ; then
- LIBDIR="-R $with_zlib_lib_dir $LIBDIR"
- fi
-
-fi
-
-dnl ---------------------------------------------------------------------------
-dnl Check for Pixar log-format algorithm.
-dnl ---------------------------------------------------------------------------
-
-AC_ARG_ENABLE(pixarlog,
- AS_HELP_STRING([--disable-pixarlog],
- [disable support for Pixar log-format algorithm (requires Zlib)]),
- [HAVE_PIXARLOG=$enableval], [HAVE_PIXARLOG=yes])
-
-if test "$HAVE_ZLIB" = "yes" -a "$HAVE_PIXARLOG" = "yes" ; then
- AC_DEFINE(PIXARLOG_SUPPORT, 1,
- [Support Pixar log-format algorithm (requires Zlib)])
-else
- HAVE_PIXARLOG=no
-fi
-
-dnl ---------------------------------------------------------------------------
-dnl Check for JPEG.
-dnl ---------------------------------------------------------------------------
-
-HAVE_JPEG=no
-
-AC_ARG_ENABLE(jpeg,
- AS_HELP_STRING([--disable-jpeg],
- [disable IJG JPEG library usage (required for JPEG compression, enabled by default)]),,)
-AC_ARG_WITH(jpeg-include-dir,
- AS_HELP_STRING([--with-jpeg-include-dir=DIR],
- [location of IJG JPEG library headers]),,)
-AC_ARG_WITH(jpeg-lib-dir,
- AS_HELP_STRING([--with-jpeg-lib-dir=DIR],
- [location of IJG JPEG library binary]),,)
-
-if test "x$enable_jpeg" != "xno" ; then
-
- if test "x$with_jpeg_lib_dir" != "x" ; then
- LDFLAGS="-L$with_jpeg_lib_dir $LDFLAGS"
-
- fi
-
- AC_CHECK_LIB(jpeg, jpeg_read_scanlines, [jpeg_lib=yes], [jpeg_lib=no],)
- if test "$jpeg_lib" = "no" -a "x$with_jpeg_lib_dir" != "x" ; then
- AC_MSG_ERROR([IJG JPEG library not found at $with_jpeg_lib_dir])
- fi
-
- if test "x$with_jpeg_include_dir" != "x" ; then
- CPPFLAGS="-I$with_jpeg_include_dir $CPPFLAGS"
- fi
- AC_CHECK_HEADER(jpeglib.h, [jpeg_h=yes], [jpeg_h=no])
- if test "$jpeg_h" = "no" -a "x$with_jpeg_include_dir" != "x" ; then
- AC_MSG_ERROR([IJG JPEG library headers not found at $with_jpeg_include_dir])
- fi
-
- if test "$jpeg_lib" = "yes" -a "$jpeg_h" = "yes" ; then
- HAVE_JPEG=yes
- fi
-
-fi
-
-if test "$HAVE_JPEG" = "yes" ; then
- AC_DEFINE(JPEG_SUPPORT,1,[Support JPEG compression (requires IJG JPEG library)])
- LIBS="-ljpeg $LIBS"
-
- if test "$HAVE_RPATH" = "yes" -a "x$with_jpeg_lib_dir" != "x" ; then
- LIBDIR="-R $with_jpeg_lib_dir $LIBDIR"
- fi
-
-fi
-
-dnl ---------------------------------------------------------------------------
-dnl Check for Old JPEG.
-dnl ---------------------------------------------------------------------------
-
-AC_ARG_ENABLE(old-jpeg,
- AS_HELP_STRING([--enable-old-jpeg],
- [enable support for Old JPEG compresson (read contrib/ojpeg/README first! Compilation fails with unpatched IJG JPEG library)]),
- [HAVE_OJPEG=$enableval], [HAVE_OJPEG=no])
-
-if test "$HAVE_JPEG" = "yes" -a "$HAVE_OJPEG" = "yes" ; then
- AC_DEFINE(OJPEG_SUPPORT, 1,
- [Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation fails with unpatched IJG JPEG library)])
-else
- HAVE_OJPEG=no
-fi
-
-dnl ---------------------------------------------------------------------------
-dnl Check for C++.
-dnl ---------------------------------------------------------------------------
-
-AC_ARG_ENABLE(cxx,
- AS_HELP_STRING([--enable-cxx],
- [enable C++ stream API building (requires C++ compiler)]),
- [HAVE_CXX=$enableval], [HAVE_CXX=yes])
-
-if test "$HAVE_CXX" = "yes" ; then
- AC_DEFINE(CXX_SUPPORT, 1, [Support C++ stream API (requires C++ compiler)])
-else
- HAVE_CXX=no
-fi
-
-AM_CONDITIONAL(HAVE_CXX, test "$HAVE_CXX" = "yes")
-
-dnl ---------------------------------------------------------------------------
-dnl Check for OpenGL and GLUT.
-dnl ---------------------------------------------------------------------------
-
-HAVE_OPENGL=no
-
-AC_PATH_XTRA
-
-AX_CHECK_GL
-AX_CHECK_GLU
-AX_CHECK_GLUT
-
-if test "$no_x" != "yes" -a "$no_gl" != "yes" \
- -a "$no_glu" != "yes" -a "$no_glut" != "yes" ; then
- HAVE_OPENGL=yes
-fi
-
-AM_CONDITIONAL(HAVE_OPENGL, test "$HAVE_OPENGL" = "yes")
-
-dnl ===========================================================================
-dnl ``Orthogonal Features''
-dnl ===========================================================================
-
-dnl ---------------------------------------------------------------------------
-dnl Default handling of strip chopping support.
-dnl ---------------------------------------------------------------------------
-
-AC_ARG_ENABLE(strip-chopping,
- AS_HELP_STRING([--disable-strip-chopping],
- [disable support for strip chopping (whether or not to convert single-strip uncompressed images to mutiple strips of specified size to reduce memory usage)]),
- [HAVE_STRIPCHOP=$enableval], [HAVE_STRIPCHOP=yes])
-AC_ARG_WITH(default-strip-size,
- AS_HELP_STRING([--with-default-strip-size=SIZE],
- [default size of the strip in bytes (when strip chopping enabled) [[default=8192]]]),,)
-
-if test "$HAVE_STRIPCHOP" = "yes" \
- -a "x$with_default_strip_size" != "xno"; then
- AC_DEFINE(STRIPCHOP_DEFAULT,TIFF_STRIPCHOP,[Support strip chopping (whether or not to convert single-strip uncompressed images to mutiple strips of specified size to reduce memory usage)])
-
- if test "x$with_default_strip_size" = "x" \
- -o "x$with_default_strip_size" = "xyes"; then
- with_default_strip_size="8192"
- fi
-
- AC_DEFINE_UNQUOTED(STRIP_SIZE_DEFAULT,$with_default_strip_size,[Default size of the strip in bytes (when strip chopping enabled)])
-
-fi
-
-dnl ---------------------------------------------------------------------------
-dnl Default subifd support.
-dnl ---------------------------------------------------------------------------
-AC_DEFINE(SUBIFD_SUPPORT,1,[Enable SubIFD tag (330) support])
-
-dnl ---------------------------------------------------------------------------
-dnl Default handling of ASSOCALPHA support.
-dnl ---------------------------------------------------------------------------
-
-AC_ARG_ENABLE(extrasample-as-alpha,
- AS_HELP_STRING([--disable-extrasample-as-alpha],
- [the RGBA interface will treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA files but don't mark the alpha properly]),
- [HAVE_EXTRASAMPLE_AS_ALPHA=$enableval],
- [HAVE_EXTRASAMPLE_AS_ALPHA=yes])
-
-if test "$HAVE_EXTRASAMPLE_AS_ALPHA" = "yes" ; then
- AC_DEFINE(DEFAULT_EXTRASAMPLE_AS_ALPHA, 1,
- [Treat extra sample as alpha (default enabled). The RGBA interface will treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA files but don't mark the alpha properly.])
-fi
-
-dnl ---------------------------------------------------------------------------
-dnl Default handling of YCbCr subsampling support.
-dnl See Bug 168 in Bugzilla, and JPEGFixupTestSubsampling() for details.
-dnl ---------------------------------------------------------------------------
-
-AC_ARG_ENABLE(check-ycbcr-subsampling,
- AS_HELP_STRING([--disable-check-ycbcr-subsampling],
- [disable picking up YCbCr subsampling info from the JPEG data stream to support files lacking the tag]),
- [CHECK_JPEG_YCBCR_SUBSAMPLING=$enableval],
- [CHECK_JPEG_YCBCR_SUBSAMPLING=yes])
-
-if test "$CHECK_JPEG_YCBCR_SUBSAMPLING" = "yes" ; then
- AC_DEFINE(CHECK_JPEG_YCBCR_SUBSAMPLING, 1,
- [Pick up YCbCr subsampling info from the JPEG data stream to support files lacking the tag (default enabled).])
-fi
-
-dnl ---------------------------------------------------------------------------
-
-AC_SUBST(LIBDIR)
-
-AC_CONFIG_HEADERS([libtiff/tif_config.h libtiff/tiffconf.h])
-
-AC_CONFIG_FILES([Makefile \
- contrib/Makefile \
- contrib/acorn/Makefile \
- contrib/addtiffo/Makefile \
- contrib/dbs/Makefile \
- contrib/dbs/xtiff/Makefile \
- contrib/iptcutil/Makefile \
- contrib/mac-cw/Makefile \
- contrib/mac-mpw/Makefile \
- contrib/mfs/Makefile \
- contrib/ojpeg/Makefile \
- contrib/pds/Makefile \
- contrib/ras/Makefile \
- contrib/stream/Makefile \
- contrib/tags/Makefile \
- contrib/win_dib/Makefile \
- html/Makefile \
- html/images/Makefile \
- html/man/Makefile \
- libtiff/Makefile \
- man/Makefile \
- port/Makefile \
- test/Makefile \
- tools/Makefile])
-AC_OUTPUT
-
-dnl ---------------------------------------------------------------------------
-dnl Display configuration status
-dnl ---------------------------------------------------------------------------
-
-LOC_MSG()
-LOC_MSG([Libtiff is now configured for ${host}])
-LOC_MSG()
-LOC_MSG([ Installation directory: ${prefix}])
-LOC_MSG([ Documentation directory: ${LIBTIFF_DOCDIR}])
-LOC_MSG([ C compiler: ${CC} ${CFLAGS}])
-LOC_MSG([ C++ compiler: ${CXX} ${CXXFLAGS}])
-LOC_MSG([ Enable runtime linker paths: ${HAVE_RPATH}])
-LOC_MSG([ Support Microsoft Document Imaging: ${HAVE_MDI}])
-LOC_MSG()
-LOC_MSG([ Support for internal codecs:])
-LOC_MSG([ CCITT Group 3 & 4 algorithms: ${HAVE_CCITT}])
-LOC_MSG([ Macintosh PackBits algorithm: ${HAVE_PACKBITS}])
-LOC_MSG([ LZW algorithm: ${HAVE_LZW}])
-LOC_MSG([ ThunderScan 4-bit RLE algorithm: ${HAVE_THUNDER}])
-LOC_MSG([ NeXT 2-bit RLE algorithm: ${HAVE_NEXT}])
-LOC_MSG([ LogLuv high dynamic range encoding: ${HAVE_LOGLUV}])
-LOC_MSG()
-LOC_MSG([ Support for external codecs:])
-LOC_MSG([ ZLIB support: ${HAVE_ZLIB}])
-LOC_MSG([ Pixar log-format algorithm: ${HAVE_PIXARLOG}])
-LOC_MSG([ JPEG support: ${HAVE_JPEG}])
-LOC_MSG([ Old JPEG support: ${HAVE_OJPEG}])
-LOC_MSG()
-LOC_MSG([ C++ support: ${HAVE_CXX}])
-LOC_MSG()
-LOC_MSG([ OpenGL support: ${HAVE_OPENGL}])
-LOC_MSG()
-
diff --git a/src/3rdparty/libtiff/html/Makefile.am b/src/3rdparty/libtiff/html/Makefile.am
deleted file mode 100644
index 6941dfb0ee..0000000000
--- a/src/3rdparty/libtiff/html/Makefile.am
+++ /dev/null
@@ -1,81 +0,0 @@
-# $Id: Makefile.am,v 1.16 2006/03/23 14:54:01 dron Exp $
-#
-# Tag Image File Format (TIFF) Software
-#
-# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-#
-# Permission to use, copy, modify, distribute, and sell this software and
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-#
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-#
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-
-# Process this file with automake to produce Makefile.in.
-
-docdir = $(LIBTIFF_DOCDIR)/html
-
-docfiles = \
- addingtags.html \
- bugs.html \
- build.html \
- contrib.html \
- document.html \
- images.html \
- index.html \
- internals.html \
- intro.html \
- libtiff.html \
- misc.html \
- support.html \
- TIFFTechNote2.html \
- tools.html \
- v3.4beta007.html \
- v3.4beta016.html \
- v3.4beta018.html \
- v3.4beta024.html \
- v3.4beta028.html \
- v3.4beta029.html \
- v3.4beta031.html \
- v3.4beta032.html \
- v3.4beta033.html \
- v3.4beta034.html \
- v3.4beta035.html \
- v3.4beta036.html \
- v3.5.1.html \
- v3.5.2.html \
- v3.5.3.html \
- v3.5.4.html \
- v3.5.5.html \
- v3.5.6-beta.html \
- v3.5.7.html \
- v3.6.0.html \
- v3.6.1.html \
- v3.7.0alpha.html \
- v3.7.0beta.html \
- v3.7.0beta2.html \
- v3.7.0.html \
- v3.7.1.html \
- v3.7.2.html \
- v3.7.3.html \
- v3.7.4.html \
- v3.8.0.html \
- v3.8.1.html \
- v3.8.2.html
-
-dist_doc_DATA = $(docfiles)
-
-SUBDIRS = images man
-
diff --git a/src/3rdparty/libtiff/html/Makefile.in b/src/3rdparty/libtiff/html/Makefile.in
deleted file mode 100644
index 7aa9f826b4..0000000000
--- a/src/3rdparty/libtiff/html/Makefile.in
+++ /dev/null
@@ -1,626 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# $Id: Makefile.in,v 1.46 2006/03/23 14:54:01 dron Exp $
-#
-# Tag Image File Format (TIFF) Software
-#
-# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-#
-# Permission to use, copy, modify, distribute, and sell this software and
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-#
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-#
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-
-# Process this file with automake to produce Makefile.in.
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = html
-DIST_COMMON = $(dist_doc_DATA) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
- $(top_builddir)/libtiff/tiffconf.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(docdir)"
-dist_docDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(dist_doc_DATA)
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GLUT_CFLAGS = @GLUT_CFLAGS@
-GLUT_LIBS = @GLUT_LIBS@
-GLU_CFLAGS = @GLU_CFLAGS@
-GLU_LIBS = @GLU_LIBS@
-GL_CFLAGS = @GL_CFLAGS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
-HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
-HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
-HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
-HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
-HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBDIR = @LIBDIR@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
-LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
-LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
-LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
-LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
-LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
-LIBTIFF_VERSION = @LIBTIFF_VERSION@
-LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-NM = @NM@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-X_CFLAGS = @X_CFLAGS@
-X_EXTRA_LIBS = @X_EXTRA_LIBS@
-X_LIBS = @X_LIBS@
-X_PRE_LIBS = @X_PRE_LIBS@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-acx_pthread_config = @acx_pthread_config@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-docdir = $(LIBTIFF_DOCDIR)/html
-docfiles = \
- addingtags.html \
- bugs.html \
- build.html \
- contrib.html \
- document.html \
- images.html \
- index.html \
- internals.html \
- intro.html \
- libtiff.html \
- misc.html \
- support.html \
- TIFFTechNote2.html \
- tools.html \
- v3.4beta007.html \
- v3.4beta016.html \
- v3.4beta018.html \
- v3.4beta024.html \
- v3.4beta028.html \
- v3.4beta029.html \
- v3.4beta031.html \
- v3.4beta032.html \
- v3.4beta033.html \
- v3.4beta034.html \
- v3.4beta035.html \
- v3.4beta036.html \
- v3.5.1.html \
- v3.5.2.html \
- v3.5.3.html \
- v3.5.4.html \
- v3.5.5.html \
- v3.5.6-beta.html \
- v3.5.7.html \
- v3.6.0.html \
- v3.6.1.html \
- v3.7.0alpha.html \
- v3.7.0beta.html \
- v3.7.0beta2.html \
- v3.7.0.html \
- v3.7.1.html \
- v3.7.2.html \
- v3.7.3.html \
- v3.7.4.html \
- v3.8.0.html \
- v3.8.1.html \
- v3.8.2.html
-
-dist_doc_DATA = $(docfiles)
-SUBDIRS = images man
-all: all-recursive
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign html/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign html/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-install-dist_docDATA: $(dist_doc_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
- @list='$(dist_doc_DATA)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(dist_docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \
- $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
- done
-
-uninstall-dist_docDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(dist_doc_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \
- rm -f "$(DESTDIR)$(docdir)/$$f"; \
- done
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
- || exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
- distdir) \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-recursive
-all-am: Makefile $(DATA)
-installdirs: installdirs-recursive
-installdirs-am:
- for dir in "$(DESTDIR)$(docdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am: install-dist_docDATA
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-dist_docDATA uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libtool clean-recursive ctags \
- ctags-recursive distclean distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dist_docDATA install-exec \
- install-exec-am install-info install-info-am install-man \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- maintainer-clean-recursive mostlyclean mostlyclean-generic \
- mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
- tags tags-recursive uninstall uninstall-am \
- uninstall-dist_docDATA uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/3rdparty/libtiff/html/bugs.html b/src/3rdparty/libtiff/html/bugs.html
index 9eeb8a55dc..dd17c73ebf 100644
--- a/src/3rdparty/libtiff/html/bugs.html
+++ b/src/3rdparty/libtiff/html/bugs.html
@@ -14,16 +14,26 @@ This software is free. Please let us know when you find a problem or
fix a bug.
<P>
-Thanks to <A HREF=http://www.remotesensing.org/>remotesensing.org</a>, libtiff now uses bugzilla to track bugs.
+Thanks to <A HREF=http://www.maptools.org/>MapTools.org</a>, libtiff now uses
+bugzilla to track bugs. All bugs filed in the older bugzilla at
+bugzilla.remotesensing.org (pre April 2008) have unfortunately been lost.
<P>
If you think you've discovered a bug, please first check to see if it is
already known by looking at the list of already reported bugs. You can do so
by visiting the buglist at
-<A HREF=http://bugzilla.remotesensing.org/buglist.cgi?product=libtiff>http://bugzilla.remotesensing.org/buglist.cgi?product=libtiff</A>. Also verify that
+<A HREF=http://bugzilla.maptools.org/buglist.cgi?product=libtiff>http://bugzilla.maptools.org/buglist.cgi?product=libtiff</A>. Also verify that
the problem is still reproducable with the current development software
from CVS.
-<p>
-If you'd like to enter a new bug, you can do so at <A HREF=http://bugzilla.remotesensing.org/enter_bug.cgi?product=libtiff>http://bugzilla.remotesensing.org/enter_bug.cgi?product=libtiff</A>.
+<P>
+If you'd like to enter a new bug, you can do so at
+<A HREF=http://bugzilla.maptools.org/enter_bug.cgi?product=libtiff>http://bugzilla.maptools.org/enter_bug.cgi?product=libtiff</A>.
+<P>
+If you'd like to inform us about some kind of security issue that should not
+be disclosed for a period of time, then you can contact maintainers directly.
+Send a copies of your report to the following people: Frank Warmerdam
+<a href="mailto:warmerdam@pobox.com">&lt;warmerdam@pobox.com&gt;</a>,
+Andrey Kiselev
+<a href="mailto:dron@ak4719.spb.edu">&lt;dron@ak4719.spb.edu&gt;</a>.
<P>
Of course, reporting bugs is no substitute for discussion. The
@@ -48,6 +58,6 @@ Systems</a>. <p>
<HR>
-Last updated: $Date: 2005/07/26 14:43:24 $
+Last updated: $Date: 2008/09/03 08:04:26 $
</BODY>
</HTML>
diff --git a/src/3rdparty/libtiff/html/document.html b/src/3rdparty/libtiff/html/document.html
index e3e754fb62..12f138f5aa 100644
--- a/src/3rdparty/libtiff/html/document.html
+++ b/src/3rdparty/libtiff/html/document.html
@@ -14,8 +14,8 @@ TIFF Documentation
<P>
A copy of the 6.0 specification is available from Adobe at
<A HREF="http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf">http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf</A>, or from the libtiff
-ftp site at <a href="ftp://ftp.remotesensing.org/pub/libtiff/TIFF6.pdf">
-ftp://ftp.remotesensing.org/pub/libtiff/TIFF6.pdf</A>.<p>
+ftp site at <a href="ftp://ftp.remotesensing.org/pub/libtiff/doc/TIFF6.pdf">
+ftp://ftp.remotesensing.org/pub/libtiff/doc/TIFF6.pdf</A>.<p>
<P>
Draft <a href="TIFFTechNote2.html">TIFF Technical Note #2</A> covers problems
@@ -38,14 +38,10 @@ There is a FAQ, related both to TIFF format and libtiff library:
<A HREF="http://www.awaresystems.be/imaging/tiff/faq.html">
http://www.awaresystems.be/imaging/tiff/faq.html</A>
-<P>
-There is a preliminary <a href="bigtiffdesign.html">BigTIFF Design</a> for
-a TIFF variation supporting files larger than 4GB.
-
<HR>
<ADDRESS>
- Last updated: $Date: 2004/12/02 14:51:19 $
+ Last updated: $Date: 2009-08-20 22:31:00 $
</ADDRESS>
</BODY>
diff --git a/src/3rdparty/libtiff/html/images/Makefile.am b/src/3rdparty/libtiff/html/images/Makefile.am
deleted file mode 100644
index 840e1495ab..0000000000
--- a/src/3rdparty/libtiff/html/images/Makefile.am
+++ /dev/null
@@ -1,46 +0,0 @@
-# Tag Image File Format (TIFF) Software
-#
-# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-#
-# Permission to use, copy, modify, distribute, and sell this software and
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-#
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-#
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-
-# Process this file with automake to produce Makefile.in.
-
-docdir = $(LIBTIFF_DOCDIR)/html/images
-
-docfiles = \
- back.gif \
- bali.jpg \
- cat.gif \
- cover.jpg \
- cramps.gif \
- dave.gif \
- info.gif \
- jello.jpg \
- jim.gif \
- note.gif \
- oxford.gif \
- quad.jpg \
- ring.gif \
- smallliz.jpg \
- strike.gif \
- warning.gif
-
-dist_doc_DATA = $(docfiles)
diff --git a/src/3rdparty/libtiff/html/images/Makefile.in b/src/3rdparty/libtiff/html/images/Makefile.in
deleted file mode 100644
index 5f71c020c9..0000000000
--- a/src/3rdparty/libtiff/html/images/Makefile.in
+++ /dev/null
@@ -1,436 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# Tag Image File Format (TIFF) Software
-#
-# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-#
-# Permission to use, copy, modify, distribute, and sell this software and
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-#
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-#
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-
-# Process this file with automake to produce Makefile.in.
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = html/images
-DIST_COMMON = $(dist_doc_DATA) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
- $(top_builddir)/libtiff/tiffconf.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(docdir)"
-dist_docDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(dist_doc_DATA)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GLUT_CFLAGS = @GLUT_CFLAGS@
-GLUT_LIBS = @GLUT_LIBS@
-GLU_CFLAGS = @GLU_CFLAGS@
-GLU_LIBS = @GLU_LIBS@
-GL_CFLAGS = @GL_CFLAGS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
-HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
-HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
-HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
-HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
-HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBDIR = @LIBDIR@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
-LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
-LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
-LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
-LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
-LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
-LIBTIFF_VERSION = @LIBTIFF_VERSION@
-LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-NM = @NM@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-X_CFLAGS = @X_CFLAGS@
-X_EXTRA_LIBS = @X_EXTRA_LIBS@
-X_LIBS = @X_LIBS@
-X_PRE_LIBS = @X_PRE_LIBS@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-acx_pthread_config = @acx_pthread_config@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-docdir = $(LIBTIFF_DOCDIR)/html/images
-docfiles = \
- back.gif \
- bali.jpg \
- cat.gif \
- cover.jpg \
- cramps.gif \
- dave.gif \
- info.gif \
- jello.jpg \
- jim.gif \
- note.gif \
- oxford.gif \
- quad.jpg \
- ring.gif \
- smallliz.jpg \
- strike.gif \
- warning.gif
-
-dist_doc_DATA = $(docfiles)
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign html/images/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign html/images/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-install-dist_docDATA: $(dist_doc_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
- @list='$(dist_doc_DATA)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(dist_docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \
- $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
- done
-
-uninstall-dist_docDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(dist_doc_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \
- rm -f "$(DESTDIR)$(docdir)/$$f"; \
- done
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(DATA)
-installdirs:
- for dir in "$(DESTDIR)$(docdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am: install-dist_docDATA
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-dist_docDATA uninstall-info-am
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dist_docDATA install-exec \
- install-exec-am install-info install-info-am install-man \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- uninstall uninstall-am uninstall-dist_docDATA \
- uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/3rdparty/libtiff/html/index.html b/src/3rdparty/libtiff/html/index.html
index e48544ee35..e43a708640 100644
--- a/src/3rdparty/libtiff/html/index.html
+++ b/src/3rdparty/libtiff/html/index.html
@@ -24,11 +24,7 @@
</tr>
<tr>
<th>Latest Stable Release</th>
- <td><a href="v3.8.2.html">v3.8.2</a></td>
- </tr>
- <tr>
- <th>Latest Development Release</th>
- <td><a href="v3.8.2.html">v3.8.2</a></td>
+ <td><a href="v3.9.2.html">v3.9.2</a></td>
</tr>
<tr>
<th>Master Download Site</th>
@@ -53,8 +49,12 @@
<tr>
<th>Anonymous CVS</th>
<td><tt>export CVSROOT=:pserver:cvsanon@cvs.maptools.org:/cvs/maptools/cvsroot<br>
- cvs login # use empty password"<br>
- cvs checkout libtiff<br></tt></td>
+ cvs login</tt><br>
+ (use empty password)<br>
+ <tt>cvs checkout -r branch-3-9 libtiff<br></tt>
+ to get stable libtiff branch, or<br>
+ <tt>cvs checkout libtiff</tt><br>
+ to get bleeding edge development version of libtiff from CVS HEAD.</td>
</tr>
</table>
<hr>
@@ -65,12 +65,13 @@
in several different formats.
</p>
<p>
- Included in this software distribution is a library, libtiff, for
- reading and writing TIFF, a small collection of tools for doing simple
- manipulations of TIFF images on UNIX systems,
- and documentation on the library and
- tools. A small assortment of TIFF-related software for UNIX
- that has been contributed by others is also included.
+ Included in this software distribution is a library, libtiff, for reading
+ and writing TIFF, a small collection of tools for doing simple
+ manipulations of TIFF images, and documentation on the
+ library and tools. Libtiff is a portable software, it was built and
+ tested on various systems: UNIX flavors (Linux, BSD, Solaris, MacOS X),
+ Windows, OpenVMS. It should be possible to port libtiff and additional
+ tools on other OSes.
</p>
<p>
The library, along with associated tool programs, should handle most of
@@ -80,7 +81,7 @@
the compression support.
</p>
<p>
- The software was orginally authored and maintained by Sam Leffler.
+ The software was originally authored and maintained by Sam Leffler.
While he keeps a fatherly eye on the mailing list, he is no longer
responsible for day to day maintenance.
</p>
@@ -94,7 +95,8 @@
The persons responsible for putting up this site and putting together
versions &gt;= 3.5.1 are
<a href="http://pobox.com/~warmerdam">Frank Warmerdam</a>,
- <a href="mailto:dron@ak4719.spb.edu">Andrey Kiselev</a> and Mike Welles.
+ <a href="mailto:dron@ak4719.spb.edu">Andrey Kiselev</a>, Bob Friesenhahn,
+Joris Van Damme and Lee Howard.
</p>
<p>
The following sections are included in this documentation:
@@ -115,7 +117,7 @@
</ul>
<hr>
<p>
- Last updated $Date: 2006/03/23 14:54:01 $.
+ Last updated $Date: 2009-08-28 16:24:13 $.
</p>
</body>
</html>
diff --git a/src/3rdparty/libtiff/html/man/Makefile.am b/src/3rdparty/libtiff/html/man/Makefile.am
deleted file mode 100644
index 885f9567e4..0000000000
--- a/src/3rdparty/libtiff/html/man/Makefile.am
+++ /dev/null
@@ -1,118 +0,0 @@
-# Tag Image File Format (TIFF) Software
-#
-# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-#
-# Permission to use, copy, modify, distribute, and sell this software and
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-#
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-#
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-
-# Process this file with automake to produce Makefile.in.
-
-docdir = $(LIBTIFF_DOCDIR)/html/man
-MANSRCDIR = $(top_srcdir)/man
-HTMLMANDIR = $(top_srcdir)/html/man
-
-GROFF = groff -Thtml -mandoc
-ECHO = echo
-
-indexfile = index.html
-docfiles = \
- libtiff.3tiff.html \
- TIFFbuffer.3tiff.html \
- TIFFClose.3tiff.html \
- TIFFcodec.3tiff.html \
- TIFFcolor.3tiff.html \
- TIFFDataWidth.3tiff.html \
- TIFFError.3tiff.html \
- TIFFFlush.3tiff.html \
- TIFFGetField.3tiff.html \
- TIFFmemory.3tiff.html \
- TIFFOpen.3tiff.html \
- TIFFPrintDirectory.3tiff.html \
- TIFFquery.3tiff.html \
- TIFFReadDirectory.3tiff.html \
- TIFFReadEncodedStrip.3tiff.html \
- TIFFReadEncodedTile.3tiff.html \
- TIFFReadRawStrip.3tiff.html \
- TIFFReadRawTile.3tiff.html \
- TIFFReadRGBAImage.3tiff.html \
- TIFFReadRGBAStrip.3tiff.html \
- TIFFReadRGBATile.3tiff.html \
- TIFFReadScanline.3tiff.html \
- TIFFReadTile.3tiff.html \
- TIFFRGBAImage.3tiff.html \
- TIFFSetDirectory.3tiff.html \
- TIFFSetField.3tiff.html \
- TIFFsize.3tiff.html \
- TIFFstrip.3tiff.html \
- TIFFswab.3tiff.html \
- TIFFtile.3tiff.html \
- TIFFWarning.3tiff.html \
- TIFFWriteDirectory.3tiff.html \
- TIFFWriteEncodedStrip.3tiff.html \
- TIFFWriteEncodedTile.3tiff.html \
- TIFFWriteRawStrip.3tiff.html \
- TIFFWriteRawTile.3tiff.html \
- TIFFWriteScanline.3tiff.html \
- TIFFWriteTile.3tiff.html \
- fax2ps.1.html \
- fax2tiff.1.html \
- gif2tiff.1.html \
- pal2rgb.1.html \
- ppm2tiff.1.html \
- ras2tiff.1.html \
- raw2tiff.1.html \
- rgb2ycbcr.1.html \
- sgi2tiff.1.html \
- thumbnail.1.html \
- tiff2bw.1.html \
- tiff2pdf.1.html \
- tiff2ps.1.html \
- tiff2rgba.1.html \
- tiffcmp.1.html \
- tiffcp.1.html \
- tiffdither.1.html \
- tiffdump.1.html \
- tiffgt.1.html \
- tiffinfo.1.html \
- tiffmedian.1.html \
- tiffset.1.html \
- tiffsplit.1.html \
- tiffsv.1.html
-
-dist_doc_DATA = $(indexfile) $(docfiles)
-
-INDEXSTART = '<HTML><HEAD><TITLE>Libtiff HTML manpage index</TITLE></HEAD><BODY BGCOLOR=white><ul><H2>Man Pages</h2><p>'
-INDEXEND = '</ul></BODY></HTML>'
-
-.PHONY: index
-index: $(docfiles)
- ${ECHO} ${INDEXSTART} > $(indexfile)
- for i in $^; do \
- ${ECHO} '<li><A HREF='$$i'>'$$i'</a>' >> $(indexfile); \
- done
- ${ECHO} ${INDEXEND} >> $(indexfile)
-
-manpages = $(docfiles:.html=)
-
-.PHONY: htmldoc
-htmldoc: index
- for i in $(manpages); do \
- ${GROFF} $(MANSRCDIR)/$$i > $(HTMLMANDIR)/$$i.html; \
- done
-
diff --git a/src/3rdparty/libtiff/html/man/Makefile.in b/src/3rdparty/libtiff/html/man/Makefile.in
deleted file mode 100644
index 5836a94048..0000000000
--- a/src/3rdparty/libtiff/html/man/Makefile.in
+++ /dev/null
@@ -1,504 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# Tag Image File Format (TIFF) Software
-#
-# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-#
-# Permission to use, copy, modify, distribute, and sell this software and
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-#
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-#
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-
-# Process this file with automake to produce Makefile.in.
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = html/man
-DIST_COMMON = $(dist_doc_DATA) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
- $(top_builddir)/libtiff/tiffconf.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(docdir)"
-dist_docDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(dist_doc_DATA)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GLUT_CFLAGS = @GLUT_CFLAGS@
-GLUT_LIBS = @GLUT_LIBS@
-GLU_CFLAGS = @GLU_CFLAGS@
-GLU_LIBS = @GLU_LIBS@
-GL_CFLAGS = @GL_CFLAGS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
-HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
-HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
-HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
-HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
-HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBDIR = @LIBDIR@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
-LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
-LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
-LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
-LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
-LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
-LIBTIFF_VERSION = @LIBTIFF_VERSION@
-LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-NM = @NM@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-X_CFLAGS = @X_CFLAGS@
-X_EXTRA_LIBS = @X_EXTRA_LIBS@
-X_LIBS = @X_LIBS@
-X_PRE_LIBS = @X_PRE_LIBS@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-acx_pthread_config = @acx_pthread_config@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-docdir = $(LIBTIFF_DOCDIR)/html/man
-MANSRCDIR = $(top_srcdir)/man
-HTMLMANDIR = $(top_srcdir)/html/man
-GROFF = groff -Thtml -mandoc
-ECHO = echo
-indexfile = index.html
-docfiles = \
- libtiff.3tiff.html \
- TIFFbuffer.3tiff.html \
- TIFFClose.3tiff.html \
- TIFFcodec.3tiff.html \
- TIFFcolor.3tiff.html \
- TIFFDataWidth.3tiff.html \
- TIFFError.3tiff.html \
- TIFFFlush.3tiff.html \
- TIFFGetField.3tiff.html \
- TIFFmemory.3tiff.html \
- TIFFOpen.3tiff.html \
- TIFFPrintDirectory.3tiff.html \
- TIFFquery.3tiff.html \
- TIFFReadDirectory.3tiff.html \
- TIFFReadEncodedStrip.3tiff.html \
- TIFFReadEncodedTile.3tiff.html \
- TIFFReadRawStrip.3tiff.html \
- TIFFReadRawTile.3tiff.html \
- TIFFReadRGBAImage.3tiff.html \
- TIFFReadRGBAStrip.3tiff.html \
- TIFFReadRGBATile.3tiff.html \
- TIFFReadScanline.3tiff.html \
- TIFFReadTile.3tiff.html \
- TIFFRGBAImage.3tiff.html \
- TIFFSetDirectory.3tiff.html \
- TIFFSetField.3tiff.html \
- TIFFsize.3tiff.html \
- TIFFstrip.3tiff.html \
- TIFFswab.3tiff.html \
- TIFFtile.3tiff.html \
- TIFFWarning.3tiff.html \
- TIFFWriteDirectory.3tiff.html \
- TIFFWriteEncodedStrip.3tiff.html \
- TIFFWriteEncodedTile.3tiff.html \
- TIFFWriteRawStrip.3tiff.html \
- TIFFWriteRawTile.3tiff.html \
- TIFFWriteScanline.3tiff.html \
- TIFFWriteTile.3tiff.html \
- fax2ps.1.html \
- fax2tiff.1.html \
- gif2tiff.1.html \
- pal2rgb.1.html \
- ppm2tiff.1.html \
- ras2tiff.1.html \
- raw2tiff.1.html \
- rgb2ycbcr.1.html \
- sgi2tiff.1.html \
- thumbnail.1.html \
- tiff2bw.1.html \
- tiff2pdf.1.html \
- tiff2ps.1.html \
- tiff2rgba.1.html \
- tiffcmp.1.html \
- tiffcp.1.html \
- tiffdither.1.html \
- tiffdump.1.html \
- tiffgt.1.html \
- tiffinfo.1.html \
- tiffmedian.1.html \
- tiffset.1.html \
- tiffsplit.1.html \
- tiffsv.1.html
-
-dist_doc_DATA = $(indexfile) $(docfiles)
-INDEXSTART = '<HTML><HEAD><TITLE>Libtiff HTML manpage index</TITLE></HEAD><BODY BGCOLOR=white><ul><H2>Man Pages</h2><p>'
-INDEXEND = '</ul></BODY></HTML>'
-manpages = $(docfiles:.html=)
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign html/man/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign html/man/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-install-dist_docDATA: $(dist_doc_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
- @list='$(dist_doc_DATA)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(dist_docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \
- $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
- done
-
-uninstall-dist_docDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(dist_doc_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \
- rm -f "$(DESTDIR)$(docdir)/$$f"; \
- done
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(DATA)
-installdirs:
- for dir in "$(DESTDIR)$(docdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am: install-dist_docDATA
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-dist_docDATA uninstall-info-am
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dist_docDATA install-exec \
- install-exec-am install-info install-info-am install-man \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- uninstall uninstall-am uninstall-dist_docDATA \
- uninstall-info-am
-
-
-.PHONY: index
-index: $(docfiles)
- ${ECHO} ${INDEXSTART} > $(indexfile)
- for i in $^; do \
- ${ECHO} '<li><A HREF='$$i'>'$$i'</a>' >> $(indexfile); \
- done
- ${ECHO} ${INDEXEND} >> $(indexfile)
-
-.PHONY: htmldoc
-htmldoc: index
- for i in $(manpages); do \
- ${GROFF} $(MANSRCDIR)/$$i > $(HTMLMANDIR)/$$i.html; \
- done
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/3rdparty/libtiff/html/man/TIFFClose.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFClose.3tiff.html
index 0a92e318af..42e3ba8970 100644
--- a/src/3rdparty/libtiff/html/man/TIFFClose.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFClose.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:08 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:15 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFDataWidth.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFDataWidth.3tiff.html
index 5d82ef4965..237296e18d 100644
--- a/src/3rdparty/libtiff/html/man/TIFFDataWidth.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFDataWidth.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:08 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:15 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFError.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFError.3tiff.html
index c7453c3eca..5d39a139ec 100644
--- a/src/3rdparty/libtiff/html/man/TIFFError.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFError.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:08 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:15 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFFlush.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFFlush.3tiff.html
index 5e5a510347..f32ccd3da7 100644
--- a/src/3rdparty/libtiff/html/man/TIFFFlush.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFFlush.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:08 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:15 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFGetField.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFGetField.3tiff.html
index ca114a354b..e644b1d412 100644
--- a/src/3rdparty/libtiff/html/man/TIFFGetField.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFGetField.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:08 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:15 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFOpen.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFOpen.3tiff.html
index 3d3ca66003..6bc85d84e0 100644
--- a/src/3rdparty/libtiff/html/man/TIFFOpen.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFOpen.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:08 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:15 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFPrintDirectory.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFPrintDirectory.3tiff.html
index d40011dc66..a5f418a115 100644
--- a/src/3rdparty/libtiff/html/man/TIFFPrintDirectory.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFPrintDirectory.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:09 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:15 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFRGBAImage.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFRGBAImage.3tiff.html
index 71b7ec8b92..7bbee0f25e 100644
--- a/src/3rdparty/libtiff/html/man/TIFFRGBAImage.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFRGBAImage.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:10 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:16 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFReadDirectory.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFReadDirectory.3tiff.html
index d8663527da..5bb828efa7 100644
--- a/src/3rdparty/libtiff/html/man/TIFFReadDirectory.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFReadDirectory.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:09 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:16 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFReadEncodedStrip.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFReadEncodedStrip.3tiff.html
index 20798dbf60..39d411d765 100644
--- a/src/3rdparty/libtiff/html/man/TIFFReadEncodedStrip.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFReadEncodedStrip.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:09 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:16 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFReadEncodedTile.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFReadEncodedTile.3tiff.html
index 378bea8904..752b1ea3e6 100644
--- a/src/3rdparty/libtiff/html/man/TIFFReadEncodedTile.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFReadEncodedTile.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:09 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:16 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -41,8 +41,8 @@ data from an open <small>TIFF</small> file</p>
<p><b>#include &lt;tiffio.h&gt;</b></p>
<!-- INDENTATION -->
<p><b>int TIFFReadEncodedTile(TIFF *</b><i>tif</i><b>,
-u_long</b> <i>tile</i><b>, u_char *</b><i>buf</i><b>,
-u_long</b> <i>size</i><b>)</b></p>
+ttile_t</b> <i>tile</i><b>, tdata_t</b> <i>buf</i><b>,
+tsize_t</b> <i>size</i><b>)</b></p>
</td>
</table>
<a name="DESCRIPTION"></a>
diff --git a/src/3rdparty/libtiff/html/man/TIFFReadRGBAImage.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFReadRGBAImage.3tiff.html
index a9a907a076..165284e50c 100644
--- a/src/3rdparty/libtiff/html/man/TIFFReadRGBAImage.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFReadRGBAImage.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:09 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:16 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -47,12 +47,12 @@ and decode an image into a fixed-format raster</p>
0xff)</b></p>
<!-- INDENTATION -->
<p><b>int TIFFReadRGBAImage(TIFF *</b><i>tif</i><b>,
-u_long</b> <i>width</i><b>, u_long</b> <i>height</i><b>,
-u_long *</b><i>raster</i><b>, int</b>
+uint32</b> <i>width</i><b>, uint32</b> <i>height</i><b>,
+uint32 *</b><i>raster</i><b>, int</b>
<i>stopOnError</i><b>)<br>
int TIFFReadRGBAImageOriented(TIFF *</b><i>tif</i><b>,
-u_long</b> <i>width</i><b>, u_long</b> <i>height</i><b>,
-u_long *</b><i>raster</i><b>, int</b> <i>orientation</i><b>,
+uint32</b> <i>width</i><b>, uint32</b> <i>height</i><b>,
+uint32 *</b><i>raster</i><b>, int</b> <i>orientation</i><b>,
int</b> <i>stopOnError</i><b>)</b></p>
</td>
</table>
diff --git a/src/3rdparty/libtiff/html/man/TIFFReadRGBAStrip.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFReadRGBAStrip.3tiff.html
index 3ec0776db8..df09f649fa 100644
--- a/src/3rdparty/libtiff/html/man/TIFFReadRGBAStrip.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFReadRGBAStrip.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:10 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:16 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFReadRGBATile.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFReadRGBATile.3tiff.html
index cff9142106..ed67b83278 100644
--- a/src/3rdparty/libtiff/html/man/TIFFReadRGBATile.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFReadRGBATile.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:10 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:16 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFReadRawStrip.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFReadRawStrip.3tiff.html
index 4d9433d4b8..bd14f723bc 100644
--- a/src/3rdparty/libtiff/html/man/TIFFReadRawStrip.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFReadRawStrip.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:09 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:16 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFReadRawTile.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFReadRawTile.3tiff.html
index 916dc2e4a7..bae2b46cd6 100644
--- a/src/3rdparty/libtiff/html/man/TIFFReadRawTile.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFReadRawTile.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:09 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:16 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFReadScanline.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFReadScanline.3tiff.html
index 3ecf88c8d7..423645cc96 100644
--- a/src/3rdparty/libtiff/html/man/TIFFReadScanline.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFReadScanline.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:10 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:16 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFReadTile.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFReadTile.3tiff.html
index f278d8d2ed..ff726b49d2 100644
--- a/src/3rdparty/libtiff/html/man/TIFFReadTile.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFReadTile.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:10 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:16 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFSetDirectory.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFSetDirectory.3tiff.html
index 17968534a5..a0e5cfc0a1 100644
--- a/src/3rdparty/libtiff/html/man/TIFFSetDirectory.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFSetDirectory.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:10 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:17 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFSetField.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFSetField.3tiff.html
index ad938cda19..2e70225b33 100644
--- a/src/3rdparty/libtiff/html/man/TIFFSetField.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFSetField.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:10 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:17 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFWarning.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFWarning.3tiff.html
index d030df40ac..df17073b57 100644
--- a/src/3rdparty/libtiff/html/man/TIFFWarning.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFWarning.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:11 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:17 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFWriteDirectory.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFWriteDirectory.3tiff.html
index ba22c0e5a3..07a443e145 100644
--- a/src/3rdparty/libtiff/html/man/TIFFWriteDirectory.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFWriteDirectory.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:11 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:17 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFWriteEncodedStrip.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFWriteEncodedStrip.3tiff.html
index 78c4e76948..5a45f593a2 100644
--- a/src/3rdparty/libtiff/html/man/TIFFWriteEncodedStrip.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFWriteEncodedStrip.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:11 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:17 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFWriteEncodedTile.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFWriteEncodedTile.3tiff.html
index dcbf479aa2..0e6e1bac88 100644
--- a/src/3rdparty/libtiff/html/man/TIFFWriteEncodedTile.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFWriteEncodedTile.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:11 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:17 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFWriteRawStrip.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFWriteRawStrip.3tiff.html
index eaceba6bd5..95b48570ed 100644
--- a/src/3rdparty/libtiff/html/man/TIFFWriteRawStrip.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFWriteRawStrip.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:11 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:17 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFWriteRawTile.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFWriteRawTile.3tiff.html
index 543b0788c2..3d18ed18c3 100644
--- a/src/3rdparty/libtiff/html/man/TIFFWriteRawTile.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFWriteRawTile.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:11 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:18 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFWriteScanline.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFWriteScanline.3tiff.html
index da929e7295..bb9323d2e3 100644
--- a/src/3rdparty/libtiff/html/man/TIFFWriteScanline.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFWriteScanline.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:11 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:18 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFWriteTile.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFWriteTile.3tiff.html
index fa9ddc3a65..d6bc5d8aed 100644
--- a/src/3rdparty/libtiff/html/man/TIFFWriteTile.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFWriteTile.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:11 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:18 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFbuffer.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFbuffer.3tiff.html
index ac667bebdb..3d610ca539 100644
--- a/src/3rdparty/libtiff/html/man/TIFFbuffer.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFbuffer.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:08 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:14 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFcodec.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFcodec.3tiff.html
index 08c6643618..8567b30b4b 100644
--- a/src/3rdparty/libtiff/html/man/TIFFcodec.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFcodec.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:08 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:15 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFcolor.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFcolor.3tiff.html
index 38fb745745..7e4eea51c7 100644
--- a/src/3rdparty/libtiff/html/man/TIFFcolor.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFcolor.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:08 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:15 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFmemory.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFmemory.3tiff.html
index 296f4fa1b5..746b5ec269 100644
--- a/src/3rdparty/libtiff/html/man/TIFFmemory.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFmemory.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:08 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:15 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFquery.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFquery.3tiff.html
index f896d262b5..e27354af84 100644
--- a/src/3rdparty/libtiff/html/man/TIFFquery.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFquery.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:09 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:15 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFsize.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFsize.3tiff.html
index 1c81247872..54fb71b8c3 100644
--- a/src/3rdparty/libtiff/html/man/TIFFsize.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFsize.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:10 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:17 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFstrip.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFstrip.3tiff.html
index 1b7ac9c027..a0fc358bff 100644
--- a/src/3rdparty/libtiff/html/man/TIFFstrip.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFstrip.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:10 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:17 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFswab.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFswab.3tiff.html
index 0663168b62..2924a38bd9 100644
--- a/src/3rdparty/libtiff/html/man/TIFFswab.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFswab.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:10 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:17 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/TIFFtile.3tiff.html b/src/3rdparty/libtiff/html/man/TIFFtile.3tiff.html
index a37009d2b9..e8e0008a06 100644
--- a/src/3rdparty/libtiff/html/man/TIFFtile.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/TIFFtile.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:11 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:17 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/fax2ps.1.html b/src/3rdparty/libtiff/html/man/fax2ps.1.html
index 3e8c0d78c0..c5396143ab 100644
--- a/src/3rdparty/libtiff/html/man/fax2ps.1.html
+++ b/src/3rdparty/libtiff/html/man/fax2ps.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:11 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:18 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -28,7 +28,7 @@
<td width="8%"></td>
<td width="91%">
<p>fax2ps &minus; convert a <small>TIFF</small> facsimile to
-compressed &trade;</p>
+compressed PostScript&trade;</p>
</td>
</table>
<a name="SYNOPSIS"></a>
@@ -39,7 +39,7 @@ compressed &trade;</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>fax2ps</b> [ <i>options</i> ] [ <i>file</i>... ]</p>
+<p><b>fax2ps</b> [ <i>options</i> ] [ <i>file ...</i> ]</p>
</td>
</table>
<a name="DESCRIPTION"></a>
@@ -51,8 +51,9 @@ compressed &trade;</p>
<td width="8%"></td>
<td width="91%">
<p><i>fax2ps</i> reads one or more <small>TIFF</small>
-facsimile image files and prints a compressed form of on the
-standard output that is suitable for printing.</p>
+facsimile image files and prints a compressed form of
+PostScript on the standard output that is suitable for
+printing.</p>
<!-- INDENTATION -->
<p>By default, each page is scaled to reflect the image
dimensions and resolutions stored in the file. The
@@ -64,38 +65,38 @@ default output page is 8.5 by 11 inches. Alternate page
dimensions can be specified in inches with the
<b>&minus;W</b> and <b>&minus;H</b> options.</p>
<!-- INDENTATION -->
-<p>By default <i>fax2ps</i> generates for all pages in the
-file. The <b>&minus;p</b> option can be used to select one
-or more pages from a multi-page document.</p>
-<!-- INDENTATION -->
-<p><i>fax2ps</i> generates a compressed form of that is
-optimized for sending pages of text to a printer attached to
-a host through a low-speed link (such as a serial line).
-Each output page is filled with white and then only the
-black areas are drawn. The specification of the black
-drawing operations is optimized by using a special font that
-encodes the move-draw operations required to fill the black
-regions on the page. This compression scheme typically
-results in a substantially reduced description, relative to
-the straightforward imaging of the page with a <i>image</i>
-operator. This algorithm can, however, be ineffective for
-continuous-tone and white-on-black images. For these images,
-it sometimes is more efficient to send the raster bitmap
-image directly; see <i>tiff2ps</i>(1).</p>
+<p>By default <i>fax2ps</i> generates PostScript for all
+pages in the file. The <b>&minus;p</b> option can be used to
+select one or more pages from a multi-page document.</p>
+<!-- INDENTATION -->
+<p><i>fax2ps</i> generates a compressed form of PostScript
+that is optimized for sending pages of text to a PostScript
+printer attached to a host through a low-speed link (such as
+a serial line). Each output page is filled with white and
+then only the black areas are drawn. The PostScript
+specification of the black drawing operations is optimized
+by using a special font that encodes the move-draw
+operations required to fill the black regions on the page.
+This compression scheme typically results in a substantially
+reduced PostScript description, relative to the
+straightforward imaging of the page with a PostScript
+<i>image</i> operator. This algorithm can, however, be
+ineffective for continuous-tone and white-on-black images.
+For these images, it sometimes is more efficient to send the
+raster bitmap image directly; see <b>tiff2ps</b>(1).</p>
</td>
</table>
<a name="OPTIONS"></a>
<h2>OPTIONS</h2>
<!-- TABS -->
<table width="100%" border=0 rules="none" frame="void"
- cols="5" cellspacing="0" cellpadding="0">
+ cols="4" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
-<td width="10%"></td>
+<td width="11%"></td>
<td width="11%">
<p><b>&minus;p</b> <i>number</i></p>
</td>
-<td width="1%"></td>
<td width="76%">
<p>Print only the indicated page. Multiple pages may be
@@ -144,14 +145,13 @@ taken from the file.</p>
</table>
<!-- TABS -->
<table width="100%" border=0 rules="none" frame="void"
- cols="5" cellspacing="0" cellpadding="0">
+ cols="4" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td>
-<td width="11%">
+<td width="12%">
<p><b>&minus;S</b></p>
</td>
-<td width="1%"></td>
<td width="76%">
<p>Scale each page of image data to fill the output page
@@ -163,11 +163,10 @@ file.</p>
</td>
<tr valign="top" align="left">
<td width="10%"></td>
-<td width="11%">
+<td width="12%">
<p><b>&minus;W</b> <i>width</i></p>
</td>
-<td width="1%"></td>
<td width="76%">
<p>Use <i>width</i> as the width, in inches, of the output
@@ -177,11 +176,10 @@ page.</p>
</td>
<tr valign="top" align="left">
<td width="10%"></td>
-<td width="11%">
+<td width="12%">
<p><b>&minus;H</b> <i>height</i></p>
</td>
-<td width="1%"></td>
<td width="76%">
<p>Use <i>height</i> as the height, in inches, of the
@@ -206,7 +204,7 @@ may be generated due to transmission errors in received
facsimile. <i>fax2ps</i> attempts to recover from such data
errors by resynchronizing decoding at the end of the current
scanline. This can result in long horizontal black lines in
-the resultant image.</p>
+the resultant PostScript image.</p>
</td>
</table>
<a name="NOTES"></a>
@@ -217,9 +215,9 @@ the resultant image.</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p>If the destination printer supports Level II then it is
-always faster to just send the encoded bitmap generated by
-the <b>tiff2ps</b>(1) program.</p>
+<p>If the destination printer supports PostScript Level II
+then it is always faster to just send the encoded bitmap
+generated by the <b>tiff2ps</b>(1) program.</p>
</td>
</table>
<a name="BUGS"></a>
@@ -231,8 +229,8 @@ the <b>tiff2ps</b>(1) program.</p>
<td width="8%"></td>
<td width="91%">
<p><i>fax2ps</i> should probably figure out when it is doing
-a poor job of compressing the output and just generate to
-image the bitmap raster instead.</p>
+a poor job of compressing the output and just generate
+PostScript to image the bitmap raster instead.</p>
</td>
</table>
<a name="SEE ALSO"></a>
diff --git a/src/3rdparty/libtiff/html/man/fax2tiff.1.html b/src/3rdparty/libtiff/html/man/fax2tiff.1.html
index dca50e1902..38b54c013c 100644
--- a/src/3rdparty/libtiff/html/man/fax2tiff.1.html
+++ b/src/3rdparty/libtiff/html/man/fax2tiff.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:12 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:18 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -485,10 +485,10 @@ data written to the output file. By default (or when value
<b>0</b> is specified), <i>tiffcp</i> attempts to set the
rows/strip that no more than 8 kilobytes of data appear in a
strip (with except of G3/G4 compression schemes). If you
-specify special value <b>-1</b> it will results in infinite
-number of the rows per strip. The entire image will be the
-one strip in that case. This is default in case of G3/G4
-output compression schemes.</p>
+specify special value <b>&minus;1</b> it will results in
+infinite number of the rows per strip. The entire image will
+be the one strip in that case. This is default in case of
+G3/G4 output compression schemes.</p>
</td>
<td width="0%">
</td>
diff --git a/src/3rdparty/libtiff/html/man/gif2tiff.1.html b/src/3rdparty/libtiff/html/man/gif2tiff.1.html
index ffd3cac763..6114bd317a 100644
--- a/src/3rdparty/libtiff/html/man/gif2tiff.1.html
+++ b/src/3rdparty/libtiff/html/man/gif2tiff.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:12 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:18 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -73,10 +73,10 @@ specified with the options described below.</p>
<td width="80%">
<p>Specify a compression scheme to use when writing image
-data: <b>&minus;c none</b> for no compression, <b>-c
-packbits</b> for the PackBits compression algorithm, <b>-c
-zip</b> for the Deflate compression algorithm, and
-<b>&minus;c lzw</b> for Lempel-Ziv &amp; Welch (the
+data: <b>&minus;c none</b> for no compression, <b>&minus;c
+packbits</b> for the PackBits compression algorithm,
+<b>&minus;c zip</b> for the Deflate compression algorithm,
+and <b>&minus;c lzw</b> for Lempel-Ziv &amp; Welch (the
default).</p>
</td>
<td width="0%">
diff --git a/src/3rdparty/libtiff/html/man/index.html b/src/3rdparty/libtiff/html/man/index.html
index 9fdba2e199..7e9e8d2c7f 100644
--- a/src/3rdparty/libtiff/html/man/index.html
+++ b/src/3rdparty/libtiff/html/man/index.html
@@ -1,5 +1,4 @@
<HTML><HEAD><TITLE>Libtiff HTML manpage index</TITLE></HEAD><BODY BGCOLOR=white><ul><H2>Man Pages</h2><p>
-<li><A HREF=libtiff.3tiff.html>libtiff.3tiff.html</a>
<li><A HREF=TIFFbuffer.3tiff.html>TIFFbuffer.3tiff.html</a>
<li><A HREF=TIFFClose.3tiff.html>TIFFClose.3tiff.html</a>
<li><A HREF=TIFFcodec.3tiff.html>TIFFcodec.3tiff.html</a>
@@ -53,6 +52,7 @@
<li><A HREF=tiff2rgba.1.html>tiff2rgba.1.html</a>
<li><A HREF=tiffcmp.1.html>tiffcmp.1.html</a>
<li><A HREF=tiffcp.1.html>tiffcp.1.html</a>
+<li><A HREF=tiffcrop.1.html>tiffcrop.1.html</a>
<li><A HREF=tiffdither.1.html>tiffdither.1.html</a>
<li><A HREF=tiffdump.1.html>tiffdump.1.html</a>
<li><A HREF=tiffgt.1.html>tiffgt.1.html</a>
diff --git a/src/3rdparty/libtiff/html/man/libtiff.3tiff.html b/src/3rdparty/libtiff/html/man/libtiff.3tiff.html
index 8a4f5075e1..bea73f761f 100644
--- a/src/3rdparty/libtiff/html/man/libtiff.3tiff.html
+++ b/src/3rdparty/libtiff/html/man/libtiff.3tiff.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:07 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:14 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/pal2rgb.1.html b/src/3rdparty/libtiff/html/man/pal2rgb.1.html
index 57081611a9..5c3a679a95 100644
--- a/src/3rdparty/libtiff/html/man/pal2rgb.1.html
+++ b/src/3rdparty/libtiff/html/man/pal2rgb.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:12 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:18 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/ppm2tiff.1.html b/src/3rdparty/libtiff/html/man/ppm2tiff.1.html
index b2e1bcce93..60e56e1ff5 100644
--- a/src/3rdparty/libtiff/html/man/ppm2tiff.1.html
+++ b/src/3rdparty/libtiff/html/man/ppm2tiff.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:12 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:18 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/ras2tiff.1.html b/src/3rdparty/libtiff/html/man/ras2tiff.1.html
index f36a472274..b0b8993288 100644
--- a/src/3rdparty/libtiff/html/man/ras2tiff.1.html
+++ b/src/3rdparty/libtiff/html/man/ras2tiff.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:12 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:18 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -81,12 +81,12 @@ depth is 24 or 1 (min-is-black) if the depth is not 24.</p>
<td width="80%">
<p>Specify a compression scheme to use when writing image
-data: <b>&minus;c none</b> for no compression, <b>-c
-packbits</b> for the PackBits compression algorithm, <b>-c
-jpeg</b> for the baseline JPEG compression algorithm, <b>-c
-zip</b> for the Deflate compression algorithm, and
-<b>&minus;c lzw</b> for Lempel-Ziv &amp; Welch (the
-default).</p>
+data: <b>&minus;c none</b> for no compression, <b>&minus;c
+packbits</b> for the PackBits compression algorithm,
+<b>&minus;c jpeg</b> for the baseline JPEG compression
+algorithm, <b>&minus;c zip</b> for the Deflate compression
+algorithm, and <b>&minus;c lzw</b> for Lempel-Ziv &amp;
+Welch (the default).</p>
</td>
<td width="0%">
</td>
diff --git a/src/3rdparty/libtiff/html/man/raw2tiff.1.html b/src/3rdparty/libtiff/html/man/raw2tiff.1.html
index 21e4f4f11e..360eb27718 100644
--- a/src/3rdparty/libtiff/html/man/raw2tiff.1.html
+++ b/src/3rdparty/libtiff/html/man/raw2tiff.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:12 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:18 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -53,10 +53,10 @@ output.tif</i></p>
<small>TIFF.</small> By default, the <small>TIFF</small>
image is created with data samples packed
(<i>PlanarConfiguration</i>=1), compressed with the PackBits
-algorithm (<i>Compression</i>=<i>32773),</i> and with each
-strip no more than 8 kilobytes. These characteristics can
-overridden, or explicitly specified with the options
-described below.</p>
+algorithm (<i>Compression</i>=32773), and with each strip no
+more than 8 kilobytes. These characteristics can overridden,
+or explicitly specified with the options described
+below.</p>
</td>
</table>
<a name="OPTIONS"></a>
@@ -67,7 +67,7 @@ described below.</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>&minus;H &lt;number&gt;</b></p></td>
+<p><b>&minus;H</b> <i>number</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -86,7 +86,7 @@ file while reading.</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>&minus;w &lt;number&gt;</b></p></td>
+<p><b>&minus;w</b> <i>number</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -105,7 +105,7 @@ below).</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>&minus;l &lt;number&gt;</b></p></td>
+<p><b>&minus;l</b> <i>number</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -113,7 +113,7 @@ below).</p>
<tr valign="top" align="left">
<td width="19%"></td>
<td width="80%">
-<p>length of input image in lines(can be guessed, see
+<p>length of input image in lines (can be guessed, see
<b><small>GUESSING THE IMAGE GEOMETRY</small></b>
below).</p>
</td>
@@ -124,7 +124,7 @@ below).</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>&minus;b &lt;number&gt;</b></p></td>
+<p><b>&minus;b</b> <i>number</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -141,7 +141,7 @@ below).</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>&minus;d data_type</b></p></td>
+<p><b>&minus;d</b> <i>data_type</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -149,117 +149,91 @@ below).</p>
<tr valign="top" align="left">
<td width="19%"></td>
<td width="80%">
-<p>type of samples in input image, where <b>data_type</b>
+<p>type of samples in input image, where <i>data_type</i>
may be:</p></td>
</table>
<!-- TABS -->
<table width="100%" border=0 rules="none" frame="void"
- cols="5" cellspacing="0" cellpadding="0">
+ cols="3" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="19%"></td>
-<td width="6%">
+<td width="10%">
-<p><i>byte</i></p>
-</td>
-<td width="6%">
+<p><b>byte</b></p>
</td>
-<td width="6%">
+<td width="70%">
<p>8-bit unsigned integer (default),</p>
</td>
-<td width="61%">
-</td>
<tr valign="top" align="left">
<td width="19%"></td>
-<td width="6%">
+<td width="10%">
-<p><i>short</i></p>
+<p><b>short</b></p>
</td>
-<td width="6%"></td>
-<td width="6%">
+<td width="70%">
<p>16-bit unsigned integer,</p>
</td>
-<td width="61%">
-</td>
<tr valign="top" align="left">
<td width="19%"></td>
-<td width="6%">
+<td width="10%">
-<p><i>long</i></p>
+<p><b>long</b></p>
</td>
-<td width="6%">
-</td>
-<td width="6%">
+<td width="70%">
<p>32-bit unsigned integer,</p>
</td>
-<td width="61%">
-</td>
<tr valign="top" align="left">
<td width="19%"></td>
-<td width="6%">
+<td width="10%">
-<p><i>sbyte</i></p>
+<p><b>sbyte</b></p>
</td>
-<td width="6%"></td>
-<td width="6%">
+<td width="70%">
<p>8-bit signed integer,</p>
</td>
-<td width="61%">
-</td>
<tr valign="top" align="left">
<td width="19%"></td>
-<td width="6%">
+<td width="10%">
-<p><i>sshort</i></p>
+<p><b>sshort</b></p>
</td>
-<td width="6%"></td>
-<td width="6%">
+<td width="70%">
<p>16-bit signed integer,</p>
</td>
-<td width="61%">
-</td>
<tr valign="top" align="left">
<td width="19%"></td>
-<td width="6%">
+<td width="10%">
-<p><i>slong</i></p>
+<p><b>slong</b></p>
</td>
-<td width="6%"></td>
-<td width="6%">
+<td width="70%">
<p>32-bit signed integer,</p>
</td>
-<td width="61%">
-</td>
<tr valign="top" align="left">
<td width="19%"></td>
-<td width="6%">
+<td width="10%">
-<p><i>float</i></p>
+<p><b>float</b></p>
</td>
-<td width="6%"></td>
-<td width="6%">
+<td width="70%">
<p>32-bit IEEE floating point,</p>
</td>
-<td width="61%">
-</td>
<tr valign="top" align="left">
<td width="19%"></td>
-<td width="6%">
+<td width="10%">
-<p><i>double</i></p>
+<p><b>double</b></p>
</td>
-<td width="6%"></td>
-<td width="6%">
+<td width="70%">
-<p>64-bit IEEE floating point,</p>
-</td>
-<td width="61%">
+<p>64-bit IEEE floating point.</p>
</td>
</table>
<!-- INDENTATION -->
@@ -268,7 +242,7 @@ may be:</p></td>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>&minus;i config</b></p></td>
+<p><b>&minus;i</b> <i>config</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -277,38 +251,31 @@ may be:</p></td>
<td width="19%"></td>
<td width="80%">
<p>type of samples interleaving in input image, where
-<b>config</b> may be:</p></td>
+<i>config</i> may be:</p></td>
</table>
<!-- TABS -->
<table width="100%" border=0 rules="none" frame="void"
- cols="5" cellspacing="0" cellpadding="0">
+ cols="3" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="19%"></td>
-<td width="6%">
+<td width="8%">
-<p><i>pixel</i></p>
+<p><b>pixel</b></p>
</td>
-<td width="6%"></td>
-<td width="6%">
+<td width="71%">
<p>pixel interleaved data (default),</p>
</td>
-<td width="61%">
-</td>
<tr valign="top" align="left">
<td width="19%"></td>
-<td width="6%">
+<td width="8%">
-<p><i>band</i></p>
-</td>
-<td width="6%">
+<p><b>band</b></p>
</td>
-<td width="6%">
+<td width="71%">
<p>band interleaved data.</p>
</td>
-<td width="61%">
-</td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -316,7 +283,7 @@ may be:</p></td>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>&minus;p photo</b></p></td>
+<p><b>&minus;p</b> <i>photo</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -325,100 +292,90 @@ may be:</p></td>
<td width="19%"></td>
<td width="80%">
<p>photometric interpretation (color space) of the input
-image, where <b>photo</b> may be:<i><br>
-miniswhite</i> white color represented with 0 value,<i><br>
-minisblack</i> black color represented with 0 value
-(default),</p></td>
+image, where <i>photo</i> may be:</p></td>
</table>
<!-- TABS -->
<table width="100%" border=0 rules="none" frame="void"
- cols="6" cellspacing="0" cellpadding="0">
+ cols="3" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="19%"></td>
-<td width="6%">
+<td width="15%">
-<p><i>rgb</i></p>
+<p><b>miniswhite</b></p>
</td>
-<td width="6%">
+<td width="65%">
+
+<p>white color represented with 0 value,</p>
</td>
-<td width="6%">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="15%">
-<p>image has RGB color model,</p>
+<p><b>minisblack</b></p>
</td>
-<td width="6%"></td>
-<td width="55%">
+<td width="65%">
+
+<p>black color represented with 0 value (default),</p>
</td>
<tr valign="top" align="left">
<td width="19%"></td>
-<td width="6%">
+<td width="15%">
-<p><i>cmyk</i></p>
+<p><b>rgb</b></p>
</td>
-<td width="6%">
+<td width="65%">
+
+<p>image has RGB color model,</p>
+</td>
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="15%">
+
+<p><b>cmyk</b></p>
</td>
-<td width="6%">
+<td width="65%">
<p>image has CMYK (separated) color model,</p>
</td>
-<td width="6%"></td>
-<td width="55%">
-</td>
<tr valign="top" align="left">
<td width="19%"></td>
-<td width="6%">
+<td width="15%">
-<p><i>ycbcr</i></p>
-</td>
-<td width="6%"></td>
-<td width="6%">
+<p><b>ycbcr</b></p>
</td>
-<td width="6%">
+<td width="65%">
<p>image has YCbCr color model,</p>
</td>
-<td width="55%">
-</td>
<tr valign="top" align="left">
<td width="19%"></td>
-<td width="6%">
+<td width="15%">
-<p><i>cielab</i></p>
+<p><b>cielab</b></p>
</td>
-<td width="6%"></td>
-<td width="6%">
+<td width="65%">
<p>image has CIE L*a*b color model,</p>
</td>
-<td width="6%"></td>
-<td width="55%">
-</td>
<tr valign="top" align="left">
<td width="19%"></td>
-<td width="6%">
+<td width="15%">
-<p><i>icclab</i></p>
+<p><b>icclab</b></p>
</td>
-<td width="6%"></td>
-<td width="6%">
+<td width="65%">
<p>image has ICC L*a*b color model,</p>
</td>
-<td width="6%"></td>
-<td width="55%">
-</td>
<tr valign="top" align="left">
<td width="19%"></td>
-<td width="6%">
+<td width="15%">
-<p><i>itulab</i></p>
+<p><b>itulab</b></p>
</td>
-<td width="6%"></td>
-<td width="6%">
+<td width="65%">
-<p>image has ITU L*a*b color model,</p>
-</td>
-<td width="6%"></td>
-<td width="55%">
+<p>image has ITU L*a*b color model.</p>
</td>
</table>
<!-- TABS -->
@@ -473,12 +430,12 @@ minisblack</i> black color represented with 0 value
<td width="80%">
<p>Specify a compression scheme to use when writing image
-data: <b>&minus;c none</b> for no compression, <b>-c
+data: <b>&minus;c none</b> for no compression, <b>&minus;c
packbits</b> for the PackBits compression algorithm (the
-default), <b>-c jpeg</b> for the baseline JPEG compression
-algorithm, <b>-c zip</b> for the Deflate compression
-algorithm, and <b>&minus;c lzw</b> for Lempel-Ziv &amp;
-Welch.</p>
+default), <b>&minus;c jpeg</b> for the baseline JPEG
+compression algorithm, <b>&minus;c zip</b> for the Deflate
+compression algorithm, and <b>&minus;c lzw</b> for
+Lempel-Ziv &amp; Welch.</p>
</td>
<td width="0%">
</td>
@@ -489,7 +446,7 @@ Welch.</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>&minus;r &lt;number&gt;</b></p></td>
+<p><b>&minus;r</b> <i>number</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
diff --git a/src/3rdparty/libtiff/html/man/rgb2ycbcr.1.html b/src/3rdparty/libtiff/html/man/rgb2ycbcr.1.html
index 6b81a9eb29..5cff15fb53 100644
--- a/src/3rdparty/libtiff/html/man/rgb2ycbcr.1.html
+++ b/src/3rdparty/libtiff/html/man/rgb2ycbcr.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:12 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:19 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -82,11 +82,12 @@ explicitly set the number of rows per strip.</p>
<td width="80%">
<p>Specify a compression scheme to use when writing image
-data: <b>&minus;c none</b> for no compression, <b>-c
+data: <b>&minus;c none</b> for no compression, <b>&minus;c
packbits</b> for the PackBits compression algorithm (the
-default), <b>-c jpeg</b> for the JPEG compression algorithm,
-<b>-c zip</b> for the deflate compression algorithm, and
-<b>&minus;c lzw</b> for Lempel-Ziv &amp; Welch.</p>
+default), <b>&minus;c jpeg</b> for the JPEG compression
+algorithm, <b>&minus;c zip</b> for the deflate compression
+algorithm, and <b>&minus;c lzw</b> for Lempel-Ziv &amp;
+Welch.</p>
</td>
<td width="0%">
</td>
diff --git a/src/3rdparty/libtiff/html/man/sgi2tiff.1.html b/src/3rdparty/libtiff/html/man/sgi2tiff.1.html
index 0a5c3b7aa0..fe90d6477f 100644
--- a/src/3rdparty/libtiff/html/man/sgi2tiff.1.html
+++ b/src/3rdparty/libtiff/html/man/sgi2tiff.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:12 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:19 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -74,12 +74,12 @@ the options described below.</p>
<td width="80%">
<p>Specify a compression scheme to use when writing image
-data: <b>&minus;c none</b> for no compression, <b>-c
-packbits</b> for the PackBits compression algorithm), <b>-c
-jpeg</b> for the baseline JPEG compression algorithm, <b>-c
-zip</b> for the Deflate compression algorithm, and
-<b>&minus;c lzw</b> for Lempel-Ziv &amp; Welch (the
-default).</p>
+data: <b>&minus;c none</b> for no compression, <b>&minus;c
+packbits</b> for the PackBits compression algorithm),
+<b>&minus;c jpeg</b> for the baseline JPEG compression
+algorithm, <b>&minus;c zip</b> for the Deflate compression
+algorithm, and <b>&minus;c lzw</b> for Lempel-Ziv &amp;
+Welch (the default).</p>
</td>
<td width="0%">
</td>
diff --git a/src/3rdparty/libtiff/html/man/thumbnail.1.html b/src/3rdparty/libtiff/html/man/thumbnail.1.html
index b78b461e6b..fabc60116e 100644
--- a/src/3rdparty/libtiff/html/man/thumbnail.1.html
+++ b/src/3rdparty/libtiff/html/man/thumbnail.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:12 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:19 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/tiff2bw.1.html b/src/3rdparty/libtiff/html/man/tiff2bw.1.html
index 3acd5fe079..6b6accfc1d 100644
--- a/src/3rdparty/libtiff/html/man/tiff2bw.1.html
+++ b/src/3rdparty/libtiff/html/man/tiff2bw.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:12 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:19 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -36,7 +36,7 @@ to greyscale</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>tiff2bw</b> [ options ] <i>input.tif
+<p><b>tiff2bw</b> [ <i>options</i> ] <i>input.tif
output.tif</i></p>
</td>
</table>
@@ -73,12 +73,13 @@ used.</p>
<td width="80%">
<p>Specify a compression scheme to use when writing image
-data: <b>&minus;c none</b> for no compression, <b>-c
-packbits</b> for the PackBits compression algorithm, <b>-c
-zip</b> for the Deflate compression algorithm, <b>-c g3</b>
-for the CCITT Group 3 compression algorithm, <b>-c g4</b>
-for the CCITT Group 4 compression algorithm, and <b>&minus;c
-lzw</b> for Lempel-Ziv &amp; Welch (the default).</p>
+data: <b>&minus;c none</b> for no compression, <b>&minus;c
+packbits</b> for the PackBits compression algorithm,
+<b>&minus;c zip</b> for the Deflate compression algorithm,
+<b>&minus;c g3</b> for the CCITT Group 3 compression
+algorithm, <b>&minus;c g4</b> for the CCITT Group 4
+compression algorithm, and <b>&minus;c lzw</b> for
+Lempel-Ziv &amp; Welch (the default).</p>
</td>
<td width="0%">
</td>
diff --git a/src/3rdparty/libtiff/html/man/tiff2pdf.1.html b/src/3rdparty/libtiff/html/man/tiff2pdf.1.html
index 0efb26322b..80e0d557ae 100644
--- a/src/3rdparty/libtiff/html/man/tiff2pdf.1.html
+++ b/src/3rdparty/libtiff/html/man/tiff2pdf.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:12 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:19 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -26,7 +26,8 @@
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
-<p>tiff2pdf - convert a TIFF image to a PDF document</p>
+<p>tiff2pdf &minus; convert a TIFF image to a PDF
+document</p>
</td>
</table>
<a name="SYNOPSIS"></a>
@@ -37,8 +38,7 @@
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
-<p><b>tiff2pdf [</b> <i>options</i> <b>]</b>
-<i>input.tiff</i></p>
+<p><b>tiff2pdf</b> [ <i>options</i> ] <i>input.tiff</i></p>
</td>
</table>
<a name="DESCRIPTION"></a>
@@ -49,7 +49,7 @@
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
-<p><b>tiff2pdf</b> opens a TIFF image and writes a PDF
+<p><i>tiff2pdf</i> opens a TIFF image and writes a PDF
document to standard output.</p>
<!-- INDENTATION -->
<p>The program converts one TIFF file to one PDF file,
@@ -67,7 +67,8 @@ or width) convert the input image to a tiled TIFF if it is
not already.</p>
<!-- INDENTATION -->
<p>The standard output is standard output. Set the output
-file name with the <b>-o</b><i>output.pdf</i> option.</p>
+file name with the <b>&minus;o</b> <i>output.pdf</i>
+option.</p>
<!-- INDENTATION -->
<p>All black and white files are compressed into a single
strip CCITT G4 Fax compressed PDF, unless tiled, where tiled
@@ -109,13 +110,14 @@ resolution and page width and length can be set by the
<b>&minus;u</b> option, the default unit is inch.</p>
<!-- INDENTATION -->
<p>Various items of the output document information can be
-set with the <b>&minus;e, &minus;c, &minus;a, &minus;t,
-&minus;s,</b> and <b>&minus;k</b> options. Setting the
-argument of the option to &quot;&quot; for these tags causes
-the relevant document information field to be not written.
-Some of the document information values otherwise get their
-information from the input TIFF image, the software, author,
-document name, and image description.</p>
+set with the <b>&minus;e</b>, <b>&minus;c</b>,
+<b>&minus;a</b>, <b>&minus;t</b>, <b>&minus;s</b>, and
+<b>&minus;k</b> options. Setting the argument of the option
+to &quot;&quot; for these tags causes the relevant document
+information field to be not written. Some of the document
+information values otherwise get their information from the
+input TIFF image, the software, author, document name, and
+image description.</p>
<!-- INDENTATION -->
<p>The Portable Document Format (PDF) specification is
copyrighted by Adobe Systems, Incorporated.</p>
@@ -129,7 +131,7 @@ copyrighted by Adobe Systems, Incorporated.</p>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
-<p><b>&minus;o</b><i>output-file</i></p></td>
+<p><b>&minus;o</b> <i>output-file</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -137,7 +139,7 @@ copyrighted by Adobe Systems, Incorporated.</p>
<tr valign="top" align="left">
<td width="21%"></td>
<td width="77%">
-<p>Set the output to go to file <i>output-file</i></p>
+<p>Set the output to go to file. <i>output-file</i></p>
</td>
</table>
<!-- TABS -->
@@ -152,8 +154,8 @@ copyrighted by Adobe Systems, Incorporated.</p>
<td width="5%"></td>
<td width="77%">
-<p>Compress with JPEG (requires libjpeg configured with
-libtiff).</p>
+<p>Compress with JPEG (requires <i>libjpeg</i> configured
+with <i>libtiff</i>).</p>
</td>
<tr valign="top" align="left">
<td width="11%"></td>
@@ -164,8 +166,8 @@ libtiff).</p>
<td width="5%"></td>
<td width="77%">
-<p>Compress with Zip/Deflate (requires zlib configured with
-libtiff).</p>
+<p>Compress with Zip/Deflate (requires <i>zlib</i>
+configured with <i>libtiff</i>).</p>
</td>
</table>
<!-- INDENTATION -->
@@ -174,7 +176,7 @@ libtiff).</p>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
-<p><b>&minus;q</b><i>quality</i></p></td>
+<p><b>&minus;q</b> <i>quality</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -209,7 +211,8 @@ no compressed data passthrough.</p>
<td width="7%"></td>
<td width="77%">
-<p>Set PDF &quot;Interpolate&quot; user preference.</p>
+<p>Set PDF &lsquo;&lsquo;Interpolate&rsquo;&rsquo; user
+preference.</p>
</td>
<tr valign="top" align="left">
<td width="11%"></td>
@@ -240,7 +243,7 @@ no compressed data passthrough.</p>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
-<p><b>&minus;p</b><i>paper-size</i></p></td>
+<p><b>&minus;p</b> <i>paper-size</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -248,8 +251,8 @@ no compressed data passthrough.</p>
<tr valign="top" align="left">
<td width="21%"></td>
<td width="77%">
-<p>Set paper size, eg &quot;letter&quot;, &quot;legal&quot;,
-&quot;A4&quot;.</p>
+<p>Set paper size, e.g., <b>letter</b>, <b>legal</b>,
+<b>A4</b>.</p>
</td>
</table>
<!-- INDENTATION -->
@@ -258,7 +261,7 @@ no compressed data passthrough.</p>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
-<p><b>&minus;u</b><i>[i|m]</i></p></td>
+<p><b>&minus;u</b> [<b>i</b>|<b>m</b>]</p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -266,7 +269,7 @@ no compressed data passthrough.</p>
<tr valign="top" align="left">
<td width="21%"></td>
<td width="77%">
-<p>Set distance unit, <i>i</i> for inch, <i>m</i> for
+<p>Set distance unit, <b>i</b> for inch, <b>m</b> for
centimeter.</p>
</td>
</table>
@@ -276,7 +279,7 @@ centimeter.</p>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
-<p><b>&minus;w</b><i>width</i></p></td>
+<p><b>&minus;w</b> <i>width</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -293,7 +296,7 @@ centimeter.</p>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
-<p><b>&minus;l</b><i>length</i></p></td>
+<p><b>&minus;l</b> <i>length</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -304,35 +307,39 @@ centimeter.</p>
<p>Set length in units.</p>
</td>
</table>
-<!-- TABS -->
+<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
- cols="5" cellspacing="0" cellpadding="0">
+ cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
-<td width="11%"></td>
-<td width="8%">
-
-<p><b>&minus;x</b><i>xres</i></p>
-</td>
-<td width="13%"></td>
-<td width="47%">
-
+<td width="10%"></td>
+<td width="89%">
+<p><b>&minus;x</b> <i>xres</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
<p>Set x/width resolution default.</p>
</td>
-<td width="19%">
-</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
-<td width="11%"></td>
-<td width="8%">
-
-<p><b>&minus;y</b><i>yres</i></p>
-</td>
-<td width="13%"></td>
-<td width="47%">
-
+<td width="10%"></td>
+<td width="89%">
+<p><b>&minus;y</b> <i>yres</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
<p>Set y/length resolution default.</p>
</td>
-<td width="19%">
-</td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -340,7 +347,7 @@ centimeter.</p>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
-<p><b>&minus;r</b><i>[d|o]</i></p></td>
+<p><b>&minus;r</b> [<b>d</b>|<b>o</b>]</p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -348,9 +355,9 @@ centimeter.</p>
<tr valign="top" align="left">
<td width="21%"></td>
<td width="77%">
-<p>Set <i>d</i> for resolution default for images without
-resolution, <i>o for resolution override for all
-images.</i></p>
+<p>Set <b>d</b> for resolution default for images without
+resolution, <b>o</b> for resolution override for all
+images.</p>
</td>
</table>
<!-- TABS -->
@@ -363,11 +370,12 @@ images.</i></p>
<p><b>&minus;f</b></p>
</td>
<td width="13%"></td>
-<td width="54%">
+<td width="57%">
-<p>Set PDF &quot;Fit Window&quot; user preference.</p>
+<p>Set PDF &lsquo;&lsquo;Fit Window&rsquo;&rsquo; user
+preference.</p>
</td>
-<td width="17%">
+<td width="14%">
</td>
</table>
<!-- INDENTATION -->
@@ -376,7 +384,7 @@ images.</i></p>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
-<p><b>&minus;e</b><i>YYYYMMDDHHMMSS</i></p></td>
+<p><b>&minus;e</b> <i>YYYYMMDDHHMMSS</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -394,7 +402,7 @@ date/time default, <i>YYYYMMDDHHMMSS.</i></p>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
-<p><b>&minus;c</b><i>creator</i></p></td>
+<p><b>&minus;c</b> <i>creator</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -412,7 +420,7 @@ software default.</p>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
-<p><b>&minus;a</b><i>author</i></p></td>
+<p><b>&minus;a</b> <i>author</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -421,7 +429,7 @@ software default.</p>
<td width="21%"></td>
<td width="77%">
<p>Set document information author, overrides image artist
-default</p>
+default.</p>
</td>
</table>
<!-- INDENTATION -->
@@ -430,7 +438,7 @@ default</p>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
-<p><b>&minus;t</b><i>title</i></p></td>
+<p><b>&minus;t</b> <i>title</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -439,7 +447,7 @@ default</p>
<td width="21%"></td>
<td width="77%">
<p>Set document information title, overrides image document
-name default</p>
+name default.</p>
</td>
</table>
<!-- INDENTATION -->
@@ -448,7 +456,7 @@ name default</p>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
-<p><b>&minus;s</b><i>subject</i></p></td>
+<p><b>&minus;s</b> <i>subject</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -457,7 +465,7 @@ name default</p>
<td width="21%"></td>
<td width="77%">
<p>Set document information subject, overrides image image
-description default</p>
+description default.</p>
</td>
</table>
<!-- INDENTATION -->
@@ -466,7 +474,7 @@ description default</p>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
-<p><b>&minus;k</b><i>keywords</i></p></td>
+<p><b>&minus;k</b> <i>keywords</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -493,12 +501,7 @@ description default</p>
</td>
<td width="14%">
</td>
-<tr valign="top" align="left">
-<td width="11%"></td>
-<td width="2%">
-</td>
-<td width="13%"></td>
-<td width="57%">
+</table>
<a name="EXAMPLES"></a>
<h2>EXAMPLES</h2>
<!-- INDENTATION -->
@@ -516,17 +519,19 @@ from input.tiff.</p></td>
<tr valign="top" align="left">
<td width="20%"></td>
<td width="79%">
-<p>tiff2pdf -o output.pdf input.tiff</p></td>
+<pre>tiff2pdf &minus;o output.pdf input.tiff
+</pre>
+</td>
</table>
<!-- INDENTATION -->
+
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
<p>The following example would generate PDF output from
-input.tiff and write it to standard output.</p>
-</td>
+input.tiff and write it to standard output.</p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -534,9 +539,12 @@ input.tiff and write it to standard output.</p>
<tr valign="top" align="left">
<td width="20%"></td>
<td width="79%">
-<p>tiff2pdf input.tiff</p></td>
+<pre>tiff2pdf input.tiff
+</pre>
+</td>
</table>
<!-- INDENTATION -->
+
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
@@ -545,9 +553,9 @@ input.tiff and write it to standard output.</p>
<p>The following example would generate the file output.pdf
from input.tiff, putting the image pages on a letter sized
page, compressing the output with JPEG, with JPEG quality
-75, setting the title to &quot;Document&quot;, and setting
-the &quot;Fit Window&quot; option.</p>
-</td>
+75, setting the title to
+&lsquo;&lsquo;Document&rsquo;&rsquo;, and setting the
+&lsquo;&lsquo;Fit Window&rsquo;&rsquo; option.</p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -555,12 +563,14 @@ the &quot;Fit Window&quot; option.</p>
<tr valign="top" align="left">
<td width="20%"></td>
<td width="79%">
-<p>tiff2pdf -p letter -j -q 75 -t &quot;Document&quot; -f -o
-output.pdf input.tiff</p></td>
+<pre>tiff2pdf &minus;p letter &minus;j &minus;q 75 &minus;t &quot;Document&quot; &minus;f &minus;o output.pdf input.tiff
+</pre>
+</td>
</table>
<a name="BUGS"></a>
<h2>BUGS</h2>
<!-- INDENTATION -->
+
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
@@ -587,8 +597,8 @@ output.pdf input.tiff</p></td>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
-<p><b>libtiff</b>(3)<b>, tiffcp</b>(1)<b>,
-tiff2ps</b>(1)</p>
+<p><b>libtiff</b>(3), <b>tiffcp</b>(1),
+<b>tiff2ps</b>(1)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
<b>http://www.remotesensing.org/libtiff/</b></p>
diff --git a/src/3rdparty/libtiff/html/man/tiff2ps.1.html b/src/3rdparty/libtiff/html/man/tiff2ps.1.html
index e58887d30d..e13bb8f893 100644
--- a/src/3rdparty/libtiff/html/man/tiff2ps.1.html
+++ b/src/3rdparty/libtiff/html/man/tiff2ps.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:13 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:19 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -15,7 +15,6 @@
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#EXAMPLES">EXAMPLES</a><br>
<a href="#BUGS">BUGS</a><br>
-<a href="#BUGS">BUGS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
@@ -28,7 +27,7 @@
<td width="8%"></td>
<td width="91%">
<p>tiff2ps &minus; convert a <small>TIFF</small> image to
-&trade;</p>
+PostScript&trade;</p>
</td>
</table>
<a name="SYNOPSIS"></a>
@@ -52,26 +51,28 @@
<td width="8%"></td>
<td width="91%">
<p><i>tiff2ps</i> reads <small>TIFF</small> images and
-writes or Encapsulated (EPS) on the standard output. By
-default, <i>tiff2ps</i> writes Encapsulated for the first
-image in the specified <small>TIFF</small> image file.</p>
+writes PostScript or Encapsulated PostScript (EPS) on the
+standard output. By default, <i>tiff2ps</i> writes
+Encapsulated PostScript for the first image in the specified
+<small>TIFF</small> image file.</p>
<!-- INDENTATION -->
-<p>By default, <i>tiff2ps</i> will generate that fills a
-printed area specified by the <small>TIFF</small> tags in
-the input file. If the file does not contain
+<p>By default, <i>tiff2ps</i> will generate PostScript that
+fills a printed area specified by the <small>TIFF</small>
+tags in the input file. If the file does not contain
<i>XResolution</i> or <i>YResolution</i> tags, then the
printed area is set according to the image dimensions. The
<b>&minus;w</b> and <b>&minus;h</b> options (see below) can
be used to set the dimensions of the printed area in inches;
overriding any relevant <small>TIFF</small> tags.</p>
<!-- INDENTATION -->
-<p>The generated for <small>RGB,</small> palette, and
-<small>CMYK</small> images uses the <i>colorimage</i>
-operator. The generated for greyscale and bilevel images
-uses the <i>image</i> operator. When the <i>colorimage</i>
-operator is used, code to emulate this operator on older
-printers is also generated. Note that this emulation code
-can be very slow.</p>
+<p>The PostScript generated for <small>RGB,</small> palette,
+and <small>CMYK</small> images uses the <i>colorimage</i>
+operator. The PostScript generated for greyscale and bilevel
+images uses the <i>image</i> operator. When the
+<i>colorimage</i> operator is used, PostScript code to
+emulate this operator on older PostScript printers is also
+generated. Note that this emulation code can be very
+slow.</p>
<!-- INDENTATION -->
<p>Color images with associated alpha data are composited
over a white background.</p>
@@ -91,7 +92,7 @@ over a white background.</p>
<td width="5%"></td>
<td width="80%">
-<p>Generate Level 1 (the default).</p>
+<p>Generate PostScript Level 1 (the default).</p>
</td>
<td width="0%">
</td>
@@ -104,7 +105,7 @@ over a white background.</p>
<td width="5%"></td>
<td width="80%">
-<p>Generate Level 2.</p>
+<p>Generate PostScript Level 2.</p>
</td>
<td width="0%">
</td>
@@ -117,8 +118,9 @@ over a white background.</p>
<td width="5%"></td>
<td width="80%">
-<p>Generate Level 3. It basically allows one to use the
-/flateDecode filter for ZIP compressed TIFF images.</p>
+<p>Generate PostScript Level 3. It basically allows one to
+use the /flateDecode filter for ZIP compressed TIFF
+images.</p>
</td>
<td width="0%">
</td>
@@ -160,7 +162,8 @@ This does not affect the height of the printed image.</p>
<td width="80%">
<p>Center the image in the output. This option only shows
-an effect if both the -w and the -h option are given.</p>
+an effect if both the <b>&minus;w</b> and the
+<b>&minus;h</b> option are given.</p>
</td>
<td width="0%">
</td>
@@ -174,7 +177,7 @@ an effect if both the -w and the -h option are given.</p>
<td width="80%">
<p>Set the initial <small>TIFF</small> directory to the
-specified directory number. (NB: directories are numbered
+specified directory number. (NB: Directories are numbered
starting at zero.) This option is useful for selecting
individual pages in a multi-page (e.g. facsimile) file.</p>
</td>
@@ -189,7 +192,8 @@ individual pages in a multi-page (e.g. facsimile) file.</p>
<td width="5%"></td>
<td width="80%">
-<p>Force the generation of Encapsulated (implies -z).</p>
+<p>Force the generation of Encapsulated PostScript (implies
+<b>&minus;z</b>).</p>
</td>
<td width="0%">
</td>
@@ -276,12 +280,12 @@ does not affect the width of the printed image.</p>
<td width="5%"></td>
<td width="80%">
-<p>Where possible render using the <b>imagemask</b>
-operator instead of the image operator. When this option is
-specified <i>tiff2ps</i> will use <b>imagemask</b> for
-rendering 1 bit deep images. If this option is not specified
-or if the image depth is greater than 1 then the image
-operator is used.</p>
+<p>Where possible render using the <i>imagemask</i>
+PostScript operator instead of the <i>image</i> operator.
+When this option is specified <i>tiff2ps</i> will use
+<i>imagemask</i> for rendering 1 bit deep images. If this
+option is not specified or if the image depth is greater
+than 1 then the <i>image</i> operator is used.</p>
</td>
<td width="0%">
</td>
@@ -297,7 +301,7 @@ operator is used.</p>
<p>Set the initial <small>TIFF</small> directory to the
<small>IFD</small> at the specified file offset. This option
is useful for selecting thumbnail images and the like which
-are hidden using the SubIFD tag.</p>
+are hidden using the <i>SubIFD</i> tag.</p>
</td>
<td width="0%">
</td>
@@ -310,7 +314,8 @@ are hidden using the SubIFD tag.</p>
<td width="5%"></td>
<td width="80%">
-<p>Force the generation of (non-Encapsulated) .</p>
+<p>Force the generation of (non-Encapsulated)
+PostScript.</p>
</td>
<td width="0%">
</td>
@@ -392,12 +397,12 @@ inches.</p>
<td width="5%"></td>
<td width="80%">
-<p>When generating Level 2, data is scaled so that it does
-not image into the <i>deadzone</i> on a page (the outer
-margin that the printing device is unable to mark). This
-option suppresses this behavior. When Level 1 is generated,
-data is imaged to the entire printed page and this option
-has no affect.</p>
+<p>When generating PostScript Level 2, data is scaled so
+that it does not image into the <i>deadzone</i> on a page
+(the outer margin that the printing device is unable to
+mark). This option suppresses this behavior. When PostScript
+Level 1 is generated, data is imaged to the entire printed
+page and this option has no affect.</p>
</td>
<td width="0%">
</td>
@@ -410,8 +415,8 @@ has no affect.</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p>The following generates Level 2 for all pages of a
-facsimile:</p></td>
+<p>The following generates PostScript Level 2 for all pages
+of a facsimile:</p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -419,7 +424,7 @@ facsimile:</p></td>
<tr valign="top" align="left">
<td width="17%"></td>
<td width="82%">
-<pre>tiff2ps -a2 fax.tif | lpr
+<pre>tiff2ps &minus;a2 fax.tif | lpr
</pre>
</td>
</table>
@@ -434,8 +439,8 @@ facsimile:</p></td>
Ghostscript then you can efficiently preview facsimile
generated with the above command.</p>
<!-- INDENTATION -->
-<p>To generate Encapsulated for a the image at directory 2
-of an image use:</p></td>
+<p>To generate Encapsulated PostScript for a the image at
+directory 2 of an image use:</p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -443,7 +448,7 @@ of an image use:</p></td>
<tr valign="top" align="left">
<td width="17%"></td>
<td width="82%">
-<pre>tiff2ps -d 1 foo.tif
+<pre>tiff2ps &minus;d 1 foo.tif
</pre>
</td>
</table>
@@ -454,7 +459,7 @@ of an image use:</p></td>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p>(notice that directories are numbered starting at
+<p>(Notice that directories are numbered starting at
zero.)</p>
<!-- INDENTATION -->
<p>If you have a long image, it may be split in several
@@ -466,7 +471,7 @@ pages:</p></td>
<tr valign="top" align="left">
<td width="17%"></td>
<td width="82%">
-<pre>tiff2ps -h11 -w8.5 -H14 -L.5 foo.tif &gt; foo.ps
+<pre>tiff2ps &minus;h11 &minus;w8.5 &minus;H14 &minus;L.5 foo.tif &gt; foo.ps
</pre>
</td>
</table>
@@ -495,24 +500,15 @@ readability).</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p>Because does not support the notion of a colormap, 8-bit
-palette images produce 24-bit images. This conversion
-results in output that is six times bigger than the original
-image and which takes a long time to send to a printer over
-a serial line. Matters are even worse for 4-, 2-, and 1-bit
-palette images.</p>
-</td>
-</table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
+<p>Because PostScript does not support the notion of a
+colormap, 8-bit palette images produce 24-bit PostScript
+images. This conversion results in output that is six times
+bigger than the original image and which takes a long time
+to send to a printer over a serial line. Matters are even
+worse for 4-, 2-, and 1-bit palette images.</p>
<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p>Does not handle tiled images when generating PS Level I
-output.</p>
+<p>Does not handle tiled images when generating PostScript
+Level I output.</p>
</td>
</table>
<a name="SEE ALSO"></a>
diff --git a/src/3rdparty/libtiff/html/man/tiff2rgba.1.html b/src/3rdparty/libtiff/html/man/tiff2rgba.1.html
index b39a27962d..eec3968317 100644
--- a/src/3rdparty/libtiff/html/man/tiff2rgba.1.html
+++ b/src/3rdparty/libtiff/html/man/tiff2rgba.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:13 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:19 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -36,7 +36,7 @@ RGBA color space</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>tiff2rgba</b> [ options ] <i>input.tif
+<p><b>tiff2rgba</b> [ <i>options</i> ] <i>input.tif
output.tif</i></p>
</td>
</table>
@@ -63,11 +63,11 @@ combinations of BitsPerSample, photometric interpretation,
block organization and planar configuration.</p>
<!-- INDENTATION -->
<p>The generated images are stripped images with four
-samples per pixel (red, green, blue and alpha) or if the -n
-flag is used, three samples per pixel (red, green, and
-blue). The resulting images are always planar configuration
-contiguous. For this reason, this program is a useful
-utility for transform exotic TIFF files into a form
+samples per pixel (red, green, blue and alpha) or if the
+<b>&minus;n</b> flag is used, three samples per pixel (red,
+green, and blue). The resulting images are always planar
+configuration contiguous. For this reason, this program is a
+useful utility for transform exotic TIFF files into a form
ingestible by almost any TIFF supporting software.</p>
</td>
</table>
@@ -87,10 +87,11 @@ ingestible by almost any TIFF supporting software.</p>
<p>Specify a compression scheme to use when writing image
data: <b>&minus;c none</b> for no compression (the default),
-<b>-c packbits</b> for the PackBits compression algorithm,
-<b>-c zip</b> for the Deflate compression algorithm, <b>-c
-jpeg</b> for the JPEG compression algorithm, and <b>&minus;c
-lzw</b> for Lempel-Ziv &amp; Welch.</p>
+<b>&minus;c packbits</b> for the PackBits compression
+algorithm, <b>&minus;c zip</b> for the Deflate compression
+algorithm, <b>&minus;c jpeg</b> for the JPEG compression
+algorithm, and <b>&minus;c lzw</b> for Lempel-Ziv &amp;
+Welch.</p>
</td>
<td width="0%">
</td>
@@ -135,8 +136,8 @@ limited RAM.</p>
<td width="80%">
<p>Drop the alpha component from the output file, producing
-a pure RGB file. Currently this does not work if the -b flag
-is also in effect.</p>
+a pure RGB file. Currently this does not work if the
+<b>&minus;b</b> flag is also in effect.</p>
</td>
<td width="0%">
</td>
diff --git a/src/3rdparty/libtiff/html/man/tiffcmp.1.html b/src/3rdparty/libtiff/html/man/tiffcmp.1.html
index 339bce91a9..a9fca2f15a 100644
--- a/src/3rdparty/libtiff/html/man/tiffcmp.1.html
+++ b/src/3rdparty/libtiff/html/man/tiffcmp.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:13 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:19 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -88,7 +88,7 @@ files.</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>&minus;z number</b></p></td>
+<p><b>&minus;z</b> <i>number</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -129,7 +129,7 @@ between the files.</p>
compared; they may also generate spurious diagnostics.</p>
<!-- INDENTATION -->
<p>The image data of tiled files is not compared, since the
-TIFFReadScanline() function is used. A error will be
+<i>TIFFReadScanline()</i> function is used. An error will be
reported for tiled files.</p>
<!-- INDENTATION -->
<p>The pixel and/or sample number reported in differences
diff --git a/src/3rdparty/libtiff/html/man/tiffcp.1.html b/src/3rdparty/libtiff/html/man/tiffcp.1.html
index 310783a98f..2b30d5f19a 100644
--- a/src/3rdparty/libtiff/html/man/tiffcp.1.html
+++ b/src/3rdparty/libtiff/html/man/tiffcp.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:13 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:19 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -74,7 +74,7 @@ any way.</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>&minus;b image</b></p></td>
+<p><b>&minus;b</b> <i>image</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -201,6 +201,20 @@ tag set to <small>MSB2LSB.</small></p>
<td width="10%"></td>
<td width="3%">
+<p><b>&minus;i</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Ignore non-fatal read errors and continue processing of
+the input file.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
<p><b>&minus;l</b></p>
</td>
<td width="5%"></td>
@@ -274,7 +288,7 @@ force samples to be written in separate planes.</p>
data written to the output file. By default (or when value
<b>0</b> is specified), <i>tiffcp</i> attempts to set the
rows/strip that no more than 8 kilobytes of data appear in a
-strip. If you specify special value <b>-1</b> it will
+strip. If you specify special value <b>&minus;1</b> it will
results in infinite number of the rows per strip. The entire
image will be the one strip in that case.</p>
</td>
@@ -334,7 +348,7 @@ of data appear in a tile.</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>&minus;,={character}</b></p></td>
+<p><b>&minus;,=</b><i>character</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -342,11 +356,11 @@ of data appear in a tile.</p>
<tr valign="top" align="left">
<td width="19%"></td>
<td width="80%">
-<p>substitute {character} for &rsquo;,&rsquo; in parsing
-image directory indices in files. This is necessary if
-filenames contain commas. Note that &rsquo;,=&rsquo; with
+<p>substitute <i>character</i> for &lsquo;,&rsquo; in
+parsing image directory indices in files. This is necessary
+if filenames contain commas. Note that <b>&minus;,=</b> with
whitespace immediately following will disable the special
-meaning of the &rsquo;,&rsquo; entirely. See examples.</p>
+meaning of the &lsquo;,&rsquo; entirely. See examples.</p>
</td>
</table>
<a name="EXAMPLES"></a>
@@ -366,7 +380,7 @@ result using <small>LZW</small> encoding:</p></td>
<tr valign="top" align="left">
<td width="17%"></td>
<td width="82%">
-<pre>tiffcp -c lzw a.tif b.tif result.tif
+<pre>tiffcp &minus;c lzw a.tif b.tif result.tif
</pre>
</td>
</table>
@@ -387,7 +401,7 @@ used:</p></td>
<tr valign="top" align="left">
<td width="17%"></td>
<td width="82%">
-<pre>tiffcp -c g4 -r 10000 g3.tif g4.tif
+<pre>tiffcp &minus;c g4 &minus;r 10000 g3.tif g4.tif
</pre>
</td>
</table>
@@ -403,10 +417,11 @@ rows in the source file.)</p>
<!-- INDENTATION -->
<p>To extract a selected set of images from a multi-image
TIFF file, the file name may be immediately followed by a
-&rsquo;,&rsquo; separated list of image directory indices.
+&lsquo;,&rsquo; separated list of image directory indices.
The first image is always in directory 0. Thus, to copy the
-1st and 3rd images of image file &quot;album.tif&quot; to
-&quot;result.tif&quot;:</p></td>
+1st and 3rd images of image file
+&lsquo;&lsquo;album.tif&rsquo;&rsquo; to
+&lsquo;&lsquo;result.tif&rsquo;&rsquo;:</p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -425,10 +440,32 @@ The first image is always in directory 0. Thus, to copy the
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p>Given file &quot;CCD.tif&quot; whose first image is a
-noise bias followed by images which include that bias,
-subtract the noise from all those images following it (while
-decompressing) with the command:</p></td>
+<p>A trailing comma denotes remaining images in sequence.
+The following command will copy all image with except the
+first one:</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="17%"></td>
+<td width="82%">
+<pre>tiffcp album.tif,1, result.tif
+</pre>
+</td>
+</table>
+<!-- INDENTATION -->
+
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p>Given file &lsquo;&lsquo;CCD.tif&rsquo;&rsquo; whose
+first image is a noise bias followed by images which include
+that bias, subtract the noise from all those images
+following it (while decompressing) with the
+command:</p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -436,7 +473,7 @@ decompressing) with the command:</p></td>
<tr valign="top" align="left">
<td width="17%"></td>
<td width="82%">
-<pre>tiffcp -c none -b CCD.tif CCD.tif,1, result.tif
+<pre>tiffcp &minus;c none &minus;b CCD.tif CCD.tif,1, result.tif
</pre>
</td>
</table>
@@ -447,9 +484,10 @@ decompressing) with the command:</p></td>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p>If the file above were named &quot;CCD,X.tif&quot;, the
-&quot;-,=&quot; option would be required to correctly parse
-this filename with image numbers, as follows:</p></td>
+<p>If the file above were named
+&lsquo;&lsquo;CCD,X.tif&rsquo;&rsquo;, the <b>&minus;,=</b>
+option would be required to correctly parse this filename
+with image numbers, as follows:</p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -457,7 +495,7 @@ this filename with image numbers, as follows:</p></td>
<tr valign="top" align="left">
<td width="17%"></td>
<td width="82%">
-<pre>tiffcp -c none -,=% -b CCD,X.tif CCD,X%1%.tif result.tif
+<pre>tiffcp &minus;c none &minus;,=% &minus;b CCD,X.tif CCD,X%1%.tif result.tif
</pre>
</td>
diff --git a/src/3rdparty/libtiff/html/man/tiffcrop.1.html b/src/3rdparty/libtiff/html/man/tiffcrop.1.html
new file mode 100644
index 0000000000..4c25c2921b
--- /dev/null
+++ b/src/3rdparty/libtiff/html/man/tiffcrop.1.html
@@ -0,0 +1,851 @@
+<!-- Creator : groff version 1.18.1 -->
+<!-- CreationDate: Fri Jul 13 17:43:19 2007 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>TIFFCROP</title>
+</head>
+<body>
+
+<h1 align=center>TIFFCROP</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#EXAMPLES">EXAMPLES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p>tiffcrop &minus; copy, convert, crop, extract, or process
+a <small>TIFF</small> file</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p><b>tiffcrop</b> [ <i>options</i> ] <i>src1.tif ...
+srcN.tif dst.tif</i></p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p><i>tiffcrop</i> combines one or more files created
+according to the Tag Image File Format, Revision 6.0 into a
+single <small>TIFF</small> file. The output file may be
+compressed using a different algorithm than the input files.
+<i>tiffcrop</i> is most often used to extract portions of an
+image for processing with bar code recognizer or OCR
+software when that software cannot restrict the region of
+interest to a specific portion of the image or to improve
+efficiency when the regions of interest must be rotated. It
+can also be used to subdivide all or part of a processed
+image into smaller sections.</p>
+<!-- INDENTATION -->
+<p>Functions are applied to the input image in the following
+order:</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="17%"></td>
+<td width="82%">
+<pre>cropping, fixed area extraction, zones, inversion, mirroring, rotation.
+</pre>
+</td>
+</table>
+<!-- INDENTATION -->
+
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p>Functions are applied to the output image in the
+following order:</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="17%"></td>
+<td width="82%">
+<p>output resolution, output margins, rows and columns
+<b>or</b> page size divisions, orientation options, strip,
+tile, byte order, and compression options.</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p>By default, <i>tiffcrop</i> will copy all the understood
+tags in a <small>TIFF</small> directory of an input file to
+the associated directory in the output file. Options can be
+used to force the resultant image to be written as strips or
+tiles of data, respectively.</p>
+<!-- INDENTATION -->
+<p><i>tiffcrop</i> can be used to reorganize the storage
+characteristics of data in a file, and to reorganize,
+extract, rotate, and otherwise process the image data as
+specified at the same time whereas tiffcp does not alter the
+image data itself.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p><b>&minus;N odd|even|#,#-#,#|last</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify one or more series or range(s) of images within
+file to process. The words <b>odd</b> or <b>even</b> may be
+used to specify all odd or even numbered images. The word
+<b>last</b> may be used in place of a number in the sequence
+to indicate the final image in the file without knowing how
+many images there are. Ranges of images may be specified
+with a dash and multiple sets can be indicated by joining
+them in a comma-separated list. eg. use <b>&minus;N
+1,5-7,last</b> to process the 1st, 5th through 7th, and
+final image in the file.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p><b>&minus;E top|bottom|left|right</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify the top, bottom, left, or right edge as the
+reference from which to calcuate the width and length of
+crop regions or sequence of postions for zones. May be
+abbreviated to first letter.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p><b>&minus;U in|cm|px</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify the type of units to apply to dimensions for
+margins and crop regions for input and output images. Inches
+or centimeters are converted to pixels using the resolution
+unit specified in the TIFF file (which defaults to inches if
+not specified in the IFD).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p><b>&minus;m #,#,#,#</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify margins to be removed from the input image. The
+order must be top, left, bottom, right with only commas
+separating the elements of the list. Margins are scaled
+according to the current units and removed before any other
+extractions are computed. Captial M was in use.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="6%">
+
+<p><b>&minus;X #</b></p>
+</td>
+<td width="2%"></td>
+<td width="80%">
+
+<p>Set the horizontal (X-axis) dimension of a region to
+extract relative to the specified origin reference. If the
+origin is the top or bottom edge, the X axis value will be
+assumed to start at the left edge.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="6%">
+
+<p><b>&minus;Y #</b></p>
+</td>
+<td width="2%"></td>
+<td width="80%">
+
+<p>Set the vertical (Y-axis) dimension of a region to
+extract relative to the specified origin reference. If the
+origin is the left or right edge, the Y axis value will be
+assumed to start at the top.</p>
+</td>
+<td width="0%">
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p><b>&minus;Z #:#,#:#</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify zones of the image designated as position X of Y
+equal sized portions measured from the reference edge, eg
+1:3 would be first third of the image starting from the
+reference edge minus any margins specified for the confining
+edges. Multiple zones can be specified as a comma separated
+list but they must reference the same edge. To extract the
+top quarter and the bottom third of an image you would use
+<b>&minus;Z 1:4,3:3.</b></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p><b>&minus;F horiz|vert</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Flip, ie mirror, the image or extracted region
+horizontally or vertically.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p><b>&minus;R 90|180|270</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Rotate the image or extracted region 90, 180, or 270
+degrees clockwise.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="6%">
+
+<p><b>&minus;I</b></p>
+</td>
+<td width="2%"></td>
+<td width="80%">
+
+<p>Invert the colorspace values for grayscale and bilevel
+images. This would be used to correct negative images that
+have incorrect PHOTMETRIC INTERPRETATION tags. No support
+for color images.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="6%">
+
+<p><b>&minus;H #</b></p>
+</td>
+<td width="2%"></td>
+<td width="80%">
+
+<p>Set the horizontal resolution of output images to #
+expressed in the current units.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="6%">
+
+<p><b>&minus;V #</b></p>
+</td>
+<td width="2%"></td>
+<td width="80%">
+
+<p>Set the vertical resolution of the output images to #
+expressed in the current units.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="6%">
+
+<p><b>&minus;J #</b></p>
+</td>
+<td width="2%"></td>
+<td width="80%">
+
+<p>Set the horizontal margin of an output page size to #
+expressed in the current units.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="6%">
+
+<p><b>&minus;K #</b></p>
+</td>
+<td width="2%"></td>
+<td width="80%">
+
+<p>Set the vertical margin of an output page size to #
+expressed in the current units.</p>
+</td>
+<td width="0%">
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p><b>&minus;O portrait|landscape|auto</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Set the output orientation of the pages or sections. Auto
+will use the arrangement that requires the fewest pages.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p><b>&minus;S cols:rows</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Divide each image into cols across and rows down equal
+sections.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p><b>&minus;P page</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Format the output images to fit on page size paper. Use
+-P list to show the supported page sizes and dimensions.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
+<p><b>&minus;B</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Force output to be written with Big-Endian byte order.
+This option only has an effect when the output file is
+created or overwritten and not when it is appended to.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
+<p><b>&minus;C</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Suppress the use of &lsquo;&lsquo;strip
+chopping&rsquo;&rsquo; when reading images that have a
+single strip/tile of uncompressed data.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
+<p><b>&minus;c</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Specify the compression to use for data written to the
+output file: <b>none</b> for no compression, <b>packbits</b>
+for PackBits compression, <b>lzw</b> for Lempel-Ziv &amp;
+Welch compression, <b>jpeg</b> for baseline JPEG
+compression, <b>zip</b> for Deflate compression, <b>g3</b>
+for CCITT Group 3 (T.4) compression, and <b>g4</b> for CCITT
+Group 4 (T.6) compression. By default <i>tiffcrop</i> will
+compress data according to the value of the
+<i>Compression</i> tag found in the source file.</p>
+</td>
+<td width="0%">
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="17%"></td>
+<td width="82%">
+<p>The <small>CCITT</small> Group 3 and Group 4 compression
+algorithms can only be used with bilevel data.</p>
+<!-- INDENTATION -->
+<p>Group 3 compression can be specified together with
+several T.4-specific options: <b>1d</b> for 1-dimensional
+encoding, <b>2d</b> for 2-dimensional encoding, and
+<b>fill</b> to force each encoded scanline to be zero-filled
+so that the terminating EOL code lies on a byte boundary.
+Group 3-specific options are specified by appending a
+&lsquo;&lsquo;:&rsquo;&rsquo;-separated list to the
+&lsquo;&lsquo;g3&rsquo;&rsquo; option; e.g. <b>&minus;c
+g3:2d:fill</b> to get 2D-encoded data with byte-aligned EOL
+codes.</p>
+<!-- INDENTATION -->
+<p><small>LZW</small> compression can be specified together
+with a <i>predictor</i> value. A predictor value of 2 causes
+each scanline of the output image to undergo horizontal
+differencing before it is encoded; a value of 1 forces each
+scanline to be encoded without differencing. LZW-specific
+options are specified by appending a
+&lsquo;&lsquo;:&rsquo;&rsquo;-separated list to the
+&lsquo;&lsquo;lzw&rsquo;&rsquo; option; e.g. <b>&minus;c
+lzw:2</b> for <small>LZW</small> compression with horizontal
+differencing.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
+<p><b>&minus;f</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Specify the bit fill order to use in writing output
+data. By default, <i>tiffcrop</i> will create a new file
+with the same fill order as the original. Specifying
+<b>&minus;f lsb2msb</b> will force data to be written with
+the FillOrder tag set to <small>LSB2MSB,</small> while
+<b>&minus;f msb2lsb</b> will force data to be written with
+the FillOrder tag set to <small>MSB2LSB.</small></p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
+<p><b>&minus;i</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Ignore non-fatal read errors and continue processing of
+the input file.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
+<p><b>&minus;l</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Specify the length of a tile (in pixels).
+<i>tiffcrop</i> attempts to set the tile dimensions so that
+no more than 8 kilobytes of data appear in a tile.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
+<p><b>&minus;L</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Force output to be written with Little-Endian byte
+order. This option only has an effect when the output file
+is created or overwritten and not when it is appended
+to.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
+<p><b>&minus;M</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Suppress the use of memory-mapped files when reading
+images.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
+<p><b>&minus;p</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Specify the planar configuration to use in writing image
+data that has more than one 8-bit sample per pixel. By
+default, <i>tiffcrop</i> will create a new file with the
+same planar configuration as the original. Specifying
+<b>&minus;p contig</b> will force data to be written with
+multi-sample data packed together, while <b>&minus;p
+separate</b> will force samples to be written in separate
+planes.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
+<p><b>&minus;r</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Specify the number of rows (scanlines) in each strip of
+data written to the output file. By default (or when value
+<b>0</b> is specified), <i>tiffcrop</i> attempts to set the
+rows/strip that no more than 8 kilobytes of data appear in a
+strip. If you specify the special value <b>-1</b> it will
+results in infinite number of the rows per strip. The entire
+image will be the one strip in that case.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
+<p><b>&minus;s</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Force the output file to be written with data organized
+in strips (rather than tiles).</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
+<p><b>&minus;t</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Force the output file to be written with data organized
+in tiles (rather than strips).</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
+<p><b>&minus;w</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Specify the width of a tile (in pixels). <i>tiffcrop</i>
+attempts to set the tile dimensions so that no more than 8
+kilobytes of data appear in a tile. <i>tiffcrop</i> attempts
+to set the tile dimensions so that no more than 8 kilobytes
+of data appear in a tile.</p>
+</td>
+<td width="0%">
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p><b>&minus;,={character}</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>substitute {character} for &rsquo;,&rsquo; in parsing
+image directory indices in files. This is necessary if
+filenames contain commas. Note that &rsquo;,=&rsquo; with
+whitespace immediately following will disable the special
+meaning of the &rsquo;,&rsquo; entirely. See examples.</p>
+</td>
+</table>
+<a name="EXAMPLES"></a>
+<h2>EXAMPLES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p>The following concatenates two files and writes the
+result using <small>LZW</small> encoding:</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="17%"></td>
+<td width="82%">
+<pre>tiffcrop -c lzw a.tif b.tif result.tif
+</pre>
+</td>
+</table>
+<!-- INDENTATION -->
+
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p>To convert a G3 1d-encoded <small>TIFF</small> to a
+single strip of G4-encoded data the following might be
+used:</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="17%"></td>
+<td width="82%">
+<pre>tiffcrop -c g4 -r 10000 g3.tif g4.tif
+</pre>
+</td>
+</table>
+<!-- INDENTATION -->
+
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p>(1000 is just a number that is larger than the number of
+rows in the source file.)</p>
+<!-- INDENTATION -->
+<p>To extract a selected set of images from a multi-image
+TIFF file use the -N option described above. Thus, to copy
+the 1st and 3rd images of image file &quot;album.tif&quot;
+to &quot;result.tif&quot;:</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="17%"></td>
+<td width="82%">
+<pre>tiffcrop -N 1,3 album.tif result.tif
+</pre>
+</td>
+</table>
+<!-- INDENTATION -->
+
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p>Invert a bilevel image scan of a microfilmed document and
+crop off margins of 0.25 inches on the left and right, 0.5
+inch on the top, nad 0.75 inch on the bottom. From the
+remaining portion of the image, select the second and third
+quarters, ie, one half of the area left from the center to
+each margin.</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="17%"></td>
+<td width="82%">
+<pre>tiffcrop -U in -m 0.5,0.25,0.75,0.25 -E left -Z 2:4,3:4 -I MicrofilmNegative.tif MicrofilmPostiveCenter.tif
+</pre>
+</td>
+</table>
+<!-- INDENTATION -->
+
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p>Extract only the final image of a large Architectural E
+sized multipage TIFF file and rotate it 90 degrees clockwise
+while reformatting the output to fit on tabloid sized sheets
+with one quarter of an inch on each side:</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="17%"></td>
+<td width="82%">
+<pre>tiffcrop -N last -R 90 -O auto -P tabloid -U in -J 0.25 -K 0.25 -H 300 -V 300 Big-PlatMap.tif BigPlatMap-Tabloid.tif
+</pre>
+</td>
+</table>
+<!-- INDENTATION -->
+
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p>The output images will have a specified resolution of 300
+dpi in both directions. The orientation of each page will be
+determined by whichever choice requires the fewest pages. To
+specify a specific orientation, use the portrait or
+landscape option.</p>
+</td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="8%"></td>
+<td width="91%">
+<p><b>pal2rgb</b>(1), <b>tiffinfo</b>(1), <b>tiffcmp</b>(1),
+<b>tiffcp</b>(1), <b>tiffmedian</b>(1), <b>tiffsplit</b>(1),
+<b>libtiff</b>(3TIFF)</p>
+<!-- INDENTATION -->
+<p>Libtiff library home page:
+<b>http://www.remotesensing.org/libtiff/</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
diff --git a/src/3rdparty/libtiff/html/man/tiffdither.1.html b/src/3rdparty/libtiff/html/man/tiffdither.1.html
index 162c0e67a5..2427a90125 100644
--- a/src/3rdparty/libtiff/html/man/tiffdither.1.html
+++ b/src/3rdparty/libtiff/html/man/tiffdither.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:13 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:19 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -128,9 +128,10 @@ differencing.</p>
data. By default, <i>tiffdither</i> will create a new file
with the same fill order as the original. Specifying
<b>&minus;f lsb2msb</b> will force data to be written with
-the FillOrder tag set to <small>LSB2MSB ,</small> while
-<b>&minus;f msb2lsb</b> will force data to be written with
-the FillOrder tag set to <small>MSB2LSB .</small></p>
+the <i>FillOrder</i> tag set to <small>LSB2MSB ,</small>
+while <b>&minus;f msb2lsb</b> will force data to be written
+with the <i>Fill- Order</i> tag set to <small>MSB2LSB
+.</small></p>
</td>
<td width="0%">
</td>
diff --git a/src/3rdparty/libtiff/html/man/tiffdump.1.html b/src/3rdparty/libtiff/html/man/tiffdump.1.html
index da04dcb59f..abf0662c66 100644
--- a/src/3rdparty/libtiff/html/man/tiffdump.1.html
+++ b/src/3rdparty/libtiff/html/man/tiffdump.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:13 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:20 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -93,7 +93,7 @@ than the default decimal.</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>&minus;m items</b></p></td>
+<p><b>&minus;m</b> <i>items</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -111,7 +111,7 @@ printed. By default, this will be 24.</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>&minus;o offset</b></p></td>
+<p><b>&minus;o</b> <i>offset</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
diff --git a/src/3rdparty/libtiff/html/man/tiffgt.1.html b/src/3rdparty/libtiff/html/man/tiffgt.1.html
index bf8a1387d3..e8bd4b2312 100644
--- a/src/3rdparty/libtiff/html/man/tiffgt.1.html
+++ b/src/3rdparty/libtiff/html/man/tiffgt.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:13 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:20 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -69,7 +69,7 @@ following characteristics:</p></td>
<td width="15%"></td>
<td width="34%">
-<p>BitsPerSample</p>
+<p><i>BitsPerSample</i></p>
</td>
<td width="50%">
@@ -79,7 +79,7 @@ following characteristics:</p></td>
<td width="15%"></td>
<td width="34%">
-<p>SamplesPerPixel</p>
+<p><i>SamplesPerPixel</i></p>
</td>
<td width="50%">
@@ -89,7 +89,7 @@ following characteristics:</p></td>
<td width="15%"></td>
<td width="34%">
-<p>PhotometricInterpretation</p>
+<p><i>PhotometricInterpretation</i></p>
</td>
<td width="50%">
@@ -100,7 +100,7 @@ following characteristics:</p></td>
<td width="15%"></td>
<td width="34%">
-<p>PlanarConfiguration</p>
+<p><i>PlanarConfiguration</i></p>
</td>
<td width="50%">
@@ -110,7 +110,7 @@ following characteristics:</p></td>
<td width="15%"></td>
<td width="34%">
-<p>Orientation</p>
+<p><i>Orientation</i></p>
</td>
<td width="50%">
@@ -450,9 +450,9 @@ octal.</p>
<p>Override the value of the
<i>PhotometricInterpretation</i> tag; the parameter may be
-one of: <i>miniswhite</i>, <i>minisblack</i>, <i>rgb</i>,
-<i>palette</i>, <i>mask</i>, <i>separated</i>, <i>ycbcr</i>,
-and <i>cielab</i>.</p>
+one of: <b>miniswhite</b>, <b>minisblack</b>, <b>rgb</b>,
+<b>palette</b>, <b>mask</b>, <b>separated</b>, <b>ycbcr</b>,
+and <b>cielab</b>.</p>
</td>
<td width="0%">
</td>
diff --git a/src/3rdparty/libtiff/html/man/tiffinfo.1.html b/src/3rdparty/libtiff/html/man/tiffinfo.1.html
index 59bdd38310..4863ed3762 100644
--- a/src/3rdparty/libtiff/html/man/tiffinfo.1.html
+++ b/src/3rdparty/libtiff/html/man/tiffinfo.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:13 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:20 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/tiffmedian.1.html b/src/3rdparty/libtiff/html/man/tiffmedian.1.html
index afe3aa99df..59613177c9 100644
--- a/src/3rdparty/libtiff/html/man/tiffmedian.1.html
+++ b/src/3rdparty/libtiff/html/man/tiffmedian.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:13 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:20 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/tiffset.1.html b/src/3rdparty/libtiff/html/man/tiffset.1.html
index 0069cb6627..fb4d0ed580 100644
--- a/src/3rdparty/libtiff/html/man/tiffset.1.html
+++ b/src/3rdparty/libtiff/html/man/tiffset.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:13 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:20 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
@@ -37,7 +37,7 @@ header</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>tiffset</b> [ options ] <i>filename.tif</i></p>
+<p><b>tiffset</b> [ <i>options</i> ] <i>filename.tif</i></p>
</td>
</table>
<a name="DESCRIPTION"></a>
@@ -60,7 +60,8 @@ header to a specified value.</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>&minus;s tagnumber [count] value ...</b></p></td>
+<p><b>&minus;s</b> <i>tagnumber</i> [ <i>count</i> ]
+<i>value ...</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -78,7 +79,7 @@ specified.</p>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
-<p><b>&minus;sf tagnumber filename</b></p></td>
+<p><b>&minus;sf</b> <i>tagnumber filename</i></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -107,7 +108,7 @@ This option is supported for ASCII tags only.</p>
<tr valign="top" align="left">
<td width="17%"></td>
<td width="82%">
-<pre>tiffset -sf 270 descrip a.tif
+<pre>tiffset &minus;sf 270 descrip a.tif
</pre>
</td>
</table>
@@ -119,7 +120,8 @@ This option is supported for ASCII tags only.</p>
<td width="8%"></td>
<td width="91%">
<p>The following example sets the artist tag (315) of a.tif
-to the string &quot;Anonymous&quot;:</p></td>
+to the string
+&lsquo;&lsquo;Anonymous&rsquo;&rsquo;:</p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -127,7 +129,7 @@ to the string &quot;Anonymous&quot;:</p></td>
<tr valign="top" align="left">
<td width="17%"></td>
<td width="82%">
-<pre>tiffset -s 305 Anonymous a.tif
+<pre>tiffset &minus;s 305 Anonymous a.tif
</pre>
</td>
</table>
@@ -147,9 +149,9 @@ dpi:</p></td>
<tr valign="top" align="left">
<td width="17%"></td>
<td width="82%">
-<pre>tiffset -s 296 2 a.tif
-tiffset -s 282 300.0 a.tif
-tiffset -s 283 300.0 a.tif
+<pre>tiffset &minus;s 296 2 a.tif
+tiffset &minus;s 282 300.0 a.tif
+tiffset &minus;s 283 300.0 a.tif
</pre>
</td>
</table>
diff --git a/src/3rdparty/libtiff/html/man/tiffsplit.1.html b/src/3rdparty/libtiff/html/man/tiffsplit.1.html
index 6f5ada64bb..adbc2f8899 100644
--- a/src/3rdparty/libtiff/html/man/tiffsplit.1.html
+++ b/src/3rdparty/libtiff/html/man/tiffsplit.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:13 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:20 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/man/tiffsv.1.html b/src/3rdparty/libtiff/html/man/tiffsv.1.html
index 823709696e..fb484b01f8 100644
--- a/src/3rdparty/libtiff/html/man/tiffsv.1.html
+++ b/src/3rdparty/libtiff/html/man/tiffsv.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Mon Mar 13 18:03:14 2006 -->
+<!-- CreationDate: Fri Jul 13 17:43:20 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
diff --git a/src/3rdparty/libtiff/html/misc.html b/src/3rdparty/libtiff/html/misc.html
index 2ea9ad4e49..aed91a9213 100644
--- a/src/3rdparty/libtiff/html/misc.html
+++ b/src/3rdparty/libtiff/html/misc.html
@@ -25,18 +25,20 @@ also be nice to be acknowledged.<p>
The libtiff software was written by Sam Leffler while working for
Silicon Graphics.<p>
-The LZW algorithm is derived from the compress program (the proper
-attribution is included in the source code). The Group 3 fax stuff
-originated as code from Jef Poskanzer, but has since been rewritten
-several times. The latest version uses an algorithm from Frank
-Cringle -- consult <TT>libtiff/mkg3states.c</TT> and
-<TT>libtiff/tif_fax3.h</TT> for further information.
-The JPEG support was written by Tom Lane and is dependent on the
-excellent work of Tom Lane and the Independent JPEG Group (IJG)
-who distribute their work under friendly licensing similar to this
-software.
-Many other people have by now helped with bug fixes and code; a
-few of the more persistent contributors have been:
+The LZW algorithm is derived from the compress program (the proper attribution
+is included in the source code). The Group 3 fax stuff originated as code
+from Jef Poskanzer, but has since been rewritten several times. The latest
+version uses an algorithm from Frank Cringle -- consult
+<TT>libtiff/mkg3states.c</TT> and <TT>libtiff/tif_fax3.h</TT> for further
+information. The JPEG support was written by Tom Lane and is dependent on the
+excellent work of Tom Lane and the Independent JPEG Group (IJG) who distribute
+their work under friendly licensing similar to this software. Joris Van Damme
+implemented the robust Old JPEG decoder (as included in libtiff since version
+3.9.0, there was another Old JPEG module in older releases, which was
+incomplete and unsuitable for many existing images of that format). JBIG
+module was written by Lee Howard and depends on JBIG library from the Markus
+Kuhn. Many other people have by now helped with bug fixes and code; a few of
+the more persistent contributors have been:
<PRE>
Bjorn P. Brox
@@ -73,6 +75,8 @@ few of the more persistent contributors have been:
Bob Friesenhahn
Lee Howard
Joris Van Damme
+ Tavis Ormandy
+ Richard Nolde
</PRE>
(my apology to anyone that was inadvertently not listed.)
@@ -107,6 +111,6 @@ OF THIS SOFTWARE.
<HR>
-Last updated: $Date: 2005/10/23 19:43:29 $
+Last updated: $Date: 2007/02/24 15:47:04 $
</BODY>
</HTML>
diff --git a/src/3rdparty/libtiff/html/tools.html b/src/3rdparty/libtiff/html/tools.html
index d085dbc274..b1a757e7ef 100644
--- a/src/3rdparty/libtiff/html/tools.html
+++ b/src/3rdparty/libtiff/html/tools.html
@@ -11,7 +11,7 @@ width="144" height="108" align="left" border="1" hspace="6"> TIFF
Tools Overview</font></h1>
<p>This software distribution comes with a small collection of
programs for converting non-TIFF format images to TIFF and for
-manipulating and interogating the contents of TIFF images. Several
+manipulating and interrogating the contents of TIFF images. Several
of these tools are useful in their own right. Many of them however
are more intended to serve as programming examples for using the
TIFF library.</p>
@@ -21,13 +21,13 @@ examples for writing programs to display and save TIFF images.
<table border cellpadding="3">
<tr>
<td valign="top" width="10%">
-<tt>tiffgt&nbsp;&nbsp;&nbsp;&nbsp;</tt></td>
+<tt><a href="man/tiffgt.1.html">tiffgt</a>&nbsp;&nbsp;&nbsp;&nbsp;</tt></td>
<td>Display the contents of one or more TIFF images using OpenGL.
The software makes extensive use of the <tt>TIFFRGBAImage</tt>
facilities described elsewhere.</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>tiffsv</tt></td>
+<td valign="top" width="10%"><tt><a href="man/tiffsv.1.html">tiffsv</a></tt></td>
<td>A program to save all or part of a screen dump on a Silicon
Graphics system. As for <tt>tiffgt</tt> this code, while written to
use the IRIS GL, can be easily tailored to other devices.</td>
@@ -37,112 +37,121 @@ use the IRIS GL, can be easily tailored to other devices.</td>
The remaining programs should be device-independent:
<table border cellpadding="3">
<tr>
-<td valign="top" width="10%"><tt>bmp2tiff</tt></td>
+<td valign="top" width="10%"><tt><a href="man/bmp2tiff.1.html">bmp2tiff</a></tt></td>
<td>Convert BMP images to TIFF</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>fax2ps</tt></td>
+<td valign="top" width="10%"><tt><a href="man/fax2ps.1.html">fax2ps</a></tt></td>
<td>Convert a Group 3- or Group 4- compressed TIFF to PostScript
that is significantly more compressed than is generated by
<tt>tiff2ps</tt> (unless <tt>tiff2ps</tt> writes PS Level II)</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>fax2tiff</tt></td>
+<td valign="top" width="10%"><tt><a href="man/fax2tiff.1.html">fax2tiff</a></tt></td>
<td>Convert raw Group 3 or Group 4 facsimile data to TIFF</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>gif2tiff</tt></td>
-<td>A quick hack that converts GIF 87a format images to TIFF</td>
+<td valign="top" width="10%"><tt><a href="man/gif2tiff.1.html">gif2tiff</a></tt></td>
+<td>A quick hack that converts GIF 87a (old) format images to TIFF</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>pal2rgb</tt></td>
+<td valign="top" width="10%"><tt><a href="man/pal2rgb.1.html">pal2rgb</a></tt></td>
<td>Convert a Palette-style image to a full color RGB image by
applying the colormap</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>ppm2tiff</tt></td>
-<td>A quick hack that converts PPM format images to TIFF</td>
+<td valign="top" width="10%"><tt><a href="man/ppm2tiff.1.html">ppm2tiff</a></tt></td>
+<td>A quick hack that converts 8-bit PPM format images to TIFF</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>ras2tiff</tt></td>
+<td valign="top" width="10%"><tt><a href="man/ras2tiff.1.html">ras2tiff</a></tt></td>
<td>A quick hack that converts Sun rasterfile format images to TIFF
-- it's less than complete</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>raw2tiff</tt></td>
+<td valign="top" width="10%"><tt><a href="man/raw2tiff.1.html">raw2tiff</a></tt></td>
<td>Create a TIFF file from raw data</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>rgb2ycbcr</tt></td>
+<td valign="top" width="10%"><tt><a href="man/rgb2ycbcr.1.html">rgb2ycbcr</a></tt></td>
<td>Convert an RGB, grayscale, or bilevel TIFF image to a YCbCr
TIFF image; it's mainly provided for testing</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>sgi2tiff</tt></td>
+<td valign="top" width="10%"><tt><a href="man/sgi2tiff.1.html">sgi2tiff</a></tt></td>
<td>A program to convert SGI image files to TIFF. This program is
only useful on SGI machines as it uses <tt>-limage</tt>.</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>thumbnail</tt></td>
+<td valign="top" width="10%"><tt><a href="man/thumbnail.1.html">thumbnail</a></tt></tt></td>
<td>Copy a bilevel TIFF to one that includes 8-bit greyscale
"thumbnail images" for each page; it is provided as an example of
how one might use the <tt>SubIFD</tt> tag (and the library support
for it)</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>tiff2bw</tt></td>
+<td valign="top" width="10%"><tt><a href="man/tiff2bw.1.html">tiff2bw</a></tt></td>
<td>A simple program to convert a color image to grayscale</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>tiff2pdf</tt></td>
+<td valign="top" width="10%"><tt><a href="man/tiff2pdf.1.html">tiff2pdf</a></tt></td>
<td>Convert TIFF images to PDF</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>tiff2ps</tt></td>
+<td valign="top" width="10%"><tt><a href="man/tiff2ps.1.html">tiff2ps</a></tt></td>
<td>Convert TIFF images to PostScript</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>tiff2rgba</tt></td>
+<td valign="top" width="10%"><tt><a href="man/tiff2rgba.1.html">tiff2rgba</a></tt></td>
<td>Convert a TIFF image to RGBA color space</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>tiffcmp</tt></td>
+<td valign="top" width="10%"><tt><a href="man/tiffcmp.1.html">tiffcmp</a></tt></td>
<td>Compare the contents of two TIFF files (it does not check all
the directory information, but does check all the data)</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>tiffcp</tt></td>
+<td valign="top" width="10%"><tt><a href="man/tiffcp.1.html">tiffcp</a></tt></td>
<td>Copy, concatenate, and convert TIFF images (e.g. switching from
Compression=5 to Compression=1)</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>tiffdither</tt></td>
+<td valign="top" width="10%"><tt><a href="man/tiffcrop.1.html">tiffcrop</a></tt></td>
+<td>Provides selection of images from within one or more multi-image
+TIFF files, with orthogonal rotation, mirroring, cropping, and
+extraction of multiple sections and exporting to one or more files.
+It extends the functionality of tiffcp to support additional bit
+depths in strips and tiles and enhances the selection capabilities of
+tiffsplit. Bilevel images can be inverted and images may be split into
+segments to fit on multiple /pages/ (standard paper sizes), plus other
+functions described in the tiffcrop man page</td>
+</tr>
+<tr>
+<td valign="top" width="10%"><tt><a href="man/tiffdither.1.html">tiffdither</a></tt></td>
<td>Dither a b&amp;w image into a bilevel image (suitable for use
in creating fax files)</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>tiffdump</tt></td>
+<td valign="top" width="10%"><tt><a href="man/tiffdump.1.html">tiffdump</a></tt></td>
<td>Display the verbatim contents of the TIFF directory in a file
(it's very useful for debugging bogus files that you may get from
someone that claims they support TIFF)</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>tiffinfo</tt></td>
+<td valign="top" width="10%"><tt><a href="man/tiffinfo.1.html">tiffinfo</a></tt></td>
<td>Display information about one or more TIFF files.</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>tiffmedian</tt></td>
+<td valign="top" width="10%"><tt><a href="man/tiffmedian.1.html">tiffmedian</a></tt></td>
<td>A version of Paul Heckbert's median cut program that reads an
-RGB TIFF image, and creates a TIFF palette file as a result; it's
-useful for converting full-color RGB images to 8-bit color for your
-friends that have cheapo 8-bit framebuffers.</td>
+RGB TIFF image, and creates a TIFF palette file as a result</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>tiffset</tt></td>
+<td valign="top" width="10%"><tt><a href="man/tiffset.1.html">tiffset</a></tt></td>
<td>Set a field in a TIFF header</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt>tiffsplit</tt></td>
+<td valign="top" width="10%"><tt><a href="man/tiffsplit.1.html">tiffsplit</a></tt></td>
<td>Create one or more single-image files from a (possibly)
multi-image file</td>
</tr>
@@ -150,6 +159,6 @@ multi-image file</td>
<p>Check out the manual pages for details about the above
programs.</p>
<hr>
-Last updated: $Date: 2006/01/03 02:16:07 $
+Last updated: $Date: 2009-10-28 22:13:58 $
</body>
</html>
diff --git a/src/3rdparty/libtiff/html/v3.9.0beta.html b/src/3rdparty/libtiff/html/v3.9.0beta.html
new file mode 100644
index 0000000000..053b34ab52
--- /dev/null
+++ b/src/3rdparty/libtiff/html/v3.9.0beta.html
@@ -0,0 +1,304 @@
+<HTML>
+<HEAD>
+<TITLE>
+ Changes in TIFF v3.9.0beta
+</TITLE>
+</HEAD>
+
+<BODY BGCOLOR=white>
+<FONT FACE="Helvetica, Arial, Sans">
+<FONT FACE="Helvetica, Arial, Sans">
+
+<BASEFONT SIZE=4>
+<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
+<BASEFONT SIZE=3>
+
+<UL>
+<HR SIZE=4 WIDTH=65% ALIGN=left>
+<B>Current Version</B>: v3.9.0beta<BR>
+<B>Previous Version</B>: <A HREF=v3.8.2.html>v3.8.2</a><BR>
+<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
+ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
+http://www.remotesensing.org/libtiff</a>
+<HR SIZE=4 WIDTH=65% ALIGN=left>
+</UL>
+
+<P>
+This document describes the changes made to the software between the
+<I>previous</I> and <I>current</I> versions (see above).
+If you don't find something listed here, then it was not done in this
+timeframe, or it was not considered important enough to be mentioned.
+The following information is located here:
+<UL>
+<LI><A HREF="#hightlights">Major Changes</A>
+<LI><A HREF="#configure">Changes in the software configuration</A>
+<LI><A HREF="#libtiff">Changes in libtiff</A>
+<LI><A HREF="#tools">Changes in the tools</A>
+<LI><A HREF="#contrib">Changes in the contrib area</A>
+</UL>
+<p>
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="highlights"><B><FONT SIZE=+3>M</FONT>AJOR CHANGES:</B></A>
+
+<UL>
+ <li> New <b>tiffcrop</b> utility contributed by Richard Nolde.
+ <b>tiffcrop</b> does the same as <b>tiffcp</b>, but also can crop,
+ extract, rotate and mirror images.
+
+ <li> tif_jbig.c: Added support for JBIG compression scheme
+ (34661 code), contributed by Lee Howard.
+
+ <li> Totally new implementation of OJPEG module from
+ Joris Van Damme. No need to patch libjpeg anymore. Many OJPEG files
+ should be supported now that was not supported previously.
+
+</UL>
+
+
+<P><HR WIDTH=65% ALIGN=left>
+<!--------------------------------------------------------------------------->
+
+<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
+
+<UL>
+
+ <li> tif_config.wince.h, tiffconf.wince.h, tif_wince.c: WinCE-specific
+ compatibility stuff from Mateusz Loskot.
+
+ <li> Rename config.h.vc and tif_config.h.vc to config.vc.h and
+ tif_config.vc.h for easier identification by folks using an IDE.
+
+ <li> configure, configure.ac: OJPEG support enabled by default (i.e.,
+ whe the conformant JPEG support enabled).
+
+ <li> README.vms, Makefile.am, configure.com, libtiff/{Makefile.am,
+ tif_config.h-vms, tif_stream.cxx, tif_vms.c, tiffconf.h-vms}:
+ Added support for OpenVMS by Alexey Chupahin.
+
+ <li> nmake.opt: use /EHsc for VS2005 compatibility. Also define
+ _CRT_SECURE_NO_DEPRECATE to avoid noise on VS2005.
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
+
+<UL>
+ <li> tif_dirinfo.c (_TIFFFindFieldInfo): Don't attempt to
+ bsearch() on a NULL fieldinfo list.
+ (_TIFFFindFieldInfoByName): Don't attempt to lfind() on a NULL
+ fieldinfo list.
+
+ <li> tif_jpeg.c: Changed JPEGInitializeLibJPEG() so that it
+ will convert from decompressor to compressor or compress to decompress
+ if required by the force arguments. This works around a problem in
+ where the JPEGFixupTestSubsampling() may cause a decompressor to
+ be setup on a directory when later a compressor is required with the
+ force flag set. Occurs with the addtiffo program for instance.
+
+ <li> tif_dirwrite.c: Fixed swapping of byte arrays stored
+ in-place in tag offsets as per bug
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=1363">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1363</a>
+
+ <li> tif_getimage.c: workaround for 'Fractional scanline' error
+ reading OJPEG images with rowsperstrip that is not a multiple of
+ vertical subsampling factor. This bug is mentioned in
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=1390">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1390</a> and
+ <a href="http://www.asmail.be/msg0054766825.html">
+ http://www.asmail.be/msg0054766825.html</a>
+
+ <li> tif_dirread.c: Added special function to handle
+ SubjectDistance EXIF tag as per bug
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=1362">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1362</a>
+
+ <li> tif_dirread.c, tif_read.c: Type of the byte counters
+ changed from tsize_t to uint32 to be able to work with data arrays
+ larger than 2GB. Fixes bug
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=890">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=89</a>
+ Idea submitted by Matt Hancher.
+
+ <li> tif_dir.c: Workaround for incorrect TIFFs with
+ ExtraSamples == 999 produced by Corel Draw. As per bug
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=1490">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1490</a>
+
+ <li> tif_write.c: TIFFAppendToStrip() - clear sorted flag if
+ we move a strip.
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=1359">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1359</a>
+
+ <li> tif_fax3.c: Save the state of printdir codec dependent method.
+
+ <li> tif_jpeg.c: Save the state of printdir codec dependent method
+ as per bug
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=1273">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1273</a>
+
+ <li> tif_win32.c: Fixed problem with offset value manipulation
+ as per bug
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=1322">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1322</a>
+
+ <li> tif_fax3.c, tif_next.c, tif_pixarlog.c: Fixed multiple
+ vulnerabilities, as per Gentoo bug ():
+ <a href="http://bugs.gentoo.org/show_bug.cgi?id=142383">
+ http://bugs.gentoo.org/show_bug.cgi?id=142383</a>
+
+ <li> tif_lzw.c, tif_zip.c: Fixed problems with mixing
+ encoding and decoding on the same read-write TIFF handle. The LZW
+ code can now maintain encode and decode state at the same time. The
+ ZIP code will switch back and forth as needed.
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=757">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=757</a>
+
+ <li> tif_msdos.c: Avoid handle leak for failed opens.
+ c/o Thierry Pierron
+
+ <li> tif_dirwrite.c: take care not to flush out buffer of strip/tile
+ data in _TIFFWriteDirectory if TIFF_BEENWRITING not set. Relates
+ to bug report by Peng Gao with black strip at bottom of images.
+
+ <li> tif_dirwrite.c: make sure to use uint32 for wordcount in
+ TIFFWriteNormanTag if writecount is VARIABLE2 for ASCII fields.
+ It already seems to have been done for other field types. Needed
+ for "tiffset" on files with geotiff ascii text.
+
+ <li> tif_dirinfo.c: Added missed EXIF tag ColorSpace (40961).
+
+ <li> tif_dirread.c: Move IFD fetching code in the separate
+ function TIFFFetchDirectory() avoiding code duplication in
+ TIFFReadDirectory() and TIFFReadCustomDirectory().
+
+ <li>tif_readdir.c: Added case in EstimateStripByteCounts() for tiled
+ files. Modified TIFFReadDirectory() to not invoke
+ EstimateStripByteCounts() for case where entry 0 and 1 are unequal but
+ one of them is zero.
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=1204">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1204</a>
+
+ <li> tif_open.c, tif_dirread.c, tiffiop.h: Move IFD looping
+ checking code in the separate function TIFFCheckDirOffset().
+
+ <li> tif_aux.c: Added _TIFFCheckRealloc() function.
+
+ <li> tif_fax3.c: Fixed problems in fax decoder as per bug
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=1194">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1194</a>
+
+ <li> tif_jbig.c: Added support for JBIG compression scheme
+ (34661 code) contributed by Lee Howard. As per bug
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=896">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=896</a>
+
+ <li> tif_getimage.c: Added support for planarconfig separate
+ non-subsampled YCbCr (i.e. separate YCbCr with subsampling [1,1]).
+
+ <li> tif_getimage.c: Revision of all RGB(A) put routines:
+ <ul>
+ <li> Conversion of unassociated alpha to associated alpha
+ now done with more performant LUT, and calculation more
+ correct.
+ <li> Conversion of 16bit data to 8bit data now done with
+ more performant LUT, and calculation more correct
+ <li> Bugfix of handling of 16bit RGB with unassociated alpha
+ </ul>
+
+ <li> tif_ojpeg.c: totally new implementation
+
+ <li> tif_getimage.c: removed TIFFTAG_JPEGCOLORMODE handling
+ of OJPEG images in favor of tif_getimage.c native handling of
+ YCbCr and desubsampling.
+
+ <li> tif_jpeg.c: JPEGVSetField() so that altering the photometric
+ interpretation causes the "upsampled" flag to be recomputed. Fixes
+ peculiar bug where photometric flag had to be set before jpegcolormode
+ flag.
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!-------------------------------------------------------------------------->
+
+<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
+
+<UL>
+ <li> tiff2ps.c: Added support 16-bit images as per bug
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=1566">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1566</a>.
+ Patch from William Bader.
+
+ <li> tiff2pdf.c: Fix for TIFFTAG_JPEGTABLES tag fetching and
+ significant upgrade of the whole utility as per bug
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=1560">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1560</a>.
+ Now we don't need tiffiop.h in tiff2pdf anymore and will open output
+ PDF file using TIFFClientOpen() machinery as it is implemented
+ by Leon Bottou.
+
+ <li> tiffcrop.c: New tiffcrop utility contributed
+ by Richard Nolde. As per bug
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=1383">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1383</a>
+
+ <li> tiff2pdf.c: Do not assume inches when the resolution units
+ do not specified. As per bug
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=1366">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1366</a>
+
+ <li> tiffset.c: Properly handle tags with TIFF_VARIABLE writecount.
+ As per bug
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=1350">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1350</a>
+
+ <li> tif2rgba.c: This utility does not work properly on big-endian
+ architectures. It was fixed including the bug
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=1149">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1149</a>
+
+ <li> tiff2pdf.c: Fix handling of -q values.
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=587">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=587</a>
+
+ <li> tiffcmp.c: Fixed floating point comparison logic as per bug
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=1191">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1191</a>
+
+ <li> tiff2pdf.c: Fixed buffer overflow condition in
+ t2p_write_pdf_string() as per bug
+ <a href="http://bugzilla.remotesensing.org/show_bug.cgi?id=1196">
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1196</a>
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIB AREA:</B></A>
+
+<UL>
+
+ <li> contrib/addtiffo/tif_overview.c: Fix problems with odd sized
+ output blocks in TIFF_DownSample_Subsampled() (bug 1542).
+
+ <li> contrib/dbs/xtiff/xtiff.c: Make xtiff utility compilable.
+ Though it is still far from the state of being working and useful.
+
+</UL>
+
+Last updated $Date: 2007/07/13 13:40:12 $.
+
+</BODY>
+</HTML>
diff --git a/src/3rdparty/libtiff/html/v3.9.1.html b/src/3rdparty/libtiff/html/v3.9.1.html
new file mode 100644
index 0000000000..93228483bd
--- /dev/null
+++ b/src/3rdparty/libtiff/html/v3.9.1.html
@@ -0,0 +1,115 @@
+<HTML>
+<HEAD>
+<TITLE>
+ Changes in TIFF v3.9.1
+</TITLE>
+</HEAD>
+
+<BODY BGCOLOR=white>
+<FONT FACE="Helvetica, Arial, Sans">
+<FONT FACE="Helvetica, Arial, Sans">
+
+<BASEFONT SIZE=4>
+<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
+<BASEFONT SIZE=3>
+
+<UL>
+<HR SIZE=4 WIDTH=65% ALIGN=left>
+<B>Current Version</B>: v3.9.1<BR>
+<B>Previous Version</B>: <A HREF=v3.9.1.html>v3.9.1</a><BR>
+<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
+ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
+http://www.remotesensing.org/libtiff</a>
+<HR SIZE=4 WIDTH=65% ALIGN=left>
+</UL>
+
+<P>
+This document describes the changes made to the software between the
+<I>previous</I> and <I>current</I> versions (see above). If you don't
+find something listed here, then it was not done in this timeframe, or
+it was not considered important enough to be mentioned. The following
+information is located here:
+<UL>
+<LI><A HREF="#hightlights">Major Changes</A>
+<LI><A HREF="#configure">Changes in the software configuration</A>
+<LI><A HREF="#libtiff">Changes in libtiff</A>
+<LI><A HREF="#tools">Changes in the tools</A>
+<LI><A HREF="#contrib">Changes in the contrib area</A>
+</UL>
+<p>
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="highlights"><B><FONT SIZE=+3>M</FONT>AJOR CHANGES:</B></A>
+
+<UL>
+ <li> This is a bug-fix release for several bugs (two of which
+ are dire) which were discovered in the 3.9.0 release.
+
+</UL>
+
+
+<P><HR WIDTH=65% ALIGN=left>
+<!--------------------------------------------------------------------------->
+
+<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
+
+<UL>
+
+ <li> Several defines were missing from tif_config.vc.h which
+ are necessary to compile the library using MSVC.
+
+ <li> Colorized tests were actually not enabled as expected.
+ Parallel tests mode is now also enabled so that tests can be
+ run in parallel, and test output is sent to .log files.
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
+
+<UL>
+ <li> libtiff/tif_write.c (TIFFAppendToStrip): Remove cast
+ which caused libtiff to output a wrong last strip with
+ byte-count and strip-offset of zero. This cast was added on
+ the day of the 3.9.0 release.
+
+ <li> libtiff/tif_dirwrite.c: Back out changes from 2007-11-22
+ that resulted in the final strip not being written in some
+ circumstances.
+ http://bugzilla.maptools.org/show_bug.cgi?id=2088
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!-------------------------------------------------------------------------->
+
+<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
+
+<UL>
+ <li> None
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIB AREA:</B></A>
+
+<UL>
+
+ <li> None
+
+</UL>
+
+Last updated $Date: 2009-08-28 18:49:02 $.
+
+</BODY>
+</HTML>
diff --git a/src/3rdparty/libtiff/html/v3.9.2.html b/src/3rdparty/libtiff/html/v3.9.2.html
new file mode 100644
index 0000000000..2f390c838d
--- /dev/null
+++ b/src/3rdparty/libtiff/html/v3.9.2.html
@@ -0,0 +1,122 @@
+<HTML>
+<HEAD>
+<TITLE>
+ Changes in TIFF v3.9.2
+</TITLE>
+</HEAD>
+
+<BODY BGCOLOR=white>
+<FONT FACE="Helvetica, Arial, Sans">
+<FONT FACE="Helvetica, Arial, Sans">
+
+<BASEFONT SIZE=4>
+<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
+<BASEFONT SIZE=3>
+
+<UL>
+<HR SIZE=4 WIDTH=65% ALIGN=left>
+<B>Current Version</B>: v3.9.2<BR>
+<B>Previous Version</B>: <A HREF=v3.9.1.html>v3.9.1</a><BR>
+<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
+ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
+http://www.remotesensing.org/libtiff</a>
+<HR SIZE=4 WIDTH=65% ALIGN=left>
+</UL>
+
+<P>
+This document describes the changes made to the software between the
+<I>previous</I> and <I>current</I> versions (see above). If you don't
+find something listed here, then it was not done in this timeframe, or
+it was not considered important enough to be mentioned. The following
+information is located here:
+<UL>
+<LI><A HREF="#hightlights">Major Changes</A>
+<LI><A HREF="#configure">Changes in the software configuration</A>
+<LI><A HREF="#libtiff">Changes in libtiff</A>
+<LI><A HREF="#tools">Changes in the tools</A>
+<LI><A HREF="#contrib">Changes in the contrib area</A>
+</UL>
+<p>
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="highlights"><B><FONT SIZE=+3>M</FONT>AJOR CHANGES:</B></A>
+
+<UL>
+
+ <li> Fixes a number of bugs present in the 3.9.1 release.
+
+ <li> OJPEG support updated to work with IJG JPEG 7 release.
+
+ <li> Tiffcrop validated for most TIFF storage subformats and sample depths.
+
+</UL>
+
+
+<P><HR WIDTH=65% ALIGN=left>
+<!--------------------------------------------------------------------------->
+
+<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
+
+<UL>
+
+ <li> x86_64 now uses the same default fill order as i386.
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
+
+<UL>
+ <li> Writing tags with an array value of type TIFF_DOUBLE now
+ returns correct error status. The TIFFTAG_SMINSAMPLEVALUE and
+ TIFFTAG_SMAXSAMPLEVALUE tags failed to write without this fix.
+
+ <li> OJPEG decoder now works with IJG JPEG 7. Resolves "Bug
+ 2090 - OJPEG crash with libjpeg v7".
+ http://bugzilla.maptools.org/show_bug.cgi?id=2090
+
+ <li> Eliminate most GCC "dereferencing type-punned pointer"
+ warnings.
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!-------------------------------------------------------------------------->
+
+<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
+
+<UL>
+
+ <li> New tiffcrop from Richard Nolde. Major updates to add
+ significant functionality for reading and writing tile based
+ images with bit depths not a multiple of 8 which cannot be
+ handled by tiffcp.
+
+ <li> Allow building tools with GCC using the "-Wformat
+ -Werror=format-security" flags.
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIB AREA:</B></A>
+
+<UL>
+
+ <li> None
+
+</UL>
+
+Last updated $Date: 2009-08-28 18:49:02 $.
+
+</BODY>
+</HTML>
diff --git a/src/3rdparty/libtiff/libtiff/Makefile.am b/src/3rdparty/libtiff/libtiff/Makefile.am
deleted file mode 100644
index a8780c7cf6..0000000000
--- a/src/3rdparty/libtiff/libtiff/Makefile.am
+++ /dev/null
@@ -1,138 +0,0 @@
-# Tag Image File Format (TIFF) Software
-#
-# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-#
-# Permission to use, copy, modify, distribute, and sell this software and
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-#
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-#
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-
-# Process this file with automake to produce Makefile.in.
-
-LIBPORT = $(top_builddir)/port/libport.la
-LIBTIFF = $(top_builddir)/libtiff/libtiff.la
-
-EXTRA_DIST = Makefile.vc SConstruct tif_config.h.vc tiffconf.h.vc libtiff.def \
- $(EXTRA_SRCS)
-
-HDRS = \
- tiff.h \
- tiffconf.h \
- tiffio.h \
- tiffvers.h
-
-if HAVE_CXX
-HDRS += tiffio.hxx
-endif
-
-EXTRA_HDRS = \
- t4.h \
- tif_dir.h \
- tif_predict.h \
- tiffiop.h \
- uvcode.h
-
-SRCS = \
- tif_aux.c \
- tif_close.c \
- tif_codec.c \
- tif_color.c \
- tif_compress.c \
- tif_dir.c \
- tif_dirinfo.c \
- tif_dirread.c \
- tif_dirwrite.c \
- tif_dumpmode.c \
- tif_error.c \
- tif_extension.c \
- tif_fax3.c \
- tif_fax3sm.c \
- tif_flush.c \
- tif_getimage.c \
- tif_jpeg.c \
- tif_luv.c \
- tif_lzw.c \
- tif_next.c \
- tif_ojpeg.c \
- tif_open.c \
- tif_packbits.c \
- tif_pixarlog.c \
- tif_predict.c \
- tif_print.c \
- tif_read.c \
- tif_strip.c \
- tif_swab.c \
- tif_thunder.c \
- tif_tile.c \
- tif_unix.c \
- tif_version.c \
- tif_warning.c \
- tif_write.c \
- tif_zip.c
-
-SRCSXX = \
- tif_stream.cxx
-
-EXTRA_SRCS = \
- tif_acorn.c \
- tif_apple.c \
- tif_atari.c \
- tif_msdos.c \
- tif_next.c \
- tif_win3.c \
- tif_win32.c
-
-libtiffincludedir = $(includedir)
-libtiffinclude_HEADERS = $(HDRS)
-noinst_HEADERS = $(EXTRA_HDRS)
-
-lib_LTLIBRARIES = libtiff.la
-if HAVE_CXX
-lib_LTLIBRARIES += libtiffxx.la
-endif
-
-libtiff_la_SOURCES = $(SRCS)
-libtiff_la_LDFLAGS = \
- -no-undefined \
- -version-number $(LIBTIFF_VERSION_INFO)
-if HAVE_RPATH
-libtiff_la_LDFLAGS += $(LIBDIR)
-endif
-libtiff_la_LIBADD = $(LIBPORT)
-
-libtiffxx_la_SOURCES = $(SRCSXX)
-libtiffxx_la_LDFLAGS = \
- -no-undefined \
- -version-number $(LIBTIFF_VERSION_INFO)
-if HAVE_RPATH
-libtiffxx_la_LDFLAGS += $(LIBDIR)
-endif
-libtiffxx_la_LIBADD = $(LIBTIFF) $(LIBPORT)
-libtiffxx_la_DEPENDENCIES = libtiff.la
-
-#
-# The finite state machine tables used by the G3/G4 decoders
-# are generated by the mkg3states program. On systems without
-# make these rules have to be manually carried out.
-#
-noinst_PROGRAMS = mkg3states
-mkg3states_SOURCES = mkg3states.c tif_fax3.h
-mkg3states_LDADD = $(LIBPORT)
-
-faxtable: mkg3states
- (rm -f tif_fax3sm.c && ./mkg3states -b -c const tif_fax3sm.c)
-
diff --git a/src/3rdparty/libtiff/libtiff/Makefile.in b/src/3rdparty/libtiff/libtiff/Makefile.in
deleted file mode 100644
index b313e40f64..0000000000
--- a/src/3rdparty/libtiff/libtiff/Makefile.in
+++ /dev/null
@@ -1,763 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# Tag Image File Format (TIFF) Software
-#
-# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-#
-# Permission to use, copy, modify, distribute, and sell this software and
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-#
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-#
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-
-# Process this file with automake to produce Makefile.in.
-
-
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-@HAVE_CXX_TRUE@am__append_1 = tiffio.hxx
-@HAVE_CXX_TRUE@am__append_2 = libtiffxx.la
-@HAVE_RPATH_TRUE@am__append_3 = $(LIBDIR)
-@HAVE_RPATH_TRUE@am__append_4 = $(LIBDIR)
-noinst_PROGRAMS = mkg3states$(EXEEXT)
-subdir = libtiff
-DIST_COMMON = $(am__libtiffinclude_HEADERS_DIST) $(noinst_HEADERS) \
- $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/tif_config.h.in $(srcdir)/tiffconf.h.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = tif_config.h tiffconf.h
-CONFIG_CLEAN_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(libdir)" \
- "$(DESTDIR)$(libtiffincludedir)"
-libLTLIBRARIES_INSTALL = $(INSTALL)
-LTLIBRARIES = $(lib_LTLIBRARIES)
-am__DEPENDENCIES_1 = $(top_builddir)/port/libport.la
-libtiff_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_1 = tif_aux.lo tif_close.lo tif_codec.lo tif_color.lo \
- tif_compress.lo tif_dir.lo tif_dirinfo.lo tif_dirread.lo \
- tif_dirwrite.lo tif_dumpmode.lo tif_error.lo tif_extension.lo \
- tif_fax3.lo tif_fax3sm.lo tif_flush.lo tif_getimage.lo \
- tif_jpeg.lo tif_luv.lo tif_lzw.lo tif_next.lo tif_ojpeg.lo \
- tif_open.lo tif_packbits.lo tif_pixarlog.lo tif_predict.lo \
- tif_print.lo tif_read.lo tif_strip.lo tif_swab.lo \
- tif_thunder.lo tif_tile.lo tif_unix.lo tif_version.lo \
- tif_warning.lo tif_write.lo tif_zip.lo
-am_libtiff_la_OBJECTS = $(am__objects_1)
-libtiff_la_OBJECTS = $(am_libtiff_la_OBJECTS)
-am__DEPENDENCIES_2 = $(top_builddir)/libtiff/libtiff.la
-am__objects_2 = tif_stream.lo
-am_libtiffxx_la_OBJECTS = $(am__objects_2)
-libtiffxx_la_OBJECTS = $(am_libtiffxx_la_OBJECTS)
-@HAVE_CXX_TRUE@am_libtiffxx_la_rpath = -rpath $(libdir)
-PROGRAMS = $(noinst_PROGRAMS)
-am_mkg3states_OBJECTS = mkg3states.$(OBJEXT)
-mkg3states_OBJECTS = $(am_mkg3states_OBJECTS)
-mkg3states_DEPENDENCIES = $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I. -I.
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libtiff_la_SOURCES) $(libtiffxx_la_SOURCES) \
- $(mkg3states_SOURCES)
-DIST_SOURCES = $(libtiff_la_SOURCES) $(libtiffxx_la_SOURCES) \
- $(mkg3states_SOURCES)
-am__libtiffinclude_HEADERS_DIST = tiff.h tiffconf.h tiffio.h \
- tiffvers.h tiffio.hxx
-libtiffincludeHEADERS_INSTALL = $(INSTALL_HEADER)
-HEADERS = $(libtiffinclude_HEADERS) $(noinst_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GLUT_CFLAGS = @GLUT_CFLAGS@
-GLUT_LIBS = @GLUT_LIBS@
-GLU_CFLAGS = @GLU_CFLAGS@
-GLU_LIBS = @GLU_LIBS@
-GL_CFLAGS = @GL_CFLAGS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
-HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
-HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
-HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
-HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
-HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBDIR = @LIBDIR@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
-LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
-LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
-LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
-LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
-LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
-LIBTIFF_VERSION = @LIBTIFF_VERSION@
-LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-NM = @NM@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-X_CFLAGS = @X_CFLAGS@
-X_EXTRA_LIBS = @X_EXTRA_LIBS@
-X_LIBS = @X_LIBS@
-X_PRE_LIBS = @X_PRE_LIBS@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-acx_pthread_config = @acx_pthread_config@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-LIBPORT = $(top_builddir)/port/libport.la
-LIBTIFF = $(top_builddir)/libtiff/libtiff.la
-EXTRA_DIST = Makefile.vc SConstruct tif_config.h.vc tiffconf.h.vc libtiff.def \
- $(EXTRA_SRCS)
-
-HDRS = tiff.h tiffconf.h tiffio.h tiffvers.h $(am__append_1)
-EXTRA_HDRS = \
- t4.h \
- tif_dir.h \
- tif_predict.h \
- tiffiop.h \
- uvcode.h
-
-SRCS = \
- tif_aux.c \
- tif_close.c \
- tif_codec.c \
- tif_color.c \
- tif_compress.c \
- tif_dir.c \
- tif_dirinfo.c \
- tif_dirread.c \
- tif_dirwrite.c \
- tif_dumpmode.c \
- tif_error.c \
- tif_extension.c \
- tif_fax3.c \
- tif_fax3sm.c \
- tif_flush.c \
- tif_getimage.c \
- tif_jpeg.c \
- tif_luv.c \
- tif_lzw.c \
- tif_next.c \
- tif_ojpeg.c \
- tif_open.c \
- tif_packbits.c \
- tif_pixarlog.c \
- tif_predict.c \
- tif_print.c \
- tif_read.c \
- tif_strip.c \
- tif_swab.c \
- tif_thunder.c \
- tif_tile.c \
- tif_unix.c \
- tif_version.c \
- tif_warning.c \
- tif_write.c \
- tif_zip.c
-
-SRCSXX = \
- tif_stream.cxx
-
-EXTRA_SRCS = \
- tif_acorn.c \
- tif_apple.c \
- tif_atari.c \
- tif_msdos.c \
- tif_next.c \
- tif_win3.c \
- tif_win32.c
-
-libtiffincludedir = $(includedir)
-libtiffinclude_HEADERS = $(HDRS)
-noinst_HEADERS = $(EXTRA_HDRS)
-lib_LTLIBRARIES = libtiff.la $(am__append_2)
-libtiff_la_SOURCES = $(SRCS)
-libtiff_la_LDFLAGS = -no-undefined -version-number \
- $(LIBTIFF_VERSION_INFO) $(am__append_3)
-libtiff_la_LIBADD = $(LIBPORT)
-libtiffxx_la_SOURCES = $(SRCSXX)
-libtiffxx_la_LDFLAGS = -no-undefined -version-number \
- $(LIBTIFF_VERSION_INFO) $(am__append_4)
-libtiffxx_la_LIBADD = $(LIBTIFF) $(LIBPORT)
-libtiffxx_la_DEPENDENCIES = libtiff.la
-mkg3states_SOURCES = mkg3states.c tif_fax3.h
-mkg3states_LDADD = $(LIBPORT)
-all: tif_config.h tiffconf.h
- $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .cxx .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libtiff/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign libtiff/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-tif_config.h: stamp-h1
- @if test ! -f $@; then \
- rm -f stamp-h1; \
- $(MAKE) stamp-h1; \
- else :; fi
-
-stamp-h1: $(srcdir)/tif_config.h.in $(top_builddir)/config.status
- @rm -f stamp-h1
- cd $(top_builddir) && $(SHELL) ./config.status libtiff/tif_config.h
-$(srcdir)/tif_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_srcdir) && $(AUTOHEADER)
- rm -f stamp-h1
- touch $@
-
-tiffconf.h: stamp-h2
- @if test ! -f $@; then \
- rm -f stamp-h2; \
- $(MAKE) stamp-h2; \
- else :; fi
-
-stamp-h2: $(srcdir)/tiffconf.h.in $(top_builddir)/config.status
- @rm -f stamp-h2
- cd $(top_builddir) && $(SHELL) ./config.status libtiff/tiffconf.h
-
-distclean-hdr:
- -rm -f tif_config.h stamp-h1 tiffconf.h stamp-h2
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
- @$(NORMAL_INSTALL)
- test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- if test -f $$p; then \
- f=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
- $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
- else :; fi; \
- done
-
-uninstall-libLTLIBRARIES:
- @$(NORMAL_UNINSTALL)
- @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- p=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
- $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
- done
-
-clean-libLTLIBRARIES:
- -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
-libtiff.la: $(libtiff_la_OBJECTS) $(libtiff_la_DEPENDENCIES)
- $(LINK) -rpath $(libdir) $(libtiff_la_LDFLAGS) $(libtiff_la_OBJECTS) $(libtiff_la_LIBADD) $(LIBS)
-libtiffxx.la: $(libtiffxx_la_OBJECTS) $(libtiffxx_la_DEPENDENCIES)
- $(CXXLINK) $(am_libtiffxx_la_rpath) $(libtiffxx_la_LDFLAGS) $(libtiffxx_la_OBJECTS) $(libtiffxx_la_LIBADD) $(LIBS)
-
-clean-noinstPROGRAMS:
- @list='$(noinst_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
-mkg3states$(EXEEXT): $(mkg3states_OBJECTS) $(mkg3states_DEPENDENCIES)
- @rm -f mkg3states$(EXEEXT)
- $(LINK) $(mkg3states_LDFLAGS) $(mkg3states_OBJECTS) $(mkg3states_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkg3states.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_aux.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_close.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_codec.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_color.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_compress.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dir.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dirinfo.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dirread.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dirwrite.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dumpmode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_error.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_extension.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_fax3.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_fax3sm.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_flush.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_getimage.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_jpeg.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_luv.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_lzw.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_next.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_ojpeg.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_open.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_packbits.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_pixarlog.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_predict.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_print.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_read.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_stream.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_strip.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_swab.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_thunder.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_tile.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_unix.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_version.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_warning.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_write.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_zip.Plo@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-
-.cxx.o:
-@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
-
-.cxx.obj:
-@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.cxx.lo:
-@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-install-libtiffincludeHEADERS: $(libtiffinclude_HEADERS)
- @$(NORMAL_INSTALL)
- test -z "$(libtiffincludedir)" || $(mkdir_p) "$(DESTDIR)$(libtiffincludedir)"
- @list='$(libtiffinclude_HEADERS)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(libtiffincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libtiffincludedir)/$$f'"; \
- $(libtiffincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libtiffincludedir)/$$f"; \
- done
-
-uninstall-libtiffincludeHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(libtiffinclude_HEADERS)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(libtiffincludedir)/$$f'"; \
- rm -f "$(DESTDIR)$(libtiffincludedir)/$$f"; \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) tif_config.h.in tiffconf.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) tif_config.h.in tiffconf.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) tif_config.h.in tiffconf.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) tif_config.h.in tiffconf.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) tif_config.h \
- tiffconf.h
-installdirs:
- for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libtiffincludedir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
- clean-noinstPROGRAMS mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-hdr distclean-libtool distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am: install-libtiffincludeHEADERS
-
-install-exec-am: install-libLTLIBRARIES
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
- uninstall-libtiffincludeHEADERS
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \
- distclean distclean-compile distclean-generic distclean-hdr \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-libLTLIBRARIES \
- install-libtiffincludeHEADERS install-man install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am \
- uninstall-libLTLIBRARIES uninstall-libtiffincludeHEADERS
-
-
-faxtable: mkg3states
- (rm -f tif_fax3sm.c && ./mkg3states -b -c const tif_fax3sm.c)
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/3rdparty/libtiff/libtiff/Makefile.vc b/src/3rdparty/libtiff/libtiff/Makefile.vc
deleted file mode 100644
index e0b61f5309..0000000000
--- a/src/3rdparty/libtiff/libtiff/Makefile.vc
+++ /dev/null
@@ -1,98 +0,0 @@
-# $Id: Makefile.vc,v 1.15 2006/03/23 14:54:02 dron Exp $
-#
-# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-#
-# Permission to use, copy, modify, distribute, and sell this software and
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-#
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-#
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-#
-# Makefile for MS Visual C and Watcom C compilers.
-#
-# To build:
-# C:\libtiff\libtiff> nmake /f makefile.vc all
-#
-
-!INCLUDE ..\nmake.opt
-
-INCL = -I. $(JPEG_INCLUDE) $(ZLIB_INCLUDE)
-
-!IFDEF USE_WIN_CRT_LIB
-OBJ_SYSDEP_MODULE = tif_unix.obj
-!ELSE
-OBJ_SYSDEP_MODULE = tif_win32.obj
-!ENDIF
-
-OBJ = \
- tif_aux.obj \
- tif_close.obj \
- tif_codec.obj \
- tif_color.obj \
- tif_compress.obj \
- tif_dir.obj \
- tif_dirinfo.obj \
- tif_dirread.obj \
- tif_dirwrite.obj \
- tif_dumpmode.obj \
- tif_error.obj \
- tif_extension.obj \
- tif_fax3.obj \
- tif_fax3sm.obj \
- tif_getimage.obj \
- tif_jpeg.obj \
- tif_ojpeg.obj \
- tif_flush.obj \
- tif_luv.obj \
- tif_lzw.obj \
- tif_next.obj \
- tif_open.obj \
- tif_packbits.obj \
- tif_pixarlog.obj \
- tif_predict.obj \
- tif_print.obj \
- tif_read.obj \
- tif_stream.obj \
- tif_swab.obj \
- tif_strip.obj \
- tif_thunder.obj \
- tif_tile.obj \
- tif_version.obj \
- tif_warning.obj \
- tif_write.obj \
- tif_zip.obj \
- $(OBJ_SYSDEP_MODULE)
-
-all: libtiff.lib $(DLLNAME)
-
-tif_config.h: tif_config.h.vc
- copy tif_config.h.vc tif_config.h
-
-tiffconf.h: tiffconf.h.vc
- copy tiffconf.h.vc tiffconf.h
-
-libtiff.lib: tif_config.h tiffconf.h $(OBJ)
- $(AR) /out:libtiff.lib $(OBJ) $(LIBS)
-
-$(DLLNAME): tif_config.h tiffconf.h libtiff.def $(OBJ)
- $(LD) /debug /dll /def:libtiff.def /out:$(DLLNAME) \
- /implib:libtiff_i.lib $(OBJ) $(LIBS)
-
-clean:
- -del *.obj
- -del *.lib
- -del *.dll
- -del *.exe
diff --git a/src/3rdparty/libtiff/libtiff/SConstruct b/src/3rdparty/libtiff/libtiff/SConstruct
index 421ab24670..cb6a7cc957 100644
--- a/src/3rdparty/libtiff/libtiff/SConstruct
+++ b/src/3rdparty/libtiff/libtiff/SConstruct
@@ -1,4 +1,4 @@
-# $Id: SConstruct,v 1.2 2006/03/23 14:54:02 dron Exp $
+# $Id: SConstruct,v 1.4 2007/02/24 15:03:50 dron Exp $
# Tag Image File Format (TIFF) Software
#
@@ -46,6 +46,7 @@ SRCS = [ \
'tif_fax3sm.c', \
'tif_flush.c', \
'tif_getimage.c', \
+ 'tif_jbig.c', \
'tif_jpeg.c', \
'tif_luv.c', \
'tif_lzw.c', \
@@ -69,3 +70,4 @@ SRCS = [ \
StaticLibrary('tiff', SRCS)
SharedLibrary('tiff', SRCS)
+
diff --git a/src/3rdparty/libtiff/libtiff/mkg3states.c b/src/3rdparty/libtiff/libtiff/mkg3states.c
index cb28720465..dd29ec82b7 100644
--- a/src/3rdparty/libtiff/libtiff/mkg3states.c
+++ b/src/3rdparty/libtiff/libtiff/mkg3states.c
@@ -1,4 +1,4 @@
-/* "$Id: mkg3states.c,v 1.9 2004/10/10 11:46:16 dron Exp $ */
+/* "$Id: mkg3states.c,v 1.10 2007/02/22 11:27:17 dron Exp $ */
/*
* Copyright (c) 1991-1997 Sam Leffler
@@ -41,6 +41,10 @@
#include "tif_fax3.h"
+#ifndef HAVE_GETOPT
+extern int getopt(int, char**, char*);
+#endif
+
#define streq(a,b) (strcmp(a,b) == 0)
/* NB: can't use names in tif_fax3.h 'cuz they are declared const */
diff --git a/src/3rdparty/libtiff/libtiff/tif_aux.c b/src/3rdparty/libtiff/libtiff/tif_aux.c
index 9b0c5c2239..43d591b38a 100644
--- a/src/3rdparty/libtiff/libtiff/tif_aux.c
+++ b/src/3rdparty/libtiff/libtiff/tif_aux.c
@@ -1,4 +1,4 @@
-/* $Id: tif_aux.c,v 1.19 2006/02/07 10:41:30 dron Exp $ */
+/* $Id: tif_aux.c,v 1.20 2006/06/08 14:24:13 dron Exp $ */
/*
* Copyright (c) 1991-1997 Sam Leffler
@@ -34,7 +34,8 @@
#include <math.h>
tdata_t
-_TIFFCheckMalloc(TIFF* tif, size_t nmemb, size_t elem_size, const char* what)
+_TIFFCheckRealloc(TIFF* tif, tdata_t buffer,
+ size_t nmemb, size_t elem_size, const char* what)
{
tdata_t cp = NULL;
tsize_t bytes = nmemb * elem_size;
@@ -43,12 +44,19 @@ _TIFFCheckMalloc(TIFF* tif, size_t nmemb, size_t elem_size, const char* what)
* XXX: Check for integer overflow.
*/
if (nmemb && elem_size && bytes / elem_size == nmemb)
- cp = _TIFFmalloc(bytes);
+ cp = _TIFFrealloc(buffer, bytes);
if (cp == NULL)
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "No space %s", what);
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "No space %s", what);
+
+ return cp;
+}
- return (cp);
+tdata_t
+_TIFFCheckMalloc(TIFF* tif, size_t nmemb, size_t elem_size, const char* what)
+{
+ return _TIFFCheckRealloc(tif, NULL, nmemb, elem_size, what);
}
static int
diff --git a/src/3rdparty/libtiff/libtiff/tif_close.c b/src/3rdparty/libtiff/libtiff/tif_close.c
index 52f53c0eb2..3623277414 100644
--- a/src/3rdparty/libtiff/libtiff/tif_close.c
+++ b/src/3rdparty/libtiff/libtiff/tif_close.c
@@ -1,4 +1,4 @@
-/* $Id: tif_close.c,v 1.9 2005/11/23 22:20:56 dron Exp $ */
+/* $Id: tif_close.c,v 1.10 2006/03/25 03:09:24 joris Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -54,27 +54,27 @@ TIFFCleanup(TIFF* tif)
TIFFFreeDirectory(tif);
if (tif->tif_dirlist)
- _TIFFfree(tif->tif_dirlist);
-
+ _TIFFfree(tif->tif_dirlist);
+
/* Clean up client info links */
while( tif->tif_clientinfo )
{
- TIFFClientInfoLink *link = tif->tif_clientinfo;
+ TIFFClientInfoLink *link = tif->tif_clientinfo;
- tif->tif_clientinfo = link->next;
- _TIFFfree( link->name );
- _TIFFfree( link );
+ tif->tif_clientinfo = link->next;
+ _TIFFfree( link->name );
+ _TIFFfree( link );
}
if (tif->tif_rawdata && (tif->tif_flags&TIFF_MYBUFFER))
- _TIFFfree(tif->tif_rawdata);
+ _TIFFfree(tif->tif_rawdata);
if (isMapped(tif))
- TIFFUnmapFileContents(tif, tif->tif_base, tif->tif_size);
+ TIFFUnmapFileContents(tif, tif->tif_base, tif->tif_size);
/* Clean up custom fields */
- if (tif->tif_nfields > 0)
+ if (tif->tif_nfields > 0)
{
- size_t i;
+ size_t i;
for (i = 0; i < tif->tif_nfields; i++)
{
diff --git a/src/3rdparty/libtiff/libtiff/tif_codec.c b/src/3rdparty/libtiff/libtiff/tif_codec.c
index c31d10c732..02fb839b2f 100644
--- a/src/3rdparty/libtiff/libtiff/tif_codec.c
+++ b/src/3rdparty/libtiff/libtiff/tif_codec.c
@@ -1,4 +1,4 @@
-/* $Id: tif_codec.c,v 1.10 2005/12/21 12:23:13 joris Exp $ */
+/* $Id: tif_codec.c,v 1.10.2.1 2008-12-18 19:50:41 fwarmerdam Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -102,9 +102,12 @@ static int
_notConfigured(TIFF* tif)
{
const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
-
+ char compression_code[20];
+
+ sprintf( compression_code, "%d", tif->tif_dir.td_compression );
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
- "%s compression support is not configured", c->name);
+ "%s compression support is not configured",
+ c ? c->name : compression_code );
return (0);
}
diff --git a/src/3rdparty/libtiff/libtiff/tif_compress.c b/src/3rdparty/libtiff/libtiff/tif_compress.c
index f7bb2a5aed..6c3f322cf7 100644
--- a/src/3rdparty/libtiff/libtiff/tif_compress.c
+++ b/src/3rdparty/libtiff/libtiff/tif_compress.c
@@ -1,4 +1,4 @@
-/* $Id: tif_compress.c,v 1.11 2005/12/21 12:23:13 joris Exp $ */
+/* $Id: tif_compress.c,v 1.13 2007/02/24 15:03:50 dron Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -37,12 +37,13 @@ TIFFNoEncode(TIFF* tif, const char* method)
const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
if (c) {
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "%s %s encoding is not implemented",
- c->name, method);
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "%s %s encoding is not implemented",
+ c->name, method);
} else {
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
- "Compression scheme %u %s encoding is not implemented",
- tif->tif_dir.td_compression, method);
+ "Compression scheme %u %s encoding is not implemented",
+ tif->tif_dir.td_compression, method);
}
return (-1);
}
@@ -74,12 +75,13 @@ TIFFNoDecode(TIFF* tif, const char* method)
const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
if (c)
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "%s %s decoding is not implemented",
- c->name, method);
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "%s %s decoding is not implemented",
+ c->name, method);
else
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
- "Compression scheme %u %s decoding is not implemented",
- tif->tif_dir.td_compression, method);
+ "Compression scheme %u %s decoding is not implemented",
+ tif->tif_dir.td_compression, method);
return (-1);
}
@@ -109,7 +111,7 @@ _TIFFNoSeek(TIFF* tif, uint32 off)
{
(void) off;
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
- "Compression algorithm does not support random access");
+ "Compression algorithm does not support random access");
return (0);
}
@@ -144,7 +146,7 @@ _TIFFSetDefaultCompressionState(TIFF* tif)
tif->tif_cleanup = _TIFFvoid;
tif->tif_defstripsize = _TIFFDefaultStripSize;
tif->tif_deftilesize = _TIFFDefaultTileSize;
- tif->tif_flags &= ~TIFF_NOBITREV;
+ tif->tif_flags &= ~(TIFF_NOBITREV|TIFF_NOREADRAW);
}
int
diff --git a/src/3rdparty/libtiff/libtiff/tif_config.h b/src/3rdparty/libtiff/libtiff/tif_config.h
index a6bb35ddae..6d89e71ac9 100644
--- a/src/3rdparty/libtiff/libtiff/tif_config.h
+++ b/src/3rdparty/libtiff/libtiff/tif_config.h
@@ -1,5 +1,5 @@
/*
- Configuration defines by Trolltech.
+ Configuration defines for Qt.
*/
#include <qglobal.h>
@@ -7,6 +7,9 @@
# include <qfunctions_wince.h>
#endif
+/* Define if building universal (internal helper macro) */
+/* #undef AC_APPLE_UNIVERSAL_BUILD */
+
/* Support CCITT Group 3 & 4 algorithms */
#define CCITT_SUPPORT 1
@@ -47,19 +50,16 @@
#define HAVE_IEEEFP 1
/* Define to 1 if the system has the type `int16'. */
-/* #undef HAVE_INT16 */
#ifdef Q_OS_AIX
#define HAVE_INT16 1
#endif
/* Define to 1 if the system has the type `int32'. */
-/* #undef HAVE_INT32 */
#ifdef Q_OS_AIX
#define HAVE_INT32 1
#endif
/* Define to 1 if the system has the type `int8'. */
-/* #undef HAVE_INT8 */
#ifdef Q_OS_AIX
#define HAVE_INT8 1
#endif
@@ -67,9 +67,15 @@
/* Define to 1 if you have the <inttypes.h> header file. */
/* #undef HAVE_INTTYPES_H */
+/* Define to 1 if you have the <io.h> header file. */
+/* #undef HAVE_IO_H */
+
/* Define to 1 if you have the `isascii' function. */
/* #undef HAVE_ISASCII */
+/* Define to 1 if you have the `jbg_newlen' function. */
+/* #undef HAVE_JBG_NEWLEN */
+
/* Define to 1 if you have the `lfind' function. */
/* #undef HAVE_LFIND */
@@ -108,6 +114,9 @@
#define HAVE_SEARCH_H 1
#endif
+/* Define to 1 if you have the `setmode' function. */
+/* #undef HAVE_SETMODE */
+
/* Define to 1 if you have the `sqrt' function. */
/* #undef HAVE_SQRT */
@@ -155,9 +164,6 @@
/* Define to 1 if you have the <windows.h> header file. */
/* #undef HAVE_WINDOWS_H */
-#ifdef Q_OS_WIN
-#define TIF_PLATFORM_CONSOLE
-#endif
/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian
(Intel) */
@@ -170,6 +176,9 @@
/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */
#define HOST_FILLORDER FILLORDER_LSB2MSB
+/* Support ISO JBIG compression (requires JBIG-KIT library) */
+/* #undef JBIG_SUPPORT */
+
/* Support JPEG compression (requires IJG JPEG library) */
/* #undef JPEG_SUPPORT */
@@ -192,8 +201,7 @@
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */
-/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation
- fails with unpatched IJG JPEG library) */
+/* Support Old JPEG compresson (read-only) */
/* #undef OJPEG_SUPPORT */
/* Name of package */
@@ -211,8 +219,11 @@
/* Define to the one symbol short name of this package. */
/* #undef PACKAGE_TARNAME */
+/* Define to the home page for this package. */
+/* #undef PACKAGE_URL */
+
/* Define to the version of this package. */
-/* #undef PACKAGE_VERSION */
+#define PACKAGE_VERSION "3.9.2"
/* Support Macintosh PackBits algorithm */
#define PACKBITS_SUPPORT 1
@@ -224,16 +235,28 @@
your system. */
/* #undef PTHREAD_CREATE_JOINABLE */
-/* The size of a `int', as computed by sizeof. */
+/* The size of `int', as computed by sizeof. */
#define SIZEOF_INT 4
-/* The size of a `long', as computed by sizeof. */
+/* The size of `long', as computed by sizeof. */
#if (QT_POINTER_SIZE == 8) && !defined(Q_OS_WIN64)
#define SIZEOF_LONG 8
#else
#define SIZEOF_LONG 4
#endif
+/* The size of `signed long', as computed by sizeof. */
+/* #undef SIZEOF_SIGNED_LONG */
+
+/* The size of `signed long long', as computed by sizeof. */
+/* #undef SIZEOF_SIGNED_LONG_LONG */
+
+/* The size of `unsigned long', as computed by sizeof. */
+/* #undef SIZEOF_UNSIGNED_LONG */
+
+/* The size of `unsigned long long', as computed by sizeof. */
+/* #undef SIZEOF_UNSIGNED_LONG_LONG */
+
/* Define to 1 if you have the ANSI C header files. */
/* #undef STDC_HEADERS */
@@ -250,6 +273,18 @@
/* Support ThunderScan 4-bit RLE algorithm */
#define THUNDER_SUPPORT 1
+/* Signed 64-bit type formatter */
+/* #undef TIFF_INT64_FORMAT */
+
+/* Signed 64-bit type */
+#define TIFF_INT64_T qint64
+
+/* Unsigned 64-bit type formatter */
+/* #undef TIFF_UINT64_FORMAT */
+
+/* Unsigned 64-bit type */
+#define TIFF_UINT64_T quint64
+
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
/* #undef TIME_WITH_SYS_TIME */
@@ -259,12 +294,10 @@
/* Version number of package */
/* #undef VERSION */
-/* Define to 1 if your processor stores words with the most significant byte
- first (like Motorola and SPARC, unlike Intel and VAX). */
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
#if (Q_BYTE_ORDER == Q_BIG_ENDIAN)
#define WORDS_BIGENDIAN 1
-#else
-/* #undef WORDS_BIGENDIAN */
#endif
/* Define to 1 if the X Window System is missing or not being used. */
@@ -291,8 +324,12 @@
#endif
#endif
-/* Define to `long' if <sys/types.h> does not define. */
+/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */
-/* Define to `unsigned' if <sys/types.h> does not define. */
+/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
+
+#ifdef Q_OS_WIN
+#define TIF_PLATFORM_CONSOLE
+#endif
diff --git a/src/3rdparty/libtiff/libtiff/tif_config.h-vms b/src/3rdparty/libtiff/libtiff/tif_config.h-vms
new file mode 100644
index 0000000000..d653bd8270
--- /dev/null
+++ b/src/3rdparty/libtiff/libtiff/tif_config.h-vms
@@ -0,0 +1,46 @@
+/* Define to 1 if you have the <assert.h> header file. */
+#define HAVE_ASSERT_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define as 0 or 1 according to the floating point format suported by the
+ machine */
+#define HAVE_IEEEFP 1
+
+#define HAVE_UNISTD_H 1
+
+#define HAVE_STRING_H 1
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <io.h> header file. */
+//#define HAVE_IO_H 1
+
+/* Define to 1 if you have the <search.h> header file. */
+//#define HAVE_SEARCH_H 1
+
+/* The size of a `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of a `long', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
+/* Set the native cpu bit order */
+#define HOST_FILLORDER FILLORDER_LSB2MSB
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+/* #undef WORDS_BIGENDIAN */
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+/*
+#ifndef __cplusplus
+# ifndef inline
+# define inline __inline
+# endif
+#endif
+*/
+
+// #define lfind _lfind
diff --git a/src/3rdparty/libtiff/libtiff/tif_config.h.in b/src/3rdparty/libtiff/libtiff/tif_config.h.in
index fef3a6101f..01e54de878 100644
--- a/src/3rdparty/libtiff/libtiff/tif_config.h.in
+++ b/src/3rdparty/libtiff/libtiff/tif_config.h.in
@@ -1,5 +1,8 @@
/* libtiff/tif_config.h.in. Generated from configure.ac by autoheader. */
+/* Define if building universal (internal helper macro) */
+#undef AC_APPLE_UNIVERSAL_BUILD
+
/* Support CCITT Group 3 & 4 algorithms */
#undef CCITT_SUPPORT
@@ -49,9 +52,15 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the <io.h> header file. */
+#undef HAVE_IO_H
+
/* Define to 1 if you have the `isascii' function. */
#undef HAVE_ISASCII
+/* Define to 1 if you have the `jbg_newlen' function. */
+#undef HAVE_JBG_NEWLEN
+
/* Define to 1 if you have the `lfind' function. */
#undef HAVE_LFIND
@@ -88,6 +97,9 @@
/* Define to 1 if you have the <search.h> header file. */
#undef HAVE_SEARCH_H
+/* Define to 1 if you have the `setmode' function. */
+#undef HAVE_SETMODE
+
/* Define to 1 if you have the `sqrt' function. */
#undef HAVE_SQRT
@@ -143,6 +155,9 @@
/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */
#undef HOST_FILLORDER
+/* Support ISO JBIG compression (requires JBIG-KIT library) */
+#undef JBIG_SUPPORT
+
/* Support JPEG compression (requires IJG JPEG library) */
#undef JPEG_SUPPORT
@@ -165,8 +180,7 @@
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
-/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation
- fails with unpatched IJG JPEG library) */
+/* Support Old JPEG compresson (read-only) */
#undef OJPEG_SUPPORT
/* Name of package */
@@ -184,6 +198,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
/* Define to the version of this package. */
#undef PACKAGE_VERSION
@@ -197,12 +214,24 @@
your system. */
#undef PTHREAD_CREATE_JOINABLE
-/* The size of a `int', as computed by sizeof. */
+/* The size of `int', as computed by sizeof. */
#undef SIZEOF_INT
-/* The size of a `long', as computed by sizeof. */
+/* The size of `long', as computed by sizeof. */
#undef SIZEOF_LONG
+/* The size of `signed long', as computed by sizeof. */
+#undef SIZEOF_SIGNED_LONG
+
+/* The size of `signed long long', as computed by sizeof. */
+#undef SIZEOF_SIGNED_LONG_LONG
+
+/* The size of `unsigned long', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_LONG
+
+/* The size of `unsigned long long', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_LONG_LONG
+
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
@@ -219,6 +248,18 @@
/* Support ThunderScan 4-bit RLE algorithm */
#undef THUNDER_SUPPORT
+/* Signed 64-bit type formatter */
+#undef TIFF_INT64_FORMAT
+
+/* Signed 64-bit type */
+#undef TIFF_INT64_T
+
+/* Unsigned 64-bit type formatter */
+#undef TIFF_UINT64_FORMAT
+
+/* Unsigned 64-bit type */
+#undef TIFF_UINT64_T
+
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
@@ -228,9 +269,17 @@
/* Version number of package */
#undef VERSION
-/* Define to 1 if your processor stores words with the most significant byte
- first (like Motorola and SPARC, unlike Intel and VAX). */
-#undef WORDS_BIGENDIAN
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+#endif
/* Define to 1 if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING
@@ -253,8 +302,8 @@
#undef inline
#endif
-/* Define to `long' if <sys/types.h> does not define. */
+/* Define to `long int' if <sys/types.h> does not define. */
#undef off_t
-/* Define to `unsigned' if <sys/types.h> does not define. */
+/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
diff --git a/src/3rdparty/libtiff/libtiff/tif_config.h.vc b/src/3rdparty/libtiff/libtiff/tif_config.h.vc
deleted file mode 100644
index 98e40fae8e..0000000000
--- a/src/3rdparty/libtiff/libtiff/tif_config.h.vc
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Define to 1 if you have the <assert.h> header file. */
-#define HAVE_ASSERT_H 1
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
-
-/* Define as 0 or 1 according to the floating point format suported by the
- machine */
-#define HAVE_IEEEFP 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <io.h> header file. */
-#define HAVE_IO_H 1
-
-/* Define to 1 if you have the <search.h> header file. */
-#define HAVE_SEARCH_H 1
-
-/* The size of a `int', as computed by sizeof. */
-#define SIZEOF_INT 4
-
-/* The size of a `long', as computed by sizeof. */
-#define SIZEOF_LONG 4
-
-/* Set the native cpu bit order */
-#define HOST_FILLORDER FILLORDER_LSB2MSB
-
-/* Define to 1 if your processor stores words with the most significant byte
- first (like Motorola and SPARC, unlike Intel and VAX). */
-/* #undef WORDS_BIGENDIAN */
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-# ifndef inline
-# define inline __inline
-# endif
-#endif
-
-#define lfind _lfind
diff --git a/src/3rdparty/libtiff/libtiff/tif_config.vc.h b/src/3rdparty/libtiff/libtiff/tif_config.vc.h
new file mode 100644
index 0000000000..d9caecf5fa
--- /dev/null
+++ b/src/3rdparty/libtiff/libtiff/tif_config.vc.h
@@ -0,0 +1,56 @@
+/* Define to 1 if you have the <assert.h> header file. */
+#define HAVE_ASSERT_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define as 0 or 1 according to the floating point format suported by the
+ machine */
+#define HAVE_IEEEFP 1
+
+/* Define to 1 if you have the `jbg_newlen' function. */
+#define HAVE_JBG_NEWLEN 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <io.h> header file. */
+#define HAVE_IO_H 1
+
+/* Define to 1 if you have the <search.h> header file. */
+#define HAVE_SEARCH_H 1
+
+/* Define to 1 if you have the `setmode' function. */
+#define HAVE_SETMODE 1
+
+/* The size of a `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of a `long', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
+/* Signed 64-bit type */
+#define TIFF_INT64_T signed __int64
+
+/* Unsigned 64-bit type */
+#define TIFF_UINT64_T unsigned __int64
+
+/* Set the native cpu bit order */
+#define HOST_FILLORDER FILLORDER_LSB2MSB
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+/* #undef WORDS_BIGENDIAN */
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+# ifndef inline
+# define inline __inline
+# endif
+#endif
+
+#define lfind _lfind
diff --git a/src/3rdparty/libtiff/libtiff/tif_config.wince.h b/src/3rdparty/libtiff/libtiff/tif_config.wince.h
new file mode 100644
index 0000000000..a50b01681f
--- /dev/null
+++ b/src/3rdparty/libtiff/libtiff/tif_config.wince.h
@@ -0,0 +1,67 @@
+/* $Id: tif_config.wince.h,v 1.1 2007/01/15 18:40:39 mloskot Exp $ */
+
+/*
+ * TIFF library configuration header for Windows CE platform.
+ */
+#ifndef _WIN32_WCE
+# error This version of tif_config.h header is dedicated for Windows CE platform!
+#endif
+
+/* Define to 1 if you have the <assert.h> header file. */
+#define HAVE_ASSERT_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define as 0 or 1 according to the floating point format suported by the
+ machine */
+#define HAVE_IEEEFP 1
+
+/* Define to 1 if you have the `jbg_newlen' function. */
+#define HAVE_JBG_NEWLEN 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <io.h> header file. */
+#define HAVE_IO_H 1
+
+/* Define to 1 if you have the <search.h> header file. */
+#define HAVE_SEARCH_H 1
+
+/* Define to 1 if you have the `setmode' function. */
+#define HAVE_SETMODE 1
+
+/* Define to 1 if you have the `bsearch' function. */
+#define HAVE_BSEARCH 1
+#define bsearch wceex_bsearch
+
+/* Define to 1 if you have the `lfind' function. */
+#define HAVE_LFIND 1
+#define lfind wceex_lfind
+
+/* The size of a `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of a `long', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
+/* Set the native cpu bit order */
+#define HOST_FILLORDER FILLORDER_LSB2MSB
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+/* #undef WORDS_BIGENDIAN */
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+# ifndef inline
+# define inline __inline
+# endif
+#endif
+
+
diff --git a/src/3rdparty/libtiff/libtiff/tif_dir.c b/src/3rdparty/libtiff/libtiff/tif_dir.c
index 160256753e..102c9a85cd 100644
--- a/src/3rdparty/libtiff/libtiff/tif_dir.c
+++ b/src/3rdparty/libtiff/libtiff/tif_dir.c
@@ -1,4 +1,4 @@
-/* $Id: tif_dir.c,v 1.72 2006/03/15 12:49:35 dron Exp $ */
+/* $Id: tif_dir.c,v 1.75.2.2 2009-01-01 00:10:43 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -74,21 +74,37 @@ void _TIFFsetDoubleArray(double** dpp, double* dp, uint32 n)
static int
setExtraSamples(TIFFDirectory* td, va_list ap, uint32* v)
{
+/* XXX: Unassociated alpha data == 999 is a known Corel Draw bug, see below */
+#define EXTRASAMPLE_COREL_UNASSALPHA 999
+
uint16* va;
uint32 i;
*v = va_arg(ap, uint32);
if ((uint16) *v > td->td_samplesperpixel)
- return (0);
+ return 0;
va = va_arg(ap, uint16*);
if (*v > 0 && va == NULL) /* typically missing param */
- return (0);
- for (i = 0; i < *v; i++)
- if (va[i] > EXTRASAMPLE_UNASSALPHA)
- return (0);
+ return 0;
+ for (i = 0; i < *v; i++) {
+ if (va[i] > EXTRASAMPLE_UNASSALPHA) {
+ /*
+ * XXX: Corel Draw is known to produce incorrect
+ * ExtraSamples tags which must be patched here if we
+ * want to be able to open some of the damaged TIFF
+ * files:
+ */
+ if (va[i] == EXTRASAMPLE_COREL_UNASSALPHA)
+ va[i] = EXTRASAMPLE_UNASSALPHA;
+ else
+ return 0;
+ }
+ }
td->td_extrasamples = (uint16) *v;
_TIFFsetShortArray(&td->td_sampleinfo, va, td->td_extrasamples);
- return (1);
+ return 1;
+
+#undef EXTRASAMPLE_COREL_UNASSALPHA
}
static uint32
@@ -121,7 +137,7 @@ static int
_TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
{
static const char module[] = "_TIFFVSetField";
-
+
TIFFDirectory* td = &tif->tif_dir;
int status = 1;
uint32 v32, i, v;
@@ -192,14 +208,11 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
goto badvalue;
td->td_fillorder = (uint16) v;
break;
- break;
case TIFFTAG_ORIENTATION:
v = va_arg(ap, uint32);
- if (v < ORIENTATION_TOPLEFT || ORIENTATION_LEFTBOT < v) {
- TIFFWarningExt(tif->tif_clientdata, tif->tif_name,
- "Bad value %lu for \"%s\" tag ignored",
- v, _TIFFFieldWithTag(tif, tag)->field_name);
- } else
+ if (v < ORIENTATION_TOPLEFT || ORIENTATION_LEFTBOT < v)
+ goto badvalue;
+ else
td->td_orientation = (uint16) v;
break;
case TIFFTAG_SAMPLESPERPIXEL:
@@ -345,8 +358,9 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
_TIFFsetLongArray(&td->td_subifd, va_arg(ap, uint32*),
(long) td->td_nsubifd);
} else {
- TIFFErrorExt(tif->tif_clientdata, module, "%s: Sorry, cannot nest SubIFDs",
- tif->tif_name);
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "%s: Sorry, cannot nest SubIFDs",
+ tif->tif_name);
status = 0;
}
break;
@@ -374,9 +388,9 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
}
break;
default: {
- const TIFFFieldInfo* fip = _TIFFFindFieldInfo(tif, tag, TIFF_ANY);
TIFFTagValue *tv;
int tv_size, iCustom;
+ const TIFFFieldInfo* fip = _TIFFFindFieldInfo(tif, tag, TIFF_ANY);
/*
* This can happen if multiple images are open with different
@@ -389,9 +403,9 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
*/
if(fip == NULL || fip->field_bit != FIELD_CUSTOM) {
TIFFErrorExt(tif->tif_clientdata, module,
- "%s: Invalid %stag \"%s\" (not supported by codec)",
- tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "",
- _TIFFFieldWithTag(tif, tag)->field_name);
+ "%s: Invalid %stag \"%s\" (not supported by codec)",
+ tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "",
+ fip ? fip->field_name : "Unknown");
status = 0;
break;
}
@@ -400,16 +414,15 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
* Find the existing entry for this custom value.
*/
tv = NULL;
- for(iCustom = 0; iCustom < td->td_customValueCount; iCustom++) {
- if(td->td_customValues[iCustom].info == fip) {
- tv = td->td_customValues + iCustom;
- if(tv->value != NULL)
- {
- _TIFFfree(tv->value);
- tv->value = NULL;
- }
- break;
- }
+ for (iCustom = 0; iCustom < td->td_customValueCount; iCustom++) {
+ if (td->td_customValues[iCustom].info->field_tag == tag) {
+ tv = td->td_customValues + iCustom;
+ if (tv->value != NULL) {
+ _TIFFfree(tv->value);
+ tv->value = NULL;
+ }
+ break;
+ }
}
/*
@@ -432,7 +445,7 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
td->td_customValues = new_customValues;
- tv = td->td_customValues + (td->td_customValueCount-1);
+ tv = td->td_customValues + (td->td_customValueCount - 1);
tv->info = fip;
tv->value = NULL;
tv->count = 0;
@@ -468,7 +481,8 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
if (fip->field_type == TIFF_ASCII)
_TIFFsetString((char **)&tv->value, va_arg(ap, char *));
else {
- tv->value = _TIFFmalloc(tv_size * tv->count);
+ tv->value = _TIFFCheckMalloc(tif, tv_size, tv->count,
+ "Tag Value");
if (!tv->value) {
status = 0;
goto end;
@@ -571,13 +585,17 @@ end:
va_end(ap);
return (status);
badvalue:
- TIFFErrorExt(tif->tif_clientdata, module, "%s: Bad value %d for \"%s\"",
- tif->tif_name, v, _TIFFFieldWithTag(tif, tag)->field_name);
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "%s: Bad value %d for \"%s\" tag",
+ tif->tif_name, v,
+ _TIFFFieldWithTag(tif, tag)->field_name);
va_end(ap);
return (0);
badvalue32:
- TIFFErrorExt(tif->tif_clientdata, module, "%s: Bad value %ld for \"%s\"",
- tif->tif_name, v32, _TIFFFieldWithTag(tif, tag)->field_name);
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "%s: Bad value %u for \"%s\" tag",
+ tif->tif_name, v32,
+ _TIFFFieldWithTag(tif, tag)->field_name);
va_end(ap);
return (0);
}
@@ -806,21 +824,22 @@ _TIFFVGetField(TIFF* tif, ttag_t tag, va_list ap)
int i;
/*
- * This can happen if multiple images are open with
- * different codecs which have private tags. The
- * global tag information table may then have tags
- * that are valid for one file but not the other.
- * If the client tries to get a tag that is not valid
- * for the image's codec then we'll arrive here.
+ * This can happen if multiple images are open with different
+ * codecs which have private tags. The global tag information
+ * table may then have tags that are valid for one file but not
+ * the other. If the client tries to get a tag that is not valid
+ * for the image's codec then we'll arrive here.
*/
if( fip == NULL || fip->field_bit != FIELD_CUSTOM )
{
- TIFFErrorExt(tif->tif_clientdata, "_TIFFVGetField",
- "%s: Invalid %stag \"%s\" (not supported by codec)",
- tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "",
- _TIFFFieldWithTag(tif, tag)->field_name);
- ret_val = 0;
- break;
+ TIFFErrorExt(tif->tif_clientdata, "_TIFFVGetField",
+ "%s: Invalid %stag \"%s\" "
+ "(not supported by codec)",
+ tif->tif_name,
+ isPseudoTag(tag) ? "pseudo-" : "",
+ fip ? fip->field_name : "Unknown");
+ ret_val = 0;
+ break;
}
/*
@@ -1032,7 +1051,7 @@ TIFFDefaultDirectory(TIFF* tif)
size_t tiffFieldInfoCount;
const TIFFFieldInfo *tiffFieldInfo =
- _TIFFGetFieldInfo(&tiffFieldInfoCount);
+ _TIFFGetFieldInfo(&tiffFieldInfoCount);
_TIFFSetupFieldInfo(tif, tiffFieldInfo, tiffFieldInfoCount);
_TIFFmemset(td, 0, sizeof (*td));
@@ -1053,7 +1072,7 @@ TIFFDefaultDirectory(TIFF* tif)
td->td_ycbcrsubsampling[1] = 2;
td->td_ycbcrpositioning = YCBCRPOSITION_CENTERED;
tif->tif_postdecode = _TIFFNoPostDecode;
- tif->tif_foundfield = NULL;
+ tif->tif_foundfield = NULL;
tif->tif_tagmethods.vsetfield = _TIFFVSetField;
tif->tif_tagmethods.vgetfield = _TIFFVGetField;
tif->tif_tagmethods.printdir = NULL;
@@ -1074,12 +1093,12 @@ TIFFDefaultDirectory(TIFF* tif)
*/
tif->tif_flags &= ~TIFF_DIRTYDIRECT;
- /*
- * As per http://bugzilla.remotesensing.org/show_bug.cgi?id=19
- * we clear the ISTILED flag when setting up a new directory.
- * Should we also be clearing stuff like INSUBIFD?
- */
- tif->tif_flags &= ~TIFF_ISTILED;
+ /*
+ * As per http://bugzilla.remotesensing.org/show_bug.cgi?id=19
+ * we clear the ISTILED flag when setting up a new directory.
+ * Should we also be clearing stuff like INSUBIFD?
+ */
+ tif->tif_flags &= ~TIFF_ISTILED;
return (1);
}
@@ -1087,59 +1106,59 @@ TIFFDefaultDirectory(TIFF* tif)
static int
TIFFAdvanceDirectory(TIFF* tif, uint32* nextdir, toff_t* off)
{
- static const char module[] = "TIFFAdvanceDirectory";
- uint16 dircount;
- if (isMapped(tif))
- {
- toff_t poff=*nextdir;
- if (poff+sizeof(uint16) > tif->tif_size)
- {
+ static const char module[] = "TIFFAdvanceDirectory";
+ uint16 dircount;
+ if (isMapped(tif))
+ {
+ toff_t poff=*nextdir;
+ if (poff+sizeof(uint16) > tif->tif_size)
+ {
TIFFErrorExt(tif->tif_clientdata, module, "%s: Error fetching directory count",
- tif->tif_name);
- return (0);
- }
- _TIFFmemcpy(&dircount, tif->tif_base+poff, sizeof (uint16));
- if (tif->tif_flags & TIFF_SWAB)
- TIFFSwabShort(&dircount);
- poff+=sizeof (uint16)+dircount*sizeof (TIFFDirEntry);
- if (off != NULL)
- *off = poff;
- if (((toff_t) (poff+sizeof (uint32))) > tif->tif_size)
- {
+ tif->tif_name);
+ return (0);
+ }
+ _TIFFmemcpy(&dircount, tif->tif_base+poff, sizeof (uint16));
+ if (tif->tif_flags & TIFF_SWAB)
+ TIFFSwabShort(&dircount);
+ poff+=sizeof (uint16)+dircount*sizeof (TIFFDirEntry);
+ if (off != NULL)
+ *off = poff;
+ if (((toff_t) (poff+sizeof (uint32))) > tif->tif_size)
+ {
TIFFErrorExt(tif->tif_clientdata, module, "%s: Error fetching directory link",
- tif->tif_name);
- return (0);
- }
- _TIFFmemcpy(nextdir, tif->tif_base+poff, sizeof (uint32));
- if (tif->tif_flags & TIFF_SWAB)
- TIFFSwabLong(nextdir);
- return (1);
- }
- else
- {
- if (!SeekOK(tif, *nextdir) ||
- !ReadOK(tif, &dircount, sizeof (uint16))) {
+ tif->tif_name);
+ return (0);
+ }
+ _TIFFmemcpy(nextdir, tif->tif_base+poff, sizeof (uint32));
+ if (tif->tif_flags & TIFF_SWAB)
+ TIFFSwabLong(nextdir);
+ return (1);
+ }
+ else
+ {
+ if (!SeekOK(tif, *nextdir) ||
+ !ReadOK(tif, &dircount, sizeof (uint16))) {
TIFFErrorExt(tif->tif_clientdata, module, "%s: Error fetching directory count",
- tif->tif_name);
- return (0);
- }
- if (tif->tif_flags & TIFF_SWAB)
- TIFFSwabShort(&dircount);
- if (off != NULL)
- *off = TIFFSeekFile(tif,
- dircount*sizeof (TIFFDirEntry), SEEK_CUR);
- else
- (void) TIFFSeekFile(tif,
- dircount*sizeof (TIFFDirEntry), SEEK_CUR);
- if (!ReadOK(tif, nextdir, sizeof (uint32))) {
+ tif->tif_name);
+ return (0);
+ }
+ if (tif->tif_flags & TIFF_SWAB)
+ TIFFSwabShort(&dircount);
+ if (off != NULL)
+ *off = TIFFSeekFile(tif,
+ dircount*sizeof (TIFFDirEntry), SEEK_CUR);
+ else
+ (void) TIFFSeekFile(tif,
+ dircount*sizeof (TIFFDirEntry), SEEK_CUR);
+ if (!ReadOK(tif, nextdir, sizeof (uint32))) {
TIFFErrorExt(tif->tif_clientdata, module, "%s: Error fetching directory link",
- tif->tif_name);
- return (0);
- }
- if (tif->tif_flags & TIFF_SWAB)
- TIFFSwabLong(nextdir);
- return (1);
- }
+ tif->tif_name);
+ return (0);
+ }
+ if (tif->tif_flags & TIFF_SWAB)
+ TIFFSwabLong(nextdir);
+ return (1);
+ }
}
/*
diff --git a/src/3rdparty/libtiff/libtiff/tif_dir.h b/src/3rdparty/libtiff/libtiff/tif_dir.h
index 13048c296d..e2aeea2917 100644
--- a/src/3rdparty/libtiff/libtiff/tif_dir.h
+++ b/src/3rdparty/libtiff/libtiff/tif_dir.h
@@ -1,4 +1,4 @@
-/* $Id: tif_dir.h,v 1.28 2005/12/26 14:31:25 dron Exp $ */
+/* $Id: tif_dir.h,v 1.30.2.1 2007/04/07 14:58:30 dron Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -38,44 +38,47 @@ typedef struct {
/* bit vector of fields that are set */
unsigned long td_fieldsset[FIELD_SETLONGS];
- uint32 td_imagewidth, td_imagelength, td_imagedepth;
- uint32 td_tilewidth, td_tilelength, td_tiledepth;
- uint32 td_subfiletype;
- uint16 td_bitspersample;
- uint16 td_sampleformat;
- uint16 td_compression;
- uint16 td_photometric;
- uint16 td_threshholding;
- uint16 td_fillorder;
- uint16 td_orientation;
- uint16 td_samplesperpixel;
- uint32 td_rowsperstrip;
- uint16 td_minsamplevalue, td_maxsamplevalue;
- double td_sminsamplevalue, td_smaxsamplevalue;
- float td_xresolution, td_yresolution;
- uint16 td_resolutionunit;
- uint16 td_planarconfig;
- float td_xposition, td_yposition;
- uint16 td_pagenumber[2];
- uint16* td_colormap[3];
- uint16 td_halftonehints[2];
- uint16 td_extrasamples;
- uint16* td_sampleinfo;
- tstrip_t td_stripsperimage;
- tstrip_t td_nstrips; /* size of offset & bytecount arrays */
- uint32* td_stripoffset;
- uint32* td_stripbytecount;
- int td_stripbytecountsorted; /* is the bytecount array sorted ascending? */
- uint16 td_nsubifd;
- uint32* td_subifd;
+ uint32 td_imagewidth, td_imagelength, td_imagedepth;
+ uint32 td_tilewidth, td_tilelength, td_tiledepth;
+ uint32 td_subfiletype;
+ uint16 td_bitspersample;
+ uint16 td_sampleformat;
+ uint16 td_compression;
+ uint16 td_photometric;
+ uint16 td_threshholding;
+ uint16 td_fillorder;
+ uint16 td_orientation;
+ uint16 td_samplesperpixel;
+ uint32 td_rowsperstrip;
+ uint16 td_minsamplevalue, td_maxsamplevalue;
+ double td_sminsamplevalue, td_smaxsamplevalue;
+ float td_xresolution, td_yresolution;
+ uint16 td_resolutionunit;
+ uint16 td_planarconfig;
+ float td_xposition, td_yposition;
+ uint16 td_pagenumber[2];
+ uint16* td_colormap[3];
+ uint16 td_halftonehints[2];
+ uint16 td_extrasamples;
+ uint16* td_sampleinfo;
+ /* even though the name is misleading, td_stripsperimage is the number
+ * of striles (=strips or tiles) per plane, and td_nstrips the total
+ * number of striles */
+ tstrile_t td_stripsperimage;
+ tstrile_t td_nstrips; /* size of offset & bytecount arrays */
+ toff_t* td_stripoffset;
+ toff_t* td_stripbytecount; /* FIXME: it should be tsize_t array */
+ int td_stripbytecountsorted; /* is the bytecount array sorted ascending? */
+ uint16 td_nsubifd;
+ uint32* td_subifd;
/* YCbCr parameters */
- uint16 td_ycbcrsubsampling[2];
- uint16 td_ycbcrpositioning;
+ uint16 td_ycbcrsubsampling[2];
+ uint16 td_ycbcrpositioning;
/* Colorimetry parameters */
- uint16* td_transferfunction[3];
+ uint16* td_transferfunction[3];
/* CMYK parameters */
- int td_inknameslen;
- char* td_inknames;
+ int td_inknameslen;
+ char* td_inknames;
int td_customValueCount;
TIFFTagValue *td_customValues;
@@ -177,6 +180,7 @@ extern "C" {
extern const TIFFFieldInfo *_TIFFGetFieldInfo(size_t *);
extern const TIFFFieldInfo *_TIFFGetExifFieldInfo(size_t *);
extern void _TIFFSetupFieldInfo(TIFF*, const TIFFFieldInfo[], size_t);
+extern int _TIFFMergeFieldInfo(TIFF*, const TIFFFieldInfo[], int);
extern void _TIFFPrintFieldInfo(TIFF*, FILE*);
extern TIFFDataType _TIFFSampleToTagType(TIFF*);
extern const TIFFFieldInfo* _TIFFFindOrRegisterFieldInfo( TIFF *tif,
@@ -185,7 +189,6 @@ extern const TIFFFieldInfo* _TIFFFindOrRegisterFieldInfo( TIFF *tif,
extern TIFFFieldInfo* _TIFFCreateAnonFieldInfo( TIFF *tif, ttag_t tag,
TIFFDataType dt );
-#define _TIFFMergeFieldInfo TIFFMergeFieldInfo
#define _TIFFFindFieldInfo TIFFFindFieldInfo
#define _TIFFFindFieldInfoByName TIFFFindFieldInfoByName
#define _TIFFFieldWithTag TIFFFieldWithTag
diff --git a/src/3rdparty/libtiff/libtiff/tif_dirinfo.c b/src/3rdparty/libtiff/libtiff/tif_dirinfo.c
index c22178f78d..99a871cc37 100644
--- a/src/3rdparty/libtiff/libtiff/tif_dirinfo.c
+++ b/src/3rdparty/libtiff/libtiff/tif_dirinfo.c
@@ -1,4 +1,4 @@
-/* $Id: tif_dirinfo.c,v 1.62 2006/02/07 10:45:38 dron Exp $ */
+/* $Id: tif_dirinfo.c,v 1.65.2.7 2009-09-17 18:00:28 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -31,6 +31,7 @@
*/
#include "tiffiop.h"
#include <stdlib.h>
+#include <string.h>
/*
* NB: NB: THIS ARRAY IS ASSUMED TO BE SORTED BY TAG.
@@ -449,6 +450,8 @@ exifFieldInfo[] = {
1, 0, "SubSecTimeDigitized" },
{ EXIFTAG_FLASHPIXVERSION, 4, 4, TIFF_UNDEFINED, FIELD_CUSTOM,
1, 0, "FlashpixVersion" },
+ { EXIFTAG_COLORSPACE, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
+ 1, 0, "ColorSpace" },
{ EXIFTAG_PIXELXDIMENSION, 1, 1, TIFF_LONG, FIELD_CUSTOM,
1, 0, "PixelXDimension" },
{ EXIFTAG_PIXELXDIMENSION, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
@@ -542,7 +545,11 @@ _TIFFSetupFieldInfo(TIFF* tif, const TIFFFieldInfo info[], size_t n)
_TIFFfree(tif->tif_fieldinfo);
tif->tif_nfields = 0;
}
- _TIFFMergeFieldInfo(tif, info, n);
+ if (!_TIFFMergeFieldInfo(tif, info, n))
+ {
+ TIFFErrorExt(tif->tif_clientdata, "_TIFFSetupFieldInfo",
+ "Setting up field info failed");
+ }
}
static int
@@ -552,9 +559,10 @@ tagCompare(const void* a, const void* b)
const TIFFFieldInfo* tb = *(const TIFFFieldInfo**) b;
/* NB: be careful of return values for 16-bit platforms */
if (ta->field_tag != tb->field_tag)
- return (ta->field_tag < tb->field_tag ? -1 : 1);
+ return (int)ta->field_tag - (int)tb->field_tag;
else
- return ((int)tb->field_type - (int)ta->field_type);
+ return (ta->field_type == TIFF_ANY) ?
+ 0 : ((int)tb->field_type - (int)ta->field_type);
}
static int
@@ -562,13 +570,30 @@ tagNameCompare(const void* a, const void* b)
{
const TIFFFieldInfo* ta = *(const TIFFFieldInfo**) a;
const TIFFFieldInfo* tb = *(const TIFFFieldInfo**) b;
+ int ret = strcmp(ta->field_name, tb->field_name);
- return strcmp(ta->field_name, tb->field_name);
+ if (ret)
+ return ret;
+ else
+ return (ta->field_type == TIFF_ANY) ?
+ 0 : ((int)tb->field_type - (int)ta->field_type);
}
void
+TIFFMergeFieldInfo(TIFF* tif, const TIFFFieldInfo info[], int n)
+{
+ if (_TIFFMergeFieldInfo(tif, info, n) < 0)
+ {
+ TIFFErrorExt(tif->tif_clientdata, "TIFFMergeFieldInfo",
+ "Merging block of %d fields failed", n);
+ }
+}
+
+int
_TIFFMergeFieldInfo(TIFF* tif, const TIFFFieldInfo info[], int n)
{
+ static const char module[] = "_TIFFMergeFieldInfo";
+ static const char reason[] = "for field info array";
TIFFFieldInfo** tp;
int i;
@@ -576,20 +601,37 @@ _TIFFMergeFieldInfo(TIFF* tif, const TIFFFieldInfo info[], int n)
if (tif->tif_nfields > 0) {
tif->tif_fieldinfo = (TIFFFieldInfo**)
- _TIFFrealloc(tif->tif_fieldinfo,
- (tif->tif_nfields+n) * sizeof (TIFFFieldInfo*));
+ _TIFFCheckRealloc(tif, tif->tif_fieldinfo,
+ (tif->tif_nfields + n),
+ sizeof (TIFFFieldInfo*), reason);
} else {
tif->tif_fieldinfo = (TIFFFieldInfo**)
- _TIFFmalloc(n * sizeof (TIFFFieldInfo*));
+ _TIFFCheckMalloc(tif, n, sizeof (TIFFFieldInfo*),
+ reason);
+ }
+ if (!tif->tif_fieldinfo) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Failed to allocate field info array");
+ return 0;
}
- assert(tif->tif_fieldinfo != NULL);
tp = tif->tif_fieldinfo + tif->tif_nfields;
for (i = 0; i < n; i++)
- *tp++ = (TIFFFieldInfo*) (info + i); /* XXX */
+ {
+ const TIFFFieldInfo *fip =
+ _TIFFFindFieldInfo(tif, info[i].field_tag, info[i].field_type);
+
+ /* only add definitions that aren't already present */
+ if (!fip) {
+ *tp++ = (TIFFFieldInfo*) (info + i);
+ tif->tif_nfields++;
+ }
+ }
/* Sort the field info by tag number */
- qsort(tif->tif_fieldinfo, tif->tif_nfields += n,
+ qsort(tif->tif_fieldinfo, tif->tif_nfields,
sizeof (TIFFFieldInfo*), tagCompare);
+
+ return n;
}
void
@@ -704,67 +746,58 @@ _TIFFSampleToTagType(TIFF* tif)
const TIFFFieldInfo*
_TIFFFindFieldInfo(TIFF* tif, ttag_t tag, TIFFDataType dt)
{
- int i, n;
+ TIFFFieldInfo key = {0, 0, 0, TIFF_NOTYPE, 0, 0, 0, 0};
+ TIFFFieldInfo* pkey = &key;
+ const TIFFFieldInfo **ret;
if (tif->tif_foundfield && tif->tif_foundfield->field_tag == tag &&
(dt == TIFF_ANY || dt == tif->tif_foundfield->field_type))
- return (tif->tif_foundfield);
- /* NB: use sorted search (e.g. binary search) */
- if(dt != TIFF_ANY) {
- TIFFFieldInfo key = {0, 0, 0, TIFF_NOTYPE, 0, 0, 0, 0};
- TIFFFieldInfo* pkey = &key;
- const TIFFFieldInfo **ret;
-
- key.field_tag = tag;
- key.field_type = dt;
-
- ret = (const TIFFFieldInfo **) bsearch(&pkey,
- tif->tif_fieldinfo,
- tif->tif_nfields,
- sizeof(TIFFFieldInfo *),
- tagCompare);
- return (ret) ? (*ret) : NULL;
- } else for (i = 0, n = tif->tif_nfields; i < n; i++) {
- const TIFFFieldInfo* fip = tif->tif_fieldinfo[i];
- if (fip->field_tag == tag &&
- (dt == TIFF_ANY || fip->field_type == dt))
- return (tif->tif_foundfield = fip);
+ return tif->tif_foundfield;
+
+ /* If we are invoked with no field information, then just return. */
+ if ( !tif->tif_fieldinfo ) {
+ return NULL;
}
- return ((const TIFFFieldInfo *)0);
+
+ /* NB: use sorted search (e.g. binary search) */
+ key.field_tag = tag;
+ key.field_type = dt;
+
+ ret = (const TIFFFieldInfo **) bsearch(&pkey,
+ tif->tif_fieldinfo,
+ tif->tif_nfields,
+ sizeof(TIFFFieldInfo *),
+ tagCompare);
+ return tif->tif_foundfield = (ret ? *ret : NULL);
}
const TIFFFieldInfo*
_TIFFFindFieldInfoByName(TIFF* tif, const char *field_name, TIFFDataType dt)
{
- int i, n;
+ TIFFFieldInfo key = {0, 0, 0, TIFF_NOTYPE, 0, 0, 0, 0};
+ TIFFFieldInfo* pkey = &key;
+ const TIFFFieldInfo **ret;
if (tif->tif_foundfield
&& streq(tif->tif_foundfield->field_name, field_name)
&& (dt == TIFF_ANY || dt == tif->tif_foundfield->field_type))
return (tif->tif_foundfield);
+
+ /* If we are invoked with no field information, then just return. */
+ if ( !tif->tif_fieldinfo ) {
+ return NULL;
+ }
+
/* NB: use sorted search (e.g. binary search) */
- if(dt != TIFF_ANY) {
- TIFFFieldInfo key = {0, 0, 0, TIFF_NOTYPE, 0, 0, 0, 0};
- TIFFFieldInfo* pkey = &key;
- const TIFFFieldInfo **ret;
-
- key.field_name = (char *)field_name;
- key.field_type = dt;
-
- ret = (const TIFFFieldInfo **) lfind(&pkey,
- tif->tif_fieldinfo,
- &tif->tif_nfields,
- sizeof(TIFFFieldInfo *),
- tagNameCompare);
- return (ret) ? (*ret) : NULL;
- } else
- for (i = 0, n = tif->tif_nfields; i < n; i++) {
- const TIFFFieldInfo* fip = tif->tif_fieldinfo[i];
- if (streq(fip->field_name, field_name) &&
- (dt == TIFF_ANY || fip->field_type == dt))
- return (tif->tif_foundfield = fip);
- }
- return ((const TIFFFieldInfo *)0);
+ key.field_name = (char *)field_name;
+ key.field_type = dt;
+
+ ret = (const TIFFFieldInfo **) lfind(&pkey,
+ tif->tif_fieldinfo,
+ &tif->tif_nfields,
+ sizeof(TIFFFieldInfo *),
+ tagNameCompare);
+ return tif->tif_foundfield = (ret ? *ret : NULL);
}
const TIFFFieldInfo*
@@ -773,8 +806,8 @@ _TIFFFieldWithTag(TIFF* tif, ttag_t tag)
const TIFFFieldInfo* fip = _TIFFFindFieldInfo(tif, tag, TIFF_ANY);
if (!fip) {
TIFFErrorExt(tif->tif_clientdata, "TIFFFieldWithTag",
- "Internal error, unknown tag 0x%x",
- (unsigned int) tag);
+ "Internal error, unknown tag 0x%x",
+ (unsigned int) tag);
assert(fip != NULL);
/*NOTREACHED*/
}
@@ -788,7 +821,7 @@ _TIFFFieldWithName(TIFF* tif, const char *field_name)
_TIFFFindFieldInfoByName(tif, field_name, TIFF_ANY);
if (!fip) {
TIFFErrorExt(tif->tif_clientdata, "TIFFFieldWithName",
- "Internal error, unknown tag %s", field_name);
+ "Internal error, unknown tag %s", field_name);
assert(fip != NULL);
/*NOTREACHED*/
}
@@ -805,7 +838,8 @@ _TIFFFindOrRegisterFieldInfo( TIFF *tif, ttag_t tag, TIFFDataType dt )
if( fld == NULL )
{
fld = _TIFFCreateAnonFieldInfo( tif, tag, dt );
- _TIFFMergeFieldInfo( tif, fld, 1 );
+ if (!_TIFFMergeFieldInfo(tif, fld, 1))
+ return NULL;
}
return fld;
@@ -823,8 +857,8 @@ _TIFFCreateAnonFieldInfo(TIFF *tif, ttag_t tag, TIFFDataType field_type)
_TIFFmemset( fld, 0, sizeof(TIFFFieldInfo) );
fld->field_tag = tag;
- fld->field_readcount = TIFF_VARIABLE;
- fld->field_writecount = TIFF_VARIABLE;
+ fld->field_readcount = TIFF_VARIABLE2;
+ fld->field_writecount = TIFF_VARIABLE2;
fld->field_type = field_type;
fld->field_bit = FIELD_CUSTOM;
fld->field_oktochange = TRUE;
@@ -835,7 +869,8 @@ _TIFFCreateAnonFieldInfo(TIFF *tif, ttag_t tag, TIFFDataType field_type)
return NULL;
}
- /* note that this name is a special sign to TIFFClose() and
+ /*
+ * note that this name is a special sign to TIFFClose() and
* _TIFFSetupFieldInfo() to free the field
*/
sprintf(fld->field_name, "Tag %d", (int) tag);
diff --git a/src/3rdparty/libtiff/libtiff/tif_dirread.c b/src/3rdparty/libtiff/libtiff/tif_dirread.c
index 2147e335f7..52d53fc3ce 100644
--- a/src/3rdparty/libtiff/libtiff/tif_dirread.c
+++ b/src/3rdparty/libtiff/libtiff/tif_dirread.c
@@ -1,4 +1,4 @@
-/* $Id: tif_dirread.c,v 1.82 2006/03/16 12:24:53 dron Exp $ */
+/* $Id: tif_dirread.c,v 1.92.2.6 2009-10-29 20:04:32 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -41,9 +41,13 @@ extern void TIFFCvtIEEEFloatToNative(TIFF*, uint32, float*);
extern void TIFFCvtIEEEDoubleToNative(TIFF*, uint32, double*);
#endif
+static TIFFDirEntry* TIFFReadDirectoryFind(TIFFDirEntry* dir,
+ uint16 dircount, uint16 tagid);
static int EstimateStripByteCounts(TIFF*, TIFFDirEntry*, uint16);
static void MissingRequired(TIFF*, const char*);
+static int TIFFCheckDirOffset(TIFF*, toff_t);
static int CheckDirCount(TIFF*, TIFFDirEntry*, uint32);
+static uint16 TIFFFetchDirectory(TIFF*, toff_t, TIFFDirEntry**, toff_t *);
static tsize_t TIFFFetchData(TIFF*, TIFFDirEntry*, char*);
static tsize_t TIFFFetchString(TIFF*, TIFFDirEntry*, char*);
static float TIFFFetchRational(TIFF*, TIFFDirEntry*);
@@ -54,6 +58,7 @@ static int TIFFFetchPerSampleAnys(TIFF*, TIFFDirEntry*, double*);
static int TIFFFetchShortArray(TIFF*, TIFFDirEntry*, uint16*);
static int TIFFFetchStripThing(TIFF*, TIFFDirEntry*, long, uint32**);
static int TIFFFetchRefBlackWhite(TIFF*, TIFFDirEntry*);
+static int TIFFFetchSubjectDistance(TIFF*, TIFFDirEntry*);
static float TIFFFetchFloat(TIFF*, TIFFDirEntry*);
static int TIFFFetchFloatArray(TIFF*, TIFFDirEntry*, float*);
static int TIFFFetchDoubleArray(TIFF*, TIFFDirEntry*, double*);
@@ -62,9 +67,8 @@ static int TIFFFetchShortPair(TIFF*, TIFFDirEntry*);
static void ChopUpSingleUncompressedStrip(TIFF*);
/*
- * Read the next TIFF directory from a file
- * and convert it to the internal format.
- * We read directories sequentially.
+ * Read the next TIFF directory from a file and convert it to the internal
+ * format. We read directories sequentially.
*/
int
TIFFReadDirectory(TIFF* tif)
@@ -79,105 +83,27 @@ TIFFReadDirectory(TIFF* tif)
const TIFFFieldInfo* fip;
size_t fix;
uint16 dircount;
- toff_t nextdiroff;
- int diroutoforderwarning = 0;
- toff_t* new_dirlist;
+ int diroutoforderwarning = 0, compressionknown = 0;
tif->tif_diroff = tif->tif_nextdiroff;
- if (tif->tif_diroff == 0) /* no more directories */
- return (0);
-
/*
- * XXX: Trick to prevent IFD looping. The one can create TIFF file
- * with looped directory pointers. We will maintain a list of already
- * seen directories and check every IFD offset against this list.
+ * Check whether we have the last offset or bad offset (IFD looping).
*/
- for (n = 0; n < tif->tif_dirnumber; n++) {
- if (tif->tif_dirlist[n] == tif->tif_diroff)
- return (0);
- }
- tif->tif_dirnumber++;
- new_dirlist = (toff_t *)_TIFFrealloc(tif->tif_dirlist,
- tif->tif_dirnumber * sizeof(toff_t));
- if (!new_dirlist) {
- TIFFErrorExt(tif->tif_clientdata, module,
- "%s: Failed to allocate space for IFD list",
- tif->tif_name);
- return (0);
- }
- tif->tif_dirlist = new_dirlist;
- tif->tif_dirlist[tif->tif_dirnumber - 1] = tif->tif_diroff;
-
+ if (!TIFFCheckDirOffset(tif, tif->tif_nextdiroff))
+ return 0;
/*
* Cleanup any previous compression state.
*/
(*tif->tif_cleanup)(tif);
tif->tif_curdir++;
- nextdiroff = 0;
- if (!isMapped(tif)) {
- if (!SeekOK(tif, tif->tif_diroff)) {
- TIFFErrorExt(tif->tif_clientdata, module,
- "%s: Seek error accessing TIFF directory",
- tif->tif_name);
- return (0);
- }
- if (!ReadOK(tif, &dircount, sizeof (uint16))) {
- TIFFErrorExt(tif->tif_clientdata, module,
- "%s: Can not read TIFF directory count",
- tif->tif_name);
- return (0);
- }
- if (tif->tif_flags & TIFF_SWAB)
- TIFFSwabShort(&dircount);
- dir = (TIFFDirEntry *)_TIFFCheckMalloc(tif, dircount,
- sizeof (TIFFDirEntry),
- "to read TIFF directory");
- if (dir == NULL)
- return (0);
- if (!ReadOK(tif, dir, dircount*sizeof (TIFFDirEntry))) {
- TIFFErrorExt(tif->tif_clientdata, module,
- "%.100s: Can not read TIFF directory",
- tif->tif_name);
- goto bad;
- }
- /*
- * Read offset to next directory for sequential scans.
- */
- (void) ReadOK(tif, &nextdiroff, sizeof (uint32));
- } else {
- toff_t off = tif->tif_diroff;
-
- if (off + sizeof (uint16) > tif->tif_size) {
- TIFFErrorExt(tif->tif_clientdata, module,
- "%s: Can not read TIFF directory count",
- tif->tif_name);
- return (0);
- } else
- _TIFFmemcpy(&dircount, tif->tif_base + off, sizeof (uint16));
- off += sizeof (uint16);
- if (tif->tif_flags & TIFF_SWAB)
- TIFFSwabShort(&dircount);
- dir = (TIFFDirEntry *)_TIFFCheckMalloc(tif, dircount,
- sizeof (TIFFDirEntry),
- "to read TIFF directory");
- if (dir == NULL)
- return (0);
- if (off + dircount*sizeof (TIFFDirEntry) > tif->tif_size) {
- TIFFErrorExt(tif->tif_clientdata, module,
- "%s: Can not read TIFF directory",
- tif->tif_name);
- goto bad;
- } else {
- _TIFFmemcpy(dir, tif->tif_base + off,
- dircount*sizeof (TIFFDirEntry));
- }
- off += dircount* sizeof (TIFFDirEntry);
- if (off + sizeof (uint32) <= tif->tif_size)
- _TIFFmemcpy(&nextdiroff, tif->tif_base+off, sizeof (uint32));
+ dircount = TIFFFetchDirectory(tif, tif->tif_nextdiroff,
+ &dir, &tif->tif_nextdiroff);
+ if (!dircount) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "%s: Failed to read directory at offset %u",
+ tif->tif_name, tif->tif_nextdiroff);
+ return 0;
}
- if (tif->tif_flags & TIFF_SWAB)
- TIFFSwabLong(&nextdiroff);
- tif->tif_nextdiroff = nextdiroff;
tif->tif_flags &= ~TIFF_BEENWRITING; /* reset before new dir */
/*
@@ -216,7 +142,7 @@ TIFFReadDirectory(TIFF* tif)
*
* It sure would have been nice if Aldus had really thought
* this stuff through carefully.
- */
+ */
for (dp = dir, n = dircount; n > 0; n--, dp++) {
if (tif->tif_flags & TIFF_SWAB) {
TIFFSwabArrayOfShort(&dp->tdir_tag, 2);
@@ -236,7 +162,7 @@ TIFFReadDirectory(TIFF* tif)
if (fix >= tif->tif_nfields || dp->tdir_tag == IGNORE)
continue;
-
+
/*
* Silicon Beach (at least) writes unordered
* directory tags (violating the spec). Handle
@@ -246,13 +172,13 @@ TIFFReadDirectory(TIFF* tif)
if (!diroutoforderwarning) {
TIFFWarningExt(tif->tif_clientdata, module,
"%s: invalid TIFF directory; tags are not sorted in ascending order",
- tif->tif_name);
+ tif->tif_name);
diroutoforderwarning = 1;
}
fix = 0; /* O(n^2) */
}
while (fix < tif->tif_nfields &&
- tif->tif_fieldinfo[fix]->field_tag < dp->tdir_tag)
+ tif->tif_fieldinfo[fix]->field_tag < dp->tdir_tag)
fix++;
if (fix >= tif->tif_nfields ||
tif->tif_fieldinfo[fix]->field_tag != dp->tdir_tag) {
@@ -262,18 +188,25 @@ TIFFReadDirectory(TIFF* tif)
"%s: unknown field with tag %d (0x%x) encountered",
tif->tif_name,
dp->tdir_tag,
- dp->tdir_tag,
- dp->tdir_type);
+ dp->tdir_tag);
- TIFFMergeFieldInfo(tif,
- _TIFFCreateAnonFieldInfo(tif,
+ if (!_TIFFMergeFieldInfo(tif,
+ _TIFFCreateAnonFieldInfo(tif,
dp->tdir_tag,
(TIFFDataType) dp->tdir_type),
- 1 );
- fix = 0;
- while (fix < tif->tif_nfields &&
- tif->tif_fieldinfo[fix]->field_tag < dp->tdir_tag)
- fix++;
+ 1))
+ {
+ TIFFWarningExt(tif->tif_clientdata,
+ module,
+ "Registering anonymous field with tag %d (0x%x) failed",
+ dp->tdir_tag,
+ dp->tdir_tag);
+ goto ignore;
+ }
+ fix = 0;
+ while (fix < tif->tif_nfields &&
+ tif->tif_fieldinfo[fix]->field_tag < dp->tdir_tag)
+ fix++;
}
/*
* Null out old tags that we ignore.
@@ -288,10 +221,10 @@ TIFFReadDirectory(TIFF* tif)
*/
fip = tif->tif_fieldinfo[fix];
while (dp->tdir_type != (unsigned short) fip->field_type
- && fix < tif->tif_nfields) {
+ && fix < tif->tif_nfields) {
if (fip->field_type == TIFF_ANY) /* wildcard */
break;
- fip = tif->tif_fieldinfo[++fix];
+ fip = tif->tif_fieldinfo[++fix];
if (fix >= tif->tif_nfields ||
fip->field_tag != dp->tdir_tag) {
TIFFWarningExt(tif->tif_clientdata, module,
@@ -326,6 +259,8 @@ TIFFReadDirectory(TIFF* tif)
dp->tdir_type, dp->tdir_offset);
if (!TIFFSetField(tif, dp->tdir_tag, (uint16)v))
goto bad;
+ else
+ compressionknown = 1;
break;
/* XXX: workaround for broken TIFFs */
} else if (dp->tdir_type == TIFF_LONG) {
@@ -362,6 +297,30 @@ TIFFReadDirectory(TIFF* tif)
}
/*
+ * XXX: OJPEG hack.
+ * If a) compression is OJPEG, b) planarconfig tag says it's separate,
+ * c) strip offsets/bytecounts tag are both present and
+ * d) both contain exactly one value, then we consistently find
+ * that the buggy implementation of the buggy compression scheme
+ * matches contig planarconfig best. So we 'fix-up' the tag here
+ */
+ if ((td->td_compression==COMPRESSION_OJPEG) &&
+ (td->td_planarconfig==PLANARCONFIG_SEPARATE)) {
+ dp = TIFFReadDirectoryFind(dir,dircount,TIFFTAG_STRIPOFFSETS);
+ if ((dp!=0) && (dp->tdir_count==1)) {
+ dp = TIFFReadDirectoryFind(dir, dircount,
+ TIFFTAG_STRIPBYTECOUNTS);
+ if ((dp!=0) && (dp->tdir_count==1)) {
+ td->td_planarconfig=PLANARCONFIG_CONTIG;
+ TIFFWarningExt(tif->tif_clientdata,
+ "TIFFReadDirectory",
+ "Planarconfig tag value assumed incorrect, "
+ "assuming data is contig instead of chunky");
+ }
+ }
+ }
+
+ /*
* Allocate directory structure and setup defaults.
*/
if (!TIFFFieldSet(tif, FIELD_IMAGEDIMENSIONS)) {
@@ -369,7 +328,7 @@ TIFFReadDirectory(TIFF* tif)
goto bad;
}
/*
- * Setup appropriate structures (by strip or by tile)
+ * Setup appropriate structures (by strip or by tile)
*/
if (!TIFFFieldSet(tif, FIELD_TILEDIMENSIONS)) {
td->td_nstrips = TIFFNumberOfStrips(tif);
@@ -391,9 +350,23 @@ TIFFReadDirectory(TIFF* tif)
if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
td->td_stripsperimage /= td->td_samplesperpixel;
if (!TIFFFieldSet(tif, FIELD_STRIPOFFSETS)) {
- MissingRequired(tif,
+ if ((td->td_compression==COMPRESSION_OJPEG) &&
+ (isTiled(tif)==0) &&
+ (td->td_nstrips==1)) {
+ /*
+ * XXX: OJPEG hack.
+ * If a) compression is OJPEG, b) it's not a tiled TIFF,
+ * and c) the number of strips is 1,
+ * then we tolerate the absence of stripoffsets tag,
+ * because, presumably, all required data is in the
+ * JpegInterchangeFormat stream.
+ */
+ TIFFSetFieldBit(tif, FIELD_STRIPOFFSETS);
+ } else {
+ MissingRequired(tif,
isTiled(tif) ? "TileOffsets" : "StripOffsets");
- goto bad;
+ goto bad;
+ }
}
/*
@@ -414,11 +387,11 @@ TIFFReadDirectory(TIFF* tif)
* one value per sample. Because of this, we
* accept the tag if one value is supplied.
*
- * The MinSampleValue, MaxSampleValue, BitsPerSample
- * DataType and SampleFormat tags are supposed to be
- * written as one value/sample, but some vendors
- * incorrectly write one value only -- so we accept
- * that as well (yech). Other vendors write correct
+ * The MinSampleValue, MaxSampleValue, BitsPerSample
+ * DataType and SampleFormat tags are supposed to be
+ * written as one value/sample, but some vendors
+ * incorrectly write one value only -- so we accept
+ * that as well (yech). Other vendors write correct
* value for NumberOfSamples, but incorrect one for
* BitsPerSample and friends, and we will read this
* too.
@@ -529,6 +502,69 @@ TIFFReadDirectory(TIFF* tif)
}
}
/*
+ * OJPEG hack:
+ * - If a) compression is OJPEG, and b) photometric tag is missing,
+ * then we consistently find that photometric should be YCbCr
+ * - If a) compression is OJPEG, and b) photometric tag says it's RGB,
+ * then we consistently find that the buggy implementation of the
+ * buggy compression scheme matches photometric YCbCr instead.
+ * - If a) compression is OJPEG, and b) bitspersample tag is missing,
+ * then we consistently find bitspersample should be 8.
+ * - If a) compression is OJPEG, b) samplesperpixel tag is missing,
+ * and c) photometric is RGB or YCbCr, then we consistently find
+ * samplesperpixel should be 3
+ * - If a) compression is OJPEG, b) samplesperpixel tag is missing,
+ * and c) photometric is MINISWHITE or MINISBLACK, then we consistently
+ * find samplesperpixel should be 3
+ */
+ if (td->td_compression==COMPRESSION_OJPEG)
+ {
+ if (!TIFFFieldSet(tif,FIELD_PHOTOMETRIC))
+ {
+ TIFFWarningExt(tif->tif_clientdata, "TIFFReadDirectory",
+ "Photometric tag is missing, assuming data is YCbCr");
+ if (!TIFFSetField(tif,TIFFTAG_PHOTOMETRIC,PHOTOMETRIC_YCBCR))
+ goto bad;
+ }
+ else if (td->td_photometric==PHOTOMETRIC_RGB)
+ {
+ td->td_photometric=PHOTOMETRIC_YCBCR;
+ TIFFWarningExt(tif->tif_clientdata, "TIFFReadDirectory",
+ "Photometric tag value assumed incorrect, "
+ "assuming data is YCbCr instead of RGB");
+ }
+ if (!TIFFFieldSet(tif,FIELD_BITSPERSAMPLE))
+ {
+ TIFFWarningExt(tif->tif_clientdata,"TIFFReadDirectory",
+ "BitsPerSample tag is missing, assuming 8 bits per sample");
+ if (!TIFFSetField(tif,TIFFTAG_BITSPERSAMPLE,8))
+ goto bad;
+ }
+ if (!TIFFFieldSet(tif,FIELD_SAMPLESPERPIXEL))
+ {
+ if ((td->td_photometric==PHOTOMETRIC_RGB)
+ || (td->td_photometric==PHOTOMETRIC_YCBCR))
+ {
+ TIFFWarningExt(tif->tif_clientdata,
+ "TIFFReadDirectory",
+ "SamplesPerPixel tag is missing, "
+ "assuming correct SamplesPerPixel value is 3");
+ if (!TIFFSetField(tif,TIFFTAG_SAMPLESPERPIXEL,3))
+ goto bad;
+ }
+ else if ((td->td_photometric==PHOTOMETRIC_MINISWHITE)
+ || (td->td_photometric==PHOTOMETRIC_MINISBLACK))
+ {
+ TIFFWarningExt(tif->tif_clientdata,
+ "TIFFReadDirectory",
+ "SamplesPerPixel tag is missing, "
+ "assuming correct SamplesPerPixel value is 1");
+ if (!TIFFSetField(tif,TIFFTAG_SAMPLESPERPIXEL,1))
+ goto bad;
+ }
+ }
+ }
+ /*
* Verify Palette image has a Colormap.
*/
if (td->td_photometric == PHOTOMETRIC_PALETTE &&
@@ -537,76 +573,90 @@ TIFFReadDirectory(TIFF* tif)
goto bad;
}
/*
- * Attempt to deal with a missing StripByteCounts tag.
+ * OJPEG hack:
+ * We do no further messing with strip/tile offsets/bytecounts in OJPEG
+ * TIFFs
*/
- if (!TIFFFieldSet(tif, FIELD_STRIPBYTECOUNTS)) {
+ if (td->td_compression!=COMPRESSION_OJPEG)
+ {
/*
- * Some manufacturers violate the spec by not giving
- * the size of the strips. In this case, assume there
- * is one uncompressed strip of data.
+ * Attempt to deal with a missing StripByteCounts tag.
*/
- if ((td->td_planarconfig == PLANARCONFIG_CONTIG &&
- td->td_nstrips > 1) ||
- (td->td_planarconfig == PLANARCONFIG_SEPARATE &&
- td->td_nstrips != td->td_samplesperpixel)) {
- MissingRequired(tif, "StripByteCounts");
- goto bad;
- }
- TIFFWarningExt(tif->tif_clientdata, module,
- "%s: TIFF directory is missing required "
- "\"%s\" field, calculating from imagelength",
- tif->tif_name,
- _TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
- if (EstimateStripByteCounts(tif, dir, dircount) < 0)
- goto bad;
-/*
- * Assume we have wrong StripByteCount value (in case of single strip) in
- * following cases:
- * - it is equal to zero along with StripOffset;
- * - it is larger than file itself (in case of uncompressed image);
- * - it is smaller than the size of the bytes per row multiplied on the
- * number of rows. The last case should not be checked in the case of
- * writing new image, because we may do not know the exact strip size
- * until the whole image will be written and directory dumped out.
- */
-#define BYTECOUNTLOOKSBAD \
- ( (td->td_stripbytecount[0] == 0 && td->td_stripoffset[0] != 0) || \
- (td->td_compression == COMPRESSION_NONE && \
- td->td_stripbytecount[0] > TIFFGetFileSize(tif) - td->td_stripoffset[0]) || \
- (tif->tif_mode == O_RDONLY && \
- td->td_compression == COMPRESSION_NONE && \
- td->td_stripbytecount[0] < TIFFScanlineSize(tif) * td->td_imagelength) )
-
- } else if (td->td_nstrips == 1
- && td->td_stripoffset[0] != 0
- && BYTECOUNTLOOKSBAD) {
+ if (!TIFFFieldSet(tif, FIELD_STRIPBYTECOUNTS)) {
+ /*
+ * Some manufacturers violate the spec by not giving
+ * the size of the strips. In this case, assume there
+ * is one uncompressed strip of data.
+ */
+ if ((td->td_planarconfig == PLANARCONFIG_CONTIG &&
+ td->td_nstrips > 1) ||
+ (td->td_planarconfig == PLANARCONFIG_SEPARATE &&
+ td->td_nstrips != td->td_samplesperpixel)) {
+ MissingRequired(tif, "StripByteCounts");
+ goto bad;
+ }
+ TIFFWarningExt(tif->tif_clientdata, module,
+ "%s: TIFF directory is missing required "
+ "\"%s\" field, calculating from imagelength",
+ tif->tif_name,
+ _TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
+ if (EstimateStripByteCounts(tif, dir, dircount) < 0)
+ goto bad;
/*
- * XXX: Plexus (and others) sometimes give a value of zero for
- * a tag when they don't know what the correct value is! Try
- * and handle the simple case of estimating the size of a one
- * strip image.
+ * Assume we have wrong StripByteCount value (in case
+ * of single strip) in following cases:
+ * - it is equal to zero along with StripOffset;
+ * - it is larger than file itself (in case of uncompressed
+ * image);
+ * - it is smaller than the size of the bytes per row
+ * multiplied on the number of rows. The last case should
+ * not be checked in the case of writing new image,
+ * because we may do not know the exact strip size
+ * until the whole image will be written and directory
+ * dumped out.
*/
- TIFFWarningExt(tif->tif_clientdata, module,
+ #define BYTECOUNTLOOKSBAD \
+ ( (td->td_stripbytecount[0] == 0 && td->td_stripoffset[0] != 0) || \
+ (td->td_compression == COMPRESSION_NONE && \
+ td->td_stripbytecount[0] > TIFFGetFileSize(tif) - td->td_stripoffset[0]) || \
+ (tif->tif_mode == O_RDONLY && \
+ td->td_compression == COMPRESSION_NONE && \
+ td->td_stripbytecount[0] < TIFFScanlineSize(tif) * td->td_imagelength) )
+
+ } else if (td->td_nstrips == 1
+ && td->td_stripoffset[0] != 0
+ && BYTECOUNTLOOKSBAD) {
+ /*
+ * XXX: Plexus (and others) sometimes give a value of
+ * zero for a tag when they don't know what the
+ * correct value is! Try and handle the simple case
+ * of estimating the size of a one strip image.
+ */
+ TIFFWarningExt(tif->tif_clientdata, module,
"%s: Bogus \"%s\" field, ignoring and calculating from imagelength",
- tif->tif_name,
- _TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
- if(EstimateStripByteCounts(tif, dir, dircount) < 0)
- goto bad;
- } else if (td->td_planarconfig == PLANARCONFIG_CONTIG
- && td->td_nstrips > 2
- && td->td_compression == COMPRESSION_NONE
- && td->td_stripbytecount[0] != td->td_stripbytecount[1]) {
- /*
- * XXX: Some vendors fill StripByteCount array with absolutely
- * wrong values (it can be equal to StripOffset array, for
- * example). Catch this case here.
- */
- TIFFWarningExt(tif->tif_clientdata, module,
+ tif->tif_name,
+ _TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
+ if(EstimateStripByteCounts(tif, dir, dircount) < 0)
+ goto bad;
+ } else if (td->td_planarconfig == PLANARCONFIG_CONTIG
+ && td->td_nstrips > 2
+ && td->td_compression == COMPRESSION_NONE
+ && td->td_stripbytecount[0] != td->td_stripbytecount[1]
+ && td->td_stripbytecount[0] != 0
+ && td->td_stripbytecount[1] != 0 ) {
+ /*
+ * XXX: Some vendors fill StripByteCount array with
+ * absolutely wrong values (it can be equal to
+ * StripOffset array, for example). Catch this case
+ * here.
+ */
+ TIFFWarningExt(tif->tif_clientdata, module,
"%s: Wrong \"%s\" field, ignoring and calculating from imagelength",
- tif->tif_name,
- _TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
- if (EstimateStripByteCounts(tif, dir, dircount) < 0)
- goto bad;
+ tif->tif_name,
+ _TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
+ if (EstimateStripByteCounts(tif, dir, dircount) < 0)
+ goto bad;
+ }
}
if (dir) {
_TIFFfree((char *)dir);
@@ -638,15 +688,15 @@ TIFFReadDirectory(TIFF* tif)
if (!TIFFFieldSet(tif, FIELD_COMPRESSION))
TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
- /*
- * Some manufacturers make life difficult by writing
+ /*
+ * Some manufacturers make life difficult by writing
* large amounts of uncompressed data as a single strip.
* This is contrary to the recommendations of the spec.
- * The following makes an attempt at breaking such images
+ * The following makes an attempt at breaking such images
* into strips closer to the recommended 8k bytes. A
* side effect, however, is that the RowsPerStrip tag
* value may be changed.
- */
+ */
if (td->td_nstrips == 1 && td->td_compression == COMPRESSION_NONE &&
(tif->tif_flags & (TIFF_STRIPCHOP|TIFF_ISTILED)) == TIFF_STRIPCHOP)
ChopUpSingleUncompressedStrip(tif);
@@ -662,22 +712,25 @@ TIFFReadDirectory(TIFF* tif)
tif->tif_scanlinesize = TIFFScanlineSize(tif);
if (!tif->tif_scanlinesize) {
- TIFFErrorExt(tif->tif_clientdata, module, "%s: cannot handle zero scanline size",
- tif->tif_name);
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "%s: cannot handle zero scanline size",
+ tif->tif_name);
return (0);
}
if (isTiled(tif)) {
tif->tif_tilesize = TIFFTileSize(tif);
if (!tif->tif_tilesize) {
- TIFFErrorExt(tif->tif_clientdata, module, "%s: cannot handle zero tile size",
- tif->tif_name);
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "%s: cannot handle zero tile size",
+ tif->tif_name);
return (0);
}
} else {
if (!TIFFStripSize(tif)) {
- TIFFErrorExt(tif->tif_clientdata, module, "%s: cannot handle zero strip size",
- tif->tif_name);
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "%s: cannot handle zero strip size",
+ tif->tif_name);
return (0);
}
}
@@ -688,7 +741,20 @@ bad:
return (0);
}
-/*
+static TIFFDirEntry*
+TIFFReadDirectoryFind(TIFFDirEntry* dir, uint16 dircount, uint16 tagid)
+{
+ TIFFDirEntry* m;
+ uint16 n;
+ for (m=dir, n=0; n<dircount; m++, n++)
+ {
+ if (m->tdir_tag==tagid)
+ return(m);
+ }
+ return(0);
+}
+
+/*
* Read custom directory from the arbitarry offset.
* The code is very similar to TIFFReadDirectory().
*/
@@ -706,64 +772,16 @@ TIFFReadCustomDirectory(TIFF* tif, toff_t diroff,
_TIFFSetupFieldInfo(tif, info, n);
- tif->tif_diroff = diroff;
-
- if (!isMapped(tif)) {
- if (!SeekOK(tif, diroff)) {
- TIFFErrorExt(tif->tif_clientdata, module,
- "%s: Seek error accessing TIFF directory",
- tif->tif_name);
- return (0);
- }
- if (!ReadOK(tif, &dircount, sizeof (uint16))) {
- TIFFErrorExt(tif->tif_clientdata, module,
- "%s: Can not read TIFF directory count",
- tif->tif_name);
- return (0);
- }
- if (tif->tif_flags & TIFF_SWAB)
- TIFFSwabShort(&dircount);
- dir = (TIFFDirEntry *)_TIFFCheckMalloc(tif, dircount,
- sizeof (TIFFDirEntry),
- "to read TIFF custom directory");
- if (dir == NULL)
- return (0);
- if (!ReadOK(tif, dir, dircount * sizeof (TIFFDirEntry))) {
- TIFFErrorExt(tif->tif_clientdata, module,
- "%.100s: Can not read TIFF directory",
- tif->tif_name);
- goto bad;
- }
- } else {
- toff_t off = diroff;
-
- if (off + sizeof (uint16) > tif->tif_size) {
- TIFFErrorExt(tif->tif_clientdata, module,
- "%s: Can not read TIFF directory count",
- tif->tif_name);
- return (0);
- } else
- _TIFFmemcpy(&dircount, tif->tif_base + off, sizeof (uint16));
- off += sizeof (uint16);
- if (tif->tif_flags & TIFF_SWAB)
- TIFFSwabShort(&dircount);
- dir = (TIFFDirEntry *)_TIFFCheckMalloc(tif, dircount,
- sizeof (TIFFDirEntry),
- "to read TIFF custom directory");
- if (dir == NULL)
- return (0);
- if (off + dircount * sizeof (TIFFDirEntry) > tif->tif_size) {
- TIFFErrorExt(tif->tif_clientdata, module,
- "%s: Can not read TIFF directory",
- tif->tif_name);
- goto bad;
- } else {
- _TIFFmemcpy(dir, tif->tif_base + off,
- dircount * sizeof (TIFFDirEntry));
- }
+ dircount = TIFFFetchDirectory(tif, diroff, &dir, NULL);
+ if (!dircount) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "%s: Failed to read custom directory at offset %u",
+ tif->tif_name, diroff);
+ return 0;
}
TIFFFreeDirectory(tif);
+ _TIFFmemset(&tif->tif_dir, 0, sizeof(TIFFDirectory));
fix = 0;
for (dp = dir, i = dircount; i > 0; i--, dp++) {
@@ -784,14 +802,18 @@ TIFFReadCustomDirectory(TIFF* tif, toff_t diroff,
TIFFWarningExt(tif->tif_clientdata, module,
"%s: unknown field with tag %d (0x%x) encountered",
- tif->tif_name, dp->tdir_tag, dp->tdir_tag,
- dp->tdir_type);
-
- TIFFMergeFieldInfo(tif,
- _TIFFCreateAnonFieldInfo(tif,
- dp->tdir_tag,
- (TIFFDataType)dp->tdir_type),
- 1);
+ tif->tif_name, dp->tdir_tag, dp->tdir_tag);
+ if (!_TIFFMergeFieldInfo(tif,
+ _TIFFCreateAnonFieldInfo(tif,
+ dp->tdir_tag,
+ (TIFFDataType) dp->tdir_type),
+ 1))
+ {
+ TIFFWarningExt(tif->tif_clientdata, module,
+ "Registering anonymous field with tag %d (0x%x) failed",
+ dp->tdir_tag, dp->tdir_tag);
+ goto ignore;
+ }
fix = 0;
while (fix < tif->tif_nfields &&
@@ -836,17 +858,22 @@ TIFFReadCustomDirectory(TIFF* tif, toff_t diroff,
goto ignore;
}
- (void) TIFFFetchNormalTag(tif, dp);
+ /*
+ * EXIF tags which need to be specifically processed.
+ */
+ switch (dp->tdir_tag) {
+ case EXIFTAG_SUBJECTDISTANCE:
+ (void) TIFFFetchSubjectDistance(tif, dp);
+ break;
+ default:
+ (void) TIFFFetchNormalTag(tif, dp);
+ break;
+ }
}
if (dir)
_TIFFfree(dir);
return 1;
-
-bad:
- if (dir)
- _TIFFfree(dir);
- return 0;
}
/*
@@ -868,15 +895,18 @@ EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount)
{
static const char module[] = "EstimateStripByteCounts";
- register TIFFDirEntry *dp;
- register TIFFDirectory *td = &tif->tif_dir;
- uint16 i;
+ TIFFDirEntry *dp;
+ TIFFDirectory *td = &tif->tif_dir;
+ uint32 strip;
if (td->td_stripbytecount)
_TIFFfree(td->td_stripbytecount);
td->td_stripbytecount = (uint32*)
_TIFFCheckMalloc(tif, td->td_nstrips, sizeof (uint32),
"for \"StripByteCounts\" array");
+ if( td->td_stripbytecount == NULL )
+ return -1;
+
if (td->td_compression != COMPRESSION_NONE) {
uint32 space = (uint32)(sizeof (TIFFHeader)
+ sizeof (uint16)
@@ -902,8 +932,8 @@ EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount)
space = filesize - space;
if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
space /= td->td_samplesperpixel;
- for (i = 0; i < td->td_nstrips; i++)
- td->td_stripbytecount[i] = space;
+ for (strip = 0; strip < td->td_nstrips; strip++)
+ td->td_stripbytecount[strip] = space;
/*
* This gross hack handles the case were the offset to
* the last strip is past the place where we think the strip
@@ -911,16 +941,21 @@ EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount)
* it's safe to assume that we've overestimated the amount
* of data in the strip and trim this number back accordingly.
*/
- i--;
- if (((toff_t)(td->td_stripoffset[i]+td->td_stripbytecount[i]))
- > filesize)
- td->td_stripbytecount[i] =
- filesize - td->td_stripoffset[i];
+ strip--;
+ if (((toff_t)(td->td_stripoffset[strip]+
+ td->td_stripbytecount[strip])) > filesize)
+ td->td_stripbytecount[strip] =
+ filesize - td->td_stripoffset[strip];
+ } else if (isTiled(tif)) {
+ uint32 bytespertile = TIFFTileSize(tif);
+
+ for (strip = 0; strip < td->td_nstrips; strip++)
+ td->td_stripbytecount[strip] = bytespertile;
} else {
uint32 rowbytes = TIFFScanlineSize(tif);
uint32 rowsperstrip = td->td_imagelength/td->td_stripsperimage;
- for (i = 0; i < td->td_nstrips; i++)
- td->td_stripbytecount[i] = rowbytes*rowsperstrip;
+ for (strip = 0; strip < td->td_nstrips; strip++)
+ td->td_stripbytecount[strip] = rowbytes * rowsperstrip;
}
TIFFSetFieldBit(tif, FIELD_STRIPBYTECOUNTS);
if (!TIFFFieldSet(tif, FIELD_ROWSPERSTRIP))
@@ -939,23 +974,65 @@ MissingRequired(TIFF* tif, const char* tagname)
}
/*
- * Check the count field of a directory
- * entry against a known value. The caller
- * is expected to skip/ignore the tag if
- * there is a mismatch.
+ * Check the directory offset against the list of already seen directory
+ * offsets. This is a trick to prevent IFD looping. The one can create TIFF
+ * file with looped directory pointers. We will maintain a list of already
+ * seen directories and check every IFD offset against that list.
+ */
+static int
+TIFFCheckDirOffset(TIFF* tif, toff_t diroff)
+{
+ uint16 n;
+
+ if (diroff == 0) /* no more directories */
+ return 0;
+
+ for (n = 0; n < tif->tif_dirnumber && tif->tif_dirlist; n++) {
+ if (tif->tif_dirlist[n] == diroff)
+ return 0;
+ }
+
+ tif->tif_dirnumber++;
+
+ if (tif->tif_dirnumber > tif->tif_dirlistsize) {
+ toff_t* new_dirlist;
+
+ /*
+ * XXX: Reduce memory allocation granularity of the dirlist
+ * array.
+ */
+ new_dirlist = (toff_t *)_TIFFCheckRealloc(tif,
+ tif->tif_dirlist,
+ tif->tif_dirnumber,
+ 2 * sizeof(toff_t),
+ "for IFD list");
+ if (!new_dirlist)
+ return 0;
+ tif->tif_dirlistsize = 2 * tif->tif_dirnumber;
+ tif->tif_dirlist = new_dirlist;
+ }
+
+ tif->tif_dirlist[tif->tif_dirnumber - 1] = diroff;
+
+ return 1;
+}
+
+/*
+ * Check the count field of a directory entry against a known value. The
+ * caller is expected to skip/ignore the tag if there is a mismatch.
*/
static int
CheckDirCount(TIFF* tif, TIFFDirEntry* dir, uint32 count)
{
if (count > dir->tdir_count) {
TIFFWarningExt(tif->tif_clientdata, tif->tif_name,
- "incorrect count for field \"%s\" (%lu, expecting %lu); tag ignored",
+ "incorrect count for field \"%s\" (%u, expecting %u); tag ignored",
_TIFFFieldWithTag(tif, dir->tdir_tag)->field_name,
dir->tdir_count, count);
return (0);
} else if (count < dir->tdir_count) {
TIFFWarningExt(tif->tif_clientdata, tif->tif_name,
- "incorrect count for field \"%s\" (%lu, expecting %lu); tag trimmed",
+ "incorrect count for field \"%s\" (%u, expecting %u); tag trimmed",
_TIFFFieldWithTag(tif, dir->tdir_tag)->field_name,
dir->tdir_count, count);
return (1);
@@ -964,16 +1041,128 @@ CheckDirCount(TIFF* tif, TIFFDirEntry* dir, uint32 count)
}
/*
+ * Read IFD structure from the specified offset. If the pointer to
+ * nextdiroff variable has been specified, read it too. Function returns a
+ * number of fields in the directory or 0 if failed.
+ */
+static uint16
+TIFFFetchDirectory(TIFF* tif, toff_t diroff, TIFFDirEntry **pdir,
+ toff_t *nextdiroff)
+{
+ static const char module[] = "TIFFFetchDirectory";
+
+ TIFFDirEntry *dir;
+ uint16 dircount;
+
+ assert(pdir);
+
+ tif->tif_diroff = diroff;
+ if (nextdiroff)
+ *nextdiroff = 0;
+ if (!isMapped(tif)) {
+ if (!SeekOK(tif, tif->tif_diroff)) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "%s: Seek error accessing TIFF directory",
+ tif->tif_name);
+ return 0;
+ }
+ if (!ReadOK(tif, &dircount, sizeof (uint16))) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "%s: Can not read TIFF directory count",
+ tif->tif_name);
+ return 0;
+ }
+ if (tif->tif_flags & TIFF_SWAB)
+ TIFFSwabShort(&dircount);
+ dir = (TIFFDirEntry *)_TIFFCheckMalloc(tif, dircount,
+ sizeof (TIFFDirEntry),
+ "to read TIFF directory");
+ if (dir == NULL)
+ return 0;
+ if (!ReadOK(tif, dir, dircount*sizeof (TIFFDirEntry))) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "%.100s: Can not read TIFF directory",
+ tif->tif_name);
+ _TIFFfree(dir);
+ return 0;
+ }
+ /*
+ * Read offset to next directory for sequential scans if
+ * needed.
+ */
+ if (nextdiroff)
+ (void) ReadOK(tif, nextdiroff, sizeof(uint32));
+ } else {
+ toff_t off = tif->tif_diroff;
+
+ /*
+ * Check for integer overflow when validating the dir_off,
+ * otherwise a very high offset may cause an OOB read and
+ * crash the client. Make two comparisons instead of
+ *
+ * off + sizeof(uint16) > tif->tif_size
+ *
+ * to avoid overflow.
+ */
+ if (tif->tif_size < sizeof (uint16) ||
+ off > tif->tif_size - sizeof(uint16)) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "%s: Can not read TIFF directory count",
+ tif->tif_name);
+ return 0;
+ } else {
+ _TIFFmemcpy(&dircount, tif->tif_base + off,
+ sizeof(uint16));
+ }
+ off += sizeof (uint16);
+ if (tif->tif_flags & TIFF_SWAB)
+ TIFFSwabShort(&dircount);
+ dir = (TIFFDirEntry *)_TIFFCheckMalloc(tif, dircount,
+ sizeof(TIFFDirEntry),
+ "to read TIFF directory");
+ if (dir == NULL)
+ return 0;
+ if (off + dircount * sizeof (TIFFDirEntry) > tif->tif_size) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "%s: Can not read TIFF directory",
+ tif->tif_name);
+ _TIFFfree(dir);
+ return 0;
+ } else {
+ _TIFFmemcpy(dir, tif->tif_base + off,
+ dircount * sizeof(TIFFDirEntry));
+ }
+ if (nextdiroff) {
+ off += dircount * sizeof (TIFFDirEntry);
+ if (off + sizeof (uint32) <= tif->tif_size) {
+ _TIFFmemcpy(nextdiroff, tif->tif_base + off,
+ sizeof (uint32));
+ }
+ }
+ }
+ if (nextdiroff && tif->tif_flags & TIFF_SWAB)
+ TIFFSwabLong(nextdiroff);
+ *pdir = dir;
+ return dircount;
+}
+
+/*
* Fetch a contiguous directory item.
*/
static tsize_t
TIFFFetchData(TIFF* tif, TIFFDirEntry* dir, char* cp)
{
- int w = TIFFDataWidth((TIFFDataType) dir->tdir_type);
- tsize_t cc = dir->tdir_count * w;
+ uint32 w = TIFFDataWidth((TIFFDataType) dir->tdir_type);
+ /*
+ * FIXME: butecount should have tsize_t type, but for now libtiff
+ * defines tsize_t as a signed 32-bit integer and we are losing
+ * ability to read arrays larger than 2^31 bytes. So we are using
+ * uint32 instead of tsize_t here.
+ */
+ uint32 cc = dir->tdir_count * w;
/* Check for overflow. */
- if (!dir->tdir_count || !w || cc / w != (tsize_t)dir->tdir_count)
+ if (!dir->tdir_count || !w || cc / w != dir->tdir_count)
goto bad;
if (!isMapped(tif)) {
@@ -983,9 +1172,9 @@ TIFFFetchData(TIFF* tif, TIFFDirEntry* dir, char* cp)
goto bad;
} else {
/* Check for overflow. */
- if ((tsize_t)dir->tdir_offset + cc < (tsize_t)dir->tdir_offset
- || (tsize_t)dir->tdir_offset + cc < cc
- || (tsize_t)dir->tdir_offset + cc > (tsize_t)tif->tif_size)
+ if (dir->tdir_offset + cc < dir->tdir_offset
+ || dir->tdir_offset + cc < cc
+ || dir->tdir_offset + cc > tif->tif_size)
goto bad;
_TIFFmemcpy(cp, tif->tif_base + dir->tdir_offset, cc);
}
@@ -1041,7 +1230,7 @@ cvtRational(TIFF* tif, TIFFDirEntry* dir, uint32 num, uint32 denom, float* rv)
{
if (denom == 0) {
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
- "%s: Rational with zero denominator (num = %lu)",
+ "%s: Rational with zero denominator (num = %u)",
_TIFFFieldWithTag(tif, dir->tdir_tag)->field_name, num);
return (0);
} else {
@@ -1054,9 +1243,8 @@ cvtRational(TIFF* tif, TIFFDirEntry* dir, uint32 num, uint32 denom, float* rv)
}
/*
- * Fetch a rational item from the file
- * at offset off and return the value
- * as a floating point number.
+ * Fetch a rational item from the file at offset off and return the value as a
+ * floating point number.
*/
static float
TIFFFetchRational(TIFF* tif, TIFFDirEntry* dir)
@@ -1069,9 +1257,8 @@ TIFFFetchRational(TIFF* tif, TIFFDirEntry* dir)
}
/*
- * Fetch a single floating point value
- * from the offset field and return it
- * as a native float.
+ * Fetch a single floating point value from the offset field and return it as
+ * a native float.
*/
static float
TIFFFetchFloat(TIFF* tif, TIFFDirEntry* dir)
@@ -1159,6 +1346,18 @@ TIFFFetchShortArray(TIFF* tif, TIFFDirEntry* dir, uint16* v)
static int
TIFFFetchShortPair(TIFF* tif, TIFFDirEntry* dir)
{
+ /*
+ * Prevent overflowing the v stack arrays below by performing a sanity
+ * check on tdir_count, this should never be greater than two.
+ */
+ if (dir->tdir_count > 2) {
+ TIFFWarningExt(tif->tif_clientdata, tif->tif_name,
+ "unexpected count for field \"%s\", %u, expected 2; ignored",
+ _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name,
+ dir->tdir_count);
+ return 0;
+ }
+
switch (dir->tdir_type) {
case TIFF_BYTE:
case TIFF_SBYTE:
@@ -1227,7 +1426,14 @@ TIFFFetchFloatArray(TIFF* tif, TIFFDirEntry* dir, float* v)
{
if (dir->tdir_count == 1) {
- v[0] = *(float*) &dir->tdir_offset;
+ union
+ {
+ float f;
+ uint32 i;
+ } float_union;
+
+ float_union.i=dir->tdir_offset;
+ v[0]=float_union.f;
TIFFCvtIEEEFloatToNative(tif, dir->tdir_count, v);
return (1);
} else if (TIFFFetchData(tif, dir, (char*) v)) {
@@ -1251,15 +1457,13 @@ TIFFFetchDoubleArray(TIFF* tif, TIFFDirEntry* dir, double* v)
}
/*
- * Fetch an array of ANY values. The actual values are
- * returned as doubles which should be able hold all the
- * types. Yes, there really should be an tany_t to avoid
- * this potential non-portability ... Note in particular
- * that we assume that the double return value vector is
- * large enough to read in any fundamental type. We use
- * that vector as a buffer to read in the base type vector
- * and then convert it in place to double (from end
- * to front of course).
+ * Fetch an array of ANY values. The actual values are returned as doubles
+ * which should be able hold all the types. Yes, there really should be an
+ * tany_t to avoid this potential non-portability ... Note in particular that
+ * we assume that the double return value vector is large enough to read in
+ * any fundamental type. We use that vector as a buffer to read in the base
+ * type vector and then convert it in place to double (from end to front of
+ * course).
*/
static int
TIFFFetchAnyArray(TIFF* tif, TIFFDirEntry* dir, double* v)
@@ -1510,10 +1714,10 @@ TIFFFetchPerSampleShorts(TIFF* tif, TIFFDirEntry* dir, uint16* pl)
for (i = 1; i < check_count; i++)
if (v[i] != v[0]) {
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
- "Cannot handle different per-sample values for field \"%s\"",
- _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
- goto bad;
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "Cannot handle different per-sample values for field \"%s\"",
+ _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
+ goto bad;
}
*pl = v[0];
status = 1;
@@ -1551,10 +1755,10 @@ TIFFFetchPerSampleLongs(TIFF* tif, TIFFDirEntry* dir, uint32* pl)
check_count = samples;
for (i = 1; i < check_count; i++)
if (v[i] != v[0]) {
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
- "Cannot handle different per-sample values for field \"%s\"",
- _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
- goto bad;
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "Cannot handle different per-sample values for field \"%s\"",
+ _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
+ goto bad;
}
*pl = v[0];
status = 1;
@@ -1591,10 +1795,10 @@ TIFFFetchPerSampleAnys(TIFF* tif, TIFFDirEntry* dir, double* pl)
for (i = 1; i < check_count; i++)
if (v[i] != v[0]) {
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
- "Cannot handle different per-sample values for field \"%s\"",
- _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
- goto bad;
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "Cannot handle different per-sample values for field \"%s\"",
+ _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
+ goto bad;
}
*pl = v[0];
status = 1;
@@ -1706,11 +1910,34 @@ TIFFFetchRefBlackWhite(TIFF* tif, TIFFDirEntry* dir)
}
/*
- * Replace a single strip (tile) of uncompressed data by
- * multiple strips (tiles), each approximately 8Kbytes.
- * This is useful for dealing with large images or
- * for dealing with machines with a limited amount
- * memory.
+ * Fetch and set the SubjectDistance EXIF tag.
+ */
+static int
+TIFFFetchSubjectDistance(TIFF* tif, TIFFDirEntry* dir)
+{
+ uint32 l[2];
+ float v;
+ int ok = 0;
+
+ if (TIFFFetchData(tif, dir, (char *)l)
+ && cvtRational(tif, dir, l[0], l[1], &v)) {
+ /*
+ * XXX: Numerator 0xFFFFFFFF means that we have infinite
+ * distance. Indicate that with a negative floating point
+ * SubjectDistance value.
+ */
+ ok = TIFFSetField(tif, dir->tdir_tag,
+ (l[0] != 0xFFFFFFFF) ? v : -v);
+ }
+
+ return ok;
+}
+
+/*
+ * Replace a single strip (tile) of uncompressed data by multiple strips
+ * (tiles), each approximately STRIP_SIZE_DEFAULT bytes. This is useful for
+ * dealing with large images or for dealing with machines with a limited
+ * amount memory.
*/
static void
ChopUpSingleUncompressedStrip(TIFF* tif)
@@ -1752,8 +1979,8 @@ ChopUpSingleUncompressedStrip(TIFF* tif)
"for chopped \"StripOffsets\" array");
if (newcounts == NULL || newoffsets == NULL) {
/*
- * Unable to allocate new strip information, give
- * up and use the original one strip information.
+ * Unable to allocate new strip information, give up and use
+ * the original one strip information.
*/
if (newcounts != NULL)
_TIFFfree(newcounts);
@@ -1766,7 +1993,7 @@ ChopUpSingleUncompressedStrip(TIFF* tif)
* that reflect the broken-up format.
*/
for (strip = 0; strip < nstrips; strip++) {
- if (stripbytes > (tsize_t) bytecount)
+ if ((uint32)stripbytes > bytecount)
stripbytes = bytecount;
newcounts[strip] = stripbytes;
newoffsets[strip] = offset;
diff --git a/src/3rdparty/libtiff/libtiff/tif_dirwrite.c b/src/3rdparty/libtiff/libtiff/tif_dirwrite.c
index 71681221f8..5148097dc3 100644
--- a/src/3rdparty/libtiff/libtiff/tif_dirwrite.c
+++ b/src/3rdparty/libtiff/libtiff/tif_dirwrite.c
@@ -1,4 +1,4 @@
-/* $Id: tif_dirwrite.c,v 1.34 2006/02/23 16:07:45 dron Exp $ */
+/* $Id: tif_dirwrite.c,v 1.37.2.6 2009-10-31 21:51:08 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -100,31 +100,34 @@ _TIFFWriteDirectory(TIFF* tif, int done)
*/
if (done)
{
- if (tif->tif_flags & TIFF_POSTENCODE) {
- tif->tif_flags &= ~TIFF_POSTENCODE;
- if (!(*tif->tif_postencode)(tif)) {
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ if (tif->tif_flags & TIFF_POSTENCODE) {
+ tif->tif_flags &= ~TIFF_POSTENCODE;
+ if (!(*tif->tif_postencode)(tif)) {
+ TIFFErrorExt(tif->tif_clientdata,
+ tif->tif_name,
"Error post-encoding before directory write");
- return (0);
- }
- }
- (*tif->tif_close)(tif); /* shutdown encoder */
- /*
- * Flush any data that might have been written
- * by the compression close+cleanup routines.
- */
- if (tif->tif_rawcc > 0 && !TIFFFlushData1(tif)) {
+ return (0);
+ }
+ }
+ (*tif->tif_close)(tif); /* shutdown encoder */
+ /*
+ * Flush any data that might have been written
+ * by the compression close+cleanup routines.
+ */
+ if (tif->tif_rawcc > 0
+ && (tif->tif_flags & TIFF_BEENWRITING) != 0
+ && !TIFFFlushData1(tif)) {
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
- "Error flushing data before directory write");
- return (0);
- }
- if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) {
- _TIFFfree(tif->tif_rawdata);
- tif->tif_rawdata = NULL;
- tif->tif_rawcc = 0;
- tif->tif_rawdatasize = 0;
- }
- tif->tif_flags &= ~(TIFF_BEENWRITING|TIFF_BUFFERSETUP);
+ "Error flushing data before directory write");
+ return (0);
+ }
+ if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) {
+ _TIFFfree(tif->tif_rawdata);
+ tif->tif_rawdata = NULL;
+ tif->tif_rawcc = 0;
+ tif->tif_rawdatasize = 0;
+ }
+ tif->tif_flags &= ~(TIFF_BEENWRITING|TIFF_BUFFERSETUP);
}
td = &tif->tif_dir;
@@ -137,12 +140,12 @@ _TIFFWriteDirectory(TIFF* tif, int done)
for (b = 0; b <= FIELD_LAST; b++)
if (TIFFFieldSet(tif, b) && b != FIELD_CUSTOM)
nfields += (b < FIELD_SUBFILETYPE ? 2 : 1);
- nfields += td->td_customValueCount;
+ nfields += td->td_customValueCount;
dirsize = nfields * sizeof (TIFFDirEntry);
data = (char*) _TIFFmalloc(dirsize);
if (data == NULL) {
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
- "Cannot write directory, out of space");
+ "Cannot write directory, out of space");
return (0);
}
/*
@@ -176,30 +179,29 @@ _TIFFWriteDirectory(TIFF* tif, int done)
for (fi = 0, nfi = tif->tif_nfields; nfi > 0; nfi--, fi++) {
const TIFFFieldInfo* fip = tif->tif_fieldinfo[fi];
- /*
- ** For custom fields, we test to see if the custom field
- ** is set or not. For normal fields, we just use the
- ** FieldSet test.
- */
- if( fip->field_bit == FIELD_CUSTOM )
- {
- int ci, is_set = FALSE;
+ /*
+ * For custom fields, we test to see if the custom field
+ * is set or not. For normal fields, we just use the
+ * FieldSet test.
+ */
+ if( fip->field_bit == FIELD_CUSTOM )
+ {
+ int ci, is_set = FALSE;
- for( ci = 0; ci < td->td_customValueCount; ci++ )
- is_set |= (td->td_customValues[ci].info == fip);
+ for( ci = 0; ci < td->td_customValueCount; ci++ )
+ is_set |= (td->td_customValues[ci].info == fip);
- if( !is_set )
- continue;
- }
+ if( !is_set )
+ continue;
+ }
else if (!FieldSet(fields, fip->field_bit))
- continue;
+ continue;
-
- /*
- ** Handle other fields.
- */
+ /*
+ * Handle other fields.
+ */
switch (fip->field_bit)
- {
+ {
case FIELD_STRIPOFFSETS:
/*
* We use one field bit for both strip and tile
@@ -234,8 +236,7 @@ _TIFFWriteDirectory(TIFF* tif, int done)
dir->tdir_tag = (uint16) tag;
dir->tdir_type = (uint16) TIFF_LONG;
dir->tdir_count = (uint32) td->td_nstrips;
- if (!TIFFWriteLongArray(tif, dir,
- td->td_stripbytecount))
+ if (!TIFFWriteLongArray(tif, dir, td->td_stripbytecount))
goto bad;
break;
case FIELD_ROWSPERSTRIP:
@@ -346,8 +347,8 @@ _TIFFWriteDirectory(TIFF* tif, int done)
}
dir++;
- if( fip->field_bit != FIELD_CUSTOM )
- ResetFieldBit(fields, fip->field_bit);
+ if( fip->field_bit != FIELD_CUSTOM )
+ ResetFieldBit(fields, fip->field_bit);
}
/*
@@ -376,15 +377,18 @@ _TIFFWriteDirectory(TIFF* tif, int done)
}
(void) TIFFSeekFile(tif, tif->tif_diroff, SEEK_SET);
if (!WriteOK(tif, &dircount, sizeof (dircount))) {
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Error writing directory count");
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "Error writing directory count");
goto bad;
}
if (!WriteOK(tif, data, dirsize)) {
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Error writing directory contents");
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "Error writing directory contents");
goto bad;
}
- if (!WriteOK(tif, &diroff, sizeof (diroff))) {
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Error writing directory link");
+ if (!WriteOK(tif, &diroff, sizeof (uint32))) {
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "Error writing directory link");
goto bad;
}
if (done) {
@@ -430,6 +434,133 @@ TIFFCheckpointDirectory(TIFF* tif)
return rc;
}
+static int
+_TIFFWriteCustomDirectory(TIFF* tif, toff_t *pdiroff)
+{
+ uint16 dircount;
+ uint32 nfields;
+ tsize_t dirsize;
+ char* data;
+ TIFFDirEntry* dir;
+ TIFFDirectory* td;
+ unsigned long b, fields[FIELD_SETLONGS];
+ int fi, nfi;
+
+ if (tif->tif_mode == O_RDONLY)
+ return (1);
+
+ td = &tif->tif_dir;
+ /*
+ * Size the directory so that we can calculate
+ * offsets for the data items that aren't kept
+ * in-place in each field.
+ */
+ nfields = 0;
+ for (b = 0; b <= FIELD_LAST; b++)
+ if (TIFFFieldSet(tif, b) && b != FIELD_CUSTOM)
+ nfields += (b < FIELD_SUBFILETYPE ? 2 : 1);
+ nfields += td->td_customValueCount;
+ dirsize = nfields * sizeof (TIFFDirEntry);
+ data = (char*) _TIFFmalloc(dirsize);
+ if (data == NULL) {
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "Cannot write directory, out of space");
+ return (0);
+ }
+ /*
+ * Put the directory at the end of the file.
+ */
+ tif->tif_diroff = (TIFFSeekFile(tif, (toff_t) 0, SEEK_END)+1) &~ 1;
+ tif->tif_dataoff = (toff_t)(
+ tif->tif_diroff + sizeof (uint16) + dirsize + sizeof (toff_t));
+ if (tif->tif_dataoff & 1)
+ tif->tif_dataoff++;
+ (void) TIFFSeekFile(tif, tif->tif_dataoff, SEEK_SET);
+ dir = (TIFFDirEntry*) data;
+ /*
+ * Setup external form of directory
+ * entries and write data items.
+ */
+ _TIFFmemcpy(fields, td->td_fieldsset, sizeof (fields));
+
+ for (fi = 0, nfi = tif->tif_nfields; nfi > 0; nfi--, fi++) {
+ const TIFFFieldInfo* fip = tif->tif_fieldinfo[fi];
+
+ /*
+ * For custom fields, we test to see if the custom field
+ * is set or not. For normal fields, we just use the
+ * FieldSet test.
+ */
+ if( fip->field_bit == FIELD_CUSTOM )
+ {
+ int ci, is_set = FALSE;
+
+ for( ci = 0; ci < td->td_customValueCount; ci++ )
+ is_set |= (td->td_customValues[ci].info == fip);
+
+ if( !is_set )
+ continue;
+ }
+ else if (!FieldSet(fields, fip->field_bit))
+ continue;
+
+ if( fip->field_bit != FIELD_CUSTOM )
+ ResetFieldBit(fields, fip->field_bit);
+ }
+
+ /*
+ * Write directory.
+ */
+ dircount = (uint16) nfields;
+ *pdiroff = (uint32) tif->tif_nextdiroff;
+ if (tif->tif_flags & TIFF_SWAB) {
+ /*
+ * The file's byte order is opposite to the
+ * native machine architecture. We overwrite
+ * the directory information with impunity
+ * because it'll be released below after we
+ * write it to the file. Note that all the
+ * other tag construction routines assume that
+ * we do this byte-swapping; i.e. they only
+ * byte-swap indirect data.
+ */
+ for (dir = (TIFFDirEntry*) data; dircount; dir++, dircount--) {
+ TIFFSwabArrayOfShort(&dir->tdir_tag, 2);
+ TIFFSwabArrayOfLong(&dir->tdir_count, 2);
+ }
+ dircount = (uint16) nfields;
+ TIFFSwabShort(&dircount);
+ TIFFSwabLong(pdiroff);
+ }
+ (void) TIFFSeekFile(tif, tif->tif_diroff, SEEK_SET);
+ if (!WriteOK(tif, &dircount, sizeof (dircount))) {
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "Error writing directory count");
+ goto bad;
+ }
+ if (!WriteOK(tif, data, dirsize)) {
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "Error writing directory contents");
+ goto bad;
+ }
+ if (!WriteOK(tif, pdiroff, sizeof (uint32))) {
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "Error writing directory link");
+ goto bad;
+ }
+ _TIFFfree(data);
+ return (1);
+bad:
+ _TIFFfree(data);
+ return (0);
+}
+
+int
+TIFFWriteCustomDirectory(TIFF* tif, toff_t *pdiroff)
+{
+ return _TIFFWriteCustomDirectory(tif, pdiroff);
+}
+
/*
* Process tags that are not special cased.
*/
@@ -581,7 +712,12 @@ TIFFWriteNormalTag(TIFF* tif, TIFFDirEntry* dir, const TIFFFieldInfo* fip)
{
char* cp;
if (fip->field_passcount)
- TIFFGetField(tif, fip->field_tag, &wc, &cp);
+ {
+ if( wc == (uint16) TIFF_VARIABLE2 )
+ TIFFGetField(tif, fip->field_tag, &wc2, &cp);
+ else
+ TIFFGetField(tif, fip->field_tag, &wc, &cp);
+ }
else
TIFFGetField(tif, fip->field_tag, &cp);
@@ -786,12 +922,27 @@ TIFFWriteShortTable(TIFF* tif,
static int
TIFFWriteByteArray(TIFF* tif, TIFFDirEntry* dir, char* cp)
{
- if (dir->tdir_count > 4) {
- if (!TIFFWriteData(tif, dir, cp))
- return (0);
+ if (dir->tdir_count <= 4) {
+ if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) {
+ dir->tdir_offset = (uint32)cp[0] << 24;
+ if (dir->tdir_count >= 2)
+ dir->tdir_offset |= (uint32)cp[1] << 16;
+ if (dir->tdir_count >= 3)
+ dir->tdir_offset |= (uint32)cp[2] << 8;
+ if (dir->tdir_count == 4)
+ dir->tdir_offset |= cp[3];
+ } else {
+ dir->tdir_offset = cp[0];
+ if (dir->tdir_count >= 2)
+ dir->tdir_offset |= (uint32) cp[1] << 8;
+ if (dir->tdir_count >= 3)
+ dir->tdir_offset |= (uint32) cp[2] << 16;
+ if (dir->tdir_count == 4)
+ dir->tdir_offset |= (uint32) cp[3] << 24;
+ }
+ return 1;
} else
- _TIFFmemcpy(&dir->tdir_offset, cp, dir->tdir_count);
- return (1);
+ return TIFFWriteData(tif, dir, cp);
}
/*
@@ -803,13 +954,13 @@ TIFFWriteShortArray(TIFF* tif, TIFFDirEntry* dir, uint16* v)
{
if (dir->tdir_count <= 2) {
if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) {
- dir->tdir_offset = (uint32) ((long) v[0] << 16);
+ dir->tdir_offset = (uint32) v[0] << 16;
if (dir->tdir_count == 2)
dir->tdir_offset |= v[1] & 0xffff;
} else {
dir->tdir_offset = v[0] & 0xffff;
if (dir->tdir_count == 2)
- dir->tdir_offset |= (long) v[1] << 16;
+ dir->tdir_offset |= (uint32) v[1] << 16;
}
return (1);
} else
@@ -854,10 +1005,11 @@ TIFFWriteRationalArray(TIFF* tif, TIFFDirEntry* dir, float* v)
if (fv < 0) {
if (dir->tdir_type == TIFF_RATIONAL) {
- TIFFWarningExt(tif->tif_clientdata, tif->tif_name,
+ TIFFWarningExt(tif->tif_clientdata,
+ tif->tif_name,
"\"%s\": Information lost writing value (%g) as (unsigned) RATIONAL",
_TIFFFieldWithTag(tif,dir->tdir_tag)->field_name,
- fv);
+ fv);
fv = 0;
} else
fv = -fv, sign = -1;
@@ -914,7 +1066,7 @@ TIFFWriteAnyArray(TIFF* tif,
w = (char*) _TIFFmalloc(n * TIFFDataWidth(type));
if (w == NULL) {
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
- "No space to write array");
+ "No space to write array");
return (0);
}
}
@@ -988,7 +1140,11 @@ TIFFWriteAnyArray(TIFF* tif,
}
break;
case TIFF_DOUBLE:
- return (TIFFWriteDoubleArray(tif, dir, v));
+ {
+ if( !TIFFWriteDoubleArray(tif, dir, v))
+ goto out;
+ }
+ break;
default:
/* TIFF_NOTYPE */
/* TIFF_ASCII */
@@ -1073,8 +1229,9 @@ TIFFWriteData(TIFF* tif, TIFFDirEntry* dir, char* cp)
tif->tif_dataoff += (cc + 1) & ~1;
return (1);
}
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Error writing data for field \"%s\"",
- _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "Error writing data for field \"%s\"",
+ _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
return (0);
}
@@ -1110,7 +1267,8 @@ TIFFRewriteDirectory( TIFF *tif )
if (!WriteOK(tif, &(tif->tif_header.tiff_diroff),
sizeof (tif->tif_diroff)))
{
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Error updating TIFF header");
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "Error updating TIFF header");
return (0);
}
}
@@ -1124,7 +1282,8 @@ TIFFRewriteDirectory( TIFF *tif )
if (!SeekOK(tif, nextdir) ||
!ReadOK(tif, &dircount, sizeof (dircount))) {
- TIFFErrorExt(tif->tif_clientdata, module, "Error fetching directory count");
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Error fetching directory count");
return (0);
}
if (tif->tif_flags & TIFF_SWAB)
@@ -1132,7 +1291,8 @@ TIFFRewriteDirectory( TIFF *tif )
(void) TIFFSeekFile(tif,
dircount * sizeof (TIFFDirEntry), SEEK_CUR);
if (!ReadOK(tif, &nextdir, sizeof (nextdir))) {
- TIFFErrorExt(tif->tif_clientdata, module, "Error fetching directory link");
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Error fetching directory link");
return (0);
}
if (tif->tif_flags & TIFF_SWAB)
@@ -1142,7 +1302,8 @@ TIFFRewriteDirectory( TIFF *tif )
(void) TIFFSeekFile(tif, off - (toff_t)sizeof(nextdir), SEEK_SET);
tif->tif_diroff = 0;
if (!WriteOK(tif, &(tif->tif_diroff), sizeof (nextdir))) {
- TIFFErrorExt(tif->tif_clientdata, module, "Error writing directory link");
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Error writing directory link");
return (0);
}
}
@@ -1156,8 +1317,7 @@ TIFFRewriteDirectory( TIFF *tif )
/*
- * Link the current directory into the
- * directory chain for the file.
+ * Link the current directory into the directory chain for the file.
*/
static int
TIFFLinkDirectory(TIFF* tif)
@@ -1178,8 +1338,8 @@ TIFFLinkDirectory(TIFF* tif)
(void) TIFFSeekFile(tif, tif->tif_subifdoff, SEEK_SET);
if (!WriteOK(tif, &diroff, sizeof (diroff))) {
TIFFErrorExt(tif->tif_clientdata, module,
- "%s: Error writing SubIFD directory link",
- tif->tif_name);
+ "%s: Error writing SubIFD directory link",
+ tif->tif_name);
return (0);
}
/*
@@ -1203,7 +1363,8 @@ TIFFLinkDirectory(TIFF* tif)
(toff_t)(TIFF_MAGIC_SIZE+TIFF_VERSION_SIZE),
SEEK_SET);
if (!WriteOK(tif, &diroff, sizeof (diroff))) {
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Error writing TIFF header");
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "Error writing TIFF header");
return (0);
}
return (1);
@@ -1217,7 +1378,8 @@ TIFFLinkDirectory(TIFF* tif)
if (!SeekOK(tif, nextdir) ||
!ReadOK(tif, &dircount, sizeof (dircount))) {
- TIFFErrorExt(tif->tif_clientdata, module, "Error fetching directory count");
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Error fetching directory count");
return (0);
}
if (tif->tif_flags & TIFF_SWAB)
@@ -1225,7 +1387,8 @@ TIFFLinkDirectory(TIFF* tif)
(void) TIFFSeekFile(tif,
dircount * sizeof (TIFFDirEntry), SEEK_CUR);
if (!ReadOK(tif, &nextdir, sizeof (nextdir))) {
- TIFFErrorExt(tif->tif_clientdata, module, "Error fetching directory link");
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Error fetching directory link");
return (0);
}
if (tif->tif_flags & TIFF_SWAB)
@@ -1234,7 +1397,8 @@ TIFFLinkDirectory(TIFF* tif)
off = TIFFSeekFile(tif, 0, SEEK_CUR); /* get current offset */
(void) TIFFSeekFile(tif, off - (toff_t)sizeof(nextdir), SEEK_SET);
if (!WriteOK(tif, &diroff, sizeof (diroff))) {
- TIFFErrorExt(tif->tif_clientdata, module, "Error writing directory link");
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Error writing directory link");
return (0);
}
return (1);
diff --git a/src/3rdparty/libtiff/libtiff/tif_dumpmode.c b/src/3rdparty/libtiff/libtiff/tif_dumpmode.c
index fb21ffe2fd..767d6d9263 100644
--- a/src/3rdparty/libtiff/libtiff/tif_dumpmode.c
+++ b/src/3rdparty/libtiff/libtiff/tif_dumpmode.c
@@ -1,4 +1,4 @@
-/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dumpmode.c,v 1.4 2005/12/21 12:23:13 joris Exp $ */
+/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dumpmode.c,v 1.5.2.1 2009-01-01 00:10:43 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -45,7 +45,7 @@ DumpModeEncode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
if (tif->tif_rawcc + n > tif->tif_rawdatasize)
n = tif->tif_rawdatasize - tif->tif_rawcc;
- assert( n > 0 );
+ assert( n > 0 );
/*
* Avoid copy if client has setup raw
@@ -71,6 +71,8 @@ static int
DumpModeDecode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
{
(void) s;
+/* fprintf(stderr,"DumpModeDecode: scanline %ld, expected %ld bytes, got %ld bytes\n", */
+/* (long) tif->tif_row, (long) tif->tif_rawcc, (long) cc); */
if (tif->tif_rawcc < cc) {
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
"DumpModeDecode: Not enough data for scanline %d",
diff --git a/src/3rdparty/libtiff/libtiff/tif_fax3.c b/src/3rdparty/libtiff/libtiff/tif_fax3.c
index 83e7e2cfd2..b560d56415 100644
--- a/src/3rdparty/libtiff/libtiff/tif_fax3.c
+++ b/src/3rdparty/libtiff/libtiff/tif_fax3.c
@@ -1,4 +1,4 @@
-/* $Id: tif_fax3.c,v 1.40 2006/03/16 12:38:24 dron Exp $ */
+/* $Id: tif_fax3.c,v 1.43.2.5 2009-01-01 00:10:43 bfriesen Exp $ */
/*
* Copyright (c) 1990-1997 Sam Leffler
@@ -63,6 +63,7 @@ typedef struct {
char* faxdcs; /* Table 2/T.30 encoded session params */
TIFFVGetMethod vgetparent; /* super-class method */
TIFFVSetMethod vsetparent; /* super-class method */
+ TIFFPrintMethod printdir; /* super-class method */
} Fax3BaseState;
#define Fax3State(tif) ((Fax3BaseState*) (tif)->tif_data)
@@ -85,6 +86,8 @@ typedef struct {
unsigned char* refline; /* reference line for 2d decoding */
int k; /* #rows left that can be 2d encoded */
int maxk; /* max #rows that can be 2d encoded */
+
+ int line;
} Fax3CodecState;
#define DecoderState(tif) ((Fax3CodecState*) Fax3State(tif))
#define EncoderState(tif) ((Fax3CodecState*) Fax3State(tif))
@@ -167,6 +170,7 @@ Fax3PreDecode(TIFF* tif, tsample_t s)
sp->refruns[0] = (uint32) sp->b.rowpixels;
sp->refruns[1] = 0;
}
+ sp->line = 0;
return (1);
}
@@ -179,46 +183,46 @@ Fax3PreDecode(TIFF* tif, tsample_t s)
static void
Fax3Unexpected(const char* module, TIFF* tif, uint32 line, uint32 a0)
{
- TIFFErrorExt(tif->tif_clientdata, module, "%s: Bad code word at line %lu of %s %lu (x %lu)",
- tif->tif_name, (unsigned long) line, isTiled(tif) ? "tile" : "strip",
- (unsigned long) (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip),
- (unsigned long) a0);
+ TIFFErrorExt(tif->tif_clientdata, module, "%s: Bad code word at line %u of %s %u (x %u)",
+ tif->tif_name, line, isTiled(tif) ? "tile" : "strip",
+ (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip),
+ a0);
}
-#define unexpected(table, a0) Fax3Unexpected(module, tif, line, a0)
+#define unexpected(table, a0) Fax3Unexpected(module, tif, sp->line, a0)
static void
Fax3Extension(const char* module, TIFF* tif, uint32 line, uint32 a0)
{
TIFFErrorExt(tif->tif_clientdata, module,
- "%s: Uncompressed data (not supported) at line %lu of %s %lu (x %lu)",
- tif->tif_name, (unsigned long) line, isTiled(tif) ? "tile" : "strip",
- (unsigned long) (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip),
- (unsigned long) a0);
+ "%s: Uncompressed data (not supported) at line %u of %s %u (x %u)",
+ tif->tif_name, line, isTiled(tif) ? "tile" : "strip",
+ (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip),
+ a0);
}
-#define extension(a0) Fax3Extension(module, tif, line, a0)
+#define extension(a0) Fax3Extension(module, tif, sp->line, a0)
static void
Fax3BadLength(const char* module, TIFF* tif, uint32 line, uint32 a0, uint32 lastx)
{
- TIFFWarningExt(tif->tif_clientdata, module, "%s: %s at line %lu of %s %lu (got %lu, expected %lu)",
- tif->tif_name,
- a0 < lastx ? "Premature EOL" : "Line length mismatch",
- (unsigned long) line, isTiled(tif) ? "tile" : "strip",
- (unsigned long) (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip),
- (unsigned long) a0, lastx);
+ TIFFWarningExt(tif->tif_clientdata, module, "%s: %s at line %u of %s %u (got %u, expected %u)",
+ tif->tif_name,
+ a0 < lastx ? "Premature EOL" : "Line length mismatch",
+ line, isTiled(tif) ? "tile" : "strip",
+ (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip),
+ a0, lastx);
}
-#define badlength(a0,lastx) Fax3BadLength(module, tif, line, a0, lastx)
+#define badlength(a0,lastx) Fax3BadLength(module, tif, sp->line, a0, lastx)
static void
Fax3PrematureEOF(const char* module, TIFF* tif, uint32 line, uint32 a0)
{
- TIFFWarningExt(tif->tif_clientdata, module, "%s: Premature EOF at line %lu of %s %lu (x %lu)",
+ TIFFWarningExt(tif->tif_clientdata, module, "%s: Premature EOF at line %u of %s %u (x %u)",
tif->tif_name,
- (unsigned long) line, isTiled(tif) ? "tile" : "strip",
- (unsigned long) (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip),
- (unsigned long) a0);
+ line, isTiled(tif) ? "tile" : "strip",
+ (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip),
+ a0);
}
-#define prematureEOF(a0) Fax3PrematureEOF(module, tif, line, a0)
+#define prematureEOF(a0) Fax3PrematureEOF(module, tif, sp->line, a0)
#define Nop
@@ -229,7 +233,6 @@ static int
Fax3Decode1D(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
{
DECLARE_STATE(tif, sp, "Fax3Decode1D");
- int line = 0;
(void) s;
CACHE_STATE(tif, sp);
@@ -248,7 +251,7 @@ Fax3Decode1D(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
(*sp->fill)(buf, thisrun, pa, lastx);
buf += sp->b.rowbytes;
occ -= sp->b.rowbytes;
- line++;
+ sp->line++;
continue;
EOF1D: /* premature EOF */
CLEANUP_RUNS();
@@ -269,7 +272,6 @@ static int
Fax3Decode2D(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
{
DECLARE_STATE_2D(tif, sp, "Fax3Decode2D");
- int line = 0;
int is1D; /* current line is 1d/2d-encoded */
(void) s;
@@ -302,7 +304,7 @@ Fax3Decode2D(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
SWAP(uint32*, sp->curruns, sp->refruns);
buf += sp->b.rowbytes;
occ -= sp->b.rowbytes;
- line++;
+ sp->line++;
continue;
EOF2D: /* premature EOF */
CLEANUP_RUNS();
@@ -492,14 +494,14 @@ Fax3SetupState(TIFF* tif)
);
nruns = needsRefLine ? 2*TIFFroundup(rowpixels,32) : rowpixels;
-
- dsp->runs = (uint32*) _TIFFCheckMalloc(tif, 2*nruns+3, sizeof (uint32),
+ nruns += 3;
+ dsp->runs = (uint32*) _TIFFCheckMalloc(tif, 2*nruns, sizeof (uint32),
"for Group 3/4 run arrays");
if (dsp->runs == NULL)
return (0);
dsp->curruns = dsp->runs;
if (needsRefLine)
- dsp->refruns = dsp->runs + (nruns>>1);
+ dsp->refruns = dsp->runs + nruns;
else
dsp->refruns = NULL;
if (td->td_compression == COMPRESSION_CCITTFAX3
@@ -718,6 +720,7 @@ Fax3PreEncode(TIFF* tif, tsample_t s)
sp->k = sp->maxk-1;
} else
sp->k = sp->maxk = 0;
+ sp->line = 0;
return (1);
}
@@ -773,7 +776,7 @@ static int32 find1span(unsigned char*, int32, int32);
* table. The ``base'' of the bit string is supplied
* along with the start+end bit indices.
*/
-inline static int32
+static int32
find0span(unsigned char* bp, int32 bs, int32 be)
{
int32 bits = be - bs;
@@ -832,7 +835,7 @@ find0span(unsigned char* bp, int32 bs, int32 be)
return (span);
}
-inline static int32
+static int32
find1span(unsigned char* bp, int32 bs, int32 be)
{
int32 bits = be - bs;
@@ -1074,6 +1077,7 @@ Fax3Cleanup(TIFF* tif)
tif->tif_tagmethods.vgetfield = sp->b.vgetparent;
tif->tif_tagmethods.vsetfield = sp->b.vsetparent;
+ tif->tif_tagmethods.printdir = sp->b.printdir;
if (sp->runs)
_TIFFfree(sp->runs);
@@ -1082,6 +1086,9 @@ Fax3Cleanup(TIFF* tif)
if (Fax3State(tif)->subaddress)
_TIFFfree(Fax3State(tif)->subaddress);
+ if (Fax3State(tif)->faxdcs)
+ _TIFFfree(Fax3State(tif)->faxdcs);
+
_TIFFfree(tif->tif_data);
tif->tif_data = NULL;
@@ -1136,6 +1143,7 @@ static int
Fax3VSetField(TIFF* tif, ttag_t tag, va_list ap)
{
Fax3BaseState* sp = Fax3State(tif);
+ const TIFFFieldInfo* fip;
assert(sp != 0);
assert(sp->vsetparent != 0);
@@ -1143,10 +1151,10 @@ Fax3VSetField(TIFF* tif, ttag_t tag, va_list ap)
switch (tag) {
case TIFFTAG_FAXMODE:
sp->mode = va_arg(ap, int);
- return (1); /* NB: pseudo tag */
+ return 1; /* NB: pseudo tag */
case TIFFTAG_FAXFILLFUNC:
DecoderState(tif)->fill = va_arg(ap, TIFFFaxFillFunc);
- return (1); /* NB: pseudo tag */
+ return 1; /* NB: pseudo tag */
case TIFFTAG_GROUP3OPTIONS:
/* XXX: avoid reading options if compression mismatches. */
if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX3)
@@ -1181,9 +1189,14 @@ Fax3VSetField(TIFF* tif, ttag_t tag, va_list ap)
default:
return (*sp->vsetparent)(tif, tag, ap);
}
- TIFFSetFieldBit(tif, _TIFFFieldWithTag(tif, tag)->field_bit);
+
+ if ((fip = _TIFFFieldWithTag(tif, tag)))
+ TIFFSetFieldBit(tif, fip->field_bit);
+ else
+ return 0;
+
tif->tif_flags |= TIFF_DIRTYDIRECT;
- return (1);
+ return 1;
}
static int
@@ -1191,6 +1204,8 @@ Fax3VGetField(TIFF* tif, ttag_t tag, va_list ap)
{
Fax3BaseState* sp = Fax3State(tif);
+ assert(sp != 0);
+
switch (tag) {
case TIFFTAG_FAXMODE:
*va_arg(ap, int*) = sp->mode;
@@ -1234,6 +1249,8 @@ Fax3PrintDir(TIFF* tif, FILE* fd, long flags)
{
Fax3BaseState* sp = Fax3State(tif);
+ assert(sp != 0);
+
(void) flags;
if (TIFFFieldSet(tif,FIELD_OPTIONS)) {
const char* sep = " ";
@@ -1295,6 +1312,15 @@ InitCCITTFax3(TIFF* tif)
Fax3BaseState* sp;
/*
+ * Merge codec-specific tag information.
+ */
+ if (!_TIFFMergeFieldInfo(tif, faxFieldInfo, N(faxFieldInfo))) {
+ TIFFErrorExt(tif->tif_clientdata, "InitCCITTFax3",
+ "Merging common CCITT Fax codec-specific tags failed");
+ return 0;
+ }
+
+ /*
* Allocate state block so tag methods have storage to record values.
*/
tif->tif_data = (tidata_t)
@@ -1310,14 +1336,13 @@ InitCCITTFax3(TIFF* tif)
sp->rw_mode = tif->tif_mode;
/*
- * Merge codec-specific tag information and
- * override parent get/set field methods.
+ * Override parent get/set field methods.
*/
- _TIFFMergeFieldInfo(tif, faxFieldInfo, N(faxFieldInfo));
sp->vgetparent = tif->tif_tagmethods.vgetfield;
tif->tif_tagmethods.vgetfield = Fax3VGetField; /* hook for codec tags */
sp->vsetparent = tif->tif_tagmethods.vsetfield;
tif->tif_tagmethods.vsetfield = Fax3VSetField; /* hook for codec tags */
+ sp->printdir = tif->tif_tagmethods.printdir;
tif->tif_tagmethods.printdir = Fax3PrintDir; /* hook for codec tags */
sp->groupoptions = 0;
sp->recvparams = 0;
@@ -1355,14 +1380,21 @@ TIFFInitCCITTFax3(TIFF* tif, int scheme)
{
(void) scheme;
if (InitCCITTFax3(tif)) {
- _TIFFMergeFieldInfo(tif, fax3FieldInfo, N(fax3FieldInfo));
+ /*
+ * Merge codec-specific tag information.
+ */
+ if (!_TIFFMergeFieldInfo(tif, fax3FieldInfo, N(fax3FieldInfo))) {
+ TIFFErrorExt(tif->tif_clientdata, "TIFFInitCCITTFax3",
+ "Merging CCITT Fax 3 codec-specific tags failed");
+ return 0;
+ }
/*
* The default format is Class/F-style w/o RTC.
*/
return TIFFSetField(tif, TIFFTAG_FAXMODE, FAXMODE_CLASSF);
} else
- return (0);
+ return 01;
}
/*
@@ -1378,7 +1410,6 @@ static int
Fax4Decode(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
{
DECLARE_STATE_2D(tif, sp, "Fax4Decode");
- int line = 0;
(void) s;
CACHE_STATE(tif, sp);
@@ -1401,7 +1432,7 @@ Fax4Decode(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
SWAP(uint32*, sp->curruns, sp->refruns);
buf += sp->b.rowbytes;
occ -= sp->b.rowbytes;
- line++;
+ sp->line++;
continue;
EOFG4:
NeedBits16( 13, BADG4 );
@@ -1457,7 +1488,14 @@ TIFFInitCCITTFax4(TIFF* tif, int scheme)
{
(void) scheme;
if (InitCCITTFax3(tif)) { /* reuse G3 support */
- _TIFFMergeFieldInfo(tif, fax4FieldInfo, N(fax4FieldInfo));
+ /*
+ * Merge codec-specific tag information.
+ */
+ if (!_TIFFMergeFieldInfo(tif, fax4FieldInfo, N(fax4FieldInfo))) {
+ TIFFErrorExt(tif->tif_clientdata, "TIFFInitCCITTFax4",
+ "Merging CCITT Fax 4 codec-specific tags failed");
+ return 0;
+ }
tif->tif_decoderow = Fax4Decode;
tif->tif_decodestrip = Fax4Decode;
@@ -1487,7 +1525,6 @@ Fax3DecodeRLE(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
{
DECLARE_STATE(tif, sp, "Fax3DecodeRLE");
int mode = sp->b.mode;
- int line = 0;
(void) s;
CACHE_STATE(tif, sp);
@@ -1517,7 +1554,7 @@ Fax3DecodeRLE(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
}
buf += sp->b.rowbytes;
occ -= sp->b.rowbytes;
- line++;
+ sp->line++;
continue;
EOFRLE: /* premature EOF */
(*sp->fill)(buf, thisrun, pa, lastx);
diff --git a/src/3rdparty/libtiff/libtiff/tif_getimage.c b/src/3rdparty/libtiff/libtiff/tif_getimage.c
index d71c85f4e4..667f32380a 100644
--- a/src/3rdparty/libtiff/libtiff/tif_getimage.c
+++ b/src/3rdparty/libtiff/libtiff/tif_getimage.c
@@ -1,4 +1,4 @@
-/* $Id: tif_getimage.c,v 1.49 2005/12/24 15:36:16 dron Exp $ */
+/* $Id: tif_getimage.c,v 1.63.2.3 2009-08-30 16:21:46 bfriesen Exp $ */
/*
* Copyright (c) 1991-1997 Sam Leffler
@@ -32,14 +32,13 @@
#include "tiffiop.h"
#include <stdio.h>
-static int gtTileContig(TIFFRGBAImage*, uint32*, uint32, uint32);
-static int gtTileSeparate(TIFFRGBAImage*, uint32*, uint32, uint32);
-static int gtStripContig(TIFFRGBAImage*, uint32*, uint32, uint32);
-static int gtStripSeparate(TIFFRGBAImage*, uint32*, uint32, uint32);
-static int pickTileContigCase(TIFFRGBAImage*);
-static int pickTileSeparateCase(TIFFRGBAImage*);
-
-static const char photoTag[] = "PhotometricInterpretation";
+static int gtTileContig(TIFFRGBAImage*, uint32*, uint32, uint32);
+static int gtTileSeparate(TIFFRGBAImage*, uint32*, uint32, uint32);
+static int gtStripContig(TIFFRGBAImage*, uint32*, uint32, uint32);
+static int gtStripSeparate(TIFFRGBAImage*, uint32*, uint32, uint32);
+static int PickContigCase(TIFFRGBAImage*);
+static int PickSeparateCase(TIFFRGBAImage*);
+static const char photoTag[] = "PhotometricInterpretation";
/*
* Helper constants used in Orientation tag handling
@@ -72,118 +71,122 @@ TIFFDisplay display_sRGB = {
int
TIFFRGBAImageOK(TIFF* tif, char emsg[1024])
{
- TIFFDirectory* td = &tif->tif_dir;
- uint16 photometric;
- int colorchannels;
+ TIFFDirectory* td = &tif->tif_dir;
+ uint16 photometric;
+ int colorchannels;
- if (!tif->tif_decodestatus) {
- sprintf(emsg, "Sorry, requested compression method is not configured");
- return (0);
- }
- switch (td->td_bitspersample) {
- case 1: case 2: case 4:
- case 8: case 16:
- break;
- default:
- sprintf(emsg, "Sorry, can not handle images with %d-bit samples",
- td->td_bitspersample);
- return (0);
- }
- colorchannels = td->td_samplesperpixel - td->td_extrasamples;
- if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric)) {
- switch (colorchannels) {
- case 1:
- photometric = PHOTOMETRIC_MINISBLACK;
- break;
- case 3:
- photometric = PHOTOMETRIC_RGB;
- break;
- default:
- sprintf(emsg, "Missing needed %s tag", photoTag);
- return (0);
- }
- }
- switch (photometric) {
- case PHOTOMETRIC_MINISWHITE:
- case PHOTOMETRIC_MINISBLACK:
- case PHOTOMETRIC_PALETTE:
- if (td->td_planarconfig == PLANARCONFIG_CONTIG
- && td->td_samplesperpixel != 1
- && td->td_bitspersample < 8 ) {
- sprintf(emsg,
- "Sorry, can not handle contiguous data with %s=%d, "
- "and %s=%d and Bits/Sample=%d",
- photoTag, photometric,
- "Samples/pixel", td->td_samplesperpixel,
- td->td_bitspersample);
- return (0);
- }
- /*
- ** We should likely validate that any extra samples are either
- ** to be ignored, or are alpha, and if alpha we should try to use
- ** them. But for now we won't bother with this.
- */
- break;
- case PHOTOMETRIC_YCBCR:
- if (td->td_planarconfig != PLANARCONFIG_CONTIG) {
- sprintf(emsg, "Sorry, can not handle YCbCr images with %s=%d",
- "Planarconfiguration", td->td_planarconfig);
- return (0);
+ if (!tif->tif_decodestatus) {
+ sprintf(emsg, "Sorry, requested compression method is not configured");
+ return (0);
}
- break;
- case PHOTOMETRIC_RGB:
- if (colorchannels < 3) {
- sprintf(emsg, "Sorry, can not handle RGB image with %s=%d",
- "Color channels", colorchannels);
- return (0);
+ switch (td->td_bitspersample) {
+ case 1:
+ case 2:
+ case 4:
+ case 8:
+ case 16:
+ break;
+ default:
+ sprintf(emsg, "Sorry, can not handle images with %d-bit samples",
+ td->td_bitspersample);
+ return (0);
}
- break;
- case PHOTOMETRIC_SEPARATED:
- {
- uint16 inkset;
- TIFFGetFieldDefaulted(tif, TIFFTAG_INKSET, &inkset);
- if (inkset != INKSET_CMYK) {
- sprintf(emsg,
- "Sorry, can not handle separated image with %s=%d",
- "InkSet", inkset);
- return 0;
+ colorchannels = td->td_samplesperpixel - td->td_extrasamples;
+ if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric)) {
+ switch (colorchannels) {
+ case 1:
+ photometric = PHOTOMETRIC_MINISBLACK;
+ break;
+ case 3:
+ photometric = PHOTOMETRIC_RGB;
+ break;
+ default:
+ sprintf(emsg, "Missing needed %s tag", photoTag);
+ return (0);
}
- if (td->td_samplesperpixel < 4) {
- sprintf(emsg,
- "Sorry, can not handle separated image with %s=%d",
- "Samples/pixel", td->td_samplesperpixel);
- return 0;
- }
- break;
- }
- case PHOTOMETRIC_LOGL:
- if (td->td_compression != COMPRESSION_SGILOG) {
- sprintf(emsg, "Sorry, LogL data must have %s=%d",
- "Compression", COMPRESSION_SGILOG);
- return (0);
- }
- break;
- case PHOTOMETRIC_LOGLUV:
- if (td->td_compression != COMPRESSION_SGILOG &&
- td->td_compression != COMPRESSION_SGILOG24) {
- sprintf(emsg, "Sorry, LogLuv data must have %s=%d or %d",
- "Compression", COMPRESSION_SGILOG, COMPRESSION_SGILOG24);
- return (0);
}
- if (td->td_planarconfig != PLANARCONFIG_CONTIG) {
- sprintf(emsg, "Sorry, can not handle LogLuv images with %s=%d",
- "Planarconfiguration", td->td_planarconfig);
- return (0);
+ switch (photometric) {
+ case PHOTOMETRIC_MINISWHITE:
+ case PHOTOMETRIC_MINISBLACK:
+ case PHOTOMETRIC_PALETTE:
+ if (td->td_planarconfig == PLANARCONFIG_CONTIG
+ && td->td_samplesperpixel != 1
+ && td->td_bitspersample < 8 ) {
+ sprintf(emsg,
+ "Sorry, can not handle contiguous data with %s=%d, "
+ "and %s=%d and Bits/Sample=%d",
+ photoTag, photometric,
+ "Samples/pixel", td->td_samplesperpixel,
+ td->td_bitspersample);
+ return (0);
+ }
+ /*
+ * We should likely validate that any extra samples are either
+ * to be ignored, or are alpha, and if alpha we should try to use
+ * them. But for now we won't bother with this.
+ */
+ break;
+ case PHOTOMETRIC_YCBCR:
+ /*
+ * TODO: if at all meaningful and useful, make more complete
+ * support check here, or better still, refactor to let supporting
+ * code decide whether there is support and what meaningfull
+ * error to return
+ */
+ break;
+ case PHOTOMETRIC_RGB:
+ if (colorchannels < 3) {
+ sprintf(emsg, "Sorry, can not handle RGB image with %s=%d",
+ "Color channels", colorchannels);
+ return (0);
+ }
+ break;
+ case PHOTOMETRIC_SEPARATED:
+ {
+ uint16 inkset;
+ TIFFGetFieldDefaulted(tif, TIFFTAG_INKSET, &inkset);
+ if (inkset != INKSET_CMYK) {
+ sprintf(emsg,
+ "Sorry, can not handle separated image with %s=%d",
+ "InkSet", inkset);
+ return 0;
+ }
+ if (td->td_samplesperpixel < 4) {
+ sprintf(emsg,
+ "Sorry, can not handle separated image with %s=%d",
+ "Samples/pixel", td->td_samplesperpixel);
+ return 0;
+ }
+ break;
+ }
+ case PHOTOMETRIC_LOGL:
+ if (td->td_compression != COMPRESSION_SGILOG) {
+ sprintf(emsg, "Sorry, LogL data must have %s=%d",
+ "Compression", COMPRESSION_SGILOG);
+ return (0);
+ }
+ break;
+ case PHOTOMETRIC_LOGLUV:
+ if (td->td_compression != COMPRESSION_SGILOG &&
+ td->td_compression != COMPRESSION_SGILOG24) {
+ sprintf(emsg, "Sorry, LogLuv data must have %s=%d or %d",
+ "Compression", COMPRESSION_SGILOG, COMPRESSION_SGILOG24);
+ return (0);
+ }
+ if (td->td_planarconfig != PLANARCONFIG_CONTIG) {
+ sprintf(emsg, "Sorry, can not handle LogLuv images with %s=%d",
+ "Planarconfiguration", td->td_planarconfig);
+ return (0);
+ }
+ break;
+ case PHOTOMETRIC_CIELAB:
+ break;
+ default:
+ sprintf(emsg, "Sorry, can not handle image with %s=%d",
+ photoTag, photometric);
+ return (0);
}
- break;
- case PHOTOMETRIC_CIELAB:
- break;
- default:
- sprintf(emsg, "Sorry, can not handle image with %s=%d",
- photoTag, photometric);
- return (0);
- }
- return (1);
+ return (1);
}
void
@@ -199,7 +202,6 @@ TIFFRGBAImageEnd(TIFFRGBAImage* img)
_TIFFfree(img->ycbcr), img->ycbcr = NULL;
if (img->cielab)
_TIFFfree(img->cielab), img->cielab = NULL;
-
if( img->redcmap ) {
_TIFFfree( img->redcmap );
_TIFFfree( img->greencmap );
@@ -221,221 +223,227 @@ isCCITTCompression(TIFF* tif)
int
TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024])
{
- uint16* sampleinfo;
- uint16 extrasamples;
- uint16 planarconfig;
- uint16 compress;
- int colorchannels;
- uint16 *red_orig, *green_orig, *blue_orig;
- int n_color;
-
- /* Initialize to normal values */
- img->row_offset = 0;
- img->col_offset = 0;
- img->redcmap = NULL;
- img->greencmap = NULL;
- img->bluecmap = NULL;
- img->req_orientation = ORIENTATION_BOTLEFT; /* It is the default */
-
- img->tif = tif;
- img->stoponerr = stop;
- TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &img->bitspersample);
- switch (img->bitspersample) {
- case 1: case 2: case 4:
- case 8: case 16:
- break;
- default:
- sprintf(emsg, "Sorry, can not handle images with %d-bit samples",
- img->bitspersample);
- return (0);
- }
- img->alpha = 0;
- TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &img->samplesperpixel);
- TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES,
- &extrasamples, &sampleinfo);
- if (extrasamples >= 1)
- {
- switch (sampleinfo[0]) {
- case EXTRASAMPLE_UNSPECIFIED: /* Workaround for some images without */
- if (img->samplesperpixel > 3) /* correct info about alpha channel */
- img->alpha = EXTRASAMPLE_ASSOCALPHA;
- break;
- case EXTRASAMPLE_ASSOCALPHA: /* data is pre-multiplied */
- case EXTRASAMPLE_UNASSALPHA: /* data is not pre-multiplied */
- img->alpha = sampleinfo[0];
- break;
+ uint16* sampleinfo;
+ uint16 extrasamples;
+ uint16 planarconfig;
+ uint16 compress;
+ int colorchannels;
+ uint16 *red_orig, *green_orig, *blue_orig;
+ int n_color;
+
+ /* Initialize to normal values */
+ img->row_offset = 0;
+ img->col_offset = 0;
+ img->redcmap = NULL;
+ img->greencmap = NULL;
+ img->bluecmap = NULL;
+ img->req_orientation = ORIENTATION_BOTLEFT; /* It is the default */
+
+ img->tif = tif;
+ img->stoponerr = stop;
+ TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &img->bitspersample);
+ switch (img->bitspersample) {
+ case 1:
+ case 2:
+ case 4:
+ case 8:
+ case 16:
+ break;
+ default:
+ sprintf(emsg, "Sorry, can not handle images with %d-bit samples",
+ img->bitspersample);
+ return (0);
+ }
+ img->alpha = 0;
+ TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &img->samplesperpixel);
+ TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES,
+ &extrasamples, &sampleinfo);
+ if (extrasamples >= 1)
+ {
+ switch (sampleinfo[0]) {
+ case EXTRASAMPLE_UNSPECIFIED: /* Workaround for some images without */
+ if (img->samplesperpixel > 3) /* correct info about alpha channel */
+ img->alpha = EXTRASAMPLE_ASSOCALPHA;
+ break;
+ case EXTRASAMPLE_ASSOCALPHA: /* data is pre-multiplied */
+ case EXTRASAMPLE_UNASSALPHA: /* data is not pre-multiplied */
+ img->alpha = sampleinfo[0];
+ break;
+ }
}
- }
#ifdef DEFAULT_EXTRASAMPLE_AS_ALPHA
- if( !TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &img->photometric))
- img->photometric = PHOTOMETRIC_MINISWHITE;
-
- if( extrasamples == 0
- && img->samplesperpixel == 4
- && img->photometric == PHOTOMETRIC_RGB )
- {
- img->alpha = EXTRASAMPLE_ASSOCALPHA;
- extrasamples = 1;
- }
-#endif
-
- colorchannels = img->samplesperpixel - extrasamples;
- TIFFGetFieldDefaulted(tif, TIFFTAG_COMPRESSION, &compress);
- TIFFGetFieldDefaulted(tif, TIFFTAG_PLANARCONFIG, &planarconfig);
- if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &img->photometric)) {
- switch (colorchannels) {
- case 1:
- if (isCCITTCompression(tif))
+ if( !TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &img->photometric))
img->photometric = PHOTOMETRIC_MINISWHITE;
- else
- img->photometric = PHOTOMETRIC_MINISBLACK;
- break;
- case 3:
- img->photometric = PHOTOMETRIC_RGB;
- break;
- default:
- sprintf(emsg, "Missing needed %s tag", photoTag);
- return (0);
- }
- }
- switch (img->photometric) {
- case PHOTOMETRIC_PALETTE:
- if (!TIFFGetField(tif, TIFFTAG_COLORMAP,
- &red_orig, &green_orig, &blue_orig)) {
- sprintf(emsg, "Missing required \"Colormap\" tag");
- return (0);
- }
-
- /* copy the colormaps so we can modify them */
- n_color = (1L << img->bitspersample);
- img->redcmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color);
- img->greencmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color);
- img->bluecmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color);
- if( !img->redcmap || !img->greencmap || !img->bluecmap ) {
- sprintf(emsg, "Out of memory for colormap copy");
- return (0);
- }
- _TIFFmemcpy( img->redcmap, red_orig, n_color * 2 );
- _TIFFmemcpy( img->greencmap, green_orig, n_color * 2 );
- _TIFFmemcpy( img->bluecmap, blue_orig, n_color * 2 );
-
- /* fall thru... */
- case PHOTOMETRIC_MINISWHITE:
- case PHOTOMETRIC_MINISBLACK:
- if (planarconfig == PLANARCONFIG_CONTIG
- && img->samplesperpixel != 1
- && img->bitspersample < 8 ) {
- sprintf(emsg,
- "Sorry, can not handle contiguous data with %s=%d, "
- "and %s=%d and Bits/Sample=%d",
- photoTag, img->photometric,
- "Samples/pixel", img->samplesperpixel,
- img->bitspersample);
- return (0);
- }
- break;
- case PHOTOMETRIC_YCBCR:
- if (planarconfig != PLANARCONFIG_CONTIG) {
- sprintf(emsg, "Sorry, can not handle YCbCr images with %s=%d",
- "Planarconfiguration", planarconfig);
- return (0);
+ if( extrasamples == 0
+ && img->samplesperpixel == 4
+ && img->photometric == PHOTOMETRIC_RGB )
+ {
+ img->alpha = EXTRASAMPLE_ASSOCALPHA;
+ extrasamples = 1;
}
- /* It would probably be nice to have a reality check here. */
- if (planarconfig == PLANARCONFIG_CONTIG)
- /* can rely on libjpeg to convert to RGB */
- /* XXX should restore current state on exit */
- switch (compress) {
- case COMPRESSION_OJPEG:
- case COMPRESSION_JPEG:
- TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB);
- img->photometric = PHOTOMETRIC_RGB;
- break;
+#endif
- default:
- /* do nothing */;
- break;
- }
- break;
- case PHOTOMETRIC_RGB:
- if (colorchannels < 3) {
- sprintf(emsg, "Sorry, can not handle RGB image with %s=%d",
- "Color channels", colorchannels);
- return (0);
- }
- break;
- case PHOTOMETRIC_SEPARATED: {
- uint16 inkset;
- TIFFGetFieldDefaulted(tif, TIFFTAG_INKSET, &inkset);
- if (inkset != INKSET_CMYK) {
- sprintf(emsg, "Sorry, can not handle separated image with %s=%d",
- "InkSet", inkset);
- return (0);
- }
- if (img->samplesperpixel < 4) {
- sprintf(emsg, "Sorry, can not handle separated image with %s=%d",
- "Samples/pixel", img->samplesperpixel);
- return (0);
- }
- break;
- }
- case PHOTOMETRIC_LOGL:
- if (compress != COMPRESSION_SGILOG) {
- sprintf(emsg, "Sorry, LogL data must have %s=%d",
- "Compression", COMPRESSION_SGILOG);
- return (0);
- }
- TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_8BIT);
- img->photometric = PHOTOMETRIC_MINISBLACK; /* little white lie */
- img->bitspersample = 8;
- break;
- case PHOTOMETRIC_LOGLUV:
- if (compress != COMPRESSION_SGILOG && compress != COMPRESSION_SGILOG24) {
- sprintf(emsg, "Sorry, LogLuv data must have %s=%d or %d",
- "Compression", COMPRESSION_SGILOG, COMPRESSION_SGILOG24);
- return (0);
- }
- if (planarconfig != PLANARCONFIG_CONTIG) {
- sprintf(emsg, "Sorry, can not handle LogLuv images with %s=%d",
- "Planarconfiguration", planarconfig);
- return (0);
+ colorchannels = img->samplesperpixel - extrasamples;
+ TIFFGetFieldDefaulted(tif, TIFFTAG_COMPRESSION, &compress);
+ TIFFGetFieldDefaulted(tif, TIFFTAG_PLANARCONFIG, &planarconfig);
+ if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &img->photometric)) {
+ switch (colorchannels) {
+ case 1:
+ if (isCCITTCompression(tif))
+ img->photometric = PHOTOMETRIC_MINISWHITE;
+ else
+ img->photometric = PHOTOMETRIC_MINISBLACK;
+ break;
+ case 3:
+ img->photometric = PHOTOMETRIC_RGB;
+ break;
+ default:
+ sprintf(emsg, "Missing needed %s tag", photoTag);
+ return (0);
+ }
}
- TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_8BIT);
- img->photometric = PHOTOMETRIC_RGB; /* little white lie */
- img->bitspersample = 8;
- break;
- case PHOTOMETRIC_CIELAB:
- break;
- default:
- sprintf(emsg, "Sorry, can not handle image with %s=%d",
- photoTag, img->photometric);
- return (0);
- }
- img->Map = NULL;
- img->BWmap = NULL;
- img->PALmap = NULL;
- img->ycbcr = NULL;
- img->cielab = NULL;
- TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &img->width);
- TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &img->height);
- TIFFGetFieldDefaulted(tif, TIFFTAG_ORIENTATION, &img->orientation);
- img->isContig =
- !(planarconfig == PLANARCONFIG_SEPARATE && colorchannels > 1);
- if (img->isContig) {
- img->get = TIFFIsTiled(tif) ? gtTileContig : gtStripContig;
- if (!pickTileContigCase(img)) {
- sprintf(emsg, "Sorry, can not handle image");
- return 0;
+ switch (img->photometric) {
+ case PHOTOMETRIC_PALETTE:
+ if (!TIFFGetField(tif, TIFFTAG_COLORMAP,
+ &red_orig, &green_orig, &blue_orig)) {
+ sprintf(emsg, "Missing required \"Colormap\" tag");
+ return (0);
+ }
+
+ /* copy the colormaps so we can modify them */
+ n_color = (1L << img->bitspersample);
+ img->redcmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color);
+ img->greencmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color);
+ img->bluecmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color);
+ if( !img->redcmap || !img->greencmap || !img->bluecmap ) {
+ sprintf(emsg, "Out of memory for colormap copy");
+ return (0);
+ }
+
+ _TIFFmemcpy( img->redcmap, red_orig, n_color * 2 );
+ _TIFFmemcpy( img->greencmap, green_orig, n_color * 2 );
+ _TIFFmemcpy( img->bluecmap, blue_orig, n_color * 2 );
+
+ /* fall thru... */
+ case PHOTOMETRIC_MINISWHITE:
+ case PHOTOMETRIC_MINISBLACK:
+ if (planarconfig == PLANARCONFIG_CONTIG
+ && img->samplesperpixel != 1
+ && img->bitspersample < 8 ) {
+ sprintf(emsg,
+ "Sorry, can not handle contiguous data with %s=%d, "
+ "and %s=%d and Bits/Sample=%d",
+ photoTag, img->photometric,
+ "Samples/pixel", img->samplesperpixel,
+ img->bitspersample);
+ return (0);
+ }
+ break;
+ case PHOTOMETRIC_YCBCR:
+ /* It would probably be nice to have a reality check here. */
+ if (planarconfig == PLANARCONFIG_CONTIG)
+ /* can rely on libjpeg to convert to RGB */
+ /* XXX should restore current state on exit */
+ switch (compress) {
+ case COMPRESSION_JPEG:
+ /*
+ * TODO: when complete tests verify complete desubsampling
+ * and YCbCr handling, remove use of TIFFTAG_JPEGCOLORMODE in
+ * favor of tif_getimage.c native handling
+ */
+ TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB);
+ img->photometric = PHOTOMETRIC_RGB;
+ break;
+ default:
+ /* do nothing */;
+ break;
+ }
+ /*
+ * TODO: if at all meaningful and useful, make more complete
+ * support check here, or better still, refactor to let supporting
+ * code decide whether there is support and what meaningfull
+ * error to return
+ */
+ break;
+ case PHOTOMETRIC_RGB:
+ if (colorchannels < 3) {
+ sprintf(emsg, "Sorry, can not handle RGB image with %s=%d",
+ "Color channels", colorchannels);
+ return (0);
+ }
+ break;
+ case PHOTOMETRIC_SEPARATED:
+ {
+ uint16 inkset;
+ TIFFGetFieldDefaulted(tif, TIFFTAG_INKSET, &inkset);
+ if (inkset != INKSET_CMYK) {
+ sprintf(emsg, "Sorry, can not handle separated image with %s=%d",
+ "InkSet", inkset);
+ return (0);
+ }
+ if (img->samplesperpixel < 4) {
+ sprintf(emsg, "Sorry, can not handle separated image with %s=%d",
+ "Samples/pixel", img->samplesperpixel);
+ return (0);
+ }
+ }
+ break;
+ case PHOTOMETRIC_LOGL:
+ if (compress != COMPRESSION_SGILOG) {
+ sprintf(emsg, "Sorry, LogL data must have %s=%d",
+ "Compression", COMPRESSION_SGILOG);
+ return (0);
+ }
+ TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_8BIT);
+ img->photometric = PHOTOMETRIC_MINISBLACK; /* little white lie */
+ img->bitspersample = 8;
+ break;
+ case PHOTOMETRIC_LOGLUV:
+ if (compress != COMPRESSION_SGILOG && compress != COMPRESSION_SGILOG24) {
+ sprintf(emsg, "Sorry, LogLuv data must have %s=%d or %d",
+ "Compression", COMPRESSION_SGILOG, COMPRESSION_SGILOG24);
+ return (0);
+ }
+ if (planarconfig != PLANARCONFIG_CONTIG) {
+ sprintf(emsg, "Sorry, can not handle LogLuv images with %s=%d",
+ "Planarconfiguration", planarconfig);
+ return (0);
+ }
+ TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_8BIT);
+ img->photometric = PHOTOMETRIC_RGB; /* little white lie */
+ img->bitspersample = 8;
+ break;
+ case PHOTOMETRIC_CIELAB:
+ break;
+ default:
+ sprintf(emsg, "Sorry, can not handle image with %s=%d",
+ photoTag, img->photometric);
+ return (0);
}
- } else {
- img->get = TIFFIsTiled(tif) ? gtTileSeparate : gtStripSeparate;
- if (!pickTileSeparateCase(img)) {
- sprintf(emsg, "Sorry, can not handle image");
- return 0;
+ img->Map = NULL;
+ img->BWmap = NULL;
+ img->PALmap = NULL;
+ img->ycbcr = NULL;
+ img->cielab = NULL;
+ TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &img->width);
+ TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &img->height);
+ TIFFGetFieldDefaulted(tif, TIFFTAG_ORIENTATION, &img->orientation);
+ img->isContig =
+ !(planarconfig == PLANARCONFIG_SEPARATE && colorchannels > 1);
+ if (img->isContig) {
+ if (!PickContigCase(img)) {
+ sprintf(emsg, "Sorry, can not handle image");
+ return 0;
+ }
+ } else {
+ if (!PickSeparateCase(img)) {
+ sprintf(emsg, "Sorry, can not handle image");
+ return 0;
+ }
}
- }
- return 1;
+ return 1;
}
int
@@ -473,7 +481,7 @@ TIFFReadRGBAImageOriented(TIFF* tif,
rwidth, img.height);
TIFFRGBAImageEnd(&img);
} else {
- TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), emsg);
+ TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", emsg);
ok = 0;
}
return (ok);
@@ -654,119 +662,120 @@ gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
static int
gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
{
- TIFF* tif = img->tif;
- tileSeparateRoutine put = img->put.separate;
- uint32 col, row, y, rowstoread;
- uint32 pos;
- uint32 tw, th;
- unsigned char* buf;
- unsigned char* r;
- unsigned char* g;
- unsigned char* b;
- unsigned char* a;
- tsize_t tilesize;
- int32 fromskew, toskew;
- int alpha = img->alpha;
- uint32 nrow;
- int ret = 1, flip;
-
- tilesize = TIFFTileSize(tif);
- buf = (unsigned char*) _TIFFmalloc(4*tilesize);
- if (buf == 0) {
+ TIFF* tif = img->tif;
+ tileSeparateRoutine put = img->put.separate;
+ uint32 col, row, y, rowstoread;
+ uint32 pos;
+ uint32 tw, th;
+ unsigned char* buf;
+ unsigned char* p0;
+ unsigned char* p1;
+ unsigned char* p2;
+ unsigned char* pa;
+ tsize_t tilesize;
+ int32 fromskew, toskew;
+ int alpha = img->alpha;
+ uint32 nrow;
+ int ret = 1, flip;
+
+ tilesize = TIFFTileSize(tif);
+ buf = (unsigned char*) _TIFFmalloc((alpha?4:3)*tilesize);
+ if (buf == 0) {
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "No space for tile buffer");
return (0);
- }
- _TIFFmemset(buf, 0, 4*tilesize);
- r = buf;
- g = r + tilesize;
- b = g + tilesize;
- a = b + tilesize;
- if (!alpha)
- _TIFFmemset(a, 0xff, tilesize);
- TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw);
- TIFFGetField(tif, TIFFTAG_TILELENGTH, &th);
-
- flip = setorientation(img);
- if (flip & FLIP_VERTICALLY) {
- y = h - 1;
- toskew = -(int32)(tw + w);
- }
- else {
- y = 0;
- toskew = -(int32)(tw - w);
- }
-
- for (row = 0; row < h; row += nrow)
- {
- rowstoread = th - (row + img->row_offset) % th;
- nrow = (row + rowstoread > h ? h - row : rowstoread);
- for (col = 0; col < w; col += tw)
- {
- if (TIFFReadTile(tif, r, col+img->col_offset,
- row+img->row_offset,0,0) < 0 && img->stoponerr)
- {
- ret = 0;
- break;
- }
- if (TIFFReadTile(tif, g, col+img->col_offset,
- row+img->row_offset,0,1) < 0 && img->stoponerr)
- {
- ret = 0;
- break;
- }
- if (TIFFReadTile(tif, b, col+img->col_offset,
- row+img->row_offset,0,2) < 0 && img->stoponerr)
- {
- ret = 0;
- break;
- }
- if (alpha && TIFFReadTile(tif,a,col+img->col_offset,
- row+img->row_offset,0,3) < 0 && img->stoponerr)
- {
- ret = 0;
- break;
- }
+ }
+ _TIFFmemset(buf, 0, (alpha?4:3)*tilesize);
+ p0 = buf;
+ p1 = p0 + tilesize;
+ p2 = p1 + tilesize;
+ pa = (alpha?(p2+tilesize):NULL);
+ TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw);
+ TIFFGetField(tif, TIFFTAG_TILELENGTH, &th);
+
+ flip = setorientation(img);
+ if (flip & FLIP_VERTICALLY) {
+ y = h - 1;
+ toskew = -(int32)(tw + w);
+ }
+ else {
+ y = 0;
+ toskew = -(int32)(tw - w);
+ }
- pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif);
+ for (row = 0; row < h; row += nrow)
+ {
+ rowstoread = th - (row + img->row_offset) % th;
+ nrow = (row + rowstoread > h ? h - row : rowstoread);
+ for (col = 0; col < w; col += tw)
+ {
+ if (TIFFReadTile(tif, p0, col+img->col_offset,
+ row+img->row_offset,0,0) < 0 && img->stoponerr)
+ {
+ ret = 0;
+ break;
+ }
+ if (TIFFReadTile(tif, p1, col+img->col_offset,
+ row+img->row_offset,0,1) < 0 && img->stoponerr)
+ {
+ ret = 0;
+ break;
+ }
+ if (TIFFReadTile(tif, p2, col+img->col_offset,
+ row+img->row_offset,0,2) < 0 && img->stoponerr)
+ {
+ ret = 0;
+ break;
+ }
+ if (alpha)
+ {
+ if (TIFFReadTile(tif,pa,col+img->col_offset,
+ row+img->row_offset,0,3) < 0 && img->stoponerr)
+ {
+ ret = 0;
+ break;
+ }
+ }
+
+ pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif);
+
+ if (col + tw > w)
+ {
+ /*
+ * Tile is clipped horizontally. Calculate
+ * visible portion and skewing factors.
+ */
+ uint32 npix = w - col;
+ fromskew = tw - npix;
+ (*put)(img, raster+y*w+col, col, y,
+ npix, nrow, fromskew, toskew + fromskew,
+ p0 + pos, p1 + pos, p2 + pos, (alpha?(pa+pos):NULL));
+ } else {
+ (*put)(img, raster+y*w+col, col, y,
+ tw, nrow, 0, toskew, p0 + pos, p1 + pos, p2 + pos, (alpha?(pa+pos):NULL));
+ }
+ }
- if (col + tw > w)
- {
- /*
- * Tile is clipped horizontally. Calculate
- * visible portion and skewing factors.
- */
- uint32 npix = w - col;
- fromskew = tw - npix;
- (*put)(img, raster+y*w+col, col, y,
- npix, nrow, fromskew, toskew + fromskew,
- r + pos, g + pos, b + pos, a + pos);
- } else {
- (*put)(img, raster+y*w+col, col, y,
- tw, nrow, 0, toskew, r + pos, g + pos, b + pos, a + pos);
- }
- }
+ y += (flip & FLIP_VERTICALLY ?-(int32) nrow : (int32) nrow);
+ }
- y += (flip & FLIP_VERTICALLY ?-(int32) nrow : (int32) nrow);
- }
+ if (flip & FLIP_HORIZONTALLY) {
+ uint32 line;
- if (flip & FLIP_HORIZONTALLY) {
- uint32 line;
+ for (line = 0; line < h; line++) {
+ uint32 *left = raster + (line * w);
+ uint32 *right = left + w - 1;
- for (line = 0; line < h; line++) {
- uint32 *left = raster + (line * w);
- uint32 *right = left + w - 1;
-
- while ( left < right ) {
- uint32 temp = *left;
- *left = *right;
- *right = temp;
- left++, right--;
- }
- }
- }
+ while ( left < right ) {
+ uint32 temp = *left;
+ *left = *right;
+ *right = temp;
+ left++, right--;
+ }
+ }
+ }
- _TIFFfree(buf);
- return (ret);
+ _TIFFfree(buf);
+ return (ret);
}
/*
@@ -778,73 +787,78 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
static int
gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
{
- TIFF* tif = img->tif;
- tileContigRoutine put = img->put.contig;
- uint32 row, y, nrow, rowstoread;
- uint32 pos;
- unsigned char* buf;
- uint32 rowsperstrip;
- uint32 imagewidth = img->width;
- tsize_t scanline;
- int32 fromskew, toskew;
- int ret = 1, flip;
-
- buf = (unsigned char*) _TIFFmalloc(TIFFStripSize(tif));
- if (buf == 0) {
+ TIFF* tif = img->tif;
+ tileContigRoutine put = img->put.contig;
+ uint32 row, y, nrow, nrowsub, rowstoread;
+ uint32 pos;
+ unsigned char* buf;
+ uint32 rowsperstrip;
+ uint16 subsamplinghor,subsamplingver;
+ uint32 imagewidth = img->width;
+ tsize_t scanline;
+ int32 fromskew, toskew;
+ int ret = 1, flip;
+
+ buf = (unsigned char*) _TIFFmalloc(TIFFStripSize(tif));
+ if (buf == 0) {
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "No space for strip buffer");
return (0);
- }
- _TIFFmemset(buf, 0, TIFFStripSize(tif));
+ }
+ _TIFFmemset(buf, 0, TIFFStripSize(tif));
- flip = setorientation(img);
- if (flip & FLIP_VERTICALLY) {
- y = h - 1;
- toskew = -(int32)(w + w);
- } else {
- y = 0;
- toskew = -(int32)(w - w);
- }
+ flip = setorientation(img);
+ if (flip & FLIP_VERTICALLY) {
+ y = h - 1;
+ toskew = -(int32)(w + w);
+ } else {
+ y = 0;
+ toskew = -(int32)(w - w);
+ }
- TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
- scanline = TIFFScanlineSize(tif);
- fromskew = (w < imagewidth ? imagewidth - w : 0);
- for (row = 0; row < h; row += nrow)
- {
- rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip;
- nrow = (row + rowstoread > h ? h - row : rowstoread);
- if (TIFFReadEncodedStrip(tif,
- TIFFComputeStrip(tif,row+img->row_offset, 0),
- buf,
- ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
- && img->stoponerr)
- {
- ret = 0;
- break;
- }
+ TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
+ TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRSUBSAMPLING, &subsamplinghor, &subsamplingver);
+ scanline = TIFFNewScanlineSize(tif);
+ fromskew = (w < imagewidth ? imagewidth - w : 0);
+ for (row = 0; row < h; row += nrow)
+ {
+ rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip;
+ nrow = (row + rowstoread > h ? h - row : rowstoread);
+ nrowsub = nrow;
+ if ((nrowsub%subsamplingver)!=0)
+ nrowsub+=subsamplingver-nrowsub%subsamplingver;
+ if (TIFFReadEncodedStrip(tif,
+ TIFFComputeStrip(tif,row+img->row_offset, 0),
+ buf,
+ ((row + img->row_offset)%rowsperstrip + nrowsub) * scanline) < 0
+ && img->stoponerr)
+ {
+ ret = 0;
+ break;
+ }
- pos = ((row + img->row_offset) % rowsperstrip) * scanline;
- (*put)(img, raster+y*w, 0, y, w, nrow, fromskew, toskew, buf + pos);
- y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow);
- }
+ pos = ((row + img->row_offset) % rowsperstrip) * scanline;
+ (*put)(img, raster+y*w, 0, y, w, nrow, fromskew, toskew, buf + pos);
+ y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow);
+ }
- if (flip & FLIP_HORIZONTALLY) {
- uint32 line;
+ if (flip & FLIP_HORIZONTALLY) {
+ uint32 line;
- for (line = 0; line < h; line++) {
- uint32 *left = raster + (line * w);
- uint32 *right = left + w - 1;
-
- while ( left < right ) {
- uint32 temp = *left;
- *left = *right;
- *right = temp;
- left++, right--;
- }
- }
- }
+ for (line = 0; line < h; line++) {
+ uint32 *left = raster + (line * w);
+ uint32 *right = left + w - 1;
- _TIFFfree(buf);
- return (ret);
+ while ( left < right ) {
+ uint32 temp = *left;
+ *left = *right;
+ *right = temp;
+ left++, right--;
+ }
+ }
+ }
+
+ _TIFFfree(buf);
+ return (ret);
}
/*
@@ -856,105 +870,105 @@ gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
static int
gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
{
- TIFF* tif = img->tif;
- tileSeparateRoutine put = img->put.separate;
- unsigned char *buf;
- unsigned char *r, *g, *b, *a;
- uint32 row, y, nrow, rowstoread;
- uint32 pos;
- tsize_t scanline;
- uint32 rowsperstrip, offset_row;
- uint32 imagewidth = img->width;
- tsize_t stripsize;
- int32 fromskew, toskew;
- int alpha = img->alpha;
- int ret = 1, flip;
-
- stripsize = TIFFStripSize(tif);
- r = buf = (unsigned char *)_TIFFmalloc(4*stripsize);
- if (buf == 0) {
+ TIFF* tif = img->tif;
+ tileSeparateRoutine put = img->put.separate;
+ unsigned char *buf;
+ unsigned char *p0, *p1, *p2, *pa;
+ uint32 row, y, nrow, rowstoread;
+ uint32 pos;
+ tsize_t scanline;
+ uint32 rowsperstrip, offset_row;
+ uint32 imagewidth = img->width;
+ tsize_t stripsize;
+ int32 fromskew, toskew;
+ int alpha = img->alpha;
+ int ret = 1, flip;
+
+ stripsize = TIFFStripSize(tif);
+ p0 = buf = (unsigned char *)_TIFFmalloc((alpha?4:3)*stripsize);
+ if (buf == 0) {
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "No space for tile buffer");
return (0);
- }
- _TIFFmemset(buf, 0, 4*stripsize);
- g = r + stripsize;
- b = g + stripsize;
- a = b + stripsize;
- if (!alpha)
- _TIFFmemset(a, 0xff, stripsize);
+ }
+ _TIFFmemset(buf, 0, (alpha?4:3)*stripsize);
+ p1 = p0 + stripsize;
+ p2 = p1 + stripsize;
+ pa = (alpha?(p2+stripsize):NULL);
+
+ flip = setorientation(img);
+ if (flip & FLIP_VERTICALLY) {
+ y = h - 1;
+ toskew = -(int32)(w + w);
+ }
+ else {
+ y = 0;
+ toskew = -(int32)(w - w);
+ }
- flip = setorientation(img);
- if (flip & FLIP_VERTICALLY) {
- y = h - 1;
- toskew = -(int32)(w + w);
- }
- else {
- y = 0;
- toskew = -(int32)(w - w);
- }
+ TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
+ scanline = TIFFScanlineSize(tif);
+ fromskew = (w < imagewidth ? imagewidth - w : 0);
+ for (row = 0; row < h; row += nrow)
+ {
+ rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip;
+ nrow = (row + rowstoread > h ? h - row : rowstoread);
+ offset_row = row + img->row_offset;
+ if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 0),
+ p0, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
+ && img->stoponerr)
+ {
+ ret = 0;
+ break;
+ }
+ if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 1),
+ p1, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
+ && img->stoponerr)
+ {
+ ret = 0;
+ break;
+ }
+ if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 2),
+ p2, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
+ && img->stoponerr)
+ {
+ ret = 0;
+ break;
+ }
+ if (alpha)
+ {
+ if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 3),
+ pa, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
+ && img->stoponerr)
+ {
+ ret = 0;
+ break;
+ }
+ }
- TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
- scanline = TIFFScanlineSize(tif);
- fromskew = (w < imagewidth ? imagewidth - w : 0);
- for (row = 0; row < h; row += nrow)
- {
- rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip;
- nrow = (row + rowstoread > h ? h - row : rowstoread);
- offset_row = row + img->row_offset;
- if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 0),
- r, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
- && img->stoponerr)
- {
- ret = 0;
- break;
- }
- if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 1),
- g, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
- && img->stoponerr)
- {
- ret = 0;
- break;
- }
- if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 2),
- b, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
- && img->stoponerr)
- {
- ret = 0;
- break;
- }
- if (alpha &&
- (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 3),
- a, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
- && img->stoponerr))
- {
- ret = 0;
- break;
- }
+ pos = ((row + img->row_offset) % rowsperstrip) * scanline;
+ (*put)(img, raster+y*w, 0, y, w, nrow, fromskew, toskew, p0 + pos, p1 + pos,
+ p2 + pos, (alpha?(pa+pos):NULL));
+ y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow);
+ }
- pos = ((row + img->row_offset) % rowsperstrip) * scanline;
- (*put)(img, raster+y*w, 0, y, w, nrow, fromskew, toskew, r + pos, g + pos,
- b + pos, a + pos);
- y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow);
- }
+ if (flip & FLIP_HORIZONTALLY) {
+ uint32 line;
- if (flip & FLIP_HORIZONTALLY) {
- uint32 line;
+ for (line = 0; line < h; line++) {
+ uint32 *left = raster + (line * w);
+ uint32 *right = left + w - 1;
- for (line = 0; line < h; line++) {
- uint32 *left = raster + (line * w);
- uint32 *right = left + w - 1;
-
- while ( left < right ) {
- uint32 temp = *left;
- *left = *right;
- *right = temp;
- left++, right--;
- }
- }
- }
+ while ( left < right ) {
+ uint32 temp = *left;
+ *left = *right;
+ *right = temp;
+ left++, right--;
+ }
+ }
+ }
- _TIFFfree(buf);
- return (ret);
+ _TIFFfree(buf);
+ return (ret);
}
/*
@@ -963,9 +977,9 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
* ABGR pixels (i.e. suitable for passing to lrecwrite.)
*
* The routines have been created according to the most
- * important cases and optimized. pickTileContigCase and
- * pickTileSeparateCase analyze the parameters and select
- * the appropriate "put" routine to use.
+ * important cases and optimized. PickContigCase and
+ * PickSeparateCase analyze the parameters and select
+ * the appropriate "get" and "put" routine to use.
*/
#define REPEAT8(op) REPEAT4(op); REPEAT4(op)
#define REPEAT4(op) REPEAT2(op); REPEAT2(op)
@@ -1223,26 +1237,6 @@ DECLAREContigPutFunc(putRGBcontig8bittile)
}
/*
- * 8-bit packed samples, w/ Map => RGB
- */
-DECLAREContigPutFunc(putRGBcontig8bitMaptile)
-{
- TIFFRGBValue* Map = img->Map;
- int samplesperpixel = img->samplesperpixel;
-
- (void) y;
- fromskew *= samplesperpixel;
- while (h-- > 0) {
- for (x = w; x-- > 0;) {
- *cp++ = PACK(Map[pp[0]], Map[pp[1]], Map[pp[2]]);
- pp += samplesperpixel;
- }
- pp += fromskew;
- cp += toskew;
- }
-}
-
-/*
* 8-bit packed samples => RGBA w/ associated alpha
* (known to have Map == NULL)
*/
@@ -1267,23 +1261,22 @@ DECLAREContigPutFunc(putRGBAAcontig8bittile)
*/
DECLAREContigPutFunc(putRGBUAcontig8bittile)
{
- int samplesperpixel = img->samplesperpixel;
-
- (void) y;
- fromskew *= samplesperpixel;
- while (h-- > 0) {
- uint32 r, g, b, a;
- for (x = w; x-- > 0;) {
- a = pp[3];
- r = (pp[0] * a) / 255;
- g = (pp[1] * a) / 255;
- b = (pp[2] * a) / 255;
- *cp++ = PACK4(r,g,b,a);
- pp += samplesperpixel;
+ int samplesperpixel = img->samplesperpixel;
+ (void) y;
+ fromskew *= samplesperpixel;
+ while (h-- > 0) {
+ uint32 r, g, b, a;
+ for (x = w; x-- > 0;) {
+ a = pp[3];
+ r = (a*pp[0] + 127) / 255;
+ g = (a*pp[1] + 127) / 255;
+ b = (a*pp[2] + 127) / 255;
+ *cp++ = PACK4(r,g,b,a);
+ pp += samplesperpixel;
+ }
+ cp += toskew;
+ pp += fromskew;
}
- cp += toskew;
- pp += fromskew;
- }
}
/*
@@ -1291,19 +1284,18 @@ DECLAREContigPutFunc(putRGBUAcontig8bittile)
*/
DECLAREContigPutFunc(putRGBcontig16bittile)
{
- int samplesperpixel = img->samplesperpixel;
- uint16 *wp = (uint16 *)pp;
-
- (void) y;
- fromskew *= samplesperpixel;
- while (h-- > 0) {
- for (x = w; x-- > 0;) {
- *cp++ = PACKW(wp[0], wp[1], wp[2]);
- wp += samplesperpixel;
+ int samplesperpixel = img->samplesperpixel;
+ uint16 *wp = (uint16 *)pp;
+ (void) y;
+ fromskew *= samplesperpixel;
+ while (h-- > 0) {
+ for (x = w; x-- > 0;) {
+ *cp++ = PACKW(wp[0],wp[1],wp[2]);
+ wp += samplesperpixel;
+ }
+ cp += toskew;
+ wp += fromskew;
}
- cp += toskew;
- wp += fromskew;
- }
}
/*
@@ -1312,19 +1304,18 @@ DECLAREContigPutFunc(putRGBcontig16bittile)
*/
DECLAREContigPutFunc(putRGBAAcontig16bittile)
{
- int samplesperpixel = img->samplesperpixel;
- uint16 *wp = (uint16 *)pp;
-
- (void) y;
- fromskew *= samplesperpixel;
- while (h-- > 0) {
- for (x = w; x-- > 0;) {
- *cp++ = PACKW4(wp[0], wp[1], wp[2], wp[3]);
- wp += samplesperpixel;
+ int samplesperpixel = img->samplesperpixel;
+ uint16 *wp = (uint16 *)pp;
+ (void) y;
+ fromskew *= samplesperpixel;
+ while (h-- > 0) {
+ for (x = w; x-- > 0;) {
+ *cp++ = PACKW4(wp[0],wp[1],wp[2],wp[3]);
+ wp += samplesperpixel;
+ }
+ cp += toskew;
+ wp += fromskew;
}
- cp += toskew;
- wp += fromskew;
- }
}
/*
@@ -1333,32 +1324,23 @@ DECLAREContigPutFunc(putRGBAAcontig16bittile)
*/
DECLAREContigPutFunc(putRGBUAcontig16bittile)
{
- int samplesperpixel = img->samplesperpixel;
- uint16 *wp = (uint16 *)pp;
-
- (void) y;
- fromskew *= samplesperpixel;
- while (h-- > 0) {
- uint32 r,g,b,a;
- /*
- * We shift alpha down four bits just in case unsigned
- * arithmetic doesn't handle the full range.
- * We still have plenty of accuracy, since the output is 8 bits.
- * So we have (r * 0xffff) * (a * 0xfff)) = r*a * (0xffff*0xfff)
- * Since we want r*a * 0xff for eight bit output,
- * we divide by (0xffff * 0xfff) / 0xff == 0x10eff.
- */
- for (x = w; x-- > 0;) {
- a = wp[3] >> 4;
- r = (wp[0] * a) / 0x10eff;
- g = (wp[1] * a) / 0x10eff;
- b = (wp[2] * a) / 0x10eff;
- *cp++ = PACK4(r,g,b,a);
- wp += samplesperpixel;
+ int samplesperpixel = img->samplesperpixel;
+ uint16 *wp = (uint16 *)pp;
+ (void) y;
+ fromskew *= samplesperpixel;
+ while (h-- > 0) {
+ uint32 r,g,b,a;
+ for (x = w; x-- > 0;) {
+ a = W2B(wp[3]);
+ r = (a*W2B(wp[0]) + 127) / 255;
+ g = (a*W2B(wp[1]) + 127) / 255;
+ b = (a*W2B(wp[2]) + 127) / 255;
+ *cp++ = PACK4(r,g,b,a);
+ wp += samplesperpixel;
+ }
+ cp += toskew;
+ wp += fromskew;
}
- cp += toskew;
- wp += fromskew;
- }
}
/*
@@ -1437,32 +1419,16 @@ DECLARESepPutFunc(putRGBseparate8bittile)
}
/*
- * 8-bit unpacked samples => RGB
- */
-DECLARESepPutFunc(putRGBseparate8bitMaptile)
-{
- TIFFRGBValue* Map = img->Map;
-
- (void) y; (void) a;
- while (h-- > 0) {
- for (x = w; x > 0; x--)
- *cp++ = PACK(Map[*r++], Map[*g++], Map[*b++]);
- SKEW(r, g, b, fromskew);
- cp += toskew;
- }
-}
-
-/*
* 8-bit unpacked samples => RGBA w/ associated alpha
*/
DECLARESepPutFunc(putRGBAAseparate8bittile)
{
- (void) img; (void) x; (void) y;
- while (h-- > 0) {
- UNROLL8(w, NOP, *cp++ = PACK4(*r++, *g++, *b++, *a++));
- SKEW4(r, g, b, a, fromskew);
- cp += toskew;
- }
+ (void) img; (void) x; (void) y;
+ while (h-- > 0) {
+ UNROLL8(w, NOP, *cp++ = PACK4(*r++, *g++, *b++, *a++));
+ SKEW4(r, g, b, a, fromskew);
+ cp += toskew;
+ }
}
/*
@@ -1470,19 +1436,19 @@ DECLARESepPutFunc(putRGBAAseparate8bittile)
*/
DECLARESepPutFunc(putRGBUAseparate8bittile)
{
- (void) img; (void) y;
- while (h-- > 0) {
- uint32 rv, gv, bv, av;
- for (x = w; x-- > 0;) {
- av = *a++;
- rv = (*r++ * av) / 255;
- gv = (*g++ * av) / 255;
- bv = (*b++ * av) / 255;
- *cp++ = PACK4(rv,gv,bv,av);
+ (void) img; (void) y;
+ while (h-- > 0) {
+ uint32 rv, gv, bv, av;
+ for (x = w; x-- > 0;) {
+ av = *a++;
+ rv = (av* *r++ + 127) / 255;
+ gv = (av* *g++ + 127) / 255;
+ bv = (av* *b++ + 127) / 255;
+ *cp++ = PACK4(rv,gv,bv,av);
+ }
+ SKEW4(r, g, b, a, fromskew);
+ cp += toskew;
}
- SKEW4(r, g, b, a, fromskew);
- cp += toskew;
- }
}
/*
@@ -1490,17 +1456,16 @@ DECLARESepPutFunc(putRGBUAseparate8bittile)
*/
DECLARESepPutFunc(putRGBseparate16bittile)
{
- uint16 *wr = (uint16*) r;
- uint16 *wg = (uint16*) g;
- uint16 *wb = (uint16*) b;
-
- (void) img; (void) y; (void) a;
- while (h-- > 0) {
- for (x = 0; x < w; x++)
- *cp++ = PACKW(*wr++, *wg++, *wb++);
- SKEW(wr, wg, wb, fromskew);
- cp += toskew;
- }
+ uint16 *wr = (uint16*) r;
+ uint16 *wg = (uint16*) g;
+ uint16 *wb = (uint16*) b;
+ (void) img; (void) y; (void) a;
+ while (h-- > 0) {
+ for (x = 0; x < w; x++)
+ *cp++ = PACKW(*wr++,*wg++,*wb++);
+ SKEW(wr, wg, wb, fromskew);
+ cp += toskew;
+ }
}
/*
@@ -1508,18 +1473,17 @@ DECLARESepPutFunc(putRGBseparate16bittile)
*/
DECLARESepPutFunc(putRGBAAseparate16bittile)
{
- uint16 *wr = (uint16*) r;
- uint16 *wg = (uint16*) g;
- uint16 *wb = (uint16*) b;
- uint16 *wa = (uint16*) a;
-
- (void) img; (void) y;
- while (h-- > 0) {
- for (x = 0; x < w; x++)
- *cp++ = PACKW4(*wr++, *wg++, *wb++, *wa++);
- SKEW4(wr, wg, wb, wa, fromskew);
- cp += toskew;
- }
+ uint16 *wr = (uint16*) r;
+ uint16 *wg = (uint16*) g;
+ uint16 *wb = (uint16*) b;
+ uint16 *wa = (uint16*) a;
+ (void) img; (void) y;
+ while (h-- > 0) {
+ for (x = 0; x < w; x++)
+ *cp++ = PACKW4(*wr++,*wg++,*wb++,*wa++);
+ SKEW4(wr, wg, wb, wa, fromskew);
+ cp += toskew;
+ }
}
/*
@@ -1527,32 +1491,23 @@ DECLARESepPutFunc(putRGBAAseparate16bittile)
*/
DECLARESepPutFunc(putRGBUAseparate16bittile)
{
- uint16 *wr = (uint16*) r;
- uint16 *wg = (uint16*) g;
- uint16 *wb = (uint16*) b;
- uint16 *wa = (uint16*) a;
-
- (void) img; (void) y;
- while (h-- > 0) {
- uint32 r,g,b,a;
- /*
- * We shift alpha down four bits just in case unsigned
- * arithmetic doesn't handle the full range.
- * We still have plenty of accuracy, since the output is 8 bits.
- * So we have (r * 0xffff) * (a * 0xfff)) = r*a * (0xffff*0xfff)
- * Since we want r*a * 0xff for eight bit output,
- * we divide by (0xffff * 0xfff) / 0xff == 0x10eff.
- */
- for (x = w; x-- > 0;) {
- a = *wa++ >> 4;
- r = (*wr++ * a) / 0x10eff;
- g = (*wg++ * a) / 0x10eff;
- b = (*wb++ * a) / 0x10eff;
- *cp++ = PACK4(r,g,b,a);
+ uint16 *wr = (uint16*) r;
+ uint16 *wg = (uint16*) g;
+ uint16 *wb = (uint16*) b;
+ uint16 *wa = (uint16*) a;
+ (void) img; (void) y;
+ while (h-- > 0) {
+ uint32 r,g,b,a;
+ for (x = w; x-- > 0;) {
+ a = W2B(*wa++);
+ r = (a*W2B(*wr++) + 127) / 255;
+ g = (a*W2B(*wg++) + 127) / 255;
+ b = (a*W2B(*wb++) + 127) / 255;
+ *cp++ = PACK4(r,g,b,a);
+ }
+ SKEW4(wr, wg, wb, wa, fromskew);
+ cp += toskew;
}
- SKEW4(wr, wg, wb, wa, fromskew);
- cp += toskew;
- }
}
/*
@@ -1890,63 +1845,56 @@ DECLAREContigPutFunc(putcontig8bitYCbCr41tile)
*/
DECLAREContigPutFunc(putcontig8bitYCbCr22tile)
{
- uint32* cp1 = cp+w+toskew;
- int32 incr = 2*toskew+w;
-
- (void) y;
- fromskew = (fromskew * 6) / 2;
- if ((h & 1) == 0 && (w & 1) == 0) {
- for (; h >= 2; h -= 2) {
- x = w>>1;
- do {
- int32 Cb = pp[4];
- int32 Cr = pp[5];
-
- YCbCrtoRGB(cp [0], pp[0]);
- YCbCrtoRGB(cp [1], pp[1]);
- YCbCrtoRGB(cp1[0], pp[2]);
- YCbCrtoRGB(cp1[1], pp[3]);
-
- cp += 2, cp1 += 2;
- pp += 6;
- } while (--x);
- cp += incr, cp1 += incr;
- pp += fromskew;
- }
- } else {
- while (h > 0) {
- for (x = w; x > 0;) {
- int32 Cb = pp[4];
- int32 Cr = pp[5];
- switch (x) {
- default:
- switch (h) {
- default: YCbCrtoRGB(cp1[1], pp[ 3]); /* FALLTHROUGH */
- case 1: YCbCrtoRGB(cp [1], pp[ 1]); /* FALLTHROUGH */
- } /* FALLTHROUGH */
- case 1:
- switch (h) {
- default: YCbCrtoRGB(cp1[0], pp[ 2]); /* FALLTHROUGH */
- case 1: YCbCrtoRGB(cp [0], pp[ 0]); /* FALLTHROUGH */
- } /* FALLTHROUGH */
- }
- if (x < 2) {
- cp += x; cp1 += x;
- x = 0;
- }
- else {
- cp += 2; cp1 += 2;
- x -= 2;
- }
- pp += 6;
- }
- if (h <= 2)
- break;
- h -= 2;
- cp += incr, cp1 += incr;
- pp += fromskew;
- }
- }
+ uint32* cp2;
+ (void) y;
+ fromskew = (fromskew / 2) * 6;
+ cp2 = cp+w+toskew;
+ while (h>=2) {
+ x = w;
+ while (x>=2) {
+ uint32 Cb = pp[4];
+ uint32 Cr = pp[5];
+ YCbCrtoRGB(cp[0], pp[0]);
+ YCbCrtoRGB(cp[1], pp[1]);
+ YCbCrtoRGB(cp2[0], pp[2]);
+ YCbCrtoRGB(cp2[1], pp[3]);
+ cp += 2;
+ cp2 += 2;
+ pp += 6;
+ x -= 2;
+ }
+ if (x==1) {
+ uint32 Cb = pp[4];
+ uint32 Cr = pp[5];
+ YCbCrtoRGB(cp[0], pp[0]);
+ YCbCrtoRGB(cp2[0], pp[2]);
+ cp ++ ;
+ cp2 ++ ;
+ pp += 6;
+ }
+ cp += toskew*2+w;
+ cp2 += toskew*2+w;
+ pp += fromskew;
+ h-=2;
+ }
+ if (h==1) {
+ x = w;
+ while (x>=2) {
+ uint32 Cb = pp[4];
+ uint32 Cr = pp[5];
+ YCbCrtoRGB(cp[0], pp[0]);
+ YCbCrtoRGB(cp[1], pp[1]);
+ cp += 2;
+ cp2 += 2;
+ pp += 6;
+ x -= 2;
+ }
+ if (x==1) {
+ uint32 Cb = pp[4];
+ uint32 Cr = pp[5];
+ YCbCrtoRGB(cp[0], pp[0]);
+ }
+ }
}
/*
@@ -1954,35 +1902,72 @@ DECLAREContigPutFunc(putcontig8bitYCbCr22tile)
*/
DECLAREContigPutFunc(putcontig8bitYCbCr21tile)
{
- (void) y;
- fromskew = (fromskew * 4) / 2;
- do {
- x = w>>1;
+ (void) y;
+ fromskew = (fromskew * 4) / 2;
do {
- int32 Cb = pp[2];
- int32 Cr = pp[3];
+ x = w>>1;
+ do {
+ int32 Cb = pp[2];
+ int32 Cr = pp[3];
- YCbCrtoRGB(cp[0], pp[0]);
- YCbCrtoRGB(cp[1], pp[1]);
+ YCbCrtoRGB(cp[0], pp[0]);
+ YCbCrtoRGB(cp[1], pp[1]);
- cp += 2;
- pp += 4;
- } while (--x);
+ cp += 2;
+ pp += 4;
+ } while (--x);
- if( (w&1) != 0 )
- {
- int32 Cb = pp[2];
- int32 Cr = pp[3];
-
- YCbCrtoRGB(cp [0], pp[0]);
+ if( (w&1) != 0 )
+ {
+ int32 Cb = pp[2];
+ int32 Cr = pp[3];
- cp += 1;
- pp += 4;
- }
+ YCbCrtoRGB(cp[0], pp[0]);
- cp += toskew;
- pp += fromskew;
- } while (--h);
+ cp += 1;
+ pp += 4;
+ }
+
+ cp += toskew;
+ pp += fromskew;
+ } while (--h);
+}
+
+/*
+ * 8-bit packed YCbCr samples w/ 1,2 subsampling => RGB
+ */
+DECLAREContigPutFunc(putcontig8bitYCbCr12tile)
+{
+ uint32* cp2;
+ (void) y;
+ fromskew = (fromskew / 2) * 4;
+ cp2 = cp+w+toskew;
+ while (h>=2) {
+ x = w;
+ do {
+ uint32 Cb = pp[2];
+ uint32 Cr = pp[3];
+ YCbCrtoRGB(cp[0], pp[0]);
+ YCbCrtoRGB(cp2[0], pp[1]);
+ cp ++;
+ cp2 ++;
+ pp += 4;
+ } while (--x);
+ cp += toskew*2+w;
+ cp2 += toskew*2+w;
+ pp += fromskew;
+ h-=2;
+ }
+ if (h==1) {
+ x = w;
+ do {
+ uint32 Cb = pp[2];
+ uint32 Cr = pp[3];
+ YCbCrtoRGB(cp[0], pp[0]);
+ cp ++;
+ pp += 4;
+ } while (--x);
+ }
}
/*
@@ -1990,70 +1975,71 @@ DECLAREContigPutFunc(putcontig8bitYCbCr21tile)
*/
DECLAREContigPutFunc(putcontig8bitYCbCr11tile)
{
- (void) y;
- fromskew *= 3;
- do {
- x = w; /* was x = w>>1; patched 2000/09/25 warmerda@home.com */
+ (void) y;
+ fromskew *= 3;
do {
- int32 Cb = pp[1];
- int32 Cr = pp[2];
+ x = w; /* was x = w>>1; patched 2000/09/25 warmerda@home.com */
+ do {
+ int32 Cb = pp[1];
+ int32 Cr = pp[2];
- YCbCrtoRGB(*cp++, pp[0]);
+ YCbCrtoRGB(*cp++, pp[0]);
- pp += 3;
- } while (--x);
- cp += toskew;
- pp += fromskew;
- } while (--h);
+ pp += 3;
+ } while (--x);
+ cp += toskew;
+ pp += fromskew;
+ } while (--h);
}
-#undef YCbCrtoRGB
-static tileContigRoutine
+/*
+ * 8-bit packed YCbCr samples w/ no subsampling => RGB
+ */
+DECLARESepPutFunc(putseparate8bitYCbCr11tile)
+{
+ (void) y;
+ (void) a;
+ /* TODO: naming of input vars is still off, change obfuscating declaration inside define, or resolve obfuscation */
+ while (h-- > 0) {
+ x = w;
+ do {
+ uint32 dr, dg, db;
+ TIFFYCbCrtoRGB(img->ycbcr,*r++,*g++,*b++,&dr,&dg,&db);
+ *cp++ = PACK(dr,dg,db);
+ } while (--x);
+ SKEW(r, g, b, fromskew);
+ cp += toskew;
+ }
+}
+#undef YCbCrtoRGB
+
+static int
initYCbCrConversion(TIFFRGBAImage* img)
{
- static char module[] = "initCIELabConversion";
+ static char module[] = "initYCbCrConversion";
float *luma, *refBlackWhite;
- uint16 hs, vs;
if (img->ycbcr == NULL) {
- img->ycbcr = (TIFFYCbCrToRGB*) _TIFFmalloc(
+ img->ycbcr = (TIFFYCbCrToRGB*) _TIFFmalloc(
TIFFroundup(sizeof (TIFFYCbCrToRGB), sizeof (long))
+ 4*256*sizeof (TIFFRGBValue)
+ 2*256*sizeof (int)
+ 3*256*sizeof (int32)
- );
- if (img->ycbcr == NULL) {
+ );
+ if (img->ycbcr == NULL) {
TIFFErrorExt(img->tif->tif_clientdata, module,
- "No space for YCbCr->RGB conversion state");
- return (NULL);
- }
+ "No space for YCbCr->RGB conversion state");
+ return (0);
+ }
}
TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRCOEFFICIENTS, &luma);
TIFFGetFieldDefaulted(img->tif, TIFFTAG_REFERENCEBLACKWHITE,
- &refBlackWhite);
+ &refBlackWhite);
if (TIFFYCbCrToRGBInit(img->ycbcr, luma, refBlackWhite) < 0)
- return NULL;
-
- /*
- * The 6.0 spec says that subsampling must be
- * one of 1, 2, or 4, and that vertical subsampling
- * must always be <= horizontal subsampling; so
- * there are only a few possibilities and we just
- * enumerate the cases.
- */
- TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRSUBSAMPLING, &hs, &vs);
- switch ((hs<<4)|vs) {
- case 0x44: return (putcontig8bitYCbCr44tile);
- case 0x42: return (putcontig8bitYCbCr42tile);
- case 0x41: return (putcontig8bitYCbCr41tile);
- case 0x22: return (putcontig8bitYCbCr22tile);
- case 0x21: return (putcontig8bitYCbCr21tile);
- case 0x11: return (putcontig8bitYCbCr11tile);
- }
-
- return (NULL);
+ return(0);
+ return (1);
}
static tileContigRoutine
@@ -2327,73 +2313,140 @@ buildMap(TIFFRGBAImage* img)
* Select the appropriate conversion routine for packed data.
*/
static int
-pickTileContigCase(TIFFRGBAImage* img)
+PickContigCase(TIFFRGBAImage* img)
{
- tileContigRoutine put = 0;
-
- if (buildMap(img)) {
+ img->get = TIFFIsTiled(img->tif) ? gtTileContig : gtStripContig;
+ img->put.contig = NULL;
switch (img->photometric) {
- case PHOTOMETRIC_RGB:
- switch (img->bitspersample) {
- case 8:
- if (!img->Map) {
- if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
- put = putRGBAAcontig8bittile;
- else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
- put = putRGBUAcontig8bittile;
- else
- put = putRGBcontig8bittile;
- } else
- put = putRGBcontig8bitMaptile;
- break;
- case 16:
- put = putRGBcontig16bittile;
- if (!img->Map) {
- if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
- put = putRGBAAcontig16bittile;
- else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
- put = putRGBUAcontig16bittile;
- }
- break;
- }
- break;
- case PHOTOMETRIC_SEPARATED:
- if (img->bitspersample == 8) {
- if (!img->Map)
- put = putRGBcontig8bitCMYKtile;
- else
- put = putRGBcontig8bitCMYKMaptile;
- }
- break;
- case PHOTOMETRIC_PALETTE:
- switch (img->bitspersample) {
- case 8: put = put8bitcmaptile; break;
- case 4: put = put4bitcmaptile; break;
- case 2: put = put2bitcmaptile; break;
- case 1: put = put1bitcmaptile; break;
- }
- break;
- case PHOTOMETRIC_MINISWHITE:
- case PHOTOMETRIC_MINISBLACK:
- switch (img->bitspersample) {
- case 16: put = put16bitbwtile; break;
- case 8: put = putgreytile; break;
- case 4: put = put4bitbwtile; break;
- case 2: put = put2bitbwtile; break;
- case 1: put = put1bitbwtile; break;
- }
- break;
- case PHOTOMETRIC_YCBCR:
- if (img->bitspersample == 8)
- put = initYCbCrConversion(img);
- break;
- case PHOTOMETRIC_CIELAB:
- if (img->bitspersample == 8)
- put = initCIELabConversion(img);
- break;
+ case PHOTOMETRIC_RGB:
+ switch (img->bitspersample) {
+ case 8:
+ if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
+ img->put.contig = putRGBAAcontig8bittile;
+ else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
+ {
+ img->put.contig = putRGBUAcontig8bittile;
+ }
+ else
+ img->put.contig = putRGBcontig8bittile;
+ break;
+ case 16:
+ if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
+ {
+ img->put.contig = putRGBAAcontig16bittile;
+ }
+ else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
+ {
+ img->put.contig = putRGBUAcontig16bittile;
+ }
+ else
+ {
+ img->put.contig = putRGBcontig16bittile;
+ }
+ break;
+ }
+ break;
+ case PHOTOMETRIC_SEPARATED:
+ if (buildMap(img)) {
+ if (img->bitspersample == 8) {
+ if (!img->Map)
+ img->put.contig = putRGBcontig8bitCMYKtile;
+ else
+ img->put.contig = putRGBcontig8bitCMYKMaptile;
+ }
+ }
+ break;
+ case PHOTOMETRIC_PALETTE:
+ if (buildMap(img)) {
+ switch (img->bitspersample) {
+ case 8:
+ img->put.contig = put8bitcmaptile;
+ break;
+ case 4:
+ img->put.contig = put4bitcmaptile;
+ break;
+ case 2:
+ img->put.contig = put2bitcmaptile;
+ break;
+ case 1:
+ img->put.contig = put1bitcmaptile;
+ break;
+ }
+ }
+ break;
+ case PHOTOMETRIC_MINISWHITE:
+ case PHOTOMETRIC_MINISBLACK:
+ if (buildMap(img)) {
+ switch (img->bitspersample) {
+ case 16:
+ img->put.contig = put16bitbwtile;
+ break;
+ case 8:
+ img->put.contig = putgreytile;
+ break;
+ case 4:
+ img->put.contig = put4bitbwtile;
+ break;
+ case 2:
+ img->put.contig = put2bitbwtile;
+ break;
+ case 1:
+ img->put.contig = put1bitbwtile;
+ break;
+ }
+ }
+ break;
+ case PHOTOMETRIC_YCBCR:
+ if (img->bitspersample == 8)
+ {
+ if (initYCbCrConversion(img)!=0)
+ {
+ /*
+ * The 6.0 spec says that subsampling must be
+ * one of 1, 2, or 4, and that vertical subsampling
+ * must always be <= horizontal subsampling; so
+ * there are only a few possibilities and we just
+ * enumerate the cases.
+ * Joris: added support for the [1,2] case, nonetheless, to accomodate
+ * some OJPEG files
+ */
+ uint16 SubsamplingHor;
+ uint16 SubsamplingVer;
+ TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRSUBSAMPLING, &SubsamplingHor, &SubsamplingVer);
+ switch ((SubsamplingHor<<4)|SubsamplingVer) {
+ case 0x44:
+ img->put.contig = putcontig8bitYCbCr44tile;
+ break;
+ case 0x42:
+ img->put.contig = putcontig8bitYCbCr42tile;
+ break;
+ case 0x41:
+ img->put.contig = putcontig8bitYCbCr41tile;
+ break;
+ case 0x22:
+ img->put.contig = putcontig8bitYCbCr22tile;
+ break;
+ case 0x21:
+ img->put.contig = putcontig8bitYCbCr21tile;
+ break;
+ case 0x12:
+ img->put.contig = putcontig8bitYCbCr12tile;
+ break;
+ case 0x11:
+ img->put.contig = putcontig8bitYCbCr11tile;
+ break;
+ }
+ }
+ }
+ break;
+ case PHOTOMETRIC_CIELAB:
+ if (buildMap(img)) {
+ if (img->bitspersample == 8)
+ img->put.contig = initCIELabConversion(img);
+ break;
+ }
}
- }
- return ((img->put.contig = put) != 0);
+ return ((img->get!=NULL) && (img->put.contig!=NULL));
}
/*
@@ -2403,39 +2456,57 @@ pickTileContigCase(TIFFRGBAImage* img)
* to the "packed routines.
*/
static int
-pickTileSeparateCase(TIFFRGBAImage* img)
+PickSeparateCase(TIFFRGBAImage* img)
{
- tileSeparateRoutine put = 0;
-
- if (buildMap(img)) {
+ img->get = TIFFIsTiled(img->tif) ? gtTileSeparate : gtStripSeparate;
+ img->put.separate = NULL;
switch (img->photometric) {
- case PHOTOMETRIC_RGB:
- switch (img->bitspersample) {
- case 8:
- if (!img->Map) {
- if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
- put = putRGBAAseparate8bittile;
- else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
- put = putRGBUAseparate8bittile;
- else
- put = putRGBseparate8bittile;
- } else
- put = putRGBseparate8bitMaptile;
- break;
- case 16:
- put = putRGBseparate16bittile;
- if (!img->Map) {
- if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
- put = putRGBAAseparate16bittile;
- else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
- put = putRGBUAseparate16bittile;
- }
- break;
- }
- break;
+ case PHOTOMETRIC_RGB:
+ switch (img->bitspersample) {
+ case 8:
+ if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
+ img->put.separate = putRGBAAseparate8bittile;
+ else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
+ {
+ img->put.separate = putRGBUAseparate8bittile;
+ }
+ else
+ img->put.separate = putRGBseparate8bittile;
+ break;
+ case 16:
+ if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
+ {
+ img->put.separate = putRGBAAseparate16bittile;
+ }
+ else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
+ {
+ img->put.separate = putRGBUAseparate16bittile;
+ }
+ else
+ {
+ img->put.separate = putRGBseparate16bittile;
+ }
+ break;
+ }
+ break;
+ case PHOTOMETRIC_YCBCR:
+ if ((img->bitspersample==8) && (img->samplesperpixel==3))
+ {
+ if (initYCbCrConversion(img)!=0)
+ {
+ uint16 hs, vs;
+ TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRSUBSAMPLING, &hs, &vs);
+ switch ((hs<<4)|vs) {
+ case 0x11:
+ img->put.separate = putseparate8bitYCbCr11tile;
+ break;
+ /* TODO: add other cases here */
+ }
+ }
+ }
+ break;
}
- }
- return ((img->put.separate = put) != 0);
+ return ((img->get!=NULL) && (img->put.separate!=NULL));
}
/*
@@ -2484,7 +2555,7 @@ TIFFReadRGBAStrip(TIFF* tif, uint32 row, uint32 * raster )
TIFFRGBAImageEnd(&img);
} else {
- TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), emsg);
+ TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", emsg);
ok = 0;
}
@@ -2536,7 +2607,7 @@ TIFFReadRGBATile(TIFF* tif, uint32 col, uint32 row, uint32 * raster)
if (!TIFFRGBAImageOK(tif, emsg)
|| !TIFFRGBAImageBegin(&img, tif, 0, emsg)) {
- TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), emsg);
+ TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", emsg);
return( 0 );
}
diff --git a/src/3rdparty/libtiff/libtiff/tif_jbig.c b/src/3rdparty/libtiff/libtiff/tif_jbig.c
new file mode 100644
index 0000000000..99183ba74e
--- /dev/null
+++ b/src/3rdparty/libtiff/libtiff/tif_jbig.c
@@ -0,0 +1,378 @@
+/* $Id: tif_jbig.c,v 1.2.2.2 2008-10-21 13:13:07 dron Exp $ */
+
+/*
+ * Copyright (c) 1988-1997 Sam Leffler
+ * Copyright (c) 1991-1997 Silicon Graphics, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the names of
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Sam Leffler and Silicon Graphics.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+/*
+ * TIFF Library.
+ *
+ * JBIG Compression Algorithm Support.
+ * Contributed by Lee Howard <faxguy@deanox.com>
+ *
+ */
+
+#include "tiffiop.h"
+
+#ifdef JBIG_SUPPORT
+#include "jbig.h"
+
+typedef struct
+{
+ uint32 recvparams; /* encoded Class 2 session params */
+ char* subaddress; /* subaddress string */
+ uint32 recvtime; /* time spend receiving in seconds */
+ char* faxdcs; /* encoded fax parameters (DCS, Table 2/T.30) */
+
+ TIFFVGetMethod vgetparent;
+ TIFFVSetMethod vsetparent;
+} JBIGState;
+
+#define GetJBIGState(tif) ((JBIGState*)(tif)->tif_data)
+
+#define FIELD_RECVPARAMS (FIELD_CODEC+0)
+#define FIELD_SUBADDRESS (FIELD_CODEC+1)
+#define FIELD_RECVTIME (FIELD_CODEC+2)
+#define FIELD_FAXDCS (FIELD_CODEC+3)
+
+static const TIFFFieldInfo jbigFieldInfo[] =
+{
+ {TIFFTAG_FAXRECVPARAMS, 1, 1, TIFF_LONG, FIELD_RECVPARAMS, TRUE, FALSE, "FaxRecvParams"},
+ {TIFFTAG_FAXSUBADDRESS, -1, -1, TIFF_ASCII, FIELD_SUBADDRESS, TRUE, FALSE, "FaxSubAddress"},
+ {TIFFTAG_FAXRECVTIME, 1, 1, TIFF_LONG, FIELD_RECVTIME, TRUE, FALSE, "FaxRecvTime"},
+ {TIFFTAG_FAXDCS, -1, -1, TIFF_ASCII, FIELD_FAXDCS, TRUE, FALSE, "FaxDcs"},
+};
+
+static int JBIGSetupDecode(TIFF* tif)
+{
+ if (TIFFNumberOfStrips(tif) != 1)
+ {
+ TIFFError("JBIG", "Multistrip images not supported in decoder");
+ return 0;
+ }
+
+ return 1;
+}
+
+static int JBIGDecode(TIFF* tif, tidata_t buffer, tsize_t size, tsample_t s)
+{
+ struct jbg_dec_state decoder;
+ int decodeStatus = 0;
+ unsigned char* pImage = NULL;
+ (void) size, (void) s;
+
+ if (isFillOrder(tif, tif->tif_dir.td_fillorder))
+ {
+ TIFFReverseBits(tif->tif_rawdata, tif->tif_rawdatasize);
+ }
+
+ jbg_dec_init(&decoder);
+
+#if defined(HAVE_JBG_NEWLEN)
+ jbg_newlen(tif->tif_rawdata, tif->tif_rawdatasize);
+ /*
+ * I do not check the return status of jbg_newlen because even if this
+ * function fails it does not necessarily mean that decoding the image
+ * will fail. It is generally only needed for received fax images
+ * that do not contain the actual length of the image in the BIE
+ * header. I do not log when an error occurs because that will cause
+ * problems when converting JBIG encoded TIFF's to
+ * PostScript. As long as the actual image length is contained in the
+ * BIE header jbg_dec_in should succeed.
+ */
+#endif /* HAVE_JBG_NEWLEN */
+
+ decodeStatus = jbg_dec_in(&decoder, tif->tif_rawdata,
+ tif->tif_rawdatasize, NULL);
+ if (JBG_EOK != decodeStatus)
+ {
+ /*
+ * XXX: JBG_EN constant was defined in pre-2.0 releases of the
+ * JBIG-KIT. Since the 2.0 the error reporting functions were
+ * changed. We will handle both cases here.
+ */
+ TIFFError("JBIG", "Error (%d) decoding: %s", decodeStatus,
+#if defined(JBG_EN)
+ jbg_strerror(decodeStatus, JBG_EN)
+#else
+ jbg_strerror(decodeStatus)
+#endif
+ );
+ return 0;
+ }
+
+ pImage = jbg_dec_getimage(&decoder, 0);
+ _TIFFmemcpy(buffer, pImage, jbg_dec_getsize(&decoder));
+ jbg_dec_free(&decoder);
+ return 1;
+}
+
+static int JBIGSetupEncode(TIFF* tif)
+{
+ if (TIFFNumberOfStrips(tif) != 1)
+ {
+ TIFFError("JBIG", "Multistrip images not supported in encoder");
+ return 0;
+ }
+
+ return 1;
+}
+
+static int JBIGCopyEncodedData(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
+{
+ (void) s;
+ while (cc > 0)
+ {
+ tsize_t n = cc;
+
+ if (tif->tif_rawcc + n > tif->tif_rawdatasize)
+ {
+ n = tif->tif_rawdatasize - tif->tif_rawcc;
+ }
+
+ assert(n > 0);
+ _TIFFmemcpy(tif->tif_rawcp, pp, n);
+ tif->tif_rawcp += n;
+ tif->tif_rawcc += n;
+ pp += n;
+ cc -= n;
+ if (tif->tif_rawcc >= tif->tif_rawdatasize &&
+ !TIFFFlushData1(tif))
+ {
+ return (-1);
+ }
+ }
+
+ return (1);
+}
+
+static void JBIGOutputBie(unsigned char* buffer, size_t len, void *userData)
+{
+ TIFF* tif = (TIFF*)userData;
+
+ if (isFillOrder(tif, tif->tif_dir.td_fillorder))
+ {
+ TIFFReverseBits(buffer, len);
+ }
+
+ JBIGCopyEncodedData(tif, buffer, len, 0);
+}
+
+static int JBIGEncode(TIFF* tif, tidata_t buffer, tsize_t size, tsample_t s)
+{
+ TIFFDirectory* dir = &tif->tif_dir;
+ struct jbg_enc_state encoder;
+
+ (void) size, (void) s;
+
+ jbg_enc_init(&encoder,
+ dir->td_imagewidth,
+ dir->td_imagelength,
+ 1,
+ &buffer,
+ JBIGOutputBie,
+ tif);
+ /*
+ * jbg_enc_out does the "real" encoding. As data is encoded,
+ * JBIGOutputBie is called, which writes the data to the directory.
+ */
+ jbg_enc_out(&encoder);
+ jbg_enc_free(&encoder);
+
+ return 1;
+}
+
+static void JBIGCleanup(TIFF* tif)
+{
+ JBIGState *sp = GetJBIGState(tif);
+
+ assert(sp != 0);
+
+ tif->tif_tagmethods.vgetfield = sp->vgetparent;
+ tif->tif_tagmethods.vsetfield = sp->vsetparent;
+
+ _TIFFfree(tif->tif_data);
+ tif->tif_data = NULL;
+
+ _TIFFSetDefaultCompressionState(tif);
+}
+
+static void JBIGPrintDir(TIFF* tif, FILE* fd, long flags)
+{
+ JBIGState* codec = GetJBIGState(tif);
+ (void)flags;
+
+ if (TIFFFieldSet(tif, FIELD_RECVPARAMS))
+ {
+ fprintf(fd,
+ " Fax Receive Parameters: %08lx\n",
+ (unsigned long)codec->recvparams);
+ }
+
+ if (TIFFFieldSet(tif, FIELD_SUBADDRESS))
+ {
+ fprintf(fd,
+ " Fax SubAddress: %s\n",
+ codec->subaddress);
+ }
+
+ if (TIFFFieldSet(tif, FIELD_RECVTIME))
+ {
+ fprintf(fd,
+ " Fax Receive Time: %lu secs\n",
+ (unsigned long)codec->recvtime);
+ }
+
+ if (TIFFFieldSet(tif, FIELD_FAXDCS))
+ {
+ fprintf(fd,
+ " Fax DCS: %s\n",
+ codec->faxdcs);
+ }
+}
+
+static int JBIGVGetField(TIFF* tif, ttag_t tag, va_list ap)
+{
+ JBIGState* codec = GetJBIGState(tif);
+
+ switch (tag)
+ {
+ case TIFFTAG_FAXRECVPARAMS:
+ *va_arg(ap, uint32*) = codec->recvparams;
+ break;
+
+ case TIFFTAG_FAXSUBADDRESS:
+ *va_arg(ap, char**) = codec->subaddress;
+ break;
+
+ case TIFFTAG_FAXRECVTIME:
+ *va_arg(ap, uint32*) = codec->recvtime;
+ break;
+
+ case TIFFTAG_FAXDCS:
+ *va_arg(ap, char**) = codec->faxdcs;
+ break;
+
+ default:
+ return (*codec->vgetparent)(tif, tag, ap);
+ }
+
+ return 1;
+}
+
+static int JBIGVSetField(TIFF* tif, ttag_t tag, va_list ap)
+{
+ JBIGState* codec = GetJBIGState(tif);
+
+ switch (tag)
+ {
+ case TIFFTAG_FAXRECVPARAMS:
+ codec->recvparams = va_arg(ap, uint32);
+ break;
+
+ case TIFFTAG_FAXSUBADDRESS:
+ _TIFFsetString(&codec->subaddress, va_arg(ap, char*));
+ break;
+
+ case TIFFTAG_FAXRECVTIME:
+ codec->recvtime = va_arg(ap, uint32);
+ break;
+
+ case TIFFTAG_FAXDCS:
+ _TIFFsetString(&codec->faxdcs, va_arg(ap, char*));
+ break;
+
+ default:
+ return (*codec->vsetparent)(tif, tag, ap);
+ }
+
+ TIFFSetFieldBit(tif, _TIFFFieldWithTag(tif, tag)->field_bit);
+ tif->tif_flags |= TIFF_DIRTYDIRECT;
+ return 1;
+}
+
+int TIFFInitJBIG(TIFF* tif, int scheme)
+{
+ JBIGState* codec = NULL;
+
+ assert(scheme == COMPRESSION_JBIG);
+
+ /*
+ * Merge codec-specific tag information.
+ */
+ if (!_TIFFMergeFieldInfo(tif, jbigFieldInfo,
+ TIFFArrayCount(jbigFieldInfo))) {
+ TIFFErrorExt(tif->tif_clientdata, "TIFFInitJBIG",
+ "Merging JBIG codec-specific tags failed");
+ return 0;
+ }
+
+ /* Allocate memory for the JBIGState structure.*/
+ tif->tif_data = (tdata_t)_TIFFmalloc(sizeof(JBIGState));
+ if (tif->tif_data == NULL)
+ {
+ TIFFError("TIFFInitJBIG", "Not enough memory for JBIGState");
+ return 0;
+ }
+ _TIFFmemset(tif->tif_data, 0, sizeof(JBIGState));
+ codec = GetJBIGState(tif);
+
+ /* Initialize codec private fields */
+ codec->recvparams = 0;
+ codec->subaddress = NULL;
+ codec->faxdcs = NULL;
+ codec->recvtime = 0;
+
+ /*
+ * Override parent get/set field methods.
+ */
+ codec->vgetparent = tif->tif_tagmethods.vgetfield;
+ codec->vsetparent = tif->tif_tagmethods.vsetfield;
+ tif->tif_tagmethods.vgetfield = JBIGVGetField;
+ tif->tif_tagmethods.vsetfield = JBIGVSetField;
+ tif->tif_tagmethods.printdir = JBIGPrintDir;
+
+ /*
+ * These flags are set so the JBIG Codec can control when to reverse
+ * bits and when not to and to allow the jbig decoder and bit reverser
+ * to write to memory when necessary.
+ */
+ tif->tif_flags |= TIFF_NOBITREV;
+ tif->tif_flags &= ~TIFF_MAPPED;
+
+ /* Setup the function pointers for encode, decode, and cleanup. */
+ tif->tif_setupdecode = JBIGSetupDecode;
+ tif->tif_decodestrip = JBIGDecode;
+
+ tif->tif_setupencode = JBIGSetupEncode;
+ tif->tif_encodestrip = JBIGEncode;
+
+ tif->tif_cleanup = JBIGCleanup;
+
+ return 1;
+}
+
+#endif /* JBIG_SUPPORT */
+
+/* vim: set ts=8 sts=8 sw=8 noet: */
+
diff --git a/src/3rdparty/libtiff/libtiff/tif_jpeg.c b/src/3rdparty/libtiff/libtiff/tif_jpeg.c
index 9a63b35ba0..74b0d3f860 100644
--- a/src/3rdparty/libtiff/libtiff/tif_jpeg.c
+++ b/src/3rdparty/libtiff/libtiff/tif_jpeg.c
@@ -1,4 +1,4 @@
-/* $Id: tif_jpeg.c,v 1.45 2006/03/16 12:38:24 dron Exp $ */
+/* $Id: tif_jpeg.c,v 1.50.2.4 2009-08-30 16:21:46 bfriesen Exp $ */
/*
* Copyright (c) 1994-1997 Sam Leffler
@@ -152,6 +152,7 @@ typedef struct {
TIFFVGetMethod vgetparent; /* super-class method */
TIFFVSetMethod vsetparent; /* super-class method */
+ TIFFPrintMethod printdir; /* super-class method */
TIFFStripMethod defsparent; /* super-class method */
TIFFTileMethod deftparent; /* super-class method */
/* pseudo-tag fields */
@@ -225,7 +226,7 @@ TIFFjpeg_error_exit(j_common_ptr cinfo)
char buffer[JMSG_LENGTH_MAX];
(*cinfo->err->format_message) (cinfo, buffer);
- TIFFErrorExt(sp->tif->tif_clientdata, "JPEGLib", buffer); /* display the error message */
+ TIFFErrorExt(sp->tif->tif_clientdata, "JPEGLib", "%s", buffer); /* display the error message */
jpeg_abort(cinfo); /* clean up libjpeg state */
LONGJMP(sp->exit_jmpbuf, 1); /* return to libtiff caller */
}
@@ -241,7 +242,7 @@ TIFFjpeg_output_message(j_common_ptr cinfo)
char buffer[JMSG_LENGTH_MAX];
(*cinfo->err->format_message) (cinfo, buffer);
- TIFFWarningExt(((JPEGState *) cinfo)->tif->tif_clientdata, "JPEGLib", buffer);
+ TIFFWarningExt(((JPEGState *) cinfo)->tif->tif_clientdata, "JPEGLib", "%s", buffer);
}
/*
@@ -712,7 +713,7 @@ JPEGPreDecode(TIFF* tif, tsample_t s)
} else {
if (segment_height > td->td_rowsperstrip)
segment_height = td->td_rowsperstrip;
- sp->bytesperline = TIFFScanlineSize(tif);
+ sp->bytesperline = TIFFOldScanlineSize(tif);
}
if (td->td_planarconfig == PLANARCONFIG_SEPARATE && s > 0) {
/*
@@ -722,14 +723,29 @@ JPEGPreDecode(TIFF* tif, tsample_t s)
segment_width = TIFFhowmany(segment_width, sp->h_sampling);
segment_height = TIFFhowmany(segment_height, sp->v_sampling);
}
- if (sp->cinfo.d.image_width != segment_width ||
- sp->cinfo.d.image_height != segment_height) {
+ if (sp->cinfo.d.image_width < segment_width ||
+ sp->cinfo.d.image_height < segment_height) {
TIFFWarningExt(tif->tif_clientdata, module,
- "Improper JPEG strip/tile size, expected %dx%d, got %dx%d",
- segment_width,
- segment_height,
- sp->cinfo.d.image_width,
- sp->cinfo.d.image_height);
+ "Improper JPEG strip/tile size, "
+ "expected %dx%d, got %dx%d",
+ segment_width, segment_height,
+ sp->cinfo.d.image_width,
+ sp->cinfo.d.image_height);
+ }
+ if (sp->cinfo.d.image_width > segment_width ||
+ sp->cinfo.d.image_height > segment_height) {
+ /*
+ * This case could be dangerous, if the strip or tile size has
+ * been reported as less than the amount of data jpeg will
+ * return, some potential security issues arise. Catch this
+ * case and error out.
+ */
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "JPEG strip/tile size exceeds expected dimensions,"
+ " expected %dx%d, got %dx%d",
+ segment_width, segment_height,
+ sp->cinfo.d.image_width, sp->cinfo.d.image_height);
+ return (0);
}
if (sp->cinfo.d.num_components !=
(td->td_planarconfig == PLANARCONFIG_CONTIG ?
@@ -761,6 +777,24 @@ JPEGPreDecode(TIFF* tif, tsample_t s)
sp->cinfo.d.comp_info[0].v_samp_factor,
sp->h_sampling, sp->v_sampling);
+ /*
+ * There are potential security issues here
+ * for decoders that have already allocated
+ * buffers based on the expected sampling
+ * factors. Lets check the sampling factors
+ * dont exceed what we were expecting.
+ */
+ if (sp->cinfo.d.comp_info[0].h_samp_factor
+ > sp->h_sampling
+ || sp->cinfo.d.comp_info[0].v_samp_factor
+ > sp->v_sampling) {
+ TIFFErrorExt(tif->tif_clientdata,
+ module,
+ "Cannot honour JPEG sampling factors"
+ " that exceed those specified.");
+ return (0);
+ }
+
/*
* XXX: Files written by the Intergraph software
* has different sampling factors stored in the
@@ -950,119 +984,121 @@ JPEGDecode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
/*ARGSUSED*/ static int
JPEGDecodeRaw(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
{
- JPEGState *sp = JState(tif);
- tsize_t nrows;
- (void) s;
+ JPEGState *sp = JState(tif);
+ tsize_t nrows;
+ (void) s;
+
+ /* data is expected to be read in multiples of a scanline */
+ if ( (nrows = sp->cinfo.d.image_height) ) {
+ /* Cb,Cr both have sampling factors 1, so this is correct */
+ JDIMENSION clumps_per_line = sp->cinfo.d.comp_info[1].downsampled_width;
+ int samples_per_clump = sp->samplesperclump;
- /* data is expected to be read in multiples of a scanline */
- if ( (nrows = sp->cinfo.d.image_height) ) {
- /* Cb,Cr both have sampling factors 1, so this is correct */
- JDIMENSION clumps_per_line = sp->cinfo.d.comp_info[1].downsampled_width;
- int samples_per_clump = sp->samplesperclump;
-
#ifdef JPEG_LIB_MK1
- unsigned short* tmpbuf = _TIFFmalloc(sizeof(unsigned short) *
- sp->cinfo.d.output_width *
- sp->cinfo.d.num_components);
+ unsigned short* tmpbuf = _TIFFmalloc(sizeof(unsigned short) *
+ sp->cinfo.d.output_width *
+ sp->cinfo.d.num_components);
#endif
-
- do {
- jpeg_component_info *compptr;
- int ci, clumpoffset;
-
- /* Reload downsampled-data buffer if needed */
- if (sp->scancount >= DCTSIZE) {
- int n = sp->cinfo.d.max_v_samp_factor * DCTSIZE;
- if (TIFFjpeg_read_raw_data(sp, sp->ds_buffer, n)
- != n)
- return (0);
- sp->scancount = 0;
- }
- /*
- * Fastest way to unseparate data is to make one pass
- * over the scanline for each row of each component.
- */
- clumpoffset = 0; /* first sample in clump */
- for (ci = 0, compptr = sp->cinfo.d.comp_info;
- ci < sp->cinfo.d.num_components;
- ci++, compptr++) {
- int hsamp = compptr->h_samp_factor;
- int vsamp = compptr->v_samp_factor;
- int ypos;
-
- for (ypos = 0; ypos < vsamp; ypos++) {
- JSAMPLE *inptr = sp->ds_buffer[ci][sp->scancount*vsamp + ypos];
+
+ do {
+ jpeg_component_info *compptr;
+ int ci, clumpoffset;
+
+ /* Reload downsampled-data buffer if needed */
+ if (sp->scancount >= DCTSIZE) {
+ int n = sp->cinfo.d.max_v_samp_factor * DCTSIZE;
+ if (TIFFjpeg_read_raw_data(sp, sp->ds_buffer, n) != n)
+ return (0);
+ sp->scancount = 0;
+ }
+ /*
+ * Fastest way to unseparate data is to make one pass
+ * over the scanline for each row of each component.
+ */
+ clumpoffset = 0; /* first sample in clump */
+ for (ci = 0, compptr = sp->cinfo.d.comp_info;
+ ci < sp->cinfo.d.num_components;
+ ci++, compptr++) {
+ int hsamp = compptr->h_samp_factor;
+ int vsamp = compptr->v_samp_factor;
+ int ypos;
+
+ for (ypos = 0; ypos < vsamp; ypos++) {
+ JSAMPLE *inptr = sp->ds_buffer[ci][sp->scancount*vsamp + ypos];
#ifdef JPEG_LIB_MK1
- JSAMPLE *outptr = (JSAMPLE*)tmpbuf + clumpoffset;
+ JSAMPLE *outptr = (JSAMPLE*)tmpbuf + clumpoffset;
#else
- JSAMPLE *outptr = (JSAMPLE*)buf + clumpoffset;
+ JSAMPLE *outptr = (JSAMPLE*)buf + clumpoffset;
#endif
- JDIMENSION nclump;
-
- if (hsamp == 1) {
- /* fast path for at least Cb and Cr */
- for (nclump = clumps_per_line; nclump-- > 0; ) {
- outptr[0] = *inptr++;
- outptr += samples_per_clump;
- }
- } else {
- int xpos;
-
- /* general case */
- for (nclump = clumps_per_line; nclump-- > 0; ) {
- for (xpos = 0; xpos < hsamp; xpos++)
- outptr[xpos] = *inptr++;
- outptr += samples_per_clump;
- }
- }
- clumpoffset += hsamp;
- }
- }
+ JDIMENSION nclump;
+
+ if (hsamp == 1) {
+ /* fast path for at least Cb and Cr */
+ for (nclump = clumps_per_line; nclump-- > 0; ) {
+ outptr[0] = *inptr++;
+ outptr += samples_per_clump;
+ }
+ } else {
+ int xpos;
+
+ /* general case */
+ for (nclump = clumps_per_line; nclump-- > 0; ) {
+ for (xpos = 0; xpos < hsamp; xpos++)
+ outptr[xpos] = *inptr++;
+ outptr += samples_per_clump;
+ }
+ }
+ clumpoffset += hsamp;
+ }
+ }
#ifdef JPEG_LIB_MK1
- {
- if (sp->cinfo.d.data_precision == 8)
- {
- int i=0;
- int len = sp->cinfo.d.output_width * sp->cinfo.d.num_components;
- for (i=0; i<len; i++)
- {
- ((unsigned char*)buf)[i] = tmpbuf[i] & 0xff;
- }
- }
- else
- { // 12-bit
- int value_pairs = (sp->cinfo.d.output_width
- * sp->cinfo.d.num_components) / 2;
- int iPair;
- for( iPair = 0; iPair < value_pairs; iPair++ )
- {
- unsigned char *out_ptr = ((unsigned char *) buf) + iPair * 3;
- JSAMPLE *in_ptr = tmpbuf + iPair * 2;
- out_ptr[0] = (in_ptr[0] & 0xff0) >> 4;
- out_ptr[1] = ((in_ptr[0] & 0xf) << 4)
- | ((in_ptr[1] & 0xf00) >> 8);
- out_ptr[2] = ((in_ptr[1] & 0xff) >> 0);
- }
- }
- }
+ {
+ if (sp->cinfo.d.data_precision == 8)
+ {
+ int i=0;
+ int len = sp->cinfo.d.output_width * sp->cinfo.d.num_components;
+ for (i=0; i<len; i++)
+ {
+ ((unsigned char*)buf)[i] = tmpbuf[i] & 0xff;
+ }
+ }
+ else
+ { // 12-bit
+ int value_pairs = (sp->cinfo.d.output_width
+ * sp->cinfo.d.num_components) / 2;
+ int iPair;
+ for( iPair = 0; iPair < value_pairs; iPair++ )
+ {
+ unsigned char *out_ptr = ((unsigned char *) buf) + iPair * 3;
+ JSAMPLE *in_ptr = tmpbuf + iPair * 2;
+ out_ptr[0] = (in_ptr[0] & 0xff0) >> 4;
+ out_ptr[1] = ((in_ptr[0] & 0xf) << 4)
+ | ((in_ptr[1] & 0xf00) >> 8);
+ out_ptr[2] = ((in_ptr[1] & 0xff) >> 0);
+ }
+ }
+ }
#endif
- ++sp->scancount;
- ++tif->tif_row;
- buf += sp->bytesperline;
- cc -= sp->bytesperline;
- } while (--nrows > 0);
-
+ sp->scancount ++;
+ tif->tif_row += sp->v_sampling;
+ /* increment/decrement of buf and cc is still incorrect, but should not matter
+ * TODO: resolve this */
+ buf += sp->bytesperline;
+ cc -= sp->bytesperline;
+ nrows -= sp->v_sampling;
+ } while (nrows > 0);
+
#ifdef JPEG_LIB_MK1
- _TIFFfree(tmpbuf);
+ _TIFFfree(tmpbuf);
#endif
- }
+ }
- /* Close down the decompressor if done. */
- return sp->cinfo.d.output_scanline < sp->cinfo.d.output_height
- || TIFFjpeg_finish_decompress(sp);
+ /* Close down the decompressor if done. */
+ return sp->cinfo.d.output_scanline < sp->cinfo.d.output_height
+ || TIFFjpeg_finish_decompress(sp);
}
@@ -1197,9 +1233,9 @@ JPEGSetupEncode(TIFF* tif)
/* BITS_IN_JSAMPLE now permits 8 and 12 --- dgilbert */
if (td->td_bitspersample != 8 && td->td_bitspersample != 12)
#else
- if (td->td_bitspersample != BITS_IN_JSAMPLE )
+ if (td->td_bitspersample != BITS_IN_JSAMPLE )
#endif
- {
+ {
TIFFErrorExt(tif->tif_clientdata, module, "BitsPerSample %d not allowed for JPEG",
(int) td->td_bitspersample);
return (0);
@@ -1277,7 +1313,7 @@ JPEGPreEncode(TIFF* tif, tsample_t s)
segment_height = td->td_imagelength - tif->tif_row;
if (segment_height > td->td_rowsperstrip)
segment_height = td->td_rowsperstrip;
- sp->bytesperline = TIFFScanlineSize(tif);
+ sp->bytesperline = TIFFOldScanlineSize(tif);
}
if (td->td_planarconfig == PLANARCONFIG_SEPARATE && s > 0) {
/* for PC 2, scale down the strip/tile size
@@ -1389,6 +1425,10 @@ JPEGEncode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
if (cc % sp->bytesperline)
TIFFWarningExt(tif->tif_clientdata, tif->tif_name, "fractional scanline discarded");
+ /* The last strip will be limited to image size */
+ if( !isTiled(tif) && tif->tif_row+nrows > tif->tif_dir.td_imagelength )
+ nrows = tif->tif_dir.td_imagelength - tif->tif_row;
+
while (nrows-- > 0) {
bufptr[0] = (JSAMPROW) buf;
if (TIFFjpeg_write_scanlines(sp, bufptr, 1) != 1)
@@ -1415,18 +1455,25 @@ JPEGEncodeRaw(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
int clumpoffset, ci, xpos, ypos;
jpeg_component_info* compptr;
int samples_per_clump = sp->samplesperclump;
+ tsize_t bytesperclumpline;
(void) s;
assert(sp != NULL);
- /* data is expected to be supplied in multiples of a scanline */
- nrows = cc / sp->bytesperline;
- if (cc % sp->bytesperline)
+ /* data is expected to be supplied in multiples of a clumpline */
+ /* a clumpline is equivalent to v_sampling desubsampled scanlines */
+ /* TODO: the following calculation of bytesperclumpline, should substitute calculation of sp->bytesperline, except that it is per v_sampling lines */
+ bytesperclumpline = (((sp->cinfo.c.image_width+sp->h_sampling-1)/sp->h_sampling)
+ *(sp->h_sampling*sp->v_sampling+2)*sp->cinfo.c.data_precision+7)
+ /8;
+
+ nrows = ( cc / bytesperclumpline ) * sp->v_sampling;
+ if (cc % bytesperclumpline)
TIFFWarningExt(tif->tif_clientdata, tif->tif_name, "fractional scanline discarded");
/* Cb,Cr both have sampling factors 1, so this is correct */
clumps_per_line = sp->cinfo.c.comp_info[1].downsampled_width;
- while (nrows-- > 0) {
+ while (nrows > 0) {
/*
* Fastest way to separate the data is to make one pass
* over the scanline for each row of each component.
@@ -1471,9 +1518,9 @@ JPEGEncodeRaw(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
return (0);
sp->scancount = 0;
}
- if (nrows > 0)
- tif->tif_row++;
+ tif->tif_row += sp->v_sampling;
buf += sp->bytesperline;
+ nrows -= sp->v_sampling;
}
return (1);
}
@@ -1525,6 +1572,7 @@ JPEGCleanup(TIFF* tif)
tif->tif_tagmethods.vgetfield = sp->vgetparent;
tif->tif_tagmethods.vsetfield = sp->vsetparent;
+ tif->tif_tagmethods.printdir = sp->printdir;
if( sp->cinfo_initialized )
TIFFjpeg_destroy(sp); /* release libjpeg resources */
@@ -1536,11 +1584,43 @@ JPEGCleanup(TIFF* tif)
_TIFFSetDefaultCompressionState(tif);
}
+static void
+JPEGResetUpsampled( TIFF* tif )
+{
+ JPEGState* sp = JState(tif);
+ TIFFDirectory* td = &tif->tif_dir;
+
+ /*
+ * Mark whether returned data is up-sampled or not so TIFFStripSize
+ * and TIFFTileSize return values that reflect the true amount of
+ * data.
+ */
+ tif->tif_flags &= ~TIFF_UPSAMPLED;
+ if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
+ if (td->td_photometric == PHOTOMETRIC_YCBCR &&
+ sp->jpegcolormode == JPEGCOLORMODE_RGB) {
+ tif->tif_flags |= TIFF_UPSAMPLED;
+ } else {
+#ifdef notdef
+ if (td->td_ycbcrsubsampling[0] != 1 ||
+ td->td_ycbcrsubsampling[1] != 1)
+ ; /* XXX what about up-sampling? */
+#endif
+ }
+ }
+
+ /*
+ * Must recalculate cached tile size in case sampling state changed.
+ * Should we really be doing this now if image size isn't set?
+ */
+ tif->tif_tilesize = isTiled(tif) ? TIFFTileSize(tif) : (tsize_t) -1;
+}
+
static int
JPEGVSetField(TIFF* tif, ttag_t tag, va_list ap)
{
JPEGState* sp = JState(tif);
- TIFFDirectory* td = &tif->tif_dir;
+ const TIFFFieldInfo* fip;
uint32 v32;
assert(sp != NULL);
@@ -1562,34 +1642,21 @@ JPEGVSetField(TIFF* tif, ttag_t tag, va_list ap)
return (1); /* pseudo tag */
case TIFFTAG_JPEGCOLORMODE:
sp->jpegcolormode = va_arg(ap, int);
- /*
- * Mark whether returned data is up-sampled or not
- * so TIFFStripSize and TIFFTileSize return values
- * that reflect the true amount of data.
- */
- tif->tif_flags &= ~TIFF_UPSAMPLED;
- if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
- if (td->td_photometric == PHOTOMETRIC_YCBCR &&
- sp->jpegcolormode == JPEGCOLORMODE_RGB) {
- tif->tif_flags |= TIFF_UPSAMPLED;
- } else {
- if (td->td_ycbcrsubsampling[0] != 1 ||
- td->td_ycbcrsubsampling[1] != 1)
- ; /* XXX what about up-sampling? */
- }
- }
- /*
- * Must recalculate cached tile size
- * in case sampling state changed.
- */
- tif->tif_tilesize = isTiled(tif) ? TIFFTileSize(tif) : (tsize_t) -1;
+ JPEGResetUpsampled( tif );
return (1); /* pseudo tag */
+ case TIFFTAG_PHOTOMETRIC:
+ {
+ int ret_value = (*sp->vsetparent)(tif, tag, ap);
+ JPEGResetUpsampled( tif );
+ return ret_value;
+ }
case TIFFTAG_JPEGTABLESMODE:
sp->jpegtablesmode = va_arg(ap, int);
return (1); /* pseudo tag */
case TIFFTAG_YCBCRSUBSAMPLING:
/* mark the fact that we have a real ycbcrsubsampling! */
sp->ycbcrsampling_fetched = 1;
+ /* should we be recomputing upsampling info here? */
return (*sp->vsetparent)(tif, tag, ap);
case TIFFTAG_FAXRECVPARAMS:
sp->recvparams = va_arg(ap, uint32);
@@ -1606,7 +1673,13 @@ JPEGVSetField(TIFF* tif, ttag_t tag, va_list ap)
default:
return (*sp->vsetparent)(tif, tag, ap);
}
- TIFFSetFieldBit(tif, _TIFFFieldWithTag(tif, tag)->field_bit);
+
+ if ((fip = _TIFFFieldWithTag(tif, tag))) {
+ TIFFSetFieldBit(tif, fip->field_bit);
+ } else {
+ return (0);
+ }
+
tif->tif_flags |= TIFF_DIRTYDIRECT;
return (1);
}
@@ -1702,7 +1775,6 @@ JPEGVGetField(TIFF* tif, ttag_t tag, va_list ap)
case TIFFTAG_YCBCRSUBSAMPLING:
JPEGFixupTestSubsampling( tif );
return (*sp->vgetparent)(tif, tag, ap);
- break;
case TIFFTAG_FAXRECVPARAMS:
*va_arg(ap, uint32*) = sp->recvparams;
break;
@@ -1796,8 +1868,18 @@ static int JPEGInitializeLibJPEG( TIFF * tif, int force_encode, int force_decode
int data_is_empty = TRUE;
int decompress;
- if( sp->cinfo_initialized )
- return 1;
+
+ if(sp->cinfo_initialized)
+ {
+ if( force_encode && sp->cinfo.comm.is_decompressor )
+ TIFFjpeg_destroy( sp );
+ else if( force_decode && !sp->cinfo.comm.is_decompressor )
+ TIFFjpeg_destroy( sp );
+ else
+ return 1;
+
+ sp->cinfo_initialized = 0;
+ }
/*
* Do we have tile data already? Make sure we initialize the
@@ -1853,28 +1935,38 @@ TIFFInitJPEG(TIFF* tif, int scheme)
assert(scheme == COMPRESSION_JPEG);
/*
+ * Merge codec-specific tag information.
+ */
+ if (!_TIFFMergeFieldInfo(tif, jpegFieldInfo, N(jpegFieldInfo))) {
+ TIFFErrorExt(tif->tif_clientdata,
+ "TIFFInitJPEG",
+ "Merging JPEG codec-specific tags failed");
+ return 0;
+ }
+
+ /*
* Allocate state block so tag methods have storage to record values.
*/
tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (JPEGState));
if (tif->tif_data == NULL) {
- TIFFErrorExt(tif->tif_clientdata, "TIFFInitJPEG", "No space for JPEG state block");
- return (0);
+ TIFFErrorExt(tif->tif_clientdata,
+ "TIFFInitJPEG", "No space for JPEG state block");
+ return 0;
}
- _TIFFmemset( tif->tif_data, 0, sizeof(JPEGState));
+ _TIFFmemset(tif->tif_data, 0, sizeof(JPEGState));
sp = JState(tif);
sp->tif = tif; /* back link */
/*
- * Merge codec-specific tag information and override parent get/set
- * field methods.
+ * Override parent get/set field methods.
*/
- _TIFFMergeFieldInfo(tif, jpegFieldInfo, N(jpegFieldInfo));
sp->vgetparent = tif->tif_tagmethods.vgetfield;
tif->tif_tagmethods.vgetfield = JPEGVGetField; /* hook for codec tags */
sp->vsetparent = tif->tif_tagmethods.vsetfield;
tif->tif_tagmethods.vsetfield = JPEGVSetField; /* hook for codec tags */
+ sp->printdir = tif->tif_tagmethods.printdir;
tif->tif_tagmethods.printdir = JPEGPrintDir; /* hook for codec tags */
/* Default values for codec-specific fields */
@@ -1940,3 +2032,4 @@ TIFFInitJPEG(TIFF* tif, int scheme)
#endif /* JPEG_SUPPORT */
/* vim: set ts=8 sts=8 sw=8 noet: */
+
diff --git a/src/3rdparty/libtiff/libtiff/tif_luv.c b/src/3rdparty/libtiff/libtiff/tif_luv.c
index eea2d7ea01..be8fceaf86 100644
--- a/src/3rdparty/libtiff/libtiff/tif_luv.c
+++ b/src/3rdparty/libtiff/libtiff/tif_luv.c
@@ -1,4 +1,4 @@
-/* $Id: tif_luv.c,v 1.17 2006/03/16 12:38:24 dron Exp $ */
+/* $Id: tif_luv.c,v 1.17.2.3 2009-06-30 17:06:25 fwarmerdam Exp $ */
/*
* Copyright (c) 1997 Greg Ward Larson
@@ -451,7 +451,7 @@ LogL16Encode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
tif->tif_rawcp = op;
tif->tif_rawcc = tif->tif_rawdatasize - occ;
- return (0);
+ return (1);
}
/*
@@ -496,7 +496,7 @@ LogLuvEncode24(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
tif->tif_rawcp = op;
tif->tif_rawcc = tif->tif_rawdatasize - occ;
- return (0);
+ return (1);
}
/*
@@ -585,7 +585,7 @@ LogLuvEncode32(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
tif->tif_rawcp = op;
tif->tif_rawcc = tif->tif_rawdatasize - occ;
- return (0);
+ return (1);
}
/*
@@ -598,7 +598,7 @@ LogLuvEncodeStrip(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
tsize_t rowlen = TIFFScanlineSize(tif);
assert(cc%rowlen == 0);
- while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 0)
+ while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 1)
bp += rowlen, cc -= rowlen;
return (cc == 0);
}
@@ -613,7 +613,7 @@ LogLuvEncodeTile(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
tsize_t rowlen = TIFFTileRowSize(tif);
assert(cc%rowlen == 0);
- while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 0)
+ while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 1)
bp += rowlen, cc -= rowlen;
return (cc == 0);
}
@@ -1200,7 +1200,10 @@ LogL16InitState(TIFF* tif)
"No support for converting user data format to LogL");
return (0);
}
- sp->tbuflen = multiply(td->td_imagewidth, td->td_rowsperstrip);
+ if( isTiled(tif) )
+ sp->tbuflen = multiply(td->td_tilewidth, td->td_tilelength);
+ else
+ sp->tbuflen = multiply(td->td_imagewidth, td->td_rowsperstrip);
if (multiply(sp->tbuflen, sizeof (int16)) == 0 ||
(sp->tbuf = (tidata_t*) _TIFFmalloc(sp->tbuflen * sizeof (int16))) == NULL) {
TIFFErrorExt(tif->tif_clientdata, module, "%s: No space for SGILog translation buffer",
@@ -1298,7 +1301,10 @@ LogLuvInitState(TIFF* tif)
"No support for converting user data format to LogLuv");
return (0);
}
- sp->tbuflen = multiply(td->td_imagewidth, td->td_rowsperstrip);
+ if( isTiled(tif) )
+ sp->tbuflen = multiply(td->td_tilewidth, td->td_tilelength);
+ else
+ sp->tbuflen = multiply(td->td_imagewidth, td->td_rowsperstrip);
if (multiply(sp->tbuflen, sizeof (uint32)) == 0 ||
(sp->tbuf = (tidata_t*) _TIFFmalloc(sp->tbuflen * sizeof (uint32))) == NULL) {
TIFFErrorExt(tif->tif_clientdata, module, "%s: No space for SGILog translation buffer",
@@ -1561,6 +1567,16 @@ TIFFInitSGILog(TIFF* tif, int scheme)
assert(scheme == COMPRESSION_SGILOG24 || scheme == COMPRESSION_SGILOG);
/*
+ * Merge codec-specific tag information.
+ */
+ if (!_TIFFMergeFieldInfo(tif, LogLuvFieldInfo,
+ TIFFArrayCount(LogLuvFieldInfo))) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Merging SGILog codec-specific tags failed");
+ return 0;
+ }
+
+ /*
* Allocate state block so tag methods have storage to record values.
*/
tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (LogLuvState));
@@ -1587,9 +1603,9 @@ TIFFInitSGILog(TIFF* tif, int scheme)
tif->tif_close = LogLuvClose;
tif->tif_cleanup = LogLuvCleanup;
- /* override SetField so we can handle our private pseudo-tag */
- _TIFFMergeFieldInfo(tif, LogLuvFieldInfo,
- TIFFArrayCount(LogLuvFieldInfo));
+ /*
+ * Override parent get/set field methods.
+ */
sp->vgetparent = tif->tif_tagmethods.vgetfield;
tif->tif_tagmethods.vgetfield = LogLuvVGetField; /* hook for codec tags */
sp->vsetparent = tif->tif_tagmethods.vsetfield;
diff --git a/src/3rdparty/libtiff/libtiff/tif_lzw.c b/src/3rdparty/libtiff/libtiff/tif_lzw.c
index 1c7b796df0..bc4dac6537 100644
--- a/src/3rdparty/libtiff/libtiff/tif_lzw.c
+++ b/src/3rdparty/libtiff/libtiff/tif_lzw.c
@@ -1,4 +1,4 @@
-/* $Id: tif_lzw.c,v 1.28 2006/03/16 12:38:24 dron Exp $ */
+/* $Id: tif_lzw.c,v 1.29.2.5 2009-06-22 04:57:31 fwarmerdam Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -224,7 +224,8 @@ LZWSetupDecode(TIFF* tif)
if (sp->dec_codetab == NULL) {
sp->dec_codetab = (code_t*)_TIFFmalloc(CSIZE*sizeof (code_t));
if (sp->dec_codetab == NULL) {
- TIFFErrorExt(tif->tif_clientdata, module, "No space for LZW code table");
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "No space for LZW code table");
return (0);
}
/*
@@ -237,6 +238,11 @@ LZWSetupDecode(TIFF* tif)
sp->dec_codetab[code].length = 1;
sp->dec_codetab[code].next = NULL;
} while (code--);
+ /*
+ * Zero-out the unused entries
+ */
+ _TIFFmemset(&sp->dec_codetab[CODE_CLEAR], 0,
+ (CODE_FIRST - CODE_CLEAR) * sizeof (code_t));
}
return (1);
}
@@ -251,6 +257,11 @@ LZWPreDecode(TIFF* tif, tsample_t s)
(void) s;
assert(sp != NULL);
+ if( sp->dec_codetab == NULL )
+ {
+ tif->tif_setupdecode( tif );
+ }
+
/*
* Check for old bit-reversed codes.
*/
@@ -350,6 +361,7 @@ LZWDecode(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
(void) s;
assert(sp != NULL);
+ assert(sp->dec_codetab != NULL);
/*
* Restart interrupted output operation.
*/
@@ -408,12 +420,20 @@ LZWDecode(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
break;
if (code == CODE_CLEAR) {
free_entp = sp->dec_codetab + CODE_FIRST;
+ _TIFFmemset(free_entp, 0,
+ (CSIZE - CODE_FIRST) * sizeof (code_t));
nbits = BITS_MIN;
nbitsmask = MAXCODE(BITS_MIN);
maxcodep = sp->dec_codetab + nbitsmask-1;
NextCode(tif, sp, bp, code, GetNextCode);
if (code == CODE_EOI)
break;
+ if (code == CODE_CLEAR) {
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "LZWDecode: Corrupted LZW table at scanline %d",
+ tif->tif_row);
+ return (0);
+ }
*op++ = (char)code, occ--;
oldcodep = sp->dec_codetab + code;
continue;
@@ -514,7 +534,7 @@ LZWDecode(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
if (occ > 0) {
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
- "LZWDecode: Not enough data at scanline %d (short %d bytes)",
+ "LZWDecode: Not enough data at scanline %d (short %ld bytes)",
tif->tif_row, occ);
return (0);
}
@@ -604,12 +624,20 @@ LZWDecodeCompat(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
break;
if (code == CODE_CLEAR) {
free_entp = sp->dec_codetab + CODE_FIRST;
+ _TIFFmemset(free_entp, 0,
+ (CSIZE - CODE_FIRST) * sizeof (code_t));
nbits = BITS_MIN;
nbitsmask = MAXCODE(BITS_MIN);
maxcodep = sp->dec_codetab + nbitsmask;
NextCode(tif, sp, bp, code, GetNextCodeCompat);
if (code == CODE_EOI)
break;
+ if (code == CODE_CLEAR) {
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "LZWDecode: Corrupted LZW table at scanline %d",
+ tif->tif_row);
+ return (0);
+ }
*op++ = code, occ--;
oldcodep = sp->dec_codetab + code;
continue;
@@ -647,6 +675,7 @@ LZWDecodeCompat(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
}
oldcodep = codep;
if (code >= 256) {
+ char *op_orig = op;
/*
* Code maps to a string, copy string
* value to output (written in reverse).
@@ -681,7 +710,7 @@ LZWDecodeCompat(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
tp = op;
do {
*--tp = codep->value;
- } while( (codep = codep->next) != NULL);
+ } while( (codep = codep->next) != NULL && tp > op_orig);
} else
*op++ = code, occ--;
}
@@ -697,7 +726,7 @@ LZWDecodeCompat(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
if (occ > 0) {
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
- "LZWDecodeCompat: Not enough data at scanline %d (short %d bytes)",
+ "LZWDecodeCompat: Not enough data at scanline %d (short %ld bytes)",
tif->tif_row, occ);
return (0);
}
@@ -734,6 +763,12 @@ LZWPreEncode(TIFF* tif, tsample_t s)
(void) s;
assert(sp != NULL);
+
+ if( sp->enc_hashtab == NULL )
+ {
+ tif->tif_setupencode( tif );
+ }
+
sp->lzw_nbits = BITS_MIN;
sp->lzw_maxcode = MAXCODE(BITS_MIN);
sp->lzw_free_ent = CODE_FIRST;
@@ -803,6 +838,9 @@ LZWEncode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
(void) s;
if (sp == NULL)
return (0);
+
+ assert(sp->enc_hashtab != NULL);
+
/*
* Load local state.
*/
diff --git a/src/3rdparty/libtiff/libtiff/tif_msdos.c b/src/3rdparty/libtiff/libtiff/tif_msdos.c
index de1c4bb9d6..72cd39e04b 100644
--- a/src/3rdparty/libtiff/libtiff/tif_msdos.c
+++ b/src/3rdparty/libtiff/libtiff/tif_msdos.c
@@ -1,4 +1,4 @@
-/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_msdos.c,v 1.2 2005/12/21 12:23:13 joris Exp $ */
+/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_msdos.c,v 1.3 2006/07/25 18:26:33 fwarmerdam Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -102,6 +102,7 @@ TIFFOpen(const char* name, const char* mode)
{
static const char module[] = "TIFFOpen";
int m, fd;
+ TIFF *ret;
m = _TIFFgetMode(mode, module);
if (m == -1)
@@ -112,6 +113,12 @@ TIFFOpen(const char* name, const char* mode)
return ((TIFF*)0);
}
return (TIFFFdOpen(fd, name, mode));
+
+ ret = TIFFFdOpen(fd, name, mode);
+
+ if (ret == NULL) close(fd);
+
+ return ret;
}
#ifdef __GNUC__
diff --git a/src/3rdparty/libtiff/libtiff/tif_next.c b/src/3rdparty/libtiff/libtiff/tif_next.c
index 81528cb9d8..0e1842d872 100644
--- a/src/3rdparty/libtiff/libtiff/tif_next.c
+++ b/src/3rdparty/libtiff/libtiff/tif_next.c
@@ -1,4 +1,4 @@
-/* $Id: tif_next.c,v 1.6 2005/12/21 12:23:13 joris Exp $ */
+/* $Id: tif_next.c,v 1.8 2006/10/12 15:00:49 dron Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -48,11 +48,10 @@
static int
NeXTDecode(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
{
- register unsigned char *bp, *op;
- register tsize_t cc;
- register int n;
+ unsigned char *bp, *op;
+ tsize_t cc;
tidata_t row;
- tsize_t scanline;
+ tsize_t scanline, n;
(void) s;
/*
@@ -66,7 +65,7 @@ NeXTDecode(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
bp = (unsigned char *)tif->tif_rawcp;
cc = tif->tif_rawcc;
scanline = tif->tif_scanlinesize;
- for (row = buf; (long)occ > 0; occ -= scanline, row += scanline) {
+ for (row = buf; occ > 0; occ -= scanline, row += scanline) {
n = *bp++, cc--;
switch (n) {
case LITERALROW:
@@ -80,10 +79,10 @@ NeXTDecode(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
cc -= scanline;
break;
case LITERALSPAN: {
- int off;
+ tsize_t off;
/*
- * The scanline has a literal span
- * that begins at some offset.
+ * The scanline has a literal span that begins at some
+ * offset.
*/
off = (bp[0] * 256) + bp[1];
n = (bp[2] * 256) + bp[3];
@@ -95,23 +94,27 @@ NeXTDecode(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
break;
}
default: {
- register int npixels = 0, grey;
- unsigned long imagewidth = tif->tif_dir.td_imagewidth;
+ uint32 npixels = 0, grey;
+ uint32 imagewidth = tif->tif_dir.td_imagewidth;
/*
- * The scanline is composed of a sequence
- * of constant color ``runs''. We shift
- * into ``run mode'' and interpret bytes
- * as codes of the form <color><npixels>
- * until we've filled the scanline.
+ * The scanline is composed of a sequence of constant
+ * color ``runs''. We shift into ``run mode'' and
+ * interpret bytes as codes of the form
+ * <color><npixels> until we've filled the scanline.
*/
op = row;
for (;;) {
grey = (n>>6) & 0x3;
n &= 0x3f;
- while (n-- > 0)
+ /*
+ * Ensure the run does not exceed the scanline
+ * bounds, potentially resulting in a security
+ * issue.
+ */
+ while (n-- > 0 && npixels < imagewidth)
SETPIXEL(op, grey);
- if (npixels >= (int) imagewidth)
+ if (npixels >= imagewidth)
break;
if (cc == 0)
goto bad;
diff --git a/src/3rdparty/libtiff/libtiff/tif_ojpeg.c b/src/3rdparty/libtiff/libtiff/tif_ojpeg.c
index 40bc5735c6..9d1e8043e8 100644
--- a/src/3rdparty/libtiff/libtiff/tif_ojpeg.c
+++ b/src/3rdparty/libtiff/libtiff/tif_ojpeg.c
@@ -1,2629 +1,2427 @@
-/* $Id: tif_ojpeg.c,v 1.16 2006/03/01 11:09:13 dron Exp $ */
+/* $Id: tif_ojpeg.c,v 1.24.2.4 2009-09-03 20:45:10 bfriesen Exp $ */
+
+/* WARNING: The type of JPEG encapsulation defined by the TIFF Version 6.0
+ specification is now totally obsolete and deprecated for new applications and
+ images. This file was was created solely in order to read unconverted images
+ still present on some users' computer systems. It will never be extended
+ to write such files. Writing new-style JPEG compressed TIFFs is implemented
+ in tif_jpeg.c.
+
+ The code is carefully crafted to robustly read all gathered JPEG-in-TIFF
+ testfiles, and anticipate as much as possible all other... But still, it may
+ fail on some. If you encounter problems, please report them on the TIFF
+ mailing list and/or to Joris Van Damme <info@awaresystems.be>.
+
+ Please read the file called "TIFF Technical Note #2" if you need to be
+ convinced this compression scheme is bad and breaks TIFF. That document
+ is linked to from the LibTiff site <http://www.remotesensing.org/libtiff/>
+ and from AWare Systems' TIFF section
+ <http://www.awaresystems.be/imaging/tiff.html>. It is also absorbed
+ in Adobe's specification supplements, marked "draft" up to this day, but
+ supported by the TIFF community.
+
+ This file interfaces with Release 6B of the JPEG Library written by the
+ Independent JPEG Group. Previous versions of this file required a hack inside
+ the LibJpeg library. This version no longer requires that. Remember to
+ remove the hack if you update from the old version.
+
+ Copyright (c) Joris Van Damme <info@awaresystems.be>
+ Copyright (c) AWare Systems <http://www.awaresystems.be/>
+
+ The licence agreement for this file is the same as the rest of the LibTiff
+ library.
+
+ IN NO EVENT SHALL JORIS VAN DAMME OR AWARE SYSTEMS BE LIABLE FOR
+ ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ OF THIS SOFTWARE.
+
+ Joris Van Damme and/or AWare Systems may be available for custom
+ developement. If you like what you see, and need anything similar or related,
+ contact <info@awaresystems.be>.
+*/
+
+/* What is what, and what is not?
+
+ This decoder starts with an input stream, that is essentially the JpegInterchangeFormat
+ stream, if any, followed by the strile data, if any. This stream is read in
+ OJPEGReadByte and related functions.
+
+ It analyzes the start of this stream, until it encounters non-marker data, i.e.
+ compressed image data. Some of the header markers it sees have no actual content,
+ like the SOI marker, and APP/COM markers that really shouldn't even be there. Some
+ other markers do have content, and the valuable bits and pieces of information
+ in these markers are saved, checking all to verify that the stream is more or
+ less within expected bounds. This happens inside the OJPEGReadHeaderInfoSecStreamXxx
+ functions.
+
+ Some OJPEG imagery contains no valid JPEG header markers. This situation is picked
+ up on if we've seen no SOF marker when we're at the start of the compressed image
+ data. In this case, the tables are read from JpegXxxTables tags, and the other
+ bits and pieces of information is initialized to its most basic value. This is
+ implemented in the OJPEGReadHeaderInfoSecTablesXxx functions.
+
+ When this is complete, a good and valid JPEG header can be assembled, and this is
+ passed through to LibJpeg. When that's done, the remainder of the input stream, i.e.
+ the compressed image data, can be passed through unchanged. This is done in
+ OJPEGWriteStream functions.
+
+ LibTiff rightly expects to know the subsampling values before decompression. Just like
+ in new-style JPEG-in-TIFF, though, or even more so, actually, the YCbCrsubsampling
+ tag is notoriously unreliable. To correct these tag values with the ones inside
+ the JPEG stream, the first part of the input stream is pre-scanned in
+ OJPEGSubsamplingCorrect, making no note of any other data, reporting no warnings
+ or errors, up to the point where either these values are read, or it's clear they
+ aren't there. This means that some of the data is read twice, but we feel speed
+ in correcting these values is important enough to warrant this sacrifice. Allthough
+ there is currently no define or other configuration mechanism to disable this behaviour,
+ the actual header scanning is build to robustly respond with error report if it
+ should encounter an uncorrected mismatch of subsampling values. See
+ OJPEGReadHeaderInfoSecStreamSof.
+
+ The restart interval and restart markers are the most tricky part... The restart
+ interval can be specified in a tag. It can also be set inside the input JPEG stream.
+ It can be used inside the input JPEG stream. If reading from strile data, we've
+ consistenly discovered the need to insert restart markers in between the different
+ striles, as is also probably the most likely interpretation of the original TIFF 6.0
+ specification. With all this setting of interval, and actual use of markers that is not
+ predictable at the time of valid JPEG header assembly, the restart thing may turn
+ out the Achilles heel of this implementation. Fortunately, most OJPEG writer vendors
+ succeed in reading back what they write, which may be the reason why we've been able
+ to discover ways that seem to work.
+
+ Some special provision is made for planarconfig separate OJPEG files. These seem
+ to consistently contain header info, a SOS marker, a plane, SOS marker, plane, SOS,
+ and plane. This may or may not be a valid JPEG configuration, we don't know and don't
+ care. We want LibTiff to be able to access the planes individually, without huge
+ buffering inside LibJpeg, anyway. So we compose headers to feed to LibJpeg, in this
+ case, that allow us to pass a single plane such that LibJpeg sees a valid
+ single-channel JPEG stream. Locating subsequent SOS markers, and thus subsequent
+ planes, is done inside OJPEGReadSecondarySos.
+
+ The benefit of the scheme is... that it works, basically. We know of no other that
+ does. It works without checking software tag, or otherwise going about things in an
+ OJPEG flavor specific manner. Instead, it is a single scheme, that covers the cases
+ with and without JpegInterchangeFormat, with and without striles, with part of
+ the header in JpegInterchangeFormat and remainder in first strile, etc. It is forgiving
+ and robust, may likely work with OJPEG flavors we've not seen yet, and makes most out
+ of the data.
+
+ Another nice side-effect is that a complete JPEG single valid stream is build if
+ planarconfig is not separate (vast majority). We may one day use that to build
+ converters to JPEG, and/or to new-style JPEG compression inside TIFF.
+
+ A dissadvantage is the lack of random access to the individual striles. This is the
+ reason for much of the complicated restart-and-position stuff inside OJPEGPreDecode.
+ Applications would do well accessing all striles in order, as this will result in
+ a single sequential scan of the input stream, and no restarting of LibJpeg decoding
+ session.
+*/
+
#include "tiffiop.h"
#ifdef OJPEG_SUPPORT
-/* JPEG Compression support, as per the original TIFF 6.0 specification.
-
- WARNING: KLUDGE ALERT! The type of JPEG encapsulation defined by the TIFF
- Version 6.0 specification is now totally obsolete and
- deprecated for new applications and images. This file is an unsupported hack
- that was created solely in order to read (but NOT write!) a few old,
- unconverted images still present on some users' computer systems. The code
- isn't pretty or robust, and it won't read every "old format" JPEG-in-TIFF
- file (see Samuel Leffler's draft "TIFF Technical Note No. 2" for a long and
- incomplete list of known problems), but it seems to work well enough in the
- few cases of practical interest to the author; so, "caveat emptor"! This
- file should NEVER be enhanced to write new images using anything other than
- the latest approved JPEG-in-TIFF encapsulation method, implemented by the
- "tif_jpeg.c" file elsewhere in this library.
-
- This file interfaces with Release 6B of the JPEG Library written by theu
- Independent JPEG Group, which you can find on the Internet at:
- ftp://ftp.uu.net:/graphics/jpeg/.
-
- The "C" Preprocessor macros, "[CD]_LOSSLESS_SUPPORTED", are defined by your
- JPEG Library Version 6B only if you have applied a (massive!) patch by Ken
- Murchison of Oceana Matrix Ltd. <ken@oceana.com> to support lossless Huffman
- encoding (TIFF "JPEGProc" tag value = 14). This patch can be found on the
- Internet at: ftp://ftp.oceana.com/pub/ljpeg-6b.tar.gz.
-
- Some old files produced by the Wang Imaging application for Microsoft Windows
- apparently can be decoded only with a special patch to the JPEG Library,
- which defines a subroutine named "jpeg_reset_huff_decode()" in its "jdhuff.c"
- module (the "jdshuff.c" module, if Ken Murchison's patch has been applied).
- Unfortunately the patch differs slightly in each case, and some TIFF Library
- have reported problems finding the code, so both versions appear below; you
- should carefully extract and apply only the version that applies to your JPEG
- Library!
-
- Contributed by Scott Marovich <marovich@hpl.hp.com> with considerable help
- from Charles Auer <Bumble731@msn.com> to unravel the mysteries of image files
- created by the Wang Imaging application for Microsoft Windows.
-*/
-#if 0 /* Patch for JPEG Library WITHOUT lossless Huffman coding */
-*** jdhuff.c.orig Mon Oct 20 17:51:10 1997
---- jdhuff.c Sun Nov 11 17:33:58 2001
-***************
-*** 648,651 ****
---- 648,683 ----
- for (i = 0; i < NUM_HUFF_TBLS; i++) {
- entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;
- }
- }
-+
-+ /*
-+ * BEWARE OF KLUDGE: This subroutine is a hack for decoding illegal JPEG-in-
-+ * TIFF encapsulations produced by Microsoft's Wang Imaging
-+ * for Windows application with the public-domain TIFF Library. Based upon an
-+ * examination of selected output files, this program apparently divides a JPEG
-+ * bit-stream into consecutive horizontal TIFF "strips", such that the JPEG
-+ * encoder's/decoder's DC coefficients for each image component are reset before
-+ * each "strip". Moreover, a "strip" is not necessarily encoded in a multiple
-+ * of 8 bits, so one must sometimes discard 1-7 bits at the end of each "strip"
-+ * for alignment to the next input-Byte storage boundary. IJG JPEG Library
-+ * decoder state is not normally exposed to client applications, so this sub-
-+ * routine provides the TIFF Library with a "hook" to make these corrections.
-+ * It should be called after "jpeg_start_decompress()" and before
-+ * "jpeg_finish_decompress()", just before decoding each "strip" using
-+ * "jpeg_read_raw_data()" or "jpeg_read_scanlines()".
-+ *
-+ * This kludge is not sanctioned or supported by the Independent JPEG Group, and
-+ * future changes to the IJG JPEG Library might invalidate it. Do not send bug
-+ * reports about this code to IJG developers. Instead, contact the author for
-+ * advice: Scott B. Marovich <marovich@hpl.hp.com>, Hewlett-Packard Labs, 6/01.
-+ */
-+ GLOBAL(void)
-+ jpeg_reset_huff_decode (register j_decompress_ptr cinfo)
-+ { register huff_entropy_ptr entropy = (huff_entropy_ptr)cinfo->entropy;
-+ register int ci = 0;
-+
-+ /* Discard encoded input bits, up to the next Byte boundary */
-+ entropy->bitstate.bits_left &= ~7;
-+ /* Re-initialize DC predictions to 0 */
-+ do entropy->saved.last_dc_val[ci] = 0; while (++ci < cinfo->comps_in_scan);
-+ }
-#endif /* Patch for JPEG Library WITHOUT lossless Huffman coding */
-#if 0 /* Patch for JPEG Library WITH lossless Huffman coding */
-*** jdshuff.c.orig Mon Mar 11 16:44:54 2002
---- jdshuff.c Mon Mar 11 16:44:54 2002
-***************
-*** 357,360 ****
---- 357,393 ----
- for (i = 0; i < NUM_HUFF_TBLS; i++) {
- entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;
- }
- }
-+
-+ /*
-+ * BEWARE OF KLUDGE: This subroutine is a hack for decoding illegal JPEG-in-
-+ * TIFF encapsulations produced by Microsoft's Wang Imaging
-+ * for Windows application with the public-domain TIFF Library. Based upon an
-+ * examination of selected output files, this program apparently divides a JPEG
-+ * bit-stream into consecutive horizontal TIFF "strips", such that the JPEG
-+ * encoder's/decoder's DC coefficients for each image component are reset before
-+ * each "strip". Moreover, a "strip" is not necessarily encoded in a multiple
-+ * of 8 bits, so one must sometimes discard 1-7 bits at the end of each "strip"
-+ * for alignment to the next input-Byte storage boundary. IJG JPEG Library
-+ * decoder state is not normally exposed to client applications, so this sub-
-+ * routine provides the TIFF Library with a "hook" to make these corrections.
-+ * It should be called after "jpeg_start_decompress()" and before
-+ * "jpeg_finish_decompress()", just before decoding each "strip" using
-+ * "jpeg_read_raw_data()" or "jpeg_read_scanlines()".
-+ *
-+ * This kludge is not sanctioned or supported by the Independent JPEG Group, and
-+ * future changes to the IJG JPEG Library might invalidate it. Do not send bug
-+ * reports about this code to IJG developers. Instead, contact the author for
-+ * advice: Scott B. Marovich <marovich@hpl.hp.com>, Hewlett-Packard Labs, 6/01.
-+ */
-+ GLOBAL(void)
-+ jpeg_reset_huff_decode (register j_decompress_ptr cinfo)
-+ { register shuff_entropy_ptr entropy = (shuff_entropy_ptr)
-+ ((j_lossy_d_ptr)cinfo->codec)->entropy_private;
-+ register int ci = 0;
-+
-+ /* Discard encoded input bits, up to the next Byte boundary */
-+ entropy->bitstate.bits_left &= ~7;
-+ /* Re-initialize DC predictions to 0 */
-+ do entropy->saved.last_dc_val[ci] = 0; while (++ci < cinfo->comps_in_scan);
-+ }
-#endif /* Patch for JPEG Library WITH lossless Huffman coding */
+/* Configuration defines here are:
+ * JPEG_ENCAP_EXTERNAL: The normal way to call libjpeg, uses longjump. In some environments,
+ * like eg LibTiffDelphi, this is not possible. For this reason, the actual calls to
+ * libjpeg, with longjump stuff, are encapsulated in dedicated functions. When
+ * JPEG_ENCAP_EXTERNAL is defined, these encapsulating functions are declared external
+ * to this unit, and can be defined elsewhere to use stuff other then longjump.
+ * The default mode, without JPEG_ENCAP_EXTERNAL, implements the call encapsulators
+ * here, internally, with normal longjump.
+ * SETJMP, LONGJMP, JMP_BUF: On some machines/environments a longjump equivalent is
+ * conviniently available, but still it may be worthwhile to use _setjmp or sigsetjmp
+ * in place of plain setjmp. These macros will make it easier. It is useless
+ * to fiddle with these if you define JPEG_ENCAP_EXTERNAL.
+ * OJPEG_BUFFER: Define the size of the desired buffer here. Should be small enough so as to guarantee
+ * instant processing, optimal streaming and optimal use of processor cache, but also big
+ * enough so as to not result in significant call overhead. It should be at least a few
+ * bytes to accomodate some structures (this is verified in asserts), but it would not be
+ * sensible to make it this small anyway, and it should be at most 64K since it is indexed
+ * with uint16. We recommend 2K.
+ * EGYPTIANWALK: You could also define EGYPTIANWALK here, but it is not used anywhere and has
+ * absolutely no effect. That is why most people insist the EGYPTIANWALK is a bit silly.
+ */
+
+/* #define LIBJPEG_ENCAP_EXTERNAL */
+#define SETJMP(jbuf) setjmp(jbuf)
+#define LONGJMP(jbuf,code) longjmp(jbuf,code)
+#define JMP_BUF jmp_buf
+#define OJPEG_BUFFER 2048
+/* define EGYPTIANWALK */
+
+#define JPEG_MARKER_SOF0 0xC0
+#define JPEG_MARKER_SOF1 0xC1
+#define JPEG_MARKER_SOF3 0xC3
+#define JPEG_MARKER_DHT 0xC4
+#define JPEG_MARKER_RST0 0XD0
+#define JPEG_MARKER_SOI 0xD8
+#define JPEG_MARKER_EOI 0xD9
+#define JPEG_MARKER_SOS 0xDA
+#define JPEG_MARKER_DQT 0xDB
+#define JPEG_MARKER_DRI 0xDD
+#define JPEG_MARKER_APP0 0xE0
+#define JPEG_MARKER_COM 0xFE
+
+#define FIELD_OJPEG_JPEGINTERCHANGEFORMAT (FIELD_CODEC+0)
+#define FIELD_OJPEG_JPEGINTERCHANGEFORMATLENGTH (FIELD_CODEC+1)
+#define FIELD_OJPEG_JPEGQTABLES (FIELD_CODEC+2)
+#define FIELD_OJPEG_JPEGDCTABLES (FIELD_CODEC+3)
+#define FIELD_OJPEG_JPEGACTABLES (FIELD_CODEC+4)
+#define FIELD_OJPEG_JPEGPROC (FIELD_CODEC+5)
+#define FIELD_OJPEG_JPEGRESTARTINTERVAL (FIELD_CODEC+6)
+#define FIELD_OJPEG_COUNT 7
+
+static const TIFFFieldInfo ojpeg_field_info[] = {
+ {TIFFTAG_JPEGIFOFFSET,1,1,TIFF_LONG,FIELD_OJPEG_JPEGINTERCHANGEFORMAT,TRUE,FALSE,"JpegInterchangeFormat"},
+ {TIFFTAG_JPEGIFBYTECOUNT,1,1,TIFF_LONG,FIELD_OJPEG_JPEGINTERCHANGEFORMATLENGTH,TRUE,FALSE,"JpegInterchangeFormatLength"},
+ {TIFFTAG_JPEGQTABLES,TIFF_VARIABLE,TIFF_VARIABLE,TIFF_LONG,FIELD_OJPEG_JPEGQTABLES,FALSE,TRUE,"JpegQTables"},
+ {TIFFTAG_JPEGDCTABLES,TIFF_VARIABLE,TIFF_VARIABLE,TIFF_LONG,FIELD_OJPEG_JPEGDCTABLES,FALSE,TRUE,"JpegDcTables"},
+ {TIFFTAG_JPEGACTABLES,TIFF_VARIABLE,TIFF_VARIABLE,TIFF_LONG,FIELD_OJPEG_JPEGACTABLES,FALSE,TRUE,"JpegAcTables"},
+ {TIFFTAG_JPEGPROC,1,1,TIFF_SHORT,FIELD_OJPEG_JPEGPROC,FALSE,FALSE,"JpegProc"},
+ {TIFFTAG_JPEGRESTARTINTERVAL,1,1,TIFF_SHORT,FIELD_OJPEG_JPEGRESTARTINTERVAL,FALSE,FALSE,"JpegRestartInterval"},
+};
+
+#ifndef LIBJPEG_ENCAP_EXTERNAL
#include <setjmp.h>
-#include <stdio.h>
-#ifdef FAR
-#undef FAR /* Undefine FAR to avoid conflict with JPEG definition */
#endif
-#define JPEG_INTERNALS /* Include "jpegint.h" for "DSTATE_*" symbols */
-#define JPEG_CJPEG_DJPEG /* Include all Version 6B+ "jconfig.h" options */
-#undef INLINE
+
#include "jpeglib.h"
-#undef JPEG_CJPEG_DJPEG
-#undef JPEG_INTERNALS
+#include "jerror.h"
-/* Hack for files produced by Wang Imaging application on Microsoft Windows */
-extern void jpeg_reset_huff_decode(j_decompress_ptr);
+typedef struct jpeg_error_mgr jpeg_error_mgr;
+typedef struct jpeg_common_struct jpeg_common_struct;
+typedef struct jpeg_decompress_struct jpeg_decompress_struct;
+typedef struct jpeg_source_mgr jpeg_source_mgr;
-/* On some machines, it may be worthwhile to use "_setjmp()" or "sigsetjmp()"
- instead of "setjmp()". These macros make it easier:
-*/
-#define SETJMP(jbuf)setjmp(jbuf)
-#define LONGJMP(jbuf,code)longjmp(jbuf,code)
-#define JMP_BUF jmp_buf
+typedef enum {
+ osibsNotSetYet,
+ osibsJpegInterchangeFormat,
+ osibsStrile,
+ osibsEof
+} OJPEGStateInBufferSource;
+
+typedef enum {
+ ososSoi,
+ ososQTable0,ososQTable1,ososQTable2,ososQTable3,
+ ososDcTable0,ososDcTable1,ososDcTable2,ososDcTable3,
+ ososAcTable0,ososAcTable1,ososAcTable2,ososAcTable3,
+ ososDri,
+ ososSof,
+ ososSos,
+ ososCompressed,
+ ososRst,
+ ososEoi
+} OJPEGStateOutState;
+
+typedef struct {
+ TIFF* tif;
+ #ifndef LIBJPEG_ENCAP_EXTERNAL
+ JMP_BUF exit_jmpbuf;
+ #endif
+ TIFFVGetMethod vgetparent;
+ TIFFVSetMethod vsetparent;
+ toff_t file_size;
+ uint32 image_width;
+ uint32 image_length;
+ uint32 strile_width;
+ uint32 strile_length;
+ uint32 strile_length_total;
+ uint8 samples_per_pixel;
+ uint8 plane_sample_offset;
+ uint8 samples_per_pixel_per_plane;
+ toff_t jpeg_interchange_format;
+ toff_t jpeg_interchange_format_length;
+ uint8 jpeg_proc;
+ uint8 subsamplingcorrect;
+ uint8 subsamplingcorrect_done;
+ uint8 subsampling_tag;
+ uint8 subsampling_hor;
+ uint8 subsampling_ver;
+ uint8 subsampling_force_desubsampling_inside_decompression;
+ uint8 qtable_offset_count;
+ uint8 dctable_offset_count;
+ uint8 actable_offset_count;
+ toff_t qtable_offset[3];
+ toff_t dctable_offset[3];
+ toff_t actable_offset[3];
+ uint8* qtable[4];
+ uint8* dctable[4];
+ uint8* actable[4];
+ uint16 restart_interval;
+ uint8 restart_index;
+ uint8 sof_log;
+ uint8 sof_marker_id;
+ uint32 sof_x;
+ uint32 sof_y;
+ uint8 sof_c[3];
+ uint8 sof_hv[3];
+ uint8 sof_tq[3];
+ uint8 sos_cs[3];
+ uint8 sos_tda[3];
+ struct {
+ uint8 log;
+ OJPEGStateInBufferSource in_buffer_source;
+ tstrile_t in_buffer_next_strile;
+ toff_t in_buffer_file_pos;
+ toff_t in_buffer_file_togo;
+ } sos_end[3];
+ uint8 readheader_done;
+ uint8 writeheader_done;
+ tsample_t write_cursample;
+ tstrile_t write_curstrile;
+ uint8 libjpeg_session_active;
+ uint8 libjpeg_jpeg_query_style;
+ jpeg_error_mgr libjpeg_jpeg_error_mgr;
+ jpeg_decompress_struct libjpeg_jpeg_decompress_struct;
+ jpeg_source_mgr libjpeg_jpeg_source_mgr;
+ uint8 subsampling_convert_log;
+ uint32 subsampling_convert_ylinelen;
+ uint32 subsampling_convert_ylines;
+ uint32 subsampling_convert_clinelen;
+ uint32 subsampling_convert_clines;
+ uint32 subsampling_convert_ybuflen;
+ uint32 subsampling_convert_cbuflen;
+ uint32 subsampling_convert_ycbcrbuflen;
+ uint8* subsampling_convert_ycbcrbuf;
+ uint8* subsampling_convert_ybuf;
+ uint8* subsampling_convert_cbbuf;
+ uint8* subsampling_convert_crbuf;
+ uint32 subsampling_convert_ycbcrimagelen;
+ uint8** subsampling_convert_ycbcrimage;
+ uint32 subsampling_convert_clinelenout;
+ uint32 subsampling_convert_state;
+ uint32 bytes_per_line; /* if the codec outputs subsampled data, a 'line' in bytes_per_line */
+ uint32 lines_per_strile; /* and lines_per_strile means subsampling_ver desubsampled rows */
+ OJPEGStateInBufferSource in_buffer_source;
+ tstrile_t in_buffer_next_strile;
+ tstrile_t in_buffer_strile_count;
+ toff_t in_buffer_file_pos;
+ uint8 in_buffer_file_pos_log;
+ toff_t in_buffer_file_togo;
+ uint16 in_buffer_togo;
+ uint8* in_buffer_cur;
+ uint8 in_buffer[OJPEG_BUFFER];
+ OJPEGStateOutState out_state;
+ uint8 out_buffer[OJPEG_BUFFER];
+ uint8* skip_buffer;
+} OJPEGState;
+
+static int OJPEGVGetField(TIFF* tif, ttag_t tag, va_list ap);
+static int OJPEGVSetField(TIFF* tif, ttag_t tag, va_list ap);
+static void OJPEGPrintDir(TIFF* tif, FILE* fd, long flags);
+
+static int OJPEGSetupDecode(TIFF* tif);
+static int OJPEGPreDecode(TIFF* tif, tsample_t s);
+static int OJPEGPreDecodeSkipRaw(TIFF* tif);
+static int OJPEGPreDecodeSkipScanlines(TIFF* tif);
+static int OJPEGDecode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s);
+static int OJPEGDecodeRaw(TIFF* tif, tidata_t buf, tsize_t cc);
+static int OJPEGDecodeScanlines(TIFF* tif, tidata_t buf, tsize_t cc);
+static void OJPEGPostDecode(TIFF* tif, tidata_t buf, tsize_t cc);
+static int OJPEGSetupEncode(TIFF* tif);
+static int OJPEGPreEncode(TIFF* tif, tsample_t s);
+static int OJPEGEncode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s);
+static int OJPEGPostEncode(TIFF* tif);
+static void OJPEGCleanup(TIFF* tif);
+
+static void OJPEGSubsamplingCorrect(TIFF* tif);
+static int OJPEGReadHeaderInfo(TIFF* tif);
+static int OJPEGReadSecondarySos(TIFF* tif, tsample_t s);
+static int OJPEGWriteHeaderInfo(TIFF* tif);
+static void OJPEGLibjpegSessionAbort(TIFF* tif);
+
+static int OJPEGReadHeaderInfoSec(TIFF* tif);
+static int OJPEGReadHeaderInfoSecStreamDri(TIFF* tif);
+static int OJPEGReadHeaderInfoSecStreamDqt(TIFF* tif);
+static int OJPEGReadHeaderInfoSecStreamDht(TIFF* tif);
+static int OJPEGReadHeaderInfoSecStreamSof(TIFF* tif, uint8 marker_id);
+static int OJPEGReadHeaderInfoSecStreamSos(TIFF* tif);
+static int OJPEGReadHeaderInfoSecTablesQTable(TIFF* tif);
+static int OJPEGReadHeaderInfoSecTablesDcTable(TIFF* tif);
+static int OJPEGReadHeaderInfoSecTablesAcTable(TIFF* tif);
+
+static int OJPEGReadBufferFill(OJPEGState* sp);
+static int OJPEGReadByte(OJPEGState* sp, uint8* byte);
+static int OJPEGReadBytePeek(OJPEGState* sp, uint8* byte);
+static void OJPEGReadByteAdvance(OJPEGState* sp);
+static int OJPEGReadWord(OJPEGState* sp, uint16* word);
+static int OJPEGReadBlock(OJPEGState* sp, uint16 len, void* mem);
+static void OJPEGReadSkip(OJPEGState* sp, uint16 len);
+
+static int OJPEGWriteStream(TIFF* tif, void** mem, uint32* len);
+static void OJPEGWriteStreamSoi(TIFF* tif, void** mem, uint32* len);
+static void OJPEGWriteStreamQTable(TIFF* tif, uint8 table_index, void** mem, uint32* len);
+static void OJPEGWriteStreamDcTable(TIFF* tif, uint8 table_index, void** mem, uint32* len);
+static void OJPEGWriteStreamAcTable(TIFF* tif, uint8 table_index, void** mem, uint32* len);
+static void OJPEGWriteStreamDri(TIFF* tif, void** mem, uint32* len);
+static void OJPEGWriteStreamSof(TIFF* tif, void** mem, uint32* len);
+static void OJPEGWriteStreamSos(TIFF* tif, void** mem, uint32* len);
+static int OJPEGWriteStreamCompressed(TIFF* tif, void** mem, uint32* len);
+static void OJPEGWriteStreamRst(TIFF* tif, void** mem, uint32* len);
+static void OJPEGWriteStreamEoi(TIFF* tif, void** mem, uint32* len);
+
+#ifdef LIBJPEG_ENCAP_EXTERNAL
+extern int jpeg_create_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo);
+extern int jpeg_read_header_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, uint8 require_image);
+extern int jpeg_start_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo);
+extern int jpeg_read_scanlines_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, void* scanlines, uint32 max_lines);
+extern int jpeg_read_raw_data_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, void* data, uint32 max_lines);
+extern void jpeg_encap_unwind(TIFF* tif);
+#else
+static int jpeg_create_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* j);
+static int jpeg_read_header_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, uint8 require_image);
+static int jpeg_start_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo);
+static int jpeg_read_scanlines_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, void* scanlines, uint32 max_lines);
+static int jpeg_read_raw_data_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, void* data, uint32 max_lines);
+static void jpeg_encap_unwind(TIFF* tif);
+#endif
-#define TIFFTAG_WANG_PAGECONTROL 32934
+static void OJPEGLibjpegJpegErrorMgrOutputMessage(jpeg_common_struct* cinfo);
+static void OJPEGLibjpegJpegErrorMgrErrorExit(jpeg_common_struct* cinfo);
+static void OJPEGLibjpegJpegSourceMgrInitSource(jpeg_decompress_struct* cinfo);
+static boolean OJPEGLibjpegJpegSourceMgrFillInputBuffer(jpeg_decompress_struct* cinfo);
+static void OJPEGLibjpegJpegSourceMgrSkipInputData(jpeg_decompress_struct* cinfo, long num_bytes);
+static boolean OJPEGLibjpegJpegSourceMgrResyncToRestart(jpeg_decompress_struct* cinfo, int desired);
+static void OJPEGLibjpegJpegSourceMgrTermSource(jpeg_decompress_struct* cinfo);
-/* Bit-vector offsets for keeping track of TIFF records that we've parsed. */
+int
+TIFFInitOJPEG(TIFF* tif, int scheme)
+{
+ static const char module[]="TIFFInitOJPEG";
+ OJPEGState* sp;
+
+ assert(scheme==COMPRESSION_OJPEG);
+
+ /*
+ * Merge codec-specific tag information.
+ */
+ if (!_TIFFMergeFieldInfo(tif,ojpeg_field_info,FIELD_OJPEG_COUNT)) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Merging Old JPEG codec-specific tags failed");
+ return 0;
+ }
-#define FIELD_JPEGPROC FIELD_CODEC
-#define FIELD_JPEGIFOFFSET (FIELD_CODEC+1)
-#define FIELD_JPEGIFBYTECOUNT (FIELD_CODEC+2)
-#define FIELD_JPEGRESTARTINTERVAL (FIELD_CODEC+3)
-#define FIELD_JPEGTABLES (FIELD_CODEC+4) /* New, post-6.0 JPEG-in-TIFF tag! */
-#define FIELD_JPEGLOSSLESSPREDICTORS (FIELD_CODEC+5)
-#define FIELD_JPEGPOINTTRANSFORM (FIELD_CODEC+6)
-#define FIELD_JPEGQTABLES (FIELD_CODEC+7)
-#define FIELD_JPEGDCTABLES (FIELD_CODEC+8)
-#define FIELD_JPEGACTABLES (FIELD_CODEC+9)
-#define FIELD_WANG_PAGECONTROL (FIELD_CODEC+10)
-#define FIELD_JPEGCOLORMODE (FIELD_CODEC+11)
+ /* state block */
+ sp=_TIFFmalloc(sizeof(OJPEGState));
+ if (sp==NULL)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"No space for OJPEG state block");
+ return(0);
+ }
+ _TIFFmemset(sp,0,sizeof(OJPEGState));
+ sp->tif=tif;
+ sp->jpeg_proc=1;
+ sp->subsampling_hor=2;
+ sp->subsampling_ver=2;
+ TIFFSetField(tif,TIFFTAG_YCBCRSUBSAMPLING,2,2);
+ /* tif codec methods */
+ tif->tif_setupdecode=OJPEGSetupDecode;
+ tif->tif_predecode=OJPEGPreDecode;
+ tif->tif_postdecode=OJPEGPostDecode;
+ tif->tif_decoderow=OJPEGDecode;
+ tif->tif_decodestrip=OJPEGDecode;
+ tif->tif_decodetile=OJPEGDecode;
+ tif->tif_setupencode=OJPEGSetupEncode;
+ tif->tif_preencode=OJPEGPreEncode;
+ tif->tif_postencode=OJPEGPostEncode;
+ tif->tif_encoderow=OJPEGEncode;
+ tif->tif_encodestrip=OJPEGEncode;
+ tif->tif_encodetile=OJPEGEncode;
+ tif->tif_cleanup=OJPEGCleanup;
+ tif->tif_data=(tidata_t)sp;
+ /* tif tag methods */
+ sp->vgetparent=tif->tif_tagmethods.vgetfield;
+ tif->tif_tagmethods.vgetfield=OJPEGVGetField;
+ sp->vsetparent=tif->tif_tagmethods.vsetfield;
+ tif->tif_tagmethods.vsetfield=OJPEGVSetField;
+ tif->tif_tagmethods.printdir=OJPEGPrintDir;
+ /* Some OJPEG files don't have strip or tile offsets or bytecounts tags.
+ Some others do, but have totally meaningless or corrupt values
+ in these tags. In these cases, the JpegInterchangeFormat stream is
+ reliable. In any case, this decoder reads the compressed data itself,
+ from the most reliable locations, and we need to notify encapsulating
+ LibTiff not to read raw strips or tiles for us. */
+ tif->tif_flags|=TIFF_NOREADRAW;
+ return(1);
+}
-typedef struct jpeg_destination_mgr jpeg_destination_mgr;
-typedef struct jpeg_source_mgr jpeg_source_mgr;
-typedef struct jpeg_error_mgr jpeg_error_mgr;
+static int
+OJPEGVGetField(TIFF* tif, ttag_t tag, va_list ap)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ switch(tag)
+ {
+ case TIFFTAG_JPEGIFOFFSET:
+ *va_arg(ap,uint32*)=(uint32)sp->jpeg_interchange_format;
+ break;
+ case TIFFTAG_JPEGIFBYTECOUNT:
+ *va_arg(ap,uint32*)=(uint32)sp->jpeg_interchange_format_length;
+ break;
+ case TIFFTAG_YCBCRSUBSAMPLING:
+ if (sp->subsamplingcorrect_done==0)
+ OJPEGSubsamplingCorrect(tif);
+ *va_arg(ap,uint16*)=(uint16)sp->subsampling_hor;
+ *va_arg(ap,uint16*)=(uint16)sp->subsampling_ver;
+ break;
+ case TIFFTAG_JPEGQTABLES:
+ *va_arg(ap,uint32*)=(uint32)sp->qtable_offset_count;
+ *va_arg(ap,void**)=(void*)sp->qtable_offset;
+ break;
+ case TIFFTAG_JPEGDCTABLES:
+ *va_arg(ap,uint32*)=(uint32)sp->dctable_offset_count;
+ *va_arg(ap,void**)=(void*)sp->dctable_offset;
+ break;
+ case TIFFTAG_JPEGACTABLES:
+ *va_arg(ap,uint32*)=(uint32)sp->actable_offset_count;
+ *va_arg(ap,void**)=(void*)sp->actable_offset;
+ break;
+ case TIFFTAG_JPEGPROC:
+ *va_arg(ap,uint16*)=(uint16)sp->jpeg_proc;
+ break;
+ case TIFFTAG_JPEGRESTARTINTERVAL:
+ *va_arg(ap,uint16*)=sp->restart_interval;
+ break;
+ default:
+ return (*sp->vgetparent)(tif,tag,ap);
+ }
+ return (1);
+}
-/* State variable for each open TIFF file that uses "libjpeg" for JPEG
- decompression. (Note: This file should NEVER perform JPEG compression
- except in the manner implemented by the "tif_jpeg.c" file, elsewhere in this
- library; see comments above.) JPEG Library internal state is recorded in a
- "jpeg_{de}compress_struct", while a "jpeg_common_struct" records a few items
- common to both compression and expansion. The "cinfo" field containing JPEG
- Library state MUST be the 1st member of our own state variable, so that we
- can safely "cast" pointers back and forth.
-*/
-typedef struct /* This module's private, per-image state variable */
- {
- union /* JPEG Library state variable; this MUST be our 1st field! */
- {
- struct jpeg_compress_struct c;
- struct jpeg_decompress_struct d;
- struct jpeg_common_struct comm;
- } cinfo;
- jpeg_error_mgr err; /* JPEG Library error manager */
- JMP_BUF exit_jmpbuf; /* ...for catching JPEG Library failures */
-# ifdef never
-
- /* (The following two fields could be a "union", but they're small enough that
- it's not worth the effort.)
- */
- jpeg_destination_mgr dest; /* Destination for compressed data */
-# endif
- jpeg_source_mgr src; /* Source of expanded data */
- JSAMPARRAY ds_buffer[MAX_COMPONENTS]; /* ->Temporary downsampling buffers */
- TIFF *tif; /* Reverse pointer, needed by some code */
- TIFFVGetMethod vgetparent; /* "Super class" methods... */
- TIFFVSetMethod vsetparent;
- TIFFStripMethod defsparent;
- TIFFTileMethod deftparent;
- void *jpegtables; /* ->"New" JPEG tables, if we synthesized any */
- uint32 is_WANG, /* <=> Wang Imaging for Microsoft Windows output file? */
- jpegtables_length; /* Length of "new" JPEG tables, if they exist */
- tsize_t bytesperline; /* No. of decompressed Bytes per scan line */
- int jpegquality, /* Compression quality level */
- jpegtablesmode, /* What to put in JPEGTables */
- samplesperclump,
- scancount; /* No. of scan lines accumulated */
- J_COLOR_SPACE photometric; /* IJG JPEG Library's photometry code */
- unsigned char h_sampling, /* Luminance sampling factors */
- v_sampling,
- jpegcolormode; /* Who performs RGB <-> YCbCr conversion? */
- /* JPEGCOLORMODE_RAW <=> TIFF Library or its client */
- /* JPEGCOLORMODE_RGB <=> JPEG Library */
- /* These fields are added to support TIFFGetField */
- uint16 jpegproc;
- uint32 jpegifoffset;
- uint32 jpegifbytecount;
- uint32 jpegrestartinterval;
- void* jpeglosslesspredictors;
- uint16 jpeglosslesspredictors_length;
- void* jpegpointtransform;
- uint32 jpegpointtransform_length;
- void* jpegqtables;
- uint32 jpegqtables_length;
- void* jpegdctables;
- uint32 jpegdctables_length;
- void* jpegactables;
- uint32 jpegactables_length;
-
- } OJPEGState;
-#define OJState(tif)((OJPEGState*)(tif)->tif_data)
-
-static const TIFFFieldInfo ojpegFieldInfo[]=/* JPEG-specific TIFF-record tags */
- {
-
- /* This is the current JPEG-in-TIFF metadata-encapsulation tag, and its
- treatment in this file is idiosyncratic. It should never appear in a
- "source" image conforming to the TIFF Version 6.0 specification, so we
- arrange to report an error if it appears. But in order to support possible
- future conversion of "old" JPEG-in-TIFF encapsulations to "new" ones, we
- might wish to synthesize an equivalent value to be returned by the TIFF
- Library's "getfield" method. So, this table tells the TIFF Library to pass
- these records to us in order to filter them below.
- */
- {
- TIFFTAG_JPEGTABLES ,TIFF_VARIABLE2,TIFF_VARIABLE2,
- TIFF_UNDEFINED,FIELD_JPEGTABLES ,FALSE,TRUE ,"JPEGTables"
- },
-
- /* These tags are defined by the TIFF Version 6.0 specification and are now
- obsolete. This module reads them from an old "source" image, but it never
- writes them to a new "destination" image.
- */
- {
- TIFFTAG_JPEGPROC ,1 ,1 ,
- TIFF_SHORT ,FIELD_JPEGPROC ,FALSE,FALSE,"JPEGProc"
- },
- {
- TIFFTAG_JPEGIFOFFSET ,1 ,1 ,
- TIFF_LONG ,FIELD_JPEGIFOFFSET ,FALSE,FALSE,"JPEGInterchangeFormat"
- },
- {
- TIFFTAG_JPEGIFBYTECOUNT ,1 ,1 ,
- TIFF_LONG ,FIELD_JPEGIFBYTECOUNT ,FALSE,FALSE,"JPEGInterchangeFormatLength"
- },
- {
- TIFFTAG_JPEGRESTARTINTERVAL ,1 ,1 ,
- TIFF_SHORT ,FIELD_JPEGRESTARTINTERVAL ,FALSE,FALSE,"JPEGRestartInterval"
- },
- {
- TIFFTAG_JPEGLOSSLESSPREDICTORS,TIFF_VARIABLE,TIFF_VARIABLE,
- TIFF_SHORT ,FIELD_JPEGLOSSLESSPREDICTORS,FALSE,TRUE ,"JPEGLosslessPredictors"
- },
- {
- TIFFTAG_JPEGPOINTTRANSFORM ,TIFF_VARIABLE,TIFF_VARIABLE,
- TIFF_SHORT ,FIELD_JPEGPOINTTRANSFORM ,FALSE,TRUE ,"JPEGPointTransforms"
- },
- {
- TIFFTAG_JPEGQTABLES ,TIFF_VARIABLE,TIFF_VARIABLE,
- TIFF_LONG ,FIELD_JPEGQTABLES ,FALSE,TRUE ,"JPEGQTables"
- },
- {
- TIFFTAG_JPEGDCTABLES ,TIFF_VARIABLE,TIFF_VARIABLE,
- TIFF_LONG ,FIELD_JPEGDCTABLES ,FALSE,TRUE ,"JPEGDCTables"
- },
- {
- TIFFTAG_JPEGACTABLES ,TIFF_VARIABLE,TIFF_VARIABLE,
- TIFF_LONG ,FIELD_JPEGACTABLES ,FALSE,TRUE ,"JPEGACTables"
- },
- {
- TIFFTAG_WANG_PAGECONTROL ,TIFF_VARIABLE,1 ,
- TIFF_LONG ,FIELD_WANG_PAGECONTROL ,FALSE,FALSE,"WANG PageControl"
- },
-
- /* This is a pseudo tag intended for internal use only by the TIFF Library and
- its clients, which should never appear in an input/output image file. It
- specifies whether the TIFF Library (or its client) should do YCbCr <-> RGB
- color-space conversion (JPEGCOLORMODE_RAW <=> 0) or whether we should ask
- the JPEG Library to do it (JPEGCOLORMODE_RGB <=> 1).
- */
- {
- TIFFTAG_JPEGCOLORMODE ,0 ,0 ,
- TIFF_ANY ,FIELD_PSEUDO ,FALSE,FALSE,"JPEGColorMode"
- }
- };
-static const char JPEGLib_name[]={"JPEG Library"},
- bad_bps[]={"%u BitsPerSample not allowed for JPEG"},
- bad_photometry[]={"PhotometricInterpretation %u not allowed for JPEG"},
- bad_subsampling[]={"invalid YCbCr subsampling factor(s)"},
-# ifdef never
- no_write_frac[]={"fractional scan line discarded"},
-# endif
- no_read_frac[]={"fractional scan line not read"},
- no_jtable_space[]={"No space for JPEGTables"};
-
-/* The following diagnostic subroutines interface with and replace default
- subroutines in the JPEG Library. Our basic strategy is to use "setjmp()"/
- "longjmp()" in order to return control to the TIFF Library when the JPEG
- library detects an error, and to use TIFF Library subroutines for displaying
- diagnostic messages to a client application.
-*/
-static void
-TIFFojpeg_error_exit(register j_common_ptr cinfo)
+static int
+OJPEGVSetField(TIFF* tif, ttag_t tag, va_list ap)
{
- char buffer[JMSG_LENGTH_MAX];
- int code = cinfo->err->msg_code;
-
- if (((OJPEGState *)cinfo)->is_WANG) {
- if (code == JERR_SOF_DUPLICATE || code == JERR_SOI_DUPLICATE)
- return; /* ignore it */
- }
-
- (*cinfo->err->format_message)(cinfo,buffer);
- TIFFError(JPEGLib_name,buffer); /* Display error message */
- jpeg_abort(cinfo); /* Clean up JPEG Library state */
- LONGJMP(((OJPEGState *)cinfo)->exit_jmpbuf,1); /* Return to TIFF client */
+ static const char module[]="OJPEGVSetField";
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint32 ma;
+ uint32* mb;
+ uint32 n;
+ switch(tag)
+ {
+ case TIFFTAG_JPEGIFOFFSET:
+ sp->jpeg_interchange_format=(toff_t)va_arg(ap,uint32);
+ break;
+ case TIFFTAG_JPEGIFBYTECOUNT:
+ sp->jpeg_interchange_format_length=(toff_t)va_arg(ap,uint32);
+ break;
+ case TIFFTAG_YCBCRSUBSAMPLING:
+ sp->subsampling_tag=1;
+ sp->subsampling_hor=(uint8)va_arg(ap,int);
+ sp->subsampling_ver=(uint8)va_arg(ap,int);
+ tif->tif_dir.td_ycbcrsubsampling[0]=sp->subsampling_hor;
+ tif->tif_dir.td_ycbcrsubsampling[1]=sp->subsampling_ver;
+ break;
+ case TIFFTAG_JPEGQTABLES:
+ ma=va_arg(ap,uint32);
+ if (ma!=0)
+ {
+ if (ma>3)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"JpegQTables tag has incorrect count");
+ return(0);
+ }
+ sp->qtable_offset_count=(uint8)ma;
+ mb=va_arg(ap,uint32*);
+ for (n=0; n<ma; n++)
+ sp->qtable_offset[n]=(toff_t)mb[n];
+ }
+ break;
+ case TIFFTAG_JPEGDCTABLES:
+ ma=va_arg(ap,uint32);
+ if (ma!=0)
+ {
+ if (ma>3)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"JpegDcTables tag has incorrect count");
+ return(0);
+ }
+ sp->dctable_offset_count=(uint8)ma;
+ mb=va_arg(ap,uint32*);
+ for (n=0; n<ma; n++)
+ sp->dctable_offset[n]=(toff_t)mb[n];
+ }
+ break;
+ case TIFFTAG_JPEGACTABLES:
+ ma=va_arg(ap,uint32);
+ if (ma!=0)
+ {
+ if (ma>3)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"JpegAcTables tag has incorrect count");
+ return(0);
+ }
+ sp->actable_offset_count=(uint8)ma;
+ mb=va_arg(ap,uint32*);
+ for (n=0; n<ma; n++)
+ sp->actable_offset[n]=(toff_t)mb[n];
+ }
+ break;
+ case TIFFTAG_JPEGPROC:
+ sp->jpeg_proc=(uint8)va_arg(ap,uint32);
+ break;
+ case TIFFTAG_JPEGRESTARTINTERVAL:
+ sp->restart_interval=(uint16)va_arg(ap,uint32);
+ break;
+ default:
+ return (*sp->vsetparent)(tif,tag,ap);
+ }
+ TIFFSetFieldBit(tif,_TIFFFieldWithTag(tif,tag)->field_bit);
+ tif->tif_flags|=TIFF_DIRTYDIRECT;
+ return(1);
}
static void
-TIFFojpeg_output_message(register j_common_ptr cinfo)
- { char buffer[JMSG_LENGTH_MAX];
+OJPEGPrintDir(TIFF* tif, FILE* fd, long flags)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint8 m;
+ (void)flags;
+ assert(sp!=NULL);
+ if (TIFFFieldSet(tif,FIELD_OJPEG_JPEGINTERCHANGEFORMAT))
+ fprintf(fd," JpegInterchangeFormat: %lu\n",(unsigned long)sp->jpeg_interchange_format);
+ if (TIFFFieldSet(tif,FIELD_OJPEG_JPEGINTERCHANGEFORMATLENGTH))
+ fprintf(fd," JpegInterchangeFormatLength: %lu\n",(unsigned long)sp->jpeg_interchange_format_length);
+ if (TIFFFieldSet(tif,FIELD_OJPEG_JPEGQTABLES))
+ {
+ fprintf(fd," JpegQTables:");
+ for (m=0; m<sp->qtable_offset_count; m++)
+ fprintf(fd," %lu",(unsigned long)sp->qtable_offset[m]);
+ fprintf(fd,"\n");
+ }
+ if (TIFFFieldSet(tif,FIELD_OJPEG_JPEGDCTABLES))
+ {
+ fprintf(fd," JpegDcTables:");
+ for (m=0; m<sp->dctable_offset_count; m++)
+ fprintf(fd," %lu",(unsigned long)sp->dctable_offset[m]);
+ fprintf(fd,"\n");
+ }
+ if (TIFFFieldSet(tif,FIELD_OJPEG_JPEGACTABLES))
+ {
+ fprintf(fd," JpegAcTables:");
+ for (m=0; m<sp->actable_offset_count; m++)
+ fprintf(fd," %lu",(unsigned long)sp->actable_offset[m]);
+ fprintf(fd,"\n");
+ }
+ if (TIFFFieldSet(tif,FIELD_OJPEG_JPEGPROC))
+ fprintf(fd," JpegProc: %u\n",(unsigned int)sp->jpeg_proc);
+ if (TIFFFieldSet(tif,FIELD_OJPEG_JPEGRESTARTINTERVAL))
+ fprintf(fd," JpegRestartInterval: %u\n",(unsigned int)sp->restart_interval);
+}
- /* This subroutine is invoked only for warning messages, since the JPEG
- Library's "error_exit" method does its own thing and "trace_level" is never
- set > 0.
- */
- (*cinfo->err->format_message)(cinfo,buffer);
- TIFFWarning(JPEGLib_name,buffer);
- }
+static int
+OJPEGSetupDecode(TIFF* tif)
+{
+ static const char module[]="OJPEGSetupDecode";
+ TIFFWarningExt(tif->tif_clientdata,module,"Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software");
+ return(1);
+}
-/* The following subroutines, which also interface with the JPEG Library, exist
- mainly in limit the side effects of "setjmp()" and convert JPEG normal/error
- conditions into TIFF Library return codes.
-*/
-#define CALLJPEG(sp,fail,op)(SETJMP((sp)->exit_jmpbuf)?(fail):(op))
-#define CALLVJPEG(sp,op)CALLJPEG(sp,0,((op),1))
-#ifdef never
+static int
+OJPEGPreDecode(TIFF* tif, tsample_t s)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ tstrile_t m;
+ if (sp->subsamplingcorrect_done==0)
+ OJPEGSubsamplingCorrect(tif);
+ if (sp->readheader_done==0)
+ {
+ if (OJPEGReadHeaderInfo(tif)==0)
+ return(0);
+ }
+ if (sp->sos_end[s].log==0)
+ {
+ if (OJPEGReadSecondarySos(tif,s)==0)
+ return(0);
+ }
+ if isTiled(tif)
+ m=(tstrile_t)tif->tif_curtile;
+ else
+ m=(tstrile_t)tif->tif_curstrip;
+ if ((sp->writeheader_done!=0) && ((sp->write_cursample!=s) || (sp->write_curstrile>m)))
+ {
+ if (sp->libjpeg_session_active!=0)
+ OJPEGLibjpegSessionAbort(tif);
+ sp->writeheader_done=0;
+ }
+ if (sp->writeheader_done==0)
+ {
+ sp->plane_sample_offset=s;
+ sp->write_cursample=s;
+ sp->write_curstrile=s*tif->tif_dir.td_stripsperimage;
+ if ((sp->in_buffer_file_pos_log==0) ||
+ (sp->in_buffer_file_pos-sp->in_buffer_togo!=sp->sos_end[s].in_buffer_file_pos))
+ {
+ sp->in_buffer_source=sp->sos_end[s].in_buffer_source;
+ sp->in_buffer_next_strile=sp->sos_end[s].in_buffer_next_strile;
+ sp->in_buffer_file_pos=sp->sos_end[s].in_buffer_file_pos;
+ sp->in_buffer_file_pos_log=0;
+ sp->in_buffer_file_togo=sp->sos_end[s].in_buffer_file_togo;
+ sp->in_buffer_togo=0;
+ sp->in_buffer_cur=0;
+ }
+ if (OJPEGWriteHeaderInfo(tif)==0)
+ return(0);
+ }
+ while (sp->write_curstrile<m)
+ {
+ if (sp->libjpeg_jpeg_query_style==0)
+ {
+ if (OJPEGPreDecodeSkipRaw(tif)==0)
+ return(0);
+ }
+ else
+ {
+ if (OJPEGPreDecodeSkipScanlines(tif)==0)
+ return(0);
+ }
+ sp->write_curstrile++;
+ }
+ return(1);
+}
static int
-TIFFojpeg_create_compress(register OJPEGState *sp)
- {
- sp->cinfo.c.err = jpeg_std_error(&sp->err); /* Initialize error handling */
- sp->err.error_exit = TIFFojpeg_error_exit;
- sp->err.output_message = TIFFojpeg_output_message;
- return CALLVJPEG(sp,jpeg_create_compress(&sp->cinfo.c));
- }
-
-/* The following subroutines comprise a JPEG Library "destination" data manager
- by directing compressed data from the JPEG Library to a TIFF Library output
- buffer.
-*/
-static void
-std_init_destination(register j_compress_ptr cinfo){} /* "Dummy" stub */
+OJPEGPreDecodeSkipRaw(TIFF* tif)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint32 m;
+ m=sp->lines_per_strile;
+ if (sp->subsampling_convert_state!=0)
+ {
+ if (sp->subsampling_convert_clines-sp->subsampling_convert_state>=m)
+ {
+ sp->subsampling_convert_state+=m;
+ if (sp->subsampling_convert_state==sp->subsampling_convert_clines)
+ sp->subsampling_convert_state=0;
+ return(1);
+ }
+ m-=sp->subsampling_convert_clines-sp->subsampling_convert_state;
+ sp->subsampling_convert_state=0;
+ }
+ while (m>=sp->subsampling_convert_clines)
+ {
+ if (jpeg_read_raw_data_encap(sp,&(sp->libjpeg_jpeg_decompress_struct),sp->subsampling_convert_ycbcrimage,sp->subsampling_ver*8)==0)
+ return(0);
+ m-=sp->subsampling_convert_clines;
+ }
+ if (m>0)
+ {
+ if (jpeg_read_raw_data_encap(sp,&(sp->libjpeg_jpeg_decompress_struct),sp->subsampling_convert_ycbcrimage,sp->subsampling_ver*8)==0)
+ return(0);
+ sp->subsampling_convert_state=m;
+ }
+ return(1);
+}
-static boolean
-std_empty_output_buffer(register j_compress_ptr cinfo)
- {
-# define sp ((OJPEGState *)cinfo)
- register TIFF *tif = sp->tif;
-
- tif->tif_rawcc = tif->tif_rawdatasize; /* Entire buffer has been filled */
- TIFFFlushData1(tif);
- sp->dest.next_output_byte = (JOCTET *)tif->tif_rawdata;
- sp->dest.free_in_buffer = (size_t)tif->tif_rawdatasize;
- return TRUE;
-# undef sp
- }
+static int
+OJPEGPreDecodeSkipScanlines(TIFF* tif)
+{
+ static const char module[]="OJPEGPreDecodeSkipScanlines";
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint32 m;
+ if (sp->skip_buffer==NULL)
+ {
+ sp->skip_buffer=_TIFFmalloc(sp->bytes_per_line);
+ if (sp->skip_buffer==NULL)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Out of memory");
+ return(0);
+ }
+ }
+ for (m=0; m<sp->lines_per_strile; m++)
+ {
+ if (jpeg_read_scanlines_encap(sp,&(sp->libjpeg_jpeg_decompress_struct),&sp->skip_buffer,1)==0)
+ return(0);
+ }
+ return(1);
+}
-static void
-std_term_destination(register j_compress_ptr cinfo)
- {
-# define sp ((OJPEGState *)cinfo)
- register TIFF *tif = sp->tif;
+static int
+OJPEGDecode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ (void)s;
+ if (sp->libjpeg_jpeg_query_style==0)
+ {
+ if (OJPEGDecodeRaw(tif,buf,cc)==0)
+ return(0);
+ }
+ else
+ {
+ if (OJPEGDecodeScanlines(tif,buf,cc)==0)
+ return(0);
+ }
+ return(1);
+}
- /* NB: The TIFF Library does the final buffer flush. */
- tif->tif_rawcp = (tidata_t)sp->dest.next_output_byte;
- tif->tif_rawcc = tif->tif_rawdatasize - (tsize_t)sp->dest.free_in_buffer;
-# undef sp
- }
+static int
+OJPEGDecodeRaw(TIFF* tif, tidata_t buf, tsize_t cc)
+{
+ static const char module[]="OJPEGDecodeRaw";
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint8* m;
+ uint32 n;
+ uint8* oy;
+ uint8* ocb;
+ uint8* ocr;
+ uint8* p;
+ uint32 q;
+ uint8* r;
+ uint8 sx,sy;
+ if (cc%sp->bytes_per_line!=0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Fractional scanline not read");
+ return(0);
+ }
+ assert(cc>0);
+ m=buf;
+ n=cc;
+ do
+ {
+ if (sp->subsampling_convert_state==0)
+ {
+ if (jpeg_read_raw_data_encap(sp,&(sp->libjpeg_jpeg_decompress_struct),sp->subsampling_convert_ycbcrimage,sp->subsampling_ver*8)==0)
+ return(0);
+ }
+ oy=sp->subsampling_convert_ybuf+sp->subsampling_convert_state*sp->subsampling_ver*sp->subsampling_convert_ylinelen;
+ ocb=sp->subsampling_convert_cbbuf+sp->subsampling_convert_state*sp->subsampling_convert_clinelen;
+ ocr=sp->subsampling_convert_crbuf+sp->subsampling_convert_state*sp->subsampling_convert_clinelen;
+ p=m;
+ for (q=0; q<sp->subsampling_convert_clinelenout; q++)
+ {
+ r=oy;
+ for (sy=0; sy<sp->subsampling_ver; sy++)
+ {
+ for (sx=0; sx<sp->subsampling_hor; sx++)
+ *p++=*r++;
+ r+=sp->subsampling_convert_ylinelen-sp->subsampling_hor;
+ }
+ oy+=sp->subsampling_hor;
+ *p++=*ocb++;
+ *p++=*ocr++;
+ }
+ sp->subsampling_convert_state++;
+ if (sp->subsampling_convert_state==sp->subsampling_convert_clines)
+ sp->subsampling_convert_state=0;
+ m+=sp->bytes_per_line;
+ n-=sp->bytes_per_line;
+ } while(n>0);
+ return(1);
+}
-/* Alternate destination manager to output JPEGTables field: */
+static int
+OJPEGDecodeScanlines(TIFF* tif, tidata_t buf, tsize_t cc)
+{
+ static const char module[]="OJPEGDecodeScanlines";
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint8* m;
+ uint32 n;
+ if (cc%sp->bytes_per_line!=0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Fractional scanline not read");
+ return(0);
+ }
+ assert(cc>0);
+ m=buf;
+ n=cc;
+ do
+ {
+ if (jpeg_read_scanlines_encap(sp,&(sp->libjpeg_jpeg_decompress_struct),&m,1)==0)
+ return(0);
+ m+=sp->bytes_per_line;
+ n-=sp->bytes_per_line;
+ } while(n>0);
+ return(1);
+}
static void
-tables_init_destination(register j_compress_ptr cinfo)
- {
-# define sp ((OJPEGState *)cinfo)
- /* The "jpegtables_length" field is the allocated buffer size while building */
- sp->dest.next_output_byte = (JOCTET *)sp->jpegtables;
- sp->dest.free_in_buffer = (size_t)sp->jpegtables_length;
-# undef sp
- }
+OJPEGPostDecode(TIFF* tif, tidata_t buf, tsize_t cc)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ (void)buf;
+ (void)cc;
+ sp->write_curstrile++;
+ if (sp->write_curstrile%tif->tif_dir.td_stripsperimage==0)
+ {
+ assert(sp->libjpeg_session_active!=0);
+ OJPEGLibjpegSessionAbort(tif);
+ sp->writeheader_done=0;
+ }
+}
-static boolean
-tables_empty_output_buffer(register j_compress_ptr cinfo)
- { void *newbuf;
-# define sp ((OJPEGState *)cinfo)
-
- /* The entire buffer has been filled, so enlarge it by 1000 bytes. */
- if (!( newbuf = _TIFFrealloc( (tdata_t)sp->jpegtables
- , (tsize_t)(sp->jpegtables_length + 1000)
- )
- )
- ) ERREXIT1(cinfo,JERR_OUT_OF_MEMORY,100);
- sp->dest.next_output_byte = (JOCTET *)newbuf + sp->jpegtables_length;
- sp->dest.free_in_buffer = (size_t)1000;
- sp->jpegtables = newbuf;
- sp->jpegtables_length += 1000;
- return TRUE;
-# undef sp
- }
+static int
+OJPEGSetupEncode(TIFF* tif)
+{
+ static const char module[]="OJPEGSetupEncode";
+ TIFFErrorExt(tif->tif_clientdata,module,"OJPEG encoding not supported; use new-style JPEG compression instead");
+ return(0);
+}
-static void
-tables_term_destination(register j_compress_ptr cinfo)
- {
-# define sp ((OJPEGState *)cinfo)
- /* Set tables length to no. of Bytes actually emitted. */
- sp->jpegtables_length -= sp->dest.free_in_buffer;
-# undef sp
- }
-
-/*ARGSUSED*/ static int
-TIFFojpeg_tables_dest(register OJPEGState *sp, TIFF *tif)
- {
-
- /* Allocate a working buffer for building tables. The initial size is 1000
- Bytes, which is usually adequate.
- */
- if (sp->jpegtables) _TIFFfree(sp->jpegtables);
- if (!(sp->jpegtables = (void*)
- _TIFFmalloc((tsize_t)(sp->jpegtables_length = 1000))
- )
- )
- {
- sp->jpegtables_length = 0;
- TIFFError("TIFFojpeg_tables_dest",no_jtable_space);
- return 0;
- };
- sp->cinfo.c.dest = &sp->dest;
- sp->dest.init_destination = tables_init_destination;
- sp->dest.empty_output_buffer = tables_empty_output_buffer;
- sp->dest.term_destination = tables_term_destination;
- return 1;
- }
-#else /* well, hardly ever */
+static int
+OJPEGPreEncode(TIFF* tif, tsample_t s)
+{
+ static const char module[]="OJPEGPreEncode";
+ (void)s;
+ TIFFErrorExt(tif->tif_clientdata,module,"OJPEG encoding not supported; use new-style JPEG compression instead");
+ return(0);
+}
static int
-_notSupported(register TIFF *tif)
- { const TIFFCodec *c = TIFFFindCODEC(tif->tif_dir.td_compression);
+OJPEGEncode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
+{
+ static const char module[]="OJPEGEncode";
+ (void)buf;
+ (void)cc;
+ (void)s;
+ TIFFErrorExt(tif->tif_clientdata,module,"OJPEG encoding not supported; use new-style JPEG compression instead");
+ return(0);
+}
- TIFFError(tif->tif_name,"%s compression not supported",c->name);
- return 0;
- }
-#endif /* never */
+static int
+OJPEGPostEncode(TIFF* tif)
+{
+ static const char module[]="OJPEGPostEncode";
+ TIFFErrorExt(tif->tif_clientdata,module,"OJPEG encoding not supported; use new-style JPEG compression instead");
+ return(0);
+}
-/* The following subroutines comprise a JPEG Library "source" data manager by
- by directing compressed data to the JPEG Library from a TIFF Library input
- buffer.
-*/
static void
-std_init_source(register j_decompress_ptr cinfo)
- {
-# define sp ((OJPEGState *)cinfo)
- register TIFF *tif = sp->tif;
-
- if (sp->src.bytes_in_buffer == 0)
- {
- sp->src.next_input_byte = (const JOCTET *)tif->tif_rawdata;
- sp->src.bytes_in_buffer = (size_t)tif->tif_rawcc;
- };
-# undef sp
- }
+OJPEGCleanup(TIFF* tif)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ if (sp!=0)
+ {
+ tif->tif_tagmethods.vgetfield=sp->vgetparent;
+ tif->tif_tagmethods.vsetfield=sp->vsetparent;
+ if (sp->qtable[0]!=0)
+ _TIFFfree(sp->qtable[0]);
+ if (sp->qtable[1]!=0)
+ _TIFFfree(sp->qtable[1]);
+ if (sp->qtable[2]!=0)
+ _TIFFfree(sp->qtable[2]);
+ if (sp->qtable[3]!=0)
+ _TIFFfree(sp->qtable[3]);
+ if (sp->dctable[0]!=0)
+ _TIFFfree(sp->dctable[0]);
+ if (sp->dctable[1]!=0)
+ _TIFFfree(sp->dctable[1]);
+ if (sp->dctable[2]!=0)
+ _TIFFfree(sp->dctable[2]);
+ if (sp->dctable[3]!=0)
+ _TIFFfree(sp->dctable[3]);
+ if (sp->actable[0]!=0)
+ _TIFFfree(sp->actable[0]);
+ if (sp->actable[1]!=0)
+ _TIFFfree(sp->actable[1]);
+ if (sp->actable[2]!=0)
+ _TIFFfree(sp->actable[2]);
+ if (sp->actable[3]!=0)
+ _TIFFfree(sp->actable[3]);
+ if (sp->libjpeg_session_active!=0)
+ OJPEGLibjpegSessionAbort(tif);
+ if (sp->subsampling_convert_ycbcrbuf!=0)
+ _TIFFfree(sp->subsampling_convert_ycbcrbuf);
+ if (sp->subsampling_convert_ycbcrimage!=0)
+ _TIFFfree(sp->subsampling_convert_ycbcrimage);
+ if (sp->skip_buffer!=0)
+ _TIFFfree(sp->skip_buffer);
+ _TIFFfree(sp);
+ tif->tif_data=NULL;
+ _TIFFSetDefaultCompressionState(tif);
+ }
+}
-static boolean
-std_fill_input_buffer(register j_decompress_ptr cinfo)
- { static const JOCTET dummy_EOI[2]={0xFF,JPEG_EOI};
-# define sp ((OJPEGState *)cinfo)
+static void
+OJPEGSubsamplingCorrect(TIFF* tif)
+{
+ static const char module[]="OJPEGSubsamplingCorrect";
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint8 mh;
+ uint8 mv;
+ assert(sp->subsamplingcorrect_done==0);
+ if ((tif->tif_dir.td_samplesperpixel!=3) || ((tif->tif_dir.td_photometric!=PHOTOMETRIC_YCBCR) &&
+ (tif->tif_dir.td_photometric!=PHOTOMETRIC_ITULAB)))
+ {
+ if (sp->subsampling_tag!=0)
+ TIFFWarningExt(tif->tif_clientdata,module,"Subsampling tag not appropriate for this Photometric and/or SamplesPerPixel");
+ sp->subsampling_hor=1;
+ sp->subsampling_ver=1;
+ sp->subsampling_force_desubsampling_inside_decompression=0;
+ }
+ else
+ {
+ sp->subsamplingcorrect_done=1;
+ mh=sp->subsampling_hor;
+ mv=sp->subsampling_ver;
+ sp->subsamplingcorrect=1;
+ OJPEGReadHeaderInfoSec(tif);
+ if (sp->subsampling_force_desubsampling_inside_decompression!=0)
+ {
+ sp->subsampling_hor=1;
+ sp->subsampling_ver=1;
+ }
+ sp->subsamplingcorrect=0;
+ if (((sp->subsampling_hor!=mh) || (sp->subsampling_ver!=mv)) && (sp->subsampling_force_desubsampling_inside_decompression==0))
+ {
+ if (sp->subsampling_tag==0)
+ TIFFWarningExt(tif->tif_clientdata,module,"Subsampling tag is not set, yet subsampling inside JPEG data [%d,%d] does not match default values [2,2]; assuming subsampling inside JPEG data is correct",sp->subsampling_hor,sp->subsampling_ver);
+ else
+ TIFFWarningExt(tif->tif_clientdata,module,"Subsampling inside JPEG data [%d,%d] does not match subsampling tag values [%d,%d]; assuming subsampling inside JPEG data is correct",sp->subsampling_hor,sp->subsampling_ver,mh,mv);
+ }
+ if (sp->subsampling_force_desubsampling_inside_decompression!=0)
+ {
+ if (sp->subsampling_tag==0)
+ TIFFWarningExt(tif->tif_clientdata,module,"Subsampling tag is not set, yet subsampling inside JPEG data does not match default values [2,2] (nor any other values allowed in TIFF); assuming subsampling inside JPEG data is correct and desubsampling inside JPEG decompression");
+ else
+ TIFFWarningExt(tif->tif_clientdata,module,"Subsampling inside JPEG data does not match subsampling tag values [%d,%d] (nor any other values allowed in TIFF); assuming subsampling inside JPEG data is correct and desubsampling inside JPEG decompression",mh,mv);
+ }
+ if (sp->subsampling_force_desubsampling_inside_decompression==0)
+ {
+ if (sp->subsampling_hor<sp->subsampling_ver)
+ TIFFWarningExt(tif->tif_clientdata,module,"Subsampling values [%d,%d] are not allowed in TIFF",sp->subsampling_hor,sp->subsampling_ver);
+ }
+ }
+ sp->subsamplingcorrect_done=1;
+}
- /* Control should never get here, since an entire strip/tile is read into
- memory before the decompressor is called; thus, data should have been
- supplied by the "init_source" method. ...But, sometimes things fail.
- */
- WARNMS(cinfo,JWRN_JPEG_EOF);
- sp->src.next_input_byte = dummy_EOI; /* Insert a fake EOI marker */
- sp->src.bytes_in_buffer = sizeof dummy_EOI;
- return TRUE;
-# undef sp
- }
+static int
+OJPEGReadHeaderInfo(TIFF* tif)
+{
+ static const char module[]="OJPEGReadHeaderInfo";
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ assert(sp->readheader_done==0);
+ sp->image_width=tif->tif_dir.td_imagewidth;
+ sp->image_length=tif->tif_dir.td_imagelength;
+ if isTiled(tif)
+ {
+ sp->strile_width=tif->tif_dir.td_tilewidth;
+ sp->strile_length=tif->tif_dir.td_tilelength;
+ sp->strile_length_total=((sp->image_length+sp->strile_length-1)/sp->strile_length)*sp->strile_length;
+ }
+ else
+ {
+ sp->strile_width=sp->image_width;
+ sp->strile_length=tif->tif_dir.td_rowsperstrip;
+ sp->strile_length_total=sp->image_length;
+ }
+ sp->samples_per_pixel=tif->tif_dir.td_samplesperpixel;
+ if (sp->samples_per_pixel==1)
+ {
+ sp->plane_sample_offset=0;
+ sp->samples_per_pixel_per_plane=sp->samples_per_pixel;
+ sp->subsampling_hor=1;
+ sp->subsampling_ver=1;
+ }
+ else
+ {
+ if (sp->samples_per_pixel!=3)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"SamplesPerPixel %d not supported for this compression scheme",sp->samples_per_pixel);
+ return(0);
+ }
+ sp->plane_sample_offset=0;
+ if (tif->tif_dir.td_planarconfig==PLANARCONFIG_CONTIG)
+ sp->samples_per_pixel_per_plane=3;
+ else
+ sp->samples_per_pixel_per_plane=1;
+ }
+ if (sp->strile_length<sp->image_length)
+ {
+ if (sp->strile_length%(sp->subsampling_ver*8)!=0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Incompatible vertical subsampling and image strip/tile length");
+ return(0);
+ }
+ sp->restart_interval=((sp->strile_width+sp->subsampling_hor*8-1)/(sp->subsampling_hor*8))*(sp->strile_length/(sp->subsampling_ver*8));
+ }
+ if (OJPEGReadHeaderInfoSec(tif)==0)
+ return(0);
+ sp->sos_end[0].log=1;
+ sp->sos_end[0].in_buffer_source=sp->in_buffer_source;
+ sp->sos_end[0].in_buffer_next_strile=sp->in_buffer_next_strile;
+ sp->sos_end[0].in_buffer_file_pos=sp->in_buffer_file_pos-sp->in_buffer_togo;
+ sp->sos_end[0].in_buffer_file_togo=sp->in_buffer_file_togo+sp->in_buffer_togo;
+ sp->readheader_done=1;
+ return(1);
+}
+
+static int
+OJPEGReadSecondarySos(TIFF* tif, tsample_t s)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint8 m;
+ assert(s>0);
+ assert(s<3);
+ assert(sp->sos_end[0].log!=0);
+ assert(sp->sos_end[s].log==0);
+ sp->plane_sample_offset=s-1;
+ while(sp->sos_end[sp->plane_sample_offset].log==0)
+ sp->plane_sample_offset--;
+ sp->in_buffer_source=sp->sos_end[sp->plane_sample_offset].in_buffer_source;
+ sp->in_buffer_next_strile=sp->sos_end[sp->plane_sample_offset].in_buffer_next_strile;
+ sp->in_buffer_file_pos=sp->sos_end[sp->plane_sample_offset].in_buffer_file_pos;
+ sp->in_buffer_file_pos_log=0;
+ sp->in_buffer_file_togo=sp->sos_end[sp->plane_sample_offset].in_buffer_file_togo;
+ sp->in_buffer_togo=0;
+ sp->in_buffer_cur=0;
+ while(sp->plane_sample_offset<s)
+ {
+ do
+ {
+ if (OJPEGReadByte(sp,&m)==0)
+ return(0);
+ if (m==255)
+ {
+ do
+ {
+ if (OJPEGReadByte(sp,&m)==0)
+ return(0);
+ if (m!=255)
+ break;
+ } while(1);
+ if (m==JPEG_MARKER_SOS)
+ break;
+ }
+ } while(1);
+ sp->plane_sample_offset++;
+ if (OJPEGReadHeaderInfoSecStreamSos(tif)==0)
+ return(0);
+ sp->sos_end[sp->plane_sample_offset].log=1;
+ sp->sos_end[sp->plane_sample_offset].in_buffer_source=sp->in_buffer_source;
+ sp->sos_end[sp->plane_sample_offset].in_buffer_next_strile=sp->in_buffer_next_strile;
+ sp->sos_end[sp->plane_sample_offset].in_buffer_file_pos=sp->in_buffer_file_pos-sp->in_buffer_togo;
+ sp->sos_end[sp->plane_sample_offset].in_buffer_file_togo=sp->in_buffer_file_togo+sp->in_buffer_togo;
+ }
+ return(1);
+}
+
+static int
+OJPEGWriteHeaderInfo(TIFF* tif)
+{
+ static const char module[]="OJPEGWriteHeaderInfo";
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint8** m;
+ uint32 n;
+ assert(sp->libjpeg_session_active==0);
+ sp->out_state=ososSoi;
+ sp->restart_index=0;
+ jpeg_std_error(&(sp->libjpeg_jpeg_error_mgr));
+ sp->libjpeg_jpeg_error_mgr.output_message=OJPEGLibjpegJpegErrorMgrOutputMessage;
+ sp->libjpeg_jpeg_error_mgr.error_exit=OJPEGLibjpegJpegErrorMgrErrorExit;
+ sp->libjpeg_jpeg_decompress_struct.err=&(sp->libjpeg_jpeg_error_mgr);
+ sp->libjpeg_jpeg_decompress_struct.client_data=(void*)tif;
+ if (jpeg_create_decompress_encap(sp,&(sp->libjpeg_jpeg_decompress_struct))==0)
+ return(0);
+ sp->libjpeg_session_active=1;
+ sp->libjpeg_jpeg_source_mgr.bytes_in_buffer=0;
+ sp->libjpeg_jpeg_source_mgr.init_source=OJPEGLibjpegJpegSourceMgrInitSource;
+ sp->libjpeg_jpeg_source_mgr.fill_input_buffer=OJPEGLibjpegJpegSourceMgrFillInputBuffer;
+ sp->libjpeg_jpeg_source_mgr.skip_input_data=OJPEGLibjpegJpegSourceMgrSkipInputData;
+ sp->libjpeg_jpeg_source_mgr.resync_to_restart=OJPEGLibjpegJpegSourceMgrResyncToRestart;
+ sp->libjpeg_jpeg_source_mgr.term_source=OJPEGLibjpegJpegSourceMgrTermSource;
+ sp->libjpeg_jpeg_decompress_struct.src=&(sp->libjpeg_jpeg_source_mgr);
+ if (jpeg_read_header_encap(sp,&(sp->libjpeg_jpeg_decompress_struct),1)==0)
+ return(0);
+ if ((sp->subsampling_force_desubsampling_inside_decompression==0) && (sp->samples_per_pixel_per_plane>1))
+ {
+ sp->libjpeg_jpeg_decompress_struct.raw_data_out=1;
+#if JPEG_LIB_VERSION >= 70
+ sp->libjpeg_jpeg_decompress_struct.do_fancy_upsampling=FALSE;
+#endif
+ sp->libjpeg_jpeg_query_style=0;
+ if (sp->subsampling_convert_log==0)
+ {
+ assert(sp->subsampling_convert_ycbcrbuf==0);
+ assert(sp->subsampling_convert_ycbcrimage==0);
+ sp->subsampling_convert_ylinelen=((sp->strile_width+sp->subsampling_hor*8-1)/(sp->subsampling_hor*8)*sp->subsampling_hor*8);
+ sp->subsampling_convert_ylines=sp->subsampling_ver*8;
+ sp->subsampling_convert_clinelen=sp->subsampling_convert_ylinelen/sp->subsampling_hor;
+ sp->subsampling_convert_clines=8;
+ sp->subsampling_convert_ybuflen=sp->subsampling_convert_ylinelen*sp->subsampling_convert_ylines;
+ sp->subsampling_convert_cbuflen=sp->subsampling_convert_clinelen*sp->subsampling_convert_clines;
+ sp->subsampling_convert_ycbcrbuflen=sp->subsampling_convert_ybuflen+2*sp->subsampling_convert_cbuflen;
+ sp->subsampling_convert_ycbcrbuf=_TIFFmalloc(sp->subsampling_convert_ycbcrbuflen);
+ if (sp->subsampling_convert_ycbcrbuf==0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Out of memory");
+ return(0);
+ }
+ sp->subsampling_convert_ybuf=sp->subsampling_convert_ycbcrbuf;
+ sp->subsampling_convert_cbbuf=sp->subsampling_convert_ybuf+sp->subsampling_convert_ybuflen;
+ sp->subsampling_convert_crbuf=sp->subsampling_convert_cbbuf+sp->subsampling_convert_cbuflen;
+ sp->subsampling_convert_ycbcrimagelen=3+sp->subsampling_convert_ylines+2*sp->subsampling_convert_clines;
+ sp->subsampling_convert_ycbcrimage=_TIFFmalloc(sp->subsampling_convert_ycbcrimagelen*sizeof(uint8*));
+ if (sp->subsampling_convert_ycbcrimage==0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Out of memory");
+ return(0);
+ }
+ m=sp->subsampling_convert_ycbcrimage;
+ *m++=(uint8*)(sp->subsampling_convert_ycbcrimage+3);
+ *m++=(uint8*)(sp->subsampling_convert_ycbcrimage+3+sp->subsampling_convert_ylines);
+ *m++=(uint8*)(sp->subsampling_convert_ycbcrimage+3+sp->subsampling_convert_ylines+sp->subsampling_convert_clines);
+ for (n=0; n<sp->subsampling_convert_ylines; n++)
+ *m++=sp->subsampling_convert_ybuf+n*sp->subsampling_convert_ylinelen;
+ for (n=0; n<sp->subsampling_convert_clines; n++)
+ *m++=sp->subsampling_convert_cbbuf+n*sp->subsampling_convert_clinelen;
+ for (n=0; n<sp->subsampling_convert_clines; n++)
+ *m++=sp->subsampling_convert_crbuf+n*sp->subsampling_convert_clinelen;
+ sp->subsampling_convert_clinelenout=((sp->strile_width+sp->subsampling_hor-1)/sp->subsampling_hor);
+ sp->subsampling_convert_state=0;
+ sp->bytes_per_line=sp->subsampling_convert_clinelenout*(sp->subsampling_ver*sp->subsampling_hor+2);
+ sp->lines_per_strile=((sp->strile_length+sp->subsampling_ver-1)/sp->subsampling_ver);
+ sp->subsampling_convert_log=1;
+ }
+ }
+ else
+ {
+ sp->libjpeg_jpeg_decompress_struct.jpeg_color_space=JCS_UNKNOWN;
+ sp->libjpeg_jpeg_decompress_struct.out_color_space=JCS_UNKNOWN;
+ sp->libjpeg_jpeg_query_style=1;
+ sp->bytes_per_line=sp->samples_per_pixel_per_plane*sp->strile_width;
+ sp->lines_per_strile=sp->strile_length;
+ }
+ if (jpeg_start_decompress_encap(sp,&(sp->libjpeg_jpeg_decompress_struct))==0)
+ return(0);
+ sp->writeheader_done=1;
+ return(1);
+}
static void
-std_skip_input_data(register j_decompress_ptr cinfo, long num_bytes)
- {
-# define sp ((OJPEGState *)cinfo)
-
- if (num_bytes > 0)
- {
- if (num_bytes > (long)sp->src.bytes_in_buffer) /* oops: buffer overrun */
- (void)std_fill_input_buffer(cinfo);
- else
- {
- sp->src.next_input_byte += (size_t)num_bytes;
- sp->src.bytes_in_buffer -= (size_t)num_bytes;
- }
- }
-# undef sp
- }
-
-/*ARGSUSED*/ static void
-std_term_source(register j_decompress_ptr cinfo){} /* "Dummy" stub */
-
-/* Allocate temporary I/O buffers for downsampled data, using values computed in
- "jpeg_start_{de}compress()". We use the JPEG Library's allocator so that
- buffers will be released automatically when done with a strip/tile. This is
- also a handy place to compute samplesperclump, bytesperline, etc.
-*/
+OJPEGLibjpegSessionAbort(TIFF* tif)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ assert(sp->libjpeg_session_active!=0);
+ jpeg_destroy((jpeg_common_struct*)(&(sp->libjpeg_jpeg_decompress_struct)));
+ sp->libjpeg_session_active=0;
+}
+
static int
-alloc_downsampled_buffers(TIFF *tif,jpeg_component_info *comp_info,
- int num_components)
- { register OJPEGState *sp = OJState(tif);
-
- sp->samplesperclump = 0;
- if (num_components > 0)
- { tsize_t size = sp->cinfo.comm.is_decompressor
-# ifdef D_LOSSLESS_SUPPORTED
- ? sp->cinfo.d.min_codec_data_unit
-# else
- ? DCTSIZE
-# endif
-# ifdef C_LOSSLESS_SUPPORTED
- : sp->cinfo.c.data_unit;
-# else
- : DCTSIZE;
-# endif
- int ci = 0;
- register jpeg_component_info *compptr = comp_info;
-
- do
- { JSAMPARRAY buf;
-
- sp->samplesperclump +=
- compptr->h_samp_factor * compptr->v_samp_factor;
-# if defined(C_LOSSLESS_SUPPORTED) || defined(D_LOSSLESS_SUPPORTED)
- if (!(buf = CALLJPEG(sp,0,(*sp->cinfo.comm.mem->alloc_sarray)(&sp->cinfo.comm,JPOOL_IMAGE,compptr->width_in_data_units*size,compptr->v_samp_factor*size))))
-# else
- if (!(buf = CALLJPEG(sp,0,(*sp->cinfo.comm.mem->alloc_sarray)(&sp->cinfo.comm,JPOOL_IMAGE,compptr->width_in_blocks*size,compptr->v_samp_factor*size))))
-# endif
- return 0;
- sp->ds_buffer[ci] = buf;
- }
- while (++compptr,++ci < num_components);
- };
- return 1;
- }
-#ifdef never
-
-/* JPEG Encoding begins here. */
-
-/*ARGSUSED*/ static int
-OJPEGEncode(register TIFF *tif,tidata_t buf,tsize_t cc,tsample_t s)
- { tsize_t rows; /* No. of unprocessed rows in file */
- register OJPEGState *sp = OJState(tif);
-
- /* Encode a chunk of pixels, where returned data is NOT down-sampled (the
- standard case). The data is expected to be written in scan-line multiples.
- */
- if (cc % sp->bytesperline) TIFFWarning(tif->tif_name,no_write_frac);
- if ( (cc /= bytesperline) /* No. of complete rows in caller's buffer */
- > (rows = sp->cinfo.c.image_height - sp->cinfo.c.next_scanline)
- ) cc = rows;
- while (--cc >= 0)
- {
- if ( CALLJPEG(sp,-1,jpeg_write_scanlines(&sp->cinfo.c,(JSAMPARRAY)&buf,1))
- != 1
- ) return 0;
- ++tif->tif_row;
- buf += sp->bytesperline;
- };
- return 1;
- }
-
-/*ARGSUSED*/ static int
-OJPEGEncodeRaw(register TIFF *tif,tidata_t buf,tsize_t cc,tsample_t s)
- { tsize_t rows; /* No. of unprocessed rows in file */
- JDIMENSION lines_per_MCU, size;
- register OJPEGState *sp = OJState(tif);
-
- /* Encode a chunk of pixels, where returned data is down-sampled as per the
- sampling factors. The data is expected to be written in scan-line
- multiples.
- */
- cc /= sp->bytesperline;
- if (cc % sp->bytesperline) TIFFWarning(tif->tif_name,no_write_frac);
- if ( (cc /= bytesperline) /* No. of complete rows in caller's buffer */
- > (rows = sp->cinfo.c.image_height - sp->cinfo.c.next_scanline)
- ) cc = rows;
-# ifdef C_LOSSLESS_SUPPORTED
- lines_per_MCU = sp->cinfo.c.max_samp_factor*(size = sp->cinfo.d.data_unit);
-# else
- lines_per_MCU = sp->cinfo.c.max_samp_factor*(size = DCTSIZE);
-# endif
- while (--cc >= 0)
- { int ci = 0, clumpoffset = 0;
- register jpeg_component_info *compptr = sp->cinfo.c.comp_info;
-
- /* The fastest way to separate the data is to make 1 pass over the scan
- line for each row of each component.
- */
- do
- { int ypos = 0;
-
- do
- { int padding;
- register JSAMPLE *inptr = (JSAMPLE*)buf + clumpoffset,
- *outptr =
- sp->ds_buffer[ci][sp->scancount*compptr->v_samp_factor+ypos];
- /* Cb,Cr both have sampling factors 1, so this is correct */
- register int clumps_per_line =
- sp->cinfo.c.comp_info[1].downsampled_width,
- xpos;
-
- padding = (int)
-# ifdef C_LOSSLESS_SUPPORTED
- ( compptr->width_in_data_units * size
-# else
- ( compptr->width_in_blocks * size
-# endif
- - clumps_per_line * compptr->h_samp_factor
- );
- if (compptr->h_samp_factor == 1) /* Cb & Cr fast path */
- do *outptr++ = *inptr;
- while ((inptr += sp->samplesperclump),--clumps_per_line > 0);
- else /* general case */
- do
- {
- xpos = 0;
- do *outptr++ = inptr[xpos];
- while (++xpos < compptr->h_samp_factor);
- }
- while ((inptr += sp->samplesperclump),--clumps_per_line > 0);
- xpos = 0; /* Pad each scan line as needed */
- do outptr[0] = outptr[-1]; while (++outptr,++xpos < padding);
- clumpoffset += compptr->h_samp_factor;
- }
- while (++ypos < compptr->v_samp_factor);
- }
- while (++compptr,++ci < sp->cinfo.c.num_components);
- if (++sp->scancount >= size)
- {
- if ( CALLJPEG(sp,-1,jpeg_write_raw_data(&sp->cinfo.c,sp->ds_buffer,lines_per_MCU))
- != lines_per_MCU
- ) return 0;
- sp->scancount = 0;
- };
- ++tif->tif_row++
- buf += sp->bytesperline;
- };
- return 1;
- }
+OJPEGReadHeaderInfoSec(TIFF* tif)
+{
+ static const char module[]="OJPEGReadHeaderInfoSec";
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint8 m;
+ uint16 n;
+ uint8 o;
+ if (sp->file_size==0)
+ sp->file_size=TIFFGetFileSize(tif);
+ if (sp->jpeg_interchange_format!=0)
+ {
+ if (sp->jpeg_interchange_format>=sp->file_size)
+ {
+ sp->jpeg_interchange_format=0;
+ sp->jpeg_interchange_format_length=0;
+ }
+ else
+ {
+ if ((sp->jpeg_interchange_format_length==0) || (sp->jpeg_interchange_format+sp->jpeg_interchange_format_length>sp->file_size))
+ sp->jpeg_interchange_format_length=sp->file_size-sp->jpeg_interchange_format;
+ }
+ }
+ sp->in_buffer_source=osibsNotSetYet;
+ sp->in_buffer_next_strile=0;
+ sp->in_buffer_strile_count=tif->tif_dir.td_nstrips;
+ sp->in_buffer_file_togo=0;
+ sp->in_buffer_togo=0;
+ do
+ {
+ if (OJPEGReadBytePeek(sp,&m)==0)
+ return(0);
+ if (m!=255)
+ break;
+ OJPEGReadByteAdvance(sp);
+ do
+ {
+ if (OJPEGReadByte(sp,&m)==0)
+ return(0);
+ } while(m==255);
+ switch(m)
+ {
+ case JPEG_MARKER_SOI:
+ /* this type of marker has no data, and should be skipped */
+ break;
+ case JPEG_MARKER_COM:
+ case JPEG_MARKER_APP0:
+ case JPEG_MARKER_APP0+1:
+ case JPEG_MARKER_APP0+2:
+ case JPEG_MARKER_APP0+3:
+ case JPEG_MARKER_APP0+4:
+ case JPEG_MARKER_APP0+5:
+ case JPEG_MARKER_APP0+6:
+ case JPEG_MARKER_APP0+7:
+ case JPEG_MARKER_APP0+8:
+ case JPEG_MARKER_APP0+9:
+ case JPEG_MARKER_APP0+10:
+ case JPEG_MARKER_APP0+11:
+ case JPEG_MARKER_APP0+12:
+ case JPEG_MARKER_APP0+13:
+ case JPEG_MARKER_APP0+14:
+ case JPEG_MARKER_APP0+15:
+ /* this type of marker has data, but it has no use to us (and no place here) and should be skipped */
+ if (OJPEGReadWord(sp,&n)==0)
+ return(0);
+ if (n<2)
+ {
+ if (sp->subsamplingcorrect==0)
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt JPEG data");
+ return(0);
+ }
+ if (n>2)
+ OJPEGReadSkip(sp,n-2);
+ break;
+ case JPEG_MARKER_DRI:
+ if (OJPEGReadHeaderInfoSecStreamDri(tif)==0)
+ return(0);
+ break;
+ case JPEG_MARKER_DQT:
+ if (OJPEGReadHeaderInfoSecStreamDqt(tif)==0)
+ return(0);
+ break;
+ case JPEG_MARKER_DHT:
+ if (OJPEGReadHeaderInfoSecStreamDht(tif)==0)
+ return(0);
+ break;
+ case JPEG_MARKER_SOF0:
+ case JPEG_MARKER_SOF1:
+ case JPEG_MARKER_SOF3:
+ if (OJPEGReadHeaderInfoSecStreamSof(tif,m)==0)
+ return(0);
+ if (sp->subsamplingcorrect!=0)
+ return(1);
+ break;
+ case JPEG_MARKER_SOS:
+ if (sp->subsamplingcorrect!=0)
+ return(1);
+ assert(sp->plane_sample_offset==0);
+ if (OJPEGReadHeaderInfoSecStreamSos(tif)==0)
+ return(0);
+ break;
+ default:
+ TIFFErrorExt(tif->tif_clientdata,module,"Unknown marker type %d in JPEG data",m);
+ return(0);
+ }
+ } while(m!=JPEG_MARKER_SOS);
+ if (sp->subsamplingcorrect)
+ return(1);
+ if (sp->sof_log==0)
+ {
+ if (OJPEGReadHeaderInfoSecTablesQTable(tif)==0)
+ return(0);
+ sp->sof_marker_id=JPEG_MARKER_SOF0;
+ for (o=0; o<sp->samples_per_pixel; o++)
+ sp->sof_c[o]=o;
+ sp->sof_hv[0]=((sp->subsampling_hor<<4)|sp->subsampling_ver);
+ for (o=1; o<sp->samples_per_pixel; o++)
+ sp->sof_hv[o]=17;
+ sp->sof_x=sp->strile_width;
+ sp->sof_y=sp->strile_length_total;
+ sp->sof_log=1;
+ if (OJPEGReadHeaderInfoSecTablesDcTable(tif)==0)
+ return(0);
+ if (OJPEGReadHeaderInfoSecTablesAcTable(tif)==0)
+ return(0);
+ for (o=1; o<sp->samples_per_pixel; o++)
+ sp->sos_cs[o]=o;
+ }
+ return(1);
+}
static int
-OJPEGSetupEncode(register TIFF *tif)
- { static const char module[]={"OJPEGSetupEncode"};
- uint32 segment_height, segment_width;
- int status = 1; /* Assume success by default */
- register OJPEGState *sp = OJState(tif);
-# define td (&tif->tif_dir)
-
- /* Verify miscellaneous parameters. This will need work if the TIFF Library
- ever supports different depths for different components, or if the JPEG
- Library ever supports run-time depth selection. Neither seems imminent.
- */
- if (td->td_bitspersample != 8)
- {
- TIFFError(module,bad_bps,td->td_bitspersample);
- status = 0;
- };
-
- /* The TIFF Version 6.0 specification and IJG JPEG Library accept different
- sets of color spaces, so verify that our image belongs to the common subset
- and map its photometry code, then initialize to handle subsampling and
- optional JPEG Library YCbCr <-> RGB color-space conversion.
- */
- switch (td->td_photometric)
- {
- case PHOTOMETRIC_YCBCR :
-
- /* ISO IS 10918-1 requires that JPEG subsampling factors be 1-4, but
- TIFF Version 6.0 is more restrictive: only 1, 2, and 4 are allowed.
- */
- if ( ( td->td_ycbcrsubsampling[0] == 1
- || td->td_ycbcrsubsampling[0] == 2
- || td->td_ycbcrsubsampling[0] == 4
- )
- && ( td->td_ycbcrsubsampling[1] == 1
- || td->td_ycbcrsubsampling[1] == 2
- || td->td_ycbcrsubsampling[1] == 4
- )
- )
- sp->cinfo.c.raw_data_in =
- ( (sp->h_sampling = td->td_ycbcrsubsampling[0]) << 3
- | (sp->v_sampling = td->td_ycbcrsubsampling[1])
- ) != 011;
- else
- {
- TIFFError(module,bad_subsampling);
- status = 0;
- };
-
- /* A ReferenceBlackWhite field MUST be present, since the default value
- is inapproriate for YCbCr. Fill in the proper value if the
- application didn't set it.
- */
- if (!TIFFFieldSet(tif,FIELD_REFBLACKWHITE))
- { float refbw[6];
- long top = 1L << td->td_bitspersample;
-
- refbw[0] = 0;
- refbw[1] = (float)(top-1L);
- refbw[2] = (float)(top>>1);
- refbw[3] = refbw[1];
- refbw[4] = refbw[2];
- refbw[5] = refbw[1];
- TIFFSetField(tif,TIFFTAG_REFERENCEBLACKWHITE,refbw);
- };
- sp->cinfo.c.jpeg_color_space = JCS_YCbCr;
- if (sp->jpegcolormode == JPEGCOLORMODE_RGB)
- {
- sp->cinfo.c.raw_data_in = FALSE;
- sp->in_color_space = JCS_RGB;
- break;
- };
- goto L2;
- case PHOTOMETRIC_MINISBLACK:
- sp->cinfo.c.jpeg_color_space = JCS_GRAYSCALE;
- goto L1;
- case PHOTOMETRIC_RGB :
- sp->cinfo.c.jpeg_color_space = JCS_RGB;
- goto L1;
- case PHOTOMETRIC_SEPARATED :
- sp->cinfo.c.jpeg_color_space = JCS_CMYK;
- L1: sp->jpegcolormode = JPEGCOLORMODE_RAW; /* No JPEG Lib. conversion */
- L2: sp->cinfo.d.in_color_space = sp->cinfo.d.jpeg_color-space;
- break;
- default :
- TIFFError(module,bad_photometry,td->td_photometric);
- status = 0;
- };
- tif->tif_encoderow = tif->tif_encodestrip = tif->tif_encodetile =
- sp->cinfo.c.raw_data_in ? OJPEGEncodeRaw : OJPEGEncode;
- if (isTiled(tif))
- { tsize_t size;
-
-# ifdef C_LOSSLESS_SUPPORTED
- if ((size = sp->v_sampling*sp->cinfo.c.data_unit) < 16) size = 16;
-# else
- if ((size = sp->v_sampling*DCTSIZE) < 16) size = 16;
-# endif
- if ((segment_height = td->td_tilelength) % size)
- {
- TIFFError(module,"JPEG tile height must be multiple of %d",size);
- status = 0;
- };
-# ifdef C_LOSSLESS_SUPPORTED
- if ((size = sp->h_sampling*sp->cinfo.c.data_unit) < 16) size = 16;
-# else
- if ((size = sp->h_sampling*DCTSIZE) < 16) size = 16;
-# endif
- if ((segment_width = td->td_tilewidth) % size)
- {
- TIFFError(module,"JPEG tile width must be multiple of %d",size);
- status = 0;
- };
- sp->bytesperline = TIFFTileRowSize(tif);
- }
- else
- { tsize_t size;
-
-# ifdef C_LOSSLESS_SUPPORTED
- if ((size = sp->v_sampling*sp->cinfo.c.data_unit) < 16) size = 16;
-# else
- if ((size = sp->v_sampling*DCTSIZE) < 16) size = 16;
-# endif
- if (td->td_rowsperstrip < (segment_height = td->td_imagelength))
- {
- if (td->td_rowsperstrip % size)
- {
- TIFFError(module,"JPEG RowsPerStrip must be multiple of %d",size);
- status = 0;
- };
- segment_height = td->td_rowsperstrip;
- };
- segment_width = td->td_imagewidth;
- sp->bytesperline = tif->tif_scanlinesize;
- };
- if (segment_width > 65535 || segment_height > 65535)
- {
- TIFFError(module,"Strip/tile too large for JPEG");
- status = 0;
- };
-
- /* Initialize all JPEG parameters to default values. Note that the JPEG
- Library's "jpeg_set_defaults()" method needs legal values for the
- "in_color_space" and "input_components" fields.
- */
- sp->cinfo.c.input_components = 1; /* Default for JCS_UNKNOWN */
- if (!CALLVJPEG(sp,jpeg_set_defaults(&sp->cinfo.c))) status = 0;
- switch (sp->jpegtablesmode & (JPEGTABLESMODE_HUFF|JPEGTABLESMODE_QUANT))
- { register JHUFF_TBL *htbl;
- register JQUANT_TBL *qtbl;
-
- case 0 :
- sp->cinfo.c.optimize_coding = TRUE;
- case JPEGTABLESMODE_HUFF :
- if (!CALLVJPEG(sp,jpeg_set_quality(&sp->cinfo.c,sp->jpegquality,FALSE)))
- return 0;
- if (qtbl = sp->cinfo.c.quant_tbl_ptrs[0]) qtbl->sent_table = FALSE;
- if (qtbl = sp->cinfo.c.quant_tbl_ptrs[1]) qtbl->sent_table = FALSE;
- goto L3;
- case JPEGTABLESMODE_QUANT :
- sp->cinfo.c.optimize_coding = TRUE;
-
- /* We do not support application-supplied JPEG tables, so mark the field
- "not present".
- */
- L3: TIFFClrFieldBit(tif,FIELD_JPEGTABLES);
- break;
- case JPEGTABLESMODE_HUFF|JPEGTABLESMODE_QUANT:
- if ( !CALLVJPEG(sp,jpeg_set_quality(&sp->cinfo.c,sp->jpegquality,FALSE))
- || !CALLVJPEG(sp,jpeg_suppress_tables(&sp->cinfo.c,TRUE))
- )
- {
- status = 0;
- break;
- };
- if (qtbl = sp->cinfo.c.quant_tbl_ptrs[0]) qtbl->sent_table = FALSE;
- if (htbl = sp->cinfo.c.dc_huff_tbl_ptrs[0]) htbl->sent_table = FALSE;
- if (htbl = sp->cinfo.c.ac_huff_tbl_ptrs[0]) htbl->sent_table = FALSE;
- if (sp->cinfo.c.jpeg_color_space == JCS_YCbCr)
- {
- if (qtbl = sp->cinfo.c.quant_tbl_ptrs[1])
- qtbl->sent_table = FALSE;
- if (htbl = sp->cinfo.c.dc_huff_tbl_ptrs[1])
- htbl->sent_table = FALSE;
- if (htbl = sp->cinfo.c.ac_huff_tbl_ptrs[1])
- htbl->sent_table = FALSE;
- };
- if ( TIFFojpeg_tables_dest(sp,tif)
- && CALLVJPEG(sp,jpeg_write_tables(&sp->cinfo.c))
- )
- {
-
- /* Mark the field "present". We can't use "TIFFSetField()" because
- "BEENWRITING" is already set!
- */
- TIFFSetFieldBit(tif,FIELD_JPEGTABLES);
- tif->tif_flags |= TIFF_DIRTYDIRECT;
- }
- else status = 0;
- };
- if ( sp->cinfo.c.raw_data_in
- && !alloc_downsampled_buffers(tif,sp->cinfo.c.comp_info,
- sp->cinfo.c.num_components)
- ) status = 0;
- if (status == 0) return 0; /* If TIFF errors, don't bother to continue */
- /* Grab parameters that are same for all strips/tiles. */
-
- sp->dest.init_destination = std_init_destination;
- sp->dest.empty_output_buffer = std_empty_output_buffer;
- sp->dest.term_destination = std_term_destination;
- sp->cinfo.c.dest = &sp->dest;
- sp->cinfo.c.data_precision = td->td_bitspersample;
- sp->cinfo.c.write_JFIF_header = /* Don't write extraneous markers */
- sp->cinfo.c.write_Adobe_marker = FALSE;
- sp->cinfo.c.image_width = segment_width;
- sp->cinfo.c.image_height = segment_height;
- sp->cinfo.c.comp_info[0].h_samp_factor =
- sp->cinfo.c.comp_info[0].v_samp_factor = 1;
- return CALLVJPEG(sp,jpeg_start_compress(&sp->cinfo.c,FALSE));
-# undef td
- }
+OJPEGReadHeaderInfoSecStreamDri(TIFF* tif)
+{
+ /* this could easilly cause trouble in some cases... but no such cases have occured sofar */
+ static const char module[]="OJPEGReadHeaderInfoSecStreamDri";
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint16 m;
+ if (OJPEGReadWord(sp,&m)==0)
+ return(0);
+ if (m!=4)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt DRI marker in JPEG data");
+ return(0);
+ }
+ if (OJPEGReadWord(sp,&m)==0)
+ return(0);
+ sp->restart_interval=m;
+ return(1);
+}
static int
-OJPEGPreEncode(register TIFF *tif,tsample_t s)
- { register OJPEGState *sp = OJState(tif);
-# define td (&tif->tif_dir)
-
- /* If we are about to write the first row of an image plane, which should
- coincide with a JPEG "scan", reset the JPEG Library's compressor. Otherwise
- let the compressor run "as is" and return a "success" status without further
- ado.
- */
- if ( (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip)
- % td->td_stripsperimage
- == 0
- )
- {
- if ( (sp->cinfo.c.comp_info[0].component_id = s) == 1)
- && sp->cinfo.c.jpeg_color_space == JCS_YCbCr
- )
- {
- sp->cinfo.c.comp_info[0].quant_tbl_no =
- sp->cinfo.c.comp_info[0].dc_tbl_no =
- sp->cinfo.c.comp_info[0].ac_tbl_no = 1;
- sp->cinfo.c.comp_info[0].h_samp_factor = sp->h_sampling;
- sp->cinfo.c.comp_info[0].v_samp_factor = sp->v_sampling;
-
- /* Scale expected strip/tile size to match a downsampled component. */
-
- sp->cinfo.c.image_width = TIFFhowmany(segment_width,sp->h_sampling);
- sp->cinfo.c.image_height=TIFFhowmany(segment_height,sp->v_sampling);
- };
- sp->scancount = 0; /* Mark subsampling buffer(s) empty */
- };
- return 1;
-# undef td
- }
+OJPEGReadHeaderInfoSecStreamDqt(TIFF* tif)
+{
+ /* this is a table marker, and it is to be saved as a whole for exact pushing on the jpeg stream later on */
+ static const char module[]="OJPEGReadHeaderInfoSecStreamDqt";
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint16 m;
+ uint32 na;
+ uint8* nb;
+ uint8 o;
+ if (OJPEGReadWord(sp,&m)==0)
+ return(0);
+ if (m<=2)
+ {
+ if (sp->subsamplingcorrect==0)
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt DQT marker in JPEG data");
+ return(0);
+ }
+ if (sp->subsamplingcorrect!=0)
+ OJPEGReadSkip(sp,m-2);
+ else
+ {
+ m-=2;
+ do
+ {
+ if (m<65)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt DQT marker in JPEG data");
+ return(0);
+ }
+ na=sizeof(uint32)+69;
+ nb=_TIFFmalloc(na);
+ if (nb==0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Out of memory");
+ return(0);
+ }
+ *(uint32*)nb=na;
+ nb[sizeof(uint32)]=255;
+ nb[sizeof(uint32)+1]=JPEG_MARKER_DQT;
+ nb[sizeof(uint32)+2]=0;
+ nb[sizeof(uint32)+3]=67;
+ if (OJPEGReadBlock(sp,65,&nb[sizeof(uint32)+4])==0)
+ return(0);
+ o=nb[sizeof(uint32)+4]&15;
+ if (3<o)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt DQT marker in JPEG data");
+ return(0);
+ }
+ if (sp->qtable[o]!=0)
+ _TIFFfree(sp->qtable[o]);
+ sp->qtable[o]=nb;
+ m-=65;
+ } while(m>0);
+ }
+ return(1);
+}
static int
-OJPEGPostEncode(register TIFF *tif)
- { register OJPEGState *sp = OJState(tif);
-
- /* Finish up at the end of a strip or tile. */
-
- if (sp->scancount > 0) /* emit partial buffer of down-sampled data */
- { JDIMENSION n;
-
-# ifdef C_LOSSLESS_SUPPORTED
- if ( sp->scancount < sp->cinfo.c.data_unit
- && sp->cinfo.c.num_components > 0
- )
-# else
- if (sp->scancount < DCTSIZE && sp->cinfo.c.num_components > 0)
-# endif
- { int ci = 0, /* Pad the data vertically */
-# ifdef C_LOSSLESS_SUPPORTED
- size = sp->cinfo.c.data_unit;
-# else
- size = DCTSIZE;
-# endif
- register jpeg_component_info *compptr = sp->cinfo.c.comp_info;
-
- do
-# ifdef C_LOSSLESS_SUPPORTED
- { tsize_t row_width = compptr->width_in_data_units
-# else
- tsize_t row_width = compptr->width_in_blocks
-# endif
- *size*sizeof(JSAMPLE);
- int ypos = sp->scancount*compptr->v_samp_factor;
-
- do _TIFFmemcpy( (tdata_t)sp->ds_buffer[ci][ypos]
- , (tdata_t)sp->ds_buffer[ci][ypos-1]
- , row_width
- );
- while (++ypos < compptr->v_samp_factor*size);
- }
- while (++compptr,++ci < sp->cinfo.c.num_components);
- };
- n = sp->cinfo.c.max_v_samp_factor*size;
- if (CALLJPEG(sp,-1,jpeg_write_raw_data(&sp->cinfo.c,sp->ds_buffer,n)) != n)
- return 0;
- };
- return CALLVJPEG(sp,jpeg_finish_compress(&sp->cinfo.c));
- }
-#endif /* never */
-
-/* JPEG Decoding begins here. */
-
-/*ARGSUSED*/ static int
-OJPEGDecode(register TIFF *tif,tidata_t buf,tsize_t cc,tsample_t s)
- { tsize_t bytesperline = isTiled(tif)
- ? TIFFTileRowSize(tif)
- : tif->tif_scanlinesize,
- rows; /* No. of unprocessed rows in file */
- register OJPEGState *sp = OJState(tif);
-
- /* Decode a chunk of pixels, where the input data has not NOT been down-
- sampled, or else the TIFF Library's client has used the "JPEGColorMode" TIFF
- pseudo-tag to request that the JPEG Library do color-space conversion; this
- is the normal case. The data is expected to be read in scan-line multiples,
- and this subroutine is called for both pixel-interleaved and separate color
- planes.
-
- WARNING: Unlike "OJPEGDecodeRawContig()", below, the no. of Bytes in each
- decoded row is calculated here as "bytesperline" instead of
- using "sp->bytesperline", which might be a little smaller. This can
- occur for an old tiled image whose width isn't a multiple of 8 pixels.
- That's illegal according to the TIFF Version 6 specification, but some
- test files, like "zackthecat.tif", were built that way. In those cases,
- we want to embed the image's true width in our caller's buffer (which is
- presumably allocated according to the expected tile width) by
- effectively "padding" it with unused Bytes at the end of each row.
- */
- if ( (cc /= bytesperline) /* No. of complete rows in caller's buffer */
- > (rows = sp->cinfo.d.output_height - sp->cinfo.d.output_scanline)
- ) cc = rows;
- while (--cc >= 0)
- {
- if ( CALLJPEG(sp,-1,jpeg_read_scanlines(&sp->cinfo.d,(JSAMPARRAY)&buf,1))
- != 1
- ) return 0;
- buf += bytesperline;
- ++tif->tif_row;
- };
-
- /* BEWARE OF KLUDGE: If our input file was produced by Microsoft's Wang
- Imaging for Windows application, the DC coefficients of
- each JPEG image component (Y,Cb,Cr) must be reset at the end of each TIFF
- "strip", and any JPEG data bits remaining in the current Byte of the
- decoder's input buffer must be discarded. To do so, we create an "ad hoc"
- interface in the "jdhuff.c" module of IJG JPEG Library Version 6 (module
- "jdshuff.c", if Ken Murchison's lossless-Huffman patch is applied), and we
- invoke that interface here after decoding each "strip".
- */
- if (sp->is_WANG) jpeg_reset_huff_decode(&sp->cinfo.d);
- return 1;
- }
-
-/*ARGSUSED*/ static int
-OJPEGDecodeRawContig(register TIFF *tif,tidata_t buf,tsize_t cc,tsample_t s)
- { tsize_t rows; /* No. of unprocessed rows in file */
- JDIMENSION lines_per_MCU, size;
- register OJPEGState *sp = OJState(tif);
-
- /* Decode a chunk of pixels, where the input data has pixel-interleaved color
- planes, some of which have been down-sampled, but the TIFF Library's client
- has NOT used the "JPEGColorMode" TIFF pseudo-tag to request that the JPEG
- Library do color-space conversion. In other words, we must up-sample/
- expand/duplicate image components according to the image's sampling factors,
- without changing its color space. The data is expected to be read in scan-
- line multiples.
- */
- if ( (cc /= sp->bytesperline) /* No. of complete rows in caller's buffer */
- > (rows = sp->cinfo.d.output_height - sp->cinfo.d.output_scanline)
- ) cc = rows;
- lines_per_MCU = sp->cinfo.d.max_v_samp_factor
-# ifdef D_LOSSLESS_SUPPORTED
- * (size = sp->cinfo.d.min_codec_data_unit);
-# else
- * (size = DCTSIZE);
-# endif
- while (--cc >= 0)
- { int clumpoffset, ci;
- register jpeg_component_info *compptr;
-
- if (sp->scancount >= size) /* reload downsampled-data buffers */
- {
- if ( CALLJPEG(sp,-1,jpeg_read_raw_data(&sp->cinfo.d,sp->ds_buffer,lines_per_MCU))
- != lines_per_MCU
- ) return 0;
- sp->scancount = 0;
- };
-
- /* The fastest way to separate the data is: make 1 pass over the scan
- line for each row of each component.
- */
- clumpoffset = ci = 0;
- compptr = sp->cinfo.d.comp_info;
- do
- { int ypos = 0;
-
- if (compptr->h_samp_factor == 1) /* fast path */
- do
- { register JSAMPLE *inptr =
- sp->ds_buffer[ci][sp->scancount*compptr->v_samp_factor+ypos],
- *outptr = (JSAMPLE *)buf + clumpoffset;
- register int clumps_per_line = compptr->downsampled_width;
-
- do *outptr = *inptr++;
- while ((outptr += sp->samplesperclump),--clumps_per_line > 0);
- }
- while ( (clumpoffset += compptr->h_samp_factor)
- , ++ypos < compptr->v_samp_factor
- );
- else /* general case */
- do
- { register JSAMPLE *inptr =
- sp->ds_buffer[ci][sp->scancount*compptr->v_samp_factor+ypos],
- *outptr = (JSAMPLE *)buf + clumpoffset;
- register int clumps_per_line = compptr->downsampled_width;
-
- do
- { register int xpos = 0;
-
- do outptr[xpos] = *inptr++;
- while (++xpos < compptr->h_samp_factor);
- }
- while ((outptr += sp->samplesperclump),--clumps_per_line > 0);
- }
- while ( (clumpoffset += compptr->h_samp_factor)
- , ++ypos < compptr->v_samp_factor
- );
- }
- while (++compptr,++ci < sp->cinfo.d.num_components);
- ++sp->scancount;
- buf += sp->bytesperline;
- ++tif->tif_row;
- };
-
- /* BEWARE OF KLUDGE: If our input file was produced by Microsoft's Wang
- Imaging for Windows application, the DC coefficients of
- each JPEG image component (Y,Cb,Cr) must be reset at the end of each TIFF
- "strip", and any JPEG data bits remaining in the current Byte of the
- decoder's input buffer must be discarded. To do so, we create an "ad hoc"
- interface in the "jdhuff.c" module of IJG JPEG Library Version 6 (module
- "jdshuff.c", if Ken Murchison's lossless-Huffman patch is applied), and we
- invoke that interface here after decoding each "strip".
- */
- if (sp->is_WANG) jpeg_reset_huff_decode(&sp->cinfo.d);
- return 1;
- }
-
-/*ARGSUSED*/ static int
-OJPEGDecodeRawSeparate(TIFF *tif,register tidata_t buf,tsize_t cc,tsample_t s)
- { tsize_t rows; /* No. of unprocessed rows in file */
- JDIMENSION lines_per_MCU,
- size, /* ...of MCU */
- v; /* Component's vertical up-sampling ratio */
- register OJPEGState *sp = OJState(tif);
- register jpeg_component_info *compptr = sp->cinfo.d.comp_info + s;
-
- /* Decode a chunk of pixels, where the input data has separate color planes,
- some of which have been down-sampled, but the TIFF Library's client has NOT
- used the "JPEGColorMode" TIFF pseudo-tag to request that the JPEG Library
- do color-space conversion. The data is expected to be read in scan-line
- multiples.
- */
- v = sp->cinfo.d.max_v_samp_factor/compptr->v_samp_factor;
- if ( (cc /= compptr->downsampled_width) /* No. of rows in caller's buffer */
- > (rows = (sp->cinfo.d.output_height-sp->cinfo.d.output_scanline+v-1)/v)
- ) cc = rows; /* No. of rows of "clumps" to read */
- lines_per_MCU = sp->cinfo.d.max_v_samp_factor
-# ifdef D_LOSSLESS_SUPPORTED
- * (size = sp->cinfo.d.min_codec_data_unit);
-# else
- * (size = DCTSIZE);
-# endif
- L: if (sp->scancount >= size) /* reload downsampled-data buffers */
- {
- if ( CALLJPEG(sp,-1,jpeg_read_raw_data(&sp->cinfo.d,sp->ds_buffer,lines_per_MCU))
- != lines_per_MCU
- ) return 0;
- sp->scancount = 0;
- };
- rows = 0;
- do
- { register JSAMPLE *inptr =
- sp->ds_buffer[s][sp->scancount*compptr->v_samp_factor + rows];
- register int clumps_per_line = compptr->downsampled_width;
-
- do *buf++ = *inptr++; while (--clumps_per_line > 0); /* Copy scanline */
- tif->tif_row += v;
- if (--cc <= 0) return 1; /* End of caller's buffer? */
- }
- while (++rows < compptr->v_samp_factor);
- ++sp->scancount;
- goto L;
- }
-
-/* "OJPEGSetupDecode()" temporarily forces the JPEG Library to use the following
- subroutine as a "dummy" input reader in order to fool the library into
- thinking that it has read the image's first "Start of Scan" (SOS) marker, so
- that it initializes accordingly.
-*/
-/*ARGSUSED*/ METHODDEF(int)
-fake_SOS_marker(j_decompress_ptr cinfo){return JPEG_REACHED_SOS;}
-
-/*ARGSUSED*/ METHODDEF(int)
-suspend(j_decompress_ptr cinfo){return JPEG_SUSPENDED;}
-
-/* The JPEG Library's "null" color-space converter actually re-packs separate
- color planes (it's native image representation) into a pixel-interleaved,
- contiguous plane. But if our TIFF Library client is tryng to process a
- PLANARCONFIG_SEPARATE image, we don't want that; so here are modifications of
- code in the JPEG Library's "jdcolor.c" file, which simply copy Bytes to a
- color plane specified by the current JPEG "scan".
-*/
-METHODDEF(void)
-ycc_rgb_convert(register j_decompress_ptr cinfo,JSAMPIMAGE in,JDIMENSION row,
- register JSAMPARRAY out,register int nrows)
- { typedef struct /* "jdcolor.c" color-space conversion state */
- {
-
- /* WARNING: This declaration is ugly and dangerous! It's supposed to be
- private to the JPEG Library's "jdcolor.c" module, but we also
- need it here. Since the library's copy might change without notice, be
- sure to keep this one synchronized or the following code will break!
- */
- struct jpeg_color_deconverter pub; /* Public fields */
- /* Private state for YCC->RGB conversion */
- int *Cr_r_tab, /* ->Cr to R conversion table */
- *Cb_b_tab; /* ->Cb to B conversion table */
- INT32 *Cr_g_tab, /* ->Cr to G conversion table */
- *Cb_g_tab; /* ->Cb to G conversion table */
- } *my_cconvert_ptr;
- my_cconvert_ptr cconvert = (my_cconvert_ptr)cinfo->cconvert;
- JSAMPARRAY irow0p = in[0] + row;
- register JSAMPLE *range_limit = cinfo->sample_range_limit;
- register JSAMPROW outp, Y;
-
- switch (cinfo->output_scan_number - 1)
- { JSAMPARRAY irow1p, irow2p;
- register INT32 *table0, *table1;
- SHIFT_TEMPS
-
- case RGB_RED : irow2p = in[2] + row;
- table0 = (INT32 *)cconvert->Cr_r_tab;
- while (--nrows >= 0)
- { register JSAMPROW Cr = *irow2p++;
- register int i = cinfo->output_width;
-
- Y = *irow0p++;
- outp = *out++;
- while (--i >= 0)
- *outp++ = range_limit[*Y++ + table0[*Cr++]];
- };
- return;
- case RGB_GREEN: irow1p = in[1] + row;
- irow2p = in[2] + row;
- table0 = cconvert->Cb_g_tab;
- table1 = cconvert->Cr_g_tab;
- while (--nrows >= 0)
- { register JSAMPROW Cb = *irow1p++,
- Cr = *irow2p++;
- register int i = cinfo->output_width;
-
- Y = *irow0p++;
- outp = *out++;
- while (--i >= 0)
- *outp++ =
- range_limit[ *Y++
- + RIGHT_SHIFT(table0[*Cb++]+table1[*Cr++],16)
- ];
- };
- return;
- case RGB_BLUE : irow1p = in[1] + row;
- table0 = (INT32 *)cconvert->Cb_b_tab;
- while (--nrows >= 0)
- { register JSAMPROW Cb = *irow1p++;
- register int i = cinfo->output_width;
-
- Y = *irow0p++;
- outp = *out++;
- while (--i >= 0)
- *outp++ = range_limit[*Y++ + table0[*Cb++]];
- }
- }
- }
-
-METHODDEF(void)
-null_convert(register j_decompress_ptr cinfo,JSAMPIMAGE in,JDIMENSION row,
- register JSAMPARRAY out,register int nrows)
- { register JSAMPARRAY irowp = in[cinfo->output_scan_number - 1] + row;
-
- while (--nrows >= 0) _TIFFmemcpy(*out++,*irowp++,cinfo->output_width);
- }
+OJPEGReadHeaderInfoSecStreamDht(TIFF* tif)
+{
+ /* this is a table marker, and it is to be saved as a whole for exact pushing on the jpeg stream later on */
+ /* TODO: the following assumes there is only one table in this marker... but i'm not quite sure that assumption is guaranteed correct */
+ static const char module[]="OJPEGReadHeaderInfoSecStreamDht";
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint16 m;
+ uint32 na;
+ uint8* nb;
+ uint8 o;
+ if (OJPEGReadWord(sp,&m)==0)
+ return(0);
+ if (m<=2)
+ {
+ if (sp->subsamplingcorrect==0)
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt DHT marker in JPEG data");
+ return(0);
+ }
+ if (sp->subsamplingcorrect!=0)
+ {
+ OJPEGReadSkip(sp,m-2);
+ }
+ else
+ {
+ na=sizeof(uint32)+2+m;
+ nb=_TIFFmalloc(na);
+ if (nb==0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Out of memory");
+ return(0);
+ }
+ *(uint32*)nb=na;
+ nb[sizeof(uint32)]=255;
+ nb[sizeof(uint32)+1]=JPEG_MARKER_DHT;
+ nb[sizeof(uint32)+2]=(m>>8);
+ nb[sizeof(uint32)+3]=(m&255);
+ if (OJPEGReadBlock(sp,m-2,&nb[sizeof(uint32)+4])==0)
+ return(0);
+ o=nb[sizeof(uint32)+4];
+ if ((o&240)==0)
+ {
+ if (3<o)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt DHT marker in JPEG data");
+ return(0);
+ }
+ if (sp->dctable[o]!=0)
+ _TIFFfree(sp->dctable[o]);
+ sp->dctable[o]=nb;
+ }
+ else
+ {
+ if ((o&240)!=16)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt DHT marker in JPEG data");
+ return(0);
+ }
+ o&=15;
+ if (3<o)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt DHT marker in JPEG data");
+ return(0);
+ }
+ if (sp->actable[o]!=0)
+ _TIFFfree(sp->actable[o]);
+ sp->actable[o]=nb;
+ }
+ }
+ return(1);
+}
static int
-OJPEGSetupDecode(register TIFF *tif)
- { static char module[]={"OJPEGSetupDecode"};
- J_COLOR_SPACE jpeg_color_space, /* Color space of JPEG-compressed image */
- out_color_space; /* Color space of decompressed image */
- uint32 segment_width;
- int status = 1; /* Assume success by default */
- boolean downsampled_output=FALSE, /* <=> Want JPEG Library's "raw" image? */
- is_JFIF; /* <=> JFIF image? */
- register OJPEGState *sp = OJState(tif);
-# define td (&tif->tif_dir)
-
- /* Verify miscellaneous parameters. This will need work if the TIFF Library
- ever supports different depths for different components, or if the JPEG
- Library ever supports run-time depth selection. Neither seems imminent.
- */
- if (td->td_bitspersample != sp->cinfo.d.data_precision)
- {
- TIFFError(module,bad_bps,td->td_bitspersample);
- status = 0;
- };
-
- /* The TIFF Version 6.0 specification and IJG JPEG Library accept different
- sets of color spaces, so verify that our image belongs to the common subset
- and map its photometry code, then initialize to handle subsampling and
- optional JPEG Library YCbCr <-> RGB color-space conversion.
- */
- switch (td->td_photometric)
- {
- case PHOTOMETRIC_YCBCR :
-
- /* ISO IS 10918-1 requires that JPEG subsampling factors be 1-4, but
- TIFF Version 6.0 is more restrictive: only 1, 2, and 4 are allowed.
- */
- if ( ( td->td_ycbcrsubsampling[0] == 1
- || td->td_ycbcrsubsampling[0] == 2
- || td->td_ycbcrsubsampling[0] == 4
- )
- && ( td->td_ycbcrsubsampling[1] == 1
- || td->td_ycbcrsubsampling[1] == 2
- || td->td_ycbcrsubsampling[1] == 4
- )
- )
- downsampled_output =
- (
- (sp->h_sampling = td->td_ycbcrsubsampling[0]) << 3
- | (sp->v_sampling = td->td_ycbcrsubsampling[1])
- ) != 011;
- else
- {
- TIFFError(module,bad_subsampling);
- status = 0;
- };
- jpeg_color_space = JCS_YCbCr;
- if (sp->jpegcolormode == JPEGCOLORMODE_RGB)
- {
- downsampled_output = FALSE;
- out_color_space = JCS_RGB;
- break;
- };
- goto L2;
- case PHOTOMETRIC_MINISBLACK:
- jpeg_color_space = JCS_GRAYSCALE;
- goto L1;
- case PHOTOMETRIC_RGB :
- jpeg_color_space = JCS_RGB;
- goto L1;
- case PHOTOMETRIC_SEPARATED :
- jpeg_color_space = JCS_CMYK;
- L1: sp->jpegcolormode = JPEGCOLORMODE_RAW; /* No JPEG Lib. conversion */
- L2: out_color_space = jpeg_color_space;
- break;
- default :
- TIFFError(module,bad_photometry,td->td_photometric);
- status = 0;
- };
- if (status == 0) return 0; /* If TIFF errors, don't bother to continue */
-
- /* Set parameters that are same for all strips/tiles. */
-
- sp->cinfo.d.src = &sp->src;
- sp->src.init_source = std_init_source;
- sp->src.fill_input_buffer = std_fill_input_buffer;
- sp->src.skip_input_data = std_skip_input_data;
- sp->src.resync_to_restart = jpeg_resync_to_restart;
- sp->src.term_source = std_term_source;
-
- /* BOGOSITY ALERT! The Wang Imaging application for Microsoft Windows produces
- images containing "JPEGInterchangeFormat[Length]" TIFF
- records that resemble JFIF-in-TIFF encapsulations but, in fact, violate the
- TIFF Version 6 specification in several ways; nevertheless, we try to handle
- them gracefully because there are apparently a lot of them around. The
- purported "JFIF" data stream in one of these files vaguely resembles a JPEG
- "tables only" data stream, except that there's no trailing EOI marker. The
- rest of the JPEG data stream lies in a discontiguous file region, identified
- by the 0th Strip offset (which is *also* illegal!), where it begins with an
- SOS marker and apparently continues to the end of the file. There is no
- trailing EOI marker here, either.
- */
- is_JFIF = !sp->is_WANG && TIFFFieldSet(tif,FIELD_JPEGIFOFFSET);
+OJPEGReadHeaderInfoSecStreamSof(TIFF* tif, uint8 marker_id)
+{
+ /* this marker needs to be checked, and part of its data needs to be saved for regeneration later on */
+ static const char module[]="OJPEGReadHeaderInfoSecStreamSof";
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint16 m;
+ uint16 n;
+ uint8 o;
+ uint16 p;
+ uint16 q;
+ if (sp->sof_log!=0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt JPEG data");
+ return(0);
+ }
+ if (sp->subsamplingcorrect==0)
+ sp->sof_marker_id=marker_id;
+ /* Lf: data length */
+ if (OJPEGReadWord(sp,&m)==0)
+ return(0);
+ if (m<11)
+ {
+ if (sp->subsamplingcorrect==0)
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt SOF marker in JPEG data");
+ return(0);
+ }
+ m-=8;
+ if (m%3!=0)
+ {
+ if (sp->subsamplingcorrect==0)
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt SOF marker in JPEG data");
+ return(0);
+ }
+ n=m/3;
+ if (sp->subsamplingcorrect==0)
+ {
+ if (n!=sp->samples_per_pixel)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"JPEG compressed data indicates unexpected number of samples");
+ return(0);
+ }
+ }
+ /* P: Sample precision */
+ if (OJPEGReadByte(sp,&o)==0)
+ return(0);
+ if (o!=8)
+ {
+ if (sp->subsamplingcorrect==0)
+ TIFFErrorExt(tif->tif_clientdata,module,"JPEG compressed data indicates unexpected number of bits per sample");
+ return(0);
+ }
+ /* Y: Number of lines, X: Number of samples per line */
+ if (sp->subsamplingcorrect)
+ OJPEGReadSkip(sp,4);
+ else
+ {
+ /* TODO: probably best to also add check on allowed upper bound, especially x, may cause buffer overflow otherwise i think */
+ /* Y: Number of lines */
+ if (OJPEGReadWord(sp,&p)==0)
+ return(0);
+ if ((p<sp->image_length) && (p<sp->strile_length_total))
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"JPEG compressed data indicates unexpected height");
+ return(0);
+ }
+ sp->sof_y=p;
+ /* X: Number of samples per line */
+ if (OJPEGReadWord(sp,&p)==0)
+ return(0);
+ if ((p<sp->image_width) && (p<sp->strile_width))
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"JPEG compressed data indicates unexpected width");
+ return(0);
+ }
+ sp->sof_x=p;
+ }
+ /* Nf: Number of image components in frame */
+ if (OJPEGReadByte(sp,&o)==0)
+ return(0);
+ if (o!=n)
+ {
+ if (sp->subsamplingcorrect==0)
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt SOF marker in JPEG data");
+ return(0);
+ }
+ /* per component stuff */
+ /* TODO: double-check that flow implies that n cannot be as big as to make us overflow sof_c, sof_hv and sof_tq arrays */
+ for (q=0; q<n; q++)
+ {
+ /* C: Component identifier */
+ if (OJPEGReadByte(sp,&o)==0)
+ return(0);
+ if (sp->subsamplingcorrect==0)
+ sp->sof_c[q]=o;
+ /* H: Horizontal sampling factor, and V: Vertical sampling factor */
+ if (OJPEGReadByte(sp,&o)==0)
+ return(0);
+ if (sp->subsamplingcorrect!=0)
+ {
+ if (q==0)
+ {
+ sp->subsampling_hor=(o>>4);
+ sp->subsampling_ver=(o&15);
+ if (((sp->subsampling_hor!=1) && (sp->subsampling_hor!=2) && (sp->subsampling_hor!=4)) ||
+ ((sp->subsampling_ver!=1) && (sp->subsampling_ver!=2) && (sp->subsampling_ver!=4)))
+ sp->subsampling_force_desubsampling_inside_decompression=1;
+ }
+ else
+ {
+ if (o!=17)
+ sp->subsampling_force_desubsampling_inside_decompression=1;
+ }
+ }
+ else
+ {
+ sp->sof_hv[q]=o;
+ if (sp->subsampling_force_desubsampling_inside_decompression==0)
+ {
+ if (q==0)
+ {
+ if (o!=((sp->subsampling_hor<<4)|sp->subsampling_ver))
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"JPEG compressed data indicates unexpected subsampling values");
+ return(0);
+ }
+ }
+ else
+ {
+ if (o!=17)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"JPEG compressed data indicates unexpected subsampling values");
+ return(0);
+ }
+ }
+ }
+ }
+ /* Tq: Quantization table destination selector */
+ if (OJPEGReadByte(sp,&o)==0)
+ return(0);
+ if (sp->subsamplingcorrect==0)
+ sp->sof_tq[q]=o;
+ }
+ if (sp->subsamplingcorrect==0)
+ sp->sof_log=1;
+ return(1);
+}
- /* Initialize decompression parameters that won't be overridden by JPEG Library
- defaults set during the "jpeg_read_header()" call, below.
- */
- segment_width = td->td_imagewidth;
- if (isTiled(tif))
- {
- if (sp->is_WANG) /* we don't know how to handle it */
- {
- TIFFError(module,"Tiled Wang image not supported");
- return 0;
- };
-
- /* BOGOSITY ALERT! "TIFFTileRowSize()" seems to work fine for modern JPEG-
- in-TIFF encapsulations where the image width--like the
- tile width--is a multiple of 8 or 16 pixels. But image widths and
- heights are aren't restricted to 8- or 16-bit multiples, and we need
- the exact Byte count of decompressed scan lines when we call the JPEG
- Library. At least one old file ("zackthecat.tif") in the TIFF Library
- test suite has widths and heights slightly less than the tile sizes, and
- it apparently used the bogus computation below to determine the number
- of Bytes per scan line (was this due to an old, broken version of
- "TIFFhowmany()"?). Before we get here, "OJPEGSetupDecode()" verified
- that our image uses 8-bit samples, so the following check appears to
- return the correct answer in all known cases tested to date.
- */
- if (is_JFIF || (segment_width & 7) == 0)
- sp->bytesperline = TIFFTileRowSize(tif); /* Normal case */
- else
- {
- /* Was the file-encoder's segment-width calculation bogus? */
- segment_width = (segment_width/sp->h_sampling + 1) * sp->h_sampling;
- sp->bytesperline = segment_width * td->td_samplesperpixel;
- }
- }
- else sp->bytesperline = TIFFVStripSize(tif,1);
-
- /* BEWARE OF KLUDGE: If we have JPEG Interchange File Format (JFIF) image,
- then we want to read "metadata" in the bit-stream's
- header and validate it against corresponding information in TIFF records.
- But if we have a *really old* JPEG file that's not JFIF, then we simply
- assign TIFF-record values to JPEG Library variables without checking.
- */
- if (is_JFIF) /* JFIF image */
- { unsigned char *end_of_data;
- int subsampling_factors;
- register unsigned char *p;
- register int i;
-
- /* WARNING: Although the image file contains a JFIF bit stream, it might
- also contain some old TIFF records causing "OJPEGVSetField()"
- to have allocated quantization or Huffman decoding tables. But when the
- JPEG Library reads and parses the JFIF header below, it reallocate these
- tables anew without checking for "dangling" pointers, thereby causing a
- memory "leak". We have enough information to potentially deallocate the
- old tables here, but unfortunately JPEG Library Version 6B uses a "pool"
- allocator for small objects, with no deallocation procedure; instead, it
- reclaims a whole pool when an image is closed/destroyed, so well-behaved
- TIFF client applications (i.e., those which close their JPEG images as
- soon as they're no longer needed) will waste memory for a short time but
- recover it eventually. But ill-behaved TIFF clients (i.e., those which
- keep many JPEG images open gratuitously) can exhaust memory prematurely.
- If the JPEG Library ever implements a deallocation procedure, insert
- this clean-up code:
- */
-# ifdef someday
- if (sp->jpegtablesmode & JPEGTABLESMODE_QUANT) /* free quant. tables */
- { register int i = 0;
-
- do
- { register JQUANT_TBL *q;
-
- if (q = sp->cinfo.d.quant_tbl_ptrs[i])
- {
- jpeg_free_small(&sp->cinfo.comm,q,sizeof *q);
- sp->cinfo.d.quant_tbl_ptrs[i] = 0;
- }
- }
- while (++i < NUM_QUANT_TBLS);
- };
- if (sp->jpegtablesmode & JPEGTABLESMODE_HUFF) /* free Huffman tables */
- { register int i = 0;
-
- do
- { register JHUFF_TBL *h;
-
- if (h = sp->cinfo.d.dc_huff_tbl_ptrs[i])
- {
- jpeg_free_small(&sp->cinfo.comm,h,sizeof *h);
- sp->cinfo.d.dc_huff_tbl_ptrs[i] = 0;
- };
- if (h = sp->cinfo.d.ac_huff_tbl_ptrs[i])
- {
- jpeg_free_small(&sp->cinfo.comm,h,sizeof *h);
- sp->cinfo.d.ac_huff_tbl_ptrs[i] = 0;
- }
- }
- while (++i < NUM_HUFF_TBLS);
- };
-# endif /* someday */
-
- /* Since we might someday wish to try rewriting "old format" JPEG-in-TIFF
- encapsulations in "new format" files, try to synthesize the value of a
- modern "JPEGTables" TIFF record by scanning the JPEG data from just past
- the "Start of Information" (SOI) marker until something other than a
- legitimate "table" marker is found, as defined in ISO IS 10918-1
- Appending B.2.4; namely:
-
- -- Define Quantization Table (DQT)
- -- Define Huffman Table (DHT)
- -- Define Arithmetic Coding table (DAC)
- -- Define Restart Interval (DRI)
- -- Comment (COM)
- -- Application data (APPn)
-
- For convenience, we also accept "Expansion" (EXP) markers, although they
- are apparently not a part of normal "table" data.
- */
- sp->jpegtables = p = (unsigned char *)sp->src.next_input_byte;
- end_of_data = p + sp->src.bytes_in_buffer;
- p += 2;
- while (p < end_of_data && p[0] == 0xFF)
- switch (p[1])
- {
- default : goto L;
- case 0xC0: /* SOF0 */
- case 0xC1: /* SOF1 */
- case 0xC2: /* SOF2 */
- case 0xC3: /* SOF3 */
- case 0xC4: /* DHT */
- case 0xC5: /* SOF5 */
- case 0xC6: /* SOF6 */
- case 0xC7: /* SOF7 */
- case 0xC9: /* SOF9 */
- case 0xCA: /* SOF10 */
- case 0xCB: /* SOF11 */
- case 0xCC: /* DAC */
- case 0xCD: /* SOF13 */
- case 0xCE: /* SOF14 */
- case 0xCF: /* SOF15 */
- case 0xDB: /* DQT */
- case 0xDD: /* DRI */
- case 0xDF: /* EXP */
- case 0xE0: /* APP0 */
- case 0xE1: /* APP1 */
- case 0xE2: /* APP2 */
- case 0xE3: /* APP3 */
- case 0xE4: /* APP4 */
- case 0xE5: /* APP5 */
- case 0xE6: /* APP6 */
- case 0xE7: /* APP7 */
- case 0xE8: /* APP8 */
- case 0xE9: /* APP9 */
- case 0xEA: /* APP10 */
- case 0xEB: /* APP11 */
- case 0xEC: /* APP12 */
- case 0xED: /* APP13 */
- case 0xEE: /* APP14 */
- case 0xEF: /* APP15 */
- case 0xFE: /* COM */
- p += (p[2] << 8 | p[3]) + 2;
- };
- L: if (p - (unsigned char *)sp->jpegtables > 2) /* fake "JPEGTables" */
- {
-
- /* In case our client application asks, pretend that this image file
- contains a modern "JPEGTables" TIFF record by copying to a buffer
- the initial part of the JFIF bit-stream that we just scanned, from
- the SOI marker through the "metadata" tables, then append an EOI
- marker and flag the "JPEGTables" TIFF record as "present".
- */
- sp->jpegtables_length = p - (unsigned char*)sp->jpegtables + 2;
- p = sp->jpegtables;
- if (!(sp->jpegtables = _TIFFmalloc(sp->jpegtables_length)))
- {
- TIFFError(module,no_jtable_space);
- return 0;
- };
- _TIFFmemcpy(sp->jpegtables,p,sp->jpegtables_length-2);
- p = (unsigned char *)sp->jpegtables + sp->jpegtables_length;
- p[-2] = 0xFF; p[-1] = JPEG_EOI; /* Append EOI marker */
- TIFFSetFieldBit(tif,FIELD_JPEGTABLES);
- tif->tif_flags |= TIFF_DIRTYDIRECT;
- }
- else sp->jpegtables = 0; /* Don't simulate "JPEGTables" */
- if ( CALLJPEG(sp,-1,jpeg_read_header(&sp->cinfo.d,TRUE))
- != JPEG_HEADER_OK
- ) return 0;
- if ( sp->cinfo.d.image_width != segment_width
- || sp->cinfo.d.image_height != td->td_imagelength
- )
- {
- TIFFError(module,"Improper JPEG strip/tile size");
- return 0;
- };
- if (sp->cinfo.d.num_components != td->td_samplesperpixel)
- {
- TIFFError(module,"Improper JPEG component count");
- return 0;
- };
- if (sp->cinfo.d.data_precision != td->td_bitspersample)
- {
- TIFFError(module,"Improper JPEG data precision");
- return 0;
- };
-
- /* Check that JPEG image components all have the same subsampling factors
- declared (or defaulted) in the TIFF file, since TIFF Version 6.0 is more
- restrictive than JPEG: Only the 0th component may have horizontal and
- vertical subsampling factors other than <1,1>.
- */
- subsampling_factors = sp->h_sampling << 3 | sp->v_sampling;
- i = 0;
- do
- {
- if ( ( sp->cinfo.d.comp_info[i].h_samp_factor << 3
- | sp->cinfo.d.comp_info[i].v_samp_factor
- )
- != subsampling_factors
- )
- {
- TIFFError(module,"Improper JPEG subsampling factors");
- return 0;
- };
- subsampling_factors = 011; /* Required for image components > 0 */
- }
- while (++i < sp->cinfo.d.num_components);
- }
- else /* not JFIF image */
- { int (*save)(j_decompress_ptr cinfo) = sp->cinfo.d.marker->read_markers;
- register int i;
-
- /* We're not assuming that this file's JPEG bit stream has any header
- "metadata", so fool the JPEG Library into thinking that we read a
- "Start of Input" (SOI) marker and a "Start of Frame" (SOFx) marker, then
- force it to read a simulated "Start of Scan" (SOS) marker when we call
- "jpeg_read_header()" below. This should cause the JPEG Library to
- establish reasonable defaults.
- */
- sp->cinfo.d.marker->saw_SOI = /* Pretend we saw SOI marker */
- sp->cinfo.d.marker->saw_SOF = TRUE; /* Pretend we saw SOF marker */
- sp->cinfo.d.marker->read_markers =
- sp->is_WANG ? suspend : fake_SOS_marker;
- sp->cinfo.d.global_state = DSTATE_INHEADER;
- sp->cinfo.d.Se = DCTSIZE2-1; /* Suppress JPEG Library warning */
- sp->cinfo.d.image_width = segment_width;
- sp->cinfo.d.image_height = td->td_imagelength;
-
- /* The following color-space initialization, including the complicated
- "switch"-statement below, essentially duplicates the logic used by the
- JPEG Library's "jpeg_init_colorspace()" subroutine during compression.
- */
- sp->cinfo.d.num_components = td->td_samplesperpixel;
- sp->cinfo.d.comp_info = (jpeg_component_info *)
- (*sp->cinfo.d.mem->alloc_small)
- ( &sp->cinfo.comm
- , JPOOL_IMAGE
- , sp->cinfo.d.num_components * sizeof *sp->cinfo.d.comp_info
- );
- i = 0;
- do
- {
- sp->cinfo.d.comp_info[i].component_index = i;
- sp->cinfo.d.comp_info[i].component_needed = TRUE;
- sp->cinfo.d.cur_comp_info[i] = &sp->cinfo.d.comp_info[i];
- }
- while (++i < sp->cinfo.d.num_components);
- switch (jpeg_color_space)
- {
- case JCS_UNKNOWN :
- i = 0;
- do
- {
- sp->cinfo.d.comp_info[i].component_id = i;
- sp->cinfo.d.comp_info[i].h_samp_factor =
- sp->cinfo.d.comp_info[i].v_samp_factor = 1;
- }
- while (++i < sp->cinfo.d.num_components);
- break;
- case JCS_GRAYSCALE:
- sp->cinfo.d.comp_info[0].component_id =
- sp->cinfo.d.comp_info[0].h_samp_factor =
- sp->cinfo.d.comp_info[0].v_samp_factor = 1;
- break;
- case JCS_RGB :
- sp->cinfo.d.comp_info[0].component_id = 'R';
- sp->cinfo.d.comp_info[1].component_id = 'G';
- sp->cinfo.d.comp_info[2].component_id = 'B';
- i = 0;
- do sp->cinfo.d.comp_info[i].h_samp_factor =
- sp->cinfo.d.comp_info[i].v_samp_factor = 1;
- while (++i < sp->cinfo.d.num_components);
- break;
- case JCS_CMYK :
- sp->cinfo.d.comp_info[0].component_id = 'C';
- sp->cinfo.d.comp_info[1].component_id = 'M';
- sp->cinfo.d.comp_info[2].component_id = 'Y';
- sp->cinfo.d.comp_info[3].component_id = 'K';
- i = 0;
- do sp->cinfo.d.comp_info[i].h_samp_factor =
- sp->cinfo.d.comp_info[i].v_samp_factor = 1;
- while (++i < sp->cinfo.d.num_components);
- break;
- case JCS_YCbCr :
- i = 0;
- do
- {
- sp->cinfo.d.comp_info[i].component_id = i+1;
- sp->cinfo.d.comp_info[i].h_samp_factor =
- sp->cinfo.d.comp_info[i].v_samp_factor = 1;
- sp->cinfo.d.comp_info[i].quant_tbl_no =
- sp->cinfo.d.comp_info[i].dc_tbl_no =
- sp->cinfo.d.comp_info[i].ac_tbl_no = i > 0;
- }
- while (++i < sp->cinfo.d.num_components);
- sp->cinfo.d.comp_info[0].h_samp_factor = sp->h_sampling;
- sp->cinfo.d.comp_info[0].v_samp_factor = sp->v_sampling;
- };
- sp->cinfo.d.comps_in_scan = td->td_planarconfig == PLANARCONFIG_CONTIG
- ? sp->cinfo.d.num_components
- : 1;
- i = CALLJPEG(sp,-1,jpeg_read_header(&sp->cinfo.d,!sp->is_WANG));
- sp->cinfo.d.marker->read_markers = save; /* Restore input method */
- if (sp->is_WANG) /* produced by Wang Imaging on Microsoft Windows */
- {
- if (i != JPEG_SUSPENDED) return 0;
-
- /* BOGOSITY ALERT! Files prooduced by the Wang Imaging application for
- Microsoft Windows are a special--and, technically
- illegal--case. A JPEG SOS marker and rest of the data stream should
- be located at the end of the file, in a position identified by the
- 0th Strip offset.
- */
- i = td->td_nstrips - 1;
- sp->src.next_input_byte = tif->tif_base + td->td_stripoffset[0];
- sp->src.bytes_in_buffer = td->td_stripoffset[i] -
- td->td_stripoffset[0] + td->td_stripbytecount[i];
- i = CALLJPEG(sp,-1,jpeg_read_header(&sp->cinfo.d,TRUE));
- };
- if (i != JPEG_HEADER_OK) return 0;
- };
-
- /* Some of our initialization must wait until the JPEG Library is initialized
- above, in order to override its defaults.
- */
- if ( (sp->cinfo.d.raw_data_out = downsampled_output)
- && !alloc_downsampled_buffers(tif,sp->cinfo.d.comp_info,
- sp->cinfo.d.num_components)
- ) return 0;
- sp->cinfo.d.jpeg_color_space = jpeg_color_space;
- sp->cinfo.d.out_color_space = out_color_space;
- sp->cinfo.d.dither_mode = JDITHER_NONE; /* Reduce image "noise" */
- sp->cinfo.d.two_pass_quantize = FALSE;
-
- /* If the image consists of separate, discontiguous TIFF "samples" (= color
- planes, hopefully = JPEG "scans"), then we must use the JPEG Library's
- "buffered image" mode to decompress the entire image into temporary buffers,
- because the JPEG Library must parse the entire JPEG bit-stream in order to
- be satsified that it has a complete set of color components for each pixel,
- but the TIFF Library must allow our client to extract 1 component at a time.
- Initializing the JPEG Library's "buffered image" mode is tricky: First, we
- start its decompressor, then we tell the decompressor to "consume" (i.e.,
- buffer) the entire bit-stream.
-
- WARNING: Disabling "fancy" up-sampling seems to slightly reduce "noise" for
- certain old Wang Imaging files, but it absolutely *must* be
- enabled if the image has separate color planes, since in that case, the JPEG
- Library doesn't use an "sp->cinfo.d.cconvert" structure (so de-referencing
- this pointer below will cause a fatal crash) but writing our own code to up-
- sample separate color planes is too much work for right now. Maybe someday?
- */
- sp->cinfo.d.do_fancy_upsampling = /* Always let this default (to TRUE)? */
- sp->cinfo.d.buffered_image = td->td_planarconfig == PLANARCONFIG_SEPARATE;
- if (!CALLJPEG(sp,0,jpeg_start_decompress(&sp->cinfo.d))) return 0;
- if (sp->cinfo.d.buffered_image) /* separate color planes */
- {
- if (sp->cinfo.d.raw_data_out)
- tif->tif_decoderow = tif->tif_decodestrip = tif->tif_decodetile =
- OJPEGDecodeRawSeparate;
- else
- {
- tif->tif_decoderow = tif->tif_decodestrip = tif->tif_decodetile =
- OJPEGDecode;
-
- /* In JPEG Library Version 6B, color-space conversion isn't implemented
- for separate color planes, so we must do it ourself if our TIFF
- client doesn't want to:
- */
- sp->cinfo.d.cconvert->color_convert =
- sp->cinfo.d.jpeg_color_space == sp->cinfo.d.out_color_space
- ? null_convert : ycc_rgb_convert;
- };
- L3: switch (CALLJPEG(sp,0,jpeg_consume_input(&sp->cinfo.d)))
- {
- default : goto L3;
-
- /* If no JPEG "End of Information" (EOI) marker is found when bit-
- stream parsing ends, check whether we have enough data to proceed
- before reporting an error.
- */
- case JPEG_SUSPENDED : if ( sp->cinfo.d.input_scan_number
- *sp->cinfo.d.image_height
- + sp->cinfo.d.input_iMCU_row
- *sp->cinfo.d.max_v_samp_factor
-# ifdef D_LOSSLESS_SUPPORTED
- *sp->cinfo.d.data_units_in_MCU
- *sp->cinfo.d.min_codec_data_unit
-# else
- *sp->cinfo.d.blocks_in_MCU
- *DCTSIZE
-# endif
- < td->td_samplesperpixel
- *sp->cinfo.d.image_height
- )
- {
- TIFFError(tif->tif_name,
- "Premature end of JPEG bit-stream");
- return 0;
- }
- case JPEG_REACHED_EOI: ;
- }
- }
- else /* pixel-interleaved color planes */
- tif->tif_decoderow = tif->tif_decodestrip = tif->tif_decodetile =
- downsampled_output ? OJPEGDecodeRawContig : OJPEGDecode;
- return 1;
-# undef td
- }
+static int
+OJPEGReadHeaderInfoSecStreamSos(TIFF* tif)
+{
+ /* this marker needs to be checked, and part of its data needs to be saved for regeneration later on */
+ static const char module[]="OJPEGReadHeaderInfoSecStreamSos";
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint16 m;
+ uint8 n;
+ uint8 o;
+ assert(sp->subsamplingcorrect==0);
+ if (sp->sof_log==0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt SOS marker in JPEG data");
+ return(0);
+ }
+ /* Ls */
+ if (OJPEGReadWord(sp,&m)==0)
+ return(0);
+ if (m!=6+sp->samples_per_pixel_per_plane*2)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt SOS marker in JPEG data");
+ return(0);
+ }
+ /* Ns */
+ if (OJPEGReadByte(sp,&n)==0)
+ return(0);
+ if (n!=sp->samples_per_pixel_per_plane)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt SOS marker in JPEG data");
+ return(0);
+ }
+ /* Cs, Td, and Ta */
+ for (o=0; o<sp->samples_per_pixel_per_plane; o++)
+ {
+ /* Cs */
+ if (OJPEGReadByte(sp,&n)==0)
+ return(0);
+ sp->sos_cs[sp->plane_sample_offset+o]=n;
+ /* Td and Ta */
+ if (OJPEGReadByte(sp,&n)==0)
+ return(0);
+ sp->sos_tda[sp->plane_sample_offset+o]=n;
+ }
+ /* skip Ss, Se, Ah, en Al -> no check, as per Tom Lane recommendation, as per LibJpeg source */
+ OJPEGReadSkip(sp,3);
+ return(1);
+}
static int
-OJPEGPreDecode(register TIFF *tif,tsample_t s)
- { register OJPEGState *sp = OJState(tif);
-# define td (&tif->tif_dir)
-
- /* If we are about to read the first row of an image plane (hopefully, these
- are coincident with JPEG "scans"!), reset the JPEG Library's decompressor
- appropriately. Otherwise, let the decompressor run "as is" and return a
- "success" status without further ado.
- */
- if ( (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip)
- % td->td_stripsperimage
- == 0
- )
- {
- if ( sp->cinfo.d.buffered_image
- && !CALLJPEG(sp,0,jpeg_start_output(&sp->cinfo.d,s+1))
- ) return 0;
- sp->cinfo.d.output_scanline = 0;
-
- /* Mark subsampling buffers "empty". */
-
-# ifdef D_LOSSLESS_SUPPORTED
- sp->scancount = sp->cinfo.d.min_codec_data_unit;
-# else
- sp->scancount = DCTSIZE;
-# endif
- };
- return 1;
-# undef td
- }
-
-/*ARGSUSED*/ static void
-OJPEGPostDecode(register TIFF *tif,tidata_t buf,tsize_t cc)
- { register OJPEGState *sp = OJState(tif);
-# define td (&tif->tif_dir)
-
- /* The JPEG Library decompressor has reached the end of a strip/tile. If this
- is the end of a TIFF image "sample" (= JPEG "scan") in a file with separate
- components (color planes), then end the "scan". If it ends the image's last
- sample/scan, then also stop the JPEG Library's decompressor.
- */
- if (sp->cinfo.d.output_scanline >= sp->cinfo.d.output_height)
- {
- if (sp->cinfo.d.buffered_image)
- CALLJPEG(sp,-1,jpeg_finish_output(&sp->cinfo.d)); /* End JPEG scan */
- if ( (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip)
- >= td->td_nstrips-1
- ) CALLJPEG(sp,0,jpeg_finish_decompress(&sp->cinfo.d));
- }
-# undef td
- }
+OJPEGReadHeaderInfoSecTablesQTable(TIFF* tif)
+{
+ static const char module[]="OJPEGReadHeaderInfoSecTablesQTable";
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint8 m;
+ uint8 n;
+ uint32 oa;
+ uint8* ob;
+ uint32 p;
+ if (sp->qtable_offset[0]==0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Missing JPEG tables");
+ return(0);
+ }
+ sp->in_buffer_file_pos_log=0;
+ for (m=0; m<sp->samples_per_pixel; m++)
+ {
+ if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1])))
+ {
+ for (n=0; n<m-1; n++)
+ {
+ if (sp->qtable_offset[m]==sp->qtable_offset[n])
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt JpegQTables tag value");
+ return(0);
+ }
+ }
+ oa=sizeof(uint32)+69;
+ ob=_TIFFmalloc(oa);
+ if (ob==0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Out of memory");
+ return(0);
+ }
+ *(uint32*)ob=oa;
+ ob[sizeof(uint32)]=255;
+ ob[sizeof(uint32)+1]=JPEG_MARKER_DQT;
+ ob[sizeof(uint32)+2]=0;
+ ob[sizeof(uint32)+3]=67;
+ ob[sizeof(uint32)+4]=m;
+ TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET);
+ p=TIFFReadFile(tif,&ob[sizeof(uint32)+5],64);
+ if (p!=64)
+ return(0);
+ sp->qtable[m]=ob;
+ sp->sof_tq[m]=m;
+ }
+ else
+ sp->sof_tq[m]=sp->sof_tq[m-1];
+ }
+ return(1);
+}
static int
-OJPEGVSetField(register TIFF *tif,ttag_t tag,va_list ap)
+OJPEGReadHeaderInfoSecTablesDcTable(TIFF* tif)
{
- uint32 v32;
- register OJPEGState *sp = OJState(tif);
-# define td (&tif->tif_dir)
- toff_t tiffoff=0;
- uint32 bufoff=0;
- uint32 code_count=0;
- int i2=0;
- int k2=0;
-
- switch (tag)
- {
- default : return
- (*sp->vsetparent)(tif,tag,ap);
-
- /* BEWARE OF KLUDGE: Some old-format JPEG-in-TIFF files, including those
- produced by the Wang Imaging application for Micro-
- soft Windows, illegally omit a "ReferenceBlackWhite" TIFF tag, even
- though the TIFF specification's default is intended for the RGB color
- space and is inappropriate for the YCbCr color space ordinarily used for
- JPEG images. Since many TIFF client applications request the value of
- this tag immediately after a TIFF image directory is parsed, and before
- any other code in this module receives control, we are forced to fix
- this problem very early in image-file processing. Fortunately, legal
- TIFF files are supposed to store their tags in numeric order, so a
- mandatory "PhotometricInterpretation" tag should always appear before
- an optional "ReferenceBlackWhite" tag. Hence, we slyly peek ahead when
- we discover the desired photometry, by installing modified black and
- white reference levels.
- */
- case TIFFTAG_PHOTOMETRIC :
- if ( (v32 = (*sp->vsetparent)(tif,tag,ap))
- && td->td_photometric == PHOTOMETRIC_YCBCR
- )
- {
- float *ref;
- if (!TIFFGetField(tif, TIFFTAG_REFERENCEBLACKWHITE, &ref)) {
- float refbw[6];
- long top = 1L << td->td_bitspersample;
- refbw[0] = 0;
- refbw[1] = (float)(top-1L);
- refbw[2] = (float)(top>>1);
- refbw[3] = refbw[1];
- refbw[4] = refbw[2];
- refbw[5] = refbw[1];
- TIFFSetField(tif, TIFFTAG_REFERENCEBLACKWHITE, refbw);
+ static const char module[]="OJPEGReadHeaderInfoSecTablesDcTable";
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint8 m;
+ uint8 n;
+ uint8 o[16];
+ uint32 p;
+ uint32 q;
+ uint32 ra;
+ uint8* rb;
+ if (sp->dctable_offset[0]==0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Missing JPEG tables");
+ return(0);
+ }
+ sp->in_buffer_file_pos_log=0;
+ for (m=0; m<sp->samples_per_pixel; m++)
+ {
+ if ((sp->dctable_offset[m]!=0) && ((m==0) || (sp->dctable_offset[m]!=sp->dctable_offset[m-1])))
+ {
+ for (n=0; n<m-1; n++)
+ {
+ if (sp->dctable_offset[m]==sp->dctable_offset[n])
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt JpegDcTables tag value");
+ return(0);
+ }
+ }
+ TIFFSeekFile(tif,sp->dctable_offset[m],SEEK_SET);
+ p=TIFFReadFile(tif,o,16);
+ if (p!=16)
+ return(0);
+ q=0;
+ for (n=0; n<16; n++)
+ q+=o[n];
+ ra=sizeof(uint32)+21+q;
+ rb=_TIFFmalloc(ra);
+ if (rb==0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Out of memory");
+ return(0);
+ }
+ *(uint32*)rb=ra;
+ rb[sizeof(uint32)]=255;
+ rb[sizeof(uint32)+1]=JPEG_MARKER_DHT;
+ rb[sizeof(uint32)+2]=((19+q)>>8);
+ rb[sizeof(uint32)+3]=((19+q)&255);
+ rb[sizeof(uint32)+4]=m;
+ for (n=0; n<16; n++)
+ rb[sizeof(uint32)+5+n]=o[n];
+ p=TIFFReadFile(tif,&(rb[sizeof(uint32)+21]),q);
+ if (p!=q)
+ return(0);
+ sp->dctable[m]=rb;
+ sp->sos_tda[m]=(m<<4);
}
- }
- return v32;
-
- /* BEWARE OF KLUDGE: According to Charles Auer <Bumble731@msn.com>, if our
- input is a multi-image (multi-directory) JPEG-in-TIFF
- file is produced by the Wang Imaging application on Microsoft Windows,
- for some reason the first directory excludes the vendor-specific "WANG
- PageControl" tag (32934) that we check below, so the only other way to
- identify these directories is apparently to look for a software-
- identification tag with the substring, "Wang Labs". Single-image files
- can apparently pass both tests, which causes no harm here, but what a
- mess this is!
- */
- case TIFFTAG_SOFTWARE :
- {
- char *software;
-
- v32 = (*sp->vsetparent)(tif,tag,ap);
- if( TIFFGetField( tif, TIFFTAG_SOFTWARE, &software )
- && strstr( software, "Wang Labs" ) )
- sp->is_WANG = 1;
- return v32;
- }
-
- case TIFFTAG_JPEGPROC :
- case TIFFTAG_JPEGIFOFFSET :
- case TIFFTAG_JPEGIFBYTECOUNT :
- case TIFFTAG_JPEGRESTARTINTERVAL :
- case TIFFTAG_JPEGLOSSLESSPREDICTORS:
- case TIFFTAG_JPEGPOINTTRANSFORM :
- case TIFFTAG_JPEGQTABLES :
- case TIFFTAG_JPEGDCTABLES :
- case TIFFTAG_JPEGACTABLES :
- case TIFFTAG_WANG_PAGECONTROL :
- case TIFFTAG_JPEGCOLORMODE : ;
- };
- v32 = va_arg(ap,uint32); /* No. of values in this TIFF record */
-
- /* This switch statement is added for OJPEGVSetField */
- if(v32 !=0){
- switch(tag){
- case TIFFTAG_JPEGPROC:
- sp->jpegproc=v32;
- break;
- case TIFFTAG_JPEGIFOFFSET:
- sp->jpegifoffset=v32;
- break;
- case TIFFTAG_JPEGIFBYTECOUNT:
- sp->jpegifbytecount=v32;
- break;
- case TIFFTAG_JPEGRESTARTINTERVAL:
- sp->jpegrestartinterval=v32;
- break;
- case TIFFTAG_JPEGLOSSLESSPREDICTORS:
- sp->jpeglosslesspredictors_length=v32;
- break;
- case TIFFTAG_JPEGPOINTTRANSFORM:
- sp->jpegpointtransform_length=v32;
- break;
- case TIFFTAG_JPEGQTABLES:
- sp->jpegqtables_length=v32;
- break;
- case TIFFTAG_JPEGACTABLES:
- sp->jpegactables_length=v32;
- break;
- case TIFFTAG_JPEGDCTABLES:
- sp->jpegdctables_length=v32;
- break;
- default:
- break;
- }
- }
-
- /* BEWARE: The following actions apply only if we are reading a "source" TIFF
- image to be decompressed for a client application program. If we
- ever enhance this file's CODEC to write "destination" JPEG-in-TIFF images,
- we'll need an "if"- and another "switch"-statement below, because we'll
- probably want to store these records' values in some different places. Most
- of these need not be parsed here in order to decode JPEG bit stream, so we
- set boolean flags to note that they have been seen, but we otherwise ignore
- them.
- */
- switch (tag)
- { JHUFF_TBL **h;
-
- /* Validate the JPEG-process code. */
-
- case TIFFTAG_JPEGPROC :
- switch (v32)
- {
- default : TIFFError(tif->tif_name,
- "Unknown JPEG process");
- return 0;
-# ifdef C_LOSSLESS_SUPPORTED
-
- /* Image uses (lossy) baseline sequential coding. */
-
- case JPEGPROC_BASELINE: sp->cinfo.d.process = JPROC_SEQUENTIAL;
- sp->cinfo.d.data_unit = DCTSIZE;
- break;
-
- /* Image uses (lossless) Huffman coding. */
-
- case JPEGPROC_LOSSLESS: sp->cinfo.d.process = JPROC_LOSSLESS;
- sp->cinfo.d.data_unit = 1;
-# else /* not C_LOSSLESS_SUPPORTED */
- case JPEGPROC_LOSSLESS: TIFFError(JPEGLib_name,
- "Does not support lossless Huffman coding");
- return 0;
- case JPEGPROC_BASELINE: ;
-# endif /* C_LOSSLESS_SUPPORTED */
- };
- break;
-
- /* The TIFF Version 6.0 specification says that if the value of a TIFF
- "JPEGInterchangeFormat" record is 0, then we are to behave as if this
- record were absent; i.e., the data does *not* represent a JPEG Inter-
- change Format File (JFIF), so don't even set the boolean "I've been
- here" flag below. Otherwise, the field's value represents the file
- offset of the JPEG SOI marker.
- */
- case TIFFTAG_JPEGIFOFFSET :
- if (v32)
- {
- sp->src.next_input_byte = tif->tif_base + v32;
- break;
- };
- return 1;
- case TIFFTAG_JPEGIFBYTECOUNT :
- sp->src.bytes_in_buffer = v32;
- break;
-
- /* The TIFF Version 6.0 specification says that if the JPEG "Restart"
- marker interval is 0, then the data has no "Restart" markers; i.e., we
- must behave as if this TIFF record were absent. So, don't even set the
- boolean "I've been here" flag below.
- */
- /*
- * Instead, set the field bit so TIFFGetField can get whether or not
- * it was set.
- */
- case TIFFTAG_JPEGRESTARTINTERVAL :
- if (v32)
- sp->cinfo.d.restart_interval = v32;
- break;
- /* The TIFF Version 6.0 specification says that this tag is supposed to be
- a vector containing a value for each image component, but for lossless
- Huffman coding (the only JPEG process defined by the specification for
- which this tag should be needed), ISO IS 10918-1 uses only a single
- value, equivalent to the "Ss" field in a JPEG bit-stream's "Start of
- Scan" (SOS) marker. So, we extract the first vector element and ignore
- the rest. (I hope this is correct!)
- */
- case TIFFTAG_JPEGLOSSLESSPREDICTORS:
- if (v32)
- {
- sp->cinfo.d.Ss = *va_arg(ap,uint16 *);
- sp->jpeglosslesspredictors =
- _TIFFmalloc(sp->jpeglosslesspredictors_length
- * sizeof(uint16));
- if(sp->jpeglosslesspredictors==NULL){return(0);}
- for(i2=0;i2<sp->jpeglosslesspredictors_length;i2++){
- ((uint16*)sp->jpeglosslesspredictors)[i2] =
- ((uint16*)sp->cinfo.d.Ss)[i2];
- }
- sp->jpeglosslesspredictors_length*=sizeof(uint16);
- break;
- };
- return v32;
-
- /* The TIFF Version 6.0 specification says that this tag is supposed to be
- a vector containing a value for each image component, but for lossless
- Huffman coding (the only JPEG process defined by the specification for
- which this tag should be needed), ISO IS 10918-1 uses only a single
- value, equivalent to the "Al" field in a JPEG bit-stream's "Start of
- Scan" (SOS) marker. So, we extract the first vector element and ignore
- the rest. (I hope this is correct!)
- */
- case TIFFTAG_JPEGPOINTTRANSFORM :
- if (v32)
- {
- sp->cinfo.d.Al = *va_arg(ap,uint16 *);
- sp->jpegpointtransform =
- _TIFFmalloc(sp->jpegpointtransform_length*sizeof(uint16));
- if(sp->jpegpointtransform==NULL){return(0);}
- for(i2=0;i2<sp->jpegpointtransform_length;i2++) {
- ((uint16*)sp->jpegpointtransform)[i2] =
- ((uint16*)sp->cinfo.d.Al)[i2];
- }
- sp->jpegpointtransform_length*=sizeof(uint16);
- break;
- }
- return v32;
-
- /* We have a vector of offsets to quantization tables, so load 'em! */
-
- case TIFFTAG_JPEGQTABLES :
- if (v32)
- { uint32 *v;
- int i;
- if (v32 > NUM_QUANT_TBLS)
- {
- TIFFError(tif->tif_name,"Too many quantization tables");
- return 0;
- };
- i = 0;
- v = va_arg(ap,uint32 *);
- sp->jpegqtables=_TIFFmalloc(64*sp->jpegqtables_length);
- if(sp->jpegqtables==NULL){return(0);}
- tiffoff = TIFFSeekFile(tif, 0, SEEK_CUR);
- bufoff=0;
- for(i2=0;i2<sp->jpegqtables_length;i2++){
- TIFFSeekFile(tif, v[i2], SEEK_SET);
- TIFFReadFile(tif, &(((unsigned char*)(sp->jpegqtables))[bufoff]),
- 64);
- bufoff+=64;
- }
- sp->jpegqtables_length=bufoff;
- TIFFSeekFile(tif, tiffoff, SEEK_SET);
-
- do /* read quantization table */
- { register UINT8 *from = tif->tif_base + *v++;
- register UINT16 *to;
- register int j = DCTSIZE2;
-
- if (!( sp->cinfo.d.quant_tbl_ptrs[i]
- = CALLJPEG(sp,0,jpeg_alloc_quant_table(&sp->cinfo.comm))
- )
- )
- {
- TIFFError(JPEGLib_name,"No space for quantization table");
- return 0;
- };
- to = sp->cinfo.d.quant_tbl_ptrs[i]->quantval;
- do *to++ = *from++; while (--j > 0);
- }
- while (++i < v32);
- sp->jpegtablesmode |= JPEGTABLESMODE_QUANT;
- };
- break;
-
- /* We have a vector of offsets to DC Huffman tables, so load 'em! */
-
- case TIFFTAG_JPEGDCTABLES :
- h = sp->cinfo.d.dc_huff_tbl_ptrs;
- goto L;
-
- /* We have a vector of offsets to AC Huffman tables, so load 'em! */
-
- case TIFFTAG_JPEGACTABLES :
- h = sp->cinfo.d.ac_huff_tbl_ptrs;
- L: if (v32)
- { uint32 *v;
- int i;
- if (v32 > NUM_HUFF_TBLS)
- {
- TIFFError(tif->tif_name,"Too many Huffman tables");
- return 0;
- };
- v = va_arg(ap,uint32 *);
- if(tag == TIFFTAG_JPEGDCTABLES) {
- sp->jpegdctables=_TIFFmalloc(272*sp->jpegdctables_length);
- if(sp->jpegdctables==NULL){return(0);}
- tiffoff = TIFFSeekFile(tif, 0, SEEK_CUR);
- bufoff=0;
- code_count=0;
- for(i2=0;i2<sp->jpegdctables_length;i2++){
- TIFFSeekFile(tif, v[i2], SEEK_SET);
- TIFFReadFile(tif,
- &(((unsigned char*)(sp->jpegdctables))[bufoff]),
- 16);
- code_count=0;
- for(k2=0;k2<16;k2++){
- code_count+=((unsigned char*)(sp->jpegdctables))[k2+bufoff];
- }
- TIFFReadFile(tif,
- &(((unsigned char*)(sp->jpegdctables))[bufoff+16]),
- code_count);
- bufoff+=16;
- bufoff+=code_count;
- }
- sp->jpegdctables_length=bufoff;
- TIFFSeekFile(tif, tiffoff, SEEK_SET);
- }
- if(tag==TIFFTAG_JPEGACTABLES){
- sp->jpegactables=_TIFFmalloc(272*sp->jpegactables_length);
- if(sp->jpegactables==NULL){return(0);}
- tiffoff = TIFFSeekFile(tif, 0, SEEK_CUR);
- bufoff=0;
- code_count=0;
- for(i2=0;i2<sp->jpegactables_length;i2++){
- TIFFSeekFile(tif, v[i2], SEEK_SET);
- TIFFReadFile(tif, &(((unsigned char*)(sp->jpegactables))[bufoff]), 16);
- code_count=0;
- for(k2=0;k2<16;k2++){
- code_count+=((unsigned char*)(sp->jpegactables))[k2+bufoff];
- }
- TIFFReadFile(tif, &(((unsigned char*)(sp->jpegactables))[bufoff+16]), code_count);
- bufoff+=16;
- bufoff+=code_count;
- }
- sp->jpegactables_length=bufoff;
- TIFFSeekFile(tif, tiffoff, SEEK_SET);
- }
- i = 0;
- do /* copy each Huffman table */
- { int size = 0;
- register UINT8 *from = tif->tif_base + *v++, *to;
- register int j = sizeof (*h)->bits;
-
- /* WARNING: This code relies on the fact that an image file not
- "memory mapped" was read entirely into a single
- buffer by "TIFFInitOJPEG()", so we can do a fast memory-to-
- memory copy here. Each table consists of 16 Bytes, which are
- suffixed to a 0 Byte when copied, followed by a variable
- number of Bytes whose length is the sum of the first 16.
- */
- if (!( *h
- = CALLJPEG(sp,0,jpeg_alloc_huff_table(&sp->cinfo.comm))
- )
- )
- {
- TIFFError(JPEGLib_name,"No space for Huffman table");
- return 0;
- };
- to = (*h++)->bits;
- *to++ = 0;
- while (--j > 0) size += *to++ = *from++; /* Copy 16 Bytes */
- if (size > sizeof (*h)->huffval/sizeof *(*h)->huffval)
- {
- TIFFError(tif->tif_name,"Huffman table too big");
- return 0;
- };
- if ((j = size) > 0) do *to++ = *from++; while (--j > 0);
- while (++size <= sizeof (*h)->huffval/sizeof *(*h)->huffval)
- *to++ = 0; /* Zero the rest of the table for cleanliness */
- }
- while (++i < v32);
- sp->jpegtablesmode |= JPEGTABLESMODE_HUFF;
- };
- break;
-
- /* The following vendor-specific TIFF tag occurs in (highly illegal) files
- produced by the Wang Imaging application for Microsoft Windows. These
- can apparently have several "pages", in which case this tag specifies
- the offset of a "page control" structure, which we don't currently know
- how to handle. 0 indicates a 1-page image with no "page control", which
- we make a feeble effort to handle.
- */
- case TIFFTAG_WANG_PAGECONTROL :
- if (v32 == 0) v32 = -1;
- sp->is_WANG = v32;
- tag = TIFFTAG_JPEGPROC+FIELD_WANG_PAGECONTROL-FIELD_JPEGPROC;
- break;
-
- /* This pseudo tag indicates whether our caller is expected to do YCbCr <->
- RGB color-space conversion (JPEGCOLORMODE_RAW <=> 0) or whether we must
- ask the JPEG Library to do it (JPEGCOLORMODE_RGB <=> 1).
- */
- case TIFFTAG_JPEGCOLORMODE :
- sp->jpegcolormode = v32;
-
- /* Mark the image to indicate whether returned data is up-sampled, so
- that "TIFF{Strip,Tile}Size()" reflect the true amount of data present.
- */
- v32 = tif->tif_flags; /* Save flags temporarily */
- tif->tif_flags &= ~TIFF_UPSAMPLED;
- if ( td->td_photometric == PHOTOMETRIC_YCBCR
- && (td->td_ycbcrsubsampling[0]<<3 | td->td_ycbcrsubsampling[1])
- != 011
- && sp->jpegcolormode == JPEGCOLORMODE_RGB
- ) tif->tif_flags |= TIFF_UPSAMPLED;
-
- /* If the up-sampling state changed, re-calculate tile size. */
-
- if ((tif->tif_flags ^ v32) & TIFF_UPSAMPLED)
- {
- tif->tif_tilesize = isTiled(tif) ? TIFFTileSize(tif) : (tsize_t) -1;
- tif->tif_flags |= TIFF_DIRTYDIRECT;
- };
- return 1;
- };
- TIFFSetFieldBit(tif,tag-TIFFTAG_JPEGPROC+FIELD_JPEGPROC);
- return 1;
-# undef td
- }
+ else
+ sp->sos_tda[m]=sp->sos_tda[m-1];
+ }
+ return(1);
+}
static int
-OJPEGVGetField(register TIFF *tif,ttag_t tag,va_list ap)
- { register OJPEGState *sp = OJState(tif);
-
- switch (tag)
- {
-
- /* If this file has managed to synthesize a set of consolidated "metadata"
- tables for the current (post-TIFF Version 6.0 specification) JPEG-in-
- TIFF encapsulation strategy, then tell our caller about them; otherwise,
- keep mum.
- */
- case TIFFTAG_JPEGTABLES :
- if (sp->jpegtables_length) /* we have "new"-style JPEG tables */
- {
- *va_arg(ap,uint32 *) = sp->jpegtables_length;
- *va_arg(ap,char **) = sp->jpegtables;
- return 1;
- };
-
- /* This pseudo tag indicates whether our caller is expected to do YCbCr <->
- RGB color-space conversion (JPEGCOLORMODE_RAW <=> 0) or whether we must
- ask the JPEG Library to do it (JPEGCOLORMODE_RGB <=> 1).
- */
- case TIFFTAG_JPEGCOLORMODE :
- *va_arg(ap,uint32 *) = sp->jpegcolormode;
- return 1;
-
- /* The following tags are defined by the TIFF Version 6.0 specification
- and are obsolete. If our caller asks for information about them, do not
- return anything, even if we parsed them in an old-format "source" image.
- */
- case TIFFTAG_JPEGPROC :
- *va_arg(ap, uint16*)=sp->jpegproc;
- return(1);
- break;
- case TIFFTAG_JPEGIFOFFSET :
- *va_arg(ap, uint32*)=sp->jpegifoffset;
- return(1);
- break;
- case TIFFTAG_JPEGIFBYTECOUNT :
- *va_arg(ap, uint32*)=sp->jpegifbytecount;
- return(1);
- break;
- case TIFFTAG_JPEGRESTARTINTERVAL :
- *va_arg(ap, uint32*)=sp->jpegrestartinterval;
- return(1);
- break;
- case TIFFTAG_JPEGLOSSLESSPREDICTORS:
- *va_arg(ap, uint32*)=sp->jpeglosslesspredictors_length;
- *va_arg(ap, void**)=sp->jpeglosslesspredictors;
- return(1);
- break;
- case TIFFTAG_JPEGPOINTTRANSFORM :
- *va_arg(ap, uint32*)=sp->jpegpointtransform_length;
- *va_arg(ap, void**)=sp->jpegpointtransform;
- return(1);
- break;
- case TIFFTAG_JPEGQTABLES :
- *va_arg(ap, uint32*)=sp->jpegqtables_length;
- *va_arg(ap, void**)=sp->jpegqtables;
- return(1);
- break;
- case TIFFTAG_JPEGDCTABLES :
- *va_arg(ap, uint32*)=sp->jpegdctables_length;
- *va_arg(ap, void**)=sp->jpegdctables;
- return(1);
- break;
- case TIFFTAG_JPEGACTABLES :
- *va_arg(ap, uint32*)=sp->jpegactables_length;
- *va_arg(ap, void**)=sp->jpegactables;
- return(1);
- break;
- };
- return (*sp->vgetparent)(tif,tag,ap);
- }
+OJPEGReadHeaderInfoSecTablesAcTable(TIFF* tif)
+{
+ static const char module[]="OJPEGReadHeaderInfoSecTablesAcTable";
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint8 m;
+ uint8 n;
+ uint8 o[16];
+ uint32 p;
+ uint32 q;
+ uint32 ra;
+ uint8* rb;
+ if (sp->actable_offset[0]==0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Missing JPEG tables");
+ return(0);
+ }
+ sp->in_buffer_file_pos_log=0;
+ for (m=0; m<sp->samples_per_pixel; m++)
+ {
+ if ((sp->actable_offset[m]!=0) && ((m==0) || (sp->actable_offset[m]!=sp->actable_offset[m-1])))
+ {
+ for (n=0; n<m-1; n++)
+ {
+ if (sp->actable_offset[m]==sp->actable_offset[n])
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Corrupt JpegAcTables tag value");
+ return(0);
+ }
+ }
+ TIFFSeekFile(tif,sp->actable_offset[m],SEEK_SET);
+ p=TIFFReadFile(tif,o,16);
+ if (p!=16)
+ return(0);
+ q=0;
+ for (n=0; n<16; n++)
+ q+=o[n];
+ ra=sizeof(uint32)+21+q;
+ rb=_TIFFmalloc(ra);
+ if (rb==0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Out of memory");
+ return(0);
+ }
+ *(uint32*)rb=ra;
+ rb[sizeof(uint32)]=255;
+ rb[sizeof(uint32)+1]=JPEG_MARKER_DHT;
+ rb[sizeof(uint32)+2]=((19+q)>>8);
+ rb[sizeof(uint32)+3]=((19+q)&255);
+ rb[sizeof(uint32)+4]=(16|m);
+ for (n=0; n<16; n++)
+ rb[sizeof(uint32)+5+n]=o[n];
+ p=TIFFReadFile(tif,&(rb[sizeof(uint32)+21]),q);
+ if (p!=q)
+ return(0);
+ sp->actable[m]=rb;
+ sp->sos_tda[m]=(sp->sos_tda[m]|m);
+ }
+ else
+ sp->sos_tda[m]=(sp->sos_tda[m]|(sp->sos_tda[m-1]&15));
+ }
+ return(1);
+}
+
+static int
+OJPEGReadBufferFill(OJPEGState* sp)
+{
+ uint16 m;
+ tsize_t n;
+ /* TODO: double-check: when subsamplingcorrect is set, no call to TIFFErrorExt or TIFFWarningExt should be made
+ * in any other case, seek or read errors should be passed through */
+ do
+ {
+ if (sp->in_buffer_file_togo!=0)
+ {
+ if (sp->in_buffer_file_pos_log==0)
+ {
+ TIFFSeekFile(sp->tif,sp->in_buffer_file_pos,SEEK_SET);
+ sp->in_buffer_file_pos_log=1;
+ }
+ m=OJPEG_BUFFER;
+ if (m>sp->in_buffer_file_togo)
+ m=(uint16)sp->in_buffer_file_togo;
+ n=TIFFReadFile(sp->tif,sp->in_buffer,(tsize_t)m);
+ if (n==0)
+ return(0);
+ assert(n>0);
+ assert(n<=OJPEG_BUFFER);
+ assert(n<65536);
+ assert((uint16)n<=sp->in_buffer_file_togo);
+ m=(uint16)n;
+ sp->in_buffer_togo=m;
+ sp->in_buffer_cur=sp->in_buffer;
+ sp->in_buffer_file_togo-=m;
+ sp->in_buffer_file_pos+=m;
+ break;
+ }
+ sp->in_buffer_file_pos_log=0;
+ switch(sp->in_buffer_source)
+ {
+ case osibsNotSetYet:
+ if (sp->jpeg_interchange_format!=0)
+ {
+ sp->in_buffer_file_pos=sp->jpeg_interchange_format;
+ sp->in_buffer_file_togo=sp->jpeg_interchange_format_length;
+ }
+ sp->in_buffer_source=osibsJpegInterchangeFormat;
+ break;
+ case osibsJpegInterchangeFormat:
+ sp->in_buffer_source=osibsStrile;
+ case osibsStrile:
+ if (sp->in_buffer_next_strile==sp->in_buffer_strile_count)
+ sp->in_buffer_source=osibsEof;
+ else
+ {
+ sp->in_buffer_file_pos=sp->tif->tif_dir.td_stripoffset[sp->in_buffer_next_strile];
+ if (sp->in_buffer_file_pos!=0)
+ {
+ if (sp->in_buffer_file_pos>=sp->file_size)
+ sp->in_buffer_file_pos=0;
+ else
+ {
+ sp->in_buffer_file_togo=sp->tif->tif_dir.td_stripbytecount[sp->in_buffer_next_strile];
+ if (sp->in_buffer_file_togo==0)
+ sp->in_buffer_file_pos=0;
+ else if (sp->in_buffer_file_pos+sp->in_buffer_file_togo>sp->file_size)
+ sp->in_buffer_file_togo=sp->file_size-sp->in_buffer_file_pos;
+ }
+ }
+ sp->in_buffer_next_strile++;
+ }
+ break;
+ default:
+ return(0);
+ }
+ } while (1);
+ return(1);
+}
+
+static int
+OJPEGReadByte(OJPEGState* sp, uint8* byte)
+{
+ if (sp->in_buffer_togo==0)
+ {
+ if (OJPEGReadBufferFill(sp)==0)
+ return(0);
+ assert(sp->in_buffer_togo>0);
+ }
+ *byte=*(sp->in_buffer_cur);
+ sp->in_buffer_cur++;
+ sp->in_buffer_togo--;
+ return(1);
+}
+
+static int
+OJPEGReadBytePeek(OJPEGState* sp, uint8* byte)
+{
+ if (sp->in_buffer_togo==0)
+ {
+ if (OJPEGReadBufferFill(sp)==0)
+ return(0);
+ assert(sp->in_buffer_togo>0);
+ }
+ *byte=*(sp->in_buffer_cur);
+ return(1);
+}
static void
-OJPEGPrintDir(register TIFF *tif,FILE *fd,long flags)
- { register OJPEGState *sp = OJState(tif);
-
- if ( ( flags
- & (TIFFPRINT_JPEGQTABLES|TIFFPRINT_JPEGDCTABLES|TIFFPRINT_JPEGACTABLES)
- )
- && sp->jpegtables_length
- )
- fprintf(fd," JPEG Table Data: <present>, %lu bytes\n",
- sp->jpegtables_length);
- }
-
-static uint32
-OJPEGDefaultStripSize(register TIFF *tif,register uint32 s)
- { register OJPEGState *sp = OJState(tif);
-# define td (&tif->tif_dir)
-
- if ((s = (*sp->defsparent)(tif,s)) < td->td_imagelength)
- { register tsize_t size = sp->cinfo.comm.is_decompressor
-# ifdef D_LOSSLESS_SUPPORTED
- ? sp->cinfo.d.min_codec_data_unit
-# else
- ? DCTSIZE
-# endif
-# ifdef C_LOSSLESS_SUPPORTED
- : sp->cinfo.c.data_unit;
-# else
- : DCTSIZE;
-# endif
-
- size = TIFFroundup(size,16);
- s = TIFFroundup(s,td->td_ycbcrsubsampling[1]*size);
- };
- return s;
-# undef td
- }
+OJPEGReadByteAdvance(OJPEGState* sp)
+{
+ assert(sp->in_buffer_togo>0);
+ sp->in_buffer_cur++;
+ sp->in_buffer_togo--;
+}
+
+static int
+OJPEGReadWord(OJPEGState* sp, uint16* word)
+{
+ uint8 m;
+ if (OJPEGReadByte(sp,&m)==0)
+ return(0);
+ *word=(m<<8);
+ if (OJPEGReadByte(sp,&m)==0)
+ return(0);
+ *word|=m;
+ return(1);
+}
+
+static int
+OJPEGReadBlock(OJPEGState* sp, uint16 len, void* mem)
+{
+ uint16 mlen;
+ uint8* mmem;
+ uint16 n;
+ assert(len>0);
+ mlen=len;
+ mmem=mem;
+ do
+ {
+ if (sp->in_buffer_togo==0)
+ {
+ if (OJPEGReadBufferFill(sp)==0)
+ return(0);
+ assert(sp->in_buffer_togo>0);
+ }
+ n=mlen;
+ if (n>sp->in_buffer_togo)
+ n=sp->in_buffer_togo;
+ _TIFFmemcpy(mmem,sp->in_buffer_cur,n);
+ sp->in_buffer_cur+=n;
+ sp->in_buffer_togo-=n;
+ mlen-=n;
+ mmem+=n;
+ } while(mlen>0);
+ return(1);
+}
static void
-OJPEGDefaultTileSize(register TIFF *tif,register uint32 *tw,register uint32 *th)
- { register OJPEGState *sp = OJState(tif);
- register tsize_t size;
-# define td (&tif->tif_dir)
-
- size = sp->cinfo.comm.is_decompressor
-# ifdef D_LOSSLESS_SUPPORTED
- ? sp->cinfo.d.min_codec_data_unit
-# else
- ? DCTSIZE
-# endif
-# ifdef C_LOSSLESS_SUPPORTED
- : sp->cinfo.c.data_unit;
-# else
- : DCTSIZE;
-# endif
- size = TIFFroundup(size,16);
- (*sp->deftparent)(tif,tw,th);
- *tw = TIFFroundup(*tw,td->td_ycbcrsubsampling[0]*size);
- *th = TIFFroundup(*th,td->td_ycbcrsubsampling[1]*size);
-# undef td
- }
+OJPEGReadSkip(OJPEGState* sp, uint16 len)
+{
+ uint16 m;
+ uint16 n;
+ m=len;
+ n=m;
+ if (n>sp->in_buffer_togo)
+ n=sp->in_buffer_togo;
+ sp->in_buffer_cur+=n;
+ sp->in_buffer_togo-=n;
+ m-=n;
+ if (m>0)
+ {
+ assert(sp->in_buffer_togo==0);
+ n=m;
+ if (n>sp->in_buffer_file_togo)
+ n=sp->in_buffer_file_togo;
+ sp->in_buffer_file_pos+=n;
+ sp->in_buffer_file_togo-=n;
+ sp->in_buffer_file_pos_log=0;
+ /* we don't skip past jpeginterchangeformat/strile block...
+ * if that is asked from us, we're dealing with totally bazurk
+ * data anyway, and we've not seen this happening on any
+ * testfile, so we might as well likely cause some other
+ * meaningless error to be passed at some later time
+ */
+ }
+}
+
+static int
+OJPEGWriteStream(TIFF* tif, void** mem, uint32* len)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ *len=0;
+ do
+ {
+ assert(sp->out_state<=ososEoi);
+ switch(sp->out_state)
+ {
+ case ososSoi:
+ OJPEGWriteStreamSoi(tif,mem,len);
+ break;
+ case ososQTable0:
+ OJPEGWriteStreamQTable(tif,0,mem,len);
+ break;
+ case ososQTable1:
+ OJPEGWriteStreamQTable(tif,1,mem,len);
+ break;
+ case ososQTable2:
+ OJPEGWriteStreamQTable(tif,2,mem,len);
+ break;
+ case ososQTable3:
+ OJPEGWriteStreamQTable(tif,3,mem,len);
+ break;
+ case ososDcTable0:
+ OJPEGWriteStreamDcTable(tif,0,mem,len);
+ break;
+ case ososDcTable1:
+ OJPEGWriteStreamDcTable(tif,1,mem,len);
+ break;
+ case ososDcTable2:
+ OJPEGWriteStreamDcTable(tif,2,mem,len);
+ break;
+ case ososDcTable3:
+ OJPEGWriteStreamDcTable(tif,3,mem,len);
+ break;
+ case ososAcTable0:
+ OJPEGWriteStreamAcTable(tif,0,mem,len);
+ break;
+ case ososAcTable1:
+ OJPEGWriteStreamAcTable(tif,1,mem,len);
+ break;
+ case ososAcTable2:
+ OJPEGWriteStreamAcTable(tif,2,mem,len);
+ break;
+ case ososAcTable3:
+ OJPEGWriteStreamAcTable(tif,3,mem,len);
+ break;
+ case ososDri:
+ OJPEGWriteStreamDri(tif,mem,len);
+ break;
+ case ososSof:
+ OJPEGWriteStreamSof(tif,mem,len);
+ break;
+ case ososSos:
+ OJPEGWriteStreamSos(tif,mem,len);
+ break;
+ case ososCompressed:
+ if (OJPEGWriteStreamCompressed(tif,mem,len)==0)
+ return(0);
+ break;
+ case ososRst:
+ OJPEGWriteStreamRst(tif,mem,len);
+ break;
+ case ososEoi:
+ OJPEGWriteStreamEoi(tif,mem,len);
+ break;
+ }
+ } while (*len==0);
+ return(1);
+}
static void
-OJPEGCleanUp(register TIFF *tif)
- { register OJPEGState *sp;
-
- if ( (sp = OJState(tif)) )
- {
- CALLVJPEG(sp,jpeg_destroy(&sp->cinfo.comm)); /* Free JPEG Lib. vars. */
- if (sp->jpegtables) {_TIFFfree(sp->jpegtables);sp->jpegtables=0;}
- if (sp->jpeglosslesspredictors) {
- _TIFFfree(sp->jpeglosslesspredictors);
- sp->jpeglosslesspredictors = 0;
- }
- if (sp->jpegpointtransform) {
- _TIFFfree(sp->jpegpointtransform);
- sp->jpegpointtransform=0;
- }
- if (sp->jpegqtables) {_TIFFfree(sp->jpegqtables);sp->jpegqtables=0;}
- if (sp->jpegactables) {_TIFFfree(sp->jpegactables);sp->jpegactables=0;}
- if (sp->jpegdctables) {_TIFFfree(sp->jpegdctables);sp->jpegdctables=0;}
- /* If the image file isn't "memory mapped" and we read it all into a
- single, large memory buffer, free the buffer now.
- */
- if (!isMapped(tif) && tif->tif_base) /* free whole-file buffer */
- {
- _TIFFfree(tif->tif_base);
- tif->tif_base = 0;
- tif->tif_size = 0;
- };
- _TIFFfree(sp); /* Release local variables */
- tif->tif_data = 0;
- }
- }
+OJPEGWriteStreamSoi(TIFF* tif, void** mem, uint32* len)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ assert(OJPEG_BUFFER>=2);
+ sp->out_buffer[0]=255;
+ sp->out_buffer[1]=JPEG_MARKER_SOI;
+ *len=2;
+ *mem=(void*)sp->out_buffer;
+ sp->out_state++;
+}
+
+static void
+OJPEGWriteStreamQTable(TIFF* tif, uint8 table_index, void** mem, uint32* len)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ if (sp->qtable[table_index]!=0)
+ {
+ *mem=(void*)(sp->qtable[table_index]+sizeof(uint32));
+ *len=*((uint32*)sp->qtable[table_index])-sizeof(uint32);
+ }
+ sp->out_state++;
+}
+
+static void
+OJPEGWriteStreamDcTable(TIFF* tif, uint8 table_index, void** mem, uint32* len)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ if (sp->dctable[table_index]!=0)
+ {
+ *mem=(void*)(sp->dctable[table_index]+sizeof(uint32));
+ *len=*((uint32*)sp->dctable[table_index])-sizeof(uint32);
+ }
+ sp->out_state++;
+}
+
+static void
+OJPEGWriteStreamAcTable(TIFF* tif, uint8 table_index, void** mem, uint32* len)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ if (sp->actable[table_index]!=0)
+ {
+ *mem=(void*)(sp->actable[table_index]+sizeof(uint32));
+ *len=*((uint32*)sp->actable[table_index])-sizeof(uint32);
+ }
+ sp->out_state++;
+}
+
+static void
+OJPEGWriteStreamDri(TIFF* tif, void** mem, uint32* len)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ assert(OJPEG_BUFFER>=6);
+ if (sp->restart_interval!=0)
+ {
+ sp->out_buffer[0]=255;
+ sp->out_buffer[1]=JPEG_MARKER_DRI;
+ sp->out_buffer[2]=0;
+ sp->out_buffer[3]=4;
+ sp->out_buffer[4]=(sp->restart_interval>>8);
+ sp->out_buffer[5]=(sp->restart_interval&255);
+ *len=6;
+ *mem=(void*)sp->out_buffer;
+ }
+ sp->out_state++;
+}
+
+static void
+OJPEGWriteStreamSof(TIFF* tif, void** mem, uint32* len)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint8 m;
+ assert(OJPEG_BUFFER>=2+8+sp->samples_per_pixel_per_plane*3);
+ assert(255>=8+sp->samples_per_pixel_per_plane*3);
+ sp->out_buffer[0]=255;
+ sp->out_buffer[1]=sp->sof_marker_id;
+ /* Lf */
+ sp->out_buffer[2]=0;
+ sp->out_buffer[3]=8+sp->samples_per_pixel_per_plane*3;
+ /* P */
+ sp->out_buffer[4]=8;
+ /* Y */
+ sp->out_buffer[5]=(sp->sof_y>>8);
+ sp->out_buffer[6]=(sp->sof_y&255);
+ /* X */
+ sp->out_buffer[7]=(sp->sof_x>>8);
+ sp->out_buffer[8]=(sp->sof_x&255);
+ /* Nf */
+ sp->out_buffer[9]=sp->samples_per_pixel_per_plane;
+ for (m=0; m<sp->samples_per_pixel_per_plane; m++)
+ {
+ /* C */
+ sp->out_buffer[10+m*3]=sp->sof_c[sp->plane_sample_offset+m];
+ /* H and V */
+ sp->out_buffer[10+m*3+1]=sp->sof_hv[sp->plane_sample_offset+m];
+ /* Tq */
+ sp->out_buffer[10+m*3+2]=sp->sof_tq[sp->plane_sample_offset+m];
+ }
+ *len=10+sp->samples_per_pixel_per_plane*3;
+ *mem=(void*)sp->out_buffer;
+ sp->out_state++;
+}
+
+static void
+OJPEGWriteStreamSos(TIFF* tif, void** mem, uint32* len)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ uint8 m;
+ assert(OJPEG_BUFFER>=2+6+sp->samples_per_pixel_per_plane*2);
+ assert(255>=6+sp->samples_per_pixel_per_plane*2);
+ sp->out_buffer[0]=255;
+ sp->out_buffer[1]=JPEG_MARKER_SOS;
+ /* Ls */
+ sp->out_buffer[2]=0;
+ sp->out_buffer[3]=6+sp->samples_per_pixel_per_plane*2;
+ /* Ns */
+ sp->out_buffer[4]=sp->samples_per_pixel_per_plane;
+ for (m=0; m<sp->samples_per_pixel_per_plane; m++)
+ {
+ /* Cs */
+ sp->out_buffer[5+m*2]=sp->sos_cs[sp->plane_sample_offset+m];
+ /* Td and Ta */
+ sp->out_buffer[5+m*2+1]=sp->sos_tda[sp->plane_sample_offset+m];
+ }
+ /* Ss */
+ sp->out_buffer[5+sp->samples_per_pixel_per_plane*2]=0;
+ /* Se */
+ sp->out_buffer[5+sp->samples_per_pixel_per_plane*2+1]=63;
+ /* Ah and Al */
+ sp->out_buffer[5+sp->samples_per_pixel_per_plane*2+2]=0;
+ *len=8+sp->samples_per_pixel_per_plane*2;
+ *mem=(void*)sp->out_buffer;
+ sp->out_state++;
+}
+
+static int
+OJPEGWriteStreamCompressed(TIFF* tif, void** mem, uint32* len)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ if (sp->in_buffer_togo==0)
+ {
+ if (OJPEGReadBufferFill(sp)==0)
+ return(0);
+ assert(sp->in_buffer_togo>0);
+ }
+ *len=sp->in_buffer_togo;
+ *mem=(void*)sp->in_buffer_cur;
+ sp->in_buffer_togo=0;
+ if (sp->in_buffer_file_togo==0)
+ {
+ switch(sp->in_buffer_source)
+ {
+ case osibsStrile:
+ if (sp->in_buffer_next_strile<sp->in_buffer_strile_count)
+ sp->out_state=ososRst;
+ else
+ sp->out_state=ososEoi;
+ break;
+ case osibsEof:
+ sp->out_state=ososEoi;
+ break;
+ default:
+ break;
+ }
+ }
+ return(1);
+}
+
+static void
+OJPEGWriteStreamRst(TIFF* tif, void** mem, uint32* len)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ assert(OJPEG_BUFFER>=2);
+ sp->out_buffer[0]=255;
+ sp->out_buffer[1]=JPEG_MARKER_RST0+sp->restart_index;
+ sp->restart_index++;
+ if (sp->restart_index==8)
+ sp->restart_index=0;
+ *len=2;
+ *mem=(void*)sp->out_buffer;
+ sp->out_state=ososCompressed;
+}
+
+static void
+OJPEGWriteStreamEoi(TIFF* tif, void** mem, uint32* len)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ assert(OJPEG_BUFFER>=2);
+ sp->out_buffer[0]=255;
+ sp->out_buffer[1]=JPEG_MARKER_EOI;
+ *len=2;
+ *mem=(void*)sp->out_buffer;
+}
+
+#ifndef LIBJPEG_ENCAP_EXTERNAL
+static int
+jpeg_create_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo)
+{
+ return(SETJMP(sp->exit_jmpbuf)?0:(jpeg_create_decompress(cinfo),1));
+}
+#endif
+
+#ifndef LIBJPEG_ENCAP_EXTERNAL
+static int
+jpeg_read_header_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, uint8 require_image)
+{
+ return(SETJMP(sp->exit_jmpbuf)?0:(jpeg_read_header(cinfo,require_image),1));
+}
+#endif
+
+#ifndef LIBJPEG_ENCAP_EXTERNAL
+static int
+jpeg_start_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo)
+{
+ return(SETJMP(sp->exit_jmpbuf)?0:(jpeg_start_decompress(cinfo),1));
+}
+#endif
+
+#ifndef LIBJPEG_ENCAP_EXTERNAL
+static int
+jpeg_read_scanlines_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, void* scanlines, uint32 max_lines)
+{
+ return(SETJMP(sp->exit_jmpbuf)?0:(jpeg_read_scanlines(cinfo,scanlines,max_lines),1));
+}
+#endif
+
+#ifndef LIBJPEG_ENCAP_EXTERNAL
+static int
+jpeg_read_raw_data_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, void* data, uint32 max_lines)
+{
+ return(SETJMP(sp->exit_jmpbuf)?0:(jpeg_read_raw_data(cinfo,data,max_lines),1));
+}
+#endif
+
+#ifndef LIBJPEG_ENCAP_EXTERNAL
+static void
+jpeg_encap_unwind(TIFF* tif)
+{
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ LONGJMP(sp->exit_jmpbuf,1);
+}
+#endif
+
+static void
+OJPEGLibjpegJpegErrorMgrOutputMessage(jpeg_common_struct* cinfo)
+{
+ char buffer[JMSG_LENGTH_MAX];
+ (*cinfo->err->format_message)(cinfo,buffer);
+ TIFFWarningExt(((TIFF*)(cinfo->client_data))->tif_clientdata,"LibJpeg", "%s", buffer);
+}
+
+static void
+OJPEGLibjpegJpegErrorMgrErrorExit(jpeg_common_struct* cinfo)
+{
+ char buffer[JMSG_LENGTH_MAX];
+ (*cinfo->err->format_message)(cinfo,buffer);
+ TIFFErrorExt(((TIFF*)(cinfo->client_data))->tif_clientdata,"LibJpeg", "%s", buffer);
+ jpeg_encap_unwind((TIFF*)(cinfo->client_data));
+}
+
+static void
+OJPEGLibjpegJpegSourceMgrInitSource(jpeg_decompress_struct* cinfo)
+{
+ (void)cinfo;
+}
+
+static boolean
+OJPEGLibjpegJpegSourceMgrFillInputBuffer(jpeg_decompress_struct* cinfo)
+{
+ TIFF* tif=(TIFF*)cinfo->client_data;
+ OJPEGState* sp=(OJPEGState*)tif->tif_data;
+ void* mem=0;
+ uint32 len=0;
+ if (OJPEGWriteStream(tif,&mem,&len)==0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,"LibJpeg","Premature end of JPEG data");
+ jpeg_encap_unwind(tif);
+ }
+ sp->libjpeg_jpeg_source_mgr.bytes_in_buffer=len;
+ sp->libjpeg_jpeg_source_mgr.next_input_byte=mem;
+ return(1);
+}
+
+static void
+OJPEGLibjpegJpegSourceMgrSkipInputData(jpeg_decompress_struct* cinfo, long num_bytes)
+{
+ TIFF* tif=(TIFF*)cinfo->client_data;
+ (void)num_bytes;
+ TIFFErrorExt(tif->tif_clientdata,"LibJpeg","Unexpected error");
+ jpeg_encap_unwind(tif);
+}
+
+static boolean
+OJPEGLibjpegJpegSourceMgrResyncToRestart(jpeg_decompress_struct* cinfo, int desired)
+{
+ TIFF* tif=(TIFF*)cinfo->client_data;
+ (void)desired;
+ TIFFErrorExt(tif->tif_clientdata,"LibJpeg","Unexpected error");
+ jpeg_encap_unwind(tif);
+ return(0);
+}
+
+static void
+OJPEGLibjpegJpegSourceMgrTermSource(jpeg_decompress_struct* cinfo)
+{
+ (void)cinfo;
+}
+
+#endif
-int
-TIFFInitOJPEG(register TIFF *tif,int scheme)
- { register OJPEGState *sp;
-# define td (&tif->tif_dir)
-# ifndef never
-
- /* This module supports a decompression-only CODEC, which is intended strictly
- for viewing old image files using the obsolete JPEG-in-TIFF encapsulation
- specified by the TIFF Version 6.0 specification. It does not, and never
- should, support compression for new images. If a client application asks us
- to, refuse and complain loudly!
- */
- if (tif->tif_mode != O_RDONLY) return _notSupported(tif);
-# endif /* never */
- if (!isMapped(tif))
- {
-
- /* BEWARE OF KLUDGE: If our host operating-system doesn't let an image
- file be "memory mapped", then we want to read the
- entire file into a single (possibly large) memory buffer as if it had
- been "memory mapped". Although this is likely to waste space, because
- analysis of the file's content might cause parts of it to be read into
- smaller buffers duplicatively, it appears to be the lesser of several
- evils. Very old JPEG-in-TIFF encapsulations aren't guaranteed to be
- JFIF bit streams, or to have a TIFF "JPEGTables" record or much other
- "metadata" to help us locate the decoding tables and entropy-coded data,
- so we're likely do a lot of random-access grokking around, and we must
- ultimately tell the JPEG Library to sequentially scan much of the file
- anyway. This is all likely to be easier if we use "brute force" to
- read the entire file, once, and don't use incremental disc I/O. If our
- client application tries to process a file so big that we can't buffer
- it entirely, then tough shit: we'll give up and exit!
- */
- if (!(tif->tif_base = _TIFFmalloc(tif->tif_size=TIFFGetFileSize(tif))))
- {
- TIFFError(tif->tif_name,"Cannot allocate file buffer");
- return 0;
- };
- if (!SeekOK(tif,0) || !ReadOK(tif,tif->tif_base,tif->tif_size))
- {
- TIFFError(tif->tif_name,"Cannot read file");
- return 0;
- }
- };
-
- /* Allocate storage for this module's per-file variables. */
-
- if (!(tif->tif_data = (tidata_t)_TIFFmalloc(sizeof *sp)))
- {
- TIFFError("TIFFInitOJPEG","No space for JPEG state block");
- return 0;
- };
- (sp = OJState(tif))->tif = tif; /* Initialize reverse pointer */
- sp->cinfo.d.err = jpeg_std_error(&sp->err); /* Initialize error handling */
- sp->err.error_exit = TIFFojpeg_error_exit;
- sp->err.output_message = TIFFojpeg_output_message;
- if (!CALLVJPEG(sp,jpeg_create_decompress(&sp->cinfo.d))) return 0;
-
- /* Install CODEC-specific tag information and override default TIFF Library
- "method" subroutines with our own, CODEC-specific methods. Like all good
- members of an object-class, we save some of these subroutine pointers for
- "fall back" in case our own methods fail.
- */
- _TIFFMergeFieldInfo(tif,ojpegFieldInfo,
- sizeof ojpegFieldInfo/sizeof *ojpegFieldInfo);
- sp->defsparent = tif->tif_defstripsize;
- sp->deftparent = tif->tif_deftilesize;
- sp->vgetparent = tif->tif_tagmethods.vgetfield;
- sp->vsetparent = tif->tif_tagmethods.vsetfield;
- tif->tif_defstripsize = OJPEGDefaultStripSize;
- tif->tif_deftilesize = OJPEGDefaultTileSize;
- tif->tif_tagmethods.vgetfield = OJPEGVGetField;
- tif->tif_tagmethods.vsetfield = OJPEGVSetField;
- tif->tif_tagmethods.printdir = OJPEGPrintDir;
-# ifdef never
- tif->tif_setupencode = OJPEGSetupEncode;
- tif->tif_preencode = OJPEGPreEncode;
- tif->tif_postencode = OJPEGPostEncode;
-# else /* well, hardly ever */
- tif->tif_setupencode = tif->tif_postencode = _notSupported;
- tif->tif_preencode = (TIFFPreMethod)_notSupported;
-# endif /* never */
- tif->tif_setupdecode = OJPEGSetupDecode;
- tif->tif_predecode = OJPEGPreDecode;
- tif->tif_postdecode = OJPEGPostDecode;
- tif->tif_cleanup = OJPEGCleanUp;
-
- /* If the image file doesn't have "JPEGInterchangeFormat[Length]" TIFF records
- to guide us, we have few clues about where its encapsulated JPEG bit stream
- is located, so establish intelligent defaults: If the Image File Directory
- doesn't immediately follow the TIFF header, assume that the JPEG data lies
- in between; otherwise, assume that it follows the Image File Directory.
- */
- if (tif->tif_header.tiff_diroff > sizeof tif->tif_header)
- {
- sp->src.next_input_byte = tif->tif_base + sizeof tif->tif_header;
- sp->src.bytes_in_buffer = tif->tif_header.tiff_diroff
- - sizeof tif->tif_header;
- }
- else /* this case is ugly! */
- { uint32 maxoffset = tif->tif_size;
- uint16 dircount;
-
- /* Calculate the offset to the next Image File Directory, if there is one,
- or to the end of the file, if not. Then arrange to read the file from
- the end of the Image File Directory to that offset.
- */
- if (tif->tif_nextdiroff) maxoffset = tif->tif_nextdiroff; /* Not EOF */
- _TIFFmemcpy(&dircount,(const tdata_t)
- (sp->src.next_input_byte = tif->tif_base+tif->tif_header.tiff_diroff),
- sizeof dircount);
- if (tif->tif_flags & TIFF_SWAB) TIFFSwabShort(&dircount);
- sp->src.next_input_byte += dircount*sizeof(TIFFDirEntry)
- + sizeof maxoffset + sizeof dircount;
- sp->src.bytes_in_buffer = tif->tif_base - sp->src.next_input_byte
- + maxoffset;
- };
-
- /* IJG JPEG Library Version 6B can be configured for either 8- or 12-bit sample
- precision, but we assume that "old JPEG" TIFF clients only need 8 bits.
- */
- sp->cinfo.d.data_precision = 8;
-# ifdef C_LOSSLESS_SUPPORTED
- /* If the "JPEGProc" TIFF tag is missing from the Image File Dictionary, the
- JPEG Library will use its (lossy) baseline sequential process by default.
- */
- sp->cinfo.d.data_unit = DCTSIZE;
-# endif /* C_LOSSLESS_SUPPORTED */
-
- /* Initialize other CODEC-specific variables requiring default values. */
-
- tif->tif_flags |= TIFF_NOBITREV; /* No bit-reversal within data bytes */
- sp->h_sampling = sp->v_sampling = 1; /* No subsampling by default */
- sp->is_WANG = 0; /* Assume not a MS Windows Wang Imaging file by default */
- sp->jpegtables = 0; /* No "new"-style JPEG tables synthesized yet */
- sp->jpegtables_length = 0;
- sp->jpegquality = 75; /* Default IJG quality */
- sp->jpegcolormode = JPEGCOLORMODE_RAW;
- sp->jpegtablesmode = 0; /* No tables found yet */
- sp->jpeglosslesspredictors=0;
- sp->jpeglosslesspredictors_length=0;
- sp->jpegpointtransform=0;
- sp->jpegpointtransform_length=0;
- sp->jpegqtables=0;
- sp->jpegqtables_length=0;
- sp->jpegdctables=0;
- sp->jpegdctables_length=0;
- sp->jpegactables=0;
- sp->jpegactables_length=0;
- return 1;
-# undef td
- }
-#endif /* OJPEG_SUPPORT */
-
-/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/src/3rdparty/libtiff/libtiff/tif_open.c b/src/3rdparty/libtiff/libtiff/tif_open.c
index c6e8b64565..a567056ce7 100644
--- a/src/3rdparty/libtiff/libtiff/tif_open.c
+++ b/src/3rdparty/libtiff/libtiff/tif_open.c
@@ -1,4 +1,4 @@
-/* $Id: tif_open.c,v 1.31 2006/03/16 12:23:02 dron Exp $ */
+/* $Id: tif_open.c,v 1.33 2006/06/08 14:27:17 dron Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -198,7 +198,7 @@ TIFFClientOpen(
*/
tif->tif_flags = FILLORDER_MSB2LSB;
if (m == O_RDONLY )
- tif->tif_flags |= TIFF_MAPPED;
+ tif->tif_flags |= TIFF_MAPPED;
#ifdef STRIPCHOP_DEFAULT
if (m == O_RDONLY || m == O_RDWR)
@@ -307,7 +307,8 @@ TIFFClientOpen(
if (tif->tif_mode & O_TRUNC ||
!ReadOK(tif, &tif->tif_header, sizeof (TIFFHeader))) {
if (tif->tif_mode == O_RDONLY) {
- TIFFErrorExt(tif->tif_clientdata, name, "Cannot read TIFF header");
+ TIFFErrorExt(tif->tif_clientdata, name,
+ "Cannot read TIFF header");
goto bad;
}
/*
@@ -336,7 +337,8 @@ TIFFClientOpen(
TIFFSeekFile( tif, 0, SEEK_SET );
if (!WriteOK(tif, &tif->tif_header, sizeof (TIFFHeader))) {
- TIFFErrorExt(tif->tif_clientdata, name, "Error writing TIFF header");
+ TIFFErrorExt(tif->tif_clientdata, name,
+ "Error writing TIFF header");
goto bad;
}
/*
@@ -350,6 +352,7 @@ TIFFClientOpen(
goto bad;
tif->tif_diroff = 0;
tif->tif_dirlist = NULL;
+ tif->tif_dirlistsize = 0;
tif->tif_dirnumber = 0;
return (tif);
}
@@ -366,10 +369,12 @@ TIFFClientOpen(
tif->tif_header.tiff_magic != MDI_LITTLEENDIAN
#endif
) {
- TIFFErrorExt(tif->tif_clientdata, name, "Not a TIFF or MDI file, bad magic number %d (0x%x)",
+ TIFFErrorExt(tif->tif_clientdata, name,
+ "Not a TIFF or MDI file, bad magic number %d (0x%x)",
#else
) {
- TIFFErrorExt(tif->tif_clientdata, name, "Not a TIFF file, bad magic number %d (0x%x)",
+ TIFFErrorExt(tif->tif_clientdata, name,
+ "Not a TIFF file, bad magic number %d (0x%x)",
#endif
tif->tif_header.tiff_magic,
tif->tif_header.tiff_magic);
@@ -398,7 +403,7 @@ TIFFClientOpen(
TIFFErrorExt(tif->tif_clientdata, name,
"Not a TIFF file, bad version number %d (0x%x)",
tif->tif_header.tiff_version,
- tif->tif_header.tiff_version);
+ tif->tif_header.tiff_version);
goto bad;
}
tif->tif_flags |= TIFF_MYBUFFER;
diff --git a/src/3rdparty/libtiff/libtiff/tif_packbits.c b/src/3rdparty/libtiff/libtiff/tif_packbits.c
index 0225b3e612..171a2692a8 100644
--- a/src/3rdparty/libtiff/libtiff/tif_packbits.c
+++ b/src/3rdparty/libtiff/libtiff/tif_packbits.c
@@ -1,4 +1,4 @@
-/* $Id: tif_packbits.c,v 1.13 2006/02/07 11:03:29 dron Exp $ */
+/* $Id: tif_packbits.c,v 1.13.2.1 2009-01-01 00:10:43 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -240,7 +240,7 @@ PackBitsDecode(TIFF* tif, tidata_t op, tsize_t occ, tsample_t s)
if( occ < n )
{
TIFFWarningExt(tif->tif_clientdata, tif->tif_name,
- "PackBitsDecode: discarding %d bytes "
+ "PackBitsDecode: discarding %ld bytes "
"to avoid buffer overrun",
n - occ);
n = occ;
@@ -253,7 +253,7 @@ PackBitsDecode(TIFF* tif, tidata_t op, tsize_t occ, tsample_t s)
if (occ < n + 1)
{
TIFFWarningExt(tif->tif_clientdata, tif->tif_name,
- "PackBitsDecode: discarding %d bytes "
+ "PackBitsDecode: discarding %ld bytes "
"to avoid buffer overrun",
n - occ + 1);
n = occ - 1;
diff --git a/src/3rdparty/libtiff/libtiff/tif_pixarlog.c b/src/3rdparty/libtiff/libtiff/tif_pixarlog.c
index c68deb3dd0..5ad84f8b80 100644
--- a/src/3rdparty/libtiff/libtiff/tif_pixarlog.c
+++ b/src/3rdparty/libtiff/libtiff/tif_pixarlog.c
@@ -1,4 +1,4 @@
-/* $Id: tif_pixarlog.c,v 1.14 2006/03/16 12:38:24 dron Exp $ */
+/* $Id: tif_pixarlog.c,v 1.15.2.3 2009-01-01 00:10:43 bfriesen Exp $ */
/*
* Copyright (c) 1996-1997 Sam Leffler
@@ -327,7 +327,7 @@ horizontalAccumulate11(uint16 *wp, int n, int stride, uint16 *op)
while (n > 0) {
REPEAT(stride,
wp[stride] += *wp; *op = *wp&mask; wp++; op++)
- n -= stride;
+ n -= stride;
}
}
}
@@ -593,7 +593,6 @@ PixarLogMakeTables(PixarLogState *sp)
static int PixarLogEncode(TIFF*, tidata_t, tsize_t, tsample_t);
static int PixarLogDecode(TIFF*, tidata_t, tsize_t, tsample_t);
-#define N(a) (sizeof(a)/sizeof(a[0]))
#define PIXARLOGDATAFMT_UNKNOWN -1
static int
@@ -768,6 +767,18 @@ PixarLogDecode(TIFF* tif, tidata_t op, tsize_t occ, tsample_t s)
if (tif->tif_flags & TIFF_SWAB)
TIFFSwabArrayOfShort(up, nsamples);
+ /*
+ * if llen is not an exact multiple of nsamples, the decode operation
+ * may overflow the output buffer, so truncate it enough to prevent
+ * that but still salvage as much data as possible.
+ */
+ if (nsamples % llen) {
+ TIFFWarningExt(tif->tif_clientdata, module,
+ "%s: stride %d is not a multiple of sample count, "
+ "%d, data truncated.", tif->tif_name, llen, nsamples);
+ nsamples -= nsamples % llen;
+ }
+
for (i = 0; i < nsamples; i += llen, up += llen) {
switch (sp->user_datafmt) {
case PIXARLOGDATAFMT_FLOAT:
@@ -1036,7 +1047,7 @@ PixarLogEncode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
TIFFDirectory *td = &tif->tif_dir;
PixarLogState *sp = EncoderState(tif);
static const char module[] = "PixarLogEncode";
- int i, n, llen;
+ int i, n, llen;
unsigned short * up;
(void) s;
@@ -1278,11 +1289,23 @@ static const TIFFFieldInfo pixarlogFieldInfo[] = {
int
TIFFInitPixarLog(TIFF* tif, int scheme)
{
+ static const char module[] = "TIFFInitPixarLog";
+
PixarLogState* sp;
assert(scheme == COMPRESSION_PIXARLOG);
/*
+ * Merge codec-specific tag information.
+ */
+ if (!_TIFFMergeFieldInfo(tif, pixarlogFieldInfo,
+ TIFFArrayCount(pixarlogFieldInfo))) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Merging PixarLog codec-specific tags failed");
+ return 0;
+ }
+
+ /*
* Allocate state block so tag methods have storage to record values.
*/
tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (PixarLogState));
@@ -1311,7 +1334,6 @@ TIFFInitPixarLog(TIFF* tif, int scheme)
tif->tif_cleanup = PixarLogCleanup;
/* Override SetField so we can handle our private pseudo-tag */
- _TIFFMergeFieldInfo(tif, pixarlogFieldInfo, N(pixarlogFieldInfo));
sp->vgetparent = tif->tif_tagmethods.vgetfield;
tif->tif_tagmethods.vgetfield = PixarLogVGetField; /* hook for codec tags */
sp->vsetparent = tif->tif_tagmethods.vsetfield;
@@ -1333,7 +1355,7 @@ TIFFInitPixarLog(TIFF* tif, int scheme)
return (1);
bad:
- TIFFErrorExt(tif->tif_clientdata, "TIFFInitPixarLog",
+ TIFFErrorExt(tif->tif_clientdata, module,
"No space for PixarLog state block");
return (0);
}
diff --git a/src/3rdparty/libtiff/libtiff/tif_predict.c b/src/3rdparty/libtiff/libtiff/tif_predict.c
index d3e604d5d9..052a8e2f0a 100644
--- a/src/3rdparty/libtiff/libtiff/tif_predict.c
+++ b/src/3rdparty/libtiff/libtiff/tif_predict.c
@@ -1,4 +1,4 @@
-/* $Id: tif_predict.c,v 1.11 2006/03/03 14:10:09 dron Exp $ */
+/* $Id: tif_predict.c,v 1.11.2.3 2009-01-23 15:57:18 fwarmerdam Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -36,9 +36,12 @@
static void horAcc8(TIFF*, tidata_t, tsize_t);
static void horAcc16(TIFF*, tidata_t, tsize_t);
+static void horAcc32(TIFF*, tidata_t, tsize_t);
static void swabHorAcc16(TIFF*, tidata_t, tsize_t);
+static void swabHorAcc32(TIFF*, tidata_t, tsize_t);
static void horDiff8(TIFF*, tidata_t, tsize_t);
static void horDiff16(TIFF*, tidata_t, tsize_t);
+static void horDiff32(TIFF*, tidata_t, tsize_t);
static void fpAcc(TIFF*, tidata_t, tsize_t);
static void fpDiff(TIFF*, tidata_t, tsize_t);
static int PredictorDecodeRow(TIFF*, tidata_t, tsize_t, tsample_t);
@@ -60,7 +63,8 @@ PredictorSetup(TIFF* tif)
return 1;
case PREDICTOR_HORIZONTAL:
if (td->td_bitspersample != 8
- && td->td_bitspersample != 16) {
+ && td->td_bitspersample != 16
+ && td->td_bitspersample != 32) {
TIFFErrorExt(tif->tif_clientdata, module,
"Horizontal differencing \"Predictor\" not supported with %d-bit samples",
td->td_bitspersample);
@@ -105,19 +109,23 @@ PredictorSetupDecode(TIFF* tif)
if (sp->predictor == 2) {
switch (td->td_bitspersample) {
- case 8: sp->pfunc = horAcc8; break;
- case 16: sp->pfunc = horAcc16; break;
+ case 8: sp->decodepfunc = horAcc8; break;
+ case 16: sp->decodepfunc = horAcc16; break;
+ case 32: sp->decodepfunc = horAcc32; break;
}
/*
* Override default decoding method with one that does the
* predictor stuff.
*/
- sp->coderow = tif->tif_decoderow;
- tif->tif_decoderow = PredictorDecodeRow;
- sp->codestrip = tif->tif_decodestrip;
- tif->tif_decodestrip = PredictorDecodeTile;
- sp->codetile = tif->tif_decodetile;
- tif->tif_decodetile = PredictorDecodeTile;
+ if( tif->tif_decoderow != PredictorDecodeRow )
+ {
+ sp->decoderow = tif->tif_decoderow;
+ tif->tif_decoderow = PredictorDecodeRow;
+ sp->decodestrip = tif->tif_decodestrip;
+ tif->tif_decodestrip = PredictorDecodeTile;
+ sp->decodetile = tif->tif_decodetile;
+ tif->tif_decodetile = PredictorDecodeTile;
+ }
/*
* If the data is horizontally differenced 16-bit data that
* requires byte-swapping, then it must be byte swapped before
@@ -126,25 +134,31 @@ PredictorSetupDecode(TIFF* tif)
* the library setup when the directory was read.
*/
if (tif->tif_flags & TIFF_SWAB) {
- if (sp->pfunc == horAcc16) {
- sp->pfunc = swabHorAcc16;
+ if (sp->decodepfunc == horAcc16) {
+ sp->decodepfunc = swabHorAcc16;
tif->tif_postdecode = _TIFFNoPostDecode;
- } /* else handle 32-bit case... */
+ } else if (sp->decodepfunc == horAcc32) {
+ sp->decodepfunc = swabHorAcc32;
+ tif->tif_postdecode = _TIFFNoPostDecode;
+ }
}
}
else if (sp->predictor == 3) {
- sp->pfunc = fpAcc;
+ sp->decodepfunc = fpAcc;
/*
* Override default decoding method with one that does the
* predictor stuff.
*/
- sp->coderow = tif->tif_decoderow;
- tif->tif_decoderow = PredictorDecodeRow;
- sp->codestrip = tif->tif_decodestrip;
- tif->tif_decodestrip = PredictorDecodeTile;
- sp->codetile = tif->tif_decodetile;
- tif->tif_decodetile = PredictorDecodeTile;
+ if( tif->tif_decoderow != PredictorDecodeRow )
+ {
+ sp->decoderow = tif->tif_decoderow;
+ tif->tif_decoderow = PredictorDecodeRow;
+ sp->decodestrip = tif->tif_decodestrip;
+ tif->tif_decodestrip = PredictorDecodeTile;
+ sp->decodetile = tif->tif_decodetile;
+ tif->tif_decodetile = PredictorDecodeTile;
+ }
/*
* The data should not be swapped outside of the floating
* point predictor, the accumulation routine should return
@@ -173,33 +187,40 @@ PredictorSetupEncode(TIFF* tif)
if (sp->predictor == 2) {
switch (td->td_bitspersample) {
- case 8: sp->pfunc = horDiff8; break;
- case 16: sp->pfunc = horDiff16; break;
+ case 8: sp->encodepfunc = horDiff8; break;
+ case 16: sp->encodepfunc = horDiff16; break;
+ case 32: sp->encodepfunc = horDiff32; break;
}
/*
* Override default encoding method with one that does the
* predictor stuff.
*/
- sp->coderow = tif->tif_encoderow;
- tif->tif_encoderow = PredictorEncodeRow;
- sp->codestrip = tif->tif_encodestrip;
- tif->tif_encodestrip = PredictorEncodeTile;
- sp->codetile = tif->tif_encodetile;
- tif->tif_encodetile = PredictorEncodeTile;
+ if( tif->tif_encoderow != PredictorEncodeRow )
+ {
+ sp->encoderow = tif->tif_encoderow;
+ tif->tif_encoderow = PredictorEncodeRow;
+ sp->encodestrip = tif->tif_encodestrip;
+ tif->tif_encodestrip = PredictorEncodeTile;
+ sp->encodetile = tif->tif_encodetile;
+ tif->tif_encodetile = PredictorEncodeTile;
+ }
}
else if (sp->predictor == 3) {
- sp->pfunc = fpDiff;
+ sp->encodepfunc = fpDiff;
/*
* Override default encoding method with one that does the
* predictor stuff.
*/
- sp->coderow = tif->tif_encoderow;
- tif->tif_encoderow = PredictorEncodeRow;
- sp->codestrip = tif->tif_encodestrip;
- tif->tif_encodestrip = PredictorEncodeTile;
- sp->codetile = tif->tif_encodetile;
- tif->tif_encodetile = PredictorEncodeTile;
+ if( tif->tif_encoderow != PredictorEncodeRow )
+ {
+ sp->encoderow = tif->tif_encoderow;
+ tif->tif_encoderow = PredictorEncodeRow;
+ sp->encodestrip = tif->tif_encodestrip;
+ tif->tif_encodestrip = PredictorEncodeTile;
+ sp->encodetile = tif->tif_encodetile;
+ tif->tif_encodetile = PredictorEncodeTile;
+ }
}
return 1;
@@ -291,6 +312,39 @@ horAcc16(TIFF* tif, tidata_t cp0, tsize_t cc)
}
}
+static void
+swabHorAcc32(TIFF* tif, tidata_t cp0, tsize_t cc)
+{
+ tsize_t stride = PredictorState(tif)->stride;
+ uint32* wp = (uint32*) cp0;
+ tsize_t wc = cc / 4;
+
+ if (wc > stride) {
+ TIFFSwabArrayOfLong(wp, wc);
+ wc -= stride;
+ do {
+ REPEAT4(stride, wp[stride] += wp[0]; wp++)
+ wc -= stride;
+ } while ((int32) wc > 0);
+ }
+}
+
+static void
+horAcc32(TIFF* tif, tidata_t cp0, tsize_t cc)
+{
+ tsize_t stride = PredictorState(tif)->stride;
+ uint32* wp = (uint32*) cp0;
+ tsize_t wc = cc / 4;
+
+ if (wc > stride) {
+ wc -= stride;
+ do {
+ REPEAT4(stride, wp[stride] += wp[0]; wp++)
+ wc -= stride;
+ } while ((int32) wc > 0);
+ }
+}
+
/*
* Floating point predictor accumulation routine.
*/
@@ -337,11 +391,11 @@ PredictorDecodeRow(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
TIFFPredictorState *sp = PredictorState(tif);
assert(sp != NULL);
- assert(sp->coderow != NULL);
- assert(sp->pfunc != NULL);
+ assert(sp->decoderow != NULL);
+ assert(sp->decodepfunc != NULL);
- if ((*sp->coderow)(tif, op0, occ0, s)) {
- (*sp->pfunc)(tif, op0, occ0);
+ if ((*sp->decoderow)(tif, op0, occ0, s)) {
+ (*sp->decodepfunc)(tif, op0, occ0);
return 1;
} else
return 0;
@@ -360,14 +414,14 @@ PredictorDecodeTile(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
TIFFPredictorState *sp = PredictorState(tif);
assert(sp != NULL);
- assert(sp->codetile != NULL);
+ assert(sp->decodetile != NULL);
- if ((*sp->codetile)(tif, op0, occ0, s)) {
+ if ((*sp->decodetile)(tif, op0, occ0, s)) {
tsize_t rowsize = sp->rowsize;
assert(rowsize > 0);
- assert(sp->pfunc != NULL);
+ assert(sp->decodepfunc != NULL);
while ((long)occ0 > 0) {
- (*sp->pfunc)(tif, op0, (tsize_t) rowsize);
+ (*sp->decodepfunc)(tif, op0, (tsize_t) rowsize);
occ0 -= rowsize;
op0 += rowsize;
}
@@ -439,6 +493,24 @@ horDiff16(TIFF* tif, tidata_t cp0, tsize_t cc)
}
}
+static void
+horDiff32(TIFF* tif, tidata_t cp0, tsize_t cc)
+{
+ TIFFPredictorState* sp = PredictorState(tif);
+ tsize_t stride = sp->stride;
+ int32 *wp = (int32*) cp0;
+ tsize_t wc = cc/4;
+
+ if (wc > stride) {
+ wc -= stride;
+ wp += wc - 1;
+ do {
+ REPEAT4(stride, wp[stride] -= wp[0]; wp--)
+ wc -= stride;
+ } while ((int32) wc > 0);
+ }
+}
+
/*
* Floating point predictor differencing routine.
*/
@@ -481,33 +553,56 @@ PredictorEncodeRow(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
TIFFPredictorState *sp = PredictorState(tif);
assert(sp != NULL);
- assert(sp->pfunc != NULL);
- assert(sp->coderow != NULL);
+ assert(sp->encodepfunc != NULL);
+ assert(sp->encoderow != NULL);
/* XXX horizontal differencing alters user's data XXX */
- (*sp->pfunc)(tif, bp, cc);
- return (*sp->coderow)(tif, bp, cc, s);
+ (*sp->encodepfunc)(tif, bp, cc);
+ return (*sp->encoderow)(tif, bp, cc, s);
}
static int
PredictorEncodeTile(TIFF* tif, tidata_t bp0, tsize_t cc0, tsample_t s)
{
+ static const char module[] = "PredictorEncodeTile";
TIFFPredictorState *sp = PredictorState(tif);
+ uint8 *working_copy;
tsize_t cc = cc0, rowsize;
- unsigned char* bp = bp0;
+ unsigned char* bp;
+ int result_code;
assert(sp != NULL);
- assert(sp->pfunc != NULL);
- assert(sp->codetile != NULL);
+ assert(sp->encodepfunc != NULL);
+ assert(sp->encodetile != NULL);
+
+ /*
+ * Do predictor manipulation in a working buffer to avoid altering
+ * the callers buffer. http://trac.osgeo.org/gdal/ticket/1965
+ */
+ working_copy = (uint8*) _TIFFmalloc(cc0);
+ if( working_copy == NULL )
+ {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Out of memory allocating %d byte temp buffer.",
+ cc0 );
+ return 0;
+ }
+ memcpy( working_copy, bp0, cc0 );
+ bp = working_copy;
rowsize = sp->rowsize;
assert(rowsize > 0);
- while ((long)cc > 0) {
- (*sp->pfunc)(tif, bp, (tsize_t) rowsize);
+ assert((cc0%rowsize)==0);
+ while (cc > 0) {
+ (*sp->encodepfunc)(tif, bp, rowsize);
cc -= rowsize;
bp += rowsize;
}
- return (*sp->codetile)(tif, bp0, cc0, s);
+ result_code = (*sp->encodetile)(tif, working_copy, cc0, s);
+
+ _TIFFfree( working_copy );
+
+ return result_code;
}
#define FIELD_PREDICTOR (FIELD_CODEC+0) /* XXX */
@@ -516,7 +611,6 @@ static const TIFFFieldInfo predictFieldInfo[] = {
{ TIFFTAG_PREDICTOR, 1, 1, TIFF_SHORT, FIELD_PREDICTOR,
FALSE, FALSE, "Predictor" },
};
-#define N(a) (sizeof (a) / sizeof (a[0]))
static int
PredictorVSetField(TIFF* tif, ttag_t tag, va_list ap)
@@ -583,10 +677,18 @@ TIFFPredictorInit(TIFF* tif)
assert(sp != 0);
/*
- * Merge codec-specific tag information and
- * override parent get/set field methods.
+ * Merge codec-specific tag information.
+ */
+ if (!_TIFFMergeFieldInfo(tif, predictFieldInfo,
+ TIFFArrayCount(predictFieldInfo))) {
+ TIFFErrorExt(tif->tif_clientdata, "TIFFPredictorInit",
+ "Merging Predictor codec-specific tags failed");
+ return 0;
+ }
+
+ /*
+ * Override parent get/set field methods.
*/
- _TIFFMergeFieldInfo(tif, predictFieldInfo, N(predictFieldInfo));
sp->vgetparent = tif->tif_tagmethods.vgetfield;
tif->tif_tagmethods.vgetfield =
PredictorVGetField;/* hook for predictor tag */
@@ -603,7 +705,8 @@ TIFFPredictorInit(TIFF* tif)
tif->tif_setupencode = PredictorSetupEncode;
sp->predictor = 1; /* default value */
- sp->pfunc = NULL; /* no predictor routine */
+ sp->encodepfunc = NULL; /* no predictor routine */
+ sp->decodepfunc = NULL; /* no predictor routine */
return 1;
}
diff --git a/src/3rdparty/libtiff/libtiff/tif_predict.h b/src/3rdparty/libtiff/libtiff/tif_predict.h
index ecc7c1b422..0c1aefccdc 100644
--- a/src/3rdparty/libtiff/libtiff/tif_predict.h
+++ b/src/3rdparty/libtiff/libtiff/tif_predict.h
@@ -1,4 +1,4 @@
-/* $Id: tif_predict.h,v 1.3 2006/03/03 14:10:09 dron Exp $ */
+/* $Id: tif_predict.h,v 1.3.2.1 2007/11/22 21:24:51 fwarmerdam Exp $ */
/*
* Copyright (c) 1995-1997 Sam Leffler
@@ -40,10 +40,16 @@ typedef struct {
int stride; /* sample stride over data */
tsize_t rowsize; /* tile/strip row size */
- TIFFPostMethod pfunc; /* horizontal differencer/accumulator */
- TIFFCodeMethod coderow; /* parent codec encode/decode row */
- TIFFCodeMethod codestrip; /* parent codec encode/decode strip */
- TIFFCodeMethod codetile; /* parent codec encode/decode tile */
+ TIFFCodeMethod encoderow; /* parent codec encode/decode row */
+ TIFFCodeMethod encodestrip; /* parent codec encode/decode strip */
+ TIFFCodeMethod encodetile; /* parent codec encode/decode tile */
+ TIFFPostMethod encodepfunc; /* horizontal differencer */
+
+ TIFFCodeMethod decoderow; /* parent codec encode/decode row */
+ TIFFCodeMethod decodestrip; /* parent codec encode/decode strip */
+ TIFFCodeMethod decodetile; /* parent codec encode/decode tile */
+ TIFFPostMethod decodepfunc; /* horizontal accumulator */
+
TIFFVGetMethod vgetparent; /* super-class method */
TIFFVSetMethod vsetparent; /* super-class method */
TIFFPrintMethod printdir; /* super-class method */
diff --git a/src/3rdparty/libtiff/libtiff/tif_print.c b/src/3rdparty/libtiff/libtiff/tif_print.c
index 7b8383c2d0..871fffd614 100644
--- a/src/3rdparty/libtiff/libtiff/tif_print.c
+++ b/src/3rdparty/libtiff/libtiff/tif_print.c
@@ -1,4 +1,4 @@
-/* $Id: tif_print.c,v 1.35 2006/03/13 07:53:28 dron Exp $ */
+/* $Id: tif_print.c,v 1.36.2.2 2009-09-17 18:00:28 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -31,7 +31,7 @@
*/
#include "tiffiop.h"
#include <stdio.h>
-
+#include <string.h>
#include <ctype.h>
static const char *photoNames[] = {
@@ -491,7 +491,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
} else
fprintf(fd, "(present)\n");
}
- if (TIFFFieldSet(tif, FIELD_SUBIFD)) {
+ if (TIFFFieldSet(tif, FIELD_SUBIFD) && (td->td_subifd)) {
fprintf(fd, " SubIFD Offsets:");
for (i = 0; i < td->td_nsubifd; i++)
fprintf(fd, " %5lu", (long) td->td_subifd[i]);
@@ -509,7 +509,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
for(i = 0; i < count; i++) {
ttag_t tag = TIFFGetTagListEntry(tif, i);
const TIFFFieldInfo *fip;
- uint16 value_count;
+ uint32 value_count;
int mem_alloc = 0;
void *raw_data;
diff --git a/src/3rdparty/libtiff/libtiff/tif_read.c b/src/3rdparty/libtiff/libtiff/tif_read.c
index c7d1fba7d9..92e47469e2 100644
--- a/src/3rdparty/libtiff/libtiff/tif_read.c
+++ b/src/3rdparty/libtiff/libtiff/tif_read.c
@@ -1,4 +1,4 @@
-/* $Id: tif_read.c,v 1.13 2005/12/21 12:23:13 joris Exp $ */
+/* $Id: tif_read.c,v 1.16 2007/02/22 11:33:44 dron Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -50,8 +50,10 @@ TIFFSeek(TIFF* tif, uint32 row, tsample_t sample)
tstrip_t strip;
if (row >= td->td_imagelength) { /* out of range */
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "%lu: Row out of range, max %lu",
- (unsigned long) row, (unsigned long) td->td_imagelength);
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "%lu: Row out of range, max %lu",
+ (unsigned long) row,
+ (unsigned long) td->td_imagelength);
return (0);
}
if (td->td_planarconfig == PLANARCONFIG_SEPARATE) {
@@ -64,7 +66,7 @@ TIFFSeek(TIFF* tif, uint32 row, tsample_t sample)
strip = sample*td->td_stripsperimage + row/td->td_rowsperstrip;
} else
strip = row / td->td_rowsperstrip;
- if (strip != tif->tif_curstrip) { /* different strip, refill */
+ if (strip != tif->tif_curstrip) { /* different strip, refill */
if (!TIFFFillStrip(tif, strip))
return (0);
} else if (row < tif->tif_row) {
@@ -104,8 +106,8 @@ TIFFReadScanline(TIFF* tif, tdata_t buf, uint32 row, tsample_t sample)
e = (*tif->tif_decoderow)
(tif, (tidata_t) buf, tif->tif_scanlinesize, sample);
- /* we are now poised at the beginning of the next row */
- tif->tif_row = row + 1;
+ /* we are now poised at the beginning of the next row */
+ tif->tif_row = row + 1;
if (e)
(*tif->tif_postdecode)(tif, (tidata_t) buf,
@@ -129,22 +131,23 @@ TIFFReadEncodedStrip(TIFF* tif, tstrip_t strip, tdata_t buf, tsize_t size)
if (!TIFFCheckRead(tif, 0))
return (-1);
if (strip >= td->td_nstrips) {
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "%ld: Strip out of range, max %ld",
- (long) strip, (long) td->td_nstrips);
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "%ld: Strip out of range, max %ld",
+ (long) strip, (long) td->td_nstrips);
return (-1);
}
/*
* Calculate the strip size according to the number of
* rows in the strip (check for truncated last strip on any
- * of the separations).
+ * of the separations).
*/
- if( td->td_rowsperstrip >= td->td_imagelength )
- strips_per_sep = 1;
- else
- strips_per_sep = (td->td_imagelength+td->td_rowsperstrip-1)
- / td->td_rowsperstrip;
+ if( td->td_rowsperstrip >= td->td_imagelength )
+ strips_per_sep = 1;
+ else
+ strips_per_sep = (td->td_imagelength+td->td_rowsperstrip-1)
+ / td->td_rowsperstrip;
- sep_strip = strip % strips_per_sep;
+ sep_strip = strip % strips_per_sep;
if (sep_strip != strips_per_sep-1 ||
(nrows = td->td_imagelength % td->td_rowsperstrip) == 0)
@@ -155,9 +158,9 @@ TIFFReadEncodedStrip(TIFF* tif, tstrip_t strip, tdata_t buf, tsize_t size)
size = stripsize;
else if (size > stripsize)
size = stripsize;
- if (TIFFFillStrip(tif, strip)
- && (*tif->tif_decodestrip)(tif, (tidata_t) buf, size,
- (tsample_t)(strip / td->td_stripsperimage)) > 0 ) {
+ if (TIFFFillStrip(tif, strip)
+ && (*tif->tif_decodestrip)(tif, (tidata_t) buf, size,
+ (tsample_t)(strip / td->td_stripsperimage)) > 0 ) {
(*tif->tif_postdecode)(tif, (tidata_t) buf, size);
return (size);
} else
@@ -170,6 +173,7 @@ TIFFReadRawStrip1(TIFF* tif,
{
TIFFDirectory *td = &tif->tif_dir;
+ assert((tif->tif_flags&TIFF_NOREADRAW)==0);
if (!isMapped(tif)) {
tsize_t cc;
@@ -215,13 +219,27 @@ TIFFReadRawStrip(TIFF* tif, tstrip_t strip, tdata_t buf, tsize_t size)
{
static const char module[] = "TIFFReadRawStrip";
TIFFDirectory *td = &tif->tif_dir;
- tsize_t bytecount;
+ /*
+ * FIXME: butecount should have tsize_t type, but for now libtiff
+ * defines tsize_t as a signed 32-bit integer and we are losing
+ * ability to read arrays larger than 2^31 bytes. So we are using
+ * uint32 instead of tsize_t here.
+ */
+ uint32 bytecount;
if (!TIFFCheckRead(tif, 0))
return ((tsize_t) -1);
if (strip >= td->td_nstrips) {
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "%lu: Strip out of range, max %lu",
- (unsigned long) strip, (unsigned long) td->td_nstrips);
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "%lu: Strip out of range, max %lu",
+ (unsigned long) strip,
+ (unsigned long) td->td_nstrips);
+ return ((tsize_t) -1);
+ }
+ if (tif->tif_flags&TIFF_NOREADRAW)
+ {
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "Compression scheme does not support access to raw uncompressed data");
return ((tsize_t) -1);
}
bytecount = td->td_stripbytecount[strip];
@@ -231,88 +249,110 @@ TIFFReadRawStrip(TIFF* tif, tstrip_t strip, tdata_t buf, tsize_t size)
(unsigned long) bytecount, (unsigned long) strip);
return ((tsize_t) -1);
}
- if (size != (tsize_t)-1 && size < bytecount)
+ if (size != (tsize_t)-1 && (uint32)size < bytecount)
bytecount = size;
return (TIFFReadRawStrip1(tif, strip, buf, bytecount, module));
}
/*
- * Read the specified strip and setup for decoding.
- * The data buffer is expanded, as necessary, to
- * hold the strip's data.
+ * Read the specified strip and setup for decoding. The data buffer is
+ * expanded, as necessary, to hold the strip's data.
*/
int
TIFFFillStrip(TIFF* tif, tstrip_t strip)
{
static const char module[] = "TIFFFillStrip";
TIFFDirectory *td = &tif->tif_dir;
- tsize_t bytecount;
- bytecount = td->td_stripbytecount[strip];
- if (bytecount <= 0) {
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
- "%lu: Invalid strip byte count, strip %lu",
- (unsigned long) bytecount, (unsigned long) strip);
- return (0);
- }
- if (isMapped(tif) &&
- (isFillOrder(tif, td->td_fillorder)
- || (tif->tif_flags & TIFF_NOBITREV))) {
+ if ((tif->tif_flags&TIFF_NOREADRAW)==0)
+ {
/*
- * The image is mapped into memory and we either don't
- * need to flip bits or the compression routine is going
- * to handle this operation itself. In this case, avoid
- * copying the raw data and instead just reference the
- * data from the memory mapped file image. This assumes
- * that the decompression routines do not modify the
- * contents of the raw data buffer (if they try to,
- * the application will get a fault since the file is
- * mapped read-only).
+ * FIXME: butecount should have tsize_t type, but for now
+ * libtiff defines tsize_t as a signed 32-bit integer and we
+ * are losing ability to read arrays larger than 2^31 bytes.
+ * So we are using uint32 instead of tsize_t here.
*/
- if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata)
- _TIFFfree(tif->tif_rawdata);
- tif->tif_flags &= ~TIFF_MYBUFFER;
- if ( td->td_stripoffset[strip] + bytecount > tif->tif_size) {
- /*
- * This error message might seem strange, but it's
- * what would happen if a read were done instead.
- */
+ uint32 bytecount = td->td_stripbytecount[strip];
+ if (bytecount <= 0) {
TIFFErrorExt(tif->tif_clientdata, module,
- "%s: Read error on strip %lu; got %lu bytes, expected %lu",
- tif->tif_name,
- (unsigned long) strip,
- (unsigned long) tif->tif_size - td->td_stripoffset[strip],
- (unsigned long) bytecount);
- tif->tif_curstrip = NOSTRIP;
+ "%s: Invalid strip byte count %lu, strip %lu",
+ tif->tif_name, (unsigned long) bytecount,
+ (unsigned long) strip);
return (0);
}
- tif->tif_rawdatasize = bytecount;
- tif->tif_rawdata = tif->tif_base + td->td_stripoffset[strip];
- } else {
- /*
- * Expand raw data buffer, if needed, to
- * hold data strip coming from file
- * (perhaps should set upper bound on
- * the size of a buffer we'll use?).
- */
- if (bytecount > tif->tif_rawdatasize) {
- tif->tif_curstrip = NOSTRIP;
- if ((tif->tif_flags & TIFF_MYBUFFER) == 0) {
+ if (isMapped(tif) &&
+ (isFillOrder(tif, td->td_fillorder)
+ || (tif->tif_flags & TIFF_NOBITREV))) {
+ /*
+ * The image is mapped into memory and we either don't
+ * need to flip bits or the compression routine is
+ * going to handle this operation itself. In this
+ * case, avoid copying the raw data and instead just
+ * reference the data from the memory mapped file
+ * image. This assumes that the decompression
+ * routines do not modify the contents of the raw data
+ * buffer (if they try to, the application will get a
+ * fault since the file is mapped read-only).
+ */
+ if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata)
+ _TIFFfree(tif->tif_rawdata);
+ tif->tif_flags &= ~TIFF_MYBUFFER;
+ /*
+ * We must check for overflow, potentially causing
+ * an OOB read. Instead of simple
+ *
+ * td->td_stripoffset[strip]+bytecount > tif->tif_size
+ *
+ * comparison (which can overflow) we do the following
+ * two comparisons:
+ */
+ if (bytecount > tif->tif_size ||
+ td->td_stripoffset[strip] > tif->tif_size - bytecount) {
+ /*
+ * This error message might seem strange, but
+ * it's what would happen if a read were done
+ * instead.
+ */
TIFFErrorExt(tif->tif_clientdata, module,
- "%s: Data buffer too small to hold strip %lu",
- tif->tif_name, (unsigned long) strip);
+
+ "%s: Read error on strip %lu; "
+ "got %lu bytes, expected %lu",
+ tif->tif_name, (unsigned long) strip,
+ (unsigned long) tif->tif_size - td->td_stripoffset[strip],
+ (unsigned long) bytecount);
+ tif->tif_curstrip = NOSTRIP;
return (0);
}
- if (!TIFFReadBufferSetup(tif, 0,
- TIFFroundup(bytecount, 1024)))
+ tif->tif_rawdatasize = bytecount;
+ tif->tif_rawdata = tif->tif_base + td->td_stripoffset[strip];
+ } else {
+ /*
+ * Expand raw data buffer, if needed, to hold data
+ * strip coming from file (perhaps should set upper
+ * bound on the size of a buffer we'll use?).
+ */
+ if (bytecount > (uint32)tif->tif_rawdatasize) {
+ tif->tif_curstrip = NOSTRIP;
+ if ((tif->tif_flags & TIFF_MYBUFFER) == 0) {
+ TIFFErrorExt(tif->tif_clientdata,
+ module,
+ "%s: Data buffer too small to hold strip %lu",
+ tif->tif_name,
+ (unsigned long) strip);
+ return (0);
+ }
+ if (!TIFFReadBufferSetup(tif, 0,
+ TIFFroundup(bytecount, 1024)))
+ return (0);
+ }
+ if ((uint32)TIFFReadRawStrip1(tif, strip,
+ (unsigned char *)tif->tif_rawdata,
+ bytecount, module) != bytecount)
return (0);
+ if (!isFillOrder(tif, td->td_fillorder) &&
+ (tif->tif_flags & TIFF_NOBITREV) == 0)
+ TIFFReverseBits(tif->tif_rawdata, bytecount);
}
- if (TIFFReadRawStrip1(tif, strip, (unsigned char *)tif->tif_rawdata,
- bytecount, module) != bytecount)
- return (0);
- if (!isFillOrder(tif, td->td_fillorder) &&
- (tif->tif_flags & TIFF_NOBITREV) == 0)
- TIFFReverseBits(tif->tif_rawdata, bytecount);
}
return (TIFFStartStrip(tif, strip));
}
@@ -349,8 +389,9 @@ TIFFReadEncodedTile(TIFF* tif, ttile_t tile, tdata_t buf, tsize_t size)
if (!TIFFCheckRead(tif, 1))
return (-1);
if (tile >= td->td_nstrips) {
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "%ld: Tile out of range, max %ld",
- (long) tile, (unsigned long) td->td_nstrips);
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "%ld: Tile out of range, max %ld",
+ (long) tile, (unsigned long) td->td_nstrips);
return (-1);
}
if (size == (tsize_t) -1)
@@ -371,6 +412,7 @@ TIFFReadRawTile1(TIFF* tif,
{
TIFFDirectory *td = &tif->tif_dir;
+ assert((tif->tif_flags&TIFF_NOREADRAW)==0);
if (!isMapped(tif)) {
tsize_t cc;
@@ -419,89 +461,121 @@ TIFFReadRawTile(TIFF* tif, ttile_t tile, tdata_t buf, tsize_t size)
{
static const char module[] = "TIFFReadRawTile";
TIFFDirectory *td = &tif->tif_dir;
- tsize_t bytecount;
+ /*
+ * FIXME: butecount should have tsize_t type, but for now libtiff
+ * defines tsize_t as a signed 32-bit integer and we are losing
+ * ability to read arrays larger than 2^31 bytes. So we are using
+ * uint32 instead of tsize_t here.
+ */
+ uint32 bytecount;
if (!TIFFCheckRead(tif, 1))
return ((tsize_t) -1);
if (tile >= td->td_nstrips) {
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "%lu: Tile out of range, max %lu",
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "%lu: Tile out of range, max %lu",
(unsigned long) tile, (unsigned long) td->td_nstrips);
return ((tsize_t) -1);
}
+ if (tif->tif_flags&TIFF_NOREADRAW)
+ {
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "Compression scheme does not support access to raw uncompressed data");
+ return ((tsize_t) -1);
+ }
bytecount = td->td_stripbytecount[tile];
- if (size != (tsize_t) -1 && size < bytecount)
+ if (size != (tsize_t) -1 && (uint32)size < bytecount)
bytecount = size;
return (TIFFReadRawTile1(tif, tile, buf, bytecount, module));
}
/*
- * Read the specified tile and setup for decoding.
- * The data buffer is expanded, as necessary, to
- * hold the tile's data.
+ * Read the specified tile and setup for decoding. The data buffer is
+ * expanded, as necessary, to hold the tile's data.
*/
int
TIFFFillTile(TIFF* tif, ttile_t tile)
{
static const char module[] = "TIFFFillTile";
TIFFDirectory *td = &tif->tif_dir;
- tsize_t bytecount;
- bytecount = td->td_stripbytecount[tile];
- if (bytecount <= 0) {
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
- "%lu: Invalid tile byte count, tile %lu",
- (unsigned long) bytecount, (unsigned long) tile);
- return (0);
- }
- if (isMapped(tif) &&
- (isFillOrder(tif, td->td_fillorder)
- || (tif->tif_flags & TIFF_NOBITREV))) {
+ if ((tif->tif_flags&TIFF_NOREADRAW)==0)
+ {
/*
- * The image is mapped into memory and we either don't
- * need to flip bits or the compression routine is going
- * to handle this operation itself. In this case, avoid
- * copying the raw data and instead just reference the
- * data from the memory mapped file image. This assumes
- * that the decompression routines do not modify the
- * contents of the raw data buffer (if they try to,
- * the application will get a fault since the file is
- * mapped read-only).
+ * FIXME: butecount should have tsize_t type, but for now
+ * libtiff defines tsize_t as a signed 32-bit integer and we
+ * are losing ability to read arrays larger than 2^31 bytes.
+ * So we are using uint32 instead of tsize_t here.
*/
- if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata)
- _TIFFfree(tif->tif_rawdata);
- tif->tif_flags &= ~TIFF_MYBUFFER;
- if ( td->td_stripoffset[tile] + bytecount > tif->tif_size) {
- tif->tif_curtile = NOTILE;
+ uint32 bytecount = td->td_stripbytecount[tile];
+ if (bytecount <= 0) {
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "%lu: Invalid tile byte count, tile %lu",
+ (unsigned long) bytecount, (unsigned long) tile);
return (0);
}
- tif->tif_rawdatasize = bytecount;
- tif->tif_rawdata = tif->tif_base + td->td_stripoffset[tile];
- } else {
- /*
- * Expand raw data buffer, if needed, to
- * hold data tile coming from file
- * (perhaps should set upper bound on
- * the size of a buffer we'll use?).
- */
- if (bytecount > tif->tif_rawdatasize) {
- tif->tif_curtile = NOTILE;
- if ((tif->tif_flags & TIFF_MYBUFFER) == 0) {
- TIFFErrorExt(tif->tif_clientdata, module,
- "%s: Data buffer too small to hold tile %ld",
- tif->tif_name, (long) tile);
+ if (isMapped(tif) &&
+ (isFillOrder(tif, td->td_fillorder)
+ || (tif->tif_flags & TIFF_NOBITREV))) {
+ /*
+ * The image is mapped into memory and we either don't
+ * need to flip bits or the compression routine is
+ * going to handle this operation itself. In this
+ * case, avoid copying the raw data and instead just
+ * reference the data from the memory mapped file
+ * image. This assumes that the decompression
+ * routines do not modify the contents of the raw data
+ * buffer (if they try to, the application will get a
+ * fault since the file is mapped read-only).
+ */
+ if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata)
+ _TIFFfree(tif->tif_rawdata);
+ tif->tif_flags &= ~TIFF_MYBUFFER;
+ /*
+ * We must check for overflow, potentially causing
+ * an OOB read. Instead of simple
+ *
+ * td->td_stripoffset[tile]+bytecount > tif->tif_size
+ *
+ * comparison (which can overflow) we do the following
+ * two comparisons:
+ */
+ if (bytecount > tif->tif_size ||
+ td->td_stripoffset[tile] > tif->tif_size - bytecount) {
+ tif->tif_curtile = NOTILE;
return (0);
}
- if (!TIFFReadBufferSetup(tif, 0,
- TIFFroundup(bytecount, 1024)))
+ tif->tif_rawdatasize = bytecount;
+ tif->tif_rawdata =
+ tif->tif_base + td->td_stripoffset[tile];
+ } else {
+ /*
+ * Expand raw data buffer, if needed, to hold data
+ * tile coming from file (perhaps should set upper
+ * bound on the size of a buffer we'll use?).
+ */
+ if (bytecount > (uint32)tif->tif_rawdatasize) {
+ tif->tif_curtile = NOTILE;
+ if ((tif->tif_flags & TIFF_MYBUFFER) == 0) {
+ TIFFErrorExt(tif->tif_clientdata,
+ module,
+ "%s: Data buffer too small to hold tile %ld",
+ tif->tif_name,
+ (long) tile);
+ return (0);
+ }
+ if (!TIFFReadBufferSetup(tif, 0,
+ TIFFroundup(bytecount, 1024)))
+ return (0);
+ }
+ if ((uint32)TIFFReadRawTile1(tif, tile,
+ (unsigned char *)tif->tif_rawdata,
+ bytecount, module) != bytecount)
return (0);
+ if (!isFillOrder(tif, td->td_fillorder) &&
+ (tif->tif_flags & TIFF_NOBITREV) == 0)
+ TIFFReverseBits(tif->tif_rawdata, bytecount);
}
- if (TIFFReadRawTile1(tif, tile,
- (unsigned char *)tif->tif_rawdata,
- bytecount, module) != bytecount)
- return (0);
- if (!isFillOrder(tif, td->td_fillorder) &&
- (tif->tif_flags & TIFF_NOBITREV) == 0)
- TIFFReverseBits(tif->tif_rawdata, bytecount);
}
return (TIFFStartTile(tif, tile));
}
@@ -520,6 +594,7 @@ TIFFReadBufferSetup(TIFF* tif, tdata_t bp, tsize_t size)
{
static const char module[] = "TIFFReadBufferSetup";
+ assert((tif->tif_flags&TIFF_NOREADRAW)==0);
if (tif->tif_rawdata) {
if (tif->tif_flags & TIFF_MYBUFFER)
_TIFFfree(tif->tif_rawdata);
@@ -560,8 +635,16 @@ TIFFStartStrip(TIFF* tif, tstrip_t strip)
}
tif->tif_curstrip = strip;
tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip;
- tif->tif_rawcp = tif->tif_rawdata;
- tif->tif_rawcc = td->td_stripbytecount[strip];
+ if (tif->tif_flags&TIFF_NOREADRAW)
+ {
+ tif->tif_rawcp = NULL;
+ tif->tif_rawcc = 0;
+ }
+ else
+ {
+ tif->tif_rawcp = tif->tif_rawdata;
+ tif->tif_rawcc = td->td_stripbytecount[strip];
+ }
return ((*tif->tif_predecode)(tif,
(tsample_t)(strip / td->td_stripsperimage)));
}
@@ -587,8 +670,16 @@ TIFFStartTile(TIFF* tif, ttile_t tile)
tif->tif_col =
(tile % TIFFhowmany(td->td_imagelength, td->td_tilelength)) *
td->td_tilewidth;
- tif->tif_rawcp = tif->tif_rawdata;
- tif->tif_rawcc = td->td_stripbytecount[tile];
+ if (tif->tif_flags&TIFF_NOREADRAW)
+ {
+ tif->tif_rawcp = NULL;
+ tif->tif_rawcc = 0;
+ }
+ else
+ {
+ tif->tif_rawcp = tif->tif_rawdata;
+ tif->tif_rawcc = td->td_stripbytecount[tile];
+ }
return ((*tif->tif_predecode)(tif,
(tsample_t)(tile/td->td_stripsperimage)));
}
diff --git a/src/3rdparty/libtiff/libtiff/tif_stream.cxx b/src/3rdparty/libtiff/libtiff/tif_stream.cxx
index a356d8ece7..2a2351b2ba 100644
--- a/src/3rdparty/libtiff/libtiff/tif_stream.cxx
+++ b/src/3rdparty/libtiff/libtiff/tif_stream.cxx
@@ -1,4 +1,4 @@
-/* $Id: tif_stream.cxx,v 1.5 2005/07/26 08:11:13 dron Exp $ */
+/* $Id: tif_stream.cxx,v 1.6.2.1 2009-01-01 00:10:43 bfriesen Exp $ */
/*
* Copyright (c) 1988-1996 Sam Leffler
@@ -30,7 +30,9 @@
#include "tiffiop.h"
#include <iostream>
+#ifndef __VMS
using namespace std;
+#endif
class tiffis_data
{
@@ -109,8 +111,12 @@ _tiffosSeekProc(thandle_t fd, toff_t off, int whence)
// ostrstream/ostringstream does. In that situation, add intermediate
// '\0' characters.
if( os->fail() ) {
+#ifdef __VMS
+ int old_state;
+#else
ios::iostate old_state;
- toff_t origin;
+#endif
+ toff_t origin=0;
old_state = os->rdstate();
// reset the fail bit or else tellp() won't work below
diff --git a/src/3rdparty/libtiff/libtiff/tif_strip.c b/src/3rdparty/libtiff/libtiff/tif_strip.c
index 78854d1046..962d3fa7bc 100644
--- a/src/3rdparty/libtiff/libtiff/tif_strip.c
+++ b/src/3rdparty/libtiff/libtiff/tif_strip.c
@@ -1,4 +1,4 @@
-/* $Id: tif_strip.c,v 1.17 2006/03/21 16:29:33 dron Exp $ */
+/* $Id: tif_strip.c,v 1.19 2006/03/25 18:04:35 joris Exp $ */
/*
* Copyright (c) 1991-1997 Sam Leffler
@@ -121,12 +121,12 @@ TIFFVStripSize(TIFF* tif, uint32 nrows)
* horizontal/vertical subsampling area include
* YCbCr data for the extended image.
*/
- uint16 ycbcrsubsampling[2];
- tsize_t w, scanline, samplingarea;
+ uint16 ycbcrsubsampling[2];
+ tsize_t w, scanline, samplingarea;
- TIFFGetField( tif, TIFFTAG_YCBCRSUBSAMPLING,
- ycbcrsubsampling + 0,
- ycbcrsubsampling + 1 );
+ TIFFGetField( tif, TIFFTAG_YCBCRSUBSAMPLING,
+ ycbcrsubsampling + 0,
+ ycbcrsubsampling + 1 );
samplingarea = ycbcrsubsampling[0]*ycbcrsubsampling[1];
if (samplingarea == 0) {
@@ -228,13 +228,13 @@ TIFFScanlineSize(TIFF* tif)
{
TIFFDirectory *td = &tif->tif_dir;
tsize_t scanline;
-
+
if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
if (td->td_photometric == PHOTOMETRIC_YCBCR
&& !isUpSampled(tif)) {
uint16 ycbcrsubsampling[2];
- TIFFGetField(tif, TIFFTAG_YCBCRSUBSAMPLING,
+ TIFFGetField(tif, TIFFTAG_YCBCRSUBSAMPLING,
ycbcrsubsampling + 0,
ycbcrsubsampling + 1);
@@ -268,6 +268,75 @@ TIFFScanlineSize(TIFF* tif)
}
/*
+ * Some stuff depends on this older version of TIFFScanlineSize
+ * TODO: resolve this
+ */
+tsize_t
+TIFFOldScanlineSize(TIFF* tif)
+{
+ TIFFDirectory *td = &tif->tif_dir;
+ tsize_t scanline;
+
+ scanline = multiply (tif, td->td_bitspersample, td->td_imagewidth,
+ "TIFFScanlineSize");
+ if (td->td_planarconfig == PLANARCONFIG_CONTIG)
+ scanline = multiply (tif, scanline, td->td_samplesperpixel,
+ "TIFFScanlineSize");
+ return ((tsize_t) TIFFhowmany8(scanline));
+}
+
+/*
+ * Return the number of bytes to read/write in a call to
+ * one of the scanline-oriented i/o routines. Note that
+ * this number may be 1/samples-per-pixel if data is
+ * stored as separate planes.
+ * The ScanlineSize in case of YCbCrSubsampling is defined as the
+ * strip size divided by the strip height, i.e. the size of a pack of vertical
+ * subsampling lines divided by vertical subsampling. It should thus make
+ * sense when multiplied by a multiple of vertical subsampling.
+ * Some stuff depends on this newer version of TIFFScanlineSize
+ * TODO: resolve this
+ */
+tsize_t
+TIFFNewScanlineSize(TIFF* tif)
+{
+ TIFFDirectory *td = &tif->tif_dir;
+ tsize_t scanline;
+
+ if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
+ if (td->td_photometric == PHOTOMETRIC_YCBCR
+ && !isUpSampled(tif)) {
+ uint16 ycbcrsubsampling[2];
+
+ TIFFGetField(tif, TIFFTAG_YCBCRSUBSAMPLING,
+ ycbcrsubsampling + 0,
+ ycbcrsubsampling + 1);
+
+ if (ycbcrsubsampling[0]*ycbcrsubsampling[1] == 0) {
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "Invalid YCbCr subsampling");
+ return 0;
+ }
+
+ return((tsize_t) ((((td->td_imagewidth+ycbcrsubsampling[0]-1)
+ /ycbcrsubsampling[0])
+ *(ycbcrsubsampling[0]*ycbcrsubsampling[1]+2)
+ *td->td_bitspersample+7)
+ /8)/ycbcrsubsampling[1]);
+
+ } else {
+ scanline = multiply(tif, td->td_imagewidth,
+ td->td_samplesperpixel,
+ "TIFFScanlineSize");
+ }
+ } else
+ scanline = td->td_imagewidth;
+ return ((tsize_t) TIFFhowmany8(multiply(tif, scanline,
+ td->td_bitspersample,
+ "TIFFScanlineSize")));
+}
+
+/*
* Return the number of bytes required to store a complete
* decoded and packed raster scanline (as opposed to the
* I/O size returned by TIFFScanlineSize which may be less
diff --git a/src/3rdparty/libtiff/libtiff/tif_win32.c b/src/3rdparty/libtiff/libtiff/tif_win32.c
index 8f8256410e..d7f33de374 100644
--- a/src/3rdparty/libtiff/libtiff/tif_win32.c
+++ b/src/3rdparty/libtiff/libtiff/tif_win32.c
@@ -1,4 +1,4 @@
-/* $Id: tif_win32.c,v 1.18 2006/02/07 11:03:29 dron Exp $ */
+/* $Id: tif_win32.c,v 1.21 2007/03/07 17:10:31 joris Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -31,6 +31,8 @@
#include "tiffiop.h"
#include <windows.h>
+#include <windows.h>
+
static tsize_t
_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
{
@@ -52,11 +54,10 @@ _tiffWriteProc(thandle_t fd, tdata_t buf, tsize_t size)
static toff_t
_tiffSeekProc(thandle_t fd, toff_t off, int whence)
{
- DWORD dwMoveMethod, dwMoveHigh;
+ ULARGE_INTEGER li;
+ DWORD dwMoveMethod;
- /* we use this as a special code, so avoid accepting it */
- if( off == 0xFFFFFFFF )
- return 0xFFFFFFFF;
+ li.QuadPart = off;
switch(whence)
{
@@ -73,9 +74,8 @@ _tiffSeekProc(thandle_t fd, toff_t off, int whence)
dwMoveMethod = FILE_BEGIN;
break;
}
- dwMoveHigh = 0;
- return ((toff_t)SetFilePointer(fd, (LONG) off, (PLONG)&dwMoveHigh,
- dwMoveMethod));
+ return ((toff_t)SetFilePointer(fd, (LONG) li.LowPart,
+ (PLONG)&li.HighPart, dwMoveMethod));
}
static int
@@ -90,12 +90,12 @@ _tiffSizeProc(thandle_t fd)
return ((toff_t)GetFileSize(fd, NULL));
}
-#ifdef __BORLANDC__
-#pragma argsused
-#endif
static int
_tiffDummyMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
{
+ (void) fd;
+ (void) pbase;
+ (void) psize;
return (0);
}
@@ -129,12 +129,12 @@ _tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
return(1);
}
-#ifdef __BORLANDC__
-#pragma argsused
-#endif
static void
_tiffDummyUnmapProc(thandle_t fd, tdata_t base, toff_t size)
{
+ (void) fd;
+ (void) base;
+ (void) size;
}
static void
@@ -164,6 +164,8 @@ TIFFFdOpen(int ifd, const char* name, const char* mode)
return (tif);
}
+#ifndef _WIN32_WCE
+
/*
* Open a TIFF file for read/writing.
*/
@@ -273,6 +275,9 @@ TIFFOpenW(const wchar_t* name, const char* mode)
return tif;
}
+#endif /* ndef _WIN32_WCE */
+
+
tdata_t
_TIFFmalloc(tsize_t s)
{
@@ -289,26 +294,26 @@ _TIFFfree(tdata_t p)
tdata_t
_TIFFrealloc(tdata_t p, tsize_t s)
{
- void* pvTmp;
- tsize_t old;
-
- if(p == NULL)
- return ((tdata_t)GlobalAlloc(GMEM_FIXED, s));
-
- old = GlobalSize(p);
-
- if (old>=s) {
- if ((pvTmp = GlobalAlloc(GMEM_FIXED, s)) != NULL) {
- CopyMemory(pvTmp, p, s);
- GlobalFree(p);
- }
- } else {
- if ((pvTmp = GlobalAlloc(GMEM_FIXED, s)) != NULL) {
- CopyMemory(pvTmp, p, old);
- GlobalFree(p);
- }
- }
- return ((tdata_t)pvTmp);
+ void* pvTmp;
+ tsize_t old;
+
+ if(p == NULL)
+ return ((tdata_t)GlobalAlloc(GMEM_FIXED, s));
+
+ old = GlobalSize(p);
+
+ if (old>=s) {
+ if ((pvTmp = GlobalAlloc(GMEM_FIXED, s)) != NULL) {
+ CopyMemory(pvTmp, p, s);
+ GlobalFree(p);
+ }
+ } else {
+ if ((pvTmp = GlobalAlloc(GMEM_FIXED, s)) != NULL) {
+ CopyMemory(pvTmp, p, old);
+ GlobalFree(p);
+ }
+ }
+ return ((tdata_t)pvTmp);
}
void
@@ -335,6 +340,8 @@ _TIFFmemcmp(const tdata_t p1, const tdata_t p2, tsize_t c)
return (iTmp);
}
+#ifndef _WIN32_WCE
+
static void
Win32WarningHandler(const char* module, const char* fmt, va_list ap)
{
@@ -390,4 +397,6 @@ Win32ErrorHandler(const char* module, const char* fmt, va_list ap)
}
TIFFErrorHandler _TIFFerrorHandler = Win32ErrorHandler;
+#endif /* ndef _WIN32_WCE */
+
/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/src/3rdparty/libtiff/libtiff/tif_wince.c b/src/3rdparty/libtiff/libtiff/tif_wince.c
new file mode 100644
index 0000000000..4e283daf69
--- /dev/null
+++ b/src/3rdparty/libtiff/libtiff/tif_wince.c
@@ -0,0 +1,281 @@
+/* $Id: tif_wince.c,v 1.1 2007-01-15 18:40:39 mloskot Exp $ */
+
+/*
+ * Copyright (c) 1988-1997 Sam Leffler
+ * Copyright (c) 1991-1997 Silicon Graphics, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the names of
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Sam Leffler and Silicon Graphics.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+/*
+ * Windows CE-specific routines for TIFF Library.
+ * Adapted from tif_win32.c 01/10/2006 by Mateusz Loskot (mateusz@loskot.net)
+ */
+
+#ifndef _WIN32_WCE
+# error "Only Windows CE target is supported!"
+#endif
+
+#include "tiffiop.h"
+#include <windows.h>
+
+/* Turn off console support on Windows CE. */
+#undef TIF_PLATFORM_CONSOLE
+
+
+/*
+ * Open a TIFF file for read/writing.
+ */
+TIFF*
+TIFFOpen(const char* name, const char* mode)
+{
+ static const char module[] = "TIFFOpen";
+ thandle_t fd;
+ int m;
+ DWORD dwMode;
+ TIFF* tif;
+ size_t nLen;
+ size_t nWideLen;
+ wchar_t* wchName;
+
+ m = _TIFFgetMode(mode, module);
+
+ switch(m)
+ {
+ case O_RDONLY:
+ dwMode = OPEN_EXISTING;
+ break;
+ case O_RDWR:
+ dwMode = OPEN_ALWAYS;
+ break;
+ case O_RDWR|O_CREAT:
+ dwMode = OPEN_ALWAYS;
+ break;
+ case O_RDWR|O_TRUNC:
+ dwMode = CREATE_ALWAYS;
+ break;
+ case O_RDWR|O_CREAT|O_TRUNC:
+ dwMode = CREATE_ALWAYS;
+ break;
+ default:
+ return ((TIFF*)0);
+ }
+
+ /* On Windows CE, CreateFile is mapped to CreateFileW,
+ * but file path is passed as char-based string,
+ * so the path has to be converted to wchar_t.
+ */
+
+ nWideLen = 0;
+ wchName = NULL;
+ nLen = strlen(name) + 1;
+
+ nWideLen = MultiByteToWideChar(CP_ACP, 0, name, nLen, NULL, 0);
+ wchName = (wchar_t*)malloc(sizeof(wchar_t) * nWideLen);
+ if (NULL == wchName)
+ {
+ TIFFErrorExt(0, module, "Memory allocation error!");
+ return ((TIFF *)0);
+ }
+ memset(wchName, 0, sizeof(wchar_t) * nWideLen);
+ MultiByteToWideChar(CP_ACP, 0, name, nLen, wchName, nWideLen);
+
+ fd = (thandle_t)CreateFile(wchName,
+ (m == O_RDONLY)?GENERIC_READ:(GENERIC_READ | GENERIC_WRITE),
+ FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, dwMode,
+ (m == O_RDONLY)?FILE_ATTRIBUTE_READONLY:FILE_ATTRIBUTE_NORMAL,
+ NULL);
+
+ free(wchName);
+
+ if (fd == INVALID_HANDLE_VALUE) {
+ TIFFErrorExt(0, module, "%s: Cannot open", name);
+ return ((TIFF *)0);
+ }
+
+ /* TODO - mloskot: change to TIFFdOpenW and pass wchar path */
+
+ tif = TIFFFdOpen((int)fd, name, mode);
+ if(!tif)
+ CloseHandle(fd);
+ return tif;
+}
+
+/*
+ * Open a TIFF file with a Unicode filename, for read/writing.
+ */
+TIFF*
+TIFFOpenW(const wchar_t* name, const char* mode)
+{
+ static const char module[] = "TIFFOpenW";
+ thandle_t fd;
+ int m;
+ DWORD dwMode;
+ int mbsize;
+ char *mbname;
+ TIFF *tif;
+
+ m = _TIFFgetMode(mode, module);
+
+ switch(m) {
+ case O_RDONLY: dwMode = OPEN_EXISTING; break;
+ case O_RDWR: dwMode = OPEN_ALWAYS; break;
+ case O_RDWR|O_CREAT: dwMode = OPEN_ALWAYS; break;
+ case O_RDWR|O_TRUNC: dwMode = CREATE_ALWAYS; break;
+ case O_RDWR|O_CREAT|O_TRUNC: dwMode = CREATE_ALWAYS; break;
+ default: return ((TIFF*)0);
+ }
+
+ /* On Windows CE, CreateFile is mapped to CreateFileW,
+ * so no conversion of wchar_t to char is required.
+ */
+
+ fd = (thandle_t)CreateFile(name,
+ (m == O_RDONLY)?GENERIC_READ:(GENERIC_READ|GENERIC_WRITE),
+ FILE_SHARE_READ, NULL, dwMode,
+ (m == O_RDONLY)?FILE_ATTRIBUTE_READONLY:FILE_ATTRIBUTE_NORMAL,
+ NULL);
+ if (fd == INVALID_HANDLE_VALUE) {
+ TIFFErrorExt(0, module, "%S: Cannot open", name);
+ return ((TIFF *)0);
+ }
+
+ mbname = NULL;
+ mbsize = WideCharToMultiByte(CP_ACP, 0, name, -1, NULL, 0, NULL, NULL);
+ if (mbsize > 0) {
+ mbname = (char *)_TIFFmalloc(mbsize);
+ if (!mbname) {
+ TIFFErrorExt(0, module,
+ "Can't allocate space for filename conversion buffer");
+ return ((TIFF*)0);
+ }
+
+ WideCharToMultiByte(CP_ACP, 0, name, -1, mbname, mbsize,
+ NULL, NULL);
+ }
+
+ tif = TIFFFdOpen((int)fd,
+ (mbname != NULL) ? mbname : "<unknown>", mode);
+ if(!tif)
+ CloseHandle(fd);
+
+ _TIFFfree(mbname);
+
+ return tif;
+}
+
+static void
+Win32WarningHandler(const char* module, const char* fmt, va_list ap)
+{
+ /* On Windows CE, MessageBox is mapped to wide-char based MessageBoxW. */
+
+ size_t nWideLen = 0;
+ LPTSTR szWideTitle = NULL;
+ LPTSTR szWideMsg = NULL;
+
+ LPSTR szTitle;
+ LPSTR szTmp;
+ LPCSTR szTitleText = "%s Warning";
+ LPCSTR szDefaultModule = "LIBTIFF";
+ LPCSTR szTmpModule;
+
+ szTmpModule = (module == NULL) ? szDefaultModule : module;
+ if ((szTitle = (LPSTR)LocalAlloc(LMEM_FIXED,
+ (strlen(szTmpModule) + strlen(szTitleText)
+ + strlen(fmt) + 128) * sizeof(char))) == NULL)
+ return;
+
+ sprintf(szTitle, szTitleText, szTmpModule);
+ szTmp = szTitle + (strlen(szTitle) + 2) * sizeof(char);
+ vsprintf(szTmp, fmt, ap);
+
+ /* Convert error message to Unicode. */
+
+ nWideLen = MultiByteToWideChar(CP_ACP, 0, szTitle, -1, NULL, 0);
+ szWideTitle = (wchar_t*)malloc(sizeof(wchar_t) * nWideLen);
+ MultiByteToWideChar(CP_ACP, 0, szTitle, -1, szWideTitle, nWideLen);
+
+ nWideLen = MultiByteToWideChar(CP_ACP, 0, szTmp, -1, NULL, 0);
+ szWideMsg = (wchar_t*)malloc(sizeof(wchar_t) * nWideLen);
+ MultiByteToWideChar(CP_ACP, 0, szTmp, -1, szWideMsg, nWideLen);
+
+ /* Display message */
+
+ MessageBox(GetFocus(), szWideMsg, szWideTitle, MB_OK | MB_ICONEXCLAMATION);
+
+ /* Free resources */
+
+ LocalFree(szTitle);
+ free(szWideMsg);
+ free(szWideTitle);
+}
+
+TIFFErrorHandler _TIFFwarningHandler = Win32WarningHandler;
+
+static void
+Win32ErrorHandler(const char* module, const char* fmt, va_list ap)
+{
+ /* On Windows CE, MessageBox is mapped to wide-char based MessageBoxW. */
+
+ size_t nWideLen = 0;
+ LPTSTR szWideTitle = NULL;
+ LPTSTR szWideMsg = NULL;
+
+ LPSTR szTitle;
+ LPSTR szTmp;
+ LPCSTR szTitleText = "%s Error";
+ LPCSTR szDefaultModule = "LIBTIFF";
+ LPCSTR szTmpModule;
+
+ szTmpModule = (module == NULL) ? szDefaultModule : module;
+ if ((szTitle = (LPSTR)LocalAlloc(LMEM_FIXED,
+ (strlen(szTmpModule) + strlen(szTitleText)
+ + strlen(fmt) + 128) * sizeof(char))) == NULL)
+ return;
+
+ sprintf(szTitle, szTitleText, szTmpModule);
+ szTmp = szTitle + (strlen(szTitle) + 2) * sizeof(char);
+ vsprintf(szTmp, fmt, ap);
+
+ /* Convert error message to Unicode. */
+
+ nWideLen = MultiByteToWideChar(CP_ACP, 0, szTitle, -1, NULL, 0);
+ szWideTitle = (wchar_t*)malloc(sizeof(wchar_t) * nWideLen);
+ MultiByteToWideChar(CP_ACP, 0, szTitle, -1, szWideTitle, nWideLen);
+
+ nWideLen = MultiByteToWideChar(CP_ACP, 0, szTmp, -1, NULL, 0);
+ szWideMsg = (wchar_t*)malloc(sizeof(wchar_t) * nWideLen);
+ MultiByteToWideChar(CP_ACP, 0, szTmp, -1, szWideMsg, nWideLen);
+
+ /* Display message */
+
+ MessageBox(GetFocus(), szWideMsg, szWideTitle, MB_OK | MB_ICONEXCLAMATION);
+
+ /* Free resources */
+
+ LocalFree(szTitle);
+ free(szWideMsg);
+ free(szWideTitle);
+}
+
+TIFFErrorHandler _TIFFerrorHandler = Win32ErrorHandler;
+
+
+/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/src/3rdparty/libtiff/libtiff/tif_write.c b/src/3rdparty/libtiff/libtiff/tif_write.c
index e34cfabbd6..ec371361e0 100644
--- a/src/3rdparty/libtiff/libtiff/tif_write.c
+++ b/src/3rdparty/libtiff/libtiff/tif_write.c
@@ -1,4 +1,4 @@
-/* $Id: tif_write.c,v 1.21 2006/02/27 14:29:20 dron Exp $ */
+/* $Id: tif_write.c,v 1.22.2.4 2009-08-28 02:23:19 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -227,10 +227,8 @@ TIFFWriteEncodedStrip(TIFF* tif, tstrip_t strip, tdata_t data, tsize_t cc)
if( td->td_stripbytecount[strip] > 0 )
{
- /* if we are writing over existing tiles, zero length. */
- td->td_stripbytecount[strip] = 0;
-
- /* this forces TIFFAppendToStrip() to do a seek */
+ /* Force TIFFAppendToStrip() to consider placing data at end
+ of file. */
tif->tif_curoff = 0;
}
@@ -363,10 +361,8 @@ TIFFWriteEncodedTile(TIFF* tif, ttile_t tile, tdata_t data, tsize_t cc)
if( td->td_stripbytecount[tile] > 0 )
{
- /* if we are writing over existing tiles, zero length. */
- td->td_stripbytecount[tile] = 0;
-
- /* this forces TIFFAppendToStrip() to do a seek */
+ /* Force TIFFAppendToStrip() to consider placing data at end
+ of file. */
tif->tif_curoff = 0;
}
@@ -521,7 +517,8 @@ TIFFWriteCheck(TIFF* tif, int tiles, const char* module)
* because this field is used in other parts of library even
* in the single band case.
*/
- tif->tif_dir.td_planarconfig = PLANARCONFIG_CONTIG;
+ if (!TIFFFieldSet(tif, FIELD_PLANARCONFIG))
+ tif->tif_dir.td_planarconfig = PLANARCONFIG_CONTIG;
} else {
if (!TIFFFieldSet(tif, FIELD_PLANARCONFIG)) {
TIFFErrorExt(tif->tif_clientdata, module,
@@ -625,64 +622,53 @@ TIFFGrowStrips(TIFF* tif, int delta, const char* module)
static int
TIFFAppendToStrip(TIFF* tif, tstrip_t strip, tidata_t data, tsize_t cc)
{
- TIFFDirectory *td = &tif->tif_dir;
static const char module[] = "TIFFAppendToStrip";
+ TIFFDirectory *td = &tif->tif_dir;
if (td->td_stripoffset[strip] == 0 || tif->tif_curoff == 0) {
- /*
- * No current offset, set the current strip.
- */
- assert(td->td_nstrips > 0);
- if (td->td_stripoffset[strip] != 0) {
- /*
- * Prevent overlapping of the data chunks. We need
- * this to enable in place updating of the compressed
- * images. Larger blocks will be moved at the end of
- * the file without any optimization of the spare
- * space, so such scheme is not too much effective.
- */
- if (td->td_stripbytecountsorted) {
- if (strip == td->td_nstrips - 1
- || td->td_stripoffset[strip + 1] <
- td->td_stripoffset[strip] + cc) {
- td->td_stripoffset[strip] =
- TIFFSeekFile(tif, (toff_t)0,
- SEEK_END);
- }
- } else {
- tstrip_t i;
- for (i = 0; i < td->td_nstrips; i++) {
- if (td->td_stripoffset[i] >
- td->td_stripoffset[strip]
- && td->td_stripoffset[i] <
- td->td_stripoffset[strip] + cc) {
- td->td_stripoffset[strip] =
- TIFFSeekFile(tif,
- (toff_t)0,
- SEEK_END);
- }
- }
- }
-
- if (!SeekOK(tif, td->td_stripoffset[strip])) {
- TIFFErrorExt(tif->tif_clientdata, module,
- "%s: Seek error at scanline %lu",
- tif->tif_name,
- (unsigned long)tif->tif_row);
- return (0);
- }
- } else
- td->td_stripoffset[strip] =
- TIFFSeekFile(tif, (toff_t) 0, SEEK_END);
- tif->tif_curoff = td->td_stripoffset[strip];
+ assert(td->td_nstrips > 0);
+
+ if( td->td_stripbytecount[strip] != 0
+ && td->td_stripoffset[strip] != 0
+ && td->td_stripbytecount[strip] >= cc )
+ {
+ /*
+ * There is already tile data on disk, and the new tile
+ * data we have to will fit in the same space. The only
+ * aspect of this that is risky is that there could be
+ * more data to append to this strip before we are done
+ * depending on how we are getting called.
+ */
+ if (!SeekOK(tif, td->td_stripoffset[strip])) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Seek error at scanline %lu",
+ (unsigned long)tif->tif_row);
+ return (0);
+ }
+ }
+ else
+ {
+ /*
+ * Seek to end of file, and set that as our location to
+ * write this strip.
+ */
+ td->td_stripoffset[strip] = TIFFSeekFile(tif, 0, SEEK_END);
+ }
+
+ tif->tif_curoff = td->td_stripoffset[strip];
+
+ /*
+ * We are starting a fresh strip/tile, so set the size to zero.
+ */
+ td->td_stripbytecount[strip] = 0;
}
if (!WriteOK(tif, data, cc)) {
- TIFFErrorExt(tif->tif_clientdata, module, "%s: Write error at scanline %lu",
- tif->tif_name, (unsigned long) tif->tif_row);
- return (0);
+ TIFFErrorExt(tif->tif_clientdata, module, "Write error at scanline %lu",
+ (unsigned long) tif->tif_row);
+ return (0);
}
- tif->tif_curoff += cc;
+ tif->tif_curoff = tif->tif_curoff+cc;
td->td_stripbytecount[strip] += cc;
return (1);
}
diff --git a/src/3rdparty/libtiff/libtiff/tif_zip.c b/src/3rdparty/libtiff/libtiff/tif_zip.c
index 0535db89c1..38a5773891 100644
--- a/src/3rdparty/libtiff/libtiff/tif_zip.c
+++ b/src/3rdparty/libtiff/libtiff/tif_zip.c
@@ -1,4 +1,4 @@
-/* $Id: tif_zip.c,v 1.10 2006/03/16 12:38:24 dron Exp $ */
+/* $Id: tif_zip.c,v 1.11.2.3 2007/11/22 21:24:51 fwarmerdam Exp $ */
/*
* Copyright (c) 1995-1997 Sam Leffler
@@ -70,7 +70,8 @@ typedef struct {
z_stream stream;
int zipquality; /* compression level */
int state; /* state flags */
-#define ZSTATE_INIT 0x1 /* zlib setup successfully */
+#define ZSTATE_INIT_DECODE 0x01
+#define ZSTATE_INIT_ENCODE 0x02
TIFFVGetMethod vgetparent; /* super-class method */
TIFFVSetMethod vsetparent; /* super-class method */
@@ -90,11 +91,18 @@ ZIPSetupDecode(TIFF* tif)
static const char module[] = "ZIPSetupDecode";
assert(sp != NULL);
+
+ /* if we were last encoding, terminate this mode */
+ if (sp->state & ZSTATE_INIT_ENCODE) {
+ deflateEnd(&sp->stream);
+ sp->state = 0;
+ }
+
if (inflateInit(&sp->stream) != Z_OK) {
TIFFErrorExt(tif->tif_clientdata, module, "%s: %s", tif->tif_name, sp->stream.msg);
return (0);
} else {
- sp->state |= ZSTATE_INIT;
+ sp->state |= ZSTATE_INIT_DECODE;
return (1);
}
}
@@ -109,6 +117,10 @@ ZIPPreDecode(TIFF* tif, tsample_t s)
(void) s;
assert(sp != NULL);
+
+ if( (sp->state & ZSTATE_INIT_DECODE) == 0 )
+ tif->tif_setupdecode( tif );
+
sp->stream.next_in = tif->tif_rawdata;
sp->stream.avail_in = tif->tif_rawcc;
return (inflateReset(&sp->stream) == Z_OK);
@@ -122,6 +134,8 @@ ZIPDecode(TIFF* tif, tidata_t op, tsize_t occ, tsample_t s)
(void) s;
assert(sp != NULL);
+ assert(sp->state == ZSTATE_INIT_DECODE);
+
sp->stream.next_out = op;
sp->stream.avail_out = occ;
do {
@@ -158,11 +172,16 @@ ZIPSetupEncode(TIFF* tif)
static const char module[] = "ZIPSetupEncode";
assert(sp != NULL);
+ if (sp->state & ZSTATE_INIT_DECODE) {
+ inflateEnd(&sp->stream);
+ sp->state = 0;
+ }
+
if (deflateInit(&sp->stream, sp->zipquality) != Z_OK) {
TIFFErrorExt(tif->tif_clientdata, module, "%s: %s", tif->tif_name, sp->stream.msg);
return (0);
} else {
- sp->state |= ZSTATE_INIT;
+ sp->state |= ZSTATE_INIT_ENCODE;
return (1);
}
}
@@ -177,6 +196,9 @@ ZIPPreEncode(TIFF* tif, tsample_t s)
(void) s;
assert(sp != NULL);
+ if( sp->state != ZSTATE_INIT_ENCODE )
+ tif->tif_setupencode( tif );
+
sp->stream.next_out = tif->tif_rawdata;
sp->stream.avail_out = tif->tif_rawdatasize;
return (deflateReset(&sp->stream) == Z_OK);
@@ -191,6 +213,9 @@ ZIPEncode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
ZIPState *sp = EncoderState(tif);
static const char module[] = "ZIPEncode";
+ assert(sp != NULL);
+ assert(sp->state == ZSTATE_INIT_ENCODE);
+
(void) s;
sp->stream.next_in = bp;
sp->stream.avail_in = cc;
@@ -257,12 +282,12 @@ ZIPCleanup(TIFF* tif)
tif->tif_tagmethods.vgetfield = sp->vgetparent;
tif->tif_tagmethods.vsetfield = sp->vsetparent;
- if (sp->state&ZSTATE_INIT) {
- /* NB: avoid problems in the library */
- if (tif->tif_mode == O_RDONLY)
- inflateEnd(&sp->stream);
- else
- deflateEnd(&sp->stream);
+ if (sp->state & ZSTATE_INIT_ENCODE) {
+ deflateEnd(&sp->stream);
+ sp->state = 0;
+ } else if( sp->state & ZSTATE_INIT_DECODE) {
+ inflateEnd(&sp->stream);
+ sp->state = 0;
}
_TIFFfree(sp);
tif->tif_data = NULL;
@@ -279,7 +304,7 @@ ZIPVSetField(TIFF* tif, ttag_t tag, va_list ap)
switch (tag) {
case TIFFTAG_ZIPQUALITY:
sp->zipquality = va_arg(ap, int);
- if (tif->tif_mode != O_RDONLY && (sp->state&ZSTATE_INIT)) {
+ if ( sp->state&ZSTATE_INIT_ENCODE ) {
if (deflateParams(&sp->stream,
sp->zipquality, Z_DEFAULT_STRATEGY) != Z_OK) {
TIFFErrorExt(tif->tif_clientdata, module, "%s: zlib error: %s",
@@ -317,12 +342,23 @@ static const TIFFFieldInfo zipFieldInfo[] = {
int
TIFFInitZIP(TIFF* tif, int scheme)
{
+ static const char module[] = "TIFFInitZIP";
ZIPState* sp;
assert( (scheme == COMPRESSION_DEFLATE)
|| (scheme == COMPRESSION_ADOBE_DEFLATE));
/*
+ * Merge codec-specific tag information.
+ */
+ if (!_TIFFMergeFieldInfo(tif, zipFieldInfo,
+ TIFFArrayCount(zipFieldInfo))) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Merging Deflate codec-specific tags failed");
+ return 0;
+ }
+
+ /*
* Allocate state block so tag methods have storage to record values.
*/
tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (ZIPState));
@@ -335,10 +371,8 @@ TIFFInitZIP(TIFF* tif, int scheme)
sp->stream.data_type = Z_BINARY;
/*
- * Merge codec-specific tag information and
- * override parent get/set field methods.
+ * Override parent get/set field methods.
*/
- _TIFFMergeFieldInfo(tif, zipFieldInfo, TIFFArrayCount(zipFieldInfo));
sp->vgetparent = tif->tif_tagmethods.vgetfield;
tif->tif_tagmethods.vgetfield = ZIPVGetField; /* hook for codec tags */
sp->vsetparent = tif->tif_tagmethods.vsetfield;
@@ -369,7 +403,7 @@ TIFFInitZIP(TIFF* tif, int scheme)
(void) TIFFPredictorInit(tif);
return (1);
bad:
- TIFFErrorExt(tif->tif_clientdata, "TIFFInitZIP",
+ TIFFErrorExt(tif->tif_clientdata, module,
"No space for ZIP state block");
return (0);
}
diff --git a/src/3rdparty/libtiff/libtiff/tiff.h b/src/3rdparty/libtiff/libtiff/tiff.h
index 6330795b6f..82116712a0 100644
--- a/src/3rdparty/libtiff/libtiff/tiff.h
+++ b/src/3rdparty/libtiff/libtiff/tiff.h
@@ -1,4 +1,4 @@
-/* $Id: tiff.h,v 1.42 2005/12/23 15:10:45 dron Exp $ */
+/* $Id: tiff.h,v 1.43 2006-10-05 15:20:40 dron Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -43,7 +43,7 @@
* (http://partners.adobe.com/asn/developer/PDFS/TN/TIFF6.pdf)
*
* For Big TIFF design notes see the following link
- * http://gdal.maptools.org/twiki/bin/view/libtiff/BigTIFFDesign
+ * http://www.remotesensing.org/libtiff/bigtiffdesign.html
*/
#define TIFF_VERSION 42
#define TIFF_BIGTIFF_VERSION 43
diff --git a/src/3rdparty/libtiff/libtiff/tiffconf.h b/src/3rdparty/libtiff/libtiff/tiffconf.h
index ff0b4650c8..1a012226c6 100644
--- a/src/3rdparty/libtiff/libtiff/tiffconf.h
+++ b/src/3rdparty/libtiff/libtiff/tiffconf.h
@@ -1,5 +1,5 @@
/*
- Configuration defines by Trolltech.
+ Configuration defines for Qt.
This file maintained for backward compatibility. Do not use definitions
from this file in your programs.
*/
diff --git a/src/3rdparty/libtiff/libtiff/tiffconf.h.in b/src/3rdparty/libtiff/libtiff/tiffconf.h.in
index 1b266e8db7..1a52b37ada 100644
--- a/src/3rdparty/libtiff/libtiff/tiffconf.h.in
+++ b/src/3rdparty/libtiff/libtiff/tiffconf.h.in
@@ -41,6 +41,9 @@
/* Support JPEG compression (requires IJG JPEG library) */
#undef JPEG_SUPPORT
+/* Support JBIG compression (requires JBIG-KIT library) */
+#undef JBIG_SUPPORT
+
/* Support LogLuv high dynamic range encoding */
#undef LOGLUV_SUPPORT
diff --git a/src/3rdparty/libtiff/libtiff/tiffconf.h.vc b/src/3rdparty/libtiff/libtiff/tiffconf.h.vc
deleted file mode 100644
index 18c0a1b3f7..0000000000
--- a/src/3rdparty/libtiff/libtiff/tiffconf.h.vc
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- Configuration defines for installed libtiff.
- This file maintained for backward compatibility. Do not use definitions
- from this file in your programs.
-*/
-
-#ifndef _TIFFCONF_
-#define _TIFFCONF_
-
-/* Define to 1 if the system has the type `int16'. */
-/* #undef HAVE_INT16 */
-
-/* Define to 1 if the system has the type `int32'. */
-/* #undef HAVE_INT32 */
-
-/* Define to 1 if the system has the type `int8'. */
-/* #undef HAVE_INT8 */
-
-/* The size of a `int', as computed by sizeof. */
-#define SIZEOF_INT 4
-
-/* The size of a `long', as computed by sizeof. */
-#define SIZEOF_LONG 4
-
-/* Compatibility stuff. */
-
-/* Define as 0 or 1 according to the floating point format suported by the
- machine */
-#define HAVE_IEEEFP 1
-
-/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */
-#define HOST_FILLORDER FILLORDER_LSB2MSB
-
-/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian
- (Intel) */
-#define HOST_BIGENDIAN 0
-
-/* Support CCITT Group 3 & 4 algorithms */
-#define CCITT_SUPPORT 1
-
-/* Support JPEG compression (requires IJG JPEG library) */
-/* #undef JPEG_SUPPORT */
-
-/* Support LogLuv high dynamic range encoding */
-#define LOGLUV_SUPPORT 1
-
-/* Support LZW algorithm */
-#define LZW_SUPPORT 1
-
-/* Support NeXT 2-bit RLE algorithm */
-#define NEXT_SUPPORT 1
-
-/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation
- fails with unpatched IJG JPEG library) */
-/* #undef OJPEG_SUPPORT */
-
-/* Support Macintosh PackBits algorithm */
-#define PACKBITS_SUPPORT 1
-
-/* Support Pixar log-format algorithm (requires Zlib) */
-/* #undef PIXARLOG_SUPPORT */
-
-/* Support ThunderScan 4-bit RLE algorithm */
-#define THUNDER_SUPPORT 1
-
-/* Support Deflate compression */
-/* #undef ZIP_SUPPORT */
-
-/* Support strip chopping (whether or not to convert single-strip uncompressed
- images to mutiple strips of ~8Kb to reduce memory usage) */
-#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP
-
-/* Enable SubIFD tag (330) support */
-#define SUBIFD_SUPPORT 1
-
-/* Treat extra sample as alpha (default enabled). The RGBA interface will
- treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many
- packages produce RGBA files but don't mark the alpha properly. */
-#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1
-
-/* Pick up YCbCr subsampling info from the JPEG data stream to support files
- lacking the tag (default enabled). */
-#define CHECK_JPEG_YCBCR_SUBSAMPLING 1
-
-/*
- * Feature support definitions.
- * XXX: These macros are obsoleted. Don't use them in your apps!
- * Macros stays here for backward compatibility and should be always defined.
- */
-#define COLORIMETRY_SUPPORT
-#define YCBCR_SUPPORT
-#define CMYK_SUPPORT
-#define ICC_SUPPORT
-#define PHOTOSHOP_SUPPORT
-#define IPTC_SUPPORT
-
-#endif /* _TIFFCONF_ */
diff --git a/src/3rdparty/libtiff/libtiff/tiffconf.vc.h b/src/3rdparty/libtiff/libtiff/tiffconf.vc.h
new file mode 100644
index 0000000000..9a0b15205d
--- /dev/null
+++ b/src/3rdparty/libtiff/libtiff/tiffconf.vc.h
@@ -0,0 +1,109 @@
+/*
+ Configuration defines for installed libtiff.
+ This file maintained for backward compatibility. Do not use definitions
+ from this file in your programs.
+*/
+
+#ifndef _TIFFCONF_
+#define _TIFFCONF_
+
+/* Define to 1 if the system has the type `int16'. */
+/* #undef HAVE_INT16 */
+
+/* Define to 1 if the system has the type `int32'. */
+/* #undef HAVE_INT32 */
+
+/* Define to 1 if the system has the type `int8'. */
+/* #undef HAVE_INT8 */
+
+/* The size of a `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of a `long', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
+/* Signed 64-bit type formatter */
+#define TIFF_INT64_FORMAT "%I64d"
+
+/* Signed 64-bit type */
+#define TIFF_INT64_T signed __int64
+
+/* Unsigned 64-bit type formatter */
+#define TIFF_UINT64_FORMAT "%I64u"
+
+/* Unsigned 64-bit type */
+#define TIFF_UINT64_T unsigned __int64
+
+/* Compatibility stuff. */
+
+/* Define as 0 or 1 according to the floating point format suported by the
+ machine */
+#define HAVE_IEEEFP 1
+
+/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */
+#define HOST_FILLORDER FILLORDER_LSB2MSB
+
+/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian
+ (Intel) */
+#define HOST_BIGENDIAN 0
+
+/* Support CCITT Group 3 & 4 algorithms */
+#define CCITT_SUPPORT 1
+
+/* Support JPEG compression (requires IJG JPEG library) */
+/* #undef JPEG_SUPPORT */
+
+/* Support LogLuv high dynamic range encoding */
+#define LOGLUV_SUPPORT 1
+
+/* Support LZW algorithm */
+#define LZW_SUPPORT 1
+
+/* Support NeXT 2-bit RLE algorithm */
+#define NEXT_SUPPORT 1
+
+/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation
+ fails with unpatched IJG JPEG library) */
+/* #undef OJPEG_SUPPORT */
+
+/* Support Macintosh PackBits algorithm */
+#define PACKBITS_SUPPORT 1
+
+/* Support Pixar log-format algorithm (requires Zlib) */
+/* #undef PIXARLOG_SUPPORT */
+
+/* Support ThunderScan 4-bit RLE algorithm */
+#define THUNDER_SUPPORT 1
+
+/* Support Deflate compression */
+/* #undef ZIP_SUPPORT */
+
+/* Support strip chopping (whether or not to convert single-strip uncompressed
+ images to mutiple strips of ~8Kb to reduce memory usage) */
+#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP
+
+/* Enable SubIFD tag (330) support */
+#define SUBIFD_SUPPORT 1
+
+/* Treat extra sample as alpha (default enabled). The RGBA interface will
+ treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many
+ packages produce RGBA files but don't mark the alpha properly. */
+#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1
+
+/* Pick up YCbCr subsampling info from the JPEG data stream to support files
+ lacking the tag (default enabled). */
+#define CHECK_JPEG_YCBCR_SUBSAMPLING 1
+
+/*
+ * Feature support definitions.
+ * XXX: These macros are obsoleted. Don't use them in your apps!
+ * Macros stays here for backward compatibility and should be always defined.
+ */
+#define COLORIMETRY_SUPPORT
+#define YCBCR_SUPPORT
+#define CMYK_SUPPORT
+#define ICC_SUPPORT
+#define PHOTOSHOP_SUPPORT
+#define IPTC_SUPPORT
+
+#endif /* _TIFFCONF_ */
diff --git a/src/3rdparty/libtiff/libtiff/tiffconf.wince.h b/src/3rdparty/libtiff/libtiff/tiffconf.wince.h
new file mode 100644
index 0000000000..27fa239a92
--- /dev/null
+++ b/src/3rdparty/libtiff/libtiff/tiffconf.wince.h
@@ -0,0 +1,129 @@
+/* $Id: tiffconf.wince.h,v 1.1.2.1 2009-01-01 17:52:51 bfriesen Exp $ */
+
+/*
+ * Windows CE platform tiffconf.wince.h
+ * Created by Mateusz Loskot (mateusz@loskot.net)
+ *
+ * NOTE: Requires WCELIBCEX library with wceex_* functions,
+ * It's an extension to C library on Windows CE platform.
+ * For example, HAVE_STDIO_H definition indicates there are
+ * following files available:
+ * stdio.h - from Windows CE / Windows Mobile SDK
+ * wce_stdio.h - from WCELIBCEX library
+ */
+
+
+/*
+ Configuration defines for installed libtiff.
+ This file maintained for backward compatibility. Do not use definitions
+ from this file in your programs.
+*/
+
+#ifndef _WIN32_WCE
+# error This version of tif_config.h header is dedicated for Windows CE platform!
+#endif
+
+
+#ifndef _TIFFCONF_
+#define _TIFFCONF_
+
+/* Define to 1 if the system has the type `int16'. */
+/* #undef HAVE_INT16 */
+
+/* Define to 1 if the system has the type `int32'. */
+/* #undef HAVE_INT32 */
+
+/* Define to 1 if the system has the type `int8'. */
+/* #undef HAVE_INT8 */
+
+/* The size of a `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of a `long', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
+/* Signed 64-bit type formatter */
+#define TIFF_INT64_FORMAT "%I64d"
+
+/* Signed 64-bit type */
+#define TIFF_INT64_T signed __int64
+
+/* Unsigned 64-bit type formatter */
+#define TIFF_UINT64_FORMAT "%I64u"
+
+/* Unsigned 64-bit type */
+#define TIFF_UINT64_T unsigned __int64
+
+/* Compatibility stuff. */
+
+/* Define as 0 or 1 according to the floating point format suported by the
+ machine */
+#define HAVE_IEEEFP 1
+
+/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */
+#define HOST_FILLORDER FILLORDER_LSB2MSB
+
+/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian
+ (Intel) */
+#define HOST_BIGENDIAN 0
+
+/* Support CCITT Group 3 & 4 algorithms */
+#define CCITT_SUPPORT 1
+
+/* Support JPEG compression (requires IJG JPEG library) */
+/* #undef JPEG_SUPPORT */
+
+/* Support LogLuv high dynamic range encoding */
+#define LOGLUV_SUPPORT 1
+
+/* Support LZW algorithm */
+#define LZW_SUPPORT 1
+
+/* Support NeXT 2-bit RLE algorithm */
+#define NEXT_SUPPORT 1
+
+/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation
+ fails with unpatched IJG JPEG library) */
+/* #undef OJPEG_SUPPORT */
+
+/* Support Macintosh PackBits algorithm */
+#define PACKBITS_SUPPORT 1
+
+/* Support Pixar log-format algorithm (requires Zlib) */
+/* #undef PIXARLOG_SUPPORT */
+
+/* Support ThunderScan 4-bit RLE algorithm */
+#define THUNDER_SUPPORT 1
+
+/* Support Deflate compression */
+/* #undef ZIP_SUPPORT */
+
+/* Support strip chopping (whether or not to convert single-strip uncompressed
+ images to mutiple strips of ~8Kb to reduce memory usage) */
+#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP
+
+/* Enable SubIFD tag (330) support */
+#define SUBIFD_SUPPORT 1
+
+/* Treat extra sample as alpha (default enabled). The RGBA interface will
+ treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many
+ packages produce RGBA files but don't mark the alpha properly. */
+#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1
+
+/* Pick up YCbCr subsampling info from the JPEG data stream to support files
+ lacking the tag (default enabled). */
+#define CHECK_JPEG_YCBCR_SUBSAMPLING 1
+
+/*
+ * Feature support definitions.
+ * XXX: These macros are obsoleted. Don't use them in your apps!
+ * Macros stays here for backward compatibility and should be always defined.
+ */
+#define COLORIMETRY_SUPPORT
+#define YCBCR_SUPPORT
+#define CMYK_SUPPORT
+#define ICC_SUPPORT
+#define PHOTOSHOP_SUPPORT
+#define IPTC_SUPPORT
+
+#endif /* _TIFFCONF_ */
diff --git a/src/3rdparty/libtiff/libtiff/tiffio.h b/src/3rdparty/libtiff/libtiff/tiffio.h
index c0804edb21..0f2735f95d 100644
--- a/src/3rdparty/libtiff/libtiff/tiffio.h
+++ b/src/3rdparty/libtiff/libtiff/tiffio.h
@@ -1,4 +1,4 @@
-/* $Id: tiffio.h,v 1.50 2006/03/21 16:37:51 dron Exp $ */
+/* $Id: tiffio.h,v 1.56.2.3 2009-01-01 00:10:43 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -58,14 +58,15 @@ typedef struct tiff TIFF;
* 32-bit file offsets being the most important, and to ensure
* that it is unsigned, rather than signed.
*/
-typedef uint32 ttag_t; /* directory tag */
-typedef uint16 tdir_t; /* directory index */
-typedef uint16 tsample_t; /* sample number */
-typedef uint32 tstrip_t; /* strip number */
-typedef uint32 ttile_t; /* tile number */
-typedef int32 tsize_t; /* i/o size in bytes */
-typedef void* tdata_t; /* image data ref */
-typedef uint32 toff_t; /* file offset */
+typedef uint32 ttag_t; /* directory tag */
+typedef uint16 tdir_t; /* directory index */
+typedef uint16 tsample_t; /* sample number */
+typedef uint32 tstrile_t; /* strip or tile number */
+typedef tstrile_t tstrip_t; /* strip number */
+typedef tstrile_t ttile_t; /* tile number */
+typedef int32 tsize_t; /* i/o size in bytes */
+typedef void* tdata_t; /* image data ref */
+typedef uint32 toff_t; /* file offset */
#if !defined(__WIN32__) && (defined(_WIN32) || defined(WIN32))
#define __WIN32__
@@ -98,10 +99,6 @@ typedef HFILE thandle_t; /* client data handle */
typedef void* thandle_t; /* client data handle */
#endif /* USE_WIN32_FILEIO */
-#ifndef NULL
-# define NULL (void *)0
-#endif
-
/*
* Flags to pass to TIFFPrintDirectory to control
* printing of data structures that are potentially
@@ -193,35 +190,36 @@ typedef void (*tileSeparateRoutine)
* RGBA-reader state.
*/
struct _TIFFRGBAImage {
- TIFF* tif; /* image handle */
- int stoponerr; /* stop on read error */
- int isContig; /* data is packed/separate */
- int alpha; /* type of alpha data present */
- uint32 width; /* image width */
- uint32 height; /* image height */
- uint16 bitspersample; /* image bits/sample */
- uint16 samplesperpixel; /* image samples/pixel */
- uint16 orientation; /* image orientation */
- uint16 req_orientation; /* requested orientation */
- uint16 photometric; /* image photometric interp */
- uint16* redcmap; /* colormap pallete */
- uint16* greencmap;
- uint16* bluecmap;
- /* get image data routine */
- int (*get)(TIFFRGBAImage*, uint32*, uint32, uint32);
+ TIFF* tif; /* image handle */
+ int stoponerr; /* stop on read error */
+ int isContig; /* data is packed/separate */
+ int alpha; /* type of alpha data present */
+ uint32 width; /* image width */
+ uint32 height; /* image height */
+ uint16 bitspersample; /* image bits/sample */
+ uint16 samplesperpixel; /* image samples/pixel */
+ uint16 orientation; /* image orientation */
+ uint16 req_orientation; /* requested orientation */
+ uint16 photometric; /* image photometric interp */
+ uint16* redcmap; /* colormap pallete */
+ uint16* greencmap;
+ uint16* bluecmap;
+ /* get image data routine */
+ int (*get)(TIFFRGBAImage*, uint32*, uint32, uint32);
+ /* put decoded strip/tile */
union {
void (*any)(TIFFRGBAImage*);
- tileContigRoutine contig;
- tileSeparateRoutine separate;
- } put; /* put decoded strip/tile */
- TIFFRGBValue* Map; /* sample mapping array */
- uint32** BWmap; /* black&white map */
- uint32** PALmap; /* palette image map */
- TIFFYCbCrToRGB* ycbcr; /* YCbCr conversion state */
- TIFFCIELabToRGB* cielab; /* CIE L*a*b conversion state */
-
- int row_offset;
- int col_offset;
+ tileContigRoutine contig;
+ tileSeparateRoutine separate;
+ } put;
+ TIFFRGBValue* Map; /* sample mapping array */
+ uint32** BWmap; /* black&white map */
+ uint32** PALmap; /* palette image map */
+ TIFFYCbCrToRGB* ycbcr; /* YCbCr conversion state */
+ TIFFCIELabToRGB* cielab; /* CIE L*a*b conversion state */
+
+ int row_offset;
+ int col_offset;
};
/*
@@ -255,6 +253,10 @@ typedef struct {
#define LOGLUV_PUBLIC 1
#endif
+#if !defined(__GNUC__) && !defined(__attribute__)
+# define __attribute__(x) /*nothing*/
+#endif
+
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
@@ -351,6 +353,8 @@ extern int TIFFReadCustomDirectory(TIFF*, toff_t, const TIFFFieldInfo[],
size_t);
extern int TIFFReadEXIFDirectory(TIFF*, toff_t);
extern tsize_t TIFFScanlineSize(TIFF*);
+extern tsize_t TIFFOldScanlineSize(TIFF*);
+extern tsize_t TIFFNewScanlineSize(TIFF*);
extern tsize_t TIFFRasterScanlineSize(TIFF*);
extern tsize_t TIFFStripSize(TIFF*);
extern tsize_t TIFFRawStripSize(TIFF*, tstrip_t);
@@ -435,10 +439,10 @@ extern TIFF* TIFFClientOpen(const char*, const char*,
TIFFMapFileProc, TIFFUnmapFileProc);
extern const char* TIFFFileName(TIFF*);
extern const char* TIFFSetFileName(TIFF*, const char *);
-extern void TIFFError(const char*, const char*, ...);
-extern void TIFFErrorExt(thandle_t, const char*, const char*, ...);
-extern void TIFFWarning(const char*, const char*, ...);
-extern void TIFFWarningExt(thandle_t, const char*, const char*, ...);
+extern void TIFFError(const char*, const char*, ...) __attribute__((format (printf,2,3)));
+extern void TIFFErrorExt(thandle_t, const char*, const char*, ...) __attribute__((format (printf,3,4)));
+extern void TIFFWarning(const char*, const char*, ...) __attribute__((format (printf,2,3)));
+extern void TIFFWarningExt(thandle_t, const char*, const char*, ...) __attribute__((format (printf,3,4)));
extern TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler);
extern TIFFErrorHandlerExt TIFFSetErrorHandlerExt(TIFFErrorHandlerExt);
extern TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler);
diff --git a/src/3rdparty/libtiff/libtiff/tiffiop.h b/src/3rdparty/libtiff/libtiff/tiffiop.h
index 302accc012..30bb19cfca 100644
--- a/src/3rdparty/libtiff/libtiff/tiffiop.h
+++ b/src/3rdparty/libtiff/libtiff/tiffiop.h
@@ -1,4 +1,4 @@
-/* $Id: tiffiop.h,v 1.46 2006/03/16 12:22:27 dron Exp $ */
+/* $Id: tiffiop.h,v 1.51.2.1 2009-01-06 19:08:09 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -62,6 +62,13 @@ extern void *lfind(const void *, const void *, size_t *, size_t,
int (*)(const void *, const void *));
#endif
+/*
+ Libtiff itself does not require a 64-bit type, but bundled TIFF
+ utilities may use it.
+*/
+typedef TIFF_INT64_T int64;
+typedef TIFF_UINT64_T uint64;
+
#include "tiffio.h"
#include "tif_dir.h"
@@ -102,29 +109,35 @@ struct tiff {
int tif_fd; /* open file descriptor */
int tif_mode; /* open mode (O_*) */
uint32 tif_flags;
-#define TIFF_FILLORDER 0x0003 /* natural bit fill order for machine */
-#define TIFF_DIRTYHEADER 0x0004 /* header must be written on close */
-#define TIFF_DIRTYDIRECT 0x0008 /* current directory must be written */
-#define TIFF_BUFFERSETUP 0x0010 /* data buffers setup */
-#define TIFF_CODERSETUP 0x0020 /* encoder/decoder setup done */
-#define TIFF_BEENWRITING 0x0040 /* written 1+ scanlines to file */
-#define TIFF_SWAB 0x0080 /* byte swap file information */
-#define TIFF_NOBITREV 0x0100 /* inhibit bit reversal logic */
-#define TIFF_MYBUFFER 0x0200 /* my raw data buffer; free on close */
-#define TIFF_ISTILED 0x0400 /* file is tile, not strip- based */
-#define TIFF_MAPPED 0x0800 /* file is mapped into memory */
-#define TIFF_POSTENCODE 0x1000 /* need call to postencode routine */
-#define TIFF_INSUBIFD 0x2000 /* currently writing a subifd */
-#define TIFF_UPSAMPLED 0x4000 /* library is doing data up-sampling */
-#define TIFF_STRIPCHOP 0x8000 /* enable strip chopping support */
+#define TIFF_FILLORDER 0x00003 /* natural bit fill order for machine */
+#define TIFF_DIRTYHEADER 0x00004 /* header must be written on close */
+#define TIFF_DIRTYDIRECT 0x00008 /* current directory must be written */
+#define TIFF_BUFFERSETUP 0x00010 /* data buffers setup */
+#define TIFF_CODERSETUP 0x00020 /* encoder/decoder setup done */
+#define TIFF_BEENWRITING 0x00040 /* written 1+ scanlines to file */
+#define TIFF_SWAB 0x00080 /* byte swap file information */
+#define TIFF_NOBITREV 0x00100 /* inhibit bit reversal logic */
+#define TIFF_MYBUFFER 0x00200 /* my raw data buffer; free on close */
+#define TIFF_ISTILED 0x00400 /* file is tile, not strip- based */
+#define TIFF_MAPPED 0x00800 /* file is mapped into memory */
+#define TIFF_POSTENCODE 0x01000 /* need call to postencode routine */
+#define TIFF_INSUBIFD 0x02000 /* currently writing a subifd */
+#define TIFF_UPSAMPLED 0x04000 /* library is doing data up-sampling */
+#define TIFF_STRIPCHOP 0x08000 /* enable strip chopping support */
#define TIFF_HEADERONLY 0x10000 /* read header only, do not process */
/* the first directory */
+#define TIFF_NOREADRAW 0x20000 /* skip reading of raw uncompressed */
+ /* image data */
+#define TIFF_INCUSTOMIFD 0x40000 /* currently writing a custom IFD */
toff_t tif_diroff; /* file offset of current directory */
toff_t tif_nextdiroff; /* file offset of following directory */
toff_t* tif_dirlist; /* list of offsets to already seen */
/* directories to prevent IFD looping */
+ tsize_t tif_dirlistsize;/* number of entires in offset list */
uint16 tif_dirnumber; /* number of already seen directories */
TIFFDirectory tif_dir; /* internal rep of current directory */
+ TIFFDirectory tif_customdir; /* custom IFDs are separated from
+ the main ones */
TIFFHeader tif_header; /* file's header block */
const int* tif_typeshift; /* data type shift counts */
const long* tif_typemask; /* data type masks */
@@ -169,7 +182,8 @@ struct tiff {
tsize_t tif_rawcc; /* bytes unread from raw buffer */
/* memory-mapped file support */
tidata_t tif_base; /* base of mapped file */
- toff_t tif_size; /* size of mapped file region (bytes) */
+ toff_t tif_size; /* size of mapped file region (bytes)
+ FIXME: it should be tsize_t */
TIFFMapFileProc tif_mapproc; /* map file method */
TIFFUnmapFileProc tif_unmapproc;/* unmap file method */
/* input/output callback methods */
@@ -278,6 +292,7 @@ extern TIFFErrorHandlerExt _TIFFwarningHandlerExt;
extern TIFFErrorHandlerExt _TIFFerrorHandlerExt;
extern tdata_t _TIFFCheckMalloc(TIFF*, size_t, size_t, const char*);
+extern tdata_t _TIFFCheckRealloc(TIFF*, tdata_t, size_t, size_t, const char*);
extern int TIFFInitDumpMode(TIFF*, int);
#ifdef PACKBITS_SUPPORT
diff --git a/src/3rdparty/libtiff/libtiff/tiffvers.h b/src/3rdparty/libtiff/libtiff/tiffvers.h
index 9744f8d308..7108541bc2 100644
--- a/src/3rdparty/libtiff/libtiff/tiffvers.h
+++ b/src/3rdparty/libtiff/libtiff/tiffvers.h
@@ -1,4 +1,4 @@
-#define TIFFLIB_VERSION_STR "LIBTIFF, Version 3.8.2\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc."
+#define TIFFLIB_VERSION_STR "LIBTIFF, Version 3.9.2\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc."
/*
* This define can be used in code that requires
* compilation-related definitions specific to a
@@ -6,4 +6,4 @@
* version checking should be done based on the
* string returned by TIFFGetVersion.
*/
-#define TIFFLIB_VERSION 20060323
+#define TIFFLIB_VERSION 20091104
diff --git a/src/3rdparty/libtiff/m4/acinclude.m4 b/src/3rdparty/libtiff/m4/acinclude.m4
deleted file mode 100644
index a213cde7ed..0000000000
--- a/src/3rdparty/libtiff/m4/acinclude.m4
+++ /dev/null
@@ -1,669 +0,0 @@
-dnl ---------------------------------------------------------------------------
-dnl Message output
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([LOC_MSG],[echo "$1"])
-
-dnl ---------------------------------------------------------------------------
-dnl Available from the GNU Autoconf Macro Archive at:
-dnl http://www.gnu.org/software/ac-archive/vl_prog_cc_warnings.html
-dnl ---------------------------------------------------------------------------
-
-dnl @synopsis VL_PROG_CC_WARNINGS([ANSI])
-dnl
-dnl Enables a reasonable set of warnings for the C compiler.
-dnl Optionally, if the first argument is nonempty, turns on flags which
-dnl enforce and/or enable proper ANSI C if such are known with the
-dnl compiler used.
-dnl
-dnl Currently this macro knows about GCC, Solaris C compiler, Digital
-dnl Unix C compiler, C for AIX Compiler, HP-UX C compiler, IRIX C
-dnl compiler, NEC SX-5 (Super-UX 10) C compiler, and Cray J90 (Unicos
-dnl 10.0.0.8) C compiler.
-dnl
-dnl @category C
-dnl @author Ville Laurikari <vl@iki.fi>
-dnl @version 2002-04-04
-dnl @license AllPermissive
-
-AC_DEFUN([VL_PROG_CC_WARNINGS], [
- ansi=$1
- if test -z "$ansi"; then
- msg="for C compiler warning flags"
- else
- msg="for C compiler warning and ANSI conformance flags"
- fi
- AC_CACHE_CHECK($msg, vl_cv_prog_cc_warnings, [
- if test -n "$CC"; then
- cat > conftest.c <<EOF
-int main(int argc, char **argv) { return 0; }
-EOF
-
- dnl GCC. -W option has been renamed in -wextra in latest gcc versions.
- if test "$GCC" = "yes"; then
- if test -z "$ansi"; then
- vl_cv_prog_cc_warnings="-Wall -W"
- else
- vl_cv_prog_cc_warnings="-Wall -W -ansi -pedantic"
- fi
-
- dnl Most compilers print some kind of a version string with some command
- dnl line options (often "-V"). The version string should be checked
- dnl before doing a test compilation run with compiler-specific flags.
- dnl This is because some compilers (like the Cray compiler) only
- dnl produce a warning message for unknown flags instead of returning
- dnl an error, resulting in a false positive. Also, compilers may do
- dnl erratic things when invoked with flags meant for a different
- dnl compiler.
-
- dnl Solaris C compiler
- elif $CC -V 2>&1 | grep -i "WorkShop" > /dev/null 2>&1 &&
- $CC -c -v -Xc conftest.c > /dev/null 2>&1 &&
- test -f conftest.o; then
- if test -z "$ansi"; then
- vl_cv_prog_cc_warnings="-v"
- else
- vl_cv_prog_cc_warnings="-v -Xc"
- fi
-
- dnl Digital Unix C compiler
- elif $CC -V 2>&1 | grep -i "Digital UNIX Compiler" > /dev/null 2>&1 &&
- $CC -c -verbose -w0 -warnprotos -std1 conftest.c > /dev/null 2>&1 &&
- test -f conftest.o; then
- if test -z "$ansi"; then
- vl_cv_prog_cc_warnings="-verbose -w0 -warnprotos"
- else
- vl_cv_prog_cc_warnings="-verbose -w0 -warnprotos -std1"
- fi
-
- dnl C for AIX Compiler
- elif $CC 2>&1 | grep -i "C for AIX Compiler" > /dev/null 2>&1 &&
- $CC -c -qlanglvl=ansi -qinfo=all conftest.c > /dev/null 2>&1 &&
- test -f conftest.o; then
- if test -z "$ansi"; then
- vl_cv_prog_cc_warnings="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd"
- else
- vl_cv_prog_cc_warnings="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd -qlanglvl=ansi"
- fi
-
- dnl IRIX C compiler
- elif $CC -version 2>&1 | grep -i "MIPSpro Compilers" > /dev/null 2>&1 &&
- $CC -c -fullwarn -ansi -ansiE conftest.c > /dev/null 2>&1 &&
- test -f conftest.o; then
- if test -z "$ansi"; then
- vl_cv_prog_cc_warnings="-fullwarn"
- else
- vl_cv_prog_cc_warnings="-fullwarn -ansi -ansiE"
- fi
-
- dnl HP-UX C compiler
- elif what $CC 2>&1 | grep -i "HP C Compiler" > /dev/null 2>&1 &&
- $CC -c -Aa +w1 conftest.c > /dev/null 2>&1 &&
- test -f conftest.o; then
- if test -z "$ansi"; then
- vl_cv_prog_cc_warnings="+w1"
- else
- vl_cv_prog_cc_warnings="+w1 -Aa"
- fi
-
- dnl The NEC SX-5 (Super-UX 10) C compiler
- elif $CC -V 2>&1 | grep "/SX" > /dev/null 2>&1 &&
- $CC -c -pvctl[,]fullmsg -Xc conftest.c > /dev/null 2>&1 &&
- test -f conftest.o; then
- if test -z "$ansi"; then
- vl_cv_prog_cc_warnings="-pvctl[,]fullmsg"
- else
- vl_cv_prog_cc_warnings="-pvctl[,]fullmsg -Xc"
- fi
-
- dnl The Cray C compiler (Unicos)
- elif $CC -V 2>&1 | grep -i "Cray" > /dev/null 2>&1 &&
- $CC -c -h msglevel 2 conftest.c > /dev/null 2>&1 &&
- test -f conftest.o; then
- if test -z "$ansi"; then
- vl_cv_prog_cc_warnings="-h msglevel 2"
- else
- vl_cv_prog_cc_warnings="-h msglevel 2 -h conform"
- fi
-
- fi
- rm -f conftest.*
- fi
- if test -n "$vl_cv_prog_cc_warnings"; then
- CFLAGS="$CFLAGS $vl_cv_prog_cc_warnings"
- else
- vl_cv_prog_cc_warnings="unknown"
- fi
- ])
-])dnl
-
-dnl ---------------------------------------------------------------------------
-dnl Available from the GNU Autoconf Macro Archive at:
-dnl http://autoconf-archive.cryp.to/ax_lang_compiler_ms.html
-dnl ---------------------------------------------------------------------------
-
-dnl @synopsis AX_LANG_COMPILER_MS
-dnl
-dnl Check whether the compiler for the current language is Microsoft.
-dnl
-dnl This macro is modeled after _AC_LANG_COMPILER_GNU in the GNU
-dnl Autoconf implementation.
-dnl
-dnl @category InstalledPackages
-dnl @author Braden McDaniel <braden@endoframe.com>
-dnl @version 2004-11-15
-dnl @license AllPermissive
-
-AC_DEFUN([AX_LANG_COMPILER_MS],
-[AC_CACHE_CHECK([whether we are using the Microsoft _AC_LANG compiler],
- [ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms],
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef _MSC_VER
- choke me
-#endif
-]])],
- [ax_compiler_ms=yes],
- [ax_compiler_ms=no])
-ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms=$ax_compiler_ms
-])])
-
-dnl ---------------------------------------------------------------------------
-dnl Available from the GNU Autoconf Macro Archive at:
-dnl http://www.gnu.org/software/ac-archive/ax_check_gl.html
-dnl ---------------------------------------------------------------------------
-
-dnl @synopsis AX_CHECK_GL
-dnl
-dnl Check for an OpenGL implementation. If GL is found, the required
-dnl compiler and linker flags are included in the output variables
-dnl "GL_CFLAGS" and "GL_LIBS", respectively. This macro adds the
-dnl configure option "--with-apple-opengl-framework", which users can
-dnl use to indicate that Apple's OpenGL framework should be used on Mac
-dnl OS X. If Apple's OpenGL framework is used, the symbol
-dnl "HAVE_APPLE_OPENGL_FRAMEWORK" is defined. If no GL implementation
-dnl is found, "no_gl" is set to "yes".
-dnl
-dnl @category InstalledPackages
-dnl @author Braden McDaniel <braden@endoframe.com>
-dnl @version 2004-11-15
-dnl @license AllPermissive
-
-AC_DEFUN([AX_CHECK_GL],
-[AC_REQUIRE([AC_PATH_X])dnl
-AC_REQUIRE([ACX_PTHREAD])dnl
-
-#
-# There isn't a reliable way to know we should use the Apple OpenGL framework
-# without a configure option. A Mac OS X user may have installed an
-# alternative GL implementation (e.g., Mesa), which may or may not depend on X.
-#
-AC_ARG_WITH([apple-opengl-framework],
- [AC_HELP_STRING([--with-apple-opengl-framework],
- [use Apple OpenGL framework (Mac OS X only)])])
-if test "X$with_apple_opengl_framework" = "Xyes"; then
- AC_DEFINE([HAVE_APPLE_OPENGL_FRAMEWORK], [1],
- [Use the Apple OpenGL framework.])
- GL_LIBS="-framework OpenGL"
-else
- AC_LANG_PUSH(C)
-
- AX_LANG_COMPILER_MS
- if test X$ax_compiler_ms = Xno; then
- GL_CFLAGS="${PTHREAD_CFLAGS}"
- GL_LIBS="${PTHREAD_LIBS} -lm"
- fi
-
- #
- # Use x_includes and x_libraries if they have been set (presumably by
- # AC_PATH_X).
- #
- if test "X$no_x" != "Xyes"; then
- if test -n "$x_includes"; then
- GL_CFLAGS="-I${x_includes} ${GL_CFLAGS}"
- fi
- if test -n "$x_libraries"; then
- GL_LIBS="-L${x_libraries} -lX11 ${GL_LIBS}"
- fi
- fi
-
- AC_CHECK_HEADERS([windows.h])
-
- AC_CACHE_CHECK([for OpenGL library], [ax_cv_check_gl_libgl],
- [ax_cv_check_gl_libgl="no"
- ax_save_CPPFLAGS="${CPPFLAGS}"
- CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}"
- ax_save_LIBS="${LIBS}"
- LIBS=""
- ax_check_libs="-lopengl32 -lGL"
- for ax_lib in ${ax_check_libs}; do
- if test X$ax_compiler_ms = Xyes; then
- ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`
- else
- ax_try_lib="${ax_lib}"
- fi
- LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[
-# if HAVE_WINDOWS_H && defined(_WIN32)
-# include <windows.h>
-# endif
-# include <GL/gl.h>]],
- [[glBegin(0)]])],
- [ax_cv_check_gl_libgl="${ax_try_lib}"; break])
- done
- LIBS=${ax_save_LIBS}
- CPPFLAGS=${ax_save_CPPFLAGS}])
-
- if test "X${ax_cv_check_gl_libgl}" = "Xno"; then
- no_gl="yes"
- GL_CFLAGS=""
- GL_LIBS=""
- else
- GL_LIBS="${ax_cv_check_gl_libgl} ${GL_LIBS}"
- fi
- AC_LANG_POP(C)
-fi
-
-AC_SUBST([GL_CFLAGS])
-AC_SUBST([GL_LIBS])
-])dnl
-
-dnl ---------------------------------------------------------------------------
-dnl Available from the GNU Autoconf Macro Archive at:
-dnl http://www.gnu.org/software/ac-archive/ax_check_glu.html
-dnl ---------------------------------------------------------------------------
-
-dnl @synopsis AX_CHECK_GLU
-dnl
-dnl Check for GLU. If GLU is found, the required preprocessor and
-dnl linker flags are included in the output variables "GLU_CFLAGS" and
-dnl "GLU_LIBS", respectively. This macro adds the configure option
-dnl "--with-apple-opengl-framework", which users can use to indicate
-dnl that Apple's OpenGL framework should be used on Mac OS X. If
-dnl Apple's OpenGL framework is used, the symbol
-dnl "HAVE_APPLE_OPENGL_FRAMEWORK" is defined. If no GLU implementation
-dnl is found, "no_glu" is set to "yes".
-dnl
-dnl @category InstalledPackages
-dnl @author Braden McDaniel <braden@endoframe.com>
-dnl @version 2004-11-15
-dnl @license AllPermissive
-
-AC_DEFUN([AX_CHECK_GLU],
-[AC_REQUIRE([AX_CHECK_GL])dnl
-AC_REQUIRE([AC_PROG_CXX])dnl
-GLU_CFLAGS="${GL_CFLAGS}"
-if test "X${with_apple_opengl_framework}" != "Xyes"; then
- AC_CACHE_CHECK([for OpenGL Utility library], [ax_cv_check_glu_libglu],
- [ax_cv_check_glu_libglu="no"
- ax_save_CPPFLAGS="${CPPFLAGS}"
- CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}"
- ax_save_LIBS="${LIBS}"
- LIBS=""
- ax_check_libs="-lglu32 -lGLU"
- for ax_lib in ${ax_check_libs}; do
- if test X$ax_compiler_ms = Xyes; then
- ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`
- else
- ax_try_lib="${ax_lib}"
- fi
- LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}"
- #
- # libGLU typically links with libstdc++ on POSIX platforms. However,
- # setting the language to C++ means that test program source is named
- # "conftest.cc"; and Microsoft cl doesn't know what to do with such a
- # file.
- #
- AC_LANG_PUSH([C++])
- if test X$ax_compiler_ms = Xyes; then
- AC_LANG_PUSH([C])
- fi
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[
-# if HAVE_WINDOWS_H && defined(_WIN32)
-# include <windows.h>
-# endif
-# include <GL/glu.h>]],
- [[gluBeginCurve(0)]])],
- [ax_cv_check_glu_libglu="${ax_try_lib}"; break])
- if test X$ax_compiler_ms = Xyes; then
- AC_LANG_POP([C])
- fi
- AC_LANG_POP([C++])
- done
- LIBS=${ax_save_LIBS}
- CPPFLAGS=${ax_save_CPPFLAGS}])
- if test "X${ax_cv_check_glu_libglu}" = "Xno"; then
- no_glu="yes"
- GLU_CFLAGS=""
- GLU_LIBS=""
- else
- GLU_LIBS="${ax_cv_check_glu_libglu} ${GL_LIBS}"
- fi
-fi
-AC_SUBST([GLU_CFLAGS])
-AC_SUBST([GLU_LIBS])
-])
-
-dnl ---------------------------------------------------------------------------
-dnl Available from the GNU Autoconf Macro Archive at:
-dnl http://www.gnu.org/software/ac-archive/ax_check_glut.html
-dnl ---------------------------------------------------------------------------
-
-dnl @synopsis AX_CHECK_GLUT
-dnl
-dnl Check for GLUT. If GLUT is found, the required compiler and linker
-dnl flags are included in the output variables "GLUT_CFLAGS" and
-dnl "GLUT_LIBS", respectively. This macro adds the configure option
-dnl "--with-apple-opengl-framework", which users can use to indicate
-dnl that Apple's OpenGL framework should be used on Mac OS X. If
-dnl Apple's OpenGL framework is used, the symbol
-dnl "HAVE_APPLE_OPENGL_FRAMEWORK" is defined. If GLUT is not found,
-dnl "no_glut" is set to "yes".
-dnl
-dnl @category InstalledPackages
-dnl @author Braden McDaniel <braden@endoframe.com>
-dnl @version 2004-11-15
-dnl @license AllPermissive
-
-AC_DEFUN([AX_CHECK_GLUT],
-[AC_REQUIRE([AX_CHECK_GLU])dnl
-AC_REQUIRE([AC_PATH_XTRA])dnl
-
-if test "X$with_apple_opengl_framework" = "Xyes"; then
- GLUT_CFLAGS="${GLU_CFLAGS}"
- GLUT_LIBS="-framework GLUT -lobjc ${GL_LIBS}"
-else
- GLUT_CFLAGS=${GLU_CFLAGS}
- GLUT_LIBS=${GLU_LIBS}
-
- #
- # If X is present, assume GLUT depends on it.
- #
- if test "X${no_x}" != "Xyes"; then
- GLUT_LIBS="${X_PRE_LIBS} -lXmu -lXi ${X_EXTRA_LIBS} ${GLUT_LIBS}"
- fi
-
- AC_LANG_PUSH(C)
-
- ax_save_CPPFLAGS="${CPPFLAGS}"
- CPPFLAGS="${GLUT_CFLAGS} ${CPPFLAGS}"
-
- AC_CACHE_CHECK([for GLUT library], [ax_cv_check_glut_libglut],
- [ax_cv_check_glut_libglut="no"
- ax_save_LIBS="${LIBS}"
- LIBS=""
- ax_check_libs="-lglut32 -lglut"
- for ax_lib in ${ax_check_libs}; do
- if test X$ax_compiler_ms = Xyes; then
- ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`
- else
- ax_try_lib="${ax_lib}"
- fi
- LIBS="${ax_try_lib} ${GLUT_LIBS} ${ax_save_LIBS}"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[
-# if HAVE_WINDOWS_H && defined(_WIN32)
-# include <windows.h>
-# endif
-# include <GL/glut.h>]],
- [[glutMainLoop()]])],
- [ax_cv_check_glut_libglut="${ax_try_lib}"; break])
-
- done
- LIBS=${ax_save_LIBS}
- ])
- CPPFLAGS="${ax_save_CPPFLAGS}"
- AC_LANG_POP(C)
-
- if test "X${ax_cv_check_glut_libglut}" = "Xno"; then
- no_glut="yes"
- GLUT_CFLAGS=""
- GLUT_LIBS=""
- else
- GLUT_LIBS="${ax_cv_check_glut_libglut} ${GLUT_LIBS}"
- fi
-fi
-
-AC_SUBST([GLUT_CFLAGS])
-AC_SUBST([GLUT_LIBS])
-])dnl
-
-dnl ---------------------------------------------------------------------------
-dnl Available from the GNU Autoconf Macro Archive at:
-dnl http://www.gnu.org/software/ac-archive/acx_pthread.html
-dnl ---------------------------------------------------------------------------
-
-dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-dnl
-dnl This macro figures out how to build C programs using POSIX threads.
-dnl It sets the PTHREAD_LIBS output variable to the threads library and
-dnl linker flags, and the PTHREAD_CFLAGS output variable to any special
-dnl C compiler flags that are needed. (The user can also force certain
-dnl compiler flags/libs to be tested by setting these environment
-dnl variables.)
-dnl
-dnl Also sets PTHREAD_CC to any special C compiler that is needed for
-dnl multi-threaded programs (defaults to the value of CC otherwise).
-dnl (This is necessary on AIX to use the special cc_r compiler alias.)
-dnl
-dnl NOTE: You are assumed to not only compile your program with these
-dnl flags, but also link it with them as well. e.g. you should link
-dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
-dnl $LIBS
-dnl
-dnl If you are only building threads programs, you may wish to use
-dnl these variables in your default LIBS, CFLAGS, and CC:
-dnl
-dnl LIBS="$PTHREAD_LIBS $LIBS"
-dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-dnl CC="$PTHREAD_CC"
-dnl
-dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
-dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
-dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
-dnl
-dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
-dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to
-dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the
-dnl default action will define HAVE_PTHREAD.
-dnl
-dnl Please let the authors know if this macro fails on any platform, or
-dnl if you have any other suggestions or comments. This macro was based
-dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with
-dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros
-dnl posted by Alejandro Forero Cuervo to the autoconf macro repository.
-dnl We are also grateful for the helpful feedback of numerous users.
-dnl
-dnl @category InstalledPackages
-dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
-dnl @version 2005-01-14
-dnl @license GPLWithACException
-
-AC_DEFUN([ACX_PTHREAD], [
-AC_REQUIRE([AC_CANONICAL_HOST])
-AC_LANG_SAVE
-AC_LANG_C
-acx_pthread_ok=no
-
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
- AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
- AC_MSG_RESULT($acx_pthread_ok)
- if test x"$acx_pthread_ok" = xno; then
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
- fi
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try. Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
-
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
-
-# The ordering *is* (sometimes) important. Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-# other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-# doesn't hurt to check since this sometimes defines pthreads too;
-# also defines -D_REENTRANT)
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
-
-case "${host_cpu}-${host_os}" in
- *solaris*)
-
- # On Solaris (at least, for some versions), libc contains stubbed
- # (non-functional) versions of the pthreads routines, so link-based
- # tests will erroneously succeed. (We need to link with -pthread or
- # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
- # a function called by this macro, so we could check for that, but
- # who knows whether they'll stub that too in a future libc.) So,
- # we'll just look for -pthreads and -lpthread first:
-
- acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
- ;;
-esac
-
-if test x"$acx_pthread_ok" = xno; then
-for flag in $acx_pthread_flags; do
-
- case $flag in
- none)
- AC_MSG_CHECKING([whether pthreads work without any flags])
- ;;
-
- -*)
- AC_MSG_CHECKING([whether pthreads work with $flag])
- PTHREAD_CFLAGS="$flag"
- ;;
-
- pthread-config)
- AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
- if test x"$acx_pthread_config" = xno; then continue; fi
- PTHREAD_CFLAGS="`pthread-config --cflags`"
- PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
- ;;
-
- *)
- AC_MSG_CHECKING([for the pthreads library -l$flag])
- PTHREAD_LIBS="-l$flag"
- ;;
- esac
-
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
- # Check for various functions. We must include pthread.h,
- # since some functions may be macros. (On the Sequent, we
- # need a special flag -Kthread to make this header compile.)
- # We check for pthread_join because it is in -lpthread on IRIX
- # while pthread_create is in libc. We check for pthread_attr_init
- # due to DEC craziness with -lpthreads. We check for
- # pthread_cleanup_push because it is one of the few pthread
- # functions on Solaris that doesn't have a non-functional libc stub.
- # We try pthread_create on general principles.
- AC_TRY_LINK([#include <pthread.h>],
- [pthread_t th; pthread_join(th, 0);
- pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
- [acx_pthread_ok=yes])
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
- AC_MSG_RESULT($acx_pthread_ok)
- if test "x$acx_pthread_ok" = xyes; then
- break;
- fi
-
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
-done
-fi
-
-# Various other checks:
-if test "x$acx_pthread_ok" = xyes; then
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
- # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- AC_MSG_CHECKING([for joinable pthread attribute])
- attr_name=unknown
- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- AC_TRY_LINK([#include <pthread.h>], [int attr=$attr;],
- [attr_name=$attr; break])
- done
- AC_MSG_RESULT($attr_name)
- if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
- AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
- [Define to necessary symbol if this constant
- uses a non-standard name on your system.])
- fi
-
- AC_MSG_CHECKING([if more special flags are required for pthreads])
- flag=no
- case "${host_cpu}-${host_os}" in
- *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
- *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
- esac
- AC_MSG_RESULT(${flag})
- if test "x$flag" != xno; then
- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
- fi
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
- # More AIX lossage: must compile with cc_r
- AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
-else
- PTHREAD_CC="$CC"
-fi
-
-AC_SUBST(PTHREAD_LIBS)
-AC_SUBST(PTHREAD_CFLAGS)
-AC_SUBST(PTHREAD_CC)
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
- ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
- :
-else
- acx_pthread_ok=no
- $2
-fi
-AC_LANG_RESTORE
-])dnl ACX_PTHREAD
diff --git a/src/3rdparty/libtiff/m4/libtool.m4 b/src/3rdparty/libtiff/m4/libtool.m4
deleted file mode 100644
index 0fdd554ab4..0000000000
--- a/src/3rdparty/libtiff/m4/libtool.m4
+++ /dev/null
@@ -1,6883 +0,0 @@
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006 Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-m4_define([_LT_COPYING], [dnl
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006 Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program 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.
-])
-
-# serial 51 LT_INIT
-
-
-# LT_PREREQ(VERSION)
-# ------------------
-# Complain and exit if this libtool version is less that VERSION.
-m4_defun([LT_PREREQ],
-[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
- [m4_default([$3],
- [m4_fatal([Libtool version $1 or higher is required],
- 63)])],
- [$2])])
-
-
-# LT_INIT([OPTIONS])
-# ------------------
-AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
-AC_BEFORE([$0], [LT_LANG])dnl
-AC_BEFORE([$0], [LT_OUTPUT])dnl
-
-dnl Autoconf doesn't catch unexpanded LT_ macros by default:
-m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
-m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
-dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
-dnl unless we require an AC_DEFUNed macro:
-AC_REQUIRE([LTOPTIONS_VERSION])dnl
-AC_REQUIRE([LTSUGAR_VERSION])dnl
-AC_REQUIRE([LTVERSION_VERSION])dnl
-m4_require([_LT_PROG_LTMAIN])dnl
-m4_require([_LT_SET_OPTIONS], [_LT_SET_OPTIONS([$1])])dnl
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-_LT_SETUP
-
-# Only expand once:
-m4_define([LT_INIT])
-])# _LT_INIT
-
-# Old names:
-AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
-AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
-dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
-m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
- case $cc_temp in
- compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
- distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-])
-
-
-# _LT_FILEUTILS_DEFAULTS
-# ----------------------
-# It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
-m4_defun([_LT_FILEUTILS_DEFAULTS],
-[: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-])# _LT_FILEUTILS_DEFAULTS
-
-
-# _LT_SETUP
-# ---------
-m4_defun([_LT_SETUP],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-_LT_DECL([], [host_alias], [0], [The host system])dnl
-_LT_DECL([], [host], [0])dnl
-_LT_DECL([], [host_os], [0])dnl
-dnl
-_LT_DECL([], [build_alias], [0], [The build system])dnl
-_LT_DECL([], [build], [0])dnl
-_LT_DECL([], [build_os], [0])dnl
-dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-test -z "$LN_S" && LN_S="ln -s"
-_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
-dnl
-AC_REQUIRE([LT_CMD_MAX_LEN])dnl
-AC_REQUIRE([AC_OBJEXT])dnl
-_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
-_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
-dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_CHECK_XSI_SHELL])dnl
-m4_require([_LT_CMD_RELOAD])dnl
-m4_require([_LT_CHECK_MAGIC_METHOD])dnl
-m4_require([_LT_CMD_OLD_ARCHIVE])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-
-_LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-])
-if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-_LT_CHECK_OBJDIR
-
-m4_require([_LT_TAG_COMPILER])dnl
-_LT_PROG_ECHO_BACKSLASH
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
-sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- _LT_PATH_MAGIC
- fi
- ;;
-esac
-
-# Use C for the default configuration in the libtool script
-LT_SUPPORTED_TAG([CC])
-_LT_LANG_C_CONFIG
-_LT_LANG_DEFAULT_CONFIG
-_LT_CONFIG_COMMANDS
-])# _LT_SETUP
-
-
-# _LT_PROG_LTMAIN
-# ---------------
-# Note that this code is called both from `configure', and `config.status'
-# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
-# so we pass a copy along to make sure it has a sensible value anyway.
-m4_defun([_LT_PROG_LTMAIN],
-[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
-_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
-])# _LT_PROG_LTMAIN
-
-
-## ------------------------------------- ##
-## Accumulate code for creating libtool. ##
-## ------------------------------------- ##
-
-# So that we can recreate a full libtool script including additional
-# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
-# label.
-
-
-# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
-# ----------------------------------------
-# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL_INIT],
-[m4_ifval([$1],
- [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
- [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_INIT])
-
-
-# _LT_CONFIG_LIBTOOL([COMMANDS])
-# ------------------------------
-# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL],
-[m4_ifval([$1],
- [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
- [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
-
-
-# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
-# -----------------------------------------------------
-m4_defun([_LT_CONFIG_SAVE_COMMANDS],
-[_LT_CONFIG_LIBTOOL([$1])
-_LT_CONFIG_LIBTOOL_INIT([$2])
-])
-
-
-# _LT_FORMAT_COMMENT([COMMENT])
-# -----------------------------
-# Add leading comment marks to the start of each line, and a trailing
-# full-stop to the whole comment if one is not present already.
-m4_define([_LT_FORMAT_COMMENT],
-[m4_ifval([$1], [
-m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
- [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
-)])
-
-
-
-## ------------------------ ##
-## FIXME: Eliminate VARNAME ##
-## ------------------------ ##
-
-
-# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
-# -------------------------------------------------------------------
-# CONFIGNAME is the name given to the value in the libtool script.
-# VARNAME is the (base) name used in the configure script.
-# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
-# VARNAME. Any other value will be used directly.
-m4_define([_LT_DECL],
-[lt_if_append_uniq([lt_decl_varnames], [$2], [[, ]],
- [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
- [m4_ifval([$1], [$1], [$2])])
- lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
- m4_ifval([$4],
- [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
- lt_dict_add_subkey([lt_decl_dict], [$2],
- [tagged?], [m4_ifval([$5], [yes], [no])])])
-])
-
-
-# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
-# --------------------------------------------------------
-m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
-
-
-# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_tag_varnames],
-[_lt_decl_filter([tagged?], [yes], $@)])
-
-
-# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
-# ---------------------------------------------------------
-m4_define([_lt_decl_filter],
-[m4_case([$#],
- [0], [m4_fatal([$0: too few arguments: $#])],
- [1], [m4_fatal([$0: too few arguments: $#: $1])],
- [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
- [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
- [lt_dict_filter([lt_decl_dict], $@)])[]dnl
-])
-
-
-# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
-# --------------------------------------------------
-m4_define([lt_decl_quote_varnames],
-[_lt_decl_filter([value], [1], $@)])
-
-
-# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_dquote_varnames],
-[_lt_decl_filter([value], [2], $@)])
-
-
-# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_varnames_tagged],
-[_$0(m4_quote(m4_default([$1], [[, ]])),
- m4_quote(m4_if([$2], [],
- m4_quote(lt_decl_tag_varnames),
- m4_quote(m4_shift($@)))),
- m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
-m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)])
-
-
-# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_all_varnames],
-[_$0(m4_quote(m4_default([$1], [[, ]])),
- m4_if([$2], [],
- m4_quote(lt_decl_varnames),
- m4_quote(m4_shift($@))))[]dnl
-])
-m4_define([_lt_decl_all_varnames],
-[lt_join($@, lt_decl_varnames_tagged([$1],
- lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
-])
-
-
-# _LT_CONFIG_STATUS_DECLARE([VARNAME])
-# ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'. VARNAME
-# must have a single quote delimited value for this to work.
-m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
-
-
-# _LT_CONFIG_STATUS_DECLARATIONS
-# ------------------------------
-# We delimit libtool config variables with single quotes, so when
-# we write them to config.status, we have to be sure to quote all
-# embedded single quotes properly. In configure, this macro expands
-# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
-#
-# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
-m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
- [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAGS
-# ----------------
-# Output comment and list of tags supported by the script
-m4_defun([_LT_LIBTOOL_TAGS],
-[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
-])
-
-
-# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
-# -----------------------------------
-# Extract the dictionary values for VARNAME (optionally with TAG) and
-# expand to a commented shell variable setting:
-#
-# # Some comment about what VAR is for.
-# visible_name=$lt_internal_name
-m4_define([_LT_LIBTOOL_DECLARE],
-[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
- [description])))[]dnl
-m4_pushdef([_libtool_name],
- m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
-m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
- [0], [_libtool_name=[$]$1],
- [1], [_libtool_name=$lt_[]$1],
- [2], [_libtool_name=$lt_[]$1],
- [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
-m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
-])
-
-
-# _LT_LIBTOOL_CONFIG_VARS
-# -----------------------
-# Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
-# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
-# section) are produced by _LT_LIBTOOL_TAG_VARS.
-m4_defun([_LT_LIBTOOL_CONFIG_VARS],
-[m4_foreach([_lt_var],
- m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
- [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAG_VARS(TAG)
-# -------------------------
-m4_define([_LT_LIBTOOL_TAG_VARS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
- [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
-
-
-# _LT_TAGVAR(VARNAME, [TAGNAME])
-# ------------------------------
-m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
-
-
-# _LT_CONFIG_COMMANDS
-# -------------------
-# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
-# variables for single and double quote escaping we saved from calls
-# to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'. Finally, any additional code accumulated
-# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
-m4_defun([_LT_CONFIG_COMMANDS],
-[AC_PROVIDE_IFELSE([LT_OUTPUT],
- dnl If the libtool generation code has been placed in $CONFIG_LT,
- dnl instead of duplicating it all over again into config.status,
- dnl then we will have config.status run $CONFIG_LT later, so it
- dnl needs to know what name is stored there:
- [AC_CONFIG_COMMANDS([libtool],
- [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
- dnl If the libtool generation code is destined for config.status,
- dnl expand the accumulated commands and init code now:
- [AC_CONFIG_COMMANDS([libtool],
- [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
-])#_LT_CONFIG_COMMANDS
-
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
-[
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-_LT_CONFIG_STATUS_DECLARATIONS
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# Quote evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_quote_varnames); do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[[\\\\\\\`\\"\\\$]]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Double-quote double-evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_dquote_varnames); do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[[\\\\\\\`\\"\\\$]]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\[$]0 --fallback-echo"')dnl "
- lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
- ;;
-esac
-
-_LT_OUTPUT_LIBTOOL_INIT
-])
-
-
-# LT_OUTPUT
-# ---------
-# This macro allows early generation of the libtool script (before
-# AC_OUTPUT is called), incase it is used in configure for compilation
-# tests.
-AC_DEFUN([LT_OUTPUT],
-[: ${CONFIG_LT=./config.lt}
-AC_MSG_NOTICE([creating $CONFIG_LT])
-cat >"$CONFIG_LT" <<_LTEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate a libtool stub with the current configuration.
-
-lt_cl_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AS_SHELL_SANITIZE
-_AS_PREPARE
-
-exec AS_MESSAGE_FD>&1
-exec AS_MESSAGE_LOG_FD>>config.log
-{
- echo
- AS_BOX([Running $as_me.])
-} >&AS_MESSAGE_LOG_FD
-
-lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
-for use in further configure time tests before the real libtool is
-generated.
-
-Usage: $[0] [[OPTIONS]]
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
-
-Report bugs to <bug-libtool@gnu.org>."
-
-lt_cl_version="\
-m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
-m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
-configured by $[0], generated by m4_PACKAGE_STRING.
-
-Copyright (C) 2006 Free Software Foundation, Inc.
-This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
-
-while test $[#] != 0
-do
- case $[1] in
- --version | --v* | -V )
- echo "$lt_cl_version"; exit 0 ;;
- --help | --h* | -h )
- echo "$lt_cl_help"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --quiet | --q* | --silent | --s* | -q )
- lt_cl_silent=: ;;
-
- -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try `$[0] --help' for more information.]) ;;
-
- *) AC_MSG_ERROR([unrecognised argument: $[1]
-Try `$[0] --help for more information.]) ;;
- esac
- shift
-done
-
-if $lt_cl_silent; then
- exec AS_MESSAGE_FD>/dev/null
-fi
-_LTEOF
-
-cat >>"$CONFIG_LT" <<_LTEOF
-_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AC_MSG_NOTICE([creating $ofile])
-_LT_OUTPUT_LIBTOOL_COMMANDS
-AS_EXIT(0)
-_LTEOF
-chmod +x "$CONFIG_LT"
-
-# configure is writing to config.log, but config.lt does its own redirection,
-# appending to config.log, which fails on DOS, as config.log is still kept
-# open by configure. Here we exec the FD to /dev/null, effectively closing
-# config.log, so it can be properly (re)opened and appended to by config.lt.
-if test "$no_create" != yes; then
- lt_cl_success=:
- test "$silent" = yes &&
- lt_config_lt_args="$lt_config_lt_args --quiet"
- exec AS_MESSAGE_LOG_FD>/dev/null
- $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
- exec AS_MESSAGE_LOG_FD>>config.log
- $lt_cl_success || AS_EXIT(1)
-fi
-])# LT_OUTPUT
-
-
-# _LT_CONFIG(TAG)
-# ---------------
-# If TAG is the built-in tag, create an initial libtool script with a
-# default configuration from the untagged config vars. Otherwise add code
-# to config.status for appending the configuration named by TAG from the
-# matching tagged config vars.
-m4_defun([_LT_CONFIG],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_CONFIG_SAVE_COMMANDS([
- m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
- m4_if(_LT_TAG, [C], [
- # See if we are running on zsh, and set the options which allow our
- # commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
-
- cfgfile="${ofile}T"
- trap "$RM \"$cfgfile\"; exit 1" 1 2 15
- $RM "$cfgfile"
-
- cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-_LT_COPYING
-# TEST SUITE MARKER ## BEGIN SOURCABLE
-_LT_LIBTOOL_TAGS
-
-# ### BEGIN LIBTOOL CONFIG
-_LT_LIBTOOL_CONFIG_VARS
-_LT_LIBTOOL_TAG_VARS
-# ### END LIBTOOL CONFIG
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-_LT_EOF
-
- case $host_os in
- aix3*)
- cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-_LT_EOF
- ;;
- esac
-
- _LT_PROG_LTMAIN
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- _LT_PROG_XSI_SHELLFNS
-
- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- mv -f "$cfgfile" "$ofile" ||
- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
- chmod +x "$ofile"
-],
-[cat <<_LT_EOF >> "$ofile"
-
-dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
-dnl in a comment (ie after a #).
-# ### BEGIN LIBTOOL TAG CONFIG: $1
-_LT_LIBTOOL_TAG_VARS(_LT_TAG)
-# ### END LIBTOOL TAG CONFIG: $1
-_LT_EOF
-])dnl /m4_if
-],
-[m4_if([$1], [], [
- PACKAGE='$PACKAGE'
- VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
- RM='$RM'
- ofile='$ofile'], [])
-])dnl /_LT_CONFIG_SAVE_COMMANDS
-])# _LT_CONFIG
-
-
-# LT_SUPPORTED_TAG(TAG)
-# ---------------------
-# Trace this macro to discover what tags are supported by the libtool
-# --tag option, using:
-# autoconf --trace 'LT_SUPPORTED_TAG:$1'
-AC_DEFUN([LT_SUPPORTED_TAG], [])
-
-
-# C support is built-in for now
-m4_define([_LT_LANG_C_enabled], [])
-m4_define([_LT_TAGS], [])
-
-
-# LT_LANG(LANG)
-# -------------
-# Enable libtool support for the given language if not already enabled.
-AC_DEFUN([LT_LANG],
-[AC_BEFORE([$0], [LT_OUTPUT])dnl
-m4_case([$1],
- [C], [_LT_LANG(C)],
- [C++], [_LT_LANG(CXX)],
- [Java], [_LT_LANG(GCJ)],
- [Fortran 77], [_LT_LANG(F77)],
- [Fortran], [_LT_LANG(FC)],
- [Windows Resource], [_LT_LANG(RC)],
- [m4_ifdef([_LT_LANG_]$1[_CONFIG],
- [_LT_LANG($1)],
- [m4_fatal([$0: unsupported language: "$1"])])])dnl
-])# LT_LANG
-
-
-# _LT_LANG(LANGNAME)
-# ------------------
-m4_defun([_LT_LANG],
-[m4_ifdef([_LT_LANG_]$1[_enabled], [],
- [LT_SUPPORTED_TAG([$1])dnl
- m4_append([_LT_TAGS], [$1 ])dnl
- m4_define([_LT_LANG_]$1[_enabled], [])dnl
- _LT_LANG_$1_CONFIG($1)])dnl
-])# _LT_LANG
-
-
-# _LT_LANG_DEFAULT_CONFIG
-# -----------------------
-m4_defun([_LT_LANG_DEFAULT_CONFIG],
-[AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [LT_LANG(CXX)],
- [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_F77],
- [LT_LANG(F77)],
- [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_FC],
- [LT_LANG(FC)],
- [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
-
-dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
-dnl pulling things in needlessly.
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [LT_LANG(GCJ)],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [LT_LANG(GCJ)],
- [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
- [LT_LANG(GCJ)],
- [m4_ifdef([AC_PROG_GCJ],
- [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
- m4_ifdef([A][M_PROG_GCJ],
- [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
- m4_ifdef([LT_PROG_GCJ],
- [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
-
-AC_PROVIDE_IFELSE([LT_PROG_RC],
- [LT_LANG(RC)],
- [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
-])# _LT_LANG_DEFAULT_CONFIG
-
-# Obsolete macros:
-AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
-AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
-AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
-AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
-dnl AC_DEFUN([AC_LIBTOOL_F77], [])
-dnl AC_DEFUN([AC_LIBTOOL_FC], [])
-dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
-
-
-# _LT_TAG_COMPILER
-# ----------------
-m4_defun([_LT_TAG_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
-_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
-_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
-_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_TAG_COMPILER
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-m4_defun([_LT_COMPILER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-m4_defun([_LT_LINKER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM conftest*
-])# _LT_LINKER_BOILERPLATE
-
-
-# _LT_SYS_MODULE_PATH_AIX
-# -----------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-m4_defun([_LT_SYS_MODULE_PATH_AIX],
-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_SYS_MODULE_PATH_AIX
-
-
-# _LT_SHELL_INIT(ARG)
-# -------------------
-m4_define([_LT_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
- [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
- [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_SHELL_INIT
-
-
-# _LT_PROG_ECHO_BACKSLASH
-# -----------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-m4_defun([_LT_PROG_ECHO_BACKSLASH],
-[_LT_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
- # Remove one level of quotation (which was required for Make).
- ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
- ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X[$]1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
- # Yippee, $ECHO works!
- :
-else
- # Restart under the correct shell.
- exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<_LT_EOF
-[$]*
-_LT_EOF
- exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
- if test "X${echo_test_string+set}" != Xset; then
- # find a string as large as possible, as long as the shell can cope with it
- for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
- { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
- then
- break
- fi
- done
- fi
-
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- :
- else
- # The Solaris, AIX, and Digital Unix default echo programs unquote
- # backslashes. This makes it impossible to quote backslashes using
- # echo "$something" | sed 's/\\/\\\\/g'
- #
- # So, first we look for a working echo in the user's PATH.
-
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for dir in $PATH /usr/ucb; do
- IFS="$lt_save_ifs"
- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$dir/echo"
- break
- fi
- done
- IFS="$lt_save_ifs"
-
- if test "X$ECHO" = Xecho; then
- # We didn't find a better echo, so look for alternatives.
- if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # This shell has a builtin print -r that does the trick.
- ECHO='print -r'
- elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
- test "X$CONFIG_SHELL" != X/bin/ksh; then
- # If we have ksh, try running configure again with it.
- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
- export ORIGINAL_CONFIG_SHELL
- CONFIG_SHELL=/bin/ksh
- export CONFIG_SHELL
- exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
- else
- # Try using printf.
- ECHO='printf %s\n'
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # Cool, printf works
- :
- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
- export CONFIG_SHELL
- SHELL="$CONFIG_SHELL"
- export SHELL
- ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
- elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
- else
- # maybe with a smaller string...
- prev=:
-
- for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
- if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
- then
- break
- fi
- prev="$cmd"
- done
-
- if test "$prev" != 'sed 50q "[$]0"'; then
- echo_test_string=`eval $prev`
- export echo_test_string
- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
- else
- # Oops. We lost completely, so just stick with echo.
- ECHO=echo
- fi
- fi
- fi
- fi
- fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
- lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
-
-AC_SUBST(lt_ECHO)
-])
-_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
-_LT_DECL([], [ECHO], [1],
- [An echo program that does not interpret backslashes])
-])# _LT_PROG_ECHO_BACKSLASH
-
-
-# _LT_ENABLE_LOCK
-# ---------------
-m4_defun([_LT_ENABLE_LOCK],
-[AC_REQUIRE([AC_OBJEXT])dnl
-AC_ARG_ENABLE([libtool-lock],
- [AS_HELP_STRING([--disable-libtool-lock],
- [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*|s390*-*tpf*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_PUSH(C)
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_POP])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-sparc*-*solaris*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *64-bit*)
- case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *) LD="${LD-ld} -64" ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-esac
-
-need_locks="$enable_libtool_lock"
-])# _LT_ENABLE_LOCK
-
-
-# _LT_CMD_OLD_ARCHIVE
-# -------------------
-m4_defun([_LT_CMD_OLD_ARCHIVE],
-[AC_CHECK_TOOL(AR, ar, false)
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1])
-
-AC_CHECK_TOOL(STRIP, strip, :)
-test -z "$STRIP" && STRIP=:
-_LT_DECL([], [STRIP], [1], [A symbol stripping program])
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-test -z "$RANLIB" && RANLIB=:
-_LT_DECL([], [RANLIB], [1],
- [Commands used to install an old-style archive])
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-_LT_DECL([], [old_postinstall_cmds], [2])
-_LT_DECL([], [old_postuninstall_cmds], [2])
-_LT_TAGDECL([], [old_archive_cmds], [2],
- [Commands used to build an old-style archive])
-])# _LT_CMD_OLD_ARCHIVE
-
-
-# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([_LT_COMPILER_OPTION],
-[AC_REQUIRE([AC_OBJEXT])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$3"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- fi
- $RM conftest*
-])
-
-if test x"[$]$2" = xyes; then
- m4_if([$5], , :, [$5])
-else
- m4_if([$6], , :, [$6])
-fi
-])# _LT_COMPILER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
-
-
-# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------
-# Check whether the given linker option works
-AC_DEFUN([_LT_LINKER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $3"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&AS_MESSAGE_LOG_FD
- $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- else
- $2=yes
- fi
- fi
- $RM conftest*
- LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
- m4_if([$4], , :, [$4])
-else
- m4_if([$5], , :, [$5])
-fi
-])# _LT_LINKER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
-
-
-# LT_CMD_MAX_LEN
-#---------------
-AC_DEFUN([LT_CMD_MAX_LEN],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
-
- cygwin* | mingw*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
-
- interix*)
- # We know the value 262144 and hardcode it with a safety zone (like BSD)
- lt_cv_sys_max_cmd_len=196608
- ;;
-
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- sco3.2v5*)
- lt_cv_sys_max_cmd_len=102400
- ;;
- sysv5* | sco5v6* | sysv4.2uw2*)
- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
- if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
- else
- lt_cv_sys_max_cmd_len=32768
- fi
- ;;
- *)
- # Make teststring a little bigger before we do anything with it.
- # a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
- teststring=$teststring$teststring
- done
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
- = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- # Only check the string length outside the loop.
- lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
- teststring=
- # Add a significant safety factor because C++ compilers can tack on massive
- # amounts of additional arguments before passing them to the linker.
- # It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- ;;
- esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
- AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
- AC_MSG_RESULT(none)
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-_LT_DECL([], [max_cmd_len], [0],
- [What is the maximum length of a command?])
-])# LT_CMD_MAX_LEN
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
-
-
-# _LT_HEADER_DLFCN
-# ----------------
-m4_defun([_LT_HEADER_DLFCN],
-[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
-])# _LT_HEADER_DLFCN
-
-
-# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ----------------------------------------------------------------
-m4_defun([_LT_TRY_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
- [$4]
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- exit (status);
-}]
-_LT_EOF
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) $1 ;;
- x$lt_dlneed_uscore) $2 ;;
- x$lt_dlunknown|x*) $3 ;;
- esac
- else :
- # compilation failed
- $3
- fi
-fi
-rm -fr conftest*
-])# _LT_TRY_DLOPEN_SELF
-
-
-# LT_SYS_DLOPEN_SELF
-# ------------------
-AC_DEFUN([LT_SYS_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-else
- lt_cv_dlopen=no
- lt_cv_dlopen_libs=
-
- case $host_os in
- beos*)
- lt_cv_dlopen="load_add_on"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
- mingw* | pw32*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- cygwin*)
- lt_cv_dlopen="dlopen"
- lt_cv_dlopen_libs=
- ;;
-
- darwin*)
- # if libdl is installed we need to link against it
- AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ])
- ;;
-
- *)
- AC_CHECK_FUNC([shl_load],
- [lt_cv_dlopen="shl_load"],
- [AC_CHECK_LIB([dld], [shl_load],
- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
- [AC_CHECK_FUNC([dlopen],
- [lt_cv_dlopen="dlopen"],
- [AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
- [AC_CHECK_LIB([svld], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
- [AC_CHECK_LIB([dld], [dld_link],
- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
- ])
- ])
- ])
- ])
- ])
- ;;
- esac
-
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
- enable_dlopen=no
- fi
-
- case $lt_cv_dlopen in
- dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS="$LDFLAGS"
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- AC_CACHE_CHECK([whether a program can dlopen itself],
- lt_cv_dlopen_self, [dnl
- _LT_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
- lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
- ])
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
- lt_cv_dlopen_self_static, [dnl
- _LT_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
- lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
- ])
- fi
-
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
- ;;
- esac
-
- case $lt_cv_dlopen_self in
- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
- *) enable_dlopen_self=unknown ;;
- esac
-
- case $lt_cv_dlopen_self_static in
- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
- *) enable_dlopen_self_static=unknown ;;
- esac
-fi
-_LT_DECL([dlopen_support], [enable_dlopen], [0],
- [Whether dlopen is supported])
-_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
- [Whether dlopen of programs is supported])
-_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
- [Whether dlopen of statically linked programs is supported])
-])# LT_SYS_DLOPEN_SELF
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
-
-
-# _LT_COMPILER_C_O([TAGNAME])
-# ---------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler.
-# This macro does not hard code the compiler like AC_PROG_CC_C_O.
-m4_defun([_LT_COMPILER_C_O],
-[AC_REQUIRE([AC_OBJEXT])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
- [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
- [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
- fi
- fi
- chmod u+w . 2>&AS_MESSAGE_LOG_FD
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-])
-_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
- [Does compiler simultaneously support -c and -o options?])
-])# _LT_COMPILER_C_O
-
-
-# _LT_COMPILER_FILE_LOCKS([TAGNAME])
-# ----------------------------------
-# Check to see if we can do hard links to lock some files if needed
-m4_defun([_LT_COMPILER_FILE_LOCKS],
-[m4_require([_LT_ENABLE_LOCK])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_COMPILER_C_O([$1])
-
-hard_links="nottested"
-if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- AC_MSG_CHECKING([if we can lock with hard links])
- hard_links=yes
- $RM conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- AC_MSG_RESULT([$hard_links])
- if test "$hard_links" = no; then
- AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
-])# _LT_COMPILER_FILE_LOCKS
-
-
-# _LT_CHECK_OBJDIR
-# ----------------
-m4_defun([_LT_CHECK_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- lt_cv_objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-_LT_DECL([], [objdir], [0],
- [The name of the directory that contains temporary libtool files])dnl
-m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
- [Define to the sub-directory in which libtool stores uninstalled libraries.])
-])# _LT_CHECK_OBJDIR
-
-
-# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
-# --------------------------------------
-# Check hardcoding attributes.
-m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
- test -n "$_LT_TAGVAR(runpath_var, $1)" ||
- test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
-
- # We can hardcode non-existent directories.
- if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
- test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
- # Linking always hardcodes the temporary library directory.
- _LT_TAGVAR(hardcode_action, $1)=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- _LT_TAGVAR(hardcode_action, $1)=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- _LT_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
- test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-_LT_TAGDECL([], [hardcode_action], [0],
- [How to hardcode a shared library path into an executable])
-])# _LT_LINKER_HARDCODE_LIBPATH
-
-
-# _LT_CMD_STRIPLIB
-# ----------------
-m4_defun([_LT_CMD_STRIPLIB],
-[m4_require([_LT_DECL_EGREP])
-striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- AC_MSG_RESULT([yes])
-else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP" ; then
- striplib="$STRIP -x"
- old_striplib="$STRIP -S"
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
- ;;
- *)
- AC_MSG_RESULT([no])
- ;;
- esac
-fi
-_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
-_LT_DECL([], [striplib], [1])
-])# _LT_CMD_STRIPLIB
-
-
-# _LT_SYS_DYNAMIC_LINKER([TAG])
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-m4_defun([_LT_SYS_DYNAMIC_LINKER],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_MSG_CHECKING([dynamic linker characteristics])
-m4_case([$1],
- [C], [withGCC=$GCC],
- [CXX], [withGCC=$GXX],
- [F77], [withGCC=$G77],
- [FC], [withGCC=$ac_cv_fc_compiler_gnu],
- [withGCC=$GCC])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$withGCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$sys_lib_search_path_spec" | $GREP ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix4* | aix5*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[[01]] | aix4.[[01]].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- if test "$host_cpu" = m68k; then
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- else
- dynamic_linker=no
- fi
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[[45]]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $withGCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$withGCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | $GREP "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-kfreebsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[[123]]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[[01]]* | freebsdelf3.[[01]]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
- freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- freebsd*) # from 4.6 on
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-interix3*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-knetbsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-*nto* | *qnx*)
- version_type=qnx
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='ldqnx.so'
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[[89]] | openbsd2.[[89]].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-tpf*)
- # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-_LT_DECL([], [variables_saved_for_relink], [1],
- [Variables whose values should be saved in libtool wrapper scripts and
- restored at link time])
-_LT_DECL([], [need_lib_prefix], [0],
- [Do we need the "lib" prefix for modules?])
-_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
-_LT_DECL([], [version_type], [0], [Library versioning type])
-_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
-_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
-_LT_DECL([], [shlibpath_overrides_runpath], [0],
- [Is shlibpath searched before the hard-coded library search path?])
-_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
-_LT_DECL([], [library_names_spec], [1],
- [[List of archive names. First name is the real one, the rest are links.
- The last name is the one that the linker finds with -lNAME]])
-_LT_DECL([], [soname_spec], [1],
- [[The coded name of the library, if different from the real name]])
-_LT_DECL([], [postinstall_cmds], [2],
- [Command to use after installation of a shared archive])
-_LT_DECL([], [postuninstall_cmds], [2],
- [Command to use after uninstallation of a shared archive])
-_LT_DECL([], [finish_cmds], [2],
- [Commands used to finish a libtool library installation in a directory])
-_LT_DECL([], [finish_eval], [1],
- [[As "finish_cmds", except a single script fragment to be evaled but
- not shown]])
-_LT_DECL([], [hardcode_into_libs], [0],
- [Whether we should hardcode library paths into libraries])
-_LT_DECL([], [sys_lib_search_path_spec], [2],
- [Compile-time system search path for libraries])
-_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
- [Run-time system search path for libraries])
-])# _LT_SYS_DYNAMIC_LINKER
-
-
-# _LT_PATH_TOOL_PREFIX(TOOL)
-# --------------------------
-# find a file program which can recognise shared library
-AC_DEFUN([_LT_PATH_TOOL_PREFIX],
-[m4_require([_LT_DECL_EGREP])dnl
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] | ?:[\\/]*])
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="m4_if([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- AC_MSG_RESULT($MAGIC_CMD)
-else
- AC_MSG_RESULT(no)
-fi
-_LT_DECL([], [MAGIC_CMD], [0],
- [Used to examine libraries when file_magic_cmd begins with "file"])dnl
-])# _LT_PATH_TOOL_PREFIX
-
-# Old name:
-AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
-
-
-# _LT_PATH_MAGIC
-# --------------
-# find a file program which can recognise a shared library
-m4_defun([_LT_PATH_MAGIC],
-[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
- else
- MAGIC_CMD=:
- fi
-fi
-])# _LT_PATH_MAGIC
-
-
-# LT_PATH_LD
-# ----------
-# find the pathname to the GNU or non-GNU linker
-AC_DEFUN([LT_PATH_LD],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-
-AC_ARG_WITH([gnu-ld],
- [AS_HELP_STRING([--with-gnu-ld],
- [assume the C compiler uses GNU ld @<:@default=no@:>@])],
- [test "$withval" = no || with_gnu_ld=yes],
- [with_gnu_ld=no])dnl
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by $CC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]]* | ?:[[\\/]]*)
- re_direlt='/[[^/]][[^/]]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
- while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-_LT_PATH_LD_GNU
-AC_SUBST([LD])
-
-_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
-])# LT_PATH_LD
-
-# Old names:
-AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
-AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_LD], [])
-dnl AC_DEFUN([AC_PROG_LD], [])
-
-
-# _LT_PATH_LD_GNU
-#- --------------
-m4_defun([_LT_PATH_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# _LT_PATH_LD_GNU
-
-
-# _LT_CMD_RELOAD
-# --------------
-# find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-m4_defun([_LT_CMD_RELOAD],
-[AC_CACHE_CHECK([for $LD option to reload object files],
- lt_cv_ld_reload_flag,
- [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
- darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
- else
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- fi
- ;;
-esac
-_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
-_LT_DECL([], [reload_cmds], [2])dnl
-])# _LT_CMD_RELOAD
-
-
-# _LT_CHECK_MAGIC_METHOD
-# ----------------------
-# how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-m4_defun([_LT_CHECK_MAGIC_METHOD],
-[m4_require([_LT_DECL_EGREP])
-AC_CACHE_CHECK([how to recognise dependent libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix4* | aix5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi[[45]]*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin*)
- # func_win32_libid is a shell function defined in ltmain.sh
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- ;;
-
- # Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump'.
-mingw* | pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-freebsd* | kfreebsd*-gnu | dragonfly*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
- case $host_cpu in
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- hppa*64*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
- ;;
- *)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- esac
- ;;
-
-interix3*)
- # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-netbsd* | knetbsd*-gnu)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
- fi
- ;;
-
-newos6*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-*nto* | *qnx*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
- fi
- ;;
-
-osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-rdos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.3*)
- case $host_vendor in
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- sequent)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
- ;;
- sni)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
- siemens)
- lt_cv_deplibs_check_method=pass_all
- ;;
- pc)
- lt_cv_deplibs_check_method=pass_all
- ;;
- esac
- ;;
-
-tpf*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-_LT_DECL([], [deplibs_check_method], [1],
- [Method to check whether dependent libraries are shared objects])
-_LT_DECL([], [file_magic_cmd], [1],
- [Command to use when deplibs_check_method == "file_magic"])
-])# _LT_CHECK_MAGIC_METHOD
-
-
-# LT_PATH_NM
-# ----------
-# find the pathname to a BSD- or MS-compatible name lister
-AC_DEFUN([LT_PATH_NM],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
- lt_nm_to_check="$lt_nm_to_check nm"
- fi
- for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
- done
- : ${lt_cv_path_NM=no}
-fi])
-if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
-else
- # Didn't find any BSD compatible name lister, look for dumpbin.
- AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
- AC_SUBST([DUMPBIN])
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
- fi
-fi
-test -z "$NM" && NM=nm
-AC_SUBST([NM])
-_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
-
-AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
- [lt_cv_nm_interface="BSD nm"
- echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$ac_compile" 2>conftest.err)
- cat conftest.err >&AS_MESSAGE_LOG_FD
- (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
- (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
- cat conftest.err >&AS_MESSAGE_LOG_FD
- (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
- cat conftest.out >&AS_MESSAGE_LOG_FD
- if $GREP 'External.*some_variable' conftest.out > /dev/null; then
- lt_cv_nm_interface="MS dumpbin"
- fi
- rm -f conftest*])
-])# LT_PATH_NM
-
-# Old names:
-AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
-AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_NM], [])
-dnl AC_DEFUN([AC_PROG_NM], [])
-
-
-# LT_LIB_M
-# --------
-# check for math library
-AC_DEFUN([LT_LIB_M],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
- # These system don't have libm, or don't need it
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, cos, LIBM="-lm")
- ;;
-esac
-AC_SUBST([LIBM])
-])# LT_LIB_M
-
-# Old name:
-AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_CHECK_LIBM], [])
-
-
-# _LT_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------
-m4_defun([_LT_COMPILER_NO_RTTI],
-[m4_require([_LT_TAG_COMPILER])dnl
-
-_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-
- _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
- lt_cv_prog_compiler_rtti_exceptions,
- [-fno-rtti -fno-exceptions], [],
- [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
- [Compiler flag to turn off builtin functions])
-])# _LT_COMPILER_NO_RTTI
-
-
-# _LT_CMD_GLOBAL_SYMBOLS
-# ----------------------
-m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[[BCDT]]'
- ;;
-cygwin* | mingw* | pw32*)
- symcode='[[ABCDGISTW]]'
- ;;
-hpux*)
- if test "$host_cpu" = ia64; then
- symcode='[[ABCDEGRST]]'
- fi
- ;;
-irix* | nonstopux*)
- symcode='[[BCDEGRST]]'
- ;;
-osf*)
- symcode='[[BCDEGQRST]]'
- ;;
-solaris*)
- symcode='[[BDRT]]'
- ;;
-sco3.2v5*)
- symcode='[[DT]]'
- ;;
-sysv4.2uw2*)
- symcode='[[DT]]'
- ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
- symcode='[[ABDT]]'
- ;;
-sysv4)
- symcode='[[DFNSTU]]'
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
- symcode='[[ABCDGIRSTW]]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
- opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
- symxfrm="\\1 $ac_symprfx\\2 \\2"
-
- # Write the raw and C identifiers.
- if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function
- # and D for any global variable.
- # Also find C++ and __fastcall symbols from MSVC++,
- # which start with @ or ?.
- lt_cv_sys_global_symbol_pipe="$AWK ['"\
-" {last_section=section; section=\$ 3};"\
-" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-" \$ 0!~/External *\|/{next};"\
-" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-" {if(hide[section]) next};"\
-" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-" s[1]~/^[@?]/{print s[1], s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-" ' prfx=^$ac_symprfx]"
- else
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
- fi
-
- # Check to see that the pipe works correctly.
- pipe_works=no
-
- rm -f conftest*
- cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
- if AC_TRY_EVAL(ac_compile); then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- else
- rm -f "$nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
- if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<_LT_EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
- # Now generate the symbol file.
- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
- cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- void *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[[]] =
-{
- { "@PROGRAM@", (void *) 0 },
-_LT_EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
- cat <<\_LT_EOF >> conftest.$ac_ext
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- lt_save_LIBS="$LIBS"
- lt_save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
- pipe_works=yes
- fi
- LIBS="$lt_save_LIBS"
- CFLAGS="$lt_save_CFLAGS"
- else
- echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
- break
- else
- lt_cv_sys_global_symbol_pipe=
- fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- AC_MSG_RESULT(failed)
-else
- AC_MSG_RESULT(ok)
-fi
-
-_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
- [Take the output of nm and produce a listing of raw symbols and C names])
-_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
- [Transform the output of nm in a proper C declaration])
-_LT_DECL([global_symbol_to_c_name_address],
- [lt_cv_sys_global_symbol_to_c_name_address], [1],
- [Transform the output of nm in a C name address pair])
-]) # _LT_CMD_GLOBAL_SYMBOLS
-
-
-# _LT_COMPILER_PIC([TAGNAME])
-# ---------------------------
-m4_defun([_LT_COMPILER_PIC],
-[m4_require([_LT_TAG_COMPILER])dnl
-_LT_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_TAGVAR(lt_prog_compiler_static, $1)=
-
-AC_MSG_CHECKING([for $compiler option to produce PIC])
-m4_if([$1], [CXX], [
- # C++ specific cases for pic, static, wl, etc.
- if test "$GXX" = yes; then
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
- amigaos*)
- if test "$host_cpu" = m68k; then
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
- fi
- ;;
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
- mingw* | os2* | pw32*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
- ;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- ;;
- *djgpp*)
- # DJGPP does not support shared libraries at all
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- interix3*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
- fi
- ;;
- hpux*)
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- else
- case $host_os in
- aix4* | aix5*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- else
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- chorus*)
- case $cc_basename in
- cxch68*)
- # Green Hills C++ Compiler
- # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
- ;;
- esac
- ;;
- darwin*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- case $cc_basename in
- xlc*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- ;;
- esac
- ;;
- dgux*)
- case $cc_basename in
- ec++*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- freebsd* | kfreebsd*-gnu | dragonfly*)
- # FreeBSD uses GNU C++
- ;;
- hpux9* | hpux10* | hpux11*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- if test "$host_cpu" != ia64; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- fi
- ;;
- aCC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- ;;
- esac
- ;;
- *)
- ;;
- esac
- ;;
- interix*)
- # This is c89, which is MS Visual C++ (no shared libs)
- # Anyone wants to do a port?
- ;;
- irix5* | irix6* | nonstopux*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- # CC pic flag -KPIC is the default.
- ;;
- *)
- ;;
- esac
- ;;
- linux*)
- case $cc_basename in
- KCC*)
- # KAI C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- icpc* | ecpc* )
- # Intel C++
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- pgCC*)
- # Portland Group C++ compiler
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- cxx*)
- # Compaq C++
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- lynxos*)
- ;;
- m88k*)
- ;;
- mvs*)
- case $cc_basename in
- cxx*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
- ;;
- *)
- ;;
- esac
- ;;
- netbsd*)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- ;;
- RCC*)
- # Rational C++ 2.4.1
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- cxx*)
- # Digital/Compaq C++
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- psos*)
- ;;
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- ;;
- *)
- ;;
- esac
- ;;
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- lcc*)
- # Lucid
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- esac
- ;;
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- ;;
- *)
- ;;
- esac
- ;;
- vxworks*)
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
- esac
- fi
-],
-[
- if test "$GCC" = yes; then
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- amigaos*)
- if test "$host_cpu" = m68k; then
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
- fi
- ;;
-
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
-
- mingw* | pw32* | os2*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- ;;
-
- hpux*)
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- ;;
-
- interix3*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
-
- msdosdjgpp*)
- # Just because we use GCC doesn't mean we suddenly get shared libraries
- # on systems that don't support them.
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- enable_shared=no
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
- fi
- ;;
-
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- else
- # PORTME Check for flag to pass linker flags through the system compiler.
- case $host_os in
- aix*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- else
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- darwin*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- case $cc_basename in
- xlc*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- ;;
- esac
- ;;
-
- mingw* | pw32* | os2*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
- ;;
-
- hpux9* | hpux10* | hpux11*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- ;;
- esac
- # Is there a better lt_prog_compiler_static that works with the bundled CC?
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- ;;
-
- irix5* | irix6* | nonstopux*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # PIC (with -KPIC) is the default.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- linux*)
- case $cc_basename in
- icc* | ecc*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- ccc*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # All Alpha code is PIC.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- esac
- ;;
-
- newsos6)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
-
- osf3* | osf4* | osf5*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # All OSF/1 code is PIC.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- rdos*)
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- solaris*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- case $cc_basename in
- f77* | f90* | f95*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
- *)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
- esac
- ;;
-
- sunos4*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- unicos*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
-
- uts4*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- *)
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
- esac
- fi
-])
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
- ;;
-esac
-AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
- [How to pass a linker flag through the compiler])
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
- [_LT_TAGVAR(lt_prog_compiler_pic_works, $1)],
- [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
- [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
- "" | " "*) ;;
- *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
- esac],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
- [Additional compiler flags for building library objects])
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
-_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
- _LT_TAGVAR(lt_prog_compiler_static_works, $1),
- $lt_tmp_static_flag,
- [],
- [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
-_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
- [Compiler flag to prevent dynamic linking])
-])# _LT_COMPILER_PIC
-
-
-# _LT_LINKER_SHLIBS([TAGNAME])
-# ----------------------------
-# See if the linker supports building shared libraries.
-m4_defun([_LT_LINKER_SHLIBS],
-[AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-m4_if([$1], [CXX], [
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- case $host_os in
- aix4* | aix5*)
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- ;;
- pw32*)
- _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
- ;;
- cygwin* | mingw*)
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- *)
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- esac
-], [
- runpath_var=
- _LT_TAGVAR(allow_undefined_flag, $1)=
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(archive_cmds, $1)=
- _LT_TAGVAR(archive_expsym_cmds, $1)=
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- _LT_TAGVAR(hardcode_automatic, $1)=no
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- _LT_TAGVAR(hardcode_minus_L, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_TAGVAR(inherit_rpath, $1)=no
- _LT_TAGVAR(link_all_deplibs, $1)=unknown
- _LT_TAGVAR(module_cmds, $1)=
- _LT_TAGVAR(module_expsym_cmds, $1)=
- _LT_TAGVAR(old_archive_from_new_cmds, $1)=
- _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
- _LT_TAGVAR(thread_safe_flag_spec, $1)=
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- # include_expsyms should be a list of space-separated symbols to be *always*
- # included in the symbol list
- _LT_TAGVAR(include_expsyms, $1)=
- # exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
- _LT_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
- # platforms (ab)use it in PIC code, but their linkers get confused if
- # the symbol is explicitly referenced. Since portable code cannot
- # rely on this symbol name, it's probably fine to never include it in
- # preloaded symbol tables.
- extract_expsyms_cmds=
-
- case $host_os in
- cygwin* | mingw* | pw32*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
- esac
-
- _LT_TAGVAR(ld_shlibs, $1)=yes
- if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- runpath_var=LD_RUN_PATH
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- supports_anon_versioning=no
- case `$LD -v 2>&1` in
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix3* | aix4* | aix5*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-_LT_EOF
- fi
- ;;
-
- amigaos*)
- if test "$host_cpu" = m68k; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- fi
-
- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
- # that the semantics of dynamic libraries on AmigaOS, at least up
- # to version 4, is to share data among multiple programs linked
- # with the same dynamic library. Since this doesn't match the
- # behavior of shared libraries on other platforms, we can't use
- # them.
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- cygwin* | mingw* | pw32*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
- # as there is no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- interix3*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
-
- linux*|tpf*)
- tmp_diet=no
- if test "$host_os" = linux-dietlibc; then
- case $cc_basename in
- diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
- esac
- fi
- if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test "$tmp_diet" = no
- then
- tmp_addflag=
- case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
- tmp_addflag=' -i_dynamic' ;;
- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
- tmp_addflag=' -i_dynamic -nofor_main' ;;
- ifc* | ifort*) # Intel Fortran compiler
- tmp_addflag=' -nofor_main' ;;
- esac
-
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
- if test "x$supports_anon_versioning" = xyes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~echo "local: *; };" >> $output_objdir/$libname.ver~$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- ;;
- *)
- # For security reasons, it is highly recommended that you always
- # use absolute paths for naming shared libraries, and exclude the
- # DT_RUNPATH tag from executables and libraries. But doing so
- # requires that you compile everything twice, which is a pain.
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- sunos4*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
-
- if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
- runpath_var=
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=yes
- _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- fi
- ;;
-
- aix4* | aix5*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_TAGVAR(archive_cmds, $1)=''
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
- if test "$GCC" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- _LT_TAGVAR(hardcode_direct, $1)=yes
- else
- # We have old collect2
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- _LT_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- if test "$host_cpu" = m68k; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- fi
- # see comment about different semantics on the GNU ld section
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- bsdi[[45]]*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
- ;;
-
- cygwin* | mingw* | pw32*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
- # FIXME: Should let the user specify the lib program.
- _LT_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
- _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- ;;
-
- darwin* | rhapsody*)
- case $host_os in
- rhapsody* | darwin1.[[012]])
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
- 10.[[012]])
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- ;;
- esac
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_automatic, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_TAGVAR(whole_archive_flag_spec, $1)=''
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- if test "$GCC" = yes ; then
- AC_CACHE_VAL([lt_cv_apple_cc_single_mod],
- [lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
- # By default we will add the -single_module flag. You can override
- # by either setting the environment variable LT_MULTI_MODULE
- # non-empty at configure time, or by adding -multi-module to the
- # link flags.
- echo "int foo(void){return 1;}" > conftest.c
- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
- -dynamiclib ${wl}-single_module conftest.c
- if test -f libconftest.dylib; then
- lt_cv_apple_cc_single_mod=yes
- rm libconftest.dylib
- fi
- rm conftest.$ac_ext
- fi])
- output_verbose_link_cmd=echo
- if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $single_module -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- _LT_TAGVAR(module_expsym_cmds, $1)='sed -e "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- case $cc_basename in
- xlc*)
- output_verbose_link_cmd=echo
- _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $verstring'
- _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- _LT_TAGVAR(module_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- ;;
- *)
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- fi
- ;;
-
- dgux*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- freebsd1*)
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu | dragonfly*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- hpux9*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_direct, $1)=yes
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
-
- hpux10*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
- fi
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- fi
- ;;
-
- hpux11*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- else
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- fi
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- *)
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- fi
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- # Try to use the -exported_symbol ld option, if it does not
- # work, assume that -exports_file does not work either and
- # implicitly export all symbols.
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
- AC_LINK_IFELSE(int foo(void) {},
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
- )
- LDFLAGS="$save_LDFLAGS"
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(inherit_rpath, $1)=yes
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- newsos6)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *nto* | *qnx*)
- ;;
-
- openbsd*)
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- else
- case $host_os in
- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- ;;
-
- os2*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- else
- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared${allow_undefined_flag} -input $lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-
- # Both c and cxx compiler support -rpath directly
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
-
- solaris*)
- _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- else
- case `$CC -V 2>&1` in
- *"Compilers 5.0"*)
- wlarc=''
- _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
- ;;
- *)
- wlarc='${wl}'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- ;;
- esac
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The compiler driver will combine linker options so we
- # cannot just pass the convenience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- case $wlarc in
- '')
- _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
- *)
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
- esac
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- sunos4*)
- if test "x$host_vendor" = xsequent; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv4)
- case $host_vendor in
- sni)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
- ;;
- siemens)
- ## LD is ld it makes a PLAMLIB
- ## CC just makes a GrossModule.
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
- _LT_TAGVAR(hardcode_direct, $1)=no
- ;;
- motorola)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- runpath_var='LD_RUN_PATH'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv4.3*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- _LT_TAGVAR(ld_shlibs, $1)=yes
- fi
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- uts4*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *)
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
-
- if test x$host_vendor = xsni; then
- case $host in
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
- ;;
- esac
- fi
- fi
-])
-AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
-
-_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
-_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
-_LT_DECL([], [extract_expsyms_cmds], [2],
- [The commands to extract the exported symbol list from a shared archive])
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
-x|xyes)
- # Assume -lc should be added
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $_LT_TAGVAR(archive_cmds, $1) in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- AC_MSG_CHECKING([whether -lc should be explicitly linked in])
- $RM conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
- pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
- _LT_TAGVAR(allow_undefined_flag, $1)=
- if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
- then
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- else
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- fi
- _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $RM conftest*
- AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
- ;;
- esac
- fi
- ;;
-esac
-
-_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
- [Whether or not to add -lc for building shared libraries])
-_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
- [enable_shared_with_static_runtimes], [0],
- [Whether or not to disallow shared libs when runtime libs are static])
-_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
- [Compiler flag to allow reflexive dlopens])
-_LT_TAGDECL([], [whole_archive_flag_spec], [1],
- [Compiler flag to generate shared objects directly from archives])
-_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
- [Create an old-style archive from a shared archive])
-_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
- [Create a temporary old-style archive to link instead of a shared archive])
-_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
-_LT_TAGDECL([], [archive_expsym_cmds], [2])
-_LT_TAGDECL([], [module_cmds], [2],
- [Commands used to build a loadable module if different from building
- a shared archive.])
-_LT_TAGDECL([], [module_expsym_cmds], [2])
-_LT_TAGDECL([], [with_gnu_ld], [1],
- [Whether we are building with GNU ld or not])
-_LT_TAGDECL([], [allow_undefined_flag], [1],
- [Flag that allows shared libraries with undefined symbols to be built])
-_LT_TAGDECL([], [no_undefined_flag], [1],
- [Flag that enforces no undefined symbols])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
- [Flag to hardcode $libdir into a binary during linking.
- This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
- [[If ld is used when linking, flag to hardcode $libdir into a binary
- during linking. This must work even if $libdir does not exist]])
-_LT_TAGDECL([], [hardcode_libdir_separator], [1],
- [Whether we need a single "-rpath" flag with a separated argument])
-_LT_TAGDECL([], [hardcode_direct], [0],
- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
- DIR into the resulting binary])
-_LT_TAGDECL([], [hardcode_minus_L], [0],
- [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
- into the resulting binary])
-_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
- [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
- into the resulting binary])
-_LT_TAGDECL([], [hardcode_automatic], [0],
- [Set to "yes" if building a shared library automatically hardcodes DIR
- into the library and all subsequent libraries and executables linked
- against it])
-_LT_TAGDECL([], [inherit_rpath], [0],
- [Set to yes if linker adds runtime paths of dependent libraries
- to runtime path list])
-_LT_TAGDECL([], [link_all_deplibs], [0],
- [Whether libtool must link a program against all its dependency libraries])
-_LT_TAGDECL([], [fix_srcfile_path], [1],
- [Fix the shell variable $srcfile for the compiler])
-_LT_TAGDECL([], [always_export_symbols], [0],
- [Set to "yes" if exported symbols are required])
-_LT_TAGDECL([], [export_symbols_cmds], [2],
- [The commands to list exported symbols])
-_LT_TAGDECL([], [exclude_expsyms], [1],
- [Symbols that should not be listed in the preloaded symbols])
-_LT_TAGDECL([], [include_expsyms], [1],
- [Symbols that must always be exported])
-_LT_TAGDECL([], [prelink_cmds], [2],
- [Commands necessary for linking programs (against libraries) with templates])
-_LT_TAGDECL([], [file_list_spec], [1],
- [Specify filename containing input files])
-dnl FIXME: Not yet implemented
-dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
-dnl [Compiler flag to generate thread safe objects])
-])# _LT_LINKER_SHLIBS
-
-
-# _LT_LANG_C_CONFIG([TAG])
-# ------------------------
-# Ensure that the configuration variables for a C compiler are suitably
-# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_C_CONFIG],
-[m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}\n'
-
-_LT_TAG_COMPILER
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
- _LT_COMPILER_NO_RTTI($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
- LT_SYS_DLOPEN_SELF
- _LT_CMD_STRIPLIB
-
- # Report which library types will actually be built
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
- aix4* | aix5*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_CONFIG($1)
-fi
-AC_LANG_POP
-CC="$lt_save_CC"
-])# _LT_LANG_C_CONFIG
-
-
-# _LT_PROG_CXX
-# ------------
-# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
-# compiler, we have our own version here.
-m4_defun([_LT_PROG_CXX],
-[
-pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
-AC_PROG_CXX
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
- AC_PROG_CXXCPP
-else
- _lt_caught_CXX_error=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_CXX
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_CXX], [])
-
-
-# _LT_LANG_CXX_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a C++ compiler are suitably
-# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_CXX_CONFIG],
-[AC_REQUIRE([_LT_PROG_CXX])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-
-AC_LANG_PUSH(C++)
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the CXX compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="int some_variable = 0;\n"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC=$CC
- lt_save_LD=$LD
- lt_save_GCC=$GCC
- GCC=$GXX
- lt_save_with_gnu_ld=$with_gnu_ld
- lt_save_path_LD=$lt_cv_path_LD
- if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
- else
- $as_unset lt_cv_prog_gnu_ld
- fi
- if test -n "${lt_cv_path_LDCXX+set}"; then
- lt_cv_path_LD=$lt_cv_path_LDCXX
- else
- $as_unset lt_cv_path_LD
- fi
- test -z "${LDCXX+set}" || LD=$LDCXX
- CC=${CXX-"c++"}
- compiler=$CC
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
-
- if test -n "$compiler"; then
- # We don't want -fno-exception when compiling C++ code, so set the
- # no_builtin_flag separately
- if test "$GXX" = yes; then
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
- else
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
- fi
-
- if test "$GXX" = yes; then
- # Set up default GNU C++ configuration
-
- LT_PATH_LD
-
- # Check if GNU C++ uses GNU ld as the underlying linker, since the
- # archiving commands below assume that GNU ld is being used.
- if test "$with_gnu_ld" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # If archive_cmds runs LD, not CC, wlarc should be empty
- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
- # investigate it a little bit more. (MM)
- wlarc='${wl}'
-
- # ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" |
- $GREP 'no-whole-archive' > /dev/null; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- else
- with_gnu_ld=no
- wlarc=
-
- # A generic and very simple default shared library creation
- # command for GNU C++ for the case where it uses the native
- # linker, instead of GNU ld. If possible, this setting should
- # overridden to take advantage of the native linker features on
- # the platform it is being used on.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- fi
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
- else
- GXX=no
- with_gnu_ld=no
- wlarc=
- fi
-
- # PORTME: fill in a description of your system's C++ link characteristics
- AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
- _LT_TAGVAR(ld_shlibs, $1)=yes
- case $host_os in
- aix3*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aix4* | aix5*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
- for ld_flag in $LDFLAGS; do
- case $ld_flag in
- *-brtl*)
- aix_use_runtimelinking=yes
- break
- ;;
- esac
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_TAGVAR(archive_cmds, $1)=''
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
- if test "$GXX" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- _LT_TAGVAR(hardcode_direct, $1)=yes
- else
- # We have old collect2
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to
- # export.
- _LT_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an empty
- # executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds its shared
- # libraries.
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- chorus*)
- case $cc_basename in
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- cygwin* | mingw* | pw32*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
- # as there is no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- darwin* | rhapsody*)
- case $host_os in
- rhapsody* | darwin1.[[012]])
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
- 10.[[012]])
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- ;;
- esac
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_automatic, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_TAGVAR(whole_archive_flag_spec, $1)=''
- _LT_TAGVAR(link_all_deplibs, $1)=yes
-
- if test "$GXX" = yes ; then
- AC_CACHE_VAL([lt_cv_apple_cc_single_mod],
- [lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
- # By default we will add the -single_module flag. You can override
- # by either setting the environment variable LT_MULTI_MODULE
- # non-empty at configure time, or by adding -multi-module to the
- # link flags.
- echo "int foo(void){return 1;}" > conftest.c
- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
- -dynamiclib ${wl}-single_module conftest.c
- if test -f libconftest.dylib; then
- lt_cv_apple_cc_single_mod=yes
- rm libconftest.dylib
- fi
- rm conftest.$ac_ext
- fi])
- output_verbose_link_cmd=echo
- if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- _LT_TAGVAR(module_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- case $cc_basename in
- xlc*)
- output_verbose_link_cmd=echo
- _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO "$rpath/$soname"` $verstring'
- _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag,
- # it doesn't exist in older darwin lds
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- _LT_TAGVAR(module_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- ;;
- *)
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- fi
- ;;
-
- dgux*)
- case $cc_basename in
- ec++*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- freebsd[[12]]*)
- # C++ shared libraries reported to be fairly broken before
- # switch to ELF
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- freebsd-elf*)
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- ;;
-
- freebsd* | kfreebsd*-gnu | dragonfly*)
- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
- # conventions
- _LT_TAGVAR(ld_shlibs, $1)=yes
- ;;
-
- gnu*)
- ;;
-
- hpux9*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- hpux10*|hpux11*)
- if test $with_gnu_ld = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- ;;
- *)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
- esac
- fi
- case $host_cpu in
- hppa*64*|ia64*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- *)
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
- ;;
- esac
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes; then
- if test $with_gnu_ld = no; then
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- fi
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- interix3*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
- irix5* | irix6*)
- case $cc_basename in
- CC*)
- # SGI C++
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-
- # Archives containing C++ object files must be created using
- # "CC -ar", where "CC" is the IRIX C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
- ;;
- *)
- if test "$GXX" = yes; then
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
- fi
- fi
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
- esac
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(inherit_rpath, $1)=yes
- ;;
-
- linux*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
- ;;
- icpc* | ecpc* )
- # Intel C++
- with_gnu_ld=yes
- # version 8.0 and above of icpc choke on multiply defined symbols
- # if we add $predep_objects and $postdep_objects, however 7.1 and
- # earlier do not add the objects themselves.
- case `$CC -V 2>&1` in
- *"Version 7."*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- *) # Version 8.0 or newer
- tmp_idyn=
- case $host_cpu in
- ia64*) tmp_idyn=' -i_dynamic';;
- esac
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- esac
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
- ;;
- pgCC*)
- # Portland Group C++ compiler
- case `$CC -V` in
- *pgCC\ [[1-5]]*)
- _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
- _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
- $RANLIB $oldlib'
- _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- *) # Version 6 will use weak symbols
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- ;;
- cxx*)
- # Compaq C++
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
- runpath_var=LD_RUN_PATH
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- esac
- ;;
-
- lynxos*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- m88k*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- mvs*)
- case $cc_basename in
- cxx*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
- wlarc=
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- fi
- # Workaround some broken pre-1.5 toolchains
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
- ;;
-
- *nto* | *qnx*)
- _LT_TAGVAR(ld_shlibs, $1)=yes
- ;;
-
- openbsd2*)
- # C++ shared libraries are fairly broken
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- openbsd*)
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- fi
- output_verbose_link_cmd=echo
- ;;
-
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Archives containing C++ object files must be created using
- # the KAI C++ compiler.
- case $host in
- osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
- *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
- esac
- ;;
- RCC*)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- cxx*)
- case $host in
- osf3*)
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- ;;
- *)
- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
- echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
- $RM $lib.exp'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- case $host in
- osf3*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- psos*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- lcc*)
- # Lucid
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
- _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The C++ compiler is used as linker so we must use $wl
- # flag to pass the commands to the underlying system
- # linker. We must also pass each convenience library through
- # to the system linker between allextract/defaultextract.
- # The C++ compiler will combine linker options so we
- # cannot just pass the convenience library names through
- # without $wl.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
- ;;
- esac
- _LT_TAGVAR(link_all_deplibs, $1)=yes
-
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
- # The C++ compiler must be used to create the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
- ;;
- *)
- # GNU C++ compiler with Solaris linker
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
- if $CC --version | $GREP -v '^2\.7' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
- else
- # g++ 2.7 appears to require `-G' NOT `-shared' on this
- # platform.
- _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
- fi
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
- fi
- ;;
- esac
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- vxworks*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
-
- AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
- test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
- _LT_TAGVAR(GCC, $1)="$GXX"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_SYS_HIDDEN_LIBDEPS($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- CC=$lt_save_CC
- LDCXX=$LD
- LD=$lt_save_LD
- GCC=$lt_save_GCC
- with_gnu_ld=$lt_save_with_gnu_ld
- lt_cv_path_LDCXX=$lt_cv_path_LD
- lt_cv_path_LD=$lt_save_path_LD
- lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
- lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
-
-AC_LANG_POP
-])# _LT_LANG_CXX_CONFIG
-
-
-# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
-# ---------------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-# Dependencies to place before and after the object being linked:
-_LT_TAGVAR(predep_objects, $1)=
-_LT_TAGVAR(postdep_objects, $1)=
-_LT_TAGVAR(predeps, $1)=
-_LT_TAGVAR(postdeps, $1)=
-_LT_TAGVAR(compiler_lib_search_path, $1)=
-
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library. It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
-int a;
-void foo (void) { a = 0; }
-_LT_EOF
-], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
-class Foo
-{
-public:
- Foo (void) { a = 0; }
-private:
- int a;
-};
-_LT_EOF
-], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
- subroutine foo
- implicit none
- integer*4 a
- a=0
- return
- end
-_LT_EOF
-], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
- subroutine foo
- implicit none
- integer a
- a=0
- return
- end
-_LT_EOF
-], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
-public class foo {
- private int a;
- public void bar (void) {
- a = 0;
- }
-};
-_LT_EOF
-])
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
- # Parse the compiler output and extract the necessary
- # objects, libraries and library flags.
-
- # Sentinel used to keep track of whether or not we are before
- # the conftest object file.
- pre_test_object_deps_done=no
-
- # The `*' in the case matches for architectures that use `case' in
- # $output_verbose_cmd can trigger glob expansion during the loop
- # eval without this substitution.
- output_verbose_link_cmd=`$ECHO "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
-
- for p in `eval $output_verbose_link_cmd`; do
- case $p in
-
- -L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
- # Remove the space.
- if test $p = "-L" ||
- test $p = "-R"; then
- prev=$p
- continue
- else
- prev=
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- case $p in
- -L* | -R*)
- # Internal compiler library paths should come after those
- # provided the user. The postdeps already come after the
- # user supplied libs so there is no need to process them.
- if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
- _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
- else
- _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
- fi
- ;;
- # The "-l" case would never come before the object being
- # linked, so don't bother handling this case.
- esac
- else
- if test -z "$_LT_TAGVAR(postdeps, $1)"; then
- _LT_TAGVAR(postdeps, $1)="${prev}${p}"
- else
- _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
- fi
- fi
- ;;
-
- *.$objext)
- # This assumes that the test object file only shows up
- # once in the compiler output.
- if test "$p" = "conftest.$objext"; then
- pre_test_object_deps_done=yes
- continue
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
- _LT_TAGVAR(predep_objects, $1)="$p"
- else
- _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
- fi
- else
- if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
- _LT_TAGVAR(postdep_objects, $1)="$p"
- else
- _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
- fi
- fi
- ;;
-
- *) ;; # Ignore the rest.
-
- esac
- done
-
- # Clean up.
- rm -f a.out a.exe
-else
- echo "libtool.m4: error: problem compiling $1 test program"
-fi
-
-$RM -f confest.$objext
-
-# PORTME: override above test on systems where it is broken
-m4_if([$1], [CXX],
-[case $host_os in
-interix3*)
- # Interix 3.5 installs completely hosed .la files for C++, so rather than
- # hack all around it, let's just trust "g++" to DTRT.
- _LT_TAGVAR(predep_objects,$1)=
- _LT_TAGVAR(postdep_objects,$1)=
- _LT_TAGVAR(postdeps,$1)=
- ;;
-
-solaris*)
- case $cc_basename in
- CC*)
- # Adding this requires a known-good setup of shared libraries for
- # Sun compiler versions before 5.6, else PIC objects from an old
- # archive will be linked into the output, leading to subtle bugs.
- _LT_TAGVAR(postdeps,$1)='-lCstd -lCrun'
- ;;
- esac
- ;;
-esac
-])
-
-case " $_LT_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
-_LT_TAGDECL([], [predep_objects], [1],
- [Dependencies to place before and after the objects being linked to
- create a shared library])
-_LT_TAGDECL([], [postdep_objects], [1])
-_LT_TAGDECL([], [predeps], [1])
-_LT_TAGDECL([], [postdeps], [1])
-_LT_TAGDECL([], [compiler_lib_search_path], [1],
- [The library search path used internally by the compiler when linking
- a shared library])
-])# _LT_SYS_HIDDEN_LIBDEPS
-
-
-# _LT_PROG_F77
-# ------------
-# Since AC_PROG_F77 is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_F77],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
-AC_PROG_F77
-if test -z "$F77" || test "X$F77" = "Xno"; then
- _lt_disable_F77=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_F77
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_F77], [])
-
-
-# _LT_LANG_F77_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a Fortran 77 compiler are
-# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_F77_CONFIG],
-[AC_REQUIRE([_LT_PROG_F77])dnl
-AC_LANG_PUSH(Fortran 77)
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the F77 compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_F77" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code=" subroutine t\n return\n end\n"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code=" program t\n end\n"
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC="$CC"
- CC=${F77-"f77"}
- compiler=$CC
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
-
- if test -n "$compiler"; then
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
- aix4* | aix5*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_TAGVAR(GCC, $1)="$G77"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- CC="$lt_save_CC"
-fi # test "$_lt_disable_F77" != yes
-
-AC_LANG_POP
-])# _LT_LANG_F77_CONFIG
-
-
-# _LT_PROG_FC
-# -----------
-# Since AC_PROG_FC is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_FC],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
-AC_PROG_FC
-if test -z "$FC" || test "X$FC" = "Xno"; then
- _lt_disable_FC=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_FC
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_FC], [])
-
-
-# _LT_LANG_FC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for a Fortran compiler are
-# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_FC_CONFIG],
-[AC_REQUIRE([_LT_PROG_FC])dnl
-AC_LANG_PUSH(Fortran)
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for fc test sources.
-ac_ext=${ac_fc_srcext-f}
-
-# Object file extension for compiled fc test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the FC compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_FC" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code=" subroutine t\n return\n end\n"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code=" program t\n end\n"
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC="$CC"
- CC=${FC-"f95"}
- compiler=$CC
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
-
- if test -n "$compiler"; then
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
- aix4* | aix5*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_SYS_HIDDEN_LIBDEPS($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- CC="$lt_save_CC"
-fi # test "$_lt_disable_FC" != yes
-
-AC_LANG_POP
-])# _LT_LANG_FC_CONFIG
-
-
-# _LT_LANG_GCJ_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for the GNU Java Compiler compiler
-# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_GCJ_CONFIG],
-[AC_REQUIRE([LT_PROG_GCJ])dnl
-AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${GCJ-"gcj"}
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
- _LT_COMPILER_NO_RTTI($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
-fi
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# _LT_LANG_GCJ_CONFIG
-
-
-# _LT_LANG_RC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for the Windows resource compiler
-# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_RC_CONFIG],
-[AC_REQUIRE([LT_PROG_RC])dnl
-AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${RC-"windres"}
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-if test -n "$compiler"; then
- :
- _LT_CONFIG($1)
-fi
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# _LT_LANG_RC_CONFIG
-
-
-# LT_PROG_GCJ
-# -----------
-AC_DEFUN([LT_PROG_GCJ],
-[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
- [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
- [AC_CHECK_TOOL(GCJ, gcj,)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
- AC_SUBST(GCJFLAGS)])])dnl
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
-
-
-# LT_PROG_RC
-# ----------
-AC_DEFUN([LT_PROG_RC],
-[AC_CHECK_TOOL(RC, windres,)
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_RC], [])
-
-
-# _LT_DECL_EGREP
-# --------------
-# If we don't have a new enough Autoconf to choose the best grep
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_EGREP],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_REQUIRE([AC_PROG_FGREP])dnl
-test -z "$GREP" && GREP=grep
-_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
-_LT_DECL([], [EGREP], [1], [An ERE matcher])
-_LT_DECL([], [FGREP], [1], [A literal string matcher])
-dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
-AC_SUBST([GREP])
-])
-
-
-# _LT_DECL_SED
-# ------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible. Prefer GNU sed if found.
-m4_defun([_LT_DECL_SED],
-[AC_PROG_SED
-test -z "$SED" && SED=sed
-_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
-_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
- [Sed that helps us avoid accidentally triggering echo(1) options like -n])
-])# _LT_DECL_SED
-
-m4_ifndef([AC_PROG_SED], [
-############################################################
-# NOTE: This macro has been submitted for inclusion into #
-# GNU Autoconf as AC_PROG_SED. When it is available in #
-# a released version of Autoconf we should remove this #
-# macro and use it instead. #
-############################################################
-
-AC_DEFUN([AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for lt_ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
- lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
- fi
- done
- done
-done
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
- test ! -f $lt_ac_sed && continue
- cat /dev/null > conftest.in
- lt_ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >conftest.in
- # Check for GNU sed and select it if it is found.
- if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
- lt_cv_path_SED=$lt_ac_sed
- break
- fi
- while true; do
- cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
- cp conftest.in conftest.nl
- echo >>conftest.nl
- $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
- cmp -s conftest.out conftest.nl || break
- # 10000 chars as input seems more than enough
- test $lt_ac_count -gt 10 && break
- lt_ac_count=`expr $lt_ac_count + 1`
- if test $lt_ac_count -gt $lt_ac_max; then
- lt_ac_max=$lt_ac_count
- lt_cv_path_SED=$lt_ac_sed
- fi
- done
-done
-])
-SED=$lt_cv_path_SED
-AC_SUBST([SED])
-AC_MSG_RESULT([$SED])
-])#AC_PROG_SED
-])#m4_ifndef
-
-
-# _LT_CHECK_XSI_SHELL
-# -------------------
-# define func_basename as either Bourne or XSI compatible
-m4_defun([_LT_CHECK_XSI_SHELL],
-[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
- = c,a/b,, ) >/dev/null 2>&1 \
- && xsi_shell=yes
-AC_MSG_RESULT([$xsi_shell])
-_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
-])# _LT_CHECK_XSI_SHELL
-
-
-# _LT_PROG_XSI_SHELLFNS
-# ---------------------
-# Bourne and XSI compatible variants of some useful shell functions.
-m4_defun([_LT_PROG_XSI_SHELLFNS],
-[case $xsi_shell in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
- # positional parameters, so assign one to ordinary parameter first.
- func_stripname_result=${3}
- func_stripname_result=${func_stripname_result#"${1}"}
- func_stripname_result=${func_stripname_result%"${2}"}
-}
-_LT_EOF
- ;;
- *) # Bourne compatible functions.
- cat << \_LT_EOF >> "$cfgfile"
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- # Extract subdirectory from the argument.
- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
- case ${2} in
- .*) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
- *) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
- esac
-}
-_LT_EOF
-esac
-])
diff --git a/src/3rdparty/libtiff/m4/ltoptions.m4 b/src/3rdparty/libtiff/m4/ltoptions.m4
deleted file mode 100644
index da035ab941..0000000000
--- a/src/3rdparty/libtiff/m4/ltoptions.m4
+++ /dev/null
@@ -1,380 +0,0 @@
-# Helper functions for option handling. -*- Autoconf -*-
-
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan <gary@gnu.org>
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 3 ltoptions.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
-
-
-# _LT_MANGLE_OPTION(NAME)
-# -----------------------
-m4_define([_LT_MANGLE_OPTION],
-[[_LT_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-
-# _LT_SET_OPTION(NAME)
-# --------------------
-# Set option NAME, and if there is a matching handler defined,
-# dispatch to it. Other NAMEs are saved as a flag.
-m4_define([_LT_SET_OPTION],
-[m4_define(_LT_MANGLE_OPTION([$1]))dnl
-m4_ifdef(_LT_MANGLE_DEFUN([$1]),
- _LT_MANGLE_DEFUN([$1]),
- [m4_warning([Unknown Libtool option `$1'])])[]dnl
-])
-
-
-# _LT_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-m4_define([_LT_IF_OPTION],
-[m4_ifdef(_LT_MANGLE_OPTION([$1]), [$2], [$3])])
-
-
-# _LT_UNLESS_OPTIONS(OPTIONS, IF-NOT-SET)
-# ---------------------------------------
-# Execute IF-NOT-SET if all OPTIONS are not set.
-m4_define([_LT_UNLESS_OPTIONS],
-[m4_foreach([_LT_Option], m4_split(m4_normalize([$1])),
- [m4_ifdef(_LT_MANGLE_OPTION(_LT_Option),
- [m4_define([$0_found])])])[]dnl
-m4_ifdef([$0_found], [m4_undefine([$0_found])], [$2
-])[]dnl
-])
-
-
-# _LT_SET_OPTIONS(OPTIONS)
-# ------------------------
-# OPTIONS is a space-separated list of Libtool options.
-# If any OPTION has a handler macro declared with LT_OPTION_DEFINE,
-# dispatch to that macro; otherwise complain about the unknown option
-# and exit.
-m4_defun([_LT_SET_OPTIONS],
-[# Set options
-m4_foreach([_LT_Option], m4_split(m4_normalize([$1])),
- [_LT_SET_OPTION(_LT_Option)])
-dnl
-dnl Simply set some default values (i.e off) if boolean options were not
-dnl specified:
-_LT_UNLESS_OPTIONS([dlopen], [enable_dlopen=no
-])
-_LT_UNLESS_OPTIONS([win32-dll], [enable_win32_dll=no
-])
-dnl
-dnl If no reference was made to various pairs of opposing options, then
-dnl we run the default mode handler for the pair. For example, if neither
-dnl `shared' nor `disable-shared' was passed, we enable building of shared
-dnl archives by default:
-_LT_UNLESS_OPTIONS([shared disable-shared], [_LT_ENABLE_SHARED])
-_LT_UNLESS_OPTIONS([static disable-static], [_LT_ENABLE_STATIC])
-_LT_UNLESS_OPTIONS([pic-only no-pic], [_LT_WITH_PIC])
-_LT_UNLESS_OPTIONS([fast-install disable-fast-install],
- [_LT_ENABLE_FAST_INSTALL])
-])# _LT_SET_OPTIONS
-
-
-## --------------------------------- ##
-## Macros to handle LT_INIT options. ##
-## --------------------------------- ##
-
-m4_define([_LT_MANGLE_DEFUN],
-[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1]), [[^A-Z0-9_]], [_])])
-
-
-# LT_OPTION_DEFINE(NAME, CODE)
-# ----------------------------
-m4_define([LT_OPTION_DEFINE],
-[m4_define(_LT_MANGLE_DEFUN([$1]), [$2])[]dnl
-])# LT_OPTION_DEFINE
-
-
-# dlopen
-# ------
-LT_OPTION_DEFINE([dlopen], [enable_dlopen=yes
-])
-
-AU_DEFUN([AC_LIBTOOL_DLOPEN],
-[_LT_SET_OPTION([dlopen])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `dlopen' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
-
-
-# win32-dll
-# ---------
-# Declare package support for building win32 dll's.
-LT_OPTION_DEFINE([win32-dll],
-[enable_win32_dll=yes
-
-case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
-esac
-
-test -z "$AS" && AS=as
-_LT_DECL([], [AS], [0], [Assembler program])dnl
-
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
-])# win32-dll
-
-AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[_LT_SET_OPTION([win32-dll])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `win32-dll' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
-
-
-# _LT_ENABLE_SHARED([DEFAULT])
-# ----------------------------
-# implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_SHARED],
-[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([shared],
- [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
- [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
-
- _LT_DECL([build_libtool_libs], [enable_shared], [0],
- [Whether or not to build shared libraries])
-])# _LT_ENABLE_SHARED
-
-LT_OPTION_DEFINE([shared], [_LT_ENABLE_SHARED([yes])])
-LT_OPTION_DEFINE([disable-shared], [_LT_ENABLE_SHARED([no])])
-
-# Old names:
-AU_DEFUN([AC_ENABLE_SHARED],
-[_LT_SET_OPTION([shared])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `shared' option into LT_INIT's first parameter.])
-])
-
-AU_DEFUN([AM_ENABLE_SHARED],
-[_LT_SET_OPTION([shared])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `shared' option into LT_INIT's first parameter.])
-])
-
-AU_DEFUN([AC_DISABLE_SHARED],
-[_LT_SET_OPTION([disable-shared])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-shared' option into LT_INIT's first parameter.])
-])
-
-AU_DEFUN([AM_DISABLE_SHARED],
-[_LT_SET_OPTION([disable-shared])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-shared' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_ENABLE_SHARED], [])
-dnl AC_DEFUN([AM_ENABLE_SHARED], [])
-dnl AC_DEFUN([AC_DISABLE_SHARED], [])
-dnl AC_DEFUN([AM_DISABLE_SHARED], [])
-
-
-
-# _LT_ENABLE_STATIC([DEFAULT])
-# ----------------------------
-# implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_STATIC],
-[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([static],
- [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
- [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
-
- _LT_DECL([build_old_libs], [enable_static], [0],
- [Whether or not to build static libraries])
-])# _LT_ENABLE_STATIC
-
-LT_OPTION_DEFINE([static], [_LT_ENABLE_STATIC([yes])])
-LT_OPTION_DEFINE([disable-static], [_LT_ENABLE_STATIC([no])])
-
-# Old names:
-AU_DEFUN([AC_ENABLE_STATIC],
-[_LT_SET_OPTION([static])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `static' option into LT_INIT's first parameter.])
-])
-
-AU_DEFUN([AM_ENABLE_STATIC],
-[_LT_SET_OPTION([static])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `static' option into LT_INIT's first parameter.])
-])
-
-AU_DEFUN([AC_DISABLE_STATIC],
-[_LT_SET_OPTION([disable-static])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-static' option into LT_INIT's first parameter.])
-])
-
-AU_DEFUN([AM_DISABLE_STATIC],
-[_LT_SET_OPTION([disable-static])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-static' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_ENABLE_STATIC], [])
-dnl AC_DEFUN([AM_ENABLE_STATIC], [])
-dnl AC_DEFUN([AC_DISABLE_STATIC], [])
-dnl AC_DEFUN([AM_DISABLE_STATIC], [])
-
-
-
-# _LT_ENABLE_FAST_INSTALL([DEFAULT])
-# ----------------------------------
-# implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_FAST_INSTALL],
-[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([fast-install],
- [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
- [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
-
-_LT_DECL([fast_install], [enable_fast_install], [0],
- [Whether or not to optimize for fast installation])dnl
-])# _LT_ENABLE_FAST_INSTALL
-
-LT_OPTION_DEFINE([fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
-LT_OPTION_DEFINE([disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
-
-# Old names:
-AU_DEFUN([AC_ENABLE_FAST_INSTALL],
-[_LT_SET_OPTION([fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `fast-install' option into LT_INIT's first parameter.])
-])
-
-AU_DEFUN([AC_DISABLE_FAST_INSTALL],
-[_LT_SET_OPTION([disable-fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-fast-install' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
-dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
-
-
-# _LT_WITH_PIC([MODE])
-# --------------------
-# implement the --with-pic flag, and support the `pic-only' and `no-pic'
-# LT_INIT options.
-# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
-m4_define([_LT_WITH_PIC],
-[AC_ARG_WITH([pic],
- [AS_HELP_STRING([--with-pic],
- [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
- [pic_mode="$withval"],
- [pic_mode=default])
-
-test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
-
-_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
-])# _LT_WITH_PIC
-
-LT_OPTION_DEFINE([pic-only], [_LT_WITH_PIC([yes])])
-LT_OPTION_DEFINE([no-pic], [_LT_WITH_PIC([no])])
-
-# Old name:
-AU_DEFUN([AC_LIBTOOL_PICMODE],
-[_LT_SET_OPTION([pic-only])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `pic-only' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
diff --git a/src/3rdparty/libtiff/m4/ltsugar.m4 b/src/3rdparty/libtiff/m4/ltsugar.m4
deleted file mode 100644
index fc51dc7e89..0000000000
--- a/src/3rdparty/libtiff/m4/ltsugar.m4
+++ /dev/null
@@ -1,111 +0,0 @@
-# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
-#
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan.
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 3 ltsugar.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
-
-
-# lt_join(SEP, ARG1, [ARG2...])
-# -----------------------------
-# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
-# associated separator.
-m4_define([lt_join],
-[m4_case([$#],
- [0], [m4_fatal([$0: too few arguments: $#])],
- [1], [],
- [2], [[$2]],
- [m4_ifval([$2],
- [[$2][]m4_foreach(_lt_Arg, lt_car([m4_shiftn(2, $@)]),
- [_$0([$1], _lt_Arg)])],
- [$0([$1], m4_shiftn(2, $@))])])[]dnl
-])
-m4_define([_lt_join],
-[m4_ifval([$2],[$1][$2])[]dnl
-])
-
-
-# lt_car(LIST)
-# lt_cdr(LIST)
-# ------------
-# Manipulate m4 lists.
-# These macros are necessary as long as will still need to support
-# Autoconf-2.59 which quotes differently.
-m4_define([lt_car], [[$1]])
-m4_define([lt_cdr],
-[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
- [$#], 1, [],
- [m4_dquote(m4_shift($@))])])
-m4_define([lt_unquote], $1)
-
-
-# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
-# ----------------------------------------------------------
-# Produce a SEP delimited list of all paired combinations of elements of
-# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
-# has the form PREFIXmINFIXSUFFIXn.
-m4_define([lt_combine],
-[m4_if([$2], [], [],
- [m4_if([$4], [], [],
- [lt_join(m4_quote(m4_default([$1], [[, ]])),
- lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_prefix, [$2],
- [m4_foreach(_Lt_suffix, lt_car([m4_shiftn(3, $@)]),
- [_Lt_prefix[]$3[]_Lt_suffix ])])))))])])dnl
-])
-
-
-# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
-# -----------------------------------------------------------------------
-# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
-# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
-m4_define([lt_if_append_uniq],
-[m4_ifdef([$1],
- [m4_bmatch($3[]m4_defn([$1])$3, $3[]m4_re_escape([$2])$3,
- [$5],
- [m4_append([$1], [$2], [$3])$4])],
- [m4_append([$1], [$2], [$3])$4])])
-
-
-# lt_dict_add(DICT, KEY, VALUE)
-# -----------------------------
-m4_define([lt_dict_add],
-[m4_define([$1($2)], [$4])])
-
-
-# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
-# --------------------------------------------
-m4_define([lt_dict_add_subkey],
-[m4_define([$1($2:$3)], [$4])])
-
-
-# lt_dict_fetch(DICT, KEY, [SUBKEY])
-# ----------------------------------
-m4_define([lt_dict_fetch],
-[m4_ifval([$3],
- m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
- m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
-
-
-# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
-# -----------------------------------------------------------------
-m4_define([lt_if_dict_fetch],
-[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
- [$5],
- [$6])])
-
-
-# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
-# --------------------------------------------------------------
-m4_define([lt_dict_filter],
-[m4_if([$5], [], [],
- [lt_join(m4_quote(m4_default([$4], [[, ]])),
- lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
- [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
-])
diff --git a/src/3rdparty/libtiff/m4/ltversion.m4 b/src/3rdparty/libtiff/m4/ltversion.m4
deleted file mode 100644
index 1a1ce48e01..0000000000
--- a/src/3rdparty/libtiff/m4/ltversion.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-# ltversion.m4 -- version numbers -*- Autoconf -*-
-#
-# Copyright (C) 2004 Free Software Foundation, Inc.
-# Written by Scott James Remnant.
-#
-## This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# Generated from ltversion.in; do not edit by hand
-
-# serial 2248 ltversion.m4
-# This file is part of GNU Libtool
-
-m4_define([LT_PACKAGE_VERSION], [2.1a])
-m4_define([LT_PACKAGE_REVISION], [1.2248])
-
-AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.1a'
-macro_revision='1.2248'
-_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
-_LT_DECL(, macro_revision, 0)
-])
diff --git a/src/3rdparty/libtiff/nmake.opt b/src/3rdparty/libtiff/nmake.opt
index f5ad2d93c3..7e882d2d4a 100644
--- a/src/3rdparty/libtiff/nmake.opt
+++ b/src/3rdparty/libtiff/nmake.opt
@@ -1,4 +1,4 @@
-# $Id: nmake.opt,v 1.16 2006/03/23 14:54:01 dron Exp $
+# $Id: nmake.opt,v 1.18 2006/06/07 16:33:45 dron Exp $
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
@@ -60,12 +60,6 @@ LOGLUV_SUPPORT = 1
#JPEG_LIB = $(JPEGDIR)/Release/jpeg.lib
#
-# Uncomment following lines to enable Old JPEG support
-# (modified IJG JPEG library required, read the contrib\ojpeg\README first).
-#
-#OJPEG_SUPPORT = 1
-
-#
# Uncomment and edit following lines to enable ZIP support
# (required for Deflate compression and Pixar log-format)
#
@@ -75,6 +69,14 @@ LOGLUV_SUPPORT = 1
#ZLIB_LIB = $(ZLIBDIR)/zlib.lib
#
+# Uncomment and edit following lines to enable ISO JBIG support
+#
+#JBIG_SUPPORT = 1
+#JBIGDIR = d:/projects/jbigkit
+#JBIG_INCLUDE = -I$(JBIGDIR)/libjbig
+#JBIG_LIB = $(JBIGDIR)/libjbig/jbig.lib
+
+#
# Uncomment following line to enable Pixar log-format algorithm
# (Zlib required).
#
@@ -110,9 +112,9 @@ CHECK_JPEG_YCBCR_SUBSAMPLING = 1
#
# Pick debug or optimized build flags. We default to an optimized build
# with no debugging information.
-# NOTE: /GX option required if you want to build the C++ stream API
+# NOTE: /EHsc option required if you want to build the C++ stream API
#
-OPTFLAGS = /Ox /MD /GX /W3
+OPTFLAGS = /Ox /MD /EHsc /W3 /D_CRT_SECURE_NO_DEPRECATE
#OPTFLAGS = /Zi
#
@@ -181,10 +183,7 @@ EXTRAFLAGS = -DLOGLUV_SUPPORT $(EXTRAFLAGS)
!IFDEF JPEG_SUPPORT
LIBS = $(LIBS) $(JPEG_LIB)
-EXTRAFLAGS = -DJPEG_SUPPORT $(EXTRAFLAGS)
-!IFDEF OJPEG_SUPPORT
-EXTRAFLAGS = -DOJPEG_SUPPORT $(EXTRAFLAGS)
-!ENDIF
+EXTRAFLAGS = -DJPEG_SUPPORT -DOJPEG_SUPPORT $(EXTRAFLAGS)
!ENDIF
!IFDEF ZIP_SUPPORT
@@ -195,6 +194,11 @@ EXTRAFLAGS = -DPIXARLOG_SUPPORT $(EXTRAFLAGS)
!ENDIF
!ENDIF
+!IFDEF JBIG_SUPPORT
+LIBS = $(LIBS) $(JBIG_LIB)
+EXTRAFLAGS = -DJBIG_SUPPORT $(EXTRAFLAGS)
+!ENDIF
+
!IFDEF STRIPCHOP_SUPPORT
EXTRAFLAGS = -DSTRIPCHOP_DEFAULT=TIFF_STRIPCHOP -DSTRIP_SIZE_DEFAULT=$(STRIP_SIZE_DEFAULT) $(EXTRAFLAGS)
!ENDIF
diff --git a/src/3rdparty/libtiff/port/Makefile.am b/src/3rdparty/libtiff/port/Makefile.am
deleted file mode 100644
index 110dd85d66..0000000000
--- a/src/3rdparty/libtiff/port/Makefile.am
+++ /dev/null
@@ -1,31 +0,0 @@
-# Tag Image File Format (TIFF) Software
-#
-# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-#
-# Permission to use, copy, modify, distribute, and sell this software and
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-#
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-#
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-
-# Process this file with automake to produce Makefile.in.
-
-EXTRA_DIST = Makefile.vc
-
-noinst_LTLIBRARIES = libport.la
-libport_la_SOURCES = dummy.c
-libport_la_LIBADD = @LTLIBOBJS@
-
diff --git a/src/3rdparty/libtiff/port/Makefile.in b/src/3rdparty/libtiff/port/Makefile.in
deleted file mode 100644
index 4ab51cccc2..0000000000
--- a/src/3rdparty/libtiff/port/Makefile.in
+++ /dev/null
@@ -1,501 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# Tag Image File Format (TIFF) Software
-#
-# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-#
-# Permission to use, copy, modify, distribute, and sell this software and
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-#
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-#
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-
-# Process this file with automake to produce Makefile.in.
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = port
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in getopt.c \
- lfind.c strcasecmp.c strtoul.c
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
- $(top_builddir)/libtiff/tiffconf.h
-CONFIG_CLEAN_FILES =
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-libport_la_DEPENDENCIES = @LTLIBOBJS@
-am_libport_la_OBJECTS = dummy.lo
-libport_la_OBJECTS = $(am_libport_la_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/libtiff -I$(top_builddir)/libtiff
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libport_la_SOURCES)
-DIST_SOURCES = $(libport_la_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GLUT_CFLAGS = @GLUT_CFLAGS@
-GLUT_LIBS = @GLUT_LIBS@
-GLU_CFLAGS = @GLU_CFLAGS@
-GLU_LIBS = @GLU_LIBS@
-GL_CFLAGS = @GL_CFLAGS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
-HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
-HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
-HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
-HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
-HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBDIR = @LIBDIR@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
-LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
-LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
-LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
-LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
-LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
-LIBTIFF_VERSION = @LIBTIFF_VERSION@
-LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-NM = @NM@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-X_CFLAGS = @X_CFLAGS@
-X_EXTRA_LIBS = @X_EXTRA_LIBS@
-X_LIBS = @X_LIBS@
-X_PRE_LIBS = @X_PRE_LIBS@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-acx_pthread_config = @acx_pthread_config@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-EXTRA_DIST = Makefile.vc
-noinst_LTLIBRARIES = libport.la
-libport_la_SOURCES = dummy.c
-libport_la_LIBADD = @LTLIBOBJS@
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign port/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign port/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
- @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
-libport.la: $(libport_la_OBJECTS) $(libport_la_DEPENDENCIES)
- $(LINK) $(libport_la_LDFLAGS) $(libport_la_OBJECTS) $(libport_la_LIBADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lfind.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strcasecmp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtoul.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Plo@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
- mostlyclean-am
-
-distclean: distclean-am
- -rm -rf $(DEPDIR) ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf $(DEPDIR) ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool clean-noinstLTLIBRARIES ctags distclean \
- distclean-compile distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/3rdparty/libtiff/port/Makefile.vc b/src/3rdparty/libtiff/port/Makefile.vc
deleted file mode 100644
index f5c85c6ba9..0000000000
--- a/src/3rdparty/libtiff/port/Makefile.vc
+++ /dev/null
@@ -1,43 +0,0 @@
-# $Id: Makefile.vc,v 1.4 2006/03/23 14:54:02 dron Exp $
-#
-# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-#
-# Permission to use, copy, modify, distribute, and sell this software and
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-#
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-#
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-#
-# Makefile for MS Visual C and Watcom C compilers.
-#
-# To build:
-# C:\libtiff\port> nmake /f makefile.vc
-
-!INCLUDE ..\nmake.opt
-
-OBJ = \
- strcasecmp.obj \
- getopt.obj
-
-all: libport.lib
-
-libport.lib: $(OBJ)
- $(AR) /out:libport.lib $(OBJ)
-
-clean:
- -del *.obj
- -del *.lib
-
diff --git a/src/3rdparty/libtiff/port/dummy.c b/src/3rdparty/libtiff/port/dummy.c
index ec8f91bd82..1cbda6afa1 100644
--- a/src/3rdparty/libtiff/port/dummy.c
+++ b/src/3rdparty/libtiff/port/dummy.c
@@ -1,10 +1,10 @@
-/* $Id: dummy.c,v 1.2 2005/07/07 15:21:52 dron Exp $ */
+/* $Id: dummy.c,v 1.2.2.1 2007/03/21 14:53:46 dron Exp $ */
/*
* Dummy function, just to be ensure that the library always will be created.
*/
-static void
+void
libport_dummy_function()
{
return;
diff --git a/src/3rdparty/libtiff/port/lfind.c b/src/3rdparty/libtiff/port/lfind.c
index d2f14ee079..64b261ca36 100644
--- a/src/3rdparty/libtiff/port/lfind.c
+++ b/src/3rdparty/libtiff/port/lfind.c
@@ -1,4 +1,4 @@
-/* $Id: lfind.c,v 1.3 2005/12/27 15:08:22 dron Exp $ */
+/* $Id: lfind.c,v 1.4 2007/01/15 18:40:39 mloskot Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -37,7 +37,11 @@ static char sccsid[] = "@(#)lsearch.c 8.1 (Berkeley) 6/4/93";
__RCSID("$NetBSD: lsearch.c,v 1.2 2005/07/06 15:47:15 drochner Exp $");
#endif
-#include <sys/types.h>
+#ifdef _WIN32_WCE
+# include <wce_types.h>
+#else
+# include <sys/types.h>
+#endif
#ifndef NULL
# define NULL 0
diff --git a/src/3rdparty/libtiff/port/libport.h b/src/3rdparty/libtiff/port/libport.h
new file mode 100644
index 0000000000..e3413f7af2
--- /dev/null
+++ b/src/3rdparty/libtiff/port/libport.h
@@ -0,0 +1,51 @@
+/* $Id: libport.h,v 1.2.2.2 2009-11-02 14:47:41 bfriesen Exp $ */
+
+/*
+ * Copyright (c) 2009 Frank Warmerdam
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the names of
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Sam Leffler and Silicon Graphics.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifndef _LIBPORT_
+#define _LIBPORT_
+
+int getopt(int argc, char * const argv[], const char *optstring);
+extern char *optarg;
+extern int opterr;
+extern int optind;
+extern int optopt;
+
+int strcasecmp(const char *s1, const char *s2);
+
+#ifndef HAVE_GETOPT
+# define HAVE_GETOPT 1
+#endif
+
+#if 0
+unsigned long strtoul(const char *nptr, char **endptr, int base);
+#endif
+
+#if 0
+void *
+lfind(const void *key, const void *base, size_t *nmemb, size_t size,
+ int(*compar)(const void *, const void *));
+#endif
+
+#endif /* ndef _LIBPORT_ */
diff --git a/src/3rdparty/libtiff/test/Makefile.am b/src/3rdparty/libtiff/test/Makefile.am
deleted file mode 100644
index 0658e53fe9..0000000000
--- a/src/3rdparty/libtiff/test/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-# Tag Image File Format (TIFF) Software
-#
-# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-#
-# Permission to use, copy, modify, distribute, and sell this software and
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-#
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-#
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-
-# Process this file with automake to produce Makefile.in.
-
-LIBTIFF = $(top_builddir)/libtiff/libtiff.la
-
-#EXTRA_DIST = Makefile.vc
-
-TESTS = $(check_PROGRAMS)
-
-check_PROGRAMS = ascii_tag long_tag short_tag strip_rw
-
-ascii_tag_SOURCES = ascii_tag.c
-ascii_tag_LDADD = $(LIBTIFF)
-long_tag_SOURCES = long_tag.c check_tag.c
-long_tag_LDADD = $(LIBTIFF)
-short_tag_SOURCES = short_tag.c check_tag.c
-short_tag_LDADD = $(LIBTIFF)
-strip_rw_SOURCES = strip_rw.c strip.c test_arrays.c test_arrays.h
-strip_rw_LDADD = $(LIBTIFF)
-
-INCLUDES = -I$(top_srcdir)/libtiff
-
diff --git a/src/3rdparty/libtiff/test/Makefile.in b/src/3rdparty/libtiff/test/Makefile.in
deleted file mode 100644
index 6cedb7fc65..0000000000
--- a/src/3rdparty/libtiff/test/Makefile.in
+++ /dev/null
@@ -1,607 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# Tag Image File Format (TIFF) Software
-#
-# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-#
-# Permission to use, copy, modify, distribute, and sell this software and
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-#
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-#
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-
-# Process this file with automake to produce Makefile.in.
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-check_PROGRAMS = ascii_tag$(EXEEXT) long_tag$(EXEEXT) \
- short_tag$(EXEEXT) strip_rw$(EXEEXT)
-subdir = test
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
- $(top_builddir)/libtiff/tiffconf.h
-CONFIG_CLEAN_FILES =
-am_ascii_tag_OBJECTS = ascii_tag.$(OBJEXT)
-ascii_tag_OBJECTS = $(am_ascii_tag_OBJECTS)
-am__DEPENDENCIES_1 = $(top_builddir)/libtiff/libtiff.la
-ascii_tag_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_long_tag_OBJECTS = long_tag.$(OBJEXT) check_tag.$(OBJEXT)
-long_tag_OBJECTS = $(am_long_tag_OBJECTS)
-long_tag_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_short_tag_OBJECTS = short_tag.$(OBJEXT) check_tag.$(OBJEXT)
-short_tag_OBJECTS = $(am_short_tag_OBJECTS)
-short_tag_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_strip_rw_OBJECTS = strip_rw.$(OBJEXT) strip.$(OBJEXT) \
- test_arrays.$(OBJEXT)
-strip_rw_OBJECTS = $(am_strip_rw_OBJECTS)
-strip_rw_DEPENDENCIES = $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/libtiff -I$(top_builddir)/libtiff
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(ascii_tag_SOURCES) $(long_tag_SOURCES) \
- $(short_tag_SOURCES) $(strip_rw_SOURCES)
-DIST_SOURCES = $(ascii_tag_SOURCES) $(long_tag_SOURCES) \
- $(short_tag_SOURCES) $(strip_rw_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GLUT_CFLAGS = @GLUT_CFLAGS@
-GLUT_LIBS = @GLUT_LIBS@
-GLU_CFLAGS = @GLU_CFLAGS@
-GLU_LIBS = @GLU_LIBS@
-GL_CFLAGS = @GL_CFLAGS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
-HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
-HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
-HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
-HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
-HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBDIR = @LIBDIR@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
-LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
-LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
-LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
-LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
-LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
-LIBTIFF_VERSION = @LIBTIFF_VERSION@
-LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-NM = @NM@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-X_CFLAGS = @X_CFLAGS@
-X_EXTRA_LIBS = @X_EXTRA_LIBS@
-X_LIBS = @X_LIBS@
-X_PRE_LIBS = @X_PRE_LIBS@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_AS = @ac_ct_AS@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-acx_pthread_config = @acx_pthread_config@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-LIBTIFF = $(top_builddir)/libtiff/libtiff.la
-
-#EXTRA_DIST = Makefile.vc
-TESTS = $(check_PROGRAMS)
-ascii_tag_SOURCES = ascii_tag.c
-ascii_tag_LDADD = $(LIBTIFF)
-long_tag_SOURCES = long_tag.c check_tag.c
-long_tag_LDADD = $(LIBTIFF)
-short_tag_SOURCES = short_tag.c check_tag.c
-short_tag_LDADD = $(LIBTIFF)
-strip_rw_SOURCES = strip_rw.c strip.c test_arrays.c test_arrays.h
-strip_rw_LDADD = $(LIBTIFF)
-INCLUDES = -I$(top_srcdir)/libtiff
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign test/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-clean-checkPROGRAMS:
- @list='$(check_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
-ascii_tag$(EXEEXT): $(ascii_tag_OBJECTS) $(ascii_tag_DEPENDENCIES)
- @rm -f ascii_tag$(EXEEXT)
- $(LINK) $(ascii_tag_LDFLAGS) $(ascii_tag_OBJECTS) $(ascii_tag_LDADD) $(LIBS)
-long_tag$(EXEEXT): $(long_tag_OBJECTS) $(long_tag_DEPENDENCIES)
- @rm -f long_tag$(EXEEXT)
- $(LINK) $(long_tag_LDFLAGS) $(long_tag_OBJECTS) $(long_tag_LDADD) $(LIBS)
-short_tag$(EXEEXT): $(short_tag_OBJECTS) $(short_tag_DEPENDENCIES)
- @rm -f short_tag$(EXEEXT)
- $(LINK) $(short_tag_LDFLAGS) $(short_tag_OBJECTS) $(short_tag_LDADD) $(LIBS)
-strip_rw$(EXEEXT): $(strip_rw_OBJECTS) $(strip_rw_DEPENDENCIES)
- @rm -f strip_rw$(EXEEXT)
- $(LINK) $(strip_rw_LDFLAGS) $(strip_rw_OBJECTS) $(strip_rw_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ascii_tag.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_tag.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/long_tag.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/short_tag.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strip.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strip_rw.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_arrays.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-check-TESTS: $(TESTS)
- @failed=0; all=0; xfail=0; xpass=0; skip=0; \
- srcdir=$(srcdir); export srcdir; \
- list='$(TESTS)'; \
- if test -n "$$list"; then \
- for tst in $$list; do \
- if test -f ./$$tst; then dir=./; \
- elif test -f $$tst; then dir=; \
- else dir="$(srcdir)/"; fi; \
- if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *" $$tst "*) \
- xpass=`expr $$xpass + 1`; \
- failed=`expr $$failed + 1`; \
- echo "XPASS: $$tst"; \
- ;; \
- *) \
- echo "PASS: $$tst"; \
- ;; \
- esac; \
- elif test $$? -ne 77; then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *" $$tst "*) \
- xfail=`expr $$xfail + 1`; \
- echo "XFAIL: $$tst"; \
- ;; \
- *) \
- failed=`expr $$failed + 1`; \
- echo "FAIL: $$tst"; \
- ;; \
- esac; \
- else \
- skip=`expr $$skip + 1`; \
- echo "SKIP: $$tst"; \
- fi; \
- done; \
- if test "$$failed" -eq 0; then \
- if test "$$xfail" -eq 0; then \
- banner="All $$all tests passed"; \
- else \
- banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
- fi; \
- else \
- if test "$$xpass" -eq 0; then \
- banner="$$failed of $$all tests failed"; \
- else \
- banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
- fi; \
- fi; \
- dashes="$$banner"; \
- skipped=""; \
- if test "$$skip" -ne 0; then \
- skipped="($$skip tests were not run)"; \
- test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$skipped"; \
- fi; \
- report=""; \
- if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
- report="Please report to $(PACKAGE_BUGREPORT)"; \
- test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$report"; \
- fi; \
- dashes=`echo "$$dashes" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- test -z "$$skipped" || echo "$$skipped"; \
- test -z "$$report" || echo "$$report"; \
- echo "$$dashes"; \
- test "$$failed" -eq 0; \
- else :; fi
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
- $(MAKE) $(AM_MAKEFLAGS) check-TESTS
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
- mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
- clean-checkPROGRAMS clean-generic clean-libtool ctags \
- distclean distclean-compile distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/3rdparty/libtiff/test/ascii_tag.c b/src/3rdparty/libtiff/test/ascii_tag.c
deleted file mode 100644
index a6cd45b945..0000000000
--- a/src/3rdparty/libtiff/test/ascii_tag.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/* $Id: ascii_tag.c,v 1.5 2006/03/23 14:54:02 dron Exp $ */
-
-/*
- * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library
- *
- * Module to test ASCII tags read/write functions.
- */
-
-#include "tif_config.h"
-
-#include <stdio.h>
-#include <string.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#include "tiffio.h"
-
-const char *filename = "ascii_test.tiff";
-
-static struct Tags {
- ttag_t tag;
- const char *value;
-} ascii_tags[] = {
- { TIFFTAG_DOCUMENTNAME, "Test TIFF image" },
- { TIFFTAG_IMAGEDESCRIPTION, "Temporary test image" },
- { TIFFTAG_MAKE, "This is not scanned image" },
- { TIFFTAG_MODEL, "No scanner" },
- { TIFFTAG_PAGENAME, "Test page" },
- { TIFFTAG_SOFTWARE, "Libtiff library" },
- { TIFFTAG_DATETIME, "2004:09:10 16:09:00" },
- { TIFFTAG_ARTIST, "Andrey V. Kiselev" },
- { TIFFTAG_HOSTCOMPUTER, "Debian GNU/Linux (Sarge)" },
- { TIFFTAG_TARGETPRINTER, "No printer" },
- { TIFFTAG_PIXAR_TEXTUREFORMAT, "No texture" },
- { TIFFTAG_PIXAR_WRAPMODES, "No wrap" },
- { TIFFTAG_COPYRIGHT, "Copyright (c) 2004, Andrey Kiselev" }
-};
-#define NTAGS (sizeof (ascii_tags) / sizeof (ascii_tags[0]))
-
-const char *ink_names = "Red\0Green\0Blue";
-const int ink_names_size = 15;
-
-int
-main(int argc, char **argv)
-{
- TIFF *tif;
- int i;
- unsigned char buf[3] = { 0, 127, 255 };
- char *value;
-
- /* Test whether we can write tags. */
- tif = TIFFOpen(filename, "w");
- if (!tif) {
- fprintf (stderr, "Can't create test TIFF file %s.\n", filename);
- return 1;
- }
-
- if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, 1)) {
- fprintf (stderr, "Can't set ImageWidth tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, 1)) {
- fprintf (stderr, "Can't set ImageLength tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8)) {
- fprintf (stderr, "Can't set BitsPerSample tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 3)) {
- fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG)) {
- fprintf (stderr, "Can't set PlanarConfiguration tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB)) {
- fprintf (stderr, "Can't set PhotometricInterpretation tag.\n");
- goto failure;
- }
-
- for (i = 0; i < NTAGS; i++) {
- if (!TIFFSetField(tif, ascii_tags[i].tag,
- ascii_tags[i].value)) {
- fprintf(stderr, "Can't set tag %d.\n",
- (int)ascii_tags[i].tag);
- goto failure;
- }
- }
-
- /* InkNames tag has special form, so we handle it separately. */
- if (!TIFFSetField(tif, TIFFTAG_NUMBEROFINKS, 3)) {
- fprintf (stderr, "Can't set tag %d.\n", TIFFTAG_NUMBEROFINKS);
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_INKNAMES, ink_names_size, ink_names)) {
- fprintf (stderr, "Can't set tag %d.\n", TIFFTAG_INKNAMES);
- goto failure;
- }
-
- /* Write dummy pixel data. */
- if (!TIFFWriteScanline(tif, buf, 0, 0) < 0) {
- fprintf (stderr, "Can't write image data.\n");
- goto failure;
- }
-
- TIFFClose(tif);
-
- /* Ok, now test whether we can read written values. */
- tif = TIFFOpen(filename, "r");
- if (!tif) {
- fprintf (stderr, "Can't open test TIFF file %s.\n", filename);
- return 1;
- }
-
- for (i = 0; i < NTAGS; i++) {
- if (!TIFFGetField(tif, ascii_tags[i].tag, &value)
- || strcmp(value, ascii_tags[i].value)) {
- fprintf(stderr, "Can't get tag %d.\n",
- (int)ascii_tags[i].tag);
- goto failure;
- }
- }
-
- if (!TIFFGetField(tif, TIFFTAG_INKNAMES, &value)
- || memcmp(value, ink_names, ink_names_size)) {
- fprintf (stderr, "Can't get tag %d.\n", TIFFTAG_INKNAMES);
- goto failure;
- }
-
- TIFFClose(tif);
-
- /* All tests passed; delete file and exit with success status. */
- unlink(filename);
- return 0;
-
-failure:
- /* Something goes wrong; close file and return unsuccessful status. */
- TIFFClose(tif);
- unlink(filename);
- return 1;
-}
-
-/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/src/3rdparty/libtiff/test/check_tag.c b/src/3rdparty/libtiff/test/check_tag.c
deleted file mode 100644
index 7e7d08f2b9..0000000000
--- a/src/3rdparty/libtiff/test/check_tag.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/* $Id: check_tag.c,v 1.2 2006/03/23 14:54:02 dron Exp $ */
-
-/*
- * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library
- *
- * Module to test LONG tags read/write functions.
- */
-
-#include "tiffio.h"
-
-int
-CheckShortField(TIFF *tif, ttag_t field, uint16 value)
-{
- uint16 tmp = 0;
-
- if (!TIFFGetField(tif, field, &tmp)) {
- fprintf (stderr, "Problem fetching tag %lu.\n",
- (unsigned long) field);
- return -1;
- }
- if (tmp != value) {
- fprintf (stderr, "Wrong SHORT value fetched for tag %lu.\n",
- (unsigned long) field);
- return -1;
- }
-
- return 0;
-}
-
-int
-CheckLongField(TIFF *tif, ttag_t field, uint32 value)
-{
- uint32 tmp = 0;
-
- if (!TIFFGetField(tif, field, &tmp)) {
- fprintf (stderr, "Problem fetching tag %lu.\n",
- (unsigned long) field);
- return -1;
- }
- if (tmp != value) {
- fprintf (stderr, "Wrong LONG value fetched for tag %lu.\n",
- (unsigned long) field);
- return -1;
- }
-
- return 0;
-}
-
-
diff --git a/src/3rdparty/libtiff/test/long_tag.c b/src/3rdparty/libtiff/test/long_tag.c
deleted file mode 100644
index f70ea51a86..0000000000
--- a/src/3rdparty/libtiff/test/long_tag.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/* $Id: long_tag.c,v 1.3 2006/03/23 14:54:02 dron Exp $ */
-
-/*
- * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library
- *
- * Module to test LONG tags read/write functions.
- */
-
-#include "tif_config.h"
-
-#include <stdio.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#include "tiffio.h"
-
-extern int CheckLongField(TIFF *, ttag_t, uint32);
-
-const char *filename = "long_test.tiff";
-
-static struct Tags {
- ttag_t tag;
- short count;
- uint32 value;
-} long_tags[] = {
- { TIFFTAG_SUBFILETYPE, 1, FILETYPE_REDUCEDIMAGE|FILETYPE_PAGE|FILETYPE_MASK }
-};
-#define NTAGS (sizeof (long_tags) / sizeof (long_tags[0]))
-
-const uint32 width = 1;
-const uint32 length = 1;
-const uint32 rows_per_strip = 1;
-
-int
-main(int argc, char **argv)
-{
- TIFF *tif;
- int i;
- unsigned char buf[3] = { 0, 127, 255 };
-
- /* Test whether we can write tags. */
- tif = TIFFOpen(filename, "w");
- if (!tif) {
- fprintf (stderr, "Can't create test TIFF file %s.\n", filename);
- return 1;
- }
-
- if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) {
- fprintf (stderr, "Can't set ImageWidth tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) {
- fprintf (stderr, "Can't set ImageLength tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8)) {
- fprintf (stderr, "Can't set BitsPerSample tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 3)) {
- fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) {
- fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG)) {
- fprintf (stderr, "Can't set PlanarConfiguration tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB)) {
- fprintf (stderr, "Can't set PhotometricInterpretation tag.\n");
- goto failure;
- }
-
- for (i = 0; i < NTAGS; i++) {
- if (!TIFFSetField(tif, long_tags[i].tag,
- long_tags[i].value)) {
- fprintf(stderr, "Can't set tag %d.\n",
- (int)long_tags[i].tag);
- goto failure;
- }
- }
-
- /* Write dummy pixel data. */
- if (!TIFFWriteScanline(tif, buf, 0, 0) < 0) {
- fprintf (stderr, "Can't write image data.\n");
- goto failure;
- }
-
- TIFFClose(tif);
-
- /* Ok, now test whether we can read written values. */
- tif = TIFFOpen(filename, "r");
- if (!tif) {
- fprintf (stderr, "Can't open test TIFF file %s.\n", filename);
- return 1;
- }
-
- if (CheckLongField(tif, TIFFTAG_IMAGEWIDTH, width) < 0)
- goto failure;
-
- if (CheckLongField(tif, TIFFTAG_IMAGELENGTH, length) < 0)
- goto failure;
-
- if (CheckLongField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip) < 0)
- goto failure;
-
- for (i = 0; i < NTAGS; i++) {
- if (CheckLongField(tif, long_tags[i].tag,
- long_tags[i].value) < 0)
- goto failure;
- }
-
- TIFFClose(tif);
-
- /* All tests passed; delete file and exit with success status. */
- unlink(filename);
- return 0;
-
-failure:
- /* Something goes wrong; close file and return unsuccessful status. */
- TIFFClose(tif);
- unlink(filename);
- return 1;
-}
-
-/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/src/3rdparty/libtiff/test/short_tag.c b/src/3rdparty/libtiff/test/short_tag.c
deleted file mode 100644
index 94ef1fddba..0000000000
--- a/src/3rdparty/libtiff/test/short_tag.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/* $Id: short_tag.c,v 1.6 2006/03/23 14:54:02 dron Exp $ */
-
-/*
- * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library
- *
- * Module to test SHORT tags read/write functions.
- */
-
-#include "tif_config.h"
-
-#include <stdio.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#include "tiffio.h"
-
-extern int CheckShortField(TIFF *, ttag_t, uint16);
-
-const char *filename = "short_test.tiff";
-
-#define SPP 3 /* Samples per pixel */
-const uint16 width = 1;
-const uint16 length = 1;
-const uint16 bps = 8;
-const uint16 photometric = PHOTOMETRIC_RGB;
-const uint16 rows_per_strip = 1;
-const uint16 planarconfig = PLANARCONFIG_CONTIG;
-
-static struct SingleTags {
- ttag_t tag;
- uint16 value;
-} short_single_tags[] = {
- { TIFFTAG_COMPRESSION, COMPRESSION_NONE },
- { TIFFTAG_FILLORDER, FILLORDER_MSB2LSB },
- { TIFFTAG_ORIENTATION, ORIENTATION_BOTRIGHT },
- { TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH },
- { TIFFTAG_INKSET, INKSET_MULTIINK },
- { TIFFTAG_MINSAMPLEVALUE, 23 },
- { TIFFTAG_MAXSAMPLEVALUE, 241 },
- { TIFFTAG_NUMBEROFINKS, SPP },
- { TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT }
- /*{ TIFFTAG_IMAGEDEPTH, 1 },
- { TIFFTAG_TILEDEPTH, 1 }*/
-};
-#define NSINGLETAGS (sizeof(short_single_tags) / sizeof(short_single_tags[0]))
-
-int
-main(int argc, char **argv)
-{
- TIFF *tif;
- int i;
- unsigned char buf[3] = { 0, 127, 255 };
-
- /* Test whether we can write tags. */
- tif = TIFFOpen(filename, "w");
- if (!tif) {
- fprintf (stderr, "Can't create test TIFF file %s.\n", filename);
- return 1;
- }
-
- if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) {
- fprintf (stderr, "Can't set ImageWidth tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) {
- fprintf (stderr, "Can't set ImageLength tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps)) {
- fprintf (stderr, "Can't set BitsPerSample tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, SPP)) {
- fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) {
- fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, planarconfig)) {
- fprintf (stderr, "Can't set PlanarConfiguration tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric)) {
- fprintf (stderr, "Can't set PhotometricInterpretation tag.\n");
- goto failure;
- }
-
- for (i = 0; i < NSINGLETAGS; i++) {
- if (!TIFFSetField(tif, short_single_tags[i].tag,
- short_single_tags[i].value)) {
- fprintf(stderr, "Can't set tag %d.\n",
- (int)short_single_tags[i].tag);
- goto failure;
- }
- }
-
- /* Write dummy pixel data. */
- if (!TIFFWriteScanline(tif, buf, 0, 0) < 0) {
- fprintf (stderr, "Can't write image data.\n");
- goto failure;
- }
-
- TIFFClose(tif);
-
- /* Ok, now test whether we can read written values. */
- tif = TIFFOpen(filename, "r");
- if (!tif) {
- fprintf (stderr, "Can't open test TIFF file %s.\n", filename);
- return 1;
- }
-
- if (CheckLongField(tif, TIFFTAG_IMAGEWIDTH, width) < 0)
- goto failure;
-
- if (CheckLongField(tif, TIFFTAG_IMAGELENGTH, length) < 0)
- goto failure;
-
- if (CheckShortField(tif, TIFFTAG_BITSPERSAMPLE, bps) < 0)
- goto failure;
-
- if (CheckShortField(tif, TIFFTAG_PHOTOMETRIC, photometric) < 0)
- goto failure;
-
- if (CheckShortField(tif, TIFFTAG_SAMPLESPERPIXEL, SPP) < 0)
- goto failure;
-
- if (CheckLongField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip) < 0)
- goto failure;
-
- if (CheckShortField(tif, TIFFTAG_PLANARCONFIG, planarconfig) < 0)
- goto failure;
-
- for (i = 0; i < NSINGLETAGS; i++) {
- if (CheckShortField(tif, short_single_tags[i].tag,
- short_single_tags[i].value) < 0)
- goto failure;
- }
-
- TIFFClose(tif);
-
- /* All tests passed; delete file and exit with success status. */
- unlink(filename);
- return 0;
-
-failure:
- /* Something goes wrong; close file and return unsuccessful status. */
- TIFFClose(tif);
- unlink(filename);
- return 1;
-}
-
-/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/src/3rdparty/libtiff/test/strip.c b/src/3rdparty/libtiff/test/strip.c
deleted file mode 100644
index e722647daf..0000000000
--- a/src/3rdparty/libtiff/test/strip.c
+++ /dev/null
@@ -1,289 +0,0 @@
-/* $Id: strip.c,v 1.3 2006/03/23 14:54:02 dron Exp $ */
-
-/*
- * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library
- *
- * Functions to test strip interface of libtiff.
- */
-
-#include <stdio.h>
-#include <string.h>
-
-#include "tiffio.h"
-
-int
-write_strips(TIFF *tif, const tdata_t array, const tsize_t size)
-{
- tstrip_t strip, nstrips;
- tsize_t stripsize, offset;
-
- stripsize = TIFFStripSize(tif);
- if (!stripsize) {
- fprintf (stderr, "Wrong size of strip.\n");
- return -1;
- }
-
- nstrips = TIFFNumberOfStrips(tif);
- for (offset = 0, strip = 0;
- offset < size && strip < nstrips;
- offset+=stripsize, strip++) {
- /*
- * Properly write last strip.
- */
- tsize_t bufsize = size - offset;
- if (bufsize > stripsize)
- bufsize = stripsize;
-
- if (TIFFWriteEncodedStrip(tif, strip, (char *)array + offset,
- bufsize) != bufsize) {
- fprintf (stderr, "Can't write strip %lu.\n",
- (unsigned long)strip);
- return -1;
- }
- }
-
- return 0;
-}
-
-int
-read_strips(TIFF *tif, const tdata_t array, const tsize_t size)
-{
- tstrip_t strip, nstrips;
- tsize_t stripsize, offset;
- tdata_t buf = NULL;
-
- stripsize = TIFFStripSize(tif);
- if (!stripsize) {
- fprintf (stderr, "Wrong size of strip.\n");
- return -1;
- }
-
- buf = _TIFFmalloc(stripsize);
- if (!buf) {
- fprintf (stderr, "Can't allocate space for strip buffer.\n");
- return -1;
- }
-
- nstrips = TIFFNumberOfStrips(tif);
- for (offset = 0, strip = 0;
- offset < size && strip < nstrips;
- offset+=stripsize, strip++) {
- /*
- * Properly read last strip.
- */
- tsize_t bufsize = size - offset;
- if (bufsize > stripsize)
- bufsize = stripsize;
-
- if (TIFFReadEncodedStrip(tif, strip, buf, -1) != bufsize) {
- fprintf (stderr, "Can't read strip %lu.\n",
- (unsigned long)strip);
- return -1;
- }
- if (memcmp(buf, (char *)array + offset, bufsize) != 0) {
- fprintf (stderr, "Wrong data read for strip %lu.\n",
- (unsigned long)strip);
- _TIFFfree(buf);
- return -1;
- }
- }
-
- _TIFFfree(buf);
-
- return 0;
-}
-
-int
-create_image_striped(const char *name, uint32 width, uint32 length,
- uint32 rowsperstrip, uint16 compression,
- uint16 spp, uint16 bps, uint16 photometric,
- uint16 sampleformat, uint16 planarconfig,
- const tdata_t array, const tsize_t size)
-{
- TIFF *tif;
-
- /* Test whether we can write tags. */
- tif = TIFFOpen(name, "w");
- if (!tif)
- goto openfailure;
-
- if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) {
- fprintf (stderr, "Can't set ImageWidth tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) {
- fprintf (stderr, "Can't set ImageLength tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps)) {
- fprintf (stderr, "Can't set BitsPerSample tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, spp)) {
- fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip)) {
- fprintf (stderr, "Can't set RowsPerStrip tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, planarconfig)) {
- fprintf (stderr, "Can't set PlanarConfiguration tag.\n");
- goto failure;
- }
- if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric)) {
- fprintf (stderr, "Can't set PhotometricInterpretation tag.\n");
- goto failure;
- }
-
- if (write_strips(tif, array, size) < 0) {
- fprintf (stderr, "Can't write image data.\n");
- goto failure;
- }
-
- TIFFClose(tif);
- return 0;
-
-failure:
- TIFFClose(tif);
-openfailure:
- fprintf (stderr, "Can't create test TIFF file %s:\n"
-" ImageWidth=%ld, ImageLength=%ld, RowsPerStrip=%ld, Compression=%d,\n"
-" BitsPerSample=%d, SamplesPerPixel=%d, SampleFormat=%d,\n"
-" PlanarConfiguration=%d, PhotometricInterpretation=%d.\n",
- name, width, length, rowsperstrip, compression,
- bps, spp, sampleformat, planarconfig,
- photometric);
- return -1;
-}
-
-int
-read_image_striped(const char *name, uint32 width, uint32 length,
- uint32 rowsperstrip, uint16 compression,
- uint16 spp, uint16 bps, uint16 photometric,
- uint16 sampleformat, uint16 planarconfig,
- const tdata_t array, const tsize_t size)
-{
- TIFF *tif;
- uint16 value_u16;
- uint32 value_u32;
-
- /* Test whether we can read written values. */
- tif = TIFFOpen(name, "r");
- if (!tif)
- goto openfailure;
-
- if (TIFFIsTiled(tif)) {
- fprintf (stderr, "Can't read image %s, it is tiled.\n",
- name);
- goto failure;
- }
- if (!TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &value_u32)
- || value_u32 != width) {
- fprintf (stderr, "Can't get tag %d.\n", TIFFTAG_IMAGEWIDTH);
- goto failure;
- }
- if (!TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &value_u32)
- || value_u32 != length) {
- fprintf (stderr, "Can't get tag %d.\n", TIFFTAG_IMAGELENGTH);
- goto failure;
- }
- if (!TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &value_u16)
- || value_u16 != bps) {
- fprintf (stderr, "Can't get tag %d.\n", TIFFTAG_BITSPERSAMPLE);
- goto failure;
- }
- if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &value_u16)
- || value_u16 != photometric) {
- fprintf (stderr, "Can't get tag %d.\n", TIFFTAG_PHOTOMETRIC);
- goto failure;
- }
- if (!TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &value_u16)
- || value_u16 != spp) {
- fprintf (stderr, "Can't get tag %d.\n", TIFFTAG_SAMPLESPERPIXEL);
- goto failure;
- }
- if (!TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &value_u32)
- || value_u32 != rowsperstrip) {
- fprintf (stderr, "Can't get tag %d.\n", TIFFTAG_ROWSPERSTRIP);
- goto failure;
- }
- if (!TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &value_u16)
- || value_u16 != planarconfig) {
- fprintf (stderr, "Can't get tag %d.\n", TIFFTAG_PLANARCONFIG);
- goto failure;
- }
-
- if (read_strips(tif, array, size) < 0) {
- fprintf (stderr, "Can't read image data.\n");
- goto failure;
- }
-
- TIFFClose(tif);
- return 0;
-
-failure:
- TIFFClose(tif);
-openfailure:
- fprintf (stderr, "Can't read test TIFF file %s:\n"
-" ImageWidth=%ld, ImageLength=%ld, RowsPerStrip=%ld, Compression=%d,\n"
-" BitsPerSample=%d, SamplesPerPixel=%d, SampleFormat=%d,\n"
-" PlanarConfiguration=%d, PhotometricInterpretation=%d.\n",
- name, width, length, rowsperstrip, compression,
- bps, spp, sampleformat, planarconfig,
- photometric);
- return -1;
-}
-
-int
-write_scanlines(TIFF *tif, const tdata_t array, const tsize_t size)
-{
- uint32 length, row;
- tsize_t scanlinesize, offset;
-
- if (!TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &length)) {
- fprintf (stderr, "Can't get tag %d.\n", TIFFTAG_IMAGELENGTH);
- return -1;
- }
-
- scanlinesize = TIFFScanlineSize(tif);
- if (!scanlinesize) {
- fprintf (stderr, "Wrong size of scanline.\n");
- return -1;
- }
-
- for (offset = 0, row = 0; row < length; offset+=scanlinesize, row++) {
- if (TIFFWriteScanline(tif, (char *)array + offset, row, 0) < 0) {
- fprintf (stderr,
- "Can't write image data at row %lu.\n", row);
- return -1;
- }
- }
-
- return 0;
-}
-
-/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/src/3rdparty/libtiff/test/strip_rw.c b/src/3rdparty/libtiff/test/strip_rw.c
deleted file mode 100644
index d93d865940..0000000000
--- a/src/3rdparty/libtiff/test/strip_rw.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/* $Id: strip_rw.c,v 1.5 2006/03/23 14:54:02 dron Exp $ */
-
-/*
- * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library
- *
- * Test libtiff input/output routines.
- */
-
-#include "tif_config.h"
-
-#include <stdio.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#include "tiffio.h"
-#include "test_arrays.h"
-
-extern int
-create_image_striped(const char *, uint32, uint32, uint32, uint16, uint16,
- uint16, uint16, uint16, uint16, const tdata_t,
- const tsize_t);
-extern int
-read_image_striped(const char *, uint32, uint32, uint32, uint16, uint16,
- uint16, uint16, uint16, uint16, const tdata_t,
- const tsize_t);
-
-const char *filename = "strip_test.tiff";
-
-int
-main(int argc, char **argv)
-{
- uint32 rowsperstrip;
- uint16 compression;
- uint16 spp, bps, photometric, sampleformat, planarconfig;
-
- /*
- * Test two special cases: image consisting from single line and image
- * consisting from single column.
- */
- rowsperstrip = 1;
- compression = COMPRESSION_NONE;
- spp = 1;
- bps = 8;
- photometric = PHOTOMETRIC_MINISBLACK;
- sampleformat = SAMPLEFORMAT_UINT;
- planarconfig = PLANARCONFIG_CONTIG;
-
- if (create_image_striped(filename, XSIZE * YSIZE, 1, rowsperstrip,
- compression, spp, bps, photometric,
- sampleformat, planarconfig,
- (const tdata_t) byte_array1, byte_array1_size) < 0) {
- fprintf (stderr, "Can't create TIFF file %s.\n", filename);
- goto failure;
- }
- if (read_image_striped(filename, XSIZE * YSIZE, 1, rowsperstrip,
- compression, spp, bps, photometric,
- sampleformat, planarconfig,
- (const tdata_t) byte_array1, byte_array1_size) < 0) {
- fprintf (stderr, "Can't read TIFF file %s.\n", filename);
- goto failure;
- }
- unlink(filename);
-
- if (create_image_striped(filename, 1, XSIZE * YSIZE, rowsperstrip,
- compression, spp, bps, photometric,
- sampleformat, planarconfig,
- (const tdata_t) byte_array1, byte_array1_size) < 0) {
- fprintf (stderr, "Can't create TIFF file %s.\n", filename);
- goto failure;
- }
- if (read_image_striped(filename, 1, XSIZE * YSIZE, rowsperstrip,
- compression, spp, bps, photometric,
- sampleformat, planarconfig,
- (const tdata_t) byte_array1, byte_array1_size) < 0) {
- fprintf (stderr, "Can't read TIFF file %s.\n", filename);
- goto failure;
- }
- unlink(filename);
-
- /*
- * Test one-channel image with different parameters.
- */
- rowsperstrip = 1;
- spp = 1;
- bps = 8;
- photometric = PHOTOMETRIC_MINISBLACK;
- sampleformat = SAMPLEFORMAT_UINT;
- planarconfig = PLANARCONFIG_CONTIG;
-
- if (create_image_striped(filename, XSIZE, YSIZE, rowsperstrip,
- compression, spp, bps, photometric,
- sampleformat, planarconfig,
- (const tdata_t) byte_array1, byte_array1_size) < 0) {
- fprintf (stderr, "Can't create TIFF file %s.\n", filename);
- goto failure;
- }
- if (read_image_striped(filename, XSIZE, YSIZE, rowsperstrip,
- compression, spp, bps, photometric,
- sampleformat, planarconfig,
- (const tdata_t) byte_array1, byte_array1_size) < 0) {
- fprintf (stderr, "Can't read TIFF file %s.\n", filename);
- goto failure;
- }
- unlink(filename);
-
- rowsperstrip = YSIZE;
- if (create_image_striped(filename, XSIZE, YSIZE, rowsperstrip,
- compression, spp, bps, photometric,
- sampleformat, planarconfig,
- (const tdata_t) byte_array1, byte_array1_size) < 0) {
- fprintf (stderr, "Can't create TIFF file %s.\n", filename);
- goto failure;
- }
- if (read_image_striped(filename, XSIZE, YSIZE, rowsperstrip,
- compression, spp, bps, photometric,
- sampleformat, planarconfig,
- (const tdata_t) byte_array1, byte_array1_size) < 0) {
- fprintf (stderr, "Can't read TIFF file %s.\n", filename);
- goto failure;
- }
- unlink(filename);
-
- return 0;
-
-failure:
- unlink(filename);
- return 1;
-}
-
-/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/src/3rdparty/libtiff/test/test_arrays.c b/src/3rdparty/libtiff/test/test_arrays.c
deleted file mode 100644
index 83767662b3..0000000000
--- a/src/3rdparty/libtiff/test/test_arrays.c
+++ /dev/null
@@ -1,829 +0,0 @@
-/* $Id: test_arrays.c,v 1.3 2006/03/23 14:54:02 dron Exp $ */
-
-/*
- * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library
- *
- * Numerical arrays used to test libtiff's read/write functions.
- */
-
-#include <stddef.h>
-
-#include "test_arrays.h"
-
-const unsigned char byte_array1[XSIZE * YSIZE]=
-{
-86, 84, 86, 90, 89, 85, 90, 78, 77, 79, 75, 77, 79, 86,
-87, 83, 82, 87, 89, 88, 86, 87, 88, 87, 81, 84, 85, 85,
-84, 86, 88, 91, 96, 95, 97, 95, 89,
-85, 82, 81, 88, 89, 85, 89, 83, 74, 79, 76, 77, 80, 87,
-87, 84, 84, 88, 90, 89, 87, 85, 87, 88, 83, 80, 82, 84,
-85, 87, 90, 95, 96, 95, 95, 92, 90,
-85, 81, 79, 84, 90, 87, 88, 88, 73, 79, 75, 76, 79, 88,
-88, 87, 85, 90, 92, 89, 88, 88, 87, 86, 84, 82, 82, 83,
-87, 89, 93, 94, 93, 93, 92, 92, 96,
-85, 82, 76, 80, 88, 89, 88, 89, 73, 80, 75, 75, 77, 89,
-92, 93, 91, 89, 94, 92, 90, 89, 88, 84, 84, 82, 82, 85,
-88, 91, 94, 93, 93, 89, 90, 96, 96,
-87, 83, 75, 77, 83, 89, 90, 90, 74, 78, 76, 76, 76, 84,
-94, 100, 89, 92, 94, 92, 90, 89, 90, 85, 84, 83, 83, 87,
-91, 92, 88, 92, 91, 88, 90, 97, 95,
-89, 83, 74, 77, 82, 84, 90, 92, 78, 72, 76, 75, 75, 81,
-95, 101, 95, 92, 95, 93, 90, 89, 90, 87, 86, 84, 86, 88,
-90, 90, 87, 90, 89, 90, 89, 98, 98,
-92, 84, 75, 76, 81, 81, 86, 91, 81, 72, 74, 74, 75, 81,
-104, 108, 93, 92, 95, 94, 88, 87, 89, 87, 85, 85, 88, 89,
-93, 91, 88, 88, 91, 88, 91, 106, 108,
-93, 89, 78, 75, 77, 80, 85, 86, 85, 73, 72, 73, 74, 79,
-102, 101, 88, 92, 93, 91, 87, 87, 86, 87, 85, 86, 88, 89,
-94, 94, 90, 88, 85, 86, 98, 109, 113,
-92, 93, 83, 76, 74, 79, 84, 85, 81, 75, 72, 73, 74, 79,
-105, 86, 86, 92, 96, 98, 104, 86, 85, 85, 85, 88, 90, 90,
-93, 92, 88, 87, 86, 89, 97, 110, 109,
-92, 93, 89, 78, 79, 78, 89, 84, 75, 76, 73, 72, 73, 78,
-105, 83, 82, 88, 83, 107, 95, 84, 85, 84, 86, 87, 90, 91,
-92, 90, 88, 87, 89, 90, 91, 99, 107,
-96, 94, 91, 82, 84, 86, 91, 87, 75, 74, 73, 73, 73, 77,
-101, 86, 83, 89, 92, 99, 98, 86, 86, 87, 83, 84, 89, 89,
-92, 92, 92, 96, 96, 87, 91, 90, 98,
-96, 97, 94, 87, 88, 89, 92, 90, 79, 72, 73, 73, 74, 77,
-100, 92, 84, 86, 98, 100, 92, 87, 88, 88, 84, 83, 87, 89,
-91, 94, 94, 96, 93, 87, 87, 84, 109,
-93, 92, 95, 92, 94, 93, 92, 91, 82, 72, 73, 74, 74, 76,
-95, 89, 85, 84, 102, 89, 85, 88, 94, 86, 82, 83, 82, 91,
-94, 97, 90, 92, 85, 90, 85, 79, 125,
-89, 96, 94, 90, 94, 95, 91, 91, 85, 76, 72, 73, 74, 75,
-88, 100, 83, 84, 84, 83, 85, 88, 90, 85, 84, 83, 84, 88,
-92, 93, 90, 89, 84, 90, 94, 79, 139,
-93, 97, 97, 93, 92, 95, 91, 90, 87, 81, 74, 73, 73, 74,
-85, 97, 95, 95, 89, 86, 86, 92, 87, 85, 84, 90, 86, 85,
-91, 87, 87, 86, 93, 124, 140, 106, 143,
-101, 95, 97, 97, 96, 95, 84, 88, 87, 82, 78, 73, 73, 74,
-82, 92, 104, 95, 88, 89, 87, 89, 86, 85, 86, 87, 87, 81,
-81, 83, 91, 106, 131, 153, 151, 123, 133,
-99, 101, 102, 99, 96, 90, 83, 82, 85, 84, 79, 76, 74, 74,
-78, 81, 89, 96, 90, 93, 88, 88, 86, 88, 89, 95, 89, 82,
-81, 85, 104, 118, 141, 160, 129, 137, 147,
-103, 104, 98, 99, 90, 88, 81, 76, 81, 83, 79, 77, 75, 75,
-75, 76, 80, 90, 94, 87, 86, 87, 92, 85, 85, 85, 87, 87,
-89, 91, 112, 115, 145, 154, 145, 141, 147,
-106, 103, 100, 99, 92, 82, 78, 75, 78, 81, 79, 77, 77, 78,
-78, 76, 77, 81, 89, 87, 84, 84, 90, 86, 85, 84, 80, 85,
-97, 104, 119, 119, 149, 147, 144, 146, 152,
-107, 105, 103, 100, 93, 83, 78, 74, 74, 79, 78, 77, 76, 78,
-80, 79, 76, 78, 83, 84, 81, 81, 84, 83, 82, 78, 78, 85,
-86, 97, 105, 114, 145, 146, 148, 147, 150,
-107, 105, 103, 97, 92, 84, 72, 72, 75, 77, 76, 75, 76, 79,
-80, 80, 77, 76, 82, 81, 80, 81, 80, 80, 80, 77, 74, 74,
-73, 77, 91, 110, 132, 141, 152, 152, 145,
-107, 105, 103, 96, 92, 86, 73, 71, 73, 75, 75, 76, 76, 78,
-80, 80, 80, 98, 80, 80, 82, 82, 80, 78, 76, 73, 71, 72,
-71, 74, 80, 108, 119, 136, 158, 142, 137,
-107, 104, 101, 97, 85, 87, 75, 70, 70, 74, 74, 75, 77, 78,
-80, 82, 110, 117, 110, 78, 81, 83, 81, 78, 76, 73, 71, 69,
-68, 71, 74, 95, 120, 138, 148, 143, 139
-};
-
-const size_t byte_array1_size = sizeof(byte_array1);
-
-const unsigned char byte_array2[YSIZE * XSIZE] =
-{
-77, 73, 76, 80, 79, 75, 82, 65, 62, 64, 59, 59, 61, 72,
-70, 67, 65, 70, 71, 70, 68, 66, 65, 67, 66, 66, 66, 66,
-66, 66, 66, 66, 66, 65, 63, 63, 62,
-75, 71, 71, 79, 81, 75, 81, 73, 59, 65, 60, 60, 64, 73,
-73, 68, 66, 70, 72, 71, 68, 66, 66, 67, 66, 66, 66, 67,
-67, 67, 66, 67, 66, 64, 63, 63, 63,
-76, 71, 66, 73, 81, 78, 80, 79, 59, 66, 60, 59, 62, 74,
-74, 71, 67, 70, 73, 71, 68, 66, 65, 65, 66, 66, 67, 67,
-67, 67, 67, 67, 66, 64, 64, 64, 64,
-76, 72, 64, 68, 79, 81, 80, 80, 59, 68, 60, 59, 60, 75,
-75, 73, 67, 68, 73, 72, 68, 66, 65, 63, 67, 67, 67, 67,
-68, 67, 67, 66, 65, 64, 65, 65, 65,
-79, 72, 63, 66, 73, 80, 83, 82, 60, 65, 61, 61, 60, 66,
-75, 75, 65, 70, 73, 72, 68, 66, 65, 64, 68, 67, 68, 68,
-68, 67, 67, 66, 65, 65, 65, 66, 65,
-81, 73, 62, 65, 72, 74, 82, 85, 66, 59, 62, 60, 60, 63,
-75, 76, 68, 69, 72, 72, 68, 66, 66, 65, 67, 68, 68, 68,
-68, 68, 66, 66, 64, 66, 65, 66, 66,
-84, 74, 64, 64, 70, 71, 78, 84, 70, 58, 60, 59, 59, 63,
-75, 80, 73, 67, 72, 72, 68, 66, 66, 65, 66, 68, 68, 68,
-68, 68, 66, 65, 65, 65, 66, 67, 68,
-87, 81, 66, 63, 65, 68, 76, 76, 75, 59, 58, 59, 59, 60,
-71, 92, 65, 64, 74, 72, 69, 67, 65, 65, 65, 68, 69, 68,
-69, 67, 65, 65, 65, 65, 67, 68, 69,
-86, 86, 73, 64, 62, 67, 75, 76, 70, 61, 58, 58, 59, 60,
-81, 68, 59, 63, 74, 90, 99, 67, 65, 65, 64, 67, 68, 68,
-68, 67, 65, 65, 66, 65, 66, 68, 68,
-85, 85, 80, 66, 67, 67, 81, 74, 62, 63, 59, 58, 58, 60,
-93, 61, 59, 59, 68, 115, 76, 67, 66, 64, 64, 66, 68, 68,
-68, 66, 65, 65, 66, 65, 64, 65, 69,
-90, 87, 83, 71, 74, 77, 83, 79, 63, 60, 59, 59, 58, 58,
-90, 61, 59, 59, 67, 80, 71, 68, 66, 64, 63, 63, 68, 68,
-68, 66, 65, 66, 67, 65, 64, 62, 87,
-91, 92, 86, 76, 78, 81, 85, 82, 67, 59, 59, 59, 59, 60,
-88, 72, 59, 60, 74, 80, 70, 67, 66, 64, 62, 60, 65, 68,
-67, 66, 65, 67, 66, 64, 62, 59, 111,
-84, 84, 87, 85, 87, 85, 84, 84, 72, 59, 59, 59, 59, 59,
-73, 71, 62, 59, 100, 70, 70, 67, 66, 64, 60, 58, 58, 67,
-68, 66, 65, 66, 64, 63, 59, 56, 131,
-80, 90, 87, 83, 88, 89, 84, 83, 76, 64, 59, 59, 59, 58,
-59, 97, 64, 62, 71, 68, 70, 73, 66, 63, 61, 58, 58, 62,
-67, 66, 64, 65, 63, 63, 61, 57, 149,
-86, 91, 92, 87, 85, 88, 83, 81, 78, 69, 61, 59, 59, 59,
-59, 61, 83, 72, 67, 67, 69, 69, 66, 64, 61, 72, 56, 57,
-64, 64, 64, 64, 65, 115, 150, 93, 151,
-97, 89, 91, 92, 89, 88, 74, 80, 78, 71, 65, 59, 58, 59,
-58, 59, 71, 72, 67, 70, 70, 69, 67, 64, 63, 66, 56, 54,
-57, 59, 64, 87, 139, 162, 160, 128, 141,
-94, 96, 97, 94, 89, 82, 71, 70, 76, 73, 67, 61, 59, 59,
-58, 59, 61, 71, 67, 75, 70, 68, 70, 65, 63, 63, 59, 56,
-54, 55, 90, 121, 149, 168, 138, 144, 157,
-99, 100, 93, 93, 82, 80, 70, 62, 70, 72, 67, 63, 60, 60,
-58, 58, 60, 68, 70, 70, 69, 68, 79, 68, 64, 62, 60, 59,
-57, 57, 88, 120, 151, 162, 154, 149, 155,
-103, 99, 95, 94, 84, 73, 67, 62, 65, 69, 67, 64, 63, 64,
-63, 59, 60, 65, 71, 69, 69, 67, 78, 65, 63, 61, 59, 61,
-60, 68, 100, 128, 155, 155, 152, 155, 164,
-104, 102, 99, 95, 86, 74, 67, 61, 61, 66, 65, 63, 63, 64,
-65, 63, 60, 63, 70, 69, 67, 67, 67, 65, 62, 60, 58, 57,
-62, 58, 71, 117, 150, 154, 157, 155, 163,
-104, 101, 99, 91, 84, 74, 59, 59, 62, 64, 63, 61, 62, 64,
-64, 64, 61, 60, 69, 68, 67, 69, 67, 65, 62, 59, 58, 57,
-57, 56, 59, 104, 137, 147, 159, 161, 158,
-104, 101, 99, 90, 85, 77, 60, 57, 60, 62, 62, 62, 63, 64,
-65, 65, 66, 100, 67, 67, 69, 69, 67, 65, 63, 60, 58, 56,
-54, 55, 56, 77, 122, 142, 166, 157, 150,
-104, 101, 97, 92, 77, 79, 64, 57, 57, 62, 62, 62, 64, 65,
-66, 65, 115, 138, 129, 64, 68, 70, 68, 66, 64, 60, 58, 56,
-53, 53, 56, 62, 115, 143, 157, 156, 159
-};
-
-const size_t byte_array2_size = sizeof(byte_array2);
-
-const unsigned char byte_array3[YSIZE * XSIZE] =
-{
-211, 221, 216, 201, 205, 216, 195, 236, 244, 237, 250, 250, 248, 218,
-223, 232, 236, 224, 221, 221, 227, 231, 232, 227, 229, 227, 227, 225,
-227, 225, 226, 226, 226, 228, 234, 234, 234, 216, 226, 228, 205, 200,
-214, 198, 215, 250, 233, 247, 250, 242, 219, 220, 229, 235, 225, 217,
-220, 227, 232, 230, 228, 229, 228, 227, 224, 225, 223, 226, 225, 226,
-230, 233, 233, 234, 213, 227, 237, 220, 200, 204, 202, 201, 248, 231,
-246, 250, 245, 214, 215, 223, 232, 225, 218, 218, 225, 230, 232, 231,
-229, 227, 225, 224, 223, 226, 224, 225, 228, 229, 230, 232, 231, 215,
-223, 242, 233, 206, 200, 201, 197, 250, 227, 250, 249, 248, 211, 212,
-216, 233, 229, 216, 218, 225, 230, 232, 237, 226, 224, 224, 223, 225,
-225, 224, 225, 228, 229, 231, 229, 231, 208, 220, 247, 238, 221, 202,
-194, 194, 245, 237, 247, 247, 249, 234, 210, 212, 237, 222, 219, 217,
-226, 229, 232, 235, 222, 222, 223, 223, 223, 224, 224, 227, 226, 229,
-229, 228, 231, 200, 221, 247, 239, 224, 217, 196, 189, 229, 248, 245,
-248, 250, 241, 210, 210, 230, 225, 218, 218, 224, 230, 230, 229, 224,
-222, 222, 222, 222, 223, 225, 226, 231, 226, 228, 229, 230, 191, 216,
-246, 245, 226, 228, 207, 191, 221, 251, 248, 249, 251, 245, 214, 214,
-233, 229, 217, 217, 224, 229, 230, 229, 225, 220, 223, 221, 222, 224,
-224, 227, 230, 227, 226, 229, 230, 187, 199, 238, 248, 242, 231, 213,
-211, 209, 246, 248, 251, 251, 250, 226, 215, 236, 237, 217, 215, 222,
-226, 229, 229, 227, 222, 222, 223, 222, 225, 227, 228, 226, 227, 228,
-228, 230, 188, 189, 221, 243, 247, 237, 215, 209, 223, 241, 248, 248,
-250, 248, 228, 234, 251, 239, 219, 210, 205, 224, 229, 228, 230, 221,
-223, 223, 222, 226, 229, 228, 224, 227, 229, 230, 232, 190, 190, 201,
-235, 236, 238, 198, 214, 243, 238, 248, 248, 250, 249, 215, 244, 250,
-250, 240, 168, 220, 224, 228, 230, 231, 226, 221, 224, 223, 226, 230,
-227, 226, 226, 230, 233, 234, 179, 185, 195, 224, 215, 210, 195, 204,
-239, 245, 250, 250, 252, 254, 216, 243, 249, 249, 233, 210, 215, 223,
-227, 230, 234, 234, 224, 223, 223, 227, 230, 226, 226, 228, 231, 235,
-212, 178, 174, 190, 211, 207, 199, 189, 194, 230, 250, 250, 250, 253,
-253, 222, 225, 250, 248, 218, 216, 217, 225, 226, 232, 239, 242, 229,
-223, 224, 229, 230, 225, 228, 230, 236, 241, 183, 194, 194, 185, 190,
-185, 190, 191, 191, 219, 250, 251, 250, 253, 254, 241, 225, 246, 249,
-198, 217, 220, 224, 225, 234, 241, 242, 246, 224, 223, 227, 229, 227,
-228, 234, 237, 245, 149, 203, 178, 182, 193, 185, 179, 191, 194, 211,
-236, 252, 252, 254, 254, 253, 192, 240, 244, 235, 224, 220, 229, 224,
-236, 239, 243, 244, 236, 224, 229, 230, 229, 231, 230, 233, 244, 128,
-188, 177, 171, 184, 191, 182, 196, 197, 208, 224, 247, 253, 255, 252,
-250, 248, 226, 216, 228, 230, 220, 220, 227, 234, 237, 231, 247, 244,
-231, 231, 229, 228, 229, 182, 128, 196, 118, 160, 182, 174, 172, 179,
-183, 216, 203, 206, 220, 236, 253, 254, 253, 253, 249, 225, 219, 232,
-230, 220, 224, 227, 233, 237, 234, 244, 250, 245, 240, 224, 212, 174,
-123, 124, 176, 127, 171, 163, 161, 167, 177, 198, 221, 228, 212, 215,
-233, 245, 252, 255, 253, 252, 251, 223, 231, 216, 222, 227, 231, 231,
-234, 227, 238, 245, 249, 244, 210, 177, 124, 129, 134, 124, 113, 156,
-155, 172, 168, 197, 201, 224, 247, 224, 219, 233, 242, 249, 250, 252,
-254, 252, 230, 230, 224, 224, 225, 225, 227, 232, 232, 235, 239, 239,
-241, 213, 178, 131, 128, 128, 120, 114, 149, 157, 165, 168, 191, 218,
-231, 246, 237, 226, 234, 241, 243, 239, 244, 252, 249, 237, 225, 226,
-224, 227, 220, 229, 235, 235, 239, 238, 236, 230, 204, 177, 125, 131,
-127, 117, 111, 146, 151, 158, 166, 187, 215, 230, 246, 246, 231, 238,
-243, 246, 243, 241, 244, 253, 245, 226, 226, 229, 229, 229, 231, 236,
-238, 241, 240, 241, 235, 224, 188, 134, 123, 127, 116, 116, 144, 151,
-158, 173, 190, 214, 251, 250, 243, 236, 242, 249, 246, 241, 241, 244,
-251, 251, 228, 230, 230, 226, 232, 231, 236, 241, 243, 244, 243, 243,
-235, 200, 150, 128, 122, 119, 117, 144, 151, 156, 176, 190, 207, 246,
-253, 244, 239, 244, 246, 244, 242, 240, 243, 249, 198, 239, 234, 226,
-226, 228, 234, 238, 241, 244, 245, 247, 250, 244, 219, 182, 138, 118,
-118, 116, 143, 150, 162, 173, 208, 205, 238, 253, 251, 241, 244, 244,
-242, 243, 238, 246, 193, 146, 173, 246, 231, 223, 230, 232, 236, 240,
-245, 247, 252, 252, 245, 233, 195, 138, 114, 118, 108
-};
-
-const size_t byte_array3_size = sizeof(byte_array3);
-
-const float array_float1[YSIZE * XSIZE] =
-{
-234.866, 229.404, 234.866, 245.790, 243.059, 232.135, 245.790, 213.018,
-210.287, 215.749, 204.825, 210.287, 215.749, 234.866, 237.597, 226.673,
-223.942, 237.597, 243.059, 240.328, 234.866, 237.597, 240.328, 237.597,
-221.211, 229.404, 232.135, 232.135, 229.404, 234.866, 240.328, 248.521,
-262.176, 259.445, 264.907, 259.445, 243.059,
-232.135, 223.942, 221.211, 240.328, 243.059, 232.135, 243.059, 226.673,
-202.094, 215.749, 207.556, 210.287, 218.480, 237.597, 237.597, 229.404,
-229.404, 240.328, 245.790, 243.059, 237.597, 232.135, 237.597, 240.328,
-226.673, 218.480, 223.942, 229.404, 232.135, 237.597, 245.790, 259.445,
-262.176, 259.445, 259.445, 251.252, 245.790,
-232.135, 221.211, 215.749, 229.404, 245.790, 237.597, 240.328, 240.328,
-199.363, 215.749, 204.825, 207.556, 215.749, 240.328, 240.328, 237.597,
-232.135, 245.790, 251.252, 243.059, 240.328, 240.328, 237.597, 234.866,
-229.404, 223.942, 223.942, 226.673, 237.597, 243.059, 253.983, 256.714,
-253.983, 253.983, 251.252, 251.252, 262.176,
-232.135, 223.942, 207.556, 218.480, 240.328, 243.059, 240.328, 243.059,
-199.363, 218.480, 204.825, 204.825, 210.287, 243.059, 251.252, 253.983,
-248.521, 243.059, 256.714, 251.252, 245.790, 243.059, 240.328, 229.404,
-229.404, 223.942, 223.942, 232.135, 240.328, 248.521, 256.714, 253.983,
-253.983, 243.059, 245.790, 262.176, 262.176,
-237.597, 226.673, 204.825, 210.287, 226.673, 243.059, 245.790, 245.790,
-202.094, 213.018, 207.556, 207.556, 207.556, 229.404, 256.714, 273.100,
-243.059, 251.252, 256.714, 251.252, 245.790, 243.059, 245.790, 232.135,
-229.404, 226.673, 226.673, 237.597, 248.521, 251.252, 240.328, 251.252,
-248.521, 240.328, 245.790, 264.907, 259.445,
-243.059, 226.673, 202.094, 210.287, 223.942, 229.404, 245.790, 251.252,
-213.018, 196.632, 207.556, 204.825, 204.825, 221.211, 259.445, 275.831,
-259.445, 251.252, 259.445, 253.983, 245.790, 243.059, 245.790, 237.597,
-234.866, 229.404, 234.866, 240.328, 245.790, 245.790, 237.597, 245.790,
-243.059, 245.790, 243.059, 267.638, 267.638,
-251.252, 229.404, 204.825, 207.556, 221.211, 221.211, 234.866, 248.521,
-221.211, 196.632, 202.094, 202.094, 204.825, 221.211, 284.024, 294.948,
-253.983, 251.252, 259.445, 256.714, 240.328, 237.597, 243.059, 237.597,
-232.135, 232.135, 240.328, 243.059, 253.983, 248.521, 240.328, 240.328,
-248.521, 240.328, 248.521, 289.486, 294.948,
-253.983, 243.059, 213.018, 204.825, 210.287, 218.480, 232.135, 234.866,
-232.135, 199.363, 196.632, 199.363, 202.094, 215.749, 278.562, 275.831,
-240.328, 251.252, 253.983, 248.521, 237.597, 237.597, 234.866, 237.597,
-232.135, 234.866, 240.328, 243.059, 256.714, 256.714, 245.790, 240.328,
-232.135, 234.866, 267.638, 297.679, 308.603,
-251.252, 253.983, 226.673, 207.556, 202.094, 215.749, 229.404, 232.135,
-221.211, 204.825, 196.632, 199.363, 202.094, 215.749, 286.755, 234.866,
-234.866, 251.252, 262.176, 267.638, 284.024, 234.866, 232.135, 232.135,
-232.135, 240.328, 245.790, 245.790, 253.983, 251.252, 240.328, 237.597,
-234.866, 243.059, 264.907, 300.410, 297.679,
-251.252, 253.983, 243.059, 213.018, 215.749, 213.018, 243.059, 229.404,
-204.825, 207.556, 199.363, 196.632, 199.363, 213.018, 286.755, 226.673,
-223.942, 240.328, 226.673, 292.217, 259.445, 229.404, 232.135, 229.404,
-234.866, 237.597, 245.790, 248.521, 251.252, 245.790, 240.328, 237.597,
-243.059, 245.790, 248.521, 270.369, 292.217,
-262.176, 256.714, 248.521, 223.942, 229.404, 234.866, 248.521, 237.597,
-204.825, 202.094, 199.363, 199.363, 199.363, 210.287, 275.831, 234.866,
-226.673, 243.059, 251.252, 270.369, 267.638, 234.866, 234.866, 237.597,
-226.673, 229.404, 243.059, 243.059, 251.252, 251.252, 251.252, 262.176,
-262.176, 237.597, 248.521, 245.790, 267.638,
-262.176, 264.907, 256.714, 237.597, 240.328, 243.059, 251.252, 245.790,
-215.749, 196.632, 199.363, 199.363, 202.094, 210.287, 273.100, 251.252,
-229.404, 234.866, 267.638, 273.100, 251.252, 237.597, 240.328, 240.328,
-229.404, 226.673, 237.597, 243.059, 248.521, 256.714, 256.714, 262.176,
-253.983, 237.597, 237.597, 229.404, 297.679,
-253.983, 251.252, 259.445, 251.252, 256.714, 253.983, 251.252, 248.521,
-223.942, 196.632, 199.363, 202.094, 202.094, 207.556, 259.445, 243.059,
-232.135, 229.404, 278.562, 243.059, 232.135, 240.328, 256.714, 234.866,
-223.942, 226.673, 223.942, 248.521, 256.714, 264.907, 245.790, 251.252,
-232.135, 245.790, 232.135, 215.749, 341.375,
-243.059, 262.176, 256.714, 245.790, 256.714, 259.445, 248.521, 248.521,
-232.135, 207.556, 196.632, 199.363, 202.094, 204.825, 240.328, 273.100,
-226.673, 229.404, 229.404, 226.673, 232.135, 240.328, 245.790, 232.135,
-229.404, 226.673, 229.404, 240.328, 251.252, 253.983, 245.790, 243.059,
-229.404, 245.790, 256.714, 215.749, 379.609,
-253.983, 264.907, 264.907, 253.983, 251.252, 259.445, 248.521, 245.790,
-237.597, 221.211, 202.094, 199.363, 199.363, 202.094, 232.135, 264.907,
-259.445, 259.445, 243.059, 234.866, 234.866, 251.252, 237.597, 232.135,
-229.404, 245.790, 234.866, 232.135, 248.521, 237.597, 237.597, 234.866,
-253.983, 338.644, 382.340, 289.486, 390.533,
-275.831, 259.445, 264.907, 264.907, 262.176, 259.445, 229.404, 240.328,
-237.597, 223.942, 213.018, 199.363, 199.363, 202.094, 223.942, 251.252,
-284.024, 259.445, 240.328, 243.059, 237.597, 243.059, 234.866, 232.135,
-234.866, 237.597, 237.597, 221.211, 221.211, 226.673, 248.521, 289.486,
-357.761, 417.843, 412.381, 335.913, 363.223,
-270.369, 275.831, 278.562, 270.369, 262.176, 245.790, 226.673, 223.942,
-232.135, 229.404, 215.749, 207.556, 202.094, 202.094, 213.018, 221.211,
-243.059, 262.176, 245.790, 253.983, 240.328, 240.328, 234.866, 240.328,
-243.059, 259.445, 243.059, 223.942, 221.211, 232.135, 284.024, 322.258,
-385.071, 436.960, 352.299, 374.147, 401.457,
-281.293, 284.024, 267.638, 270.369, 245.790, 240.328, 221.211, 207.556,
-221.211, 226.673, 215.749, 210.287, 204.825, 204.825, 204.825, 207.556,
-218.480, 245.790, 256.714, 237.597, 234.866, 237.597, 251.252, 232.135,
-232.135, 232.135, 237.597, 237.597, 243.059, 248.521, 305.872, 314.065,
-395.995, 420.574, 395.995, 385.071, 401.457,
-289.486, 281.293, 273.100, 270.369, 251.252, 223.942, 213.018, 204.825,
-213.018, 221.211, 215.749, 210.287, 210.287, 213.018, 213.018, 207.556,
-210.287, 221.211, 243.059, 237.597, 229.404, 229.404, 245.790, 234.866,
-232.135, 229.404, 218.480, 232.135, 264.907, 284.024, 324.989, 324.989,
-406.919, 401.457, 393.264, 398.726, 415.112,
-292.217, 286.755, 281.293, 273.100, 253.983, 226.673, 213.018, 202.094,
-202.094, 215.749, 213.018, 210.287, 207.556, 213.018, 218.480, 215.749,
-207.556, 213.018, 226.673, 229.404, 221.211, 221.211, 229.404, 226.673,
-223.942, 213.018, 213.018, 232.135, 234.866, 264.907, 286.755, 311.334,
-395.995, 398.726, 404.188, 401.457, 409.650,
-292.217, 286.755, 281.293, 264.907, 251.252, 229.404, 196.632, 196.632,
-204.825, 210.287, 207.556, 204.825, 207.556, 215.749, 218.480, 218.480,
-210.287, 207.556, 223.942, 221.211, 218.480, 221.211, 218.480, 218.480,
-218.480, 210.287, 202.094, 202.094, 199.363, 210.287, 248.521, 300.410,
-360.492, 385.071, 415.112, 415.112, 395.995,
-292.217, 286.755, 281.293, 262.176, 251.252, 234.866, 199.363, 193.901,
-199.363, 204.825, 204.825, 207.556, 207.556, 213.018, 218.480, 218.480,
-218.480, 267.638, 218.480, 218.480, 223.942, 223.942, 218.480, 213.018,
-207.556, 199.363, 193.901, 196.632, 193.901, 202.094, 218.480, 294.948,
-324.989, 371.416, 431.498, 387.802, 374.147,
-292.217, 284.024, 275.831, 264.907, 232.135, 237.597, 204.825, 191.170,
-191.170, 202.094, 202.094, 204.825, 210.287, 213.018, 218.480, 223.942,
-300.410, 319.527, 300.410, 213.018, 221.211, 226.673, 221.211, 213.018,
-207.556, 199.363, 193.901, 188.439, 185.708, 193.901, 202.094, 259.445,
-327.720, 376.878, 404.188, 390.533, 379.609
-};
-
-const size_t array_float1_size = sizeof(array_float1);
-
-const float array_float2[YSIZE * XSIZE] =
-{
-210.287, 199.363, 207.556, 218.480, 215.749, 204.825, 223.942, 177.515,
-169.322, 174.784, 161.129, 161.129, 166.591, 196.632, 191.170, 182.977,
-177.515, 191.170, 193.901, 191.170, 185.708, 180.246, 177.515, 182.977,
-180.246, 180.246, 180.246, 180.246, 180.246, 180.246, 180.246, 180.246,
-180.246, 177.515, 172.053, 172.053, 169.322,
-204.825, 193.901, 193.901, 215.749, 221.211, 204.825, 221.211, 199.363,
-161.129, 177.515, 163.860, 163.860, 174.784, 199.363, 199.363, 185.708,
-180.246, 191.170, 196.632, 193.901, 185.708, 180.246, 180.246, 182.977,
-180.246, 180.246, 180.246, 182.977, 182.977, 182.977, 180.246, 182.977,
-180.246, 174.784, 172.053, 172.053, 172.053,
-207.556, 193.901, 180.246, 199.363, 221.211, 213.018, 218.480, 215.749,
-161.129, 180.246, 163.860, 161.129, 169.322, 202.094, 202.094, 193.901,
-182.977, 191.170, 199.363, 193.901, 185.708, 180.246, 177.515, 177.515,
-180.246, 180.246, 182.977, 182.977, 182.977, 182.977, 182.977, 182.977,
-180.246, 174.784, 174.784, 174.784, 174.784,
-207.556, 196.632, 174.784, 185.708, 215.749, 221.211, 218.480, 218.480,
-161.129, 185.708, 163.860, 161.129, 163.860, 204.825, 204.825, 199.363,
-182.977, 185.708, 199.363, 196.632, 185.708, 180.246, 177.515, 172.053,
-182.977, 182.977, 182.977, 182.977, 185.708, 182.977, 182.977, 180.246,
-177.515, 174.784, 177.515, 177.515, 177.515,
-215.749, 196.632, 172.053, 180.246, 199.363, 218.480, 226.673, 223.942,
-163.860, 177.515, 166.591, 166.591, 163.860, 180.246, 204.825, 204.825,
-177.515, 191.170, 199.363, 196.632, 185.708, 180.246, 177.515, 174.784,
-185.708, 182.977, 185.708, 185.708, 185.708, 182.977, 182.977, 180.246,
-177.515, 177.515, 177.515, 180.246, 177.515,
-221.211, 199.363, 169.322, 177.515, 196.632, 202.094, 223.942, 232.135,
-180.246, 161.129, 169.322, 163.860, 163.860, 172.053, 204.825, 207.556,
-185.708, 188.439, 196.632, 196.632, 185.708, 180.246, 180.246, 177.515,
-182.977, 185.708, 185.708, 185.708, 185.708, 185.708, 180.246, 180.246,
-174.784, 180.246, 177.515, 180.246, 180.246,
-229.404, 202.094, 174.784, 174.784, 191.170, 193.901, 213.018, 229.404,
-191.170, 158.398, 163.860, 161.129, 161.129, 172.053, 204.825, 218.480,
-199.363, 182.977, 196.632, 196.632, 185.708, 180.246, 180.246, 177.515,
-180.246, 185.708, 185.708, 185.708, 185.708, 185.708, 180.246, 177.515,
-177.515, 177.515, 180.246, 182.977, 185.708,
-237.597, 221.211, 180.246, 172.053, 177.515, 185.708, 207.556, 207.556,
-204.825, 161.129, 158.398, 161.129, 161.129, 163.860, 193.901, 251.252,
-177.515, 174.784, 202.094, 196.632, 188.439, 182.977, 177.515, 177.515,
-177.515, 185.708, 188.439, 185.708, 188.439, 182.977, 177.515, 177.515,
-177.515, 177.515, 182.977, 185.708, 188.439,
-234.866, 234.866, 199.363, 174.784, 169.322, 182.977, 204.825, 207.556,
-191.170, 166.591, 158.398, 158.398, 161.129, 163.860, 221.211, 185.708,
-161.129, 172.053, 202.094, 245.790, 270.369, 182.977, 177.515, 177.515,
-174.784, 182.977, 185.708, 185.708, 185.708, 182.977, 177.515, 177.515,
-180.246, 177.515, 180.246, 185.708, 185.708,
-232.135, 232.135, 218.480, 180.246, 182.977, 182.977, 221.211, 202.094,
-169.322, 172.053, 161.129, 158.398, 158.398, 163.860, 253.983, 166.591,
-161.129, 161.129, 185.708, 314.065, 207.556, 182.977, 180.246, 174.784,
-174.784, 180.246, 185.708, 185.708, 185.708, 180.246, 177.515, 177.515,
-180.246, 177.515, 174.784, 177.515, 188.439,
-245.790, 237.597, 226.673, 193.901, 202.094, 210.287, 226.673, 215.749,
-172.053, 163.860, 161.129, 161.129, 158.398, 158.398, 245.790, 166.591,
-161.129, 161.129, 182.977, 218.480, 193.901, 185.708, 180.246, 174.784,
-172.053, 172.053, 185.708, 185.708, 185.708, 180.246, 177.515, 180.246,
-182.977, 177.515, 174.784, 169.322, 237.597,
-248.521, 251.252, 234.866, 207.556, 213.018, 221.211, 232.135, 223.942,
-182.977, 161.129, 161.129, 161.129, 161.129, 163.860, 240.328, 196.632,
-161.129, 163.860, 202.094, 218.480, 191.170, 182.977, 180.246, 174.784,
-169.322, 163.860, 177.515, 185.708, 182.977, 180.246, 177.515, 182.977,
-180.246, 174.784, 169.322, 161.129, 303.141,
-229.404, 229.404, 237.597, 232.135, 237.597, 232.135, 229.404, 229.404,
-196.632, 161.129, 161.129, 161.129, 161.129, 161.129, 199.363, 193.901,
-169.322, 161.129, 273.100, 191.170, 191.170, 182.977, 180.246, 174.784,
-163.860, 158.398, 158.398, 182.977, 185.708, 180.246, 177.515, 180.246,
-174.784, 172.053, 161.129, 152.936, 357.761,
-218.480, 245.790, 237.597, 226.673, 240.328, 243.059, 229.404, 226.673,
-207.556, 174.784, 161.129, 161.129, 161.129, 158.398, 161.129, 264.907,
-174.784, 169.322, 193.901, 185.708, 191.170, 199.363, 180.246, 172.053,
-166.591, 158.398, 158.398, 169.322, 182.977, 180.246, 174.784, 177.515,
-172.053, 172.053, 166.591, 155.667, 406.919,
-234.866, 248.521, 251.252, 237.597, 232.135, 240.328, 226.673, 221.211,
-213.018, 188.439, 166.591, 161.129, 161.129, 161.129, 161.129, 166.591,
-226.673, 196.632, 182.977, 182.977, 188.439, 188.439, 180.246, 174.784,
-166.591, 196.632, 152.936, 155.667, 174.784, 174.784, 174.784, 174.784,
-177.515, 314.065, 409.650, 253.983, 412.381,
-264.907, 243.059, 248.521, 251.252, 243.059, 240.328, 202.094, 218.480,
-213.018, 193.901, 177.515, 161.129, 158.398, 161.129, 158.398, 161.129,
-193.901, 196.632, 182.977, 191.170, 191.170, 188.439, 182.977, 174.784,
-172.053, 180.246, 152.936, 147.474, 155.667, 161.129, 174.784, 237.597,
-379.609, 442.422, 436.960, 349.568, 385.071,
-256.714, 262.176, 264.907, 256.714, 243.059, 223.942, 193.901, 191.170,
-207.556, 199.363, 182.977, 166.591, 161.129, 161.129, 158.398, 161.129,
-166.591, 193.901, 182.977, 204.825, 191.170, 185.708, 191.170, 177.515,
-172.053, 172.053, 161.129, 152.936, 147.474, 150.205, 245.790, 330.451,
-406.919, 458.808, 376.878, 393.264, 428.767,
-270.369, 273.100, 253.983, 253.983, 223.942, 218.480, 191.170, 169.322,
-191.170, 196.632, 182.977, 172.053, 163.860, 163.860, 158.398, 158.398,
-163.860, 185.708, 191.170, 191.170, 188.439, 185.708, 215.749, 185.708,
-174.784, 169.322, 163.860, 161.129, 155.667, 155.667, 240.328, 327.720,
-412.381, 442.422, 420.574, 406.919, 423.305,
-281.293, 270.369, 259.445, 256.714, 229.404, 199.363, 182.977, 169.322,
-177.515, 188.439, 182.977, 174.784, 172.053, 174.784, 172.053, 161.129,
-163.860, 177.515, 193.901, 188.439, 188.439, 182.977, 213.018, 177.515,
-172.053, 166.591, 161.129, 166.591, 163.860, 185.708, 273.100, 349.568,
-423.305, 423.305, 415.112, 423.305, 447.884,
-284.024, 278.562, 270.369, 259.445, 234.866, 202.094, 182.977, 166.591,
-166.591, 180.246, 177.515, 172.053, 172.053, 174.784, 177.515, 172.053,
-163.860, 172.053, 191.170, 188.439, 182.977, 182.977, 182.977, 177.515,
-169.322, 163.860, 158.398, 155.667, 169.322, 158.398, 193.901, 319.527,
-409.650, 420.574, 428.767, 423.305, 445.153,
-284.024, 275.831, 270.369, 248.521, 229.404, 202.094, 161.129, 161.129,
-169.322, 174.784, 172.053, 166.591, 169.322, 174.784, 174.784, 174.784,
-166.591, 163.860, 188.439, 185.708, 182.977, 188.439, 182.977, 177.515,
-169.322, 161.129, 158.398, 155.667, 155.667, 152.936, 161.129, 284.024,
-374.147, 401.457, 434.229, 439.691, 431.498,
-284.024, 275.831, 270.369, 245.790, 232.135, 210.287, 163.860, 155.667,
-163.860, 169.322, 169.322, 169.322, 172.053, 174.784, 177.515, 177.515,
-180.246, 273.100, 182.977, 182.977, 188.439, 188.439, 182.977, 177.515,
-172.053, 163.860, 158.398, 152.936, 147.474, 150.205, 152.936, 210.287,
-333.182, 387.802, 453.346, 428.767, 409.650,
-284.024, 275.831, 264.907, 251.252, 210.287, 215.749, 174.784, 155.667,
-155.667, 169.322, 169.322, 169.322, 174.784, 177.515, 180.246, 177.515,
-314.065, 376.878, 352.299, 174.784, 185.708, 191.170, 185.708, 180.246,
-174.784, 163.860, 158.398, 152.936, 144.743, 144.743, 152.936, 169.322,
-314.065, 390.533, 428.767, 426.036, 434.229
-};
-
-const size_t array_float2_size = sizeof(array_float2);
-
-const double array_double1[YSIZE * XSIZE] =
-{
-148.914762, 145.451628, 148.914762, 155.841030, 154.109463, 147.183195,
-155.841030, 135.062226, 133.330659, 136.793793, 129.867525, 133.330659,
-136.793793, 148.914762, 150.646329, 143.720061, 141.988494, 150.646329,
-154.109463, 152.377896, 148.914762, 150.646329, 152.377896, 150.646329,
-140.256927, 145.451628, 147.183195, 147.183195, 145.451628, 148.914762,
-152.377896, 157.572597, 166.230432, 164.498865, 167.961999, 164.498865,
-154.109463,
-147.183195, 141.988494, 140.256927, 152.377896, 154.109463, 147.183195,
-154.109463, 143.720061, 128.135958, 136.793793, 131.599092, 133.330659,
-138.525360, 150.646329, 150.646329, 145.451628, 145.451628, 152.377896,
-155.841030, 154.109463, 150.646329, 147.183195, 150.646329, 152.377896,
-143.720061, 138.525360, 141.988494, 145.451628, 147.183195, 150.646329,
-155.841030, 164.498865, 166.230432, 164.498865, 164.498865, 159.304164,
-155.841030,
-147.183195, 140.256927, 136.793793, 145.451628, 155.841030, 150.646329,
-152.377896, 152.377896, 126.404391, 136.793793, 129.867525, 131.599092,
-136.793793, 152.377896, 152.377896, 150.646329, 147.183195, 155.841030,
-159.304164, 154.109463, 152.377896, 152.377896, 150.646329, 148.914762,
-145.451628, 141.988494, 141.988494, 143.720061, 150.646329, 154.109463,
-161.035731, 162.767298, 161.035731, 161.035731, 159.304164, 159.304164,
-166.230432,
-147.183195, 141.988494, 131.599092, 138.525360, 152.377896, 154.109463,
-152.377896, 154.109463, 126.404391, 138.525360, 129.867525, 129.867525,
-133.330659, 154.109463, 159.304164, 161.035731, 157.572597, 154.109463,
-162.767298, 159.304164, 155.841030, 154.109463, 152.377896, 145.451628,
-145.451628, 141.988494, 141.988494, 147.183195, 152.377896, 157.572597,
-162.767298, 161.035731, 161.035731, 154.109463, 155.841030, 166.230432,
-166.230432,
-150.646329, 143.720061, 129.867525, 133.330659, 143.720061, 154.109463,
-155.841030, 155.841030, 128.135958, 135.062226, 131.599092, 131.599092,
-131.599092, 145.451628, 162.767298, 173.156700, 154.109463, 159.304164,
-162.767298, 159.304164, 155.841030, 154.109463, 155.841030, 147.183195,
-145.451628, 143.720061, 143.720061, 150.646329, 157.572597, 159.304164,
-152.377896, 159.304164, 157.572597, 152.377896, 155.841030, 167.961999,
-164.498865,
-154.109463, 143.720061, 128.135958, 133.330659, 141.988494, 145.451628,
-155.841030, 159.304164, 135.062226, 124.672824, 131.599092, 129.867525,
-129.867525, 140.256927, 164.498865, 174.888267, 164.498865, 159.304164,
-164.498865, 161.035731, 155.841030, 154.109463, 155.841030, 150.646329,
-148.914762, 145.451628, 148.914762, 152.377896, 155.841030, 155.841030,
-150.646329, 155.841030, 154.109463, 155.841030, 154.109463, 169.693566,
-169.693566,
-159.304164, 145.451628, 129.867525, 131.599092, 140.256927, 140.256927,
-148.914762, 157.572597, 140.256927, 124.672824, 128.135958, 128.135958,
-129.867525, 140.256927, 180.082968, 187.009236, 161.035731, 159.304164,
-164.498865, 162.767298, 152.377896, 150.646329, 154.109463, 150.646329,
-147.183195, 147.183195, 152.377896, 154.109463, 161.035731, 157.572597,
-152.377896, 152.377896, 157.572597, 152.377896, 157.572597, 183.546102,
-187.009236,
-161.035731, 154.109463, 135.062226, 129.867525, 133.330659, 138.525360,
-147.183195, 148.914762, 147.183195, 126.404391, 124.672824, 126.404391,
-128.135958, 136.793793, 176.619834, 174.888267, 152.377896, 159.304164,
-161.035731, 157.572597, 150.646329, 150.646329, 148.914762, 150.646329,
-147.183195, 148.914762, 152.377896, 154.109463, 162.767298, 162.767298,
-155.841030, 152.377896, 147.183195, 148.914762, 169.693566, 188.740803,
-195.667071,
-159.304164, 161.035731, 143.720061, 131.599092, 128.135958, 136.793793,
-145.451628, 147.183195, 140.256927, 129.867525, 124.672824, 126.404391,
-128.135958, 136.793793, 181.814535, 148.914762, 148.914762, 159.304164,
-166.230432, 169.693566, 180.082968, 148.914762, 147.183195, 147.183195,
-147.183195, 152.377896, 155.841030, 155.841030, 161.035731, 159.304164,
-152.377896, 150.646329, 148.914762, 154.109463, 167.961999, 190.472370,
-188.740803,
-159.304164, 161.035731, 154.109463, 135.062226, 136.793793, 135.062226,
-154.109463, 145.451628, 129.867525, 131.599092, 126.404391, 124.672824,
-126.404391, 135.062226, 181.814535, 143.720061, 141.988494, 152.377896,
-143.720061, 185.277669, 164.498865, 145.451628, 147.183195, 145.451628,
-148.914762, 150.646329, 155.841030, 157.572597, 159.304164, 155.841030,
-152.377896, 150.646329, 154.109463, 155.841030, 157.572597, 171.425133,
-185.277669,
-166.230432, 162.767298, 157.572597, 141.988494, 145.451628, 148.914762,
-157.572597, 150.646329, 129.867525, 128.135958, 126.404391, 126.404391,
-126.404391, 133.330659, 174.888267, 148.914762, 143.720061, 154.109463,
-159.304164, 171.425133, 169.693566, 148.914762, 148.914762, 150.646329,
-143.720061, 145.451628, 154.109463, 154.109463, 159.304164, 159.304164,
-159.304164, 166.230432, 166.230432, 150.646329, 157.572597, 155.841030,
-169.693566,
-166.230432, 167.961999, 162.767298, 150.646329, 152.377896, 154.109463,
-159.304164, 155.841030, 136.793793, 124.672824, 126.404391, 126.404391,
-128.135958, 133.330659, 173.156700, 159.304164, 145.451628, 148.914762,
-169.693566, 173.156700, 159.304164, 150.646329, 152.377896, 152.377896,
-145.451628, 143.720061, 150.646329, 154.109463, 157.572597, 162.767298,
-162.767298, 166.230432, 161.035731, 150.646329, 150.646329, 145.451628,
-188.740803,
-161.035731, 159.304164, 164.498865, 159.304164, 162.767298, 161.035731,
-159.304164, 157.572597, 141.988494, 124.672824, 126.404391, 128.135958,
-128.135958, 131.599092, 164.498865, 154.109463, 147.183195, 145.451628,
-176.619834, 154.109463, 147.183195, 152.377896, 162.767298, 148.914762,
-141.988494, 143.720061, 141.988494, 157.572597, 162.767298, 167.961999,
-155.841030, 159.304164, 147.183195, 155.841030, 147.183195, 136.793793,
-216.445875,
-154.109463, 166.230432, 162.767298, 155.841030, 162.767298, 164.498865,
-157.572597, 157.572597, 147.183195, 131.599092, 124.672824, 126.404391,
-128.135958, 129.867525, 152.377896, 173.156700, 143.720061, 145.451628,
-145.451628, 143.720061, 147.183195, 152.377896, 155.841030, 147.183195,
-145.451628, 143.720061, 145.451628, 152.377896, 159.304164, 161.035731,
-155.841030, 154.109463, 145.451628, 155.841030, 162.767298, 136.793793,
-240.687813,
-161.035731, 167.961999, 167.961999, 161.035731, 159.304164, 164.498865,
-157.572597, 155.841030, 150.646329, 140.256927, 128.135958, 126.404391,
-126.404391, 128.135958, 147.183195, 167.961999, 164.498865, 164.498865,
-154.109463, 148.914762, 148.914762, 159.304164, 150.646329, 147.183195,
-145.451628, 155.841030, 148.914762, 147.183195, 157.572597, 150.646329,
-150.646329, 148.914762, 161.035731, 214.714308, 242.419380, 183.546102,
-247.614081,
-174.888267, 164.498865, 167.961999, 167.961999, 166.230432, 164.498865,
-145.451628, 152.377896, 150.646329, 141.988494, 135.062226, 126.404391,
-126.404391, 128.135958, 141.988494, 159.304164, 180.082968, 164.498865,
-152.377896, 154.109463, 150.646329, 154.109463, 148.914762, 147.183195,
-148.914762, 150.646329, 150.646329, 140.256927, 140.256927, 143.720061,
-157.572597, 183.546102, 226.835277, 264.929751, 261.466617, 212.982741,
-230.298411,
-171.425133, 174.888267, 176.619834, 171.425133, 166.230432, 155.841030,
-143.720061, 141.988494, 147.183195, 145.451628, 136.793793, 131.599092,
-128.135958, 128.135958, 135.062226, 140.256927, 154.109463, 166.230432,
-155.841030, 161.035731, 152.377896, 152.377896, 148.914762, 152.377896,
-154.109463, 164.498865, 154.109463, 141.988494, 140.256927, 147.183195,
-180.082968, 204.324906, 244.150947, 277.050720, 223.372143, 237.224679,
-254.540349,
-178.351401, 180.082968, 169.693566, 171.425133, 155.841030, 152.377896,
-140.256927, 131.599092, 140.256927, 143.720061, 136.793793, 133.330659,
-129.867525, 129.867525, 129.867525, 131.599092, 138.525360, 155.841030,
-162.767298, 150.646329, 148.914762, 150.646329, 159.304164, 147.183195,
-147.183195, 147.183195, 150.646329, 150.646329, 154.109463, 157.572597,
-193.935504, 199.130205, 251.077215, 266.661318, 251.077215, 244.150947,
-254.540349,
-183.546102, 178.351401, 173.156700, 171.425133, 159.304164, 141.988494,
-135.062226, 129.867525, 135.062226, 140.256927, 136.793793, 133.330659,
-133.330659, 135.062226, 135.062226, 131.599092, 133.330659, 140.256927,
-154.109463, 150.646329, 145.451628, 145.451628, 155.841030, 148.914762,
-147.183195, 145.451628, 138.525360, 147.183195, 167.961999, 180.082968,
-206.056473, 206.056473, 258.003483, 254.540349, 249.345648, 252.808782,
-263.198184,
-185.277669, 181.814535, 178.351401, 173.156700, 161.035731, 143.720061,
-135.062226, 128.135958, 128.135958, 136.793793, 135.062226, 133.330659,
-131.599092, 135.062226, 138.525360, 136.793793, 131.599092, 135.062226,
-143.720061, 145.451628, 140.256927, 140.256927, 145.451628, 143.720061,
-141.988494, 135.062226, 135.062226, 147.183195, 148.914762, 167.961999,
-181.814535, 197.398638, 251.077215, 252.808782, 256.271916, 254.540349,
-259.735050,
-185.277669, 181.814535, 178.351401, 167.961999, 159.304164, 145.451628,
-124.672824, 124.672824, 129.867525, 133.330659, 131.599092, 129.867525,
-131.599092, 136.793793, 138.525360, 138.525360, 133.330659, 131.599092,
-141.988494, 140.256927, 138.525360, 140.256927, 138.525360, 138.525360,
-138.525360, 133.330659, 128.135958, 128.135958, 126.404391, 133.330659,
-157.572597, 190.472370, 228.566844, 244.150947, 263.198184, 263.198184,
-251.077215,
-185.277669, 181.814535, 178.351401, 166.230432, 159.304164, 148.914762,
-126.404391, 122.941257, 126.404391, 129.867525, 129.867525, 131.599092,
-131.599092, 135.062226, 138.525360, 138.525360, 138.525360, 169.693566,
-138.525360, 138.525360, 141.988494, 141.988494, 138.525360, 135.062226,
-131.599092, 126.404391, 122.941257, 124.672824, 122.941257, 128.135958,
-138.525360, 187.009236, 206.056473, 235.493112, 273.587586, 245.882514,
-237.224679,
-185.277669, 180.082968, 174.888267, 167.961999, 147.183195, 150.646329,
-129.867525, 121.209690, 121.209690, 128.135958, 128.135958, 129.867525,
-133.330659, 135.062226, 138.525360, 141.988494, 190.472370, 202.593339,
-190.472370, 135.062226, 140.256927, 143.720061, 140.256927, 135.062226,
-131.599092, 126.404391, 122.941257, 119.478123, 117.746556, 122.941257,
-128.135958, 164.498865, 207.788040, 238.956246, 256.271916, 247.614081,
-240.687813
-};
-
-const size_t array_double1_size = sizeof(array_double1);
-
-const double array_double2[YSIZE * XSIZE] =
-{
-133.330659, 126.404391, 131.599092, 138.525360, 136.793793, 129.867525,
-141.988494, 112.551855, 107.357154, 110.820288, 102.162453, 102.162453,
-105.625587, 124.672824, 121.209690, 116.014989, 112.551855, 121.209690,
-122.941257, 121.209690, 117.746556, 114.283422, 112.551855, 116.014989,
-114.283422, 114.283422, 114.283422, 114.283422, 114.283422, 114.283422,
-114.283422, 114.283422, 114.283422, 112.551855, 109.088721, 109.088721,
-107.357154,
-129.867525, 122.941257, 122.941257, 136.793793, 140.256927, 129.867525,
-140.256927, 126.404391, 102.162453, 112.551855, 103.894020, 103.894020,
-110.820288, 126.404391, 126.404391, 117.746556, 114.283422, 121.209690,
-124.672824, 122.941257, 117.746556, 114.283422, 114.283422, 116.014989,
-114.283422, 114.283422, 114.283422, 116.014989, 116.014989, 116.014989,
-114.283422, 116.014989, 114.283422, 110.820288, 109.088721, 109.088721,
-109.088721,
-131.599092, 122.941257, 114.283422, 126.404391, 140.256927, 135.062226,
-138.525360, 136.793793, 102.162453, 114.283422, 103.894020, 102.162453,
-107.357154, 128.135958, 128.135958, 122.941257, 116.014989, 121.209690,
-126.404391, 122.941257, 117.746556, 114.283422, 112.551855, 112.551855,
-114.283422, 114.283422, 116.014989, 116.014989, 116.014989, 116.014989,
-116.014989, 116.014989, 114.283422, 110.820288, 110.820288, 110.820288,
-110.820288,
-131.599092, 124.672824, 110.820288, 117.746556, 136.793793, 140.256927,
-138.525360, 138.525360, 102.162453, 117.746556, 103.894020, 102.162453,
-103.894020, 129.867525, 129.867525, 126.404391, 116.014989, 117.746556,
-126.404391, 124.672824, 117.746556, 114.283422, 112.551855, 109.088721,
-116.014989, 116.014989, 116.014989, 116.014989, 117.746556, 116.014989,
-116.014989, 114.283422, 112.551855, 110.820288, 112.551855, 112.551855,
-112.551855,
-136.793793, 124.672824, 109.088721, 114.283422, 126.404391, 138.525360,
-143.720061, 141.988494, 103.894020, 112.551855, 105.625587, 105.625587,
-103.894020, 114.283422, 129.867525, 129.867525, 112.551855, 121.209690,
-126.404391, 124.672824, 117.746556, 114.283422, 112.551855, 110.820288,
-117.746556, 116.014989, 117.746556, 117.746556, 117.746556, 116.014989,
-116.014989, 114.283422, 112.551855, 112.551855, 112.551855, 114.283422,
-112.551855,
-140.256927, 126.404391, 107.357154, 112.551855, 124.672824, 128.135958,
-141.988494, 147.183195, 114.283422, 102.162453, 107.357154, 103.894020,
-103.894020, 109.088721, 129.867525, 131.599092, 117.746556, 119.478123,
-124.672824, 124.672824, 117.746556, 114.283422, 114.283422, 112.551855,
-116.014989, 117.746556, 117.746556, 117.746556, 117.746556, 117.746556,
-114.283422, 114.283422, 110.820288, 114.283422, 112.551855, 114.283422,
-114.283422,
-145.451628, 128.135958, 110.820288, 110.820288, 121.209690, 122.941257,
-135.062226, 145.451628, 121.209690, 100.430886, 103.894020, 102.162453,
-102.162453, 109.088721, 129.867525, 138.525360, 126.404391, 116.014989,
-124.672824, 124.672824, 117.746556, 114.283422, 114.283422, 112.551855,
-114.283422, 117.746556, 117.746556, 117.746556, 117.746556, 117.746556,
-114.283422, 112.551855, 112.551855, 112.551855, 114.283422, 116.014989,
-117.746556,
-150.646329, 140.256927, 114.283422, 109.088721, 112.551855, 117.746556,
-131.599092, 131.599092, 129.867525, 102.162453, 100.430886, 102.162453,
-102.162453, 103.894020, 122.941257, 159.304164, 112.551855, 110.820288,
-128.135958, 124.672824, 119.478123, 116.014989, 112.551855, 112.551855,
-112.551855, 117.746556, 119.478123, 117.746556, 119.478123, 116.014989,
-112.551855, 112.551855, 112.551855, 112.551855, 116.014989, 117.746556,
-119.478123,
-148.914762, 148.914762, 126.404391, 110.820288, 107.357154, 116.014989,
-129.867525, 131.599092, 121.209690, 105.625587, 100.430886, 100.430886,
-102.162453, 103.894020, 140.256927, 117.746556, 102.162453, 109.088721,
-128.135958, 155.841030, 171.425133, 116.014989, 112.551855, 112.551855,
-110.820288, 116.014989, 117.746556, 117.746556, 117.746556, 116.014989,
-112.551855, 112.551855, 114.283422, 112.551855, 114.283422, 117.746556,
-117.746556,
-147.183195, 147.183195, 138.525360, 114.283422, 116.014989, 116.014989,
-140.256927, 128.135958, 107.357154, 109.088721, 102.162453, 100.430886,
-100.430886, 103.894020, 161.035731, 105.625587, 102.162453, 102.162453,
-117.746556, 199.130205, 131.599092, 116.014989, 114.283422, 110.820288,
-110.820288, 114.283422, 117.746556, 117.746556, 117.746556, 114.283422,
-112.551855, 112.551855, 114.283422, 112.551855, 110.820288, 112.551855,
-119.478123,
-155.841030, 150.646329, 143.720061, 122.941257, 128.135958, 133.330659,
-143.720061, 136.793793, 109.088721, 103.894020, 102.162453, 102.162453,
-100.430886, 100.430886, 155.841030, 105.625587, 102.162453, 102.162453,
-116.014989, 138.525360, 122.941257, 117.746556, 114.283422, 110.820288,
-109.088721, 109.088721, 117.746556, 117.746556, 117.746556, 114.283422,
-112.551855, 114.283422, 116.014989, 112.551855, 110.820288, 107.357154,
-150.646329,
-157.572597, 159.304164, 148.914762, 131.599092, 135.062226, 140.256927,
-147.183195, 141.988494, 116.014989, 102.162453, 102.162453, 102.162453,
-102.162453, 103.894020, 152.377896, 124.672824, 102.162453, 103.894020,
-128.135958, 138.525360, 121.209690, 116.014989, 114.283422, 110.820288,
-107.357154, 103.894020, 112.551855, 117.746556, 116.014989, 114.283422,
-112.551855, 116.014989, 114.283422, 110.820288, 107.357154, 102.162453,
-192.203937,
-145.451628, 145.451628, 150.646329, 147.183195, 150.646329, 147.183195,
-145.451628, 145.451628, 124.672824, 102.162453, 102.162453, 102.162453,
-102.162453, 102.162453, 126.404391, 122.941257, 107.357154, 102.162453,
-173.156700, 121.209690, 121.209690, 116.014989, 114.283422, 110.820288,
-103.894020, 100.430886, 100.430886, 116.014989, 117.746556, 114.283422,
-112.551855, 114.283422, 110.820288, 109.088721, 102.162453, 96.967752,
-226.835277,
-138.525360, 155.841030, 150.646329, 143.720061, 152.377896, 154.109463,
-145.451628, 143.720061, 131.599092, 110.820288, 102.162453, 102.162453,
-102.162453, 100.430886, 102.162453, 167.961999, 110.820288, 107.357154,
-122.941257, 117.746556, 121.209690, 126.404391, 114.283422, 109.088721,
-105.625587, 100.430886, 100.430886, 107.357154, 116.014989, 114.283422,
-110.820288, 112.551855, 109.088721, 109.088721, 105.625587, 98.699319,
-258.003483,
-148.914762, 157.572597, 159.304164, 150.646329, 147.183195, 152.377896,
-143.720061, 140.256927, 135.062226, 119.478123, 105.625587, 102.162453,
-102.162453, 102.162453, 102.162453, 105.625587, 143.720061, 124.672824,
-116.014989, 116.014989, 119.478123, 119.478123, 114.283422, 110.820288,
-105.625587, 124.672824, 96.967752, 98.699319, 110.820288, 110.820288,
-110.820288, 110.820288, 112.551855, 199.130205, 259.735050, 161.035731,
-261.466617,
-167.961999, 154.109463, 157.572597, 159.304164, 154.109463, 152.377896,
-128.135958, 138.525360, 135.062226, 122.941257, 112.551855, 102.162453,
-100.430886, 102.162453, 100.430886, 102.162453, 122.941257, 124.672824,
-116.014989, 121.209690, 121.209690, 119.478123, 116.014989, 110.820288,
-109.088721, 114.283422, 96.967752, 93.504618, 98.699319, 102.162453,
-110.820288, 150.646329, 240.687813, 280.513854, 277.050720, 221.640576,
-244.150947,
-162.767298, 166.230432, 167.961999, 162.767298, 154.109463, 141.988494,
-122.941257, 121.209690, 131.599092, 126.404391, 116.014989, 105.625587,
-102.162453, 102.162453, 100.430886, 102.162453, 105.625587, 122.941257,
-116.014989, 129.867525, 121.209690, 117.746556, 121.209690, 112.551855,
-109.088721, 109.088721, 102.162453, 96.967752, 93.504618, 95.236185,
-155.841030, 209.519607, 258.003483, 290.903256, 238.956246, 249.345648,
-271.856019,
-171.425133, 173.156700, 161.035731, 161.035731, 141.988494, 138.525360,
-121.209690, 107.357154, 121.209690, 124.672824, 116.014989, 109.088721,
-103.894020, 103.894020, 100.430886, 100.430886, 103.894020, 117.746556,
-121.209690, 121.209690, 119.478123, 117.746556, 136.793793, 117.746556,
-110.820288, 107.357154, 103.894020, 102.162453, 98.699319, 98.699319,
-152.377896, 207.788040, 261.466617, 280.513854, 266.661318, 258.003483,
-268.392885,
-178.351401, 171.425133, 164.498865, 162.767298, 145.451628, 126.404391,
-116.014989, 107.357154, 112.551855, 119.478123, 116.014989, 110.820288,
-109.088721, 110.820288, 109.088721, 102.162453, 103.894020, 112.551855,
-122.941257, 119.478123, 119.478123, 116.014989, 135.062226, 112.551855,
-109.088721, 105.625587, 102.162453, 105.625587, 103.894020, 117.746556,
-173.156700, 221.640576, 268.392885, 268.392885, 263.198184, 268.392885,
-283.976988,
-180.082968, 176.619834, 171.425133, 164.498865, 148.914762, 128.135958,
-116.014989, 105.625587, 105.625587, 114.283422, 112.551855, 109.088721,
-109.088721, 110.820288, 112.551855, 109.088721, 103.894020, 109.088721,
-121.209690, 119.478123, 116.014989, 116.014989, 116.014989, 112.551855,
-107.357154, 103.894020, 100.430886, 98.699319, 107.357154, 100.430886,
-122.941257, 202.593339, 259.735050, 266.661318, 271.856019, 268.392885,
-282.245421,
-180.082968, 174.888267, 171.425133, 157.572597, 145.451628, 128.135958,
-102.162453, 102.162453, 107.357154, 110.820288, 109.088721, 105.625587,
-107.357154, 110.820288, 110.820288, 110.820288, 105.625587, 103.894020,
-119.478123, 117.746556, 116.014989, 119.478123, 116.014989, 112.551855,
-107.357154, 102.162453, 100.430886, 98.699319, 98.699319, 96.967752,
-102.162453, 180.082968, 237.224679, 254.540349, 275.319153, 278.782287,
-273.587586,
-180.082968, 174.888267, 171.425133, 155.841030, 147.183195, 133.330659,
-103.894020, 98.699319, 103.894020, 107.357154, 107.357154, 107.357154,
-109.088721, 110.820288, 112.551855, 112.551855, 114.283422, 173.156700,
-116.014989, 116.014989, 119.478123, 119.478123, 116.014989, 112.551855,
-109.088721, 103.894020, 100.430886, 96.967752, 93.504618, 95.236185,
-96.967752, 133.330659, 211.251174, 245.882514, 287.440122, 271.856019,
-259.735050,
-180.082968, 174.888267, 167.961999, 159.304164, 133.330659, 136.793793,
-110.820288, 98.699319, 98.699319, 107.357154, 107.357154, 107.357154,
-110.820288, 112.551855, 114.283422, 112.551855, 199.130205, 238.956246,
-223.372143, 110.820288, 117.746556, 121.209690, 117.746556, 114.283422,
-110.820288, 103.894020, 100.430886, 96.967752, 91.773051, 91.773051,
-96.967752, 107.357154, 199.130205, 247.614081, 271.856019, 270.124452,
-275.319153
-};
-
-const size_t array_double2_size = sizeof(array_double2);
-
-/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/src/3rdparty/libtiff/test/test_arrays.h b/src/3rdparty/libtiff/test/test_arrays.h
deleted file mode 100644
index 5131b2310c..0000000000
--- a/src/3rdparty/libtiff/test/test_arrays.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* $Id: test_arrays.h,v 1.3 2006/03/23 14:54:02 dron Exp $ */
-
-/*
- * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library
- *
- * Few declarations for the test numerical arrays.
- */
-
-#ifndef _TEST_ARRAYS_
-#define _TEST_ARRAYS_
-
-#include <stddef.h>
-
-#define XSIZE 37
-#define YSIZE 23
-
-extern const unsigned char byte_array1[];
-extern const size_t byte_array1_size;
-
-extern const unsigned char byte_array2[];
-extern const size_t byte_array2_size;
-
-extern const unsigned char byte_array3[];
-extern const size_t byte_array3_size;
-
-extern const float array_float1[];
-extern const size_t array_float1_size;
-
-extern const float array_float2[];
-extern const size_t array_float2_size;
-
-extern const double array_double1[];
-extern const size_t array_double1_size;
-
-extern const double array_double2[];
-extern const size_t array_double2_size;
-
-#endif /* _TEST_ARRAYS_ */
-
-/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/src/3rdparty/patches/freetype-2.3.5-config.patch b/src/3rdparty/patches/freetype-2.3.5-config.patch
deleted file mode 100644
index 2653467653..0000000000
--- a/src/3rdparty/patches/freetype-2.3.5-config.patch
+++ /dev/null
@@ -1,265 +0,0 @@
---- builds/unix/ftconfig.h 1970-01-01 01:00:00.000000000 +0100
-+++ builds/unix/ftconfig.h 2007-07-15 00:00:00.000000000 +0200
-@@ -0,0 +1,262 @@
-+/* ftconfig.h. Generated by configure. */
-+/***************************************************************************/
-+/* */
-+/* ftconfig.in */
-+/* */
-+/* UNIX-specific configuration file (specification only). */
-+/* */
-+/* Copyright 1996-2000, 2002 by */
-+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-+/* */
-+/* This file is part of the FreeType project, and may only be used, */
-+/* modified, and distributed under the terms of the FreeType project */
-+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
-+/* this file you indicate that you have read the license and */
-+/* understand and accept it fully. */
-+/* */
-+/***************************************************************************/
-+
-+
-+ /*************************************************************************/
-+ /* */
-+ /* This header file contains a number of macro definitions that are used */
-+ /* by the rest of the engine. Most of the macros here are automatically */
-+ /* determined at compile time, and you should not need to change it to */
-+ /* port FreeType, except to compile the library with a non-ANSI */
-+ /* compiler. */
-+ /* */
-+ /* Note however that if some specific modifications are needed, we */
-+ /* advise you to place a modified copy in your build directory. */
-+ /* */
-+ /* The build directory is usually `freetype/builds/<system>', and */
-+ /* contains system-specific files that are always included first when */
-+ /* building the library. */
-+ /* */
-+ /*************************************************************************/
-+
-+
-+#ifndef __FTCONFIG_H__
-+#define __FTCONFIG_H__
-+
-+#include <ft2build.h>
-+#include FT_CONFIG_OPTIONS_H
-+#include FT_CONFIG_STANDARD_LIBRARY_H
-+
-+
-+FT_BEGIN_HEADER
-+
-+
-+ /*************************************************************************/
-+ /* */
-+ /* PLATFORM-SPECIFIC CONFIGURATION MACROS */
-+ /* */
-+ /* These macros can be toggled to suit a specific system. The current */
-+ /* ones are defaults used to compile FreeType in an ANSI C environment */
-+ /* (16bit compilers are also supported). Copy this file to your own */
-+ /* `freetype/builds/<system>' directory, and edit it to port the engine. */
-+ /* */
-+ /*************************************************************************/
-+
-+
-+#define HAVE_UNISTD_H 1
-+#define HAVE_FCNTL_H 1
-+
-+#define SIZEOF_INT 4
-+#define SIZEOF_LONG 4
-+
-+#define FT_SIZEOF_INT SIZEOF_INT
-+#define FT_SIZEOF_LONG SIZEOF_LONG
-+
-+
-+ /* Preferred alignment of data */
-+#define FT_ALIGNMENT 8
-+
-+
-+ /* FT_UNUSED is a macro used to indicate that a given parameter is not */
-+ /* used -- this is only used to get rid of unpleasant compiler warnings */
-+#ifndef FT_UNUSED
-+#define FT_UNUSED( arg ) ( (arg) = (arg) )
-+#endif
-+
-+
-+ /*************************************************************************/
-+ /* */
-+ /* AUTOMATIC CONFIGURATION MACROS */
-+ /* */
-+ /* These macros are computed from the ones defined above. Don't touch */
-+ /* their definition, unless you know precisely what you are doing. No */
-+ /* porter should need to mess with them. */
-+ /* */
-+ /*************************************************************************/
-+
-+
-+ /*************************************************************************/
-+ /* */
-+ /* IntN types */
-+ /* */
-+ /* Used to guarantee the size of some specific integers. */
-+ /* */
-+ typedef signed short FT_Int16;
-+ typedef unsigned short FT_UInt16;
-+
-+#if FT_SIZEOF_INT == 4
-+
-+ typedef signed int FT_Int32;
-+ typedef unsigned int FT_UInt32;
-+
-+#elif FT_SIZEOF_LONG == 4
-+
-+ typedef signed long FT_Int32;
-+ typedef unsigned long FT_UInt32;
-+
-+#else
-+#error "no 32bit type found -- please check your configuration files"
-+#endif
-+
-+#if FT_SIZEOF_LONG == 8
-+
-+ /* FT_LONG64 must be defined if a 64-bit type is available */
-+#define FT_LONG64
-+#define FT_INT64 long
-+
-+#else
-+
-+ /*************************************************************************/
-+ /* */
-+ /* Many compilers provide the non-ANSI `long long' 64-bit type. You can */
-+ /* activate it by defining the FTCALC_USE_LONG_LONG macro in */
-+ /* `ftoption.h'. */
-+ /* */
-+ /* Note that this will produce many -ansi warnings during library */
-+ /* compilation, and that in many cases, the generated code will be */
-+ /* neither smaller nor faster! */
-+ /* */
-+#ifdef FTCALC_USE_LONG_LONG
-+
-+#define FT_LONG64
-+#define FT_INT64 long long
-+
-+#endif /* FTCALC_USE_LONG_LONG */
-+#endif /* FT_SIZEOF_LONG == 8 */
-+
-+
-+#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
-+
-+#define FT_LOCAL( x ) static x
-+#define FT_LOCAL_DEF( x ) static x
-+
-+#else
-+
-+#ifdef __cplusplus
-+#define FT_LOCAL( x ) extern "C" x
-+#define FT_LOCAL_DEF( x ) extern "C" x
-+#else
-+#define FT_LOCAL( x ) extern x
-+#define FT_LOCAL_DEF( x ) extern x
-+#endif
-+
-+#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
-+
-+
-+#ifndef FT_BASE
-+
-+#ifdef __cplusplus
-+#define FT_BASE( x ) extern "C" x
-+#else
-+#define FT_BASE( x ) extern x
-+#endif
-+
-+#endif /* !FT_BASE */
-+
-+
-+#ifndef FT_BASE_DEF
-+
-+#ifdef __cplusplus
-+#define FT_BASE_DEF( x ) extern "C" x
-+#else
-+#define FT_BASE_DEF( x ) extern x
-+#endif
-+
-+#endif /* !FT_BASE_DEF */
-+
-+
-+#ifndef FT_EXPORT
-+
-+#ifdef __cplusplus
-+#define FT_EXPORT( x ) extern "C" x
-+#else
-+#define FT_EXPORT( x ) extern x
-+#endif
-+
-+#endif /* !FT_EXPORT */
-+
-+
-+#ifndef FT_EXPORT_DEF
-+
-+#ifdef __cplusplus
-+#define FT_EXPORT_DEF( x ) extern "C" x
-+#else
-+#define FT_EXPORT_DEF( x ) extern x
-+#endif
-+
-+#endif /* !FT_EXPORT_DEF */
-+
-+
-+#ifndef FT_EXPORT_VAR
-+
-+#ifdef __cplusplus
-+#define FT_EXPORT_VAR( x ) extern "C" x
-+#else
-+#define FT_EXPORT_VAR( x ) extern x
-+#endif
-+
-+#endif /* !FT_EXPORT_VAR */
-+
-+ /* The following macros are needed to compile the library with a */
-+ /* C++ compiler and with 16bit compilers. */
-+ /* */
-+
-+ /* This is special. Within C++, you must specify `extern "C"' for */
-+ /* functions which are used via function pointers, and you also */
-+ /* must do that for structures which contain function pointers to */
-+ /* assure C linkage -- it's not possible to have (local) anonymous */
-+ /* functions which are accessed by (global) function pointers. */
-+ /* */
-+ /* */
-+ /* FT_CALLBACK_DEF is used to _define_ a callback function. */
-+ /* */
-+ /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
-+ /* contains pointers to callback functions. */
-+ /* */
-+ /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */
-+ /* that contains pointers to callback functions. */
-+ /* */
-+ /* */
-+ /* Some 16bit compilers have to redefine these macros to insert */
-+ /* the infamous `_cdecl' or `__fastcall' declarations. */
-+ /* */
-+#ifndef FT_CALLBACK_DEF
-+#ifdef __cplusplus
-+#define FT_CALLBACK_DEF( x ) extern "C" x
-+#else
-+#define FT_CALLBACK_DEF( x ) static x
-+#endif
-+#endif /* FT_CALLBACK_DEF */
-+
-+#ifndef FT_CALLBACK_TABLE
-+#ifdef __cplusplus
-+#define FT_CALLBACK_TABLE extern "C"
-+#define FT_CALLBACK_TABLE_DEF extern "C"
-+#else
-+#define FT_CALLBACK_TABLE extern
-+#define FT_CALLBACK_TABLE_DEF /* nothing */
-+#endif
-+#endif /* FT_CALLBACK_TABLE */
-+
-+
-+FT_END_HEADER
-+
-+#endif /* __FTCONFIG_H__ */
-+
-+
-+/* END */
diff --git a/src/3rdparty/patches/freetype-2.3.6-ascii.patch b/src/3rdparty/patches/freetype-2.3.6-ascii.patch
deleted file mode 100644
index cc46296754..0000000000
--- a/src/3rdparty/patches/freetype-2.3.6-ascii.patch
+++ /dev/null
@@ -1,174 +0,0 @@
---- include/freetype/ftbbox.h.orig 2007-10-20 15:27:57.000000000 +0200
-+++ include/freetype/ftbbox.h 2008-06-15 00:00:00.000000000 +0200
-@@ -61,7 +61,7 @@
- /* Computes the exact bounding box of an outline. This is slower */
- /* than computing the control box. However, it uses an advanced */
- /* algorithm which returns _very_ quickly when the two boxes */
-- /* coincide. Otherwise, the outline Bézier arcs are traversed to */
-+ /* coincide. Otherwise, the outline Bezier arcs are traversed to */
- /* extract their extrema. */
- /* */
- /* <Input> */
---- include/freetype/ftglyph.h.orig 2008-04-13 23:58:59.000000000 +0200
-+++ include/freetype/ftglyph.h 2008-06-15 00:00:00.000000000 +0200
-@@ -354,10 +354,10 @@
- /* */
- /* <Description> */
- /* Return a glyph's `control box'. The control box encloses all the */
-- /* outline's points, including Bézier control points. Though it */
-+ /* outline's points, including Bezier control points. Though it */
- /* coincides with the exact bounding box for most glyphs, it can be */
- /* slightly larger in some situations (like when rotating an outline */
-- /* which contains Bézier outside arcs). */
-+ /* which contains Bezier outside arcs). */
- /* */
- /* Computing the control box is very fast, while getting the bounding */
- /* box can take much more time as it needs to walk over all segments */
---- include/freetype/ftimage.h.orig 2008-05-31 08:46:38.000000000 +0200
-+++ include/freetype/ftimage.h 2008-06-15 00:00:00.000000000 +0200
-@@ -318,11 +318,11 @@
- /* */
- /* tags :: A pointer to an array of `n_points' chars, giving */
- /* each outline point's type. If bit 0 is unset, the */
-- /* point is `off' the curve, i.e., a Bézier control */
-+ /* point is `off' the curve, i.e., a Bezier control */
- /* point, while it is `on' when set. */
- /* */
- /* Bit 1 is meaningful for `off' points only. If set, */
-- /* it indicates a third-order Bézier arc control point; */
-+ /* it indicates a third-order Bezier arc control point; */
- /* and a second-order control point if unset. */
- /* */
- /* contours :: An array of `n_contours' shorts, giving the end */
-@@ -528,7 +528,7 @@
- /* A function pointer type use to describe the signature of a `conic */
- /* to' function during outline walking/decomposition. */
- /* */
-- /* A `conic to' is emitted to indicate a second-order Bézier arc in */
-+ /* A `conic to' is emitted to indicate a second-order Bezier arc in */
- /* the outline. */
- /* */
- /* <Input> */
-@@ -560,12 +560,12 @@
- /* A function pointer type used to describe the signature of a `cubic */
- /* to' function during outline walking/decomposition. */
- /* */
-- /* A `cubic to' is emitted to indicate a third-order Bézier arc. */
-+ /* A `cubic to' is emitted to indicate a third-order Bezier arc. */
- /* */
- /* <Input> */
-- /* control1 :: A pointer to the first Bézier control point. */
-+ /* control1 :: A pointer to the first Bezier control point. */
- /* */
-- /* control2 :: A pointer to the second Bézier control point. */
-+ /* control2 :: A pointer to the second Bezier control point. */
- /* */
- /* to :: A pointer to the target end point. */
- /* */
-@@ -591,7 +591,7 @@
- /* */
- /* <Description> */
- /* A structure to hold various function pointers used during outline */
-- /* decomposition in order to emit segments, conic, and cubic Béziers, */
-+ /* decomposition in order to emit segments, conic, and cubic Beziers, */
- /* as well as `move to' and `close to' operations. */
- /* */
- /* <Fields> */
-@@ -599,9 +599,9 @@
- /* */
- /* line_to :: The segment emitter. */
- /* */
-- /* conic_to :: The second-order Bézier arc emitter. */
-+ /* conic_to :: The second-order Bezier arc emitter. */
- /* */
-- /* cubic_to :: The third-order Bézier arc emitter. */
-+ /* cubic_to :: The third-order Bezier arc emitter. */
- /* */
- /* shift :: The shift that is applied to coordinates before they */
- /* are sent to the emitter. */
-@@ -698,7 +698,7 @@
- /* */
- /* FT_GLYPH_FORMAT_OUTLINE :: */
- /* The glyph image is a vectorial outline made of line segments */
-- /* and Bézier arcs; it can be described as an @FT_Outline; you */
-+ /* and Bezier arcs; it can be described as an @FT_Outline; you */
- /* generally want to access the `outline' field of the */
- /* @FT_GlyphSlotRec structure to read it. */
- /* */
---- include/freetype/ftoutln.h.orig 2008-05-29 00:05:07.000000000 +0200
-+++ include/freetype/ftoutln.h 2008-06-15 00:00:00.000000000 +0200
-@@ -85,7 +85,7 @@
- /* */
- /* <Description> */
- /* Walks over an outline's structure to decompose it into individual */
-- /* segments and Bézier arcs. This function is also able to emit */
-+ /* segments and Bezier arcs. This function is also able to emit */
- /* `move to' and `close to' operations to indicate the start and end */
- /* of new contours in the outline. */
- /* */
-@@ -213,10 +213,10 @@
- /* */
- /* <Description> */
- /* Returns an outline's `control box'. The control box encloses all */
-- /* the outline's points, including Bézier control points. Though it */
-+ /* the outline's points, including Bezier control points. Though it */
- /* coincides with the exact bounding box for most glyphs, it can be */
- /* slightly larger in some situations (like when rotating an outline */
-- /* which contains Bézier outside arcs). */
-+ /* which contains Bezier outside arcs). */
- /* */
- /* Computing the control box is very fast, while getting the bounding */
- /* box can take much more time as it needs to walk over all segments */
---- include/freetype/ftstroke.h.orig 2008-05-29 00:06:54.000000000 +0200
-+++ include/freetype/ftstroke.h 2008-06-15 00:00:00.000000000 +0200
-@@ -407,7 +407,7 @@
- * FT_Stroker_ConicTo
- *
- * @description:
-- * `Draw' a single quadratic Bézier in the stroker's current sub-path,
-+ * `Draw' a single quadratic Bezier in the stroker's current sub-path,
- * from the last position.
- *
- * @input:
-@@ -415,7 +415,7 @@
- * The target stroker handle.
- *
- * control ::
-- * A pointer to a Bézier control point.
-+ * A pointer to a Bezier control point.
- *
- * to ::
- * A pointer to the destination point.
-@@ -439,7 +439,7 @@
- * FT_Stroker_CubicTo
- *
- * @description:
-- * `Draw' a single cubic Bézier in the stroker's current sub-path,
-+ * `Draw' a single cubic Bezier in the stroker's current sub-path,
- * from the last position.
- *
- * @input:
-@@ -447,10 +447,10 @@
- * The target stroker handle.
- *
- * control1 ::
-- * A pointer to the first Bézier control point.
-+ * A pointer to the first Bezier control point.
- *
- * control2 ::
-- * A pointer to second Bézier control point.
-+ * A pointer to second Bezier control point.
- *
- * to ::
- * A pointer to the destination point.
---- include/freetype/ftwinfnt.h.orig 2008-05-28 23:27:19.000000000 +0200
-+++ include/freetype/ftwinfnt.h 2008-06-15 00:00:00.000000000 +0200
-@@ -77,7 +77,7 @@
- * Mac Roman encoding.
- *
- * FT_WinFNT_ID_OEM ::
-- * From Michael Pöttgen <michael@poettgen.de>:
-+ * From Michael Poettgen <michael@poettgen.de>:
- *
- * The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM
- * is used for the charset of vector fonts, like `modern.fon',
diff --git a/src/3rdparty/patches/freetype-2.3.6-vxworks.patch b/src/3rdparty/patches/freetype-2.3.6-vxworks.patch
deleted file mode 100644
index 21e884cd59..0000000000
--- a/src/3rdparty/patches/freetype-2.3.6-vxworks.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff --git builds/unix/ftsystem.c builds/unix/ftsystem.c
-index 3a740fd..40fa8d0 100644
---- builds/unix/ftsystem.c
-+++ builds/unix/ftsystem.c
-@@ -69,6 +69,9 @@
- #include <string.h>
- #include <errno.h>
-
-+#ifdef VXWORKS
-+#include <ioLib.h>
-+#endif
-
- /*************************************************************************/
- /* */
-@@ -238,7 +241,7 @@
- return FT_Err_Invalid_Stream_Handle;
-
- /* open the file */
-- file = open( filepathname, O_RDONLY );
-+ file = open( filepathname, O_RDONLY, 0);
- if ( file < 0 )
- {
- FT_ERROR(( "FT_Stream_Open:" ));
-@@ -317,7 +320,11 @@
-
-
- read_count = read( file,
-+#ifndef VXWORKS
- stream->base + total_read_count,
-+#else
-+ (char *) stream->base + total_read_count,
-+#endif
- stream->size - total_read_count );
-
- if ( read_count <= 0 )
diff --git a/src/3rdparty/patches/libjpeg-6b-config.patch b/src/3rdparty/patches/libjpeg-6b-config.patch
deleted file mode 100644
index 3012b8fa7b..0000000000
--- a/src/3rdparty/patches/libjpeg-6b-config.patch
+++ /dev/null
@@ -1,50 +0,0 @@
---- jconfig.h.orig 1970-01-01 01:00:00.000000000 +0100
-+++ jconfig.h 2006-06-15 00:00:00.000000000 +0200
-@@ -0,0 +1,47 @@
-+/* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */
-+/* see jconfig.doc for explanations */
-+
-+#define HAVE_PROTOTYPES
-+#define HAVE_UNSIGNED_CHAR
-+#define HAVE_UNSIGNED_SHORT
-+/* #define void char */
-+/* #define const */
-+#undef CHAR_IS_UNSIGNED
-+#define HAVE_STDDEF_H
-+#define HAVE_STDLIB_H
-+#undef NEED_BSD_STRINGS
-+#undef NEED_SYS_TYPES_H
-+#undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */
-+#undef NEED_SHORT_EXTERNAL_NAMES
-+#undef INCOMPLETE_TYPES_BROKEN
-+
-+#if defined(_WIN32)
-+/* Define "boolean" as unsigned char, not int, per Windows custom */
-+#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
-+typedef unsigned char boolean;
-+#endif
-+#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
-+#endif
-+
-+
-+#ifdef JPEG_INTERNALS
-+
-+#undef RIGHT_SHIFT_IS_UNSIGNED
-+
-+#endif /* JPEG_INTERNALS */
-+
-+#ifdef JPEG_CJPEG_DJPEG
-+
-+#define BMP_SUPPORTED /* BMP image file format */
-+#define GIF_SUPPORTED /* GIF image file format */
-+#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
-+#undef RLE_SUPPORTED /* Utah RLE image file format */
-+#define TARGA_SUPPORTED /* Targa image file format */
-+
-+#define TWO_FILE_COMMANDLINE /* optional */
-+#define USE_SETMODE /* Microsoft has setmode() */
-+#undef NEED_SIGNAL_CATCHER
-+#undef DONT_USE_B_MODE
-+#undef PROGRESS_REPORT /* optional */
-+
-+#endif /* JPEG_CJPEG_DJPEG */
diff --git a/src/3rdparty/patches/libjpeg-6b-vxworks.patch b/src/3rdparty/patches/libjpeg-6b-vxworks.patch
deleted file mode 100644
index 263c8d00ed..0000000000
--- a/src/3rdparty/patches/libjpeg-6b-vxworks.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git jmorecfg.h jmorecfg.h
-index 54a7d1c..b0b5870 100644
---- jmorecfg.h
-+++ jmorecfg.h
-@@ -157,7 +157,7 @@ typedef short INT16;
-
- /* INT32 must hold at least signed 32-bit values. */
-
--#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
-+#if !defined(XMD_H) && !defined(VXWORKS) /* X11/xmd.h correctly defines INT32 */
- typedef long INT32;
- #endif
-
-@@ -183,6 +183,9 @@ typedef unsigned int JDIMENSION;
- /* a function called through method pointers: */
- #define METHODDEF(type) static type
- /* a function used only in its module: */
-+#if defined(VXWORKS) && defined(LOCAL)
-+# undef LOCAL
-+#endif
- #define LOCAL(type) static type
- /* a function referenced thru EXTERNs: */
- #define GLOBAL(type) type
diff --git a/src/3rdparty/patches/libpng-1.2.20-elf-visibility.patch b/src/3rdparty/patches/libpng-1.2.20-elf-visibility.patch
deleted file mode 100644
index a374cbf13c..0000000000
--- a/src/3rdparty/patches/libpng-1.2.20-elf-visibility.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- pngconf.h.orig 2007-09-08 05:22:56.000000000 +0200
-+++ pngconf.h 2007-09-09 00:00:00.000000000 +0200
-@@ -1375,6 +1375,14 @@
- # if 0 /* ... other platforms, with other meanings */
- # endif
- # endif
-+
-+# if !defined(PNG_IMPEXP)
-+# include <qconfig.h>
-+# if defined(QT_VISIBILITY_AVAILABLE)
-+# define PNG_IMPEXP __attribute__((visibility("default")))
-+# endif
-+# endif
-+
- #endif
-
- #ifndef PNGAPI
diff --git a/src/3rdparty/patches/libpng-1.2.20-vxworks.patch b/src/3rdparty/patches/libpng-1.2.20-vxworks.patch
deleted file mode 100644
index 4c49b3fc64..0000000000
--- a/src/3rdparty/patches/libpng-1.2.20-vxworks.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git pngconf.h pngconf.h
-index 19e4732..8eb7d35 100644
---- pngconf.h
-+++ pngconf.h
-@@ -344,7 +344,7 @@
- # endif /* __linux__ */
- #endif /* PNG_SETJMP_SUPPORTED */
-
--#ifdef BSD
-+#if defined(BSD) && !defined(VXWORKS)
- # include <strings.h>
- #else
- # include <string.h>
diff --git a/src/3rdparty/patches/libtiff-3.8.2-config.patch b/src/3rdparty/patches/libtiff-3.8.2-config.patch
deleted file mode 100644
index 44230ea3a0..0000000000
--- a/src/3rdparty/patches/libtiff-3.8.2-config.patch
+++ /dev/null
@@ -1,374 +0,0 @@
---- libtiff/tif_config.h 1970-01-01 01:00:00.000000000 +0100
-+++ libtiff/tif_config.h 2008-05-25 00:00:00.000000000 +0200
-@@ -0,0 +1,296 @@
-+/*
-+ Configuration defines by Trolltech.
-+*/
-+
-+#include <qglobal.h>
-+#if defined(Q_OS_WINCE)
-+# include <qfunctions_wince.h>
-+#endif
-+
-+/* Support CCITT Group 3 & 4 algorithms */
-+#define CCITT_SUPPORT 1
-+
-+/* Pick up YCbCr subsampling info from the JPEG data stream to support files
-+ lacking the tag (default enabled). */
-+#define CHECK_JPEG_YCBCR_SUBSAMPLING 1
-+
-+/* Support C++ stream API (requires C++ compiler) */
-+/* #undef CXX_SUPPORT */
-+
-+/* Treat extra sample as alpha (default enabled). The RGBA interface will
-+ treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many
-+ packages produce RGBA files but don't mark the alpha properly. */
-+#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1
-+
-+/* Use the Apple OpenGL framework. */
-+/* #undef HAVE_APPLE_OPENGL_FRAMEWORK */
-+
-+/* Define to 1 if you have the <assert.h> header file. */
-+#define HAVE_ASSERT_H 1
-+
-+/* Define to 1 if you have the <dlfcn.h> header file. */
-+/* #undef HAVE_DLFCN_H */
-+
-+/* Define to 1 if you have the <fcntl.h> header file. */
-+#if !defined(Q_OS_WINCE)
-+#define HAVE_FCNTL_H 1
-+#endif
-+
-+/* Define to 1 if you have the `floor' function. */
-+/* #undef HAVE_FLOOR */
-+
-+/* Define to 1 if you have the `getopt' function. */
-+/* #undef HAVE_GETOPT */
-+
-+/* Define as 0 or 1 according to the floating point format suported by the
-+ machine */
-+#define HAVE_IEEEFP 1
-+
-+/* Define to 1 if the system has the type `int16'. */
-+/* #undef HAVE_INT16 */
-+#ifdef Q_OS_AIX
-+#define HAVE_INT16 1
-+#endif
-+
-+/* Define to 1 if the system has the type `int32'. */
-+/* #undef HAVE_INT32 */
-+#ifdef Q_OS_AIX
-+#define HAVE_INT32 1
-+#endif
-+
-+/* Define to 1 if the system has the type `int8'. */
-+/* #undef HAVE_INT8 */
-+#ifdef Q_OS_AIX
-+#define HAVE_INT8 1
-+#endif
-+
-+/* Define to 1 if you have the <inttypes.h> header file. */
-+/* #undef HAVE_INTTYPES_H */
-+
-+/* Define to 1 if you have the `isascii' function. */
-+/* #undef HAVE_ISASCII */
-+
-+/* Define to 1 if you have the `lfind' function. */
-+/* #undef HAVE_LFIND */
-+
-+/* Define to 1 if you have the `c' library (-lc). */
-+/* #undef HAVE_LIBC */
-+
-+/* Define to 1 if you have the `m' library (-lm). */
-+/* #undef HAVE_LIBM */
-+
-+/* Define to 1 if you have the <limits.h> header file. */
-+/* #undef HAVE_LIMITS_H */
-+
-+/* Define to 1 if you have the <malloc.h> header file. */
-+/* #undef HAVE_MALLOC_H */
-+
-+/* Define to 1 if you have the `memmove' function. */
-+/* #undef HAVE_MEMMOVE */
-+
-+/* Define to 1 if you have the <memory.h> header file. */
-+/* #undef HAVE_MEMORY_H */
-+
-+/* Define to 1 if you have the `memset' function. */
-+/* #undef HAVE_MEMSET */
-+
-+/* Define to 1 if you have the `mmap' function. */
-+/* #undef HAVE_MMAP */
-+
-+/* Define to 1 if you have the `pow' function. */
-+/* #undef HAVE_POW */
-+
-+/* Define if you have POSIX threads libraries and header files. */
-+/* #undef HAVE_PTHREAD */
-+
-+/* Define to 1 if you have the <search.h> header file. */
-+#if !defined(Q_OS_WINCE)
-+#define HAVE_SEARCH_H 1
-+#endif
-+
-+/* Define to 1 if you have the `sqrt' function. */
-+/* #undef HAVE_SQRT */
-+
-+/* Define to 1 if you have the <stdint.h> header file. */
-+/* #undef HAVE_STDINT_H */
-+
-+/* Define to 1 if you have the <stdlib.h> header file. */
-+/* #undef HAVE_STDLIB_H */
-+
-+/* Define to 1 if you have the `strcasecmp' function. */
-+/* #undef HAVE_STRCASECMP */
-+
-+/* Define to 1 if you have the `strchr' function. */
-+/* #undef HAVE_STRCHR */
-+
-+/* Define to 1 if you have the <strings.h> header file. */
-+/* #undef HAVE_STRINGS_H */
-+
-+/* Define to 1 if you have the <string.h> header file. */
-+#define HAVE_STRING_H 1
-+
-+/* Define to 1 if you have the `strrchr' function. */
-+/* #undef HAVE_STRRCHR */
-+
-+/* Define to 1 if you have the `strstr' function. */
-+/* #undef HAVE_STRSTR */
-+
-+/* Define to 1 if you have the `strtol' function. */
-+/* #undef HAVE_STRTOL */
-+
-+/* Define to 1 if you have the `strtoul' function. */
-+/* #undef HAVE_STRTOUL */
-+
-+/* Define to 1 if you have the <sys/stat.h> header file. */
-+/* #undef HAVE_SYS_STAT_H */
-+
-+/* Define to 1 if you have the <sys/time.h> header file. */
-+/* #undef HAVE_SYS_TIME_H */
-+
-+/* Define to 1 if you have the <sys/types.h> header file. */
-+#define HAVE_SYS_TYPES_H 1
-+
-+/* Define to 1 if you have the <unistd.h> header file. */
-+#define HAVE_UNISTD_H 1
-+
-+/* Define to 1 if you have the <windows.h> header file. */
-+/* #undef HAVE_WINDOWS_H */
-+#ifdef Q_OS_WIN
-+#define TIF_PLATFORM_CONSOLE
-+#endif
-+
-+/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian
-+ (Intel) */
-+#if (Q_BYTE_ORDER == Q_BIG_ENDIAN)
-+#define HOST_BIGENDIAN 1
-+#else
-+#define HOST_BIGENDIAN 0
-+#endif
-+
-+/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */
-+#define HOST_FILLORDER FILLORDER_LSB2MSB
-+
-+/* Support JPEG compression (requires IJG JPEG library) */
-+/* #undef JPEG_SUPPORT */
-+
-+/* Support LogLuv high dynamic range encoding */
-+#define LOGLUV_SUPPORT 1
-+
-+/* Define to the sub-directory in which libtool stores uninstalled libraries.
-+ */
-+/* #undef LT_OBJDIR */
-+
-+/* Support LZW algorithm */
-+#define LZW_SUPPORT 1
-+
-+/* Support Microsoft Document Imaging format */
-+#define MDI_SUPPORT 1
-+
-+/* Support NeXT 2-bit RLE algorithm */
-+#define NEXT_SUPPORT 1
-+
-+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-+/* #undef NO_MINUS_C_MINUS_O */
-+
-+/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation
-+ fails with unpatched IJG JPEG library) */
-+/* #undef OJPEG_SUPPORT */
-+
-+/* Name of package */
-+/* #undef PACKAGE */
-+
-+/* Define to the address where bug reports for this package should be sent. */
-+/* #undef PACKAGE_BUGREPORT */
-+
-+/* Define to the full name of this package. */
-+/* #undef PACKAGE_NAME */
-+
-+/* Define to the full name and version of this package. */
-+/* #undef PACKAGE_STRING */
-+
-+/* Define to the one symbol short name of this package. */
-+/* #undef PACKAGE_TARNAME */
-+
-+/* Define to the version of this package. */
-+/* #undef PACKAGE_VERSION */
-+
-+/* Support Macintosh PackBits algorithm */
-+#define PACKBITS_SUPPORT 1
-+
-+/* Support Pixar log-format algorithm (requires Zlib) */
-+#define PIXARLOG_SUPPORT 1
-+
-+/* Define to necessary symbol if this constant uses a non-standard name on
-+ your system. */
-+/* #undef PTHREAD_CREATE_JOINABLE */
-+
-+/* The size of a `int', as computed by sizeof. */
-+#define SIZEOF_INT 4
-+
-+/* The size of a `long', as computed by sizeof. */
-+#if (QT_POINTER_SIZE == 8) && !defined(Q_OS_WIN64)
-+#define SIZEOF_LONG 8
-+#else
-+#define SIZEOF_LONG 4
-+#endif
-+
-+/* Define to 1 if you have the ANSI C header files. */
-+/* #undef STDC_HEADERS */
-+
-+/* Support strip chopping (whether or not to convert single-strip uncompressed
-+ images to mutiple strips of specified size to reduce memory usage) */
-+#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP
-+
-+/* Default size of the strip in bytes (when strip chopping enabled) */
-+/* #undef STRIP_SIZE_DEFAULT */
-+
-+/* Enable SubIFD tag (330) support */
-+#define SUBIFD_SUPPORT 1
-+
-+/* Support ThunderScan 4-bit RLE algorithm */
-+#define THUNDER_SUPPORT 1
-+
-+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-+/* #undef TIME_WITH_SYS_TIME */
-+
-+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
-+/* #undef TM_IN_SYS_TIME */
-+
-+/* Version number of package */
-+/* #undef VERSION */
-+
-+/* Define to 1 if your processor stores words with the most significant byte
-+ first (like Motorola and SPARC, unlike Intel and VAX). */
-+#if (Q_BYTE_ORDER == Q_BIG_ENDIAN)
-+#define WORDS_BIGENDIAN 1
-+#else
-+/* #undef WORDS_BIGENDIAN */
-+#endif
-+
-+/* Define to 1 if the X Window System is missing or not being used. */
-+/* #undef X_DISPLAY_MISSING */
-+
-+/* Support Deflate compression */
-+#define ZIP_SUPPORT 1
-+
-+/* Number of bits in a file offset, on hosts where this is settable. */
-+/* #undef _FILE_OFFSET_BITS */
-+
-+/* Define for large files, on AIX-style hosts. */
-+/* #undef _LARGE_FILES */
-+
-+/* Define to empty if `const' does not conform to ANSI C. */
-+/* #undef const */
-+
-+/* Define to `__inline__' or `__inline' if that's what the C compiler
-+ calls it, or to nothing if 'inline' is not supported under any name. */
-+#ifndef __cplusplus
-+#undef inline
-+#define inline
-+#endif
-+
-+/* Define to `long' if <sys/types.h> does not define. */
-+/* #undef off_t */
-+
-+/* Define to `unsigned' if <sys/types.h> does not define. */
-+/* #undef size_t */
---- libtiff/tiffconf.h 2006-03-23 15:55:22.000000000 +0100
-+++ libtiff/tiffconf.h 2008-05-25 00:00:00.000000000 +0200
-@@ -1,6 +1,5 @@
--/* libtiff/tiffconf.h. Generated by configure. */
- /*
-- Configuration defines for installed libtiff.
-+ Configuration defines by Trolltech.
- This file maintained for backward compatibility. Do not use definitions
- from this file in your programs.
- */
-@@ -8,6 +7,8 @@
- #ifndef _TIFFCONF_
- #define _TIFFCONF_
-
-+#include <qglobal.h>
-+
- /* Define to 1 if the system has the type `int16'. */
- /* #undef HAVE_INT16 */
-
-@@ -21,7 +22,11 @@
- #define SIZEOF_INT 4
-
- /* The size of a `long', as computed by sizeof. */
-+#if (QT_POINTER_SIZE == 8) && !defined(Q_OS_WIN64)
-+#define SIZEOF_LONG 8
-+#else
- #define SIZEOF_LONG 4
-+#endif
-
- /* Compatibility stuff. */
-
-@@ -34,13 +39,17 @@
-
- /* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian
- (Intel) */
-+#if (Q_BYTE_ORDER == Q_BIG_ENDIAN)
-+#define HOST_BIGENDIAN 1
-+#else
- #define HOST_BIGENDIAN 0
-+#endif
-
- /* Support CCITT Group 3 & 4 algorithms */
- #define CCITT_SUPPORT 1
-
- /* Support JPEG compression (requires IJG JPEG library) */
--#define JPEG_SUPPORT 1
-+/* #undef JPEG_SUPPORT */
-
- /* Support LogLuv high dynamic range encoding */
- #define LOGLUV_SUPPORT 1
---- libtiff/tiffiop.h 2006-03-21 17:42:50.000000000 +0100
-+++ libtiff/tiffiop.h 2008-05-25 00:00:00.000000000 +0200
-@@ -37,7 +37,12 @@
- #endif
-
- #ifdef HAVE_SYS_TYPES_H
-+#if !defined(Q_OS_WINCE)
- # include <sys/types.h>
-+#else
-+# include <windows.h>
-+# include <types.h>
-+#endif
- #endif
-
- #ifdef HAVE_STRING_H
---- libtiff/tif_win32.c 2006-02-07 14:51:03.000000000 +0100
-+++ libtiff/tif_win32.c 2008-05-25 00:00:00.000000000 +0200
-@@ -29,6 +29,7 @@
- * Scott Wagner (wagner@itek.com), Itek Graphix, Rochester, NY USA
- */
- #include "tiffiop.h"
-+#include <windows.h>
-
- static tsize_t
- _tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
diff --git a/src/3rdparty/patches/libtiff-3.8.2-vxworks.patch b/src/3rdparty/patches/libtiff-3.8.2-vxworks.patch
deleted file mode 100644
index b1b725e26d..0000000000
--- a/src/3rdparty/patches/libtiff-3.8.2-vxworks.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libtiff/tif_config.h.orig
-+++ libtiff/tif_config.h
-@@ -104,7 +104,7 @@
- /* #undef HAVE_PTHREAD */
-
- /* Define to 1 if you have the <search.h> header file. */
--#if !defined(Q_OS_WINCE)
-+#if !defined(Q_OS_WINCE) && !defined(Q_OS_VXWORKS)
- #define HAVE_SEARCH_H 1
- #endif
-
diff --git a/src/3rdparty/patches/sqlite-3.5.6-config.patch b/src/3rdparty/patches/sqlite-3.5.6-config.patch
deleted file mode 100644
index cf158ea46a..0000000000
--- a/src/3rdparty/patches/sqlite-3.5.6-config.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- sqlite3.c.orig 2008-02-06 16:03:28.000000000 +0100
-+++ sqlite3.c 2008-02-13 00:00:00.000000000 +0100
-@@ -16823,6 +16823,8 @@
- */
- #if OS_UNIX /* This file is used on unix only */
-
-+#include <qconfig.h>
-+
- /* #define SQLITE_ENABLE_LOCKING_STYLE 0 */
-
- /*
-@@ -16865,7 +16867,7 @@
- ** If we are to be thread-safe, include the pthreads header and define
- ** the SQLITE_UNIX_THREADS macro.
- */
--#if SQLITE_THREADSAFE
-+#ifndef QT_NO_THREAD
- # define SQLITE_UNIX_THREADS 1
- #endif
-
-@@ -19739,6 +19741,8 @@
- ** desktops but not so well in embedded systems.
- */
-
-+#include <qconfig.h>
-+
- #include <winbase.h>
-
- #ifdef __CYGWIN__
-@@ -19748,7 +19752,7 @@
- /*
- ** Macros used to determine whether or not to use threads.
- */
--#if defined(THREADSAFE) && THREADSAFE
-+#ifndef QT_NO_THREAD
- # define SQLITE_W32_THREADS 1
- #endif
-
diff --git a/src/3rdparty/patches/sqlite-3.5.6-vxworks.patch b/src/3rdparty/patches/sqlite-3.5.6-vxworks.patch
deleted file mode 100644
index 6ae65fd569..0000000000
--- a/src/3rdparty/patches/sqlite-3.5.6-vxworks.patch
+++ /dev/null
@@ -1,68 +0,0 @@
---- sqlite3.c.orig
-+++ sqlite3.c
-@@ -383,7 +383,7 @@ SQLITE_PRIVATE void sqlite3Coverage(int);
- **
- ** See also ticket #2741.
- */
--#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && SQLITE_THREADSAFE
-+#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && SQLITE_THREADSAFE && !defined(VXWORKS)
- # define _XOPEN_SOURCE 500 /* Needed to enable pthread recursive mutexes */
- #endif
-
-@@ -440,6 +440,13 @@ SQLITE_PRIVATE void sqlite3Coverage(int);
- */
- #ifndef _SQLITE3_H_
- #define _SQLITE3_H_
-+
-+#ifdef VXWORKS
-+# define SQLITE_HOMEGROWN_RECURSIVE_MUTEX
-+# define NO_GETTOD
-+# include <ioLib.h>
-+#endif
-+
- #include <stdarg.h> /* Needed for the definition of va_list */
-
- /*
-@@ -18792,7 +18799,11 @@ SQLITE_PRIVATE sqlite3_vfs *sqlite3OsDefaultVfs(void){
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <unistd.h>
--#include <sys/time.h>
-+#ifdef VXWORKS
-+# include <sys/times.h>
-+#else
-+# include <sys/time.h>
-+#endif
- #include <errno.h>
- #ifdef SQLITE_ENABLE_LOCKING_STYLE
- #include <sys/ioctl.h>
-@@ -19728,7 +19739,11 @@ static int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt){
- if( newOffset!=offset ){
- return -1;
- }
-+# ifndef VXWORKS
- got = write(id->h, pBuf, cnt);
-+# else
-+ got = write(id->h, (char *)pBuf, cnt);
-+# endif
- #endif
- TIMER_END;
- OSTRACE5("WRITE %-3d %5d %7lld %d\n", id->h, got, offset, TIMER_ELAPSED);
-@@ -21554,12 +21569,16 @@ static int unixRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
- #if !defined(SQLITE_TEST)
- {
- int pid, fd;
-- fd = open("/dev/urandom", O_RDONLY);
-+ fd = open("/dev/urandom", O_RDONLY, 0);
- if( fd<0 ){
- time_t t;
- time(&t);
- memcpy(zBuf, &t, sizeof(t));
-+#ifndef VXWORKS
- pid = getpid();
-+#else
-+ pid = (int)taskIdCurrent();
-+#endif
- memcpy(&zBuf[sizeof(t)], &pid, sizeof(pid));
- }else{
- read(fd, zBuf, nBuf);
diff --git a/src/3rdparty/patches/sqlite-3.5.6-wince.patch b/src/3rdparty/patches/sqlite-3.5.6-wince.patch
deleted file mode 100644
index 02965f8718..0000000000
--- a/src/3rdparty/patches/sqlite-3.5.6-wince.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- sqlite3.c.orig 2008-02-06 16:03:28.000000000 +0100
-+++ sqlite3.c 2008-02-13 00:00:00.000000000 +0100
-@@ -8837,6 +8837,16 @@
- }
-
- /*
-+** Windows CE does not declare the localtime
-+** function as it is not defined anywhere.
-+** Anyway we need the forward-declaration to be
-+** able to define it later on.
-+*/
-+#if defined(_WIN32_WCE) && (_WIN32_WCE >= 0x600)
-+struct tm *__cdecl localtime(const time_t *t);
-+#endif
-+
-+/*
- ** Compute the difference (in days) between localtime and UTC (a.k.a. GMT)
- ** for the time value p where p is in UTC.
- */
diff --git a/src/3rdparty/phonon/ds9/backendnode.cpp b/src/3rdparty/phonon/ds9/backendnode.cpp
index 3afcafadfc..737ab7b72e 100644
--- a/src/3rdparty/phonon/ds9/backendnode.cpp
+++ b/src/3rdparty/phonon/ds9/backendnode.cpp
@@ -67,7 +67,7 @@ namespace Phonon
if (info.pGraph) {
HRESULT hr = info.pGraph->RemoveFilter(filter);
- if (hr == VFW_E_NOT_STOPPED && m_mediaObject) {
+ if (FAILED(hr) && m_mediaObject) {
m_mediaObject->ensureStopped();
hr = info.pGraph->RemoveFilter(filter);
diff --git a/src/3rdparty/phonon/ds9/mediagraph.cpp b/src/3rdparty/phonon/ds9/mediagraph.cpp
index a467dd75b5..3e7a68bac8 100644
--- a/src/3rdparty/phonon/ds9/mediagraph.cpp
+++ b/src/3rdparty/phonon/ds9/mediagraph.cpp
@@ -379,7 +379,7 @@ namespace Phonon
FILTER_INFO info;
filter->QueryFilterInfo(&info);
#ifdef GRAPH_DEBUG
- qDebug() << "removeFilter" << QString::fromUtf16(info.achName);
+ qDebug() << "removeFilter" << QString((const QChar *)info.achName);
#endif
if (info.pGraph) {
info.pGraph->Release();
@@ -875,7 +875,7 @@ namespace Phonon
{
FILTER_INFO info;
filter->QueryFilterInfo(&info);
- qDebug() << Q_FUNC_INFO << QString::fromUtf16(info.achName);
+ qDebug() << Q_FUNC_INFO << QString((const QChar *)info.achName);
if (info.pGraph) {
info.pGraph->Release();
}
@@ -921,7 +921,7 @@ namespace Phonon
{
FILTER_INFO info;
filter->QueryFilterInfo(&info);
- qDebug() << "found a decoder filter" << QString::fromUtf16(info.achName);
+ qDebug() << "found a decoder filter" << QString((const QChar *)info.achName);
if (info.pGraph) {
info.pGraph->Release();
}
@@ -937,7 +937,7 @@ namespace Phonon
{
FILTER_INFO info;
filter->QueryFilterInfo(&info);
- qDebug() << Q_FUNC_INFO << QString::fromUtf16(info.achName);
+ qDebug() << Q_FUNC_INFO << QString((const QChar *)info.achName);
if (info.pGraph) {
info.pGraph->Release();
}
@@ -956,7 +956,7 @@ namespace Phonon
{
FILTER_INFO info;
filter->QueryFilterInfo(&info);
- qDebug() << Q_FUNC_INFO << QString::fromUtf16(info.achName);
+ qDebug() << Q_FUNC_INFO << QString((const QChar *)info.achName);
if (info.pGraph) {
info.pGraph->Release();
}
@@ -990,7 +990,7 @@ namespace Phonon
{
FILTER_INFO info;
filter->QueryFilterInfo(&info);
- qDebug() << "found a demuxer filter" << QString::fromUtf16(info.achName);
+ qDebug() << "found a demuxer filter" << QString((const QChar *)info.achName);
if (info.pGraph) {
info.pGraph->Release();
}
diff --git a/src/3rdparty/phonon/ds9/qevr9.h b/src/3rdparty/phonon/ds9/qevr9.h
new file mode 100644
index 0000000000..8599fce269
--- /dev/null
+++ b/src/3rdparty/phonon/ds9/qevr9.h
@@ -0,0 +1,143 @@
+/* This file is part of the KDE project.
+
+Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+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 or 3 of the License.
+
+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, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <d3d9.h>
+
+#define DXVA2_ProcAmp_Brightness 1
+#define DXVA2_ProcAmp_Contrast 2
+#define DXVA2_ProcAmp_Hue 4
+#define DXVA2_ProcAmp_Saturation 8
+
+typedef enum {
+ MFVideoARMode_None = 0x00000000,
+ MFVideoARMode_PreservePicture = 0x00000001,
+ MFVideoARMode_PreservePixel = 0x00000002,
+ MFVideoARMode_NonLinearStretch = 0x00000004,
+ MFVideoARMode_Mask = 0x00000007
+} MFVideoAspectRatioMode;
+
+typedef struct {
+ float left;
+ float top;
+ float right;
+ float bottom;
+} MFVideoNormalizedRect;
+
+typedef struct {
+ UINT DeviceCaps;
+ D3DPOOL InputPool;
+ UINT NumForwardRefSamples;
+ UINT NumBackwardRefSamples;
+ UINT Reserved;
+ UINT DeinterlaceTechnology;
+ UINT ProcAmpControlCaps;
+ UINT VideoProcessorOperations;
+ UINT NoiseFilterTechnology;
+ UINT DetailFilterTechnology;
+} DXVA2_VideoProcessorCaps;
+
+typedef struct {
+ union {
+ struct {
+ USHORT Fraction;
+ SHORT Value;
+ };
+ LONG ll;
+ };
+} DXVA2_Fixed32;
+
+typedef struct {
+ DXVA2_Fixed32 MinValue;
+ DXVA2_Fixed32 MaxValue;
+ DXVA2_Fixed32 DefaultValue;
+ DXVA2_Fixed32 StepSize;
+} DXVA2_ValueRange;
+
+typedef struct {
+ DXVA2_Fixed32 Brightness;
+ DXVA2_Fixed32 Contrast;
+ DXVA2_Fixed32 Hue;
+ DXVA2_Fixed32 Saturation;
+} DXVA2_ProcAmpValues;
+
+DXVA2_Fixed32 DXVA2FloatToFixed(const float _float_)
+{
+ DXVA2_Fixed32 _fixed_;
+ _fixed_.Fraction = LOWORD(_float_ * 0x10000);
+ _fixed_.Value = HIWORD(_float_ * 0x10000);
+ return _fixed_;
+}
+
+float DXVA2FixedToFloat(const DXVA2_Fixed32 _fixed_)
+{
+ return (FLOAT)_fixed_.Value + (FLOAT)_fixed_.Fraction / 0x10000;
+}
+
+#undef INTERFACE
+#define INTERFACE IMFVideoDisplayControl
+DECLARE_INTERFACE_(IMFVideoDisplayControl, IUnknown)
+{
+ STDMETHOD(GetNativeVideoSize)(THIS_ SIZE* pszVideo, SIZE* pszARVideo) PURE;
+ STDMETHOD(GetIdealVideoSize)(THIS_ SIZE* pszMin, SIZE* pszMax) PURE;
+ STDMETHOD(SetVideoPosition)(THIS_ const MFVideoNormalizedRect* pnrcSource, const LPRECT prcDest) PURE;
+ STDMETHOD(GetVideoPosition)(THIS_ MFVideoNormalizedRect* pnrcSource, LPRECT prcDest) PURE;
+ STDMETHOD(SetAspectRatioMode)(THIS_ DWORD dwAspectRatioMode) PURE;
+ STDMETHOD(GetAspectRatioMode)(THIS_ DWORD* pdwAspectRatioMode) PURE;
+ STDMETHOD(SetVideoWindow)(THIS_ HWND hwndVideo) PURE;
+ STDMETHOD(GetVideoWindow)(THIS_ HWND* phwndVideo) PURE;
+ STDMETHOD(RepaintVideo)(THIS_) PURE;
+ STDMETHOD(GetCurrentImage)(THIS_ BITMAPINFOHEADER* pBih, BYTE** pDib, DWORD* pcbDib, LONGLONG* pTimeStamp) PURE;
+ STDMETHOD(SetBorderColor)(THIS_ COLORREF Clr) PURE;
+ STDMETHOD(GetBorderColor)(THIS_ COLORREF* pClr) PURE;
+ STDMETHOD(SetRenderingPrefs)(THIS_ DWORD dwRenderFlags) PURE;
+ STDMETHOD(GetRenderingPrefs)(THIS_ DWORD* pdwRenderFlags) PURE;
+ STDMETHOD(SetFullScreen)(THIS_ BOOL fFullscreen) PURE;
+ STDMETHOD(GetFullScreen)(THIS_ BOOL* pfFullscreen) PURE;
+};
+#undef INTERFACE
+#define INTERFACE IMFVideoMixerControl
+DECLARE_INTERFACE_(IMFVideoMixerControl, IUnknown)
+{
+ STDMETHOD(SetStreamZOrder)(THIS_ DWORD dwStreamID, DWORD dwZ) PURE;
+ STDMETHOD(GetStreamZOrder)(THIS_ DWORD dwStreamID, DWORD* pdwZ) PURE;
+ STDMETHOD(SetStreamOutputRect)(THIS_ DWORD dwStreamID, const MFVideoNormalizedRect* pnrcOutput) PURE;
+ STDMETHOD(GetStreamOutputRect)(THIS_ DWORD dwStreamID, MFVideoNormalizedRect* pnrcOutput) PURE;
+};
+#undef INTERFACE
+#define INTERFACE IMFVideoProcessor
+DECLARE_INTERFACE_(IMFVideoProcessor, IUnknown)
+{
+ STDMETHOD(GetAvailableVideoProcessorModes)(THIS_ UINT* lpdwNumProcessingModes, GUID** ppVideoProcessingModes) PURE;
+ STDMETHOD(GetVideoProcessorCaps)(THIS_ LPGUID lpVideoProcessorMode, DXVA2_VideoProcessorCaps* lpVideoProcessorCaps) PURE;
+ STDMETHOD(GetVideoProcessorMode)(THIS_ LPGUID lpMode) PURE;
+ STDMETHOD(SetVideoProcessorMode)(THIS_ LPGUID lpMode) PURE;
+ STDMETHOD(GetProcAmpRange)(THIS_ DWORD dwProperty, DXVA2_ValueRange* pPropRange) PURE;
+ STDMETHOD(GetProcAmpValues)(THIS_ DWORD dwFlags, DXVA2_ProcAmpValues* Values) PURE;
+ STDMETHOD(SetProcAmpValues)(THIS_ DWORD dwFlags, DXVA2_ProcAmpValues* pValues) PURE;
+ STDMETHOD(GetFilteringRange)(THIS_ DWORD dwProperty, DXVA2_ValueRange* pPropRange) PURE;
+ STDMETHOD(GetFilteringValue)(THIS_ DWORD dwProperty, DXVA2_Fixed32* pValue) PURE;
+ STDMETHOD(SetFilteringValue)(THIS_ DWORD dwProperty, DXVA2_Fixed32* pValue) PURE;
+ STDMETHOD(GetBackgroundColor)(THIS_ COLORREF* lpClrBkg) PURE;
+ STDMETHOD(SetBackgroundColor)(THIS_ COLORREF ClrBkg) PURE;
+};
+#undef INTERFACE
+#define INTERFACE IMFGetService
+DECLARE_INTERFACE_(IMFGetService, IUnknown)
+{
+ STDMETHOD(GetService)(THIS_ REFGUID guidService, REFIID riid, LPVOID* ppvObject) PURE;
+};
+#undef INTERFACE
diff --git a/src/3rdparty/phonon/ds9/videorenderer_default.cpp b/src/3rdparty/phonon/ds9/videorenderer_default.cpp
new file mode 100644
index 0000000000..0045a49bca
--- /dev/null
+++ b/src/3rdparty/phonon/ds9/videorenderer_default.cpp
@@ -0,0 +1,153 @@
+/* This file is part of the KDE project.
+
+Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+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 or 3 of the License.
+
+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, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#include "videorenderer_default.h"
+
+#ifndef QT_NO_PHONON_VIDEO
+
+#include <QtGui/QWidget>
+#include <QtGui/QPainter>
+
+#include <uuids.h>
+
+QT_BEGIN_NAMESPACE
+
+
+namespace Phonon
+{
+ namespace DS9
+ {
+ VideoRendererDefault::~VideoRendererDefault()
+ {
+ }
+
+ bool VideoRendererDefault::isNative() const
+ {
+ return true;
+ }
+
+
+ VideoRendererDefault::VideoRendererDefault(QWidget *target) : m_target(target)
+ {
+ m_target->setAttribute(Qt::WA_PaintOnScreen, true);
+ m_filter = Filter(CLSID_VideoRenderer, IID_IBaseFilter);
+ }
+
+ QSize VideoRendererDefault::videoSize() const
+ {
+ LONG w = 0,
+ h = 0;
+ ComPointer<IBasicVideo> basic(m_filter, IID_IBasicVideo);
+ if (basic) {
+ basic->GetVideoSize( &w, &h);
+ }
+ return QSize(w, h);
+ }
+
+ void VideoRendererDefault::repaintCurrentFrame(QWidget * /*target*/, const QRect & /*rect*/)
+ {
+ //nothing to do here: the renderer paints everything
+ }
+
+ void VideoRendererDefault::notifyResize(const QSize &size, Phonon::VideoWidget::AspectRatio aspectRatio,
+ Phonon::VideoWidget::ScaleMode scaleMode)
+ {
+ if (!isActive()) {
+ ComPointer<IBasicVideo> basic(m_filter, IID_IBasicVideo);
+ if (basic) {
+ basic->SetDestinationPosition(0, 0, 0, 0);
+ }
+ return;
+ }
+
+ ComPointer<IVideoWindow> video(m_filter, IID_IVideoWindow);
+
+ OAHWND owner;
+ HRESULT hr = video->get_Owner(&owner);
+ if (FAILED(hr)) {
+ return;
+ }
+
+ const OAHWND newOwner = reinterpret_cast<OAHWND>(m_target->winId());
+ if (owner != newOwner) {
+ video->put_Owner(newOwner);
+ video->put_MessageDrain(newOwner);
+ video->put_WindowStyle(WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
+ }
+
+ //make sure the widget takes the whole size of the parent
+ video->SetWindowPosition(0, 0, size.width(), size.height());
+
+ const QSize vsize = videoSize();
+ internalNotifyResize(size, vsize, aspectRatio, scaleMode);
+
+ ComPointer<IBasicVideo> basic(m_filter, IID_IBasicVideo);
+ if (basic) {
+ basic->SetDestinationPosition(m_dstX, m_dstY, m_dstWidth, m_dstHeight);
+ }
+ }
+
+ void VideoRendererDefault::applyMixerSettings(qreal /*brightness*/, qreal /*contrast*/, qreal /*m_hue*/, qreal /*saturation*/)
+ {
+ //this can't be supported for the default renderer
+ }
+
+ QImage VideoRendererDefault::snapshot() const
+ {
+ ComPointer<IBasicVideo> basic(m_filter, IID_IBasicVideo);
+ if (basic) {
+ LONG bufferSize = 0;
+ //1st we get the buffer size
+ basic->GetCurrentImage(&bufferSize, 0);
+
+ QByteArray buffer;
+ buffer.resize(bufferSize);
+ HRESULT hr = basic->GetCurrentImage(&bufferSize, reinterpret_cast<long*>(buffer.data()));
+
+ if (SUCCEEDED(hr)) {
+
+ const BITMAPINFOHEADER *bmi = reinterpret_cast<const BITMAPINFOHEADER*>(buffer.constData());
+
+ const int w = qAbs(bmi->biWidth),
+ h = qAbs(bmi->biHeight);
+
+ // Create image and copy data into image.
+ QImage ret(w, h, QImage::Format_RGB32);
+
+ if (!ret.isNull()) {
+ const char *data = buffer.constData() + bmi->biSize;
+ const int bytes_per_line = w * sizeof(QRgb);
+ for (int y = h - 1; y >= 0; --y) {
+ qMemCopy(ret.scanLine(y), //destination
+ data, //source
+ bytes_per_line);
+ data += bytes_per_line;
+ }
+ }
+ return ret;
+ }
+ }
+ return QImage();
+ }
+
+ }
+}
+
+QT_END_NAMESPACE
+
+#endif //QT_NO_PHONON_VIDEO
diff --git a/src/3rdparty/phonon/ds9/videorenderer_default.h b/src/3rdparty/phonon/ds9/videorenderer_default.h
new file mode 100644
index 0000000000..43768d9953
--- /dev/null
+++ b/src/3rdparty/phonon/ds9/videorenderer_default.h
@@ -0,0 +1,55 @@
+/* This file is part of the KDE project.
+
+Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+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 or 3 of the License.
+
+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, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef PHONON_VIDEORENDERER_DEFAULT_H
+#define PHONON_VIDEORENDERER_DEFAULT_H
+
+#include "abstractvideorenderer.h"
+
+QT_BEGIN_NAMESPACE
+
+#ifndef QT_NO_PHONON_VIDEO
+
+namespace Phonon
+{
+ namespace DS9
+ {
+ class VideoRendererDefault : public AbstractVideoRenderer
+ {
+ public:
+ VideoRendererDefault(QWidget *target);
+ ~VideoRendererDefault();
+
+ //Implementation from AbstractVideoRenderer
+ void repaintCurrentFrame(QWidget *target, const QRect &rect);
+ void notifyResize(const QSize&, Phonon::VideoWidget::AspectRatio, Phonon::VideoWidget::ScaleMode);
+ QSize videoSize() const;
+ QImage snapshot() const;
+ void applyMixerSettings(qreal brightness, qreal contrast, qreal m_hue, qreal saturation);
+ bool isNative() const;
+ private:
+ QWidget *m_target;
+ };
+ }
+}
+
+#endif //QT_NO_PHONON_VIDEO
+
+QT_END_NAMESPACE
+
+#endif
+
diff --git a/src/3rdparty/phonon/ds9/videorenderer_evr.cpp b/src/3rdparty/phonon/ds9/videorenderer_evr.cpp
new file mode 100644
index 0000000000..d23d9ce929
--- /dev/null
+++ b/src/3rdparty/phonon/ds9/videorenderer_evr.cpp
@@ -0,0 +1,215 @@
+/* This file is part of the KDE project.
+
+Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+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 or 3 of the License.
+
+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, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#include "videorenderer_evr.h"
+#include "qevr9.h"
+
+#ifndef QT_NO_PHONON_VIDEO
+
+#include <QtGui/QWidget>
+#include <QtGui/QPainter>
+
+QT_BEGIN_NAMESPACE
+
+namespace Phonon
+{
+ namespace DS9
+ {
+ //we have to define them here because not all compilers/sdk have them
+ static const GUID MR_VIDEO_RENDER_SERVICE = {0x1092a86c, 0xab1a, 0x459a, {0xa3, 0x36, 0x83, 0x1f, 0xbc, 0x4d, 0x11, 0xff} };
+ static const GUID MR_VIDEO_MIXER_SERVICE = { 0x73cd2fc, 0x6cf4, 0x40b7, {0x88, 0x59, 0xe8, 0x95, 0x52, 0xc8, 0x41, 0xf8} };
+ static const IID IID_IMFVideoDisplayControl = {0xa490b1e4, 0xab84, 0x4d31, {0xa1, 0xb2, 0x18, 0x1e, 0x03, 0xb1, 0x07, 0x7a} };
+ static const IID IID_IMFVideoMixerControl = {0xA5C6C53F, 0xC202, 0x4aa5, {0x96, 0x95, 0x17, 0x5B, 0xA8, 0xC5, 0x08, 0xA5} };
+ static const IID IID_IMFVideoProcessor = {0x6AB0000C, 0xFECE, 0x4d1f, {0xA2, 0xAC, 0xA9, 0x57, 0x35, 0x30, 0x65, 0x6E} };
+ static const IID IID_IMFGetService = {0xFA993888, 0x4383, 0x415A, {0xA9, 0x30, 0xDD, 0x47, 0x2A, 0x8C, 0xF6, 0xF7} };
+ static const GUID CLSID_EnhancedVideoRenderer = {0xfa10746c, 0x9b63, 0x4b6c, {0xbc, 0x49, 0xfc, 0x30, 0xe, 0xa5, 0xf2, 0x56} };
+
+ template <typename T> ComPointer<T> getService(const Filter &filter, REFGUID guidService, REFIID riid)
+ {
+ //normally we should use IID_IMFGetService but this introduces another dependency
+ //so here we simply define our own IId with the same value
+ ComPointer<IMFGetService> getService(filter, IID_IMFGetService);
+ Q_ASSERT(getService);
+ T *ptr = 0;
+ HRESULT hr = getService->GetService(guidService, riid, reinterpret_cast<void **>(&ptr));
+ if (!SUCCEEDED(hr) || ptr == 0)
+ Q_ASSERT(!SUCCEEDED(hr) && ptr != 0);
+ ComPointer<T> service(ptr);
+ return service;
+ }
+
+ VideoRendererEVR::~VideoRendererEVR()
+ {
+ }
+
+ bool VideoRendererEVR::isNative() const
+ {
+ return true;
+ }
+
+ VideoRendererEVR::VideoRendererEVR(QWidget *target) : m_target(target)
+ {
+ m_filter = Filter(CLSID_EnhancedVideoRenderer, IID_IBaseFilter);
+ if (!m_filter) {
+ return;
+ }
+
+ ComPointer<IMFVideoDisplayControl> filterControl = getService<IMFVideoDisplayControl>(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl);
+
+ filterControl->SetVideoWindow(reinterpret_cast<HWND>(target->winId()));
+ filterControl->SetAspectRatioMode(MFVideoARMode_None); // We're in control of the size
+ }
+
+ QImage VideoRendererEVR::snapshot() const
+ {
+ // This will always capture black areas where no video is drawn, if any are present.
+ // Due to the hack in notifyResize()
+ ComPointer<IMFVideoDisplayControl> filterControl = getService<IMFVideoDisplayControl>(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl);
+ if (filterControl) {
+ BITMAPINFOHEADER bmi;
+ BYTE *buffer = 0;
+ DWORD bufferSize;
+ LONGLONG timeStamp;
+
+ bmi.biSize = sizeof(BITMAPINFOHEADER);
+
+ HRESULT hr = filterControl->GetCurrentImage(&bmi, &buffer, &bufferSize, &timeStamp);
+ if (SUCCEEDED(hr)) {
+
+ const int w = qAbs(bmi.biWidth),
+ h = qAbs(bmi.biHeight);
+
+ // Create image and copy data into image.
+ QImage ret(w, h, QImage::Format_RGB32);
+
+ if (!ret.isNull()) {
+ uchar *data = buffer;
+ const int bytes_per_line = w * sizeof(QRgb);
+ for (int y = h - 1; y >= 0; --y) {
+ qMemCopy(ret.scanLine(y), //destination
+ data, //source
+ bytes_per_line);
+ data += bytes_per_line;
+ }
+ }
+ ::CoTaskMemFree(buffer);
+ return ret;
+ }
+ }
+ return QImage();
+ }
+
+ QSize VideoRendererEVR::videoSize() const
+ {
+ SIZE nativeSize;
+ SIZE aspectRatioSize;
+
+ ComPointer<IMFVideoDisplayControl> filterControl = getService<IMFVideoDisplayControl>(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl);
+
+ filterControl->GetNativeVideoSize(&nativeSize, &aspectRatioSize);
+
+ return QSize(nativeSize.cx, nativeSize.cy);
+ }
+
+ void VideoRendererEVR::repaintCurrentFrame(QWidget *target, const QRect &rect)
+ {
+ // repaint the video
+ ComPointer<IMFVideoDisplayControl> filterControl = getService<IMFVideoDisplayControl>(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl);
+ // All failed results can be safely ignored
+ filterControl->RepaintVideo();
+ }
+
+ void VideoRendererEVR::notifyResize(const QSize &size, Phonon::VideoWidget::AspectRatio aspectRatio,
+ Phonon::VideoWidget::ScaleMode scaleMode)
+ {
+ if (!isActive()) {
+ RECT dummyRect = { 0, 0, 0, 0};
+ ComPointer<IMFVideoDisplayControl> filterControl = getService<IMFVideoDisplayControl>(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl);
+ filterControl->SetVideoPosition(0, &dummyRect);
+ return;
+ }
+
+ const QSize vsize = videoSize();
+ internalNotifyResize(size, vsize, aspectRatio, scaleMode);
+
+ RECT dstRectWin = { 0, 0, size.width(), size.height()};
+
+ // Resize the Stream output rect instead of the destination rect.
+ // Hacky workaround for flicker in the areas outside of the destination rect
+ // This way these areas don't exist
+ MFVideoNormalizedRect streamOutputRect = { float(m_dstX) / float(size.width()), float(m_dstY) / float(size.height()),
+ float(m_dstWidth + m_dstX) / float(size.width()), float(m_dstHeight + m_dstY) / float(size.height())};
+
+ ComPointer<IMFVideoMixerControl> filterMixer = getService<IMFVideoMixerControl>(m_filter, MR_VIDEO_MIXER_SERVICE, IID_IMFVideoMixerControl);
+ ComPointer<IMFVideoDisplayControl> filterControl = getService<IMFVideoDisplayControl>(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl);
+
+ filterMixer->SetStreamOutputRect(0, &streamOutputRect);
+ filterControl->SetVideoPosition(0, &dstRectWin);
+ }
+
+ void VideoRendererEVR::applyMixerSettings(qreal brightness, qreal contrast, qreal hue, qreal saturation)
+ {
+ InputPin sink = BackendNode::pins(m_filter, PINDIR_INPUT).first();
+ OutputPin source;
+ if (FAILED(sink->ConnectedTo(source.pparam()))) {
+ return; //it must be connected to work
+ }
+
+ // Get the "Video Processor" (used for brightness/contrast/saturation/hue)
+ ComPointer<IMFVideoProcessor> processor = getService<IMFVideoProcessor>(m_filter, MR_VIDEO_MIXER_SERVICE, IID_IMFVideoProcessor);
+ Q_ASSERT(processor);
+
+ DXVA2_ValueRange contrastRange;
+ DXVA2_ValueRange brightnessRange;
+ DXVA2_ValueRange saturationRange;
+ DXVA2_ValueRange hueRange;
+
+ if (FAILED(processor->GetProcAmpRange(DXVA2_ProcAmp_Contrast, &contrastRange)))
+ return;
+ if (FAILED(processor->GetProcAmpRange(DXVA2_ProcAmp_Brightness, &brightnessRange)))
+ return;
+ if (FAILED(processor->GetProcAmpRange(DXVA2_ProcAmp_Saturation, &saturationRange)))
+ return;
+ if (FAILED(processor->GetProcAmpRange(DXVA2_ProcAmp_Hue, &hueRange)))
+ return;
+
+ DXVA2_ProcAmpValues values;
+
+ values.Contrast = DXVA2FloatToFixed(((contrast < 0
+ ? DXVA2FixedToFloat(contrastRange.MinValue) : DXVA2FixedToFloat(contrastRange.MaxValue))
+ - DXVA2FixedToFloat(contrastRange.DefaultValue)) * qAbs(contrast) + DXVA2FixedToFloat(contrastRange.DefaultValue));
+ values.Brightness = DXVA2FloatToFixed(((brightness < 0
+ ? DXVA2FixedToFloat(brightnessRange.MinValue) : DXVA2FixedToFloat(brightnessRange.MaxValue))
+ - DXVA2FixedToFloat(brightnessRange.DefaultValue)) * qAbs(brightness) + DXVA2FixedToFloat(brightnessRange.DefaultValue));
+ values.Saturation = DXVA2FloatToFixed(((saturation < 0
+ ? DXVA2FixedToFloat(saturationRange.MinValue) : DXVA2FixedToFloat(saturationRange.MaxValue))
+ - DXVA2FixedToFloat(saturationRange.DefaultValue)) * qAbs(saturation) + DXVA2FixedToFloat(saturationRange.DefaultValue));
+ values.Hue = DXVA2FloatToFixed(((hue < 0
+ ? DXVA2FixedToFloat(hueRange.MinValue) : DXVA2FixedToFloat(hueRange.MaxValue))
+ - DXVA2FixedToFloat(hueRange.DefaultValue)) * qAbs(hue) + DXVA2FixedToFloat(hueRange.DefaultValue));
+
+ //finally set the settings
+ processor->SetProcAmpValues(DXVA2_ProcAmp_Contrast | DXVA2_ProcAmp_Brightness | DXVA2_ProcAmp_Saturation | DXVA2_ProcAmp_Hue, &values);
+
+ }
+ }
+}
+
+QT_END_NAMESPACE
+
+#endif //QT_NO_PHONON_VIDEO
diff --git a/src/3rdparty/phonon/ds9/videorenderer_evr.h b/src/3rdparty/phonon/ds9/videorenderer_evr.h
new file mode 100644
index 0000000000..229c36d6b8
--- /dev/null
+++ b/src/3rdparty/phonon/ds9/videorenderer_evr.h
@@ -0,0 +1,56 @@
+/* This file is part of the KDE project.
+
+Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+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 or 3 of the License.
+
+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, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef PHONON_VIDEORENDERER_EVR_H
+#define PHONON_VIDEORENDERER_EVR_H
+
+#include "abstractvideorenderer.h"
+#include "compointer.h"
+
+QT_BEGIN_NAMESPACE
+
+#ifndef QT_NO_PHONON_VIDEO
+
+namespace Phonon
+{
+ namespace DS9
+ {
+ class VideoRendererEVR : public AbstractVideoRenderer
+ {
+ public:
+ VideoRendererEVR(QWidget *target);
+ ~VideoRendererEVR();
+
+ //Implementation from AbstractVideoRenderer
+ void repaintCurrentFrame(QWidget *target, const QRect &rect);
+ void notifyResize(const QSize&, Phonon::VideoWidget::AspectRatio, Phonon::VideoWidget::ScaleMode);
+ QSize videoSize() const;
+ QImage snapshot() const;
+ void applyMixerSettings(qreal brightness, qreal contrast, qreal m_hue, qreal saturation);
+ bool isNative() const;
+ private:
+ QWidget *m_target;
+ };
+ }
+}
+
+#endif //QT_NO_PHONON_VIDEO
+
+QT_END_NAMESPACE
+
+#endif
+
diff --git a/src/3rdparty/phonon/ds9/videorenderer_soft.cpp b/src/3rdparty/phonon/ds9/videorenderer_soft.cpp
index f7d42cf1fe..9c7993c7f2 100644
--- a/src/3rdparty/phonon/ds9/videorenderer_soft.cpp
+++ b/src/3rdparty/phonon/ds9/videorenderer_soft.cpp
@@ -45,7 +45,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#endif
#ifndef QT_NO_OPENGL
-#include <gl/gl.h>
+#include <GL/gl.h>
#ifndef GL_FRAGMENT_PROGRAM_ARB
#define GL_FRAGMENT_PROGRAM_ARB 0x8804
#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
diff --git a/src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp b/src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp
index 81ebb8bfcb..545b31eea9 100644
--- a/src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp
+++ b/src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp
@@ -22,14 +22,9 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <QtGui/QWidget>
#include <QtGui/QPainter>
-#include <QtCore/QTimerEvent>
-#ifndef Q_OS_WINCE
#include <d3d9.h>
#include <vmr9.h>
-#else
-#include <uuids.h>
-#endif
QT_BEGIN_NAMESPACE
@@ -48,116 +43,10 @@ namespace Phonon
}
-#ifdef Q_OS_WINCE
- VideoRendererVMR9::VideoRendererVMR9(QWidget *target) : m_target(target)
- {
- m_target->setAttribute(Qt::WA_PaintOnScreen, true);
- m_filter = Filter(CLSID_VideoRenderer, IID_IBaseFilter);
- }
-
- QSize VideoRendererVMR9::videoSize() const
- {
- LONG w = 0,
- h = 0;
- ComPointer<IBasicVideo> basic(m_filter, IID_IBasicVideo);
- if (basic) {
- basic->GetVideoSize( &w, &h);
- }
- return QSize(w, h);
- }
-
- void VideoRendererVMR9::repaintCurrentFrame(QWidget * /*target*/, const QRect & /*rect*/)
- {
- //nothing to do here: the renderer paints everything
- }
-
- void VideoRendererVMR9::notifyResize(const QSize &size, Phonon::VideoWidget::AspectRatio aspectRatio,
- Phonon::VideoWidget::ScaleMode scaleMode)
- {
- if (!isActive()) {
- ComPointer<IBasicVideo> basic(m_filter, IID_IBasicVideo);
- if (basic) {
- basic->SetDestinationPosition(0, 0, 0, 0);
- }
- return;
- }
-
- ComPointer<IVideoWindow> video(m_filter, IID_IVideoWindow);
-
- OAHWND owner;
- HRESULT hr = video->get_Owner(&owner);
- if (FAILED(hr)) {
- return;
- }
-
- const OAHWND newOwner = reinterpret_cast<OAHWND>(m_target->winId());
- if (owner != newOwner) {
- video->put_Owner(newOwner);
- video->put_MessageDrain(newOwner);
- video->put_WindowStyle(WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
- }
-
- //make sure the widget takes the whole size of the parent
- video->SetWindowPosition(0, 0, size.width(), size.height());
-
- const QSize vsize = videoSize();
- internalNotifyResize(size, vsize, aspectRatio, scaleMode);
-
- ComPointer<IBasicVideo> basic(m_filter, IID_IBasicVideo);
- if (basic) {
- basic->SetDestinationPosition(m_dstX, m_dstY, m_dstWidth, m_dstHeight);
- }
- }
-
- void VideoRendererVMR9::applyMixerSettings(qreal /*brightness*/, qreal /*contrast*/, qreal /*m_hue*/, qreal /*saturation*/)
- {
- //this can't be supported for WinCE
- }
-
- QImage VideoRendererVMR9::snapshot() const
- {
- ComPointer<IBasicVideo> basic(m_filter, IID_IBasicVideo);
- if (basic) {
- LONG bufferSize = 0;
- //1st we get the buffer size
- basic->GetCurrentImage(&bufferSize, 0);
-
- QByteArray buffer;
- buffer.resize(bufferSize);
- HRESULT hr = basic->GetCurrentImage(&bufferSize, reinterpret_cast<long*>(buffer.data()));
-
- if (SUCCEEDED(hr)) {
-
- const BITMAPINFOHEADER *bmi = reinterpret_cast<const BITMAPINFOHEADER*>(buffer.constData());
-
- const int w = qAbs(bmi->biWidth),
- h = qAbs(bmi->biHeight);
-
- // Create image and copy data into image.
- QImage ret(w, h, QImage::Format_RGB32);
-
- if (!ret.isNull()) {
- const char *data = buffer.constData() + bmi->biSize;
- const int bytes_per_line = w * sizeof(QRgb);
- for (int y = h - 1; y >= 0; --y) {
- qMemCopy(ret.scanLine(y), //destination
- data, //source
- bytes_per_line);
- data += bytes_per_line;
- }
- }
- return ret;
- }
- }
- return QImage();
- }
-
-#else
VideoRendererVMR9::VideoRendererVMR9(QWidget *target) : m_target(target)
{
m_filter = Filter(CLSID_VideoMixingRenderer9, IID_IBaseFilter);
if (!m_filter) {
- qWarning("the video widget could not be initialized correctly");
return;
}
@@ -325,7 +214,6 @@ namespace Phonon
//finally set the settings
mixer->SetProcAmpControl(0, &ctrl);
}
-#endif
}
}
diff --git a/src/3rdparty/phonon/ds9/videorenderer_vmr9.h b/src/3rdparty/phonon/ds9/videorenderer_vmr9.h
index 4eb237e128..516d79d875 100644
--- a/src/3rdparty/phonon/ds9/videorenderer_vmr9.h
+++ b/src/3rdparty/phonon/ds9/videorenderer_vmr9.h
@@ -19,7 +19,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#define PHONON_VIDEORENDERER_VMR9_H
#include "abstractvideorenderer.h"
-#include "compointer.h"
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/phonon/ds9/videowidget.cpp b/src/3rdparty/phonon/ds9/videowidget.cpp
index 95423c68ae..09d42a44ec 100644
--- a/src/3rdparty/phonon/ds9/videowidget.cpp
+++ b/src/3rdparty/phonon/ds9/videowidget.cpp
@@ -24,7 +24,12 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include "mediaobject.h"
+#ifndef Q_OS_WINCE
+#include "videorenderer_evr.h"
#include "videorenderer_vmr9.h"
+#else
+#include "videorenderer_default.h"
+#endif
#include "videorenderer_soft.h"
QT_BEGIN_NAMESPACE
@@ -352,14 +357,29 @@ namespace Phonon
int index = graphIndex * 2 + type;
if (m_renderers[index] == 0 && autoCreate) {
AbstractVideoRenderer *renderer = 0;
- if (type == Native) {
- renderer = new VideoRendererVMR9(m_widget);
+ if (type == Native) {
+#ifndef Q_OS_WINCE
+ renderer = new VideoRendererEVR(m_widget);
if (renderer->getFilter() == 0) {
- //instanciating the renderer might fail with error VFW_E_DDRAW_CAPS_NOT_SUITABLE (0x80040273)
+ delete renderer;
+ //EVR not present, let's try VMR
+ renderer = new VideoRendererVMR9(m_widget);
+ if (renderer->getFilter() == 0) {
+ //instanciating the renderer might fail
+ m_noNativeRendererSupported = true;
+ delete renderer;
+ renderer = 0;
+ }
+ }
+#else
+ renderer = new VideoRendererDefault(m_widget);
+ if (renderer->getFilter() == 0) {
+ //instanciating the renderer might fail
m_noNativeRendererSupported = true;
delete renderer;
renderer = 0;
}
+#endif
}
if (renderer == 0) {
diff --git a/src/3rdparty/phonon/phonon/objectdescriptionmodel.cpp b/src/3rdparty/phonon/phonon/objectdescriptionmodel.cpp
index 7237e91c93..bf5be6d8b2 100644
--- a/src/3rdparty/phonon/phonon/objectdescriptionmodel.cpp
+++ b/src/3rdparty/phonon/phonon/objectdescriptionmodel.cpp
@@ -67,8 +67,6 @@ static const char qt_meta_stringdata_Phonon__ObjectDescriptionModel_Visualizatio
namespace Phonon
{
-#if !defined(Q_CC_MINGW) || __MINGW32_MAJOR_VERSION >= 4
-
template<> const QMetaObject ObjectDescriptionModel<AudioOutputDeviceType>::staticMetaObject = {
{ &QAbstractListModel::staticMetaObject, qt_meta_stringdata_Phonon__ObjectDescriptionModel_AudioOutputDeviceType,
qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
@@ -139,7 +137,6 @@ int ObjectDescriptionModel<type>::qt_metacall(QMetaObject::Call _c, int _id, voi
return QAbstractListModel::qt_metacall(_c, _id, _a);
}
*/
-#endif
int ObjectDescriptionModelData::rowCount(const QModelIndex &parent) const
{
@@ -365,8 +362,6 @@ QStringList ObjectDescriptionModelData::mimeTypes(ObjectDescriptionType type) co
return QStringList(QLatin1String("application/x-phonon-objectdescription") + QString::number(static_cast<int>(type)));
}
-#if !defined(Q_CC_MINGW) || __MINGW32_MAJOR_VERSION >= 4
-#if !defined(Q_CC_MSVC) || _MSC_VER > 1300 || defined(Q_CC_INTEL)
#define INSTANTIATE_META_FUNCTIONS(type) \
template const QMetaObject *ObjectDescriptionModel<type>::metaObject() const; \
template void *ObjectDescriptionModel<type>::qt_metacast(const char *)
@@ -376,7 +371,6 @@ INSTANTIATE_META_FUNCTIONS(AudioCaptureDeviceType);
INSTANTIATE_META_FUNCTIONS(EffectType);
INSTANTIATE_META_FUNCTIONS(AudioChannelType);
INSTANTIATE_META_FUNCTIONS(SubtitleType);
-#endif
/*INSTANTIATE_META_FUNCTIONS(VideoOutputDeviceType);
INSTANTIATE_META_FUNCTIONS(VideoCaptureDeviceType);
INSTANTIATE_META_FUNCTIONS(AudioCodecType);
@@ -384,7 +378,6 @@ INSTANTIATE_META_FUNCTIONS(VideoCodecType);
INSTANTIATE_META_FUNCTIONS(ContainerFormatType);
INSTANTIATE_META_FUNCTIONS(VisualizationType);
*/
-#endif //Q_CC_MINGW
} // namespace Phonon
#endif //QT_NO_PHONON_OBJECTDESCRIPTIONMODEL
diff --git a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h
index 96187c35e5..8fd622f46e 100644
--- a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h
+++ b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h
@@ -195,13 +195,6 @@ and existing builds. */
public:
Q_OBJECT_CHECK
-/* MinGW 3.4.x gives an ICE when trying to instantiate one of the
- ObjectDescriptionModel<foo> classes because it can't handle
- half exported classes correct. gcc 4.3.x has a fix for this but
- we currently there's no official gcc 4.3 on windows available.
- Because of this we need this little hack
- */
-#if !defined(Q_CC_MINGW) || __MINGW32_MAJOR_VERSION >= 4
/** \internal */
static PHONON_TEMPLATE_CLASS_MEMBER_EXPORT const QMetaObject staticMetaObject;
/** \internal */
@@ -209,7 +202,6 @@ and existing builds. */
/** \internal */
PHONON_TEMPLATE_CLASS_MEMBER_EXPORT void *qt_metacast(const char *_clname);
//int qt_metacall(QMetaObject::Call _c, int _id, void **_a);
-#endif
/**
* Returns the number of rows in the model. This value corresponds
diff --git a/src/3rdparty/phonon/waveout/mediaobject.cpp b/src/3rdparty/phonon/waveout/mediaobject.cpp
index db71942afa..fdd81a72c7 100644
--- a/src/3rdparty/phonon/waveout/mediaobject.cpp
+++ b/src/3rdparty/phonon/waveout/mediaobject.cpp
@@ -50,7 +50,7 @@ namespace Phonon
{
ushort b[256];
waveOutGetErrorText(error, (LPWSTR)b, 256);
- return QString::fromUtf16(b);
+ return QString((const QChar *)b);
}
class WorkerThread : public QThread
@@ -70,7 +70,7 @@ namespace Phonon
}
- void CALLBACK MediaObject::WaveOutCallBack(HWAVEOUT m_hWaveOut, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2)
+ void QT_WIN_CALLBACK MediaObject::WaveOutCallBack(HWAVEOUT m_hWaveOut, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2)
{
Q_UNUSED(m_hWaveOut);
Q_UNUSED(dwInstance);
diff --git a/src/3rdparty/phonon/waveout/mediaobject.h b/src/3rdparty/phonon/waveout/mediaobject.h
index dd6b24bc6c..bb1410a8dd 100644
--- a/src/3rdparty/phonon/waveout/mediaobject.h
+++ b/src/3rdparty/phonon/waveout/mediaobject.h
@@ -112,7 +112,7 @@ namespace Phonon
void deleteValidWaveOutDevice();
void playBuffer(WAVEHDR *waveHeader);
- static void CALLBACK WaveOutCallBack(HWAVEOUT hWaveOut, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2);
+ static void QT_WIN_CALLBACK WaveOutCallBack(HWAVEOUT hWaveOut, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2);
struct {
WAVEHDR *waveHeader;
diff --git a/src/3rdparty/webkit/WebCore/accessibility/qt/AccessibilityObjectQt.cpp b/src/3rdparty/webkit/WebCore/accessibility/qt/AccessibilityObjectQt.cpp
index 07f13d4bb7..756ece31c6 100644
--- a/src/3rdparty/webkit/WebCore/accessibility/qt/AccessibilityObjectQt.cpp
+++ b/src/3rdparty/webkit/WebCore/accessibility/qt/AccessibilityObjectQt.cpp
@@ -20,6 +20,8 @@
#include "config.h"
#include "AccessibilityObject.h"
+QT_BEGIN_NAMESPACE
+
#if HAVE(ACCESSIBILITY)
namespace WebCore {
@@ -37,3 +39,5 @@ AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformI
} // namespace WebCore
#endif // HAVE(ACCESSIBILITY)
+
+QT_END_NAMESPACE
diff --git a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp
index 79fc51ebaa..5c87fe6231 100644
--- a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp
@@ -368,7 +368,7 @@ static inline void handleElementNamespaces(Element* newElement, const QXmlStream
for (int i = 0; i < ns.count(); ++i) {
const QXmlStreamNamespaceDeclaration &decl = ns[i];
String namespaceURI = decl.namespaceUri();
- String namespaceQName = decl.prefix().isEmpty() ? String("xmlns") : String("xmlns:") + decl.prefix();
+ String namespaceQName = decl.prefix().isEmpty() ? String("xmlns") : String("xmlns:") + String(decl.prefix());
newElement->setAttributeNS("http://www.w3.org/2000/xmlns/", namespaceQName, namespaceURI, ec);
if (ec) // exception setting attributes
return;
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
index 7a1bfd579e..5fbc876a8e 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
@@ -179,7 +179,7 @@ void InspectorClientQt::populateSetting(const String& key, InspectorController::
return;
}
- QString settingKey(settingStoragePrefix + key);
+ QString settingKey(settingStoragePrefix + QString(key));
QString storedValueType = qsettings.value(settingKey + settingStorageTypeSuffix).toString();
QVariant storedValue = qsettings.value(settingKey);
storedValue.convert(QVariant::nameToType(storedValueType.toAscii().data()));
@@ -196,7 +196,7 @@ void InspectorClientQt::storeSetting(const String& key, const InspectorControlle
}
QVariant valueToStore = settingToVariant(setting);
- QString settingKey(settingStoragePrefix + key);
+ QString settingKey(settingStoragePrefix + QString(key));
qsettings.setValue(settingKey, valueToStore);
qsettings.setValue(settingKey + settingStorageTypeSuffix, QVariant::typeToName(valueToStore.type()));
}
diff --git a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc
index 411762abea..9e653e4dc5 100644
--- a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc
+++ b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc
@@ -83,9 +83,6 @@
QtWebKit is based on the Open Source WebKit engine. More information about
WebKit itself can be found on the \l{WebKit Open Source Project} Web site.
- The QtWebKit module is part of the \l{Qt Full Framework Edition}, and the
- \l{Open Source Versions of Qt}.
-
\note Building the QtWebKit module with debugging symbols is problematic
on many platforms due to the size of the WebKit engine. We recommend
building the module only in release mode for embedded platforms.
diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp
index 99447a98a8..76927494b3 100644
--- a/src/activeqt/container/qaxbase.cpp
+++ b/src/activeqt/container/qaxbase.cpp
@@ -1353,11 +1353,9 @@ bool QAxBase::initializeFromFile(IUnknown** ptr)
// There seams to be a naming problem in mingw headers
-#ifdef Q_CC_GNU
-#ifndef COAUTHIDENTITY
+#if defined(Q_CC_GNU) && !defined(COAUTHIDENTITY) && !defined(__MINGW64_VERSION_MAJOR)
#define COAUTHIDENTITY AUTH_IDENTITY
#endif
-#endif
/*!
@@ -2543,6 +2541,11 @@ void MetaObjectGenerator::readFuncsInfo(ITypeInfo *typeinfo, ushort nFuncs)
break;
}
if (funcdesc->invkind == INVOKE_PROPERTYPUT) {
+ // remove the typename guessed for property setters
+ // its done only for setter's with more than one parameter.
+ if (funcdesc->cParams - funcdesc->cParamsOpt > 1) {
+ type.clear();
+ }
QByteArray set;
if (isupper(prototype.at(0))) {
set = "Set";
diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp
index 865c26c6bb..7afce5bf2b 100644
--- a/src/activeqt/container/qaxwidget.cpp
+++ b/src/activeqt/container/qaxwidget.cpp
@@ -77,25 +77,21 @@
// #define QAX_SUPPORT_BORDERSPACE
// missing interface from win32api
-#if defined(Q_CC_GNU)
-# if !defined(IOleInPlaceObjectWindowless)
-# undef INTERFACE
-# define INTERFACE IOleInPlaceObjectWindowless
- DECLARE_INTERFACE_(IOleInPlaceObjectWindowless,IOleInPlaceObject)
- {
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
- STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
- STDMETHOD(InPlaceDeactivate)(THIS) PURE;
- STDMETHOD(UIDeactivate)(THIS) PURE;
- STDMETHOD(SetObjectRects)(THIS_ LPCRECT,LPCRECT) PURE;
- STDMETHOD(ReactivateAndUndo)(THIS) PURE;
- STDMETHOD(OnWindowMessage)(THIS_ UINT, WPARAM, LPARAM, LRESULT*) PURE;
- STDMETHOD(GetDropTarget)(THIS_ IDropTarget**) PURE;
- };
-# endif
+#if defined(Q_CC_GNU) && !defined(__MINGW64_VERSION_MAJOR)
+ DECLARE_INTERFACE_(IOleInPlaceObjectWindowless,IOleInPlaceObject)
+ {
+ STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
+ STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
+ STDMETHOD(InPlaceDeactivate)(THIS) PURE;
+ STDMETHOD(UIDeactivate)(THIS) PURE;
+ STDMETHOD(SetObjectRects)(THIS_ LPCRECT,LPCRECT) PURE;
+ STDMETHOD(ReactivateAndUndo)(THIS) PURE;
+ STDMETHOD(OnWindowMessage)(THIS_ UINT, WPARAM, LPARAM, LRESULT*) PURE;
+ STDMETHOD(GetDropTarget)(THIS_ IDropTarget**) PURE;
+ };
#endif
#include "../shared/qaxtypes.h"
diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp
index 5fa0aad942..ca16b397e0 100644
--- a/src/activeqt/control/qaxserverbase.cpp
+++ b/src/activeqt/control/qaxserverbase.cpp
@@ -160,7 +160,7 @@ public:
void createMenu(QMenuBar *menuBar);
void removeMenu();
- static LRESULT CALLBACK ActiveXProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+ static LRESULT QT_WIN_CALLBACK ActiveXProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
// Object registration with OLE
void registerActiveObject(IUnknown *object);
@@ -764,7 +764,7 @@ private:
};
// callback for DLL server to hook into non-Qt eventloop
-LRESULT CALLBACK axs_FilterProc(int nCode, WPARAM wParam, LPARAM lParam)
+LRESULT QT_WIN_CALLBACK axs_FilterProc(int nCode, WPARAM wParam, LPARAM lParam)
{
if (qApp && !invokeCount)
qApp->sendPostedEvents();
@@ -1350,7 +1350,7 @@ class HackWidget : public QWidget
The semantics of \a wParam and \a lParam depend on the value of \a uMsg.
*/
-LRESULT CALLBACK QAxServerBase::ActiveXProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+LRESULT QT_WIN_CALLBACK QAxServerBase::ActiveXProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
if (uMsg == WM_CREATE) {
CREATESTRUCT *cs = (CREATESTRUCT*)lParam;
@@ -1536,7 +1536,7 @@ HWND QAxServerBase::create(HWND hWndParent, RECT& rcPos)
HINSTANCE hInst = (HINSTANCE)qAxInstance;
EnterCriticalSection(&createWindowSection);
QString cn(QLatin1String("QAxControl"));
- cn += QString::number((int)ActiveXProc);
+ cn += QString::number((quintptr)ActiveXProc);
if (!atom) {
WNDCLASS wcTemp;
wcTemp.style = CS_DBLCLKS;
@@ -1599,10 +1599,10 @@ HMENU QAxServerBase::createPopup(QMenu *popup, HMENU oldMenu)
ushort itemId;
if (flags & MF_POPUP) {
itemId = static_cast<ushort>(
- reinterpret_cast<ulong>(createPopup(action->menu()))
+ reinterpret_cast<quintptr>(createPopup(action->menu()))
);
} else {
- itemId = static_cast<ushort>(reinterpret_cast<ulong>(action));
+ itemId = static_cast<ushort>(reinterpret_cast<quintptr>(action));
actionMap.remove(itemId);
actionMap.insert(itemId, action);
}
@@ -1646,10 +1646,10 @@ void QAxServerBase::createMenu(QMenuBar *menuBar)
ushort itemId;
if (flags & MF_POPUP) {
itemId = static_cast<ushort>(
- reinterpret_cast<ulong>(createPopup(action->menu()))
+ reinterpret_cast<quintptr>(createPopup(action->menu()))
);
} else {
- itemId = static_cast<ushort>(reinterpret_cast<ulong>(action));
+ itemId = static_cast<ushort>(reinterpret_cast<quintptr>(action));
actionMap.insert(itemId, action);
}
AppendMenu(hmenuShared, flags, itemId, (const wchar_t *)action->text().utf16());
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index cedb43fbb2..f834a80ee6 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -161,7 +161,9 @@
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_THREAD
Q_GLOBAL_STATIC(QThreadStorage<QUnifiedTimer *>, unifiedTimer)
+#endif
QUnifiedTimer::QUnifiedTimer() :
QObject(), lastTick(0), timingInterval(DEFAULT_TIMER_INTERVAL),
@@ -173,12 +175,17 @@ QUnifiedTimer::QUnifiedTimer() :
QUnifiedTimer *QUnifiedTimer::instance()
{
QUnifiedTimer *inst;
+#ifndef QT_NO_THREAD
if (!unifiedTimer()->hasLocalData()) {
inst = new QUnifiedTimer;
unifiedTimer()->setLocalData(inst);
} else {
inst = unifiedTimer()->localData();
}
+#else
+ static QUnifiedTimer unifiedTimer;
+ inst = &unifiedTimer;
+#endif
return inst;
}
@@ -242,7 +249,7 @@ void QUnifiedTimer::timerEvent(QTimerEvent *event)
animationTimer.stop();
isPauseTimerActive = false;
// invalidate the start reference time
- time = QTime();
+ time.invalidate();
} else {
restartAnimationTimer();
if (!time.isValid()) {
diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h
index ad35d893d9..8bc3224be2 100644
--- a/src/corelib/animation/qabstractanimation_p.h
+++ b/src/corelib/animation/qabstractanimation_p.h
@@ -58,6 +58,10 @@
#include <QtCore/qtimer.h>
#include <private/qobject_p.h>
+#ifdef Q_OS_WIN
+#include <qt_windows.h>
+#endif
+
#ifndef QT_NO_ANIMATION
QT_BEGIN_NAMESPACE
@@ -109,6 +113,61 @@ private:
Q_DECLARE_PUBLIC(QAbstractAnimation)
};
+class ElapsedTimer
+{
+public:
+ ElapsedTimer() {
+ invalidate();
+ }
+
+ void invalidate() {
+ m_started = -1;
+ }
+
+ bool isValid() const {
+ return m_started >= 0;
+ }
+
+ void start() {
+ m_started = getTickCount_sys();
+ }
+
+ qint64 elapsed() const {
+ qint64 current = getTickCount_sys();
+ qint64 delta = current - m_started;
+ if (delta < 0)
+ delta += getPeriod_sys(); //we wrapped around
+ return delta;
+ }
+
+private:
+ enum {
+ MSECS_PER_HOUR = 3600000,
+ MSECS_PER_MIN = 60000
+ };
+
+ qint64 m_started;
+
+ quint64 getPeriod_sys() const {
+#ifdef Q_OS_WIN
+ return Q_UINT64_C(0x100000000);
+#else
+ // fallback
+ return 86400 * 1000;
+#endif
+ }
+
+ qint64 getTickCount_sys() const {
+#ifdef Q_OS_WIN
+ return ::GetTickCount();
+#else
+ // fallback
+ const QTime t = QTime::currentTime();
+ return MSECS_PER_HOUR * t.hour() + MSECS_PER_MIN * t.minute() + 1000 * t.second() + t.msec();
+#endif
+ }
+};
+
class QUnifiedTimer : public QObject
{
@@ -162,7 +221,8 @@ private:
// timer used to delay the check if we should start/stop the animation timer
QBasicTimer startStopAnimationTimer;
- QTime time;
+ ElapsedTimer time;
+
int lastTick;
int timingInterval;
int currentAnimationIdx;
diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp
index cfd7cc2fcb..37b79bae14 100644
--- a/src/corelib/animation/qpropertyanimation.cpp
+++ b/src/corelib/animation/qpropertyanimation.cpp
@@ -118,7 +118,9 @@ void QPropertyAnimationPrivate::updateMetaProperty()
propertyType = QVariant::Invalid;
if (!targetValue->dynamicPropertyNames().contains(propertyName))
qWarning("QPropertyAnimation: you're trying to animate a non-existing property %s of your QObject", propertyName.constData());
- }
+ } else if (!targetValue->metaObject()->property(propertyIndex).isWritable()) {
+ qWarning("QPropertyAnimation: you're trying to animate the non-writable property %s of your QObject", propertyName.constData());
+ }
}
void QPropertyAnimationPrivate::updateProperty(const QVariant &newValue)
@@ -265,7 +267,9 @@ void QPropertyAnimation::updateState(QAbstractAnimation::State newState,
QPropertyAnimation *animToStop = 0;
{
+#ifndef QT_NO_THREAD
QMutexLocker locker(QMutexPool::globalInstanceGet(&staticMetaObject));
+#endif
typedef QPair<QObject *, QByteArray> QPropertyAnimationPair;
typedef QHash<QPropertyAnimationPair, QPropertyAnimation*> QPropertyAnimationHash;
static QPropertyAnimationHash hash;
diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp
index 115edbe0f2..173802dfb0 100644
--- a/src/corelib/animation/qvariantanimation.cpp
+++ b/src/corelib/animation/qvariantanimation.cpp
@@ -431,7 +431,9 @@ void QVariantAnimation::registerInterpolator(QVariantAnimation::Interpolator fun
{
// will override any existing interpolators
QInterpolatorVector *interpolators = registeredInterpolators();
+#ifndef QT_NO_THREAD
QMutexLocker locker(QMutexPool::globalInstanceGet(interpolators));
+#endif
if (int(interpolationType) >= interpolators->count())
interpolators->resize(int(interpolationType) + 1);
interpolators->replace(interpolationType, func);
@@ -446,7 +448,9 @@ template<typename T> static inline QVariantAnimation::Interpolator castToInterpo
QVariantAnimation::Interpolator QVariantAnimationPrivate::getInterpolator(int interpolationType)
{
QInterpolatorVector *interpolators = registeredInterpolators();
+#ifndef QT_NO_THREAD
QMutexLocker locker(QMutexPool::globalInstanceGet(interpolators));
+#endif
QVariantAnimation::Interpolator ret = 0;
if (interpolationType < interpolators->count()) {
ret = interpolators->at(interpolationType);
diff --git a/src/corelib/codecs/codecs.pri b/src/corelib/codecs/codecs.pri
index 17f4d91c77..c572e084d7 100644
--- a/src/corelib/codecs/codecs.pri
+++ b/src/corelib/codecs/codecs.pri
@@ -31,7 +31,7 @@ unix {
DEFINES += GNU_LIBICONV
!mac:LIBS_PRIVATE *= -liconv
- } else {
+ } else:!symbian {
# no iconv, so we put all plugins in the library
HEADERS += \
../plugins/codecs/cn/qgb18030codec.h \
@@ -52,3 +52,4 @@ unix {
../plugins/codecs/jp/qfontjpcodec.cpp
}
}
+symbian:LIBS += -lcharconv
diff --git a/src/corelib/codecs/qsimplecodec.cpp b/src/corelib/codecs/qsimplecodec.cpp
index 4cc7912ea0..a6f5c9ef31 100644
--- a/src/corelib/codecs/qsimplecodec.cpp
+++ b/src/corelib/codecs/qsimplecodec.cpp
@@ -54,6 +54,7 @@ static const struct {
int mib;
quint16 values[128];
} unicodevalues[QSimpleTextCodec::numSimpleCodecs] = {
+#ifndef Q_OS_SYMBIAN
// from RFC 1489, ftp://ftp.isi.edu/in-notes/rfc1489.txt
{ "KOI8-R", { "csKOI8R", 0 }, 2084,
{ 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524,
@@ -288,6 +289,7 @@ static const struct {
0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
0x0175, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x1E6B,
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x0177, 0x00FF} },
+#endif
{ "ISO-8859-16", { "iso-ir-226", "latin10", 0 }, 112,
{ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
@@ -309,7 +311,7 @@ static const struct {
// next bits generated again from tables on the Unicode 3.0 CD.
// $ for a in CP* ; do (awk '/^0x[89ABCDEF]/{ print $1, $2 }' < $a) | sort | sed -e 's/#UNDEF.*$/0xFFFD/' | cut -c6- | paste '-d ' - - - - - - - - | sed -e 's/ /, /g' -e 's/$/,/' -e '$ s/,$/} },/' -e '1 s/^/{ /' > ~/tmp/$a ; done
-
+#ifndef Q_OS_SYMBIAN
{ "IBM850", { "CP850", "csPC850Multilingual", 0 }, 2009,
{ 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
@@ -344,6 +346,7 @@ static const struct {
0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F,
0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57,
0x0E58, 0x0E59, 0x0E5A, 0x0E5B, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD} },
+#endif //Q_OS_SYMBIAN
{ "IBM866", { "CP866", "csIBM866", 0 }, 2086,
{ 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
@@ -362,6 +365,7 @@ static const struct {
0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040E, 0x045E,
0x00B0, 0x2219, 0x00B7, 0x221A, 0x2116, 0x00A4, 0x25A0, 0x00A0} },
+#ifndef Q_OS_SYMBIAN
{ "windows-1250", { "CP1250", 0 }, 2250,
{ 0x20AC, 0xFFFD, 0x201A, 0xFFFD, 0x201E, 0x2026, 0x2020, 0x2021,
0xFFFD, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179,
@@ -516,6 +520,7 @@ static const struct {
0x0111, 0x00F1, 0x0323, 0x00F3, 0x00F4, 0x01A1, 0x00F6, 0x00F7,
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x01B0, 0x20AB, 0x00FF} },
+#endif
{ "Apple Roman", { "macintosh", "MacRoman", 0 }, -168,
{ 0x00C4, 0x00C5, 0x00C7, 0x00C9, 0x00D1, 0x00D6, 0x00DC, 0x00E1,
0x00E0, 0x00E2, 0x00E4, 0x00E3, 0x00E5, 0x00E7, 0x00E9, 0x00E8,
@@ -534,8 +539,6 @@ static const struct {
0xF8FF, 0x00D2, 0x00DA, 0x00DB, 0x00D9, 0x0131, 0x02C6, 0x02DC,
0x00AF, 0x02D8, 0x02D9, 0x02DA, 0x00B8, 0x02DD, 0x02DB, 0x02C7} },
-
-
// This one is based on the charmap file
// /usr/share/i18n/charmaps/SAMI-WS2.gz, which is manually adapted
// to this format by Boerre Gaup <boerre@subdimension.com>
@@ -557,7 +560,7 @@ static const struct {
0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF} },
-
+#ifndef Q_OS_SYMBIAN
// this one is generated from the charmap file located in /usr/share/i18n/charmaps
// on most Linux distributions. The thai character set tis620 is byte by byte equivalent
// to iso8859-11, so we name it 8859-11 here, but recognise the name tis620 too.
@@ -581,6 +584,7 @@ static const struct {
0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57,
0x0E58, 0x0E59, 0x0E5A, 0x0E5B, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD } },
+#endif
/*
Name: hp-roman8 [HP-PCL5,RFC1345,KXS2]
MIBenum: 2004
diff --git a/src/corelib/codecs/qsimplecodec_p.h b/src/corelib/codecs/qsimplecodec_p.h
index b53eb95e78..57503b23cd 100644
--- a/src/corelib/codecs/qsimplecodec_p.h
+++ b/src/corelib/codecs/qsimplecodec_p.h
@@ -64,7 +64,11 @@ template <typename T> class QAtomicPointer;
class QSimpleTextCodec: public QTextCodec
{
public:
+#ifdef Q_OS_SYMBIAN
+ enum { numSimpleCodecs = 5 };
+#else
enum { numSimpleCodecs = 30 };
+#endif
explicit QSimpleTextCodec(int);
~QSimpleTextCodec();
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index c0aa342235..4034218490 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -64,6 +64,7 @@
#ifndef QT_NO_CODECS
# include "qtsciicodec_p.h"
# include "qisciicodec_p.h"
+#ifndef Q_OS_SYMBIAN
# if defined(QT_NO_ICONV) && !defined(QT_BOOTSTRAPPED)
// no iconv(3) support, must build all codecs into the library
# include "../../plugins/codecs/cn/qgb18030codec.h"
@@ -77,6 +78,7 @@
# include "qfontlaocodec_p.h"
# include "../../plugins/codecs/jp/qfontjpcodec.h"
# endif
+#endif // QT_NO_SYMBIAN
#endif // QT_NO_CODECS
#include "qlocale.h"
#include "qmutex.h"
@@ -93,6 +95,11 @@
# define QT_NO_SETLOCALE
#endif
+#ifdef Q_OS_SYMBIAN
+#include "qtextcodec_symbian.cpp"
+#endif
+
+
// enabling this is not exception safe!
// #define Q_DEBUG_TEXTCODEC
@@ -537,6 +544,12 @@ static QTextCodec *checkForCodec(const QByteArray &name) {
*/
static void setupLocaleMapper()
{
+#ifdef Q_OS_SYMBIAN
+ localeMapper = QSymbianTextCodec::localeMapper;
+ if (localeMapper)
+ return;
+#endif
+
#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
localeMapper = QTextCodec::codecForName("System");
#else
@@ -680,6 +693,17 @@ static void setup()
(void) createQTextCodecCleanup();
#ifndef QT_NO_CODECS
+ (void)new QTsciiCodec;
+ for (int i = 0; i < 9; ++i)
+ (void)new QIsciiCodec(i);
+
+ for (int i = 0; i < QSimpleTextCodec::numSimpleCodecs; ++i)
+ (void)new QSimpleTextCodec(i);
+
+#ifdef Q_OS_SYMBIAN
+ localeMapper = QSymbianTextCodec::init();
+#endif
+
# if defined(Q_WS_X11) && !defined(QT_BOOTSTRAPPED)
// no font codecs when bootstrapping
(void)new QFontLaoCodec;
@@ -696,12 +720,8 @@ static void setup()
# endif // QT_NO_ICONV && !QT_BOOTSTRAPPED
# endif // Q_WS_X11
- (void)new QTsciiCodec;
-
- for (int i = 0; i < 9; ++i)
- (void)new QIsciiCodec(i);
-
+#ifndef Q_OS_SYMBIAN
# if defined(QT_NO_ICONV) && !defined(QT_BOOTSTRAPPED)
// no asian codecs when bootstrapping, sorry
(void)new QGb18030Codec;
@@ -715,6 +735,7 @@ static void setup()
(void)new QBig5Codec;
(void)new QBig5hkscsCodec;
# endif // QT_NO_ICONV && !QT_BOOTSTRAPPED
+#endif //Q_OS_SYMBIAN
#endif // QT_NO_CODECS
#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
@@ -727,17 +748,18 @@ static void setup()
(void)new QUtf32Codec;
(void)new QUtf32BECodec;
(void)new QUtf32LECodec;
+#ifndef Q_OS_SYMBIAN
(void)new QLatin15Codec;
+#endif
(void)new QLatin1Codec;
(void)new QUtf8Codec;
- for (int i = 0; i < QSimpleTextCodec::numSimpleCodecs; ++i)
- (void)new QSimpleTextCodec(i);
-
+#ifndef Q_OS_SYMBIAN
#if defined(Q_OS_UNIX) && !defined(QT_NO_ICONV) && !defined(QT_BOOTSTRAPPED)
// QIconvCodec depends on the UTF-16 codec, so it needs to be created last
(void) new QIconvCodec();
#endif
+#endif
if (!localeMapper)
setupLocaleMapper();
@@ -1124,6 +1146,9 @@ QList<int> QTextCodec::availableMibs()
*/
void QTextCodec::setCodecForLocale(QTextCodec *c)
{
+#ifndef QT_NO_THREAD
+ QMutexLocker locker(textCodecsMutex());
+#endif
localeMapper = c;
if (!localeMapper)
setupLocaleMapper();
@@ -1227,6 +1252,19 @@ QTextDecoder* QTextCodec::makeDecoder() const
return new QTextDecoder(this);
}
+/*!
+ Creates a QTextDecoder with a specified \a flags to decode chunks
+ of \c{char *} data to create chunks of Unicode data.
+
+ The caller is responsible for deleting the returned object.
+
+ \since 4.7
+*/
+QTextDecoder* QTextCodec::makeDecoder(QTextCodec::ConversionFlags flags) const
+{
+ return new QTextDecoder(this, flags);
+}
+
/*!
Creates a QTextEncoder which stores enough state to encode chunks
@@ -1240,6 +1278,19 @@ QTextEncoder* QTextCodec::makeEncoder() const
}
/*!
+ Creates a QTextEncoder with a specified \a flags to encode chunks
+ of Unicode data as \c{char *} data.
+
+ The caller is responsible for deleting the returned object.
+
+ \since 4.7
+*/
+QTextEncoder* QTextCodec::makeEncoder(QTextCodec::ConversionFlags flags) const
+{
+ return new QTextEncoder(this, flags);
+}
+
+/*!
\fn QByteArray QTextCodec::fromUnicode(const QChar *input, int number,
ConverterState *state) const
@@ -1380,6 +1431,17 @@ QString QTextCodec::toUnicode(const char *chars) const
*/
/*!
+ Constructs a text encoder for the given \a codec and conversion \a flags.
+
+ \since 4.7
+*/
+QTextEncoder::QTextEncoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags)
+ : c(codec), state()
+{
+ state.flags = flags;
+}
+
+/*!
Destroys the encoder.
*/
QTextEncoder::~QTextEncoder()
@@ -1456,6 +1518,18 @@ QByteArray QTextEncoder::fromUnicode(const QString& uc, int& lenInOut)
*/
/*!
+ Constructs a text decoder for the given \a codec and conversion \a flags.
+
+ \since 4.7
+*/
+
+QTextDecoder::QTextDecoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags)
+ : c(codec), state()
+{
+ state.flags = flags;
+}
+
+/*!
Destroys the decoder.
*/
QTextDecoder::~QTextDecoder()
diff --git a/src/corelib/codecs/qtextcodec.h b/src/corelib/codecs/qtextcodec.h
index 169fe82dfd..e37527da16 100644
--- a/src/corelib/codecs/qtextcodec.h
+++ b/src/corelib/codecs/qtextcodec.h
@@ -85,9 +85,6 @@ public:
static QTextCodec *codecForUtfText(const QByteArray &ba);
static QTextCodec *codecForUtfText(const QByteArray &ba, QTextCodec *defaultCodec);
- QTextDecoder* makeDecoder() const;
- QTextEncoder* makeEncoder() const;
-
bool canEncode(QChar) const;
bool canEncode(const QString&) const;
@@ -120,6 +117,12 @@ public:
QByteArray fromUnicode(const QChar *in, int length, ConverterState *state = 0) const
{ return convertFromUnicode(in, length, state); }
+ // ### Qt 5: merge these functions.
+ QTextDecoder* makeDecoder() const;
+ QTextDecoder* makeDecoder(ConversionFlags flags) const;
+ QTextEncoder* makeEncoder() const;
+ QTextEncoder* makeEncoder(ConversionFlags flags) const;
+
virtual QByteArray name() const = 0;
virtual QList<QByteArray> aliases() const;
virtual int mibEnum() const = 0;
@@ -157,6 +160,7 @@ class Q_CORE_EXPORT QTextEncoder {
Q_DISABLE_COPY(QTextEncoder)
public:
explicit QTextEncoder(const QTextCodec *codec) : c(codec), state() {}
+ QTextEncoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags);
~QTextEncoder();
QByteArray fromUnicode(const QString& str);
QByteArray fromUnicode(const QChar *uc, int len);
@@ -167,19 +171,13 @@ public:
private:
const QTextCodec *c;
QTextCodec::ConverterState state;
-
- friend class QXmlStreamWriter;
- friend class QXmlStreamWriterPrivate;
-#if defined(Q_OS_MAC32) || defined(Q_OS_AIX)
- friend class QCoreXmlStreamWriter;
- friend class QCoreXmlStreamWriterPrivate;
-#endif
};
class Q_CORE_EXPORT QTextDecoder {
Q_DISABLE_COPY(QTextDecoder)
public:
explicit QTextDecoder(const QTextCodec *codec) : c(codec), state() {}
+ QTextDecoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags);
~QTextDecoder();
QString toUnicode(const char* chars, int len);
QString toUnicode(const QByteArray &ba);
diff --git a/src/corelib/codecs/qtextcodec_symbian.cpp b/src/corelib/codecs/qtextcodec_symbian.cpp
new file mode 100644
index 0000000000..e4db9d73f6
--- /dev/null
+++ b/src/corelib/codecs/qtextcodec_symbian.cpp
@@ -0,0 +1,678 @@
+/****************************************************************************
+**
+** 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 QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qtextcodec_p.h"
+
+#include <private/qcore_symbian_p.h>
+#include <QThreadStorage>
+#include <QScopedPointer>
+
+#include <charconv.h>
+
+struct QSymbianCodecInitData {
+ uint charsetId;
+ int mib;
+ const char *aliases;
+};
+
+/* This table contains the known Symbian codecs aliases. It is ordered by charsetId.
+ It is required as symbian does not provide have aliases.
+ */
+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" },
+ { /*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" },
+ { /*268451531*/ KCharacterSetIdentifierGbk, 113, "GBK\0MS936\0windows-936\0CP936\0" },
+ { /*268451866*/ KCharacterSetIdentifierGb12345, 0, "GB12345\0" },
+ { /*268455110*/ KCharacterSetIdentifierAscii, 3, "US-ASCII\0ANSI_X3.4-1968\0iso-ir-6\0ANSI_X3.4-1986\0ISO_646.irv:1991\0ASCII\0ISO646-US\0us\0IBM367\0cp367\0csASCII\0ISO-IR-6\0ISO_646.IRV:1991\0"},
+ { /*268456062*/ KCharacterSetIdentifierIso88592, 5, "ISO-8859-2\0ISO_8859-2:1987\0iso-ir-101\0latin2\0l2\0csISOLatin2\0" },
+ { /*268456063*/ KCharacterSetIdentifierIso88594, 7, "ISO-8859-4\0ISO_8859-4:1988\0iso-ir-110\0latin4\0l4\0csISOLatin4\0" },
+ { /*268456064*/ KCharacterSetIdentifierIso88595, 8, "ISO-8859-5\0ISO_8859-5:1988\0iso-ir-144\0cyrillic\0csISOLatinCyrillic\0" },
+ { /*268456065*/ KCharacterSetIdentifierIso88597, 10, "ISO-8859-7\0ISO_8859-7:1987\0iso-ir-126\0ELOT_928\0ECMA-118\0greek\0greek8\0csISOLatinGreek\0" },
+ { /*268456066*/ KCharacterSetIdentifierIso88599, 12, "ISO-8859-9\0ISO_8859-9:1989\0iso-ir-148\0latin5\0l5\0csISOLatin5\0" },
+ { /*268456875*/ KCharacterSetIdentifierSms7Bit, 0, "SMS 7-bit\0" },
+ { /*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" },
+ { /*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" },
+ { /*268458457*/ 268458457, 2254, "Windows-1254\0CP1254\0MS-TURK\0" },
+ { /*268458458*/ 268458458, 2257, "Windows-1257\0CP1257\0WINBALTRIM\0" },
+ { /*268460133*/ KCharacterSetIdentifierHz, 2085, "HZ-GB-2312\0HZ\0" },
+ { /*268460134*/ KCharacterSetIdentifierJis, 16, "JIS_Encoding\0JIS\0" },
+ { /*268460135*/ KCharacterSetIdentifierEucJpPacked, 18, "EUC-JP\0Extended_UNIX_Code_Packed_Format_for_Japanese\0csEUCPkdFmtJapanese\0EUCJP_PACKED\0" },
+ { /*268461728*/ KCharacterSetIdentifierIso2022Jp, 39, "ISO-2022-JP\0csISO2022JP\0JIS7\0" },
+ { /*268461731*/ KCharacterSetIdentifierIso2022Jp1, 0, "ISO2022JP1\0" },
+ { /*268470824*/ KCharacterSetIdentifierIso88593, 6, "ISO-8859-3\0ISO_8859-3:1988\0iso-ir-109\0latin3\0l3\0csISOLatin3\0" },
+ { /*268470825*/ KCharacterSetIdentifierIso88596, 9, "ISO-8859-6\0ISO_8859-6:1987\0iso-ir-127\0ECMA-114\0ASMO-708\0arabic\0ISO88596\0csISOLatinArabic\0ARABIC\0" },
+ { /*268470826*/ KCharacterSetIdentifierIso88598, 11, "ISO-8859-8\0ISO_8859-8:1988\0iso-ir-138\0hebrew\0csISOLatinHebrew\0" },
+ { /*268470827*/ KCharacterSetIdentifierIso885910, 13, "ISO-8859-10\0iso-ir-157\0l6\0ISO_8859-10:1992\0csISOLatin6\0latin6\0" },
+ { /*268470828*/ KCharacterSetIdentifierIso885913, 109, "ISO-8859-13\0ISO885913\0ISO-IR-179\0ISO8859-13\0L7\0LATIN7\0CSISOLATIN7\0" },
+ { /*268470829*/ KCharacterSetIdentifierIso885914, 110, "ISO-8859-14\0iso-ir-199\0ISO_8859-14:1998\0latin8\0iso-celtic\0l8\0" },
+ { /*268470830*/ KCharacterSetIdentifierIso885915, 111, "ISO-8859-15\0latin-9\0ISO-IR-203\0" },
+// { /*270483374*/ KCharacterSetIdentifierUnicodeLittle, 1014, "UTF-16LE\0Little-Endian UNICODE\0" },
+// { /*270483538*/ KCharacterSetIdentifierUnicodeBig, 1013, "UTF-16BE\0Big-Endian UNICODE\0" },
+ { /*270501191*/ 270501191, 2255, "Windows-1255\0CP1255\0MS-HEBR\0" },
+ { /*270501192*/ 270501192, 2256, "Windows-1256\0CP1256\0MS-ARAB\0" },
+ { /*270501193*/ 270501193, 2259, "TIS-620\0ISO-IR-166\0TIS620-0\0TIS620.2529-1\0TIS620.2533-0\0TIS620.2533-1\0" },
+ { /*270501194*/ 270501194, 0, "windows-874\0CP874\0IBM874\0" },
+ { /*270501325*/ 270501325, 0, "SmsStrict\0" },
+ { /*270501521*/ 270501521, 0, "ShiftJisDirectmap\0" },
+ { /*270501542*/ 270501542, 0, "EucJpDirectmap\0" },
+ /* 270501691 (duplicate) Windows-1252 | windows-1252 |Windows-1252 |Code Page 1252 |CP1252 |MS-ANSI |WINDOWS-1252 |2252 */
+ { /*270501729*/ 270501729, 2088, "KOI8-U\0" },
+ { /*270501752*/ 270501752, 2084, "KOI8-R\0csKOI8R\0" },
+ { /*270529682*/ 270529682, 1000, "ISO-10646-UCS-2\0UCS-2\0CSUNICODE\0" },
+ { /*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" },
+ { /*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" },
+ { /*536929574*/ 536929574, 38, "EUC-KR\0" },
+ { /*536936703*/ 536936703, 0, "CP949\0" },
+ { /*536936705*/ 536936705, 37, "ISO-2022-KR\0" },
+ { /*536941517*/ 536941517, 36, "KS_C_5601-1987\0" }
+ };
+
+
+class QSymbianTextCodec : public QTextCodec
+{
+public:
+ QString convertToUnicode(const char*, int, ConverterState*) const;
+ QByteArray convertFromUnicode(const QChar*, int, ConverterState*) const;
+ QList<QByteArray> aliases() const;
+ QByteArray name() const;
+ int mibEnum() const;
+
+ explicit QSymbianTextCodec(uint charsetId, int staticIndex = -1) : m_charsetId(charsetId), m_staticIndex(staticIndex) { }
+
+ static QSymbianTextCodec *init();
+ static QSymbianTextCodec *localeMapper;
+private:
+ static CCnvCharacterSetConverter *converter();
+ static uint getLanguageDependentCharacterSet();
+ uint m_charsetId;
+ int m_staticIndex;
+};
+
+QSymbianTextCodec *QSymbianTextCodec::localeMapper = 0;
+
+class QSymbianTextCodecWithName : public QSymbianTextCodec
+{
+public:
+ QSymbianTextCodecWithName(uint charsetId, const QByteArray &name)
+ : QSymbianTextCodec(charsetId) , m_name(name) { }
+ QByteArray name() const { return m_name; }
+ QList<QByteArray> aliases() const { return QList<QByteArray>(); }
+private:
+ QByteArray m_name;
+};
+
+Q_GLOBAL_STATIC(QThreadStorage<CCnvCharacterSetConverter *>,gs_converterStore);
+
+CCnvCharacterSetConverter *QSymbianTextCodec::converter()
+{
+ CCnvCharacterSetConverter *&conv = gs_converterStore()->localData();
+ if (!conv)
+ QT_TRAP_THROWING(conv = CCnvCharacterSetConverter::NewL())
+ return conv;
+}
+
+
+QByteArray QSymbianTextCodec::name() const
+{
+ if (m_staticIndex >= 0)
+ return QByteArray(codecsData[m_staticIndex].aliases);
+ QScopedPointer<HBufC8> buf;
+ QT_TRAP_THROWING(buf.reset(converter()->ConvertCharacterSetIdentifierToStandardNameL(m_charsetId, qt_s60GetRFs())))
+ if (buf)
+ return QByteArray(reinterpret_cast<const char *>(buf->Ptr()), buf->Length());
+ return QByteArray();
+}
+
+int QSymbianTextCodec::mibEnum() const
+{
+ if (m_staticIndex >= 0)
+ return codecsData[m_staticIndex].mib;
+ int mib;
+ QT_TRAP_THROWING(mib = converter()->ConvertCharacterSetIdentifierToMibEnumL(m_charsetId, qt_s60GetRFs()))
+ return mib;
+}
+
+QList<QByteArray> QSymbianTextCodec::aliases() const
+{
+ QList<QByteArray> result;
+ if (m_staticIndex >= 0) {
+ const char *aliases = codecsData[m_staticIndex].aliases;
+ aliases += strlen(aliases) + 1;
+ while (*aliases) {
+ int len = strlen(aliases);
+ result += QByteArray(aliases, len);
+ aliases += len + 1;
+ }
+ }
+ return result;
+}
+
+
+QString QSymbianTextCodec::convertToUnicode(const char *str, int len, ConverterState *state) const
+{
+ uint charsetId = m_charsetId;
+
+ // no support for utf7 with state
+ if (state && (charsetId == KCharacterSetIdentifierUtf7 ||
+ charsetId == KCharacterSetIdentifierImapUtf7)) {
+ return QString();
+ }
+ CCnvCharacterSetConverter *converter = QSymbianTextCodec::converter();
+ if (!str) {
+ return QString();
+ }
+
+ //Search the character set array containing all of the character sets for which conversion is available
+ CCnvCharacterSetConverter::TAvailability av;
+ QT_TRAP_THROWING(av = converter->PrepareToConvertToOrFromL(charsetId, qt_s60GetRFs()))
+ if (av == CCnvCharacterSetConverter::ENotAvailable) {
+ return QString();
+ }
+
+ char *str2;
+ int len2;
+ QByteArray helperBA;
+ if (state && (state->remainingChars > 0)) {
+ // we should prepare the input string ourselves
+ // the real size
+ len2 = len + state->remainingChars;
+ helperBA.resize(len2);
+ str2 = helperBA.data();
+ if (state->remainingChars > 3) { // doesn't happen usually
+ memcpy(str2, state->d, state->remainingChars);
+ qFree(state->d);
+ state->d = 0;
+ } else {
+ char charTbl[3];
+ charTbl[0] = state->state_data[0];
+ charTbl[1] = state->state_data[1];
+ charTbl[2] = state->state_data[2];
+ memcpy(str2, charTbl, state->remainingChars);
+ }
+ memcpy(str2+state->remainingChars, str, len);
+ }
+ else {
+ len2 = len;
+ str2 = const_cast<char*>(str);
+ }
+
+ QString UnicodeText(len2, Qt::Uninitialized);
+ TPtrC8 remainderOfForeignText;
+ remainderOfForeignText.Set(reinterpret_cast<const unsigned char *>(str2), len2);
+
+ int numberOfUnconvertibleCharacters = 0;
+ int indexOfFirstUnconvertibleCharacter;
+
+ // Use null character as replacement, if it is asked
+ bool convertToNull = (state && (state->flags & QTextCodec::ConvertInvalidToNull));
+ if (convertToNull) {
+ _LIT8(KReplacement, "\x00");
+ QT_TRAP_THROWING(converter->SetReplacementForUnconvertibleUnicodeCharactersL(KReplacement))
+ }
+ // use state->invalidChars for keeping symbian state
+ int sState = CCnvCharacterSetConverter::KStateDefault;
+ if (state && (state->invalidChars != CCnvCharacterSetConverter::KStateDefault)) {
+ sState = state->invalidChars;
+ }
+ //Convert text encoded in a non-Unicode character set into the Unicode character set (UCS-2).
+ int remainingChars = -1;
+ int initial_size=0;
+ while (1) {
+ TPtr16 UnicodePtr(reinterpret_cast<unsigned short *>(UnicodeText.data()+initial_size), UnicodeText.size());
+ QT_TRAP_THROWING(remainingChars = converter->ConvertToUnicode(UnicodePtr,
+ remainderOfForeignText,
+ sState,
+ numberOfUnconvertibleCharacters,
+ indexOfFirstUnconvertibleCharacter))
+
+ initial_size += UnicodePtr.Length();
+ // replace 0xFFFD with 0x0000 and only if state set to convert to it
+ if (numberOfUnconvertibleCharacters>0 && convertToNull) {
+ int len2 = UnicodePtr.Length();
+ for (int i = indexOfFirstUnconvertibleCharacter; i < len2; i++) {
+ UnicodePtr[i] = 0x0000;
+ }
+ }
+ // success
+ if (remainingChars==KErrNone) {
+ break;
+ }
+ // if ConvertToUnicode could not consume the foreign text at all
+ // UTF-8: EErrorIllFormedInput = KErrCorrupt
+ // UCS-2: KErrNotFound
+ if (remainingChars == CCnvCharacterSetConverter::EErrorIllFormedInput ||
+ remainingChars == KErrNotFound) {
+ remainingChars = remainderOfForeignText.Size();
+ break;
+ }
+ else {
+ if (remainingChars < 0) {
+ return QString();
+ }
+ }
+ //
+ UnicodeText.resize(UnicodeText.size() + remainingChars*2);
+ remainderOfForeignText.Set(reinterpret_cast<const unsigned char *>(str2+len2-remainingChars), remainingChars);
+ }
+ // save symbian state
+ if (state) {
+ state->invalidChars = sState;
+ }
+
+ if (remainingChars > 0) {
+ if (!state) {
+ // No way to signal, if there is still remaining chars, for ex. UTF-8 still can have
+ // some characters hanging around.
+ return QString();
+ }
+ const unsigned char *charPtr = remainderOfForeignText.Right(remainingChars).Ptr();
+ if (remainingChars > 3) { // doesn't happen usually
+ state->d = (void*)qMalloc(remainingChars);
+ if (!state->d)
+ return QString();
+ // copy characters there
+ memcpy(state->d, charPtr, remainingChars);
+ }
+ else {
+ // fallthru is correct
+ switch (remainingChars) {
+ case 3:
+ state->state_data[2] = charPtr[2];
+ case 2:
+ state->state_data[1] = charPtr[1];
+ case 1:
+ state->state_data[0] = charPtr[0];
+ }
+ }
+ state->remainingChars = remainingChars;
+ }
+ else {
+ if (state) {
+ // If we continued from an earlier iteration
+ state->remainingChars = 0;
+ }
+ }
+ // check if any ORIGINAL headers should be left
+ if (initial_size > 0) {
+ if (!state || (state && !(state->flags & QTextCodec::IgnoreHeader))) {
+ // always skip headers on following state loops
+ if (state) {
+ state->flags |= QTextCodec::IgnoreHeader;
+ }
+ const TUint16 *ptr = reinterpret_cast<const TUint16 *>(UnicodeText.data());
+ if (ptr[0] == QChar::ByteOrderMark || ptr[0] == QChar::ByteOrderSwapped) {
+ return UnicodeText.mid(1, initial_size - 1);
+ }
+ }
+ }
+ if (initial_size >= 0) {
+ UnicodeText.resize(initial_size);
+ return UnicodeText;
+ }
+ else {
+ return QString();
+ }
+}
+
+
+QByteArray QSymbianTextCodec::convertFromUnicode(const QChar *str, int len, ConverterState *state) const
+{
+ uint charsetId = m_charsetId;
+ CCnvCharacterSetConverter *converter = QSymbianTextCodec::converter();
+ if (!str)
+ return QByteArray();
+
+ if (len == 0)
+ return QByteArray();
+
+ // no support for utf7 with state
+ if (state && (charsetId == KCharacterSetIdentifierUtf7 ||
+ charsetId == KCharacterSetIdentifierImapUtf7))
+ return QByteArray();
+
+ //Get reference file session from backend
+ RFs &fileSession = qt_s60GetRFs();
+
+ //Search the character set array containing all of the character sets for which conversion is available
+ CCnvCharacterSetConverter::TAvailability av = CCnvCharacterSetConverter::ENotAvailable;
+ QT_TRAP_THROWING(av = converter->PrepareToConvertToOrFromL(charsetId, fileSession))
+ if (av == CCnvCharacterSetConverter::ENotAvailable)
+ return QByteArray();
+
+ // Use null character as replacement, if it is asked
+ if (state && (state->flags & QTextCodec::ConvertInvalidToNull)) {
+ _LIT8(KReplacement, "\x00");
+ QT_TRAP_THROWING(converter->SetReplacementForUnconvertibleUnicodeCharactersL(KReplacement))
+ }
+ else {
+ _LIT8(KReplacement, "?");
+ QT_TRAP_THROWING(converter->SetReplacementForUnconvertibleUnicodeCharactersL(KReplacement))
+ }
+ QByteArray outputBuffer;
+
+ // add header if no state (one run), or if no ignoreheader (from first state)
+ int bomofs = 0;
+ if (!state || (state && !(state->flags & QTextCodec::IgnoreHeader))) {
+
+ QChar bom(QChar::ByteOrderMark);
+
+ if (state)
+ state->flags |= QTextCodec::IgnoreHeader; // bom handling only on first state
+
+ switch (charsetId) {
+ case KCharacterSetIdentifierUcs2:
+ outputBuffer.append(bom.row());
+ outputBuffer.append(bom.cell());
+ bomofs = 2;
+ break;
+
+ case KCharacterSetIdentifierUtf8: // we don't add bom for UTF-8
+ case KCharacterSetIdentifierJavaConformantUtf8:
+ /*outputBuffer.append("\xef\xbb\xbf");
+ bomofs = 3;
+ */
+ break;
+
+ case KCharacterSetIdentifierUnicodeLittle:
+ outputBuffer.append(bom.cell());
+ outputBuffer.append(bom.row());
+ bomofs = 2;
+ break;
+
+ case KCharacterSetIdentifierUnicodeBig:
+ outputBuffer.append(bom.row());
+ outputBuffer.append(bom.cell());
+ bomofs = 2;
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ // len is 16bit chars, reserve 3 8bit chars for each input char
+ // jsz - it could be differentiated, to allocate less
+ outputBuffer.resize(len * 3 + bomofs);
+
+ // loop for too short output buffer
+ int unconverted;
+ int numberOfUnconvertibleCharacters = len;
+ int indexOfFirstUnconvertibleCharacter;
+ int convertedSize;
+ int lastUnconverted = 0;
+ int initial_size=0;
+ int remainderToConvert = len;
+ while (1) {
+ TPtr8 outputPtr(reinterpret_cast<unsigned char *>(outputBuffer.data() + bomofs + initial_size), outputBuffer.size() - bomofs);
+
+ TPtrC16 UnicodeText(reinterpret_cast<const unsigned short *>(str+len-remainderToConvert), remainderToConvert);
+
+ //Convert text encoded in the Unicode character set (UCS-2) into other character sets
+ unconverted = -1;
+ QT_TRAP_THROWING( unconverted = converter->ConvertFromUnicode(outputPtr,
+ UnicodeText,
+ numberOfUnconvertibleCharacters,
+ indexOfFirstUnconvertibleCharacter))
+ initial_size += outputPtr.Length();
+ if (unconverted < 0) {
+ return QByteArray();
+ }
+
+
+ if (unconverted == 0 ) {
+ convertedSize = initial_size;
+ break;
+ }
+
+ // check what means unconverted > 0
+ if (indexOfFirstUnconvertibleCharacter<0) {
+ // 8859-6 and 8859-8 break with certain input (string of \xc0 - \xd9 converted to unicode and back)
+ if (unconverted == lastUnconverted) {
+ return QByteArray();
+ }
+ lastUnconverted = unconverted;
+ }
+ else {
+ // were some character not possible to convert
+
+ }
+ remainderToConvert = unconverted; // len - indexOfFirstUnconvertibleCharacter;
+ // resize output buffer, use =op for the null check
+ outputBuffer.resize(outputBuffer.size() + remainderToConvert * 3 + bomofs);
+ };
+
+ // shorten output
+ outputBuffer.resize(convertedSize + bomofs);
+
+ if (state) {
+ state->invalidChars = numberOfUnconvertibleCharacters;
+
+ // check if any Symbian CONVERTED headers should be removed
+ if (state->flags & QTextCodec::IgnoreHeader && state->state_data[0] == 0) {
+
+ state->state_data[0] = 0xff; // bom handling only on first state
+
+ if (charsetId == KCharacterSetIdentifierUcs2 && outputBuffer.size() > 1) {
+
+ QChar bom(QChar::ByteOrderMark);
+ if (outputBuffer.at(0) == bom.row() && outputBuffer.at(1) == bom.cell()) {
+ outputBuffer.remove(0, 2);
+ } else if (outputBuffer.at(0) == bom.cell() && outputBuffer.at(1) == bom.row()) {
+ outputBuffer.remove(0, 2);
+ }
+
+ } else if ((charsetId == KCharacterSetIdentifierUtf8 ||
+ charsetId == KCharacterSetIdentifierJavaConformantUtf8) &&
+ outputBuffer.size() > 2) {
+ if (outputBuffer.at(0) == 0xef && outputBuffer.at(1) == 0xbb && outputBuffer.at(2) == 0xbf) {
+ outputBuffer.remove(0, 3);
+ }
+
+ } else if (charsetId == KCharacterSetIdentifierUnicodeLittle &&
+ outputBuffer.size() > 1) {
+
+ QChar bom(QChar::ByteOrderMark);
+ if (outputBuffer.at(0) == bom.row() && outputBuffer.at(1) == bom.cell()) {
+ outputBuffer.remove(0, 2);
+ }
+
+ } else if (charsetId == KCharacterSetIdentifierUnicodeBig &&
+ outputBuffer.size() > 1) {
+
+ QChar bom(QChar::ByteOrderSwapped);
+ if (outputBuffer.at(0) == bom.row() && outputBuffer.at(1) == bom.cell()) {
+ outputBuffer.remove(0, 2);
+ }
+ }
+
+ }
+ }
+
+ return outputBuffer;
+}
+
+
+uint QSymbianTextCodec::getLanguageDependentCharacterSet()
+{
+ TLanguage lang = User::Language();
+
+ uint langIndex = 0;
+
+ switch (lang) {
+ case 14: //ELangTurkish
+ langIndex = KCharacterSetIdentifierIso88599; break;
+ case 16: //ELangRussian
+ langIndex = KCharacterSetIdentifierIso88595; break;
+ case 17: //ELangHungarian
+ langIndex = KCharacterSetIdentifierIso88592; break;
+ case 25: //ELangCzec
+ case 26: //ELangSlovak
+ case 27: //ELangPolish
+ case 28: //ELangSlovenian
+ langIndex = KCharacterSetIdentifierIso88592; break;
+ case 29: //ELangTaiwanChinese
+ case 30: //ELangHongKongChinese
+ langIndex = KCharacterSetIdentifierBig5; break;
+ case 31: //ELangPrcChinese
+ langIndex = KCharacterSetIdentifierGbk; break;
+ case 32: //ELangJapanese
+ langIndex = KCharacterSetIdentifierShiftJis; break;
+ case 33: //ELangThai
+ langIndex = 270501193 /*KCharacterSetIdentifierTis620*/; break;
+ case 37: //ELangArabic
+ langIndex = KCharacterSetIdentifierIso88596; break;
+ case 40: //ELangBelarussian
+ case 42: //ELangBulgarian
+ langIndex = KCharacterSetIdentifierIso88595; break;
+ case 45: //ELangCroatian
+ langIndex = KCharacterSetIdentifierIso88592; break;
+ case 49: //ELangEstonian
+ langIndex = KCharacterSetIdentifierIso88594; break;
+ case 54: //ELangGreek
+ case 55: //ELangCyprusGreek
+ langIndex = KCharacterSetIdentifierIso88597; break;
+ case 57: //ELangHebrew
+ langIndex = KCharacterSetIdentifierIso88598; break;
+ case 58: //ELangHindi
+ langIndex = 271011982/*KCharacterSetIdentifierIscii*/; break;
+ case 67: //ELangLatvian
+ case 68: //ELangLithuanian
+ langIndex = KCharacterSetIdentifierIso88594; break;
+ case 69: //ELangMacedonian
+ langIndex = KCharacterSetIdentifierIso88595; break;
+ case 78: //ELangRomanian
+ langIndex = KCharacterSetIdentifierIso88592; break;
+ case 79: //ELangSerbian
+ langIndex = KCharacterSetIdentifierIso88592; break;
+ case 91: //ELangCyprusTurkish
+ langIndex = KCharacterSetIdentifierIso88599; break;
+ case 93: //ELangUkrainian
+ langIndex = KCharacterSetIdentifierIso88595; break;
+ case 94: //ELangUrdu
+ langIndex = KCharacterSetIdentifierIso88596; break;
+ case 157: //ELangEnglish_Taiwan
+ case 158: //ELangEnglish_HongKong
+ langIndex = KCharacterSetIdentifierBig5; break;
+ case 159: //ELangEnglish_Prc
+ langIndex = KCharacterSetIdentifierGbk; break;
+ case 160:
+ langIndex = KCharacterSetIdentifierShiftJis; break;
+ case 161: //ELangEnglish_Thailand
+ langIndex = 270501193/*KCharacterSetIdentifierTis620*/; break;
+ }
+
+ if (langIndex > 0) {
+ return langIndex;
+ }
+ return KCharacterSetIdentifierCodePage1252;
+}
+
+/* Create the codecs that have aliases and return the locale mapper*/
+QSymbianTextCodec *QSymbianTextCodec::init()
+{
+ const uint localeMapperId = getLanguageDependentCharacterSet();
+ QScopedPointer<CArrayFix<CCnvCharacterSetConverter::SCharacterSet> > array;
+ QT_TRAP_THROWING(array.reset(CCnvCharacterSetConverter::CreateArrayOfCharacterSetsAvailableL(qt_s60GetRFs())))
+ CCnvCharacterSetConverter *converter = QSymbianTextCodec::converter();
+ int count = array->Count();
+ for (int i = 0; i < count; i++) {
+ int charsetId = array->At(i).Identifier();
+
+ // skip builtin Qt codecs
+ if (charsetId == KCharacterSetIdentifierUtf8 || charsetId == KCharacterSetIdentifierUnicodeLittle
+ || charsetId == KCharacterSetIdentifierUnicodeLittle || charsetId == KCharacterSetIdentifierUnicodeBig
+ || charsetId == KCharacterSetIdentifierIso88591
+ || charsetId == 270501691 /* skip Windows-1252 duplicate*/) {
+ continue;
+ }
+
+ int begin = 0;
+ int n = sizeof(codecsData) / sizeof(codecsData[0]);
+ int half;
+
+ while (n > 0) {
+ half = n >> 1;
+ int middle = begin + half;
+ if (codecsData[middle].charsetId < charsetId) {
+ begin = middle + 1;
+ n -= half + 1;
+ } else {
+ n = half;
+ }
+ }
+ if (codecsData[begin].charsetId == charsetId) {
+ QSymbianTextCodec *c = new QSymbianTextCodec(charsetId, begin);
+ if (charsetId == localeMapperId)
+ localeMapper = c;
+ } else {
+ QScopedPointer<HBufC8> buf;
+ QT_TRAP_THROWING(buf.reset(converter->ConvertCharacterSetIdentifierToStandardNameL(charsetId, qt_s60GetRFs())))
+ QByteArray name;
+ if (buf && buf->Length()) {
+ name = QByteArray(reinterpret_cast<const char *>(buf->Ptr()), buf->Length());
+ } else {
+ TPtrC charSetName = array->At(i).NameIsFileName() ? TParsePtrC(array->At(i).Name()).Name() : array->At(i).Name();
+ int len = charSetName.Length();
+ QString str;
+ str.setUnicode(reinterpret_cast<const QChar*>(charSetName.Ptr()), len);
+ name = str.toLatin1();
+ }
+ if (!name.isEmpty())
+ new QSymbianTextCodecWithName(charsetId, name);
+ }
+
+ }
+ return localeMapper;
+}
diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp
index 7655c510ae..f747bf754f 100644
--- a/src/corelib/codecs/qutfcodec.cpp
+++ b/src/corelib/codecs/qutfcodec.cpp
@@ -48,6 +48,19 @@ QT_BEGIN_NAMESPACE
enum { Endian = 0, Data = 1 };
+static inline bool isUnicodeNonCharacter(uint ucs4)
+{
+ // Unicode has a couple of "non-characters" that one can use internally,
+ // but are not allowed to be used for text interchange.
+ //
+ // Those are the last two entries each Unicode Plane (U+FFFE, U+FFFF,
+ // U+1FFFE, U+1FFFF, etc.) as well as the entries between U+FDD0 and
+ // U+FDEF (inclusive)
+
+ return (ucs4 & 0xfffe) == 0xfffe
+ || (ucs4 - 0xfdd0U) < 16;
+}
+
QByteArray QUtf8::convertFromUnicode(const QChar *uc, int len, QTextCodec::ConverterState *state)
{
uchar replacement = '?';
@@ -106,16 +119,17 @@ QByteArray QUtf8::convertFromUnicode(const QChar *uc, int len, QTextCodec::Conve
if (u < 0x0800) {
*cursor++ = 0xc0 | ((uchar) (u >> 6));
} else {
+ // is it one of the Unicode non-characters?
+ if (isUnicodeNonCharacter(u)) {
+ *cursor++ = replacement;
+ ++ch;
+ ++invalid;
+ continue;
+ }
+
if (u > 0xffff) {
- // see QString::fromUtf8() and QString::utf8() for explanations
- if (u > 0x10fe00 && u < 0x10ff00) {
- *cursor++ = (u - 0x10fe00);
- ++ch;
- continue;
- } else {
- *cursor++ = 0xf0 | ((uchar) (u >> 18));
- *cursor++ = 0x80 | (((uchar) (u >> 12)) & 0x3f);
- }
+ *cursor++ = 0xf0 | ((uchar) (u >> 18));
+ *cursor++ = 0x80 | (((uchar) (u >> 12)) & 0x3f);
} else {
*cursor++ = 0xe0 | (((uchar) (u >> 12)) & 0x3f);
}
@@ -179,15 +193,16 @@ QString QUtf8::convertToUnicode(const char *chars, int len, QTextCodec::Converte
--need;
if (!need) {
// utf-8 bom composes into 0xfeff code point
+ bool nonCharacter;
if (!headerdone && uc == 0xfeff) {
// dont do anything, just skip the BOM
- } else if (uc > 0xffff && uc < 0x110000) {
+ } else if (!(nonCharacter = isUnicodeNonCharacter(uc)) && uc > 0xffff && uc < 0x110000) {
// surrogate pair
Q_ASSERT((qch - (ushort*)result.unicode()) + 2 < result.length());
*qch++ = QChar::highSurrogate(uc);
*qch++ = QChar::lowSurrogate(uc);
- } else if ((uc < min_uc) || (uc >= 0xd800 && uc <= 0xdfff) || (uc >= 0xfffe)) {
- // error: overlong sequence, UTF16 surrogate or BOM
+ } else if ((uc < min_uc) || (uc >= 0xd800 && uc <= 0xdfff) || nonCharacter || uc >= 0x110000) {
+ // error: overlong sequence, UTF16 surrogate or non-character
*qch++ = replacement;
++invalid;
} else {
diff --git a/src/corelib/concurrent/qfuturewatcher.cpp b/src/corelib/concurrent/qfuturewatcher.cpp
index 3b808b84bf..d4573c6051 100644
--- a/src/corelib/concurrent/qfuturewatcher.cpp
+++ b/src/corelib/concurrent/qfuturewatcher.cpp
@@ -505,7 +505,7 @@ void QFutureWatcherBasePrivate::sendCallOutEvent(QFutureCallOutEvent *event)
finished signal will be emitted.
To avoid a race condition, it is important to call this function
- \i after doing the connections.
+ \e after doing the connections.
*/
/*! \fn QFuture<T> QFutureWatcher::future() const
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index efee610400..df9a463634 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -52,3 +52,25 @@ symbian: {
partial_upgrade.path = c:/sys/bin
DEPLOYMENT = partial_upgrade $$DEPLOYMENT
}
+
+mmx {
+ DEFINES += QT_HAVE_MMX
+}
+3dnow {
+ DEFINES += QT_HAVE_3DNOW
+}
+sse {
+ DEFINES += QT_HAVE_SSE
+ DEFINES += QT_HAVE_MMXEXT
+}
+sse2 {
+ DEFINES += QT_HAVE_SSE2
+}
+iwmmxt {
+ DEFINES += QT_HAVE_IWMMXT
+}
+neon {
+ DEFINES += QT_HAVE_NEON
+ QMAKE_CXXFLAGS *= -mfpu=neon
+}
+
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 82210f3830..6437fb73bb 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -44,11 +44,11 @@
#include <stddef.h>
-#define QT_VERSION_STR "4.6.3"
+#define QT_VERSION_STR "4.7.0"
/*
QT_VERSION is (major << 16) + (minor << 8) + patch.
*/
-#define QT_VERSION 0x040603
+#define QT_VERSION 0x040700
/*
can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0))
*/
@@ -275,7 +275,7 @@ namespace QT_NAMESPACE {}
# endif
#endif
-#ifdef AUTODETECT_COCOA
+#ifdef QT_AUTODETECT_COCOA
# ifdef Q_OS_MAC64
# define QT_MAC_USE_COCOA 1
# define QT_BUILD_KEY QT_BUILD_KEY_COCOA
@@ -672,8 +672,9 @@ namespace QT_NAMESPACE {}
# define Q_ALIGNOF(type) __alignof__(type)
# define Q_TYPEOF(expr) __typeof__(expr)
# define Q_DECL_ALIGN(n) __attribute__((__aligned__(n)))
-// using CC 5.9: Warning: attribute visibility is unsupported and will be skipped..
-//# define Q_DECL_EXPORT __attribute__((__visibility__("default")))
+# endif
+# if __SUNPRO_CC >= 0x550
+# define Q_DECL_EXPORT __global
# endif
# if __SUNPRO_CC < 0x5a0
# define Q_NO_TEMPLATE_FRIENDS
@@ -863,6 +864,9 @@ typedef quint64 qulonglong;
# endif
#endif
+#define Q_INIT_RESOURCE_EXTERN(name) \
+ extern int QT_MANGLE_NAMESPACE(qInitResources_ ## name) ();
+
#define Q_INIT_RESOURCE(name) \
do { extern int QT_MANGLE_NAMESPACE(qInitResources_ ## name) (); \
QT_MANGLE_NAMESPACE(qInitResources_ ## name) (); } while (0)
@@ -1060,6 +1064,16 @@ redefine to built-in booleans to make autotests work properly */
# define QT_FASTCALL
#endif
+//defines the type for the WNDPROC on windows
+//the alignment needs to be forced for sse2 to not crash with mingw
+#if defined(Q_WS_WIN)
+# if defined(Q_CC_MINGW)
+# define QT_WIN_CALLBACK CALLBACK __attribute__ ((force_align_arg_pointer))
+# else
+# define QT_WIN_CALLBACK CALLBACK
+# endif
+#endif
+
typedef int QNoImplicitBoolCast;
#if defined(QT_ARCH_ARM) || defined(QT_ARCH_ARMV6) || defined(QT_ARCH_AVR32) || (defined(QT_ARCH_MIPS) && (defined(Q_WS_QWS) || defined(Q_OS_WINCE))) || defined(QT_ARCH_SH) || defined(QT_ARCH_SH4A)
@@ -1540,6 +1554,7 @@ inline QT3_SUPPORT bool qt_winUnicode() { return true; }
inline QT3_SUPPORT int qWinVersion() { return QSysInfo::WindowsVersion; }
#endif
+// ### Qt 5: remove Win9x support macros QT_WA and QT_WA_INLINE.
#define QT_WA(unicode, ansi) unicode
#define QT_WA_INLINE(unicode, ansi) (unicode)
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index a9ea44a1e0..94902259fd 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -266,6 +266,11 @@ QLibraryInfo::location(LibraryLocation loc)
path = QT_CONFIGURE_PLUGINS_PATH;
break;
#endif
+#ifdef QT_CONFIGURE_IMPORTS_PATH
+ case ImportsPath:
+ path = QT_CONFIGURE_IMPORTS_PATH;
+ break;
+#endif
#ifdef QT_CONFIGURE_DATA_PATH
case DataPath:
path = QT_CONFIGURE_DATA_PATH;
@@ -439,7 +444,7 @@ QLibraryInfo::location(LibraryLocation loc)
QCFType<CFURLRef> urlRef = CFBundleCopyBundleURL(bundleRef);
if (urlRef) {
QCFString path = CFURLCopyFileSystemPath(urlRef, kCFURLPOSIXPathStyle);
- return QDir::cleanPath(path + QLatin1String("/Contents/") + ret);
+ return QDir::cleanPath(QString(path) + QLatin1String("/Contents/") + ret);
}
}
#endif
@@ -470,6 +475,7 @@ QLibraryInfo::location(LibraryLocation loc)
\value LibrariesPath The location of installed librarires.
\value BinariesPath The location of installed Qt binaries (tools and applications).
\value PluginsPath The location of installed Qt plugins.
+ \value ImportsPath The location of installed QML extensions to import.
\value DataPath The location of general Qt data.
\value TranslationsPath The location of translation information for Qt strings.
\value SettingsPath The location for Qt settings.
diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h
index e64b760ff6..4a7ba063be 100644
--- a/src/corelib/global/qlibraryinfo.h
+++ b/src/corelib/global/qlibraryinfo.h
@@ -76,7 +76,8 @@ public:
TranslationsPath,
SettingsPath,
DemosPath,
- ExamplesPath
+ ExamplesPath,
+ ImportsPath
};
static QString location(LibraryLocation); // ### Qt 5: consider renaming it to path()
diff --git a/src/corelib/global/qmalloc.cpp b/src/corelib/global/qmalloc.cpp
index 43e89e3ae6..090998c0cf 100644
--- a/src/corelib/global/qmalloc.cpp
+++ b/src/corelib/global/qmalloc.cpp
@@ -124,3 +124,4 @@ void qFreeAligned(void *ptr)
}
QT_END_NAMESPACE
+
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index bc8d452c53..89a0c0bead 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -502,6 +502,14 @@ public:
WA_MergeSoftkeys = 124,
WA_MergeSoftkeysRecursively = 125,
+#if 0 // these values are reserved for Maemo5 - do not re-use them
+ WA_Maemo5NonComposited = 126,
+ WA_Maemo5StackedWindow = 127,
+ WA_Maemo5PortraitOrientation = 128,
+ WA_Maemo5LandscapeOrientation = 129,
+ WA_Maemo5AutoOrientation = 130,
+ WA_Maemo5ShowProgressIndicator = 131,
+#endif
// Add new attributes before this line
WA_AttributeCount
};
@@ -1051,6 +1059,9 @@ public:
Key_Suspend = 0x0100010c,
Key_ContrastAdjust = 0x0100010d,
+ Key_LaunchG = 0x0100010e,
+ Key_LaunchH = 0x0100010f,
+
Key_MediaLast = 0x0100ffff,
// Keypad navigation keys
@@ -1237,7 +1248,10 @@ public:
BusyCursor,
OpenHandCursor,
ClosedHandCursor,
- LastCursor = ClosedHandCursor,
+ DragCopyCursor,
+ DragMoveCursor,
+ DragLinkCursor,
+ LastCursor = DragLinkCursor,
BitmapCursor = 24,
CustomCursor = 25
@@ -1724,7 +1738,8 @@ public:
enum GestureFlag
{
DontStartGestureOnChildren = 0x01,
- ReceivePartialGestures = 0x02
+ ReceivePartialGestures = 0x02,
+ IgnoredGesturesPropagateToParent = 0x04
};
Q_DECLARE_FLAGS(GestureFlags, GestureFlag)
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index a75656557d..f8f3c4951d 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -42,6 +42,7 @@
/*!
\namespace Qt
\inmodule QtCore
+ \target Qt Namespace
\brief The Qt namespace contains miscellaneous identifiers
used throughout the Qt library.
@@ -1638,6 +1639,8 @@
\value Key_LaunchD On X11 this key is mapped to XF86XK_LaunchB key for legacy reasons.
\value Key_LaunchE On X11 this key is mapped to XF86XK_LaunchC key for legacy reasons.
\value Key_LaunchF On X11 this key is mapped to XF86XK_LaunchD key for legacy reasons.
+ \value Key_LaunchG On X11 this key is mapped to XF86XK_LaunchE key for legacy reasons.
+ \value Key_LaunchH On X11 this key is mapped to XF86XK_LaunchF key for legacy reasons.
\value Key_MonBrightnessUp
\value Key_MonBrightnessDown
\value Key_KeyboardLightOnOff
@@ -2516,6 +2519,15 @@
operations that allow the user to interact with
the application while they are performed in the
background.
+ \value DragMoveCursor
+ A cursor that is usually used when dragging an item.
+ \value DragCopyCursor
+ A cursor that is usually used when dragging an item
+ to copy it.
+ \value DragLinkCursor
+ A cursor that is usually used when dragging an item
+ to make a link to it.
+
\value BitmapCursor
\omitvalue LastCursor
\omitvalue CustomCursor
@@ -2976,6 +2988,11 @@
the Qt::GestureStarted state and ending with a gesture in the
Qt::GestureFinished or Qt::GestureCanceled states.
+ \value IgnoredGesturesPropagateToParent Since Qt 4.7, this flag allows you
+ to fine-tune gesture event propagation. By setting the flag when
+ \l{QGraphicsObject::grabGesture()}{grabbing} a gesture all ignored partial
+ gestures will propagate to their parent items.
+
\sa QWidget::grabGesture(), QGraphicsObject::grabGesture()
*/
diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri
index 02a1586dd6..2ed0e46912 100644
--- a/src/corelib/io/io.pri
+++ b/src/corelib/io/io.pri
@@ -6,6 +6,7 @@ HEADERS += \
io/qbuffer.h \
io/qdatastream.h \
io/qdatastream_p.h \
+ io/qdataurl_p.h \
io/qdebug.h \
io/qdir.h \
io/qdiriterator.h \
@@ -34,6 +35,7 @@ SOURCES += \
io/qabstractfileengine.cpp \
io/qbuffer.cpp \
io/qdatastream.cpp \
+ io/qdataurl.cpp \
io/qdebug.cpp \
io/qdir.cpp \
io/qdiriterator.cpp \
diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp
index 0b98e1ee49..2731ae17b7 100644
--- a/src/corelib/io/qdatastream.cpp
+++ b/src/corelib/io/qdatastream.cpp
@@ -48,6 +48,7 @@
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
+#include "qendian.h"
QT_BEGIN_NAMESPACE
@@ -576,6 +577,7 @@ void QDataStream::setByteOrder(ByteOrder bo)
\value Qt_4_4 Version 10 (Qt 4.4)
\value Qt_4_5 Version 11 (Qt 4.5)
\value Qt_4_6 Version 12 (Qt 4.6)
+ \value Qt_4_7 Same as Qt_4_6.
\sa setVersion(), version()
*/
@@ -678,24 +680,12 @@ QDataStream &QDataStream::operator>>(qint16 &i)
{
i = 0;
CHECK_STREAM_PRECOND(*this)
- if (noswap) {
- if (dev->read((char *)&i, 2) != 2) {
- i = 0;
- setStatus(ReadPastEnd);
- }
+ if (dev->read((char *)&i, 2) != 2) {
+ i = 0;
+ setStatus(ReadPastEnd);
} else {
- union {
- qint16 val1;
- char val2[2];
- } x;
- char *p = x.val2;
- char b[2];
- if (dev->read(b, 2) == 2) {
- *p++ = b[1];
- *p = b[0];
- i = x.val1;
- } else {
- setStatus(ReadPastEnd);
+ if (!noswap) {
+ i = qbswap(i);
}
}
return *this;
@@ -721,26 +711,12 @@ QDataStream &QDataStream::operator>>(qint32 &i)
{
i = 0;
CHECK_STREAM_PRECOND(*this)
- if (noswap) {
- if (dev->read((char *)&i, 4) != 4) {
- i = 0;
- setStatus(ReadPastEnd);
- }
- } else { // swap bytes
- union {
- qint32 val1;
- char val2[4];
- } x;
- char *p = x.val2;
- char b[4];
- if (dev->read(b, 4) == 4) {
- *p++ = b[3];
- *p++ = b[2];
- *p++ = b[1];
- *p = b[0];
- i = x.val1;
- } else {
- setStatus(ReadPastEnd);
+ if (dev->read((char *)&i, 4) != 4) {
+ i = 0;
+ setStatus(ReadPastEnd);
+ } else {
+ if (!noswap) {
+ i = qbswap(i);
}
}
return *this;
@@ -769,31 +745,14 @@ QDataStream &QDataStream::operator>>(qint64 &i)
quint32 i1, i2;
*this >> i2 >> i1;
i = ((quint64)i1 << 32) + i2;
- } else if (noswap) { // no conversion needed
+ } else {
if (dev->read((char *)&i, 8) != 8) {
i = qint64(0);
setStatus(ReadPastEnd);
- }
- } else { // swap bytes
- union {
- qint64 val1;
- char val2[8];
- } x;
-
- char *p = x.val2;
- char b[8];
- if (dev->read(b, 8) == 8) {
- *p++ = b[7];
- *p++ = b[6];
- *p++ = b[5];
- *p++ = b[4];
- *p++ = b[3];
- *p++ = b[2];
- *p++ = b[1];
- *p = b[0];
- i = x.val1;
} else {
- setStatus(ReadPastEnd);
+ if (!noswap) {
+ i = qbswap(i);
+ }
}
}
return *this;
@@ -833,27 +792,17 @@ QDataStream &QDataStream::operator>>(float &f)
f = 0.0f;
CHECK_STREAM_PRECOND(*this)
- if (noswap) {
- if (dev->read((char *)&f, 4) != 4) {
- f = 0.0f;
- setStatus(ReadPastEnd);
- }
- } else { // swap bytes
- union {
- float val1;
- char val2[4];
- } x;
-
- char *p = x.val2;
- char b[4];
- if (dev->read(b, 4) == 4) {
- *p++ = b[3];
- *p++ = b[2];
- *p++ = b[1];
- *p = b[0];
+ if (dev->read((char *)&f, 4) != 4) {
+ f = 0.0f;
+ setStatus(ReadPastEnd);
+ } else {
+ if (!noswap) {
+ union {
+ float val1;
+ quint32 val2;
+ } x;
+ x.val2 = qbswap(*reinterpret_cast<quint32 *>(&f));
f = x.val1;
- } else {
- setStatus(ReadPastEnd);
}
}
return *this;
@@ -886,30 +835,17 @@ QDataStream &QDataStream::operator>>(double &f)
f = 0.0;
CHECK_STREAM_PRECOND(*this)
#ifndef Q_DOUBLE_FORMAT
- if (noswap) {
- if (dev->read((char *)&f, 8) != 8) {
- f = 0.0;
- setStatus(ReadPastEnd);
- }
- } else { // swap bytes
- union {
- double val1;
- char val2[8];
- } x;
- char *p = x.val2;
- char b[8];
- if (dev->read(b, 8) == 8) {
- *p++ = b[7];
- *p++ = b[6];
- *p++ = b[5];
- *p++ = b[4];
- *p++ = b[3];
- *p++ = b[2];
- *p++ = b[1];
- *p = b[0];
+ if (dev->read((char *)&f, 8) != 8) {
+ f = 0.0;
+ setStatus(ReadPastEnd);
+ } else {
+ if (!noswap) {
+ union {
+ double val1;
+ quint64 val2;
+ } x;
+ x.val2 = qbswap(*reinterpret_cast<quint64 *>(&f));
f = x.val1;
- } else {
- setStatus(ReadPastEnd);
}
}
#else
@@ -1081,20 +1017,10 @@ QDataStream &QDataStream::operator<<(qint8 i)
QDataStream &QDataStream::operator<<(qint16 i)
{
CHECK_STREAM_PRECOND(*this)
- if (noswap) {
- dev->write((char *)&i, sizeof(qint16));
- } else { // swap bytes
- union {
- qint16 val1;
- char val2[2];
- } x;
- x.val1 = i;
- char *p = x.val2;
- char b[2];
- b[1] = *p++;
- b[0] = *p;
- dev->write(b, 2);
+ if (!noswap) {
+ i = qbswap(i);
}
+ dev->write((char *)&i, sizeof(qint16));
return *this;
}
@@ -1108,22 +1034,10 @@ QDataStream &QDataStream::operator<<(qint16 i)
QDataStream &QDataStream::operator<<(qint32 i)
{
CHECK_STREAM_PRECOND(*this)
- if (noswap) {
- dev->write((char *)&i, sizeof(qint32));
- } else { // swap bytes
- union {
- qint32 val1;
- char val2[4];
- } x;
- x.val1 = i;
- char *p = x.val2;
- char b[4];
- b[3] = *p++;
- b[2] = *p++;
- b[1] = *p++;
- b[0] = *p;
- dev->write(b, 4);
+ if (!noswap) {
+ i = qbswap(i);
}
+ dev->write((char *)&i, sizeof(qint32));
return *this;
}
@@ -1149,25 +1063,11 @@ QDataStream &QDataStream::operator<<(qint64 i)
quint32 i1 = i & 0xffffffff;
quint32 i2 = i >> 32;
*this << i2 << i1;
- } else if (noswap) { // no conversion needed
+ } else {
+ if (!noswap) {
+ i = qbswap(i);
+ }
dev->write((char *)&i, sizeof(qint64));
- } else { // swap bytes
- union {
- qint64 val1;
- char val2[8];
- } x;
- x.val1 = i;
- char *p = x.val2;
- char b[8];
- b[7] = *p++;
- b[6] = *p++;
- b[5] = *p++;
- b[4] = *p++;
- b[3] = *p++;
- b[2] = *p++;
- b[1] = *p++;
- b[0] = *p;
- dev->write(b, 8);
}
return *this;
}
@@ -1211,22 +1111,16 @@ QDataStream &QDataStream::operator<<(float f)
CHECK_STREAM_PRECOND(*this)
float g = f; // fixes float-on-stack problem
- if (noswap) { // no conversion needed
- dev->write((char *)&g, sizeof(float));
- } else { // swap bytes
+ if (!noswap) {
union {
float val1;
- char val2[4];
+ quint32 val2;
} x;
- x.val1 = f;
- char *p = x.val2;
- char b[4];
- b[3] = *p++;
- b[2] = *p++;
- b[1] = *p++;
- b[0] = *p;
- dev->write(b, 4);
+ x.val1 = g;
+ x.val2 = qbswap(x.val2);
+ g = x.val1;
}
+ dev->write((char *)&g, sizeof(float));
return *this;
}
@@ -1250,26 +1144,16 @@ QDataStream &QDataStream::operator<<(double f)
CHECK_STREAM_PRECOND(*this)
#ifndef Q_DOUBLE_FORMAT
- if (noswap) {
- dev->write((char *)&f, sizeof(double));
- } else {
+ if (!noswap) {
union {
double val1;
- char val2[8];
+ quint64 val2;
} x;
x.val1 = f;
- char *p = x.val2;
- char b[8];
- b[7] = *p++;
- b[6] = *p++;
- b[5] = *p++;
- b[4] = *p++;
- b[3] = *p++;
- b[2] = *p++;
- b[1] = *p++;
- b[0] = *p;
- dev->write(b, 8);
+ x.val2 = qbswap(x.val2);
+ f = x.val1;
}
+ dev->write((char *)&f, sizeof(double));
#else
union {
double val1;
diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h
index afc16bc9da..222ba8f5e4 100644
--- a/src/corelib/io/qdatastream.h
+++ b/src/corelib/io/qdatastream.h
@@ -84,10 +84,11 @@ public:
Qt_4_3 = 9,
Qt_4_4 = 10,
Qt_4_5 = 11,
- Qt_4_6 = 12
-#if QT_VERSION >= 0x040700
-#error Add the datastream version for this Qt version
+ Qt_4_6 = 12,
Qt_4_7 = Qt_4_6
+#if QT_VERSION >= 0x040800
+#error Add the datastream version for this Qt version
+ Qt_4_8 = Qt_4_7
#endif
};
@@ -242,6 +243,7 @@ QDataStream& operator>>(QDataStream& s, QList<T>& l)
l.clear();
quint32 c;
s >> c;
+ l.reserve(c);
for(quint32 i = 0; i < c; ++i)
{
T t;
diff --git a/src/corelib/io/qdataurl.cpp b/src/corelib/io/qdataurl.cpp
new file mode 100644
index 0000000000..4e2dec26fa
--- /dev/null
+++ b/src/corelib/io/qdataurl.cpp
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** 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 QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qplatformdefs.h"
+#include "qurl.h"
+#include "private/qdataurl_p.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \internal
+
+ Decode a data: URL into its mimetype and payload. Returns a null string if
+ the URL could not be decoded.
+*/
+Q_CORE_EXPORT QPair<QString, QByteArray> qDecodeDataUrl(const QUrl &uri)
+{
+ QString mimeType;
+ QByteArray payload;
+
+ if (uri.scheme() == QLatin1String("data") && uri.host().isEmpty()) {
+ mimeType = QLatin1String("text/plain;charset=US-ASCII");
+
+ // the following would have been the correct thing, but
+ // reality often differs from the specification. People have
+ // data: URIs with ? and #
+ //QByteArray data = QByteArray::fromPercentEncoding(uri.encodedPath());
+ QByteArray data = QByteArray::fromPercentEncoding(uri.toEncoded());
+
+ // remove the data: scheme
+ data.remove(0, 5);
+
+ // parse it:
+ int pos = data.indexOf(',');
+ if (pos != -1) {
+ payload = data.mid(pos + 1);
+ data.truncate(pos);
+ data = data.trimmed();
+
+ // find out if the payload is encoded in Base64
+ if (data.endsWith(";base64")) {
+ payload = QByteArray::fromBase64(payload);
+ data.chop(7);
+ }
+
+ if (data.toLower().startsWith("charset")) {
+ int i = 7; // strlen("charset")
+ while (data.at(i) == ' ')
+ ++i;
+ if (data.at(i) == '=')
+ data.prepend("text/plain;");
+ }
+
+ if (!data.isEmpty())
+ mimeType = QLatin1String(data.trimmed());
+
+ }
+ }
+
+ return QPair<QString,QByteArray>(mimeType,payload);
+}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/io/qdataurl_p.h b/src/corelib/io/qdataurl_p.h
new file mode 100644
index 0000000000..57cfd75abf
--- /dev/null
+++ b/src/corelib/io/qdataurl_p.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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 QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDATAURL_P_H
+#define QDATAURL_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qDecodeDataUrl. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "QtCore/qurl.h"
+#include "QtCore/qbytearray.h"
+#include "QtCore/qstring.h"
+#include "QtCore/qpair.h"
+
+QT_BEGIN_NAMESPACE
+
+Q_CORE_EXPORT QPair<QString, QByteArray> qDecodeDataUrl(const QUrl &url);
+
+QT_END_NAMESPACE
+
+#endif // QDATAURL_P_H
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index 69b3af4d5b..505889e93f 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -52,13 +52,13 @@
#include "qregexp.h"
#include "qvector.h"
#include "qalgorithms.h"
+#include "qvarlengtharray.h"
+
#ifdef QT_BUILD_CORE_LIB
-# include "qresource.h"
+# include "qresource.h"
+# include "private/qcoreglobaldata_p.h"
#endif
-#include "qvarlengtharray.h"
-
-#include "private/qcoreglobaldata_p.h"
#include <stdlib.h>
QT_BEGIN_NAMESPACE
@@ -83,20 +83,15 @@ static QString driveSpec(const QString &path)
//************* QDirPrivate
class QDirPrivate
{
- QDir *q_ptr;
- Q_DECLARE_PUBLIC(QDir)
-
friend struct QScopedPointerDeleter<QDirPrivate>;
-protected:
- QDirPrivate(QDir*, const QDir *copy=0);
- ~QDirPrivate();
- QString initFileEngine(const QString &file);
+public:
+ QDirPrivate(const QDir *copy = 0);
+ ~QDirPrivate();
void updateFileLists() const;
void sortFileList(QDir::SortFlags, QFileInfoList &, QStringList *, QFileInfoList *) const;
-private:
#ifdef QT3_SUPPORT
QChar filterSepChar;
bool matchAllDirs;
@@ -109,28 +104,30 @@ private:
sep = QChar(QLatin1Char(' '));
return sep;
}
- static inline QStringList splitFilters(const QString &nameFilter, QChar sep=0) {
- if(sep == 0)
+ static inline QStringList splitFilters(const QString &nameFilter, QChar sep = 0) {
+ if (sep == 0)
sep = getFilterSepChar(nameFilter);
QStringList ret = nameFilter.split(sep);
- for(int i = 0; i < ret.count(); i++)
+ for (int i = 0; i < ret.count(); ++i)
ret[i] = ret[i].trimmed();
return ret;
}
struct Data {
inline Data()
- : ref(1), fileEngine(0)
- { clear(); }
+ : ref(1), fileEngine(0), listsDirty(1)
+ {}
inline Data(const Data &copy)
: ref(1), path(copy.path), nameFilters(copy.nameFilters), sort(copy.sort),
- filters(copy.filters), fileEngine(0)
- { clear(); }
+ filters(copy.filters), fileEngine(0), listsDirty(1)
+ {}
inline ~Data()
{ delete fileEngine; }
inline void clear() {
listsDirty = 1;
+ files.clear();
+ fileInfos.clear();
}
mutable QAtomicInt ref;
@@ -156,9 +153,10 @@ private:
#endif
path.truncate(path.length() - 1);
}
- if(!data->fileEngine || !QDir::isRelativePath(path))
- path = initFileEngine(path);
- data->fileEngine->setFileName(path);
+
+ delete data->fileEngine;
+ data->fileEngine = QAbstractFileEngine::create(path);
+
// set the path to be the qt friendly version so then we can operate on it using just /
data->path = data->fileEngine->fileName(QAbstractFileEngine::DefaultName);
data->clear();
@@ -170,18 +168,16 @@ private:
void detach(bool createFileEngine = true);
};
-QDirPrivate::QDirPrivate(QDir *qq, const QDir *copy) : q_ptr(qq)
+QDirPrivate::QDirPrivate(const QDir *copy)
#ifdef QT3_SUPPORT
- , filterSepChar(0)
- , matchAllDirs(false)
+ : filterSepChar(0), matchAllDirs(false)
#endif
{
- if(copy) {
+ if (copy) {
copy->d_func()->data->ref.ref();
data = copy->d_func()->data;
} else {
data = new QDirPrivate::Data;
- data->clear();
}
}
@@ -190,18 +186,19 @@ QDirPrivate::~QDirPrivate()
if (!data->ref.deref())
delete data;
data = 0;
- q_ptr = 0;
}
/* For sorting */
-struct QDirSortItem {
+struct QDirSortItem
+{
mutable QString filename_cache;
mutable QString suffix_cache;
QFileInfo item;
};
-class QDirSortItemComparator {
+class QDirSortItemComparator
+{
int qt_cmp_si_sort_flags;
public:
QDirSortItemComparator(int flags) : qt_cmp_si_sort_flags(flags) {}
@@ -240,7 +237,7 @@ bool QDirSortItemComparator::operator()(const QDirSortItem &n1, const QDirSortIt
f2->suffix_cache = ic ? f2->item.suffix().toLower()
: f2->item.suffix();
- r = qt_cmp_si_sort_flags & QDir::LocaleAware
+ r = qt_cmp_si_sort_flags & QDir::LocaleAware
? f1->suffix_cache.localeAwareCompare(f2->suffix_cache)
: f1->suffix_cache.compare(f2->suffix_cache);
}
@@ -260,7 +257,7 @@ bool QDirSortItemComparator::operator()(const QDirSortItem &n1, const QDirSortIt
f2->filename_cache = ic ? f2->item.fileName().toLower()
: f2->item.fileName();
- r = qt_cmp_si_sort_flags & QDir::LocaleAware
+ r = qt_cmp_si_sort_flags & QDir::LocaleAware
? f1->filename_cache.localeAwareCompare(f2->filename_cache)
: f1->filename_cache.compare(f2->filename_cache);
}
@@ -274,16 +271,13 @@ bool QDirSortItemComparator::operator()(const QDirSortItem &n1, const QDirSortIt
inline void QDirPrivate::sortFileList(QDir::SortFlags sort, QFileInfoList &l,
QStringList *names, QFileInfoList *infos) const
{
- if(names)
- names->clear();
- if(infos)
- infos->clear();
+ // names and infos are always empty lists or 0 here
int n = l.size();
- if(n > 0) {
+ if (n > 0) {
if (n == 1 || (sort & QDir::SortByMask) == QDir::Unsorted) {
- if(infos)
+ if (infos)
*infos = l;
- if(names) {
+ if (names) {
for (int i = 0; i < n; ++i)
names->append(l.at(i).fileName());
}
@@ -291,13 +285,13 @@ inline void QDirPrivate::sortFileList(QDir::SortFlags sort, QFileInfoList &l,
QScopedArrayPointer<QDirSortItem> si(new QDirSortItem[n]);
for (int i = 0; i < n; ++i)
si[i].item = l.at(i);
- qSort(si.data(), si.data()+n, QDirSortItemComparator(sort));
+ qSort(si.data(), si.data() + n, QDirSortItemComparator(sort));
// put them back in the list(s)
- if(infos) {
+ if (infos) {
for (int i = 0; i < n; ++i)
infos->append(si[i].item);
}
- if(names) {
+ if (names) {
for (int i = 0; i < n; ++i)
names->append(si[i].item.fileName());
}
@@ -307,7 +301,7 @@ inline void QDirPrivate::sortFileList(QDir::SortFlags sort, QFileInfoList &l,
inline void QDirPrivate::updateFileLists() const
{
- if(data->listsDirty) {
+ if (data->listsDirty) {
QFileInfoList l;
QDirIterator it(data->path, data->nameFilters, data->filters);
while (it.hasNext()) {
@@ -319,16 +313,6 @@ inline void QDirPrivate::updateFileLists() const
}
}
-QString QDirPrivate::initFileEngine(const QString &path)
-{
- detach(false);
- delete data->fileEngine;
- data->fileEngine = 0;
- data->clear();
- data->fileEngine = QAbstractFileEngine::create(path);
- return data->fileEngine->fileName(QAbstractFileEngine::DefaultName);
-}
-
void QDirPrivate::detach(bool createFileEngine)
{
qAtomicDetach(data);
@@ -520,8 +504,7 @@ void QDirPrivate::detach(bool createFileEngine)
\sa currentPath()
*/
-
-QDir::QDir(const QString &path) : d_ptr(new QDirPrivate(this))
+QDir::QDir(const QString &path) : d_ptr(new QDirPrivate)
{
Q_D(QDir);
d->setPath(path.isEmpty() ? QString::fromLatin1(".") : path);
@@ -548,18 +531,17 @@ QDir::QDir(const QString &path) : d_ptr(new QDirPrivate(this))
\sa exists(), setPath(), setNameFilter(), setFilter(), setSorting()
*/
-
QDir::QDir(const QString &path, const QString &nameFilter,
- SortFlags sort, Filters filters) : d_ptr(new QDirPrivate(this))
+ SortFlags sort, Filters filters) : d_ptr(new QDirPrivate)
{
Q_D(QDir);
d->setPath(path.isEmpty() ? QString::fromLatin1(".") : path);
d->data->nameFilters = QDir::nameFiltersFromString(nameFilter);
bool empty = d->data->nameFilters.isEmpty();
- if(!empty) {
+ if (!empty) {
empty = true;
- for(int i = 0; i < d->data->nameFilters.size(); ++i) {
- if(!d->data->nameFilters.at(i).isEmpty()) {
+ for (int i = 0; i < d->data->nameFilters.size(); ++i) {
+ if (!d->data->nameFilters.at(i).isEmpty()) {
empty = false;
break;
}
@@ -577,8 +559,7 @@ QDir::QDir(const QString &path, const QString &nameFilter,
\sa operator=()
*/
-
-QDir::QDir(const QDir &dir) : d_ptr(new QDirPrivate(this, &dir))
+QDir::QDir(const QDir &dir) : d_ptr(new QDirPrivate(&dir))
{
}
@@ -586,7 +567,6 @@ QDir::QDir(const QDir &dir) : d_ptr(new QDirPrivate(this, &dir))
Destroys the QDir object frees up its resources. This has no
effect on the underlying directory in the file system.
*/
-
QDir::~QDir()
{
}
@@ -607,7 +587,6 @@ QDir::~QDir()
\sa path(), absolutePath(), exists(), cleanPath(), dirName(),
absoluteFilePath(), isRelative(), makeAbsolute()
*/
-
void QDir::setPath(const QString &path)
{
Q_D(QDir);
@@ -624,7 +603,6 @@ void QDir::setPath(const QString &path)
\sa setPath(), absolutePath(), exists(), cleanPath(), dirName(),
absoluteFilePath(), toNativeSeparators(), makeAbsolute()
*/
-
QString QDir::path() const
{
Q_D(const QDir);
@@ -639,7 +617,6 @@ QString QDir::path() const
\sa setPath(), canonicalPath(), exists(), cleanPath(),
dirName(), absoluteFilePath()
*/
-
QString QDir::absolutePath() const
{
Q_D(const QDir);
@@ -649,7 +626,6 @@ QString QDir::absolutePath() const
return cleanPath(ret);
}
-
/*!
Returns the canonical path, i.e. a path without symbolic links or
redundant "." or ".." elements.
@@ -666,12 +642,11 @@ QString QDir::absolutePath() const
\sa path(), absolutePath(), exists(), cleanPath(), dirName(),
absoluteFilePath()
*/
-
QString QDir::canonicalPath() const
{
Q_D(const QDir);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return QLatin1String("");
return cleanPath(d->data->fileEngine->fileName(QAbstractFileEngine::CanonicalName));
}
@@ -687,7 +662,6 @@ QString QDir::canonicalPath() const
\sa path(), filePath(), absolutePath(), absoluteFilePath()
*/
-
QString QDir::dirName() const
{
Q_D(const QDir);
@@ -706,7 +680,6 @@ QString QDir::dirName() const
\sa dirName() absoluteFilePath(), isRelative(), canonicalPath()
*/
-
QString QDir::filePath(const QString &fileName) const
{
Q_D(const QDir);
@@ -714,7 +687,7 @@ QString QDir::filePath(const QString &fileName) const
return QString(fileName);
QString ret = d->data->path;
- if(!fileName.isEmpty()) {
+ if (!fileName.isEmpty()) {
if (!ret.isEmpty() && ret[(int)ret.length()-1] != QLatin1Char('/') && fileName[0] != QLatin1Char('/'))
ret += QLatin1Char('/');
ret += fileName;
@@ -730,13 +703,12 @@ QString QDir::filePath(const QString &fileName) const
\sa relativeFilePath() filePath() canonicalPath()
*/
-
QString QDir::absoluteFilePath(const QString &fileName) const
{
Q_D(const QDir);
if (isAbsolutePath(fileName))
return fileName;
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return fileName;
QString ret;
@@ -744,7 +716,7 @@ QString QDir::absoluteFilePath(const QString &fileName) const
if (isRelativePath(d->data->path)) //get pwd
ret = QFSFileEngine::currentPath(fileName);
#endif
- if(!d->data->path.isEmpty() && d->data->path != QLatin1String(".")) {
+ if (!d->data->path.isEmpty() && d->data->path != QLatin1String(".")) {
if (!ret.isEmpty() && !ret.endsWith(QLatin1Char('/')))
ret += QLatin1Char('/');
ret += d->data->path;
@@ -764,7 +736,6 @@ QString QDir::absoluteFilePath(const QString &fileName) const
\sa absoluteFilePath() filePath() canonicalPath()
*/
-
QString QDir::relativeFilePath(const QString &fileName) const
{
QString dir = absolutePath();
@@ -851,7 +822,7 @@ QString QDir::toNativeSeparators(const QString &pathName)
{
QString n(pathName);
#if defined(Q_FS_FAT) || defined(Q_OS_OS2EMX) || defined(Q_OS_SYMBIAN)
- for (int i=0; i<(int)n.length(); i++) {
+ for (int i = 0; i < (int)n.length(); ++i) {
if (n[i] == QLatin1Char('/'))
n[i] = QLatin1Char('\\');
}
@@ -875,7 +846,7 @@ QString QDir::fromNativeSeparators(const QString &pathName)
{
QString n(pathName);
#if defined(Q_FS_FAT) || defined(Q_OS_OS2EMX) || defined(Q_OS_SYMBIAN)
- for (int i=0; i<(int)n.length(); i++) {
+ for (int i = 0; i < (int)n.length(); ++i) {
if (n[i] == QLatin1Char('\\'))
n[i] = QLatin1Char('/');
}
@@ -894,7 +865,6 @@ QString QDir::fromNativeSeparators(const QString &pathName)
\sa cdUp(), isReadable(), exists(), path()
*/
-
bool QDir::cd(const QString &dirName)
{
Q_D(QDir);
@@ -930,14 +900,13 @@ bool QDir::cd(const QString &dirName)
}
}
}
- {
- QFileInfo fi(newPath);
- if (!(fi.exists() && fi.isDir()))
- return false;
- }
- d->setPath(newPath);
- refresh();
+ QDir dir(*this);
+ dir.setPath(newPath);
+ if (!dir.exists())
+ return false;
+
+ *this = dir;
return true;
}
@@ -951,7 +920,6 @@ bool QDir::cd(const QString &dirName)
\sa cd(), isReadable(), exists(), path()
*/
-
bool QDir::cdUp()
{
return cd(QString::fromLatin1(".."));
@@ -960,7 +928,6 @@ bool QDir::cdUp()
/*!
Returns the string list set by setNameFilters()
*/
-
QStringList QDir::nameFilters() const
{
Q_D(const QDir);
@@ -983,11 +950,11 @@ QStringList QDir::nameFilters() const
\sa nameFilters(), setFilter()
*/
-
void QDir::setNameFilters(const QStringList &nameFilters)
{
Q_D(QDir);
- d->detach();
+
+ d->reset();
d->data->nameFilters = nameFilters;
}
@@ -1039,7 +1006,7 @@ void QDir::setSearchPaths(const QString &prefix, const QStringList &searchPaths)
return;
}
- for (int i = 0; i < prefix.count(); i++) {
+ for (int i = 0; i < prefix.count(); ++i) {
if (!prefix.at(i).isLetterOrNumber()) {
qWarning("QDir::setSearchPaths: Prefix can only contain letters or numbers");
return;
@@ -1089,7 +1056,6 @@ QStringList QDir::searchPaths(const QString &prefix)
/*!
Returns the value set by setFilter()
*/
-
QDir::Filters QDir::filter() const
{
Q_D(const QDir);
@@ -1171,12 +1137,11 @@ QDir::Filters QDir::filter() const
\sa filter(), setNameFilters()
*/
-
void QDir::setFilter(Filters filters)
{
Q_D(QDir);
- d->detach();
+ d->reset();
d->data->filters = filters;
}
@@ -1185,7 +1150,6 @@ void QDir::setFilter(Filters filters)
\sa setSorting() SortFlag
*/
-
QDir::SortFlags QDir::sorting() const
{
Q_D(const QDir);
@@ -1231,16 +1195,14 @@ QDir::SortFlags QDir::sorting() const
\sa sorting() SortFlag
*/
-
void QDir::setSorting(SortFlags sort)
{
Q_D(QDir);
- d->detach();
+ d->reset();
d->data->sort = sort;
}
-
/*!
Returns the total number of directories and files in the directory.
@@ -1248,7 +1210,6 @@ void QDir::setSorting(SortFlags sort)
\sa operator[](), entryList()
*/
-
uint QDir::count() const
{
Q_D(const QDir);
@@ -1260,13 +1221,10 @@ uint QDir::count() const
/*!
Returns the file name at position \a pos in the list of file
names. Equivalent to entryList().at(index).
-
- Returns an empty string if \a pos is out of range or if the
- entryList() function failed.
+ \a pos must be a valid index position in the list (i.e., 0 <= pos < count()).
\sa count(), entryList()
*/
-
QString QDir::operator[](int pos) const
{
Q_D(const QDir);
@@ -1294,7 +1252,6 @@ QString QDir::operator[](int pos) const
\sa entryInfoList(), setNameFilters(), setSorting(), setFilter()
*/
-
QStringList QDir::entryList(Filters filters, SortFlags sort) const
{
Q_D(const QDir);
@@ -1342,7 +1299,6 @@ QFileInfoList QDir::entryInfoList(Filters filters, SortFlags sort) const
\sa entryInfoList(), setNameFilters(), setSorting(), setFilter()
*/
-
QStringList QDir::entryList(const QStringList &nameFilters, Filters filters,
SortFlags sort) const
{
@@ -1356,10 +1312,12 @@ QStringList QDir::entryList(const QStringList &nameFilters, Filters filters,
#endif
if (sort == NoSort)
sort = d->data->sort;
- if (filters == NoFilter && sort == NoSort && nameFilters == d->data->nameFilters) {
+
+ if (filters == d->data->filters && sort == d->data->sort && nameFilters == d->data->nameFilters) {
d->updateFileLists();
return d->data->files;
}
+
QFileInfoList l;
QDirIterator it(d->data->path, nameFilters, filters);
while (it.hasNext()) {
@@ -1387,7 +1345,6 @@ QStringList QDir::entryList(const QStringList &nameFilters, Filters filters,
\sa entryList(), setNameFilters(), setSorting(), setFilter(), isReadable(), exists()
*/
-
QFileInfoList QDir::entryInfoList(const QStringList &nameFilters, Filters filters,
SortFlags sort) const
{
@@ -1401,10 +1358,12 @@ QFileInfoList QDir::entryInfoList(const QStringList &nameFilters, Filters filter
#endif
if (sort == NoSort)
sort = d->data->sort;
- if (filters == NoFilter && sort == NoSort && nameFilters == d->data->nameFilters) {
+
+ if (filters == d->data->filters && sort == d->data->sort && nameFilters == d->data->nameFilters) {
d->updateFileLists();
return d->data->fileInfos;
}
+
QFileInfoList l;
QDirIterator it(d->data->path, nameFilters, filters);
while (it.hasNext()) {
@@ -1423,7 +1382,6 @@ QFileInfoList QDir::entryInfoList(const QStringList &nameFilters, Filters filter
\sa rmdir()
*/
-
bool QDir::mkdir(const QString &dirName) const
{
Q_D(const QDir);
@@ -1432,7 +1390,7 @@ bool QDir::mkdir(const QString &dirName) const
qWarning("QDir::mkdir: Empty or null file name(s)");
return false;
}
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
QString fn = filePath(dirName);
@@ -1448,7 +1406,6 @@ bool QDir::mkdir(const QString &dirName) const
\sa mkdir()
*/
-
bool QDir::rmdir(const QString &dirName) const
{
Q_D(const QDir);
@@ -1457,7 +1414,7 @@ bool QDir::rmdir(const QString &dirName) const
qWarning("QDir::rmdir: Empty or null file name(s)");
return false;
}
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
QString fn = filePath(dirName);
@@ -1474,7 +1431,6 @@ bool QDir::rmdir(const QString &dirName) const
\sa rmpath()
*/
-
bool QDir::mkpath(const QString &dirPath) const
{
Q_D(const QDir);
@@ -1483,7 +1439,7 @@ bool QDir::mkpath(const QString &dirPath) const
qWarning("QDir::mkpath: Empty or null file name(s)");
return false;
}
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
QString fn = filePath(dirPath);
@@ -1509,7 +1465,7 @@ bool QDir::rmpath(const QString &dirPath) const
qWarning("QDir::rmpath: Empty or null file name(s)");
return false;
}
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
QString fn = filePath(dirPath);
@@ -1525,17 +1481,16 @@ bool QDir::rmpath(const QString &dirPath) const
\sa QFileInfo::isReadable()
*/
-
-
bool QDir::isReadable() const
{
Q_D(const QDir);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
- const QAbstractFileEngine::FileFlags info = d->data->fileEngine->fileFlags(QAbstractFileEngine::DirectoryType
- |QAbstractFileEngine::PermsMask);
- if(!(info & QAbstractFileEngine::DirectoryType))
+ const QAbstractFileEngine::FileFlags info =
+ d->data->fileEngine->fileFlags(QAbstractFileEngine::DirectoryType
+ | QAbstractFileEngine::PermsMask);
+ if (!(info & QAbstractFileEngine::DirectoryType))
return false;
return info & QAbstractFileEngine::ReadUserPerm;
}
@@ -1551,19 +1506,17 @@ bool QDir::isReadable() const
\sa QFileInfo::exists(), QFile::exists()
*/
-
bool QDir::exists() const
{
Q_D(const QDir);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
const QAbstractFileEngine::FileFlags info =
- d->data->fileEngine->fileFlags(
- QAbstractFileEngine::DirectoryType
- | QAbstractFileEngine::ExistsFlag
- | QAbstractFileEngine::Refresh);
- if(!(info & QAbstractFileEngine::DirectoryType))
+ d->data->fileEngine->fileFlags(QAbstractFileEngine::DirectoryType
+ | QAbstractFileEngine::ExistsFlag
+ | QAbstractFileEngine::Refresh);
+ if (!(info & QAbstractFileEngine::DirectoryType))
return false;
return info & QAbstractFileEngine::ExistsFlag;
}
@@ -1580,12 +1533,11 @@ bool QDir::exists() const
\sa root(), rootPath()
*/
-
bool QDir::isRoot() const
{
Q_D(const QDir);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return true;
return d->data->fileEngine->fileFlags(QAbstractFileEngine::FlagsMask) & QAbstractFileEngine::RootFlag;
}
@@ -1615,12 +1567,11 @@ bool QDir::isRoot() const
\sa makeAbsolute() isAbsolute() isAbsolutePath() cleanPath()
*/
-
bool QDir::isRelative() const
{
Q_D(const QDir);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
return d->data->fileEngine->isRelativePath();
}
@@ -1633,20 +1584,19 @@ bool QDir::isRelative() const
\sa isAbsolute() isAbsolutePath() isRelative() cleanPath()
*/
-
bool QDir::makeAbsolute() // ### What do the return values signify?
{
Q_D(QDir);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
QString absolutePath = d->data->fileEngine->fileName(QAbstractFileEngine::AbsoluteName);
- if(QDir::isRelativePath(absolutePath))
+ if (QDir::isRelativePath(absolutePath))
return false;
d->detach();
d->data->path = absolutePath;
d->data->fileEngine->setFileName(absolutePath);
- if(!(d->data->fileEngine->fileFlags(QAbstractFileEngine::TypesMask) & QAbstractFileEngine::DirectoryType))
+ if (!(d->data->fileEngine->fileFlags(QAbstractFileEngine::TypesMask) & QAbstractFileEngine::DirectoryType))
return false;
return true;
}
@@ -1660,22 +1610,21 @@ bool QDir::makeAbsolute() // ### What do the return values signify?
\snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 10
*/
-
bool QDir::operator==(const QDir &dir) const
{
const QDirPrivate *d = d_func();
const QDirPrivate *other = dir.d_func();
- if(d->data == other->data)
+ if (d->data == other->data)
return true;
Q_ASSERT(d->data->fileEngine && other->data->fileEngine);
- if(d->data->fileEngine->caseSensitive() != other->data->fileEngine->caseSensitive())
+ if (d->data->fileEngine->caseSensitive() != other->data->fileEngine->caseSensitive())
return false;
- if(d->data->filters == other->data->filters
+ if (d->data->filters == other->data->filters
&& d->data->sort == other->data->sort
&& d->data->nameFilters == other->data->nameFilters) {
QString dir1 = absolutePath(), dir2 = dir.absolutePath();
- if(!other->data->fileEngine->caseSensitive())
+ if (!other->data->fileEngine->caseSensitive())
return (dir1.toLower() == dir2.toLower());
return (dir1 == dir2);
@@ -1688,7 +1637,6 @@ bool QDir::operator==(const QDir &dir) const
Makes a copy of the \a dir object and assigns it to this QDir
object.
*/
-
QDir &QDir::operator=(const QDir &dir)
{
if (this == &dir)
@@ -1707,7 +1655,6 @@ QDir &QDir::operator=(const QDir &dir)
Use setPath() instead.
*/
-
QDir &QDir::operator=(const QString &path)
{
Q_D(QDir);
@@ -1728,22 +1675,19 @@ QDir &QDir::operator=(const QString &path)
\snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 11
*/
-
/*!
Removes the file, \a fileName.
Returns true if the file is removed successfully; otherwise
returns false.
*/
-
bool QDir::remove(const QString &fileName)
{
if (fileName.isEmpty()) {
qWarning("QDir::remove: Empty or null file name");
return false;
}
- QString p = filePath(fileName);
- return QFile::remove(p);
+ return QFile::remove(filePath(fileName));
}
/*!
@@ -1757,7 +1701,6 @@ bool QDir::remove(const QString &fileName)
fail. For example, on at least one file system rename() fails if
\a newName points to an open file.
*/
-
bool QDir::rename(const QString &oldName, const QString &newName)
{
Q_D(QDir);
@@ -1766,11 +1709,11 @@ bool QDir::rename(const QString &oldName, const QString &newName)
qWarning("QDir::rename: Empty or null file name(s)");
return false;
}
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
QFile file(filePath(oldName));
- if(!file.exists())
+ if (!file.exists())
return false;
return file.rename(filePath(newName));
}
@@ -1785,15 +1728,13 @@ bool QDir::rename(const QString &oldName, const QString &newName)
\sa QFileInfo::exists(), QFile::exists()
*/
-
bool QDir::exists(const QString &name) const
{
if (name.isEmpty()) {
qWarning("QDir::exists: Empty or null file name");
return false;
}
- QString tmp = filePath(name);
- return QFile::exists(tmp);
+ return QFile::exists(filePath(name));
}
/*!
@@ -1805,7 +1746,6 @@ bool QDir::exists(const QString &name) const
\sa root(), rootPath()
*/
-
QFileInfoList QDir::drives()
{
#ifdef QT_NO_FSFILEENGINE
@@ -1825,7 +1765,6 @@ QFileInfoList QDir::drives()
user using their operating system's separator use
toNativeSeparators().
*/
-
QChar QDir::separator()
{
#if defined (Q_FS_FAT) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN)
@@ -1844,9 +1783,8 @@ QChar QDir::separator()
Returns true if the directory was successfully changed; otherwise
returns false.
- \sa current() currentPath() home() root() temp()
+ \sa current(), currentPath(), home(), root(), temp()
*/
-
bool QDir::setCurrent(const QString &path)
{
#ifdef QT_NO_FSFILEENGINE
@@ -1865,13 +1803,13 @@ bool QDir::setCurrent(const QString &path)
The directory is constructed using the absolute path of the current directory,
ensuring that its path() will be the same as its absolutePath().
- \sa currentPath(), home(), root(), temp()
+ \sa currentPath(), setCurrent(), home(), root(), temp()
*/
/*!
Returns the absolute path of the application's current directory.
- \sa current(), homePath(), rootPath(), tempPath()
+ \sa current(), setCurrent(), homePath(), rootPath(), tempPath()
*/
QString QDir::currentPath()
{
@@ -1888,7 +1826,7 @@ QString QDir::currentPath()
Use currentPath() instead.
- \sa currentPath()
+ \sa currentPath(), setCurrent()
*/
/*!
@@ -1945,14 +1883,14 @@ QString QDir::homePath()
}
/*!
- \fn QString QDir::homeDirPath()
+ \fn QString QDir::homeDirPath()
- Returns the absolute path of the user's home directory.
+ Returns the absolute path of the user's home directory.
- Use homePath() instead.
+ Use homePath() instead.
- \sa homePath()
- */
+ \sa homePath()
+*/
/*!
\fn QDir QDir::temp()
@@ -2018,13 +1956,13 @@ QString QDir::rootPath()
}
/*!
- \fn QString QDir::rootDirPath()
+ \fn QString QDir::rootDirPath()
- Returns the absolute path of the root directory.
+ Returns the absolute path of the root directory.
- Use rootPath() instead.
+ Use rootPath() instead.
- \sa rootPath()
+ \sa rootPath()
*/
#ifndef QT_NO_REGEXP
@@ -2037,11 +1975,9 @@ QString QDir::rootPath()
\sa {QRegExp wildcard matching}, QRegExp::exactMatch() entryList() entryInfoList()
*/
-
-
bool QDir::match(const QStringList &filters, const QString &fileName)
{
- for(QStringList::ConstIterator sit = filters.begin(); sit != filters.end(); ++sit) {
+ for (QStringList::ConstIterator sit = filters.constBegin(); sit != filters.constEnd(); ++sit) {
QRegExp rx(*sit, Qt::CaseInsensitive, QRegExp::Wildcard);
if (rx.exactMatch(fileName))
return true;
@@ -2057,12 +1993,11 @@ bool QDir::match(const QStringList &filters, const QString &fileName)
\sa {QRegExp wildcard matching}, QRegExp::exactMatch() entryList() entryInfoList()
*/
-
bool QDir::match(const QString &filter, const QString &fileName)
{
return match(nameFiltersFromString(filter), fileName);
}
-#endif
+#endif // QT_NO_REGEXP
/*!
Removes all multiple directory separators "/" and resolves any
@@ -2075,15 +2010,14 @@ bool QDir::match(const QString &filter, const QString &fileName)
\sa absolutePath() canonicalPath()
*/
-
QString QDir::cleanPath(const QString &path)
{
if (path.isEmpty())
return path;
QString name = path;
QChar dir_separator = separator();
- if(dir_separator != QLatin1Char('/'))
- name.replace(dir_separator, QLatin1Char('/'));
+ if (dir_separator != QLatin1Char('/'))
+ name.replace(dir_separator, QLatin1Char('/'));
int used = 0, levels = 0;
const int len = name.length();
@@ -2091,27 +2025,27 @@ QString QDir::cleanPath(const QString &path)
QChar *out = outVector.data();
const QChar *p = name.unicode();
- for(int i = 0, last = -1, iwrite = 0; i < len; i++) {
- if(p[i] == QLatin1Char('/')) {
- while(i < len-1 && p[i+1] == QLatin1Char('/')) {
+ for (int i = 0, last = -1, iwrite = 0; i < len; ++i) {
+ if (p[i] == QLatin1Char('/')) {
+ while (i < len-1 && p[i+1] == QLatin1Char('/')) {
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) //allow unc paths
- if(!i)
+ if (!i)
break;
#endif
i++;
}
bool eaten = false;
- if(i < len - 1 && p[i+1] == QLatin1Char('.')) {
+ if (i < len - 1 && p[i+1] == QLatin1Char('.')) {
int dotcount = 1;
- if(i < len - 2 && p[i+2] == QLatin1Char('.'))
+ if (i < len - 2 && p[i+2] == QLatin1Char('.'))
dotcount++;
- if(i == len - dotcount - 1) {
- if(dotcount == 1) {
+ if (i == len - dotcount - 1) {
+ if (dotcount == 1) {
break;
- } else if(levels) {
- if(last == -1) {
- for(int i2 = iwrite-1; i2 >= 0; i2--) {
- if(out[i2] == QLatin1Char('/')) {
+ } else if (levels) {
+ if (last == -1) {
+ for (int i2 = iwrite-1; i2 >= 0; i2--) {
+ if (out[i2] == QLatin1Char('/')) {
last = i2;
break;
}
@@ -2120,11 +2054,11 @@ QString QDir::cleanPath(const QString &path)
used -= iwrite - last - 1;
break;
}
- } else if(p[i+dotcount+1] == QLatin1Char('/')) {
- if(dotcount == 2 && levels) {
- if(last == -1 || iwrite - last == 1) {
- for(int i2 = (last == -1) ? (iwrite-1) : (last-1); i2 >= 0; i2--) {
- if(out[i2] == QLatin1Char('/')) {
+ } else if (p[i+dotcount+1] == QLatin1Char('/')) {
+ if (dotcount == 2 && levels) {
+ if (last == -1 || iwrite - last == 1) {
+ for (int i2 = (last == -1) ? (iwrite-1) : (last-1); i2 >= 0; i2--) {
+ if (out[i2] == QLatin1Char('/')) {
eaten = true;
last = i2;
break;
@@ -2133,7 +2067,7 @@ QString QDir::cleanPath(const QString &path)
} else {
eaten = true;
}
- if(eaten) {
+ if (eaten) {
levels--;
used -= iwrite - last;
iwrite = last;
@@ -2145,38 +2079,38 @@ QString QDir::cleanPath(const QString &path)
iwrite = qMax(0, last);
last = -1;
++i;
- } else if(dotcount == 1) {
+ } else if (dotcount == 1) {
eaten = true;
}
- if(eaten)
+ if (eaten)
i += dotcount;
} else {
levels++;
}
- } else if(last != -1 && iwrite - last == 1) {
+ } else if (last != -1 && iwrite - last == 1) {
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
eaten = (iwrite > 2);
#else
eaten = true;
#endif
last = -1;
- } else if(last != -1 && i == len-1) {
+ } else if (last != -1 && i == len-1) {
eaten = true;
} else {
levels++;
}
- if(!eaten)
+ if (!eaten)
last = i - (i - iwrite);
else
continue;
- } else if(!i && p[i] == QLatin1Char('.')) {
+ } else if (!i && p[i] == QLatin1Char('.')) {
int dotcount = 1;
- if(len >= 1 && p[1] == QLatin1Char('.'))
+ if (len >= 1 && p[1] == QLatin1Char('.'))
dotcount++;
- if(len >= dotcount && p[dotcount] == QLatin1Char('/')) {
- if(dotcount == 1) {
+ if (len >= dotcount && p[dotcount] == QLatin1Char('/')) {
+ if (dotcount == 1) {
i++;
- while(i+1 < len-1 && p[i+1] == QLatin1Char('/'))
+ while (i+1 < len-1 && p[i+1] == QLatin1Char('/'))
i++;
continue;
}
@@ -2185,16 +2119,15 @@ QString QDir::cleanPath(const QString &path)
out[iwrite++] = p[i];
used++;
}
- QString ret;
- if(used == len)
- ret = name;
- else
- ret = QString(out, used);
+ QString ret = (used == len ? name : QString(out, used));
// Strip away last slash except for root directories
- if (ret.endsWith(QLatin1Char('/'))
- && !(ret.size() == 1 || (ret.size() == 3 && ret.at(1) == QLatin1Char(':'))))
- ret = ret.left(ret.length() - 1);
+ if (ret.length() > 1 && ret.endsWith(QLatin1Char('/'))) {
+#ifdef Q_OS_WIN
+ if (!(ret.length() == 3 && ret.at(1) == QLatin1Char(':')))
+#endif
+ ret.chop(1);
+ }
return ret;
}
@@ -2205,7 +2138,6 @@ QString QDir::cleanPath(const QString &path)
\sa isRelative() isAbsolutePath() makeAbsolute()
*/
-
bool QDir::isRelativePath(const QString &path)
{
return QFileInfo(path).isRelative();
@@ -2214,12 +2146,11 @@ bool QDir::isRelativePath(const QString &path)
/*!
Refreshes the directory information.
*/
-
void QDir::refresh() const
{
Q_D(const QDir);
- d->data->clear();
+ const_cast<QDirPrivate *>(d)->reset();
}
/*!
@@ -2229,7 +2160,6 @@ void QDir::refresh() const
there is more than one filter, each pair of filters is separated
by a space or by a semicolon.)
*/
-
QStringList QDir::nameFiltersFromString(const QString &nameFilter)
{
return QDirPrivate::splitFilters(nameFilter);
@@ -2309,6 +2239,8 @@ bool QDir::matchAllDirs() const
void QDir::setMatchAllDirs(bool on)
{
Q_D(QDir);
+
+ d->reset();
d->matchAllDirs = on;
}
@@ -2421,7 +2353,8 @@ void QDir::setNameFilter(const QString &nameFilter)
Use QDir::SortFlags instead.
*/
-#endif
+#endif // QT3_SUPPORT
+
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug debug, QDir::Filters filters)
{
@@ -2484,9 +2417,6 @@ QDebug operator<<(QDebug debug, const QDir &dir)
<< ')';
return debug.space();
}
-
-
-
-#endif
+#endif // QT_NO_DEBUG_STREAM
QT_END_NAMESPACE
diff --git a/src/corelib/io/qdir.h b/src/corelib/io/qdir.h
index 6be4922d20..186dd2f05a 100644
--- a/src/corelib/io/qdir.h
+++ b/src/corelib/io/qdir.h
@@ -83,7 +83,7 @@ public:
Modified = 0x080,
Hidden = 0x100,
System = 0x200,
-
+
AccessMask = 0x3F0,
AllDirs = 0x400,
@@ -215,6 +215,7 @@ public:
static bool match(const QStringList &filters, const QString &fileName);
static bool match(const QString &filter, const QString &fileName);
#endif
+
static QString cleanPath(const QString &path);
void refresh() const;
@@ -246,7 +247,7 @@ public:
inline QT3_SUPPORT static QString homeDirPath() { return homePath(); }
inline QT3_SUPPORT static QString rootDirPath() { return rootPath(); }
inline QT3_SUPPORT static QString cleanDirPath(const QString &name) { return cleanPath(name); }
-#endif
+#endif // QT3_SUPPORT
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QDir::Filters)
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp
index e90529e080..625098e6e7 100644
--- a/src/corelib/io/qfileinfo.cpp
+++ b/src/corelib/io/qfileinfo.cpp
@@ -41,12 +41,8 @@
#include "qplatformdefs.h"
#include "qfileinfo.h"
-#include "qdatetime.h"
-#include "qabstractfileengine.h"
#include "qfsfileengine_p.h"
#include "qglobal.h"
-#include "qatomic.h"
-#include "qhash.h"
#include "qdir.h"
#include "qfileinfo_p.h"
@@ -54,7 +50,7 @@ QT_BEGIN_NAMESPACE
QFileInfoPrivate::QFileInfoPrivate(const QFileInfo *copy)
{
- if(copy) {
+ if (copy) {
copy->d_func()->data->ref.ref();
data = copy->d_func()->data;
} else {
@@ -81,7 +77,8 @@ void QFileInfoPrivate::initFileEngine(const QString &file)
bool QFileInfoPrivate::hasAccess(Access access) const
{
- if (!(getFileFlags(QAbstractFileEngine::FileInfoAll) & QAbstractFileEngine::LocalDiskFlag)) {
+ if (!(getFileFlags(QAbstractFileEngine::PermsMask
+ | QAbstractFileEngine::LocalDiskFlag) & QAbstractFileEngine::LocalDiskFlag)) {
switch (access) {
case ReadAccess:
return getFileFlags(QAbstractFileEngine::ReadUserPerm);
@@ -129,86 +126,104 @@ void QFileInfoPrivate::detach()
QString QFileInfoPrivate::getFileName(QAbstractFileEngine::FileName name) const
{
- if(data->cache_enabled && !data->fileNames[(int)name].isNull())
+ if (data->cache_enabled && !data->fileNames[(int)name].isNull())
return data->fileNames[(int)name];
QString ret = data->fileEngine->fileName(name);
- if(data->cache_enabled)
+ if (ret.isNull())
+ ret = QLatin1String("");
+ if (data->cache_enabled)
data->fileNames[(int)name] = ret;
return ret;
}
+QString QFileInfoPrivate::getFileOwner(QAbstractFileEngine::FileOwner own) const
+{
+ if (data->cache_enabled && !data->fileOwners[(int)own].isNull())
+ return data->fileOwners[(int)own];
+ QString ret = data->fileEngine->owner(own);
+ if (ret.isNull())
+ ret = QLatin1String("");
+ if (data->cache_enabled)
+ data->fileOwners[(int)own] = ret;
+ return ret;
+}
+
uint QFileInfoPrivate::getFileFlags(QAbstractFileEngine::FileFlags request) const
{
- // We split the testing into tests for for LinkType, BundleType and the rest.
+ // We split the testing into tests for for LinkType, BundleType, PermsMask
+ // and the rest.
+ // Tests for file permissions on Windows can be slow, expecially on network
+ // paths and NTFS drives.
// In order to determine if a file is a symlink or not, we have to lstat().
// If we're not interested in that information, we might as well avoid one
// extra syscall. Bundle detecton on Mac can be slow, expecially on network
// paths, so we separate out that as well.
- QAbstractFileEngine::FileFlags flags;
- if (!data->getCachedFlag(CachedFileFlags)) {
- QAbstractFileEngine::FileFlags req = QAbstractFileEngine::FileInfoAll;
- req &= (~QAbstractFileEngine::LinkType);
- req &= (~QAbstractFileEngine::BundleType);
+ QAbstractFileEngine::FileFlags req = 0;
+ uint cachedFlags = 0;
- flags = data->fileEngine->fileFlags(req);
- data->setCachedFlag(CachedFileFlags);
- data->fileFlags |= uint(flags);
- } else {
- flags = QAbstractFileEngine::FileFlags(data->fileFlags & request);
- }
+ if (request & (QAbstractFileEngine::FlagsMask | QAbstractFileEngine::TypesMask)) {
+ if (!data->getCachedFlag(CachedFileFlags)) {
+ req |= QAbstractFileEngine::FlagsMask;
+ req |= QAbstractFileEngine::TypesMask;
+ req &= (~QAbstractFileEngine::LinkType);
+ req &= (~QAbstractFileEngine::BundleType);
- if (request & QAbstractFileEngine::LinkType) {
- if (!data->getCachedFlag(CachedLinkTypeFlag)) {
- QAbstractFileEngine::FileFlags linkflag;
- linkflag = data->fileEngine->fileFlags(QAbstractFileEngine::LinkType);
+ cachedFlags |= CachedFileFlags;
+ }
- data->setCachedFlag(CachedLinkTypeFlag);
- data->fileFlags |= uint(linkflag);
- flags |= linkflag;
+ if (request & QAbstractFileEngine::LinkType) {
+ if (!data->getCachedFlag(CachedLinkTypeFlag)) {
+ req |= QAbstractFileEngine::LinkType;
+ cachedFlags |= CachedLinkTypeFlag;
+ }
}
- }
- if (request & QAbstractFileEngine::BundleType) {
- if (!data->getCachedFlag(CachedBundleTypeFlag)) {
- QAbstractFileEngine::FileFlags bundleflag;
- bundleflag = data->fileEngine->fileFlags(QAbstractFileEngine::BundleType);
+ if (request & QAbstractFileEngine::BundleType) {
+ if (!data->getCachedFlag(CachedBundleTypeFlag)) {
+ req |= QAbstractFileEngine::BundleType;
+ cachedFlags |= CachedBundleTypeFlag;
+ }
+ }
+ }
- data->setCachedFlag(CachedBundleTypeFlag);
- data->fileFlags |= uint(bundleflag);
- flags |= bundleflag;
+ if (request & QAbstractFileEngine::PermsMask) {
+ if (!data->getCachedFlag(CachedPerms)) {
+ req |= QAbstractFileEngine::PermsMask;
+ cachedFlags |= CachedPerms;
}
}
- // no else branch
- // if we had it cached, it was caught in the previous else branch
+ if (req) {
+ if (data->cache_enabled)
+ req &= (~QAbstractFileEngine::Refresh);
+ else
+ req |= QAbstractFileEngine::Refresh;
- return flags & request;
+ QAbstractFileEngine::FileFlags flags = data->fileEngine->fileFlags(req);
+ data->fileFlags |= uint(flags);
+ data->setCachedFlag(cachedFlags);
+ }
+
+ return data->fileFlags & request;
}
QDateTime &QFileInfoPrivate::getFileTime(QAbstractFileEngine::FileTime request) const
{
if (!data->cache_enabled)
data->clearFlags();
- if(request == QAbstractFileEngine::CreationTime) {
- if(data->getCachedFlag(CachedCTime))
- return data->fileTimes[request];
- data->setCachedFlag(CachedCTime);
- return (data->fileTimes[request] = data->fileEngine->fileTime(request));
+ uint cf;
+ if (request == QAbstractFileEngine::CreationTime)
+ cf = CachedCTime;
+ else if (request == QAbstractFileEngine::ModificationTime)
+ cf = CachedMTime;
+ else
+ cf = CachedATime;
+ if (!data->getCachedFlag(cf)) {
+ data->fileTimes[request] = data->fileEngine->fileTime(request);
+ data->setCachedFlag(cf);
}
- if(request == QAbstractFileEngine::ModificationTime) {
- if(data->getCachedFlag(CachedMTime))
- return data->fileTimes[request];
- data->setCachedFlag(CachedMTime);
- return (data->fileTimes[request] = data->fileEngine->fileTime(request));
- }
- if(request == QAbstractFileEngine::AccessTime) {
- if(data->getCachedFlag(CachedATime))
- return data->fileTimes[request];
- data->setCachedFlag(CachedATime);
- return (data->fileTimes[request] = data->fileEngine->fileTime(request));
- }
- return data->fileTimes[0]; //cannot really happen
+ return data->fileTimes[request];
}
//************* QFileInfo
@@ -305,7 +320,6 @@ QDateTime &QFileInfoPrivate::getFileTime(QAbstractFileEngine::FileTime request)
\sa setFile()
*/
-
QFileInfo::QFileInfo() : d_ptr(new QFileInfoPrivate())
{
}
@@ -316,7 +330,6 @@ QFileInfo::QFileInfo() : d_ptr(new QFileInfoPrivate())
\sa setFile(), isRelative(), QDir::setCurrent(), QDir::isRelativePath()
*/
-
QFileInfo::QFileInfo(const QString &file) : d_ptr(new QFileInfoPrivate())
{
d_ptr->initFileEngine(file);
@@ -331,7 +344,6 @@ QFileInfo::QFileInfo(const QString &file) : d_ptr(new QFileInfoPrivate())
\sa isRelative()
*/
-
QFileInfo::QFileInfo(const QFile &file) : d_ptr(new QFileInfoPrivate())
{
d_ptr->initFileEngine(file.fileName());
@@ -349,7 +361,6 @@ QFileInfo::QFileInfo(const QFile &file) : d_ptr(new QFileInfoPrivate())
\sa isRelative()
*/
-
QFileInfo::QFileInfo(const QDir &dir, const QString &file) : d_ptr(new QFileInfoPrivate())
{
d_ptr->initFileEngine(dir.filePath(file));
@@ -358,7 +369,6 @@ QFileInfo::QFileInfo(const QDir &dir, const QString &file) : d_ptr(new QFileInfo
/*!
Constructs a new QFileInfo that is a copy of the given \a fileinfo.
*/
-
QFileInfo::QFileInfo(const QFileInfo &fileinfo) : d_ptr(new QFileInfoPrivate(&fileinfo))
{
@@ -368,7 +378,6 @@ QFileInfo::QFileInfo(const QFileInfo &fileinfo) : d_ptr(new QFileInfoPrivate(&fi
Destroys the QFileInfo and frees its resources.
*/
-
QFileInfo::~QFileInfo()
{
}
@@ -395,19 +404,19 @@ bool QFileInfo::operator==(const QFileInfo &fileinfo) const
Q_D(const QFileInfo);
// ### Qt 5: understand long and short file names on Windows
// ### (GetFullPathName()).
- if(fileinfo.d_func()->data == d->data)
+ if (fileinfo.d_func()->data == d->data)
return true;
- if(!d->data->fileEngine || !fileinfo.d_func()->data->fileEngine)
+ if (!d->data->fileEngine || !fileinfo.d_func()->data->fileEngine)
return false;
- if(d->data->fileEngine->caseSensitive() != fileinfo.d_func()->data->fileEngine->caseSensitive())
+ if (d->data->fileEngine->caseSensitive() != fileinfo.d_func()->data->fileEngine->caseSensitive())
return false;
- if(fileinfo.size() == size()) { //if the size isn't the same...
+ if (fileinfo.size() == size()) { //if the size isn't the same...
QString file1 = canonicalFilePath(),
file2 = fileinfo.canonicalFilePath();
- if(file1.length() == file2.length()) {
- if(!fileinfo.d_func()->data->fileEngine->caseSensitive()) {
- for(int i = 0; i < file1.length(); i++) {
- if(file1.at(i).toLower() != file2.at(i).toLower())
+ if (file1.length() == file2.length()) {
+ if (!fileinfo.d_func()->data->fileEngine->caseSensitive()) {
+ for (int i = 0; i < file1.length(); i++) {
+ if (file1.at(i).toLower() != file2.at(i).toLower())
return false;
}
return true;
@@ -441,7 +450,6 @@ bool QFileInfo::operator==(const QFileInfo &fileinfo)
/*!
Makes a copy of the given \a fileinfo and assigns it to this QFileInfo.
*/
-
QFileInfo &QFileInfo::operator=(const QFileInfo &fileinfo)
{
Q_D(QFileInfo);
@@ -464,7 +472,6 @@ QFileInfo &QFileInfo::operator=(const QFileInfo &fileinfo)
\sa isRelative(), QDir::setCurrent(), QDir::isRelativePath()
*/
-
void QFileInfo::setFile(const QString &file)
{
*this = QFileInfo(file);
@@ -481,7 +488,6 @@ void QFileInfo::setFile(const QString &file)
\sa isRelative()
*/
-
void QFileInfo::setFile(const QFile &file)
{
*this = QFileInfo(file.fileName());
@@ -498,7 +504,6 @@ void QFileInfo::setFile(const QFile &file)
\sa isRelative()
*/
-
void QFileInfo::setFile(const QDir &dir, const QString &file)
{
*this = QFileInfo(dir.filePath(file));
@@ -528,25 +533,24 @@ void QFileInfo::setFile(const QDir &dir, const QString &file)
QString QFileInfo::absoluteFilePath() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return QLatin1String("");
return d->getFileName(QAbstractFileEngine::AbsoluteName);
}
/*!
- Returns the canonical path including the file name, i.e. an absolute
- path without symbolic links or redundant "." or ".." elements.
+ Returns the canonical path including the file name, i.e. an absolute
+ path without symbolic links or redundant "." or ".." elements.
- If the file does not exist, canonicalFilePath() returns an empty
- string.
+ If the file does not exist, canonicalFilePath() returns an empty
+ string.
- \sa filePath(), absoluteFilePath(), dir()
+ \sa filePath(), absoluteFilePath(), dir()
*/
-
QString QFileInfo::canonicalFilePath() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return QLatin1String("");
return d->getFileName(QAbstractFileEngine::CanonicalName);
}
@@ -569,7 +573,6 @@ QString QFileInfo::canonicalFilePath() const
\sa absoluteFilePath(), path(), canonicalPath(), fileName(), isRelative()
*/
-
QString QFileInfo::absolutePath() const
{
Q_D(const QFileInfo);
@@ -591,16 +594,14 @@ QString QFileInfo::absolutePath() const
\sa path(), absolutePath()
*/
-
QString QFileInfo::canonicalPath() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return QLatin1String("");
return d->getFileName(QAbstractFileEngine::CanonicalPathName);
}
-
/*!
Returns the file's path. This doesn't include the file name.
@@ -610,11 +611,10 @@ QString QFileInfo::canonicalPath() const
\sa filePath(), absolutePath(), canonicalPath(), dir(), fileName(), isRelative()
*/
-
QString QFileInfo::path() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return QLatin1String("");
return d->getFileName(QAbstractFileEngine::PathName);
}
@@ -635,16 +635,14 @@ QString QFileInfo::path() const
\sa isAbsolute()
*/
-
bool QFileInfo::isRelative() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return true;
return d->data->fileEngine->isRelativePath();
}
-
/*!
Converts the file's path to an absolute path if it is not already in that form.
Returns true to indicate that the path was converted; otherwise returns false
@@ -652,11 +650,10 @@ bool QFileInfo::isRelative() const
\sa filePath(), isRelative()
*/
-
bool QFileInfo::makeAbsolute()
{
Q_D(QFileInfo);
- if(!d->data->fileEngine || !d->data->fileEngine->isRelativePath())
+ if (!d->data->fileEngine || !d->data->fileEngine->isRelativePath())
return false;
QString absFileName = d->getFileName(QAbstractFileEngine::AbsoluteName);
d->initFileEngine(absFileName);
@@ -669,11 +666,10 @@ bool QFileInfo::makeAbsolute()
\note If the file is a symlink that points to a non existing
file, false is returned.
*/
-
bool QFileInfo::exists() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
return d->getFileFlags(QAbstractFileEngine::ExistsFlag);
}
@@ -685,7 +681,6 @@ bool QFileInfo::exists() const
\note On Windows CE, there might be a delay for the file system driver
to detect changes on the file.
*/
-
void QFileInfo::refresh()
{
Q_D(QFileInfo);
@@ -698,11 +693,10 @@ void QFileInfo::refresh()
\sa absoluteFilePath(), canonicalFilePath(), isRelative()
*/
-
QString QFileInfo::filePath() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return QLatin1String("");
return d->getFileName(QAbstractFileEngine::DefaultName);
}
@@ -718,11 +712,10 @@ QString QFileInfo::filePath() const
\sa isRelative(), filePath(), baseName(), extension()
*/
-
QString QFileInfo::fileName() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return QLatin1String("");
return d->getFileName(QAbstractFileEngine::BaseName);
}
@@ -739,11 +732,10 @@ QString QFileInfo::fileName() const
\sa isBundle(), filePath(), baseName(), extension()
*/
-
QString QFileInfo::bundleName() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return QLatin1String("");
return d->getFileName(QAbstractFileEngine::BundleName);
}
@@ -764,11 +756,10 @@ QString QFileInfo::bundleName() const
\sa fileName(), suffix(), completeSuffix(), completeBaseName()
*/
-
QString QFileInfo::baseName() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return QLatin1String("");
return d->getFileName(QAbstractFileEngine::BaseName).section(QLatin1Char('.'), 0, 0);
}
@@ -784,11 +775,10 @@ QString QFileInfo::baseName() const
\sa fileName(), suffix(), completeSuffix(), baseName()
*/
-
QString QFileInfo::completeBaseName() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return QLatin1String("");
QString name = d->getFileName(QAbstractFileEngine::BaseName);
int index = name.lastIndexOf(QLatin1Char('.'));
@@ -806,11 +796,10 @@ QString QFileInfo::completeBaseName() const
\sa fileName(), suffix(), baseName(), completeBaseName()
*/
-
QString QFileInfo::completeSuffix() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return QLatin1String("");
QString fileName = d->getFileName(QAbstractFileEngine::BaseName);
int firstDot = fileName.indexOf(QLatin1Char('.'));
@@ -834,11 +823,10 @@ QString QFileInfo::completeSuffix() const
\sa fileName(), completeSuffix(), baseName(), completeBaseName()
*/
-
QString QFileInfo::suffix() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return QLatin1String("");
QString fileName = d->getFileName(QAbstractFileEngine::BaseName);
int lastDot = fileName.lastIndexOf(QLatin1Char('.'));
@@ -849,24 +837,23 @@ QString QFileInfo::suffix() const
/*!
- Returns the path of the object's parent directory as a QDir object.
+ Returns the path of the object's parent directory as a QDir object.
- \bold{Note:} The QDir returned always corresponds to the object's
- parent directory, even if the QFileInfo represents a directory.
+ \bold{Note:} The QDir returned always corresponds to the object's
+ parent directory, even if the QFileInfo represents a directory.
- For each of the follwing, dir() returns a QDir for
- \c{"~/examples/191697"}.
+ For each of the follwing, dir() returns a QDir for
+ \c{"~/examples/191697"}.
- \snippet doc/src/snippets/fileinfo/main.cpp 0
+ \snippet doc/src/snippets/fileinfo/main.cpp 0
- For each of the follwing, dir() returns a QDir for
- \c{"."}.
+ For each of the follwing, dir() returns a QDir for
+ \c{"."}.
- \snippet doc/src/snippets/fileinfo/main.cpp 1
+ \snippet doc/src/snippets/fileinfo/main.cpp 1
- \sa absolutePath(), filePath(), fileName(), isRelative(), absoluteDir()
+ \sa absolutePath(), filePath(), fileName(), isRelative(), absoluteDir()
*/
-
QDir QFileInfo::dir() const
{
// ### Qt5: Maybe rename this to parentDirectory(), considering what it actually do?
@@ -878,7 +865,6 @@ QDir QFileInfo::dir() const
\sa dir(), filePath(), fileName(), isRelative()
*/
-
QDir QFileInfo::absoluteDir() const
{
return QDir(absolutePath());
@@ -891,7 +877,7 @@ QDir QFileInfo::absoluteDir() const
*/
QDir QFileInfo::dir(bool absPath) const
{
- if(absPath)
+ if (absPath)
return absoluteDir();
return dir();
}
@@ -902,11 +888,10 @@ QDir QFileInfo::dir(bool absPath) const
\sa isWritable(), isExecutable(), permission()
*/
-
bool QFileInfo::isReadable() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
return d->hasAccess(QFileInfoPrivate::ReadAccess);
}
@@ -916,11 +901,10 @@ bool QFileInfo::isReadable() const
\sa isReadable(), isExecutable(), permission()
*/
-
bool QFileInfo::isWritable() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
return d->hasAccess(QFileInfoPrivate::WriteAccess);
}
@@ -930,11 +914,10 @@ bool QFileInfo::isWritable() const
\sa isReadable(), isWritable(), permission()
*/
-
bool QFileInfo::isExecutable() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
return d->hasAccess(QFileInfoPrivate::ExecuteAccess);
}
@@ -948,7 +931,7 @@ bool QFileInfo::isExecutable() const
bool QFileInfo::isHidden() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
return d->getFileFlags(QAbstractFileEngine::HiddenFlag);
}
@@ -960,11 +943,10 @@ bool QFileInfo::isHidden() const
\sa isDir(), isSymLink(), isBundle()
*/
-
bool QFileInfo::isFile() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
return d->getFileFlags(QAbstractFileEngine::FileType);
}
@@ -975,11 +957,10 @@ bool QFileInfo::isFile() const
\sa isFile(), isSymLink(), isBundle()
*/
-
bool QFileInfo::isDir() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
return d->getFileFlags(QAbstractFileEngine::DirectoryType);
}
@@ -992,11 +973,10 @@ bool QFileInfo::isDir() const
\sa isDir(), isSymLink(), isFile()
*/
-
bool QFileInfo::isBundle() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
return d->getFileFlags(QAbstractFileEngine::BundleType);
}
@@ -1018,21 +998,19 @@ bool QFileInfo::isBundle() const
\sa isFile(), isDir(), symLinkTarget()
*/
-
bool QFileInfo::isSymLink() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
return d->getFileFlags(QAbstractFileEngine::LinkType);
}
/*!
- Returns true if the object points to a directory or to a symbolic
- link to a directory, and that directory is the root directory; otherwise
- returns false.
+ Returns true if the object points to a directory or to a symbolic
+ link to a directory, and that directory is the root directory; otherwise
+ returns false.
*/
-
bool QFileInfo::isRoot() const
{
Q_D(const QFileInfo);
@@ -1064,7 +1042,7 @@ bool QFileInfo::isRoot() const
QString QFileInfo::readLink() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return QLatin1String("");
return d->getFileName(QAbstractFileEngine::LinkName);
}
@@ -1079,13 +1057,12 @@ QString QFileInfo::readLink() const
\sa ownerId(), group(), groupId()
*/
-
QString QFileInfo::owner() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return QLatin1String("");
- return d->data->fileEngine->owner(QAbstractFileEngine::OwnerUser);
+ return d->getFileOwner(QAbstractFileEngine::OwnerUser);
}
/*!
@@ -1096,11 +1073,10 @@ QString QFileInfo::owner() const
\sa owner(), group(), groupId()
*/
-
uint QFileInfo::ownerId() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return 0;
return d->data->fileEngine->ownerId(QAbstractFileEngine::OwnerUser);
}
@@ -1115,13 +1091,12 @@ uint QFileInfo::ownerId() const
\sa groupId(), owner(), ownerId()
*/
-
QString QFileInfo::group() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return QLatin1String("");
- return d->data->fileEngine->owner(QAbstractFileEngine::OwnerGroup);
+ return d->getFileOwner(QAbstractFileEngine::OwnerGroup);
}
/*!
@@ -1132,11 +1107,10 @@ QString QFileInfo::group() const
\sa group(), owner(), ownerId()
*/
-
uint QFileInfo::groupId() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return 0;
return d->data->fileEngine->ownerId(QAbstractFileEngine::OwnerGroup);
}
@@ -1154,11 +1128,10 @@ uint QFileInfo::groupId() const
\sa isReadable(), isWritable(), isExecutable()
*/
-
bool QFileInfo::permission(QFile::Permissions permissions) const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return false;
return d->getFileFlags(QAbstractFileEngine::FileFlags((int)permissions)) == (uint)permissions;
}
@@ -1167,11 +1140,10 @@ bool QFileInfo::permission(QFile::Permissions permissions) const
Returns the complete OR-ed together combination of
QFile::Permissions for the file.
*/
-
QFile::Permissions QFileInfo::permissions() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return 0;
return QFile::Permissions(d->getFileFlags(QAbstractFileEngine::PermsMask) & QAbstractFileEngine::PermsMask);
}
@@ -1183,13 +1155,12 @@ QFile::Permissions QFileInfo::permissions() const
\sa exists()
*/
-
qint64 QFileInfo::size() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return 0;
- if(!d->data->getCachedFlag(QFileInfoPrivate::CachedSize)) {
+ if (!d->data->getCachedFlag(QFileInfoPrivate::CachedSize)) {
d->data->setCachedFlag(QFileInfoPrivate::CachedSize);
d->data->fileSize = d->data->fileEngine->size();
}
@@ -1209,11 +1180,10 @@ qint64 QFileInfo::size() const
\sa lastModified() lastRead()
*/
-
QDateTime QFileInfo::created() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return QDateTime();
return d->getFileTime(QAbstractFileEngine::CreationTime);
}
@@ -1223,11 +1193,10 @@ QDateTime QFileInfo::created() const
\sa created() lastRead()
*/
-
QDateTime QFileInfo::lastModified() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return QDateTime();
return d->getFileTime(QAbstractFileEngine::ModificationTime);
}
@@ -1240,11 +1209,10 @@ QDateTime QFileInfo::lastModified() const
\sa created() lastModified()
*/
-
QDateTime QFileInfo::lastRead() const
{
Q_D(const QFileInfo);
- if(!d->data->fileEngine)
+ if (!d->data->fileEngine)
return QDateTime();
return d->getFileTime(QAbstractFileEngine::AccessTime);
}
@@ -1252,7 +1220,6 @@ QDateTime QFileInfo::lastRead() const
/*! \internal
Detaches all internal data.
*/
-
void QFileInfo::detach()
{
Q_D(QFileInfo);
@@ -1264,7 +1231,6 @@ void QFileInfo::detach()
\sa setCaching(), refresh()
*/
-
bool QFileInfo::caching() const
{
Q_D(const QFileInfo);
@@ -1283,7 +1249,6 @@ bool QFileInfo::caching() const
\sa refresh(), caching()
*/
-
void QFileInfo::setCaching(bool enable)
{
Q_D(QFileInfo);
diff --git a/src/corelib/io/qfileinfo_p.h b/src/corelib/io/qfileinfo_p.h
index 065f860dd6..d97a0cf08d 100644
--- a/src/corelib/io/qfileinfo_p.h
+++ b/src/corelib/io/qfileinfo_p.h
@@ -54,6 +54,9 @@
//
#include "qfileinfo.h"
+#include "qabstractfileengine.h"
+#include "qdatetime.h"
+#include "qatomic.h"
QT_BEGIN_NAMESPACE
@@ -75,35 +78,41 @@ public:
uint getFileFlags(QAbstractFileEngine::FileFlags) const;
QDateTime &getFileTime(QAbstractFileEngine::FileTime) const;
QString getFileName(QAbstractFileEngine::FileName) const;
+ QString getFileOwner(QAbstractFileEngine::FileOwner own) const;
enum { CachedFileFlags=0x01, CachedLinkTypeFlag=0x02, CachedBundleTypeFlag=0x04,
CachedMTime=0x10, CachedCTime=0x20, CachedATime=0x40,
- CachedSize =0x08 };
+ CachedSize =0x08, CachedPerms=0x80 };
struct Data {
inline Data()
- : ref(1), fileEngine(0), cache_enabled(1), fileSize(0)
- { clear(); }
+ : ref(1), fileEngine(0),
+ cachedFlags(0), cache_enabled(1), fileFlags(0), fileSize(0)
+ {}
inline Data(const Data &copy)
: ref(1), fileEngine(QAbstractFileEngine::create(copy.fileName)),
- fileName(copy.fileName), cache_enabled(copy.cache_enabled), fileSize(copy.fileSize)
- { clear(); }
+ fileName(copy.fileName),
+ cachedFlags(0), cache_enabled(copy.cache_enabled), fileFlags(0), fileSize(0)
+ {}
inline ~Data() { delete fileEngine; }
inline void clearFlags() {
fileFlags = 0;
cachedFlags = 0;
if (fileEngine)
- (void)fileEngine->fileFlags(QFSFileEngine::Refresh);
+ (void)fileEngine->fileFlags(QAbstractFileEngine::Refresh);
}
inline void clear() {
clearFlags();
for (int i = QAbstractFileEngine::NFileNames - 1 ; i >= 0 ; --i)
fileNames[i].clear();
+ fileOwners[1].clear();
+ fileOwners[0].clear();
}
mutable QAtomicInt ref;
QAbstractFileEngine *fileEngine;
mutable QString fileName;
mutable QString fileNames[QAbstractFileEngine::NFileNames];
+ mutable QString fileOwners[2];
mutable uint cachedFlags : 31;
mutable uint cache_enabled : 1;
diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp
index 451fbd41c4..7223e49682 100644
--- a/src/corelib/io/qfilesystemwatcher.cpp
+++ b/src/corelib/io/qfilesystemwatcher.cpp
@@ -248,7 +248,7 @@ QFileSystemWatcherEngine *QFileSystemWatcherPrivate::createNativeEngine()
eng = QDnotifyFileSystemWatcherEngine::create();
return eng;
#elif defined(Q_OS_FREEBSD) || defined(Q_OS_MAC)
-# if 0 && (defined Q_OS_MAC) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
+# if defined(Q_OS_MAC) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5)
return QFSEventsFileSystemWatcherEngine::create();
else
diff --git a/src/corelib/io/qfilesystemwatcher_dnotify.cpp b/src/corelib/io/qfilesystemwatcher_dnotify.cpp
index 1a218c720c..82470c8b06 100644
--- a/src/corelib/io/qfilesystemwatcher_dnotify.cpp
+++ b/src/corelib/io/qfilesystemwatcher_dnotify.cpp
@@ -39,6 +39,7 @@
**
****************************************************************************/
+#include "qplatformdefs.h"
#include "qfilesystemwatcher.h"
#include "qfilesystemwatcher_dnotify_p.h"
@@ -255,16 +256,16 @@ QStringList QDnotifyFileSystemWatcherEngine::addPaths(const QStringList &paths,
if(fd == 0) {
- DIR *d = ::opendir(path.toUtf8().constData());
+ QT_DIR *d = QT_OPENDIR(path.toUtf8().constData());
if(!d) continue; // Could not open directory
- DIR *parent = 0;
+ QT_DIR *parent = 0;
QDir parentDir(path);
if(!parentDir.isRoot()) {
parentDir.cdUp();
- parent = ::opendir(parentDir.path().toUtf8().constData());
+ parent = QT_OPENDIR(parentDir.path().toUtf8().constData());
if(!parent) {
- ::closedir(d);
+ QT_CLOSEDIR(d);
continue;
}
}
@@ -272,8 +273,8 @@ QStringList QDnotifyFileSystemWatcherEngine::addPaths(const QStringList &paths,
fd = qt_safe_dup(::dirfd(d));
int parentFd = parent ? qt_safe_dup(::dirfd(parent)) : 0;
- ::closedir(d);
- if(parent) ::closedir(parent);
+ QT_CLOSEDIR(d);
+ if(parent) QT_CLOSEDIR(parent);
Q_ASSERT(fd);
if(::fcntl(fd, F_SETSIG, SIGIO) ||
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.cpp b/src/corelib/io/qfilesystemwatcher_fsevents.cpp
index 046377eff5..d3276bdb19 100644
--- a/src/corelib/io/qfilesystemwatcher_fsevents.cpp
+++ b/src/corelib/io/qfilesystemwatcher_fsevents.cpp
@@ -94,7 +94,7 @@ static void addPathToHash(PathHash &pathHash, const QString &key, const QFileInf
{
PathInfoList &list = pathHash[key];
list.push_back(PathInfo(path,
- fileInfo.absoluteFilePath().normalized(QString::NormalizationForm_D).toUtf8()));
+ fileInfo.canonicalFilePath().normalized(QString::NormalizationForm_D).toUtf8()));
pathHash.insert(key, list);
}
@@ -171,6 +171,7 @@ QStringList QFSEventsFileSystemWatcherEngine::addPaths(const QStringList &paths,
{
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
stop();
+ wait();
QMutexLocker locker(&mutex);
QStringList failedToAdd;
// if we have a running FSStreamEvent, we have to kill it, we'll re-add the stream soon.
@@ -206,7 +207,7 @@ QStringList QFSEventsFileSystemWatcherEngine::addPaths(const QStringList &paths,
} else {
directories->append(path);
// Full file path for dirs.
- QCFString cfpath(createFSStreamPath(fileInfo.absoluteFilePath()));
+ QCFString cfpath(createFSStreamPath(fileInfo.canonicalFilePath()));
addPathToHash(dirPathInfoHash, cfpath, fileInfo, path);
CFArrayAppendValue(tmpArray, cfpath);
}
@@ -216,7 +217,7 @@ QStringList QFSEventsFileSystemWatcherEngine::addPaths(const QStringList &paths,
continue;
} else {
// Just the absolute path (minus it's filename) for files.
- QCFString cfpath(createFSStreamPath(fileInfo.absolutePath()));
+ QCFString cfpath(createFSStreamPath(fileInfo.canonicalPath()));
files->append(path);
addPathToHash(filePathInfoHash, cfpath, fileInfo, path);
CFArrayAppendValue(tmpArray, cfpath);
@@ -268,6 +269,7 @@ QStringList QFSEventsFileSystemWatcherEngine::removePaths(const QStringList &pat
{
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
stop();
+ wait();
QMutexLocker locker(&mutex);
// short circuit for smarties that call remove before add and we have nothing.
if (pathsToWatch == 0)
@@ -293,7 +295,7 @@ QStringList QFSEventsFileSystemWatcherEngine::removePaths(const QStringList &pat
itemCount = CFArrayGetCount(tmpArray);
const QString &path = paths.at(i);
QFileInfo fi(path);
- QCFString cfpath(createFSStreamPath(fi.absolutePath()));
+ QCFString cfpath(createFSStreamPath(fi.canonicalPath()));
CFIndex index = CFArrayGetFirstIndexOfValue(tmpArray, CFRangeMake(0, itemCount), cfpath);
if (index != -1) {
@@ -302,7 +304,7 @@ QStringList QFSEventsFileSystemWatcherEngine::removePaths(const QStringList &pat
removePathFromHash(filePathInfoHash, cfpath, path);
} else {
// Could be a directory we are watching instead.
- QCFString cfdirpath(createFSStreamPath(fi.absoluteFilePath()));
+ QCFString cfdirpath(createFSStreamPath(fi.canonicalFilePath()));
index = CFArrayGetFirstIndexOfValue(tmpArray, CFRangeMake(0, itemCount), cfdirpath);
if (index != -1) {
CFArrayRemoveValueAtIndex(tmpArray, index);
@@ -445,7 +447,16 @@ void QFSEventsFileSystemWatcherEngine::updateFiles()
updateHash(dirPathInfoHash);
if (filePathInfoHash.isEmpty() && dirPathInfoHash.isEmpty()) {
// Everything disappeared before we got to start, don't bother.
- stop();
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+ // Code duplicated from stop(), with the exception that we
+ // don't wait on waitForStop here. Doing this will lead to
+ // a deadlock since this function is called from the worker
+ // thread. (waitForStop.wakeAll() is only called from the
+ // end of run()).
+ stopFSStream(fsStream);
+ if (threadsRunLoop)
+ CFRunLoopStop(threadsRunLoop);
+#endif
cleanupFSStream(fsStream);
}
waitCondition.wakeAll();
diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp
index a7dc8fad12..4740a8974b 100644
--- a/src/corelib/io/qfilesystemwatcher_inotify.cpp
+++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp
@@ -235,7 +235,7 @@ QInotifyFileSystemWatcherEngine::QInotifyFileSystemWatcherEngine(int fd)
QInotifyFileSystemWatcherEngine::~QInotifyFileSystemWatcherEngine()
{
- foreach (int id, pathToID.values())
+ foreach (int id, pathToID)
inotify_rm_watch(inotifyFd, id < 0 ? -id : id);
::close(inotifyFd);
diff --git a/src/corelib/io/qfilesystemwatcher_kqueue.cpp b/src/corelib/io/qfilesystemwatcher_kqueue.cpp
index 731406f251..99c165e27d 100644
--- a/src/corelib/io/qfilesystemwatcher_kqueue.cpp
+++ b/src/corelib/io/qfilesystemwatcher_kqueue.cpp
@@ -109,7 +109,7 @@ QKqueueFileSystemWatcherEngine::~QKqueueFileSystemWatcherEngine()
close(kqpipe[0]);
close(kqpipe[1]);
- foreach (int id, pathToID.values())
+ foreach (int id, pathToID)
::close(id < 0 ? -id : id);
}
diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp
index eeee970ed8..070edb4887 100644
--- a/src/corelib/io/qfsfileengine.cpp
+++ b/src/corelib/io/qfsfileengine.cpp
@@ -56,6 +56,9 @@
#endif
#include <stdio.h>
#include <stdlib.h>
+#if defined(Q_OS_MAC)
+# include <private/qcore_mac_p.h>
+#endif
QT_BEGIN_NAMESPACE
@@ -143,11 +146,29 @@ QString QFSFileEnginePrivate::canonicalized(const QString &path)
if (path.size() == 1 && path.at(0) == QLatin1Char('/'))
return path;
#endif
- // Mac OS X 10.5.x doesn't support the realpath(X,0) extenstion we use here.
-#if defined(Q_OS_LINUX) || defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_LINUX) || defined(Q_OS_SYMBIAN) || defined(Q_OS_MAC)
// ... but Linux with uClibc does not have it
#if !defined(__UCLIBC__)
- char *ret = realpath(path.toLocal8Bit().constData(), (char*)0);
+ char *ret = 0;
+#if defined(Q_OS_MAC)
+ // Mac OS X 10.5.x doesn't support the realpath(X,0) extension we use here.
+ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) {
+ ret = realpath(path.toLocal8Bit().constData(), (char*)0);
+ } else {
+ // on 10.5 we can use FSRef to resolve the file path.
+ FSRef fsref;
+ if (FSPathMakeRef((const UInt8 *)QDir::cleanPath(path).toUtf8().data(), &fsref, 0) == noErr) {
+ CFURLRef urlref = CFURLCreateFromFSRef(NULL, &fsref);
+ CFStringRef canonicalPath = CFURLCopyFileSystemPath(urlref, kCFURLPOSIXPathStyle);
+ QString ret = QCFString::toQString(canonicalPath);
+ CFRelease(canonicalPath);
+ CFRelease(urlref);
+ return ret;
+ }
+ }
+#else
+ ret = realpath(path.toLocal8Bit().constData(), (char*)0);
+#endif
if (ret) {
QString canonicalPath = QDir::cleanPath(QString::fromLocal8Bit(ret));
free(ret);
diff --git a/src/corelib/io/qfsfileengine_iterator_unix.cpp b/src/corelib/io/qfsfileengine_iterator_unix.cpp
index b68b1a1531..bfdb03e3c1 100644
--- a/src/corelib/io/qfsfileengine_iterator_unix.cpp
+++ b/src/corelib/io/qfsfileengine_iterator_unix.cpp
@@ -58,13 +58,13 @@ public:
#endif
{}
- DIR *dir;
- dirent *dirEntry;
+ QT_DIR *dir;
+ QT_DIRENT *dirEntry;
bool done;
#if defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_CYGWIN) && !defined(Q_OS_SYMBIAN)
// for readdir_r
- dirent *mt_file;
+ QT_DIRENT *mt_file;
#endif
};
@@ -76,14 +76,14 @@ void QFSFileEngineIterator::advance()
return;
#if defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_CYGWIN) && !defined(Q_OS_SYMBIAN)
- if (::readdir_r(platform->dir, platform->mt_file, &platform->dirEntry) != 0)
+ if (QT_READDIR_R(platform->dir, platform->mt_file, &platform->dirEntry) != 0)
platform->done = true;
#else
// ### add local lock to prevent breaking reentrancy
- platform->dirEntry = ::readdir(platform->dir);
+ platform->dirEntry = QT_READDIR(platform->dir);
#endif // _POSIX_THREAD_SAFE_FUNCTIONS
if (!platform->dirEntry) {
- ::closedir(platform->dir);
+ QT_CLOSEDIR(platform->dir);
platform->dir = 0;
platform->done = true;
#if defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_CYGWIN) && !defined(Q_OS_SYMBIAN)
@@ -101,7 +101,7 @@ void QFSFileEngineIterator::newPlatformSpecifics()
void QFSFileEngineIterator::deletePlatformSpecifics()
{
if (platform->dir) {
- ::closedir(platform->dir);
+ QT_CLOSEDIR(platform->dir);
#if defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_CYGWIN) && !defined(Q_OS_SYMBIAN)
delete [] platform->mt_file;
platform->mt_file = 0;
@@ -115,18 +115,18 @@ bool QFSFileEngineIterator::hasNext() const
{
if (!platform->done && !platform->dir) {
QFSFileEngineIterator *that = const_cast<QFSFileEngineIterator *>(this);
- if ((that->platform->dir = ::opendir(QFile::encodeName(path()).data())) == 0) {
+ if ((that->platform->dir = QT_OPENDIR(QFile::encodeName(path()).data())) == 0) {
that->platform->done = true;
} else {
// ### Race condition; we should use fpathconf and dirfd().
long maxPathName = ::pathconf(QFile::encodeName(path()).data(), _PC_NAME_MAX);
if ((int) maxPathName == -1)
maxPathName = FILENAME_MAX;
- maxPathName += sizeof(dirent) + 1;
+ maxPathName += sizeof(QT_DIRENT) + 1;
#if defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_CYGWIN) && !defined(Q_OS_SYMBIAN)
if (that->platform->mt_file)
delete [] that->platform->mt_file;
- that->platform->mt_file = (dirent *)new char[maxPathName];
+ that->platform->mt_file = (QT_DIRENT *)new char[maxPathName];
#endif
that->advance();
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index 139075f5bd..d8b1c03313 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -66,10 +66,6 @@
#include <ctype.h>
#include <limits.h>
#define SECURITY_WIN32
-#ifdef Q_CC_MINGW
-// A workaround for a certain version of MinGW, the define UNICODE_STRING.
-#include <subauth.h>
-#endif
#include <security.h>
#ifndef _INTPTR_T_DEFINED
@@ -181,7 +177,7 @@ void QFSFileEnginePrivate::resolveLibs()
triedResolve = true;
#if !defined(Q_OS_WINCE)
- HINSTANCE advapiHnd = LoadLibraryW(L"advapi32");
+ HINSTANCE advapiHnd = LoadLibrary(L"advapi32");
if (advapiHnd) {
ptrGetNamedSecurityInfoW = (PtrGetNamedSecurityInfoW)GetProcAddress(advapiHnd, "GetNamedSecurityInfoW");
ptrLookupAccountSidW = (PtrLookupAccountSidW)GetProcAddress(advapiHnd, "LookupAccountSidW");
@@ -213,7 +209,7 @@ void QFSFileEnginePrivate::resolveLibs()
ptrFreeSid(pWorld);
}
}
- HINSTANCE userenvHnd = LoadLibraryW(L"userenv");
+ HINSTANCE userenvHnd = LoadLibrary(L"userenv");
if (userenvHnd)
ptrGetUserProfileDirectoryW = (PtrGetUserProfileDirectoryW)GetProcAddress(userenvHnd, "GetUserProfileDirectoryW");
#endif
@@ -221,7 +217,6 @@ void QFSFileEnginePrivate::resolveLibs()
}
#endif // QT_NO_LIBRARY
-// UNC functions NT
typedef DWORD (WINAPI *PtrNetShareEnum)(LPWSTR, DWORD, LPBYTE*, DWORD, LPDWORD, LPDWORD, LPDWORD);
static PtrNetShareEnum ptrNetShareEnum = 0;
typedef DWORD (WINAPI *PtrNetApiBufferFree)(LPVOID);
@@ -245,7 +240,7 @@ bool QFSFileEnginePrivate::resolveUNCLibs()
#endif
triedResolve = true;
#if !defined(Q_OS_WINCE)
- HINSTANCE hLib = LoadLibraryW(L"Netapi32");
+ HINSTANCE hLib = LoadLibrary(L"netapi32");
if (hLib) {
ptrNetShareEnum = (PtrNetShareEnum)GetProcAddress(hLib, "NetShareEnum");
if (ptrNetShareEnum)
@@ -1042,11 +1037,11 @@ QString QFSFileEngine::homePath()
if (ok) {
DWORD dwBufferSize = 0;
// First call, to determine size of the strings (with '\0').
- ok = ::ptrGetUserProfileDirectoryW(token, NULL, &dwBufferSize);
+ ok = ptrGetUserProfileDirectoryW(token, NULL, &dwBufferSize);
if (!ok && dwBufferSize != 0) { // We got the required buffer size
wchar_t *userDirectory = new wchar_t[dwBufferSize];
// Second call, now we can fill the allocated buffer.
- ok = ::ptrGetUserProfileDirectoryW(token, userDirectory, &dwBufferSize);
+ ok = ptrGetUserProfileDirectoryW(token, userDirectory, &dwBufferSize);
if (ok)
ret = QString::fromWCharArray(userDirectory);
@@ -1418,7 +1413,7 @@ QAbstractFileEngine::FileFlags QFSFileEnginePrivate::getPermissions() const
QAbstractFileEngine::FileFlags ret = 0;
#if !defined(QT_NO_LIBRARY)
- if((qt_ntfs_permission_lookup > 0) && ((QSysInfo::WindowsVersion&QSysInfo::WV_NT_based) > QSysInfo::WV_NT)) {
+ if((qt_ntfs_permission_lookup > 0) && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)) {
resolveLibs();
if(ptrGetNamedSecurityInfoW && ptrBuildTrusteeWithSidW && ptrGetEffectiveRightsFromAclW) {
enum { ReadMask = 0x00000001, WriteMask = 0x00000002, ExecMask = 0x00000020 };
@@ -1721,8 +1716,7 @@ QString QFSFileEngine::owner(FileOwner own) const
QString name;
#if !defined(QT_NO_LIBRARY)
Q_D(const QFSFileEngine);
-
- if ((qt_ntfs_permission_lookup > 0) && ((QSysInfo::WindowsVersion&QSysInfo::WV_NT_based) > QSysInfo::WV_NT)) {
+ if((qt_ntfs_permission_lookup > 0) && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)) {
QFSFileEnginePrivate::resolveLibs();
if (ptrGetNamedSecurityInfoW && ptrLookupAccountSidW) {
PSID pOwner = 0;
diff --git a/src/corelib/io/qprocess_symbian.cpp b/src/corelib/io/qprocess_symbian.cpp
index e37bddafa0..adc87fbb51 100644
--- a/src/corelib/io/qprocess_symbian.cpp
+++ b/src/corelib/io/qprocess_symbian.cpp
@@ -1004,7 +1004,7 @@ bool QProcessPrivate::waitForDeadChild()
TExitCategoryName catName = symbianProcess->ExitCategory();
qDebug() << "QProcessPrivate::waitForDeadChild() dead with exitCode"
<< exitCode << ", crashed:" << crashed
- << ", category:" << QString::fromUtf16(catName.Ptr());
+ << ", category:" << QString((const QChar *)catName.Ptr());
#endif
} else {
QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForDeadChild() not dead!");
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index f3fc28eff7..cb25a58f19 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -525,7 +525,7 @@ qint64 QProcessPrivate::readFromStderr(char *data, qint64 maxlen)
}
-static BOOL CALLBACK qt_terminateApp(HWND hwnd, LPARAM procId)
+static BOOL QT_WIN_CALLBACK qt_terminateApp(HWND hwnd, LPARAM procId)
{
DWORD currentProcId = 0;
GetWindowThreadProcessId(hwnd, &currentProcId);
diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp
index 9e7989417c..b1c403fb5c 100644
--- a/src/corelib/io/qtextstream.cpp
+++ b/src/corelib/io/qtextstream.cpp
@@ -70,7 +70,7 @@ static const int QTEXTSTREAM_BUFFERSIZE = 16384;
have reached the end of the data stream, with stdin. The reason for this is
that as long as stdin doesn't give any input to the QTextStream, \c atEnd()
will return true even if the stdin is open and waiting for more characters.
-
+
Besides using QTextStream's constructors, you can also set the
device or string QTextStream operates on by calling setDevice() or
setString(). You can seek to a position by calling seek(), and
@@ -1196,6 +1196,7 @@ bool QTextStream::seek(qint64 pos)
resetCodecConverterStateHelper(&d->writeConverterState);
delete d->readConverterSavedState;
d->readConverterSavedState = 0;
+ d->writeConverterState.flags |= QTextCodec::IgnoreHeader;
#endif
return true;
}
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index ffe8d06ba3..a60f206189 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -167,6 +167,13 @@
regardless of the Qt::FormattingOptions used.
*/
+/*!
+ \fn uint qHash(const QUrl &url)
+ \since 4.7
+ \relates QUrl
+
+ Computes a hash key from the normalized version of \a url.
+ */
#include "qplatformdefs.h"
#include "qurl.h"
#include "private/qunicodetables_p.h"
@@ -3472,8 +3479,12 @@ QString QUrlPrivate::authority(QUrl::FormattingOptions options) const
void QUrlPrivate::setAuthority(const QString &auth)
{
- if (auth.isEmpty())
+ if (auth.isEmpty()) {
+ setUserInfo(QString());
+ host.clear();
+ port = -1;
return;
+ }
// find the port section of the authority by searching from the
// end towards the beginning for numbers until a ':' is reached.
@@ -6365,7 +6376,7 @@ QUrl QUrl::fromUserInput(const QString &userInput)
return QUrl::fromLocalFile(trimmedString);
QUrl url = QUrl::fromEncoded(trimmedString.toUtf8(), QUrl::TolerantMode);
- QUrl urlPrepended = QUrl::fromEncoded((QLatin1String("http://") + trimmedString).toUtf8(), QUrl::TolerantMode);
+ QUrl urlPrepended = QUrl::fromEncoded("http://" + trimmedString.toUtf8(), QUrl::TolerantMode);
// Check the most common case of a valid url with scheme and host
// We check if the port would be valid by adding the scheme to handle the case host:port
diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h
index 0aa534a630..6f8331a3f3 100644
--- a/src/corelib/io/qurl.h
+++ b/src/corelib/io/qurl.h
@@ -46,6 +46,7 @@
#include <QtCore/qobjectdefs.h>
#include <QtCore/qpair.h>
#include <QtCore/qstring.h>
+#include <QtCore/qhash.h>
QT_BEGIN_HEADER
@@ -75,6 +76,7 @@ public:
RemovePath = 0x20,
RemoveQuery = 0x40,
RemoveFragment = 0x80,
+ // 0x100: private: normalized
StripTrailingSlash = 0x10000
};
@@ -268,6 +270,11 @@ public:
inline DataPtr &data_ptr() { return d; }
};
+inline uint qHash(const QUrl &url)
+{
+ return qHash(url.toEncoded(QUrl::FormattingOption(0x100)));
+}
+
Q_DECLARE_TYPEINFO(QUrl, Q_MOVABLE_TYPE);
Q_DECLARE_SHARED(QUrl)
Q_DECLARE_OPERATORS_FOR_FLAGS(QUrl::FormattingOptions)
diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp
index 36e4af93ca..b0503be623 100644
--- a/src/corelib/kernel/qabstractitemmodel.cpp
+++ b/src/corelib/kernel/qabstractitemmodel.cpp
@@ -1248,7 +1248,7 @@ void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent,
/*!
\fn QModelIndex QAbstractItemModel::parent(const QModelIndex &index) const = 0
- Returns the parent of the model item with the given \a index. If the model
+ Returns the parent of the model item with the given \a index. If the item
has no parent, an invalid QModelIndex is returned.
A common convention used in models that expose tree data structures is that
diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp
index 5990f86bba..566626d5c1 100644
--- a/src/corelib/kernel/qcoreapplication_win.cpp
+++ b/src/corelib/kernel/qcoreapplication_win.cpp
@@ -1021,14 +1021,14 @@ QString decodeMSG(const MSG& msg)
LPWINDOWPOS winPos = (LPWINDOWPOS)lParam;
if (!winPos)
break;
- QString hwndAfter = valueCheck((uint)winPos->hwndInsertAfter,
- FLAG_STRING((uint)HWND_BOTTOM, "HWND_BOTTOM"),
- FLAG_STRING((int)HWND_NOTOPMOST, "HWND_NOTOPMOST"),
- FLAG_STRING((uint)HWND_TOP, "HWND_TOP"),
- FLAG_STRING((int)HWND_TOPMOST, "HWND_TOPMOST"),
+ QString hwndAfter = valueCheck(quint64(winPos->hwndInsertAfter),
+ FLAG_STRING((quintptr)HWND_BOTTOM, "HWND_BOTTOM"),
+ FLAG_STRING((quintptr)HWND_NOTOPMOST, "HWND_NOTOPMOST"),
+ FLAG_STRING((quintptr)HWND_TOP, "HWND_TOP"),
+ FLAG_STRING((quintptr)HWND_TOPMOST, "HWND_TOPMOST"),
FLAG_STRING());
if (hwndAfter.size() == 0)
- hwndAfter = QString::number((uint)winPos->hwndInsertAfter, 16);
+ hwndAfter = QString::number((quintptr)winPos->hwndInsertAfter, 16);
QString flags = flagCheck(winPos->flags,
FLGSTR(SWP_DRAWFRAME),
FLGSTR(SWP_FRAMECHANGED),
diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp
index 3500b63865..d23ea4cd22 100644
--- a/src/corelib/kernel/qcoreevent.cpp
+++ b/src/corelib/kernel/qcoreevent.cpp
@@ -272,7 +272,6 @@ QT_BEGIN_NAMESPACE
\omitvalue MacGLClearDrawable
\omitvalue NetworkReplyUpdated
\omitvalue FutureCallOut
- \omitvalue CocoaRequestModal
\omitvalue UpdateSoftKeys
\omitvalue NativeGesture
*/
@@ -331,7 +330,7 @@ QEvent::~QEvent()
equivalent of calling setAccepted(false).
Clearing the accept parameter indicates that the event receiver
- does not want the event. Unwanted events might be propgated to the
+ does not want the event. Unwanted events might be propagated to the
parent widget.
\sa accept()
diff --git a/src/corelib/kernel/qcoreevent.h b/src/corelib/kernel/qcoreevent.h
index c76e81b49c..a20d17160b 100644
--- a/src/corelib/kernel/qcoreevent.h
+++ b/src/corelib/kernel/qcoreevent.h
@@ -266,7 +266,6 @@ public:
UngrabMouse = 187,
GrabKeyboard = 188,
UngrabKeyboard = 189,
- CocoaRequestModal = 190, // Internal for requesting an application modal Cocoa Window
MacGLClearDrawable = 191, // Internal Cocoa, the window has changed, so we must clear
StateMachineSignal = 192,
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index 8010a76bda..2633a7c337 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -308,7 +308,7 @@ typedef MMRESULT(WINAPI *ptimeKillEvent)(UINT);
static ptimeSetEvent qtimeSetEvent = 0;
static ptimeKillEvent qtimeKillEvent = 0;
-LRESULT CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp);
+LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp);
static void resolveTimerAPI()
{
@@ -349,6 +349,9 @@ public:
// for controlling when to send posted events
QAtomicInt serialNumber;
int lastSerialNumber;
+#ifndef Q_OS_WINCE
+ int lastMessageTime;
+#endif
QAtomicInt wakeUps;
// timers
@@ -372,7 +375,12 @@ public:
};
QEventDispatcherWin32Private::QEventDispatcherWin32Private()
- : threadId(GetCurrentThreadId()), interrupt(false), internalHwnd(0), getMessageHook(0), serialNumber(0), lastSerialNumber(0), wakeUps(0)
+ : threadId(GetCurrentThreadId()), interrupt(false), internalHwnd(0), getMessageHook(0),
+ serialNumber(0), lastSerialNumber(0),
+#ifndef Q_OS_WINCE
+ lastMessageTime(0),
+#endif
+ wakeUps(0)
{
resolveTimerAPI();
}
@@ -412,7 +420,7 @@ Q_CORE_EXPORT bool winGetMessage(MSG* msg, HWND hWnd, UINT wMsgFilterMin,
}
// This function is called by a workerthread
-void WINAPI CALLBACK qt_fast_timer_proc(uint timerId, uint /*reserved*/, DWORD_PTR user, DWORD_PTR /*reserved*/, DWORD_PTR /*reserved*/)
+void WINAPI QT_WIN_CALLBACK qt_fast_timer_proc(uint timerId, uint /*reserved*/, DWORD_PTR user, DWORD_PTR /*reserved*/, DWORD_PTR /*reserved*/)
{
if (!timerId) // sanity check
return;
@@ -421,7 +429,7 @@ void WINAPI CALLBACK qt_fast_timer_proc(uint timerId, uint /*reserved*/, DWORD_P
QCoreApplication::postEvent(t->dispatcher, new QTimerEvent(t->timerId));
}
-LRESULT CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
+LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
{
if (message == WM_NCCREATE)
return true;
@@ -487,6 +495,9 @@ LRESULT CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
int localSerialNumber = d->serialNumber;
if (localSerialNumber != d->lastSerialNumber) {
d->lastSerialNumber = localSerialNumber;
+#ifndef Q_OS_WINCE
+ d->lastMessageTime = GetMessageTime();
+#endif
QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
}
return 0;
@@ -495,7 +506,7 @@ LRESULT CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
return DefWindowProc(hwnd, message, wp, lp);
}
-LRESULT CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp)
+LRESULT QT_WIN_CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp)
{
if (wp == PM_REMOVE) {
QEventDispatcherWin32 *q = qobject_cast<QEventDispatcherWin32 *>(QAbstractEventDispatcher::instance());
@@ -503,9 +514,13 @@ LRESULT CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp)
if (q) {
QEventDispatcherWin32Private *d = q->d_func();
int localSerialNumber = d->serialNumber;
- if (HIWORD(GetQueueStatus(QS_INPUT | QS_RAWINPUT | QS_TIMER)) == 0) {
- // no more input or timer events in the message queue, we can allow posted events to be
- // sent now
+ if (HIWORD(GetQueueStatus(QS_INPUT | QS_RAWINPUT | QS_TIMER)) == 0
+#ifndef Q_OS_WINCE
+ || GetMessageTime() - d->lastMessageTime >= 10
+#endif
+ ) {
+ // no more input or timer events in the message queue or more than 10ms has elapsed since
+ // we send posted events, we can allow posted events to be sent now
(void) d->wakeUps.fetchAndStoreRelease(0);
MSG *msg = (MSG *) lp;
if (localSerialNumber != d->lastSerialNumber
@@ -755,6 +770,8 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags)
if (d->internalHwnd == msg.hwnd && msg.message == WM_QT_SENDPOSTEDEVENTS) {
if (seenWM_QT_SENDPOSTEDEVENTS) {
+ // when calling processEvents() "manually", we only want to send posted
+ // events once
needWM_QT_SENDPOSTEDEVENTS = true;
continue;
}
diff --git a/src/corelib/kernel/qeventdispatcher_win_p.h b/src/corelib/kernel/qeventdispatcher_win_p.h
index ed94c49086..788cc44f75 100644
--- a/src/corelib/kernel/qeventdispatcher_win_p.h
+++ b/src/corelib/kernel/qeventdispatcher_win_p.h
@@ -62,7 +62,7 @@ class QWinEventNotifier;
class QEventDispatcherWin32Private;
// forward declaration
-LRESULT CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp);
+LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp);
class Q_CORE_EXPORT QEventDispatcherWin32 : public QAbstractEventDispatcher
{
@@ -101,8 +101,8 @@ public:
bool event(QEvent *e);
private:
- friend LRESULT CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp);
- friend LRESULT CALLBACK qt_GetMessageHook(int, WPARAM, LPARAM);
+ friend LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp);
+ friend LRESULT QT_WIN_CALLBACK qt_GetMessageHook(int, WPARAM, LPARAM);
};
QT_END_NAMESPACE
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp
index b151040257..312c4b2dc9 100644
--- a/src/corelib/kernel/qmetaobject.cpp
+++ b/src/corelib/kernel/qmetaobject.cpp
@@ -482,6 +482,46 @@ int QMetaObject::classInfoCount() const
return n;
}
+/** \internal
+* helper class for indexOf{Method,Slot,Signal}, returns the relative index of the method within
+* the baseObject
+* \a MethodType might be MethodSignal or MethodSlot, or 0 to match everything.
+*/
+template<int MethodType>
+static inline int indexOfMethodRelative(const QMetaObject **baseObject,
+ const char *method,
+ bool normalizeStringData)
+{
+ const QMetaObject *m;
+ for (m = *baseObject; m; m = *baseObject = m->d.superdata) {
+ const QMetaObject *const m = *baseObject;
+ int i = (MethodType == MethodSignal && priv(m->d.data)->revision >= 4)
+ ? (priv(m->d.data)->signalCount - 1) : (priv(m->d.data)->methodCount - 1);
+ if (i < 0)
+ continue;
+
+ const int end = (MethodType == MethodSlot && priv(m->d.data)->revision >= 4)
+ ? (priv(m->d.data)->signalCount) : 0;
+ if (!normalizeStringData) {
+ for (; i >= end; --i) {
+ if ((MethodType == 0 || (m->d.data[priv(m->d.data)->methodData + 5*i + 4] & MethodTypeMask) == MethodType)
+ && strcmp(method, m->d.stringdata + m->d.data[priv(m->d.data)->methodData + 5*i]) == 0)
+ return i;
+ }
+ } else if (priv(m->d.data)->revision < 5) {
+ const char *stringdata = (m->d.stringdata + m->d.data[priv(m->d.data)->methodData + 5 * i]);
+ const QByteArray normalizedSignature = QMetaObject::normalizedSignature(stringdata);
+ for (; i >= end; --i) {
+ if ((MethodType == 0|| (m->d.data[priv(m->d.data)->methodData + 5*i + 4] & MethodTypeMask) == MethodType)
+ && normalizedSignature == method)
+ return i;
+ }
+ }
+ }
+ return -1;
+}
+
+
/*!
\since 4.5
@@ -515,17 +555,14 @@ int QMetaObject::indexOfConstructor(const char *constructor) const
*/
int QMetaObject::indexOfMethod(const char *method) const
{
- int i = -1;
const QMetaObject *m = this;
- while (m && i < 0) {
- for (i = priv(m->d.data)->methodCount-1; i >= 0; --i)
- if (strcmp(method, m->d.stringdata
- + m->d.data[priv(m->d.data)->methodData + 5*i]) == 0) {
- i += m->methodOffset();
- break;
- }
- m = m->d.superdata;
+ int i = indexOfMethodRelative<0>(&m, method, false);
+ if (i < 0) {
+ m = this;
+ i = indexOfMethodRelative<0>(&m, method, true);
}
+ if (i >= 0)
+ i += m->methodOffset();
return i;
}
@@ -543,7 +580,11 @@ int QMetaObject::indexOfMethod(const char *method) const
int QMetaObject::indexOfSignal(const char *signal) const
{
const QMetaObject *m = this;
- int i = QMetaObjectPrivate::indexOfSignalRelative(&m, signal);
+ int i = QMetaObjectPrivate::indexOfSignalRelative(&m, signal, false);
+ if (i < 0) {
+ m = this;
+ i = QMetaObjectPrivate::indexOfSignalRelative(&m, signal, true);
+ }
if (i >= 0)
i += m->methodOffset();
return i;
@@ -554,21 +595,11 @@ int QMetaObject::indexOfSignal(const char *signal) const
\a baseObject will be adjusted to the enclosing QMetaObject, or 0 if the signal is not found
*/
-int QMetaObjectPrivate::indexOfSignalRelative(const QMetaObject **baseObject, const char *signal)
+int QMetaObjectPrivate::indexOfSignalRelative(const QMetaObject **baseObject,
+ const char *signal,
+ bool normalizeStringData)
{
- int i = -1;
- while (*baseObject) {
- const QMetaObject *const m = *baseObject;
- for (i = priv(m->d.data)->methodCount-1; i >= 0; --i)
- if ((m->d.data[priv(m->d.data)->methodData + 5*i + 4] & MethodTypeMask) == MethodSignal
- && strcmp(signal, m->d.stringdata
- + m->d.data[priv(m->d.data)->methodData + 5*i]) == 0) {
- break;
- }
- if (i >= 0)
- break;
- *baseObject = m->d.superdata;
- }
+ int i = indexOfMethodRelative<MethodSignal>(baseObject, signal, normalizeStringData);
#ifndef QT_NO_DEBUG
const QMetaObject *m = *baseObject;
if (i >= 0 && m && m->d.superdata) {
@@ -581,7 +612,6 @@ int QMetaObjectPrivate::indexOfSignalRelative(const QMetaObject **baseObject, co
return i;
}
-
/*!
Finds \a slot and returns its index; otherwise returns -1.
@@ -592,18 +622,19 @@ int QMetaObjectPrivate::indexOfSignalRelative(const QMetaObject **baseObject, co
*/
int QMetaObject::indexOfSlot(const char *slot) const
{
- int i = -1;
- const QMetaObject *m = this;
- while (m && i < 0) {
- for (i = priv(m->d.data)->methodCount-1; i >= 0; --i)
- if ((m->d.data[priv(m->d.data)->methodData + 5*i + 4] & MethodTypeMask) == MethodSlot
- && strcmp(slot, m->d.stringdata
- + m->d.data[priv(m->d.data)->methodData + 5*i]) == 0) {
- i += m->methodOffset();
- break;
- }
- m = m->d.superdata;
- }
+ int i = QMetaObjectPrivate::indexOfSlot(this, slot, false);
+ if (i < 0)
+ i = QMetaObjectPrivate::indexOfSlot(this, slot, true);
+ return i;
+}
+
+int QMetaObjectPrivate::indexOfSlot(const QMetaObject *m,
+ const char *slot,
+ bool normalizeStringData)
+{
+ int i = indexOfMethodRelative<MethodSlot>(&m, slot, normalizeStringData);
+ if (i >= 0)
+ i += m->methodOffset();
return i;
}
@@ -1106,8 +1137,11 @@ bool QMetaObject::invokeMethod(QObject *obj,
idx = obj->metaObject()->indexOfMethod(norm.constData());
}
- if (idx < 0 || idx >= obj->metaObject()->methodCount())
+ if (idx < 0 || idx >= obj->metaObject()->methodCount()) {
+ qWarning("QMetaObject::invokeMethod: No such method %s::%s",
+ obj->metaObject()->className(), sig.constData());
return false;
+ }
QMetaMethod method = obj->metaObject()->method(idx);
return method.invoke(obj, type, ret,
val0, val1, val2, val3, val4, val5, val6, val7, val8, val9);
diff --git a/src/corelib/kernel/qmetaobject_p.h b/src/corelib/kernel/qmetaobject_p.h
index 3bbb05059f..a176149164 100644
--- a/src/corelib/kernel/qmetaobject_p.h
+++ b/src/corelib/kernel/qmetaobject_p.h
@@ -115,11 +115,17 @@ struct QMetaObjectPrivate
int constructorCount, constructorData; //since revision 2
int flags; //since revision 3
int signalCount; //since revision 4
+ // revision 5 introduces changes in normalized signatures, no new members
static inline const QMetaObjectPrivate *get(const QMetaObject *metaobject)
{ return reinterpret_cast<const QMetaObjectPrivate*>(metaobject->d.data); }
- static int indexOfSignalRelative(const QMetaObject **baseObject, const char* name);
+ static int indexOfSignalRelative(const QMetaObject **baseObject,
+ const char* name,
+ bool normalizeStringData);
+ static int indexOfSlot(const QMetaObject *m,
+ const char *slot,
+ bool normalizeStringData);
static int originalClone(const QMetaObject *obj, int local_method_index);
#ifndef QT_NO_QOBJECT
@@ -247,6 +253,7 @@ static QByteArray normalizeTypeInternal(const char *t, const char *e, bool fixSc
} while (optional[++i].keyword != 0);
}
+ bool star = false;
while (t != e) {
char c = *t++;
if (fixScope && c == ':' && *t == ':' ) {
@@ -257,6 +264,7 @@ static QByteArray normalizeTypeInternal(const char *t, const char *e, bool fixSc
--i;
result.resize(i + 1);
}
+ star = star || c == '*';
result += c;
if (c == '<') {
//template recursion
@@ -277,6 +285,23 @@ static QByteArray normalizeTypeInternal(const char *t, const char *e, bool fixSc
}
}
}
+
+ // cv qualifers can appear after the type as well
+ if (t != e && (e - t >= 5 && strncmp("const", t, 5) == 0)) {
+ t += 5;
+ while (t != e && is_space(*t))
+ ++t;
+ if (adjustConst && t != e && *t == '&') {
+ // treat const ref as value
+ ++t;
+ } else if (!star) {
+ // move const to the front (but not if const comes after a *)
+ result.prepend("const ");
+ } else {
+ // keep const after a *
+ result += "const";
+ }
+ }
}
return result;
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index e304290c50..30af6fadb5 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -48,6 +48,7 @@
#include "qstringlist.h"
#include "qvector.h"
#include "qlocale.h"
+#include "qeasingcurve.h"
#ifdef QT_BOOTSTRAPPED
# ifndef QT_NO_GEOM_VARIANT
@@ -132,6 +133,7 @@ QT_BEGIN_NAMESPACE
\value Float \c float
\value QObjectStar QObject *
\value QWidgetStar QWidget *
+ \value QVariant QVariant
\value QColorGroup QColorGroup
\value QCursor QCursor
@@ -176,6 +178,7 @@ QT_BEGIN_NAMESPACE
\value QVector3D QVector3D
\value QVector4D QVector4D
\value QQuaternion QQuaternion
+ \value QEasingCurve QEasingCurve
\value User Base value for user types
@@ -223,100 +226,105 @@ QT_BEGIN_NAMESPACE
\sa Q_DECLARE_METATYPE(), QVariant::setValue(), QVariant::value(), QVariant::fromValue()
*/
+#define QT_ADD_STATIC_METATYPE(STR, TP) \
+ { STR, sizeof(STR) - 1, TP }
+
/* Note: these MUST be in the order of the enums */
-static const struct { const char * typeName; int type; } types[] = {
+static const struct { const char * typeName; int typeNameLength; int type; } types[] = {
/* All Core types */
- {"void", QMetaType::Void},
- {"bool", QMetaType::Bool},
- {"int", QMetaType::Int},
- {"uint", QMetaType::UInt},
- {"qlonglong", QMetaType::LongLong},
- {"qulonglong", QMetaType::ULongLong},
- {"double", QMetaType::Double},
- {"QChar", QMetaType::QChar},
- {"QVariantMap", QMetaType::QVariantMap},
- {"QVariantList", QMetaType::QVariantList},
- {"QString", QMetaType::QString},
- {"QStringList", QMetaType::QStringList},
- {"QByteArray", QMetaType::QByteArray},
- {"QBitArray", QMetaType::QBitArray},
- {"QDate", QMetaType::QDate},
- {"QTime", QMetaType::QTime},
- {"QDateTime", QMetaType::QDateTime},
- {"QUrl", QMetaType::QUrl},
- {"QLocale", QMetaType::QLocale},
- {"QRect", QMetaType::QRect},
- {"QRectF", QMetaType::QRectF},
- {"QSize", QMetaType::QSize},
- {"QSizeF", QMetaType::QSizeF},
- {"QLine", QMetaType::QLine},
- {"QLineF", QMetaType::QLineF},
- {"QPoint", QMetaType::QPoint},
- {"QPointF", QMetaType::QPointF},
- {"QRegExp", QMetaType::QRegExp},
- {"QVariantHash", QMetaType::QVariantHash},
+ QT_ADD_STATIC_METATYPE("void", QMetaType::Void),
+ QT_ADD_STATIC_METATYPE("bool", QMetaType::Bool),
+ QT_ADD_STATIC_METATYPE("int", QMetaType::Int),
+ QT_ADD_STATIC_METATYPE("uint", QMetaType::UInt),
+ QT_ADD_STATIC_METATYPE("qlonglong", QMetaType::LongLong),
+ QT_ADD_STATIC_METATYPE("qulonglong", QMetaType::ULongLong),
+ QT_ADD_STATIC_METATYPE("double", QMetaType::Double),
+ QT_ADD_STATIC_METATYPE("QChar", QMetaType::QChar),
+ QT_ADD_STATIC_METATYPE("QVariantMap", QMetaType::QVariantMap),
+ QT_ADD_STATIC_METATYPE("QVariantList", QMetaType::QVariantList),
+ QT_ADD_STATIC_METATYPE("QString", QMetaType::QString),
+ QT_ADD_STATIC_METATYPE("QStringList", QMetaType::QStringList),
+ QT_ADD_STATIC_METATYPE("QByteArray", QMetaType::QByteArray),
+ QT_ADD_STATIC_METATYPE("QBitArray", QMetaType::QBitArray),
+ QT_ADD_STATIC_METATYPE("QDate", QMetaType::QDate),
+ QT_ADD_STATIC_METATYPE("QTime", QMetaType::QTime),
+ QT_ADD_STATIC_METATYPE("QDateTime", QMetaType::QDateTime),
+ QT_ADD_STATIC_METATYPE("QUrl", QMetaType::QUrl),
+ QT_ADD_STATIC_METATYPE("QLocale", QMetaType::QLocale),
+ QT_ADD_STATIC_METATYPE("QRect", QMetaType::QRect),
+ QT_ADD_STATIC_METATYPE("QRectF", QMetaType::QRectF),
+ QT_ADD_STATIC_METATYPE("QSize", QMetaType::QSize),
+ QT_ADD_STATIC_METATYPE("QSizeF", QMetaType::QSizeF),
+ QT_ADD_STATIC_METATYPE("QLine", QMetaType::QLine),
+ QT_ADD_STATIC_METATYPE("QLineF", QMetaType::QLineF),
+ QT_ADD_STATIC_METATYPE("QPoint", QMetaType::QPoint),
+ QT_ADD_STATIC_METATYPE("QPointF", QMetaType::QPointF),
+ QT_ADD_STATIC_METATYPE("QRegExp", QMetaType::QRegExp),
+ QT_ADD_STATIC_METATYPE("QVariantHash", QMetaType::QVariantHash),
+ QT_ADD_STATIC_METATYPE("QEasingCurve", QMetaType::QEasingCurve),
/* All GUI types */
- {"QColorGroup", 63},
- {"QFont", QMetaType::QFont},
- {"QPixmap", QMetaType::QPixmap},
- {"QBrush", QMetaType::QBrush},
- {"QColor", QMetaType::QColor},
- {"QPalette", QMetaType::QPalette},
- {"QIcon", QMetaType::QIcon},
- {"QImage", QMetaType::QImage},
- {"QPolygon", QMetaType::QPolygon},
- {"QRegion", QMetaType::QRegion},
- {"QBitmap", QMetaType::QBitmap},
- {"QCursor", QMetaType::QCursor},
- {"QSizePolicy", QMetaType::QSizePolicy},
- {"QKeySequence", QMetaType::QKeySequence},
- {"QPen", QMetaType::QPen},
- {"QTextLength", QMetaType::QTextLength},
- {"QTextFormat", QMetaType::QTextFormat},
- {"QMatrix", QMetaType::QMatrix},
- {"QTransform", QMetaType::QTransform},
- {"QMatrix4x4", QMetaType::QMatrix4x4},
- {"QVector2D", QMetaType::QVector2D},
- {"QVector3D", QMetaType::QVector3D},
- {"QVector4D", QMetaType::QVector4D},
- {"QQuaternion", QMetaType::QQuaternion},
+ QT_ADD_STATIC_METATYPE("QColorGroup", 63),
+ QT_ADD_STATIC_METATYPE("QFont", QMetaType::QFont),
+ QT_ADD_STATIC_METATYPE("QPixmap", QMetaType::QPixmap),
+ QT_ADD_STATIC_METATYPE("QBrush", QMetaType::QBrush),
+ QT_ADD_STATIC_METATYPE("QColor", QMetaType::QColor),
+ QT_ADD_STATIC_METATYPE("QPalette", QMetaType::QPalette),
+ QT_ADD_STATIC_METATYPE("QIcon", QMetaType::QIcon),
+ QT_ADD_STATIC_METATYPE("QImage", QMetaType::QImage),
+ QT_ADD_STATIC_METATYPE("QPolygon", QMetaType::QPolygon),
+ QT_ADD_STATIC_METATYPE("QRegion", QMetaType::QRegion),
+ QT_ADD_STATIC_METATYPE("QBitmap", QMetaType::QBitmap),
+ QT_ADD_STATIC_METATYPE("QCursor", QMetaType::QCursor),
+ QT_ADD_STATIC_METATYPE("QSizePolicy", QMetaType::QSizePolicy),
+ QT_ADD_STATIC_METATYPE("QKeySequence", QMetaType::QKeySequence),
+ QT_ADD_STATIC_METATYPE("QPen", QMetaType::QPen),
+ QT_ADD_STATIC_METATYPE("QTextLength", QMetaType::QTextLength),
+ QT_ADD_STATIC_METATYPE("QTextFormat", QMetaType::QTextFormat),
+ QT_ADD_STATIC_METATYPE("QMatrix", QMetaType::QMatrix),
+ QT_ADD_STATIC_METATYPE("QTransform", QMetaType::QTransform),
+ QT_ADD_STATIC_METATYPE("QMatrix4x4", QMetaType::QMatrix4x4),
+ QT_ADD_STATIC_METATYPE("QVector2D", QMetaType::QVector2D),
+ QT_ADD_STATIC_METATYPE("QVector3D", QMetaType::QVector3D),
+ QT_ADD_STATIC_METATYPE("QVector4D", QMetaType::QVector4D),
+ QT_ADD_STATIC_METATYPE("QQuaternion", QMetaType::QQuaternion),
/* All Metatype builtins */
- {"void*", QMetaType::VoidStar},
- {"long", QMetaType::Long},
- {"short", QMetaType::Short},
- {"char", QMetaType::Char},
- {"ulong", QMetaType::ULong},
- {"ushort", QMetaType::UShort},
- {"uchar", QMetaType::UChar},
- {"float", QMetaType::Float},
- {"QObject*", QMetaType::QObjectStar},
- {"QWidget*", QMetaType::QWidgetStar},
+ QT_ADD_STATIC_METATYPE("void*", QMetaType::VoidStar),
+ QT_ADD_STATIC_METATYPE("long", QMetaType::Long),
+ QT_ADD_STATIC_METATYPE("short", QMetaType::Short),
+ QT_ADD_STATIC_METATYPE("char", QMetaType::Char),
+ QT_ADD_STATIC_METATYPE("ulong", QMetaType::ULong),
+ QT_ADD_STATIC_METATYPE("ushort", QMetaType::UShort),
+ QT_ADD_STATIC_METATYPE("uchar", QMetaType::UChar),
+ QT_ADD_STATIC_METATYPE("float", QMetaType::Float),
+ QT_ADD_STATIC_METATYPE("QObject*", QMetaType::QObjectStar),
+ QT_ADD_STATIC_METATYPE("QWidget*", QMetaType::QWidgetStar),
+ QT_ADD_STATIC_METATYPE("QVariant", QMetaType::QVariant),
/* Type aliases - order doesn't matter */
- {"unsigned long", QMetaType::ULong},
- {"unsigned int", QMetaType::UInt},
- {"unsigned short", QMetaType::UShort},
- {"unsigned char", QMetaType::UChar},
- {"long long", QMetaType::LongLong},
- {"unsigned long long", QMetaType::ULongLong},
- {"qint8", QMetaType::Char},
- {"quint8", QMetaType::UChar},
- {"qint16", QMetaType::Short},
- {"quint16", QMetaType::UShort},
- {"qint32", QMetaType::Int},
- {"quint32", QMetaType::UInt},
- {"qint64", QMetaType::LongLong},
- {"quint64", QMetaType::ULongLong},
- {"QList<QVariant>", QMetaType::QVariantList},
- {"QMap<QString,QVariant>", QMetaType::QVariantMap},
- {"QHash<QString,QVariant>", QMetaType::QVariantHash},
+ QT_ADD_STATIC_METATYPE("unsigned long", QMetaType::ULong),
+ QT_ADD_STATIC_METATYPE("unsigned int", QMetaType::UInt),
+ QT_ADD_STATIC_METATYPE("unsigned short", QMetaType::UShort),
+ QT_ADD_STATIC_METATYPE("unsigned char", QMetaType::UChar),
+ QT_ADD_STATIC_METATYPE("long long", QMetaType::LongLong),
+ QT_ADD_STATIC_METATYPE("unsigned long long", QMetaType::ULongLong),
+ QT_ADD_STATIC_METATYPE("qint8", QMetaType::Char),
+ QT_ADD_STATIC_METATYPE("quint8", QMetaType::UChar),
+ QT_ADD_STATIC_METATYPE("qint16", QMetaType::Short),
+ QT_ADD_STATIC_METATYPE("quint16", QMetaType::UShort),
+ QT_ADD_STATIC_METATYPE("qint32", QMetaType::Int),
+ QT_ADD_STATIC_METATYPE("quint32", QMetaType::UInt),
+ QT_ADD_STATIC_METATYPE("qint64", QMetaType::LongLong),
+ QT_ADD_STATIC_METATYPE("quint64", QMetaType::ULongLong),
+ QT_ADD_STATIC_METATYPE("QList<QVariant>", QMetaType::QVariantList),
+ QT_ADD_STATIC_METATYPE("QMap<QString,QVariant>", QMetaType::QVariantMap),
+ QT_ADD_STATIC_METATYPE("QHash<QString,QVariant>", QMetaType::QVariantHash),
// let QMetaTypeId2 figure out the type at compile time
- {"qreal", QMetaTypeId2<qreal>::MetaType},
+ QT_ADD_STATIC_METATYPE("qreal", QMetaTypeId2<qreal>::MetaType),
- {0, QMetaType::Void}
+ {0, 0, QMetaType::Void}
};
struct QMetaTypeGuiHelper
@@ -346,6 +354,7 @@ public:
QMetaType::SaveOperator saveOp;
QMetaType::LoadOperator loadOp;
#endif
+ int alias;
};
Q_DECLARE_TYPEINFO(QCustomTypeInfo, Q_MOVABLE_TYPE);
@@ -361,7 +370,14 @@ void QMetaType::registerStreamOperators(const char *typeName, SaveOperator saveO
int idx = type(typeName);
if (!idx)
return;
+ registerStreamOperators(idx, saveOp, loadOp);
+}
+/*! \internal
+*/
+void QMetaType::registerStreamOperators(int idx, SaveOperator saveOp,
+ LoadOperator loadOp)
+{
QVector<QCustomTypeInfo> *ct = customTypes();
if (!ct)
return;
@@ -400,24 +416,38 @@ const char *QMetaType::typeName(int type)
}
/*! \internal
- Same as QMetaType::type(), but doesn't lock the mutex.
+ Similar to QMetaType::type(), but only looks in the static set of types.
*/
-static int qMetaTypeType_unlocked(const QByteArray &typeName)
+static inline int qMetaTypeStaticType(const char *typeName, int length)
{
int i = 0;
- while (types[i].typeName && strcmp(typeName.constData(), types[i].typeName))
+ while (types[i].typeName && ((length != types[i].typeNameLength)
+ || strcmp(typeName, types[i].typeName))) {
++i;
- if (!types[i].type) {
- const QVector<QCustomTypeInfo> * const ct = customTypes();
- if (!ct)
- return 0;
+ }
+ return types[i].type;
+}
- for (int v = 0; v < ct->count(); ++v) {
- if (ct->at(v).typeName == typeName)
- return v + QMetaType::User;
+/*! \internal
+ Similar to QMetaType::type(), but only looks in the custom set of
+ types, and doesn't lock the mutex.
+*/
+static int qMetaTypeCustomType_unlocked(const char *typeName, int length)
+{
+ const QVector<QCustomTypeInfo> * const ct = customTypes();
+ if (!ct)
+ return 0;
+
+ for (int v = 0; v < ct->count(); ++v) {
+ const QCustomTypeInfo &customInfo = ct->at(v);
+ if ((length == customInfo.typeName.size())
+ && !strcmp(typeName, customInfo.typeName.constData())) {
+ if (customInfo.alias >= 0)
+ return customInfo.alias;
+ return v + QMetaType::User;
}
}
- return types[i].type;
+ return 0;
}
/*! \internal
@@ -439,18 +469,69 @@ int QMetaType::registerType(const char *typeName, Destructor destructor,
NS(QByteArray) normalizedTypeName = QMetaObject::normalizedType(typeName);
#endif
+ int idx = qMetaTypeStaticType(normalizedTypeName.constData(),
+ normalizedTypeName.size());
+
+ if (!idx) {
+ QWriteLocker locker(customTypesLock());
+ idx = qMetaTypeCustomType_unlocked(normalizedTypeName.constData(),
+ normalizedTypeName.size());
+ if (!idx) {
+ QCustomTypeInfo inf;
+ inf.typeName = normalizedTypeName;
+ inf.constr = constructor;
+ inf.destr = destructor;
+ inf.alias = -1;
+ idx = ct->size() + User;
+ ct->append(inf);
+ }
+ }
+ return idx;
+}
+
+/*! \internal
+ \since 4.7
+
+ Registers a user type for marshalling, as an alias of another type (typedef)
+*/
+int QMetaType::registerTypedef(const char* typeName, int aliasId)
+{
+ QVector<QCustomTypeInfo> *ct = customTypes();
+ if (!ct || !typeName)
+ return -1;
+
+#ifdef QT_NO_QOBJECT
+ NS(QByteArray) normalizedTypeName = typeName;
+#else
+ NS(QByteArray) normalizedTypeName = QMetaObject::normalizedType(typeName);
+#endif
+
+ int idx = qMetaTypeStaticType(normalizedTypeName.constData(),
+ normalizedTypeName.size());
+
+ if (idx) {
+ Q_ASSERT(idx == aliasId);
+ return idx;
+ }
+
QWriteLocker locker(customTypesLock());
- int idx = qMetaTypeType_unlocked(normalizedTypeName);
+ idx = qMetaTypeCustomType_unlocked(normalizedTypeName.constData(),
+ normalizedTypeName.size());
+
+ if (idx) {
+ Q_ASSERT(idx == aliasId);
+ return idx;
+ }
if (!idx) {
QCustomTypeInfo inf;
inf.typeName = normalizedTypeName;
- inf.constr = constructor;
- inf.destr = destructor;
- idx = ct->size() + User;
+ inf.alias = aliasId;
+ inf.constr = 0;
+ inf.destr = 0;
ct->append(inf);
}
- return idx;
+ return aliasId;
}
/*!
@@ -478,6 +559,7 @@ void QMetaType::unregisterType(const char *typeName)
inf.typeName.clear();
inf.constr = 0;
inf.destr = 0;
+ inf.alias = -1;
}
}
}
@@ -507,14 +589,26 @@ bool QMetaType::isRegistered(int type)
*/
int QMetaType::type(const char *typeName)
{
-#ifdef QT_NO_QOBJECT
- const NS(QByteArray) normalizedTypeName = typeName;
-#else
- const NS(QByteArray) normalizedTypeName = QMetaObject::normalizedType(typeName);
+ int length = qstrlen(typeName);
+ if (!length)
+ return 0;
+ int type = qMetaTypeStaticType(typeName, length);
+ if (!type) {
+ QReadLocker locker(customTypesLock());
+ type = qMetaTypeCustomType_unlocked(typeName, length);
+#ifndef QT_NO_QOBJECT
+ if (!type) {
+ const NS(QByteArray) normalizedTypeName = QMetaObject::normalizedType(typeName);
+ type = qMetaTypeStaticType(normalizedTypeName.constData(),
+ normalizedTypeName.size());
+ if (!type) {
+ type = qMetaTypeCustomType_unlocked(normalizedTypeName.constData(),
+ normalizedTypeName.size());
+ }
+ }
#endif
-
- QReadLocker locker(customTypesLock());
- return qMetaTypeType_unlocked(normalizedTypeName);
+ }
+ return type;
}
#ifndef QT_NO_DATASTREAM
@@ -596,6 +690,9 @@ bool QMetaType::save(QDataStream &stream, int type, const void *data)
case QMetaType::QVariantList:
stream << *static_cast<const NS(QVariantList)*>(data);
break;
+ case QMetaType::QVariant:
+ stream << *static_cast<const NS(QVariant)*>(data);
+ break;
#endif
case QMetaType::QByteArray:
stream << *static_cast<const NS(QByteArray)*>(data);
@@ -659,6 +756,11 @@ bool QMetaType::save(QDataStream &stream, int type, const void *data)
stream << *static_cast<const NS(QRegExp)*>(data);
break;
#endif
+#ifndef QT_BOOTSTRAPPED
+ case QMetaType::QEasingCurve:
+ stream << *static_cast<const NS(QEasingCurve)*>(data);
+ break;
+#endif
#ifdef QT3_SUPPORT
case QMetaType::QColorGroup:
#endif
@@ -793,6 +895,9 @@ bool QMetaType::load(QDataStream &stream, int type, void *data)
case QMetaType::QVariantList:
stream >> *static_cast< NS(QVariantList)*>(data);
break;
+ case QMetaType::QVariant:
+ stream >> *static_cast< NS(QVariant)*>(data);
+ break;
#endif
case QMetaType::QByteArray:
stream >> *static_cast< NS(QByteArray)*>(data);
@@ -856,6 +961,11 @@ bool QMetaType::load(QDataStream &stream, int type, void *data)
stream >> *static_cast< NS(QRegExp)*>(data);
break;
#endif
+#ifndef QT_BOOTSTRAPPED
+ case QMetaType::QEasingCurve:
+ stream >> *static_cast< NS(QEasingCurve)*>(data);
+ break;
+#endif
#ifdef QT3_SUPPORT
case QMetaType::QColorGroup:
#endif
@@ -955,6 +1065,8 @@ void *QMetaType::construct(int type, const void *copy)
return new NS(QVariantHash)(*static_cast<const NS(QVariantHash)*>(copy));
case QMetaType::QVariantList:
return new NS(QVariantList)(*static_cast<const NS(QVariantList)*>(copy));
+ case QMetaType::QVariant:
+ return new NS(QVariant)(*static_cast<const NS(QVariant)*>(copy));
#endif
case QMetaType::QByteArray:
return new NS(QByteArray)(*static_cast<const NS(QByteArray)*>(copy));
@@ -1000,6 +1112,10 @@ void *QMetaType::construct(int type, const void *copy)
case QMetaType::QRegExp:
return new NS(QRegExp)(*static_cast<const NS(QRegExp)*>(copy));
#endif
+#ifndef QT_BOOTSTRAPPED
+ case QMetaType::QEasingCurve:
+ return new NS(QEasingCurve)(*static_cast<const NS(QEasingCurve)*>(copy));
+#endif
case QMetaType::Void:
return 0;
default:
@@ -1046,6 +1162,8 @@ void *QMetaType::construct(int type, const void *copy)
return new NS(QVariantHash);
case QMetaType::QVariantList:
return new NS(QVariantList);
+ case QMetaType::QVariant:
+ return new NS(QVariant);
#endif
case QMetaType::QByteArray:
return new NS(QByteArray);
@@ -1091,6 +1209,10 @@ void *QMetaType::construct(int type, const void *copy)
case QMetaType::QRegExp:
return new NS(QRegExp);
#endif
+#ifndef QT_BOOTSTRAPPED
+ case QMetaType::QEasingCurve:
+ return new NS(QEasingCurve);
+#endif
case QMetaType::Void:
return 0;
default:
@@ -1183,6 +1305,9 @@ void QMetaType::destroy(int type, void *data)
case QMetaType::QVariantList:
delete static_cast< NS(QVariantList)* >(data);
break;
+ case QMetaType::QVariant:
+ delete static_cast< NS(QVariant)* >(data);
+ break;
#endif
case QMetaType::QByteArray:
delete static_cast< NS(QByteArray)* >(data);
@@ -1246,6 +1371,11 @@ void QMetaType::destroy(int type, void *data)
delete static_cast< NS(QRegExp)* >(data);
break;
#endif
+#ifndef QT_BOOTSTRAPPED
+ case QMetaType::QEasingCurve:
+ delete static_cast< NS(QEasingCurve)* >(data);
+ break;
+#endif
case QMetaType::Void:
break;
default: {
@@ -1287,6 +1417,11 @@ void QMetaType::destroy(int type, void *data)
\snippet doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp 4
+ This function is usefull to register typedefs so they can be used
+ by QMetaProperty, or in QueuedConnections
+
+ \snippet doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp 9
+
\sa qRegisterMetaTypeStreamOperators(), QMetaType::isRegistered(),
Q_DECLARE_METATYPE()
*/
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index c0dd288ee7..2108b92b99 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -69,7 +69,7 @@ public:
QBitArray = 13, QDate = 14, QTime = 15, QDateTime = 16, QUrl = 17,
QLocale = 18, QRect = 19, QRectF = 20, QSize = 21, QSizeF = 22,
QLine = 23, QLineF = 24, QPoint = 25, QPointF = 26, QRegExp = 27,
- QVariantHash = 28, LastCoreType = 28 /* QVariantHash */,
+ QVariantHash = 28, QEasingCurve = 29, LastCoreType = QEasingCurve,
FirstGuiType = 63 /* QColorGroup */,
#ifdef QT3_SUPPORT
@@ -81,12 +81,13 @@ public:
QTextLength = 78, QTextFormat = 79, QMatrix = 80, QTransform = 81,
QMatrix4x4 = 82, QVector2D = 83, QVector3D = 84, QVector4D = 85,
QQuaternion = 86,
- LastGuiType = 86 /* QQuaternion */,
+ LastGuiType = QQuaternion,
FirstCoreExtType = 128 /* VoidStar */,
VoidStar = 128, Long = 129, Short = 130, Char = 131, ULong = 132,
UShort = 133, UChar = 134, Float = 135, QObjectStar = 136, QWidgetStar = 137,
- LastCoreExtType = 137 /* QWidgetStar */,
+ QVariant = 138,
+ LastCoreExtType = QVariant,
// This logic must match the one in qglobal.h
#if defined(QT_COORD_TYPE)
@@ -108,9 +109,12 @@ public:
typedef void (*LoadOperator)(QDataStream &, void *);
static void registerStreamOperators(const char *typeName, SaveOperator saveOp,
LoadOperator loadOp);
+ static void registerStreamOperators(int type, SaveOperator saveOp,
+ LoadOperator loadOp);
#endif
static int registerType(const char *typeName, Destructor destructor,
Constructor constructor);
+ static int registerTypedef(const char *typeName, int aliasId);
static int type(const char *typeName);
static const char *typeName(int type);
static bool isRegistered(int type);
@@ -152,13 +156,31 @@ void qMetaTypeLoadHelper(QDataStream &stream, T *t)
}
#endif // QT_NO_DATASTREAM
+template <typename T> struct QMetaTypeId2;
+
+namespace QtPrivate {
+ template <typename T, bool Defined = QMetaTypeId2<T>::Defined>
+ struct QMetaTypeIdHelper {
+ static inline int qt_metatype_id()
+ { return QMetaTypeId2<T>::qt_metatype_id(); }
+ };
+ template <typename T> struct QMetaTypeIdHelper<T, false> {
+ static inline int qt_metatype_id()
+ { return -1; }
+ };
+}
+
template <typename T>
int qRegisterMetaType(const char *typeName
#ifndef qdoc
- , T * /* dummy */ = 0
+ , T * dummy = 0
#endif
)
{
+ const int typedefOf = dummy ? -1 : QtPrivate::QMetaTypeIdHelper<T>::qt_metatype_id();
+ if (typedefOf != -1)
+ return QMetaType::registerTypedef(typeName, typedefOf);
+
typedef void*(*ConstructPtr)(const T*);
ConstructPtr cptr = qMetaTypeConstructHelper<T>;
typedef void(*DeletePtr)(T*);
@@ -224,6 +246,24 @@ inline int qRegisterMetaType(
#endif
}
+#ifndef QT_NO_DATASTREAM
+template <typename T>
+inline int qRegisterMetaTypeStreamOperators()
+{
+ typedef void(*SavePtr)(QDataStream &, const T *);
+ typedef void(*LoadPtr)(QDataStream &, T *);
+ SavePtr sptr = qMetaTypeSaveHelper<T>;
+ LoadPtr lptr = qMetaTypeLoadHelper<T>;
+
+ register int id = qMetaTypeId<T>();
+ QMetaType::registerStreamOperators(id,
+ reinterpret_cast<QMetaType::SaveOperator>(sptr),
+ reinterpret_cast<QMetaType::LoadOperator>(lptr));
+
+ return id;
+}
+#endif
+
#define Q_DECLARE_METATYPE(TYPE) \
QT_BEGIN_NAMESPACE \
template <> \
@@ -234,7 +274,8 @@ inline int qRegisterMetaType(
{ \
static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \
if (!metatype_id) \
- metatype_id = qRegisterMetaType< TYPE >(#TYPE); \
+ metatype_id = qRegisterMetaType< TYPE >(#TYPE, \
+ reinterpret_cast< TYPE *>(quintptr(-1))); \
return metatype_id; \
} \
}; \
@@ -270,6 +311,7 @@ class QPointF;
#ifndef QT_NO_REGEXP
class QRegExp;
#endif
+class QEasingCurve;
class QWidget;
class QObject;
@@ -299,6 +341,7 @@ class QVector2D;
class QVector3D;
class QVector4D;
class QQuaternion;
+class QVariant;
QT_END_NAMESPACE
@@ -339,6 +382,7 @@ Q_DECLARE_BUILTIN_METATYPE(QPointF, QPointF)
#ifndef QT_NO_REGEXP
Q_DECLARE_BUILTIN_METATYPE(QRegExp, QRegExp)
#endif
+Q_DECLARE_BUILTIN_METATYPE(QEasingCurve, QEasingCurve)
#ifdef QT3_SUPPORT
Q_DECLARE_BUILTIN_METATYPE(QColorGroup, QColorGroup)
@@ -366,6 +410,7 @@ Q_DECLARE_BUILTIN_METATYPE(QVector2D, QVector2D)
Q_DECLARE_BUILTIN_METATYPE(QVector3D, QVector3D)
Q_DECLARE_BUILTIN_METATYPE(QVector4D, QVector4D)
Q_DECLARE_BUILTIN_METATYPE(QQuaternion, QQuaternion)
+Q_DECLARE_BUILTIN_METATYPE(QVariant, QVariant)
QT_END_HEADER
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 689e44c8c7..389e6e77dc 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -132,7 +132,8 @@ QObjectPrivate::QObjectPrivate(int version)
: threadData(0), connectionLists(0), senders(0), currentSender(0), currentChildBeingDeleted(0)
{
if (version != QObjectPrivateVersion)
- qFatal("Cannot mix incompatible Qt libraries");
+ qFatal("Cannot mix incompatible Qt library (version 0x%x) with this library (version 0x%x)",
+ version, QObjectPrivateVersion);
// QObjectData initialization
q_ptr = 0;
@@ -871,7 +872,7 @@ QObject::~QObject()
// all the signal/slots connections are still in place - if we don't
// quit now, we will crash pretty soon.
qWarning("Detected an unexpected exception in ~QObject while emitting destroyed().");
-#if defined(Q_AUTOTEST_EXPORT) && !defined(QT_NO_EXCEPTIONS)
+#if defined(Q_BUILD_INTERNAL) && !defined(QT_NO_EXCEPTIONS)
struct AutotestException : public std::exception
{
const char *what() const throw() { return "autotest swallow"; }
@@ -903,7 +904,8 @@ QObject::~QObject()
// disconnect all receivers
if (d->connectionLists) {
++d->connectionLists->inUse;
- for (int signal = -1; signal < d->connectionLists->count(); ++signal) {
+ int connectionListsCount = d->connectionLists->count();
+ for (int signal = -1; signal < connectionListsCount; ++signal) {
QObjectPrivate::ConnectionList &connectionList =
(*d->connectionLists)[signal];
@@ -940,16 +942,17 @@ QObject::~QObject()
// disconnect all senders
QObjectPrivate::Connection *node = d->senders;
while (node) {
- QMutex *m = signalSlotLock(node->sender);
+ QObject *sender = node->sender;
+ QMutex *m = signalSlotLock(sender);
node->prev = &node;
bool needToUnlock = QOrderedMutexLocker::relock(locker.mutex(), m);
//the node has maybe been removed while the mutex was unlocked in relock?
- if (!node || signalSlotLock(node->sender) != m) {
+ if (!node || node->sender != sender) {
m->unlock();
continue;
}
node->receiver = 0;
- QObjectConnectionListVector *senderLists = node->sender->d_func()->connectionLists;
+ QObjectConnectionListVector *senderLists = sender->d_func()->connectionLists;
if (senderLists)
senderLists->dirty = true;
@@ -2510,20 +2513,25 @@ bool QObject::connect(const QObject *sender, const char *signal,
const QMetaObject *smeta = sender->metaObject();
const char *signal_arg = signal;
++signal; //skip code
- int signal_index = QMetaObjectPrivate::indexOfSignalRelative(&smeta, signal);
+ int signal_index = QMetaObjectPrivate::indexOfSignalRelative(&smeta, signal, false);
if (signal_index < 0) {
// check for normalized signatures
tmp_signal_name = QMetaObject::normalizedSignature(signal - 1);
signal = tmp_signal_name.constData() + 1;
smeta = sender->metaObject();
- signal_index = QMetaObjectPrivate::indexOfSignalRelative(&smeta, signal);
+ signal_index = QMetaObjectPrivate::indexOfSignalRelative(&smeta, signal, false);
+ }
+ if (signal_index < 0) {
+ // re-use tmp_signal_name and signal from above
- if (signal_index < 0) {
- err_method_notfound(sender, signal_arg, "connect");
- err_info_about_objects("connect", sender, receiver);
- return false;
- }
+ smeta = sender->metaObject();
+ signal_index = QMetaObjectPrivate::indexOfSignalRelative(&smeta, signal, true);
+ }
+ if (signal_index < 0) {
+ err_method_notfound(sender, signal_arg, "connect");
+ err_info_about_objects("connect", sender, receiver);
+ return false;
}
signal_index = QMetaObjectPrivate::originalClone(smeta, signal_index);
int signalOffset, methodOffset;
@@ -2543,16 +2551,21 @@ bool QObject::connect(const QObject *sender, const char *signal,
int method_index = -1;
switch (membcode) {
case QSLOT_CODE:
- method_index = rmeta->indexOfSlot(method);
+ method_index = QMetaObjectPrivate::indexOfSlot(rmeta, method, false);
break;
case QSIGNAL_CODE:
- method_index = rmeta->indexOfSignal(method);
+ method_index = QMetaObjectPrivate::indexOfSignalRelative(&rmeta, method, false);
+ if (method_index >= 0)
+ method_index += rmeta->methodOffset();
break;
}
if (method_index < 0) {
// check for normalized methods
tmp_method_name = QMetaObject::normalizedSignature(method);
method = tmp_method_name.constData();
+
+ // rmeta may have been modified above
+ rmeta = receiver->metaObject();
switch (membcode) {
case QSLOT_CODE:
method_index = rmeta->indexOfSlot(method);
@@ -2740,7 +2753,9 @@ bool QObject::disconnect(const QObject *sender, const char *signal,
do {
int signal_index = -1;
if (signal) {
- signal_index = QMetaObjectPrivate::indexOfSignalRelative(&smeta, signal);
+ signal_index = QMetaObjectPrivate::indexOfSignalRelative(&smeta, signal, false);
+ if (signal_index < 0)
+ signal_index = QMetaObjectPrivate::indexOfSignalRelative(&smeta, signal, true);
if (signal_index < 0)
break;
signal_index = QMetaObjectPrivate::originalClone(smeta, signal_index);
@@ -3363,7 +3378,9 @@ int QObjectPrivate::signalIndex(const char *signalName) const
{
Q_Q(const QObject);
const QMetaObject *base = q->metaObject();
- int relative_index = QMetaObjectPrivate::indexOfSignalRelative(&base, signalName);
+ int relative_index = QMetaObjectPrivate::indexOfSignalRelative(&base, signalName, false);
+ if (relative_index < 0)
+ relative_index = QMetaObjectPrivate::indexOfSignalRelative(&base, signalName, true);
if (relative_index < 0)
return relative_index;
relative_index = QMetaObjectPrivate::originalClone(base, relative_index);
diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h
index 27ab10550f..cc5bf97007 100644
--- a/src/corelib/kernel/qobject_p.h
+++ b/src/corelib/kernel/qobject_p.h
@@ -189,8 +189,8 @@ public:
QList<QObject *> pendingChildInsertedEvents;
#else
// preserve binary compatibility with code compiled without Qt 3 support
- // ### why?
- QList<QObject *> unused;
+ // keeping the binary layout stable helps the Qt Creator debugger
+ void *unused;
#endif
QList<QPointer<QObject> > eventFilters;
diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h
index 8ed7f3f30e..b045c42096 100644
--- a/src/corelib/kernel/qobjectdefs.h
+++ b/src/corelib/kernel/qobjectdefs.h
@@ -271,6 +271,14 @@ public:
: QGenericArgument(aName, static_cast<const void *>(&aData))
{}
};
+template <class T>
+class QArgument<T &>: public QGenericArgument
+{
+public:
+ inline QArgument(const char *aName, T &aData)
+ : QGenericArgument(aName, static_cast<const void *>(&aData))
+ {}
+};
template <typename T>
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp
index e17c995aee..7650f6a5e0 100644
--- a/src/corelib/kernel/qtimer.cpp
+++ b/src/corelib/kernel/qtimer.cpp
@@ -339,8 +339,20 @@ QT_END_INCLUDE_NAMESPACE
void QTimer::singleShot(int msec, QObject *receiver, const char *member)
{
- if (receiver && member)
+ if (receiver && member) {
+ if (msec == 0) {
+ // special code shortpath for 0-timers
+ const char* bracketPosition = strchr(member, '(');
+ if (!bracketPosition || !(member[0] >= '0' && member[0] <= '3')) {
+ qWarning("QTimer::singleShot: Invalid slot specification");
+ return;
+ }
+ QByteArray methodName(member+1, bracketPosition - 1 - member); // extract method name
+ QMetaObject::invokeMethod(receiver, methodName.constData(), Qt::QueuedConnection);
+ return;
+ }
(void) new QSingleShotTimer(msec, receiver, member);
+ }
}
/*!
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 9a278bdd02..f5d7c0def1 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -46,6 +46,7 @@
#include "qdebug.h"
#include "qmap.h"
#include "qdatetime.h"
+#include "qeasingcurve.h"
#include "qlist.h"
#include "qstring.h"
#include "qstringlist.h"
@@ -146,6 +147,11 @@ static void construct(QVariant::Private *x, const void *copy)
v_construct<QRegExp>(x, copy);
break;
#endif
+#ifndef QT_BOOTSTRAPPED
+ case QVariant::EasingCurve:
+ v_construct<QEasingCurve>(x, copy);
+ break;
+#endif
case QVariant::Int:
x->data.i = copy ? *static_cast<const int *>(copy) : 0;
break;
@@ -259,6 +265,11 @@ static void clear(QVariant::Private *d)
v_clear<QRegExp>(d);
break;
#endif
+#ifndef QT_BOOTSTRAPPED
+ case QVariant::EasingCurve:
+ v_clear<QEasingCurve>(d);
+ break;
+#endif
case QVariant::LongLong:
case QVariant::ULongLong:
case QVariant::Double:
@@ -317,6 +328,9 @@ static bool isNull(const QVariant::Private *d)
case QVariant::PointF:
return v_cast<QPointF>(d)->isNull();
#endif
+#ifndef QT_BOOTSTRAPPED
+ case QVariant::EasingCurve:
+#endif
case QVariant::Url:
case QVariant::Locale:
case QVariant::RegExp:
@@ -435,6 +449,10 @@ static bool compare(const QVariant::Private *a, const QVariant::Private *b)
return *v_cast<QTime>(a) == *v_cast<QTime>(b);
case QVariant::DateTime:
return *v_cast<QDateTime>(a) == *v_cast<QDateTime>(b);
+#ifndef QT_BOOTSTRAPPED
+ case QVariant::EasingCurve:
+ return *v_cast<QEasingCurve>(a) == *v_cast<QEasingCurve>(b);
+#endif
case QVariant::ByteArray:
return *v_cast<QByteArray>(a) == *v_cast<QByteArray>(b);
case QVariant::BitArray:
@@ -1101,6 +1119,11 @@ static void streamDebug(QDebug dbg, const QVariant &v)
case QVariant::DateTime:
dbg.nospace() << v.toDateTime();
break;
+#ifndef QT_BOOTSTRAPPED
+ case QVariant::EasingCurve:
+ dbg.nospace() << v.toEasingCurve();
+ break;
+#endif
case QVariant::ByteArray:
dbg.nospace() << v.toByteArray();
break;
@@ -1269,6 +1292,7 @@ const QVariant::Handler *QVariant::handler = &qt_kernel_variant_handler;
\value Date a QDate
\value DateTime a QDateTime
\value Double a double
+ \value EasingCurve a QEasingCurve
\value Font a QFont
\value Hash a QVariantHash
\value Icon a QIcon
@@ -1487,6 +1511,13 @@ QVariant::QVariant(const char *val)
*/
/*!
+ \since 4.7
+ \fn QVariant::QVariant(const QEasingCurve &val)
+
+ Constructs a new variant with an easing curve value, \a val.
+*/
+
+/*!
\fn QVariant::QVariant(const QByteArray &val)
Constructs a new variant with a bytearray value, \a val.
@@ -1685,6 +1716,10 @@ QVariant::QVariant(const QTime &val)
{ d.is_null = false; d.type = Time; v_construct<QTime>(&d, val); }
QVariant::QVariant(const QDateTime &val)
{ d.is_null = false; d.type = DateTime; v_construct<QDateTime>(&d, val); }
+#ifndef QT_BOOTSTRAPPED
+QVariant::QVariant(const QEasingCurve &val)
+{ d.is_null = false; d.type = EasingCurve; v_construct<QEasingCurve>(&d, val); }
+#endif
QVariant::QVariant(const QList<QVariant> &list)
{ d.is_null = false; d.type = List; v_construct<QVariantList>(&d, list); }
QVariant::QVariant(const QMap<QString, QVariant> &map)
@@ -1874,7 +1909,7 @@ QVariant::Type QVariant::nameToType(const char *name)
}
#ifndef QT_NO_DATASTREAM
-enum { MapFromThreeCount = 35 };
+enum { MapFromThreeCount = 36 };
static const ushort map_from_three[MapFromThreeCount] =
{
QVariant::Invalid,
@@ -1911,7 +1946,8 @@ static const ushort map_from_three[MapFromThreeCount] =
QVariant::KeySequence,
QVariant::Pen,
QVariant::LongLong,
- QVariant::ULongLong
+ QVariant::ULongLong,
+ QVariant::EasingCurve
};
/*!
@@ -2169,6 +2205,22 @@ QDateTime QVariant::toDateTime() const
}
/*!
+ \since 4.7
+ \fn QEasingCurve QVariant::toEasingCurve() const
+
+ Returns the variant as a QEasingCurve if the variant has type() \l
+ EasingCurve; otherwise returns a default easing curve.
+
+ \sa canConvert(), convert()
+*/
+#ifndef QT_BOOTSTRAPPED
+QEasingCurve QVariant::toEasingCurve() const
+{
+ return qVariantToHelper<QEasingCurve>(d, EasingCurve, handler);
+}
+#endif
+
+/*!
\fn QByteArray QVariant::toByteArray() const
Returns the variant as a QByteArray if the variant has type() \l
@@ -2609,8 +2661,9 @@ static const quint32 qCanConvertMatrix[QVariant::LastCoreType + 1] =
/*QRegExp*/ 0,
-/*QHash*/ 0
+/*QHash*/ 0,
+/*QEasingCurve*/ 0
};
/*!
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index 1a9e43a4ca..cb2825c90a 100644
--- a/src/corelib/kernel/qvariant.h
+++ b/src/corelib/kernel/qvariant.h
@@ -60,6 +60,7 @@ class QBitArray;
class QDataStream;
class QDate;
class QDateTime;
+class QEasingCurve;
class QLine;
class QLineF;
class QLocale;
@@ -128,9 +129,10 @@ class Q_CORE_EXPORT QVariant
LineF = 24,
Point = 25,
PointF = 26,
- RegExp = 27,
+ RegExp = 27,
Hash = 28,
- LastCoreType = Hash,
+ EasingCurve = 29,
+ LastCoreType = EasingCurve,
// value 62 is internally reserved
#ifdef QT3_SUPPORT
@@ -219,6 +221,9 @@ class Q_CORE_EXPORT QVariant
#ifndef QT_NO_REGEXP
QVariant(const QRegExp &regExp);
#endif
+#ifndef QT_BOOTSTRAPPED
+ QVariant(const QEasingCurve &easing);
+#endif
QVariant(Qt::GlobalColor color);
QVariant& operator=(const QVariant &other);
@@ -280,6 +285,9 @@ class Q_CORE_EXPORT QVariant
#ifndef QT_NO_REGEXP
QRegExp toRegExp() const;
#endif
+#ifndef QT_BOOTSTRAPPED
+ QEasingCurve toEasingCurve() const;
+#endif
#ifdef QT3_SUPPORT
inline QT3_SUPPORT int &asInt();
@@ -581,8 +589,7 @@ template<typename T> inline T qvariant_cast(const QVariant &v)
template<> inline QVariant qvariant_cast<QVariant>(const QVariant &v)
{
- static const int vid = qRegisterMetaType<QVariant>("QVariant");
- if (vid == v.userType())
+ if (v.userType() == QMetaType::QVariant)
return *reinterpret_cast<const QVariant *>(v.constData());
return v;
}
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index f2c2384e3d..a2c575a7cf 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -630,6 +630,22 @@ bool QLibraryPrivate::isPlugin(QSettings *settings)
.arg((QT_VERSION & 0xff00) >> 8)
.arg(QLIBRARY_AS_DEBUG ? QLatin1String("debug") : QLatin1String("false"))
.arg(fileName);
+#ifdef Q_WS_MAC
+ // On Mac, add the application arch to the reg key in order to
+ // cache plugin information separately for each arch. This prevents
+ // Qt from wrongly caching plugin load failures when the archs
+ // don't match.
+#if defined(__x86_64__)
+ regkey += QLatin1String("-x86_64");
+#elif defined(__i386__)
+ regkey += QLatin1String("-i386");
+#elif defined(__ppc64__)
+ regkey += QLatin1String("-ppc64");
+#elif defined(__ppc__)
+ regkey += QLatin1String("-ppc");
+#endif
+#endif // Q_WS_MAC
+
QStringList reg;
#ifndef QT_NO_SETTINGS
if (!settings) {
diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp
index ec50ac8d6b..43df13acca 100644
--- a/src/corelib/thread/qmutex.cpp
+++ b/src/corelib/thread/qmutex.cpp
@@ -41,6 +41,7 @@
#include "qplatformdefs.h"
#include "qmutex.h"
+#include <qdebug.h>
#ifndef QT_NO_THREAD
#include "qatomic.h"
@@ -159,8 +160,7 @@ void QMutex::lock()
if (!isLocked) {
#ifndef QT_NO_DEBUG
if (d->owner == self)
- qWarning("QMutex::lock: Deadlock detected in thread %ld",
- long(d->owner));
+ qWarning() << "QMutex::lock: Deadlock detected in thread" << d->owner;
#endif
// didn't get the lock, wait for it
@@ -197,8 +197,7 @@ void QMutex::lock()
if (!isLocked) {
#ifndef QT_NO_DEBUG
if (d->owner == self)
- qWarning("QMutex::lock: Deadlock detected in thread %ld",
- long(d->owner));
+ qWarning() << "QMutex::lock: Deadlock detected in thread" << d->owner;
#endif
// didn't get the lock, wait for it
diff --git a/src/corelib/thread/qorderedmutexlocker_p.h b/src/corelib/thread/qorderedmutexlocker_p.h
index 7d52a294d3..702125c257 100644
--- a/src/corelib/thread/qorderedmutexlocker_p.h
+++ b/src/corelib/thread/qorderedmutexlocker_p.h
@@ -103,9 +103,11 @@ public:
mtx2->lock();
return true;
}
- mtx1->unlock();
- mtx2->lock();
- mtx1->lock();
+ if (!mtx2->tryLock()) {
+ mtx1->unlock();
+ mtx2->lock();
+ mtx1->lock();
+ }
return true;
}
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 556093ff8c..c5f70b0124 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -154,6 +154,10 @@ char *qstrcpy(char *dst, const char *src)
This function assumes that \a dst is at least \a len characters
long.
+ \note When compiling with Visual C++ compiler version 14.00
+ (Visual C++ 2005) or later, internally the function strncpy_s
+ will be used.
+
\sa qstrcpy()
*/
@@ -1061,6 +1065,11 @@ QByteArray &QByteArray::operator=(const char *str)
\internal
*/
+/*! \fn bool QByteArray::isSharedWith(const QByteArray &other) const
+
+ \internal
+*/
+
/*! \fn char QByteArray::at(int i) const
Returns the character at index position \a i in the byte array.
@@ -1799,7 +1808,20 @@ QByteArray &QByteArray::replace(int pos, int len, const QByteArray &after)
*/
QByteArray &QByteArray::replace(int pos, int len, const char *after)
{
- int alen = qstrlen(after);
+ return replace(pos,len,after,qstrlen(after));
+}
+
+/*! \fn QByteArray &QByteArray::replace(int pos, int len, const char *after, int alen)
+
+ \overload
+
+ Replaces \a len bytes from index position \a pos with \a alen bytes
+ from the string \a after. \a after is allowed to have '\0' characters.
+
+ \since 4.7
+*/
+QByteArray &QByteArray::replace(int pos, int len, const char *after, int alen)
+{
if (len == alen && (pos + len <= d->size)) {
detach();
memcpy(d->data + pos, after, len*sizeof(char));
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index ef977165a8..0b77512ef3 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -164,6 +164,7 @@ public:
inline const char *constData() const;
inline void detach();
bool isDetached() const;
+ inline bool isSharedWith(const QByteArray &other) const { return d == other.d; }
void clear();
#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
@@ -236,6 +237,7 @@ public:
QByteArray &insert(int i, const QByteArray &a);
QByteArray &remove(int index, int len);
QByteArray &replace(int index, int len, const char *s);
+ QByteArray &replace(int index, int len, const char *s, int alen);
QByteArray &replace(int index, int len, const QByteArray &s);
QByteArray &replace(char before, const char *after);
QByteArray &replace(char before, const QByteArray &after);
diff --git a/src/corelib/tools/qchar.cpp b/src/corelib/tools/qchar.cpp
index 08cb8631c3..2bc53479d2 100644
--- a/src/corelib/tools/qchar.cpp
+++ b/src/corelib/tools/qchar.cpp
@@ -42,10 +42,10 @@
// Don't define it while compiling this module, or USERS of Qt will
// not be able to link.
#ifdef QT_NO_CAST_FROM_ASCII
-#undef QT_NO_CAST_FROM_ASCII
+# undef QT_NO_CAST_FROM_ASCII
#endif
#ifdef QT_NO_CAST_TO_ASCII
-#undef QT_NO_CAST_TO_ASCII
+# undef QT_NO_CAST_TO_ASCII
#endif
#include "qchar.h"
#include "qdatastream.h"
@@ -57,17 +57,16 @@
QT_BEGIN_NAMESPACE
-#define LAST_UNICODE_CHAR 0x10ffff
-
#ifndef QT_NO_CODEC_FOR_C_STRINGS
-#ifdef QT_NO_TEXTCODEC
-#define QT_NO_CODEC_FOR_C_STRINGS
-#endif
+# ifdef QT_NO_TEXTCODEC
+# define QT_NO_CODEC_FOR_C_STRINGS
+# endif
#endif
#define FLAG(x) (1 << (x))
-/*! \class QLatin1Char
+/*!
+ \class QLatin1Char
\brief The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
\ingroup string-processing
@@ -550,7 +549,7 @@ bool QChar::isSpace() const
/*!
Returns true if the character is a mark (Mark_* categories);
otherwise returns false.
-
+
See QChar::Category for more information regarding marks.
*/
bool QChar::isMark() const
@@ -647,45 +646,44 @@ bool QChar::isSymbol() const
}
/*!
- \fn bool QChar::isHighSurrogate() const
+ \fn bool QChar::isHighSurrogate() const
- Returns true if the QChar is the high part of a utf16 surrogate
- (ie. if its code point is between 0xd800 and 0xdbff).
+ Returns true if the QChar is the high part of a utf16 surrogate
+ (ie. if its code point is between 0xd800 and 0xdbff).
*/
/*!
- \fn bool QChar::isLowSurrogate() const
+ \fn bool QChar::isLowSurrogate() const
- Returns true if the QChar is the low part of a utf16 surrogate
- (ie. if its code point is between 0xdc00 and 0xdfff).
+ Returns true if the QChar is the low part of a utf16 surrogate
+ (ie. if its code point is between 0xdc00 and 0xdfff).
*/
/*!
- \fn static uint QChar::surrogateToUcs4(ushort high, ushort low)
+ \fn static uint QChar::surrogateToUcs4(ushort high, ushort low)
- Converts a UTF16 surrogate pair with the given \a high and \a low values
- to its UCS-4 code point.
+ Converts a UTF16 surrogate pair with the given \a high and \a low values
+ to its UCS-4 code point.
*/
/*!
- \fn static uint QChar::surrogateToUcs4(QChar high, QChar low)
+ \fn static uint QChar::surrogateToUcs4(QChar high, QChar low)
- Converts a utf16 surrogate pair (\a high, \a low) to its ucs4 code
- point.
+ Converts a utf16 surrogate pair (\a high, \a low) to its ucs4 code point.
*/
/*!
- \fn static ushort QChar::highSurrogate(uint ucs4)
+ \fn static ushort QChar::highSurrogate(uint ucs4)
- Returns the high surrogate value of a ucs4 code point.
- The returned result is undefined if \a ucs4 is smaller than 0x10000.
+ Returns the high surrogate value of a ucs4 code point.
+ The returned result is undefined if \a ucs4 is smaller than 0x10000.
*/
/*!
- \fn static ushort QChar::lowSurrogate(uint ucs4)
+ \fn static ushort QChar::lowSurrogate(uint ucs4)
- Returns the low surrogate value of a ucs4 code point.
- The returned result is undefined if \a ucs4 is smaller than 0x10000.
+ Returns the low surrogate value of a ucs4 code point.
+ The returned result is undefined if \a ucs4 is smaller than 0x10000.
*/
/*!
@@ -714,7 +712,7 @@ int QChar::digitValue(ushort ucs2)
*/
int QChar::digitValue(uint ucs4)
{
- if (ucs4 > LAST_UNICODE_CHAR)
+ if (ucs4 > UNICODE_LAST_CODEPOINT)
return 0;
return qGetProp(ucs4)->digitValue;
}
@@ -727,22 +725,22 @@ QChar::Category QChar::category() const
return (QChar::Category) qGetProp(ucs)->category;
}
-/*!
+/*!
\overload
\since 4.3
Returns the category of the UCS-4-encoded character specified by \a ucs4.
- */
+*/
QChar::Category QChar::category(uint ucs4)
{
- if (ucs4 > LAST_UNICODE_CHAR)
+ if (ucs4 > UNICODE_LAST_CODEPOINT)
return QChar::NoCategory;
return (QChar::Category) qGetProp(ucs4)->category;
}
-/*!
+/*!
\overload
Returns the category of the UCS-2-encoded character specified by \a ucs2.
- */
+*/
QChar::Category QChar::category(ushort ucs2)
{
return (QChar::Category) qGetProp(ucs2)->category;
@@ -757,21 +755,21 @@ QChar::Direction QChar::direction() const
return (QChar::Direction) qGetProp(ucs)->direction;
}
-/*!
-\overload
-Returns the direction of the UCS-4-encoded character specified by \a ucs4.
- */
+/*!
+ \overload
+ Returns the direction of the UCS-4-encoded character specified by \a ucs4.
+*/
QChar::Direction QChar::direction(uint ucs4)
{
- if (ucs4 > LAST_UNICODE_CHAR)
+ if (ucs4 > UNICODE_LAST_CODEPOINT)
return QChar::DirL;
return (QChar::Direction) qGetProp(ucs4)->direction;
}
-/*!
-\overload
-Returns the direction of the UCS-2-encoded character specified by \a ucs2.
- */
+/*!
+ \overload
+ Returns the direction of the UCS-2-encoded character specified by \a ucs2.
+*/
QChar::Direction QChar::direction(ushort ucs2)
{
return (QChar::Direction) qGetProp(ucs2)->direction;
@@ -786,25 +784,25 @@ QChar::Joining QChar::joining() const
return (QChar::Joining) qGetProp(ucs)->joining;
}
-/*!
-\overload
-Returns information about the joining properties of the UCS-4-encoded
-character specified by \a ucs4 (needed for certain languages such as
-Arabic).
- */
+/*!
+ \overload
+ Returns information about the joining properties of the UCS-4-encoded
+ character specified by \a ucs4 (needed for certain languages such as
+ Arabic).
+*/
QChar::Joining QChar::joining(uint ucs4)
{
- if (ucs4 > LAST_UNICODE_CHAR)
+ if (ucs4 > UNICODE_LAST_CODEPOINT)
return QChar::OtherJoining;
return (QChar::Joining) qGetProp(ucs4)->joining;
}
-/*!
-\overload
-Returns information about the joining properties of the UCS-2-encoded
-character specified by \a ucs2 (needed for certain languages such as
-Arabic).
- */
+/*!
+ \overload
+ Returns information about the joining properties of the UCS-2-encoded
+ character specified by \a ucs2 (needed for certain languages such as
+ Arabic).
+*/
QChar::Joining QChar::joining(ushort ucs2)
{
return (QChar::Joining) qGetProp(ucs2)->joining;
@@ -863,26 +861,27 @@ QChar QChar::mirroredChar() const
return ucs + qGetProp(ucs)->mirrorDiff;
}
-/*! \overload
-Returns the mirrored character if the UCS-4-encoded character specified
-by \a ucs4 is a mirrored character; otherwise returns the character itself.
+/*!
+ \overload
+ Returns the mirrored character if the UCS-4-encoded character specified
+ by \a ucs4 is a mirrored character; otherwise returns the character itself.
-\sa hasMirrored()
- */
+ \sa hasMirrored()
+*/
uint QChar::mirroredChar(uint ucs4)
{
- if (ucs4 > LAST_UNICODE_CHAR)
+ if (ucs4 > UNICODE_LAST_CODEPOINT)
return ucs4;
return ucs4 + qGetProp(ucs4)->mirrorDiff;
}
-/*!
-\overload
-Returns the mirrored character if the UCS-2-encoded character specified
-by \a ucs2 is a mirrored character; otherwise returns the character itself.
+/*!
+ \overload
+ Returns the mirrored character if the UCS-2-encoded character specified
+ by \a ucs2 is a mirrored character; otherwise returns the character itself.
-\sa hasMirrored()
- */
+ \sa hasMirrored()
+*/
ushort QChar::mirroredChar(ushort ucs2)
{
return ucs2 + qGetProp(ucs2)->mirrorDiff;
@@ -906,7 +905,7 @@ static const unsigned short * QT_FASTCALL decompositionHelper
(uint ucs4, int *length, int *tag, unsigned short *buffer)
{
*length = 0;
- if (ucs4 > LAST_UNICODE_CHAR)
+ if (ucs4 > UNICODE_LAST_CODEPOINT)
return 0;
if (ucs4 >= Hangul_SBase && ucs4 < Hangul_SBase + Hangul_SCount) {
int SIndex = ucs4 - Hangul_SBase;
@@ -936,11 +935,11 @@ QString QChar::decomposition() const
return decomposition(ucs);
}
-/*!
-\overload
-Decomposes the UCS-4-encoded character specified by \a ucs4 into its
-constituent parts. Returns an empty string if no decomposition exists.
- */
+/*!
+ \overload
+ Decomposes the UCS-4-encoded character specified by \a ucs4 into its
+ constituent parts. Returns an empty string if no decomposition exists.
+*/
QString QChar::decomposition(uint ucs4)
{
unsigned short buffer[3];
@@ -959,14 +958,14 @@ QChar::Decomposition QChar::decompositionTag() const
return decompositionTag(ucs);
}
-/*!
-\overload
-Returns the tag defining the composition of the UCS-4-encoded character
-specified by \a ucs4. Returns QChar::Single if no decomposition exists.
- */
+/*!
+ \overload
+ Returns the tag defining the composition of the UCS-4-encoded character
+ specified by \a ucs4. Returns QChar::Single if no decomposition exists.
+*/
QChar::Decomposition QChar::decompositionTag(uint ucs4)
{
- if (ucs4 > LAST_UNICODE_CHAR)
+ if (ucs4 > UNICODE_LAST_CODEPOINT)
return QChar::NoDecomposition;
const unsigned short index = GET_DECOMPOSITION_INDEX(ucs4);
if (index == 0xffff)
@@ -987,27 +986,28 @@ unsigned char QChar::combiningClass() const
return (unsigned char) qGetProp(ucs)->combiningClass;
}
-/*! \overload
-Returns the combining class for the UCS-4-encoded character specified by
-\a ucs4, as defined in the Unicode standard.
- */
+/*!
+ \overload
+ Returns the combining class for the UCS-4-encoded character specified by
+ \a ucs4, as defined in the Unicode standard.
+*/
unsigned char QChar::combiningClass(uint ucs4)
{
- if (ucs4 > LAST_UNICODE_CHAR)
+ if (ucs4 > UNICODE_LAST_CODEPOINT)
return 0;
return (unsigned char) qGetProp(ucs4)->combiningClass;
}
-/*! \overload
-Returns the combining class for the UCS-2-encoded character specified by
-\a ucs2, as defined in the Unicode standard.
- */
+/*!
+ \overload
+ Returns the combining class for the UCS-2-encoded character specified by
+ \a ucs2, as defined in the Unicode standard.
+*/
unsigned char QChar::combiningClass(ushort ucs2)
{
return (unsigned char) qGetProp(ucs2)->combiningClass;
}
-
/*!
Returns the Unicode version that introduced this character.
*/
@@ -1016,21 +1016,23 @@ QChar::UnicodeVersion QChar::unicodeVersion() const
return (QChar::UnicodeVersion) qGetProp(ucs)->unicodeVersion;
}
-/*! \overload
-Returns the Unicode version that introduced the character specified in
-its UCS-4-encoded form as \a ucs4.
- */
+/*!
+ \overload
+ Returns the Unicode version that introduced the character specified in
+ its UCS-4-encoded form as \a ucs4.
+*/
QChar::UnicodeVersion QChar::unicodeVersion(uint ucs4)
{
- if (ucs4 > LAST_UNICODE_CHAR)
+ if (ucs4 > UNICODE_LAST_CODEPOINT)
return QChar::Unicode_Unassigned;
return (QChar::UnicodeVersion) qGetProp(ucs4)->unicodeVersion;
}
-/*! \overload
-Returns the Unicode version that introduced the character specified in
-its UCS-2-encoded form as \a ucs2.
- */
+/*!
+ \overload
+ Returns the Unicode version that introduced the character specified in
+ its UCS-2-encoded form as \a ucs2.
+*/
QChar::UnicodeVersion QChar::unicodeVersion(ushort ucs2)
{
return (QChar::UnicodeVersion) qGetProp(ucs2)->unicodeVersion;
@@ -1049,14 +1051,15 @@ QChar QChar::toLower() const
return ucs;
}
-/*! \overload
-Returns the lowercase equivalent of the UCS-4-encoded character specified
-by \a ucs4 if the character is uppercase or titlecase; otherwise returns
-the character itself.
- */
+/*!
+ \overload
+ Returns the lowercase equivalent of the UCS-4-encoded character specified
+ by \a ucs4 if the character is uppercase or titlecase; otherwise returns
+ the character itself.
+*/
uint QChar::toLower(uint ucs4)
{
- if (ucs4 > LAST_UNICODE_CHAR)
+ if (ucs4 > UNICODE_LAST_CODEPOINT)
return ucs4;
const QUnicodeTables::Properties *p = qGetProp(ucs4);
if (!p->lowerCaseSpecial)
@@ -1064,11 +1067,12 @@ uint QChar::toLower(uint ucs4)
return ucs4;
}
-/*! \overload
-Returns the lowercase equivalent of the UCS-2-encoded character specified
-by \a ucs2 if the character is uppercase or titlecase; otherwise returns
-the character itself.
- */
+/*!
+ \overload
+ Returns the lowercase equivalent of the UCS-2-encoded character specified
+ by \a ucs2 if the character is uppercase or titlecase; otherwise returns
+ the character itself.
+*/
ushort QChar::toLower(ushort ucs2)
{
const QUnicodeTables::Properties *p = qGetProp(ucs2);
@@ -1089,14 +1093,15 @@ QChar QChar::toUpper() const
return ucs;
}
-/*! \overload
-Returns the uppercase equivalent of the UCS-4-encoded character specified
-by \a ucs4 if the character is lowercase or titlecase; otherwise returns
-the character itself.
- */
+/*!
+ \overload
+ Returns the uppercase equivalent of the UCS-4-encoded character specified
+ by \a ucs4 if the character is lowercase or titlecase; otherwise returns
+ the character itself.
+*/
uint QChar::toUpper(uint ucs4)
{
- if (ucs4 > LAST_UNICODE_CHAR)
+ if (ucs4 > UNICODE_LAST_CODEPOINT)
return ucs4;
const QUnicodeTables::Properties *p = qGetProp(ucs4);
if (!p->upperCaseSpecial)
@@ -1104,11 +1109,12 @@ uint QChar::toUpper(uint ucs4)
return ucs4;
}
-/*! \overload
-Returns the uppercase equivalent of the UCS-2-encoded character specified
-by \a ucs2 if the character is lowercase or titlecase; otherwise returns
-the character itself.
- */
+/*!
+ \overload
+ Returns the uppercase equivalent of the UCS-2-encoded character specified
+ by \a ucs2 if the character is lowercase or titlecase; otherwise returns
+ the character itself.
+*/
ushort QChar::toUpper(ushort ucs2)
{
const QUnicodeTables::Properties *p = qGetProp(ucs2);
@@ -1137,7 +1143,7 @@ QChar QChar::toTitleCase() const
*/
uint QChar::toTitleCase(uint ucs4)
{
- if (ucs4 > LAST_UNICODE_CHAR)
+ if (ucs4 > UNICODE_LAST_CODEPOINT)
return ucs4;
const QUnicodeTables::Properties *p = qGetProp(ucs4);
if (!p->titleCaseSpecial)
@@ -1198,7 +1204,7 @@ QChar QChar::toCaseFolded() const
*/
uint QChar::toCaseFolded(uint ucs4)
{
- if (ucs4 > LAST_UNICODE_CHAR)
+ if (ucs4 > UNICODE_LAST_CODEPOINT)
return ucs4;
return ucs4 + qGetProp(ucs4)->caseFoldDiff;
}
@@ -1292,28 +1298,25 @@ QChar QChar::fromAscii(char c)
#ifndef QT_NO_DATASTREAM
/*!
- \relates QChar
-
- Writes the char \a chr to the stream \a out.
+ \relates QChar
- \sa {Format of the QDataStream operators}
- */
+ Writes the char \a chr to the stream \a out.
+ \sa {Format of the QDataStream operators}
+*/
QDataStream &operator<<(QDataStream &out, const QChar &chr)
{
out << quint16(chr.unicode());
return out;
}
-
/*!
- \relates QChar
-
- Reads a char from the stream \a in into char \a chr.
+ \relates QChar
- \sa {Format of the QDataStream operators}
- */
+ Reads a char from the stream \a in into char \a chr.
+ \sa {Format of the QDataStream operators}
+*/
QDataStream &operator>>(QDataStream &in, QChar &chr)
{
quint16 u;
@@ -1602,11 +1605,9 @@ int QT_FASTCALL QUnicodeTables::script(unsigned int uc)
return script;
}
-
Q_CORE_EXPORT QUnicodeTables::LineBreakClass QT_FASTCALL QUnicodeTables::lineBreakClass(uint ucs4)
{
return (QUnicodeTables::LineBreakClass) qGetProp(ucs4)->line_break_class;
}
-
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp
index b6a2df453d..9c65d5dd1b 100644
--- a/src/corelib/tools/qeasingcurve.cpp
+++ b/src/corelib/tools/qeasingcurve.cpp
@@ -600,11 +600,11 @@ QEasingCurve::QEasingCurve(Type type)
Construct a copy of \a other.
*/
QEasingCurve::QEasingCurve(const QEasingCurve &other)
-: d_ptr(new QEasingCurvePrivate)
+ : d_ptr(new QEasingCurvePrivate)
{
// ### non-atomic, requires malloc on shallow copy
*d_ptr = *other.d_ptr;
- if(other.d_ptr->config)
+ if (other.d_ptr->config)
d_ptr->config = other.d_ptr->config->copy();
}
@@ -629,7 +629,7 @@ QEasingCurve &QEasingCurve::operator=(const QEasingCurve &other)
}
*d_ptr = *other.d_ptr;
- if(other.d_ptr->config)
+ if (other.d_ptr->config)
d_ptr->config = other.d_ptr->config->copy();
return *this;
@@ -845,6 +845,67 @@ QDebug operator<<(QDebug debug, const QEasingCurve &item)
}
return debug;
}
-#endif
+#endif // QT_NO_DEBUG_STREAM
+
+#ifndef QT_NO_DATASTREAM
+/*!
+ \fn QDataStream &operator<<(QDataStream &stream, const QEasingCurve &easing)
+ \relates QEasingCurve
+
+ Writes the given \a easing curve to the given \a stream and returns a
+ reference to the stream.
+
+ \sa {Format of the QDataStream Operators}
+*/
+
+QDataStream &operator<<(QDataStream &stream, const QEasingCurve &easing)
+{
+ stream << quint8(easing.d_ptr->type);
+ stream << quint64(quintptr(easing.d_ptr->func));
+
+ bool hasConfig = easing.d_ptr->config;
+ stream << hasConfig;
+ if (hasConfig) {
+ stream << easing.d_ptr->config->_p;
+ stream << easing.d_ptr->config->_a;
+ stream << easing.d_ptr->config->_o;
+ }
+ return stream;
+}
+
+/*!
+ \fn QDataStream &operator>>(QDataStream &stream, QEasingCurve &easing)
+ \relates QQuaternion
+
+ Reads an easing curve from the given \a stream into the given \a
+ easing curve and returns a reference to the stream.
+
+ \sa {Format of the QDataStream Operators}
+*/
+
+QDataStream &operator>>(QDataStream &stream, QEasingCurve &easing)
+{
+ QEasingCurve::Type type;
+ quint8 int_type;
+ stream >> int_type;
+ type = static_cast<QEasingCurve::Type>(int_type);
+ easing.setType(type);
+
+ quint64 ptr_func;
+ stream >> ptr_func;
+ easing.d_ptr->func = QEasingCurve::EasingFunction(quintptr(ptr_func));
+
+ bool hasConfig;
+ stream >> hasConfig;
+ if (hasConfig) {
+ QEasingCurveFunction *config = curveToFunctionObject(type);
+ stream >> config->_p;
+ stream >> config->_a;
+ stream >> config->_o;
+ easing.d_ptr->config = config;
+ }
+ return stream;
+}
+#endif // QT_NO_DATASTREAM
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qeasingcurve.h b/src/corelib/tools/qeasingcurve.h
index ae8822ee57..173fba4f5b 100644
--- a/src/corelib/tools/qeasingcurve.h
+++ b/src/corelib/tools/qeasingcurve.h
@@ -100,13 +100,24 @@ public:
qreal valueForProgress(qreal progress) const;
private:
QEasingCurvePrivate *d_ptr;
+#ifndef QT_NO_DEBUG_STREAM
friend Q_CORE_EXPORT QDebug operator<<(QDebug debug, const QEasingCurve &item);
+#endif
+#ifndef QT_NO_DATASTREAM
+ friend Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QEasingCurve&);
+ friend Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QEasingCurve &);
+#endif
};
#ifndef QT_NO_DEBUG_STREAM
Q_CORE_EXPORT QDebug operator<<(QDebug debug, const QEasingCurve &item);
#endif
+#ifndef QT_NO_DATASTREAM
+Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QEasingCurve&);
+Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QEasingCurve &);
+#endif
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index 6231471f24..85a8b63115 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -64,13 +64,11 @@ QT_BEGIN_NAMESPACE
static uint hash(const uchar *p, int n)
{
uint h = 0;
- uint g;
while (n--) {
h = (h << 4) + *p++;
- g = h & 0xf0000000;
- h ^= g >> 23;
- h &= ~g;
+ h ^= (h & 0xf0000000) >> 23;
+ h &= 0x0fffffff;
}
return h;
}
@@ -78,13 +76,11 @@ static uint hash(const uchar *p, int n)
static uint hash(const QChar *p, int n)
{
uint h = 0;
- uint g;
while (n--) {
h = (h << 4) + (*p++).unicode();
- g = h & 0xf0000000;
- h ^= g >> 23;
- h &= ~g;
+ h ^= (h & 0xf0000000) >> 23;
+ h &= 0x0fffffff;
}
return h;
}
@@ -847,6 +843,11 @@ void QHashData::checkSanity()
\internal
*/
+/*! \fn bool QHash::isSharedWith(const QHash<Key, T> &other) const
+
+ \internal
+*/
+
/*! \fn void QHash::clear()
Removes all items from the hash.
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index 05eae42eff..3374c80bd6 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -299,6 +299,7 @@ public:
inline void detach() { if (d->ref != 1) detach_helper(); }
inline bool isDetached() const { return d->ref == 1; }
inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
+ inline bool isSharedWith(const QHash<Key, T> &other) const { return d == other.d; }
void clear();
@@ -624,6 +625,7 @@ template <class Key, class T>
Q_OUTOFLINE_TEMPLATE QList<Key> QHash<Key, T>::uniqueKeys() const
{
QList<Key> res;
+ res.reserve(size()); // May be too much, but assume short lifetime
const_iterator i = begin();
if (i != end()) {
for (;;) {
@@ -643,6 +645,7 @@ template <class Key, class T>
Q_OUTOFLINE_TEMPLATE QList<Key> QHash<Key, T>::keys() const
{
QList<Key> res;
+ res.reserve(size());
const_iterator i = begin();
while (i != end()) {
res.append(i.key());
@@ -687,6 +690,7 @@ template <class Key, class T>
Q_OUTOFLINE_TEMPLATE QList<T> QHash<Key, T>::values() const
{
QList<T> res;
+ res.reserve(size());
const_iterator i = begin();
while (i != end()) {
res.append(i.value());
diff --git a/src/corelib/tools/qlinkedlist.cpp b/src/corelib/tools/qlinkedlist.cpp
index 5a53c323c1..909d940e6f 100644
--- a/src/corelib/tools/qlinkedlist.cpp
+++ b/src/corelib/tools/qlinkedlist.cpp
@@ -197,6 +197,11 @@ QLinkedListData QLinkedListData::shared_null = {
\internal
*/
+/*! \fn bool QLinkedList::isSharedWith(const QLinkedList<T> &other) const
+
+ \internal
+*/
+
/*! \fn bool QLinkedList::isEmpty() const
Returns true if the list contains no items; otherwise returns
diff --git a/src/corelib/tools/qlinkedlist.h b/src/corelib/tools/qlinkedlist.h
index bfcf24f426..d145fe3a38 100644
--- a/src/corelib/tools/qlinkedlist.h
+++ b/src/corelib/tools/qlinkedlist.h
@@ -93,6 +93,7 @@ public:
{ if (d->ref != 1) detach_helper(); }
inline bool isDetached() const { return d->ref == 1; }
inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
+ inline bool isSharedWith(const QLinkedList<T> &other) const { return d == other.d; }
inline bool isEmpty() const { return d->size == 0; }
diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp
index c302857b20..6f5bb9b287 100644
--- a/src/corelib/tools/qlist.cpp
+++ b/src/corelib/tools/qlist.cpp
@@ -66,6 +66,53 @@ static int grow(int size)
return x;
}
+/*!
+ * Detaches the QListData by allocating new memory for a list which will be bigger
+ * than the copied one and is expected to grow further.
+ * *idx is the desired insertion point and is clamped to the actual size of the list.
+ * num is the number of new elements to insert at the insertion point.
+ * Returns the old (shared) data, it is up to the caller to deref() and free().
+ * For the new data node_copy needs to be called.
+ *
+ * \internal
+ */
+QListData::Data *QListData::detach_grow(int *idx, int num)
+{
+ Data *x = d;
+ int l = x->end - x->begin;
+ int nl = l + num;
+ int alloc = grow(nl);
+ Data* t = static_cast<Data *>(qMalloc(DataHeaderSize + alloc * sizeof(void *)));
+ Q_CHECK_PTR(t);
+
+ t->ref = 1;
+ t->sharable = true;
+ t->alloc = alloc;
+ // The space reservation algorithm's optimization is biased towards appending:
+ // Something which looks like an append will put the data at the beginning,
+ // while something which looks like a prepend will put it in the middle
+ // instead of at the end. That's based on the assumption that prepending
+ // is uncommon and even an initial prepend will eventually be followed by
+ // at least some appends.
+ int bg;
+ if (*idx < 0) {
+ *idx = 0;
+ bg = (alloc - nl) >> 1;
+ } else if (*idx > l) {
+ *idx = l;
+ bg = 0;
+ } else if (*idx < (l >> 1)) {
+ bg = (alloc - nl) >> 1;
+ } else {
+ bg = 0;
+ }
+ t->begin = bg;
+ t->end = bg + nl;
+ d = t;
+
+ return x;
+}
+
#if QT_VERSION >= 0x050000
# error "Remove QListData::detach(), it is only required for binary compatibility for 4.0.x to 4.2.x"
#endif
@@ -125,22 +172,23 @@ QListData::Data *QListData::detach2()
}
/*!
- * Detaches the QListData by reallocating new memory.
+ * Detaches the QListData by allocating new memory for a list which possibly
+ * has a different size than the copied one.
* Returns the old (shared) data, it is up to the caller to deref() and free()
* For the new data node_copy needs to be called.
*
* \internal
*/
-QListData::Data *QListData::detach3()
+QListData::Data *QListData::detach(int alloc)
{
Data *x = d;
- Data* t = static_cast<Data *>(qMalloc(DataHeaderSize + x->alloc * sizeof(void *)));
+ Data* t = static_cast<Data *>(qMalloc(DataHeaderSize + alloc * sizeof(void *)));
Q_CHECK_PTR(t);
t->ref = 1;
t->sharable = true;
- t->alloc = x->alloc;
- if (!t->alloc) {
+ t->alloc = alloc;
+ if (!alloc) {
t->begin = 0;
t->end = 0;
} else {
@@ -152,6 +200,21 @@ QListData::Data *QListData::detach3()
return x;
}
+/*!
+ * Detaches the QListData by reallocating new memory.
+ * Returns the old (shared) data, it is up to the caller to deref() and free()
+ * For the new data node_copy needs to be called.
+ *
+ * \internal
+ */
+#if QT_VERSION >= 0x050000
+# error "Remove QListData::detach3(), it is only required for binary compatibility for 4.5.x to 4.6.x"
+#endif
+QListData::Data *QListData::detach3()
+{
+ return detach(d->alloc);
+}
+
void QListData::realloc(int alloc)
{
Q_ASSERT(d->ref == 1);
@@ -164,22 +227,30 @@ void QListData::realloc(int alloc)
d->begin = d->end = 0;
}
-// ensures that enough space is available to append one element
-void **QListData::append()
+// ensures that enough space is available to append n elements
+void **QListData::append(int n)
{
Q_ASSERT(d->ref == 1);
- if (d->end == d->alloc) {
- int n = d->end - d->begin;
- if (d->begin > 2 * d->alloc / 3) {
+ int e = d->end;
+ if (e + n > d->alloc) {
+ int b = d->begin;
+ if (b - n >= 2 * d->alloc / 3) {
// we have enough space. Just not at the end -> move it.
- ::memcpy(d->array + n, d->array + d->begin, n * sizeof(void *));
- d->begin = n;
- d->end = n * 2;
+ e -= b;
+ ::memcpy(d->array, d->array + b, e * sizeof(void *));
+ d->begin = 0;
} else {
- realloc(grow(d->alloc + 1));
+ realloc(grow(d->alloc + n));
}
}
- return d->array + d->end++;
+ d->end = e + n;
+ return d->array + e;
+}
+
+// ensures that enough space is available to append one element
+void **QListData::append()
+{
+ return append(1);
}
// ensures that enough space is available to append the list
@@ -193,7 +264,7 @@ void **QListData::append(const QListData& l)
int n = l.d->end - l.d->begin;
if (n) {
if (e + n > d->alloc)
- realloc(grow(e + l.d->end - l.d->begin));
+ realloc(grow(e + n));
::memcpy(d->array + d->end, l.d->array + l.d->begin, n*sizeof(void*));
d->end += n;
}
@@ -203,15 +274,7 @@ void **QListData::append(const QListData& l)
// ensures that enough space is available to append the list
void **QListData::append2(const QListData& l)
{
- Q_ASSERT(d->ref == 1);
- int e = d->end;
- int n = l.d->end - l.d->begin;
- if (n) {
- if (e + n > d->alloc)
- realloc(grow(e + n));
- d->end += n;
- }
- return d->array + e;
+ return append(l.d->end - l.d->begin);
}
void **QListData::prepend()
@@ -237,11 +300,11 @@ void **QListData::insert(int i)
Q_ASSERT(d->ref == 1);
if (i <= 0)
return prepend();
- if (i >= d->end - d->begin)
+ int size = d->end - d->begin;
+ if (i >= size)
return append();
bool leftward = false;
- int size = d->end - d->begin;
if (d->begin == 0) {
if (d->end == d->alloc) {
@@ -599,6 +662,11 @@ void **QListData::erase(void **xi)
\internal
*/
+/*! \fn bool QList::isSharedWith(const QList<T> &other) const
+
+ \internal
+*/
+
/*! \fn bool QList::isEmpty() const
Returns true if the list contains no items; otherwise returns
@@ -642,6 +710,19 @@ void **QListData::erase(void **xi)
Same as at().
*/
+/*! \fn QList::reserve(int alloc)
+
+ Reserve space for \a alloc elements.
+
+ If \a alloc is smaller than the current size of the list, nothing will happen.
+
+ Use this function to avoid repetetive reallocation of QList's internal
+ data if you can predict how many elements will be appended.
+ Note that the reservation applies only to the internal pointer array.
+
+ \since 4.7
+*/
+
/*! \fn void QList::append(const T &value)
Inserts \a value at the end of the list.
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index 1ad752889a..c6dd106163 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -52,6 +52,7 @@
#endif
#include <new>
+#include <limits.h>
#include <string.h>
QT_BEGIN_HEADER
@@ -72,13 +73,16 @@ struct Q_CORE_EXPORT QListData {
};
enum { DataHeaderSize = sizeof(Data) - sizeof(void *) };
+ Data *detach(int alloc);
+ Data *detach_grow(int *i, int n);
Data *detach(); // remove in 5.0
Data *detach2(); // remove in 5.0
- Data *detach3();
+ Data *detach3(); // remove in 5.0
void realloc(int alloc);
static Data shared_null;
Data *d;
void **erase(void **xi);
+ void **append(int n);
void **append();
void **append(const QListData &l);
void **append2(const QListData &l); // remove in 5.0
@@ -94,6 +98,25 @@ struct Q_CORE_EXPORT QListData {
inline void **end() const { return d->array + d->end; }
};
+//////////////////////////////////////////////////////////////////////////////////
+//
+// QtPodForSize and QtPodForType are internal and may change or go away any time.
+// We mean it.
+//
+//////////////////////////////////////////////////////////////////////////////////
+template <int N> struct QtPodForSize {
+ // This base type is rather obviously broken and cannot be made
+ // working due to alignment constraints.
+ // This doesn't matter as far as QList is concerned, as we are
+ // using this type only for QTypeInfo<T>::isLarge == false.
+ typedef struct { } Type;
+};
+template <> struct QtPodForSize<1> { typedef quint8 Type; };
+template <> struct QtPodForSize<2> { typedef quint16 Type; };
+template <> struct QtPodForSize<4> { typedef quint32 Type; };
+template <> struct QtPodForSize<8> { typedef quint64 Type; };
+template <class T> struct QtPodForType : QtPodForSize<sizeof(T)> { };
+
template <typename T>
class QList
{
@@ -130,6 +153,7 @@ public:
inline bool isDetached() const { return d->ref == 1; }
inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
+ inline bool isSharedWith(const QList<T> &other) const { return d == other.d; }
inline bool isEmpty() const { return p.isEmpty(); }
@@ -139,6 +163,7 @@ public:
const T &operator[](int i) const;
T &operator[](int i);
+ void reserve(int size);
void append(const T &t);
void append(const QList<T> &t);
void prepend(const T &t);
@@ -330,6 +355,8 @@ public:
#endif
private:
+ Node *detach_helper_grow(int i, int n);
+ void detach_helper(int alloc);
void detach_helper();
void free(QListData::Data *d);
@@ -463,11 +490,21 @@ inline T QList<T>::takeLast()
{ T t = last(); removeLast(); return t; }
template <typename T>
+Q_OUTOFLINE_TEMPLATE void QList<T>::reserve(int alloc)
+{
+ if (d->alloc < alloc) {
+ if (d->ref != 1)
+ detach_helper(alloc);
+ else
+ p.realloc(alloc);
+ }
+}
+
+template <typename T>
Q_OUTOFLINE_TEMPLATE void QList<T>::append(const T &t)
{
- detach();
- if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
- Node *n = reinterpret_cast<Node *>(p.append());
+ if (d->ref != 1) {
+ Node *n = detach_helper_grow(INT_MAX, 1);
QT_TRY {
node_construct(n, t);
} QT_CATCH(...) {
@@ -475,13 +512,25 @@ Q_OUTOFLINE_TEMPLATE void QList<T>::append(const T &t)
QT_RETHROW;
}
} else {
- const T cpy(t);
- Node *n = reinterpret_cast<Node *>(p.append());
- QT_TRY {
- node_construct(n, cpy);
- } QT_CATCH(...) {
- --d->end;
- QT_RETHROW;
+ if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
+ Node *n = reinterpret_cast<Node *>(p.append());
+ QT_TRY {
+ node_construct(n, t);
+ } QT_CATCH(...) {
+ --d->end;
+ QT_RETHROW;
+ }
+ } else {
+ typedef typename QtPodForType<T>::Type PodNode;
+ PodNode cpy = *reinterpret_cast<const PodNode *>(&t);
+ Node *n = reinterpret_cast<Node *>(p.append());
+ QT_TRY {
+ void *ptr = &cpy;
+ node_construct(n, *reinterpret_cast<T *>(ptr));
+ } QT_CATCH(...) {
+ --d->end;
+ QT_RETHROW;
+ }
}
}
}
@@ -489,9 +538,8 @@ Q_OUTOFLINE_TEMPLATE void QList<T>::append(const T &t)
template <typename T>
inline void QList<T>::prepend(const T &t)
{
- detach();
- if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
- Node *n = reinterpret_cast<Node *>(p.prepend());
+ if (d->ref != 1) {
+ Node *n = detach_helper_grow(0, 1);
QT_TRY {
node_construct(n, t);
} QT_CATCH(...) {
@@ -499,13 +547,25 @@ inline void QList<T>::prepend(const T &t)
QT_RETHROW;
}
} else {
- const T cpy(t);
- Node *n = reinterpret_cast<Node *>(p.prepend());
- QT_TRY {
- node_construct(n, cpy);
- } QT_CATCH(...) {
- ++d->begin;
- QT_RETHROW;
+ if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
+ Node *n = reinterpret_cast<Node *>(p.prepend());
+ QT_TRY {
+ node_construct(n, t);
+ } QT_CATCH(...) {
+ ++d->begin;
+ QT_RETHROW;
+ }
+ } else {
+ typedef typename QtPodForType<T>::Type PodNode;
+ PodNode cpy = *reinterpret_cast<const PodNode *>(&t);
+ Node *n = reinterpret_cast<Node *>(p.prepend());
+ QT_TRY {
+ void *ptr = &cpy;
+ node_construct(n, *reinterpret_cast<T *>(ptr));
+ } QT_CATCH(...) {
+ ++d->begin;
+ QT_RETHROW;
+ }
}
}
}
@@ -513,9 +573,8 @@ inline void QList<T>::prepend(const T &t)
template <typename T>
inline void QList<T>::insert(int i, const T &t)
{
- detach();
- if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
- Node *n = reinterpret_cast<Node *>(p.insert(i));
+ if (d->ref != 1) {
+ Node *n = detach_helper_grow(i, 1);
QT_TRY {
node_construct(n, t);
} QT_CATCH(...) {
@@ -523,13 +582,25 @@ inline void QList<T>::insert(int i, const T &t)
QT_RETHROW;
}
} else {
- const T cpy(t);
- Node *n = reinterpret_cast<Node *>(p.insert(i));
- QT_TRY {
- node_construct(n, cpy);
- } QT_CATCH(...) {
- p.remove(i);
- QT_RETHROW;
+ if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
+ Node *n = reinterpret_cast<Node *>(p.insert(i));
+ QT_TRY {
+ node_construct(n, t);
+ } QT_CATCH(...) {
+ p.remove(i);
+ QT_RETHROW;
+ }
+ } else {
+ typedef typename QtPodForType<T>::Type PodNode;
+ PodNode cpy = *reinterpret_cast<const PodNode *>(&t);
+ Node *n = reinterpret_cast<Node *>(p.insert(i));
+ QT_TRY {
+ void *ptr = &cpy;
+ node_construct(n, *reinterpret_cast<T *>(ptr));
+ } QT_CATCH(...) {
+ p.remove(i);
+ QT_RETHROW;
+ }
}
}
}
@@ -539,12 +610,7 @@ inline void QList<T>::replace(int i, const T &t)
{
Q_ASSERT_X(i >= 0 && i < p.size(), "QList<T>::replace", "index out of range");
detach();
- if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
- reinterpret_cast<Node *>(p.at(i))->t() = t;
- } else {
- const T cpy(t);
- reinterpret_cast<Node *>(p.at(i))->t() = cpy;
- }
+ reinterpret_cast<Node *>(p.at(i))->t() = t;
}
template <typename T>
@@ -574,11 +640,20 @@ Q_OUTOFLINE_TEMPLATE QList<T> QList<T>::mid(int pos, int alength) const
alength = size() - pos;
if (pos == 0 && alength == size())
return *this;
- QList<T> cpy;
if (pos + alength > size())
alength = size() - pos;
- for (int i = pos; i < pos + alength; ++i)
- cpy += at(i);
+ QList<T> cpy;
+ cpy.reserve(alength);
+ cpy.d->end = alength;
+ QT_TRY {
+ cpy.node_copy(reinterpret_cast<Node *>(cpy.p.begin()),
+ reinterpret_cast<Node *>(cpy.p.end()),
+ reinterpret_cast<Node *>(p.begin() + pos));
+ } QT_CATCH(...) {
+ // restore the old end
+ cpy.d->end = 0;
+ QT_RETHROW;
+ }
return cpy;
}
@@ -598,10 +673,40 @@ Q_OUTOFLINE_TEMPLATE T QList<T>::value(int i, const T& defaultValue) const
}
template <typename T>
-Q_OUTOFLINE_TEMPLATE void QList<T>::detach_helper()
+Q_OUTOFLINE_TEMPLATE typename QList<T>::Node *QList<T>::detach_helper_grow(int i, int c)
{
Node *n = reinterpret_cast<Node *>(p.begin());
- QListData::Data *x = p.detach3();
+ QListData::Data *x = p.detach_grow(&i, c);
+ QT_TRY {
+ node_copy(reinterpret_cast<Node *>(p.begin()),
+ reinterpret_cast<Node *>(p.begin() + i), n);
+ } QT_CATCH(...) {
+ qFree(d);
+ d = x;
+ QT_RETHROW;
+ }
+ QT_TRY {
+ node_copy(reinterpret_cast<Node *>(p.begin() + i + c),
+ reinterpret_cast<Node *>(p.end()), n + i);
+ } QT_CATCH(...) {
+ node_destruct(reinterpret_cast<Node *>(p.begin()),
+ reinterpret_cast<Node *>(p.begin() + i));
+ qFree(d);
+ d = x;
+ QT_RETHROW;
+ }
+
+ if (!x->ref.deref())
+ free(x);
+
+ return reinterpret_cast<Node *>(p.begin() + i);
+}
+
+template <typename T>
+Q_OUTOFLINE_TEMPLATE void QList<T>::detach_helper(int alloc)
+{
+ Node *n = reinterpret_cast<Node *>(p.begin());
+ QListData::Data *x = p.detach(alloc);
QT_TRY {
node_copy(reinterpret_cast<Node *>(p.begin()), reinterpret_cast<Node *>(p.end()), n);
} QT_CATCH(...) {
@@ -615,6 +720,12 @@ Q_OUTOFLINE_TEMPLATE void QList<T>::detach_helper()
}
template <typename T>
+Q_OUTOFLINE_TEMPLATE void QList<T>::detach_helper()
+{
+ detach_helper(d->alloc);
+}
+
+template <typename T>
Q_OUTOFLINE_TEMPLATE QList<T>::~QList()
{
if (d && !d->ref.deref())
@@ -700,14 +811,22 @@ Q_OUTOFLINE_TEMPLATE typename QList<T>::iterator QList<T>::erase(typename QList<
template <typename T>
Q_OUTOFLINE_TEMPLATE QList<T> &QList<T>::operator+=(const QList<T> &l)
{
- detach();
- Node *n = reinterpret_cast<Node *>(p.append2(l.p));
- QT_TRY{
- node_copy(n, reinterpret_cast<Node *>(p.end()), reinterpret_cast<Node *>(l.p.begin()));
- } QT_CATCH(...) {
- // restore the old end
- d->end -= int(reinterpret_cast<Node *>(p.end()) - n);
- QT_RETHROW;
+ if (!l.isEmpty()) {
+ if (isEmpty()) {
+ *this = l;
+ } else {
+ Node *n = (d->ref != 1)
+ ? detach_helper_grow(INT_MAX, l.size())
+ : reinterpret_cast<Node *>(p.append2(l.p));
+ QT_TRY {
+ node_copy(n, reinterpret_cast<Node *>(p.end()),
+ reinterpret_cast<Node *>(l.p.begin()));
+ } QT_CATCH(...) {
+ // restore the old end
+ d->end -= int(reinterpret_cast<Node *>(p.end()) - n);
+ QT_RETHROW;
+ }
+ }
}
return *this;
}
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 8d79cb3d68..84bc154e82 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -465,7 +465,7 @@ static QString winToQtFormat(const QString &sys_fmt)
if (text == QLatin1String("'"))
result += QLatin1String("''");
else
- result += QLatin1Char('\'') + text + QLatin1Char('\'');
+ result += QString(QLatin1Char('\'') + text + QLatin1Char('\''));
continue;
}
@@ -681,8 +681,8 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const
case DateTimeFormatLong:
case DateTimeFormatShort:
- return query(type == DateTimeFormatLong ? DateFormatLong : DateFormatShort).toString()
- + QLatin1Char(' ') + query(type == DateTimeFormatLong ? TimeFormatLong : TimeFormatShort).toString();
+ return QString(query(type == DateTimeFormatLong ? DateFormatLong : DateFormatShort).toString()
+ + QLatin1Char(' ') + query(type == DateTimeFormatLong ? TimeFormatLong : TimeFormatShort).toString());
case DayNameLong:
case DayNameShort:
return winDayName(in.toInt(), (type == DayNameShort));
@@ -698,8 +698,8 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const
case DateTimeToStringShort:
case DateTimeToStringLong: {
const QDateTime dt = in.toDateTime();
- return winDateToString(dt.date(), type == DateTimeToStringShort ? DATE_SHORTDATE : DATE_LONGDATE)
- + QLatin1Char(' ') + winTimeToString(dt.time()); }
+ return QString(winDateToString(dt.date(), type == DateTimeToStringShort ? DATE_SHORTDATE : DATE_LONGDATE)
+ + QLatin1Char(' ') + winTimeToString(dt.time())); }
case ZeroDigit:
locale_info = LOCALE_SNATIVEDIGITS;
@@ -2917,7 +2917,7 @@ QDate QLocale::toDate(const QString &string, FormatType format) const
#ifndef QT_NO_DATESTRING
QDateTime QLocale::toDateTime(const QString &string, FormatType format) const
{
- return toDateTime(string, dateFormat(format));
+ return toDateTime(string, dateTimeFormat(format));
}
#endif
@@ -4293,6 +4293,7 @@ bool QLocalePrivate::validateChars(const QString &str, NumberMode numMode, QByte
const bool scientific = numMode == DoubleScientificMode;
bool lastWasE = false;
+ bool lastWasDigit = false;
int eCnt = 0;
int decPointCnt = 0;
bool dec = false;
@@ -4307,6 +4308,7 @@ bool QLocalePrivate::validateChars(const QString &str, NumberMode numMode, QByte
if (dec && decDigits != -1 && decDigits < ++decDigitCnt)
return false;
}
+ lastWasDigit = true;
} else {
switch (c) {
case '.':
@@ -4344,7 +4346,10 @@ bool QLocalePrivate::validateChars(const QString &str, NumberMode numMode, QByte
break;
case ',':
- return false;
+ //it can only be placed after a digit which is before the decimal point
+ if (!lastWasDigit || decPointCnt > 0)
+ return false;
+ break;
case 'e':
if (scientific) {
@@ -4362,10 +4367,12 @@ bool QLocalePrivate::validateChars(const QString &str, NumberMode numMode, QByte
// If it's not a valid digit, it shall be Invalid.
return false;
}
+ lastWasDigit = false;
}
lastWasE = c == 'e';
- buff->append(c);
+ if (c != ',')
+ buff->append(c);
}
return true;
diff --git a/src/corelib/tools/qlocale_symbian.cpp b/src/corelib/tools/qlocale_symbian.cpp
index b1a7caacd3..58e3ba853b 100644
--- a/src/corelib/tools/qlocale_symbian.cpp
+++ b/src/corelib/tools/qlocale_symbian.cpp
@@ -841,7 +841,7 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const
return symbianTimeFormat();
case DateTimeFormatLong:
case DateTimeFormatShort:
- return symbianDateFormat( (type == DateTimeFormatShort) ) + QLatin1Char(' ') + symbianTimeFormat();
+ return QString(symbianDateFormat( (type == DateTimeFormatShort) ) + QLatin1Char(' ') + symbianTimeFormat());
case DateToStringShort:
case DateToStringLong:
return symbianDateToString(in.toDate(), (type == DateToStringShort) );
@@ -851,8 +851,8 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const
case DateTimeToStringShort:
case DateTimeToStringLong: {
const QDateTime dt = in.toDateTime();
- return symbianDateToString(dt.date(), (type == DateTimeToStringShort) )
- + QLatin1Char(' ') + symbianTimeToString(dt.time());
+ return QString(symbianDateToString(dt.date(), (type == DateTimeToStringShort) )
+ + QLatin1Char(' ') + symbianTimeToString(dt.time()));
}
case MeasurementSystem:
return static_cast<int>(symbianMeasurementSystem());
diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp
index 82cbe78cd4..3143ee4081 100644
--- a/src/corelib/tools/qmap.cpp
+++ b/src/corelib/tools/qmap.cpp
@@ -473,6 +473,11 @@ void QMapData::dump()
\internal
*/
+/*! \fn bool QMap::isSharedWith(const QMap<Key, T> &other) const
+
+ \internal
+*/
+
/*! \fn void QMap::setInsertInOrder(bool sharable)
\internal
diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h
index 4679812cb4..df0ae460c3 100644
--- a/src/corelib/tools/qmap.h
+++ b/src/corelib/tools/qmap.h
@@ -182,6 +182,7 @@ public:
inline void detach() { if (d->ref != 1) detach_helper(); }
inline bool isDetached() const { return d->ref == 1; }
inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
+ inline bool isSharedWith(const QMap<Key, T> &other) const { return d == other.d; }
inline void setInsertInOrder(bool ordered) { d->insertInOrder = ordered; }
void clear();
@@ -772,6 +773,7 @@ template <class Key, class T>
Q_OUTOFLINE_TEMPLATE QList<Key> QMap<Key, T>::uniqueKeys() const
{
QList<Key> res;
+ res.reserve(size()); // May be too much, but assume short lifetime
const_iterator i = begin();
if (i != end()) {
for (;;) {
@@ -791,6 +793,7 @@ template <class Key, class T>
Q_OUTOFLINE_TEMPLATE QList<Key> QMap<Key, T>::keys() const
{
QList<Key> res;
+ res.reserve(size());
const_iterator i = begin();
while (i != end()) {
res.append(i.key());
@@ -835,6 +838,7 @@ template <class Key, class T>
Q_OUTOFLINE_TEMPLATE QList<T> QMap<Key, T>::values() const
{
QList<T> res;
+ res.reserve(size());
const_iterator i = begin();
while (i != end()) {
res.append(i.value());
diff --git a/src/corelib/tools/qpoint.cpp b/src/corelib/tools/qpoint.cpp
index d60087f7d7..9850ee786f 100644
--- a/src/corelib/tools/qpoint.cpp
+++ b/src/corelib/tools/qpoint.cpp
@@ -374,7 +374,7 @@ QDebug operator<<(QDebug dbg, const QPoint &p) {
QDebug operator<<(QDebug d, const QPointF &p)
{
d.nospace() << "QPointF(" << p.x() << ", " << p.y() << ')';
- return d;
+ return d.space();
}
#endif
diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp
index b9e273fbf4..eb104a87b0 100644
--- a/src/corelib/tools/qregexp.cpp
+++ b/src/corelib/tools/qregexp.cpp
@@ -1466,9 +1466,14 @@ void QRegExpMatchState::match(const QChar *str0, int len0, int pos0,
#ifndef QT_NO_REGEXP_CAPTURE
for (int i = 0; i < numCaptures; ++i) {
int j = eng->captureForOfficialCapture.at(i);
- int len = capEnd[j] - capBegin[j];
- *c++ = (len > 0) ? pos + capBegin[j] : 0;
- *c++ = len;
+ if (capBegin[j] != EmptyCapture) {
+ int len = capEnd[j] - capBegin[j];
+ *c++ = (len > 0) ? pos + capBegin[j] : 0;
+ *c++ = len;
+ } else {
+ *c++ = -1;
+ *c++ = -1;
+ }
}
#endif
} else {
diff --git a/src/corelib/tools/qset.h b/src/corelib/tools/qset.h
index b266deb8fe..fe50d4d5dd 100644
--- a/src/corelib/tools/qset.h
+++ b/src/corelib/tools/qset.h
@@ -291,6 +291,7 @@ template <typename T>
Q_OUTOFLINE_TEMPLATE QList<T> QSet<T>::toList() const
{
QList<T> result;
+ result.reserve(size());
typename QSet<T>::const_iterator i = constBegin();
while (i != constEnd()) {
result.append(*i);
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index 964b279da5..550ff58008 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -158,7 +158,7 @@ namespace QtSharedPointer {
#if defined(Q_NO_TEMPLATE_FRIENDS)
public:
#else
- template <class X> friend class QWeakPointer;
+ template <class X> friend class QT_PREPEND_NAMESPACE(QWeakPointer);
#endif
Type *value;
@@ -209,6 +209,7 @@ namespace QtSharedPointer {
inline bool destroy() { destroyer(this); return true; }
inline void operator delete(void *ptr) { ::operator delete(ptr); }
+ inline void operator delete(void *, void *) { }
};
// sizeof(ExternalRefCountWithDestroyFn) = 16 (32-bit) / 24 (64-bit)
@@ -401,7 +402,7 @@ namespace QtSharedPointer {
public:
#else
template <class X> friend class ExternalRefCount;
- template <class X> friend class QWeakPointer;
+ template <class X> friend class QT_PREPEND_NAMESPACE(QWeakPointer);
template <class X, class Y> friend QSharedPointer<X> copyAndSetPointer(X * ptr, const QSharedPointer<Y> &src);
#endif
@@ -653,6 +654,9 @@ public:
T *value;
};
+//
+// operator== and operator!=
+//
template <class T, class X>
bool operator==(const QSharedPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
{
@@ -674,7 +678,6 @@ bool operator==(const T *ptr1, const QSharedPointer<X> &ptr2)
{
return ptr1 == ptr2.data();
}
-
template <class T, class X>
bool operator!=(const QSharedPointer<T> &ptr1, const X *ptr2)
{
@@ -697,11 +700,54 @@ bool operator!=(const QSharedPointer<T> &ptr1, const QWeakPointer<X> &ptr2)
return ptr2 != ptr1;
}
+//
+// operator-
+//
template <class T, class X>
-Q_INLINE_TEMPLATE typename T::difference_type operator-(const QSharedPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
+Q_INLINE_TEMPLATE typename QSharedPointer<T>::difference_type operator-(const QSharedPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
{
return ptr1.data() - ptr2.data();
}
+template <class T, class X>
+Q_INLINE_TEMPLATE typename QSharedPointer<T>::difference_type operator-(const QSharedPointer<T> &ptr1, X *ptr2)
+{
+ return ptr1.data() - ptr2;
+}
+template <class T, class X>
+Q_INLINE_TEMPLATE typename QSharedPointer<X>::difference_type operator-(T *ptr1, const QSharedPointer<X> &ptr2)
+{
+ return ptr1 - ptr2.data();
+}
+
+//
+// operator<
+//
+template <class T, class X>
+Q_INLINE_TEMPLATE bool operator<(const QSharedPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
+{
+ return ptr1.data() < ptr2.data();
+}
+template <class T, class X>
+Q_INLINE_TEMPLATE bool operator<(const QSharedPointer<T> &ptr1, X *ptr2)
+{
+ return ptr1.data() < ptr2;
+}
+template <class T, class X>
+Q_INLINE_TEMPLATE bool operator<(T *ptr1, const QSharedPointer<X> &ptr2)
+{
+ return ptr1 < ptr2.data();
+}
+
+//
+// qHash
+//
+template <class T> inline uint qHash(const T *key); // defined in qhash.h
+template <class T>
+Q_INLINE_TEMPLATE uint qHash(const QSharedPointer<T> &ptr)
+{
+ return QT_PREPEND_NAMESPACE(qHash)<T>(ptr.data());
+}
+
template <class T>
Q_INLINE_TEMPLATE QWeakPointer<T> QSharedPointer<T>::toWeakRef() const
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
new file mode 100644
index 0000000000..52d2cea97b
--- /dev/null
+++ b/src/corelib/tools/qsimd.cpp
@@ -0,0 +1,246 @@
+/****************************************************************************
+**
+** 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 QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qsimd_p.h"
+#include <QByteArray>
+
+QT_BEGIN_NAMESPACE
+
+uint qDetectCPUFeatures()
+{
+ static uint features = 0xffffffff;
+ if (features != 0xffffffff)
+ return features;
+
+#if defined (Q_OS_WINCE)
+#if defined (ARM)
+ if (IsProcessorFeaturePresent(PF_ARM_INTEL_WMMX)) {
+ features = IWMMXT;
+ return features;
+ }
+#elif defined(_X86_)
+ features = 0;
+#if defined QT_HAVE_MMX
+ if (IsProcessorFeaturePresent(PF_MMX_INSTRUCTIONS_AVAILABLE))
+ features |= MMX;
+#endif
+#if defined QT_HAVE_3DNOW
+ if (IsProcessorFeaturePresent(PF_3DNOW_INSTRUCTIONS_AVAILABLE))
+ features |= MMX3DNOW;
+#endif
+ return features;
+#endif
+ features = 0;
+ return features;
+#elif defined(QT_HAVE_IWMMXT)
+ // runtime detection only available when running as a previlegied process
+ static const bool doIWMMXT = !qgetenv("QT_NO_IWMMXT").toInt();
+ features = doIWMMXT ? IWMMXT : 0;
+ return features;
+#elif defined(QT_HAVE_NEON)
+ static const bool doNEON = !qgetenv("QT_NO_NEON").toInt();
+ features = doNEON ? NEON : 0;
+ return features;
+#else
+ features = 0;
+#if defined(__x86_64__) || defined(Q_OS_WIN64)
+ features = MMX|SSE|SSE2|CMOV;
+#elif defined(__ia64__)
+ features = MMX|SSE|SSE2;
+#elif defined(__i386__) || defined(_M_IX86)
+ unsigned int extended_result = 0;
+ uint result = 0;
+ /* see p. 118 of amd64 instruction set manual Vol3 */
+#if defined(Q_CC_GNU)
+ asm ("push %%ebx\n"
+ "pushf\n"
+ "pop %%eax\n"
+ "mov %%eax, %%ebx\n"
+ "xor $0x00200000, %%eax\n"
+ "push %%eax\n"
+ "popf\n"
+ "pushf\n"
+ "pop %%eax\n"
+ "xor %%edx, %%edx\n"
+ "xor %%ebx, %%eax\n"
+ "jz 1f\n"
+
+ "mov $0x00000001, %%eax\n"
+ "cpuid\n"
+ "1:\n"
+ "pop %%ebx\n"
+ "mov %%edx, %0\n"
+ : "=r" (result)
+ :
+ : "%eax", "%ecx", "%edx"
+ );
+
+ asm ("push %%ebx\n"
+ "pushf\n"
+ "pop %%eax\n"
+ "mov %%eax, %%ebx\n"
+ "xor $0x00200000, %%eax\n"
+ "push %%eax\n"
+ "popf\n"
+ "pushf\n"
+ "pop %%eax\n"
+ "xor %%edx, %%edx\n"
+ "xor %%ebx, %%eax\n"
+ "jz 2f\n"
+
+ "mov $0x80000000, %%eax\n"
+ "cpuid\n"
+ "cmp $0x80000000, %%eax\n"
+ "jbe 2f\n"
+ "mov $0x80000001, %%eax\n"
+ "cpuid\n"
+ "2:\n"
+ "pop %%ebx\n"
+ "mov %%edx, %0\n"
+ : "=r" (extended_result)
+ :
+ : "%eax", "%ecx", "%edx"
+ );
+#elif defined (Q_OS_WIN)
+ _asm {
+ push eax
+ push ebx
+ push ecx
+ push edx
+ pushfd
+ pop eax
+ mov ebx, eax
+ xor eax, 00200000h
+ push eax
+ popfd
+ pushfd
+ pop eax
+ mov edx, 0
+ xor eax, ebx
+ jz skip
+
+ mov eax, 1
+ cpuid
+ mov result, edx
+ skip:
+ pop edx
+ pop ecx
+ pop ebx
+ pop eax
+ }
+
+ _asm {
+ push eax
+ push ebx
+ push ecx
+ push edx
+ pushfd
+ pop eax
+ mov ebx, eax
+ xor eax, 00200000h
+ push eax
+ popfd
+ pushfd
+ pop eax
+ mov edx, 0
+ xor eax, ebx
+ jz skip2
+
+ mov eax, 80000000h
+ cpuid
+ cmp eax, 80000000h
+ jbe skip2
+ mov eax, 80000001h
+ cpuid
+ mov extended_result, edx
+ skip2:
+ pop edx
+ pop ecx
+ pop ebx
+ pop eax
+ }
+#endif
+
+ // result now contains the standard feature bits
+ if (result & (1u << 15))
+ features |= CMOV;
+ if (result & (1u << 23))
+ features |= MMX;
+ if (extended_result & (1u << 22))
+ features |= MMXEXT;
+ if (extended_result & (1u << 31))
+ features |= MMX3DNOW;
+ if (extended_result & (1u << 30))
+ features |= MMX3DNOWEXT;
+ if (result & (1u << 25))
+ features |= SSE;
+ if (result & (1u << 26))
+ features |= SSE2;
+#endif // i386
+
+#if defined(QT_HAVE_MMX)
+ if (qgetenv("QT_NO_MMX").toInt())
+ features ^= MMX;
+#endif
+ if (qgetenv("QT_NO_MMXEXT").toInt())
+ features ^= MMXEXT;
+
+#if defined(QT_HAVE_3DNOW)
+ if (qgetenv("QT_NO_3DNOW").toInt())
+ features ^= MMX3DNOW;
+#endif
+ if (qgetenv("QT_NO_3DNOWEXT").toInt())
+ features ^= MMX3DNOWEXT;
+
+#if defined(QT_HAVE_SSE)
+ if (qgetenv("QT_NO_SSE").toInt())
+ features ^= SSE;
+#endif
+#if defined(QT_HAVE_SSE2)
+ if (qgetenv("QT_NO_SSE2").toInt())
+ features ^= SSE2;
+#endif
+
+ return features;
+#endif
+}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
new file mode 100644
index 0000000000..c69dd09948
--- /dev/null
+++ b/src/corelib/tools/qsimd_p.h
@@ -0,0 +1,128 @@
+/****************************************************************************
+**
+** 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 QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QSIMD_P_H
+#define QSIMD_P_H
+
+#include <qglobal.h>
+
+
+QT_BEGIN_HEADER
+
+
+#if defined(QT_NO_MAC_XARCH) || (defined(Q_OS_DARWIN) && (defined(__ppc__) || defined(__ppc64__)))
+// Disable MMX and SSE on Mac/PPC builds, or if the compiler
+// does not support -Xarch argument passing
+#undef QT_HAVE_SSE2
+#undef QT_HAVE_SSE
+#undef QT_HAVE_3DNOW
+#undef QT_HAVE_MMX
+#endif
+
+// SSE intrinsics
+#if defined(__SSE2__) && defined(QT_HAVE_SSE2) && !defined(QT_BOOTSTRAPPED)
+#if defined(QT_LINUXBASE)
+/// this is an evil hack - the posix_memalign declaration in LSB
+/// is wrong - see http://bugs.linuxbase.org/show_bug.cgi?id=2431
+# define posix_memalign _lsb_hack_posix_memalign
+# include <emmintrin.h>
+# undef posix_memalign
+#else
+# include <emmintrin.h>
+#endif
+
+#define QT_ALWAYS_HAVE_SSE2
+#endif
+
+// NEON intrinsics
+#if defined(QT_HAVE_NEON)
+#include <arm_neon.h>
+#endif
+
+
+// IWMMXT intrinsics
+#if defined(QT_HAVE_IWMMXT)
+#include <mmintrin.h>
+#if defined(Q_OS_WINCE)
+# include "qplatformdefs.h"
+#endif
+#endif
+
+#if defined(QT_HAVE_IWMMXT)
+#if !defined(__IWMMXT__) && !defined(Q_OS_WINCE)
+# include <xmmintrin.h>
+#elif defined(Q_OS_WINCE_STD) && defined(_X86_)
+# pragma warning(disable: 4391)
+# include <xmmintrin.h>
+#endif
+#endif
+
+// 3D now intrinsics
+#if defined(QT_HAVE_3DNOW)
+#include <mm3dnow.h>
+#endif
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Core)
+
+enum CPUFeatures {
+ None = 0,
+ MMX = 0x1,
+ MMXEXT = 0x2,
+ MMX3DNOW = 0x4,
+ MMX3DNOWEXT = 0x8,
+ SSE = 0x10,
+ SSE2 = 0x20,
+ CMOV = 0x40,
+ IWMMXT = 0x80,
+ NEON = 0x100
+};
+
+Q_CORE_EXPORT uint qDetectCPUFeatures();
+
+Q_CORE_EXPORT uint qDetectCPUFeatures();
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QSIMD_P_H
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 03bc0534b6..b54315c438 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -46,6 +46,7 @@
#include <qtextcodec.h>
#endif
#include <private/qutfcodec_p.h>
+#include "qsimd_p.h"
#include <qdatastream.h>
#include <qlist.h>
#include "qlocale.h"
@@ -55,6 +56,7 @@
#include "qtools_p.h"
#include "qhash.h"
#include "qdebug.h"
+#include "qendian.h"
#ifdef Q_OS_MAC
#include <private/qcore_mac_p.h>
@@ -333,7 +335,7 @@ const QString::Null QString::null = { };
\macro QT_NO_CAST_TO_ASCII
\relates QString
- disables automatic conversion from QString to ASCII 8-bit strings (char *)
+ disables automatic conversion from QString to 8-bit strings (char *)
\sa QT_NO_CAST_FROM_ASCII, QT_NO_CAST_FROM_BYTEARRAY
*/
@@ -389,10 +391,10 @@ const QString::Null QString::null = { };
with code values above 65535 are stored using surrogate pairs,
i.e., two consecutive \l{QChar}s.)
- \l{Unicode} is an international standard that supports most of
- the writing systems in use today. It is a superset of ASCII and
- Latin-1 (ISO 8859-1), and all the ASCII/Latin-1 characters are
- available at the same code positions.
+ \l{Unicode} is an international standard that supports most of the
+ writing systems in use today. It is a superset of US-ASCII (ANSI
+ X3.4-1986) and Latin-1 (ISO 8859-1), and all the US-ASCII/Latin-1
+ characters are available at the same code positions.
Behind the scenes, QString uses \l{implicit sharing}
(copy-on-write) to reduce memory usage and to avoid the needless
@@ -560,11 +562,13 @@ const QString::Null QString::null = { };
toLatin1(), toUtf8(), and toLocal8Bit().
\list
- \o toAscii() returns an ASCII encoded 8-bit string.
+ \o toAscii() returns an 8-bit string encoded using the codec
+ specified by QTextCodec::codecForCStrings (by default, that is
+ Latin 1).
\o toLatin1() returns a Latin-1 (ISO 8859-1) encoded 8-bit string.
\o toUtf8() returns a UTF-8 encoded 8-bit string. UTF-8 is a
- superset of ASCII that supports the entire Unicode character
- set through multibyte sequences.
+ superset of US-ASCII (ANSI X3.4-1986) that supports the entire
+ Unicode character set through multibyte sequences.
\o toLocal8Bit() returns an 8-bit string using the system's local
encoding.
\endlist
@@ -576,7 +580,7 @@ const QString::Null QString::null = { };
As mentioned above, QString provides a lot of functions and
operators that make it easy to interoperate with \c{const char *}
strings. But this functionality is a double-edged sword: It makes
- QString more convenient to use if all strings are ASCII or
+ QString more convenient to use if all strings are US-ASCII or
Latin-1, but there is always the risk that an implicit conversion
from or to \c{const char *} is done using the wrong 8-bit
encoding. To minimize these risks, you can turn off these implicit
@@ -584,9 +588,9 @@ const QString::Null QString::null = { };
\list
\o \c QT_NO_CAST_FROM_ASCII disables automatic conversions from
- ASCII to Unicode.
+ C string literals and pointers to Unicode.
\o \c QT_NO_CAST_TO_ASCII disables automatic conversion from QString
- to ASCII.
+ to C strings.
\endlist
One way to define these preprocessor symbols globally for your
@@ -835,7 +839,7 @@ int QString::grow(int size)
/*! \fn QString::QString(const char *str)
- Constructs a string initialized with the ASCII string \a str. The
+ Constructs a string initialized with the 8-bit string \a str. The
given const char pointer is converted to Unicode using the
fromAscii() function.
@@ -988,6 +992,40 @@ QString::QString(const QChar *unicode, int size)
}
}
+/*!
+ \since 4.7
+
+ Constructs a string initialized with the characters of the QChar array
+ \a unicode, which must be terminated with a 0.
+
+ QString makes a deep copy of the string data. The unicode data is copied as
+ is and the Byte Order Mark is preserved if present.
+*/
+QString::QString(const QChar *unicode)
+{
+ if (!unicode) {
+ d = &shared_null;
+ d->ref.ref();
+ } else {
+ int size = 0;
+ while (unicode[size] != 0)
+ ++size;
+ if (!size) {
+ d = &shared_empty;
+ d->ref.ref();
+ } else {
+ d = (Data*) qMalloc(sizeof(Data)+size*sizeof(QChar));
+ Q_CHECK_PTR(d);
+ d->ref = 1;
+ d->alloc = d->size = size;
+ d->clean = d->asciiCache = d->simpletext = d->righttoleft = d->capacity = 0;
+ d->data = d->array;
+ memcpy(d->array, unicode, size * sizeof(QChar));
+ d->array[size] = '\0';
+ }
+ }
+}
+
/*!
Constructs a string of the given \a size with every character set
@@ -1091,7 +1129,12 @@ QString::QString(QChar ch)
\internal
*/
-/*! \fn void QString::isDetached() const
+/*! \fn bool QString::isDetached() const
+
+ \internal
+*/
+
+/*! \fn bool QString::isSharedWith(const QString &other) const
\internal
*/
@@ -1296,8 +1339,9 @@ QString &QString::operator=(const QString &other)
\overload operator=()
- Assigns \a ba to this string. The byte array is converted to
- Unicode using the fromAscii() function.
+ Assigns \a ba to this string. The byte array is converted to Unicode
+ using the fromAscii() function. This function stops conversion at the
+ first NUL character found, or the end of the \a ba byte array.
You can disable this operator by defining \c
QT_NO_CAST_FROM_ASCII when you compile your applications. This
@@ -1760,13 +1804,14 @@ void QString::replace_helper(uint *indices, int nIndices, int blen, const QChar
}
QT_TRY {
- detach();
if (blen == alen) {
// replace in place
+ detach();
for (int i = 0; i < nIndices; ++i)
memcpy(d->data + indices[i], afterBuffer, alen * sizeof(QChar));
} else if (alen < blen) {
// replace from front
+ detach();
uint to = indices[0];
if (alen)
memcpy(d->data+to, after, alen*sizeof(QChar));
@@ -2089,7 +2134,8 @@ bool QString::operator==(const QLatin1String &other) const
\overload operator==()
The \a other byte array is converted to a QString using the
- fromAscii() function.
+ fromAscii() function. This function stops conversion at the
+ first NUL character found, or the end of the byte array.
You can disable this operator by defining \c
QT_NO_CAST_FROM_ASCII when you compile your applications. This
@@ -2150,7 +2196,8 @@ bool QString::operator<(const QLatin1String &other) const
\overload operator<()
The \a other byte array is converted to a QString using the
- fromAscii() function.
+ fromAscii() function. If any NUL characters ('\0') are embedded
+ in the byte array, they will be included in the transformation.
You can disable this operator by defining \c
QT_NO_CAST_FROM_ASCII when you compile your applications. This
@@ -2192,7 +2239,8 @@ bool QString::operator<(const QLatin1String &other) const
\overload operator<=()
The \a other byte array is converted to a QString using the
- fromAscii() function.
+ fromAscii() function. If any NUL characters ('\0') are embedded
+ in the byte array, they will be included in the transformation.
You can disable this operator by defining \c
QT_NO_CAST_FROM_ASCII when you compile your applications. This
@@ -2250,7 +2298,8 @@ bool QString::operator>(const QLatin1String &other) const
\overload operator>()
The \a other byte array is converted to a QString using the
- fromAscii() function.
+ fromAscii() function. If any NUL characters ('\0') are embedded
+ in the byte array, they will be included in the transformation.
You can disable this operator by defining \c
QT_NO_CAST_FROM_ASCII when you compile your applications. This
@@ -2292,7 +2341,8 @@ bool QString::operator>(const QLatin1String &other) const
\overload operator>=()
The \a other byte array is converted to a QString using the
- fromAscii() function.
+ fromAscii() function. If any NUL characters ('\0') are embedded in
+ the byte array, they will be included in the transformation.
You can disable this operator by defining \c QT_NO_CAST_FROM_ASCII
when you compile your applications. This can be useful if you want
@@ -2307,10 +2357,10 @@ bool QString::operator>(const QLatin1String &other) const
The \a other const char pointer is converted to a QString using
the fromAscii() function.
- You can disable this operator by defining \c
- QT_NO_CAST_FROM_ASCII when you compile your applications. This
- can be useful if you want to ensure that all user-visible strings
- go through QObject::tr(), for example.
+ You can disable this operator by defining \c QT_NO_CAST_FROM_ASCII
+ when you compile your applications. This can be useful if you want
+ to ensure that all user-visible strings go through QObject::tr(),
+ for example.
*/
/*! \fn bool QString::operator!=(const QString &other) const
@@ -2334,7 +2384,8 @@ bool QString::operator>(const QLatin1String &other) const
\overload operator!=()
The \a other byte array is converted to a QString using the
- fromAscii() function.
+ fromAscii() function. If any NUL characters ('\0') are embedded
+ in the byte array, they will be included in the transformation.
You can disable this operator by defining \c QT_NO_CAST_FROM_ASCII
when you compile your applications. This can be useful if you want
@@ -3438,12 +3489,82 @@ static QByteArray toLatin1_helper(const QChar *data, int length)
QByteArray ba;
if (length) {
ba.resize(length);
- const ushort *i = reinterpret_cast<const ushort *>(data);
- const ushort *e = i + length;
- uchar *s = (uchar*) ba.data();
- while (i != e) {
- *s++ = (*i>0xff) ? '?' : (uchar) *i;
- ++i;
+ const ushort *src = reinterpret_cast<const ushort *>(data);
+ uchar *dst = (uchar*) ba.data();
+#if defined(QT_ALWAYS_HAVE_SSE2)
+ if (length >= 16) {
+ const int chunkCount = length >> 4; // divided by 16
+ const __m128i questionMark = _mm_set1_epi16('?');
+ // SSE has no compare instruction for unsigned comparison.
+ // The variables must be shiffted + 0x8000 to be compared
+ const __m128i signedBitOffset = _mm_set1_epi16(0x8000);
+ const __m128i thresholdMask = _mm_set1_epi16(0xff + 0x8000);
+ for (int i = 0; i < chunkCount; ++i) {
+ __m128i chunk1 = _mm_loadu_si128((__m128i*)src); // load
+ src += 8;
+ {
+ // each 16 bit is equal to 0xFF if the source is outside latin 1 (>0xff)
+ const __m128i signedChunk = _mm_add_epi16(chunk1, signedBitOffset);
+ const __m128i offLimitMask = _mm_cmpgt_epi16(signedChunk, thresholdMask);
+
+ // offLimitQuestionMark contains '?' for each 16 bits that was off-limit
+ // the 16 bits that were correct contains zeros
+ const __m128i offLimitQuestionMark = _mm_and_si128(offLimitMask, questionMark);
+
+ // correctBytes contains the bytes that were in limit
+ // the 16 bits that were off limits contains zeros
+ const __m128i correctBytes = _mm_andnot_si128(offLimitMask, chunk1);
+
+ // merge offLimitQuestionMark and correctBytes to have the result
+ chunk1 = _mm_or_si128(correctBytes, offLimitQuestionMark);
+ }
+
+ __m128i chunk2 = _mm_loadu_si128((__m128i*)src); // load
+ src += 8;
+ {
+ // exactly the same operations as for the previous chunk of data
+ const __m128i signedChunk = _mm_add_epi16(chunk2, signedBitOffset);
+ const __m128i offLimitMask = _mm_cmpgt_epi16(signedChunk, thresholdMask);
+ const __m128i offLimitQuestionMark = _mm_and_si128(offLimitMask, questionMark);
+ const __m128i correctBytes = _mm_andnot_si128(offLimitMask, chunk2);
+ chunk2 = _mm_or_si128(correctBytes, offLimitQuestionMark);
+ }
+
+ // pack the two vector to 16 x 8bits elements
+ const __m128i result = _mm_packus_epi16(chunk1, chunk2);
+
+ _mm_storeu_si128((__m128i*)dst, result); // store
+ dst += 16;
+ }
+ length = length % 16;
+ }
+#elif QT_HAVE_NEON
+ // Refer to the documentation of the SSE2 implementation
+ // this use eactly the same method as for SSE except:
+ // 1) neon has unsigned comparison
+ // 2) packing is done to 64 bits (8 x 8bits component).
+ if (length >= 16) {
+ const int chunkCount = length >> 3; // divided by 8
+ const uint16x8_t questionMark = vdupq_n_u16('?'); // set
+ const uint16x8_t thresholdMask = vdupq_n_u16(0xff); // set
+ for (int i = 0; i < chunkCount; ++i) {
+ uint16x8_t chunk = vld1q_u16((uint16_t *)src); // load
+ src += 8;
+
+ const uint16x8_t offLimitMask = vcgtq_u16(chunk, thresholdMask); // chunk > thresholdMask
+ const uint16x8_t offLimitQuestionMark = vandq_u16(offLimitMask, questionMark); // offLimitMask & questionMark
+ const uint16x8_t correctBytes = vbicq_u16(chunk, offLimitMask); // !offLimitMask & chunk
+ chunk = vorrq_u16(correctBytes, offLimitQuestionMark); // correctBytes | offLimitQuestionMark
+ const uint8x8_t result = vmovn_u16(chunk); // narrowing move->packing
+ vst1_u8(dst, result); // store
+ dst += 8;
+ }
+ length = length % 8;
+ }
+#endif
+ while (length--) {
+ *dst++ = (*src>0xff) ? '?' : (uchar) *src;
+ ++src;
}
}
return ba;
@@ -3451,8 +3572,10 @@ static QByteArray toLatin1_helper(const QChar *data, int length)
/*!
Returns a Latin-1 representation of the string as a QByteArray.
- The returned byte array is undefined if the string contains
- non-Latin1 characters.
+
+ The returned byte array is undefined if the string contains non-Latin1
+ characters. Those characters may be suppressed or replaced with a
+ question mark.
\sa fromLatin1(), toAscii(), toUtf8(), toLocal8Bit(), QTextCodec
*/
@@ -3466,12 +3589,15 @@ QByteArray QString::toLatin1() const
// isn't necessary in the header. See task 177402.
/*!
- Returns an 8-bit ASCII representation of the string as a QByteArray.
+ Returns an 8-bit representation of the string as a QByteArray.
If a codec has been set using QTextCodec::setCodecForCStrings(),
it is used to convert Unicode to 8-bit char; otherwise this
function does the same as toLatin1().
+ Note that, despite the name, this function does not necessarily return an US-ASCII
+ (ANSI X3.4-1986) string and its result may not be US-ASCII compatible.
+
\sa fromAscii(), toLatin1(), toUtf8(), toLocal8Bit(), QTextCodec
*/
QByteArray QString::toAscii() const
@@ -3499,8 +3625,13 @@ static QByteArray toLocal8Bit_helper(const QChar *data, int length)
QByteArray. The returned byte array is undefined if the string
contains characters not supported by the local 8-bit encoding.
- QTextCodec::codecForLocale() is used to perform the conversion
- from Unicode.
+ QTextCodec::codecForLocale() is used to perform the conversion from
+ Unicode. If the locale encoding could not be determined, this function
+ does the same as toLatin1().
+
+ If this string contains any characters that cannot be encoded in the
+ locale, the returned byte array is undefined. Those characters may be
+ suppressed or replaced by another.
\sa fromLocal8Bit(), toAscii(), toLatin1(), toUtf8(), QTextCodec
*/
@@ -3516,54 +3647,34 @@ QByteArray QString::toLocal8Bit() const
/*!
Returns a UTF-8 representation of the string as a QByteArray.
+ UTF-8 is a Unicode codec and can represent all characters in a Unicode
+ string like QString.
+
+ However, in the Unicode range, there are certain codepoints that are not
+ considered characters. The Unicode standard reserves the last two
+ codepoints in each Unicode Plane (U+FFFE, U+FFFF, U+1FFFE, U+1FFFF,
+ U+2FFFE, etc.), as well as 16 codepoints in the range U+FDD0..U+FDDF,
+ inclusive, as non-characters. If any of those appear in the string, they
+ may be discarded and will not appear in the UTF-8 representation, or they
+ may be replaced by one or more replacement characters.
+
\sa fromUtf8(), toAscii(), toLatin1(), toLocal8Bit(), QTextCodec
*/
QByteArray QString::toUtf8() const
{
- QByteArray ba;
- if (d->size) {
- int l = d->size;
- int rlen = l*3+1;
- ba.resize(rlen);
- uchar *cursor = (uchar*)ba.data();
- const ushort *ch =d->data;
- for (int i=0; i < l; i++) {
- uint u = *ch;
- if (u < 0x80) {
- *cursor++ = (uchar)u;
- } else {
- if (u < 0x0800) {
- *cursor++ = 0xc0 | ((uchar) (u >> 6));
- } else {
- if (QChar(u).isHighSurrogate() && i < l-1) {
- ushort low = ch[1];
- if (QChar(low).isLowSurrogate()) {
- ++ch;
- ++i;
- u = QChar::surrogateToUcs4(u,low);
- }
- }
- if (u > 0xffff) {
- *cursor++ = 0xf0 | ((uchar) (u >> 18));
- *cursor++ = 0x80 | (((uchar) (u >> 12)) & 0x3f);
- } else {
- *cursor++ = 0xe0 | ((uchar) (u >> 12));
- }
- *cursor++ = 0x80 | (((uchar) (u >> 6)) & 0x3f);
- }
- *cursor++ = 0x80 | ((uchar) (u&0x3f));
- }
- ++ch;
- }
- ba.resize(cursor - (uchar*)ba.constData());
- }
- return ba;
+ if (isNull())
+ return QByteArray();
+
+ return QUtf8::convertFromUnicode(constData(), length(), 0);
}
/*!
\since 4.2
- Returns a UCS-4 representation of the string as a QVector<uint>.
+ Returns a UCS-4/UTF-32 representation of the string as a QVector<uint>.
+
+ UCS-4 is a Unicode codec and is lossless. All characters from this string
+ can be encoded in UCS-4.
\sa fromUtf8(), toAscii(), toLatin1(), toLocal8Bit(), QTextCodec, fromUcs4(), toWCharArray()
*/
@@ -3606,10 +3717,35 @@ QString::Data *QString::fromLatin1_helper(const char *str, int size)
d->alloc = d->size = size;
d->clean = d->asciiCache = d->simpletext = d->righttoleft = d->capacity = 0;
d->data = d->array;
- ushort *i = d->data;
d->array[size] = '\0';
+ ushort *dst = d->data;
+ /* SIMD:
+ * Unpacking with SSE has been shown to improve performance on recent CPUs
+ * The same method gives no improvement with NEON.
+ */
+#if defined(QT_ALWAYS_HAVE_SSE2)
+ if (size >= 16) {
+ int chunkCount = size >> 4; // divided by 16
+ const __m128i nullMask = _mm_set1_epi32(0);
+ for (int i = 0; i < chunkCount; ++i) {
+ const __m128i chunk = _mm_loadu_si128((__m128i*)str); // load
+ str += 16;
+
+ // unpack the first 8 bytes, padding with zeros
+ const __m128i firstHalf = _mm_unpacklo_epi8(chunk, nullMask);
+ _mm_storeu_si128((__m128i*)dst, firstHalf); // store
+ dst += 8;
+
+ // unpack the last 8 bytes, padding with zeros
+ const __m128i secondHalf = _mm_unpackhi_epi8 (chunk, nullMask);
+ _mm_storeu_si128((__m128i*)dst, secondHalf); // store
+ dst += 8;
+ }
+ size = size % 16;
+ }
+#endif
while (size--)
- *i++ = (uchar)*str++;
+ *dst++ = (uchar)*str++;
}
return d;
}
@@ -3815,14 +3951,16 @@ QString QString::fromLocal8Bit(const char *str, int size)
/*!
Returns a QString initialized with the first \a size characters
- of the 8-bit ASCII string \a str.
+ of the 8-bit string \a str.
If \a size is -1 (default), it is taken to be qstrlen(\a
str).
- If a codec has been set using QTextCodec::setCodecForCStrings(),
- it is used to convert \a str to Unicode; otherwise this function
- does the same as fromLatin1().
+ Note that, despite the name, this function actually uses the codec
+ defined by QTextCodec::setCodecForCStrings() to convert \a str to
+ Unicode. Depending on the codec, it may not accept valid US-ASCII (ANSI
+ X3.4-1986) input. If no codec has been set, this function does the same
+ as fromLatin1().
\sa toAscii(), fromLatin1(), fromUtf8(), fromLocal8Bit()
*/
@@ -3838,6 +3976,18 @@ QString QString::fromAscii(const char *str, int size)
If \a size is -1 (default), it is taken to be qstrlen(\a
str).
+ UTF-8 is a Unicode codec and can represent all characters in a Unicode
+ string like QString. However, invalid sequences are possible with UTF-8
+ and, if any such are found, they will be replaced with one or more
+ "replacement characters", or suppressed. These include non-Unicode
+ sequences, non-characters, overlong sequences or surrogate codepoints
+ encoded into UTF-8.
+
+ Non-characters are codepoints that the Unicode standard reserves and must
+ not be used in text interchange. They are the last two codepoints in each
+ Unicode Plane (U+FFFE, U+FFFF, U+1FFFE, U+1FFFF, U+2FFFE, etc.), as well
+ as 16 codepoints in the range U+FDD0..U+FDDF, inclusive.
+
\sa toUtf8(), fromAscii(), fromLatin1(), fromLocal8Bit()
*/
QString QString::fromUtf8(const char *str, int size)
@@ -3861,7 +4011,7 @@ QString QString::fromUtf8(const char *str, int size)
host byte order is assumed.
This function is comparatively slow.
- Use QString(const ushort *, int) if possible.
+ Use QString(const ushort *, int) or QString(const ushort *) if possible.
QString makes a deep copy of the Unicode data.
@@ -3954,24 +4104,74 @@ QString QString::simplified() const
{
if (d->size == 0)
return *this;
- QString result(d->size, Qt::Uninitialized);
- const QChar *from = (const QChar*) d->data;
- const QChar *fromend = (const QChar*) from+d->size;
- int outc=0;
- QChar *to = (QChar*) result.d->data;
- for (;;) {
- while (from!=fromend && from->isSpace())
- from++;
- while (from!=fromend && !from->isSpace())
- to[outc++] = *from++;
- if (from!=fromend)
- to[outc++] = QLatin1Char(' ');
- else
+
+ const QChar * const start = reinterpret_cast<QChar *>(d->data);
+ const QChar *from = start;
+ const QChar *fromEnd = start + d->size;
+ forever {
+ QChar ch = *from;
+ if (!ch.isSpace())
+ break;
+ if (++from == fromEnd) {
+ // All-whitespace string
+ shared_empty.ref.ref();
+ return QString(&shared_empty, 0);
+ }
+ }
+ // This loop needs no underflow check, as we already determined that
+ // the string contains non-whitespace. If the string has exactly one
+ // non-whitespace, it will be checked twice - we can live with that.
+ while (fromEnd[-1].isSpace())
+ fromEnd--;
+ // The rest of the function depends on the fact that we already know
+ // that the last character in the source is no whitespace.
+ const QChar *copyFrom = from;
+ int copyCount;
+ forever {
+ if (++from == fromEnd) {
+ // Only leading and/or trailing whitespace, if any at all
+ return mid(copyFrom - start, from - copyFrom);
+ }
+ QChar ch = *from;
+ if (!ch.isSpace())
+ continue;
+ if (ch != QLatin1Char(' ')) {
+ copyCount = from - copyFrom;
+ break;
+ }
+ ch = *++from;
+ if (ch.isSpace()) {
+ copyCount = from - copyFrom - 1;
break;
+ }
+ }
+ // 'from' now points at the non-trailing whitespace which made the
+ // string not simplified in the first place. 'copyCount' is the number
+ // of already simplified characters - at least one, obviously -
+ // without a trailing space.
+ QString result((fromEnd - from) + copyCount, Qt::Uninitialized);
+ QChar *to = reinterpret_cast<QChar *>(result.d->data);
+ ::memcpy(to, copyFrom, copyCount * 2);
+ to += copyCount;
+ fromEnd--;
+ QChar ch;
+ forever {
+ *to++ = QLatin1Char(' ');
+ do {
+ ch = *++from;
+ } while (ch.isSpace());
+ if (from == fromEnd)
+ break;
+ do {
+ *to++ = ch;
+ ch = *++from;
+ if (from == fromEnd)
+ goto done;
+ } while (!ch.isSpace());
}
- if (outc > 0 && to[outc-1] == QLatin1Char(' '))
- outc--;
- result.truncate(outc);
+ done:
+ *to++ = ch;
+ result.truncate(to - reinterpret_cast<QChar *>(result.d->data));
return result;
}
@@ -4212,8 +4412,10 @@ QString& QString::fill(QChar ch, int size)
\overload operator+=()
- Appends the byte array \a ba to this string. The byte array is
- converted to Unicode using the fromAscii() function.
+ Appends the byte array \a ba to this string. The byte array is converted
+ to Unicode using the fromAscii() function. If any NUL characters ('\0')
+ are embedded in the \a ba byte array, they will be included in the
+ transformation.
You can disable this function by defining \c
QT_NO_CAST_FROM_ASCII when you compile your applications. This
@@ -5989,7 +6191,7 @@ QStringList QString::split(const QRegExp &rx, SplitBehavior behavior) const
*/
QString QString::normalized(QString::NormalizationForm mode) const
{
- return normalized(mode, CURRENT_VERSION);
+ return normalized(mode, UNICODE_DATA_VERSION);
}
/*!
@@ -6071,7 +6273,7 @@ void qt_string_normalize(QString *data, QString::NormalizationForm mode, QChar::
return;
QString &s = *data;
- if (version != CURRENT_VERSION) {
+ if (version != UNICODE_DATA_VERSION) {
for (int i = 0; i < NumNormalizationCorrections; ++i) {
const NormalizationCorrection &n = uc_normalization_corrections[i];
if (n.version > version) {
@@ -6898,9 +7100,9 @@ void QString::updateProperties() const
This operator is mostly useful to pass a QString to a function
that accepts a std::string object.
- If the QString contains non-ASCII Unicode characters, using this
- operator can lead to loss of information, since the implementation
- calls toAscii().
+ If the QString contains Unicode characters that the
+ QTextCodec::codecForCStrings() codec cannot handle, using this operator
+ can lead to loss of information.
This operator is only available if Qt is configured with STL
compatibility enabled.
@@ -6951,7 +7153,7 @@ QString QString::fromRawData(const QChar *unicode, int size)
}
/*! \class QLatin1String
- \brief The QLatin1String class provides a thin wrapper around an ASCII/Latin-1 encoded string literal.
+ \brief The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
\ingroup string-processing
\reentrant
@@ -7038,7 +7240,7 @@ QString QString::fromRawData(const QChar *unicode, int size)
\since 4.3
\overload
- The \a other const char pointer is converted to a QLatin1String using
+ The \a other const char pointer is converted to a QString using
the QString::fromAscii() function.
You can disable this operator by defining \c
@@ -7063,7 +7265,7 @@ QString QString::fromRawData(const QChar *unicode, int size)
\since 4.3
\overload operator!=()
- The \a other const char pointer is converted to a QLatin1String using
+ The \a other const char pointer is converted to a QString using
the QString::fromAscii() function.
You can disable this operator by defining \c
@@ -7089,7 +7291,7 @@ QString QString::fromRawData(const QChar *unicode, int size)
\since 4.3
\overload
- The \a other const char pointer is converted to a QLatin1String using
+ The \a other const char pointer is converted to a QString using
the QString::fromAscii() function.
You can disable this operator by defining \c QT_NO_CAST_FROM_ASCII
@@ -7115,7 +7317,7 @@ QString QString::fromRawData(const QChar *unicode, int size)
\since 4.3
\overload
- The \a other const char pointer is converted to a QLatin1String using
+ The \a other const char pointer is converted to a QString using
the QString::fromAscii() function.
You can disable this operator by defining \c
@@ -7141,7 +7343,7 @@ QString QString::fromRawData(const QChar *unicode, int size)
\since 4.3
\overload
- The \a other const char pointer is converted to a QLatin1String using
+ The \a other const char pointer is converted to a QString using
the QString::fromAscii() function.
You can disable this operator by defining \c
@@ -7317,7 +7519,7 @@ QDataStream &operator>>(QDataStream &in, QString &str)
!= (QSysInfo::ByteOrder == QSysInfo::BigEndian)) {
ushort *data = reinterpret_cast<ushort *>(str.data());
while (len--) {
- *data = (*data >> 8) | (*data << 8);
+ *data = qbswap(*data);
++data;
}
}
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index c1def0fa85..a59c0bd945 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -73,6 +73,16 @@ typedef std::basic_string<wchar_t> QStdWString;
#error qstring.h must be included before any header file that defines truncate
#endif
+#if defined(Q_CC_GNU) && (__GNUC__ == 4 && __GNUC_MINOR__ == 0)
+//There is a bug in GCC 4.0 that tries to instantiate template of annonymous enum
+# ifdef QT_USE_FAST_OPERATOR_PLUS
+# undef QT_USE_FAST_OPERATOR_PLUS
+# endif
+# ifdef QT_USE_FAST_CONCATENATION
+# undef QT_USE_FAST_CONCATENATION
+# endif
+#endif
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -91,7 +101,8 @@ class Q_CORE_EXPORT QString
{
public:
inline QString();
- QString(const QChar *unicode, int size);
+ QString(const QChar *unicode, int size); // Qt5: don't cap size < 0
+ explicit QString(const QChar *unicode); // Qt5: merge with the above
QString(QChar c);
QString(int size, QChar c);
inline QString(const QLatin1String &latin1);
@@ -122,6 +133,7 @@ public:
inline void detach();
inline bool isDetached() const;
+ inline bool isSharedWith(const QString &other) const { return d == other.d; }
void clear();
inline const QChar at(int i) const;
@@ -594,7 +606,7 @@ private:
struct Data {
QBasicAtomicInt ref;
int alloc, size;
- ushort *data;
+ ushort *data; // QT5: put that after the bit field to fill alignment gap; don't use sizeof any more then
ushort clean : 1;
ushort simpletext : 1;
ushort righttoleft : 1;
diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h
index 74661c2bed..0c3ba06ff0 100644
--- a/src/corelib/tools/qstringbuilder.h
+++ b/src/corelib/tools/qstringbuilder.h
@@ -100,14 +100,18 @@ public:
operator QString() const
{
- QString s(QConcatenable< QStringBuilder<A, B> >::size(*this),
- Qt::Uninitialized);
+ const uint size = QConcatenable< QStringBuilder<A, B> >::size(*this);
+ QString s(size, Qt::Uninitialized);
QChar *d = s.data();
+ const QChar * const start = d;
QConcatenable< QStringBuilder<A, B> >::appendTo(*this, d);
- // this resize is necessary since we allocate a bit too much
- // when dealing with variable sized 8-bit encodings
- s.resize(d - s.data());
+
+ if (!QConcatenable< QStringBuilder<A, B> >::ExactSize && int(size) != d - start) {
+ // this resize is necessary since we allocate a bit too much
+ // when dealing with variable sized 8-bit encodings
+ s.resize(d - start);
+ }
return s;
}
QByteArray toLatin1() const { return QString(*this).toLatin1(); }
@@ -116,10 +120,24 @@ public:
const B &b;
};
+template <>
+class QStringBuilder <QString, QString>
+{
+ public:
+ QStringBuilder(const QString &a_, const QString &b_) : a(a_), b(b_) {}
+
+ operator QString() const
+ { QString r(a); r += b; return r; }
+ QByteArray toLatin1() const { return QString(*this).toLatin1(); }
+
+ const QString &a;
+ const QString &b;
+};
template <> struct QConcatenable<char> : private QAbstractConcatenable
{
typedef char type;
+ enum { ExactSize = true };
static int size(const char) { return 1; }
static inline void appendTo(const char c, QChar *&out)
{
@@ -130,6 +148,7 @@ template <> struct QConcatenable<char> : private QAbstractConcatenable
template <> struct QConcatenable<QLatin1Char>
{
typedef QLatin1Char type;
+ enum { ExactSize = true };
static int size(const QLatin1Char) { return 1; }
static inline void appendTo(const QLatin1Char c, QChar *&out)
{
@@ -140,6 +159,7 @@ template <> struct QConcatenable<QLatin1Char>
template <> struct QConcatenable<QChar>
{
typedef QChar type;
+ enum { ExactSize = true };
static int size(const QChar) { return 1; }
static inline void appendTo(const QChar c, QChar *&out)
{
@@ -150,6 +170,7 @@ template <> struct QConcatenable<QChar>
template <> struct QConcatenable<QCharRef>
{
typedef QCharRef type;
+ enum { ExactSize = true };
static int size(const QCharRef &) { return 1; }
static inline void appendTo(const QCharRef &c, QChar *&out)
{
@@ -160,6 +181,7 @@ template <> struct QConcatenable<QCharRef>
template <> struct QConcatenable<QLatin1String>
{
typedef QLatin1String type;
+ enum { ExactSize = true };
static int size(const QLatin1String &a) { return qstrlen(a.latin1()); }
static inline void appendTo(const QLatin1String &a, QChar *&out)
{
@@ -172,6 +194,7 @@ template <> struct QConcatenable<QLatin1String>
template <> struct QConcatenable<QLatin1Literal>
{
typedef QLatin1Literal type;
+ enum { ExactSize = true };
static int size(const QLatin1Literal &a) { return a.size(); }
static inline void appendTo(const QLatin1Literal &a, QChar *&out)
{
@@ -183,6 +206,7 @@ template <> struct QConcatenable<QLatin1Literal>
template <> struct QConcatenable<QString>
{
typedef QString type;
+ enum { ExactSize = true };
static int size(const QString &a) { return a.size(); }
static inline void appendTo(const QString &a, QChar *&out)
{
@@ -195,6 +219,7 @@ template <> struct QConcatenable<QString>
template <> struct QConcatenable<QStringRef>
{
typedef QStringRef type;
+ enum { ExactSize = true };
static int size(const QStringRef &a) { return a.size(); }
static inline void appendTo(QStringRef a, QChar *&out)
{
@@ -208,6 +233,7 @@ template <> struct QConcatenable<QStringRef>
template <int N> struct QConcatenable<char[N]> : private QAbstractConcatenable
{
typedef char type[N];
+ enum { ExactSize = false };
static int size(const char[N])
{
return N - 1;
@@ -221,6 +247,7 @@ template <int N> struct QConcatenable<char[N]> : private QAbstractConcatenable
template <int N> struct QConcatenable<const char[N]> : private QAbstractConcatenable
{
typedef const char type[N];
+ enum { ExactSize = false };
static int size(const char[N]) { return N - 1; }
static inline void appendTo(const char a[N], QChar *&out)
{
@@ -231,6 +258,7 @@ template <int N> struct QConcatenable<const char[N]> : private QAbstractConcaten
template <> struct QConcatenable<const char *> : private QAbstractConcatenable
{
typedef char const *type;
+ enum { ExactSize = false };
static int size(const char *a) { return qstrlen(a); }
static inline void appendTo(const char *a, QChar *&out)
{
@@ -241,6 +269,7 @@ template <> struct QConcatenable<const char *> : private QAbstractConcatenable
template <> struct QConcatenable<QByteArray> : private QAbstractConcatenable
{
typedef QByteArray type;
+ enum { ExactSize = false };
static int size(const QByteArray &ba) { return qstrnlen(ba.constData(), ba.size()); }
static inline void appendTo(const QByteArray &ba, QChar *&out)
{
@@ -253,6 +282,7 @@ template <typename A, typename B>
struct QConcatenable< QStringBuilder<A, B> >
{
typedef QStringBuilder<A, B> type;
+ enum { ExactSize = QConcatenable<A>::ExactSize && QConcatenable<B>::ExactSize };
static int size(const type &p)
{
return QConcatenable<A>::size(p.a) + QConcatenable<B>::size(p.b);
diff --git a/src/corelib/tools/qstringlist.cpp b/src/corelib/tools/qstringlist.cpp
index 4b0f488d77..e9bdf57282 100644
--- a/src/corelib/tools/qstringlist.cpp
+++ b/src/corelib/tools/qstringlist.cpp
@@ -404,7 +404,17 @@ void QtPrivate::QStringList_replaceInStrings(QStringList *that, const QRegExp &r
*/
QString QtPrivate::QStringList_join(const QStringList *that, const QString &sep)
{
+ int totalLength = 0;
+ const int size = that->size();
+
+ for (int i = 0; i < size; ++i)
+ totalLength += that->at(i).size();
+
+ if(size > 0)
+ totalLength += sep.size() * (size - 1);
+
QString res;
+ res.reserve(totalLength);
for (int i = 0; i < that->size(); ++i) {
if (i)
res += sep;
diff --git a/src/corelib/tools/qtextboundaryfinder.cpp b/src/corelib/tools/qtextboundaryfinder.cpp
index 7c40e3593e..92052973f9 100644
--- a/src/corelib/tools/qtextboundaryfinder.cpp
+++ b/src/corelib/tools/qtextboundaryfinder.cpp
@@ -100,7 +100,8 @@ static void init(QTextBoundaryFinder::BoundaryType type, const QChar *chars, int
HB_GetSentenceBoundaries(string, length, scriptItems.data(), scriptItems.count(), attributes);
}
-/*! \class QTextBoundaryFinder
+/*!
+ \class QTextBoundaryFinder
\brief The QTextBoundaryFinder class provides a way of finding Unicode text boundaries in a string.
@@ -331,7 +332,7 @@ QString QTextBoundaryFinder::string() const
/*!
Moves the QTextBoundaryFinder to the next boundary position and returns that position.
- Returns -1 is there is no next boundary.
+ Returns -1 if there is no next boundary.
*/
int QTextBoundaryFinder::toNextBoundary()
{
@@ -373,7 +374,7 @@ int QTextBoundaryFinder::toNextBoundary()
/*!
Moves the QTextBoundaryFinder to the previous boundary position and returns that position.
- Returns -1 is there is no previous boundary.
+ Returns -1 if there is no previous boundary.
*/
int QTextBoundaryFinder::toPreviousBoundary()
{
diff --git a/src/corelib/tools/qunicodetables.cpp b/src/corelib/tools/qunicodetables.cpp
index 97afdf5f74..9df31e5dd1 100644
--- a/src/corelib/tools/qunicodetables.cpp
+++ b/src/corelib/tools/qunicodetables.cpp
@@ -44,7 +44,7 @@
QT_BEGIN_NAMESPACE
static const unsigned short uc_property_trie[] = {
- // 0x11000
+ // 0 - 0x11000
6256, 6288, 6320, 6352, 6384, 6416, 6448, 6480,
6512, 6544, 6576, 6608, 6640, 6672, 6704, 6736,
@@ -1777,42 +1777,42 @@ static const unsigned short uc_property_trie[] = {
42, 42, 560, 561, 562, 160, 563, 564,
565, 565, 565, 565, 566, 42, 42, 42,
- 492, 492, 567, 568, 160, 160, 569, 570,
- 493, 493, 571, 571, 160, 42, 42, 42,
-
- 492, 492, 572, 573, 574, 182, 575, 576,
- 493, 493, 577, 577, 578, 42, 42, 42,
- 160, 160, 579, 580, 581, 160, 582, 583,
- 584, 584, 585, 585, 586, 42, 42, 160,
-
- 587, 587, 587, 587, 587, 587, 587, 588,
- 587, 587, 587, 589, 590, 591, 592, 593,
- 594, 595, 594, 594, 596, 597, 14, 14,
- 598, 599, 600, 601, 598, 602, 600, 601,
-
- 14, 14, 14, 14, 603, 603, 603, 604,
- 605, 606, 607, 608, 609, 610, 611, 612,
- 13, 13, 13, 13, 13, 613, 613, 613,
- 14, 598, 602, 14, 614, 614, 14, 43,
-
- 43, 14, 14, 14, 615, 16, 17, 616,
- 617, 617, 432, 432, 432, 432, 618, 618,
- 618, 618, 185, 619, 620, 621, 622, 618,
- 622, 622, 622, 622, 621, 622, 622, 623,
-
- 624, 625, 625, 625, 160, 160, 160, 160,
- 160, 160, 626, 626, 626, 626, 626, 626,
- 627, 628, 160, 160, 629, 630, 631, 632,
- 633, 634, 635, 635, 36, 16, 17, 50,
-
- 627, 60, 55, 56, 629, 630, 631, 632,
- 633, 634, 635, 635, 36, 16, 17, 160,
+ 492, 492, 567, 166, 160, 160, 568, 569,
+ 493, 493, 570, 570, 160, 42, 42, 42,
+
+ 492, 492, 571, 169, 572, 182, 573, 574,
+ 493, 493, 575, 575, 576, 42, 42, 42,
+ 160, 160, 577, 578, 579, 160, 580, 581,
+ 582, 582, 583, 583, 584, 42, 42, 160,
+
+ 585, 585, 585, 585, 585, 585, 585, 586,
+ 585, 585, 585, 587, 588, 589, 590, 591,
+ 592, 593, 592, 592, 594, 595, 14, 14,
+ 596, 597, 598, 599, 596, 600, 598, 599,
+
+ 14, 14, 14, 14, 601, 601, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610,
+ 13, 13, 13, 13, 13, 611, 611, 611,
+ 14, 596, 600, 14, 612, 612, 14, 43,
+
+ 43, 14, 14, 14, 613, 16, 17, 614,
+ 615, 615, 432, 432, 432, 432, 616, 616,
+ 616, 616, 185, 617, 618, 619, 620, 616,
+ 620, 620, 620, 620, 619, 620, 620, 621,
+
+ 622, 623, 623, 623, 160, 160, 160, 160,
+ 160, 160, 624, 624, 624, 624, 624, 624,
+ 625, 626, 160, 160, 627, 628, 629, 630,
+ 631, 632, 633, 633, 36, 16, 17, 50,
+
+ 625, 60, 55, 56, 627, 628, 629, 630,
+ 631, 632, 633, 633, 36, 16, 17, 160,
484, 484, 484, 484, 484, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
12, 12, 12, 12, 12, 12, 12, 48,
- 12, 12, 12, 636, 637, 429, 429, 429,
- 638, 638, 639, 639, 639, 639, 160, 160,
+ 12, 12, 12, 634, 635, 429, 429, 429,
+ 636, 636, 637, 637, 637, 637, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
@@ -1820,32 +1820,32 @@ static const unsigned short uc_property_trie[] = {
139, 139, 144, 144, 139, 139, 139, 139,
144, 144, 144, 139, 139, 273, 273, 273,
- 273, 139, 195, 195, 640, 641, 641, 159,
- 642, 159, 641, 643, 299, 299, 299, 299,
+ 273, 139, 195, 195, 638, 639, 639, 159,
+ 640, 159, 639, 641, 299, 299, 299, 299,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 49, 49, 175, 644, 49, 49, 49, 175,
- 49, 644, 50, 175, 175, 175, 50, 50,
- 175, 175, 175, 50, 49, 175, 645, 49,
+ 49, 49, 175, 642, 49, 49, 49, 175,
+ 49, 642, 50, 175, 175, 175, 50, 50,
+ 175, 175, 175, 50, 49, 175, 643, 49,
49, 175, 175, 175, 175, 175, 49, 49,
- 49, 49, 49, 49, 175, 49, 646, 49,
- 175, 49, 647, 648, 175, 175, 649, 50,
- 175, 175, 650, 175, 50, 90, 90, 90,
- 90, 131, 651, 239, 103, 628, 652, 652,
+ 49, 49, 49, 49, 175, 49, 644, 49,
+ 175, 49, 645, 646, 175, 175, 647, 50,
+ 175, 175, 648, 175, 50, 90, 90, 90,
+ 90, 131, 649, 239, 103, 626, 650, 650,
- 185, 185, 185, 185, 185, 652, 628, 628,
- 628, 628, 653, 185, 418, 301, 654, 160,
+ 185, 185, 185, 185, 185, 650, 626, 626,
+ 626, 626, 651, 185, 418, 301, 652, 160,
160, 160, 160, 62, 62, 62, 62, 62,
62, 62, 62, 62, 62, 62, 62, 62,
- 655, 655, 655, 655, 655, 655, 655, 655,
- 655, 655, 655, 655, 655, 655, 655, 655,
- 656, 656, 656, 656, 656, 656, 656, 656,
- 656, 656, 656, 656, 656, 656, 656, 656,
+ 653, 653, 653, 653, 653, 653, 653, 653,
+ 653, 653, 653, 653, 653, 653, 653, 653,
+ 654, 654, 654, 654, 654, 654, 654, 654,
+ 654, 654, 654, 654, 654, 654, 654, 654,
- 657, 657, 657, 99, 109, 160, 160, 160,
+ 655, 655, 655, 99, 109, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
36, 36, 36, 36, 36, 49, 49, 49,
49, 49, 36, 36, 49, 49, 49, 49,
@@ -1861,52 +1861,52 @@ static const unsigned short uc_property_trie[] = {
49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 651, 651, 651, 651, 651,
- 651, 651, 651, 651, 185, 185, 185, 185,
+ 49, 49, 49, 649, 649, 649, 649, 649,
+ 649, 649, 649, 649, 185, 185, 185, 185,
185, 185, 185, 185, 185, 185, 185, 185,
36, 36, 36, 36, 36, 36, 36, 36,
- 658, 658, 658, 659, 659, 659, 36, 36,
- 36, 36, 18, 54, 36, 660, 36, 36,
+ 656, 656, 656, 657, 657, 657, 36, 36,
+ 36, 36, 18, 54, 36, 658, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 661, 662, 36, 36,
+ 36, 36, 36, 36, 659, 660, 36, 36,
- 36, 36, 36, 663, 36, 36, 36, 36,
+ 36, 36, 36, 661, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 661, 662, 661, 662, 36, 36,
+ 36, 36, 659, 660, 659, 660, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 661, 662, 661, 662,
- 661, 662, 661, 662, 36, 36, 661, 662,
- 661, 662, 661, 662, 661, 662, 661, 662,
- 661, 662, 661, 662, 661, 662, 661, 662,
+ 36, 36, 36, 36, 659, 660, 659, 660,
+ 659, 660, 659, 660, 36, 36, 659, 660,
+ 659, 660, 659, 660, 659, 660, 659, 660,
+ 659, 660, 659, 660, 659, 660, 659, 660,
- 661, 662, 661, 662, 661, 662, 661, 662,
- 661, 662, 661, 662, 36, 36, 36, 661,
- 662, 661, 662, 36, 36, 36, 36, 36,
- 664, 36, 36, 36, 36, 36, 36, 36,
+ 659, 660, 659, 660, 659, 660, 659, 660,
+ 659, 660, 659, 660, 36, 36, 36, 659,
+ 660, 659, 660, 36, 36, 36, 36, 36,
+ 662, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 661, 662, 36, 36, 665, 36,
- 666, 667, 36, 667, 36, 36, 36, 36,
- 661, 662, 661, 662, 661, 662, 661, 662,
+ 36, 36, 659, 660, 36, 36, 663, 36,
+ 664, 665, 36, 665, 36, 36, 36, 36,
+ 659, 660, 659, 660, 659, 660, 659, 660,
36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36,
- 36, 661, 662, 661, 662, 668, 36, 36,
- 661, 662, 36, 36, 36, 36, 661, 662,
- 661, 662, 661, 662, 661, 662, 661, 662,
+ 36, 659, 660, 659, 660, 666, 36, 36,
+ 659, 660, 36, 36, 36, 36, 659, 660,
+ 659, 660, 659, 660, 659, 660, 659, 660,
- 661, 662, 661, 662, 661, 662, 661, 662,
- 661, 662, 661, 662, 661, 662, 36, 36,
- 661, 662, 669, 669, 669, 185, 670, 670,
- 185, 185, 671, 671, 671, 672, 672, 185,
+ 659, 660, 659, 660, 659, 660, 659, 660,
+ 659, 660, 659, 660, 659, 660, 36, 36,
+ 659, 660, 667, 667, 667, 185, 668, 668,
+ 185, 185, 669, 669, 669, 670, 670, 185,
- 49, 651, 49, 49, 49, 49, 49, 49,
- 661, 662, 661, 662, 49, 49, 49, 49,
+ 49, 649, 49, 49, 49, 49, 49, 49,
+ 659, 660, 659, 660, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49,
@@ -1923,24 +1923,24 @@ static const unsigned short uc_property_trie[] = {
194, 194, 194, 194, 194, 194, 194, 194,
194, 194, 194, 194, 194, 194, 194, 194,
194, 194, 194, 194, 194, 194, 194, 194,
- 194, 194, 194, 651, 185, 651, 651, 651,
+ 194, 194, 194, 649, 185, 649, 649, 649,
- 651, 651, 651, 651, 651, 651, 651, 651,
- 651, 651, 651, 651, 651, 651, 651, 651,
- 651, 651, 651, 651, 651, 381, 651, 651,
- 651, 651, 651, 185, 185, 185, 185, 185,
+ 649, 649, 649, 649, 649, 649, 649, 649,
+ 649, 649, 649, 649, 649, 649, 649, 649,
+ 649, 649, 649, 649, 649, 381, 649, 649,
+ 649, 649, 649, 185, 185, 185, 185, 185,
185, 185, 185, 185, 185, 185, 185, 185,
185, 185, 185, 185, 185, 185, 185, 185,
- 185, 185, 185, 185, 653, 653, 653, 653,
- 653, 653, 653, 653, 653, 653, 653, 653,
+ 185, 185, 185, 185, 651, 651, 651, 651,
+ 651, 651, 651, 651, 651, 651, 651, 651,
- 653, 653, 653, 653, 653, 653, 653, 653,
- 653, 653, 653, 653, 653, 653, 653, 239,
+ 651, 651, 651, 651, 651, 651, 651, 651,
+ 651, 651, 651, 651, 651, 651, 651, 239,
239, 418, 418, 418, 418, 418, 418, 418,
- 418, 418, 418, 418, 673, 673, 673, 673,
+ 418, 418, 418, 418, 671, 671, 671, 671,
- 673, 673, 301, 301, 301, 301, 301, 301,
+ 671, 671, 301, 301, 301, 301, 301, 301,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
@@ -1950,7 +1950,7 @@ static const unsigned short uc_property_trie[] = {
49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 651, 651, 160,
+ 49, 49, 49, 49, 49, 649, 649, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
@@ -1960,35 +1960,35 @@ static const unsigned short uc_property_trie[] = {
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 674, 675, 676, 677, 678, 679, 680, 681,
- 682, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 674, 675, 676, 677,
- 678, 679, 680, 681, 682, 62, 62, 62,
+ 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, 62, 62, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, 62, 62, 62,
62, 62, 62, 62, 62, 62, 62, 62,
- 60, 55, 56, 629, 630, 631, 632, 633,
- 634, 683, 683, 683, 683, 683, 683, 683,
- 683, 683, 683, 683, 194, 194, 194, 194,
+ 60, 55, 56, 627, 628, 629, 630, 631,
+ 632, 681, 681, 681, 681, 681, 681, 681,
+ 681, 681, 681, 681, 194, 194, 194, 194,
194, 194, 194, 194, 194, 194, 194, 194,
194, 194, 194, 194, 194, 194, 194, 194,
- 194, 194, 194, 194, 194, 194, 684, 684,
- 684, 684, 684, 684, 684, 684, 684, 684,
+ 194, 194, 194, 194, 194, 194, 682, 682,
+ 682, 682, 682, 682, 682, 682, 682, 682,
- 684, 684, 684, 684, 684, 684, 684, 684,
- 684, 684, 684, 684, 684, 684, 684, 684,
- 685, 685, 685, 685, 685, 685, 685, 685,
- 685, 685, 685, 685, 685, 685, 685, 685,
+ 682, 682, 682, 682, 682, 682, 682, 682,
+ 682, 682, 682, 682, 682, 682, 682, 682,
+ 683, 683, 683, 683, 683, 683, 683, 683,
+ 683, 683, 683, 683, 683, 683, 683, 683,
- 685, 685, 685, 685, 685, 685, 685, 685,
- 685, 685, 686, 687, 687, 687, 687, 687,
- 687, 687, 687, 687, 687, 688, 689, 690,
- 691, 692, 693, 694, 695, 696, 687, 697,
+ 683, 683, 683, 683, 683, 683, 683, 683,
+ 683, 683, 684, 685, 685, 685, 685, 685,
+ 685, 685, 685, 685, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 685, 695,
49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 653, 653,
- 653, 653, 653, 653, 653, 653, 653, 653,
+ 49, 49, 49, 49, 49, 49, 651, 651,
+ 651, 651, 651, 651, 651, 651, 651, 651,
49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49,
@@ -2002,21 +2002,21 @@ static const unsigned short uc_property_trie[] = {
49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49,
- 651, 651, 651, 651, 651, 651, 651, 651,
+ 649, 649, 649, 649, 649, 649, 649, 649,
185, 185, 185, 185, 185, 185, 185, 185,
49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 239, 239, 653, 653,
- 418, 651, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 239, 239, 651, 651,
+ 418, 649, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 36,
- 651, 651, 653, 653, 653, 653, 653, 653,
- 653, 653, 653, 653, 653, 653, 418, 418,
+ 649, 649, 651, 651, 651, 651, 651, 651,
+ 651, 651, 651, 651, 651, 651, 418, 418,
- 653, 653, 653, 653, 653, 653, 653, 653,
- 653, 653, 239, 239, 239, 239, 239, 239,
+ 651, 651, 651, 651, 651, 651, 651, 651,
+ 651, 651, 239, 239, 239, 239, 239, 239,
239, 239, 418, 418, 418, 418, 418, 418,
418, 418, 418, 418, 418, 160, 160, 160,
@@ -2038,16 +2038,16 @@ static const unsigned short uc_property_trie[] = {
49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 160, 49, 160, 49,
49, 49, 49, 160, 160, 160, 49, 160,
- 49, 49, 49, 698, 698, 698, 698, 160,
+ 49, 49, 49, 696, 696, 696, 696, 160,
- 160, 49, 699, 699, 49, 49, 49, 49,
- 700, 701, 700, 701, 700, 701, 700, 701,
- 700, 701, 700, 701, 700, 701, 674, 675,
- 676, 677, 678, 679, 680, 681, 682, 62,
+ 160, 49, 697, 697, 49, 49, 49, 49,
+ 698, 699, 698, 699, 698, 699, 698, 699,
+ 698, 699, 698, 699, 698, 699, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, 62,
- 674, 675, 676, 677, 678, 679, 680, 681,
- 682, 62, 674, 675, 676, 677, 678, 679,
- 680, 681, 682, 62, 49, 160, 160, 160,
+ 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, 62, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, 62, 49, 160, 160, 160,
49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49,
@@ -2055,13 +2055,13 @@ static const unsigned short uc_property_trie[] = {
160, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 160,
- 702, 702, 702, 703, 704, 705, 706, 673,
- 673, 673, 673, 160, 160, 160, 160, 160,
- 185, 185, 185, 185, 185, 707, 708, 185,
- 185, 185, 185, 185, 185, 707, 708, 185,
+ 700, 700, 700, 701, 702, 703, 704, 671,
+ 671, 671, 671, 160, 160, 160, 160, 160,
+ 185, 185, 185, 185, 185, 705, 706, 185,
+ 185, 185, 185, 185, 185, 705, 706, 185,
- 185, 185, 707, 708, 707, 708, 700, 701,
- 700, 701, 700, 701, 160, 160, 160, 160,
+ 185, 185, 705, 706, 705, 706, 698, 699,
+ 698, 699, 698, 699, 160, 160, 160, 160,
185, 185, 185, 185, 185, 185, 185, 185,
185, 185, 185, 185, 185, 185, 185, 185,
@@ -2075,55 +2075,55 @@ static const unsigned short uc_property_trie[] = {
185, 185, 185, 185, 185, 185, 185, 185,
185, 185, 185, 185, 185, 185, 185, 185,
- 185, 185, 185, 700, 701, 700, 701, 700,
- 701, 700, 701, 700, 701, 709, 710, 711,
- 712, 700, 701, 700, 701, 700, 701, 700,
- 701, 185, 185, 185, 185, 185, 185, 185,
+ 185, 185, 185, 698, 699, 698, 699, 698,
+ 699, 698, 699, 698, 699, 707, 708, 709,
+ 710, 698, 699, 698, 699, 698, 699, 698,
+ 699, 185, 185, 185, 185, 185, 185, 185,
185, 185, 185, 185, 185, 185, 185, 185,
185, 185, 185, 185, 185, 185, 185, 185,
185, 185, 185, 185, 185, 185, 185, 185,
- 713, 185, 185, 185, 185, 185, 185, 185,
+ 711, 185, 185, 185, 185, 185, 185, 185,
- 707, 708, 185, 185, 707, 708, 185, 185,
- 185, 185, 185, 185, 185, 185, 185, 707,
- 708, 707, 708, 185, 707, 708, 185, 185,
- 700, 701, 700, 701, 185, 185, 185, 185,
+ 705, 706, 185, 185, 705, 706, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 705,
+ 706, 705, 706, 185, 705, 706, 185, 185,
+ 698, 699, 698, 699, 185, 185, 185, 185,
185, 185, 185, 185, 185, 185, 185, 185,
185, 185, 185, 185, 185, 185, 185, 185,
- 185, 185, 185, 185, 185, 714, 185, 185,
- 707, 708, 185, 185, 700, 701, 185, 185,
+ 185, 185, 185, 185, 185, 712, 185, 185,
+ 705, 706, 185, 185, 698, 699, 185, 185,
185, 185, 185, 185, 185, 185, 185, 185,
- 185, 185, 185, 707, 708, 707, 708, 185,
- 185, 185, 185, 185, 707, 708, 185, 185,
- 185, 185, 185, 185, 707, 708, 185, 185,
+ 185, 185, 185, 705, 706, 705, 706, 185,
+ 185, 185, 185, 185, 705, 706, 185, 185,
+ 185, 185, 185, 185, 705, 706, 185, 185,
- 185, 185, 185, 185, 707, 708, 185, 185,
+ 185, 185, 185, 185, 705, 706, 185, 185,
185, 185, 185, 185, 185, 185, 185, 185,
185, 185, 185, 185, 185, 185, 185, 185,
- 185, 707, 708, 185, 185, 707, 708, 707,
+ 185, 705, 706, 185, 185, 705, 706, 705,
- 708, 707, 708, 707, 708, 185, 185, 185,
- 185, 185, 185, 707, 708, 185, 185, 185,
- 185, 707, 708, 707, 708, 707, 708, 707,
- 708, 707, 708, 707, 708, 185, 185, 185,
+ 706, 705, 706, 705, 706, 185, 185, 185,
+ 185, 185, 185, 705, 706, 185, 185, 185,
+ 185, 705, 706, 705, 706, 705, 706, 705,
+ 706, 705, 706, 705, 706, 185, 185, 185,
- 185, 707, 708, 185, 185, 185, 707, 708,
- 707, 708, 707, 708, 707, 708, 185, 707,
- 708, 185, 185, 707, 708, 185, 185, 185,
- 185, 185, 185, 707, 708, 707, 708, 707,
+ 185, 705, 706, 185, 185, 185, 705, 706,
+ 705, 706, 705, 706, 705, 706, 185, 705,
+ 706, 185, 185, 705, 706, 185, 185, 185,
+ 185, 185, 185, 705, 706, 705, 706, 705,
- 708, 707, 708, 707, 708, 707, 708, 185,
- 185, 185, 185, 185, 185, 707, 708, 707,
- 708, 707, 708, 707, 708, 707, 708, 185,
- 185, 185, 185, 185, 185, 185, 715, 185,
+ 706, 705, 706, 705, 706, 705, 706, 185,
+ 185, 185, 185, 185, 185, 705, 706, 705,
+ 706, 705, 706, 705, 706, 705, 706, 185,
+ 185, 185, 185, 185, 185, 185, 713, 185,
- 185, 185, 185, 716, 717, 716, 185, 185,
- 185, 185, 185, 185, 707, 708, 185, 185,
- 185, 185, 185, 185, 185, 185, 185, 707,
- 708, 707, 708, 185, 185, 185, 185, 185,
+ 185, 185, 185, 714, 715, 714, 185, 185,
+ 185, 185, 185, 185, 705, 706, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 705,
+ 706, 705, 706, 185, 185, 185, 185, 185,
239, 239, 239, 239, 239, 239, 239, 239,
239, 239, 239, 239, 239, 239, 418, 418,
@@ -2135,24 +2135,24 @@ static const unsigned short uc_property_trie[] = {
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 718, 718, 718, 718, 718, 718, 718, 718,
- 718, 718, 718, 718, 718, 718, 718, 718,
- 718, 718, 718, 718, 718, 718, 718, 718,
- 718, 718, 718, 718, 718, 718, 718, 718,
+ 716, 716, 716, 716, 716, 716, 716, 716,
+ 716, 716, 716, 716, 716, 716, 716, 716,
+ 716, 716, 716, 716, 716, 716, 716, 716,
+ 716, 716, 716, 716, 716, 716, 716, 716,
- 718, 718, 718, 718, 718, 718, 718, 718,
- 718, 718, 718, 718, 718, 718, 718, 160,
- 719, 719, 719, 719, 719, 719, 719, 719,
- 719, 719, 719, 719, 719, 719, 719, 719,
+ 716, 716, 716, 716, 716, 716, 716, 716,
+ 716, 716, 716, 716, 716, 716, 716, 160,
+ 717, 717, 717, 717, 717, 717, 717, 717,
+ 717, 717, 717, 717, 717, 717, 717, 717,
- 719, 719, 719, 719, 719, 719, 719, 719,
- 719, 719, 719, 719, 719, 719, 719, 719,
- 719, 719, 719, 719, 719, 719, 719, 719,
- 719, 719, 719, 719, 719, 719, 719, 160,
+ 717, 717, 717, 717, 717, 717, 717, 717,
+ 717, 717, 717, 717, 717, 717, 717, 717,
+ 717, 717, 717, 717, 717, 717, 717, 717,
+ 717, 717, 717, 717, 717, 717, 717, 160,
- 113, 109, 720, 721, 722, 723, 724, 113,
+ 113, 109, 718, 719, 720, 721, 722, 113,
109, 113, 109, 113, 109, 160, 160, 160,
- 160, 160, 160, 160, 725, 113, 109, 725,
+ 160, 160, 160, 160, 723, 113, 109, 723,
160, 160, 160, 160, 160, 160, 160, 160,
105, 106, 105, 106, 105, 106, 105, 106,
@@ -2163,14 +2163,14 @@ static const unsigned short uc_property_trie[] = {
105, 106, 105, 106, 103, 418, 418, 418,
418, 418, 418, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 160, 622, 622, 622, 622, 726, 622, 622,
+ 160, 620, 620, 620, 620, 724, 620, 620,
- 727, 727, 727, 727, 727, 727, 727, 727,
- 727, 727, 727, 727, 727, 727, 727, 727,
- 727, 727, 727, 727, 727, 727, 727, 727,
- 727, 727, 727, 727, 727, 727, 727, 727,
+ 725, 725, 725, 725, 725, 725, 725, 725,
+ 725, 725, 725, 725, 725, 725, 725, 725,
+ 725, 725, 725, 725, 725, 725, 725, 725,
+ 725, 725, 725, 725, 725, 725, 725, 725,
- 727, 727, 727, 727, 727, 727, 160, 160,
+ 725, 725, 725, 725, 725, 725, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
323, 323, 323, 323, 323, 323, 323, 323,
323, 323, 323, 323, 323, 323, 323, 323,
@@ -2195,227 +2195,227 @@ static const unsigned short uc_property_trie[] = {
323, 323, 323, 323, 323, 323, 323, 160,
323, 323, 323, 323, 323, 323, 323, 160,
- 728, 728, 729, 730, 729, 730, 728, 728,
- 728, 729, 730, 728, 729, 730, 622, 622,
- 622, 622, 622, 622, 622, 622, 621, 731,
- 160, 160, 160, 160, 729, 730, 160, 160,
+ 726, 726, 727, 728, 727, 728, 726, 726,
+ 726, 727, 728, 726, 727, 728, 620, 620,
+ 620, 620, 620, 620, 620, 620, 619, 729,
+ 160, 160, 160, 160, 727, 728, 160, 160,
- 732, 732, 732, 732, 732, 732, 732, 732,
- 732, 732, 732, 732, 732, 732, 732, 732,
- 732, 732, 732, 732, 732, 732, 732, 732,
- 732, 732, 160, 732, 732, 732, 732, 732,
+ 730, 730, 730, 730, 730, 730, 730, 730,
+ 730, 730, 730, 730, 730, 730, 730, 730,
+ 730, 730, 730, 730, 730, 730, 730, 730,
+ 730, 730, 160, 730, 730, 730, 730, 730,
- 732, 732, 732, 732, 732, 732, 732, 732,
- 732, 732, 732, 732, 732, 732, 732, 732,
- 732, 732, 732, 732, 732, 732, 732, 732,
- 732, 732, 732, 732, 732, 732, 732, 732,
+ 730, 730, 730, 730, 730, 730, 730, 730,
+ 730, 730, 730, 730, 730, 730, 730, 730,
+ 730, 730, 730, 730, 730, 730, 730, 730,
+ 730, 730, 730, 730, 730, 730, 730, 730,
- 732, 732, 732, 732, 732, 732, 732, 732,
- 732, 732, 732, 732, 732, 732, 732, 732,
- 732, 732, 732, 732, 160, 160, 160, 160,
+ 730, 730, 730, 730, 730, 730, 730, 730,
+ 730, 730, 730, 730, 730, 730, 730, 730,
+ 730, 730, 730, 730, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 732, 732, 732, 732, 732, 732, 732, 732,
- 732, 732, 732, 732, 732, 732, 732, 732,
- 732, 732, 732, 732, 732, 732, 160, 160,
+ 730, 730, 730, 730, 730, 730, 730, 730,
+ 730, 730, 730, 730, 730, 730, 730, 730,
+ 730, 730, 730, 730, 730, 730, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 732, 732, 732, 732, 732, 732, 732, 732,
- 732, 732, 732, 732, 160, 160, 160, 160,
+ 730, 730, 730, 730, 730, 730, 730, 730,
+ 730, 730, 730, 730, 160, 160, 160, 160,
- 733, 734, 735, 736, 737, 738, 739, 740,
+ 731, 732, 733, 734, 735, 736, 737, 738,
16, 17, 16, 17, 16, 17, 16, 17,
- 16, 17, 737, 737, 16, 17, 16, 17,
- 16, 17, 16, 17, 741, 16, 17, 742,
-
- 737, 740, 740, 740, 740, 740, 740, 740,
- 740, 740, 743, 744, 140, 745, 746, 746,
- 747, 748, 748, 748, 748, 748, 737, 737,
- 749, 749, 749, 750, 751, 752, 732, 737,
-
- 160, 753, 739, 753, 739, 753, 739, 753,
- 739, 753, 739, 739, 739, 739, 739, 739,
- 739, 739, 739, 739, 739, 739, 739, 739,
- 739, 739, 739, 739, 739, 739, 739, 739,
-
- 739, 739, 739, 753, 739, 739, 739, 739,
- 739, 739, 739, 739, 739, 739, 739, 739,
- 739, 739, 739, 739, 739, 739, 739, 739,
- 739, 739, 739, 739, 739, 739, 739, 739,
-
- 739, 739, 739, 753, 739, 753, 739, 753,
- 739, 739, 739, 739, 739, 739, 753, 739,
- 739, 739, 739, 739, 739, 754, 754, 160,
- 160, 755, 755, 756, 756, 757, 757, 758,
-
- 759, 760, 761, 760, 761, 760, 761, 760,
- 761, 760, 761, 761, 761, 761, 761, 761,
- 761, 761, 761, 761, 761, 761, 761, 761,
- 761, 761, 761, 761, 761, 761, 761, 761,
-
- 761, 761, 761, 760, 761, 761, 761, 761,
- 761, 761, 761, 761, 761, 761, 761, 761,
- 761, 761, 761, 761, 761, 761, 761, 761,
- 761, 761, 761, 761, 761, 761, 761, 761,
-
- 761, 761, 761, 760, 761, 760, 761, 760,
- 761, 761, 761, 761, 761, 761, 760, 761,
- 761, 761, 761, 761, 761, 760, 760, 761,
- 761, 761, 761, 762, 763, 763, 763, 764,
-
- 160, 160, 160, 160, 160, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
-
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 160, 160, 160,
- 160, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
-
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 765,
+ 16, 17, 735, 735, 16, 17, 16, 17,
+ 16, 17, 16, 17, 739, 16, 17, 740,
+
+ 735, 738, 738, 738, 738, 738, 738, 738,
+ 738, 738, 741, 742, 140, 743, 744, 744,
+ 745, 746, 746, 746, 746, 746, 735, 735,
+ 747, 747, 747, 748, 749, 750, 730, 735,
+
+ 160, 751, 737, 751, 737, 751, 737, 751,
+ 737, 751, 737, 737, 737, 737, 737, 737,
+ 737, 737, 737, 737, 737, 737, 737, 737,
+ 737, 737, 737, 737, 737, 737, 737, 737,
+
+ 737, 737, 737, 751, 737, 737, 737, 737,
+ 737, 737, 737, 737, 737, 737, 737, 737,
+ 737, 737, 737, 737, 737, 737, 737, 737,
+ 737, 737, 737, 737, 737, 737, 737, 737,
+
+ 737, 737, 737, 751, 737, 751, 737, 751,
+ 737, 737, 737, 737, 737, 737, 751, 737,
+ 737, 737, 737, 737, 737, 752, 752, 160,
+ 160, 753, 753, 754, 754, 755, 755, 756,
+
+ 757, 758, 759, 758, 759, 758, 759, 758,
+ 759, 758, 759, 759, 759, 759, 759, 759,
+ 759, 759, 759, 759, 759, 759, 759, 759,
+ 759, 759, 759, 759, 759, 759, 759, 759,
+
+ 759, 759, 759, 758, 759, 759, 759, 759,
+ 759, 759, 759, 759, 759, 759, 759, 759,
+ 759, 759, 759, 759, 759, 759, 759, 759,
+ 759, 759, 759, 759, 759, 759, 759, 759,
+
+ 759, 759, 759, 758, 759, 758, 759, 758,
+ 759, 759, 759, 759, 759, 759, 758, 759,
+ 759, 759, 759, 759, 759, 758, 758, 759,
+ 759, 759, 759, 760, 761, 761, 761, 762,
+
+ 160, 160, 160, 160, 160, 763, 763, 763,
+ 763, 763, 763, 763, 763, 763, 763, 763,
+ 763, 763, 763, 763, 763, 763, 763, 763,
+ 763, 763, 763, 763, 763, 763, 763, 763,
+
+ 763, 763, 763, 763, 763, 763, 763, 763,
+ 763, 763, 763, 763, 763, 160, 160, 160,
+ 160, 763, 763, 763, 763, 763, 763, 763,
+ 763, 763, 763, 763, 763, 763, 763, 763,
+
+ 763, 763, 763, 763, 763, 763, 763, 763,
+ 763, 763, 763, 763, 763, 763, 763, 763,
+ 763, 763, 763, 763, 763, 763, 763, 763,
+ 763, 763, 763, 763, 763, 763, 763, 763,
+
+ 763, 763, 763, 763, 763, 763, 763, 763,
+ 763, 763, 763, 763, 763, 763, 763, 160,
+ 764, 764, 765, 765, 765, 765, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
- 765, 765, 765, 765, 765, 765, 765, 765,
- 765, 765, 765, 765, 765, 765, 765, 160,
- 766, 766, 767, 767, 767, 767, 766, 766,
766, 766, 766, 766, 766, 766, 766, 766,
-
- 768, 768, 768, 768, 768, 768, 768, 768,
- 768, 768, 768, 768, 768, 768, 768, 768,
- 768, 768, 768, 768, 768, 768, 768, 768,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
160, 160, 160, 160, 160, 160, 160, 160,
- 769, 769, 769, 769, 769, 769, 769, 769,
- 769, 769, 769, 769, 769, 769, 769, 769,
+ 767, 767, 767, 767, 767, 767, 767, 767,
+ 767, 767, 767, 767, 767, 767, 767, 767,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 770, 770, 770, 770, 770, 770, 770, 770,
- 770, 770, 770, 770, 770, 770, 770, 770,
+ 768, 768, 768, 768, 768, 768, 768, 768,
+ 768, 768, 768, 768, 768, 768, 768, 768,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 771, 771, 160,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 769, 769, 160,
- 767, 767, 767, 767, 767, 767, 767, 767,
- 767, 767, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 766,
+ 765, 765, 765, 765, 765, 765, 765, 765,
+ 765, 765, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
- 766, 766, 766, 766, 160, 160, 160, 160,
+ 764, 764, 764, 764, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 771, 772, 772, 772, 772, 772, 772, 772,
- 772, 772, 772, 772, 772, 772, 772, 772,
+ 769, 770, 770, 770, 770, 770, 770, 770,
+ 770, 770, 770, 770, 770, 770, 770, 770,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 771, 771, 769, 766,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 769, 769, 767, 764,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 772, 772, 772, 772, 772, 772, 772,
- 772, 772, 772, 772, 772, 772, 772, 772,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 770, 770, 770, 770, 770, 770, 770,
+ 770, 770, 770, 770, 770, 770, 770, 770,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 771, 771, 771, 771,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 766,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 769, 769, 769, 769,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 160,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 160,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 766,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 771,
- 771, 771, 771, 766, 766, 766, 766, 766,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 769,
+ 769, 769, 769, 764, 764, 764, 764, 764,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 771, 771,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 769, 769,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 766,
- 766, 766, 766, 766, 766, 766, 766, 771,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 769,
- 773, 773, 773, 773, 773, 773, 773, 773,
- 773, 773, 773, 773, 773, 773, 773, 773,
- 773, 773, 773, 773, 773, 773, 773, 773,
- 773, 773, 773, 773, 773, 773, 773, 773,
+ 771, 771, 771, 771, 771, 771, 771, 771,
+ 771, 771, 771, 771, 771, 771, 771, 771,
+ 771, 771, 771, 771, 771, 771, 771, 771,
+ 771, 771, 771, 771, 771, 771, 771, 771,
- 773, 773, 773, 773, 773, 773, 773, 773,
- 773, 773, 773, 773, 773, 773, 773, 773,
- 773, 773, 773, 773, 773, 773, 160, 160,
+ 771, 771, 771, 771, 771, 771, 771, 771,
+ 771, 771, 771, 771, 771, 771, 771, 771,
+ 771, 771, 771, 771, 771, 771, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 739, 739, 739, 739, 739, 739, 739, 739,
- 739, 739, 739, 739, 739, 739, 739, 739,
- 739, 739, 739, 739, 739, 739, 739, 739,
- 739, 739, 739, 739, 739, 739, 739, 739,
+ 737, 737, 737, 737, 737, 737, 737, 737,
+ 737, 737, 737, 737, 737, 737, 737, 737,
+ 737, 737, 737, 737, 737, 737, 737, 737,
+ 737, 737, 737, 737, 737, 737, 737, 737,
- 739, 739, 739, 739, 739, 739, 774, 774,
- 774, 774, 774, 774, 774, 774, 774, 774,
- 774, 774, 774, 774, 774, 774, 774, 774,
- 774, 774, 774, 774, 160, 160, 160, 160,
+ 737, 737, 737, 737, 737, 737, 772, 772,
+ 772, 772, 772, 772, 772, 772, 772, 772,
+ 772, 772, 772, 772, 772, 772, 772, 772,
+ 772, 772, 772, 772, 160, 160, 160, 160,
- 768, 768, 768, 768, 768, 768, 768, 768,
- 768, 768, 768, 768, 768, 768, 768, 768,
- 768, 768, 768, 768, 768, 775, 768, 768,
- 768, 768, 768, 768, 768, 768, 768, 768,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 773, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
- 768, 768, 768, 768, 768, 768, 768, 768,
- 768, 768, 768, 768, 768, 768, 768, 768,
- 768, 768, 768, 768, 768, 768, 768, 768,
- 768, 768, 768, 768, 768, 768, 768, 768,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, 766, 766,
- 768, 768, 768, 768, 768, 768, 768, 768,
- 768, 768, 768, 768, 768, 160, 160, 160,
- 732, 732, 732, 732, 732, 732, 732, 732,
- 732, 732, 732, 732, 732, 732, 732, 732,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 160, 160, 160,
+ 730, 730, 730, 730, 730, 730, 730, 730,
+ 730, 730, 730, 730, 730, 730, 730, 730,
- 732, 732, 776, 776, 732, 732, 732, 732,
- 732, 732, 732, 732, 732, 732, 732, 732,
- 732, 732, 732, 732, 776, 732, 732, 732,
- 732, 732, 732, 732, 732, 732, 732, 732,
+ 730, 730, 774, 774, 730, 730, 730, 730,
+ 730, 730, 730, 730, 730, 730, 730, 730,
+ 730, 730, 730, 730, 774, 730, 730, 730,
+ 730, 730, 730, 730, 730, 730, 730, 730,
- 732, 776, 732, 732, 732, 776, 732, 160,
+ 730, 774, 730, 730, 730, 774, 730, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 777, 777, 777, 777, 777, 777, 777, 777,
- 777, 777, 777, 777, 777, 777, 777, 777,
- 777, 777, 777, 777, 777, 777, 777, 778,
- 778, 778, 778, 160, 160, 160, 160, 160,
+ 775, 775, 775, 775, 775, 775, 775, 775,
+ 775, 775, 775, 775, 775, 775, 775, 775,
+ 775, 775, 775, 775, 775, 775, 775, 776,
+ 776, 776, 776, 160, 160, 160, 160, 160,
- 779, 779, 160, 160, 160, 160, 160, 160,
+ 777, 777, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 323, 323, 780, 323, 323, 323, 781, 323,
- 323, 323, 323, 782, 323, 323, 323, 323,
+ 323, 323, 778, 323, 323, 323, 779, 323,
+ 323, 323, 323, 780, 323, 323, 323, 323,
323, 323, 323, 323, 323, 323, 323, 323,
323, 323, 323, 323, 323, 323, 323, 323,
- 323, 323, 323, 464, 464, 782, 782, 464,
+ 323, 323, 323, 464, 464, 780, 780, 464,
418, 418, 418, 418, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
@@ -2427,91 +2427,91 @@ static const unsigned short uc_property_trie[] = {
322, 322, 322, 322, 322, 322, 322, 322,
322, 322, 322, 322, 322, 322, 322, 322,
- 322, 322, 322, 322, 783, 783, 304, 304,
+ 322, 322, 322, 322, 781, 781, 304, 304,
160, 160, 160, 160, 160, 160, 160, 160,
- 784, 785, 785, 785, 785, 785, 785, 785,
- 785, 785, 785, 785, 785, 785, 785, 785,
- 785, 785, 785, 785, 785, 785, 785, 785,
- 785, 785, 785, 785, 784, 785, 785, 785,
+ 782, 783, 783, 783, 783, 783, 783, 783,
+ 783, 783, 783, 783, 783, 783, 783, 783,
+ 783, 783, 783, 783, 783, 783, 783, 783,
+ 783, 783, 783, 783, 782, 783, 783, 783,
- 785, 785, 785, 785, 785, 785, 785, 785,
- 785, 785, 785, 785, 785, 785, 785, 785,
- 785, 785, 785, 785, 785, 785, 785, 785,
- 784, 785, 785, 785, 785, 785, 785, 785,
+ 783, 783, 783, 783, 783, 783, 783, 783,
+ 783, 783, 783, 783, 783, 783, 783, 783,
+ 783, 783, 783, 783, 783, 783, 783, 783,
+ 782, 783, 783, 783, 783, 783, 783, 783,
- 785, 785, 785, 785, 785, 785, 785, 785,
- 785, 785, 785, 785, 785, 785, 785, 785,
- 785, 785, 785, 785, 784, 785, 785, 785,
- 785, 785, 785, 785, 785, 785, 785, 785,
+ 783, 783, 783, 783, 783, 783, 783, 783,
+ 783, 783, 783, 783, 783, 783, 783, 783,
+ 783, 783, 783, 783, 782, 783, 783, 783,
+ 783, 783, 783, 783, 783, 783, 783, 783,
- 785, 785, 785, 785, 785, 785, 785, 785,
- 785, 785, 785, 785, 785, 785, 785, 785,
- 784, 785, 785, 785, 785, 785, 785, 785,
- 785, 785, 785, 785, 785, 785, 785, 785,
+ 783, 783, 783, 783, 783, 783, 783, 783,
+ 783, 783, 783, 783, 783, 783, 783, 783,
+ 782, 783, 783, 783, 783, 783, 783, 783,
+ 783, 783, 783, 783, 783, 783, 783, 783,
- 785, 785, 785, 785, 785, 785, 785, 785,
- 785, 785, 785, 785, 784, 785, 785, 785,
- 785, 785, 785, 785, 785, 785, 785, 785,
- 785, 785, 785, 785, 785, 785, 785, 785,
+ 783, 783, 783, 783, 783, 783, 783, 783,
+ 783, 783, 783, 783, 782, 783, 783, 783,
+ 783, 783, 783, 783, 783, 783, 783, 783,
+ 783, 783, 783, 783, 783, 783, 783, 783,
- 785, 785, 785, 785, 785, 785, 785, 785,
- 784, 785, 785, 785, 785, 785, 785, 785,
- 785, 785, 785, 785, 785, 785, 785, 785,
- 785, 785, 785, 785, 785, 785, 785, 785,
+ 783, 783, 783, 783, 783, 783, 783, 783,
+ 782, 783, 783, 783, 783, 783, 783, 783,
+ 783, 783, 783, 783, 783, 783, 783, 783,
+ 783, 783, 783, 783, 783, 783, 783, 783,
- 785, 785, 785, 785, 784, 785, 785, 785,
- 785, 785, 785, 785, 785, 785, 785, 785,
- 785, 785, 785, 785, 785, 785, 785, 785,
- 785, 785, 785, 785, 785, 785, 785, 785,
+ 783, 783, 783, 783, 782, 783, 783, 783,
+ 783, 783, 783, 783, 783, 783, 783, 783,
+ 783, 783, 783, 783, 783, 783, 783, 783,
+ 783, 783, 783, 783, 783, 783, 783, 783,
- 785, 785, 785, 785, 160, 160, 160, 160,
+ 783, 783, 783, 783, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
+ 784, 784, 784, 784, 784, 784, 784, 784,
+ 784, 784, 784, 784, 784, 784, 784, 784,
+ 784, 784, 784, 784, 784, 784, 784, 784,
+ 784, 784, 784, 784, 784, 784, 784, 784,
+
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+
+ 737, 737, 737, 737, 737, 737, 737, 737,
+ 737, 737, 737, 737, 737, 737, 160, 160,
+ 786, 786, 786, 786, 786, 786, 786, 786,
+ 786, 786, 786, 786, 786, 786, 786, 786,
+
786, 786, 786, 786, 786, 786, 786, 786,
786, 786, 786, 786, 786, 786, 786, 786,
786, 786, 786, 786, 786, 786, 786, 786,
786, 786, 786, 786, 786, 786, 786, 786,
- 787, 787, 787, 787, 787, 787, 787, 787,
- 787, 787, 787, 787, 787, 787, 787, 787,
- 787, 787, 787, 787, 787, 787, 787, 787,
- 787, 787, 787, 787, 787, 787, 787, 787,
-
- 739, 739, 739, 739, 739, 739, 739, 739,
- 739, 739, 739, 739, 739, 739, 160, 160,
- 788, 788, 788, 788, 788, 788, 788, 788,
- 788, 788, 788, 788, 788, 788, 788, 788,
-
- 788, 788, 788, 788, 788, 788, 788, 788,
- 788, 788, 788, 788, 788, 788, 788, 788,
- 788, 788, 788, 788, 788, 788, 788, 788,
- 788, 788, 788, 788, 788, 788, 788, 788,
-
- 788, 788, 788, 788, 788, 788, 788, 788,
- 788, 788, 788, 160, 160, 160, 160, 160,
- 774, 774, 774, 774, 774, 774, 774, 774,
- 774, 774, 774, 774, 774, 774, 774, 774,
+ 786, 786, 786, 786, 786, 786, 786, 786,
+ 786, 786, 786, 160, 160, 160, 160, 160,
+ 772, 772, 772, 772, 772, 772, 772, 772,
+ 772, 772, 772, 772, 772, 772, 772, 772,
- 774, 774, 774, 774, 774, 774, 774, 774,
- 774, 774, 774, 774, 774, 774, 774, 774,
- 774, 774, 774, 774, 774, 774, 774, 774,
- 774, 774, 774, 774, 774, 774, 774, 774,
+ 772, 772, 772, 772, 772, 772, 772, 772,
+ 772, 772, 772, 772, 772, 772, 772, 772,
+ 772, 772, 772, 772, 772, 772, 772, 772,
+ 772, 772, 772, 772, 772, 772, 772, 772,
- 774, 774, 774, 774, 774, 774, 774, 774,
- 774, 774, 774, 774, 774, 774, 774, 774,
- 774, 774, 774, 774, 774, 774, 774, 774,
- 774, 774, 160, 160, 160, 160, 160, 160,
+ 772, 772, 772, 772, 772, 772, 772, 772,
+ 772, 772, 772, 772, 772, 772, 772, 772,
+ 772, 772, 772, 772, 772, 772, 772, 772,
+ 772, 772, 160, 160, 160, 160, 160, 160,
- 789, 790, 791, 792, 793, 794, 795, 160,
+ 787, 788, 789, 790, 791, 792, 792, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 796, 797, 798, 799, 800,
- 160, 160, 160, 160, 160, 801, 802, 231,
+ 160, 160, 160, 793, 794, 795, 796, 797,
+ 160, 160, 160, 160, 160, 798, 799, 231,
231, 231, 231, 231, 231, 231, 231, 231,
- 231, 635, 231, 231, 231, 231, 231, 231,
+ 231, 633, 231, 231, 231, 231, 231, 231,
231, 231, 231, 231, 231, 231, 231, 205,
231, 231, 231, 231, 231, 205, 231, 205,
@@ -2538,7 +2538,7 @@ static const unsigned short uc_property_trie[] = {
243, 243, 243, 243, 243, 243, 243, 243,
243, 243, 243, 243, 243, 243, 243, 243,
243, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 243, 243, 243, 243, 600, 742,
+ 243, 243, 243, 243, 243, 243, 598, 740,
235, 235, 235, 235, 235, 235, 235, 235,
235, 235, 235, 235, 235, 235, 235, 235,
@@ -2552,63 +2552,63 @@ static const unsigned short uc_property_trie[] = {
243, 243, 243, 243, 243, 243, 243, 243,
235, 235, 235, 235, 235, 235, 235, 235,
- 803, 803, 803, 803, 803, 803, 803, 803,
- 803, 803, 803, 803, 803, 803, 803, 803,
+ 800, 800, 800, 800, 800, 800, 800, 800,
+ 800, 800, 800, 800, 800, 800, 800, 800,
- 803, 803, 803, 803, 803, 803, 803, 803,
- 803, 803, 803, 803, 803, 803, 803, 803,
+ 800, 800, 800, 800, 800, 800, 800, 800,
+ 800, 800, 800, 800, 800, 800, 800, 800,
243, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 243, 243, 804, 239, 235, 235,
+ 243, 243, 243, 243, 801, 239, 235, 235,
423, 423, 423, 423, 423, 423, 423, 423,
423, 423, 423, 423, 423, 423, 423, 423,
- 805, 806, 806, 805, 805, 807, 807, 808,
- 809, 810, 160, 160, 160, 160, 160, 160,
+ 802, 803, 803, 802, 802, 804, 804, 805,
+ 806, 807, 160, 160, 160, 160, 160, 160,
139, 139, 139, 139, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 736, 747, 747, 811, 811, 600, 742, 600,
- 742, 600, 742, 600, 742, 600, 742, 600,
+ 734, 745, 745, 808, 808, 598, 740, 598,
+ 740, 598, 740, 598, 740, 598, 740, 598,
- 742, 600, 742, 600, 742, 752, 752, 812,
- 813, 736, 736, 736, 736, 811, 811, 811,
- 814, 736, 815, 160, 762, 816, 9, 9,
- 747, 16, 17, 16, 17, 16, 17, 817,
+ 740, 598, 740, 598, 740, 750, 750, 809,
+ 810, 734, 734, 734, 734, 808, 808, 808,
+ 811, 734, 812, 160, 760, 813, 9, 9,
+ 745, 16, 17, 16, 17, 16, 17, 814,
- 736, 736, 818, 819, 820, 821, 822, 160,
- 736, 12, 13, 736, 160, 160, 160, 160,
+ 734, 734, 815, 816, 817, 818, 819, 160,
+ 734, 12, 13, 734, 160, 160, 160, 160,
243, 243, 243, 286, 243, 235, 243, 243,
243, 243, 243, 243, 243, 243, 243, 243,
243, 243, 243, 243, 243, 243, 243, 243,
243, 243, 243, 243, 243, 243, 243, 243,
243, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 243, 243, 243, 235, 235, 823,
-
- 160, 9, 736, 817, 12, 13, 736, 736,
- 16, 17, 736, 818, 814, 819, 815, 824,
- 825, 826, 827, 828, 829, 830, 831, 832,
- 833, 834, 816, 762, 835, 822, 836, 9,
+ 243, 243, 243, 243, 243, 235, 235, 820,
+
+ 160, 9, 734, 814, 12, 13, 734, 734,
+ 16, 17, 734, 815, 811, 816, 812, 821,
+ 822, 823, 824, 825, 826, 827, 828, 829,
+ 830, 831, 813, 760, 832, 819, 833, 9,
+
+ 734, 834, 834, 834, 834, 834, 834, 834,
+ 834, 834, 834, 834, 834, 834, 834, 834,
+ 834, 834, 834, 834, 834, 834, 834, 834,
+ 834, 834, 834, 39, 734, 41, 835, 808,
+
+ 835, 836, 836, 836, 836, 836, 836, 836,
+ 836, 836, 836, 836, 836, 836, 836, 836,
+ 836, 836, 836, 836, 836, 836, 836, 836,
+ 836, 836, 836, 39, 819, 41, 819, 698,
+
+ 699, 733, 16, 17, 732, 760, 837, 758,
+ 758, 758, 758, 758, 758, 758, 758, 758,
+ 761, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837,
- 736, 837, 837, 837, 837, 837, 837, 837,
837, 837, 837, 837, 837, 837, 837, 837,
837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 39, 736, 41, 838, 811,
-
- 838, 839, 839, 839, 839, 839, 839, 839,
- 839, 839, 839, 839, 839, 839, 839, 839,
- 839, 839, 839, 839, 839, 839, 839, 839,
- 839, 839, 839, 39, 822, 41, 822, 700,
-
- 701, 735, 16, 17, 734, 762, 840, 760,
- 760, 760, 760, 760, 760, 760, 760, 760,
- 763, 840, 840, 840, 840, 840, 840, 840,
- 840, 840, 840, 840, 840, 840, 840, 840,
-
- 840, 840, 840, 840, 840, 840, 840, 840,
- 840, 840, 840, 840, 840, 840, 840, 840,
- 840, 840, 840, 840, 840, 840, 840, 840,
- 840, 840, 840, 840, 840, 840, 763, 763,
+ 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 761, 761,
90, 90, 90, 90, 90, 90, 90, 90,
90, 90, 90, 90, 90, 90, 90, 90,
@@ -2620,10 +2620,10 @@ static const unsigned short uc_property_trie[] = {
160, 160, 90, 90, 90, 90, 90, 90,
160, 160, 90, 90, 90, 160, 160, 160,
- 48, 12, 822, 838, 737, 12, 12, 160,
+ 48, 12, 819, 835, 735, 12, 12, 160,
49, 36, 36, 36, 36, 49, 49, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 160, 841, 841, 841, 842, 49, 843, 843,
+ 160, 838, 838, 838, 839, 49, 840, 840,
308, 308, 308, 308, 308, 308, 308, 308,
308, 308, 308, 308, 160, 308, 308, 308,
@@ -2650,68 +2650,68 @@ static const unsigned short uc_property_trie[] = {
308, 308, 308, 308, 308, 308, 308, 308,
308, 308, 308, 160, 160, 160, 160, 160,
- 844, 845, 846, 160, 160, 160, 160, 847,
- 847, 847, 847, 847, 847, 847, 847, 847,
- 847, 847, 847, 847, 847, 847, 847, 847,
- 847, 847, 847, 847, 847, 847, 847, 847,
+ 841, 842, 843, 160, 160, 160, 160, 844,
+ 844, 844, 844, 844, 844, 844, 844, 844,
+ 844, 844, 844, 844, 844, 844, 844, 844,
+ 844, 844, 844, 844, 844, 844, 844, 844,
- 847, 847, 847, 847, 847, 847, 847, 847,
- 847, 847, 847, 847, 847, 847, 847, 847,
- 847, 847, 847, 847, 160, 160, 160, 848,
- 848, 848, 848, 848, 848, 848, 848, 848,
+ 844, 844, 844, 844, 844, 844, 844, 844,
+ 844, 844, 844, 844, 844, 844, 844, 844,
+ 844, 844, 844, 844, 160, 160, 160, 845,
+ 845, 845, 845, 845, 845, 845, 845, 845,
- 849, 849, 849, 849, 849, 849, 849, 849,
- 849, 849, 849, 849, 849, 849, 849, 849,
- 849, 849, 849, 849, 849, 849, 849, 849,
- 849, 849, 849, 849, 849, 849, 849, 849,
+ 846, 846, 846, 846, 846, 846, 846, 846,
+ 846, 846, 846, 846, 846, 846, 846, 846,
+ 846, 846, 846, 846, 846, 846, 846, 846,
+ 846, 846, 846, 846, 846, 846, 846, 846,
- 849, 849, 849, 849, 849, 849, 849, 849,
- 849, 849, 849, 849, 849, 849, 849, 849,
- 849, 849, 849, 849, 849, 726, 726, 726,
- 726, 418, 418, 418, 418, 418, 418, 418,
+ 846, 846, 846, 846, 846, 846, 846, 846,
+ 846, 846, 846, 846, 846, 846, 846, 846,
+ 846, 846, 846, 846, 846, 724, 724, 724,
+ 724, 418, 418, 418, 418, 418, 418, 418,
418, 418, 418, 418, 418, 418, 418, 418,
- 418, 418, 726, 160, 160, 160, 160, 160,
+ 418, 418, 724, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 850, 850, 850, 850, 850, 850, 850, 850,
- 850, 850, 850, 850, 850, 850, 850, 850,
- 850, 850, 850, 850, 850, 850, 850, 850,
- 850, 850, 850, 850, 850, 850, 850, 160,
+ 847, 847, 847, 847, 847, 847, 847, 847,
+ 847, 847, 847, 847, 847, 847, 847, 847,
+ 847, 847, 847, 847, 847, 847, 847, 847,
+ 847, 847, 847, 847, 847, 847, 847, 160,
- 851, 851, 851, 851, 160, 160, 160, 160,
+ 848, 848, 848, 848, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 850, 850, 850, 850, 850, 850, 850, 850,
- 850, 850, 850, 850, 850, 850, 850, 850,
+ 847, 847, 847, 847, 847, 847, 847, 847,
+ 847, 847, 847, 847, 847, 847, 847, 847,
- 850, 852, 850, 850, 850, 850, 850, 850,
- 850, 850, 852, 160, 160, 160, 160, 160,
+ 847, 849, 847, 847, 847, 847, 847, 847,
+ 847, 847, 849, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
308, 308, 308, 308, 308, 308, 308, 308,
308, 308, 308, 308, 308, 308, 308, 308,
308, 308, 308, 308, 308, 308, 308, 308,
- 308, 308, 308, 308, 308, 308, 160, 844,
+ 308, 308, 308, 308, 308, 308, 160, 841,
323, 323, 323, 323, 160, 160, 160, 160,
323, 323, 323, 323, 323, 323, 323, 323,
- 465, 853, 853, 853, 853, 853, 160, 160,
+ 465, 850, 850, 850, 850, 850, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 854, 854, 854, 854, 854, 854, 854, 854,
- 854, 854, 854, 854, 854, 854, 854, 854,
- 854, 854, 854, 854, 854, 854, 854, 854,
- 854, 854, 854, 854, 854, 854, 854, 854,
+ 851, 851, 851, 851, 851, 851, 851, 851,
+ 851, 851, 851, 851, 851, 851, 851, 851,
+ 851, 851, 851, 851, 851, 851, 851, 851,
+ 851, 851, 851, 851, 851, 851, 851, 851,
- 854, 854, 854, 854, 854, 854, 855, 855,
- 856, 856, 856, 856, 856, 856, 856, 856,
- 856, 856, 856, 856, 856, 856, 856, 856,
- 856, 856, 856, 856, 856, 856, 856, 856,
+ 851, 851, 851, 851, 851, 851, 852, 852,
+ 853, 853, 853, 853, 853, 853, 853, 853,
+ 853, 853, 853, 853, 853, 853, 853, 853,
+ 853, 853, 853, 853, 853, 853, 853, 853,
- 856, 856, 856, 856, 856, 856, 856, 856,
- 856, 856, 856, 856, 856, 856, 857, 857,
+ 853, 853, 853, 853, 853, 853, 853, 853,
+ 853, 853, 853, 853, 853, 853, 854, 854,
308, 308, 308, 308, 308, 308, 308, 308,
308, 308, 308, 308, 308, 308, 308, 308,
@@ -2725,35 +2725,35 @@ static const unsigned short uc_property_trie[] = {
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 858, 858, 858, 858, 858, 858, 205, 205,
- 858, 205, 858, 858, 858, 858, 858, 858,
- 858, 858, 858, 858, 858, 858, 858, 858,
- 858, 858, 858, 858, 858, 858, 858, 858,
+ 855, 855, 855, 855, 855, 855, 205, 205,
+ 855, 205, 855, 855, 855, 855, 855, 855,
+ 855, 855, 855, 855, 855, 855, 855, 855,
+ 855, 855, 855, 855, 855, 855, 855, 855,
- 858, 858, 858, 858, 858, 858, 858, 858,
- 858, 858, 858, 858, 858, 858, 858, 858,
- 858, 858, 858, 858, 858, 858, 205, 858,
- 858, 205, 205, 205, 858, 205, 205, 858,
+ 855, 855, 855, 855, 855, 855, 855, 855,
+ 855, 855, 855, 855, 855, 855, 855, 855,
+ 855, 855, 855, 855, 855, 855, 205, 855,
+ 855, 205, 205, 205, 855, 205, 205, 855,
- 859, 859, 859, 859, 859, 859, 859, 859,
- 859, 859, 859, 859, 859, 859, 859, 859,
- 859, 859, 859, 859, 859, 859, 860, 860,
- 860, 860, 205, 205, 205, 205, 205, 861,
+ 856, 856, 856, 856, 856, 856, 856, 856,
+ 856, 856, 856, 856, 856, 856, 856, 856,
+ 856, 856, 856, 856, 856, 856, 857, 857,
+ 857, 857, 205, 205, 205, 205, 205, 858,
- 862, 782, 782, 782, 205, 782, 782, 205,
- 205, 205, 205, 205, 782, 152, 782, 153,
- 862, 862, 862, 862, 205, 862, 862, 862,
- 205, 862, 862, 862, 862, 862, 862, 862,
+ 859, 780, 780, 780, 205, 780, 780, 205,
+ 205, 205, 205, 205, 780, 152, 780, 153,
+ 859, 859, 859, 859, 205, 859, 859, 859,
+ 205, 859, 859, 859, 859, 859, 859, 859,
- 862, 862, 862, 862, 862, 862, 862, 862,
- 862, 862, 862, 862, 862, 862, 862, 862,
- 862, 862, 862, 862, 205, 205, 205, 205,
- 153, 643, 152, 205, 205, 205, 205, 781,
+ 859, 859, 859, 859, 859, 859, 859, 859,
+ 859, 859, 859, 859, 859, 859, 859, 859,
+ 859, 859, 859, 859, 205, 205, 205, 205,
+ 153, 641, 152, 205, 205, 205, 205, 779,
- 863, 864, 865, 866, 867, 867, 867, 867,
+ 860, 861, 862, 863, 864, 864, 864, 864,
205, 205, 205, 205, 205, 205, 205, 205,
- 868, 868, 868, 868, 868, 868, 868, 868,
- 869, 205, 205, 205, 205, 205, 205, 205,
+ 865, 865, 865, 865, 865, 865, 865, 865,
+ 866, 205, 205, 205, 205, 205, 205, 205,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
@@ -2854,19 +2854,19 @@ static const unsigned short uc_property_trie[] = {
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 160, 160, 160, 160, 160,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
481, 481, 481, 481, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
@@ -2887,67 +2887,67 @@ static const unsigned short uc_property_trie[] = {
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 160, 160,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 160,
- 160, 160, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 872, 873, 874,
- 874, 874, 871, 871, 871, 875, 872, 872,
- 872, 872, 872, 876, 876, 876, 876, 876,
- 876, 876, 876, 877, 877, 877, 877, 877,
- 877, 877, 877, 871, 871, 878, 878, 878,
- 878, 878, 877, 877, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 878, 878, 878, 878, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 871, 871, 871, 871, 160, 160,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 160,
+ 160, 160, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 869, 870, 871,
+ 871, 871, 868, 868, 868, 872, 869, 869,
+ 869, 869, 869, 873, 873, 873, 873, 873,
+ 873, 873, 873, 874, 874, 874, 874, 874,
+ 874, 874, 874, 868, 868, 875, 875, 875,
+ 875, 875, 874, 874, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 875, 875, 875, 875, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
@@ -2998,169 +2998,169 @@ static const unsigned short uc_property_trie[] = {
239, 239, 239, 239, 239, 239, 239, 239,
239, 239, 239, 239, 239, 239, 239, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 879, 879, 879, 879, 879, 879,
- 879, 879, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
-
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 881, 881,
- 881, 881, 881, 881, 881, 160, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 880, 160, 880, 880,
- 160, 160, 880, 160, 160, 880, 880, 160,
- 160, 880, 880, 880, 880, 160, 880, 880,
- 880, 880, 880, 880, 880, 880, 881, 881,
- 881, 881, 160, 881, 160, 881, 881, 881,
- 881, 102, 881, 881, 160, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
-
- 881, 881, 881, 881, 880, 880, 160, 880,
- 880, 880, 880, 160, 160, 880, 880, 880,
- 880, 880, 880, 880, 880, 160, 880, 880,
- 880, 880, 880, 880, 880, 160, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 880, 880, 160, 880, 880, 880, 880, 160,
- 880, 880, 880, 880, 880, 160, 880, 160,
- 160, 160, 880, 880, 880, 880, 880, 880,
- 880, 160, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
+ 876, 876, 876, 876, 876, 876, 876, 876,
+ 876, 876, 876, 876, 876, 876, 876, 876,
+ 876, 876, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 878, 878,
+ 878, 878, 878, 878, 878, 160, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 877, 160, 877, 877,
+ 160, 160, 877, 160, 160, 877, 877, 160,
+ 160, 877, 877, 877, 877, 160, 877, 877,
+ 877, 877, 877, 877, 877, 877, 878, 878,
+ 878, 878, 160, 878, 160, 878, 878, 878,
+ 878, 102, 878, 878, 160, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+
+ 878, 878, 878, 878, 877, 877, 160, 877,
+ 877, 877, 877, 160, 160, 877, 877, 877,
+ 877, 877, 877, 877, 877, 160, 877, 877,
+ 877, 877, 877, 877, 877, 160, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 877, 877, 160, 877, 877, 877, 877, 160,
+ 877, 877, 877, 877, 877, 160, 877, 160,
+ 160, 160, 877, 877, 877, 877, 877, 877,
+ 877, 160, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 103, 103, 160, 160,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 882, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 882, 881, 881, 881, 881,
- 881, 881, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 882, 881, 881, 881, 881,
-
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 882, 881, 881,
- 881, 881, 881, 881, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 882, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 882,
- 881, 881, 881, 881, 881, 881, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 882,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 882, 881, 881, 881, 881, 881, 881,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 880, 880, 880, 880, 880, 880, 880,
- 880, 882, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 881, 881, 881, 881, 881,
- 881, 881, 881, 882, 881, 881, 881, 881,
- 881, 881, 883, 725, 160, 160, 884, 885,
- 886, 887, 888, 889, 890, 891, 892, 893,
- 884, 885, 886, 887, 888, 889, 890, 891,
- 892, 893, 884, 885, 886, 887, 888, 889,
- 890, 891, 892, 893, 884, 885, 886, 887,
- 888, 889, 890, 891, 892, 893, 884, 885,
- 886, 887, 888, 889, 890, 891, 892, 893,
-
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 103, 103, 160, 160,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 879, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 879, 878, 878, 878, 878,
+ 878, 878, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 879, 878, 878, 878, 878,
+
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 879, 878, 878,
+ 878, 878, 878, 878, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 879, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 879,
+ 878, 878, 878, 878, 878, 878, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 879,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 879, 878, 878, 878, 878, 878, 878,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 877, 877, 877, 877, 877, 877, 877,
+ 877, 879, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 878, 878, 878, 878, 878,
+ 878, 878, 878, 879, 878, 878, 878, 878,
+ 878, 878, 880, 723, 160, 160, 881, 882,
+ 883, 884, 885, 886, 887, 888, 889, 890,
+ 881, 882, 883, 884, 885, 886, 887, 888,
+ 889, 890, 881, 882, 883, 884, 885, 886,
+ 887, 888, 889, 890, 881, 882, 883, 884,
+ 885, 886, 887, 888, 889, 890, 881, 882,
+ 883, 884, 885, 886, 887, 888, 889, 890,
+
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
@@ -3182,78 +3182,78 @@ static const unsigned short uc_property_trie[] = {
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 160, 160, 160, 160, 160, 160, 894, 894,
+ 160, 160, 160, 160, 160, 160, 891, 891,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 160,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 895, 895,
- 895, 895, 895, 895, 895, 895, 160, 160,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ 892, 892, 892, 892, 892, 892, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
@@ -3283,22 +3283,22 @@ static const unsigned short uc_property_trie[] = {
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 160, 876, 160, 160, 160, 160, 160, 160,
+ 160, 873, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 876, 876, 876, 876, 876, 876, 876, 876,
- 876, 876, 876, 876, 876, 876, 876, 876,
- 876, 876, 876, 876, 876, 876, 876, 876,
- 876, 876, 876, 876, 876, 876, 876, 876,
- 876, 876, 876, 876, 876, 876, 876, 876,
- 876, 876, 876, 876, 876, 876, 876, 876,
- 876, 876, 876, 876, 876, 876, 876, 876,
- 876, 876, 876, 876, 876, 876, 876, 876,
- 876, 876, 876, 876, 876, 876, 876, 876,
- 876, 876, 876, 876, 876, 876, 876, 876,
- 876, 876, 876, 876, 876, 876, 876, 876,
- 876, 876, 876, 876, 876, 876, 876, 876,
+ 873, 873, 873, 873, 873, 873, 873, 873,
+ 873, 873, 873, 873, 873, 873, 873, 873,
+ 873, 873, 873, 873, 873, 873, 873, 873,
+ 873, 873, 873, 873, 873, 873, 873, 873,
+ 873, 873, 873, 873, 873, 873, 873, 873,
+ 873, 873, 873, 873, 873, 873, 873, 873,
+ 873, 873, 873, 873, 873, 873, 873, 873,
+ 873, 873, 873, 873, 873, 873, 873, 873,
+ 873, 873, 873, 873, 873, 873, 873, 873,
+ 873, 873, 873, 873, 873, 873, 873, 873,
+ 873, 873, 873, 873, 873, 873, 873, 873,
+ 873, 873, 873, 873, 873, 873, 873, 873,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
@@ -3349,71 +3349,71 @@ static const unsigned short uc_property_trie[] = {
160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
-
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 896, 896,
- 896, 896, 896, 896, 896, 896, 894, 894,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 891, 891,
};
#define GET_PROP_INDEX(ucs4) \
@@ -3424,904 +3424,901 @@ static const unsigned short uc_property_trie[] = {
#define GET_PROP_INDEX_UCS2(ucs2) \
(uc_property_trie[uc_property_trie[ucs2>>5] + (ucs2 & 0x1f)])
-static const QUnicodeTables::Properties uc_properties [] = {
- { 10, 19, 18, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0},
- { 10, 15, 8, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3},
- { 10, 30, 7, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1},
- { 10, 31, 8, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3},
- { 10, 31, 9, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3},
- { 10, 29, 7, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1},
- { 10, 19, 7, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0},
- { 10, 19, 8, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0},
- { 7, 28, 9, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3},
- { 26, 5, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9},
- { 26, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10},
- { 26, 11, 4, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 28, 8, 4, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 9, 4, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 10},
- { 22, 0, 10, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10},
- { 23, 1, 10, 0, 0, -1, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 10},
- { 27, 8, 3, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 7, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0},
- { 21, 14, 3, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 7, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 8},
- { 26, 6, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 4, 10, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 2, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 2, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 2, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 2, 0, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 2, 0, 0, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 2, 0, 0, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 2, 0, 0, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 2, 0, 0, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 2, 0, 0, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 26, 7, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0},
- { 26, 7, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0},
- { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 32, 0, 0, 32, 0, 3, 5},
- { 22, 0, 10, 0, 0, -1, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 10},
- { 26, 8, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 23, 1, 10, 0, 0, -1, 1, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 10},
- { 29, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 20, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -32, -32, 0, 0, 3, 4},
- { 27, 15, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 10, 11, 7, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1},
- { 7, 3, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 28, 9, 4, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 30, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4},
- { 24, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 10},
- { 11, 15, 18, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 30, 9, 4, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 27, 8, 4, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 2, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 2, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 29, 16, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 743, 743, 775, 0, 3, 4},
- { 26, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0},
- { 6, 11, 2, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 25, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, -16, 0, 0, 0, 0, 0, 0, 10},
- { 6, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 3, 0, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 121, 121, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 1, 1, 0, 0, 0, 0, 6, 0, 0, 0, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -232, -232, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 91, 88, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -121, 0, 0, -121, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -300, -300, -268, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 195, 195, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 210, 0, 0, 210, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 206, 0, 0, 206, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 205, 0, 0, 205, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 79, 0, 0, 79, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 202, 0, 0, 202, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 203, 0, 0, 203, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 207, 0, 0, 207, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 97, 97, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 211, 0, 0, 211, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 209, 0, 0, 209, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 163, 163, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 213, 0, 0, 213, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 130, 130, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 214, 0, 0, 214, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 218, 0, 0, 218, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 217, 0, 0, 217, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 219, 0, 0, 219, 0, 3, 5},
- { 19, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 56, 56, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 2, 0, 1, 2, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 1, -1, 0, 1, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -2, -1, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -79, -79, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 113, 110, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, -97, 0, 0, -97, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, -56, 0, 0, -56, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, -130, 0, 0, -130, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 10795, 0, 0, 10795, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, -163, 0, 0, -163, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 10792, 0, 0, 10792, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, -195, 0, 0, -195, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 69, 0, 0, 69, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 71, 0, 0, 71, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -210, -210, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -206, -206, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -205, -205, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -202, -202, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -203, -203, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -207, -207, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -209, -209, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -211, -211, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 10743, 10743, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -213, -213, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -214, -214, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 10727, 10727, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -218, -218, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -69, -69, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -217, -217, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -71, -71, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -219, -219, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4},
- { 18, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4},
- { 18, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 18, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 18, 16, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 29, 11, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 18, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 29, 11, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 1, 19, 17, 230, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 232, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 220, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 216, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 202, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 1, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 240, 0, -1, 1, 0, 0, 0, 0, 0, 0, 84, 84, 116, 4, 1, 0},
- { 1, 19, 17, 230, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 220, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 3, 17, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 230, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 220, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 232, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 220, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 230, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 3, 17, 233, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 3, 17, 234, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 3, 17, 233, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 3, 17, 234, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 3, 17, 233, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 230, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 0, 11, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 16, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 130, 130, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 38, 0, 0, 38, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 37, 0, 0, 37, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 64, 0, 0, 64, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 63, 0, 0, 63, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 98, 94, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -38, -38, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -37, -37, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 106, 102, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -31, -31, 1, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -64, -64, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -63, -63, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -62, -62, -30, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -57, -57, -25, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -47, -47, -15, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -54, -54, -22, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -86, -86, -54, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -80, -80, -48, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, -60, 0, 0, -60, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, -96, -96, -64, 0, 3, 4},
- { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 15, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, -7, 0, 0, -7, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, -130, 0, 0, -130, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 80, 0, 0, 80, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 80, 0, 0, 80, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, -80, -80, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -80, -80, 0, 0, 3, 4},
- { 30, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 3, 19, 17, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 15, 0, 0, 15, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, -15, -15, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 48, 0, 0, 48, 0, 3, 5},
- { 26, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -48, -48, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 55, 52, 0, 0, 3, 4},
- { 26, 7, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 9},
- { 21, 15, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 0, 11, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 1, 19, 17, 220, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 230, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 222, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 228, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 10, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 11, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 12, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 13, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 14, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 15, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 16, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 17, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 18, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 19, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 19, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 20, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 21, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 22, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 26, 15, 1, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 1, 19, 17, 23, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 26, 11, 1, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 1, 19, 17, 24, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 25, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 26, 5, 1, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 1, 19, 17, 18, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 19, 11, 1, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 26, 11, 1, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 26, 11, 1, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0},
- { 11, 11, 13, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 0, 11, 13, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 28, 9, 13, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 5, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 7, 13, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0},
- { 30, 11, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 5, 13, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 5, 13, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 5, 13, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9},
- { 19, 11, 13, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 19, 11, 13, 0, 2, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 19, 11, 13, 0, 1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 18, 11, 13, 0, 3, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 1, 19, 17, 27, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 28, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 29, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 30, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 31, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 32, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 33, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 34, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 4, 10, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 5, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 5, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 5, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 5, 0, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 5, 0, 0, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 5, 0, 0, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 5, 0, 0, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 5, 0, 0, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 5, 0, 0, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 26, 5, 4, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 10, 5, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 26, 11, 13, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 19, 11, 13, 0, 1, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 1, 19, 17, 35, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 19, 11, 13, 0, 1, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 19, 11, 13, 0, 2, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 11, 11, 13, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 3, 19, 17, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 18, 11, 13, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 19, 11, 13, 0, 2, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 30, 11, 13, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 19, 11, 13, 0, 1, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 26, 11, 13, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9},
- { 26, 11, 13, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 11, 11, 18, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 1, 19, 17, 36, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 19, 11, 13, 0, 1, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 19, 11, 13, 0, 2, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 19, 11, 13, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 1, 19, 17, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 19, 11, 13, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 4, 10, 1, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 1, 0, 0, 1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 1, 0, 0, 2, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 1, 0, 0, 3, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 1, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 1, 0, 0, 5, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 1, 0, 0, 6, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 1, 0, 0, 7, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 1, 0, 0, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 1, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 19, 11, 1, 0, 1, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 1, 19, 17, 230, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 220, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 18, 11, 1, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 30, 11, 10, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 11, 10, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 7, 10, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0},
- { 26, 5, 10, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9},
- { 18, 11, 1, 0, 3, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 1, 19, 17, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 2, 19, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 19, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 1, 19, 17, 7, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 9, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 26, 15, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9},
- { 4, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 19, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 19, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 2, 19, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 6, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 1, 19, 17, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 2, 19, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 28, 8, 4, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 4, 10, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 1, 19, 17, 84, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 91, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 7, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 2, 19, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 19, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 1, 19, 17, 9, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 2, 19, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 26, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 19, 26, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 1, 26, 17, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 26, 17, 103, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 26, 17, 9, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 18, 26, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 1, 26, 17, 107, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 26, 15, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 1, 26, 17, 118, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 26, 17, 122, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 19, 11, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 30, 16, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 16, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 11, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 3, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 15, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 5, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 30, 11, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 30, 5, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 4, 10, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 5, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 7, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 9, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 6, 11, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 30, 15, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 1, 19, 17, 216, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 22, 0, 10, 0, 0, -1, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10},
- { 23, 1, 10, 0, 0, -1, 2, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 10},
- { 2, 19, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 1, 19, 17, 129, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 130, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 132, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 2, 15, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 1, 19, 17, 9, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 30, 15, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 30, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 16, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 19, 26, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 2, 26, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 1, 26, 17, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 26, 17, 7, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 26, 17, 9, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 4, 10, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 9, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 26, 15, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 7264, 0, 0, 7264, 0, 3, 5},
- { 19, 11, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 18, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 19, 23, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 6},
- { 19, 24, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 3, 6},
- { 19, 25, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 3, 6},
- { 30, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 15, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9},
- { 6, 11, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 0, 0, 0, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 0, 0, 0, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 0, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 0, 0, 0, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 0, 0, 0, 9, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 30, 11, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 7, 15, 9, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3},
- { 22, 0, 10, 0, 0, -1, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10},
- { 23, 1, 10, 0, 0, -1, 4, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 10},
- { 5, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 1, 19, 17, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 9, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 26, 15, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 11, 26, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 26, 4, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 18, 26, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 28, 8, 4, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 1, 26, 17, 230, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 6, 11, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 11, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 15, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 15, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9},
- { 21, 16, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 7, 3, 9, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3},
- { 1, 19, 17, 228, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 2, 19, 17, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 1, 19, 17, 222, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 26, 5, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9},
- { 4, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 2, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 3, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 19, 26, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 19, 26, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 2, 26, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 4, 10, 0, 0, 0, 1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 2, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 3, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 5, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 6, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 9, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 26, 26, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 2, 19, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 26, 15, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 2, 19, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 1, 19, 17, 7, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 2, 19, 0, 9, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 4, 10, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 2, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 3, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 5, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 6, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 7, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 26, 15, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9},
- { 26, 15, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 30, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 18, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4},
- { 18, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 3814, 3814, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 119, 116, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 125, 122, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 131, 128, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 137, 134, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 143, 140, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, -59, -59, -58, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -8, 0, 0, -8, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 149, 146, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 156, 152, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 164, 160, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 172, 168, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 74, 74, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 86, 86, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 100, 100, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 128, 128, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 112, 112, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 126, 126, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 244, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 247, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 250, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 253, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 256, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 259, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 262, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 265, 8, 0, 0, 3, 4},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 244, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 247, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 250, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 253, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 256, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 259, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 262, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 268, 0, -8, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 271, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 274, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 277, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 280, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 283, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 286, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 289, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 292, 8, 0, 0, 3, 4},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 271, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 274, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 277, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 280, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 283, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 286, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 289, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 295, 0, -8, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 298, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 301, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 304, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 307, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 310, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 313, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 316, 8, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 319, 8, 0, 0, 3, 4},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 298, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 301, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 304, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 307, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 310, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 313, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 316, 0, -8, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 322, 0, -8, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 346, 343, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 325, 9, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 352, 349, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 179, 176, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 383, 379, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -74, 0, 0, -74, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -9, 328, 0, -9, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -7205, -7205, -7173, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 358, 355, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 331, 9, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 364, 361, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 185, 182, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 391, 387, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -86, 0, 0, -86, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -9, 334, 0, -9, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 192, 188, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 94, 94, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 199, 196, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 206, 202, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -100, 0, 0, -100, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 214, 210, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 102, 102, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 221, 218, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 227, 224, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 234, 230, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -112, 0, 0, -112, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -7, 0, 0, -7, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 370, 367, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 337, 9, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 376, 373, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 241, 238, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 399, 395, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -128, 0, 0, -128, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -126, 0, 0, -126, 0, 3, 5},
- { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -9, 340, 0, -9, 0, 3, 5},
- { 7, 15, 9, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3},
- { 7, 3, 9, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3},
- { 11, 18, 18, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 11, 19, 18, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 11, 19, 18, 0, 3, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 11, 19, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 11, 19, 1, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 21, 15, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 21, 3, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 21, 17, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 21, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 24, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10},
- { 25, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 4, 10},
- { 22, 0, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10},
- { 24, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10},
- { 25, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 10},
- { 26, 13, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 15, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0},
- { 8, 31, 9, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1},
- { 9, 31, 7, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1},
- { 11, 19, 11, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 11, 19, 14, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 11, 19, 16, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 11, 19, 12, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 11, 19, 15, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 7, 3, 6, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3},
- { 26, 9, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 4, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9},
- { 27, 7, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0},
- { 26, 4, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9},
- { 26, 4, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9},
- { 26, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 11, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 20, 11, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0},
- { 26, 11, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 15, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 7, 15, 9, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3},
- { 11, 20, 18, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 11, 11, 18, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 11, 19, 18, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 6, 11, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 16, 11, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4},
- { 6, 11, 2, 0, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 2, 0, 0, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 2, 0, 0, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 2, 0, 0, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 2, 0, 0, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 2, 0, 0, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 3, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 28, 8, 4, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 28, 8, 4, 0, 0, -1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 28, 8, 4, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 28, 8, 4, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 3, 19, 17, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 1, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 220, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 1, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 30, 9, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 30, 8, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -7517, 0, 0, -7517, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -8383, 0, 0, -8383, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -8262, 0, 0, -8262, 0, 3, 5},
- { 30, 11, 4, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 28, 0, 0, 28, 0, 3, 5},
- { 30, 11, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 15, 11, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5},
- { 30, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 16, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, -28, -28, 0, 0, 3, 4},
- { 5, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 16, 0, 0, 16, 0, 3, 5},
- { 5, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -16, -16, 0, 0, 3, 4},
- { 5, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, -3, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 2016, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 138, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 1824, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 2104, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 2108, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 2106, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, -138, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, -7, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 2, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 30, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 26, 0, 0, 26, 0, 3, 5},
- { 30, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -26, -26, 0, 0, 3, 4},
- { 6, 11, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 2, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 3, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 8, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 9, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 10, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 30, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10},
- { 30, 5, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 22, 0, 10, 0, 0, -1, 6, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10},
- { 23, 1, 10, 0, 0, -1, 6, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 10},
- { 27, 11, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 8, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0},
- { 22, 0, 10, 0, 0, -1, 8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10},
- { 23, 1, 10, 0, 0, -1, 8, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 10},
- { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0},
- { 22, 0, 10, 0, 0, -1, 6, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 10},
- { 23, 1, 10, 0, 0, -1, 6, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10},
- { 22, 0, 10, 0, 0, -1, 6, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 10},
- { 23, 1, 10, 0, 0, -1, 6, 0, 0, 0, 0, -3, 0, 0, 0, 0, 0, 0, 10},
- { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, -1824, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, -2016, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, -2104, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, -2106, 0, 0, 0, 0, 0, 0, 0},
- { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, -2108, 0, 0, 0, 0, 0, 0, 0},
- { 15, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 48, 0, 0, 48, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, -48, -48, 0, 0, 3, 4},
- { 15, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, -10743, 0, 0, -10743, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, -3814, 0, 0, -3814, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, -10727, 0, 0, -10727, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, -10795, -10795, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, -10792, -10792, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4},
- { 6, 11, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 16, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, -7264, -7264, 0, 0, 3, 4},
- { 26, 2, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10},
- { 24, 2, 10, 0, 0, -1, 8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10},
- { 25, 2, 10, 0, 0, -1, 8, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 10},
- { 21, 15, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 30, 12, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 7, 12, 9, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3},
- { 26, 1, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 1, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9},
- { 26, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 30, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 18, 4, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 19, 12, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 5, 12, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 21, 4, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 23, 1, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10},
- { 1, 19, 17, 218, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 228, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 222, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 224, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 21, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 18, 12, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6},
- { 5, 12, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 18, 4, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 19, 4, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 26, 12, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 19, 4, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 19, 4, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 1, 19, 17, 8, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 29, 4, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0},
- { 18, 4, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 19, 12, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 21, 4, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0},
- { 19, 4, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6},
- { 19, 12, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6},
- { 26, 4, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 18, 4, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6},
- { 19, 12, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6},
- { 19, 12, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 30, 12, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 12, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 19, 12, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 30, 12, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 19, 4, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6},
- { 30, 12, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 12, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 19, 12, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 19, 12, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 18, 4, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 30, 12, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 29, 11, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 18, 11, 10, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 29, 11, 10, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 2, 19, 17, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 1, 19, 17, 9, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 26, 16, 10, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 19, 21, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 3, 6},
- { 19, 22, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 3, 6},
- { 12, 27, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 13, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 19, 12, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 12, 9, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 18, 15, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 24, 21, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 31, 27, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 39, 35, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 46, 43, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 49, 43, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 61, 58, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 67, 64, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 73, 70, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 79, 76, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 85, 82, 0, 0, 3, 4},
- { 19, 11, 1, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 1, 19, 17, 26, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 0, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 28, 9, 13, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 7, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0},
- { 26, 1, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 5, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 22, 0, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10},
- { 23, 1, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10},
- { 26, 13, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 20, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0},
- { 22, 0, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10},
- { 23, 1, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10},
- { 26, 1, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 1, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9},
- { 26, 4, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 12, 4, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 27, 12, 3, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 21, 12, 3, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 27, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0},
- { 27, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0},
- { 27, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 11, 20, 18, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 26, 12, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 4, 12, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 4, 12, 2, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 4, 12, 2, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 4, 12, 2, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 4, 12, 2, 0, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 4, 12, 2, 0, 0, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 4, 12, 2, 0, 0, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 4, 12, 2, 0, 0, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 4, 12, 2, 0, 0, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 4, 12, 2, 0, 0, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 27, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0},
- { 27, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0},
- { 15, 12, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 32, 0, 0, 32, 0, 3, 5},
- { 29, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 16, 12, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -32, -32, 0, 0, 3, 4},
- { 19, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6},
- { 11, 19, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 30, 11, 10, 0, 0, -1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 0, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 15, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 15, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 30, 15, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 30, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 5, 11, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 19, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 6, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 5, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 5, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 15, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 40, 0, 0, 40, 0, 3, 5},
- { 15, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 40, 0, 0, 40, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, -40, -40, 0, 0, 3, 4},
- { 16, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, -40, -40, 0, 0, 3, 4},
- { 19, 11, 1, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 19, 11, 1, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 6, 11, 1, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 15, 10, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 19, 11, 1, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 6, 11, 1, 0, 0, 1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 1, 0, 0, 2, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 1, 0, 0, 3, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 1, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 6, 11, 1, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 15, 1, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 26, 11, 1, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 5, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6},
- { 30, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 2, 19, 0, 216, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 2, 19, 0, 216, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 1, 19, 17, 1, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 2, 19, 0, 226, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 11, 19, 18, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2},
- { 1, 19, 17, 220, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 1, 19, 17, 230, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0},
- { 6, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 15, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5},
- { 16, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4},
- { 27, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 15, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5},
- { 4, 10, 2, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 2, 0, 0, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 2, 0, 0, 2, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 2, 0, 0, 3, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 2, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 2, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 2, 0, 0, 6, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 2, 0, 0, 7, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 2, 0, 0, 8, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 4, 10, 2, 0, 0, 9, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7},
- { 0, 11, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 19, 12, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6},
- { 13, 11, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+static const QUnicodeTables::Properties uc_properties[] = {
+ { 10, 19, 18, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0 },
+ { 10, 15, 8, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3 },
+ { 10, 30, 7, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1 },
+ { 10, 31, 8, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3 },
+ { 10, 31, 9, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3 },
+ { 10, 29, 7, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1 },
+ { 10, 19, 7, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0 },
+ { 10, 19, 8, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0 },
+ { 7, 28, 9, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3 },
+ { 26, 5, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 },
+ { 26, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10 },
+ { 26, 11, 4, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 28, 8, 4, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 9, 4, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 10 },
+ { 22, 0, 10, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10 },
+ { 23, 1, 10, 0, 0, -1, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 10 },
+ { 27, 8, 3, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 7, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0 },
+ { 21, 14, 3, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 7, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 8 },
+ { 26, 6, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 4, 10, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 2, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 2, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 2, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 2, 0, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 2, 0, 0, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 2, 0, 0, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 2, 0, 0, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 2, 0, 0, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 2, 0, 0, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 26, 7, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0 },
+ { 26, 7, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0 },
+ { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 32, 0, 0, 32, 0, 3, 5 },
+ { 22, 0, 10, 0, 0, -1, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 10 },
+ { 26, 8, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 23, 1, 10, 0, 0, -1, 1, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 10 },
+ { 29, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 20, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -32, -32, 0, 0, 3, 4 },
+ { 27, 15, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 10, 11, 7, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1 },
+ { 7, 3, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 28, 9, 4, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 30, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4 },
+ { 24, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 10 },
+ { 11, 15, 18, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 30, 9, 4, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 8, 4, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 2, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 2, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 29, 16, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 743, 743, 775, 0, 3, 4 },
+ { 26, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0 },
+ { 6, 11, 2, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 25, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, -16, 0, 0, 0, 0, 0, 0, 10 },
+ { 6, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 3, 0, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 121, 121, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 1, 0, 0, 0, 0, 6, 0, 0, 0, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -232, -232, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 85, 85, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -121, 0, 0, -121, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -300, -300, -268, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 195, 195, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 210, 0, 0, 210, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 206, 0, 0, 206, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 205, 0, 0, 205, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 79, 0, 0, 79, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 202, 0, 0, 202, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 203, 0, 0, 203, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 207, 0, 0, 207, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 97, 97, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 211, 0, 0, 211, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 209, 0, 0, 209, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 163, 163, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 213, 0, 0, 213, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 130, 130, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 214, 0, 0, 214, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 218, 0, 0, 218, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 217, 0, 0, 217, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 219, 0, 0, 219, 0, 3, 5 },
+ { 19, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 56, 56, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 2, 0, 1, 2, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 1, -1, 0, 1, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -2, -1, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -79, -79, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 96, 96, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, -97, 0, 0, -97, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, -56, 0, 0, -56, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, -130, 0, 0, -130, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 10795, 0, 0, 10795, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, -163, 0, 0, -163, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 10792, 0, 0, 10792, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, -195, 0, 0, -195, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 69, 0, 0, 69, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 71, 0, 0, 71, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -210, -210, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -206, -206, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -205, -205, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -202, -202, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -203, -203, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -207, -207, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -209, -209, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -211, -211, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 10743, 10743, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -213, -213, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -214, -214, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 10727, 10727, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -218, -218, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -69, -69, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -217, -217, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -71, -71, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -219, -219, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4 },
+ { 18, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4 },
+ { 18, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 18, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 18, 16, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 29, 11, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 18, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 29, 11, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 19, 17, 230, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 232, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 220, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 216, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 202, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 1, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 240, 0, -1, 1, 0, 0, 0, 0, 0, 0, 84, 84, 116, 4, 1, 0 },
+ { 1, 19, 17, 230, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 220, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 3, 17, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 230, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 220, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 232, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 220, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 230, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 3, 17, 233, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 3, 17, 234, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 3, 17, 233, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 3, 17, 234, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 3, 17, 233, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 230, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 14, 11, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 16, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 130, 130, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 38, 0, 0, 38, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 37, 0, 0, 37, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 64, 0, 0, 64, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 63, 0, 0, 63, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 88, 88, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -38, -38, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -37, -37, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 92, 92, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -31, -31, 1, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -64, -64, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -63, -63, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -62, -62, -30, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -57, -57, -25, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -47, -47, -15, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -54, -54, -22, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -86, -86, -54, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -80, -80, -48, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, -60, 0, 0, -60, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, -96, -96, -64, 0, 3, 4 },
+ { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 15, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, -7, 0, 0, -7, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, -130, 0, 0, -130, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 80, 0, 0, 80, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 80, 0, 0, 80, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, -80, -80, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -80, -80, 0, 0, 3, 4 },
+ { 30, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 3, 19, 17, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 15, 0, 0, 15, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, -15, -15, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 48, 0, 0, 48, 0, 3, 5 },
+ { 26, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -48, -48, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 52, 49, 0, 0, 3, 4 },
+ { 26, 7, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 9 },
+ { 21, 15, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 14, 11, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 19, 17, 220, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 230, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 222, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 228, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 10, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 11, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 12, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 13, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 14, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 15, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 16, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 17, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 18, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 19, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 19, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 20, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 21, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 22, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 26, 15, 1, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 19, 17, 23, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 26, 11, 1, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 19, 17, 24, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 25, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 26, 5, 1, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 19, 17, 18, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 19, 11, 1, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 26, 11, 1, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 26, 11, 1, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0 },
+ { 11, 11, 13, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 14, 11, 13, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 28, 9, 13, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 5, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 7, 13, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0 },
+ { 30, 11, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 5, 13, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 5, 13, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 5, 13, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 },
+ { 19, 11, 13, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 19, 11, 13, 0, 2, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 19, 11, 13, 0, 1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 18, 11, 13, 0, 3, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 1, 19, 17, 27, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 28, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 29, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 30, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 31, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 32, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 33, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 34, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 4, 10, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 5, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 5, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 5, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 5, 0, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 5, 0, 0, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 5, 0, 0, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 5, 0, 0, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 5, 0, 0, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 5, 0, 0, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 26, 5, 4, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 10, 5, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 26, 11, 13, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 19, 11, 13, 0, 1, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 1, 19, 17, 35, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 19, 11, 13, 0, 1, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 19, 11, 13, 0, 2, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 11, 11, 13, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 3, 19, 17, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 18, 11, 13, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 19, 11, 13, 0, 2, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 30, 11, 13, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 19, 11, 13, 0, 1, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 26, 11, 13, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 },
+ { 26, 11, 13, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 11, 11, 18, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 1, 19, 17, 36, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 19, 11, 13, 0, 1, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 19, 11, 13, 0, 2, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 19, 11, 13, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 1, 19, 17, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 19, 11, 13, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 4, 10, 1, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 1, 0, 0, 1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 1, 0, 0, 2, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 1, 0, 0, 3, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 1, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 1, 0, 0, 5, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 1, 0, 0, 6, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 1, 0, 0, 7, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 1, 0, 0, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 1, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 19, 11, 1, 0, 1, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 1, 19, 17, 230, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 220, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 18, 11, 1, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 30, 11, 10, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 11, 10, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 7, 10, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0 },
+ { 26, 5, 10, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 },
+ { 18, 11, 1, 0, 3, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 1, 19, 17, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 2, 19, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 19, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 1, 19, 17, 7, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 9, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 26, 15, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 },
+ { 4, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 19, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 19, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 2, 19, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 6, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 19, 17, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 2, 19, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 28, 8, 4, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 4, 10, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 1, 19, 17, 84, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 91, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 7, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 2, 19, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 19, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 1, 19, 17, 9, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 2, 19, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 26, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 19, 26, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 1, 26, 17, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 26, 17, 103, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 26, 17, 9, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 18, 26, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 1, 26, 17, 107, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 26, 15, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 26, 17, 118, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 26, 17, 122, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 19, 11, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 30, 16, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 16, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 11, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 3, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 15, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 5, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 30, 11, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 30, 5, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 4, 10, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 5, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 7, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 9, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 6, 11, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 30, 15, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 19, 17, 216, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 22, 0, 10, 0, 0, -1, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10 },
+ { 23, 1, 10, 0, 0, -1, 2, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 10 },
+ { 2, 19, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 19, 17, 129, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 130, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 132, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 2, 15, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 1, 19, 17, 9, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 30, 15, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 30, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 16, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 19, 26, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 2, 26, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 1, 26, 17, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 26, 17, 7, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 26, 17, 9, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 4, 10, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 9, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 26, 15, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 7264, 0, 0, 7264, 0, 3, 5 },
+ { 19, 11, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 18, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 19, 23, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 6 },
+ { 19, 24, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 3, 6 },
+ { 19, 25, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 3, 6 },
+ { 30, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 15, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 },
+ { 6, 11, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 0, 0, 0, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 0, 0, 0, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 0, 0, 0, 6, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 0, 0, 0, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 0, 0, 0, 9, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 30, 11, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 7, 15, 9, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3 },
+ { 22, 0, 10, 0, 0, -1, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10 },
+ { 23, 1, 10, 0, 0, -1, 4, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 10 },
+ { 5, 11, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 1, 19, 17, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 9, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 26, 15, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 11, 26, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 26, 4, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 18, 26, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 28, 8, 4, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 26, 17, 230, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 6, 11, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 11, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 15, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 15, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 },
+ { 21, 16, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 7, 3, 9, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3 },
+ { 1, 19, 17, 228, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 2, 19, 17, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 1, 19, 17, 222, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 26, 5, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 },
+ { 4, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 2, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 3, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 19, 26, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 19, 26, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 2, 26, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 4, 10, 0, 0, 0, 1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 2, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 3, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 5, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 6, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 9, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 26, 26, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 2, 19, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 26, 15, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 2, 19, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 1, 19, 17, 7, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 2, 19, 0, 9, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 4, 10, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 2, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 3, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 5, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 6, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 7, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 26, 15, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 },
+ { 26, 15, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 30, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 18, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4 },
+ { 18, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 3814, 3814, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 99, 99, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 102, 102, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 105, 105, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 108, 108, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 111, 111, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, -59, -59, -58, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -8, 0, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 114, 114, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 117, 117, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 121, 121, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 125, 125, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 74, 74, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 86, 86, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 100, 100, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 128, 128, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 112, 112, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 126, 126, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 163, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 166, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 169, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 172, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 175, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 178, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 181, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 184, 8, 0, 0, 3, 4 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 163, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 166, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 169, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 172, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 175, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 178, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 181, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 184, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 187, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 190, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 193, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 196, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 199, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 202, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 205, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 208, 8, 0, 0, 3, 4 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 187, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 190, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 193, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 196, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 199, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 202, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 205, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 208, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 211, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 214, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 217, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 220, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 223, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 226, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 229, 8, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 232, 8, 0, 0, 3, 4 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 211, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 214, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 217, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 220, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 223, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 226, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 229, 0, -8, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -8, 232, 0, -8, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 247, 244, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 235, 9, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 253, 250, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 129, 129, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 284, 280, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -74, 0, 0, -74, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -9, 235, 0, -9, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -7205, -7205, -7173, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 259, 256, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 238, 9, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 265, 262, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 132, 132, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 292, 288, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -86, 0, 0, -86, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -9, 238, 0, -9, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 135, 135, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 139, 139, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 142, 142, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -100, 0, 0, -100, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 146, 146, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 150, 150, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 153, 153, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 156, 156, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -112, 0, 0, -112, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -7, 0, 0, -7, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 271, 268, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, 0, 241, 9, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 277, 274, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 160, 160, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 300, 296, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -128, 0, 0, -128, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -126, 0, 0, -126, 0, 3, 5 },
+ { 17, 11, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -9, 241, 0, -9, 0, 3, 5 },
+ { 7, 15, 9, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3 },
+ { 7, 3, 9, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3 },
+ { 11, 18, 18, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 11, 19, 18, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 11, 19, 18, 0, 3, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 11, 19, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 11, 19, 1, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 21, 15, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 21, 3, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 21, 17, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 21, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 24, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10 },
+ { 25, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 4, 10 },
+ { 22, 0, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10 },
+ { 24, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10 },
+ { 25, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 10 },
+ { 26, 13, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 15, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0 },
+ { 8, 31, 9, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1 },
+ { 9, 31, 7, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1 },
+ { 11, 19, 11, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 11, 19, 14, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 11, 19, 16, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 11, 19, 12, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 11, 19, 15, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 7, 3, 6, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3 },
+ { 26, 9, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 4, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 },
+ { 27, 7, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0 },
+ { 26, 4, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 },
+ { 26, 4, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 },
+ { 26, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 11, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 20, 11, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0 },
+ { 26, 11, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 15, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 7, 15, 9, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3 },
+ { 11, 20, 18, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 11, 11, 18, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 11, 19, 18, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 6, 11, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 16, 11, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4 },
+ { 6, 11, 2, 0, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 2, 0, 0, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 2, 0, 0, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 2, 0, 0, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 2, 0, 0, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 2, 0, 0, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 3, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 28, 8, 4, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 28, 8, 4, 0, 0, -1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 28, 8, 4, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 28, 8, 4, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 3, 19, 17, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 1, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 220, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 1, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 30, 9, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 30, 8, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -7517, 0, 0, -7517, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -8383, 0, 0, -8383, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -8262, 0, 0, -8262, 0, 3, 5 },
+ { 30, 11, 4, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 15, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 28, 0, 0, 28, 0, 3, 5 },
+ { 30, 11, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 15, 11, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5 },
+ { 30, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 16, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, -28, -28, 0, 0, 3, 4 },
+ { 5, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 16, 0, 0, 16, 0, 3, 5 },
+ { 5, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -16, -16, 0, 0, 3, 4 },
+ { 5, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, -3, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 2016, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 138, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 1824, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 2104, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 2108, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, 2106, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 1, 0, 0, 0, 0, -138, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, -7, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 2, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 30, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 26, 0, 0, 26, 0, 3, 5 },
+ { 30, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -26, -26, 0, 0, 3, 4 },
+ { 6, 11, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 2, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 3, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 8, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 9, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 10, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 30, 2, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10 },
+ { 30, 5, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 22, 0, 10, 0, 0, -1, 6, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10 },
+ { 23, 1, 10, 0, 0, -1, 6, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 10 },
+ { 27, 11, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 8, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0 },
+ { 22, 0, 10, 0, 0, -1, 8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10 },
+ { 23, 1, 10, 0, 0, -1, 8, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 10 },
+ { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0 },
+ { 22, 0, 10, 0, 0, -1, 6, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 10 },
+ { 23, 1, 10, 0, 0, -1, 6, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10 },
+ { 22, 0, 10, 0, 0, -1, 6, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 10 },
+ { 23, 1, 10, 0, 0, -1, 6, 0, 0, 0, 0, -3, 0, 0, 0, 0, 0, 0, 10 },
+ { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, -1824, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, -2016, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, -2104, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, -2106, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 11, 10, 0, 0, -1, 6, 0, 0, 0, 0, -2108, 0, 0, 0, 0, 0, 0, 0 },
+ { 15, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 48, 0, 0, 48, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, -48, -48, 0, 0, 3, 4 },
+ { 15, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, -10743, 0, 0, -10743, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, -3814, 0, 0, -3814, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, -10727, 0, 0, -10727, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, -10795, -10795, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, -10792, -10792, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4 },
+ { 6, 11, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 16, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, -7264, -7264, 0, 0, 3, 4 },
+ { 26, 2, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10 },
+ { 24, 2, 10, 0, 0, -1, 8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10 },
+ { 25, 2, 10, 0, 0, -1, 8, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 10 },
+ { 21, 15, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 30, 12, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 7, 12, 9, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3 },
+ { 26, 1, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 1, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 },
+ { 26, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 30, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 18, 4, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 19, 12, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 5, 12, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 21, 4, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 23, 1, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10 },
+ { 1, 19, 17, 218, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 228, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 222, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 224, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 21, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 18, 12, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6 },
+ { 5, 12, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 18, 4, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 19, 4, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 26, 12, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 19, 4, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 19, 4, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 1, 19, 17, 8, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 29, 4, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0 },
+ { 18, 4, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 19, 12, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 21, 4, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0 },
+ { 19, 4, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6 },
+ { 19, 12, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6 },
+ { 26, 4, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 18, 4, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6 },
+ { 19, 12, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6 },
+ { 19, 12, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 30, 12, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 12, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 19, 12, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 30, 12, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 19, 4, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6 },
+ { 30, 12, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 12, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 19, 12, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 19, 12, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 18, 4, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 30, 12, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 29, 11, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 18, 11, 10, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 29, 11, 10, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 2, 19, 17, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 19, 17, 9, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 26, 16, 10, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 19, 21, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 3, 6 },
+ { 19, 22, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 3, 6 },
+ { 12, 27, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 13, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 19, 12, 0, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 12, 9, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 18, 15, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 24, 21, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 31, 27, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 39, 35, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 46, 43, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 58, 55, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 64, 61, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 70, 67, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 76, 73, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 1, 0, 1, 1, 0, 0, 0, 82, 79, 0, 0, 3, 4 },
+ { 19, 11, 1, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 1, 19, 17, 26, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 14, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 28, 9, 13, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 7, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0 },
+ { 26, 1, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 5, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 22, 0, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10 },
+ { 23, 1, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10 },
+ { 26, 13, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 20, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0 },
+ { 22, 0, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10 },
+ { 23, 1, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10 },
+ { 26, 1, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 1, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 },
+ { 26, 4, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 12, 4, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 12, 3, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 21, 12, 3, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 11, 20, 18, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 26, 12, 6, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 4, 12, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 4, 12, 2, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 4, 12, 2, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 4, 12, 2, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 4, 12, 2, 0, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 4, 12, 2, 0, 0, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 4, 12, 2, 0, 0, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 4, 12, 2, 0, 0, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 4, 12, 2, 0, 0, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 4, 12, 2, 0, 0, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0 },
+ { 27, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0 },
+ { 15, 12, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 32, 0, 0, 32, 0, 3, 5 },
+ { 29, 12, 10, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 16, 12, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -32, -32, 0, 0, 3, 4 },
+ { 19, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6 },
+ { 11, 19, 10, 0, 0, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 30, 11, 10, 0, 0, -1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 14, 11, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 15, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 15, 10, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 30, 15, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 30, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 5, 11, 10, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 19, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 6, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 5, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 5, 11, 0, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 15, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 40, 0, 0, 40, 0, 3, 5 },
+ { 15, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 40, 0, 0, 40, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, -40, -40, 0, 0, 3, 4 },
+ { 16, 11, 0, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, -40, -40, 0, 0, 3, 4 },
+ { 19, 11, 1, 0, 0, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 19, 11, 1, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 6, 11, 1, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 15, 10, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 19, 11, 1, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 6, 11, 1, 0, 0, 1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 1, 0, 0, 2, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 1, 0, 0, 3, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 1, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 6, 11, 1, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 15, 1, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 26, 11, 1, 0, 0, -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 5, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6 },
+ { 30, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 2, 19, 0, 216, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 2, 19, 0, 216, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 19, 17, 1, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 2, 19, 0, 226, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 11, 19, 18, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2 },
+ { 1, 19, 17, 220, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 1, 19, 17, 230, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0 },
+ { 6, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 15, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5 },
+ { 16, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4 },
+ { 27, 11, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 15, 11, 0, 0, 0, -1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5 },
+ { 4, 10, 2, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 2, 0, 0, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 2, 0, 0, 2, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 2, 0, 0, 3, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 2, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 2, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 2, 0, 0, 6, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 2, 0, 0, 7, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 2, 0, 0, 8, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 4, 10, 2, 0, 0, 9, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 },
+ { 14, 11, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 19, 12, 0, 0, 0, -1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 },
+ { 13, 11, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
};
static inline const QUnicodeTables::Properties *qGetProp(uint ucs4)
@@ -4348,35 +4345,103 @@ Q_CORE_EXPORT const QUnicodeTables::Properties * QT_FASTCALL QUnicodeTables::pro
return uc_properties + index;
}
-#define CURRENT_VERSION QChar::Unicode_5_0
-
-static const ushort specialCaseMap [] = {
- 0x53, 0x73, 0x0, 0x53, 0x53, 0x0, 0x69, 0x307, 0x0, 0x46, 0x66, 0x0, 0x46, 0x46, 0x0, 0x46,
- 0x69, 0x0, 0x46, 0x49, 0x0, 0x46, 0x6c, 0x0, 0x46, 0x4c, 0x0, 0x46, 0x66, 0x69, 0x0, 0x46,
- 0x46, 0x49, 0x0, 0x46, 0x66, 0x6c, 0x0, 0x46, 0x46, 0x4c, 0x0, 0x53, 0x74, 0x0, 0x53, 0x54,
- 0x0, 0x53, 0x54, 0x0, 0x535, 0x582, 0x0, 0x535, 0x552, 0x0, 0x544, 0x576, 0x0, 0x544, 0x546, 0x0,
- 0x544, 0x565, 0x0, 0x544, 0x535, 0x0, 0x544, 0x56b, 0x0, 0x544, 0x53b, 0x0, 0x54e, 0x576, 0x0, 0x54e,
- 0x546, 0x0, 0x544, 0x56d, 0x0, 0x544, 0x53d, 0x0, 0x2bc, 0x4e, 0x0, 0x2bc, 0x4e, 0x0, 0x399, 0x308,
- 0x301, 0x0, 0x399, 0x308, 0x301, 0x0, 0x3a5, 0x308, 0x301, 0x0, 0x3a5, 0x308, 0x301, 0x0, 0x4a, 0x30c,
- 0x0, 0x4a, 0x30c, 0x0, 0x48, 0x331, 0x0, 0x48, 0x331, 0x0, 0x54, 0x308, 0x0, 0x54, 0x308, 0x0,
- 0x57, 0x30a, 0x0, 0x57, 0x30a, 0x0, 0x59, 0x30a, 0x0, 0x59, 0x30a, 0x0, 0x41, 0x2be, 0x0, 0x41,
- 0x2be, 0x0, 0x3a5, 0x313, 0x0, 0x3a5, 0x313, 0x0, 0x3a5, 0x313, 0x300, 0x0, 0x3a5, 0x313, 0x300, 0x0,
- 0x3a5, 0x313, 0x301, 0x0, 0x3a5, 0x313, 0x301, 0x0, 0x3a5, 0x313, 0x342, 0x0, 0x3a5, 0x313, 0x342, 0x0,
- 0x391, 0x342, 0x0, 0x391, 0x342, 0x0, 0x397, 0x342, 0x0, 0x397, 0x342, 0x0, 0x399, 0x308, 0x300, 0x0,
- 0x399, 0x308, 0x300, 0x0, 0x399, 0x342, 0x0, 0x399, 0x342, 0x0, 0x399, 0x308, 0x342, 0x0, 0x399, 0x308,
- 0x342, 0x0, 0x3a5, 0x308, 0x300, 0x0, 0x3a5, 0x308, 0x300, 0x0, 0x3a1, 0x313, 0x0, 0x3a1, 0x313, 0x0,
- 0x3a5, 0x342, 0x0, 0x3a5, 0x342, 0x0, 0x3a5, 0x308, 0x342, 0x0, 0x3a5, 0x308, 0x342, 0x0, 0x3a9, 0x342,
- 0x0, 0x3a9, 0x342, 0x0, 0x1f08, 0x399, 0x0, 0x1f09, 0x399, 0x0, 0x1f0a, 0x399, 0x0, 0x1f0b, 0x399, 0x0,
- 0x1f0c, 0x399, 0x0, 0x1f0d, 0x399, 0x0, 0x1f0e, 0x399, 0x0, 0x1f0f, 0x399, 0x0, 0x1f0f, 0x399, 0x0, 0x1f28,
- 0x399, 0x0, 0x1f29, 0x399, 0x0, 0x1f2a, 0x399, 0x0, 0x1f2b, 0x399, 0x0, 0x1f2c, 0x399, 0x0, 0x1f2d, 0x399,
- 0x0, 0x1f2e, 0x399, 0x0, 0x1f2f, 0x399, 0x0, 0x1f2f, 0x399, 0x0, 0x1f68, 0x399, 0x0, 0x1f69, 0x399, 0x0,
- 0x1f6a, 0x399, 0x0, 0x1f6b, 0x399, 0x0, 0x1f6c, 0x399, 0x0, 0x1f6d, 0x399, 0x0, 0x1f6e, 0x399, 0x0, 0x1f6f,
- 0x399, 0x0, 0x1f6f, 0x399, 0x0, 0x391, 0x399, 0x0, 0x391, 0x399, 0x0, 0x397, 0x399, 0x0, 0x397, 0x399,
- 0x0, 0x3a9, 0x399, 0x0, 0x3a9, 0x399, 0x0, 0x1fba, 0x345, 0x0, 0x1fba, 0x399, 0x0, 0x386, 0x345, 0x0,
- 0x386, 0x399, 0x0, 0x1fca, 0x345, 0x0, 0x1fca, 0x399, 0x0, 0x389, 0x345, 0x0, 0x389, 0x399, 0x0, 0x1ffa,
- 0x345, 0x0, 0x1ffa, 0x399, 0x0, 0x38f, 0x345, 0x0, 0x38f, 0x399, 0x0, 0x391, 0x342, 0x345, 0x0, 0x391,
- 0x342, 0x399, 0x0, 0x397, 0x342, 0x345, 0x0, 0x397, 0x342, 0x399, 0x0, 0x3a9, 0x342, 0x345, 0x0, 0x3a9,
- 0x342, 0x399, 0x0
+static const ushort specialCaseMap[] = {
+ 0x53, 0x73, 0x0,
+ 0x53, 0x53, 0x0,
+ 0x69, 0x307, 0x0,
+ 0x46, 0x66, 0x0,
+ 0x46, 0x46, 0x0,
+ 0x46, 0x69, 0x0,
+ 0x46, 0x49, 0x0,
+ 0x46, 0x6c, 0x0,
+ 0x46, 0x4c, 0x0,
+ 0x46, 0x66, 0x69, 0x0,
+ 0x46, 0x46, 0x49, 0x0,
+ 0x46, 0x66, 0x6c, 0x0,
+ 0x46, 0x46, 0x4c, 0x0,
+ 0x53, 0x74, 0x0,
+ 0x53, 0x54, 0x0,
+ 0x535, 0x582, 0x0,
+ 0x535, 0x552, 0x0,
+ 0x544, 0x576, 0x0,
+ 0x544, 0x546, 0x0,
+ 0x544, 0x565, 0x0,
+ 0x544, 0x535, 0x0,
+ 0x544, 0x56b, 0x0,
+ 0x544, 0x53b, 0x0,
+ 0x54e, 0x576, 0x0,
+ 0x54e, 0x546, 0x0,
+ 0x544, 0x56d, 0x0,
+ 0x544, 0x53d, 0x0,
+ 0x2bc, 0x4e, 0x0,
+ 0x399, 0x308, 0x301, 0x0,
+ 0x3a5, 0x308, 0x301, 0x0,
+ 0x4a, 0x30c, 0x0,
+ 0x48, 0x331, 0x0,
+ 0x54, 0x308, 0x0,
+ 0x57, 0x30a, 0x0,
+ 0x59, 0x30a, 0x0,
+ 0x41, 0x2be, 0x0,
+ 0x3a5, 0x313, 0x0,
+ 0x3a5, 0x313, 0x300, 0x0,
+ 0x3a5, 0x313, 0x301, 0x0,
+ 0x3a5, 0x313, 0x342, 0x0,
+ 0x391, 0x342, 0x0,
+ 0x397, 0x342, 0x0,
+ 0x399, 0x308, 0x300, 0x0,
+ 0x399, 0x342, 0x0,
+ 0x399, 0x308, 0x342, 0x0,
+ 0x3a5, 0x308, 0x300, 0x0,
+ 0x3a1, 0x313, 0x0,
+ 0x3a5, 0x342, 0x0,
+ 0x3a5, 0x308, 0x342, 0x0,
+ 0x3a9, 0x342, 0x0,
+ 0x1f08, 0x399, 0x0,
+ 0x1f09, 0x399, 0x0,
+ 0x1f0a, 0x399, 0x0,
+ 0x1f0b, 0x399, 0x0,
+ 0x1f0c, 0x399, 0x0,
+ 0x1f0d, 0x399, 0x0,
+ 0x1f0e, 0x399, 0x0,
+ 0x1f0f, 0x399, 0x0,
+ 0x1f28, 0x399, 0x0,
+ 0x1f29, 0x399, 0x0,
+ 0x1f2a, 0x399, 0x0,
+ 0x1f2b, 0x399, 0x0,
+ 0x1f2c, 0x399, 0x0,
+ 0x1f2d, 0x399, 0x0,
+ 0x1f2e, 0x399, 0x0,
+ 0x1f2f, 0x399, 0x0,
+ 0x1f68, 0x399, 0x0,
+ 0x1f69, 0x399, 0x0,
+ 0x1f6a, 0x399, 0x0,
+ 0x1f6b, 0x399, 0x0,
+ 0x1f6c, 0x399, 0x0,
+ 0x1f6d, 0x399, 0x0,
+ 0x1f6e, 0x399, 0x0,
+ 0x1f6f, 0x399, 0x0,
+ 0x391, 0x399, 0x0,
+ 0x397, 0x399, 0x0,
+ 0x3a9, 0x399, 0x0,
+ 0x1fba, 0x345, 0x0,
+ 0x1fba, 0x399, 0x0,
+ 0x386, 0x345, 0x0,
+ 0x386, 0x399, 0x0,
+ 0x1fca, 0x345, 0x0,
+ 0x1fca, 0x399, 0x0,
+ 0x389, 0x345, 0x0,
+ 0x389, 0x399, 0x0,
+ 0x1ffa, 0x345, 0x0,
+ 0x1ffa, 0x399, 0x0,
+ 0x38f, 0x345, 0x0,
+ 0x38f, 0x399, 0x0,
+ 0x391, 0x342, 0x345, 0x0,
+ 0x391, 0x342, 0x399, 0x0,
+ 0x397, 0x342, 0x345, 0x0,
+ 0x397, 0x342, 0x399, 0x0,
+ 0x3a9, 0x342, 0x345, 0x0,
+ 0x3a9, 0x342, 0x399, 0x0
+
};
#define SPECIAL_CASE_MAX_LEN 3
@@ -7700,7 +7765,7 @@ static const unsigned short uc_ligature_trie[] = {
#define GET_LIGATURE_INDEX(u2) (u2 < 0x3100 ? uc_ligature_trie[uc_ligature_trie[u2>>5] + (u2 & 0x1f)] : 0xffff);
-static const unsigned short uc_ligature_map [] = {
+static const unsigned short uc_ligature_map[] = {
0x54, 0x41, 0xc0, 0x45, 0xc8, 0x49, 0xcc, 0x4e,
0x1f8, 0x4f, 0xd2, 0x55, 0xd9, 0x57, 0x1e80, 0x59,
@@ -9401,5 +9466,4 @@ static const unsigned char uc_scripts[] = {
} // namespace QUnicodeTables
-
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qunicodetables_p.h b/src/corelib/tools/qunicodetables_p.h
index 9b0b7cfa99..5c7cc08e1f 100644
--- a/src/corelib/tools/qunicodetables_p.h
+++ b/src/corelib/tools/qunicodetables_p.h
@@ -59,33 +59,37 @@
QT_BEGIN_NAMESPACE
+#define UNICODE_DATA_VERSION QChar::Unicode_5_0
+
+#define UNICODE_LAST_CODEPOINT 0x10ffff
+
namespace QUnicodeTables {
+
struct Properties {
- ushort category : 8;
- ushort line_break_class : 8;
- ushort direction : 8;
- ushort combiningClass :8;
- ushort joining : 2;
+ ushort category : 8; /* 5 needed */
+ ushort line_break_class : 8; /* 6 needed */
+ ushort direction : 8; /* 5 needed */
+ ushort combiningClass : 8;
+ ushort joining : 2;
signed short digitValue : 6; /* 5 needed */
- ushort unicodeVersion : 4;
+ ushort unicodeVersion : 4;
ushort lowerCaseSpecial : 1;
ushort upperCaseSpecial : 1;
ushort titleCaseSpecial : 1;
- ushort caseFoldSpecial : 1; /* currently unused */
- signed short mirrorDiff : 16;
+ ushort caseFoldSpecial : 1; /* currently unused */
+ signed short mirrorDiff : 16;
signed short lowerCaseDiff : 16;
signed short upperCaseDiff : 16;
signed short titleCaseDiff : 16;
- signed short caseFoldDiff : 16;
- ushort graphemeBreak : 8;
- ushort wordBreak : 8;
- ushort sentenceBreak : 8;
+ signed short caseFoldDiff : 16;
+ ushort graphemeBreak : 8; /* 4 needed */
+ ushort wordBreak : 8; /* 4 needed */
+ ushort sentenceBreak : 8; /* 4 needed */
};
Q_CORE_EXPORT const Properties * QT_FASTCALL properties(uint ucs4);
Q_CORE_EXPORT const Properties * QT_FASTCALL properties(ushort ucs2);
// See http://www.unicode.org/reports/tr24/tr24-5.html
-
enum Script {
Common,
Greek,
@@ -172,19 +176,8 @@ namespace QUnicodeTables {
};
- Q_CORE_EXPORT QUnicodeTables::LineBreakClass QT_FASTCALL lineBreakClass(uint ucs4);
- inline int lineBreakClass(const QChar &ch) {
- return QUnicodeTables::lineBreakClass(ch.unicode());
- }
-
- Q_CORE_EXPORT int QT_FASTCALL script(uint ucs4);
- inline int script(const QChar &ch) {
- return script(ch.unicode());
- }
-
-
enum GraphemeBreak {
- GraphemeBreakOther,
+ GraphemeBreakOther,
GraphemeBreakCR,
GraphemeBreakLF,
GraphemeBreakControl,
@@ -224,8 +217,16 @@ namespace QUnicodeTables {
};
-}
+ Q_CORE_EXPORT QUnicodeTables::LineBreakClass QT_FASTCALL lineBreakClass(uint ucs4);
+ inline int lineBreakClass(const QChar &ch)
+ { return lineBreakClass(ch.unicode()); }
+
+ Q_CORE_EXPORT int QT_FASTCALL script(uint ucs4);
+ inline int script(const QChar &ch)
+ { return script(ch.unicode()); }
+
+} // namespace QUnicodeTables
QT_END_NAMESPACE
-#endif
+#endif // QUNICODETABLES_P_H
diff --git a/src/corelib/tools/qvector.cpp b/src/corelib/tools/qvector.cpp
index 48b52d2e5a..3a13540766 100644
--- a/src/corelib/tools/qvector.cpp
+++ b/src/corelib/tools/qvector.cpp
@@ -392,6 +392,11 @@ int QVectorData::grow(int sizeofTypedData, int size, int sizeofT, bool excessive
\internal
*/
+/*! \fn bool QVector::isSharedWith(const QVector<T> &other) const
+
+ \internal
+*/
+
/*! \fn T *QVector::data()
Returns a pointer to the data stored in the vector. The pointer
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index ac7c7950bc..c2e24852fe 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -134,6 +134,7 @@ public:
inline void detach() { if (d->ref != 1) detach_helper(); }
inline bool isDetached() const { return d->ref == 1; }
inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
+ inline bool isSharedWith(const QVector<T> &other) const { return d == other.d; }
inline T *data() { detach(); return p->array; }
inline const T *data() const { return p->array; }
@@ -727,9 +728,10 @@ Q_OUTOFLINE_TEMPLATE QVector<T> QVector<T>::mid(int pos, int length) const
length = size() - pos;
if (pos == 0 && length == size())
return *this;
- QVector<T> copy;
if (pos + length > size())
length = size() - pos;
+ QVector<T> copy;
+ copy.reserve(length);
for (int i = pos; i < pos + length; ++i)
copy += at(i);
return copy;
@@ -739,6 +741,7 @@ template <typename T>
Q_OUTOFLINE_TEMPLATE QList<T> QVector<T>::toList() const
{
QList<T> result;
+ result.reserve(size());
for (int i = 0; i < size(); ++i)
result.append(at(i));
return result;
diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri
index 3406e41b3c..6d6491553f 100644
--- a/src/corelib/tools/tools.pri
+++ b/src/corelib/tools/tools.pri
@@ -33,6 +33,7 @@ HEADERS += \
tools/qsharedpointer.h \
tools/qsharedpointer_impl.h \
tools/qset.h \
+ tools/qsimd_p.h \
tools/qsize.h \
tools/qstack.h \
tools/qstring.h \
@@ -68,6 +69,7 @@ SOURCES += \
tools/qregexp.cpp \
tools/qshareddata.cpp \
tools/qsharedpointer.cpp \
+ tools/qsimd.cpp \
tools/qsize.cpp \
tools/qstring.cpp \
tools/qstringbuilder.cpp \
diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp
index 5717ca2e96..1bf00b8cd9 100644
--- a/src/corelib/xml/qxmlstream.cpp
+++ b/src/corelib/xml/qxmlstream.cpp
@@ -3003,8 +3003,7 @@ QXmlStreamWriterPrivate::QXmlStreamWriterPrivate(QXmlStreamWriter *q)
deleteDevice = false;
#ifndef QT_NO_TEXTCODEC
codec = QTextCodec::codecForMib(106); // utf8
- encoder = codec->makeEncoder();
- encoder->state.flags |= QTextCodec::IgnoreHeader; // no byte order mark for utf8
+ encoder = codec->makeEncoder(QTextCodec::IgnoreHeader); // no byte order mark for utf8
#endif
inStartElement = inEmptyElement = false;
wroteSomething = false;
@@ -3278,9 +3277,7 @@ void QXmlStreamWriter::setCodec(QTextCodec *codec)
if (codec) {
d->codec = codec;
delete d->encoder;
- d->encoder = codec->makeEncoder();
- if (codec->mibEnum() == 106)
- d->encoder->state.flags |= QTextCodec::IgnoreHeader; // no byte order mark for utf8
+ d->encoder = codec->makeEncoder(QTextCodec::IgnoreHeader); // no byte order mark for utf8
}
}
diff --git a/src/dbus/qdbus_symbols_p.h b/src/dbus/qdbus_symbols_p.h
index 9ea05b2ea6..7168e050ef 100644
--- a/src/dbus/qdbus_symbols_p.h
+++ b/src/dbus/qdbus_symbols_p.h
@@ -196,6 +196,8 @@ DEFINEFUNC(void , dbus_free, (void *memory), (memory), )
/* dbus-message.h */
DEFINEFUNC(DBusMessage* , dbus_message_copy, (const DBusMessage *message),
(message), return)
+DEFINEFUNC(dbus_bool_t , dbus_message_get_auto_start, (DBusMessage *message),
+ (message), return)
DEFINEFUNC(const char* , dbus_message_get_error_name, (DBusMessage *message),
(message), return)
DEFINEFUNC(const char* , dbus_message_get_interface, (DBusMessage *message),
@@ -268,6 +270,9 @@ DEFINEFUNC(DBusMessage* , dbus_message_new_signal, (const char *path,
(path, interface, name), return)
DEFINEFUNC(DBusMessage* , dbus_message_ref, (DBusMessage *message),
(message), return)
+DEFINEFUNC(void , dbus_message_set_auto_start, (DBusMessage *message,
+ dbus_bool_t auto_start),
+ (message, auto_start), return)
DEFINEFUNC(dbus_bool_t , dbus_message_set_destination, (DBusMessage *message,
const char *destination),
(message, destination), return)
diff --git a/src/dbus/qdbusmessage.cpp b/src/dbus/qdbusmessage.cpp
index 83b550315a..30ddc61b90 100644
--- a/src/dbus/qdbusmessage.cpp
+++ b/src/dbus/qdbusmessage.cpp
@@ -63,7 +63,7 @@ static inline const char *data(const QByteArray &arr)
QDBusMessagePrivate::QDBusMessagePrivate()
: msg(0), reply(0), type(DBUS_MESSAGE_TYPE_INVALID),
timeout(-1), localReply(0), ref(1), delayedReply(false), localMessage(false),
- parametersValidated(false)
+ parametersValidated(false), autoStartService(true)
{
}
@@ -129,6 +129,7 @@ DBusMessage *QDBusMessagePrivate::toDBusMessage(const QDBusMessage &message, QDB
msg = q_dbus_message_new_method_call(data(d_ptr->service.toUtf8()), d_ptr->path.toUtf8(),
data(d_ptr->interface.toUtf8()), d_ptr->name.toUtf8());
+ q_dbus_message_set_auto_start( msg, d_ptr->autoStartService );
break;
case DBUS_MESSAGE_TYPE_METHOD_RETURN:
msg = q_dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_RETURN);
@@ -644,6 +645,45 @@ bool QDBusMessage::isDelayedReply() const
}
/*!
+ Sets the auto start flag to \a enable. This flag only makes sense
+ for method call messages, where it tells the D-Bus server to
+ either auto start the service responsible for the service name, or
+ not to auto start it.
+
+ By default this flag is true, i.e. a service is autostarted.
+ This means:
+
+ When the service that this method call is sent to is already
+ running, the method call is sent to it. If the service is not
+ running yet, the D-Bus daemon is requested to autostart the
+ service that is assigned to this service name. This is
+ handled by .service files that are placed in a directory known
+ to the D-Bus server. These files then each contain a service
+ name and the path to a program that should be executed when
+ this service name is requested.
+
+ \since 4.7
+*/
+void QDBusMessage::setAutoStartService(bool enable)
+{
+ d_ptr->autoStartService = enable;
+}
+
+/*!
+ Returns the auto start flag, as set by setAutoStartService(). By default, this
+ flag is true, which means QtDBus will auto start a service, if it is
+ not running already.
+
+ \sa setAutoStartService()
+
+ \since 4.7
+*/
+bool QDBusMessage::autoStartService() const
+{
+ return d_ptr->autoStartService;
+}
+
+/*!
Sets the arguments that are going to be sent over D-Bus to \a arguments. Those
will be the arguments to a method call or the parameters in the signal.
diff --git a/src/dbus/qdbusmessage.h b/src/dbus/qdbusmessage.h
index 1a8598344f..6df5215c34 100644
--- a/src/dbus/qdbusmessage.h
+++ b/src/dbus/qdbusmessage.h
@@ -104,6 +104,9 @@ public:
void setDelayedReply(bool enable) const;
bool isDelayedReply() const;
+ void setAutoStartService(bool enable);
+ bool autoStartService() const;
+
void setArguments(const QList<QVariant> &arguments);
QList<QVariant> arguments() const;
diff --git a/src/dbus/qdbusmessage_p.h b/src/dbus/qdbusmessage_p.h
index 6bf5448ad6..b6da4a5e7e 100644
--- a/src/dbus/qdbusmessage_p.h
+++ b/src/dbus/qdbusmessage_p.h
@@ -85,6 +85,7 @@ public:
mutable uint delayedReply : 1;
uint localMessage : 1;
mutable uint parametersValidated : 1;
+ uint autoStartService : 1;
static void setParametersValidated(QDBusMessage &msg, bool enable)
{ msg.d_ptr->parametersValidated = enable; }
diff --git a/src/declarative/3rdparty/3rdparty.pri b/src/declarative/3rdparty/3rdparty.pri
new file mode 100644
index 0000000000..fbdcc11155
--- /dev/null
+++ b/src/declarative/3rdparty/3rdparty.pri
@@ -0,0 +1,7 @@
+INCLUDEPATH += $$PWD
+
+HEADERS += \
+ $$PWD/qlistmodelinterface_p.h\
+
+SOURCES += \
+ $$PWD/qlistmodelinterface.cpp \
diff --git a/src/declarative/3rdparty/qlistmodelinterface.cpp b/src/declarative/3rdparty/qlistmodelinterface.cpp
new file mode 100644
index 0000000000..50714cea85
--- /dev/null
+++ b/src/declarative/3rdparty/qlistmodelinterface.cpp
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** 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 QtDeclaractive module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qlistmodelinterface_p.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \internal
+ \class QListModelInterface
+ \brief The QListModelInterface class can be subclassed to provide C++ models to QDeclarativeGraphics Views
+
+ This class is comprised primarily of pure virtual functions which
+ you must implement in a subclass. You can then use the subclass
+ as a model for a QDeclarativeGraphics view, such as a QDeclarativeListView.
+*/
+
+/*! \fn QListModelInterface::QListModelInterface(QObject *parent)
+ Constructs a QListModelInterface with the specified \a parent.
+*/
+
+ /*! \fn QListModelInterface::QListModelInterface(QObjectPrivate &dd, QObject *parent)
+
+ \internal
+ */
+
+/*! \fn QListModelInterface::~QListModelInterface()
+ The destructor is virtual.
+ */
+
+/*! \fn int QListModelInterface::count() const
+ Returns the number of data entries in the model.
+*/
+
+/*! \fn QHash<int,QVariant> QListModelInterface::data(int index, const QList<int>& roles) const
+ Returns the data at the given \a index for the specifed \a roles.
+*/
+
+/*! \fn bool QListModelInterface::setData(int index, const QHash<int,QVariant>& values)
+ Sets the data at the given \a index. \a values is a mapping of
+ QVariant values to roles. Returns false.
+*/
+
+/*! \fn QList<int> QListModelInterface::roles() const
+ Returns the list of roles for which the list model interface
+ provides data.
+*/
+
+/*! \fn QString QListModelInterface::toString(int role) const
+ Returns a string description of the specified \a role.
+*/
+
+/*! \fn void QListModelInterface::itemsInserted(int index, int count)
+ Emit this signal when \a count items are inserted at \a index.
+ */
+
+/*! \fn void QListModelInterface::itemsRemoved(int index, int count)
+ Emit this signal when \a count items are removed at \a index.
+ */
+
+/*! \fn void QListModelInterface::itemsMoved(int from, int to, int count)
+ Emit this signal when \a count items are moved from index \a from
+ to index \a to.
+ */
+
+/*! \fn void QListModelInterface::itemsChanged(int index, int count, const QList<int> &roles)
+ Emit this signal when \a count items at \a index have had their
+ \a roles changed.
+ */
+
+QT_END_NAMESPACE
diff --git a/src/declarative/3rdparty/qlistmodelinterface_p.h b/src/declarative/3rdparty/qlistmodelinterface_p.h
new file mode 100644
index 0000000000..07592ad55b
--- /dev/null
+++ b/src/declarative/3rdparty/qlistmodelinterface_p.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QLISTMODELINTERFACE_H
+#define QLISTMODELINTERFACE_H
+
+#include <QtCore/QHash>
+#include <QtCore/QVariant>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class Q_DECLARATIVE_EXPORT QListModelInterface : public QObject
+{
+ Q_OBJECT
+ public:
+ QListModelInterface(QObject *parent = 0) : QObject(parent) {}
+ virtual ~QListModelInterface() {}
+
+ virtual int count() const = 0;
+ virtual QHash<int,QVariant> data(int index, const QList<int>& roles = QList<int>()) const = 0;
+ virtual QVariant data(int index, int role) const = 0;
+ virtual bool setData(int index, const QHash<int,QVariant>& values)
+ { Q_UNUSED(index); Q_UNUSED(values); return false; }
+
+ virtual QList<int> roles() const = 0;
+ virtual QString toString(int role) const = 0;
+
+ Q_SIGNALS:
+ void itemsInserted(int index, int count);
+ void itemsRemoved(int index, int count);
+ void itemsMoved(int from, int to, int count);
+ void itemsChanged(int index, int count, const QList<int> &roles);
+
+ protected:
+ QListModelInterface(QObjectPrivate &dd, QObject *parent)
+ : QObject(dd, parent) {}
+};
+
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+#endif //QTREEMODELINTERFACE_H
diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt
new file mode 100644
index 0000000000..591fb3da0e
--- /dev/null
+++ b/src/declarative/QmlChanges.txt
@@ -0,0 +1,185 @@
+=============================================================================
+The changes below are pre Qt 4.7.0 alpha
+
+Flickable: renamed viewportWidth -> contentWidth
+Flickable: renamed viewportHeight -> contentHeight
+Flickable: renamed viewportX -> contentX
+Flickable: renamed viewportY -> contentY
+Removed Flickable.reportedVelocitySmoothing
+Removed Qt.playSound (replaced by SoundEffect element)
+Removed NumberFormatter
+Removed DateTimeFormatter (use Qt.formatDateTime() instead)
+Renamed MouseRegion -> MouseArea
+Connection: syntax and rename:
+ Connection { sender: a; signal: foo(); script: xxx }
+ Connection { sender: a; signal: bar(); script: yyy }
+ becomes:
+ Connections { target: a; onFoo: xxx; onBar: yyy }
+Using WebView now requires "import org.webkit 1.0"
+
+QmlView
+-------
+The API of QmlView has been narrowed and its role as a convenience class
+reinforced.
+- remove addItem()
+- remove clearItems() - use 'delete root()'
+- remove reset()
+- resizeContent -> enum ResizeMode { SizeViewToRootObject, SizeRootObjectToView }
+- remove setQml(), qml()
+- rename setUrl(), ur() to setSource(), source()
+- root() -> rootObject(), returns QGraphicsObject rather than QmlGraphicsItem
+- remove quit() signal -> use quit() signal of engine()
+- initialSize() signal removed
+- Added status() to determine status of the internal QmlComponent
+
+sectionExpression has been replaced by section.property, section.criteria
+
+ListModel
+---------
+- types are strictly checked (previously, everything was a string)
+ - foo: "bar" continues to work as before
+ - foo: bar is now invalid, use foo: "bar"
+ - foo: true is now a bool (not string "true")
+ - foo: false is now a bool (not string "false" == true!)
+
+C++ API
+-------
+QML_DEFINE_... definition macros, previously global macros, are replaced by
+QML_REGISTER_... registration macros, which must be called explicitly. C++ API users
+should also consider using the QmlExtensionPlugin (previously named QmlModulePlugin)
+as a cleaner mechanism for publishing libraries of QML types, or the upcoming
+application plugin features of the qmlviewer / qmlruntime / qml.
+
+PropertyAnimation
+------------------
+matchProperties and matchTargets have been renamed back to properties and targets.
+The semantics are explained in the PropertyAnimation::properties documentation
+and the animation overview documentation.
+
+Behavior and Animation syntax
+-----------------------------
+
+Previously animations and behaviors could be "assigned" to properties like this:
+ Item { x: Behavior {}; y: NumberAnimation {} }
+To make it more obvious that these are not regular value assignments a new "on"
+syntax has been introduced:
+ Item { Behavior on x {}; NumberAnimation on y {} }
+Only the syntax has changed, the behavior is identical.
+
+=============================================================================
+The changes below are pre-4.6.0 release.
+
+QML API Review
+==============
+
+The QML API is being reviewed. This file documents the changes.
+Note that the changes are incremental, so a rename A->B for example may be followed
+by another subsequent rename B->C, if later reviews override earlier reviews.
+
+API Changes
+===========
+
+Renamed Elements:
+LineEdit -> TextInput
+VerticalLayout -> Column
+HorizontalLayout -> Row
+VerticalPositioner -> Column
+HorizontalPositioner -> Row
+GridLayout -> Grid
+GridPositioner -> Grid
+Rect -> Rectangle
+FocusRealm -> FocusScope
+FontFamily -> FontLoader
+Palette -> SystemPalette
+Bind -> Binding
+SetProperties -> PropertyChanges
+RunScript -> StateChangeScript
+SetAnchors -> AnchorChanges
+SetPropertyAction -> PropertyAction
+RunScriptAction -> ScriptAction
+ParentChangeAction -> ParentAction
+VisualModel -> VisualDataModel
+Follow -> SpringFollow
+
+Renamed properties:
+Item: contents -> childrenRect
+MouseRegion: xmin -> minimumX
+MouseRegion: xmax -> maximumX
+MouseRegion: ymin -> minimumY
+MouseRegion: ymin -> maximumY
+Text elements: hAlign -> horizontalAlignment
+Text elements: vAlign -> verticalAlignment
+Text elements: highlightColor -> selectionColor
+Text elements: highlightedTextColor -> selectedTextColor
+Text elements: preserveSelection -> persistentSelection
+State: operations -> changes
+Transition: operations -> animations
+Transition: fromState -> from
+Transition: toState -> to
+Follow: followValue -> value
+Flickable: xPosition -> viewportX
+Flickable: yPosition -> viewportY
+Flickable: xVelocity -> horizontalVelocity
+Flickable: yVelocity -> verticalVelocity
+Flickable: velocityDecay -> reportedVelocitySmoothing
+Flickable: locked -> interactive (note reversal of meaning)
+Flickable: pageXPosition -> visibleArea.xPosition
+Flickable: pageYPosition -> visibleArea.yPosition
+Flickable: pageWidth -> visibleArea.widthRatio
+Flickable: pageHeight -> visibleArea.heightRatio
+WebView: idealWidth -> preferredWidth
+WebView: idealHeight -> preferredHeight
+WebView: status -> statusText
+WebView: mouseX -> clickX (parameter to onDoubleClick)
+WebView: mouseY -> clickY (parameter to onDoubleClick)
+WebView: cacheSize -> pixelCacheSize
+Repeater: component -> delegate
+Repeater: dataSource -> model
+ListView: current -> currentItem
+GridView: current -> currentItem
+ListView: wrap -> keyNavigationWraps
+ListView: autoHighlight -> highlightFollowsCurrentItem
+GridView: wrap -> keyNavigationWraps
+GridView: autoHighlight -> highlightFollowsCurrentItem
+Animation: targets -> matchTargets
+Animation: properties -> matchProperties
+
+Additions:
+MouseRegion: add "acceptedButtons" property
+MouseRegion: add "hoverEnabled" property
+MouseRegion: add "pressedButtons" property
+Timer: add start() and stop() slots
+WebView: add newWindowComponent and newWindowParent properties
+Loader: add status() and progress() properties
+Loader: add sourceComponent property
+Loader: add resizeMode property
+ListView: preferredHighlightBegin, preferredHighlightEnd
+ListView: strictlyEnforceHighlightRange
+Particles: Added emissionRate, emissionVariance and burst()
+
+Deletions:
+Column/VerticalPositioner: lost "margins" property
+Row/HorizontalPositioner: lost "margins" property
+Grid/Positioner/Layout: lost "margins" property
+WebView: lost "interactive" property (always true now)
+Flickable: removed "dragMode" property
+ComponentInstance: removed. Replaced by Loader.sourceComponent
+ListView: removed currentItemMode. Replaced by highligh range.
+ListView: removed snapPos.
+Particles: removed streamIn. Replaced by emissionRate
+
+Other Changes:
+ids must be lowercase: Text { id: foo }, not Text { id: Foo }
+Drag: axis becomes an enum with values "XAxis", "YAxis", "XandYAxis"
+Image: scaleGrid property removed. New item called BorderImage instead.
+KeyActions: changed to a Keys attached property on any item.
+KeyProxy: changed to a Keys.forwardTo property on any item.
+Script: now an intrinsic type in the language
+ - cannot be assigned to properties
+ - good: Item { Script { ... } }
+ - bad: Item { resources: Script { ... } }
+Script: delay-loaded of the QML file until their source has been loaded (this only effects QML files loaded across the network.)
+Scope: declared properties shadow a property of the same name (was previously the reverse)
+ScriptAction and StateChangeScript: the script property now takes script rather than a string containing script (script: doSomething() rather than script: "doSomething()")
+QmlGraphicsItem::transformOrigin default changed from TopLeft to Center
+Animations used as PropertySourceValues are set to 'running: true' as default
diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri
new file mode 100644
index 0000000000..dedea55c39
--- /dev/null
+++ b/src/declarative/debugger/debugger.pri
@@ -0,0 +1,15 @@
+INCLUDEPATH += $$PWD
+
+SOURCES += \
+ $$PWD/qdeclarativedebuggerstatus.cpp \
+ $$PWD/qpacketprotocol.cpp \
+ $$PWD/qdeclarativedebugservice.cpp \
+ $$PWD/qdeclarativedebugclient.cpp \
+ $$PWD/qdeclarativedebug.cpp
+
+HEADERS += \
+ $$PWD/qdeclarativedebuggerstatus_p.h \
+ $$PWD/qpacketprotocol_p.h \
+ $$PWD/qdeclarativedebugservice_p.h \
+ $$PWD/qdeclarativedebugclient_p.h \
+ $$PWD/qdeclarativedebug_p.h
diff --git a/src/declarative/debugger/qdeclarativedebug.cpp b/src/declarative/debugger/qdeclarativedebug.cpp
new file mode 100644
index 0000000000..e4b7d4d7ef
--- /dev/null
+++ b/src/declarative/debugger/qdeclarativedebug.cpp
@@ -0,0 +1,937 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativedebug_p.h"
+
+#include "qdeclarativedebugclient_p.h"
+
+#include <qdeclarativeenginedebug_p.h>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeEngineDebugClient : public QDeclarativeDebugClient
+{
+public:
+ QDeclarativeEngineDebugClient(QDeclarativeDebugConnection *client, QDeclarativeEngineDebugPrivate *p);
+
+protected:
+ virtual void messageReceived(const QByteArray &);
+
+private:
+ QDeclarativeEngineDebugPrivate *priv;
+};
+
+class QDeclarativeEngineDebugPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeEngineDebug)
+public:
+ QDeclarativeEngineDebugPrivate(QDeclarativeDebugConnection *);
+
+ void message(const QByteArray &);
+
+ QDeclarativeEngineDebugClient *client;
+ int nextId;
+ int getId();
+
+ void decode(QDataStream &, QDeclarativeDebugContextReference &);
+ void decode(QDataStream &, QDeclarativeDebugObjectReference &, bool simple);
+
+ static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugEnginesQuery *);
+ static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugRootContextQuery *);
+ static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugObjectQuery *);
+ static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugExpressionQuery *);
+
+ QHash<int, QDeclarativeDebugEnginesQuery *> enginesQuery;
+ QHash<int, QDeclarativeDebugRootContextQuery *> rootContextQuery;
+ QHash<int, QDeclarativeDebugObjectQuery *> objectQuery;
+ QHash<int, QDeclarativeDebugExpressionQuery *> expressionQuery;
+
+ QHash<int, QDeclarativeDebugWatch *> watched;
+};
+
+QDeclarativeEngineDebugClient::QDeclarativeEngineDebugClient(QDeclarativeDebugConnection *client,
+ QDeclarativeEngineDebugPrivate *p)
+: QDeclarativeDebugClient(QLatin1String("QDeclarativeEngine"), client), priv(p)
+{
+ setEnabled(true);
+}
+
+void QDeclarativeEngineDebugClient::messageReceived(const QByteArray &data)
+{
+ priv->message(data);
+}
+
+QDeclarativeEngineDebugPrivate::QDeclarativeEngineDebugPrivate(QDeclarativeDebugConnection *c)
+: client(new QDeclarativeEngineDebugClient(c, this)), nextId(0)
+{
+}
+
+int QDeclarativeEngineDebugPrivate::getId()
+{
+ return nextId++;
+}
+
+void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugEnginesQuery *q)
+{
+ if (c && q) {
+ QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c);
+ p->enginesQuery.remove(q->m_queryId);
+ }
+}
+
+void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c,
+ QDeclarativeDebugRootContextQuery *q)
+{
+ if (c && q) {
+ QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c);
+ p->rootContextQuery.remove(q->m_queryId);
+ }
+}
+
+void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugObjectQuery *q)
+{
+ if (c && q) {
+ QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c);
+ p->objectQuery.remove(q->m_queryId);
+ }
+}
+
+void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugExpressionQuery *q)
+{
+ if (c && q) {
+ QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c);
+ p->expressionQuery.remove(q->m_queryId);
+ }
+}
+
+void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugObjectReference &o,
+ bool simple)
+{
+ QDeclarativeEngineDebugServer::QDeclarativeObjectData data;
+ ds >> data;
+ o.m_debugId = data.objectId;
+ o.m_class = data.objectType;
+ o.m_name = data.objectName;
+ o.m_source.m_url = data.url;
+ o.m_source.m_lineNumber = data.lineNumber;
+ o.m_source.m_columnNumber = data.columnNumber;
+ o.m_contextDebugId = data.contextId;
+
+ if (simple)
+ return;
+
+ int childCount;
+ bool recur;
+ ds >> childCount >> recur;
+
+ for (int ii = 0; ii < childCount; ++ii) {
+ o.m_children.append(QDeclarativeDebugObjectReference());
+ decode(ds, o.m_children.last(), !recur);
+ }
+
+ int propCount;
+ ds >> propCount;
+
+ for (int ii = 0; ii < propCount; ++ii) {
+ QDeclarativeEngineDebugServer::QDeclarativeObjectProperty data;
+ ds >> data;
+ QDeclarativeDebugPropertyReference prop;
+ prop.m_objectDebugId = o.m_debugId;
+ prop.m_name = data.name;
+ prop.m_binding = data.binding;
+ prop.m_hasNotifySignal = data.hasNotifySignal;
+ prop.m_valueTypeName = data.valueTypeName;
+ switch (data.type) {
+ case QDeclarativeEngineDebugServer::QDeclarativeObjectProperty::Basic:
+ case QDeclarativeEngineDebugServer::QDeclarativeObjectProperty::List:
+ case QDeclarativeEngineDebugServer::QDeclarativeObjectProperty::SignalProperty:
+ {
+ prop.m_value = data.value;
+ break;
+ }
+ case QDeclarativeEngineDebugServer::QDeclarativeObjectProperty::Object:
+ {
+ QDeclarativeDebugObjectReference obj;
+ obj.m_debugId = prop.m_value.toInt();
+ prop.m_value = qVariantFromValue(obj);
+ break;
+ }
+ case QDeclarativeEngineDebugServer::QDeclarativeObjectProperty::Unknown:
+ break;
+ }
+ o.m_properties << prop;
+ }
+}
+
+void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugContextReference &c)
+{
+ ds >> c.m_name >> c.m_debugId;
+
+ int contextCount;
+ ds >> contextCount;
+
+ for (int ii = 0; ii < contextCount; ++ii) {
+ c.m_contexts.append(QDeclarativeDebugContextReference());
+ decode(ds, c.m_contexts.last());
+ }
+
+ int objectCount;
+ ds >> objectCount;
+
+ for (int ii = 0; ii < objectCount; ++ii) {
+ QDeclarativeDebugObjectReference obj;
+ decode(ds, obj, true);
+
+ obj.m_contextDebugId = c.m_debugId;
+ c.m_objects << obj;
+ }
+}
+
+void QDeclarativeEngineDebugPrivate::message(const QByteArray &data)
+{
+ QDataStream ds(data);
+
+ QByteArray type;
+ ds >> type;
+
+ //qDebug() << "QDeclarativeEngineDebugPrivate::message()" << type;
+
+ if (type == "LIST_ENGINES_R") {
+ int queryId;
+ ds >> queryId;
+
+ QDeclarativeDebugEnginesQuery *query = enginesQuery.value(queryId);
+ if (!query)
+ return;
+ enginesQuery.remove(queryId);
+
+ int count;
+ ds >> count;
+
+ for (int ii = 0; ii < count; ++ii) {
+ QDeclarativeDebugEngineReference ref;
+ ds >> ref.m_name;
+ ds >> ref.m_debugId;
+ query->m_engines << ref;
+ }
+
+ query->m_client = 0;
+ query->setState(QDeclarativeDebugQuery::Completed);
+ } else if (type == "LIST_OBJECTS_R") {
+ int queryId;
+ ds >> queryId;
+
+ QDeclarativeDebugRootContextQuery *query = rootContextQuery.value(queryId);
+ if (!query)
+ return;
+ rootContextQuery.remove(queryId);
+
+ if (!ds.atEnd())
+ decode(ds, query->m_context);
+
+ query->m_client = 0;
+ query->setState(QDeclarativeDebugQuery::Completed);
+ } else if (type == "FETCH_OBJECT_R") {
+ int queryId;
+ ds >> queryId;
+
+ QDeclarativeDebugObjectQuery *query = objectQuery.value(queryId);
+ if (!query)
+ return;
+ objectQuery.remove(queryId);
+
+ if (!ds.atEnd())
+ decode(ds, query->m_object, false);
+
+ query->m_client = 0;
+ query->setState(QDeclarativeDebugQuery::Completed);
+ } else if (type == "EVAL_EXPRESSION_R") {
+ int queryId;
+ QVariant result;
+ ds >> queryId >> result;
+
+ QDeclarativeDebugExpressionQuery *query = expressionQuery.value(queryId);
+ if (!query)
+ return;
+ expressionQuery.remove(queryId);
+
+ query->m_result = result;
+ query->m_client = 0;
+ query->setState(QDeclarativeDebugQuery::Completed);
+ } else if (type == "WATCH_PROPERTY_R") {
+ int queryId;
+ bool ok;
+ ds >> queryId >> ok;
+
+ QDeclarativeDebugWatch *watch = watched.value(queryId);
+ if (!watch)
+ return;
+
+ watch->setState(ok ? QDeclarativeDebugWatch::Active : QDeclarativeDebugWatch::Inactive);
+ } else if (type == "WATCH_OBJECT_R") {
+ int queryId;
+ bool ok;
+ ds >> queryId >> ok;
+
+ QDeclarativeDebugWatch *watch = watched.value(queryId);
+ if (!watch)
+ return;
+
+ watch->setState(ok ? QDeclarativeDebugWatch::Active : QDeclarativeDebugWatch::Inactive);
+ } else if (type == "WATCH_EXPR_OBJECT_R") {
+ int queryId;
+ bool ok;
+ ds >> queryId >> ok;
+
+ QDeclarativeDebugWatch *watch = watched.value(queryId);
+ if (!watch)
+ return;
+
+ watch->setState(ok ? QDeclarativeDebugWatch::Active : QDeclarativeDebugWatch::Inactive);
+ } else if (type == "UPDATE_WATCH") {
+ int queryId;
+ int debugId;
+ QByteArray name;
+ QVariant value;
+ ds >> queryId >> debugId >> name >> value;
+
+ QDeclarativeDebugWatch *watch = watched.value(queryId, 0);
+ if (!watch)
+ return;
+ emit watch->valueChanged(name, value);
+ }
+}
+
+QDeclarativeEngineDebug::QDeclarativeEngineDebug(QDeclarativeDebugConnection *client, QObject *parent)
+: QObject(*(new QDeclarativeEngineDebugPrivate(client)), parent)
+{
+}
+
+QDeclarativeDebugPropertyWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugPropertyReference &property, QObject *parent)
+{
+ Q_D(QDeclarativeEngineDebug);
+
+ QDeclarativeDebugPropertyWatch *watch = new QDeclarativeDebugPropertyWatch(parent);
+ if (d->client->isConnected()) {
+ int queryId = d->getId();
+ watch->m_queryId = queryId;
+ watch->m_client = this;
+ watch->m_objectDebugId = property.objectDebugId();
+ watch->m_name = property.name();
+ d->watched.insert(queryId, watch);
+
+ QByteArray message;
+ QDataStream ds(&message, QIODevice::WriteOnly);
+ ds << QByteArray("WATCH_PROPERTY") << queryId << property.objectDebugId() << property.name().toUtf8();
+ d->client->sendMessage(message);
+ } else {
+ watch->m_state = QDeclarativeDebugWatch::Dead;
+ }
+
+ return watch;
+}
+
+QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugContextReference &, const QString &, QObject *)
+{
+ qWarning("QDeclarativeEngineDebug::addWatch(): Not implemented");
+ return 0;
+}
+
+QDeclarativeDebugObjectExpressionWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugObjectReference &object, const QString &expr, QObject *parent)
+{
+ Q_D(QDeclarativeEngineDebug);
+ QDeclarativeDebugObjectExpressionWatch *watch = new QDeclarativeDebugObjectExpressionWatch(parent);
+ if (d->client->isConnected()) {
+ int queryId = d->getId();
+ watch->m_queryId = queryId;
+ watch->m_client = this;
+ watch->m_objectDebugId = object.debugId();
+ watch->m_expr = expr;
+ d->watched.insert(queryId, watch);
+
+ QByteArray message;
+ QDataStream ds(&message, QIODevice::WriteOnly);
+ ds << QByteArray("WATCH_EXPR_OBJECT") << queryId << object.debugId() << expr;
+ d->client->sendMessage(message);
+ } else {
+ watch->m_state = QDeclarativeDebugWatch::Dead;
+ }
+ return watch;
+}
+
+QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugObjectReference &object, QObject *parent)
+{
+ Q_D(QDeclarativeEngineDebug);
+
+ QDeclarativeDebugWatch *watch = new QDeclarativeDebugWatch(parent);
+ if (d->client->isConnected()) {
+ int queryId = d->getId();
+ watch->m_queryId = queryId;
+ watch->m_client = this;
+ watch->m_objectDebugId = object.debugId();
+ d->watched.insert(queryId, watch);
+
+ QByteArray message;
+ QDataStream ds(&message, QIODevice::WriteOnly);
+ ds << QByteArray("WATCH_OBJECT") << queryId << object.debugId();
+ d->client->sendMessage(message);
+ } else {
+ watch->m_state = QDeclarativeDebugWatch::Dead;
+ }
+
+ return watch;
+}
+
+QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugFileReference &, QObject *)
+{
+ qWarning("QDeclarativeEngineDebug::addWatch(): Not implemented");
+ return 0;
+}
+
+void QDeclarativeEngineDebug::removeWatch(QDeclarativeDebugWatch *watch)
+{
+ Q_D(QDeclarativeEngineDebug);
+
+ if (!watch || !watch->m_client)
+ return;
+
+ watch->m_client = 0;
+ watch->setState(QDeclarativeDebugWatch::Inactive);
+
+ d->watched.remove(watch->queryId());
+
+ if (d->client && d->client->isConnected()) {
+ QByteArray message;
+ QDataStream ds(&message, QIODevice::WriteOnly);
+ ds << QByteArray("NO_WATCH") << watch->queryId();
+ d->client->sendMessage(message);
+ }
+}
+
+QDeclarativeDebugEnginesQuery *QDeclarativeEngineDebug::queryAvailableEngines(QObject *parent)
+{
+ Q_D(QDeclarativeEngineDebug);
+
+ QDeclarativeDebugEnginesQuery *query = new QDeclarativeDebugEnginesQuery(parent);
+ if (d->client->isConnected()) {
+ query->m_client = this;
+ int queryId = d->getId();
+ query->m_queryId = queryId;
+ d->enginesQuery.insert(queryId, query);
+
+ QByteArray message;
+ QDataStream ds(&message, QIODevice::WriteOnly);
+ ds << QByteArray("LIST_ENGINES") << queryId;
+ d->client->sendMessage(message);
+ } else {
+ query->m_state = QDeclarativeDebugQuery::Error;
+ }
+
+ return query;
+}
+
+QDeclarativeDebugRootContextQuery *QDeclarativeEngineDebug::queryRootContexts(const QDeclarativeDebugEngineReference &engine, QObject *parent)
+{
+ Q_D(QDeclarativeEngineDebug);
+
+ QDeclarativeDebugRootContextQuery *query = new QDeclarativeDebugRootContextQuery(parent);
+ if (d->client->isConnected() && engine.debugId() != -1) {
+ query->m_client = this;
+ int queryId = d->getId();
+ query->m_queryId = queryId;
+ d->rootContextQuery.insert(queryId, query);
+
+ QByteArray message;
+ QDataStream ds(&message, QIODevice::WriteOnly);
+ ds << QByteArray("LIST_OBJECTS") << queryId << engine.debugId();
+ d->client->sendMessage(message);
+ } else {
+ query->m_state = QDeclarativeDebugQuery::Error;
+ }
+
+ return query;
+}
+
+QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObject(const QDeclarativeDebugObjectReference &object, QObject *parent)
+{
+ Q_D(QDeclarativeEngineDebug);
+
+ QDeclarativeDebugObjectQuery *query = new QDeclarativeDebugObjectQuery(parent);
+ if (d->client->isConnected() && object.debugId() != -1) {
+ query->m_client = this;
+ int queryId = d->getId();
+ query->m_queryId = queryId;
+ d->objectQuery.insert(queryId, query);
+
+ QByteArray message;
+ QDataStream ds(&message, QIODevice::WriteOnly);
+ ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId()
+ << false;
+ d->client->sendMessage(message);
+ } else {
+ query->m_state = QDeclarativeDebugQuery::Error;
+ }
+
+ return query;
+}
+
+QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObjectRecursive(const QDeclarativeDebugObjectReference &object, QObject *parent)
+{
+ Q_D(QDeclarativeEngineDebug);
+
+ QDeclarativeDebugObjectQuery *query = new QDeclarativeDebugObjectQuery(parent);
+ if (d->client->isConnected() && object.debugId() != -1) {
+ query->m_client = this;
+ int queryId = d->getId();
+ query->m_queryId = queryId;
+ d->objectQuery.insert(queryId, query);
+
+ QByteArray message;
+ QDataStream ds(&message, QIODevice::WriteOnly);
+ ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId()
+ << true;
+ d->client->sendMessage(message);
+ } else {
+ query->m_state = QDeclarativeDebugQuery::Error;
+ }
+
+ return query;
+}
+
+QDeclarativeDebugExpressionQuery *QDeclarativeEngineDebug::queryExpressionResult(int objectDebugId, const QString &expr, QObject *parent)
+{
+ Q_D(QDeclarativeEngineDebug);
+
+ QDeclarativeDebugExpressionQuery *query = new QDeclarativeDebugExpressionQuery(parent);
+ if (d->client->isConnected() && objectDebugId != -1) {
+ query->m_client = this;
+ query->m_expr = expr;
+ int queryId = d->getId();
+ query->m_queryId = queryId;
+ d->expressionQuery.insert(queryId, query);
+
+ QByteArray message;
+ QDataStream ds(&message, QIODevice::WriteOnly);
+ ds << QByteArray("EVAL_EXPRESSION") << queryId << objectDebugId << expr;
+ d->client->sendMessage(message);
+ } else {
+ query->m_state = QDeclarativeDebugQuery::Error;
+ }
+
+ return query;
+}
+
+QDeclarativeDebugWatch::QDeclarativeDebugWatch(QObject *parent)
+: QObject(parent), m_state(Waiting), m_queryId(-1), m_client(0), m_objectDebugId(-1)
+{
+}
+
+QDeclarativeDebugWatch::~QDeclarativeDebugWatch()
+{
+}
+
+int QDeclarativeDebugWatch::queryId() const
+{
+ return m_queryId;
+}
+
+int QDeclarativeDebugWatch::objectDebugId() const
+{
+ return m_objectDebugId;
+}
+
+QDeclarativeDebugWatch::State QDeclarativeDebugWatch::state() const
+{
+ return m_state;
+}
+
+void QDeclarativeDebugWatch::setState(State s)
+{
+ if (m_state == s)
+ return;
+ m_state = s;
+ emit stateChanged(m_state);
+}
+
+QDeclarativeDebugPropertyWatch::QDeclarativeDebugPropertyWatch(QObject *parent)
+ : QDeclarativeDebugWatch(parent)
+{
+}
+
+QString QDeclarativeDebugPropertyWatch::name() const
+{
+ return m_name;
+}
+
+
+QDeclarativeDebugObjectExpressionWatch::QDeclarativeDebugObjectExpressionWatch(QObject *parent)
+ : QDeclarativeDebugWatch(parent)
+{
+}
+
+QString QDeclarativeDebugObjectExpressionWatch::expression() const
+{
+ return m_expr;
+}
+
+
+QDeclarativeDebugQuery::QDeclarativeDebugQuery(QObject *parent)
+: QObject(parent), m_state(Waiting)
+{
+}
+
+QDeclarativeDebugQuery::State QDeclarativeDebugQuery::state() const
+{
+ return m_state;
+}
+
+bool QDeclarativeDebugQuery::isWaiting() const
+{
+ return m_state == Waiting;
+}
+
+void QDeclarativeDebugQuery::setState(State s)
+{
+ if (m_state == s)
+ return;
+ m_state = s;
+ emit stateChanged(m_state);
+}
+
+QDeclarativeDebugEnginesQuery::QDeclarativeDebugEnginesQuery(QObject *parent)
+: QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1)
+{
+}
+
+QDeclarativeDebugEnginesQuery::~QDeclarativeDebugEnginesQuery()
+{
+ if (m_client && m_queryId != -1)
+ QDeclarativeEngineDebugPrivate::remove(m_client, this);
+}
+
+QList<QDeclarativeDebugEngineReference> QDeclarativeDebugEnginesQuery::engines() const
+{
+ return m_engines;
+}
+
+QDeclarativeDebugRootContextQuery::QDeclarativeDebugRootContextQuery(QObject *parent)
+: QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1)
+{
+}
+
+QDeclarativeDebugRootContextQuery::~QDeclarativeDebugRootContextQuery()
+{
+ if (m_client && m_queryId != -1)
+ QDeclarativeEngineDebugPrivate::remove(m_client, this);
+}
+
+QDeclarativeDebugContextReference QDeclarativeDebugRootContextQuery::rootContext() const
+{
+ return m_context;
+}
+
+QDeclarativeDebugObjectQuery::QDeclarativeDebugObjectQuery(QObject *parent)
+: QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1)
+{
+}
+
+QDeclarativeDebugObjectQuery::~QDeclarativeDebugObjectQuery()
+{
+ if (m_client && m_queryId != -1)
+ QDeclarativeEngineDebugPrivate::remove(m_client, this);
+}
+
+QDeclarativeDebugObjectReference QDeclarativeDebugObjectQuery::object() const
+{
+ return m_object;
+}
+
+QDeclarativeDebugExpressionQuery::QDeclarativeDebugExpressionQuery(QObject *parent)
+: QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1)
+{
+}
+
+QDeclarativeDebugExpressionQuery::~QDeclarativeDebugExpressionQuery()
+{
+ if (m_client && m_queryId != -1)
+ QDeclarativeEngineDebugPrivate::remove(m_client, this);
+}
+
+QString QDeclarativeDebugExpressionQuery::expression() const
+{
+ return m_expr;
+}
+
+QVariant QDeclarativeDebugExpressionQuery::result() const
+{
+ return m_result;
+}
+
+QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference()
+: m_debugId(-1)
+{
+}
+
+QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference(int debugId)
+: m_debugId(debugId)
+{
+}
+
+QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference(const QDeclarativeDebugEngineReference &o)
+: m_debugId(o.m_debugId), m_name(o.m_name)
+{
+}
+
+QDeclarativeDebugEngineReference &
+QDeclarativeDebugEngineReference::operator=(const QDeclarativeDebugEngineReference &o)
+{
+ m_debugId = o.m_debugId; m_name = o.m_name;
+ return *this;
+}
+
+int QDeclarativeDebugEngineReference::debugId() const
+{
+ return m_debugId;
+}
+
+QString QDeclarativeDebugEngineReference::name() const
+{
+ return m_name;
+}
+
+QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference()
+: m_debugId(-1), m_contextDebugId(-1)
+{
+}
+
+QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference(int debugId)
+: m_debugId(debugId), m_contextDebugId(-1)
+{
+}
+
+QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference(const QDeclarativeDebugObjectReference &o)
+: m_debugId(o.m_debugId), m_class(o.m_class), m_name(o.m_name),
+ m_source(o.m_source), m_contextDebugId(o.m_contextDebugId),
+ m_properties(o.m_properties), m_children(o.m_children)
+{
+}
+
+QDeclarativeDebugObjectReference &
+QDeclarativeDebugObjectReference::operator=(const QDeclarativeDebugObjectReference &o)
+{
+ m_debugId = o.m_debugId; m_class = o.m_class; m_name = o.m_name;
+ m_source = o.m_source; m_contextDebugId = o.m_contextDebugId;
+ m_properties = o.m_properties; m_children = o.m_children;
+ return *this;
+}
+
+int QDeclarativeDebugObjectReference::debugId() const
+{
+ return m_debugId;
+}
+
+QString QDeclarativeDebugObjectReference::className() const
+{
+ return m_class;
+}
+
+QString QDeclarativeDebugObjectReference::name() const
+{
+ return m_name;
+}
+
+QDeclarativeDebugFileReference QDeclarativeDebugObjectReference::source() const
+{
+ return m_source;
+}
+
+int QDeclarativeDebugObjectReference::contextDebugId() const
+{
+ return m_contextDebugId;
+}
+
+QList<QDeclarativeDebugPropertyReference> QDeclarativeDebugObjectReference::properties() const
+{
+ return m_properties;
+}
+
+QList<QDeclarativeDebugObjectReference> QDeclarativeDebugObjectReference::children() const
+{
+ return m_children;
+}
+
+QDeclarativeDebugContextReference::QDeclarativeDebugContextReference()
+: m_debugId(-1)
+{
+}
+
+QDeclarativeDebugContextReference::QDeclarativeDebugContextReference(const QDeclarativeDebugContextReference &o)
+: m_debugId(o.m_debugId), m_name(o.m_name), m_objects(o.m_objects), m_contexts(o.m_contexts)
+{
+}
+
+QDeclarativeDebugContextReference &QDeclarativeDebugContextReference::operator=(const QDeclarativeDebugContextReference &o)
+{
+ m_debugId = o.m_debugId; m_name = o.m_name; m_objects = o.m_objects;
+ m_contexts = o.m_contexts;
+ return *this;
+}
+
+int QDeclarativeDebugContextReference::debugId() const
+{
+ return m_debugId;
+}
+
+QString QDeclarativeDebugContextReference::name() const
+{
+ return m_name;
+}
+
+QList<QDeclarativeDebugObjectReference> QDeclarativeDebugContextReference::objects() const
+{
+ return m_objects;
+}
+
+QList<QDeclarativeDebugContextReference> QDeclarativeDebugContextReference::contexts() const
+{
+ return m_contexts;
+}
+
+QDeclarativeDebugFileReference::QDeclarativeDebugFileReference()
+: m_lineNumber(-1), m_columnNumber(-1)
+{
+}
+
+QDeclarativeDebugFileReference::QDeclarativeDebugFileReference(const QDeclarativeDebugFileReference &o)
+: m_url(o.m_url), m_lineNumber(o.m_lineNumber), m_columnNumber(o.m_columnNumber)
+{
+}
+
+QDeclarativeDebugFileReference &QDeclarativeDebugFileReference::operator=(const QDeclarativeDebugFileReference &o)
+{
+ m_url = o.m_url; m_lineNumber = o.m_lineNumber; m_columnNumber = o.m_columnNumber;
+ return *this;
+}
+
+QUrl QDeclarativeDebugFileReference::url() const
+{
+ return m_url;
+}
+
+void QDeclarativeDebugFileReference::setUrl(const QUrl &u)
+{
+ m_url = u;
+}
+
+int QDeclarativeDebugFileReference::lineNumber() const
+{
+ return m_lineNumber;
+}
+
+void QDeclarativeDebugFileReference::setLineNumber(int l)
+{
+ m_lineNumber = l;
+}
+
+int QDeclarativeDebugFileReference::columnNumber() const
+{
+ return m_columnNumber;
+}
+
+void QDeclarativeDebugFileReference::setColumnNumber(int c)
+{
+ m_columnNumber = c;
+}
+
+QDeclarativeDebugPropertyReference::QDeclarativeDebugPropertyReference()
+: m_objectDebugId(-1), m_hasNotifySignal(false)
+{
+}
+
+QDeclarativeDebugPropertyReference::QDeclarativeDebugPropertyReference(const QDeclarativeDebugPropertyReference &o)
+: m_objectDebugId(o.m_objectDebugId), m_name(o.m_name), m_value(o.m_value),
+ m_valueTypeName(o.m_valueTypeName), m_binding(o.m_binding),
+ m_hasNotifySignal(o.m_hasNotifySignal)
+{
+}
+
+QDeclarativeDebugPropertyReference &QDeclarativeDebugPropertyReference::operator=(const QDeclarativeDebugPropertyReference &o)
+{
+ m_objectDebugId = o.m_objectDebugId; m_name = o.m_name; m_value = o.m_value;
+ m_valueTypeName = o.m_valueTypeName; m_binding = o.m_binding;
+ m_hasNotifySignal = o.m_hasNotifySignal;
+ return *this;
+}
+
+int QDeclarativeDebugPropertyReference::objectDebugId() const
+{
+ return m_objectDebugId;
+}
+
+QString QDeclarativeDebugPropertyReference::name() const
+{
+ return m_name;
+}
+
+QString QDeclarativeDebugPropertyReference::valueTypeName() const
+{
+ return m_valueTypeName;
+}
+
+QVariant QDeclarativeDebugPropertyReference::value() const
+{
+ return m_value;
+}
+
+QString QDeclarativeDebugPropertyReference::binding() const
+{
+ return m_binding;
+}
+
+bool QDeclarativeDebugPropertyReference::hasNotifySignal() const
+{
+ return m_hasNotifySignal;
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/declarative/debugger/qdeclarativedebug_p.h b/src/declarative/debugger/qdeclarativedebug_p.h
new file mode 100644
index 0000000000..f0c7a774eb
--- /dev/null
+++ b/src/declarative/debugger/qdeclarativedebug_p.h
@@ -0,0 +1,371 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef QDECLARATIVEDEBUG_H
+#define QDECLARATIVEDEBUG_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qurl.h>
+#include <QtCore/qvariant.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeDebugConnection;
+class QDeclarativeDebugWatch;
+class QDeclarativeDebugPropertyWatch;
+class QDeclarativeDebugObjectExpressionWatch;
+class QDeclarativeDebugEnginesQuery;
+class QDeclarativeDebugRootContextQuery;
+class QDeclarativeDebugObjectQuery;
+class QDeclarativeDebugExpressionQuery;
+class QDeclarativeDebugPropertyReference;
+class QDeclarativeDebugContextReference;
+class QDeclarativeDebugObjectReference;
+class QDeclarativeDebugFileReference;
+class QDeclarativeDebugEngineReference;
+class QDeclarativeEngineDebugPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeEngineDebug : public QObject
+{
+Q_OBJECT
+public:
+ QDeclarativeEngineDebug(QDeclarativeDebugConnection *, QObject * = 0);
+
+ QDeclarativeDebugPropertyWatch *addWatch(const QDeclarativeDebugPropertyReference &,
+ QObject *parent = 0);
+ QDeclarativeDebugWatch *addWatch(const QDeclarativeDebugContextReference &, const QString &,
+ QObject *parent = 0);
+ QDeclarativeDebugObjectExpressionWatch *addWatch(const QDeclarativeDebugObjectReference &, const QString &,
+ QObject *parent = 0);
+ QDeclarativeDebugWatch *addWatch(const QDeclarativeDebugObjectReference &,
+ QObject *parent = 0);
+ QDeclarativeDebugWatch *addWatch(const QDeclarativeDebugFileReference &,
+ QObject *parent = 0);
+
+ void removeWatch(QDeclarativeDebugWatch *watch);
+
+ QDeclarativeDebugEnginesQuery *queryAvailableEngines(QObject *parent = 0);
+ QDeclarativeDebugRootContextQuery *queryRootContexts(const QDeclarativeDebugEngineReference &,
+ QObject *parent = 0);
+ QDeclarativeDebugObjectQuery *queryObject(const QDeclarativeDebugObjectReference &,
+ QObject *parent = 0);
+ QDeclarativeDebugObjectQuery *queryObjectRecursive(const QDeclarativeDebugObjectReference &,
+ QObject *parent = 0);
+ QDeclarativeDebugExpressionQuery *queryExpressionResult(int objectDebugId,
+ const QString &expr,
+ QObject *parent = 0);
+
+private:
+ Q_DECLARE_PRIVATE(QDeclarativeEngineDebug)
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDebugWatch : public QObject
+{
+Q_OBJECT
+public:
+ enum State { Waiting, Active, Inactive, Dead };
+
+ QDeclarativeDebugWatch(QObject *);
+ ~QDeclarativeDebugWatch();
+
+ int queryId() const;
+ int objectDebugId() const;
+ State state() const;
+
+Q_SIGNALS:
+ void stateChanged(QDeclarativeDebugWatch::State);
+ //void objectChanged(int, const QDeclarativeDebugObjectReference &);
+ //void valueChanged(int, const QVariant &);
+
+ // Server sends value as string if it is a user-type variant
+ void valueChanged(const QByteArray &name, const QVariant &value);
+
+private:
+ friend class QDeclarativeEngineDebug;
+ friend class QDeclarativeEngineDebugPrivate;
+ void setState(State);
+ State m_state;
+ int m_queryId;
+ QDeclarativeEngineDebug *m_client;
+ int m_objectDebugId;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDebugPropertyWatch : public QDeclarativeDebugWatch
+{
+ Q_OBJECT
+public:
+ QDeclarativeDebugPropertyWatch(QObject *parent);
+
+ QString name() const;
+
+private:
+ friend class QDeclarativeEngineDebug;
+ QString m_name;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDebugObjectExpressionWatch : public QDeclarativeDebugWatch
+{
+ Q_OBJECT
+public:
+ QDeclarativeDebugObjectExpressionWatch(QObject *parent);
+
+ QString expression() const;
+
+private:
+ friend class QDeclarativeEngineDebug;
+ QString m_expr;
+ int m_debugId;
+};
+
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDebugQuery : public QObject
+{
+Q_OBJECT
+public:
+ enum State { Waiting, Error, Completed };
+
+ State state() const;
+ bool isWaiting() const;
+
+// bool waitUntilCompleted();
+
+Q_SIGNALS:
+ void stateChanged(QDeclarativeDebugQuery::State);
+
+protected:
+ QDeclarativeDebugQuery(QObject *);
+
+private:
+ friend class QDeclarativeEngineDebug;
+ friend class QDeclarativeEngineDebugPrivate;
+ void setState(State);
+ State m_state;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDebugFileReference
+{
+public:
+ QDeclarativeDebugFileReference();
+ QDeclarativeDebugFileReference(const QDeclarativeDebugFileReference &);
+ QDeclarativeDebugFileReference &operator=(const QDeclarativeDebugFileReference &);
+
+ QUrl url() const;
+ void setUrl(const QUrl &);
+ int lineNumber() const;
+ void setLineNumber(int);
+ int columnNumber() const;
+ void setColumnNumber(int);
+
+private:
+ friend class QDeclarativeEngineDebugPrivate;
+ QUrl m_url;
+ int m_lineNumber;
+ int m_columnNumber;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDebugEngineReference
+{
+public:
+ QDeclarativeDebugEngineReference();
+ QDeclarativeDebugEngineReference(int);
+ QDeclarativeDebugEngineReference(const QDeclarativeDebugEngineReference &);
+ QDeclarativeDebugEngineReference &operator=(const QDeclarativeDebugEngineReference &);
+
+ int debugId() const;
+ QString name() const;
+
+private:
+ friend class QDeclarativeEngineDebugPrivate;
+ int m_debugId;
+ QString m_name;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDebugObjectReference
+{
+public:
+ QDeclarativeDebugObjectReference();
+ QDeclarativeDebugObjectReference(int);
+ QDeclarativeDebugObjectReference(const QDeclarativeDebugObjectReference &);
+ QDeclarativeDebugObjectReference &operator=(const QDeclarativeDebugObjectReference &);
+
+ int debugId() const;
+ QString className() const;
+ QString name() const;
+
+ QDeclarativeDebugFileReference source() const;
+ int contextDebugId() const;
+
+ QList<QDeclarativeDebugPropertyReference> properties() const;
+ QList<QDeclarativeDebugObjectReference> children() const;
+
+private:
+ friend class QDeclarativeEngineDebugPrivate;
+ int m_debugId;
+ QString m_class;
+ QString m_name;
+ QDeclarativeDebugFileReference m_source;
+ int m_contextDebugId;
+ QList<QDeclarativeDebugPropertyReference> m_properties;
+ QList<QDeclarativeDebugObjectReference> m_children;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDebugContextReference
+{
+public:
+ QDeclarativeDebugContextReference();
+ QDeclarativeDebugContextReference(const QDeclarativeDebugContextReference &);
+ QDeclarativeDebugContextReference &operator=(const QDeclarativeDebugContextReference &);
+
+ int debugId() const;
+ QString name() const;
+
+ QList<QDeclarativeDebugObjectReference> objects() const;
+ QList<QDeclarativeDebugContextReference> contexts() const;
+
+private:
+ friend class QDeclarativeEngineDebugPrivate;
+ int m_debugId;
+ QString m_name;
+ QList<QDeclarativeDebugObjectReference> m_objects;
+ QList<QDeclarativeDebugContextReference> m_contexts;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDebugPropertyReference
+{
+public:
+ QDeclarativeDebugPropertyReference();
+ QDeclarativeDebugPropertyReference(const QDeclarativeDebugPropertyReference &);
+ QDeclarativeDebugPropertyReference &operator=(const QDeclarativeDebugPropertyReference &);
+
+ int objectDebugId() const;
+ QString name() const;
+ QVariant value() const;
+ QString valueTypeName() const;
+ QString binding() const;
+ bool hasNotifySignal() const;
+
+private:
+ friend class QDeclarativeEngineDebugPrivate;
+ int m_objectDebugId;
+ QString m_name;
+ QVariant m_value;
+ QString m_valueTypeName;
+ QString m_binding;
+ bool m_hasNotifySignal;
+};
+
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDebugEnginesQuery : public QDeclarativeDebugQuery
+{
+Q_OBJECT
+public:
+ virtual ~QDeclarativeDebugEnginesQuery();
+ QList<QDeclarativeDebugEngineReference> engines() const;
+private:
+ friend class QDeclarativeEngineDebug;
+ friend class QDeclarativeEngineDebugPrivate;
+ QDeclarativeDebugEnginesQuery(QObject *);
+ QDeclarativeEngineDebug *m_client;
+ int m_queryId;
+ QList<QDeclarativeDebugEngineReference> m_engines;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDebugRootContextQuery : public QDeclarativeDebugQuery
+{
+Q_OBJECT
+public:
+ virtual ~QDeclarativeDebugRootContextQuery();
+ QDeclarativeDebugContextReference rootContext() const;
+private:
+ friend class QDeclarativeEngineDebug;
+ friend class QDeclarativeEngineDebugPrivate;
+ QDeclarativeDebugRootContextQuery(QObject *);
+ QDeclarativeEngineDebug *m_client;
+ int m_queryId;
+ QDeclarativeDebugContextReference m_context;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDebugObjectQuery : public QDeclarativeDebugQuery
+{
+Q_OBJECT
+public:
+ virtual ~QDeclarativeDebugObjectQuery();
+ QDeclarativeDebugObjectReference object() const;
+private:
+ friend class QDeclarativeEngineDebug;
+ friend class QDeclarativeEngineDebugPrivate;
+ QDeclarativeDebugObjectQuery(QObject *);
+ QDeclarativeEngineDebug *m_client;
+ int m_queryId;
+ QDeclarativeDebugObjectReference m_object;
+
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDebugExpressionQuery : public QDeclarativeDebugQuery
+{
+Q_OBJECT
+public:
+ virtual ~QDeclarativeDebugExpressionQuery();
+ QString expression() const;
+ QVariant result() const;
+private:
+ friend class QDeclarativeEngineDebug;
+ friend class QDeclarativeEngineDebugPrivate;
+ QDeclarativeDebugExpressionQuery(QObject *);
+ QDeclarativeEngineDebug *m_client;
+ int m_queryId;
+ QString m_expr;
+ QVariant m_result;
+
+};
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QDeclarativeDebugEngineReference)
+Q_DECLARE_METATYPE(QDeclarativeDebugObjectReference)
+Q_DECLARE_METATYPE(QDeclarativeDebugContextReference)
+Q_DECLARE_METATYPE(QDeclarativeDebugPropertyReference)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEDEBUG_H
diff --git a/src/declarative/debugger/qdeclarativedebugclient.cpp b/src/declarative/debugger/qdeclarativedebugclient.cpp
new file mode 100644
index 0000000000..c23e32fcc2
--- /dev/null
+++ b/src/declarative/debugger/qdeclarativedebugclient.cpp
@@ -0,0 +1,207 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativedebugclient_p.h"
+
+#include "qpacketprotocol_p.h"
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qstringlist.h>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeDebugConnectionPrivate : public QObject
+{
+ Q_OBJECT
+public:
+ QDeclarativeDebugConnectionPrivate(QDeclarativeDebugConnection *c);
+ QDeclarativeDebugConnection *q;
+ QPacketProtocol *protocol;
+
+ QStringList enabled;
+ QHash<QString, QDeclarativeDebugClient *> plugins;
+public Q_SLOTS:
+ void connected();
+ void readyRead();
+};
+
+QDeclarativeDebugConnectionPrivate::QDeclarativeDebugConnectionPrivate(QDeclarativeDebugConnection *c)
+: QObject(c), q(c), protocol(0)
+{
+ protocol = new QPacketProtocol(q, this);
+ QObject::connect(c, SIGNAL(connected()), this, SLOT(connected()));
+ QObject::connect(protocol, SIGNAL(readyRead()), this, SLOT(readyRead()));
+}
+
+void QDeclarativeDebugConnectionPrivate::connected()
+{
+ QPacket pack;
+ pack << QString(QLatin1String("QDeclarativeDebugServer")) << enabled;
+ protocol->send(pack);
+}
+
+void QDeclarativeDebugConnectionPrivate::readyRead()
+{
+ QPacket pack = protocol->read();
+ QString name; QByteArray message;
+ pack >> name >> message;
+
+ QHash<QString, QDeclarativeDebugClient *>::Iterator iter =
+ plugins.find(name);
+ if (iter == plugins.end()) {
+ qWarning() << "QDeclarativeDebugConnection: Message received for missing plugin" << name;
+ } else {
+ (*iter)->messageReceived(message);
+ }
+}
+
+QDeclarativeDebugConnection::QDeclarativeDebugConnection(QObject *parent)
+: QTcpSocket(parent), d(new QDeclarativeDebugConnectionPrivate(this))
+{
+}
+
+bool QDeclarativeDebugConnection::isConnected() const
+{
+ return state() == ConnectedState;
+}
+
+class QDeclarativeDebugClientPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeDebugClient)
+public:
+ QDeclarativeDebugClientPrivate();
+
+ QString name;
+ QDeclarativeDebugConnection *client;
+ bool enabled;
+};
+
+QDeclarativeDebugClientPrivate::QDeclarativeDebugClientPrivate()
+: client(0), enabled(false)
+{
+}
+
+QDeclarativeDebugClient::QDeclarativeDebugClient(const QString &name,
+ QDeclarativeDebugConnection *parent)
+: QObject(*(new QDeclarativeDebugClientPrivate), parent)
+{
+ Q_D(QDeclarativeDebugClient);
+ d->name = name;
+ d->client = parent;
+
+ if (!d->client)
+ return;
+
+ if (d->client->d->plugins.contains(name)) {
+ qWarning() << "QDeclarativeDebugClient: Conflicting plugin name" << name;
+ d->client = 0;
+ } else {
+ d->client->d->plugins.insert(name, this);
+ }
+}
+
+QString QDeclarativeDebugClient::name() const
+{
+ Q_D(const QDeclarativeDebugClient);
+ return d->name;
+}
+
+bool QDeclarativeDebugClient::isEnabled() const
+{
+ Q_D(const QDeclarativeDebugClient);
+ return d->enabled;
+}
+
+void QDeclarativeDebugClient::setEnabled(bool e)
+{
+ Q_D(QDeclarativeDebugClient);
+ if (e == d->enabled)
+ return;
+
+ d->enabled = e;
+
+ if (d->client) {
+ if (e)
+ d->client->d->enabled.append(d->name);
+ else
+ d->client->d->enabled.removeAll(d->name);
+
+ if (d->client->state() == QTcpSocket::ConnectedState) {
+ QPacket pack;
+ pack << QString(QLatin1String("QDeclarativeDebugServer"));
+ if (e) pack << (int)1;
+ else pack << (int)2;
+ pack << d->name;
+ d->client->d->protocol->send(pack);
+ }
+ }
+}
+
+bool QDeclarativeDebugClient::isConnected() const
+{
+ Q_D(const QDeclarativeDebugClient);
+
+ if (!d->client)
+ return false;
+ return d->client->isConnected();
+}
+
+void QDeclarativeDebugClient::sendMessage(const QByteArray &message)
+{
+ Q_D(QDeclarativeDebugClient);
+
+ if (!d->client || !d->client->isConnected())
+ return;
+
+ QPacket pack;
+ pack << d->name << message;
+ d->client->d->protocol->send(pack);
+}
+
+void QDeclarativeDebugClient::messageReceived(const QByteArray &)
+{
+}
+
+QT_END_NAMESPACE
+
+#include <qdeclarativedebugclient.moc>
diff --git a/src/declarative/debugger/qdeclarativedebugclient_p.h b/src/declarative/debugger/qdeclarativedebugclient_p.h
new file mode 100644
index 0000000000..4144a66b34
--- /dev/null
+++ b/src/declarative/debugger/qdeclarativedebugclient_p.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEDEBUGCLIENT_H
+#define QDECLARATIVEDEBUGCLIENT_H
+
+#include <QtNetwork/qtcpsocket.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeDebugConnectionPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeDebugConnection : public QTcpSocket
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(QDeclarativeDebugConnection)
+public:
+ QDeclarativeDebugConnection(QObject * = 0);
+
+ bool isConnected() const;
+private:
+ QDeclarativeDebugConnectionPrivate *d;
+ friend class QDeclarativeDebugClient;
+ friend class QDeclarativeDebugClientPrivate;
+};
+
+class QDeclarativeDebugClientPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeDebugClient : public QObject
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeDebugClient)
+ Q_DISABLE_COPY(QDeclarativeDebugClient)
+
+public:
+ QDeclarativeDebugClient(const QString &, QDeclarativeDebugConnection *parent);
+
+ QString name() const;
+
+ bool isEnabled() const;
+ void setEnabled(bool);
+
+ bool isConnected() const;
+
+ void sendMessage(const QByteArray &);
+
+protected:
+ virtual void messageReceived(const QByteArray &);
+
+private:
+ friend class QDeclarativeDebugConnection;
+ friend class QDeclarativeDebugConnectionPrivate;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEDEBUGCLIENT_H
diff --git a/src/declarative/debugger/qdeclarativedebuggerstatus.cpp b/src/declarative/debugger/qdeclarativedebuggerstatus.cpp
new file mode 100644
index 0000000000..5908628b9a
--- /dev/null
+++ b/src/declarative/debugger/qdeclarativedebuggerstatus.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativedebuggerstatus_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeDebuggerStatus::~QDeclarativeDebuggerStatus()
+{
+}
+
+void QDeclarativeDebuggerStatus::setSelectedState(bool)
+{
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/debugger/qdeclarativedebuggerstatus_p.h b/src/declarative/debugger/qdeclarativedebuggerstatus_p.h
new file mode 100644
index 0000000000..a3ba40a790
--- /dev/null
+++ b/src/declarative/debugger/qdeclarativedebuggerstatus_p.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEDEBUGGERSTATUS_P_H
+#define QDECLARATIVEDEBUGGERSTATUS_P_H
+
+#include <QtCore/qobject.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDebuggerStatus
+{
+public:
+ virtual ~QDeclarativeDebuggerStatus();
+
+ virtual void setSelectedState(bool);
+};
+Q_DECLARE_INTERFACE(QDeclarativeDebuggerStatus, "com.trolltech.qml.QDeclarativeDebuggerStatus")
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QLMDEBUGGERSTATUS_P_H
diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp
new file mode 100644
index 0000000000..d9bbdb565f
--- /dev/null
+++ b/src/declarative/debugger/qdeclarativedebugservice.cpp
@@ -0,0 +1,426 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativedebugservice_p.h"
+
+#include "qpacketprotocol_p.h"
+
+#include <QtCore/qdebug.h>
+#include <QtNetwork/qtcpserver.h>
+#include <QtNetwork/qtcpsocket.h>
+#include <QtCore/qstringlist.h>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeDebugServerPrivate;
+class QDeclarativeDebugServer : public QObject
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeDebugServer)
+ Q_DISABLE_COPY(QDeclarativeDebugServer)
+public:
+ static QDeclarativeDebugServer *instance();
+ void wait();
+ void registerForStartNotification(QObject *object, const char *receiver);
+
+private Q_SLOTS:
+ void readyRead();
+ void registeredObjectDestroyed(QObject *object);
+
+private:
+ friend class QDeclarativeDebugService;
+ friend class QDeclarativeDebugServicePrivate;
+ QDeclarativeDebugServer(int);
+};
+
+class QDeclarativeDebugServerPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeDebugServer)
+public:
+ QDeclarativeDebugServerPrivate();
+ void wait();
+
+ int port;
+ QTcpSocket *connection;
+ QPacketProtocol *protocol;
+ QHash<QString, QDeclarativeDebugService *> plugins;
+ QStringList enabledPlugins;
+ QList<QPair<QObject*, QByteArray> > notifyClients;
+};
+
+class QDeclarativeDebugServicePrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeDebugService)
+public:
+ QDeclarativeDebugServicePrivate();
+
+ QString name;
+ QDeclarativeDebugServer *server;
+};
+
+QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate()
+: connection(0), protocol(0)
+{
+}
+
+void QDeclarativeDebugServerPrivate::wait()
+{
+ Q_Q(QDeclarativeDebugServer);
+ QTcpServer server;
+
+ if (!server.listen(QHostAddress::Any, port)) {
+ qWarning("QDeclarativeDebugServer: Unable to listen on port %d", port);
+ return;
+ }
+
+ qWarning("QDeclarativeDebugServer: Waiting for connection on port %d...", port);
+
+ for (int i=0; i<notifyClients.count(); i++) {
+ if (!QMetaObject::invokeMethod(notifyClients[i].first, notifyClients[i].second)) {
+ qWarning() << "QDeclarativeDebugServer: unable to call method" << notifyClients[i].second
+ << "on object" << notifyClients[i].first << "to notify of debug server start";
+ }
+ }
+ notifyClients.clear();
+
+ if (!server.waitForNewConnection(-1)) {
+ qWarning("QDeclarativeDebugServer: Connection error");
+ return;
+ }
+
+ connection = server.nextPendingConnection();
+ connection->setParent(q);
+ protocol = new QPacketProtocol(connection, q);
+
+ // ### Wait for hello
+ while (!protocol->packetsAvailable()) {
+ connection->waitForReadyRead();
+ }
+ QPacket hello = protocol->read();
+ QString name;
+ hello >> name >> enabledPlugins;
+ if (name != QLatin1String("QDeclarativeDebugServer")) {
+ qWarning("QDeclarativeDebugServer: Invalid hello message");
+ delete protocol; delete connection; connection = 0; protocol = 0;
+ return;
+ }
+
+ QObject::connect(protocol, SIGNAL(readyRead()), q, SLOT(readyRead()));
+ q->readyRead();
+
+ qWarning("QDeclarativeDebugServer: Connection established");
+}
+
+QDeclarativeDebugServer *QDeclarativeDebugServer::instance()
+{
+ static bool envTested = false;
+ static QDeclarativeDebugServer *server = 0;
+
+ if (!envTested) {
+ envTested = true;
+ QByteArray env = qgetenv("QML_DEBUG_SERVER_PORT");
+
+ bool ok = false;
+ int port = env.toInt(&ok);
+
+ if (ok && port > 1024)
+ server = new QDeclarativeDebugServer(port);
+ }
+
+ return server;
+}
+
+void QDeclarativeDebugServer::wait()
+{
+ Q_D(QDeclarativeDebugServer);
+ d->wait();
+}
+
+void QDeclarativeDebugServer::registerForStartNotification(QObject *object, const char *methodName)
+{
+ Q_D(QDeclarativeDebugServer);
+ connect(object, SIGNAL(destroyed(QObject*)), SLOT(registeredObjectDestroyed(QObject*)));
+ d->notifyClients.append(qMakePair(object, QByteArray(methodName)));
+}
+
+void QDeclarativeDebugServer::registeredObjectDestroyed(QObject *object)
+{
+ Q_D(QDeclarativeDebugServer);
+ QMutableListIterator<QPair<QObject*, QByteArray> > i(d->notifyClients);
+ while (i.hasNext()) {
+ if (i.next().first == object)
+ i.remove();
+ }
+}
+
+QDeclarativeDebugServer::QDeclarativeDebugServer(int port)
+: QObject(*(new QDeclarativeDebugServerPrivate))
+{
+ Q_D(QDeclarativeDebugServer);
+ d->port = port;
+}
+
+void QDeclarativeDebugServer::readyRead()
+{
+ Q_D(QDeclarativeDebugServer);
+
+ QString debugServer(QLatin1String("QDeclarativeDebugServer"));
+
+ while (d->protocol->packetsAvailable()) {
+ QPacket pack = d->protocol->read();
+
+ QString name;
+ pack >> name;
+
+ if (name == debugServer) {
+ int op = -1; QString plugin;
+ pack >> op >> plugin;
+
+ if (op == 1) {
+ // Enable
+ if (!d->enabledPlugins.contains(plugin)) {
+ d->enabledPlugins.append(plugin);
+ QHash<QString, QDeclarativeDebugService *>::Iterator iter =
+ d->plugins.find(plugin);
+ if (iter != d->plugins.end())
+ (*iter)->enabledChanged(true);
+ }
+
+ } else if (op == 2) {
+ // Disable
+ if (d->enabledPlugins.contains(plugin)) {
+ d->enabledPlugins.removeAll(plugin);
+ QHash<QString, QDeclarativeDebugService *>::Iterator iter =
+ d->plugins.find(plugin);
+ if (iter != d->plugins.end())
+ (*iter)->enabledChanged(false);
+ }
+ } else {
+ qWarning("QDeclarativeDebugServer: Invalid control message %d", op);
+ }
+
+ } else {
+ QByteArray message;
+ pack >> message;
+
+ QHash<QString, QDeclarativeDebugService *>::Iterator iter =
+ d->plugins.find(name);
+ if (iter == d->plugins.end()) {
+ qWarning() << "QDeclarativeDebugServer: Message received for missing plugin" << name;
+ } else {
+ (*iter)->messageReceived(message);
+ }
+ }
+ }
+}
+
+QDeclarativeDebugServicePrivate::QDeclarativeDebugServicePrivate()
+: server(0)
+{
+}
+
+QDeclarativeDebugService::QDeclarativeDebugService(const QString &name, QObject *parent)
+: QObject(*(new QDeclarativeDebugServicePrivate), parent)
+{
+ Q_D(QDeclarativeDebugService);
+ d->name = name;
+ d->server = QDeclarativeDebugServer::instance();
+
+ if (!d->server)
+ return;
+
+ if (d->server->d_func()->plugins.contains(name)) {
+ qWarning() << "QDeclarativeDebugService: Conflicting plugin name" << name;
+ d->server = 0;
+ } else {
+ d->server->d_func()->plugins.insert(name, this);
+ }
+}
+
+QString QDeclarativeDebugService::name() const
+{
+ Q_D(const QDeclarativeDebugService);
+ return d->name;
+}
+
+bool QDeclarativeDebugService::isEnabled() const
+{
+ Q_D(const QDeclarativeDebugService);
+ return (d->server && d->server->d_func()->enabledPlugins.contains(d->name));
+}
+
+namespace {
+
+ struct ObjectReference
+ {
+ QPointer<QObject> object;
+ int id;
+ };
+
+ struct ObjectReferenceHash
+ {
+ ObjectReferenceHash() : nextId(0) {}
+
+ QHash<QObject *, ObjectReference> objects;
+ QHash<int, QObject *> ids;
+
+ int nextId;
+ };
+
+}
+Q_GLOBAL_STATIC(ObjectReferenceHash, objectReferenceHash);
+
+
+/*!
+ Returns a unique id for \a object. Calling this method multiple times
+ for the same object will return the same id.
+*/
+int QDeclarativeDebugService::idForObject(QObject *object)
+{
+ if (!object)
+ return -1;
+
+ ObjectReferenceHash *hash = objectReferenceHash();
+ QHash<QObject *, ObjectReference>::Iterator iter =
+ hash->objects.find(object);
+
+ if (iter == hash->objects.end()) {
+ int id = hash->nextId++;
+
+ hash->ids.insert(id, object);
+ iter = hash->objects.insert(object, ObjectReference());
+ iter->object = object;
+ iter->id = id;
+ } else if (iter->object != object) {
+ int id = hash->nextId++;
+
+ hash->ids.remove(iter->id);
+
+ hash->ids.insert(id, object);
+ iter->object = object;
+ iter->id = id;
+ }
+ return iter->id;
+}
+
+/*!
+ Returns the object for unique \a id. If the object has not previously been
+ assigned an id, through idForObject(), then 0 is returned. If the object
+ has been destroyed, 0 is returned.
+*/
+QObject *QDeclarativeDebugService::objectForId(int id)
+{
+ ObjectReferenceHash *hash = objectReferenceHash();
+
+ QHash<int, QObject *>::Iterator iter = hash->ids.find(id);
+ if (iter == hash->ids.end())
+ return 0;
+
+
+ QHash<QObject *, ObjectReference>::Iterator objIter =
+ hash->objects.find(*iter);
+ Q_ASSERT(objIter != hash->objects.end());
+
+ if (objIter->object == 0) {
+ hash->ids.erase(iter);
+ hash->objects.erase(objIter);
+ return 0;
+ } else {
+ return *iter;
+ }
+}
+
+bool QDeclarativeDebugService::isDebuggingEnabled()
+{
+ return QDeclarativeDebugServer::instance() != 0;
+}
+
+QString QDeclarativeDebugService::objectToString(QObject *obj)
+{
+ if(!obj)
+ return QLatin1String("NULL");
+
+ QString objectName = obj->objectName();
+ if(objectName.isEmpty())
+ objectName = QLatin1String("<unnamed>");
+
+ QString rv = QString::fromUtf8(obj->metaObject()->className()) +
+ QLatin1String(": ") + objectName;
+
+ return rv;
+}
+
+void QDeclarativeDebugService::waitForClients()
+{
+ QDeclarativeDebugServer::instance()->wait();
+}
+
+void QDeclarativeDebugService::notifyOnServerStart(QObject *object, const char *receiver)
+{
+ QDeclarativeDebugServer::instance()->registerForStartNotification(object, receiver);
+}
+
+void QDeclarativeDebugService::sendMessage(const QByteArray &message)
+{
+ Q_D(QDeclarativeDebugService);
+
+ if (!d->server || !d->server->d_func()->connection)
+ return;
+
+ QPacket pack;
+ pack << d->name << message;
+ d->server->d_func()->protocol->send(pack);
+ d->server->d_func()->connection->flush();
+}
+
+void QDeclarativeDebugService::enabledChanged(bool)
+{
+}
+
+void QDeclarativeDebugService::messageReceived(const QByteArray &)
+{
+}
+
+QT_END_NAMESPACE
+
+#include <qdeclarativedebugservice.moc>
diff --git a/src/declarative/debugger/qdeclarativedebugservice_p.h b/src/declarative/debugger/qdeclarativedebugservice_p.h
new file mode 100644
index 0000000000..498edf386f
--- /dev/null
+++ b/src/declarative/debugger/qdeclarativedebugservice_p.h
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEDEBUGSERVICE_H
+#define QDECLARATIVEDEBUGSERVICE_H
+
+#include <QtCore/qobject.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeDebugServicePrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeDebugService : public QObject
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeDebugService)
+ Q_DISABLE_COPY(QDeclarativeDebugService)
+public:
+ QDeclarativeDebugService(const QString &, QObject *parent = 0);
+
+ QString name() const;
+
+ bool isEnabled() const;
+
+ void sendMessage(const QByteArray &);
+
+ static int idForObject(QObject *);
+ static QObject *objectForId(int);
+
+ static bool isDebuggingEnabled();
+ static QString objectToString(QObject *obj);
+
+ static void waitForClients();
+
+ static void notifyOnServerStart(QObject *object, const char *receiver);
+
+protected:
+ virtual void enabledChanged(bool);
+ virtual void messageReceived(const QByteArray &);
+
+private:
+ void registerForStartNotification(QObject *object, const char *methodName);
+ friend class QDeclarativeDebugServer;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEDEBUGSERVICE_H
+
diff --git a/src/declarative/debugger/qpacketprotocol.cpp b/src/declarative/debugger/qpacketprotocol.cpp
new file mode 100644
index 0000000000..7440b87176
--- /dev/null
+++ b/src/declarative/debugger/qpacketprotocol.cpp
@@ -0,0 +1,498 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qpacketprotocol_p.h"
+
+#include <QBuffer>
+
+QT_BEGIN_NAMESPACE
+
+#define MAX_PACKET_SIZE 0x7FFFFFFF
+
+/*!
+ \class QPacketProtocol
+ \internal
+
+ \brief The QPacketProtocol class encapsulates communicating discrete packets
+ across fragmented IO channels, such as TCP sockets.
+
+ QPacketProtocol makes it simple to send arbitrary sized data "packets" across
+ fragmented transports such as TCP and UDP.
+
+ As transmission boundaries are not respected, sending packets over protocols
+ like TCP frequently involves "stitching" them back together at the receiver.
+ QPacketProtocol makes this easier by performing this task for you. Packet
+ data sent using QPacketProtocol is prepended with a 4-byte size header
+ allowing the receiving QPacketProtocol to buffer the packet internally until
+ it has all been received. QPacketProtocol does not perform any sanity
+ checking on the size or on the data, so this class should only be used in
+ prototyping or trusted situations where DOS attacks are unlikely.
+
+ QPacketProtocol does not perform any communications itself. Instead it can
+ operate on any QIODevice that supports the QIODevice::readyRead() signal. A
+ logical "packet" is encapsulated by the companion QPacket class. The
+ following example shows two ways to send data using QPacketProtocol. The
+ transmitted data is equivalent in both.
+
+ \code
+ QTcpSocket socket;
+ // ... connect socket ...
+
+ QPacketProtocol protocol(&socket);
+
+ // Send packet the quick way
+ protocol.send() << "Hello world" << 123;
+
+ // Send packet the longer way
+ QPacket packet;
+ packet << "Hello world" << 123;
+ protocol.send(packet);
+ \endcode
+
+ Likewise, the following shows how to read data from QPacketProtocol, assuming
+ that the QPacketProtocol::readyRead() signal has been emitted.
+
+ \code
+ // ... QPacketProtocol::readyRead() is emitted ...
+
+ int a;
+ QByteArray b;
+
+ // Receive packet the quick way
+ protocol.read() >> a >> b;
+
+ // Receive packet the longer way
+ QPacket packet = protocol.read();
+ p >> a >> b;
+ \endcode
+
+ \ingroup io
+ \sa QPacket
+*/
+
+class QPacketProtocolPrivate : public QObject
+{
+Q_OBJECT
+public:
+ QPacketProtocolPrivate(QPacketProtocol * parent, QIODevice * _dev)
+ : QObject(parent), inProgressSize(-1), maxPacketSize(MAX_PACKET_SIZE),
+ dev(_dev)
+ {
+ Q_ASSERT(4 == sizeof(qint32));
+
+ QObject::connect(this, SIGNAL(readyRead()),
+ parent, SIGNAL(readyRead()));
+ QObject::connect(this, SIGNAL(packetWritten()),
+ parent, SIGNAL(packetWritten()));
+ QObject::connect(this, SIGNAL(invalidPacket()),
+ parent, SIGNAL(invalidPacket()));
+ QObject::connect(dev, SIGNAL(readyRead()),
+ this, SLOT(readyToRead()));
+ QObject::connect(dev, SIGNAL(aboutToClose()),
+ this, SLOT(aboutToClose()));
+ QObject::connect(dev, SIGNAL(bytesWritten(qint64)),
+ this, SLOT(bytesWritten(qint64)));
+ }
+
+Q_SIGNALS:
+ void readyRead();
+ void packetWritten();
+ void invalidPacket();
+
+public Q_SLOTS:
+ void aboutToClose()
+ {
+ inProgress.clear();
+ sendingPackets.clear();
+ inProgressSize = -1;
+ }
+
+ void bytesWritten(qint64 bytes)
+ {
+ Q_ASSERT(!sendingPackets.isEmpty());
+
+ while(bytes) {
+ if(sendingPackets.at(0) > bytes) {
+ sendingPackets[0] -= bytes;
+ bytes = 0;
+ } else {
+ bytes -= sendingPackets.at(0);
+ sendingPackets.removeFirst();
+ emit packetWritten();
+ }
+ }
+ }
+
+ void readyToRead()
+ {
+ if(-1 == inProgressSize) {
+ // We need a size header of sizeof(qint32)
+ if(sizeof(qint32) > (uint)dev->bytesAvailable())
+ return;
+
+ // Read size header
+ int read = dev->read((char *)&inProgressSize, sizeof(qint32));
+ Q_ASSERT(read == sizeof(qint32));
+ Q_UNUSED(read);
+
+ // Check sizing constraints
+ if(inProgressSize > maxPacketSize) {
+ QObject::disconnect(dev, SIGNAL(readyRead()),
+ this, SLOT(readyToRead()));
+ QObject::disconnect(dev, SIGNAL(aboutToClose()),
+ this, SLOT(aboutToClose()));
+ QObject::disconnect(dev, SIGNAL(bytesWritten(qint64)),
+ this, SLOT(bytesWritten(qint64)));
+ dev = 0;
+ emit invalidPacket();
+ return;
+ }
+
+ inProgressSize -= sizeof(qint32);
+
+ // Need to get trailing data
+ readyToRead();
+ } else {
+ inProgress.append(dev->read(inProgressSize - inProgress.size()));
+
+ if(inProgressSize == inProgress.size()) {
+ // Packet has arrived!
+ packets.append(inProgress);
+ inProgressSize = -1;
+ inProgress.clear();
+
+ emit readyRead();
+
+ // Need to get trailing data
+ readyToRead();
+ }
+ }
+ }
+
+public:
+ QList<qint64> sendingPackets;
+ QList<QByteArray> packets;
+ QByteArray inProgress;
+ qint32 inProgressSize;
+ qint32 maxPacketSize;
+ QIODevice * dev;
+};
+
+/*!
+ Construct a QPacketProtocol instance that works on \a dev with the
+ specified \a parent.
+ */
+QPacketProtocol::QPacketProtocol(QIODevice * dev, QObject * parent)
+: QObject(parent), d(new QPacketProtocolPrivate(this, dev))
+{
+ Q_ASSERT(dev);
+}
+
+/*!
+ Destroys the QPacketProtocol instance.
+ */
+QPacketProtocol::~QPacketProtocol()
+{
+}
+
+/*!
+ Returns the maximum packet size allowed. By default this is
+ 2,147,483,647 bytes.
+
+ If a packet claiming to be larger than the maximum packet size is received,
+ the QPacketProtocol::invalidPacket() signal is emitted.
+
+ \sa QPacketProtocol::setMaximumPacketSize()
+ */
+qint32 QPacketProtocol::maximumPacketSize() const
+{
+ return d->maxPacketSize;
+}
+
+/*!
+ Sets the maximum allowable packet size to \a max.
+
+ \sa QPacketProtocol::maximumPacketSize()
+ */
+qint32 QPacketProtocol::setMaximumPacketSize(qint32 max)
+{
+ if(max > (signed)sizeof(qint32))
+ d->maxPacketSize = max;
+ return d->maxPacketSize;
+}
+
+/*!
+ Returns a streamable object that is transmitted on destruction. For example
+
+ \code
+ protocol.send() << "Hello world" << 123;
+ \endcode
+
+ will send a packet containing "Hello world" and 123. To construct more
+ complex packets, explicitly construct a QPacket instance.
+ */
+QPacketAutoSend QPacketProtocol::send()
+{
+ return QPacketAutoSend(this);
+}
+
+/*!
+ \fn void QPacketProtocol::send(const QPacket & packet)
+
+ Transmit the \a packet.
+ */
+void QPacketProtocol::send(const QPacket & p)
+{
+ if(p.b.isEmpty())
+ return; // We don't send empty packets
+
+ qint64 sendSize = p.b.size() + sizeof(qint32);
+
+ d->sendingPackets.append(sendSize);
+ qint32 sendSize32 = sendSize;
+ qint64 writeBytes = d->dev->write((char *)&sendSize32, sizeof(qint32));
+ Q_ASSERT(writeBytes == sizeof(qint32));
+ writeBytes = d->dev->write(p.b);
+ Q_ASSERT(writeBytes == p.b.size());
+}
+
+/*!
+ Returns the number of received packets yet to be read.
+ */
+qint64 QPacketProtocol::packetsAvailable() const
+{
+ return d->packets.count();
+}
+
+/*!
+ Discard any unread packets.
+ */
+void QPacketProtocol::clear()
+{
+ d->packets.clear();
+}
+
+/*!
+ Return the next unread packet, or an invalid QPacket instance if no packets
+ are available. This method does NOT block.
+ */
+QPacket QPacketProtocol::read()
+{
+ if(0 == d->packets.count())
+ return QPacket();
+
+ QPacket rv(d->packets.at(0));
+ d->packets.removeFirst();
+ return rv;
+}
+
+/*!
+ Return the QIODevice passed to the QPacketProtocol constructor.
+*/
+QIODevice * QPacketProtocol::device()
+{
+ return d->dev;
+}
+
+/*!
+ \fn void QPacketProtocol::readyRead()
+
+ Emitted whenever a new packet is received. Applications may use
+ QPacketProtocol::read() to retrieve this packet.
+ */
+
+/*!
+ \fn void QPacketProtocol::invalidPacket()
+
+ A packet larger than the maximum allowable packet size was received. The
+ packet will be discarded and, as it indicates corruption in the protocol, no
+ further packets will be received.
+ */
+
+/*!
+ \fn void QPacketProtocol::packetWritten()
+
+ Emitted each time a packet is completing written to the device. This signal
+ may be used for communications flow control.
+ */
+
+/*!
+ \class QPacket
+ \internal
+
+ \brief The QPacket class encapsulates an unfragmentable packet of data to be
+ transmitted by QPacketProtocol.
+
+ The QPacket class works together with QPacketProtocol to make it simple to
+ send arbitrary sized data "packets" across fragmented transports such as TCP
+ and UDP.
+
+ QPacket provides a QDataStream interface to an unfragmentable packet.
+ Applications should construct a QPacket, propagate it with data and then
+ transmit it over a QPacketProtocol instance. For example:
+ \code
+ QPacketProtocol protocol(...);
+
+ QPacket myPacket;
+ myPacket << "Hello world!" << 123;
+ protocol.send(myPacket);
+ \endcode
+
+ As long as both ends of the connection are using the QPacketProtocol class,
+ the data within this packet will be delivered unfragmented at the other end,
+ ready for extraction.
+
+ \code
+ QByteArray greeting;
+ int count;
+
+ QPacket myPacket = protocol.read();
+
+ myPacket >> greeting >> count;
+ \endcode
+
+ Only packets returned from QPacketProtocol::read() may be read from. QPacket
+ instances constructed by directly by applications are for transmission only
+ and are considered "write only". Attempting to read data from them will
+ result in undefined behavior.
+
+ \ingroup io
+ \sa QPacketProtocol
+ */
+
+/*!
+ Constructs an empty write-only packet.
+ */
+QPacket::QPacket()
+: QDataStream(), buf(0)
+{
+ buf = new QBuffer(&b);
+ buf->open(QIODevice::WriteOnly);
+ setDevice(buf);
+}
+
+/*!
+ Destroys the QPacket instance.
+ */
+QPacket::~QPacket()
+{
+ if(buf) {
+ delete buf;
+ buf = 0;
+ }
+}
+
+/*!
+ Creates a copy of \a other. The initial stream positions are shared, but the
+ two packets are otherwise independant.
+ */
+QPacket::QPacket(const QPacket & other)
+: QDataStream(), b(other.b), buf(0)
+{
+ buf = new QBuffer(&b);
+ buf->open(other.buf->openMode());
+ setDevice(buf);
+}
+
+/*!
+ \internal
+ */
+QPacket::QPacket(const QByteArray & ba)
+: QDataStream(), b(ba), buf(0)
+{
+ buf = new QBuffer(&b);
+ buf->open(QIODevice::ReadOnly);
+ setDevice(buf);
+}
+
+/*!
+ Returns true if this packet is empty - that is, contains no data.
+ */
+bool QPacket::isEmpty() const
+{
+ return b.isEmpty();
+}
+
+/*!
+ Clears data in the packet. This is useful for reusing one writable packet.
+ For example
+ \code
+ QPacketProtocol protocol(...);
+
+ QPacket packet;
+
+ packet << "Hello world!" << 123;
+ protocol.send(packet);
+
+ packet.clear();
+ packet << "Goodbyte world!" << 789;
+ protocol.send(packet);
+ \endcode
+ */
+void QPacket::clear()
+{
+ QBuffer::OpenMode oldMode = buf->openMode();
+ buf->close();
+ b.clear();
+ buf->setBuffer(&b); // reset QBuffer internals with new size of b.
+ buf->open(oldMode);
+}
+
+/*!
+ \class QPacketAutoSend
+ \internal
+
+ \internal
+ */
+QPacketAutoSend::QPacketAutoSend(QPacketProtocol * _p)
+: QPacket(), p(_p)
+{
+}
+
+QPacketAutoSend::~QPacketAutoSend()
+{
+ if(!b.isEmpty())
+ p->send(*this);
+}
+
+QT_END_NAMESPACE
+
+#include <qpacketprotocol.moc>
diff --git a/src/declarative/debugger/qpacketprotocol_p.h b/src/declarative/debugger/qpacketprotocol_p.h
new file mode 100644
index 0000000000..cfdce4ec03
--- /dev/null
+++ b/src/declarative/debugger/qpacketprotocol_p.h
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPACKETPROTOCOL_H
+#define QPACKETPROTOCOL_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qdatastream.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QIODevice;
+class QBuffer;
+class QPacket;
+class QPacketAutoSend;
+class QPacketProtocolPrivate;
+
+class Q_DECLARATIVE_EXPORT QPacketProtocol : public QObject
+{
+Q_OBJECT
+public:
+ explicit QPacketProtocol(QIODevice * dev, QObject * parent = 0);
+ virtual ~QPacketProtocol();
+
+ qint32 maximumPacketSize() const;
+ qint32 setMaximumPacketSize(qint32);
+
+ QPacketAutoSend send();
+ void send(const QPacket &);
+
+ qint64 packetsAvailable() const;
+ QPacket read();
+
+ void clear();
+
+ QIODevice * device();
+
+Q_SIGNALS:
+ void readyRead();
+ void invalidPacket();
+ void packetWritten();
+
+private:
+ QPacketProtocolPrivate * d;
+};
+
+
+class Q_DECLARATIVE_EXPORT QPacket : public QDataStream
+{
+public:
+ QPacket();
+ QPacket(const QPacket &);
+ virtual ~QPacket();
+
+ void clear();
+ bool isEmpty() const;
+
+protected:
+ friend class QPacketProtocol;
+ QPacket(const QByteArray & ba);
+ QByteArray b;
+ QBuffer * buf;
+};
+
+class Q_DECLARATIVE_EXPORT QPacketAutoSend : public QPacket
+{
+public:
+ virtual ~QPacketAutoSend();
+
+private:
+ friend class QPacketProtocol;
+ QPacketAutoSend(QPacketProtocol *);
+ QPacketProtocol * p;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/declarative/declarative.pro b/src/declarative/declarative.pro
new file mode 100644
index 0000000000..4287e250ee
--- /dev/null
+++ b/src/declarative/declarative.pro
@@ -0,0 +1,29 @@
+TARGET = QtDeclarative
+QPRO_PWD = $$PWD
+QT = core gui xml script network
+contains(QT_CONFIG, svg): QT += svg
+contains(QT_CONFIG, opengl): QT += opengl
+DEFINES += QT_BUILD_DECLARATIVE_LIB QT_NO_URL_CAST_FROM_STRING
+win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x66000000
+solaris-cc*:QMAKE_CXXFLAGS_RELEASE -= -O2
+
+unix:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui QtXml
+
+exists("qdeclarative_enable_gcov") {
+ QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage -fno-elide-constructors
+ LIBS += -lgcov
+}
+
+include(../qbase.pri)
+
+#INCLUDEPATH -= $$QMAKE_INCDIR_QT/$$TARGET
+#DESTDIR=.
+
+#modules
+include(3rdparty/3rdparty.pri)
+include(util/util.pri)
+include(graphicsitems/graphicsitems.pri)
+include(qml/qml.pri)
+include(debugger/debugger.pri)
+
+symbian:TARGET.UID3=0x2001E623
diff --git a/src/declarative/graphicsitems/graphicsitems.pri b/src/declarative/graphicsitems/graphicsitems.pri
new file mode 100644
index 0000000000..3ff92b1ac2
--- /dev/null
+++ b/src/declarative/graphicsitems/graphicsitems.pri
@@ -0,0 +1,86 @@
+INCLUDEPATH += $$PWD
+
+HEADERS += \
+ $$PWD/qdeclarativeitemsmodule_p.h \
+ $$PWD/qdeclarativeanchors_p.h \
+ $$PWD/qdeclarativeanchors_p_p.h \
+ $$PWD/qdeclarativeevents_p_p.h \
+ $$PWD/qdeclarativeeffects_p.h \
+ $$PWD/qdeclarativeflickable_p.h \
+ $$PWD/qdeclarativeflickable_p_p.h \
+ $$PWD/qdeclarativeflipable_p.h \
+ $$PWD/qdeclarativegridview_p.h \
+ $$PWD/qdeclarativeimage_p.h \
+ $$PWD/qdeclarativeimagebase_p.h \
+ $$PWD/qdeclarativeborderimage_p.h \
+ $$PWD/qdeclarativepainteditem_p.h \
+ $$PWD/qdeclarativepainteditem_p_p.h \
+ $$PWD/qdeclarativeimage_p_p.h \
+ $$PWD/qdeclarativeborderimage_p_p.h \
+ $$PWD/qdeclarativeimagebase_p_p.h \
+ $$PWD/qdeclarativeanimatedimage_p.h \
+ $$PWD/qdeclarativeanimatedimage_p_p.h \
+ $$PWD/qdeclarativeitem.h \
+ $$PWD/qdeclarativeitem_p.h \
+ $$PWD/qdeclarativefocuspanel_p.h \
+ $$PWD/qdeclarativefocusscope_p.h \
+ $$PWD/qdeclarativepositioners_p.h \
+ $$PWD/qdeclarativepositioners_p_p.h \
+ $$PWD/qdeclarativeloader_p.h \
+ $$PWD/qdeclarativeloader_p_p.h \
+ $$PWD/qdeclarativemousearea_p.h \
+ $$PWD/qdeclarativemousearea_p_p.h \
+ $$PWD/qdeclarativepath_p.h \
+ $$PWD/qdeclarativepath_p_p.h \
+ $$PWD/qdeclarativepathview_p.h \
+ $$PWD/qdeclarativepathview_p_p.h \
+ $$PWD/qdeclarativerectangle_p.h \
+ $$PWD/qdeclarativerectangle_p_p.h \
+ $$PWD/qdeclarativerepeater_p.h \
+ $$PWD/qdeclarativerepeater_p_p.h \
+ $$PWD/qdeclarativescalegrid_p_p.h \
+ $$PWD/qdeclarativetextinput_p.h \
+ $$PWD/qdeclarativetextinput_p_p.h \
+ $$PWD/qdeclarativetextedit_p.h \
+ $$PWD/qdeclarativetextedit_p_p.h \
+ $$PWD/qdeclarativetext_p.h \
+ $$PWD/qdeclarativetext_p_p.h \
+ $$PWD/qdeclarativevisualitemmodel_p.h \
+ $$PWD/qdeclarativelistview_p.h \
+ $$PWD/qdeclarativegraphicsobjectcontainer_p.h \
+ $$PWD/qdeclarativeparticles_p.h \
+ $$PWD/qdeclarativelayoutitem_p.h \
+ $$PWD/qdeclarativeitemchangelistener_p.h \
+ $$PWD/qdeclarativeeffects.cpp
+
+SOURCES += \
+ $$PWD/qdeclarativeitemsmodule.cpp \
+ $$PWD/qdeclarativeanchors.cpp \
+ $$PWD/qdeclarativeevents.cpp \
+ $$PWD/qdeclarativeflickable.cpp \
+ $$PWD/qdeclarativeflipable.cpp \
+ $$PWD/qdeclarativegridview.cpp \
+ $$PWD/qdeclarativeimage.cpp \
+ $$PWD/qdeclarativeborderimage.cpp \
+ $$PWD/qdeclarativeimagebase.cpp \
+ $$PWD/qdeclarativeanimatedimage.cpp \
+ $$PWD/qdeclarativepainteditem.cpp \
+ $$PWD/qdeclarativeitem.cpp \
+ $$PWD/qdeclarativefocuspanel.cpp \
+ $$PWD/qdeclarativefocusscope.cpp \
+ $$PWD/qdeclarativepositioners.cpp \
+ $$PWD/qdeclarativeloader.cpp \
+ $$PWD/qdeclarativemousearea.cpp \
+ $$PWD/qdeclarativepath.cpp \
+ $$PWD/qdeclarativepathview.cpp \
+ $$PWD/qdeclarativerectangle.cpp \
+ $$PWD/qdeclarativerepeater.cpp \
+ $$PWD/qdeclarativescalegrid.cpp \
+ $$PWD/qdeclarativetextinput.cpp \
+ $$PWD/qdeclarativetext.cpp \
+ $$PWD/qdeclarativetextedit.cpp \
+ $$PWD/qdeclarativevisualitemmodel.cpp \
+ $$PWD/qdeclarativelistview.cpp \
+ $$PWD/qdeclarativegraphicsobjectcontainer.cpp \
+ $$PWD/qdeclarativeparticles.cpp \
+ $$PWD/qdeclarativelayoutitem.cpp \
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors.cpp b/src/declarative/graphicsitems/qdeclarativeanchors.cpp
new file mode 100644
index 0000000000..dc1f09db29
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeanchors.cpp
@@ -0,0 +1,1065 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeanchors_p_p.h"
+
+#include "qdeclarativeitem.h"
+#include "qdeclarativeitem_p.h"
+
+#include <qdeclarativeinfo.h>
+
+#include <QDebug>
+
+QT_BEGIN_NAMESPACE
+
+//TODO: should we cache relationships, so we don't have to check each time (parent-child or sibling)?
+//TODO: support non-parent, non-sibling (need to find lowest common ancestor)
+
+//### const item?
+//local position
+static qreal position(QDeclarativeItem *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
+{
+ qreal ret = 0.0;
+ switch(anchorLine) {
+ case QDeclarativeAnchorLine::Left:
+ ret = item->x();
+ break;
+ case QDeclarativeAnchorLine::Right:
+ ret = item->x() + item->width();
+ break;
+ case QDeclarativeAnchorLine::Top:
+ ret = item->y();
+ break;
+ case QDeclarativeAnchorLine::Bottom:
+ ret = item->y() + item->height();
+ break;
+ case QDeclarativeAnchorLine::HCenter:
+ ret = item->x() + item->width()/2;
+ break;
+ case QDeclarativeAnchorLine::VCenter:
+ ret = item->y() + item->height()/2;
+ break;
+ case QDeclarativeAnchorLine::Baseline:
+ ret = item->y() + item->baselineOffset();
+ break;
+ default:
+ break;
+ }
+
+ return ret;
+}
+
+//position when origin is 0,0
+static qreal adjustedPosition(QDeclarativeItem *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
+{
+ int ret = 0;
+ switch(anchorLine) {
+ case QDeclarativeAnchorLine::Left:
+ ret = 0;
+ break;
+ case QDeclarativeAnchorLine::Right:
+ ret = item->width();
+ break;
+ case QDeclarativeAnchorLine::Top:
+ ret = 0;
+ break;
+ case QDeclarativeAnchorLine::Bottom:
+ ret = item->height();
+ break;
+ case QDeclarativeAnchorLine::HCenter:
+ ret = item->width()/2;
+ break;
+ case QDeclarativeAnchorLine::VCenter:
+ ret = item->height()/2;
+ break;
+ case QDeclarativeAnchorLine::Baseline:
+ ret = item->baselineOffset();
+ break;
+ default:
+ break;
+ }
+
+ return ret;
+}
+
+/*!
+ \internal
+ \class QDeclarativeAnchors
+ \since 4.7
+ \ingroup group_layouts
+ \brief The QDeclarativeAnchors class provides a way to lay out items relative to other items.
+
+ \warning Currently, only anchoring to siblings or parent is supported.
+*/
+
+QDeclarativeAnchors::QDeclarativeAnchors(QObject *parent)
+ : QObject(*new QDeclarativeAnchorsPrivate(0), parent)
+{
+ qFatal("QDeclarativeAnchors::QDeclarativeAnchors(QObject*) called");
+}
+
+QDeclarativeAnchors::QDeclarativeAnchors(QDeclarativeItem *item, QObject *parent)
+ : QObject(*new QDeclarativeAnchorsPrivate(item), parent)
+{
+}
+
+QDeclarativeAnchors::~QDeclarativeAnchors()
+{
+ Q_D(QDeclarativeAnchors);
+ d->remDepend(d->fill);
+ d->remDepend(d->centerIn);
+ d->remDepend(d->left.item);
+ d->remDepend(d->right.item);
+ d->remDepend(d->top.item);
+ d->remDepend(d->bottom.item);
+ d->remDepend(d->vCenter.item);
+ d->remDepend(d->hCenter.item);
+ d->remDepend(d->baseline.item);
+}
+
+void QDeclarativeAnchorsPrivate::fillChanged()
+{
+ if (!fill || !isItemComplete())
+ return;
+
+ if (updatingFill < 2) {
+ ++updatingFill;
+
+ if (fill == item->parentItem()) { //child-parent
+ setItemPos(QPointF(leftMargin, topMargin));
+ } else if (fill->parentItem() == item->parentItem()) { //siblings
+ setItemPos(QPointF(fill->x()+leftMargin, fill->y()+topMargin));
+ }
+ setItemSize(QSizeF(fill->width()-leftMargin-rightMargin, fill->height()-topMargin-bottomMargin));
+
+ --updatingFill;
+ } else {
+ // ### Make this certain :)
+ qmlInfo(item) << QDeclarativeAnchors::tr("Possible anchor loop detected on fill.");
+ }
+
+}
+
+void QDeclarativeAnchorsPrivate::centerInChanged()
+{
+ if (!centerIn || fill || !isItemComplete())
+ return;
+
+ if (updatingCenterIn < 2) {
+ ++updatingCenterIn;
+
+ if (centerIn == item->parentItem()) {
+ QPointF p((item->parentItem()->width() - item->width()) / 2. + hCenterOffset,
+ (item->parentItem()->height() - item->height()) / 2. + vCenterOffset);
+ setItemPos(p);
+
+ } else if (centerIn->parentItem() == item->parentItem()) {
+
+ QPointF p(centerIn->x() + (centerIn->width() - item->width()) / 2. + hCenterOffset,
+ centerIn->y() + (centerIn->height() - item->height()) / 2. + vCenterOffset);
+ setItemPos(p);
+ }
+
+ --updatingCenterIn;
+ } else {
+ // ### Make this certain :)
+ qmlInfo(item) << QDeclarativeAnchors::tr("Possible anchor loop detected on centerIn.");
+ }
+}
+
+void QDeclarativeAnchorsPrivate::clearItem(QDeclarativeItem *item)
+{
+ if (!item)
+ return;
+ if (fill == item)
+ fill = 0;
+ if (centerIn == item)
+ centerIn = 0;
+ if (left.item == item) {
+ left.item = 0;
+ usedAnchors &= ~QDeclarativeAnchors::HasLeftAnchor;
+ }
+ if (right.item == item) {
+ right.item = 0;
+ usedAnchors &= ~QDeclarativeAnchors::HasRightAnchor;
+ }
+ if (top.item == item) {
+ top.item = 0;
+ usedAnchors &= ~QDeclarativeAnchors::HasTopAnchor;
+ }
+ if (bottom.item == item) {
+ bottom.item = 0;
+ usedAnchors &= ~QDeclarativeAnchors::HasBottomAnchor;
+ }
+ if (vCenter.item == item) {
+ vCenter.item = 0;
+ usedAnchors &= ~QDeclarativeAnchors::HasVCenterAnchor;
+ }
+ if (hCenter.item == item) {
+ hCenter.item = 0;
+ usedAnchors &= ~QDeclarativeAnchors::HasHCenterAnchor;
+ }
+ if (baseline.item == item) {
+ baseline.item = 0;
+ usedAnchors &= ~QDeclarativeAnchors::HasBaselineAnchor;
+ }
+}
+
+void QDeclarativeAnchorsPrivate::addDepend(QDeclarativeItem *item)
+{
+ if (!item)
+ return;
+ QDeclarativeItemPrivate *p =
+ static_cast<QDeclarativeItemPrivate *>(QGraphicsItemPrivate::get(item));
+ p->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
+}
+
+void QDeclarativeAnchorsPrivate::remDepend(QDeclarativeItem *item)
+{
+ if (!item)
+ return;
+ QDeclarativeItemPrivate *p =
+ static_cast<QDeclarativeItemPrivate *>(QGraphicsItemPrivate::get(item));
+ p->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
+}
+
+bool QDeclarativeAnchorsPrivate::isItemComplete() const
+{
+ return componentComplete;
+}
+
+void QDeclarativeAnchors::classBegin()
+{
+ Q_D(QDeclarativeAnchors);
+ d->componentComplete = false;
+}
+
+void QDeclarativeAnchors::componentComplete()
+{
+ Q_D(QDeclarativeAnchors);
+ d->componentComplete = true;
+}
+
+void QDeclarativeAnchorsPrivate::setItemHeight(qreal v)
+{
+ updatingMe = true;
+ item->setHeight(v);
+ updatingMe = false;
+}
+
+void QDeclarativeAnchorsPrivate::setItemWidth(qreal v)
+{
+ updatingMe = true;
+ item->setWidth(v);
+ updatingMe = false;
+}
+
+void QDeclarativeAnchorsPrivate::setItemX(qreal v)
+{
+ updatingMe = true;
+ item->setX(v);
+ updatingMe = false;
+}
+
+void QDeclarativeAnchorsPrivate::setItemY(qreal v)
+{
+ updatingMe = true;
+ item->setY(v);
+ updatingMe = false;
+}
+
+void QDeclarativeAnchorsPrivate::setItemPos(const QPointF &v)
+{
+ updatingMe = true;
+ item->setPos(v);
+ updatingMe = false;
+}
+
+void QDeclarativeAnchorsPrivate::setItemSize(const QSizeF &v)
+{
+ updatingMe = true;
+ item->setSize(v);
+ updatingMe = false;
+}
+
+void QDeclarativeAnchorsPrivate::updateMe()
+{
+ if (updatingMe) {
+ updatingMe = false;
+ return;
+ }
+
+ fillChanged();
+ centerInChanged();
+ updateHorizontalAnchors();
+ updateVerticalAnchors();
+}
+
+void QDeclarativeAnchorsPrivate::updateOnComplete()
+{
+ fillChanged();
+ centerInChanged();
+ updateHorizontalAnchors();
+ updateVerticalAnchors();
+}
+
+void QDeclarativeAnchorsPrivate::itemGeometryChanged(QDeclarativeItem *, const QRectF &newG, const QRectF &oldG)
+{
+ fillChanged();
+ centerInChanged();
+
+ if (newG.x() != oldG.x() || newG.width() != oldG.width())
+ updateHorizontalAnchors();
+ if (newG.y() != oldG.y() || newG.height() != oldG.height())
+ updateVerticalAnchors();
+}
+
+QDeclarativeItem *QDeclarativeAnchors::fill() const
+{
+ Q_D(const QDeclarativeAnchors);
+ return d->fill;
+}
+
+void QDeclarativeAnchors::setFill(QDeclarativeItem *f)
+{
+ Q_D(QDeclarativeAnchors);
+ if (d->fill == f)
+ return;
+
+ if (!f) {
+ d->remDepend(d->fill);
+ d->fill = f;
+ emit fillChanged();
+ return;
+ }
+ if (f != d->item->parentItem() && f->parentItem() != d->item->parentItem()){
+ qmlInfo(d->item) << tr("Cannot anchor to an item that isn't a parent or sibling.");
+ return;
+ }
+ d->remDepend(d->fill);
+ d->fill = f;
+ d->addDepend(d->fill);
+ emit fillChanged();
+ d->fillChanged();
+}
+
+void QDeclarativeAnchors::resetFill()
+{
+ setFill(0);
+}
+
+QDeclarativeItem *QDeclarativeAnchors::centerIn() const
+{
+ Q_D(const QDeclarativeAnchors);
+ return d->centerIn;
+}
+
+void QDeclarativeAnchors::setCenterIn(QDeclarativeItem* c)
+{
+ Q_D(QDeclarativeAnchors);
+ if (d->centerIn == c)
+ return;
+
+ if (!c) {
+ d->remDepend(d->centerIn);
+ d->centerIn = c;
+ emit centerInChanged();
+ return;
+ }
+ if (c != d->item->parentItem() && c->parentItem() != d->item->parentItem()){
+ qmlInfo(d->item) << tr("Cannot anchor to an item that isn't a parent or sibling.");
+ return;
+ }
+
+ d->remDepend(d->centerIn);
+ d->centerIn = c;
+ d->addDepend(d->centerIn);
+ emit centerInChanged();
+ d->centerInChanged();
+}
+
+void QDeclarativeAnchors::resetCenterIn()
+{
+ setCenterIn(0);
+}
+
+bool QDeclarativeAnchorsPrivate::calcStretch(const QDeclarativeAnchorLine &edge1,
+ const QDeclarativeAnchorLine &edge2,
+ int offset1,
+ int offset2,
+ QDeclarativeAnchorLine::AnchorLine line,
+ int &stretch)
+{
+ bool edge1IsParent = (edge1.item == item->parentItem());
+ bool edge2IsParent = (edge2.item == item->parentItem());
+ bool edge1IsSibling = (edge1.item->parentItem() == item->parentItem());
+ bool edge2IsSibling = (edge2.item->parentItem() == item->parentItem());
+
+ bool invalid = false;
+ if ((edge2IsParent && edge1IsParent) || (edge2IsSibling && edge1IsSibling)) {
+ stretch = ((int)position(edge2.item, edge2.anchorLine) + offset2)
+ - ((int)position(edge1.item, edge1.anchorLine) + offset1);
+ } else if (edge2IsParent && edge1IsSibling) {
+ stretch = ((int)position(edge2.item, edge2.anchorLine) + offset2)
+ - ((int)position(item->parentItem(), line)
+ + (int)position(edge1.item, edge1.anchorLine) + offset1);
+ } else if (edge2IsSibling && edge1IsParent) {
+ stretch = ((int)position(item->parentItem(), line) + (int)position(edge2.item, edge2.anchorLine) + offset2)
+ - ((int)position(edge1.item, edge1.anchorLine) + offset1);
+ } else
+ invalid = true;
+
+ return invalid;
+}
+
+void QDeclarativeAnchorsPrivate::updateVerticalAnchors()
+{
+ if (fill || centerIn || !isItemComplete())
+ return;
+
+ if (updatingVerticalAnchor < 2) {
+ ++updatingVerticalAnchor;
+ if (usedAnchors & QDeclarativeAnchors::HasTopAnchor) {
+ //Handle stretching
+ bool invalid = true;
+ int height = 0;
+ if (usedAnchors & QDeclarativeAnchors::HasBottomAnchor) {
+ invalid = calcStretch(top, bottom, topMargin, -bottomMargin, QDeclarativeAnchorLine::Top, height);
+ } else if (usedAnchors & QDeclarativeAnchors::HasVCenterAnchor) {
+ invalid = calcStretch(top, vCenter, topMargin, vCenterOffset, QDeclarativeAnchorLine::Top, height);
+ height *= 2;
+ }
+ if (!invalid)
+ setItemHeight(height);
+
+ //Handle top
+ if (top.item == item->parentItem()) {
+ setItemY(adjustedPosition(top.item, top.anchorLine) + topMargin);
+ } else if (top.item->parentItem() == item->parentItem()) {
+ setItemY(position(top.item, top.anchorLine) + topMargin);
+ }
+ } else if (usedAnchors & QDeclarativeAnchors::HasBottomAnchor) {
+ //Handle stretching (top + bottom case is handled above)
+ if (usedAnchors & QDeclarativeAnchors::HasVCenterAnchor) {
+ int height = 0;
+ bool invalid = calcStretch(vCenter, bottom, vCenterOffset, -bottomMargin,
+ QDeclarativeAnchorLine::Top, height);
+ if (!invalid)
+ setItemHeight(height*2);
+ }
+
+ //Handle bottom
+ if (bottom.item == item->parentItem()) {
+ setItemY(adjustedPosition(bottom.item, bottom.anchorLine) - item->height() - bottomMargin);
+ } else if (bottom.item->parentItem() == item->parentItem()) {
+ setItemY(position(bottom.item, bottom.anchorLine) - item->height() - bottomMargin);
+ }
+ } else if (usedAnchors & QDeclarativeAnchors::HasVCenterAnchor) {
+ //(stetching handled above)
+
+ //Handle vCenter
+ if (vCenter.item == item->parentItem()) {
+ setItemY(adjustedPosition(vCenter.item, vCenter.anchorLine)
+ - item->height()/2 + vCenterOffset);
+ } else if (vCenter.item->parentItem() == item->parentItem()) {
+ setItemY(position(vCenter.item, vCenter.anchorLine) - item->height()/2 + vCenterOffset);
+ }
+ } else if (usedAnchors & QDeclarativeAnchors::HasBaselineAnchor) {
+ //Handle baseline
+ if (baseline.item == item->parentItem()) {
+ setItemY(adjustedPosition(baseline.item, baseline.anchorLine)
+ - item->baselineOffset() + baselineOffset);
+ } else if (baseline.item->parentItem() == item->parentItem()) {
+ setItemY(position(baseline.item, baseline.anchorLine)
+ - item->baselineOffset() + baselineOffset);
+ }
+ }
+ --updatingVerticalAnchor;
+ } else {
+ // ### Make this certain :)
+ qmlInfo(item) << QDeclarativeAnchors::tr("Possible anchor loop detected on vertical anchor.");
+ }
+}
+
+void QDeclarativeAnchorsPrivate::updateHorizontalAnchors()
+{
+ if (fill || centerIn || !isItemComplete())
+ return;
+
+ if (updatingHorizontalAnchor < 2) {
+ ++updatingHorizontalAnchor;
+
+ if (usedAnchors & QDeclarativeAnchors::HasLeftAnchor) {
+ //Handle stretching
+ bool invalid = true;
+ int width = 0;
+ if (usedAnchors & QDeclarativeAnchors::HasRightAnchor) {
+ invalid = calcStretch(left, right, leftMargin, -rightMargin, QDeclarativeAnchorLine::Left, width);
+ } else if (usedAnchors & QDeclarativeAnchors::HasHCenterAnchor) {
+ invalid = calcStretch(left, hCenter, leftMargin, hCenterOffset, QDeclarativeAnchorLine::Left, width);
+ width *= 2;
+ }
+ if (!invalid)
+ setItemWidth(width);
+
+ //Handle left
+ if (left.item == item->parentItem()) {
+ setItemX(adjustedPosition(left.item, left.anchorLine) + leftMargin);
+ } else if (left.item->parentItem() == item->parentItem()) {
+ setItemX(position(left.item, left.anchorLine) + leftMargin);
+ }
+ } else if (usedAnchors & QDeclarativeAnchors::HasRightAnchor) {
+ //Handle stretching (left + right case is handled in updateLeftAnchor)
+ if (usedAnchors & QDeclarativeAnchors::HasHCenterAnchor) {
+ int width = 0;
+ bool invalid = calcStretch(hCenter, right, hCenterOffset, -rightMargin,
+ QDeclarativeAnchorLine::Left, width);
+ if (!invalid)
+ setItemWidth(width*2);
+ }
+
+ //Handle right
+ if (right.item == item->parentItem()) {
+ setItemX(adjustedPosition(right.item, right.anchorLine) - item->width() - rightMargin);
+ } else if (right.item->parentItem() == item->parentItem()) {
+ setItemX(position(right.item, right.anchorLine) - item->width() - rightMargin);
+ }
+ } else if (usedAnchors & QDeclarativeAnchors::HasHCenterAnchor) {
+ //Handle hCenter
+ if (hCenter.item == item->parentItem()) {
+ setItemX(adjustedPosition(hCenter.item, hCenter.anchorLine) - item->width()/2 + hCenterOffset);
+ } else if (hCenter.item->parentItem() == item->parentItem()) {
+ setItemX(position(hCenter.item, hCenter.anchorLine) - item->width()/2 + hCenterOffset);
+ }
+ }
+
+ --updatingHorizontalAnchor;
+ } else {
+ // ### Make this certain :)
+ qmlInfo(item) << QDeclarativeAnchors::tr("Possible anchor loop detected on horizontal anchor.");
+ }
+}
+
+QDeclarativeAnchorLine QDeclarativeAnchors::top() const
+{
+ Q_D(const QDeclarativeAnchors);
+ return d->top;
+}
+
+void QDeclarativeAnchors::setTop(const QDeclarativeAnchorLine &edge)
+{
+ Q_D(QDeclarativeAnchors);
+ if (!d->checkVAnchorValid(edge) || d->top == edge)
+ return;
+
+ d->usedAnchors |= HasTopAnchor;
+
+ if (!d->checkVValid()) {
+ d->usedAnchors &= ~HasTopAnchor;
+ return;
+ }
+
+ d->remDepend(d->top.item);
+ d->top = edge;
+ d->addDepend(d->top.item);
+ emit topChanged();
+ d->updateVerticalAnchors();
+}
+
+void QDeclarativeAnchors::resetTop()
+{
+ Q_D(QDeclarativeAnchors);
+ d->usedAnchors &= ~HasTopAnchor;
+ d->remDepend(d->top.item);
+ d->top = QDeclarativeAnchorLine();
+ emit topChanged();
+ d->updateVerticalAnchors();
+}
+
+QDeclarativeAnchorLine QDeclarativeAnchors::bottom() const
+{
+ Q_D(const QDeclarativeAnchors);
+ return d->bottom;
+}
+
+void QDeclarativeAnchors::setBottom(const QDeclarativeAnchorLine &edge)
+{
+ Q_D(QDeclarativeAnchors);
+ if (!d->checkVAnchorValid(edge) || d->bottom == edge)
+ return;
+
+ d->usedAnchors |= HasBottomAnchor;
+
+ if (!d->checkVValid()) {
+ d->usedAnchors &= ~HasBottomAnchor;
+ return;
+ }
+
+ d->remDepend(d->bottom.item);
+ d->bottom = edge;
+ d->addDepend(d->bottom.item);
+ emit bottomChanged();
+ d->updateVerticalAnchors();
+}
+
+void QDeclarativeAnchors::resetBottom()
+{
+ Q_D(QDeclarativeAnchors);
+ d->usedAnchors &= ~HasBottomAnchor;
+ d->remDepend(d->bottom.item);
+ d->bottom = QDeclarativeAnchorLine();
+ emit bottomChanged();
+ d->updateVerticalAnchors();
+}
+
+QDeclarativeAnchorLine QDeclarativeAnchors::verticalCenter() const
+{
+ Q_D(const QDeclarativeAnchors);
+ return d->vCenter;
+}
+
+void QDeclarativeAnchors::setVerticalCenter(const QDeclarativeAnchorLine &edge)
+{
+ Q_D(QDeclarativeAnchors);
+ if (!d->checkVAnchorValid(edge) || d->vCenter == edge)
+ return;
+
+ d->usedAnchors |= HasVCenterAnchor;
+
+ if (!d->checkVValid()) {
+ d->usedAnchors &= ~HasVCenterAnchor;
+ return;
+ }
+
+ d->remDepend(d->vCenter.item);
+ d->vCenter = edge;
+ d->addDepend(d->vCenter.item);
+ emit verticalCenterChanged();
+ d->updateVerticalAnchors();
+}
+
+void QDeclarativeAnchors::resetVerticalCenter()
+{
+ Q_D(QDeclarativeAnchors);
+ d->usedAnchors &= ~HasVCenterAnchor;
+ d->remDepend(d->vCenter.item);
+ d->vCenter = QDeclarativeAnchorLine();
+ emit verticalCenterChanged();
+ d->updateVerticalAnchors();
+}
+
+QDeclarativeAnchorLine QDeclarativeAnchors::baseline() const
+{
+ Q_D(const QDeclarativeAnchors);
+ return d->baseline;
+}
+
+void QDeclarativeAnchors::setBaseline(const QDeclarativeAnchorLine &edge)
+{
+ Q_D(QDeclarativeAnchors);
+ if (!d->checkVAnchorValid(edge) || d->baseline == edge)
+ return;
+
+ d->usedAnchors |= HasBaselineAnchor;
+
+ if (!d->checkVValid()) {
+ d->usedAnchors &= ~HasBaselineAnchor;
+ return;
+ }
+
+ d->remDepend(d->baseline.item);
+ d->baseline = edge;
+ d->addDepend(d->baseline.item);
+ emit baselineChanged();
+ d->updateVerticalAnchors();
+}
+
+void QDeclarativeAnchors::resetBaseline()
+{
+ Q_D(QDeclarativeAnchors);
+ d->usedAnchors &= ~HasBaselineAnchor;
+ d->remDepend(d->baseline.item);
+ d->baseline = QDeclarativeAnchorLine();
+ emit baselineChanged();
+ d->updateVerticalAnchors();
+}
+
+QDeclarativeAnchorLine QDeclarativeAnchors::left() const
+{
+ Q_D(const QDeclarativeAnchors);
+ return d->left;
+}
+
+void QDeclarativeAnchors::setLeft(const QDeclarativeAnchorLine &edge)
+{
+ Q_D(QDeclarativeAnchors);
+ if (!d->checkHAnchorValid(edge) || d->left == edge)
+ return;
+
+ d->usedAnchors |= HasLeftAnchor;
+
+ if (!d->checkHValid()) {
+ d->usedAnchors &= ~HasLeftAnchor;
+ return;
+ }
+
+ d->remDepend(d->left.item);
+ d->left = edge;
+ d->addDepend(d->left.item);
+ emit leftChanged();
+ d->updateHorizontalAnchors();
+}
+
+void QDeclarativeAnchors::resetLeft()
+{
+ Q_D(QDeclarativeAnchors);
+ d->usedAnchors &= ~HasLeftAnchor;
+ d->remDepend(d->left.item);
+ d->left = QDeclarativeAnchorLine();
+ emit leftChanged();
+ d->updateHorizontalAnchors();
+}
+
+QDeclarativeAnchorLine QDeclarativeAnchors::right() const
+{
+ Q_D(const QDeclarativeAnchors);
+ return d->right;
+}
+
+void QDeclarativeAnchors::setRight(const QDeclarativeAnchorLine &edge)
+{
+ Q_D(QDeclarativeAnchors);
+ if (!d->checkHAnchorValid(edge) || d->right == edge)
+ return;
+
+ d->usedAnchors |= HasRightAnchor;
+
+ if (!d->checkHValid()) {
+ d->usedAnchors &= ~HasRightAnchor;
+ return;
+ }
+
+ d->remDepend(d->right.item);
+ d->right = edge;
+ d->addDepend(d->right.item);
+ emit rightChanged();
+ d->updateHorizontalAnchors();
+}
+
+void QDeclarativeAnchors::resetRight()
+{
+ Q_D(QDeclarativeAnchors);
+ d->usedAnchors &= ~HasRightAnchor;
+ d->remDepend(d->right.item);
+ d->right = QDeclarativeAnchorLine();
+ emit rightChanged();
+ d->updateHorizontalAnchors();
+}
+
+QDeclarativeAnchorLine QDeclarativeAnchors::horizontalCenter() const
+{
+ Q_D(const QDeclarativeAnchors);
+ return d->hCenter;
+}
+
+void QDeclarativeAnchors::setHorizontalCenter(const QDeclarativeAnchorLine &edge)
+{
+ Q_D(QDeclarativeAnchors);
+ if (!d->checkHAnchorValid(edge) || d->hCenter == edge)
+ return;
+
+ d->usedAnchors |= HasHCenterAnchor;
+
+ if (!d->checkHValid()) {
+ d->usedAnchors &= ~HasHCenterAnchor;
+ return;
+ }
+
+ d->remDepend(d->hCenter.item);
+ d->hCenter = edge;
+ d->addDepend(d->hCenter.item);
+ emit horizontalCenterChanged();
+ d->updateHorizontalAnchors();
+}
+
+void QDeclarativeAnchors::resetHorizontalCenter()
+{
+ Q_D(QDeclarativeAnchors);
+ d->usedAnchors &= ~HasHCenterAnchor;
+ d->remDepend(d->hCenter.item);
+ d->hCenter = QDeclarativeAnchorLine();
+ emit horizontalCenterChanged();
+ d->updateHorizontalAnchors();
+}
+
+qreal QDeclarativeAnchors::leftMargin() const
+{
+ Q_D(const QDeclarativeAnchors);
+ return d->leftMargin;
+}
+
+void QDeclarativeAnchors::setLeftMargin(qreal offset)
+{
+ Q_D(QDeclarativeAnchors);
+ if (d->leftMargin == offset)
+ return;
+ d->leftMargin = offset;
+ if(d->fill)
+ d->fillChanged();
+ else
+ d->updateHorizontalAnchors();
+ emit leftMarginChanged();
+}
+
+qreal QDeclarativeAnchors::rightMargin() const
+{
+ Q_D(const QDeclarativeAnchors);
+ return d->rightMargin;
+}
+
+void QDeclarativeAnchors::setRightMargin(qreal offset)
+{
+ Q_D(QDeclarativeAnchors);
+ if (d->rightMargin == offset)
+ return;
+ d->rightMargin = offset;
+ if(d->fill)
+ d->fillChanged();
+ else
+ d->updateHorizontalAnchors();
+ emit rightMarginChanged();
+}
+
+qreal QDeclarativeAnchors::margins() const
+{
+ Q_D(const QDeclarativeAnchors);
+ return d->margins;
+}
+
+void QDeclarativeAnchors::setMargins(qreal offset)
+{
+ Q_D(QDeclarativeAnchors);
+ if (d->margins == offset)
+ return;
+ //###Is it significantly faster to set them directly so we can call fillChanged only once?
+ if(!d->rightMargin || d->rightMargin == d->margins)
+ setRightMargin(offset);
+ if(!d->leftMargin || d->leftMargin == d->margins)
+ setLeftMargin(offset);
+ if(!d->topMargin || d->topMargin == d->margins)
+ setTopMargin(offset);
+ if(!d->bottomMargin || d->bottomMargin == d->margins)
+ setBottomMargin(offset);
+ d->margins = offset;
+ emit marginsChanged();
+
+}
+
+qreal QDeclarativeAnchors::horizontalCenterOffset() const
+{
+ Q_D(const QDeclarativeAnchors);
+ return d->hCenterOffset;
+}
+
+void QDeclarativeAnchors::setHorizontalCenterOffset(qreal offset)
+{
+ Q_D(QDeclarativeAnchors);
+ if (d->hCenterOffset == offset)
+ return;
+ d->hCenterOffset = offset;
+ if(d->centerIn)
+ d->centerInChanged();
+ else
+ d->updateHorizontalAnchors();
+ emit horizontalCenterOffsetChanged();
+}
+
+qreal QDeclarativeAnchors::topMargin() const
+{
+ Q_D(const QDeclarativeAnchors);
+ return d->topMargin;
+}
+
+void QDeclarativeAnchors::setTopMargin(qreal offset)
+{
+ Q_D(QDeclarativeAnchors);
+ if (d->topMargin == offset)
+ return;
+ d->topMargin = offset;
+ if(d->fill)
+ d->fillChanged();
+ else
+ d->updateVerticalAnchors();
+ emit topMarginChanged();
+}
+
+qreal QDeclarativeAnchors::bottomMargin() const
+{
+ Q_D(const QDeclarativeAnchors);
+ return d->bottomMargin;
+}
+
+void QDeclarativeAnchors::setBottomMargin(qreal offset)
+{
+ Q_D(QDeclarativeAnchors);
+ if (d->bottomMargin == offset)
+ return;
+ d->bottomMargin = offset;
+ if(d->fill)
+ d->fillChanged();
+ else
+ d->updateVerticalAnchors();
+ emit bottomMarginChanged();
+}
+
+qreal QDeclarativeAnchors::verticalCenterOffset() const
+{
+ Q_D(const QDeclarativeAnchors);
+ return d->vCenterOffset;
+}
+
+void QDeclarativeAnchors::setVerticalCenterOffset(qreal offset)
+{
+ Q_D(QDeclarativeAnchors);
+ if (d->vCenterOffset == offset)
+ return;
+ d->vCenterOffset = offset;
+ if(d->centerIn)
+ d->centerInChanged();
+ else
+ d->updateVerticalAnchors();
+ emit verticalCenterOffsetChanged();
+}
+
+qreal QDeclarativeAnchors::baselineOffset() const
+{
+ Q_D(const QDeclarativeAnchors);
+ return d->baselineOffset;
+}
+
+void QDeclarativeAnchors::setBaselineOffset(qreal offset)
+{
+ Q_D(QDeclarativeAnchors);
+ if (d->baselineOffset == offset)
+ return;
+ d->baselineOffset = offset;
+ d->updateVerticalAnchors();
+ emit baselineOffsetChanged();
+}
+
+QDeclarativeAnchors::UsedAnchors QDeclarativeAnchors::usedAnchors() const
+{
+ Q_D(const QDeclarativeAnchors);
+ return d->usedAnchors;
+}
+
+bool QDeclarativeAnchorsPrivate::checkHValid() const
+{
+ if (usedAnchors & QDeclarativeAnchors::HasLeftAnchor &&
+ usedAnchors & QDeclarativeAnchors::HasRightAnchor &&
+ usedAnchors & QDeclarativeAnchors::HasHCenterAnchor) {
+ qmlInfo(item) << QDeclarativeAnchors::tr("Cannot specify left, right, and hcenter anchors.");
+ return false;
+ }
+
+ return true;
+}
+
+bool QDeclarativeAnchorsPrivate::checkHAnchorValid(QDeclarativeAnchorLine anchor) const
+{
+ if (!anchor.item) {
+ qmlInfo(item) << QDeclarativeAnchors::tr("Cannot anchor to a null item.");
+ return false;
+ } else if (anchor.anchorLine & QDeclarativeAnchorLine::Vertical_Mask) {
+ qmlInfo(item) << QDeclarativeAnchors::tr("Cannot anchor a horizontal edge to a vertical edge.");
+ return false;
+ } else if (anchor.item != item->parentItem() && anchor.item->parentItem() != item->parentItem()){
+ qmlInfo(item) << QDeclarativeAnchors::tr("Cannot anchor to an item that isn't a parent or sibling.");
+ return false;
+ } else if (anchor.item == item) {
+ qmlInfo(item) << QDeclarativeAnchors::tr("Cannot anchor item to self.");
+ return false;
+ }
+
+ return true;
+}
+
+bool QDeclarativeAnchorsPrivate::checkVValid() const
+{
+ if (usedAnchors & QDeclarativeAnchors::HasTopAnchor &&
+ usedAnchors & QDeclarativeAnchors::HasBottomAnchor &&
+ usedAnchors & QDeclarativeAnchors::HasVCenterAnchor) {
+ qmlInfo(item) << QDeclarativeAnchors::tr("Cannot specify top, bottom, and vcenter anchors.");
+ return false;
+ } else if (usedAnchors & QDeclarativeAnchors::HasBaselineAnchor &&
+ (usedAnchors & QDeclarativeAnchors::HasTopAnchor ||
+ usedAnchors & QDeclarativeAnchors::HasBottomAnchor ||
+ usedAnchors & QDeclarativeAnchors::HasVCenterAnchor)) {
+ qmlInfo(item) << QDeclarativeAnchors::tr("Baseline anchor cannot be used in conjunction with top, bottom, or vcenter anchors.");
+ return false;
+ }
+
+ return true;
+}
+
+bool QDeclarativeAnchorsPrivate::checkVAnchorValid(QDeclarativeAnchorLine anchor) const
+{
+ if (!anchor.item) {
+ qmlInfo(item) << QDeclarativeAnchors::tr("Cannot anchor to a null item.");
+ return false;
+ } else if (anchor.anchorLine & QDeclarativeAnchorLine::Horizontal_Mask) {
+ qmlInfo(item) << QDeclarativeAnchors::tr("Cannot anchor a vertical edge to a horizontal edge.");
+ return false;
+ } else if (anchor.item != item->parentItem() && anchor.item->parentItem() != item->parentItem()){
+ qmlInfo(item) << QDeclarativeAnchors::tr("Cannot anchor to an item that isn't a parent or sibling.");
+ return false;
+ } else if (anchor.item == item){
+ qmlInfo(item) << QDeclarativeAnchors::tr("Cannot anchor item to self.");
+ return false;
+ }
+
+ return true;
+}
+
+#include <moc_qdeclarativeanchors_p.cpp>
+
+QT_END_NAMESPACE
+
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors_p.h b/src/declarative/graphicsitems/qdeclarativeanchors_p.h
new file mode 100644
index 0000000000..0b97e8c3ed
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeanchors_p.h
@@ -0,0 +1,196 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEANCHORS_H
+#define QDECLARATIVEANCHORS_H
+
+#include "qdeclarativeitem.h"
+
+#include <qdeclarative.h>
+
+#include <QtCore/QObject>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeAnchorsPrivate;
+class QDeclarativeAnchorLine;
+class Q_DECLARATIVE_EXPORT QDeclarativeAnchors : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QDeclarativeAnchorLine left READ left WRITE setLeft RESET resetLeft NOTIFY leftChanged)
+ Q_PROPERTY(QDeclarativeAnchorLine right READ right WRITE setRight RESET resetRight NOTIFY rightChanged)
+ Q_PROPERTY(QDeclarativeAnchorLine horizontalCenter READ horizontalCenter WRITE setHorizontalCenter RESET resetHorizontalCenter NOTIFY horizontalCenterChanged)
+ Q_PROPERTY(QDeclarativeAnchorLine top READ top WRITE setTop RESET resetTop NOTIFY topChanged)
+ Q_PROPERTY(QDeclarativeAnchorLine bottom READ bottom WRITE setBottom RESET resetBottom NOTIFY bottomChanged)
+ Q_PROPERTY(QDeclarativeAnchorLine verticalCenter READ verticalCenter WRITE setVerticalCenter RESET resetVerticalCenter NOTIFY verticalCenterChanged)
+ Q_PROPERTY(QDeclarativeAnchorLine baseline READ baseline WRITE setBaseline RESET resetBaseline NOTIFY baselineChanged)
+ Q_PROPERTY(qreal margins READ margins WRITE setMargins NOTIFY marginsChanged)
+ Q_PROPERTY(qreal leftMargin READ leftMargin WRITE setLeftMargin NOTIFY leftMarginChanged)
+ Q_PROPERTY(qreal rightMargin READ rightMargin WRITE setRightMargin NOTIFY rightMarginChanged)
+ Q_PROPERTY(qreal horizontalCenterOffset READ horizontalCenterOffset WRITE setHorizontalCenterOffset NOTIFY horizontalCenterOffsetChanged())
+ Q_PROPERTY(qreal topMargin READ topMargin WRITE setTopMargin NOTIFY topMarginChanged)
+ Q_PROPERTY(qreal bottomMargin READ bottomMargin WRITE setBottomMargin NOTIFY bottomMarginChanged)
+ Q_PROPERTY(qreal verticalCenterOffset READ verticalCenterOffset WRITE setVerticalCenterOffset NOTIFY verticalCenterOffsetChanged())
+ Q_PROPERTY(qreal baselineOffset READ baselineOffset WRITE setBaselineOffset NOTIFY baselineOffsetChanged())
+ Q_PROPERTY(QDeclarativeItem *fill READ fill WRITE setFill RESET resetFill NOTIFY fillChanged)
+ Q_PROPERTY(QDeclarativeItem *centerIn READ centerIn WRITE setCenterIn RESET resetCenterIn NOTIFY centerInChanged)
+
+public:
+ QDeclarativeAnchors(QObject *parent=0);
+ QDeclarativeAnchors(QDeclarativeItem *item, QObject *parent=0);
+ virtual ~QDeclarativeAnchors();
+
+ enum UsedAnchor {
+ HasLeftAnchor = 0x01,
+ HasRightAnchor = 0x02,
+ HasTopAnchor = 0x04,
+ HasBottomAnchor = 0x08,
+ HasHCenterAnchor = 0x10,
+ HasVCenterAnchor = 0x20,
+ HasBaselineAnchor = 0x40,
+ Horizontal_Mask = HasLeftAnchor | HasRightAnchor | HasHCenterAnchor,
+ Vertical_Mask = HasTopAnchor | HasBottomAnchor | HasVCenterAnchor | HasBaselineAnchor
+ };
+ Q_DECLARE_FLAGS(UsedAnchors, UsedAnchor)
+
+ QDeclarativeAnchorLine left() const;
+ void setLeft(const QDeclarativeAnchorLine &edge);
+ void resetLeft();
+
+ QDeclarativeAnchorLine right() const;
+ void setRight(const QDeclarativeAnchorLine &edge);
+ void resetRight();
+
+ QDeclarativeAnchorLine horizontalCenter() const;
+ void setHorizontalCenter(const QDeclarativeAnchorLine &edge);
+ void resetHorizontalCenter();
+
+ QDeclarativeAnchorLine top() const;
+ void setTop(const QDeclarativeAnchorLine &edge);
+ void resetTop();
+
+ QDeclarativeAnchorLine bottom() const;
+ void setBottom(const QDeclarativeAnchorLine &edge);
+ void resetBottom();
+
+ QDeclarativeAnchorLine verticalCenter() const;
+ void setVerticalCenter(const QDeclarativeAnchorLine &edge);
+ void resetVerticalCenter();
+
+ QDeclarativeAnchorLine baseline() const;
+ void setBaseline(const QDeclarativeAnchorLine &edge);
+ void resetBaseline();
+
+ qreal leftMargin() const;
+ void setLeftMargin(qreal);
+
+ qreal rightMargin() const;
+ void setRightMargin(qreal);
+
+ qreal horizontalCenterOffset() const;
+ void setHorizontalCenterOffset(qreal);
+
+ qreal topMargin() const;
+ void setTopMargin(qreal);
+
+ qreal bottomMargin() const;
+ void setBottomMargin(qreal);
+
+ qreal margins() const;
+ void setMargins(qreal);
+
+ qreal verticalCenterOffset() const;
+ void setVerticalCenterOffset(qreal);
+
+ qreal baselineOffset() const;
+ void setBaselineOffset(qreal);
+
+ QDeclarativeItem *fill() const;
+ void setFill(QDeclarativeItem *);
+ void resetFill();
+
+ QDeclarativeItem *centerIn() const;
+ void setCenterIn(QDeclarativeItem *);
+ void resetCenterIn();
+
+ UsedAnchors usedAnchors() const;
+
+ void classBegin();
+ void componentComplete();
+
+Q_SIGNALS:
+ void leftChanged();
+ void rightChanged();
+ void topChanged();
+ void bottomChanged();
+ void verticalCenterChanged();
+ void horizontalCenterChanged();
+ void baselineChanged();
+ void fillChanged();
+ void centerInChanged();
+ void leftMarginChanged();
+ void rightMarginChanged();
+ void topMarginChanged();
+ void bottomMarginChanged();
+ void marginsChanged();
+ void verticalCenterOffsetChanged();
+ void horizontalCenterOffsetChanged();
+ void baselineOffsetChanged();
+
+private:
+ friend class QDeclarativeItem;
+ Q_DISABLE_COPY(QDeclarativeAnchors)
+ Q_DECLARE_PRIVATE(QDeclarativeAnchors)
+};
+Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeAnchors::UsedAnchors)
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeAnchors)
+
+QT_END_HEADER
+
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors_p_p.h b/src/declarative/graphicsitems/qdeclarativeanchors_p_p.h
new file mode 100644
index 0000000000..5840868bd9
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeanchors_p_p.h
@@ -0,0 +1,166 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEANCHORS_P_H
+#define QDECLARATIVEANCHORS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeanchors_p.h"
+#include "qdeclarativeitemchangelistener_p.h"
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+struct QDeclarativeAnchorLine
+{
+ QDeclarativeAnchorLine() : item(0), anchorLine(Invalid) {}
+
+ enum AnchorLine {
+ Invalid = 0x0,
+ Left = 0x01,
+ Right = 0x02,
+ Top = 0x04,
+ Bottom = 0x08,
+ HCenter = 0x10,
+ VCenter = 0x20,
+ Baseline = 0x40,
+ Horizontal_Mask = Left | Right | HCenter,
+ Vertical_Mask = Top | Bottom | VCenter | Baseline
+ };
+
+ QDeclarativeItem *item;
+ AnchorLine anchorLine;
+};
+
+inline bool operator==(const QDeclarativeAnchorLine& a, const QDeclarativeAnchorLine& b)
+{
+ return a.item == b.item && a.anchorLine == b.anchorLine;
+}
+
+class QDeclarativeAnchorsPrivate : public QObjectPrivate, public QDeclarativeItemChangeListener
+{
+ Q_DECLARE_PUBLIC(QDeclarativeAnchors)
+public:
+ QDeclarativeAnchorsPrivate(QDeclarativeItem *i)
+ : componentComplete(true), updatingMe(false), updatingHorizontalAnchor(0),
+ updatingVerticalAnchor(0), updatingFill(0), updatingCenterIn(0), item(i), usedAnchors(0), fill(0),
+ centerIn(0), leftMargin(0), rightMargin(0), topMargin(0), bottomMargin(0),
+ margins(0), vCenterOffset(0), hCenterOffset(0), baselineOffset(0)
+ {
+ }
+
+ void clearItem(QDeclarativeItem *);
+
+ void addDepend(QDeclarativeItem *);
+ void remDepend(QDeclarativeItem *);
+ bool isItemComplete() const;
+
+ bool componentComplete:1;
+ bool updatingMe:1;
+ uint updatingHorizontalAnchor:2;
+ uint updatingVerticalAnchor:2;
+ uint updatingFill:2;
+ uint updatingCenterIn:2;
+
+ void setItemHeight(qreal);
+ void setItemWidth(qreal);
+ void setItemX(qreal);
+ void setItemY(qreal);
+ void setItemPos(const QPointF &);
+ void setItemSize(const QSizeF &);
+
+ void updateOnComplete();
+ void updateMe();
+
+ // QDeclarativeItemGeometryListener interface
+ void itemGeometryChanged(QDeclarativeItem *, const QRectF &, const QRectF &);
+ QDeclarativeAnchorsPrivate *anchorPrivate() { return this; }
+
+ bool checkHValid() const;
+ bool checkVValid() const;
+ bool checkHAnchorValid(QDeclarativeAnchorLine anchor) const;
+ bool checkVAnchorValid(QDeclarativeAnchorLine anchor) const;
+ bool calcStretch(const QDeclarativeAnchorLine &edge1, const QDeclarativeAnchorLine &edge2, int offset1, int offset2, QDeclarativeAnchorLine::AnchorLine line, int &stretch);
+
+ void updateHorizontalAnchors();
+ void updateVerticalAnchors();
+ void fillChanged();
+ void centerInChanged();
+
+ QDeclarativeItem *item;
+ QDeclarativeAnchors::UsedAnchors usedAnchors;
+
+ QDeclarativeItem *fill;
+ QDeclarativeItem *centerIn;
+
+ QDeclarativeAnchorLine left;
+ QDeclarativeAnchorLine right;
+ QDeclarativeAnchorLine top;
+ QDeclarativeAnchorLine bottom;
+ QDeclarativeAnchorLine vCenter;
+ QDeclarativeAnchorLine hCenter;
+ QDeclarativeAnchorLine baseline;
+
+ qreal leftMargin;
+ qreal rightMargin;
+ qreal topMargin;
+ qreal bottomMargin;
+ qreal margins;
+ qreal vCenterOffset;
+ qreal hCenterOffset;
+ qreal baselineOffset;
+};
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QDeclarativeAnchorLine)
+
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
new file mode 100644
index 0000000000..20b1de35a8
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
@@ -0,0 +1,306 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeanimatedimage_p.h"
+#include "qdeclarativeanimatedimage_p_p.h"
+
+#include <qdeclarativeengine.h>
+
+#include <QMovie>
+#include <QNetworkRequest>
+#include <QNetworkReply>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QDeclarativeAnimatedImage
+ \internal
+*/
+
+/*!
+ \qmlclass AnimatedImage QDeclarativeAnimatedImage
+ \inherits Image
+ \since 4.7
+
+ This item provides for playing animations stored as images containing a series of frames,
+ such as GIF files. The full list of supported formats can be determined with
+ QMovie::supportedFormats().
+
+ \table
+ \row
+ \o \image animatedimageitem.gif
+ \o
+ \qml
+Item {
+ width: anim.width; height: anim.height+8
+ AnimatedImage { id: anim; source: "pics/games-anim.gif" }
+ Rectangle { color: "red"; width: 4; height: 8; y: anim.height
+ x: (anim.width-width)*anim.currentFrame/(anim.frameCount-1)
+ }
+}
+ \endqml
+ \endtable
+*/
+
+QDeclarativeAnimatedImage::QDeclarativeAnimatedImage(QDeclarativeItem *parent)
+ : QDeclarativeImage(*(new QDeclarativeAnimatedImagePrivate), parent)
+{
+}
+
+QDeclarativeAnimatedImage::~QDeclarativeAnimatedImage()
+{
+ Q_D(QDeclarativeAnimatedImage);
+ delete d->_movie;
+}
+
+/*!
+ \qmlproperty bool AnimatedImage::paused
+ This property holds whether the animated image is paused or not
+
+ Defaults to false, and can be set to true when you want to pause.
+*/
+bool QDeclarativeAnimatedImage::isPaused() const
+{
+ Q_D(const QDeclarativeAnimatedImage);
+ if(!d->_movie)
+ return false;
+ return d->_movie->state()==QMovie::Paused;
+}
+
+void QDeclarativeAnimatedImage::setPaused(bool pause)
+{
+ Q_D(QDeclarativeAnimatedImage);
+ if(pause == d->paused)
+ return;
+ d->paused = pause;
+ if(!d->_movie)
+ return;
+ d->_movie->setPaused(pause);
+}
+/*!
+ \qmlproperty bool AnimatedImage::playing
+ This property holds whether the animated image is playing or not
+
+ Defaults to true, so as to start playing immediately.
+*/
+bool QDeclarativeAnimatedImage::isPlaying() const
+{
+ Q_D(const QDeclarativeAnimatedImage);
+ if (!d->_movie)
+ return false;
+ return d->_movie->state()!=QMovie::NotRunning;
+}
+
+void QDeclarativeAnimatedImage::setPlaying(bool play)
+{
+ Q_D(QDeclarativeAnimatedImage);
+ if(play == d->playing)
+ return;
+ d->playing = play;
+ if (!d->_movie)
+ return;
+ if (play)
+ d->_movie->start();
+ else
+ d->_movie->stop();
+}
+
+/*!
+ \qmlproperty int AnimatedImage::currentFrame
+ \qmlproperty int AnimatedImage::frameCount
+
+ currentFrame is the frame that is currently visible. Watching when this changes can
+ allow other things to animate at the same time as the image. frameCount is the number
+ of frames in the animation. For some animation formats, frameCount is unknown and set to zero.
+*/
+int QDeclarativeAnimatedImage::currentFrame() const
+{
+ Q_D(const QDeclarativeAnimatedImage);
+ if (!d->_movie)
+ return d->preset_currentframe;
+ return d->_movie->currentFrameNumber();
+}
+
+void QDeclarativeAnimatedImage::setCurrentFrame(int frame)
+{
+ Q_D(QDeclarativeAnimatedImage);
+ if (!d->_movie) {
+ d->preset_currentframe = frame;
+ return;
+ }
+ d->_movie->jumpToFrame(frame);
+}
+
+int QDeclarativeAnimatedImage::frameCount() const
+{
+ Q_D(const QDeclarativeAnimatedImage);
+ if (!d->_movie)
+ return 0;
+ return d->_movie->frameCount();
+}
+
+static QString toLocalFileOrQrc(const QUrl& url)
+{
+ QString r = url.toLocalFile();
+ if (r.isEmpty() && url.scheme() == QLatin1String("qrc"))
+ r = QLatin1Char(':') + url.path();
+ return r;
+}
+
+void QDeclarativeAnimatedImage::setSource(const QUrl &url)
+{
+ Q_D(QDeclarativeAnimatedImage);
+ if (url == d->url)
+ return;
+
+ delete d->_movie;
+ d->_movie = 0;
+
+ if (d->reply) {
+ d->reply->deleteLater();
+ d->reply = 0;
+ }
+
+ d->url = url;
+
+ if (url.isEmpty()) {
+ delete d->_movie;
+ d->status = Null;
+ } else {
+#ifndef QT_NO_LOCALFILE_OPTIMIZED_QML
+ QString lf = toLocalFileOrQrc(url);
+ if (!lf.isEmpty()) {
+ //### should be unified with movieRequestFinished
+ d->_movie = new QMovie(lf);
+ if (!d->_movie->isValid()){
+ qWarning() << "Error Reading Animated Image File" << d->url;
+ delete d->_movie;
+ d->_movie = 0;
+ return;
+ }
+ connect(d->_movie, SIGNAL(stateChanged(QMovie::MovieState)),
+ this, SLOT(playingStatusChanged()));
+ connect(d->_movie, SIGNAL(frameChanged(int)),
+ this, SLOT(movieUpdate()));
+ d->_movie->setCacheMode(QMovie::CacheAll);
+ if(d->playing)
+ d->_movie->start();
+ else
+ d->_movie->jumpToFrame(0);
+ if(d->paused)
+ d->_movie->setPaused(true);
+ d->setPixmap(d->_movie->currentPixmap());
+ d->status = Ready;
+ d->progress = 1.0;
+ emit statusChanged(d->status);
+ emit sourceChanged(d->url);
+ emit progressChanged(d->progress);
+ return;
+ }
+#endif
+ d->status = Loading;
+ QNetworkRequest req(d->url);
+ req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
+ d->reply = qmlEngine(this)->networkAccessManager()->get(req);
+ QObject::connect(d->reply, SIGNAL(finished()),
+ this, SLOT(movieRequestFinished()));
+ }
+
+ emit statusChanged(d->status);
+}
+
+void QDeclarativeAnimatedImage::movieRequestFinished()
+{
+ Q_D(QDeclarativeAnimatedImage);
+ d->_movie = new QMovie(d->reply);
+ if (!d->_movie->isValid()){
+ qWarning() << "Error Reading Animated Image File " << d->url;
+ delete d->_movie;
+ d->_movie = 0;
+ return;
+ }
+ connect(d->_movie, SIGNAL(stateChanged(QMovie::MovieState)),
+ this, SLOT(playingStatusChanged()));
+ connect(d->_movie, SIGNAL(frameChanged(int)),
+ this, SLOT(movieUpdate()));
+ d->_movie->setCacheMode(QMovie::CacheAll);
+ if(d->playing)
+ d->_movie->start();
+ if (d->paused || !d->playing) {
+ d->_movie->jumpToFrame(d->preset_currentframe);
+ d->preset_currentframe = 0;
+ }
+ if(d->paused)
+ d->_movie->setPaused(true);
+ d->setPixmap(d->_movie->currentPixmap());
+}
+
+void QDeclarativeAnimatedImage::movieUpdate()
+{
+ Q_D(QDeclarativeAnimatedImage);
+ d->setPixmap(d->_movie->currentPixmap());
+ emit frameChanged();
+}
+
+void QDeclarativeAnimatedImage::playingStatusChanged()
+{
+ Q_D(QDeclarativeAnimatedImage);
+ if((d->_movie->state() != QMovie::NotRunning) != d->playing){
+ d->playing = (d->_movie->state() != QMovie::NotRunning);
+ emit playingChanged();
+ }
+ if((d->_movie->state() == QMovie::Paused) != d->paused){
+ d->playing = (d->_movie->state() == QMovie::Paused);
+ emit pausedChanged();
+ }
+}
+
+void QDeclarativeAnimatedImage::componentComplete()
+{
+ Q_D(QDeclarativeAnimatedImage);
+ QDeclarativeImage::componentComplete();
+ if (!d->reply) {
+ setCurrentFrame(d->preset_currentframe);
+ d->preset_currentframe = 0;
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h b/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h
new file mode 100644
index 0000000000..b2979fe21a
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEANIMATEDIMAGE_H
+#define QDECLARATIVEANIMATEDIMAGE_H
+
+#include "qdeclarativeimage_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QMovie;
+class QDeclarativeAnimatedImagePrivate;
+
+class Q_DECLARATIVE_EXPORT QDeclarativeAnimatedImage : public QDeclarativeImage
+{
+ Q_OBJECT
+
+ Q_PROPERTY(bool playing READ isPlaying WRITE setPlaying NOTIFY playingChanged)
+ Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged)
+ Q_PROPERTY(int currentFrame READ currentFrame WRITE setCurrentFrame NOTIFY frameChanged)
+ Q_PROPERTY(int frameCount READ frameCount)
+public:
+ QDeclarativeAnimatedImage(QDeclarativeItem *parent=0);
+ ~QDeclarativeAnimatedImage();
+
+ bool isPlaying() const;
+ void setPlaying(bool play);
+
+ bool isPaused() const;
+ void setPaused(bool pause);
+
+ int currentFrame() const;
+ void setCurrentFrame(int frame);
+
+ int frameCount() const;
+
+ // Extends QDeclarativeImage's src property*/
+ virtual void setSource(const QUrl&);
+
+Q_SIGNALS:
+ void playingChanged();
+ void pausedChanged();
+ void frameChanged();
+
+private Q_SLOTS:
+ void movieUpdate();
+ void movieRequestFinished();
+ void playingStatusChanged();
+
+protected:
+ void componentComplete();
+
+private:
+ Q_DISABLE_COPY(QDeclarativeAnimatedImage)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeAnimatedImage)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeAnimatedImage)
+
+QT_END_HEADER
+
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage_p_p.h b/src/declarative/graphicsitems/qdeclarativeanimatedimage_p_p.h
new file mode 100644
index 0000000000..39bb3e5ecb
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage_p_p.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEANIMATEDIMAGE_P_H
+#define QDECLARATIVEANIMATEDIMAGE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeimage_p_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QMovie;
+class QNetworkReply;
+
+class QDeclarativeAnimatedImagePrivate : public QDeclarativeImagePrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeAnimatedImage)
+
+public:
+ QDeclarativeAnimatedImagePrivate()
+ : playing(true), paused(false), preset_currentframe(0), _movie(0), reply(0)
+ {
+ }
+
+ bool playing;
+ bool paused;
+ int preset_currentframe;
+ QMovie *_movie;
+ QNetworkReply *reply;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEANIMATEDIMAGE_P_H
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
new file mode 100644
index 0000000000..de16668b44
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
@@ -0,0 +1,440 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeborderimage_p.h"
+#include "qdeclarativeborderimage_p_p.h"
+
+#include <qdeclarativeengine.h>
+
+#include <QNetworkRequest>
+#include <QNetworkReply>
+#include <QFile>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \qmlclass BorderImage QDeclarativeBorderImage
+ \brief The BorderImage element provides an image that can be used as a border.
+ \inherits Item
+ \since 4.7
+
+ \snippet snippets/declarative/border-image.qml 0
+
+ \image BorderImage.png
+ */
+
+/*!
+ \class QDeclarativeBorderImage BorderImage
+ \internal
+ \brief The QDeclarativeBorderImage class provides an image item that you can add to a QDeclarativeView.
+*/
+
+QDeclarativeBorderImage::QDeclarativeBorderImage(QDeclarativeItem *parent)
+ : QDeclarativeImageBase(*(new QDeclarativeBorderImagePrivate), parent)
+{
+}
+
+QDeclarativeBorderImage::~QDeclarativeBorderImage()
+{
+ Q_D(QDeclarativeBorderImage);
+ if (d->sciReply)
+ d->sciReply->deleteLater();
+ if (d->sciPendingPixmapCache)
+ QDeclarativePixmapCache::cancel(d->sciurl, this);
+}
+/*!
+ \qmlproperty enum BorderImage::status
+
+ This property holds the status of image loading. It can be one of:
+ \list
+ \o Null - no image has been set
+ \o Ready - the image has been loaded
+ \o Loading - the image is currently being loaded
+ \o Error - an error occurred while loading the image
+ \endlist
+
+ \sa progress
+*/
+
+/*!
+ \qmlproperty real BorderImage::progress
+
+ This property holds the progress of image loading, from 0.0 (nothing loaded)
+ to 1.0 (finished).
+
+ \sa status
+*/
+
+/*!
+ \qmlproperty bool BorderImage::smooth
+
+ Set this property if you want the image to be smoothly filtered when scaled or
+ transformed. Smooth filtering gives better visual quality, but is slower. If
+ the image is displayed at its natural size, this property has no visual or
+ performance effect.
+
+ \note Generally scaling artifacts are only visible if the image is stationary on
+ the screen. A common pattern when animating an image is to disable smooth
+ filtering at the beginning of the animation and reenable it at the conclusion.
+*/
+
+/*!
+ \qmlproperty url BorderImage::source
+
+ BorderImage can handle any image format supported by Qt, loaded from any URL scheme supported by Qt.
+
+ It can also handle .sci files, which are a Qml-specific format. A .sci file uses a simple text-based format that specifies
+ the borders, the image file and the tile rules.
+
+ The following .sci file sets the borders to 10 on each side for the image \c picture.png:
+ \qml
+ border.left: 10
+ border.top: 10
+ border.bottom: 10
+ border.right: 10
+ source: picture.png
+ \endqml
+
+ The URL may be absolute, or relative to the URL of the component.
+*/
+
+static QString toLocalFileOrQrc(const QUrl& url)
+{
+ QString r = url.toLocalFile();
+ if (r.isEmpty() && url.scheme() == QLatin1String("qrc"))
+ r = QLatin1Char(':') + url.path();
+ return r;
+}
+
+
+void QDeclarativeBorderImage::setSource(const QUrl &url)
+{
+ Q_D(QDeclarativeBorderImage);
+ //equality is fairly expensive, so we bypass for simple, common case
+ if ((d->url.isEmpty() == url.isEmpty()) && url == d->url)
+ return;
+
+ if (d->sciReply) {
+ d->sciReply->deleteLater();
+ d->sciReply = 0;
+ }
+
+ if (d->pendingPixmapCache) {
+ QDeclarativePixmapCache::cancel(d->url, this);
+ d->pendingPixmapCache = false;
+ }
+ if (d->sciPendingPixmapCache) {
+ QDeclarativePixmapCache::cancel(d->sciurl, this);
+ d->sciPendingPixmapCache = false;
+ }
+
+ d->url = url;
+ d->sciurl = QUrl();
+ emit sourceChanged(d->url);
+
+ if (isComponentComplete())
+ load();
+}
+
+void QDeclarativeBorderImage::load()
+{
+ Q_D(QDeclarativeBorderImage);
+ if (d->progress != 0.0) {
+ d->progress = 0.0;
+ emit progressChanged(d->progress);
+ }
+
+ if (d->url.isEmpty()) {
+ d->pix = QPixmap();
+ d->status = Null;
+ setImplicitWidth(0);
+ setImplicitHeight(0);
+ emit statusChanged(d->status);
+ update();
+ } else {
+ d->status = Loading;
+ if (d->url.path().endsWith(QLatin1String(".sci"))) {
+#ifndef QT_NO_LOCALFILE_OPTIMIZED_QML
+ QString lf = toLocalFileOrQrc(d->url);
+ if (!lf.isEmpty()) {
+ QFile file(lf);
+ file.open(QIODevice::ReadOnly);
+ setGridScaledImage(QDeclarativeGridScaledImage(&file));
+ } else
+#endif
+ {
+ QNetworkRequest req(d->url);
+ d->sciReply = qmlEngine(this)->networkAccessManager()->get(req);
+
+ static int sciReplyFinished = -1;
+ static int thisSciRequestFinished = -1;
+ if (sciReplyFinished == -1) {
+ sciReplyFinished =
+ QNetworkReply::staticMetaObject.indexOfSignal("finished()");
+ thisSciRequestFinished =
+ QDeclarativeBorderImage::staticMetaObject.indexOfSlot("sciRequestFinished()");
+ }
+
+ QMetaObject::connect(d->sciReply, sciReplyFinished, this,
+ thisSciRequestFinished, Qt::DirectConnection);
+ }
+ } else {
+ QDeclarativePixmapReply::Status status = QDeclarativePixmapCache::get(d->url, &d->pix, d->async);
+ if (status != QDeclarativePixmapReply::Ready && status != QDeclarativePixmapReply::Error) {
+ QDeclarativePixmapReply *reply = QDeclarativePixmapCache::request(qmlEngine(this), d->url);
+ d->pendingPixmapCache = true;
+ connect(reply, SIGNAL(finished()), this, SLOT(requestFinished()));
+ connect(reply, SIGNAL(downloadProgress(qint64,qint64)),
+ this, SLOT(requestProgress(qint64,qint64)));
+ } else {
+ //### should be unified with requestFinished
+ setImplicitWidth(d->pix.width());
+ setImplicitHeight(d->pix.height());
+
+ if (d->pix.isNull())
+ d->status = Error;
+ if (d->status == Loading)
+ d->status = Ready;
+ d->progress = 1.0;
+ emit statusChanged(d->status);
+ emit progressChanged(d->progress);
+ update();
+ }
+ }
+ }
+
+ emit statusChanged(d->status);
+}
+
+/*!
+ \qmlproperty int BorderImage::border.left
+ \qmlproperty int BorderImage::border.right
+ \qmlproperty int BorderImage::border.top
+ \qmlproperty int BorderImage::border.bottom
+
+ \target ImagexmlpropertiesscaleGrid
+
+ The 4 border lines (2 horizontal and 2 vertical) break an image into 9 sections, as shown below:
+
+ \image declarative-scalegrid.png
+
+ When the image is scaled:
+ \list
+ \i the corners (sections 1, 3, 7, and 9) are not scaled at all
+ \i the middle (section 5) is scaled according to BorderImage::horizontalTileMode and BorderImage::verticalTileMode
+ \i sections 2 and 8 are scaled according to BorderImage::horizontalTileMode
+ \i sections 4 and 6 are scaled according to BorderImage::verticalTileMode
+ \endlist
+
+ Each border line (left, right, top, and bottom) specifies an offset from the respective side. For example, \c{border.bottom: 10} sets the bottom line 10 pixels up from the bottom of the image.
+
+ The border lines can also be specified using a
+ \l {BorderImage::source}{.sci file}.
+*/
+
+QDeclarativeScaleGrid *QDeclarativeBorderImage::border()
+{
+ Q_D(QDeclarativeBorderImage);
+ return d->getScaleGrid();
+}
+
+/*!
+ \qmlproperty TileMode BorderImage::horizontalTileMode
+ \qmlproperty TileMode BorderImage::verticalTileMode
+
+ This property describes how to repeat or stretch the middle parts of the border image.
+
+ \list
+ \o Stretch - Scale the image to fit to the available area.
+ \o Repeat - Tile the image until there is no more space. May crop the last image.
+ \o Round - Like Repeat, but scales the images down to ensure that the last image is not cropped.
+ \endlist
+*/
+QDeclarativeBorderImage::TileMode QDeclarativeBorderImage::horizontalTileMode() const
+{
+ Q_D(const QDeclarativeBorderImage);
+ return d->horizontalTileMode;
+}
+
+void QDeclarativeBorderImage::setHorizontalTileMode(TileMode t)
+{
+ Q_D(QDeclarativeBorderImage);
+ if (t != d->horizontalTileMode) {
+ d->horizontalTileMode = t;
+ emit horizontalTileModeChanged();
+ update();
+ }
+}
+
+QDeclarativeBorderImage::TileMode QDeclarativeBorderImage::verticalTileMode() const
+{
+ Q_D(const QDeclarativeBorderImage);
+ return d->verticalTileMode;
+}
+
+void QDeclarativeBorderImage::setVerticalTileMode(TileMode t)
+{
+ Q_D(QDeclarativeBorderImage);
+ if (t != d->verticalTileMode) {
+ d->verticalTileMode = t;
+ emit verticalTileModeChanged();
+ update();
+ }
+}
+
+void QDeclarativeBorderImage::setGridScaledImage(const QDeclarativeGridScaledImage& sci)
+{
+ Q_D(QDeclarativeBorderImage);
+ if (!sci.isValid()) {
+ d->status = Error;
+ emit statusChanged(d->status);
+ } else {
+ QDeclarativeScaleGrid *sg = border();
+ sg->setTop(sci.gridTop());
+ sg->setBottom(sci.gridBottom());
+ sg->setLeft(sci.gridLeft());
+ sg->setRight(sci.gridRight());
+ d->horizontalTileMode = sci.horizontalTileRule();
+ d->verticalTileMode = sci.verticalTileRule();
+
+ d->sciurl = d->url.resolved(QUrl(sci.pixmapUrl()));
+ QDeclarativePixmapReply::Status status = QDeclarativePixmapCache::get(d->sciurl, &d->pix, d->async);
+ if (status != QDeclarativePixmapReply::Ready && status != QDeclarativePixmapReply::Error) {
+ QDeclarativePixmapReply *reply = QDeclarativePixmapCache::request(qmlEngine(this), d->sciurl);
+ d->sciPendingPixmapCache = true;
+
+ static int replyDownloadProgress = -1;
+ static int replyFinished = -1;
+ static int thisRequestProgress = -1;
+ static int thisRequestFinished = -1;
+ if (replyDownloadProgress == -1) {
+ replyDownloadProgress =
+ QDeclarativePixmapReply::staticMetaObject.indexOfSignal("downloadProgress(qint64,qint64)");
+ replyFinished =
+ QDeclarativePixmapReply::staticMetaObject.indexOfSignal("finished()");
+ thisRequestProgress =
+ QDeclarativeBorderImage::staticMetaObject.indexOfSlot("requestProgress(qint64,qint64)");
+ thisRequestFinished =
+ QDeclarativeBorderImage::staticMetaObject.indexOfSlot("requestFinished()");
+ }
+
+ QMetaObject::connect(reply, replyFinished, this,
+ thisRequestFinished, Qt::DirectConnection);
+ QMetaObject::connect(reply, replyDownloadProgress, this,
+ thisRequestProgress, Qt::DirectConnection);
+ } else {
+ //### should be unified with requestFinished
+ setImplicitWidth(d->pix.width());
+ setImplicitHeight(d->pix.height());
+
+ if (d->pix.isNull())
+ d->status = Error;
+ if (d->status == Loading)
+ d->status = Ready;
+ d->progress = 1.0;
+ emit statusChanged(d->status);
+ emit progressChanged(1.0);
+ update();
+ }
+ }
+}
+
+void QDeclarativeBorderImage::requestFinished()
+{
+ Q_D(QDeclarativeBorderImage);
+
+ if (d->url.path().endsWith(QLatin1String(".sci"))) {
+ d->sciPendingPixmapCache = false;
+ QDeclarativePixmapCache::get(d->sciurl, &d->pix, d->async);
+ } else {
+ d->pendingPixmapCache = false;
+ if (QDeclarativePixmapCache::get(d->url, &d->pix, d->async) != QDeclarativePixmapReply::Ready)
+ d->status = Error;
+ }
+ setImplicitWidth(d->pix.width());
+ setImplicitHeight(d->pix.height());
+
+ if (d->status == Loading)
+ d->status = Ready;
+ d->progress = 1.0;
+ emit statusChanged(d->status);
+ emit progressChanged(1.0);
+ update();
+}
+
+void QDeclarativeBorderImage::sciRequestFinished()
+{
+ Q_D(QDeclarativeBorderImage);
+ if (d->sciReply->error() != QNetworkReply::NoError) {
+ d->status = Error;
+ d->sciReply->deleteLater();
+ d->sciReply = 0;
+ emit statusChanged(d->status);
+ } else {
+ QDeclarativeGridScaledImage sci(d->sciReply);
+ d->sciReply->deleteLater();
+ d->sciReply = 0;
+ setGridScaledImage(sci);
+ }
+}
+
+void QDeclarativeBorderImage::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ Q_D(QDeclarativeBorderImage);
+ if (d->pix.isNull())
+ return;
+
+ bool oldAA = p->testRenderHint(QPainter::Antialiasing);
+ bool oldSmooth = p->testRenderHint(QPainter::SmoothPixmapTransform);
+ if (d->smooth)
+ p->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, d->smooth);
+
+ const QDeclarativeScaleGrid *border = d->getScaleGrid();
+ QMargins margins(border->left(), border->top(), border->right(), border->bottom());
+ QTileRules rules((Qt::TileRule)d->horizontalTileMode, (Qt::TileRule)d->verticalTileMode);
+ qDrawBorderPixmap(p, QRect(0, 0, (int)d->width, (int)d->height), margins, d->pix, d->pix.rect(), margins, rules);
+ if (d->smooth) {
+ p->setRenderHint(QPainter::Antialiasing, oldAA);
+ p->setRenderHint(QPainter::SmoothPixmapTransform, oldSmooth);
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h
new file mode 100644
index 0000000000..a759e67c8c
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEBORDERIMAGE_H
+#define QDECLARATIVEBORDERIMAGE_H
+
+#include "qdeclarativeimagebase_p.h"
+
+#include <QtNetwork/qnetworkreply.h>
+
+QT_BEGIN_HEADER
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeScaleGrid;
+class QDeclarativeGridScaledImage;
+class QDeclarativeBorderImagePrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeBorderImage : public QDeclarativeImageBase
+{
+ Q_OBJECT
+ Q_ENUMS(TileMode)
+
+ Q_PROPERTY(QDeclarativeScaleGrid *border READ border CONSTANT)
+ Q_PROPERTY(TileMode horizontalTileMode READ horizontalTileMode WRITE setHorizontalTileMode NOTIFY horizontalTileModeChanged)
+ Q_PROPERTY(TileMode verticalTileMode READ verticalTileMode WRITE setVerticalTileMode NOTIFY verticalTileModeChanged)
+
+public:
+ QDeclarativeBorderImage(QDeclarativeItem *parent=0);
+ ~QDeclarativeBorderImage();
+
+ QDeclarativeScaleGrid *border();
+
+ enum TileMode { Stretch = Qt::StretchTile, Repeat = Qt::RepeatTile, Round = Qt::RoundTile };
+
+ TileMode horizontalTileMode() const;
+ void setHorizontalTileMode(TileMode);
+
+ TileMode verticalTileMode() const;
+ void setVerticalTileMode(TileMode);
+
+ void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
+ void setSource(const QUrl &url);
+
+Q_SIGNALS:
+ void horizontalTileModeChanged();
+ void verticalTileModeChanged();
+
+protected:
+ virtual void load();
+
+private:
+ void setGridScaledImage(const QDeclarativeGridScaledImage& sci);
+
+private Q_SLOTS:
+ void requestFinished();
+ void sciRequestFinished();
+
+private:
+ Q_DISABLE_COPY(QDeclarativeBorderImage)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeBorderImage)
+};
+
+QT_END_NAMESPACE
+QML_DECLARE_TYPE(QDeclarativeBorderImage)
+QT_END_HEADER
+
+#endif // QDECLARATIVEBORDERIMAGE_H
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage_p_p.h b/src/declarative/graphicsitems/qdeclarativeborderimage_p_p.h
new file mode 100644
index 0000000000..b9cf73a71f
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage_p_p.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEBORDERIMAGE_P_H
+#define QDECLARATIVEBORDERIMAGE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeimagebase_p_p.h"
+#include "qdeclarativescalegrid_p_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QNetworkReply;
+class QDeclarativeBorderImagePrivate : public QDeclarativeImageBasePrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeBorderImage)
+
+public:
+ QDeclarativeBorderImagePrivate()
+ : border(0), sciReply(0),
+ sciPendingPixmapCache(false),
+ horizontalTileMode(QDeclarativeBorderImage::Stretch),
+ verticalTileMode(QDeclarativeBorderImage::Stretch)
+ {
+ }
+
+ ~QDeclarativeBorderImagePrivate()
+ {
+ }
+
+ QDeclarativeScaleGrid *getScaleGrid()
+ {
+ Q_Q(QDeclarativeBorderImage);
+ if (!border)
+ border = new QDeclarativeScaleGrid(q);
+ return border;
+ }
+
+ QDeclarativeScaleGrid *border;
+ QUrl sciurl;
+ QNetworkReply *sciReply;
+ bool sciPendingPixmapCache;
+ QDeclarativeBorderImage::TileMode horizontalTileMode;
+ QDeclarativeBorderImage::TileMode verticalTileMode;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEBORDERIMAGE_P_H
diff --git a/src/declarative/graphicsitems/qdeclarativeeffects.cpp b/src/declarative/graphicsitems/qdeclarativeeffects.cpp
new file mode 100644
index 0000000000..ea1f9cc3db
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeeffects.cpp
@@ -0,0 +1,174 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qdeclarative.h>
+
+#include <QtGui/qgraphicseffect.h>
+
+/*!
+ \qmlclass Blur QGraphicsBlurEffect
+ \since 4.7
+ \brief The Blur object provides a blur effect.
+
+ A blur effect blurs the source item. This effect is useful for reducing details;
+ for example, when the a source loses focus and attention should be drawn to other
+ elements. Use blurRadius to control the level of detail and blurHint to control
+ the quality of the blur.
+
+ By default, the blur radius is 5 pixels.
+
+ \img graphicseffect-blur.png
+*/
+
+/*!
+ \qmlproperty real Blur::blurRadius
+
+ This controls how blurry an item will appear.
+
+ A smaller radius produces a sharper appearance, and a larger radius produces
+ a more blurred appearance.
+
+ The default radius is 5 pixels.
+*/
+/*!
+ \qmlproperty enumeration Blur::blurHint
+
+ Use Qt.PerformanceHint to specify a faster blur or Qt.QualityHint hint
+ to specify a higher quality blur.
+
+ If the blur radius is animated, it is recommended you use Qt.PerformanceHint.
+
+ The default hint is Qt.PerformanceHint.
+*/
+
+/*!
+ \qmlclass Colorize QGraphicsColorizeEffect
+ \since 4.7
+ \brief The Colorize object provides a colorize effect.
+
+ A colorize effect renders the source item with a tint of its color.
+
+ By default, the color is light blue.
+
+ \img graphicseffect-colorize.png
+*/
+
+/*!
+ \qmlproperty color Colorize::color
+ The color of the effect.
+
+ By default, the color is light blue.
+*/
+
+/*!
+ \qmlproperty real Colorize::strength
+
+ To what extent the source item is "colored". A strength of 0.0 is equal to no effect,
+ while 1.0 means full colorization. By default, the strength is 1.0.
+*/
+
+
+/*!
+ \qmlclass DropShadow QGraphicsDropShadowEffect
+ \since 4.7
+ \brief The DropShadow object provides a drop shadow effect.
+
+ A drop shadow effect renders the source item with a drop shadow. The color of
+ the drop shadow can be modified using the color property. The drop
+ shadow offset can be modified using the xOffset and yOffset properties and the blur
+ radius of the drop shadow can be changed with the blurRadius property.
+
+ By default, the drop shadow is a semi-transparent dark gray shadow,
+ blurred with a radius of 1 at an offset of 8 pixels towards the lower right.
+
+ \img graphicseffect-drop-shadow.png
+*/
+
+/*!
+ \qmlproperty real DropShadow::xOffset
+ \qmlproperty real DropShadow::yOffset
+ The shadow offset in pixels.
+
+ By default, xOffset and yOffset are 8 pixels.
+*/
+
+/*!
+ \qmlproperty real DropShadow::blurRadius
+ The blur radius in pixels of the drop shadow.
+
+ Using a smaller radius results in a sharper shadow, whereas using a bigger
+ radius results in a more blurred shadow.
+
+ By default, the blur radius is 1 pixel.
+*/
+
+/*!
+ \qmlproperty color DropShadow::color
+ The color of the drop shadow.
+
+ By default, the drop color is a semi-transparent dark gray.
+*/
+
+
+/*!
+ \qmlclass Opacity QGraphicsOpacityEffect
+ \since 4.7
+ \brief The Opacity object provides an opacity effect.
+
+ An opacity effect renders the source with an opacity. This effect is useful
+ for making the source semi-transparent, similar to a fade-in/fade-out
+ sequence. The opacity can be modified using the opacity property.
+
+ By default, the opacity is 0.7.
+
+ \img graphicseffect-opacity.png
+*/
+
+/*!
+ \qmlproperty real Opacity::opacity
+ This property specifies how opaque an item should appear.
+
+ The value should be in the range of 0.0 to 1.0, where 0.0 is
+ fully transparent and 1.0 is fully opaque.
+
+ By default, the opacity is 0.7.
+*/
+
diff --git a/src/declarative/graphicsitems/qdeclarativeeffects_p.h b/src/declarative/graphicsitems/qdeclarativeeffects_p.h
new file mode 100644
index 0000000000..73eec6a193
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeeffects_p.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEEFFECTS_P_H
+#define QDECLARATIVEEFFECTS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <qdeclarative.h>
+#include <QtGui/qgraphicseffect.h>
+
+QML_DECLARE_TYPE(QGraphicsEffect)
+QML_DECLARE_TYPE(QGraphicsBlurEffect)
+QML_DECLARE_TYPE(QGraphicsColorizeEffect)
+QML_DECLARE_TYPE(QGraphicsDropShadowEffect)
+QML_DECLARE_TYPE(QGraphicsOpacityEffect)
+
+#endif // QDECLARATIVEEFFECTS_P_H
diff --git a/src/declarative/graphicsitems/qdeclarativeevents.cpp b/src/declarative/graphicsitems/qdeclarativeevents.cpp
new file mode 100644
index 0000000000..8be2f409f8
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeevents.cpp
@@ -0,0 +1,194 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeevents_p_p.h"
+
+QT_BEGIN_NAMESPACE
+/*!
+ \qmlclass KeyEvent QDeclarativeKeyEvent
+ \since 4.7
+ \brief The KeyEvent object provides information about a key event.
+
+ For example, the following changes the Item's state property when the Enter
+ key is pressed:
+ \qml
+Item {
+ focus: true
+ Keys.onPressed: { if (event.key == Qt.Key_Enter) state = 'ShowDetails'; }
+}
+ \endqml
+*/
+
+/*!
+ \internal
+ \class QDeclarativeKeyEvent
+*/
+
+/*!
+ \qmlproperty int KeyEvent::key
+
+ This property holds the code of the key that was pressed or released.
+
+ See \l {Qt::Key}{Qt.Key} for the list of keyboard codes. These codes are
+ independent of the underlying window system. Note that this
+ function does not distinguish between capital and non-capital
+ letters, use the text() function (returning the Unicode text the
+ key generated) for this purpose.
+
+ A value of either 0 or \l {Qt::Key_unknown}{Qt.Key_Unknown} means that the event is not
+ the result of a known key; for example, it may be the result of
+ a compose sequence, a keyboard macro, or due to key event
+ compression.
+*/
+
+/*!
+ \qmlproperty string KeyEvent::text
+
+ This property holds the Unicode text that the key generated.
+ The text returned can be an empty string in cases where modifier keys,
+ such as Shift, Control, Alt, and Meta, are being pressed or released.
+ In such cases \c key will contain a valid value
+*/
+
+/*!
+ \qmlproperty bool KeyEvent::isAutoRepeat
+
+ This property holds whether this event comes from an auto-repeating key.
+*/
+
+/*!
+ \qmlproperty int KeyEvent::count
+
+ This property holds the number of keys involved in this event. If \l KeyEvent::text
+ is not empty, this is simply the length of the string.
+*/
+
+/*!
+ \qmlproperty bool KeyEvent::accepted
+
+ Setting \a accepted to true prevents the key event from being
+ propagated to the item's parent.
+
+ Generally, if the item acts on the key event then it should be accepted
+ so that ancestor items do not also respond to the same event.
+*/
+
+
+/*!
+ \qmlclass MouseEvent QDeclarativeMouseEvent
+ \since 4.7
+ \brief The MouseEvent object provides information about a mouse event.
+
+ The position of the mouse can be found via the x and y properties.
+ The button that caused the event is available via the button property.
+*/
+
+/*!
+ \internal
+ \class QDeclarativeMouseEvent
+*/
+
+/*!
+ \qmlproperty int MouseEvent::x
+ \qmlproperty int MouseEvent::y
+
+ These properties hold the position of the mouse event.
+*/
+
+/*!
+ \qmlproperty enum MouseEvent::button
+
+ This property holds the button that caused the event. It can be one of:
+ \list
+ \o Qt.LeftButton
+ \o Qt.RightButton
+ \o Qt.MidButton
+ \endlist
+*/
+
+/*!
+ \qmlproperty bool MouseEvent::wasHeld
+
+ This property is true if the mouse button has been held pressed longer the
+ threshold (800ms).
+*/
+
+/*!
+ \qmlproperty int MouseEvent::buttons
+
+ This property holds the mouse buttons pressed when the event was generated.
+ For mouse move events, this is all buttons that are pressed down. For mouse
+ press and double click events this includes the button that caused the event.
+ For mouse release events this excludes the button that caused the event.
+
+ It contains a bitwise combination of:
+ \list
+ \o Qt.LeftButton
+ \o Qt.RightButton
+ \o Qt.MidButton
+ \endlist
+*/
+
+/*!
+ \qmlproperty int MouseEvent::modifiers
+
+ This property holds the keyboard modifier flags that existed immediately
+ before the event occurred.
+
+ It contains a bitwise combination of:
+ \list
+ \o Qt.NoModifier - No modifier key is pressed.
+ \o Qt.ShiftModifier - A Shift key on the keyboard is pressed.
+ \o Qt.ControlModifier - A Ctrl key on the keyboard is pressed.
+ \o Qt.AltModifier - An Alt key on the keyboard is pressed.
+ \o Qt.MetaModifier - A Meta key on the keyboard is pressed.
+ \o Qt.KeypadModifier - A keypad button is pressed.
+ \endlist
+
+ For example, to react to a Shift key + Left mouse button click:
+ \qml
+MouseArea {
+ onClicked: { if (mouse.button == Qt.LeftButton && mouse.modifiers & Qt.ShiftModifier) doSomething(); }
+}
+ \endqml
+*/
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativeevents_p_p.h b/src/declarative/graphicsitems/qdeclarativeevents_p_p.h
new file mode 100644
index 0000000000..65ac8dee33
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeevents_p_p.h
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEEVENTS_P_H
+#define QDECLARATIVEEVENTS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <qdeclarative.h>
+
+#include <QtCore/qobject.h>
+#include <QtGui/qevent.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeKeyEvent : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int key READ key)
+ Q_PROPERTY(QString text READ text)
+ Q_PROPERTY(int modifiers READ modifiers)
+ Q_PROPERTY(bool isAutoRepeat READ isAutoRepeat)
+ Q_PROPERTY(int count READ count)
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted)
+
+public:
+ QDeclarativeKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, const QString &text=QString(), bool autorep=false, ushort count=1)
+ : event(type, key, modifiers, text, autorep, count) { event.setAccepted(false); }
+ QDeclarativeKeyEvent(const QKeyEvent &ke)
+ : event(ke) { event.setAccepted(false); }
+
+ int key() const { return event.key(); }
+ QString text() const { return event.text(); }
+ int modifiers() const { return event.modifiers(); }
+ bool isAutoRepeat() const { return event.isAutoRepeat(); }
+ int count() const { return event.count(); }
+
+ bool isAccepted() { return event.isAccepted(); }
+ void setAccepted(bool accepted) { event.setAccepted(accepted); }
+
+private:
+ QKeyEvent event;
+};
+
+class QDeclarativeMouseEvent : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int x READ x)
+ Q_PROPERTY(int y READ y)
+ Q_PROPERTY(int button READ button)
+ Q_PROPERTY(int buttons READ buttons)
+ Q_PROPERTY(int modifiers READ modifiers)
+ Q_PROPERTY(bool wasHeld READ wasHeld)
+ Q_PROPERTY(bool isClick READ isClick)
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted)
+
+public:
+ QDeclarativeMouseEvent(int x, int y, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers
+ , bool isClick=false, bool wasHeld=false)
+ : _x(x), _y(y), _button(button), _buttons(buttons), _modifiers(modifiers)
+ , _wasHeld(wasHeld), _isClick(isClick), _accepted(true) {}
+
+ int x() const { return _x; }
+ int y() const { return _y; }
+ int button() const { return _button; }
+ int buttons() const { return _buttons; }
+ int modifiers() const { return _modifiers; }
+ bool wasHeld() const { return _wasHeld; }
+ bool isClick() const { return _isClick; }
+
+ bool isAccepted() { return _accepted; }
+ void setAccepted(bool accepted) { _accepted = accepted; }
+
+private:
+ int _x;
+ int _y;
+ Qt::MouseButton _button;
+ Qt::MouseButtons _buttons;
+ Qt::KeyboardModifiers _modifiers;
+ bool _wasHeld;
+ bool _isClick;
+ bool _accepted;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeKeyEvent)
+QML_DECLARE_TYPE(QDeclarativeMouseEvent)
+
+#endif // QDECLARATIVEEVENTS_P_H
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
new file mode 100644
index 0000000000..67068a0a2a
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -0,0 +1,1318 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeflickable_p.h"
+#include "qdeclarativeflickable_p_p.h"
+
+#include <QGraphicsSceneMouseEvent>
+#include <QPointer>
+#include <QTimer>
+
+QT_BEGIN_NAMESPACE
+
+
+// FlickThreshold determines how far the "mouse" must have moved
+// before we perform a flick.
+static const int FlickThreshold = 20;
+
+// Really slow flicks can be annoying.
+static const int minimumFlickVelocity = 200;
+
+QDeclarativeFlickableVisibleArea::QDeclarativeFlickableVisibleArea(QDeclarativeFlickable *parent)
+ : QObject(parent), flickable(parent), m_xPosition(0.), m_widthRatio(0.)
+ , m_yPosition(0.), m_heightRatio(0.)
+{
+}
+
+qreal QDeclarativeFlickableVisibleArea::widthRatio() const
+{
+ return m_widthRatio;
+}
+
+qreal QDeclarativeFlickableVisibleArea::xPosition() const
+{
+ return m_xPosition;
+}
+
+qreal QDeclarativeFlickableVisibleArea::heightRatio() const
+{
+ return m_heightRatio;
+}
+
+qreal QDeclarativeFlickableVisibleArea::yPosition() const
+{
+ return m_yPosition;
+}
+
+void QDeclarativeFlickableVisibleArea::updateVisible()
+{
+ QDeclarativeFlickablePrivate *p = static_cast<QDeclarativeFlickablePrivate *>(QGraphicsItemPrivate::get(flickable));
+ bool pageChange = false;
+
+ // Vertical
+ const qreal viewheight = flickable->height();
+ const qreal maxyextent = -flickable->maxYExtent() + flickable->minYExtent();
+ qreal pagePos = (-p->vData.move.value() + flickable->minYExtent()) / (maxyextent + viewheight);
+ qreal pageSize = viewheight / (maxyextent + viewheight);
+
+ if (pageSize != m_heightRatio) {
+ m_heightRatio = pageSize;
+ pageChange = true;
+ }
+ if (pagePos != m_yPosition) {
+ m_yPosition = pagePos;
+ pageChange = true;
+ }
+
+ // Horizontal
+ const qreal viewwidth = flickable->width();
+ const qreal maxxextent = -flickable->maxXExtent() + flickable->minXExtent();
+ pagePos = (-p->hData.move.value() + flickable->minXExtent()) / (maxxextent + viewwidth);
+ pageSize = viewwidth / (maxxextent + viewwidth);
+
+ if (pageSize != m_widthRatio) {
+ m_widthRatio = pageSize;
+ pageChange = true;
+ }
+ if (pagePos != m_xPosition) {
+ m_xPosition = pagePos;
+ pageChange = true;
+ }
+ if (pageChange)
+ emit pageChanged();
+}
+
+
+QDeclarativeFlickablePrivate::QDeclarativeFlickablePrivate()
+ : viewport(new QDeclarativeItem)
+ , hData(this, &QDeclarativeFlickablePrivate::setRoundedViewportX)
+ , vData(this, &QDeclarativeFlickablePrivate::setRoundedViewportY)
+ , overShoot(true), flicked(false), moving(false), stealMouse(false)
+ , pressed(false)
+ , interactive(true), deceleration(500), maxVelocity(2000), reportedVelocitySmoothing(100)
+ , delayedPressEvent(0), delayedPressTarget(0), pressDelay(0), fixupDuration(600)
+ , vTime(0), visibleArea(0)
+ , flickDirection(QDeclarativeFlickable::AutoFlickDirection)
+{
+}
+
+void QDeclarativeFlickablePrivate::init()
+{
+ Q_Q(QDeclarativeFlickable);
+ viewport->setParent(q);
+ static int timelineUpdatedIdx = -1;
+ static int timelineCompletedIdx = -1;
+ static int flickableTickedIdx = -1;
+ static int flickableMovementEndingIdx = -1;
+ if (timelineUpdatedIdx == -1) {
+ timelineUpdatedIdx = QDeclarativeTimeLine::staticMetaObject.indexOfSignal("updated()");
+ timelineCompletedIdx = QDeclarativeTimeLine::staticMetaObject.indexOfSignal("completed()");
+ flickableTickedIdx = QDeclarativeFlickable::staticMetaObject.indexOfSlot("ticked()");
+ flickableMovementEndingIdx = QDeclarativeFlickable::staticMetaObject.indexOfSlot("movementEnding()");
+ }
+ QMetaObject::connect(&timeline, timelineUpdatedIdx,
+ q, flickableTickedIdx, Qt::DirectConnection);
+ QMetaObject::connect(&timeline, timelineCompletedIdx,
+ q, flickableMovementEndingIdx, Qt::DirectConnection);
+ q->setAcceptedMouseButtons(Qt::LeftButton);
+ q->setFiltersChildEvents(true);
+ QDeclarativeItemPrivate *viewportPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(viewport));
+ viewportPrivate->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
+}
+
+/*
+ Returns the amount to overshoot by given a velocity.
+ Will be roughly in range 0 - size/4
+*/
+qreal QDeclarativeFlickablePrivate::overShootDistance(qreal velocity, qreal size)
+{
+ if (maxVelocity <= 0)
+ return 0.0;
+
+ velocity = qAbs(velocity);
+ if (velocity > maxVelocity)
+ velocity = maxVelocity;
+ qreal dist = size / 4 * velocity / maxVelocity;
+ return dist;
+}
+
+void QDeclarativeFlickablePrivate::itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeom, const QRectF &oldGeom)
+{
+ Q_Q(QDeclarativeFlickable);
+ if (item == viewport) {
+ if (newGeom.x() != oldGeom.x())
+ emit q->contentXChanged();
+ if (newGeom.y() != oldGeom.y())
+ emit q->contentYChanged();
+ }
+}
+
+void QDeclarativeFlickablePrivate::flickX(qreal velocity)
+{
+ Q_Q(QDeclarativeFlickable);
+ flick(hData, q->minXExtent(), q->maxXExtent(), q->width(), fixupX_callback, velocity);
+}
+
+void QDeclarativeFlickablePrivate::flickY(qreal velocity)
+{
+ Q_Q(QDeclarativeFlickable);
+ flick(vData, q->minYExtent(), q->maxYExtent(), q->height(), fixupY_callback, velocity);
+}
+
+void QDeclarativeFlickablePrivate::flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize,
+ QDeclarativeTimeLineCallback::Callback fixupCallback, qreal velocity)
+{
+ Q_Q(QDeclarativeFlickable);
+ qreal maxDistance = -1;
+ // -ve velocity means list is moving up
+ if (velocity > 0) {
+ if (data.move.value() < minExtent)
+ maxDistance = qAbs(minExtent - data.move.value() + (overShoot?overShootDistance(velocity,vSize):0));
+ data.flickTarget = minExtent;
+ } else {
+ if (data.move.value() > maxExtent)
+ maxDistance = qAbs(maxExtent - data.move.value()) + (overShoot?overShootDistance(velocity,vSize):0);
+ data.flickTarget = maxExtent;
+ }
+ if (maxDistance > 0) {
+ qreal v = velocity;
+ if (maxVelocity != -1 && maxVelocity < qAbs(v)) {
+ if (v < 0)
+ v = -maxVelocity;
+ else
+ v = maxVelocity;
+ }
+ timeline.reset(data.move);
+ timeline.accel(data.move, v, deceleration, maxDistance);
+ timeline.callback(QDeclarativeTimeLineCallback(&data.move, fixupCallback, this));
+ if (!flicked) {
+ flicked = true;
+ emit q->flickingChanged();
+ emit q->flickStarted();
+ }
+ } else {
+ timeline.reset(data.move);
+ fixup(data, minExtent, maxExtent);
+ }
+}
+
+void QDeclarativeFlickablePrivate::fixupY_callback(void *data)
+{
+ ((QDeclarativeFlickablePrivate *)data)->fixupY();
+}
+
+void QDeclarativeFlickablePrivate::fixupX_callback(void *data)
+{
+ ((QDeclarativeFlickablePrivate *)data)->fixupX();
+}
+
+void QDeclarativeFlickablePrivate::fixupX()
+{
+ Q_Q(QDeclarativeFlickable);
+ if (!q->xflick() || hData.move.timeLine())
+ return;
+
+ fixup(hData, q->minXExtent(), q->maxXExtent());
+}
+
+void QDeclarativeFlickablePrivate::fixupY()
+{
+ Q_Q(QDeclarativeFlickable);
+ if (!q->yflick() || vData.move.timeLine())
+ return;
+
+ fixup(vData, q->minYExtent(), q->maxYExtent());
+}
+
+void QDeclarativeFlickablePrivate::fixup(AxisData &data, qreal minExtent, qreal maxExtent)
+{
+ if (data.move.value() > minExtent || maxExtent > minExtent) {
+ timeline.reset(data.move);
+ if (data.move.value() != minExtent) {
+ if (fixupDuration) {
+ qreal dist = minExtent - data.move;
+ timeline.move(data.move, minExtent - dist/2, QEasingCurve(QEasingCurve::InQuad), fixupDuration/4);
+ timeline.move(data.move, minExtent, QEasingCurve(QEasingCurve::OutQuint), 3*fixupDuration/4);
+ } else {
+ data.move.setValue(minExtent);
+ }
+ }
+ //emit flickingChanged();
+ } else if (data.move.value() < maxExtent) {
+ timeline.reset(data.move);
+ if (fixupDuration) {
+ qreal dist = maxExtent - data.move;
+ timeline.move(data.move, maxExtent - dist/2, QEasingCurve(QEasingCurve::InQuad), fixupDuration/4);
+ timeline.move(data.move, maxExtent, QEasingCurve(QEasingCurve::OutQuint), 3*fixupDuration/4);
+ } else {
+ data.move.setValue(maxExtent);
+ }
+ //emit flickingChanged();
+ } else {
+ flicked = false;
+ }
+
+ vTime = timeline.time();
+}
+
+void QDeclarativeFlickablePrivate::updateBeginningEnd()
+{
+ Q_Q(QDeclarativeFlickable);
+ bool atBoundaryChange = false;
+
+ // Vertical
+ const int maxyextent = int(-q->maxYExtent());
+ const qreal ypos = -vData.move.value();
+ bool atBeginning = (ypos <= -q->minYExtent());
+ bool atEnd = (maxyextent <= ypos);
+
+ if (atBeginning != vData.atBeginning) {
+ vData.atBeginning = atBeginning;
+ atBoundaryChange = true;
+ }
+ if (atEnd != vData.atEnd) {
+ vData.atEnd = atEnd;
+ atBoundaryChange = true;
+ }
+
+ // Horizontal
+ const int maxxextent = int(-q->maxXExtent());
+ const qreal xpos = -hData.move.value();
+ atBeginning = (xpos <= -q->minXExtent());
+ atEnd = (maxxextent <= xpos);
+
+ if (atBeginning != hData.atBeginning) {
+ hData.atBeginning = atBeginning;
+ atBoundaryChange = true;
+ }
+ if (atEnd != hData.atEnd) {
+ hData.atEnd = atEnd;
+ atBoundaryChange = true;
+ }
+
+ if (atBoundaryChange)
+ emit q->isAtBoundaryChanged();
+
+ if (visibleArea)
+ visibleArea->updateVisible();
+}
+
+/*!
+ \qmlclass Flickable QDeclarativeFlickable
+ \since 4.7
+ \brief The Flickable item provides a surface that can be "flicked".
+ \inherits Item
+
+ Flickable places its children on a surface that can be dragged and flicked.
+
+ \code
+ Flickable {
+ width: 200; height: 200; contentWidth: image.width; contentHeight: image.height
+ Image { id: image; source: "bigimage.png" }
+ }
+ \endcode
+
+ \image flickable.gif
+
+ \note Flickable does not automatically clip its contents. If
+ it is not full-screen it is likely that \c clip should be set
+ to true.
+
+ \note Due to an implementation detail items placed inside a flickable cannot anchor to it by
+ id, use 'parent' instead.
+*/
+
+/*!
+ \qmlsignal Flickable::onMovementStarted()
+
+ This handler is called when the view begins moving due to user
+ interaction.
+*/
+
+/*!
+ \qmlsignal Flickable::onMovementEnded()
+
+ This handler is called when the view stops moving due to user
+ interaction. If a flick was generated, this handler will
+ be triggered once the flick stops. If a flick was not
+ generated, the handler will be triggered when the
+ user stops dragging - i.e. a mouse or touch release.
+*/
+
+/*!
+ \qmlsignal Flickable::onFlickStarted()
+
+ This handler is called when the view is flicked. A flick
+ starts from the point that the mouse or touch is released,
+ while still in motion.
+*/
+
+/*!
+ \qmlsignal Flickable::onFlickEnded()
+
+ This handler is called when the view stops moving due to a flick.
+*/
+
+/*!
+ \qmlproperty real Flickable::visibleArea.xPosition
+ \qmlproperty real Flickable::visibleArea.widthRatio
+ \qmlproperty real Flickable::visibleArea.yPosition
+ \qmlproperty real Flickable::visibleArea.heightRatio
+
+ These properties describe the position and size of the currently viewed area.
+ The size is defined as the percentage of the full view currently visible,
+ scaled to 0.0 - 1.0. The page position is in the range 0.0 (beginning) to
+ size ratio (end), i.e. yPosition is in the range 0.0 - heightRatio.
+
+ These properties are typically used to draw a scrollbar, for example:
+ \code
+ Rectangle {
+ opacity: 0.5; anchors.right: MyListView.right-2; width: 6
+ y: MyListView.visibleArea.yPosition * MyListView.height
+ height: MyListView.visibleArea.heightRatio * MyListView.height
+ }
+ \endcode
+*/
+
+QDeclarativeFlickable::QDeclarativeFlickable(QDeclarativeItem *parent)
+ : QDeclarativeItem(*(new QDeclarativeFlickablePrivate), parent)
+{
+ Q_D(QDeclarativeFlickable);
+ d->init();
+}
+
+QDeclarativeFlickable::QDeclarativeFlickable(QDeclarativeFlickablePrivate &dd, QDeclarativeItem *parent)
+ : QDeclarativeItem(dd, parent)
+{
+ Q_D(QDeclarativeFlickable);
+ d->init();
+}
+
+QDeclarativeFlickable::~QDeclarativeFlickable()
+{
+}
+
+/*!
+ \qmlproperty int Flickable::contentX
+ \qmlproperty int Flickable::contentY
+
+ These properties hold the surface coordinate currently at the top-left
+ corner of the Flickable. For example, if you flick an image up 100 pixels,
+ \c contentY will be 100.
+*/
+qreal QDeclarativeFlickable::contentX() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return -d->hData.move.value();
+}
+
+void QDeclarativeFlickable::setContentX(qreal pos)
+{
+ Q_D(QDeclarativeFlickable);
+ pos = qRound(pos);
+ d->timeline.reset(d->hData.move);
+ d->vTime = d->timeline.time();
+ if (-pos != d->hData.move.value()) {
+ d->hData.move.setValue(-pos);
+ viewportMoved();
+ }
+}
+
+qreal QDeclarativeFlickable::contentY() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return -d->vData.move.value();
+}
+
+void QDeclarativeFlickable::setContentY(qreal pos)
+{
+ Q_D(QDeclarativeFlickable);
+ pos = qRound(pos);
+ d->timeline.reset(d->vData.move);
+ d->vTime = d->timeline.time();
+ if (-pos != d->vData.move.value()) {
+ d->vData.move.setValue(-pos);
+ viewportMoved();
+ }
+}
+
+/*!
+ \qmlproperty bool Flickable::interactive
+
+ A user cannot drag or flick a Flickable that is not interactive.
+
+ This property is useful for temporarily disabling flicking. This allows
+ special interaction with Flickable's children: for example, you might want to
+ freeze a flickable map while viewing detailed information on a location popup that is a child of the Flickable.
+*/
+bool QDeclarativeFlickable::isInteractive() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->interactive;
+}
+
+void QDeclarativeFlickable::setInteractive(bool interactive)
+{
+ Q_D(QDeclarativeFlickable);
+ if (interactive != d->interactive) {
+ d->interactive = interactive;
+ if (!interactive && d->flicked) {
+ d->timeline.clear();
+ d->vTime = d->timeline.time();
+ d->flicked = false;
+ emit flickingChanged();
+ emit flickEnded();
+ }
+ emit interactiveChanged();
+ }
+}
+
+/*!
+ \qmlproperty real Flickable::horizontalVelocity
+ \qmlproperty real Flickable::verticalVelocity
+
+ The instantaneous velocity of movement along the x and y axes, in pixels/sec.
+
+ The reported velocity is smoothed to avoid erratic output.
+*/
+qreal QDeclarativeFlickable::horizontalVelocity() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->hData.smoothVelocity.value();
+}
+
+qreal QDeclarativeFlickable::verticalVelocity() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->vData.smoothVelocity.value();
+}
+
+/*!
+ \qmlproperty bool Flickable::atXBeginning
+ \qmlproperty bool Flickable::atXEnd
+ \qmlproperty bool Flickable::atYBeginning
+ \qmlproperty bool Flickable::atYEnd
+
+ These properties are true if the flickable view is positioned at the beginning,
+ or end respecively.
+*/
+bool QDeclarativeFlickable::isAtXEnd() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->hData.atEnd;
+}
+
+bool QDeclarativeFlickable::isAtXBeginning() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->hData.atBeginning;
+}
+
+bool QDeclarativeFlickable::isAtYEnd() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->vData.atEnd;
+}
+
+bool QDeclarativeFlickable::isAtYBeginning() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->vData.atBeginning;
+}
+
+void QDeclarativeFlickable::ticked()
+{
+ viewportMoved();
+}
+
+QDeclarativeItem *QDeclarativeFlickable::viewport()
+{
+ Q_D(QDeclarativeFlickable);
+ return d->viewport;
+}
+
+QDeclarativeFlickableVisibleArea *QDeclarativeFlickable::visibleArea()
+{
+ Q_D(QDeclarativeFlickable);
+ if (!d->visibleArea)
+ d->visibleArea = new QDeclarativeFlickableVisibleArea(this);
+ return d->visibleArea;
+}
+
+/*!
+ \qmlproperty enumeration Flickable::flickDirection
+
+ This property determines which directions the view can be flicked.
+
+ \list
+ \o AutoFlickDirection (default) - allows flicking vertically if the
+ \e contentHeight is not equal to the \e height of the Flickable.
+ Allows flicking horizontally if the \e contentWidth is not equal
+ to the \e width of the Flickable.
+ \o HorizontalFlick - allows flicking horizontally.
+ \o VerticalFlick - allows flicking vertically.
+ \o HorizontalAndVerticalFlick - allows flicking in both directions.
+ \endlist
+*/
+QDeclarativeFlickable::FlickDirection QDeclarativeFlickable::flickDirection() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->flickDirection;
+}
+
+void QDeclarativeFlickable::setFlickDirection(FlickDirection direction)
+{
+ Q_D(QDeclarativeFlickable);
+ if (direction != d->flickDirection) {
+ d->flickDirection = direction;
+ emit flickDirectionChanged();
+ }
+}
+
+void QDeclarativeFlickablePrivate::handleMousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ if (interactive && timeline.isActive() && (qAbs(hData.velocity) > 10 || qAbs(vData.velocity) > 10))
+ stealMouse = true; // If we've been flicked then steal the click.
+ else
+ stealMouse = false;
+ pressed = true;
+ timeline.clear();
+ hData.velocity = 0;
+ vData.velocity = 0;
+ lastPos = QPoint();
+ QDeclarativeItemPrivate::start(lastPosTime);
+ pressPos = event->pos();
+ hData.pressPos = hData.move.value();
+ vData.pressPos = vData.move.value();
+ flicked = false;
+ QDeclarativeItemPrivate::start(pressTime);
+ QDeclarativeItemPrivate::start(velocityTime);
+}
+
+void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_Q(QDeclarativeFlickable);
+ if (!interactive || lastPosTime.isNull())
+ return;
+ bool rejectY = false;
+ bool rejectX = false;
+ bool moved = false;
+
+ if (q->yflick()) {
+ int dy = int(event->pos().y() - pressPos.y());
+ if (qAbs(dy) > QApplication::startDragDistance() || QDeclarativeItemPrivate::elapsed(pressTime) > 200) {
+ qreal newY = dy + vData.pressPos;
+ const qreal minY = q->minYExtent();
+ const qreal maxY = q->maxYExtent();
+ if (newY > minY)
+ newY = minY + (newY - minY) / 2;
+ if (newY < maxY && maxY - minY <= 0)
+ newY = maxY + (newY - maxY) / 2;
+ if (!q->overShoot() && (newY > minY || newY < maxY)) {
+ if (newY > minY)
+ newY = minY;
+ else if (newY < maxY)
+ newY = maxY;
+ else
+ rejectY = true;
+ }
+ if (!rejectY && stealMouse) {
+ vData.move.setValue(newY);
+ moved = true;
+ }
+ if (qAbs(dy) > QApplication::startDragDistance())
+ stealMouse = true;
+ }
+ }
+
+ if (q->xflick()) {
+ int dx = int(event->pos().x() - pressPos.x());
+ if (qAbs(dx) > QApplication::startDragDistance() || QDeclarativeItemPrivate::elapsed(pressTime) > 200) {
+ qreal newX = dx + hData.pressPos;
+ const qreal minX = q->minXExtent();
+ const qreal maxX = q->maxXExtent();
+ if (newX > minX)
+ newX = minX + (newX - minX) / 2;
+ if (newX < maxX && maxX - minX <= 0)
+ newX = maxX + (newX - maxX) / 2;
+ if (!q->overShoot() && (newX > minX || newX < maxX)) {
+ if (newX > minX)
+ newX = minX;
+ else if (newX < maxX)
+ newX = maxX;
+ else
+ rejectX = true;
+ }
+ if (!rejectX && stealMouse) {
+ hData.move.setValue(newX);
+ moved = true;
+ }
+
+ if (qAbs(dx) > QApplication::startDragDistance())
+ stealMouse = true;
+ }
+ }
+
+ if (!lastPos.isNull()) {
+ qreal elapsed = qreal(QDeclarativeItemPrivate::restart(lastPosTime)) / 1000.;
+ if (elapsed <= 0)
+ elapsed = 1;
+ if (q->yflick()) {
+ qreal diff = event->pos().y() - lastPos.y();
+ // average to reduce the effect of spurious moves
+ vData.velocity += diff / elapsed;
+ vData.velocity /= 2;
+ }
+
+ if (q->xflick()) {
+ qreal diff = event->pos().x() - lastPos.x();
+ // average to reduce the effect of spurious moves
+ hData.velocity += diff / elapsed;
+ hData.velocity /= 2;
+ }
+ }
+
+ if (rejectY) vData.velocity = 0;
+ if (rejectX) hData.velocity = 0;
+
+ if (moved) {
+ q->movementStarting();
+ q->viewportMoved();
+ }
+
+ lastPos = event->pos();
+}
+
+void QDeclarativeFlickablePrivate::handleMouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_Q(QDeclarativeFlickable);
+ stealMouse = false;
+ q->setKeepMouseGrab(false);
+ pressed = false;
+ if (lastPosTime.isNull())
+ return;
+
+ if (QDeclarativeItemPrivate::elapsed(lastPosTime) > 100) {
+ // if we drag then pause before release we should not cause a flick.
+ hData.velocity = 0.0;
+ vData.velocity = 0.0;
+ }
+
+ vTime = timeline.time();
+ if (qAbs(vData.velocity) > 10 && qAbs(event->pos().y() - pressPos.y()) > FlickThreshold) {
+ qreal velocity = vData.velocity;
+ if (qAbs(velocity) < minimumFlickVelocity) // Minimum velocity to avoid annoyingly slow flicks.
+ velocity = velocity < 0 ? -minimumFlickVelocity : minimumFlickVelocity;
+ flickY(velocity);
+ } else {
+ fixupY();
+ }
+
+ if (qAbs(hData.velocity) > 10 && qAbs(event->pos().x() - pressPos.x()) > FlickThreshold) {
+ qreal velocity = hData.velocity;
+ if (qAbs(velocity) < minimumFlickVelocity) // Minimum velocity to avoid annoyingly slow flicks.
+ velocity = velocity < 0 ? -minimumFlickVelocity : minimumFlickVelocity;
+ flickX(velocity);
+ } else {
+ fixupX();
+ }
+
+ lastPosTime = QTime();
+
+ if (!timeline.isActive())
+ q->movementEnding();
+}
+
+void QDeclarativeFlickable::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeFlickable);
+ if (d->interactive) {
+ d->handleMousePressEvent(event);
+ event->accept();
+ } else {
+ QDeclarativeItem::mousePressEvent(event);
+ }
+}
+
+void QDeclarativeFlickable::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeFlickable);
+ if (d->interactive) {
+ d->handleMouseMoveEvent(event);
+ if (d->stealMouse)
+ setKeepMouseGrab(true);
+ event->accept();
+ } else {
+ QDeclarativeItem::mouseMoveEvent(event);
+ }
+}
+
+void QDeclarativeFlickable::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeFlickable);
+ if (d->interactive) {
+ d->clearDelayedPress();
+ d->handleMouseReleaseEvent(event);
+ event->accept();
+ ungrabMouse();
+ } else {
+ QDeclarativeItem::mouseReleaseEvent(event);
+ }
+}
+
+void QDeclarativeFlickable::wheelEvent(QGraphicsSceneWheelEvent *event)
+{
+ Q_D(QDeclarativeFlickable);
+ if (!d->interactive) {
+ QDeclarativeItem::wheelEvent(event);
+ } else if (yflick()) {
+ if (event->delta() > 0)
+ d->vData.velocity = qMax(event->delta() - d->vData.smoothVelocity.value(), qreal(250.0));
+ else
+ d->vData.velocity = qMin(event->delta() - d->vData.smoothVelocity.value(), qreal(-250.0));
+ d->flicked = false;
+ d->flickY(d->vData.velocity);
+ event->accept();
+ } else if (xflick()) {
+ if (event->delta() > 0)
+ d->hData.velocity = qMax(event->delta() - d->hData.smoothVelocity.value(), qreal(250.0));
+ else
+ d->hData.velocity = qMin(event->delta() - d->hData.smoothVelocity.value(), qreal(-250.0));
+ d->flicked = false;
+ d->flickX(d->hData.velocity);
+ event->accept();
+ } else {
+ QDeclarativeItem::wheelEvent(event);
+ }
+}
+
+void QDeclarativeFlickablePrivate::captureDelayedPress(QGraphicsSceneMouseEvent *event)
+{
+ Q_Q(QDeclarativeFlickable);
+ if (!q->scene() || pressDelay <= 0)
+ return;
+ delayedPressTarget = q->scene()->mouseGrabberItem();
+ delayedPressEvent = new QGraphicsSceneMouseEvent(event->type());
+ delayedPressEvent->setAccepted(false);
+ for (int i = 0x1; i <= 0x10; i <<= 1) {
+ if (event->buttons() & i) {
+ Qt::MouseButton button = Qt::MouseButton(i);
+ delayedPressEvent->setButtonDownPos(button, event->buttonDownPos(button));
+ delayedPressEvent->setButtonDownScenePos(button, event->buttonDownScenePos(button));
+ delayedPressEvent->setButtonDownScreenPos(button, event->buttonDownScreenPos(button));
+ }
+ }
+ delayedPressEvent->setButtons(event->buttons());
+ delayedPressEvent->setButton(event->button());
+ delayedPressEvent->setPos(event->pos());
+ delayedPressEvent->setScenePos(event->scenePos());
+ delayedPressEvent->setScreenPos(event->screenPos());
+ delayedPressEvent->setLastPos(event->lastPos());
+ delayedPressEvent->setLastScenePos(event->lastScenePos());
+ delayedPressEvent->setLastScreenPos(event->lastScreenPos());
+ delayedPressEvent->setModifiers(event->modifiers());
+ delayedPressTimer.start(pressDelay, q);
+}
+
+void QDeclarativeFlickablePrivate::clearDelayedPress()
+{
+ if (delayedPressEvent) {
+ delayedPressTimer.stop();
+ delete delayedPressEvent;
+ delayedPressEvent = 0;
+ }
+}
+
+void QDeclarativeFlickablePrivate::setRoundedViewportX(qreal x)
+{
+ viewport->setX(qRound(x));
+}
+
+void QDeclarativeFlickablePrivate::setRoundedViewportY(qreal y)
+{
+ viewport->setY(qRound(y));
+}
+
+void QDeclarativeFlickable::timerEvent(QTimerEvent *event)
+{
+ Q_D(QDeclarativeFlickable);
+ if (event->timerId() == d->delayedPressTimer.timerId()) {
+ d->delayedPressTimer.stop();
+ if (d->delayedPressEvent) {
+ QDeclarativeItem *grabber = scene() ? qobject_cast<QDeclarativeItem*>(scene()->mouseGrabberItem()) : 0;
+ if (!grabber || grabber != this)
+ scene()->sendEvent(d->delayedPressTarget, d->delayedPressEvent);
+ delete d->delayedPressEvent;
+ d->delayedPressEvent = 0;
+ }
+ }
+}
+
+qreal QDeclarativeFlickable::minYExtent() const
+{
+ return 0.0;
+}
+
+qreal QDeclarativeFlickable::minXExtent() const
+{
+ return 0.0;
+}
+
+/* returns -ve */
+qreal QDeclarativeFlickable::maxXExtent() const
+{
+ return width() - vWidth();
+}
+/* returns -ve */
+qreal QDeclarativeFlickable::maxYExtent() const
+{
+ return height() - vHeight();
+}
+
+void QDeclarativeFlickable::viewportMoved()
+{
+ Q_D(QDeclarativeFlickable);
+
+ int elapsed = QDeclarativeItemPrivate::restart(d->velocityTime);
+ if (!elapsed)
+ return;
+
+ qreal prevY = d->lastFlickablePosition.x();
+ qreal prevX = d->lastFlickablePosition.y();
+ d->velocityTimeline.clear();
+ if (d->pressed) {
+ qreal horizontalVelocity = (prevX - d->hData.move.value()) * 1000 / elapsed;
+ qreal verticalVelocity = (prevY - d->vData.move.value()) * 1000 / elapsed;
+ d->velocityTimeline.move(d->hData.smoothVelocity, horizontalVelocity, d->reportedVelocitySmoothing);
+ d->velocityTimeline.move(d->hData.smoothVelocity, 0, d->reportedVelocitySmoothing);
+ d->velocityTimeline.move(d->vData.smoothVelocity, verticalVelocity, d->reportedVelocitySmoothing);
+ d->velocityTimeline.move(d->vData.smoothVelocity, 0, d->reportedVelocitySmoothing);
+ } else {
+ if (d->timeline.time() > d->vTime) {
+ qreal horizontalVelocity = (prevX - d->hData.move.value()) * 1000 / (d->timeline.time() - d->vTime);
+ qreal verticalVelocity = (prevY - d->vData.move.value()) * 1000 / (d->timeline.time() - d->vTime);
+ d->hData.smoothVelocity.setValue(horizontalVelocity);
+ d->vData.smoothVelocity.setValue(verticalVelocity);
+ }
+ }
+
+ d->lastFlickablePosition = QPointF(d->vData.move.value(), d->hData.move.value());
+
+ d->vTime = d->timeline.time();
+ d->updateBeginningEnd();
+}
+
+void QDeclarativeFlickable::geometryChanged(const QRectF &newGeometry,
+ const QRectF &oldGeometry)
+{
+ Q_D(QDeclarativeFlickable);
+ QDeclarativeItem::geometryChanged(newGeometry, oldGeometry);
+
+ bool changed = false;
+ if (newGeometry.width() != oldGeometry.width()) {
+ if (d->hData.viewSize < 0) {
+ d->viewport->setWidth(width());
+ emit contentWidthChanged();
+ }
+ }
+ if (newGeometry.height() != oldGeometry.height()) {
+ if (d->vData.viewSize < 0) {
+ d->viewport->setHeight(height());
+ emit contentHeightChanged();
+ }
+ }
+
+ if (changed)
+ d->updateBeginningEnd();
+}
+
+void QDeclarativeFlickable::cancelFlick()
+{
+ Q_D(QDeclarativeFlickable);
+ d->timeline.reset(d->hData.move);
+ d->timeline.reset(d->vData.move);
+ movementEnding();
+}
+
+void QDeclarativeFlickablePrivate::data_append(QDeclarativeListProperty<QObject> *prop, QObject *o)
+{
+ QDeclarativeItem *i = qobject_cast<QDeclarativeItem *>(o);
+ if (i)
+ i->setParentItem(static_cast<QDeclarativeFlickablePrivate*>(prop->data)->viewport);
+ else
+ o->setParent(prop->object);
+}
+
+QDeclarativeListProperty<QObject> QDeclarativeFlickable::flickableData()
+{
+ Q_D(QDeclarativeFlickable);
+ return QDeclarativeListProperty<QObject>(this, (void *)d, QDeclarativeFlickablePrivate::data_append);
+}
+
+QDeclarativeListProperty<QDeclarativeItem> QDeclarativeFlickable::flickableChildren()
+{
+ Q_D(QDeclarativeFlickable);
+ return d->viewport->fxChildren();
+}
+
+/*!
+ \qmlproperty bool Flickable::overShoot
+ This property holds whether the surface may overshoot the
+ Flickable's boundaries when flicked.
+
+ If overShoot is true the contents can be flicked beyond the boundary
+ of the Flickable before being moved back to the boundary. This provides
+ the feeling that the edges of the view are soft, rather than a hard
+ physical boundary.
+*/
+bool QDeclarativeFlickable::overShoot() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->overShoot;
+}
+
+void QDeclarativeFlickable::setOverShoot(bool o)
+{
+ Q_D(QDeclarativeFlickable);
+ if (d->overShoot == o)
+ return;
+ d->overShoot = o;
+ emit overShootChanged();
+}
+
+/*!
+ \qmlproperty int Flickable::contentWidth
+ \qmlproperty int Flickable::contentHeight
+
+ The dimensions of the content (the surface controlled by Flickable). Typically this
+ should be set to the combined size of the items placed in the Flickable.
+
+ \code
+ Flickable {
+ width: 320; height: 480; contentWidth: image.width; contentHeight: image.height
+ Image { id: image; source: "bigimage.png" }
+ }
+ \endcode
+*/
+qreal QDeclarativeFlickable::contentWidth() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->hData.viewSize;
+}
+
+void QDeclarativeFlickable::setContentWidth(qreal w)
+{
+ Q_D(QDeclarativeFlickable);
+ if (d->hData.viewSize == w)
+ return;
+ d->hData.viewSize = w;
+ if (w < 0)
+ d->viewport->setWidth(width());
+ else
+ d->viewport->setWidth(w);
+ // Make sure that we're entirely in view.
+ if (!d->pressed)
+ d->fixupX();
+ emit contentWidthChanged();
+ d->updateBeginningEnd();
+}
+
+qreal QDeclarativeFlickable::contentHeight() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->vData.viewSize;
+}
+
+void QDeclarativeFlickable::setContentHeight(qreal h)
+{
+ Q_D(QDeclarativeFlickable);
+ if (d->vData.viewSize == h)
+ return;
+ d->vData.viewSize = h;
+ if (h < 0)
+ d->viewport->setHeight(height());
+ else
+ d->viewport->setHeight(h);
+ // Make sure that we're entirely in view.
+ if (!d->pressed)
+ d->fixupY();
+ emit contentHeightChanged();
+ d->updateBeginningEnd();
+}
+
+qreal QDeclarativeFlickable::vWidth() const
+{
+ Q_D(const QDeclarativeFlickable);
+ if (d->hData.viewSize < 0)
+ return width();
+ else
+ return d->hData.viewSize;
+}
+
+qreal QDeclarativeFlickable::vHeight() const
+{
+ Q_D(const QDeclarativeFlickable);
+ if (d->vData.viewSize < 0)
+ return height();
+ else
+ return d->vData.viewSize;
+}
+
+bool QDeclarativeFlickable::xflick() const
+{
+ Q_D(const QDeclarativeFlickable);
+ if (d->flickDirection == QDeclarativeFlickable::AutoFlickDirection)
+ return vWidth() != width();
+ return d->flickDirection & QDeclarativeFlickable::HorizontalFlick;
+}
+
+bool QDeclarativeFlickable::yflick() const
+{
+ Q_D(const QDeclarativeFlickable);
+ if (d->flickDirection == QDeclarativeFlickable::AutoFlickDirection)
+ return vHeight() != height();
+ return d->flickDirection & QDeclarativeFlickable::VerticalFlick;
+}
+
+bool QDeclarativeFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeFlickable);
+ QGraphicsSceneMouseEvent mouseEvent(event->type());
+ QRectF myRect = mapToScene(QRectF(0, 0, width(), height())).boundingRect();
+
+ QGraphicsScene *s = scene();
+ QDeclarativeItem *grabber = s ? qobject_cast<QDeclarativeItem*>(s->mouseGrabberItem()) : 0;
+ bool stealThisEvent = d->stealMouse;
+ if ((stealThisEvent || myRect.contains(event->scenePos().toPoint())) && (!grabber || !grabber->keepMouseGrab())) {
+ mouseEvent.setAccepted(false);
+ for (int i = 0x1; i <= 0x10; i <<= 1) {
+ if (event->buttons() & i) {
+ Qt::MouseButton button = Qt::MouseButton(i);
+ mouseEvent.setButtonDownPos(button, mapFromScene(event->buttonDownPos(button)));
+ }
+ }
+ mouseEvent.setScenePos(event->scenePos());
+ mouseEvent.setLastScenePos(event->lastScenePos());
+ mouseEvent.setPos(mapFromScene(event->scenePos()));
+ mouseEvent.setLastPos(mapFromScene(event->lastScenePos()));
+
+ switch(mouseEvent.type()) {
+ case QEvent::GraphicsSceneMouseMove:
+ d->handleMouseMoveEvent(&mouseEvent);
+ break;
+ case QEvent::GraphicsSceneMousePress:
+ if (d->delayedPressEvent)
+ return false;
+
+ d->handleMousePressEvent(&mouseEvent);
+ d->captureDelayedPress(event);
+ break;
+ case QEvent::GraphicsSceneMouseRelease:
+ if (d->delayedPressEvent) {
+ scene()->sendEvent(d->delayedPressTarget, d->delayedPressEvent);
+ d->clearDelayedPress();
+ }
+ d->handleMouseReleaseEvent(&mouseEvent);
+ break;
+ default:
+ break;
+ }
+ grabber = qobject_cast<QDeclarativeItem*>(s->mouseGrabberItem());
+ if (grabber && stealThisEvent && !grabber->keepMouseGrab() && grabber != this) {
+ d->clearDelayedPress();
+ grabMouse();
+ }
+
+ return stealThisEvent || d->delayedPressEvent;
+ } else if (!d->lastPosTime.isNull()) {
+ d->lastPosTime = QTime();
+ }
+ if (mouseEvent.type() == QEvent::GraphicsSceneMouseRelease) {
+ d->clearDelayedPress();
+ d->stealMouse = false;
+ }
+ return false;
+}
+
+bool QDeclarativeFlickable::sceneEventFilter(QGraphicsItem *i, QEvent *e)
+{
+ Q_D(QDeclarativeFlickable);
+ if (!isVisible() || !d->interactive)
+ return QDeclarativeItem::sceneEventFilter(i, e);
+ switch (e->type()) {
+ case QEvent::GraphicsSceneMousePress:
+ case QEvent::GraphicsSceneMouseMove:
+ case QEvent::GraphicsSceneMouseRelease:
+ return sendMouseEvent(static_cast<QGraphicsSceneMouseEvent *>(e));
+ default:
+ break;
+ }
+
+ return QDeclarativeItem::sceneEventFilter(i, e);
+}
+
+/*!
+ \qmlproperty real Flickable::maximumFlickVelocity
+ This property holds the maximum velocity that the user can flick the view in pixels/second.
+
+ The default is 2000 pixels/s
+*/
+qreal QDeclarativeFlickable::maximumFlickVelocity() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->maxVelocity;
+}
+
+void QDeclarativeFlickable::setMaximumFlickVelocity(qreal v)
+{
+ Q_D(QDeclarativeFlickable);
+ if (v == d->maxVelocity)
+ return;
+ d->maxVelocity = v;
+ emit maximumFlickVelocityChanged();
+}
+
+/*!
+ \qmlproperty real Flickable::flickDeceleration
+ This property holds the rate at which a flick will decelerate.
+
+ The default is 500.
+*/
+qreal QDeclarativeFlickable::flickDeceleration() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->deceleration;
+}
+
+void QDeclarativeFlickable::setFlickDeceleration(qreal deceleration)
+{
+ Q_D(QDeclarativeFlickable);
+ if (deceleration == d->deceleration)
+ return;
+ d->deceleration = deceleration;
+ emit flickDecelerationChanged();
+}
+
+/*!
+ \qmlproperty bool Flickable::flicking
+
+ This property holds whether the view is currently moving due to
+ the user flicking the view.
+*/
+bool QDeclarativeFlickable::isFlicking() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->flicked;
+}
+
+/*!
+ \qmlproperty int Flickable::pressDelay
+
+ This property holds the time to delay (ms) delivering a press to
+ children of the Flickable. This can be useful where reacting
+ to a press before a flicking action has undesireable effects.
+
+ If the flickable is dragged/flicked before the delay times out
+ the press event will not be delivered. If the button is released
+ within the timeout, both the press and release will be delivered.
+*/
+int QDeclarativeFlickable::pressDelay() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->pressDelay;
+}
+
+void QDeclarativeFlickable::setPressDelay(int delay)
+{
+ Q_D(QDeclarativeFlickable);
+ if (d->pressDelay == delay)
+ return;
+ d->pressDelay = delay;
+ emit pressDelayChanged();
+}
+
+/*!
+ \qmlproperty bool Flickable::moving
+
+ This property holds whether the view is currently moving due to
+ the user either dragging or flicking the view.
+*/
+bool QDeclarativeFlickable::isMoving() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->moving;
+}
+
+void QDeclarativeFlickable::movementStarting()
+{
+ Q_D(QDeclarativeFlickable);
+ if (!d->moving) {
+ d->moving = true;
+ emit movingChanged();
+ emit movementStarted();
+ }
+}
+
+void QDeclarativeFlickable::movementEnding()
+{
+ Q_D(QDeclarativeFlickable);
+ if (d->moving) {
+ d->moving = false;
+ emit movingChanged();
+ emit movementEnded();
+ }
+ if (d->flicked) {
+ d->flicked = false;
+ emit flickingChanged();
+ emit flickEnded();
+ }
+ d->hData.smoothVelocity.setValue(0);
+ d->vData.smoothVelocity.setValue(0);
+}
+
+void QDeclarativeFlickablePrivate::updateVelocity()
+{
+ Q_Q(QDeclarativeFlickable);
+ emit q->horizontalVelocityChanged();
+ emit q->verticalVelocityChanged();
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p.h
new file mode 100644
index 0000000000..7dcab98285
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeflickable_p.h
@@ -0,0 +1,209 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEFLICKABLE_H
+#define QDECLARATIVEFLICKABLE_H
+
+#include "qdeclarativeitem.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeFlickablePrivate;
+class QDeclarativeFlickableVisibleArea;
+class Q_DECLARATIVE_EXPORT QDeclarativeFlickable : public QDeclarativeItem
+{
+ Q_OBJECT
+
+ Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth NOTIFY contentWidthChanged)
+ Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight NOTIFY contentHeightChanged)
+ Q_PROPERTY(qreal contentX READ contentX WRITE setContentX NOTIFY contentXChanged)
+ Q_PROPERTY(qreal contentY READ contentY WRITE setContentY NOTIFY contentYChanged)
+
+ Q_PROPERTY(qreal horizontalVelocity READ horizontalVelocity NOTIFY horizontalVelocityChanged)
+ Q_PROPERTY(qreal verticalVelocity READ verticalVelocity NOTIFY verticalVelocityChanged)
+
+ Q_PROPERTY(bool overShoot READ overShoot WRITE setOverShoot NOTIFY overShootChanged)
+ Q_PROPERTY(qreal maximumFlickVelocity READ maximumFlickVelocity WRITE setMaximumFlickVelocity NOTIFY maximumFlickVelocityChanged)
+ Q_PROPERTY(qreal flickDeceleration READ flickDeceleration WRITE setFlickDeceleration NOTIFY flickDecelerationChanged)
+ Q_PROPERTY(bool moving READ isMoving NOTIFY movingChanged)
+ Q_PROPERTY(bool flicking READ isFlicking NOTIFY flickingChanged)
+ Q_PROPERTY(FlickDirection flickDirection READ flickDirection WRITE setFlickDirection NOTIFY flickDirectionChanged)
+
+ Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged)
+ Q_PROPERTY(int pressDelay READ pressDelay WRITE setPressDelay NOTIFY pressDelayChanged)
+
+ Q_PROPERTY(bool atXEnd READ isAtXEnd NOTIFY isAtBoundaryChanged)
+ Q_PROPERTY(bool atYEnd READ isAtYEnd NOTIFY isAtBoundaryChanged)
+ Q_PROPERTY(bool atXBeginning READ isAtXBeginning NOTIFY isAtBoundaryChanged)
+ Q_PROPERTY(bool atYBeginning READ isAtYBeginning NOTIFY isAtBoundaryChanged)
+
+ Q_PROPERTY(QDeclarativeFlickableVisibleArea *visibleArea READ visibleArea CONSTANT)
+
+ Q_PROPERTY(QDeclarativeListProperty<QObject> flickableData READ flickableData)
+ Q_PROPERTY(QDeclarativeListProperty<QDeclarativeItem> flickableChildren READ flickableChildren)
+ Q_CLASSINFO("DefaultProperty", "flickableData")
+
+ Q_ENUMS(FlickDirection)
+
+public:
+ QDeclarativeFlickable(QDeclarativeItem *parent=0);
+ ~QDeclarativeFlickable();
+
+ QDeclarativeListProperty<QObject> flickableData();
+ QDeclarativeListProperty<QDeclarativeItem> flickableChildren();
+
+ bool overShoot() const;
+ void setOverShoot(bool);
+
+ qreal contentWidth() const;
+ void setContentWidth(qreal);
+
+ qreal contentHeight() const;
+ void setContentHeight(qreal);
+
+ qreal contentX() const;
+ void setContentX(qreal pos);
+
+ qreal contentY() const;
+ void setContentY(qreal pos);
+
+ bool isMoving() const;
+ bool isFlicking() const;
+
+ int pressDelay() const;
+ void setPressDelay(int delay);
+
+ qreal maximumFlickVelocity() const;
+ void setMaximumFlickVelocity(qreal);
+
+ qreal flickDeceleration() const;
+ void setFlickDeceleration(qreal);
+
+ bool isInteractive() const;
+ void setInteractive(bool);
+
+ qreal horizontalVelocity() const;
+ qreal verticalVelocity() const;
+
+ bool isAtXEnd() const;
+ bool isAtXBeginning() const;
+ bool isAtYEnd() const;
+ bool isAtYBeginning() const;
+
+ QDeclarativeItem *viewport();
+
+ enum FlickDirection { AutoFlickDirection=0x00, HorizontalFlick=0x01, VerticalFlick=0x02, HorizontalAndVerticalFlick=0x03 };
+ FlickDirection flickDirection() const;
+ void setFlickDirection(FlickDirection);
+
+Q_SIGNALS:
+ void contentWidthChanged();
+ void contentHeightChanged();
+ void contentXChanged();
+ void contentYChanged();
+ void movingChanged();
+ void flickingChanged();
+ void movementStarted();
+ void movementEnded();
+ void flickStarted();
+ void flickEnded();
+ void horizontalVelocityChanged();
+ void verticalVelocityChanged();
+ void isAtBoundaryChanged();
+ void pageChanged();
+ void flickDirectionChanged();
+ void interactiveChanged();
+ void overShootChanged();
+ void maximumFlickVelocityChanged();
+ void flickDecelerationChanged();
+ void pressDelayChanged();
+
+protected:
+ virtual bool sceneEventFilter(QGraphicsItem *, QEvent *);
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+ void wheelEvent(QGraphicsSceneWheelEvent *event);
+ void timerEvent(QTimerEvent *event);
+
+ QDeclarativeFlickableVisibleArea *visibleArea();
+
+protected Q_SLOTS:
+ virtual void ticked();
+ void movementStarting();
+ void movementEnding();
+
+protected:
+ virtual qreal minXExtent() const;
+ virtual qreal minYExtent() const;
+ virtual qreal maxXExtent() const;
+ virtual qreal maxYExtent() const;
+ qreal vWidth() const;
+ qreal vHeight() const;
+ virtual void viewportMoved();
+ virtual void geometryChanged(const QRectF &newGeometry,
+ const QRectF &oldGeometry);
+ bool sendMouseEvent(QGraphicsSceneMouseEvent *event);
+
+ bool xflick() const;
+ bool yflick() const;
+ void cancelFlick();
+
+protected:
+ QDeclarativeFlickable(QDeclarativeFlickablePrivate &dd, QDeclarativeItem *parent);
+
+private:
+ Q_DISABLE_COPY(QDeclarativeFlickable)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeFlickable)
+ friend class QDeclarativeFlickableVisibleArea;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeFlickable)
+
+QT_END_HEADER
+
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
new file mode 100644
index 0000000000..c963c2bd9e
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
@@ -0,0 +1,206 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEFLICKABLE_P_H
+#define QDECLARATIVEFLICKABLE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeflickable_p.h"
+
+#include "qdeclarativeitem_p.h"
+#include "qdeclarativeitemchangelistener_p.h"
+
+#include <qdeclarative.h>
+#include <qdeclarativetimeline_p_p.h>
+#include <qdeclarativeanimation_p_p.h>
+
+#include <qdatetime.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeFlickableVisibleArea;
+class QDeclarativeFlickablePrivate : public QDeclarativeItemPrivate, public QDeclarativeItemChangeListener
+{
+ Q_DECLARE_PUBLIC(QDeclarativeFlickable)
+
+public:
+ QDeclarativeFlickablePrivate();
+ void init();
+
+ struct Velocity : public QDeclarativeTimeLineValue
+ {
+ Velocity(QDeclarativeFlickablePrivate *p)
+ : parent(p) {}
+ virtual void setValue(qreal v) {
+ if (v != value()) {
+ QDeclarativeTimeLineValue::setValue(v);
+ parent->updateVelocity();
+ }
+ }
+ QDeclarativeFlickablePrivate *parent;
+ };
+
+ struct AxisData {
+ AxisData(QDeclarativeFlickablePrivate *fp, void (QDeclarativeFlickablePrivate::*func)(qreal))
+ : move(fp, func), viewSize(-1), smoothVelocity(fp), atEnd(false), atBeginning(true)
+ {}
+
+ QDeclarativeTimeLineValueProxy<QDeclarativeFlickablePrivate> move;
+ qreal viewSize;
+ qreal pressPos;
+ qreal velocity;
+ qreal flickTarget;
+ QDeclarativeFlickablePrivate::Velocity smoothVelocity;
+ bool atEnd : 1;
+ bool atBeginning : 1;
+ };
+
+ void flickX(qreal velocity);
+ void flickY(qreal velocity);
+ virtual void flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize,
+ QDeclarativeTimeLineCallback::Callback fixupCallback, qreal velocity);
+
+ void fixupX();
+ void fixupY();
+ virtual void fixup(AxisData &data, qreal minExtent, qreal maxExtent);
+
+ void updateBeginningEnd();
+
+ void captureDelayedPress(QGraphicsSceneMouseEvent *event);
+ void clearDelayedPress();
+
+ void setRoundedViewportX(qreal x);
+ void setRoundedViewportY(qreal y);
+
+ qreal overShootDistance(qreal velocity, qreal size);
+
+ void itemGeometryChanged(QDeclarativeItem *, const QRectF &, const QRectF &);
+
+public:
+ QDeclarativeItem *viewport;
+
+ AxisData hData;
+ AxisData vData;
+
+ QDeclarativeTimeLine timeline;
+ bool overShoot : 1;
+ bool flicked : 1;
+ bool moving : 1;
+ bool stealMouse : 1;
+ bool pressed : 1;
+ bool interactive : 1;
+ QTime lastPosTime;
+ QPointF lastPos;
+ QPointF pressPos;
+ QTime pressTime;
+ qreal deceleration;
+ qreal maxVelocity;
+ QTime velocityTime;
+ QPointF lastFlickablePosition;
+ qreal reportedVelocitySmoothing;
+ QGraphicsSceneMouseEvent *delayedPressEvent;
+ QGraphicsItem *delayedPressTarget;
+ QBasicTimer delayedPressTimer;
+ int pressDelay;
+ int fixupDuration;
+
+ static void fixupY_callback(void *);
+ static void fixupX_callback(void *);
+
+ void updateVelocity();
+ int vTime;
+ QDeclarativeTimeLine velocityTimeline;
+ QDeclarativeFlickableVisibleArea *visibleArea;
+ QDeclarativeFlickable::FlickDirection flickDirection;
+
+ void handleMousePressEvent(QGraphicsSceneMouseEvent *);
+ void handleMouseMoveEvent(QGraphicsSceneMouseEvent *);
+ void handleMouseReleaseEvent(QGraphicsSceneMouseEvent *);
+
+ // flickableData property
+ static void data_append(QDeclarativeListProperty<QObject> *, QObject *);
+};
+
+class QDeclarativeFlickableVisibleArea : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(qreal xPosition READ xPosition NOTIFY pageChanged)
+ Q_PROPERTY(qreal yPosition READ yPosition NOTIFY pageChanged)
+ Q_PROPERTY(qreal widthRatio READ widthRatio NOTIFY pageChanged)
+ Q_PROPERTY(qreal heightRatio READ heightRatio NOTIFY pageChanged)
+
+public:
+ QDeclarativeFlickableVisibleArea(QDeclarativeFlickable *parent=0);
+
+ qreal xPosition() const;
+ qreal widthRatio() const;
+ qreal yPosition() const;
+ qreal heightRatio() const;
+
+ void updateVisible();
+
+signals:
+ void pageChanged();
+
+private:
+ QDeclarativeFlickable *flickable;
+ qreal m_xPosition;
+ qreal m_widthRatio;
+ qreal m_yPosition;
+ qreal m_heightRatio;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeFlickableVisibleArea)
+
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
new file mode 100644
index 0000000000..1ebbaee29e
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
@@ -0,0 +1,213 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeflipable_p.h"
+
+#include "qdeclarativeitem_p.h"
+
+#include <qdeclarativeinfo.h>
+
+#include <QtGui/qgraphicstransform.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeFlipablePrivate : public QDeclarativeItemPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeFlipable)
+public:
+ QDeclarativeFlipablePrivate() : current(QDeclarativeFlipable::Front), front(0), back(0) {}
+
+ void updateSceneTransformFromParent();
+
+ QDeclarativeFlipable::Side current;
+ QDeclarativeItem *front;
+ QDeclarativeItem *back;
+};
+
+/*!
+ \qmlclass Flipable QDeclarativeFlipable
+ \since 4.7
+ \brief The Flipable item provides a surface that can be flipped.
+ \inherits Item
+
+ Flipable is an item that can be visibly "flipped" between its front and
+ back sides. It is used together with Rotation and State/Transition to
+ produce a flipping effect.
+
+ Here is a Flipable that flips whenever it is clicked:
+
+ \snippet examples/declarative/flipable/flipable.qml 0
+
+ \image flipable.gif
+
+ The Rotation element is used to specify the angle and axis of the flip,
+ and the State defines the changes in angle which produce the flipping
+ effect. Finally, the Transition creates the animation that changes the
+ angle over one second.
+*/
+
+/*!
+ \internal
+ \class QDeclarativeFlipable
+ \brief The Flipable item provides a surface that can be flipped.
+
+ \ingroup group_widgets
+
+ Flipable is an item that can be visibly "flipped" between its front and
+ back sides.
+*/
+
+QDeclarativeFlipable::QDeclarativeFlipable(QDeclarativeItem *parent)
+: QDeclarativeItem(*(new QDeclarativeFlipablePrivate), parent)
+{
+}
+
+QDeclarativeFlipable::~QDeclarativeFlipable()
+{
+}
+
+/*!
+ \qmlproperty Item Flipable::front
+ \qmlproperty Item Flipable::back
+
+ The front and back sides of the flipable.
+*/
+
+QDeclarativeItem *QDeclarativeFlipable::front()
+{
+ Q_D(const QDeclarativeFlipable);
+ return d->front;
+}
+
+void QDeclarativeFlipable::setFront(QDeclarativeItem *front)
+{
+ Q_D(QDeclarativeFlipable);
+ if (d->front) {
+ qmlInfo(this) << tr("front is a write-once property");
+ return;
+ }
+ d->front = front;
+ d->front->setParentItem(this);
+ if (Back == d->current)
+ d->front->setOpacity(0.);
+}
+
+QDeclarativeItem *QDeclarativeFlipable::back()
+{
+ Q_D(const QDeclarativeFlipable);
+ return d->back;
+}
+
+void QDeclarativeFlipable::setBack(QDeclarativeItem *back)
+{
+ Q_D(QDeclarativeFlipable);
+ if (d->back) {
+ qmlInfo(this) << tr("back is a write-once property");
+ return;
+ }
+ d->back = back;
+ d->back->setParentItem(this);
+ if (Front == d->current)
+ d->back->setOpacity(0.);
+}
+
+/*!
+ \qmlproperty enumeration Flipable::side
+
+ The side of the Flippable currently visible. Possible values are \c
+ Front and \c Back.
+*/
+QDeclarativeFlipable::Side QDeclarativeFlipable::side() const
+{
+ Q_D(const QDeclarativeFlipable);
+ if (d->dirtySceneTransform)
+ const_cast<QDeclarativeFlipablePrivate *>(d)->updateSceneTransformFromParent();
+
+ return d->current;
+}
+
+// determination on the currently visible side of the flipable
+// has to be done on the complete scene transform to give
+// correct results.
+void QDeclarativeFlipablePrivate::updateSceneTransformFromParent()
+{
+ Q_Q(QDeclarativeFlipable);
+
+ QDeclarativeItemPrivate::updateSceneTransformFromParent();
+ QPointF p1(0, 0);
+ QPointF p2(1, 0);
+ QPointF p3(1, 1);
+
+ p1 = sceneTransform.map(p1);
+ p2 = sceneTransform.map(p2);
+ p3 = sceneTransform.map(p3);
+
+ qreal cross = (p1.x() - p2.x()) * (p3.y() - p2.y()) -
+ (p1.y() - p2.y()) * (p3.x() - p2.x());
+
+ QDeclarativeFlipable::Side newSide;
+ if (cross > 0) {
+ newSide = QDeclarativeFlipable::Back;
+ } else {
+ newSide = QDeclarativeFlipable::Front;
+ }
+
+ if (newSide != current) {
+ current = newSide;
+ if (current == QDeclarativeFlipable::Back) {
+ QTransform mat;
+ mat.translate(back->width()/2,back->height()/2);
+ if (back->width() && p1.x() >= p2.x())
+ mat.rotate(180, Qt::YAxis);
+ if (back->height() && p2.y() >= p3.y())
+ mat.rotate(180, Qt::XAxis);
+ mat.translate(-back->width()/2,-back->height()/2);
+ back->setTransform(mat);
+ }
+ if (front)
+ front->setOpacity((current==QDeclarativeFlipable::Front)?1.:0.);
+ if (back)
+ back->setOpacity((current==QDeclarativeFlipable::Back)?1.:0.);
+ emit q->sideChanged();
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativeflipable_p.h b/src/declarative/graphicsitems/qdeclarativeflipable_p.h
new file mode 100644
index 0000000000..8b9c24c520
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeflipable_p.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEFLIPABLE_H
+#define QDECLARATIVEFLIPABLE_H
+
+#include "qdeclarativeitem.h"
+
+#include <QtCore/QObject>
+#include <QtGui/QTransform>
+#include <QtGui/qvector3d.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeFlipablePrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeFlipable : public QDeclarativeItem
+{
+ Q_OBJECT
+
+ Q_ENUMS(Side)
+ Q_PROPERTY(QDeclarativeItem *front READ front WRITE setFront)
+ Q_PROPERTY(QDeclarativeItem *back READ back WRITE setBack)
+ Q_PROPERTY(Side side READ side NOTIFY sideChanged)
+ //### flipAxis
+ //### flipRotation
+public:
+ QDeclarativeFlipable(QDeclarativeItem *parent=0);
+ ~QDeclarativeFlipable();
+
+ QDeclarativeItem *front();
+ void setFront(QDeclarativeItem *);
+
+ QDeclarativeItem *back();
+ void setBack(QDeclarativeItem *);
+
+ enum Side { Front, Back };
+ Side side() const;
+
+Q_SIGNALS:
+ void sideChanged();
+
+private:
+ Q_DISABLE_COPY(QDeclarativeFlipable)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeFlipable)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeFlipable)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEFLIPABLE_H
diff --git a/src/declarative/graphicsitems/qdeclarativefocuspanel.cpp b/src/declarative/graphicsitems/qdeclarativefocuspanel.cpp
new file mode 100644
index 0000000000..0323a5981a
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativefocuspanel.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativefocuspanel_p.h"
+
+#include <QtGui/qgraphicsscene.h>
+#include <QEvent>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \qmlclass FocusPanel QDeclarativeFocusPanel
+ \since 4.7
+ \brief The FocusPanel item explicitly creates a focus panel.
+ \inherits Item
+
+ Focus panels assist in keyboard focus handling when building QML
+ applications. All the details are covered in the
+ \l {qmlfocus}{keyboard focus documentation}.
+*/
+
+/*!
+ \internal
+ \class QDeclarativeFocusPanel
+*/
+
+QDeclarativeFocusPanel::QDeclarativeFocusPanel(QDeclarativeItem *parent) :
+ QDeclarativeItem(parent)
+{
+ setFlag(ItemIsPanel);
+}
+
+QDeclarativeFocusPanel::~QDeclarativeFocusPanel()
+{
+}
+
+/*!
+ \qmlproperty bool FocusPanel::active
+
+ Sets whether the item is the active focus panel.
+*/
+
+bool QDeclarativeFocusPanel::sceneEvent(QEvent *event)
+{
+ if (event->type() == QEvent::WindowActivate ||
+ event->type() == QEvent::WindowDeactivate)
+ emit activeChanged();
+ return QDeclarativeItem::sceneEvent(event);
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativefocuspanel_p.h b/src/declarative/graphicsitems/qdeclarativefocuspanel_p.h
new file mode 100644
index 0000000000..1ad8b6e674
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativefocuspanel_p.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEFOCUSPANEL_H
+#define QDECLARATIVEFOCUSPANEL_H
+
+#include "qdeclarativeitem.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class Q_DECLARATIVE_EXPORT QDeclarativeFocusPanel : public QDeclarativeItem
+{
+ Q_OBJECT
+ Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged)
+public:
+ QDeclarativeFocusPanel(QDeclarativeItem *parent=0);
+ virtual ~QDeclarativeFocusPanel();
+
+Q_SIGNALS:
+ void activeChanged();
+
+protected:
+ bool sceneEvent(QEvent *event);
+
+private:
+ Q_DISABLE_COPY(QDeclarativeFocusPanel)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeFocusPanel)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEFOCUSPANEL_H
diff --git a/src/declarative/graphicsitems/qdeclarativefocusscope.cpp b/src/declarative/graphicsitems/qdeclarativefocusscope.cpp
new file mode 100644
index 0000000000..384a47b414
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativefocusscope.cpp
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativefocusscope_p.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \qmlclass FocusScope QDeclarativeFocusScope
+ \since 4.7
+ \brief The FocusScope object explicitly creates a focus scope.
+ \inherits Item
+
+ Focus scopes assist in keyboard focus handling when building reusable QML
+ components. All the details are covered in the
+ \l {qmlfocus}{keyboard focus documentation}.
+*/
+
+/*!
+ \internal
+ \class QDeclarativeFocusScope
+*/
+
+QDeclarativeFocusScope::QDeclarativeFocusScope(QDeclarativeItem *parent) :
+ QDeclarativeItem(parent)
+{
+ setFlag(QGraphicsItem::ItemIsFocusScope);
+}
+
+QDeclarativeFocusScope::~QDeclarativeFocusScope()
+{
+}
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativefocusscope_p.h b/src/declarative/graphicsitems/qdeclarativefocusscope_p.h
new file mode 100644
index 0000000000..cd480b4f95
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativefocusscope_p.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEFOCUSSCOPE_H
+#define QDECLARATIVEFOCUSSCOPE_H
+
+#include "qdeclarativeitem.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+//### set component root as focusscope
+class Q_DECLARATIVE_EXPORT QDeclarativeFocusScope : public QDeclarativeItem
+{
+ Q_OBJECT
+public:
+ QDeclarativeFocusScope(QDeclarativeItem *parent=0);
+ virtual ~QDeclarativeFocusScope();
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeFocusScope)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEFOCUSSCOPE_H
diff --git a/src/declarative/graphicsitems/qdeclarativegraphicsobjectcontainer.cpp b/src/declarative/graphicsitems/qdeclarativegraphicsobjectcontainer.cpp
new file mode 100644
index 0000000000..1977817796
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativegraphicsobjectcontainer.cpp
@@ -0,0 +1,269 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativegraphicsobjectcontainer_p.h"
+
+#include "qdeclarativeitem_p.h"
+
+#include <QGraphicsObject>
+#include <QGraphicsWidget>
+#include <QGraphicsSceneResizeEvent>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeGraphicsObjectContainerPrivate : public QDeclarativeItemPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeGraphicsObjectContainer)
+
+public:
+ QDeclarativeGraphicsObjectContainerPrivate() : QDeclarativeItemPrivate(), graphicsObject(0), syncedResize(false)
+ { }
+
+ void _q_updateSize();
+
+ void setFiltering(bool on)
+ {
+ Q_Q(QDeclarativeGraphicsObjectContainer);
+ if (graphicsObject && graphicsObject->isWidget()) {
+ if (!on) {
+ graphicsObject->removeEventFilter(q);
+ QObject::disconnect(q, SIGNAL(widthChanged()), q, SLOT(_q_updateSize()));
+ QObject::disconnect(q, SIGNAL(heightChanged()), q, SLOT(_q_updateSize()));
+ } else {
+ graphicsObject->installEventFilter(q);
+ QObject::connect(q, SIGNAL(widthChanged()), q, SLOT(_q_updateSize()));
+ QObject::connect(q, SIGNAL(heightChanged()), q, SLOT(_q_updateSize()));
+ }
+ }
+ }
+
+
+ QGraphicsObject *graphicsObject;
+ bool syncedResize;
+};
+
+
+/*!
+ \qmlclass GraphicsObjectContainer QDeclarativeGraphicsObjectContainer
+ \since 4.7
+ \brief The GraphicsObjectContainer element allows you to add QGraphicsObjects into Fluid UI elements.
+
+ While any QObject based class can be exposed to QML, QDeclarativeItem
+ provides a lot of important functionality, including anchors and proper
+ management of child items. GraphicsObjectContainer helps provide these
+ functions to other QGraphicsObjects, so that they can be used unaltered in
+ a QML scene. QGraphicsObjects, which are not QDeclarativeItems, and which are
+ placed in a QML scene outside of a GraphicsObjectContainer, will not appear
+ on screen at all.
+
+ A GraphicsObjectContainer can have one element inside it, and it must be a
+ QGraphicsObject or subclass which has been exposed to the QML engine.
+ The graphics object inside the GraphicsObjectContainer can then be used
+ like any other item in QML with the exception of not being reparentable
+ and not having the standard properties of QML items (such as anchors).
+
+ As the contained object is positioned relative to the container, anchors
+ affecting the container item will affect the onscreen position of the
+ contained item. If synchronizedResizing is set to true, then anchors
+ affecting the container item's size will also affect the contained item's
+ size.
+
+ Example:
+ \code
+ import Qt 4.6
+ import MyApp 2.1 as Widgets
+ Rectangle{
+ id: rect
+ property alias widgetPropertyThree: widget.myThirdProperty;
+ GraphicsObjectContainer{
+ synchronizedResizing: true
+ anchors.margins: 10
+ anchors.fill: parent
+ Widgets.MyWidget{
+ myProperty: "A Value"
+ myOtherProperty: rect.color
+ }
+ }
+ }
+ \endcode
+*/
+
+/*!
+ \internal
+ \class QDeclarativeGraphicsObjectContainer
+ \brief The QDeclarativeGraphicsObjectContainer class allows you to add QGraphicsObjects into Fluid UI applications.
+*/
+
+QDeclarativeGraphicsObjectContainer::QDeclarativeGraphicsObjectContainer(QDeclarativeItem *parent)
+: QDeclarativeItem(*new QDeclarativeGraphicsObjectContainerPrivate, parent)
+{
+}
+
+QDeclarativeGraphicsObjectContainer::~QDeclarativeGraphicsObjectContainer()
+{
+}
+
+QGraphicsObject *QDeclarativeGraphicsObjectContainer::graphicsObject() const
+{
+ Q_D(const QDeclarativeGraphicsObjectContainer);
+ return d->graphicsObject;
+}
+
+/*!
+ \qmlproperty QGraphicsObject GraphicsObjectContainer::graphicsObject
+ The QGraphicsObject associated with this element.
+*/
+void QDeclarativeGraphicsObjectContainer::setGraphicsObject(QGraphicsObject *object)
+{
+ Q_D(QDeclarativeGraphicsObjectContainer);
+ if (object == d->graphicsObject)
+ return;
+
+ //### remove previously set item?
+
+ d->setFiltering(false);
+
+ d->graphicsObject = object;
+
+ if (d->graphicsObject) {
+ d->graphicsObject->setParentItem(this);
+
+ if (d->syncedResize && d->graphicsObject->isWidget()) {
+ QGraphicsWidget *gw = static_cast<QGraphicsWidget*>(d->graphicsObject);
+ QSizeF gwSize = gw->size(); //### should we use sizeHint?
+ QSizeF newSize = gwSize;
+ if (heightValid())
+ newSize.setHeight(height());
+ if (widthValid())
+ newSize.setWidth(width());
+ if (gwSize != newSize)
+ gw->resize(newSize);
+
+ gwSize = gw->size();
+ setImplicitWidth(gwSize.width());
+ setImplicitHeight(gwSize.height());
+
+ d->setFiltering(true);
+ }
+ }
+}
+
+QVariant QDeclarativeGraphicsObjectContainer::itemChange(GraphicsItemChange change, const QVariant &value)
+{
+ Q_D(QDeclarativeGraphicsObjectContainer);
+ if (change == ItemSceneHasChanged) {
+ QGraphicsObject *o = d->graphicsObject;
+ d->graphicsObject = 0;
+ setGraphicsObject(o);
+ }
+ return QDeclarativeItem::itemChange(change, value);
+}
+
+bool QDeclarativeGraphicsObjectContainer::eventFilter(QObject *watched, QEvent *e)
+{
+ Q_D(QDeclarativeGraphicsObjectContainer);
+ if (watched == d->graphicsObject && e->type() == QEvent::GraphicsSceneResize) {
+ if (d->graphicsObject && d->graphicsObject->isWidget() && d->syncedResize) {
+ QSizeF newSize = static_cast<QGraphicsWidget*>(d->graphicsObject)->size();
+ setImplicitWidth(newSize.width());
+ setImplicitHeight(newSize.height());
+ }
+ }
+ return QDeclarativeItem::eventFilter(watched, e);
+}
+
+/*!
+ \qmlproperty bool GraphicsObjectContainer::synchronizedResizing
+
+ This property determines whether or not the container and graphics object will synchronize their
+ sizes.
+
+ \note This property only applies when wrapping a QGraphicsWidget.
+
+ If synchronizedResizing is enabled, the container and widget will
+ synchronize their sizes as follows.
+ \list
+ \o If a size has been set on the container, the widget will be resized to the container.
+ Any changes in the container's size will be reflected in the widget.
+
+ \o \e Otherwise, the container will initially be sized to the preferred size of the widget.
+ Any changes to the container's size will be reflected in the widget, and any changes to the
+ widget's size will be reflected in the container.
+ \endlist
+*/
+bool QDeclarativeGraphicsObjectContainer::synchronizedResizing() const
+{
+ Q_D(const QDeclarativeGraphicsObjectContainer);
+ return d->syncedResize;
+}
+
+void QDeclarativeGraphicsObjectContainer::setSynchronizedResizing(bool on)
+{
+ Q_D(QDeclarativeGraphicsObjectContainer);
+ if (on == d->syncedResize)
+ return;
+
+ d->syncedResize = on;
+ d->setFiltering(on);
+}
+
+void QDeclarativeGraphicsObjectContainerPrivate::_q_updateSize()
+{
+ if (!graphicsObject || !graphicsObject->isWidget() || !syncedResize)
+ return;
+
+ QGraphicsWidget *gw = static_cast<QGraphicsWidget*>(graphicsObject);
+ const QSizeF newSize(width, height);
+ gw->resize(newSize);
+
+ //### will respecting the widgets min/max ever get us in trouble? (all other items always
+ // size to exactly what you tell them)
+ /*QSizeF constrainedSize = newSize.expandedTo(gw->minimumSize()).boundedTo(gw->maximumSize());
+ gw->resize(constrainedSize);
+ if (constrainedSize != newSize) {
+ setImplicitWidth(constrainedSize.width());
+ setImplicitHeight(constrainedSize.height());
+ }*/
+}
+
+#include <moc_qdeclarativegraphicsobjectcontainer_p.cpp>
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativegraphicsobjectcontainer_p.h b/src/declarative/graphicsitems/qdeclarativegraphicsobjectcontainer_p.h
new file mode 100644
index 0000000000..95d7a4b1b7
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativegraphicsobjectcontainer_p.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEGRAPHICSOBJECTCONTAINER_H
+#define QDECLARATIVEGRAPHICSOBJECTCONTAINER_H
+
+#include "qdeclarativeitem.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QGraphicsObject;
+class QDeclarativeGraphicsObjectContainerPrivate;
+
+class Q_DECLARATIVE_EXPORT QDeclarativeGraphicsObjectContainer : public QDeclarativeItem
+{
+ Q_OBJECT
+
+ Q_CLASSINFO("DefaultProperty", "graphicsObject")
+ Q_PROPERTY(QGraphicsObject *graphicsObject READ graphicsObject WRITE setGraphicsObject)
+ Q_PROPERTY(bool synchronizedResizing READ synchronizedResizing WRITE setSynchronizedResizing)
+
+public:
+ QDeclarativeGraphicsObjectContainer(QDeclarativeItem *parent = 0);
+ ~QDeclarativeGraphicsObjectContainer();
+
+ QGraphicsObject *graphicsObject() const;
+ void setGraphicsObject(QGraphicsObject *);
+
+ bool synchronizedResizing() const;
+ void setSynchronizedResizing(bool on);
+
+protected:
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value);
+ bool eventFilter(QObject *watched, QEvent *e);
+
+private:
+ Q_PRIVATE_SLOT(d_func(), void _q_updateSize())
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeGraphicsObjectContainer)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QGraphicsObject)
+QML_DECLARE_TYPE(QDeclarativeGraphicsObjectContainer)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEGRAPHICSOBJECTCONTAINER_H
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
new file mode 100644
index 0000000000..60ffbe249f
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -0,0 +1,2105 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativegridview_p.h"
+
+#include "qdeclarativevisualitemmodel_p.h"
+#include "qdeclarativeflickable_p_p.h"
+
+#include <qdeclarativeeasefollow_p.h>
+#include <qdeclarativeguard_p.h>
+
+#include <qlistmodelinterface_p.h>
+#include <QKeyEvent>
+
+#include <math.h>
+
+QT_BEGIN_NAMESPACE
+
+
+//----------------------------------------------------------------------------
+
+class FxGridItem
+{
+public:
+ FxGridItem(QDeclarativeItem *i, QDeclarativeGridView *v) : item(i), view(v) {
+ attached = static_cast<QDeclarativeGridViewAttached*>(qmlAttachedPropertiesObject<QDeclarativeGridView>(item));
+ if (attached)
+ attached->m_view = view;
+ }
+ ~FxGridItem() {}
+
+ qreal rowPos() const { return (view->flow() == QDeclarativeGridView::LeftToRight ? item->y() : item->x()); }
+ qreal colPos() const { return (view->flow() == QDeclarativeGridView::LeftToRight ? item->x() : item->y()); }
+ qreal endRowPos() const {
+ return view->flow() == QDeclarativeGridView::LeftToRight
+ ? item->y() + view->cellHeight() - 1
+ : item->x() + view->cellWidth() - 1;
+ }
+ void setPosition(qreal col, qreal row) {
+ if (view->flow() == QDeclarativeGridView::LeftToRight) {
+ item->setPos(QPointF(col, row));
+ } else {
+ item->setPos(QPointF(row, col));
+ }
+ }
+
+ QDeclarativeItem *item;
+ QDeclarativeGridView *view;
+ QDeclarativeGridViewAttached *attached;
+ int index;
+};
+
+//----------------------------------------------------------------------------
+
+class QDeclarativeGridViewPrivate : public QDeclarativeFlickablePrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeGridView)
+
+public:
+ QDeclarativeGridViewPrivate()
+ : currentItem(0), flow(QDeclarativeGridView::LeftToRight)
+ , visiblePos(0), visibleIndex(0) , currentIndex(-1)
+ , cellWidth(100), cellHeight(100), columns(1), requestedIndex(-1)
+ , highlightRangeStart(0), highlightRangeEnd(0), highlightRange(QDeclarativeGridView::NoHighlightRange)
+ , highlightComponent(0), highlight(0), trackedItem(0)
+ , moveReason(Other), buffer(0), highlightXAnimator(0), highlightYAnimator(0)
+ , bufferMode(NoBuffer), snapMode(QDeclarativeGridView::NoSnap)
+ , ownModel(false), wrap(false), autoHighlight(true)
+ , fixCurrentVisibility(false), lazyRelease(false), layoutScheduled(false)
+ , deferredRelease(false), haveHighlightRange(false) {}
+
+ void init();
+ void clear();
+ FxGridItem *createItem(int modelIndex);
+ void releaseItem(FxGridItem *item);
+ void refill(qreal from, qreal to, bool doBuffer=false);
+
+ void updateGrid();
+ void scheduleLayout();
+ void layout(bool removed=false);
+ void updateUnrequestedIndexes();
+ void updateUnrequestedPositions();
+ void updateTrackedItem();
+ void createHighlight();
+ void updateHighlight();
+ void updateCurrent(int modelIndex);
+ void fixupPosition();
+
+ FxGridItem *visibleItem(int modelIndex) const {
+ if (modelIndex >= visibleIndex && modelIndex < visibleIndex + visibleItems.count()) {
+ for (int i = modelIndex - visibleIndex; i < visibleItems.count(); ++i) {
+ FxGridItem *item = visibleItems.at(i);
+ if (item->index == modelIndex)
+ return item;
+ }
+ }
+ return 0;
+ }
+
+ qreal position() const {
+ Q_Q(const QDeclarativeGridView);
+ return flow == QDeclarativeGridView::LeftToRight ? q->contentY() : q->contentX();
+ }
+ void setPosition(qreal pos) {
+ Q_Q(QDeclarativeGridView);
+ if (flow == QDeclarativeGridView::LeftToRight)
+ q->setContentY(pos);
+ else
+ q->setContentX(pos);
+ }
+ int size() const {
+ Q_Q(const QDeclarativeGridView);
+ return flow == QDeclarativeGridView::LeftToRight ? q->height() : q->width();
+ }
+ qreal startPosition() const {
+ qreal pos = 0;
+ if (!visibleItems.isEmpty())
+ pos = visibleItems.first()->rowPos() - visibleIndex / columns * rowSize();
+ return pos;
+ }
+
+ qreal endPosition() const {
+ qreal pos = 0;
+ if (model && model->count())
+ pos = rowPosAt(model->count() - 1) + rowSize();
+ return pos;
+ }
+
+ bool isValid() const {
+ return model && model->count() && model->isValid();
+ }
+
+ int rowSize() const {
+ return flow == QDeclarativeGridView::LeftToRight ? cellHeight : cellWidth;
+ }
+ int colSize() const {
+ return flow == QDeclarativeGridView::LeftToRight ? cellWidth : cellHeight;
+ }
+
+ qreal colPosAt(int modelIndex) const {
+ if (FxGridItem *item = visibleItem(modelIndex))
+ return item->colPos();
+ if (!visibleItems.isEmpty()) {
+ if (modelIndex < visibleIndex) {
+ int count = (visibleIndex - modelIndex) % columns;
+ int col = visibleItems.first()->colPos() / colSize();
+ col = (columns - count + col) % columns;
+ return col * colSize();
+ } else {
+ int count = columns - 1 - (modelIndex - visibleItems.last()->index - 1) % columns;
+ return visibleItems.last()->colPos() - count * colSize();
+ }
+ } else {
+ return (modelIndex % columns) * colSize();
+ }
+ return 0;
+ }
+ qreal rowPosAt(int modelIndex) const {
+ if (FxGridItem *item = visibleItem(modelIndex))
+ return item->rowPos();
+ if (!visibleItems.isEmpty()) {
+ if (modelIndex < visibleIndex) {
+ int firstCol = visibleItems.first()->colPos() / colSize();
+ int col = visibleIndex - modelIndex + (columns - firstCol - 1);
+ int rows = col / columns;
+ return visibleItems.first()->rowPos() - rows * rowSize();
+ } else {
+ int count = modelIndex - visibleItems.last()->index;
+ int col = visibleItems.last()->colPos() + count * colSize();
+ int rows = col / (columns * colSize());
+ return visibleItems.last()->rowPos() + rows * rowSize();
+ }
+ } else {
+ return (modelIndex / columns) * rowSize();
+ }
+ return 0;
+ }
+
+ FxGridItem *firstVisibleItem() const {
+ const qreal pos = position();
+ for (int i = 0; i < visibleItems.count(); ++i) {
+ FxGridItem *item = visibleItems.at(i);
+ if (item->index != -1 && item->endRowPos() > pos)
+ return item;
+ }
+ return visibleItems.count() ? visibleItems.first() : 0;
+ }
+
+ // Map a model index to visibleItems list index.
+ // These may differ if removed items are still present in the visible list,
+ // e.g. doing a removal animation
+ int mapFromModel(int modelIndex) const {
+ if (modelIndex < visibleIndex || modelIndex >= visibleIndex + visibleItems.count())
+ return -1;
+ for (int i = 0; i < visibleItems.count(); ++i) {
+ FxGridItem *listItem = visibleItems.at(i);
+ if (listItem->index == modelIndex)
+ return i + visibleIndex;
+ if (listItem->index > modelIndex)
+ return -1;
+ }
+ return -1; // Not in visibleList
+ }
+
+ qreal snapPosAt(qreal pos) {
+ qreal snapPos = 0;
+ if (!visibleItems.isEmpty()) {
+ pos += rowSize()/2;
+ snapPos = visibleItems.first()->rowPos() - visibleIndex / columns * rowSize();
+ snapPos = pos - fmodf(pos - snapPos, qreal(rowSize()));
+ }
+ return snapPos;
+ }
+
+ int snapIndex() {
+ int index = currentIndex;
+ for (int i = 0; i < visibleItems.count(); ++i) {
+ FxGridItem *item = visibleItems[i];
+ if (item->index == -1)
+ continue;
+ qreal itemTop = item->rowPos();
+ if (itemTop >= highlight->rowPos()-rowSize()/2 && itemTop < highlight->rowPos()+rowSize()/2) {
+ index = item->index;
+ if (item->colPos() >= highlight->colPos()-colSize()/2 && item->colPos() < highlight->colPos()+colSize()/2)
+ return item->index;
+ }
+ }
+ return index;
+ }
+
+ virtual void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry) {
+ Q_Q(const QDeclarativeGridView);
+ QDeclarativeFlickablePrivate::itemGeometryChanged(item, newGeometry, oldGeometry);
+ if (item == q) {
+ if (newGeometry.height() != oldGeometry.height()
+ || newGeometry.width() != oldGeometry.width()) {
+ if (q->isComponentComplete()) {
+ updateGrid();
+ layout();
+ }
+ }
+ }
+ }
+
+ virtual void fixup(AxisData &data, qreal minExtent, qreal maxExtent);
+ virtual void flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize,
+ QDeclarativeTimeLineCallback::Callback fixupCallback, qreal velocity);
+
+ // for debugging only
+ void checkVisible() const {
+ int skip = 0;
+ for (int i = 0; i < visibleItems.count(); ++i) {
+ FxGridItem *listItem = visibleItems.at(i);
+ if (listItem->index == -1) {
+ ++skip;
+ } else if (listItem->index != visibleIndex + i - skip) {
+ for (int j = 0; j < visibleItems.count(); j++)
+ qDebug() << " index" << j << "item index" << visibleItems.at(j)->index;
+ qFatal("index %d %d %d", visibleIndex, i, listItem->index);
+ }
+ }
+ }
+
+ QDeclarativeGuard<QDeclarativeVisualModel> model;
+ QVariant modelVariant;
+ QList<FxGridItem*> visibleItems;
+ QHash<QDeclarativeItem*,int> unrequestedItems;
+ FxGridItem *currentItem;
+ QDeclarativeGridView::Flow flow;
+ int visiblePos;
+ int visibleIndex;
+ int currentIndex;
+ int cellWidth;
+ int cellHeight;
+ int columns;
+ int requestedIndex;
+ qreal highlightRangeStart;
+ qreal highlightRangeEnd;
+ QDeclarativeGridView::HighlightRangeMode highlightRange;
+ QDeclarativeComponent *highlightComponent;
+ FxGridItem *highlight;
+ FxGridItem *trackedItem;
+ enum MovementReason { Other, SetIndex, Mouse };
+ MovementReason moveReason;
+ int buffer;
+ QDeclarativeEaseFollow *highlightXAnimator;
+ QDeclarativeEaseFollow *highlightYAnimator;
+ enum BufferMode { NoBuffer = 0x00, BufferBefore = 0x01, BufferAfter = 0x02 };
+ BufferMode bufferMode;
+ QDeclarativeGridView::SnapMode snapMode;
+
+ bool ownModel : 1;
+ bool wrap : 1;
+ bool autoHighlight : 1;
+ bool fixCurrentVisibility : 1;
+ bool lazyRelease : 1;
+ bool layoutScheduled : 1;
+ bool deferredRelease : 1;
+ bool haveHighlightRange : 1;
+};
+
+void QDeclarativeGridViewPrivate::init()
+{
+ Q_Q(QDeclarativeGridView);
+ q->setFlag(QGraphicsItem::ItemIsFocusScope);
+ q->setFlickDirection(QDeclarativeFlickable::VerticalFlick);
+ addItemChangeListener(this, Geometry);
+}
+
+void QDeclarativeGridViewPrivate::clear()
+{
+ for (int i = 0; i < visibleItems.count(); ++i)
+ releaseItem(visibleItems.at(i));
+ visibleItems.clear();
+ visiblePos = 0;
+ visibleIndex = 0;
+ releaseItem(currentItem);
+ currentItem = 0;
+ createHighlight();
+ trackedItem = 0;
+}
+
+FxGridItem *QDeclarativeGridViewPrivate::createItem(int modelIndex)
+{
+ Q_Q(QDeclarativeGridView);
+ // create object
+ requestedIndex = modelIndex;
+ FxGridItem *listItem = 0;
+ if (QDeclarativeItem *item = model->item(modelIndex, false)) {
+ listItem = new FxGridItem(item, q);
+ listItem->index = modelIndex;
+ listItem->item->setZValue(1);
+ // complete
+ model->completeItem();
+ listItem->item->setParent(q->viewport());
+ unrequestedItems.remove(listItem->item);
+ }
+ requestedIndex = -1;
+ return listItem;
+}
+
+
+void QDeclarativeGridViewPrivate::releaseItem(FxGridItem *item)
+{
+ Q_Q(QDeclarativeGridView);
+ if (!item || !model)
+ return;
+ if (trackedItem == item) {
+ QObject::disconnect(trackedItem->item, SIGNAL(yChanged()), q, SLOT(trackedPositionChanged()));
+ QObject::disconnect(trackedItem->item, SIGNAL(xChanged()), q, SLOT(trackedPositionChanged()));
+ trackedItem = 0;
+ }
+ if (model->release(item->item) == 0) {
+ // item was not destroyed, and we no longer reference it.
+ unrequestedItems.insert(item->item, model->indexOf(item->item, q));
+ }
+ delete item;
+}
+
+void QDeclarativeGridViewPrivate::refill(qreal from, qreal to, bool doBuffer)
+{
+ Q_Q(QDeclarativeGridView);
+ if (!isValid() || !q->isComponentComplete())
+ return;
+
+ qreal bufferFrom = from - buffer;
+ qreal bufferTo = to + buffer;
+ qreal fillFrom = from;
+ qreal fillTo = to;
+ if (doBuffer && (bufferMode & BufferAfter))
+ fillTo = bufferTo;
+ if (doBuffer && (bufferMode & BufferBefore))
+ fillFrom = bufferFrom;
+
+ bool changed = false;
+
+ int colPos = colPosAt(visibleIndex);
+ int rowPos = rowPosAt(visibleIndex);
+ int modelIndex = visibleIndex;
+ if (visibleItems.count()) {
+ rowPos = visibleItems.last()->rowPos();
+ colPos = visibleItems.last()->colPos() + colSize();
+ if (colPos > colSize() * (columns-1)) {
+ colPos = 0;
+ rowPos += rowSize();
+ }
+ int i = visibleItems.count() - 1;
+ while (i > 0 && visibleItems.at(i)->index == -1)
+ --i;
+ modelIndex = visibleItems.at(i)->index + 1;
+ }
+ int colNum = colPos / colSize();
+
+ FxGridItem *item = 0;
+
+ // Item creation and release is staggered in order to avoid
+ // creating/releasing multiple items in one frame
+ // while flicking (as much as possible).
+ while (modelIndex < model->count() && rowPos <= fillTo + rowSize()*(columns - colNum)/(columns+1)) {
+// qDebug() << "refill: append item" << modelIndex;
+ if (!(item = createItem(modelIndex)))
+ break;
+ item->setPosition(colPos, rowPos);
+ visibleItems.append(item);
+ colPos += colSize();
+ colNum++;
+ if (colPos > colSize() * (columns-1)) {
+ colPos = 0;
+ colNum = 0;
+ rowPos += rowSize();
+ }
+ ++modelIndex;
+ changed = true;
+ if (doBuffer) // never buffer more than one item per frame
+ break;
+ }
+
+ if (visibleItems.count()) {
+ rowPos = visibleItems.first()->rowPos();
+ colPos = visibleItems.first()->colPos() - colSize();
+ if (colPos < 0) {
+ colPos = colSize() * (columns - 1);
+ rowPos -= rowSize();
+ }
+ }
+ colNum = colPos / colSize();
+ while (visibleIndex > 0 && rowPos + rowSize() - 1 >= fillFrom - rowSize()*(colNum+1)/(columns+1)){
+// qDebug() << "refill: prepend item" << visibleIndex-1 << "top pos" << rowPos << colPos;
+ if (!(item = createItem(visibleIndex-1)))
+ break;
+ --visibleIndex;
+ item->setPosition(colPos, rowPos);
+ visibleItems.prepend(item);
+ colPos -= colSize();
+ colNum--;
+ if (colPos < 0) {
+ colPos = colSize() * (columns - 1);
+ colNum = columns-1;
+ rowPos -= rowSize();
+ }
+ changed = true;
+ if (doBuffer) // never buffer more than one item per frame
+ break;
+ }
+
+ if (!lazyRelease || !changed || deferredRelease) { // avoid destroying items in the same frame that we create
+ while (visibleItems.count() > 1
+ && (item = visibleItems.first())
+ && item->endRowPos() < bufferFrom - rowSize()*(item->colPos()/colSize()+1)/(columns+1)) {
+ if (item->attached->delayRemove())
+ break;
+// qDebug() << "refill: remove first" << visibleIndex << "top end pos" << item->endRowPos();
+ if (item->index != -1)
+ visibleIndex++;
+ visibleItems.removeFirst();
+ releaseItem(item);
+ changed = true;
+ }
+ while (visibleItems.count() > 1
+ && (item = visibleItems.last())
+ && item->rowPos() > bufferTo + rowSize()*(columns - item->colPos()/colSize())/(columns+1)) {
+ if (item->attached->delayRemove())
+ break;
+// qDebug() << "refill: remove last" << visibleIndex+visibleItems.count()-1;
+ visibleItems.removeLast();
+ releaseItem(item);
+ changed = true;
+ }
+ deferredRelease = false;
+ } else {
+ deferredRelease = true;
+ }
+ if (changed) {
+ if (flow == QDeclarativeGridView::LeftToRight)
+ q->setContentHeight(endPosition() - startPosition());
+ else
+ q->setContentWidth(endPosition() - startPosition());
+ } else if (!doBuffer && buffer && bufferMode != NoBuffer) {
+ refill(from, to, true);
+ }
+ lazyRelease = false;
+}
+
+void QDeclarativeGridViewPrivate::updateGrid()
+{
+ Q_Q(QDeclarativeGridView);
+ columns = (int)qMax((flow == QDeclarativeGridView::LeftToRight ? q->width() : q->height()) / colSize(), qreal(1.));
+ if (isValid()) {
+ if (flow == QDeclarativeGridView::LeftToRight)
+ q->setContentHeight(endPosition() - startPosition());
+ else
+ q->setContentWidth(endPosition() - startPosition());
+ }
+}
+
+void QDeclarativeGridViewPrivate::scheduleLayout()
+{
+ Q_Q(QDeclarativeGridView);
+ if (!layoutScheduled) {
+ layoutScheduled = true;
+ QMetaObject::invokeMethod(q, "layout", Qt::QueuedConnection);
+ }
+}
+
+void QDeclarativeGridViewPrivate::layout(bool removed)
+{
+ Q_Q(QDeclarativeGridView);
+ layoutScheduled = false;
+ if (visibleItems.count()) {
+ qreal rowPos = visibleItems.first()->rowPos();
+ qreal colPos = visibleItems.first()->colPos();
+ int col = visibleIndex % columns;
+ if (colPos != col * colSize()) {
+ if (removed)
+ rowPos -= rowSize();
+ colPos = col * colSize();
+ visibleItems.first()->setPosition(colPos, rowPos);
+ }
+ for (int i = 1; i < visibleItems.count(); ++i) {
+ FxGridItem *item = visibleItems.at(i);
+ colPos += colSize();
+ if (colPos > colSize() * (columns-1)) {
+ colPos = 0;
+ rowPos += rowSize();
+ }
+ item->setPosition(colPos, rowPos);
+ }
+ }
+ q->refill();
+ updateHighlight();
+ moveReason = Other;
+ if (flow == QDeclarativeGridView::LeftToRight) {
+ q->setContentHeight(endPosition() - startPosition());
+ fixupY();
+ } else {
+ q->setContentWidth(endPosition() - startPosition());
+ fixupX();
+ }
+ updateUnrequestedPositions();
+}
+
+void QDeclarativeGridViewPrivate::updateUnrequestedIndexes()
+{
+ Q_Q(QDeclarativeGridView);
+ QHash<QDeclarativeItem*,int>::iterator it;
+ for (it = unrequestedItems.begin(); it != unrequestedItems.end(); ++it)
+ *it = model->indexOf(it.key(), q);
+}
+
+void QDeclarativeGridViewPrivate::updateUnrequestedPositions()
+{
+ QHash<QDeclarativeItem*,int>::const_iterator it;
+ for (it = unrequestedItems.begin(); it != unrequestedItems.end(); ++it) {
+ if (flow == QDeclarativeGridView::LeftToRight) {
+ it.key()->setPos(QPointF(colPosAt(*it), rowPosAt(*it)));
+ } else {
+ it.key()->setPos(QPointF(rowPosAt(*it), colPosAt(*it)));
+ }
+ }
+}
+
+void QDeclarativeGridViewPrivate::updateTrackedItem()
+{
+ Q_Q(QDeclarativeGridView);
+ FxGridItem *item = currentItem;
+ if (highlight)
+ item = highlight;
+
+ FxGridItem *oldTracked = trackedItem;
+
+ if (trackedItem && item != trackedItem) {
+ QObject::disconnect(trackedItem->item, SIGNAL(yChanged()), q, SLOT(trackedPositionChanged()));
+ QObject::disconnect(trackedItem->item, SIGNAL(xChanged()), q, SLOT(trackedPositionChanged()));
+ trackedItem = 0;
+ }
+
+ if (!trackedItem && item) {
+ trackedItem = item;
+ QObject::connect(trackedItem->item, SIGNAL(yChanged()), q, SLOT(trackedPositionChanged()));
+ QObject::connect(trackedItem->item, SIGNAL(xChanged()), q, SLOT(trackedPositionChanged()));
+ }
+ if (trackedItem && trackedItem != oldTracked)
+ q->trackedPositionChanged();
+}
+
+void QDeclarativeGridViewPrivate::createHighlight()
+{
+ Q_Q(QDeclarativeGridView);
+ bool changed = false;
+ if (highlight) {
+ if (trackedItem == highlight)
+ trackedItem = 0;
+ delete highlight->item;
+ delete highlight;
+ highlight = 0;
+ delete highlightXAnimator;
+ delete highlightYAnimator;
+ highlightXAnimator = 0;
+ highlightYAnimator = 0;
+ changed = true;
+ }
+
+ if (currentItem) {
+ QDeclarativeItem *item = 0;
+ if (highlightComponent) {
+ QDeclarativeContext *highlightContext = new QDeclarativeContext(qmlContext(q));
+ QObject *nobj = highlightComponent->create(highlightContext);
+ if (nobj) {
+ highlightContext->setParent(nobj);
+ item = qobject_cast<QDeclarativeItem *>(nobj);
+ if (!item)
+ delete nobj;
+ } else {
+ delete highlightContext;
+ }
+ } else {
+ item = new QDeclarativeItem;
+ item->setParent(q->viewport());
+ }
+ if (item) {
+ item->setParent(q->viewport());
+ highlight = new FxGridItem(item, q);
+ highlightXAnimator = new QDeclarativeEaseFollow(q);
+ highlightXAnimator->setTarget(QDeclarativeProperty(highlight->item, QLatin1String("x")));
+ highlightXAnimator->setDuration(150);
+ highlightXAnimator->setEnabled(autoHighlight);
+ highlightYAnimator = new QDeclarativeEaseFollow(q);
+ highlightYAnimator->setTarget(QDeclarativeProperty(highlight->item, QLatin1String("y")));
+ highlightYAnimator->setDuration(150);
+ highlightYAnimator->setEnabled(autoHighlight);
+ changed = true;
+ }
+ }
+ if (changed)
+ emit q->highlightItemChanged();
+}
+
+void QDeclarativeGridViewPrivate::updateHighlight()
+{
+ if ((!currentItem && highlight) || (currentItem && !highlight))
+ createHighlight();
+ if (currentItem && autoHighlight && highlight && !moving) {
+ // auto-update highlight
+ highlightXAnimator->setSourceValue(currentItem->item->x());
+ highlightYAnimator->setSourceValue(currentItem->item->y());
+ highlight->item->setWidth(currentItem->item->width());
+ highlight->item->setHeight(currentItem->item->height());
+ }
+ updateTrackedItem();
+}
+
+void QDeclarativeGridViewPrivate::updateCurrent(int modelIndex)
+{
+ Q_Q(QDeclarativeGridView);
+ if (!q->isComponentComplete() || !isValid() || modelIndex < 0 || modelIndex >= model->count()) {
+ if (currentItem) {
+ currentItem->attached->setIsCurrentItem(false);
+ releaseItem(currentItem);
+ currentItem = 0;
+ currentIndex = -1;
+ updateHighlight();
+ emit q->currentIndexChanged();
+ }
+ return;
+ }
+
+ if (currentItem && currentIndex == modelIndex) {
+ updateHighlight();
+ return;
+ }
+
+ FxGridItem *oldCurrentItem = currentItem;
+ currentIndex = modelIndex;
+ currentItem = createItem(modelIndex);
+ fixCurrentVisibility = true;
+ if (oldCurrentItem && (!currentItem || oldCurrentItem->item != currentItem->item))
+ oldCurrentItem->attached->setIsCurrentItem(false);
+ if (currentItem) {
+ currentItem->setPosition(colPosAt(modelIndex), rowPosAt(modelIndex));
+ currentItem->item->setFocus(true);
+ currentItem->attached->setIsCurrentItem(true);
+ }
+ updateHighlight();
+ emit q->currentIndexChanged();
+ releaseItem(oldCurrentItem);
+}
+
+void QDeclarativeGridViewPrivate::fixupPosition()
+{
+ moveReason = Other;
+ if (flow == QDeclarativeGridView::LeftToRight)
+ fixupY();
+ else
+ fixupX();
+}
+
+void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal maxExtent)
+{
+ Q_Q(QDeclarativeGridView);
+
+ if ((&data == &vData && !q->yflick())
+ || (&data == &hData && !q->xflick())
+ || data.move.timeLine())
+ return;
+
+ int oldDuration = fixupDuration;
+ fixupDuration = moveReason == Mouse ? fixupDuration : 0;
+
+ if (haveHighlightRange && highlightRange == QDeclarativeGridView::StrictlyEnforceRange) {
+ if (currentItem && currentItem->rowPos() - position() != highlightRangeStart) {
+ qreal pos = currentItem->rowPos() - highlightRangeStart;
+ timeline.reset(data.move);
+ if (fixupDuration)
+ timeline.move(data.move, -pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2);
+ else
+ data.move.setValue(-pos);
+ vTime = timeline.time();
+ }
+ } else if (snapMode != QDeclarativeGridView::NoSnap) {
+ qreal pos = qMax(qMin(snapPosAt(position()) - highlightRangeStart, -maxExtent), -minExtent);
+ qreal dist = qAbs(data.move + pos);
+ if (dist > 0) {
+ timeline.reset(data.move);
+ if (fixupDuration)
+ timeline.move(data.move, -pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2);
+ else
+ data.move.setValue(-pos);
+ vTime = timeline.time();
+ }
+ } else {
+ QDeclarativeFlickablePrivate::fixup(data, minExtent, maxExtent);
+ }
+ fixupDuration = oldDuration;
+}
+
+void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize,
+ QDeclarativeTimeLineCallback::Callback fixupCallback, qreal velocity)
+{
+ Q_Q(QDeclarativeGridView);
+
+ moveReason = Mouse;
+ if ((!haveHighlightRange || highlightRange != QDeclarativeGridView::StrictlyEnforceRange) && snapMode == QDeclarativeGridView::NoSnap) {
+ QDeclarativeFlickablePrivate::flick(data, minExtent, maxExtent, vSize, fixupCallback, velocity);
+ return;
+ }
+ qreal maxDistance = -1;
+ // -ve velocity means list is moving up
+ if (velocity > 0) {
+ if (snapMode == QDeclarativeGridView::SnapOneRow) {
+ if (FxGridItem *item = firstVisibleItem())
+ maxDistance = qAbs(item->rowPos() + data.move.value());
+ } else if (data.move.value() < minExtent) {
+ maxDistance = qAbs(minExtent - data.move.value() + (overShoot?overShootDistance(velocity, vSize):0));
+ }
+ if (snapMode != QDeclarativeGridView::SnapToRow && highlightRange != QDeclarativeGridView::StrictlyEnforceRange)
+ data.flickTarget = minExtent;
+ } else {
+ if (snapMode == QDeclarativeGridView::SnapOneRow) {
+ qreal pos = snapPosAt(-data.move.value()) + rowSize();
+ maxDistance = qAbs(pos + data.move.value());
+ } else if (data.move.value() > maxExtent) {
+ maxDistance = qAbs(maxExtent - data.move.value()) + (overShoot?overShootDistance(velocity, vSize):0);
+ }
+ if (snapMode != QDeclarativeGridView::SnapToRow && highlightRange != QDeclarativeGridView::StrictlyEnforceRange)
+ data.flickTarget = maxExtent;
+ }
+ if (maxDistance > 0 && (snapMode != QDeclarativeGridView::NoSnap || highlightRange == QDeclarativeGridView::StrictlyEnforceRange)) {
+ // This mode requires the grid to stop exactly on a row boundary.
+ qreal v = velocity;
+ if (maxVelocity != -1 && maxVelocity < qAbs(v)) {
+ if (v < 0)
+ v = -maxVelocity;
+ else
+ v = maxVelocity;
+ }
+ qreal accel = deceleration;
+ qreal v2 = v * v;
+ qreal maxAccel = v2 / (2.0f * maxDistance);
+ qreal overshootDist = 0.0;
+ if (maxAccel < accel) {
+ qreal dist = v2 / (accel * 2.0);
+ if (v > 0)
+ dist = -dist;
+ data.flickTarget = -snapPosAt(-(data.move.value() - highlightRangeStart) + dist) + highlightRangeStart;
+ dist = -data.flickTarget + data.move.value();
+ accel = v2 / (2.0f * qAbs(dist));
+ } else {
+ data.flickTarget = velocity > 0 ? minExtent : maxExtent;
+ overshootDist = overShoot ? overShootDistance(v, vSize) : 0;
+ }
+ timeline.reset(data.move);
+ timeline.accel(data.move, v, accel, maxDistance + overshootDist);
+ timeline.callback(QDeclarativeTimeLineCallback(&data.move, fixupCallback, this));
+ flicked = true;
+ emit q->flickingChanged();
+ emit q->flickStarted();
+ } else {
+ timeline.reset(data.move);
+ fixup(data, minExtent, maxExtent);
+ }
+}
+
+
+//----------------------------------------------------------------------------
+
+/*!
+ \qmlclass GridView QDeclarativeGridView
+ \since 4.7
+ \inherits Flickable
+ \brief The GridView item provides a grid view of items provided by a model.
+
+ The model is typically provided by a QAbstractListModel "C++ model object",
+ but can also be created directly in QML.
+
+ The items are laid out top to bottom (vertically) or left to right (horizontally)
+ and may be flicked to scroll.
+
+ The below example creates a very simple grid, using a QML model.
+
+ \image gridview.png
+
+ \snippet doc/src/snippets/declarative/gridview/gridview.qml 3
+
+ The model is defined as a ListModel using QML:
+ \quotefile doc/src/snippets/declarative/gridview/dummydata/ContactModel.qml
+
+ In this case ListModel is a handy way for us to test our UI. In practice
+ the model would be implemented in C++, or perhaps via a SQL data source.
+
+ Note that 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.
+*/
+QDeclarativeGridView::QDeclarativeGridView(QDeclarativeItem *parent)
+ : QDeclarativeFlickable(*(new QDeclarativeGridViewPrivate), parent)
+{
+ Q_D(QDeclarativeGridView);
+ d->init();
+}
+
+QDeclarativeGridView::~QDeclarativeGridView()
+{
+ Q_D(QDeclarativeGridView);
+ d->clear();
+ if (d->ownModel)
+ delete d->model;
+}
+
+/*!
+ \qmlattachedproperty bool GridView::isCurrentItem
+ This attched property is true if this delegate is the current item; otherwise false.
+
+ It is attached to each instance of the delegate.
+*/
+
+/*!
+ \qmlattachedproperty GridView GridView::view
+ This attached property holds the view that manages this delegate instance.
+
+ It is attached to each instance of the delegate.
+*/
+
+/*!
+ \qmlattachedproperty bool GridView::delayRemove
+ This attached property holds whether the delegate may be destroyed.
+
+ It is attached to each instance of the delegate.
+
+ It is sometimes necessary to delay the destruction of an item
+ until an animation completes.
+
+ The example below ensures that the animation completes before
+ the item is removed from the grid.
+
+ \code
+ Component {
+ id: myDelegate
+ Item {
+ id: wrapper
+ SequentialAnimation on GridView.onRemove {
+ PropertyAction { target: wrapper.GridView; property: "delayRemove"; value: true }
+ NumberAnimation { target: wrapper; property: "scale"; to: 0; duration: 250; easing: "easeInOutQuad" }
+ PropertyAction { target: wrapper.GridView; property: "delayRemove"; value: false }
+ }
+ }
+ }
+ \endcode
+*/
+
+/*!
+ \qmlattachedsignal GridView::onAdd()
+ This attached handler is called immediately after an item is added to the view.
+*/
+
+/*!
+ \qmlattachedsignal GridView::onRemove()
+ This attached handler is called immediately before an item is removed from the view.
+*/
+
+
+/*!
+ \qmlproperty model GridView::model
+ This property holds the model providing data for the grid.
+
+ The model provides a set of data that is used to create the items
+ for the view. For large or dynamic datasets the model is usually
+ provided by a C++ model object. The C++ model object must be a \l
+ {QAbstractItemModel} subclass, a VisualModel, or a simple list.
+
+ \sa {qmlmodels}{Data Models}
+*/
+QVariant QDeclarativeGridView::model() const
+{
+ Q_D(const QDeclarativeGridView);
+ return d->modelVariant;
+}
+
+void QDeclarativeGridView::setModel(const QVariant &model)
+{
+ Q_D(QDeclarativeGridView);
+ if (d->modelVariant == model)
+ return;
+ if (d->model) {
+ disconnect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
+ disconnect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
+ disconnect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
+ disconnect(d->model, SIGNAL(modelReset()), this, SLOT(modelReset()));
+ disconnect(d->model, SIGNAL(createdItem(int, QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
+ disconnect(d->model, SIGNAL(destroyingItem(QDeclarativeItem*)), this, SLOT(destroyingItem(QDeclarativeItem*)));
+ }
+ d->clear();
+ d->modelVariant = model;
+ QObject *object = qvariant_cast<QObject*>(model);
+ QDeclarativeVisualModel *vim = 0;
+ if (object && (vim = qobject_cast<QDeclarativeVisualModel *>(object))) {
+ if (d->ownModel) {
+ delete d->model;
+ d->ownModel = false;
+ }
+ d->model = vim;
+ } else {
+ if (!d->ownModel) {
+ d->model = new QDeclarativeVisualDataModel(qmlContext(this));
+ d->ownModel = true;
+ }
+ if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model))
+ dataModel->setModel(model);
+ }
+ if (d->model) {
+ if (isComponentComplete()) {
+ refill();
+ if (d->currentIndex >= d->model->count() || d->currentIndex < 0) {
+ setCurrentIndex(0);
+ } else {
+ d->moveReason = QDeclarativeGridViewPrivate::SetIndex;
+ d->updateCurrent(d->currentIndex);
+ }
+ }
+ connect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
+ connect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
+ connect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
+ connect(d->model, SIGNAL(modelReset()), this, SLOT(modelReset()));
+ connect(d->model, SIGNAL(createdItem(int, QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
+ connect(d->model, SIGNAL(destroyingItem(QDeclarativeItem*)), this, SLOT(destroyingItem(QDeclarativeItem*)));
+ emit countChanged();
+ }
+ emit modelChanged();
+}
+
+/*!
+ \qmlproperty component GridView::delegate
+
+ The delegate provides a template defining each item instantiated by the view.
+ The index is exposed as an accessible \c index property. Properties of the
+ model are also available depending upon the type of \l {qmlmodels}{Data Model}.
+
+ Note that the GridView will layout the items based on the size of the root item
+ in the delegate.
+
+ Here is an example delegate:
+ \snippet doc/src/snippets/declarative/gridview/gridview.qml 0
+*/
+QDeclarativeComponent *QDeclarativeGridView::delegate() const
+{
+ Q_D(const QDeclarativeGridView);
+ if (d->model) {
+ if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model))
+ return dataModel->delegate();
+ }
+
+ return 0;
+}
+
+void QDeclarativeGridView::setDelegate(QDeclarativeComponent *delegate)
+{
+ Q_D(QDeclarativeGridView);
+ if (delegate == this->delegate())
+ return;
+
+ if (!d->ownModel) {
+ d->model = new QDeclarativeVisualDataModel(qmlContext(this));
+ d->ownModel = true;
+ }
+ if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model)) {
+ dataModel->setDelegate(delegate);
+ if (isComponentComplete()) {
+ refill();
+ d->moveReason = QDeclarativeGridViewPrivate::SetIndex;
+ d->updateCurrent(d->currentIndex);
+ }
+ emit delegateChanged();
+ }
+}
+
+/*!
+ \qmlproperty int GridView::currentIndex
+ \qmlproperty Item GridView::currentItem
+
+ \c currentIndex holds the index of the current item.
+ \c currentItem is the current item. Note that the position of the current item
+ may only be approximate until it becomes visible in the view.
+*/
+int QDeclarativeGridView::currentIndex() const
+{
+ Q_D(const QDeclarativeGridView);
+ return d->currentIndex;
+}
+
+void QDeclarativeGridView::setCurrentIndex(int index)
+{
+ Q_D(QDeclarativeGridView);
+ if (d->requestedIndex >= 0) // currently creating item
+ return;
+ if (isComponentComplete() && d->isValid() && index != d->currentIndex && index < d->model->count() && index >= 0) {
+ d->moveReason = QDeclarativeGridViewPrivate::SetIndex;
+ cancelFlick();
+ d->updateCurrent(index);
+ } else {
+ d->currentIndex = index;
+ }
+}
+
+QDeclarativeItem *QDeclarativeGridView::currentItem()
+{
+ Q_D(QDeclarativeGridView);
+ if (!d->currentItem)
+ return 0;
+ return d->currentItem->item;
+}
+
+/*!
+ \qmlproperty Item GridView::highlightItem
+
+ \c highlightItem holds the highlight item, which was created
+ from the \l highlight component.
+
+ The highlightItem is managed by the view unless
+ \l highlightFollowsCurrentItem is set to false.
+
+ \sa highlight, highlightFollowsCurrentItem
+*/
+QDeclarativeItem *QDeclarativeGridView::highlightItem()
+{
+ Q_D(QDeclarativeGridView);
+ if (!d->highlight)
+ return 0;
+ return d->highlight->item;
+}
+
+/*!
+ \qmlproperty int GridView::count
+ This property holds the number of items in the view.
+*/
+int QDeclarativeGridView::count() const
+{
+ Q_D(const QDeclarativeGridView);
+ if (d->model)
+ return d->model->count();
+ return 0;
+}
+
+/*!
+ \qmlproperty component GridView::highlight
+ This property holds the component to use as the highlight.
+
+ An instance of the highlight component will be created for each view.
+ The geometry of the resultant component instance will be managed by the view
+ so as to stay with the current item, unless the highlightFollowsCurrentItem property is false.
+
+ The below example demonstrates how to make a simple highlight:
+ \snippet doc/src/snippets/declarative/gridview/gridview.qml 1
+
+ \sa highlightItem, highlightFollowsCurrentItem
+*/
+QDeclarativeComponent *QDeclarativeGridView::highlight() const
+{
+ Q_D(const QDeclarativeGridView);
+ return d->highlightComponent;
+}
+
+void QDeclarativeGridView::setHighlight(QDeclarativeComponent *highlight)
+{
+ Q_D(QDeclarativeGridView);
+ if (highlight != d->highlightComponent) {
+ d->highlightComponent = highlight;
+ d->updateCurrent(d->currentIndex);
+ emit highlightChanged();
+ }
+}
+
+/*!
+ \qmlproperty bool GridView::highlightFollowsCurrentItem
+ This property sets whether the highlight is managed by the view.
+
+ If highlightFollowsCurrentItem is true, the highlight will be moved smoothly
+ to follow the current item. If highlightFollowsCurrentItem is false, the
+ highlight will not be moved by the view, and must be implemented
+ by the highlight component, for example:
+
+ \code
+ Component {
+ id: myHighlight
+ Rectangle {
+ id: wrapper; color: "lightsteelblue"; radius: 4; width: 320; height: 60
+ SpringFollow on y { source: Wrapper.GridView.view.currentItem.y; spring: 3; damping: 0.2 }
+ SpringFollow on x { source: Wrapper.GridView.view.currentItem.x; spring: 3; damping: 0.2 }
+ }
+ }
+ \endcode
+*/
+bool QDeclarativeGridView::highlightFollowsCurrentItem() const
+{
+ Q_D(const QDeclarativeGridView);
+ return d->autoHighlight;
+}
+
+void QDeclarativeGridView::setHighlightFollowsCurrentItem(bool autoHighlight)
+{
+ Q_D(QDeclarativeGridView);
+ if (d->autoHighlight != autoHighlight) {
+ d->autoHighlight = autoHighlight;
+ if (d->highlightXAnimator) {
+ d->highlightXAnimator->setEnabled(d->autoHighlight);
+ d->highlightYAnimator->setEnabled(d->autoHighlight);
+ }
+ d->updateHighlight();
+ }
+}
+
+/*!
+ \qmlproperty real GridView::preferredHighlightBegin
+ \qmlproperty real GridView::preferredHighlightEnd
+ \qmlproperty enumeration GridView::highlightRangeMode
+
+ These properties set the preferred range of the highlight (current item)
+ within the view.
+
+ Note that this is the correct way to influence where the
+ current item ends up when the view scrolls. For example, if you want the
+ currently selected item to be in the middle of the list, then set the
+ highlight range to be where the middle item would go. Then, when the view scrolls,
+ the currently selected item will be the item at that spot. This also applies to
+ when the currently selected item changes - it will scroll to within the preferred
+ highlight range. Furthermore, the behaviour of the current item index will occur
+ whether or not a highlight exists.
+
+ If highlightRangeMode is set to \e ApplyRange the view will
+ attempt to maintain the highlight within the range, however
+ the highlight can move outside of the range at the ends of the list
+ or due to a mouse interaction.
+
+ If highlightRangeMode is set to \e StrictlyEnforceRange the highlight will never
+ move outside of the range. This means that the current item will change
+ if a keyboard or mouse action would cause the highlight to move
+ outside of the range.
+
+ The default value is \e NoHighlightRange.
+
+ Note that a valid range requires preferredHighlightEnd to be greater
+ than or equal to preferredHighlightBegin.
+*/
+qreal QDeclarativeGridView::preferredHighlightBegin() const
+{
+ Q_D(const QDeclarativeGridView);
+ return d->highlightRangeStart;
+}
+
+void QDeclarativeGridView::setPreferredHighlightBegin(qreal start)
+{
+ Q_D(QDeclarativeGridView);
+ if (d->highlightRangeStart == start)
+ return;
+ d->highlightRangeStart = start;
+ d->haveHighlightRange = d->highlightRange != NoHighlightRange && d->highlightRangeStart <= d->highlightRangeEnd;
+ emit preferredHighlightBeginChanged();
+}
+
+qreal QDeclarativeGridView::preferredHighlightEnd() const
+{
+ Q_D(const QDeclarativeGridView);
+ return d->highlightRangeEnd;
+}
+
+void QDeclarativeGridView::setPreferredHighlightEnd(qreal end)
+{
+ Q_D(QDeclarativeGridView);
+ if (d->highlightRangeEnd == end)
+ return;
+ d->highlightRangeEnd = end;
+ d->haveHighlightRange = d->highlightRange != NoHighlightRange && d->highlightRangeStart <= d->highlightRangeEnd;
+ emit preferredHighlightEndChanged();
+}
+
+QDeclarativeGridView::HighlightRangeMode QDeclarativeGridView::highlightRangeMode() const
+{
+ Q_D(const QDeclarativeGridView);
+ return d->highlightRange;
+}
+
+void QDeclarativeGridView::setHighlightRangeMode(HighlightRangeMode mode)
+{
+ Q_D(QDeclarativeGridView);
+ if (d->highlightRange == mode)
+ return;
+ d->highlightRange = mode;
+ d->haveHighlightRange = d->highlightRange != NoHighlightRange && d->highlightRangeStart <= d->highlightRangeEnd;
+ emit highlightRangeModeChanged();
+}
+
+
+/*!
+ \qmlproperty enumeration GridView::flow
+ This property holds the flow of the grid.
+
+ Possible values are \c LeftToRight (default) and \c TopToBottom.
+
+ If \a flow is \c LeftToRight, the view will scroll vertically.
+ If \a flow is \c TopToBottom, the view will scroll horizontally.
+*/
+QDeclarativeGridView::Flow QDeclarativeGridView::flow() const
+{
+ Q_D(const QDeclarativeGridView);
+ return d->flow;
+}
+
+void QDeclarativeGridView::setFlow(Flow flow)
+{
+ Q_D(QDeclarativeGridView);
+ if (d->flow != flow) {
+ d->flow = flow;
+ if (d->flow == LeftToRight) {
+ setContentWidth(-1);
+ setFlickDirection(QDeclarativeFlickable::VerticalFlick);
+ } else {
+ setContentHeight(-1);
+ setFlickDirection(QDeclarativeFlickable::HorizontalFlick);
+ }
+ d->clear();
+ d->updateGrid();
+ refill();
+ d->updateCurrent(d->currentIndex);
+ emit flowChanged();
+ }
+}
+
+/*!
+ \qmlproperty bool GridView::keyNavigationWraps
+ This property holds whether the grid wraps key navigation
+
+ If this property is true then key presses to move off of one end of the grid will cause the
+ selection to jump to the other side.
+*/
+bool QDeclarativeGridView::isWrapEnabled() const
+{
+ Q_D(const QDeclarativeGridView);
+ return d->wrap;
+}
+
+void QDeclarativeGridView::setWrapEnabled(bool wrap)
+{
+ Q_D(QDeclarativeGridView);
+ if (d->wrap == wrap)
+ return;
+ d->wrap = wrap;
+ emit keyNavigationWrapsChanged();
+}
+
+/*!
+ \qmlproperty int GridView::cacheBuffer
+ This property holds the number of off-screen pixels to cache.
+
+ This property determines the number of pixels above the top of the view
+ and below the bottom of the view to cache. Setting this value can make
+ scrolling the view smoother at the expense of additional memory usage.
+*/
+int QDeclarativeGridView::cacheBuffer() const
+{
+ Q_D(const QDeclarativeGridView);
+ return d->buffer;
+}
+
+void QDeclarativeGridView::setCacheBuffer(int buffer)
+{
+ Q_D(QDeclarativeGridView);
+ if (d->buffer != buffer) {
+ d->buffer = buffer;
+ if (isComponentComplete())
+ refill();
+ emit cacheBufferChanged();
+ }
+}
+
+/*!
+ \qmlproperty int GridView::cellWidth
+ \qmlproperty int GridView::cellHeight
+
+ These properties holds the width and height of each cell in the grid
+
+ The default cell size is 100x100.
+*/
+int QDeclarativeGridView::cellWidth() const
+{
+ Q_D(const QDeclarativeGridView);
+ return d->cellWidth;
+}
+
+void QDeclarativeGridView::setCellWidth(int cellWidth)
+{
+ Q_D(QDeclarativeGridView);
+ if (cellWidth != d->cellWidth && cellWidth > 0) {
+ d->cellWidth = qMax(1, cellWidth);
+ d->updateGrid();
+ emit cellWidthChanged();
+ d->layout();
+ }
+}
+
+int QDeclarativeGridView::cellHeight() const
+{
+ Q_D(const QDeclarativeGridView);
+ return d->cellHeight;
+}
+
+void QDeclarativeGridView::setCellHeight(int cellHeight)
+{
+ Q_D(QDeclarativeGridView);
+ if (cellHeight != d->cellHeight && cellHeight > 0) {
+ d->cellHeight = qMax(1, cellHeight);
+ d->updateGrid();
+ emit cellHeightChanged();
+ d->layout();
+ }
+}
+/*!
+ \qmlproperty enumeration GridView::snapMode
+
+ This property determines where the view will settle following a drag or flick.
+ The allowed values are:
+
+ \list
+ \o NoSnap (default) - the view will stop anywhere within the visible area.
+ \o SnapToRow - the view will settle with a row (or column for TopToBottom flow)
+ aligned with the start of the view.
+ \o SnapOneRow - the view will settle no more than one row (or column for TopToBottom flow)
+ away from the first visible row at the time the mouse button is released.
+ This mode is particularly useful for moving one page at a time.
+ \endlist
+
+*/
+QDeclarativeGridView::SnapMode QDeclarativeGridView::snapMode() const
+{
+ Q_D(const QDeclarativeGridView);
+ return d->snapMode;
+}
+
+void QDeclarativeGridView::setSnapMode(SnapMode mode)
+{
+ Q_D(QDeclarativeGridView);
+ if (d->snapMode != mode) {
+ d->snapMode = mode;
+ emit snapModeChanged();
+ }
+}
+
+void QDeclarativeGridView::viewportMoved()
+{
+ Q_D(QDeclarativeGridView);
+ QDeclarativeFlickable::viewportMoved();
+ d->lazyRelease = true;
+ if (d->flicked) {
+ if (yflick()) {
+ if (d->vData.velocity > 0)
+ d->bufferMode = QDeclarativeGridViewPrivate::BufferBefore;
+ else if (d->vData.velocity < 0)
+ d->bufferMode = QDeclarativeGridViewPrivate::BufferAfter;
+ }
+
+ if (xflick()) {
+ if (d->hData.velocity > 0)
+ d->bufferMode = QDeclarativeGridViewPrivate::BufferBefore;
+ else if (d->hData.velocity < 0)
+ d->bufferMode = QDeclarativeGridViewPrivate::BufferAfter;
+ }
+ }
+ refill();
+ if (isFlicking() || d->moving)
+ d->moveReason = QDeclarativeGridViewPrivate::Mouse;
+ if (d->moveReason != QDeclarativeGridViewPrivate::SetIndex) {
+ if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange && d->highlight) {
+ // reposition highlight
+ qreal pos = d->highlight->rowPos();
+ qreal viewPos = qRound(d->position());
+ if (pos > viewPos + d->highlightRangeEnd - 1 - d->rowSize())
+ pos = viewPos + d->highlightRangeEnd - 1 - d->rowSize();
+ if (pos < viewPos + d->highlightRangeStart)
+ pos = viewPos + d->highlightRangeStart;
+ d->highlight->setPosition(d->highlight->colPos(), pos);
+
+ // update current index
+ int idx = d->snapIndex();
+ if (idx >= 0 && idx != d->currentIndex) {
+ d->updateCurrent(idx);
+ if (d->currentItem && d->currentItem->colPos() != d->highlight->colPos() && d->autoHighlight) {
+ if (d->flow == LeftToRight)
+ d->highlightXAnimator->setSourceValue(d->currentItem->item->x());
+ else
+ d->highlightYAnimator->setSourceValue(d->currentItem->item->y());
+ }
+ }
+ }
+ }
+}
+
+qreal QDeclarativeGridView::minYExtent() const
+{
+ Q_D(const QDeclarativeGridView);
+ if (d->flow == QDeclarativeGridView::TopToBottom)
+ return QDeclarativeFlickable::minYExtent();
+ qreal extent = -d->startPosition();
+ if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange)
+ extent += d->highlightRangeStart;
+ return extent;
+}
+
+qreal QDeclarativeGridView::maxYExtent() const
+{
+ Q_D(const QDeclarativeGridView);
+ if (d->flow == QDeclarativeGridView::TopToBottom)
+ return QDeclarativeFlickable::maxYExtent();
+ qreal extent;
+ if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange)
+ extent = -(d->rowPosAt(count()-1) - d->highlightRangeEnd);
+ else
+ extent = -(d->endPosition() - height());
+ const qreal minY = minYExtent();
+ if (extent > minY)
+ extent = minY;
+ return extent;
+}
+
+qreal QDeclarativeGridView::minXExtent() const
+{
+ Q_D(const QDeclarativeGridView);
+ if (d->flow == QDeclarativeGridView::LeftToRight)
+ return QDeclarativeFlickable::minXExtent();
+ qreal extent = -d->startPosition();
+ if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange)
+ extent += d->highlightRangeStart;
+ return extent;
+}
+
+qreal QDeclarativeGridView::maxXExtent() const
+{
+ Q_D(const QDeclarativeGridView);
+ if (d->flow == QDeclarativeGridView::LeftToRight)
+ return QDeclarativeFlickable::maxXExtent();
+ qreal extent;
+ if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange)
+ extent = -(d->rowPosAt(count()-1) - d->highlightRangeEnd);
+ else
+ extent = -(d->endPosition() - height());
+ const qreal minX = minXExtent();
+ if (extent > minX)
+ extent = minX;
+ return extent;
+}
+
+void QDeclarativeGridView::keyPressEvent(QKeyEvent *event)
+{
+ Q_D(QDeclarativeGridView);
+ QDeclarativeFlickable::keyPressEvent(event);
+ if (event->isAccepted())
+ return;
+ if (d->model && d->model->count() && d->interactive) {
+ d->moveReason = QDeclarativeGridViewPrivate::SetIndex;
+ int oldCurrent = currentIndex();
+ switch (event->key()) {
+ case Qt::Key_Up:
+ moveCurrentIndexUp();
+ break;
+ case Qt::Key_Down:
+ moveCurrentIndexDown();
+ break;
+ case Qt::Key_Left:
+ moveCurrentIndexLeft();
+ break;
+ case Qt::Key_Right:
+ moveCurrentIndexRight();
+ break;
+ default:
+ break;
+ }
+ if (oldCurrent != currentIndex()) {
+ event->accept();
+ return;
+ }
+ }
+ d->moveReason = QDeclarativeGridViewPrivate::Other;
+ event->ignore();
+}
+
+/*!
+ \qmlmethod GridView::moveCurrentIndexUp()
+
+ Move the currentIndex up one item in the view.
+ The current index will wrap if keyNavigationWraps is true and it
+ is currently at the end.
+*/
+void QDeclarativeGridView::moveCurrentIndexUp()
+{
+ Q_D(QDeclarativeGridView);
+ if (d->flow == QDeclarativeGridView::LeftToRight) {
+ if (currentIndex() >= d->columns || d->wrap) {
+ int index = currentIndex() - d->columns;
+ setCurrentIndex(index >= 0 ? index : d->model->count()-1);
+ }
+ } else {
+ if (currentIndex() > 0 || d->wrap) {
+ int index = currentIndex() - 1;
+ setCurrentIndex(index >= 0 ? index : d->model->count()-1);
+ }
+ }
+}
+
+/*!
+ \qmlmethod GridView::moveCurrentIndexDown()
+
+ Move the currentIndex down one item in the view.
+ The current index will wrap if keyNavigationWraps is true and it
+ is currently at the end.
+*/
+void QDeclarativeGridView::moveCurrentIndexDown()
+{
+ Q_D(QDeclarativeGridView);
+ if (d->flow == QDeclarativeGridView::LeftToRight) {
+ if (currentIndex() < d->model->count() - d->columns || d->wrap) {
+ int index = currentIndex()+d->columns;
+ setCurrentIndex(index < d->model->count() ? index : 0);
+ }
+ } else {
+ if (currentIndex() < d->model->count() - 1 || d->wrap) {
+ int index = currentIndex() + 1;
+ setCurrentIndex(index < d->model->count() ? index : 0);
+ }
+ }
+}
+
+/*!
+ \qmlmethod GridView::moveCurrentIndexLeft()
+
+ Move the currentIndex left one item in the view.
+ The current index will wrap if keyNavigationWraps is true and it
+ is currently at the end.
+*/
+void QDeclarativeGridView::moveCurrentIndexLeft()
+{
+ Q_D(QDeclarativeGridView);
+ if (d->flow == QDeclarativeGridView::LeftToRight) {
+ if (currentIndex() > 0 || d->wrap) {
+ int index = currentIndex() - 1;
+ setCurrentIndex(index >= 0 ? index : d->model->count()-1);
+ }
+ } else {
+ if (currentIndex() >= d->columns || d->wrap) {
+ int index = currentIndex() - d->columns;
+ setCurrentIndex(index >= 0 ? index : d->model->count()-1);
+ }
+ }
+}
+
+/*!
+ \qmlmethod GridView::moveCurrentIndexRight()
+
+ Move the currentIndex right one item in the view.
+ The current index will wrap if keyNavigationWraps is true and it
+ is currently at the end.
+*/
+void QDeclarativeGridView::moveCurrentIndexRight()
+{
+ Q_D(QDeclarativeGridView);
+ if (d->flow == QDeclarativeGridView::LeftToRight) {
+ if (currentIndex() < d->model->count() - 1 || d->wrap) {
+ int index = currentIndex() + 1;
+ setCurrentIndex(index < d->model->count() ? index : 0);
+ }
+ } else {
+ if (currentIndex() < d->model->count() - d->columns || d->wrap) {
+ int index = currentIndex()+d->columns;
+ setCurrentIndex(index < d->model->count() ? index : 0);
+ }
+ }
+}
+
+/*!
+ \qmlmethod GridView::positionViewAtIndex(int index)
+
+ Positions the view such that the \a index is at the top (or left for horizontal orientation) of the view.
+ If positioning the view at the index would cause empty space to be displayed at
+ the end of the view, the view will be positioned at the end.
+
+ It is not recommended to use contentX or contentY to position the view
+ at a particular index. This is unreliable since removing items from the start
+ of the list does not cause all other items to be repositioned.
+ The correct way to bring an item into view is with positionViewAtIndex.
+*/
+void QDeclarativeGridView::positionViewAtIndex(int index)
+{
+ Q_D(QDeclarativeGridView);
+ if (!d->isValid() || index < 0 || index >= d->model->count())
+ return;
+
+ qreal maxExtent = d->flow == QDeclarativeGridView::LeftToRight ? -maxYExtent() : -maxXExtent();
+ FxGridItem *item = d->visibleItem(index);
+ if (item) {
+ // Already created - just move to top of view
+ int pos = qMin(item->rowPos(), maxExtent);
+ d->setPosition(pos);
+ } else {
+ int pos = d->rowPosAt(index);
+ // save the currently visible items in case any of them end up visible again
+ QList<FxGridItem*> oldVisible = d->visibleItems;
+ d->visibleItems.clear();
+ d->visibleIndex = index - index % d->columns;
+ d->setPosition(pos);
+ // setPosition() will cause refill. Adjust if we have moved beyond range
+ if (d->position() > maxExtent)
+ d->setPosition(maxExtent);
+ // now release the reference to all the old visible items.
+ for (int i = 0; i < oldVisible.count(); ++i)
+ d->releaseItem(oldVisible.at(i));
+ }
+ d->fixupPosition();
+}
+
+
+void QDeclarativeGridView::componentComplete()
+{
+ Q_D(QDeclarativeGridView);
+ QDeclarativeFlickable::componentComplete();
+ d->updateGrid();
+ refill();
+ if (d->currentIndex < 0)
+ d->updateCurrent(0);
+ else
+ d->updateCurrent(d->currentIndex);
+ d->fixupPosition();
+}
+
+void QDeclarativeGridView::trackedPositionChanged()
+{
+ Q_D(QDeclarativeGridView);
+ if (!d->trackedItem || !d->currentItem)
+ return;
+ if (!isFlicking() && !d->moving && d->moveReason == QDeclarativeGridViewPrivate::SetIndex) {
+ const qreal trackedPos = d->trackedItem->rowPos();
+ const qreal viewPos = d->position();
+ if (d->haveHighlightRange) {
+ if (d->highlightRange == StrictlyEnforceRange) {
+ qreal pos = viewPos;
+ if (trackedPos > pos + d->highlightRangeEnd - d->rowSize())
+ pos = trackedPos - d->highlightRangeEnd + d->rowSize();
+ if (trackedPos < pos + d->highlightRangeStart)
+ pos = trackedPos - d->highlightRangeStart;
+ d->setPosition(pos);
+ } else {
+ qreal pos = viewPos;
+ if (trackedPos < d->startPosition() + d->highlightRangeStart) {
+ pos = d->startPosition();
+ } else if (d->trackedItem->endRowPos() > d->endPosition() - d->size() + d->highlightRangeEnd) {
+ pos = d->endPosition() - d->size();
+ if (pos < d->startPosition())
+ pos = d->startPosition();
+ } else {
+ if (trackedPos < viewPos + d->highlightRangeStart) {
+ pos = trackedPos - d->highlightRangeStart;
+ } else if (trackedPos > viewPos + d->highlightRangeEnd - d->rowSize()) {
+ pos = trackedPos - d->highlightRangeEnd + d->rowSize();
+ }
+ }
+ d->setPosition(pos);
+ }
+ } else {
+ if (trackedPos < viewPos && d->currentItem->rowPos() < viewPos) {
+ d->setPosition(d->currentItem->rowPos() < trackedPos ? trackedPos : d->currentItem->rowPos());
+ } else if (d->trackedItem->endRowPos() > viewPos + d->size()
+ && d->currentItem->endRowPos() > viewPos + d->size()) {
+ qreal pos;
+ if (d->trackedItem->endRowPos() < d->currentItem->endRowPos()) {
+ pos = d->trackedItem->endRowPos() - d->size();
+ if (d->rowSize() > d->size())
+ pos = trackedPos;
+ } else {
+ pos = d->currentItem->endRowPos() - d->size();
+ if (d->rowSize() > d->size())
+ pos = d->currentItem->rowPos();
+ }
+ d->setPosition(pos);
+ }
+ }
+ }
+}
+
+void QDeclarativeGridView::itemsInserted(int modelIndex, int count)
+{
+ Q_D(QDeclarativeGridView);
+ if (!d->visibleItems.count() || d->model->count() <= 1) {
+ refill();
+ d->updateCurrent(qMax(0, qMin(d->currentIndex, d->model->count()-1)));
+ emit countChanged();
+ return;
+ }
+
+ int index = d->mapFromModel(modelIndex);
+ if (index == -1) {
+ int i = d->visibleItems.count() - 1;
+ while (i > 0 && d->visibleItems.at(i)->index == -1)
+ --i;
+ if (d->visibleItems.at(i)->index + 1 == modelIndex) {
+ // Special case of appending an item to the model.
+ index = d->visibleIndex + d->visibleItems.count();
+ } else {
+ if (modelIndex <= d->visibleIndex) {
+ // Insert before visible items
+ d->visibleIndex += count;
+ for (int i = 0; i < d->visibleItems.count(); ++i) {
+ FxGridItem *listItem = d->visibleItems.at(i);
+ if (listItem->index != -1 && listItem->index >= modelIndex)
+ listItem->index += count;
+ }
+ }
+ if (d->currentIndex >= modelIndex) {
+ // adjust current item index
+ d->currentIndex += count;
+ if (d->currentItem)
+ d->currentItem->index = d->currentIndex;
+ }
+ d->layout();
+ emit countChanged();
+ return;
+ }
+ }
+
+ // At least some of the added items will be visible
+ int insertCount = count;
+ if (index < d->visibleIndex) {
+ insertCount -= d->visibleIndex - index;
+ index = d->visibleIndex;
+ modelIndex = d->visibleIndex;
+ }
+
+ index -= d->visibleIndex;
+ int to = d->buffer+d->position()+d->size()-1;
+ int colPos, rowPos;
+ if (index < d->visibleItems.count()) {
+ colPos = d->visibleItems.at(index)->colPos();
+ rowPos = d->visibleItems.at(index)->rowPos();
+ } else {
+ // appending items to visible list
+ colPos = d->visibleItems.at(index-1)->colPos() + d->colSize();
+ rowPos = d->visibleItems.at(index-1)->rowPos();
+ if (colPos > d->colSize() * (d->columns-1)) {
+ colPos = 0;
+ rowPos += d->rowSize();
+ }
+ }
+
+ QList<FxGridItem*> added;
+ int i = 0;
+ while (i < insertCount && rowPos <= to + d->rowSize()*(d->columns - (colPos/d->colSize()))/qreal(d->columns)) {
+ FxGridItem *item = d->createItem(modelIndex + i);
+ d->visibleItems.insert(index, item);
+ item->setPosition(colPos, rowPos);
+ added.append(item);
+ colPos += d->colSize();
+ if (colPos > d->colSize() * (d->columns-1)) {
+ colPos = 0;
+ rowPos += d->rowSize();
+ }
+ ++index;
+ ++i;
+ }
+ if (i < insertCount) {
+ // We didn't insert all our new items, which means anything
+ // beyond the current index is not visible - remove it.
+ while (d->visibleItems.count() > index) {
+ d->releaseItem(d->visibleItems.takeLast());
+ }
+ }
+
+ if (d->currentIndex >= modelIndex) {
+ // adjust current item index
+ d->currentIndex += count;
+ if (d->currentItem) {
+ d->currentItem->index = d->currentIndex;
+ d->currentItem->setPosition(d->colPosAt(d->currentIndex), d->rowPosAt(d->currentIndex));
+ }
+ }
+ // Update the indexes of the following visible items.
+ for (; index < d->visibleItems.count(); ++index) {
+ FxGridItem *listItem = d->visibleItems.at(index);
+ if (listItem->index != -1)
+ listItem->index += count;
+ }
+
+ // everything is in order now - emit add() signal
+ for (int j = 0; j < added.count(); ++j)
+ added.at(j)->attached->emitAdd();
+ d->layout();
+ emit countChanged();
+}
+
+void QDeclarativeGridView::itemsRemoved(int modelIndex, int count)
+{
+ Q_D(QDeclarativeGridView);
+ bool currentRemoved = d->currentIndex >= modelIndex && d->currentIndex < modelIndex + count;
+ bool removedVisible = false;
+
+ // Remove the items from the visible list, skipping anything already marked for removal
+ QList<FxGridItem*>::Iterator it = d->visibleItems.begin();
+ while (it != d->visibleItems.end()) {
+ FxGridItem *item = *it;
+ if (item->index == -1 || item->index < modelIndex) {
+ // already removed, or before removed items
+ if (item->index < modelIndex)
+ removedVisible = true;
+ ++it;
+ } else if (item->index >= modelIndex + count) {
+ // after removed items
+ item->index -= count;
+ ++it;
+ } else {
+ // removed item
+ removedVisible = true;
+ item->attached->emitRemove();
+ if (item->attached->delayRemove()) {
+ item->index = -1;
+ connect(item->attached, SIGNAL(delayRemoveChanged()), this, SLOT(destroyRemoved()), Qt::QueuedConnection);
+ ++it;
+ } else {
+ it = d->visibleItems.erase(it);
+ d->releaseItem(item);
+ }
+ }
+ }
+
+ // fix current
+ if (d->currentIndex >= modelIndex + count) {
+ d->currentIndex -= count;
+ if (d->currentItem)
+ d->currentItem->index -= count;
+ } else if (currentRemoved) {
+ // current item has been removed.
+ d->releaseItem(d->currentItem);
+ d->currentItem = 0;
+ d->currentIndex = -1;
+ d->updateCurrent(qMin(modelIndex, d->model->count()-1));
+ }
+
+ // update visibleIndex
+ for (it = d->visibleItems.begin(); it != d->visibleItems.end(); ++it) {
+ if ((*it)->index != -1) {
+ d->visibleIndex = (*it)->index;
+ break;
+ }
+ }
+
+ if (removedVisible) {
+ if (d->visibleItems.isEmpty()) {
+ d->visibleIndex = 0;
+ d->setPosition(0);
+ refill();
+ } else {
+ // Correct the positioning of the items
+ d->scheduleLayout();
+ }
+ }
+
+ emit countChanged();
+}
+
+void QDeclarativeGridView::layout()
+{
+ Q_D(QDeclarativeGridView);
+ if (d->layoutScheduled)
+ d->layout();
+}
+
+void QDeclarativeGridView::destroyRemoved()
+{
+ Q_D(QDeclarativeGridView);
+ for (QList<FxGridItem*>::Iterator it = d->visibleItems.begin();
+ it != d->visibleItems.end();) {
+ FxGridItem *listItem = *it;
+ if (listItem->index == -1 && listItem->attached->delayRemove() == false) {
+ d->releaseItem(listItem);
+ it = d->visibleItems.erase(it);
+ } else {
+ ++it;
+ }
+ }
+
+ // Correct the positioning of the items
+ d->layout();
+}
+
+void QDeclarativeGridView::itemsMoved(int from, int to, int count)
+{
+ Q_D(QDeclarativeGridView);
+ QHash<int,FxGridItem*> moved;
+
+ bool removedBeforeVisible = false;
+ FxGridItem *firstItem = d->firstVisibleItem();
+
+ if (from < to && from < d->visibleIndex && to > d->visibleIndex)
+ removedBeforeVisible = true;
+
+ QList<FxGridItem*>::Iterator it = d->visibleItems.begin();
+ while (it != d->visibleItems.end()) {
+ FxGridItem *item = *it;
+ if (item->index >= from && item->index < from + count) {
+ // take the items that are moving
+ item->index += (to-from);
+ moved.insert(item->index, item);
+ it = d->visibleItems.erase(it);
+ if (item->rowPos() < firstItem->rowPos())
+ removedBeforeVisible = true;
+ } else {
+ if (item->index > from && item->index != -1) {
+ // move everything after the moved items.
+ item->index -= count;
+ if (item->index < d->visibleIndex)
+ d->visibleIndex = item->index;
+ } else if (item->index != -1) {
+ removedBeforeVisible = true;
+ }
+ ++it;
+ }
+ }
+
+ int remaining = count;
+ int endIndex = d->visibleIndex;
+ it = d->visibleItems.begin();
+ while (it != d->visibleItems.end()) {
+ FxGridItem *item = *it;
+ if (remaining && item->index >= to && item->index < to + count) {
+ // place items in the target position, reusing any existing items
+ FxGridItem *movedItem = moved.take(item->index);
+ if (!movedItem)
+ movedItem = d->createItem(item->index);
+ it = d->visibleItems.insert(it, movedItem);
+ ++it;
+ --remaining;
+ } else {
+ if (item->index != -1) {
+ if (item->index >= to) {
+ // update everything after the moved items.
+ item->index += count;
+ }
+ endIndex = item->index;
+ }
+ ++it;
+ }
+ }
+
+ // If we have moved items to the end of the visible items
+ // then add any existing moved items that we have
+ while (FxGridItem *item = moved.take(endIndex+1)) {
+ d->visibleItems.append(item);
+ ++endIndex;
+ }
+
+ // update visibleIndex
+ for (it = d->visibleItems.begin(); it != d->visibleItems.end(); ++it) {
+ if ((*it)->index != -1) {
+ d->visibleIndex = (*it)->index;
+ break;
+ }
+ }
+
+ // Fix current index
+ if (d->currentIndex >= 0 && d->currentItem) {
+ int oldCurrent = d->currentIndex;
+ d->currentIndex = d->model->indexOf(d->currentItem->item, this);
+ if (oldCurrent != d->currentIndex) {
+ d->currentItem->index = d->currentIndex;
+ emit currentIndexChanged();
+ }
+ }
+
+ // Whatever moved items remain are no longer visible items.
+ while (moved.count()) {
+ int idx = moved.begin().key();
+ FxGridItem *item = moved.take(idx);
+ if (item->item == d->currentItem->item)
+ item->setPosition(d->colPosAt(idx), d->rowPosAt(idx));
+ d->releaseItem(item);
+ }
+
+ d->layout(removedBeforeVisible);
+}
+
+void QDeclarativeGridView::modelReset()
+{
+ Q_D(QDeclarativeGridView);
+ d->clear();
+ refill();
+ d->moveReason = QDeclarativeGridViewPrivate::SetIndex;
+ d->updateCurrent(d->currentIndex);
+ emit countChanged();
+}
+
+void QDeclarativeGridView::createdItem(int index, QDeclarativeItem *item)
+{
+ Q_D(QDeclarativeGridView);
+ item->setParentItem(this);
+ if (d->requestedIndex != index) {
+ item->setParentItem(this);
+ d->unrequestedItems.insert(item, index);
+ if (d->flow == QDeclarativeGridView::LeftToRight) {
+ item->setPos(QPointF(d->colPosAt(index), d->rowPosAt(index)));
+ } else {
+ item->setPos(QPointF(d->rowPosAt(index), d->colPosAt(index)));
+ }
+ }
+}
+
+void QDeclarativeGridView::destroyingItem(QDeclarativeItem *item)
+{
+ Q_D(QDeclarativeGridView);
+ d->unrequestedItems.remove(item);
+}
+
+
+void QDeclarativeGridView::refill()
+{
+ Q_D(QDeclarativeGridView);
+ d->refill(d->position(), d->position()+d->size()-1);
+}
+
+
+QDeclarativeGridViewAttached *QDeclarativeGridView::qmlAttachedProperties(QObject *obj)
+{
+ return new QDeclarativeGridViewAttached(obj);
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativegridview_p.h b/src/declarative/graphicsitems/qdeclarativegridview_p.h
new file mode 100644
index 0000000000..787c04cc24
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativegridview_p.h
@@ -0,0 +1,242 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEGRIDVIEW_H
+#define QDECLARATIVEGRIDVIEW_H
+
+#include "qdeclarativeflickable_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+class QDeclarativeVisualModel;
+class QDeclarativeGridViewAttached;
+class QDeclarativeGridViewPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeGridView : public QDeclarativeFlickable
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeGridView)
+
+ Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged)
+ Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
+ Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged)
+ Q_PROPERTY(QDeclarativeItem *currentItem READ currentItem NOTIFY currentIndexChanged)
+ Q_PROPERTY(int count READ count NOTIFY countChanged)
+
+ Q_PROPERTY(QDeclarativeComponent *highlight READ highlight WRITE setHighlight NOTIFY highlightChanged)
+ Q_PROPERTY(QDeclarativeItem *highlightItem READ highlightItem NOTIFY highlightItemChanged)
+ Q_PROPERTY(bool highlightFollowsCurrentItem READ highlightFollowsCurrentItem WRITE setHighlightFollowsCurrentItem)
+
+ Q_PROPERTY(qreal preferredHighlightBegin READ preferredHighlightBegin WRITE setPreferredHighlightBegin NOTIFY preferredHighlightBeginChanged)
+ Q_PROPERTY(qreal preferredHighlightEnd READ preferredHighlightEnd WRITE setPreferredHighlightEnd NOTIFY preferredHighlightEndChanged)
+ Q_PROPERTY(HighlightRangeMode highlightRangeMode READ highlightRangeMode WRITE setHighlightRangeMode NOTIFY highlightRangeModeChanged)
+
+ Q_PROPERTY(Flow flow READ flow WRITE setFlow NOTIFY flowChanged)
+ Q_PROPERTY(bool keyNavigationWraps READ isWrapEnabled WRITE setWrapEnabled NOTIFY keyNavigationWrapsChanged)
+ Q_PROPERTY(int cacheBuffer READ cacheBuffer WRITE setCacheBuffer NOTIFY cacheBufferChanged)
+ Q_PROPERTY(int cellWidth READ cellWidth WRITE setCellWidth NOTIFY cellWidthChanged)
+ Q_PROPERTY(int cellHeight READ cellHeight WRITE setCellHeight NOTIFY cellHeightChanged)
+
+ Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged)
+
+ Q_ENUMS(HighlightRangeMode)
+ Q_ENUMS(SnapMode)
+ Q_CLASSINFO("DefaultProperty", "data")
+
+public:
+ QDeclarativeGridView(QDeclarativeItem *parent=0);
+ ~QDeclarativeGridView();
+
+ QVariant model() const;
+ void setModel(const QVariant &);
+
+ QDeclarativeComponent *delegate() const;
+ void setDelegate(QDeclarativeComponent *);
+
+ int currentIndex() const;
+ void setCurrentIndex(int idx);
+
+ QDeclarativeItem *currentItem();
+ QDeclarativeItem *highlightItem();
+ int count() const;
+
+ QDeclarativeComponent *highlight() const;
+ void setHighlight(QDeclarativeComponent *highlight);
+
+ bool highlightFollowsCurrentItem() const;
+ void setHighlightFollowsCurrentItem(bool);
+
+ enum HighlightRangeMode { NoHighlightRange, ApplyRange, StrictlyEnforceRange };
+ HighlightRangeMode highlightRangeMode() const;
+ void setHighlightRangeMode(HighlightRangeMode mode);
+
+ qreal preferredHighlightBegin() const;
+ void setPreferredHighlightBegin(qreal);
+
+ qreal preferredHighlightEnd() const;
+ void setPreferredHighlightEnd(qreal);
+
+ Q_ENUMS(Flow)
+ enum Flow { LeftToRight, TopToBottom };
+ Flow flow() const;
+ void setFlow(Flow);
+
+ bool isWrapEnabled() const;
+ void setWrapEnabled(bool);
+
+ int cacheBuffer() const;
+ void setCacheBuffer(int);
+
+ int cellWidth() const;
+ void setCellWidth(int);
+
+ int cellHeight() const;
+ void setCellHeight(int);
+
+ enum SnapMode { NoSnap, SnapToRow, SnapOneRow };
+ SnapMode snapMode() const;
+ void setSnapMode(SnapMode mode);
+
+ static QDeclarativeGridViewAttached *qmlAttachedProperties(QObject *);
+
+public Q_SLOTS:
+ void moveCurrentIndexUp();
+ void moveCurrentIndexDown();
+ void moveCurrentIndexLeft();
+ void moveCurrentIndexRight();
+ void positionViewAtIndex(int index);
+
+Q_SIGNALS:
+ void countChanged();
+ void currentIndexChanged();
+ void cellWidthChanged();
+ void cellHeightChanged();
+ void highlightChanged();
+ void highlightItemChanged();
+ void preferredHighlightBeginChanged();
+ void preferredHighlightEndChanged();
+ void highlightRangeModeChanged();
+ void modelChanged();
+ void delegateChanged();
+ void flowChanged();
+ void keyNavigationWrapsChanged();
+ void cacheBufferChanged();
+ void snapModeChanged();
+
+protected:
+ virtual void viewportMoved();
+ virtual qreal minYExtent() const;
+ virtual qreal maxYExtent() const;
+ virtual qreal minXExtent() const;
+ virtual qreal maxXExtent() const;
+ virtual void keyPressEvent(QKeyEvent *);
+ virtual void componentComplete();
+
+private Q_SLOTS:
+ void trackedPositionChanged();
+ void itemsInserted(int index, int count);
+ void itemsRemoved(int index, int count);
+ void itemsMoved(int from, int to, int count);
+ void modelReset();
+ void destroyRemoved();
+ void createdItem(int index, QDeclarativeItem *item);
+ void destroyingItem(QDeclarativeItem *item);
+ void layout();
+
+private:
+ void refill();
+};
+
+class QDeclarativeGridViewAttached : public QObject
+{
+ Q_OBJECT
+public:
+ QDeclarativeGridViewAttached(QObject *parent)
+ : QObject(parent), m_isCurrent(false), m_delayRemove(false) {}
+ ~QDeclarativeGridViewAttached() {}
+
+ Q_PROPERTY(QDeclarativeGridView *view READ view CONSTANT)
+ QDeclarativeGridView *view() { return m_view; }
+
+ Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged)
+ bool isCurrentItem() const { return m_isCurrent; }
+ void setIsCurrentItem(bool c) {
+ if (m_isCurrent != c) {
+ m_isCurrent = c;
+ emit currentItemChanged();
+ }
+ }
+
+ Q_PROPERTY(bool delayRemove READ delayRemove WRITE setDelayRemove NOTIFY delayRemoveChanged)
+ bool delayRemove() const { return m_delayRemove; }
+ void setDelayRemove(bool delay) {
+ if (m_delayRemove != delay) {
+ m_delayRemove = delay;
+ emit delayRemoveChanged();
+ }
+ }
+
+ void emitAdd() { emit add(); }
+ void emitRemove() { emit remove(); }
+
+Q_SIGNALS:
+ void currentItemChanged();
+ void delayRemoveChanged();
+ void add();
+ void remove();
+
+public:
+ QDeclarativeGridView *m_view;
+ bool m_isCurrent : 1;
+ bool m_delayRemove : 1;
+};
+
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeGridView)
+QML_DECLARE_TYPEINFO(QDeclarativeGridView, QML_HAS_ATTACHED_PROPERTIES)
+
+QT_END_HEADER
+
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp
new file mode 100644
index 0000000000..425976fc8c
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp
@@ -0,0 +1,392 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeimage_p.h"
+#include "qdeclarativeimage_p_p.h"
+
+#include <QKeyEvent>
+#include <QPainter>
+
+QT_BEGIN_NAMESPACE
+
+
+/*!
+ \qmlclass Image QDeclarativeImage
+ \since 4.7
+ \brief The Image element allows you to add bitmaps to a scene.
+ \inherits Item
+
+ The Image element supports untransformed, stretched and tiled.
+
+ For an explanation of stretching and tiling, see the fillMode property description.
+
+ Examples:
+ \table
+ \row
+ \o \image declarative-qtlogo1.png
+ \o Untransformed
+ \qml
+ Image { source: "pics/qtlogo.png" }
+ \endqml
+ \row
+ \o \image declarative-qtlogo2.png
+ \o fillMode: Stretch (default)
+ \qml
+ Image {
+ width: 160
+ height: 160
+ source: "pics/qtlogo.png"
+ }
+ \endqml
+ \row
+ \o \image declarative-qtlogo3.png
+ \o fillMode: Tile
+ \qml
+ Image {
+ fillMode: Image.Tile
+ width: 160; height: 160
+ source: "pics/qtlogo.png"
+ }
+ \endqml
+ \row
+ \o \image declarative-qtlogo6.png
+ \o fillMode: TileVertically
+ \qml
+ Image {
+ fillMode: Image.TileVertically
+ width: 160; height: 160
+ source: "pics/qtlogo.png"
+ }
+ \endqml
+ \row
+ \o \image declarative-qtlogo5.png
+ \o fillMode: TileHorizontally
+ \qml
+ Image {
+ fillMode: Image.TileHorizontally
+ width: 160; height: 160
+ source: "pics/qtlogo.png"
+ }
+ \endqml
+ \endtable
+ */
+
+/*!
+ \internal
+ \class QDeclarativeImage Image
+ \brief The QDeclarativeImage class provides an image item that you can add to a QDeclarativeView.
+
+ \ingroup group_coreitems
+
+ Example:
+ \qml
+ Image { source: "pics/star.png" }
+ \endqml
+
+ A QDeclarativeImage object can be instantiated in Qml using the tag \l Image.
+*/
+
+QDeclarativeImage::QDeclarativeImage(QDeclarativeItem *parent)
+ : QDeclarativeImageBase(*(new QDeclarativeImagePrivate), parent)
+{
+}
+
+QDeclarativeImage::QDeclarativeImage(QDeclarativeImagePrivate &dd, QDeclarativeItem *parent)
+ : QDeclarativeImageBase(dd, parent)
+{
+}
+
+QDeclarativeImage::~QDeclarativeImage()
+{
+}
+
+/*!
+ \qmlproperty QPixmap Image::pixmap
+
+ This property holds the QPixmap image to display.
+
+ This is useful for displaying images provided by a C++ implementation,
+ for example, a model may provide a data role of type QPixmap.
+*/
+
+QPixmap QDeclarativeImage::pixmap() const
+{
+ Q_D(const QDeclarativeImage);
+ return d->pix;
+}
+
+void QDeclarativeImage::setPixmap(const QPixmap &pix)
+{
+ Q_D(QDeclarativeImage);
+ if (!d->url.isEmpty())
+ return;
+ d->setPixmap(pix);
+}
+
+void QDeclarativeImagePrivate::setPixmap(const QPixmap &pixmap)
+{
+ Q_Q(QDeclarativeImage);
+ pix = pixmap;
+
+ q->setImplicitWidth(pix.width());
+ q->setImplicitHeight(pix.height());
+ status = pix.isNull() ? QDeclarativeImageBase::Null : QDeclarativeImageBase::Ready;
+
+ q->update();
+ q->pixmapChange();
+}
+
+/*!
+ \qmlproperty enumeration Image::fillMode
+
+ Set this property to define what happens when the image set for the item is smaller
+ than the size of the item.
+
+ \list
+ \o Stretch - the image is scaled to fit
+ \o PreserveAspectFit - the image is scaled uniformly to fit without cropping
+ \o PreserveAspectCrop - the image is scaled uniformly to fill, cropping if necessary
+ \o Tile - the image is duplicated horizontally and vertically
+ \o TileVertically - the image is stretched horizontally and tiled vertically
+ \o TileHorizontally - the image is stretched vertically and tiled horizontally
+ \endlist
+
+ \image declarative-image_fillMode.gif
+*/
+QDeclarativeImage::FillMode QDeclarativeImage::fillMode() const
+{
+ Q_D(const QDeclarativeImage);
+ return d->fillMode;
+}
+
+void QDeclarativeImage::setFillMode(FillMode mode)
+{
+ Q_D(QDeclarativeImage);
+ if (d->fillMode == mode)
+ return;
+ d->fillMode = mode;
+ update();
+ updatePaintedGeometry();
+ emit fillModeChanged();
+}
+
+qreal QDeclarativeImage::paintedWidth() const
+{
+ Q_D(const QDeclarativeImage);
+ return d->paintedWidth;
+}
+
+qreal QDeclarativeImage::paintedHeight() const
+{
+ Q_D(const QDeclarativeImage);
+ return d->paintedHeight;
+}
+
+/*!
+ \qmlproperty enum Image::status
+
+ This property holds the status of image loading. It can be one of:
+ \list
+ \o Null - no image has been set
+ \o Ready - the image has been loaded
+ \o Loading - the image is currently being loaded
+ \o Error - an error occurred while loading the image
+ \endlist
+
+ Note that a change in the status property does not cause anything to happen
+ (although it reflects what has happened with the image internally). If you wish
+ to react to the change in status you need to do it yourself, for example in one
+ of the following ways:
+ \list
+ \o Create a state, so that a state change occurs, e.g. State{name: 'loaded'; when: image.status = Image.Ready;}
+ \o Do something inside the onStatusChanged signal handler, e.g. Image{id: image; onStatusChanged: if(image.status == Image.Ready) console.log('Loaded');}
+ \o Bind to the status variable somewhere, e.g. Text{text: if(image.status!=Image.Ready){'Not Loaded';}else{'Loaded';}}
+ \endlist
+
+ \sa progress
+*/
+
+/*!
+ \qmlproperty real Image::progress
+
+ This property holds the progress of image loading, from 0.0 (nothing loaded)
+ to 1.0 (finished).
+
+ \sa status
+*/
+
+/*!
+ \qmlproperty bool Image::smooth
+
+ Set this property if you want the image to be smoothly filtered when scaled or
+ transformed. Smooth filtering gives better visual quality, but is slower. If
+ the image is displayed at its natural size, this property has no visual or
+ performance effect.
+
+ \note Generally scaling artifacts are only visible if the image is stationary on
+ the screen. A common pattern when animating an image is to disable smooth
+ filtering at the beginning of the animation and reenable it at the conclusion.
+*/
+
+void QDeclarativeImage::updatePaintedGeometry()
+{
+ Q_D(QDeclarativeImage);
+
+ if (d->fillMode == PreserveAspectFit) {
+ if (!d->pix.width() || !d->pix.height())
+ return;
+ qreal widthScale = width() / qreal(d->pix.width());
+ qreal heightScale = height() / qreal(d->pix.height());
+ if (widthScale <= heightScale) {
+ d->paintedWidth = width();
+ d->paintedHeight = widthScale * qreal(d->pix.height());
+ } else if(heightScale < widthScale) {
+ d->paintedWidth = heightScale * qreal(d->pix.width());
+ d->paintedHeight = height();
+ }
+ } else {
+ d->paintedWidth = width();
+ d->paintedHeight = height();
+ }
+ emit paintedGeometryChanged();
+}
+
+void QDeclarativeImage::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
+{
+ QDeclarativeImageBase::geometryChanged(newGeometry, oldGeometry);
+ updatePaintedGeometry();
+}
+
+/*!
+ \qmlproperty url Image::source
+
+ Image can handle any image format supported by Qt, loaded from any URL scheme supported by Qt.
+
+ The URL may be absolute, or relative to the URL of the component.
+*/
+
+/*!
+ \qmlproperty bool Image::asynchronous
+
+ Specifies that images on the local filesystem should be loaded
+ asynchronously in a separate thread. The default value is
+ false, causing the user interface thread to block while the
+ image is loaded. Setting \a asynchronous to true is useful where
+ maintaining a responsive user interface is more desireable
+ than having images immediately visible.
+
+ Note that this property is only valid for images read from the
+ local filesystem. Images loaded via a network resource (e.g. HTTP)
+ are always loaded asynchonously.
+*/
+
+void QDeclarativeImage::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ Q_D(QDeclarativeImage);
+ if (d->pix.isNull())
+ return;
+
+ bool oldAA = p->testRenderHint(QPainter::Antialiasing);
+ bool oldSmooth = p->testRenderHint(QPainter::SmoothPixmapTransform);
+ if (d->smooth)
+ p->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, d->smooth);
+
+ if (width() != d->pix.width() || height() != d->pix.height()) {
+ if (d->fillMode >= Tile) {
+ if (d->fillMode == Tile)
+ p->drawTiledPixmap(QRectF(0,0,width(),height()), d->pix);
+ else if (d->fillMode == TileVertically)
+ p->drawTiledPixmap(QRectF(0,0,d->pix.width(),height()), d->pix);
+ else
+ p->drawTiledPixmap(QRectF(0,0,width(),d->pix.height()), d->pix);
+ } else {
+ qreal widthScale = width() / qreal(d->pix.width());
+ qreal heightScale = height() / qreal(d->pix.height());
+
+ QTransform scale;
+
+ if (d->fillMode == PreserveAspectFit) {
+ if (widthScale <= heightScale) {
+ heightScale = widthScale;
+ scale.translate(0, (height() - heightScale * d->pix.height()) / 2);
+ } else if(heightScale < widthScale) {
+ widthScale = heightScale;
+ scale.translate((width() - widthScale * d->pix.width()) / 2, 0);
+ }
+ } else if (d->fillMode == PreserveAspectCrop) {
+ if (widthScale < heightScale) {
+ widthScale = heightScale;
+ scale.translate((width() - widthScale * d->pix.width()) / 2, 0);
+ } else if(heightScale < widthScale) {
+ heightScale = widthScale;
+ scale.translate(0, (height() - heightScale * d->pix.height()) / 2);
+ }
+ }
+ if (clip()) {
+ p->save();
+ p->setClipRect(boundingRect(), Qt::IntersectClip);
+ }
+ scale.scale(widthScale, heightScale);
+ QTransform old = p->transform();
+ p->setWorldTransform(scale * old);
+ p->drawPixmap(0, 0, d->pix);
+ p->setWorldTransform(old);
+ if (clip()) {
+ p->restore();
+ }
+ }
+ } else {
+ p->drawPixmap(0, 0, d->pix);
+ }
+
+ if (d->smooth) {
+ p->setRenderHint(QPainter::Antialiasing, oldAA);
+ p->setRenderHint(QPainter::SmoothPixmapTransform, oldSmooth);
+ }
+}
+
+void QDeclarativeImage::pixmapChange()
+{
+ updatePaintedGeometry();
+ emit pixmapChanged();
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativeimage_p.h b/src/declarative/graphicsitems/qdeclarativeimage_p.h
new file mode 100644
index 0000000000..da6cbd5a9d
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeimage_p.h
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEIMAGE_H
+#define QDECLARATIVEIMAGE_H
+
+#include "qdeclarativeimagebase_p.h"
+
+#include <QtNetwork/qnetworkreply.h>
+
+QT_BEGIN_HEADER
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeImagePrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeImage : public QDeclarativeImageBase
+{
+ Q_OBJECT
+ Q_ENUMS(FillMode)
+
+ Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap NOTIFY pixmapChanged DESIGNABLE false)
+ Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode NOTIFY fillModeChanged)
+ Q_PROPERTY(qreal paintedWidth READ paintedWidth NOTIFY paintedGeometryChanged)
+ Q_PROPERTY(qreal paintedHeight READ paintedHeight NOTIFY paintedGeometryChanged)
+
+public:
+ QDeclarativeImage(QDeclarativeItem *parent=0);
+ ~QDeclarativeImage();
+
+ enum FillMode { Stretch, PreserveAspectFit, PreserveAspectCrop, Tile, TileVertically, TileHorizontally };
+ FillMode fillMode() const;
+ void setFillMode(FillMode);
+
+ QPixmap pixmap() const;
+ void setPixmap(const QPixmap &);
+
+ qreal paintedWidth() const;
+ qreal paintedHeight() const;
+
+ void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
+
+Q_SIGNALS:
+ void pixmapChanged();
+ void fillModeChanged();
+ void paintedGeometryChanged();
+
+protected:
+ QDeclarativeImage(QDeclarativeImagePrivate &dd, QDeclarativeItem *parent);
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry);
+ void pixmapChange();
+
+protected Q_SLOTS:
+ void updatePaintedGeometry();
+
+private:
+ Q_DISABLE_COPY(QDeclarativeImage)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeImage)
+};
+
+QT_END_NAMESPACE
+QML_DECLARE_TYPE(QDeclarativeImage)
+QT_END_HEADER
+
+#endif // QDECLARATIVEIMAGE_H
diff --git a/src/declarative/graphicsitems/qdeclarativeimage_p_p.h b/src/declarative/graphicsitems/qdeclarativeimage_p_p.h
new file mode 100644
index 0000000000..8102237e49
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeimage_p_p.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEIMAGE_P_H
+#define QDECLARATIVEIMAGE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeitem_p.h"
+#include "qdeclarativeimagebase_p_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeImagePrivate : public QDeclarativeImageBasePrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeImage)
+
+public:
+ QDeclarativeImagePrivate()
+ : fillMode(QDeclarativeImage::Stretch), paintedWidth(0), paintedHeight(0)
+ {
+ }
+
+ QDeclarativeImage::FillMode fillMode;
+ qreal paintedWidth;
+ qreal paintedHeight;
+ void setPixmap(const QPixmap &pix);
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEIMAGE_P_H
diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
new file mode 100644
index 0000000000..e65c9d1da6
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
@@ -0,0 +1,224 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeimagebase_p.h"
+#include "qdeclarativeimagebase_p_p.h"
+
+#include <qdeclarativeengine.h>
+#include <qdeclarativepixmapcache_p.h>
+
+#include <QFile>
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeImageBase::QDeclarativeImageBase(QDeclarativeImageBasePrivate &dd, QDeclarativeItem *parent)
+ : QDeclarativeItem(dd, parent)
+{
+}
+
+QDeclarativeImageBase::~QDeclarativeImageBase()
+{
+ Q_D(QDeclarativeImageBase);
+ if (d->pendingPixmapCache)
+ QDeclarativePixmapCache::cancel(d->url, this);
+}
+
+QDeclarativeImageBase::Status QDeclarativeImageBase::status() const
+{
+ Q_D(const QDeclarativeImageBase);
+ return d->status;
+}
+
+
+qreal QDeclarativeImageBase::progress() const
+{
+ Q_D(const QDeclarativeImageBase);
+ return d->progress;
+}
+
+
+bool QDeclarativeImageBase::asynchronous() const
+{
+ Q_D(const QDeclarativeImageBase);
+ return d->async;
+}
+
+void QDeclarativeImageBase::setAsynchronous(bool async)
+{
+ Q_D(QDeclarativeImageBase);
+ if (d->async != async) {
+ d->async = async;
+ emit asynchronousChanged();
+ }
+}
+
+
+QUrl QDeclarativeImageBase::source() const
+{
+ Q_D(const QDeclarativeImageBase);
+ return d->url;
+}
+
+void QDeclarativeImageBase::setSource(const QUrl &url)
+{
+ Q_D(QDeclarativeImageBase);
+ //equality is fairly expensive, so we bypass for simple, common case
+ if ((d->url.isEmpty() == url.isEmpty()) && url == d->url)
+ return;
+
+ if (d->pendingPixmapCache) {
+ QDeclarativePixmapCache::cancel(d->url, this);
+ d->pendingPixmapCache = false;
+ }
+
+ d->url = url;
+ emit sourceChanged(d->url);
+
+ if (isComponentComplete())
+ load();
+}
+
+void QDeclarativeImageBase::load()
+{
+ Q_D(QDeclarativeImageBase);
+ if (d->progress != 0.0) {
+ d->progress = 0.0;
+ emit progressChanged(d->progress);
+ }
+
+ if (d->url.isEmpty()) {
+ d->pix = QPixmap();
+ d->status = Null;
+ setImplicitWidth(0);
+ setImplicitHeight(0);
+ emit statusChanged(d->status);
+ pixmapChange();
+ update();
+ } else {
+ d->status = Loading;
+ QDeclarativePixmapReply::Status status = QDeclarativePixmapCache::get(d->url, &d->pix, d->async);
+ if (status != QDeclarativePixmapReply::Ready && status != QDeclarativePixmapReply::Error) {
+ QDeclarativePixmapReply *reply = QDeclarativePixmapCache::request(qmlEngine(this), d->url);
+ d->pendingPixmapCache = true;
+
+ static int replyDownloadProgress = -1;
+ static int replyFinished = -1;
+ static int thisRequestProgress = -1;
+ static int thisRequestFinished = -1;
+ if (replyDownloadProgress == -1) {
+ replyDownloadProgress =
+ QDeclarativePixmapReply::staticMetaObject.indexOfSignal("downloadProgress(qint64,qint64)");
+ replyFinished =
+ QDeclarativePixmapReply::staticMetaObject.indexOfSignal("finished()");
+ thisRequestProgress =
+ QDeclarativeImageBase::staticMetaObject.indexOfSlot("requestProgress(qint64,qint64)");
+ thisRequestFinished =
+ QDeclarativeImageBase::staticMetaObject.indexOfSlot("requestFinished()");
+ }
+
+ QMetaObject::connect(reply, replyFinished, this,
+ thisRequestFinished, Qt::DirectConnection);
+ QMetaObject::connect(reply, replyDownloadProgress, this,
+ thisRequestProgress, Qt::DirectConnection);
+ } else {
+ //### should be unified with requestFinished
+ if (status == QDeclarativePixmapReply::Ready) {
+ setImplicitWidth(d->pix.width());
+ setImplicitHeight(d->pix.height());
+
+ if (d->status == Loading)
+ d->status = Ready;
+ } else {
+ d->status = Error;
+ }
+ d->progress = 1.0;
+ emit statusChanged(d->status);
+ emit progressChanged(d->progress);
+ pixmapChange();
+ update();
+ }
+ }
+
+ emit statusChanged(d->status);
+}
+
+void QDeclarativeImageBase::requestFinished()
+{
+ Q_D(QDeclarativeImageBase);
+
+ d->pendingPixmapCache = false;
+
+ if (QDeclarativePixmapCache::get(d->url, &d->pix, d->async) != QDeclarativePixmapReply::Ready)
+ d->status = Error;
+ setImplicitWidth(d->pix.width());
+ setImplicitHeight(d->pix.height());
+
+ if (d->status == Loading)
+ d->status = Ready;
+ d->progress = 1.0;
+ emit statusChanged(d->status);
+ emit progressChanged(1.0);
+ pixmapChange();
+ update();
+}
+
+void QDeclarativeImageBase::requestProgress(qint64 received, qint64 total)
+{
+ Q_D(QDeclarativeImageBase);
+ if (d->status == Loading && total > 0) {
+ d->progress = qreal(received)/total;
+ emit progressChanged(d->progress);
+ }
+}
+
+void QDeclarativeImageBase::componentComplete()
+{
+ Q_D(QDeclarativeImageBase);
+ QDeclarativeItem::componentComplete();
+ if (d->url.isValid())
+ load();
+}
+
+void QDeclarativeImageBase::pixmapChange()
+{
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h
new file mode 100644
index 0000000000..b215193674
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEIMAGEBASE_H
+#define QDECLARATIVEIMAGEBASE_H
+
+#include "qdeclarativeitem.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeImageBasePrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeImageBase : public QDeclarativeItem
+{
+ Q_OBJECT
+ Q_ENUMS(Status)
+
+ Q_PROPERTY(Status status READ status NOTIFY statusChanged)
+ Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
+ Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged)
+ Q_PROPERTY(bool asynchronous READ asynchronous WRITE setAsynchronous NOTIFY asynchronousChanged)
+
+public:
+ ~QDeclarativeImageBase();
+ enum Status { Null, Ready, Loading, Error };
+ Status status() const;
+ qreal progress() const;
+
+ QUrl source() const;
+ virtual void setSource(const QUrl &url);
+
+ bool asynchronous() const;
+ void setAsynchronous(bool);
+
+Q_SIGNALS:
+ void sourceChanged(const QUrl &);
+ void statusChanged(Status);
+ void progressChanged(qreal progress);
+ void asynchronousChanged();
+
+protected:
+ virtual void load();
+ virtual void componentComplete();
+ virtual void pixmapChange();
+ QDeclarativeImageBase(QDeclarativeImageBasePrivate &dd, QDeclarativeItem *parent);
+
+private Q_SLOTS:
+ virtual void requestFinished();
+ void requestProgress(qint64,qint64);
+
+private:
+ Q_DISABLE_COPY(QDeclarativeImageBase)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeImageBase)
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEIMAGEBASE_H
diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h b/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h
new file mode 100644
index 0000000000..c4a61f34cc
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h
@@ -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 QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEIMAGEBASE_P_H
+#define QDECLARATIVEIMAGEBASE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeitem_p.h"
+
+#include <QtCore/QPointer>
+
+QT_BEGIN_NAMESPACE
+
+class QNetworkReply;
+class QDeclarativeImageBasePrivate : public QDeclarativeItemPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeImageBase)
+
+public:
+ QDeclarativeImageBasePrivate()
+ : status(QDeclarativeImageBase::Null),
+ progress(0.0),
+ pendingPixmapCache(false),
+ async(false)
+ {
+ QGraphicsItemPrivate::flags = QGraphicsItemPrivate::flags & ~QGraphicsItem::ItemHasNoContents;
+ }
+
+ QPixmap pix;
+ QDeclarativeImageBase::Status status;
+ QUrl url;
+ qreal progress;
+ bool pendingPixmapCache : 1;
+ bool async : 1;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
new file mode 100644
index 0000000000..c7d7a4c251
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -0,0 +1,2996 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeitem_p.h"
+#include "qdeclarativeitem.h"
+
+#include "qdeclarativeevents_p_p.h"
+#include <private/qdeclarativeengine_p.h>
+
+#include <qfxperf_p_p.h>
+#include <qdeclarativeengine.h>
+#include <qdeclarativeopenmetaobject_p.h>
+#include <qdeclarativestate_p.h>
+#include <qdeclarativeview.h>
+#include <qdeclarativestategroup_p.h>
+#include <qdeclarativecomponent.h>
+#include <qdeclarativeinfo.h>
+
+#include <QDebug>
+#include <QPen>
+#include <QFile>
+#include <QEvent>
+#include <QGraphicsSceneMouseEvent>
+#include <QtCore/qnumeric.h>
+#include <QtScript/qscriptengine.h>
+#include <QtGui/qgraphicstransform.h>
+#include <QtGui/qgraphicseffect.h>
+#include <qlistmodelinterface_p.h>
+
+QT_BEGIN_NAMESPACE
+
+#ifndef FLT_MAX
+#define FLT_MAX 1E+37
+#endif
+
+#include "qdeclarativeeffects.cpp"
+
+/*!
+ \qmlclass Transform QGraphicsTransform
+ \since 4.7
+ \brief The Transform elements provide a way of building advanced transformations on Items.
+
+ The Transform elements let you create and control advanced transformations that can be configured
+ independently using specialized properties.
+
+ You can assign any number of Transform elements to an Item. Each Transform is applied in order,
+ one at a time, to the Item it's assigned to.
+
+ \sa Rotation, Scale
+*/
+
+/*!
+ \qmlclass Scale QGraphicsScale
+ \since 4.7
+ \brief The Scale object provides a way to scale an Item.
+
+ The Scale object gives more control over scaling than using Item's scale property. Specifically,
+ it allows a different scale for the x and y axes, and allows the scale to be relative to an
+ arbitrary point.
+
+ The following example scales the X axis of the Rectangle, relative to its interior point 25, 25:
+ \qml
+ Rectangle {
+ width: 100; height: 100
+ color: "blue"
+ transform: Scale { origin.x: 25; origin.y: 25; xScale: 3}
+ }
+ \endqml
+*/
+
+/*!
+ \qmlproperty real Scale::origin.x
+ \qmlproperty real Scale::origin.y
+
+ The point that the item is scaled from (i.e., the point that stays fixed relative to the parent as
+ the rest of the item grows). By default the origin is 0, 0.
+*/
+
+/*!
+ \qmlproperty real Scale::xScale
+
+ The scaling factor for the X axis.
+*/
+
+/*!
+ \qmlproperty real Scale::yScale
+
+ The scaling factor for the Y axis.
+*/
+
+/*!
+ \qmlclass Rotation QGraphicsRotation
+ \since 4.7
+ \brief The Rotation object provides a way to rotate an Item.
+
+ The Rotation object gives more control over rotation than using Item's rotation property.
+ Specifically, it allows (z axis) rotation to be relative to an arbitrary point.
+
+ The following example rotates a Rectangle around its interior point 25, 25:
+ \qml
+ Rectangle {
+ width: 100; height: 100
+ color: "blue"
+ transform: Rotation { origin.x: 25; origin.y: 25; angle: 45}
+ }
+ \endqml
+
+ Rotation also provides a way to specify 3D-like rotations for Items. For these types of
+ rotations you must specify the axis to rotate around in addition to the origin point.
+
+ The following example shows various 3D-like rotations applied to an \l Image.
+ \snippet doc/src/snippets/declarative/rotation.qml 0
+
+ \image axisrotation.png
+*/
+
+/*!
+ \qmlproperty real Rotation::origin.x
+ \qmlproperty real Rotation::origin.y
+
+ The origin point of the rotation (i.e., the point that stays fixed relative to the parent as
+ the rest of the item rotates). By default the origin is 0, 0.
+*/
+
+/*!
+ \qmlproperty real Rotation::axis.x
+ \qmlproperty real Rotation::axis.y
+ \qmlproperty real Rotation::axis.z
+
+ The axis to rotate around. For simple (2D) rotation around a point, you do not need to specify an axis,
+ as the default axis is the z axis (\c{ axis { x: 0; y: 0; z: 1 } }).
+
+ For a typical 3D-like rotation you will usually specify both the origin and the axis.
+
+ \image 3d-rotation-axis.png
+*/
+
+/*!
+ \qmlproperty real Rotation::angle
+
+ The angle to rotate, in degrees clockwise.
+*/
+
+
+/*!
+ \group group_animation
+ \title Animation
+*/
+
+/*!
+ \group group_coreitems
+ \title Basic Items
+*/
+
+/*!
+ \group group_effects
+ \title Effects
+*/
+
+/*!
+ \group group_layouts
+ \title Layouts
+*/
+
+/*!
+ \group group_states
+ \title States and Transitions
+*/
+
+/*!
+ \group group_utility
+ \title Utility
+*/
+
+/*!
+ \group group_views
+ \title Views
+*/
+
+/*!
+ \group group_widgets
+ \title Widgets
+*/
+
+/*!
+ \internal
+ \class QDeclarativeContents
+ \ingroup group_utility
+ \brief The QDeclarativeContents class gives access to the height and width of an item's contents.
+
+*/
+
+QDeclarativeContents::QDeclarativeContents() : m_x(0), m_y(0), m_width(0), m_height(0)
+{
+}
+
+/*!
+ \qmlproperty real Item::childrenRect.x
+ \qmlproperty real Item::childrenRect.y
+ \qmlproperty real Item::childrenRect.width
+ \qmlproperty real Item::childrenRect.height
+
+ The childrenRect properties allow an item access to the geometry of its
+ children. This property is useful if you have an item that needs to be
+ sized to fit its children.
+*/
+
+QRectF QDeclarativeContents::rectF() const
+{
+ return QRectF(m_x, m_y, m_width, m_height);
+}
+
+//TODO: optimization: only check sender(), if there is one
+void QDeclarativeContents::calcHeight()
+{
+ qreal oldy = m_y;
+ qreal oldheight = m_height;
+
+ qreal top = FLT_MAX;
+ qreal bottom = 0;
+
+ QList<QGraphicsItem *> children = m_item->childItems();
+ for (int i = 0; i < children.count(); ++i) {
+ QDeclarativeItem *child = qobject_cast<QDeclarativeItem *>(children.at(i));
+ if(!child)//### Should this be ignoring non-QDeclarativeItem graphicsobjects?
+ continue;
+ qreal y = child->y();
+ if (y + child->height() > bottom)
+ bottom = y + child->height();
+ if (y < top)
+ top = y;
+ }
+ if (!children.isEmpty())
+ m_y = top;
+ m_height = qMax(bottom - top, qreal(0.0));
+
+ if (m_height != oldheight || m_y != oldy)
+ emit rectChanged();
+}
+
+//TODO: optimization: only check sender(), if there is one
+void QDeclarativeContents::calcWidth()
+{
+ qreal oldx = m_x;
+ qreal oldwidth = m_width;
+
+ qreal left = FLT_MAX;
+ qreal right = 0;
+
+ QList<QGraphicsItem *> children = m_item->childItems();
+ for (int i = 0; i < children.count(); ++i) {
+ QDeclarativeItem *child = qobject_cast<QDeclarativeItem *>(children.at(i));
+ if(!child)//### Should this be ignoring non-QDeclarativeItem graphicsobjects?
+ continue;
+ qreal x = child->x();
+ if (x + child->width() > right)
+ right = x + child->width();
+ if (x < left)
+ left = x;
+ }
+ if (!children.isEmpty())
+ m_x = left;
+ m_width = qMax(right - left, qreal(0.0));
+
+ if (m_width != oldwidth || m_x != oldx)
+ emit rectChanged();
+}
+
+void QDeclarativeContents::setItem(QDeclarativeItem *item)
+{
+ m_item = item;
+
+ QList<QGraphicsItem *> children = m_item->childItems();
+ for (int i = 0; i < children.count(); ++i) {
+ QDeclarativeItem *child = qobject_cast<QDeclarativeItem *>(children.at(i));
+ if(!child)//### Should this be ignoring non-QDeclarativeItem graphicsobjects?
+ continue;
+ connect(child, SIGNAL(heightChanged()), this, SLOT(calcHeight()));
+ connect(child, SIGNAL(yChanged()), this, SLOT(calcHeight()));
+ connect(child, SIGNAL(widthChanged()), this, SLOT(calcWidth()));
+ connect(child, SIGNAL(xChanged()), this, SLOT(calcWidth()));
+ connect(this, SIGNAL(rectChanged()), m_item, SIGNAL(childrenRectChanged()));
+ }
+
+ calcHeight();
+ calcWidth();
+}
+
+QDeclarativeItemKeyFilter::QDeclarativeItemKeyFilter(QDeclarativeItem *item)
+: m_next(0)
+{
+ QDeclarativeItemPrivate *p =
+ item?static_cast<QDeclarativeItemPrivate *>(QGraphicsItemPrivate::get(item)):0;
+ if (p) {
+ m_next = p->keyHandler;
+ p->keyHandler = this;
+ }
+}
+
+QDeclarativeItemKeyFilter::~QDeclarativeItemKeyFilter()
+{
+}
+
+void QDeclarativeItemKeyFilter::keyPressed(QKeyEvent *event)
+{
+ if (m_next) m_next->keyPressed(event);
+}
+
+void QDeclarativeItemKeyFilter::keyReleased(QKeyEvent *event)
+{
+ if (m_next) m_next->keyReleased(event);
+}
+
+void QDeclarativeItemKeyFilter::inputMethodEvent(QInputMethodEvent *event)
+{
+ if (m_next) m_next->inputMethodEvent(event);
+}
+
+QVariant QDeclarativeItemKeyFilter::inputMethodQuery(Qt::InputMethodQuery query) const
+{
+ if (m_next) return m_next->inputMethodQuery(query);
+ return QVariant();
+}
+
+void QDeclarativeItemKeyFilter::componentComplete()
+{
+ if (m_next) m_next->componentComplete();
+}
+
+
+/*!
+ \qmlclass KeyNavigation
+ \since 4.7
+ \brief The KeyNavigation attached property supports key navigation by arrow keys.
+
+ It is common in key-based UIs to use arrow keys to navigate
+ between focussed items. The KeyNavigation property provides a
+ convenient way of specifying which item will gain focus
+ when an arrow key is pressed. The following example provides
+ key navigation for a 2x2 grid of items.
+
+ \code
+ Grid {
+ columns: 2
+ width: 100; height: 100
+ Rectangle {
+ id: item1
+ focus: true
+ width: 50; height: 50
+ color: focus ? "red" : "lightgray"
+ KeyNavigation.right: item2
+ KeyNavigation.down: item3
+ }
+ Rectangle {
+ id: item2
+ width: 50; height: 50
+ color: focus ? "red" : "lightgray"
+ KeyNavigation.left: item1
+ KeyNavigation.down: item4
+ }
+ Rectangle {
+ id: item3
+ width: 50; height: 50
+ color: focus ? "red" : "lightgray"
+ KeyNavigation.right: item4
+ KeyNavigation.up: item1
+ }
+ Rectangle {
+ id: item4
+ width: 50; height: 50
+ color: focus ? "red" : "lightgray"
+ KeyNavigation.left: item3
+ KeyNavigation.up: item2
+ }
+ }
+ \endcode
+
+ KeyNavigation receives key events after the item it is attached to.
+ If the item accepts an arrow key event, the KeyNavigation
+ attached property will not receive an event for that key.
+
+ If an item has been set for a direction and the KeyNavigation
+ attached property receives the corresponding
+ key press and release events, the events will be accepted by
+ KeyNaviagtion and will not propagate any further.
+
+ \sa {Keys}{Keys attached property}
+*/
+
+/*!
+ \qmlproperty Item KeyNavigation::left
+ \qmlproperty Item KeyNavigation::right
+ \qmlproperty Item KeyNavigation::up
+ \qmlproperty Item KeyNavigation::down
+
+ These properties hold the item to assign focus to
+ when Key_Left, Key_Right, Key_Up or Key_Down are
+ pressed.
+*/
+
+QDeclarativeKeyNavigationAttached::QDeclarativeKeyNavigationAttached(QObject *parent)
+: QObject(*(new QDeclarativeKeyNavigationAttachedPrivate), parent),
+ QDeclarativeItemKeyFilter(qobject_cast<QDeclarativeItem*>(parent))
+{
+}
+
+QDeclarativeKeyNavigationAttached *
+QDeclarativeKeyNavigationAttached::qmlAttachedProperties(QObject *obj)
+{
+ return new QDeclarativeKeyNavigationAttached(obj);
+}
+
+QDeclarativeItem *QDeclarativeKeyNavigationAttached::left() const
+{
+ Q_D(const QDeclarativeKeyNavigationAttached);
+ return d->left;
+}
+
+void QDeclarativeKeyNavigationAttached::setLeft(QDeclarativeItem *i)
+{
+ Q_D(QDeclarativeKeyNavigationAttached);
+ d->left = i;
+ emit changed();
+}
+
+QDeclarativeItem *QDeclarativeKeyNavigationAttached::right() const
+{
+ Q_D(const QDeclarativeKeyNavigationAttached);
+ return d->right;
+}
+
+void QDeclarativeKeyNavigationAttached::setRight(QDeclarativeItem *i)
+{
+ Q_D(QDeclarativeKeyNavigationAttached);
+ d->right = i;
+ emit changed();
+}
+
+QDeclarativeItem *QDeclarativeKeyNavigationAttached::up() const
+{
+ Q_D(const QDeclarativeKeyNavigationAttached);
+ return d->up;
+}
+
+void QDeclarativeKeyNavigationAttached::setUp(QDeclarativeItem *i)
+{
+ Q_D(QDeclarativeKeyNavigationAttached);
+ d->up = i;
+ emit changed();
+}
+
+QDeclarativeItem *QDeclarativeKeyNavigationAttached::down() const
+{
+ Q_D(const QDeclarativeKeyNavigationAttached);
+ return d->down;
+}
+
+void QDeclarativeKeyNavigationAttached::setDown(QDeclarativeItem *i)
+{
+ Q_D(QDeclarativeKeyNavigationAttached);
+ d->down = i;
+ emit changed();
+}
+
+QDeclarativeItem *QDeclarativeKeyNavigationAttached::tab() const
+{
+ Q_D(const QDeclarativeKeyNavigationAttached);
+ return d->tab;
+}
+
+void QDeclarativeKeyNavigationAttached::setTab(QDeclarativeItem *i)
+{
+ Q_D(QDeclarativeKeyNavigationAttached);
+ d->tab = i;
+ emit changed();
+}
+
+QDeclarativeItem *QDeclarativeKeyNavigationAttached::backtab() const
+{
+ Q_D(const QDeclarativeKeyNavigationAttached);
+ return d->backtab;
+}
+
+void QDeclarativeKeyNavigationAttached::setBacktab(QDeclarativeItem *i)
+{
+ Q_D(QDeclarativeKeyNavigationAttached);
+ d->backtab = i;
+ emit changed();
+}
+
+void QDeclarativeKeyNavigationAttached::keyPressed(QKeyEvent *event)
+{
+ Q_D(QDeclarativeKeyNavigationAttached);
+
+ event->ignore();
+
+ switch(event->key()) {
+ case Qt::Key_Left:
+ if (d->left) {
+ d->left->setFocus(true);
+ event->accept();
+ }
+ break;
+ case Qt::Key_Right:
+ if (d->right) {
+ d->right->setFocus(true);
+ event->accept();
+ }
+ break;
+ case Qt::Key_Up:
+ if (d->up) {
+ d->up->setFocus(true);
+ event->accept();
+ }
+ break;
+ case Qt::Key_Down:
+ if (d->down) {
+ d->down->setFocus(true);
+ event->accept();
+ }
+ break;
+ case Qt::Key_Tab:
+ if (d->tab) {
+ d->tab->setFocus(true);
+ event->accept();
+ }
+ break;
+ case Qt::Key_Backtab:
+ if (d->backtab) {
+ d->backtab->setFocus(true);
+ event->accept();
+ }
+ break;
+ default:
+ break;
+ }
+
+ if (!event->isAccepted()) QDeclarativeItemKeyFilter::keyPressed(event);
+}
+
+void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event)
+{
+ Q_D(QDeclarativeKeyNavigationAttached);
+
+ event->ignore();
+
+ switch(event->key()) {
+ case Qt::Key_Left:
+ if (d->left) {
+ event->accept();
+ }
+ break;
+ case Qt::Key_Right:
+ if (d->right) {
+ event->accept();
+ }
+ break;
+ case Qt::Key_Up:
+ if (d->up) {
+ event->accept();
+ }
+ break;
+ case Qt::Key_Down:
+ if (d->down) {
+ event->accept();
+ }
+ break;
+ case Qt::Key_Tab:
+ if (d->tab) {
+ event->accept();
+ }
+ break;
+ case Qt::Key_Backtab:
+ if (d->backtab) {
+ event->accept();
+ }
+ break;
+ default:
+ break;
+ }
+
+ if (!event->isAccepted()) QDeclarativeItemKeyFilter::keyReleased(event);
+}
+
+/*!
+ \qmlclass Keys
+ \since 4.7
+ \brief The Keys attached property provides key handling to Items.
+
+ All visual primitives support key handling via the \e Keys
+ attached property. Keys can be handled via the \e onPressed
+ and \e onReleased signal properties.
+
+ The signal properties have a \l KeyEvent parameter, named
+ \e event which contains details of the event. If a key is
+ handled \e event.accepted should be set to true to prevent the
+ event from propagating up the item heirarchy.
+
+ \code
+ Item {
+ focus: true
+ Keys.onPressed: {
+ if (event.key == Qt.Key_Left) {
+ console.log("move left");
+ event.accepted = true;
+ }
+ }
+ }
+ \endcode
+
+ Some keys may alternatively be handled via specific signal properties,
+ for example \e onSelectPressed. These handlers automatically set
+ \e event.accepted to true.
+
+ \code
+ Item {
+ focus: true
+ Keys.onLeftPressed: console.log("move left")
+ }
+ \endcode
+
+ See \l {Qt::Key}{Qt.Key} for the list of keyboard codes.
+
+ \sa KeyEvent, {KeyNavigation}{KeyNavigation attached property}
+*/
+
+/*!
+ \qmlproperty bool Keys::enabled
+
+ This flags enables key handling if true (default); otherwise
+ no key handlers will be called.
+*/
+
+/*!
+ \qmlproperty List<Object> Keys::forwardTo
+
+ This property provides a way to forward key presses, key releases, and keyboard input
+ coming from input methods to other items. This can be useful when you want
+ one item to handle some keys (e.g. the up and down arrow keys), and another item to
+ handle other keys (e.g. the left and right arrow keys). Once an item that has been
+ forwarded keys accepts the event it is no longer forwarded to items later in the
+ list.
+
+ This example forwards key events to two lists:
+ \qml
+ ListView { id: list1 ... }
+ ListView { id: list2 ... }
+ Keys.forwardTo: [list1, list2]
+ focus: true
+ \endqml
+*/
+
+/*!
+ \qmlsignal Keys::onPressed(event)
+
+ This handler is called when a key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onReleased(event)
+
+ This handler is called when a key has been released. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onDigit0Pressed(event)
+
+ This handler is called when the digit '0' has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onDigit1Pressed(event)
+
+ This handler is called when the digit '1' has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onDigit2Pressed(event)
+
+ This handler is called when the digit '2' has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onDigit3Pressed(event)
+
+ This handler is called when the digit '3' has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onDigit4Pressed(event)
+
+ This handler is called when the digit '4' has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onDigit5Pressed(event)
+
+ This handler is called when the digit '5' has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onDigit6Pressed(event)
+
+ This handler is called when the digit '6' has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onDigit7Pressed(event)
+
+ This handler is called when the digit '7' has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onDigit8Pressed(event)
+
+ This handler is called when the digit '8' has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onDigit9Pressed(event)
+
+ This handler is called when the digit '9' has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onLeftPressed(event)
+
+ This handler is called when the Left arrow has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onRightPressed(event)
+
+ This handler is called when the Right arrow has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onUpPressed(event)
+
+ This handler is called when the Up arrow has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onDownPressed(event)
+
+ This handler is called when the Down arrow has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onAsteriskPressed(event)
+
+ This handler is called when the Asterisk '*' has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onEscapePressed(event)
+
+ This handler is called when the Escape key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onReturnPressed(event)
+
+ This handler is called when the Return key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onEnterPressed(event)
+
+ This handler is called when the Enter key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onDeletePressed(event)
+
+ This handler is called when the Delete key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onSpacePressed(event)
+
+ This handler is called when the Space key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onBackPressed(event)
+
+ This handler is called when the Back key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onCancelPressed(event)
+
+ This handler is called when the Cancel key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onSelectPressed(event)
+
+ This handler is called when the Select key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onYesPressed(event)
+
+ This handler is called when the Yes key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onNoPressed(event)
+
+ This handler is called when the No key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onContext1Pressed(event)
+
+ This handler is called when the Context1 key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onContext2Pressed(event)
+
+ This handler is called when the Context2 key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onContext3Pressed(event)
+
+ This handler is called when the Context3 key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onContext4Pressed(event)
+
+ This handler is called when the Context4 key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onCallPressed(event)
+
+ This handler is called when the Call key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onHangupPressed(event)
+
+ This handler is called when the Hangup key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onFlipPressed(event)
+
+ This handler is called when the Flip key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onMenuPressed(event)
+
+ This handler is called when the Menu key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onVolumeUpPressed(event)
+
+ This handler is called when the VolumeUp key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onVolumeDownPressed(event)
+
+ This handler is called when the VolumeDown key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+const QDeclarativeKeysAttached::SigMap QDeclarativeKeysAttached::sigMap[] = {
+ { Qt::Key_Left, "leftPressed" },
+ { Qt::Key_Right, "rightPressed" },
+ { Qt::Key_Up, "upPressed" },
+ { Qt::Key_Down, "downPressed" },
+ { Qt::Key_Tab, "tabPressed" },
+ { Qt::Key_Backtab, "backtabPressed" },
+ { Qt::Key_Asterisk, "asteriskPressed" },
+ { Qt::Key_NumberSign, "numberSignPressed" },
+ { Qt::Key_Escape, "escapePressed" },
+ { Qt::Key_Return, "returnPressed" },
+ { Qt::Key_Enter, "enterPressed" },
+ { Qt::Key_Delete, "deletePressed" },
+ { Qt::Key_Space, "spacePressed" },
+ { Qt::Key_Back, "backPressed" },
+ { Qt::Key_Cancel, "cancelPressed" },
+ { Qt::Key_Select, "selectPressed" },
+ { Qt::Key_Yes, "yesPressed" },
+ { Qt::Key_No, "noPressed" },
+ { Qt::Key_Context1, "context1Pressed" },
+ { Qt::Key_Context2, "context2Pressed" },
+ { Qt::Key_Context3, "context3Pressed" },
+ { Qt::Key_Context4, "context4Pressed" },
+ { Qt::Key_Call, "callPressed" },
+ { Qt::Key_Hangup, "hangupPressed" },
+ { Qt::Key_Flip, "flipPressed" },
+ { Qt::Key_Menu, "menuPressed" },
+ { Qt::Key_VolumeUp, "volumeUpPressed" },
+ { Qt::Key_VolumeDown, "volumeDownPressed" },
+ { 0, 0 }
+};
+
+bool QDeclarativeKeysAttachedPrivate::isConnected(const char *signalName)
+{
+ return isSignalConnected(signalIndex(signalName));
+}
+
+QDeclarativeKeysAttached::QDeclarativeKeysAttached(QObject *parent)
+: QObject(*(new QDeclarativeKeysAttachedPrivate), parent),
+ QDeclarativeItemKeyFilter(qobject_cast<QDeclarativeItem*>(parent))
+{
+ Q_D(QDeclarativeKeysAttached);
+ d->item = qobject_cast<QDeclarativeItem*>(parent);
+}
+
+QDeclarativeKeysAttached::~QDeclarativeKeysAttached()
+{
+}
+
+void QDeclarativeKeysAttached::componentComplete()
+{
+ Q_D(QDeclarativeKeysAttached);
+ if (d->item) {
+ for (int ii = 0; ii < d->targets.count(); ++ii) {
+ QGraphicsItem *targetItem = d->finalFocusProxy(d->targets.at(ii));
+ if (targetItem && (targetItem->flags() & QGraphicsItem::ItemAcceptsInputMethod)) {
+ d->item->setFlag(QGraphicsItem::ItemAcceptsInputMethod);
+ break;
+ }
+ }
+ }
+}
+
+void QDeclarativeKeysAttached::keyPressed(QKeyEvent *event)
+{
+ Q_D(QDeclarativeKeysAttached);
+ if (!d->enabled || d->inPress) {
+ event->ignore();
+ return;
+ }
+
+ // first process forwards
+ if (d->item && d->item->scene()) {
+ d->inPress = true;
+ for (int ii = 0; ii < d->targets.count(); ++ii) {
+ QGraphicsItem *i = d->finalFocusProxy(d->targets.at(ii));
+ if (i) {
+ d->item->scene()->sendEvent(i, event);
+ if (event->isAccepted()) {
+ d->inPress = false;
+ return;
+ }
+ }
+ }
+ d->inPress = false;
+ }
+
+ QDeclarativeKeyEvent ke(*event);
+ QByteArray keySignal = keyToSignal(event->key());
+ if (!keySignal.isEmpty()) {
+ keySignal += "(QDeclarativeKeyEvent*)";
+ if (d->isConnected(keySignal)) {
+ // If we specifically handle a key then default to accepted
+ ke.setAccepted(true);
+ int idx = QDeclarativeKeysAttached::staticMetaObject.indexOfSignal(keySignal);
+ metaObject()->method(idx).invoke(this, Qt::DirectConnection, Q_ARG(QDeclarativeKeyEvent*, &ke));
+ }
+ }
+ if (!ke.isAccepted())
+ emit pressed(&ke);
+ event->setAccepted(ke.isAccepted());
+
+ if (!event->isAccepted()) QDeclarativeItemKeyFilter::keyPressed(event);
+}
+
+void QDeclarativeKeysAttached::keyReleased(QKeyEvent *event)
+{
+ Q_D(QDeclarativeKeysAttached);
+ if (!d->enabled || d->inRelease) {
+ event->ignore();
+ return;
+ }
+
+ if (d->item && d->item->scene()) {
+ d->inRelease = true;
+ for (int ii = 0; ii < d->targets.count(); ++ii) {
+ QGraphicsItem *i = d->finalFocusProxy(d->targets.at(ii));
+ if (i) {
+ d->item->scene()->sendEvent(i, event);
+ if (event->isAccepted()) {
+ d->inRelease = false;
+ return;
+ }
+ }
+ }
+ d->inRelease = false;
+ }
+
+ QDeclarativeKeyEvent ke(*event);
+ emit released(&ke);
+ event->setAccepted(ke.isAccepted());
+
+ if (!event->isAccepted()) QDeclarativeItemKeyFilter::keyReleased(event);
+}
+
+void QDeclarativeKeysAttached::inputMethodEvent(QInputMethodEvent *event)
+{
+ Q_D(QDeclarativeKeysAttached);
+ if (d->item && !d->inIM && d->item->scene()) {
+ d->inIM = true;
+ for (int ii = 0; ii < d->targets.count(); ++ii) {
+ QGraphicsItem *i = d->finalFocusProxy(d->targets.at(ii));
+ if (i && (i->flags() & QGraphicsItem::ItemAcceptsInputMethod)) {
+ d->item->scene()->sendEvent(i, event);
+ if (event->isAccepted()) {
+ d->imeItem = i;
+ d->inIM = false;
+ return;
+ }
+ }
+ }
+ d->inIM = false;
+ }
+ if (!event->isAccepted()) QDeclarativeItemKeyFilter::inputMethodEvent(event);
+}
+
+class QDeclarativeItemAccessor : public QGraphicsItem
+{
+public:
+ QVariant doInputMethodQuery(Qt::InputMethodQuery query) const {
+ return QGraphicsItem::inputMethodQuery(query);
+ }
+};
+
+QVariant QDeclarativeKeysAttached::inputMethodQuery(Qt::InputMethodQuery query) const
+{
+ Q_D(const QDeclarativeKeysAttached);
+ if (d->item) {
+ for (int ii = 0; ii < d->targets.count(); ++ii) {
+ QGraphicsItem *i = d->finalFocusProxy(d->targets.at(ii));
+ if (i && (i->flags() & QGraphicsItem::ItemAcceptsInputMethod) && i == d->imeItem) { //### how robust is i == d->imeItem check?
+ QVariant v = static_cast<QDeclarativeItemAccessor *>(i)->doInputMethodQuery(query);
+ if (v.userType() == QVariant::RectF)
+ v = d->item->mapRectFromItem(i, v.toRectF()); //### cost?
+ return v;
+ }
+ }
+ }
+ return QDeclarativeItemKeyFilter::inputMethodQuery(query);
+}
+
+QDeclarativeKeysAttached *QDeclarativeKeysAttached::qmlAttachedProperties(QObject *obj)
+{
+ return new QDeclarativeKeysAttached(obj);
+}
+
+/*!
+ \class QDeclarativeItem
+ \since 4.7
+ \brief The QDeclarativeItem class provides the most basic of all visual items in QML.
+
+ All visual items in Qt Declarative inherit from QDeclarativeItem. Although QDeclarativeItem
+ has no visual appearance, it defines all the properties that are
+ common across visual items - such as the x and y position, the
+ width and height, \l {anchor-layout}{anchoring} and key handling.
+
+ You can subclass QDeclarativeItem to provide your own custom visual item that inherits
+ these features.
+*/
+
+/*!
+ \qmlclass Item QDeclarativeItem
+ \since 4.7
+ \brief The Item is the most basic of all visual items in QML.
+
+ All visual items in Qt Declarative inherit from Item. Although Item
+ has no visual appearance, it defines all the properties that are
+ common across visual items - such as the x and y position, the
+ width and height, \l {anchor-layout}{anchoring} and key handling.
+
+ Item is also useful for grouping items together.
+
+ \qml
+ Item {
+ Image {
+ source: "tile.png"
+ }
+ Image {
+ x: 80
+ width: 100
+ height: 100
+ source: "tile.png"
+ }
+ Image {
+ x: 190
+ width: 100
+ height: 100
+ fillMode: Image.Tile
+ source: "tile.png"
+ }
+ }
+ \endqml
+
+ \section1 Identity
+
+ Each item has an "id" - the identifier of the Item.
+
+ The identifier can be used in bindings and other expressions to
+ refer to the item. For example:
+
+ \qml
+ Text { id: myText; ... }
+ Text { text: myText.text }
+ \endqml
+
+ The identifier is available throughout to the \l {components}{component}
+ where it is declared. The identifier must be unique in the component.
+
+ The id should not be thought of as a "property" - it makes no sense
+ to write \c myText.id, for example.
+
+ \section1 Key Handling
+
+ Key handling is available to all Item-based visual elements via the \l {Keys}{Keys}
+ attached property. The \e Keys attached property provides basic handlers such
+ as \l {Keys::onPressed}{onPressed} and \l {Keys::onReleased}{onReleased},
+ as well as handlers for specific keys, such as
+ \l {Keys::onCancelPressed}{onCancelPressed}. The example below
+ assigns \l {qmlfocus}{focus} to the item and handles
+ the Left key via the general \e onPressed handler and the Select key via the
+ onSelectPressed handler:
+
+ \qml
+ Item {
+ focus: true
+ Keys.onPressed: {
+ if (event.key == Qt.Key_Left) {
+ console.log("move left");
+ event.accepted = true;
+ }
+ }
+ Keys.onSelectPressed: console.log("Selected");
+ }
+ \endqml
+
+ See the \l {Keys}{Keys} attached property for detailed documentation.
+
+ \section1 Property Change Signals
+
+ Most properties on Item and Item derivatives have a signal
+ emitted when they change. By convention, the signals are
+ named <propertyName>Changed, e.g. xChanged will be emitted when an item's
+ x property changes. Note that these also have signal handers e.g.
+ the onXChanged signal handler will be called when an item's x property
+ changes. For many properties in Item or Item derivatives this can be used
+ to add a touch of imperative logic to your application (when absolutely
+ necessary).
+
+ \ingroup group_coreitems
+*/
+
+/*!
+ \property QDeclarativeItem::baseline
+ \internal
+*/
+
+/*!
+ \property QDeclarativeItem::effect
+ \internal
+*/
+
+/*!
+ \property QDeclarativeItem::focus
+ \internal
+*/
+
+/*!
+ \property QDeclarativeItem::wantsFocus
+ \internal
+*/
+
+/*!
+ \property QDeclarativeItem::transformOrigin
+ \internal
+*/
+
+/*!
+ \fn void QDeclarativeItem::childrenRectChanged()
+ \internal
+*/
+
+/*!
+ \fn void QDeclarativeItem::baselineOffsetChanged()
+ \internal
+*/
+
+/*!
+ \fn void QDeclarativeItem::widthChanged()
+ \internal
+*/
+
+/*!
+ \fn void QDeclarativeItem::heightChanged()
+ \internal
+*/
+
+/*!
+ \fn void QDeclarativeItem::stateChanged(const QString &state)
+ \internal
+*/
+
+/*!
+ \fn void QDeclarativeItem::parentChanged()
+ \internal
+*/
+
+/*!
+ \fn void QDeclarativeItem::smoothChanged()
+ \internal
+*/
+
+/*!
+ \fn void QDeclarativeItem::clipChanged()
+ \internal
+*/
+
+/*! \fn void QDeclarativeItem::transformOriginChanged(TransformOrigin)
+ \internal
+*/
+
+/*!
+ \fn void QDeclarativeItem::childrenChanged()
+ \internal
+*/
+
+/*!
+ \fn void QDeclarativeItem::focusChanged()
+ \internal
+*/
+
+/*!
+ \fn void QDeclarativeItem::wantsFocusChanged()
+ \internal
+*/
+
+// ### Must fix
+struct RegisterAnchorLineAtStartup {
+ RegisterAnchorLineAtStartup() {
+ qRegisterMetaType<QDeclarativeAnchorLine>("QDeclarativeAnchorLine");
+ }
+};
+static RegisterAnchorLineAtStartup registerAnchorLineAtStartup;
+
+
+/*!
+ \fn QDeclarativeItem::QDeclarativeItem(QDeclarativeItem *parent)
+
+ Constructs a QDeclarativeItem with the given \a parent.
+*/
+QDeclarativeItem::QDeclarativeItem(QDeclarativeItem* parent)
+ : QGraphicsObject(*(new QDeclarativeItemPrivate), parent, 0)
+{
+ Q_D(QDeclarativeItem);
+ d->init(parent);
+}
+
+/*! \internal
+*/
+QDeclarativeItem::QDeclarativeItem(QDeclarativeItemPrivate &dd, QDeclarativeItem *parent)
+ : QGraphicsObject(dd, parent, 0)
+{
+ Q_D(QDeclarativeItem);
+ d->init(parent);
+}
+
+/*!
+ Destroys the QDeclarativeItem.
+*/
+QDeclarativeItem::~QDeclarativeItem()
+{
+ Q_D(QDeclarativeItem);
+ for (int ii = 0; ii < d->changeListeners.count(); ++ii) {
+ QDeclarativeAnchorsPrivate *anchor = d->changeListeners.at(ii).listener->anchorPrivate();
+ if (anchor)
+ anchor->clearItem(this);
+ }
+ if (!d->parent || (parentItem() && !parentItem()->QGraphicsItem::d_ptr->inDestructor)) {
+ for (int ii = 0; ii < d->changeListeners.count(); ++ii) {
+ QDeclarativeAnchorsPrivate *anchor = d->changeListeners.at(ii).listener->anchorPrivate();
+ if (anchor && anchor->item && anchor->item->parentItem() != this) //child will be deleted anyway
+ anchor->updateOnComplete();
+ }
+ }
+ for(int ii = 0; ii < d->changeListeners.count(); ++ii) {
+ const QDeclarativeItemPrivate::ChangeListener &change = d->changeListeners.at(ii);
+ if (change.types & QDeclarativeItemPrivate::Destroyed)
+ change.listener->itemDestroyed(this);
+ }
+ d->changeListeners.clear();
+ delete d->_anchorLines; d->_anchorLines = 0;
+ delete d->_anchors; d->_anchors = 0;
+ delete d->_stateGroup; d->_stateGroup = 0;
+}
+
+/*!
+ \qmlproperty enum Item::transformOrigin
+ This property holds the origin point around which scale and rotation transform.
+
+ Nine transform origins are available, as shown in the image below.
+
+ \image declarative-transformorigin.png
+
+ This example rotates an image around its bottom-right corner.
+ \qml
+ Image {
+ source: "myimage.png"
+ transformOrigin: Item.BottomRight
+ rotation: 45
+ }
+ \endqml
+
+ The default transform origin is \c Center.
+*/
+
+/*!
+ \qmlproperty Item Item::parent
+ This property holds the parent of the item.
+*/
+
+/*!
+ \property QDeclarativeItem::parent
+ This property holds the parent of the item.
+*/
+void QDeclarativeItem::setParentItem(QDeclarativeItem *parent)
+{
+ QDeclarativeItem *oldParent = parentItem();
+ if (parent == oldParent || !parent) return;
+
+ QObject::setParent(parent);
+ QGraphicsObject::setParentItem(parent);
+}
+
+/*!
+ \fn void QDeclarativeItem::setParent(QDeclarativeItem *parent)
+ \overload
+ Sets both the parent object and parent item to \a parent. This
+ function avoids the programming error of calling setParent()
+ when you mean setParentItem().
+*/
+
+/*!
+ Returns the QDeclarativeItem parent of this item.
+*/
+QDeclarativeItem *QDeclarativeItem::parentItem() const
+{
+ return qobject_cast<QDeclarativeItem *>(QGraphicsObject::parentItem());
+}
+
+/*!
+ \qmlproperty list<Item> Item::children
+ \qmlproperty list<Object> Item::resources
+
+ The children property contains the list of visual children of this item.
+ The resources property contains non-visual resources that you want to
+ reference by name.
+
+ Generally you can rely on Item's default property to handle all this for
+ you, but it can come in handy in some cases.
+
+ \qml
+ Item {
+ children: [
+ Text {},
+ Rectangle {}
+ ]
+ resources: [
+ Component {
+ id: myComponent
+ Text {}
+ }
+ ]
+ }
+ \endqml
+*/
+
+/*!
+ \property QDeclarativeItem::children
+ \internal
+*/
+
+/*!
+ \property QDeclarativeItem::resources
+ \internal
+*/
+
+/*!
+ Returns true if construction of the QML component is complete; otherwise
+ returns false.
+
+ It is often desireable to delay some processing until the component is
+ completed.
+
+ \sa componentComplete()
+*/
+bool QDeclarativeItem::isComponentComplete() const
+{
+ Q_D(const QDeclarativeItem);
+ return d->_componentComplete;
+}
+
+/*!
+ \property QDeclarativeItem::anchors
+ \internal
+*/
+
+/*! \internal */
+QDeclarativeAnchors *QDeclarativeItem::anchors()
+{
+ Q_D(QDeclarativeItem);
+ return d->anchors();
+}
+
+void QDeclarativeItemPrivate::data_append(QDeclarativeListProperty<QObject> *prop, QObject *o)
+{
+ QDeclarativeItem *i = qobject_cast<QDeclarativeItem *>(o);
+ if (i)
+ i->setParentItem(static_cast<QDeclarativeItem *>(prop->object));
+ else
+ o->setParent(static_cast<QDeclarativeItem *>(prop->object));
+}
+
+QObject *QDeclarativeItemPrivate::resources_at(QDeclarativeListProperty<QObject> *prop, int index)
+{
+ QObjectList children = prop->object->children();
+ if (index < children.count())
+ return children.at(index);
+ else
+ return 0;
+}
+
+void QDeclarativeItemPrivate::resources_append(QDeclarativeListProperty<QObject> *prop, QObject *o)
+{
+ o->setParent(prop->object);
+}
+
+int QDeclarativeItemPrivate::resources_count(QDeclarativeListProperty<QObject> *prop)
+{
+ return prop->object->children().count();
+}
+
+QDeclarativeItem *QDeclarativeItemPrivate::children_at(QDeclarativeListProperty<QDeclarativeItem> *prop, int index)
+{
+ QList<QGraphicsItem *> children = static_cast<QDeclarativeItem*>(prop->object)->childItems();
+
+ if (index < children.count())
+ return qobject_cast<QDeclarativeItem *>(children.at(index));
+ else
+ return 0;
+}
+
+void QDeclarativeItemPrivate::children_append(QDeclarativeListProperty<QDeclarativeItem> *prop, QDeclarativeItem *i)
+{
+ if (i)
+ i->setParentItem(static_cast<QDeclarativeItem*>(prop->object));
+}
+
+int QDeclarativeItemPrivate::children_count(QDeclarativeListProperty<QDeclarativeItem> *prop)
+{
+ return static_cast<QDeclarativeItem*>(prop->object)->childItems().count();
+}
+
+int QDeclarativeItemPrivate::transform_count(QDeclarativeListProperty<QGraphicsTransform> *list)
+{
+ QGraphicsObject *object = qobject_cast<QGraphicsObject *>(list->object);
+ if (object) {
+ QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(object);
+ return d->transformData ? d->transformData->graphicsTransforms.size() : 0;
+ } else {
+ return 0;
+ }
+}
+
+void QDeclarativeItemPrivate::transform_append(QDeclarativeListProperty<QGraphicsTransform> *list, QGraphicsTransform *item)
+{
+ QGraphicsObject *object = qobject_cast<QGraphicsObject *>(list->object);
+ if (object)
+ QGraphicsItemPrivate::get(object)->appendGraphicsTransform(item);
+}
+
+QGraphicsTransform *QDeclarativeItemPrivate::transform_at(QDeclarativeListProperty<QGraphicsTransform> *list, int idx)
+{
+ QGraphicsObject *object = qobject_cast<QGraphicsObject *>(list->object);
+ if (object) {
+ QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(object);
+ if (!d->transformData)
+ return 0;
+ return d->transformData->graphicsTransforms.at(idx);
+ } else {
+ return 0;
+ }
+}
+
+void QDeclarativeItemPrivate::transform_clear(QDeclarativeListProperty<QGraphicsTransform> *list)
+{
+ QGraphicsObject *object = qobject_cast<QGraphicsObject *>(list->object);
+ if (object) {
+ QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(object);
+ if (!d->transformData)
+ return;
+ object->setTransformations(QList<QGraphicsTransform *>());
+ }
+}
+
+/*!
+ \qmlproperty list<Object> Item::data
+ \default
+
+ The data property is allows you to freely mix visual children and resources
+ of an item. If you assign a visual item to the data list it becomes
+ a child and if you assign any other object type, it is added as a resource.
+
+ So you can write:
+ \qml
+ Item {
+ Text {}
+ Rectangle {}
+ Script {}
+ }
+ \endqml
+
+ instead of:
+ \qml
+ Item {
+ children: [
+ Text {},
+ Rectangle {}
+ ]
+ resources: [
+ Script {}
+ ]
+ }
+ \endqml
+
+ data is a behind-the-scenes property: you should never need to explicitly
+ specify it.
+ */
+
+/*!
+ \property QDeclarativeItem::data
+ \internal
+*/
+
+/*! \internal */
+QDeclarativeListProperty<QObject> QDeclarativeItem::data()
+{
+ return QDeclarativeListProperty<QObject>(this, 0, QDeclarativeItemPrivate::data_append);
+}
+
+/*!
+ \property QDeclarativeItem::childrenRect
+ \brief The geometry of an item's children.
+
+ childrenRect provides an easy way to access the (collective) position and size of the item's children.
+*/
+QRectF QDeclarativeItem::childrenRect()
+{
+ Q_D(QDeclarativeItem);
+ if (!d->_contents) {
+ d->_contents = new QDeclarativeContents;
+ d->_contents->setParent(this);
+ d->_contents->setItem(this);
+ }
+ return d->_contents->rectF();
+}
+
+bool QDeclarativeItem::clip() const
+{
+ return flags() & ItemClipsChildrenToShape;
+}
+
+void QDeclarativeItem::setClip(bool c)
+{
+ if (clip() == c)
+ return;
+ setFlag(ItemClipsChildrenToShape, c);
+ emit clipChanged();
+}
+
+/*!
+ \qmlproperty real Item::x
+ \qmlproperty real Item::y
+ \qmlproperty real Item::width
+ \qmlproperty real Item::height
+
+ Defines the item's position and size relative to its parent.
+
+ \qml
+ Item { x: 100; y: 100; width: 100; height: 100 }
+ \endqml
+ */
+
+/*!
+ \property QDeclarativeItem::width
+
+ Defines the item's width relative to its parent.
+ */
+
+/*!
+ \property QDeclarativeItem::height
+
+ Defines the item's height relative to its parent.
+ */
+
+/*!
+ \qmlproperty real Item::z
+
+ Sets the stacking order of the item. By default the stacking order is 0.
+
+ Items with a higher stacking value are drawn on top of items with a
+ lower stacking order. Items with the same stacking value are drawn
+ bottom up in the order they appear. Items with a negative stacking
+ value are drawn under their parent's content.
+
+ The following example shows the various effects of stacking order.
+
+ \table
+ \row
+ \o \image declarative-item_stacking1.png
+ \o Same \c z - later children above earlier children:
+ \qml
+ Item {
+ Rectangle {
+ color: "red"
+ width: 100; height: 100
+ }
+ Rectangle {
+ color: "blue"
+ x: 50; y: 50; width: 100; height: 100
+ }
+ }
+ \endqml
+ \row
+ \o \image declarative-item_stacking2.png
+ \o Higher \c z on top:
+ \qml
+ Item {
+ Rectangle {
+ z: 1
+ color: "red"
+ width: 100; height: 100
+ }
+ Rectangle {
+ color: "blue"
+ x: 50; y: 50; width: 100; height: 100
+ }
+ }
+ \endqml
+ \row
+ \o \image declarative-item_stacking3.png
+ \o Same \c z - children above parents:
+ \qml
+ Item {
+ Rectangle {
+ color: "red"
+ width: 100; height: 100
+ Rectangle {
+ color: "blue"
+ x: 50; y: 50; width: 100; height: 100
+ }
+ }
+ }
+ \endqml
+ \row
+ \o \image declarative-item_stacking4.png
+ \o Lower \c z below:
+ \qml
+ Item {
+ Rectangle {
+ color: "red"
+ width: 100; height: 100
+ Rectangle {
+ z: -1
+ color: "blue"
+ x: 50; y: 50; width: 100; height: 100
+ }
+ }
+ }
+ \endqml
+ \endtable
+ */
+
+/*!
+ \qmlproperty bool Item::visible
+
+ Whether the item is visible. By default this is true.
+
+ \note visible is not linked to actual visibility; if an item
+ moves off screen, or the opacity changes to 0, this will
+ not affect the visible property.
+*/
+
+
+/*!
+ This function is called to handle this item's changes in
+ geometry from \a oldGeometry to \a newGeometry. If the two
+ geometries are the same, it doesn't do anything.
+ */
+void QDeclarativeItem::geometryChanged(const QRectF &newGeometry,
+ const QRectF &oldGeometry)
+{
+ Q_D(QDeclarativeItem);
+
+ if (d->_anchors)
+ d->_anchors->d_func()->updateMe();
+
+ if (transformOrigin() != QDeclarativeItem::TopLeft
+ && (newGeometry.width() != oldGeometry.width() || newGeometry.height() != oldGeometry.height())) {
+ QPointF origin = d->computeTransformOrigin();
+ if (transformOriginPoint() != origin)
+ setTransformOriginPoint(origin);
+ }
+
+ if (newGeometry.x() != oldGeometry.x())
+ emit xChanged();
+ if (newGeometry.width() != oldGeometry.width())
+ emit widthChanged();
+ if (newGeometry.y() != oldGeometry.y())
+ emit yChanged();
+ if (newGeometry.height() != oldGeometry.height())
+ emit heightChanged();
+
+ for(int ii = 0; ii < d->changeListeners.count(); ++ii) {
+ const QDeclarativeItemPrivate::ChangeListener &change = d->changeListeners.at(ii);
+ if (change.types & QDeclarativeItemPrivate::Geometry)
+ change.listener->itemGeometryChanged(this, newGeometry, oldGeometry);
+ }
+}
+
+void QDeclarativeItemPrivate::removeItemChangeListener(QDeclarativeItemChangeListener *listener, ChangeTypes types)
+{
+ ChangeListener change(listener, types);
+ changeListeners.removeOne(change);
+}
+
+/*! \internal */
+void QDeclarativeItem::keyPressEvent(QKeyEvent *event)
+{
+ Q_D(QDeclarativeItem);
+ if (d->keyHandler)
+ d->keyHandler->keyPressed(event);
+ else
+ event->ignore();
+}
+
+/*! \internal */
+void QDeclarativeItem::keyReleaseEvent(QKeyEvent *event)
+{
+ Q_D(QDeclarativeItem);
+ if (d->keyHandler)
+ d->keyHandler->keyReleased(event);
+ else
+ event->ignore();
+}
+
+/*! \internal */
+void QDeclarativeItem::inputMethodEvent(QInputMethodEvent *event)
+{
+ Q_D(QDeclarativeItem);
+ if (d->keyHandler)
+ d->keyHandler->inputMethodEvent(event);
+ else
+ event->ignore();
+}
+
+/*! \internal */
+QVariant QDeclarativeItem::inputMethodQuery(Qt::InputMethodQuery query) const
+{
+ Q_D(const QDeclarativeItem);
+ QVariant v;
+ if (d->keyHandler)
+ v = d->keyHandler->inputMethodQuery(query);
+
+ if (!v.isValid())
+ v = QGraphicsObject::inputMethodQuery(query);
+
+ return v;
+}
+
+/*!
+ \internal
+*/
+QDeclarativeAnchorLine QDeclarativeItem::left() const
+{
+ Q_D(const QDeclarativeItem);
+ return d->anchorLines()->left;
+}
+
+/*!
+ \internal
+*/
+QDeclarativeAnchorLine QDeclarativeItem::right() const
+{
+ Q_D(const QDeclarativeItem);
+ return d->anchorLines()->right;
+}
+
+/*!
+ \internal
+*/
+QDeclarativeAnchorLine QDeclarativeItem::horizontalCenter() const
+{
+ Q_D(const QDeclarativeItem);
+ return d->anchorLines()->hCenter;
+}
+
+/*!
+ \internal
+*/
+QDeclarativeAnchorLine QDeclarativeItem::top() const
+{
+ Q_D(const QDeclarativeItem);
+ return d->anchorLines()->top;
+}
+
+/*!
+ \internal
+*/
+QDeclarativeAnchorLine QDeclarativeItem::bottom() const
+{
+ Q_D(const QDeclarativeItem);
+ return d->anchorLines()->bottom;
+}
+
+/*!
+ \internal
+*/
+QDeclarativeAnchorLine QDeclarativeItem::verticalCenter() const
+{
+ Q_D(const QDeclarativeItem);
+ return d->anchorLines()->vCenter;
+}
+
+
+/*!
+ \internal
+*/
+QDeclarativeAnchorLine QDeclarativeItem::baseline() const
+{
+ Q_D(const QDeclarativeItem);
+ return d->anchorLines()->baseline;
+}
+
+/*!
+ \property QDeclarativeItem::top
+ \internal
+*/
+
+/*!
+ \property QDeclarativeItem::bottom
+ \internal
+*/
+
+/*!
+ \property QDeclarativeItem::left
+ \internal
+*/
+
+/*!
+ \property QDeclarativeItem::right
+ \internal
+*/
+
+/*!
+ \property QDeclarativeItem::horizontalCenter
+ \internal
+*/
+
+/*!
+ \property QDeclarativeItem::verticalCenter
+ \internal
+*/
+
+/*!
+ \qmlproperty AnchorLine Item::top
+ \qmlproperty AnchorLine Item::bottom
+ \qmlproperty AnchorLine Item::left
+ \qmlproperty AnchorLine Item::right
+ \qmlproperty AnchorLine Item::horizontalCenter
+ \qmlproperty AnchorLine Item::verticalCenter
+ \qmlproperty AnchorLine Item::baseline
+
+ The anchor lines of the item.
+
+ For more information see \l {anchor-layout}{Anchor Layouts}.
+*/
+
+/*!
+ \qmlproperty AnchorLine Item::anchors.top
+ \qmlproperty AnchorLine Item::anchors.bottom
+ \qmlproperty AnchorLine Item::anchors.left
+ \qmlproperty AnchorLine Item::anchors.right
+ \qmlproperty AnchorLine Item::anchors.horizontalCenter
+ \qmlproperty AnchorLine Item::anchors.verticalCenter
+ \qmlproperty AnchorLine Item::anchors.baseline
+
+ \qmlproperty Item Item::anchors.fill
+ \qmlproperty Item Item::anchors.centerIn
+
+ \qmlproperty real Item::anchors.margins
+ \qmlproperty real Item::anchors.topMargin
+ \qmlproperty real Item::anchors.bottomMargin
+ \qmlproperty real Item::anchors.leftMargin
+ \qmlproperty real Item::anchors.rightMargin
+ \qmlproperty real Item::anchors.horizontalCenterOffset
+ \qmlproperty real Item::anchors.verticalCenterOffset
+ \qmlproperty real Item::anchors.baselineOffset
+
+ Anchors provide a way to position an item by specifying its
+ relationship with other items.
+
+ Margins apply to top, bottom, left, right, and fill anchors.
+ The margins property can be used to set all of the various margins at once, to the same value.
+
+ Offsets apply for horizontal center, vertical center, and baseline anchors.
+
+ \table
+ \row
+ \o \image declarative-anchors_example.png
+ \o Text anchored to Image, horizontally centered and vertically below, with a margin.
+ \qml
+ Image { id: pic; ... }
+ Text {
+ id: label
+ anchors.horizontalCenter: pic.horizontalCenter
+ anchors.top: pic.bottom
+ anchors.topMargin: 5
+ ...
+ }
+ \endqml
+ \row
+ \o \image declarative-anchors_example2.png
+ \o
+ Left of Text anchored to right of Image, with a margin. The y
+ property of both defaults to 0.
+
+ \qml
+ Image { id: pic; ... }
+ Text {
+ id: label
+ anchors.left: pic.right
+ anchors.leftMargin: 5
+ ...
+ }
+ \endqml
+ \endtable
+
+ anchors.fill provides a convenient way for one item to have the
+ same geometry as another item, and is equivalent to connecting all
+ four directional anchors.
+
+ \note You can only anchor an item to siblings or a parent.
+
+ For more information see \l {anchor-layout}{Anchor Layouts}.
+*/
+
+/*!
+ \property QDeclarativeItem::baselineOffset
+ \brief The position of the item's baseline in local coordinates.
+
+ The baseline of a Text item is the imaginary line on which the text
+ sits. Controls containing text usually set their baseline to the
+ baseline of their text.
+
+ For non-text items, a default baseline offset of 0 is used.
+*/
+qreal QDeclarativeItem::baselineOffset() const
+{
+ Q_D(const QDeclarativeItem);
+ if (!d->_baselineOffset.isValid()) {
+ return 0.0;
+ } else
+ return d->_baselineOffset;
+}
+
+void QDeclarativeItem::setBaselineOffset(qreal offset)
+{
+ Q_D(QDeclarativeItem);
+ if (offset == d->_baselineOffset)
+ return;
+
+ d->_baselineOffset = offset;
+ emit baselineOffsetChanged();
+
+ for(int ii = 0; ii < d->changeListeners.count(); ++ii) {
+ const QDeclarativeItemPrivate::ChangeListener &change = d->changeListeners.at(ii);
+ if (change.types & QDeclarativeItemPrivate::Geometry) {
+ QDeclarativeAnchorsPrivate *anchor = change.listener->anchorPrivate();
+ if (anchor)
+ anchor->updateVerticalAnchors();
+ }
+ }
+}
+
+/*!
+ \qmlproperty real Item::rotation
+ This property holds the rotation of the item in degrees clockwise.
+
+ This specifies how many degrees to rotate the item around its transformOrigin.
+ The default rotation is 0 degrees (i.e. not rotated at all).
+
+ \table
+ \row
+ \o \image declarative-rotation.png
+ \o
+ \qml
+ Rectangle {
+ color: "blue"
+ width: 100; height: 100
+ Rectangle {
+ color: "red"
+ x: 25; y: 25; width: 50; height: 50
+ rotation: 30
+ }
+ }
+ \endqml
+ \endtable
+*/
+
+/*!
+ \qmlproperty real Item::scale
+ This property holds the scale of the item.
+
+ A scale of less than 1 means the item will be displayed smaller than
+ normal, and a scale of greater than 1 means the item will be
+ displayed larger than normal. A negative scale means the item will
+ be mirrored.
+
+ By default, items are displayed at a scale of 1 (i.e. at their
+ normal size).
+
+ Scaling is from the item's transformOrigin.
+
+ \table
+ \row
+ \o \image declarative-scale.png
+ \o
+ \qml
+ Rectangle {
+ color: "blue"
+ width: 100; height: 100
+ Rectangle {
+ color: "green"
+ width: 25; height: 25
+ }
+ Rectangle {
+ color: "red"
+ x: 25; y: 25; width: 50; height: 50
+ scale: 1.4
+ }
+ }
+ \endqml
+ \endtable
+*/
+
+/*!
+ \qmlproperty real Item::opacity
+
+ The opacity of the item. Opacity is specified as a number between 0
+ (fully transparent) and 1 (fully opaque). The default is 1.
+
+ Opacity is an \e inherited attribute. That is, the opacity is
+ also applied individually to child items. In almost all cases this
+ is what you want. If you can spot the issue in the following
+ example, you might need to use an \l Opacity effect instead.
+
+ \table
+ \row
+ \o \image declarative-item_opacity1.png
+ \o
+ \qml
+ Item {
+ Rectangle {
+ color: "red"
+ width: 100; height: 100
+ Rectangle {
+ color: "blue"
+ x: 50; y: 50; width: 100; height: 100
+ }
+ }
+ }
+ \endqml
+ \row
+ \o \image declarative-item_opacity2.png
+ \o
+ \qml
+ Item {
+ Rectangle {
+ opacity: 0.5
+ color: "red"
+ width: 100; height: 100
+ Rectangle {
+ color: "blue"
+ x: 50; y: 50; width: 100; height: 100
+ }
+ }
+ }
+ \endqml
+ \endtable
+*/
+
+/*!
+ Returns a value indicating whether mouse input should
+ remain with this item exclusively.
+
+ \sa setKeepMouseGrab()
+ */
+bool QDeclarativeItem::keepMouseGrab() const
+{
+ Q_D(const QDeclarativeItem);
+ return d->_keepMouse;
+}
+
+/*!
+ The flag indicating whether the mouse should remain
+ with this item is set to \a keep.
+
+ This is useful for items that wish to grab and keep mouse
+ interaction following a predefined gesture. For example,
+ an item that is interested in horizontal mouse movement
+ may set keepMouseGrab to true once a threshold has been
+ exceeded. Once keepMouseGrab has been set to true, filtering
+ items will not react to mouse events.
+
+ If the item does not indicate that it wishes to retain mouse grab,
+ a filtering item may steal the grab. For example, Flickable may attempt
+ to steal a mouse grab if it detects that the user has begun to
+ move the viewport.
+
+ \sa keepMouseGrab()
+ */
+void QDeclarativeItem::setKeepMouseGrab(bool keep)
+{
+ Q_D(QDeclarativeItem);
+ d->_keepMouse = keep;
+}
+
+/*!
+ \qmlmethod object Item::mapFromItem(Item item, int x, int y)
+
+ Maps the point (\a x, \a y), which is in \a item's coordinate system, to
+ this item's coordinate system, and returns an object with \c x and \c y
+ properties matching the mapped cooordinate.
+
+ If \a item is a \c null value, this maps the point from the coordinate
+ system of the root QML view.
+*/
+QScriptValue QDeclarativeItem::mapFromItem(const QScriptValue &item, int x, int y) const
+{
+ QScriptValue sv = QDeclarativeEnginePrivate::getScriptEngine(qmlEngine(this))->newObject();
+ QDeclarativeItem *itemObj = qobject_cast<QDeclarativeItem*>(item.toQObject());
+ if (!itemObj && !item.isNull()) {
+ qWarning().nospace() << "mapFromItem() given argument " << item.toString() << " which is neither null nor an Item";
+ return 0;
+ }
+
+ // If QGraphicsItem::mapFromItem() is called with 0, behaves the same as mapFromScene()
+ QPointF p = qobject_cast<QGraphicsItem*>(this)->mapFromItem(itemObj, x, y);
+ sv.setProperty("x", p.x());
+ sv.setProperty("y", p.y());
+ return sv;
+}
+
+/*!
+ \qmlmethod object Item::mapToItem(Item item, int x, int y)
+
+ Maps the point (\a x, \a y), which is in this item's coordinate system, to
+ \a item's coordinate system, and returns an object with \c x and \c y
+ properties matching the mapped cooordinate.
+
+ If \a item is a \c null value, this maps \a x and \a y to the coordinate
+ system of the root QML view.
+*/
+QScriptValue QDeclarativeItem::mapToItem(const QScriptValue &item, int x, int y) const
+{
+ QScriptValue sv = QDeclarativeEnginePrivate::getScriptEngine(qmlEngine(this))->newObject();
+ QDeclarativeItem *itemObj = qobject_cast<QDeclarativeItem*>(item.toQObject());
+ if (!itemObj && !item.isNull()) {
+ qWarning().nospace() << "mapToItem() given argument " << item.toString() << " which is neither null nor an Item";
+ return 0;
+ }
+
+ // If QGraphicsItem::mapToItem() is called with 0, behaves the same as mapToScene()
+ QPointF p = qobject_cast<QGraphicsItem*>(this)->mapToItem(itemObj, x, y);
+ sv.setProperty("x", p.x());
+ sv.setProperty("y", p.y());
+ return sv;
+}
+
+/*!
+ \internal
+
+ This function emits the \e focusChanged signal.
+
+ Subclasses overriding this function should call up
+ to their base class.
+*/
+void QDeclarativeItem::focusChanged(bool flag)
+{
+ Q_UNUSED(flag);
+ emit focusChanged();
+}
+
+/*! \internal */
+QDeclarativeListProperty<QDeclarativeItem> QDeclarativeItem::fxChildren()
+{
+ return QDeclarativeListProperty<QDeclarativeItem>(this, 0, QDeclarativeItemPrivate::children_append,
+ QDeclarativeItemPrivate::children_count,
+ QDeclarativeItemPrivate::children_at);
+}
+
+/*! \internal */
+QDeclarativeListProperty<QObject> QDeclarativeItem::resources()
+{
+ return QDeclarativeListProperty<QObject>(this, 0, QDeclarativeItemPrivate::resources_append,
+ QDeclarativeItemPrivate::resources_count,
+ QDeclarativeItemPrivate::resources_at);
+}
+
+/*!
+ \qmlproperty list<State> Item::states
+ This property holds a list of states defined by the item.
+
+ \qml
+ Item {
+ states: [
+ State { ... },
+ State { ... }
+ ...
+ ]
+ }
+ \endqml
+
+ \sa {qmlstate}{States}
+*/
+
+/*!
+ \property QDeclarativeItem::states
+ \internal
+*/
+/*! \internal */
+QDeclarativeListProperty<QDeclarativeState> QDeclarativeItem::states()
+{
+ Q_D(QDeclarativeItem);
+ return d->states()->statesProperty();
+}
+
+/*!
+ \qmlproperty list<Transition> Item::transitions
+ This property holds a list of transitions defined by the item.
+
+ \qml
+ Item {
+ transitions: [
+ Transition { ... },
+ Transition { ... }
+ ...
+ ]
+ }
+ \endqml
+
+ \sa {state-transitions}{Transitions}
+*/
+
+/*!
+ \property QDeclarativeItem::transitions
+ \internal
+*/
+
+/*! \internal */
+QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItem::transitions()
+{
+ Q_D(QDeclarativeItem);
+ return d->states()->transitionsProperty();
+}
+
+/*
+ \qmlproperty list<Filter> Item::filter
+ This property holds a list of graphical filters to be applied to the item.
+
+ \l {Filter}{Filters} include things like \l {Blur}{blurring}
+ the item, or giving it a \l Reflection. Some
+ filters may not be available on all canvases; if a filter is not
+ available on a certain canvas, it will simply not be applied for
+ that canvas (but the QML will still be considered valid).
+
+ \qml
+ Item {
+ filter: [
+ Blur { ... },
+ Relection { ... }
+ ...
+ ]
+ }
+ \endqml
+*/
+
+/*!
+ \qmlproperty bool Item::clip
+ This property holds whether clipping is enabled.
+
+ if clipping is enabled, an item will clip its own painting, as well
+ as the painting of its children, to its bounding rectangle.
+
+ Non-rectangular clipping regions are not supported for performance reasons.
+*/
+
+/*!
+ \property QDeclarativeItem::clip
+ This property holds whether clipping is enabled.
+
+ if clipping is enabled, an item will clip its own painting, as well
+ as the painting of its children, to its bounding rectangle.
+
+ Non-rectangular clipping regions are not supported for performance reasons.
+*/
+
+/*!
+ \qmlproperty string Item::state
+
+ This property holds the name of the current state of the item.
+
+ This property is often used in scripts to change between states. For
+ example:
+
+ \qml
+ Script {
+ function toggle() {
+ if (button.state == 'On')
+ button.state = 'Off';
+ else
+ button.state = 'On';
+ }
+ }
+ \endqml
+
+ If the item is in its base state (i.e. no explicit state has been
+ set), \c state will be a blank string. Likewise, you can return an
+ item to its base state by setting its current state to \c ''.
+
+ \sa {qmlstates}{States}
+*/
+
+/*!
+ \property QDeclarativeItem::state
+ \internal
+*/
+
+/*! \internal */
+QString QDeclarativeItem::state() const
+{
+ Q_D(const QDeclarativeItem);
+ if (!d->_stateGroup)
+ return QString();
+ else
+ return d->_stateGroup->state();
+}
+
+/*! \internal */
+void QDeclarativeItem::setState(const QString &state)
+{
+ Q_D(QDeclarativeItem);
+ d->states()->setState(state);
+}
+
+/*!
+ \qmlproperty list<Transform> Item::transform
+ This property holds the list of transformations to apply.
+
+ For more information see \l Transform.
+*/
+
+/*!
+ \property QDeclarativeItem::transform
+ \internal
+*/
+
+/*! \internal */
+QDeclarativeListProperty<QGraphicsTransform> QDeclarativeItem::transform()
+{
+ Q_D(QDeclarativeItem);
+ return QDeclarativeListProperty<QGraphicsTransform>(this, 0, d->transform_append, d->transform_count,
+ d->transform_at, d->transform_clear);
+}
+
+/*!
+ \internal
+
+ classBegin() is called when the item is constructed, but its
+ properties have not yet been set.
+
+ \sa componentComplete(), isComponentComplete()
+*/
+void QDeclarativeItem::classBegin()
+{
+ Q_D(QDeclarativeItem);
+ d->_componentComplete = false;
+ if (d->_stateGroup)
+ d->_stateGroup->classBegin();
+ if (d->_anchors)
+ d->_anchors->classBegin();
+}
+
+/*!
+ \internal
+
+ componentComplete() is called when all items in the component
+ have been constructed. It is often desireable to delay some
+ processing until the component is complete an all bindings in the
+ component have been resolved.
+*/
+void QDeclarativeItem::componentComplete()
+{
+#ifdef Q_ENABLE_PERFORMANCE_LOG
+ QDeclarativePerfTimer<QDeclarativePerf::ItemComponentComplete> cc;
+#endif
+
+ Q_D(QDeclarativeItem);
+ d->_componentComplete = true;
+ if (d->_stateGroup)
+ d->_stateGroup->componentComplete();
+ if (d->_anchors) {
+ d->_anchors->componentComplete();
+ d->_anchors->d_func()->updateOnComplete();
+ }
+ if (d->keyHandler)
+ d->keyHandler->componentComplete();
+}
+
+QDeclarativeStateGroup *QDeclarativeItemPrivate::states()
+{
+ Q_Q(QDeclarativeItem);
+ if (!_stateGroup) {
+ _stateGroup = new QDeclarativeStateGroup;
+ if (!_componentComplete)
+ _stateGroup->classBegin();
+ QObject::connect(_stateGroup, SIGNAL(stateChanged(QString)),
+ q, SIGNAL(stateChanged(QString)));
+ }
+
+ return _stateGroup;
+}
+
+QDeclarativeItemPrivate::AnchorLines::AnchorLines(QDeclarativeItem *q)
+{
+ left.item = q;
+ left.anchorLine = QDeclarativeAnchorLine::Left;
+ right.item = q;
+ right.anchorLine = QDeclarativeAnchorLine::Right;
+ hCenter.item = q;
+ hCenter.anchorLine = QDeclarativeAnchorLine::HCenter;
+ top.item = q;
+ top.anchorLine = QDeclarativeAnchorLine::Top;
+ bottom.item = q;
+ bottom.anchorLine = QDeclarativeAnchorLine::Bottom;
+ vCenter.item = q;
+ vCenter.anchorLine = QDeclarativeAnchorLine::VCenter;
+ baseline.item = q;
+ baseline.anchorLine = QDeclarativeAnchorLine::Baseline;
+}
+
+QPointF QDeclarativeItemPrivate::computeTransformOrigin() const
+{
+ Q_Q(const QDeclarativeItem);
+
+ QRectF br = q->boundingRect();
+
+ switch(origin) {
+ default:
+ case QDeclarativeItem::TopLeft:
+ return QPointF(0, 0);
+ case QDeclarativeItem::Top:
+ return QPointF(br.width() / 2., 0);
+ case QDeclarativeItem::TopRight:
+ return QPointF(br.width(), 0);
+ case QDeclarativeItem::Left:
+ return QPointF(0, br.height() / 2.);
+ case QDeclarativeItem::Center:
+ return QPointF(br.width() / 2., br.height() / 2.);
+ case QDeclarativeItem::Right:
+ return QPointF(br.width(), br.height() / 2.);
+ case QDeclarativeItem::BottomLeft:
+ return QPointF(0, br.height());
+ case QDeclarativeItem::Bottom:
+ return QPointF(br.width() / 2., br.height());
+ case QDeclarativeItem::BottomRight:
+ return QPointF(br.width(), br.height());
+ }
+}
+
+/*! \internal */
+bool QDeclarativeItem::sceneEvent(QEvent *event)
+{
+ if (event->type() == QEvent::KeyPress) {
+ QKeyEvent *k = static_cast<QKeyEvent *>(event);
+
+ if ((k->key() == Qt::Key_Tab || k->key() == Qt::Key_Backtab) &&
+ !(k->modifiers() & (Qt::ControlModifier | Qt::AltModifier))) {
+ keyPressEvent(static_cast<QKeyEvent *>(event));
+ if (!event->isAccepted())
+ return QGraphicsItem::sceneEvent(event);
+ } else {
+ return QGraphicsItem::sceneEvent(event);
+ }
+ } else {
+ bool rv = QGraphicsItem::sceneEvent(event);
+
+ if (event->type() == QEvent::FocusIn ||
+ event->type() == QEvent::FocusOut) {
+ focusChanged(hasFocus());
+ }
+ return rv;
+ }
+}
+
+/*! \internal */
+QVariant QDeclarativeItem::itemChange(GraphicsItemChange change,
+ const QVariant &value)
+{
+ Q_D(const QDeclarativeItem);
+ switch (change) {
+ case ItemParentHasChanged:
+ emit parentChanged();
+ break;
+ case ItemChildAddedChange:
+ case ItemChildRemovedChange:
+ emit childrenChanged();
+ break;
+ case ItemVisibleHasChanged: {
+ for(int ii = 0; ii < d->changeListeners.count(); ++ii) {
+ const QDeclarativeItemPrivate::ChangeListener &change = d->changeListeners.at(ii);
+ if (change.types & QDeclarativeItemPrivate::Visibility) {
+ change.listener->itemVisibilityChanged(this);
+ }
+ }
+ }
+ break;
+ case ItemOpacityHasChanged: {
+ for(int ii = 0; ii < d->changeListeners.count(); ++ii) {
+ const QDeclarativeItemPrivate::ChangeListener &change = d->changeListeners.at(ii);
+ if (change.types & QDeclarativeItemPrivate::Opacity) {
+ change.listener->itemOpacityChanged(this);
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+
+ return QGraphicsItem::itemChange(change, value);
+}
+
+/*! \internal */
+QRectF QDeclarativeItem::boundingRect() const
+{
+ Q_D(const QDeclarativeItem);
+ return QRectF(0, 0, d->width, d->height);
+}
+
+/*!
+ \enum QDeclarativeItem::TransformOrigin
+
+ Controls the point about which simple transforms like scale apply.
+
+ \value TopLeft The top-left corner of the item.
+ \value Top The center point of the top of the item.
+ \value TopRight The top-right corner of the item.
+ \value Left The left most point of the vertical middle.
+ \value Center The center of the item.
+ \value Right The right most point of the vertical middle.
+ \value BottomLeft The bottom-left corner of the item.
+ \value Bottom The center point of the bottom of the item.
+ \value BottomRight The bottom-right corner of the item.
+*/
+
+/*!
+ Returns the current transform origin.
+*/
+QDeclarativeItem::TransformOrigin QDeclarativeItem::transformOrigin() const
+{
+ Q_D(const QDeclarativeItem);
+ return d->origin;
+}
+
+/*!
+ Set the transform \a origin.
+*/
+void QDeclarativeItem::setTransformOrigin(TransformOrigin origin)
+{
+ Q_D(QDeclarativeItem);
+ if (origin != d->origin) {
+ d->origin = origin;
+ QGraphicsItem::setTransformOriginPoint(d->computeTransformOrigin());
+ emit transformOriginChanged(d->origin);
+ }
+}
+
+/*!
+ \property QDeclarativeItem::smooth
+ \brief whether the item is smoothly transformed.
+
+ This property is provided purely for the purpose of optimization. Turning
+ smooth transforms off is faster, but looks worse; turning smooth
+ transformations on is slower, but looks better.
+
+ By default smooth transformations are off.
+*/
+
+/*!
+ Returns true if the item should be drawn with antialiasing and
+ smooth pixmap filtering, false otherwise.
+
+ The default is false.
+
+ \sa setSmooth()
+*/
+bool QDeclarativeItem::smooth() const
+{
+ Q_D(const QDeclarativeItem);
+ return d->smooth;
+}
+
+/*!
+ Sets whether the item should be drawn with antialiasing and
+ smooth pixmap filtering to \a smooth.
+
+ \sa smooth()
+*/
+void QDeclarativeItem::setSmooth(bool smooth)
+{
+ Q_D(QDeclarativeItem);
+ if (d->smooth == smooth)
+ return;
+ d->smooth = smooth;
+ emit smoothChanged();
+ update();
+}
+
+qreal QDeclarativeItem::width() const
+{
+ Q_D(const QDeclarativeItem);
+ return d->width;
+}
+
+void QDeclarativeItem::setWidth(qreal w)
+{
+ Q_D(QDeclarativeItem);
+ if (qIsNaN(w))
+ return;
+
+ d->widthValid = true;
+ if (d->width == w)
+ return;
+
+ qreal oldWidth = d->width;
+
+ prepareGeometryChange();
+ d->width = w;
+
+ geometryChanged(QRectF(x(), y(), width(), height()),
+ QRectF(x(), y(), oldWidth, height()));
+}
+
+void QDeclarativeItem::resetWidth()
+{
+ Q_D(QDeclarativeItem);
+ d->widthValid = false;
+ setImplicitWidth(implicitWidth());
+}
+
+/*!
+ Returns the width of the item that is implied by other properties that determine the content.
+*/
+qreal QDeclarativeItem::implicitWidth() const
+{
+ Q_D(const QDeclarativeItem);
+ return d->implicitWidth;
+}
+
+/*!
+ Sets the implied width of the item to \a w.
+ This is the width implied by other properties that determine the content.
+*/
+void QDeclarativeItem::setImplicitWidth(qreal w)
+{
+ Q_D(QDeclarativeItem);
+ d->implicitWidth = w;
+ if (d->width == w || widthValid())
+ return;
+
+ qreal oldWidth = d->width;
+
+ prepareGeometryChange();
+ d->width = w;
+
+ geometryChanged(QRectF(x(), y(), width(), height()),
+ QRectF(x(), y(), oldWidth, height()));
+}
+
+/*!
+ Returns whether the width property has been set explicitly.
+*/
+bool QDeclarativeItem::widthValid() const
+{
+ Q_D(const QDeclarativeItem);
+ return d->widthValid;
+}
+
+qreal QDeclarativeItem::height() const
+{
+ Q_D(const QDeclarativeItem);
+ return d->height;
+}
+
+void QDeclarativeItem::setHeight(qreal h)
+{
+ Q_D(QDeclarativeItem);
+ if (qIsNaN(h))
+ return;
+
+ d->heightValid = true;
+ if (d->height == h)
+ return;
+
+ qreal oldHeight = d->height;
+
+ prepareGeometryChange();
+ d->height = h;
+
+ geometryChanged(QRectF(x(), y(), width(), height()),
+ QRectF(x(), y(), width(), oldHeight));
+}
+
+void QDeclarativeItem::resetHeight()
+{
+ Q_D(QDeclarativeItem);
+ d->heightValid = false;
+ setImplicitHeight(implicitHeight());
+}
+
+/*!
+ Returns the height of the item that is implied by other properties that determine the content.
+*/
+qreal QDeclarativeItem::implicitHeight() const
+{
+ Q_D(const QDeclarativeItem);
+ return d->implicitHeight;
+}
+
+/*!
+ Sets the implied height of the item to \a h.
+ This is the height implied by other properties that determine the content.
+*/
+void QDeclarativeItem::setImplicitHeight(qreal h)
+{
+ Q_D(QDeclarativeItem);
+ d->implicitHeight = h;
+ if (d->height == h || heightValid())
+ return;
+
+ qreal oldHeight = d->height;
+
+ prepareGeometryChange();
+ d->height = h;
+
+ geometryChanged(QRectF(x(), y(), width(), height()),
+ QRectF(x(), y(), width(), oldHeight));
+}
+
+/*!
+ Returns whether the height property has been set explicitly.
+*/
+bool QDeclarativeItem::heightValid() const
+{
+ Q_D(const QDeclarativeItem);
+ return d->heightValid;
+}
+
+/*! \internal */
+void QDeclarativeItem::setSize(const QSizeF &size)
+{
+ Q_D(QDeclarativeItem);
+ d->heightValid = true;
+ d->widthValid = true;
+
+ if (d->height == size.height() && d->width == size.width())
+ return;
+
+ qreal oldHeight = d->height;
+ qreal oldWidth = d->width;
+
+ prepareGeometryChange();
+ d->height = size.height();
+ d->width = size.width();
+
+ geometryChanged(QRectF(x(), y(), width(), height()),
+ QRectF(x(), y(), oldWidth, oldHeight));
+}
+
+/*!
+ \qmlproperty bool Item::wantsFocus
+
+ This property indicates whether the item has has an active focus request.
+
+ \sa {qmlfocus}{Keyboard Focus}
+*/
+
+/*! \internal */
+bool QDeclarativeItem::wantsFocus() const
+{
+ return focusItem() != 0;
+}
+
+/*!
+ \qmlproperty bool Item::focus
+ This property indicates whether the item has keyboard input focus. Set this
+ property to true to request focus.
+
+ \sa {qmlfocus}{Keyboard Focus}
+*/
+
+/*! \internal */
+bool QDeclarativeItem::hasFocus() const
+{
+ return QGraphicsItem::hasFocus();
+}
+
+/*! \internal */
+void QDeclarativeItem::setFocus(bool focus)
+{
+ if (focus)
+ QGraphicsItem::setFocus(Qt::OtherFocusReason);
+ else
+ QGraphicsItem::clearFocus();
+}
+
+/*!
+ \reimp
+ \internal
+*/
+void QDeclarativeItem::paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
+{
+}
+
+/*!
+ \reimp
+ \internal
+*/
+bool QDeclarativeItem::event(QEvent *ev)
+{
+ return QGraphicsObject::event(ev);
+}
+
+QDebug operator<<(QDebug debug, QDeclarativeItem *item)
+{
+ if (!item) {
+ debug << "QDeclarativeItem(0)";
+ return debug;
+ }
+
+ debug << item->metaObject()->className() << "(this =" << ((void*)item)
+ << ", parent =" << ((void*)item->parentItem())
+ << ", geometry =" << QRectF(item->pos(), QSizeF(item->width(), item->height()))
+ << ", z =" << item->zValue() << ')';
+ return debug;
+}
+
+int QDeclarativeItemPrivate::consistentTime = -1;
+void QDeclarativeItemPrivate::setConsistentTime(int t)
+{
+ consistentTime = t;
+}
+
+QTime QDeclarativeItemPrivate::currentTime()
+{
+ if (consistentTime == -1)
+ return QTime::currentTime();
+ else
+ return QTime(0, 0).addMSecs(consistentTime);
+}
+
+void QDeclarativeItemPrivate::start(QTime &t)
+{
+ t = currentTime();
+}
+
+int QDeclarativeItemPrivate::elapsed(QTime &t)
+{
+ int n = t.msecsTo(currentTime());
+ if (n < 0) // passed midnight
+ n += 86400 * 1000;
+ return n;
+}
+
+int QDeclarativeItemPrivate::restart(QTime &t)
+{
+ QTime time = currentTime();
+ int n = t.msecsTo(time);
+ if (n < 0) // passed midnight
+ n += 86400*1000;
+ t = time;
+ return n;
+}
+
+QT_END_NAMESPACE
+
+#include <moc_qdeclarativeitem.cpp>
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.h b/src/declarative/graphicsitems/qdeclarativeitem.h
new file mode 100644
index 0000000000..2053eba135
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeitem.h
@@ -0,0 +1,246 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEITEM_H
+#define QDECLARATIVEITEM_H
+
+#include <qdeclarative.h>
+#include <qdeclarativecomponent.h>
+
+#include <QtCore/QObject>
+#include <QtCore/QList>
+#include <QtGui/qgraphicsitem.h>
+#include <QtGui/qgraphicstransform.h>
+#include <QtGui/qfont.h>
+#include <QtGui/qaction.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeState;
+class QDeclarativeAnchorLine;
+class QDeclarativeTransition;
+class QDeclarativeKeyEvent;
+class QDeclarativeAnchors;
+class QDeclarativeItemPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeItem : public QGraphicsObject, public QDeclarativeParserStatus
+{
+ Q_OBJECT
+ Q_INTERFACES(QDeclarativeParserStatus)
+
+ Q_PROPERTY(QDeclarativeItem * parent READ parentItem WRITE setParentItem NOTIFY parentChanged DESIGNABLE false FINAL)
+ Q_PROPERTY(QDeclarativeListProperty<QObject> data READ data DESIGNABLE false)
+ Q_PROPERTY(QDeclarativeListProperty<QDeclarativeItem> children READ fxChildren DESIGNABLE false NOTIFY childrenChanged)
+ Q_PROPERTY(QDeclarativeListProperty<QObject> resources READ resources DESIGNABLE false)
+ Q_PROPERTY(QDeclarativeListProperty<QDeclarativeState> states READ states DESIGNABLE false)
+ Q_PROPERTY(QDeclarativeListProperty<QDeclarativeTransition> transitions READ transitions DESIGNABLE false)
+ Q_PROPERTY(QString state READ state WRITE setState NOTIFY stateChanged)
+ Q_PROPERTY(qreal width READ width WRITE setWidth NOTIFY widthChanged RESET resetWidth FINAL)
+ Q_PROPERTY(qreal height READ height WRITE setHeight NOTIFY heightChanged RESET resetHeight FINAL)
+ Q_PROPERTY(QRectF childrenRect READ childrenRect NOTIFY childrenRectChanged DESIGNABLE false FINAL)
+ Q_PROPERTY(QDeclarativeAnchors * anchors READ anchors DESIGNABLE false CONSTANT FINAL)
+ Q_PROPERTY(QDeclarativeAnchorLine left READ left CONSTANT FINAL)
+ Q_PROPERTY(QDeclarativeAnchorLine right READ right CONSTANT FINAL)
+ Q_PROPERTY(QDeclarativeAnchorLine horizontalCenter READ horizontalCenter CONSTANT FINAL)
+ Q_PROPERTY(QDeclarativeAnchorLine top READ top CONSTANT FINAL)
+ Q_PROPERTY(QDeclarativeAnchorLine bottom READ bottom CONSTANT FINAL)
+ Q_PROPERTY(QDeclarativeAnchorLine verticalCenter READ verticalCenter CONSTANT FINAL)
+ Q_PROPERTY(QDeclarativeAnchorLine baseline READ baseline CONSTANT FINAL)
+ Q_PROPERTY(qreal baselineOffset READ baselineOffset WRITE setBaselineOffset NOTIFY baselineOffsetChanged)
+ Q_PROPERTY(bool clip READ clip WRITE setClip NOTIFY clipChanged) // ### move to QGI/QGO, NOTIFY
+ Q_PROPERTY(bool focus READ hasFocus WRITE setFocus NOTIFY focusChanged FINAL)
+ Q_PROPERTY(bool wantsFocus READ wantsFocus NOTIFY wantsFocusChanged)
+ Q_PROPERTY(QDeclarativeListProperty<QGraphicsTransform> transform READ transform DESIGNABLE false FINAL)
+ Q_PROPERTY(TransformOrigin transformOrigin READ transformOrigin WRITE setTransformOrigin NOTIFY transformOriginChanged)
+ Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged)
+ Q_PROPERTY(QGraphicsEffect *effect READ graphicsEffect WRITE setGraphicsEffect)
+ Q_ENUMS(TransformOrigin)
+ Q_CLASSINFO("DefaultProperty", "data")
+
+public:
+ enum TransformOrigin {
+ TopLeft, Top, TopRight,
+ Left, Center, Right,
+ BottomLeft, Bottom, BottomRight
+ };
+
+ QDeclarativeItem(QDeclarativeItem *parent = 0);
+ virtual ~QDeclarativeItem();
+
+ QDeclarativeItem *parentItem() const;
+ void setParentItem(QDeclarativeItem *parent);
+ void setParent(QDeclarativeItem *parent) { setParentItem(parent); }
+
+ QDeclarativeListProperty<QObject> data();
+ QDeclarativeListProperty<QDeclarativeItem> fxChildren();
+ QDeclarativeListProperty<QObject> resources();
+
+ QDeclarativeAnchors *anchors();
+ QRectF childrenRect();
+
+ bool clip() const;
+ void setClip(bool);
+
+ QDeclarativeListProperty<QDeclarativeState> states();
+ QDeclarativeListProperty<QDeclarativeTransition> transitions();
+
+ QString state() const;
+ void setState(const QString &);
+
+ qreal baselineOffset() const;
+ void setBaselineOffset(qreal);
+
+ QDeclarativeListProperty<QGraphicsTransform> transform();
+
+ qreal width() const;
+ void setWidth(qreal);
+ void resetWidth();
+ qreal implicitWidth() const;
+
+ qreal height() const;
+ void setHeight(qreal);
+ void resetHeight();
+ qreal implicitHeight() const;
+
+ void setSize(const QSizeF &size);
+
+ TransformOrigin transformOrigin() const;
+ void setTransformOrigin(TransformOrigin);
+
+ bool smooth() const;
+ void setSmooth(bool);
+
+ QRectF boundingRect() const;
+ virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
+
+ bool wantsFocus() const;
+ bool hasFocus() const;
+ void setFocus(bool);
+
+ bool keepMouseGrab() const;
+ void setKeepMouseGrab(bool);
+
+ Q_INVOKABLE QScriptValue mapFromItem(const QScriptValue &item, int x, int y) const;
+ Q_INVOKABLE QScriptValue mapToItem(const QScriptValue &item, int x, int y) const;
+
+ QDeclarativeAnchorLine left() const;
+ QDeclarativeAnchorLine right() const;
+ QDeclarativeAnchorLine horizontalCenter() const;
+ QDeclarativeAnchorLine top() const;
+ QDeclarativeAnchorLine bottom() const;
+ QDeclarativeAnchorLine verticalCenter() const;
+ QDeclarativeAnchorLine baseline() const;
+
+Q_SIGNALS:
+ void widthChanged();
+ void heightChanged();
+ void childrenChanged();
+ void childrenRectChanged();
+ void baselineOffsetChanged();
+ void stateChanged(const QString &);
+ void focusChanged();
+ void wantsFocusChanged();
+ void parentChanged();
+ void transformOriginChanged(TransformOrigin);
+ void smoothChanged();
+ void clipChanged();
+
+protected:
+ bool isComponentComplete() const;
+ virtual bool sceneEvent(QEvent *);
+ virtual bool event(QEvent *);
+ virtual QVariant itemChange(GraphicsItemChange, const QVariant &);
+
+ void setImplicitWidth(qreal);
+ bool widthValid() const; // ### better name?
+ void setImplicitHeight(qreal);
+ bool heightValid() const; // ### better name?
+
+ virtual void classBegin();
+ virtual void componentComplete();
+ virtual void focusChanged(bool);
+ virtual void keyPressEvent(QKeyEvent *event);
+ virtual void keyReleaseEvent(QKeyEvent *event);
+ virtual void inputMethodEvent(QInputMethodEvent *);
+ virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
+ virtual void geometryChanged(const QRectF &newGeometry,
+ const QRectF &oldGeometry);
+
+protected:
+ QDeclarativeItem(QDeclarativeItemPrivate &dd, QDeclarativeItem *parent = 0);
+
+private:
+ Q_DISABLE_COPY(QDeclarativeItem)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeItem)
+};
+
+template<typename T>
+ T qobject_cast(QGraphicsObject *o)
+{
+ QObject *obj = o;
+ return qobject_cast<T>(obj);
+}
+
+// ### move to QGO
+template<typename T>
+T qobject_cast(QGraphicsItem *item)
+{
+ if (!item) return 0;
+ QObject *o = item->toGraphicsObject();
+ return qobject_cast<T>(o);
+}
+
+QDebug Q_DECLARATIVE_EXPORT operator<<(QDebug debug, QDeclarativeItem *item);
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeItem)
+QML_DECLARE_TYPE(QGraphicsTransform)
+QML_DECLARE_TYPE(QGraphicsScale)
+QML_DECLARE_TYPE(QGraphicsRotation)
+QML_DECLARE_TYPE(QAction)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEITEM_H
diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h
new file mode 100644
index 0000000000..e4249709a4
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h
@@ -0,0 +1,482 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEITEM_P_H
+#define QDECLARATIVEITEM_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeitem.h"
+
+#include "qdeclarativeanchors_p.h"
+#include "qdeclarativeanchors_p_p.h"
+#include "qdeclarativeitemchangelistener_p.h"
+#include <private/qpodvector_p.h>
+
+#include <private/qdeclarativestate_p.h>
+#include <private/qdeclarativenullablevalue_p_p.h>
+#include <qdeclarative.h>
+#include <qdeclarativecontext.h>
+
+#include <QtCore/qlist.h>
+#include <QtCore/qdebug.h>
+
+#include <private/qgraphicsitem_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QNetworkReply;
+class QDeclarativeItemKeyFilter;
+
+//### merge into private?
+class QDeclarativeContents : public QObject
+{
+ Q_OBJECT
+public:
+ QDeclarativeContents();
+
+ QRectF rectF() const;
+
+ void setItem(QDeclarativeItem *item);
+
+public Q_SLOTS:
+ void calcHeight();
+ void calcWidth();
+
+Q_SIGNALS:
+ void rectChanged();
+
+private:
+ QDeclarativeItem *m_item;
+ qreal m_x;
+ qreal m_y;
+ qreal m_width;
+ qreal m_height;
+};
+
+class QDeclarativeItemPrivate : public QGraphicsItemPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeItem)
+
+public:
+ QDeclarativeItemPrivate()
+ : _anchors(0), _contents(0),
+ _baselineOffset(0),
+ _anchorLines(0),
+ _stateGroup(0), origin(QDeclarativeItem::Center),
+ widthValid(false), heightValid(false),
+ _componentComplete(true), _keepMouse(false),
+ smooth(false), keyHandler(0),
+ width(0), height(0), implicitWidth(0), implicitHeight(0)
+ {
+ QGraphicsItemPrivate::acceptedMouseButtons = 0;
+ QGraphicsItemPrivate::flags = QGraphicsItem::GraphicsItemFlags(
+ QGraphicsItem::ItemHasNoContents
+ | QGraphicsItem::ItemIsFocusable
+ | QGraphicsItem::ItemNegativeZStacksBehindParent);
+
+ }
+
+ void init(QDeclarativeItem *parent)
+ {
+ Q_Q(QDeclarativeItem);
+
+ if (parent)
+ q->setParentItem(parent);
+ _baselineOffset.invalidate();
+ mouseSetsFocus = false;
+ }
+
+ QString _id;
+
+ // data property
+ static void data_append(QDeclarativeListProperty<QObject> *, QObject *);
+
+ // resources property
+ static QObject *resources_at(QDeclarativeListProperty<QObject> *, int);
+ static void resources_append(QDeclarativeListProperty<QObject> *, QObject *);
+ static int resources_count(QDeclarativeListProperty<QObject> *);
+
+ // children property
+ static QDeclarativeItem *children_at(QDeclarativeListProperty<QDeclarativeItem> *, int);
+ static void children_append(QDeclarativeListProperty<QDeclarativeItem> *, QDeclarativeItem *);
+ static int children_count(QDeclarativeListProperty<QDeclarativeItem> *);
+
+ // transform property
+ static int transform_count(QDeclarativeListProperty<QGraphicsTransform> *list);
+ static void transform_append(QDeclarativeListProperty<QGraphicsTransform> *list, QGraphicsTransform *);
+ static QGraphicsTransform *transform_at(QDeclarativeListProperty<QGraphicsTransform> *list, int);
+ static void transform_clear(QDeclarativeListProperty<QGraphicsTransform> *list);
+
+ QDeclarativeAnchors *anchors() {
+ if (!_anchors) {
+ Q_Q(QDeclarativeItem);
+ _anchors = new QDeclarativeAnchors(q);
+ if (!_componentComplete)
+ _anchors->classBegin();
+ }
+ return _anchors;
+ }
+ QDeclarativeAnchors *_anchors;
+ QDeclarativeContents *_contents;
+
+ QDeclarativeNullableValue<qreal> _baselineOffset;
+
+ struct AnchorLines {
+ AnchorLines(QDeclarativeItem *);
+ QDeclarativeAnchorLine left;
+ QDeclarativeAnchorLine right;
+ QDeclarativeAnchorLine hCenter;
+ QDeclarativeAnchorLine top;
+ QDeclarativeAnchorLine bottom;
+ QDeclarativeAnchorLine vCenter;
+ QDeclarativeAnchorLine baseline;
+ };
+ mutable AnchorLines *_anchorLines;
+ AnchorLines *anchorLines() const {
+ Q_Q(const QDeclarativeItem);
+ if (!_anchorLines) _anchorLines =
+ new AnchorLines(const_cast<QDeclarativeItem *>(q));
+ return _anchorLines;
+ }
+
+ enum ChangeType {
+ Geometry = 0x01,
+ SiblingOrder = 0x02,
+ Visibility = 0x04,
+ Opacity = 0x08,
+ Destroyed = 0x10
+ };
+
+ Q_DECLARE_FLAGS(ChangeTypes, ChangeType)
+
+ struct ChangeListener {
+ ChangeListener(QDeclarativeItemChangeListener *l, QDeclarativeItemPrivate::ChangeTypes t) : listener(l), types(t) {}
+ QDeclarativeItemChangeListener *listener;
+ QDeclarativeItemPrivate::ChangeTypes types;
+ bool operator==(const ChangeListener &other) const { return listener == other.listener && types == other.types; }
+ };
+
+ void addItemChangeListener(QDeclarativeItemChangeListener *listener, ChangeTypes types) {
+ changeListeners.append(ChangeListener(listener, types));
+ }
+ void removeItemChangeListener(QDeclarativeItemChangeListener *, ChangeTypes types);
+ QPODVector<ChangeListener,4> changeListeners;
+
+ QDeclarativeStateGroup *states();
+ QDeclarativeStateGroup *_stateGroup;
+
+ QDeclarativeItem::TransformOrigin origin:4;
+ bool widthValid:1;
+ bool heightValid:1;
+ bool _componentComplete:1;
+ bool _keepMouse:1;
+ bool smooth:1;
+
+ QDeclarativeItemKeyFilter *keyHandler;
+
+ qreal width;
+ qreal height;
+ qreal implicitWidth;
+ qreal implicitHeight;
+
+ QPointF computeTransformOrigin() const;
+
+ virtual void setPosHelper(const QPointF &pos)
+ {
+ Q_Q(QDeclarativeItem);
+ QRectF oldGeometry(this->pos.x(), this->pos.y(), width, height);
+ QGraphicsItemPrivate::setPosHelper(pos);
+ q->geometryChanged(QRectF(this->pos.x(), this->pos.y(), width, height), oldGeometry);
+ }
+
+ // Reimplemented from QGraphicsItemPrivate
+ virtual void subFocusItemChange()
+ {
+ emit q_func()->wantsFocusChanged();
+ }
+
+ // Reimplemented from QGraphicsItemPrivate
+ virtual void siblingOrderChange()
+ {
+ Q_Q(QDeclarativeItem);
+ for(int ii = 0; ii < changeListeners.count(); ++ii) {
+ const QDeclarativeItemPrivate::ChangeListener &change = changeListeners.at(ii);
+ if (change.types & QDeclarativeItemPrivate::SiblingOrder) {
+ change.listener->itemSiblingOrderChanged(q);
+ }
+ }
+ }
+
+ static int consistentTime;
+ static QTime currentTime();
+ static void Q_DECLARATIVE_EXPORT setConsistentTime(int t);
+ static void start(QTime &);
+ static int elapsed(QTime &);
+ static int restart(QTime &);
+};
+
+/*
+ Key filters can be installed on a QDeclarativeItem, but not removed. Currently they
+ are only used by attached objects (which are only destroyed on Item
+ destruction), so this isn't a problem. If in future this becomes any form
+ of public API, they will have to support removal too.
+*/
+class QDeclarativeItemKeyFilter
+{
+public:
+ QDeclarativeItemKeyFilter(QDeclarativeItem * = 0);
+ virtual ~QDeclarativeItemKeyFilter();
+
+ virtual void keyPressed(QKeyEvent *event);
+ virtual void keyReleased(QKeyEvent *event);
+ virtual void inputMethodEvent(QInputMethodEvent *event);
+ virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
+ virtual void componentComplete();
+
+private:
+ QDeclarativeItemKeyFilter *m_next;
+};
+
+class QDeclarativeKeyNavigationAttachedPrivate : public QObjectPrivate
+{
+public:
+ QDeclarativeKeyNavigationAttachedPrivate()
+ : QObjectPrivate(), left(0), right(0), up(0), down(0), tab(0), backtab(0) {}
+
+ QDeclarativeItem *left;
+ QDeclarativeItem *right;
+ QDeclarativeItem *up;
+ QDeclarativeItem *down;
+ QDeclarativeItem *tab;
+ QDeclarativeItem *backtab;
+};
+
+class QDeclarativeKeyNavigationAttached : public QObject, public QDeclarativeItemKeyFilter
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeKeyNavigationAttached)
+
+ Q_PROPERTY(QDeclarativeItem *left READ left WRITE setLeft NOTIFY changed)
+ Q_PROPERTY(QDeclarativeItem *right READ right WRITE setRight NOTIFY changed)
+ Q_PROPERTY(QDeclarativeItem *up READ up WRITE setUp NOTIFY changed)
+ Q_PROPERTY(QDeclarativeItem *down READ down WRITE setDown NOTIFY changed)
+ Q_PROPERTY(QDeclarativeItem *tab READ tab WRITE setTab NOTIFY changed)
+ Q_PROPERTY(QDeclarativeItem *backtab READ backtab WRITE setBacktab NOTIFY changed)
+
+public:
+ QDeclarativeKeyNavigationAttached(QObject * = 0);
+
+ QDeclarativeItem *left() const;
+ void setLeft(QDeclarativeItem *);
+ QDeclarativeItem *right() const;
+ void setRight(QDeclarativeItem *);
+ QDeclarativeItem *up() const;
+ void setUp(QDeclarativeItem *);
+ QDeclarativeItem *down() const;
+ void setDown(QDeclarativeItem *);
+ QDeclarativeItem *tab() const;
+ void setTab(QDeclarativeItem *);
+ QDeclarativeItem *backtab() const;
+ void setBacktab(QDeclarativeItem *);
+
+ static QDeclarativeKeyNavigationAttached *qmlAttachedProperties(QObject *);
+
+Q_SIGNALS:
+ void changed();
+
+private:
+ virtual void keyPressed(QKeyEvent *event);
+ virtual void keyReleased(QKeyEvent *event);
+};
+
+class QDeclarativeKeysAttachedPrivate : public QObjectPrivate
+{
+public:
+ QDeclarativeKeysAttachedPrivate()
+ : QObjectPrivate(), inPress(false), inRelease(false)
+ , inIM(false), enabled(true), imeItem(0), item(0)
+ {}
+
+ bool isConnected(const char *signalName);
+
+ QGraphicsItem *finalFocusProxy(QGraphicsItem *item) const
+ {
+ QGraphicsItem *fp;
+ while ((fp = item->focusProxy()))
+ item = fp;
+ return item;
+ }
+
+ //loop detection
+ bool inPress:1;
+ bool inRelease:1;
+ bool inIM:1;
+
+ bool enabled : 1;
+
+ QGraphicsItem *imeItem;
+ QList<QDeclarativeItem *> targets;
+ QDeclarativeItem *item;
+};
+
+class QDeclarativeKeysAttached : public QObject, public QDeclarativeItemKeyFilter
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeKeysAttached)
+
+ Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
+ Q_PROPERTY(QDeclarativeListProperty<QDeclarativeItem> forwardTo READ forwardTo)
+
+public:
+ QDeclarativeKeysAttached(QObject *parent=0);
+ ~QDeclarativeKeysAttached();
+
+ bool enabled() const { Q_D(const QDeclarativeKeysAttached); return d->enabled; }
+ void setEnabled(bool enabled) {
+ Q_D(QDeclarativeKeysAttached);
+ if (enabled != d->enabled) {
+ d->enabled = enabled;
+ emit enabledChanged();
+ }
+ }
+
+ QDeclarativeListProperty<QDeclarativeItem> forwardTo() {
+ Q_D(QDeclarativeKeysAttached);
+ return QDeclarativeListProperty<QDeclarativeItem>(this, d->targets);
+ }
+
+ virtual void componentComplete();
+
+ static QDeclarativeKeysAttached *qmlAttachedProperties(QObject *);
+
+Q_SIGNALS:
+ void enabledChanged();
+ void pressed(QDeclarativeKeyEvent *event);
+ void released(QDeclarativeKeyEvent *event);
+ void digit0Pressed(QDeclarativeKeyEvent *event);
+ void digit1Pressed(QDeclarativeKeyEvent *event);
+ void digit2Pressed(QDeclarativeKeyEvent *event);
+ void digit3Pressed(QDeclarativeKeyEvent *event);
+ void digit4Pressed(QDeclarativeKeyEvent *event);
+ void digit5Pressed(QDeclarativeKeyEvent *event);
+ void digit6Pressed(QDeclarativeKeyEvent *event);
+ void digit7Pressed(QDeclarativeKeyEvent *event);
+ void digit8Pressed(QDeclarativeKeyEvent *event);
+ void digit9Pressed(QDeclarativeKeyEvent *event);
+
+ void leftPressed(QDeclarativeKeyEvent *event);
+ void rightPressed(QDeclarativeKeyEvent *event);
+ void upPressed(QDeclarativeKeyEvent *event);
+ void downPressed(QDeclarativeKeyEvent *event);
+ void tabPressed(QDeclarativeKeyEvent *event);
+ void backtabPressed(QDeclarativeKeyEvent *event);
+
+ void asteriskPressed(QDeclarativeKeyEvent *event);
+ void numberSignPressed(QDeclarativeKeyEvent *event);
+ void escapePressed(QDeclarativeKeyEvent *event);
+ void returnPressed(QDeclarativeKeyEvent *event);
+ void enterPressed(QDeclarativeKeyEvent *event);
+ void deletePressed(QDeclarativeKeyEvent *event);
+ void spacePressed(QDeclarativeKeyEvent *event);
+ void backPressed(QDeclarativeKeyEvent *event);
+ void cancelPressed(QDeclarativeKeyEvent *event);
+ void selectPressed(QDeclarativeKeyEvent *event);
+ void yesPressed(QDeclarativeKeyEvent *event);
+ void noPressed(QDeclarativeKeyEvent *event);
+ void context1Pressed(QDeclarativeKeyEvent *event);
+ void context2Pressed(QDeclarativeKeyEvent *event);
+ void context3Pressed(QDeclarativeKeyEvent *event);
+ void context4Pressed(QDeclarativeKeyEvent *event);
+ void callPressed(QDeclarativeKeyEvent *event);
+ void hangupPressed(QDeclarativeKeyEvent *event);
+ void flipPressed(QDeclarativeKeyEvent *event);
+ void menuPressed(QDeclarativeKeyEvent *event);
+ void volumeUpPressed(QDeclarativeKeyEvent *event);
+ void volumeDownPressed(QDeclarativeKeyEvent *event);
+
+private:
+ virtual void keyPressed(QKeyEvent *event);
+ virtual void keyReleased(QKeyEvent *event);
+ virtual void inputMethodEvent(QInputMethodEvent *);
+ virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
+
+ const QByteArray keyToSignal(int key) {
+ QByteArray keySignal;
+ if (key >= Qt::Key_0 && key <= Qt::Key_9) {
+ keySignal = "digit0Pressed";
+ keySignal[5] = '0' + (key - Qt::Key_0);
+ } else {
+ int i = 0;
+ while (sigMap[i].key && sigMap[i].key != key)
+ ++i;
+ keySignal = sigMap[i].sig;
+ }
+ return keySignal;
+ }
+
+ struct SigMap {
+ int key;
+ const char *sig;
+ };
+
+ static const SigMap sigMap[];
+};
+
+Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeItemPrivate::ChangeTypes);
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeKeysAttached)
+QML_DECLARE_TYPEINFO(QDeclarativeKeysAttached, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(QDeclarativeKeyNavigationAttached)
+QML_DECLARE_TYPEINFO(QDeclarativeKeyNavigationAttached, QML_HAS_ATTACHED_PROPERTIES)
+
+#endif // QDECLARATIVEITEM_P_H
diff --git a/src/declarative/graphicsitems/qdeclarativeitemchangelistener_p.h b/src/declarative/graphicsitems/qdeclarativeitemchangelistener_p.h
new file mode 100644
index 0000000000..4da3bf7a8a
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeitemchangelistener_p.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEITEMCHANGELISTENER
+#define QDECLARATIVEITEMCHANGELISTENER
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
+
+class QRectF;
+class QDeclarativeItem;
+class QDeclarativeAnchorsPrivate;
+class QDeclarativeItemChangeListener
+{
+public:
+ virtual void itemGeometryChanged(QDeclarativeItem *, const QRectF &, const QRectF &) {}
+ virtual void itemSiblingOrderChanged(QDeclarativeItem *) {}
+ virtual void itemVisibilityChanged(QDeclarativeItem *) {}
+ virtual void itemOpacityChanged(QDeclarativeItem *) {}
+ virtual void itemDestroyed(QDeclarativeItem *) {}
+ virtual QDeclarativeAnchorsPrivate *anchorPrivate() { return 0; }
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEITEMCHANGELISTENER
diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
new file mode 100644
index 0000000000..25660f8450
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeitemsmodule_p.h"
+
+#include <QtGui/qaction.h>
+#include <QtGui/qvalidator.h>
+#include <QtGui/qgraphicseffect.h>
+
+#include "qdeclarativeevents_p_p.h"
+#include "qdeclarativeeffects_p.h"
+#include "qdeclarativescalegrid_p_p.h"
+#include "qdeclarativeanimatedimage_p.h"
+#include "qdeclarativeborderimage_p.h"
+#include "qdeclarativepositioners_p.h"
+#include "qdeclarativemousearea_p.h"
+#include "qdeclarativeflickable_p.h"
+#include "qdeclarativeflickable_p_p.h"
+#include "qdeclarativeflipable_p.h"
+#include "qdeclarativefocuspanel_p.h"
+#include "qdeclarativefocusscope_p.h"
+#include "qdeclarativegraphicsobjectcontainer_p.h"
+#include "qdeclarativegridview_p.h"
+#include "qdeclarativeimage_p.h"
+#include "qdeclarativeitem_p.h"
+#include "qdeclarativelayoutitem_p.h"
+#include "qdeclarativelistview_p.h"
+#include "qdeclarativeloader_p.h"
+#include "qdeclarativemousearea_p.h"
+#include "qdeclarativeparticles_p.h"
+#include "qdeclarativepath_p.h"
+#include "qdeclarativepathview_p.h"
+#include "qdeclarativerectangle_p.h"
+#include "qdeclarativerepeater_p.h"
+#include "qdeclarativetext_p.h"
+#include "qdeclarativetextedit_p.h"
+#include "qdeclarativetextinput_p.h"
+#include "qdeclarativevisualitemmodel_p.h"
+#ifdef QT_WEBKIT_LIB
+#include "qdeclarativewebview_p.h"
+#include "qdeclarativewebview_p_p.h"
+#endif
+#include "qdeclarativeanchors_p.h"
+
+void QDeclarativeItemModule::defineModule()
+{
+ QML_REGISTER_TYPE(Qt,4,6,AnimatedImage,QDeclarativeAnimatedImage);
+ QML_REGISTER_TYPE(Qt,4,6,Blur,QGraphicsBlurEffect);
+ QML_REGISTER_TYPE(Qt,4,6,BorderImage,QDeclarativeBorderImage);
+ QML_REGISTER_TYPE(Qt,4,6,Colorize,QGraphicsColorizeEffect);
+ QML_REGISTER_TYPE(Qt,4,6,Column,QDeclarativeColumn);
+ QML_REGISTER_TYPE(Qt,4,6,Drag,QDeclarativeDrag);
+ QML_REGISTER_TYPE(Qt,4,6,DropShadow,QGraphicsDropShadowEffect);
+ QML_REGISTER_TYPE(Qt,4,6,Flickable,QDeclarativeFlickable);
+ QML_REGISTER_TYPE(Qt,4,6,Flipable,QDeclarativeFlipable);
+ QML_REGISTER_TYPE(Qt,4,6,Flow,QDeclarativeFlow);
+ QML_REGISTER_TYPE(Qt,4,6,FocusPanel,QDeclarativeFocusPanel);
+ QML_REGISTER_TYPE(Qt,4,6,FocusScope,QDeclarativeFocusScope);
+ QML_REGISTER_TYPE(Qt,4,6,Gradient,QDeclarativeGradient);
+ QML_REGISTER_TYPE(Qt,4,6,GradientStop,QDeclarativeGradientStop);
+ QML_REGISTER_TYPE(Qt,4,6,GraphicsObjectContainer,QDeclarativeGraphicsObjectContainer);
+ QML_REGISTER_TYPE(Qt,4,6,Grid,QDeclarativeGrid);
+ QML_REGISTER_TYPE(Qt,4,6,GridView,QDeclarativeGridView);
+ QML_REGISTER_TYPE(Qt,4,6,Image,QDeclarativeImage);
+ QML_REGISTER_TYPE(Qt,4,6,Item,QDeclarativeItem);
+ QML_REGISTER_TYPE(Qt,4,6,KeyNavigation,QDeclarativeKeyNavigationAttached);
+ QML_REGISTER_TYPE(Qt,4,6,Keys,QDeclarativeKeysAttached);
+ QML_REGISTER_TYPE(Qt,4,6,LayoutItem,QDeclarativeLayoutItem);
+ QML_REGISTER_TYPE(Qt,4,6,ListView,QDeclarativeListView);
+ QML_REGISTER_TYPE(Qt,4,6,Loader,QDeclarativeLoader);
+ QML_REGISTER_TYPE(Qt,4,6,MouseArea,QDeclarativeMouseArea);
+ QML_REGISTER_TYPE(Qt,4,6,Opacity,QGraphicsOpacityEffect);
+ QML_REGISTER_TYPE(Qt,4,6,ParticleMotion,QDeclarativeParticleMotion);
+ QML_REGISTER_TYPE(Qt,4,6,ParticleMotionGravity,QDeclarativeParticleMotionGravity);
+ QML_REGISTER_TYPE(Qt,4,6,ParticleMotionLinear,QDeclarativeParticleMotionLinear);
+ QML_REGISTER_TYPE(Qt,4,6,ParticleMotionWander,QDeclarativeParticleMotionWander);
+ QML_REGISTER_TYPE(Qt,4,6,Particles,QDeclarativeParticles);
+ QML_REGISTER_TYPE(Qt,4,6,Path,QDeclarativePath);
+ QML_REGISTER_TYPE(Qt,4,6,PathAttribute,QDeclarativePathAttribute);
+ QML_REGISTER_TYPE(Qt,4,6,PathCubic,QDeclarativePathCubic);
+ QML_REGISTER_TYPE(Qt,4,6,PathLine,QDeclarativePathLine);
+ QML_REGISTER_TYPE(Qt,4,6,PathPercent,QDeclarativePathPercent);
+ QML_REGISTER_TYPE(Qt,4,6,PathQuad,QDeclarativePathQuad);
+ QML_REGISTER_TYPE(Qt,4,6,PathView,QDeclarativePathView);
+ QML_REGISTER_TYPE(Qt,4,6,Pen,QDeclarativePen);
+ QML_REGISTER_TYPE(Qt,4,6,QIntValidator,QIntValidator);
+#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0))
+ QML_REGISTER_TYPE(Qt,4,7,QDoubleValidator,QDoubleValidator);
+ QML_REGISTER_TYPE(Qt,4,7,QRegExpValidator,QRegExpValidator);
+#endif
+ QML_REGISTER_TYPE(Qt,4,6,Rectangle,QDeclarativeRectangle);
+ QML_REGISTER_TYPE(Qt,4,6,Repeater,QDeclarativeRepeater);
+ QML_REGISTER_TYPE(Qt,4,6,Rotation,QGraphicsRotation);
+ QML_REGISTER_TYPE(Qt,4,6,Row,QDeclarativeRow);
+ QML_REGISTER_TYPE(Qt,4,6,Scale,QGraphicsScale);
+ QML_REGISTER_TYPE(Qt,4,6,Text,QDeclarativeText);
+ QML_REGISTER_TYPE(Qt,4,6,TextEdit,QDeclarativeTextEdit);
+ QML_REGISTER_TYPE(Qt,4,6,TextInput,QDeclarativeTextInput);
+ QML_REGISTER_TYPE(Qt,4,6,ViewSection,QDeclarativeViewSection);
+ QML_REGISTER_TYPE(Qt,4,6,VisibleArea,QDeclarativeFlickableVisibleArea);
+ QML_REGISTER_TYPE(Qt,4,6,VisualDataModel,QDeclarativeVisualDataModel);
+ QML_REGISTER_TYPE(Qt,4,6,VisualItemModel,QDeclarativeVisualItemModel);
+
+ QML_REGISTER_NOCREATE_TYPE(QDeclarativeAnchors);
+ QML_REGISTER_NOCREATE_TYPE(QGraphicsEffect);
+ QML_REGISTER_NOCREATE_TYPE(QDeclarativeKeyEvent);
+ QML_REGISTER_NOCREATE_TYPE(QDeclarativeMouseEvent);
+ QML_REGISTER_NOCREATE_TYPE(QGraphicsObject);
+ QML_REGISTER_NOCREATE_TYPE(QGraphicsTransform);
+ QML_REGISTER_NOCREATE_TYPE(QDeclarativePathElement);
+ QML_REGISTER_NOCREATE_TYPE(QDeclarativeCurve);
+ QML_REGISTER_NOCREATE_TYPE(QDeclarativeScaleGrid);
+ QML_REGISTER_NOCREATE_TYPE(QValidator);
+ QML_REGISTER_NOCREATE_TYPE(QDeclarativeVisualModel);
+ QML_REGISTER_NOCREATE_TYPE(QAction);
+#ifdef QT_WEBKIT_LIB
+ QML_REGISTER_NOCREATE_TYPE(QDeclarativeWebSettings);
+#endif
+}
diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule_p.h b/src/declarative/graphicsitems/qdeclarativeitemsmodule_p.h
new file mode 100644
index 0000000000..5c4904016a
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule_p.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEITEMMODULE_H
+#define QDECLARATIVEITEMMODULE_H
+
+#include <qdeclarative.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeItemModule
+{
+public:
+ static void defineModule();
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEITEMMODULE_H
diff --git a/src/declarative/graphicsitems/qdeclarativelayoutitem.cpp b/src/declarative/graphicsitems/qdeclarativelayoutitem.cpp
new file mode 100644
index 0000000000..a23ea659cf
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativelayoutitem.cpp
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativelayoutitem_p.h"
+
+#include <QDebug>
+
+#include <limits.h>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \qmlclass LayoutItem QDeclarativeLayoutItem
+ \since 4.7
+ \brief The LayoutItem element allows you to place your Fluid UI elements inside a classical Qt layout.
+
+ LayoutItem is a variant of Item with a couple of additional properties. These properties provide the size hints
+ needed for items to work in conjunction with Qt Layouts. The Qt Layout will resize the LayoutItem as appropriate,
+ taking its size hints into account, and you can propagate this to the other elements in your UI via anchors and bindings.
+
+ This is a QGraphicsLayoutItem subclass, and the properties merely expose the QGraphicsLayoutItem functionality to QML.
+ See the QGraphicsLayoutItem documentation for further details.
+*/
+
+/*!
+ \internal
+ \class QDeclarativeLayoutItem
+ \brief The QDeclarativeLayoutItem class allows you to place your Fluid UI elements inside a classical Qt layout.
+*/
+
+
+/*!
+ \qmlproperty QSizeF LayoutItem::maximumSize
+
+ The maximumSize property can be set to specify the maximum desired size of this LayoutItem
+*/
+
+/*!
+ \qmlproperty QSizeF LayoutItem::minimumSize
+
+ The minimumSize property can be set to specify the minimum desired size of this LayoutItem
+*/
+
+/*!
+ \qmlproperty QSizeF LayoutItem::preferredSize
+
+ The preferredSize property can be set to specify the preferred size of this LayoutItem
+*/
+
+QDeclarativeLayoutItem::QDeclarativeLayoutItem(QDeclarativeItem* parent)
+ : QDeclarativeItem(parent), m_maximumSize(INT_MAX,INT_MAX), m_minimumSize(0,0), m_preferredSize(0,0)
+{
+ setGraphicsItem(this);
+}
+
+void QDeclarativeLayoutItem::setGeometry(const QRectF & rect)
+{
+ setX(rect.x());
+ setY(rect.y());
+ setWidth(rect.width());
+ setHeight(rect.height());
+}
+
+QSizeF QDeclarativeLayoutItem::sizeHint(Qt::SizeHint w, const QSizeF &constraint) const
+{
+ Q_UNUSED(constraint);
+ if(w == Qt::MinimumSize){
+ return m_minimumSize;
+ }else if(w == Qt::MaximumSize){
+ return m_maximumSize;
+ }else{
+ return m_preferredSize;
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativelayoutitem_p.h b/src/declarative/graphicsitems/qdeclarativelayoutitem_p.h
new file mode 100644
index 0000000000..b35f2f53f0
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativelayoutitem_p.h
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEGRAPHICSLAYOUTITEM_H
+#define QDECLARATIVEGRAPHICSLAYOUTITEM_H
+#include "qdeclarativeitem.h"
+
+#include <QGraphicsLayoutItem>
+#include <QSizeF>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeLayoutItem : public QDeclarativeItem, public QGraphicsLayoutItem
+{
+ Q_OBJECT
+ Q_INTERFACES(QGraphicsLayoutItem)
+ Q_PROPERTY(QSizeF maximumSize READ maximumSize WRITE setMaximumSize NOTIFY maximumSizeChanged)
+ Q_PROPERTY(QSizeF minimumSize READ minimumSize WRITE setMinimumSize NOTIFY minimumSizeChanged)
+ Q_PROPERTY(QSizeF preferredSize READ preferredSize WRITE setPreferredSize NOTIFY preferredSizeChanged)
+public:
+ QDeclarativeLayoutItem(QDeclarativeItem* parent=0);
+
+ QSizeF maximumSize() const { return m_maximumSize; }
+ void setMaximumSize(const QSizeF &s) { if(s==m_maximumSize) return; m_maximumSize = s; emit maximumSizeChanged(); }
+
+ QSizeF minimumSize() const { return m_minimumSize; }
+ void setMinimumSize(const QSizeF &s) { if(s==m_minimumSize) return; m_minimumSize = s; emit minimumSizeChanged(); }
+
+ QSizeF preferredSize() const { return m_preferredSize; }
+ void setPreferredSize(const QSizeF &s) { if(s==m_preferredSize) return; m_preferredSize = s; emit preferredSizeChanged(); }
+
+ virtual void setGeometry(const QRectF & rect);
+protected:
+ virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
+
+Q_SIGNALS:
+ void maximumSizeChanged();
+ void minimumSizeChanged();
+ void preferredSizeChanged();
+
+private:
+ QSizeF m_maximumSize;
+ QSizeF m_minimumSize;
+ QSizeF m_preferredSize;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeLayoutItem)
+
+QT_END_HEADER
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
new file mode 100644
index 0000000000..d54bb70339
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -0,0 +1,2641 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativelistview_p.h"
+
+#include "qdeclarativeflickable_p_p.h"
+#include "qdeclarativevisualitemmodel_p.h"
+
+#include <qdeclarativeeasefollow_p.h>
+#include <qdeclarativeexpression.h>
+#include <qdeclarativeengine.h>
+#include <qdeclarativeguard_p.h>
+
+#include <qlistmodelinterface_p.h>
+#include <QKeyEvent>
+
+QT_BEGIN_NAMESPACE
+
+void QDeclarativeViewSection::setProperty(const QString &property)
+{
+ if (property != m_property) {
+ m_property = property;
+ emit changed();
+ }
+}
+
+void QDeclarativeViewSection::setCriteria(QDeclarativeViewSection::SectionCriteria criteria)
+{
+ if (criteria != m_criteria) {
+ m_criteria = criteria;
+ emit changed();
+ }
+}
+
+void QDeclarativeViewSection::setDelegate(QDeclarativeComponent *delegate)
+{
+ if (delegate != m_delegate) {
+ m_delegate = delegate;
+ emit delegateChanged();
+ }
+}
+
+QString QDeclarativeViewSection::sectionString(const QString &value)
+{
+ if (m_criteria == FirstCharacter)
+ return value.isEmpty() ? QString() : value.at(0);
+ else
+ return value;
+}
+
+//----------------------------------------------------------------------------
+
+class FxListItem
+{
+public:
+ FxListItem(QDeclarativeItem *i, QDeclarativeListView *v) : item(i), section(0), view(v) {
+ attached = static_cast<QDeclarativeListViewAttached*>(qmlAttachedPropertiesObject<QDeclarativeListView>(item));
+ if (attached)
+ attached->m_view = view;
+ }
+ ~FxListItem() {}
+ qreal position() const {
+ if (section)
+ return (view->orientation() == QDeclarativeListView::Vertical ? section->y() : section->x());
+ else
+ return (view->orientation() == QDeclarativeListView::Vertical ? item->y() : item->x());
+ }
+ int size() const {
+ if (section)
+ return (view->orientation() == QDeclarativeListView::Vertical ? item->height()+section->height() : item->width()+section->height());
+ else
+ return (view->orientation() == QDeclarativeListView::Vertical ? item->height() : item->width());
+ }
+ qreal endPosition() const {
+ return (view->orientation() == QDeclarativeListView::Vertical
+ ? item->y() + (item->height() > 0 ? item->height() : 1)
+ : item->x() + (item->width() > 0 ? item->width() : 1)) - 1;
+ }
+ void setPosition(qreal pos) {
+ if (view->orientation() == QDeclarativeListView::Vertical) {
+ if (section) {
+ section->setY(pos);
+ pos += section->height();
+ }
+ item->setY(pos);
+ } else {
+ if (section) {
+ section->setX(pos);
+ pos += section->width();
+ }
+ item->setX(pos);
+ }
+ }
+
+ QDeclarativeItem *item;
+ QDeclarativeItem *section;
+ QDeclarativeListView *view;
+ QDeclarativeListViewAttached *attached;
+ int index;
+};
+
+//----------------------------------------------------------------------------
+
+class QDeclarativeListViewPrivate : public QDeclarativeFlickablePrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeListView)
+
+public:
+ QDeclarativeListViewPrivate()
+ : currentItem(0), orient(QDeclarativeListView::Vertical)
+ , visiblePos(0), visibleIndex(0)
+ , averageSize(100.0), currentIndex(-1), requestedIndex(-1)
+ , highlightRangeStart(0), highlightRangeEnd(0)
+ , highlightComponent(0), highlight(0), trackedItem(0)
+ , moveReason(Other), buffer(0), highlightPosAnimator(0), highlightSizeAnimator(0)
+ , sectionCriteria(0), spacing(0.0)
+ , highlightMoveSpeed(400), highlightResizeSpeed(400), highlightRange(QDeclarativeListView::NoHighlightRange)
+ , snapMode(QDeclarativeListView::NoSnap), overshootDist(0.0)
+ , footerComponent(0), footer(0), headerComponent(0), header(0)
+ , bufferMode(NoBuffer)
+ , ownModel(false), wrap(false), autoHighlight(true), haveHighlightRange(false)
+ , correctFlick(true), inFlickCorrection(false), lazyRelease(false)
+ , deferredRelease(false), minExtentDirty(true), maxExtentDirty(true)
+ {}
+
+ void init();
+ void clear();
+ FxListItem *createItem(int modelIndex);
+ void releaseItem(FxListItem *item);
+
+ FxListItem *visibleItem(int modelIndex) const {
+ if (modelIndex >= visibleIndex && modelIndex < visibleIndex + visibleItems.count()) {
+ for (int i = modelIndex - visibleIndex; i < visibleItems.count(); ++i) {
+ FxListItem *item = visibleItems.at(i);
+ if (item->index == modelIndex)
+ return item;
+ }
+ }
+ return 0;
+ }
+
+ FxListItem *firstVisibleItem() const {
+ const qreal pos = position();
+ for (int i = 0; i < visibleItems.count(); ++i) {
+ FxListItem *item = visibleItems.at(i);
+ if (item->index != -1 && item->endPosition() > pos)
+ return item;
+ }
+ return visibleItems.count() ? visibleItems.first() : 0;
+ }
+
+ FxListItem *nextVisibleItem() const {
+ const qreal pos = position();
+ bool foundFirst = false;
+ for (int i = 0; i < visibleItems.count(); ++i) {
+ FxListItem *item = visibleItems.at(i);
+ if (item->index != -1) {
+ if (foundFirst)
+ return item;
+ else if (item->position() < pos && item->endPosition() > pos)
+ foundFirst = true;
+ }
+ }
+ return 0;
+ }
+
+ qreal position() const {
+ Q_Q(const QDeclarativeListView);
+ return orient == QDeclarativeListView::Vertical ? q->contentY() : q->contentX();
+ }
+ void setPosition(qreal pos) {
+ Q_Q(QDeclarativeListView);
+ if (orient == QDeclarativeListView::Vertical)
+ q->setContentY(pos);
+ else
+ q->setContentX(pos);
+ }
+ qreal size() const {
+ Q_Q(const QDeclarativeListView);
+ return orient == QDeclarativeListView::Vertical ? q->height() : q->width();
+ }
+
+ qreal startPosition() const {
+ qreal pos = 0;
+ if (!visibleItems.isEmpty()) {
+ pos = (*visibleItems.constBegin())->position();
+ if (visibleIndex > 0)
+ pos -= visibleIndex * (averageSize + spacing);
+ }
+ return pos;
+ }
+
+ qreal endPosition() const {
+ qreal pos = 0;
+ if (!visibleItems.isEmpty()) {
+ int invisibleCount = visibleItems.count() - visibleIndex;
+ for (int i = visibleItems.count()-1; i >= 0; --i) {
+ if (visibleItems.at(i)->index != -1) {
+ invisibleCount = model->count() - visibleItems.at(i)->index - 1;
+ break;
+ }
+ }
+ pos = (*(--visibleItems.constEnd()))->endPosition() + invisibleCount * (averageSize + spacing);
+ }
+ return pos;
+ }
+
+ qreal positionAt(int modelIndex) const {
+ if (FxListItem *item = visibleItem(modelIndex))
+ return item->position();
+ if (!visibleItems.isEmpty()) {
+ if (modelIndex < visibleIndex) {
+ int count = visibleIndex - modelIndex;
+ return (*visibleItems.constBegin())->position() - count * (averageSize + spacing);
+ } else {
+ int idx = visibleItems.count() - 1;
+ while (idx >= 0 && visibleItems.at(idx)->index == -1)
+ --idx;
+ if (idx < 0)
+ idx = visibleIndex;
+ else
+ idx = visibleItems.at(idx)->index;
+ int count = modelIndex - idx - 1;
+ return (*(--visibleItems.constEnd()))->endPosition() + spacing + count * (averageSize + spacing) + 1;
+ }
+ }
+ return 0;
+ }
+
+ QString sectionAt(int modelIndex) {
+ if (FxListItem *item = visibleItem(modelIndex))
+ return item->attached->section();
+
+ QString section;
+ if (sectionCriteria) {
+ QString propValue = model->stringValue(modelIndex, sectionCriteria->property());
+ section = sectionCriteria->sectionString(propValue);
+ }
+
+ return section;
+ }
+
+ bool isValid() const {
+ return model && model->count() && model->isValid();
+ }
+
+ int snapIndex() {
+ int index = currentIndex;
+ for (int i = 0; i < visibleItems.count(); ++i) {
+ FxListItem *item = visibleItems[i];
+ if (item->index == -1)
+ continue;
+ qreal itemTop = item->position();
+ if (itemTop >= highlight->position()-item->size()/2 && itemTop < highlight->position()+item->size()/2)
+ return item->index;
+ }
+ return index;
+ }
+
+ qreal snapPosAt(qreal pos) {
+ for (int i = 0; i < visibleItems.count(); ++i) {
+ FxListItem *item = visibleItems[i];
+ if (item->index == -1)
+ continue;
+ qreal itemTop = item->position();
+ if (item->index == model->count()-1 || (itemTop+item->size()/2 >= pos))
+ return item->position();
+ }
+ if (visibleItems.count()) {
+ qreal firstPos = visibleItems.first()->position();
+ qreal endPos = visibleItems.last()->position();
+ if (pos < firstPos) {
+ return firstPos - qRound((firstPos - pos) / averageSize) * averageSize;
+ } else if (pos > endPos)
+ return endPos + qRound((pos - endPos) / averageSize) * averageSize;
+ }
+ return qRound((pos - startPosition()) / averageSize) * averageSize + startPosition();
+ }
+
+ FxListItem *snapItemAt(qreal pos) {
+ for (int i = 0; i < visibleItems.count(); ++i) {
+ FxListItem *item = visibleItems[i];
+ if (item->index == -1)
+ continue;
+ qreal itemTop = item->position();
+ if (item->index == model->count()-1 || (itemTop+item->size()/2 >= pos))
+ return item;
+ }
+ if (visibleItems.count() && visibleItems.first()->position() <= pos)
+ return visibleItems.first();
+ return 0;
+ }
+
+ int lastVisibleIndex() const {
+ int lastIndex = -1;
+ for (int i = visibleItems.count()-1; i >= 0; --i) {
+ FxListItem *listItem = visibleItems.at(i);
+ if (listItem->index != -1) {
+ lastIndex = listItem->index;
+ break;
+ }
+ }
+ return lastIndex;
+ }
+
+ // map a model index to visibleItems index.
+ // These may differ if removed items are still present in the visible list,
+ // e.g. doing a removal animation
+ int mapFromModel(int modelIndex) const {
+ if (modelIndex < visibleIndex || modelIndex >= visibleIndex + visibleItems.count())
+ return -1;
+ for (int i = 0; i < visibleItems.count(); ++i) {
+ FxListItem *listItem = visibleItems.at(i);
+ if (listItem->index == modelIndex)
+ return i + visibleIndex;
+ if (listItem->index > modelIndex)
+ return -1;
+ }
+ return -1; // Not in visibleList
+ }
+
+ bool mapRangeFromModel(int &index, int &count) const {
+ if (index + count < visibleIndex)
+ return false;
+
+ int lastIndex = -1;
+ for (int i = visibleItems.count()-1; i >= 0; --i) {
+ FxListItem *listItem = visibleItems.at(i);
+ if (listItem->index != -1) {
+ lastIndex = listItem->index;
+ break;
+ }
+ }
+
+ if (index > lastIndex)
+ return false;
+
+ int last = qMin(index + count - 1, lastIndex);
+ index = qMax(index, visibleIndex);
+ count = last - index + 1;
+
+ return true;
+ }
+
+ void updateViewport() {
+ Q_Q(QDeclarativeListView);
+ if (orient == QDeclarativeListView::Vertical) {
+ q->setContentHeight(endPosition() - startPosition() + 1);
+ } else {
+ q->setContentWidth(endPosition() - startPosition() + 1);
+ }
+ }
+
+ void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry) {
+ QDeclarativeFlickablePrivate::itemGeometryChanged(item, newGeometry, oldGeometry);
+ if (item != viewport) {
+ if ((orient == QDeclarativeListView::Vertical && newGeometry.height() != oldGeometry.height())
+ || newGeometry.width() != oldGeometry.width()) {
+ layout();
+ fixupPosition();
+ }
+ }
+ }
+
+ // for debugging only
+ void checkVisible() const {
+ int skip = 0;
+ for (int i = 0; i < visibleItems.count(); ++i) {
+ FxListItem *listItem = visibleItems.at(i);
+ if (listItem->index == -1) {
+ ++skip;
+ } else if (listItem->index != visibleIndex + i - skip) {
+ qFatal("index %d %d %d", visibleIndex, i, listItem->index);
+ }
+ }
+ }
+
+ void refill(qreal from, qreal to, bool doBuffer = false);
+ void layout();
+ void updateUnrequestedIndexes();
+ void updateUnrequestedPositions();
+ void updateTrackedItem();
+ void createHighlight();
+ void updateHighlight();
+ void createSection(FxListItem *);
+ void updateSections();
+ void updateCurrentSection();
+ void updateCurrent(int);
+ void updateAverage();
+ void updateHeader();
+ void updateFooter();
+ void fixupPosition();
+ virtual void fixup(AxisData &data, qreal minExtent, qreal maxExtent);
+ virtual void flick(QDeclarativeFlickablePrivate::AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize,
+ QDeclarativeTimeLineCallback::Callback fixupCallback, qreal velocity);
+
+ QDeclarativeGuard<QDeclarativeVisualModel> model;
+ QVariant modelVariant;
+ QList<FxListItem*> visibleItems;
+ QHash<QDeclarativeItem*,int> unrequestedItems;
+ FxListItem *currentItem;
+ QDeclarativeListView::Orientation orient;
+ int visiblePos;
+ int visibleIndex;
+ qreal averageSize;
+ int currentIndex;
+ int requestedIndex;
+ qreal highlightRangeStart;
+ qreal highlightRangeEnd;
+ QDeclarativeComponent *highlightComponent;
+ FxListItem *highlight;
+ FxListItem *trackedItem;
+ enum MovementReason { Other, SetIndex, Mouse };
+ MovementReason moveReason;
+ int buffer;
+ QDeclarativeEaseFollow *highlightPosAnimator;
+ QDeclarativeEaseFollow *highlightSizeAnimator;
+ QDeclarativeViewSection *sectionCriteria;
+ QString currentSection;
+ static const int sectionCacheSize = 3;
+ QDeclarativeItem *sectionCache[sectionCacheSize];
+ qreal spacing;
+ qreal highlightMoveSpeed;
+ qreal highlightResizeSpeed;
+ QDeclarativeListView::HighlightRangeMode highlightRange;
+ QDeclarativeListView::SnapMode snapMode;
+ qreal overshootDist;
+ QDeclarativeComponent *footerComponent;
+ FxListItem *footer;
+ QDeclarativeComponent *headerComponent;
+ FxListItem *header;
+ enum BufferMode { NoBuffer = 0x00, BufferBefore = 0x01, BufferAfter = 0x02 };
+ int bufferMode;
+ mutable qreal minExtent;
+ mutable qreal maxExtent;
+
+ bool ownModel : 1;
+ bool wrap : 1;
+ bool autoHighlight : 1;
+ bool haveHighlightRange : 1;
+ bool correctFlick : 1;
+ bool inFlickCorrection : 1;
+ bool lazyRelease : 1;
+ bool deferredRelease : 1;
+ mutable bool minExtentDirty : 1;
+ mutable bool maxExtentDirty : 1;
+};
+
+void QDeclarativeListViewPrivate::init()
+{
+ Q_Q(QDeclarativeListView);
+ q->setFlag(QGraphicsItem::ItemIsFocusScope);
+ addItemChangeListener(this, Geometry);
+ QObject::connect(q, SIGNAL(movementEnded()), q, SLOT(animStopped()));
+ q->setFlickDirection(QDeclarativeFlickable::VerticalFlick);
+ ::memset(sectionCache, 0, sizeof(QDeclarativeItem*) * sectionCacheSize);
+}
+
+void QDeclarativeListViewPrivate::clear()
+{
+ for (int i = 0; i < visibleItems.count(); ++i)
+ releaseItem(visibleItems.at(i));
+ visibleItems.clear();
+ for (int i = 0; i < sectionCacheSize; ++i) {
+ delete sectionCache[i];
+ sectionCache[i] = 0;
+ }
+ visiblePos = header ? header->size() : 0;
+ visibleIndex = 0;
+ releaseItem(currentItem);
+ currentItem = 0;
+ createHighlight();
+ trackedItem = 0;
+ minExtentDirty = true;
+ maxExtentDirty = true;
+}
+
+FxListItem *QDeclarativeListViewPrivate::createItem(int modelIndex)
+{
+ Q_Q(QDeclarativeListView);
+ // create object
+ requestedIndex = modelIndex;
+ FxListItem *listItem = 0;
+ if (QDeclarativeItem *item = model->item(modelIndex, false)) {
+ listItem = new FxListItem(item, q);
+ listItem->index = modelIndex;
+ // initialise attached properties
+ if (sectionCriteria) {
+ QString propValue = model->stringValue(modelIndex, sectionCriteria->property());
+ listItem->attached->m_section = sectionCriteria->sectionString(propValue);
+ if (modelIndex > 0) {
+ if (FxListItem *item = visibleItem(modelIndex-1))
+ listItem->attached->m_prevSection = item->attached->section();
+ else
+ listItem->attached->m_prevSection = sectionAt(modelIndex-1);
+ }
+ }
+ listItem->item->setZValue(1);
+ // complete
+ model->completeItem();
+ listItem->item->setParent(q->viewport());
+ QDeclarativeItemPrivate *itemPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(item));
+ itemPrivate->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
+ if (sectionCriteria && sectionCriteria->delegate()) {
+ if (listItem->attached->m_prevSection != listItem->attached->m_section)
+ createSection(listItem);
+ }
+ unrequestedItems.remove(listItem->item);
+ }
+ requestedIndex = -1;
+
+ return listItem;
+}
+
+void QDeclarativeListViewPrivate::releaseItem(FxListItem *item)
+{
+ Q_Q(QDeclarativeListView);
+ if (!item || !model)
+ return;
+ if (trackedItem == item) {
+ const char *notifier1 = orient == QDeclarativeListView::Vertical ? SIGNAL(yChanged()) : SIGNAL(xChanged());
+ const char *notifier2 = orient == QDeclarativeListView::Vertical ? SIGNAL(heightChanged()) : SIGNAL(widthChanged());
+ QObject::disconnect(trackedItem->item, notifier1, q, SLOT(trackedPositionChanged()));
+ QObject::disconnect(trackedItem->item, notifier2, q, SLOT(trackedPositionChanged()));
+ trackedItem = 0;
+ }
+ QDeclarativeItemPrivate *itemPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(item->item));
+ itemPrivate->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
+ if (model->release(item->item) == 0) {
+ // item was not destroyed, and we no longer reference it.
+ unrequestedItems.insert(item->item, model->indexOf(item->item, q));
+ }
+ if (item->section) {
+ int i = 0;
+ do {
+ if (!sectionCache[i]) {
+ sectionCache[i] = item->section;
+ sectionCache[i]->setVisible(false);
+ item->section = 0;
+ break;
+ }
+ ++i;
+ } while (i < sectionCacheSize);
+ delete item->section;
+ }
+ delete item;
+}
+
+void QDeclarativeListViewPrivate::refill(qreal from, qreal to, bool doBuffer)
+{
+ Q_Q(QDeclarativeListView);
+ if (!isValid() || !q->isComponentComplete())
+ return;
+ qreal bufferFrom = from - buffer;
+ qreal bufferTo = to + buffer;
+ qreal fillFrom = from;
+ qreal fillTo = to;
+ if (doBuffer && (bufferMode & BufferAfter))
+ fillTo = bufferTo;
+ if (doBuffer && (bufferMode & BufferBefore))
+ fillFrom = bufferFrom;
+
+ int modelIndex = visibleIndex;
+ qreal itemEnd = visiblePos-1;
+ if (!visibleItems.isEmpty()) {
+ visiblePos = (*visibleItems.constBegin())->position();
+ itemEnd = (*(--visibleItems.constEnd()))->endPosition() + spacing;
+ int i = visibleItems.count() - 1;
+ while (i > 0 && visibleItems.at(i)->index == -1)
+ --i;
+ modelIndex = visibleItems.at(i)->index + 1;
+ }
+
+ bool changed = false;
+ FxListItem *item = 0;
+ int pos = itemEnd + 1;
+ while (modelIndex < model->count() && pos <= fillTo) {
+ //qDebug() << "refill: append item" << modelIndex << "pos" << pos;
+ if (!(item = createItem(modelIndex)))
+ break;
+ item->setPosition(pos);
+ pos += item->size() + spacing;
+ visibleItems.append(item);
+ ++modelIndex;
+ changed = true;
+ if (doBuffer) // never buffer more than one item per frame
+ break;
+ }
+ while (visibleIndex > 0 && visibleIndex <= model->count() && visiblePos > fillFrom) {
+ //qDebug() << "refill: prepend item" << visibleIndex-1 << "current top pos" << visiblePos;
+ if (!(item = createItem(visibleIndex-1)))
+ break;
+ --visibleIndex;
+ visiblePos -= item->size() + spacing;
+ item->setPosition(visiblePos);
+ visibleItems.prepend(item);
+ changed = true;
+ if (doBuffer) // never buffer more than one item per frame
+ break;
+ }
+
+ if (!lazyRelease || !changed || deferredRelease) { // avoid destroying items in the same frame that we create
+ while (visibleItems.count() > 1 && (item = visibleItems.first()) && item->endPosition() < bufferFrom) {
+ if (item->attached->delayRemove())
+ break;
+ //qDebug() << "refill: remove first" << visibleIndex << "top end pos" << item->endPosition();
+ if (item->index != -1)
+ visibleIndex++;
+ visibleItems.removeFirst();
+ releaseItem(item);
+ changed = true;
+ }
+ while (visibleItems.count() > 1 && (item = visibleItems.last()) && item->position() > bufferTo) {
+ if (item->attached->delayRemove())
+ break;
+ //qDebug() << "refill: remove last" << visibleIndex+visibleItems.count()-1;
+ visibleItems.removeLast();
+ releaseItem(item);
+ changed = true;
+ }
+ deferredRelease = false;
+ } else {
+ deferredRelease = true;
+ }
+ if (changed) {
+ minExtentDirty = true;
+ maxExtentDirty = true;
+ if (visibleItems.count())
+ visiblePos = (*visibleItems.constBegin())->position();
+ updateAverage();
+ if (sectionCriteria)
+ updateCurrentSection();
+ if (header)
+ updateHeader();
+ if (footer)
+ updateFooter();
+ updateViewport();
+ updateUnrequestedPositions();
+ } else if (!doBuffer && buffer && bufferMode != NoBuffer) {
+ refill(from, to, true);
+ }
+ lazyRelease = false;
+}
+
+void QDeclarativeListViewPrivate::layout()
+{
+ Q_Q(QDeclarativeListView);
+ updateSections();
+ if (!visibleItems.isEmpty()) {
+ int oldEnd = visibleItems.last()->endPosition();
+ int pos = visibleItems.first()->endPosition() + spacing + 1;
+ for (int i=1; i < visibleItems.count(); ++i) {
+ FxListItem *item = visibleItems.at(i);
+ item->setPosition(pos);
+ pos += item->size() + spacing;
+ }
+ // move current item if it is after the visible items.
+ if (currentItem && currentIndex > lastVisibleIndex())
+ currentItem->setPosition(currentItem->position() + (visibleItems.last()->endPosition() - oldEnd));
+ }
+ if (!isValid())
+ return;
+ q->refill();
+ minExtentDirty = true;
+ maxExtentDirty = true;
+ updateHighlight();
+ fixupPosition();
+ q->refill();
+ if (header)
+ updateHeader();
+ if (footer)
+ updateFooter();
+ updateViewport();
+}
+
+void QDeclarativeListViewPrivate::updateUnrequestedIndexes()
+{
+ Q_Q(QDeclarativeListView);
+ QHash<QDeclarativeItem*,int>::iterator it;
+ for (it = unrequestedItems.begin(); it != unrequestedItems.end(); ++it)
+ *it = model->indexOf(it.key(), q);
+}
+
+void QDeclarativeListViewPrivate::updateUnrequestedPositions()
+{
+ Q_Q(QDeclarativeListView);
+ if (unrequestedItems.count()) {
+ qreal pos = position();
+ QHash<QDeclarativeItem*,int>::const_iterator it;
+ for (it = unrequestedItems.begin(); it != unrequestedItems.end(); ++it) {
+ QDeclarativeItem *item = it.key();
+ if (orient == QDeclarativeListView::Vertical) {
+ if (item->y() + item->height() > pos && item->y() < pos + q->height())
+ item->setY(positionAt(*it));
+ } else {
+ if (item->x() + item->width() > pos && item->x() < pos + q->width())
+ item->setX(positionAt(*it));
+ }
+ }
+ }
+}
+
+void QDeclarativeListViewPrivate::updateTrackedItem()
+{
+ Q_Q(QDeclarativeListView);
+ FxListItem *item = currentItem;
+ if (highlight)
+ item = highlight;
+
+ FxListItem *oldTracked = trackedItem;
+
+ const char *notifier1 = orient == QDeclarativeListView::Vertical ? SIGNAL(yChanged()) : SIGNAL(xChanged());
+ const char *notifier2 = orient == QDeclarativeListView::Vertical ? SIGNAL(heightChanged()) : SIGNAL(widthChanged());
+
+ if (trackedItem && item != trackedItem) {
+ QObject::disconnect(trackedItem->item, notifier1, q, SLOT(trackedPositionChanged()));
+ QObject::disconnect(trackedItem->item, notifier2, q, SLOT(trackedPositionChanged()));
+ trackedItem = 0;
+ }
+
+ if (!trackedItem && item) {
+ trackedItem = item;
+ QObject::connect(trackedItem->item, notifier1, q, SLOT(trackedPositionChanged()));
+ QObject::connect(trackedItem->item, notifier2, q, SLOT(trackedPositionChanged()));
+ }
+ if (trackedItem && trackedItem != oldTracked)
+ q->trackedPositionChanged();
+}
+
+void QDeclarativeListViewPrivate::createHighlight()
+{
+ Q_Q(QDeclarativeListView);
+ bool changed = false;
+ if (highlight) {
+ if (trackedItem == highlight)
+ trackedItem = 0;
+ delete highlight->item;
+ delete highlight;
+ highlight = 0;
+ delete highlightPosAnimator;
+ delete highlightSizeAnimator;
+ highlightPosAnimator = 0;
+ highlightSizeAnimator = 0;
+ changed = true;
+ }
+
+ if (currentItem) {
+ QDeclarativeItem *item = 0;
+ if (highlightComponent) {
+ QDeclarativeContext *highlightContext = new QDeclarativeContext(qmlContext(q));
+ QObject *nobj = highlightComponent->create(highlightContext);
+ if (nobj) {
+ highlightContext->setParent(nobj);
+ item = qobject_cast<QDeclarativeItem *>(nobj);
+ if (!item)
+ delete nobj;
+ } else {
+ delete highlightContext;
+ }
+ } else {
+ item = new QDeclarativeItem;
+ }
+ if (item) {
+ item->setParent(q->viewport());
+ highlight = new FxListItem(item, q);
+ if (currentItem && autoHighlight) {
+ if (orient == QDeclarativeListView::Vertical) {
+ highlight->item->setHeight(currentItem->item->height());
+ } else {
+ highlight->item->setWidth(currentItem->item->width());
+ }
+ }
+ const QLatin1String posProp(orient == QDeclarativeListView::Vertical ? "y" : "x");
+ highlightPosAnimator = new QDeclarativeEaseFollow(q);
+ highlightPosAnimator->setTarget(QDeclarativeProperty(highlight->item, posProp));
+ highlightPosAnimator->setVelocity(highlightMoveSpeed);
+ highlightPosAnimator->setEnabled(autoHighlight);
+ const QLatin1String sizeProp(orient == QDeclarativeListView::Vertical ? "height" : "width");
+ highlightSizeAnimator = new QDeclarativeEaseFollow(q);
+ highlightSizeAnimator->setVelocity(highlightResizeSpeed);
+ highlightSizeAnimator->setTarget(QDeclarativeProperty(highlight->item, sizeProp));
+ highlightSizeAnimator->setEnabled(autoHighlight);
+ changed = true;
+ }
+ }
+ if (changed)
+ emit q->highlightItemChanged();
+}
+
+void QDeclarativeListViewPrivate::updateHighlight()
+{
+ if ((!currentItem && highlight) || (currentItem && !highlight))
+ createHighlight();
+ if (currentItem && autoHighlight && highlight && !moving) {
+ // auto-update highlight
+ highlightPosAnimator->setSourceValue(currentItem->position());
+ highlightSizeAnimator->setSourceValue(currentItem->size());
+ if (orient == QDeclarativeListView::Vertical) {
+ if (highlight->item->width() == 0)
+ highlight->item->setWidth(currentItem->item->width());
+ } else {
+ if (highlight->item->height() == 0)
+ highlight->item->setHeight(currentItem->item->height());
+ }
+ }
+ updateTrackedItem();
+}
+
+void QDeclarativeListViewPrivate::createSection(FxListItem *listItem)
+{
+ Q_Q(QDeclarativeListView);
+ if (!sectionCriteria || !sectionCriteria->delegate())
+ return;
+ if (listItem->attached->m_prevSection != listItem->attached->m_section) {
+ if (!listItem->section) {
+ int i = sectionCacheSize-1;
+ while (i >= 0 && !sectionCache[i])
+ --i;
+ if (i >= 0) {
+ listItem->section = sectionCache[i];
+ sectionCache[i] = 0;
+ listItem->section->setVisible(true);
+ QDeclarativeContext *context = QDeclarativeEngine::contextForObject(listItem->section)->parentContext();
+ context->setContextProperty(QLatin1String("section"), listItem->attached->m_section);
+ } else {
+ QDeclarativeContext *context = new QDeclarativeContext(qmlContext(q));
+ context->setContextProperty(QLatin1String("section"), listItem->attached->m_section);
+ QObject *nobj = sectionCriteria->delegate()->create(context);
+ if (nobj) {
+ context->setParent(nobj);
+ listItem->section = qobject_cast<QDeclarativeItem *>(nobj);
+ if (!listItem->section) {
+ delete nobj;
+ } else {
+ listItem->section->setZValue(1);
+ listItem->section->setParent(q->viewport());
+ }
+ } else {
+ delete context;
+ }
+ }
+ }
+ } else if (listItem->section) {
+ int i = 0;
+ do {
+ if (!sectionCache[i]) {
+ sectionCache[i] = listItem->section;
+ sectionCache[i]->setVisible(false);
+ listItem->section = 0;
+ return;
+ }
+ ++i;
+ } while (i < sectionCacheSize);
+ delete listItem->section;
+ listItem->section = 0;
+ }
+}
+
+void QDeclarativeListViewPrivate::updateSections()
+{
+ if (sectionCriteria) {
+ QString prevSection;
+ if (visibleIndex > 0)
+ prevSection = sectionAt(visibleIndex-1);
+ for (int i = 0; i < visibleItems.count(); ++i) {
+ if (visibleItems.at(i)->index != -1) {
+ QDeclarativeListViewAttached *attached = visibleItems.at(i)->attached;
+ attached->setPrevSection(prevSection);
+ createSection(visibleItems.at(i));
+ prevSection = attached->section();
+ }
+ }
+ }
+}
+
+void QDeclarativeListViewPrivate::updateCurrentSection()
+{
+ if (!sectionCriteria || visibleItems.isEmpty()) {
+ currentSection = QString();
+ return;
+ }
+ int index = 0;
+ while (visibleItems.at(index)->endPosition() < position() && index < visibleItems.count())
+ ++index;
+
+ if (index < visibleItems.count())
+ currentSection = visibleItems.at(index)->attached->section();
+ else
+ currentSection = visibleItems.first()->attached->section();
+}
+
+void QDeclarativeListViewPrivate::updateCurrent(int modelIndex)
+{
+ Q_Q(QDeclarativeListView);
+ if (!q->isComponentComplete() || !isValid() || modelIndex < 0 || modelIndex >= model->count()) {
+ if (currentItem) {
+ currentItem->attached->setIsCurrentItem(false);
+ releaseItem(currentItem);
+ currentItem = 0;
+ currentIndex = -1;
+ updateHighlight();
+ emit q->currentIndexChanged();
+ }
+ return;
+ }
+
+ if (currentItem && currentIndex == modelIndex) {
+ updateHighlight();
+ return;
+ }
+ FxListItem *oldCurrentItem = currentItem;
+ currentIndex = modelIndex;
+ currentItem = createItem(modelIndex);
+ if (oldCurrentItem && (!currentItem || oldCurrentItem->item != currentItem->item))
+ oldCurrentItem->attached->setIsCurrentItem(false);
+ if (currentItem) {
+ if (modelIndex == visibleIndex - 1) {
+ // We can calculate exact postion in this case
+ currentItem->setPosition(visibleItems.first()->position() - currentItem->size() - spacing);
+ } else {
+ // Create current item now and position as best we can.
+ // Its position will be corrected when it becomes visible.
+ currentItem->setPosition(positionAt(modelIndex));
+ }
+ currentItem->item->setFocus(true);
+ currentItem->attached->setIsCurrentItem(true);
+ }
+ updateHighlight();
+ emit q->currentIndexChanged();
+ // Release the old current item
+ releaseItem(oldCurrentItem);
+}
+
+void QDeclarativeListViewPrivate::updateAverage()
+{
+ if (!visibleItems.count())
+ return;
+ qreal sum = 0.0;
+ for (int i = 0; i < visibleItems.count(); ++i)
+ sum += visibleItems.at(i)->size();
+ averageSize = sum / visibleItems.count();
+}
+
+void QDeclarativeListViewPrivate::updateFooter()
+{
+ Q_Q(QDeclarativeListView);
+ if (!footer && footerComponent) {
+ QDeclarativeItem *item = 0;
+ QDeclarativeContext *context = new QDeclarativeContext(qmlContext(q));
+ QObject *nobj = footerComponent->create(context);
+ if (nobj) {
+ context->setParent(nobj);
+ item = qobject_cast<QDeclarativeItem *>(nobj);
+ if (!item)
+ delete nobj;
+ } else {
+ delete context;
+ }
+ if (item) {
+ item->setParent(q->viewport());
+ item->setZValue(1);
+ footer = new FxListItem(item, q);
+ }
+ }
+ if (footer) {
+ if (visibleItems.count()) {
+ qreal endPos = endPosition();
+ if (lastVisibleIndex() == model->count()-1) {
+ footer->setPosition(endPos);
+ } else {
+ qreal visiblePos = position() + q->height();
+ if (endPos <= visiblePos || footer->position() < endPos)
+ footer->setPosition(endPos);
+ }
+ } else {
+ footer->setPosition(visiblePos);
+ }
+ }
+}
+
+void QDeclarativeListViewPrivate::updateHeader()
+{
+ Q_Q(QDeclarativeListView);
+ if (!header && headerComponent) {
+ QDeclarativeItem *item = 0;
+ QDeclarativeContext *context = new QDeclarativeContext(qmlContext(q));
+ QObject *nobj = headerComponent->create(context);
+ if (nobj) {
+ context->setParent(nobj);
+ item = qobject_cast<QDeclarativeItem *>(nobj);
+ if (!item)
+ delete nobj;
+ } else {
+ delete context;
+ }
+ if (item) {
+ item->setParent(q->viewport());
+ item->setZValue(1);
+ header = new FxListItem(item, q);
+ if (visibleItems.isEmpty())
+ visiblePos = header->size();
+ }
+ }
+ if (header) {
+ if (visibleItems.count()) {
+ qreal startPos = startPosition();
+ if (visibleIndex == 0) {
+ header->setPosition(startPos - header->size());
+ } else {
+ if (position() <= startPos || header->position() > startPos - header->size())
+ header->setPosition(startPos - header->size());
+ }
+ } else {
+ header->setPosition(0);
+ }
+ }
+}
+
+void QDeclarativeListViewPrivate::fixupPosition()
+{
+ moveReason = Other;
+ if (orient == QDeclarativeListView::Vertical)
+ fixupY();
+ else
+ fixupX();
+}
+
+void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal maxExtent)
+{
+ Q_Q(QDeclarativeListView);
+ if ((orient == QDeclarativeListView::Horizontal && &data == &vData)
+ || (orient == QDeclarativeListView::Vertical && &data == &hData))
+ return;
+
+ if ((&data == &vData && !q->yflick())
+ || (&data == &hData && !q->xflick())
+ || data.move.timeLine())
+ return;
+
+ int oldDuration = fixupDuration;
+ fixupDuration = moveReason == Mouse ? fixupDuration : 0;
+
+ if (haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange) {
+ if (currentItem && currentItem->position() - position() != highlightRangeStart) {
+ qreal pos = currentItem->position() - highlightRangeStart;
+ timeline.reset(data.move);
+ if (fixupDuration)
+ timeline.move(data.move, -pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2);
+ else
+ data.move.setValue(-pos);
+ vTime = timeline.time();
+ }
+ } else if (snapMode != QDeclarativeListView::NoSnap) {
+ if (FxListItem *item = snapItemAt(position())) {
+ qreal pos = qMin(item->position() - highlightRangeStart, -maxExtent);
+ qreal dist = qAbs(data.move + pos);
+ if (dist > 0) {
+ timeline.reset(data.move);
+ if (fixupDuration)
+ timeline.move(data.move, -pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2);
+ else
+ data.move.setValue(-pos);
+ vTime = timeline.time();
+ }
+ }
+ } else {
+ QDeclarativeFlickablePrivate::fixup(data, minExtent, maxExtent);
+ }
+ fixupDuration = oldDuration;
+}
+
+void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize,
+ QDeclarativeTimeLineCallback::Callback fixupCallback, qreal velocity)
+{
+ Q_Q(QDeclarativeListView);
+
+ moveReason = Mouse;
+ if ((!haveHighlightRange || highlightRange != QDeclarativeListView::StrictlyEnforceRange) && snapMode == QDeclarativeListView::NoSnap) {
+ QDeclarativeFlickablePrivate::flick(data, minExtent, maxExtent, vSize, fixupCallback, velocity);
+ return;
+ }
+ qreal maxDistance = -1;
+ // -ve velocity means list is moving up
+ if (velocity > 0) {
+ if (snapMode == QDeclarativeListView::SnapOneItem) {
+ if (FxListItem *item = firstVisibleItem())
+ maxDistance = qAbs(item->position() + data.move.value());
+ } else if (data.move.value() < minExtent) {
+ maxDistance = qAbs(minExtent - data.move.value() + (overShoot?overShootDistance(velocity, vSize):0));
+ }
+ if (snapMode != QDeclarativeListView::SnapToItem && highlightRange != QDeclarativeListView::StrictlyEnforceRange)
+ data.flickTarget = minExtent;
+ } else {
+ if (snapMode == QDeclarativeListView::SnapOneItem) {
+ if (FxListItem *item = nextVisibleItem())
+ maxDistance = qAbs(item->position() + data.move.value());
+ } else if (data.move.value() > maxExtent) {
+ maxDistance = qAbs(maxExtent - data.move.value()) + (overShoot?overShootDistance(velocity, vSize):0);
+ }
+ if (snapMode != QDeclarativeListView::SnapToItem && highlightRange != QDeclarativeListView::StrictlyEnforceRange)
+ data.flickTarget = maxExtent;
+ }
+ if (maxDistance > 0 && (snapMode != QDeclarativeListView::NoSnap || highlightRange == QDeclarativeListView::StrictlyEnforceRange)) {
+ // These modes require the list to stop exactly on an item boundary.
+ // The initial flick will estimate the boundary to stop on.
+ // Since list items can have variable sizes, the boundary will be
+ // reevaluated and adjusted as we approach the boundary.
+ qreal v = velocity;
+ if (maxVelocity != -1 && maxVelocity < qAbs(v)) {
+ if (v < 0)
+ v = -maxVelocity;
+ else
+ v = maxVelocity;
+ }
+ if (!flicked) {
+ // the initial flick - estimate boundary
+ qreal accel = deceleration;
+ qreal v2 = v * v;
+ qreal maxAccel = v2 / (2.0f * maxDistance);
+ if (maxAccel < accel) {
+ qreal dist = v2 / (accel * 2.0);
+ if (v > 0)
+ dist = -dist;
+ data.flickTarget = -snapPosAt(-(data.move.value() - highlightRangeStart) + dist) + highlightRangeStart;
+ dist = -data.flickTarget + data.move.value();
+ accel = v2 / (2.0f * qAbs(dist));
+ overshootDist = 0.0;
+ } else {
+ data.flickTarget = velocity > 0 ? minExtent : maxExtent;
+ overshootDist = overShoot ? overShootDistance(v, vSize) : 0;
+ }
+ timeline.reset(data.move);
+ timeline.accel(data.move, v, accel, maxDistance + overshootDist);
+ timeline.callback(QDeclarativeTimeLineCallback(&data.move, fixupCallback, this));
+ flicked = true;
+ emit q->flickingChanged();
+ emit q->flickStarted();
+ correctFlick = true;
+ } else {
+ // reevaluate the target boundary.
+ qreal newtarget = data.flickTarget;
+ if (snapMode != QDeclarativeListView::NoSnap || highlightRange == QDeclarativeListView::StrictlyEnforceRange)
+ newtarget = -snapPosAt(-(data.flickTarget - highlightRangeStart)) + highlightRangeStart;
+ if (velocity < 0 && newtarget < maxExtent)
+ newtarget = maxExtent;
+ else if (velocity > 0 && newtarget > minExtent)
+ newtarget = minExtent;
+ if (newtarget == data.flickTarget) // boundary unchanged - nothing to do
+ return;
+ data.flickTarget = newtarget;
+ qreal dist = -newtarget + data.move.value();
+ if ((v < 0 && dist < 0) || (v > 0 && dist > 0)) {
+ correctFlick = false;
+ timeline.reset(data.move);
+ fixup(data, minExtent, maxExtent);
+ return;
+ }
+ timeline.reset(data.move);
+ timeline.accelDistance(data.move, v, -dist + (v < 0 ? -overshootDist : overshootDist));
+ timeline.callback(QDeclarativeTimeLineCallback(&data.move, fixupCallback, this));
+ }
+ } else {
+ correctFlick = false;
+ timeline.reset(data.move);
+ fixup(data, minExtent, maxExtent);
+ }
+}
+
+//----------------------------------------------------------------------------
+
+/*!
+ \qmlclass ListView QDeclarativeListView
+ \since 4.7
+ \inherits Flickable
+ \brief The ListView item provides a list view of items provided by a model.
+
+ The model is typically provided by a QAbstractListModel "C++ model object",
+ but can also be created directly in QML. The items are laid out vertically
+ or horizontally and may be flicked to scroll.
+
+ The below example creates a very simple vertical list, using a QML model.
+ \image trivialListView.png
+
+ The user interface defines a delegate to display an item, a highlight,
+ and the ListView which uses the above.
+
+ \snippet doc/src/snippets/declarative/listview/listview.qml 3
+
+ The model is defined as a ListModel using QML:
+ \quotefile doc/src/snippets/declarative/listview/dummydata/ContactModel.qml
+
+ In this case ListModel is a handy way for us to test our UI. In practice
+ the model would be implemented in C++, or perhaps via a SQL data source.
+
+ Note that 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.
+*/
+
+QDeclarativeListView::QDeclarativeListView(QDeclarativeItem *parent)
+ : QDeclarativeFlickable(*(new QDeclarativeListViewPrivate), parent)
+{
+ Q_D(QDeclarativeListView);
+ d->init();
+}
+
+QDeclarativeListView::~QDeclarativeListView()
+{
+ Q_D(QDeclarativeListView);
+ d->clear();
+ if (d->ownModel)
+ delete d->model;
+ delete d->header;
+ delete d->footer;
+}
+
+/*!
+ \qmlattachedproperty bool ListView::isCurrentItem
+ This attached property is true if this delegate is the current item; otherwise false.
+
+ It is attached to each instance of the delegate.
+
+ This property may be used to adjust the appearance of the current item, for example:
+
+ \snippet doc/src/snippets/declarative/listview/highlight.qml 0
+*/
+
+/*!
+ \qmlattachedproperty ListView ListView::view
+ This attached property holds the view that manages this delegate instance.
+
+ It is attached to each instance of the delegate.
+*/
+
+/*!
+ \qmlattachedproperty string ListView::prevSection
+ This attached property holds the section of the previous element.
+
+ It is attached to each instance of the delegate.
+
+ The section is evaluated using the \l {ListView::section.property}{section} properties.
+*/
+
+/*!
+ \qmlattachedproperty string ListView::section
+ This attached property holds the section of this element.
+
+ It is attached to each instance of the delegate.
+
+ The section is evaluated using the \l {ListView::section.property}{section} properties.
+*/
+
+/*!
+ \qmlattachedproperty bool ListView::delayRemove
+ This attached property holds whether the delegate may be destroyed.
+
+ It is attached to each instance of the delegate.
+
+ It is sometimes necessary to delay the destruction of an item
+ until an animation completes.
+
+ The example below ensures that the animation completes before
+ the item is removed from the list.
+
+ \code
+ Component {
+ id: myDelegate
+ Item {
+ id: wrapper
+ SequentialAnimation on ListView.onRemove {
+ PropertyAction { target: wrapper.ListView; property: "delayRemove"; value: true }
+ NumberAnimation { target: wrapper; property: "scale"; to: 0; duration: 250; easing: "easeInOutQuad" }
+ PropertyAction { target: wrapper.ListView; property: "delayRemove"; value: false }
+ }
+ }
+ }
+ \endcode
+*/
+
+/*!
+ \qmlattachedsignal ListView::onAdd()
+ This attached handler is called immediately after an item is added to the view.
+*/
+
+/*!
+ \qmlattachedsignal ListView::onRemove()
+ This attached handler is called immediately before an item is removed from the view.
+*/
+
+/*!
+ \qmlproperty model ListView::model
+ This property holds the model providing data for the list.
+
+ The model provides a set of data that is used to create the items
+ for the view. For large or dynamic datasets the model is usually
+ provided by a C++ model object. The C++ model object must be a \l
+ {QAbstractItemModel} subclass or a simple list.
+
+ Models can also be created directly in QML, using a \l{ListModel},
+ \l{XmlListModel} or \l{VisualItemModel}.
+
+ \sa {qmlmodels}{Data Models}
+*/
+QVariant QDeclarativeListView::model() const
+{
+ Q_D(const QDeclarativeListView);
+ return d->modelVariant;
+}
+
+void QDeclarativeListView::setModel(const QVariant &model)
+{
+ Q_D(QDeclarativeListView);
+ if (d->modelVariant == model)
+ return;
+ if (d->model) {
+ disconnect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
+ disconnect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
+ disconnect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
+ disconnect(d->model, SIGNAL(modelReset()), this, SLOT(modelReset()));
+ disconnect(d->model, SIGNAL(createdItem(int, QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
+ disconnect(d->model, SIGNAL(destroyingItem(QDeclarativeItem*)), this, SLOT(destroyingItem(QDeclarativeItem*)));
+ }
+ d->clear();
+ d->modelVariant = model;
+ QObject *object = qvariant_cast<QObject*>(model);
+ QDeclarativeVisualModel *vim = 0;
+ if (object && (vim = qobject_cast<QDeclarativeVisualModel *>(object))) {
+ if (d->ownModel) {
+ delete d->model;
+ d->ownModel = false;
+ }
+ d->model = vim;
+ } else {
+ if (!d->ownModel) {
+ d->model = new QDeclarativeVisualDataModel(qmlContext(this));
+ d->ownModel = true;
+ }
+ if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model))
+ dataModel->setModel(model);
+ }
+ if (d->model) {
+ if (isComponentComplete()) {
+ refill();
+ if (d->currentIndex >= d->model->count() || d->currentIndex < 0) {
+ setCurrentIndex(0);
+ } else {
+ d->moveReason = QDeclarativeListViewPrivate::SetIndex;
+ d->updateCurrent(d->currentIndex);
+ }
+ }
+ connect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
+ connect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
+ connect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
+ connect(d->model, SIGNAL(modelReset()), this, SLOT(modelReset()));
+ connect(d->model, SIGNAL(createdItem(int, QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
+ connect(d->model, SIGNAL(destroyingItem(QDeclarativeItem*)), this, SLOT(destroyingItem(QDeclarativeItem*)));
+ emit countChanged();
+ }
+ emit modelChanged();
+}
+
+/*!
+ \qmlproperty component ListView::delegate
+
+ The delegate provides a template defining each item instantiated by the view.
+ The index is exposed as an accessible \c index property. Properties of the
+ model are also available depending upon the type of \l {qmlmodels}{Data Model}.
+
+ Note that the ListView will layout the items based on the size of the root item
+ in the delegate.
+
+ Here is an example delegate:
+ \snippet doc/src/snippets/declarative/listview/listview.qml 0
+*/
+QDeclarativeComponent *QDeclarativeListView::delegate() const
+{
+ Q_D(const QDeclarativeListView);
+ if (d->model) {
+ if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model))
+ return dataModel->delegate();
+ }
+
+ return 0;
+}
+
+void QDeclarativeListView::setDelegate(QDeclarativeComponent *delegate)
+{
+ Q_D(QDeclarativeListView);
+ if (delegate == this->delegate())
+ return;
+ if (!d->ownModel) {
+ d->model = new QDeclarativeVisualDataModel(qmlContext(this));
+ d->ownModel = true;
+ }
+ if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model)) {
+ dataModel->setDelegate(delegate);
+ if (isComponentComplete()) {
+ for (int i = 0; i < d->visibleItems.count(); ++i)
+ d->releaseItem(d->visibleItems.at(i));
+ d->visibleItems.clear();
+ refill();
+ d->moveReason = QDeclarativeListViewPrivate::SetIndex;
+ d->updateCurrent(d->currentIndex);
+ }
+ }
+ emit delegateChanged();
+}
+
+/*!
+ \qmlproperty int ListView::currentIndex
+ \qmlproperty Item ListView::currentItem
+
+ \c currentIndex holds the index of the current item.
+ \c currentItem is the current item. Note that the position of the current item
+ may only be approximate until it becomes visible in the view.
+*/
+int QDeclarativeListView::currentIndex() const
+{
+ Q_D(const QDeclarativeListView);
+ return d->currentIndex;
+}
+
+void QDeclarativeListView::setCurrentIndex(int index)
+{
+ Q_D(QDeclarativeListView);
+ if (d->requestedIndex >= 0) // currently creating item
+ return;
+ if (isComponentComplete() && d->isValid() && index != d->currentIndex && index < d->model->count() && index >= 0) {
+ d->moveReason = QDeclarativeListViewPrivate::SetIndex;
+ cancelFlick();
+ d->updateCurrent(index);
+ } else {
+ d->currentIndex = index;
+ }
+}
+
+QDeclarativeItem *QDeclarativeListView::currentItem()
+{
+ Q_D(QDeclarativeListView);
+ if (!d->currentItem)
+ return 0;
+ return d->currentItem->item;
+}
+
+/*!
+ \qmlproperty Item ListView::highlightItem
+
+ \c highlightItem holds the highlight item, which was created
+ from the \l highlight component.
+
+ The highlightItem is managed by the view unless
+ \l highlightFollowsCurrentItem is set to false.
+
+ \sa highlight, highlightFollowsCurrentItem
+*/
+QDeclarativeItem *QDeclarativeListView::highlightItem()
+{
+ Q_D(QDeclarativeListView);
+ if (!d->highlight)
+ return 0;
+ return d->highlight->item;
+}
+
+/*!
+ \qmlproperty int ListView::count
+ This property holds the number of items in the view.
+*/
+int QDeclarativeListView::count() const
+{
+ Q_D(const QDeclarativeListView);
+ if (d->model)
+ return d->model->count();
+ return 0;
+}
+
+/*!
+ \qmlproperty component ListView::highlight
+ This property holds the component to use as the highlight.
+
+ An instance of the highlight component will be created for each list.
+ The geometry of the resultant component instance will be managed by the list
+ so as to stay with the current item, unless the highlightFollowsCurrentItem
+ property is false.
+
+ The below example demonstrates how to make a simple highlight
+ for a vertical list.
+
+ \snippet doc/src/snippets/declarative/listview/listview.qml 1
+ \image trivialListView.png
+
+ \sa highlightItem, highlightFollowsCurrentItem
+*/
+QDeclarativeComponent *QDeclarativeListView::highlight() const
+{
+ Q_D(const QDeclarativeListView);
+ return d->highlightComponent;
+}
+
+void QDeclarativeListView::setHighlight(QDeclarativeComponent *highlight)
+{
+ Q_D(QDeclarativeListView);
+ if (highlight != d->highlightComponent) {
+ d->highlightComponent = highlight;
+ d->createHighlight();
+ if (d->currentItem)
+ d->updateHighlight();
+ emit highlightChanged();
+ }
+}
+
+/*!
+ \qmlproperty bool ListView::highlightFollowsCurrentItem
+ This property holds whether the highlight is managed by the view.
+
+ If highlightFollowsCurrentItem is true, the highlight will be moved smoothly
+ to follow the current item. If highlightFollowsCurrentItem is false, the
+ highlight will not be moved by the view, and must be implemented
+ by the highlight. The following example creates a highlight with
+ its motion defined by the spring \l {SpringFollow}:
+
+ \snippet doc/src/snippets/declarative/listview/highlight.qml 1
+
+ Note that the highlight animation also affects the way that the view
+ is scrolled. This is because the view moves to maintain the
+ highlight within the preferred highlight range (or visible viewport).
+
+ \sa highlight, highlightMoveSpeed
+*/
+bool QDeclarativeListView::highlightFollowsCurrentItem() const
+{
+ Q_D(const QDeclarativeListView);
+ return d->autoHighlight;
+}
+
+void QDeclarativeListView::setHighlightFollowsCurrentItem(bool autoHighlight)
+{
+ Q_D(QDeclarativeListView);
+ if (d->autoHighlight != autoHighlight) {
+ d->autoHighlight = autoHighlight;
+ if (d->highlightPosAnimator) {
+ d->highlightPosAnimator->setEnabled(d->autoHighlight);
+ d->highlightSizeAnimator->setEnabled(d->autoHighlight);
+ }
+ d->updateHighlight();
+ emit highlightFollowsCurrentItemChanged();
+ }
+}
+
+//###Possibly rename these properties, since they are very useful even without a highlight?
+/*!
+ \qmlproperty real ListView::preferredHighlightBegin
+ \qmlproperty real ListView::preferredHighlightEnd
+ \qmlproperty enumeration ListView::highlightRangeMode
+
+ These properties set the preferred range of the highlight (current item)
+ within the view.
+
+ Note that this is the correct way to influence where the
+ current item ends up when the list scrolls. For example, if you want the
+ currently selected item to be in the middle of the list, then set the
+ highlight range to be where the middle item would go. Then, when the list scrolls,
+ the currently selected item will be the item at that spot. This also applies to
+ when the currently selected item changes - it will scroll to within the preferred
+ highlight range. Furthermore, the behaviour of the current item index will occur
+ whether or not a highlight exists.
+
+ If highlightRangeMode is set to \e ApplyRange the view will
+ attempt to maintain the highlight within the range, however
+ the highlight can move outside of the range at the ends of the list
+ or due to a mouse interaction.
+
+ If highlightRangeMode is set to \e StrictlyEnforceRange the highlight will never
+ move outside of the range. This means that the current item will change
+ if a keyboard or mouse action would cause the highlight to move
+ outside of the range.
+
+ The default value is \e NoHighlightRange.
+
+ Note that a valid range requires preferredHighlightEnd to be greater
+ than or equal to preferredHighlightBegin.
+*/
+qreal QDeclarativeListView::preferredHighlightBegin() const
+{
+ Q_D(const QDeclarativeListView);
+ return d->highlightRangeStart;
+}
+
+void QDeclarativeListView::setPreferredHighlightBegin(qreal start)
+{
+ Q_D(QDeclarativeListView);
+ if (d->highlightRangeStart == start)
+ return;
+ d->highlightRangeStart = start;
+ d->haveHighlightRange = d->highlightRange != NoHighlightRange && d->highlightRangeStart <= d->highlightRangeEnd;
+ emit preferredHighlightBeginChanged();
+}
+
+qreal QDeclarativeListView::preferredHighlightEnd() const
+{
+ Q_D(const QDeclarativeListView);
+ return d->highlightRangeEnd;
+}
+
+void QDeclarativeListView::setPreferredHighlightEnd(qreal end)
+{
+ Q_D(QDeclarativeListView);
+ if (d->highlightRangeEnd == end)
+ return;
+ d->highlightRangeEnd = end;
+ d->haveHighlightRange = d->highlightRange != NoHighlightRange && d->highlightRangeStart <= d->highlightRangeEnd;
+ emit preferredHighlightEndChanged();
+}
+
+QDeclarativeListView::HighlightRangeMode QDeclarativeListView::highlightRangeMode() const
+{
+ Q_D(const QDeclarativeListView);
+ return d->highlightRange;
+}
+
+void QDeclarativeListView::setHighlightRangeMode(HighlightRangeMode mode)
+{
+ Q_D(QDeclarativeListView);
+ if (d->highlightRange == mode)
+ return;
+ d->highlightRange = mode;
+ d->haveHighlightRange = d->highlightRange != NoHighlightRange && d->highlightRangeStart <= d->highlightRangeEnd;
+ emit highlightRangeModeChanged();
+}
+
+/*!
+ \qmlproperty real ListView::spacing
+
+ This property holds the spacing to leave between items.
+*/
+qreal QDeclarativeListView::spacing() const
+{
+ Q_D(const QDeclarativeListView);
+ return d->spacing;
+}
+
+void QDeclarativeListView::setSpacing(qreal spacing)
+{
+ Q_D(QDeclarativeListView);
+ if (spacing != d->spacing) {
+ d->spacing = spacing;
+ d->layout();
+ emit spacingChanged();
+ }
+}
+
+/*!
+ \qmlproperty enumeration ListView::orientation
+ This property holds the orientation of the list.
+
+ Possible values are \c Vertical (default) and \c Horizontal.
+
+ Vertical Example:
+ \image trivialListView.png
+ Horizontal Example:
+ \image ListViewHorizontal.png
+*/
+QDeclarativeListView::Orientation QDeclarativeListView::orientation() const
+{
+ Q_D(const QDeclarativeListView);
+ return d->orient;
+}
+
+void QDeclarativeListView::setOrientation(QDeclarativeListView::Orientation orientation)
+{
+ Q_D(QDeclarativeListView);
+ if (d->orient != orientation) {
+ d->orient = orientation;
+ if (d->orient == QDeclarativeListView::Vertical) {
+ setContentWidth(-1);
+ setFlickDirection(VerticalFlick);
+ } else {
+ setContentHeight(-1);
+ setFlickDirection(HorizontalFlick);
+ }
+ d->clear();
+ refill();
+ emit orientationChanged();
+ d->updateCurrent(d->currentIndex);
+ }
+}
+
+/*!
+ \qmlproperty bool ListView::keyNavigationWraps
+ This property holds whether the list wraps key navigation
+
+ If this property is true then key presses to move off of one end of the list will cause the
+ current item to jump to the other end.
+*/
+bool QDeclarativeListView::isWrapEnabled() const
+{
+ Q_D(const QDeclarativeListView);
+ return d->wrap;
+}
+
+void QDeclarativeListView::setWrapEnabled(bool wrap)
+{
+ Q_D(QDeclarativeListView);
+ if (d->wrap == wrap)
+ return;
+ d->wrap = wrap;
+ emit keyNavigationWrapsChanged();
+}
+
+/*!
+ \qmlproperty int ListView::cacheBuffer
+ This property holds the number of off-screen pixels to cache.
+
+ This property determines the number of pixels above the top of the list
+ and below the bottom of the list to cache. Setting this value can make
+ scrolling the list smoother at the expense of additional memory usage.
+*/
+int QDeclarativeListView::cacheBuffer() const
+{
+ Q_D(const QDeclarativeListView);
+ return d->buffer;
+}
+
+void QDeclarativeListView::setCacheBuffer(int b)
+{
+ Q_D(QDeclarativeListView);
+ if (d->buffer != b) {
+ d->buffer = b;
+ if (isComponentComplete()) {
+ d->bufferMode = QDeclarativeListViewPrivate::BufferBefore | QDeclarativeListViewPrivate::BufferAfter;
+ refill();
+ }
+ emit cacheBufferChanged();
+ }
+}
+
+/*!
+ \qmlproperty string ListView::section.property
+ \qmlproperty enumeration ListView::section.criteria
+ These properties hold the expression to be evaluated for the section attached property.
+
+ section.property hold the name of the property to use to determine
+ the section the item is in.
+
+ section.criteria holds the criteria to use to get the section. It
+ can be either:
+ \list
+ \o ViewSection.FullString (default) - section is the value of the property.
+ \o ViewSection.FirstCharacter - section is the first character of the property value.
+ \endlist
+
+ Each item in the list has attached properties named \c ListView.section and
+ \c ListView.prevSection. These may be used to place a section header for
+ related items. The example below assumes that the model is sorted by size of
+ pet. The section expression is the size property. If \c ListView.section and
+ \c ListView.prevSection differ, the item will display a section header.
+
+ \snippet examples/declarative/listview/sections.qml 0
+
+ \image ListViewSections.png
+*/
+QDeclarativeViewSection *QDeclarativeListView::sectionCriteria()
+{
+ Q_D(QDeclarativeListView);
+ if (!d->sectionCriteria)
+ d->sectionCriteria = new QDeclarativeViewSection(this);
+ return d->sectionCriteria;
+}
+
+/*!
+ \qmlproperty string ListView::currentSection
+ This property holds the section that is currently at the beginning of the view.
+*/
+QString QDeclarativeListView::currentSection() const
+{
+ Q_D(const QDeclarativeListView);
+ return d->currentSection;
+}
+
+/*!
+ \qmlproperty real ListView::highlightMoveSpeed
+ \qmlproperty real ListView::highlightResizeSpeed
+ These properties hold the move and resize animation speed of the highlight delegate.
+
+ highlightFollowsCurrentItem must be true for these properties
+ to have effect.
+
+ The default value for these properties is 400 pixels/second.
+
+ \sa highlightFollowsCurrentItem
+*/
+qreal QDeclarativeListView::highlightMoveSpeed() const
+{
+ Q_D(const QDeclarativeListView);\
+ return d->highlightMoveSpeed;
+}
+
+void QDeclarativeListView::setHighlightMoveSpeed(qreal speed)
+{
+ Q_D(QDeclarativeListView);\
+ if (d->highlightMoveSpeed != speed) {
+ d->highlightMoveSpeed = speed;
+ if (d->highlightPosAnimator)
+ d->highlightPosAnimator->setVelocity(d->highlightMoveSpeed);
+ emit highlightMoveSpeedChanged();
+ }
+}
+
+qreal QDeclarativeListView::highlightResizeSpeed() const
+{
+ Q_D(const QDeclarativeListView);\
+ return d->highlightResizeSpeed;
+}
+
+void QDeclarativeListView::setHighlightResizeSpeed(qreal speed)
+{
+ Q_D(QDeclarativeListView);\
+ if (d->highlightResizeSpeed != speed) {
+ d->highlightResizeSpeed = speed;
+ if (d->highlightSizeAnimator)
+ d->highlightSizeAnimator->setVelocity(d->highlightResizeSpeed);
+ emit highlightResizeSpeedChanged();
+ }
+}
+
+/*!
+ \qmlproperty enumeration ListView::snapMode
+
+ This property determines where the view will settle following a drag or flick.
+ The allowed values are:
+
+ \list
+ \o NoSnap (default) - the view will stop anywhere within the visible area.
+ \o SnapToItem - the view will settle with an item aligned with the start of
+ the view.
+ \o SnapOneItem - the view will settle no more than one item away from the first
+ visible item at the time the mouse button is released. This mode is particularly
+ useful for moving one page at a time.
+ \endlist
+
+ snapMode does not affect the currentIndex. To update the
+ currentIndex as the list is moved set \e highlightRangeMode
+ to \e StrictlyEnforceRange.
+
+ \sa highlightRangeMode
+*/
+QDeclarativeListView::SnapMode QDeclarativeListView::snapMode() const
+{
+ Q_D(const QDeclarativeListView);
+ return d->snapMode;
+}
+
+void QDeclarativeListView::setSnapMode(SnapMode mode)
+{
+ Q_D(QDeclarativeListView);
+ if (d->snapMode != mode) {
+ d->snapMode = mode;
+ emit snapModeChanged();
+ }
+}
+
+QDeclarativeComponent *QDeclarativeListView::footer() const
+{
+ Q_D(const QDeclarativeListView);
+ return d->footerComponent;
+}
+
+void QDeclarativeListView::setFooter(QDeclarativeComponent *footer)
+{
+ Q_D(QDeclarativeListView);
+ if (d->footerComponent != footer) {
+ if (d->footer) {
+ delete d->footer;
+ d->footer = 0;
+ }
+ d->footerComponent = footer;
+ d->minExtentDirty = true;
+ d->maxExtentDirty = true;
+ d->updateFooter();
+ d->updateViewport();
+ emit footerChanged();
+ }
+}
+
+QDeclarativeComponent *QDeclarativeListView::header() const
+{
+ Q_D(const QDeclarativeListView);
+ return d->headerComponent;
+}
+
+void QDeclarativeListView::setHeader(QDeclarativeComponent *header)
+{
+ Q_D(QDeclarativeListView);
+ if (d->headerComponent != header) {
+ if (d->header) {
+ delete d->header;
+ d->header = 0;
+ }
+ d->headerComponent = header;
+ d->minExtentDirty = true;
+ d->maxExtentDirty = true;
+ d->updateHeader();
+ d->updateFooter();
+ d->updateViewport();
+ emit headerChanged();
+ }
+}
+
+void QDeclarativeListView::viewportMoved()
+{
+ Q_D(QDeclarativeListView);
+ QDeclarativeFlickable::viewportMoved();
+ d->lazyRelease = true;
+ refill();
+ if (isFlicking() || d->moving)
+ d->moveReason = QDeclarativeListViewPrivate::Mouse;
+ if (d->moveReason != QDeclarativeListViewPrivate::SetIndex) {
+ if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange && d->highlight) {
+ // reposition highlight
+ qreal pos = d->highlight->position();
+ if (pos > d->position() + d->highlightRangeEnd - 1 - d->highlight->size())
+ pos = d->position() + d->highlightRangeEnd - 1 - d->highlight->size();
+ if (pos < d->position() + d->highlightRangeStart)
+ pos = d->position() + d->highlightRangeStart;
+ d->highlight->setPosition(pos);
+
+ // update current index
+ int idx = d->snapIndex();
+ if (idx >= 0 && idx != d->currentIndex)
+ d->updateCurrent(idx);
+ }
+ }
+
+ if (d->flicked && d->correctFlick && !d->inFlickCorrection) {
+ d->inFlickCorrection = true;
+ // Near an end and it seems that the extent has changed?
+ // Recalculate the flick so that we don't end up in an odd position.
+ if (yflick()) {
+ if (d->vData.velocity > 0) {
+ const qreal minY = minYExtent();
+ if ((minY - d->vData.move.value() < height()/2 || d->vData.flickTarget - d->vData.move.value() < height()/2)
+ && minY != d->vData.flickTarget)
+ d->flickY(-d->vData.smoothVelocity.value());
+ d->bufferMode = QDeclarativeListViewPrivate::BufferBefore;
+ } else if (d->vData.velocity < 0) {
+ const qreal maxY = maxYExtent();
+ if ((d->vData.move.value() - maxY < height()/2 || d->vData.move.value() - d->vData.flickTarget < height()/2)
+ && maxY != d->vData.flickTarget)
+ d->flickY(-d->vData.smoothVelocity.value());
+ d->bufferMode = QDeclarativeListViewPrivate::BufferAfter;
+ }
+ }
+
+ if (xflick()) {
+ if (d->hData.velocity > 0) {
+ const qreal minX = minXExtent();
+ if ((minX - d->hData.move.value() < width()/2 || d->hData.flickTarget - d->hData.move.value() < width()/2)
+ && minX != d->hData.flickTarget)
+ d->flickX(-d->hData.smoothVelocity.value());
+ d->bufferMode = QDeclarativeListViewPrivate::BufferBefore;
+ } else if (d->hData.velocity < 0) {
+ const qreal maxX = maxXExtent();
+ if ((d->hData.move.value() - maxX < width()/2 || d->hData.move.value() - d->hData.flickTarget < width()/2)
+ && maxX != d->hData.flickTarget)
+ d->flickX(-d->hData.smoothVelocity.value());
+ d->bufferMode = QDeclarativeListViewPrivate::BufferAfter;
+ }
+ }
+ d->inFlickCorrection = false;
+ }
+}
+
+qreal QDeclarativeListView::minYExtent() const
+{
+ Q_D(const QDeclarativeListView);
+ if (d->orient == QDeclarativeListView::Horizontal)
+ return QDeclarativeFlickable::minYExtent();
+ if (d->minExtentDirty) {
+ d->minExtent = -d->startPosition();
+ if (d->header && d->visibleItems.count())
+ d->minExtent += d->header->size();
+ if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange)
+ d->minExtent += d->highlightRangeStart;
+ d->minExtentDirty = false;
+ }
+
+ return d->minExtent;
+}
+
+qreal QDeclarativeListView::maxYExtent() const
+{
+ Q_D(const QDeclarativeListView);
+ if (d->orient == QDeclarativeListView::Horizontal)
+ return height();
+ if (d->maxExtentDirty) {
+ if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange)
+ d->maxExtent = -(d->positionAt(count()-1) - d->highlightRangeEnd);
+ else
+ d->maxExtent = -(d->endPosition() - height() + 1);
+ if (d->footer)
+ d->maxExtent -= d->footer->size();
+ qreal minY = minYExtent();
+ if (d->maxExtent > minY)
+ d->maxExtent = minY;
+ d->maxExtentDirty = false;
+ }
+ return d->maxExtent;
+}
+
+qreal QDeclarativeListView::minXExtent() const
+{
+ Q_D(const QDeclarativeListView);
+ if (d->orient == QDeclarativeListView::Vertical)
+ return QDeclarativeFlickable::minXExtent();
+ if (d->minExtentDirty) {
+ d->minExtent = -d->startPosition();
+ if (d->header)
+ d->minExtent += d->header->size();
+ if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange)
+ d->minExtent += d->highlightRangeStart;
+ d->minExtentDirty = false;
+ }
+
+ return d->minExtent;
+}
+
+qreal QDeclarativeListView::maxXExtent() const
+{
+ Q_D(const QDeclarativeListView);
+ if (d->orient == QDeclarativeListView::Vertical)
+ return width();
+ if (d->maxExtentDirty) {
+ if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange)
+ d->maxExtent = -(d->positionAt(count()-1) - d->highlightRangeEnd);
+ else
+ d->maxExtent = -(d->endPosition() - width() + 1);
+ if (d->footer)
+ d->maxExtent -= d->footer->size();
+ qreal minX = minXExtent();
+ if (d->maxExtent > minX)
+ d->maxExtent = minX;
+ d->maxExtentDirty = false;
+ }
+
+ return d->maxExtent;
+}
+
+void QDeclarativeListView::keyPressEvent(QKeyEvent *event)
+{
+ Q_D(QDeclarativeListView);
+ QDeclarativeFlickable::keyPressEvent(event);
+ if (event->isAccepted())
+ return;
+
+ if (d->model && d->model->count() && d->interactive) {
+ if ((d->orient == QDeclarativeListView::Horizontal && event->key() == Qt::Key_Left)
+ || (d->orient == QDeclarativeListView::Vertical && event->key() == Qt::Key_Up)) {
+ if (currentIndex() > 0 || (d->wrap && !event->isAutoRepeat())) {
+ decrementCurrentIndex();
+ event->accept();
+ return;
+ } else if (d->wrap) {
+ event->accept();
+ return;
+ }
+ } else if ((d->orient == QDeclarativeListView::Horizontal && event->key() == Qt::Key_Right)
+ || (d->orient == QDeclarativeListView::Vertical && event->key() == Qt::Key_Down)) {
+ if (currentIndex() < d->model->count() - 1 || (d->wrap && !event->isAutoRepeat())) {
+ incrementCurrentIndex();
+ event->accept();
+ return;
+ } else if (d->wrap) {
+ event->accept();
+ return;
+ }
+ }
+ }
+ event->ignore();
+}
+
+/*!
+ \qmlmethod ListView::incrementCurrentIndex()
+
+ Increments the current index. The current index will wrap
+ if keyNavigationWraps is true and it is currently at the end.
+*/
+void QDeclarativeListView::incrementCurrentIndex()
+{
+ Q_D(QDeclarativeListView);
+ if (currentIndex() < d->model->count() - 1 || d->wrap) {
+ d->moveReason = QDeclarativeListViewPrivate::SetIndex;
+ int index = currentIndex()+1;
+ cancelFlick();
+ d->updateCurrent(index < d->model->count() ? index : 0);
+ }
+}
+
+/*!
+ \qmlmethod ListView::decrementCurrentIndex()
+
+ Decrements the current index. The current index will wrap
+ if keyNavigationWraps is true and it is currently at the beginning.
+*/
+void QDeclarativeListView::decrementCurrentIndex()
+{
+ Q_D(QDeclarativeListView);
+ if (currentIndex() > 0 || d->wrap) {
+ d->moveReason = QDeclarativeListViewPrivate::SetIndex;
+ int index = currentIndex()-1;
+ cancelFlick();
+ d->updateCurrent(index >= 0 ? index : d->model->count()-1);
+ }
+}
+
+/*!
+ \qmlmethod ListView::positionViewAtIndex(int index)
+
+ Positions the view such that the \a index is at the top (or left for horizontal orientation) of the view.
+ If positioning the view at the index would cause empty space to be displayed at
+ the end of the view, the view will be positioned at the end.
+
+ It is not recommended to use contentX or contentY to position the view
+ at a particular index. This is unreliable since removing items from the start
+ of the list does not cause all other items to be repositioned, and because
+ the actual start of the view can vary based on the size of the delegates.
+ The correct way to bring an item into view is with positionViewAtIndex.
+*/
+void QDeclarativeListView::positionViewAtIndex(int index)
+{
+ Q_D(QDeclarativeListView);
+ if (!d->isValid() || index < 0 || index >= d->model->count())
+ return;
+
+ qreal maxExtent = d->orient == QDeclarativeListView::Vertical ? -maxYExtent() : -maxXExtent();
+ FxListItem *item = d->visibleItem(index);
+ if (item) {
+ // Already created - just move to top of view
+ int pos = qMin(item->position(), maxExtent);
+ d->setPosition(pos);
+ } else {
+ int pos = d->positionAt(index);
+ // save the currently visible items in case any of them end up visible again
+ QList<FxListItem*> oldVisible = d->visibleItems;
+ d->visibleItems.clear();
+ d->visiblePos = pos;
+ d->visibleIndex = index;
+ d->setPosition(pos);
+ // setPosition() will cause refill. Adjust if we have moved beyond range.
+ if (d->position() > maxExtent)
+ d->setPosition(maxExtent);
+ // now release the reference to all the old visible items.
+ for (int i = 0; i < oldVisible.count(); ++i)
+ d->releaseItem(oldVisible.at(i));
+ }
+ d->fixupPosition();
+}
+
+
+void QDeclarativeListView::componentComplete()
+{
+ Q_D(QDeclarativeListView);
+ QDeclarativeFlickable::componentComplete();
+ refill();
+ d->moveReason = QDeclarativeListViewPrivate::SetIndex;
+ if (d->currentIndex < 0)
+ d->updateCurrent(0);
+ else
+ d->updateCurrent(d->currentIndex);
+ d->fixupPosition();
+}
+
+void QDeclarativeListView::refill()
+{
+ Q_D(QDeclarativeListView);
+ d->refill(d->position(), d->position()+d->size()-1);
+}
+
+void QDeclarativeListView::trackedPositionChanged()
+{
+ Q_D(QDeclarativeListView);
+ if (!d->trackedItem || !d->currentItem)
+ return;
+ if (!isFlicking() && !d->moving && d->moveReason == QDeclarativeListViewPrivate::SetIndex) {
+ const qreal trackedPos = d->trackedItem->position();
+ const qreal viewPos = d->position();
+ if (d->haveHighlightRange) {
+ if (d->highlightRange == StrictlyEnforceRange) {
+ qreal pos = viewPos;
+ if (trackedPos > pos + d->highlightRangeEnd - d->trackedItem->size())
+ pos = trackedPos - d->highlightRangeEnd + d->trackedItem->size();
+ if (trackedPos < pos + d->highlightRangeStart)
+ pos = trackedPos - d->highlightRangeStart;
+ d->setPosition(pos);
+ } else {
+ qreal pos = viewPos;
+ if (trackedPos < d->startPosition() + d->highlightRangeStart) {
+ pos = d->startPosition();
+ } else if (d->trackedItem->endPosition() > d->endPosition() - d->size() + d->highlightRangeEnd) {
+ pos = d->endPosition() - d->size();
+ if (pos < d->startPosition())
+ pos = d->startPosition();
+ } else {
+ if (trackedPos < viewPos + d->highlightRangeStart) {
+ pos = trackedPos - d->highlightRangeStart;
+ } else if (trackedPos > viewPos + d->highlightRangeEnd - d->trackedItem->size()) {
+ pos = trackedPos - d->highlightRangeEnd + d->trackedItem->size();
+ }
+ }
+ d->setPosition(pos);
+ }
+ } else {
+ if (trackedPos < viewPos && d->currentItem->position() < viewPos) {
+ d->setPosition(d->currentItem->position() < trackedPos ? trackedPos : d->currentItem->position());
+ } else if (d->trackedItem->endPosition() > viewPos + d->size()
+ && d->currentItem->endPosition() > viewPos + d->size()) {
+ qreal pos;
+ if (d->trackedItem->endPosition() < d->currentItem->endPosition()) {
+ pos = d->trackedItem->endPosition() - d->size();
+ if (d->trackedItem->size() > d->size())
+ pos = trackedPos;
+ } else {
+ pos = d->currentItem->endPosition() - d->size();
+ if (d->currentItem->size() > d->size())
+ pos = d->currentItem->position();
+ }
+ d->setPosition(pos);
+ }
+ }
+ }
+}
+
+void QDeclarativeListView::itemsInserted(int modelIndex, int count)
+{
+ Q_D(QDeclarativeListView);
+ d->updateUnrequestedIndexes();
+ d->moveReason = QDeclarativeListViewPrivate::Other;
+ if (!d->visibleItems.count() || d->model->count() <= 1) {
+ d->layout();
+ d->updateCurrent(qMax(0, qMin(d->currentIndex, d->model->count()-1)));
+ emit countChanged();
+ return;
+ }
+
+ int overlapCount = count;
+ if (!d->mapRangeFromModel(modelIndex, overlapCount)) {
+ int i = d->visibleItems.count() - 1;
+ while (i > 0 && d->visibleItems.at(i)->index == -1)
+ --i;
+ if (d->visibleItems.at(i)->index + 1 == modelIndex
+ && d->visibleItems.at(i)->endPosition() < d->buffer+d->position()+d->size()-1) {
+ // Special case of appending an item to the model.
+ modelIndex = d->visibleIndex + d->visibleItems.count();
+ } else {
+ if (modelIndex < d->visibleIndex) {
+ // Insert before visible items
+ d->visibleIndex += count;
+ for (int i = 0; i < d->visibleItems.count(); ++i) {
+ FxListItem *listItem = d->visibleItems.at(i);
+ if (listItem->index != -1 && listItem->index >= modelIndex)
+ listItem->index += count;
+ }
+ }
+ if (d->currentIndex >= modelIndex) {
+ // adjust current item index
+ d->currentIndex += count;
+ if (d->currentItem)
+ d->currentItem->index = d->currentIndex;
+ }
+ d->layout();
+ emit countChanged();
+ return;
+ }
+ }
+
+ // At least some of the added items will be visible
+
+ int index = modelIndex - d->visibleIndex;
+ // index can be the next item past the end of the visible items list (i.e. appended)
+ int pos = index < d->visibleItems.count() ? d->visibleItems.at(index)->position()
+ : d->visibleItems.at(index-1)->endPosition()+d->spacing+1;
+ int initialPos = pos;
+ int diff = 0;
+ QList<FxListItem*> added;
+ bool addedVisible = false;
+ FxListItem *firstVisible = d->firstVisibleItem();
+ if (firstVisible && pos < firstVisible->position()) {
+ // Insert items before the visible item.
+ int insertionIdx = index;
+ int i = 0;
+ int from = d->position() - d->buffer;
+ for (i = count-1; i >= 0 && pos > from; --i) {
+ addedVisible = true;
+ FxListItem *item = d->createItem(modelIndex + i);
+ d->visibleItems.insert(insertionIdx, item);
+ pos -= item->size() + d->spacing;
+ item->setPosition(pos);
+ index++;
+ }
+ if (i >= 0) {
+ // If we didn't insert all our new items - anything
+ // before the current index is not visible - remove it.
+ while (insertionIdx--) {
+ FxListItem *item = d->visibleItems.takeFirst();
+ if (item->index != -1)
+ d->visibleIndex++;
+ d->releaseItem(item);
+ }
+ } else {
+ // adjust pos of items before inserted items.
+ for (int i = insertionIdx-1; i >= 0; i--) {
+ FxListItem *listItem = d->visibleItems.at(i);
+ listItem->setPosition(listItem->position() - (initialPos - pos));
+ }
+ }
+ } else {
+ int i = 0;
+ int to = d->buffer+d->position()+d->size()-1;
+ for (i = 0; i < count && pos <= to; ++i) {
+ addedVisible = true;
+ FxListItem *item = d->createItem(modelIndex + i);
+ d->visibleItems.insert(index, item);
+ item->setPosition(pos);
+ added.append(item);
+ pos += item->size() + d->spacing;
+ ++index;
+ }
+ if (i != count) {
+ // We didn't insert all our new items, which means anything
+ // beyond the current index is not visible - remove it.
+ while (d->visibleItems.count() > index)
+ d->releaseItem(d->visibleItems.takeLast());
+ }
+ diff = pos - initialPos;
+ }
+ if (d->currentIndex >= modelIndex) {
+ // adjust current item index
+ d->currentIndex += count;
+ if (d->currentItem) {
+ d->currentItem->index = d->currentIndex;
+ d->currentItem->setPosition(d->currentItem->position() + diff);
+ }
+ }
+ // Update the indexes of the following visible items.
+ for (; index < d->visibleItems.count(); ++index) {
+ FxListItem *listItem = d->visibleItems.at(index);
+ if (d->currentItem && listItem->item != d->currentItem->item)
+ listItem->setPosition(listItem->position() + diff);
+ if (listItem->index != -1)
+ listItem->index += count;
+ }
+ // everything is in order now - emit add() signal
+ for (int j = 0; j < added.count(); ++j)
+ added.at(j)->attached->emitAdd();
+
+ if (addedVisible)
+ d->layout();
+ emit countChanged();
+}
+
+void QDeclarativeListView::itemsRemoved(int modelIndex, int count)
+{
+ Q_D(QDeclarativeListView);
+ d->moveReason = QDeclarativeListViewPrivate::Other;
+ d->updateUnrequestedIndexes();
+
+ FxListItem *firstVisible = d->firstVisibleItem();
+ int preRemovedSize = 0;
+ bool removedVisible = false;
+ // Remove the items from the visible list, skipping anything already marked for removal
+ QList<FxListItem*>::Iterator it = d->visibleItems.begin();
+ while (it != d->visibleItems.end()) {
+ FxListItem *item = *it;
+ if (item->index == -1 || item->index < modelIndex) {
+ // already removed, or before removed items
+ ++it;
+ } else if (item->index >= modelIndex + count) {
+ // after removed items
+ item->index -= count;
+ ++it;
+ } else {
+ // removed item
+ removedVisible = true;
+ item->attached->emitRemove();
+ if (item->attached->delayRemove()) {
+ item->index = -1;
+ connect(item->attached, SIGNAL(delayRemoveChanged()), this, SLOT(destroyRemoved()), Qt::QueuedConnection);
+ ++it;
+ } else {
+ if (item == firstVisible)
+ firstVisible = 0;
+ if (firstVisible && item->position() < firstVisible->position())
+ preRemovedSize += item->size();
+ it = d->visibleItems.erase(it);
+ d->releaseItem(item);
+ }
+ }
+ }
+
+ if (firstVisible && d->visibleItems.first() != firstVisible)
+ d->visibleItems.first()->setPosition(d->visibleItems.first()->position() + preRemovedSize);
+
+ // fix current
+ if (d->currentIndex >= modelIndex + count) {
+ d->currentIndex -= count;
+ if (d->currentItem)
+ d->currentItem->index -= count;
+ } else if (d->currentIndex >= modelIndex && d->currentIndex < modelIndex + count) {
+ // current item has been removed.
+ d->currentItem->attached->setIsCurrentItem(false);
+ d->releaseItem(d->currentItem);
+ d->currentItem = 0;
+ d->currentIndex = -1;
+ d->updateCurrent(qMin(modelIndex, d->model->count()-1));
+ }
+
+ // update visibleIndex
+ for (it = d->visibleItems.begin(); it != d->visibleItems.end(); ++it) {
+ if ((*it)->index != -1) {
+ d->visibleIndex = (*it)->index;
+ break;
+ }
+ }
+
+ if (removedVisible) {
+ if (d->visibleItems.isEmpty()) {
+ d->visibleIndex = 0;
+ d->visiblePos = d->header ? d->header->size() : 0;
+ d->timeline.clear();
+ d->setPosition(0);
+ if (d->model->count() == 0)
+ update();
+ else
+ refill();
+ } else {
+ // Correct the positioning of the items
+ d->layout();
+ }
+ }
+
+ emit countChanged();
+}
+
+void QDeclarativeListView::destroyRemoved()
+{
+ Q_D(QDeclarativeListView);
+ for (QList<FxListItem*>::Iterator it = d->visibleItems.begin();
+ it != d->visibleItems.end();) {
+ FxListItem *listItem = *it;
+ if (listItem->index == -1 && listItem->attached->delayRemove() == false) {
+ d->releaseItem(listItem);
+ it = d->visibleItems.erase(it);
+ } else {
+ ++it;
+ }
+ }
+
+ // Correct the positioning of the items
+ d->layout();
+}
+
+void QDeclarativeListView::itemsMoved(int from, int to, int count)
+{
+ Q_D(QDeclarativeListView);
+ d->updateUnrequestedIndexes();
+
+ if (d->visibleItems.isEmpty()) {
+ refill();
+ return;
+ }
+
+ d->moveReason = QDeclarativeListViewPrivate::Other;
+ FxListItem *firstVisible = d->firstVisibleItem();
+ qreal firstItemPos = firstVisible->position();
+ QHash<int,FxListItem*> moved;
+ int moveBy = 0;
+
+ QList<FxListItem*>::Iterator it = d->visibleItems.begin();
+ while (it != d->visibleItems.end()) {
+ FxListItem *item = *it;
+ if (item->index >= from && item->index < from + count) {
+ // take the items that are moving
+ item->index += (to-from);
+ moved.insert(item->index, item);
+ if (item->position() < firstItemPos)
+ moveBy += item->size();
+ it = d->visibleItems.erase(it);
+ } else {
+ // move everything after the moved items.
+ if (item->index > from && item->index != -1)
+ item->index -= count;
+ ++it;
+ }
+ }
+
+ int remaining = count;
+ int endIndex = d->visibleIndex;
+ it = d->visibleItems.begin();
+ while (it != d->visibleItems.end()) {
+ FxListItem *item = *it;
+ if (remaining && item->index >= to && item->index < to + count) {
+ // place items in the target position, reusing any existing items
+ FxListItem *movedItem = moved.take(item->index);
+ if (!movedItem)
+ movedItem = d->createItem(item->index);
+ if (item->index <= firstVisible->index)
+ moveBy -= movedItem->size();
+ it = d->visibleItems.insert(it, movedItem);
+ ++it;
+ --remaining;
+ } else {
+ if (item->index != -1) {
+ if (item->index >= to) {
+ // update everything after the moved items.
+ item->index += count;
+ }
+ endIndex = item->index;
+ }
+ ++it;
+ }
+ }
+
+ // If we have moved items to the end of the visible items
+ // then add any existing moved items that we have
+ while (FxListItem *item = moved.take(endIndex+1)) {
+ d->visibleItems.append(item);
+ ++endIndex;
+ }
+
+ // update visibleIndex
+ for (it = d->visibleItems.begin(); it != d->visibleItems.end(); ++it) {
+ if ((*it)->index != -1) {
+ d->visibleIndex = (*it)->index;
+ break;
+ }
+ }
+
+ // Fix current index
+ if (d->currentIndex >= 0 && d->currentItem) {
+ int oldCurrent = d->currentIndex;
+ d->currentIndex = d->model->indexOf(d->currentItem->item, this);
+ if (oldCurrent != d->currentIndex) {
+ d->currentItem->index = d->currentIndex;
+ emit currentIndexChanged();
+ }
+ }
+
+ // Whatever moved items remain are no longer visible items.
+ while (moved.count()) {
+ int idx = moved.begin().key();
+ FxListItem *item = moved.take(idx);
+ if (item->item == d->currentItem->item)
+ item->setPosition(d->positionAt(idx));
+ d->releaseItem(item);
+ }
+
+ // Ensure we don't cause an ugly list scroll.
+ d->visibleItems.first()->setPosition(d->visibleItems.first()->position() + moveBy);
+
+ d->layout();
+}
+
+void QDeclarativeListView::modelReset()
+{
+ Q_D(QDeclarativeListView);
+ d->clear();
+ refill();
+ d->moveReason = QDeclarativeListViewPrivate::SetIndex;
+ d->updateCurrent(d->currentIndex);
+ emit countChanged();
+}
+
+void QDeclarativeListView::createdItem(int index, QDeclarativeItem *item)
+{
+ Q_D(QDeclarativeListView);
+ if (d->requestedIndex != index) {
+ item->setParentItem(viewport());
+ d->unrequestedItems.insert(item, index);
+ if (d->orient == QDeclarativeListView::Vertical)
+ item->setY(d->positionAt(index));
+ else
+ item->setX(d->positionAt(index));
+ }
+}
+
+void QDeclarativeListView::destroyingItem(QDeclarativeItem *item)
+{
+ Q_D(QDeclarativeListView);
+ d->unrequestedItems.remove(item);
+}
+
+void QDeclarativeListView::animStopped()
+{
+ Q_D(QDeclarativeListView);
+ d->moveReason = QDeclarativeListViewPrivate::Other;
+ d->bufferMode = QDeclarativeListViewPrivate::NoBuffer;
+}
+
+QDeclarativeListViewAttached *QDeclarativeListView::qmlAttachedProperties(QObject *obj)
+{
+ return new QDeclarativeListViewAttached(obj);
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativelistview_p.h b/src/declarative/graphicsitems/qdeclarativelistview_p.h
new file mode 100644
index 0000000000..d66ac2b6c1
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativelistview_p.h
@@ -0,0 +1,318 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVELISTVIEW_H
+#define QDECLARATIVELISTVIEW_H
+
+#include "qdeclarativeflickable_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class Q_DECLARATIVE_EXPORT QDeclarativeViewSection : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY changed)
+ Q_PROPERTY(SectionCriteria criteria READ criteria WRITE setCriteria NOTIFY changed)
+ Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
+ Q_ENUMS(SectionCriteria)
+public:
+ QDeclarativeViewSection(QObject *parent=0) : QObject(parent), m_criteria(FullString), m_delegate(0) {}
+
+ QString property() const { return m_property; }
+ void setProperty(const QString &);
+
+ enum SectionCriteria { FullString, FirstCharacter };
+ SectionCriteria criteria() const { return m_criteria; }
+ void setCriteria(SectionCriteria);
+
+ QDeclarativeComponent *delegate() const { return m_delegate; }
+ void setDelegate(QDeclarativeComponent *delegate);
+
+ QString sectionString(const QString &value);
+
+Q_SIGNALS:
+ void changed();
+ void delegateChanged();
+
+private:
+ QString m_property;
+ SectionCriteria m_criteria;
+ QDeclarativeComponent *m_delegate;
+};
+
+
+class QDeclarativeVisualModel;
+class QDeclarativeListViewAttached;
+class QDeclarativeListViewPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeListView : public QDeclarativeFlickable
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeListView)
+
+ Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged)
+ Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
+ Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged)
+ Q_PROPERTY(QDeclarativeItem *currentItem READ currentItem NOTIFY currentIndexChanged)
+ Q_PROPERTY(int count READ count NOTIFY countChanged)
+
+ Q_PROPERTY(QDeclarativeComponent *highlight READ highlight WRITE setHighlight NOTIFY highlightChanged)
+ Q_PROPERTY(QDeclarativeItem *highlightItem READ highlightItem NOTIFY highlightItemChanged)
+ Q_PROPERTY(bool highlightFollowsCurrentItem READ highlightFollowsCurrentItem WRITE setHighlightFollowsCurrentItem NOTIFY highlightFollowsCurrentItemChanged)
+ Q_PROPERTY(qreal highlightMoveSpeed READ highlightMoveSpeed WRITE setHighlightMoveSpeed NOTIFY highlightMoveSpeedChanged)
+ Q_PROPERTY(qreal highlightResizeSpeed READ highlightResizeSpeed WRITE setHighlightResizeSpeed NOTIFY highlightResizeSpeedChanged)
+
+ Q_PROPERTY(qreal preferredHighlightBegin READ preferredHighlightBegin WRITE setPreferredHighlightBegin NOTIFY preferredHighlightBeginChanged)
+ Q_PROPERTY(qreal preferredHighlightEnd READ preferredHighlightEnd WRITE setPreferredHighlightEnd NOTIFY preferredHighlightEndChanged)
+ Q_PROPERTY(HighlightRangeMode highlightRangeMode READ highlightRangeMode WRITE setHighlightRangeMode NOTIFY highlightRangeModeChanged)
+
+ Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing NOTIFY spacingChanged)
+ Q_PROPERTY(Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged)
+ Q_PROPERTY(bool keyNavigationWraps READ isWrapEnabled WRITE setWrapEnabled NOTIFY keyNavigationWrapsChanged)
+ Q_PROPERTY(int cacheBuffer READ cacheBuffer WRITE setCacheBuffer NOTIFY cacheBufferChanged)
+ Q_PROPERTY(QDeclarativeViewSection *section READ sectionCriteria CONSTANT)
+ Q_PROPERTY(QString currentSection READ currentSection NOTIFY currentSectionChanged)
+
+ Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged)
+
+ Q_PROPERTY(QDeclarativeComponent *header READ header WRITE setHeader NOTIFY headerChanged)
+ Q_PROPERTY(QDeclarativeComponent *footer READ footer WRITE setFooter NOTIFY footerChanged)
+
+ Q_ENUMS(HighlightRangeMode)
+ Q_ENUMS(Orientation)
+ Q_ENUMS(SnapMode)
+ Q_CLASSINFO("DefaultProperty", "data")
+
+public:
+ QDeclarativeListView(QDeclarativeItem *parent=0);
+ ~QDeclarativeListView();
+
+ QVariant model() const;
+ void setModel(const QVariant &);
+
+ QDeclarativeComponent *delegate() const;
+ void setDelegate(QDeclarativeComponent *);
+
+ int currentIndex() const;
+ void setCurrentIndex(int idx);
+
+ QDeclarativeItem *currentItem();
+ QDeclarativeItem *highlightItem();
+ int count() const;
+
+ QDeclarativeComponent *highlight() const;
+ void setHighlight(QDeclarativeComponent *highlight);
+
+ bool highlightFollowsCurrentItem() const;
+ void setHighlightFollowsCurrentItem(bool);
+
+ enum HighlightRangeMode { NoHighlightRange, ApplyRange, StrictlyEnforceRange };
+ HighlightRangeMode highlightRangeMode() const;
+ void setHighlightRangeMode(HighlightRangeMode mode);
+
+ qreal preferredHighlightBegin() const;
+ void setPreferredHighlightBegin(qreal);
+
+ qreal preferredHighlightEnd() const;
+ void setPreferredHighlightEnd(qreal);
+
+ qreal spacing() const;
+ void setSpacing(qreal spacing);
+
+ enum Orientation { Horizontal = Qt::Horizontal, Vertical = Qt::Vertical };
+ Orientation orientation() const;
+ void setOrientation(Orientation);
+
+ bool isWrapEnabled() const;
+ void setWrapEnabled(bool);
+
+ int cacheBuffer() const;
+ void setCacheBuffer(int);
+
+ QDeclarativeViewSection *sectionCriteria();
+ QString currentSection() const;
+
+ qreal highlightMoveSpeed() const;
+ void setHighlightMoveSpeed(qreal);
+
+ qreal highlightResizeSpeed() const;
+ void setHighlightResizeSpeed(qreal);
+
+ enum SnapMode { NoSnap, SnapToItem, SnapOneItem };
+ SnapMode snapMode() const;
+ void setSnapMode(SnapMode mode);
+
+ QDeclarativeComponent *footer() const;
+ void setFooter(QDeclarativeComponent *);
+
+ QDeclarativeComponent *header() const;
+ void setHeader(QDeclarativeComponent *);
+
+ static QDeclarativeListViewAttached *qmlAttachedProperties(QObject *);
+
+public Q_SLOTS:
+ void incrementCurrentIndex();
+ void decrementCurrentIndex();
+ void positionViewAtIndex(int index);
+
+Q_SIGNALS:
+ void countChanged();
+ void spacingChanged();
+ void orientationChanged();
+ void currentIndexChanged();
+ void currentSectionChanged();
+ void highlightMoveSpeedChanged();
+ void highlightResizeSpeedChanged();
+ void highlightChanged();
+ void highlightItemChanged();
+ void modelChanged();
+ void delegateChanged();
+ void highlightFollowsCurrentItemChanged();
+ void preferredHighlightBeginChanged();
+ void preferredHighlightEndChanged();
+ void highlightRangeModeChanged();
+ void keyNavigationWrapsChanged();
+ void cacheBufferChanged();
+ void snapModeChanged();
+ void headerChanged();
+ void footerChanged();
+
+protected:
+ virtual void viewportMoved();
+ virtual qreal minYExtent() const;
+ virtual qreal maxYExtent() const;
+ virtual qreal minXExtent() const;
+ virtual qreal maxXExtent() const;
+ virtual void keyPressEvent(QKeyEvent *);
+ virtual void componentComplete();
+
+private Q_SLOTS:
+ void refill();
+ void trackedPositionChanged();
+ void itemsInserted(int index, int count);
+ void itemsRemoved(int index, int count);
+ void itemsMoved(int from, int to, int count);
+ void modelReset();
+ void destroyRemoved();
+ void createdItem(int index, QDeclarativeItem *item);
+ void destroyingItem(QDeclarativeItem *item);
+ void animStopped();
+};
+
+class QDeclarativeListViewAttached : public QObject
+{
+ Q_OBJECT
+public:
+ QDeclarativeListViewAttached(QObject *parent)
+ : QObject(parent), m_view(0), m_isCurrent(false), m_delayRemove(false) {}
+ ~QDeclarativeListViewAttached() {}
+
+ Q_PROPERTY(QDeclarativeListView *view READ view CONSTANT)
+ QDeclarativeListView *view() { return m_view; }
+
+ Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged)
+ bool isCurrentItem() const { return m_isCurrent; }
+ void setIsCurrentItem(bool c) {
+ if (m_isCurrent != c) {
+ m_isCurrent = c;
+ emit currentItemChanged();
+ }
+ }
+
+ Q_PROPERTY(QString prevSection READ prevSection NOTIFY prevSectionChanged)
+ QString prevSection() const { return m_prevSection; }
+ void setPrevSection(const QString &sect) {
+ if (m_prevSection != sect) {
+ m_prevSection = sect;
+ emit prevSectionChanged();
+ }
+ }
+
+ Q_PROPERTY(QString section READ section NOTIFY sectionChanged)
+ QString section() const { return m_section; }
+ void setSection(const QString &sect) {
+ if (m_section != sect) {
+ m_section = sect;
+ emit sectionChanged();
+ }
+ }
+
+ Q_PROPERTY(bool delayRemove READ delayRemove WRITE setDelayRemove NOTIFY delayRemoveChanged)
+ bool delayRemove() const { return m_delayRemove; }
+ void setDelayRemove(bool delay) {
+ if (m_delayRemove != delay) {
+ m_delayRemove = delay;
+ emit delayRemoveChanged();
+ }
+ }
+
+ void emitAdd() { emit add(); }
+ void emitRemove() { emit remove(); }
+
+Q_SIGNALS:
+ void currentItemChanged();
+ void sectionChanged();
+ void prevSectionChanged();
+ void delayRemoveChanged();
+ void add();
+ void remove();
+
+public:
+ QDeclarativeListView *m_view;
+ mutable QString m_section;
+ QString m_prevSection;
+ bool m_isCurrent : 1;
+ bool m_delayRemove : 1;
+};
+
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPEINFO(QDeclarativeListView, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(QDeclarativeListView)
+QML_DECLARE_TYPE(QDeclarativeViewSection)
+
+QT_END_HEADER
+
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp
new file mode 100644
index 0000000000..b0499d73ce
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp
@@ -0,0 +1,497 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeloader_p_p.h"
+
+#include <qdeclarativeengine_p.h>
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeLoaderPrivate::QDeclarativeLoaderPrivate()
+ : item(0), component(0), ownComponent(false)
+ , resizeMode(QDeclarativeLoader::SizeLoaderToItem)
+{
+}
+
+QDeclarativeLoaderPrivate::~QDeclarativeLoaderPrivate()
+{
+}
+
+void QDeclarativeLoaderPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem, const QRectF &newGeometry, const QRectF &oldGeometry)
+{
+ if (resizeItem == item && resizeMode == QDeclarativeLoader::SizeLoaderToItem) {
+ _q_updateSize();
+ }
+ QDeclarativeItemChangeListener::itemGeometryChanged(resizeItem, newGeometry, oldGeometry);
+}
+
+void QDeclarativeLoaderPrivate::clear()
+{
+ if (ownComponent) {
+ delete component;
+ component = 0;
+ ownComponent = false;
+ }
+ source = QUrl();
+
+ if (item) {
+ if (QDeclarativeItem *qmlItem = qobject_cast<QDeclarativeItem*>(item)) {
+ if (resizeMode == QDeclarativeLoader::SizeLoaderToItem) {
+ QDeclarativeItemPrivate *p =
+ static_cast<QDeclarativeItemPrivate *>(QGraphicsItemPrivate::get(qmlItem));
+ p->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
+ }
+ }
+
+ // We can't delete immediately because our item may have triggered
+ // the Loader to load a different item.
+ item->setVisible(false);
+ item->setParentItem(0);
+ item->deleteLater();
+ item = 0;
+ }
+}
+
+void QDeclarativeLoaderPrivate::initResize()
+{
+ Q_Q(QDeclarativeLoader);
+ if (QDeclarativeItem *qmlItem = qobject_cast<QDeclarativeItem*>(item)) {
+ if (resizeMode == QDeclarativeLoader::SizeLoaderToItem) {
+ QDeclarativeItemPrivate *p =
+ static_cast<QDeclarativeItemPrivate *>(QGraphicsItemPrivate::get(qmlItem));
+ p->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
+ }
+ } else if (item && item->isWidget()) {
+ QGraphicsWidget *widget = static_cast<QGraphicsWidget*>(item);
+ if (resizeMode == QDeclarativeLoader::SizeLoaderToItem) {
+ widget->installEventFilter(q);
+ }
+ }
+ _q_updateSize();
+}
+
+/*!
+ \qmlclass Loader QDeclarativeLoader
+ \since 4.7
+ \inherits Item
+
+ \brief The Loader item allows dynamically loading an Item-based
+ subtree from a QML URL or Component.
+
+ Loader instantiates an item from a component. The component to
+ instantiate may be specified directly by the \c sourceComponent
+ property, or loaded from a URL via the \c source property.
+
+ It is also an effective means of delaying the creation of a component
+ until it is required:
+ \code
+ Loader { id: pageLoader }
+ Rectangle {
+ MouseArea { anchors.fill: parent; onClicked: pageLoader.source = "Page1.qml" }
+ }
+ \endcode
+
+ If the Loader source is changed, any previous items instantiated
+ will be destroyed. Setting \c source to an empty string
+ will destroy the currently instantiated items, freeing resources
+ and leaving the Loader empty. For example:
+
+ \code
+ pageLoader.source = ""
+ \endcode
+
+ unloads "Page1.qml" and frees resources consumed by it.
+
+ \sa {dynamic-object-creation}{Dynamic Object Creation}
+*/
+
+/*!
+ \internal
+ \class QDeclarativeLoader
+ \qmlclass Loader
+ */
+
+/*!
+ Create a new QDeclarativeLoader instance.
+ */
+QDeclarativeLoader::QDeclarativeLoader(QDeclarativeItem *parent)
+ : QDeclarativeItem(*(new QDeclarativeLoaderPrivate), parent)
+{
+}
+
+/*!
+ Destroy the loader instance.
+ */
+QDeclarativeLoader::~QDeclarativeLoader()
+{
+}
+
+/*!
+ \qmlproperty url Loader::source
+ This property holds the URL of the QML component to
+ instantiate.
+
+ \sa sourceComponent, status, progress
+*/
+QUrl QDeclarativeLoader::source() const
+{
+ Q_D(const QDeclarativeLoader);
+ return d->source;
+}
+
+void QDeclarativeLoader::setSource(const QUrl &url)
+{
+ Q_D(QDeclarativeLoader);
+ if (d->source == url)
+ return;
+
+ d->clear();
+
+ d->source = url;
+ if (d->source.isEmpty()) {
+ emit sourceChanged();
+ emit statusChanged();
+ emit progressChanged();
+ emit itemChanged();
+ return;
+ }
+
+ d->component = new QDeclarativeComponent(qmlEngine(this), d->source, this);
+ d->ownComponent = true;
+ if (!d->component->isLoading()) {
+ d->_q_sourceLoaded();
+ } else {
+ connect(d->component, SIGNAL(statusChanged(QDeclarativeComponent::Status)),
+ this, SLOT(_q_sourceLoaded()));
+ connect(d->component, SIGNAL(progressChanged(qreal)),
+ this, SIGNAL(progressChanged()));
+ emit statusChanged();
+ emit progressChanged();
+ emit sourceChanged();
+ emit itemChanged();
+ }
+}
+
+/*!
+ \qmlproperty Component Loader::sourceComponent
+ The sourceComponent property holds the \l{Component} to instantiate.
+
+ \qml
+ Item {
+ Component {
+ id: redSquare
+ Rectangle { color: "red"; width: 10; height: 10 }
+ }
+
+ Loader { sourceComponent: redSquare }
+ Loader { sourceComponent: redSquare; x: 10 }
+ }
+ \endqml
+
+ \sa source, progress
+*/
+
+QDeclarativeComponent *QDeclarativeLoader::sourceComponent() const
+{
+ Q_D(const QDeclarativeLoader);
+ return d->component;
+}
+
+void QDeclarativeLoader::setSourceComponent(QDeclarativeComponent *comp)
+{
+ Q_D(QDeclarativeLoader);
+ if (comp == d->component)
+ return;
+
+ d->clear();
+
+ d->component = comp;
+ d->ownComponent = false;
+ if (!d->component) {
+ emit sourceChanged();
+ emit statusChanged();
+ emit progressChanged();
+ emit itemChanged();
+ return;
+ }
+
+ if (!d->component->isLoading()) {
+ d->_q_sourceLoaded();
+ } else {
+ connect(d->component, SIGNAL(statusChanged(QDeclarativeComponent::Status)),
+ this, SLOT(_q_sourceLoaded()));
+ connect(d->component, SIGNAL(progressChanged(qreal)),
+ this, SIGNAL(progressChanged()));
+ emit progressChanged();
+ emit sourceChanged();
+ emit statusChanged();
+ emit itemChanged();
+ }
+}
+
+void QDeclarativeLoaderPrivate::_q_sourceLoaded()
+{
+ Q_Q(QDeclarativeLoader);
+
+ if (component) {
+ QDeclarativeContext *ctxt = new QDeclarativeContext(qmlContext(q));
+ ctxt->addDefaultObject(q);
+
+ if (!component->errors().isEmpty()) {
+ qWarning() << component->errors();
+ emit q->sourceChanged();
+ emit q->statusChanged();
+ emit q->progressChanged();
+ return;
+ }
+
+ QObject *obj = component->create(ctxt);
+ if (obj) {
+ ctxt->setParent(obj);
+ item = qobject_cast<QGraphicsObject *>(obj);
+ if (item) {
+ if (QDeclarativeItem* qmlItem = qobject_cast<QDeclarativeItem *>(item)) {
+ qmlItem->setParentItem(q);
+ } else {
+ item->setParentItem(q);
+ item->setParent(q);
+ }
+// item->setFocus(true);
+ initResize();
+ }
+ } else {
+ delete obj;
+ delete ctxt;
+ source = QUrl();
+ }
+ emit q->sourceChanged();
+ emit q->statusChanged();
+ emit q->progressChanged();
+ emit q->itemChanged();
+ }
+}
+
+/*!
+ \qmlproperty enum Loader::status
+
+ This property holds the status of QML loading. It can be one of:
+ \list
+ \o Null - no QML source has been set
+ \o Ready - the QML source has been loaded
+ \o Loading - the QML source is currently being loaded
+ \o Error - an error occurred while loading the QML source
+ \endlist
+
+ Note that a change in the status property does not cause anything to happen
+ (although it reflects what has happened to the loader internally). If you wish
+ to react to the change in status you need to do it yourself, for example in one
+ of the following ways:
+ \list
+ \o Create a state, so that a state change occurs, e.g. State{name: 'loaded'; when: loader.status = Loader.Ready;}
+ \o Do something inside the onStatusChanged signal handler, e.g. Loader{id: loader; onStatusChanged: if(loader.status == Loader.Ready) console.log('Loaded');}
+ \o Bind to the status variable somewhere, e.g. Text{text: if(loader.status!=Loader.Ready){'Not Loaded';}else{'Loaded';}}
+ \endlist
+ \sa progress
+*/
+
+QDeclarativeLoader::Status QDeclarativeLoader::status() const
+{
+ Q_D(const QDeclarativeLoader);
+
+ if (d->component)
+ return static_cast<QDeclarativeLoader::Status>(d->component->status());
+
+ if (d->item)
+ return Ready;
+
+ return d->source.isEmpty() ? Null : Error;
+}
+
+/*!
+ \qmlproperty real Loader::progress
+
+ This property holds the progress of QML data loading, from 0.0 (nothing loaded)
+ to 1.0 (finished).
+
+ \sa status
+*/
+qreal QDeclarativeLoader::progress() const
+{
+ Q_D(const QDeclarativeLoader);
+
+ if (d->item)
+ return 1.0;
+
+ if (d->component)
+ return d->component->progress();
+
+ return 0.0;
+}
+
+/*!
+ \qmlproperty enum Loader::resizeMode
+
+ This property determines how the Loader or item are resized:
+ \list
+ \o NoResize - no item will be resized
+ \o SizeLoaderToItem - the Loader will be sized to the size of the item, unless the size of the Loader has been otherwise specified.
+ \o SizeItemToLoader - the item will be sized to the size of the Loader.
+ \endlist
+
+ Note that changing from SizeItemToLoader to SizeLoaderToItem
+ after the component is loaded will not return the item or Loader
+ to it's original size. This is due to the item size being adjusted
+ to the Loader size, thereby losing the original size of the item.
+ Future changes to the item's size will affect the loader, however.
+
+ The default resizeMode is SizeLoaderToItem.
+*/
+QDeclarativeLoader::ResizeMode QDeclarativeLoader::resizeMode() const
+{
+ Q_D(const QDeclarativeLoader);
+ return d->resizeMode;
+}
+
+void QDeclarativeLoader::setResizeMode(ResizeMode mode)
+{
+ Q_D(QDeclarativeLoader);
+ if (mode == d->resizeMode)
+ return;
+
+ if (QDeclarativeItem *qmlItem = qobject_cast<QDeclarativeItem*>(d->item)) {
+ if (d->resizeMode == SizeLoaderToItem) {
+ QDeclarativeItemPrivate *p =
+ static_cast<QDeclarativeItemPrivate *>(QGraphicsItemPrivate::get(qmlItem));
+ p->removeItemChangeListener(d, QDeclarativeItemPrivate::Geometry);
+ }
+ } else if (d->item && d->item->isWidget()) {
+ if (d->resizeMode == SizeLoaderToItem)
+ d->item->removeEventFilter(this);
+ }
+
+ d->resizeMode = mode;
+ emit resizeModeChanged();
+ d->initResize();
+}
+
+void QDeclarativeLoaderPrivate::_q_updateSize()
+{
+ Q_Q(QDeclarativeLoader);
+ if (!item)
+ return;
+ if (QDeclarativeItem *qmlItem = qobject_cast<QDeclarativeItem*>(item)) {
+ if (resizeMode == QDeclarativeLoader::SizeLoaderToItem) {
+ q->setWidth(qmlItem->width());
+ q->setHeight(qmlItem->height());
+ } else if (resizeMode == QDeclarativeLoader::SizeItemToLoader) {
+ qmlItem->setWidth(q->width());
+ qmlItem->setHeight(q->height());
+ }
+ } else if (item && item->isWidget()) {
+ QGraphicsWidget *widget = static_cast<QGraphicsWidget*>(item);
+ if (resizeMode == QDeclarativeLoader::SizeLoaderToItem) {
+ QSizeF newSize = widget->size();
+ if (newSize.isValid()) {
+ q->setWidth(newSize.width());
+ q->setHeight(newSize.height());
+ }
+ } else if (resizeMode == QDeclarativeLoader::SizeItemToLoader) {
+ QSizeF oldSize = widget->size();
+ QSizeF newSize = oldSize;
+ if (q->heightValid())
+ newSize.setHeight(q->height());
+ if (q->widthValid())
+ newSize.setWidth(q->width());
+ if (oldSize != newSize)
+ widget->resize(newSize);
+ }
+ }
+}
+
+/*!
+ \qmlproperty Item Loader::item
+ This property holds the top-level item created from source.
+*/
+QGraphicsObject *QDeclarativeLoader::item() const
+{
+ Q_D(const QDeclarativeLoader);
+ return d->item;
+}
+
+void QDeclarativeLoader::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
+{
+ Q_D(QDeclarativeLoader);
+ if (newGeometry != oldGeometry) {
+ if (d->resizeMode == SizeItemToLoader) {
+ d->_q_updateSize();
+ }
+ }
+ QDeclarativeItem::geometryChanged(newGeometry, oldGeometry);
+}
+
+QVariant QDeclarativeLoader::itemChange(GraphicsItemChange change, const QVariant &value)
+{
+ Q_D(QDeclarativeLoader);
+ if (change == ItemSceneHasChanged) {
+ if (d->item && d->item->isWidget()) {
+ if (d->resizeMode == SizeLoaderToItem) {
+ d->item->removeEventFilter(this);
+ d->item->installEventFilter(this);
+ }
+ }
+ }
+ return QDeclarativeItem::itemChange(change, value);
+}
+
+bool QDeclarativeLoader::eventFilter(QObject *watched, QEvent *e)
+{
+ Q_D(QDeclarativeLoader);
+ if (watched == d->item && e->type() == QEvent::GraphicsSceneResize) {
+ if (d->item && d->item->isWidget() && d->resizeMode == SizeLoaderToItem) {
+ d->_q_updateSize();
+ }
+ }
+ return QDeclarativeItem::eventFilter(watched, e);
+}
+
+#include <moc_qdeclarativeloader_p.cpp>
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativeloader_p.h b/src/declarative/graphicsitems/qdeclarativeloader_p.h
new file mode 100644
index 0000000000..65538a8d8b
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeloader_p.h
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVELOADER_H
+#define QDECLARATIVELOADER_H
+
+#include "qdeclarativeitem.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeLoaderPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeLoader : public QDeclarativeItem
+{
+ Q_OBJECT
+ Q_ENUMS(Status)
+ Q_ENUMS(ResizeMode)
+
+ Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
+ Q_PROPERTY(QDeclarativeComponent *sourceComponent READ sourceComponent WRITE setSourceComponent NOTIFY sourceChanged)
+ Q_PROPERTY(ResizeMode resizeMode READ resizeMode WRITE setResizeMode NOTIFY resizeModeChanged)
+ Q_PROPERTY(QGraphicsObject *item READ item NOTIFY itemChanged)
+ Q_PROPERTY(Status status READ status NOTIFY statusChanged)
+ Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged)
+
+public:
+ QDeclarativeLoader(QDeclarativeItem *parent=0);
+ virtual ~QDeclarativeLoader();
+
+ QUrl source() const;
+ void setSource(const QUrl &);
+
+ QDeclarativeComponent *sourceComponent() const;
+ void setSourceComponent(QDeclarativeComponent *);
+
+ enum Status { Null, Ready, Loading, Error };
+ Status status() const;
+ qreal progress() const;
+
+ enum ResizeMode { NoResize, SizeLoaderToItem, SizeItemToLoader };
+ ResizeMode resizeMode() const;
+ void setResizeMode(ResizeMode mode);
+
+ QGraphicsObject *item() const;
+
+Q_SIGNALS:
+ void itemChanged();
+ void sourceChanged();
+ void statusChanged();
+ void progressChanged();
+ void resizeModeChanged();
+
+protected:
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry);
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value);
+ bool eventFilter(QObject *watched, QEvent *e);
+private:
+ Q_DISABLE_COPY(QDeclarativeLoader)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeLoader)
+ Q_PRIVATE_SLOT(d_func(), void _q_sourceLoaded())
+ Q_PRIVATE_SLOT(d_func(), void _q_updateSize())
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeLoader)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVELOADER_H
diff --git a/src/declarative/graphicsitems/qdeclarativeloader_p_p.h b/src/declarative/graphicsitems/qdeclarativeloader_p_p.h
new file mode 100644
index 0000000000..fc5e66532d
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeloader_p_p.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVELOADER_P_H
+#define QDECLARATIVELOADER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeloader_p.h"
+
+#include "qdeclarativeitem_p.h"
+#include "qdeclarativeitemchangelistener_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeContext;
+class QDeclarativeLoaderPrivate : public QDeclarativeItemPrivate, public QDeclarativeItemChangeListener
+{
+ Q_DECLARE_PUBLIC(QDeclarativeLoader)
+
+public:
+ QDeclarativeLoaderPrivate();
+ ~QDeclarativeLoaderPrivate();
+
+ void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry);
+ void clear();
+ void initResize();
+
+ QUrl source;
+ QGraphicsObject *item;
+ QDeclarativeComponent *component;
+ bool ownComponent : 1;
+ QDeclarativeLoader::ResizeMode resizeMode;
+
+ void _q_sourceLoaded();
+ void _q_updateSize();
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVELOADER_P_H
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
new file mode 100644
index 0000000000..ec7aa62e64
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -0,0 +1,685 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativemousearea_p.h"
+#include "qdeclarativemousearea_p_p.h"
+
+#include "qdeclarativeevents_p_p.h"
+
+#include <QGraphicsSceneMouseEvent>
+
+QT_BEGIN_NAMESPACE
+static const int PressAndHoldDelay = 800;
+
+QDeclarativeDrag::QDeclarativeDrag(QObject *parent)
+: QObject(parent), _target(0), _axis(XandYAxis), _xmin(0), _xmax(0), _ymin(0), _ymax(0)
+{
+}
+
+QDeclarativeDrag::~QDeclarativeDrag()
+{
+}
+
+QDeclarativeItem *QDeclarativeDrag::target() const
+{
+ return _target;
+}
+
+void QDeclarativeDrag::setTarget(QDeclarativeItem *t)
+{
+ if (_target == t)
+ return;
+ _target = t;
+ emit targetChanged();
+}
+
+QDeclarativeDrag::Axis QDeclarativeDrag::axis() const
+{
+ return _axis;
+}
+
+void QDeclarativeDrag::setAxis(QDeclarativeDrag::Axis a)
+{
+ if (_axis == a)
+ return;
+ _axis = a;
+ emit axisChanged();
+}
+
+qreal QDeclarativeDrag::xmin() const
+{
+ return _xmin;
+}
+
+void QDeclarativeDrag::setXmin(qreal m)
+{
+ if (_xmin == m)
+ return;
+ _xmin = m;
+ emit minimumXChanged();
+}
+
+qreal QDeclarativeDrag::xmax() const
+{
+ return _xmax;
+}
+
+void QDeclarativeDrag::setXmax(qreal m)
+{
+ if (_xmax == m)
+ return;
+ _xmax = m;
+ emit maximumXChanged();
+}
+
+qreal QDeclarativeDrag::ymin() const
+{
+ return _ymin;
+}
+
+void QDeclarativeDrag::setYmin(qreal m)
+{
+ if (_ymin == m)
+ return;
+ _ymin = m;
+ emit minimumYChanged();
+}
+
+qreal QDeclarativeDrag::ymax() const
+{
+ return _ymax;
+}
+
+void QDeclarativeDrag::setYmax(qreal m)
+{
+ if (_ymax == m)
+ return;
+ _ymax = m;
+ emit maximumYChanged();
+}
+
+QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
+{
+ delete drag;
+}
+
+
+/*!
+ \qmlclass MouseArea QDeclarativeMouseArea
+ \since 4.7
+ \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 Rectangle that changes
+ the Rectangle color to red when clicked:
+ \snippet doc/src/snippets/declarative/mouseregion.qml 0
+
+ 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.
+
+ Below we have the previous
+ example extended so as to give a different color when you right click.
+ \snippet doc/src/snippets/declarative/mouseregion.qml 1
+
+ For basic key handling, see the \l {Keys}{Keys attached property}.
+
+ MouseArea is an invisible item: it is never painted.
+
+ \sa MouseEvent
+*/
+
+/*!
+ \qmlsignal MouseArea::onEntered()
+
+ This handler is called when the mouse enters the mouse area.
+
+ By default the onEntered handler is only called while a button is
+ pressed. Setting hoverEnabled to true enables handling of
+ onExited when no mouse button is pressed.
+
+ \sa hoverEnabled
+*/
+
+/*!
+ \qmlsignal MouseArea::onExited()
+
+ This handler is called when the mouse exists the mouse area.
+
+ By default the onExited handler is only called while a button is
+ pressed. Setting hoverEnabled to true enables handling of
+ onExited when no mouse button is pressed.
+
+ \sa hoverEnabled
+*/
+
+/*!
+ \qmlsignal MouseArea::onPositionChanged(MouseEvent mouse)
+
+ This handler is called when the mouse position changes.
+
+ The \l {MouseEvent}{mouse} parameter provides information about the mouse, including the x and y
+ position, and any buttons currently pressed.
+
+ The \e accepted property of the MouseEvent parameter is ignored in this handler.
+
+ By default the onPositionChanged handler is only called while a button is
+ pressed. Setting hoverEnabled to true enables handling of
+ onPositionChanged when no mouse button is pressed.
+*/
+
+/*!
+ \qmlsignal MouseArea::onClicked(mouse)
+
+ This handler is called when there is a click. A click is defined as a press followed by a release,
+ both inside the MouseArea (pressing, moving outside the MouseArea, and then moving back inside and
+ releasing is also considered a click).
+
+ The \l {MouseEvent}{mouse} parameter provides information about the click, including the x and y
+ position of the release of the click, and whether the click wasHeld.
+
+ The \e accepted property of the MouseEvent parameter is ignored in this handler.
+*/
+
+/*!
+ \qmlsignal MouseArea::onPressed(mouse)
+
+ This handler is called when there is a press.
+ The \l {MouseEvent}{mouse} parameter provides information about the press, including the x and y
+ position and which button was pressed.
+
+ The \e accepted property of the MouseEvent parameter determines whether this MouseArea
+ will handle the press and all future mouse events until release. The default is to accept
+ the event and not allow other MouseArea beneath this one to handle the event. If \e accepted
+ is set to false, no further events will be sent to this MouseArea until the button is next
+ pressed.
+*/
+
+/*!
+ \qmlsignal MouseArea::onReleased(mouse)
+
+ This handler is called when there is a release.
+ The \l {MouseEvent}{mouse} parameter provides information about the click, including the x and y
+ position of the release of the click, and whether the click wasHeld.
+
+ The \e accepted property of the MouseEvent parameter is ignored in this handler.
+*/
+
+/*!
+ \qmlsignal MouseArea::onPressAndHold(mouse)
+
+ This handler is called when there is a long press (currently 800ms).
+ The \l {MouseEvent}{mouse} parameter provides information about the press, including the x and y
+ position of the press, and which button is pressed.
+
+ The \e accepted property of the MouseEvent parameter is ignored in this handler.
+*/
+
+/*!
+ \qmlsignal MouseArea::onDoubleClicked(mouse)
+
+ This handler is called when there is a double-click (a press followed by a release followed by a press).
+ The \l {MouseEvent}{mouse} parameter provides information about the click, including the x and y
+ position of the release of the click, and whether the click wasHeld.
+
+ The \e accepted property of the MouseEvent parameter is ignored in this handler.
+*/
+
+/*!
+ \internal
+ \class QDeclarativeMouseArea
+ \brief The QDeclarativeMouseArea class provides a simple mouse handling abstraction for use within Qml.
+
+ \ingroup group_coreitems
+
+ All QDeclarativeItem derived classes can do mouse handling but the QDeclarativeMouseArea class exposes mouse
+ handling data as properties and tracks flicking and dragging of the mouse.
+
+ A QDeclarativeMouseArea object can be instantiated in Qml using the tag \l MouseArea.
+ */
+QDeclarativeMouseArea::QDeclarativeMouseArea(QDeclarativeItem *parent)
+ : QDeclarativeItem(*(new QDeclarativeMouseAreaPrivate), parent)
+{
+ Q_D(QDeclarativeMouseArea);
+ d->init();
+}
+
+QDeclarativeMouseArea::~QDeclarativeMouseArea()
+{
+}
+
+/*!
+ \qmlproperty real MouseArea::mouseX
+ \qmlproperty real MouseArea::mouseY
+ These properties hold the coordinates of the mouse.
+
+ 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.
+
+ If hoverEnabled is true then these properties will be valid:
+ \list
+ \i when no button is pressed, but the mouse is within the MouseArea (containsMouse is true).
+ \i if a button is pressed and held, even if it has since moved out of the area.
+ \endlist
+
+ The coordinates are relative to the MouseArea.
+*/
+qreal QDeclarativeMouseArea::mouseX() const
+{
+ Q_D(const QDeclarativeMouseArea);
+ return d->lastPos.x();
+}
+
+qreal QDeclarativeMouseArea::mouseY() const
+{
+ Q_D(const QDeclarativeMouseArea);
+ return d->lastPos.y();
+}
+
+/*!
+ \qmlproperty bool MouseArea::enabled
+ This property holds whether the item accepts mouse events.
+*/
+bool QDeclarativeMouseArea::isEnabled() const
+{
+ Q_D(const QDeclarativeMouseArea);
+ return d->absorb;
+}
+
+void QDeclarativeMouseArea::setEnabled(bool a)
+{
+ Q_D(QDeclarativeMouseArea);
+ if (a != d->absorb) {
+ d->absorb = a;
+ emit enabledChanged();
+ }
+}
+/*!
+ \qmlproperty MouseButtons MouseArea::pressedButtons
+ This property holds the mouse buttons currently pressed.
+
+ It contains a bitwise combination of:
+ \list
+ \o Qt.LeftButton
+ \o Qt.RightButton
+ \o Qt.MidButton
+ \endlist
+
+ The code below displays "right" when the right mouse buttons is pressed:
+ \code
+ Text {
+ text: mr.pressedButtons & Qt.RightButton ? "right" : ""
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ MouseArea {
+ id: mr
+ acceptedButtons: Qt.LeftButton | Qt.RightButton
+ anchors.fill: parent
+ }
+ }
+ \endcode
+
+ \sa acceptedButtons
+*/
+Qt::MouseButtons QDeclarativeMouseArea::pressedButtons() const
+{
+ Q_D(const QDeclarativeMouseArea);
+ return d->lastButtons;
+}
+
+void QDeclarativeMouseArea::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeMouseArea);
+ d->moved = false;
+ if (!d->absorb)
+ QDeclarativeItem::mousePressEvent(event);
+ else {
+ d->longPress = false;
+ d->saveEvent(event);
+ if (d->drag) {
+ d->dragX = drag()->axis() & QDeclarativeDrag::XAxis;
+ d->dragY = drag()->axis() & QDeclarativeDrag::YAxis;
+ }
+ d->dragged = false;
+ setHovered(true);
+ d->start = event->pos();
+ d->startScene = event->scenePos();
+ // we should only start timer if pressAndHold is connected to.
+ if (d->isConnected("pressAndHold(QDeclarativeMouseEvent*)"))
+ d->pressAndHoldTimer.start(PressAndHoldDelay, this);
+ setKeepMouseGrab(false);
+ event->setAccepted(setPressed(true));
+ }
+}
+
+void QDeclarativeMouseArea::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeMouseArea);
+ if (!d->absorb) {
+ QDeclarativeItem::mouseMoveEvent(event);
+ return;
+ }
+
+ d->saveEvent(event);
+
+ // ### we should skip this if these signals aren't used
+ // ### can GV handle this for us?
+ bool contains = boundingRect().contains(d->lastPos);
+ if (d->hovered && !contains)
+ setHovered(false);
+ else if (!d->hovered && contains)
+ setHovered(true);
+
+ if (d->drag && d->drag->target()) {
+ if (!d->moved) {
+ if (d->dragX) d->startX = drag()->target()->x();
+ if (d->dragY) d->startY = drag()->target()->y();
+ }
+
+ QPointF startLocalPos;
+ QPointF curLocalPos;
+ if (drag()->target()->parent()) {
+ startLocalPos = drag()->target()->parentItem()->mapFromScene(d->startScene);
+ curLocalPos = drag()->target()->parentItem()->mapFromScene(event->scenePos());
+ } else {
+ startLocalPos = d->startScene;
+ curLocalPos = event->scenePos();
+ }
+
+ const int dragThreshold = QApplication::startDragDistance();
+ qreal dx = qAbs(curLocalPos.x() - startLocalPos.x());
+ qreal dy = qAbs(curLocalPos.y() - startLocalPos.y());
+ if ((d->dragX && !(dx < dragThreshold)) || (d->dragY && !(dy < dragThreshold)))
+ d->dragged = true;
+ if (!keepMouseGrab()) {
+ if ((!d->dragY && dy < dragThreshold && d->dragX && dx > dragThreshold)
+ || (!d->dragX && dx < dragThreshold && d->dragY && dy > dragThreshold)
+ || (d->dragX && d->dragY)) {
+ setKeepMouseGrab(true);
+ }
+ }
+
+ if (d->dragX) {
+ qreal x = (curLocalPos.x() - startLocalPos.x()) + d->startX;
+ if (x < drag()->xmin())
+ x = drag()->xmin();
+ else if (x > drag()->xmax())
+ x = drag()->xmax();
+ drag()->target()->setX(x);
+ }
+ if (d->dragY) {
+ qreal y = (curLocalPos.y() - startLocalPos.y()) + d->startY;
+ if (y < drag()->ymin())
+ y = drag()->ymin();
+ else if (y > drag()->ymax())
+ y = drag()->ymax();
+ drag()->target()->setY(y);
+ }
+ }
+ d->moved = true;
+ QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, false, d->longPress);
+ emit positionChanged(&me);
+}
+
+
+void QDeclarativeMouseArea::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeMouseArea);
+ if (!d->absorb) {
+ QDeclarativeItem::mouseReleaseEvent(event);
+ } else {
+ d->saveEvent(event);
+ setPressed(false);
+ // If we don't accept hover, we need to reset containsMouse.
+ if (!acceptHoverEvents())
+ setHovered(false);
+ setKeepMouseGrab(false);
+ }
+}
+
+void QDeclarativeMouseArea::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeMouseArea);
+ if (!d->absorb) {
+ QDeclarativeItem::mouseDoubleClickEvent(event);
+ } else {
+ QDeclarativeItem::mouseDoubleClickEvent(event);
+ if (event->isAccepted()) {
+ // Only deliver the event if we have accepted the press.
+ d->saveEvent(event);
+ QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, true, false);
+ emit this->doubleClicked(&me);
+ }
+ }
+}
+
+void QDeclarativeMouseArea::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
+{
+ Q_D(QDeclarativeMouseArea);
+ if (!d->absorb)
+ QDeclarativeItem::hoverEnterEvent(event);
+ else
+ setHovered(true);
+}
+
+void QDeclarativeMouseArea::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
+{
+ Q_D(QDeclarativeMouseArea);
+ if (!d->absorb) {
+ QDeclarativeItem::hoverEnterEvent(event);
+ } else {
+ d->lastPos = event->pos();
+ QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), Qt::NoButton, d->lastButtons, d->lastModifiers, false, d->longPress);
+ emit positionChanged(&me);
+ }
+}
+
+void QDeclarativeMouseArea::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
+{
+ Q_D(QDeclarativeMouseArea);
+ if (!d->absorb)
+ QDeclarativeItem::hoverLeaveEvent(event);
+ else
+ setHovered(false);
+}
+
+bool QDeclarativeMouseArea::sceneEvent(QEvent *event)
+{
+ bool rv = QDeclarativeItem::sceneEvent(event);
+ if (event->type() == QEvent::UngrabMouse) {
+ Q_D(QDeclarativeMouseArea);
+ if (d->pressed) {
+ // if our mouse grab has been removed (probably by Flickable), fix our
+ // state
+ d->pressed = false;
+ setKeepMouseGrab(false);
+ emit pressedChanged();
+ //emit hoveredChanged();
+ }
+ }
+ return rv;
+}
+
+void QDeclarativeMouseArea::timerEvent(QTimerEvent *event)
+{
+ Q_D(QDeclarativeMouseArea);
+ if (event->timerId() == d->pressAndHoldTimer.timerId()) {
+ d->pressAndHoldTimer.stop();
+ if (d->pressed && d->dragged == false && d->hovered == true) {
+ d->longPress = true;
+ QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, false, d->longPress);
+ emit pressAndHold(&me);
+ }
+ }
+}
+
+/*!
+ \qmlproperty bool MouseArea::hoverEnabled
+ This property holds whether hover events are handled.
+
+ By default, mouse events are only handled in response to a button event, or when a button is
+ 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.
+*/
+
+/*!
+ \qmlproperty bool MouseArea::containsMouse
+ This property holds whether the mouse is currently inside the mouse area.
+
+ \warning This property is not updated if the area moves under the mouse: \e containsMouse will not change.
+ In addition, if hoverEnabled is false, containsMouse will only be valid when the mouse is pressed.
+*/
+bool QDeclarativeMouseArea::hovered() const
+{
+ Q_D(const QDeclarativeMouseArea);
+ return d->hovered;
+}
+
+/*!
+ \qmlproperty bool MouseArea::pressed
+ This property holds whether the mouse area is currently pressed.
+*/
+bool QDeclarativeMouseArea::pressed() const
+{
+ Q_D(const QDeclarativeMouseArea);
+ return d->pressed;
+}
+
+void QDeclarativeMouseArea::setHovered(bool h)
+{
+ Q_D(QDeclarativeMouseArea);
+ if (d->hovered != h) {
+ d->hovered = h;
+ emit hoveredChanged();
+ d->hovered ? emit entered() : emit exited();
+ }
+}
+
+/*!
+ \qmlproperty Qt::MouseButtons MouseArea::acceptedButtons
+ This property holds the mouse buttons that the mouse area reacts to.
+
+ The available buttons are:
+ \list
+ \o Qt.LeftButton
+ \o Qt.RightButton
+ \o Qt.MidButton
+ \endlist
+
+ To accept more than one button the flags can be combined with the
+ "|" (or) operator:
+
+ \code
+ MouseArea { acceptedButtons: Qt.LeftButton | Qt.RightButton }
+ \endcode
+
+ The default is to accept the Left button.
+*/
+Qt::MouseButtons QDeclarativeMouseArea::acceptedButtons() const
+{
+ return acceptedMouseButtons();
+}
+
+void QDeclarativeMouseArea::setAcceptedButtons(Qt::MouseButtons buttons)
+{
+ if (buttons != acceptedMouseButtons()) {
+ setAcceptedMouseButtons(buttons);
+ emit acceptedButtonsChanged();
+ }
+}
+
+bool QDeclarativeMouseArea::setPressed(bool p)
+{
+ Q_D(QDeclarativeMouseArea);
+ bool isclick = d->pressed == true && p == false && d->dragged == false && d->hovered == true;
+
+ if (d->pressed != p) {
+ d->pressed = p;
+ QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, isclick, d->longPress);
+ if (d->pressed) {
+ emit positionChanged(&me);
+ emit pressed(&me);
+ } else {
+ emit released(&me);
+ if (isclick)
+ emit clicked(&me);
+ }
+
+ emit pressedChanged();
+ return me.isAccepted();
+ }
+ return false;
+}
+
+QDeclarativeDrag *QDeclarativeMouseArea::drag()
+{
+ Q_D(QDeclarativeMouseArea);
+ if (!d->drag)
+ d->drag = new QDeclarativeDrag;
+ return d->drag;
+}
+
+/*!
+ \qmlproperty Item MouseArea::drag.target
+ \qmlproperty Axis MouseArea::drag.axis
+ \qmlproperty real MouseArea::drag.minimumX
+ \qmlproperty real MouseArea::drag.maximumX
+ \qmlproperty real MouseArea::drag.minimumY
+ \qmlproperty real MouseArea::drag.maximumY
+
+ drag provides a convenient way to make an item draggable.
+
+ \list
+ \i \c target specifies the item to drag.
+ \i \c axis specifies whether dragging can be done horizontally (XAxis), vertically (YAxis), or both (XandYAxis)
+ \i the minimum and maximum properties limit how far the target can be dragged along the corresponding axes.
+ \endlist
+
+ The following example uses drag to reduce the opacity of an image as it moves to the right:
+ \snippet doc/src/snippets/declarative/drag.qml 0
+*/
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p.h
new file mode 100644
index 0000000000..33422e2765
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativemousearea_p.h
@@ -0,0 +1,185 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEMOUSEAREA_H
+#define QDECLARATIVEMOUSEAREA_H
+
+#include "qdeclarativeitem.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDrag : public QObject
+{
+ Q_OBJECT
+
+ Q_ENUMS(Axis)
+ Q_PROPERTY(QDeclarativeItem *target READ target WRITE setTarget NOTIFY targetChanged)
+ Q_PROPERTY(Axis axis READ axis WRITE setAxis NOTIFY axisChanged)
+ Q_PROPERTY(qreal minimumX READ xmin WRITE setXmin NOTIFY minimumXChanged)
+ Q_PROPERTY(qreal maximumX READ xmax WRITE setXmax NOTIFY maximumXChanged)
+ Q_PROPERTY(qreal minimumY READ ymin WRITE setYmin NOTIFY minimumYChanged)
+ Q_PROPERTY(qreal maximumY READ ymax WRITE setYmax NOTIFY maximumYChanged)
+ //### consider drag and drop
+
+public:
+ QDeclarativeDrag(QObject *parent=0);
+ ~QDeclarativeDrag();
+
+ QDeclarativeItem *target() const;
+ void setTarget(QDeclarativeItem *);
+
+ enum Axis { XAxis=0x01, YAxis=0x02, XandYAxis=0x03 };
+ Axis axis() const;
+ void setAxis(Axis);
+
+ qreal xmin() const;
+ void setXmin(qreal);
+ qreal xmax() const;
+ void setXmax(qreal);
+ qreal ymin() const;
+ void setYmin(qreal);
+ qreal ymax() const;
+ void setYmax(qreal);
+
+Q_SIGNALS:
+ void targetChanged();
+ void axisChanged();
+ void minimumXChanged();
+ void maximumXChanged();
+ void minimumYChanged();
+ void maximumYChanged();
+
+private:
+ QDeclarativeItem *_target;
+ Axis _axis;
+ qreal _xmin;
+ qreal _xmax;
+ qreal _ymin;
+ qreal _ymax;
+ Q_DISABLE_COPY(QDeclarativeDrag)
+};
+
+class QDeclarativeMouseEvent;
+class QDeclarativeMouseAreaPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeMouseArea : public QDeclarativeItem
+{
+ Q_OBJECT
+
+ Q_PROPERTY(qreal mouseX READ mouseX NOTIFY positionChanged)
+ Q_PROPERTY(qreal mouseY READ mouseY NOTIFY positionChanged)
+ Q_PROPERTY(bool containsMouse READ hovered NOTIFY hoveredChanged)
+ Q_PROPERTY(bool pressed READ pressed NOTIFY pressedChanged)
+ Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged)
+ Q_PROPERTY(Qt::MouseButtons pressedButtons READ pressedButtons NOTIFY pressedChanged)
+ Q_PROPERTY(Qt::MouseButtons acceptedButtons READ acceptedButtons WRITE setAcceptedButtons NOTIFY acceptedButtonsChanged)
+ Q_PROPERTY(bool hoverEnabled READ acceptHoverEvents WRITE setAcceptHoverEvents)
+ Q_PROPERTY(QDeclarativeDrag *drag READ drag CONSTANT) //### add flicking to QDeclarativeDrag or add a QDeclarativeFlick ???
+
+public:
+ QDeclarativeMouseArea(QDeclarativeItem *parent=0);
+ ~QDeclarativeMouseArea();
+
+ qreal mouseX() const;
+ qreal mouseY() const;
+
+ bool isEnabled() const;
+ void setEnabled(bool);
+
+ bool hovered() const;
+ bool pressed() const;
+
+ Qt::MouseButtons pressedButtons() const;
+
+ Qt::MouseButtons acceptedButtons() const;
+ void setAcceptedButtons(Qt::MouseButtons buttons);
+
+ QDeclarativeDrag *drag();
+
+Q_SIGNALS:
+ void hoveredChanged();
+ void pressedChanged();
+ void enabledChanged();
+ void acceptedButtonsChanged();
+ void positionChanged(QDeclarativeMouseEvent *mouse);
+
+ void pressed(QDeclarativeMouseEvent *mouse);
+ void pressAndHold(QDeclarativeMouseEvent *mouse);
+ void released(QDeclarativeMouseEvent *mouse);
+ void clicked(QDeclarativeMouseEvent *mouse);
+ void doubleClicked(QDeclarativeMouseEvent *mouse);
+ void entered();
+ void exited();
+
+protected:
+ void setHovered(bool);
+ bool setPressed(bool);
+
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+ void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+ void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
+ void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
+ void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
+ bool sceneEvent(QEvent *);
+ void timerEvent(QTimerEvent *event);
+
+private:
+ void handlePress();
+ void handleRelease();
+
+private:
+ Q_DISABLE_COPY(QDeclarativeMouseArea)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeMouseArea)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeDrag)
+QML_DECLARE_TYPE(QDeclarativeMouseArea)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEMOUSEAREA_H
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h
new file mode 100644
index 0000000000..d4871f258f
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEMOUSEREGION_P_H
+#define QDECLARATIVEMOUSEREGION_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeitem_p.h"
+
+#include <qdatetime.h>
+#include <qbasictimer.h>
+#include <qgraphicssceneevent.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeMouseAreaPrivate : public QDeclarativeItemPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeMouseArea)
+
+public:
+ QDeclarativeMouseAreaPrivate()
+ : absorb(true), hovered(false), pressed(false), longPress(false), drag(0)
+ {
+ }
+
+ ~QDeclarativeMouseAreaPrivate();
+
+ void init()
+ {
+ Q_Q(QDeclarativeMouseArea);
+ q->setAcceptedMouseButtons(Qt::LeftButton);
+ }
+
+ void saveEvent(QGraphicsSceneMouseEvent *event) {
+ lastPos = event->pos();
+ lastButton = event->button();
+ lastButtons = event->buttons();
+ lastModifiers = event->modifiers();
+ }
+
+ bool isConnected(const char *signal) {
+ Q_Q(QDeclarativeMouseArea);
+ int idx = QObjectPrivate::get(q)->signalIndex(signal);
+ return QObjectPrivate::get(q)->isSignalConnected(idx);
+ }
+
+ bool absorb : 1;
+ bool hovered : 1;
+ bool pressed : 1;
+ bool longPress : 1;
+ bool moved : 1;
+ bool dragX : 1;
+ bool dragY : 1;
+ bool dragged : 1;
+ QDeclarativeDrag *drag;
+ QPointF start;
+ QPointF startScene;
+ qreal startX;
+ qreal startY;
+ QPointF lastPos;
+ Qt::MouseButton lastButton;
+ Qt::MouseButtons lastButtons;
+ Qt::KeyboardModifiers lastModifiers;
+ QBasicTimer pressAndHoldTimer;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEMOUSEREGION_P_H
diff --git a/src/declarative/graphicsitems/qdeclarativepainteditem.cpp b/src/declarative/graphicsitems/qdeclarativepainteditem.cpp
new file mode 100644
index 0000000000..ab6007a955
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativepainteditem.cpp
@@ -0,0 +1,466 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativepainteditem_p.h"
+#include "qdeclarativepainteditem_p_p.h"
+
+#include <QDebug>
+#include <QPen>
+#include <QFile>
+#include <QEvent>
+#include <QApplication>
+#include <QGraphicsSceneMouseEvent>
+#include <QPainter>
+#include <QPaintEngine>
+#include <qmath.h>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QDeclarativePaintedItem
+ \brief The QDeclarativePaintedItem class is an abstract base class for QDeclarativeView items that want cached painting.
+ \internal
+
+ This is a convenience class for implementing items that paint their contents
+ using a QPainter. The contents of the item are cached behind the scenes.
+ The dirtyCache() function should be called if the contents change to
+ ensure the cache is refreshed the next time painting occurs.
+
+ To subclass QDeclarativePaintedItem, you must reimplement drawContents() to draw
+ the contents of the item.
+*/
+
+/*!
+ \fn void QDeclarativePaintedItem::drawContents(QPainter *painter, const QRect &rect)
+
+ This function is called when the cache needs to be refreshed. When
+ sub-classing QDeclarativePaintedItem this function should be implemented so as to
+ paint the contents of the item using the given \a painter for the
+ area of the contents specified by \a rect.
+*/
+
+/*!
+ \property QDeclarativePaintedItem::contentsSize
+ \brief The size of the contents
+
+ The contents size is the size of the item in regards to how it is painted
+ using the drawContents() function. This is distinct from the size of the
+ item in regards to height() and width().
+*/
+
+// XXX bug in WebKit - can call repaintRequested and other cache-changing functions from within render!
+static int inpaint=0;
+static int inpaint_clearcache=0;
+
+/*!
+ Marks areas of the cache that intersect with the given \a rect as dirty and
+ in need of being refreshed.
+
+ \sa clearCache()
+*/
+void QDeclarativePaintedItem::dirtyCache(const QRect& rect)
+{
+ Q_D(QDeclarativePaintedItem);
+ QRect srect(qCeil(rect.x()*d->contentsScale),
+ qCeil(rect.y()*d->contentsScale),
+ qCeil(rect.width()*d->contentsScale),
+ qCeil(rect.height()*d->contentsScale));
+ for (int i=0; i < d->imagecache.count(); ) {
+ QDeclarativePaintedItemPrivate::ImageCacheItem *c = d->imagecache[i];
+ QRect isect = (c->area & srect) | c->dirty;
+ if (isect == c->area && !inpaint) {
+ delete d->imagecache.takeAt(i);
+ } else {
+ c->dirty = isect;
+ ++i;
+ }
+ }
+}
+
+/*!
+ Marks the entirety of the contents cache as dirty.
+
+ \sa dirtyCache()
+*/
+void QDeclarativePaintedItem::clearCache()
+{
+ if (inpaint) {
+ inpaint_clearcache=1;
+ return;
+ }
+ Q_D(QDeclarativePaintedItem);
+ qDeleteAll(d->imagecache);
+ d->imagecache.clear();
+}
+
+/*!
+ Returns the size of the contents.
+
+ \sa setContentsSize()
+*/
+QSize QDeclarativePaintedItem::contentsSize() const
+{
+ Q_D(const QDeclarativePaintedItem);
+ return d->contentsSize;
+}
+
+/*!
+ Sets the size of the contents to the given \a size.
+
+ \sa contentsSize()
+*/
+void QDeclarativePaintedItem::setContentsSize(const QSize &size)
+{
+ Q_D(QDeclarativePaintedItem);
+ if (d->contentsSize == size) return;
+ d->contentsSize = size;
+ setImplicitWidth(size.width()*d->contentsScale);
+ setImplicitHeight(size.height()*d->contentsScale);
+ clearCache();
+ update();
+ emit contentsSizeChanged();
+}
+
+qreal QDeclarativePaintedItem::contentsScale() const
+{
+ Q_D(const QDeclarativePaintedItem);
+ return d->contentsScale;
+}
+
+void QDeclarativePaintedItem::setContentsScale(qreal scale)
+{
+ Q_D(QDeclarativePaintedItem);
+ if (d->contentsScale == scale) return;
+ d->contentsScale = scale;
+ setImplicitWidth(d->contentsSize.width()*scale);
+ setImplicitHeight(d->contentsSize.height()*scale);
+ clearCache();
+ update();
+ emit contentsScaleChanged();
+}
+
+
+/*!
+ Constructs a new QDeclarativePaintedItem with the given \a parent.
+*/
+QDeclarativePaintedItem::QDeclarativePaintedItem(QDeclarativeItem *parent)
+ : QDeclarativeItem(*(new QDeclarativePaintedItemPrivate), parent)
+{
+ init();
+}
+
+/*!
+ \internal
+ Constructs a new QDeclarativePaintedItem with the given \a parent and
+ initialized private data member \a dd.
+*/
+QDeclarativePaintedItem::QDeclarativePaintedItem(QDeclarativePaintedItemPrivate &dd, QDeclarativeItem *parent)
+ : QDeclarativeItem(dd, parent)
+{
+ init();
+}
+
+/*!
+ Destroys the image item.
+*/
+QDeclarativePaintedItem::~QDeclarativePaintedItem()
+{
+ clearCache();
+}
+
+/*!
+ \internal
+*/
+void QDeclarativePaintedItem::init()
+{
+ connect(this,SIGNAL(widthChanged()),this,SLOT(clearCache()));
+ connect(this,SIGNAL(heightChanged()),this,SLOT(clearCache()));
+ connect(this,SIGNAL(visibleChanged()),this,SLOT(clearCache()));
+}
+
+void QDeclarativePaintedItem::setCacheFrozen(bool frozen)
+{
+ Q_D(QDeclarativePaintedItem);
+ if (d->cachefrozen == frozen)
+ return;
+ d->cachefrozen = frozen;
+ // XXX clear cache?
+}
+
+/*!
+ \reimp
+*/
+void QDeclarativePaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ Q_D(QDeclarativePaintedItem);
+ const QRect content(0,0,qCeil(d->contentsSize.width()*d->contentsScale),
+ qCeil(d->contentsSize.height()*d->contentsScale));
+ if (content.width() <= 0 || content.height() <= 0)
+ return;
+
+ ++inpaint;
+
+ const QTransform &x = p->deviceTransform();
+ QTransform xinv = x.inverted();
+ QRegion effectiveClip;
+ QRegion sysClip = p->paintEngine()->systemClip();
+ if (xinv.type() <= QTransform::TxScale && sysClip.numRects() < 5) {
+ // simple transform, region gets no more complicated...
+ effectiveClip = xinv.map(sysClip);
+ } else {
+ // do not make complicated regions...
+ effectiveClip = xinv.mapRect(sysClip.boundingRect());
+ }
+
+ QRegion topaint = p->clipRegion();
+ if (topaint.isEmpty()) {
+ if (effectiveClip.isEmpty())
+ topaint = QRect(0,0,p->device()->width(),p->device()->height());
+ else
+ topaint = effectiveClip;
+ } else if (!effectiveClip.isEmpty()) {
+ topaint &= effectiveClip;
+ }
+
+ topaint &= content;
+ QRegion uncached(content);
+ p->setRenderHints(QPainter::SmoothPixmapTransform, d->smooth);
+
+ int cachesize=0;
+ for (int i=0; i<d->imagecache.count(); ++i) {
+ QRect area = d->imagecache[i]->area;
+ if (topaint.contains(area)) {
+ QRectF target(area.x(), area.y(), area.width(), area.height());
+ if (!d->cachefrozen) {
+ if (!d->imagecache[i]->dirty.isNull() && topaint.contains(d->imagecache[i]->dirty)) {
+ QPainter qp(&d->imagecache[i]->image);
+ qp.setRenderHints(QPainter::HighQualityAntialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform, d->smoothCache);
+ qp.translate(-area.x(), -area.y());
+ qp.scale(d->contentsScale,d->contentsScale);
+ QRect clip = d->imagecache[i]->dirty;
+ QRect sclip(qFloor(clip.x()/d->contentsScale),
+ qFloor(clip.y()/d->contentsScale),
+ qCeil(clip.width()/d->contentsScale+clip.x()/d->contentsScale-qFloor(clip.x()/d->contentsScale)),
+ qCeil(clip.height()/d->contentsScale+clip.y()/d->contentsScale-qFloor(clip.y()/d->contentsScale)));
+ qp.setClipRect(sclip);
+ if (d->fillColor.isValid()){
+ if(d->fillColor.alpha() < 255){
+ // ### Might not work outside of raster paintengine
+ QPainter::CompositionMode prev = qp.compositionMode();
+ qp.setCompositionMode(QPainter::CompositionMode_Source);
+ qp.fillRect(sclip,d->fillColor);
+ qp.setCompositionMode(prev);
+ }else{
+ qp.fillRect(sclip,d->fillColor);
+ }
+ }
+ drawContents(&qp, sclip);
+ d->imagecache[i]->dirty = QRect();
+ }
+ }
+ p->drawPixmap(target.toRect(), d->imagecache[i]->image);
+ topaint -= area;
+ d->imagecache[i]->age=0;
+ } else {
+ d->imagecache[i]->age++;
+ }
+ cachesize += area.width()*area.height();
+ uncached -= area;
+ }
+
+ if (!topaint.isEmpty()) {
+ if (!d->cachefrozen) {
+ // Find a sensible larger area, otherwise will paint lots of tiny images.
+ QRect biggerrect = topaint.boundingRect().adjusted(-64,-64,128,128);
+ cachesize += biggerrect.width() * biggerrect.height();
+ while (d->imagecache.count() && cachesize > d->max_imagecache_size) {
+ int oldest=-1;
+ int age=-1;
+ for (int i=0; i<d->imagecache.count(); ++i) {
+ int a = d->imagecache[i]->age;
+ if (a > age) {
+ oldest = i;
+ age = a;
+ }
+ }
+ cachesize -= d->imagecache[oldest]->area.width()*d->imagecache[oldest]->area.height();
+ uncached += d->imagecache[oldest]->area;
+ delete d->imagecache.takeAt(oldest);
+ }
+ const QRegion bigger = QRegion(biggerrect) & uncached;
+ const QVector<QRect> rects = bigger.rects();
+ for (int i = 0; i < rects.count(); ++i) {
+ const QRect &r = rects.at(i);
+ QPixmap img(r.size());
+ if (d->fillColor.isValid())
+ img.fill(d->fillColor);
+ {
+ QPainter qp(&img);
+ qp.setRenderHints(QPainter::HighQualityAntialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform, d->smoothCache);
+
+ qp.translate(-r.x(),-r.y());
+ qp.scale(d->contentsScale,d->contentsScale);
+ QRect sclip(qFloor(r.x()/d->contentsScale),
+ qFloor(r.y()/d->contentsScale),
+ qCeil(r.width()/d->contentsScale+r.x()/d->contentsScale-qFloor(r.x()/d->contentsScale)),
+ qCeil(r.height()/d->contentsScale+r.y()/d->contentsScale-qFloor(r.y()/d->contentsScale)));
+ drawContents(&qp, sclip);
+ }
+ QDeclarativePaintedItemPrivate::ImageCacheItem *newitem = new QDeclarativePaintedItemPrivate::ImageCacheItem;
+ newitem->area = r;
+ newitem->image = img;
+ d->imagecache.append(newitem);
+ p->drawPixmap(r, newitem->image);
+ }
+ } else {
+ const QVector<QRect> rects = uncached.rects();
+ for (int i = 0; i < rects.count(); ++i)
+ p->fillRect(rects.at(i), Qt::lightGray);
+ }
+ }
+
+ if (inpaint_clearcache) {
+ clearCache();
+ inpaint_clearcache = 0;
+ }
+
+ --inpaint;
+}
+
+/*!
+ \qmlproperty int PaintedItem::pixelCacheSize
+
+ This property holds the maximum number of pixels of image cache to
+ allow. The default is 0.1 megapixels. The cache will not be larger
+ than the (unscaled) size of the WebView.
+*/
+/*!
+ \property QDeclarativePaintedItem::pixelCacheSize
+
+ The maximum number of pixels of image cache to allow. The default
+ is 0.1 megapixels. The cache will not be larger than the (unscaled)
+ size of the QDeclarativePaintedItem.
+*/
+int QDeclarativePaintedItem::pixelCacheSize() const
+{
+ Q_D(const QDeclarativePaintedItem);
+ return d->max_imagecache_size;
+}
+
+void QDeclarativePaintedItem::setPixelCacheSize(int pixels)
+{
+ Q_D(QDeclarativePaintedItem);
+ if (pixels < d->max_imagecache_size) {
+ int cachesize=0;
+ for (int i=0; i<d->imagecache.count(); ++i) {
+ QRect area = d->imagecache[i]->area;
+ cachesize += area.width()*area.height();
+ }
+ while (d->imagecache.count() && cachesize > pixels) {
+ int oldest=-1;
+ int age=-1;
+ for (int i=0; i<d->imagecache.count(); ++i) {
+ int a = d->imagecache[i]->age;
+ if (a > age) {
+ oldest = i;
+ age = a;
+ }
+ }
+ cachesize -= d->imagecache[oldest]->area.width()*d->imagecache[oldest]->area.height();
+ delete d->imagecache.takeAt(oldest);
+ }
+ }
+ d->max_imagecache_size = pixels;
+}
+
+
+
+/*!
+ \property QDeclarativePaintedItem::fillColor
+
+ The color to be used to fill the item prior to calling drawContents().
+ By default, this is Qt::transparent.
+
+ Performance improvements can be achieved if subclasses call this with either an
+ invalid color (QColor()), or an appropriate solid color.
+*/
+void QDeclarativePaintedItem::setFillColor(const QColor& c)
+{
+ Q_D(QDeclarativePaintedItem);
+ if (d->fillColor == c)
+ return;
+ d->fillColor = c;
+ emit fillColorChanged();
+ update();
+}
+
+QColor QDeclarativePaintedItem::fillColor() const
+{
+ Q_D(const QDeclarativePaintedItem);
+ return d->fillColor;
+}
+
+/*!
+ \qmlproperty bool PaintedItem::smoothCache
+
+ Controls whether the cached tiles of which the item is composed are
+ rendered smoothly when they are generated.
+
+ This is in addition toe Item::smooth, which controls the smooth painting of
+ the already-painted cached tiles under transformation.
+*/
+bool QDeclarativePaintedItem::smoothCache() const
+{
+ Q_D(const QDeclarativePaintedItem);
+ return d->smoothCache;
+}
+
+void QDeclarativePaintedItem::setSmoothCache(bool on)
+{
+ Q_D(QDeclarativePaintedItem);
+ if (d->smoothCache != on) {
+ d->smoothCache = on;
+ clearCache();
+ }
+}
+
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativepainteditem_p.h b/src/declarative/graphicsitems/qdeclarativepainteditem_p.h
new file mode 100644
index 0000000000..cc616afffc
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativepainteditem_p.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEIMAGEITEM_H
+#define QDECLARATIVEIMAGEITEM_H
+
+#include "qdeclarativeitem.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativePaintedItemPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativePaintedItem : public QDeclarativeItem
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QSize contentsSize READ contentsSize WRITE setContentsSize NOTIFY contentsSizeChanged)
+ Q_PROPERTY(QColor fillColor READ fillColor WRITE setFillColor NOTIFY fillColorChanged)
+ Q_PROPERTY(int pixelCacheSize READ pixelCacheSize WRITE setPixelCacheSize)
+ Q_PROPERTY(bool smoothCache READ smoothCache WRITE setSmoothCache)
+ Q_PROPERTY(qreal contentsScale READ contentsScale WRITE setContentsScale NOTIFY contentsScaleChanged)
+
+
+public:
+ QDeclarativePaintedItem(QDeclarativeItem *parent=0);
+ ~QDeclarativePaintedItem();
+
+ QSize contentsSize() const;
+ void setContentsSize(const QSize &);
+
+ qreal contentsScale() const;
+ void setContentsScale(qreal);
+
+ int pixelCacheSize() const;
+ void setPixelCacheSize(int pixels);
+
+ bool smoothCache() const;
+ void setSmoothCache(bool on);
+
+ QColor fillColor() const;
+ void setFillColor(const QColor&);
+
+ void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
+
+protected:
+ QDeclarativePaintedItem(QDeclarativePaintedItemPrivate &dd, QDeclarativeItem *parent);
+
+ virtual void drawContents(QPainter *p, const QRect &) = 0;
+
+ void setCacheFrozen(bool);
+
+Q_SIGNALS:
+ void fillColorChanged();
+ void contentsSizeChanged();
+ void contentsScaleChanged();
+
+protected Q_SLOTS:
+ void dirtyCache(const QRect &);
+ void clearCache();
+
+private:
+ void init();
+ Q_DISABLE_COPY(QDeclarativePaintedItem)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativePaintedItem)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativePaintedItem)
+
+QT_END_HEADER
+
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativepainteditem_p_p.h b/src/declarative/graphicsitems/qdeclarativepainteditem_p_p.h
new file mode 100644
index 0000000000..a15febb75b
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativepainteditem_p_p.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEIMAGEITEM_P_H
+#define QDECLARATIVEIMAGEITEM_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeitem_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativePaintedItemPrivate : public QDeclarativeItemPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativePaintedItem)
+
+public:
+ QDeclarativePaintedItemPrivate()
+ : max_imagecache_size(100000), contentsScale(1.0), fillColor(Qt::transparent), cachefrozen(false), smoothCache(true)
+ {
+ }
+
+ struct ImageCacheItem {
+ ImageCacheItem() : age(0) {}
+ ~ImageCacheItem() { }
+ int age;
+ QRect area;
+ QRect dirty; // one dirty area (allows optimization of common cases)
+ QPixmap image;
+ };
+
+ QList<ImageCacheItem*> imagecache;
+
+ int max_imagecache_size;
+ QSize contentsSize;
+ qreal contentsScale;
+ QColor fillColor;
+ bool cachefrozen;
+ bool smoothCache;
+};
+
+QT_END_NAMESPACE
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativeparticles.cpp b/src/declarative/graphicsitems/qdeclarativeparticles.cpp
new file mode 100644
index 0000000000..593c80a086
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeparticles.cpp
@@ -0,0 +1,1317 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeparticles_p.h"
+
+#include "qdeclarativeitem_p.h"
+
+#include <qdeclarativepixmapcache_p.h>
+#include <qfxperf_p_p.h>
+#include <qdeclarativeanimation_p_p.h>
+
+#include <QNetworkReply>
+#include <QPainter>
+#include <QtGui/qdrawutil.h>
+#include <QVarLengthArray>
+
+#include <stdlib.h>
+#include <math.h>
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#define M_PI_2 (M_PI / 2.)
+#endif
+#ifndef INT_MAX
+#define INT_MAX 2147483647
+#endif
+
+QT_BEGIN_NAMESPACE
+#define PI_SQR 9.8696044
+// parabolic approximation
+inline qreal fastSin(qreal theta)
+{
+ const qreal b = 4 / M_PI;
+ const qreal c = -4 / PI_SQR;
+
+ qreal y = b * theta + c * theta * qAbs(theta);
+ return y;
+}
+
+inline qreal fastCos(qreal theta)
+{
+ theta += M_PI_2;
+ if (theta > M_PI)
+ theta -= 2 * M_PI;
+
+ return fastSin(theta);
+}
+
+class QDeclarativeParticle
+{
+public:
+ QDeclarativeParticle(int time) : lifeSpan(1000), fadeOutAge(800)
+ , opacity(0), birthTime(time), x_velocity(0), y_velocity(0)
+ , state(FadeIn), data(0)
+ {
+ }
+
+ int lifeSpan;
+ int fadeOutAge;
+ qreal x;
+ qreal y;
+ qreal opacity;
+ int birthTime;
+ qreal x_velocity;
+ qreal y_velocity;
+ enum State { FadeIn, Solid, FadeOut };
+ State state;
+ void *data;
+};
+
+//---------------------------------------------------------------------------
+
+/*!
+ \class QDeclarativeParticleMotion
+ \ingroup group_effects
+ \brief The QDeclarativeParticleMotion class is the base class for particle motion.
+ \internal
+
+ This class causes the particles to remain static.
+*/
+
+/*!
+ Constructs a QDeclarativeParticleMotion with parent object \a parent.
+*/
+QDeclarativeParticleMotion::QDeclarativeParticleMotion(QObject *parent) :
+ QObject(parent)
+{
+}
+
+/*!
+ Move the \a particle to its new position. \a interval is the number of
+ milliseconds elapsed since it was last moved.
+*/
+void QDeclarativeParticleMotion::advance(QDeclarativeParticle &particle, int interval)
+{
+ Q_UNUSED(particle);
+ Q_UNUSED(interval);
+}
+
+/*!
+ The \a particle has just been created. Some motion strategies require
+ additional state information. This can be allocated by this function.
+*/
+void QDeclarativeParticleMotion::created(QDeclarativeParticle &particle)
+{
+ Q_UNUSED(particle);
+}
+
+/*!
+ The \a particle is about to be destroyed. Any additional memory
+ that has been allocated for the particle should be freed.
+*/
+void QDeclarativeParticleMotion::destroy(QDeclarativeParticle &particle)
+{
+ Q_UNUSED(particle);
+}
+
+/*!
+ \qmlclass ParticleMotionLinear
+ \since 4.7
+ \brief The ParticleMotionLinear object moves particles linearly.
+
+ \sa Particles
+*/
+
+/*!
+ \internal
+ \class QDeclarativeParticleMotionLinear
+ \ingroup group_effects
+ \brief The QDeclarativeParticleMotionLinear class moves the particles linearly.
+*/
+
+void QDeclarativeParticleMotionLinear::advance(QDeclarativeParticle &p, int interval)
+{
+ p.x += interval * p.x_velocity;
+ p.y += interval * p.y_velocity;
+}
+
+/*!
+ \qmlclass ParticleMotionGravity
+ \since 4.7
+ \brief The ParticleMotionGravity object moves particles towards a point.
+
+ \sa Particles
+*/
+
+/*!
+ \internal
+ \class QDeclarativeParticleMotionGravity
+ \ingroup group_effects
+ \brief The QDeclarativeParticleMotionGravity class moves the particles towards a point.
+*/
+
+/*!
+ \qmlproperty qreal ParticleMotionGravity::xattractor
+ \qmlproperty qreal ParticleMotionGravity::yattractor
+ These properties hold the x and y coordinates of the point attracting the particles.
+*/
+
+/*!
+ \qmlproperty qreal ParticleMotionGravity::acceleration
+ This property holds the acceleration to apply to the particles.
+*/
+
+/*!
+ \property QDeclarativeParticleMotionGravity::xattractor
+ \brief the x coordinate of the point attracting the particles.
+*/
+
+/*!
+ \property QDeclarativeParticleMotionGravity::yattractor
+ \brief the y coordinate of the point attracting the particles.
+*/
+
+/*!
+ \property QDeclarativeParticleMotionGravity::acceleration
+ \brief the acceleration to apply to the particles.
+*/
+
+void QDeclarativeParticleMotionGravity::setXAttractor(qreal x)
+{
+ if (qFuzzyCompare(x, _xAttr))
+ return;
+ _xAttr = x;
+ emit xattractorChanged();
+}
+
+void QDeclarativeParticleMotionGravity::setYAttractor(qreal y)
+{
+ if (qFuzzyCompare(y, _yAttr))
+ return;
+ _yAttr = y;
+ emit yattractorChanged();
+}
+
+void QDeclarativeParticleMotionGravity::setAcceleration(qreal accel)
+{
+ qreal scaledAccel = accel/1000000.0;
+ if (qFuzzyCompare(scaledAccel, _accel))
+ return;
+ _accel = scaledAccel;
+ emit accelerationChanged();
+}
+
+void QDeclarativeParticleMotionGravity::advance(QDeclarativeParticle &p, int interval)
+{
+ qreal xdiff = p.x - _xAttr;
+ qreal ydiff = p.y - _yAttr;
+
+ qreal xcomp = xdiff / (xdiff + ydiff);
+ qreal ycomp = ydiff / (xdiff + ydiff);
+
+ p.x_velocity += xcomp * _accel * interval;
+ p.y_velocity += ycomp * _accel * interval;
+
+ p.x += interval * p.x_velocity;
+ p.y += interval * p.y_velocity;
+}
+
+/*!
+ \qmlclass ParticleMotionWander
+ \since 4.7
+ \brief The ParticleMotionWander object moves particles in a somewhat random fashion.
+
+ The particles will continue roughly in the original direction, however will randomly
+ drift to each side.
+
+ The code below produces an effect similar to falling snow.
+
+ \qml
+Rectangle {
+ width: 240
+ height: 320
+ color: "black"
+
+ Particles {
+ y: 0
+ width: parent.width
+ height: 30
+ source: "star.png"
+ lifeSpan: 5000
+ count: 50
+ angle: 70
+ angleDeviation: 36
+ velocity: 30
+ velocityDeviation: 10
+ ParticleMotionWander {
+ xvariance: 30
+ pace: 100
+ }
+ }
+}
+ \endqml
+
+ \sa Particles
+*/
+
+/*!
+ \internal
+ \class QDeclarativeParticleMotionWander
+ \ingroup group_effects
+ \brief The QDeclarativeParticleMotionWander class moves particles in a somewhat random fashion.
+
+ The particles will continue roughly in the original direction, however will randomly
+ drift to each side.
+*/
+
+/*!
+ \qmlproperty qreal QDeclarativeParticleMotionWander::xvariance
+ \qmlproperty qreal QDeclarativeParticleMotionWander::yvariance
+
+ These properties set the amount to wander in the x and y directions.
+*/
+
+/*!
+ \qmlproperty qreal QDeclarativeParticleMotionWander::pace
+ This property holds how quickly the paricles will move from side to side.
+*/
+
+void QDeclarativeParticleMotionWander::advance(QDeclarativeParticle &p, int interval)
+{
+ if (!particles)
+ particles = qobject_cast<QDeclarativeParticles*>(parent());
+ if (particles) {
+ Data *d = (Data*)p.data;
+ if (_xvariance != 0.) {
+ qreal xdiff = p.x_velocity - d->x_targetV;
+ if ((xdiff > d->x_peak && d->x_var > 0.0) || (xdiff < -d->x_peak && d->x_var < 0.0)) {
+ d->x_var = -d->x_var;
+ d->x_peak = _xvariance + _xvariance * qreal(qrand()) / RAND_MAX;
+ }
+ p.x_velocity += d->x_var * interval;
+ }
+ p.x += interval * p.x_velocity;
+
+ if (_yvariance != 0.) {
+ qreal ydiff = p.y_velocity - d->y_targetV;
+ if ((ydiff > d->y_peak && d->y_var > 0.0) || (ydiff < -d->y_peak && d->y_var < 0.0)) {
+ d->y_var = -d->y_var;
+ d->y_peak = _yvariance + _yvariance * qreal(qrand()) / RAND_MAX;
+ }
+ p.y_velocity += d->y_var * interval;
+ }
+ p.y += interval * p.y_velocity;
+ }
+}
+
+void QDeclarativeParticleMotionWander::created(QDeclarativeParticle &p)
+{
+ if (!p.data) {
+ Data *d = new Data;
+ p.data = (void*)d;
+ d->x_targetV = p.x_velocity;
+ d->y_targetV = p.y_velocity;
+ d->x_peak = _xvariance;
+ d->y_peak = _yvariance;
+ d->x_var = _pace * qreal(qrand()) / RAND_MAX / 1000.0;
+ d->y_var = _pace * qreal(qrand()) / RAND_MAX / 1000.0;
+ }
+}
+
+void QDeclarativeParticleMotionWander::destroy(QDeclarativeParticle &p)
+{
+ if (p.data)
+ delete (Data*)p.data;
+}
+
+void QDeclarativeParticleMotionWander::setXVariance(qreal var)
+{
+ qreal scaledVar = var / 1000.0;
+ if (qFuzzyCompare(scaledVar, _xvariance))
+ return;
+ _xvariance = scaledVar;
+ emit xvarianceChanged();
+}
+
+void QDeclarativeParticleMotionWander::setYVariance(qreal var)
+{
+ qreal scaledVar = var / 1000.0;
+ if (qFuzzyCompare(scaledVar, _yvariance))
+ return;
+ _yvariance = scaledVar;
+ emit yvarianceChanged();
+}
+
+void QDeclarativeParticleMotionWander::setPace(qreal pace)
+{
+ qreal scaledPace = pace / 1000.0;
+ if (qFuzzyCompare(scaledPace, _pace))
+ return;
+ _pace = scaledPace;
+ emit paceChanged();
+}
+
+//---------------------------------------------------------------------------
+class QDeclarativeParticlesPainter : public QDeclarativeItem
+{
+public:
+ QDeclarativeParticlesPainter(QDeclarativeParticlesPrivate *p, QDeclarativeItem* parent)
+ : QDeclarativeItem(parent), d(p)
+ {
+ setFlag(QGraphicsItem::ItemHasNoContents, false);
+ maxX = minX = maxY = minY = 0;
+ }
+
+ void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
+
+ void updateSize();
+
+ qreal maxX;
+ qreal minX;
+ qreal maxY;
+ qreal minY;
+ QDeclarativeParticlesPrivate* d;
+};
+
+//---------------------------------------------------------------------------
+class QDeclarativeParticlesPrivate : public QDeclarativeItemPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeParticles)
+public:
+ QDeclarativeParticlesPrivate()
+ : count(1), emissionRate(-1), emissionVariance(0.5), lifeSpan(1000)
+ , lifeSpanDev(1000), fadeInDur(200), fadeOutDur(300)
+ , angle(0), angleDev(0), velocity(0), velocityDev(0), emissionCarry(0.)
+ , addParticleTime(0), addParticleCount(0), lastAdvTime(0)
+ , motion(0), pendingPixmapCache(false), clock(this)
+ {
+ }
+
+ ~QDeclarativeParticlesPrivate()
+ {
+ }
+
+ void init()
+ {
+ Q_Q(QDeclarativeParticles);
+ paintItem = new QDeclarativeParticlesPainter(this, q);
+ }
+
+ void tick(int time);
+ void createParticle(int time);
+ void updateOpacity(QDeclarativeParticle &p, int age);
+
+ QUrl url;
+ QPixmap image;
+ int count;
+ int emissionRate;
+ qreal emissionVariance;
+ int lifeSpan;
+ int lifeSpanDev;
+ int fadeInDur;
+ int fadeOutDur;
+ qreal angle;
+ qreal angleDev;
+ qreal velocity;
+ qreal velocityDev;
+ qreal emissionCarry;
+ int addParticleTime;
+ int addParticleCount;
+ int lastAdvTime;
+ QDeclarativeParticleMotion *motion;
+ QDeclarativeParticlesPainter *paintItem;
+
+ bool pendingPixmapCache;
+
+ QList<QPair<int, int> > bursts;//countLeft, emissionRate pairs
+ QList<QDeclarativeParticle> particles;
+ QTickAnimationProxy<QDeclarativeParticlesPrivate, &QDeclarativeParticlesPrivate::tick> clock;
+
+};
+
+void QDeclarativeParticlesPrivate::tick(int time)
+{
+ Q_Q(QDeclarativeParticles);
+ if (!motion)
+ motion = new QDeclarativeParticleMotionLinear(q);
+
+ int oldCount = particles.count();
+ int removed = 0;
+ int interval = time - lastAdvTime;
+ for (int i = 0; i < particles.count(); ) {
+ QDeclarativeParticle &particle = particles[i];
+ int age = time - particle.birthTime;
+ if (age >= particle.lifeSpan) {
+ QDeclarativeParticle part = particles.takeAt(i);
+ motion->destroy(part);
+ ++removed;
+ } else {
+ updateOpacity(particle, age);
+ motion->advance(particle, interval);
+ ++i;
+ }
+ }
+
+ if(emissionRate == -1)//Otherwise leave emission to the emission rate
+ while(removed-- && ((count == -1) || particles.count() < count))
+ createParticle(time);
+
+ if (!addParticleTime)
+ addParticleTime = time;
+
+ //Possibly emit new particles
+ if (((count == -1) || particles.count() < count) && emissionRate
+ && !(count==-1 && emissionRate==-1)) {
+ int emissionCount = -1;
+ if (emissionRate != -1){
+ qreal variance = 1.;
+ if (emissionVariance > 0.){
+ variance += (qreal(qrand())/RAND_MAX) * emissionVariance * (qrand()%2?-1.:1.);
+ }
+ qreal emission = emissionRate * (qreal(interval)/1000.);
+ emission = emission * variance + emissionCarry;
+ double tmpDbl;
+ emissionCarry = modf(emission, &tmpDbl);
+ emissionCount = (int)tmpDbl;
+ emissionCount = qMax(0,emissionCount);
+ }
+ while(((count == -1) || particles.count() < count) &&
+ (emissionRate==-1 || emissionCount--))
+ createParticle(time);
+ }
+
+ //Deal with emissions from requested bursts
+ for(int i=0; i<bursts.size(); i++){
+ int emission = 0;
+ if(bursts[i].second == -1){
+ emission = bursts[i].first;
+ }else{
+ qreal variance = 1.;
+ if (emissionVariance > 0.){
+ variance += (qreal(qrand())/RAND_MAX) * emissionVariance * (qrand()%2?-1.:1.);
+ }
+ qreal workingEmission = bursts[i].second * (qreal(interval)/1000.);
+ workingEmission *= variance;
+ emission = (int)workingEmission;
+ emission = qMax(emission, 0);
+ }
+ emission = qMin(emission, bursts[i].first);
+ bursts[i].first -= emission;
+ while(emission--)
+ createParticle(time);
+ }
+ for(int i=bursts.size()-1; i>=0; i--)
+ if(bursts[i].first <= 0)
+ bursts.removeAt(i);
+
+ lastAdvTime = time;
+ paintItem->updateSize();
+ paintItem->update();
+ if (!(oldCount || particles.count()) && (!count || !emissionRate) && bursts.isEmpty()) {
+ lastAdvTime = 0;
+ clock.stop();
+ }
+}
+
+void QDeclarativeParticlesPrivate::createParticle(int time)
+{
+#ifdef Q_ENABLE_PERFORMANCE_LOG
+ QDeclarativePerfTimer<QDeclarativePerf::CreateParticle> x;
+#endif
+ Q_Q(QDeclarativeParticles);
+ QDeclarativeParticle p(time);
+ p.x = q->x() + q->width() * qreal(qrand()) / RAND_MAX - image.width()/2.0;
+ p.y = q->y() + q->height() * qreal(qrand()) / RAND_MAX - image.height()/2.0;
+ p.lifeSpan = lifeSpan;
+ if (lifeSpanDev)
+ p.lifeSpan += int(lifeSpanDev/2 - lifeSpanDev * qreal(qrand()) / RAND_MAX);
+ p.fadeOutAge = p.lifeSpan - fadeOutDur;
+ if (fadeInDur == 0.) {
+ p.state= QDeclarativeParticle::Solid;
+ p.opacity = 1.0;
+ }
+ qreal a = angle;
+ if (angleDev)
+ a += angleDev/2 - angleDev * qreal(qrand()) / RAND_MAX;
+ if (a > M_PI)
+ a = a - 2 * M_PI;
+ qreal v = velocity;
+ if (velocityDev)
+ v += velocityDev/2 - velocityDev * qreal(qrand()) / RAND_MAX;
+ p.x_velocity = v * fastCos(a);
+ p.y_velocity = v * fastSin(a);
+ particles.append(p);
+ motion->created(particles.last());
+}
+
+void QDeclarativeParticlesPrivate::updateOpacity(QDeclarativeParticle &p, int age)
+{
+ switch (p.state) {
+ case QDeclarativeParticle::FadeIn:
+ if (age <= fadeInDur) {
+ p.opacity = qreal(age) / fadeInDur;
+ break;
+ } else {
+ p.opacity = 1.0;
+ p.state = QDeclarativeParticle::Solid;
+ // Fall through
+ }
+ case QDeclarativeParticle::Solid:
+ if (age <= p.fadeOutAge) {
+ break;
+ } else {
+ p.state = QDeclarativeParticle::FadeOut;
+ // Fall through
+ }
+ case QDeclarativeParticle::FadeOut:
+ p.opacity = qreal(p.lifeSpan - age) / fadeOutDur;
+ break;
+ }
+}
+
+/*!
+ \qmlclass Particles
+ \since 4.7
+ \brief The Particles object generates and moves particles.
+ \inherits Item
+
+ This element provides preliminary support for particles in QML,
+ and may be heavily changed or removed in later versions.
+
+ The particles created by this object cannot be dealt with
+ directly, they can only be controlled through the parameters of
+ the Particles object. The particles are all the same pixmap,
+ specified by the user.
+
+ The particles are painted relative to the parent of the Particles
+ object. Moving the Particles object will not move the particles
+ already emitted.
+
+ The below example creates two differently behaving particle
+ sources. The top one has particles falling from the top like
+ snow, the lower one has particles expelled up like a fountain.
+
+ \qml
+Rectangle {
+ width: 240
+ height: 320
+ color: "black"
+ Particles {
+ y: 0
+ width: parent.width
+ height: 30
+ source: "star.png"
+ lifeSpan: 5000
+ count: 50
+ angle: 70
+ angleDeviation: 36
+ velocity: 30
+ velocityDeviation: 10
+ ParticleMotionWander {
+ xvariance: 30
+ pace: 100
+ }
+ }
+ Particles {
+ y: 300
+ x: 120
+ width: 1
+ height: 1
+ source: "star.png"
+ lifeSpan: 5000
+ count: 200
+ angle: 270
+ angleDeviation: 45
+ velocity: 50
+ velocityDeviation: 30
+ ParticleMotionGravity {
+ yattractor: 1000
+ xattractor: 0
+ acceleration: 25
+ }
+ }
+}
+ \endqml
+ \image particles.gif
+*/
+
+/*!
+ \internal
+ \class QDeclarativeParticles
+ \ingroup group_effects
+ \brief The QDeclarativeParticles class generates and moves particles.
+*/
+
+QDeclarativeParticles::QDeclarativeParticles(QDeclarativeItem *parent)
+ : QDeclarativeItem(*(new QDeclarativeParticlesPrivate), parent)
+{
+ Q_D(QDeclarativeParticles);
+ d->init();
+}
+
+QDeclarativeParticles::~QDeclarativeParticles()
+{
+ Q_D(QDeclarativeParticles);
+ if (d->pendingPixmapCache)
+ QDeclarativePixmapCache::cancel(d->url, this);
+}
+
+/*!
+ \qmlproperty string Particles::source
+ This property holds the URL of the particle image.
+*/
+
+/*!
+ \property QDeclarativeParticles::source
+ \brief the URL of the particle image.
+*/
+QUrl QDeclarativeParticles::source() const
+{
+ Q_D(const QDeclarativeParticles);
+ return d->url;
+}
+
+void QDeclarativeParticles::imageLoaded()
+{
+ Q_D(QDeclarativeParticles);
+ d->pendingPixmapCache = false;
+ QDeclarativePixmapCache::get(d->url, &d->image);
+ d->paintItem->updateSize();
+ d->paintItem->update();
+}
+
+void QDeclarativeParticles::setSource(const QUrl &name)
+{
+ Q_D(QDeclarativeParticles);
+
+ if ((d->url.isEmpty() == name.isEmpty()) && name == d->url)
+ return;
+
+ if (d->pendingPixmapCache) {
+ QDeclarativePixmapCache::cancel(d->url, this);
+ d->pendingPixmapCache = false;
+ }
+ if (name.isEmpty()) {
+ d->url = name;
+ d->image = QPixmap();
+ d->paintItem->updateSize();
+ d->paintItem->update();
+ } else {
+ d->url = name;
+ Q_ASSERT(!name.isRelative());
+ QDeclarativePixmapReply::Status status = QDeclarativePixmapCache::get(d->url, &d->image);
+ if (status != QDeclarativePixmapReply::Ready && status != QDeclarativePixmapReply::Error) {
+ QDeclarativePixmapReply *reply = QDeclarativePixmapCache::request(qmlEngine(this), d->url);
+ connect(reply, SIGNAL(finished()), this, SLOT(imageLoaded()));
+ d->pendingPixmapCache = true;
+ } else {
+ //### unify with imageLoaded
+ d->paintItem->updateSize();
+ d->paintItem->update();
+ }
+ }
+ emit sourceChanged();
+}
+
+/*!
+ \qmlproperty int Particles::count
+ This property holds the maximum number of particles
+
+ The particles element emits particles until it has count active
+ particles. When this number is reached, new particles are not emitted until
+ some of the current particles reach the end of their lifespan.
+
+ If count is -1 then there is no maximum number of active particles, and
+ particles will be constantly emitted at the rate specified by emissionRate.
+
+ The default value for count is 1.
+
+ If both count and emissionRate are set to -1, nothing will be emitted.
+
+*/
+
+/*!
+ \property QDeclarativeParticles::count
+ \brief the maximum number of particles
+*/
+int QDeclarativeParticles::count() const
+{
+ Q_D(const QDeclarativeParticles);
+ return d->count;
+}
+
+void QDeclarativeParticles::setCount(int cnt)
+{
+ Q_D(QDeclarativeParticles);
+ if (cnt == d->count)
+ return;
+
+ int oldCount = d->count;
+ d->count = cnt;
+ d->addParticleTime = 0;
+ d->addParticleCount = d->particles.count();
+ if (!oldCount && d->clock.state() != QAbstractAnimation::Running && d->count && d->emissionRate) {
+ d->clock.start();
+ }
+ d->paintItem->updateSize();
+ d->paintItem->update();
+ emit countChanged();
+}
+
+
+/*!
+ \qmlproperty int Particles::emissionRate
+ This property holds the target number of particles to emit every second.
+
+ The particles element will emit up to emissionRate particles every
+ second. Fewer particles may be emitted per second if the maximum number of
+ particles has been reached.
+
+ If emissionRate is set to -1 there is no limit to the number of
+ particles emitted per second, and particles will be instantly emitted to
+ reach the maximum number of particles specified by count.
+
+ The default value for emissionRate is -1.
+
+ If both count and emissionRate are set to -1, nothing will be emitted.
+*/
+
+/*!
+ \property QDeclarativeParticles::emissionRate
+ \brief the emission rate of particles
+*/
+int QDeclarativeParticles::emissionRate() const
+{
+ Q_D(const QDeclarativeParticles);
+ return d->emissionRate;
+}
+void QDeclarativeParticles::setEmissionRate(int er)
+{
+ Q_D(QDeclarativeParticles);
+ if(er == d->emissionRate)
+ return;
+ d->emissionRate = er;
+ if (d->clock.state() != QAbstractAnimation::Running && d->count && d->emissionRate) {
+ d->clock.start();
+ }
+ emit emissionRateChanged();
+}
+
+/*!
+ \qmlproperty qreal Particles::emissionVariance
+ This property holds how inconsistent the rate of particle emissions are.
+ It is a number between 0 (no variance) and 1 (some variance).
+
+ The expected number of particles emitted per second is emissionRate. If
+ emissionVariance is 0 then particles will be emitted consistently throughout
+ each second to reach that number. If emissionVariance is greater than 0 the
+ rate of particle emission will vary randomly throughout the second, with the
+ consequence that the actual number of particles emitted in one second will
+ vary randomly as well.
+
+ emissionVariance is the maximum deviation from emitting
+ emissionRate particles per second. An emissionVariance of 0 means you should
+ get exactly emissionRate particles emitted per second,
+ and an emissionVariance of 1 means you will get between zero and two times
+ emissionRate particles per second, but you should get emissionRate particles
+ per second on average.
+
+ Note that even with an emissionVariance of 0 there may be some variance due
+ to performance and hardware constraints.
+
+ The default value of emissionVariance is 0.5
+*/
+
+/*!
+ \property QDeclarativeParticles::emissionVariance
+ \brief how much the particle emission amounts vary per tick
+*/
+
+qreal QDeclarativeParticles::emissionVariance() const
+{
+ Q_D(const QDeclarativeParticles);
+ return d->emissionVariance;
+}
+
+void QDeclarativeParticles::setEmissionVariance(qreal ev)
+{
+ Q_D(QDeclarativeParticles);
+ if(d->emissionVariance == ev)
+ return;
+ d->emissionVariance = ev;
+ emit emissionVarianceChanged();
+}
+
+/*!
+ \qmlproperty int Particles::lifeSpan
+ \qmlproperty int Particles::lifeSpanDeviation
+
+ These properties describe the life span of each particle.
+
+ The default lifespan for a particle is 1000ms.
+
+ lifeSpanDeviation randomly varies the lifeSpan up to the specified variation. For
+ example, the following creates particles whose lifeSpan will vary
+ from 150ms to 250ms:
+
+ \qml
+Particles {
+ source: "star.png"
+ lifeSpan: 200
+ lifeSpanDeviation: 100
+}
+ \endqml
+*/
+
+/*!
+ \property QDeclarativeParticles::lifeSpan
+ \brief the life span of each particle.
+
+ Default value is 1000ms.
+
+ \sa QDeclarativeParticles::lifeSpanDeviation
+*/
+int QDeclarativeParticles::lifeSpan() const
+{
+ Q_D(const QDeclarativeParticles);
+ return d->lifeSpan;
+}
+
+void QDeclarativeParticles::setLifeSpan(int ls)
+{
+ Q_D(QDeclarativeParticles);
+ if(d->lifeSpan == ls)
+ return;
+ d->lifeSpan = ls;
+ emit lifeSpanChanged();
+}
+
+/*!
+ \property QDeclarativeParticles::lifeSpanDeviation
+ \brief the maximum possible deviation from the set lifeSpan.
+
+ Randomly varies the lifeSpan up to the specified variation. For
+ example, the following creates particles whose lifeSpan will vary
+ from 150ms to 250ms:
+
+\qml
+Particles {
+ source: "star.png"
+ lifeSpan: 200
+ lifeSpanDeviation: 100
+}
+\endqml
+
+ \sa QDeclarativeParticles::lifeSpan
+*/
+int QDeclarativeParticles::lifeSpanDeviation() const
+{
+ Q_D(const QDeclarativeParticles);
+ return d->lifeSpanDev;
+}
+
+void QDeclarativeParticles::setLifeSpanDeviation(int dev)
+{
+ Q_D(QDeclarativeParticles);
+ if(d->lifeSpanDev == dev)
+ return;
+ d->lifeSpanDev = dev;
+ emit lifeSpanDeviationChanged();
+}
+
+/*!
+ \qmlproperty int Particles::fadeInDuration
+ \qmlproperty int Particles::fadeOutDuration
+ These properties hold the time taken to fade the particles in and out.
+
+ By default fade in is 200ms and fade out is 300ms.
+*/
+
+/*!
+ \property QDeclarativeParticles::fadeInDuration
+ \brief the time taken to fade in the particles.
+
+ Default value is 200ms.
+*/
+int QDeclarativeParticles::fadeInDuration() const
+{
+ Q_D(const QDeclarativeParticles);
+ return d->fadeInDur;
+}
+
+void QDeclarativeParticles::setFadeInDuration(int dur)
+{
+ Q_D(QDeclarativeParticles);
+ if (dur < 0.0 || dur == d->fadeInDur)
+ return;
+ d->fadeInDur = dur;
+ emit fadeInDurationChanged();
+}
+
+/*!
+ \property QDeclarativeParticles::fadeOutDuration
+ \brief the time taken to fade out the particles.
+
+ Default value is 300ms.
+*/
+int QDeclarativeParticles::fadeOutDuration() const
+{
+ Q_D(const QDeclarativeParticles);
+ return d->fadeOutDur;
+}
+
+void QDeclarativeParticles::setFadeOutDuration(int dur)
+{
+ Q_D(QDeclarativeParticles);
+ if (dur < 0.0 || d->fadeOutDur == dur)
+ return;
+ d->fadeOutDur = dur;
+ emit fadeOutDurationChanged();
+}
+
+/*!
+ \qmlproperty real Particles::angle
+ \qmlproperty real Particles::angleDeviation
+
+ These properties control particle direction.
+
+ angleDeviation randomly varies the direction up to the specified variation. For
+ example, the following creates particles whose initial direction will
+ vary from 15 degrees to 105 degrees:
+
+ \qml
+Particles {
+ source: "star.png"
+ angle: 60
+ angleDeviation: 90
+}
+ \endqml
+*/
+
+/*!
+ \property QDeclarativeParticles::angle
+ \brief the initial angle of direction.
+
+ \sa QDeclarativeParticles::angleDeviation
+*/
+qreal QDeclarativeParticles::angle() const
+{
+ Q_D(const QDeclarativeParticles);
+ return d->angle * 180.0 / M_PI;
+}
+
+void QDeclarativeParticles::setAngle(qreal angle)
+{
+ Q_D(QDeclarativeParticles);
+ qreal radAngle = angle * M_PI / 180.0;
+ if(radAngle == d->angle)
+ return;
+ d->angle = radAngle;
+ emit angleChanged();
+}
+
+/*!
+ \property QDeclarativeParticles::angleDeviation
+ \brief the maximum possible deviation from the set angle.
+
+ Randomly varies the direction up to the specified variation. For
+ example, the following creates particles whose initial direction will
+ vary from 15 degrees to 105 degrees:
+
+\qml
+Particles {
+ source: "star.png"
+ angle: 60
+ angleDeviation: 90
+}
+\endqml
+
+ \sa QDeclarativeParticles::angle
+*/
+qreal QDeclarativeParticles::angleDeviation() const
+{
+ Q_D(const QDeclarativeParticles);
+ return d->angleDev * 180.0 / M_PI;
+}
+
+void QDeclarativeParticles::setAngleDeviation(qreal dev)
+{
+ Q_D(QDeclarativeParticles);
+ qreal radDev = dev * M_PI / 180.0;
+ if(radDev == d->angleDev)
+ return;
+ d->angleDev = radDev;
+ emit angleDeviationChanged();
+}
+
+/*!
+ \qmlproperty real Particles::velocity
+ \qmlproperty real Particles::velocityDeviation
+
+ These properties control the velocity of the particles.
+
+ velocityDeviation randomly varies the velocity up to the specified variation. For
+ example, the following creates particles whose initial velocity will
+ vary from 40 to 60.
+
+ \qml
+Particles {
+ source: "star.png"
+ velocity: 50
+ velocityDeviation: 20
+}
+ \endqml
+*/
+
+/*!
+ \property QDeclarativeParticles::velocity
+ \brief the initial velocity of the particles.
+
+ \sa QDeclarativeParticles::velocityDeviation
+*/
+qreal QDeclarativeParticles::velocity() const
+{
+ Q_D(const QDeclarativeParticles);
+ return d->velocity * 1000.0;
+}
+
+void QDeclarativeParticles::setVelocity(qreal velocity)
+{
+ Q_D(QDeclarativeParticles);
+ qreal realVel = velocity / 1000.0;
+ if(realVel == d->velocity)
+ return;
+ d->velocity = realVel;
+ emit velocityChanged();
+}
+
+/*!
+ \property QDeclarativeParticles::velocityDeviation
+ \brief the maximum possible deviation from the set velocity.
+
+ Randomly varies the velocity up to the specified variation. For
+ example, the following creates particles whose initial velocity will
+ vary from 40 to 60.
+
+\qml
+Particles {
+ source: "star.png"
+ velocity: 50
+ velocityDeviation: 20
+}
+\endqml
+
+ \sa QDeclarativeParticles::velocity
+*/
+qreal QDeclarativeParticles::velocityDeviation() const
+{
+ Q_D(const QDeclarativeParticles);
+ return d->velocityDev * 1000.0;
+}
+
+void QDeclarativeParticles::setVelocityDeviation(qreal velocity)
+{
+ Q_D(QDeclarativeParticles);
+ qreal realDev = velocity / 1000.0;
+ if(realDev == d->velocityDev)
+ return;
+ d->velocityDev = realDev;
+ emit velocityDeviationChanged();
+}
+
+/*!
+ \qmlproperty ParticleMotion Particles::motion
+ This property sets the type of motion to apply to the particles.
+
+ When a particle is created it will have an initial direction and velocity.
+ The motion of the particle during its lifeSpan is then influenced by the
+ motion property.
+
+ Default motion is ParticleMotionLinear.
+*/
+
+/*!
+ \property QDeclarativeParticles::motion
+ \brief sets the type of motion to apply to the particles.
+
+ When a particle is created it will have an initial direction and velocity.
+ The motion of the particle during its lifeSpan is then influenced by the
+ motion property.
+
+ Default motion is QDeclarativeParticleMotionLinear.
+*/
+QDeclarativeParticleMotion *QDeclarativeParticles::motion() const
+{
+ Q_D(const QDeclarativeParticles);
+ return d->motion;
+}
+
+void QDeclarativeParticles::setMotion(QDeclarativeParticleMotion *motion)
+{
+ Q_D(QDeclarativeParticles);
+ if (motion == d->motion)
+ return;
+ d->motion = motion;
+ emit motionChanged();
+}
+
+/*!
+ \qmlmethod Particles::burst(int count, int emissionRate)
+
+ Initiates a burst of particles.
+
+ This method takes two arguments. The first argument is the number
+ of particles to emit and the second argument is the emissionRate for the
+ burst. If the second argument is omitted, it is treated as -1. The burst
+ of particles has a separate emissionRate and count to the normal emission of
+ particles. The burst uses the same values as normal emission for all other
+ properties, including emissionVariance.
+
+ The normal emission of particles will continue during the burst, however
+ the particles created by the burst count towards the maximum number used by
+ normal emission. To avoid this behavior, use two Particles elements.
+
+*/
+void QDeclarativeParticles::burst(int count, int emissionRate)
+{
+ Q_D(QDeclarativeParticles);
+ d->bursts << qMakePair(count, emissionRate);
+ if (d->clock.state() != QAbstractAnimation::Running)
+ d->clock.start();
+}
+
+void QDeclarativeParticlesPainter::updateSize()
+{
+ if (!d->_componentComplete)
+ return;
+
+ const int parentX = parentItem()->x();
+ const int parentY = parentItem()->y();
+ for (int i = 0; i < d->particles.count(); ++i) {
+ const QDeclarativeParticle &particle = d->particles.at(i);
+ if(particle.x > maxX)
+ maxX = particle.x;
+ if(particle.x < minX)
+ minX = particle.x;
+ if(particle.y > maxY)
+ maxY = particle.y;
+ if(particle.y < minY)
+ minY = particle.y;
+ }
+
+ int myWidth = (int)(maxX-minX+0.5)+d->image.width();
+ int myX = (int)(minX - parentX);
+ int myHeight = (int)(maxY-minY+0.5)+d->image.height();
+ int myY = (int)(minY - parentY);
+ setWidth(myWidth);
+ setHeight(myHeight);
+ setX(myX);
+ setY(myY);
+}
+
+void QDeclarativeParticles::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ Q_UNUSED(p);
+ //painting is done by the ParticlesPainter, so it can have the right size
+}
+
+void QDeclarativeParticlesPainter::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ if (d->image.isNull() || d->particles.isEmpty())
+ return;
+
+ const int myX = x() + parentItem()->x();
+ const int myY = y() + parentItem()->y();
+
+#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0))
+ QVarLengthArray<QPainter::PixmapFragment, 256> pixmapData;
+#else
+ QVarLengthArray<QDrawPixmaps::Data, 256> pixmapData;
+#endif
+ pixmapData.resize(d->particles.count());
+
+ const QRectF sourceRect = d->image.rect();
+ qreal halfPWidth = sourceRect.width()/2.;
+ qreal halfPHeight = sourceRect.height()/2.;
+ for (int i = 0; i < d->particles.count(); ++i) {
+ const QDeclarativeParticle &particle = d->particles.at(i);
+#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0))
+ pixmapData[i].x = particle.x - myX + halfPWidth;
+ pixmapData[i].y = particle.y - myY + halfPHeight;
+#else
+ pixmapData[i].point = QPointF(particle.x - myX + halfPWidth, particle.y - myY + halfPHeight);
+#endif
+ pixmapData[i].opacity = particle.opacity;
+
+ //these never change
+ pixmapData[i].rotation = 0;
+ pixmapData[i].scaleX = 1;
+ pixmapData[i].scaleY = 1;
+#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0))
+ pixmapData[i].sourceLeft = sourceRect.left();
+ pixmapData[i].sourceTop = sourceRect.top();
+ pixmapData[i].width = sourceRect.width();
+ pixmapData[i].height = sourceRect.height();
+#else
+ pixmapData[i].source = sourceRect;
+#endif
+ }
+#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0))
+ p->drawPixmapFragments(pixmapData.data(), d->particles.count(), d->image);
+#else
+ qDrawPixmaps(p, pixmapData.data(), d->particles.count(), d->image);
+#endif
+}
+
+void QDeclarativeParticles::componentComplete()
+{
+ Q_D(QDeclarativeParticles);
+ QDeclarativeItem::componentComplete();
+ if (d->count && d->emissionRate) {
+ d->paintItem->updateSize();
+ d->clock.start();
+ }
+ if (d->lifeSpanDev > d->lifeSpan)
+ d->lifeSpanDev = d->lifeSpan;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativeparticles_p.h b/src/declarative/graphicsitems/qdeclarativeparticles_p.h
new file mode 100644
index 0000000000..06acbb96c2
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativeparticles_p.h
@@ -0,0 +1,258 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEPARTICLES_H
+#define QDECLARATIVEPARTICLES_H
+
+#include "qdeclarativeitem.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeParticle;
+class QDeclarativeParticles;
+class Q_DECLARATIVE_EXPORT QDeclarativeParticleMotion : public QObject
+{
+ Q_OBJECT
+public:
+ QDeclarativeParticleMotion(QObject *parent=0);
+
+ virtual void advance(QDeclarativeParticle &, int interval);
+ virtual void created(QDeclarativeParticle &);
+ virtual void destroy(QDeclarativeParticle &);
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeParticleMotionLinear : public QDeclarativeParticleMotion
+{
+ Q_OBJECT
+public:
+ QDeclarativeParticleMotionLinear(QObject *parent=0)
+ : QDeclarativeParticleMotion(parent) {}
+
+ virtual void advance(QDeclarativeParticle &, int interval);
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeParticleMotionGravity : public QDeclarativeParticleMotion
+{
+ Q_OBJECT
+
+ Q_PROPERTY(qreal xattractor READ xAttractor WRITE setXAttractor NOTIFY xattractorChanged)
+ Q_PROPERTY(qreal yattractor READ yAttractor WRITE setYAttractor NOTIFY yattractorChanged)
+ Q_PROPERTY(qreal acceleration READ acceleration WRITE setAcceleration NOTIFY accelerationChanged)
+public:
+ QDeclarativeParticleMotionGravity(QObject *parent=0)
+ : QDeclarativeParticleMotion(parent), _xAttr(0.0), _yAttr(0.0), _accel(0.00005) {}
+
+ qreal xAttractor() const { return _xAttr; }
+ void setXAttractor(qreal x);
+
+ qreal yAttractor() const { return _yAttr; }
+ void setYAttractor(qreal y);
+
+ qreal acceleration() const { return _accel * 1000000; }
+ void setAcceleration(qreal accel);
+
+ virtual void advance(QDeclarativeParticle &, int interval);
+
+Q_SIGNALS:
+ void xattractorChanged();
+ void yattractorChanged();
+ void accelerationChanged();
+
+private:
+ qreal _xAttr;
+ qreal _yAttr;
+ qreal _accel;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeParticleMotionWander : public QDeclarativeParticleMotion
+{
+ Q_OBJECT
+public:
+ QDeclarativeParticleMotionWander()
+ : QDeclarativeParticleMotion(), particles(0), _xvariance(0), _yvariance(0) {}
+
+ virtual void advance(QDeclarativeParticle &, int interval);
+ virtual void created(QDeclarativeParticle &);
+ virtual void destroy(QDeclarativeParticle &);
+
+ struct Data {
+ qreal x_targetV;
+ qreal y_targetV;
+ qreal x_peak;
+ qreal y_peak;
+ qreal x_var;
+ qreal y_var;
+ };
+
+ Q_PROPERTY(qreal xvariance READ xVariance WRITE setXVariance NOTIFY xvarianceChanged)
+ qreal xVariance() const { return _xvariance * 1000.0; }
+ void setXVariance(qreal var);
+
+ Q_PROPERTY(qreal yvariance READ yVariance WRITE setYVariance NOTIFY yvarianceChanged)
+ qreal yVariance() const { return _yvariance * 1000.0; }
+ void setYVariance(qreal var);
+
+ Q_PROPERTY(qreal pace READ pace WRITE setPace NOTIFY paceChanged)
+ qreal pace() const { return _pace * 1000.0; }
+ void setPace(qreal pace);
+
+Q_SIGNALS:
+ void xvarianceChanged();
+ void yvarianceChanged();
+ void paceChanged();
+
+private:
+ QDeclarativeParticles *particles;
+ qreal _xvariance;
+ qreal _yvariance;
+ qreal _pace;
+};
+
+class QDeclarativeParticlesPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeParticles : public QDeclarativeItem
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
+ Q_PROPERTY(int count READ count WRITE setCount NOTIFY countChanged)
+ Q_PROPERTY(int emissionRate READ emissionRate WRITE setEmissionRate NOTIFY emissionRateChanged)
+ Q_PROPERTY(qreal emissionVariance READ emissionVariance WRITE setEmissionVariance NOTIFY emissionVarianceChanged)
+ Q_PROPERTY(int lifeSpan READ lifeSpan WRITE setLifeSpan NOTIFY lifeSpanChanged)
+ Q_PROPERTY(int lifeSpanDeviation READ lifeSpanDeviation WRITE setLifeSpanDeviation NOTIFY lifeSpanDeviationChanged)
+ Q_PROPERTY(int fadeInDuration READ fadeInDuration WRITE setFadeInDuration NOTIFY fadeInDurationChanged)
+ Q_PROPERTY(int fadeOutDuration READ fadeOutDuration WRITE setFadeOutDuration NOTIFY fadeOutDurationChanged)
+ Q_PROPERTY(qreal angle READ angle WRITE setAngle NOTIFY angleChanged)
+ Q_PROPERTY(qreal angleDeviation READ angleDeviation WRITE setAngleDeviation NOTIFY angleDeviationChanged)
+ Q_PROPERTY(qreal velocity READ velocity WRITE setVelocity NOTIFY velocityChanged)
+ Q_PROPERTY(qreal velocityDeviation READ velocityDeviation WRITE setVelocityDeviation NOTIFY velocityDeviationChanged)
+ Q_PROPERTY(QDeclarativeParticleMotion *motion READ motion WRITE setMotion NOTIFY motionChanged)
+ Q_CLASSINFO("DefaultProperty", "motion")
+
+public:
+ QDeclarativeParticles(QDeclarativeItem *parent=0);
+ ~QDeclarativeParticles();
+
+ QUrl source() const;
+ void setSource(const QUrl &);
+
+ int count() const;
+ void setCount(int cnt);
+
+ int emissionRate() const;
+ void setEmissionRate(int);
+
+ qreal emissionVariance() const;
+ void setEmissionVariance(qreal);
+
+ int lifeSpan() const;
+ void setLifeSpan(int);
+
+ int lifeSpanDeviation() const;
+ void setLifeSpanDeviation(int);
+
+ int fadeInDuration() const;
+ void setFadeInDuration(int);
+
+ int fadeOutDuration() const;
+ void setFadeOutDuration(int);
+
+ qreal angle() const;
+ void setAngle(qreal);
+
+ qreal angleDeviation() const;
+ void setAngleDeviation(qreal);
+
+ qreal velocity() const;
+ void setVelocity(qreal);
+
+ qreal velocityDeviation() const;
+ void setVelocityDeviation(qreal);
+
+ QDeclarativeParticleMotion *motion() const;
+ void setMotion(QDeclarativeParticleMotion *);
+
+ void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
+
+public Q_SLOTS:
+ void burst(int count, int emissionRate=-1);
+
+protected:
+ virtual void componentComplete();
+
+Q_SIGNALS:
+ void sourceChanged();
+ void countChanged();
+ void emissionRateChanged();
+ void emissionVarianceChanged();
+ void lifeSpanChanged();
+ void lifeSpanDeviationChanged();
+ void fadeInDurationChanged();
+ void fadeOutDurationChanged();
+ void angleChanged();
+ void angleDeviationChanged();
+ void velocityChanged();
+ void velocityDeviationChanged();
+ void emittingChanged();
+ void motionChanged();
+
+private Q_SLOTS:
+ void imageLoaded();
+
+private:
+ Q_DISABLE_COPY(QDeclarativeParticles)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeParticles)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeParticleMotion)
+QML_DECLARE_TYPE(QDeclarativeParticleMotionLinear)
+QML_DECLARE_TYPE(QDeclarativeParticleMotionGravity)
+QML_DECLARE_TYPE(QDeclarativeParticleMotionWander)
+QML_DECLARE_TYPE(QDeclarativeParticles)
+
+QT_END_HEADER
+
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp
new file mode 100644
index 0000000000..80586b8619
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativepath.cpp
@@ -0,0 +1,858 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativepath_p.h"
+#include "qdeclarativepath_p_p.h"
+
+#include <qfxperf_p_p.h>
+
+#include <QSet>
+
+#include <private/qbezier_p.h>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \qmlclass PathElement QDeclarativePathElement
+ \since 4.7
+ \brief PathElement is the base path type.
+
+ This type is the base for all path types. It cannot
+ be instantiated.
+
+ \sa Path, PathAttribute, PathPercent, PathLine, PathQuad, PathCubic
+*/
+
+/*!
+ \internal
+ \class QDeclarativePathElement
+ \ingroup group_utility
+*/
+
+/*!
+ \qmlclass Path QDeclarativePath
+ \since 4.7
+ \brief A Path object defines a path for use by \l PathView.
+
+ A Path is composed of one or more path segments - PathLine, PathQuad,
+ PathCubic.
+
+ The spacing of the items along the Path can be adjusted via a
+ PathPercent object.
+
+ PathAttribute allows named attributes with values to be defined
+ along the path.
+
+ \sa PathView, PathAttribute, PathPercent, PathLine, PathQuad, PathCubic
+*/
+
+/*!
+ \internal
+ \class QDeclarativePath
+ \ingroup group_utility
+ \brief The QDeclarativePath class defines a path.
+ \sa QDeclarativePathView
+*/
+QDeclarativePath::QDeclarativePath(QObject *parent)
+ : QObject(*(new QDeclarativePathPrivate), parent)
+{
+}
+
+QDeclarativePath::~QDeclarativePath()
+{
+}
+
+/*!
+ \qmlproperty real Path::startX
+ \qmlproperty real Path::startY
+ These properties hold the starting position of the path.
+*/
+qreal QDeclarativePath::startX() const
+{
+ Q_D(const QDeclarativePath);
+ return d->startX;
+}
+
+void QDeclarativePath::setStartX(qreal x)
+{
+ Q_D(QDeclarativePath);
+ if (qFuzzyCompare(x, d->startX))
+ return;
+ d->startX = x;
+ emit startXChanged();
+}
+
+qreal QDeclarativePath::startY() const
+{
+ Q_D(const QDeclarativePath);
+ return d->startY;
+}
+
+void QDeclarativePath::setStartY(qreal y)
+{
+ Q_D(QDeclarativePath);
+ if (qFuzzyCompare(y, d->startY))
+ return;
+ d->startY = y;
+ emit startYChanged();
+}
+
+/*!
+ \qmlproperty bool Path::closed
+ This property holds whether the start and end of the path are identical.
+*/
+bool QDeclarativePath::isClosed() const
+{
+ Q_D(const QDeclarativePath);
+ return d->closed;
+}
+
+/*!
+ \qmlproperty list<PathElement> Path::pathElements
+ This property holds the objects composing the path.
+
+ \default
+
+ A path can contain the following path objects:
+ \list
+ \i \l PathLine - a straight line to a given position.
+ \i \l PathQuad - a quadratic Bezier curve to a given position with a control point.
+ \i \l PathCubic - a cubic Bezier curve to a given position with two control points.
+ \i \l PathAttribute - an attribute at a given position in the path.
+ \i \l PathPercent - a way to spread out items along various segments of the path.
+ \endlist
+
+ \snippet doc/src/snippets/declarative/pathview/pathattributes.qml 2
+*/
+
+QDeclarativeListProperty<QDeclarativePathElement> QDeclarativePath::pathElements()
+{
+ Q_D(QDeclarativePath);
+ return QDeclarativeListProperty<QDeclarativePathElement>(this, d->_pathElements);
+}
+
+void QDeclarativePath::interpolate(int idx, const QString &name, qreal value)
+{
+ Q_D(QDeclarativePath);
+ if (!idx)
+ return;
+
+ qreal lastValue = 0;
+ qreal lastPercent = 0;
+ int search = idx - 1;
+ while(search >= 0) {
+ const AttributePoint &point = d->_attributePoints.at(search);
+ if (point.values.contains(name)) {
+ lastValue = point.values.value(name);
+ lastPercent = point.origpercent;
+ break;
+ }
+ --search;
+ }
+
+ ++search;
+
+ const AttributePoint &curPoint = d->_attributePoints.at(idx);
+
+ for (int ii = search; ii < idx; ++ii) {
+ AttributePoint &point = d->_attributePoints[ii];
+
+ qreal val = lastValue + (value - lastValue) * (point.origpercent - lastPercent) / (curPoint.origpercent - lastPercent);
+ point.values.insert(name, val);
+ }
+}
+
+void QDeclarativePath::endpoint(const QString &name)
+{
+ Q_D(QDeclarativePath);
+ const AttributePoint &first = d->_attributePoints.first();
+ qreal val = first.values.value(name);
+ for (int ii = d->_attributePoints.count() - 1; ii >= 0; ii--) {
+ const AttributePoint &point = d->_attributePoints.at(ii);
+ if (point.values.contains(name)) {
+ for (int jj = ii + 1; jj < d->_attributePoints.count(); ++jj) {
+ AttributePoint &setPoint = d->_attributePoints[jj];
+ setPoint.values.insert(name, val);
+ }
+ return;
+ }
+ }
+}
+
+void QDeclarativePath::processPath()
+{
+ Q_D(QDeclarativePath);
+
+ d->_pointCache.clear();
+ d->_attributePoints.clear();
+ d->_path = QPainterPath();
+
+ AttributePoint first;
+ for (int ii = 0; ii < d->_attributes.count(); ++ii)
+ first.values[d->_attributes.at(ii)] = 0;
+ d->_attributePoints << first;
+
+ d->_path.moveTo(d->startX, d->startY);
+
+ QDeclarativeCurve *lastCurve = 0;
+ foreach (QDeclarativePathElement *pathElement, d->_pathElements) {
+ if (QDeclarativeCurve *curve = qobject_cast<QDeclarativeCurve *>(pathElement)) {
+ curve->addToPath(d->_path);
+ AttributePoint p;
+ p.origpercent = d->_path.length();
+ d->_attributePoints << p;
+ lastCurve = curve;
+ } else if (QDeclarativePathAttribute *attribute = qobject_cast<QDeclarativePathAttribute *>(pathElement)) {
+ AttributePoint &point = d->_attributePoints.last();
+ point.values[attribute->name()] = attribute->value();
+ interpolate(d->_attributePoints.count() - 1, attribute->name(), attribute->value());
+ } else if (QDeclarativePathPercent *percent = qobject_cast<QDeclarativePathPercent *>(pathElement)) {
+ AttributePoint &point = d->_attributePoints.last();
+ point.values[QLatin1String("_qfx_percent")] = percent->value();
+ interpolate(d->_attributePoints.count() - 1, QLatin1String("_qfx_percent"), percent->value());
+ }
+ }
+
+ // Fixup end points
+ const AttributePoint &last = d->_attributePoints.last();
+ for (int ii = 0; ii < d->_attributes.count(); ++ii) {
+ if (!last.values.contains(d->_attributes.at(ii)))
+ endpoint(d->_attributes.at(ii));
+ }
+
+ // Adjust percent
+ qreal length = d->_path.length();
+ qreal prevpercent = 0;
+ qreal prevorigpercent = 0;
+ for (int ii = 0; ii < d->_attributePoints.count(); ++ii) {
+ const AttributePoint &point = d->_attributePoints.at(ii);
+ if (point.values.contains(QLatin1String("_qfx_percent"))) { //special string for QDeclarativePathPercent
+ if ( ii > 0) {
+ qreal scale = (d->_attributePoints[ii].origpercent/length - prevorigpercent) /
+ (point.values.value(QLatin1String("_qfx_percent"))-prevpercent);
+ d->_attributePoints[ii].scale = scale;
+ }
+ d->_attributePoints[ii].origpercent /= length;
+ d->_attributePoints[ii].percent = point.values.value(QLatin1String("_qfx_percent"));
+ prevorigpercent = d->_attributePoints[ii].origpercent;
+ prevpercent = d->_attributePoints[ii].percent;
+ } else {
+ d->_attributePoints[ii].origpercent /= length;
+ d->_attributePoints[ii].percent = d->_attributePoints[ii].origpercent;
+ }
+ }
+
+ d->closed = lastCurve && d->startX == lastCurve->x() && d->startY == lastCurve->y();
+
+ emit changed();
+}
+
+void QDeclarativePath::componentComplete()
+{
+ Q_D(QDeclarativePath);
+ QSet<QString> attrs;
+ // First gather up all the attributes
+ foreach (QDeclarativePathElement *pathElement, d->_pathElements) {
+ if (QDeclarativePathAttribute *attribute =
+ qobject_cast<QDeclarativePathAttribute *>(pathElement))
+ attrs.insert(attribute->name());
+ }
+ d->_attributes = attrs.toList();
+
+ processPath();
+
+ foreach (QDeclarativePathElement *pathElement, d->_pathElements)
+ connect(pathElement, SIGNAL(changed()), this, SLOT(processPath()));
+}
+
+QPainterPath QDeclarativePath::path() const
+{
+ Q_D(const QDeclarativePath);
+ return d->_path;
+}
+
+QStringList QDeclarativePath::attributes() const
+{
+ Q_D(const QDeclarativePath);
+ return d->_attributes;
+}
+#include <QTime>
+
+static inline QBezier nextBezier(const QPainterPath &path, int *from, qreal *bezLength)
+{
+ const int lastElement = path.elementCount() - 1;
+ for (int i=*from; i <= lastElement; ++i) {
+ const QPainterPath::Element &e = path.elementAt(i);
+
+ switch (e.type) {
+ case QPainterPath::MoveToElement:
+ break;
+ case QPainterPath::LineToElement:
+ {
+ QLineF line(path.elementAt(i-1), e);
+ *bezLength = line.length();
+ QPointF a = path.elementAt(i-1);
+ QPointF delta = e - a;
+ *from = i+1;
+ return QBezier::fromPoints(a, a + delta / 3, a + 2 * delta / 3, e);
+ }
+ case QPainterPath::CurveToElement:
+ {
+ QBezier b = QBezier::fromPoints(path.elementAt(i-1),
+ e,
+ path.elementAt(i+1),
+ path.elementAt(i+2));
+ *bezLength = b.length();
+ *from = i+3;
+ return b;
+ }
+ default:
+ break;
+ }
+ }
+ *from = lastElement;
+ *bezLength = 0;
+ return QBezier();
+}
+
+void QDeclarativePath::createPointCache() const
+{
+ Q_D(const QDeclarativePath);
+#ifdef Q_ENABLE_PERFORMANCE_LOG
+ QDeclarativePerfTimer<QDeclarativePerf::QDeclarativePathViewPathCache> pc;
+#endif
+ qreal pathLength = d->_path.length();
+ const int points = int(pathLength*2);
+ const int lastElement = d->_path.elementCount() - 1;
+ d->_pointCache.resize(points+1);
+
+ int currElement = 0;
+ qreal bezLength = 0;
+ QBezier currBez = nextBezier(d->_path, &currElement, &bezLength);
+ qreal currLength = bezLength;
+ qreal epc = currLength / pathLength;
+
+ for (int i = 0; i < d->_pointCache.size(); i++) {
+ //find which set we are in
+ qreal prevPercent = 0;
+ qreal prevOrigPercent = 0;
+ for (int ii = 0; ii < d->_attributePoints.count(); ++ii) {
+ qreal percent = qreal(i)/points;
+ const AttributePoint &point = d->_attributePoints.at(ii);
+ if (percent < point.percent || ii == d->_attributePoints.count() - 1) { //### || is special case for very last item
+ qreal elementPercent = (percent - prevPercent);
+
+ qreal spc = prevOrigPercent + elementPercent * point.scale;
+
+ while (spc > epc) {
+ if (currElement > lastElement)
+ break;
+ currBez = nextBezier(d->_path, &currElement, &bezLength);
+ if (bezLength == 0.0) {
+ currLength = pathLength;
+ epc = 1.0;
+ break;
+ }
+ currLength += bezLength;
+ epc = currLength / pathLength;
+ }
+ qreal realT = (pathLength * spc - (currLength - bezLength)) / bezLength;
+ d->_pointCache[i] = currBez.pointAt(qBound(qreal(0), realT, qreal(1)));
+ break;
+ }
+ prevOrigPercent = point.origpercent;
+ prevPercent = point.percent;
+ }
+ }
+}
+
+QPointF QDeclarativePath::pointAt(qreal p) const
+{
+ Q_D(const QDeclarativePath);
+ if (d->_pointCache.isEmpty()) {
+ createPointCache();
+ }
+ int idx = qRound(p*d->_pointCache.size());
+ if (idx >= d->_pointCache.size())
+ idx = d->_pointCache.size() - 1;
+ else if (idx < 0)
+ idx = 0;
+ return d->_pointCache.at(idx);
+}
+
+qreal QDeclarativePath::attributeAt(const QString &name, qreal percent) const
+{
+ Q_D(const QDeclarativePath);
+ if (percent < 0 || percent > 1)
+ return 0;
+
+ for (int ii = 0; ii < d->_attributePoints.count(); ++ii) {
+ const AttributePoint &point = d->_attributePoints.at(ii);
+
+ if (point.percent == percent) {
+ return point.values.value(name);
+ } else if (point.percent > percent) {
+ qreal lastValue =
+ ii?(d->_attributePoints.at(ii - 1).values.value(name)):0;
+ qreal lastPercent =
+ ii?(d->_attributePoints.at(ii - 1).percent):0;
+ qreal curValue = point.values.value(name);
+ qreal curPercent = point.percent;
+
+ return lastValue + (curValue - lastValue) * (percent - lastPercent) / (curPercent - lastPercent);
+ }
+ }
+
+ return 0;
+}
+
+/****************************************************************************/
+
+qreal QDeclarativeCurve::x() const
+{
+ return _x;
+}
+
+void QDeclarativeCurve::setX(qreal x)
+{
+ if (_x != x) {
+ _x = x;
+ emit changed();
+ }
+}
+
+qreal QDeclarativeCurve::y() const
+{
+ return _y;
+}
+
+void QDeclarativeCurve::setY(qreal y)
+{
+ if (_y != y) {
+ _y = y;
+ emit changed();
+ }
+}
+
+/****************************************************************************/
+
+/*!
+ \qmlclass PathAttribute QDeclarativePathAttribute
+ \since 4.7
+ \brief The PathAttribute allows setting an attribute at a given position in a Path.
+
+ The PathAttribute object allows attibutes consisting of a name and
+ a value to be specified for the endpoints of path segments. The
+ attributes are exposed to the delegate as
+ \l{qdeclarativeintroduction.html#attached-properties} {Attached Properties}.
+ The value of an attribute at any particular point is interpolated
+ from the PathAttributes bounding the point.
+
+ The example below shows a path with the items scaled to 30% with
+ opacity 50% at the top of the path and scaled 100% with opacity
+ 100% at the bottom. Note the use of the PathView.scale and
+ PathView.opacity attached properties to set the scale and opacity
+ of the delegate.
+
+ \table
+ \row
+ \o \image declarative-pathattribute.png
+ \o
+ \snippet doc/src/snippets/declarative/pathview/pathattributes.qml 0
+ \endtable
+
+ \sa Path
+*/
+
+/*!
+ \internal
+ \class QDeclarativePathAttribute
+ \ingroup group_utility
+ \brief The QDeclarativePathAttribute class allows to set the value of an attribute at a given position in the path.
+
+ \sa QDeclarativePath
+*/
+
+
+/*!
+ \qmlproperty string PathAttribute::name
+ the name of the attribute to change.
+*/
+
+/*!
+ the name of the attribute to change.
+*/
+
+QString QDeclarativePathAttribute::name() const
+{
+ return _name;
+}
+
+void QDeclarativePathAttribute::setName(const QString &name)
+{
+ if (_name == name)
+ return;
+ _name = name;
+ emit nameChanged();
+}
+
+/*!
+ \qmlproperty string PathAttribute::value
+ the new value of the attribute.
+*/
+
+/*!
+ the new value of the attribute.
+*/
+qreal QDeclarativePathAttribute::value() const
+{
+ return _value;
+}
+
+void QDeclarativePathAttribute::setValue(qreal value)
+{
+ if (_value != value) {
+ _value = value;
+ emit changed();
+ }
+}
+
+/****************************************************************************/
+
+/*!
+ \qmlclass PathLine QDeclarativePathLine
+ \since 4.7
+ \brief The PathLine defines a straight line.
+
+ The example below creates a path consisting of a straight line from
+ 0,100 to 200,100:
+
+ \qml
+ Path {
+ startX: 0; startY: 100
+ PathLine { x: 200; y: 100 }
+ }
+ \endqml
+
+ \sa Path, PathQuad, PathCubic
+*/
+
+/*!
+ \internal
+ \class QDeclarativePathLine
+ \ingroup group_utility
+ \brief The QDeclarativePathLine class defines a straight line.
+
+ \sa QDeclarativePath
+*/
+
+/*!
+ \qmlproperty real PathLine::x
+ \qmlproperty real PathLine::y
+
+ Defines the end point of the line.
+*/
+
+void QDeclarativePathLine::addToPath(QPainterPath &path)
+{
+ path.lineTo(x(), y());
+}
+
+/****************************************************************************/
+
+/*!
+ \qmlclass PathQuad QDeclarativePathQuad
+ \since 4.7
+ \brief The PathQuad defines a quadratic Bezier curve with a control point.
+
+ The following QML produces the path shown below:
+ \table
+ \row
+ \o \image declarative-pathquad.png
+ \o
+ \qml
+ Path {
+ startX: 0; startY: 0
+ PathQuad x: 200; y: 0; controlX: 100; controlY: 150 }
+ }
+ \endqml
+ \endtable
+
+ \sa Path, PathCubic, PathLine
+*/
+
+/*!
+ \internal
+ \class QDeclarativePathQuad
+ \ingroup group_utility
+ \brief The QDeclarativePathQuad class defines a quadratic Bezier curve with a control point.
+
+ \sa QDeclarativePath
+*/
+
+
+/*!
+ \qmlproperty real PathQuad::x
+ \qmlproperty real PathQuad::y
+
+ Defines the end point of the curve.
+*/
+
+/*!
+ \qmlproperty real PathQuad::controlX
+ \qmlproperty real PathQuad::controlY
+
+ Defines the position of the control point.
+*/
+
+/*!
+ the x position of the control point.
+*/
+qreal QDeclarativePathQuad::controlX() const
+{
+ return _controlX;
+}
+
+void QDeclarativePathQuad::setControlX(qreal x)
+{
+ if (_controlX != x) {
+ _controlX = x;
+ emit changed();
+ }
+}
+
+
+/*!
+ the y position of the control point.
+*/
+qreal QDeclarativePathQuad::controlY() const
+{
+ return _controlY;
+}
+
+void QDeclarativePathQuad::setControlY(qreal y)
+{
+ if (_controlY != y) {
+ _controlY = y;
+ emit changed();
+ }
+}
+
+void QDeclarativePathQuad::addToPath(QPainterPath &path)
+{
+ path.quadTo(controlX(), controlY(), x(), y());
+}
+
+/****************************************************************************/
+
+/*!
+ \qmlclass PathCubic QDeclarativePathCubic
+ \since 4.7
+ \brief The PathCubic defines a cubic Bezier curve with two control points.
+
+ The following QML produces the path shown below:
+ \table
+ \row
+ \o \image declarative-pathcubic.png
+ \o
+ \qml
+ Path {
+ startX: 20; startY: 0
+ PathCubic {
+ x: 180; y: 0; control1X: -10; control1Y: 90
+ control2X: 210; control2Y: 90
+ }
+ }
+ \endqml
+ \endtable
+
+ \sa Path, PathQuad, PathLine
+*/
+
+/*!
+ \internal
+ \class QDeclarativePathCubic
+ \ingroup group_utility
+ \brief The QDeclarativePathCubic class defines a cubic Bezier curve with two control points.
+
+ \sa QDeclarativePath
+*/
+
+/*!
+ \qmlproperty real PathCubic::x
+ \qmlproperty real PathCubic::y
+
+ Defines the end point of the curve.
+*/
+
+/*!
+ \qmlproperty real PathCubic::control1X
+ \qmlproperty real PathCubic::control1Y
+
+ Defines the position of the first control point.
+*/
+qreal QDeclarativePathCubic::control1X() const
+{
+ return _control1X;
+}
+
+void QDeclarativePathCubic::setControl1X(qreal x)
+{
+ if (_control1X != x) {
+ _control1X = x;
+ emit changed();
+ }
+}
+
+qreal QDeclarativePathCubic::control1Y() const
+{
+ return _control1Y;
+}
+
+void QDeclarativePathCubic::setControl1Y(qreal y)
+{
+ if (_control1Y != y) {
+ _control1Y = y;
+ emit changed();
+ }
+}
+
+/*!
+ \qmlproperty real PathCubic::control2X
+ \qmlproperty real PathCubic::control2Y
+
+ Defines the position of the second control point.
+*/
+qreal QDeclarativePathCubic::control2X() const
+{
+ return _control2X;
+}
+
+void QDeclarativePathCubic::setControl2X(qreal x)
+{
+ if (_control2X != x) {
+ _control2X = x;
+ emit changed();
+ }
+}
+
+qreal QDeclarativePathCubic::control2Y() const
+{
+ return _control2Y;
+}
+
+void QDeclarativePathCubic::setControl2Y(qreal y)
+{
+ if (_control2Y != y) {
+ _control2Y = y;
+ emit changed();
+ }
+}
+
+void QDeclarativePathCubic::addToPath(QPainterPath &path)
+{
+ path.cubicTo(control1X(), control1Y(), control2X(), control2Y(), x(), y());
+}
+
+/****************************************************************************/
+
+/*!
+ \qmlclass PathPercent QDeclarativePathPercent
+ \since 4.7
+ \brief The PathPercent manipulates the way a path is interpreted.
+
+ The examples below show the normal distrubution of items along a path
+ compared to a distribution which places 50% of the items along the
+ PathLine section of the path.
+ \table
+ \row
+ \o \image declarative-nopercent.png
+ \o
+ \qml
+ Path {
+ startX: 20; startY: 0
+ PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 }
+ PathLine { x: 150; y: 80 }
+ PathQuad { x: 180; y: 0; controlX: 200; controlY: 80 }
+ }
+ \endqml
+ \row
+ \o \image declarative-percent.png
+ \o
+ \qml
+ Path {
+ startX: 20; startY: 0
+ PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 }
+ PathPercent { value: 0.25 }
+ PathLine { x: 150; y: 80 }
+ PathPercent { value: 0.75 }
+ PathQuad { x: 180; y: 0; controlX: 200; controlY: 80 }
+ PathPercent { value: 1 }
+ }
+ \endqml
+ \endtable
+
+ \sa Path
+*/
+
+/*!
+ \internal
+ \class QDeclarativePathPercent
+ \ingroup group_utility
+ \brief The QDeclarativePathPercent class manipulates the way a path is interpreted.
+
+ QDeclarativePathPercent allows you to bunch up items (or spread out items) along various
+ segments of a QDeclarativePathView's path.
+
+ \sa QDeclarativePath
+
+*/
+
+qreal QDeclarativePathPercent::value() const
+{
+ return _value;
+}
+
+void QDeclarativePathPercent::setValue(qreal value)
+{
+ _value = value;
+}
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativepath_p.h b/src/declarative/graphicsitems/qdeclarativepath_p.h
new file mode 100644
index 0000000000..d7cfca14ac
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativepath_p.h
@@ -0,0 +1,267 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEPATH_H
+#define QDECLARATIVEPATH_H
+
+#include "qdeclarativeitem.h"
+
+#include <qdeclarative.h>
+
+#include <QtCore/QObject>
+#include <QtGui/QPainterPath>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+class Q_DECLARATIVE_EXPORT QDeclarativePathElement : public QObject
+{
+ Q_OBJECT
+public:
+ QDeclarativePathElement(QObject *parent=0) : QObject(parent) {}
+Q_SIGNALS:
+ void changed();
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativePathAttribute : public QDeclarativePathElement
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
+ Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY changed)
+public:
+ QDeclarativePathAttribute(QObject *parent=0) : QDeclarativePathElement(parent), _value(0) {}
+
+
+ QString name() const;
+ void setName(const QString &name);
+
+ qreal value() const;
+ void setValue(qreal value);
+
+Q_SIGNALS:
+ void nameChanged();
+
+private:
+ QString _name;
+ qreal _value;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeCurve : public QDeclarativePathElement
+{
+ Q_OBJECT
+
+ Q_PROPERTY(qreal x READ x WRITE setX NOTIFY changed)
+ Q_PROPERTY(qreal y READ y WRITE setY NOTIFY changed)
+public:
+ QDeclarativeCurve(QObject *parent=0) : QDeclarativePathElement(parent), _x(0), _y(0) {}
+
+ qreal x() const;
+ void setX(qreal x);
+
+ qreal y() const;
+ void setY(qreal y);
+
+ virtual void addToPath(QPainterPath &) {}
+
+private:
+ qreal _x;
+ qreal _y;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativePathLine : public QDeclarativeCurve
+{
+ Q_OBJECT
+public:
+ QDeclarativePathLine(QObject *parent=0) : QDeclarativeCurve(parent) {}
+
+ void addToPath(QPainterPath &path);
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativePathQuad : public QDeclarativeCurve
+{
+ Q_OBJECT
+
+ Q_PROPERTY(qreal controlX READ controlX WRITE setControlX NOTIFY changed)
+ Q_PROPERTY(qreal controlY READ controlY WRITE setControlY NOTIFY changed)
+public:
+ QDeclarativePathQuad(QObject *parent=0) : QDeclarativeCurve(parent), _controlX(0), _controlY(0) {}
+
+ qreal controlX() const;
+ void setControlX(qreal x);
+
+ qreal controlY() const;
+ void setControlY(qreal y);
+
+ void addToPath(QPainterPath &path);
+
+private:
+ qreal _controlX;
+ qreal _controlY;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativePathCubic : public QDeclarativeCurve
+{
+ Q_OBJECT
+
+ Q_PROPERTY(qreal control1X READ control1X WRITE setControl1X NOTIFY changed)
+ Q_PROPERTY(qreal control1Y READ control1Y WRITE setControl1Y NOTIFY changed)
+ Q_PROPERTY(qreal control2X READ control2X WRITE setControl2X NOTIFY changed)
+ Q_PROPERTY(qreal control2Y READ control2Y WRITE setControl2Y NOTIFY changed)
+public:
+ QDeclarativePathCubic(QObject *parent=0) : QDeclarativeCurve(parent), _control1X(0), _control1Y(0), _control2X(0), _control2Y(0) {}
+
+ qreal control1X() const;
+ void setControl1X(qreal x);
+
+ qreal control1Y() const;
+ void setControl1Y(qreal y);
+
+ qreal control2X() const;
+ void setControl2X(qreal x);
+
+ qreal control2Y() const;
+ void setControl2Y(qreal y);
+
+ void addToPath(QPainterPath &path);
+
+private:
+ int _control1X;
+ int _control1Y;
+ int _control2X;
+ int _control2Y;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativePathPercent : public QDeclarativePathElement
+{
+ Q_OBJECT
+ Q_PROPERTY(qreal value READ value WRITE setValue)
+public:
+ QDeclarativePathPercent(QObject *parent=0) : QDeclarativePathElement(parent) {}
+
+ qreal value() const;
+ void setValue(qreal value);
+
+private:
+ qreal _value;
+};
+
+class QDeclarativePathPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativePath : public QObject, public QDeclarativeParserStatus
+{
+ Q_OBJECT
+
+ Q_INTERFACES(QDeclarativeParserStatus)
+ Q_PROPERTY(QDeclarativeListProperty<QDeclarativePathElement> pathElements READ pathElements)
+ Q_PROPERTY(qreal startX READ startX WRITE setStartX NOTIFY startXChanged)
+ Q_PROPERTY(qreal startY READ startY WRITE setStartY NOTIFY startYChanged)
+ Q_PROPERTY(bool closed READ isClosed NOTIFY changed)
+ Q_CLASSINFO("DefaultProperty", "pathElements")
+ Q_INTERFACES(QDeclarativeParserStatus)
+public:
+ QDeclarativePath(QObject *parent=0);
+ ~QDeclarativePath();
+
+ QDeclarativeListProperty<QDeclarativePathElement> pathElements();
+
+ qreal startX() const;
+ void setStartX(qreal x);
+
+ qreal startY() const;
+ void setStartY(qreal y);
+
+ bool isClosed() const;
+
+ QPainterPath path() const;
+ QStringList attributes() const;
+ qreal attributeAt(const QString &, qreal) const;
+ QPointF pointAt(qreal) const;
+
+Q_SIGNALS:
+ void changed();
+ void startXChanged();
+ void startYChanged();
+
+protected:
+ virtual void componentComplete();
+
+private Q_SLOTS:
+ void processPath();
+
+private:
+ struct AttributePoint {
+ AttributePoint() : percent(0), scale(1), origpercent(0) {}
+ AttributePoint(const AttributePoint &other)
+ : percent(other.percent), scale(other.scale), origpercent(other.origpercent), values(other.values) {}
+ AttributePoint &operator=(const AttributePoint &other) {
+ percent = other.percent; scale = other.scale; origpercent = other.origpercent; values = other.values; return *this;
+ }
+ qreal percent; //massaged percent along the painter path
+ qreal scale;
+ qreal origpercent; //'real' percent along the painter path
+ QHash<QString, qreal> values;
+ };
+
+ void interpolate(int idx, const QString &name, qreal value);
+ void endpoint(const QString &name);
+ void createPointCache() const;
+
+private:
+ Q_DISABLE_COPY(QDeclarativePath)
+ Q_DECLARE_PRIVATE(QDeclarativePath)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativePathElement)
+QML_DECLARE_TYPE(QDeclarativePathAttribute)
+QML_DECLARE_TYPE(QDeclarativeCurve)
+QML_DECLARE_TYPE(QDeclarativePathLine)
+QML_DECLARE_TYPE(QDeclarativePathQuad)
+QML_DECLARE_TYPE(QDeclarativePathCubic)
+QML_DECLARE_TYPE(QDeclarativePathPercent)
+QML_DECLARE_TYPE(QDeclarativePath)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEPATH_H
diff --git a/src/declarative/graphicsitems/qdeclarativepath_p_p.h b/src/declarative/graphicsitems/qdeclarativepath_p_p.h
new file mode 100644
index 0000000000..fb63867286
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativepath_p_p.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEPATH_P_H
+#define QDECLARATIVEPATH_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativepath_p.h"
+
+#include <qdeclarative.h>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+class QDeclarativePathPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativePath)
+
+public:
+ QDeclarativePathPrivate() : startX(0), startY(0), closed(false) { }
+
+ QPainterPath _path;
+ QList<QDeclarativePathElement*> _pathElements;
+ mutable QVector<QPointF> _pointCache;
+ QList<QDeclarativePath::AttributePoint> _attributePoints;
+ QStringList _attributes;
+ int startX;
+ int startY;
+ bool closed;
+};
+
+QT_END_NAMESPACE
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
new file mode 100644
index 0000000000..cc171572ed
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -0,0 +1,1065 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativepathview_p.h"
+#include "qdeclarativepathview_p_p.h"
+
+#include <qdeclarativestate_p.h>
+#include <qdeclarativeopenmetaobject_p.h>
+#include <QDebug>
+#include <QEvent>
+#include <qlistmodelinterface_p.h>
+#include <QGraphicsSceneEvent>
+
+#include <math.h>
+
+QT_BEGIN_NAMESPACE
+
+inline qreal qmlMod(qreal x, qreal y)
+{
+#ifdef QT_USE_MATH_H_FLOATS
+ if(sizeof(qreal) == sizeof(float))
+ return fmodf(float(x), float(y));
+ else
+#endif
+ return fmod(x, y);
+}
+
+static QDeclarativeOpenMetaObjectType *qPathViewAttachedType = 0;
+
+QDeclarativePathViewAttached::QDeclarativePathViewAttached(QObject *parent)
+: QObject(parent), m_view(0), m_onPath(false), m_isCurrent(false)
+{
+ if (qPathViewAttachedType) {
+ m_metaobject = new QDeclarativeOpenMetaObject(this, qPathViewAttachedType);
+ m_metaobject->setCached(true);
+ } else {
+ m_metaobject = new QDeclarativeOpenMetaObject(this);
+ }
+}
+
+QDeclarativePathViewAttached::~QDeclarativePathViewAttached()
+{
+}
+
+QVariant QDeclarativePathViewAttached::value(const QByteArray &name) const
+{
+ return m_metaobject->value(name);
+}
+void QDeclarativePathViewAttached::setValue(const QByteArray &name, const QVariant &val)
+{
+ m_metaobject->setValue(name, val);
+}
+
+QDeclarativeItem *QDeclarativePathViewPrivate::getItem(int modelIndex)
+{
+ Q_Q(QDeclarativePathView);
+ requestedIndex = modelIndex;
+ QDeclarativeItem *item = model->item(modelIndex, false);
+ if (item) {
+ if (!attType) {
+ // pre-create one metatype to share with all attached objects
+ attType = new QDeclarativeOpenMetaObjectType(&QDeclarativePathViewAttached::staticMetaObject, qmlEngine(q));
+ foreach(const QString &attr, path->attributes()) {
+ attType->createProperty(attr.toUtf8());
+ }
+ }
+ qPathViewAttachedType = attType;
+ QDeclarativePathViewAttached *att = static_cast<QDeclarativePathViewAttached *>(qmlAttachedPropertiesObject<QDeclarativePathView>(item));
+ qPathViewAttachedType = 0;
+ if (att) {
+ att->m_view = q;
+ att->setOnPath(true);
+ }
+ item->setParentItem(q);
+ }
+ requestedIndex = -1;
+ return item;
+}
+
+void QDeclarativePathViewPrivate::releaseItem(QDeclarativeItem *item)
+{
+ if (!item || !model)
+ return;
+ if (QDeclarativePathViewAttached *att = attached(item))
+ att->setOnPath(false);
+ model->release(item);
+}
+
+QDeclarativePathViewAttached *QDeclarativePathViewPrivate::attached(QDeclarativeItem *item)
+{
+ return static_cast<QDeclarativePathViewAttached *>(qmlAttachedPropertiesObject<QDeclarativePathView>(item, false));
+}
+
+void QDeclarativePathViewPrivate::clear()
+{
+ for (int i=0; i<items.count(); i++){
+ QDeclarativeItem *p = items[i];
+ releaseItem(p);
+ }
+ items.clear();
+}
+
+
+/*!
+ \qmlclass PathView QDeclarativePathView
+ \since 4.7
+ \brief The PathView element lays out model-provided items on a path.
+ \inherits Item
+
+ The model is typically provided by a QAbstractListModel "C++ model object", but can also be created directly in QML.
+
+ The items are laid out along a path defined by a \l Path and may be flicked to scroll.
+
+ \snippet doc/src/snippets/declarative/pathview/pathview.qml 0
+
+ \image pathview.gif
+
+ Note that 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.
+
+ \sa Path
+*/
+
+QDeclarativePathView::QDeclarativePathView(QDeclarativeItem *parent)
+ : QDeclarativeItem(*(new QDeclarativePathViewPrivate), parent)
+{
+ Q_D(QDeclarativePathView);
+ d->init();
+}
+
+QDeclarativePathView::~QDeclarativePathView()
+{
+ Q_D(QDeclarativePathView);
+ d->clear();
+ if (d->attType)
+ d->attType->release();
+ if (d->ownModel)
+ delete d->model;
+}
+
+/*!
+ \qmlattachedproperty bool PathView::onPath
+ This attached property holds whether the item is currently on the path.
+
+ If a pathItemCount has been set, it is possible that some items may
+ be instantiated, but not considered to be currently on the path.
+ Usually, these items would be set invisible, for example:
+
+ \code
+ Component {
+ Rectangle {
+ visible: PathView.onPath
+ ...
+ }
+ }
+ \endcode
+
+ It is attached to each instance of the delegate.
+*/
+
+/*!
+ \qmlattachedproperty bool PathView::isCurrentItem
+ This attached property is true if this delegate is the current item; otherwise false.
+
+ It is attached to each instance of the delegate.
+
+ This property may be used to adjust the appearance of the current item.
+*/
+
+/*!
+ \qmlproperty model PathView::model
+ This property holds the model providing data for the view.
+
+ The model provides a set of data that is used to create the items for the view.
+ For large or dynamic datasets the model is usually provided by a C++ model object.
+ Models can also be created directly in XML, using the ListModel element.
+
+ \sa {qmlmodels}{Data Models}
+*/
+QVariant QDeclarativePathView::model() const
+{
+ Q_D(const QDeclarativePathView);
+ return d->modelVariant;
+}
+
+void QDeclarativePathView::setModel(const QVariant &model)
+{
+ Q_D(QDeclarativePathView);
+ if (d->modelVariant == model)
+ return;
+
+ if (d->model) {
+ disconnect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
+ disconnect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
+ disconnect(d->model, SIGNAL(modelReset()), this, SLOT(modelReset()));
+ disconnect(d->model, SIGNAL(createdItem(int, QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
+ for (int i=0; i<d->items.count(); i++){
+ QDeclarativeItem *p = d->items[i];
+ d->model->release(p);
+ }
+ d->items.clear();
+ }
+
+ d->modelVariant = model;
+ QObject *object = qvariant_cast<QObject*>(model);
+ QDeclarativeVisualModel *vim = 0;
+ if (object && (vim = qobject_cast<QDeclarativeVisualModel *>(object))) {
+ if (d->ownModel) {
+ delete d->model;
+ d->ownModel = false;
+ }
+ d->model = vim;
+ } else {
+ if (!d->ownModel) {
+ d->model = new QDeclarativeVisualDataModel(qmlContext(this));
+ d->ownModel = true;
+ }
+ if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model))
+ dataModel->setModel(model);
+ }
+ if (d->model) {
+ connect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
+ connect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
+ connect(d->model, SIGNAL(modelReset()), this, SLOT(modelReset()));
+ connect(d->model, SIGNAL(createdItem(int, QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
+ }
+ d->firstIndex = 0;
+ d->pathOffset = 0;
+ d->regenerate();
+ d->fixOffset();
+ emit modelChanged();
+}
+
+/*!
+ \qmlproperty int PathView::count
+ This property holds the number of items in the model.
+*/
+int QDeclarativePathView::count() const
+{
+ Q_D(const QDeclarativePathView);
+ return d->model ? d->model->count() : 0;
+}
+
+/*!
+ \qmlproperty Path PathView::path
+ \default
+ This property holds the path used to lay out the items.
+ For more information see the \l Path documentation.
+*/
+QDeclarativePath *QDeclarativePathView::path() const
+{
+ Q_D(const QDeclarativePathView);
+ return d->path;
+}
+
+void QDeclarativePathView::setPath(QDeclarativePath *path)
+{
+ Q_D(QDeclarativePathView);
+ if (d->path == path)
+ return;
+ if (d->path)
+ disconnect(d->path, SIGNAL(changed()), this, SLOT(refill()));
+ d->path = path;
+ connect(d->path, SIGNAL(changed()), this, SLOT(refill()));
+ d->clear();
+ if (d->attType) {
+ d->attType->release();
+ d->attType = 0;
+ }
+ d->regenerate();
+ emit pathChanged();
+}
+
+/*!
+ \qmlproperty int PathView::currentIndex
+ This property holds the index of the current item.
+*/
+int QDeclarativePathView::currentIndex() const
+{
+ Q_D(const QDeclarativePathView);
+ return d->currentIndex;
+}
+
+void QDeclarativePathView::setCurrentIndex(int idx)
+{
+ Q_D(QDeclarativePathView);
+ if (d->model && d->model->count())
+ idx = qAbs(idx % d->model->count());
+ if (d->model && idx != d->currentIndex) {
+ if (d->model->count()) {
+ int itemIndex = (d->currentIndex - d->firstIndex + d->model->count()) % d->model->count();
+ if (itemIndex < d->items.count()) {
+ if (QDeclarativeItem *item = d->items.at(d->currentIndex)) {
+ if (QDeclarativePathViewAttached *att = d->attached(item))
+ att->setIsCurrentItem(false);
+ }
+ }
+ }
+ d->currentIndex = idx;
+ if (d->model->count()) {
+ d->snapToCurrent();
+ int itemIndex = (idx - d->firstIndex + d->model->count()) % d->model->count();
+ if (itemIndex < d->items.count()) {
+ QDeclarativeItem *item = d->items.at(itemIndex);
+ item->setFocus(true);
+ if (QDeclarativePathViewAttached *att = d->attached(item))
+ att->setIsCurrentItem(true);
+ }
+ }
+ emit currentIndexChanged();
+ }
+}
+
+/*!
+ \qmlproperty real PathView::offset
+
+ The offset specifies how far along the path the items are from their initial positions.
+*/
+qreal QDeclarativePathView::offset() const
+{
+ Q_D(const QDeclarativePathView);
+ return d->_offset;
+}
+
+void QDeclarativePathView::setOffset(qreal offset)
+{
+ Q_D(QDeclarativePathView);
+ d->setOffset(offset);
+ d->updateCurrent();
+}
+
+void QDeclarativePathViewPrivate::setOffset(qreal o)
+{
+ Q_Q(QDeclarativePathView);
+ if (_offset != o) {
+ _offset = qmlMod(o, qreal(100.0));
+ if (_offset < 0)
+ _offset = 100.0 + _offset;
+ q->refill();
+ }
+}
+
+/*!
+ \qmlproperty real PathView::snapPosition
+
+ This property determines the position (0.0-1.0) the nearest item will snap to.
+*/
+qreal QDeclarativePathView::snapPosition() const
+{
+ Q_D(const QDeclarativePathView);
+ return d->snapPos;
+}
+
+void QDeclarativePathView::setSnapPosition(qreal pos)
+{
+ Q_D(QDeclarativePathView);
+ qreal normalizedPos = pos - int(pos);
+ if (qFuzzyCompare(normalizedPos, d->snapPos))
+ return;
+ d->snapPos = normalizedPos;
+ d->fixOffset();
+ emit snapPositionChanged();
+}
+
+/*!
+ \qmlproperty real PathView::dragMargin
+ This property holds the maximum distance from the path that initiate mouse dragging.
+
+ By default the path can only be dragged by clicking on an item. If
+ dragMargin is greater than zero, a drag can be initiated by clicking
+ within dragMargin pixels of the path.
+*/
+qreal QDeclarativePathView::dragMargin() const
+{
+ Q_D(const QDeclarativePathView);
+ return d->dragMargin;
+}
+
+void QDeclarativePathView::setDragMargin(qreal dragMargin)
+{
+ Q_D(QDeclarativePathView);
+ if (d->dragMargin == dragMargin)
+ return;
+ d->dragMargin = dragMargin;
+ emit dragMarginChanged();
+}
+
+/*!
+ \qmlproperty component PathView::delegate
+
+ The delegate provides a template defining each item instantiated by the view.
+ The index is exposed as an accessible \c index property. Properties of the
+ model are also available depending upon the type of \l {qmlmodels}{Data Model}.
+
+ Note that the PathView will layout the items based on the size of the root
+ item in the delegate.
+
+ Here is an example delegate:
+ \snippet doc/src/snippets/declarative/pathview/pathview.qml 1
+*/
+QDeclarativeComponent *QDeclarativePathView::delegate() const
+{
+ Q_D(const QDeclarativePathView);
+ if (d->model) {
+ if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model))
+ return dataModel->delegate();
+ }
+
+ return 0;
+}
+
+void QDeclarativePathView::setDelegate(QDeclarativeComponent *delegate)
+{
+ Q_D(QDeclarativePathView);
+ if (delegate == this->delegate())
+ return;
+ if (!d->ownModel) {
+ d->model = new QDeclarativeVisualDataModel(qmlContext(this));
+ d->ownModel = true;
+ }
+ if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model)) {
+ dataModel->setDelegate(delegate);
+ d->regenerate();
+ emit delegateChanged();
+ }
+}
+
+/*!
+ \qmlproperty int PathView::pathItemCount
+ This property holds the number of items visible on the path at any one time
+*/
+int QDeclarativePathView::pathItemCount() const
+{
+ Q_D(const QDeclarativePathView);
+ return d->pathItems;
+}
+
+void QDeclarativePathView::setPathItemCount(int i)
+{
+ Q_D(QDeclarativePathView);
+ if (i == d->pathItems)
+ return;
+ d->pathItems = i;
+ d->regenerate();
+ pathItemCountChanged();
+}
+
+QPointF QDeclarativePathViewPrivate::pointNear(const QPointF &point, qreal *nearPercent) const
+{
+ //XXX maybe do recursively at increasing resolution.
+ qreal mindist = 1e10; // big number
+ QPointF nearPoint = path->pointAt(0);
+ qreal nearPc = 0;
+ for (qreal i=1; i < 1000; i++) {
+ QPointF pt = path->pointAt(i/1000.0);
+ QPointF diff = pt - point;
+ qreal dist = diff.x()*diff.x() + diff.y()*diff.y();
+ if (dist < mindist) {
+ nearPoint = pt;
+ nearPc = i;
+ mindist = dist;
+ }
+ }
+
+ if (nearPercent)
+ *nearPercent = nearPc / 10.0;
+
+ return nearPoint;
+}
+
+
+void QDeclarativePathView::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativePathView);
+ if (!d->items.count())
+ return;
+ QPointF scenePoint = mapToScene(event->pos());
+ int idx = 0;
+ for (; idx < d->items.count(); ++idx) {
+ QRectF rect = d->items.at(idx)->boundingRect();
+ rect = d->items.at(idx)->mapToScene(rect).boundingRect();
+ if (rect.contains(scenePoint))
+ break;
+ }
+ if (idx == d->items.count() && d->dragMargin == 0.) // didn't click on an item
+ return;
+
+ d->startPoint = d->pointNear(event->pos(), &d->startPc);
+ if (idx == d->items.count()) {
+ qreal distance = qAbs(event->pos().x() - d->startPoint.x()) + qAbs(event->pos().y() - d->startPoint.y());
+ if (distance > d->dragMargin)
+ return;
+ }
+
+ d->stealMouse = false;
+ d->lastElapsed = 0;
+ d->lastDist = 0;
+ QDeclarativeItemPrivate::start(d->lastPosTime);
+ d->tl.clear();
+}
+
+void QDeclarativePathView::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativePathView);
+ if (d->lastPosTime.isNull())
+ return;
+
+ if (!d->stealMouse) {
+ QPointF delta = event->pos() - d->startPoint;
+ if (qAbs(delta.x()) > QApplication::startDragDistance() && qAbs(delta.y()) > QApplication::startDragDistance())
+ d->stealMouse = true;
+ }
+
+ if (d->stealMouse) {
+ d->moveReason = QDeclarativePathViewPrivate::Mouse;
+ qreal newPc;
+ d->pointNear(event->pos(), &newPc);
+ qreal diff = newPc - d->startPc;
+ if (diff) {
+ setOffset(d->_offset + diff);
+
+ if (diff > 50)
+ diff -= 100;
+ else if (diff < -50)
+ diff += 100;
+
+ d->lastElapsed = QDeclarativeItemPrivate::restart(d->lastPosTime);
+ d->lastDist = diff;
+ d->startPc = newPc;
+ }
+ }
+}
+
+void QDeclarativePathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *)
+{
+ Q_D(QDeclarativePathView);
+ if (d->lastPosTime.isNull())
+ return;
+
+ qreal elapsed = qreal(d->lastElapsed + QDeclarativeItemPrivate::elapsed(d->lastPosTime)) / 1000.;
+ qreal velocity = elapsed > 0. ? d->lastDist / elapsed : 0;
+ if (d->model && d->model->count() && qAbs(velocity) > 5) {
+ if (velocity > 100)
+ velocity = 100;
+ else if (velocity < -100)
+ velocity = -100;
+ qreal inc = qmlMod(d->_offset - d->snapPos, qreal(100.0 / d->model->count()));
+ qreal dist = qAbs(velocity/2 - qmlMod(velocity/2, qreal(100.0 / d->model->count()) - inc));
+ d->moveOffset.setValue(d->_offset);
+ d->tl.accel(d->moveOffset, velocity, 10, dist);
+ d->tl.callback(QDeclarativeTimeLineCallback(&d->moveOffset, d->fixOffsetCallback, d));
+ } else {
+ d->fixOffset();
+ }
+
+ d->lastPosTime = QTime();
+ d->stealMouse = false;
+ ungrabMouse();
+}
+
+bool QDeclarativePathView::sendMouseEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativePathView);
+ QGraphicsSceneMouseEvent mouseEvent(event->type());
+ QRectF myRect = mapToScene(QRectF(0, 0, width(), height())).boundingRect();
+ QGraphicsScene *s = scene();
+ QDeclarativeItem *grabber = s ? qobject_cast<QDeclarativeItem*>(s->mouseGrabberItem()) : 0;
+ if ((d->stealMouse || myRect.contains(event->scenePos().toPoint())) && (!grabber || !grabber->keepMouseGrab())) {
+ mouseEvent.setAccepted(false);
+ for (int i = 0x1; i <= 0x10; i <<= 1) {
+ if (event->buttons() & i) {
+ Qt::MouseButton button = Qt::MouseButton(i);
+ mouseEvent.setButtonDownPos(button, mapFromScene(event->buttonDownPos(button)));
+ }
+ }
+ mouseEvent.setScenePos(event->scenePos());
+ mouseEvent.setLastScenePos(event->lastScenePos());
+ mouseEvent.setPos(mapFromScene(event->scenePos()));
+ mouseEvent.setLastPos(mapFromScene(event->lastScenePos()));
+
+ switch(mouseEvent.type()) {
+ case QEvent::GraphicsSceneMouseMove:
+ mouseMoveEvent(&mouseEvent);
+ break;
+ case QEvent::GraphicsSceneMousePress:
+ mousePressEvent(&mouseEvent);
+ break;
+ case QEvent::GraphicsSceneMouseRelease:
+ mouseReleaseEvent(&mouseEvent);
+ break;
+ default:
+ break;
+ }
+ grabber = qobject_cast<QDeclarativeItem*>(s->mouseGrabberItem());
+ if (grabber && d->stealMouse && !grabber->keepMouseGrab() && grabber != this)
+ grabMouse();
+
+ return d->stealMouse;
+ } else if (!d->lastPosTime.isNull()) {
+ d->lastPosTime = QTime();
+ }
+ return false;
+}
+
+bool QDeclarativePathView::sceneEventFilter(QGraphicsItem *i, QEvent *e)
+{
+ if (!isVisible())
+ return QDeclarativeItem::sceneEventFilter(i, e);
+
+ switch (e->type()) {
+ case QEvent::GraphicsSceneMousePress:
+ case QEvent::GraphicsSceneMouseMove:
+ case QEvent::GraphicsSceneMouseRelease:
+ {
+ bool ret = sendMouseEvent(static_cast<QGraphicsSceneMouseEvent *>(e));
+ if (e->type() == QEvent::GraphicsSceneMouseRelease)
+ return ret;
+ break;
+ }
+ default:
+ break;
+ }
+
+ return QDeclarativeItem::sceneEventFilter(i, e);
+}
+
+void QDeclarativePathView::componentComplete()
+{
+ Q_D(QDeclarativePathView);
+ QDeclarativeItem::componentComplete();
+ d->regenerate();
+
+ // move to correct offset
+ if (d->items.count()) {
+ int itemIndex = (d->currentIndex - d->firstIndex + d->model->count()) % d->model->count();
+
+ itemIndex += d->pathOffset;
+ itemIndex %= d->items.count();
+ qreal targetOffset = qmlMod(100 + (d->snapPos*100) - 100.0 * itemIndex / d->items.count(), qreal(100.0));
+
+ if (targetOffset < 0)
+ targetOffset = 100.0 + targetOffset;
+ if (targetOffset != d->_offset) {
+ d->moveOffset.setValue(targetOffset);
+ }
+ }
+}
+
+void QDeclarativePathViewPrivate::regenerate()
+{
+ Q_Q(QDeclarativePathView);
+ if (!q->isComponentComplete())
+ return;
+
+ clear();
+
+ if (!isValid())
+ return;
+
+ if (firstIndex >= model->count())
+ firstIndex = model->count()-1;
+ if (pathOffset >= model->count())
+ pathOffset = model->count()-1;
+
+ int numItems = pathItems >= 0 ? pathItems : model->count();
+ for (int i=0; i < numItems && i < model->count(); ++i){
+ int index = (i + firstIndex) % model->count();
+ QDeclarativeItem *item = getItem(index);
+ if (!item) {
+ qWarning() << "PathView: Cannot create item, index" << (i + firstIndex) % model->count();
+ return;
+ }
+ items.append(item);
+ item->setZValue(i);
+ qreal percent = i * (100. / numItems) + _offset;
+ percent = qAbs(qmlMod(percent, qreal(100.0))/100.0);
+ updateItem(item, percent);
+ model->completeItem();
+ if (currentIndex == index) {
+ item->setFocus(true);
+ if (QDeclarativePathViewAttached *att = attached(item))
+ att->setIsCurrentItem(true);
+ }
+ }
+ if (pathItems != -1)
+ q->refill();
+}
+
+void QDeclarativePathViewPrivate::updateItem(QDeclarativeItem *item, qreal percent)
+{
+ if (QDeclarativePathViewAttached *att = attached(item)) {
+ foreach(const QString &attr, path->attributes())
+ att->setValue(attr.toUtf8(), path->attributeAt(attr, percent));
+ }
+ QPointF pf = path->pointAt(percent);
+ item->setX(pf.x() - item->width()*item->scale()/2);
+ item->setY(pf.y() - item->height()*item->scale()/2);
+}
+
+void QDeclarativePathView::refill()
+{
+ Q_D(QDeclarativePathView);
+ if (!d->isValid() || !isComponentComplete())
+ return;
+
+ QList<qreal> positions;
+ for (int i=0; i<d->items.count(); i++){
+ qreal percent = i * (100. / d->items.count());
+ percent = percent + d->_offset;
+ percent = qmlMod(percent, qreal(100.0));
+ positions << qAbs(percent/100.0);
+ }
+
+ if (d->pathItems==-1) {
+ for (int i=0; i<positions.count(); i++)
+ d->updateItem(d->items.at(i), positions[i]);
+ return;
+ }
+
+ QList<qreal> rotatedPositions;
+ for (int i=0; i<d->items.count(); i++)
+ rotatedPositions << positions[(i + d->pathOffset + d->items.count()) % d->items.count()];
+
+ int wrapIndex= -1;
+ for (int i=0; i<d->items.count()-1; i++) {
+ if (rotatedPositions[i] > rotatedPositions[i+1]){
+ wrapIndex = i;
+ break;
+ }
+ }
+ if (wrapIndex != -1 ){
+ //A wraparound has occured
+ if (wrapIndex < d->items.count()/2){
+ while(wrapIndex-- >= 0){
+ QDeclarativeItem* p = d->items.takeFirst();
+ d->updateItem(p, 0.0);
+ d->releaseItem(p);
+ d->firstIndex++;
+ d->firstIndex %= d->model->count();
+ int index = (d->firstIndex + d->items.count())%d->model->count();
+ QDeclarativeItem *item = d->getItem(index);
+ item->setZValue(wrapIndex);
+ d->model->completeItem();
+ if (d->currentIndex == index) {
+ item->setFocus(true);
+ if (QDeclarativePathViewAttached *att = d->attached(item))
+ att->setIsCurrentItem(true);
+ }
+ d->items << item;
+ d->pathOffset++;
+ d->pathOffset=d->pathOffset % d->items.count();
+ }
+ } else {
+ while(wrapIndex++ < d->items.count()-1){
+ QDeclarativeItem* p = d->items.takeLast();
+ d->updateItem(p, 1.0);
+ d->releaseItem(p);
+ d->firstIndex--;
+ if (d->firstIndex < 0)
+ d->firstIndex = d->model->count() - 1;
+ QDeclarativeItem *item = d->getItem(d->firstIndex);
+ item->setZValue(d->firstIndex);
+ d->model->completeItem();
+ if (d->currentIndex == d->firstIndex) {
+ item->setFocus(true);
+ if (QDeclarativePathViewAttached *att = d->attached(item))
+ att->setIsCurrentItem(true);
+ }
+ d->items.prepend(item);
+ d->pathOffset--;
+ if (d->pathOffset < 0)
+ d->pathOffset = d->items.count() - 1;
+ }
+ }
+ for (int i=0; i<d->items.count(); i++)
+ rotatedPositions[i] = positions[(i + d->pathOffset + d->items.count())
+ % d->items.count()];
+ }
+ for (int i=0; i<d->items.count(); i++)
+ d->updateItem(d->items.at(i), rotatedPositions[i]);
+}
+
+void QDeclarativePathView::itemsInserted(int modelIndex, int count)
+{
+ //XXX support animated insertion
+ Q_D(QDeclarativePathView);
+ if (!d->isValid() || !isComponentComplete())
+ return;
+ if (d->pathItems == -1) {
+ for (int i = 0; i < count; ++i) {
+ QDeclarativeItem *item = d->getItem(modelIndex + i);
+ item->setZValue(modelIndex + i);
+ d->model->completeItem();
+ d->items.insert(modelIndex + i, item);
+ }
+ refill();
+ } else {
+ //XXX This is pretty heavy handed until we reference count items.
+ d->regenerate();
+ }
+
+ // make sure the current item is still at the snap position
+ int itemIndex = (d->currentIndex - d->firstIndex + d->model->count())%d->model->count();
+ itemIndex += d->pathOffset;
+ itemIndex %= d->items.count();
+ qreal targetOffset = qmlMod(100 + (d->snapPos*100) - 100.0 * itemIndex / d->items.count(), qreal(100.0));
+
+ if (targetOffset < 0)
+ targetOffset = 100.0 + targetOffset;
+ if (targetOffset != d->_offset)
+ d->moveOffset.setValue(targetOffset);
+}
+
+void QDeclarativePathView::itemsRemoved(int modelIndex, int count)
+{
+ //XXX support animated removal
+ Q_D(QDeclarativePathView);
+ if (!d->isValid() || !isComponentComplete())
+ return;
+ if (d->pathItems == -1) {
+ for (int i = 0; i < count && d->items.count() > modelIndex; ++i) {
+ QDeclarativeItem* p = d->items.takeAt(modelIndex);
+ d->model->release(p);
+ }
+ d->snapToCurrent();
+ refill();
+ } else {
+ d->regenerate();
+ }
+
+ if (d->model->count() == 0) {
+ d->currentIndex = -1;
+ d->moveOffset.setValue(0);
+ return;
+ }
+
+ // make sure the current item is still at the snap position
+ if (d->currentIndex >= d->model->count())
+ d->currentIndex = d->model->count() - 1;
+ int itemIndex = (d->currentIndex - d->firstIndex + d->model->count())%d->model->count();
+ itemIndex += d->pathOffset;
+ itemIndex %= d->items.count();
+ qreal targetOffset = qmlMod(100 + (d->snapPos*100) - 100.0 * itemIndex / d->items.count(), qreal(100.0));
+
+ if (targetOffset < 0)
+ targetOffset = 100.0 + targetOffset;
+ if (targetOffset != d->_offset)
+ d->moveOffset.setValue(targetOffset);
+}
+
+void QDeclarativePathView::modelReset()
+{
+ Q_D(QDeclarativePathView);
+ d->regenerate();
+}
+
+void QDeclarativePathView::createdItem(int index, QDeclarativeItem *item)
+{
+ Q_D(QDeclarativePathView);
+ if (d->requestedIndex != index) {
+ item->setParentItem(this);
+ d->updateItem(item, index < d->firstIndex ? 0.0 : 1.0);
+ }
+}
+
+void QDeclarativePathView::destroyingItem(QDeclarativeItem *item)
+{
+ Q_UNUSED(item);
+}
+
+void QDeclarativePathView::ticked()
+{
+ Q_D(QDeclarativePathView);
+ d->updateCurrent();
+}
+
+// find the item closest to the snap position
+int QDeclarativePathViewPrivate::calcCurrentIndex()
+{
+ int current = -1;
+ if (model && items.count()) {
+ _offset = qmlMod(_offset, qreal(100.0));
+ if (_offset < 0)
+ _offset += 100.0;
+
+ if (pathItems == -1) {
+ qreal delta = qmlMod(_offset - snapPos, qreal(100.0));
+ if (delta < 0)
+ delta = 100.0 + delta;
+ int ii = model->count() - qRound(delta * model->count() / 100);
+ if (ii < 0)
+ ii = 0;
+ current = ii;
+ } else {
+ qreal bestDiff=1e9;
+ int bestI=-1;
+ for (int i=0; i<items.count(); i++){
+ qreal percent = i * (100. / items.count());
+ percent = percent + _offset;
+ percent = qmlMod(percent, qreal(100.0));
+ qreal diff = qAbs(snapPos - (percent/100.0));
+ if (diff < bestDiff){
+ bestDiff = diff;
+ bestI = i;
+ }
+ }
+ int modelIndex = (bestI - pathOffset + items.count())%items.count();
+ modelIndex += firstIndex;
+ current = modelIndex;
+ }
+ current = qAbs(current % model->count());
+ }
+
+ return current;
+}
+
+void QDeclarativePathViewPrivate::updateCurrent()
+{
+ Q_Q(QDeclarativePathView);
+ if (moveReason != Mouse)
+ return;
+ int idx = calcCurrentIndex();
+ if (model && idx != currentIndex) {
+ int itemIndex = (currentIndex - firstIndex + model->count()) % model->count();
+ if (itemIndex < items.count()) {
+ if (QDeclarativeItem *item = items.at(itemIndex)) {
+ if (QDeclarativePathViewAttached *att = attached(item))
+ att->setIsCurrentItem(false);
+ }
+ }
+ currentIndex = idx;
+ itemIndex = (idx - firstIndex + model->count()) % model->count();
+ if (itemIndex < items.count()) {
+ QDeclarativeItem *item = items.at(itemIndex);
+ item->setFocus(true);
+ if (QDeclarativePathViewAttached *att = attached(item))
+ att->setIsCurrentItem(true);
+ }
+ emit q->currentIndexChanged();
+ }
+}
+
+void QDeclarativePathViewPrivate::fixOffsetCallback(void *d)
+{
+ ((QDeclarativePathViewPrivate *)d)->fixOffset();
+}
+
+void QDeclarativePathViewPrivate::fixOffset()
+{
+ Q_Q(QDeclarativePathView);
+ if (model && items.count()) {
+ int curr = calcCurrentIndex();
+ if (curr != currentIndex)
+ q->setCurrentIndex(curr);
+ else
+ snapToCurrent();
+ }
+}
+
+void QDeclarativePathViewPrivate::snapToCurrent()
+{
+ if (!model || model->count() <= 0)
+ return;
+
+ int itemIndex = (currentIndex - firstIndex + model->count()) % model->count();
+
+ //Rounds is the number of times round to make the current item visible
+ int rounds = itemIndex / items.count();
+ int otherWayRounds = (model->count() - (itemIndex)) / items.count();
+ if (otherWayRounds < rounds)
+ rounds = -otherWayRounds;
+
+ itemIndex += pathOffset;
+ if(model->count() % items.count() && itemIndex - model->count() + items.count() > 0){
+ //When model.count() is not a multiple of pathItemCount we need to manually
+ //fix the index so that going backwards one step works correctly.
+ itemIndex = itemIndex - model->count() + items.count();
+ }
+ itemIndex %= items.count();
+ qreal targetOffset = qmlMod(100 + (snapPos*100) - 100.0 * itemIndex / items.count(), qreal(100.0));
+
+ if (targetOffset < 0)
+ targetOffset = 100.0 + targetOffset;
+ if (targetOffset == _offset && rounds == 0)
+ return;
+
+ moveReason = Other;
+ tl.clear();
+ moveOffset.setValue(_offset);
+
+ if (rounds!=0){
+ //Compensate if the targetOffset would bring the target in from off the screen
+ qreal distance = targetOffset - _offset;
+ if (distance <= -50)
+ rounds--;
+ if (distance > 50)
+ rounds++;
+ tl.move(moveOffset, targetOffset + 100.0*(-rounds), QEasingCurve(QEasingCurve::InOutQuad),
+ int(100*items.count()*qMax((qreal)(2.0/items.count()),(qreal)qAbs(rounds))));
+ tl.callback(QDeclarativeTimeLineCallback(&moveOffset, fixOffsetCallback, this));
+ return;
+ }
+
+ if (targetOffset - _offset > 50.0) {
+ qreal distance = 100 - targetOffset + _offset;
+ tl.move(moveOffset, 0.0, QEasingCurve(QEasingCurve::OutQuad), int(200 * _offset / distance));
+ tl.set(moveOffset, 100.0);
+ tl.move(moveOffset, targetOffset, QEasingCurve(QEasingCurve::InQuad), int(200 * (100-targetOffset) / distance));
+ } else if (targetOffset - _offset <= -50.0) {
+ qreal distance = 100 - _offset + targetOffset;
+ tl.move(moveOffset, 100.0, QEasingCurve(QEasingCurve::OutQuad), int(200 * (100-_offset) / distance));
+ tl.set(moveOffset, 0.0);
+ tl.move(moveOffset, targetOffset, QEasingCurve(QEasingCurve::InQuad), int(200 * targetOffset / distance));
+ } else {
+ tl.move(moveOffset, targetOffset, QEasingCurve(QEasingCurve::InOutQuad), 200);
+ }
+}
+
+QDeclarativePathViewAttached *QDeclarativePathView::qmlAttachedProperties(QObject *obj)
+{
+ return new QDeclarativePathViewAttached(obj);
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/declarative/graphicsitems/qdeclarativepathview_p.h b/src/declarative/graphicsitems/qdeclarativepathview_p.h
new file mode 100644
index 0000000000..6dbd044579
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativepathview_p.h
@@ -0,0 +1,188 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEPATHVIEW_H
+#define QDECLARATIVEPATHVIEW_H
+
+#include "qdeclarativeitem.h"
+#include "qdeclarativepath_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativePathViewPrivate;
+class QDeclarativePathViewAttached;
+class Q_DECLARATIVE_EXPORT QDeclarativePathView : public QDeclarativeItem
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged)
+ Q_PROPERTY(QDeclarativePath *path READ path WRITE setPath NOTIFY pathChanged)
+ Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged)
+ Q_PROPERTY(qreal offset READ offset WRITE setOffset NOTIFY offsetChanged)
+ Q_PROPERTY(qreal snapPosition READ snapPosition WRITE setSnapPosition NOTIFY snapPositionChanged)
+ Q_PROPERTY(qreal dragMargin READ dragMargin WRITE setDragMargin NOTIFY dragMarginChanged)
+ Q_PROPERTY(int count READ count)
+ Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
+ Q_PROPERTY(int pathItemCount READ pathItemCount WRITE setPathItemCount NOTIFY pathItemCountChanged)
+
+public:
+ QDeclarativePathView(QDeclarativeItem *parent=0);
+ virtual ~QDeclarativePathView();
+
+ QVariant model() const;
+ void setModel(const QVariant &);
+
+ QDeclarativePath *path() const;
+ void setPath(QDeclarativePath *);
+
+ int currentIndex() const;
+ void setCurrentIndex(int idx);
+
+ qreal offset() const;
+ void setOffset(qreal offset);
+
+ qreal snapPosition() const;
+ void setSnapPosition(qreal pos);
+
+ qreal dragMargin() const;
+ void setDragMargin(qreal margin);
+
+ int count() const;
+
+ QDeclarativeComponent *delegate() const;
+ void setDelegate(QDeclarativeComponent *);
+
+ int pathItemCount() const;
+ void setPathItemCount(int);
+
+ static QDeclarativePathViewAttached *qmlAttachedProperties(QObject *);
+
+Q_SIGNALS:
+ void currentIndexChanged();
+ void offsetChanged();
+ void modelChanged();
+ void pathChanged();
+ void dragMarginChanged();
+ void snapPositionChanged();
+ void delegateChanged();
+ void pathItemCountChanged();
+
+protected:
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *);
+ bool sendMouseEvent(QGraphicsSceneMouseEvent *event);
+ bool sceneEventFilter(QGraphicsItem *, QEvent *);
+ void componentComplete();
+
+private Q_SLOTS:
+ void refill();
+ void ticked();
+ void itemsInserted(int index, int count);
+ void itemsRemoved(int index, int count);
+ void modelReset();
+ void createdItem(int index, QDeclarativeItem *item);
+ void destroyingItem(QDeclarativeItem *item);
+
+private:
+ friend class QDeclarativePathViewAttached;
+ Q_DISABLE_COPY(QDeclarativePathView)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativePathView)
+};
+
+class QDeclarativeOpenMetaObject;
+class QDeclarativePathViewAttached : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QDeclarativePathView *view READ view CONSTANT)
+ Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged)
+ Q_PROPERTY(bool onPath READ isOnPath NOTIFY pathChanged)
+
+public:
+ QDeclarativePathViewAttached(QObject *parent);
+ ~QDeclarativePathViewAttached();
+
+ QDeclarativePathView *view() { return m_view; }
+
+ bool isCurrentItem() const { return m_isCurrent; }
+ void setIsCurrentItem(bool c) {
+ if (m_isCurrent != c) {
+ m_isCurrent = c;
+ emit currentItemChanged();
+ }
+ }
+
+ QVariant value(const QByteArray &name) const;
+ void setValue(const QByteArray &name, const QVariant &val);
+
+ bool isOnPath() const { return m_onPath; }
+ void setOnPath(bool on) {
+ if (on != m_onPath) {
+ m_onPath = on;
+ emit pathChanged();
+ }
+ }
+
+Q_SIGNALS:
+ void currentItemChanged();
+ void pathChanged();
+
+private:
+ friend class QDeclarativePathViewPrivate;
+ QDeclarativePathView *m_view;
+ QDeclarativeOpenMetaObject *m_metaobject;
+ bool m_onPath : 1;
+ bool m_isCurrent : 1;
+};
+
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativePathView)
+QML_DECLARE_TYPEINFO(QDeclarativePathView, QML_HAS_ATTACHED_PROPERTIES)
+QT_END_HEADER
+
+#endif // QDECLARATIVEPATHVIEW_H
diff --git a/src/declarative/graphicsitems/qdeclarativepathview_p_p.h b/src/declarative/graphicsitems/qdeclarativepathview_p_p.h
new file mode 100644
index 0000000000..4083ab58f5
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativepathview_p_p.h
@@ -0,0 +1,149 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEPATHVIEW_P_H
+#define QDECLARATIVEPATHVIEW_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativepathview_p.h"
+
+#include "qdeclarativeitem_p.h"
+#include "qdeclarativevisualitemmodel_p.h"
+
+#include <qdeclarative.h>
+#include <qdeclarativeanimation_p_p.h>
+#include <qdeclarativeguard_p.h>
+
+#include <qdatetime.h>
+
+QT_BEGIN_NAMESPACE
+
+typedef struct PathViewItem{
+ int index;
+ QDeclarativeItem* item;
+}PathViewItem;
+
+class QDeclarativeOpenMetaObjectType;
+class QDeclarativePathViewAttached;
+class QDeclarativePathViewPrivate : public QDeclarativeItemPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativePathView)
+
+public:
+ QDeclarativePathViewPrivate()
+ : path(0), currentIndex(0), startPc(0), lastDist(0)
+ , lastElapsed(0), stealMouse(false), ownModel(false), activeItem(0)
+ , snapPos(0), dragMargin(0), moveOffset(this, &QDeclarativePathViewPrivate::setOffset)
+ , firstIndex(0), pathItems(-1), pathOffset(0), requestedIndex(-1)
+ , moveReason(Other), attType(0)
+ {
+ }
+
+ void init()
+ {
+ Q_Q(QDeclarativePathView);
+ _offset = 0;
+ q->setAcceptedMouseButtons(Qt::LeftButton);
+ q->setFlag(QGraphicsItem::ItemIsFocusScope);
+ q->setFiltersChildEvents(true);
+ q->connect(&tl, SIGNAL(updated()), q, SLOT(ticked()));
+ }
+
+ QDeclarativeItem *getItem(int modelIndex);
+ void releaseItem(QDeclarativeItem *item);
+ QDeclarativePathViewAttached *attached(QDeclarativeItem *item);
+ void clear();
+
+ bool isValid() const {
+ return model && model->count() > 0 && model->isValid() && path;
+ }
+
+ int calcCurrentIndex();
+ void updateCurrent();
+ static void fixOffsetCallback(void*);
+ void fixOffset();
+ void setOffset(qreal offset);
+ void regenerate();
+ void updateItem(QDeclarativeItem *, qreal);
+ void snapToCurrent();
+ QPointF pointNear(const QPointF &point, qreal *nearPercent=0) const;
+
+ QDeclarativePath *path;
+ int currentIndex;
+ qreal startPc;
+ QPointF startPoint;
+ qreal lastDist;
+ int lastElapsed;
+ qreal _offset;
+ bool stealMouse : 1;
+ bool ownModel : 1;
+ QTime lastPosTime;
+ QPointF lastPos;
+ QDeclarativeItem *activeItem;
+ qreal snapPos;
+ qreal dragMargin;
+ QDeclarativeTimeLine tl;
+ QDeclarativeTimeLineValueProxy<QDeclarativePathViewPrivate> moveOffset;
+ int firstIndex;
+ int pathItems;
+ int pathOffset;
+ int requestedIndex;
+ QList<QDeclarativeItem *> items;
+ QDeclarativeGuard<QDeclarativeVisualModel> model;
+ QVariant modelVariant;
+ enum MovementReason { Other, Key, Mouse };
+ MovementReason moveReason;
+ QDeclarativeOpenMetaObjectType *attType;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
new file mode 100644
index 0000000000..1212e89cc4
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
@@ -0,0 +1,891 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativepositioners_p.h"
+#include "qdeclarativepositioners_p_p.h"
+
+#include <qdeclarative.h>
+#include <qdeclarativestate_p.h>
+#include <qdeclarativestategroup_p.h>
+#include <qdeclarativestateoperations_p.h>
+#include <qfxperf_p_p.h>
+#include <QtCore/qmath.h>
+
+#include <QDebug>
+#include <QCoreApplication>
+
+QT_BEGIN_NAMESPACE
+
+static const QDeclarativeItemPrivate::ChangeTypes watchedChanges
+ = QDeclarativeItemPrivate::Geometry
+ | QDeclarativeItemPrivate::SiblingOrder
+ | QDeclarativeItemPrivate::Visibility
+ | QDeclarativeItemPrivate::Opacity
+ | QDeclarativeItemPrivate::Destroyed;
+
+void QDeclarativeBasePositionerPrivate::watchChanges(QDeclarativeItem *other)
+{
+ QDeclarativeItemPrivate *otherPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(other));
+ otherPrivate->addItemChangeListener(this, watchedChanges);
+}
+
+void QDeclarativeBasePositionerPrivate::unwatchChanges(QDeclarativeItem* other)
+{
+ QDeclarativeItemPrivate *otherPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(other));
+ otherPrivate->removeItemChangeListener(this, watchedChanges);
+}
+
+/*!
+ \internal
+ \class QDeclarativeBasePositioner
+ \ingroup group_layouts
+ \brief The QDeclarativeBasePositioner class provides a base for QDeclarativeGraphics layouts.
+
+ To create a QDeclarativeGraphics Positioner, simply subclass QDeclarativeBasePositioner and implement
+ doLayout(), which is automatically called when the layout might need
+ updating. In doLayout() use the setX and setY functions from QDeclarativeBasePositioner, and the
+ base class will apply the positions along with the appropriate transitions. The items to
+ position are provided in order as the protected member positionedItems.
+
+ You also need to set a PositionerType, to declare whether you are positioning the x, y or both
+ for the child items. Depending on the chosen type, only x or y changes will be applied.
+
+ Note that the subclass is responsible for adding the
+ spacing in between items.
+*/
+QDeclarativeBasePositioner::QDeclarativeBasePositioner(PositionerType at, QDeclarativeItem *parent)
+ : QDeclarativeItem(*(new QDeclarativeBasePositionerPrivate), parent)
+{
+ Q_D(QDeclarativeBasePositioner);
+ d->init(at);
+}
+
+QDeclarativeBasePositioner::QDeclarativeBasePositioner(QDeclarativeBasePositionerPrivate &dd, PositionerType at, QDeclarativeItem *parent)
+ : QDeclarativeItem(dd, parent)
+{
+ Q_D(QDeclarativeBasePositioner);
+ d->init(at);
+}
+
+QDeclarativeBasePositioner::~QDeclarativeBasePositioner()
+{
+ Q_D(QDeclarativeBasePositioner);
+ for (int i = 0; i < positionedItems.count(); ++i)
+ d->unwatchChanges(positionedItems.at(i).item);
+ positionedItems.clear();
+}
+
+int QDeclarativeBasePositioner::spacing() const
+{
+ Q_D(const QDeclarativeBasePositioner);
+ return d->spacing;
+}
+
+void QDeclarativeBasePositioner::setSpacing(int s)
+{
+ Q_D(QDeclarativeBasePositioner);
+ if (s==d->spacing)
+ return;
+ d->spacing = s;
+ prePositioning();
+ emit spacingChanged();
+}
+
+QDeclarativeTransition *QDeclarativeBasePositioner::move() const
+{
+ Q_D(const QDeclarativeBasePositioner);
+ return d->moveTransition;
+}
+
+void QDeclarativeBasePositioner::setMove(QDeclarativeTransition *mt)
+{
+ Q_D(QDeclarativeBasePositioner);
+ if (mt == d->moveTransition)
+ return;
+ d->moveTransition = mt;
+ emit moveChanged();
+}
+
+QDeclarativeTransition *QDeclarativeBasePositioner::add() const
+{
+ Q_D(const QDeclarativeBasePositioner);
+ return d->addTransition;
+}
+
+void QDeclarativeBasePositioner::setAdd(QDeclarativeTransition *add)
+{
+ Q_D(QDeclarativeBasePositioner);
+ if (add == d->addTransition)
+ return;
+
+ d->addTransition = add;
+ emit addChanged();
+}
+
+void QDeclarativeBasePositioner::componentComplete()
+{
+ Q_D(QDeclarativeBasePositioner);
+ QDeclarativeItem::componentComplete();
+#ifdef Q_ENABLE_PERFORMANCE_LOG
+ QDeclarativePerfTimer<QDeclarativePerf::BasepositionerComponentComplete> cc;
+#endif
+ positionedItems.reserve(d->QGraphicsItemPrivate::children.count());
+ prePositioning();
+}
+
+QVariant QDeclarativeBasePositioner::itemChange(GraphicsItemChange change,
+ const QVariant &value)
+{
+ Q_D(QDeclarativeBasePositioner);
+ if (change == ItemChildAddedChange){
+ QGraphicsItem* item = value.value<QGraphicsItem*>();
+ QDeclarativeItem* child = 0;
+ if(item)
+ child = qobject_cast<QDeclarativeItem*>(item->toGraphicsObject());
+ if (child)
+ prePositioning();
+ } else if (change == ItemChildRemovedChange) {
+ QGraphicsItem* item = value.value<QGraphicsItem*>();
+ QDeclarativeItem* child = 0;
+ if(item)
+ child = qobject_cast<QDeclarativeItem*>(item->toGraphicsObject());
+ if (child) {
+ QDeclarativeBasePositioner::PositionedItem posItem(child);
+ int idx = positionedItems.find(posItem);
+ if (idx >= 0) {
+ d->unwatchChanges(child);
+ positionedItems.remove(idx);
+ }
+ prePositioning();
+ }
+ }
+
+ return QDeclarativeItem::itemChange(change, value);
+}
+
+void QDeclarativeBasePositioner::prePositioning()
+{
+ Q_D(QDeclarativeBasePositioner);
+ if (!isComponentComplete())
+ return;
+
+ d->queuedPositioning = false;
+ //Need to order children by creation order modified by stacking order
+ QList<QGraphicsItem *> children = d->QGraphicsItemPrivate::children;
+ qSort(children.begin(), children.end(), d->insertionOrder);
+
+ for (int ii = 0; ii < children.count(); ++ii) {
+ QDeclarativeItem *child = qobject_cast<QDeclarativeItem *>(children.at(ii));
+ if (!child)
+ continue;
+ PositionedItem *item = 0;
+ PositionedItem posItem(child);
+ int wIdx = positionedItems.find(posItem);
+ if (wIdx < 0) {
+ d->watchChanges(child);
+ positionedItems.append(posItem);
+ item = &positionedItems[positionedItems.count()-1];
+ } else {
+ item = &positionedItems[wIdx];
+ }
+ if (child->opacity() <= 0.0 || !child->isVisible()) {
+ item->isVisible = false;
+ continue;
+ }
+ if (!item->isVisible) {
+ item->isVisible = true;
+ item->isNew = true;
+ } else {
+ item->isNew = false;
+ }
+ }
+ doPositioning();
+ if(d->addTransition || d->moveTransition)
+ finishApplyTransitions();
+ //Set implicit size to the size of its children
+ qreal h = 0.0f;
+ qreal w = 0.0f;
+ for (int i = 0; i < positionedItems.count(); ++i) {
+ const PositionedItem &posItem = positionedItems.at(i);
+ if (posItem.isVisible) {
+ h = qMax(h, posItem.item->y() + posItem.item->height());
+ w = qMax(w, posItem.item->x() + posItem.item->width());
+ }
+ }
+ setImplicitHeight(h);
+ setImplicitWidth(w);
+}
+
+void QDeclarativeBasePositioner::positionX(int x, const PositionedItem &target)
+{
+ Q_D(QDeclarativeBasePositioner);
+ if(d->type == Horizontal || d->type == Both){
+ if(!d->addTransition && !d->moveTransition){
+ target.item->setX(x);
+ }else{
+ if(target.isNew)
+ d->addActions << QDeclarativeAction(target.item, QLatin1String("x"), QVariant(x));
+ else
+ d->moveActions << QDeclarativeAction(target.item, QLatin1String("x"), QVariant(x));
+ }
+ }
+}
+
+void QDeclarativeBasePositioner::positionY(int y, const PositionedItem &target)
+{
+ Q_D(QDeclarativeBasePositioner);
+ if(d->type == Vertical || d->type == Both){
+ if(!d->addTransition && !d->moveTransition){
+ target.item->setY(y);
+ }else{
+ if(target.isNew)
+ d->addActions << QDeclarativeAction(target.item, QLatin1String("y"), QVariant(y));
+ else
+ d->moveActions << QDeclarativeAction(target.item, QLatin1String("y"), QVariant(y));
+ }
+ }
+}
+
+void QDeclarativeBasePositioner::finishApplyTransitions()
+{
+ Q_D(QDeclarativeBasePositioner);
+ // Note that if a transition is not set the transition manager will
+ // apply the changes directly, in the case add/move aren't set
+ d->addTransitionManager.transition(d->addActions, d->addTransition);
+ d->moveTransitionManager.transition(d->moveActions, d->moveTransition);
+ d->addActions.clear();
+ d->moveActions.clear();
+}
+
+/*!
+ \qmlclass Column QDeclarativeColumn
+ \since 4.7
+ \brief The Column item lines up its children vertically.
+ \inherits Item
+
+ The Column item positions its child items so that they are vertically
+ aligned and not overlapping. Spacing between items can be added.
+
+ The below example positions differently shaped rectangles using a Column.
+ \table
+ \row
+ \o \image verticalpositioner_example.png
+ \o
+ \qml
+Column {
+ spacing: 2
+ Rectangle { color: "red"; width: 50; height: 50 }
+ Rectangle { color: "green"; width: 20; height: 50 }
+ Rectangle { color: "blue"; width: 50; height: 20 }
+}
+ \endqml
+ \endtable
+
+ Column also provides for transitions to be set when items are added, moved,
+ or removed in the positioner. Adding and removing apply both to items which are deleted
+ or have their position in the document changed so as to no longer be children of the positioner,
+ as well as to items which have their opacity set to or from zero so as to appear or disappear.
+
+ \table
+ \row
+ \o \image verticalpositioner_transition.gif
+ \o
+ \qml
+Column {
+ spacing: 2
+ remove: ...
+ add: ...
+ move: ...
+ ...
+}
+ \endqml
+ \endtable
+
+ Note that the positioner assumes that the x and y positions of its children
+ will not change. If you manually change the x or y properties in script, bind
+ the x or y properties, or use anchors on a child of a positioner, then the
+ positioner may exhibit strange behaviour.
+
+*/
+/*!
+ \qmlproperty Transition Column::add
+
+ This property holds the transition to be applied when adding an
+ item to the positioner. The transition will only be applied to the
+ added item(s). Positioner transitions will only affect the
+ position (x,y) of items.
+
+ Added can mean that either the object has been created or
+ reparented, and thus is now a child or the positioner, or that the
+ object has had its opacity increased from zero, and thus is now
+ visible.
+
+
+*/
+/*!
+ \qmlproperty Transition Column::move
+
+ This property holds the transition to apply when moving an item
+ within the positioner. Positioner transitions will only affect
+ the position (x,y) of items.
+
+ This can happen when other items are added or removed from the
+ positioner, or when items resize themselves.
+
+ \table
+ \row
+ \o \image positioner-move.gif
+ \o
+ \qml
+Column {
+ move: Transition {
+ NumberAnimation {
+ properties: "y"
+ easing: "easeOutBounce"
+ }
+ }
+}
+ \endqml
+ \endtable
+*/
+/*!
+ \qmlproperty int Column::spacing
+
+ spacing is the amount in pixels left empty between each adjacent
+ item, and defaults to 0.
+
+ The below example places a Grid containing a red, a blue and a
+ green rectangle on a gray background. The area the grid positioner
+ occupies is colored white. The top positioner has the default of no spacing,
+ and the bottom positioner has its spacing set to 2.
+
+ \image spacing_a.png
+ \image spacing_b.png
+
+*/
+/*!
+ \internal
+ \class QDeclarativeColumn
+ \brief The QDeclarativeColumn class lines up items vertically.
+ \ingroup group_positioners
+*/
+QDeclarativeColumn::QDeclarativeColumn(QDeclarativeItem *parent)
+: QDeclarativeBasePositioner(Vertical, parent)
+{
+}
+
+static inline bool isInvisible(QDeclarativeItem *child)
+{
+ return child->opacity() == 0.0 || !child->isVisible() || !child->width() || !child->height();
+}
+
+void QDeclarativeColumn::doPositioning()
+{
+ int voffset = 0;
+
+ for (int ii = 0; ii < positionedItems.count(); ++ii) {
+ const PositionedItem &child = positionedItems.at(ii);
+ if (!child.item || isInvisible(child.item))
+ continue;
+
+ if(child.item->y() != voffset)
+ positionY(voffset, child);
+
+ voffset += child.item->height();
+ voffset += spacing();
+ }
+}
+
+/*!
+ \qmlclass Row QDeclarativeRow
+ \since 4.7
+ \brief The Row item lines up its children horizontally.
+ \inherits Item
+
+ The Row item positions its child items so that they are
+ horizontally aligned and not overlapping. Spacing can be added between the
+ items, and a margin around all items can also be added. It also provides for
+ transitions to be set when items are added, moved, or removed in the
+ positioner. Adding and removing apply both to items which are deleted or have
+ their position in the document changed so as to no longer be children of the
+ positioner, as well as to items which have their opacity set to or from zero
+ so as to appear or disappear.
+
+ The below example lays out differently shaped rectangles using a Row.
+ \qml
+Row {
+ spacing: 2
+ Rectangle { color: "red"; width: 50; height: 50 }
+ Rectangle { color: "green"; width: 20; height: 50 }
+ Rectangle { color: "blue"; width: 50; height: 20 }
+}
+ \endqml
+ \image horizontalpositioner_example.png
+
+ Note that the positioner assumes that the x and y positions of its children
+ will not change. If you manually change the x or y properties in script, bind
+ the x or y properties, or use anchors on a child of a positioner, then the
+ positioner may exhibit strange behaviour.
+
+*/
+/*!
+ \qmlproperty Transition Row::add
+ This property holds the transition to apply when adding an item to the positioner.
+ The transition will only be applied to the added item(s).
+ Positioner transitions will only affect the position (x,y) of items.
+
+ Added can mean that either the object has been created or
+ reparented, and thus is now a child or the positioner, or that the
+ object has had its opacity increased from zero, and thus is now
+ visible.
+
+
+*/
+/*!
+ \qmlproperty Transition Row::move
+
+ This property holds the transition to apply when moving an item
+ within the positioner. Positioner transitions will only affect
+ the position (x,y) of items.
+
+ This can happen when other items are added or removed from the
+ positioner, or when items resize themselves.
+
+ \qml
+Row {
+ id: positioner
+ move: Transition {
+ NumberAnimation {
+ properties: "x"
+ ease: "easeOutBounce"
+ }
+ }
+}
+ \endqml
+
+*/
+/*!
+ \qmlproperty int Row::spacing
+
+ spacing is the amount in pixels left empty between each adjacent
+ item, and defaults to 0.
+
+ The below example places a Grid containing a red, a blue and a
+ green rectangle on a gray background. The area the grid positioner
+ occupies is colored white. The top positioner has the default of no spacing,
+ and the bottom positioner has its spacing set to 2.
+
+ \image spacing_a.png
+ \image spacing_b.png
+
+*/
+/*!
+ \internal
+ \class QDeclarativeRow
+ \brief The QDeclarativeRow class lines up items horizontally.
+ \ingroup group_positioners
+*/
+QDeclarativeRow::QDeclarativeRow(QDeclarativeItem *parent)
+: QDeclarativeBasePositioner(Horizontal, parent)
+{
+}
+
+void QDeclarativeRow::doPositioning()
+{
+ int hoffset = 0;
+
+ for (int ii = 0; ii < positionedItems.count(); ++ii) {
+ const PositionedItem &child = positionedItems.at(ii);
+ if (!child.item || isInvisible(child.item))
+ continue;
+
+ if(child.item->x() != hoffset)
+ positionX(hoffset, child);
+
+ hoffset += child.item->width();
+ hoffset += spacing();
+ }
+}
+
+
+/*!
+ \qmlclass Grid QDeclarativeGrid
+ \since 4.7
+ \brief The Grid item positions its children in a grid.
+ \inherits Item
+
+ The Grid item positions its child items so that they are
+ aligned in a grid and are not overlapping. Spacing can be added
+ between the items. It also provides for transitions to be set when items are
+ added, moved, or removed in the positioner. Adding and removing apply
+ both to items which are deleted or have their position in the
+ document changed so as to no longer be children of the positioner, as
+ well as to items which have their opacity set to or from zero so
+ as to appear or disappear.
+
+ The Grid defaults to using four columns, and as many rows as
+ are necessary to fit all the child items. The number of rows
+ and/or the number of columns can be constrained by setting the rows
+ or columns properties. The grid positioner calculates a grid with
+ rectangular cells of sufficient size to hold all items, and then
+ places the items in the cells, going across then down, and
+ positioning each item at the (0,0) corner of the cell. The below
+ example demonstrates this.
+
+ \table
+ \row
+ \o \image gridLayout_example.png
+ \o
+ \qml
+Grid {
+ columns: 3
+ spacing: 2
+ Rectangle { color: "red"; width: 50; height: 50 }
+ Rectangle { color: "green"; width: 20; height: 50 }
+ Rectangle { color: "blue"; width: 50; height: 20 }
+ Rectangle { color: "cyan"; width: 50; height: 50 }
+ Rectangle { color: "magenta"; width: 10; height: 10 }
+}
+ \endqml
+ \endtable
+
+ Note that the positioner assumes that the x and y positions of its children
+ will not change. If you manually change the x or y properties in script, bind
+ the x or y properties, or use anchors on a child of a positioner, then the
+ positioner may exhibit strange behaviour.
+*/
+/*!
+ \qmlproperty Transition Grid::add
+ This property holds the transition to apply when adding an item to the positioner.
+ The transition is only applied to the added item(s).
+ Positioner transitions will only affect the position (x,y) of items.
+
+ Added can mean that either the object has been created or
+ reparented, and thus is now a child or the positioner, or that the
+ object has had its opacity increased from zero, and thus is now
+ visible.
+
+
+*/
+/*!
+ \qmlproperty Transition Grid::move
+ This property holds the transition to apply when moving an item within the positioner.
+ Positioner transitions will only affect the position (x,y) of items.
+
+ This can happen when other items are added or removed from the positioner, or
+ when items resize themselves.
+
+ \qml
+Grid {
+ move: Transition {
+ NumberAnimation {
+ properties: "x,y"
+ ease: "easeOutBounce"
+ }
+ }
+}
+ \endqml
+
+*/
+/*!
+ \qmlproperty int Grid::spacing
+
+ spacing is the amount in pixels left empty between each adjacent
+ item, and defaults to 0.
+
+ The below example places a Grid containing a red, a blue and a
+ green rectangle on a gray background. The area the grid positioner
+ occupies is colored white. The top positioner has the default of no spacing,
+ and the bottom positioner has its spacing set to 2.
+
+ \image spacing_a.png
+ \image spacing_b.png
+
+*/
+/*!
+ \internal
+ \class QDeclarativeGrid
+ \brief The QDeclarativeGrid class lays out items in a grid.
+ \ingroup group_layouts
+
+*/
+QDeclarativeGrid::QDeclarativeGrid(QDeclarativeItem *parent) :
+ QDeclarativeBasePositioner(Both, parent)
+{
+ _columns=-1;
+ _rows=-1;
+}
+
+/*!
+ \qmlproperty int Grid::columns
+ This property holds the number of columns in the grid.
+
+ When the columns property is set the Grid will always have
+ that many columns. Note that if you do not have enough items to
+ fill this many columns some columns will be of zero width.
+*/
+
+/*!
+ \qmlproperty int Grid::rows
+ This property holds the number of rows in the grid.
+
+ When the rows property is set the Grid will always have that
+ many rows. Note that if you do not have enough items to fill this
+ many rows some rows will be of zero width.
+*/
+
+void QDeclarativeGrid::setColumns(const int columns)
+{
+ if (columns == _columns)
+ return;
+ _columns = columns;
+ prePositioning();
+ emit columnsChanged();
+}
+
+void QDeclarativeGrid::setRows(const int rows)
+{
+ if (rows == _rows)
+ return;
+ _rows = rows;
+ prePositioning();
+ emit rowsChanged();
+}
+
+void QDeclarativeGrid::doPositioning()
+{
+ int c=_columns,r=_rows;//Actual number of rows/columns
+ int numVisible = positionedItems.count();
+ if (_columns==-1 && _rows==-1){
+ c = 4;
+ r = (numVisible+3)/4;
+ }else if (_rows==-1){
+ r = (numVisible+(_columns-1))/_columns;
+ }else if (_columns==-1){
+ c = (numVisible+(_rows-1))/_rows;
+ }
+
+ QList<int> maxColWidth;
+ QList<int> maxRowHeight;
+ int childIndex =0;
+ for (int i=0; i<r; i++){
+ for (int j=0; j<c; j++){
+ if (j==0)
+ maxRowHeight << 0;
+ if (i==0)
+ maxColWidth << 0;
+
+ if (childIndex == positionedItems.count())
+ continue;
+ const PositionedItem &child = positionedItems.at(childIndex++);
+ if (!child.item || isInvisible(child.item))
+ continue;
+ if (child.item->width() > maxColWidth[j])
+ maxColWidth[j] = child.item->width();
+ if (child.item->height() > maxRowHeight[i])
+ maxRowHeight[i] = child.item->height();
+ }
+ }
+
+ int xoffset=0;
+ int yoffset=0;
+ int curRow =0;
+ int curCol =0;
+ for (int i = 0; i < positionedItems.count(); ++i) {
+ const PositionedItem &child = positionedItems.at(i);
+ if (!child.item || isInvisible(child.item))
+ continue;
+ if((child.item->x()!=xoffset)||(child.item->y()!=yoffset)){
+ positionX(xoffset, child);
+ positionY(yoffset, child);
+ }
+ xoffset+=maxColWidth[curCol]+spacing();
+ curCol++;
+ curCol%=c;
+ if (!curCol){
+ yoffset+=maxRowHeight[curRow]+spacing();
+ xoffset=0;
+ curRow++;
+ if (curRow>=r)
+ break;
+ }
+ }
+}
+
+
+/*!
+ \qmlclass Flow QDeclarativeFlow
+ \since 4.7
+ \brief The Flow item lines up its children side by side, wrapping as necessary.
+ \inherits Item
+
+
+*/
+/*!
+ \qmlproperty Transition Flow::add
+ This property holds the transition to apply when adding an item to the positioner.
+ The transition will only be applied to the added item(s).
+ Positioner transitions will only affect the position (x,y) of items.
+
+ Added can mean that either the object has been created or reparented, and thus is now a child or the positioner, or that the object has had its opacity increased from zero, and thus is now visible.
+
+
+*/
+/*!
+ \qmlproperty Transition Flow::move
+ This property holds the transition to apply when moving an item within the positioner.
+ Positioner transitions will only affect the position (x,y) of items.
+
+ This can happen when other items are added or removed from the positioner, or when items resize themselves.
+
+ \qml
+Flow {
+ id: positioner
+ move: Transition {
+ NumberAnimation {
+ properties: "x,y"
+ ease: "easeOutBounce"
+ }
+ }
+}
+ \endqml
+
+*/
+/*!
+ \qmlproperty int Flow::spacing
+
+ spacing is the amount in pixels left empty between each adjacent
+ item, and defaults to 0.
+
+*/
+
+class QDeclarativeFlowPrivate : public QDeclarativeBasePositionerPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeFlow)
+
+public:
+ QDeclarativeFlowPrivate()
+ : QDeclarativeBasePositionerPrivate(), flow(QDeclarativeFlow::LeftToRight)
+ {}
+
+ QDeclarativeFlow::Flow flow;
+};
+
+QDeclarativeFlow::QDeclarativeFlow(QDeclarativeItem *parent)
+: QDeclarativeBasePositioner(*(new QDeclarativeFlowPrivate), Both, parent)
+{
+}
+
+/*!
+ \qmlproperty enumeration Flow::flow
+ This property holds the flow of the layout.
+
+ Possible values are \c LeftToRight (default) and \c TopToBottom.
+
+ If \a flow is \c LeftToRight, the items are positioned next to
+ to each other from left to right until the width of the Flow
+ is exceeded, then wrapped to the next line.
+ If \a flow is \c TopToBottom, the items are positioned next to each
+ other from top to bottom until the height of the Flow is exceeded,
+ then wrapped to the next column.
+*/
+QDeclarativeFlow::Flow QDeclarativeFlow::flow() const
+{
+ Q_D(const QDeclarativeFlow);
+ return d->flow;
+}
+
+void QDeclarativeFlow::setFlow(Flow flow)
+{
+ Q_D(QDeclarativeFlow);
+ if (d->flow != flow) {
+ d->flow = flow;
+ prePositioning();
+ emit flowChanged();
+ }
+}
+
+void QDeclarativeFlow::doPositioning()
+{
+ Q_D(QDeclarativeFlow);
+
+ int hoffset = 0;
+ int voffset = 0;
+ int linemax = 0;
+
+ for (int i = 0; i < positionedItems.count(); ++i) {
+ const PositionedItem &child = positionedItems.at(i);
+ if (!child.item || isInvisible(child.item))
+ continue;
+
+ if (d->flow == LeftToRight) {
+ if (hoffset && hoffset + child.item->width() > width()) {
+ hoffset = 0;
+ voffset += linemax + spacing();
+ linemax = 0;
+ }
+ } else {
+ if (voffset && voffset + child.item->height() > height()) {
+ voffset = 0;
+ hoffset += linemax + spacing();
+ linemax = 0;
+ }
+ }
+
+ if(child.item->x() != hoffset || child.item->y() != voffset){
+ positionX(hoffset, child);
+ positionY(voffset, child);
+ }
+
+ if (d->flow == LeftToRight) {
+ hoffset += child.item->width();
+ hoffset += spacing();
+ linemax = qMax(linemax, qCeil(child.item->height()));
+ } else {
+ voffset += child.item->height();
+ voffset += spacing();
+ linemax = qMax(linemax, qCeil(child.item->width()));
+ }
+ }
+}
+
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners_p.h b/src/declarative/graphicsitems/qdeclarativepositioners_p.h
new file mode 100644
index 0000000000..f38847c0d8
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativepositioners_p.h
@@ -0,0 +1,199 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVELAYOUTS_H
+#define QDECLARATIVELAYOUTS_H
+
+#include "qdeclarativeitem.h"
+
+#include <private/qdeclarativestate_p.h>
+#include <private/qpodvector_p.h>
+
+#include <QtCore/QObject>
+#include <QtCore/QString>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+class QDeclarativeBasePositionerPrivate;
+
+class Q_DECLARATIVE_EXPORT QDeclarativeBasePositioner : public QDeclarativeItem
+{
+ Q_OBJECT
+
+ Q_PROPERTY(int spacing READ spacing WRITE setSpacing NOTIFY spacingChanged)
+ Q_PROPERTY(QDeclarativeTransition *move READ move WRITE setMove NOTIFY moveChanged)
+ Q_PROPERTY(QDeclarativeTransition *add READ add WRITE setAdd NOTIFY addChanged)
+public:
+ enum PositionerType { None = 0x0, Horizontal = 0x1, Vertical = 0x2, Both = 0x3 };
+ QDeclarativeBasePositioner(PositionerType, QDeclarativeItem *parent);
+ ~QDeclarativeBasePositioner();
+
+ int spacing() const;
+ void setSpacing(int);
+
+ QDeclarativeTransition *move() const;
+ void setMove(QDeclarativeTransition *);
+
+ QDeclarativeTransition *add() const;
+ void setAdd(QDeclarativeTransition *);
+
+protected:
+ QDeclarativeBasePositioner(QDeclarativeBasePositionerPrivate &dd, PositionerType at, QDeclarativeItem *parent);
+ virtual void componentComplete();
+ virtual QVariant itemChange(GraphicsItemChange, const QVariant &);
+ void finishApplyTransitions();
+
+Q_SIGNALS:
+ void spacingChanged();
+ void moveChanged();
+ void addChanged();
+
+protected Q_SLOTS:
+ virtual void doPositioning()=0;
+ void prePositioning();
+
+protected:
+ struct PositionedItem {
+ PositionedItem(QDeclarativeItem *i) : item(i), isNew(false), isVisible(true) {}
+ bool operator==(const PositionedItem &other) const { return other.item == item; }
+ QDeclarativeItem *item;
+ bool isNew;
+ bool isVisible;
+ };
+
+ QPODVector<PositionedItem,8> positionedItems;
+ void positionX(int,const PositionedItem &target);
+ void positionY(int,const PositionedItem &target);
+
+private:
+ Q_DISABLE_COPY(QDeclarativeBasePositioner)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeBasePositioner)
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeColumn : public QDeclarativeBasePositioner
+{
+ Q_OBJECT
+public:
+ QDeclarativeColumn(QDeclarativeItem *parent=0);
+protected Q_SLOTS:
+ virtual void doPositioning();
+private:
+ Q_DISABLE_COPY(QDeclarativeColumn)
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeRow: public QDeclarativeBasePositioner
+{
+ Q_OBJECT
+public:
+ QDeclarativeRow(QDeclarativeItem *parent=0);
+protected Q_SLOTS:
+ virtual void doPositioning();
+private:
+ Q_DISABLE_COPY(QDeclarativeRow)
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeGrid : public QDeclarativeBasePositioner
+{
+ Q_OBJECT
+ Q_PROPERTY(int rows READ rows WRITE setRows NOTIFY rowChanged)
+ Q_PROPERTY(int columns READ columns WRITE setColumns NOTIFY columnsChanged)
+public:
+ QDeclarativeGrid(QDeclarativeItem *parent=0);
+
+ int rows() const {return _rows;}
+ void setRows(const int rows);
+
+ int columns() const {return _columns;}
+ void setColumns(const int columns);
+
+Q_SIGNALS:
+ void rowsChanged();
+ void columnsChanged();
+
+protected Q_SLOTS:
+ virtual void doPositioning();
+
+private:
+ int _rows;
+ int _columns;
+ Q_DISABLE_COPY(QDeclarativeGrid)
+};
+
+class QDeclarativeFlowPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeFlow: public QDeclarativeBasePositioner
+{
+ Q_OBJECT
+ Q_PROPERTY(Flow flow READ flow WRITE setFlow NOTIFY flowChanged)
+public:
+ QDeclarativeFlow(QDeclarativeItem *parent=0);
+
+ Q_ENUMS(Flow)
+ enum Flow { LeftToRight, TopToBottom };
+ Flow flow() const;
+ void setFlow(Flow);
+
+Q_SIGNALS:
+ void flowChanged();
+
+protected Q_SLOTS:
+ virtual void doPositioning();
+
+protected:
+ QDeclarativeFlow(QDeclarativeFlowPrivate &dd, QDeclarativeItem *parent);
+private:
+ Q_DISABLE_COPY(QDeclarativeFlow)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeFlow)
+};
+
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeColumn)
+QML_DECLARE_TYPE(QDeclarativeRow)
+QML_DECLARE_TYPE(QDeclarativeGrid)
+QML_DECLARE_TYPE(QDeclarativeFlow)
+
+QT_END_HEADER
+
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h b/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h
new file mode 100644
index 0000000000..3a1edeec62
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h
@@ -0,0 +1,136 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVELAYOUTS_P_H
+#define QDECLARATIVELAYOUTS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativepositioners_p.h"
+
+#include "qdeclarativeitem_p.h"
+
+#include <qdeclarativestate_p.h>
+#include <qdeclarativetransitionmanager_p_p.h>
+#include <qdeclarativestateoperations_p.h>
+
+#include <QtCore/QObject>
+#include <QtCore/QString>
+#include <QtCore/QTimer>
+#include <QDebug>
+
+QT_BEGIN_NAMESPACE
+class QDeclarativeBasePositionerPrivate : public QDeclarativeItemPrivate, public QDeclarativeItemChangeListener
+{
+ Q_DECLARE_PUBLIC(QDeclarativeBasePositioner)
+
+public:
+ QDeclarativeBasePositionerPrivate()
+ : spacing(0), type(QDeclarativeBasePositioner::None), moveTransition(0), addTransition(0),
+ queuedPositioning(false)
+ {
+ }
+
+ void init(QDeclarativeBasePositioner::PositionerType at)
+ {
+ type = at;
+ }
+
+ int spacing;
+ QDeclarativeBasePositioner::PositionerType type;
+ QDeclarativeTransition *moveTransition;
+ QDeclarativeTransition *addTransition;
+ QDeclarativeStateOperation::ActionList addActions;
+ QDeclarativeStateOperation::ActionList moveActions;
+ QDeclarativeTransitionManager addTransitionManager;
+ QDeclarativeTransitionManager moveTransitionManager;
+
+ void watchChanges(QDeclarativeItem *other);
+ void unwatchChanges(QDeclarativeItem* other);
+ bool queuedPositioning;
+
+ virtual void itemSiblingOrderChanged(QDeclarativeItem* other)
+ {
+ Q_Q(QDeclarativeBasePositioner);
+ Q_UNUSED(other);
+ if(!queuedPositioning){
+ //Delay is due to many children often being reordered at once
+ //And we only want to reposition them all once
+ QTimer::singleShot(0,q,SLOT(prePositioning()));
+ queuedPositioning = true;
+ }
+ }
+
+ void itemGeometryChanged(QDeclarativeItem *, const QRectF &newGeometry, const QRectF &oldGeometry)
+ {
+ Q_Q(QDeclarativeBasePositioner);
+ if (newGeometry.size() != oldGeometry.size())
+ q->prePositioning();
+ }
+ virtual void itemVisibilityChanged(QDeclarativeItem *)
+ {
+ Q_Q(QDeclarativeBasePositioner);
+ q->prePositioning();
+ }
+ virtual void itemOpacityChanged(QDeclarativeItem *)
+ {
+ Q_Q(QDeclarativeBasePositioner);
+ q->prePositioning();
+ }
+
+ void itemDestroyed(QDeclarativeItem *item)
+ {
+ Q_Q(QDeclarativeBasePositioner);
+ q->positionedItems.removeOne(QDeclarativeBasePositioner::PositionedItem(item));
+ }
+};
+
+QT_END_NAMESPACE
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
new file mode 100644
index 0000000000..207d05e6c4
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
@@ -0,0 +1,476 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativerectangle_p.h"
+#include "qdeclarativerectangle_p_p.h"
+
+#include <QPainter>
+#include <QtCore/qmath.h>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \internal
+ \class QDeclarativePen
+ \brief The QDeclarativePen class provides a pen used for drawing rectangle borders on a QDeclarativeView.
+
+ By default, the pen is invalid and nothing is drawn. You must either set a color (then the default
+ width is 1) or a width (then the default color is black).
+
+ A width of 1 indicates is a single-pixel line on the border of the item being painted.
+
+ Example:
+ \qml
+ Rectangle { border.width: 2; border.color: "red" ... }
+ \endqml
+*/
+
+void QDeclarativePen::setColor(const QColor &c)
+{
+ _color = c;
+ _valid = _color.alpha() ? true : false;
+ emit penChanged();
+}
+
+void QDeclarativePen::setWidth(int w)
+{
+ if (_width == w && _valid)
+ return;
+
+ _width = w;
+ _valid = (_width < 1) ? false : true;
+ emit penChanged();
+}
+
+
+/*!
+ \qmlclass GradientStop QDeclarativeGradientStop
+ \since 4.7
+ \brief The GradientStop item defines the color at a position in a Gradient
+
+ \sa Gradient
+*/
+
+/*!
+ \qmlproperty real GradientStop::position
+ \qmlproperty color GradientStop::color
+
+ Sets a \e color at a \e position in a gradient.
+*/
+
+void QDeclarativeGradientStop::updateGradient()
+{
+ if (QDeclarativeGradient *grad = qobject_cast<QDeclarativeGradient*>(parent()))
+ grad->doUpdate();
+}
+
+/*!
+ \qmlclass Gradient QDeclarativeGradient
+ \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:
+
+ \table
+ \row
+ \o \image gradient.png
+ \o \quotefile doc/src/snippets/declarative/gradient.qml
+ \endtable
+
+ \sa GradientStop
+*/
+
+/*!
+ \qmlproperty list<GradientStop> Gradient::stops
+ This property holds the gradient stops describing the gradient.
+*/
+
+const QGradient *QDeclarativeGradient::gradient() const
+{
+ if (!m_gradient && !m_stops.isEmpty()) {
+ m_gradient = new QLinearGradient(0,0,0,1.0);
+ for (int i = 0; i < m_stops.count(); ++i) {
+ const QDeclarativeGradientStop *stop = m_stops.at(i);
+ m_gradient->setCoordinateMode(QGradient::ObjectBoundingMode);
+ m_gradient->setColorAt(stop->position(), stop->color());
+ }
+ }
+
+ return m_gradient;
+}
+
+void QDeclarativeGradient::doUpdate()
+{
+ delete m_gradient;
+ m_gradient = 0;
+ emit updated();
+}
+
+
+/*!
+ \qmlclass Rectangle QDeclarativeRectangle
+ \since 4.7
+ \brief The Rectangle item allows you to add rectangles to a scene.
+ \inherits Item
+
+ A Rectangle is painted having a solid fill (color) and an optional border.
+ You can also create rounded rectangles using the radius property.
+
+ \qml
+ Rectangle {
+ width: 100
+ height: 100
+ color: "red"
+ border.color: "black"
+ border.width: 5
+ radius: 10
+ }
+ \endqml
+
+ \image declarative-rect.png
+*/
+
+/*!
+ \internal
+ \class QDeclarativeRectangle
+ \brief The QDeclarativeRectangle class provides a rectangle item that you can add to a QDeclarativeView.
+*/
+QDeclarativeRectangle::QDeclarativeRectangle(QDeclarativeItem *parent)
+ : QDeclarativeItem(*(new QDeclarativeRectanglePrivate), parent)
+{
+}
+
+void QDeclarativeRectangle::doUpdate()
+{
+ Q_D(QDeclarativeRectangle);
+ d->rectImage = QPixmap();
+ const int pw = d->pen && d->pen->isValid() ? d->pen->width() : 0;
+ d->setPaintMargin((pw+1)/2);
+ update();
+}
+
+/*!
+ \qmlproperty int Rectangle::border.width
+ \qmlproperty color Rectangle::border.color
+
+ The width and color used to draw the border of the rectangle.
+
+ A width of 1 creates a thin line. For no line, use a width of 0 or a transparent color.
+
+ To keep the border smooth (rather than blurry), odd widths cause the rectangle to be painted at
+ a half-pixel offset;
+*/
+QDeclarativePen *QDeclarativeRectangle::border()
+{
+ Q_D(QDeclarativeRectangle);
+ return d->getPen();
+}
+
+/*!
+ \qmlproperty Gradient Rectangle::gradient
+
+ The gradient to use to fill the rectangle.
+
+ 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" }
+ Rectangle { y: 100; width: 80; height: 80
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "lightsteelblue" }
+ GradientStop { position: 1.0; color: "blue" }
+ }
+ }
+ Rectangle { rotation: 90; x: 80; y: 200; width: 80; height: 80
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "lightsteelblue" }
+ GradientStop { position: 1.0; color: "blue" }
+ }
+ }
+ // The x offset is needed because the rotation is from the top left corner
+ \endqml
+ \endtable
+
+ If both a gradient and a color are specified, the gradient will be used.
+
+ \sa Gradient, color
+*/
+QDeclarativeGradient *QDeclarativeRectangle::gradient() const
+{
+ Q_D(const QDeclarativeRectangle);
+ return d->gradient;
+}
+
+void QDeclarativeRectangle::setGradient(QDeclarativeGradient *gradient)
+{
+ Q_D(QDeclarativeRectangle);
+ if (d->gradient == gradient)
+ return;
+ if (d->gradient)
+ disconnect(d->gradient, SIGNAL(updated()), this, SLOT(doUpdate()));
+ d->gradient = gradient;
+ if (d->gradient)
+ connect(d->gradient, SIGNAL(updated()), this, SLOT(doUpdate()));
+ update();
+}
+
+
+/*!
+ \qmlproperty real Rectangle::radius
+ This property holds the corner radius used to draw a rounded rectangle.
+
+ If radius is non-zero, the rectangle will be painted as a rounded rectangle, otherwise it will be
+ painted as a normal rectangle. The same radius is used by all 4 corners; there is currently
+ no way to specify different radii for different corners.
+*/
+qreal QDeclarativeRectangle::radius() const
+{
+ Q_D(const QDeclarativeRectangle);
+ return d->radius;
+}
+
+void QDeclarativeRectangle::setRadius(qreal radius)
+{
+ Q_D(QDeclarativeRectangle);
+ if (d->radius == radius)
+ return;
+
+ d->radius = radius;
+ d->rectImage = QPixmap();
+ update();
+ emit radiusChanged();
+}
+
+/*!
+ \qmlproperty color Rectangle::color
+ This property holds the color used to fill the rectangle.
+
+ \qml
+ // green rectangle using hexidecimal notation
+ Rectangle { color: "#00FF00" }
+
+ // steelblue rectangle using SVG color name
+ Rectangle { color: "steelblue" }
+ \endqml
+
+ The default color is white.
+
+ If both a gradient and a color are specified, the gradient will be used.
+*/
+QColor QDeclarativeRectangle::color() const
+{
+ Q_D(const QDeclarativeRectangle);
+ return d->color;
+}
+
+void QDeclarativeRectangle::setColor(const QColor &c)
+{
+ Q_D(QDeclarativeRectangle);
+ if (d->color == c)
+ return;
+
+ d->color = c;
+ d->rectImage = QPixmap();
+ update();
+ emit colorChanged();
+}
+
+void QDeclarativeRectangle::generateRoundedRect()
+{
+ Q_D(QDeclarativeRectangle);
+ if (d->rectImage.isNull()) {
+ const int pw = d->pen && d->pen->isValid() ? d->pen->width() : 0;
+ const int radius = qCeil(d->radius); //ensure odd numbered width/height so we get 1-pixel center
+ d->rectImage = QPixmap(radius*2 + 3 + pw*2, radius*2 + 3 + pw*2);
+ d->rectImage.fill(Qt::transparent);
+ QPainter p(&(d->rectImage));
+ p.setRenderHint(QPainter::Antialiasing);
+ if (d->pen && d->pen->isValid()) {
+ QPen pn(QColor(d->pen->color()), d->pen->width());
+ p.setPen(pn);
+ } else {
+ p.setPen(Qt::NoPen);
+ }
+ p.setBrush(d->color);
+ if (pw%2)
+ p.drawRoundedRect(QRectF(qreal(pw)/2+1, qreal(pw)/2+1, d->rectImage.width()-(pw+1), d->rectImage.height()-(pw+1)), d->radius, d->radius);
+ else
+ p.drawRoundedRect(QRectF(qreal(pw)/2, qreal(pw)/2, d->rectImage.width()-pw, d->rectImage.height()-pw), d->radius, d->radius);
+ }
+}
+
+void QDeclarativeRectangle::generateBorderedRect()
+{
+ Q_D(QDeclarativeRectangle);
+ if (d->rectImage.isNull()) {
+ const int pw = d->pen && d->pen->isValid() ? d->pen->width() : 0;
+ d->rectImage = QPixmap(pw*2 + 3, pw*2 + 3);
+ d->rectImage.fill(Qt::transparent);
+ QPainter p(&(d->rectImage));
+ p.setRenderHint(QPainter::Antialiasing);
+ if (d->pen && d->pen->isValid()) {
+ QPen pn(QColor(d->pen->color()), d->pen->width());
+ pn.setJoinStyle(Qt::MiterJoin);
+ p.setPen(pn);
+ } else {
+ p.setPen(Qt::NoPen);
+ }
+ p.setBrush(d->color);
+ if (pw%2)
+ p.drawRect(QRectF(qreal(pw)/2+1, qreal(pw)/2+1, d->rectImage.width()-(pw+1), d->rectImage.height()-(pw+1)));
+ else
+ p.drawRect(QRectF(qreal(pw)/2, qreal(pw)/2, d->rectImage.width()-pw, d->rectImage.height()-pw));
+ }
+}
+
+void QDeclarativeRectangle::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ Q_D(QDeclarativeRectangle);
+ if (d->radius > 0 || (d->pen && d->pen->isValid())
+ || (d->gradient && d->gradient->gradient()) ) {
+ drawRect(*p);
+ }
+ else {
+ bool oldAA = p->testRenderHint(QPainter::Antialiasing);
+ if (d->smooth)
+ p->setRenderHints(QPainter::Antialiasing, true);
+ p->fillRect(QRectF(0, 0, width(), height()), d->color);
+ if (d->smooth)
+ p->setRenderHint(QPainter::Antialiasing, oldAA);
+ }
+}
+
+void QDeclarativeRectangle::drawRect(QPainter &p)
+{
+ Q_D(QDeclarativeRectangle);
+ if ((d->gradient && d->gradient->gradient())
+ || d->radius > width()/2 || d->radius > height()/2) {
+ // XXX This path is still slower than the image path
+ // Image path won't work for gradients or invalid radius though
+ bool oldAA = p.testRenderHint(QPainter::Antialiasing);
+ if (d->smooth)
+ p.setRenderHint(QPainter::Antialiasing);
+ if (d->pen && d->pen->isValid()) {
+ QPen pn(QColor(d->pen->color()), d->pen->width());
+ p.setPen(pn);
+ } else {
+ p.setPen(Qt::NoPen);
+ }
+ if (d->gradient && d->gradient->gradient())
+ p.setBrush(*d->gradient->gradient());
+ else
+ p.setBrush(d->color);
+ const int pw = d->pen && d->pen->isValid() ? d->pen->width() : 0;
+ QRectF rect;
+ if (pw%2)
+ rect = QRectF(0.5, 0.5, width()-1, height()-1);
+ else
+ rect = QRectF(0, 0, width(), height());
+ qreal radius = d->radius;
+ if (radius > width()/2 || radius > height()/2)
+ radius = qMin(width()/2, height()/2);
+ if (radius > 0.)
+ p.drawRoundedRect(rect, radius, radius);
+ else
+ p.drawRect(rect);
+ if (d->smooth)
+ p.setRenderHint(QPainter::Antialiasing, oldAA);
+ } else {
+ bool oldAA = p.testRenderHint(QPainter::Antialiasing);
+ bool oldSmooth = p.testRenderHint(QPainter::SmoothPixmapTransform);
+ if (d->smooth)
+ p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, d->smooth);
+
+ const int pw = d->pen && d->pen->isValid() ? (d->pen->width()+1)/2*2 : 0;
+
+ if (d->radius > 0)
+ generateRoundedRect();
+ else
+ generateBorderedRect();
+
+ int xOffset = (d->rectImage.width()-1)/2;
+ int yOffset = (d->rectImage.height()-1)/2;
+ Q_ASSERT(d->rectImage.width() == 2*xOffset + 1);
+ Q_ASSERT(d->rectImage.height() == 2*yOffset + 1);
+
+ QMargins margins(xOffset, yOffset, xOffset, yOffset);
+ QTileRules rules(Qt::StretchTile, Qt::StretchTile);
+ //NOTE: even though our item may have qreal-based width and height, qDrawBorderPixmap only supports QRects
+ qDrawBorderPixmap(&p, QRect(-pw/2, -pw/2, width()+pw, height()+pw), margins, d->rectImage, d->rectImage.rect(), margins, rules);
+
+ if (d->smooth) {
+ p.setRenderHint(QPainter::Antialiasing, oldAA);
+ p.setRenderHint(QPainter::SmoothPixmapTransform, oldSmooth);
+ }
+ }
+}
+
+/*!
+ \qmlproperty bool Rectangle::smooth
+
+ Set this property if you want the item to be smoothly scaled or
+ transformed. Smooth filtering gives better visual quality, but is slower. If
+ the item is displayed at its natural size, this property has no visual or
+ performance effect.
+
+ \note Generally scaling artifacts are only visible if the item is stationary on
+ the screen. A common pattern when animating an item is to disable smooth
+ filtering at the beginning of the animation and reenable it at the conclusion.
+
+ \image rect-smooth.png
+*/
+
+QRectF QDeclarativeRectangle::boundingRect() const
+{
+ Q_D(const QDeclarativeRectangle);
+ return QRectF(-d->paintmargin, -d->paintmargin, d->width+d->paintmargin*2, d->height+d->paintmargin*2);
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle_p.h b/src/declarative/graphicsitems/qdeclarativerectangle_p.h
new file mode 100644
index 0000000000..7272962e17
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativerectangle_p.h
@@ -0,0 +1,186 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVERECT_H
+#define QDECLARATIVERECT_H
+
+#include "qdeclarativeitem.h"
+
+#include <QtGui/qbrush.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+class Q_DECLARATIVE_EXPORT QDeclarativePen : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(int width READ width WRITE setWidth NOTIFY penChanged)
+ Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY penChanged)
+public:
+ QDeclarativePen(QObject *parent=0)
+ : QObject(parent), _width(1), _color("#000000"), _valid(false)
+ {}
+
+ int width() const { return _width; }
+ void setWidth(int w);
+
+ QColor color() const { return _color; }
+ void setColor(const QColor &c);
+
+ bool isValid() { return _valid; };
+
+Q_SIGNALS:
+ void penChanged();
+
+private:
+ int _width;
+ QColor _color;
+ bool _valid;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeGradientStop : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(qreal position READ position WRITE setPosition)
+ Q_PROPERTY(QColor color READ color WRITE setColor)
+
+public:
+ QDeclarativeGradientStop(QObject *parent=0) : QObject(parent) {}
+
+ qreal position() const { return m_position; }
+ void setPosition(qreal position) { m_position = position; updateGradient(); }
+
+ QColor color() const { return m_color; }
+ void setColor(const QColor &color) { m_color = color; updateGradient(); }
+
+private:
+ void updateGradient();
+
+private:
+ qreal m_position;
+ QColor m_color;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeGradient : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QDeclarativeListProperty<QDeclarativeGradientStop> stops READ stops)
+ Q_CLASSINFO("DefaultProperty", "stops")
+
+public:
+ QDeclarativeGradient(QObject *parent=0) : QObject(parent), m_gradient(0) {}
+ ~QDeclarativeGradient() { delete m_gradient; }
+
+ QDeclarativeListProperty<QDeclarativeGradientStop> stops() { return QDeclarativeListProperty<QDeclarativeGradientStop>(this, m_stops); }
+
+ const QGradient *gradient() const;
+
+Q_SIGNALS:
+ void updated();
+
+private:
+ void doUpdate();
+
+private:
+ QList<QDeclarativeGradientStop *> m_stops;
+ mutable QGradient *m_gradient;
+ friend class QDeclarativeGradientStop;
+};
+
+class QDeclarativeRectanglePrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeRectangle : public QDeclarativeItem
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
+ Q_PROPERTY(QDeclarativeGradient *gradient READ gradient WRITE setGradient)
+ Q_PROPERTY(QDeclarativePen * border READ border CONSTANT)
+ Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
+public:
+ QDeclarativeRectangle(QDeclarativeItem *parent=0);
+
+ QColor color() const;
+ void setColor(const QColor &);
+
+ QDeclarativePen *border();
+
+ QDeclarativeGradient *gradient() const;
+ void setGradient(QDeclarativeGradient *gradient);
+
+ qreal radius() const;
+ void setRadius(qreal radius);
+
+ QRectF boundingRect() const;
+
+ void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
+
+Q_SIGNALS:
+ void colorChanged();
+ void radiusChanged();
+
+private Q_SLOTS:
+ void doUpdate();
+
+private:
+ void generateRoundedRect();
+ void generateBorderedRect();
+ void drawRect(QPainter &painter);
+
+private:
+ Q_DISABLE_COPY(QDeclarativeRectangle)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeRectangle)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativePen)
+QML_DECLARE_TYPE(QDeclarativeGradientStop)
+QML_DECLARE_TYPE(QDeclarativeGradient)
+QML_DECLARE_TYPE(QDeclarativeRectangle)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVERECT_H
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle_p_p.h b/src/declarative/graphicsitems/qdeclarativerectangle_p_p.h
new file mode 100644
index 0000000000..6bae219072
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativerectangle_p_p.h
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVERECT_P_H
+#define QDECLARATIVERECT_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeitem_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeGradient;
+class QDeclarativeRectangle;
+class QDeclarativeRectanglePrivate : public QDeclarativeItemPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeRectangle)
+
+public:
+ QDeclarativeRectanglePrivate() :
+ color(Qt::white), gradient(0), pen(0), radius(0), paintmargin(0)
+ {
+ QGraphicsItemPrivate::flags = QGraphicsItemPrivate::flags & ~QGraphicsItem::ItemHasNoContents;
+ }
+
+ ~QDeclarativeRectanglePrivate()
+ {
+ delete pen;
+ }
+
+ QColor color;
+ QDeclarativeGradient *gradient;
+ QDeclarativePen *pen;
+ qreal radius;
+ qreal paintmargin;
+ QPixmap rectImage;
+
+ QDeclarativePen *getPen() {
+ if (!pen) {
+ Q_Q(QDeclarativeRectangle);
+ pen = new QDeclarativePen;
+ QObject::connect(pen, SIGNAL(penChanged()), q, SLOT(doUpdate()));
+ }
+ return pen;
+ }
+
+ void setPaintMargin(qreal margin)
+ {
+ Q_Q(QDeclarativeRectangle);
+ if (margin == paintmargin)
+ return;
+ q->prepareGeometryChange();
+ paintmargin = margin;
+ }
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVERECT_P_H
diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
new file mode 100644
index 0000000000..e4cd499ad1
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
@@ -0,0 +1,335 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativerepeater_p.h"
+#include "qdeclarativerepeater_p_p.h"
+
+#include "qdeclarativevisualitemmodel_p.h"
+
+#include <qdeclarativelistaccessor_p.h>
+
+#include <qlistmodelinterface_p.h>
+
+QT_BEGIN_NAMESPACE
+QDeclarativeRepeaterPrivate::QDeclarativeRepeaterPrivate()
+: model(0), ownModel(false)
+{
+}
+
+QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate()
+{
+ if (ownModel)
+ delete model;
+}
+
+/*!
+ \qmlclass Repeater QDeclarativeRepeater
+ \since 4.7
+ \inherits Item
+
+ \brief The Repeater item allows you to repeat a component based on a model.
+
+ The Repeater item is used when you want to create a large number of
+ similar items. For each entry in the model, an item is instantiated
+ in a context seeded with data from the model. If the repeater will
+ be instantiating a large number of instances, it may be more efficient to
+ use one of Qt Declarative's \l {xmlViews}{view items}.
+
+ The model may be either an object list, a string list, a number or a Qt model.
+ In each case, the data element and the index is exposed to each instantiated
+ component.
+
+ The index is always exposed as an accessible \c index property.
+ In the case of an object or string list, the data element (of type string
+ or object) is available as the \c modelData property. In the case of a Qt model,
+ all roles are available as named properties just like in the view classes. The
+ following example shows how to use the index property inside the instantiated
+ items.
+
+ \snippet doc/src/snippets/declarative/repeater-index.qml 0
+
+ \image repeater-index.png
+
+ Items instantiated by the Repeater are inserted, in order, as
+ children of the Repeater's parent. The insertion starts immediately after
+ the repeater's position in its parent stacking list. This is to allow
+ you to use a Repeater inside a layout. The following QML example shows how
+ the instantiated items would visually appear stacked between the red and
+ blue rectangles.
+
+ \snippet doc/src/snippets/declarative/repeater.qml 0
+
+ \image repeater.png
+
+ The repeater instance continues to own all items it instantiates, even
+ if they are otherwise manipulated. It is illegal to manually remove an item
+ created by the Repeater.
+ */
+
+/*!
+ \internal
+ \class QDeclarativeRepeater
+ \qmlclass Repeater
+
+ XXX Repeater is very conservative in how it instatiates/deletes items. Also
+ new model entries will not be created and old ones will not be removed.
+ */
+
+/*!
+ Create a new QDeclarativeRepeater instance.
+ */
+QDeclarativeRepeater::QDeclarativeRepeater(QDeclarativeItem *parent)
+ : QDeclarativeItem(*(new QDeclarativeRepeaterPrivate), parent)
+{
+}
+
+/*!
+ Destroy the repeater instance. All items it instantiated are also
+ destroyed.
+ */
+QDeclarativeRepeater::~QDeclarativeRepeater()
+{
+}
+
+/*!
+ \qmlproperty any Repeater::model
+
+ The model providing data for the repeater.
+
+ The model may be either an object list, a string list, a number or a Qt model.
+ In each case, the data element and the index is exposed to each instantiated
+ component. The index is always exposed as an accessible \c index property.
+ In the case of an object or string list, the data element (of type string
+ or object) is available as the \c modelData property. In the case of a Qt model,
+ all roles are available as named properties just like in the view classes.
+
+ As a special case the model can also be merely a number. In this case it will
+ create that many instances of the component. They will also be assigned an index
+ based on the order they are created.
+
+ Models can also be created directly in QML, using a \l{ListModel} or \l{XmlListModel}.
+
+ \sa {qmlmodels}{Data Models}
+*/
+QVariant QDeclarativeRepeater::model() const
+{
+ Q_D(const QDeclarativeRepeater);
+ return d->dataSource;
+}
+
+void QDeclarativeRepeater::setModel(const QVariant &model)
+{
+ Q_D(QDeclarativeRepeater);
+ if (d->dataSource == model)
+ return;
+
+ clear();
+ if (d->model) {
+ disconnect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
+ disconnect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
+ disconnect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
+ disconnect(d->model, SIGNAL(modelReset()), this, SLOT(modelReset()));
+ /*
+ disconnect(d->model, SIGNAL(createdItem(int, QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
+ disconnect(d->model, SIGNAL(destroyingItem(QDeclarativeItem*)), this, SLOT(destroyingItem(QDeclarativeItem*)));
+ */
+ }
+ d->dataSource = model;
+ emit modelChanged();
+ QObject *object = qvariant_cast<QObject*>(model);
+ QDeclarativeVisualModel *vim = 0;
+ if (object && (vim = qobject_cast<QDeclarativeVisualModel *>(object))) {
+ if (d->ownModel) {
+ delete d->model;
+ d->ownModel = false;
+ }
+ d->model = vim;
+ } else {
+ if (!d->ownModel) {
+ d->model = new QDeclarativeVisualDataModel(qmlContext(this));
+ d->ownModel = true;
+ }
+ if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model))
+ dataModel->setModel(model);
+ }
+ if (d->model) {
+ connect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
+ connect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
+ connect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
+ connect(d->model, SIGNAL(modelReset()), this, SLOT(modelReset()));
+ /*
+ connect(d->model, SIGNAL(createdItem(int, QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
+ connect(d->model, SIGNAL(destroyingItem(QDeclarativeItem*)), this, SLOT(destroyingItem(QDeclarativeItem*)));
+ */
+ regenerate();
+ emit countChanged();
+ }
+}
+
+/*!
+ \qmlproperty Component Repeater::delegate
+ \default
+
+ The delegate provides a template defining each item instantiated by the repeater.
+ The index is exposed as an accessible \c index property. Properties of the
+ model are also available depending upon the type of \l {qmlmodels}{Data Model}.
+ */
+QDeclarativeComponent *QDeclarativeRepeater::delegate() const
+{
+ Q_D(const QDeclarativeRepeater);
+ if (d->model) {
+ if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model))
+ return dataModel->delegate();
+ }
+
+ return 0;
+}
+
+void QDeclarativeRepeater::setDelegate(QDeclarativeComponent *delegate)
+{
+ Q_D(QDeclarativeRepeater);
+ if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model))
+ if (delegate == dataModel->delegate())
+ return;
+
+ if (!d->ownModel) {
+ d->model = new QDeclarativeVisualDataModel(qmlContext(this));
+ d->ownModel = true;
+ }
+ if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model)) {
+ dataModel->setDelegate(delegate);
+ regenerate();
+ emit delegateChanged();
+ }
+}
+
+/*!
+ \qmlproperty int Repeater::count
+
+ This property holds the number of items in the repeater.
+*/
+int QDeclarativeRepeater::count() const
+{
+ Q_D(const QDeclarativeRepeater);
+ if (d->model)
+ return d->model->count();
+ return 0;
+}
+
+
+/*!
+ \internal
+ */
+void QDeclarativeRepeater::componentComplete()
+{
+ QDeclarativeItem::componentComplete();
+ regenerate();
+}
+
+/*!
+ \internal
+ */
+QVariant QDeclarativeRepeater::itemChange(GraphicsItemChange change,
+ const QVariant &value)
+{
+ QVariant rv = QDeclarativeItem::itemChange(change, value);
+ if (change == ItemParentHasChanged) {
+ regenerate();
+ }
+
+ return rv;
+}
+
+void QDeclarativeRepeater::clear()
+{
+ Q_D(QDeclarativeRepeater);
+ if (d->model) {
+ foreach (QDeclarativeItem *item, d->deletables) {
+ item->setParentItem(this);
+ d->model->release(item);
+ }
+ }
+ d->deletables.clear();
+}
+
+/*!
+ \internal
+ */
+void QDeclarativeRepeater::regenerate()
+{
+ Q_D(QDeclarativeRepeater);
+
+ clear();
+
+ if (!d->model || !d->model->count() || !d->model->isValid() || !parentItem() || !isComponentComplete())
+ return;
+
+ for (int ii = 0; ii < count(); ++ii) {
+ QDeclarativeItem *item = d->model->item(ii);
+ if (item) {
+ item->setParent(parentItem());
+ item->stackBefore(this);
+ d->deletables << item;
+ }
+ }
+}
+
+void QDeclarativeRepeater::itemsInserted(int, int)
+{
+ regenerate();
+}
+
+void QDeclarativeRepeater::itemsRemoved(int, int)
+{
+ regenerate();
+}
+
+void QDeclarativeRepeater::itemsMoved(int,int,int)
+{
+ regenerate();
+}
+
+void QDeclarativeRepeater::modelReset()
+{
+ regenerate();
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativerepeater_p.h b/src/declarative/graphicsitems/qdeclarativerepeater_p.h
new file mode 100644
index 0000000000..db46699e58
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativerepeater_p.h
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEREPEATER_H
+#define QDECLARATIVEREPEATER_H
+
+#include "qdeclarativeitem.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeRepeaterPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeRepeater : public QDeclarativeItem
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged)
+ Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
+ Q_PROPERTY(int count READ count NOTIFY countChanged)
+ Q_CLASSINFO("DefaultProperty", "delegate")
+
+public:
+ QDeclarativeRepeater(QDeclarativeItem *parent=0);
+ virtual ~QDeclarativeRepeater();
+
+ QVariant model() const;
+ void setModel(const QVariant &);
+
+ QDeclarativeComponent *delegate() const;
+ void setDelegate(QDeclarativeComponent *);
+
+ int count() const;
+
+Q_SIGNALS:
+ void modelChanged();
+ void delegateChanged();
+ void countChanged();
+private:
+ void clear();
+ void regenerate();
+
+protected:
+ virtual void componentComplete();
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value);
+
+private Q_SLOTS:
+ void itemsInserted(int,int);
+ void itemsRemoved(int,int);
+ void itemsMoved(int,int,int);
+ void modelReset();
+
+private:
+ Q_DISABLE_COPY(QDeclarativeRepeater)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeRepeater)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeRepeater)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEREPEATER_H
diff --git a/src/declarative/graphicsitems/qdeclarativerepeater_p_p.h b/src/declarative/graphicsitems/qdeclarativerepeater_p_p.h
new file mode 100644
index 0000000000..11773ff59b
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativerepeater_p_p.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEREPEATER_P_H
+#define QDECLARATIVEREPEATER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativerepeater_p.h"
+
+#include "qdeclarativeitem_p.h"
+
+#include <QPointer>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeContext;
+class QDeclarativeVisualModel;
+class QDeclarativeRepeaterPrivate : public QDeclarativeItemPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeRepeater)
+
+public:
+ QDeclarativeRepeaterPrivate();
+ ~QDeclarativeRepeaterPrivate();
+
+ QDeclarativeVisualModel *model;
+ QVariant dataSource;
+ bool ownModel;
+
+ QList<QPointer<QDeclarativeItem> > deletables;
+};
+
+QT_END_NAMESPACE
+#endif // QDECLARATIVEREPEATER_P_H
diff --git a/src/declarative/graphicsitems/qdeclarativescalegrid.cpp b/src/declarative/graphicsitems/qdeclarativescalegrid.cpp
new file mode 100644
index 0000000000..dbc7568179
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativescalegrid.cpp
@@ -0,0 +1,212 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativescalegrid_p_p.h"
+
+#include <qdeclarative.h>
+
+#include <QBuffer>
+#include <QDebug>
+
+QT_BEGIN_NAMESPACE
+/*!
+ \internal
+ \class QDeclarativeScaleGrid
+ \brief The QDeclarativeScaleGrid class allows you to specify a 3x3 grid to use in scaling an image.
+*/
+
+QDeclarativeScaleGrid::QDeclarativeScaleGrid(QObject *parent) : QObject(parent), _left(0), _top(0), _right(0), _bottom(0)
+{
+}
+
+QDeclarativeScaleGrid::~QDeclarativeScaleGrid()
+{
+}
+
+bool QDeclarativeScaleGrid::isNull() const
+{
+ return !_left && !_top && !_right && !_bottom;
+}
+
+void QDeclarativeScaleGrid::setLeft(int pos)
+{
+ if (_left != pos) {
+ _left = pos;
+ emit borderChanged();
+ }
+}
+
+void QDeclarativeScaleGrid::setTop(int pos)
+{
+ if (_top != pos) {
+ _top = pos;
+ emit borderChanged();
+ }
+}
+
+void QDeclarativeScaleGrid::setRight(int pos)
+{
+ if (_right != pos) {
+ _right = pos;
+ emit borderChanged();
+ }
+}
+
+void QDeclarativeScaleGrid::setBottom(int pos)
+{
+ if (_bottom != pos) {
+ _bottom = pos;
+ emit borderChanged();
+ }
+}
+
+QDeclarativeGridScaledImage::QDeclarativeGridScaledImage()
+: _l(-1), _r(-1), _t(-1), _b(-1),
+ _h(QDeclarativeBorderImage::Stretch), _v(QDeclarativeBorderImage::Stretch)
+{
+}
+
+QDeclarativeGridScaledImage::QDeclarativeGridScaledImage(const QDeclarativeGridScaledImage &o)
+: _l(o._l), _r(o._r), _t(o._t), _b(o._b), _h(o._h), _v(o._v), _pix(o._pix)
+{
+}
+
+QDeclarativeGridScaledImage &QDeclarativeGridScaledImage::operator=(const QDeclarativeGridScaledImage &o)
+{
+ _l = o._l;
+ _r = o._r;
+ _t = o._t;
+ _b = o._b;
+ _h = o._h;
+ _v = o._v;
+ _pix = o._pix;
+ return *this;
+}
+
+QDeclarativeGridScaledImage::QDeclarativeGridScaledImage(QIODevice *data)
+: _l(-1), _r(-1), _t(-1), _b(-1), _h(QDeclarativeBorderImage::Stretch), _v(QDeclarativeBorderImage::Stretch)
+{
+ int l = -1;
+ int r = -1;
+ int t = -1;
+ int b = -1;
+ QString imgFile;
+
+ while(!data->atEnd()) {
+ QString line = QString::fromUtf8(data->readLine().trimmed());
+ if (line.isEmpty() || line.startsWith(QLatin1Char('#')))
+ continue;
+
+ QStringList list = line.split(QLatin1Char(':'));
+ if (list.count() != 2)
+ return;
+
+ list[0] = list[0].trimmed();
+ list[1] = list[1].trimmed();
+
+ if (list[0] == QLatin1String("border.left"))
+ l = list[1].toInt();
+ else if (list[0] == QLatin1String("border.right"))
+ r = list[1].toInt();
+ else if (list[0] == QLatin1String("border.top"))
+ t = list[1].toInt();
+ else if (list[0] == QLatin1String("border.bottom"))
+ b = list[1].toInt();
+ else if (list[0] == QLatin1String("source"))
+ imgFile = list[1];
+ else if (list[0] == QLatin1String("horizontalTileRule"))
+ _h = stringToRule(list[1]);
+ else if (list[0] == QLatin1String("verticalTileRule"))
+ _v = stringToRule(list[1]);
+ }
+
+ if (l < 0 || r < 0 || t < 0 || b < 0 || imgFile.isEmpty())
+ return;
+
+ _l = l; _r = r; _t = t; _b = b;
+
+ _pix = imgFile;
+}
+
+QDeclarativeBorderImage::TileMode QDeclarativeGridScaledImage::stringToRule(const QString &s)
+{
+ if (s == QLatin1String("Stretch"))
+ return QDeclarativeBorderImage::Stretch;
+ if (s == QLatin1String("Repeat"))
+ return QDeclarativeBorderImage::Repeat;
+ if (s == QLatin1String("Round"))
+ return QDeclarativeBorderImage::Round;
+
+ qWarning() << "Unknown tile rule specified. Using Stretch";
+ return QDeclarativeBorderImage::Stretch;
+}
+
+bool QDeclarativeGridScaledImage::isValid() const
+{
+ return _l >= 0;
+}
+
+int QDeclarativeGridScaledImage::gridLeft() const
+{
+ return _l;
+}
+
+int QDeclarativeGridScaledImage::gridRight() const
+{
+ return _r;
+}
+
+int QDeclarativeGridScaledImage::gridTop() const
+{
+ return _t;
+}
+
+int QDeclarativeGridScaledImage::gridBottom() const
+{
+ return _b;
+}
+
+QString QDeclarativeGridScaledImage::pixmapUrl() const
+{
+ return _pix;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativescalegrid_p_p.h b/src/declarative/graphicsitems/qdeclarativescalegrid_p_p.h
new file mode 100644
index 0000000000..fbf90403b6
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativescalegrid_p_p.h
@@ -0,0 +1,133 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVESCALEGRID_H
+#define QDECLARATIVESCALEGRID_H
+
+#include "qdeclarativeborderimage_p.h"
+
+#include <private/qdeclarativepixmapcache_p.h>
+#include <qdeclarative.h>
+
+#include <QtCore/QString>
+#include <QtCore/QObject>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class Q_DECLARATIVE_EXPORT QDeclarativeScaleGrid : public QObject
+{
+ Q_OBJECT
+ Q_ENUMS(TileRule)
+
+ Q_PROPERTY(int left READ left WRITE setLeft NOTIFY borderChanged)
+ Q_PROPERTY(int top READ top WRITE setTop NOTIFY borderChanged)
+ Q_PROPERTY(int right READ right WRITE setRight NOTIFY borderChanged)
+ Q_PROPERTY(int bottom READ bottom WRITE setBottom NOTIFY borderChanged)
+
+public:
+ QDeclarativeScaleGrid(QObject *parent=0);
+ ~QDeclarativeScaleGrid();
+
+ bool isNull() const;
+
+ int left() const { return _left; }
+ void setLeft(int);
+
+ int top() const { return _top; }
+ void setTop(int);
+
+ int right() const { return _right; }
+ void setRight(int);
+
+ int bottom() const { return _bottom; }
+ void setBottom(int);
+
+Q_SIGNALS:
+ void borderChanged();
+
+private:
+ int _left;
+ int _top;
+ int _right;
+ int _bottom;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeGridScaledImage
+{
+public:
+ QDeclarativeGridScaledImage();
+ QDeclarativeGridScaledImage(const QDeclarativeGridScaledImage &);
+ QDeclarativeGridScaledImage(QIODevice*);
+ QDeclarativeGridScaledImage &operator=(const QDeclarativeGridScaledImage &);
+ bool isValid() const;
+ int gridLeft() const;
+ int gridRight() const;
+ int gridTop() const;
+ int gridBottom() const;
+ QDeclarativeBorderImage::TileMode horizontalTileRule() const { return _h; }
+ QDeclarativeBorderImage::TileMode verticalTileRule() const { return _v; }
+
+ QString pixmapUrl() const;
+
+private:
+ static QDeclarativeBorderImage::TileMode stringToRule(const QString &);
+
+private:
+ int _l;
+ int _r;
+ int _t;
+ int _b;
+ QDeclarativeBorderImage::TileMode _h;
+ QDeclarativeBorderImage::TileMode _v;
+ QString _pix;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeScaleGrid)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVESCALEGRID_H
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
new file mode 100644
index 0000000000..05139f6c21
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
@@ -0,0 +1,934 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativetext_p.h"
+#include "qdeclarativetext_p_p.h"
+#include <qdeclarativestyledtext_p.h>
+
+#include <qfxperf_p_p.h>
+
+#include <QTextLayout>
+#include <QTextLine>
+#include <QTextDocument>
+#include <QTextCursor>
+#include <QGraphicsSceneMouseEvent>
+#include <QPainter>
+#include <QAbstractTextDocumentLayout>
+#include <qmath.h>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \qmlclass Text QDeclarativeText
+ \since 4.7
+ \brief The Text item allows you to add formatted text to a scene.
+ \inherits Item
+
+ It can display both plain and rich text. For example:
+
+ \qml
+ Text { text: "Hello World!"; font.family: "Helvetica"; font.pointSize: 24; color: "red" }
+ Text { text: "<b>Hello</b> <i>World!</i>" }
+ \endqml
+
+ \image declarative-text.png
+
+ If height and width are not explicitly set, Text will attempt to determine how
+ much room is needed and set it accordingly. Unless \c wrap is set, it will always
+ prefer width to height (all text will be placed on a single line).
+
+ The \c elide property can alternatively be used to fit a single line of
+ plain text to a set width.
+
+ Text provides read-only text. For editable text, see \l TextEdit.
+*/
+
+/*!
+ \internal
+ \class QDeclarativeText
+ \qmlclass Text
+ \ingroup group_coreitems
+
+ \brief The QDeclarativeText class provides a formatted text item that you can add to a QDeclarativeView.
+
+ Text was designed for read-only text; it does not allow for any text editing.
+ It can display both plain and rich text. For example:
+
+ \qml
+ Text { text: "Hello World!"; font.family: "Helvetica"; font.pointSize: 24; color: "red" }
+ Text { text: "<b>Hello</b> <i>World!</i>" }
+ \endqml
+
+ \image text.png
+
+ If height and width are not explicitly set, Text will attempt to determine how
+ much room is needed and set it accordingly. Unless \c wrap is set, it will always
+ prefer width to height (all text will be placed on a single line).
+
+ The \c elide property can alternatively be used to fit a line of plain text to a set width.
+
+ A QDeclarativeText object can be instantiated in Qml using the tag \c Text.
+*/
+QDeclarativeText::QDeclarativeText(QDeclarativeItem *parent)
+ : QDeclarativeItem(*(new QDeclarativeTextPrivate), parent)
+{
+}
+
+QDeclarativeText::~QDeclarativeText()
+{
+}
+
+
+QDeclarativeTextPrivate::~QDeclarativeTextPrivate()
+{
+}
+
+/*!
+ \qmlproperty string Text::font.family
+ \qmlproperty bool Text::font.bold
+ \qmlproperty bool Text::font.italic
+ \qmlproperty bool Text::font.underline
+ \qmlproperty real Text::font.pointSize
+ \qmlproperty int Text::font.pixelSize
+
+ Set the Text's font attributes.
+*/
+QFont QDeclarativeText::font() const
+{
+ Q_D(const QDeclarativeText);
+ return d->font;
+}
+
+void QDeclarativeText::setFont(const QFont &font)
+{
+ Q_D(QDeclarativeText);
+ if (d->font == font)
+ return;
+
+ d->font = font;
+
+ d->updateLayout();
+ d->markImgDirty();
+ emit fontChanged(d->font);
+}
+
+void QDeclarativeText::setText(const QString &n)
+{
+#ifdef Q_ENABLE_PERFORMANCE_LOG
+ QDeclarativePerfTimer<QDeclarativePerf::QDeclarativeText_setText> st;
+#endif
+ Q_D(QDeclarativeText);
+ if (d->text == n)
+ return;
+
+ d->richText = d->format == RichText || (d->format == AutoText && Qt::mightBeRichText(n));
+ if (d->richText) {
+ if (!d->doc) {
+ d->doc = new QTextDocument(this);
+ d->doc->setDocumentMargin(0);
+ }
+ d->doc->setHtml(n);
+ }
+
+ d->text = n;
+ d->updateLayout();
+ d->markImgDirty();
+ emit textChanged(d->text);
+}
+
+/*!
+ \qmlproperty string Text::text
+
+ The text to display. Text supports both plain and rich text strings.
+
+ The item will try to automatically determine whether the text should
+ be treated as rich text. This determination is made using Qt::mightBeRichText().
+*/
+QString QDeclarativeText::text() const
+{
+ Q_D(const QDeclarativeText);
+ return d->text;
+}
+
+void QDeclarativeText::setColor(const QColor &color)
+{
+ Q_D(QDeclarativeText);
+ if (d->color == color)
+ return;
+
+ d->color = color;
+ d->markImgDirty();
+ emit colorChanged(d->color);
+}
+
+/*!
+ \qmlproperty color Text::color
+
+ The text color.
+
+ \qml
+ //green text using hexadecimal notation
+ Text { color: "#00FF00"; ... }
+
+ //steelblue text using SVG color name
+ Text { color: "steelblue"; ... }
+ \endqml
+*/
+
+QColor QDeclarativeText::color() const
+{
+ Q_D(const QDeclarativeText);
+ return d->color;
+}
+
+/*!
+ \qmlproperty enumeration Text::style
+
+ Set an additional text style.
+
+ Supported text styles are \c Normal, \c Outline, \c Raised and \c Sunken.
+
+ \qml
+ Row {
+ Text { font.pointSize: 24; text: "Normal" }
+ Text { font.pointSize: 24; text: "Raised"; style: Text.Raised; styleColor: "#AAAAAA" }
+ Text { font.pointSize: 24; text: "Outline"; style: Text.Outline; styleColor: "red" }
+ Text { font.pointSize: 24; text: "Sunken"; style: Text.Sunken; styleColor: "#AAAAAA" }
+ }
+ \endqml
+
+ \image declarative-textstyle.png
+*/
+QDeclarativeText::TextStyle QDeclarativeText::style() const
+{
+ Q_D(const QDeclarativeText);
+ return d->style;
+}
+
+void QDeclarativeText::setStyle(QDeclarativeText::TextStyle style)
+{
+ Q_D(QDeclarativeText);
+ if (d->style == style)
+ return;
+
+ d->style = style;
+ d->markImgDirty();
+ emit styleChanged(d->style);
+}
+
+void QDeclarativeText::setStyleColor(const QColor &color)
+{
+ Q_D(QDeclarativeText);
+ if (d->styleColor == color)
+ return;
+
+ d->styleColor = color;
+ d->markImgDirty();
+ emit styleColorChanged(d->styleColor);
+}
+
+/*!
+ \qmlproperty color Text::styleColor
+
+ Defines the secondary color used by text styles.
+
+ \c styleColor is used as the outline color for outlined text, and as the
+ shadow color for raised or sunken text. If no style has been set, it is not
+ used at all.
+ */
+QColor QDeclarativeText::styleColor() const
+{
+ Q_D(const QDeclarativeText);
+ return d->styleColor;
+}
+
+/*!
+ \qmlproperty enumeration Text::horizontalAlignment
+ \qmlproperty enumeration Text::verticalAlignment
+
+ Sets the horizontal and vertical alignment of the text within the Text items
+ width and height. By default, the text is top-left aligned.
+
+ The valid values for \c horizontalAlignment are \c AlignLeft, \c AlignRight and
+ \c AlignHCenter. The valid values for \c verticalAlignment are \c AlignTop, \c AlignBottom
+ and \c AlignVCenter.
+*/
+QDeclarativeText::HAlignment QDeclarativeText::hAlign() const
+{
+ Q_D(const QDeclarativeText);
+ return d->hAlign;
+}
+
+void QDeclarativeText::setHAlign(HAlignment align)
+{
+ Q_D(QDeclarativeText);
+ if (d->hAlign == align)
+ return;
+
+ d->hAlign = align;
+ emit horizontalAlignmentChanged(align);
+}
+
+QDeclarativeText::VAlignment QDeclarativeText::vAlign() const
+{
+ Q_D(const QDeclarativeText);
+ return d->vAlign;
+}
+
+void QDeclarativeText::setVAlign(VAlignment align)
+{
+ Q_D(QDeclarativeText);
+ if (d->vAlign == align)
+ return;
+
+ d->vAlign = align;
+ emit verticalAlignmentChanged(align);
+}
+
+/*!
+ \qmlproperty bool Text::wrap
+
+ Set this property to wrap the text to the Text item's width. The text will only
+ wrap if an explicit width has been set.
+
+ Wrapping is done on word boundaries (i.e. it is a "word-wrap"). If the text cannot be
+ word-wrapped to the specified width it will be partially drawn outside of the item's bounds.
+ If this is undesirable then enable clipping on the item (Item::clip).
+
+ Wrapping is off by default.
+*/
+//### Future may provide choice of wrap modes, such as QTextOption::WrapAtWordBoundaryOrAnywhere
+bool QDeclarativeText::wrap() const
+{
+ Q_D(const QDeclarativeText);
+ return d->wrap;
+}
+
+void QDeclarativeText::setWrap(bool w)
+{
+ Q_D(QDeclarativeText);
+ if (w == d->wrap)
+ return;
+
+ d->wrap = w;
+
+ d->updateLayout();
+ d->markImgDirty();
+ emit wrapChanged(d->wrap);
+}
+
+/*!
+ \qmlproperty enumeration Text::textFormat
+
+ The way the text property should be displayed.
+
+ Supported text formats are \c AutoText, \c PlainText, \c RichText and \c StyledText
+
+ The default is AutoText. If the text format is AutoText the text element
+ will automatically determine whether the text should be treated as
+ rich text. This determination is made using Qt::mightBeRichText().
+
+ StyledText is an optimized format supporting some basic text
+ styling markup, in the style of html 3.2:
+
+ \code
+ <font size="4" color="#ff0000">font size and color</font>
+ <b>bold</b>
+ <i>italic</i>
+ <br>
+ &gt; &lt; &amp;
+ \endcode
+
+ \c StyledText parser is strict, requiring tags to be correctly nested.
+
+ \table
+ \row
+ \o
+ \qml
+Column {
+ TextEdit {
+ font.pointSize: 24
+ text: "<b>Hello</b> <i>World!</i>"
+ }
+ TextEdit {
+ font.pointSize: 24
+ textFormat: "RichText"
+ text: "<b>Hello</b> <i>World!</i>"
+ }
+ TextEdit {
+ font.pointSize: 24
+ textFormat: "PlainText"
+ text: "<b>Hello</b> <i>World!</i>"
+ }
+}
+ \endqml
+ \o \image declarative-textformat.png
+ \endtable
+*/
+
+QDeclarativeText::TextFormat QDeclarativeText::textFormat() const
+{
+ Q_D(const QDeclarativeText);
+ return d->format;
+}
+
+void QDeclarativeText::setTextFormat(TextFormat format)
+{
+ Q_D(QDeclarativeText);
+ if (format == d->format)
+ return;
+ d->format = format;
+ bool wasRich = d->richText;
+ d->richText = format == RichText || (format == AutoText && Qt::mightBeRichText(d->text));
+
+ if (wasRich && !d->richText) {
+ //### delete control? (and vice-versa below)
+ d->updateLayout();
+ d->markImgDirty();
+ } else if (!wasRich && d->richText) {
+ if (!d->doc) {
+ d->doc = new QTextDocument(this);
+ d->doc->setDocumentMargin(0);
+ }
+ d->doc->setHtml(d->text);
+ d->updateLayout();
+ d->markImgDirty();
+ }
+
+ emit textFormatChanged(d->format);
+}
+
+/*!
+ \qmlproperty enumeration Text::elide
+
+ Set this property to elide parts of the text fit to the Text item's width.
+ The text will only elide if an explicit width has been set.
+
+ This property cannot be used with wrap enabled or with rich text.
+
+ Eliding can be \c ElideNone (the default), \c ElideLeft, \c ElideMiddle, or \c ElideRight.
+
+ If the text is a multi-length string, and the mode is not \c ElideNone,
+ the first string that fits will be used, otherwise the last will be elided.
+
+ Multi-length strings are ordered from longest to shortest, separated by the
+ Unicode "String Terminator" character \c U009C (write this in QML with \c{"\u009C"} or \c{"\x9C"}).
+*/
+QDeclarativeText::TextElideMode QDeclarativeText::elideMode() const
+{
+ Q_D(const QDeclarativeText);
+ return d->elideMode;
+}
+
+void QDeclarativeText::setElideMode(QDeclarativeText::TextElideMode mode)
+{
+ Q_D(QDeclarativeText);
+ if (mode == d->elideMode)
+ return;
+
+ d->elideMode = mode;
+
+ d->updateLayout();
+ d->markImgDirty();
+ emit elideModeChanged(d->elideMode);
+}
+
+void QDeclarativeText::geometryChanged(const QRectF &newGeometry,
+ const QRectF &oldGeometry)
+{
+ Q_D(QDeclarativeText);
+ if (newGeometry.width() != oldGeometry.width()) {
+ if (d->wrap || d->elideMode != QDeclarativeText::ElideNone) {
+ //re-elide if needed
+ if (d->singleline && d->elideMode != QDeclarativeText::ElideNone &&
+ isComponentComplete() && widthValid()) {
+
+ QFontMetrics fm(d->font);
+ QString tmp = fm.elidedText(d->text,(Qt::TextElideMode)d->elideMode,width()); // XXX still worth layout...?
+ d->layout.setText(tmp);
+ }
+
+ d->imgDirty = true;
+ d->updateSize();
+ }
+ }
+ QDeclarativeItem::geometryChanged(newGeometry, oldGeometry);
+}
+
+void QDeclarativeTextPrivate::updateLayout()
+{
+ Q_Q(QDeclarativeText);
+ if (q->isComponentComplete()) {
+ //setup instance of QTextLayout for all cases other than richtext
+ if (!richText) {
+ layout.clearLayout();
+ layout.setFont(font);
+ if (format != QDeclarativeText::StyledText) {
+ QString tmp = text;
+ tmp.replace(QLatin1Char('\n'), QChar::LineSeparator);
+ singleline = !tmp.contains(QChar::LineSeparator);
+ if (singleline && elideMode != QDeclarativeText::ElideNone && q->widthValid()) {
+ QFontMetrics fm(font);
+ tmp = fm.elidedText(tmp,(Qt::TextElideMode)elideMode,q->width()); // XXX still worth layout...?
+ }
+ layout.setText(tmp);
+ } else {
+ singleline = false;
+ QDeclarativeStyledText::parse(text, layout);
+ }
+ }
+ updateSize();
+ } else {
+ dirty = true;
+ }
+}
+
+void QDeclarativeTextPrivate::updateSize()
+{
+ Q_Q(QDeclarativeText);
+ if (q->isComponentComplete()) {
+ QFontMetrics fm(font);
+ if (text.isEmpty()) {
+ q->setImplicitHeight(fm.height());
+ return;
+ }
+
+ int dy = q->height();
+ QSize size(0, 0);
+
+ //setup instance of QTextLayout for all cases other than richtext
+ if (!richText) {
+ size = setupTextLayout(&layout);
+ cachedLayoutSize = size;
+ dy -= size.height();
+ } else {
+ singleline = false; // richtext can't elide or be optimized for single-line case
+ doc->setDefaultFont(font);
+ QTextOption option((Qt::Alignment)int(hAlign | vAlign));
+ if (wrap)
+ option.setWrapMode(QTextOption::WordWrap);
+ else
+ option.setWrapMode(QTextOption::NoWrap);
+ doc->setDefaultTextOption(option);
+ if (wrap && !q->heightValid() && q->widthValid())
+ doc->setTextWidth(q->width());
+ else
+ doc->setTextWidth(doc->idealWidth()); // ### Text does not align if width is not set (QTextDoc bug)
+ dy -= (int)doc->size().height();
+ cachedLayoutSize = doc->size().toSize();
+ }
+ int yoff = 0;
+
+ if (q->heightValid()) {
+ if (vAlign == QDeclarativeText::AlignBottom)
+ yoff = dy;
+ else if (vAlign == QDeclarativeText::AlignVCenter)
+ yoff = dy/2;
+ }
+ q->setBaselineOffset(fm.ascent() + yoff);
+
+ //### need to comfirm cost of always setting these for richText
+ q->setImplicitWidth(richText ? (int)doc->idealWidth() : size.width());
+ q->setImplicitHeight(richText ? (int)doc->size().height() : size.height());
+ } else {
+ dirty = true;
+ }
+}
+
+// ### text layout handling should be profiled and optimized as needed
+// what about QStackTextEngine engine(tmp, d->font.font()); QTextLayout textLayout(&engine);
+
+void QDeclarativeTextPrivate::drawOutline()
+{
+ QPixmap img = QPixmap(imgStyleCache.width()+2,imgStyleCache.height()+2);
+ img.fill(Qt::transparent);
+
+ QPainter ppm(&img);
+
+ QPoint pos(imgCache.rect().topLeft());
+ pos += QPoint(-1, 0);
+ ppm.drawPixmap(pos, imgStyleCache);
+ pos += QPoint(2, 0);
+ ppm.drawPixmap(pos, imgStyleCache);
+ pos += QPoint(-1, -1);
+ ppm.drawPixmap(pos, imgStyleCache);
+ pos += QPoint(0, 2);
+ ppm.drawPixmap(pos, imgStyleCache);
+
+ pos += QPoint(0, -1);
+ ppm.drawPixmap(pos, imgCache);
+ ppm.end();
+
+ imgCache = img;
+}
+
+void QDeclarativeTextPrivate::drawOutline(int yOffset)
+{
+ QPixmap img = QPixmap(imgStyleCache.width()+2,imgStyleCache.height()+2);
+ img.fill(Qt::transparent);
+
+ QPainter ppm(&img);
+
+ QPoint pos(imgCache.rect().topLeft());
+ pos += QPoint(0, yOffset);
+ ppm.drawPixmap(pos, imgStyleCache);
+
+ pos += QPoint(0, -yOffset);
+ ppm.drawPixmap(pos, imgCache);
+ ppm.end();
+
+ imgCache = img;
+}
+
+QSize QDeclarativeTextPrivate::setupTextLayout(QTextLayout *layout)
+{
+ Q_Q(QDeclarativeText);
+ layout->setCacheEnabled(true);
+
+ int height = 0;
+ qreal widthUsed = 0;
+ qreal lineWidth = 0;
+
+ //set manual width
+ if ((wrap || elideMode != QDeclarativeText::ElideNone) && q->widthValid())
+ lineWidth = q->width();
+
+ layout->beginLayout();
+
+ while (1) {
+ QTextLine line = layout->createLine();
+ if (!line.isValid())
+ break;
+
+ if ((wrap || elideMode != QDeclarativeText::ElideNone) && q->widthValid())
+ line.setLineWidth(lineWidth);
+ }
+ layout->endLayout();
+
+ int x = 0;
+ for (int i = 0; i < layout->lineCount(); ++i) {
+ QTextLine line = layout->lineAt(i);
+ widthUsed = qMax(widthUsed, line.naturalTextWidth());
+ line.setPosition(QPointF(0, height));
+ height += int(line.height());
+
+ if (!cache) {
+ if (hAlign == QDeclarativeText::AlignLeft) {
+ x = 0;
+ } else if (hAlign == QDeclarativeText::AlignRight) {
+ x = q->width() - (int)line.naturalTextWidth();
+ } else if (hAlign == QDeclarativeText::AlignHCenter) {
+ x = (q->width() - (int)line.naturalTextWidth()) / 2;
+ }
+ line.setPosition(QPoint(x, (int)line.y()));
+ }
+ }
+
+ return QSize(qCeil(widthUsed), height);
+}
+
+QPixmap QDeclarativeTextPrivate::wrappedTextImage(bool drawStyle)
+{
+ //do layout
+ QSize size = cachedLayoutSize;
+
+ int x = 0;
+ for (int i = 0; i < layout.lineCount(); ++i) {
+ QTextLine line = layout.lineAt(i);
+ if (hAlign == QDeclarativeText::AlignLeft) {
+ x = 0;
+ } else if (hAlign == QDeclarativeText::AlignRight) {
+ x = size.width() - (int)line.naturalTextWidth();
+ } else if (hAlign == QDeclarativeText::AlignHCenter) {
+ x = (size.width() - (int)line.naturalTextWidth()) / 2;
+ }
+ line.setPosition(QPoint(x, (int)line.y()));
+ }
+
+ //paint text
+ QPixmap img(size);
+ if (!size.isEmpty()) {
+ img.fill(Qt::transparent);
+ QPainter p(&img);
+ drawWrappedText(&p, QPointF(0,0), drawStyle);
+ }
+ return img;
+}
+
+void QDeclarativeTextPrivate::drawWrappedText(QPainter *p, const QPointF &pos, bool drawStyle)
+{
+ if (drawStyle)
+ p->setPen(styleColor);
+ else
+ p->setPen(color);
+ p->setFont(font);
+ layout.draw(p, pos);
+}
+
+QPixmap QDeclarativeTextPrivate::richTextImage(bool drawStyle)
+{
+ QSize size = doc->size().toSize();
+
+ //paint text
+ QPixmap img(size);
+ img.fill(Qt::transparent);
+ QPainter p(&img);
+
+ QAbstractTextDocumentLayout::PaintContext context;
+
+ if (drawStyle) {
+ context.palette.setColor(QPalette::Text, styleColor);
+ // ### Do we really want this?
+ QTextOption colorOption;
+ colorOption.setFlags(QTextOption::SuppressColors);
+ doc->setDefaultTextOption(colorOption);
+ } else {
+ context.palette.setColor(QPalette::Text, color);
+ }
+ doc->documentLayout()->draw(&p, context);
+ if (drawStyle)
+ doc->setDefaultTextOption(QTextOption());
+ return img;
+}
+
+void QDeclarativeTextPrivate::checkImgCache()
+{
+ if (!imgDirty)
+ return;
+
+ bool empty = text.isEmpty();
+ if (empty) {
+ imgCache = QPixmap();
+ imgStyleCache = QPixmap();
+ } else if (richText) {
+ imgCache = richTextImage(false);
+ if (style != QDeclarativeText::Normal)
+ imgStyleCache = richTextImage(true); //### should use styleColor
+ } else {
+ imgCache = wrappedTextImage(false);
+ if (style != QDeclarativeText::Normal)
+ imgStyleCache = wrappedTextImage(true); //### should use styleColor
+ }
+ if (!empty)
+ switch (style) {
+ case QDeclarativeText::Outline:
+ drawOutline();
+ break;
+ case QDeclarativeText::Sunken:
+ drawOutline(-1);
+ break;
+ case QDeclarativeText::Raised:
+ drawOutline(1);
+ break;
+ default:
+ break;
+ }
+
+ imgDirty = false;
+}
+
+void QDeclarativeText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ Q_D(QDeclarativeText);
+
+ if (d->cache || d->style != Normal) {
+ d->checkImgCache();
+ if (d->imgCache.isNull())
+ return;
+
+ bool oldAA = p->testRenderHint(QPainter::Antialiasing);
+ bool oldSmooth = p->testRenderHint(QPainter::SmoothPixmapTransform);
+ if (d->smooth)
+ p->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, d->smooth);
+
+ int w = width();
+ int h = height();
+
+ int x = 0;
+ int y = 0;
+
+ switch (d->hAlign) {
+ case AlignLeft:
+ x = 0;
+ break;
+ case AlignRight:
+ x = w - d->imgCache.width();
+ break;
+ case AlignHCenter:
+ x = (w - d->imgCache.width()) / 2;
+ break;
+ }
+
+ switch (d->vAlign) {
+ case AlignTop:
+ y = 0;
+ break;
+ case AlignBottom:
+ y = h - d->imgCache.height();
+ break;
+ case AlignVCenter:
+ y = (h - d->imgCache.height()) / 2;
+ break;
+ }
+
+ bool needClip = clip() && (d->imgCache.width() > width() ||
+ d->imgCache.height() > height());
+
+ if (needClip) {
+ p->save();
+ p->setClipRect(boundingRect(), Qt::IntersectClip);
+ }
+ p->drawPixmap(x, y, d->imgCache);
+ if (needClip)
+ p->restore();
+
+ if (d->smooth) {
+ p->setRenderHint(QPainter::Antialiasing, oldAA);
+ p->setRenderHint(QPainter::SmoothPixmapTransform, oldSmooth);
+ }
+ } else {
+ int h = height();
+ int y = 0;
+
+ switch (d->vAlign) {
+ case AlignTop:
+ y = 0;
+ break;
+ case AlignBottom:
+ y = h - d->cachedLayoutSize.height();
+ break;
+ case AlignVCenter:
+ y = (h - d->cachedLayoutSize.height()) / 2;
+ break;
+ }
+ bool needClip = !clip() && (d->cachedLayoutSize.width() > width() ||
+ d->cachedLayoutSize.height() > height());
+
+ if (needClip) {
+ p->save();
+ p->setClipRect(boundingRect(), Qt::IntersectClip);
+ }
+ if (d->richText) {
+ QAbstractTextDocumentLayout::PaintContext context;
+ context.palette.setColor(QPalette::Text, d->color);
+ p->translate(0, y);
+ d->doc->documentLayout()->draw(p, context);
+ p->translate(0, -y);
+ } else {
+ d->drawWrappedText(p, QPointF(0,y), false);
+ }
+ if (needClip)
+ p->restore();
+ }
+}
+
+/*!
+ \qmlproperty bool Text::smooth
+
+ Set this property if you want the text to be smoothly scaled or
+ transformed. Smooth filtering gives better visual quality, but is slower. If
+ the item is displayed at its natural size, this property has no visual or
+ performance effect.
+
+ \note Generally scaling artifacts are only visible if the item is stationary on
+ the screen. A common pattern when animating an item is to disable smooth
+ filtering at the beginning of the animation and reenable it at the conclusion.
+*/
+
+void QDeclarativeText::componentComplete()
+{
+ Q_D(QDeclarativeText);
+#ifdef Q_ENABLE_PERFORMANCE_LOG
+ QDeclarativePerfTimer<QDeclarativePerf::TextComponentComplete> cc;
+#endif
+ QDeclarativeItem::componentComplete();
+ if (d->dirty) {
+ d->updateLayout();
+ d->dirty = false;
+ }
+}
+
+/*!
+ \overload
+ Handles the given mouse \a event.
+ */
+void QDeclarativeText::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeText);
+
+ if (!d->richText || !d->doc || d->doc->documentLayout()->anchorAt(event->pos()).isEmpty()) {
+ event->setAccepted(false);
+ d->activeLink = QString();
+ } else {
+ d->activeLink = d->doc->documentLayout()->anchorAt(event->pos());
+ }
+
+ // ### may malfunction if two of the same links are clicked & dragged onto each other)
+
+ if (!event->isAccepted())
+ QDeclarativeItem::mousePressEvent(event);
+
+}
+
+/*!
+ \qmlsignal Text::linkActivated(link)
+
+ This handler is called when the user clicks on a link embedded in the text.
+*/
+
+/*!
+ \overload
+ Handles the given mouse \a event.
+ */
+void QDeclarativeText::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeText);
+
+ // ### confirm the link, and send a signal out
+ if (d->richText && d->doc && d->activeLink == d->doc->documentLayout()->anchorAt(event->pos()))
+ emit linkActivated(d->activeLink);
+ else
+ event->setAccepted(false);
+
+ if (!event->isAccepted())
+ QDeclarativeItem::mouseReleaseEvent(event);
+}
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativetext_p.h b/src/declarative/graphicsitems/qdeclarativetext_p.h
new file mode 100644
index 0000000000..cbea8f3b2b
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativetext_p.h
@@ -0,0 +1,160 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVETEXT_H
+#define QDECLARATIVETEXT_H
+
+#include "qdeclarativeitem.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+class QDeclarativeTextPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeText : public QDeclarativeItem
+{
+ Q_OBJECT
+ Q_ENUMS(HAlignment)
+ Q_ENUMS(VAlignment)
+ Q_ENUMS(TextStyle)
+ Q_ENUMS(TextFormat)
+ Q_ENUMS(TextElideMode)
+
+ Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
+ Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged)
+ Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
+ Q_PROPERTY(TextStyle style READ style WRITE setStyle NOTIFY styleChanged)
+ Q_PROPERTY(QColor styleColor READ styleColor WRITE setStyleColor NOTIFY styleColorChanged)
+ Q_PROPERTY(HAlignment horizontalAlignment READ hAlign WRITE setHAlign NOTIFY horizontalAlignmentChanged)
+ Q_PROPERTY(VAlignment verticalAlignment READ vAlign WRITE setVAlign NOTIFY verticalAlignmentChanged)
+ Q_PROPERTY(bool wrap READ wrap WRITE setWrap NOTIFY wrapChanged) //### there are several wrap modes in Qt
+ Q_PROPERTY(TextFormat textFormat READ textFormat WRITE setTextFormat NOTIFY textFormatChanged)
+ Q_PROPERTY(TextElideMode elide READ elideMode WRITE setElideMode NOTIFY elideModeChanged) //### elideMode?
+
+public:
+ QDeclarativeText(QDeclarativeItem *parent=0);
+ ~QDeclarativeText();
+
+ enum HAlignment { AlignLeft = Qt::AlignLeft,
+ AlignRight = Qt::AlignRight,
+ AlignHCenter = Qt::AlignHCenter };
+ enum VAlignment { AlignTop = Qt::AlignTop,
+ AlignBottom = Qt::AlignBottom,
+ AlignVCenter = Qt::AlignVCenter };
+ enum TextStyle { Normal,
+ Outline,
+ Raised,
+ Sunken };
+ enum TextFormat { PlainText = Qt::PlainText,
+ RichText = Qt::RichText,
+ AutoText = Qt::AutoText,
+ StyledText = 4 };
+ enum TextElideMode { ElideLeft = Qt::ElideLeft,
+ ElideRight = Qt::ElideRight,
+ ElideMiddle = Qt::ElideMiddle,
+ ElideNone = Qt::ElideNone };
+
+ QString text() const;
+ void setText(const QString &);
+
+ QFont font() const;
+ void setFont(const QFont &font);
+
+ QColor color() const;
+ void setColor(const QColor &c);
+
+ TextStyle style() const;
+ void setStyle(TextStyle style);
+
+ QColor styleColor() const;
+ void setStyleColor(const QColor &c);
+
+ HAlignment hAlign() const;
+ void setHAlign(HAlignment align);
+
+ VAlignment vAlign() const;
+ void setVAlign(VAlignment align);
+
+ bool wrap() const;
+ void setWrap(bool w);
+
+ TextFormat textFormat() const;
+ void setTextFormat(TextFormat format);
+
+ TextElideMode elideMode() const;
+ void setElideMode(TextElideMode);
+
+ void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
+
+ virtual void componentComplete();
+
+Q_SIGNALS:
+ void textChanged(const QString &text);
+ void linkActivated(const QString &link);
+ void fontChanged(const QFont &font);
+ void colorChanged(const QColor &color);
+ void styleChanged(TextStyle style);
+ void styleColorChanged(const QColor &color);
+ void horizontalAlignmentChanged(HAlignment alignment);
+ void verticalAlignmentChanged(VAlignment alignment);
+ void wrapChanged(bool wrap);
+ void textFormatChanged(TextFormat textFormat);
+ void elideModeChanged(TextElideMode mode);
+
+protected:
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+ virtual void geometryChanged(const QRectF &newGeometry,
+ const QRectF &oldGeometry);
+
+private:
+ Q_DISABLE_COPY(QDeclarativeText)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeText)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeText)
+
+QT_END_HEADER
+
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativetext_p_p.h b/src/declarative/graphicsitems/qdeclarativetext_p_p.h
new file mode 100644
index 0000000000..0d9a0a6d25
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativetext_p_p.h
@@ -0,0 +1,129 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVETEXT_P_H
+#define QDECLARATIVETEXT_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeitem.h"
+#include "qdeclarativeitem_p.h"
+
+#include <qdeclarative.h>
+
+#include <QtGui/qtextlayout.h>
+
+QT_BEGIN_NAMESPACE
+
+class QTextLayout;
+class QTextDocument;
+
+class QDeclarativeTextPrivate : public QDeclarativeItemPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeText)
+public:
+ QDeclarativeTextPrivate()
+ : color((QRgb)0), style(QDeclarativeText::Normal),
+ hAlign(QDeclarativeText::AlignLeft), vAlign(QDeclarativeText::AlignTop), elideMode(QDeclarativeText::ElideNone),
+ imgDirty(true), dirty(true), wrap(false), richText(false), singleline(false), cache(true), doc(0),
+ format(QDeclarativeText::AutoText)
+ {
+#if defined(QML_NO_TEXT_CACHE)
+ cache = false;
+#endif
+ QGraphicsItemPrivate::acceptedMouseButtons = Qt::LeftButton;
+ QGraphicsItemPrivate::flags = QGraphicsItemPrivate::flags & ~QGraphicsItem::ItemHasNoContents;
+ }
+
+ ~QDeclarativeTextPrivate();
+
+ void updateSize();
+ void updateLayout();
+ void markImgDirty() {
+ Q_Q(QDeclarativeText);
+ imgDirty = true;
+ if (q->isComponentComplete())
+ q->update();
+ }
+ void checkImgCache();
+
+ void drawOutline();
+ void drawOutline(int yOffset);
+
+ QPixmap wrappedTextImage(bool drawStyle);
+ void drawWrappedText(QPainter *p, const QPointF &pos, bool drawStyle);
+ QPixmap richTextImage(bool drawStyle);
+ QSize setupTextLayout(QTextLayout *layout);
+
+ QString text;
+ QFont font;
+ QColor color;
+ QDeclarativeText::TextStyle style;
+ QColor styleColor;
+ QString activeLink;
+ QPixmap imgCache;
+ QPixmap imgStyleCache;
+ QDeclarativeText::HAlignment hAlign;
+ QDeclarativeText::VAlignment vAlign;
+ QDeclarativeText::TextElideMode elideMode;
+ bool imgDirty:1;
+ bool dirty:1;
+ bool wrap:1;
+ bool richText:1;
+ bool singleline:1;
+ bool cache:1;
+ QTextDocument *doc;
+ QTextLayout layout;
+ QSize cachedLayoutSize;
+ QDeclarativeText::TextFormat format;
+};
+
+QT_END_NAMESPACE
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
new file mode 100644
index 0000000000..be73b39e06
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -0,0 +1,1040 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativetextedit_p.h"
+#include "qdeclarativetextedit_p_p.h"
+
+#include "qdeclarativeevents_p_p.h"
+
+#include <qfxperf_p_p.h>
+
+#include <QTextLayout>
+#include <QTextLine>
+#include <QTextDocument>
+#include <QGraphicsSceneMouseEvent>
+#include <QDebug>
+#include <QPainter>
+
+#include <private/qtextcontrol_p.h>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \qmlclass TextEdit QDeclarativeTextEdit
+ \since 4.7
+ \brief The TextEdit item allows you to add editable formatted text to a scene.
+
+ It can display both plain and rich text. For example:
+
+ \qml
+TextEdit {
+ id: edit
+ text: "<b>Hello</b> <i>World!</i>"
+ focus: true
+ font.family: "Helvetica"
+ font.pointSize: 20
+ color: "blue"
+ width: 240
+}
+ \endqml
+
+ \image declarative-textedit.gif
+
+ \sa Text
+*/
+
+/*!
+ \internal
+ \class QDeclarativeTextEdit
+ \qmlclass TextEdit
+ \ingroup group_coreitems
+
+ \brief The QDeclarativeTextEdit class provides an editable formatted text item that you can add to a QDeclarativeView.
+
+ It can display both plain and rich text.
+
+ \image declarative-textedit.png
+
+ A QDeclarativeTextEdit object can be instantiated in Qml using the tag \c &lt;TextEdit&gt;.
+*/
+
+/*!
+ Constructs a new QDeclarativeTextEdit.
+*/
+QDeclarativeTextEdit::QDeclarativeTextEdit(QDeclarativeItem *parent)
+: QDeclarativePaintedItem(*(new QDeclarativeTextEditPrivate), parent)
+{
+ Q_D(QDeclarativeTextEdit);
+ d->init();
+}
+
+QString QDeclarativeTextEdit::text() const
+{
+ Q_D(const QDeclarativeTextEdit);
+
+ if (d->richText)
+ return d->document->toHtml();
+ else
+ return d->document->toPlainText();
+}
+
+/*!
+ \qmlproperty string TextEdit::font.family
+ \qmlproperty bool TextEdit::font.bold
+ \qmlproperty bool TextEdit::font.italic
+ \qmlproperty bool TextEdit::font.underline
+ \qmlproperty real TextEdit::font.pointSize
+ \qmlproperty int TextEdit::font.pixelSize
+
+ Set the TextEdit's font attributes.
+*/
+
+/*!
+ \qmlproperty string TextEdit::text
+
+ The text to display. If the text format is AutoText the text edit will
+ automatically determine whether the text should be treated as
+ rich text. This determination is made using Qt::mightBeRichText().
+*/
+void QDeclarativeTextEdit::setText(const QString &text)
+{
+ Q_D(QDeclarativeTextEdit);
+ if (QDeclarativeTextEdit::text() == text)
+ return;
+ d->text = text;
+ d->richText = d->format == RichText || (d->format == AutoText && Qt::mightBeRichText(text));
+ if (d->richText) {
+ d->control->setHtml(text);
+ } else {
+ d->control->setPlainText(text);
+ }
+ q_textChanged();
+}
+
+/*!
+ \qmlproperty enumeration TextEdit::textFormat
+
+ The way the text property should be displayed.
+
+ Supported text formats are \c AutoText, \c PlainText and \c RichText.
+
+ The default is AutoText. If the text format is AutoText the text edit
+ will automatically determine whether the text should be treated as
+ rich text. This determination is made using Qt::mightBeRichText().
+
+ \table
+ \row
+ \o
+ \qml
+Column {
+ TextEdit {
+ font.pointSize: 24
+ text: "<b>Hello</b> <i>World!</i>"
+ }
+ TextEdit {
+ font.pointSize: 24
+ textFormat: "RichText"
+ text: "<b>Hello</b> <i>World!</i>"
+ }
+ TextEdit {
+ font.pointSize: 24
+ textFormat: "PlainText"
+ text: "<b>Hello</b> <i>World!</i>"
+ }
+}
+ \endqml
+ \o \image declarative-textformat.png
+ \endtable
+*/
+QDeclarativeTextEdit::TextFormat QDeclarativeTextEdit::textFormat() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->format;
+}
+
+void QDeclarativeTextEdit::setTextFormat(TextFormat format)
+{
+ Q_D(QDeclarativeTextEdit);
+ if (format == d->format)
+ return;
+ bool wasRich = d->richText;
+ d->richText = format == RichText || (format == AutoText && Qt::mightBeRichText(d->text));
+
+ if (wasRich && !d->richText) {
+ d->control->setPlainText(d->text);
+ updateSize();
+ } else if (!wasRich && d->richText) {
+ d->control->setHtml(d->text);
+ updateSize();
+ }
+ d->format = format;
+ emit textFormatChanged(d->format);
+}
+
+QFont QDeclarativeTextEdit::font() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->font;
+}
+
+void QDeclarativeTextEdit::setFont(const QFont &font)
+{
+ Q_D(QDeclarativeTextEdit);
+ d->font = font;
+
+ clearCache();
+ d->document->setDefaultFont(d->font);
+ if(d->cursor){
+ d->cursor->setHeight(QFontMetrics(d->font).height());
+ moveCursorDelegate();
+ }
+ updateSize();
+ update();
+}
+
+/*!
+ \qmlproperty color TextEdit::color
+
+ The text color.
+
+ \qml
+// green text using hexadecimal notation
+TextEdit { color: "#00FF00"; ... }
+
+// steelblue text using SVG color name
+TextEdit { color: "steelblue"; ... }
+ \endqml
+*/
+QColor QDeclarativeTextEdit::color() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->color;
+}
+
+void QDeclarativeTextEdit::setColor(const QColor &color)
+{
+ Q_D(QDeclarativeTextEdit);
+ if (d->color == color)
+ return;
+
+ clearCache();
+ d->color = color;
+ QPalette pal = d->control->palette();
+ pal.setColor(QPalette::Text, color);
+ d->control->setPalette(pal);
+ update();
+ emit colorChanged(d->color);
+}
+
+/*!
+ \qmlproperty color TextEdit::selectionColor
+
+ The text highlight color, used behind selections.
+*/
+QColor QDeclarativeTextEdit::selectionColor() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->selectionColor;
+}
+
+void QDeclarativeTextEdit::setSelectionColor(const QColor &color)
+{
+ Q_D(QDeclarativeTextEdit);
+ if (d->selectionColor == color)
+ return;
+
+ clearCache();
+ d->selectionColor = color;
+ QPalette pal = d->control->palette();
+ pal.setColor(QPalette::Highlight, color);
+ d->control->setPalette(pal);
+ update();
+ emit selectionColorChanged(d->selectionColor);
+}
+
+/*!
+ \qmlproperty color TextEdit::selectedTextColor
+
+ The selected text color, used in selections.
+*/
+QColor QDeclarativeTextEdit::selectedTextColor() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->selectedTextColor;
+}
+
+void QDeclarativeTextEdit::setSelectedTextColor(const QColor &color)
+{
+ Q_D(QDeclarativeTextEdit);
+ if (d->selectedTextColor == color)
+ return;
+
+ clearCache();
+ d->selectedTextColor = color;
+ QPalette pal = d->control->palette();
+ pal.setColor(QPalette::HighlightedText, color);
+ d->control->setPalette(pal);
+ update();
+ emit selectedTextColorChanged(d->selectedTextColor);
+}
+
+/*!
+ \qmlproperty enumeration TextEdit::horizontalAlignment
+ \qmlproperty enumeration TextEdit::verticalAlignment
+
+ Sets the horizontal and vertical alignment of the text within the TextEdit items
+ width and height. By default, the text is top-left aligned.
+
+ The valid values for \c horizontalAlignment are \c AlignLeft, \c AlignRight and
+ \c AlignHCenter. The valid values for \c verticalAlignment are \c AlignTop, \c AlignBottom
+ and \c AlignVCenter.
+*/
+QDeclarativeTextEdit::HAlignment QDeclarativeTextEdit::hAlign() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->hAlign;
+}
+
+void QDeclarativeTextEdit::setHAlign(QDeclarativeTextEdit::HAlignment alignment)
+{
+ Q_D(QDeclarativeTextEdit);
+ if (alignment == d->hAlign)
+ return;
+ d->hAlign = alignment;
+ d->updateDefaultTextOption();
+ updateSize();
+ emit horizontalAlignmentChanged(d->hAlign);
+}
+
+QDeclarativeTextEdit::VAlignment QDeclarativeTextEdit::vAlign() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->vAlign;
+}
+
+void QDeclarativeTextEdit::setVAlign(QDeclarativeTextEdit::VAlignment alignment)
+{
+ Q_D(QDeclarativeTextEdit);
+ if (alignment == d->vAlign)
+ return;
+ d->vAlign = alignment;
+ d->updateDefaultTextOption();
+ updateSize();
+ emit verticalAlignmentChanged(d->vAlign);
+}
+
+bool QDeclarativeTextEdit::wrap() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->wrap;
+}
+
+/*!
+ \qmlproperty bool TextEdit::wrap
+
+ Set this property to wrap the text to the TextEdit item's width.
+ The text will only wrap if an explicit width has been set.
+
+ Wrapping is done on word boundaries (i.e. it is a "word-wrap"). Wrapping is off by default.
+*/
+void QDeclarativeTextEdit::setWrap(bool w)
+{
+ Q_D(QDeclarativeTextEdit);
+ if (w == d->wrap)
+ return;
+ d->wrap = w;
+ d->updateDefaultTextOption();
+ updateSize();
+ emit wrapChanged(d->wrap);
+}
+
+/*!
+ \qmlproperty bool TextEdit::cursorVisible
+ If true the text edit shows a cursor.
+
+ This property is set and unset when the text edit gets focus, but it can also
+ be set directly (useful, for example, if a KeyProxy might forward keys to it).
+*/
+bool QDeclarativeTextEdit::isCursorVisible() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->cursorVisible;
+}
+
+void QDeclarativeTextEdit::setCursorVisible(bool on)
+{
+ Q_D(QDeclarativeTextEdit);
+ if (d->cursorVisible == on)
+ return;
+ d->cursorVisible = on;
+ QFocusEvent focusEvent(on ? QEvent::FocusIn : QEvent::FocusOut);
+ if (!on && !d->persistentSelection)
+ d->control->setCursorIsFocusIndicator(true);
+ d->control->processEvent(&focusEvent, QPointF(0, 0));
+ emit cursorVisibleChanged(d->cursorVisible);
+}
+
+/*!
+ \qmlproperty int TextEdit::cursorPosition
+ The position of the cursor in the TextEdit.
+*/
+int QDeclarativeTextEdit::cursorPosition() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->control->textCursor().position();
+}
+
+void QDeclarativeTextEdit::setCursorPosition(int pos)
+{
+ Q_D(QDeclarativeTextEdit);
+ QTextCursor cursor = d->control->textCursor();
+ if (cursor.position() == pos)
+ return;
+ cursor.setPosition(pos);
+ d->control->setTextCursor(cursor);
+}
+
+/*!
+ \qmlproperty Component TextEdit::cursorDelegate
+ The delegate for the cursor in the TextEdit.
+
+ If you set a cursorDelegate for a TextEdit, this delegate will be used for
+ drawing the cursor instead of the standard cursor. An instance of the
+ delegate will be created and managed by the text edit when a cursor is
+ needed, and the x and y properties of delegate instance will be set so as
+ to be one pixel before the top left of the current character.
+
+ Note that the root item of the delegate component must be a QDeclarativeItem or
+ QDeclarativeItem derived item.
+*/
+QDeclarativeComponent* QDeclarativeTextEdit::cursorDelegate() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->cursorComponent;
+}
+
+void QDeclarativeTextEdit::setCursorDelegate(QDeclarativeComponent* c)
+{
+ Q_D(QDeclarativeTextEdit);
+ if(d->cursorComponent){
+ if(d->cursor){
+ disconnect(d->control, SIGNAL(cursorPositionChanged()),
+ this, SLOT(moveCursorDelegate()));
+ d->control->setCursorWidth(-1);
+ dirtyCache(cursorRect());
+ delete d->cursor;
+ d->cursor = 0;
+ }
+ }
+ d->cursorComponent = c;
+ if(c && c->isReady()){
+ loadCursorDelegate();
+ }else{
+ if(c)
+ connect(c, SIGNAL(statusChanged()),
+ this, SLOT(loadCursorDelegate()));
+ }
+
+ emit cursorDelegateChanged();
+}
+
+void QDeclarativeTextEdit::loadCursorDelegate()
+{
+ Q_D(QDeclarativeTextEdit);
+ if(d->cursorComponent->isLoading())
+ return;
+ d->cursor = qobject_cast<QDeclarativeItem*>(d->cursorComponent->create(qmlContext(this)));
+ if(d->cursor){
+ connect(d->control, SIGNAL(cursorPositionChanged()),
+ this, SLOT(moveCursorDelegate()));
+ d->control->setCursorWidth(0);
+ dirtyCache(cursorRect());
+ d->cursor->setParentItem(this);
+ d->cursor->setHeight(QFontMetrics(d->font).height());
+ moveCursorDelegate();
+ }else{
+ qWarning() << QLatin1String("Error loading cursor delegate for TextEdit:") + objectName();
+ }
+}
+
+/*!
+ \qmlproperty int TextEdit::selectionStart
+
+ The cursor position before the first character in the current selection.
+ Setting this and selectionEnd allows you to specify a selection in the
+ text edit.
+
+ Note that if selectionStart == selectionEnd then there is no current
+ selection. If you attempt to set selectionStart to a value outside of
+ the current text, selectionStart will not be changed.
+
+ \sa selectionEnd, cursorPosition, selectedText
+*/
+int QDeclarativeTextEdit::selectionStart() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->control->textCursor().selectionStart();
+}
+
+void QDeclarativeTextEdit::setSelectionStart(int s)
+{
+ Q_D(QDeclarativeTextEdit);
+ if(d->lastSelectionStart == s || s < 0 || s > text().length())
+ return;
+ d->lastSelectionStart = s;
+ d->updateSelection();// Will emit the relevant signals
+}
+
+/*!
+ \qmlproperty int TextEdit::selectionEnd
+
+ The cursor position after the last character in the current selection.
+ Setting this and selectionStart allows you to specify a selection in the
+ text edit.
+
+ Note that if selectionStart == selectionEnd then there is no current
+ selection. If you attempt to set selectionEnd to a value outside of
+ the current text, selectionEnd will not be changed.
+
+ \sa selectionStart, cursorPosition, selectedText
+*/
+int QDeclarativeTextEdit::selectionEnd() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->control->textCursor().selectionEnd();
+}
+
+void QDeclarativeTextEdit::setSelectionEnd(int s)
+{
+ Q_D(QDeclarativeTextEdit);
+ if(d->lastSelectionEnd == s || s < 0 || s > text().length())
+ return;
+ d->lastSelectionEnd = s;
+ d->updateSelection();// Will emit the relevant signals
+}
+
+/*!
+ \qmlproperty string TextEdit::selectedText
+
+ This read-only property provides the text currently selected in the
+ text edit.
+
+ It is equivalent to the following snippet, but is faster and easier
+ to use.
+ \code
+ //myTextEdit is the id of the TextEdit
+ myTextEdit.text.toString().substring(myTextEdit.selectionStart,
+ myTextEdit.selectionEnd);
+ \endcode
+*/
+QString QDeclarativeTextEdit::selectedText() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->control->textCursor().selectedText();
+}
+
+/*!
+ \qmlproperty bool TextEdit::focusOnPress
+
+ Whether the TextEdit should gain focus on a mouse press. By default this is
+ set to true.
+*/
+bool QDeclarativeTextEdit::focusOnPress() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->focusOnPress;
+}
+
+void QDeclarativeTextEdit::setFocusOnPress(bool on)
+{
+ Q_D(QDeclarativeTextEdit);
+ if (d->focusOnPress == on)
+ return;
+ d->focusOnPress = on;
+ emit focusOnPressChanged(d->focusOnPress);
+}
+
+/*!
+ \qmlproperty bool TextEdit::persistentSelection
+
+ Whether the TextEdit should keep the selection visible when it loses focus to another
+ item in the scene. By default this is set to true;
+*/
+bool QDeclarativeTextEdit::persistentSelection() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->persistentSelection;
+}
+
+void QDeclarativeTextEdit::setPersistentSelection(bool on)
+{
+ Q_D(QDeclarativeTextEdit);
+ if (d->persistentSelection == on)
+ return;
+ d->persistentSelection = on;
+ emit persistentSelectionChanged(d->persistentSelection);
+}
+
+/*
+ \qmlproperty number TextEdit::textMargin
+
+ The margin, in pixels, around the text in the TextEdit.
+*/
+qreal QDeclarativeTextEdit::textMargin() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->textMargin;
+}
+
+void QDeclarativeTextEdit::setTextMargin(qreal margin)
+{
+ Q_D(QDeclarativeTextEdit);
+ if (d->textMargin == margin)
+ return;
+ d->textMargin = margin;
+ d->document->setDocumentMargin(d->textMargin);
+ emit textMarginChanged(d->textMargin);
+}
+
+void QDeclarativeTextEdit::geometryChanged(const QRectF &newGeometry,
+ const QRectF &oldGeometry)
+{
+ if (newGeometry.width() != oldGeometry.width())
+ updateSize();
+ QDeclarativePaintedItem::geometryChanged(newGeometry, oldGeometry);
+}
+
+/*!
+ Ensures any delayed caching or data loading the class
+ needs to performed is complete.
+*/
+void QDeclarativeTextEdit::componentComplete()
+{
+ Q_D(QDeclarativeTextEdit);
+ QDeclarativePaintedItem::componentComplete();
+ if (d->dirty) {
+ updateSize();
+ d->dirty = false;
+ }
+}
+
+/*!
+ \qmlproperty bool TextEdit::readOnly
+
+ Whether the user an interact with the TextEdit item. If this
+ property is set to true the text cannot be edited by user interaction.
+
+ By default this property is false.
+*/
+void QDeclarativeTextEdit::setReadOnly(bool r)
+{
+ Q_D(QDeclarativeTextEdit);
+ if (r == isReadOnly())
+ return;
+
+
+ Qt::TextInteractionFlags flags = Qt::NoTextInteraction;
+ if (r) {
+ flags = Qt::TextSelectableByMouse;
+ } else {
+ flags = Qt::TextEditorInteraction;
+ }
+ d->control->setTextInteractionFlags(flags);
+ if (!r)
+ d->control->moveCursor(QTextCursor::End);
+
+ emit readOnlyChanged(r);
+}
+
+bool QDeclarativeTextEdit::isReadOnly() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return !(d->control->textInteractionFlags() & Qt::TextEditable);
+}
+
+/*!
+ Sets how the text edit should interact with user input to the given
+ \a flags.
+*/
+void QDeclarativeTextEdit::setTextInteractionFlags(Qt::TextInteractionFlags flags)
+{
+ Q_D(QDeclarativeTextEdit);
+ d->control->setTextInteractionFlags(flags);
+}
+
+/*!
+ Returns the flags specifying how the text edit should interact
+ with user input.
+*/
+Qt::TextInteractionFlags QDeclarativeTextEdit::textInteractionFlags() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->control->textInteractionFlags();
+}
+
+/*!
+ Returns the rectangle where the text cursor is rendered
+ within the text edit.
+*/
+QRect QDeclarativeTextEdit::cursorRect() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->control->cursorRect().toRect();
+}
+
+
+/*!
+\overload
+Handles the given \a event.
+*/
+bool QDeclarativeTextEdit::event(QEvent *event)
+{
+ Q_D(QDeclarativeTextEdit);
+ if (event->type() == QEvent::ShortcutOverride) {
+ d->control->processEvent(event, QPointF(0, 0));
+ return event->isAccepted();
+ }
+ return QDeclarativePaintedItem::event(event);
+}
+
+/*!
+\overload
+Handles the given key \a event.
+*/
+void QDeclarativeTextEdit::keyPressEvent(QKeyEvent *event)
+{
+ Q_D(QDeclarativeTextEdit);
+ d->control->processEvent(event, QPointF(0, 0));
+
+ if (!event->isAccepted())
+ QDeclarativePaintedItem::keyPressEvent(event);
+}
+
+/*!
+\overload
+Handles the given key \a event.
+*/
+void QDeclarativeTextEdit::keyReleaseEvent(QKeyEvent *event)
+{
+ Q_D(QDeclarativeTextEdit);
+ d->control->processEvent(event, QPointF(0, 0));
+ if (!event->isAccepted())
+ QDeclarativePaintedItem::keyReleaseEvent(event);
+}
+
+/*!
+ \overload
+ Handles changing of the focus property. Focus is applied to the control
+ even if the edit does not have active focus. This is because things
+ like KeyProxy can give the behavior of focus even when hasFocus() isn't
+ true.
+*/
+void QDeclarativeTextEdit::focusChanged(bool hasFocus)
+{
+ setCursorVisible(hasFocus);
+ QDeclarativeItem::focusChanged(hasFocus);
+}
+
+/*!
+ Causes all text to be selected.
+*/
+void QDeclarativeTextEdit::selectAll()
+{
+ Q_D(QDeclarativeTextEdit);
+ d->control->selectAll();
+}
+
+/*!
+\overload
+Handles the given mouse \a event.
+*/
+void QDeclarativeTextEdit::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeTextEdit);
+ if (d->focusOnPress){
+ QGraphicsItem *p = parentItem();//###Is there a better way to find my focus scope?
+ while(p) {
+ if(p->flags() & QGraphicsItem::ItemIsFocusScope){
+ p->setFocus();
+ break;
+ }
+ p = p->parentItem();
+ }
+ setFocus(true);
+ }
+ d->control->processEvent(event, QPointF(0, 0));
+ if (!event->isAccepted())
+ QDeclarativePaintedItem::mousePressEvent(event);
+}
+
+/*!
+\overload
+Handles the given mouse \a event.
+*/
+void QDeclarativeTextEdit::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeTextEdit);
+ QWidget *widget = event->widget();
+ if (widget && (d->control->textInteractionFlags() & Qt::TextEditable) && boundingRect().contains(event->pos()))
+ qt_widget_private(widget)->handleSoftwareInputPanel(event->button(), d->focusOnPress);
+
+ d->control->processEvent(event, QPointF(0, 0));
+ if (!event->isAccepted())
+ QDeclarativePaintedItem::mousePressEvent(event);
+}
+
+/*!
+\overload
+Handles the given mouse \a event.
+*/
+void QDeclarativeTextEdit::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeTextEdit);
+ d->control->processEvent(event, QPointF(0, 0));
+ if (!event->isAccepted())
+ QDeclarativePaintedItem::mouseDoubleClickEvent(event);
+}
+
+/*!
+\overload
+Handles the given mouse \a event.
+*/
+void QDeclarativeTextEdit::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeTextEdit);
+ d->control->processEvent(event, QPointF(0, 0));
+ if (!event->isAccepted())
+ QDeclarativePaintedItem::mousePressEvent(event);
+}
+
+/*!
+\overload
+Handles the given input method \a event.
+*/
+void QDeclarativeTextEdit::inputMethodEvent(QInputMethodEvent *event)
+{
+ Q_D(QDeclarativeTextEdit);
+ d->control->processEvent(event, QPointF(0, 0));
+}
+
+/*!
+\overload
+Returns the value of the given \a property.
+*/
+QVariant QDeclarativeTextEdit::inputMethodQuery(Qt::InputMethodQuery property) const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->control->inputMethodQuery(property);
+}
+
+/*!
+Draws the contents of the text edit using the given \a painter within
+the given \a bounds.
+*/
+void QDeclarativeTextEdit::drawContents(QPainter *painter, const QRect &bounds)
+{
+ Q_D(QDeclarativeTextEdit);
+
+ painter->setRenderHint(QPainter::TextAntialiasing, true);
+
+ d->control->drawContents(painter, bounds);
+}
+
+void QDeclarativeTextEdit::updateImgCache(const QRectF &r)
+{
+ dirtyCache(r.toRect());
+ emit update();
+}
+
+/*!
+ \qmlproperty bool TextEdit::smooth
+
+ Set this property if you want the text to be smoothly scaled or
+ transformed. Smooth filtering gives better visual quality, but is slower. If
+ the item is displayed at its natural size, this property has no visual or
+ performance effect.
+
+ \note Generally scaling artifacts are only visible if the item is stationary on
+ the screen. A common pattern when animating an item is to disable smooth
+ filtering at the beginning of the animation and reenable it at the conclusion.
+*/
+
+void QDeclarativeTextEditPrivate::init()
+{
+ Q_Q(QDeclarativeTextEdit);
+
+ q->setSmooth(smooth);
+ q->setAcceptedMouseButtons(Qt::LeftButton);
+ q->setFlag(QGraphicsItem::ItemHasNoContents, false);
+ q->setFlag(QGraphicsItem::ItemAcceptsInputMethod);
+
+ control = new QTextControl(q);
+ control->setIgnoreUnusedNavigationEvents(true);
+
+ QObject::connect(control, SIGNAL(updateRequest(QRectF)), q, SLOT(updateImgCache(QRectF)));
+
+ QObject::connect(control, SIGNAL(textChanged()), q, SLOT(q_textChanged()));
+ QObject::connect(control, SIGNAL(selectionChanged()), q, SIGNAL(selectionChanged()));
+ QObject::connect(control, SIGNAL(selectionChanged()), q, SLOT(updateSelectionMarkers()));
+ QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SLOT(updateSelectionMarkers()));
+ QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SIGNAL(cursorPositionChanged()));
+
+ document = control->document();
+ document->setDefaultFont(font);
+ document->setDocumentMargin(textMargin);
+ document->setUndoRedoEnabled(false); // flush undo buffer.
+ document->setUndoRedoEnabled(true);
+ updateDefaultTextOption();
+}
+
+void QDeclarativeTextEdit::q_textChanged()
+{
+ updateSize();
+ emit textChanged(text());
+}
+
+void QDeclarativeTextEdit::moveCursorDelegate()
+{
+ Q_D(QDeclarativeTextEdit);
+ if(!d->cursor)
+ return;
+ QRectF cursorRect = d->control->cursorRect();
+ d->cursor->setX(cursorRect.x());
+ d->cursor->setY(cursorRect.y());
+}
+
+void QDeclarativeTextEditPrivate::updateSelection()
+{
+ Q_Q(QDeclarativeTextEdit);
+ QTextCursor cursor = control->textCursor();
+ bool startChange = (lastSelectionStart != cursor.selectionStart());
+ bool endChange = (lastSelectionEnd != cursor.selectionEnd());
+ //### Is it worth calculating a more minimal set of movements?
+ cursor.beginEditBlock();
+ cursor.setPosition(lastSelectionStart, QTextCursor::MoveAnchor);
+ cursor.setPosition(lastSelectionEnd, QTextCursor::KeepAnchor);
+ cursor.endEditBlock();
+ control->setTextCursor(cursor);
+ if(startChange)
+ q->selectionStartChanged();
+ if(endChange)
+ q->selectionEndChanged();
+ startChange = (lastSelectionStart != control->textCursor().selectionStart());
+ endChange = (lastSelectionEnd != control->textCursor().selectionEnd());
+ if(startChange || endChange)
+ qWarning() << "QDeclarativeTextEditPrivate::updateSelection() has failed you.";
+}
+
+void QDeclarativeTextEdit::updateSelectionMarkers()
+{
+ Q_D(QDeclarativeTextEdit);
+ if(d->lastSelectionStart != d->control->textCursor().selectionStart()){
+ d->lastSelectionStart = d->control->textCursor().selectionStart();
+ emit selectionStartChanged();
+ }
+ if(d->lastSelectionEnd != d->control->textCursor().selectionEnd()){
+ d->lastSelectionEnd = d->control->textCursor().selectionEnd();
+ emit selectionEndChanged();
+ }
+}
+
+//### we should perhaps be a bit smarter here -- depending on what has changed, we shouldn't
+// need to do all the calculations each time
+void QDeclarativeTextEdit::updateSize()
+{
+ Q_D(QDeclarativeTextEdit);
+ if (isComponentComplete()) {
+ QFontMetrics fm = QFontMetrics(d->font);
+ int dy = height();
+ // ### assumes that if the width is set, the text will fill to edges
+ // ### (unless wrap is false, then clipping will occur)
+ if (widthValid())
+ d->document->setTextWidth(width());
+ dy -= (int)d->document->size().height();
+
+ int yoff = 0;
+ if (heightValid()) {
+ if (d->vAlign == AlignBottom)
+ yoff = dy;
+ else if (d->vAlign == AlignVCenter)
+ yoff = dy/2;
+ }
+ setBaselineOffset(fm.ascent() + yoff + d->textMargin);
+
+ //### need to comfirm cost of always setting these
+ int newWidth = (int)d->document->idealWidth();
+ d->document->setTextWidth(newWidth); // ### QTextDoc> Alignment will not work unless textWidth is set. Does Text need this line as well?
+ int cursorWidth = 1;
+ if(d->cursor)
+ cursorWidth = d->cursor->width();
+ newWidth += cursorWidth;
+ if(!d->document->isEmpty())
+ newWidth += 3;// ### Need a better way of accounting for space between char and cursor
+ // ### Setting the implicitWidth triggers another updateSize(), and unless there are bindings nothing has changed.
+ setImplicitWidth(newWidth);
+ setImplicitHeight(d->text.isEmpty() ? fm.height() : (int)d->document->size().height());
+
+ setContentsSize(QSize(width(), height()));
+ } else {
+ d->dirty = true;
+ }
+ emit update();
+}
+
+void QDeclarativeTextEditPrivate::updateDefaultTextOption()
+{
+ QTextOption opt = document->defaultTextOption();
+ int oldAlignment = opt.alignment();
+ opt.setAlignment((Qt::Alignment)(int)(hAlign | vAlign));
+
+ QTextOption::WrapMode oldWrapMode = opt.wrapMode();
+
+ if (wrap)
+ opt.setWrapMode(QTextOption::WordWrap);
+ else
+ opt.setWrapMode(QTextOption::NoWrap);
+
+ if (oldWrapMode == opt.wrapMode() && oldAlignment == opt.alignment())
+ return;
+ document->setDefaultTextOption(opt);
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
new file mode 100644
index 0000000000..6183b1d997
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
@@ -0,0 +1,240 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVETEXTEDIT_H
+#define QDECLARATIVETEXTEDIT_H
+
+#include "qdeclarativetext_p.h"
+#include "qdeclarativepainteditem_p.h"
+
+#include <QtGui/qtextdocument.h>
+#include <QtGui/qtextoption.h>
+#include <QtGui/qtextcursor.h>
+#include <QtGui/qtextformat.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+
+class QDeclarativeTextEditPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeTextEdit : public QDeclarativePaintedItem
+{
+ Q_OBJECT
+ Q_ENUMS(VAlignment)
+ Q_ENUMS(HAlignment)
+ Q_ENUMS(TextFormat)
+
+ Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
+ Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
+ Q_PROPERTY(QColor selectionColor READ selectionColor WRITE setSelectionColor NOTIFY selectionColorChanged)
+ Q_PROPERTY(QColor selectedTextColor READ selectedTextColor WRITE setSelectedTextColor NOTIFY selectedTextColorChanged)
+ Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged)
+ Q_PROPERTY(HAlignment horizontalAlignment READ hAlign WRITE setHAlign NOTIFY horizontalAlignmentChanged)
+ Q_PROPERTY(VAlignment verticalAlignment READ vAlign WRITE setVAlign NOTIFY verticalAlignmentChanged)
+ Q_PROPERTY(bool wrap READ wrap WRITE setWrap NOTIFY wrapChanged) //### other wrap modes
+ Q_PROPERTY(TextFormat textFormat READ textFormat WRITE setTextFormat NOTIFY textFormatChanged)
+ Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly NOTIFY readOnlyChanged)
+ Q_PROPERTY(bool cursorVisible READ isCursorVisible WRITE setCursorVisible NOTIFY cursorVisibleChanged)
+ Q_PROPERTY(int cursorPosition READ cursorPosition WRITE setCursorPosition NOTIFY cursorPositionChanged)
+ Q_PROPERTY(QDeclarativeComponent* cursorDelegate READ cursorDelegate WRITE setCursorDelegate NOTIFY cursorDelegateChanged)
+ Q_PROPERTY(int selectionStart READ selectionStart WRITE setSelectionStart NOTIFY selectionStartChanged)
+ Q_PROPERTY(int selectionEnd READ selectionEnd WRITE setSelectionEnd NOTIFY selectionEndChanged)
+ Q_PROPERTY(QString selectedText READ selectedText NOTIFY selectionChanged)
+ Q_PROPERTY(bool focusOnPress READ focusOnPress WRITE setFocusOnPress NOTIFY focusOnPressChanged)
+ Q_PROPERTY(bool persistentSelection READ persistentSelection WRITE setPersistentSelection NOTIFY persistentSelectionChanged)
+ Q_PROPERTY(qreal textMargin READ textMargin WRITE setTextMargin NOTIFY textMarginChanged)
+ Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints)
+
+public:
+ QDeclarativeTextEdit(QDeclarativeItem *parent=0);
+
+ enum HAlignment {
+ AlignLeft = Qt::AlignLeft,
+ AlignRight = Qt::AlignRight,
+ AlignHCenter = Qt::AlignHCenter
+ };
+
+ enum VAlignment {
+ AlignTop = Qt::AlignTop,
+ AlignBottom = Qt::AlignBottom,
+ AlignVCenter = Qt::AlignVCenter
+ };
+
+ enum TextFormat {
+ PlainText = Qt::PlainText,
+ RichText = Qt::RichText,
+ AutoText = Qt::AutoText
+ };
+
+ QString text() const;
+ void setText(const QString &);
+
+ TextFormat textFormat() const;
+ void setTextFormat(TextFormat format);
+
+ QFont font() const;
+ void setFont(const QFont &font);
+
+ QColor color() const;
+ void setColor(const QColor &c);
+
+ QColor selectionColor() const;
+ void setSelectionColor(const QColor &c);
+
+ QColor selectedTextColor() const;
+ void setSelectedTextColor(const QColor &c);
+
+ HAlignment hAlign() const;
+ void setHAlign(HAlignment align);
+
+ VAlignment vAlign() const;
+ void setVAlign(VAlignment align);
+
+ bool wrap() const;
+ void setWrap(bool w);
+
+ bool isCursorVisible() const;
+ void setCursorVisible(bool on);
+
+ int cursorPosition() const;
+ void setCursorPosition(int pos);
+
+ QDeclarativeComponent* cursorDelegate() const;
+ void setCursorDelegate(QDeclarativeComponent*);
+
+ int selectionStart() const;
+ void setSelectionStart(int);
+
+ int selectionEnd() const;
+ void setSelectionEnd(int);
+
+ QString selectedText() const;
+
+ bool focusOnPress() const;
+ void setFocusOnPress(bool on);
+
+ bool persistentSelection() const;
+ void setPersistentSelection(bool on);
+
+ qreal textMargin() const;
+ void setTextMargin(qreal margin);
+
+ virtual void componentComplete();
+
+ /* FROM EDIT */
+ void setReadOnly(bool);
+ bool isReadOnly() const;
+
+ void setTextInteractionFlags(Qt::TextInteractionFlags flags);
+ Qt::TextInteractionFlags textInteractionFlags() const;
+
+ QRect cursorRect() const;
+
+ QVariant inputMethodQuery(Qt::InputMethodQuery property) const;
+
+Q_SIGNALS:
+ void textChanged(const QString &);
+ void cursorPositionChanged();
+ void selectionStartChanged();
+ void selectionEndChanged();
+ void selectionChanged();
+ void colorChanged(const QColor &color);
+ void selectionColorChanged(const QColor &color);
+ void selectedTextColorChanged(const QColor &color);
+ void fontChanged(const QFont &font);
+ void horizontalAlignmentChanged(HAlignment alignment);
+ void verticalAlignmentChanged(VAlignment alignment);
+ void wrapChanged(bool isWrapped);
+ void textFormatChanged(TextFormat textFormat);
+ void readOnlyChanged(bool isReadOnly);
+ void cursorVisibleChanged(bool isCursorVisible);
+ void cursorDelegateChanged();
+ void focusOnPressChanged(bool focusIsPressed);
+ void persistentSelectionChanged(bool isPersistentSelection);
+ void textMarginChanged(qreal textMargin);
+
+public Q_SLOTS:
+ void selectAll();
+
+private Q_SLOTS:
+ void updateImgCache(const QRectF &rect);
+ void q_textChanged();
+ void updateSelectionMarkers();
+ void moveCursorDelegate();
+ void loadCursorDelegate();
+
+private:
+ void updateSize();
+
+protected:
+ virtual void geometryChanged(const QRectF &newGeometry,
+ const QRectF &oldGeometry);
+
+ bool event(QEvent *);
+ void keyPressEvent(QKeyEvent *);
+ void keyReleaseEvent(QKeyEvent *);
+
+ void focusChanged(bool);
+
+ // mouse filter?
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+ void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+
+ void inputMethodEvent(QInputMethodEvent *e);
+
+ void drawContents(QPainter *, const QRect &);
+private:
+ Q_DISABLE_COPY(QDeclarativeTextEdit)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeTextEdit)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeTextEdit)
+
+QT_END_HEADER
+
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h
new file mode 100644
index 0000000000..002fac41a4
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVETEXTEDIT_P_H
+#define QDECLARATIVETEXTEDIT_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeitem.h"
+#include "qdeclarativepainteditem_p_p.h"
+
+#include <qdeclarative.h>
+
+QT_BEGIN_NAMESPACE
+class QTextLayout;
+class QTextDocument;
+class QTextControl;
+class QDeclarativeTextEditPrivate : public QDeclarativePaintedItemPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeTextEdit)
+
+public:
+ QDeclarativeTextEditPrivate()
+ : color("black"), imgDirty(true), hAlign(QDeclarativeTextEdit::AlignLeft), vAlign(QDeclarativeTextEdit::AlignTop),
+ dirty(false), wrap(false), richText(false), cursorVisible(false), focusOnPress(true),
+ persistentSelection(true), textMargin(0.0), lastSelectionStart(0), lastSelectionEnd(0),
+ cursorComponent(0), cursor(0), format(QDeclarativeTextEdit::AutoText), document(0)
+ {
+ }
+
+ void init();
+
+ void updateDefaultTextOption();
+ void relayoutDocument();
+ void updateSelection();
+
+ QString text;
+ QFont font;
+ QColor color;
+ QColor selectionColor;
+ QColor selectedTextColor;
+ QString style;
+ QColor styleColor;
+ bool imgDirty;
+ QPixmap imgCache;
+ QPixmap imgStyleCache;
+ QDeclarativeTextEdit::HAlignment hAlign;
+ QDeclarativeTextEdit::VAlignment vAlign;
+ bool dirty;
+ bool wrap;
+ bool richText;
+ bool cursorVisible;
+ bool focusOnPress;
+ bool persistentSelection;
+ qreal textMargin;
+ int lastSelectionStart;
+ int lastSelectionEnd;
+ QDeclarativeComponent* cursorComponent;
+ QDeclarativeItem* cursor;
+ QDeclarativeTextEdit::TextFormat format;
+ QTextDocument *document;
+ QTextControl *control;
+};
+
+QT_END_NAMESPACE
+#endif
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
new file mode 100644
index 0000000000..3382628685
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -0,0 +1,915 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativetextinput_p.h"
+#include "qdeclarativetextinput_p_p.h"
+
+#include <qdeclarativeinfo.h>
+
+#include <QValidator>
+#include <QApplication>
+#include <QFontMetrics>
+#include <QPainter>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \qmlclass TextInput QDeclarativeTextInput
+ \since 4.7
+ The TextInput item allows you to add an editable line of text to a scene.
+
+ TextInput can only display a single line of text, and can only display
+ plain text. However it can provide addition input constraints on the text.
+
+ Input constraints include setting a QValidator, an input mask, or a
+ maximum input length.
+*/
+QDeclarativeTextInput::QDeclarativeTextInput(QDeclarativeItem* parent)
+ : QDeclarativePaintedItem(*(new QDeclarativeTextInputPrivate), parent)
+{
+ Q_D(QDeclarativeTextInput);
+ d->init();
+}
+
+QDeclarativeTextInput::~QDeclarativeTextInput()
+{
+}
+
+/*!
+ \qmlproperty string TextInput::text
+
+ The text in the TextInput.
+*/
+
+QString QDeclarativeTextInput::text() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->control->text();
+}
+
+void QDeclarativeTextInput::setText(const QString &s)
+{
+ Q_D(QDeclarativeTextInput);
+ if(s == text())
+ return;
+ d->control->setText(s);
+ //emit textChanged();
+}
+
+/*!
+ \qmlproperty string TextInput::font.family
+ \qmlproperty bool TextInput::font.bold
+ \qmlproperty bool TextInput::font.italic
+ \qmlproperty bool TextInput::font.underline
+ \qmlproperty real TextInput::font.pointSize
+ \qmlproperty int TextInput::font.pixelSize
+
+ Set the TextInput's font attributes.
+*/
+QFont QDeclarativeTextInput::font() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->font;
+}
+
+void QDeclarativeTextInput::setFont(const QFont &font)
+{
+ Q_D(QDeclarativeTextInput);
+ if (d->font == font)
+ return;
+
+ d->font = font;
+
+ d->control->setFont(d->font);
+ if(d->cursorItem){
+ d->cursorItem->setHeight(QFontMetrics(d->font).height());
+ moveCursor();
+ }
+ updateSize();
+ emit fontChanged(d->font);
+}
+
+/*!
+ \qmlproperty color TextInput::color
+
+ The text color.
+*/
+QColor QDeclarativeTextInput::color() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->color;
+}
+
+void QDeclarativeTextInput::setColor(const QColor &c)
+{
+ Q_D(QDeclarativeTextInput);
+ d->color = c;
+}
+
+
+/*!
+ \qmlproperty color TextInput::selectionColor
+
+ The text highlight color, used behind selections.
+*/
+QColor QDeclarativeTextInput::selectionColor() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->selectionColor;
+}
+
+void QDeclarativeTextInput::setSelectionColor(const QColor &color)
+{
+ Q_D(QDeclarativeTextInput);
+ if (d->selectionColor == color)
+ return;
+
+ d->selectionColor = color;
+ QPalette p = d->control->palette();
+ p.setColor(QPalette::Highlight, d->selectionColor);
+ d->control->setPalette(p);
+ emit selectionColorChanged(color);
+}
+
+/*!
+ \qmlproperty color TextInput::selectedTextColor
+
+ The highlighted text color, used in selections.
+*/
+QColor QDeclarativeTextInput::selectedTextColor() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->selectedTextColor;
+}
+
+void QDeclarativeTextInput::setSelectedTextColor(const QColor &color)
+{
+ Q_D(QDeclarativeTextInput);
+ if (d->selectedTextColor == color)
+ return;
+
+ d->selectedTextColor = color;
+ QPalette p = d->control->palette();
+ p.setColor(QPalette::HighlightedText, d->selectedTextColor);
+ d->control->setPalette(p);
+ emit selectedTextColorChanged(color);
+}
+
+/*!
+ \qmlproperty enumeration TextInput::horizontalAlignment
+
+ Sets the horizontal alignment of the text within the TextInput item's
+ width and height. By default, the text is left aligned.
+
+ TextInput does not have vertical alignment, as the natural height is
+ exactly the height of the single line of text. If you set the height
+ manually to something larger, TextInput will always be top aligned
+ vertically. You can use anchors to align it however you want within
+ another item.
+
+ The valid values for \c horizontalAlignment are \c AlignLeft, \c AlignRight and
+ \c AlignHCenter.
+*/
+QDeclarativeTextInput::HAlignment QDeclarativeTextInput::hAlign() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->hAlign;
+}
+
+void QDeclarativeTextInput::setHAlign(HAlignment align)
+{
+ Q_D(QDeclarativeTextInput);
+ if(align == d->hAlign)
+ return;
+ d->hAlign = align;
+ emit horizontalAlignmentChanged(d->hAlign);
+}
+
+bool QDeclarativeTextInput::isReadOnly() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->control->isReadOnly();
+}
+
+void QDeclarativeTextInput::setReadOnly(bool ro)
+{
+ Q_D(QDeclarativeTextInput);
+ if (d->control->isReadOnly() == ro)
+ return;
+
+ d->control->setReadOnly(ro);
+
+ emit readOnlyChanged(ro);
+}
+
+int QDeclarativeTextInput::maxLength() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->control->maxLength();
+}
+
+void QDeclarativeTextInput::setMaxLength(int ml)
+{
+ Q_D(QDeclarativeTextInput);
+ if (d->control->maxLength() == ml)
+ return;
+
+ d->control->setMaxLength(ml);
+
+ emit maximumLengthChanged(ml);
+}
+
+/*!
+ \qmlproperty bool TextInput::cursorVisible
+ Set to true when the TextInput shows a cursor.
+
+ This property is set and unset when the TextInput gets focus, so that other
+ properties can be bound to whether the cursor is currently showing. As it
+ gets set and unset automatically, when you set the value yourself you must
+ keep in mind that your value may be overwritten.
+
+ It can be set directly in script, for example if a KeyProxy might
+ forward keys to it and you desire it to look active when this happens
+ (but without actually giving it the focus).
+
+ It should not be set directly on the element, like in the below QML,
+ as the specified value will be overridden an lost on focus changes.
+
+ \code
+ TextInput {
+ text: "Text"
+ cursorVisible: false
+ }
+ \endcode
+
+ In the above snippet the cursor will still become visible when the
+ TextInput gains focus.
+*/
+bool QDeclarativeTextInput::isCursorVisible() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->cursorVisible;
+}
+
+void QDeclarativeTextInput::setCursorVisible(bool on)
+{
+ Q_D(QDeclarativeTextInput);
+ if (d->cursorVisible == on)
+ return;
+ d->cursorVisible = on;
+ d->control->setCursorBlinkPeriod(on?QApplication::cursorFlashTime():0);
+ //d->control should emit the cursor update regions
+ emit cursorVisibleChanged(d->cursorVisible);
+}
+
+/*!
+ \qmlproperty int TextInput::cursorPosition
+ The position of the cursor in the TextInput.
+*/
+int QDeclarativeTextInput::cursorPosition() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->control->cursor();
+}
+void QDeclarativeTextInput::setCursorPosition(int cp)
+{
+ Q_D(QDeclarativeTextInput);
+ d->control->moveCursor(cp);
+}
+
+/*!
+ \internal
+
+ Returns a Rect which encompasses the cursor, but which may be larger than is
+ required. Ignores custom cursor delegates.
+*/
+QRect QDeclarativeTextInput::cursorRect() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->control->cursorRect();
+}
+
+/*!
+ \qmlproperty int TextInput::selectionStart
+
+ The cursor position before the first character in the current selection.
+ Setting this and selectionEnd allows you to specify a selection in the
+ text edit.
+
+ Note that if selectionStart == selectionEnd then there is no current
+ selection. If you attempt to set selectionStart to a value outside of
+ the current text, selectionStart will not be changed.
+
+ \sa selectionEnd, cursorPosition, selectedText
+*/
+int QDeclarativeTextInput::selectionStart() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->lastSelectionStart;
+}
+
+void QDeclarativeTextInput::setSelectionStart(int s)
+{
+ Q_D(QDeclarativeTextInput);
+ if(d->lastSelectionStart == s || s < 0 || s > text().length())
+ return;
+ d->lastSelectionStart = s;
+ d->control->setSelection(s, d->lastSelectionEnd - s);
+}
+
+/*!
+ \qmlproperty int TextInput::selectionEnd
+
+ The cursor position after the last character in the current selection.
+ Setting this and selectionStart allows you to specify a selection in the
+ text edit.
+
+ Note that if selectionStart == selectionEnd then there is no current
+ selection. If you attempt to set selectionEnd to a value outside of
+ the current text, selectionEnd will not be changed.
+
+ \sa selectionStart, cursorPosition, selectedText
+*/
+int QDeclarativeTextInput::selectionEnd() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->lastSelectionEnd;
+}
+
+void QDeclarativeTextInput::setSelectionEnd(int s)
+{
+ Q_D(QDeclarativeTextInput);
+ if(d->lastSelectionEnd == s || s < 0 || s > text().length())
+ return;
+ d->lastSelectionEnd = s;
+ d->control->setSelection(d->lastSelectionStart, s - d->lastSelectionStart);
+}
+
+/*!
+ \qmlproperty string TextInput::selectedText
+
+ This read-only property provides the text currently selected in the
+ text input.
+
+ It is equivalent to the following snippet, but is faster and easier
+ to use.
+
+ \qml
+ myTextInput.text.toString().substring(myTextInput.selectionStart,
+ myTextInput.selectionEnd);
+ \endqml
+*/
+QString QDeclarativeTextInput::selectedText() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->control->selectedText();
+}
+
+/*!
+ \qmlproperty bool TextInput::focusOnPress
+
+ Whether the TextInput should gain focus on a mouse press. By default this is
+ set to true.
+*/
+bool QDeclarativeTextInput::focusOnPress() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->focusOnPress;
+}
+
+void QDeclarativeTextInput::setFocusOnPress(bool b)
+{
+ Q_D(QDeclarativeTextInput);
+ if (d->focusOnPress == b)
+ return;
+
+ d->focusOnPress = b;
+
+ emit focusOnPressChanged(d->focusOnPress);
+}
+
+/*!
+ \qmlproperty QValidator* TextInput::validator
+
+ Allows you to set a QValidator on the TextInput. When a validator is set
+ the TextInput will only accept input which leaves the text property in
+ an acceptable or intermediate state. The accepted signal will only be sent
+ if the text is in an acceptable state when enter is pressed.
+
+ Currently supported validators are QIntValidator, QDoubleValidator and
+ QRegExpValidator. For details, refer to their C++ documentation and remember
+ that all Q_PROPERTIES are accessible from Qml. A brief usage guide follows:
+
+ QIntValidator and QDoubleValidator both are controllable through two properties,
+ top and bottom. The difference is that for QIntValidator the top and bottom properties
+ should be integers, and for QDoubleValidator they should be doubles. QRegExpValidator
+ has a single string property, regExp, which should be set to the regular expression to
+ be used for validation. An example of using validators is shown below, which allows
+ input of integers between 11 and 31 into the text input:
+
+ \code
+ import Qt 4.6
+ TextInput{
+ validator: QIntValidator{bottom: 11; top: 31;}
+ focus: true
+ }
+ \endcode
+
+ \sa acceptableInput, inputMask
+*/
+QValidator* QDeclarativeTextInput::validator() const
+{
+ Q_D(const QDeclarativeTextInput);
+ //###const cast isn't good, but needed for property system?
+ return const_cast<QValidator*>(d->control->validator());
+}
+
+void QDeclarativeTextInput::setValidator(QValidator* v)
+{
+ Q_D(QDeclarativeTextInput);
+ if (d->control->validator() == v)
+ return;
+
+ d->control->setValidator(v);
+ if(!d->control->hasAcceptableInput()){
+ d->oldValidity = false;
+ emit acceptableInputChanged();
+ }
+
+ emit validatorChanged();
+}
+
+/*!
+ \qmlproperty string TextInput::inputMask
+
+ Allows you to set an input mask on the TextInput, restricting the allowable
+ text inputs. See QLineEdit::inputMask for further details, as the exact
+ same mask strings are used by TextInput.
+
+ \sa acceptableInput, validator
+*/
+QString QDeclarativeTextInput::inputMask() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->control->inputMask();
+}
+
+void QDeclarativeTextInput::setInputMask(const QString &im)
+{
+ Q_D(QDeclarativeTextInput);
+ if (d->control->inputMask() == im)
+ return;
+
+ d->control->setInputMask(im);
+ emit inputMaskChanged(d->control->inputMask());
+}
+
+/*!
+ \qmlproperty bool TextInput::acceptableInput
+
+ This property is always true unless a validator or input mask has been set.
+ If a validator or input mask has been set, this property will only be true
+ if the current text is acceptable to the validator or input mask as a final
+ string (not as an intermediate string).
+*/
+bool QDeclarativeTextInput::hasAcceptableInput() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->control->hasAcceptableInput();
+}
+
+/*!
+ \qmlproperty TextInput.EchoMode TextInput::echoMode
+
+ Specifies how the text should be displayed in the TextInput.
+ The default is Normal, which displays the text as it is. Other values
+ are Password, which displays asterixes instead of characters, NoEcho,
+ which displays nothing, and PasswordEchoOnEdit, which displays all but the
+ current character as asterixes.
+
+*/
+QDeclarativeTextInput::EchoMode QDeclarativeTextInput::echoMode() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return (QDeclarativeTextInput::EchoMode)d->control->echoMode();
+}
+
+void QDeclarativeTextInput::setEchoMode(QDeclarativeTextInput::EchoMode echo)
+{
+ Q_D(QDeclarativeTextInput);
+ if (echoMode() == echo)
+ return;
+
+ d->control->setEchoMode((uint)echo);
+ emit echoModeChanged(echoMode());
+}
+
+/*!
+ \qmlproperty Component TextInput::cursorDelegate
+ The delegate for the cursor in the TextInput.
+
+ If you set a cursorDelegate for a TextInput, this delegate will be used for
+ drawing the cursor instead of the standard cursor. An instance of the
+ delegate will be created and managed by the TextInput when a cursor is
+ needed, and the x property of delegate instance will be set so as
+ to be one pixel before the top left of the current character.
+
+ Note that the root item of the delegate component must be a QDeclarativeItem or
+ QDeclarativeItem derived item.
+*/
+QDeclarativeComponent* QDeclarativeTextInput::cursorDelegate() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->cursorComponent;
+}
+
+void QDeclarativeTextInput::setCursorDelegate(QDeclarativeComponent* c)
+{
+ Q_D(QDeclarativeTextInput);
+ if (d->cursorComponent == c)
+ return;
+
+ d->cursorComponent = c;
+ if(!c){
+ //note that the components are owned by something else
+ disconnect(d->control, SIGNAL(cursorPositionChanged(int, int)),
+ this, SLOT(moveCursor()));
+ delete d->cursorItem;
+ }else{
+ d->startCreatingCursor();
+ }
+
+ emit cursorDelegateChanged();
+}
+
+void QDeclarativeTextInputPrivate::startCreatingCursor()
+{
+ Q_Q(QDeclarativeTextInput);
+ q->connect(control, SIGNAL(cursorPositionChanged(int, int)),
+ q, SLOT(moveCursor()));
+ if(cursorComponent->isReady()){
+ q->createCursor();
+ }else if(cursorComponent->isLoading()){
+ q->connect(cursorComponent, SIGNAL(statusChanged(int)),
+ q, SLOT(createCursor()));
+ }else{//isError
+ qmlInfo(q) << QDeclarativeTextInput::tr("Could not load cursor delegate");
+ qWarning() << cursorComponent->errors();
+ }
+}
+
+void QDeclarativeTextInput::createCursor()
+{
+ Q_D(QDeclarativeTextInput);
+ if(d->cursorComponent->isError()){
+ qmlInfo(this) << tr("Could not load cursor delegate");
+ qWarning() << d->cursorComponent->errors();
+ return;
+ }
+
+ if(!d->cursorComponent->isReady())
+ return;
+
+ if(d->cursorItem)
+ delete d->cursorItem;
+ d->cursorItem = qobject_cast<QDeclarativeItem*>(d->cursorComponent->create());
+ if(!d->cursorItem){
+ qmlInfo(this) << tr("Could not instantiate cursor delegate");
+ //The failed instantiation should print its own error messages
+ return;
+ }
+
+ d->cursorItem->setParentItem(this);
+ d->cursorItem->setX(d->control->cursorToX());
+ d->cursorItem->setHeight(d->control->height());
+}
+
+void QDeclarativeTextInput::moveCursor()
+{
+ Q_D(QDeclarativeTextInput);
+ if(!d->cursorItem)
+ return;
+ d->cursorItem->setX(d->control->cursorToX() - d->hscroll);
+}
+
+int QDeclarativeTextInput::xToPos(int x)
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->control->xToPos(x - d->hscroll);
+}
+
+void QDeclarativeTextInput::focusChanged(bool hasFocus)
+{
+ Q_D(QDeclarativeTextInput);
+ d->focused = hasFocus;
+ setCursorVisible(hasFocus);
+ QDeclarativeItem::focusChanged(hasFocus);
+}
+
+void QDeclarativeTextInput::keyPressEvent(QKeyEvent* ev)
+{
+ Q_D(QDeclarativeTextInput);
+ if(((d->control->cursor() == 0 && ev->key() == Qt::Key_Left)
+ || (d->control->cursor() == d->control->text().length()
+ && ev->key() == Qt::Key_Right))
+ && (d->lastSelectionStart == d->lastSelectionEnd)){
+ //ignore when moving off the end
+ //unless there is a selection, because then moving will do something (deselect)
+ ev->ignore();
+ }else{
+ d->control->processKeyEvent(ev);
+ }
+ if (!ev->isAccepted())
+ QDeclarativePaintedItem::keyPressEvent(ev);
+}
+
+void QDeclarativeTextInput::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeTextInput);
+ if(d->focusOnPress){
+ QGraphicsItem *p = parentItem();//###Is there a better way to find my focus scope?
+ while(p) {
+ if(p->flags() & QGraphicsItem::ItemIsFocusScope){
+ p->setFocus();
+ break;
+ }
+ p = p->parentItem();
+ }
+ setFocus(true);
+ }
+ d->control->processEvent(event);
+}
+
+/*!
+\overload
+Handles the given mouse \a event.
+*/
+void QDeclarativeTextInput::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeTextInput);
+ QWidget *widget = event->widget();
+ if (widget && !d->control->isReadOnly() && boundingRect().contains(event->pos()))
+ qt_widget_private(widget)->handleSoftwareInputPanel(event->button(), d->focusOnPress);
+ d->control->processEvent(event);
+}
+
+bool QDeclarativeTextInput::event(QEvent* ev)
+{
+ Q_D(QDeclarativeTextInput);
+ //Anything we don't deal with ourselves, pass to the control
+ bool handled = false;
+ switch(ev->type()){
+ case QEvent::KeyPress:
+ case QEvent::KeyRelease://###Should the control be doing anything with release?
+ case QEvent::GraphicsSceneMousePress:
+ case QEvent::GraphicsSceneMouseRelease:
+ break;
+ default:
+ handled = d->control->processEvent(ev);
+ if (ev->type() == QEvent::InputMethod)
+ updateSize();
+ }
+ if(!handled)
+ return QDeclarativePaintedItem::event(ev);
+ return true;
+}
+
+void QDeclarativeTextInput::geometryChanged(const QRectF &newGeometry,
+ const QRectF &oldGeometry)
+{
+ if (newGeometry.width() != oldGeometry.width())
+ updateSize();
+ QDeclarativePaintedItem::geometryChanged(newGeometry, oldGeometry);
+}
+
+void QDeclarativeTextInput::drawContents(QPainter *p, const QRect &r)
+{
+ Q_D(QDeclarativeTextInput);
+ p->setRenderHint(QPainter::TextAntialiasing, true);
+ p->save();
+ p->setPen(QPen(d->color));
+ int flags = QLineControl::DrawText;
+ if(!isReadOnly() && d->cursorVisible && !d->cursorItem)
+ flags |= QLineControl::DrawCursor;
+ if (d->control->hasSelectedText()){
+ flags |= QLineControl::DrawSelections;
+ }
+
+ QPoint offset = QPoint(0,0);
+ if(d->hAlign != AlignLeft){
+ QFontMetrics fm = QFontMetrics(d->font);
+ //###Is this using bearing appropriately?
+ int minLB = qMax(0, -fm.minLeftBearing());
+ int minRB = qMax(0, -fm.minRightBearing());
+ int widthUsed = qRound(d->control->naturalTextWidth()) + 1 + minRB;
+ int hOffset = 0;
+ if(d->hAlign == AlignRight){
+ hOffset = width() - widthUsed;
+ }else if(d->hAlign == AlignHCenter){
+ hOffset = (width() - widthUsed) / 2;
+ }
+ hOffset -= minLB;
+ offset = QPoint(hOffset, 0);
+ }
+ QRect clipRect = r;
+ d->control->draw(p, offset, clipRect, flags);
+
+ p->restore();
+}
+
+/*!
+\overload
+Returns the value of the given \a property.
+*/
+QVariant QDeclarativeTextInput::inputMethodQuery(Qt::InputMethodQuery property) const
+{
+ Q_D(const QDeclarativeTextInput);
+ switch(property) {
+ case Qt::ImFont:
+ return font();
+ case Qt::ImCursorPosition:
+ return QVariant(d->control->cursor());
+ case Qt::ImSurroundingText:
+ return QVariant(text());
+ case Qt::ImCurrentSelection:
+ return QVariant(selectedText());
+ case Qt::ImMaximumTextLength:
+ return QVariant(maxLength());
+ case Qt::ImAnchorPosition:
+ if (d->control->selectionStart() == d->control->selectionEnd())
+ return QVariant(d->control->cursor());
+ else if (d->control->selectionStart() == d->control->cursor())
+ return QVariant(d->control->selectionEnd());
+ else
+ return QVariant(d->control->selectionStart());
+ default:
+ return QVariant();
+ }
+}
+
+void QDeclarativeTextInput::selectAll()
+{
+ Q_D(QDeclarativeTextInput);
+ d->control->setSelection(0, d->control->text().length());
+}
+
+
+/*!
+ \qmlproperty bool TextInput::smooth
+
+ Set this property if you want the text to be smoothly scaled or
+ transformed. Smooth filtering gives better visual quality, but is slower. If
+ the item is displayed at its natural size, this property has no visual or
+ performance effect.
+
+ \note Generally scaling artifacts are only visible if the item is stationary on
+ the screen. A common pattern when animating an item is to disable smooth
+ filtering at the beginning of the animation and reenable it at the conclusion.
+*/
+
+void QDeclarativeTextInputPrivate::init()
+{
+ Q_Q(QDeclarativeTextInput);
+ control->setCursorWidth(1);
+ control->setPasswordCharacter(QLatin1Char('*'));
+ control->setLayoutDirection(Qt::LeftToRight);
+ q->setSmooth(smooth);
+ q->setAcceptedMouseButtons(Qt::LeftButton);
+ q->setFlag(QGraphicsItem::ItemHasNoContents, false);
+ q->setFlag(QGraphicsItem::ItemAcceptsInputMethod);
+ q->connect(control, SIGNAL(cursorPositionChanged(int,int)),
+ q, SLOT(cursorPosChanged()));
+ q->connect(control, SIGNAL(selectionChanged()),
+ q, SLOT(selectionChanged()));
+ q->connect(control, SIGNAL(textChanged(const QString &)),
+ q, SLOT(q_textChanged()));
+ q->connect(control, SIGNAL(accepted()),
+ q, SIGNAL(accepted()));
+ q->connect(control, SIGNAL(updateNeeded(QRect)),
+ q, SLOT(updateRect(QRect)));
+ q->connect(control, SIGNAL(cursorPositionChanged(int,int)),
+ q, SLOT(updateRect()));//TODO: Only update rect between pos's
+ q->connect(control, SIGNAL(selectionChanged()),
+ q, SLOT(updateRect()));//TODO: Only update rect in selection
+ //Note that above TODOs probably aren't that big a savings
+ q->updateSize();
+ oldValidity = control->hasAcceptableInput();
+ lastSelectionStart = 0;
+ lastSelectionEnd = 0;
+}
+
+void QDeclarativeTextInput::cursorPosChanged()
+{
+ Q_D(QDeclarativeTextInput);
+ emit cursorPositionChanged();
+
+ if(!d->control->hasSelectedText()){
+ if(d->lastSelectionStart != d->control->cursor()){
+ d->lastSelectionStart = d->control->cursor();
+ emit selectionStartChanged();
+ }
+ if(d->lastSelectionEnd != d->control->cursor()){
+ d->lastSelectionEnd = d->control->cursor();
+ emit selectionEndChanged();
+ }
+ }
+}
+
+void QDeclarativeTextInput::selectionChanged()
+{
+ Q_D(QDeclarativeTextInput);
+ emit selectedTextChanged();
+
+ if(d->lastSelectionStart != d->control->selectionStart()){
+ d->lastSelectionStart = d->control->selectionStart();
+ if(d->lastSelectionStart == -1)
+ d->lastSelectionStart = d->control->cursor();
+ emit selectionStartChanged();
+ }
+ if(d->lastSelectionEnd != d->control->selectionEnd()){
+ d->lastSelectionEnd = d->control->selectionEnd();
+ if(d->lastSelectionEnd == -1)
+ d->lastSelectionEnd = d->control->cursor();
+ emit selectionEndChanged();
+ }
+}
+
+void QDeclarativeTextInput::q_textChanged()
+{
+ Q_D(QDeclarativeTextInput);
+ updateSize();
+ emit textChanged();
+ if(hasAcceptableInput() != d->oldValidity){
+ d->oldValidity = hasAcceptableInput();
+ emit acceptableInputChanged();
+ }
+}
+
+void QDeclarativeTextInput::updateRect(const QRect &r)
+{
+ if(r == QRect())
+ clearCache();
+ else
+ dirtyCache(r);
+ update();
+}
+
+void QDeclarativeTextInput::updateSize(bool needsRedraw)
+{
+ Q_D(QDeclarativeTextInput);
+ int w = width();
+ int h = height();
+ setImplicitHeight(d->control->height());
+ int cursorWidth = d->control->cursorWidth();
+ if(d->cursorItem)
+ cursorWidth = d->cursorItem->width();
+ //### Is QFontMetrics too slow?
+ QFontMetricsF fm(d->font);
+ setImplicitWidth(fm.width(d->control->displayText())+cursorWidth);
+ setContentsSize(QSize(width(), height()));//Repaints if changed
+ if(w==width() && h==height() && needsRedraw){
+ clearCache();
+ update();
+ }
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h
new file mode 100644
index 0000000000..f690ae2428
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h
@@ -0,0 +1,232 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVETEXTINPUT_H
+#define QDECLARATIVETEXTINPUT_H
+
+#include "qdeclarativetext_p.h"
+#include "qdeclarativepainteditem_p.h"
+
+#include <QGraphicsSceneMouseEvent>
+#include <QIntValidator>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeTextInputPrivate;
+class QValidator;
+class Q_DECLARATIVE_EXPORT QDeclarativeTextInput : public QDeclarativePaintedItem
+{
+ Q_OBJECT
+ Q_ENUMS(HAlignment)
+ Q_ENUMS(EchoMode)
+
+ Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
+ Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
+ Q_PROPERTY(QColor selectionColor READ selectionColor WRITE setSelectionColor NOTIFY selectionColorChanged)
+ Q_PROPERTY(QColor selectedTextColor READ selectedTextColor WRITE setSelectedTextColor NOTIFY selectedTextColorChanged)
+ Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged)
+ Q_PROPERTY(HAlignment horizontalAlignment READ hAlign WRITE setHAlign NOTIFY horizontalAlignmentChanged)
+
+ Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly NOTIFY readOnlyChanged)
+ Q_PROPERTY(bool cursorVisible READ isCursorVisible WRITE setCursorVisible NOTIFY cursorVisibleChanged)
+ Q_PROPERTY(int cursorPosition READ cursorPosition WRITE setCursorPosition NOTIFY cursorPositionChanged)
+ Q_PROPERTY(QRect cursorRect READ cursorRect NOTIFY cursorPositionChanged)
+ Q_PROPERTY(QDeclarativeComponent *cursorDelegate READ cursorDelegate WRITE setCursorDelegate NOTIFY cursorDelegateChanged)
+ Q_PROPERTY(int selectionStart READ selectionStart WRITE setSelectionStart NOTIFY selectionStartChanged)
+ Q_PROPERTY(int selectionEnd READ selectionEnd WRITE setSelectionEnd NOTIFY selectionEndChanged)
+ Q_PROPERTY(QString selectedText READ selectedText NOTIFY selectedTextChanged)
+
+ Q_PROPERTY(int maximumLength READ maxLength WRITE setMaxLength NOTIFY maximumLengthChanged)
+ Q_PROPERTY(QValidator* validator READ validator WRITE setValidator NOTIFY validatorChanged)
+ Q_PROPERTY(QString inputMask READ inputMask WRITE setInputMask NOTIFY inputMaskChanged)
+ Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints)
+
+ Q_PROPERTY(bool acceptableInput READ hasAcceptableInput NOTIFY acceptableInputChanged)
+ Q_PROPERTY(EchoMode echoMode READ echoMode WRITE setEchoMode NOTIFY echoModeChanged)
+ Q_PROPERTY(bool focusOnPress READ focusOnPress WRITE setFocusOnPress NOTIFY focusOnPressChanged)
+
+public:
+ QDeclarativeTextInput(QDeclarativeItem* parent=0);
+ ~QDeclarativeTextInput();
+
+ enum EchoMode {//To match QLineEdit::EchoMode
+ Normal,
+ NoEcho,
+ Password,
+ PasswordEchoOnEdit
+ };
+
+ enum HAlignment {
+ AlignLeft = Qt::AlignLeft,
+ AlignRight = Qt::AlignRight,
+ AlignHCenter = Qt::AlignHCenter
+ };
+
+ //### Should we have this function, x based properties,
+ //### or copy TextEdit with x instead of QTextCursor?
+ Q_INVOKABLE int xToPos(int x);
+
+ QString text() const;
+ void setText(const QString &);
+
+ QFont font() const;
+ void setFont(const QFont &font);
+
+ QColor color() const;
+ void setColor(const QColor &c);
+
+ QColor selectionColor() const;
+ void setSelectionColor(const QColor &c);
+
+ QColor selectedTextColor() const;
+ void setSelectedTextColor(const QColor &c);
+
+ HAlignment hAlign() const;
+ void setHAlign(HAlignment align);
+
+ bool isReadOnly() const;
+ void setReadOnly(bool);
+
+ bool isCursorVisible() const;
+ void setCursorVisible(bool on);
+
+ int cursorPosition() const;
+ void setCursorPosition(int cp);
+
+ QRect cursorRect() const;
+
+ int selectionStart() const;
+ void setSelectionStart(int);
+
+ int selectionEnd() const;
+ void setSelectionEnd(int);
+
+ QString selectedText() const;
+
+ int maxLength() const;
+ void setMaxLength(int ml);
+
+ QValidator * validator() const;
+ void setValidator(QValidator* v);
+
+ QString inputMask() const;
+ void setInputMask(const QString &im);
+
+ EchoMode echoMode() const;
+ void setEchoMode(EchoMode echo);
+
+ QDeclarativeComponent* cursorDelegate() const;
+ void setCursorDelegate(QDeclarativeComponent*);
+
+ bool focusOnPress() const;
+ void setFocusOnPress(bool);
+
+ bool hasAcceptableInput() const;
+
+ void drawContents(QPainter *p,const QRect &r);
+ QVariant inputMethodQuery(Qt::InputMethodQuery property) const;
+
+Q_SIGNALS:
+ void textChanged();
+ void cursorPositionChanged();
+ void selectionStartChanged();
+ void selectionEndChanged();
+ void selectedTextChanged();
+ void accepted();
+ void acceptableInputChanged();
+ void colorChanged(const QColor &color);
+ void selectionColorChanged(const QColor &color);
+ void selectedTextColorChanged(const QColor &color);
+ void fontChanged(const QFont &font);
+ void horizontalAlignmentChanged(HAlignment alignment);
+ void readOnlyChanged(bool isReadOnly);
+ void cursorVisibleChanged(bool isCursorVisible);
+ void cursorDelegateChanged();
+ void maximumLengthChanged(int maximumLength);
+ void validatorChanged();
+ void inputMaskChanged(const QString &inputMask);
+ void echoModeChanged(EchoMode echoMode);
+ void focusOnPressChanged(bool focusOnPress);
+
+protected:
+ virtual void geometryChanged(const QRectF &newGeometry,
+ const QRectF &oldGeometry);
+
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+ void keyPressEvent(QKeyEvent* ev);
+ bool event(QEvent *e);
+
+ void focusChanged(bool hasFocus);
+
+public Q_SLOTS:
+ void selectAll();
+
+private Q_SLOTS:
+ void updateSize(bool needsRedraw = true);
+ void q_textChanged();
+ void selectionChanged();
+ void createCursor();
+ void moveCursor();
+ void cursorPosChanged();
+ void updateRect(const QRect &r = QRect());
+
+private:
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeTextInput)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeTextInput)
+QML_DECLARE_TYPE(QValidator)
+QML_DECLARE_TYPE(QIntValidator)
+#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0))
+QML_DECLARE_TYPE(QDoubleValidator)
+QML_DECLARE_TYPE(QRegExpValidator)
+#endif
+
+QT_END_HEADER
+
+#endif // QDECLARATIVETEXTINPUT_H
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
new file mode 100644
index 0000000000..3d28f4096f
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVETEXTINPUT_P_H
+#define QDECLARATIVETEXTINPUT_P_H
+
+#include "qdeclarativetextinput_p.h"
+
+#include "qdeclarativepainteditem_p_p.h"
+
+#include <qdeclarative.h>
+
+#include <QPointer>
+
+#include <private/qlinecontrol_p.h>
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeTextInputPrivate : public QDeclarativePaintedItemPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeTextInput)
+public:
+ QDeclarativeTextInputPrivate() : control(new QLineControl(QString())),
+ color((QRgb)0), style(QDeclarativeText::Normal),
+ styleColor((QRgb)0), hAlign(QDeclarativeTextInput::AlignLeft),
+ hscroll(0), oldScroll(0), focused(false), focusOnPress(true),
+ cursorVisible(false)
+ {
+ }
+
+ ~QDeclarativeTextInputPrivate()
+ {
+ delete control;
+ }
+
+ void init();
+ void startCreatingCursor();
+
+ QLineControl* control;
+
+ QFont font;
+ QColor color;
+ QColor selectionColor;
+ QColor selectedTextColor;
+ QDeclarativeText::TextStyle style;
+ QColor styleColor;
+ QDeclarativeTextInput::HAlignment hAlign;
+ QPointer<QDeclarativeComponent> cursorComponent;
+ QPointer<QDeclarativeItem> cursorItem;
+
+ int lastSelectionStart;
+ int lastSelectionEnd;
+ int oldHeight;
+ int oldWidth;
+ bool oldValidity;
+ int hscroll;
+ int oldScroll;
+ bool focused;
+ bool focusOnPress;
+ bool cursorVisible;
+};
+
+QT_END_NAMESPACE
+
+#endif
+
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
new file mode 100644
index 0000000000..6bad4daa01
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -0,0 +1,1302 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativevisualitemmodel_p.h"
+
+#include "qdeclarativeitem.h"
+
+#include <qdeclarativecontext.h>
+#include <qdeclarativeengine.h>
+#include <qdeclarativeexpression.h>
+#include <qdeclarativepackage_p.h>
+#include <qdeclarativeopenmetaobject_p.h>
+#include <qdeclarativelistaccessor_p.h>
+#include <qdeclarativeinfo.h>
+#include <qdeclarativedeclarativedata_p.h>
+#include <qdeclarativepropertycache_p.h>
+#include <qdeclarativeguard_p.h>
+#include <qdeclarativeglobal_p.h>
+
+#include <qlistmodelinterface_p.h>
+#include <qhash.h>
+#include <qlist.h>
+#include <qmetaobjectbuilder_p.h>
+#include <QtCore/qdebug.h>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+QHash<QObject*, QDeclarativeVisualItemModelAttached*> QDeclarativeVisualItemModelAttached::attachedProperties;
+
+
+class QDeclarativeVisualItemModelPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeVisualItemModel)
+public:
+ QDeclarativeVisualItemModelPrivate() : QObjectPrivate() {}
+
+ static void children_append(QDeclarativeListProperty<QDeclarativeItem> *prop, QDeclarativeItem *item) {
+ item->QObject::setParent(prop->object);
+ static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->children.append(item);
+ static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->itemAppended();
+ static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->emitChildrenChanged();
+ }
+
+ static int children_count(QDeclarativeListProperty<QDeclarativeItem> *prop) {
+ return static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->children.count();
+ }
+
+ static QDeclarativeItem *children_at(QDeclarativeListProperty<QDeclarativeItem> *prop, int index) {
+ return static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->children.at(index);
+ }
+
+ void itemAppended() {
+ Q_Q(QDeclarativeVisualItemModel);
+ QDeclarativeVisualItemModelAttached *attached = QDeclarativeVisualItemModelAttached::properties(children.last());
+ attached->setIndex(children.count()-1);
+ emit q->itemsInserted(children.count()-1, 1);
+ emit q->countChanged();
+ }
+
+ void emitChildrenChanged() {
+ Q_Q(QDeclarativeVisualItemModel);
+ emit q->childrenChanged();
+ }
+
+ QList<QDeclarativeItem *> children;
+};
+
+
+/*!
+ \qmlclass VisualItemModel QDeclarativeVisualItemModel
+ \since 4.7
+ \brief The VisualItemModel allows items to be provided to a view.
+
+ The children of the VisualItemModel are provided in a model which
+ can be used in a view. Note that no delegate should be
+ provided to a view since the VisualItemModel contains the
+ visual delegate (items).
+
+ An item can determine its index within the
+ model via the VisualItemModel.index attached property.
+
+ The example below places three colored rectangles in a ListView.
+ \code
+ Item {
+ VisualItemModel {
+ id: itemModel
+ Rectangle { height: 30; width: 80; color: "red" }
+ Rectangle { height: 30; width: 80; color: "green" }
+ Rectangle { height: 30; width: 80; color: "blue" }
+ }
+
+ ListView {
+ anchors.fill: parent
+ model: itemModel
+ }
+ }
+ \endcode
+*/
+QDeclarativeVisualItemModel::QDeclarativeVisualItemModel()
+ : QDeclarativeVisualModel(*(new QDeclarativeVisualItemModelPrivate))
+{
+}
+
+QDeclarativeListProperty<QDeclarativeItem> QDeclarativeVisualItemModel::children()
+{
+ Q_D(QDeclarativeVisualItemModel);
+ return QDeclarativeListProperty<QDeclarativeItem>(this, d, d->children_append,
+ d->children_count, d->children_at);
+}
+
+/*!
+ \qmlproperty int VisualItemModel::count
+
+ The number of items in the model. This property is readonly.
+*/
+int QDeclarativeVisualItemModel::count() const
+{
+ Q_D(const QDeclarativeVisualItemModel);
+ return d->children.count();
+}
+
+bool QDeclarativeVisualItemModel::isValid() const
+{
+ return true;
+}
+
+QDeclarativeItem *QDeclarativeVisualItemModel::item(int index, bool)
+{
+ Q_D(QDeclarativeVisualItemModel);
+ return d->children.at(index);
+}
+
+QDeclarativeVisualModel::ReleaseFlags QDeclarativeVisualItemModel::release(QDeclarativeItem *)
+{
+ // Nothing to do
+ return 0;
+}
+
+void QDeclarativeVisualItemModel::completeItem()
+{
+ // Nothing to do
+}
+
+QString QDeclarativeVisualItemModel::stringValue(int index, const QString &name)
+{
+ Q_D(QDeclarativeVisualItemModel);
+ if (index < 0 || index >= d->children.count())
+ return QString();
+ return QDeclarativeEngine::contextForObject(d->children.at(index))->contextProperty(name).toString();
+}
+
+QVariant QDeclarativeVisualItemModel::evaluate(int index, const QString &expression, QObject *objectContext)
+{
+ Q_D(QDeclarativeVisualItemModel);
+ if (index < 0 || index >= d->children.count())
+ return QVariant();
+ QDeclarativeContext *ccontext = qmlContext(this);
+ QDeclarativeContext *ctxt = new QDeclarativeContext(ccontext);
+ ctxt->addDefaultObject(d->children.at(index));
+ QDeclarativeExpression e(ctxt, expression, objectContext);
+ QVariant value = e.value();
+ delete ctxt;
+ return value;
+}
+
+int QDeclarativeVisualItemModel::indexOf(QDeclarativeItem *item, QObject *) const
+{
+ Q_D(const QDeclarativeVisualItemModel);
+ return d->children.indexOf(item);
+}
+
+QDeclarativeVisualItemModelAttached *QDeclarativeVisualItemModel::qmlAttachedProperties(QObject *obj)
+{
+ return QDeclarativeVisualItemModelAttached::properties(obj);
+}
+
+//============================================================================
+
+class VDMDelegateDataType : public QDeclarativeOpenMetaObjectType
+{
+public:
+ VDMDelegateDataType(const QMetaObject *base, QDeclarativeEngine *engine) : QDeclarativeOpenMetaObjectType(base, engine) {}
+
+ void propertyCreated(int, QMetaPropertyBuilder &prop) {
+ prop.setWritable(false);
+ }
+};
+
+class QDeclarativeVisualDataModelParts;
+class QDeclarativeVisualDataModelData;
+class QDeclarativeVisualDataModelPrivate : public QObjectPrivate
+{
+public:
+ QDeclarativeVisualDataModelPrivate(QDeclarativeContext *);
+
+ static QDeclarativeVisualDataModelPrivate *get(QDeclarativeVisualDataModel *m) {
+ return static_cast<QDeclarativeVisualDataModelPrivate *>(QObjectPrivate::get(m));
+ }
+
+ QDeclarativeGuard<QListModelInterface> m_listModelInterface;
+ QDeclarativeGuard<QAbstractItemModel> m_abstractItemModel;
+ QDeclarativeGuard<QDeclarativeVisualDataModel> m_visualItemModel;
+ QString m_part;
+
+ QDeclarativeComponent *m_delegate;
+ QDeclarativeContext *m_context;
+ QList<int> m_roles;
+ QHash<QByteArray,int> m_roleNames;
+ void ensureRoles() {
+ if (m_roleNames.isEmpty()) {
+ if (m_listModelInterface) {
+ 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<int,QByteArray>::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));
+ } else if (m_listAccessor) {
+ m_roleNames.insert("modelData", 0);
+ if (m_listAccessor->type() == QDeclarativeListAccessor::Instance) {
+ if (QObject *object = m_listAccessor->at(0).value<QObject*>()) {
+ int count = object->metaObject()->propertyCount();
+ for (int ii = 1; ii < count; ++ii) {
+ const QMetaProperty &prop = object->metaObject()->property(ii);
+ m_roleNames.insert(prop.name(), 0);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ void createMetaData() {
+ if (!m_metaDataCreated) {
+ ensureRoles();
+ QHash<QByteArray, int>::const_iterator it = m_roleNames.begin();
+ while (it != m_roleNames.end()) {
+ m_delegateDataType->createProperty(it.key());
+ ++it;
+ }
+ m_metaDataCreated = true;
+ }
+ }
+
+ struct ObjectRef {
+ ObjectRef(QObject *object=0) : obj(object), ref(1) {}
+ QObject *obj;
+ int ref;
+ };
+ class Cache : public QHash<int, ObjectRef> {
+ public:
+ QObject *getItem(int index) {
+ QObject *item = 0;
+ QHash<int,ObjectRef>::iterator it = find(index);
+ if (it != end()) {
+ (*it).ref++;
+ item = (*it).obj;
+ }
+ return item;
+ }
+ QObject *item(int index) {
+ QObject *item = 0;
+ QHash<int, ObjectRef>::const_iterator it = find(index);
+ if (it != end())
+ item = (*it).obj;
+ return item;
+ }
+ void insertItem(int index, QObject *obj) {
+ insert(index, ObjectRef(obj));
+ }
+ bool releaseItem(QObject *obj) {
+ QHash<int, ObjectRef>::iterator it = begin();
+ for (; it != end(); ++it) {
+ ObjectRef &objRef = *it;
+ if (objRef.obj == obj) {
+ if (--objRef.ref == 0) {
+ erase(it);
+ return true;
+ }
+ break;
+ }
+ }
+ return false;
+ }
+ };
+
+ int modelCount() const {
+ if (m_visualItemModel)
+ return m_visualItemModel->count();
+ if (m_listModelInterface)
+ return m_listModelInterface->count();
+ if (m_abstractItemModel)
+ return m_abstractItemModel->rowCount(m_root);
+ if (m_listAccessor)
+ return m_listAccessor->count();
+ return 0;
+ }
+
+ Cache m_cache;
+ QHash<QObject *, QDeclarativePackage*> m_packaged;
+
+ QDeclarativeVisualDataModelParts *m_parts;
+ friend class QDeclarativeVisualItemParts;
+
+ VDMDelegateDataType *m_delegateDataType;
+ friend class QDeclarativeVisualDataModelData;
+ bool m_metaDataCreated;
+ bool m_metaDataCacheable;
+
+ QDeclarativeVisualDataModelData *data(QObject *item);
+
+ QVariant m_modelVariant;
+ QDeclarativeListAccessor *m_listAccessor;
+
+ QModelIndex m_root;
+};
+
+class QDeclarativeVisualDataModelDataMetaObject : public QDeclarativeOpenMetaObject
+{
+public:
+ QDeclarativeVisualDataModelDataMetaObject(QObject *parent, QDeclarativeOpenMetaObjectType *type)
+ : QDeclarativeOpenMetaObject(parent, type) {}
+
+ virtual QVariant initialValue(int);
+ virtual int createProperty(const char *, const char *);
+
+private:
+ friend class QDeclarativeVisualDataModelData;
+ QHash<int,int> roleToProp;
+};
+
+class QDeclarativeVisualDataModelData : public QObject
+{
+Q_OBJECT
+public:
+ QDeclarativeVisualDataModelData(int index, QDeclarativeVisualDataModel *model);
+ ~QDeclarativeVisualDataModelData();
+
+ Q_PROPERTY(int index READ index NOTIFY indexChanged)
+ int index() const;
+ void setIndex(int index);
+
+ int propForRole(int) const;
+ void setValue(int, const QVariant &);
+
+Q_SIGNALS:
+ void indexChanged();
+
+private:
+ friend class QDeclarativeVisualDataModelDataMetaObject;
+ int m_index;
+ QDeclarativeGuard<QDeclarativeVisualDataModel> m_model;
+ QDeclarativeVisualDataModelDataMetaObject *m_meta;
+};
+
+int QDeclarativeVisualDataModelData::propForRole(int id) const
+{
+ QHash<int,int>::const_iterator it = m_meta->roleToProp.find(id);
+ if (it != m_meta->roleToProp.end())
+ return m_meta->roleToProp[id];
+ return -1;
+}
+
+void QDeclarativeVisualDataModelData::setValue(int id, const QVariant &val)
+{
+ m_meta->setValue(id, val);
+}
+
+int QDeclarativeVisualDataModelDataMetaObject::createProperty(const char *name, const char *type)
+{
+ QDeclarativeVisualDataModelData *data =
+ static_cast<QDeclarativeVisualDataModelData *>(object());
+
+ if (!data->m_model)
+ return -1;
+
+ QDeclarativeVisualDataModelPrivate *model = QDeclarativeVisualDataModelPrivate::get(data->m_model);
+
+ if ((!model->m_listModelInterface || !model->m_abstractItemModel) && model->m_listAccessor) {
+ if (model->m_listAccessor->type() == QDeclarativeListAccessor::ListProperty) {
+ model->ensureRoles();
+ QObject *object = model->m_listAccessor->at(data->m_index).value<QObject*>();
+ if (object && (object->property(name).isValid() || qstrcmp(name,"modelData")==0))
+ return QDeclarativeOpenMetaObject::createProperty(name, type);
+ }
+ }
+ return -1;
+}
+
+QVariant QDeclarativeVisualDataModelDataMetaObject::initialValue(int propId)
+{
+ QDeclarativeVisualDataModelData *data =
+ static_cast<QDeclarativeVisualDataModelData *>(object());
+
+ Q_ASSERT(data->m_model);
+ QDeclarativeVisualDataModelPrivate *model = QDeclarativeVisualDataModelPrivate::get(data->m_model);
+
+ QByteArray propName = name(propId);
+ if ((!model->m_listModelInterface || !model->m_abstractItemModel) && model->m_listAccessor) {
+ if (propName == "modelData") {
+ if (model->m_listAccessor->type() == QDeclarativeListAccessor::Instance) {
+ QObject *object = model->m_listAccessor->at(0).value<QObject*>();
+ return object->metaObject()->property(1).read(object); // the first property after objectName
+ }
+ return model->m_listAccessor->at(data->m_index);
+ } else {
+ // return any property of a single object instance.
+ QObject *object = model->m_listAccessor->at(data->m_index).value<QObject*>();
+ return object->property(propName);
+ }
+ } else if (model->m_listModelInterface) {
+ model->ensureRoles();
+ QHash<QByteArray,int>::const_iterator it = model->m_roleNames.find(propName);
+ if (it != model->m_roleNames.end()) {
+ roleToProp.insert(*it, propId);
+ QVariant value = model->m_listModelInterface->data(data->m_index, *it);
+ return value;
+ } else if (model->m_roles.count() == 1 && propName == "modelData") {
+ //for compatability with other lists, assign modelData if there is only a single role
+ roleToProp.insert(model->m_roles.first(), propId);
+ QVariant value = model->m_listModelInterface->data(data->m_index, model->m_roles.first());
+ return value;
+ }
+ } else if (model->m_abstractItemModel) {
+ model->ensureRoles();
+ QHash<QByteArray,int>::const_iterator it = model->m_roleNames.find(propName);
+ if (it != model->m_roleNames.end()) {
+ roleToProp.insert(*it, propId);
+ QModelIndex index = model->m_abstractItemModel->index(data->m_index, 0, model->m_root);
+ return model->m_abstractItemModel->data(index, *it);
+ }
+ }
+ Q_ASSERT(!"Can never be reached");
+ return QVariant();
+}
+
+QDeclarativeVisualDataModelData::QDeclarativeVisualDataModelData(int index,
+ QDeclarativeVisualDataModel *model)
+: m_index(index), m_model(model),
+m_meta(new QDeclarativeVisualDataModelDataMetaObject(this, QDeclarativeVisualDataModelPrivate::get(model)->m_delegateDataType))
+{
+ QDeclarativeVisualDataModelPrivate *modelPriv = QDeclarativeVisualDataModelPrivate::get(model);
+ if (modelPriv->m_metaDataCacheable) {
+ if (!modelPriv->m_metaDataCreated)
+ modelPriv->createMetaData();
+ m_meta->setCached(true);
+ }
+}
+
+QDeclarativeVisualDataModelData::~QDeclarativeVisualDataModelData()
+{
+}
+
+int QDeclarativeVisualDataModelData::index() const
+{
+ return m_index;
+}
+
+// This is internal only - it should not be set from qml
+void QDeclarativeVisualDataModelData::setIndex(int index)
+{
+ m_index = index;
+ emit indexChanged();
+}
+
+//---------------------------------------------------------------------------
+
+class QDeclarativeVisualDataModelPartsMetaObject : public QDeclarativeOpenMetaObject
+{
+public:
+ QDeclarativeVisualDataModelPartsMetaObject(QObject *parent)
+ : QDeclarativeOpenMetaObject(parent) {}
+
+ virtual void propertyCreated(int, QMetaPropertyBuilder &);
+ virtual QVariant initialValue(int);
+};
+
+class QDeclarativeVisualDataModelParts : public QObject
+{
+Q_OBJECT
+public:
+ QDeclarativeVisualDataModelParts(QDeclarativeVisualDataModel *parent);
+
+private:
+ friend class QDeclarativeVisualDataModelPartsMetaObject;
+ QDeclarativeVisualDataModel *model;
+};
+
+void QDeclarativeVisualDataModelPartsMetaObject::propertyCreated(int, QMetaPropertyBuilder &prop)
+{
+ prop.setWritable(false);
+}
+
+QVariant QDeclarativeVisualDataModelPartsMetaObject::initialValue(int id)
+{
+ QDeclarativeVisualDataModel *m = new QDeclarativeVisualDataModel;
+ m->setParent(object());
+ m->setPart(QString::fromUtf8(name(id)));
+ m->setModel(QVariant::fromValue(static_cast<QDeclarativeVisualDataModelParts *>(object())->model));
+
+ QVariant var = QVariant::fromValue((QObject *)m);
+ return var;
+}
+
+QDeclarativeVisualDataModelParts::QDeclarativeVisualDataModelParts(QDeclarativeVisualDataModel *parent)
+: QObject(parent), model(parent)
+{
+ new QDeclarativeVisualDataModelPartsMetaObject(this);
+}
+
+QDeclarativeVisualDataModelPrivate::QDeclarativeVisualDataModelPrivate(QDeclarativeContext *ctxt)
+: m_listModelInterface(0), m_abstractItemModel(0), m_visualItemModel(0), m_delegate(0)
+, m_context(ctxt), m_parts(0), m_delegateDataType(0), m_metaDataCreated(false)
+, m_metaDataCacheable(false), m_listAccessor(0)
+{
+}
+
+QDeclarativeVisualDataModelData *QDeclarativeVisualDataModelPrivate::data(QObject *item)
+{
+ QDeclarativeVisualDataModelData *dataItem =
+ item->findChild<QDeclarativeVisualDataModelData *>();
+ Q_ASSERT(dataItem);
+ return dataItem;
+}
+
+//---------------------------------------------------------------------------
+
+/*!
+ \qmlclass VisualDataModel QDeclarativeVisualDataModel
+ \brief The VisualDataModel encapsulates a model and delegate
+
+ A VisualDataModel encapsulates a model and the delegate that will
+ be instantiated for items in the model.
+
+ It is usually not necessary to create a VisualDataModel directly,
+ since the QML views will create one internally.
+
+ The example below illustrates using a VisualDataModel with a ListView.
+
+ \code
+ VisualDataModel {
+ id: visualModel
+ model: myModel
+ delegate: Component {
+ Rectangle {
+ height: 25
+ width: 100
+ Text { text: "Name:" + name}
+ }
+ }
+ }
+ ListView {
+ width: 100
+ height: 100
+ anchors.fill: parent
+ model: visualModel
+ }
+ \endcode
+*/
+
+QDeclarativeVisualDataModel::QDeclarativeVisualDataModel()
+: QDeclarativeVisualModel(*(new QDeclarativeVisualDataModelPrivate(0)))
+{
+}
+
+QDeclarativeVisualDataModel::QDeclarativeVisualDataModel(QDeclarativeContext *ctxt)
+: QDeclarativeVisualModel(*(new QDeclarativeVisualDataModelPrivate(ctxt)))
+{
+}
+
+QDeclarativeVisualDataModel::~QDeclarativeVisualDataModel()
+{
+ Q_D(QDeclarativeVisualDataModel);
+ if (d->m_listAccessor)
+ delete d->m_listAccessor;
+ if (d->m_delegateDataType)
+ d->m_delegateDataType->release();
+}
+
+/*!
+ \qmlproperty model VisualDataModel::model
+ This property holds the model providing data for the VisualDataModel.
+
+ The model provides a set of data that is used to create the items
+ for a view. For large or dynamic datasets the model is usually
+ provided by a C++ model object. The C++ model object must be a \l
+ {QAbstractItemModel} subclass or a simple list.
+
+ Models can also be created directly in QML, using a \l{ListModel} or
+ \l{XmlListModel}.
+
+ \sa {qmlmodels}{Data Models}
+*/
+QVariant QDeclarativeVisualDataModel::model() const
+{
+ Q_D(const QDeclarativeVisualDataModel);
+ return d->m_modelVariant;
+}
+
+void QDeclarativeVisualDataModel::setModel(const QVariant &model)
+{
+ Q_D(QDeclarativeVisualDataModel);
+ delete d->m_listAccessor;
+ d->m_listAccessor = 0;
+ d->m_modelVariant = model;
+ if (d->m_listModelInterface) {
+ // Assume caller has released all items.
+ QObject::disconnect(d->m_listModelInterface, SIGNAL(itemsChanged(int,int,QList<int>)),
+ this, SLOT(_q_itemsChanged(int,int,QList<int>)));
+ QObject::disconnect(d->m_listModelInterface, SIGNAL(itemsInserted(int,int)),
+ this, SLOT(_q_itemsInserted(int,int)));
+ QObject::disconnect(d->m_listModelInterface, SIGNAL(itemsRemoved(int,int)),
+ this, SLOT(_q_itemsRemoved(int,int)));
+ QObject::disconnect(d->m_listModelInterface, SIGNAL(itemsMoved(int,int,int)),
+ this, SLOT(_q_itemsMoved(int,int,int)));
+ d->m_listModelInterface = 0;
+ } else if (d->m_abstractItemModel) {
+ QObject::disconnect(d->m_abstractItemModel, SIGNAL(rowsInserted(const QModelIndex &,int,int)),
+ this, SLOT(_q_rowsInserted(const QModelIndex &,int,int)));
+ QObject::disconnect(d->m_abstractItemModel, SIGNAL(rowsRemoved(const QModelIndex &,int,int)),
+ this, SLOT(_q_rowsRemoved(const QModelIndex &,int,int)));
+ QObject::disconnect(d->m_abstractItemModel, SIGNAL(dataChanged(const QModelIndex&,const QModelIndex&)),
+ this, SLOT(_q_dataChanged(const QModelIndex&,const QModelIndex&)));
+ QObject::disconnect(d->m_abstractItemModel, SIGNAL(rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)),
+ this, SLOT(_q_rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)));
+ QObject::disconnect(d->m_abstractItemModel, SIGNAL(modelReset()), this, SLOT(_q_modelReset()));
+ } else if (d->m_visualItemModel) {
+ QObject::disconnect(d->m_visualItemModel, SIGNAL(itemsInserted(int,int)),
+ this, SIGNAL(itemsInserted(int,int)));
+ QObject::disconnect(d->m_visualItemModel, SIGNAL(itemsRemoved(int,int)),
+ this, SIGNAL(itemsRemoved(int,int)));
+ QObject::disconnect(d->m_visualItemModel, SIGNAL(itemsMoved(int,int,int)),
+ this, SIGNAL(itemsMoved(int,int,int)));
+ QObject::disconnect(d->m_visualItemModel, SIGNAL(createdPackage(int,QDeclarativePackage*)),
+ this, SLOT(_q_createdPackage(int,QDeclarativePackage*)));
+ QObject::disconnect(d->m_visualItemModel, SIGNAL(destroyingPackage(QDeclarativePackage*)),
+ this, SLOT(_q_destroyingPackage(QDeclarativePackage*)));
+ d->m_visualItemModel = 0;
+ }
+
+ d->m_roles.clear();
+ d->m_roleNames.clear();
+ if (d->m_delegateDataType)
+ d->m_delegateDataType->release();
+ d->m_metaDataCreated = 0;
+ d->m_metaDataCacheable = false;
+ d->m_delegateDataType = new VDMDelegateDataType(&QDeclarativeVisualDataModelData::staticMetaObject, d->m_context?d->m_context->engine():qmlEngine(this));
+
+ QObject *object = qvariant_cast<QObject *>(model);
+ if (object && (d->m_listModelInterface = qobject_cast<QListModelInterface *>(object))) {
+ QObject::connect(d->m_listModelInterface, SIGNAL(itemsChanged(int,int,QList<int>)),
+ this, SLOT(_q_itemsChanged(int,int,QList<int>)));
+ QObject::connect(d->m_listModelInterface, SIGNAL(itemsInserted(int,int)),
+ this, SLOT(_q_itemsInserted(int,int)));
+ QObject::connect(d->m_listModelInterface, SIGNAL(itemsRemoved(int,int)),
+ this, SLOT(_q_itemsRemoved(int,int)));
+ QObject::connect(d->m_listModelInterface, SIGNAL(itemsMoved(int,int,int)),
+ this, SLOT(_q_itemsMoved(int,int,int)));
+ d->m_metaDataCacheable = true;
+ if (d->m_delegate && d->m_listModelInterface->count())
+ emit itemsInserted(0, d->m_listModelInterface->count());
+ return;
+ } else if (object && (d->m_abstractItemModel = qobject_cast<QAbstractItemModel *>(object))) {
+ QObject::connect(d->m_abstractItemModel, SIGNAL(rowsInserted(const QModelIndex &,int,int)),
+ this, SLOT(_q_rowsInserted(const QModelIndex &,int,int)));
+ QObject::connect(d->m_abstractItemModel, SIGNAL(rowsRemoved(const QModelIndex &,int,int)),
+ this, SLOT(_q_rowsRemoved(const QModelIndex &,int,int)));
+ QObject::connect(d->m_abstractItemModel, SIGNAL(dataChanged(const QModelIndex&,const QModelIndex&)),
+ this, SLOT(_q_dataChanged(const QModelIndex&,const QModelIndex&)));
+ QObject::connect(d->m_abstractItemModel, SIGNAL(rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)),
+ this, SLOT(_q_rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)));
+ QObject::connect(d->m_abstractItemModel, SIGNAL(modelReset()), this, SLOT(_q_modelReset()));
+ d->m_metaDataCacheable = true;
+ return;
+ }
+ if ((d->m_visualItemModel = qvariant_cast<QDeclarativeVisualDataModel *>(model))) {
+ QObject::connect(d->m_visualItemModel, SIGNAL(itemsInserted(int,int)),
+ this, SIGNAL(itemsInserted(int,int)));
+ QObject::connect(d->m_visualItemModel, SIGNAL(itemsRemoved(int,int)),
+ this, SIGNAL(itemsRemoved(int,int)));
+ QObject::connect(d->m_visualItemModel, SIGNAL(itemsMoved(int,int,int)),
+ this, SIGNAL(itemsMoved(int,int,int)));
+ QObject::connect(d->m_visualItemModel, SIGNAL(createdPackage(int,QDeclarativePackage*)),
+ this, SLOT(_q_createdPackage(int,QDeclarativePackage*)));
+ QObject::connect(d->m_visualItemModel, SIGNAL(destroyingPackage(QDeclarativePackage*)),
+ this, SLOT(_q_destroyingPackage(QDeclarativePackage*)));
+ return;
+ }
+ d->m_listAccessor = new QDeclarativeListAccessor;
+ d->m_listAccessor->setList(model, d->m_context?d->m_context->engine():qmlEngine(this));
+ if (d->m_listAccessor->type() != QDeclarativeListAccessor::ListProperty)
+ d->m_metaDataCacheable = true;
+ if (d->m_delegate && d->modelCount()) {
+ emit itemsInserted(0, d->modelCount());
+ emit countChanged();
+ }
+}
+
+/*!
+ \qmlproperty component VisualDataModel::delegate
+
+ The delegate provides a template defining each item instantiated by a view.
+ The index is exposed as an accessible \c index property. Properties of the
+ model are also available depending upon the type of \l {qmlmodels}{Data Model}.
+
+ Here is an example delegate:
+ \snippet doc/src/snippets/declarative/listview/listview.qml 0
+*/
+QDeclarativeComponent *QDeclarativeVisualDataModel::delegate() const
+{
+ Q_D(const QDeclarativeVisualDataModel);
+ if (d->m_visualItemModel)
+ return d->m_visualItemModel->delegate();
+ return d->m_delegate;
+}
+
+void QDeclarativeVisualDataModel::setDelegate(QDeclarativeComponent *delegate)
+{
+ Q_D(QDeclarativeVisualDataModel);
+ bool wasValid = d->m_delegate != 0;
+ d->m_delegate = delegate;
+ if (!wasValid && d->modelCount() && d->m_delegate) {
+ emit itemsInserted(0, d->modelCount());
+ emit countChanged();
+ }
+ if (wasValid && !d->m_delegate && d->modelCount()) {
+ emit itemsRemoved(0, d->modelCount());
+ emit countChanged();
+ }
+}
+
+/*!
+ \qmlproperty QModelIndex VisualDataModel::rootIndex
+
+ QAbstractItemModel provides a heirachical tree of data, whereas
+ QML only operates on list data. rootIndex allows the children of
+ any node in a QAbstractItemModel to be provided by this model.
+
+ This property only affects models of type QAbstractItemModel.
+
+ \code
+ // main.cpp
+ Q_DECLARE_METATYPE(QModelIndex)
+
+ class MyModel : public QDirModel
+ {
+ Q_OBJECT
+ public:
+ MyModel(QDeclarativeContext *ctxt) : QDirModel(), context(ctxt) {
+ QHash<int,QByteArray> roles = roleNames();
+ roles.insert(FilePathRole, "path");
+ setRoleNames(roles);
+ context->setContextProperty("myModel", this);
+ context->setContextProperty("myRoot", QVariant::fromValue(index(0,0,QModelIndex())));
+ }
+
+ Q_INVOKABLE void setRoot(const QString &path) {
+ QModelIndex root = index(path);
+ context->setContextProperty("myRoot", QVariant::fromValue(root));
+ }
+
+ QDeclarativeContext *context;
+ };
+
+ int main(int argc, char ** argv)
+ {
+ QApplication app(argc, argv);
+
+ QDeclarativeView view;
+
+ MyModel model(view.rootContext());
+
+ view.setSource(QUrl("qrc:view.qml"));
+ view.show();
+
+ return app.exec();
+ }
+
+ #include "main.moc"
+ \endcode
+
+ \code
+ // view.qml
+ import Qt 4.6
+
+ ListView {
+ width: 200
+ height: 200
+ model: VisualDataModel {
+ model: myModel
+ rootIndex: myRoot
+ delegate: Component {
+ Rectangle {
+ height: 25; width: 100
+ Text { text: path }
+ MouseArea {
+ anchors.fill: parent;
+ onClicked: myModel.setRoot(path)
+ }
+ }
+ }
+ }
+ }
+ \endcode
+
+*/
+QModelIndex QDeclarativeVisualDataModel::rootIndex() const
+{
+ Q_D(const QDeclarativeVisualDataModel);
+ return d->m_root;
+}
+
+void QDeclarativeVisualDataModel::setRootIndex(const QModelIndex &root)
+{
+ Q_D(QDeclarativeVisualDataModel);
+ if (d->m_root != root) {
+ int oldCount = d->modelCount();
+ d->m_root = root;
+ int newCount = d->modelCount();
+ if (d->m_delegate && oldCount)
+ emit itemsRemoved(0, oldCount);
+ if (d->m_delegate && newCount)
+ emit itemsInserted(0, newCount);
+ if (newCount != oldCount)
+ emit countChanged();
+ emit rootIndexChanged();
+ }
+}
+
+QString QDeclarativeVisualDataModel::part() const
+{
+ Q_D(const QDeclarativeVisualDataModel);
+ return d->m_part;
+}
+
+void QDeclarativeVisualDataModel::setPart(const QString &part)
+{
+ Q_D(QDeclarativeVisualDataModel);
+ d->m_part = part;
+}
+
+int QDeclarativeVisualDataModel::count() const
+{
+ Q_D(const QDeclarativeVisualDataModel);
+ return d->modelCount();
+}
+
+QDeclarativeItem *QDeclarativeVisualDataModel::item(int index, bool complete)
+{
+ Q_D(QDeclarativeVisualDataModel);
+ if (d->m_visualItemModel)
+ return d->m_visualItemModel->item(index, d->m_part.toUtf8(), complete);
+ return item(index, QByteArray(), complete);
+}
+
+/*
+ Returns ReleaseStatus flags.
+*/
+QDeclarativeVisualDataModel::ReleaseFlags QDeclarativeVisualDataModel::release(QDeclarativeItem *item)
+{
+ Q_D(QDeclarativeVisualDataModel);
+ if (d->m_visualItemModel)
+ return d->m_visualItemModel->release(item);
+
+ ReleaseFlags stat = 0;
+ QObject *obj = item;
+ bool inPackage = false;
+
+ QHash<QObject*,QDeclarativePackage*>::iterator it = d->m_packaged.find(item);
+ if (it != d->m_packaged.end()) {
+ QDeclarativePackage *package = *it;
+ d->m_packaged.erase(it);
+ if (d->m_packaged.contains(item))
+ stat |= Referenced;
+ inPackage = true;
+ obj = package; // fall through and delete
+ }
+
+ if (d->m_cache.releaseItem(obj)) {
+ if (inPackage) {
+ emit destroyingPackage(qobject_cast<QDeclarativePackage*>(obj));
+ } else {
+ if (item->hasFocus())
+ item->clearFocus();
+ item->setOpacity(0.0);
+ static_cast<QGraphicsItem*>(item)->setParentItem(0);
+ }
+ stat |= Destroyed;
+ obj->deleteLater();
+ } else if (!inPackage) {
+ stat |= Referenced;
+ }
+
+ return stat;
+}
+
+/*!
+ \qmlproperty object VisualDataModel::parts
+
+ The \a parts property selects a VisualDataModel which creates
+ delegates from the part named. This is used in conjunction with
+ the Package element.
+
+ For example, the code below selects a model which creates
+ delegates named \e list from a Package:
+
+ \code
+ VisualDataModel {
+ id: visualModel
+ delegate: Package {
+ Item { Package.name: "list" }
+ }
+ model: myModel
+ }
+
+ ListView {
+ width: 200; height:200
+ model: visualModel.parts.list
+ }
+ \endcode
+
+ \sa Package
+*/
+QObject *QDeclarativeVisualDataModel::parts()
+{
+ Q_D(QDeclarativeVisualDataModel);
+ if (!d->m_parts)
+ d->m_parts = new QDeclarativeVisualDataModelParts(this);
+ return d->m_parts;
+}
+
+QDeclarativeItem *QDeclarativeVisualDataModel::item(int index, const QByteArray &viewId, bool complete)
+{
+ Q_D(QDeclarativeVisualDataModel);
+ if (d->m_visualItemModel)
+ return d->m_visualItemModel->item(index, viewId, complete);
+
+ if (d->modelCount() <= 0 || !d->m_delegate)
+ return 0;
+ QObject *nobj = d->m_cache.getItem(index);
+ if (!nobj) {
+ QDeclarativeContext *ccontext = d->m_context;
+ if (!ccontext) ccontext = qmlContext(this);
+ QDeclarativeContext *ctxt = new QDeclarativeContext(ccontext);
+ QDeclarativeVisualDataModelData *data = new QDeclarativeVisualDataModelData(index, this);
+ ctxt->setContextProperty(QLatin1String("model"), data);
+ ctxt->addDefaultObject(data);
+ nobj = d->m_delegate->beginCreate(ctxt);
+ if (complete)
+ d->m_delegate->completeCreate();
+ if (nobj) {
+ QDeclarative_setParent_noEvent(ctxt, nobj);
+ QDeclarative_setParent_noEvent(data, nobj);
+ d->m_cache.insertItem(index, nobj);
+ if (QDeclarativePackage *package = qobject_cast<QDeclarativePackage *>(nobj))
+ emit createdPackage(index, package);
+ } else {
+ delete data;
+ delete ctxt;
+ qWarning() << d->m_delegate->errors();
+ }
+ }
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(nobj);
+ if (!item) {
+ QDeclarativePackage *package = qobject_cast<QDeclarativePackage *>(nobj);
+ if (package) {
+ QObject *o = package->part(QString::fromUtf8(viewId));
+ item = qobject_cast<QDeclarativeItem *>(o);
+ if (item)
+ d->m_packaged.insertMulti(item, package);
+ }
+ }
+ if (!item) {
+ d->m_cache.releaseItem(nobj);
+ qmlInfo(d->m_delegate) << QDeclarativeVisualDataModel::tr("Delegate component must be Item type.");
+ }
+
+ return item;
+}
+
+void QDeclarativeVisualDataModel::completeItem()
+{
+ Q_D(QDeclarativeVisualDataModel);
+ if (d->m_visualItemModel) {
+ d->m_visualItemModel->completeItem();
+ return;
+ }
+
+ d->m_delegate->completeCreate();
+}
+
+QString QDeclarativeVisualDataModel::stringValue(int index, const QString &name)
+{
+ Q_D(QDeclarativeVisualDataModel);
+ if (d->m_visualItemModel)
+ return d->m_visualItemModel->stringValue(index, name);
+
+ if ((!d->m_listModelInterface && !d->m_abstractItemModel) || !d->m_delegate)
+ return QString();
+
+ QString val;
+ QObject *data = 0;
+ bool tempData = false;
+
+ if (QObject *nobj = d->m_cache.item(index))
+ data = d->data(nobj);
+ if (!data) {
+ data = new QDeclarativeVisualDataModelData(index, this);
+ tempData = true;
+ }
+
+ QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(data);
+ if (ddata && ddata->propertyCache) {
+ QDeclarativePropertyCache::Data *prop = ddata->propertyCache->property(name);
+ if (prop) {
+ if (prop->propType == QVariant::String) {
+ void *args[] = { &val, 0 };
+ QMetaObject::metacall(data, QMetaObject::ReadProperty, prop->coreIndex, args);
+ } else if (prop->propType == qMetaTypeId<QVariant>()) {
+ QVariant v;
+ void *args[] = { &v, 0 };
+ QMetaObject::metacall(data, QMetaObject::ReadProperty, prop->coreIndex, args);
+ val = v.toString();
+ }
+ } else {
+ val = data->property(name.toUtf8()).toString();
+ }
+ } else {
+ val = data->property(name.toUtf8()).toString();
+ }
+
+ if (tempData)
+ delete data;
+
+ return val;
+}
+
+QVariant QDeclarativeVisualDataModel::evaluate(int index, const QString &expression, QObject *objectContext)
+{
+ Q_D(QDeclarativeVisualDataModel);
+ if (d->m_visualItemModel)
+ return d->m_visualItemModel->evaluate(index, expression, objectContext);
+
+ if ((!d->m_listModelInterface && !d->m_abstractItemModel) || !d->m_delegate)
+ return QVariant();
+
+ QVariant value;
+ QObject *nobj = d->m_cache.item(index);
+ if (nobj) {
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(nobj);
+ if (item) {
+ QDeclarativeExpression e(qmlContext(item), expression, objectContext);
+ value = e.value();
+ }
+ } else {
+ QDeclarativeContext *ccontext = d->m_context;
+ if (!ccontext) ccontext = qmlContext(this);
+ QDeclarativeContext *ctxt = new QDeclarativeContext(ccontext);
+ QDeclarativeVisualDataModelData *data = new QDeclarativeVisualDataModelData(index, this);
+ ctxt->addDefaultObject(data);
+ QDeclarativeExpression e(ctxt, expression, objectContext);
+ value = e.value();
+ delete data;
+ delete ctxt;
+ }
+
+ return value;
+}
+
+int QDeclarativeVisualDataModel::indexOf(QDeclarativeItem *item, QObject *) const
+{
+ QVariant val = QDeclarativeEngine::contextForObject(item)->contextProperty(QLatin1String("index"));
+ return val.toInt();
+ return -1;
+}
+
+void QDeclarativeVisualDataModel::_q_itemsChanged(int index, int count,
+ const QList<int> &roles)
+{
+ Q_D(QDeclarativeVisualDataModel);
+ // XXX - highly inefficient
+ for (int ii = index; ii < index + count; ++ii) {
+
+ if (QObject *item = d->m_cache.item(ii)) {
+ QDeclarativeVisualDataModelData *data = d->data(item);
+
+ for (int roleIdx = 0; roleIdx < roles.count(); ++roleIdx) {
+ int role = roles.at(roleIdx);
+ int propId = data->propForRole(role);
+ if (propId != -1) {
+ if (d->m_listModelInterface) {
+ data->setValue(propId, d->m_listModelInterface->data(ii, QList<int>() << role).value(role));
+ } else if (d->m_abstractItemModel) {
+ QModelIndex index = d->m_abstractItemModel->index(ii, 0, d->m_root);
+ data->setValue(propId, d->m_abstractItemModel->data(index, role));
+ }
+ }
+ }
+ }
+ }
+}
+
+void QDeclarativeVisualDataModel::_q_itemsInserted(int index, int count)
+{
+ Q_D(QDeclarativeVisualDataModel);
+ // XXX - highly inefficient
+ QHash<int,QDeclarativeVisualDataModelPrivate::ObjectRef> items;
+ for (QHash<int,QDeclarativeVisualDataModelPrivate::ObjectRef>::Iterator iter = d->m_cache.begin();
+ iter != d->m_cache.end(); ) {
+
+ if (iter.key() >= index) {
+ QDeclarativeVisualDataModelPrivate::ObjectRef objRef = *iter;
+ int index = iter.key() + count;
+ iter = d->m_cache.erase(iter);
+
+ items.insert(index, objRef);
+
+ QDeclarativeVisualDataModelData *data = d->data(objRef.obj);
+ data->setIndex(index);
+ } else {
+ ++iter;
+ }
+ }
+ d->m_cache.unite(items);
+
+ emit itemsInserted(index, count);
+ emit countChanged();
+}
+
+void QDeclarativeVisualDataModel::_q_itemsRemoved(int index, int count)
+{
+ Q_D(QDeclarativeVisualDataModel);
+ // XXX - highly inefficient
+ QHash<int, QDeclarativeVisualDataModelPrivate::ObjectRef> items;
+ for (QHash<int, QDeclarativeVisualDataModelPrivate::ObjectRef>::Iterator iter = d->m_cache.begin();
+ iter != d->m_cache.end(); ) {
+ if (iter.key() >= index && iter.key() < index + count) {
+ QDeclarativeVisualDataModelPrivate::ObjectRef objRef = *iter;
+ iter = d->m_cache.erase(iter);
+ items.insertMulti(-1, objRef); //XXX perhaps better to maintain separately
+ QDeclarativeVisualDataModelData *data = d->data(objRef.obj);
+ data->setIndex(-1);
+ } else if (iter.key() >= index + count) {
+ QDeclarativeVisualDataModelPrivate::ObjectRef objRef = *iter;
+ int index = iter.key() - count;
+ iter = d->m_cache.erase(iter);
+ items.insert(index, objRef);
+ QDeclarativeVisualDataModelData *data = d->data(objRef.obj);
+ data->setIndex(index);
+ } else {
+ ++iter;
+ }
+ }
+
+ d->m_cache.unite(items);
+ emit itemsRemoved(index, count);
+ emit countChanged();
+}
+
+void QDeclarativeVisualDataModel::_q_itemsMoved(int from, int to, int count)
+{
+ Q_D(QDeclarativeVisualDataModel);
+ // XXX - highly inefficient
+ QHash<int,QDeclarativeVisualDataModelPrivate::ObjectRef> items;
+ for (QHash<int,QDeclarativeVisualDataModelPrivate::ObjectRef>::Iterator iter = d->m_cache.begin();
+ iter != d->m_cache.end(); ) {
+
+ if (iter.key() >= from && iter.key() < from + count) {
+ QDeclarativeVisualDataModelPrivate::ObjectRef objRef = *iter;
+ int index = iter.key() - from + to;
+ iter = d->m_cache.erase(iter);
+
+ items.insert(index, objRef);
+
+ QDeclarativeVisualDataModelData *data = d->data(objRef.obj);
+ data->setIndex(index);
+ } else {
+ ++iter;
+ }
+ }
+ for (QHash<int,QDeclarativeVisualDataModelPrivate::ObjectRef>::Iterator iter = d->m_cache.begin();
+ iter != d->m_cache.end(); ) {
+
+ int diff = from > to ? count : -count;
+ if (iter.key() >= qMin(from,to) && iter.key() < qMax(from+count,to+count)) {
+ QDeclarativeVisualDataModelPrivate::ObjectRef objRef = *iter;
+ int index = iter.key() + diff;
+ iter = d->m_cache.erase(iter);
+
+ items.insert(index, objRef);
+
+ QDeclarativeVisualDataModelData *data = d->data(objRef.obj);
+ data->setIndex(index);
+ } else {
+ ++iter;
+ }
+ }
+ d->m_cache.unite(items);
+
+ emit itemsMoved(from, to, count);
+}
+
+void QDeclarativeVisualDataModel::_q_rowsInserted(const QModelIndex &parent, int begin, int end)
+{
+ if (!parent.isValid())
+ _q_itemsInserted(begin, end - begin + 1);
+}
+
+void QDeclarativeVisualDataModel::_q_rowsRemoved(const QModelIndex &parent, int begin, int end)
+{
+ if (!parent.isValid())
+ _q_itemsRemoved(begin, end - begin + 1);
+}
+
+void QDeclarativeVisualDataModel::_q_rowsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow)
+{
+ const int count = sourceEnd - sourceStart + 1;
+ if (!destinationParent.isValid() && !sourceParent.isValid()) {
+ _q_itemsMoved(sourceStart, destinationRow, count);
+ } else if (!sourceParent.isValid()) {
+ _q_itemsRemoved(sourceStart, count);
+ } else if (!destinationParent.isValid()) {
+ _q_itemsInserted(destinationRow, count);
+ }
+}
+
+void QDeclarativeVisualDataModel::_q_dataChanged(const QModelIndex &begin, const QModelIndex &end)
+{
+ Q_D(QDeclarativeVisualDataModel);
+ if (!begin.parent().isValid())
+ _q_itemsChanged(begin.row(), end.row() - begin.row() + 1, d->m_roles);
+}
+
+void QDeclarativeVisualDataModel::_q_modelReset()
+{
+ emit modelReset();
+}
+
+void QDeclarativeVisualDataModel::_q_createdPackage(int index, QDeclarativePackage *package)
+{
+ Q_D(QDeclarativeVisualDataModel);
+ emit createdItem(index, qobject_cast<QDeclarativeItem*>(package->part(d->m_part)));
+}
+
+void QDeclarativeVisualDataModel::_q_destroyingPackage(QDeclarativePackage *package)
+{
+ Q_D(QDeclarativeVisualDataModel);
+ emit destroyingItem(qobject_cast<QDeclarativeItem*>(package->part(d->m_part)));
+}
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QListModelInterface)
+
+#include <qdeclarativevisualitemmodel.moc>
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
new file mode 100644
index 0000000000..d34bcaf9cd
--- /dev/null
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
@@ -0,0 +1,255 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEVISUALDATAMODEL_H
+#define QDECLARATIVEVISUALDATAMODEL_H
+
+#include <qdeclarative.h>
+
+#include <QtCore/qobject.h>
+#include <QtCore/qabstractitemmodel.h>
+
+QT_BEGIN_HEADER
+
+Q_DECLARE_METATYPE(QModelIndex)
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+/*****************************************************************************
+ *****************************************************************************
+ XXX Experimental
+ *****************************************************************************
+*****************************************************************************/
+
+class QDeclarativeItem;
+class QDeclarativeComponent;
+class QDeclarativePackage;
+class QDeclarativeVisualDataModelPrivate;
+
+class Q_DECLARATIVE_EXPORT QDeclarativeVisualModel : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(int count READ count NOTIFY countChanged)
+
+public:
+ QDeclarativeVisualModel() {}
+ virtual ~QDeclarativeVisualModel() {}
+
+ enum ReleaseFlag { Referenced = 0x01, Destroyed = 0x02 };
+ Q_DECLARE_FLAGS(ReleaseFlags, ReleaseFlag)
+
+ virtual int count() const = 0;
+ virtual bool isValid() const = 0;
+ virtual QDeclarativeItem *item(int index, bool complete=true) = 0;
+ virtual ReleaseFlags release(QDeclarativeItem *item) = 0;
+ virtual void completeItem() = 0;
+ virtual QVariant evaluate(int index, const QString &expression, QObject *objectContext) = 0;
+ virtual QString stringValue(int, const QString &) { return QString(); }
+
+ virtual int indexOf(QDeclarativeItem *item, QObject *objectContext) const = 0;
+
+Q_SIGNALS:
+ void countChanged();
+ void itemsInserted(int index, int count);
+ void itemsRemoved(int index, int count);
+ void itemsMoved(int from, int to, int count);
+ void modelReset();
+ void createdItem(int index, QDeclarativeItem *item);
+ void destroyingItem(QDeclarativeItem *item);
+
+protected:
+ QDeclarativeVisualModel(QObjectPrivate &dd, QObject *parent = 0)
+ : QObject(dd, parent) {}
+
+private:
+ Q_DISABLE_COPY(QDeclarativeVisualModel)
+};
+
+class QDeclarativeVisualItemModelAttached;
+class QDeclarativeVisualItemModelPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeVisualItemModel : public QDeclarativeVisualModel
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeVisualItemModel)
+
+ Q_PROPERTY(QDeclarativeListProperty<QDeclarativeItem> children READ children NOTIFY childrenChanged DESIGNABLE false)
+ Q_CLASSINFO("DefaultProperty", "children")
+
+public:
+ QDeclarativeVisualItemModel();
+ virtual ~QDeclarativeVisualItemModel() {}
+
+ virtual int count() const;
+ virtual bool isValid() const;
+ virtual QDeclarativeItem *item(int index, bool complete=true);
+ virtual ReleaseFlags release(QDeclarativeItem *item);
+ virtual void completeItem();
+ virtual QString stringValue(int index, const QString &role);
+ virtual QVariant evaluate(int index, const QString &expression, QObject *objectContext);
+
+ virtual int indexOf(QDeclarativeItem *item, QObject *objectContext) const;
+
+ QDeclarativeListProperty<QDeclarativeItem> children();
+
+ static QDeclarativeVisualItemModelAttached *qmlAttachedProperties(QObject *obj);
+
+Q_SIGNALS:
+ void childrenChanged();
+
+private:
+ Q_DISABLE_COPY(QDeclarativeVisualItemModel)
+};
+
+
+class Q_DECLARATIVE_EXPORT QDeclarativeVisualDataModel : public QDeclarativeVisualModel
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeVisualDataModel)
+
+ Q_PROPERTY(QVariant model READ model WRITE setModel)
+ Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate)
+ Q_PROPERTY(QString part READ part WRITE setPart)
+ Q_PROPERTY(QObject *parts READ parts CONSTANT)
+ Q_PROPERTY(QModelIndex rootIndex READ rootIndex WRITE setRootIndex NOTIFY rootIndexChanged)
+ Q_CLASSINFO("DefaultProperty", "delegate")
+public:
+ QDeclarativeVisualDataModel();
+ QDeclarativeVisualDataModel(QDeclarativeContext *);
+ virtual ~QDeclarativeVisualDataModel();
+
+ QVariant model() const;
+ void setModel(const QVariant &);
+
+ QDeclarativeComponent *delegate() const;
+ void setDelegate(QDeclarativeComponent *);
+
+ QModelIndex rootIndex() const;
+ void setRootIndex(const QModelIndex &root);
+
+ QString part() const;
+ void setPart(const QString &);
+
+ int count() const;
+ bool isValid() const { return delegate() != 0; }
+ QDeclarativeItem *item(int index, bool complete=true);
+ QDeclarativeItem *item(int index, const QByteArray &, bool complete=true);
+ ReleaseFlags release(QDeclarativeItem *item);
+ void completeItem();
+ virtual QString stringValue(int index, const QString &role);
+ QVariant evaluate(int index, const QString &expression, QObject *objectContext);
+
+ int indexOf(QDeclarativeItem *item, QObject *objectContext) const;
+
+ QObject *parts();
+
+Q_SIGNALS:
+ void createdPackage(int index, QDeclarativePackage *package);
+ void destroyingPackage(QDeclarativePackage *package);
+ void rootIndexChanged();
+
+private Q_SLOTS:
+ void _q_itemsChanged(int, int, const QList<int> &);
+ void _q_itemsInserted(int index, int count);
+ void _q_itemsRemoved(int index, int count);
+ void _q_itemsMoved(int from, int to, int count);
+ void _q_rowsInserted(const QModelIndex &,int,int);
+ void _q_rowsRemoved(const QModelIndex &,int,int);
+ void _q_rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int);
+ void _q_dataChanged(const QModelIndex&,const QModelIndex&);
+ void _q_modelReset();
+ void _q_createdPackage(int index, QDeclarativePackage *package);
+ void _q_destroyingPackage(QDeclarativePackage *package);
+
+private:
+ Q_DISABLE_COPY(QDeclarativeVisualDataModel)
+};
+
+class QDeclarativeVisualItemModelAttached : public QObject
+{
+ Q_OBJECT
+
+public:
+ QDeclarativeVisualItemModelAttached(QObject *parent)
+ : QObject(parent), m_index(0) {}
+ ~QDeclarativeVisualItemModelAttached() {
+ attachedProperties.remove(parent());
+ }
+
+ Q_PROPERTY(int index READ index NOTIFY indexChanged)
+ int index() const { return m_index; }
+ void setIndex(int idx) {
+ if (m_index != idx) {
+ m_index = idx;
+ emit indexChanged();
+ }
+ }
+
+ static QDeclarativeVisualItemModelAttached *properties(QObject *obj) {
+ QDeclarativeVisualItemModelAttached *rv = attachedProperties.value(obj);
+ if (!rv) {
+ rv = new QDeclarativeVisualItemModelAttached(obj);
+ attachedProperties.insert(obj, rv);
+ }
+ return rv;
+ }
+
+Q_SIGNALS:
+ void indexChanged();
+
+public:
+ int m_index;
+
+ static QHash<QObject*, QDeclarativeVisualItemModelAttached*> attachedProperties;
+};
+
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeVisualModel)
+QML_DECLARE_TYPE(QDeclarativeVisualItemModel)
+QML_DECLARE_TYPEINFO(QDeclarativeVisualItemModel, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(QDeclarativeVisualDataModel)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEVISUALDATAMODEL_H
diff --git a/src/declarative/qml/parser/parser.pri b/src/declarative/qml/parser/parser.pri
new file mode 100644
index 0000000000..fd4361c2df
--- /dev/null
+++ b/src/declarative/qml/parser/parser.pri
@@ -0,0 +1,21 @@
+INCLUDEPATH += $$PWD
+
+HEADERS += \
+ $$PWD/qdeclarativejsast_p.h \
+ $$PWD/qdeclarativejsastfwd_p.h \
+ $$PWD/qdeclarativejsastvisitor_p.h \
+ $$PWD/qdeclarativejsengine_p.h \
+ $$PWD/qdeclarativejsgrammar_p.h \
+ $$PWD/qdeclarativejslexer_p.h \
+ $$PWD/qdeclarativejsmemorypool_p.h \
+ $$PWD/qdeclarativejsnodepool_p.h \
+ $$PWD/qdeclarativejsparser_p.h \
+ $$PWD/qdeclarativejsglobal_p.h
+
+SOURCES += \
+ $$PWD/qdeclarativejsast.cpp \
+ $$PWD/qdeclarativejsastvisitor.cpp \
+ $$PWD/qdeclarativejsengine_p.cpp \
+ $$PWD/qdeclarativejsgrammar.cpp \
+ $$PWD/qdeclarativejslexer.cpp \
+ $$PWD/qdeclarativejsparser.cpp
diff --git a/src/declarative/qml/parser/qdeclarativejs.g b/src/declarative/qml/parser/qdeclarativejs.g
new file mode 100644
index 0000000000..493ad25ab4
--- /dev/null
+++ b/src/declarative/qml/parser/qdeclarativejs.g
@@ -0,0 +1,3096 @@
+----------------------------------------------------------------------------
+--
+-- 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:LGPL-ONLY$
+-- GNU Lesser General Public License Usage
+-- This file may be used under the terms of the GNU Lesser
+-- General Public License version 2.1 as published by the Free Software
+-- Foundation and appearing in the file LICENSE.LGPL included in the
+-- packaging of this file. Please review the following information to
+-- ensure the GNU Lesser General Public License version 2.1 requirements
+-- will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+--
+-- If you have questions regarding the use of this file, please contact
+-- Nokia at qt-info@nokia.com.
+-- $QT_END_LICENSE$
+--
+----------------------------------------------------------------------------
+
+%parser QDeclarativeJSGrammar
+%decl qdeclarativejsparser_p.h
+%impl qdeclarativejsparser.cpp
+%expect 2
+%expect-rr 2
+
+%token T_AND "&" T_AND_AND "&&" T_AND_EQ "&="
+%token T_BREAK "break" T_CASE "case" T_CATCH "catch"
+%token T_COLON ":" T_COMMA ";" T_CONTINUE "continue"
+%token T_DEFAULT "default" T_DELETE "delete" T_DIVIDE_ "/"
+%token T_DIVIDE_EQ "/=" T_DO "do" T_DOT "."
+%token T_ELSE "else" T_EQ "=" T_EQ_EQ "=="
+%token T_EQ_EQ_EQ "===" T_FINALLY "finally" T_FOR "for"
+%token T_FUNCTION "function" T_GE ">=" T_GT ">"
+%token T_GT_GT ">>" T_GT_GT_EQ ">>=" T_GT_GT_GT ">>>"
+%token T_GT_GT_GT_EQ ">>>=" T_IDENTIFIER "identifier" T_IF "if"
+%token T_IN "in" T_INSTANCEOF "instanceof" T_LBRACE "{"
+%token T_LBRACKET "[" T_LE "<=" T_LPAREN "("
+%token T_LT "<" T_LT_LT "<<" T_LT_LT_EQ "<<="
+%token T_MINUS "-" T_MINUS_EQ "-=" T_MINUS_MINUS "--"
+%token T_NEW "new" T_NOT "!" T_NOT_EQ "!="
+%token T_NOT_EQ_EQ "!==" T_NUMERIC_LITERAL "numeric literal" T_OR "|"
+%token T_OR_EQ "|=" T_OR_OR "||" T_PLUS "+"
+%token T_PLUS_EQ "+=" T_PLUS_PLUS "++" T_QUESTION "?"
+%token T_RBRACE "}" T_RBRACKET "]" T_REMAINDER "%"
+%token T_REMAINDER_EQ "%=" T_RETURN "return" T_RPAREN ")"
+%token T_SEMICOLON ";" T_AUTOMATIC_SEMICOLON T_STAR "*"
+%token T_STAR_EQ "*=" T_STRING_LITERAL "string literal"
+%token T_PROPERTY "property" T_SIGNAL "signal" T_READONLY "readonly"
+%token T_SWITCH "switch" T_THIS "this" T_THROW "throw"
+%token T_TILDE "~" T_TRY "try" T_TYPEOF "typeof"
+%token T_VAR "var" T_VOID "void" T_WHILE "while"
+%token T_WITH "with" T_XOR "^" T_XOR_EQ "^="
+%token T_NULL "null" T_TRUE "true" T_FALSE "false"
+%token T_CONST "const"
+%token T_DEBUGGER "debugger"
+%token T_RESERVED_WORD "reserved word"
+%token T_MULTILINE_STRING_LITERAL "multiline string literal"
+%token T_COMMENT "comment"
+
+--- context keywords.
+%token T_PUBLIC "public"
+%token T_IMPORT "import"
+%token T_AS "as"
+%token T_ON "on"
+
+--- feed tokens
+%token T_FEED_UI_PROGRAM
+%token T_FEED_UI_OBJECT_MEMBER
+%token T_FEED_JS_STATEMENT
+%token T_FEED_JS_EXPRESSION
+%token T_FEED_JS_SOURCE_ELEMENT
+%token T_FEED_JS_PROGRAM
+
+%nonassoc SHIFT_THERE
+%nonassoc T_IDENTIFIER T_COLON T_SIGNAL T_PROPERTY T_READONLY
+%nonassoc REDUCE_HERE
+
+%start TopLevel
+
+/./****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QtDebug>
+#include <QtGui/QApplication>
+
+#include <string.h>
+
+#include "qdeclarativejsengine_p.h"
+#include "qdeclarativejslexer_p.h"
+#include "qdeclarativejsast_p.h"
+#include "qdeclarativejsnodepool_p.h"
+
+./
+
+/:/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+//
+// This file is automatically generated from qmljs.g.
+// Changes will be lost.
+//
+
+#ifndef QDECLARATIVEJSPARSER_P_H
+#define QDECLARATIVEJSPARSER_P_H
+
+#include "qdeclarativejsglobal_p.h"
+#include "qdeclarativejsgrammar_p.h"
+#include "qdeclarativejsast_p.h"
+#include "qdeclarativejsengine_p.h"
+
+#include <QtCore/QList>
+#include <QtCore/QString>
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS {
+
+class Engine;
+class NameId;
+
+class QML_PARSER_EXPORT Parser: protected $table
+{
+public:
+ union Value {
+ int ival;
+ double dval;
+ NameId *sval;
+ AST::ArgumentList *ArgumentList;
+ AST::CaseBlock *CaseBlock;
+ AST::CaseClause *CaseClause;
+ AST::CaseClauses *CaseClauses;
+ AST::Catch *Catch;
+ AST::DefaultClause *DefaultClause;
+ AST::ElementList *ElementList;
+ AST::Elision *Elision;
+ AST::ExpressionNode *Expression;
+ AST::Finally *Finally;
+ AST::FormalParameterList *FormalParameterList;
+ AST::FunctionBody *FunctionBody;
+ AST::FunctionDeclaration *FunctionDeclaration;
+ AST::Node *Node;
+ AST::PropertyName *PropertyName;
+ AST::PropertyNameAndValueList *PropertyNameAndValueList;
+ AST::SourceElement *SourceElement;
+ AST::SourceElements *SourceElements;
+ AST::Statement *Statement;
+ AST::StatementList *StatementList;
+ AST::Block *Block;
+ AST::VariableDeclaration *VariableDeclaration;
+ AST::VariableDeclarationList *VariableDeclarationList;
+
+ AST::UiProgram *UiProgram;
+ AST::UiImportList *UiImportList;
+ AST::UiImport *UiImport;
+ AST::UiParameterList *UiParameterList;
+ AST::UiPublicMember *UiPublicMember;
+ AST::UiObjectDefinition *UiObjectDefinition;
+ AST::UiObjectInitializer *UiObjectInitializer;
+ AST::UiObjectBinding *UiObjectBinding;
+ AST::UiScriptBinding *UiScriptBinding;
+ AST::UiArrayBinding *UiArrayBinding;
+ AST::UiObjectMember *UiObjectMember;
+ AST::UiObjectMemberList *UiObjectMemberList;
+ AST::UiArrayMemberList *UiArrayMemberList;
+ AST::UiQualifiedId *UiQualifiedId;
+ AST::UiSignature *UiSignature;
+ AST::UiFormalList *UiFormalList;
+ AST::UiFormal *UiFormal;
+ };
+
+public:
+ Parser(Engine *engine);
+ ~Parser();
+
+ // parse a UI program
+ bool parse() { return parse(T_FEED_UI_PROGRAM); }
+ bool parseStatement() { return parse(T_FEED_JS_STATEMENT); }
+ bool parseExpression() { return parse(T_FEED_JS_EXPRESSION); }
+ bool parseSourceElement() { return parse(T_FEED_JS_SOURCE_ELEMENT); }
+ bool parseUiObjectMember() { return parse(T_FEED_UI_OBJECT_MEMBER); }
+ bool parseProgram() { return parse(T_FEED_JS_PROGRAM); }
+
+ AST::UiProgram *ast() const
+ { return AST::cast<AST::UiProgram *>(program); }
+
+ AST::Statement *statement() const
+ {
+ if (! program)
+ return 0;
+
+ return program->statementCast();
+ }
+
+ AST::ExpressionNode *expression() const
+ {
+ if (! program)
+ return 0;
+
+ return program->expressionCast();
+ }
+
+ AST::UiObjectMember *uiObjectMember() const
+ {
+ if (! program)
+ return 0;
+
+ return program->uiObjectMemberCast();
+ }
+
+ AST::Node *rootNode() const
+ { return program; }
+
+ QList<DiagnosticMessage> diagnosticMessages() const
+ { return diagnostic_messages; }
+
+ inline DiagnosticMessage diagnosticMessage() const
+ {
+ foreach (const DiagnosticMessage &d, diagnostic_messages) {
+ if (! d.kind == DiagnosticMessage::Warning)
+ return d;
+ }
+
+ return DiagnosticMessage();
+ }
+
+ inline QString errorMessage() const
+ { return diagnosticMessage().message; }
+
+ inline int errorLineNumber() const
+ { return diagnosticMessage().loc.startLine; }
+
+ inline int errorColumnNumber() const
+ { return diagnosticMessage().loc.startColumn; }
+
+protected:
+ bool parse(int startToken);
+
+ void reallocateStack();
+
+ inline Value &sym(int index)
+ { return sym_stack [tos + index - 1]; }
+
+ inline AST::SourceLocation &loc(int index)
+ { return location_stack [tos + index - 1]; }
+
+ AST::UiQualifiedId *reparseAsQualifiedId(AST::ExpressionNode *expr);
+
+protected:
+ Engine *driver;
+ int tos;
+ int stack_size;
+ Value *sym_stack;
+ int *state_stack;
+ AST::SourceLocation *location_stack;
+
+ AST::Node *program;
+
+ // error recovery
+ enum { TOKEN_BUFFER_SIZE = 3 };
+
+ struct SavedToken {
+ int token;
+ double dval;
+ AST::SourceLocation loc;
+ };
+
+ double yylval;
+ AST::SourceLocation yylloc;
+ AST::SourceLocation yyprevlloc;
+
+ SavedToken token_buffer[TOKEN_BUFFER_SIZE];
+ SavedToken *first_token;
+ SavedToken *last_token;
+
+ QList<DiagnosticMessage> diagnostic_messages;
+};
+
+} // end of namespace QDeclarativeJS
+
+
+:/
+
+
+/.
+
+#include "qdeclarativejsparser_p.h"
+#include <QVarLengthArray>
+
+//
+// This file is automatically generated from qmljs.g.
+// Changes will be lost.
+//
+
+using namespace QDeclarativeJS;
+
+QT_QML_BEGIN_NAMESPACE
+
+void Parser::reallocateStack()
+{
+ if (! stack_size)
+ stack_size = 128;
+ else
+ stack_size <<= 1;
+
+ sym_stack = reinterpret_cast<Value*> (qRealloc(sym_stack, stack_size * sizeof(Value)));
+ state_stack = reinterpret_cast<int*> (qRealloc(state_stack, stack_size * sizeof(int)));
+ location_stack = reinterpret_cast<AST::SourceLocation*> (qRealloc(location_stack, stack_size * sizeof(AST::SourceLocation)));
+}
+
+inline static bool automatic(Engine *driver, int token)
+{
+ return token == $table::T_RBRACE
+ || token == 0
+ || driver->lexer()->prevTerminator();
+}
+
+
+Parser::Parser(Engine *engine):
+ driver(engine),
+ tos(0),
+ stack_size(0),
+ sym_stack(0),
+ state_stack(0),
+ location_stack(0),
+ first_token(0),
+ last_token(0)
+{
+}
+
+Parser::~Parser()
+{
+ if (stack_size) {
+ qFree(sym_stack);
+ qFree(state_stack);
+ qFree(location_stack);
+ }
+}
+
+static inline AST::SourceLocation location(Lexer *lexer)
+{
+ AST::SourceLocation loc;
+ loc.offset = lexer->tokenOffset();
+ loc.length = lexer->tokenLength();
+ loc.startLine = lexer->startLineNo();
+ loc.startColumn = lexer->startColumnNo();
+ return loc;
+}
+
+AST::UiQualifiedId *Parser::reparseAsQualifiedId(AST::ExpressionNode *expr)
+{
+ QVarLengthArray<NameId *, 4> nameIds;
+ QVarLengthArray<AST::SourceLocation, 4> locations;
+
+ AST::ExpressionNode *it = expr;
+ while (AST::FieldMemberExpression *m = AST::cast<AST::FieldMemberExpression *>(it)) {
+ nameIds.append(m->name);
+ locations.append(m->identifierToken);
+ it = m->base;
+ }
+
+ if (AST::IdentifierExpression *idExpr = AST::cast<AST::IdentifierExpression *>(it)) {
+ AST::UiQualifiedId *q = makeAstNode<AST::UiQualifiedId>(driver->nodePool(), idExpr->name);
+ q->identifierToken = idExpr->identifierToken;
+
+ AST::UiQualifiedId *currentId = q;
+ for (int i = nameIds.size() - 1; i != -1; --i) {
+ currentId = makeAstNode<AST::UiQualifiedId>(driver->nodePool(), currentId, nameIds[i]);
+ currentId->identifierToken = locations[i];
+ }
+
+ return currentId->finish();
+ }
+
+ return 0;
+}
+
+bool Parser::parse(int startToken)
+{
+ Lexer *lexer = driver->lexer();
+ bool hadErrors = false;
+ int yytoken = -1;
+ int action = 0;
+
+ token_buffer[0].token = startToken;
+ first_token = &token_buffer[0];
+ last_token = &token_buffer[1];
+
+ tos = -1;
+ program = 0;
+
+ do {
+ if (++tos == stack_size)
+ reallocateStack();
+
+ state_stack[tos] = action;
+
+ _Lcheck_token:
+ if (yytoken == -1 && -TERMINAL_COUNT != action_index[action]) {
+ yyprevlloc = yylloc;
+
+ if (first_token == last_token) {
+ yytoken = lexer->lex();
+ yylval = lexer->dval();
+ yylloc = location(lexer);
+ } else {
+ yytoken = first_token->token;
+ yylval = first_token->dval;
+ yylloc = first_token->loc;
+ ++first_token;
+ }
+ }
+
+ action = t_action(action, yytoken);
+ if (action > 0) {
+ if (action != ACCEPT_STATE) {
+ yytoken = -1;
+ sym(1).dval = yylval;
+ loc(1) = yylloc;
+ } else {
+ --tos;
+ return ! hadErrors;
+ }
+ } else if (action < 0) {
+ const int r = -action - 1;
+ tos -= rhs[r];
+
+ switch (r) {
+./
+
+--------------------------------------------------------------------------------------------------------
+-- Declarative UI
+--------------------------------------------------------------------------------------------------------
+
+TopLevel: T_FEED_UI_PROGRAM UiProgram ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+./
+
+TopLevel: T_FEED_JS_STATEMENT Statement ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+./
+
+TopLevel: T_FEED_JS_EXPRESSION Expression ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+./
+
+TopLevel: T_FEED_JS_SOURCE_ELEMENT SourceElement ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+./
+
+TopLevel: T_FEED_UI_OBJECT_MEMBER UiObjectMember ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+./
+
+TopLevel: T_FEED_JS_PROGRAM Program ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+./
+
+UiProgram: UiImportListOpt UiRootMember ;
+/.
+case $rule_number: {
+ sym(1).UiProgram = makeAstNode<AST::UiProgram> (driver->nodePool(), sym(1).UiImportList,
+ sym(2).UiObjectMemberList->finish());
+} break;
+./
+
+UiImportListOpt: Empty ;
+UiImportListOpt: UiImportList ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(1).UiImportList->finish();
+} break;
+./
+
+UiImportList: UiImport ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::UiImportList> (driver->nodePool(), sym(1).UiImport);
+} break;
+./
+
+UiImportList: UiImportList UiImport ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::UiImportList> (driver->nodePool(),
+ sym(1).UiImportList, sym(2).UiImport);
+} break;
+./
+
+ImportId: MemberExpression ;
+
+UiImport: UiImportHead T_AUTOMATIC_SEMICOLON ;
+UiImport: UiImportHead T_SEMICOLON ;
+/.
+case $rule_number: {
+ sym(1).UiImport->semicolonToken = loc(2);
+} break;
+./
+
+UiImport: UiImportHead T_NUMERIC_LITERAL T_AUTOMATIC_SEMICOLON ;
+UiImport: UiImportHead T_NUMERIC_LITERAL T_SEMICOLON ;
+/.
+case $rule_number: {
+ sym(1).UiImport->versionToken = loc(2);
+ sym(1).UiImport->semicolonToken = loc(3);
+} break;
+./
+
+UiImport: UiImportHead T_NUMERIC_LITERAL T_AS JsIdentifier T_AUTOMATIC_SEMICOLON ;
+UiImport: UiImportHead T_NUMERIC_LITERAL T_AS JsIdentifier T_SEMICOLON ;
+/.
+case $rule_number: {
+ sym(1).UiImport->versionToken = loc(2);
+ sym(1).UiImport->asToken = loc(3);
+ sym(1).UiImport->importIdToken = loc(4);
+ sym(1).UiImport->importId = sym(4).sval;
+ sym(1).UiImport->semicolonToken = loc(5);
+} break;
+./
+
+UiImport: UiImportHead T_AS JsIdentifier T_AUTOMATIC_SEMICOLON ;
+UiImport: UiImportHead T_AS JsIdentifier T_SEMICOLON ;
+/.
+case $rule_number: {
+ sym(1).UiImport->asToken = loc(2);
+ sym(1).UiImport->importIdToken = loc(3);
+ sym(1).UiImport->importId = sym(3).sval;
+ sym(1).UiImport->semicolonToken = loc(4);
+} break;
+./
+
+
+UiImportHead: T_IMPORT ImportId ;
+/.
+case $rule_number: {
+ AST::UiImport *node = 0;
+
+ if (AST::StringLiteral *importIdLiteral = AST::cast<AST::StringLiteral *>(sym(2).Expression)) {
+ node = makeAstNode<AST::UiImport>(driver->nodePool(), importIdLiteral->value);
+ node->fileNameToken = loc(2);
+ } else if (AST::UiQualifiedId *qualifiedId = reparseAsQualifiedId(sym(2).Expression)) {
+ QString text;
+ for (AST::UiQualifiedId *q = qualifiedId; q; q = q->next) {
+ text += q->name->asString();
+ if (q->next) text += QLatin1String(".");
+ }
+ node = makeAstNode<AST::UiImport>(driver->nodePool(), qualifiedId);
+ node->fileNameToken = loc(2);
+ }
+
+ sym(1).Node = node;
+
+ if (! node) {
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, loc(1),
+ QLatin1String("Expected a qualified name id or a string literal")));
+
+ return false; // ### remove me
+ }
+} break;
+./
+
+Empty: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+UiRootMember: UiObjectDefinition ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::UiObjectMemberList> (driver->nodePool(), sym(1).UiObjectMember);
+} break;
+./
+
+UiObjectMemberList: UiObjectMember ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::UiObjectMemberList> (driver->nodePool(), sym(1).UiObjectMember);
+} break;
+./
+
+UiObjectMemberList: UiObjectMemberList UiObjectMember ;
+/.
+case $rule_number: {
+ AST::UiObjectMemberList *node = makeAstNode<AST:: UiObjectMemberList> (driver->nodePool(),
+ sym(1).UiObjectMemberList, sym(2).UiObjectMember);
+ sym(1).Node = node;
+} break;
+./
+
+UiArrayMemberList: UiObjectDefinition ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::UiArrayMemberList> (driver->nodePool(), sym(1).UiObjectMember);
+} break;
+./
+
+UiArrayMemberList: UiArrayMemberList T_COMMA UiObjectDefinition ;
+/.
+case $rule_number: {
+ AST::UiArrayMemberList *node = makeAstNode<AST::UiArrayMemberList> (driver->nodePool(),
+ sym(1).UiArrayMemberList, sym(3).UiObjectMember);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectInitializer: T_LBRACE T_RBRACE ;
+/.
+case $rule_number: {
+ AST::UiObjectInitializer *node = makeAstNode<AST::UiObjectInitializer> (driver->nodePool(), (AST::UiObjectMemberList*)0);
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectInitializer: T_LBRACE UiObjectMemberList T_RBRACE ;
+/.
+case $rule_number: {
+ AST::UiObjectInitializer *node = makeAstNode<AST::UiObjectInitializer> (driver->nodePool(), sym(2).UiObjectMemberList->finish());
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectDefinition: UiQualifiedId UiObjectInitializer ;
+/.
+case $rule_number: {
+ AST::UiObjectDefinition *node = makeAstNode<AST::UiObjectDefinition> (driver->nodePool(), sym(1).UiQualifiedId,
+ sym(2).UiObjectInitializer);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: UiObjectDefinition ;
+
+UiObjectMember: UiQualifiedId T_COLON T_LBRACKET UiArrayMemberList T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::UiArrayBinding *node = makeAstNode<AST::UiArrayBinding> (driver->nodePool(),
+ sym(1).UiQualifiedId, sym(4).UiArrayMemberList->finish());
+ node->colonToken = loc(2);
+ node->lbracketToken = loc(3);
+ node->rbracketToken = loc(5);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: UiQualifiedId T_COLON UiQualifiedId UiObjectInitializer ;
+/.
+case $rule_number: {
+ AST::UiObjectBinding *node = makeAstNode<AST::UiObjectBinding> (driver->nodePool(),
+ sym(1).UiQualifiedId, sym(3).UiQualifiedId, sym(4).UiObjectInitializer);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: UiQualifiedId T_ON UiQualifiedId UiObjectInitializer ;
+/.
+case $rule_number: {
+ AST::UiObjectBinding *node = makeAstNode<AST::UiObjectBinding> (driver->nodePool(),
+ sym(3).UiQualifiedId, sym(1).UiQualifiedId, sym(4).UiObjectInitializer);
+ node->colonToken = loc(2);
+ node->hasOnToken = true;
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: UiQualifiedId T_COLON Block ;
+/.case $rule_number:./
+
+UiObjectMember: UiQualifiedId T_COLON EmptyStatement ;
+/.case $rule_number:./
+
+UiObjectMember: UiQualifiedId T_COLON ExpressionStatement ;
+/.case $rule_number:./
+
+UiObjectMember: UiQualifiedId T_COLON IfStatement ; --- ### do we really want if statement in a binding?
+/.case $rule_number:./
+
+/.
+{
+ AST::UiScriptBinding *node = makeAstNode<AST::UiScriptBinding> (driver->nodePool(),
+ sym(1).UiQualifiedId, sym(3).Statement);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+UiPropertyType: T_VAR ;
+/.
+case $rule_number:
+./
+UiPropertyType: T_RESERVED_WORD ;
+/.
+case $rule_number: {
+ sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount());
+ break;
+}
+./
+
+UiPropertyType: T_IDENTIFIER ;
+
+UiParameterListOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+UiParameterListOpt: UiParameterList ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(1).UiParameterList->finish ();
+} break;
+./
+
+UiParameterList: UiPropertyType JsIdentifier ;
+/.
+case $rule_number: {
+ AST::UiParameterList *node = makeAstNode<AST::UiParameterList> (driver->nodePool(), sym(1).sval, sym(2).sval);
+ node->identifierToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+UiParameterList: UiParameterList T_COMMA UiPropertyType JsIdentifier ;
+/.
+case $rule_number: {
+ AST::UiParameterList *node = makeAstNode<AST::UiParameterList> (driver->nodePool(), sym(1).UiParameterList, sym(3).sval, sym(4).sval);
+ node->commaToken = loc(2);
+ node->identifierToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: T_SIGNAL T_IDENTIFIER T_LPAREN UiParameterListOpt T_RPAREN T_AUTOMATIC_SEMICOLON ;
+UiObjectMember: T_SIGNAL T_IDENTIFIER T_LPAREN UiParameterListOpt T_RPAREN T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), (NameId *)0, sym(2).sval);
+ node->type = AST::UiPublicMember::Signal;
+ node->propertyToken = loc(1);
+ node->typeToken = loc(2);
+ node->identifierToken = loc(2);
+ node->parameters = sym(4).UiParameterList;
+ node->semicolonToken = loc(6);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: T_SIGNAL T_IDENTIFIER T_AUTOMATIC_SEMICOLON ;
+UiObjectMember: T_SIGNAL T_IDENTIFIER T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), (NameId *)0, sym(2).sval);
+ node->type = AST::UiPublicMember::Signal;
+ node->propertyToken = loc(1);
+ node->typeToken = loc(2);
+ node->identifierToken = loc(2);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: T_PROPERTY T_IDENTIFIER T_LT UiPropertyType T_GT JsIdentifier T_AUTOMATIC_SEMICOLON ;
+UiObjectMember: T_PROPERTY T_IDENTIFIER T_LT UiPropertyType T_GT JsIdentifier T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(4).sval, sym(6).sval);
+ node->typeModifier = sym(2).sval;
+ node->propertyToken = loc(1);
+ node->typeModifierToken = loc(2);
+ node->typeToken = loc(4);
+ node->identifierToken = loc(6);
+ node->semicolonToken = loc(7);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: T_PROPERTY UiPropertyType JsIdentifier T_AUTOMATIC_SEMICOLON ;
+UiObjectMember: T_PROPERTY UiPropertyType JsIdentifier T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval);
+ node->propertyToken = loc(1);
+ node->typeToken = loc(2);
+ node->identifierToken = loc(3);
+ node->semicolonToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType JsIdentifier T_AUTOMATIC_SEMICOLON ;
+UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType JsIdentifier T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval);
+ node->isDefaultMember = true;
+ node->defaultToken = loc(1);
+ node->propertyToken = loc(2);
+ node->typeToken = loc(3);
+ node->identifierToken = loc(4);
+ node->semicolonToken = loc(5);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: T_PROPERTY UiPropertyType JsIdentifier T_COLON Expression T_AUTOMATIC_SEMICOLON ;
+UiObjectMember: T_PROPERTY UiPropertyType JsIdentifier T_COLON Expression T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval,
+ sym(5).Expression);
+ node->propertyToken = loc(1);
+ node->typeToken = loc(2);
+ node->identifierToken = loc(3);
+ node->colonToken = loc(4);
+ node->semicolonToken = loc(6);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: T_READONLY T_PROPERTY UiPropertyType JsIdentifier T_COLON Expression T_AUTOMATIC_SEMICOLON ;
+UiObjectMember: T_READONLY T_PROPERTY UiPropertyType JsIdentifier T_COLON Expression T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval,
+ sym(6).Expression);
+ node->isReadonlyMember = true;
+ node->readonlyToken = loc(1);
+ node->propertyToken = loc(2);
+ node->typeToken = loc(3);
+ node->identifierToken = loc(4);
+ node->colonToken = loc(5);
+ node->semicolonToken = loc(7);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType JsIdentifier T_COLON Expression T_AUTOMATIC_SEMICOLON ;
+UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType JsIdentifier T_COLON Expression T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval,
+ sym(6).Expression);
+ node->isDefaultMember = true;
+ node->defaultToken = loc(1);
+ node->propertyToken = loc(2);
+ node->typeToken = loc(3);
+ node->identifierToken = loc(4);
+ node->colonToken = loc(5);
+ node->semicolonToken = loc(7);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: FunctionDeclaration ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::UiSourceElement>(driver->nodePool(), sym(1).Node);
+} break;
+./
+
+UiObjectMember: VariableStatement ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::UiSourceElement>(driver->nodePool(), sym(1).Node);
+} break;
+./
+
+JsIdentifier: T_IDENTIFIER;
+
+JsIdentifier: T_PROPERTY ;
+/.
+case $rule_number: {
+ QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_PROPERTY]);
+ sym(1).sval = driver->intern(s.constData(), s.length());
+ break;
+}
+./
+
+JsIdentifier: T_SIGNAL ;
+/.
+case $rule_number: {
+ QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_SIGNAL]);
+ sym(1).sval = driver->intern(s.constData(), s.length());
+ break;
+}
+./
+
+JsIdentifier: T_READONLY ;
+/.
+case $rule_number: {
+ QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_READONLY]);
+ sym(1).sval = driver->intern(s.constData(), s.length());
+ break;
+}
+./
+
+JsIdentifier: T_ON ;
+/.
+case $rule_number: {
+ QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_ON]);
+ sym(1).sval = driver->intern(s.constData(), s.length());
+ break;
+}
+./
+
+--------------------------------------------------------------------------------------------------------
+-- Expressions
+--------------------------------------------------------------------------------------------------------
+
+PrimaryExpression: T_THIS ;
+/.
+case $rule_number: {
+ AST::ThisExpression *node = makeAstNode<AST::ThisExpression> (driver->nodePool());
+ node->thisToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: JsIdentifier ;
+/.
+case $rule_number: {
+ AST::IdentifierExpression *node = makeAstNode<AST::IdentifierExpression> (driver->nodePool(), sym(1).sval);
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_NULL ;
+/.
+case $rule_number: {
+ AST::NullExpression *node = makeAstNode<AST::NullExpression> (driver->nodePool());
+ node->nullToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_TRUE ;
+/.
+case $rule_number: {
+ AST::TrueLiteral *node = makeAstNode<AST::TrueLiteral> (driver->nodePool());
+ node->trueToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_FALSE ;
+/.
+case $rule_number: {
+ AST::FalseLiteral *node = makeAstNode<AST::FalseLiteral> (driver->nodePool());
+ node->falseToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_NUMERIC_LITERAL ;
+/.
+case $rule_number: {
+ AST::NumericLiteral *node = makeAstNode<AST::NumericLiteral> (driver->nodePool(), sym(1).dval);
+ node->literalToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_MULTILINE_STRING_LITERAL ;
+/.case $rule_number:./
+
+PrimaryExpression: T_STRING_LITERAL ;
+/.
+case $rule_number: {
+ AST::StringLiteral *node = makeAstNode<AST::StringLiteral> (driver->nodePool(), sym(1).sval);
+ node->literalToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_DIVIDE_ ;
+/:
+#define J_SCRIPT_REGEXPLITERAL_RULE1 $rule_number
+:/
+/.
+case $rule_number: {
+ bool rx = lexer->scanRegExp(Lexer::NoPrefix);
+ if (!rx) {
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
+ return false; // ### remove me
+ }
+ AST::RegExpLiteral *node = makeAstNode<AST::RegExpLiteral> (driver->nodePool(), lexer->pattern, lexer->flags);
+ node->literalToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_DIVIDE_EQ ;
+/:
+#define J_SCRIPT_REGEXPLITERAL_RULE2 $rule_number
+:/
+/.
+case $rule_number: {
+ bool rx = lexer->scanRegExp(Lexer::EqualPrefix);
+ if (!rx) {
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
+ return false;
+ }
+ AST::RegExpLiteral *node = makeAstNode<AST::RegExpLiteral> (driver->nodePool(), lexer->pattern, lexer->flags);
+ node->literalToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_LBRACKET T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), (AST::Elision *) 0);
+ node->lbracketToken = loc(1);
+ node->rbracketToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_LBRACKET Elision T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).Elision->finish());
+ node->lbracketToken = loc(1);
+ node->rbracketToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_LBRACKET ElementList T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish ());
+ node->lbracketToken = loc(1);
+ node->rbracketToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_LBRACKET ElementList T_COMMA T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish (),
+ (AST::Elision *) 0);
+ node->lbracketToken = loc(1);
+ node->commaToken = loc(3);
+ node->rbracketToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_LBRACKET ElementList T_COMMA Elision T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish (),
+ sym(4).Elision->finish());
+ node->lbracketToken = loc(1);
+ node->commaToken = loc(3);
+ node->rbracketToken = loc(5);
+ sym(1).Node = node;
+} break;
+./
+
+-- PrimaryExpression: T_LBRACE T_RBRACE ;
+-- /.
+-- case $rule_number: {
+-- sym(1).Node = makeAstNode<AST::ObjectLiteral> (driver->nodePool());
+-- } break;
+-- ./
+
+PrimaryExpression: T_LBRACE PropertyNameAndValueListOpt T_RBRACE ;
+/.
+case $rule_number: {
+ AST::ObjectLiteral *node = 0;
+ if (sym(2).Node)
+ node = makeAstNode<AST::ObjectLiteral> (driver->nodePool(),
+ sym(2).PropertyNameAndValueList->finish ());
+ else
+ node = makeAstNode<AST::ObjectLiteral> (driver->nodePool());
+ node->lbraceToken = loc(1);
+ node->lbraceToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_LBRACE PropertyNameAndValueList T_COMMA T_RBRACE ;
+/.
+case $rule_number: {
+ AST::ObjectLiteral *node = makeAstNode<AST::ObjectLiteral> (driver->nodePool(),
+ sym(2).PropertyNameAndValueList->finish ());
+ node->lbraceToken = loc(1);
+ node->lbraceToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_LPAREN Expression T_RPAREN ;
+/.
+case $rule_number: {
+ AST::NestedExpression *node = makeAstNode<AST::NestedExpression>(driver->nodePool(), sym(2).Expression);
+ node->lparenToken = loc(1);
+ node->rparenToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+UiQualifiedId: MemberExpression ;
+/.
+case $rule_number: {
+ if (AST::ArrayMemberExpression *mem = AST::cast<AST::ArrayMemberExpression *>(sym(1).Expression)) {
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, mem->lbracketToken,
+ QLatin1String("Ignored annotation")));
+
+ sym(1).Expression = mem->base;
+ }
+
+ if (AST::UiQualifiedId *qualifiedId = reparseAsQualifiedId(sym(1).Expression)) {
+ sym(1).UiQualifiedId = qualifiedId;
+ } else {
+ sym(1).UiQualifiedId = 0;
+
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, loc(1),
+ QLatin1String("Expected a qualified name id")));
+
+ return false; // ### recover
+ }
+} break;
+./
+
+ElementList: AssignmentExpression ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::ElementList> (driver->nodePool(), (AST::Elision *) 0, sym(1).Expression);
+} break;
+./
+
+ElementList: Elision AssignmentExpression ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).Elision->finish(), sym(2).Expression);
+} break;
+./
+
+ElementList: ElementList T_COMMA AssignmentExpression ;
+/.
+case $rule_number: {
+ AST::ElementList *node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).ElementList,
+ (AST::Elision *) 0, sym(3).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+ElementList: ElementList T_COMMA Elision AssignmentExpression ;
+/.
+case $rule_number: {
+ AST::ElementList *node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).ElementList, sym(3).Elision->finish(),
+ sym(4).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+Elision: T_COMMA ;
+/.
+case $rule_number: {
+ AST::Elision *node = makeAstNode<AST::Elision> (driver->nodePool());
+ node->commaToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+Elision: Elision T_COMMA ;
+/.
+case $rule_number: {
+ AST::Elision *node = makeAstNode<AST::Elision> (driver->nodePool(), sym(1).Elision);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+PropertyNameAndValueList: PropertyName T_COLON AssignmentExpression ;
+/.
+case $rule_number: {
+ AST::PropertyNameAndValueList *node = makeAstNode<AST::PropertyNameAndValueList> (driver->nodePool(),
+ sym(1).PropertyName, sym(3).Expression);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+PropertyNameAndValueList: PropertyNameAndValueList T_COMMA PropertyName T_COLON AssignmentExpression ;
+/.
+case $rule_number: {
+ AST::PropertyNameAndValueList *node = makeAstNode<AST::PropertyNameAndValueList> (driver->nodePool(),
+ sym(1).PropertyNameAndValueList, sym(3).PropertyName, sym(5).Expression);
+ node->commaToken = loc(2);
+ node->colonToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+PropertyName: T_IDENTIFIER %prec REDUCE_HERE ;
+/.
+case $rule_number: {
+ AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), sym(1).sval);
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PropertyName: T_SIGNAL ;
+/.case $rule_number:./
+
+PropertyName: T_PROPERTY ;
+/.
+case $rule_number: {
+ AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()));
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PropertyName: T_STRING_LITERAL ;
+/.
+case $rule_number: {
+ AST::StringLiteralPropertyName *node = makeAstNode<AST::StringLiteralPropertyName> (driver->nodePool(), sym(1).sval);
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PropertyName: T_NUMERIC_LITERAL ;
+/.
+case $rule_number: {
+ AST::NumericLiteralPropertyName *node = makeAstNode<AST::NumericLiteralPropertyName> (driver->nodePool(), sym(1).dval);
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PropertyName: ReservedIdentifier ;
+/.
+case $rule_number: {
+ AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), sym(1).sval);
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+ReservedIdentifier: T_BREAK ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_CASE ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_CATCH ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_CONTINUE ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_DEFAULT ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_DELETE ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_DO ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_ELSE ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_FALSE ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_FINALLY ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_FOR ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_FUNCTION ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_IF ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_IN ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_INSTANCEOF ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_NEW ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_NULL ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_RETURN ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_SWITCH ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_THIS ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_THROW ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_TRUE ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_TRY ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_TYPEOF ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_VAR ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_VOID ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_WHILE ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_CONST ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_DEBUGGER ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_RESERVED_WORD ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_WITH ;
+/.
+case $rule_number:
+{
+ sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount());
+} break;
+./
+
+PropertyIdentifier: JsIdentifier ;
+PropertyIdentifier: ReservedIdentifier ;
+
+MemberExpression: PrimaryExpression ;
+MemberExpression: FunctionExpression ;
+
+MemberExpression: MemberExpression T_LBRACKET Expression T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::ArrayMemberExpression *node = makeAstNode<AST::ArrayMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
+ node->lbracketToken = loc(2);
+ node->rbracketToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+MemberExpression: MemberExpression T_DOT PropertyIdentifier ;
+/.
+case $rule_number: {
+ AST::FieldMemberExpression *node = makeAstNode<AST::FieldMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).sval);
+ node->dotToken = loc(2);
+ node->identifierToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+MemberExpression: T_NEW MemberExpression T_LPAREN ArgumentListOpt T_RPAREN ;
+/.
+case $rule_number: {
+ AST::NewMemberExpression *node = makeAstNode<AST::NewMemberExpression> (driver->nodePool(), sym(2).Expression, sym(4).ArgumentList);
+ node->newToken = loc(1);
+ node->lparenToken = loc(3);
+ node->rparenToken = loc(5);
+ sym(1).Node = node;
+} break;
+./
+
+NewExpression: MemberExpression ;
+
+NewExpression: T_NEW NewExpression ;
+/.
+case $rule_number: {
+ AST::NewExpression *node = makeAstNode<AST::NewExpression> (driver->nodePool(), sym(2).Expression);
+ node->newToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+CallExpression: MemberExpression T_LPAREN ArgumentListOpt T_RPAREN ;
+/.
+case $rule_number: {
+ AST::CallExpression *node = makeAstNode<AST::CallExpression> (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+CallExpression: CallExpression T_LPAREN ArgumentListOpt T_RPAREN ;
+/.
+case $rule_number: {
+ AST::CallExpression *node = makeAstNode<AST::CallExpression> (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+CallExpression: CallExpression T_LBRACKET Expression T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::ArrayMemberExpression *node = makeAstNode<AST::ArrayMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
+ node->lbracketToken = loc(2);
+ node->rbracketToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+CallExpression: CallExpression T_DOT PropertyIdentifier ;
+/.
+case $rule_number: {
+ AST::FieldMemberExpression *node = makeAstNode<AST::FieldMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).sval);
+ node->dotToken = loc(2);
+ node->identifierToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+ArgumentListOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+ArgumentListOpt: ArgumentList ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(1).ArgumentList->finish();
+} break;
+./
+
+ArgumentList: AssignmentExpression ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::ArgumentList> (driver->nodePool(), sym(1).Expression);
+} break;
+./
+
+ArgumentList: ArgumentList T_COMMA AssignmentExpression ;
+/.
+case $rule_number: {
+ AST::ArgumentList *node = makeAstNode<AST::ArgumentList> (driver->nodePool(), sym(1).ArgumentList, sym(3).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+LeftHandSideExpression: NewExpression ;
+LeftHandSideExpression: CallExpression ;
+PostfixExpression: LeftHandSideExpression ;
+
+PostfixExpression: LeftHandSideExpression T_PLUS_PLUS ;
+/.
+case $rule_number: {
+ AST::PostIncrementExpression *node = makeAstNode<AST::PostIncrementExpression> (driver->nodePool(), sym(1).Expression);
+ node->incrementToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+PostfixExpression: LeftHandSideExpression T_MINUS_MINUS ;
+/.
+case $rule_number: {
+ AST::PostDecrementExpression *node = makeAstNode<AST::PostDecrementExpression> (driver->nodePool(), sym(1).Expression);
+ node->decrementToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+UnaryExpression: PostfixExpression ;
+
+UnaryExpression: T_DELETE UnaryExpression ;
+/.
+case $rule_number: {
+ AST::DeleteExpression *node = makeAstNode<AST::DeleteExpression> (driver->nodePool(), sym(2).Expression);
+ node->deleteToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+UnaryExpression: T_VOID UnaryExpression ;
+/.
+case $rule_number: {
+ AST::VoidExpression *node = makeAstNode<AST::VoidExpression> (driver->nodePool(), sym(2).Expression);
+ node->voidToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+UnaryExpression: T_TYPEOF UnaryExpression ;
+/.
+case $rule_number: {
+ AST::TypeOfExpression *node = makeAstNode<AST::TypeOfExpression> (driver->nodePool(), sym(2).Expression);
+ node->typeofToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+UnaryExpression: T_PLUS_PLUS UnaryExpression ;
+/.
+case $rule_number: {
+ AST::PreIncrementExpression *node = makeAstNode<AST::PreIncrementExpression> (driver->nodePool(), sym(2).Expression);
+ node->incrementToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+UnaryExpression: T_MINUS_MINUS UnaryExpression ;
+/.
+case $rule_number: {
+ AST::PreDecrementExpression *node = makeAstNode<AST::PreDecrementExpression> (driver->nodePool(), sym(2).Expression);
+ node->decrementToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+UnaryExpression: T_PLUS UnaryExpression ;
+/.
+case $rule_number: {
+ AST::UnaryPlusExpression *node = makeAstNode<AST::UnaryPlusExpression> (driver->nodePool(), sym(2).Expression);
+ node->plusToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+UnaryExpression: T_MINUS UnaryExpression ;
+/.
+case $rule_number: {
+ AST::UnaryMinusExpression *node = makeAstNode<AST::UnaryMinusExpression> (driver->nodePool(), sym(2).Expression);
+ node->minusToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+UnaryExpression: T_TILDE UnaryExpression ;
+/.
+case $rule_number: {
+ AST::TildeExpression *node = makeAstNode<AST::TildeExpression> (driver->nodePool(), sym(2).Expression);
+ node->tildeToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+UnaryExpression: T_NOT UnaryExpression ;
+/.
+case $rule_number: {
+ AST::NotExpression *node = makeAstNode<AST::NotExpression> (driver->nodePool(), sym(2).Expression);
+ node->notToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+MultiplicativeExpression: UnaryExpression ;
+
+MultiplicativeExpression: MultiplicativeExpression T_STAR UnaryExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Mul, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+MultiplicativeExpression: MultiplicativeExpression T_DIVIDE_ UnaryExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Div, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+MultiplicativeExpression: MultiplicativeExpression T_REMAINDER UnaryExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Mod, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+AdditiveExpression: MultiplicativeExpression ;
+
+AdditiveExpression: AdditiveExpression T_PLUS MultiplicativeExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Add, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+AdditiveExpression: AdditiveExpression T_MINUS MultiplicativeExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Sub, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+ShiftExpression: AdditiveExpression ;
+
+ShiftExpression: ShiftExpression T_LT_LT AdditiveExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::LShift, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+ShiftExpression: ShiftExpression T_GT_GT AdditiveExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::RShift, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+ShiftExpression: ShiftExpression T_GT_GT_GT AdditiveExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::URShift, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpression: ShiftExpression ;
+
+RelationalExpression: RelationalExpression T_LT ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Lt, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpression: RelationalExpression T_GT ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Gt, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpression: RelationalExpression T_LE ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Le, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpression: RelationalExpression T_GE ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Ge, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpression: RelationalExpression T_INSTANCEOF ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::InstanceOf, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpression: RelationalExpression T_IN ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::In, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpressionNotIn: ShiftExpression ;
+
+RelationalExpressionNotIn: RelationalExpressionNotIn T_LT ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Lt, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpressionNotIn: RelationalExpressionNotIn T_GT ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Gt, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpressionNotIn: RelationalExpressionNotIn T_LE ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Le, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpressionNotIn: RelationalExpressionNotIn T_GE ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Ge, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpressionNotIn: RelationalExpressionNotIn T_INSTANCEOF ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::InstanceOf, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+EqualityExpression: RelationalExpression ;
+
+EqualityExpression: EqualityExpression T_EQ_EQ RelationalExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Equal, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+EqualityExpression: EqualityExpression T_NOT_EQ RelationalExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::NotEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+EqualityExpression: EqualityExpression T_EQ_EQ_EQ RelationalExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::StrictEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+EqualityExpression: EqualityExpression T_NOT_EQ_EQ RelationalExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::StrictNotEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+EqualityExpressionNotIn: RelationalExpressionNotIn ;
+
+EqualityExpressionNotIn: EqualityExpressionNotIn T_EQ_EQ RelationalExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Equal, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+EqualityExpressionNotIn: EqualityExpressionNotIn T_NOT_EQ RelationalExpressionNotIn;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::NotEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+EqualityExpressionNotIn: EqualityExpressionNotIn T_EQ_EQ_EQ RelationalExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::StrictEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+EqualityExpressionNotIn: EqualityExpressionNotIn T_NOT_EQ_EQ RelationalExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::StrictNotEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+BitwiseANDExpression: EqualityExpression ;
+
+BitwiseANDExpression: BitwiseANDExpression T_AND EqualityExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitAnd, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+BitwiseANDExpressionNotIn: EqualityExpressionNotIn ;
+
+BitwiseANDExpressionNotIn: BitwiseANDExpressionNotIn T_AND EqualityExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitAnd, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+BitwiseXORExpression: BitwiseANDExpression ;
+
+BitwiseXORExpression: BitwiseXORExpression T_XOR BitwiseANDExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitXor, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+BitwiseXORExpressionNotIn: BitwiseANDExpressionNotIn ;
+
+BitwiseXORExpressionNotIn: BitwiseXORExpressionNotIn T_XOR BitwiseANDExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitXor, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+BitwiseORExpression: BitwiseXORExpression ;
+
+BitwiseORExpression: BitwiseORExpression T_OR BitwiseXORExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitOr, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+BitwiseORExpressionNotIn: BitwiseXORExpressionNotIn ;
+
+BitwiseORExpressionNotIn: BitwiseORExpressionNotIn T_OR BitwiseXORExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitOr, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+LogicalANDExpression: BitwiseORExpression ;
+
+LogicalANDExpression: LogicalANDExpression T_AND_AND BitwiseORExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::And, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+LogicalANDExpressionNotIn: BitwiseORExpressionNotIn ;
+
+LogicalANDExpressionNotIn: LogicalANDExpressionNotIn T_AND_AND BitwiseORExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::And, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+LogicalORExpression: LogicalANDExpression ;
+
+LogicalORExpression: LogicalORExpression T_OR_OR LogicalANDExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Or, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+LogicalORExpressionNotIn: LogicalANDExpressionNotIn ;
+
+LogicalORExpressionNotIn: LogicalORExpressionNotIn T_OR_OR LogicalANDExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Or, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+ConditionalExpression: LogicalORExpression ;
+
+ConditionalExpression: LogicalORExpression T_QUESTION AssignmentExpression T_COLON AssignmentExpression ;
+/.
+case $rule_number: {
+ AST::ConditionalExpression *node = makeAstNode<AST::ConditionalExpression> (driver->nodePool(), sym(1).Expression,
+ sym(3).Expression, sym(5).Expression);
+ node->questionToken = loc(2);
+ node->colonToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+ConditionalExpressionNotIn: LogicalORExpressionNotIn ;
+
+ConditionalExpressionNotIn: LogicalORExpressionNotIn T_QUESTION AssignmentExpressionNotIn T_COLON AssignmentExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::ConditionalExpression *node = makeAstNode<AST::ConditionalExpression> (driver->nodePool(), sym(1).Expression,
+ sym(3).Expression, sym(5).Expression);
+ node->questionToken = loc(2);
+ node->colonToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+AssignmentExpression: ConditionalExpression ;
+
+AssignmentExpression: LeftHandSideExpression AssignmentOperator AssignmentExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ sym(2).ival, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+AssignmentExpressionNotIn: ConditionalExpressionNotIn ;
+
+AssignmentExpressionNotIn: LeftHandSideExpression AssignmentOperator AssignmentExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ sym(2).ival, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+AssignmentOperator: T_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::Assign;
+} break;
+./
+
+AssignmentOperator: T_STAR_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceMul;
+} break;
+./
+
+AssignmentOperator: T_DIVIDE_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceDiv;
+} break;
+./
+
+AssignmentOperator: T_REMAINDER_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceMod;
+} break;
+./
+
+AssignmentOperator: T_PLUS_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceAdd;
+} break;
+./
+
+AssignmentOperator: T_MINUS_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceSub;
+} break;
+./
+
+AssignmentOperator: T_LT_LT_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceLeftShift;
+} break;
+./
+
+AssignmentOperator: T_GT_GT_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceRightShift;
+} break;
+./
+
+AssignmentOperator: T_GT_GT_GT_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceURightShift;
+} break;
+./
+
+AssignmentOperator: T_AND_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceAnd;
+} break;
+./
+
+AssignmentOperator: T_XOR_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceXor;
+} break;
+./
+
+AssignmentOperator: T_OR_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceOr;
+} break;
+./
+
+Expression: AssignmentExpression ;
+
+Expression: Expression T_COMMA AssignmentExpression ;
+/.
+case $rule_number: {
+ AST::Expression *node = makeAstNode<AST::Expression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+ExpressionOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+ExpressionOpt: Expression ;
+
+ExpressionNotIn: AssignmentExpressionNotIn ;
+
+ExpressionNotIn: ExpressionNotIn T_COMMA AssignmentExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::Expression *node = makeAstNode<AST::Expression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+ExpressionNotInOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+ExpressionNotInOpt: ExpressionNotIn ;
+
+Statement: Block ;
+Statement: VariableStatement ;
+Statement: EmptyStatement ;
+Statement: ExpressionStatement ;
+Statement: IfStatement ;
+Statement: IterationStatement ;
+Statement: ContinueStatement ;
+Statement: BreakStatement ;
+Statement: ReturnStatement ;
+Statement: WithStatement ;
+Statement: LabelledStatement ;
+Statement: SwitchStatement ;
+Statement: ThrowStatement ;
+Statement: TryStatement ;
+Statement: DebuggerStatement ;
+
+
+Block: T_LBRACE StatementListOpt T_RBRACE ;
+/.
+case $rule_number: {
+ AST::Block *node = makeAstNode<AST::Block> (driver->nodePool(), sym(2).StatementList);
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+StatementList: Statement ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::StatementList> (driver->nodePool(), sym(1).Statement);
+} break;
+./
+
+StatementList: StatementList Statement ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::StatementList> (driver->nodePool(), sym(1).StatementList, sym(2).Statement);
+} break;
+./
+
+StatementListOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+StatementListOpt: StatementList ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(1).StatementList->finish ();
+} break;
+./
+
+VariableStatement: VariableDeclarationKind VariableDeclarationList T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+VariableStatement: VariableDeclarationKind VariableDeclarationList T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::VariableStatement *node = makeAstNode<AST::VariableStatement> (driver->nodePool(),
+ sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST));
+ node->declarationKindToken = loc(1);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+VariableDeclarationKind: T_CONST ;
+/.
+case $rule_number: {
+ sym(1).ival = T_CONST;
+} break;
+./
+
+VariableDeclarationKind: T_VAR ;
+/.
+case $rule_number: {
+ sym(1).ival = T_VAR;
+} break;
+./
+
+VariableDeclarationList: VariableDeclaration ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclaration);
+} break;
+./
+
+VariableDeclarationList: VariableDeclarationList T_COMMA VariableDeclaration ;
+/.
+case $rule_number: {
+ AST::VariableDeclarationList *node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(),
+ sym(1).VariableDeclarationList, sym(3).VariableDeclaration);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+VariableDeclarationListNotIn: VariableDeclarationNotIn ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclaration);
+} break;
+./
+
+VariableDeclarationListNotIn: VariableDeclarationListNotIn T_COMMA VariableDeclarationNotIn ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration);
+} break;
+./
+
+VariableDeclaration: JsIdentifier InitialiserOpt ;
+/.
+case $rule_number: {
+ AST::VariableDeclaration *node = makeAstNode<AST::VariableDeclaration> (driver->nodePool(), sym(1).sval, sym(2).Expression);
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+VariableDeclarationNotIn: JsIdentifier InitialiserNotInOpt ;
+/.
+case $rule_number: {
+ AST::VariableDeclaration *node = makeAstNode<AST::VariableDeclaration> (driver->nodePool(), sym(1).sval, sym(2).Expression);
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+Initialiser: T_EQ AssignmentExpression ;
+/.
+case $rule_number: {
+ // ### TODO: AST for initializer
+ sym(1) = sym(2);
+} break;
+./
+
+InitialiserOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+InitialiserOpt: Initialiser ;
+
+InitialiserNotIn: T_EQ AssignmentExpressionNotIn ;
+/.
+case $rule_number: {
+ // ### TODO: AST for initializer
+ sym(1) = sym(2);
+} break;
+./
+
+InitialiserNotInOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+InitialiserNotInOpt: InitialiserNotIn ;
+
+EmptyStatement: T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::EmptyStatement *node = makeAstNode<AST::EmptyStatement> (driver->nodePool());
+ node->semicolonToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+ExpressionStatement: Expression T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+ExpressionStatement: Expression T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::ExpressionStatement *node = makeAstNode<AST::ExpressionStatement> (driver->nodePool(), sym(1).Expression);
+ node->semicolonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+IfStatement: T_IF T_LPAREN Expression T_RPAREN Statement T_ELSE Statement ;
+/.
+case $rule_number: {
+ AST::IfStatement *node = makeAstNode<AST::IfStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement, sym(7).Statement);
+ node->ifToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ node->elseToken = loc(5);
+ sym(1).Node = node;
+} break;
+./
+
+IfStatement: T_IF T_LPAREN Expression T_RPAREN Statement ;
+/.
+case $rule_number: {
+ AST::IfStatement *node = makeAstNode<AST::IfStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement);
+ node->ifToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+
+IterationStatement: T_DO Statement T_WHILE T_LPAREN Expression T_RPAREN T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+IterationStatement: T_DO Statement T_WHILE T_LPAREN Expression T_RPAREN T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::DoWhileStatement *node = makeAstNode<AST::DoWhileStatement> (driver->nodePool(), sym(2).Statement, sym(5).Expression);
+ node->doToken = loc(1);
+ node->whileToken = loc(3);
+ node->lparenToken = loc(4);
+ node->rparenToken = loc(6);
+ node->semicolonToken = loc(7);
+ sym(1).Node = node;
+} break;
+./
+
+IterationStatement: T_WHILE T_LPAREN Expression T_RPAREN Statement ;
+/.
+case $rule_number: {
+ AST::WhileStatement *node = makeAstNode<AST::WhileStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement);
+ node->whileToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+IterationStatement: T_FOR T_LPAREN ExpressionNotInOpt T_SEMICOLON ExpressionOpt T_SEMICOLON ExpressionOpt T_RPAREN Statement ;
+/.
+case $rule_number: {
+ AST::ForStatement *node = makeAstNode<AST::ForStatement> (driver->nodePool(), sym(3).Expression,
+ sym(5).Expression, sym(7).Expression, sym(9).Statement);
+ node->forToken = loc(1);
+ node->lparenToken = loc(2);
+ node->firstSemicolonToken = loc(4);
+ node->secondSemicolonToken = loc(6);
+ node->rparenToken = loc(8);
+ sym(1).Node = node;
+} break;
+./
+
+IterationStatement: T_FOR T_LPAREN T_VAR VariableDeclarationListNotIn T_SEMICOLON ExpressionOpt T_SEMICOLON ExpressionOpt T_RPAREN Statement ;
+/.
+case $rule_number: {
+ AST::LocalForStatement *node = makeAstNode<AST::LocalForStatement> (driver->nodePool(),
+ sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression,
+ sym(8).Expression, sym(10).Statement);
+ node->forToken = loc(1);
+ node->lparenToken = loc(2);
+ node->varToken = loc(3);
+ node->firstSemicolonToken = loc(5);
+ node->secondSemicolonToken = loc(7);
+ node->rparenToken = loc(9);
+ sym(1).Node = node;
+} break;
+./
+
+IterationStatement: T_FOR T_LPAREN LeftHandSideExpression T_IN Expression T_RPAREN Statement ;
+/.
+case $rule_number: {
+ AST:: ForEachStatement *node = makeAstNode<AST::ForEachStatement> (driver->nodePool(), sym(3).Expression,
+ sym(5).Expression, sym(7).Statement);
+ node->forToken = loc(1);
+ node->lparenToken = loc(2);
+ node->inToken = loc(4);
+ node->rparenToken = loc(6);
+ sym(1).Node = node;
+} break;
+./
+
+IterationStatement: T_FOR T_LPAREN T_VAR VariableDeclarationNotIn T_IN Expression T_RPAREN Statement ;
+/.
+case $rule_number: {
+ AST::LocalForEachStatement *node = makeAstNode<AST::LocalForEachStatement> (driver->nodePool(),
+ sym(4).VariableDeclaration, sym(6).Expression, sym(8).Statement);
+ node->forToken = loc(1);
+ node->lparenToken = loc(2);
+ node->varToken = loc(3);
+ node->inToken = loc(5);
+ node->rparenToken = loc(7);
+ sym(1).Node = node;
+} break;
+./
+
+ContinueStatement: T_CONTINUE T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+ContinueStatement: T_CONTINUE T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::ContinueStatement *node = makeAstNode<AST::ContinueStatement> (driver->nodePool());
+ node->continueToken = loc(1);
+ node->semicolonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+ContinueStatement: T_CONTINUE JsIdentifier T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+ContinueStatement: T_CONTINUE JsIdentifier T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::ContinueStatement *node = makeAstNode<AST::ContinueStatement> (driver->nodePool(), sym(2).sval);
+ node->continueToken = loc(1);
+ node->identifierToken = loc(2);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+BreakStatement: T_BREAK T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+BreakStatement: T_BREAK T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::BreakStatement *node = makeAstNode<AST::BreakStatement> (driver->nodePool());
+ node->breakToken = loc(1);
+ node->semicolonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+BreakStatement: T_BREAK JsIdentifier T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+BreakStatement: T_BREAK JsIdentifier T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::BreakStatement *node = makeAstNode<AST::BreakStatement> (driver->nodePool(), sym(2).sval);
+ node->breakToken = loc(1);
+ node->identifierToken = loc(2);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+ReturnStatement: T_RETURN ExpressionOpt T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+ReturnStatement: T_RETURN ExpressionOpt T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::ReturnStatement *node = makeAstNode<AST::ReturnStatement> (driver->nodePool(), sym(2).Expression);
+ node->returnToken = loc(1);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+WithStatement: T_WITH T_LPAREN Expression T_RPAREN Statement ;
+/.
+case $rule_number: {
+ AST::WithStatement *node = makeAstNode<AST::WithStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement);
+ node->withToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+SwitchStatement: T_SWITCH T_LPAREN Expression T_RPAREN CaseBlock ;
+/.
+case $rule_number: {
+ AST::SwitchStatement *node = makeAstNode<AST::SwitchStatement> (driver->nodePool(), sym(3).Expression, sym(5).CaseBlock);
+ node->switchToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+CaseBlock: T_LBRACE CaseClausesOpt T_RBRACE ;
+/.
+case $rule_number: {
+ AST::CaseBlock *node = makeAstNode<AST::CaseBlock> (driver->nodePool(), sym(2).CaseClauses);
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+CaseBlock: T_LBRACE CaseClausesOpt DefaultClause CaseClausesOpt T_RBRACE ;
+/.
+case $rule_number: {
+ AST::CaseBlock *node = makeAstNode<AST::CaseBlock> (driver->nodePool(), sym(2).CaseClauses, sym(3).DefaultClause, sym(4).CaseClauses);
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(5);
+ sym(1).Node = node;
+} break;
+./
+
+CaseClauses: CaseClause ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::CaseClauses> (driver->nodePool(), sym(1).CaseClause);
+} break;
+./
+
+CaseClauses: CaseClauses CaseClause ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::CaseClauses> (driver->nodePool(), sym(1).CaseClauses, sym(2).CaseClause);
+} break;
+./
+
+CaseClausesOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+CaseClausesOpt: CaseClauses ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(1).CaseClauses->finish ();
+} break;
+./
+
+CaseClause: T_CASE Expression T_COLON StatementListOpt ;
+/.
+case $rule_number: {
+ AST::CaseClause *node = makeAstNode<AST::CaseClause> (driver->nodePool(), sym(2).Expression, sym(4).StatementList);
+ node->caseToken = loc(1);
+ node->colonToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+DefaultClause: T_DEFAULT T_COLON StatementListOpt ;
+/.
+case $rule_number: {
+ AST::DefaultClause *node = makeAstNode<AST::DefaultClause> (driver->nodePool(), sym(3).StatementList);
+ node->defaultToken = loc(1);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+LabelledStatement: T_SIGNAL T_COLON Statement ;
+/.case $rule_number:./
+
+LabelledStatement: T_PROPERTY T_COLON Statement ;
+/.
+case $rule_number: {
+ AST::LabelledStatement *node = makeAstNode<AST::LabelledStatement> (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()), sym(3).Statement);
+ node->identifierToken = loc(1);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+LabelledStatement: T_IDENTIFIER T_COLON Statement ;
+/.
+case $rule_number: {
+ AST::LabelledStatement *node = makeAstNode<AST::LabelledStatement> (driver->nodePool(), sym(1).sval, sym(3).Statement);
+ node->identifierToken = loc(1);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+ThrowStatement: T_THROW Expression T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+ThrowStatement: T_THROW Expression T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::ThrowStatement *node = makeAstNode<AST::ThrowStatement> (driver->nodePool(), sym(2).Expression);
+ node->throwToken = loc(1);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+TryStatement: T_TRY Block Catch ;
+/.
+case $rule_number: {
+ AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Catch);
+ node->tryToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+TryStatement: T_TRY Block Finally ;
+/.
+case $rule_number: {
+ AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Finally);
+ node->tryToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+TryStatement: T_TRY Block Catch Finally ;
+/.
+case $rule_number: {
+ AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Catch, sym(4).Finally);
+ node->tryToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+Catch: T_CATCH T_LPAREN JsIdentifier T_RPAREN Block ;
+/.
+case $rule_number: {
+ AST::Catch *node = makeAstNode<AST::Catch> (driver->nodePool(), sym(3).sval, sym(5).Block);
+ node->catchToken = loc(1);
+ node->lparenToken = loc(2);
+ node->identifierToken = loc(3);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+Finally: T_FINALLY Block ;
+/.
+case $rule_number: {
+ AST::Finally *node = makeAstNode<AST::Finally> (driver->nodePool(), sym(2).Block);
+ node->finallyToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+DebuggerStatement: T_DEBUGGER T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+DebuggerStatement: T_DEBUGGER T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::DebuggerStatement *node = makeAstNode<AST::DebuggerStatement> (driver->nodePool());
+ node->debuggerToken = loc(1);
+ node->semicolonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+FunctionDeclaration: T_FUNCTION JsIdentifier T_LPAREN FormalParameterListOpt T_RPAREN T_LBRACE FunctionBodyOpt T_RBRACE ;
+/.
+case $rule_number: {
+ AST::FunctionDeclaration *node = makeAstNode<AST::FunctionDeclaration> (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody);
+ node->functionToken = loc(1);
+ node->identifierToken = loc(2);
+ node->lparenToken = loc(3);
+ node->rparenToken = loc(5);
+ node->lbraceToken = loc(6);
+ node->rbraceToken = loc(8);
+ sym(1).Node = node;
+} break;
+./
+
+FunctionExpression: T_FUNCTION IdentifierOpt T_LPAREN FormalParameterListOpt T_RPAREN T_LBRACE FunctionBodyOpt T_RBRACE ;
+/.
+case $rule_number: {
+ AST::FunctionExpression *node = makeAstNode<AST::FunctionExpression> (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody);
+ node->functionToken = loc(1);
+ if (sym(2).sval)
+ node->identifierToken = loc(2);
+ node->lparenToken = loc(3);
+ node->rparenToken = loc(5);
+ node->lbraceToken = loc(6);
+ node->rbraceToken = loc(8);
+ sym(1).Node = node;
+} break;
+./
+
+FormalParameterList: JsIdentifier ;
+/.
+case $rule_number: {
+ AST::FormalParameterList *node = makeAstNode<AST::FormalParameterList> (driver->nodePool(), sym(1).sval);
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+FormalParameterList: FormalParameterList T_COMMA JsIdentifier ;
+/.
+case $rule_number: {
+ AST::FormalParameterList *node = makeAstNode<AST::FormalParameterList> (driver->nodePool(), sym(1).FormalParameterList, sym(3).sval);
+ node->commaToken = loc(2);
+ node->identifierToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+FormalParameterListOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+FormalParameterListOpt: FormalParameterList ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(1).FormalParameterList->finish ();
+} break;
+./
+
+FunctionBodyOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+FunctionBodyOpt: FunctionBody ;
+
+FunctionBody: SourceElements ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::FunctionBody> (driver->nodePool(), sym(1).SourceElements->finish ());
+} break;
+./
+
+Program: SourceElements ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::Program> (driver->nodePool(), sym(1).SourceElements->finish ());
+} break;
+./
+
+SourceElements: SourceElement ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::SourceElements> (driver->nodePool(), sym(1).SourceElement);
+} break;
+./
+
+SourceElements: SourceElements SourceElement ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::SourceElements> (driver->nodePool(), sym(1).SourceElements, sym(2).SourceElement);
+} break;
+./
+
+SourceElement: Statement ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::StatementSourceElement> (driver->nodePool(), sym(1).Statement);
+} break;
+./
+
+SourceElement: FunctionDeclaration ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::FunctionSourceElement> (driver->nodePool(), sym(1).FunctionDeclaration);
+} break;
+./
+
+IdentifierOpt: ;
+/.
+case $rule_number: {
+ sym(1).sval = 0;
+} break;
+./
+
+IdentifierOpt: JsIdentifier ;
+
+PropertyNameAndValueListOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+PropertyNameAndValueListOpt: PropertyNameAndValueList ;
+
+/.
+ } // switch
+ action = nt_action(state_stack[tos], lhs[r] - TERMINAL_COUNT);
+ } // if
+ } while (action != 0);
+
+ if (first_token == last_token) {
+ const int errorState = state_stack[tos];
+
+ // automatic insertion of `;'
+ if (yytoken != -1 && t_action(errorState, T_AUTOMATIC_SEMICOLON) && automatic(driver, yytoken)) {
+ SavedToken &tk = token_buffer[0];
+ tk.token = yytoken;
+ tk.dval = yylval;
+ tk.loc = yylloc;
+
+ yylloc = yyprevlloc;
+ yylloc.offset += yylloc.length;
+ yylloc.startColumn += yylloc.length;
+ yylloc.length = 0;
+
+ //const QString msg = qApp->translate("QDeclarativeParser", "Missing `;'");
+ //diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, yylloc, msg));
+
+ first_token = &token_buffer[0];
+ last_token = &token_buffer[1];
+
+ yytoken = T_SEMICOLON;
+ yylval = 0;
+
+ action = errorState;
+
+ goto _Lcheck_token;
+ }
+
+ hadErrors = true;
+
+ token_buffer[0].token = yytoken;
+ token_buffer[0].dval = yylval;
+ token_buffer[0].loc = yylloc;
+
+ token_buffer[1].token = yytoken = lexer->lex();
+ token_buffer[1].dval = yylval = lexer->dval();
+ token_buffer[1].loc = yylloc = location(lexer);
+
+ if (t_action(errorState, yytoken)) {
+ QString msg;
+ int token = token_buffer[0].token;
+ if (token < 0 || token >= TERMINAL_COUNT)
+ msg = qApp->translate("QDeclarativeParser", "Syntax error");
+ else
+ msg = qApp->translate("QDeclarativeParser", "Unexpected token `%1'").arg(QLatin1String(spell[token]));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
+
+ action = errorState;
+ goto _Lcheck_token;
+ }
+
+ static int tokens[] = {
+ T_PLUS,
+ T_EQ,
+
+ T_COMMA,
+ T_COLON,
+ T_SEMICOLON,
+
+ T_RPAREN, T_RBRACKET, T_RBRACE,
+
+ T_NUMERIC_LITERAL,
+ T_IDENTIFIER,
+
+ T_LPAREN, T_LBRACKET, T_LBRACE,
+
+ EOF_SYMBOL
+ };
+
+ for (int *tk = tokens; *tk != EOF_SYMBOL; ++tk) {
+ int a = t_action(errorState, *tk);
+ if (a > 0 && t_action(a, yytoken)) {
+ const QString msg = qApp->translate("QDeclarativeParser", "Expected token `%1'").arg(QLatin1String(spell[*tk]));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
+
+ yytoken = *tk;
+ yylval = 0;
+ yylloc = token_buffer[0].loc;
+ yylloc.length = 0;
+
+ first_token = &token_buffer[0];
+ last_token = &token_buffer[2];
+
+ action = errorState;
+ goto _Lcheck_token;
+ }
+ }
+
+ for (int tk = 1; tk < TERMINAL_COUNT; ++tk) {
+ if (tk == T_AUTOMATIC_SEMICOLON || tk == T_FEED_UI_PROGRAM ||
+ tk == T_FEED_JS_STATEMENT || tk == T_FEED_JS_EXPRESSION ||
+ tk == T_FEED_JS_SOURCE_ELEMENT)
+ continue;
+
+ int a = t_action(errorState, tk);
+ if (a > 0 && t_action(a, yytoken)) {
+ const QString msg = qApp->translate("QDeclarativeParser", "Expected token `%1'").arg(QLatin1String(spell[tk]));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
+
+ yytoken = tk;
+ yylval = 0;
+ yylloc = token_buffer[0].loc;
+ yylloc.length = 0;
+
+ action = errorState;
+ goto _Lcheck_token;
+ }
+ }
+
+ const QString msg = qApp->translate("QDeclarativeParser", "Syntax error");
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
+ }
+
+ return false;
+}
+
+QT_QML_END_NAMESPACE
+
+
+./
+/:
+QT_QML_END_NAMESPACE
+
+
+
+#endif // QDECLARATIVEJSPARSER_P_H
+:/
diff --git a/src/declarative/qml/parser/qdeclarativejsast.cpp b/src/declarative/qml/parser/qdeclarativejsast.cpp
new file mode 100644
index 0000000000..3b569a7123
--- /dev/null
+++ b/src/declarative/qml/parser/qdeclarativejsast.cpp
@@ -0,0 +1,955 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativejsast_p.h"
+
+#include "qdeclarativejsastvisitor_p.h"
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS { namespace AST {
+
+void Node::accept(Visitor *visitor)
+{
+ if (visitor->preVisit(this)) {
+ accept0(visitor);
+ }
+ visitor->postVisit(this);
+}
+
+void Node::accept(Node *node, Visitor *visitor)
+{
+ if (node)
+ node->accept(visitor);
+}
+
+ExpressionNode *Node::expressionCast()
+{
+ return 0;
+}
+
+BinaryExpression *Node::binaryExpressionCast()
+{
+ return 0;
+}
+
+Statement *Node::statementCast()
+{
+ return 0;
+}
+
+UiObjectMember *Node::uiObjectMemberCast()
+{
+ return 0;
+}
+
+ExpressionNode *ExpressionNode::expressionCast()
+{
+ return this;
+}
+
+BinaryExpression *BinaryExpression::binaryExpressionCast()
+{
+ return this;
+}
+
+Statement *Statement::statementCast()
+{
+ return this;
+}
+
+UiObjectMember *UiObjectMember::uiObjectMemberCast()
+{
+ return this;
+}
+
+void NestedExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+ visitor->endVisit(this);
+}
+
+void ThisExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void IdentifierExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void NullExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void TrueLiteral::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void FalseLiteral::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void StringLiteral::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void NumericLiteral::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void RegExpLiteral::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void ArrayLiteral::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(elements, visitor);
+ accept(elision, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void ObjectLiteral::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(properties, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void ElementList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (ElementList *it = this; it; it = it->next) {
+ accept(it->elision, visitor);
+ accept(it->expression, visitor);
+ }
+ }
+
+ visitor->endVisit(this);
+}
+
+void Elision::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ // ###
+ }
+
+ visitor->endVisit(this);
+}
+
+void PropertyNameAndValueList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (PropertyNameAndValueList *it = this; it; it = it->next) {
+ accept(it->name, visitor);
+ accept(it->value, visitor);
+ }
+ }
+
+ visitor->endVisit(this);
+}
+
+void IdentifierPropertyName::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void StringLiteralPropertyName::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void NumericLiteralPropertyName::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void ArrayMemberExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(base, visitor);
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void FieldMemberExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(base, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void NewMemberExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(base, visitor);
+ accept(arguments, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void NewExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void CallExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(base, visitor);
+ accept(arguments, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void ArgumentList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (ArgumentList *it = this; it; it = it->next) {
+ accept(it->expression, visitor);
+ }
+ }
+
+ visitor->endVisit(this);
+}
+
+void PostIncrementExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(base, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void PostDecrementExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(base, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void DeleteExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void VoidExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void TypeOfExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void PreIncrementExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void PreDecrementExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UnaryPlusExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UnaryMinusExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void TildeExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void NotExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void BinaryExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(left, visitor);
+ accept(right, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void ConditionalExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ accept(ok, visitor);
+ accept(ko, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void Expression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(left, visitor);
+ accept(right, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void Block::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(statements, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void StatementList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (StatementList *it = this; it; it = it->next) {
+ accept(it->statement, visitor);
+ }
+ }
+
+ visitor->endVisit(this);
+}
+
+void VariableStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(declarations, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void VariableDeclarationList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (VariableDeclarationList *it = this; it; it = it->next) {
+ accept(it->declaration, visitor);
+ }
+ }
+
+ visitor->endVisit(this);
+}
+
+void VariableDeclaration::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void EmptyStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void ExpressionStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void IfStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ accept(ok, visitor);
+ accept(ko, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void DoWhileStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(statement, visitor);
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void WhileStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void ForStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(initialiser, visitor);
+ accept(condition, visitor);
+ accept(expression, visitor);
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void LocalForStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(declarations, visitor);
+ accept(condition, visitor);
+ accept(expression, visitor);
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void ForEachStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(initialiser, visitor);
+ accept(expression, visitor);
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void LocalForEachStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(declaration, visitor);
+ accept(expression, visitor);
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void ContinueStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void BreakStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void ReturnStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void WithStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void SwitchStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ accept(block, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void CaseBlock::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(clauses, visitor);
+ accept(defaultClause, visitor);
+ accept(moreClauses, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void CaseClauses::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (CaseClauses *it = this; it; it = it->next) {
+ accept(it->clause, visitor);
+ }
+ }
+
+ visitor->endVisit(this);
+}
+
+void CaseClause::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ accept(statements, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void DefaultClause::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(statements, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void LabelledStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void ThrowStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void TryStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(statement, visitor);
+ accept(catchExpression, visitor);
+ accept(finallyExpression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void Catch::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void Finally::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void FunctionDeclaration::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(formals, visitor);
+ accept(body, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void FunctionExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(formals, visitor);
+ accept(body, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void FormalParameterList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ // ###
+ }
+
+ visitor->endVisit(this);
+}
+
+void FunctionBody::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(elements, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void Program::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(elements, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void SourceElements::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (SourceElements *it = this; it; it = it->next) {
+ accept(it->element, visitor);
+ }
+ }
+
+ visitor->endVisit(this);
+}
+
+void FunctionSourceElement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(declaration, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void StatementSourceElement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void DebuggerStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiProgram::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(imports, visitor);
+ accept(members, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiSignature::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(formals, visitor);
+ }
+ visitor->endVisit(this);
+}
+
+void UiFormalList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (UiFormalList *it = this; it; it = it->next) {
+ accept(it->formal, visitor);
+ }
+ }
+ visitor->endVisit(this);
+}
+
+void UiFormal::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+ visitor->endVisit(this);
+}
+
+void UiPublicMember::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiObjectDefinition::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(qualifiedTypeNameId, visitor);
+ accept(initializer, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiObjectInitializer::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(members, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiObjectBinding::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(qualifiedId, visitor);
+ accept(qualifiedTypeNameId, visitor);
+ accept(initializer, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiScriptBinding::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(qualifiedId, visitor);
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiArrayBinding::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(qualifiedId, visitor);
+ accept(members, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiObjectMemberList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (UiObjectMemberList *it = this; it; it = it->next)
+ accept(it->member, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiArrayMemberList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (UiArrayMemberList *it = this; it; it = it->next)
+ accept(it->member, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiQualifiedId::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiImport::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(importUri, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiImportList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(import, visitor);
+ accept(next, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiSourceElement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(sourceElement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+} } // namespace QDeclarativeJS::AST
+
+QT_QML_END_NAMESPACE
+
+
diff --git a/src/declarative/qml/parser/qdeclarativejsast_p.h b/src/declarative/qml/parser/qdeclarativejsast_p.h
new file mode 100644
index 0000000000..c1945cefbb
--- /dev/null
+++ b/src/declarative/qml/parser/qdeclarativejsast_p.h
@@ -0,0 +1,2685 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEJSAST_P_H
+#define QDECLARATIVEJSAST_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativejsastvisitor_p.h"
+#include "qdeclarativejsglobal_p.h"
+
+#include <QtCore/QString>
+
+QT_QML_BEGIN_NAMESPACE
+
+#define QDECLARATIVEJS_DECLARE_AST_NODE(name) \
+ enum { K = Kind_##name };
+
+namespace QSOperator // ### rename
+{
+
+enum Op {
+ Add,
+ And,
+ InplaceAnd,
+ Assign,
+ BitAnd,
+ BitOr,
+ BitXor,
+ InplaceSub,
+ Div,
+ InplaceDiv,
+ Equal,
+ Ge,
+ Gt,
+ In,
+ InplaceAdd,
+ InstanceOf,
+ Le,
+ LShift,
+ InplaceLeftShift,
+ Lt,
+ Mod,
+ InplaceMod,
+ Mul,
+ InplaceMul,
+ NotEqual,
+ Or,
+ InplaceOr,
+ RShift,
+ InplaceRightShift,
+ StrictEqual,
+ StrictNotEqual,
+ Sub,
+ URShift,
+ InplaceURightShift,
+ InplaceXor
+};
+
+} // namespace QSOperator
+
+namespace QDeclarativeJS {
+class NameId;
+namespace AST {
+
+template <typename _T1, typename _T2>
+_T1 cast(_T2 *ast)
+{
+ if (ast && ast->kind == static_cast<_T1>(0)->K)
+ return static_cast<_T1>(ast);
+
+ return 0;
+}
+
+class QML_PARSER_EXPORT Node
+{
+public:
+ enum Kind {
+ Kind_Undefined,
+
+ Kind_ArgumentList,
+ Kind_ArrayLiteral,
+ Kind_ArrayMemberExpression,
+ Kind_BinaryExpression,
+ Kind_Block,
+ Kind_BreakStatement,
+ Kind_CallExpression,
+ Kind_CaseBlock,
+ Kind_CaseClause,
+ Kind_CaseClauses,
+ Kind_Catch,
+ Kind_ConditionalExpression,
+ Kind_ContinueStatement,
+ Kind_DebuggerStatement,
+ Kind_DefaultClause,
+ Kind_DeleteExpression,
+ Kind_DoWhileStatement,
+ Kind_ElementList,
+ Kind_Elision,
+ Kind_EmptyStatement,
+ Kind_Expression,
+ Kind_ExpressionStatement,
+ Kind_FalseLiteral,
+ Kind_FieldMemberExpression,
+ Kind_Finally,
+ Kind_ForEachStatement,
+ Kind_ForStatement,
+ Kind_FormalParameterList,
+ Kind_FunctionBody,
+ Kind_FunctionDeclaration,
+ Kind_FunctionExpression,
+ Kind_FunctionSourceElement,
+ Kind_IdentifierExpression,
+ Kind_IdentifierPropertyName,
+ Kind_IfStatement,
+ Kind_LabelledStatement,
+ Kind_LocalForEachStatement,
+ Kind_LocalForStatement,
+ Kind_NewExpression,
+ Kind_NewMemberExpression,
+ Kind_NotExpression,
+ Kind_NullExpression,
+ Kind_NumericLiteral,
+ Kind_NumericLiteralPropertyName,
+ Kind_ObjectLiteral,
+ Kind_PostDecrementExpression,
+ Kind_PostIncrementExpression,
+ Kind_PreDecrementExpression,
+ Kind_PreIncrementExpression,
+ Kind_Program,
+ Kind_PropertyName,
+ Kind_PropertyNameAndValueList,
+ Kind_RegExpLiteral,
+ Kind_ReturnStatement,
+ Kind_SourceElement,
+ Kind_SourceElements,
+ Kind_StatementList,
+ Kind_StatementSourceElement,
+ Kind_StringLiteral,
+ Kind_StringLiteralPropertyName,
+ Kind_SwitchStatement,
+ Kind_ThisExpression,
+ Kind_ThrowStatement,
+ Kind_TildeExpression,
+ Kind_TrueLiteral,
+ Kind_TryStatement,
+ Kind_TypeOfExpression,
+ Kind_UnaryMinusExpression,
+ Kind_UnaryPlusExpression,
+ Kind_VariableDeclaration,
+ Kind_VariableDeclarationList,
+ Kind_VariableStatement,
+ Kind_VoidExpression,
+ Kind_WhileStatement,
+ Kind_WithStatement,
+ Kind_NestedExpression,
+
+ Kind_UiArrayBinding,
+ Kind_UiImport,
+ Kind_UiImportList,
+ Kind_UiObjectBinding,
+ Kind_UiObjectDefinition,
+ Kind_UiObjectInitializer,
+ Kind_UiObjectMemberList,
+ Kind_UiArrayMemberList,
+ Kind_UiProgram,
+ Kind_UiParameterList,
+ Kind_UiPublicMember,
+ Kind_UiQualifiedId,
+ Kind_UiScriptBinding,
+ Kind_UiSourceElement,
+ Kind_UiFormal,
+ Kind_UiFormalList,
+ Kind_UiSignature
+ };
+
+ inline Node()
+ : kind(Kind_Undefined) {}
+
+ virtual ~Node() {}
+
+ virtual ExpressionNode *expressionCast();
+ virtual BinaryExpression *binaryExpressionCast();
+ virtual Statement *statementCast();
+ virtual UiObjectMember *uiObjectMemberCast();
+
+ void accept(Visitor *visitor);
+ static void accept(Node *node, Visitor *visitor);
+
+ inline static void acceptChild(Node *node, Visitor *visitor)
+ { return accept(node, visitor); } // ### remove
+
+ virtual void accept0(Visitor *visitor) = 0;
+
+// attributes
+ int kind;
+};
+
+class QML_PARSER_EXPORT ExpressionNode: public Node
+{
+public:
+ ExpressionNode() {}
+ virtual ~ExpressionNode() {}
+
+ virtual ExpressionNode *expressionCast();
+
+ virtual SourceLocation firstSourceLocation() const = 0;
+ virtual SourceLocation lastSourceLocation() const = 0;
+};
+
+class QML_PARSER_EXPORT Statement: public Node
+{
+public:
+ Statement() {}
+ virtual ~Statement() {}
+
+ virtual Statement *statementCast();
+
+ virtual SourceLocation firstSourceLocation() const = 0;
+ virtual SourceLocation lastSourceLocation() const = 0;
+};
+
+class QML_PARSER_EXPORT UiFormal: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiFormal)
+
+ UiFormal(NameId *name, NameId *alias = 0)
+ : name(name), alias(alias)
+ { }
+
+ virtual SourceLocation firstSourceLocation() const
+ { return SourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return SourceLocation(); }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ NameId *name;
+ NameId *alias;
+ SourceLocation identifierToken;
+ SourceLocation asToken;
+ SourceLocation aliasToken;
+};
+
+class QML_PARSER_EXPORT UiFormalList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiFormalList)
+
+ UiFormalList(UiFormal *formal)
+ : formal(formal), next(this) {}
+
+ UiFormalList(UiFormalList *previous, UiFormal *formal)
+ : formal(formal)
+ {
+ next = previous->next;
+ previous->next = this;
+ }
+
+ UiFormalList *finish()
+ {
+ UiFormalList *head = next;
+ next = 0;
+ return head;
+ }
+
+ virtual SourceLocation firstSourceLocation() const
+ { return SourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return SourceLocation(); }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ UiFormal *formal;
+ UiFormalList *next;
+};
+
+class QML_PARSER_EXPORT UiSignature: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiSignature)
+
+ UiSignature(UiFormalList *formals = 0)
+ : formals(formals)
+ { }
+
+ virtual SourceLocation firstSourceLocation() const
+ { return SourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return SourceLocation(); }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ SourceLocation lparenToken;
+ UiFormalList *formals;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT NestedExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(NestedExpression)
+
+ NestedExpression(ExpressionNode *expression)
+ : expression(expression)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return lparenToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return rparenToken; }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation lparenToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT ThisExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ThisExpression)
+
+ ThisExpression() { kind = K; }
+ virtual ~ThisExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return thisToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return thisToken; }
+
+// attributes
+ SourceLocation thisToken;
+};
+
+class QML_PARSER_EXPORT IdentifierExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(IdentifierExpression)
+
+ IdentifierExpression(NameId *n):
+ name (n) { kind = K; }
+
+ virtual ~IdentifierExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return identifierToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return identifierToken; }
+
+// attributes
+ NameId *name;
+ SourceLocation identifierToken;
+};
+
+class QML_PARSER_EXPORT NullExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(NullExpression)
+
+ NullExpression() { kind = K; }
+ virtual ~NullExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return nullToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return nullToken; }
+
+// attributes
+ SourceLocation nullToken;
+};
+
+class QML_PARSER_EXPORT TrueLiteral: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(TrueLiteral)
+
+ TrueLiteral() { kind = K; }
+ virtual ~TrueLiteral() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return trueToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return trueToken; }
+
+// attributes
+ SourceLocation trueToken;
+};
+
+class QML_PARSER_EXPORT FalseLiteral: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(FalseLiteral)
+
+ FalseLiteral() { kind = K; }
+ virtual ~FalseLiteral() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return falseToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return falseToken; }
+
+// attributes
+ SourceLocation falseToken;
+};
+
+class QML_PARSER_EXPORT NumericLiteral: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(NumericLiteral)
+
+ NumericLiteral(double v):
+ value(v) { kind = K; }
+ virtual ~NumericLiteral() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return literalToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return literalToken; }
+
+// attributes:
+ double value;
+ SourceLocation literalToken;
+};
+
+class QML_PARSER_EXPORT StringLiteral: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(StringLiteral)
+
+ StringLiteral(NameId *v):
+ value (v) { kind = K; }
+
+ virtual ~StringLiteral() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return literalToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return literalToken; }
+
+// attributes:
+ NameId *value;
+ SourceLocation literalToken;
+};
+
+class QML_PARSER_EXPORT RegExpLiteral: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(RegExpLiteral)
+
+ RegExpLiteral(NameId *p, int f):
+ pattern (p), flags (f) { kind = K; }
+
+ virtual ~RegExpLiteral() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return literalToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return literalToken; }
+
+// attributes:
+ NameId *pattern;
+ int flags;
+ SourceLocation literalToken;
+};
+
+class QML_PARSER_EXPORT ArrayLiteral: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ArrayLiteral)
+
+ ArrayLiteral(Elision *e):
+ elements (0), elision (e)
+ { kind = K; }
+
+ ArrayLiteral(ElementList *elts):
+ elements (elts), elision (0)
+ { kind = K; }
+
+ ArrayLiteral(ElementList *elts, Elision *e):
+ elements (elts), elision (e)
+ { kind = K; }
+
+ virtual ~ArrayLiteral() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return lbracketToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return rbracketToken; }
+
+// attributes
+ ElementList *elements;
+ Elision *elision;
+ SourceLocation lbracketToken;
+ SourceLocation commaToken;
+ SourceLocation rbracketToken;
+};
+
+class QML_PARSER_EXPORT ObjectLiteral: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ObjectLiteral)
+
+ ObjectLiteral():
+ properties (0) { kind = K; }
+
+ ObjectLiteral(PropertyNameAndValueList *plist):
+ properties (plist) { kind = K; }
+
+ virtual ~ObjectLiteral() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return lbraceToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return rbraceToken; }
+
+// attributes
+ PropertyNameAndValueList *properties;
+ SourceLocation lbraceToken;
+ SourceLocation rbraceToken;
+};
+
+class QML_PARSER_EXPORT ElementList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ElementList)
+
+ ElementList(Elision *e, ExpressionNode *expr):
+ elision (e), expression (expr), next (this)
+ { kind = K; }
+
+ ElementList(ElementList *previous, Elision *e, ExpressionNode *expr):
+ elision (e), expression (expr)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual ~ElementList() {}
+
+ inline ElementList *finish ()
+ {
+ ElementList *front = next;
+ next = 0;
+ return front;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ Elision *elision;
+ ExpressionNode *expression;
+ ElementList *next;
+ SourceLocation commaToken;
+};
+
+class QML_PARSER_EXPORT Elision: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(Elision)
+
+ Elision():
+ next (this) { kind = K; }
+
+ Elision(Elision *previous)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual ~Elision() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ inline Elision *finish ()
+ {
+ Elision *front = next;
+ next = 0;
+ return front;
+ }
+
+// attributes
+ Elision *next;
+ SourceLocation commaToken;
+};
+
+class QML_PARSER_EXPORT PropertyNameAndValueList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(PropertyNameAndValueList)
+
+ PropertyNameAndValueList(PropertyName *n, ExpressionNode *v):
+ name (n), value (v), next (this)
+ { kind = K; }
+
+ PropertyNameAndValueList(PropertyNameAndValueList *previous, PropertyName *n, ExpressionNode *v):
+ name (n), value (v)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual ~PropertyNameAndValueList() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ inline PropertyNameAndValueList *finish ()
+ {
+ PropertyNameAndValueList *front = next;
+ next = 0;
+ return front;
+ }
+
+// attributes
+ PropertyName *name;
+ ExpressionNode *value;
+ PropertyNameAndValueList *next;
+ SourceLocation colonToken;
+ SourceLocation commaToken;
+};
+
+class QML_PARSER_EXPORT PropertyName: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(PropertyName)
+
+ PropertyName() { kind = K; }
+ virtual ~PropertyName() {}
+
+// attributes
+ SourceLocation propertyNameToken;
+};
+
+class QML_PARSER_EXPORT IdentifierPropertyName: public PropertyName
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(IdentifierPropertyName)
+
+ IdentifierPropertyName(NameId *n):
+ id (n) { kind = K; }
+
+ virtual ~IdentifierPropertyName() {}
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ NameId *id;
+};
+
+class QML_PARSER_EXPORT StringLiteralPropertyName: public PropertyName
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(StringLiteralPropertyName)
+
+ StringLiteralPropertyName(NameId *n):
+ id (n) { kind = K; }
+ virtual ~StringLiteralPropertyName() {}
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ NameId *id;
+};
+
+class QML_PARSER_EXPORT NumericLiteralPropertyName: public PropertyName
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(NumericLiteralPropertyName)
+
+ NumericLiteralPropertyName(double n):
+ id (n) { kind = K; }
+ virtual ~NumericLiteralPropertyName() {}
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ double id;
+};
+
+class QML_PARSER_EXPORT ArrayMemberExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ArrayMemberExpression)
+
+ ArrayMemberExpression(ExpressionNode *b, ExpressionNode *e):
+ base (b), expression (e)
+ { kind = K; }
+
+ virtual ~ArrayMemberExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return base->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return rbracketToken; }
+
+// attributes
+ ExpressionNode *base;
+ ExpressionNode *expression;
+ SourceLocation lbracketToken;
+ SourceLocation rbracketToken;
+};
+
+class QML_PARSER_EXPORT FieldMemberExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(FieldMemberExpression)
+
+ FieldMemberExpression(ExpressionNode *b, NameId *n):
+ base (b), name (n)
+ { kind = K; }
+
+ virtual ~FieldMemberExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return base->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return identifierToken; }
+
+ // attributes
+ ExpressionNode *base;
+ NameId *name;
+ SourceLocation dotToken;
+ SourceLocation identifierToken;
+};
+
+class QML_PARSER_EXPORT NewMemberExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(NewMemberExpression)
+
+ NewMemberExpression(ExpressionNode *b, ArgumentList *a):
+ base (b), arguments (a)
+ { kind = K; }
+
+ virtual ~NewMemberExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return newToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return rparenToken; }
+
+ // attributes
+ ExpressionNode *base;
+ ArgumentList *arguments;
+ SourceLocation newToken;
+ SourceLocation lparenToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT NewExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(NewExpression)
+
+ NewExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual ~NewExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return newToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation newToken;
+};
+
+class QML_PARSER_EXPORT CallExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(CallExpression)
+
+ CallExpression(ExpressionNode *b, ArgumentList *a):
+ base (b), arguments (a)
+ { kind = K; }
+
+ virtual ~CallExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return base->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return rparenToken; }
+
+// attributes
+ ExpressionNode *base;
+ ArgumentList *arguments;
+ SourceLocation lparenToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT ArgumentList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ArgumentList)
+
+ ArgumentList(ExpressionNode *e):
+ expression (e), next (this)
+ { kind = K; }
+
+ ArgumentList(ArgumentList *previous, ExpressionNode *e):
+ expression (e)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual ~ArgumentList() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ inline ArgumentList *finish ()
+ {
+ ArgumentList *front = next;
+ next = 0;
+ return front;
+ }
+
+// attributes
+ ExpressionNode *expression;
+ ArgumentList *next;
+ SourceLocation commaToken;
+};
+
+class QML_PARSER_EXPORT PostIncrementExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(PostIncrementExpression)
+
+ PostIncrementExpression(ExpressionNode *b):
+ base (b) { kind = K; }
+
+ virtual ~PostIncrementExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return base->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return incrementToken; }
+
+// attributes
+ ExpressionNode *base;
+ SourceLocation incrementToken;
+};
+
+class QML_PARSER_EXPORT PostDecrementExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(PostDecrementExpression)
+
+ PostDecrementExpression(ExpressionNode *b):
+ base (b) { kind = K; }
+
+ virtual ~PostDecrementExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return base->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return decrementToken; }
+
+// attributes
+ ExpressionNode *base;
+ SourceLocation decrementToken;
+};
+
+class QML_PARSER_EXPORT DeleteExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(DeleteExpression)
+
+ DeleteExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+ virtual ~DeleteExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return deleteToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation deleteToken;
+};
+
+class QML_PARSER_EXPORT VoidExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(VoidExpression)
+
+ VoidExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual ~VoidExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return voidToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation voidToken;
+};
+
+class QML_PARSER_EXPORT TypeOfExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(TypeOfExpression)
+
+ TypeOfExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual ~TypeOfExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return typeofToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation typeofToken;
+};
+
+class QML_PARSER_EXPORT PreIncrementExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(PreIncrementExpression)
+
+ PreIncrementExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual ~PreIncrementExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return incrementToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation incrementToken;
+};
+
+class QML_PARSER_EXPORT PreDecrementExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(PreDecrementExpression)
+
+ PreDecrementExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual ~PreDecrementExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return decrementToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation decrementToken;
+};
+
+class QML_PARSER_EXPORT UnaryPlusExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UnaryPlusExpression)
+
+ UnaryPlusExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual ~UnaryPlusExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return plusToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation plusToken;
+};
+
+class QML_PARSER_EXPORT UnaryMinusExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UnaryMinusExpression)
+
+ UnaryMinusExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual ~UnaryMinusExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return minusToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation minusToken;
+};
+
+class QML_PARSER_EXPORT TildeExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(TildeExpression)
+
+ TildeExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual ~TildeExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return tildeToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation tildeToken;
+};
+
+class QML_PARSER_EXPORT NotExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(NotExpression)
+
+ NotExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual ~NotExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return notToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation notToken;
+};
+
+class QML_PARSER_EXPORT BinaryExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(BinaryExpression)
+
+ BinaryExpression(ExpressionNode *l, int o, ExpressionNode *r):
+ left (l), op (o), right (r)
+ { kind = K; }
+
+ virtual ~BinaryExpression() {}
+
+ virtual BinaryExpression *binaryExpressionCast();
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return left->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return right->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *left;
+ int op;
+ ExpressionNode *right;
+ SourceLocation operatorToken;
+};
+
+class QML_PARSER_EXPORT ConditionalExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ConditionalExpression)
+
+ ConditionalExpression(ExpressionNode *e, ExpressionNode *t, ExpressionNode *f):
+ expression (e), ok (t), ko (f)
+ { kind = K; }
+
+ virtual ~ConditionalExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return expression->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return ko->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ ExpressionNode *ok;
+ ExpressionNode *ko;
+ SourceLocation questionToken;
+ SourceLocation colonToken;
+};
+
+class QML_PARSER_EXPORT Expression: public ExpressionNode // ### rename
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(Expression)
+
+ Expression(ExpressionNode *l, ExpressionNode *r):
+ left (l), right (r) { kind = K; }
+
+ virtual ~Expression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return left->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return right->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *left;
+ ExpressionNode *right;
+ SourceLocation commaToken;
+};
+
+class QML_PARSER_EXPORT Block: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(Block)
+
+ Block(StatementList *slist):
+ statements (slist) { kind = K; }
+
+ virtual ~Block() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return lbraceToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return rbraceToken; }
+
+ // attributes
+ StatementList *statements;
+ SourceLocation lbraceToken;
+ SourceLocation rbraceToken;
+};
+
+class QML_PARSER_EXPORT StatementList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(StatementList)
+
+ StatementList(Statement *stmt):
+ statement (stmt), next (this)
+ { kind = K; }
+
+ StatementList(StatementList *previous, Statement *stmt):
+ statement (stmt)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual ~StatementList() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ inline StatementList *finish ()
+ {
+ StatementList *front = next;
+ next = 0;
+ return front;
+ }
+
+// attributes
+ Statement *statement;
+ StatementList *next;
+};
+
+class QML_PARSER_EXPORT VariableStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(VariableStatement)
+
+ VariableStatement(VariableDeclarationList *vlist):
+ declarations (vlist)
+ { kind = K; }
+
+ virtual ~VariableStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return declarationKindToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+// attributes
+ VariableDeclarationList *declarations;
+ SourceLocation declarationKindToken;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT VariableDeclaration: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(VariableDeclaration)
+
+ VariableDeclaration(NameId *n, ExpressionNode *e):
+ name (n), expression (e), readOnly(false)
+ { kind = K; }
+
+ virtual ~VariableDeclaration() {}
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ NameId *name;
+ ExpressionNode *expression;
+ bool readOnly;
+ SourceLocation identifierToken;
+};
+
+class QML_PARSER_EXPORT VariableDeclarationList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(VariableDeclarationList)
+
+ VariableDeclarationList(VariableDeclaration *decl):
+ declaration (decl), next (this)
+ { kind = K; }
+
+ VariableDeclarationList(VariableDeclarationList *previous, VariableDeclaration *decl):
+ declaration (decl)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual ~VariableDeclarationList() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ inline VariableDeclarationList *finish (bool readOnly)
+ {
+ VariableDeclarationList *front = next;
+ next = 0;
+ if (readOnly) {
+ VariableDeclarationList *vdl;
+ for (vdl = front; vdl != 0; vdl = vdl->next)
+ vdl->declaration->readOnly = true;
+ }
+ return front;
+ }
+
+// attributes
+ VariableDeclaration *declaration;
+ VariableDeclarationList *next;
+ SourceLocation commaToken;
+};
+
+class QML_PARSER_EXPORT EmptyStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(EmptyStatement)
+
+ EmptyStatement() { kind = K; }
+ virtual ~EmptyStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return semicolonToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+// attributes
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT ExpressionStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ExpressionStatement)
+
+ ExpressionStatement(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual ~ExpressionStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return expression->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT IfStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(IfStatement)
+
+ IfStatement(ExpressionNode *e, Statement *t, Statement *f = 0):
+ expression (e), ok (t), ko (f)
+ { kind = K; }
+
+ virtual ~IfStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return ifToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ {
+ if (ko)
+ return ko->lastSourceLocation();
+
+ return ok->lastSourceLocation();
+ }
+
+// attributes
+ ExpressionNode *expression;
+ Statement *ok;
+ Statement *ko;
+ SourceLocation ifToken;
+ SourceLocation lparenToken;
+ SourceLocation rparenToken;
+ SourceLocation elseToken;
+};
+
+class QML_PARSER_EXPORT DoWhileStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(DoWhileStatement)
+
+ DoWhileStatement(Statement *stmt, ExpressionNode *e):
+ statement (stmt), expression (e)
+ { kind = K; }
+
+ virtual ~DoWhileStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return doToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+// attributes
+ Statement *statement;
+ ExpressionNode *expression;
+ SourceLocation doToken;
+ SourceLocation whileToken;
+ SourceLocation lparenToken;
+ SourceLocation rparenToken;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT WhileStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(WhileStatement)
+
+ WhileStatement(ExpressionNode *e, Statement *stmt):
+ expression (e), statement (stmt)
+ { kind = K; }
+
+ virtual ~WhileStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return whileToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return statement->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ Statement *statement;
+ SourceLocation whileToken;
+ SourceLocation lparenToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT ForStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ForStatement)
+
+ ForStatement(ExpressionNode *i, ExpressionNode *c, ExpressionNode *e, Statement *stmt):
+ initialiser (i), condition (c), expression (e), statement (stmt)
+ { kind = K; }
+
+ virtual ~ForStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return forToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return statement->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *initialiser;
+ ExpressionNode *condition;
+ ExpressionNode *expression;
+ Statement *statement;
+ SourceLocation forToken;
+ SourceLocation lparenToken;
+ SourceLocation firstSemicolonToken;
+ SourceLocation secondSemicolonToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT LocalForStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(LocalForStatement)
+
+ LocalForStatement(VariableDeclarationList *vlist, ExpressionNode *c, ExpressionNode *e, Statement *stmt):
+ declarations (vlist), condition (c), expression (e), statement (stmt)
+ { kind = K; }
+
+ virtual ~LocalForStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return forToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return statement->lastSourceLocation(); }
+
+// attributes
+ VariableDeclarationList *declarations;
+ ExpressionNode *condition;
+ ExpressionNode *expression;
+ Statement *statement;
+ SourceLocation forToken;
+ SourceLocation lparenToken;
+ SourceLocation varToken;
+ SourceLocation firstSemicolonToken;
+ SourceLocation secondSemicolonToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT ForEachStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ForEachStatement)
+
+ ForEachStatement(ExpressionNode *i, ExpressionNode *e, Statement *stmt):
+ initialiser (i), expression (e), statement (stmt)
+ { kind = K; }
+
+ virtual ~ForEachStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return forToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return statement->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *initialiser;
+ ExpressionNode *expression;
+ Statement *statement;
+ SourceLocation forToken;
+ SourceLocation lparenToken;
+ SourceLocation inToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT LocalForEachStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(LocalForEachStatement)
+
+ LocalForEachStatement(VariableDeclaration *v, ExpressionNode *e, Statement *stmt):
+ declaration (v), expression (e), statement (stmt)
+ { kind = K; }
+
+ virtual ~LocalForEachStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return forToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return statement->lastSourceLocation(); }
+
+// attributes
+ VariableDeclaration *declaration;
+ ExpressionNode *expression;
+ Statement *statement;
+ SourceLocation forToken;
+ SourceLocation lparenToken;
+ SourceLocation varToken;
+ SourceLocation inToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT ContinueStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ContinueStatement)
+
+ ContinueStatement(NameId *l = 0):
+ label (l) { kind = K; }
+
+ virtual ~ContinueStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return continueToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+// attributes
+ NameId *label;
+ SourceLocation continueToken;
+ SourceLocation identifierToken;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT BreakStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(BreakStatement)
+
+ BreakStatement(NameId *l = 0):
+ label (l) { kind = K; }
+
+ virtual ~BreakStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return breakToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+ // attributes
+ NameId *label;
+ SourceLocation breakToken;
+ SourceLocation identifierToken;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT ReturnStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ReturnStatement)
+
+ ReturnStatement(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual ~ReturnStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return returnToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation returnToken;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT WithStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(WithStatement)
+
+ WithStatement(ExpressionNode *e, Statement *stmt):
+ expression (e), statement (stmt)
+ { kind = K; }
+
+ virtual ~WithStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return withToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return statement->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ Statement *statement;
+ SourceLocation withToken;
+ SourceLocation lparenToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT CaseBlock: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(CaseBlock)
+
+ CaseBlock(CaseClauses *c, DefaultClause *d = 0, CaseClauses *r = 0):
+ clauses (c), defaultClause (d), moreClauses (r)
+ { kind = K; }
+
+ virtual ~CaseBlock() {}
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ CaseClauses *clauses;
+ DefaultClause *defaultClause;
+ CaseClauses *moreClauses;
+ SourceLocation lbraceToken;
+ SourceLocation rbraceToken;
+};
+
+class QML_PARSER_EXPORT SwitchStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(SwitchStatement)
+
+ SwitchStatement(ExpressionNode *e, CaseBlock *b):
+ expression (e), block (b)
+ { kind = K; }
+
+ virtual ~SwitchStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return switchToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return block->rbraceToken; }
+
+// attributes
+ ExpressionNode *expression;
+ CaseBlock *block;
+ SourceLocation switchToken;
+ SourceLocation lparenToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT CaseClauses: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(CaseClauses)
+
+ CaseClauses(CaseClause *c):
+ clause (c), next (this)
+ { kind = K; }
+
+ CaseClauses(CaseClauses *previous, CaseClause *c):
+ clause (c)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual ~CaseClauses() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ inline CaseClauses *finish ()
+ {
+ CaseClauses *front = next;
+ next = 0;
+ return front;
+ }
+
+//attributes
+ CaseClause *clause;
+ CaseClauses *next;
+};
+
+class QML_PARSER_EXPORT CaseClause: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(CaseClause)
+
+ CaseClause(ExpressionNode *e, StatementList *slist):
+ expression (e), statements (slist)
+ { kind = K; }
+
+ virtual ~CaseClause() {}
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ ExpressionNode *expression;
+ StatementList *statements;
+ SourceLocation caseToken;
+ SourceLocation colonToken;
+};
+
+class QML_PARSER_EXPORT DefaultClause: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(DefaultClause)
+
+ DefaultClause(StatementList *slist):
+ statements (slist)
+ { kind = K; }
+
+ virtual ~DefaultClause() {}
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ StatementList *statements;
+ SourceLocation defaultToken;
+ SourceLocation colonToken;
+};
+
+class QML_PARSER_EXPORT LabelledStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(LabelledStatement)
+
+ LabelledStatement(NameId *l, Statement *stmt):
+ label (l), statement (stmt)
+ { kind = K; }
+
+ virtual ~LabelledStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return identifierToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return statement->lastSourceLocation(); }
+
+// attributes
+ NameId *label;
+ Statement *statement;
+ SourceLocation identifierToken;
+ SourceLocation colonToken;
+};
+
+class QML_PARSER_EXPORT ThrowStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ThrowStatement)
+
+ ThrowStatement(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual ~ThrowStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return throwToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+ // attributes
+ ExpressionNode *expression;
+ SourceLocation throwToken;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT Catch: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(Catch)
+
+ Catch(NameId *n, Block *stmt):
+ name (n), statement (stmt)
+ { kind = K; }
+
+ virtual ~Catch() {}
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ NameId *name;
+ Block *statement;
+ SourceLocation catchToken;
+ SourceLocation lparenToken;
+ SourceLocation identifierToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT Finally: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(Finally)
+
+ Finally(Block *stmt):
+ statement (stmt)
+ { kind = K; }
+
+ virtual ~Finally() {}
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ Block *statement;
+ SourceLocation finallyToken;
+};
+
+class QML_PARSER_EXPORT TryStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(TryStatement)
+
+ TryStatement(Statement *stmt, Catch *c, Finally *f):
+ statement (stmt), catchExpression (c), finallyExpression (f)
+ { kind = K; }
+
+ TryStatement(Statement *stmt, Finally *f):
+ statement (stmt), catchExpression (0), finallyExpression (f)
+ { kind = K; }
+
+ TryStatement(Statement *stmt, Catch *c):
+ statement (stmt), catchExpression (c), finallyExpression (0)
+ { kind = K; }
+
+ virtual ~TryStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return tryToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ {
+ if (finallyExpression)
+ return finallyExpression->statement->rbraceToken;
+ else if (catchExpression)
+ return catchExpression->statement->rbraceToken;
+
+ return statement->lastSourceLocation();
+ }
+
+// attributes
+ Statement *statement;
+ Catch *catchExpression;
+ Finally *finallyExpression;
+ SourceLocation tryToken;
+};
+
+class QML_PARSER_EXPORT FunctionExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(FunctionExpression)
+
+ FunctionExpression(NameId *n, FormalParameterList *f, FunctionBody *b):
+ name (n), formals (f), body (b)
+ { kind = K; }
+
+ virtual ~FunctionExpression() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return functionToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return rbraceToken; }
+
+// attributes
+ NameId *name;
+ FormalParameterList *formals;
+ FunctionBody *body;
+ SourceLocation functionToken;
+ SourceLocation identifierToken;
+ SourceLocation lparenToken;
+ SourceLocation rparenToken;
+ SourceLocation lbraceToken;
+ SourceLocation rbraceToken;
+};
+
+class QML_PARSER_EXPORT FunctionDeclaration: public FunctionExpression
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(FunctionDeclaration)
+
+ FunctionDeclaration(NameId *n, FormalParameterList *f, FunctionBody *b):
+ FunctionExpression(n, f, b)
+ { kind = K; }
+
+ virtual ~FunctionDeclaration() {}
+
+ virtual void accept0(Visitor *visitor);
+};
+
+class QML_PARSER_EXPORT FormalParameterList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(FormalParameterList)
+
+ FormalParameterList(NameId *n):
+ name (n), next (this)
+ { kind = K; }
+
+ FormalParameterList(FormalParameterList *previous, NameId *n):
+ name (n)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual ~FormalParameterList() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ inline FormalParameterList *finish ()
+ {
+ FormalParameterList *front = next;
+ next = 0;
+ return front;
+ }
+
+// attributes
+ NameId *name;
+ FormalParameterList *next;
+ SourceLocation commaToken;
+ SourceLocation identifierToken;
+};
+
+class QML_PARSER_EXPORT FunctionBody: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(FunctionBody)
+
+ FunctionBody(SourceElements *elts):
+ elements (elts)
+ { kind = K; }
+
+ virtual ~FunctionBody() {}
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ SourceElements *elements;
+};
+
+class QML_PARSER_EXPORT Program: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(Program)
+
+ Program(SourceElements *elts):
+ elements (elts)
+ { kind = K; }
+
+ virtual ~Program() {}
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ SourceElements *elements;
+};
+
+class QML_PARSER_EXPORT SourceElements: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(SourceElements)
+
+ SourceElements(SourceElement *elt):
+ element (elt), next (this)
+ { kind = K; }
+
+ SourceElements(SourceElements *previous, SourceElement *elt):
+ element (elt)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual ~SourceElements() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ inline SourceElements *finish ()
+ {
+ SourceElements *front = next;
+ next = 0;
+ return front;
+ }
+
+// attributes
+ SourceElement *element;
+ SourceElements *next;
+};
+
+class QML_PARSER_EXPORT SourceElement: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(SourceElement)
+
+ inline SourceElement()
+ { kind = K; }
+
+ virtual ~SourceElement() {}
+};
+
+class QML_PARSER_EXPORT FunctionSourceElement: public SourceElement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(FunctionSourceElement)
+
+ FunctionSourceElement(FunctionDeclaration *f):
+ declaration (f)
+ { kind = K; }
+
+ virtual ~FunctionSourceElement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ FunctionDeclaration *declaration;
+};
+
+class QML_PARSER_EXPORT StatementSourceElement: public SourceElement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(StatementSourceElement)
+
+ StatementSourceElement(Statement *stmt):
+ statement (stmt)
+ { kind = K; }
+
+ virtual ~StatementSourceElement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ Statement *statement;
+};
+
+class QML_PARSER_EXPORT DebuggerStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(DebuggerStatement)
+
+ DebuggerStatement()
+ { kind = K; }
+
+ virtual ~DebuggerStatement() {}
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return debuggerToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+// attributes
+ SourceLocation debuggerToken;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT UiProgram: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiProgram)
+
+ UiProgram(UiImportList *imports, UiObjectMemberList *members)
+ : imports(imports), members(members)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ UiImportList *imports;
+ UiObjectMemberList *members;
+};
+
+class QML_PARSER_EXPORT UiQualifiedId: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiQualifiedId)
+
+ UiQualifiedId(NameId *name)
+ : next(this), name(name)
+ { kind = K; }
+
+ UiQualifiedId(UiQualifiedId *previous, NameId *name)
+ : name(name)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual ~UiQualifiedId() {}
+
+ UiQualifiedId *finish()
+ {
+ UiQualifiedId *head = next;
+ next = 0;
+ return head;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ UiQualifiedId *next;
+ NameId *name;
+ SourceLocation identifierToken;
+};
+
+class QML_PARSER_EXPORT UiImport: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiImport)
+
+ UiImport(NameId *fileName)
+ : fileName(fileName), importUri(0), importId(0)
+ { kind = K; }
+
+ UiImport(UiQualifiedId *uri)
+ : fileName(0), importUri(uri), importId(0)
+ { kind = K; }
+
+ virtual SourceLocation firstSourceLocation() const
+ { return importToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ NameId *fileName;
+ UiQualifiedId *importUri;
+ NameId *importId;
+ SourceLocation importToken;
+ SourceLocation fileNameToken;
+ SourceLocation versionToken;
+ SourceLocation asToken;
+ SourceLocation importIdToken;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT UiImportList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiImportList)
+
+ UiImportList(UiImport *import)
+ : import(import),
+ next(this)
+ { kind = K; }
+
+ UiImportList(UiImportList *previous, UiImport *import)
+ : import(import)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual SourceLocation firstSourceLocation() const
+ {
+ if (import) return import->firstSourceLocation();
+ else return SourceLocation();
+ }
+
+ virtual SourceLocation lastSourceLocation() const
+ {
+ for (const UiImportList *it = this; it; it = it->next)
+ if (!it->next && it->import)
+ return it->import->lastSourceLocation();
+
+ return SourceLocation();
+ }
+
+ UiImportList *finish()
+ {
+ UiImportList *head = next;
+ next = 0;
+ return head;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ UiImport *import;
+ UiImportList *next;
+};
+
+class QML_PARSER_EXPORT UiObjectMember: public Node
+{
+public:
+ virtual SourceLocation firstSourceLocation() const = 0;
+ virtual SourceLocation lastSourceLocation() const = 0;
+
+ virtual UiObjectMember *uiObjectMemberCast();
+};
+
+class QML_PARSER_EXPORT UiObjectMemberList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiObjectMemberList)
+
+ UiObjectMemberList(UiObjectMember *member)
+ : next(this), member(member)
+ { kind = K; }
+
+ UiObjectMemberList(UiObjectMemberList *previous, UiObjectMember *member)
+ : member(member)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+ UiObjectMemberList *finish()
+ {
+ UiObjectMemberList *head = next;
+ next = 0;
+ return head;
+ }
+
+// attributes
+ UiObjectMemberList *next;
+ UiObjectMember *member;
+};
+
+class QML_PARSER_EXPORT UiArrayMemberList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiArrayMemberList)
+
+ UiArrayMemberList(UiObjectMember *member)
+ : next(this), member(member)
+ { kind = K; }
+
+ UiArrayMemberList(UiArrayMemberList *previous, UiObjectMember *member)
+ : member(member)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+ UiArrayMemberList *finish()
+ {
+ UiArrayMemberList *head = next;
+ next = 0;
+ return head;
+ }
+
+// attributes
+ UiArrayMemberList *next;
+ UiObjectMember *member;
+ SourceLocation commaToken;
+};
+
+class QML_PARSER_EXPORT UiObjectInitializer: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiObjectInitializer)
+
+ UiObjectInitializer(UiObjectMemberList *members)
+ : members(members)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ SourceLocation lbraceToken;
+ UiObjectMemberList *members;
+ SourceLocation rbraceToken;
+};
+
+class QML_PARSER_EXPORT UiParameterList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiParameterList)
+
+ UiParameterList(NameId *t, NameId *n):
+ type (t), name (n), next (this)
+ { kind = K; }
+
+ UiParameterList(UiParameterList *previous, NameId *t, NameId *n):
+ type (t), name (n)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual ~UiParameterList() {}
+
+ virtual void accept0(Visitor *) {}
+
+ inline UiParameterList *finish ()
+ {
+ UiParameterList *front = next;
+ next = 0;
+ return front;
+ }
+
+// attributes
+ NameId *type;
+ NameId *name;
+ UiParameterList *next;
+ SourceLocation commaToken;
+ SourceLocation identifierToken;
+};
+
+class QML_PARSER_EXPORT UiPublicMember: public UiObjectMember
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiPublicMember)
+
+ UiPublicMember(NameId *memberType,
+ NameId *name)
+ : type(Property), typeModifier(0), memberType(memberType), name(name), expression(0), isDefaultMember(false), isReadonlyMember(false), parameters(0)
+ { kind = K; }
+
+ UiPublicMember(NameId *memberType,
+ NameId *name,
+ ExpressionNode *expression)
+ : type(Property), typeModifier(0), memberType(memberType), name(name), expression(expression), isDefaultMember(false), isReadonlyMember(false), parameters(0)
+ { kind = K; }
+
+ virtual SourceLocation firstSourceLocation() const
+ {
+ if (defaultToken.isValid())
+ return defaultToken;
+ else if (readonlyToken.isValid())
+ return readonlyToken;
+
+ return propertyToken;
+ }
+
+ virtual SourceLocation lastSourceLocation() const
+ {
+ return semicolonToken;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ enum { Signal, Property } type;
+ NameId *typeModifier;
+ NameId *memberType;
+ NameId *name;
+ ExpressionNode *expression;
+ bool isDefaultMember;
+ bool isReadonlyMember;
+ UiParameterList *parameters;
+ SourceLocation defaultToken;
+ SourceLocation readonlyToken;
+ SourceLocation propertyToken;
+ SourceLocation typeModifierToken;
+ SourceLocation typeToken;
+ SourceLocation identifierToken;
+ SourceLocation colonToken;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT UiObjectDefinition: public UiObjectMember
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiObjectDefinition)
+
+ UiObjectDefinition(UiQualifiedId *qualifiedTypeNameId,
+ UiObjectInitializer *initializer)
+ : qualifiedTypeNameId(qualifiedTypeNameId), initializer(initializer)
+ { kind = K; }
+
+ virtual SourceLocation firstSourceLocation() const
+ { return qualifiedTypeNameId->identifierToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return initializer->rbraceToken; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ UiQualifiedId *qualifiedTypeNameId;
+ UiObjectInitializer *initializer;
+};
+
+class QML_PARSER_EXPORT UiSourceElement: public UiObjectMember
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiSourceElement)
+
+ UiSourceElement(Node *sourceElement)
+ : sourceElement(sourceElement)
+ { kind = K; }
+
+ virtual SourceLocation firstSourceLocation() const
+ {
+ if (FunctionDeclaration *funDecl = cast<FunctionDeclaration *>(sourceElement))
+ return funDecl->firstSourceLocation();
+ else if (VariableStatement *varStmt = cast<VariableStatement *>(sourceElement))
+ return varStmt->firstSourceLocation();
+
+ return SourceLocation();
+ }
+
+ virtual SourceLocation lastSourceLocation() const
+ {
+ if (FunctionDeclaration *funDecl = cast<FunctionDeclaration *>(sourceElement))
+ return funDecl->lastSourceLocation();
+ else if (VariableStatement *varStmt = cast<VariableStatement *>(sourceElement))
+ return varStmt->lastSourceLocation();
+
+ return SourceLocation();
+ }
+
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ Node *sourceElement;
+};
+
+class QML_PARSER_EXPORT UiObjectBinding: public UiObjectMember
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiObjectBinding)
+
+ UiObjectBinding(UiQualifiedId *qualifiedId,
+ UiQualifiedId *qualifiedTypeNameId,
+ UiObjectInitializer *initializer)
+ : qualifiedId(qualifiedId),
+ qualifiedTypeNameId(qualifiedTypeNameId),
+ initializer(initializer),
+ hasOnToken(false)
+ { kind = K; }
+
+ virtual SourceLocation firstSourceLocation() const
+ {
+ if (hasOnToken && qualifiedTypeNameId)
+ return qualifiedTypeNameId->identifierToken;
+
+ return qualifiedId->identifierToken;
+ }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return initializer->rbraceToken; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ UiQualifiedId *qualifiedId;
+ UiQualifiedId *qualifiedTypeNameId;
+ UiObjectInitializer *initializer;
+ SourceLocation colonToken;
+ bool hasOnToken;
+};
+
+class QML_PARSER_EXPORT UiScriptBinding: public UiObjectMember
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiScriptBinding)
+
+ UiScriptBinding(UiQualifiedId *qualifiedId,
+ Statement *statement)
+ : qualifiedId(qualifiedId),
+ statement(statement)
+ { kind = K; }
+
+ virtual SourceLocation firstSourceLocation() const
+ { return qualifiedId->identifierToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return statement->lastSourceLocation(); }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ UiQualifiedId *qualifiedId;
+ Statement *statement;
+ SourceLocation colonToken;
+};
+
+class QML_PARSER_EXPORT UiArrayBinding: public UiObjectMember
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiArrayBinding)
+
+ UiArrayBinding(UiQualifiedId *qualifiedId,
+ UiArrayMemberList *members)
+ : qualifiedId(qualifiedId),
+ members(members)
+ { kind = K; }
+
+ virtual SourceLocation firstSourceLocation() const
+ { return qualifiedId->identifierToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return rbracketToken; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ UiQualifiedId *qualifiedId;
+ UiArrayMemberList *members;
+ SourceLocation colonToken;
+ SourceLocation lbracketToken;
+ SourceLocation rbracketToken;
+};
+
+} } // namespace AST
+
+
+
+QT_QML_END_NAMESPACE
+
+#endif
diff --git a/src/declarative/qml/parser/qdeclarativejsastfwd_p.h b/src/declarative/qml/parser/qdeclarativejsastfwd_p.h
new file mode 100644
index 0000000000..5a444b7e5f
--- /dev/null
+++ b/src/declarative/qml/parser/qdeclarativejsastfwd_p.h
@@ -0,0 +1,189 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEJSAST_FWD_P_H
+#define QDECLARATIVEJSAST_FWD_P_H
+
+#include "qdeclarativejsglobal_p.h"
+
+#include <QtCore/qglobal.h>
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS { namespace AST {
+
+class SourceLocation
+{
+public:
+ SourceLocation(quint32 offset = 0, quint32 length = 0, quint32 line = 0, quint32 column = 0)
+ : offset(offset), length(length),
+ startLine(line), startColumn(column)
+ { }
+
+ bool isValid() const { return length != 0; }
+
+ quint32 begin() const { return offset; }
+ quint32 end() const { return offset + length; }
+
+// attributes
+ // ### encode
+ quint32 offset;
+ quint32 length;
+ quint32 startLine;
+ quint32 startColumn;
+};
+
+class Visitor;
+class Node;
+class ExpressionNode;
+class Statement;
+class ThisExpression;
+class IdentifierExpression;
+class NullExpression;
+class TrueLiteral;
+class FalseLiteral;
+class NumericLiteral;
+class StringLiteral;
+class RegExpLiteral;
+class ArrayLiteral;
+class ObjectLiteral;
+class ElementList;
+class Elision;
+class PropertyNameAndValueList;
+class PropertyName;
+class IdentifierPropertyName;
+class StringLiteralPropertyName;
+class NumericLiteralPropertyName;
+class ArrayMemberExpression;
+class FieldMemberExpression;
+class NewMemberExpression;
+class NewExpression;
+class CallExpression;
+class ArgumentList;
+class PostIncrementExpression;
+class PostDecrementExpression;
+class DeleteExpression;
+class VoidExpression;
+class TypeOfExpression;
+class PreIncrementExpression;
+class PreDecrementExpression;
+class UnaryPlusExpression;
+class UnaryMinusExpression;
+class TildeExpression;
+class NotExpression;
+class BinaryExpression;
+class ConditionalExpression;
+class Expression; // ### rename
+class Block;
+class StatementList;
+class VariableStatement;
+class VariableDeclarationList;
+class VariableDeclaration;
+class EmptyStatement;
+class ExpressionStatement;
+class IfStatement;
+class DoWhileStatement;
+class WhileStatement;
+class ForStatement;
+class LocalForStatement;
+class ForEachStatement;
+class LocalForEachStatement;
+class ContinueStatement;
+class BreakStatement;
+class ReturnStatement;
+class WithStatement;
+class SwitchStatement;
+class CaseBlock;
+class CaseClauses;
+class CaseClause;
+class DefaultClause;
+class LabelledStatement;
+class ThrowStatement;
+class TryStatement;
+class Catch;
+class Finally;
+class FunctionDeclaration;
+class FunctionExpression;
+class FormalParameterList;
+class FunctionBody;
+class Program;
+class SourceElements;
+class SourceElement;
+class FunctionSourceElement;
+class StatementSourceElement;
+class DebuggerStatement;
+class NestedExpression;
+
+// ui elements
+class UiProgram;
+class UiImportList;
+class UiImport;
+class UiPublicMember;
+class UiObjectDefinition;
+class UiObjectInitializer;
+class UiObjectBinding;
+class UiScriptBinding;
+class UiSourceElement;
+class UiArrayBinding;
+class UiObjectMember;
+class UiObjectMemberList;
+class UiArrayMemberList;
+class UiQualifiedId;
+class UiFormalList;
+class UiFormal;
+class UiSignature;
+
+} } // namespace AST
+
+QT_QML_END_NAMESPACE
+
+#endif
diff --git a/src/declarative/qml/parser/qdeclarativejsastvisitor.cpp b/src/declarative/qml/parser/qdeclarativejsastvisitor.cpp
new file mode 100644
index 0000000000..d8002cfba7
--- /dev/null
+++ b/src/declarative/qml/parser/qdeclarativejsastvisitor.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativejsastvisitor_p.h"
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS { namespace AST {
+
+Visitor::Visitor()
+{
+}
+
+Visitor::~Visitor()
+{
+}
+
+} } // namespace QDeclarativeJS::AST
+
+QT_QML_END_NAMESPACE
diff --git a/src/declarative/qml/parser/qdeclarativejsastvisitor_p.h b/src/declarative/qml/parser/qdeclarativejsastvisitor_p.h
new file mode 100644
index 0000000000..82abbcf42a
--- /dev/null
+++ b/src/declarative/qml/parser/qdeclarativejsastvisitor_p.h
@@ -0,0 +1,335 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEJSASTVISITOR_P_H
+#define QDECLARATIVEJSASTVISITOR_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativejsastfwd_p.h"
+#include "qdeclarativejsglobal_p.h"
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS { namespace AST {
+
+class QML_PARSER_EXPORT Visitor
+{
+public:
+ Visitor();
+ virtual ~Visitor();
+
+ virtual bool preVisit(Node *) { return true; }
+ virtual void postVisit(Node *) {}
+
+ // Ui
+ virtual bool visit(UiProgram *) { return true; }
+ virtual bool visit(UiImportList *) { return true; }
+ virtual bool visit(UiImport *) { return true; }
+ virtual bool visit(UiPublicMember *) { return true; }
+ virtual bool visit(UiSourceElement *) { return true; }
+ virtual bool visit(UiObjectDefinition *) { return true; }
+ virtual bool visit(UiObjectInitializer *) { return true; }
+ virtual bool visit(UiObjectBinding *) { return true; }
+ virtual bool visit(UiScriptBinding *) { return true; }
+ virtual bool visit(UiArrayBinding *) { return true; }
+ virtual bool visit(UiObjectMemberList *) { return true; }
+ virtual bool visit(UiArrayMemberList *) { return true; }
+ virtual bool visit(UiQualifiedId *) { return true; }
+ virtual bool visit(UiSignature *) { return true; }
+ virtual bool visit(UiFormalList *) { return true; }
+ virtual bool visit(UiFormal *) { return true; }
+
+ virtual void endVisit(UiProgram *) {}
+ virtual void endVisit(UiImportList *) {}
+ virtual void endVisit(UiImport *) {}
+ virtual void endVisit(UiPublicMember *) {}
+ virtual void endVisit(UiSourceElement *) {}
+ virtual void endVisit(UiObjectDefinition *) {}
+ virtual void endVisit(UiObjectInitializer *) {}
+ virtual void endVisit(UiObjectBinding *) {}
+ virtual void endVisit(UiScriptBinding *) {}
+ virtual void endVisit(UiArrayBinding *) {}
+ virtual void endVisit(UiObjectMemberList *) {}
+ virtual void endVisit(UiArrayMemberList *) {}
+ virtual void endVisit(UiQualifiedId *) {}
+ virtual void endVisit(UiSignature *) {}
+ virtual void endVisit(UiFormalList *) {}
+ virtual void endVisit(UiFormal *) {}
+
+ // QDeclarativeJS
+ virtual bool visit(ThisExpression *) { return true; }
+ virtual void endVisit(ThisExpression *) {}
+
+ virtual bool visit(IdentifierExpression *) { return true; }
+ virtual void endVisit(IdentifierExpression *) {}
+
+ virtual bool visit(NullExpression *) { return true; }
+ virtual void endVisit(NullExpression *) {}
+
+ virtual bool visit(TrueLiteral *) { return true; }
+ virtual void endVisit(TrueLiteral *) {}
+
+ virtual bool visit(FalseLiteral *) { return true; }
+ virtual void endVisit(FalseLiteral *) {}
+
+ virtual bool visit(StringLiteral *) { return true; }
+ virtual void endVisit(StringLiteral *) {}
+
+ virtual bool visit(NumericLiteral *) { return true; }
+ virtual void endVisit(NumericLiteral *) {}
+
+ virtual bool visit(RegExpLiteral *) { return true; }
+ virtual void endVisit(RegExpLiteral *) {}
+
+ virtual bool visit(ArrayLiteral *) { return true; }
+ virtual void endVisit(ArrayLiteral *) {}
+
+ virtual bool visit(ObjectLiteral *) { return true; }
+ virtual void endVisit(ObjectLiteral *) {}
+
+ virtual bool visit(ElementList *) { return true; }
+ virtual void endVisit(ElementList *) {}
+
+ virtual bool visit(Elision *) { return true; }
+ virtual void endVisit(Elision *) {}
+
+ virtual bool visit(PropertyNameAndValueList *) { return true; }
+ virtual void endVisit(PropertyNameAndValueList *) {}
+
+ virtual bool visit(NestedExpression *) { return true; }
+ virtual void endVisit(NestedExpression *) {}
+
+ virtual bool visit(IdentifierPropertyName *) { return true; }
+ virtual void endVisit(IdentifierPropertyName *) {}
+
+ virtual bool visit(StringLiteralPropertyName *) { return true; }
+ virtual void endVisit(StringLiteralPropertyName *) {}
+
+ virtual bool visit(NumericLiteralPropertyName *) { return true; }
+ virtual void endVisit(NumericLiteralPropertyName *) {}
+
+ virtual bool visit(ArrayMemberExpression *) { return true; }
+ virtual void endVisit(ArrayMemberExpression *) {}
+
+ virtual bool visit(FieldMemberExpression *) { return true; }
+ virtual void endVisit(FieldMemberExpression *) {}
+
+ virtual bool visit(NewMemberExpression *) { return true; }
+ virtual void endVisit(NewMemberExpression *) {}
+
+ virtual bool visit(NewExpression *) { return true; }
+ virtual void endVisit(NewExpression *) {}
+
+ virtual bool visit(CallExpression *) { return true; }
+ virtual void endVisit(CallExpression *) {}
+
+ virtual bool visit(ArgumentList *) { return true; }
+ virtual void endVisit(ArgumentList *) {}
+
+ virtual bool visit(PostIncrementExpression *) { return true; }
+ virtual void endVisit(PostIncrementExpression *) {}
+
+ virtual bool visit(PostDecrementExpression *) { return true; }
+ virtual void endVisit(PostDecrementExpression *) {}
+
+ virtual bool visit(DeleteExpression *) { return true; }
+ virtual void endVisit(DeleteExpression *) {}
+
+ virtual bool visit(VoidExpression *) { return true; }
+ virtual void endVisit(VoidExpression *) {}
+
+ virtual bool visit(TypeOfExpression *) { return true; }
+ virtual void endVisit(TypeOfExpression *) {}
+
+ virtual bool visit(PreIncrementExpression *) { return true; }
+ virtual void endVisit(PreIncrementExpression *) {}
+
+ virtual bool visit(PreDecrementExpression *) { return true; }
+ virtual void endVisit(PreDecrementExpression *) {}
+
+ virtual bool visit(UnaryPlusExpression *) { return true; }
+ virtual void endVisit(UnaryPlusExpression *) {}
+
+ virtual bool visit(UnaryMinusExpression *) { return true; }
+ virtual void endVisit(UnaryMinusExpression *) {}
+
+ virtual bool visit(TildeExpression *) { return true; }
+ virtual void endVisit(TildeExpression *) {}
+
+ virtual bool visit(NotExpression *) { return true; }
+ virtual void endVisit(NotExpression *) {}
+
+ virtual bool visit(BinaryExpression *) { return true; }
+ virtual void endVisit(BinaryExpression *) {}
+
+ virtual bool visit(ConditionalExpression *) { return true; }
+ virtual void endVisit(ConditionalExpression *) {}
+
+ virtual bool visit(Expression *) { return true; }
+ virtual void endVisit(Expression *) {}
+
+ virtual bool visit(Block *) { return true; }
+ virtual void endVisit(Block *) {}
+
+ virtual bool visit(StatementList *) { return true; }
+ virtual void endVisit(StatementList *) {}
+
+ virtual bool visit(VariableStatement *) { return true; }
+ virtual void endVisit(VariableStatement *) {}
+
+ virtual bool visit(VariableDeclarationList *) { return true; }
+ virtual void endVisit(VariableDeclarationList *) {}
+
+ virtual bool visit(VariableDeclaration *) { return true; }
+ virtual void endVisit(VariableDeclaration *) {}
+
+ virtual bool visit(EmptyStatement *) { return true; }
+ virtual void endVisit(EmptyStatement *) {}
+
+ virtual bool visit(ExpressionStatement *) { return true; }
+ virtual void endVisit(ExpressionStatement *) {}
+
+ virtual bool visit(IfStatement *) { return true; }
+ virtual void endVisit(IfStatement *) {}
+
+ virtual bool visit(DoWhileStatement *) { return true; }
+ virtual void endVisit(DoWhileStatement *) {}
+
+ virtual bool visit(WhileStatement *) { return true; }
+ virtual void endVisit(WhileStatement *) {}
+
+ virtual bool visit(ForStatement *) { return true; }
+ virtual void endVisit(ForStatement *) {}
+
+ virtual bool visit(LocalForStatement *) { return true; }
+ virtual void endVisit(LocalForStatement *) {}
+
+ virtual bool visit(ForEachStatement *) { return true; }
+ virtual void endVisit(ForEachStatement *) {}
+
+ virtual bool visit(LocalForEachStatement *) { return true; }
+ virtual void endVisit(LocalForEachStatement *) {}
+
+ virtual bool visit(ContinueStatement *) { return true; }
+ virtual void endVisit(ContinueStatement *) {}
+
+ virtual bool visit(BreakStatement *) { return true; }
+ virtual void endVisit(BreakStatement *) {}
+
+ virtual bool visit(ReturnStatement *) { return true; }
+ virtual void endVisit(ReturnStatement *) {}
+
+ virtual bool visit(WithStatement *) { return true; }
+ virtual void endVisit(WithStatement *) {}
+
+ virtual bool visit(SwitchStatement *) { return true; }
+ virtual void endVisit(SwitchStatement *) {}
+
+ virtual bool visit(CaseBlock *) { return true; }
+ virtual void endVisit(CaseBlock *) {}
+
+ virtual bool visit(CaseClauses *) { return true; }
+ virtual void endVisit(CaseClauses *) {}
+
+ virtual bool visit(CaseClause *) { return true; }
+ virtual void endVisit(CaseClause *) {}
+
+ virtual bool visit(DefaultClause *) { return true; }
+ virtual void endVisit(DefaultClause *) {}
+
+ virtual bool visit(LabelledStatement *) { return true; }
+ virtual void endVisit(LabelledStatement *) {}
+
+ virtual bool visit(ThrowStatement *) { return true; }
+ virtual void endVisit(ThrowStatement *) {}
+
+ virtual bool visit(TryStatement *) { return true; }
+ virtual void endVisit(TryStatement *) {}
+
+ virtual bool visit(Catch *) { return true; }
+ virtual void endVisit(Catch *) {}
+
+ virtual bool visit(Finally *) { return true; }
+ virtual void endVisit(Finally *) {}
+
+ virtual bool visit(FunctionDeclaration *) { return true; }
+ virtual void endVisit(FunctionDeclaration *) {}
+
+ virtual bool visit(FunctionExpression *) { return true; }
+ virtual void endVisit(FunctionExpression *) {}
+
+ virtual bool visit(FormalParameterList *) { return true; }
+ virtual void endVisit(FormalParameterList *) {}
+
+ virtual bool visit(FunctionBody *) { return true; }
+ virtual void endVisit(FunctionBody *) {}
+
+ virtual bool visit(Program *) { return true; }
+ virtual void endVisit(Program *) {}
+
+ virtual bool visit(SourceElements *) { return true; }
+ virtual void endVisit(SourceElements *) {}
+
+ virtual bool visit(FunctionSourceElement *) { return true; }
+ virtual void endVisit(FunctionSourceElement *) {}
+
+ virtual bool visit(StatementSourceElement *) { return true; }
+ virtual void endVisit(StatementSourceElement *) {}
+
+ virtual bool visit(DebuggerStatement *) { return true; }
+ virtual void endVisit(DebuggerStatement *) {}
+};
+
+} } // namespace AST
+
+QT_QML_END_NAMESPACE
+
+#endif // QDECLARATIVEJSASTVISITOR_P_H
diff --git a/src/declarative/qml/parser/qdeclarativejsengine_p.cpp b/src/declarative/qml/parser/qdeclarativejsengine_p.cpp
new file mode 100644
index 0000000000..7d39134f05
--- /dev/null
+++ b/src/declarative/qml/parser/qdeclarativejsengine_p.cpp
@@ -0,0 +1,212 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativejsengine_p.h"
+
+#include "qdeclarativejsglobal_p.h"
+#include "qdeclarativejsnodepool_p.h"
+
+#include <qnumeric.h>
+#include <QHash>
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS {
+
+uint qHash(const QDeclarativeJS::NameId &id)
+{ return qHash(id.asString()); }
+
+QString numberToString(double value)
+{ return QString::number(value); }
+
+int Ecma::RegExp::flagFromChar(const QChar &ch)
+{
+ static QHash<QChar, int> flagsHash;
+ if (flagsHash.isEmpty()) {
+ flagsHash[QLatin1Char('g')] = Global;
+ flagsHash[QLatin1Char('i')] = IgnoreCase;
+ flagsHash[QLatin1Char('m')] = Multiline;
+ }
+ QHash<QChar, int>::const_iterator it;
+ it = flagsHash.constFind(ch);
+ if (it == flagsHash.constEnd())
+ return 0;
+ return it.value();
+}
+
+QString Ecma::RegExp::flagsToString(int flags)
+{
+ QString result;
+ if (flags & Global)
+ result += QLatin1Char('g');
+ if (flags & IgnoreCase)
+ result += QLatin1Char('i');
+ if (flags & Multiline)
+ result += QLatin1Char('m');
+ return result;
+}
+
+NodePool::NodePool(const QString &fileName, Engine *engine)
+ : m_fileName(fileName), m_engine(engine)
+{
+ m_engine->setNodePool(this);
+}
+
+NodePool::~NodePool()
+{
+}
+
+Code *NodePool::createCompiledCode(AST::Node *, CompilationUnit &)
+{
+ Q_ASSERT(0);
+ return 0;
+}
+
+static int toDigit(char c)
+{
+ if ((c >= '0') && (c <= '9'))
+ return c - '0';
+ else if ((c >= 'a') && (c <= 'z'))
+ return 10 + c - 'a';
+ else if ((c >= 'A') && (c <= 'Z'))
+ return 10 + c - 'A';
+ return -1;
+}
+
+double integerFromString(const char *buf, int size, int radix)
+{
+ if (size == 0)
+ return qSNaN();
+
+ double sign = 1.0;
+ int i = 0;
+ if (buf[0] == '+') {
+ ++i;
+ } else if (buf[0] == '-') {
+ sign = -1.0;
+ ++i;
+ }
+
+ if (((size-i) >= 2) && (buf[i] == '0')) {
+ if (((buf[i+1] == 'x') || (buf[i+1] == 'X'))
+ && (radix < 34)) {
+ if ((radix != 0) && (radix != 16))
+ return 0;
+ radix = 16;
+ i += 2;
+ } else {
+ if (radix == 0) {
+ radix = 8;
+ ++i;
+ }
+ }
+ } else if (radix == 0) {
+ radix = 10;
+ }
+
+ int j = i;
+ for ( ; i < size; ++i) {
+ int d = toDigit(buf[i]);
+ if ((d == -1) || (d >= radix))
+ break;
+ }
+ double result;
+ if (j == i) {
+ if (!qstrcmp(buf, "Infinity"))
+ result = qInf();
+ else
+ result = qSNaN();
+ } else {
+ result = 0;
+ double multiplier = 1;
+ for (--i ; i >= j; --i, multiplier *= radix)
+ result += toDigit(buf[i]) * multiplier;
+ }
+ result *= sign;
+ return result;
+}
+
+double integerFromString(const QString &str, int radix)
+{
+ QByteArray ba = str.trimmed().toLatin1();
+ return integerFromString(ba.constData(), ba.size(), radix);
+}
+
+
+Engine::Engine()
+ : _lexer(0), _nodePool(0)
+{ }
+
+Engine::~Engine()
+{ }
+
+QSet<NameId> Engine::literals() const
+{ return _literals; }
+
+void Engine::addComment(int pos, int len, int line, int col)
+{ if (len > 0) _comments.append(QDeclarativeJS::AST::SourceLocation(pos, len, line, col)); }
+
+QList<QDeclarativeJS::AST::SourceLocation> Engine::comments() const
+{ return _comments; }
+
+NameId *Engine::intern(const QChar *u, int s)
+{ return const_cast<NameId *>(&*_literals.insert(NameId(u, s))); }
+
+QString Engine::toString(NameId *id)
+{ return id->asString(); }
+
+Lexer *Engine::lexer() const
+{ return _lexer; }
+
+void Engine::setLexer(Lexer *lexer)
+{ _lexer = lexer; }
+
+NodePool *Engine::nodePool() const
+{ return _nodePool; }
+
+void Engine::setNodePool(NodePool *nodePool)
+{ _nodePool = nodePool; }
+
+
+
+} // end of namespace QDeclarativeJS
+
+QT_QML_END_NAMESPACE
diff --git a/src/declarative/qml/parser/qdeclarativejsengine_p.h b/src/declarative/qml/parser/qdeclarativejsengine_p.h
new file mode 100644
index 0000000000..61188f7d03
--- /dev/null
+++ b/src/declarative/qml/parser/qdeclarativejsengine_p.h
@@ -0,0 +1,173 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEJSENGINE_P_H
+#define QDECLARATIVEJSENGINE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativejsglobal_p.h"
+#include "qdeclarativejsastfwd_p.h"
+
+#include <QString>
+#include <QSet>
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS {
+class QML_PARSER_EXPORT NameId
+{
+ QString _text;
+
+public:
+ NameId(const QChar *u, int s)
+ : _text(u, s)
+ { }
+
+ const QString asString() const
+ { return _text; }
+
+ bool operator == (const NameId &other) const
+ { return _text == other._text; }
+
+ bool operator != (const NameId &other) const
+ { return _text != other._text; }
+
+ bool operator < (const NameId &other) const
+ { return _text < other._text; }
+};
+
+uint qHash(const QDeclarativeJS::NameId &id);
+
+} // end of namespace QDeclarativeJS
+
+#if defined(Q_CC_MSVC) && _MSC_VER <= 1300
+//this ensures that code outside QDeclarativeJS can use the hash function
+//it also a workaround for some compilers
+inline uint qHash(const QDeclarativeJS::NameId &nameId) { return QDeclarativeJS::qHash(nameId); }
+#endif
+
+namespace QDeclarativeJS {
+
+class Lexer;
+class NodePool;
+
+namespace Ecma {
+
+class QML_PARSER_EXPORT RegExp
+{
+public:
+ enum RegExpFlag {
+ Global = 0x01,
+ IgnoreCase = 0x02,
+ Multiline = 0x04
+ };
+
+public:
+ static int flagFromChar(const QChar &);
+ static QString flagsToString(int flags);
+};
+
+} // end of namespace Ecma
+
+class QML_PARSER_EXPORT DiagnosticMessage
+{
+public:
+ enum Kind { Warning, Error };
+
+ DiagnosticMessage()
+ : kind(Error) {}
+
+ DiagnosticMessage(Kind kind, const AST::SourceLocation &loc, const QString &message)
+ : kind(kind), loc(loc), message(message) {}
+
+ bool isWarning() const
+ { return kind == Warning; }
+
+ bool isError() const
+ { return kind == Error; }
+
+ Kind kind;
+ AST::SourceLocation loc;
+ QString message;
+};
+
+class QML_PARSER_EXPORT Engine
+{
+ Lexer *_lexer;
+ NodePool *_nodePool;
+ QSet<NameId> _literals;
+ QList<QDeclarativeJS::AST::SourceLocation> _comments;
+
+public:
+ Engine();
+ ~Engine();
+
+ QSet<NameId> literals() const;
+
+ void addComment(int pos, int len, int line, int col);
+ QList<QDeclarativeJS::AST::SourceLocation> comments() const;
+
+ NameId *intern(const QChar *u, int s);
+
+ static QString toString(NameId *id);
+
+ Lexer *lexer() const;
+ void setLexer(Lexer *lexer);
+
+ NodePool *nodePool() const;
+ void setNodePool(NodePool *nodePool);
+};
+
+} // end of namespace QDeclarativeJS
+
+QT_QML_END_NAMESPACE
+
+#endif // QDECLARATIVEJSENGINE_P_H
diff --git a/src/declarative/qml/parser/qdeclarativejsglobal_p.h b/src/declarative/qml/parser/qdeclarativejsglobal_p.h
new file mode 100644
index 0000000000..7c901aeb0d
--- /dev/null
+++ b/src/declarative/qml/parser/qdeclarativejsglobal_p.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef QDECLARATIVEJSGLOBAL_P_H
+#define QDECLARATIVEJSGLOBAL_P_H
+
+#include <QtCore/qglobal.h>
+
+#ifdef QT_CREATOR
+# define QT_QML_BEGIN_NAMESPACE
+# define QT_QML_END_NAMESPACE
+
+# ifdef QDECLARATIVEJS_BUILD_DIR
+# define QML_PARSER_EXPORT Q_DECL_EXPORT
+# elif QML_BUILD_STATIC_LIB
+# define QML_PARSER_EXPORT
+# else
+# define QML_PARSER_EXPORT Q_DECL_IMPORT
+# endif // QDECLARATIVEJS_BUILD_DIR
+
+#else // !QT_CREATOR
+# define QT_QML_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
+# define QT_QML_END_NAMESPACE QT_END_NAMESPACE
+# define QML_PARSER_EXPORT
+#endif // QT_CREATOR
+
+#endif // QDECLARATIVEJSGLOBAL_P_H
diff --git a/src/declarative/qml/parser/qdeclarativejsgrammar.cpp b/src/declarative/qml/parser/qdeclarativejsgrammar.cpp
new file mode 100644
index 0000000000..89493ff7a1
--- /dev/null
+++ b/src/declarative/qml/parser/qdeclarativejsgrammar.cpp
@@ -0,0 +1,992 @@
+/****************************************************************************
+**
+** 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 QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// This file was generated by qlalr - DO NOT EDIT!
+#include "qdeclarativejsgrammar_p.h"
+
+QT_BEGIN_NAMESPACE
+
+const char *const QDeclarativeJSGrammar::spell [] = {
+ "end of file", "&", "&&", "&=", "break", "case", "catch", ":", ";", "continue",
+ "default", "delete", "/", "/=", "do", ".", "else", "=", "==", "===",
+ "finally", "for", "function", ">=", ">", ">>", ">>=", ">>>", ">>>=", "identifier",
+ "if", "in", "instanceof", "{", "[", "<=", "(", "<", "<<", "<<=",
+ "-", "-=", "--", "new", "!", "!=", "!==", "numeric literal", "|", "|=",
+ "||", "+", "+=", "++", "?", "}", "]", "%", "%=", "return",
+ ")", ";", 0, "*", "*=", "string literal", "property", "signal", "readonly", "switch",
+ "this", "throw", "~", "try", "typeof", "var", "void", "while", "with", "^",
+ "^=", "null", "true", "false", "const", "debugger", "reserved word", "multiline string literal", "comment", "public",
+ "import", "as", "on", 0, 0, 0, 0, 0, 0, 0,
+ 0};
+
+const short QDeclarativeJSGrammar::lhs [] = {
+ 101, 101, 101, 101, 101, 101, 102, 108, 108, 111,
+ 111, 113, 112, 112, 112, 112, 112, 112, 112, 112,
+ 115, 110, 109, 118, 118, 119, 119, 120, 120, 117,
+ 106, 106, 106, 106, 106, 106, 106, 106, 126, 126,
+ 126, 127, 127, 128, 128, 106, 106, 106, 106, 106,
+ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
+ 106, 106, 106, 116, 116, 116, 116, 116, 131, 131,
+ 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
+ 131, 131, 131, 131, 131, 131, 121, 133, 133, 133,
+ 133, 132, 132, 135, 135, 137, 137, 137, 137, 137,
+ 137, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 139, 139, 114, 114, 114, 114, 114, 142,
+ 142, 143, 143, 143, 143, 141, 141, 144, 144, 145,
+ 145, 146, 146, 146, 147, 147, 147, 147, 147, 147,
+ 147, 147, 147, 147, 148, 148, 148, 148, 149, 149,
+ 149, 150, 150, 150, 150, 151, 151, 151, 151, 151,
+ 151, 151, 152, 152, 152, 152, 152, 152, 153, 153,
+ 153, 153, 153, 154, 154, 154, 154, 154, 155, 155,
+ 156, 156, 157, 157, 158, 158, 159, 159, 160, 160,
+ 161, 161, 162, 162, 163, 163, 164, 164, 165, 165,
+ 166, 166, 136, 136, 167, 167, 168, 168, 168, 168,
+ 168, 168, 168, 168, 168, 168, 168, 168, 104, 104,
+ 169, 169, 170, 170, 171, 171, 103, 103, 103, 103,
+ 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
+ 103, 122, 183, 183, 182, 182, 130, 130, 184, 184,
+ 185, 185, 187, 187, 186, 188, 191, 189, 189, 192,
+ 190, 190, 123, 124, 124, 125, 125, 172, 172, 172,
+ 172, 172, 172, 172, 173, 173, 173, 173, 174, 174,
+ 174, 174, 175, 175, 176, 178, 193, 193, 196, 196,
+ 194, 194, 197, 195, 177, 177, 177, 179, 179, 180,
+ 180, 180, 198, 199, 181, 181, 129, 140, 203, 203,
+ 200, 200, 201, 201, 204, 107, 205, 205, 105, 105,
+ 202, 202, 134, 134, 206};
+
+const short QDeclarativeJSGrammar::rhs [] = {
+ 2, 2, 2, 2, 2, 2, 2, 1, 1, 1,
+ 2, 1, 2, 2, 3, 3, 5, 5, 4, 4,
+ 2, 0, 1, 1, 2, 1, 3, 2, 3, 2,
+ 1, 5, 4, 4, 3, 3, 3, 3, 1, 1,
+ 1, 0, 1, 2, 4, 6, 6, 3, 3, 7,
+ 7, 4, 4, 5, 5, 6, 6, 7, 7, 7,
+ 7, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 3, 4, 5, 3, 4, 3, 1, 1, 2, 3,
+ 4, 1, 2, 3, 5, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 4, 3, 5, 1,
+ 2, 4, 4, 4, 3, 0, 1, 1, 3, 1,
+ 1, 1, 2, 2, 1, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 1, 3, 3, 3, 1, 3,
+ 3, 1, 3, 3, 3, 1, 3, 3, 3, 3,
+ 3, 3, 1, 3, 3, 3, 3, 3, 1, 3,
+ 3, 3, 3, 1, 3, 3, 3, 3, 1, 3,
+ 1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
+ 1, 3, 1, 3, 1, 3, 1, 3, 1, 5,
+ 1, 5, 1, 3, 1, 3, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
+ 0, 1, 1, 3, 0, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 3, 1, 2, 0, 1, 3, 3, 1, 1,
+ 1, 3, 1, 3, 2, 2, 2, 0, 1, 2,
+ 0, 1, 1, 2, 2, 7, 5, 7, 7, 5,
+ 9, 10, 7, 8, 2, 2, 3, 3, 2, 2,
+ 3, 3, 3, 3, 5, 5, 3, 5, 1, 2,
+ 0, 1, 4, 3, 3, 3, 3, 3, 3, 3,
+ 3, 4, 5, 2, 2, 2, 8, 8, 1, 3,
+ 0, 1, 0, 1, 1, 1, 1, 2, 1, 1,
+ 0, 1, 0, 1, 2};
+
+const short QDeclarativeJSGrammar::action_default [] = {
+ 0, 0, 0, 0, 0, 0, 22, 0, 172, 239,
+ 203, 211, 207, 151, 223, 199, 3, 136, 70, 152,
+ 215, 219, 140, 169, 150, 155, 135, 189, 176, 0,
+ 77, 78, 73, 341, 64, 343, 0, 0, 0, 0,
+ 75, 0, 0, 71, 74, 68, 0, 0, 65, 67,
+ 66, 76, 69, 0, 72, 0, 0, 165, 0, 0,
+ 152, 171, 154, 153, 0, 0, 0, 167, 168, 166,
+ 170, 0, 200, 0, 0, 0, 0, 190, 0, 0,
+ 0, 0, 0, 0, 180, 0, 0, 0, 174, 175,
+ 173, 178, 182, 181, 179, 177, 192, 191, 193, 0,
+ 208, 0, 204, 0, 0, 146, 133, 145, 134, 102,
+ 103, 104, 129, 105, 130, 106, 107, 108, 109, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118, 131, 119,
+ 120, 121, 122, 123, 124, 125, 126, 127, 128, 132,
+ 0, 0, 144, 240, 147, 0, 148, 0, 149, 143,
+ 0, 236, 229, 227, 234, 235, 233, 232, 238, 231,
+ 230, 228, 237, 224, 0, 212, 0, 0, 216, 0,
+ 0, 220, 0, 0, 146, 138, 0, 137, 0, 142,
+ 156, 0, 342, 331, 332, 0, 329, 0, 330, 0,
+ 333, 247, 254, 253, 261, 249, 0, 250, 334, 0,
+ 340, 251, 252, 257, 255, 337, 335, 339, 258, 0,
+ 269, 0, 0, 0, 0, 341, 64, 0, 343, 65,
+ 241, 283, 66, 0, 0, 0, 270, 0, 0, 259,
+ 260, 0, 248, 256, 284, 285, 328, 338, 0, 299,
+ 300, 301, 302, 0, 295, 296, 297, 298, 325, 326,
+ 0, 0, 0, 0, 0, 288, 289, 245, 243, 205,
+ 213, 209, 225, 201, 246, 0, 152, 217, 221, 194,
+ 183, 0, 0, 202, 0, 0, 0, 0, 195, 0,
+ 0, 0, 0, 0, 187, 185, 188, 186, 184, 197,
+ 196, 198, 0, 210, 0, 206, 0, 244, 152, 0,
+ 226, 241, 242, 0, 241, 0, 0, 291, 0, 0,
+ 0, 293, 0, 214, 0, 0, 218, 0, 0, 222,
+ 281, 0, 273, 282, 276, 0, 280, 0, 241, 274,
+ 0, 241, 0, 0, 292, 0, 0, 0, 294, 342,
+ 331, 0, 0, 333, 0, 327, 0, 317, 0, 0,
+ 0, 287, 0, 286, 0, 344, 0, 101, 263, 266,
+ 0, 102, 269, 105, 130, 107, 108, 73, 112, 113,
+ 64, 114, 117, 71, 74, 65, 241, 66, 76, 120,
+ 69, 122, 72, 124, 125, 270, 127, 128, 132, 0,
+ 94, 0, 0, 96, 100, 98, 85, 97, 99, 0,
+ 95, 84, 264, 262, 140, 141, 146, 0, 139, 0,
+ 316, 0, 303, 304, 0, 315, 0, 0, 0, 306,
+ 311, 309, 312, 0, 0, 310, 311, 0, 307, 0,
+ 308, 265, 314, 0, 265, 313, 0, 318, 319, 0,
+ 265, 320, 321, 0, 0, 322, 0, 0, 0, 323,
+ 324, 158, 157, 0, 0, 0, 290, 0, 0, 0,
+ 305, 278, 271, 0, 279, 275, 0, 277, 267, 0,
+ 268, 272, 88, 0, 0, 92, 79, 0, 81, 90,
+ 0, 82, 91, 93, 83, 89, 80, 0, 86, 162,
+ 160, 164, 161, 159, 163, 6, 336, 4, 2, 62,
+ 87, 0, 0, 65, 67, 66, 31, 5, 0, 63,
+ 0, 41, 40, 39, 0, 0, 54, 0, 55, 0,
+ 60, 61, 0, 41, 0, 0, 0, 0, 0, 50,
+ 51, 0, 52, 0, 53, 0, 56, 57, 0, 0,
+ 0, 0, 0, 58, 59, 0, 48, 42, 49, 43,
+ 0, 0, 0, 0, 45, 0, 46, 47, 44, 0,
+ 0, 0, 30, 35, 36, 37, 38, 140, 265, 0,
+ 0, 102, 269, 105, 130, 107, 108, 73, 112, 113,
+ 64, 114, 117, 71, 74, 65, 241, 66, 76, 120,
+ 69, 122, 72, 124, 125, 270, 127, 128, 132, 140,
+ 0, 26, 0, 0, 32, 27, 33, 28, 24, 0,
+ 29, 25, 0, 34, 8, 0, 10, 0, 9, 0,
+ 1, 21, 12, 0, 13, 0, 14, 0, 19, 20,
+ 0, 15, 16, 0, 17, 18, 11, 23, 7, 345};
+
+const short QDeclarativeJSGrammar::goto_default [] = {
+ 7, 620, 207, 196, 205, 507, 495, 619, 638, 614,
+ 618, 616, 621, 22, 617, 18, 506, 609, 600, 562,
+ 508, 191, 195, 197, 201, 524, 550, 549, 200, 232,
+ 26, 474, 473, 356, 355, 9, 354, 357, 107, 17,
+ 145, 24, 13, 144, 19, 25, 57, 23, 8, 28,
+ 27, 269, 15, 263, 10, 259, 12, 261, 11, 260,
+ 20, 267, 21, 268, 14, 262, 258, 299, 411, 264,
+ 265, 202, 193, 192, 204, 233, 203, 208, 229, 230,
+ 194, 360, 359, 231, 463, 462, 321, 322, 465, 324,
+ 464, 323, 419, 423, 426, 422, 421, 441, 442, 185,
+ 199, 181, 184, 198, 206, 0};
+
+const short QDeclarativeJSGrammar::action_index [] = {
+ 314, 1273, 2404, 2404, 2307, 1001, 58, 98, 78, -101,
+ 95, 56, 4, 236, -101, 296, 86, -101, -101, 545,
+ 97, 115, 162, 197, -101, -101, -101, 447, 192, 1273,
+ -101, -101, -101, 369, -101, 2113, 1919, 1273, 1273, 1273,
+ -101, 732, 1273, -101, -101, -101, 1273, 1273, -101, -101,
+ -101, -101, -101, 1273, -101, 1273, 1273, -101, 1273, 1273,
+ 81, 195, -101, -101, 1273, 1273, 1273, -101, -101, -101,
+ 185, 1273, 283, 1273, 1273, 1273, 1273, 447, 1273, 1273,
+ 1273, 1273, 1273, 1273, 297, 1273, 1273, 1273, 107, 85,
+ 116, 297, 297, 297, 297, 191, 447, 447, 447, 1273,
+ 74, 1273, 102, 2016, 1273, 1273, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ 112, 1273, -101, -101, 92, 61, -101, 1273, -101, -101,
+ 1273, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, 1273, 36, 1273, 1273, 65, 62,
+ 1273, -101, 2016, 1273, 1273, -101, 127, -101, 42, -101,
+ -101, 57, -101, 294, 60, 35, -101, 259, -101, 32,
+ 2404, -101, -101, -101, -101, -101, 200, -101, -101, 33,
+ -101, -101, -101, -101, -101, -101, 2404, -101, -101, 436,
+ -101, 433, 100, 2307, 34, 369, 67, 45, 2598, 71,
+ 1273, -101, 72, 51, 1273, 59, -101, 54, 55, -101,
+ -101, 324, -101, -101, -101, -101, -101, -101, 88, -101,
+ -101, -101, -101, 76, -101, -101, -101, -101, -101, -101,
+ 5, 49, 1273, 104, 84, -101, -101, 1457, -101, 70,
+ 41, 1, -101, 287, 68, 46, 643, 73, 77, 364,
+ 297, 369, 1273, 238, 1273, 1273, 1273, 1273, 341, 1273,
+ 1273, 1273, 1273, 1273, 297, 175, 167, 161, 176, 348,
+ 315, 331, 1273, -13, 1273, 63, 1273, -101, 545, 1273,
+ -101, 1273, 64, 40, 1273, 2, 2307, -101, 1273, 152,
+ 2307, -101, 1273, 69, 1273, 1273, 75, 79, 1273, -101,
+ 44, 149, 66, -101, -101, 1273, -101, 369, 1273, -101,
+ 52, 1273, -54, 2307, -101, 1273, 151, 2307, -101, -29,
+ 369, -41, -11, 2404, -46, -101, 2307, -101, 1273, 131,
+ 2307, -5, 2307, -101, 8, 13, -55, -101, -101, 2307,
+ -51, 360, -2, 352, 119, 1273, 2307, 39, -19, 366,
+ 3, -24, 910, 6, 7, -101, 1367, -101, 11, -16,
+ -4, 1273, -6, -31, 1273, 9, 1273, -12, 17, 1273,
+ -101, 2210, 37, -101, -101, -101, -101, -101, -101, 1273,
+ -101, -101, -101, -101, 258, -101, 1273, -15, -101, 2307,
+ -101, 117, -101, -101, 2307, -101, 1273, 106, 16, -101,
+ 38, -101, 135, 96, 1273, -101, 135, 43, -101, 18,
+ -101, 2307, -101, 101, 2307, -101, 179, -101, -101, 99,
+ 2307, 31, -101, -7, -8, -101, 369, -34, -1, -101,
+ -101, -101, -101, 1273, 124, 2307, -101, 1273, 122, 2307,
+ -101, 25, -101, 207, -101, -101, 1273, -101, -101, 290,
+ -101, -101, -101, 114, 1733, -101, -101, 1826, -101, -101,
+ 1550, -101, -101, -101, -101, -101, -101, 103, -101, -101,
+ -101, -101, -101, -101, -101, -101, 2404, -101, -101, -101,
+ 221, -43, 704, 164, -26, 12, -101, -101, 188, -101,
+ 196, -101, -101, -101, 369, 183, -101, 1273, -101, 165,
+ -101, -101, 170, 0, 369, 160, 10, 369, 113, -101,
+ -101, 215, -101, 1273, -101, 225, -101, -101, 203, 369,
+ 28, 1273, 229, -101, -101, 202, -101, 218, -101, 30,
+ -21, 369, 199, 278, -101, 110, -101, -101, -101, 1640,
+ 1092, 583, -101, -101, -101, -101, -101, 284, 2501, 1919,
+ 14, 388, 29, 424, 93, 1273, 2307, 39, -9, 338,
+ 21, -3, 821, 24, 23, -101, 1367, -101, 48, 20,
+ 47, 1273, 50, 26, 1273, 53, 1273, 27, 22, 264,
+ 120, -101, 15, 813, -101, -101, -101, -101, -101, 1183,
+ -101, -101, 19, -101, -101, 498, -101, 249, -82, 902,
+ -101, -101, 118, 369, -101, 204, -101, 80, -101, -101,
+ 369, -101, -101, 82, -101, -101, -101, -101, -101, -101,
+
+ -106, 17, -83, 19, 24, 228, -106, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, -49,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, 101,
+ -106, -106, -106, 2, -106, -106, -2, 29, 107, 166,
+ -106, 204, 183, -106, -106, -106, 174, 169, -106, -106,
+ -106, -106, -106, 145, -106, 141, 137, -106, 152, 161,
+ -106, -106, -106, -106, 163, 158, 157, -106, -106, -106,
+ -106, 132, -106, 142, 138, 187, 178, -106, 167, 181,
+ 81, 82, 85, 83, -106, 93, 114, 96, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, 170,
+ -106, 74, -106, 109, 80, 51, -106, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, 25, -106, -106, -106, -106, -106, 41, -106, -106,
+ 50, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, -106, -106, 98, -106, 104, 43, -106, -106,
+ 42, -106, 221, 64, 117, -106, -106, -106, -106, -106,
+ -106, -106, -106, 54, -106, -106, -106, 55, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106, 47, -106, -106, 38,
+ -106, 33, -106, 92, -106, 73, -106, -106, 88, -106,
+ 86, -106, -106, -106, 94, 23, -106, -106, -106, -106,
+ -106, -11, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, 22, -106, -106, -106, -106, 105, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, 7, 235, -106, 249, 219, 216, 222, -106, 124,
+ 125, 123, 122, 116, -106, -106, -106, -106, -106, -106,
+ -106, -106, 191, -106, 232, -106, 225, -106, -106, 231,
+ -106, 156, -106, -106, 130, -106, 91, -106, 5, -106,
+ 8, -106, 233, -106, 200, 189, -106, -106, 198, -106,
+ -106, -106, -106, -106, -106, 245, -106, 108, 95, -106,
+ -106, 298, -106, 195, -106, 89, -106, 71, -106, -106,
+ 120, -106, -106, -5, -106, -106, 52, -106, 53, -106,
+ 56, -106, 60, -106, -106, -106, -106, -106, -106, 39,
+ -106, 37, -106, 49, -106, 133, 69, -106, -106, 59,
+ -106, -106, 102, -106, -106, -106, 79, -106, -106, -106,
+ -106, 62, -106, 45, 67, -106, 75, -106, -106, 44,
+ -106, 1, -106, -106, -106, -106, -106, -106, -106, 46,
+ -106, -106, -106, -106, -106, -106, 115, -106, -106, 66,
+ -106, -106, -106, -106, 70, -106, 77, -106, -106, -106,
+ -106, -106, -9, -106, 72, -106, -38, -106, -106, -106,
+ -106, 97, -106, -106, 99, -106, -106, -106, -106, -106,
+ 40, -51, -106, -106, 36, -106, 34, -106, 63, -106,
+ -106, -106, -106, 35, -106, 48, -106, 58, -106, 57,
+ -106, -106, -106, -106, -106, -106, 28, -106, -106, 90,
+ -106, -106, -106, -106, 65, -106, -106, 159, -106, -106,
+ 61, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106, 87, -106, -106, -106,
+ -106, -106, -13, -106, -106, -106, -106, -106, -106, -106,
+ -18, -106, -106, -106, -10, -106, -106, 0, -106, -106,
+ -106, -106, -106, -106, -4, -12, -106, -6, -106, -106,
+ -106, -106, -106, 3, -106, -106, -106, -106, -23, -14,
+ -106, 11, -106, -106, -106, -106, -106, 15, -106, -106,
+ -106, 16, 18, 14, -106, -106, -106, -106, -106, 292,
+ 399, 180, -106, -106, -106, -106, -106, -106, 26, 286,
+ 20, 21, -106, 30, -106, 177, 10, -106, -106, 31,
+ -106, -106, 193, -106, -106, -106, 32, -106, -106, -106,
+ -106, 27, -106, 13, 76, -106, 68, -106, -106, -106,
+ -106, -106, -106, 230, -106, -106, -106, -106, -106, 290,
+ -106, -106, -3, -106, -106, 6, -106, -106, 4, 270,
+ -106, -106, -106, 9, -106, -106, -106, -106, -106, -106,
+ 12, -106, -106, -106, -106, -106, -106, -106, -106, -106};
+
+const short QDeclarativeJSGrammar::action_info [] = {
+ 401, -123, 440, -121, 403, -129, 333, 340, 615, 345,
+ -96, 352, 348, -118, -100, 389, -126, 257, -99, 342,
+ 416, 391, 343, 510, 453, 440, 448, 257, -96, 446,
+ -100, -118, 440, 348, 527, 541, -129, 525, 552, 555,
+ 538, 545, 466, 424, 399, 408, -110, 560, 560, 420,
+ 431, 444, 560, 457, -121, -99, 416, -123, 457, 440,
+ -126, 325, 306, 453, 272, 190, 294, 164, 187, 170,
+ 257, 272, 141, 430, 346, 312, 296, 312, 409, 414,
+ 294, 348, 251, 101, 99, 252, 318, 416, 236, 292,
+ 453, 457, 440, 183, 141, 189, 71, 335, 639, 164,
+ 147, 304, 179, 71, 99, 443, 427, 301, 434, 141,
+ 0, 141, 141, 331, 141, 0, 0, 292, 58, 444,
+ 141, 149, 477, 62, 0, 58, 0, 314, 603, 59,
+ 141, 315, 141, 172, 63, 141, 59, 247, 246, 141,
+ 424, 629, 628, 635, 634, 256, 255, 58, 615, 242,
+ 241, 428, 173, 101, 249, 248, 58, 327, 59, 141,
+ 141, 249, 248, 488, 254, 166, 418, 59, 142, 167,
+ 478, 557, 556, 141, 530, 529, 604, 172, 413, 412,
+ 249, 248, 459, 177, 455, 172, 85, 141, 86, 511,
+ 517, 350, 85, 523, 86, 559, 173, 64, 174, 87,
+ 85, 85, 86, 86, 173, 87, 406, 64, 141, 64,
+ 328, 337, 310, 87, 87, 469, 85, 85, 86, 86,
+ 0, 560, 533, 0, 0, 511, 521, 520, 511, 87,
+ 87, 0, 511, 141, 0, 513, 172, 141, 547, 513,
+ 438, 437, 65, 0, 518, 516, 512, 511, 66, 0,
+ 512, 103, 65, 0, 65, 173, 274, 275, 66, 0,
+ 66, 235, 234, 548, 546, 632, 631, 0, 470, 468,
+ 104, 513, 105, 172, 513, 0, 534, 532, 513, 172,
+ 561, 0, 512, 276, 277, 512, 537, 536, 34, 512,
+ 544, 543, 173, 513, 406, 630, 625, -87, 173, 172,
+ 174, 73, 74, 0, 512, 274, 275, 34, 0, 0,
+ 626, 624, 0, 0, 73, 74, 0, -87, 173, 34,
+ 174, 0, 85, 34, 86, 48, 50, 49, 75, 76,
+ 0, 0, 276, 277, 0, 87, 0, 0, 279, 280,
+ 623, 75, 76, 0, 48, 50, 49, 281, 0, 0,
+ 282, 45, 283, 34, 279, 280, 48, 50, 49, 0,
+ 48, 50, 49, 281, 279, 280, 282, 34, 283, 0,
+ 45, 279, 280, 281, -341, 0, 282, 0, 283, 0,
+ 281, 34, 45, 282, 0, 283, 45, 279, 280, 34,
+ 48, 50, 49, 0, 0, 34, 281, 0, 34, 282,
+ 0, 283, -341, 0, 48, 50, 49, 6, 5, 4,
+ 1, 3, 2, 245, 244, 0, 45, 34, 48, 50,
+ 49, 240, 239, 0, 0, 0, 48, 50, 49, 0,
+ 45, 0, 48, 50, 49, 48, 50, 49, 0, 0,
+ 0, 0, 0, 0, 45, 0, 0, 0, 0, 240,
+ 239, 0, 45, 34, 48, 50, 49, 0, 45, 0,
+ 0, 45, 34, 0, 0, 34, 0, 0, 0, 0,
+ 78, 79, 0, 0, 0, 0, 0, 0, 80, 81,
+ 45, 0, 82, 0, 83, 245, 244, 0, 0, 0,
+ 48, 50, 49, 0, 245, 244, 0, 240, 239, 48,
+ 50, 49, 48, 50, 49, 0, 0, 0, 0, 0,
+ 30, 31, 0, 0, 0, 0, 45, 0, 0, 0,
+ 33, 0, 0, 0, 0, 45, 0, 34, 45, 0,
+ 0, 35, 36, 0, 37, 0, 0, 0, 0, 0,
+ 0, 502, 0, 0, 0, 44, 0, 0, 151, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 152, 0,
+ 0, 0, 153, 51, 48, 50, 49, 0, 52, 0,
+ 0, 154, 0, 155, 0, 0, 0, 0, 0, 43,
+ 54, 32, 0, 0, 156, 40, 157, 62, 0, 0,
+ 45, 0, 0, 0, 158, 30, 31, 159, 63, 0,
+ 0, 0, 0, 160, 0, 33, 0, 0, 0, 161,
+ 0, 0, 34, 0, 0, 0, 35, 36, 0, 37,
+ 0, 0, 0, 0, 0, 162, 502, 0, 0, 0,
+ 44, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 151, 0, 51, 48,
+ 50, 49, 0, 52, 0, 0, 152, 0, 0, 0,
+ 153, 0, 0, 0, 43, 54, 32, 0, 0, 154,
+ 40, 155, 0, 0, 308, 45, 0, 0, 0, 0,
+ 0, 0, 156, 0, 157, 62, 0, 0, 0, 0,
+ 0, 0, 158, 0, 0, 159, 63, 0, 0, 0,
+ 0, 160, 0, 0, 0, 0, 0, 161, 0, 0,
+ 0, 0, 0, 0, 0, 0, 30, 31, 0, 0,
+ 0, 0, 0, 162, 0, 0, 33, 0, 0, 0,
+ 0, 0, 0, 34, 0, 0, 0, 35, 36, 0,
+ 37, 0, 0, 0, 30, 31, 0, 502, 0, 0,
+ 0, 44, 0, 0, 33, 0, 0, 0, 0, 0,
+ 0, 34, 0, 0, 0, 35, 36, 0, 37, 51,
+ 48, 50, 49, 0, 52, 41, 0, 0, 0, 44,
+ 0, 0, 0, 0, 0, 43, 54, 32, 0, 0,
+ 0, 40, 0, 0, 0, 0, 45, 51, 48, 50,
+ 49, 0, 52, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 43, 54, 32, 0, 0, 0, 40,
+ 0, 0, 0, 0, 45, 30, 31, 0, 0, 0,
+ 0, 0, 0, 30, 31, 33, 0, 0, 0, 0,
+ 0, 0, 34, 33, 0, 0, 35, 36, 0, 37,
+ 34, 0, 0, 0, 35, 36, 502, 37, 0, 0,
+ 44, 0, 0, 0, 41, 0, 0, 0, 44, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 51, 48,
+ 50, 49, 0, 52, 0, 0, 51, 48, 50, 49,
+ 0, 52, 0, 0, 43, 54, 32, 0, 0, 0,
+ 40, 0, 43, 54, 32, 45, 0, 0, 40, 0,
+ 0, 0, 0, 45, 30, 31, 0, 0, 0, 0,
+ 0, 0, 30, 31, 33, 0, 0, 0, 0, 0,
+ 0, 34, 33, 0, 0, 35, 36, 0, 37, 34,
+ 0, 0, 0, 35, 36, 502, 37, 0, 0, 44,
+ 0, 0, 0, 41, 0, 0, 0, 44, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 51, 48, 50,
+ 49, 0, 52, 0, 0, 51, 48, 50, 49, 0,
+ 52, 0, 0, 43, 54, 32, 0, 0, 0, 40,
+ 0, 43, 54, 32, 45, 0, 0, 40, 0, 0,
+ 0, 0, 45, 0, 0, 0, 0, 0, 0, 0,
+ 0, 501, 0, 30, 31, 0, 0, 0, 0, 0,
+ 0, 0, 0, 215, 0, 0, 0, 0, 0, 0,
+ 34, 0, 0, 0, 35, 36, 0, 37, 0, 0,
+ 0, 0, 0, 0, 502, 0, 0, 0, 44, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 51, 503, 505, 504,
+ 0, 52, 0, 0, 0, 0, 226, 0, 0, 0,
+ 0, 0, 43, 54, 32, 210, 0, 0, 40, 0,
+ 0, 0, 0, 45, 0, 0, 0, 0, 0, 0,
+ 0, 0, 501, 0, 30, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 215, 0, 0, 0, 0, 0,
+ 0, 34, 0, 0, 0, 35, 36, 0, 37, 0,
+ 0, 0, 0, 0, 0, 502, 0, 0, 0, 44,
+ 0, 0, 0, 0, 0, 0, 0, 607, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 51, 503, 505,
+ 504, 0, 52, 0, 0, 0, 0, 226, 0, 0,
+ 0, 0, 0, 43, 54, 32, 210, 0, 0, 40,
+ 0, 0, 0, 0, 45, 0, 0, 0, 0, 0,
+ 0, 0, 0, 501, 0, 30, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 215, 0, 0, 0, 0,
+ 0, 0, 34, 0, 0, 0, 35, 36, 0, 37,
+ 0, 0, 0, 0, 0, 0, 502, 0, 0, 0,
+ 44, 0, 0, 0, 0, 0, 0, 0, 610, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 51, 503,
+ 505, 504, 0, 52, 0, 0, 0, 0, 226, 0,
+ 0, 0, 0, 0, 43, 54, 32, 210, 0, 0,
+ 40, 0, 0, 0, 0, 45, 0, 0, 0, 0,
+ 0, 0, 0, 0, 29, 30, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 33, 0, 0, 0, 0,
+ 0, 0, 34, 0, 0, 0, 35, 36, 0, 37,
+ 0, 0, 0, 38, 0, 39, 41, 42, 0, 0,
+ 44, 0, 0, 0, 46, 0, 47, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 51, 48,
+ 50, 49, 0, 52, 0, 53, 0, 55, 0, 56,
+ 0, 0, 0, 0, 43, 54, 32, 0, 0, 0,
+ 40, 0, 0, 0, 0, 45, 0, 0, 0, 0,
+ 0, 0, 0, 0, -119, 0, 0, 0, 29, 30,
+ 31, 0, 0, 0, 0, 0, 0, 0, 0, 33,
+ 0, 0, 0, 0, 0, 0, 34, 0, 0, 0,
+ 35, 36, 0, 37, 0, 0, 0, 38, 0, 39,
+ 41, 42, 0, 0, 44, 0, 0, 0, 46, 0,
+ 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 51, 48, 50, 49, 0, 52, 0, 53,
+ 0, 55, 0, 56, 0, 0, 0, 0, 43, 54,
+ 32, 0, 0, 0, 40, 0, 0, 0, 0, 45,
+ 0, 0, 0, 0, 0, 0, 0, 0, 29, 30,
+ 31, 0, 0, 0, 0, 0, 0, 0, 0, 33,
+ 0, 0, 0, 0, 0, 0, 34, 0, 0, 0,
+ 35, 36, 0, 37, 0, 0, 0, 38, 0, 39,
+ 41, 42, 0, 0, 44, 0, 0, 0, 46, 0,
+ 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 51, 48, 50, 49, 0, 52, 0, 53,
+ 0, 55, 271, 56, 0, 0, 0, 0, 43, 54,
+ 32, 0, 0, 0, 40, 0, 0, 0, 0, 45,
+ 0, 0, 0, 0, 0, 0, 0, 0, 483, 0,
+ 0, 29, 30, 31, 0, 0, 0, 0, 0, 0,
+ 0, 0, 33, 0, 0, 0, 0, 0, 0, 34,
+ 0, 0, 0, 35, 36, 0, 37, 0, 0, 0,
+ 38, 0, 39, 41, 42, 0, 0, 44, 0, 0,
+ 0, 46, 0, 47, 0, 0, 484, 0, 0, 0,
+ 0, 0, 0, 0, 0, 51, 48, 50, 49, 0,
+ 52, 0, 53, 0, 55, 0, 56, 0, 0, 0,
+ 0, 43, 54, 32, 0, 0, 0, 40, 0, 0,
+ 0, 0, 45, 0, 0, 0, 0, 0, 0, 0,
+ 0, 29, 30, 31, 0, 0, 0, 0, 0, 0,
+ 0, 0, 33, 0, 0, 0, 0, 0, 0, 34,
+ 217, 0, 0, 568, 569, 0, 37, 0, 0, 0,
+ 38, 0, 39, 41, 42, 0, 0, 44, 0, 0,
+ 0, 46, 0, 47, 0, 0, 0, 0, 0, 0,
+ 0, 221, 0, 0, 0, 51, 48, 50, 49, 0,
+ 52, 0, 53, 0, 55, 0, 56, 0, 0, 0,
+ 0, 43, 54, 32, 0, 0, 0, 40, 0, 0,
+ 0, 0, 45, 0, 0, 0, 0, 0, 0, 0,
+ 0, 483, 0, 0, 29, 30, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 33, 0, 0, 0, 0,
+ 0, 0, 34, 0, 0, 0, 35, 36, 0, 37,
+ 0, 0, 0, 38, 0, 39, 41, 42, 0, 0,
+ 44, 0, 0, 0, 46, 0, 47, 0, 0, 486,
+ 0, 0, 0, 0, 0, 0, 0, 0, 51, 48,
+ 50, 49, 0, 52, 0, 53, 0, 55, 0, 56,
+ 0, 0, 0, 0, 43, 54, 32, 0, 0, 0,
+ 40, 0, 0, 0, 0, 45, 0, 0, 0, 0,
+ 0, 0, 0, 0, 475, 0, 0, 29, 30, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 33, 0,
+ 0, 0, 0, 0, 0, 34, 0, 0, 0, 35,
+ 36, 0, 37, 0, 0, 0, 38, 0, 39, 41,
+ 42, 0, 0, 44, 0, 0, 0, 46, 0, 47,
+ 0, 0, 481, 0, 0, 0, 0, 0, 0, 0,
+ 0, 51, 48, 50, 49, 0, 52, 0, 53, 0,
+ 55, 0, 56, 0, 0, 0, 0, 43, 54, 32,
+ 0, 0, 0, 40, 0, 0, 0, 0, 45, 0,
+ 0, 0, 0, 0, 0, 0, 0, 475, 0, 0,
+ 29, 30, 31, 0, 0, 0, 0, 0, 0, 0,
+ 0, 33, 0, 0, 0, 0, 0, 0, 34, 0,
+ 0, 0, 35, 36, 0, 37, 0, 0, 0, 38,
+ 0, 39, 41, 42, 0, 0, 44, 0, 0, 0,
+ 46, 0, 47, 0, 0, 476, 0, 0, 0, 0,
+ 0, 0, 0, 0, 51, 48, 50, 49, 0, 52,
+ 0, 53, 0, 55, 0, 56, 0, 0, 0, 0,
+ 43, 54, 32, 0, 0, 0, 40, 0, 0, 0,
+ 0, 45, 0, 0, 0, 0, 0, 0, 0, 0,
+ 109, 110, 111, 0, 0, 113, 115, 116, 0, 0,
+ 117, 0, 118, 0, 0, 0, 120, 121, 122, 0,
+ 0, 0, 0, 0, 0, 34, 123, 124, 125, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 126,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 129, 0, 0, 0, 0,
+ 0, 0, 48, 50, 49, 130, 131, 132, 0, 134,
+ 135, 136, 137, 138, 139, 0, 0, 127, 133, 119,
+ 112, 114, 128, 0, 0, 0, 0, 0, 45, 0,
+ 0, 0, 0, 0, 0, 0, 0, 109, 110, 111,
+ 0, 0, 113, 115, 116, 0, 0, 117, 0, 118,
+ 0, 0, 0, 120, 121, 122, 0, 0, 0, 0,
+ 0, 0, 393, 123, 124, 125, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 126, 0, 0, 0,
+ 394, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 129, 0, 0, 0, 0, 0, 398, 395,
+ 397, 0, 130, 131, 132, 0, 134, 135, 136, 137,
+ 138, 139, 0, 0, 127, 133, 119, 112, 114, 128,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 109, 110, 111, 0, 0, 113,
+ 115, 116, 0, 0, 117, 0, 118, 0, 0, 0,
+ 120, 121, 122, 0, 0, 0, 0, 0, 0, 393,
+ 123, 124, 125, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 126, 0, 0, 0, 394, 0, 0,
+ 0, 0, 0, 0, 0, 396, 0, 0, 0, 129,
+ 0, 0, 0, 0, 0, 398, 395, 397, 0, 130,
+ 131, 132, 0, 134, 135, 136, 137, 138, 139, 0,
+ 0, 127, 133, 119, 112, 114, 128, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 209, 0, 0, 0, 0, 211, 0, 29, 30,
+ 31, 213, 0, 0, 0, 0, 0, 0, 214, 33,
+ 0, 0, 0, 0, 0, 0, 216, 217, 0, 0,
+ 218, 36, 0, 37, 0, 0, 0, 38, 0, 39,
+ 41, 42, 0, 0, 44, 0, 0, 0, 46, 0,
+ 47, 0, 0, 0, 0, 0, 220, 0, 221, 0,
+ 0, 0, 51, 219, 222, 49, 223, 52, 224, 53,
+ 225, 55, 226, 56, 227, 228, 0, 0, 43, 54,
+ 32, 210, 212, 0, 40, 0, 0, 0, 0, 45,
+ 0, 0, 0, 0, 0, 0, 0, 0, 209, 0,
+ 0, 0, 0, 211, 0, 29, 30, 31, 213, 0,
+ 0, 0, 0, 0, 0, 214, 215, 0, 0, 0,
+ 0, 0, 0, 216, 217, 0, 0, 218, 36, 0,
+ 37, 0, 0, 0, 38, 0, 39, 41, 42, 0,
+ 0, 44, 0, 0, 0, 46, 0, 47, 0, 0,
+ 0, 0, 0, 220, 0, 221, 0, 0, 0, 51,
+ 219, 222, 49, 223, 52, 224, 53, 225, 55, 226,
+ 56, 227, 228, 0, 0, 43, 54, 32, 210, 212,
+ 0, 40, 0, 0, 0, 0, 45, 0, 0, 0,
+ 0, 0, 0, 0, 0, 571, 110, 111, 0, 0,
+ 573, 115, 575, 30, 31, 576, 0, 118, 0, 0,
+ 0, 120, 578, 579, 0, 0, 0, 0, 0, 0,
+ 580, 581, 124, 125, 218, 36, 0, 37, 0, 0,
+ 0, 38, 0, 39, 582, 42, 0, 0, 584, 0,
+ 0, 0, 46, 0, 47, 0, 0, 0, 0, 0,
+ 586, 0, 221, 0, 0, 0, 588, 585, 587, 49,
+ 589, 590, 591, 53, 593, 594, 595, 596, 597, 598,
+ 0, 0, 583, 592, 577, 572, 574, 128, 40, 0,
+ 0, 0, 0, 45, 0, 0, 0, 0, 0, 0,
+ 0, 0, 361, 110, 111, 0, 0, 363, 115, 365,
+ 30, 31, 366, 0, 118, 0, 0, 0, 120, 368,
+ 369, 0, 0, 0, 0, 0, 0, 370, 371, 124,
+ 125, 218, 36, 0, 37, 0, 0, 0, 38, 0,
+ 39, 372, 42, 0, 0, 374, 0, 0, 0, 46,
+ 0, 47, 0, -265, 0, 0, 0, 376, 0, 221,
+ 0, 0, 0, 378, 375, 377, 49, 379, 380, 381,
+ 53, 383, 384, 385, 386, 387, 388, 0, 0, 373,
+ 382, 367, 362, 364, 128, 40, 0, 0, 0, 0,
+ 45, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 522, 540, 539, 519, 461, 515, 535, 514, 309, 528,
+ 311, 531, 250, 526, 542, 636, 613, 182, 150, 622,
+ 16, 496, 320, 497, 627, 253, 498, 633, 358, 554,
+ 436, 558, 487, 472, 439, 302, 238, 392, 454, 606,
+ 551, 402, 358, 553, 439, 243, 182, 445, 243, 447,
+ 456, 237, 238, 238, 347, 429, 349, 450, 351, 460,
+ 143, 458, 353, 467, 243, 436, 439, 176, 410, 186,
+ 188, 250, 415, 338, 182, 433, 148, 171, 169, 390,
+ 417, 400, 302, 140, 449, 163, 146, 425, 339, 302,
+ 358, 237, 336, 307, 250, 344, 482, 436, 302, 358,
+ 485, 358, 0, 0, 0, 461, 0, 0, 0, 0,
+ 0, 60, 60, 451, 452, 404, 0, 0, 60, 60,
+ 60, 452, 451, 320, 106, 60, 60, 60, 102, 60,
+ 92, 93, 95, 302, 94, 186, 0, 60, 0, 0,
+ 60, 88, 60, 405, 90, 60, 108, 180, 60, 266,
+ 146, 60, 146, 489, 270, 407, 165, 178, 60, 302,
+ 60, 0, 89, 330, 168, 288, 60, 60, 60, 60,
+ 0, 287, 286, 284, 285, 471, 60, 60, 432, 180,
+ 435, 60, 60, 452, 72, 60, 60, 451, 96, 60,
+ 480, 494, 77, 500, 479, 329, 60, 334, 305, 61,
+ 612, 60, 60, 69, 68, 60, 404, 60, 70, 67,
+ 60, 60, 490, 60, 60, 493, 84, 404, 60, 341,
+ 492, 60, 60, 180, 303, 60, 100, 60, 98, 491,
+ 91, 60, 0, 298, 405, 60, 106, 97, 270, 0,
+ 270, 500, 298, 500, 60, 405, 605, 270, 293, 270,
+ 602, 0, 0, 0, 0, 317, 499, 509, 108, 175,
+ 60, 316, 0, 60, 319, 270, 60, 290, 270, 298,
+ 289, 270, 0, 291, 270, 298, 60, 60, 0, 60,
+ 270, 270, 270, 500, 270, 0, 637, 295, 273, 298,
+ 602, 297, 313, 60, 270, 611, 0, 300, 270, 599,
+ 278, 302, 601, 500, 0, 567, 602, 0, 0, 0,
+ 0, 326, 570, 563, 564, 565, 566, 0, 499, 509,
+ 0, 472, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 332, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 608, 0, 0, 0, 0, 0,
+ 0, 0, 500, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 499, 509, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0};
+
+const short QDeclarativeJSGrammar::action_check [] = {
+ 55, 7, 33, 7, 55, 7, 60, 36, 90, 55,
+ 7, 16, 36, 7, 7, 7, 7, 36, 7, 60,
+ 36, 8, 33, 66, 36, 33, 60, 36, 7, 36,
+ 7, 7, 33, 36, 24, 7, 7, 37, 8, 60,
+ 66, 29, 17, 5, 7, 60, 7, 33, 33, 33,
+ 7, 20, 33, 36, 7, 7, 36, 7, 36, 33,
+ 7, 17, 60, 36, 1, 33, 79, 2, 8, 7,
+ 36, 1, 8, 55, 7, 2, 8, 2, 7, 7,
+ 79, 36, 77, 79, 48, 36, 7, 36, 55, 48,
+ 36, 36, 33, 36, 8, 60, 1, 31, 0, 2,
+ 8, 61, 60, 1, 48, 6, 10, 61, 7, 8,
+ -1, 8, 8, 61, 8, -1, -1, 48, 40, 20,
+ 8, 60, 8, 42, -1, 40, -1, 50, 8, 51,
+ 8, 54, 8, 15, 53, 8, 51, 61, 62, 8,
+ 5, 61, 62, 61, 62, 61, 62, 40, 90, 61,
+ 62, 55, 34, 79, 61, 62, 40, 8, 51, 8,
+ 8, 61, 62, 60, 60, 50, 60, 51, 56, 54,
+ 56, 61, 62, 8, 61, 62, 56, 15, 61, 62,
+ 61, 62, 60, 56, 60, 15, 25, 8, 27, 29,
+ 7, 60, 25, 29, 27, 7, 34, 12, 36, 38,
+ 25, 25, 27, 27, 34, 38, 36, 12, 8, 12,
+ 61, 60, 60, 38, 38, 8, 25, 25, 27, 27,
+ -1, 33, 7, -1, -1, 29, 61, 62, 29, 38,
+ 38, -1, 29, 8, -1, 75, 15, 8, 36, 75,
+ 61, 62, 57, -1, 61, 62, 86, 29, 63, -1,
+ 86, 15, 57, -1, 57, 34, 18, 19, 63, -1,
+ 63, 61, 62, 61, 62, 61, 62, -1, 61, 62,
+ 34, 75, 36, 15, 75, -1, 61, 62, 75, 15,
+ 92, -1, 86, 45, 46, 86, 61, 62, 29, 86,
+ 61, 62, 34, 75, 36, 91, 47, 33, 34, 15,
+ 36, 18, 19, -1, 86, 18, 19, 29, -1, -1,
+ 61, 62, -1, -1, 18, 19, -1, 33, 34, 29,
+ 36, -1, 25, 29, 27, 66, 67, 68, 45, 46,
+ -1, -1, 45, 46, -1, 38, -1, -1, 23, 24,
+ 91, 45, 46, -1, 66, 67, 68, 32, -1, -1,
+ 35, 92, 37, 29, 23, 24, 66, 67, 68, -1,
+ 66, 67, 68, 32, 23, 24, 35, 29, 37, -1,
+ 92, 23, 24, 32, 36, -1, 35, -1, 37, -1,
+ 32, 29, 92, 35, -1, 37, 92, 23, 24, 29,
+ 66, 67, 68, -1, -1, 29, 32, -1, 29, 35,
+ -1, 37, 36, -1, 66, 67, 68, 93, 94, 95,
+ 96, 97, 98, 61, 62, -1, 92, 29, 66, 67,
+ 68, 61, 62, -1, -1, -1, 66, 67, 68, -1,
+ 92, -1, 66, 67, 68, 66, 67, 68, -1, -1,
+ -1, -1, -1, -1, 92, -1, -1, -1, -1, 61,
+ 62, -1, 92, 29, 66, 67, 68, -1, 92, -1,
+ -1, 92, 29, -1, -1, 29, -1, -1, -1, -1,
+ 23, 24, -1, -1, -1, -1, -1, -1, 31, 32,
+ 92, -1, 35, -1, 37, 61, 62, -1, -1, -1,
+ 66, 67, 68, -1, 61, 62, -1, 61, 62, 66,
+ 67, 68, 66, 67, 68, -1, -1, -1, -1, -1,
+ 12, 13, -1, -1, -1, -1, 92, -1, -1, -1,
+ 22, -1, -1, -1, -1, 92, -1, 29, 92, -1,
+ -1, 33, 34, -1, 36, -1, -1, -1, -1, -1,
+ -1, 43, -1, -1, -1, 47, -1, -1, 3, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 13, -1,
+ -1, -1, 17, 65, 66, 67, 68, -1, 70, -1,
+ -1, 26, -1, 28, -1, -1, -1, -1, -1, 81,
+ 82, 83, -1, -1, 39, 87, 41, 42, -1, -1,
+ 92, -1, -1, -1, 49, 12, 13, 52, 53, -1,
+ -1, -1, -1, 58, -1, 22, -1, -1, -1, 64,
+ -1, -1, 29, -1, -1, -1, 33, 34, -1, 36,
+ -1, -1, -1, -1, -1, 80, 43, -1, -1, -1,
+ 47, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3, -1, 65, 66,
+ 67, 68, -1, 70, -1, -1, 13, -1, -1, -1,
+ 17, -1, -1, -1, 81, 82, 83, -1, -1, 26,
+ 87, 28, -1, -1, 31, 92, -1, -1, -1, -1,
+ -1, -1, 39, -1, 41, 42, -1, -1, -1, -1,
+ -1, -1, 49, -1, -1, 52, 53, -1, -1, -1,
+ -1, 58, -1, -1, -1, -1, -1, 64, -1, -1,
+ -1, -1, -1, -1, -1, -1, 12, 13, -1, -1,
+ -1, -1, -1, 80, -1, -1, 22, -1, -1, -1,
+ -1, -1, -1, 29, -1, -1, -1, 33, 34, -1,
+ 36, -1, -1, -1, 12, 13, -1, 43, -1, -1,
+ -1, 47, -1, -1, 22, -1, -1, -1, -1, -1,
+ -1, 29, -1, -1, -1, 33, 34, -1, 36, 65,
+ 66, 67, 68, -1, 70, 43, -1, -1, -1, 47,
+ -1, -1, -1, -1, -1, 81, 82, 83, -1, -1,
+ -1, 87, -1, -1, -1, -1, 92, 65, 66, 67,
+ 68, -1, 70, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 81, 82, 83, -1, -1, -1, 87,
+ -1, -1, -1, -1, 92, 12, 13, -1, -1, -1,
+ -1, -1, -1, 12, 13, 22, -1, -1, -1, -1,
+ -1, -1, 29, 22, -1, -1, 33, 34, -1, 36,
+ 29, -1, -1, -1, 33, 34, 43, 36, -1, -1,
+ 47, -1, -1, -1, 43, -1, -1, -1, 47, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 65, 66,
+ 67, 68, -1, 70, -1, -1, 65, 66, 67, 68,
+ -1, 70, -1, -1, 81, 82, 83, -1, -1, -1,
+ 87, -1, 81, 82, 83, 92, -1, -1, 87, -1,
+ -1, -1, -1, 92, 12, 13, -1, -1, -1, -1,
+ -1, -1, 12, 13, 22, -1, -1, -1, -1, -1,
+ -1, 29, 22, -1, -1, 33, 34, -1, 36, 29,
+ -1, -1, -1, 33, 34, 43, 36, -1, -1, 47,
+ -1, -1, -1, 43, -1, -1, -1, 47, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 65, 66, 67,
+ 68, -1, 70, -1, -1, 65, 66, 67, 68, -1,
+ 70, -1, -1, 81, 82, 83, -1, -1, -1, 87,
+ -1, 81, 82, 83, 92, -1, -1, 87, -1, -1,
+ -1, -1, 92, -1, -1, -1, -1, -1, -1, -1,
+ -1, 10, -1, 12, 13, -1, -1, -1, -1, -1,
+ -1, -1, -1, 22, -1, -1, -1, -1, -1, -1,
+ 29, -1, -1, -1, 33, 34, -1, 36, -1, -1,
+ -1, -1, -1, -1, 43, -1, -1, -1, 47, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 65, 66, 67, 68,
+ -1, 70, -1, -1, -1, -1, 75, -1, -1, -1,
+ -1, -1, 81, 82, 83, 84, -1, -1, 87, -1,
+ -1, -1, -1, 92, -1, -1, -1, -1, -1, -1,
+ -1, -1, 10, -1, 12, 13, -1, -1, -1, -1,
+ -1, -1, -1, -1, 22, -1, -1, -1, -1, -1,
+ -1, 29, -1, -1, -1, 33, 34, -1, 36, -1,
+ -1, -1, -1, -1, -1, 43, -1, -1, -1, 47,
+ -1, -1, -1, -1, -1, -1, -1, 55, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 65, 66, 67,
+ 68, -1, 70, -1, -1, -1, -1, 75, -1, -1,
+ -1, -1, -1, 81, 82, 83, 84, -1, -1, 87,
+ -1, -1, -1, -1, 92, -1, -1, -1, -1, -1,
+ -1, -1, -1, 10, -1, 12, 13, -1, -1, -1,
+ -1, -1, -1, -1, -1, 22, -1, -1, -1, -1,
+ -1, -1, 29, -1, -1, -1, 33, 34, -1, 36,
+ -1, -1, -1, -1, -1, -1, 43, -1, -1, -1,
+ 47, -1, -1, -1, -1, -1, -1, -1, 55, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 65, 66,
+ 67, 68, -1, 70, -1, -1, -1, -1, 75, -1,
+ -1, -1, -1, -1, 81, 82, 83, 84, -1, -1,
+ 87, -1, -1, -1, -1, 92, -1, -1, -1, -1,
+ -1, -1, -1, -1, 11, 12, 13, -1, -1, -1,
+ -1, -1, -1, -1, -1, 22, -1, -1, -1, -1,
+ -1, -1, 29, -1, -1, -1, 33, 34, -1, 36,
+ -1, -1, -1, 40, -1, 42, 43, 44, -1, -1,
+ 47, -1, -1, -1, 51, -1, 53, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 65, 66,
+ 67, 68, -1, 70, -1, 72, -1, 74, -1, 76,
+ -1, -1, -1, -1, 81, 82, 83, -1, -1, -1,
+ 87, -1, -1, -1, -1, 92, -1, -1, -1, -1,
+ -1, -1, -1, -1, 7, -1, -1, -1, 11, 12,
+ 13, -1, -1, -1, -1, -1, -1, -1, -1, 22,
+ -1, -1, -1, -1, -1, -1, 29, -1, -1, -1,
+ 33, 34, -1, 36, -1, -1, -1, 40, -1, 42,
+ 43, 44, -1, -1, 47, -1, -1, -1, 51, -1,
+ 53, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 65, 66, 67, 68, -1, 70, -1, 72,
+ -1, 74, -1, 76, -1, -1, -1, -1, 81, 82,
+ 83, -1, -1, -1, 87, -1, -1, -1, -1, 92,
+ -1, -1, -1, -1, -1, -1, -1, -1, 11, 12,
+ 13, -1, -1, -1, -1, -1, -1, -1, -1, 22,
+ -1, -1, -1, -1, -1, -1, 29, -1, -1, -1,
+ 33, 34, -1, 36, -1, -1, -1, 40, -1, 42,
+ 43, 44, -1, -1, 47, -1, -1, -1, 51, -1,
+ 53, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 65, 66, 67, 68, -1, 70, -1, 72,
+ -1, 74, 75, 76, -1, -1, -1, -1, 81, 82,
+ 83, -1, -1, -1, 87, -1, -1, -1, -1, 92,
+ -1, -1, -1, -1, -1, -1, -1, -1, 8, -1,
+ -1, 11, 12, 13, -1, -1, -1, -1, -1, -1,
+ -1, -1, 22, -1, -1, -1, -1, -1, -1, 29,
+ -1, -1, -1, 33, 34, -1, 36, -1, -1, -1,
+ 40, -1, 42, 43, 44, -1, -1, 47, -1, -1,
+ -1, 51, -1, 53, -1, -1, 56, -1, -1, -1,
+ -1, -1, -1, -1, -1, 65, 66, 67, 68, -1,
+ 70, -1, 72, -1, 74, -1, 76, -1, -1, -1,
+ -1, 81, 82, 83, -1, -1, -1, 87, -1, -1,
+ -1, -1, 92, -1, -1, -1, -1, -1, -1, -1,
+ -1, 11, 12, 13, -1, -1, -1, -1, -1, -1,
+ -1, -1, 22, -1, -1, -1, -1, -1, -1, 29,
+ 30, -1, -1, 33, 34, -1, 36, -1, -1, -1,
+ 40, -1, 42, 43, 44, -1, -1, 47, -1, -1,
+ -1, 51, -1, 53, -1, -1, -1, -1, -1, -1,
+ -1, 61, -1, -1, -1, 65, 66, 67, 68, -1,
+ 70, -1, 72, -1, 74, -1, 76, -1, -1, -1,
+ -1, 81, 82, 83, -1, -1, -1, 87, -1, -1,
+ -1, -1, 92, -1, -1, -1, -1, -1, -1, -1,
+ -1, 8, -1, -1, 11, 12, 13, -1, -1, -1,
+ -1, -1, -1, -1, -1, 22, -1, -1, -1, -1,
+ -1, -1, 29, -1, -1, -1, 33, 34, -1, 36,
+ -1, -1, -1, 40, -1, 42, 43, 44, -1, -1,
+ 47, -1, -1, -1, 51, -1, 53, -1, -1, 56,
+ -1, -1, -1, -1, -1, -1, -1, -1, 65, 66,
+ 67, 68, -1, 70, -1, 72, -1, 74, -1, 76,
+ -1, -1, -1, -1, 81, 82, 83, -1, -1, -1,
+ 87, -1, -1, -1, -1, 92, -1, -1, -1, -1,
+ -1, -1, -1, -1, 8, -1, -1, 11, 12, 13,
+ -1, -1, -1, -1, -1, -1, -1, -1, 22, -1,
+ -1, -1, -1, -1, -1, 29, -1, -1, -1, 33,
+ 34, -1, 36, -1, -1, -1, 40, -1, 42, 43,
+ 44, -1, -1, 47, -1, -1, -1, 51, -1, 53,
+ -1, -1, 56, -1, -1, -1, -1, -1, -1, -1,
+ -1, 65, 66, 67, 68, -1, 70, -1, 72, -1,
+ 74, -1, 76, -1, -1, -1, -1, 81, 82, 83,
+ -1, -1, -1, 87, -1, -1, -1, -1, 92, -1,
+ -1, -1, -1, -1, -1, -1, -1, 8, -1, -1,
+ 11, 12, 13, -1, -1, -1, -1, -1, -1, -1,
+ -1, 22, -1, -1, -1, -1, -1, -1, 29, -1,
+ -1, -1, 33, 34, -1, 36, -1, -1, -1, 40,
+ -1, 42, 43, 44, -1, -1, 47, -1, -1, -1,
+ 51, -1, 53, -1, -1, 56, -1, -1, -1, -1,
+ -1, -1, -1, -1, 65, 66, 67, 68, -1, 70,
+ -1, 72, -1, 74, -1, 76, -1, -1, -1, -1,
+ 81, 82, 83, -1, -1, -1, 87, -1, -1, -1,
+ -1, 92, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4, 5, 6, -1, -1, 9, 10, 11, -1, -1,
+ 14, -1, 16, -1, -1, -1, 20, 21, 22, -1,
+ -1, -1, -1, -1, -1, 29, 30, 31, 32, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 43,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 59, -1, -1, -1, -1,
+ -1, -1, 66, 67, 68, 69, 70, 71, -1, 73,
+ 74, 75, 76, 77, 78, -1, -1, 81, 82, 83,
+ 84, 85, 86, -1, -1, -1, -1, -1, 92, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4, 5, 6,
+ -1, -1, 9, 10, 11, -1, -1, 14, -1, 16,
+ -1, -1, -1, 20, 21, 22, -1, -1, -1, -1,
+ -1, -1, 29, 30, 31, 32, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 43, -1, -1, -1,
+ 47, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 59, -1, -1, -1, -1, -1, 65, 66,
+ 67, -1, 69, 70, 71, -1, 73, 74, 75, 76,
+ 77, 78, -1, -1, 81, 82, 83, 84, 85, 86,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4, 5, 6, -1, -1, 9,
+ 10, 11, -1, -1, 14, -1, 16, -1, -1, -1,
+ 20, 21, 22, -1, -1, -1, -1, -1, -1, 29,
+ 30, 31, 32, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 43, -1, -1, -1, 47, -1, -1,
+ -1, -1, -1, -1, -1, 55, -1, -1, -1, 59,
+ -1, -1, -1, -1, -1, 65, 66, 67, -1, 69,
+ 70, 71, -1, 73, 74, 75, 76, 77, 78, -1,
+ -1, 81, 82, 83, 84, 85, 86, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4, -1, -1, -1, -1, 9, -1, 11, 12,
+ 13, 14, -1, -1, -1, -1, -1, -1, 21, 22,
+ -1, -1, -1, -1, -1, -1, 29, 30, -1, -1,
+ 33, 34, -1, 36, -1, -1, -1, 40, -1, 42,
+ 43, 44, -1, -1, 47, -1, -1, -1, 51, -1,
+ 53, -1, -1, -1, -1, -1, 59, -1, 61, -1,
+ -1, -1, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, -1, -1, 81, 82,
+ 83, 84, 85, -1, 87, -1, -1, -1, -1, 92,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4, -1,
+ -1, -1, -1, 9, -1, 11, 12, 13, 14, -1,
+ -1, -1, -1, -1, -1, 21, 22, -1, -1, -1,
+ -1, -1, -1, 29, 30, -1, -1, 33, 34, -1,
+ 36, -1, -1, -1, 40, -1, 42, 43, 44, -1,
+ -1, 47, -1, -1, -1, 51, -1, 53, -1, -1,
+ -1, -1, -1, 59, -1, 61, -1, -1, -1, 65,
+ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ 76, 77, 78, -1, -1, 81, 82, 83, 84, 85,
+ -1, 87, -1, -1, -1, -1, 92, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4, 5, 6, -1, -1,
+ 9, 10, 11, 12, 13, 14, -1, 16, -1, -1,
+ -1, 20, 21, 22, -1, -1, -1, -1, -1, -1,
+ 29, 30, 31, 32, 33, 34, -1, 36, -1, -1,
+ -1, 40, -1, 42, 43, 44, -1, -1, 47, -1,
+ -1, -1, 51, -1, 53, -1, -1, -1, -1, -1,
+ 59, -1, 61, -1, -1, -1, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ -1, -1, 81, 82, 83, 84, 85, 86, 87, -1,
+ -1, -1, -1, 92, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4, 5, 6, -1, -1, 9, 10, 11,
+ 12, 13, 14, -1, 16, -1, -1, -1, 20, 21,
+ 22, -1, -1, -1, -1, -1, -1, 29, 30, 31,
+ 32, 33, 34, -1, 36, -1, -1, -1, 40, -1,
+ 42, 43, 44, -1, -1, 47, -1, -1, -1, 51,
+ -1, 53, -1, 55, -1, -1, -1, 59, -1, 61,
+ -1, -1, -1, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, -1, -1, 81,
+ 82, 83, 84, 85, 86, 87, -1, -1, -1, -1,
+ 92, -1, -1, -1, -1, -1, -1, -1, -1,
+
+ 13, 15, 25, 3, 15, 15, 3, 25, 3, 15,
+ 2, 15, 2, 25, 3, 11, 19, 15, 67, 13,
+ 3, 104, 15, 4, 15, 3, 2, 15, 2, 15,
+ 3, 15, 3, 35, 21, 3, 15, 36, 3, 19,
+ 25, 2, 2, 25, 21, 15, 15, 98, 15, 15,
+ 2, 4, 15, 15, 2, 93, 3, 21, 2, 2,
+ 35, 3, 2, 35, 15, 3, 21, 3, 2, 15,
+ 15, 2, 2, 2, 15, 3, 35, 35, 35, 35,
+ 3, 35, 3, 3, 21, 35, 35, 96, 15, 3,
+ 2, 4, 3, 2, 2, 100, 35, 3, 3, 2,
+ 35, 2, -1, -1, -1, 15, -1, -1, -1, -1,
+ -1, 44, 44, 46, 46, 13, -1, -1, 44, 44,
+ 44, 46, 46, 15, 15, 44, 44, 44, 54, 44,
+ 49, 49, 49, 3, 49, 15, -1, 44, -1, -1,
+ 44, 48, 44, 41, 48, 44, 37, 46, 44, 44,
+ 35, 44, 35, 46, 49, 40, 58, 40, 44, 3,
+ 44, -1, 48, 68, 60, 49, 44, 44, 44, 44,
+ -1, 49, 49, 49, 49, 85, 44, 44, 81, 46,
+ 81, 44, 44, 46, 52, 44, 44, 46, 50, 44,
+ 31, 46, 50, 13, 35, 87, 44, 2, 68, 47,
+ 20, 44, 44, 46, 46, 44, 13, 44, 47, 46,
+ 44, 44, 46, 44, 44, 46, 49, 13, 44, 99,
+ 46, 44, 44, 46, 68, 44, 56, 44, 50, 46,
+ 49, 44, -1, 44, 41, 44, 15, 50, 49, -1,
+ 49, 13, 44, 13, 44, 41, 16, 49, 57, 49,
+ 20, -1, -1, -1, -1, 66, 28, 29, 37, 38,
+ 44, 61, -1, 44, 66, 49, 44, 51, 49, 44,
+ 51, 49, -1, 51, 49, 44, 44, 44, -1, 44,
+ 49, 49, 49, 13, 49, -1, 16, 55, 53, 44,
+ 20, 66, 59, 44, 49, 5, -1, 66, 49, 13,
+ 51, 3, 16, 13, -1, 13, 20, -1, -1, -1,
+ -1, 66, 20, 21, 22, 23, 24, -1, 28, 29,
+ -1, 35, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 68, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5, -1, -1, -1, -1, -1,
+ -1, -1, 13, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 28, 29, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1};
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/parser/qdeclarativejsgrammar_p.h b/src/declarative/qml/parser/qdeclarativejsgrammar_p.h
new file mode 100644
index 0000000000..32bb12b3f2
--- /dev/null
+++ b/src/declarative/qml/parser/qdeclarativejsgrammar_p.h
@@ -0,0 +1,210 @@
+/****************************************************************************
+**
+** 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 QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+// This file was generated by qlalr - DO NOT EDIT!
+#ifndef QDECLARATIVEJSGRAMMAR_P_H
+#define QDECLARATIVEJSGRAMMAR_P_H
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeJSGrammar
+{
+public:
+ enum VariousConstants {
+ EOF_SYMBOL = 0,
+ REDUCE_HERE = 100,
+ SHIFT_THERE = 99,
+ T_AND = 1,
+ T_AND_AND = 2,
+ T_AND_EQ = 3,
+ T_AS = 91,
+ T_AUTOMATIC_SEMICOLON = 62,
+ T_BREAK = 4,
+ T_CASE = 5,
+ T_CATCH = 6,
+ T_COLON = 7,
+ T_COMMA = 8,
+ T_COMMENT = 88,
+ T_CONST = 84,
+ T_CONTINUE = 9,
+ T_DEBUGGER = 85,
+ T_DEFAULT = 10,
+ T_DELETE = 11,
+ T_DIVIDE_ = 12,
+ T_DIVIDE_EQ = 13,
+ T_DO = 14,
+ T_DOT = 15,
+ T_ELSE = 16,
+ T_EQ = 17,
+ T_EQ_EQ = 18,
+ T_EQ_EQ_EQ = 19,
+ T_FALSE = 83,
+ T_FEED_JS_EXPRESSION = 96,
+ T_FEED_JS_PROGRAM = 98,
+ T_FEED_JS_SOURCE_ELEMENT = 97,
+ T_FEED_JS_STATEMENT = 95,
+ T_FEED_UI_OBJECT_MEMBER = 94,
+ T_FEED_UI_PROGRAM = 93,
+ T_FINALLY = 20,
+ T_FOR = 21,
+ T_FUNCTION = 22,
+ T_GE = 23,
+ T_GT = 24,
+ T_GT_GT = 25,
+ T_GT_GT_EQ = 26,
+ T_GT_GT_GT = 27,
+ T_GT_GT_GT_EQ = 28,
+ T_IDENTIFIER = 29,
+ T_IF = 30,
+ T_IMPORT = 90,
+ T_IN = 31,
+ T_INSTANCEOF = 32,
+ T_LBRACE = 33,
+ T_LBRACKET = 34,
+ T_LE = 35,
+ T_LPAREN = 36,
+ T_LT = 37,
+ T_LT_LT = 38,
+ T_LT_LT_EQ = 39,
+ T_MINUS = 40,
+ T_MINUS_EQ = 41,
+ T_MINUS_MINUS = 42,
+ T_MULTILINE_STRING_LITERAL = 87,
+ T_NEW = 43,
+ T_NOT = 44,
+ T_NOT_EQ = 45,
+ T_NOT_EQ_EQ = 46,
+ T_NULL = 81,
+ T_NUMERIC_LITERAL = 47,
+ T_ON = 92,
+ T_OR = 48,
+ T_OR_EQ = 49,
+ T_OR_OR = 50,
+ T_PLUS = 51,
+ T_PLUS_EQ = 52,
+ T_PLUS_PLUS = 53,
+ T_PROPERTY = 66,
+ T_PUBLIC = 89,
+ T_QUESTION = 54,
+ T_RBRACE = 55,
+ T_RBRACKET = 56,
+ T_READONLY = 68,
+ T_REMAINDER = 57,
+ T_REMAINDER_EQ = 58,
+ T_RESERVED_WORD = 86,
+ T_RETURN = 59,
+ T_RPAREN = 60,
+ T_SEMICOLON = 61,
+ T_SIGNAL = 67,
+ T_STAR = 63,
+ T_STAR_EQ = 64,
+ T_STRING_LITERAL = 65,
+ T_SWITCH = 69,
+ T_THIS = 70,
+ T_THROW = 71,
+ T_TILDE = 72,
+ T_TRUE = 82,
+ T_TRY = 73,
+ T_TYPEOF = 74,
+ T_VAR = 75,
+ T_VOID = 76,
+ T_WHILE = 77,
+ T_WITH = 78,
+ T_XOR = 79,
+ T_XOR_EQ = 80,
+
+ ACCEPT_STATE = 639,
+ RULE_COUNT = 345,
+ STATE_COUNT = 640,
+ TERMINAL_COUNT = 101,
+ NON_TERMINAL_COUNT = 106,
+
+ GOTO_INDEX_OFFSET = 640,
+ GOTO_INFO_OFFSET = 2699,
+ GOTO_CHECK_OFFSET = 2699
+ };
+
+ static const char *const spell [];
+ static const short lhs [];
+ static const short rhs [];
+ static const short goto_default [];
+ static const short action_default [];
+ static const short action_index [];
+ static const short action_info [];
+ static const short action_check [];
+
+ static inline int nt_action (int state, int nt)
+ {
+ const int yyn = action_index [GOTO_INDEX_OFFSET + state] + nt;
+ if (yyn < 0 || action_check [GOTO_CHECK_OFFSET + yyn] != nt)
+ return goto_default [nt];
+
+ return action_info [GOTO_INFO_OFFSET + yyn];
+ }
+
+ static inline int t_action (int state, int token)
+ {
+ const int yyn = action_index [state] + token;
+
+ if (yyn < 0 || action_check [yyn] != token)
+ return - action_default [state];
+
+ return action_info [yyn];
+ }
+};
+
+
+QT_END_NAMESPACE
+#endif // QDECLARATIVEJSGRAMMAR_P_H
+
diff --git a/src/declarative/qml/parser/qdeclarativejslexer.cpp b/src/declarative/qml/parser/qdeclarativejslexer.cpp
new file mode 100644
index 0000000000..34163a4c98
--- /dev/null
+++ b/src/declarative/qml/parser/qdeclarativejslexer.cpp
@@ -0,0 +1,1163 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "qdeclarativejslexer_p.h"
+
+#include "qdeclarativejsglobal_p.h"
+#include "qdeclarativejsengine_p.h"
+#include "qdeclarativejsgrammar_p.h"
+
+#include <QtCore/qcoreapplication.h>
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+QT_QML_BEGIN_NAMESPACE
+
+extern double qstrtod(const char *s00, char const **se, bool *ok);
+
+#define shiftWindowsLineBreak() \
+ do { \
+ if (((current == '\r') && (next1 == '\n')) \
+ || ((current == '\n') && (next1 == '\r'))) { \
+ shift(1); \
+ } \
+ } \
+ while (0)
+
+namespace QDeclarativeJS {
+extern double integerFromString(const char *buf, int size, int radix);
+}
+
+using namespace QDeclarativeJS;
+
+Lexer::Lexer(Engine *eng, bool tokenizeComments)
+ : driver(eng),
+ yylineno(0),
+ done(false),
+ size8(128), size16(128),
+ pos8(0), pos16(0),
+ terminator(false),
+ restrKeyword(false),
+ delimited(false),
+ stackToken(-1),
+ state(Start),
+ pos(0),
+ code(0), length(0),
+ yycolumn(0),
+ startpos(0),
+ startlineno(0), startcolumn(0),
+ bol(true),
+ current(0), next1(0), next2(0), next3(0),
+ err(NoError),
+ wantRx(false),
+ check_reserved(true),
+ parenthesesState(IgnoreParentheses),
+ parenthesesCount(0),
+ prohibitAutomaticSemicolon(false),
+ tokenizeComments(tokenizeComments)
+{
+ driver->setLexer(this);
+ // allocate space for read buffers
+ buffer8 = new char[size8];
+ buffer16 = new QChar[size16];
+ pattern = 0;
+ flags = 0;
+
+}
+
+Lexer::~Lexer()
+{
+ delete [] buffer8;
+ delete [] buffer16;
+}
+
+void Lexer::setCode(const QString &c, int lineno)
+{
+ errmsg = QString();
+ yylineno = lineno;
+ yycolumn = 1;
+ restrKeyword = false;
+ delimited = false;
+ stackToken = -1;
+ pos = 0;
+ code = c.unicode();
+ length = c.length();
+ bol = true;
+
+ // read first characters
+ current = (length > 0) ? code[0].unicode() : 0;
+ next1 = (length > 1) ? code[1].unicode() : 0;
+ next2 = (length > 2) ? code[2].unicode() : 0;
+ next3 = (length > 3) ? code[3].unicode() : 0;
+}
+
+void Lexer::shift(uint p)
+{
+ while (p--) {
+ ++pos;
+ ++yycolumn;
+ current = next1;
+ next1 = next2;
+ next2 = next3;
+ next3 = (pos + 3 < length) ? code[pos+3].unicode() : 0;
+ }
+}
+
+void Lexer::setDone(State s)
+{
+ state = s;
+ done = true;
+}
+
+int Lexer::findReservedWord(const QChar *c, int size) const
+{
+ switch (size) {
+ case 2: {
+ if (c[0] == QLatin1Char('d') && c[1] == QLatin1Char('o'))
+ return QDeclarativeJSGrammar::T_DO;
+ else if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('f'))
+ return QDeclarativeJSGrammar::T_IF;
+ else if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('n'))
+ return QDeclarativeJSGrammar::T_IN;
+ else if (c[0] == QLatin1Char('a') && c[1] == QLatin1Char('s'))
+ return QDeclarativeJSGrammar::T_AS;
+ else if (c[0] == QLatin1Char('o') && c[1] == QLatin1Char('n'))
+ return QDeclarativeJSGrammar::T_ON;
+ } break;
+
+ case 3: {
+ if (c[0] == QLatin1Char('f') && c[1] == QLatin1Char('o') && c[2] == QLatin1Char('r'))
+ return QDeclarativeJSGrammar::T_FOR;
+ else if (c[0] == QLatin1Char('n') && c[1] == QLatin1Char('e') && c[2] == QLatin1Char('w'))
+ return QDeclarativeJSGrammar::T_NEW;
+ else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('r') && c[2] == QLatin1Char('y'))
+ return QDeclarativeJSGrammar::T_TRY;
+ else if (c[0] == QLatin1Char('v') && c[1] == QLatin1Char('a') && c[2] == QLatin1Char('r'))
+ return QDeclarativeJSGrammar::T_VAR;
+ else if (check_reserved) {
+ if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('n') && c[2] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ }
+ } break;
+
+ case 4: {
+ if (c[0] == QLatin1Char('c') && c[1] == QLatin1Char('a')
+ && c[2] == QLatin1Char('s') && c[3] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_CASE;
+ else if (c[0] == QLatin1Char('e') && c[1] == QLatin1Char('l')
+ && c[2] == QLatin1Char('s') && c[3] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_ELSE;
+ else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('h')
+ && c[2] == QLatin1Char('i') && c[3] == QLatin1Char('s'))
+ return QDeclarativeJSGrammar::T_THIS;
+ else if (c[0] == QLatin1Char('v') && c[1] == QLatin1Char('o')
+ && c[2] == QLatin1Char('i') && c[3] == QLatin1Char('d'))
+ return QDeclarativeJSGrammar::T_VOID;
+ else if (c[0] == QLatin1Char('w') && c[1] == QLatin1Char('i')
+ && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('h'))
+ return QDeclarativeJSGrammar::T_WITH;
+ else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('r')
+ && c[2] == QLatin1Char('u') && c[3] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_TRUE;
+ else if (c[0] == QLatin1Char('n') && c[1] == QLatin1Char('u')
+ && c[2] == QLatin1Char('l') && c[3] == QLatin1Char('l'))
+ return QDeclarativeJSGrammar::T_NULL;
+ else if (check_reserved) {
+ if (c[0] == QLatin1Char('e') && c[1] == QLatin1Char('n')
+ && c[2] == QLatin1Char('u') && c[3] == QLatin1Char('m'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('b') && c[1] == QLatin1Char('y')
+ && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('l') && c[1] == QLatin1Char('o')
+ && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('g'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('c') && c[1] == QLatin1Char('h')
+ && c[2] == QLatin1Char('a') && c[3] == QLatin1Char('r'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('g') && c[1] == QLatin1Char('o')
+ && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('o'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ }
+ } break;
+
+ case 5: {
+ if (c[0] == QLatin1Char('b') && c[1] == QLatin1Char('r')
+ && c[2] == QLatin1Char('e') && c[3] == QLatin1Char('a')
+ && c[4] == QLatin1Char('k'))
+ return QDeclarativeJSGrammar::T_BREAK;
+ else if (c[0] == QLatin1Char('c') && c[1] == QLatin1Char('a')
+ && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('c')
+ && c[4] == QLatin1Char('h'))
+ return QDeclarativeJSGrammar::T_CATCH;
+ else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('h')
+ && c[2] == QLatin1Char('r') && c[3] == QLatin1Char('o')
+ && c[4] == QLatin1Char('w'))
+ return QDeclarativeJSGrammar::T_THROW;
+ else if (c[0] == QLatin1Char('w') && c[1] == QLatin1Char('h')
+ && c[2] == QLatin1Char('i') && c[3] == QLatin1Char('l')
+ && c[4] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_WHILE;
+ else if (c[0] == QLatin1Char('c') && c[1] == QLatin1Char('o')
+ && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('s')
+ && c[4] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_CONST;
+ else if (c[0] == QLatin1Char('f') && c[1] == QLatin1Char('a')
+ && c[2] == QLatin1Char('l') && c[3] == QLatin1Char('s')
+ && c[4] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_FALSE;
+ else if (check_reserved) {
+ if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('h')
+ && c[2] == QLatin1Char('o') && c[3] == QLatin1Char('r')
+ && c[4] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('u')
+ && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('e')
+ && c[4] == QLatin1Char('r'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('f') && c[1] == QLatin1Char('i')
+ && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('a')
+ && c[4] == QLatin1Char('l'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('c') && c[1] == QLatin1Char('l')
+ && c[2] == QLatin1Char('a') && c[3] == QLatin1Char('s')
+ && c[4] == QLatin1Char('s'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('f') && c[1] == QLatin1Char('l')
+ && c[2] == QLatin1Char('o') && c[3] == QLatin1Char('a')
+ && c[4] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ }
+ } break;
+
+ case 6: {
+ if (c[0] == QLatin1Char('d') && c[1] == QLatin1Char('e')
+ && c[2] == QLatin1Char('l') && c[3] == QLatin1Char('e')
+ && c[4] == QLatin1Char('t') && c[5] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_DELETE;
+ else if (c[0] == QLatin1Char('r') && c[1] == QLatin1Char('e')
+ && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('u')
+ && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('n'))
+ return QDeclarativeJSGrammar::T_RETURN;
+ else if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('w')
+ && c[2] == QLatin1Char('i') && c[3] == QLatin1Char('t')
+ && c[4] == QLatin1Char('c') && c[5] == QLatin1Char('h'))
+ return QDeclarativeJSGrammar::T_SWITCH;
+ else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('y')
+ && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('e')
+ && c[4] == QLatin1Char('o') && c[5] == QLatin1Char('f'))
+ return QDeclarativeJSGrammar::T_TYPEOF;
+ else if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('m')
+ && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('o')
+ && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_IMPORT;
+ else if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('i')
+ && c[2] == QLatin1Char('g') && c[3] == QLatin1Char('n')
+ && c[4] == QLatin1Char('a') && c[5] == QLatin1Char('l'))
+ return QDeclarativeJSGrammar::T_SIGNAL;
+ else if (check_reserved) {
+ if (c[0] == QLatin1Char('e') && c[1] == QLatin1Char('x')
+ && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('o')
+ && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('t')
+ && c[2] == QLatin1Char('a') && c[3] == QLatin1Char('t')
+ && c[4] == QLatin1Char('i') && c[5] == QLatin1Char('c'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('d') && c[1] == QLatin1Char('o')
+ && c[2] == QLatin1Char('u') && c[3] == QLatin1Char('b')
+ && c[4] == QLatin1Char('l') && c[5] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('m')
+ && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('o')
+ && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('p') && c[1] == QLatin1Char('u')
+ && c[2] == QLatin1Char('b') && c[3] == QLatin1Char('l')
+ && c[4] == QLatin1Char('i') && c[5] == QLatin1Char('c'))
+ return QDeclarativeJSGrammar::T_PUBLIC;
+ else if (c[0] == QLatin1Char('n') && c[1] == QLatin1Char('a')
+ && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('i')
+ && c[4] == QLatin1Char('v') && c[5] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('h')
+ && c[2] == QLatin1Char('r') && c[3] == QLatin1Char('o')
+ && c[4] == QLatin1Char('w') && c[5] == QLatin1Char('s'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ }
+ } break;
+
+ case 7: {
+ if (c[0] == QLatin1Char('d') && c[1] == QLatin1Char('e')
+ && c[2] == QLatin1Char('f') && c[3] == QLatin1Char('a')
+ && c[4] == QLatin1Char('u') && c[5] == QLatin1Char('l')
+ && c[6] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_DEFAULT;
+ else if (c[0] == QLatin1Char('f') && c[1] == QLatin1Char('i')
+ && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('a')
+ && c[4] == QLatin1Char('l') && c[5] == QLatin1Char('l')
+ && c[6] == QLatin1Char('y'))
+ return QDeclarativeJSGrammar::T_FINALLY;
+ else if (check_reserved) {
+ if (c[0] == QLatin1Char('b') && c[1] == QLatin1Char('o')
+ && c[2] == QLatin1Char('o') && c[3] == QLatin1Char('l')
+ && c[4] == QLatin1Char('e') && c[5] == QLatin1Char('a')
+ && c[6] == QLatin1Char('n'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('e') && c[1] == QLatin1Char('x')
+ && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('e')
+ && c[4] == QLatin1Char('n') && c[5] == QLatin1Char('d')
+ && c[6] == QLatin1Char('s'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('p') && c[1] == QLatin1Char('a')
+ && c[2] == QLatin1Char('c') && c[3] == QLatin1Char('k')
+ && c[4] == QLatin1Char('a') && c[5] == QLatin1Char('g')
+ && c[6] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('p') && c[1] == QLatin1Char('r')
+ && c[2] == QLatin1Char('i') && c[3] == QLatin1Char('v')
+ && c[4] == QLatin1Char('a') && c[5] == QLatin1Char('t')
+ && c[6] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ }
+ } break;
+
+ case 8: {
+ if (c[0] == QLatin1Char('c') && c[1] == QLatin1Char('o')
+ && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('t')
+ && c[4] == QLatin1Char('i') && c[5] == QLatin1Char('n')
+ && c[6] == QLatin1Char('u') && c[7] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_CONTINUE;
+ else if (c[0] == QLatin1Char('f') && c[1] == QLatin1Char('u')
+ && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('c')
+ && c[4] == QLatin1Char('t') && c[5] == QLatin1Char('i')
+ && c[6] == QLatin1Char('o') && c[7] == QLatin1Char('n'))
+ return QDeclarativeJSGrammar::T_FUNCTION;
+ else if (c[0] == QLatin1Char('d') && c[1] == QLatin1Char('e')
+ && c[2] == QLatin1Char('b') && c[3] == QLatin1Char('u')
+ && c[4] == QLatin1Char('g') && c[5] == QLatin1Char('g')
+ && c[6] == QLatin1Char('e') && c[7] == QLatin1Char('r'))
+ return QDeclarativeJSGrammar::T_DEBUGGER;
+ else if (c[0] == QLatin1Char('p') && c[1] == QLatin1Char('r')
+ && c[2] == QLatin1Char('o') && c[3] == QLatin1Char('p')
+ && c[4] == QLatin1Char('e') && c[5] == QLatin1Char('r')
+ && c[6] == QLatin1Char('t') && c[7] == QLatin1Char('y'))
+ return QDeclarativeJSGrammar::T_PROPERTY;
+ else if (c[0] == QLatin1Char('r') && c[1] == QLatin1Char('e')
+ && c[2] == QLatin1Char('a') && c[3] == QLatin1Char('d')
+ && c[4] == QLatin1Char('o') && c[5] == QLatin1Char('n')
+ && c[6] == QLatin1Char('l') && c[7] == QLatin1Char('y'))
+ return QDeclarativeJSGrammar::T_READONLY;
+ else if (check_reserved) {
+ if (c[0] == QLatin1Char('a') && c[1] == QLatin1Char('b')
+ && c[2] == QLatin1Char('s') && c[3] == QLatin1Char('t')
+ && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('a')
+ && c[6] == QLatin1Char('c') && c[7] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('v') && c[1] == QLatin1Char('o')
+ && c[2] == QLatin1Char('l') && c[3] == QLatin1Char('a')
+ && c[4] == QLatin1Char('t') && c[5] == QLatin1Char('i')
+ && c[6] == QLatin1Char('l') && c[7] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ }
+ } break;
+
+ case 9: {
+ if (check_reserved) {
+ if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('n')
+ && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('e')
+ && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('f')
+ && c[6] == QLatin1Char('a') && c[7] == QLatin1Char('c')
+ && c[8] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('r')
+ && c[2] == QLatin1Char('a') && c[3] == QLatin1Char('n')
+ && c[4] == QLatin1Char('s') && c[5] == QLatin1Char('i')
+ && c[6] == QLatin1Char('e') && c[7] == QLatin1Char('n')
+ && c[8] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('p') && c[1] == QLatin1Char('r')
+ && c[2] == QLatin1Char('o') && c[3] == QLatin1Char('t')
+ && c[4] == QLatin1Char('e') && c[5] == QLatin1Char('c')
+ && c[6] == QLatin1Char('t') && c[7] == QLatin1Char('e')
+ && c[8] == QLatin1Char('d'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ }
+ } break;
+
+ case 10: {
+ if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('n')
+ && c[2] == QLatin1Char('s') && c[3] == QLatin1Char('t')
+ && c[4] == QLatin1Char('a') && c[5] == QLatin1Char('n')
+ && c[6] == QLatin1Char('c') && c[7] == QLatin1Char('e')
+ && c[8] == QLatin1Char('o') && c[9] == QLatin1Char('f'))
+ return QDeclarativeJSGrammar::T_INSTANCEOF;
+ else if (check_reserved) {
+ if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('m')
+ && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('l')
+ && c[4] == QLatin1Char('e') && c[5] == QLatin1Char('m')
+ && c[6] == QLatin1Char('e') && c[7] == QLatin1Char('n')
+ && c[8] == QLatin1Char('t') && c[9] == QLatin1Char('s'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ }
+ } break;
+
+ case 12: {
+ if (check_reserved) {
+ if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('y')
+ && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('c')
+ && c[4] == QLatin1Char('h') && c[5] == QLatin1Char('r')
+ && c[6] == QLatin1Char('o') && c[7] == QLatin1Char('n')
+ && c[8] == QLatin1Char('i') && c[9] == QLatin1Char('z')
+ && c[10] == QLatin1Char('e') && c[11] == QLatin1Char('d'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ }
+ } break;
+
+ } // switch
+
+ return -1;
+}
+
+int Lexer::lex()
+{
+ int token = 0;
+ state = Start;
+ ushort stringType = 0; // either single or double quotes
+ bool multiLineString = false;
+ pos8 = pos16 = 0;
+ done = false;
+ terminator = false;
+
+ // did we push a token on the stack previously ?
+ // (after an automatic semicolon insertion)
+ if (stackToken >= 0) {
+ setDone(Other);
+ token = stackToken;
+ stackToken = -1;
+ }
+
+ while (!done) {
+ switch (state) {
+ case Start:
+ if (isWhiteSpace()) {
+ // do nothing
+ } else if (current == '/' && next1 == '/') {
+ recordStartPos();
+ shift(1);
+ state = InSingleLineComment;
+ } else if (current == '/' && next1 == '*') {
+ recordStartPos();
+ shift(1);
+ state = InMultiLineComment;
+ } else if (current == 0) {
+ syncProhibitAutomaticSemicolon();
+ if (!terminator && !delimited && !prohibitAutomaticSemicolon) {
+ // automatic semicolon insertion if program incomplete
+ token = QDeclarativeJSGrammar::T_SEMICOLON;
+ stackToken = 0;
+ setDone(Other);
+ } else {
+ setDone(Eof);
+ }
+ } else if (isLineTerminator()) {
+ shiftWindowsLineBreak();
+ yylineno++;
+ yycolumn = 0;
+ bol = true;
+ terminator = true;
+ syncProhibitAutomaticSemicolon();
+ if (restrKeyword) {
+ token = QDeclarativeJSGrammar::T_SEMICOLON;
+ setDone(Other);
+ }
+ } else if (current == '"' || current == '\'') {
+ recordStartPos();
+ state = InString;
+ multiLineString = false;
+ stringType = current;
+ } else if (isIdentLetter(current)) {
+ recordStartPos();
+ record16(current);
+ state = InIdentifier;
+ } else if (current == '0') {
+ recordStartPos();
+ record8(current);
+ state = InNum0;
+ } else if (isDecimalDigit(current)) {
+ recordStartPos();
+ record8(current);
+ state = InNum;
+ } else if (current == '.' && isDecimalDigit(next1)) {
+ recordStartPos();
+ record8(current);
+ state = InDecimal;
+ } else {
+ recordStartPos();
+ token = matchPunctuator(current, next1, next2, next3);
+ if (token != -1) {
+ if (terminator && !delimited && !prohibitAutomaticSemicolon
+ && (token == QDeclarativeJSGrammar::T_PLUS_PLUS
+ || token == QDeclarativeJSGrammar::T_MINUS_MINUS)) {
+ // automatic semicolon insertion
+ stackToken = token;
+ token = QDeclarativeJSGrammar::T_SEMICOLON;
+ }
+ setDone(Other);
+ }
+ else {
+ setDone(Bad);
+ err = IllegalCharacter;
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Illegal character");
+ }
+ }
+ break;
+ case InString:
+ if (current == stringType) {
+ shift(1);
+ setDone(String);
+ } else if (isLineTerminator()) {
+ multiLineString = true;
+ record16(current);
+ } else if (current == 0 || isLineTerminator()) {
+ setDone(Bad);
+ err = UnclosedStringLiteral;
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Unclosed string at end of line");
+ } else if (current == '\\') {
+ state = InEscapeSequence;
+ } else {
+ record16(current);
+ }
+ break;
+ // Escape Sequences inside of strings
+ case InEscapeSequence:
+ if (isOctalDigit(current)) {
+ if (current >= '0' && current <= '3' &&
+ isOctalDigit(next1) && isOctalDigit(next2)) {
+ record16(convertOctal(current, next1, next2));
+ shift(2);
+ state = InString;
+ } else if (isOctalDigit(current) &&
+ isOctalDigit(next1)) {
+ record16(convertOctal('0', current, next1));
+ shift(1);
+ state = InString;
+ } else if (isOctalDigit(current)) {
+ record16(convertOctal('0', '0', current));
+ state = InString;
+ } else {
+ setDone(Bad);
+ err = IllegalEscapeSequence;
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Illegal escape squence");
+ }
+ } else if (current == 'x')
+ state = InHexEscape;
+ else if (current == 'u')
+ state = InUnicodeEscape;
+ else {
+ if (isLineTerminator()) {
+ shiftWindowsLineBreak();
+ yylineno++;
+ yycolumn = 0;
+ bol = true;
+ } else {
+ record16(singleEscape(current));
+ }
+ state = InString;
+ }
+ break;
+ case InHexEscape:
+ if (isHexDigit(current) && isHexDigit(next1)) {
+ state = InString;
+ record16(QLatin1Char(convertHex(current, next1)));
+ shift(1);
+ } else if (current == stringType) {
+ record16(QLatin1Char('x'));
+ shift(1);
+ setDone(String);
+ } else {
+ record16(QLatin1Char('x'));
+ record16(current);
+ state = InString;
+ }
+ break;
+ case InUnicodeEscape:
+ if (isHexDigit(current) && isHexDigit(next1) &&
+ isHexDigit(next2) && isHexDigit(next3)) {
+ record16(convertUnicode(current, next1, next2, next3));
+ shift(3);
+ state = InString;
+ } else if (current == stringType) {
+ record16(QLatin1Char('u'));
+ shift(1);
+ setDone(String);
+ } else {
+ setDone(Bad);
+ err = IllegalUnicodeEscapeSequence;
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Illegal unicode escape sequence");
+ }
+ break;
+ case InSingleLineComment:
+ if (isLineTerminator()) {
+ shiftWindowsLineBreak();
+ yylineno++;
+ yycolumn = 0;
+ terminator = true;
+ bol = true;
+ if (restrKeyword) {
+ token = QDeclarativeJSGrammar::T_SEMICOLON;
+ setDone(Other);
+ } else
+ state = Start;
+ driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
+ } else if (current == 0) {
+ driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
+ setDone(Eof);
+ }
+
+ break;
+ case InMultiLineComment:
+ if (current == 0) {
+ setDone(Bad);
+ err = UnclosedComment;
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Unclosed comment at end of file");
+ driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
+ } else if (isLineTerminator()) {
+ shiftWindowsLineBreak();
+ yylineno++;
+ } else if (current == '*' && next1 == '/') {
+ state = Start;
+ shift(1);
+ driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
+ }
+
+ break;
+ case InIdentifier:
+ if (isIdentLetter(current) || isDecimalDigit(current)) {
+ record16(current);
+ break;
+ }
+ setDone(Identifier);
+ break;
+ case InNum0:
+ if (current == 'x' || current == 'X') {
+ record8(current);
+ state = InHex;
+ } else if (current == '.') {
+ record8(current);
+ state = InDecimal;
+ } else if (current == 'e' || current == 'E') {
+ record8(current);
+ state = InExponentIndicator;
+ } else if (isOctalDigit(current)) {
+ record8(current);
+ state = InOctal;
+ } else if (isDecimalDigit(current)) {
+ record8(current);
+ state = InDecimal;
+ } else {
+ setDone(Number);
+ }
+ break;
+ case InHex:
+ if (isHexDigit(current))
+ record8(current);
+ else
+ setDone(Hex);
+ break;
+ case InOctal:
+ if (isOctalDigit(current)) {
+ record8(current);
+ } else if (isDecimalDigit(current)) {
+ record8(current);
+ state = InDecimal;
+ } else {
+ setDone(Octal);
+ }
+ break;
+ case InNum:
+ if (isDecimalDigit(current)) {
+ record8(current);
+ } else if (current == '.') {
+ record8(current);
+ state = InDecimal;
+ } else if (current == 'e' || current == 'E') {
+ record8(current);
+ state = InExponentIndicator;
+ } else {
+ setDone(Number);
+ }
+ break;
+ case InDecimal:
+ if (isDecimalDigit(current)) {
+ record8(current);
+ } else if (current == 'e' || current == 'E') {
+ record8(current);
+ state = InExponentIndicator;
+ } else {
+ setDone(Number);
+ }
+ break;
+ case InExponentIndicator:
+ if (current == '+' || current == '-') {
+ record8(current);
+ } else if (isDecimalDigit(current)) {
+ record8(current);
+ state = InExponent;
+ } else {
+ setDone(Bad);
+ err = IllegalExponentIndicator;
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Illegal syntax for exponential number");
+ }
+ break;
+ case InExponent:
+ if (isDecimalDigit(current)) {
+ record8(current);
+ } else {
+ setDone(Number);
+ }
+ break;
+ default:
+ Q_ASSERT_X(0, "Lexer::lex", "Unhandled state in switch statement");
+ }
+
+ // move on to the next character
+ if (!done)
+ shift(1);
+ if (state != Start && state != InSingleLineComment)
+ bol = false;
+ }
+
+ // no identifiers allowed directly after numeric literal, e.g. "3in" is bad
+ if ((state == Number || state == Octal || state == Hex)
+ && isIdentLetter(current)) {
+ state = Bad;
+ err = IllegalIdentifier;
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Identifier cannot start with numeric literal");
+ }
+
+ // terminate string
+ buffer8[pos8] = '\0';
+
+ double dval = 0;
+ if (state == Number) {
+ dval = qstrtod(buffer8, 0, 0);
+ } else if (state == Hex) { // scan hex numbers
+ dval = integerFromString(buffer8, pos8, 16);
+ state = Number;
+ } else if (state == Octal) { // scan octal number
+ dval = integerFromString(buffer8, pos8, 8);
+ state = Number;
+ }
+
+ restrKeyword = false;
+ delimited = false;
+
+ switch (parenthesesState) {
+ case IgnoreParentheses:
+ break;
+ case CountParentheses:
+ if (token == QDeclarativeJSGrammar::T_RPAREN) {
+ --parenthesesCount;
+ if (parenthesesCount == 0)
+ parenthesesState = BalancedParentheses;
+ } else if (token == QDeclarativeJSGrammar::T_LPAREN) {
+ ++parenthesesCount;
+ }
+ break;
+ case BalancedParentheses:
+ parenthesesState = IgnoreParentheses;
+ break;
+ }
+
+ switch (state) {
+ case Eof:
+ return 0;
+ case Other:
+ if (token == QDeclarativeJSGrammar::T_RBRACE || token == QDeclarativeJSGrammar::T_SEMICOLON)
+ delimited = true;
+ return token;
+ case Identifier:
+ if ((token = findReservedWord(buffer16, pos16)) < 0) {
+ /* TODO: close leak on parse error. same holds true for String */
+ if (driver)
+ qsyylval.ustr = driver->intern(buffer16, pos16);
+ else
+ qsyylval.ustr = 0;
+ return QDeclarativeJSGrammar::T_IDENTIFIER;
+ }
+ if (token == QDeclarativeJSGrammar::T_CONTINUE || token == QDeclarativeJSGrammar::T_BREAK
+ || token == QDeclarativeJSGrammar::T_RETURN || token == QDeclarativeJSGrammar::T_THROW) {
+ restrKeyword = true;
+ } else if (token == QDeclarativeJSGrammar::T_IF || token == QDeclarativeJSGrammar::T_FOR
+ || token == QDeclarativeJSGrammar::T_WHILE || token == QDeclarativeJSGrammar::T_WITH) {
+ parenthesesState = CountParentheses;
+ parenthesesCount = 0;
+ } else if (token == QDeclarativeJSGrammar::T_DO) {
+ parenthesesState = BalancedParentheses;
+ }
+ return token;
+ case String:
+ if (driver)
+ qsyylval.ustr = driver->intern(buffer16, pos16);
+ else
+ qsyylval.ustr = 0;
+ return multiLineString?QDeclarativeJSGrammar::T_MULTILINE_STRING_LITERAL:QDeclarativeJSGrammar::T_STRING_LITERAL;
+ case Number:
+ qsyylval.dval = dval;
+ return QDeclarativeJSGrammar::T_NUMERIC_LITERAL;
+ case Bad:
+ return -1;
+ default:
+ Q_ASSERT(!"unhandled numeration value in switch");
+ return -1;
+ }
+}
+
+bool Lexer::isWhiteSpace() const
+{
+ return (current == ' ' || current == '\t' ||
+ current == 0x0b || current == 0x0c);
+}
+
+bool Lexer::isLineTerminator() const
+{
+ return (current == '\n' || current == '\r');
+}
+
+bool Lexer::isIdentLetter(ushort c)
+{
+ // ASCII-biased, since all reserved words are ASCII, aand hence the
+ // bulk of content to be parsed.
+ if ((c >= 'a' && c <= 'z')
+ || (c >= 'A' && c <= 'Z')
+ || c == '$'
+ || c == '_')
+ return true;
+ if (c < 128)
+ return false;
+ return QChar(c).isLetterOrNumber();
+}
+
+bool Lexer::isDecimalDigit(ushort c)
+{
+ return (c >= '0' && c <= '9');
+}
+
+bool Lexer::isHexDigit(ushort c) const
+{
+ return ((c >= '0' && c <= '9')
+ || (c >= 'a' && c <= 'f')
+ || (c >= 'A' && c <= 'F'));
+}
+
+bool Lexer::isOctalDigit(ushort c) const
+{
+ return (c >= '0' && c <= '7');
+}
+
+int Lexer::matchPunctuator(ushort c1, ushort c2,
+ ushort c3, ushort c4)
+{
+ if (c1 == '>' && c2 == '>' && c3 == '>' && c4 == '=') {
+ shift(4);
+ return QDeclarativeJSGrammar::T_GT_GT_GT_EQ;
+ } else if (c1 == '=' && c2 == '=' && c3 == '=') {
+ shift(3);
+ return QDeclarativeJSGrammar::T_EQ_EQ_EQ;
+ } else if (c1 == '!' && c2 == '=' && c3 == '=') {
+ shift(3);
+ return QDeclarativeJSGrammar::T_NOT_EQ_EQ;
+ } else if (c1 == '>' && c2 == '>' && c3 == '>') {
+ shift(3);
+ return QDeclarativeJSGrammar::T_GT_GT_GT;
+ } else if (c1 == '<' && c2 == '<' && c3 == '=') {
+ shift(3);
+ return QDeclarativeJSGrammar::T_LT_LT_EQ;
+ } else if (c1 == '>' && c2 == '>' && c3 == '=') {
+ shift(3);
+ return QDeclarativeJSGrammar::T_GT_GT_EQ;
+ } else if (c1 == '<' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_LE;
+ } else if (c1 == '>' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_GE;
+ } else if (c1 == '!' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_NOT_EQ;
+ } else if (c1 == '+' && c2 == '+') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_PLUS_PLUS;
+ } else if (c1 == '-' && c2 == '-') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_MINUS_MINUS;
+ } else if (c1 == '=' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_EQ_EQ;
+ } else if (c1 == '+' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_PLUS_EQ;
+ } else if (c1 == '-' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_MINUS_EQ;
+ } else if (c1 == '*' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_STAR_EQ;
+ } else if (c1 == '/' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_DIVIDE_EQ;
+ } else if (c1 == '&' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_AND_EQ;
+ } else if (c1 == '^' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_XOR_EQ;
+ } else if (c1 == '%' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_REMAINDER_EQ;
+ } else if (c1 == '|' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_OR_EQ;
+ } else if (c1 == '<' && c2 == '<') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_LT_LT;
+ } else if (c1 == '>' && c2 == '>') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_GT_GT;
+ } else if (c1 == '&' && c2 == '&') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_AND_AND;
+ } else if (c1 == '|' && c2 == '|') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_OR_OR;
+ }
+
+ switch(c1) {
+ case '=': shift(1); return QDeclarativeJSGrammar::T_EQ;
+ case '>': shift(1); return QDeclarativeJSGrammar::T_GT;
+ case '<': shift(1); return QDeclarativeJSGrammar::T_LT;
+ case ',': shift(1); return QDeclarativeJSGrammar::T_COMMA;
+ case '!': shift(1); return QDeclarativeJSGrammar::T_NOT;
+ case '~': shift(1); return QDeclarativeJSGrammar::T_TILDE;
+ case '?': shift(1); return QDeclarativeJSGrammar::T_QUESTION;
+ case ':': shift(1); return QDeclarativeJSGrammar::T_COLON;
+ case '.': shift(1); return QDeclarativeJSGrammar::T_DOT;
+ case '+': shift(1); return QDeclarativeJSGrammar::T_PLUS;
+ case '-': shift(1); return QDeclarativeJSGrammar::T_MINUS;
+ case '*': shift(1); return QDeclarativeJSGrammar::T_STAR;
+ case '/': shift(1); return QDeclarativeJSGrammar::T_DIVIDE_;
+ case '&': shift(1); return QDeclarativeJSGrammar::T_AND;
+ case '|': shift(1); return QDeclarativeJSGrammar::T_OR;
+ case '^': shift(1); return QDeclarativeJSGrammar::T_XOR;
+ case '%': shift(1); return QDeclarativeJSGrammar::T_REMAINDER;
+ case '(': shift(1); return QDeclarativeJSGrammar::T_LPAREN;
+ case ')': shift(1); return QDeclarativeJSGrammar::T_RPAREN;
+ case '{': shift(1); return QDeclarativeJSGrammar::T_LBRACE;
+ case '}': shift(1); return QDeclarativeJSGrammar::T_RBRACE;
+ case '[': shift(1); return QDeclarativeJSGrammar::T_LBRACKET;
+ case ']': shift(1); return QDeclarativeJSGrammar::T_RBRACKET;
+ case ';': shift(1); return QDeclarativeJSGrammar::T_SEMICOLON;
+
+ default: return -1;
+ }
+}
+
+ushort Lexer::singleEscape(ushort c) const
+{
+ switch(c) {
+ case 'b':
+ return 0x08;
+ case 't':
+ return 0x09;
+ case 'n':
+ return 0x0A;
+ case 'v':
+ return 0x0B;
+ case 'f':
+ return 0x0C;
+ case 'r':
+ return 0x0D;
+ case '"':
+ return 0x22;
+ case '\'':
+ return 0x27;
+ case '\\':
+ return 0x5C;
+ default:
+ return c;
+ }
+}
+
+ushort Lexer::convertOctal(ushort c1, ushort c2,
+ ushort c3) const
+{
+ return ((c1 - '0') * 64 + (c2 - '0') * 8 + c3 - '0');
+}
+
+unsigned char Lexer::convertHex(ushort c)
+{
+ if (c >= '0' && c <= '9')
+ return (c - '0');
+ else if (c >= 'a' && c <= 'f')
+ return (c - 'a' + 10);
+ else
+ return (c - 'A' + 10);
+}
+
+unsigned char Lexer::convertHex(ushort c1, ushort c2)
+{
+ return ((convertHex(c1) << 4) + convertHex(c2));
+}
+
+QChar Lexer::convertUnicode(ushort c1, ushort c2,
+ ushort c3, ushort c4)
+{
+ return QChar((convertHex(c3) << 4) + convertHex(c4),
+ (convertHex(c1) << 4) + convertHex(c2));
+}
+
+void Lexer::record8(ushort c)
+{
+ Q_ASSERT(c <= 0xff);
+
+ // enlarge buffer if full
+ if (pos8 >= size8 - 1) {
+ char *tmp = new char[2 * size8];
+ memcpy(tmp, buffer8, size8 * sizeof(char));
+ delete [] buffer8;
+ buffer8 = tmp;
+ size8 *= 2;
+ }
+
+ buffer8[pos8++] = (char) c;
+}
+
+void Lexer::record16(QChar c)
+{
+ // enlarge buffer if full
+ if (pos16 >= size16 - 1) {
+ QChar *tmp = new QChar[2 * size16];
+ memcpy(tmp, buffer16, size16 * sizeof(QChar));
+ delete [] buffer16;
+ buffer16 = tmp;
+ size16 *= 2;
+ }
+
+ buffer16[pos16++] = c;
+}
+
+void Lexer::recordStartPos()
+{
+ startpos = pos;
+ startlineno = yylineno;
+ startcolumn = yycolumn;
+}
+
+bool Lexer::scanRegExp(RegExpBodyPrefix prefix)
+{
+ pos16 = 0;
+ bool lastWasEscape = false;
+
+ if (prefix == EqualPrefix)
+ record16(QLatin1Char('='));
+
+ while (1) {
+ if (isLineTerminator() || current == 0) {
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Unterminated regular expression literal");
+ return false;
+ }
+ else if (current != '/' || lastWasEscape == true)
+ {
+ record16(current);
+ lastWasEscape = !lastWasEscape && (current == '\\');
+ }
+ else {
+ if (driver)
+ pattern = driver->intern(buffer16, pos16);
+ else
+ pattern = 0;
+ pos16 = 0;
+ shift(1);
+ break;
+ }
+ shift(1);
+ }
+
+ flags = 0;
+ while (isIdentLetter(current)) {
+ int flag = Ecma::RegExp::flagFromChar(current);
+ if (flag == 0) {
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Invalid regular expression flag '%0'")
+ .arg(QChar(current));
+ return false;
+ }
+ flags |= flag;
+ record16(current);
+ shift(1);
+ }
+
+ return true;
+}
+
+void Lexer::syncProhibitAutomaticSemicolon()
+{
+ if (parenthesesState == BalancedParentheses) {
+ // we have seen something like "if (foo)", which means we should
+ // never insert an automatic semicolon at this point, since it would
+ // then be expanded into an empty statement (ECMA-262 7.9.1)
+ prohibitAutomaticSemicolon = true;
+ parenthesesState = IgnoreParentheses;
+ } else {
+ prohibitAutomaticSemicolon = false;
+ }
+}
+
+QT_QML_END_NAMESPACE
+
+
diff --git a/src/declarative/qml/parser/qdeclarativejslexer_p.h b/src/declarative/qml/parser/qdeclarativejslexer_p.h
new file mode 100644
index 0000000000..71bd08c5c0
--- /dev/null
+++ b/src/declarative/qml/parser/qdeclarativejslexer_p.h
@@ -0,0 +1,249 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEJSLEXER_P_H
+#define QDECLARATIVEJSLEXER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativejsglobal_p.h"
+
+#include <QtCore/QString>
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS {
+
+class Engine;
+class NameId;
+
+class QML_PARSER_EXPORT Lexer
+{
+public:
+ Lexer(Engine *eng, bool tokenizeComments = false);
+ ~Lexer();
+
+ void setCode(const QString &c, int lineno);
+ int lex();
+
+ int currentLineNo() const { return yylineno; }
+ int currentColumnNo() const { return yycolumn; }
+
+ int tokenOffset() const { return startpos; }
+ int tokenLength() const { return pos - startpos; }
+
+ int startLineNo() const { return startlineno; }
+ int startColumnNo() const { return startcolumn; }
+
+ int endLineNo() const { return currentLineNo(); }
+ int endColumnNo() const
+ { int col = currentColumnNo(); return (col > 0) ? col - 1 : col; }
+
+ bool prevTerminator() const { return terminator; }
+
+ enum State { Start,
+ Identifier,
+ InIdentifier,
+ InSingleLineComment,
+ InMultiLineComment,
+ InNum,
+ InNum0,
+ InHex,
+ InOctal,
+ InDecimal,
+ InExponentIndicator,
+ InExponent,
+ Hex,
+ Octal,
+ Number,
+ String,
+ Eof,
+ InString,
+ InEscapeSequence,
+ InHexEscape,
+ InUnicodeEscape,
+ Other,
+ Bad };
+
+ enum Error {
+ NoError,
+ IllegalCharacter,
+ UnclosedStringLiteral,
+ IllegalEscapeSequence,
+ IllegalUnicodeEscapeSequence,
+ UnclosedComment,
+ IllegalExponentIndicator,
+ IllegalIdentifier
+ };
+
+ enum ParenthesesState {
+ IgnoreParentheses,
+ CountParentheses,
+ BalancedParentheses
+ };
+
+ enum RegExpBodyPrefix {
+ NoPrefix,
+ EqualPrefix
+ };
+
+ bool scanRegExp(RegExpBodyPrefix prefix = NoPrefix);
+
+ NameId *pattern;
+ int flags;
+
+ State lexerState() const
+ { return state; }
+
+ QString errorMessage() const
+ { return errmsg; }
+ void setErrorMessage(const QString &err)
+ { errmsg = err; }
+ void setErrorMessage(const char *err)
+ { setErrorMessage(QString::fromLatin1(err)); }
+
+ Error error() const
+ { return err; }
+ void clearError()
+ { err = NoError; }
+
+private:
+ Engine *driver;
+ int yylineno;
+ bool done;
+ char *buffer8;
+ QChar *buffer16;
+ uint size8, size16;
+ uint pos8, pos16;
+ bool terminator;
+ bool restrKeyword;
+ // encountered delimiter like "'" and "}" on last run
+ bool delimited;
+ int stackToken;
+
+ State state;
+ void setDone(State s);
+ uint pos;
+ void shift(uint p);
+ int lookupKeyword(const char *);
+
+ bool isWhiteSpace() const;
+ bool isLineTerminator() const;
+ bool isHexDigit(ushort c) const;
+ bool isOctalDigit(ushort c) const;
+
+ int matchPunctuator(ushort c1, ushort c2,
+ ushort c3, ushort c4);
+ ushort singleEscape(ushort c) const;
+ ushort convertOctal(ushort c1, ushort c2,
+ ushort c3) const;
+public:
+ static unsigned char convertHex(ushort c1);
+ static unsigned char convertHex(ushort c1, ushort c2);
+ static QChar convertUnicode(ushort c1, ushort c2,
+ ushort c3, ushort c4);
+ static bool isIdentLetter(ushort c);
+ static bool isDecimalDigit(ushort c);
+
+ inline int ival() const { return qsyylval.ival; }
+ inline double dval() const { return qsyylval.dval; }
+ inline NameId *ustr() const { return qsyylval.ustr; }
+
+ const QChar *characterBuffer() const { return buffer16; }
+ int characterCount() const { return pos16; }
+
+private:
+ void record8(ushort c);
+ void record16(QChar c);
+ void recordStartPos();
+
+ int findReservedWord(const QChar *buffer, int size) const;
+
+ void syncProhibitAutomaticSemicolon();
+
+ const QChar *code;
+ uint length;
+ int yycolumn;
+ int startpos;
+ int startlineno;
+ int startcolumn;
+ int bol; // begin of line
+
+ union {
+ int ival;
+ double dval;
+ NameId *ustr;
+ } qsyylval;
+
+ // current and following unicode characters
+ ushort current, next1, next2, next3;
+
+ struct keyword {
+ const char *name;
+ int token;
+ };
+
+ QString errmsg;
+ Error err;
+
+ bool wantRx;
+ bool check_reserved;
+
+ ParenthesesState parenthesesState;
+ int parenthesesCount;
+ bool prohibitAutomaticSemicolon;
+ bool tokenizeComments;
+};
+
+} // namespace QDeclarativeJS
+
+QT_QML_END_NAMESPACE
+
+#endif
diff --git a/src/declarative/qml/parser/qdeclarativejsmemorypool_p.h b/src/declarative/qml/parser/qdeclarativejsmemorypool_p.h
new file mode 100644
index 0000000000..c8d52d065d
--- /dev/null
+++ b/src/declarative/qml/parser/qdeclarativejsmemorypool_p.h
@@ -0,0 +1,133 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEJSMEMORYPOOL_P_H
+#define QDECLARATIVEJSMEMORYPOOL_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativejsglobal_p.h"
+
+#include <QtCore/qglobal.h>
+#include <QtCore/qshareddata.h>
+
+#include <string.h>
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS {
+
+class QML_PARSER_EXPORT MemoryPool : public QSharedData
+{
+public:
+ enum { maxBlockCount = -1 };
+ enum { defaultBlockSize = 1 << 12 };
+
+ MemoryPool() {
+ m_blockIndex = maxBlockCount;
+ m_currentIndex = 0;
+ m_storage = 0;
+ m_currentBlock = 0;
+ m_currentBlockSize = 0;
+ }
+
+ virtual ~MemoryPool() {
+ for (int index = 0; index < m_blockIndex + 1; ++index)
+ qFree(m_storage[index]);
+
+ qFree(m_storage);
+ }
+
+ char *allocate(int bytes) {
+ bytes += (8 - bytes) & 7; // ensure multiple of 8 bytes (maintain alignment)
+ if (m_currentBlock == 0 || m_currentBlockSize < m_currentIndex + bytes) {
+ ++m_blockIndex;
+ m_currentBlockSize = defaultBlockSize << m_blockIndex;
+
+ m_storage = reinterpret_cast<char**>(qRealloc(m_storage, sizeof(char*) * (1 + m_blockIndex)));
+ m_currentBlock = m_storage[m_blockIndex] = reinterpret_cast<char*>(qMalloc(m_currentBlockSize));
+ ::memset(m_currentBlock, 0, m_currentBlockSize);
+
+ m_currentIndex = (8 - quintptr(m_currentBlock)) & 7; // ensure first chunk is 64-bit aligned
+ Q_ASSERT(m_currentIndex + bytes <= m_currentBlockSize);
+ }
+
+ char *p = reinterpret_cast<char *>
+ (m_currentBlock + m_currentIndex);
+
+ m_currentIndex += bytes;
+
+ return p;
+ }
+
+ int bytesAllocated() const {
+ int bytes = 0;
+ for (int index = 0; index < m_blockIndex; ++index)
+ bytes += (defaultBlockSize << index);
+ bytes += m_currentIndex;
+ return bytes;
+ }
+
+private:
+ int m_blockIndex;
+ int m_currentIndex;
+ char *m_currentBlock;
+ int m_currentBlockSize;
+ char **m_storage;
+
+private:
+ Q_DISABLE_COPY(MemoryPool)
+};
+
+} // namespace QDeclarativeJS
+
+QT_QML_END_NAMESPACE
+
+#endif
diff --git a/src/declarative/qml/parser/qdeclarativejsnodepool_p.h b/src/declarative/qml/parser/qdeclarativejsnodepool_p.h
new file mode 100644
index 0000000000..94637fdfcd
--- /dev/null
+++ b/src/declarative/qml/parser/qdeclarativejsnodepool_p.h
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEJSNODEPOOL_P_H
+#define QDECLARATIVEJSNODEPOOL_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativejsglobal_p.h"
+#include "qdeclarativejsmemorypool_p.h"
+
+#include <QtCore/QHash>
+#include <QtCore/QString>
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS {
+
+namespace AST {
+class Node;
+} // namespace AST
+
+class Code;
+class CompilationUnit;
+class Engine;
+
+template <typename NodeType>
+inline NodeType *makeAstNode(MemoryPool *storage)
+{
+ NodeType *node = new (storage->allocate(sizeof(NodeType))) NodeType();
+ return node;
+}
+
+template <typename NodeType, typename Arg1>
+inline NodeType *makeAstNode(MemoryPool *storage, Arg1 arg1)
+{
+ NodeType *node = new (storage->allocate(sizeof(NodeType))) NodeType(arg1);
+ return node;
+}
+
+template <typename NodeType, typename Arg1, typename Arg2>
+inline NodeType *makeAstNode(MemoryPool *storage, Arg1 arg1, Arg2 arg2)
+{
+ NodeType *node = new (storage->allocate(sizeof(NodeType))) NodeType(arg1, arg2);
+ return node;
+}
+
+template <typename NodeType, typename Arg1, typename Arg2, typename Arg3>
+inline NodeType *makeAstNode(MemoryPool *storage, Arg1 arg1, Arg2 arg2, Arg3 arg3)
+{
+ NodeType *node = new (storage->allocate(sizeof(NodeType))) NodeType(arg1, arg2, arg3);
+ return node;
+}
+
+template <typename NodeType, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
+inline NodeType *makeAstNode(MemoryPool *storage, Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4)
+{
+ NodeType *node = new (storage->allocate(sizeof(NodeType))) NodeType(arg1, arg2, arg3, arg4);
+ return node;
+}
+
+class QML_PARSER_EXPORT NodePool : public MemoryPool
+{
+public:
+ NodePool(const QString &fileName, Engine *engine);
+ virtual ~NodePool();
+
+ Code *createCompiledCode(AST::Node *node, CompilationUnit &compilation);
+
+ inline QString fileName() const { return m_fileName; }
+ inline Engine *engine() const { return m_engine; }
+#ifndef J_SCRIPT_NO_EVENT_NOTIFY
+ inline qint64 id() const { return m_id; }
+#endif
+
+private:
+ QHash<AST::Node*, Code*> m_codeCache;
+ QString m_fileName;
+ Engine *m_engine;
+#ifndef J_SCRIPT_NO_EVENT_NOTIFY
+ qint64 m_id;
+#endif
+
+private:
+ Q_DISABLE_COPY(NodePool)
+};
+
+} // namespace QDeclarativeJS
+
+QT_QML_END_NAMESPACE
+
+#endif
diff --git a/src/declarative/qml/parser/qdeclarativejsparser.cpp b/src/declarative/qml/parser/qdeclarativejsparser.cpp
new file mode 100644
index 0000000000..c86e047afa
--- /dev/null
+++ b/src/declarative/qml/parser/qdeclarativejsparser.cpp
@@ -0,0 +1,1857 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QtDebug>
+#include <QtGui/QApplication>
+
+#include <string.h>
+
+#include "qdeclarativejsengine_p.h"
+#include "qdeclarativejslexer_p.h"
+#include "qdeclarativejsast_p.h"
+#include "qdeclarativejsnodepool_p.h"
+
+
+
+#include "qdeclarativejsparser_p.h"
+#include <QVarLengthArray>
+
+//
+// This file is automatically generated from qmljs.g.
+// Changes will be lost.
+//
+
+using namespace QDeclarativeJS;
+
+QT_QML_BEGIN_NAMESPACE
+
+void Parser::reallocateStack()
+{
+ if (! stack_size)
+ stack_size = 128;
+ else
+ stack_size <<= 1;
+
+ sym_stack = reinterpret_cast<Value*> (qRealloc(sym_stack, stack_size * sizeof(Value)));
+ state_stack = reinterpret_cast<int*> (qRealloc(state_stack, stack_size * sizeof(int)));
+ location_stack = reinterpret_cast<AST::SourceLocation*> (qRealloc(location_stack, stack_size * sizeof(AST::SourceLocation)));
+}
+
+inline static bool automatic(Engine *driver, int token)
+{
+ return token == QDeclarativeJSGrammar::T_RBRACE
+ || token == 0
+ || driver->lexer()->prevTerminator();
+}
+
+
+Parser::Parser(Engine *engine):
+ driver(engine),
+ tos(0),
+ stack_size(0),
+ sym_stack(0),
+ state_stack(0),
+ location_stack(0),
+ first_token(0),
+ last_token(0)
+{
+}
+
+Parser::~Parser()
+{
+ if (stack_size) {
+ qFree(sym_stack);
+ qFree(state_stack);
+ qFree(location_stack);
+ }
+}
+
+static inline AST::SourceLocation location(Lexer *lexer)
+{
+ AST::SourceLocation loc;
+ loc.offset = lexer->tokenOffset();
+ loc.length = lexer->tokenLength();
+ loc.startLine = lexer->startLineNo();
+ loc.startColumn = lexer->startColumnNo();
+ return loc;
+}
+
+AST::UiQualifiedId *Parser::reparseAsQualifiedId(AST::ExpressionNode *expr)
+{
+ QVarLengthArray<NameId *, 4> nameIds;
+ QVarLengthArray<AST::SourceLocation, 4> locations;
+
+ AST::ExpressionNode *it = expr;
+ while (AST::FieldMemberExpression *m = AST::cast<AST::FieldMemberExpression *>(it)) {
+ nameIds.append(m->name);
+ locations.append(m->identifierToken);
+ it = m->base;
+ }
+
+ if (AST::IdentifierExpression *idExpr = AST::cast<AST::IdentifierExpression *>(it)) {
+ AST::UiQualifiedId *q = makeAstNode<AST::UiQualifiedId>(driver->nodePool(), idExpr->name);
+ q->identifierToken = idExpr->identifierToken;
+
+ AST::UiQualifiedId *currentId = q;
+ for (int i = nameIds.size() - 1; i != -1; --i) {
+ currentId = makeAstNode<AST::UiQualifiedId>(driver->nodePool(), currentId, nameIds[i]);
+ currentId->identifierToken = locations[i];
+ }
+
+ return currentId->finish();
+ }
+
+ return 0;
+}
+
+bool Parser::parse(int startToken)
+{
+ Lexer *lexer = driver->lexer();
+ bool hadErrors = false;
+ int yytoken = -1;
+ int action = 0;
+
+ token_buffer[0].token = startToken;
+ first_token = &token_buffer[0];
+ last_token = &token_buffer[1];
+
+ tos = -1;
+ program = 0;
+
+ do {
+ if (++tos == stack_size)
+ reallocateStack();
+
+ state_stack[tos] = action;
+
+ _Lcheck_token:
+ if (yytoken == -1 && -TERMINAL_COUNT != action_index[action]) {
+ yyprevlloc = yylloc;
+
+ if (first_token == last_token) {
+ yytoken = lexer->lex();
+ yylval = lexer->dval();
+ yylloc = location(lexer);
+ } else {
+ yytoken = first_token->token;
+ yylval = first_token->dval;
+ yylloc = first_token->loc;
+ ++first_token;
+ }
+ }
+
+ action = t_action(action, yytoken);
+ if (action > 0) {
+ if (action != ACCEPT_STATE) {
+ yytoken = -1;
+ sym(1).dval = yylval;
+ loc(1) = yylloc;
+ } else {
+ --tos;
+ return ! hadErrors;
+ }
+ } else if (action < 0) {
+ const int r = -action - 1;
+ tos -= rhs[r];
+
+ switch (r) {
+
+case 0: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+
+case 1: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+
+case 2: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+
+case 3: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+
+case 4: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+
+case 5: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+
+case 6: {
+ sym(1).UiProgram = makeAstNode<AST::UiProgram> (driver->nodePool(), sym(1).UiImportList,
+ sym(2).UiObjectMemberList->finish());
+} break;
+
+case 8: {
+ sym(1).Node = sym(1).UiImportList->finish();
+} break;
+
+case 9: {
+ sym(1).Node = makeAstNode<AST::UiImportList> (driver->nodePool(), sym(1).UiImport);
+} break;
+
+case 10: {
+ sym(1).Node = makeAstNode<AST::UiImportList> (driver->nodePool(),
+ sym(1).UiImportList, sym(2).UiImport);
+} break;
+
+case 13: {
+ sym(1).UiImport->semicolonToken = loc(2);
+} break;
+
+case 15: {
+ sym(1).UiImport->versionToken = loc(2);
+ sym(1).UiImport->semicolonToken = loc(3);
+} break;
+
+case 17: {
+ sym(1).UiImport->versionToken = loc(2);
+ sym(1).UiImport->asToken = loc(3);
+ sym(1).UiImport->importIdToken = loc(4);
+ sym(1).UiImport->importId = sym(4).sval;
+ sym(1).UiImport->semicolonToken = loc(5);
+} break;
+
+case 19: {
+ sym(1).UiImport->asToken = loc(2);
+ sym(1).UiImport->importIdToken = loc(3);
+ sym(1).UiImport->importId = sym(3).sval;
+ sym(1).UiImport->semicolonToken = loc(4);
+} break;
+
+case 20: {
+ AST::UiImport *node = 0;
+
+ if (AST::StringLiteral *importIdLiteral = AST::cast<AST::StringLiteral *>(sym(2).Expression)) {
+ node = makeAstNode<AST::UiImport>(driver->nodePool(), importIdLiteral->value);
+ node->fileNameToken = loc(2);
+ } else if (AST::UiQualifiedId *qualifiedId = reparseAsQualifiedId(sym(2).Expression)) {
+ QString text;
+ for (AST::UiQualifiedId *q = qualifiedId; q; q = q->next) {
+ text += q->name->asString();
+ if (q->next) text += QLatin1String(".");
+ }
+ node = makeAstNode<AST::UiImport>(driver->nodePool(), qualifiedId);
+ node->fileNameToken = loc(2);
+ }
+
+ sym(1).Node = node;
+
+ if (! node) {
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, loc(1),
+ QLatin1String("Expected a qualified name id or a string literal")));
+
+ return false; // ### remove me
+ }
+} break;
+
+case 21: {
+ sym(1).Node = 0;
+} break;
+
+case 22: {
+ sym(1).Node = makeAstNode<AST::UiObjectMemberList> (driver->nodePool(), sym(1).UiObjectMember);
+} break;
+
+case 23: {
+ sym(1).Node = makeAstNode<AST::UiObjectMemberList> (driver->nodePool(), sym(1).UiObjectMember);
+} break;
+
+case 24: {
+ AST::UiObjectMemberList *node = makeAstNode<AST:: UiObjectMemberList> (driver->nodePool(),
+ sym(1).UiObjectMemberList, sym(2).UiObjectMember);
+ sym(1).Node = node;
+} break;
+
+case 25: {
+ sym(1).Node = makeAstNode<AST::UiArrayMemberList> (driver->nodePool(), sym(1).UiObjectMember);
+} break;
+
+case 26: {
+ AST::UiArrayMemberList *node = makeAstNode<AST::UiArrayMemberList> (driver->nodePool(),
+ sym(1).UiArrayMemberList, sym(3).UiObjectMember);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 27: {
+ AST::UiObjectInitializer *node = makeAstNode<AST::UiObjectInitializer> (driver->nodePool(), (AST::UiObjectMemberList*)0);
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 28: {
+ AST::UiObjectInitializer *node = makeAstNode<AST::UiObjectInitializer> (driver->nodePool(), sym(2).UiObjectMemberList->finish());
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 29: {
+ AST::UiObjectDefinition *node = makeAstNode<AST::UiObjectDefinition> (driver->nodePool(), sym(1).UiQualifiedId,
+ sym(2).UiObjectInitializer);
+ sym(1).Node = node;
+} break;
+
+case 31: {
+ AST::UiArrayBinding *node = makeAstNode<AST::UiArrayBinding> (driver->nodePool(),
+ sym(1).UiQualifiedId, sym(4).UiArrayMemberList->finish());
+ node->colonToken = loc(2);
+ node->lbracketToken = loc(3);
+ node->rbracketToken = loc(5);
+ sym(1).Node = node;
+} break;
+
+case 32: {
+ AST::UiObjectBinding *node = makeAstNode<AST::UiObjectBinding> (driver->nodePool(),
+ sym(1).UiQualifiedId, sym(3).UiQualifiedId, sym(4).UiObjectInitializer);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 33: {
+ AST::UiObjectBinding *node = makeAstNode<AST::UiObjectBinding> (driver->nodePool(),
+ sym(3).UiQualifiedId, sym(1).UiQualifiedId, sym(4).UiObjectInitializer);
+ node->colonToken = loc(2);
+ node->hasOnToken = true;
+ sym(1).Node = node;
+} break;
+case 34:case 35:case 36:case 37:
+{
+ AST::UiScriptBinding *node = makeAstNode<AST::UiScriptBinding> (driver->nodePool(),
+ sym(1).UiQualifiedId, sym(3).Statement);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 38:
+
+case 39: {
+ sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount());
+ break;
+}
+
+case 41: {
+ sym(1).Node = 0;
+} break;
+
+case 42: {
+ sym(1).Node = sym(1).UiParameterList->finish ();
+} break;
+
+case 43: {
+ AST::UiParameterList *node = makeAstNode<AST::UiParameterList> (driver->nodePool(), sym(1).sval, sym(2).sval);
+ node->identifierToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 44: {
+ AST::UiParameterList *node = makeAstNode<AST::UiParameterList> (driver->nodePool(), sym(1).UiParameterList, sym(3).sval, sym(4).sval);
+ node->commaToken = loc(2);
+ node->identifierToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 46: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), (NameId *)0, sym(2).sval);
+ node->type = AST::UiPublicMember::Signal;
+ node->propertyToken = loc(1);
+ node->typeToken = loc(2);
+ node->identifierToken = loc(2);
+ node->parameters = sym(4).UiParameterList;
+ node->semicolonToken = loc(6);
+ sym(1).Node = node;
+} break;
+
+case 48: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), (NameId *)0, sym(2).sval);
+ node->type = AST::UiPublicMember::Signal;
+ node->propertyToken = loc(1);
+ node->typeToken = loc(2);
+ node->identifierToken = loc(2);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 50: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(4).sval, sym(6).sval);
+ node->typeModifier = sym(2).sval;
+ node->propertyToken = loc(1);
+ node->typeModifierToken = loc(2);
+ node->typeToken = loc(4);
+ node->identifierToken = loc(6);
+ node->semicolonToken = loc(7);
+ sym(1).Node = node;
+} break;
+
+case 52: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval);
+ node->propertyToken = loc(1);
+ node->typeToken = loc(2);
+ node->identifierToken = loc(3);
+ node->semicolonToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 54: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval);
+ node->isDefaultMember = true;
+ node->defaultToken = loc(1);
+ node->propertyToken = loc(2);
+ node->typeToken = loc(3);
+ node->identifierToken = loc(4);
+ node->semicolonToken = loc(5);
+ sym(1).Node = node;
+} break;
+
+case 56: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval,
+ sym(5).Expression);
+ node->propertyToken = loc(1);
+ node->typeToken = loc(2);
+ node->identifierToken = loc(3);
+ node->colonToken = loc(4);
+ node->semicolonToken = loc(6);
+ sym(1).Node = node;
+} break;
+
+case 58: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval,
+ sym(6).Expression);
+ node->isReadonlyMember = true;
+ node->readonlyToken = loc(1);
+ node->propertyToken = loc(2);
+ node->typeToken = loc(3);
+ node->identifierToken = loc(4);
+ node->colonToken = loc(5);
+ node->semicolonToken = loc(7);
+ sym(1).Node = node;
+} break;
+
+case 60: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval,
+ sym(6).Expression);
+ node->isDefaultMember = true;
+ node->defaultToken = loc(1);
+ node->propertyToken = loc(2);
+ node->typeToken = loc(3);
+ node->identifierToken = loc(4);
+ node->colonToken = loc(5);
+ node->semicolonToken = loc(7);
+ sym(1).Node = node;
+} break;
+
+case 61: {
+ sym(1).Node = makeAstNode<AST::UiSourceElement>(driver->nodePool(), sym(1).Node);
+} break;
+
+case 62: {
+ sym(1).Node = makeAstNode<AST::UiSourceElement>(driver->nodePool(), sym(1).Node);
+} break;
+
+case 64: {
+ QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_PROPERTY]);
+ sym(1).sval = driver->intern(s.constData(), s.length());
+ break;
+}
+
+case 65: {
+ QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_SIGNAL]);
+ sym(1).sval = driver->intern(s.constData(), s.length());
+ break;
+}
+
+case 66: {
+ QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_READONLY]);
+ sym(1).sval = driver->intern(s.constData(), s.length());
+ break;
+}
+
+case 67: {
+ QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_ON]);
+ sym(1).sval = driver->intern(s.constData(), s.length());
+ break;
+}
+
+case 68: {
+ AST::ThisExpression *node = makeAstNode<AST::ThisExpression> (driver->nodePool());
+ node->thisToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 69: {
+ AST::IdentifierExpression *node = makeAstNode<AST::IdentifierExpression> (driver->nodePool(), sym(1).sval);
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 70: {
+ AST::NullExpression *node = makeAstNode<AST::NullExpression> (driver->nodePool());
+ node->nullToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 71: {
+ AST::TrueLiteral *node = makeAstNode<AST::TrueLiteral> (driver->nodePool());
+ node->trueToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 72: {
+ AST::FalseLiteral *node = makeAstNode<AST::FalseLiteral> (driver->nodePool());
+ node->falseToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 73: {
+ AST::NumericLiteral *node = makeAstNode<AST::NumericLiteral> (driver->nodePool(), sym(1).dval);
+ node->literalToken = loc(1);
+ sym(1).Node = node;
+} break;
+case 74:
+case 75: {
+ AST::StringLiteral *node = makeAstNode<AST::StringLiteral> (driver->nodePool(), sym(1).sval);
+ node->literalToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 76: {
+ bool rx = lexer->scanRegExp(Lexer::NoPrefix);
+ if (!rx) {
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
+ return false; // ### remove me
+ }
+ AST::RegExpLiteral *node = makeAstNode<AST::RegExpLiteral> (driver->nodePool(), lexer->pattern, lexer->flags);
+ node->literalToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 77: {
+ bool rx = lexer->scanRegExp(Lexer::EqualPrefix);
+ if (!rx) {
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
+ return false;
+ }
+ AST::RegExpLiteral *node = makeAstNode<AST::RegExpLiteral> (driver->nodePool(), lexer->pattern, lexer->flags);
+ node->literalToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 78: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), (AST::Elision *) 0);
+ node->lbracketToken = loc(1);
+ node->rbracketToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 79: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).Elision->finish());
+ node->lbracketToken = loc(1);
+ node->rbracketToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 80: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish ());
+ node->lbracketToken = loc(1);
+ node->rbracketToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 81: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish (),
+ (AST::Elision *) 0);
+ node->lbracketToken = loc(1);
+ node->commaToken = loc(3);
+ node->rbracketToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 82: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish (),
+ sym(4).Elision->finish());
+ node->lbracketToken = loc(1);
+ node->commaToken = loc(3);
+ node->rbracketToken = loc(5);
+ sym(1).Node = node;
+} break;
+
+case 83: {
+ AST::ObjectLiteral *node = 0;
+ if (sym(2).Node)
+ node = makeAstNode<AST::ObjectLiteral> (driver->nodePool(),
+ sym(2).PropertyNameAndValueList->finish ());
+ else
+ node = makeAstNode<AST::ObjectLiteral> (driver->nodePool());
+ node->lbraceToken = loc(1);
+ node->lbraceToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 84: {
+ AST::ObjectLiteral *node = makeAstNode<AST::ObjectLiteral> (driver->nodePool(),
+ sym(2).PropertyNameAndValueList->finish ());
+ node->lbraceToken = loc(1);
+ node->lbraceToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 85: {
+ AST::NestedExpression *node = makeAstNode<AST::NestedExpression>(driver->nodePool(), sym(2).Expression);
+ node->lparenToken = loc(1);
+ node->rparenToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 86: {
+ if (AST::ArrayMemberExpression *mem = AST::cast<AST::ArrayMemberExpression *>(sym(1).Expression)) {
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, mem->lbracketToken,
+ QLatin1String("Ignored annotation")));
+
+ sym(1).Expression = mem->base;
+ }
+
+ if (AST::UiQualifiedId *qualifiedId = reparseAsQualifiedId(sym(1).Expression)) {
+ sym(1).UiQualifiedId = qualifiedId;
+ } else {
+ sym(1).UiQualifiedId = 0;
+
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, loc(1),
+ QLatin1String("Expected a qualified name id")));
+
+ return false; // ### recover
+ }
+} break;
+
+case 87: {
+ sym(1).Node = makeAstNode<AST::ElementList> (driver->nodePool(), (AST::Elision *) 0, sym(1).Expression);
+} break;
+
+case 88: {
+ sym(1).Node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).Elision->finish(), sym(2).Expression);
+} break;
+
+case 89: {
+ AST::ElementList *node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).ElementList,
+ (AST::Elision *) 0, sym(3).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 90: {
+ AST::ElementList *node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).ElementList, sym(3).Elision->finish(),
+ sym(4).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 91: {
+ AST::Elision *node = makeAstNode<AST::Elision> (driver->nodePool());
+ node->commaToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 92: {
+ AST::Elision *node = makeAstNode<AST::Elision> (driver->nodePool(), sym(1).Elision);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 93: {
+ AST::PropertyNameAndValueList *node = makeAstNode<AST::PropertyNameAndValueList> (driver->nodePool(),
+ sym(1).PropertyName, sym(3).Expression);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 94: {
+ AST::PropertyNameAndValueList *node = makeAstNode<AST::PropertyNameAndValueList> (driver->nodePool(),
+ sym(1).PropertyNameAndValueList, sym(3).PropertyName, sym(5).Expression);
+ node->commaToken = loc(2);
+ node->colonToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 95: {
+ AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), sym(1).sval);
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+case 96:
+case 97: {
+ AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()));
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 98: {
+ AST::StringLiteralPropertyName *node = makeAstNode<AST::StringLiteralPropertyName> (driver->nodePool(), sym(1).sval);
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 99: {
+ AST::NumericLiteralPropertyName *node = makeAstNode<AST::NumericLiteralPropertyName> (driver->nodePool(), sym(1).dval);
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 100: {
+ AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), sym(1).sval);
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 101:
+
+case 102:
+
+case 103:
+
+case 104:
+
+case 105:
+
+case 106:
+
+case 107:
+
+case 108:
+
+case 109:
+
+case 110:
+
+case 111:
+
+case 112:
+
+case 113:
+
+case 114:
+
+case 115:
+
+case 116:
+
+case 117:
+
+case 118:
+
+case 119:
+
+case 120:
+
+case 121:
+
+case 122:
+
+case 123:
+
+case 124:
+
+case 125:
+
+case 126:
+
+case 127:
+
+case 128:
+
+case 129:
+
+case 130:
+
+case 131:
+{
+ sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount());
+} break;
+
+case 136: {
+ AST::ArrayMemberExpression *node = makeAstNode<AST::ArrayMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
+ node->lbracketToken = loc(2);
+ node->rbracketToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 137: {
+ AST::FieldMemberExpression *node = makeAstNode<AST::FieldMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).sval);
+ node->dotToken = loc(2);
+ node->identifierToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 138: {
+ AST::NewMemberExpression *node = makeAstNode<AST::NewMemberExpression> (driver->nodePool(), sym(2).Expression, sym(4).ArgumentList);
+ node->newToken = loc(1);
+ node->lparenToken = loc(3);
+ node->rparenToken = loc(5);
+ sym(1).Node = node;
+} break;
+
+case 140: {
+ AST::NewExpression *node = makeAstNode<AST::NewExpression> (driver->nodePool(), sym(2).Expression);
+ node->newToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 141: {
+ AST::CallExpression *node = makeAstNode<AST::CallExpression> (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 142: {
+ AST::CallExpression *node = makeAstNode<AST::CallExpression> (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 143: {
+ AST::ArrayMemberExpression *node = makeAstNode<AST::ArrayMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
+ node->lbracketToken = loc(2);
+ node->rbracketToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 144: {
+ AST::FieldMemberExpression *node = makeAstNode<AST::FieldMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).sval);
+ node->dotToken = loc(2);
+ node->identifierToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 145: {
+ sym(1).Node = 0;
+} break;
+
+case 146: {
+ sym(1).Node = sym(1).ArgumentList->finish();
+} break;
+
+case 147: {
+ sym(1).Node = makeAstNode<AST::ArgumentList> (driver->nodePool(), sym(1).Expression);
+} break;
+
+case 148: {
+ AST::ArgumentList *node = makeAstNode<AST::ArgumentList> (driver->nodePool(), sym(1).ArgumentList, sym(3).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 152: {
+ AST::PostIncrementExpression *node = makeAstNode<AST::PostIncrementExpression> (driver->nodePool(), sym(1).Expression);
+ node->incrementToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 153: {
+ AST::PostDecrementExpression *node = makeAstNode<AST::PostDecrementExpression> (driver->nodePool(), sym(1).Expression);
+ node->decrementToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 155: {
+ AST::DeleteExpression *node = makeAstNode<AST::DeleteExpression> (driver->nodePool(), sym(2).Expression);
+ node->deleteToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 156: {
+ AST::VoidExpression *node = makeAstNode<AST::VoidExpression> (driver->nodePool(), sym(2).Expression);
+ node->voidToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 157: {
+ AST::TypeOfExpression *node = makeAstNode<AST::TypeOfExpression> (driver->nodePool(), sym(2).Expression);
+ node->typeofToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 158: {
+ AST::PreIncrementExpression *node = makeAstNode<AST::PreIncrementExpression> (driver->nodePool(), sym(2).Expression);
+ node->incrementToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 159: {
+ AST::PreDecrementExpression *node = makeAstNode<AST::PreDecrementExpression> (driver->nodePool(), sym(2).Expression);
+ node->decrementToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 160: {
+ AST::UnaryPlusExpression *node = makeAstNode<AST::UnaryPlusExpression> (driver->nodePool(), sym(2).Expression);
+ node->plusToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 161: {
+ AST::UnaryMinusExpression *node = makeAstNode<AST::UnaryMinusExpression> (driver->nodePool(), sym(2).Expression);
+ node->minusToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 162: {
+ AST::TildeExpression *node = makeAstNode<AST::TildeExpression> (driver->nodePool(), sym(2).Expression);
+ node->tildeToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 163: {
+ AST::NotExpression *node = makeAstNode<AST::NotExpression> (driver->nodePool(), sym(2).Expression);
+ node->notToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 165: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Mul, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 166: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Div, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 167: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Mod, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 169: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Add, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 170: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Sub, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 172: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::LShift, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 173: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::RShift, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 174: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::URShift, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 176: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Lt, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 177: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Gt, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 178: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Le, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 179: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Ge, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 180: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::InstanceOf, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 181: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::In, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 183: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Lt, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 184: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Gt, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 185: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Le, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 186: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Ge, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 187: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::InstanceOf, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 189: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Equal, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 190: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::NotEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 191: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::StrictEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 192: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::StrictNotEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 194: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Equal, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 195: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::NotEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 196: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::StrictEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 197: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::StrictNotEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 199: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitAnd, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 201: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitAnd, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 203: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitXor, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 205: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitXor, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 207: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitOr, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 209: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitOr, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 211: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::And, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 213: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::And, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 215: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Or, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 217: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Or, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 219: {
+ AST::ConditionalExpression *node = makeAstNode<AST::ConditionalExpression> (driver->nodePool(), sym(1).Expression,
+ sym(3).Expression, sym(5).Expression);
+ node->questionToken = loc(2);
+ node->colonToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 221: {
+ AST::ConditionalExpression *node = makeAstNode<AST::ConditionalExpression> (driver->nodePool(), sym(1).Expression,
+ sym(3).Expression, sym(5).Expression);
+ node->questionToken = loc(2);
+ node->colonToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 223: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ sym(2).ival, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 225: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ sym(2).ival, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 226: {
+ sym(1).ival = QSOperator::Assign;
+} break;
+
+case 227: {
+ sym(1).ival = QSOperator::InplaceMul;
+} break;
+
+case 228: {
+ sym(1).ival = QSOperator::InplaceDiv;
+} break;
+
+case 229: {
+ sym(1).ival = QSOperator::InplaceMod;
+} break;
+
+case 230: {
+ sym(1).ival = QSOperator::InplaceAdd;
+} break;
+
+case 231: {
+ sym(1).ival = QSOperator::InplaceSub;
+} break;
+
+case 232: {
+ sym(1).ival = QSOperator::InplaceLeftShift;
+} break;
+
+case 233: {
+ sym(1).ival = QSOperator::InplaceRightShift;
+} break;
+
+case 234: {
+ sym(1).ival = QSOperator::InplaceURightShift;
+} break;
+
+case 235: {
+ sym(1).ival = QSOperator::InplaceAnd;
+} break;
+
+case 236: {
+ sym(1).ival = QSOperator::InplaceXor;
+} break;
+
+case 237: {
+ sym(1).ival = QSOperator::InplaceOr;
+} break;
+
+case 239: {
+ AST::Expression *node = makeAstNode<AST::Expression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 240: {
+ sym(1).Node = 0;
+} break;
+
+case 243: {
+ AST::Expression *node = makeAstNode<AST::Expression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 244: {
+ sym(1).Node = 0;
+} break;
+
+case 261: {
+ AST::Block *node = makeAstNode<AST::Block> (driver->nodePool(), sym(2).StatementList);
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 262: {
+ sym(1).Node = makeAstNode<AST::StatementList> (driver->nodePool(), sym(1).Statement);
+} break;
+
+case 263: {
+ sym(1).Node = makeAstNode<AST::StatementList> (driver->nodePool(), sym(1).StatementList, sym(2).Statement);
+} break;
+
+case 264: {
+ sym(1).Node = 0;
+} break;
+
+case 265: {
+ sym(1).Node = sym(1).StatementList->finish ();
+} break;
+
+case 267: {
+ AST::VariableStatement *node = makeAstNode<AST::VariableStatement> (driver->nodePool(),
+ sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST));
+ node->declarationKindToken = loc(1);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 268: {
+ sym(1).ival = T_CONST;
+} break;
+
+case 269: {
+ sym(1).ival = T_VAR;
+} break;
+
+case 270: {
+ sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclaration);
+} break;
+
+case 271: {
+ AST::VariableDeclarationList *node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(),
+ sym(1).VariableDeclarationList, sym(3).VariableDeclaration);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 272: {
+ sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclaration);
+} break;
+
+case 273: {
+ sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration);
+} break;
+
+case 274: {
+ AST::VariableDeclaration *node = makeAstNode<AST::VariableDeclaration> (driver->nodePool(), sym(1).sval, sym(2).Expression);
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 275: {
+ AST::VariableDeclaration *node = makeAstNode<AST::VariableDeclaration> (driver->nodePool(), sym(1).sval, sym(2).Expression);
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 276: {
+ // ### TODO: AST for initializer
+ sym(1) = sym(2);
+} break;
+
+case 277: {
+ sym(1).Node = 0;
+} break;
+
+case 279: {
+ // ### TODO: AST for initializer
+ sym(1) = sym(2);
+} break;
+
+case 280: {
+ sym(1).Node = 0;
+} break;
+
+case 282: {
+ AST::EmptyStatement *node = makeAstNode<AST::EmptyStatement> (driver->nodePool());
+ node->semicolonToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 284: {
+ AST::ExpressionStatement *node = makeAstNode<AST::ExpressionStatement> (driver->nodePool(), sym(1).Expression);
+ node->semicolonToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 285: {
+ AST::IfStatement *node = makeAstNode<AST::IfStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement, sym(7).Statement);
+ node->ifToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ node->elseToken = loc(5);
+ sym(1).Node = node;
+} break;
+
+case 286: {
+ AST::IfStatement *node = makeAstNode<AST::IfStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement);
+ node->ifToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 288: {
+ AST::DoWhileStatement *node = makeAstNode<AST::DoWhileStatement> (driver->nodePool(), sym(2).Statement, sym(5).Expression);
+ node->doToken = loc(1);
+ node->whileToken = loc(3);
+ node->lparenToken = loc(4);
+ node->rparenToken = loc(6);
+ node->semicolonToken = loc(7);
+ sym(1).Node = node;
+} break;
+
+case 289: {
+ AST::WhileStatement *node = makeAstNode<AST::WhileStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement);
+ node->whileToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 290: {
+ AST::ForStatement *node = makeAstNode<AST::ForStatement> (driver->nodePool(), sym(3).Expression,
+ sym(5).Expression, sym(7).Expression, sym(9).Statement);
+ node->forToken = loc(1);
+ node->lparenToken = loc(2);
+ node->firstSemicolonToken = loc(4);
+ node->secondSemicolonToken = loc(6);
+ node->rparenToken = loc(8);
+ sym(1).Node = node;
+} break;
+
+case 291: {
+ AST::LocalForStatement *node = makeAstNode<AST::LocalForStatement> (driver->nodePool(),
+ sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression,
+ sym(8).Expression, sym(10).Statement);
+ node->forToken = loc(1);
+ node->lparenToken = loc(2);
+ node->varToken = loc(3);
+ node->firstSemicolonToken = loc(5);
+ node->secondSemicolonToken = loc(7);
+ node->rparenToken = loc(9);
+ sym(1).Node = node;
+} break;
+
+case 292: {
+ AST:: ForEachStatement *node = makeAstNode<AST::ForEachStatement> (driver->nodePool(), sym(3).Expression,
+ sym(5).Expression, sym(7).Statement);
+ node->forToken = loc(1);
+ node->lparenToken = loc(2);
+ node->inToken = loc(4);
+ node->rparenToken = loc(6);
+ sym(1).Node = node;
+} break;
+
+case 293: {
+ AST::LocalForEachStatement *node = makeAstNode<AST::LocalForEachStatement> (driver->nodePool(),
+ sym(4).VariableDeclaration, sym(6).Expression, sym(8).Statement);
+ node->forToken = loc(1);
+ node->lparenToken = loc(2);
+ node->varToken = loc(3);
+ node->inToken = loc(5);
+ node->rparenToken = loc(7);
+ sym(1).Node = node;
+} break;
+
+case 295: {
+ AST::ContinueStatement *node = makeAstNode<AST::ContinueStatement> (driver->nodePool());
+ node->continueToken = loc(1);
+ node->semicolonToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 297: {
+ AST::ContinueStatement *node = makeAstNode<AST::ContinueStatement> (driver->nodePool(), sym(2).sval);
+ node->continueToken = loc(1);
+ node->identifierToken = loc(2);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 299: {
+ AST::BreakStatement *node = makeAstNode<AST::BreakStatement> (driver->nodePool());
+ node->breakToken = loc(1);
+ node->semicolonToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 301: {
+ AST::BreakStatement *node = makeAstNode<AST::BreakStatement> (driver->nodePool(), sym(2).sval);
+ node->breakToken = loc(1);
+ node->identifierToken = loc(2);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 303: {
+ AST::ReturnStatement *node = makeAstNode<AST::ReturnStatement> (driver->nodePool(), sym(2).Expression);
+ node->returnToken = loc(1);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 304: {
+ AST::WithStatement *node = makeAstNode<AST::WithStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement);
+ node->withToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 305: {
+ AST::SwitchStatement *node = makeAstNode<AST::SwitchStatement> (driver->nodePool(), sym(3).Expression, sym(5).CaseBlock);
+ node->switchToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 306: {
+ AST::CaseBlock *node = makeAstNode<AST::CaseBlock> (driver->nodePool(), sym(2).CaseClauses);
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 307: {
+ AST::CaseBlock *node = makeAstNode<AST::CaseBlock> (driver->nodePool(), sym(2).CaseClauses, sym(3).DefaultClause, sym(4).CaseClauses);
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(5);
+ sym(1).Node = node;
+} break;
+
+case 308: {
+ sym(1).Node = makeAstNode<AST::CaseClauses> (driver->nodePool(), sym(1).CaseClause);
+} break;
+
+case 309: {
+ sym(1).Node = makeAstNode<AST::CaseClauses> (driver->nodePool(), sym(1).CaseClauses, sym(2).CaseClause);
+} break;
+
+case 310: {
+ sym(1).Node = 0;
+} break;
+
+case 311: {
+ sym(1).Node = sym(1).CaseClauses->finish ();
+} break;
+
+case 312: {
+ AST::CaseClause *node = makeAstNode<AST::CaseClause> (driver->nodePool(), sym(2).Expression, sym(4).StatementList);
+ node->caseToken = loc(1);
+ node->colonToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 313: {
+ AST::DefaultClause *node = makeAstNode<AST::DefaultClause> (driver->nodePool(), sym(3).StatementList);
+ node->defaultToken = loc(1);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+case 314:
+case 315: {
+ AST::LabelledStatement *node = makeAstNode<AST::LabelledStatement> (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()), sym(3).Statement);
+ node->identifierToken = loc(1);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 316: {
+ AST::LabelledStatement *node = makeAstNode<AST::LabelledStatement> (driver->nodePool(), sym(1).sval, sym(3).Statement);
+ node->identifierToken = loc(1);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 318: {
+ AST::ThrowStatement *node = makeAstNode<AST::ThrowStatement> (driver->nodePool(), sym(2).Expression);
+ node->throwToken = loc(1);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 319: {
+ AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Catch);
+ node->tryToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 320: {
+ AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Finally);
+ node->tryToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 321: {
+ AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Catch, sym(4).Finally);
+ node->tryToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 322: {
+ AST::Catch *node = makeAstNode<AST::Catch> (driver->nodePool(), sym(3).sval, sym(5).Block);
+ node->catchToken = loc(1);
+ node->lparenToken = loc(2);
+ node->identifierToken = loc(3);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 323: {
+ AST::Finally *node = makeAstNode<AST::Finally> (driver->nodePool(), sym(2).Block);
+ node->finallyToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 325: {
+ AST::DebuggerStatement *node = makeAstNode<AST::DebuggerStatement> (driver->nodePool());
+ node->debuggerToken = loc(1);
+ node->semicolonToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 326: {
+ AST::FunctionDeclaration *node = makeAstNode<AST::FunctionDeclaration> (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody);
+ node->functionToken = loc(1);
+ node->identifierToken = loc(2);
+ node->lparenToken = loc(3);
+ node->rparenToken = loc(5);
+ node->lbraceToken = loc(6);
+ node->rbraceToken = loc(8);
+ sym(1).Node = node;
+} break;
+
+case 327: {
+ AST::FunctionExpression *node = makeAstNode<AST::FunctionExpression> (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody);
+ node->functionToken = loc(1);
+ if (sym(2).sval)
+ node->identifierToken = loc(2);
+ node->lparenToken = loc(3);
+ node->rparenToken = loc(5);
+ node->lbraceToken = loc(6);
+ node->rbraceToken = loc(8);
+ sym(1).Node = node;
+} break;
+
+case 328: {
+ AST::FormalParameterList *node = makeAstNode<AST::FormalParameterList> (driver->nodePool(), sym(1).sval);
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 329: {
+ AST::FormalParameterList *node = makeAstNode<AST::FormalParameterList> (driver->nodePool(), sym(1).FormalParameterList, sym(3).sval);
+ node->commaToken = loc(2);
+ node->identifierToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 330: {
+ sym(1).Node = 0;
+} break;
+
+case 331: {
+ sym(1).Node = sym(1).FormalParameterList->finish ();
+} break;
+
+case 332: {
+ sym(1).Node = 0;
+} break;
+
+case 334: {
+ sym(1).Node = makeAstNode<AST::FunctionBody> (driver->nodePool(), sym(1).SourceElements->finish ());
+} break;
+
+case 335: {
+ sym(1).Node = makeAstNode<AST::Program> (driver->nodePool(), sym(1).SourceElements->finish ());
+} break;
+
+case 336: {
+ sym(1).Node = makeAstNode<AST::SourceElements> (driver->nodePool(), sym(1).SourceElement);
+} break;
+
+case 337: {
+ sym(1).Node = makeAstNode<AST::SourceElements> (driver->nodePool(), sym(1).SourceElements, sym(2).SourceElement);
+} break;
+
+case 338: {
+ sym(1).Node = makeAstNode<AST::StatementSourceElement> (driver->nodePool(), sym(1).Statement);
+} break;
+
+case 339: {
+ sym(1).Node = makeAstNode<AST::FunctionSourceElement> (driver->nodePool(), sym(1).FunctionDeclaration);
+} break;
+
+case 340: {
+ sym(1).sval = 0;
+} break;
+
+case 342: {
+ sym(1).Node = 0;
+} break;
+
+ } // switch
+ action = nt_action(state_stack[tos], lhs[r] - TERMINAL_COUNT);
+ } // if
+ } while (action != 0);
+
+ if (first_token == last_token) {
+ const int errorState = state_stack[tos];
+
+ // automatic insertion of `;'
+ if (yytoken != -1 && t_action(errorState, T_AUTOMATIC_SEMICOLON) && automatic(driver, yytoken)) {
+ SavedToken &tk = token_buffer[0];
+ tk.token = yytoken;
+ tk.dval = yylval;
+ tk.loc = yylloc;
+
+ yylloc = yyprevlloc;
+ yylloc.offset += yylloc.length;
+ yylloc.startColumn += yylloc.length;
+ yylloc.length = 0;
+
+ //const QString msg = qApp->translate("QDeclarativeParser", "Missing `;'");
+ //diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, yylloc, msg));
+
+ first_token = &token_buffer[0];
+ last_token = &token_buffer[1];
+
+ yytoken = T_SEMICOLON;
+ yylval = 0;
+
+ action = errorState;
+
+ goto _Lcheck_token;
+ }
+
+ hadErrors = true;
+
+ token_buffer[0].token = yytoken;
+ token_buffer[0].dval = yylval;
+ token_buffer[0].loc = yylloc;
+
+ token_buffer[1].token = yytoken = lexer->lex();
+ token_buffer[1].dval = yylval = lexer->dval();
+ token_buffer[1].loc = yylloc = location(lexer);
+
+ if (t_action(errorState, yytoken)) {
+ QString msg;
+ int token = token_buffer[0].token;
+ if (token < 0 || token >= TERMINAL_COUNT)
+ msg = qApp->translate("QDeclarativeParser", "Syntax error");
+ else
+ msg = qApp->translate("QDeclarativeParser", "Unexpected token `%1'").arg(QLatin1String(spell[token]));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
+
+ action = errorState;
+ goto _Lcheck_token;
+ }
+
+ static int tokens[] = {
+ T_PLUS,
+ T_EQ,
+
+ T_COMMA,
+ T_COLON,
+ T_SEMICOLON,
+
+ T_RPAREN, T_RBRACKET, T_RBRACE,
+
+ T_NUMERIC_LITERAL,
+ T_IDENTIFIER,
+
+ T_LPAREN, T_LBRACKET, T_LBRACE,
+
+ EOF_SYMBOL
+ };
+
+ for (int *tk = tokens; *tk != EOF_SYMBOL; ++tk) {
+ int a = t_action(errorState, *tk);
+ if (a > 0 && t_action(a, yytoken)) {
+ const QString msg = qApp->translate("QDeclarativeParser", "Expected token `%1'").arg(QLatin1String(spell[*tk]));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
+
+ yytoken = *tk;
+ yylval = 0;
+ yylloc = token_buffer[0].loc;
+ yylloc.length = 0;
+
+ first_token = &token_buffer[0];
+ last_token = &token_buffer[2];
+
+ action = errorState;
+ goto _Lcheck_token;
+ }
+ }
+
+ for (int tk = 1; tk < TERMINAL_COUNT; ++tk) {
+ if (tk == T_AUTOMATIC_SEMICOLON || tk == T_FEED_UI_PROGRAM ||
+ tk == T_FEED_JS_STATEMENT || tk == T_FEED_JS_EXPRESSION ||
+ tk == T_FEED_JS_SOURCE_ELEMENT)
+ continue;
+
+ int a = t_action(errorState, tk);
+ if (a > 0 && t_action(a, yytoken)) {
+ const QString msg = qApp->translate("QDeclarativeParser", "Expected token `%1'").arg(QLatin1String(spell[tk]));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
+
+ yytoken = tk;
+ yylval = 0;
+ yylloc = token_buffer[0].loc;
+ yylloc.length = 0;
+
+ action = errorState;
+ goto _Lcheck_token;
+ }
+ }
+
+ const QString msg = qApp->translate("QDeclarativeParser", "Syntax error");
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
+ }
+
+ return false;
+}
+
+QT_QML_END_NAMESPACE
+
+
diff --git a/src/declarative/qml/parser/qdeclarativejsparser_p.h b/src/declarative/qml/parser/qdeclarativejsparser_p.h
new file mode 100644
index 0000000000..3864398992
--- /dev/null
+++ b/src/declarative/qml/parser/qdeclarativejsparser_p.h
@@ -0,0 +1,246 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+//
+// This file is automatically generated from qmljs.g.
+// Changes will be lost.
+//
+
+#ifndef QDECLARATIVEJSPARSER_P_H
+#define QDECLARATIVEJSPARSER_P_H
+
+#include "qdeclarativejsglobal_p.h"
+#include "qdeclarativejsgrammar_p.h"
+#include "qdeclarativejsast_p.h"
+#include "qdeclarativejsengine_p.h"
+
+#include <QtCore/QList>
+#include <QtCore/QString>
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS {
+
+class Engine;
+class NameId;
+
+class QML_PARSER_EXPORT Parser: protected QDeclarativeJSGrammar
+{
+public:
+ union Value {
+ int ival;
+ double dval;
+ NameId *sval;
+ AST::ArgumentList *ArgumentList;
+ AST::CaseBlock *CaseBlock;
+ AST::CaseClause *CaseClause;
+ AST::CaseClauses *CaseClauses;
+ AST::Catch *Catch;
+ AST::DefaultClause *DefaultClause;
+ AST::ElementList *ElementList;
+ AST::Elision *Elision;
+ AST::ExpressionNode *Expression;
+ AST::Finally *Finally;
+ AST::FormalParameterList *FormalParameterList;
+ AST::FunctionBody *FunctionBody;
+ AST::FunctionDeclaration *FunctionDeclaration;
+ AST::Node *Node;
+ AST::PropertyName *PropertyName;
+ AST::PropertyNameAndValueList *PropertyNameAndValueList;
+ AST::SourceElement *SourceElement;
+ AST::SourceElements *SourceElements;
+ AST::Statement *Statement;
+ AST::StatementList *StatementList;
+ AST::Block *Block;
+ AST::VariableDeclaration *VariableDeclaration;
+ AST::VariableDeclarationList *VariableDeclarationList;
+
+ AST::UiProgram *UiProgram;
+ AST::UiImportList *UiImportList;
+ AST::UiImport *UiImport;
+ AST::UiParameterList *UiParameterList;
+ AST::UiPublicMember *UiPublicMember;
+ AST::UiObjectDefinition *UiObjectDefinition;
+ AST::UiObjectInitializer *UiObjectInitializer;
+ AST::UiObjectBinding *UiObjectBinding;
+ AST::UiScriptBinding *UiScriptBinding;
+ AST::UiArrayBinding *UiArrayBinding;
+ AST::UiObjectMember *UiObjectMember;
+ AST::UiObjectMemberList *UiObjectMemberList;
+ AST::UiArrayMemberList *UiArrayMemberList;
+ AST::UiQualifiedId *UiQualifiedId;
+ AST::UiSignature *UiSignature;
+ AST::UiFormalList *UiFormalList;
+ AST::UiFormal *UiFormal;
+ };
+
+public:
+ Parser(Engine *engine);
+ ~Parser();
+
+ // parse a UI program
+ bool parse() { return parse(T_FEED_UI_PROGRAM); }
+ bool parseStatement() { return parse(T_FEED_JS_STATEMENT); }
+ bool parseExpression() { return parse(T_FEED_JS_EXPRESSION); }
+ bool parseSourceElement() { return parse(T_FEED_JS_SOURCE_ELEMENT); }
+ bool parseUiObjectMember() { return parse(T_FEED_UI_OBJECT_MEMBER); }
+ bool parseProgram() { return parse(T_FEED_JS_PROGRAM); }
+
+ AST::UiProgram *ast() const
+ { return AST::cast<AST::UiProgram *>(program); }
+
+ AST::Statement *statement() const
+ {
+ if (! program)
+ return 0;
+
+ return program->statementCast();
+ }
+
+ AST::ExpressionNode *expression() const
+ {
+ if (! program)
+ return 0;
+
+ return program->expressionCast();
+ }
+
+ AST::UiObjectMember *uiObjectMember() const
+ {
+ if (! program)
+ return 0;
+
+ return program->uiObjectMemberCast();
+ }
+
+ AST::Node *rootNode() const
+ { return program; }
+
+ QList<DiagnosticMessage> diagnosticMessages() const
+ { return diagnostic_messages; }
+
+ inline DiagnosticMessage diagnosticMessage() const
+ {
+ foreach (const DiagnosticMessage &d, diagnostic_messages) {
+ if (! d.kind == DiagnosticMessage::Warning)
+ return d;
+ }
+
+ return DiagnosticMessage();
+ }
+
+ inline QString errorMessage() const
+ { return diagnosticMessage().message; }
+
+ inline int errorLineNumber() const
+ { return diagnosticMessage().loc.startLine; }
+
+ inline int errorColumnNumber() const
+ { return diagnosticMessage().loc.startColumn; }
+
+protected:
+ bool parse(int startToken);
+
+ void reallocateStack();
+
+ inline Value &sym(int index)
+ { return sym_stack [tos + index - 1]; }
+
+ inline AST::SourceLocation &loc(int index)
+ { return location_stack [tos + index - 1]; }
+
+ AST::UiQualifiedId *reparseAsQualifiedId(AST::ExpressionNode *expr);
+
+protected:
+ Engine *driver;
+ int tos;
+ int stack_size;
+ Value *sym_stack;
+ int *state_stack;
+ AST::SourceLocation *location_stack;
+
+ AST::Node *program;
+
+ // error recovery
+ enum { TOKEN_BUFFER_SIZE = 3 };
+
+ struct SavedToken {
+ int token;
+ double dval;
+ AST::SourceLocation loc;
+ };
+
+ double yylval;
+ AST::SourceLocation yylloc;
+ AST::SourceLocation yyprevlloc;
+
+ SavedToken token_buffer[TOKEN_BUFFER_SIZE];
+ SavedToken *first_token;
+ SavedToken *last_token;
+
+ QList<DiagnosticMessage> diagnostic_messages;
+};
+
+} // end of namespace QDeclarativeJS
+
+
+
+#define J_SCRIPT_REGEXPLITERAL_RULE1 76
+
+#define J_SCRIPT_REGEXPLITERAL_RULE2 77
+
+QT_QML_END_NAMESPACE
+
+
+
+#endif // QDECLARATIVEJSPARSER_P_H
diff --git a/src/declarative/qml/qbitfield_p.h b/src/declarative/qml/qbitfield_p.h
new file mode 100644
index 0000000000..28afa406ef
--- /dev/null
+++ b/src/declarative/qml/qbitfield_p.h
@@ -0,0 +1,165 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QBITFIELD_P_H
+#define QBITFIELD_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
+
+class QBitField
+{
+public:
+ inline QBitField();
+ inline QBitField(const quint32 *, int bits);
+ inline QBitField(const QBitField &);
+ inline ~QBitField();
+
+ inline QBitField &operator=(const QBitField &);
+
+ inline quint32 size() const;
+ inline QBitField united(const QBitField &);
+ inline bool testBit(int) const;
+
+private:
+ quint32 bits:31;
+ quint32 *ownData;
+ const quint32 *data;
+};
+
+QBitField::QBitField()
+: bits(0), ownData(0), data(0)
+{
+}
+
+QBitField::QBitField(const quint32 *bitData, int bitCount)
+: bits((quint32)bitCount), ownData(0), data(bitData)
+{
+}
+
+QBitField::QBitField(const QBitField &other)
+: bits(other.bits), ownData(other.ownData), data(other.data)
+{
+ if (ownData)
+ ++(*ownData);
+}
+
+QBitField::~QBitField()
+{
+ if (ownData)
+ if(0 == --(*ownData)) delete [] ownData;
+}
+
+QBitField &QBitField::operator=(const QBitField &other)
+{
+ if (other.data == data)
+ return *this;
+
+ if (ownData)
+ if(0 == --(*ownData)) delete [] ownData;
+
+ bits = other.bits;
+ ownData = other.ownData;
+ data = other.data;
+
+ if (ownData)
+ ++(*ownData);
+
+ return *this;
+}
+
+inline quint32 QBitField::size() const
+{
+ return bits;
+}
+
+QBitField QBitField::united(const QBitField &o)
+{
+ if (o.bits == 0) {
+ return *this;
+ } else if (bits == 0) {
+ return o;
+ } else {
+ int max = (bits > o.bits)?bits:o.bits;
+ int length = (max + 31) / 32;
+ QBitField rv;
+ rv.bits = max;
+ rv.ownData = new quint32[length + 1];
+ *(rv.ownData) = 1;
+ rv.data = rv.ownData + 1;
+ if (bits > o.bits) {
+ ::memcpy((quint32 *)rv.data, data, length * sizeof(quint32));
+ for (quint32 ii = 0; ii < (o.bits + quint32(31)) / 32; ++ii)
+ ((quint32 *)rv.data)[ii] |= o.data[ii];
+ } else {
+ ::memcpy((quint32 *)rv.data, o.data, length * sizeof(quint32));
+ for (quint32 ii = 0; ii < (bits + quint32(31)) / 32; ++ii)
+ ((quint32 *)rv.data)[ii] |= data[ii];
+ }
+ return rv;
+ }
+}
+
+bool QBitField::testBit(int b) const
+{
+ Q_ASSERT(b >= 0);
+ if ((quint32)b < bits) {
+ return data[b / 32] & (1 << (b % 32));
+ } else {
+ return false;
+ }
+}
+
+QT_END_NAMESPACE
+
+#endif // QBITFIELD_P_H
diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h
new file mode 100644
index 0000000000..77b7484792
--- /dev/null
+++ b/src/declarative/qml/qdeclarative.h
@@ -0,0 +1,312 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVE_H
+#define QDECLARATIVE_H
+
+#include "qdeclarativeprivate.h"
+#include "qdeclarativeparserstatus.h"
+#include "qdeclarativepropertyvaluesource.h"
+#include "qdeclarativepropertyvalueinterceptor.h"
+#include "qdeclarativelist.h"
+
+#include <QtCore/qbytearray.h>
+#include <QtCore/qmetaobject.h>
+
+QT_BEGIN_HEADER
+
+#define QML_DECLARE_TYPE(TYPE) \
+ Q_DECLARE_METATYPE(TYPE *) \
+ Q_DECLARE_METATYPE(QDeclarativeListProperty<TYPE>)
+
+#define QML_DECLARE_TYPE_HASMETATYPE(TYPE) \
+ Q_DECLARE_METATYPE(QDeclarativeListProperty<TYPE>)
+
+#define QML_DECLARE_INTERFACE(INTERFACE) \
+ QML_DECLARE_TYPE(INTERFACE)
+
+#define QML_DECLARE_INTERFACE_HASMETATYPE(INTERFACE) \
+ QML_DECLARE_TYPE_HASMETATYPE(INTERFACE)
+
+enum { /* TYPEINFO flags */
+ QML_HAS_ATTACHED_PROPERTIES = 0x01,
+};
+
+#define QML_DECLARE_TYPEINFO(TYPE, FLAGS) \
+QT_BEGIN_NAMESPACE \
+template <> \
+class QDeclarativeTypeInfo<TYPE > \
+{ \
+public: \
+ enum { \
+ hasAttachedProperties = (((FLAGS) & QML_HAS_ATTACHED_PROPERTIES) == QML_HAS_ATTACHED_PROPERTIES) \
+ }; \
+}; \
+QT_END_NAMESPACE
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+template<typename T>
+int qmlRegisterType()
+{
+ QByteArray name(T::staticMetaObject.className());
+
+ QByteArray pointerName(name + '*');
+ QByteArray listName("QDeclarativeListProperty<" + name + ">");
+
+ QDeclarativePrivate::RegisterType type = {
+ 0,
+
+ qRegisterMetaType<T *>(pointerName.constData()),
+ qRegisterMetaType<QDeclarativeListProperty<T> >(listName.constData()),
+ 0,
+
+ 0, 0, 0, 0, &T::staticMetaObject,
+
+ QDeclarativePrivate::attachedPropertiesFunc<T>(),
+ QDeclarativePrivate::attachedPropertiesMetaObject<T>(),
+
+ QDeclarativePrivate::StaticCastSelector<T,QDeclarativeParserStatus>::cast(),
+ QDeclarativePrivate::StaticCastSelector<T,QDeclarativePropertyValueSource>::cast(),
+ QDeclarativePrivate::StaticCastSelector<T,QDeclarativePropertyValueInterceptor>::cast(),
+
+ 0, 0,
+
+ 0
+ };
+
+ return QDeclarativePrivate::registerType(type);
+}
+
+template<typename T>
+int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
+{
+ QByteArray name(T::staticMetaObject.className());
+
+ QByteArray pointerName(name + '*');
+ QByteArray listName("QDeclarativeListProperty<" + name + ">");
+
+ QDeclarativePrivate::RegisterType type = {
+ 0,
+
+ qRegisterMetaType<T *>(pointerName.constData()),
+ qRegisterMetaType<QDeclarativeListProperty<T> >(listName.constData()),
+ QDeclarativePrivate::create<T>,
+
+ uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject,
+
+ QDeclarativePrivate::attachedPropertiesFunc<T>(),
+ QDeclarativePrivate::attachedPropertiesMetaObject<T>(),
+
+ QDeclarativePrivate::StaticCastSelector<T,QDeclarativeParserStatus>::cast(),
+ QDeclarativePrivate::StaticCastSelector<T,QDeclarativePropertyValueSource>::cast(),
+ QDeclarativePrivate::StaticCastSelector<T,QDeclarativePropertyValueInterceptor>::cast(),
+
+ 0, 0,
+
+ 0
+ };
+
+ return QDeclarativePrivate::registerType(type);
+}
+
+template<typename T, typename E>
+int qmlRegisterExtendedType()
+{
+ QByteArray name(T::staticMetaObject.className());
+
+ QByteArray pointerName(name + '*');
+ QByteArray listName("QDeclarativeListProperty<" + name + ">");
+
+ QDeclarativePrivate::RegisterType type = {
+ 0,
+
+ qRegisterMetaType<T *>(pointerName.constData()),
+ qRegisterMetaType<QDeclarativeListProperty<T> >(listName.constData()),
+ 0,
+
+ 0, 0, 0, 0, &T::staticMetaObject,
+
+ QDeclarativePrivate::attachedPropertiesFunc<T>(),
+ QDeclarativePrivate::attachedPropertiesMetaObject<T>(),
+
+ QDeclarativePrivate::StaticCastSelector<T,QDeclarativeParserStatus>::cast(),
+ QDeclarativePrivate::StaticCastSelector<T,QDeclarativePropertyValueSource>::cast(),
+ QDeclarativePrivate::StaticCastSelector<T,QDeclarativePropertyValueInterceptor>::cast(),
+
+ QDeclarativePrivate::createParent<E>, &E::staticMetaObject,
+
+ 0
+ };
+
+ return QDeclarativePrivate::registerType(type);
+}
+
+template<typename T, typename E>
+int qmlRegisterExtendedType(const char *uri, int versionMajor, int versionMinor,
+ const char *qmlName)
+{
+ QByteArray name(T::staticMetaObject.className());
+
+ QByteArray pointerName(name + '*');
+ QByteArray listName("QDeclarativeListProperty<" + name + ">");
+
+ QDeclarativeAttachedPropertiesFunc attached = QDeclarativePrivate::attachedPropertiesFunc<E>();
+ const QMetaObject * attachedMetaObject = QDeclarativePrivate::attachedPropertiesMetaObject<E>();
+ if (!attached) {
+ attached = QDeclarativePrivate::attachedPropertiesFunc<T>();
+ attachedMetaObject = QDeclarativePrivate::attachedPropertiesMetaObject<T>();
+ }
+
+ QDeclarativePrivate::RegisterType type = {
+ 0,
+
+ qRegisterMetaType<T *>(pointerName.constData()),
+ qRegisterMetaType<QDeclarativeListProperty<T> >(listName.constData()),
+ QDeclarativePrivate::create<T>,
+
+ uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject,
+
+ attached,
+ attachedMetaObject,
+
+ QDeclarativePrivate::StaticCastSelector<T,QDeclarativeParserStatus>::cast(),
+ QDeclarativePrivate::StaticCastSelector<T,QDeclarativePropertyValueSource>::cast(),
+ QDeclarativePrivate::StaticCastSelector<T,QDeclarativePropertyValueInterceptor>::cast(),
+
+ QDeclarativePrivate::createParent<E>, &E::staticMetaObject,
+
+ 0
+ };
+
+ return QDeclarativePrivate::registerType(type);
+}
+
+template<typename T>
+int qmlRegisterInterface(const char *typeName)
+{
+ QByteArray name(typeName);
+
+ QByteArray pointerName(name + '*');
+ QByteArray listName("QDeclarativeListProperty<" + name + ">");
+
+ QDeclarativePrivate::RegisterInterface interface = {
+ 0,
+
+ qRegisterMetaType<T *>(pointerName.constData()),
+ qRegisterMetaType<QDeclarativeListProperty<T> >(listName.constData()),
+
+ qobject_interface_iid<T *>()
+ };
+
+ return QDeclarativePrivate::registerType(interface);
+}
+
+template<typename T>
+int qmlRegisterCustomType(const char *uri, int versionMajor, int versionMinor,
+ const char *qmlName, const char *typeName, QDeclarativeCustomParser *parser)
+{
+ QByteArray name(typeName);
+
+ QByteArray pointerName(name + '*');
+ QByteArray listName("QDeclarativeListProperty<" + name + ">");
+
+ QDeclarativePrivate::RegisterType type = {
+ 0,
+
+ qRegisterMetaType<T *>(pointerName.constData()),
+ qRegisterMetaType<QDeclarativeListProperty<T> >(listName.constData()),
+ QDeclarativePrivate::create<T>,
+
+ uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject,
+
+ QDeclarativePrivate::attachedPropertiesFunc<T>(),
+ QDeclarativePrivate::attachedPropertiesMetaObject<T>(),
+
+ QDeclarativePrivate::StaticCastSelector<T,QDeclarativeParserStatus>::cast(),
+ QDeclarativePrivate::StaticCastSelector<T,QDeclarativePropertyValueSource>::cast(),
+ QDeclarativePrivate::StaticCastSelector<T,QDeclarativePropertyValueInterceptor>::cast(),
+
+ 0, 0,
+
+ parser
+ };
+
+ return QDeclarativePrivate::registerType(type);
+}
+
+#define QML_REGISTER_INTERFACE(INTERFACE) \
+ qmlRegisterInterface<INTERFACE>(#INTERFACE)
+
+#define QML_REGISTER_EXTENDED_TYPE(URI, VERSION_MAJ, VERSION_MIN, NAME, CLASS, EXTENSION) \
+ qmlRegisterExtendedType<CLASS,EXTENSION>(#URI, VERSION_MAJ, VERSION_MIN, #NAME)
+
+#define QML_REGISTER_TYPE(URI,VMAJ,VMIN,NAME,CLASS) \
+ qmlRegisterType<CLASS>(#URI, VMAJ, VMIN, #NAME)
+
+#define QML_REGISTER_NOCREATE_TYPE(CLASS) \
+ qmlRegisterType<CLASS>()
+
+class QDeclarativeContext;
+class QDeclarativeEngine;
+Q_DECLARATIVE_EXPORT void qmlExecuteDeferred(QObject *);
+Q_DECLARATIVE_EXPORT QDeclarativeContext *qmlContext(const QObject *);
+Q_DECLARATIVE_EXPORT QDeclarativeEngine *qmlEngine(const QObject *);
+Q_DECLARATIVE_EXPORT QObject *qmlAttachedPropertiesObjectById(int, const QObject *, bool create = true);
+Q_DECLARATIVE_EXPORT QObject *qmlAttachedPropertiesObject(int *, const QObject *, const QMetaObject *, bool create);
+
+template<typename T>
+QObject *qmlAttachedPropertiesObject(const QObject *obj, bool create = true)
+{
+ static int idx = -1;
+ return qmlAttachedPropertiesObject(&idx, obj, &T::staticMetaObject, create);
+}
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QObject)
+Q_DECLARE_METATYPE(QVariant)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVE_H
diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp
new file mode 100644
index 0000000000..88ca5cd643
--- /dev/null
+++ b/src/declarative/qml/qdeclarativebinding.cpp
@@ -0,0 +1,308 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativebinding_p.h"
+#include "qdeclarativebinding_p_p.h"
+
+#include "qdeclarative.h"
+#include "qdeclarativecontext.h"
+#include "qdeclarativeinfo.h"
+#include "qdeclarativecontext_p.h"
+#include "qdeclarativedeclarativedata_p.h"
+#include "qdeclarativestringconverters_p.h"
+
+#include <qfxperf_p_p.h>
+
+#include <QVariant>
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeBindingData::QDeclarativeBindingData()
+: updating(false), enabled(false)
+{
+}
+
+QDeclarativeBindingData::~QDeclarativeBindingData()
+{
+ removeError();
+}
+
+void QDeclarativeBindingData::refresh()
+{
+ if (enabled && !updating && q) {
+ QDeclarativeBinding *b = static_cast<QDeclarativeBinding *>(QDeclarativeExpressionPrivate::get(q));
+ b->update();
+ }
+}
+
+QDeclarativeBindingPrivate::QDeclarativeBindingPrivate()
+: QDeclarativeExpressionPrivate(new QDeclarativeBindingData)
+{
+}
+
+QDeclarativeBinding::QDeclarativeBinding(void *data, QDeclarativeRefCount *rc, QObject *obj, QDeclarativeContext *ctxt, const QString &url, int lineNumber, QObject *parent)
+: QDeclarativeExpression(ctxt, data, rc, obj, url, lineNumber, *new QDeclarativeBindingPrivate)
+{
+ setParent(parent);
+ setNotifyOnValueChanged(true);
+}
+
+QDeclarativeBinding::QDeclarativeBinding(const QString &str, QObject *obj, QDeclarativeContext *ctxt, QObject *parent)
+: QDeclarativeExpression(ctxt, str, obj, *new QDeclarativeBindingPrivate)
+{
+ setParent(parent);
+ setNotifyOnValueChanged(true);
+}
+
+QDeclarativeBinding::~QDeclarativeBinding()
+{
+}
+
+void QDeclarativeBinding::setTarget(const QDeclarativeProperty &prop)
+{
+ Q_D(QDeclarativeBinding);
+ d->bindingData()->property = prop;
+
+ update();
+}
+
+QDeclarativeProperty QDeclarativeBinding::property() const
+{
+ Q_D(const QDeclarativeBinding);
+ return d->bindingData()->property;
+}
+
+void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags)
+{
+ Q_D(QDeclarativeBinding);
+
+#ifdef Q_ENABLE_PERFORMANCE_LOG
+ QDeclarativePerfTimer<QDeclarativePerf::BindableValueUpdate> bu;
+#endif
+ QDeclarativeBindingData *data = d->bindingData();
+
+ if (!data->enabled)
+ return;
+
+ data->addref();
+
+ if (!data->updating) {
+ data->updating = true;
+
+ if (data->property.propertyType() == qMetaTypeId<QDeclarativeBinding *>()) {
+
+ int idx = data->property.index();
+ Q_ASSERT(idx != -1);
+
+
+ QDeclarativeBinding *t = this;
+ int status = -1;
+ void *a[] = { &t, 0, &status, &flags };
+ QMetaObject::metacall(data->property.object(),
+ QMetaObject::WriteProperty,
+ idx, a);
+
+ } else {
+ bool isUndefined = false;
+ QVariant value = this->value(&isUndefined);
+
+ if (isUndefined && !data->error.isValid() && data->property.isResettable()) {
+
+ data->property.reset();
+
+ } else if (isUndefined && !data->error.isValid()) {
+
+ QUrl url = QUrl(data->url);
+ int line = data->line;
+ if (url.isEmpty()) url = QUrl(QLatin1String("<Unknown File>"));
+
+ data->error.setUrl(url);
+ data->error.setLine(line);
+ data->error.setColumn(-1);
+ data->error.setDescription(QLatin1String("Unable to assign [undefined] to ") + QLatin1String(QMetaType::typeName(data->property.propertyType())));
+
+ } else if (!isUndefined && data->property.object() &&
+ !QDeclarativePropertyPrivate::write(data->property, value, flags)) {
+
+ QUrl url = QUrl(data->url);
+ int line = data->line;
+ if (url.isEmpty()) url = QUrl(QLatin1String("<Unknown File>"));
+
+ const char *valueType = 0;
+ if (value.userType() == QVariant::Invalid) valueType = "null";
+ else valueType = QMetaType::typeName(value.userType());
+
+ data->error.setUrl(url);
+ data->error.setLine(line);
+ data->error.setColumn(-1);
+ data->error.setDescription(QLatin1String("Unable to assign ") +
+ QLatin1String(valueType) +
+ QLatin1String(" to ") +
+ QLatin1String(QMetaType::typeName(data->property.propertyType())));
+ }
+
+ if (data->error.isValid()) {
+ QDeclarativeEnginePrivate *p = (data->context() && data->context()->engine())?
+ QDeclarativeEnginePrivate::get(data->context()->engine()):0;
+ if (!data->addError(p))
+ qWarning().nospace() << qPrintable(this->error().toString());
+ } else {
+ data->removeError();
+ }
+ }
+
+ data->updating = false;
+ } else {
+ qmlInfo(data->property.object()) << tr("Binding loop detected for property \"%1\"").arg(data->property.name());
+ }
+
+ data->release();
+}
+
+void QDeclarativeBindingPrivate::emitValueChanged()
+{
+ Q_Q(QDeclarativeBinding);
+ q->update();
+}
+
+void QDeclarativeBinding::setEnabled(bool e, QDeclarativePropertyPrivate::WriteFlags flags)
+{
+ Q_D(QDeclarativeBinding);
+ d->bindingData()->enabled = e;
+ setNotifyOnValueChanged(e);
+
+ QDeclarativeAbstractBinding::setEnabled(e, flags);
+
+ if (e) {
+ addToObject(d->bindingData()->property.object());
+ update(flags);
+ } else {
+ removeFromObject();
+ }
+}
+
+int QDeclarativeBinding::propertyIndex()
+{
+ Q_D(QDeclarativeBinding);
+ return d->bindingData()->property.index();
+}
+
+bool QDeclarativeBinding::enabled() const
+{
+ Q_D(const QDeclarativeBinding);
+
+ return d->bindingData()->enabled;
+}
+
+QString QDeclarativeBinding::expression() const
+{
+ return QDeclarativeExpression::expression();
+}
+
+QDeclarativeAbstractBinding::QDeclarativeAbstractBinding()
+: m_object(0), m_mePtr(0), m_prevBinding(0), m_nextBinding(0)
+{
+}
+
+QDeclarativeAbstractBinding::~QDeclarativeAbstractBinding()
+{
+ removeFromObject();
+ if (m_mePtr)
+ *m_mePtr = 0;
+}
+
+void QDeclarativeAbstractBinding::destroy()
+{
+ delete this;
+}
+
+void QDeclarativeAbstractBinding::addToObject(QObject *object)
+{
+ Q_ASSERT(object);
+
+ removeFromObject();
+
+ Q_ASSERT(!m_prevBinding);
+
+ QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(object, true);
+ m_nextBinding = data->bindings;
+ if (m_nextBinding) m_nextBinding->m_prevBinding = &m_nextBinding;
+ m_prevBinding = &data->bindings;
+ data->bindings = this;
+ m_object = object;
+
+ data->setBindingBit(m_object, propertyIndex());
+}
+
+void QDeclarativeAbstractBinding::removeFromObject()
+{
+ if (m_prevBinding) {
+ Q_ASSERT(m_object);
+
+ *m_prevBinding = m_nextBinding;
+ if (m_nextBinding) m_nextBinding->m_prevBinding = m_prevBinding;
+ m_prevBinding = 0;
+ m_nextBinding = 0;
+
+ QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(m_object, false);
+ if (data) data->clearBindingBit(propertyIndex());
+ m_object = 0;
+ }
+}
+
+void QDeclarativeAbstractBinding::clear()
+{
+ if (m_mePtr)
+ *m_mePtr = 0;
+}
+
+QString QDeclarativeAbstractBinding::expression() const
+{
+ return QLatin1String("<Unknown>");
+}
+
+void QDeclarativeAbstractBinding::setEnabled(bool e, QDeclarativePropertyPrivate::WriteFlags)
+{
+ if (e) m_mePtr = 0;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h
new file mode 100644
index 0000000000..1a714f00a0
--- /dev/null
+++ b/src/declarative/qml/qdeclarativebinding_p.h
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEBINDING_P_H
+#define QDECLARATIVEBINDING_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarative.h"
+#include "qdeclarativepropertyvaluesource.h"
+#include "qdeclarativeexpression.h"
+#include "qdeclarativeproperty.h"
+#include "qdeclarativeproperty_p.h"
+
+#include <QtCore/QObject>
+#include <QtCore/QMetaProperty>
+
+QT_BEGIN_NAMESPACE
+
+class Q_DECLARATIVE_EXPORT QDeclarativeAbstractBinding
+{
+public:
+ QDeclarativeAbstractBinding();
+ virtual ~QDeclarativeAbstractBinding();
+
+ virtual void destroy();
+
+ virtual QString expression() const;
+
+ void setEnabled(bool e) { setEnabled(e, QDeclarativePropertyPrivate::DontRemoveBinding); }
+ virtual void setEnabled(bool, QDeclarativePropertyPrivate::WriteFlags) = 0;
+ virtual int propertyIndex() = 0;
+
+ void update() { update(QDeclarativePropertyPrivate::DontRemoveBinding); }
+ virtual void update(QDeclarativePropertyPrivate::WriteFlags) = 0;
+
+ void addToObject(QObject *);
+ void removeFromObject();
+
+protected:
+ void clear();
+
+private:
+ friend class QDeclarativeDeclarativeData;
+ friend class QDeclarativeProperty;
+ friend class QDeclarativePropertyPrivate;
+ friend class QDeclarativeVME;
+
+ QObject *m_object;
+ QDeclarativeAbstractBinding **m_mePtr;
+ QDeclarativeAbstractBinding **m_prevBinding;
+ QDeclarativeAbstractBinding *m_nextBinding;
+};
+
+class QDeclarativeContext;
+class QDeclarativeBindingPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeBinding : public QDeclarativeExpression, public QDeclarativeAbstractBinding
+{
+Q_OBJECT
+public:
+ QDeclarativeBinding(const QString &, QObject *, QDeclarativeContext *, QObject *parent=0);
+ QDeclarativeBinding(void *, QDeclarativeRefCount *, QObject *, QDeclarativeContext *, const QString &, int,
+ QObject *parent);
+ ~QDeclarativeBinding();
+
+ void setTarget(const QDeclarativeProperty &);
+ QDeclarativeProperty property() const;
+
+ bool enabled() const;
+
+ // Inherited from QDeclarativeAbstractBinding
+ virtual void setEnabled(bool, QDeclarativePropertyPrivate::WriteFlags flags);
+ virtual int propertyIndex();
+ virtual void update(QDeclarativePropertyPrivate::WriteFlags flags);
+ virtual QString expression() const;
+
+public Q_SLOTS:
+ void update() { update(QDeclarativePropertyPrivate::DontRemoveBinding); }
+
+protected:
+ void emitValueChanged();
+
+private:
+ Q_DECLARE_PRIVATE(QDeclarativeBinding)
+};
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QDeclarativeBinding*);
+
+#endif // QDECLARATIVEBINDING_P_H
diff --git a/src/declarative/qml/qdeclarativebinding_p_p.h b/src/declarative/qml/qdeclarativebinding_p_p.h
new file mode 100644
index 0000000000..041103ccb7
--- /dev/null
+++ b/src/declarative/qml/qdeclarativebinding_p_p.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEBINDING_P_P_H
+#define QDECLARATIVEBINDING_P_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativebinding_p.h"
+
+#include "qdeclarativeproperty.h"
+#include "qdeclarativeexpression_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeBindingData : public QDeclarativeExpressionData
+{
+public:
+ QDeclarativeBindingData();
+ virtual ~QDeclarativeBindingData();
+
+ bool updating:1;
+ bool enabled:1;
+
+ QDeclarativeProperty property;
+
+ virtual void refresh();
+};
+
+class QDeclarativeBindingPrivate : public QDeclarativeExpressionPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeBinding)
+public:
+ QDeclarativeBindingPrivate();
+
+ QDeclarativeBindingData *bindingData() { return static_cast<QDeclarativeBindingData *>(data); }
+ const QDeclarativeBindingData *bindingData() const { return static_cast<const QDeclarativeBindingData *>(data); }
+
+ virtual void emitValueChanged();
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEBINDING_P_P_H
diff --git a/src/declarative/qml/qdeclarativeboundsignal.cpp b/src/declarative/qml/qdeclarativeboundsignal.cpp
new file mode 100644
index 0000000000..6a5a102f75
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeboundsignal.cpp
@@ -0,0 +1,263 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeboundsignal_p.h"
+
+#include "qmetaobjectbuilder_p.h"
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativeexpression_p.h"
+#include "qdeclarativecontext_p.h"
+#include "qdeclarativemetatype_p.h"
+#include "qdeclarative.h"
+#include "qdeclarativecontext.h"
+#include "qdeclarativeglobal_p.h"
+
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeBoundSignalParameters : public QObject
+{
+Q_OBJECT
+public:
+ QDeclarativeBoundSignalParameters(const QMetaMethod &, QObject * = 0);
+ ~QDeclarativeBoundSignalParameters();
+
+ void setValues(void **);
+ void clearValues();
+
+private:
+ friend class MetaObject;
+ int metaCall(QMetaObject::Call, int _id, void **);
+ struct MetaObject : public QAbstractDynamicMetaObject {
+ MetaObject(QDeclarativeBoundSignalParameters *b)
+ : parent(b) {}
+
+ int metaCall(QMetaObject::Call c, int id, void **a) {
+ return parent->metaCall(c, id, a);
+ }
+ QDeclarativeBoundSignalParameters *parent;
+ };
+
+ int *types;
+ void **values;
+ QMetaObject *myMetaObject;
+};
+
+static int evaluateIdx = -1;
+
+QDeclarativeAbstractBoundSignal::QDeclarativeAbstractBoundSignal(QObject *parent)
+: QObject(parent)
+{
+}
+
+QDeclarativeAbstractBoundSignal::~QDeclarativeAbstractBoundSignal()
+{
+}
+
+QDeclarativeBoundSignal::QDeclarativeBoundSignal(QObject *scope, const QMetaMethod &signal,
+ QObject *parent)
+: m_expression(0), m_signal(signal), m_paramsValid(false), m_params(0)
+{
+ // A cached evaluation of the QDeclarativeExpression::value() slot index.
+ //
+ // This is thread safe. Although it may be updated by two threads, they
+ // will both set it to the same value - so the worst thing that can happen
+ // is that they both do the work to figure it out. Boo hoo.
+ if (evaluateIdx == -1) evaluateIdx = metaObject()->methodCount();
+
+ QDeclarative_setParent_noEvent(this, parent);
+ QMetaObject::connect(scope, m_signal.methodIndex(), this, evaluateIdx);
+}
+
+QDeclarativeBoundSignal::QDeclarativeBoundSignal(QDeclarativeContext *ctxt, const QString &val,
+ QObject *scope, const QMetaMethod &signal,
+ QObject *parent)
+: m_expression(0), m_signal(signal), m_paramsValid(false), m_params(0)
+{
+ // A cached evaluation of the QDeclarativeExpression::value() slot index.
+ //
+ // This is thread safe. Although it may be updated by two threads, they
+ // will both set it to the same value - so the worst thing that can happen
+ // is that they both do the work to figure it out. Boo hoo.
+ if (evaluateIdx == -1) evaluateIdx = metaObject()->methodCount();
+
+ QDeclarative_setParent_noEvent(this, parent);
+ QMetaObject::connect(scope, m_signal.methodIndex(), this, evaluateIdx);
+
+ m_expression = new QDeclarativeExpression(ctxt, val, scope);
+}
+
+QDeclarativeBoundSignal::~QDeclarativeBoundSignal()
+{
+ delete m_expression;
+ m_expression = 0;
+}
+
+int QDeclarativeBoundSignal::index() const
+{
+ return m_signal.methodIndex();
+}
+
+/*!
+ Returns the signal expression.
+*/
+QDeclarativeExpression *QDeclarativeBoundSignal::expression() const
+{
+ return m_expression;
+}
+
+/*!
+ Sets the signal expression to \a e. Returns the current signal expression,
+ or null if there is no signal expression.
+
+ The QDeclarativeBoundSignal instance takes ownership of \a e. The caller is
+ assumes ownership of the returned QDeclarativeExpression.
+*/
+QDeclarativeExpression *QDeclarativeBoundSignal::setExpression(QDeclarativeExpression *e)
+{
+ QDeclarativeExpression *rv = m_expression;
+ m_expression = e;
+ if (m_expression) m_expression->setNotifyOnValueChanged(false);
+ return rv;
+}
+
+QDeclarativeBoundSignal *QDeclarativeBoundSignal::cast(QObject *o)
+{
+ QDeclarativeAbstractBoundSignal *s = qobject_cast<QDeclarativeAbstractBoundSignal*>(o);
+ return static_cast<QDeclarativeBoundSignal *>(s);
+}
+
+int QDeclarativeBoundSignal::qt_metacall(QMetaObject::Call c, int id, void **a)
+{
+ if (c == QMetaObject::InvokeMetaMethod && id == evaluateIdx) {
+ if (!m_paramsValid) {
+ if (!m_signal.parameterTypes().isEmpty())
+ m_params = new QDeclarativeBoundSignalParameters(m_signal, this);
+ m_paramsValid = true;
+ }
+
+ if (m_params) m_params->setValues(a);
+ if (m_expression) {
+ QDeclarativeExpressionPrivate::get(m_expression)->value(m_params);
+ if (m_expression && m_expression->hasError())
+ qWarning().nospace() << qPrintable(m_expression->error().toString());
+ }
+ if (m_params) m_params->clearValues();
+ return -1;
+ } else {
+ return QObject::qt_metacall(c, id, a);
+ }
+}
+
+QDeclarativeBoundSignalParameters::QDeclarativeBoundSignalParameters(const QMetaMethod &method,
+ QObject *parent)
+: QObject(parent), types(0), values(0)
+{
+ MetaObject *mo = new MetaObject(this);
+
+ // ### Optimize!
+ // ### Ensure only supported types are allowed, otherwise it might crash
+ QMetaObjectBuilder mob;
+ mob.setSuperClass(&QDeclarativeBoundSignalParameters::staticMetaObject);
+ mob.setClassName("QDeclarativeBoundSignalParameters");
+
+ QList<QByteArray> paramTypes = method.parameterTypes();
+ QList<QByteArray> paramNames = method.parameterNames();
+ types = new int[paramTypes.count()];
+ for (int ii = 0; ii < paramTypes.count(); ++ii) {
+ const QByteArray &type = paramTypes.at(ii);
+ const QByteArray &name = paramNames.at(ii);
+
+ if (name.isEmpty() || type.isEmpty()) {
+ types[ii] = 0;
+ continue;
+ }
+
+ QVariant::Type t = (QVariant::Type)QMetaType::type(type.constData());
+ if (QDeclarativeMetaType::isQObject(t)) {
+ types[ii] = QMetaType::QObjectStar;
+ QMetaPropertyBuilder prop = mob.addProperty(name, "QObject*");
+ prop.setWritable(false);
+ } else {
+ types[ii] = t;
+ QMetaPropertyBuilder prop = mob.addProperty(name, type);
+ prop.setWritable(false);
+ }
+ }
+ myMetaObject = mob.toMetaObject();
+ *static_cast<QMetaObject *>(mo) = *myMetaObject;
+
+ d_ptr->metaObject = mo;
+}
+
+QDeclarativeBoundSignalParameters::~QDeclarativeBoundSignalParameters()
+{
+ delete [] types;
+ qFree(myMetaObject);
+}
+
+void QDeclarativeBoundSignalParameters::setValues(void **v)
+{
+ values = v;
+}
+
+void QDeclarativeBoundSignalParameters::clearValues()
+{
+ values = 0;
+}
+
+int QDeclarativeBoundSignalParameters::metaCall(QMetaObject::Call c, int id, void **a)
+{
+ if (!values)
+ return -1;
+
+ if (c == QMetaObject::ReadProperty && id >= 1) {
+ QDeclarativeMetaType::copy(types[id - 1], a[0], values[id]);
+ return -1;
+ } else {
+ return qt_metacall(c, id, a);
+ }
+}
+
+QT_END_NAMESPACE
+
+#include <qdeclarativeboundsignal.moc>
diff --git a/src/declarative/qml/qdeclarativeboundsignal_p.h b/src/declarative/qml/qdeclarativeboundsignal_p.h
new file mode 100644
index 0000000000..bba4eece63
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeboundsignal_p.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEBOUNDSIGNAL_P_H
+#define QDECLARATIVEBOUNDSIGNAL_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeexpression.h"
+
+#include <QtCore/qmetaobject.h>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeAbstractBoundSignal : public QObject
+{
+ Q_OBJECT
+public:
+ QDeclarativeAbstractBoundSignal(QObject *parent = 0);
+ virtual ~QDeclarativeAbstractBoundSignal() = 0;
+};
+
+class QDeclarativeBoundSignalParameters;
+class QDeclarativeBoundSignal : public QDeclarativeAbstractBoundSignal
+{
+public:
+ QDeclarativeBoundSignal(QObject *scope, const QMetaMethod &signal, QObject *parent);
+ QDeclarativeBoundSignal(QDeclarativeContext *ctxt, const QString &val, QObject *scope,
+ const QMetaMethod &signal, QObject *parent);
+ virtual ~QDeclarativeBoundSignal();
+
+ int index() const;
+
+ QDeclarativeExpression *expression() const;
+ QDeclarativeExpression *setExpression(QDeclarativeExpression *);
+
+ static QDeclarativeBoundSignal *cast(QObject *);
+
+protected:
+ virtual int qt_metacall(QMetaObject::Call c, int id, void **a);
+
+private:
+ QDeclarativeExpression *m_expression;
+ QMetaMethod m_signal;
+ bool m_paramsValid;
+ QDeclarativeBoundSignalParameters *m_params;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEBOUNDSIGNAL_P_H
diff --git a/src/declarative/qml/qdeclarativeclassfactory.cpp b/src/declarative/qml/qdeclarativeclassfactory.cpp
new file mode 100644
index 0000000000..ae4975c486
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeclassfactory.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeclassfactory_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeClassFactory::~QDeclarativeClassFactory()
+{
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeclassfactory_p.h b/src/declarative/qml/qdeclarativeclassfactory_p.h
new file mode 100644
index 0000000000..9f4a3de2bd
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeclassfactory_p.h
@@ -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 QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVECLASSFACTORY_P_H
+#define QDECLARATIVECLASSFACTORY_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeEngine;
+class QByteArray;
+class QUrl;
+class QDeclarativeComponent;
+
+class QDeclarativeClassFactory
+{
+public:
+ virtual ~QDeclarativeClassFactory();
+ virtual QDeclarativeComponent *create(const QByteArray &, const QUrl& baseUrl, QDeclarativeEngine*) = 0;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVECLASSFACTORY_P_H
diff --git a/src/declarative/qml/qdeclarativecleanup.cpp b/src/declarative/qml/qdeclarativecleanup.cpp
new file mode 100644
index 0000000000..0fa49d1dfc
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecleanup.cpp
@@ -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 QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativecleanup_p.h"
+
+#include "qdeclarativeengine_p.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+\internal
+\class QDeclarativeCleanup
+\brief The QDeclarativeCleanup provides a callback when a QDeclarativeEngine is deleted.
+
+Any object that needs cleanup to occur before the QDeclarativeEngine's QScriptEngine is
+destroyed should inherit from QDeclarativeCleanup. The clear() virtual method will be
+called by QDeclarativeEngine just before it deletes the QScriptEngine.
+*/
+
+/*!
+\internal
+
+Create a QDeclarativeCleanup for \a engine
+*/
+QDeclarativeCleanup::QDeclarativeCleanup(QDeclarativeEngine *engine)
+: prev(0), next(0)
+{
+ if (!engine)
+ return;
+
+ QDeclarativeEnginePrivate *p = QDeclarativeEnginePrivate::get(engine);
+
+ if (p->cleanup) next = p->cleanup;
+ p->cleanup = this;
+ prev = &p->cleanup;
+ if (next) next->prev = &next;
+}
+
+/*!
+\internal
+*/
+QDeclarativeCleanup::~QDeclarativeCleanup()
+{
+ if (prev) *prev = next;
+ if (next) next->prev = prev;
+ prev = 0;
+ next = 0;
+}
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativecleanup_p.h b/src/declarative/qml/qdeclarativecleanup_p.h
new file mode 100644
index 0000000000..e9b6b45aa2
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecleanup_p.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVECLEANUP_P_H
+#define QDECLARATIVECLEANUP_P_H
+
+#include <QtCore/qglobal.h>
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeEngine;
+class QDeclarativeCleanup
+{
+public:
+ QDeclarativeCleanup(QDeclarativeEngine *);
+ virtual ~QDeclarativeCleanup();
+
+protected:
+ virtual void clear() = 0;
+
+private:
+ friend class QDeclarativeEnginePrivate;
+ QDeclarativeCleanup **prev;
+ QDeclarativeCleanup *next;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVECLEANUP_P_H
+
diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp
new file mode 100644
index 0000000000..17937fdede
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp
@@ -0,0 +1,2738 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// #define COMPILEDBINDINGS_DEBUG
+
+#include "qdeclarativecompiledbindings_p.h"
+
+#include <QtDeclarative/qdeclarativeinfo.h>
+#include <private/qdeclarativecontext_p.h>
+#include <private/qdeclarativejsast_p.h>
+#include <private/qdeclarativejsengine_p.h>
+#include <private/qdeclarativeexpression_p.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qnumeric.h>
+#include <private/qdeclarativeanchors_p_p.h>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QDeclarativeJS;
+
+namespace {
+// Supported types: int, qreal, QString (needs constr/destr), QObject*, bool
+struct Register {
+ void setUndefined() { type = 0; }
+ void setUnknownButDefined() { type = -1; }
+ void setNaN() { setqreal(qSNaN()); }
+ bool isUndefined() const { return type == 0; }
+
+ void setQObject(QObject *o) { *((QObject **)data) = o; type = QMetaType::QObjectStar; }
+ QObject *getQObject() const { return *((QObject **)data); }
+
+ void setqreal(qreal v) { *((qreal *)data) = v; type = QMetaType::QReal; }
+ qreal getqreal() const { return *((qreal *)data); }
+
+ void setint(int v) { *((int *)data) = v; type = QMetaType::Int; }
+ int getint() const { return *((int *)data); }
+
+ void setbool(bool v) { *((bool *)data) = v; type = QMetaType::Bool; }
+ bool getbool() const { return *((bool *)data); }
+
+ QVariant *getvariantptr() { return (QVariant *)typeDataPtr(); }
+ QString *getstringptr() { return (QString *)typeDataPtr(); }
+ QUrl *geturlptr() { return (QUrl *)typeDataPtr(); }
+ const QVariant *getvariantptr() const { return (QVariant *)typeDataPtr(); }
+ const QString *getstringptr() const { return (QString *)typeDataPtr(); }
+ const QUrl *geturlptr() const { return (QUrl *)typeDataPtr(); }
+
+ void *typeDataPtr() { return (void *)&data; }
+ void *typeMemory() { return (void *)data; }
+ const void *typeDataPtr() const { return (void *)&data; }
+ const void *typeMemory() const { return (void *)data; }
+
+ int gettype() const { return type; }
+ void settype(int t) { type = t; }
+
+ int type; // Optional type
+ void *data[2]; // Object stored here
+};
+}
+
+class QDeclarativeCompiledBindingsPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeCompiledBindings)
+
+public:
+ QDeclarativeCompiledBindingsPrivate();
+ virtual ~QDeclarativeCompiledBindingsPrivate();
+
+ struct Binding : public QDeclarativeAbstractBinding, public QDeclarativeDelayedError {
+ Binding() : enabled(false), updating(0), property(0),
+ scope(0), target(0), parent(0) {}
+
+ // Inherited from QDeclarativeAbstractBinding
+ virtual void setEnabled(bool, QDeclarativePropertyPrivate::WriteFlags flags);
+ virtual int propertyIndex();
+ virtual void update(QDeclarativePropertyPrivate::WriteFlags flags);
+ virtual void destroy();
+
+ int index:30;
+ bool enabled:1;
+ bool updating:1;
+ int property;
+ QObject *scope;
+ QObject *target;
+
+ QDeclarativeCompiledBindingsPrivate *parent;
+ };
+
+ struct Subscription {
+ struct Signal {
+ QDeclarativeGuard<QObject> source;
+ int notifyIndex;
+ };
+
+ enum { InvalidType, SignalType, IdType } type;
+ inline Subscription();
+ inline ~Subscription();
+ bool isSignal() const { return type == SignalType; }
+ bool isId() const { return type == IdType; }
+ inline Signal *signal();
+ inline QDeclarativeContextPrivate::IdNotifier *id();
+ union {
+ char signalData[sizeof(Signal)];
+ char idData[sizeof(QDeclarativeContextPrivate::IdNotifier)];
+ };
+ };
+ Subscription *subscriptions;
+ QScriptDeclarativeClass::PersistentIdentifier *identifiers;
+
+ void run(Binding *);
+
+ const char *programData;
+ Binding *m_bindings;
+ quint32 *m_signalTable;
+
+ static int methodCount;
+
+ void init();
+ void run(int instr, QDeclarativeContextPrivate *context,
+ QDeclarativeDelayedError *error, QObject *scope, QObject *output);
+
+
+ inline void unsubscribe(int subIndex);
+ inline void subscribeId(QDeclarativeContextPrivate *p, int idIndex, int subIndex);
+ inline void subscribe(QObject *o, int notifyIndex, int subIndex);
+
+ QDeclarativePropertyCache::Data *findproperty(QObject *obj,
+ const QScriptDeclarativeClass::Identifier &name,
+ QDeclarativeEnginePrivate *enginePriv,
+ QDeclarativePropertyCache::Data &local);
+ bool findproperty(QObject *obj,
+ Register *output,
+ QDeclarativeEnginePrivate *enginePriv,
+ int subIdx,
+ const QScriptDeclarativeClass::Identifier &name,
+ bool isTerminal);
+ void findgeneric(Register *output, // value output
+ int subIdx, // Subscription index in config
+ QDeclarativeContextPrivate *context, // Context to search in
+ const QScriptDeclarativeClass::Identifier &name,
+ bool isTerminal);
+};
+
+QDeclarativeCompiledBindingsPrivate::QDeclarativeCompiledBindingsPrivate()
+: subscriptions(0), identifiers(0)
+{
+}
+
+QDeclarativeCompiledBindingsPrivate::~QDeclarativeCompiledBindingsPrivate()
+{
+ delete [] subscriptions; subscriptions = 0;
+ delete [] identifiers; identifiers = 0;
+}
+
+QDeclarativeCompiledBindingsPrivate::Subscription::Subscription()
+: type(InvalidType)
+{
+}
+
+QDeclarativeCompiledBindingsPrivate::Subscription::~Subscription()
+{
+ if (type == SignalType) ((Signal *)signalData)->~Signal();
+ else if (type == IdType) ((QDeclarativeContextPrivate::IdNotifier *)idData)->~IdNotifier();
+}
+
+
+int QDeclarativeCompiledBindingsPrivate::methodCount = -1;
+
+QDeclarativeCompiledBindings::QDeclarativeCompiledBindings(const char *program, QDeclarativeContext *context)
+: QObject(*(new QDeclarativeCompiledBindingsPrivate))
+{
+ Q_D(QDeclarativeCompiledBindings);
+
+ if (d->methodCount == -1)
+ d->methodCount = QDeclarativeCompiledBindings::staticMetaObject.methodCount();
+
+ d->programData = program;
+
+ d->init();
+
+ QDeclarativeAbstractExpression::setContext(context);
+}
+
+QDeclarativeCompiledBindings::~QDeclarativeCompiledBindings()
+{
+ Q_D(QDeclarativeCompiledBindings);
+
+ delete [] d->m_bindings;
+}
+
+QDeclarativeAbstractBinding *QDeclarativeCompiledBindings::configBinding(int index, QObject *target,
+ QObject *scope, int property)
+{
+ Q_D(QDeclarativeCompiledBindings);
+
+ QDeclarativeCompiledBindingsPrivate::Binding *rv = d->m_bindings + index;
+
+ rv->index = index;
+ rv->property = property;
+ rv->target = target;
+ rv->scope = scope;
+ rv->parent = d;
+
+ addref(); // This is decremented in Binding::destroy()
+
+ return rv;
+}
+
+void QDeclarativeCompiledBindingsPrivate::Binding::setEnabled(bool e, QDeclarativePropertyPrivate::WriteFlags flags)
+{
+ if (e) {
+ addToObject(target);
+ update(flags);
+ } else {
+ removeFromObject();
+ }
+
+ QDeclarativeAbstractBinding::setEnabled(e, flags);
+
+ if (enabled != e) {
+ enabled = e;
+
+ if (e) update(flags);
+ }
+}
+
+int QDeclarativeCompiledBindingsPrivate::Binding::propertyIndex()
+{
+ return property & 0xFFFF;
+}
+
+void QDeclarativeCompiledBindingsPrivate::Binding::update(QDeclarativePropertyPrivate::WriteFlags)
+{
+ parent->run(this);
+}
+
+void QDeclarativeCompiledBindingsPrivate::Binding::destroy()
+{
+ enabled = false;
+ removeFromObject();
+ parent->q_func()->release();
+ clear();
+}
+
+int QDeclarativeCompiledBindings::qt_metacall(QMetaObject::Call c, int id, void **)
+{
+ Q_D(QDeclarativeCompiledBindings);
+
+ if (c == QMetaObject::InvokeMetaMethod && id >= d->methodCount) {
+ id -= d->methodCount;
+
+ quint32 *reeval = d->m_signalTable + d->m_signalTable[id];
+ quint32 count = *reeval;
+ ++reeval;
+ for (quint32 ii = 0; ii < count; ++ii) {
+ d->run(d->m_bindings + reeval[ii]);
+ }
+ }
+ return -1;
+}
+
+void QDeclarativeCompiledBindingsPrivate::run(Binding *binding)
+{
+ Q_Q(QDeclarativeCompiledBindings);
+
+ if (!binding->enabled)
+ return;
+ if (binding->updating)
+ qWarning("ERROR: Circular binding");
+
+ QDeclarativeContext *context = q->QDeclarativeAbstractExpression::context();
+ if (!context) {
+ qWarning("QDeclarativeCompiledBindings: Attempted to evaluate an expression in an invalid context");
+ return;
+ }
+ QDeclarativeContextPrivate *cp = QDeclarativeContextPrivate::get(context);
+
+ if (binding->property & 0xFFFF0000) {
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(cp->engine);
+
+ QDeclarativeValueType *vt = ep->valueTypes[(binding->property >> 16) & 0xFF];
+ Q_ASSERT(vt);
+ vt->read(binding->target, binding->property & 0xFFFF);
+
+ QObject *target = vt;
+ run(binding->index, cp, binding, binding->scope, target);
+
+ vt->write(binding->target, binding->property & 0xFFFF,
+ QDeclarativePropertyPrivate::DontRemoveBinding);
+ } else {
+ run(binding->index, cp, binding, binding->scope, binding->target);
+ }
+}
+
+QDeclarativeCompiledBindingsPrivate::Subscription::Signal *QDeclarativeCompiledBindingsPrivate::Subscription::signal()
+{
+ if (type == IdType) ((QDeclarativeContextPrivate::IdNotifier *)idData)->~IdNotifier();
+ if (type != SignalType) new (signalData) Signal;
+ type = SignalType;
+ return (Signal *)signalData;
+}
+
+QDeclarativeContextPrivate::IdNotifier *QDeclarativeCompiledBindingsPrivate::Subscription::id()
+{
+ if (type == SignalType) ((Signal *)signalData)->~Signal();
+ if (type != IdType) new (idData) QDeclarativeContextPrivate::IdNotifier;
+ type = IdType;
+ return (QDeclarativeContextPrivate::IdNotifier *)idData;
+}
+
+namespace {
+// This structure is exactly 8-bytes in size
+struct Instr {
+ enum {
+ Noop,
+
+ Subscribe, // subscribe
+ SubscribeId, // subscribe
+
+ LoadId, // load
+ LoadScope, // load
+ LoadRoot, // load
+ LoadAttached, // attached
+
+ ConvertIntToReal, // unaryop
+ ConvertRealToInt, // unaryop
+
+ Real, // real_value
+ Int, // int_value
+ Bool, // bool_value
+ String, // string_value
+
+ AddReal, // binaryop
+ AddInt, // binaryop
+ AddString, // binaryop
+
+ MinusReal, // binaryop
+ MinusInt, // binaryop
+
+ CompareReal, // binaryop
+ CompareString, // binaryop
+
+ NotCompareReal, // binaryop
+ NotCompareString, // binaryop
+
+ GreaterThanReal, // binaryop
+ MaxReal, // binaryop
+ MinReal, // binaryop
+
+ NewString, // construct
+ NewUrl, // construct
+
+ CleanupUrl, // cleanup
+ CleanupString, // cleanup
+
+ Copy, // copy
+ Fetch, // fetch
+ Store, // store
+
+ Skip, // skip
+
+ Done,
+
+ // Speculative property resolution
+ InitString, // initstring
+ FindGeneric, // find
+ FindGenericTerminal, // find
+ FindProperty, // find
+ FindPropertyTerminal, // find
+ CleanupGeneric, // cleanup
+ ConvertGenericToReal, // unaryop
+ ConvertGenericToBool, // unaryop
+ ConvertGenericToString, // unaryop
+ ConvertGenericToUrl, // unaryop
+ };
+
+ union {
+ struct {
+ quint8 type;
+ quint8 packing[7];
+ } common;
+ struct {
+ quint8 type;
+ quint8 packing[3];
+ quint16 subscriptions;
+ quint16 identifiers;
+ } init;
+ struct {
+ quint8 type;
+ qint8 reg;
+ quint16 offset;
+ quint32 index;
+ } subscribe;
+ struct {
+ quint8 type;
+ qint8 reg;
+ quint8 packing[2];
+ quint32 index;
+ } load;
+ struct {
+ quint8 type;
+ qint8 output;
+ qint8 reg;
+ quint8 exceptionId;
+ quint32 index;
+ } attached;
+ struct {
+ quint8 type;
+ qint8 output;
+ qint8 reg;
+ quint8 exceptionId;
+ quint32 index;
+ } store;
+ struct {
+ quint8 type;
+ qint8 output;
+ qint8 objectReg;
+ quint8 exceptionId;
+ quint32 index;
+ } fetch;
+ struct {
+ quint8 type;
+ qint8 reg;
+ qint8 src;
+ quint8 packing[5];
+ } copy;
+ struct {
+ quint8 type;
+ qint8 reg;
+ quint8 packing[6];
+ } construct;
+ struct {
+ quint8 type;
+ qint8 reg;
+ quint8 packing[2];
+ float value;
+ } real_value;
+ struct {
+ quint8 type;
+ qint8 reg;
+ quint8 packing[2];
+ int value;
+ } int_value;
+ struct {
+ quint8 type;
+ qint8 reg;
+ bool value;
+ quint8 packing[5];
+ } bool_value;
+ struct {
+ quint8 type;
+ qint8 reg;
+ quint16 length;
+ quint32 offset;
+ } string_value;
+ struct {
+ quint8 type;
+ qint8 output;
+ qint8 src1;
+ qint8 src2;
+ quint8 packing[4];
+ } binaryop;
+ struct {
+ quint8 type;
+ qint8 output;
+ qint8 src;
+ quint8 packing[5];
+ } unaryop;
+ struct {
+ quint8 type;
+ qint8 reg;
+ quint8 packing[2];
+ quint32 count;
+ } skip;
+ struct {
+ quint8 type;
+ qint8 reg;
+ qint8 src;
+ quint8 exceptionId;
+ quint16 name;
+ quint16 subscribeIndex;
+ } find;
+ struct {
+ quint8 type;
+ qint8 reg;
+ quint8 packing[6];
+ } cleanup;
+ struct {
+ quint8 type;
+ quint8 packing[1];
+ quint16 offset;
+ quint32 dataIdx;
+ } initstring;
+ };
+};
+
+struct Program {
+ quint32 bindings;
+ quint32 dataLength;
+ quint32 signalTableOffset;
+ quint32 exceptionDataOffset;
+ quint16 subscriptions;
+ quint16 identifiers;
+ quint16 instructionCount;
+ quint16 dummy;
+
+ const char *data() const { return ((const char *)this) + sizeof(Program); }
+ const Instr *instructions() const { return (const Instr *)(data() + dataLength); }
+};
+}
+
+struct QDeclarativeBindingCompilerPrivate
+{
+ struct Result {
+ Result() : unknownType(false), metaObject(0), type(-1), reg(-1) {}
+ bool operator==(const Result &o) const {
+ return unknownType == o.unknownType &&
+ metaObject == o.metaObject &&
+ type == o.type &&
+ reg == o.reg;
+ }
+ bool operator!=(const Result &o) const {
+ return !(*this == o);
+ }
+ bool unknownType;
+ const QMetaObject *metaObject;
+ int type;
+ int reg;
+
+ QSet<QString> subscriptionSet;
+ };
+
+ QDeclarativeBindingCompilerPrivate() : registers(0) {}
+
+ void resetInstanceState();
+ int commitCompile();
+
+ QDeclarativeParser::Object *context;
+ QDeclarativeParser::Object *component;
+ QDeclarativeParser::Property *destination;
+ QHash<QString, QDeclarativeParser::Object *> ids;
+ QDeclarativeEnginePrivate::Imports imports;
+ QDeclarativeEnginePrivate *engine;
+
+ QString contextName() const { return QLatin1String("$$$SCOPE_") + QString::number((intptr_t)context, 16); }
+
+ bool compile(QDeclarativeJS::AST::Node *);
+
+ bool parseExpression(QDeclarativeJS::AST::Node *, Result &);
+
+ bool tryName(QDeclarativeJS::AST::Node *);
+ bool parseName(QDeclarativeJS::AST::Node *, Result &);
+
+ bool tryArith(QDeclarativeJS::AST::Node *);
+ bool parseArith(QDeclarativeJS::AST::Node *, Result &);
+ bool numberArith(Result &, const Result &, const Result &, QSOperator::Op op);
+ bool stringArith(Result &, const Result &, const Result &, QSOperator::Op op);
+
+ bool tryLogic(QDeclarativeJS::AST::Node *);
+ bool parseLogic(QDeclarativeJS::AST::Node *, Result &);
+
+ bool tryConditional(QDeclarativeJS::AST::Node *);
+ bool parseConditional(QDeclarativeJS::AST::Node *, Result &);
+
+ bool tryConstant(QDeclarativeJS::AST::Node *);
+ bool parseConstant(QDeclarativeJS::AST::Node *, Result &);
+
+ bool tryMethod(QDeclarativeJS::AST::Node *);
+ bool parseMethod(QDeclarativeJS::AST::Node *, Result &);
+
+ bool buildName(QStringList &, QDeclarativeJS::AST::Node *, QList<QDeclarativeJS::AST::ExpressionNode *> *nodes = 0);
+ bool fetch(Result &type, const QMetaObject *, int reg, int idx, const QStringList &, QDeclarativeJS::AST::ExpressionNode *);
+
+ quint32 registers;
+ QHash<int, QPair<int, int> > registerCleanups;
+ int acquireReg(int cleanup = Instr::Noop, int cleanupType = 0);
+ void registerCleanup(int reg, int cleanup, int cleanupType = 0);
+ void releaseReg(int);
+
+ int registerLiteralString(const QString &);
+ int registerString(const QString &);
+ QHash<QString, QPair<int, int> > registeredStrings;
+ QByteArray data;
+
+ bool subscription(const QStringList &, Result *);
+ int subscriptionIndex(const QStringList &);
+ bool subscriptionNeutral(const QSet<QString> &base, const QSet<QString> &lhs, const QSet<QString> &rhs);
+
+ quint8 exceptionId(QDeclarativeJS::AST::ExpressionNode *);
+ QVector<quint64> exceptions;
+
+ QSet<int> usedSubscriptionIds;
+ QSet<QString> subscriptionSet;
+ QHash<QString, int> subscriptionIds;
+ QVector<Instr> bytecode;
+
+ // Committed binding data
+ struct {
+ QList<int> offsets;
+ QList<QSet<int> > dependencies;
+
+ QVector<Instr> bytecode;
+ QByteArray data;
+ QHash<QString, int> subscriptionIds;
+ QVector<quint64> exceptions;
+
+ QHash<QString, QPair<int, int> > registeredStrings;
+
+ int count() const { return offsets.count(); }
+ } committed;
+
+ QByteArray buildSignalTable() const;
+ QByteArray buildExceptionData() const;
+};
+
+void QDeclarativeCompiledBindingsPrivate::unsubscribe(int subIndex)
+{
+ Q_Q(QDeclarativeCompiledBindings);
+
+ QDeclarativeCompiledBindingsPrivate::Subscription *sub = (subscriptions + subIndex);
+ if (sub->isSignal()) {
+ QDeclarativeCompiledBindingsPrivate::Subscription::Signal *s = sub->signal();
+ if (s->source)
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+ QMetaObject::disconnectOne(s->source, s->notifyIndex,
+ q, methodCount + subIndex);
+#else
+ // QTBUG-6781
+ QMetaObject::disconnect(s->source, s->notifyIndex,
+ q, methodCount + subIndex);
+#endif
+ } else if (sub->isId()) {
+ sub->id()->clear();
+ }
+}
+
+void QDeclarativeCompiledBindingsPrivate::subscribeId(QDeclarativeContextPrivate *p, int idIndex, int subIndex)
+{
+ Q_Q(QDeclarativeCompiledBindings);
+
+ unsubscribe(subIndex);
+
+ if (p->idValues[idIndex]) {
+ QDeclarativeCompiledBindingsPrivate::Subscription *sub = (subscriptions + subIndex);
+ QDeclarativeContextPrivate::IdNotifier *i = sub->id();
+
+ i->next = p->idValues[idIndex].bindings;
+ i->prev = &p->idValues[idIndex].bindings;
+ p->idValues[idIndex].bindings = i;
+ if (i->next) i->next->prev = &i->next;
+
+ i->target = q;
+ i->methodIndex = methodCount + subIndex;
+ }
+}
+
+void QDeclarativeCompiledBindingsPrivate::subscribe(QObject *o, int notifyIndex, int subIndex)
+{
+ Q_Q(QDeclarativeCompiledBindings);
+
+ QDeclarativeCompiledBindingsPrivate::Subscription *sub = (subscriptions + subIndex);
+
+ if (sub->isId())
+ unsubscribe(subIndex);
+
+ QDeclarativeCompiledBindingsPrivate::Subscription::Signal *s = sub->signal();
+ if (o != s->source || notifyIndex != s->notifyIndex) {
+ if (s->source)
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+ QMetaObject::disconnectOne(s->source, s->notifyIndex,
+ q, methodCount + subIndex);
+#else
+ // QTBUG-6781
+ QMetaObject::disconnect(s->source, s->notifyIndex,
+ q, methodCount + subIndex);
+#endif
+ s->source = o;
+ s->notifyIndex = notifyIndex;
+ if (s->source && s->notifyIndex != -1)
+ QMetaObject::connect(s->source, s->notifyIndex, q,
+ methodCount + subIndex, Qt::DirectConnection);
+ }
+}
+
+// Conversion functions - these MUST match the QtScript expression path
+inline static qreal toReal(Register *reg, int type, bool *ok = 0)
+{
+ if (ok) *ok = true;
+
+ if (type == QMetaType::QReal) {
+ return reg->getqreal();
+ } else if (type == qMetaTypeId<QVariant>()) {
+ return reg->getvariantptr()->toReal();
+ } else {
+ if (ok) *ok = false;
+ return 0;
+ }
+}
+
+inline static QString toString(Register *reg, int type, bool *ok = 0)
+{
+ if (ok) *ok = true;
+
+ if (type == QMetaType::QReal) {
+ return QString::number(reg->getqreal());
+ } else if (type == QMetaType::Int) {
+ return QString::number(reg->getint());
+ } else if (type == qMetaTypeId<QVariant>()) {
+ return reg->getvariantptr()->toString();
+ } else if (type == QMetaType::QString) {
+ return *reg->getstringptr();
+ } else {
+ if (ok) *ok = false;
+ return QString();
+ }
+}
+
+inline static bool toBool(Register *reg, int type, bool *ok = 0)
+{
+ if (ok) *ok = true;
+
+ if (type == QMetaType::Bool) {
+ return reg->getbool();
+ } else if (type == qMetaTypeId<QVariant>()) {
+ return reg->getvariantptr()->toBool();
+ } else {
+ if (ok) *ok = false;
+ return false;
+ }
+}
+
+inline static QUrl toUrl(Register *reg, int type, QDeclarativeContextPrivate *context, bool *ok = 0)
+{
+ if (ok) *ok = true;
+
+ QUrl base;
+ if (type == qMetaTypeId<QVariant>()) {
+ QVariant *var = reg->getvariantptr();
+ int vt = var->type();
+ if (vt == QVariant::Url) {
+ base = var->toUrl();
+ } else if (vt == QVariant::ByteArray) {
+ base = QUrl(QString::fromUtf8(var->toByteArray()));
+ } else if (vt == QVariant::String) {
+ base = QUrl(var->toString());
+ } else {
+ if (ok) *ok = false;
+ return QUrl();
+ }
+ } else if (type == QMetaType::QString) {
+ base = QUrl(*reg->getstringptr());
+ } else {
+ if (ok) *ok = false;
+ return QUrl();
+ }
+
+ if (!base.isEmpty() && base.isRelative())
+ return context->url.resolved(base);
+ else
+ return base;
+}
+
+static QObject *variantToQObject(const QVariant &value, bool *ok)
+{
+ if (ok) *ok = true;
+
+ if (value.userType() == QMetaType::QObjectStar) {
+ return qvariant_cast<QObject*>(value);
+ } else {
+ if (ok) *ok = false;
+ return 0;
+ }
+}
+
+bool QDeclarativeCompiledBindingsPrivate::findproperty(QObject *obj, Register *output,
+ QDeclarativeEnginePrivate *enginePriv,
+ int subIdx, const QScriptDeclarativeClass::Identifier &name,
+ bool isTerminal)
+{
+ if (!obj) {
+ output->setUndefined();
+ return false;
+ }
+
+ QDeclarativePropertyCache::Data local;
+ QDeclarativePropertyCache::Data *property =
+ QDeclarativePropertyCache::property(QDeclarativeEnginePrivate::get(enginePriv), obj, name, local);
+
+ if (property) {
+ if (subIdx != -1)
+ subscribe(obj, property->notifyIndex, subIdx);
+
+ if (property->flags & QDeclarativePropertyCache::Data::IsQObjectDerived) {
+ void *args[] = { output->typeDataPtr(), 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, property->coreIndex, args);
+ output->settype(QMetaType::QObjectStar);
+ } else if (property->propType == qMetaTypeId<QVariant>()) {
+ QVariant v;
+ void *args[] = { &v, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, property->coreIndex, args);
+
+ if (isTerminal) {
+ new (output->typeDataPtr()) QVariant(v);
+ output->settype(qMetaTypeId<QVariant>());
+ } else {
+ bool ok;
+ output->setQObject(variantToQObject(v, &ok));
+ if (!ok)
+ output->setUndefined();
+ else
+ output->settype(QMetaType::QObjectStar);
+ }
+
+ } else {
+ if (!isTerminal) {
+ output->setUndefined();
+ } else if (property->propType == QMetaType::QReal) {
+ void *args[] = { output->typeDataPtr(), 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, property->coreIndex, args);
+ output->settype(QMetaType::QReal);
+ } else if (property->propType == QMetaType::Int) {
+ void *args[] = { output->typeDataPtr(), 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, property->coreIndex, args);
+ output->settype(QMetaType::Int);
+ } else if (property->propType == QMetaType::Bool) {
+ void *args[] = { output->typeDataPtr(), 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, property->coreIndex, args);
+ output->settype(QMetaType::Bool);
+ } else if (property->propType == QMetaType::QString) {
+ new (output->typeDataPtr()) QString();
+ void *args[] = { output->typeDataPtr(), 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, property->coreIndex, args);
+ output->settype(QMetaType::QString);
+ } else {
+ new (output->typeDataPtr())
+ QVariant(obj->metaObject()->property(property->coreIndex).read(obj));
+ output->settype(qMetaTypeId<QVariant>());
+ }
+ }
+
+ return true;
+ } else {
+ output->setUndefined();
+ return false;
+ }
+}
+
+void QDeclarativeCompiledBindingsPrivate::findgeneric(Register *output,
+ int subIdx,
+ QDeclarativeContextPrivate *context,
+ const QScriptDeclarativeClass::Identifier &name,
+ bool isTerminal)
+{
+ QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(context->engine);
+
+ while (context) {
+
+ int contextPropertyIndex = context->propertyNames?context->propertyNames->value(name):-1;
+
+
+ if (contextPropertyIndex != -1) {
+
+ if (subIdx != -1)
+ subscribe(QDeclarativeContextPrivate::get(context), contextPropertyIndex + context->notifyIndex, subIdx);
+
+ if (contextPropertyIndex < context->idValueCount) {
+ output->setQObject(context->idValues[contextPropertyIndex]);
+ output->settype(QMetaType::QObjectStar);
+ } else {
+ const QVariant &value = context->propertyValues.at(contextPropertyIndex);
+ if (isTerminal) {
+ new (output->typeDataPtr()) QVariant(value);
+ output->settype(qMetaTypeId<QVariant>());
+ } else {
+ bool ok;
+ output->setQObject(variantToQObject(value, &ok));
+ if (!ok) { output->setUndefined(); }
+ else { output->settype(QMetaType::QObjectStar); }
+ return;
+ }
+ }
+
+ return;
+ }
+
+ for (int ii = 0; ii < context->scripts.count(); ++ii) {
+ QScriptValue function = QScriptDeclarativeClass::function(context->scripts.at(ii), name);
+ if (function.isValid()) {
+ qFatal("Binding optimizer resolved name to QScript method");
+ }
+ }
+
+ if (QObject *root = context->defaultObjects.isEmpty()?0:context->defaultObjects.first()) {
+
+ if (findproperty(root, output, enginePriv, subIdx, name, isTerminal))
+ return;
+
+ }
+
+ if (context->parent) {
+ context = QDeclarativeContextPrivate::get(context->parent);
+ } else {
+ context = 0;
+ }
+ }
+
+ output->setUndefined();
+}
+
+void QDeclarativeCompiledBindingsPrivate::init()
+{
+ Program *program = (Program *)programData;
+ if (program->subscriptions)
+ subscriptions = new QDeclarativeCompiledBindingsPrivate::Subscription[program->subscriptions];
+ if (program->identifiers)
+ identifiers = new QScriptDeclarativeClass::PersistentIdentifier[program->identifiers];
+
+ m_signalTable = (quint32 *)(program->data() + program->signalTableOffset);
+ m_bindings = new QDeclarativeCompiledBindingsPrivate::Binding[program->bindings];
+}
+
+static void throwException(int id, QDeclarativeDelayedError *error,
+ Program *program, QDeclarativeContextPrivate *context,
+ const QString &description = QString())
+{
+ error->error.setUrl(context->url);
+ if (description.isEmpty())
+ error->error.setDescription(QLatin1String("TypeError: Result of expression is not an object"));
+ else
+ error->error.setDescription(description);
+ if (id != 0xFF) {
+ quint64 e = *((quint64 *)(program->data() + program->exceptionDataOffset) + id);
+ error->error.setLine((e >> 32) & 0xFFFFFFFF);
+ error->error.setColumn(e & 0xFFFFFFFF);
+ } else {
+ error->error.setLine(-1);
+ error->error.setColumn(-1);
+ }
+ if (!context->engine || !error->addError(QDeclarativeEnginePrivate::get(context->engine)))
+ qWarning() << error->error;
+}
+
+static void dumpInstruction(const Instr *instr)
+{
+ switch (instr->common.type) {
+ case Instr::Noop:
+ qWarning().nospace() << "Noop";
+ break;
+ case Instr::Subscribe:
+ qWarning().nospace() << "Subscribe" << "\t\t" << instr->subscribe.offset << "\t" << instr->subscribe.reg << "\t" << instr->subscribe.index;
+ break;
+ case Instr::SubscribeId:
+ qWarning().nospace() << "SubscribeId" << "\t\t" << instr->subscribe.offset << "\t" << instr->subscribe.reg << "\t" << instr->subscribe.index;
+ break;
+ case Instr::LoadId:
+ qWarning().nospace() << "LoadId" << "\t\t\t" << instr->load.index << "\t" << instr->load.reg;
+ break;
+ case Instr::LoadScope:
+ qWarning().nospace() << "LoadScope" << "\t\t" << instr->load.index << "\t" << instr->load.reg;
+ break;
+ case Instr::LoadRoot:
+ qWarning().nospace() << "LoadRoot" << "\t\t" << instr->load.index << "\t" << instr->load.reg;
+ break;
+ case Instr::LoadAttached:
+ qWarning().nospace() << "LoadAttached" << "\t\t" << instr->attached.output << "\t" << instr->attached.reg << "\t" << instr->attached.index;
+ break;
+ case Instr::ConvertIntToReal:
+ qWarning().nospace() << "ConvertIntToReal" << "\t" << instr->unaryop.output << "\t" << instr->unaryop.src;
+ break;
+ case Instr::ConvertRealToInt:
+ qWarning().nospace() << "ConvertRealToInt" << "\t" << instr->unaryop.output << "\t" << instr->unaryop.src;
+ break;
+ case Instr::Real:
+ qWarning().nospace() << "Real" << "\t\t\t" << instr->real_value.reg << "\t" << instr->real_value.value;
+ break;
+ case Instr::Int:
+ qWarning().nospace() << "Int" << "\t\t\t" << instr->int_value.reg << "\t" << instr->int_value.value;
+ break;
+ case Instr::Bool:
+ qWarning().nospace() << "Bool" << "\t\t\t" << instr->bool_value.reg << "\t" << instr->bool_value.value;
+ break;
+ case Instr::String:
+ qWarning().nospace() << "String" << "\t\t\t" << instr->string_value.reg << "\t" << instr->string_value.offset << "\t" << instr->string_value.length;
+ break;
+ case Instr::AddReal:
+ qWarning().nospace() << "AddReal" << "\t\t\t" << instr->binaryop.output << "\t" << instr->binaryop.src1 << "\t" << instr->binaryop.src2;
+ break;
+ case Instr::AddInt:
+ qWarning().nospace() << "AddInt" << "\t\t\t" << instr->binaryop.output << "\t" << instr->binaryop.src1 << "\t" << instr->binaryop.src2;
+ break;
+ case Instr::AddString:
+ qWarning().nospace() << "AddString" << "\t\t" << instr->binaryop.output << "\t" << instr->binaryop.src1 << "\t" << instr->binaryop.src2;
+ break;
+ case Instr::MinusReal:
+ qWarning().nospace() << "MinusReal" << "\t\t" << instr->binaryop.output << "\t" << instr->binaryop.src1 << "\t" << instr->binaryop.src2;
+ break;
+ case Instr::MinusInt:
+ qWarning().nospace() << "MinusInt" << "\t\t" << instr->binaryop.output << "\t" << instr->binaryop.src1 << "\t" << instr->binaryop.src2;
+ break;
+ case Instr::CompareReal:
+ qWarning().nospace() << "CompareReal" << "\t\t" << instr->binaryop.output << "\t" << instr->binaryop.src1 << "\t" << instr->binaryop.src2;
+ break;
+ case Instr::CompareString:
+ qWarning().nospace() << "CompareString" << "\t\t" << instr->binaryop.output << "\t" << instr->binaryop.src1 << "\t" << instr->binaryop.src2;
+ break;
+ case Instr::NotCompareReal:
+ qWarning().nospace() << "NotCompareReal" << "\t\t" << instr->binaryop.output << "\t" << instr->binaryop.src1 << "\t" << instr->binaryop.src2;
+ break;
+ case Instr::NotCompareString:
+ qWarning().nospace() << "NotCompareString" << "\t\t" << instr->binaryop.output << "\t" << instr->binaryop.src1 << "\t" << instr->binaryop.src2;
+ break;
+ case Instr::GreaterThanReal:
+ qWarning().nospace() << "GreaterThanReal" << "\t\t" << instr->binaryop.output << "\t" << instr->binaryop.src1 << "\t" << instr->binaryop.src2;
+ break;
+ case Instr::MaxReal:
+ qWarning().nospace() << "MaxReal" << "\t\t\t" << instr->binaryop.output << "\t" << instr->binaryop.src1 << "\t" << instr->binaryop.src2;
+ break;
+ case Instr::MinReal:
+ qWarning().nospace() << "MinReal" << "\t\t\t" << instr->binaryop.output << "\t" << instr->binaryop.src1 << "\t" << instr->binaryop.src2;
+ break;
+ case Instr::NewString:
+ qWarning().nospace() << "NewString" << "\t\t" << instr->construct.reg;
+ break;
+ case Instr::NewUrl:
+ qWarning().nospace() << "NewUrl" << "\t\t\t" << instr->construct.reg;
+ break;
+ case Instr::CleanupString:
+ qWarning().nospace() << "CleanupString" << "\t\t" << instr->cleanup.reg;
+ break;
+ case Instr::CleanupUrl:
+ qWarning().nospace() << "CleanupUrl" << "\t\t" << instr->cleanup.reg;
+ break;
+ case Instr::Fetch:
+ qWarning().nospace() << "Fetch" << "\t\t\t" << instr->fetch.output << "\t" << instr->fetch.index << "\t" << instr->fetch.objectReg;
+ break;
+ case Instr::Store:
+ qWarning().nospace() << "Store" << "\t\t\t" << instr->store.output << "\t" << instr->store.index << "\t" << instr->store.reg;
+ break;
+ case Instr::Copy:
+ qWarning().nospace() << "Copy" << "\t\t\t" << instr->copy.reg << "\t" << instr->copy.src;
+ break;
+ case Instr::Skip:
+ qWarning().nospace() << "Skip" << "\t\t\t" << instr->skip.reg << "\t" << instr->skip.count;
+ break;
+ case Instr::Done:
+ qWarning().nospace() << "Done";
+ break;
+ case Instr::InitString:
+ qWarning().nospace() << "InitString" << "\t\t" << instr->initstring.offset << "\t" << instr->initstring.dataIdx;
+ break;
+ case Instr::FindGeneric:
+ qWarning().nospace() << "FindGeneric" << "\t\t" << instr->find.reg << "\t" << instr->find.name;
+ break;
+ case Instr::FindGenericTerminal:
+ qWarning().nospace() << "FindGenericTerminal" << "\t" << instr->find.reg << "\t" << instr->find.name;
+ break;
+ case Instr::FindProperty:
+ qWarning().nospace() << "FindProperty" << "\t\t" << instr->find.reg << "\t" << instr->find.src << "\t" << instr->find.name;
+ break;
+ case Instr::FindPropertyTerminal:
+ qWarning().nospace() << "FindPropertyTerminal" << "\t" << instr->find.reg << "\t" << instr->find.src << "\t" << instr->find.name;
+ break;
+ case Instr::CleanupGeneric:
+ qWarning().nospace() << "CleanupGeneric" << "\t\t" << instr->cleanup.reg;
+ break;
+ case Instr::ConvertGenericToReal:
+ qWarning().nospace() << "ConvertGenericToReal" << "\t" << instr->unaryop.output << "\t" << instr->unaryop.src;
+ break;
+ case Instr::ConvertGenericToBool:
+ qWarning().nospace() << "ConvertGenericToBool" << "\t" << instr->unaryop.output << "\t" << instr->unaryop.src;
+ break;
+ case Instr::ConvertGenericToString:
+ qWarning().nospace() << "ConvertGenericToString" << "\t" << instr->unaryop.output << "\t" << instr->unaryop.src;
+ break;
+ case Instr::ConvertGenericToUrl:
+ qWarning().nospace() << "ConvertGenericToUrl" << "\t" << instr->unaryop.output << "\t" << instr->unaryop.src;
+ break;
+ default:
+ qWarning().nospace() << "Unknown";
+ break;
+ }
+}
+
+void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
+ QDeclarativeContextPrivate *context, QDeclarativeDelayedError *error,
+ QObject *scope, QObject *output)
+{
+ error->removeError();
+
+ Register registers[32];
+ int storeFlags = 0;
+
+ QDeclarativeEnginePrivate *engine = QDeclarativeEnginePrivate::get(context->engine);
+ Program *program = (Program *)programData;
+ const Instr *instr = program->instructions();
+ instr += instrIndex;
+ const char *data = program->data();
+
+#ifdef COMPILEDBINDINGS_DEBUG
+ qWarning().nospace() << "Begin binding run";
+#endif
+
+ while (instr) {
+#ifdef COMPILEDBINDINGS_DEBUG
+ dumpInstruction(instr);
+#endif
+
+ switch (instr->common.type) {
+ case Instr::Noop:
+ break;
+
+ case Instr::SubscribeId:
+ subscribeId(context, instr->subscribe.index, instr->subscribe.offset);
+ break;
+
+ case Instr::Subscribe:
+ {
+ QObject *o = 0;
+ const Register &object = registers[instr->subscribe.reg];
+ if (!object.isUndefined()) o = object.getQObject();
+ subscribe(o, instr->subscribe.index, instr->subscribe.offset);
+ }
+ break;
+
+ case Instr::LoadId:
+ registers[instr->load.reg].setQObject(context->idValues[instr->load.index].data());
+ break;
+
+ case Instr::LoadScope:
+ registers[instr->load.reg].setQObject(scope);
+ break;
+
+ case Instr::LoadRoot:
+ registers[instr->load.reg].setQObject(context->defaultObjects.at(0));
+ break;
+
+ case Instr::LoadAttached:
+ {
+ const Register &input = registers[instr->attached.reg];
+ Register &output = registers[instr->attached.output];
+ if (input.isUndefined()) {
+ throwException(instr->attached.exceptionId, error, program, context);
+ return;
+ }
+
+ QObject *object = registers[instr->attached.reg].getQObject();
+ if (!object) {
+ output.setUndefined();
+ } else {
+ QObject *attached =
+ qmlAttachedPropertiesObjectById(instr->attached.index,
+ registers[instr->attached.reg].getQObject(),
+ true);
+ Q_ASSERT(attached);
+ output.setQObject(attached);
+ }
+ }
+ break;
+
+ case Instr::ConvertIntToReal:
+ {
+ const Register &input = registers[instr->unaryop.src];
+ Register &output = registers[instr->unaryop.output];
+ if (input.isUndefined()) output.setUndefined();
+ else output.setqreal(qreal(input.getint()));
+ }
+ break;
+
+ case Instr::ConvertRealToInt:
+ {
+ const Register &input = registers[instr->unaryop.src];
+ Register &output = registers[instr->unaryop.output];
+ if (input.isUndefined()) output.setUndefined();
+ else output.setint(int(input.getqreal()));
+ }
+ break;
+
+ case Instr::Real:
+ registers[instr->real_value.reg].setqreal(instr->real_value.value);
+ break;
+
+ case Instr::Int:
+ registers[instr->int_value.reg].setint(instr->int_value.value);
+ break;
+
+ case Instr::Bool:
+ registers[instr->bool_value.reg].setbool(instr->bool_value.value);
+ break;
+
+ case Instr::String:
+ {
+ Register &output = registers[instr->string_value.reg];
+ new (output.getstringptr())
+ QString((QChar *)(data + instr->string_value.offset), instr->string_value.length);
+ output.settype(QMetaType::QString);
+ }
+ break;
+
+ case Instr::AddReal:
+ {
+ const Register &lhs = registers[instr->binaryop.src1];
+ const Register &rhs = registers[instr->binaryop.src2];
+ Register &output = registers[instr->binaryop.output];
+ if (lhs.isUndefined() || rhs.isUndefined()) output.setNaN();
+ else output.setqreal(lhs.getqreal() + rhs.getqreal());
+ }
+ break;
+
+ case Instr::AddInt:
+ {
+ const Register &lhs = registers[instr->binaryop.src1];
+ const Register &rhs = registers[instr->binaryop.src2];
+ Register &output = registers[instr->binaryop.output];
+ if (lhs.isUndefined() || rhs.isUndefined()) output.setNaN();
+ else output.setint(lhs.getint() + rhs.getint());
+ }
+ break;
+
+ case Instr::AddString:
+ {
+ const Register &lhs = registers[instr->binaryop.src1];
+ const Register &rhs = registers[instr->binaryop.src2];
+ Register &output = registers[instr->binaryop.output];
+ if (lhs.isUndefined() && rhs.isUndefined()) { output.setNaN(); }
+ else {
+ if (lhs.isUndefined())
+ new (output.getstringptr())
+ QString(QLatin1String("undefined") + *registers[instr->binaryop.src2].getstringptr());
+ else if (rhs.isUndefined())
+ new (output.getstringptr())
+ QString(*registers[instr->binaryop.src1].getstringptr() + QLatin1String("undefined"));
+ else
+ new (output.getstringptr())
+ QString(*registers[instr->binaryop.src1].getstringptr() +
+ *registers[instr->binaryop.src2].getstringptr());
+ output.settype(QMetaType::QString);
+ }
+ }
+ break;
+
+ case Instr::MinusReal:
+ {
+ const Register &lhs = registers[instr->binaryop.src1];
+ const Register &rhs = registers[instr->binaryop.src2];
+ Register &output = registers[instr->binaryop.output];
+ if (lhs.isUndefined() || rhs.isUndefined()) output.setNaN();
+ else output.setqreal(lhs.getqreal() - rhs.getqreal());
+ }
+ break;
+
+ case Instr::MinusInt:
+ {
+ const Register &lhs = registers[instr->binaryop.src1];
+ const Register &rhs = registers[instr->binaryop.src2];
+ Register &output = registers[instr->binaryop.output];
+ if (lhs.isUndefined() || rhs.isUndefined()) output.setNaN();
+ else output.setint(lhs.getint() - rhs.getint());
+ }
+ break;
+
+ case Instr::CompareReal:
+ {
+ const Register &lhs = registers[instr->binaryop.src1];
+ const Register &rhs = registers[instr->binaryop.src2];
+ Register &output = registers[instr->binaryop.output];
+ if (lhs.isUndefined() || rhs.isUndefined()) output.setbool(lhs.isUndefined() == rhs.isUndefined());
+ else output.setbool(lhs.getqreal() == rhs.getqreal());
+ }
+ break;
+
+ case Instr::CompareString:
+ {
+ const Register &lhs = registers[instr->binaryop.src1];
+ const Register &rhs = registers[instr->binaryop.src2];
+ Register &output = registers[instr->binaryop.output];
+ if (lhs.isUndefined() || rhs.isUndefined()) output.setbool(lhs.isUndefined() == rhs.isUndefined());
+ else output.setbool(*lhs.getstringptr() == *rhs.getstringptr());
+ }
+ break;
+
+ case Instr::NotCompareReal:
+ {
+ const Register &lhs = registers[instr->binaryop.src1];
+ const Register &rhs = registers[instr->binaryop.src2];
+ Register &output = registers[instr->binaryop.output];
+ if (lhs.isUndefined() || rhs.isUndefined()) output.setbool(lhs.isUndefined() != rhs.isUndefined());
+ else output.setbool(lhs.getqreal() != rhs.getqreal());
+ }
+ break;
+
+ case Instr::NotCompareString:
+ {
+ const Register &lhs = registers[instr->binaryop.src1];
+ const Register &rhs = registers[instr->binaryop.src2];
+ Register &output = registers[instr->binaryop.output];
+ if (lhs.isUndefined() || rhs.isUndefined()) output.setbool(lhs.isUndefined() != rhs.isUndefined());
+ else output.setbool(*lhs.getstringptr() != *rhs.getstringptr());
+ }
+ break;
+
+ case Instr::GreaterThanReal:
+ {
+ const Register &lhs = registers[instr->binaryop.src1];
+ const Register &rhs = registers[instr->binaryop.src2];
+ Register &output = registers[instr->binaryop.output];
+ if (lhs.isUndefined() || rhs.isUndefined()) output.setbool(false);
+ else output.setbool(lhs.getqreal() > rhs.getqreal());
+ }
+ break;
+
+ case Instr::MaxReal:
+ {
+ const Register &lhs = registers[instr->binaryop.src1];
+ const Register &rhs = registers[instr->binaryop.src2];
+ Register &output = registers[instr->binaryop.output];
+ if (lhs.isUndefined() || rhs.isUndefined()) output.setNaN();
+ else output.setqreal(qMax(lhs.getqreal(), rhs.getqreal()));
+ }
+ break;
+
+ case Instr::MinReal:
+ {
+ const Register &lhs = registers[instr->binaryop.src1];
+ const Register &rhs = registers[instr->binaryop.src2];
+ Register &output = registers[instr->binaryop.output];
+ if (lhs.isUndefined() || rhs.isUndefined()) output.setNaN();
+ else output.setqreal(qMin(lhs.getqreal(), rhs.getqreal()));
+ }
+ break;
+
+ case Instr::NewString:
+ {
+ Register &output = registers[instr->construct.reg];
+ new (output.getstringptr()) QString;
+ output.settype(QMetaType::QString);
+ }
+ break;
+
+ case Instr::NewUrl:
+ {
+ Register &output = registers[instr->construct.reg];
+ new (output.geturlptr()) QUrl;
+ output.settype(QMetaType::QUrl);
+ }
+ break;
+
+ case Instr::CleanupString:
+ registers[instr->cleanup.reg].getstringptr()->~QString();
+ break;
+
+ case Instr::CleanupUrl:
+ registers[instr->cleanup.reg].geturlptr()->~QUrl();
+ break;
+
+ case Instr::Fetch:
+ {
+ const Register &input = registers[instr->fetch.objectReg];
+ Register &output = registers[instr->fetch.output];
+
+ if (input.isUndefined()) {
+ throwException(instr->fetch.exceptionId, error, program, context);
+ return;
+ }
+
+ QObject *object = input.getQObject();
+ if (!object) {
+ output.setUndefined();
+ } else {
+ void *argv[] = { output.typeDataPtr(), 0 };
+ QMetaObject::metacall(object, QMetaObject::ReadProperty, instr->fetch.index, argv);
+ }
+ }
+ break;
+
+ case Instr::Store:
+ {
+ Register &data = registers[instr->store.reg];
+ if (data.isUndefined()) {
+ throwException(instr->store.exceptionId, error, program, context,
+ QLatin1String("Unable to assign undefined value"));
+ return;
+ }
+
+ int status = -1;
+ void *argv[] = { data.typeDataPtr(), 0, &status, &storeFlags };
+ QMetaObject::metacall(output, QMetaObject::WriteProperty,
+ instr->store.index, argv);
+ }
+ break;
+
+ case Instr::Copy:
+ registers[instr->copy.reg] = registers[instr->copy.src];
+ break;
+
+ case Instr::Skip:
+ if (instr->skip.reg == -1 || !registers[instr->skip.reg].getbool())
+ instr += instr->skip.count;
+ break;
+
+ case Instr::Done:
+ return;
+
+ case Instr::InitString:
+ if (!identifiers[instr->initstring.offset].identifier) {
+ quint32 len = *(quint32 *)(data + instr->initstring.dataIdx);
+ QChar *strdata = (QChar *)(data + instr->initstring.dataIdx + sizeof(quint32));
+
+ QString str = QString::fromRawData(strdata, len);
+
+ identifiers[instr->initstring.offset] = engine->objectClass->createPersistentIdentifier(str);
+ }
+ break;
+
+ case Instr::FindGenericTerminal:
+ case Instr::FindGeneric:
+ // We start the search in the parent context, as we know that the
+ // name is not present in the current context or it would have been
+ // found during the static compile
+ findgeneric(registers + instr->find.reg, instr->find.subscribeIndex,
+ QDeclarativeContextPrivate::get(context->parent),
+ identifiers[instr->find.name].identifier,
+ instr->common.type == Instr::FindGenericTerminal);
+ break;
+
+ case Instr::FindPropertyTerminal:
+ case Instr::FindProperty:
+ {
+ const Register &object = registers[instr->find.src];
+ if (object.isUndefined()) {
+ throwException(instr->find.exceptionId, error, program, context);
+ return;
+ }
+
+ findproperty(object.getQObject(), registers + instr->find.reg,
+ QDeclarativeEnginePrivate::get(context->engine),
+ instr->find.subscribeIndex, identifiers[instr->find.name].identifier,
+ instr->common.type == Instr::FindPropertyTerminal);
+ }
+ break;
+
+ case Instr::CleanupGeneric:
+ {
+ int type = registers[instr->cleanup.reg].gettype();
+ if (type == qMetaTypeId<QVariant>()) {
+ registers[instr->cleanup.reg].getvariantptr()->~QVariant();
+ } else if (type == QMetaType::QString) {
+ registers[instr->cleanup.reg].getstringptr()->~QString();
+ } else if (type == QMetaType::QUrl) {
+ registers[instr->cleanup.reg].geturlptr()->~QUrl();
+ }
+ }
+ break;
+
+ case Instr::ConvertGenericToReal:
+ {
+ Register &output = registers[instr->unaryop.output];
+ Register &input = registers[instr->unaryop.src];
+ bool ok = true;
+ output.setqreal(toReal(&input, input.gettype(), &ok));
+ if (!ok) output.setUndefined();
+ }
+ break;
+
+ case Instr::ConvertGenericToBool:
+ {
+ Register &output = registers[instr->unaryop.output];
+ Register &input = registers[instr->unaryop.src];
+ bool ok = true;
+ output.setbool(toBool(&input, input.gettype(), &ok));
+ if (!ok) output.setUndefined();
+ }
+ break;
+
+ case Instr::ConvertGenericToString:
+ {
+ Register &output = registers[instr->unaryop.output];
+ Register &input = registers[instr->unaryop.src];
+ bool ok = true;
+ QString str = toString(&input, input.gettype(), &ok);
+ if (ok) { new (output.getstringptr()) QString(str); output.settype(QMetaType::QString); }
+ else { output.setUndefined(); }
+ }
+ break;
+
+ case Instr::ConvertGenericToUrl:
+ {
+ Register &output = registers[instr->unaryop.output];
+ Register &input = registers[instr->unaryop.src];
+ bool ok = true;
+ QUrl url = toUrl(&input, input.gettype(), context, &ok);
+ if (ok) { new (output.geturlptr()) QUrl(url); output.settype(QMetaType::QUrl); }
+ else { output.setUndefined(); }
+ }
+ break;
+
+ default:
+ qFatal("EEK");
+ break;
+ }
+
+ instr++;
+ }
+}
+
+void QDeclarativeBindingCompiler::dump(const QByteArray &programData)
+{
+ const Program *program = (const Program *)programData.constData();
+
+ qWarning() << "Program.bindings:" << program->bindings;
+ qWarning() << "Program.dataLength:" << program->dataLength;
+ qWarning() << "Program.subscriptions:" << program->subscriptions;
+ qWarning() << "Program.indentifiers:" << program->identifiers;
+
+ int count = program->instructionCount;
+ const Instr *instr = program->instructions();
+
+ while (count--) {
+
+ dumpInstruction(instr);
+ ++instr;
+ }
+}
+
+/*!
+Clear the state associated with attempting to compile a specific binding.
+This does not clear the global "commited binding" states.
+*/
+void QDeclarativeBindingCompilerPrivate::resetInstanceState()
+{
+ registers = 0;
+ registerCleanups.clear();
+ data = committed.data;
+ exceptions = committed.exceptions;
+ usedSubscriptionIds.clear();
+ subscriptionSet.clear();
+ subscriptionIds = committed.subscriptionIds;
+ registeredStrings = committed.registeredStrings;
+ bytecode.clear();
+}
+
+/*!
+Mark the last compile as successful, and add it to the "committed data"
+section.
+
+Returns the index for the committed binding.
+*/
+int QDeclarativeBindingCompilerPrivate::commitCompile()
+{
+ int rv = committed.count();
+ committed.offsets << committed.bytecode.count();
+ committed.dependencies << usedSubscriptionIds;
+ committed.bytecode << bytecode;
+ committed.data = data;
+ committed.exceptions = exceptions;
+ committed.subscriptionIds = subscriptionIds;
+ committed.registeredStrings = registeredStrings;
+ return rv;
+}
+
+bool QDeclarativeBindingCompilerPrivate::compile(QDeclarativeJS::AST::Node *node)
+{
+ resetInstanceState();
+
+ if (destination->type == -1)
+ return false;
+
+ Result type;
+
+ if (!parseExpression(node, type))
+ return false;
+
+ if (subscriptionSet.count() > 0xFFFF ||
+ registeredStrings.count() > 0xFFFF)
+ return false;
+
+ if (type.unknownType) {
+ if (destination->type != QMetaType::QReal &&
+ destination->type != QVariant::String &&
+ destination->type != QMetaType::Bool &&
+ destination->type != QVariant::Url)
+ return false;
+
+ int convertReg = acquireReg();
+
+ if (destination->type == QMetaType::QReal) {
+ Instr convert;
+ convert.common.type = Instr::ConvertGenericToReal;
+ convert.unaryop.output = convertReg;
+ convert.unaryop.src = type.reg;
+ bytecode << convert;
+ } else if (destination->type == QVariant::String) {
+ Instr convert;
+ convert.common.type = Instr::ConvertGenericToString;
+ convert.unaryop.output = convertReg;
+ convert.unaryop.src = type.reg;
+ bytecode << convert;
+ } else if (destination->type == QMetaType::Bool) {
+ Instr convert;
+ convert.common.type = Instr::ConvertGenericToBool;
+ convert.unaryop.output = convertReg;
+ convert.unaryop.src = type.reg;
+ bytecode << convert;
+ } else if (destination->type == QVariant::Url) {
+ Instr convert;
+ convert.common.type = Instr::ConvertGenericToUrl;
+ convert.unaryop.output = convertReg;
+ convert.unaryop.src = type.reg;
+ bytecode << convert;
+ }
+
+ Instr cleanup;
+ cleanup.common.type = Instr::CleanupGeneric;
+ cleanup.cleanup.reg = type.reg;
+ bytecode << cleanup;
+
+ Instr instr;
+ instr.common.type = Instr::Store;
+ instr.store.output = 0;
+ instr.store.index = destination->index;
+ instr.store.reg = convertReg;
+ instr.store.exceptionId = exceptionId(node->expressionCast());
+ bytecode << instr;
+
+ if (destination->type == QVariant::String) {
+ Instr cleanup;
+ cleanup.common.type = Instr::CleanupString;
+ cleanup.cleanup.reg = convertReg;
+ bytecode << cleanup;
+ } else if (destination->type == QVariant::Url) {
+ Instr cleanup;
+ cleanup.common.type = Instr::CleanupUrl;
+ cleanup.cleanup.reg = convertReg;
+ bytecode << cleanup;
+ }
+
+ releaseReg(convertReg);
+
+ Instr done;
+ done.common.type = Instr::Done;
+ bytecode << done;
+
+ return true;
+ } else {
+ // Can we store the final value?
+ if (type.type == QVariant::Int &&
+ destination->type == QMetaType::QReal) {
+ Instr instr;
+ instr.common.type = Instr::ConvertIntToReal;
+ instr.unaryop.output = type.reg;
+ instr.unaryop.src = type.reg;
+ bytecode << instr;
+ type.type = QMetaType::QReal;
+ } else if (type.type == QMetaType::QReal &&
+ destination->type == QVariant::Int) {
+ Instr instr;
+ instr.common.type = Instr::ConvertRealToInt;
+ instr.unaryop.output = type.reg;
+ instr.unaryop.src = type.reg;
+ bytecode << instr;
+ type.type = QVariant::Int;
+ } else if (type.type == destination->type) {
+ } else {
+ const QMetaObject *from = type.metaObject;
+ const QMetaObject *to = engine->rawMetaObjectForType(destination->type);
+
+ if (QDeclarativePropertyPrivate::canConvert(from, to))
+ type.type = destination->type;
+ }
+
+ if (type.type == destination->type) {
+ Instr instr;
+ instr.common.type = Instr::Store;
+ instr.store.output = 0;
+ instr.store.index = destination->index;
+ instr.store.reg = type.reg;
+ instr.store.exceptionId = exceptionId(node->expressionCast());
+ bytecode << instr;
+
+ releaseReg(type.reg);
+
+ Instr done;
+ done.common.type = Instr::Done;
+ bytecode << done;
+
+ return true;
+ } else {
+ return false;
+ }
+ }
+}
+
+bool QDeclarativeBindingCompilerPrivate::parseExpression(QDeclarativeJS::AST::Node *node, Result &type)
+{
+ while (node->kind == AST::Node::Kind_NestedExpression)
+ node = static_cast<AST::NestedExpression *>(node)->expression;
+
+ if (tryArith(node)) {
+ if (!parseArith(node, type)) return false;
+ } else if (tryLogic(node)) {
+ if (!parseLogic(node, type)) return false;
+ } else if (tryConditional(node)) {
+ if (!parseConditional(node, type)) return false;
+ } else if (tryName(node)) {
+ if (!parseName(node, type)) return false;
+ } else if (tryConstant(node)) {
+ if (!parseConstant(node, type)) return false;
+ } else if (tryMethod(node)) {
+ if (!parseMethod(node, type)) return false;
+ } else {
+ return false;
+ }
+ return true;
+}
+
+bool QDeclarativeBindingCompilerPrivate::tryName(QDeclarativeJS::AST::Node *node)
+{
+ return node->kind == AST::Node::Kind_IdentifierExpression ||
+ node->kind == AST::Node::Kind_FieldMemberExpression;
+}
+
+bool QDeclarativeBindingCompilerPrivate::parseName(AST::Node *node, Result &type)
+{
+ QStringList nameParts;
+ QList<AST::ExpressionNode *> nameNodes;
+ if (!buildName(nameParts, node, &nameNodes))
+ return false;
+
+ int reg = acquireReg();
+ if (reg == -1)
+ return false;
+ type.reg = reg;
+
+ QDeclarativeParser::Object *absType = 0;
+
+ QStringList subscribeName;
+
+ bool wasAttachedObject = false;
+
+ for (int ii = 0; ii < nameParts.count(); ++ii) {
+ const QString &name = nameParts.at(ii);
+
+ // We don't handle signal properties or attached properties
+ if (name.length() > 2 && name.startsWith(QLatin1String("on")) &&
+ name.at(2).isUpper())
+ return false;
+
+ QDeclarativeType *attachType = 0;
+ if (name.at(0).isUpper()) {
+ // Could be an attached property
+ if (ii == nameParts.count() - 1)
+ return false;
+ if (nameParts.at(ii + 1).at(0).isUpper())
+ return false;
+
+ QDeclarativeEnginePrivate::ImportedNamespace *ns = 0;
+ if (!engine->resolveType(imports, name.toUtf8(), &attachType, 0, 0, 0, &ns))
+ return false;
+ if (ns || !attachType || !attachType->attachedPropertiesType())
+ return false;
+
+ wasAttachedObject = true;
+ }
+
+ if (ii == 0) {
+
+ if (attachType) {
+ Instr instr;
+ instr.common.type = Instr::LoadScope;
+ instr.load.index = 0;
+ instr.load.reg = reg;
+ bytecode << instr;
+
+ Instr attach;
+ attach.common.type = Instr::LoadAttached;
+ attach.attached.output = reg;
+ attach.attached.reg = reg;
+ attach.attached.index = attachType->index();
+ attach.attached.exceptionId = exceptionId(nameNodes.at(ii));
+ bytecode << attach;
+
+ subscribeName << contextName();
+ subscribeName << QLatin1String("$$$ATTACH_") + name;
+
+ absType = 0;
+ type.metaObject = attachType->attachedPropertiesType();
+
+ continue;
+ } else if (ids.contains(name)) {
+ QDeclarativeParser::Object *idObject = ids.value(name);
+ absType = idObject;
+ type.metaObject = absType->metaObject();
+
+ // We check if the id object is the root or
+ // scope object to avoid a subscription
+ if (idObject == component) {
+ Instr instr;
+ instr.common.type = Instr::LoadRoot;
+ instr.load.index = 0;
+ instr.load.reg = reg;
+ bytecode << instr;
+ } else if (idObject == context) {
+ Instr instr;
+ instr.common.type = Instr::LoadScope;
+ instr.load.index = 0;
+ instr.load.reg = reg;
+ bytecode << instr;
+ } else {
+ Instr instr;
+ instr.common.type = Instr::LoadId;
+ instr.load.index = idObject->idIndex;
+ instr.load.reg = reg;
+ bytecode << instr;
+
+ subscribeName << QLatin1String("$$$ID_") + name;
+
+ if (subscription(subscribeName, &type)) {
+ Instr sub;
+ sub.common.type = Instr::SubscribeId;
+ sub.subscribe.offset = subscriptionIndex(subscribeName);
+ sub.subscribe.reg = reg;
+ sub.subscribe.index = instr.load.index;
+ bytecode << sub;
+ }
+ }
+
+ } else {
+
+ QByteArray utf8Name = name.toUtf8();
+ const char *cname = utf8Name.constData();
+
+ int d0Idx = (context == component)?-1:context->metaObject()->indexOfProperty(cname);
+ int d1Idx = -1;
+ if (d0Idx == -1)
+ d1Idx = component->metaObject()->indexOfProperty(cname);
+
+ if (d0Idx != -1) {
+ Instr instr;
+ instr.common.type = Instr::LoadScope;
+ instr.load.index = 0;
+ instr.load.reg = reg;
+ bytecode << instr;
+
+ subscribeName << contextName();
+ subscribeName << name;
+
+ if (!fetch(type, context->metaObject(), reg, d0Idx, subscribeName, nameNodes.at(ii)))
+ return false;
+ } else if(d1Idx != -1) {
+ Instr instr;
+ instr.common.type = Instr::LoadRoot;
+ instr.load.index = 0;
+ instr.load.reg = reg;
+ bytecode << instr;
+
+ subscribeName << QLatin1String("$$$ROOT");
+ subscribeName << name;
+
+ if (!fetch(type, component->metaObject(), reg, d1Idx, subscribeName, nameNodes.at(ii)))
+ return false;
+ } else {
+ Instr find;
+ if (nameParts.count() == 1)
+ find.common.type = Instr::FindGenericTerminal;
+ else
+ find.common.type = Instr::FindGeneric;
+
+ find.find.reg = reg;
+ find.find.src = -1;
+ find.find.name = registerString(name);
+ find.find.exceptionId = exceptionId(nameNodes.at(ii));
+
+ subscribeName << QString(QLatin1String("$$$Generic_") + name);
+ if (subscription(subscribeName, &type))
+ find.find.subscribeIndex = subscriptionIndex(subscribeName);
+ else
+ find.find.subscribeIndex = -1;
+
+ bytecode << find;
+ type.unknownType = true;
+ }
+
+ if (!type.unknownType && type.type == -1)
+ return false; // Couldn't fetch that type
+ }
+
+ } else {
+
+ if (attachType) {
+ Instr attach;
+ attach.common.type = Instr::LoadAttached;
+ attach.attached.output = reg;
+ attach.attached.reg = reg;
+ attach.attached.index = attachType->index();
+ bytecode << attach;
+
+ absType = 0;
+ type.metaObject = attachType->attachedPropertiesType();
+
+ subscribeName << QLatin1String("$$$ATTACH_") + name;
+ continue;
+ }
+
+ const QMetaObject *mo = 0;
+ if (absType)
+ mo = absType->metaObject();
+ else if (type.metaObject)
+ mo = type.metaObject;
+
+ QByteArray utf8Name = name.toUtf8();
+ const char *cname = utf8Name.constData();
+ int idx = mo?mo->indexOfProperty(cname):-1;
+ if (absType && idx == -1)
+ return false;
+
+ subscribeName << name;
+
+ if (absType || (wasAttachedObject && idx != -1) || (mo && mo->property(idx).isFinal())) {
+ absType = 0;
+ if (!fetch(type, mo, reg, idx, subscribeName, nameNodes.at(ii)))
+ return false;
+ } else {
+
+ Instr prop;
+ if (ii == nameParts.count() -1 )
+ prop.common.type = Instr::FindPropertyTerminal;
+ else
+ prop.common.type = Instr::FindProperty;
+
+ prop.find.reg = reg;
+ prop.find.src = reg;
+ prop.find.name = registerString(name);
+ prop.find.exceptionId = exceptionId(nameNodes.at(ii));
+
+ if (subscription(subscribeName, &type))
+ prop.find.subscribeIndex = subscriptionIndex(subscribeName);
+ else
+ prop.find.subscribeIndex = -1;
+
+ type.unknownType = true;
+ type.metaObject = 0;
+ type.type = -1;
+ type.reg = reg;
+ bytecode << prop;
+ }
+ }
+
+ wasAttachedObject = false;
+ }
+
+ return true;
+}
+
+bool QDeclarativeBindingCompilerPrivate::tryArith(QDeclarativeJS::AST::Node *node)
+{
+ if (node->kind != AST::Node::Kind_BinaryExpression)
+ return false;
+
+ AST::BinaryExpression *expression = static_cast<AST::BinaryExpression *>(node);
+ if (expression->op == QSOperator::Add ||
+ expression->op == QSOperator::Sub)
+ return true;
+ else
+ return false;
+}
+
+bool QDeclarativeBindingCompilerPrivate::parseArith(QDeclarativeJS::AST::Node *node, Result &type)
+{
+ AST::BinaryExpression *expression = static_cast<AST::BinaryExpression *>(node);
+
+ type.reg = acquireReg();
+
+ Result lhs;
+ Result rhs;
+
+ if (!parseExpression(expression->left, lhs)) return false;
+ if (!parseExpression(expression->right, rhs)) return false;
+
+ if ((lhs.type == QVariant::Int || lhs.type == QMetaType::QReal) &&
+ (rhs.type == QVariant::Int || rhs.type == QMetaType::QReal))
+ return numberArith(type, lhs, rhs, (QSOperator::Op)expression->op);
+ else if(expression->op == QSOperator::Sub)
+ return numberArith(type, lhs, rhs, (QSOperator::Op)expression->op);
+ else if ((lhs.type == QMetaType::QString || lhs.unknownType) &&
+ (rhs.type == QMetaType::QString || rhs.unknownType) &&
+ (lhs.type == QMetaType::QString || rhs.type == QMetaType::QString))
+ return stringArith(type, lhs, rhs, (QSOperator::Op)expression->op);
+ else
+ return false;
+}
+
+bool QDeclarativeBindingCompilerPrivate::numberArith(Result &type, const Result &lhs, const Result &rhs, QSOperator::Op op)
+{
+ bool nativeReal = rhs.type == QMetaType::QReal ||
+ lhs.type == QMetaType::QReal ||
+ lhs.unknownType ||
+ rhs.unknownType;
+
+ if (nativeReal && lhs.type == QMetaType::Int) {
+ Instr convert;
+ convert.common.type = Instr::ConvertIntToReal;
+ convert.unaryop.output = lhs.reg;
+ convert.unaryop.src = lhs.reg;
+ bytecode << convert;
+ }
+
+ if (nativeReal && rhs.type == QMetaType::Int) {
+ Instr convert;
+ convert.common.type = Instr::ConvertIntToReal;
+ convert.unaryop.output = rhs.reg;
+ convert.unaryop.src = rhs.reg;
+ bytecode << convert;
+ }
+
+ int lhsTmp = -1;
+ int rhsTmp = -1;
+ if (lhs.unknownType) {
+ lhsTmp = acquireReg();
+
+ Instr conv;
+ conv.common.type = Instr::ConvertGenericToReal;
+ conv.unaryop.output = lhsTmp;
+ conv.unaryop.src = lhs.reg;
+ bytecode << conv;
+ }
+
+ if (rhs.unknownType) {
+ rhsTmp = acquireReg();
+
+ Instr conv;
+ conv.common.type = Instr::ConvertGenericToReal;
+ conv.unaryop.output = rhsTmp;
+ conv.unaryop.src = rhs.reg;
+ bytecode << conv;
+ }
+
+ Instr arith;
+ if (op == QSOperator::Add) {
+ arith.common.type = nativeReal?Instr::AddReal:Instr::AddInt;
+ } else if (op == QSOperator::Sub) {
+ arith.common.type = nativeReal?Instr::MinusReal:Instr::MinusInt;
+ } else {
+ qFatal("Unsupported arithmetic operator");
+ }
+
+ arith.binaryop.output = type.reg;
+ arith.binaryop.src1 = (lhsTmp == -1)?lhs.reg:lhsTmp;
+ arith.binaryop.src2 = (rhsTmp == -1)?rhs.reg:rhsTmp;
+ bytecode << arith;
+
+ type.metaObject = 0;
+ type.type = nativeReal?QMetaType::QReal:QMetaType::Int;
+ type.subscriptionSet.unite(lhs.subscriptionSet);
+ type.subscriptionSet.unite(rhs.subscriptionSet);
+
+ if (lhsTmp != -1) releaseReg(lhsTmp);
+ if (rhsTmp != -1) releaseReg(rhsTmp);
+ releaseReg(lhs.reg);
+ releaseReg(rhs.reg);
+
+ return true;
+}
+
+bool QDeclarativeBindingCompilerPrivate::stringArith(Result &type, const Result &lhs, const Result &rhs, QSOperator::Op op)
+{
+ if (op != QSOperator::Add)
+ return false;
+
+ int lhsTmp = -1;
+ int rhsTmp = -1;
+
+ if (lhs.unknownType) {
+ lhsTmp = acquireReg(Instr::CleanupString);
+
+ Instr convert;
+ convert.common.type = Instr::ConvertGenericToString;
+ convert.unaryop.output = lhsTmp;
+ convert.unaryop.src = lhs.reg;
+ bytecode << convert;
+ }
+
+ if (rhs.unknownType) {
+ rhsTmp = acquireReg(Instr::CleanupString);
+
+ Instr convert;
+ convert.common.type = Instr::ConvertGenericToString;
+ convert.unaryop.output = rhsTmp;
+ convert.unaryop.src = rhs.reg;
+ bytecode << convert;
+ }
+
+ type.reg = acquireReg(Instr::CleanupString);
+ type.type = QMetaType::QString;
+
+ Instr add;
+ add.common.type = Instr::AddString;
+ add.binaryop.output = type.reg;
+ add.binaryop.src1 = (lhsTmp == -1)?lhs.reg:lhsTmp;
+ add.binaryop.src2 = (rhsTmp == -1)?rhs.reg:rhsTmp;
+ bytecode << add;
+
+ if (lhsTmp != -1) releaseReg(lhsTmp);
+ if (rhsTmp != -1) releaseReg(rhsTmp);
+
+ return true;
+}
+
+bool QDeclarativeBindingCompilerPrivate::tryLogic(QDeclarativeJS::AST::Node *node)
+{
+ if (node->kind != AST::Node::Kind_BinaryExpression)
+ return false;
+
+ AST::BinaryExpression *expression = static_cast<AST::BinaryExpression *>(node);
+ if (expression->op == QSOperator::Gt ||
+ expression->op == QSOperator::Equal ||
+ expression->op == QSOperator::NotEqual)
+ return true;
+ else
+ return false;
+}
+
+bool QDeclarativeBindingCompilerPrivate::parseLogic(QDeclarativeJS::AST::Node *node, Result &type)
+{
+ AST::BinaryExpression *expression = static_cast<AST::BinaryExpression *>(node);
+
+ Result lhs;
+ Result rhs;
+
+ if (!parseExpression(expression->left, lhs)) return false;
+ if (!parseExpression(expression->right, rhs)) return false;
+
+ type.reg = acquireReg();
+ type.metaObject = 0;
+ type.type = QVariant::Bool;
+
+ if (lhs.type == QMetaType::QReal && rhs.type == QMetaType::QReal) {
+
+ Instr op;
+ if (expression->op == QSOperator::Gt)
+ op.common.type = Instr::GreaterThanReal;
+ else if (expression->op == QSOperator::Equal)
+ op.common.type = Instr::CompareReal;
+ else if (expression->op == QSOperator::NotEqual)
+ op.common.type = Instr::NotCompareReal;
+ else
+ return false;
+ op.binaryop.output = type.reg;
+ op.binaryop.src1 = lhs.reg;
+ op.binaryop.src2 = rhs.reg;
+ bytecode << op;
+
+
+ } else if (lhs.type == QMetaType::QString && rhs.type == QMetaType::QString) {
+
+ Instr op;
+ if (expression->op == QSOperator::Equal)
+ op.common.type = Instr::CompareString;
+ else if (expression->op == QSOperator::NotEqual)
+ op.common.type = Instr::NotCompareString;
+ else
+ return false;
+ op.binaryop.output = type.reg;
+ op.binaryop.src1 = lhs.reg;
+ op.binaryop.src2 = rhs.reg;
+ bytecode << op;
+
+ } else {
+ return false;
+ }
+
+ releaseReg(lhs.reg);
+ releaseReg(rhs.reg);
+
+ return true;
+}
+
+bool QDeclarativeBindingCompilerPrivate::tryConditional(QDeclarativeJS::AST::Node *node)
+{
+ return (node->kind == AST::Node::Kind_ConditionalExpression);
+}
+
+bool QDeclarativeBindingCompilerPrivate::parseConditional(QDeclarativeJS::AST::Node *node, Result &type)
+{
+ AST::ConditionalExpression *expression = static_cast<AST::ConditionalExpression *>(node);
+
+ AST::Node *test = expression->expression;
+ if (test->kind == AST::Node::Kind_NestedExpression)
+ test = static_cast<AST::NestedExpression*>(test)->expression;
+
+ Result etype;
+ if (!parseExpression(test, etype)) return false;
+
+ if (etype.type != QVariant::Bool)
+ return false;
+
+ Instr skip;
+ skip.common.type = Instr::Skip;
+ skip.skip.reg = etype.reg;
+ skip.skip.count = 0;
+ int skipIdx = bytecode.count();
+ bytecode << skip;
+
+ // Release to allow reuse of reg
+ releaseReg(etype.reg);
+
+ QSet<QString> preSubSet = subscriptionSet;
+
+ // int preConditionalSubscriptions = subscriptionSet.count();
+
+ Result ok;
+ if (!parseExpression(expression->ok, ok)) return false;
+ if (ok.unknownType) return false;
+
+ int skipIdx2 = bytecode.count();
+ skip.skip.reg = -1;
+ bytecode << skip;
+
+ // Release to allow reuse of reg
+ releaseReg(ok.reg);
+ bytecode[skipIdx].skip.count = bytecode.count() - skipIdx - 1;
+
+ subscriptionSet = preSubSet;
+
+ Result ko;
+ if (!parseExpression(expression->ko, ko)) return false;
+ if (ko.unknownType) return false;
+
+ // Release to allow reuse of reg
+ releaseReg(ko.reg);
+ bytecode[skipIdx2].skip.count = bytecode.count() - skipIdx2 - 1;
+
+ if (ok != ko)
+ return false; // Must be same type and in same register
+
+ subscriptionSet = preSubSet;
+
+ if (!subscriptionNeutral(subscriptionSet, ok.subscriptionSet, ko.subscriptionSet))
+ return false; // Conditionals cannot introduce new subscriptions
+
+ type = ok;
+
+ return true;
+}
+
+bool QDeclarativeBindingCompilerPrivate::tryConstant(QDeclarativeJS::AST::Node *node)
+{
+ return node->kind == AST::Node::Kind_TrueLiteral ||
+ node->kind == AST::Node::Kind_FalseLiteral ||
+ node->kind == AST::Node::Kind_NumericLiteral ||
+ node->kind == AST::Node::Kind_StringLiteral;
+}
+
+bool QDeclarativeBindingCompilerPrivate::parseConstant(QDeclarativeJS::AST::Node *node, Result &type)
+{
+ type.metaObject = 0;
+ type.type = -1;
+ type.reg = acquireReg();
+
+ if (node->kind == AST::Node::Kind_TrueLiteral) {
+ type.type = QVariant::Bool;
+ Instr instr;
+ instr.common.type = Instr::Bool;
+ instr.bool_value.reg = type.reg;
+ instr.bool_value.value = true;
+ bytecode << instr;
+ return true;
+ } else if (node->kind == AST::Node::Kind_FalseLiteral) {
+ type.type = QVariant::Bool;
+ Instr instr;
+ instr.common.type = Instr::Bool;
+ instr.bool_value.reg = type.reg;
+ instr.bool_value.value = false;
+ bytecode << instr;
+ return true;
+ } else if (node->kind == AST::Node::Kind_NumericLiteral) {
+ qreal value = qreal(static_cast<AST::NumericLiteral *>(node)->value);
+
+ if (qreal(float(value)) != value)
+ return false;
+
+ type.type = QMetaType::QReal;
+ Instr instr;
+ instr.common.type = Instr::Real;
+ instr.real_value.reg = type.reg;
+ instr.real_value.value = float(value);
+ bytecode << instr;
+ return true;
+ } else if (node->kind == AST::Node::Kind_StringLiteral) {
+ QString str = static_cast<AST::StringLiteral *>(node)->value->asString();
+ type.type = QMetaType::QString;
+ type.reg = registerLiteralString(str);
+ return true;
+ } else {
+ return false;
+ }
+}
+
+bool QDeclarativeBindingCompilerPrivate::tryMethod(QDeclarativeJS::AST::Node *node)
+{
+ return node->kind == AST::Node::Kind_CallExpression;
+}
+
+bool QDeclarativeBindingCompilerPrivate::parseMethod(QDeclarativeJS::AST::Node *node, Result &result)
+{
+ AST::CallExpression *expr = static_cast<AST::CallExpression *>(node);
+
+ QStringList name;
+ if (!buildName(name, expr->base))
+ return false;
+
+ if (name.count() != 2 || name.at(0) != QLatin1String("Math"))
+ return false;
+
+ QString method = name.at(1);
+
+ AST::ArgumentList *args = expr->arguments;
+ if (!args) return false;
+ AST::ExpressionNode *arg0 = args->expression;
+ args = args->next;
+ if (!args) return false;
+ AST::ExpressionNode *arg1 = args->expression;
+ if (args->next != 0) return false;
+ if (!arg0 || !arg1) return false;
+
+ Result r0;
+ if (!parseExpression(arg0, r0)) return false;
+ Result r1;
+ if (!parseExpression(arg1, r1)) return false;
+
+ if (r0.type != QMetaType::QReal || r1.type != QMetaType::QReal)
+ return false;
+
+ Instr op;
+ if (method == QLatin1String("max")) {
+ op.common.type = Instr::MaxReal;
+ } else if (method == QLatin1String("min")) {
+ op.common.type = Instr::MinReal;
+ } else {
+ return false;
+ }
+ // We release early to reuse registers
+ releaseReg(r0.reg);
+ releaseReg(r1.reg);
+
+ op.binaryop.output = acquireReg();
+ op.binaryop.src1 = r0.reg;
+ op.binaryop.src2 = r1.reg;
+ bytecode << op;
+
+ result.type = QMetaType::QReal;
+ result.reg = op.binaryop.output;
+
+ return true;
+}
+
+bool QDeclarativeBindingCompilerPrivate::buildName(QStringList &name,
+ QDeclarativeJS::AST::Node *node,
+ QList<QDeclarativeJS::AST::ExpressionNode *> *nodes)
+{
+ if (node->kind == AST::Node::Kind_IdentifierExpression) {
+ name << static_cast<AST::IdentifierExpression*>(node)->name->asString();
+ if (nodes) *nodes << static_cast<AST::IdentifierExpression*>(node);
+ } else if (node->kind == AST::Node::Kind_FieldMemberExpression) {
+ AST::FieldMemberExpression *expr =
+ static_cast<AST::FieldMemberExpression *>(node);
+
+ if (!buildName(name, expr->base, nodes))
+ return false;
+
+ name << expr->name->asString();
+ if (nodes) *nodes << expr;
+ } else {
+ return false;
+ }
+
+ return true;
+}
+
+
+bool QDeclarativeBindingCompilerPrivate::fetch(Result &rv, const QMetaObject *mo, int reg,
+ int idx, const QStringList &subName, QDeclarativeJS::AST::ExpressionNode *node)
+{
+ QMetaProperty prop = mo->property(idx);
+ rv.metaObject = 0;
+ rv.type = 0;
+
+ if (subscription(subName, &rv) && prop.hasNotifySignal() && prop.notifySignalIndex() != -1) {
+ Instr sub;
+ sub.common.type = Instr::Subscribe;
+ sub.subscribe.offset = subscriptionIndex(subName);
+ sub.subscribe.reg = reg;
+ sub.subscribe.index = prop.notifySignalIndex();
+ bytecode << sub;
+ }
+
+ Instr fetch;
+ fetch.common.type = Instr::Fetch;
+ fetch.fetch.objectReg = reg;
+ fetch.fetch.index = idx;
+ fetch.fetch.output = reg;
+ fetch.fetch.exceptionId = exceptionId(node);
+
+ rv.type = prop.userType();
+ rv.metaObject = engine->metaObjectForType(rv.type);
+ rv.reg = reg;
+
+ if (rv.type == QMetaType::QString) {
+ int tmp = acquireReg();
+ Instr copy;
+ copy.common.type = Instr::Copy;
+ copy.copy.reg = tmp;
+ copy.copy.src = reg;
+ bytecode << copy;
+ releaseReg(tmp);
+ fetch.fetch.objectReg = tmp;
+
+ Instr setup;
+ setup.common.type = Instr::NewString;
+ setup.construct.reg = reg;
+ bytecode << setup;
+ registerCleanup(reg, Instr::CleanupString);
+ }
+
+ bytecode << fetch;
+
+ if (!rv.metaObject &&
+ rv.type != QMetaType::QReal &&
+ rv.type != QMetaType::Int &&
+ rv.type != QMetaType::Bool &&
+ rv.type != qMetaTypeId<QDeclarativeAnchorLine>() &&
+ rv.type != QMetaType::QString) {
+ rv.metaObject = 0;
+ rv.type = 0;
+ return false; // Unsupported type (string not supported yet);
+ }
+
+ return true;
+}
+
+void QDeclarativeBindingCompilerPrivate::registerCleanup(int reg, int cleanup, int cleanupType)
+{
+ registerCleanups.insert(reg, qMakePair(cleanup, cleanupType));
+}
+
+int QDeclarativeBindingCompilerPrivate::acquireReg(int cleanup, int cleanupType)
+{
+ for (int ii = 0; ii < 32; ++ii) {
+ if (!(registers & (1 << ii))) {
+ registers |= (1 << ii);
+
+ if (cleanup != Instr::Noop)
+ registerCleanup(ii, cleanup, cleanupType);
+
+ return ii;
+ }
+ }
+ return -1;
+}
+
+void QDeclarativeBindingCompilerPrivate::releaseReg(int reg)
+{
+ Q_ASSERT(reg >= 0 && reg <= 31);
+
+ if (registerCleanups.contains(reg)) {
+ QPair<int, int> c = registerCleanups[reg];
+ registerCleanups.remove(reg);
+ Instr cleanup;
+ cleanup.common.type = (quint8)c.first;
+ cleanup.cleanup.reg = reg;
+ bytecode << cleanup;
+ }
+
+ quint32 mask = 1 << reg;
+ registers &= ~mask;
+}
+
+// Returns a reg
+int QDeclarativeBindingCompilerPrivate::registerLiteralString(const QString &str)
+{
+ QByteArray strdata((const char *)str.constData(), str.length() * sizeof(QChar));
+ int offset = data.count();
+ data += strdata;
+
+ int reg = acquireReg(Instr::CleanupString);
+
+ Instr string;
+ string.common.type = Instr::String;
+ string.string_value.reg = reg;
+ string.string_value.offset = offset;
+ string.string_value.length = str.length();
+ bytecode << string;
+
+ return reg;
+}
+
+// Returns an identifier offset
+int QDeclarativeBindingCompilerPrivate::registerString(const QString &string)
+{
+ Q_ASSERT(!string.isEmpty());
+
+ QHash<QString, QPair<int, int> >::ConstIterator iter = registeredStrings.find(string);
+
+ if (iter == registeredStrings.end()) {
+ quint32 len = string.length();
+ QByteArray lendata((const char *)&len, sizeof(quint32));
+ QByteArray strdata((const char *)string.constData(), string.length() * sizeof(QChar));
+ strdata.prepend(lendata);
+ int rv = data.count();
+ data += strdata;
+
+ iter = registeredStrings.insert(string, qMakePair(registeredStrings.count(), rv));
+ }
+
+ Instr reg;
+ reg.common.type = Instr::InitString;
+ reg.initstring.offset = iter->first;
+ reg.initstring.dataIdx = iter->second;
+ bytecode << reg;
+ return reg.initstring.offset;
+}
+
+bool QDeclarativeBindingCompilerPrivate::subscription(const QStringList &sub, Result *result)
+{
+ QString str = sub.join(QLatin1String("."));
+ result->subscriptionSet.insert(str);
+
+ if (subscriptionSet.contains(str)) {
+ return false;
+ } else {
+ subscriptionSet.insert(str);
+ return true;
+ }
+}
+
+int QDeclarativeBindingCompilerPrivate::subscriptionIndex(const QStringList &sub)
+{
+ QString str = sub.join(QLatin1String("."));
+ QHash<QString, int>::ConstIterator iter = subscriptionIds.find(str);
+ if (iter == subscriptionIds.end())
+ iter = subscriptionIds.insert(str, subscriptionIds.count());
+ usedSubscriptionIds.insert(*iter);
+ return *iter;
+}
+
+/*
+ Returns true if lhs contains no subscriptions that aren't also in base or rhs AND
+ rhs contains no subscriptions that aren't also in base or lhs.
+*/
+bool QDeclarativeBindingCompilerPrivate::subscriptionNeutral(const QSet<QString> &base,
+ const QSet<QString> &lhs,
+ const QSet<QString> &rhs)
+{
+ QSet<QString> difflhs = lhs;
+ difflhs.subtract(rhs);
+ QSet<QString> diffrhs = rhs;
+ diffrhs.subtract(lhs);
+
+ difflhs.unite(diffrhs);
+ difflhs.subtract(base);
+
+ return difflhs.isEmpty();
+}
+
+quint8 QDeclarativeBindingCompilerPrivate::exceptionId(QDeclarativeJS::AST::ExpressionNode *n)
+{
+ quint8 rv = 0xFF;
+ if (n && exceptions.count() < 0xFF) {
+ rv = (quint8)exceptions.count();
+ QDeclarativeJS::AST::SourceLocation l = n->firstSourceLocation();
+ quint64 e = l.startLine;
+ e <<= 32;
+ e |= l.startColumn;
+ exceptions.append(e);
+ }
+ return rv;
+}
+
+QDeclarativeBindingCompiler::QDeclarativeBindingCompiler()
+: d(new QDeclarativeBindingCompilerPrivate)
+{
+}
+
+QDeclarativeBindingCompiler::~QDeclarativeBindingCompiler()
+{
+ delete d; d = 0;
+}
+
+/*
+Returns true if any bindings were compiled.
+*/
+bool QDeclarativeBindingCompiler::isValid() const
+{
+ return !d->committed.bytecode.isEmpty();
+}
+
+/*
+-1 on failure, otherwise the binding index to use.
+*/
+int QDeclarativeBindingCompiler::compile(const Expression &expression, QDeclarativeEnginePrivate *engine)
+{
+ if (!expression.expression.asAST()) return false;
+
+ d->context = expression.context;
+ d->component = expression.component;
+ d->destination = expression.property;
+ d->ids = expression.ids;
+ d->imports = expression.imports;
+ d->engine = engine;
+
+ if (d->compile(expression.expression.asAST())) {
+ return d->commitCompile();
+ } else {
+ return -1;
+ }
+}
+
+
+QByteArray QDeclarativeBindingCompilerPrivate::buildSignalTable() const
+{
+ QHash<int, QList<int> > table;
+
+ for (int ii = 0; ii < committed.count(); ++ii) {
+ const QSet<int> &deps = committed.dependencies.at(ii);
+ for (QSet<int>::ConstIterator iter = deps.begin(); iter != deps.end(); ++iter)
+ table[*iter].append(ii);
+ }
+
+ QVector<quint32> header;
+ QVector<quint32> data;
+ for (int ii = 0; ii < committed.subscriptionIds.count(); ++ii) {
+ header.append(committed.subscriptionIds.count() + data.count());
+ const QList<int> &bindings = table[ii];
+ data.append(bindings.count());
+ for (int jj = 0; jj < bindings.count(); ++jj)
+ data.append(bindings.at(jj));
+ }
+ header << data;
+
+ return QByteArray((const char *)header.constData(), header.count() * sizeof(quint32));
+}
+
+QByteArray QDeclarativeBindingCompilerPrivate::buildExceptionData() const
+{
+ QByteArray rv;
+ rv.resize(committed.exceptions.count() * sizeof(quint64));
+ ::memcpy(rv.data(), committed.exceptions.constData(), rv.size());
+ return rv;
+}
+
+/*
+Returns the compiled program.
+*/
+QByteArray QDeclarativeBindingCompiler::program() const
+{
+ QByteArray programData;
+
+ if (isValid()) {
+ Program prog;
+ prog.bindings = d->committed.count();
+
+ QVector<Instr> bytecode;
+ Instr skip;
+ skip.common.type = Instr::Skip;
+ skip.skip.reg = -1;
+ for (int ii = 0; ii < d->committed.count(); ++ii) {
+ skip.skip.count = d->committed.count() - ii - 1;
+ skip.skip.count+= d->committed.offsets.at(ii);
+ bytecode << skip;
+ }
+ bytecode << d->committed.bytecode;
+
+ QByteArray data = d->committed.data;
+ while (data.count() % 4) data.append('\0');
+ prog.signalTableOffset = data.count();
+ data += d->buildSignalTable();
+ while (data.count() % 4) data.append('\0');
+ prog.exceptionDataOffset = data.count();
+ data += d->buildExceptionData();
+
+ prog.dataLength = 4 * ((data.size() + 3) / 4);
+ prog.subscriptions = d->committed.subscriptionIds.count();
+ prog.identifiers = d->committed.registeredStrings.count();
+ prog.instructionCount = bytecode.count();
+ int size = sizeof(Program) + bytecode.count() * sizeof(Instr);
+ size += prog.dataLength;
+
+ programData.resize(size);
+ memcpy(programData.data(), &prog, sizeof(Program));
+ if (prog.dataLength)
+ memcpy((char *)((Program *)programData.data())->data(), data.constData(),
+ data.size());
+ memcpy((char *)((Program *)programData.data())->instructions(), bytecode.constData(),
+ bytecode.count() * sizeof(Instr));
+ }
+
+ return programData;
+}
+
+
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativecompiledbindings_p.h b/src/declarative/qml/qdeclarativecompiledbindings_p.h
new file mode 100644
index 0000000000..2e24371aaa
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecompiledbindings_p.h
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEBINDINGOPTIMIZATIONS_P_H
+#define QDECLARATIVEBINDINGOPTIMIZATIONS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeexpression_p.h"
+#include "qdeclarativebinding_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeBindingCompilerPrivate;
+class QDeclarativeBindingCompiler
+{
+public:
+ QDeclarativeBindingCompiler();
+ ~QDeclarativeBindingCompiler();
+
+ // Returns true if bindings were compiled
+ bool isValid() const;
+
+ struct Expression
+ {
+ QDeclarativeParser::Object *component;
+ QDeclarativeParser::Object *context;
+ QDeclarativeParser::Property *property;
+ QDeclarativeParser::Variant expression;
+ QHash<QString, QDeclarativeParser::Object *> ids;
+ QDeclarativeEnginePrivate::Imports imports;
+ };
+
+ // -1 on failure, otherwise the binding index to use
+ int compile(const Expression &, QDeclarativeEnginePrivate *);
+
+ // Returns the compiled program
+ QByteArray program() const;
+
+ static void dump(const QByteArray &);
+private:
+ QDeclarativeBindingCompilerPrivate *d;
+};
+
+class QDeclarativeCompiledBindingsPrivate;
+class QDeclarativeCompiledBindings : public QObject, public QDeclarativeAbstractExpression, public QDeclarativeRefCount
+{
+public:
+ QDeclarativeCompiledBindings(const char *program, QDeclarativeContext *context);
+ virtual ~QDeclarativeCompiledBindings();
+
+ QDeclarativeAbstractBinding *configBinding(int index, QObject *target, QObject *scope, int property);
+
+protected:
+ int qt_metacall(QMetaObject::Call, int, void **);
+
+private:
+ Q_DISABLE_COPY(QDeclarativeCompiledBindings);
+ Q_DECLARE_PRIVATE(QDeclarativeCompiledBindings);
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEBINDINGOPTIMIZATIONS_P_H
+
diff --git a/src/declarative/qml/qdeclarativecompileddata.cpp b/src/declarative/qml/qdeclarativecompileddata.cpp
new file mode 100644
index 0000000000..bdf16a3d36
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecompileddata.cpp
@@ -0,0 +1,239 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativecompiler_p.h"
+#include "qdeclarativeengine.h"
+#include "qdeclarativecomponent.h"
+#include "qdeclarativecomponent_p.h"
+#include "qdeclarativecontext.h"
+#include "qdeclarativecontext_p.h"
+
+#include <QtCore/qdebug.h>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+int QDeclarativeCompiledData::pack(const char *data, size_t size)
+{
+ const char *p = packData.constData();
+ unsigned int ps = packData.size();
+
+ for (unsigned int ii = 0; (ii + size) <= ps; ii += sizeof(int)) {
+ if (0 == ::memcmp(p + ii, data, size))
+ return ii;
+ }
+
+ int rv = packData.size();
+ packData.append(data, size);
+ return rv;
+}
+
+int QDeclarativeCompiledData::indexForString(const QString &data)
+{
+ int idx = primitives.indexOf(data);
+ if (idx == -1) {
+ idx = primitives.count();
+ primitives << data;
+ }
+ return idx;
+}
+
+int QDeclarativeCompiledData::indexForByteArray(const QByteArray &data)
+{
+ int idx = datas.indexOf(data);
+ if (idx == -1) {
+ idx = datas.count();
+ datas << data;
+ }
+ return idx;
+}
+
+int QDeclarativeCompiledData::indexForUrl(const QUrl &data)
+{
+ int idx = urls.indexOf(data);
+ if (idx == -1) {
+ idx = urls.count();
+ urls << data;
+ }
+ return idx;
+}
+
+int QDeclarativeCompiledData::indexForFloat(float *data, int count)
+{
+ Q_ASSERT(count > 0);
+
+ for (int ii = 0; ii <= floatData.count() - count; ++ii) {
+ bool found = true;
+ for (int jj = 0; jj < count; ++jj) {
+ if (floatData.at(ii + jj) != data[jj]) {
+ found = false;
+ break;
+ }
+ }
+
+ if (found)
+ return ii;
+ }
+
+ int idx = floatData.count();
+ for (int ii = 0; ii < count; ++ii)
+ floatData << data[ii];
+
+ return idx;
+}
+
+int QDeclarativeCompiledData::indexForInt(int *data, int count)
+{
+ Q_ASSERT(count > 0);
+
+ for (int ii = 0; ii <= intData.count() - count; ++ii) {
+ bool found = true;
+ for (int jj = 0; jj < count; ++jj) {
+ if (intData.at(ii + jj) != data[jj]) {
+ found = false;
+ break;
+ }
+ }
+
+ if (found)
+ return ii;
+ }
+
+ int idx = intData.count();
+ for (int ii = 0; ii < count; ++ii)
+ intData << data[ii];
+
+ return idx;
+}
+
+int QDeclarativeCompiledData::indexForLocation(const QDeclarativeParser::Location &l)
+{
+ // ### FIXME
+ int rv = locations.count();
+ locations << l;
+ return rv;
+}
+
+int QDeclarativeCompiledData::indexForLocation(const QDeclarativeParser::LocationSpan &l)
+{
+ // ### FIXME
+ int rv = locations.count();
+ locations << l.start << l.end;
+ return rv;
+}
+
+QDeclarativeCompiledData::QDeclarativeCompiledData(QDeclarativeEngine *engine)
+: QDeclarativeCleanup(engine), importCache(0), root(0), rootPropertyCache(0)
+{
+}
+
+QDeclarativeCompiledData::~QDeclarativeCompiledData()
+{
+ for (int ii = 0; ii < types.count(); ++ii) {
+ if (types.at(ii).ref)
+ types.at(ii).ref->release();
+ }
+
+ for (int ii = 0; ii < propertyCaches.count(); ++ii)
+ propertyCaches.at(ii)->release();
+
+ for (int ii = 0; ii < contextCaches.count(); ++ii)
+ contextCaches.at(ii)->release();
+
+ if (importCache)
+ importCache->release();
+
+ if (rootPropertyCache)
+ rootPropertyCache->release();
+
+ qDeleteAll(cachedPrograms);
+ qDeleteAll(cachedClosures);
+}
+
+void QDeclarativeCompiledData::clear()
+{
+ qDeleteAll(cachedPrograms);
+ qDeleteAll(cachedClosures);
+ for (int ii = 0; ii < cachedClosures.count(); ++ii)
+ cachedClosures[ii] = 0;
+ for (int ii = 0; ii < cachedPrograms.count(); ++ii)
+ cachedPrograms[ii] = 0;
+}
+
+
+QObject *QDeclarativeCompiledData::TypeReference::createInstance(QDeclarativeContext *ctxt, const QBitField &bindings) const
+{
+ if (type) {
+ QObject *rv = type->create();
+ if (rv)
+ QDeclarativeEngine::setContextForObject(rv, ctxt);
+ return rv;
+ } else {
+ Q_ASSERT(component);
+ return QDeclarativeComponentPrivate::get(component)->create(ctxt, bindings);
+ }
+}
+
+const QMetaObject *QDeclarativeCompiledData::TypeReference::metaObject() const
+{
+ if (type) {
+ return type->metaObject();
+ } else {
+ Q_ASSERT(component);
+ return static_cast<QDeclarativeComponentPrivate *>(QObjectPrivate::get(component))->cc->root;
+ }
+}
+
+void QDeclarativeCompiledData::dumpInstructions()
+{
+ if (!name.isEmpty())
+ qWarning() << name;
+ qWarning().nospace() << "Index\tLine\tOperation\t\tData1\tData2\tData3\tComments";
+ qWarning().nospace() << "-------------------------------------------------------------------------------";
+ for (int ii = 0; ii < bytecode.count(); ++ii) {
+ dump(&bytecode[ii], ii);
+ }
+ qWarning().nospace() << "-------------------------------------------------------------------------------";
+}
+
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
new file mode 100644
index 0000000000..ef1032b2cc
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -0,0 +1,2854 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativecompiler_p.h"
+
+#include "qdeclarativecompositetypedata_p.h"
+#include "qdeclarativeparser_p.h"
+#include "qdeclarativescriptparser_p.h"
+#include "qdeclarativepropertyvaluesource.h"
+#include "qdeclarativecomponent.h"
+#include "qmetaobjectbuilder_p.h"
+#include "qdeclarativestringconverters_p.h"
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativeengine.h"
+#include "qdeclarativecontext.h"
+#include "qdeclarativemetatype_p.h"
+#include "qdeclarativecustomparser_p_p.h"
+#include "qdeclarativecontext_p.h"
+#include "qdeclarativecomponent_p.h"
+#include "parser/qdeclarativejsast_p.h"
+#include "qdeclarativevmemetaobject_p.h"
+#include "qdeclarativeexpression_p.h"
+#include "qdeclarativeproperty_p.h"
+#include "qdeclarativerewrite_p.h"
+#include "qdeclarativescriptstring.h"
+#include "qdeclarativeglobal_p.h"
+#include "qdeclarativescriptparser_p.h"
+#include "qdeclarativebinding_p.h"
+#include "qdeclarativecompiledbindings_p.h"
+#include "qdeclarativeglobalscriptclass_p.h"
+
+#include <qfxperf_p_p.h>
+
+#include <QCoreApplication>
+#include <QColor>
+#include <QDebug>
+#include <QPointF>
+#include <QSizeF>
+#include <QRectF>
+#include <QAtomicInt>
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+DEFINE_BOOL_CONFIG_OPTION(compilerDump, QML_COMPILER_DUMP);
+DEFINE_BOOL_CONFIG_OPTION(compilerStatDump, QML_COMPILER_STATISTICS_DUMP);
+DEFINE_BOOL_CONFIG_OPTION(qmlExperimental, QML_EXPERIMENTAL);
+
+using namespace QDeclarativeParser;
+
+/*!
+ Instantiate a new QDeclarativeCompiler.
+*/
+QDeclarativeCompiler::QDeclarativeCompiler()
+: output(0), engine(0), unitRoot(0), unit(0)
+{
+}
+
+/*!
+ Returns true if the last call to compile() caused errors.
+
+ \sa errors()
+*/
+bool QDeclarativeCompiler::isError() const
+{
+ return !exceptions.isEmpty();
+}
+
+/*!
+ Return the list of errors from the last call to compile(), or an empty list
+ if there were no errors.
+*/
+QList<QDeclarativeError> QDeclarativeCompiler::errors() const
+{
+ return exceptions;
+}
+
+/*!
+ Returns true if \a name refers to an attached property, false otherwise.
+
+ Attached property names are those that start with a capital letter.
+*/
+bool QDeclarativeCompiler::isAttachedPropertyName(const QByteArray &name)
+{
+ return !name.isEmpty() && name.at(0) >= 'A' && name.at(0) <= 'Z';
+}
+
+/*!
+ Returns true if \a name refers to a signal property, false otherwise.
+
+ Signal property names are those that start with "on", followed by a capital
+ letter.
+*/
+bool QDeclarativeCompiler::isSignalPropertyName(const QByteArray &name)
+{
+ return name.length() >= 3 && name.startsWith("on") &&
+ 'A' <= name.at(2) && 'Z' >= name.at(2);
+}
+
+/*!
+ \macro COMPILE_EXCEPTION
+ \internal
+ Inserts an error into the QDeclarativeCompiler error list, and returns false
+ (failure).
+
+ \a token is used to source the error line and column, and \a desc is the
+ error itself. \a desc can be an expression that can be piped into QDebug.
+
+ For example:
+
+ \code
+ COMPILE_EXCEPTION(property, QCoreApplication::translate("QDeclarativeCompiler","Error for property \"%1\"").arg(QString::fromUtf8(property->name)));
+ \endcode
+*/
+#define COMPILE_EXCEPTION(token, desc) \
+ { \
+ QString exceptionDescription; \
+ QDeclarativeError error; \
+ error.setUrl(output->url); \
+ error.setLine((token)->location.start.line); \
+ error.setColumn((token)->location.start.column); \
+ error.setDescription(desc.trimmed()); \
+ exceptions << error; \
+ return false; \
+ }
+
+/*!
+ \macro COMPILE_CHECK
+ \internal
+ Returns false if \a is false, otherwise does nothing.
+*/
+#define COMPILE_CHECK(a) \
+ { \
+ if (!a) return false; \
+ }
+
+/*!
+ Returns true if literal \a v can be assigned to property \a prop, otherwise
+ false.
+
+ This test corresponds to action taken by genLiteralAssignment(). Any change
+ made here, must have a corresponding action in genLiteralAssigment().
+*/
+bool QDeclarativeCompiler::testLiteralAssignment(const QMetaProperty &prop,
+ QDeclarativeParser::Value *v)
+{
+ QString string = v->value.asScript();
+
+ if (!prop.isWritable())
+ COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: \"%1\" is a read-only property").arg(QString::fromUtf8(prop.name())));
+
+ if (prop.isEnumType()) {
+ int value;
+ if (prop.isFlagType()) {
+ value = prop.enumerator().keysToValue(string.toUtf8().constData());
+ } else
+ value = prop.enumerator().keyToValue(string.toUtf8().constData());
+ if (value == -1)
+ COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: unknown enumeration"));
+ return true;
+ }
+ int type = prop.userType();
+ switch(type) {
+ case -1:
+ break;
+ case QVariant::String:
+ if (!v->value.isString()) COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: string expected"));
+ break;
+ case QVariant::Url:
+ if (!v->value.isString()) COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: url expected"));
+ break;
+ case QVariant::UInt:
+ {
+ bool ok;
+ string.toUInt(&ok);
+ if (!v->value.isNumber() || !ok) COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: unsigned int expected"));
+ }
+ break;
+ case QVariant::Int:
+ {
+ bool ok;
+ string.toInt(&ok);
+ if (!v->value.isNumber() || !ok) COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: int expected"));
+ }
+ break;
+ case QMetaType::Float:
+ {
+ bool ok;
+ string.toFloat(&ok);
+ if (!v->value.isNumber() || !ok) COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: float expected"));
+ }
+ break;
+ case QVariant::Double:
+ {
+ bool ok;
+ string.toDouble(&ok);
+ if (!v->value.isNumber() || !ok) COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: double expected"));
+ }
+ break;
+ case QVariant::Color:
+ {
+ bool ok;
+ QDeclarativeStringConverters::colorFromString(string, &ok);
+ if (!ok) COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: color expected"));
+ }
+ break;
+ case QVariant::Date:
+ {
+ bool ok;
+ QDeclarativeStringConverters::dateFromString(string, &ok);
+ if (!ok) COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: date expected"));
+ }
+ break;
+ case QVariant::Time:
+ {
+ bool ok;
+ QDeclarativeStringConverters::timeFromString(string, &ok);
+ if (!ok) COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: time expected"));
+ }
+ break;
+ case QVariant::DateTime:
+ {
+ bool ok;
+ QDeclarativeStringConverters::dateTimeFromString(string, &ok);
+ if (!ok) COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: datetime expected"));
+ }
+ break;
+ case QVariant::Point:
+ case QVariant::PointF:
+ {
+ bool ok;
+ QPointF point = QDeclarativeStringConverters::pointFFromString(string, &ok);
+ if (!ok) COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: point expected"));
+ }
+ break;
+ case QVariant::Size:
+ case QVariant::SizeF:
+ {
+ bool ok;
+ QSizeF size = QDeclarativeStringConverters::sizeFFromString(string, &ok);
+ if (!ok) COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: size expected"));
+ }
+ break;
+ case QVariant::Rect:
+ case QVariant::RectF:
+ {
+ bool ok;
+ QRectF rect = QDeclarativeStringConverters::rectFFromString(string, &ok);
+ if (!ok) COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: rect expected"));
+ }
+ break;
+ case QVariant::Bool:
+ {
+ if (!v->value.isBoolean()) COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: boolean expected"));
+ }
+ break;
+ case QVariant::Vector3D:
+ {
+ bool ok;
+ QDeclarativeStringConverters::vector3DFromString(string, &ok);
+ if (!ok) COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: 3D vector expected"));
+ }
+ break;
+ default:
+ {
+ int t = prop.userType();
+ QDeclarativeMetaType::StringConverter converter =
+ QDeclarativeMetaType::customStringConverter(t);
+ if (!converter)
+ COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: unsupported type \"%1\"").arg(QString::fromLatin1(QVariant::typeToName(prop.type()))));
+ }
+ break;
+ }
+ return true;
+}
+
+/*!
+ Generate a store instruction for assigning literal \a v to property \a prop.
+
+ Any literal assignment that is approved in testLiteralAssignment() must have
+ a corresponding action in this method.
+*/
+void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop,
+ QDeclarativeParser::Value *v)
+{
+ QString string = v->value.asScript();
+
+ QDeclarativeInstruction instr;
+ instr.line = v->location.start.line;
+ if (prop.isEnumType()) {
+ int value;
+ if (prop.isFlagType()) {
+ value = prop.enumerator().keysToValue(string.toUtf8().constData());
+ } else
+ value = prop.enumerator().keyToValue(string.toUtf8().constData());
+
+ instr.type = QDeclarativeInstruction::StoreInteger;
+ instr.storeInteger.propertyIndex = prop.propertyIndex();
+ instr.storeInteger.value = value;
+ output->bytecode << instr;
+ return;
+ }
+
+ int type = prop.userType();
+ switch(type) {
+ case -1:
+ {
+ instr.type = QDeclarativeInstruction::StoreVariant;
+ instr.storeString.propertyIndex = prop.propertyIndex();
+ instr.storeString.value = output->indexForString(string);
+ }
+ break;
+ case QVariant::String:
+ {
+ instr.type = QDeclarativeInstruction::StoreString;
+ instr.storeString.propertyIndex = prop.propertyIndex();
+ instr.storeString.value = output->indexForString(string);
+ }
+ break;
+ case QVariant::Url:
+ {
+ instr.type = QDeclarativeInstruction::StoreUrl;
+ QUrl u = string.isEmpty() ? QUrl() : output->url.resolved(QUrl(string));
+ instr.storeUrl.propertyIndex = prop.propertyIndex();
+ instr.storeUrl.value = output->indexForUrl(u);
+ }
+ break;
+ case QVariant::UInt:
+ {
+ instr.type = QDeclarativeInstruction::StoreInteger;
+ instr.storeInteger.propertyIndex = prop.propertyIndex();
+ instr.storeInteger.value = string.toUInt();
+ }
+ break;
+ case QVariant::Int:
+ {
+ instr.type = QDeclarativeInstruction::StoreInteger;
+ instr.storeInteger.propertyIndex = prop.propertyIndex();
+ instr.storeInteger.value = string.toInt();
+ }
+ break;
+ case QMetaType::Float:
+ {
+ instr.type = QDeclarativeInstruction::StoreFloat;
+ instr.storeFloat.propertyIndex = prop.propertyIndex();
+ instr.storeFloat.value = string.toFloat();
+ }
+ break;
+ case QVariant::Double:
+ {
+ instr.type = QDeclarativeInstruction::StoreDouble;
+ instr.storeDouble.propertyIndex = prop.propertyIndex();
+ instr.storeDouble.value = string.toDouble();
+ }
+ break;
+ case QVariant::Color:
+ {
+ QColor c = QDeclarativeStringConverters::colorFromString(string);
+ instr.type = QDeclarativeInstruction::StoreColor;
+ instr.storeColor.propertyIndex = prop.propertyIndex();
+ instr.storeColor.value = c.rgba();
+ }
+ break;
+ case QVariant::Date:
+ {
+ QDate d = QDeclarativeStringConverters::dateFromString(string);
+ instr.type = QDeclarativeInstruction::StoreDate;
+ instr.storeDate.propertyIndex = prop.propertyIndex();
+ instr.storeDate.value = d.toJulianDay();
+ }
+ break;
+ case QVariant::Time:
+ {
+ QTime time = QDeclarativeStringConverters::timeFromString(string);
+ int data[] = { time.hour(), time.minute(),
+ time.second(), time.msec() };
+ int index = output->indexForInt(data, 4);
+ instr.type = QDeclarativeInstruction::StoreTime;
+ instr.storeTime.propertyIndex = prop.propertyIndex();
+ instr.storeTime.valueIndex = index;
+ }
+ break;
+ case QVariant::DateTime:
+ {
+ QDateTime dateTime = QDeclarativeStringConverters::dateTimeFromString(string);
+ int data[] = { dateTime.date().toJulianDay(),
+ dateTime.time().hour(),
+ dateTime.time().minute(),
+ dateTime.time().second(),
+ dateTime.time().msec() };
+ int index = output->indexForInt(data, 5);
+ instr.type = QDeclarativeInstruction::StoreDateTime;
+ instr.storeDateTime.propertyIndex = prop.propertyIndex();
+ instr.storeDateTime.valueIndex = index;
+ }
+ break;
+ case QVariant::Point:
+ case QVariant::PointF:
+ {
+ bool ok;
+ QPointF point =
+ QDeclarativeStringConverters::pointFFromString(string, &ok);
+ float data[] = { point.x(), point.y() };
+ int index = output->indexForFloat(data, 2);
+ if (type == QVariant::PointF)
+ instr.type = QDeclarativeInstruction::StorePointF;
+ else
+ instr.type = QDeclarativeInstruction::StorePoint;
+ instr.storeRealPair.propertyIndex = prop.propertyIndex();
+ instr.storeRealPair.valueIndex = index;
+ }
+ break;
+ case QVariant::Size:
+ case QVariant::SizeF:
+ {
+ bool ok;
+ QSizeF size = QDeclarativeStringConverters::sizeFFromString(string, &ok);
+ float data[] = { size.width(), size.height() };
+ int index = output->indexForFloat(data, 2);
+ if (type == QVariant::SizeF)
+ instr.type = QDeclarativeInstruction::StoreSizeF;
+ else
+ instr.type = QDeclarativeInstruction::StoreSize;
+ instr.storeRealPair.propertyIndex = prop.propertyIndex();
+ instr.storeRealPair.valueIndex = index;
+ }
+ break;
+ case QVariant::Rect:
+ case QVariant::RectF:
+ {
+ bool ok;
+ QRectF rect = QDeclarativeStringConverters::rectFFromString(string, &ok);
+ float data[] = { rect.x(), rect.y(),
+ rect.width(), rect.height() };
+ int index = output->indexForFloat(data, 4);
+ if (type == QVariant::RectF)
+ instr.type = QDeclarativeInstruction::StoreRectF;
+ else
+ instr.type = QDeclarativeInstruction::StoreRect;
+ instr.storeRect.propertyIndex = prop.propertyIndex();
+ instr.storeRect.valueIndex = index;
+ }
+ break;
+ case QVariant::Bool:
+ {
+ bool b = v->value.asBoolean();
+ instr.type = QDeclarativeInstruction::StoreBool;
+ instr.storeBool.propertyIndex = prop.propertyIndex();
+ instr.storeBool.value = b;
+ }
+ break;
+ case QVariant::Vector3D:
+ {
+ bool ok;
+ QVector3D vector =
+ QDeclarativeStringConverters::vector3DFromString(string, &ok);
+ float data[] = { vector.x(), vector.y(), vector.z() };
+ int index = output->indexForFloat(data, 3);
+ instr.type = QDeclarativeInstruction::StoreVector3D;
+ instr.storeRealPair.propertyIndex = prop.propertyIndex();
+ instr.storeRealPair.valueIndex = index;
+ }
+ break;
+ default:
+ {
+ int t = prop.userType();
+ int index = output->customTypeData.count();
+ instr.type = QDeclarativeInstruction::AssignCustomType;
+ instr.assignCustomType.propertyIndex = prop.propertyIndex();
+ instr.assignCustomType.valueIndex = index;
+
+ QDeclarativeCompiledData::CustomTypeData data;
+ data.index = output->indexForString(string);
+ data.type = t;
+ output->customTypeData << data;
+ }
+ break;
+ }
+ output->bytecode << instr;
+}
+
+/*!
+ Resets data by clearing the lists that the QDeclarativeCompiler modifies.
+*/
+void QDeclarativeCompiler::reset(QDeclarativeCompiledData *data)
+{
+ data->types.clear();
+ data->primitives.clear();
+ data->floatData.clear();
+ data->intData.clear();
+ data->customTypeData.clear();
+ data->datas.clear();
+ data->bytecode.clear();
+}
+
+/*!
+ Compile \a unit, and store the output in \a out. \a engine is the QDeclarativeEngine
+ with which the QDeclarativeCompiledData will be associated.
+
+ Returns true on success, false on failure. On failure, the compile errors
+ are available from errors().
+
+ If the environment variant QML_COMPILER_DUMP is set
+ (eg. QML_COMPILER_DUMP=1) the compiled instructions will be dumped to stderr
+ on a successful compiler.
+*/
+bool QDeclarativeCompiler::compile(QDeclarativeEngine *engine,
+ QDeclarativeCompositeTypeData *unit,
+ QDeclarativeCompiledData *out)
+{
+#ifdef Q_ENABLE_PERFORMANCE_LOG
+ QDeclarativePerfTimer<QDeclarativePerf::Compilation> pc;
+#endif
+ exceptions.clear();
+
+ Q_ASSERT(out);
+ reset(out);
+
+ output = out;
+
+ // Compile types
+ for (int ii = 0; ii < unit->types.count(); ++ii) {
+ QDeclarativeCompositeTypeData::TypeReference &tref = unit->types[ii];
+ QDeclarativeCompiledData::TypeReference ref;
+ QDeclarativeScriptParser::TypeReference *parserRef = unit->data.referencedTypes().at(ii);
+ if (tref.type) {
+ ref.type = tref.type;
+ if (!ref.type->isCreatable())
+ COMPILE_EXCEPTION(parserRef->refObjects.first(), QCoreApplication::translate("QDeclarativeCompiler", "Element is not creatable."));
+ } else if (tref.unit) {
+ ref.component = tref.unit->toComponent(engine);
+
+ if (ref.component->isError()) {
+ QDeclarativeError error;
+ error.setUrl(output->url);
+ error.setDescription(QLatin1String("Unable to create type ") +
+ parserRef->name);
+ if (!parserRef->refObjects.isEmpty()) {
+ QDeclarativeParser::Object *parserObject = parserRef->refObjects.first();
+ error.setLine(parserObject->location.start.line);
+ error.setColumn(parserObject->location.start.column);
+ }
+
+ exceptions << error;
+ exceptions << ref.component->errors();
+ reset(out);
+ return false;
+ }
+ ref.ref = tref.unit;
+ ref.ref->addref();
+ }
+ ref.className = parserRef->name.toUtf8();
+ out->types << ref;
+ }
+
+ Object *root = unit->data.tree();
+ Q_ASSERT(root);
+
+ this->engine = engine;
+ this->unit = unit;
+ this->unitRoot = root;
+ compileTree(root);
+
+ if (!isError()) {
+ if (compilerDump())
+ out->dumpInstructions();
+ if (compilerStatDump())
+ dumpStats();
+ } else {
+ reset(out);
+ }
+
+ compileState = ComponentCompileState();
+ savedCompileStates.clear();
+ output = 0;
+ this->engine = 0;
+ this->unit = 0;
+ this->unitRoot = 0;
+
+ return !isError();
+}
+
+void QDeclarativeCompiler::compileTree(Object *tree)
+{
+ compileState.root = tree;
+
+ if (!buildObject(tree, BindingContext()) || !completeComponentBuild())
+ return;
+
+ QDeclarativeInstruction init;
+ init.type = QDeclarativeInstruction::Init;
+ init.line = 0;
+ init.init.bindingsSize = compileState.bindings.count();
+ init.init.parserStatusSize = compileState.parserStatusCount;
+ init.init.contextCache = genContextCache();
+ if (compileState.compiledBindingData.isEmpty())
+ init.init.compiledBinding = -1;
+ else
+ init.init.compiledBinding = output->indexForByteArray(compileState.compiledBindingData);
+ output->bytecode << init;
+
+ genObject(tree);
+
+ QDeclarativeInstruction def;
+ init.line = 0;
+ def.type = QDeclarativeInstruction::SetDefault;
+ output->bytecode << def;
+
+ output->imports = unit->imports;
+ output->importCache = output->imports.cache(engine);
+
+ Q_ASSERT(tree->metatype);
+
+ if (tree->metadata.isEmpty()) {
+ output->root = tree->metatype;
+ } else {
+ static_cast<QMetaObject &>(output->rootData) = *tree->metaObject();
+ output->root = &output->rootData;
+ }
+ if (!tree->metadata.isEmpty())
+ QDeclarativeEnginePrivate::get(engine)->registerCompositeType(output);
+}
+
+static bool ValuePtrLessThan(const Value *t1, const Value *t2)
+{
+ return t1->location.start.line < t2->location.start.line ||
+ (t1->location.start.line == t2->location.start.line &&
+ t1->location.start.column < t2->location.start.column);
+}
+
+bool QDeclarativeCompiler::buildObject(Object *obj, const BindingContext &ctxt)
+{
+ componentStat.objects++;
+
+ Q_ASSERT (obj->type != -1);
+ const QDeclarativeCompiledData::TypeReference &tr =
+ output->types.at(obj->type);
+ obj->metatype = tr.metaObject();
+
+ if (tr.component)
+ obj->url = tr.component->url();
+ if (tr.type)
+ obj->typeName = tr.type->qmlTypeName();
+ obj->className = tr.className;
+
+ // This object is a "Component" element
+ if (tr.type && obj->metatype == &QDeclarativeComponent::staticMetaObject) {
+ COMPILE_CHECK(buildComponent(obj, ctxt));
+ return true;
+ }
+
+ // Build any script blocks for this type
+ for (int ii = 0; ii < obj->scriptBlockObjects.count(); ++ii)
+ COMPILE_CHECK(buildScript(obj, obj->scriptBlockObjects.at(ii)));
+
+ // Object instantiations reset the binding context
+ BindingContext objCtxt(obj);
+
+ // Create the synthesized meta object, ignoring aliases
+ COMPILE_CHECK(checkDynamicMeta(obj));
+ COMPILE_CHECK(mergeDynamicMetaProperties(obj));
+ COMPILE_CHECK(buildDynamicMeta(obj, IgnoreAliases));
+
+ // Find the native type and check for the QDeclarativeParserStatus interface
+ QDeclarativeType *type = toQmlType(obj);
+ Q_ASSERT(type);
+ obj->parserStatusCast = type->parserStatusCast();
+ if (obj->parserStatusCast != -1)
+ compileState.parserStatusCount++;
+
+ // Check if this is a custom parser type. Custom parser types allow
+ // assignments to non-existent properties. These assignments are then
+ // compiled by the type.
+ bool isCustomParser = output->types.at(obj->type).type &&
+ output->types.at(obj->type).type->customParser() != 0;
+ QList<QDeclarativeCustomParserProperty> customProps;
+
+ // Fetch the list of deferred properties
+ QStringList deferredList = deferredProperties(obj);
+
+ // Must do id property first. This is to ensure that the id given to any
+ // id reference created matches the order in which the objects are
+ // instantiated
+ foreach(Property *prop, obj->properties) {
+ if (prop->name == "id") {
+ COMPILE_CHECK(buildProperty(prop, obj, objCtxt));
+ break;
+ }
+ }
+
+ // Merge
+ Property *defaultProperty = 0;
+ Property *skipProperty = 0;
+ if (obj->defaultProperty) {
+ const QMetaObject *metaObject = obj->metaObject();
+ Q_ASSERT(metaObject);
+ QMetaProperty p = QDeclarativeMetaType::defaultProperty(metaObject);
+ if (p.name()) {
+ Property *explicitProperty = obj->getProperty(p.name(), false);
+ if (explicitProperty && !explicitProperty->value) {
+ skipProperty = explicitProperty;
+
+ defaultProperty = new Property;
+ defaultProperty->parent = obj;
+ defaultProperty->isDefault = true;
+ defaultProperty->location = obj->defaultProperty->location;
+ defaultProperty->listValueRange = obj->defaultProperty->listValueRange;
+ defaultProperty->listCommaPositions = obj->defaultProperty->listCommaPositions;
+
+ defaultProperty->values = obj->defaultProperty->values;
+ defaultProperty->values += explicitProperty->values;
+ foreach(Value *value, defaultProperty->values)
+ value->addref();
+ qSort(defaultProperty->values.begin(), defaultProperty->values.end(), ValuePtrLessThan);
+
+ } else {
+ defaultProperty = obj->defaultProperty;
+ defaultProperty->addref();
+ }
+ } else {
+ defaultProperty = obj->defaultProperty;
+ defaultProperty->addref();
+ }
+ }
+
+ // Build all explicit properties specified
+ foreach(Property *prop, obj->properties) {
+
+ if (prop == skipProperty)
+ continue;
+ if (prop->name == "id")
+ continue;
+
+ bool canDefer = false;
+ if (isCustomParser) {
+ if (doesPropertyExist(prop, obj)) {
+ int ids = compileState.ids.count();
+ COMPILE_CHECK(buildProperty(prop, obj, objCtxt));
+ canDefer = ids == compileState.ids.count();
+ } else {
+ customProps << QDeclarativeCustomParserNodePrivate::fromProperty(prop);
+ }
+ } else {
+ if (isSignalPropertyName(prop->name)) {
+ COMPILE_CHECK(buildSignal(prop,obj,objCtxt));
+ } else {
+ int ids = compileState.ids.count();
+ COMPILE_CHECK(buildProperty(prop, obj, objCtxt));
+ canDefer = ids == compileState.ids.count();
+ }
+ }
+
+ if (canDefer && !deferredList.isEmpty() &&
+ deferredList.contains(QString::fromUtf8(prop->name)))
+ prop->isDeferred = true;
+
+ }
+
+ // Build the default property
+ if (defaultProperty) {
+ Property *prop = defaultProperty;
+
+ bool canDefer = false;
+ if (isCustomParser) {
+ if (doesPropertyExist(prop, obj)) {
+ int ids = compileState.ids.count();
+ COMPILE_CHECK(buildProperty(prop, obj, objCtxt));
+ canDefer = ids == compileState.ids.count();
+ } else {
+ customProps << QDeclarativeCustomParserNodePrivate::fromProperty(prop);
+ }
+ } else {
+ int ids = compileState.ids.count();
+ COMPILE_CHECK(buildProperty(prop, obj, objCtxt));
+ canDefer = ids == compileState.ids.count();
+ }
+
+ if (canDefer && !deferredList.isEmpty() &&
+ deferredList.contains(QString::fromUtf8(prop->name)))
+ prop->isDeferred = true;
+ }
+
+ if (defaultProperty)
+ defaultProperty->release();
+
+ // Compile custom parser parts
+ if (isCustomParser && !customProps.isEmpty()) {
+ QDeclarativeCustomParser *cp = output->types.at(obj->type).type->customParser();
+ cp->clearErrors();
+ obj->custom = cp->compile(customProps);
+ foreach (QDeclarativeError err, cp->errors()) {
+ err.setUrl(output->url);
+ exceptions << err;
+ }
+ }
+
+ return true;
+}
+
+void QDeclarativeCompiler::genObject(QDeclarativeParser::Object *obj)
+{
+ const QDeclarativeCompiledData::TypeReference &tr =
+ output->types.at(obj->type);
+ if (tr.type && obj->metatype == &QDeclarativeComponent::staticMetaObject) {
+ genComponent(obj);
+ return;
+ }
+
+ // Create the object
+ QDeclarativeInstruction create;
+ create.type = QDeclarativeInstruction::CreateObject;
+ create.line = obj->location.start.line;
+ create.create.column = obj->location.start.column;
+ create.create.data = -1;
+ if (!obj->custom.isEmpty())
+ create.create.data = output->indexForByteArray(obj->custom);
+ create.create.type = obj->type;
+ if (!output->types.at(create.create.type).type &&
+ !obj->bindingBitmask.isEmpty()) {
+ Q_ASSERT(obj->bindingBitmask.size() % 4 == 0);
+ create.create.bindingBits =
+ output->indexForByteArray(obj->bindingBitmask);
+ } else {
+ create.create.bindingBits = -1;
+ }
+ output->bytecode << create;
+
+ // Setup the synthesized meta object if necessary
+ if (!obj->metadata.isEmpty()) {
+ QDeclarativeInstruction meta;
+ meta.type = QDeclarativeInstruction::StoreMetaObject;
+ meta.line = 0;
+ meta.storeMeta.data = output->indexForByteArray(obj->metadata);
+ meta.storeMeta.aliasData = output->indexForByteArray(obj->synthdata);
+ meta.storeMeta.propertyCache = output->propertyCaches.count();
+ // ### Surely the creation of this property cache could be more efficient
+ QDeclarativePropertyCache *propertyCache = 0;
+ if (tr.component && QDeclarativeComponentPrivate::get(tr.component)->cc->rootPropertyCache) {
+ propertyCache = QDeclarativeComponentPrivate::get(tr.component)->cc->rootPropertyCache->copy();
+ } else {
+ propertyCache = QDeclarativePropertyCache::create(engine, obj->metaObject()->superClass());
+ }
+ propertyCache->append(engine, obj->metaObject(), QDeclarativePropertyCache::Data::NoFlags,
+ QDeclarativePropertyCache::Data::IsVMEFunction);
+ if (obj == unitRoot) {
+ propertyCache->addref();
+ output->rootPropertyCache = propertyCache;
+ }
+ output->propertyCaches << propertyCache;
+ output->bytecode << meta;
+ }
+
+ // Set the object id
+ if (!obj->id.isEmpty()) {
+ QDeclarativeInstruction id;
+ id.type = QDeclarativeInstruction::SetId;
+ id.line = 0;
+ id.setId.value = output->indexForString(obj->id);
+ id.setId.index = obj->idIndex;
+ output->bytecode << id;
+ }
+
+ // Set any script blocks
+ for (int ii = 0; ii < obj->scripts.count(); ++ii) {
+ QDeclarativeInstruction script;
+ script.type = QDeclarativeInstruction::StoreScript;
+ script.line = 0; // ###
+ int idx = output->scripts.count();
+ output->scripts << obj->scripts.at(ii);
+ script.storeScript.value = idx;
+ output->bytecode << script;
+ }
+
+ // Begin the class
+ if (obj->parserStatusCast != -1) {
+ QDeclarativeInstruction begin;
+ begin.type = QDeclarativeInstruction::BeginObject;
+ begin.begin.castValue = obj->parserStatusCast;
+ begin.line = obj->location.start.line;
+ output->bytecode << begin;
+ }
+
+ genObjectBody(obj);
+}
+
+void QDeclarativeCompiler::genObjectBody(QDeclarativeParser::Object *obj)
+{
+ typedef QPair<Property *, int> PropPair;
+ foreach(const PropPair &prop, obj->scriptStringProperties) {
+ QDeclarativeInstruction ss;
+ ss.type = QDeclarativeInstruction::StoreScriptString;
+ ss.storeScriptString.propertyIndex = prop.first->index;
+ ss.storeScriptString.value =
+ output->indexForString(prop.first->values.at(0)->value.asScript());
+ ss.storeScriptString.scope = prop.second;
+ output->bytecode << ss;
+ }
+
+ bool seenDefer = false;
+ foreach(Property *prop, obj->valueProperties) {
+ if (prop->isDeferred) {
+ seenDefer = true;
+ continue;
+ }
+ genValueProperty(prop, obj);
+ }
+ if (seenDefer) {
+ QDeclarativeInstruction defer;
+ defer.type = QDeclarativeInstruction::Defer;
+ defer.line = 0;
+ defer.defer.deferCount = 0;
+ int deferIdx = output->bytecode.count();
+ output->bytecode << defer;
+
+ QDeclarativeInstruction init;
+ init.type = QDeclarativeInstruction::Init;
+ init.init.bindingsSize = compileState.bindings.count(); // XXX - bigger than necessary
+ init.init.parserStatusSize = compileState.parserStatusCount; // XXX - bigger than necessary
+ init.init.contextCache = -1;
+ init.init.compiledBinding = -1;
+ output->bytecode << init;
+
+ foreach(Property *prop, obj->valueProperties) {
+ if (!prop->isDeferred)
+ continue;
+ genValueProperty(prop, obj);
+ }
+
+ output->bytecode[deferIdx].defer.deferCount =
+ output->bytecode.count() - deferIdx - 1;
+ }
+
+ foreach(Property *prop, obj->signalProperties) {
+
+ QDeclarativeParser::Value *v = prop->values.at(0);
+
+ if (v->type == Value::SignalObject) {
+
+ genObject(v->object);
+
+ QDeclarativeInstruction assign;
+ assign.type = QDeclarativeInstruction::AssignSignalObject;
+ assign.line = v->location.start.line;
+ assign.assignSignalObject.signal =
+ output->indexForByteArray(prop->name);
+ output->bytecode << assign;
+
+ } else if (v->type == Value::SignalExpression) {
+
+ BindingContext ctxt = compileState.signalExpressions.value(v);
+
+ QDeclarativeInstruction store;
+ store.type = QDeclarativeInstruction::StoreSignal;
+ store.line = v->location.start.line;
+ store.storeSignal.signalIndex = prop->index;
+ store.storeSignal.value =
+ output->indexForString(v->value.asScript().trimmed());
+ store.storeSignal.context = ctxt.stack;
+ output->bytecode << store;
+
+ }
+
+ }
+
+ foreach(Property *prop, obj->attachedProperties) {
+ QDeclarativeInstruction fetch;
+ fetch.type = QDeclarativeInstruction::FetchAttached;
+ fetch.line = prop->location.start.line;
+ fetch.fetchAttached.id = prop->index;
+ output->bytecode << fetch;
+
+ genObjectBody(prop->value);
+
+ QDeclarativeInstruction pop;
+ pop.type = QDeclarativeInstruction::PopFetchedObject;
+ pop.line = prop->location.start.line;
+ output->bytecode << pop;
+ }
+
+ foreach(Property *prop, obj->groupedProperties) {
+ QDeclarativeInstruction fetch;
+ fetch.type = QDeclarativeInstruction::FetchObject;
+ fetch.fetch.property = prop->index;
+ fetch.line = prop->location.start.line;
+ output->bytecode << fetch;
+
+ genObjectBody(prop->value);
+
+ QDeclarativeInstruction pop;
+ pop.type = QDeclarativeInstruction::PopFetchedObject;
+ pop.line = prop->location.start.line;
+ output->bytecode << pop;
+ }
+
+ foreach(Property *prop, obj->valueTypeProperties) {
+ QDeclarativeInstruction fetch;
+ fetch.type = QDeclarativeInstruction::FetchValueType;
+ fetch.fetchValue.property = prop->index;
+ fetch.fetchValue.type = prop->type;
+ fetch.line = prop->location.start.line;
+
+ output->bytecode << fetch;
+
+ foreach(Property *vprop, prop->value->valueProperties) {
+ genPropertyAssignment(vprop, prop->value, prop);
+ }
+
+ QDeclarativeInstruction pop;
+ pop.type = QDeclarativeInstruction::PopValueType;
+ pop.fetchValue.property = prop->index;
+ pop.fetchValue.type = prop->type;
+ pop.line = prop->location.start.line;
+ output->bytecode << pop;
+ }
+}
+
+void QDeclarativeCompiler::genComponent(QDeclarativeParser::Object *obj)
+{
+ QDeclarativeParser::Object *root = obj->defaultProperty->values.at(0)->object;
+ Q_ASSERT(root);
+
+ QDeclarativeInstruction create;
+ create.type = QDeclarativeInstruction::CreateComponent;
+ create.line = root->location.start.line;
+ create.createComponent.column = root->location.start.column;
+ create.createComponent.endLine = root->location.end.line;
+ output->bytecode << create;
+ int count = output->bytecode.count();
+
+ ComponentCompileState oldCompileState = compileState;
+ compileState = componentState(root);
+
+ QDeclarativeInstruction init;
+ init.type = QDeclarativeInstruction::Init;
+ init.init.bindingsSize = compileState.bindings.count();
+ init.init.parserStatusSize = compileState.parserStatusCount;
+ init.init.contextCache = genContextCache();
+ if (compileState.compiledBindingData.isEmpty())
+ init.init.compiledBinding = -1;
+ else
+ init.init.compiledBinding = output->indexForByteArray(compileState.compiledBindingData);
+ init.line = obj->location.start.line;
+ output->bytecode << init;
+
+ genObject(root);
+
+ QDeclarativeInstruction def;
+ init.line = 0;
+ def.type = QDeclarativeInstruction::SetDefault;
+ output->bytecode << def;
+
+ output->bytecode[count - 1].createComponent.count =
+ output->bytecode.count() - count;
+
+ compileState = oldCompileState;
+
+ if (!obj->id.isEmpty()) {
+ QDeclarativeInstruction id;
+ id.type = QDeclarativeInstruction::SetId;
+ id.line = 0;
+ id.setId.value = output->indexForString(obj->id);
+ id.setId.index = obj->idIndex;
+ output->bytecode << id;
+ }
+}
+
+bool QDeclarativeCompiler::buildComponent(QDeclarativeParser::Object *obj,
+ const BindingContext &ctxt)
+{
+ // The special "Component" element can only have the id property and a
+ // default property, that actually defines the component's tree
+
+ // Find, check and set the "id" property (if any)
+ Property *idProp = 0;
+ if (obj->properties.count() > 1 ||
+ (obj->properties.count() == 1 && obj->properties.begin().key() != "id"))
+ COMPILE_EXCEPTION(*obj->properties.begin(), QCoreApplication::translate("QDeclarativeCompiler","Component elements may not contain properties other than id"));
+
+ if (!obj->scriptBlockObjects.isEmpty())
+ COMPILE_EXCEPTION(obj->scriptBlockObjects.first(), QCoreApplication::translate("QDeclarativeCompiler","Component elements may not contain script blocks"));
+
+ if (obj->properties.count())
+ idProp = *obj->properties.begin();
+
+ if (idProp) {
+ if (idProp->value || idProp->values.count() > 1 || idProp->values.at(0)->object)
+ COMPILE_EXCEPTION(idProp, QCoreApplication::translate("QDeclarativeCompiler","Invalid component id specification"));
+ COMPILE_CHECK(checkValidId(idProp->values.first(), idProp->values.first()->primitive()));
+
+ QString idVal = idProp->values.first()->primitive();
+
+ if (compileState.ids.contains(idVal))
+ COMPILE_EXCEPTION(idProp, QCoreApplication::translate("QDeclarativeCompiler","id is not unique"));
+
+ obj->id = idVal;
+ addId(idVal, obj);
+ }
+
+ // Check the Component tree is well formed
+ if (obj->defaultProperty &&
+ (obj->defaultProperty->value || obj->defaultProperty->values.count() > 1 ||
+ (obj->defaultProperty->values.count() == 1 && !obj->defaultProperty->values.first()->object)))
+ COMPILE_EXCEPTION(obj, QCoreApplication::translate("QDeclarativeCompiler","Invalid component body specification"));
+
+ Object *root = 0;
+ if (obj->defaultProperty && obj->defaultProperty->values.count())
+ root = obj->defaultProperty->values.first()->object;
+
+ if (!root)
+ COMPILE_EXCEPTION(obj, QCoreApplication::translate("QDeclarativeCompiler","Cannot create empty component specification"));
+
+ // Build the component tree
+ COMPILE_CHECK(buildComponentFromRoot(root, ctxt));
+
+ return true;
+}
+
+bool QDeclarativeCompiler::buildScript(QDeclarativeParser::Object *obj, QDeclarativeParser::Object *script)
+{
+ Object::ScriptBlock scriptBlock;
+
+ if (script->properties.count() == 1 &&
+ script->properties.begin().key() == QByteArray("source")) {
+
+ Property *source = *script->properties.begin();
+ if (script->defaultProperty)
+ COMPILE_EXCEPTION(source, QCoreApplication::translate("QDeclarativeCompiler","Invalid Script block. Specify either the source property or inline script"));
+
+ if (source->value || source->values.count() != 1 ||
+ source->values.at(0)->object || !source->values.at(0)->value.isStringList())
+ COMPILE_EXCEPTION(source, QCoreApplication::translate("QDeclarativeCompiler","Invalid Script source value"));
+
+ QStringList sources = source->values.at(0)->value.asStringList();
+
+ for (int jj = 0; jj < sources.count(); ++jj) {
+ QString sourceUrl = output->url.resolved(QUrl(sources.at(jj))).toString();
+ QString scriptCode;
+ int lineNumber = 1;
+
+ for (int ii = 0; ii < unit->resources.count(); ++ii) {
+ if (unit->resources.at(ii)->url == sourceUrl) {
+ scriptCode = QString::fromUtf8(unit->resources.at(ii)->data);
+ break;
+ }
+ }
+
+ if (!scriptCode.isEmpty()) {
+ scriptBlock.codes.append(scriptCode);
+ scriptBlock.files.append(sourceUrl);
+ scriptBlock.lineNumbers.append(lineNumber);
+ }
+ }
+
+ } else if (!script->properties.isEmpty()) {
+ COMPILE_EXCEPTION(*script->properties.begin(), QCoreApplication::translate("QDeclarativeCompiler","Properties cannot be set on Script block"));
+ } else if (script->defaultProperty) {
+
+ QString scriptCode;
+ int lineNumber = 1;
+ QString sourceUrl = output->url.toString();
+
+ QDeclarativeParser::Location currentLocation;
+
+ for (int ii = 0; ii < script->defaultProperty->values.count(); ++ii) {
+ Value *v = script->defaultProperty->values.at(ii);
+ if (lineNumber == 1)
+ lineNumber = v->location.start.line;
+ if (v->object || !v->value.isString())
+ COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid Script block"));
+
+ if (ii == 0) {
+ currentLocation = v->location.start;
+ scriptCode.append(QString(currentLocation.column, QLatin1Char(' ')));
+ }
+
+ while (currentLocation.line < v->location.start.line) {
+ scriptCode.append(QLatin1Char('\n'));
+ currentLocation.line++;
+ currentLocation.column = 0;
+ }
+
+ scriptCode.append(QString(v->location.start.column - currentLocation.column, QLatin1Char(' ')));
+
+ scriptCode += v->value.asString();
+ currentLocation = v->location.end;
+ currentLocation.column++;
+ }
+
+ if (!scriptCode.isEmpty()) {
+ scriptBlock.codes.append(scriptCode);
+ scriptBlock.files.append(sourceUrl);
+ scriptBlock.lineNumbers.append(lineNumber);
+ }
+ }
+
+ if (!scriptBlock.codes.isEmpty())
+ obj->scripts << scriptBlock;
+
+ return true;
+}
+
+bool QDeclarativeCompiler::buildComponentFromRoot(QDeclarativeParser::Object *obj,
+ const BindingContext &ctxt)
+{
+ ComponentCompileState oldComponentCompileState = compileState;
+ ComponentStat oldComponentStat = componentStat;
+
+ compileState = ComponentCompileState();
+ compileState.root = obj;
+
+ componentStat = ComponentStat();
+ componentStat.lineNumber = obj->location.start.line;
+
+ if (obj)
+ COMPILE_CHECK(buildObject(obj, ctxt));
+
+ COMPILE_CHECK(completeComponentBuild());
+
+ compileState = oldComponentCompileState;
+ componentStat = oldComponentStat;
+
+ return true;
+}
+
+
+// Build a sub-object. A sub-object is one that was not created directly by
+// QML - such as a grouped property object, or an attached object. Sub-object's
+// can't have an id, involve a custom parser, have attached properties etc.
+bool QDeclarativeCompiler::buildSubObject(Object *obj, const BindingContext &ctxt)
+{
+ Q_ASSERT(obj->metatype);
+ Q_ASSERT(!obj->defaultProperty);
+ Q_ASSERT(ctxt.isSubContext()); // sub-objects must always be in a binding
+ // sub-context
+
+ foreach(Property *prop, obj->properties) {
+ if (isSignalPropertyName(prop->name)) {
+ COMPILE_CHECK(buildSignal(prop, obj, ctxt));
+ } else {
+ COMPILE_CHECK(buildProperty(prop, obj, ctxt));
+ }
+ }
+
+ return true;
+}
+
+int QDeclarativeCompiler::componentTypeRef()
+{
+ QDeclarativeType *t = QDeclarativeMetaType::qmlType("Qt/Component",4,6);
+ for (int ii = output->types.count() - 1; ii >= 0; --ii) {
+ if (output->types.at(ii).type == t)
+ return ii;
+ }
+ QDeclarativeCompiledData::TypeReference ref;
+ ref.className = "Component";
+ ref.type = t;
+ output->types << ref;
+ return output->types.count() - 1;
+}
+
+QMetaMethod QDeclarativeCompiler::findSignalByName(const QMetaObject *mo, const QByteArray &name)
+{
+ Q_ASSERT(mo);
+ int methods = mo->methodCount();
+ for (int ii = methods - 1; ii >= 0; --ii) {
+ QMetaMethod method = mo->method(ii);
+ QByteArray methodName = method.signature();
+ int idx = methodName.indexOf('(');
+ methodName = methodName.left(idx);
+
+ if (methodName == name)
+ return method;
+ }
+
+ // If no signal is found, but the signal is of the form "onBlahChanged",
+ // return the notify signal for the property "Blah"
+ if (name.endsWith("Changed")) {
+ QByteArray propName = name.mid(0, name.length() - 7);
+ int propIdx = mo->indexOfProperty(propName.constData());
+ if (propIdx >= 0) {
+ QMetaProperty prop = mo->property(propIdx);
+ if (prop.hasNotifySignal())
+ return prop.notifySignal();
+ }
+ }
+
+ return QMetaMethod();
+}
+
+bool QDeclarativeCompiler::buildSignal(QDeclarativeParser::Property *prop, QDeclarativeParser::Object *obj,
+ const BindingContext &ctxt)
+{
+ Q_ASSERT(obj->metaObject());
+ Q_ASSERT(!prop->isEmpty());
+
+ QByteArray name = prop->name;
+ Q_ASSERT(name.startsWith("on"));
+ name = name.mid(2);
+ if(name[0] >= 'A' && name[0] <= 'Z')
+ name[0] = name[0] - 'A' + 'a';
+
+ int sigIdx = findSignalByName(obj->metaObject(), name).methodIndex();
+
+ if (sigIdx == -1) {
+
+ // If the "on<Signal>" name doesn't resolve into a signal, try it as a
+ // property.
+ COMPILE_CHECK(buildProperty(prop, obj, ctxt));
+
+ } else {
+
+ if (prop->value || prop->values.count() != 1)
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Incorrectly specified signal"));
+
+ prop->index = sigIdx;
+ obj->addSignalProperty(prop);
+
+ if (prop->values.at(0)->object) {
+ COMPILE_CHECK(buildObject(prop->values.at(0)->object, ctxt));
+ prop->values.at(0)->type = Value::SignalObject;
+ } else {
+ prop->values.at(0)->type = Value::SignalExpression;
+
+ QString script = prop->values.at(0)->value.asScript().trimmed();
+ if (script.isEmpty())
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Empty signal assignment"));
+
+ compileState.signalExpressions.insert(prop->values.at(0), ctxt);
+ }
+ }
+
+ return true;
+}
+
+
+/*!
+ Returns true if (value) property \a prop exists on obj, false otherwise.
+*/
+bool QDeclarativeCompiler::doesPropertyExist(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj)
+{
+ if(isAttachedPropertyName(prop->name) || prop->name == "id")
+ return true;
+
+ const QMetaObject *mo = obj->metaObject();
+ if (mo) {
+ if (prop->isDefault) {
+ QMetaProperty p = QDeclarativeMetaType::defaultProperty(mo);
+ return p.name() != 0;
+ } else {
+ int idx = mo->indexOfProperty(prop->name.constData());
+ return idx != -1;
+ }
+ }
+
+ return false;
+}
+
+bool QDeclarativeCompiler::buildProperty(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ const BindingContext &ctxt)
+{
+ if (prop->isEmpty())
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Empty property assignment"));
+
+ const QMetaObject *metaObject = obj->metaObject();
+ Q_ASSERT(metaObject);
+
+ if (isAttachedPropertyName(prop->name)) {
+ // Setup attached property data
+
+ if (ctxt.isSubContext()) {
+ // Attached properties cannot be used on sub-objects. Sub-objects
+ // always exist in a binding sub-context, which is what we test
+ // for here.
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Attached properties cannot be used here"));
+ }
+
+ QDeclarativeType *type = 0;
+ QDeclarativeEnginePrivate::ImportedNamespace *typeNamespace = 0;
+ QDeclarativeEnginePrivate::get(engine)->resolveType(unit->imports, prop->name,
+ &type, 0, 0, 0, &typeNamespace);
+
+ if (typeNamespace) {
+ // ### We might need to indicate that this property is a namespace
+ // for the DOM API
+ COMPILE_CHECK(buildPropertyInNamespace(typeNamespace, prop, obj,
+ ctxt));
+ return true;
+ } else if (!type || !type->attachedPropertiesType()) {
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Non-existent attached object"));
+ }
+
+ if (!prop->value)
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Invalid attached object assignment"));
+
+ Q_ASSERT(type->attachedPropertiesFunction());
+ prop->index = type->index();
+ prop->value->metatype = type->attachedPropertiesType();
+ } else {
+ // Setup regular property data
+ QMetaProperty p;
+
+ if (prop->isDefault) {
+ p = QDeclarativeMetaType::defaultProperty(metaObject);
+
+ if (p.name()) {
+ prop->index = p.propertyIndex();
+ prop->name = p.name();
+ }
+
+ } else {
+ prop->index = metaObject->indexOfProperty(prop->name.constData());
+
+ if (prop->index != -1) {
+ p = metaObject->property(prop->index);
+ Q_ASSERT(p.name());
+ }
+ }
+
+ // We can't error here as the "id" property does not require a
+ // successful index resolution
+ if (p.name()) {
+ prop->type = p.userType();
+ }
+ }
+
+ if (prop->index != -1)
+ prop->parent->setBindingBit(prop->index);
+
+ if (!prop->isDefault && prop->name == "id" && !ctxt.isSubContext()) {
+
+ // The magic "id" behavior doesn't apply when "id" is resolved as a
+ // default property or to sub-objects (which are always in binding
+ // sub-contexts)
+ COMPILE_CHECK(buildIdProperty(prop, obj));
+ if (prop->type == QVariant::String &&
+ prop->values.at(0)->value.isString())
+ COMPILE_CHECK(buildPropertyAssignment(prop, obj, ctxt));
+
+ } else if (isAttachedPropertyName(prop->name)) {
+
+ COMPILE_CHECK(buildAttachedProperty(prop, obj, ctxt));
+
+ } else if (prop->index == -1) {
+
+ if (prop->isDefault) {
+ COMPILE_EXCEPTION(prop->values.first(), QCoreApplication::translate("QDeclarativeCompiler","Cannot assign to non-existent default property"));
+ } else {
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Cannot assign to non-existent property \"%1\"").arg(QString::fromUtf8(prop->name)));
+ }
+
+ } else if (prop->value) {
+
+ COMPILE_CHECK(buildGroupedProperty(prop, obj, ctxt));
+
+ } else if (QDeclarativeEnginePrivate::get(engine)->isList(prop->type)) {
+
+ COMPILE_CHECK(buildListProperty(prop, obj, ctxt));
+
+ } else if (prop->type == qMetaTypeId<QDeclarativeScriptString>()) {
+
+ COMPILE_CHECK(buildScriptStringProperty(prop, obj, ctxt));
+
+ } else {
+
+ COMPILE_CHECK(buildPropertyAssignment(prop, obj, ctxt));
+
+ }
+
+ return true;
+}
+
+bool
+QDeclarativeCompiler::buildPropertyInNamespace(QDeclarativeEnginePrivate::ImportedNamespace *ns,
+ QDeclarativeParser::Property *nsProp,
+ QDeclarativeParser::Object *obj,
+ const BindingContext &ctxt)
+{
+ if (!nsProp->value)
+ COMPILE_EXCEPTION(nsProp, QCoreApplication::translate("QDeclarativeCompiler","Invalid use of namespace"));
+
+ foreach (Property *prop, nsProp->value->properties) {
+
+ if (!isAttachedPropertyName(prop->name))
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Not an attached property name"));
+
+ // Setup attached property data
+
+ QDeclarativeType *type = 0;
+ QDeclarativeEnginePrivate::get(engine)->resolveTypeInNamespace(ns, prop->name,
+ &type, 0, 0, 0);
+
+ if (!type || !type->attachedPropertiesType())
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Non-existent attached object"));
+
+ if (!prop->value)
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Invalid attached object assignment"));
+
+ Q_ASSERT(type->attachedPropertiesFunction());
+ prop->index = type->index();
+ prop->value->metatype = type->attachedPropertiesType();
+
+ COMPILE_CHECK(buildAttachedProperty(prop, obj, ctxt));
+ }
+
+ return true;
+}
+
+void QDeclarativeCompiler::genValueProperty(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj)
+{
+ if (QDeclarativeEnginePrivate::get(engine)->isList(prop->type)) {
+ genListProperty(prop, obj);
+ } else {
+ genPropertyAssignment(prop, obj);
+ }
+}
+
+void QDeclarativeCompiler::genListProperty(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj)
+{
+ int listType = QDeclarativeEnginePrivate::get(engine)->listType(prop->type);
+
+ QDeclarativeInstruction fetch;
+ fetch.type = QDeclarativeInstruction::FetchQList;
+ fetch.line = prop->location.start.line;
+ fetch.fetchQmlList.property = prop->index;
+ bool listTypeIsInterface = QDeclarativeMetaType::isInterface(listType);
+ fetch.fetchQmlList.type = listType;
+ output->bytecode << fetch;
+
+ for (int ii = 0; ii < prop->values.count(); ++ii) {
+ Value *v = prop->values.at(ii);
+
+ if (v->type == Value::CreatedObject) {
+
+ genObject(v->object);
+ if (listTypeIsInterface) {
+ QDeclarativeInstruction assign;
+ assign.type = QDeclarativeInstruction::AssignObjectList;
+ assign.line = prop->location.start.line;
+ output->bytecode << assign;
+ } else {
+ QDeclarativeInstruction store;
+ store.type = QDeclarativeInstruction::StoreObjectQList;
+ store.line = prop->location.start.line;
+ output->bytecode << store;
+ }
+
+ } else if (v->type == Value::PropertyBinding) {
+
+ genBindingAssignment(v, prop, obj);
+
+ }
+
+ }
+
+ QDeclarativeInstruction pop;
+ pop.type = QDeclarativeInstruction::PopQList;
+ pop.line = prop->location.start.line;
+ output->bytecode << pop;
+}
+
+void QDeclarativeCompiler::genPropertyAssignment(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ QDeclarativeParser::Property *valueTypeProperty)
+{
+ for (int ii = 0; ii < prop->values.count(); ++ii) {
+ QDeclarativeParser::Value *v = prop->values.at(ii);
+
+ Q_ASSERT(v->type == Value::CreatedObject ||
+ v->type == Value::PropertyBinding ||
+ v->type == Value::Literal);
+
+ if (v->type == Value::CreatedObject) {
+
+ genObject(v->object);
+
+ if (QDeclarativeMetaType::isInterface(prop->type)) {
+
+ QDeclarativeInstruction store;
+ store.type = QDeclarativeInstruction::StoreInterface;
+ store.line = v->object->location.start.line;
+ store.storeObject.propertyIndex = prop->index;
+ output->bytecode << store;
+
+ } else if (prop->type == -1) {
+
+ QDeclarativeInstruction store;
+ store.type = QDeclarativeInstruction::StoreVariantObject;
+ store.line = v->object->location.start.line;
+ store.storeObject.propertyIndex = prop->index;
+ output->bytecode << store;
+
+ } else {
+
+ QDeclarativeInstruction store;
+ store.type = QDeclarativeInstruction::StoreObject;
+ store.line = v->object->location.start.line;
+ store.storeObject.propertyIndex = prop->index;
+ output->bytecode << store;
+
+ }
+ } else if (v->type == Value::PropertyBinding) {
+
+ genBindingAssignment(v, prop, obj, valueTypeProperty);
+
+ } else if (v->type == Value::Literal) {
+
+ QMetaProperty mp = obj->metaObject()->property(prop->index);
+ genLiteralAssignment(mp, v);
+
+ }
+
+ }
+
+ for (int ii = 0; ii < prop->onValues.count(); ++ii) {
+
+ QDeclarativeParser::Value *v = prop->onValues.at(ii);
+
+ Q_ASSERT(v->type == Value::ValueSource ||
+ v->type == Value::ValueInterceptor);
+
+ if (v->type == Value::ValueSource) {
+ genObject(v->object);
+
+ QDeclarativeInstruction store;
+ store.type = QDeclarativeInstruction::StoreValueSource;
+ store.line = v->object->location.start.line;
+ if (valueTypeProperty) {
+ store.assignValueSource.property = genValueTypeData(prop, valueTypeProperty);
+ store.assignValueSource.owner = 1;
+ } else {
+ store.assignValueSource.property = genPropertyData(prop);
+ store.assignValueSource.owner = 0;
+ }
+ QDeclarativeType *valueType = toQmlType(v->object);
+ store.assignValueSource.castValue = valueType->propertyValueSourceCast();
+ output->bytecode << store;
+
+ } else if (v->type == Value::ValueInterceptor) {
+ genObject(v->object);
+
+ QDeclarativeInstruction store;
+ store.type = QDeclarativeInstruction::StoreValueInterceptor;
+ store.line = v->object->location.start.line;
+ if (valueTypeProperty) {
+ store.assignValueInterceptor.property = genValueTypeData(prop, valueTypeProperty);
+ store.assignValueInterceptor.owner = 1;
+ } else {
+ store.assignValueInterceptor.property = genPropertyData(prop);
+ store.assignValueInterceptor.owner = 0;
+ }
+ QDeclarativeType *valueType = toQmlType(v->object);
+ store.assignValueInterceptor.castValue = valueType->propertyValueInterceptorCast();
+ output->bytecode << store;
+ }
+
+ }
+}
+
+bool QDeclarativeCompiler::buildIdProperty(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj)
+{
+ if (prop->value ||
+ prop->values.count() > 1 ||
+ prop->values.at(0)->object)
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Invalid use of id property"));
+
+ QDeclarativeParser::Value *idValue = prop->values.at(0);
+ QString val = idValue->primitive();
+
+ COMPILE_CHECK(checkValidId(idValue, val));
+
+ // We disallow id's that conflict with import prefixes and types
+ QDeclarativeEnginePrivate::ImportedNamespace *ns = 0;
+ QDeclarativeType *type = 0;
+ QDeclarativeEnginePrivate::get(engine)->resolveType(unit->imports, val.toUtf8(),
+ &type, 0, 0, 0, &ns);
+ if (type)
+ COMPILE_EXCEPTION(idValue, QCoreApplication::translate("QDeclarativeCompiler","id conflicts with type name"));
+ if (ns)
+ COMPILE_EXCEPTION(idValue, QCoreApplication::translate("QDeclarativeCompiler","id conflicts with namespace prefix"));
+
+ if (compileState.ids.contains(val))
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","id is not unique"));
+
+ prop->values.at(0)->type = Value::Id;
+
+ obj->id = val;
+ addId(val, obj);
+
+ return true;
+}
+
+void QDeclarativeCompiler::addId(const QString &id, QDeclarativeParser::Object *obj)
+{
+ Q_ASSERT(!compileState.ids.contains(id));
+ Q_ASSERT(obj->id == id);
+ obj->idIndex = compileState.ids.count();
+ compileState.ids.insert(id, obj);
+ compileState.idIndexes.insert(obj->idIndex, obj);
+}
+
+void QDeclarativeCompiler::addBindingReference(const BindingReference &ref)
+{
+ Q_ASSERT(ref.value && !compileState.bindings.contains(ref.value));
+ compileState.bindings.insert(ref.value, ref);
+}
+
+void QDeclarativeCompiler::saveComponentState()
+{
+ Q_ASSERT(compileState.root);
+ Q_ASSERT(!savedCompileStates.contains(compileState.root));
+
+ savedCompileStates.insert(compileState.root, compileState);
+ savedComponentStats.append(componentStat);
+}
+
+QDeclarativeCompiler::ComponentCompileState
+QDeclarativeCompiler::componentState(QDeclarativeParser::Object *obj)
+{
+ Q_ASSERT(savedCompileStates.contains(obj));
+ return savedCompileStates.value(obj);
+}
+
+// Build attached property object. In this example,
+// Text {
+// GridView.row: 10
+// }
+// GridView is an attached property object.
+bool QDeclarativeCompiler::buildAttachedProperty(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ const BindingContext &ctxt)
+{
+ Q_ASSERT(prop->value);
+ Q_ASSERT(prop->index != -1); // This is set in buildProperty()
+
+ obj->addAttachedProperty(prop);
+
+ COMPILE_CHECK(buildSubObject(prop->value, ctxt.incr()));
+
+ return true;
+}
+
+
+// Build "grouped" properties. In this example:
+// Text {
+// font.pointSize: 12
+// font.family: "Helvetica"
+// }
+// font is a nested property. pointSize and family are not.
+bool QDeclarativeCompiler::buildGroupedProperty(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ const BindingContext &ctxt)
+{
+ Q_ASSERT(prop->type != 0);
+ Q_ASSERT(prop->index != -1);
+
+ if (QDeclarativeValueTypeFactory::isValueType(prop->type)) {
+ QDeclarativeEnginePrivate *ep =
+ static_cast<QDeclarativeEnginePrivate *>(QObjectPrivate::get(engine));
+ if (prop->type >= 0 /* QVariant == -1 */ && ep->valueTypes[prop->type]) {
+
+ if (prop->values.count()) {
+ if (prop->values.at(0)->location < prop->value->location) {
+ COMPILE_EXCEPTION(prop->value, QCoreApplication::translate("QDeclarativeCompiler", "Property has already been assigned a value"));
+ } else {
+ COMPILE_EXCEPTION(prop->values.at(0), QCoreApplication::translate("QDeclarativeCompiler", "Property has already been assigned a value"));
+ }
+ }
+
+ COMPILE_CHECK(buildValueTypeProperty(ep->valueTypes[prop->type],
+ prop->value, obj, ctxt.incr()));
+ obj->addValueTypeProperty(prop);
+ } else {
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Invalid grouped property access"));
+ }
+
+ } else {
+ // Load the nested property's meta type
+ prop->value->metatype =
+ QDeclarativeEnginePrivate::get(engine)->metaObjectForType(prop->type);
+ if (!prop->value->metatype)
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Invalid grouped property access"));
+
+ if (prop->values.count())
+ COMPILE_EXCEPTION(prop->values.at(0), QCoreApplication::translate("QDeclarativeCompiler", "Cannot assign a value directly to a grouped property"));
+
+ obj->addGroupedProperty(prop);
+
+ COMPILE_CHECK(buildSubObject(prop->value, ctxt.incr()));
+ }
+
+ return true;
+}
+
+bool QDeclarativeCompiler::buildValueTypeProperty(QObject *type,
+ QDeclarativeParser::Object *obj,
+ QDeclarativeParser::Object *baseObj,
+ const BindingContext &ctxt)
+{
+ if (obj->defaultProperty)
+ COMPILE_EXCEPTION(obj, QCoreApplication::translate("QDeclarativeCompiler","Invalid property use"));
+ obj->metatype = type->metaObject();
+
+ foreach (Property *prop, obj->properties) {
+ int idx = type->metaObject()->indexOfProperty(prop->name.constData());
+ if (idx == -1)
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Cannot assign to non-existent property \"%1\"").arg(QString::fromUtf8(prop->name)));
+ QMetaProperty p = type->metaObject()->property(idx);
+ prop->index = idx;
+ prop->type = p.userType();
+
+ if (prop->value)
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Property assignment expected"));
+
+ if (prop->values.count() > 1) {
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Single property assignment expected"));
+ } else if (prop->values.count()) {
+ Value *value = prop->values.at(0);
+
+ if (value->object) {
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Unexpected object assignment"));
+ } else if (value->value.isScript()) {
+ // ### Check for writability
+ BindingReference reference;
+ reference.expression = value->value;
+ reference.property = prop;
+ reference.value = value;
+ reference.bindingContext = ctxt;
+ reference.bindingContext.owner++;
+ addBindingReference(reference);
+ value->type = Value::PropertyBinding;
+ } else {
+ COMPILE_CHECK(testLiteralAssignment(p, value));
+ value->type = Value::Literal;
+ }
+ }
+
+ for (int ii = 0; ii < prop->onValues.count(); ++ii) {
+ Value *v = prop->onValues.at(ii);
+ Q_ASSERT(v->object);
+
+ COMPILE_CHECK(buildPropertyOnAssignment(prop, obj, baseObj, v, ctxt));
+ }
+
+ obj->addValueProperty(prop);
+ }
+
+ return true;
+}
+
+// Build assignments to QML lists. QML lists are properties of type
+// QDeclarativeListProperty<T>. List properties can accept a list of
+// objects, or a single binding.
+bool QDeclarativeCompiler::buildListProperty(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ const BindingContext &ctxt)
+{
+ Q_ASSERT(QDeclarativeEnginePrivate::get(engine)->isList(prop->type));
+
+ int t = prop->type;
+
+ obj->addValueProperty(prop);
+
+ int listType = QDeclarativeEnginePrivate::get(engine)->listType(t);
+ bool listTypeIsInterface = QDeclarativeMetaType::isInterface(listType);
+
+ bool assignedBinding = false;
+ for (int ii = 0; ii < prop->values.count(); ++ii) {
+ Value *v = prop->values.at(ii);
+ if (v->object) {
+ v->type = Value::CreatedObject;
+ COMPILE_CHECK(buildObject(v->object, ctxt));
+
+ // We check object coercian here. We check interface assignment
+ // at runtime.
+ if (!listTypeIsInterface) {
+ if (!canCoerce(listType, v->object)) {
+ COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Cannot assign object to list"));
+ }
+ }
+
+ } else if (v->value.isScript()) {
+ if (assignedBinding)
+ COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Can only assign one binding to lists"));
+
+ assignedBinding = true;
+ COMPILE_CHECK(buildBinding(v, prop, ctxt));
+ v->type = Value::PropertyBinding;
+ } else {
+ COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Cannot assign primitives to lists"));
+ }
+ }
+
+ return true;
+}
+
+// Compiles an assignment to a QDeclarativeScriptString property
+bool QDeclarativeCompiler::buildScriptStringProperty(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ const BindingContext &ctxt)
+{
+ if (prop->values.count() > 1)
+ COMPILE_EXCEPTION(prop->values.at(1), QCoreApplication::translate("QDeclarativeCompiler", "Cannot assign multiple values to a script property"));
+
+ if (prop->values.at(0)->object || !prop->values.at(0)->value.isScript())
+ COMPILE_EXCEPTION(prop->values.at(0), QCoreApplication::translate("QDeclarativeCompiler", "Invalid property assignment: script expected"));
+
+ obj->addScriptStringProperty(prop, ctxt.stack);
+
+ return true;
+}
+
+// Compile regular property assignments of the form "property: <value>"
+bool QDeclarativeCompiler::buildPropertyAssignment(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ const BindingContext &ctxt)
+{
+ obj->addValueProperty(prop);
+
+ for (int ii = 0; ii < prop->values.count(); ++ii) {
+ Value *v = prop->values.at(ii);
+ if (v->object) {
+
+ COMPILE_CHECK(buildPropertyObjectAssignment(prop, obj, v, ctxt));
+
+ } else {
+
+ COMPILE_CHECK(buildPropertyLiteralAssignment(prop, obj, v, ctxt));
+
+ }
+ }
+
+ for (int ii = 0; ii < prop->onValues.count(); ++ii) {
+ Value *v = prop->onValues.at(ii);
+
+ Q_ASSERT(v->object);
+ COMPILE_CHECK(buildPropertyOnAssignment(prop, obj, obj, v, ctxt));
+ }
+
+ return true;
+}
+
+// Compile assigning a single object instance to a regular property
+bool QDeclarativeCompiler::buildPropertyObjectAssignment(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ QDeclarativeParser::Value *v,
+ const BindingContext &ctxt)
+{
+ Q_ASSERT(prop->index != -1);
+ Q_ASSERT(v->object->type != -1);
+
+ if (!obj->metaObject()->property(prop->index).isWritable())
+ COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: \"%1\" is a read-only property").arg(QString::fromUtf8(prop->name)));
+
+ if (QDeclarativeMetaType::isInterface(prop->type)) {
+
+ // Assigning an object to an interface ptr property
+ COMPILE_CHECK(buildObject(v->object, ctxt));
+
+ v->type = Value::CreatedObject;
+
+ } else if (prop->type == -1) {
+
+ // Assigning an object to a QVariant
+ COMPILE_CHECK(buildObject(v->object, ctxt));
+
+ v->type = Value::CreatedObject;
+ } else {
+ // Normally buildObject() will set this up, but we need the static
+ // meta object earlier to test for assignability. It doesn't matter
+ // that there may still be outstanding synthesized meta object changes
+ // on this type, as they are not relevant for assignability testing
+ v->object->metatype = output->types.at(v->object->type).metaObject();
+ Q_ASSERT(v->object->metaObject());
+
+ // We want to raw metaObject here as the raw metaobject is the
+ // actual property type before we applied any extensions that might
+ // effect the properties on the type, but don't effect assignability
+ const QMetaObject *propertyMetaObject =
+ QDeclarativeEnginePrivate::get(engine)->rawMetaObjectForType(prop->type);
+
+ // Will be true if the assgned type inherits propertyMetaObject
+ bool isAssignable = false;
+ // Determine isAssignable value
+ if (propertyMetaObject) {
+ const QMetaObject *c = v->object->metatype;
+ while(c) {
+ isAssignable |= (QDeclarativePropertyPrivate::equal(c, propertyMetaObject));
+ c = c->superClass();
+ }
+ }
+
+ if (isAssignable) {
+ // Simple assignment
+ COMPILE_CHECK(buildObject(v->object, ctxt));
+
+ v->type = Value::CreatedObject;
+ } else if (propertyMetaObject == &QDeclarativeComponent::staticMetaObject) {
+ // Automatic "Component" insertion
+ QDeclarativeParser::Object *root = v->object;
+ QDeclarativeParser::Object *component = new QDeclarativeParser::Object;
+ component->type = componentTypeRef();
+ component->typeName = "Qt/Component";
+ component->metatype = &QDeclarativeComponent::staticMetaObject;
+ component->location = root->location;
+ QDeclarativeParser::Value *componentValue = new QDeclarativeParser::Value;
+ componentValue->object = root;
+ component->getDefaultProperty()->addValue(componentValue);
+ v->object = component;
+ COMPILE_CHECK(buildPropertyObjectAssignment(prop, obj, v, ctxt));
+ } else {
+ COMPILE_EXCEPTION(v->object, QCoreApplication::translate("QDeclarativeCompiler","Cannot assign object to property"));
+ }
+ }
+
+ return true;
+}
+
+// Compile assigning a single object instance to a regular property using the "on" syntax.
+//
+// For example:
+// Item {
+// NumberAnimation on x { }
+// }
+bool QDeclarativeCompiler::buildPropertyOnAssignment(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ QDeclarativeParser::Object *baseObj,
+ QDeclarativeParser::Value *v,
+ const BindingContext &ctxt)
+{
+ Q_ASSERT(prop->index != -1);
+ Q_ASSERT(v->object->type != -1);
+
+ if (!obj->metaObject()->property(prop->index).isWritable())
+ COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: \"%1\" is a read-only property").arg(QString::fromUtf8(prop->name)));
+
+
+ // Normally buildObject() will set this up, but we need the static
+ // meta object earlier to test for assignability. It doesn't matter
+ // that there may still be outstanding synthesized meta object changes
+ // on this type, as they are not relevant for assignability testing
+ v->object->metatype = output->types.at(v->object->type).metaObject();
+ Q_ASSERT(v->object->metaObject());
+
+ // Will be true if the assigned type inherits QDeclarativePropertyValueSource
+ bool isPropertyValue = false;
+ // Will be true if the assigned type inherits QDeclarativePropertyValueInterceptor
+ bool isPropertyInterceptor = false;
+ if (QDeclarativeType *valueType = toQmlType(v->object)) {
+ isPropertyValue = valueType->propertyValueSourceCast() != -1;
+ isPropertyInterceptor = valueType->propertyValueInterceptorCast() != -1;
+ }
+
+ if (isPropertyValue || isPropertyInterceptor) {
+ // Assign as a property value source
+ COMPILE_CHECK(buildObject(v->object, ctxt));
+
+ if (isPropertyInterceptor && prop->parent->synthdata.isEmpty())
+ buildDynamicMeta(baseObj, ForceCreation);
+ v->type = isPropertyValue ? Value::ValueSource : Value::ValueInterceptor;
+ } else {
+ COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","\"%1\" cannot operate on \"%2\"").arg(v->object->typeName.constData()).arg(prop->name.constData()));
+ }
+
+ return true;
+}
+
+// Compile assigning a literal or binding to a regular property
+bool QDeclarativeCompiler::buildPropertyLiteralAssignment(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ QDeclarativeParser::Value *v,
+ const BindingContext &ctxt)
+{
+ Q_ASSERT(prop->index != -1);
+
+ if (v->value.isScript()) {
+
+ //optimization for <Type>.<EnumValue> enum assignments
+ bool isEnumAssignment = false;
+ COMPILE_CHECK(testQualifiedEnumAssignment(obj->metaObject()->property(prop->index), obj, v, &isEnumAssignment));
+ if (isEnumAssignment) {
+ v->type = Value::Literal;
+ return true;
+ }
+
+ COMPILE_CHECK(buildBinding(v, prop, ctxt));
+
+ v->type = Value::PropertyBinding;
+
+ } else {
+
+ COMPILE_CHECK(testLiteralAssignment(obj->metaObject()->property(prop->index), v));
+
+ v->type = Value::Literal;
+ }
+
+ return true;
+}
+
+bool QDeclarativeCompiler::testQualifiedEnumAssignment(const QMetaProperty &prop,
+ QDeclarativeParser::Object *obj,
+ QDeclarativeParser::Value *v,
+ bool *isAssignment)
+{
+ *isAssignment = false;
+ if (!prop.isEnumType())
+ return true;
+
+ if (!prop.isWritable())
+ COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: \"%1\" is a read-only property").arg(QString::fromUtf8(prop.name())));
+
+ QString string = v->value.asString();
+ if (!string.at(0).isUpper())
+ return true;
+
+ QStringList parts = string.split(QLatin1Char('.'));
+ if (parts.count() != 2)
+ return true;
+
+ QString typeName = parts.at(0);
+ QDeclarativeType *type = 0;
+ QDeclarativeEnginePrivate::get(engine)->resolveType(unit->imports, typeName.toUtf8(),
+ &type, 0, 0, 0, 0);
+
+ if (!type || obj->typeName != type->qmlTypeName())
+ return true;
+
+ QString enumValue = parts.at(1);
+ int value;
+ if (prop.isFlagType()) {
+ value = prop.enumerator().keysToValue(enumValue.toUtf8().constData());
+ } else
+ value = prop.enumerator().keyToValue(enumValue.toUtf8().constData());
+ if (value == -1)
+ return true;
+
+ v->type = Value::Literal;
+ v->value = QDeclarativeParser::Variant(enumValue);
+ *isAssignment = true;
+
+ return true;
+}
+
+// Ensures that the dynamic meta specification on obj is valid
+bool QDeclarativeCompiler::checkDynamicMeta(QDeclarativeParser::Object *obj)
+{
+ QSet<QByteArray> propNames;
+ QSet<QByteArray> methodNames;
+ bool seenDefaultProperty = false;
+
+ // Check properties
+ for (int ii = 0; ii < obj->dynamicProperties.count(); ++ii) {
+ const QDeclarativeParser::Object::DynamicProperty &prop =
+ obj->dynamicProperties.at(ii);
+
+ if (prop.isDefaultProperty) {
+ if (seenDefaultProperty)
+ COMPILE_EXCEPTION(&prop, QCoreApplication::translate("QDeclarativeCompiler","Duplicate default property"));
+ seenDefaultProperty = true;
+ }
+
+ if (propNames.contains(prop.name))
+ COMPILE_EXCEPTION(&prop, QCoreApplication::translate("QDeclarativeCompiler","Duplicate property name"));
+
+ if (QString::fromUtf8(prop.name).at(0).isUpper())
+ COMPILE_EXCEPTION(&prop, QCoreApplication::translate("QDeclarativeCompiler","Property names cannot begin with an upper case letter"));
+ propNames.insert(prop.name);
+ }
+
+ for (int ii = 0; ii < obj->dynamicSignals.count(); ++ii) {
+ QByteArray name = obj->dynamicSignals.at(ii).name;
+ if (methodNames.contains(name))
+ COMPILE_EXCEPTION(obj, QCoreApplication::translate("QDeclarativeCompiler","Duplicate signal name"));
+ if (QString::fromUtf8(name).at(0).isUpper())
+ COMPILE_EXCEPTION(obj, QCoreApplication::translate("QDeclarativeCompiler","Signal names cannot begin with an upper case letter"));
+ methodNames.insert(name);
+ }
+ for (int ii = 0; ii < obj->dynamicSlots.count(); ++ii) {
+ QByteArray name = obj->dynamicSlots.at(ii).name;
+ if (methodNames.contains(name))
+ COMPILE_EXCEPTION(obj, QCoreApplication::translate("QDeclarativeCompiler","Duplicate method name"));
+ if (QString::fromUtf8(name).at(0).isUpper())
+ COMPILE_EXCEPTION(obj, QCoreApplication::translate("QDeclarativeCompiler","Method names cannot begin with an upper case letter"));
+ methodNames.insert(name);
+ }
+
+ return true;
+}
+
+bool QDeclarativeCompiler::mergeDynamicMetaProperties(QDeclarativeParser::Object *obj)
+{
+ for (int ii = 0; ii < obj->dynamicProperties.count(); ++ii) {
+ const Object::DynamicProperty &p = obj->dynamicProperties.at(ii);
+
+ if (!p.defaultValue || p.type == Object::DynamicProperty::Alias)
+ continue;
+
+ Property *property = 0;
+ if (p.isDefaultProperty) {
+ property = obj->getDefaultProperty();
+ } else {
+ property = obj->getProperty(p.name);
+ if (!property->values.isEmpty())
+ COMPILE_EXCEPTION(property, QCoreApplication::translate("QDeclarativeCompiler","Property value set multiple times"));
+ }
+
+ if (property->value)
+ COMPILE_EXCEPTION(property, QCoreApplication::translate("QDeclarativeCompiler","Invalid property nesting"));
+
+ for (int ii = 0; ii < p.defaultValue->values.count(); ++ii) {
+ Value *v = p.defaultValue->values.at(ii);
+ v->addref();
+ property->values.append(v);
+ }
+ }
+ return true;
+}
+
+Q_GLOBAL_STATIC(QAtomicInt, classIndexCounter)
+
+bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeParser::Object *obj, DynamicMetaMode mode)
+{
+ Q_ASSERT(obj);
+ Q_ASSERT(obj->metatype);
+
+ if (mode != ForceCreation &&
+ obj->dynamicProperties.isEmpty() &&
+ obj->dynamicSignals.isEmpty() &&
+ obj->dynamicSlots.isEmpty())
+ return true;
+
+ QByteArray dynamicData(sizeof(QDeclarativeVMEMetaData), (char)0);
+
+ QByteArray newClassName = obj->metatype->className();
+ newClassName.append("_QML_");
+ int idx = classIndexCounter()->fetchAndAddRelaxed(1);
+ newClassName.append(QByteArray::number(idx));
+ if (compileState.root == obj) {
+ QString path = output->url.path();
+ int lastSlash = path.lastIndexOf(QLatin1Char('/'));
+ if (lastSlash > -1) {
+ QString nameBase = path.mid(lastSlash + 1, path.length()-lastSlash-5);
+ if (!nameBase.isEmpty() && nameBase.at(0).isUpper())
+ newClassName = nameBase.toUtf8() + "_QMLTYPE_" + QByteArray::number(idx);
+ }
+ }
+
+ QMetaObjectBuilder builder;
+ builder.setClassName(newClassName);
+ builder.setFlags(QMetaObjectBuilder::DynamicMetaObject);
+
+ bool hasAlias = false;
+ for (int ii = 0; ii < obj->dynamicProperties.count(); ++ii) {
+ const Object::DynamicProperty &p = obj->dynamicProperties.at(ii);
+
+ int propIdx =
+ obj->metaObject()->indexOfProperty(p.name.constData());
+ if (-1 != propIdx) {
+ QMetaProperty prop = obj->metaObject()->property(propIdx);
+ if (prop.isFinal())
+ COMPILE_EXCEPTION(&p, QCoreApplication::translate("QDeclarativeCompiler","Cannot override FINAL property"));
+ }
+
+ if (p.isDefaultProperty &&
+ (p.type != Object::DynamicProperty::Alias ||
+ mode == ResolveAliases))
+ builder.addClassInfo("DefaultProperty", p.name);
+
+ QByteArray type;
+ int propertyType = 0;
+ bool readonly = false;
+ switch(p.type) {
+ case Object::DynamicProperty::Alias:
+ hasAlias = true;
+ continue;
+ break;
+ case Object::DynamicProperty::CustomList:
+ case Object::DynamicProperty::Custom:
+ {
+ QByteArray customTypeName;
+ QDeclarativeType *qmltype = 0;
+ QUrl url;
+ QDeclarativeEnginePrivate *priv = QDeclarativeEnginePrivate::get(engine);
+ if (!priv->resolveType(unit->imports, p.customType, &qmltype,
+ &url, 0, 0, 0))
+ COMPILE_EXCEPTION(&p, QCoreApplication::translate("QDeclarativeCompiler","Invalid property type"));
+
+ if (!qmltype) {
+ QDeclarativeCompositeTypeData *tdata = priv->typeManager.get(url);
+ Q_ASSERT(tdata);
+ Q_ASSERT(tdata->status == QDeclarativeCompositeTypeData::Complete);
+
+ QDeclarativeCompiledData *data = tdata->toCompiledComponent(engine);
+ customTypeName = data->root->className();
+ } else {
+ customTypeName = qmltype->typeName();
+ }
+
+ if (p.type == Object::DynamicProperty::Custom) {
+ type = customTypeName + '*';
+ propertyType = QMetaType::QObjectStar;
+ } else {
+ readonly = true;
+ type = "QDeclarativeListProperty<";
+ type.append(customTypeName);
+ type.append(">");
+ propertyType = qMetaTypeId<QDeclarativeListProperty<QObject> >();
+ }
+ }
+ break;
+ case Object::DynamicProperty::Variant:
+ propertyType = -1;
+ type = "QVariant";
+ break;
+ case Object::DynamicProperty::Int:
+ propertyType = QVariant::Int;
+ type = "int";
+ break;
+ case Object::DynamicProperty::Bool:
+ propertyType = QVariant::Bool;
+ type = "bool";
+ break;
+ case Object::DynamicProperty::Real:
+ propertyType = QVariant::Double;
+ type = "double";
+ break;
+ case Object::DynamicProperty::String:
+ propertyType = QVariant::String;
+ type = "QString";
+ break;
+ case Object::DynamicProperty::Url:
+ propertyType = QVariant::Url;
+ type = "QUrl";
+ break;
+ case Object::DynamicProperty::Color:
+ propertyType = QVariant::Color;
+ type = "QColor";
+ break;
+ case Object::DynamicProperty::Date:
+ propertyType = QVariant::Date;
+ type = "QDate";
+ break;
+ }
+
+ ((QDeclarativeVMEMetaData *)dynamicData.data())->propertyCount++;
+ QDeclarativeVMEMetaData::PropertyData propertyData = { propertyType };
+ dynamicData.append((char *)&propertyData, sizeof(propertyData));
+
+ builder.addSignal(p.name + "Changed()");
+ QMetaPropertyBuilder propBuilder =
+ builder.addProperty(p.name, type, builder.methodCount() - 1);
+ propBuilder.setScriptable(true);
+ propBuilder.setWritable(!readonly);
+ }
+
+ if (mode == ResolveAliases) {
+ for (int ii = 0; ii < obj->dynamicProperties.count(); ++ii) {
+ const Object::DynamicProperty &p = obj->dynamicProperties.at(ii);
+
+ if (p.type == Object::DynamicProperty::Alias) {
+ ((QDeclarativeVMEMetaData *)dynamicData.data())->aliasCount++;
+ compileAlias(builder, dynamicData, obj, p);
+ }
+ }
+ }
+
+ for (int ii = 0; ii < obj->dynamicSignals.count(); ++ii) {
+ const Object::DynamicSignal &s = obj->dynamicSignals.at(ii);
+ QByteArray sig(s.name + '(');
+ for (int jj = 0; jj < s.parameterTypes.count(); ++jj) {
+ if (jj) sig.append(',');
+ sig.append(s.parameterTypes.at(jj));
+ }
+ sig.append(')');
+ QMetaMethodBuilder b = builder.addSignal(sig);
+ b.setParameterNames(s.parameterNames);
+ ((QDeclarativeVMEMetaData *)dynamicData.data())->signalCount++;
+ }
+
+ QStringList funcScripts;
+
+ for (int ii = 0; ii < obj->dynamicSlots.count(); ++ii) {
+ Object::DynamicSlot &s = obj->dynamicSlots[ii];
+ QByteArray sig(s.name + '(');
+ QString funcScript(QLatin1String("(function("));
+
+ for (int jj = 0; jj < s.parameterNames.count(); ++jj) {
+ if (jj) {
+ sig.append(',');
+ funcScript.append(QLatin1Char(','));
+ }
+ funcScript.append(QLatin1String(s.parameterNames.at(jj)));
+ sig.append("QVariant");
+ }
+ sig.append(')');
+ funcScript.append(QLatin1Char(')'));
+ funcScript.append(s.body);
+ funcScript.append(QLatin1Char(')'));
+ funcScripts << funcScript;
+
+ QMetaMethodBuilder b = builder.addSlot(sig);
+ b.setReturnType("QVariant");
+ b.setParameterNames(s.parameterNames);
+
+ ((QDeclarativeVMEMetaData *)dynamicData.data())->methodCount++;
+ QDeclarativeVMEMetaData::MethodData methodData =
+ { s.parameterNames.count(), 0, funcScript.length(), 0 };
+
+ dynamicData.append((char *)&methodData, sizeof(methodData));
+ }
+
+ for (int ii = 0; ii < obj->dynamicSlots.count(); ++ii) {
+ const QString &funcScript = funcScripts.at(ii);
+ QDeclarativeVMEMetaData::MethodData *data =
+ ((QDeclarativeVMEMetaData *)dynamicData.data())->methodData() + ii;
+
+ data->bodyOffset = dynamicData.size();
+
+ dynamicData.append((const char *)funcScript.constData(),
+ (funcScript.length() * sizeof(QChar)));
+ }
+
+ obj->metadata = builder.toRelocatableData();
+ builder.fromRelocatableData(&obj->extObject, obj->metatype, obj->metadata);
+
+ if (mode == IgnoreAliases && hasAlias)
+ compileState.aliasingObjects << obj;
+
+ obj->synthdata = dynamicData;
+
+ return true;
+}
+
+bool QDeclarativeCompiler::checkValidId(QDeclarativeParser::Value *v, const QString &val)
+{
+ if (val.isEmpty())
+ COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler", "Invalid empty ID"));
+
+ if (val.at(0).isLetter() && !val.at(0).isLower())
+ COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler", "IDs cannot start with an uppercase letter"));
+
+ QChar u(QLatin1Char('_'));
+ for (int ii = 0; ii < val.count(); ++ii) {
+
+ if (ii == 0 && !val.at(ii).isLetter() && val.at(ii) != u) {
+ COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler", "IDs must start with a letter or underscore"));
+ } else if (ii != 0 && !val.at(ii).isLetterOrNumber() && val.at(ii) != u) {
+ COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler", "IDs must contain only letters, numbers, and underscores"));
+ }
+
+ }
+
+ if (QDeclarativeEnginePrivate::get(engine)->globalClass->illegalNames().contains(val))
+ COMPILE_EXCEPTION(v, QCoreApplication::translate("QDeclarativeCompiler", "ID illegally masks global JavaScript property"));
+
+ return true;
+}
+
+#include <qdeclarativejsparser_p.h>
+
+static QStringList astNodeToStringList(QDeclarativeJS::AST::Node *node)
+{
+ if (node->kind == QDeclarativeJS::AST::Node::Kind_IdentifierExpression) {
+ QString name =
+ static_cast<QDeclarativeJS::AST::IdentifierExpression *>(node)->name->asString();
+ return QStringList() << name;
+ } else if (node->kind == QDeclarativeJS::AST::Node::Kind_FieldMemberExpression) {
+ QDeclarativeJS::AST::FieldMemberExpression *expr = static_cast<QDeclarativeJS::AST::FieldMemberExpression *>(node);
+
+ QStringList rv = astNodeToStringList(expr->base);
+ if (rv.isEmpty())
+ return rv;
+ rv.append(expr->name->asString());
+ return rv;
+ }
+ return QStringList();
+}
+
+bool QDeclarativeCompiler::compileAlias(QMetaObjectBuilder &builder,
+ QByteArray &data,
+ Object *obj,
+ const Object::DynamicProperty &prop)
+{
+ if (!prop.defaultValue)
+ COMPILE_EXCEPTION(obj, QCoreApplication::translate("QDeclarativeCompiler","No property alias location"));
+
+ if (prop.defaultValue->values.count() != 1 ||
+ prop.defaultValue->values.at(0)->object ||
+ !prop.defaultValue->values.at(0)->value.isScript())
+ COMPILE_EXCEPTION(prop.defaultValue, QCoreApplication::translate("QDeclarativeCompiler","Invalid alias location"));
+
+ QDeclarativeJS::AST::Node *node = prop.defaultValue->values.at(0)->value.asAST();
+ if (!node)
+ COMPILE_EXCEPTION(obj, QCoreApplication::translate("QDeclarativeCompiler","No property alias location")); // ### Can this happen?
+
+ QStringList alias = astNodeToStringList(node);
+
+ if (alias.count() != 1 && alias.count() != 2)
+ COMPILE_EXCEPTION(prop.defaultValue, QCoreApplication::translate("QDeclarativeCompiler","Invalid alias reference. An alias reference must be specified as <id> or <id>.<property>"));
+
+ if (!compileState.ids.contains(alias.at(0)))
+ COMPILE_EXCEPTION(prop.defaultValue, QCoreApplication::translate("QDeclarativeCompiler","Invalid alias reference. Unable to find id \"%1\"").arg(alias.at(0)));
+
+ Object *idObject = compileState.ids[alias.at(0)];
+
+ QByteArray typeName;
+
+ int propIdx = -1;
+ int flags = 0;
+ bool writable = false;
+ if (alias.count() == 2) {
+ propIdx = idObject->metaObject()->indexOfProperty(alias.at(1).toUtf8().constData());
+
+ if (-1 == propIdx)
+ COMPILE_EXCEPTION(prop.defaultValue, QCoreApplication::translate("QDeclarativeCompiler","Invalid alias location"));
+
+ QMetaProperty aliasProperty = idObject->metaObject()->property(propIdx);
+ writable = aliasProperty.isWritable();
+
+ if (aliasProperty.isEnumType())
+ typeName = "int"; // Avoid introducing a dependency on the aliased metaobject
+ else
+ typeName = aliasProperty.typeName();
+ } else {
+ typeName = idObject->metaObject()->className();
+
+ //use the base type since it has been registered with metatype system
+ int index = typeName.indexOf("_QML_");
+ if (index != -1) {
+ typeName = typeName.left(index);
+ } else {
+ index = typeName.indexOf("_QMLTYPE_");
+ const QMetaObject *mo = idObject->metaObject();
+ while (index != -1 && mo) {
+ typeName = mo->superClass()->className();
+ index = typeName.indexOf("_QMLTYPE_");
+ mo = mo->superClass();
+ }
+ }
+
+ typeName += '*';
+ }
+
+ if (typeName.endsWith('*'))
+ flags |= QML_ALIAS_FLAG_PTR;
+
+ data.append((const char *)&idObject->idIndex, sizeof(idObject->idIndex));
+ data.append((const char *)&propIdx, sizeof(propIdx));
+ data.append((const char *)&flags, sizeof(flags));
+
+ builder.addSignal(prop.name + "Changed()");
+ QMetaPropertyBuilder propBuilder =
+ builder.addProperty(prop.name, typeName.constData(), builder.methodCount() - 1);
+ propBuilder.setScriptable(true);
+ propBuilder.setWritable(writable);
+ return true;
+}
+
+bool QDeclarativeCompiler::buildBinding(QDeclarativeParser::Value *value,
+ QDeclarativeParser::Property *prop,
+ const BindingContext &ctxt)
+{
+ Q_ASSERT(prop->index != -1);
+ Q_ASSERT(prop->parent);
+ Q_ASSERT(prop->parent->metaObject());
+
+ QMetaProperty mp = prop->parent->metaObject()->property(prop->index);
+ if (!mp.isWritable() && !QDeclarativeMetaType::isList(prop->type))
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","Invalid property assignment: \"%1\" is a read-only property").arg(QString::fromUtf8(prop->name)));
+
+ BindingReference reference;
+ reference.expression = value->value;
+ reference.property = prop;
+ reference.value = value;
+ reference.bindingContext = ctxt;
+ addBindingReference(reference);
+
+ return true;
+}
+
+void QDeclarativeCompiler::genBindingAssignment(QDeclarativeParser::Value *binding,
+ QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ QDeclarativeParser::Property *valueTypeProperty)
+{
+ Q_UNUSED(obj);
+ Q_ASSERT(compileState.bindings.contains(binding));
+
+ const BindingReference &ref = compileState.bindings.value(binding);
+ if (ref.dataType == BindingReference::Experimental) {
+ QDeclarativeInstruction store;
+ store.type = QDeclarativeInstruction::StoreCompiledBinding;
+ store.assignBinding.value = ref.compiledIndex;
+ store.assignBinding.context = ref.bindingContext.stack;
+ store.assignBinding.owner = ref.bindingContext.owner;
+ if (valueTypeProperty)
+ store.assignBinding.property = (valueTypeProperty->index & 0xFFFF) |
+ ((valueTypeProperty->type & 0xFF)) << 16 |
+ ((prop->index & 0xFF) << 24);
+ else
+ store.assignBinding.property = prop->index;
+ store.line = binding->location.start.line;
+ output->bytecode << store;
+ return;
+ }
+
+ QDeclarativeInstruction store;
+ store.type = QDeclarativeInstruction::StoreBinding;
+ store.assignBinding.value = output->indexForByteArray(ref.compiledData);
+ store.assignBinding.context = ref.bindingContext.stack;
+ store.assignBinding.owner = ref.bindingContext.owner;
+ store.line = binding->location.start.line;
+
+ Q_ASSERT(ref.bindingContext.owner == 0 ||
+ (ref.bindingContext.owner != 0 && valueTypeProperty));
+ if (ref.bindingContext.owner) {
+ store.assignBinding.property = genValueTypeData(prop, valueTypeProperty);
+ } else {
+ store.assignBinding.property = genPropertyData(prop);
+ }
+
+ output->bytecode << store;
+}
+
+int QDeclarativeCompiler::genContextCache()
+{
+ if (compileState.ids.count() == 0)
+ return -1;
+
+ QDeclarativeIntegerCache *cache = new QDeclarativeIntegerCache(engine);
+
+ for (QHash<QString, QDeclarativeParser::Object *>::ConstIterator iter = compileState.ids.begin();
+ iter != compileState.ids.end();
+ ++iter)
+ cache->add(iter.key(), (*iter)->idIndex);
+
+ output->contextCaches.append(cache);
+ return output->contextCaches.count() - 1;
+}
+
+int QDeclarativeCompiler::genValueTypeData(QDeclarativeParser::Property *valueTypeProp,
+ QDeclarativeParser::Property *prop)
+{
+ QByteArray data =
+ QDeclarativePropertyPrivate::saveValueType(prop->parent->metaObject(), prop->index,
+ QDeclarativeEnginePrivate::get(engine)->valueTypes[prop->type]->metaObject(),
+ valueTypeProp->index);
+// valueTypeProp->index, valueTypeProp->type);
+
+ return output->indexForByteArray(data);
+}
+
+int QDeclarativeCompiler::genPropertyData(QDeclarativeParser::Property *prop)
+{
+ return output->indexForByteArray(QDeclarativePropertyPrivate::saveProperty(prop->parent->metaObject(), prop->index));
+}
+
+bool QDeclarativeCompiler::completeComponentBuild()
+{
+ componentStat.ids = compileState.ids.count();
+
+ for (int ii = 0; ii < compileState.aliasingObjects.count(); ++ii) {
+ Object *aliasObject = compileState.aliasingObjects.at(ii);
+ COMPILE_CHECK(buildDynamicMeta(aliasObject, ResolveAliases));
+ }
+
+ QDeclarativeBindingCompiler::Expression expr;
+ expr.component = compileState.root;
+ expr.ids = compileState.ids;
+
+ QDeclarativeBindingCompiler bindingCompiler;
+
+ for (QHash<QDeclarativeParser::Value*,BindingReference>::Iterator iter = compileState.bindings.begin(); iter != compileState.bindings.end(); ++iter) {
+ BindingReference &binding = *iter;
+
+ expr.context = binding.bindingContext.object;
+ expr.property = binding.property;
+ expr.expression = binding.expression;
+ expr.imports = unit->imports;
+
+ if (qmlExperimental()) {
+ int index = bindingCompiler.compile(expr, QDeclarativeEnginePrivate::get(engine));
+ if (index != -1) {
+ qWarning() << "Accepted for optimization:" << qPrintable(expr.expression.asScript());
+ binding.dataType = BindingReference::Experimental;
+ binding.compiledIndex = index;
+ componentStat.optimizedBindings++;
+ continue;
+ } else {
+ qWarning() << "Rejected for optimization:" << qPrintable(expr.expression.asScript());
+ }
+ }
+
+ binding.dataType = BindingReference::QtScript;
+
+ // Pre-rewrite the expression
+ QString expression = binding.expression.asScript();
+
+ // ### Optimize
+ QDeclarativeRewrite::SharedBindingTester sharableTest;
+ bool isSharable = sharableTest.isSharable(expression);
+
+ QDeclarativeRewrite::RewriteBinding rewriteBinding;
+ expression = rewriteBinding(expression);
+
+ quint32 length = expression.length();
+ quint32 pc;
+
+ if (isSharable) {
+ pc = output->cachedClosures.count();
+ pc |= 0x80000000;
+ output->cachedClosures.append(0);
+ } else {
+ pc = output->cachedPrograms.length();
+ output->cachedPrograms.append(0);
+ }
+
+ binding.compiledData =
+ QByteArray((const char *)&pc, sizeof(quint32)) +
+ QByteArray((const char *)&length, sizeof(quint32)) +
+ QByteArray((const char *)expression.constData(),
+ expression.length() * sizeof(QChar));
+
+ componentStat.scriptBindings++;
+ }
+
+ if (bindingCompiler.isValid()) {
+ compileState.compiledBindingData = bindingCompiler.program();
+ QDeclarativeBindingCompiler::dump(compileState.compiledBindingData);
+ }
+
+ saveComponentState();
+
+ return true;
+}
+
+void QDeclarativeCompiler::dumpStats()
+{
+ qWarning().nospace() << "QML Document: " << output->url.toString();
+ for (int ii = 0; ii < savedComponentStats.count(); ++ii) {
+ const ComponentStat &stat = savedComponentStats.at(ii);
+ qWarning().nospace() << " Component Line " << stat.lineNumber;
+ qWarning().nospace() << " Total Objects: " << stat.objects;
+ qWarning().nospace() << " IDs Used: " << stat.ids;
+ qWarning().nospace() << " Optimized Bindings: " << stat.optimizedBindings;
+ qWarning().nospace() << " QScript Bindings: " << stat.scriptBindings;
+ }
+}
+
+/*!
+ Returns true if from can be assigned to a (QObject) property of type
+ to.
+*/
+bool QDeclarativeCompiler::canCoerce(int to, QDeclarativeParser::Object *from)
+{
+ const QMetaObject *toMo =
+ QDeclarativeEnginePrivate::get(engine)->rawMetaObjectForType(to);
+ const QMetaObject *fromMo = from->metaObject();
+
+ while (fromMo) {
+ if (QDeclarativePropertyPrivate::equal(fromMo, toMo))
+ return true;
+ fromMo = fromMo->superClass();
+ }
+ return false;
+}
+
+/*!
+ Returns true if from can be assigned to a (QObject) property of type
+ to.
+*/
+bool QDeclarativeCompiler::canCoerce(int to, int from)
+{
+ const QMetaObject *toMo =
+ QDeclarativeEnginePrivate::get(engine)->rawMetaObjectForType(to);
+ const QMetaObject *fromMo =
+ QDeclarativeEnginePrivate::get(engine)->rawMetaObjectForType(from);
+
+ while (fromMo) {
+ if (QDeclarativePropertyPrivate::equal(fromMo, toMo))
+ return true;
+ fromMo = fromMo->superClass();
+ }
+ return false;
+}
+
+QDeclarativeType *QDeclarativeCompiler::toQmlType(QDeclarativeParser::Object *from)
+{
+ // ### Optimize
+ const QMetaObject *mo = from->metatype;
+ QDeclarativeType *type = 0;
+ while (!type && mo) {
+ type = QDeclarativeMetaType::qmlType(mo);
+ mo = mo->superClass();
+ }
+ return type;
+}
+
+QStringList QDeclarativeCompiler::deferredProperties(QDeclarativeParser::Object *obj)
+{
+ const QMetaObject *mo = obj->metatype;
+
+ int idx = mo->indexOfClassInfo("DeferredPropertyNames");
+ if (idx == -1)
+ return QStringList();
+
+ QMetaClassInfo classInfo = mo->classInfo(idx);
+ QStringList rv = QString::fromUtf8(classInfo.value()).split(QLatin1Char(','));
+ return rv;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativecompiler_p.h b/src/declarative/qml/qdeclarativecompiler_p.h
new file mode 100644
index 0000000000..cca42e21de
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecompiler_p.h
@@ -0,0 +1,344 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVECOMPILER_P_H
+#define QDECLARATIVECOMPILER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarative.h"
+#include "qdeclarativeerror.h"
+#include "qdeclarativeinstruction_p.h"
+#include "qdeclarativecompositetypemanager_p.h"
+#include "qdeclarativeparser_p.h"
+#include "qdeclarativeengine_p.h"
+#include "qbitfield_p.h"
+#include "qdeclarativepropertycache_p.h"
+#include "qdeclarativeintegercache_p.h"
+#include "qdeclarativetypenamecache_p.h"
+
+#include <QtCore/qbytearray.h>
+#include <QtCore/qset.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeEngine;
+class QDeclarativeComponent;
+class QDeclarativeContext;
+
+class QScriptProgram;
+class Q_AUTOTEST_EXPORT QDeclarativeCompiledData : public QDeclarativeRefCount, public QDeclarativeCleanup
+{
+public:
+ QDeclarativeCompiledData(QDeclarativeEngine *engine);
+ virtual ~QDeclarativeCompiledData();
+
+ QString name;
+ QUrl url;
+ QDeclarativeEnginePrivate::Imports imports;
+ QDeclarativeTypeNameCache *importCache;
+
+ struct TypeReference
+ {
+ TypeReference()
+ : type(0), component(0), ref(0) {}
+
+ QByteArray className;
+ QDeclarativeType *type;
+ QDeclarativeComponent *component;
+
+ QDeclarativeRefCount *ref;
+ QObject *createInstance(QDeclarativeContext *, const QBitField &) const;
+ const QMetaObject *metaObject() const;
+ };
+ QList<TypeReference> types;
+ struct CustomTypeData
+ {
+ int index;
+ int type;
+ };
+
+ const QMetaObject *root;
+ QAbstractDynamicMetaObject rootData;
+ QDeclarativePropertyCache *rootPropertyCache;
+ QList<QString> primitives;
+ QList<float> floatData;
+ QList<int> intData;
+ QList<CustomTypeData> customTypeData;
+ QList<QByteArray> datas;
+ QList<QDeclarativeParser::Location> locations;
+ QList<QDeclarativeInstruction> bytecode;
+ QList<QScriptProgram *> cachedPrograms;
+ QList<QScriptValue *> cachedClosures;
+ QList<QDeclarativePropertyCache *> propertyCaches;
+ QList<QDeclarativeIntegerCache *> contextCaches;
+ QList<QDeclarativeParser::Object::ScriptBlock> scripts;
+ QList<QUrl> urls;
+
+ void dumpInstructions();
+
+protected:
+ virtual void clear(); // From QDeclarativeCleanup
+
+private:
+ void dump(QDeclarativeInstruction *, int idx = -1);
+ QDeclarativeCompiledData(const QDeclarativeCompiledData &other);
+ QDeclarativeCompiledData &operator=(const QDeclarativeCompiledData &other);
+ QByteArray packData;
+ friend class QDeclarativeCompiler;
+ int pack(const char *, size_t);
+
+ int indexForString(const QString &);
+ int indexForByteArray(const QByteArray &);
+ int indexForFloat(float *, int);
+ int indexForInt(int *, int);
+ int indexForLocation(const QDeclarativeParser::Location &);
+ int indexForLocation(const QDeclarativeParser::LocationSpan &);
+ int indexForUrl(const QUrl &);
+};
+
+class QMetaObjectBuilder;
+class Q_DECLARATIVE_EXPORT QDeclarativeCompiler
+{
+public:
+ QDeclarativeCompiler();
+
+ bool compile(QDeclarativeEngine *, QDeclarativeCompositeTypeData *, QDeclarativeCompiledData *);
+
+ bool isError() const;
+ QList<QDeclarativeError> errors() const;
+
+ static bool isAttachedPropertyName(const QByteArray &);
+ static bool isSignalPropertyName(const QByteArray &);
+
+ static QMetaMethod findSignalByName(const QMetaObject *, const QByteArray &name);
+
+private:
+ static void reset(QDeclarativeCompiledData *);
+
+ struct BindingContext {
+ BindingContext()
+ : stack(0), owner(0), object(0) {}
+ BindingContext(QDeclarativeParser::Object *o)
+ : stack(0), owner(0), object(o) {}
+ BindingContext incr() const {
+ BindingContext rv(object);
+ rv.stack = stack + 1;
+ return rv;
+ }
+ bool isSubContext() const { return stack != 0; }
+ int stack;
+ int owner;
+ QDeclarativeParser::Object *object;
+ };
+
+ void compileTree(QDeclarativeParser::Object *tree);
+
+
+ bool buildObject(QDeclarativeParser::Object *obj, const BindingContext &);
+ bool buildScript(QDeclarativeParser::Object *obj, QDeclarativeParser::Object *script);
+ bool buildComponent(QDeclarativeParser::Object *obj, const BindingContext &);
+ bool buildSubObject(QDeclarativeParser::Object *obj, const BindingContext &);
+ bool buildSignal(QDeclarativeParser::Property *prop, QDeclarativeParser::Object *obj,
+ const BindingContext &);
+ bool buildProperty(QDeclarativeParser::Property *prop, QDeclarativeParser::Object *obj,
+ const BindingContext &);
+ bool buildPropertyInNamespace(QDeclarativeEnginePrivate::ImportedNamespace *ns,
+ QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ const BindingContext &);
+ bool buildIdProperty(QDeclarativeParser::Property *prop, QDeclarativeParser::Object *obj);
+ bool buildAttachedProperty(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ const BindingContext &ctxt);
+ bool buildGroupedProperty(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ const BindingContext &ctxt);
+ bool buildValueTypeProperty(QObject *type,
+ QDeclarativeParser::Object *obj,
+ QDeclarativeParser::Object *baseObj,
+ const BindingContext &ctxt);
+ bool buildListProperty(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ const BindingContext &ctxt);
+ bool buildScriptStringProperty(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ const BindingContext &ctxt);
+ bool buildPropertyAssignment(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ const BindingContext &ctxt);
+ bool buildPropertyObjectAssignment(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ QDeclarativeParser::Value *value,
+ const BindingContext &ctxt);
+ bool buildPropertyOnAssignment(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ QDeclarativeParser::Object *baseObj,
+ QDeclarativeParser::Value *value,
+ const BindingContext &ctxt);
+ bool buildPropertyLiteralAssignment(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ QDeclarativeParser::Value *value,
+ const BindingContext &ctxt);
+ bool doesPropertyExist(QDeclarativeParser::Property *prop, QDeclarativeParser::Object *obj);
+ bool testLiteralAssignment(const QMetaProperty &prop,
+ QDeclarativeParser::Value *value);
+ bool testQualifiedEnumAssignment(const QMetaProperty &prop,
+ QDeclarativeParser::Object *obj,
+ QDeclarativeParser::Value *value,
+ bool *isAssignment);
+ enum DynamicMetaMode { IgnoreAliases, ResolveAliases, ForceCreation };
+ bool mergeDynamicMetaProperties(QDeclarativeParser::Object *obj);
+ bool buildDynamicMeta(QDeclarativeParser::Object *obj, DynamicMetaMode mode);
+ bool checkDynamicMeta(QDeclarativeParser::Object *obj);
+ bool buildBinding(QDeclarativeParser::Value *, QDeclarativeParser::Property *prop,
+ const BindingContext &ctxt);
+ bool buildComponentFromRoot(QDeclarativeParser::Object *obj, const BindingContext &);
+ bool compileAlias(QMetaObjectBuilder &,
+ QByteArray &data,
+ QDeclarativeParser::Object *obj,
+ const QDeclarativeParser::Object::DynamicProperty &);
+ bool completeComponentBuild();
+ bool checkValidId(QDeclarativeParser::Value *, const QString &);
+
+
+ void genObject(QDeclarativeParser::Object *obj);
+ void genObjectBody(QDeclarativeParser::Object *obj);
+ void genComponent(QDeclarativeParser::Object *obj);
+ void genValueProperty(QDeclarativeParser::Property *prop, QDeclarativeParser::Object *obj);
+ void genListProperty(QDeclarativeParser::Property *prop, QDeclarativeParser::Object *obj);
+ void genPropertyAssignment(QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ QDeclarativeParser::Property *valueTypeProperty = 0);
+ void genLiteralAssignment(const QMetaProperty &prop,
+ QDeclarativeParser::Value *value);
+ void genBindingAssignment(QDeclarativeParser::Value *binding,
+ QDeclarativeParser::Property *prop,
+ QDeclarativeParser::Object *obj,
+ QDeclarativeParser::Property *valueTypeProperty = 0);
+ int genContextCache();
+
+ int genValueTypeData(QDeclarativeParser::Property *prop, QDeclarativeParser::Property *valueTypeProp);
+ int genPropertyData(QDeclarativeParser::Property *prop);
+
+ int componentTypeRef();
+
+ static QDeclarativeType *toQmlType(QDeclarativeParser::Object *from);
+ bool canCoerce(int to, QDeclarativeParser::Object *from);
+ bool canCoerce(int to, int from);
+
+ QStringList deferredProperties(QDeclarativeParser::Object *);
+
+ void addId(const QString &, QDeclarativeParser::Object *);
+
+ void dumpStats();
+
+ struct BindingReference {
+ QDeclarativeParser::Variant expression;
+ QDeclarativeParser::Property *property;
+ QDeclarativeParser::Value *value;
+
+ enum DataType { QtScript, Experimental };
+ DataType dataType;
+
+ int compiledIndex;
+
+ QByteArray compiledData;
+ BindingContext bindingContext;
+ };
+ void addBindingReference(const BindingReference &);
+
+ struct ComponentCompileState
+ {
+ ComponentCompileState()
+ : parserStatusCount(0), pushedProperties(0), root(0) {}
+ QHash<QString, QDeclarativeParser::Object *> ids;
+ QHash<int, QDeclarativeParser::Object *> idIndexes;
+ int parserStatusCount;
+ int pushedProperties;
+
+ QByteArray compiledBindingData;
+
+ QHash<QDeclarativeParser::Value *, BindingReference> bindings;
+ QHash<QDeclarativeParser::Value *, BindingContext> signalExpressions;
+ QList<QDeclarativeParser::Object *> aliasingObjects;
+ QDeclarativeParser::Object *root;
+ };
+ ComponentCompileState compileState;
+
+ struct ComponentStat
+ {
+ ComponentStat()
+ : ids(0), scriptBindings(0), optimizedBindings(0), objects(0) {}
+
+ int lineNumber;
+
+ int ids;
+ int scriptBindings;
+ int optimizedBindings;
+ int objects;
+ };
+ ComponentStat componentStat;
+
+ void saveComponentState();
+
+ ComponentCompileState componentState(QDeclarativeParser::Object *);
+ QHash<QDeclarativeParser::Object *, ComponentCompileState> savedCompileStates;
+ QList<ComponentStat> savedComponentStats;
+
+ QList<QDeclarativeError> exceptions;
+ QDeclarativeCompiledData *output;
+ QDeclarativeEngine *engine;
+ QDeclarativeParser::Object *unitRoot;
+ QDeclarativeCompositeTypeData *unit;
+};
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVECOMPILER_P_H
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
new file mode 100644
index 0000000000..d6bb216c8c
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -0,0 +1,805 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativecomponent.h"
+#include "qdeclarativecomponent_p.h"
+
+#include "qdeclarativecompiler_p.h"
+#include "qdeclarativecontext_p.h"
+#include "qdeclarativecompositetypedata_p.h"
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativevme_p.h"
+#include "qdeclarative.h"
+#include "qdeclarativeengine.h"
+#include "qdeclarativebinding_p.h"
+#include "qdeclarativebinding_p_p.h"
+#include "qdeclarativeglobal_p.h"
+#include "qdeclarativescriptparser_p.h"
+
+#include <qfxperf_p_p.h>
+
+#include <QStack>
+#include <QStringList>
+#include <QFileInfo>
+#include <QtCore/qdebug.h>
+#include <QApplication>
+
+QT_BEGIN_NAMESPACE
+
+class QByteArray;
+int statusId = qRegisterMetaType<QDeclarativeComponent::Status>("QDeclarativeComponent::Status");
+
+/*!
+ \class QDeclarativeComponent
+ \since 4.7
+ \brief The QDeclarativeComponent class encapsulates a QML component description.
+ \mainclass
+*/
+
+/*!
+ \qmlclass Component QDeclarativeComponent
+ \since 4.7
+ \brief The Component element encapsulates a QML component description.
+
+ Components are reusable, encapsulated Qml element with a well-defined interface.
+ They are often defined in \l {qdeclarativedocuments.html}{Component Files}.
+
+ The \e Component element allows defining components within a QML file.
+ This can be useful for reusing a small component within a single QML
+ file, or for defining a component that logically belongs with the
+ file containing it.
+
+ \qml
+Item {
+ Component {
+ id: redSquare
+ Rectangle {
+ color: "red"
+ width: 10
+ height: 10
+ }
+ }
+ Loader { sourceComponent: redSquare }
+ Loader { sourceComponent: redSquare; x: 20 }
+}
+ \endqml
+
+ \section1 Attached Properties
+
+ \e onCompleted
+
+ Emitted after component "startup" has completed. This can be used to
+ execute script code at startup, once the full QML environment has been
+ established.
+
+ The \c {Component::onCompleted} attached property can be applied to
+ any element. The order of running the \c onCompleted scripts is
+ undefined.
+
+ \qml
+ Rectangle {
+ Component.onCompleted: console.log("Completed Running!")
+ Rectangle {
+ Component.onCompleted: console.log("Nested Completed Running!")
+ }
+ }
+ \endqml
+*/
+
+/*!
+ \enum QDeclarativeComponent::Status
+
+ Specifies the loading status of the QDeclarativeComponent.
+
+ \value Null This QDeclarativeComponent has no data. Call loadUrl() or setData() to add QML content.
+ \value Ready This QDeclarativeComponent is ready and create() may be called.
+ \value Loading This QDeclarativeComponent is loading network data.
+ \value Error An error has occured. Calling errorDescription() to retrieve a description.
+*/
+
+void QDeclarativeComponentPrivate::typeDataReady()
+{
+ Q_Q(QDeclarativeComponent);
+
+ Q_ASSERT(typeData);
+
+ fromTypeData(typeData);
+ typeData = 0;
+
+ emit q->statusChanged(q->status());
+}
+
+void QDeclarativeComponentPrivate::updateProgress(qreal p)
+{
+ Q_Q(QDeclarativeComponent);
+
+ progress = p;
+ emit q->progressChanged(p);
+}
+
+void QDeclarativeComponentPrivate::fromTypeData(QDeclarativeCompositeTypeData *data)
+{
+ url = data->imports.baseUrl();
+ QDeclarativeCompiledData *c = data->toCompiledComponent(engine);
+
+ if (!c) {
+ Q_ASSERT(data->status == QDeclarativeCompositeTypeData::Error);
+
+ state.errors = data->errors;
+
+ } else {
+
+ cc = c;
+
+ }
+
+ data->release();
+}
+
+void QDeclarativeComponentPrivate::clear()
+{
+ if (typeData) {
+ typeData->remWaiter(this);
+ typeData->release();
+ typeData = 0;
+ }
+
+ if (cc) {
+ cc->release();
+ cc = 0;
+ }
+}
+
+/*!
+ \internal
+*/
+QDeclarativeComponent::QDeclarativeComponent(QObject *parent)
+ : QObject(*(new QDeclarativeComponentPrivate), parent)
+{
+}
+
+/*!
+ Destruct the QDeclarativeComponent.
+*/
+QDeclarativeComponent::~QDeclarativeComponent()
+{
+ Q_D(QDeclarativeComponent);
+
+ if (d->state.completePending) {
+ qWarning("QDeclarativeComponent: Component destroyed while completion pending");
+ d->completeCreate();
+ }
+
+ if (d->typeData) {
+ d->typeData->remWaiter(d);
+ d->typeData->release();
+ }
+ if (d->cc)
+ d->cc->release();
+}
+
+/*!
+ \property QDeclarativeComponent::status
+ The component's current \l{QDeclarativeComponent::Status} {status}.
+ */
+QDeclarativeComponent::Status QDeclarativeComponent::status() const
+{
+ Q_D(const QDeclarativeComponent);
+
+ if (d->typeData)
+ return Loading;
+ else if (!d->state.errors.isEmpty())
+ return Error;
+ else if (d->engine && d->cc)
+ return Ready;
+ else
+ return Null;
+}
+
+/*!
+ \property QDeclarativeComponent::isNull
+
+ Is true if the component is in the Null state, false otherwise.
+
+ Equivalent to status() == QDeclarativeComponent::Null.
+*/
+bool QDeclarativeComponent::isNull() const
+{
+ return status() == Null;
+}
+
+/*!
+ \property QDeclarativeComponent::isReady
+
+ Is true if the component is in the Ready state, false otherwise.
+
+ Equivalent to status() == QDeclarativeComponent::Ready.
+*/
+bool QDeclarativeComponent::isReady() const
+{
+ return status() == Ready;
+}
+
+/*!
+ \property QDeclarativeComponent::isError
+
+ Is true if the component is in the Error state, false otherwise.
+
+ Equivalent to status() == QDeclarativeComponent::Error.
+*/
+bool QDeclarativeComponent::isError() const
+{
+ return status() == Error;
+}
+
+/*!
+ \property QDeclarativeComponent::isLoading
+
+ Is true if the component is in the Loading state, false otherwise.
+
+ Equivalent to status() == QDeclarativeComponent::Loading.
+*/
+bool QDeclarativeComponent::isLoading() const
+{
+ return status() == Loading;
+}
+
+/*!
+ \property QDeclarativeComponent::progress
+ The progress of loading the component, from 0.0 (nothing loaded)
+ to 1.0 (finished).
+*/
+qreal QDeclarativeComponent::progress() const
+{
+ Q_D(const QDeclarativeComponent);
+ return d->progress;
+}
+
+/*!
+ \fn void QDeclarativeComponent::progressChanged(qreal progress)
+
+ Emitted whenever the component's loading progress changes. \a progress will be the
+ current progress between 0.0 (nothing loaded) and 1.0 (finished).
+*/
+
+/*!
+ \fn void QDeclarativeComponent::statusChanged(QDeclarativeComponent::Status status)
+
+ Emitted whenever the component's status changes. \a status will be the
+ new status.
+*/
+
+/*!
+ Create a QDeclarativeComponent with no data and give it the specified
+ \a engine and \a parent. Set the data with setData().
+*/
+QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, QObject *parent)
+ : QObject(*(new QDeclarativeComponentPrivate), parent)
+{
+ Q_D(QDeclarativeComponent);
+ d->engine = engine;
+}
+
+/*!
+ Create a QDeclarativeComponent from the given \a url and give it the
+ specified \a parent and \a engine.
+
+ \sa loadUrl()
+*/
+QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, const QUrl &url, QObject *parent)
+: QObject(*(new QDeclarativeComponentPrivate), parent)
+{
+ Q_D(QDeclarativeComponent);
+ d->engine = engine;
+ loadUrl(url);
+}
+
+/*!
+ Create a QDeclarativeComponent from the given \a fileName and give it the specified
+ \a parent and \a engine.
+
+ \sa loadUrl()
+*/
+QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, const QString &fileName,
+ QObject *parent)
+: QObject(*(new QDeclarativeComponentPrivate), parent)
+{
+ Q_D(QDeclarativeComponent);
+ d->engine = engine;
+ loadUrl(QUrl::fromLocalFile(fileName));
+}
+
+/*!
+ \internal
+*/
+QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, QDeclarativeCompiledData *cc, int start, int count, QObject *parent)
+ : QObject(*(new QDeclarativeComponentPrivate), parent)
+{
+ Q_D(QDeclarativeComponent);
+ d->engine = engine;
+ d->cc = cc;
+ cc->addref();
+ d->start = start;
+ d->count = count;
+ d->url = cc->url;
+ d->progress = 1.0;
+}
+
+/*!
+ Sets the QDeclarativeComponent to use the given QML \a data. If \a url
+ is provided, it is used to set the component name and to provide
+ a base path for items resolved by this component.
+*/
+void QDeclarativeComponent::setData(const QByteArray &data, const QUrl &url)
+{
+ Q_D(QDeclarativeComponent);
+
+ d->clear();
+
+ d->url = url;
+
+ QDeclarativeCompositeTypeData *typeData =
+ QDeclarativeEnginePrivate::get(d->engine)->typeManager.getImmediate(data, url);
+
+ if (typeData->status == QDeclarativeCompositeTypeData::Waiting
+ || typeData->status == QDeclarativeCompositeTypeData::WaitingResources)
+ {
+ d->typeData = typeData;
+ d->typeData->addWaiter(d);
+
+ } else {
+
+ d->fromTypeData(typeData);
+
+ }
+
+ d->progress = 1.0;
+ emit statusChanged(status());
+ emit progressChanged(d->progress);
+}
+
+/*!
+Returns the QDeclarativeContext the component was created in. This is only
+valid for components created directly from QML.
+*/
+QDeclarativeContext *QDeclarativeComponent::creationContext() const
+{
+ Q_D(const QDeclarativeComponent);
+ if(d->creationContext)
+ return d->creationContext;
+ QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(this);
+ if (ddata)
+ return ddata->context;
+ else
+ return 0;
+}
+
+/*!
+ \internal
+ Sets the QDeclarativeContext the component was created in. This is only
+ desirable for components created in QML script.
+*/
+void QDeclarativeComponent::setCreationContext(QDeclarativeContext* c)
+{
+ Q_D(QDeclarativeComponent);
+ d->creationContext = c;
+}
+
+/*!
+ Load the QDeclarativeComponent from the provided \a url.
+*/
+void QDeclarativeComponent::loadUrl(const QUrl &url)
+{
+ Q_D(QDeclarativeComponent);
+
+ d->clear();
+
+ if (url.isRelative() && !url.isEmpty())
+ d->url = d->engine->baseUrl().resolved(url);
+ else
+ d->url = url;
+
+ if (url.isEmpty()) {
+ QDeclarativeError error;
+ error.setDescription(tr("Invalid empty URL"));
+ d->state.errors << error;
+ return;
+ }
+
+ QDeclarativeCompositeTypeData *data =
+ QDeclarativeEnginePrivate::get(d->engine)->typeManager.get(d->url);
+
+ if (data->status == QDeclarativeCompositeTypeData::Waiting
+ || data->status == QDeclarativeCompositeTypeData::WaitingResources)
+ {
+ d->typeData = data;
+ d->typeData->addWaiter(d);
+ d->progress = data->progress;
+ } else {
+ d->fromTypeData(data);
+ d->progress = 1.0;
+ }
+
+ emit statusChanged(status());
+ emit progressChanged(d->progress);
+}
+
+/*!
+ Return the list of errors that occured during the last compile or create
+ operation. An empty list is returned if isError() is not set.
+*/
+QList<QDeclarativeError> QDeclarativeComponent::errors() const
+{
+ Q_D(const QDeclarativeComponent);
+ if (isError())
+ return d->state.errors;
+ else
+ return QList<QDeclarativeError>();
+}
+
+/*!
+ \internal
+ errorsString is only meant as a way to get the errors in script
+*/
+QString QDeclarativeComponent::errorsString() const
+{
+ Q_D(const QDeclarativeComponent);
+ QString ret;
+ if(!isError())
+ return ret;
+ foreach(const QDeclarativeError &e, d->state.errors) {
+ ret += e.url().toString() + QLatin1Char(':') +
+ QString::number(e.line()) + QLatin1Char(' ') +
+ e.description() + QLatin1Char('\n');
+ }
+ return ret;
+}
+
+/*!
+ \property QDeclarativeComponent::url
+ The component URL. This is the URL passed to either the constructor,
+ or the loadUrl() or setData() methods.
+*/
+QUrl QDeclarativeComponent::url() const
+{
+ Q_D(const QDeclarativeComponent);
+ return d->url;
+}
+
+/*!
+ \internal
+*/
+QDeclarativeComponent::QDeclarativeComponent(QDeclarativeComponentPrivate &dd, QObject *parent)
+ : QObject(dd, parent)
+{
+}
+
+
+/*!
+ \internal
+ A version of create which returns a scriptObject, for use in script
+*/
+QScriptValue QDeclarativeComponent::createObject()
+{
+ Q_D(QDeclarativeComponent);
+ QDeclarativeContext* ctxt = creationContext();
+ if(!ctxt){
+ qWarning() << QLatin1String("createObject can only be used in QML");
+ return QScriptValue();
+ }
+ QObject* ret = create(ctxt);
+ return QDeclarativeEnginePrivate::qmlScriptObject(ret, d->engine);
+}
+
+/*!
+ Create an object instance from this component. Returns 0 if creation
+ failed. \a context specifies the context within which to create the object
+ instance.
+
+ If \a context is 0 (the default), it will create the instance in the
+ engine' s \l {QDeclarativeEngine::rootContext()}{root context}.
+*/
+QObject *QDeclarativeComponent::create(QDeclarativeContext *context)
+{
+ Q_D(QDeclarativeComponent);
+
+ return d->create(context, QBitField());
+}
+
+QObject *QDeclarativeComponentPrivate::create(QDeclarativeContext *context,
+ const QBitField &bindings)
+{
+ if (!context)
+ context = engine->rootContext();
+
+ if (context->engine() != engine) {
+ qWarning("QDeclarativeComponent::create(): Must create component in context from the same QDeclarativeEngine");
+ return 0;
+ }
+
+ QObject *rv = beginCreate(context, bindings);
+ completeCreate();
+ return rv;
+}
+
+/*!
+ This method provides more advanced control over component instance creation.
+ In general, programmers should use QDeclarativeComponent::create() to create a
+ component.
+
+ Create an object instance from this component. Returns 0 if creation
+ failed. \a context specifies the context within which to create the object
+ instance.
+
+ When QDeclarativeComponent constructs an instance, it occurs in three steps:
+ \list 1
+ \i The object hierarchy is created, and constant values are assigned.
+ \i Property bindings are evaluated for the the first time.
+ \i If applicable, QDeclarativeParserStatus::componentComplete() is called on objects.
+ \endlist
+ QDeclarativeComponent::beginCreate() differs from QDeclarativeComponent::create() in that it
+ only performs step 1. QDeclarativeComponent::completeCreate() must be called to
+ complete steps 2 and 3.
+
+ This breaking point is sometimes useful when using attached properties to
+ communicate information to an instantiated component, as it allows their
+ initial values to be configured before property bindings take effect.
+*/
+QObject *QDeclarativeComponent::beginCreate(QDeclarativeContext *context)
+{
+ Q_D(QDeclarativeComponent);
+ return d->beginCreate(context, QBitField());
+}
+
+QObject *
+QDeclarativeComponentPrivate::beginCreate(QDeclarativeContext *context, const QBitField &bindings)
+{
+ Q_Q(QDeclarativeComponent);
+ if (!context) {
+ qWarning("QDeclarativeComponent::beginCreate(): Cannot create a component in a null context");
+ return 0;
+ }
+
+ if (context->engine() != engine) {
+ qWarning("QDeclarativeComponent::beginCreate(): Must create component in context from the same QDeclarativeEngine");
+ return 0;
+ }
+
+ if (state.completePending) {
+ qWarning("QDeclarativeComponent: Cannot create new component instance before completing the previous");
+ return 0;
+ }
+
+ if (!q->isReady()) {
+ qWarning("QDeclarativeComponent: Component is not ready");
+ return 0;
+ }
+
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+
+ QDeclarativeContextPrivate *contextPriv =
+ static_cast<QDeclarativeContextPrivate *>(QObjectPrivate::get(context));
+ QDeclarativeContext *ctxt = new QDeclarativeContext(context, 0, true);
+ static_cast<QDeclarativeContextPrivate*>(ctxt->d_func())->url = cc->url;
+ static_cast<QDeclarativeContextPrivate*>(ctxt->d_func())->imports = cc->importCache;
+ cc->importCache->addref();
+
+ QObject *rv = begin(ctxt, ep, cc, start, count, &state, bindings);
+
+ if (rv) {
+ QDeclarative_setParent_noEvent(ctxt, rv);
+ } else {
+ delete ctxt;
+ }
+
+ if (rv && !contextPriv->isInternal && ep->isDebugging)
+ contextPriv->instances.append(rv);
+ return rv;
+}
+
+QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContext *ctxt, QDeclarativeEnginePrivate *enginePriv,
+ QDeclarativeCompiledData *component, int start, int count,
+ ConstructionState *state, const QBitField &bindings)
+{
+ bool isRoot = !enginePriv->inBeginCreate;
+ enginePriv->inBeginCreate = true;
+
+ QDeclarativeVME vme;
+ QObject *rv = vme.run(ctxt, component, start, count, bindings);
+
+ if (vme.isError())
+ state->errors = vme.errors();
+
+ if (isRoot) {
+ enginePriv->inBeginCreate = false;
+
+ state->bindValues = enginePriv->bindValues;
+ state->parserStatus = enginePriv->parserStatus;
+ state->componentAttacheds = enginePriv->componentAttacheds;
+ if (state->componentAttacheds)
+ state->componentAttacheds->prev = &state->componentAttacheds;
+
+ enginePriv->componentAttacheds = 0;
+ enginePriv->bindValues.clear();
+ enginePriv->parserStatus.clear();
+ state->completePending = true;
+ enginePriv->inProgressCreations++;
+ }
+
+ return rv;
+}
+
+void QDeclarativeComponentPrivate::beginDeferred(QDeclarativeContext *, QDeclarativeEnginePrivate *enginePriv,
+ QObject *object, ConstructionState *state)
+{
+ bool isRoot = !enginePriv->inBeginCreate;
+ enginePriv->inBeginCreate = true;
+
+ QDeclarativeVME vme;
+ vme.runDeferred(object);
+
+ if (vme.isError())
+ state->errors = vme.errors();
+
+ if (isRoot) {
+ enginePriv->inBeginCreate = false;
+
+ state->bindValues = enginePriv->bindValues;
+ state->parserStatus = enginePriv->parserStatus;
+ state->componentAttacheds = enginePriv->componentAttacheds;
+ if (state->componentAttacheds)
+ state->componentAttacheds->prev = &state->componentAttacheds;
+
+ enginePriv->componentAttacheds = 0;
+ enginePriv->bindValues.clear();
+ enginePriv->parserStatus.clear();
+ state->completePending = true;
+ enginePriv->inProgressCreations++;
+ }
+}
+
+void QDeclarativeComponentPrivate::complete(QDeclarativeEnginePrivate *enginePriv, ConstructionState *state)
+{
+ if (state->completePending) {
+
+ for (int ii = 0; ii < state->bindValues.count(); ++ii) {
+ QDeclarativeEnginePrivate::SimpleList<QDeclarativeAbstractBinding> bv =
+ state->bindValues.at(ii);
+ for (int jj = 0; jj < bv.count; ++jj) {
+ if(bv.at(jj))
+ bv.at(jj)->setEnabled(true, QDeclarativePropertyPrivate::BypassInterceptor |
+ QDeclarativePropertyPrivate::DontRemoveBinding);
+ }
+ QDeclarativeEnginePrivate::clear(bv);
+ }
+
+ for (int ii = 0; ii < state->parserStatus.count(); ++ii) {
+ QDeclarativeEnginePrivate::SimpleList<QDeclarativeParserStatus> ps =
+ state->parserStatus.at(ii);
+
+ for (int jj = ps.count - 1; jj >= 0; --jj) {
+ QDeclarativeParserStatus *status = ps.at(jj);
+ if (status && status->d) {
+ status->d = 0;
+ status->componentComplete();
+ }
+ }
+ QDeclarativeEnginePrivate::clear(ps);
+ }
+
+ while (state->componentAttacheds) {
+ QDeclarativeComponentAttached *a = state->componentAttacheds;
+ if (a->next) a->next->prev = &state->componentAttacheds;
+ state->componentAttacheds = a->next;
+ a->prev = 0; a->next = 0;
+ emit a->completed();
+ }
+
+ state->bindValues.clear();
+ state->parserStatus.clear();
+ state->completePending = false;
+
+ enginePriv->inProgressCreations--;
+ if (0 == enginePriv->inProgressCreations) {
+ while (enginePriv->erroredBindings) {
+ qWarning().nospace() << qPrintable(enginePriv->erroredBindings->error.toString());
+ enginePriv->erroredBindings->removeError();
+ }
+ }
+ }
+}
+
+/*!
+ This method provides more advanced control over component instance creation.
+ In general, programmers should use QDeclarativeComponent::create() to create a
+ component.
+
+ Complete a component creation begin with QDeclarativeComponent::beginCreate().
+*/
+void QDeclarativeComponent::completeCreate()
+{
+ Q_D(QDeclarativeComponent);
+ d->completeCreate();
+}
+
+void QDeclarativeComponentPrivate::completeCreate()
+{
+ if (state.completePending) {
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+ complete(ep, &state);
+ }
+}
+
+QDeclarativeComponentAttached::QDeclarativeComponentAttached(QObject *parent)
+: QObject(parent), prev(0), next(0)
+{
+}
+
+QDeclarativeComponentAttached::~QDeclarativeComponentAttached()
+{
+ if (prev) *prev = next;
+ if (next) next->prev = prev;
+ prev = 0;
+ next = 0;
+}
+
+/*!
+ \internal
+*/
+QDeclarativeComponentAttached *QDeclarativeComponent::qmlAttachedProperties(QObject *obj)
+{
+ QDeclarativeComponentAttached *a = new QDeclarativeComponentAttached(obj);
+
+ QDeclarativeEngine *engine = qmlEngine(obj);
+ if (!engine || !QDeclarativeEnginePrivate::get(engine)->inBeginCreate)
+ return a;
+
+ QDeclarativeEnginePrivate *p = QDeclarativeEnginePrivate::get(engine);
+
+ a->next = p->componentAttacheds;
+ a->prev = &p->componentAttacheds;
+ if (a->next) a->next->prev = &a->next;
+ p->componentAttacheds = a;
+
+ return a;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativecomponent.h b/src/declarative/qml/qdeclarativecomponent.h
new file mode 100644
index 0000000000..aec0480433
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecomponent.h
@@ -0,0 +1,134 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVECOMPONENT_H
+#define QDECLARATIVECOMPONENT_H
+
+#include "qdeclarative.h"
+#include "qdeclarativeerror.h"
+
+#include <QtCore/qobject.h>
+#include <QtCore/qstring.h>
+#include <QtScript/qscriptvalue.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeCompiledData;
+class QByteArray;
+class QDeclarativeComponentPrivate;
+class QDeclarativeEngine;
+class QDeclarativeComponentAttached;
+class Q_DECLARATIVE_EXPORT QDeclarativeComponent : public QObject
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeComponent)
+ Q_PROPERTY(bool isNull READ isNull NOTIFY statusChanged)
+ Q_PROPERTY(bool isReady READ isReady NOTIFY statusChanged)
+ Q_PROPERTY(bool isError READ isError NOTIFY statusChanged)
+ Q_PROPERTY(bool isLoading READ isLoading NOTIFY statusChanged)
+ Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged)
+ Q_PROPERTY(Status status READ status NOTIFY statusChanged)
+ Q_PROPERTY(QUrl url READ url CONSTANT)
+
+public:
+ QDeclarativeComponent(QObject *parent = 0);
+ QDeclarativeComponent(QDeclarativeEngine *, QObject *parent=0);
+ QDeclarativeComponent(QDeclarativeEngine *, const QString &fileName, QObject *parent = 0);
+ QDeclarativeComponent(QDeclarativeEngine *, const QUrl &url, QObject *parent = 0);
+ virtual ~QDeclarativeComponent();
+
+ Q_ENUMS(Status)
+ enum Status { Null, Ready, Loading, Error };
+ Status status() const;
+
+ bool isNull() const;
+ bool isReady() const;
+ bool isError() const;
+ bool isLoading() const;
+
+ QList<QDeclarativeError> errors() const;
+ Q_INVOKABLE QString errorsString() const;
+
+ qreal progress() const;
+
+ QUrl url() const;
+
+ virtual QObject *create(QDeclarativeContext *context = 0);
+ virtual QObject *beginCreate(QDeclarativeContext *);
+ virtual void completeCreate();
+
+ Q_INVOKABLE QScriptValue createObject();
+
+ void loadUrl(const QUrl &url);
+ void setData(const QByteArray &, const QUrl &baseUrl);
+
+ void setCreationContext(QDeclarativeContext*);
+ QDeclarativeContext *creationContext() const;
+
+ static QDeclarativeComponentAttached *qmlAttachedProperties(QObject *);
+
+Q_SIGNALS:
+ void statusChanged(QDeclarativeComponent::Status);
+ void progressChanged(qreal);
+
+protected:
+ QDeclarativeComponent(QDeclarativeComponentPrivate &dd, QObject* parent);
+
+private:
+ QDeclarativeComponent(QDeclarativeEngine *, QDeclarativeCompiledData *, int, int, QObject *parent);
+
+ friend class QDeclarativeVME;
+ friend class QDeclarativeCompositeTypeData;
+};
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QDeclarativeComponent::Status)
+QML_DECLARE_TYPE(QDeclarativeComponent)
+QML_DECLARE_TYPEINFO(QDeclarativeComponent, QML_HAS_ATTACHED_PROPERTIES)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVECOMPONENT_H
diff --git a/src/declarative/qml/qdeclarativecomponent_p.h b/src/declarative/qml/qdeclarativecomponent_p.h
new file mode 100644
index 0000000000..3155813fae
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecomponent_p.h
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVECOMPONENT_P_H
+#define QDECLARATIVECOMPONENT_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativecomponent.h"
+
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativecompositetypemanager_p.h"
+#include "qbitfield_p.h"
+#include "qdeclarativeerror.h"
+#include "qdeclarative.h"
+
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QList>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeComponent;
+class QDeclarativeEngine;
+class QDeclarativeCompiledData;
+
+class QDeclarativeComponentAttached;
+class QDeclarativeComponentPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeComponent)
+
+public:
+ QDeclarativeComponentPrivate() : typeData(0), progress(0.), start(-1), count(-1), cc(0), engine(0), creationContext(0) {}
+
+ QObject *create(QDeclarativeContext *context, const QBitField &);
+ QObject *beginCreate(QDeclarativeContext *, const QBitField &);
+ void completeCreate();
+
+ QDeclarativeCompositeTypeData *typeData;
+ void typeDataReady();
+ void updateProgress(qreal);
+
+ void fromTypeData(QDeclarativeCompositeTypeData *data);
+
+ QUrl url;
+ qreal progress;
+
+ int start;
+ int count;
+ QDeclarativeCompiledData *cc;
+
+ struct ConstructionState {
+ ConstructionState() : componentAttacheds(0), completePending(false) {}
+ QList<QDeclarativeEnginePrivate::SimpleList<QDeclarativeAbstractBinding> > bindValues;
+ QList<QDeclarativeEnginePrivate::SimpleList<QDeclarativeParserStatus> > parserStatus;
+ QDeclarativeComponentAttached *componentAttacheds;
+ QList<QDeclarativeError> errors;
+ bool completePending;
+ };
+ ConstructionState state;
+
+ static QObject *begin(QDeclarativeContext *ctxt, QDeclarativeEnginePrivate *enginePriv,
+ QDeclarativeCompiledData *component, int start, int count,
+ ConstructionState *state, const QBitField &bindings = QBitField());
+ static void beginDeferred(QDeclarativeContext *ctxt, QDeclarativeEnginePrivate *enginePriv,
+ QObject *object, ConstructionState *state);
+ static void complete(QDeclarativeEnginePrivate *enginePriv, ConstructionState *state);
+
+ QDeclarativeEngine *engine;
+ QDeclarativeContext *creationContext;
+
+ void clear();
+
+ static QDeclarativeComponentPrivate *get(QDeclarativeComponent *c) {
+ return static_cast<QDeclarativeComponentPrivate *>(QObjectPrivate::get(c));
+ }
+};
+
+class QDeclarativeComponentAttached : public QObject
+{
+ Q_OBJECT
+public:
+ QDeclarativeComponentAttached(QObject *parent = 0);
+ ~QDeclarativeComponentAttached();
+
+ QDeclarativeComponentAttached **prev;
+ QDeclarativeComponentAttached *next;
+
+Q_SIGNALS:
+ void completed();
+
+private:
+ friend class QDeclarativeComponentPrivate;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVECOMPONENT_P_H
diff --git a/src/declarative/qml/qdeclarativecompositetypedata_p.h b/src/declarative/qml/qdeclarativecompositetypedata_p.h
new file mode 100644
index 0000000000..fb26af9f85
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecompositetypedata_p.h
@@ -0,0 +1,152 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVECOMPOSITETYPEDATA_P_H
+#define QDECLARATIVECOMPOSITETYPEDATA_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeengine_p.h"
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeCompositeTypeResource;
+class QDeclarativeCompositeTypeData : public QDeclarativeRefCount
+{
+public:
+ QDeclarativeCompositeTypeData();
+ virtual ~QDeclarativeCompositeTypeData();
+
+ enum Status {
+ Invalid,
+ Complete,
+ Error,
+ Waiting,
+ WaitingResources
+ };
+ Status status;
+ enum ErrorType {
+ NoError,
+ AccessError,
+ GeneralError
+ };
+ ErrorType errorType;
+
+ QList<QDeclarativeError> errors;
+
+ QDeclarativeEnginePrivate::Imports imports;
+
+ QList<QDeclarativeCompositeTypeData *> dependants;
+
+ // Return a QDeclarativeComponent if the QDeclarativeCompositeTypeData is not in the Waiting
+ // state. The QDeclarativeComponent is owned by the QDeclarativeCompositeTypeData, so a
+ // reference should be kept to keep the QDeclarativeComponent alive.
+ QDeclarativeComponent *toComponent(QDeclarativeEngine *);
+ // Return a QDeclarativeCompiledData if possible, or 0 if an error
+ // occurs
+ QDeclarativeCompiledData *toCompiledComponent(QDeclarativeEngine *);
+
+ struct TypeReference
+ {
+ TypeReference();
+
+ QDeclarativeType *type;
+ QDeclarativeCompositeTypeData *unit;
+ };
+
+ QList<TypeReference> types;
+ QList<QDeclarativeCompositeTypeResource *> resources;
+
+ // Add or remove p as a waiter. When the QDeclarativeCompositeTypeData becomes
+ // ready, the QDeclarativeComponentPrivate::typeDataReady() method will be invoked on
+ // p. The waiter is automatically removed when the typeDataReady() method
+ // is invoked, so there is no need to call remWaiter() in this case.
+ void addWaiter(QDeclarativeComponentPrivate *p);
+ void remWaiter(QDeclarativeComponentPrivate *p);
+
+ qreal progress;
+
+private:
+ friend class QDeclarativeCompositeTypeManager;
+ friend class QDeclarativeCompiler;
+ friend class QDeclarativeDomDocument;
+
+ QDeclarativeScriptParser data;
+ QList<QDeclarativeComponentPrivate *> waiters;
+ QDeclarativeComponent *component;
+ QDeclarativeCompiledData *compiledComponent;
+};
+
+class QDeclarativeCompositeTypeResource : public QDeclarativeRefCount
+{
+public:
+ QDeclarativeCompositeTypeResource();
+ virtual ~QDeclarativeCompositeTypeResource();
+
+ enum Status {
+ Invalid,
+ Complete,
+ Error,
+ Waiting
+ };
+ Status status;
+
+ QList<QDeclarativeCompositeTypeData *> dependants;
+
+ QString url;
+ QByteArray data;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVECOMPOSITETYPEDATA_P_H
+
diff --git a/src/declarative/qml/qdeclarativecompositetypemanager.cpp b/src/declarative/qml/qdeclarativecompositetypemanager.cpp
new file mode 100644
index 0000000000..b90a598b4e
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecompositetypemanager.cpp
@@ -0,0 +1,670 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativecompositetypemanager_p.h"
+
+#include "qdeclarativecompositetypedata_p.h"
+#include "qdeclarativescriptparser_p.h"
+#include "qdeclarativeengine.h"
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativecomponent.h"
+#include "qdeclarativecomponent_p.h"
+#include "qdeclarativecompiler_p.h"
+
+#include <QtNetwork/qnetworkreply.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qfile.h>
+
+QT_BEGIN_NAMESPACE
+
+#if (QT_VERSION < QT_VERSION_CHECK(4, 7, 0))
+inline uint qHash(const QUrl &uri)
+{
+ return qHash(uri.toEncoded(QUrl::FormattingOption(0x100)));
+}
+#endif
+
+QDeclarativeCompositeTypeData::QDeclarativeCompositeTypeData()
+: status(Invalid), errorType(NoError), component(0), compiledComponent(0)
+{
+}
+
+QDeclarativeCompositeTypeData::~QDeclarativeCompositeTypeData()
+{
+ for (int ii = 0; ii < dependants.count(); ++ii)
+ dependants.at(ii)->release();
+
+ for (int ii = 0; ii < resources.count(); ++ii)
+ resources.at(ii)->release();
+
+ if (compiledComponent)
+ compiledComponent->release();
+
+ if (component)
+ delete component;
+}
+
+QDeclarativeCompositeTypeResource::QDeclarativeCompositeTypeResource()
+{
+}
+
+QDeclarativeCompositeTypeResource::~QDeclarativeCompositeTypeResource()
+{
+ for (int ii = 0; ii < dependants.count(); ++ii)
+ dependants.at(ii)->release();
+}
+
+void QDeclarativeCompositeTypeData::addWaiter(QDeclarativeComponentPrivate *p)
+{
+ waiters << p;
+}
+
+void QDeclarativeCompositeTypeData::remWaiter(QDeclarativeComponentPrivate *p)
+{
+ waiters.removeAll(p);
+}
+
+QDeclarativeComponent *QDeclarativeCompositeTypeData::toComponent(QDeclarativeEngine *engine)
+{
+ if (!component) {
+
+ QDeclarativeCompiledData *cc = toCompiledComponent(engine);
+ if (cc) {
+ component = new QDeclarativeComponent(engine, cc, -1, -1, 0);
+ cc->release();
+ } else {
+ component = new QDeclarativeComponent(engine, 0);
+ component->d_func()->url = imports.baseUrl();
+ component->d_func()->state.errors = errors;
+ }
+
+ }
+
+ return component;
+}
+
+QDeclarativeCompiledData *
+QDeclarativeCompositeTypeData::toCompiledComponent(QDeclarativeEngine *engine)
+{
+ if (status == Complete && !compiledComponent) {
+
+ compiledComponent = new QDeclarativeCompiledData(engine);
+ compiledComponent->url = imports.baseUrl();
+ compiledComponent->name = compiledComponent->url.toString();
+
+ QDeclarativeCompiler compiler;
+ if (!compiler.compile(engine, this, compiledComponent)) {
+ status = Error;
+ errors = compiler.errors();
+ compiledComponent->release();
+ compiledComponent = 0;
+ }
+
+ // Data is no longer needed once we have a compiled component
+ data.clear();
+ }
+
+ if (compiledComponent)
+ compiledComponent->addref();
+
+ return compiledComponent;
+}
+
+QDeclarativeCompositeTypeData::TypeReference::TypeReference()
+: type(0), unit(0)
+{
+}
+
+QDeclarativeCompositeTypeManager::QDeclarativeCompositeTypeManager(QDeclarativeEngine *e)
+: engine(e)
+{
+}
+
+QDeclarativeCompositeTypeManager::~QDeclarativeCompositeTypeManager()
+{
+ for (Components::Iterator iter = components.begin(); iter != components.end();) {
+ (*iter)->release();
+ iter = components.erase(iter);
+ }
+ for (Resources::Iterator iter = resources.begin(); iter != resources.end();) {
+ (*iter)->release();
+ iter = resources.erase(iter);
+ }
+}
+
+QDeclarativeCompositeTypeData *QDeclarativeCompositeTypeManager::get(const QUrl &url)
+{
+ QDeclarativeCompositeTypeData *unit = components.value(url);
+
+ if (!unit) {
+ unit = new QDeclarativeCompositeTypeData;
+ unit->status = QDeclarativeCompositeTypeData::Waiting;
+ unit->progress = 0.0;
+ unit->imports.setBaseUrl(url);
+ components.insert(url, unit);
+
+ loadSource(unit);
+ }
+
+ unit->addref();
+ return unit;
+}
+
+QDeclarativeCompositeTypeData *
+QDeclarativeCompositeTypeManager::getImmediate(const QByteArray &data, const QUrl &url)
+{
+ QDeclarativeCompositeTypeData *unit = new QDeclarativeCompositeTypeData;
+ unit->status = QDeclarativeCompositeTypeData::Waiting;
+ unit->imports.setBaseUrl(url);
+ setData(unit, data, url);
+ return unit;
+}
+
+void QDeclarativeCompositeTypeManager::clearCache()
+{
+ for (Components::Iterator iter = components.begin(); iter != components.end();) {
+ if ((*iter)->status != QDeclarativeCompositeTypeData::Waiting) {
+ (*iter)->release();
+ iter = components.erase(iter);
+ } else {
+ ++iter;
+ }
+ }
+
+ for (Resources::Iterator iter = resources.begin(); iter != resources.end();) {
+ if ((*iter)->status != QDeclarativeCompositeTypeResource::Waiting) {
+ (*iter)->release();
+ iter = resources.erase(iter);
+ } else {
+ ++iter;
+ }
+ }
+}
+
+void QDeclarativeCompositeTypeManager::replyFinished()
+{
+ QNetworkReply *reply = static_cast<QNetworkReply *>(sender());
+
+ QDeclarativeCompositeTypeData *unit = components.value(reply->url());
+ Q_ASSERT(unit);
+
+ if (reply->error() != QNetworkReply::NoError) {
+ QString errorDescription;
+ // ### - Fill in error
+ errorDescription = QLatin1String("Network error for URL ") +
+ reply->url().toString();
+
+ unit->status = QDeclarativeCompositeTypeData::Error;
+ // ### FIXME
+ QDeclarativeError error;
+ error.setDescription(errorDescription);
+ unit->errorType = QDeclarativeCompositeTypeData::AccessError;
+ unit->errors << error;
+ doComplete(unit);
+
+ } else {
+ QByteArray data = reply->readAll();
+
+ setData(unit, data, reply->url());
+ }
+
+ reply->deleteLater();
+}
+
+void QDeclarativeCompositeTypeManager::resourceReplyFinished()
+{
+ QNetworkReply *reply = static_cast<QNetworkReply *>(sender());
+
+ QDeclarativeCompositeTypeResource *resource = resources.value(reply->url());
+ Q_ASSERT(resource);
+
+ if (reply->error() != QNetworkReply::NoError) {
+
+ resource->status = QDeclarativeCompositeTypeResource::Error;
+
+ } else {
+
+ resource->status = QDeclarativeCompositeTypeResource::Complete;
+ resource->data = reply->readAll();
+
+ }
+
+ doComplete(resource);
+ reply->deleteLater();
+}
+
+static QString toLocalFileOrQrc(const QUrl& url)
+{
+ QString r = url.toLocalFile();
+ if (r.isEmpty() && url.scheme() == QLatin1String("qrc"))
+ r = QLatin1Char(':') + url.path();
+ return r;
+}
+
+void QDeclarativeCompositeTypeManager::loadResource(QDeclarativeCompositeTypeResource *resource)
+{
+ QUrl url(resource->url);
+
+ QString lf = toLocalFileOrQrc(url);
+ if (!lf.isEmpty()) {
+
+ QFile file(lf);
+ if (file.open(QFile::ReadOnly)) {
+ resource->data = file.readAll();
+ resource->status = QDeclarativeCompositeTypeResource::Complete;
+ } else {
+ resource->status = QDeclarativeCompositeTypeResource::Error;
+ }
+
+ } else {
+
+ QNetworkReply *reply =
+ engine->networkAccessManager()->get(QNetworkRequest(url));
+ QObject::connect(reply, SIGNAL(finished()),
+ this, SLOT(resourceReplyFinished()));
+
+ }
+}
+
+void QDeclarativeCompositeTypeManager::loadSource(QDeclarativeCompositeTypeData *unit)
+{
+ QUrl url(unit->imports.baseUrl());
+
+ QString lf = toLocalFileOrQrc(url);
+ if (!lf.isEmpty()) {
+
+ QFile file(lf);
+ if (file.open(QFile::ReadOnly)) {
+ QByteArray data = file.readAll();
+ setData(unit, data, url);
+ } else {
+ QString errorDescription;
+ // ### - Fill in error
+ errorDescription = QLatin1String("File error for URL ") + url.toString();
+ unit->status = QDeclarativeCompositeTypeData::Error;
+ // ### FIXME
+ QDeclarativeError error;
+ error.setDescription(errorDescription);
+ unit->errorType = QDeclarativeCompositeTypeData::AccessError;
+ unit->errors << error;
+ doComplete(unit);
+ }
+
+ } else {
+ QNetworkReply *reply =
+ engine->networkAccessManager()->get(QNetworkRequest(url));
+ QObject::connect(reply, SIGNAL(finished()),
+ this, SLOT(replyFinished()));
+ QObject::connect(reply, SIGNAL(downloadProgress(qint64,qint64)),
+ this, SLOT(requestProgress(qint64,qint64)));
+ }
+}
+
+void QDeclarativeCompositeTypeManager::requestProgress(qint64 received, qint64 total)
+{
+ if (total <= 0)
+ return;
+ QNetworkReply *reply = static_cast<QNetworkReply *>(sender());
+
+ QDeclarativeCompositeTypeData *unit = components.value(reply->url());
+ Q_ASSERT(unit);
+
+ unit->progress = qreal(received)/total;
+
+ foreach (QDeclarativeComponentPrivate *comp, unit->waiters)
+ comp->updateProgress(unit->progress);
+}
+
+void QDeclarativeCompositeTypeManager::setData(QDeclarativeCompositeTypeData *unit,
+ const QByteArray &data,
+ const QUrl &url)
+{
+ bool ok = true;
+ if (!unit->data.parse(data, url)) {
+ ok = false;
+ unit->errors << unit->data.errors();
+ }
+
+ if (ok) {
+ compile(unit);
+ } else {
+ unit->status = QDeclarativeCompositeTypeData::Error;
+ unit->errorType = QDeclarativeCompositeTypeData::GeneralError;
+ doComplete(unit);
+ }
+}
+
+void QDeclarativeCompositeTypeManager::doComplete(QDeclarativeCompositeTypeData *unit)
+{
+ for (int ii = 0; ii < unit->dependants.count(); ++ii) {
+ checkComplete(unit->dependants.at(ii));
+ unit->dependants.at(ii)->release();
+ }
+ unit->dependants.clear();
+
+ while(!unit->waiters.isEmpty()) {
+ QDeclarativeComponentPrivate *p = unit->waiters.takeFirst();
+ p->typeDataReady();
+ }
+}
+
+void QDeclarativeCompositeTypeManager::doComplete(QDeclarativeCompositeTypeResource *resource)
+{
+ for (int ii = 0; ii < resource->dependants.count(); ++ii) {
+ checkComplete(resource->dependants.at(ii));
+ resource->dependants.at(ii)->release();
+ }
+ resource->dependants.clear();
+}
+
+void QDeclarativeCompositeTypeManager::checkComplete(QDeclarativeCompositeTypeData *unit)
+{
+ if (unit->status != QDeclarativeCompositeTypeData::Waiting
+ && unit->status != QDeclarativeCompositeTypeData::WaitingResources)
+ return;
+
+ int waiting = 0;
+ for (int ii = 0; ii < unit->resources.count(); ++ii) {
+ QDeclarativeCompositeTypeResource *r = unit->resources.at(ii);
+
+ if (!r)
+ continue;
+
+ if (r->status == QDeclarativeCompositeTypeResource::Error) {
+ unit->status = QDeclarativeCompositeTypeData::Error;
+ QDeclarativeError error;
+ error.setUrl(unit->imports.baseUrl());
+ error.setDescription(tr("Resource %1 unavailable").arg(r->url));
+ unit->errors << error;
+ doComplete(unit);
+ return;
+ } else if (r->status == QDeclarativeCompositeTypeResource::Waiting) {
+ waiting++;
+ }
+ }
+
+ if (waiting == 0) {
+ if (unit->status == QDeclarativeCompositeTypeData::WaitingResources) {
+ waiting += resolveTypes(unit);
+ if (unit->status != QDeclarativeCompositeTypeData::Error) {
+ if (waiting)
+ unit->status = QDeclarativeCompositeTypeData::Waiting;
+ } else {
+ return;
+ }
+ } else {
+ for (int ii = 0; ii < unit->types.count(); ++ii) {
+ QDeclarativeCompositeTypeData *u = unit->types.at(ii).unit;
+
+ if (!u)
+ continue;
+
+ if (u->status == QDeclarativeCompositeTypeData::Error) {
+ unit->status = QDeclarativeCompositeTypeData::Error;
+ unit->errors = u->errors;
+ doComplete(unit);
+ return;
+ } else if (u->status == QDeclarativeCompositeTypeData::Waiting) {
+ waiting++;
+ }
+ }
+ }
+ }
+
+ if (!waiting) {
+ unit->status = QDeclarativeCompositeTypeData::Complete;
+ doComplete(unit);
+ }
+}
+
+int QDeclarativeCompositeTypeManager::resolveTypes(QDeclarativeCompositeTypeData *unit)
+{
+ // not called until all resources are loaded (they include import URLs)
+
+ int waiting = 0;
+
+ foreach (QDeclarativeScriptParser::Import imp, unit->data.imports()) {
+ QString qmldir;
+ if (imp.type == QDeclarativeScriptParser::Import::File && imp.qualifier.isEmpty()) {
+ QString importUrl = unit->imports.baseUrl().resolved(QUrl(imp.uri + QLatin1String("/qmldir"))).toString();
+ for (int ii = 0; ii < unit->resources.count(); ++ii) {
+ if (unit->resources.at(ii)->url == importUrl) {
+ qmldir = QString::fromUtf8(unit->resources.at(ii)->data);
+ break;
+ }
+ }
+ }
+
+ int vmaj = -1;
+ int vmin = -1;
+ if (!imp.version.isEmpty()) {
+ int dot = imp.version.indexOf(QLatin1Char('.'));
+ if (dot < 0) {
+ vmaj = imp.version.toInt();
+ vmin = 0;
+ } else {
+ vmaj = imp.version.left(dot).toInt();
+ vmin = imp.version.mid(dot+1).toInt();
+ }
+ }
+
+ if (!QDeclarativeEnginePrivate::get(engine)->
+ addToImport(&unit->imports, qmldir, imp.uri, imp.qualifier, vmaj, vmin, imp.type))
+ {
+ QDeclarativeError error;
+ error.setUrl(unit->imports.baseUrl());
+ error.setDescription(tr("Import %1 unavailable").arg(imp.uri));
+ unit->status = QDeclarativeCompositeTypeData::Error;
+ unit->errorType = QDeclarativeCompositeTypeData::GeneralError;
+ unit->errors << error;
+ doComplete(unit);
+ return 0;
+ }
+ }
+
+ QList<QDeclarativeScriptParser::TypeReference*> types = unit->data.referencedTypes();
+
+ for (int ii = 0; ii < types.count(); ++ii) {
+ QDeclarativeScriptParser::TypeReference *parserRef = types.at(ii);
+ QByteArray typeName = parserRef->name.toUtf8();
+
+ QDeclarativeCompositeTypeData::TypeReference ref;
+
+ QUrl url;
+ int majorVersion;
+ int minorVersion;
+ QDeclarativeEnginePrivate::ImportedNamespace *typeNamespace = 0;
+ if (!QDeclarativeEnginePrivate::get(engine)->resolveType(unit->imports, typeName, &ref.type, &url, &majorVersion, &minorVersion, &typeNamespace)
+ || typeNamespace)
+ {
+ // Known to not be a type:
+ // - known to be a namespace (Namespace {})
+ // - type with unknown namespace (UnknownNamespace.SomeType {})
+ QDeclarativeError error;
+ error.setUrl(unit->imports.baseUrl());
+ if (typeNamespace)
+ error.setDescription(tr("Namespace %1 cannot be used as a type").arg(QString::fromUtf8(typeName)));
+ else
+ error.setDescription(tr("%1 is not a type").arg(QString::fromUtf8(typeName)));
+ if (!parserRef->refObjects.isEmpty()) {
+ QDeclarativeParser::Object *obj = parserRef->refObjects.first();
+ error.setLine(obj->location.start.line);
+ error.setColumn(obj->location.start.column);
+ }
+ unit->status = QDeclarativeCompositeTypeData::Error;
+ unit->errorType = QDeclarativeCompositeTypeData::GeneralError;
+ unit->errors << error;
+ doComplete(unit);
+ return 0;
+ }
+
+ if (ref.type) {
+ foreach (QDeclarativeParser::Object *obj, parserRef->refObjects) {
+ // store namespace for DOM
+ obj->majorVersion = majorVersion;
+ obj->minorVersion = minorVersion;
+ }
+ unit->types << ref;
+ continue;
+ }
+
+ QDeclarativeCompositeTypeData *urlUnit = components.value(url);
+
+ if (!urlUnit) {
+ urlUnit = new QDeclarativeCompositeTypeData;
+ urlUnit->status = QDeclarativeCompositeTypeData::Waiting;
+ urlUnit->imports.setBaseUrl(url);
+ components.insert(url, urlUnit);
+
+ loadSource(urlUnit);
+ }
+
+ ref.unit = urlUnit;
+ switch(urlUnit->status) {
+ case QDeclarativeCompositeTypeData::Invalid:
+ case QDeclarativeCompositeTypeData::Error:
+ unit->status = QDeclarativeCompositeTypeData::Error;
+ {
+ QDeclarativeError error;
+ error.setUrl(unit->imports.baseUrl());
+ error.setDescription(tr("Type %1 unavailable").arg(QString::fromUtf8(typeName)));
+ if (!parserRef->refObjects.isEmpty()) {
+ QDeclarativeParser::Object *obj = parserRef->refObjects.first();
+ error.setLine(obj->location.start.line);
+ error.setColumn(obj->location.start.column);
+ }
+ unit->errors << error;
+ }
+ if (urlUnit->errorType != QDeclarativeCompositeTypeData::AccessError)
+ unit->errors << urlUnit->errors;
+ doComplete(unit);
+ return 0;
+
+ case QDeclarativeCompositeTypeData::Complete:
+ break;
+
+ case QDeclarativeCompositeTypeData::Waiting:
+ case QDeclarativeCompositeTypeData::WaitingResources:
+ unit->addref();
+ ref.unit->dependants << unit;
+ waiting++;
+ break;
+ }
+
+ unit->types << ref;
+ }
+ return waiting;
+}
+
+// ### Check ref counting in here
+void QDeclarativeCompositeTypeManager::compile(QDeclarativeCompositeTypeData *unit)
+{
+ int waiting = 0;
+
+ QList<QUrl> resourceList = unit->data.referencedResources();
+
+ foreach (QDeclarativeScriptParser::Import imp, unit->data.imports()) {
+ if (imp.type == QDeclarativeScriptParser::Import::File && imp.qualifier.isEmpty()) {
+ QUrl importUrl = unit->imports.baseUrl().resolved(QUrl(imp.uri + QLatin1String("/qmldir")));
+ if (toLocalFileOrQrc(importUrl).isEmpty()) {
+ // Import requires remote qmldir
+ resourceList.prepend(importUrl);
+ }
+ }
+ }
+
+ for (int ii = 0; ii < resourceList.count(); ++ii) {
+ QUrl url = unit->imports.baseUrl().resolved(resourceList.at(ii));
+
+ QDeclarativeCompositeTypeResource *resource = resources.value(url);
+
+ if (!resource) {
+ resource = new QDeclarativeCompositeTypeResource;
+ resource->status = QDeclarativeCompositeTypeResource::Waiting;
+ resource->url = url.toString();
+ resources.insert(url, resource);
+
+ loadResource(resource);
+ }
+
+ switch(resource->status) {
+ case QDeclarativeCompositeTypeResource::Invalid:
+ case QDeclarativeCompositeTypeResource::Error:
+ unit->status = QDeclarativeCompositeTypeData::Error;
+ {
+ QDeclarativeError error;
+ error.setUrl(unit->imports.baseUrl());
+ error.setDescription(tr("Resource %1 unavailable").arg(resource->url));
+ unit->errors << error;
+ }
+ doComplete(unit);
+ return;
+
+ case QDeclarativeCompositeTypeData::Complete:
+ break;
+
+ case QDeclarativeCompositeTypeData::Waiting:
+ unit->addref();
+ resource->dependants << unit;
+ waiting++;
+ break;
+ }
+
+ resource->addref();
+ unit->resources << resource;
+ }
+
+ if (waiting == 0) {
+ waiting += resolveTypes(unit);
+ if (unit->status != QDeclarativeCompositeTypeData::Error) {
+ if (!waiting) {
+ unit->status = QDeclarativeCompositeTypeData::Complete;
+ doComplete(unit);
+ } else {
+ unit->status = QDeclarativeCompositeTypeData::Waiting;
+ }
+ }
+ } else {
+ unit->status = QDeclarativeCompositeTypeData::WaitingResources;
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativecompositetypemanager_p.h b/src/declarative/qml/qdeclarativecompositetypemanager_p.h
new file mode 100644
index 0000000000..03d16b89d2
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecompositetypemanager_p.h
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVECOMPOSITETYPEMANAGER_P_H
+#define QDECLARATIVECOMPOSITETYPEMANAGER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativescriptparser_p.h"
+#include "qdeclarativerefcount_p.h"
+#include "qdeclarativeerror.h"
+#include "qdeclarativeengine.h"
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeCompiledData;
+class QDeclarativeComponentPrivate;
+class QDeclarativeComponent;
+class QDeclarativeDomDocument;
+
+class QDeclarativeCompositeTypeData;
+class QDeclarativeCompositeTypeResource;
+
+class QDeclarativeCompositeTypeManager : public QObject
+{
+ Q_OBJECT
+public:
+ QDeclarativeCompositeTypeManager(QDeclarativeEngine *);
+ ~QDeclarativeCompositeTypeManager();
+
+ // Return a QDeclarativeCompositeTypeData for url. The QDeclarativeCompositeTypeData may be
+ // cached.
+ QDeclarativeCompositeTypeData *get(const QUrl &url);
+ // Return a QDeclarativeCompositeTypeData for data, with the provided base url. The
+ // QDeclarativeCompositeTypeData will not be cached.
+ QDeclarativeCompositeTypeData *getImmediate(const QByteArray &data, const QUrl &url);
+
+ // Clear cached types. Only types that aren't in the Waiting state will
+ // be cleared.
+ void clearCache();
+
+private Q_SLOTS:
+ void replyFinished();
+ void resourceReplyFinished();
+ void requestProgress(qint64 received, qint64 total);
+
+private:
+ void loadSource(QDeclarativeCompositeTypeData *);
+ void loadResource(QDeclarativeCompositeTypeResource *);
+ void compile(QDeclarativeCompositeTypeData *);
+ void setData(QDeclarativeCompositeTypeData *, const QByteArray &, const QUrl &);
+
+ void doComplete(QDeclarativeCompositeTypeData *);
+ void doComplete(QDeclarativeCompositeTypeResource *);
+ void checkComplete(QDeclarativeCompositeTypeData *);
+ int resolveTypes(QDeclarativeCompositeTypeData *);
+
+ QDeclarativeEngine *engine;
+ typedef QHash<QUrl, QDeclarativeCompositeTypeData *> Components;
+ Components components;
+ typedef QHash<QUrl, QDeclarativeCompositeTypeResource *> Resources;
+ Resources resources;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVECOMPOSITETYPEMANAGER_P_H
+
diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp
new file mode 100644
index 0000000000..f70e143c18
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecontext.cpp
@@ -0,0 +1,581 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativecontext.h"
+#include "qdeclarativecontext_p.h"
+
+#include "qdeclarativeexpression_p.h"
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativeengine.h"
+#include "qdeclarativecompiledbindings_p.h"
+#include "qdeclarativeinfo.h"
+#include "qdeclarativeglobalscriptclass_p.h"
+
+#include <qscriptengine.h>
+#include <QtCore/qvarlengtharray.h>
+#include <QtCore/qdebug.h>
+
+#include <private/qscriptdeclarativeclass_p.h>
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeContextPrivate::QDeclarativeContextPrivate()
+: parent(0), engine(0), isInternal(false), propertyNames(0),
+ notifyIndex(-1), highPriorityCount(0), imports(0), expressions(0), contextObjects(0),
+ idValues(0), idValueCount(0), optimizedBindings(0)
+{
+}
+
+void QDeclarativeContextPrivate::addScript(const QDeclarativeParser::Object::ScriptBlock &script, QObject *scopeObject)
+{
+ Q_Q(QDeclarativeContext);
+
+ if (!engine)
+ return;
+
+ QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+
+ QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(scriptEngine);
+
+ scriptContext->pushScope(enginePriv->contextClass->newContext(q, scopeObject));
+ scriptContext->pushScope(enginePriv->globalClass->globalObject());
+
+ QScriptValue scope = scriptEngine->newObject();
+ scriptContext->setActivationObject(scope);
+ scriptContext->pushScope(scope);
+
+ for (int ii = 0; ii < script.codes.count(); ++ii) {
+ scriptEngine->evaluate(script.codes.at(ii), script.files.at(ii), script.lineNumbers.at(ii));
+
+ if (scriptEngine->hasUncaughtException()) {
+ QDeclarativeError error;
+ QDeclarativeExpressionPrivate::exceptionToError(scriptEngine, error);
+ qWarning().nospace() << qPrintable(error.toString());
+ }
+ }
+
+ scriptEngine->popContext();
+
+ scripts.append(scope);
+}
+
+void QDeclarativeContextPrivate::destroyed(ContextGuard *guard)
+{
+ Q_Q(QDeclarativeContext);
+
+ // process of being deleted (which is *probably* why obj has been destroyed
+ // anyway), as we're about to get deleted which will invalidate all the
+ // expressions that could depend on us
+ QObject *parent = q->parent();
+ if (parent && QObjectPrivate::get(parent)->wasDeleted)
+ return;
+
+ while(guard->bindings) {
+ QObject *o = guard->bindings->target;
+ int mi = guard->bindings->methodIndex;
+ guard->bindings->clear();
+ if (o) o->qt_metacall(QMetaObject::InvokeMetaMethod, mi, 0);
+ }
+
+ for (int ii = 0; ii < idValueCount; ++ii) {
+ if (&idValues[ii] == guard) {
+ QMetaObject::activate(q, ii + notifyIndex, 0);
+ return;
+ }
+ }
+}
+
+void QDeclarativeContextPrivate::init()
+{
+ Q_Q(QDeclarativeContext);
+
+ if (parent)
+ parent->d_func()->childContexts.insert(q);
+}
+
+/*!
+ \class QDeclarativeContext
+ \since 4.7
+ \brief The QDeclarativeContext class defines a context within a QML engine.
+ \mainclass
+
+ Contexts allow data to be exposed to the QML components instantiated by the
+ QML engine.
+
+ Each QDeclarativeContext contains a set of properties, distinct from
+ its QObject properties, that allow data to be
+ explicitly bound to a context by name. The context properties are defined or
+ updated by calling QDeclarativeContext::setContextProperty(). The following example shows
+ a Qt model being bound to a context and then accessed from a QML file.
+
+ \code
+ QDeclarativeEngine engine;
+ QDeclarativeContext context(engine.rootContext());
+ context.setContextProperty("myModel", modelData);
+
+ QDeclarativeComponent component(&engine, "ListView { model=myModel }");
+ component.create(&context);
+ \endcode
+
+ To simplify binding and maintaining larger data sets, QObject's can be
+ added to a QDeclarativeContext. These objects are known as the context's default
+ objects. In this case all the properties of the QObject are
+ made available by name in the context, as though they were all individually
+ added by calling QDeclarativeContext::setContextProperty(). Changes to the property's
+ values are detected through the property's notify signal. This method is
+ also slightly more faster than manually adding property values.
+
+ The following example has the same effect as the one above, but it is
+ achieved using a default object.
+
+ \code
+ class MyDataSet : ... {
+ ...
+ Q_PROPERTY(QAbstractItemModel *myModel READ model NOTIFY modelChanged)
+ ...
+ };
+
+ MyDataSet myDataSet;
+ QDeclarativeEngine engine;
+ QDeclarativeContext context(engine.rootContext());
+ context.addDefaultObject(&myDataSet);
+
+ QDeclarativeComponent component(&engine, "ListView { model=myModel }");
+ component.create(&context);
+ \endcode
+
+ Default objects added first take precedence over those added later. All properties
+ added explicitly by QDeclarativeContext::setContextProperty() take precedence over default
+ object properties.
+
+ Contexts are hierarchal, with the \l {QDeclarativeEngine::rootContext()}{root context}
+ being created by the QDeclarativeEngine. A component instantiated in a given context
+ has access to that context's data, as well as the data defined by its
+ ancestor contexts. Data values (including those added implicitly by the
+ default objects) in a context override those in ancestor contexts. Data
+ that should be available to all components instantiated by the QDeclarativeEngine
+ should be added to the \l {QDeclarativeEngine::rootContext()}{root context}.
+
+ In the following example,
+
+ \code
+ QDeclarativeEngine engine;
+ QDeclarativeContext context1(engine.rootContext());
+ QDeclarativeContext context2(&context1);
+ QDeclarativeContext context3(&context2);
+
+ context1.setContextProperty("a", 12);
+ context2.setContextProperty("b", 13);
+ context3.setContextProperty("a", 14);
+ context3.setContextProperty("c", 14);
+ \endcode
+
+ a QML component instantiated in context1 would have access to the "a" data,
+ a QML component instantiated in context2 would have access to the "a" and
+ "b" data, and a QML component instantiated in context3 would have access to
+ the "a", "b" and "c" data - although its "a" data would return 14, unlike
+ that in context1 or context2.
+*/
+
+/*! \internal */
+QDeclarativeContext::QDeclarativeContext(QDeclarativeEngine *e, bool)
+: QObject(*(new QDeclarativeContextPrivate))
+{
+ Q_D(QDeclarativeContext);
+ d->engine = e;
+ d->init();
+}
+
+/*!
+ Create a new QDeclarativeContext as a child of \a engine's root context, and the
+ QObject \a parent.
+*/
+QDeclarativeContext::QDeclarativeContext(QDeclarativeEngine *engine, QObject *parent)
+: QObject(*(new QDeclarativeContextPrivate), parent)
+{
+ Q_D(QDeclarativeContext);
+ QDeclarativeContext *parentContext = engine?engine->rootContext():0;
+ d->parent = parentContext;
+ d->engine = parentContext->engine();
+ d->init();
+}
+
+/*!
+ Create a new QDeclarativeContext with the given \a parentContext, and the
+ QObject \a parent.
+*/
+QDeclarativeContext::QDeclarativeContext(QDeclarativeContext *parentContext, QObject *parent)
+: QObject(*(new QDeclarativeContextPrivate), parent)
+{
+ Q_D(QDeclarativeContext);
+ d->parent = parentContext;
+ d->engine = parentContext->engine();
+ d->init();
+}
+
+/*!
+ \internal
+*/
+QDeclarativeContext::QDeclarativeContext(QDeclarativeContext *parentContext, QObject *parent, bool)
+: QObject(*(new QDeclarativeContextPrivate), parent)
+{
+ Q_D(QDeclarativeContext);
+ d->parent = parentContext;
+ d->engine = parentContext->engine();
+ d->isInternal = true;
+ d->init();
+}
+
+/*!
+ Destroys the QDeclarativeContext.
+
+ Any expressions, or sub-contexts dependent on this context will be
+ invalidated, but not destroyed (unless they are parented to the QDeclarativeContext
+ object).
+ */
+QDeclarativeContext::~QDeclarativeContext()
+{
+ Q_D(QDeclarativeContext);
+ if (d->parent)
+ d->parent->d_func()->childContexts.remove(this);
+
+ for (QSet<QDeclarativeContext *>::ConstIterator iter = d->childContexts.begin();
+ iter != d->childContexts.end();
+ ++iter) {
+ (*iter)->d_func()->invalidateEngines();
+ (*iter)->d_func()->parent = 0;
+ }
+
+ QDeclarativeAbstractExpression *expression = d->expressions;
+ while (expression) {
+ QDeclarativeAbstractExpression *nextExpression = expression->m_nextExpression;
+
+ expression->m_context = 0;
+ expression->m_prevExpression = 0;
+ expression->m_nextExpression = 0;
+
+ expression = nextExpression;
+ }
+
+ while (d->contextObjects) {
+ QDeclarativeDeclarativeData *co = d->contextObjects;
+ d->contextObjects = d->contextObjects->nextContextObject;
+
+ co->context = 0;
+ co->nextContextObject = 0;
+ co->prevContextObject = 0;
+ }
+
+ if (d->propertyNames)
+ d->propertyNames->release();
+
+ if (d->imports)
+ d->imports->release();
+
+ if (d->optimizedBindings)
+ d->optimizedBindings->release();
+
+ delete [] d->idValues;
+}
+
+void QDeclarativeContextPrivate::invalidateEngines()
+{
+ if (!engine)
+ return;
+ engine = 0;
+ for (QSet<QDeclarativeContext *>::ConstIterator iter = childContexts.begin();
+ iter != childContexts.end();
+ ++iter) {
+ (*iter)->d_func()->invalidateEngines();
+ }
+}
+
+/*
+Refreshes all expressions that could possibly depend on this context.
+Refreshing flushes all context-tree dependent caches in the expressions, and should occur every
+time the context tree *structure* (not values) changes.
+*/
+void QDeclarativeContextPrivate::refreshExpressions()
+{
+ for (QSet<QDeclarativeContext *>::ConstIterator iter = childContexts.begin();
+ iter != childContexts.end();
+ ++iter) {
+ (*iter)->d_func()->refreshExpressions();
+ }
+
+ QDeclarativeAbstractExpression *expression = expressions;
+ while (expression) {
+ expression->refresh();
+ expression = expression->m_nextExpression;
+ }
+}
+
+/*!
+ Return the context's QDeclarativeEngine, or 0 if the context has no QDeclarativeEngine or the
+ QDeclarativeEngine was destroyed.
+*/
+QDeclarativeEngine *QDeclarativeContext::engine() const
+{
+ Q_D(const QDeclarativeContext);
+ return d->engine;
+}
+
+/*!
+ Return the context's parent QDeclarativeContext, or 0 if this context has no
+ parent or if the parent has been destroyed.
+*/
+QDeclarativeContext *QDeclarativeContext::parentContext() const
+{
+ Q_D(const QDeclarativeContext);
+ return d->parent;
+}
+
+/*!
+ Add \a defaultObject to this context. The object will be added after
+ any existing default objects.
+*/
+void QDeclarativeContext::addDefaultObject(QObject *defaultObject)
+{
+ Q_D(QDeclarativeContext);
+ d->defaultObjects.prepend(defaultObject);
+}
+
+/*!
+ Set a the \a value of the \a name property on this context.
+*/
+void QDeclarativeContext::setContextProperty(const QString &name, const QVariant &value)
+{
+ Q_D(QDeclarativeContext);
+ if (d->notifyIndex == -1)
+ d->notifyIndex = this->metaObject()->methodCount();
+
+ if (d->engine) {
+ bool ok;
+ QObject *o = QDeclarativeEnginePrivate::get(d->engine)->toQObject(value, &ok);
+ if (ok) {
+ setContextProperty(name, o);
+ return;
+ }
+ }
+
+ if (!d->propertyNames) d->propertyNames = new QDeclarativeIntegerCache(d->engine);
+
+ int idx = d->propertyNames->value(name);
+ if (idx == -1) {
+ d->propertyNames->add(name, d->idValueCount + d->propertyValues.count());
+ d->propertyValues.append(value);
+
+ d->refreshExpressions();
+ } else {
+ d->propertyValues[idx] = value;
+ QMetaObject::activate(this, idx + d->notifyIndex, 0);
+ }
+}
+
+void QDeclarativeContextPrivate::setIdProperty(int idx, QObject *obj)
+{
+ if (notifyIndex == -1) {
+ Q_Q(QDeclarativeContext);
+ notifyIndex = q->metaObject()->methodCount();
+ }
+
+ idValues[idx].priv = this;
+ idValues[idx] = obj;
+}
+
+void QDeclarativeContextPrivate::setIdPropertyData(QDeclarativeIntegerCache *data)
+{
+ Q_ASSERT(!propertyNames);
+ propertyNames = data;
+ propertyNames->addref();
+
+ idValueCount = data->count();
+ idValues = new ContextGuard[idValueCount];
+}
+
+/*!
+ Set the \a value of the \a name property on this context.
+
+ QDeclarativeContext does \bold not take ownership of \a value.
+*/
+void QDeclarativeContext::setContextProperty(const QString &name, QObject *value)
+{
+ Q_D(QDeclarativeContext);
+ if (d->notifyIndex == -1)
+ d->notifyIndex = this->metaObject()->methodCount();
+
+ if (!d->propertyNames) d->propertyNames = new QDeclarativeIntegerCache(d->engine);
+ int idx = d->propertyNames->value(name);
+
+ if (idx == -1) {
+ d->propertyNames->add(name, d->idValueCount + d->propertyValues.count());
+ d->propertyValues.append(QVariant::fromValue(value));
+
+ d->refreshExpressions();
+ } else {
+ d->propertyValues[idx] = QVariant::fromValue(value);
+ QMetaObject::activate(this, idx + d->notifyIndex, 0);
+ }
+}
+
+/*!
+ Returns the value of the \a name property for this context
+ as a QVariant.
+ */
+QVariant QDeclarativeContext::contextProperty(const QString &name) const
+{
+ Q_D(const QDeclarativeContext);
+ QVariant value;
+ int idx = -1;
+ if (d->propertyNames)
+ idx = d->propertyNames->value(name);
+
+ if (idx == -1) {
+ QByteArray utf8Name = name.toUtf8();
+ for (int ii = d->defaultObjects.count() - 1; ii >= 0; --ii) {
+ QObject *obj = d->defaultObjects.at(ii);
+ QDeclarativePropertyCache::Data local;
+ QDeclarativePropertyCache::Data *property = QDeclarativePropertyCache::property(d->engine, obj, name, local);
+
+ if (property) {
+ value = obj->metaObject()->property(property->coreIndex).read(obj);
+ break;
+ }
+ }
+ if (!value.isValid() && parentContext())
+ value = parentContext()->contextProperty(name);
+ } else {
+ if (idx >= d->propertyValues.count())
+ value = QVariant::fromValue(d->idValues[idx - d->propertyValues.count()].data());
+ else
+ value = d->propertyValues[idx];
+ }
+
+ return value;
+}
+
+/*!
+ Resolves the URL \a src relative to the URL of the
+ containing component.
+
+ \sa QDeclarativeEngine::baseUrl(), setBaseUrl()
+*/
+QUrl QDeclarativeContext::resolvedUrl(const QUrl &src)
+{
+ Q_D(QDeclarativeContext);
+ QDeclarativeContext *ctxt = this;
+ if (src.isRelative() && !src.isEmpty()) {
+ if (ctxt) {
+ while(ctxt) {
+ if(ctxt->d_func()->url.isValid())
+ break;
+ else
+ ctxt = ctxt->parentContext();
+ }
+
+ if (ctxt)
+ return ctxt->d_func()->url.resolved(src);
+ else if (d->engine)
+ return d->engine->baseUrl().resolved(src);
+ }
+ return QUrl();
+ } else {
+ return src;
+ }
+}
+
+/*!
+ Explicitly sets the url resolvedUrl() will use for relative references to \a baseUrl.
+
+ Calling this function will override the url of the containing
+ component used by default.
+
+ \sa resolvedUrl()
+*/
+void QDeclarativeContext::setBaseUrl(const QUrl &baseUrl)
+{
+ d_func()->url = baseUrl;
+}
+
+/*!
+ Returns the base url of the component, or the containing component
+ if none is set.
+*/
+QUrl QDeclarativeContext::baseUrl() const
+{
+ const QDeclarativeContext* p = this;
+ while (p && p->d_func()->url.isEmpty()) {
+ p = p->parentContext();
+ }
+ if (p)
+ return p->d_func()->url;
+ else
+ return QUrl();
+}
+
+int QDeclarativeContextPrivate::context_count(QDeclarativeListProperty<QObject> *prop)
+{
+ QDeclarativeContext *context = static_cast<QDeclarativeContext*>(prop->object);
+ QDeclarativeContextPrivate *d = QDeclarativeContextPrivate::get(context);
+ int contextProperty = (int)(intptr_t)prop->data;
+
+ if (d->propertyValues.at(contextProperty).userType() != qMetaTypeId<QList<QObject*> >()) {
+ return 0;
+ } else {
+ return ((const QList<QObject> *)d->propertyValues.at(contextProperty).constData())->count();
+ }
+}
+
+QObject *QDeclarativeContextPrivate::context_at(QDeclarativeListProperty<QObject> *prop, int index)
+{
+ QDeclarativeContext *context = static_cast<QDeclarativeContext*>(prop->object);
+ QDeclarativeContextPrivate *d = QDeclarativeContextPrivate::get(context);
+ int contextProperty = (int)(intptr_t)prop->data;
+
+ if (d->propertyValues.at(contextProperty).userType() != qMetaTypeId<QList<QObject*> >()) {
+ return 0;
+ } else {
+ return ((const QList<QObject*> *)d->propertyValues.at(contextProperty).constData())->at(index);
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativecontext.h b/src/declarative/qml/qdeclarativecontext.h
new file mode 100644
index 0000000000..0fb9bee2a5
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecontext.h
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVECONTEXT_H
+#define QDECLARATIVECONTEXT_H
+
+#include <QtCore/qurl.h>
+#include <QtCore/qobject.h>
+#include <QtScript/qscriptvalue.h>
+#include <QtCore/qmetatype.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QString;
+class QDeclarativeEngine;
+class QDeclarativeRefCount;
+class QDeclarativeContextPrivate;
+class QDeclarativeCompositeTypeData;
+
+class Q_DECLARATIVE_EXPORT QDeclarativeContext : public QObject
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeContext)
+
+public:
+ QDeclarativeContext(QDeclarativeEngine *parent, QObject *objParent=0);
+ QDeclarativeContext(QDeclarativeContext *parent, QObject *objParent=0);
+ virtual ~QDeclarativeContext();
+
+ QDeclarativeEngine *engine() const;
+ QDeclarativeContext *parentContext() const;
+
+ void addDefaultObject(QObject *);
+ void setContextProperty(const QString &, QObject *);
+ void setContextProperty(const QString &, const QVariant &);
+
+ QVariant contextProperty(const QString &) const;
+
+ QUrl resolvedUrl(const QUrl &);
+
+ void setBaseUrl(const QUrl &);
+ QUrl baseUrl() const;
+
+private:
+ friend class QDeclarativeVME;
+ friend class QDeclarativeEngine;
+ friend class QDeclarativeEnginePrivate;
+ friend class QDeclarativeExpression;
+ friend class QDeclarativeExpressionPrivate;
+ friend class QDeclarativeContextScriptClass;
+ friend class QDeclarativeObjectScriptClass;
+ friend class QDeclarativeComponent;
+ friend class QDeclarativeComponentPrivate;
+ friend class QDeclarativeScriptPrivate;
+ friend class QDeclarativeBoundSignalProxy;
+ QDeclarativeContext(QDeclarativeContext *parent, QObject *objParent, bool);
+ QDeclarativeContext(QDeclarativeEngine *, bool);
+};
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QList<QObject*>);
+
+QT_END_HEADER
+
+#endif // QDECLARATIVECONTEXT_H
diff --git a/src/declarative/qml/qdeclarativecontext_p.h b/src/declarative/qml/qdeclarativecontext_p.h
new file mode 100644
index 0000000000..829728073f
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecontext_p.h
@@ -0,0 +1,195 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVECONTEXT_P_H
+#define QDECLARATIVECONTEXT_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativecontext.h"
+
+#include "qdeclarativedeclarativedata_p.h"
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativeintegercache_p.h"
+#include "qdeclarativetypenamecache_p.h"
+
+#include <QtCore/qhash.h>
+#include <QtScript/qscriptvalue.h>
+#include <QtCore/qset.h>
+
+#include <private/qobject_p.h>
+#include "qdeclarativeguard_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeContext;
+class QDeclarativeExpression;
+class QDeclarativeEngine;
+class QDeclarativeExpression;
+class QDeclarativeExpressionPrivate;
+class QDeclarativeAbstractExpression;
+class QDeclarativeBinding_Id;
+class QDeclarativeCompiledBindings;
+
+class Q_DECLARATIVE_EXPORT QDeclarativeContextPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeContext)
+public:
+ QDeclarativeContextPrivate();
+
+ QDeclarativeContext *parent;
+ QDeclarativeEngine *engine;
+
+ bool isInternal;
+
+ QDeclarativeIntegerCache *propertyNames;
+ QList<QVariant> propertyValues;
+ int notifyIndex;
+
+ QObjectList defaultObjects;
+ int highPriorityCount;
+
+ QList<QScriptValue> scripts;
+ void addScript(const QDeclarativeParser::Object::ScriptBlock &, QObject *);
+
+ QUrl url;
+
+ QDeclarativeTypeNameCache *imports;
+
+ void init();
+
+ void invalidateEngines();
+ void refreshExpressions();
+ QSet<QDeclarativeContext *> childContexts;
+
+ QDeclarativeAbstractExpression *expressions;
+
+ QDeclarativeDeclarativeData *contextObjects;
+
+ struct IdNotifier
+ {
+ inline IdNotifier();
+ inline ~IdNotifier();
+
+ inline void clear();
+
+ IdNotifier *next;
+ IdNotifier**prev;
+ QObject *target;
+ int methodIndex;
+ };
+
+ struct ContextGuard : public QDeclarativeGuard<QObject>
+ {
+ inline ContextGuard();
+ inline ContextGuard &operator=(QObject *obj);
+ inline virtual void objectDestroyed(QObject *);
+
+ QDeclarativeContextPrivate *priv;
+ IdNotifier *bindings;
+ };
+ ContextGuard *idValues;
+ int idValueCount;
+ void setIdProperty(int, QObject *);
+ void setIdPropertyData(QDeclarativeIntegerCache *);
+ void destroyed(ContextGuard *);
+
+ static QDeclarativeContextPrivate *get(QDeclarativeContext *context) {
+ return static_cast<QDeclarativeContextPrivate *>(QObjectPrivate::get(context));
+ }
+ static QDeclarativeContext *get(QDeclarativeContextPrivate *context) {
+ return static_cast<QDeclarativeContext *>(context->q_func());
+ }
+
+ QDeclarativeCompiledBindings *optimizedBindings;
+
+ // Only used for debugging
+ QList<QPointer<QObject> > instances;
+
+ static int context_count(QDeclarativeListProperty<QObject> *);
+ static QObject *context_at(QDeclarativeListProperty<QObject> *, int);
+};
+
+QDeclarativeContextPrivate::IdNotifier::IdNotifier()
+: next(0), prev(0), target(0), methodIndex(-1)
+{
+}
+
+QDeclarativeContextPrivate::IdNotifier::~IdNotifier()
+{
+ clear();
+}
+
+void QDeclarativeContextPrivate::IdNotifier::clear()
+{
+ if (next) next->prev = prev;
+ if (prev) *prev = next;
+ next = 0; prev = 0; target = 0;
+ methodIndex = -1;
+}
+
+QDeclarativeContextPrivate::ContextGuard::ContextGuard()
+: priv(0), bindings(0)
+{
+}
+
+QDeclarativeContextPrivate::ContextGuard &QDeclarativeContextPrivate::ContextGuard::operator=(QObject *obj)
+{
+ (QDeclarativeGuard<QObject>&)*this = obj; return *this;
+}
+
+void QDeclarativeContextPrivate::ContextGuard::objectDestroyed(QObject *)
+{
+ priv->destroyed(this);
+}
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVECONTEXT_P_H
diff --git a/src/declarative/qml/qdeclarativecontextscriptclass.cpp b/src/declarative/qml/qdeclarativecontextscriptclass.cpp
new file mode 100644
index 0000000000..5fcf4e2adc
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecontextscriptclass.cpp
@@ -0,0 +1,302 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativecontextscriptclass_p.h"
+
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativecontext_p.h"
+#include "qdeclarativetypenamescriptclass_p.h"
+#include "qdeclarativelistscriptclass_p.h"
+#include "qdeclarativeguard_p.h"
+
+QT_BEGIN_NAMESPACE
+
+struct ContextData : public QScriptDeclarativeClass::Object {
+ ContextData() : overrideObject(0), isSharedContext(true) {}
+ ContextData(QDeclarativeContext *c, QObject *o) : context(c), scopeObject(o), overrideObject(0), isSharedContext(false) {}
+ QDeclarativeGuard<QDeclarativeContext> context;
+ QDeclarativeGuard<QObject> scopeObject;
+ QObject *overrideObject;
+ bool isSharedContext;
+
+ QDeclarativeContext *getContext(QDeclarativeEngine *engine) {
+ if (isSharedContext) {
+ return QDeclarativeEnginePrivate::get(engine)->sharedContext;
+ } else {
+ return context.data();
+ }
+ }
+
+ QObject *getScope(QDeclarativeEngine *engine) {
+ if (isSharedContext) {
+ return QDeclarativeEnginePrivate::get(engine)->sharedScope;
+ } else {
+ return scopeObject.data();
+ }
+ }
+};
+
+/*
+ The QDeclarativeContextScriptClass handles property access for a QDeclarativeContext
+ via QtScript.
+ */
+QDeclarativeContextScriptClass::QDeclarativeContextScriptClass(QDeclarativeEngine *bindEngine)
+: QDeclarativeScriptClass(QDeclarativeEnginePrivate::getScriptEngine(bindEngine)), engine(bindEngine),
+ lastScopeObject(0), lastContext(0), lastData(0), lastPropertyIndex(-1), lastDefaultObject(-1)
+{
+}
+
+QDeclarativeContextScriptClass::~QDeclarativeContextScriptClass()
+{
+}
+
+QScriptValue QDeclarativeContextScriptClass::newContext(QDeclarativeContext *context, QObject *scopeObject)
+{
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+
+ return newObject(scriptEngine, this, new ContextData(context, scopeObject));
+}
+
+QScriptValue QDeclarativeContextScriptClass::newSharedContext()
+{
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+
+ return newObject(scriptEngine, this, new ContextData());
+}
+
+QDeclarativeContext *QDeclarativeContextScriptClass::contextFromValue(const QScriptValue &v)
+{
+ if (scriptClass(v) != this)
+ return 0;
+
+ ContextData *data = (ContextData *)object(v);
+ return data->getContext(engine);
+}
+
+QObject *QDeclarativeContextScriptClass::setOverrideObject(QScriptValue &v, QObject *override)
+{
+ if (scriptClass(v) != this)
+ return 0;
+
+ ContextData *data = (ContextData *)object(v);
+ QObject *rv = data->overrideObject;
+ data->overrideObject = override;
+ return rv;
+}
+
+QScriptClass::QueryFlags
+QDeclarativeContextScriptClass::queryProperty(Object *object, const Identifier &name,
+ QScriptClass::QueryFlags flags)
+{
+ Q_UNUSED(flags);
+
+ lastScopeObject = 0;
+ lastContext = 0;
+ lastData = 0;
+ lastPropertyIndex = -1;
+ lastDefaultObject = -1;
+
+ QDeclarativeContext *bindContext = ((ContextData *)object)->getContext(engine);
+ QObject *scopeObject = ((ContextData *)object)->getScope(engine);
+ if (!bindContext)
+ return 0;
+
+ QObject *overrideObject = ((ContextData *)object)->overrideObject;
+ if (overrideObject) {
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+ QScriptClass::QueryFlags rv =
+ ep->objectClass->queryProperty(overrideObject, name, flags, bindContext,
+ QDeclarativeObjectScriptClass::ImplicitObject |
+ QDeclarativeObjectScriptClass::SkipAttachedProperties);
+ if (rv) {
+ lastScopeObject = overrideObject;
+ lastContext = bindContext;
+ return rv;
+ }
+ }
+
+ bool includeTypes = true;
+ while (bindContext) {
+ QScriptClass::QueryFlags rv =
+ queryProperty(bindContext, scopeObject, name, flags, includeTypes);
+ scopeObject = 0; // Only applies to the first context
+ includeTypes = false; // Only applies to the first context
+ if (rv) return rv;
+ bindContext = bindContext->parentContext();
+ }
+
+ return 0;
+}
+
+QScriptClass::QueryFlags
+QDeclarativeContextScriptClass::queryProperty(QDeclarativeContext *bindContext, QObject *scopeObject,
+ const Identifier &name,
+ QScriptClass::QueryFlags flags,
+ bool includeTypes)
+{
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+ QDeclarativeContextPrivate *cp = QDeclarativeContextPrivate::get(bindContext);
+
+ lastPropertyIndex = cp->propertyNames?cp->propertyNames->value(name):-1;
+ if (lastPropertyIndex != -1) {
+ lastContext = bindContext;
+ return QScriptClass::HandlesReadAccess;
+ }
+
+ if (includeTypes && cp->imports) {
+ QDeclarativeTypeNameCache::Data *data = cp->imports->data(name);
+
+ if (data) {
+ lastData = data;
+ lastContext = bindContext;
+ return QScriptClass::HandlesReadAccess;
+ }
+ }
+
+ for (int ii = 0; ii < cp->scripts.count(); ++ii) {
+ lastFunction = QScriptDeclarativeClass::function(cp->scripts.at(ii), name);
+ if (lastFunction.isValid()) {
+ lastContext = bindContext;
+ return QScriptClass::HandlesReadAccess;
+ }
+ }
+
+ if (scopeObject) {
+ QScriptClass::QueryFlags rv =
+ ep->objectClass->queryProperty(scopeObject, name, flags, bindContext,
+ QDeclarativeObjectScriptClass::ImplicitObject | QDeclarativeObjectScriptClass::SkipAttachedProperties);
+ if (rv) {
+ lastScopeObject = scopeObject;
+ lastContext = bindContext;
+ return rv;
+ }
+ }
+
+ for (int ii = cp->defaultObjects.count() - 1; ii >= 0; --ii) {
+ QScriptClass::QueryFlags rv =
+ ep->objectClass->queryProperty(cp->defaultObjects.at(ii), name, flags, bindContext,
+ QDeclarativeObjectScriptClass::ImplicitObject | QDeclarativeObjectScriptClass::SkipAttachedProperties);
+
+ if (rv) {
+ lastDefaultObject = ii;
+ lastContext = bindContext;
+ return rv;
+ }
+ }
+
+ return 0;
+}
+
+QDeclarativeContextScriptClass::ScriptValue
+QDeclarativeContextScriptClass::property(Object *object, const Identifier &name)
+{
+ Q_UNUSED(object);
+
+ QDeclarativeContext *bindContext = lastContext;
+ Q_ASSERT(bindContext);
+
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+ QDeclarativeContextPrivate *cp = QDeclarativeContextPrivate::get(bindContext);
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+
+ if (lastScopeObject) {
+
+ return ep->objectClass->property(lastScopeObject, name);
+
+ } else if (lastData) {
+
+ if (lastData->type)
+ return Value(scriptEngine, ep->typeNameClass->newObject(cp->defaultObjects.at(0), lastData->type));
+ else
+ return Value(scriptEngine, ep->typeNameClass->newObject(cp->defaultObjects.at(0), lastData->typeNamespace));
+
+ } else if (lastPropertyIndex != -1) {
+
+ QScriptValue rv;
+ if (lastPropertyIndex < cp->idValueCount) {
+ rv = ep->objectClass->newQObject(cp->idValues[lastPropertyIndex].data());
+ } else {
+ const QVariant &value = cp->propertyValues.at(lastPropertyIndex);
+ if (value.userType() == qMetaTypeId<QList<QObject*> >()) {
+ rv = ep->listClass->newList(QDeclarativeListProperty<QObject>(bindContext, (void*)lastPropertyIndex, 0, QDeclarativeContextPrivate::context_count, QDeclarativeContextPrivate::context_at), qMetaTypeId<QDeclarativeListProperty<QObject> >());
+ } else {
+ rv = ep->scriptValueFromVariant(value);
+ }
+ }
+
+ if (ep->captureProperties)
+ ep->capturedProperties << QDeclarativeEnginePrivate::CapturedProperty(bindContext, -1, lastPropertyIndex + cp->notifyIndex);
+
+
+ return Value(scriptEngine, rv);
+ } else if(lastDefaultObject != -1) {
+
+ // Default object property
+ return ep->objectClass->property(cp->defaultObjects.at(lastDefaultObject), name);
+
+ } else {
+
+ return Value(scriptEngine, lastFunction);
+
+ }
+}
+
+void QDeclarativeContextScriptClass::setProperty(Object *object, const Identifier &name,
+ const QScriptValue &value)
+{
+ Q_UNUSED(object);
+ Q_ASSERT(lastScopeObject || lastDefaultObject != -1);
+
+ QDeclarativeContext *bindContext = lastContext;
+ Q_ASSERT(bindContext);
+
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+ QDeclarativeContextPrivate *cp = QDeclarativeContextPrivate::get(bindContext);
+
+ if (lastScopeObject) {
+ ep->objectClass->setProperty(lastScopeObject, name, value, bindContext);
+ } else {
+ ep->objectClass->setProperty(cp->defaultObjects.at(lastDefaultObject), name, value,
+ bindContext);
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativecontextscriptclass_p.h b/src/declarative/qml/qdeclarativecontextscriptclass_p.h
new file mode 100644
index 0000000000..4b0dca0492
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecontextscriptclass_p.h
@@ -0,0 +1,102 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVECONTEXTSCRIPTCLASS_P_H
+#define QDECLARATIVECONTEXTSCRIPTCLASS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativetypenamecache_p.h"
+#include "qdeclarativescriptclass_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeEngine;
+class QDeclarativeContext;
+class QDeclarativeContextScriptClass : public QDeclarativeScriptClass
+{
+public:
+ QDeclarativeContextScriptClass(QDeclarativeEngine *);
+ ~QDeclarativeContextScriptClass();
+
+ QScriptValue newContext(QDeclarativeContext *, QObject * = 0);
+ QScriptValue newSharedContext();
+
+ QDeclarativeContext *contextFromValue(const QScriptValue &);
+ QObject *setOverrideObject(QScriptValue &, QObject *);
+
+protected:
+ virtual QScriptClass::QueryFlags queryProperty(Object *, const Identifier &,
+ QScriptClass::QueryFlags flags);
+ virtual ScriptValue property(Object *, const Identifier &);
+ virtual void setProperty(Object *, const Identifier &name, const QScriptValue &);
+
+private:
+ QScriptClass::QueryFlags queryProperty(QDeclarativeContext *, QObject *scopeObject,
+ const Identifier &,
+ QScriptClass::QueryFlags flags,
+ bool includeTypes);
+
+ QDeclarativeEngine *engine;
+
+ QObject *lastScopeObject;
+ QDeclarativeContext *lastContext;
+ QDeclarativeTypeNameCache::Data *lastData;
+ int lastPropertyIndex;
+ int lastDefaultObject;
+ QScriptValue lastFunction;
+
+ uint m_id;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVECONTEXTSCRIPTCLASS_P_H
+
diff --git a/src/declarative/qml/qdeclarativecustomparser.cpp b/src/declarative/qml/qdeclarativecustomparser.cpp
new file mode 100644
index 0000000000..67f096325a
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecustomparser.cpp
@@ -0,0 +1,263 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativecustomparser_p.h"
+#include "qdeclarativecustomparser_p_p.h"
+
+#include "qdeclarativeparser_p.h"
+
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QDeclarativeParser;
+
+/*!
+ \class QDeclarativeCustomParser
+ \brief The QDeclarativeCustomParser class allows you to add new arbitrary types to QML.
+ \internal
+
+ By subclassing QDeclarativeCustomParser, you can add a parser for
+ building a particular type.
+
+ The subclass must implement compile() and setCustomData(), and register
+ itself in the meta type system by calling the macro:
+
+ \code
+ QML_REGISTER_CUSTOM_TYPE(Module, MajorVersion, MinorVersion, Name, TypeClass, ParserClass)
+ \endcode
+*/
+
+/*
+ \fn QByteArray QDeclarativeCustomParser::compile(const QList<QDeclarativeCustomParserProperty> & properties)
+
+ The custom parser processes \a properties, and returns
+ a QByteArray containing data meaningful only to the
+ custom parser; the type engine will pass this same data to
+ setCustomData() when making an instance of the data.
+
+ Errors must be reported via the error() functions.
+
+ The QByteArray may be cached between executions of the system, so
+ it must contain correctly-serialized data (not, for example,
+ pointers to stack objects).
+*/
+
+/*
+ \fn void QDeclarativeCustomParser::setCustomData(QObject *object, const QByteArray &data)
+
+ This function sets \a object to have the properties defined
+ by \a data, which is a block of data previously returned by a call
+ to compile().
+
+ The \a object will be an instance of the TypeClass specified by QML_REGISTER_CUSTOM_TYPE.
+*/
+
+QDeclarativeCustomParserNode
+QDeclarativeCustomParserNodePrivate::fromObject(QDeclarativeParser::Object *root)
+{
+ QDeclarativeCustomParserNode rootNode;
+ rootNode.d->name = root->typeName;
+ rootNode.d->location = root->location.start;
+
+ for(QHash<QByteArray, Property *>::Iterator iter = root->properties.begin();
+ iter != root->properties.end();
+ ++iter) {
+
+ Property *p = *iter;
+
+ rootNode.d->properties << fromProperty(p);
+ }
+
+ return rootNode;
+}
+
+QDeclarativeCustomParserProperty
+QDeclarativeCustomParserNodePrivate::fromProperty(QDeclarativeParser::Property *p)
+{
+ QDeclarativeCustomParserProperty prop;
+ prop.d->name = p->name;
+ prop.d->isList = (p->values.count() > 1);
+ prop.d->location = p->location.start;
+
+ if (p->value) {
+ QDeclarativeCustomParserNode node = fromObject(p->value);
+ QList<QDeclarativeCustomParserProperty> props = node.properties();
+ for (int ii = 0; ii < props.count(); ++ii)
+ prop.d->values << QVariant::fromValue(props.at(ii));
+ } else {
+ for(int ii = 0; ii < p->values.count(); ++ii) {
+ Value *v = p->values.at(ii);
+ v->type = QDeclarativeParser::Value::Literal;
+
+ if(v->object) {
+ QDeclarativeCustomParserNode node = fromObject(v->object);
+ prop.d->values << QVariant::fromValue(node);
+ } else {
+ prop.d->values << QVariant::fromValue(v->value);
+ }
+
+ }
+ }
+
+ return prop;
+}
+
+QDeclarativeCustomParserNode::QDeclarativeCustomParserNode()
+: d(new QDeclarativeCustomParserNodePrivate)
+{
+}
+
+QDeclarativeCustomParserNode::QDeclarativeCustomParserNode(const QDeclarativeCustomParserNode &other)
+: d(new QDeclarativeCustomParserNodePrivate)
+{
+ *this = other;
+}
+
+QDeclarativeCustomParserNode &QDeclarativeCustomParserNode::operator=(const QDeclarativeCustomParserNode &other)
+{
+ d->name = other.d->name;
+ d->properties = other.d->properties;
+ d->location = other.d->location;
+ return *this;
+}
+
+QDeclarativeCustomParserNode::~QDeclarativeCustomParserNode()
+{
+ delete d; d = 0;
+}
+
+QByteArray QDeclarativeCustomParserNode::name() const
+{
+ return d->name;
+}
+
+QList<QDeclarativeCustomParserProperty> QDeclarativeCustomParserNode::properties() const
+{
+ return d->properties;
+}
+
+QDeclarativeParser::Location QDeclarativeCustomParserNode::location() const
+{
+ return d->location;
+}
+
+QDeclarativeCustomParserProperty::QDeclarativeCustomParserProperty()
+: d(new QDeclarativeCustomParserPropertyPrivate)
+{
+}
+
+QDeclarativeCustomParserProperty::QDeclarativeCustomParserProperty(const QDeclarativeCustomParserProperty &other)
+: d(new QDeclarativeCustomParserPropertyPrivate)
+{
+ *this = other;
+}
+
+QDeclarativeCustomParserProperty &QDeclarativeCustomParserProperty::operator=(const QDeclarativeCustomParserProperty &other)
+{
+ d->name = other.d->name;
+ d->isList = other.d->isList;
+ d->values = other.d->values;
+ d->location = other.d->location;
+ return *this;
+}
+
+QDeclarativeCustomParserProperty::~QDeclarativeCustomParserProperty()
+{
+ delete d; d = 0;
+}
+
+QByteArray QDeclarativeCustomParserProperty::name() const
+{
+ return d->name;
+}
+
+bool QDeclarativeCustomParserProperty::isList() const
+{
+ return d->isList;
+}
+
+QDeclarativeParser::Location QDeclarativeCustomParserProperty::location() const
+{
+ return d->location;
+}
+
+QList<QVariant> QDeclarativeCustomParserProperty::assignedValues() const
+{
+ return d->values;
+}
+
+void QDeclarativeCustomParser::clearErrors()
+{
+ exceptions.clear();
+}
+
+/*!
+ Reports an error in parsing \a prop, with the given \a description.
+
+ An error is generated referring to the position of \a node in the source file.
+*/
+void QDeclarativeCustomParser::error(const QDeclarativeCustomParserProperty& prop, const QString& description)
+{
+ QDeclarativeError error;
+ QString exceptionDescription;
+ error.setLine(prop.location().line);
+ error.setColumn(prop.location().column);
+ error.setDescription(description);
+ exceptions << error;
+}
+
+/*!
+ Reports an error in parsing \a node, with the given \a description.
+
+ An error is generated referring to the position of \a node in the source file.
+*/
+void QDeclarativeCustomParser::error(const QDeclarativeCustomParserNode& node, const QString& description)
+{
+ QDeclarativeError error;
+ QString exceptionDescription;
+ error.setLine(node.location().line);
+ error.setColumn(node.location().column);
+ error.setDescription(description);
+ exceptions << error;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativecustomparser_p.h b/src/declarative/qml/qdeclarativecustomparser_p.h
new file mode 100644
index 0000000000..99587a8f7e
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecustomparser_p.h
@@ -0,0 +1,142 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVECUSTOMPARSER_H
+#define QDECLARATIVECUSTOMPARSER_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativemetatype_p.h"
+#include "qdeclarativeerror.h"
+#include "qdeclarativeparser_p.h"
+
+#include <QtCore/qbytearray.h>
+#include <QtCore/qxmlstream.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeCustomParserPropertyPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeCustomParserProperty
+{
+public:
+ QDeclarativeCustomParserProperty();
+ QDeclarativeCustomParserProperty(const QDeclarativeCustomParserProperty &);
+ QDeclarativeCustomParserProperty &operator=(const QDeclarativeCustomParserProperty &);
+ ~QDeclarativeCustomParserProperty();
+
+ QByteArray name() const;
+ QDeclarativeParser::Location location() const;
+
+ bool isList() const;
+ // Will be one of QDeclarativeParser::Variant, QDeclarativeCustomParserProperty or
+ // QDeclarativeCustomParserNode
+ QList<QVariant> assignedValues() const;
+
+private:
+ friend class QDeclarativeCustomParserNodePrivate;
+ friend class QDeclarativeCustomParserPropertyPrivate;
+ QDeclarativeCustomParserPropertyPrivate *d;
+};
+
+class QDeclarativeCustomParserNodePrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeCustomParserNode
+{
+public:
+ QDeclarativeCustomParserNode();
+ QDeclarativeCustomParserNode(const QDeclarativeCustomParserNode &);
+ QDeclarativeCustomParserNode &operator=(const QDeclarativeCustomParserNode &);
+ ~QDeclarativeCustomParserNode();
+
+ QByteArray name() const;
+ QDeclarativeParser::Location location() const;
+
+ QList<QDeclarativeCustomParserProperty> properties() const;
+
+private:
+ friend class QDeclarativeCustomParserNodePrivate;
+ QDeclarativeCustomParserNodePrivate *d;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeCustomParser
+{
+public:
+ virtual ~QDeclarativeCustomParser() {}
+
+ void clearErrors();
+
+ virtual QByteArray compile(const QList<QDeclarativeCustomParserProperty> &)=0;
+ virtual void setCustomData(QObject *, const QByteArray &)=0;
+
+ QList<QDeclarativeError> errors() const { return exceptions; }
+
+protected:
+ void error(const QDeclarativeCustomParserProperty&, const QString& description);
+ void error(const QDeclarativeCustomParserNode&, const QString& description);
+
+private:
+ QList<QDeclarativeError> exceptions;
+};
+
+#define QML_REGISTER_CUSTOM_TYPE(URI, VERSION_MAJ, VERSION_MIN, NAME, TYPE, CUSTOMTYPE) \
+ qmlRegisterCustomType<TYPE>(#URI, VERSION_MAJ, VERSION_MIN, #NAME, #TYPE, new CUSTOMTYPE)
+
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QDeclarativeCustomParserProperty)
+Q_DECLARE_METATYPE(QDeclarativeCustomParserNode)
+
+QT_END_HEADER
+
+#endif
diff --git a/src/declarative/qml/qdeclarativecustomparser_p_p.h b/src/declarative/qml/qdeclarativecustomparser_p_p.h
new file mode 100644
index 0000000000..b580db6af0
--- /dev/null
+++ b/src/declarative/qml/qdeclarativecustomparser_p_p.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVECUSTOMPARSER_P_H
+#define QDECLARATIVECUSTOMPARSER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativecustomparser_p.h"
+
+#include "qdeclarativeparser_p.h"
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeCustomParserNodePrivate
+{
+public:
+ QByteArray name;
+ QList<QDeclarativeCustomParserProperty> properties;
+ QDeclarativeParser::Location location;
+
+ static QDeclarativeCustomParserNode fromObject(QDeclarativeParser::Object *);
+ static QDeclarativeCustomParserProperty fromProperty(QDeclarativeParser::Property *);
+};
+
+class QDeclarativeCustomParserPropertyPrivate
+{
+public:
+ QDeclarativeCustomParserPropertyPrivate()
+ : isList(false) {}
+
+ QByteArray name;
+ bool isList;
+ QDeclarativeParser::Location location;
+ QList<QVariant> values;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVECUSTOMPARSER_P_H
diff --git a/src/declarative/qml/qdeclarativedeclarativedata_p.h b/src/declarative/qml/qdeclarativedeclarativedata_p.h
new file mode 100644
index 0000000000..ae40130deb
--- /dev/null
+++ b/src/declarative/qml/qdeclarativedeclarativedata_p.h
@@ -0,0 +1,146 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEDECLARATIVEDATA_P_H
+#define QDECLARATIVEDECLARATIVEDATA_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtScript/qscriptvalue.h>
+#include <private/qobject_p.h>
+#include "qdeclarativeguard_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeCompiledData;
+class QDeclarativeAbstractBinding;
+class QDeclarativeContext;
+class QDeclarativePropertyCache;
+class Q_AUTOTEST_EXPORT QDeclarativeDeclarativeData : public QDeclarativeData
+{
+public:
+ QDeclarativeDeclarativeData(QDeclarativeContext *ctxt = 0)
+ : context(ctxt), bindings(0), nextContextObject(0), prevContextObject(0),
+ bindingBitsSize(0), bindingBits(0), outerContext(0), lineNumber(0),
+ columnNumber(0), deferredComponent(0), deferredIdx(0), attachedProperties(0),
+ propertyCache(0), guards(0) {}
+
+ virtual void destroyed(QObject *);
+
+ QDeclarativeContext *context;
+ QDeclarativeAbstractBinding *bindings;
+
+ // Linked list for QDeclarativeContext::contextObjects
+ QDeclarativeDeclarativeData *nextContextObject;
+ QDeclarativeDeclarativeData**prevContextObject;
+
+ int bindingBitsSize;
+ quint32 *bindingBits;
+ bool hasBindingBit(int) const;
+ void clearBindingBit(int);
+ void setBindingBit(QObject *obj, int);
+
+ QDeclarativeContext *outerContext; // Can't this be found from context?
+ ushort lineNumber;
+ ushort columnNumber;
+
+ QDeclarativeCompiledData *deferredComponent; // Can't this be found from the context?
+ unsigned int deferredIdx;
+
+ QHash<int, QObject *> *attachedProperties;
+
+ QScriptValue scriptValue;
+ QDeclarativePropertyCache *propertyCache;
+
+ QDeclarativeGuard<QObject> *guards;
+
+ static QDeclarativeDeclarativeData *get(const QObject *object, bool create = false) {
+ QObjectPrivate *priv = QObjectPrivate::get(const_cast<QObject *>(object));
+ if (priv->wasDeleted) {
+ Q_ASSERT(!create);
+ return 0;
+ } else if (priv->declarativeData) {
+ return static_cast<QDeclarativeDeclarativeData *>(priv->declarativeData);
+ } else if (create) {
+ priv->declarativeData = new QDeclarativeDeclarativeData;
+ return static_cast<QDeclarativeDeclarativeData *>(priv->declarativeData);
+ } else {
+ return 0;
+ }
+ }
+};
+
+template<class T>
+void QDeclarativeGuard<T>::addGuard()
+{
+ if (QObjectPrivate::get(o)->wasDeleted) {
+ if (prev) remGuard();
+ return;
+ }
+
+ QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(o, true);
+ next = data->guards;
+ if (next) reinterpret_cast<QDeclarativeGuard<T> *>(next)->prev = &next;
+ data->guards = reinterpret_cast<QDeclarativeGuard<QObject> *>(this);
+ prev = &data->guards;
+}
+
+template<class T>
+void QDeclarativeGuard<T>::remGuard()
+{
+ if (next) reinterpret_cast<QDeclarativeGuard<T> *>(next)->prev = prev;
+ *prev = next;
+ next = 0;
+ prev = 0;
+}
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEDECLARATIVEDATA_P_H
diff --git a/src/declarative/qml/qdeclarativedirparser.cpp b/src/declarative/qml/qdeclarativedirparser.cpp
new file mode 100644
index 0000000000..e730b920a6
--- /dev/null
+++ b/src/declarative/qml/qdeclarativedirparser.cpp
@@ -0,0 +1,220 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativedirparser_p.h"
+#include "qdeclarativeerror.h"
+
+#include <QtCore/QTextStream>
+#include <QtCore/QtDebug>
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeDirParser::QDeclarativeDirParser()
+ : _isParsed(false)
+{
+}
+
+QDeclarativeDirParser::~QDeclarativeDirParser()
+{
+}
+
+QUrl QDeclarativeDirParser::url() const
+{
+ return _url;
+}
+
+void QDeclarativeDirParser::setUrl(const QUrl &url)
+{
+ _url = url;
+}
+
+QString QDeclarativeDirParser::source() const
+{
+ return _source;
+}
+
+void QDeclarativeDirParser::setSource(const QString &source)
+{
+ _isParsed = false;
+ _source = source;
+}
+
+bool QDeclarativeDirParser::isParsed() const
+{
+ return _isParsed;
+}
+
+bool QDeclarativeDirParser::parse()
+{
+ if (_isParsed)
+ return true;
+
+ _isParsed = true;
+ _errors.clear();
+ _plugins.clear();
+ _components.clear();
+
+ QTextStream stream(&_source);
+ int lineNumber = 0;
+
+ forever {
+ ++lineNumber;
+
+ const QString line = stream.readLine();
+ if (line.isNull())
+ break;
+
+ QString sections[3];
+ int sectionCount = 0;
+
+ int index = 0;
+ const int length = line.length();
+
+ while (index != length) {
+ const QChar ch = line.at(index);
+
+ if (ch.isSpace()) {
+ do { ++index; }
+ while (index != length && line.at(index).isSpace());
+
+ } else if (ch == QLatin1Char('#')) {
+ // recognized a comment
+ break;
+
+ } else {
+ const int start = index;
+
+ do { ++index; }
+ while (index != length && !line.at(index).isSpace());
+
+ const QString lexeme = line.mid(start, index - start);
+
+ if (sectionCount >= 3) {
+ reportError(lineNumber, start, QLatin1String("unexpected token"));
+
+ } else {
+ sections[sectionCount++] = lexeme;
+ }
+ }
+ }
+
+ if (sectionCount == 0) {
+ continue; // no sections, no party.
+
+ } else if (sections[0] == QLatin1String("plugin")) {
+ if (sectionCount < 2) {
+ reportError(lineNumber, -1,
+ QString::fromUtf8("plugin directive requires 2 arguments, but %1 were provided").arg(sectionCount + 1));
+
+ continue;
+ }
+
+ const Plugin entry(sections[1], sections[2]);
+
+ _plugins.append(entry);
+
+ } else if (sectionCount == 3) {
+ const QString &version = sections[1];
+ const int dotIndex = version.indexOf(QLatin1Char('.'));
+
+ if (dotIndex == -1) {
+ qWarning() << "expected '.'"; // ### use reportError
+
+ } else if (version.indexOf(QLatin1Char('.'), dotIndex + 1) != -1) {
+ qWarning() << "unexpected '.'"; // ### use reportError
+
+ } else {
+ bool validVersionNumber = false;
+ const int majorVersion = version.left(dotIndex).toInt(&validVersionNumber);
+
+ if (validVersionNumber) {
+ const int minorVersion = version.mid(dotIndex + 1).toInt(&validVersionNumber);
+
+ if (validVersionNumber) {
+ const Component entry(sections[0], sections[2], majorVersion, minorVersion);
+
+ _components.append(entry);
+ }
+ }
+ }
+ } else {
+ // ### use reportError
+ qWarning() << "a component declaration requires 3 arguments, but" << (sectionCount + 1) << "were provided";
+ }
+ }
+
+ return hasError();
+}
+
+void QDeclarativeDirParser::reportError(int line, int column, const QString &description)
+{
+ QDeclarativeError error;
+ error.setUrl(_url);
+ error.setLine(line);
+ error.setColumn(column);
+ error.setDescription(description);
+ _errors.append(error);
+}
+
+bool QDeclarativeDirParser::hasError() const
+{
+ if (! _errors.isEmpty())
+ return true;
+
+ return false;
+}
+
+QList<QDeclarativeError> QDeclarativeDirParser::errors() const
+{
+ return _errors;
+}
+
+QList<QDeclarativeDirParser::Plugin> QDeclarativeDirParser::plugins() const
+{
+ return _plugins;
+}
+
+QList<QDeclarativeDirParser::Component> QDeclarativeDirParser::components() const
+{
+ return _components;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativedirparser_p.h b/src/declarative/qml/qdeclarativedirparser_p.h
new file mode 100644
index 0000000000..5df711700e
--- /dev/null
+++ b/src/declarative/qml/qdeclarativedirparser_p.h
@@ -0,0 +1,125 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEDIRPARSER_P_H
+#define QDECLARATIVEDIRPARSER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/QUrl>
+#include <QtCore/QHash>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeError;
+
+class QDeclarativeDirParser
+{
+ Q_DISABLE_COPY(QDeclarativeDirParser)
+
+public:
+ QDeclarativeDirParser();
+ ~QDeclarativeDirParser();
+
+ QUrl url() const;
+ void setUrl(const QUrl &url);
+
+ QString source() const;
+ void setSource(const QString &source);
+
+ bool isParsed() const;
+ bool parse();
+
+ bool hasError() const;
+ QList<QDeclarativeError> errors() const;
+
+ struct Plugin
+ {
+ Plugin() {}
+
+ Plugin(const QString &name, const QString &path)
+ : name(name), path(path) {}
+
+ QString name;
+ QString path;
+ };
+
+ struct Component
+ {
+ Component()
+ : majorVersion(0), minorVersion(0) {}
+
+ Component(const QString &typeName, const QString &fileName, int majorVersion, int minorVersion)
+ : typeName(typeName), fileName(fileName), majorVersion(majorVersion), minorVersion(minorVersion) {}
+
+ QString typeName;
+ QString fileName;
+ int majorVersion;
+ int minorVersion;
+ };
+
+ QList<Component> components() const;
+ QList<Plugin> plugins() const;
+
+private:
+ void reportError(int line, int column, const QString &message);
+
+private:
+ QList<QDeclarativeError> _errors;
+ QUrl _url;
+ QString _source;
+ QList<Component> _components;
+ QList<Plugin> _plugins;
+ unsigned _isParsed: 1;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEDIRPARSER_P_H
diff --git a/src/declarative/qml/qdeclarativedom.cpp b/src/declarative/qml/qdeclarativedom.cpp
new file mode 100644
index 0000000000..cb56ead43f
--- /dev/null
+++ b/src/declarative/qml/qdeclarativedom.cpp
@@ -0,0 +1,1846 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativedom_p.h"
+#include "qdeclarativedom_p_p.h"
+
+#include "qdeclarativecompositetypedata_p.h"
+#include "qdeclarativecompiler_p.h"
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativescriptparser_p.h"
+#include "qdeclarativeglobal_p.h"
+
+#include <QtCore/QByteArray>
+#include <QtCore/QDebug>
+#include <QtCore/QString>
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeDomDocumentPrivate::QDeclarativeDomDocumentPrivate()
+: root(0)
+{
+}
+
+QDeclarativeDomDocumentPrivate::~QDeclarativeDomDocumentPrivate()
+{
+ if (root) root->release();
+}
+
+/*!
+ \class QDeclarativeDomDocument
+ \internal
+ \brief The QDeclarativeDomDocument class represents the root of a QML document
+
+ A QML document is a self-contained snippet of QML, usually contained in a
+ single file. Each document has a root object, accessible through
+ QDeclarativeDomDocument::rootObject().
+
+ The QDeclarativeDomDocument class allows the programmer to inspect a QML document by
+ calling QDeclarativeDomDocument::load().
+
+ The following example loads a QML file from disk, and prints out its root
+ object type and the properties assigned in the root object.
+ \code
+ QFile file(inputFileName);
+ file.open(QIODevice::ReadOnly);
+ QByteArray xmlData = file.readAll();
+
+ QDeclarativeDomDocument document;
+ document.load(qmlengine, xmlData);
+
+ QDeclarativeDomObject rootObject = document.rootObject();
+ qDebug() << rootObject.objectType();
+ foreach(QDeclarativeDomProperty property, rootObject.properties())
+ qDebug() << property.propertyName();
+ \endcode
+*/
+
+/*!
+ Construct an empty QDeclarativeDomDocument.
+*/
+QDeclarativeDomDocument::QDeclarativeDomDocument()
+: d(new QDeclarativeDomDocumentPrivate)
+{
+}
+
+/*!
+ Create a copy of \a other QDeclarativeDomDocument.
+*/
+QDeclarativeDomDocument::QDeclarativeDomDocument(const QDeclarativeDomDocument &other)
+: d(other.d)
+{
+}
+
+/*!
+ Destroy the QDeclarativeDomDocument
+*/
+QDeclarativeDomDocument::~QDeclarativeDomDocument()
+{
+}
+
+/*!
+ Assign \a other to this QDeclarativeDomDocument.
+*/
+QDeclarativeDomDocument &QDeclarativeDomDocument::operator=(const QDeclarativeDomDocument &other)
+{
+ d = other.d;
+ return *this;
+}
+
+/*!
+ Returns all import statements in qml.
+*/
+QList<QDeclarativeDomImport> QDeclarativeDomDocument::imports() const
+{
+ return d->imports;
+}
+
+/*!
+ Loads a QDeclarativeDomDocument from \a data. \a data should be valid QML
+ data. On success, true is returned. If the \a data is malformed, false
+ is returned and QDeclarativeDomDocument::errors() contains an error description.
+
+ \sa QDeclarativeDomDocument::loadError()
+*/
+bool QDeclarativeDomDocument::load(QDeclarativeEngine *engine, const QByteArray &data, const QUrl &url)
+{
+ d->errors.clear();
+ d->imports.clear();
+
+ QDeclarativeCompiledData *component = new QDeclarativeCompiledData(engine);
+ QDeclarativeCompiler compiler;
+
+ QDeclarativeCompositeTypeData *td = ((QDeclarativeEnginePrivate *)QDeclarativeEnginePrivate::get(engine))->typeManager.getImmediate(data, url);
+
+ if(td->status == QDeclarativeCompositeTypeData::Error) {
+ d->errors = td->errors;
+ td->release();
+ component->release();
+ return false;
+ } else if(td->status == QDeclarativeCompositeTypeData::Waiting ||
+ td->status == QDeclarativeCompositeTypeData::WaitingResources) {
+ QDeclarativeError error;
+ error.setDescription(QLatin1String("QDeclarativeDomDocument supports local types only"));
+ d->errors << error;
+ td->release();
+ component->release();
+ return false;
+ }
+
+ compiler.compile(engine, td, component);
+
+ if (compiler.isError()) {
+ d->errors = compiler.errors();
+ td->release();
+ component->release();
+ return false;
+ }
+
+ for (int i = 0; i < td->data.imports().size(); ++i) {
+ QDeclarativeScriptParser::Import parserImport = td->data.imports().at(i);
+ QDeclarativeDomImport domImport;
+ domImport.d->type = static_cast<QDeclarativeDomImportPrivate::Type>(parserImport.type);
+ domImport.d->uri = parserImport.uri;
+ domImport.d->qualifier = parserImport.qualifier;
+ domImport.d->version = parserImport.version;
+ d->imports += domImport;
+ }
+
+ if (td->data.tree()) {
+ d->root = td->data.tree();
+ d->root->addref();
+ }
+
+ component->release();
+ return true;
+}
+
+/*!
+ Returns the last load errors. The load errors will be reset after a
+ successful call to load().
+
+ \sa load()
+*/
+QList<QDeclarativeError> QDeclarativeDomDocument::errors() const
+{
+ return d->errors;
+}
+
+/*!
+ Returns the document's root object, or an invalid QDeclarativeDomObject if the
+ document has no root.
+
+ In the sample QML below, the root object will be the QDeclarativeItem type.
+ \qml
+Item {
+ Text {
+ text: "Hello World"
+ }
+}
+ \endqml
+*/
+QDeclarativeDomObject QDeclarativeDomDocument::rootObject() const
+{
+ QDeclarativeDomObject rv;
+ rv.d->object = d->root;
+ if (rv.d->object) rv.d->object->addref();
+ return rv;
+}
+
+QDeclarativeDomPropertyPrivate::QDeclarativeDomPropertyPrivate()
+: property(0)
+{
+}
+
+QDeclarativeDomPropertyPrivate::~QDeclarativeDomPropertyPrivate()
+{
+ if (property) property->release();
+}
+
+QDeclarativeDomDynamicPropertyPrivate::QDeclarativeDomDynamicPropertyPrivate():
+ valid(false)
+{
+}
+
+QDeclarativeDomDynamicPropertyPrivate::~QDeclarativeDomDynamicPropertyPrivate()
+{
+ if (valid && property.defaultValue) property.defaultValue->release();
+}
+
+/*!
+ \class QDeclarativeDomProperty
+ \internal
+ \brief The QDeclarativeDomProperty class represents one property assignment in the
+ QML DOM tree
+
+ Properties in QML can be assigned QML \l {QDeclarativeDomValue}{values}.
+
+ \sa QDeclarativeDomObject
+*/
+
+/*!
+ Construct an invalid QDeclarativeDomProperty.
+*/
+QDeclarativeDomProperty::QDeclarativeDomProperty()
+: d(new QDeclarativeDomPropertyPrivate)
+{
+}
+
+/*!
+ Create a copy of \a other QDeclarativeDomProperty.
+*/
+QDeclarativeDomProperty::QDeclarativeDomProperty(const QDeclarativeDomProperty &other)
+: d(other.d)
+{
+}
+
+/*!
+ Destroy the QDeclarativeDomProperty.
+*/
+QDeclarativeDomProperty::~QDeclarativeDomProperty()
+{
+}
+
+/*!
+ Assign \a other to this QDeclarativeDomProperty.
+*/
+QDeclarativeDomProperty &QDeclarativeDomProperty::operator=(const QDeclarativeDomProperty &other)
+{
+ d = other.d;
+ return *this;
+}
+
+/*!
+ Returns true if this is a valid QDeclarativeDomProperty, false otherwise.
+*/
+bool QDeclarativeDomProperty::isValid() const
+{
+ return d->property != 0;
+}
+
+
+/*!
+ Return the name of this property.
+
+ \qml
+Text {
+ x: 10
+ y: 10
+ font.bold: true
+}
+ \endqml
+
+ As illustrated above, a property name can be a simple string, such as "x" or
+ "y", or a more complex "dot property", such as "font.bold". In both cases
+ the full name is returned ("x", "y" and "font.bold") by this method.
+
+ For dot properties, a split version of the name can be accessed by calling
+ QDeclarativeDomProperty::propertyNameParts().
+
+ \sa QDeclarativeDomProperty::propertyNameParts()
+*/
+QByteArray QDeclarativeDomProperty::propertyName() const
+{
+ return d->propertyName;
+}
+
+/*!
+ Return the name of this property, split into multiple parts in the case
+ of dot properties.
+
+ \qml
+Text {
+ x: 10
+ y: 10
+ font.bold: true
+}
+ \endqml
+
+ For each of the properties shown above, this method would return ("x"),
+ ("y") and ("font", "bold").
+
+ \sa QDeclarativeDomProperty::propertyName()
+*/
+QList<QByteArray> QDeclarativeDomProperty::propertyNameParts() const
+{
+ if (d->propertyName.isEmpty()) return QList<QByteArray>();
+ else return d->propertyName.split('.');
+}
+
+/*!
+ Return true if this property is used as a default property in the QML
+ document.
+
+ \qml
+<Text text="hello"/>
+<Text>hello</Text>
+ \endqml
+
+ The above two examples return the same DOM tree, except that the second has
+ the default property flag set on the text property. Observe that whether
+ or not a property has isDefaultProperty set is determined by how the
+ property is used, and not only by whether the property is the types default
+ property.
+*/
+bool QDeclarativeDomProperty::isDefaultProperty() const
+{
+ return d->property && d->property->isDefault;
+}
+
+/*!
+ Returns the QDeclarativeDomValue that is assigned to this property, or an invalid
+ QDeclarativeDomValue if no value is assigned.
+*/
+QDeclarativeDomValue QDeclarativeDomProperty::value() const
+{
+ QDeclarativeDomValue rv;
+ if (d->property) {
+ rv.d->property = d->property;
+ if (d->property->values.count())
+ rv.d->value = d->property->values.at(0);
+ else
+ rv.d->value = d->property->onValues.at(0);
+ rv.d->property->addref();
+ rv.d->value->addref();
+ }
+ return rv;
+}
+
+/*!
+ Returns the position in the input data where the property ID startd, or -1 if
+ the property is invalid.
+*/
+int QDeclarativeDomProperty::position() const
+{
+ if (d && d->property) {
+ return d->property->location.range.offset;
+ } else
+ return -1;
+}
+
+/*!
+ Returns the length in the input data from where the property ID started upto
+ the end of it, or -1 if the property is invalid.
+*/
+int QDeclarativeDomProperty::length() const
+{
+ if (d && d->property)
+ return d->property->location.range.length;
+ else
+ return -1;
+}
+
+/*!
+ Construct an invalid QDeclarativeDomDynamicProperty.
+*/
+QDeclarativeDomDynamicProperty::QDeclarativeDomDynamicProperty():
+ d(new QDeclarativeDomDynamicPropertyPrivate)
+{
+}
+
+/*!
+ Create a copy of \a other QDeclarativeDomDynamicProperty.
+*/
+QDeclarativeDomDynamicProperty::QDeclarativeDomDynamicProperty(const QDeclarativeDomDynamicProperty &other):
+ d(other.d)
+{
+}
+
+/*!
+ Destroy the QDeclarativeDomDynamicProperty.
+*/
+QDeclarativeDomDynamicProperty::~QDeclarativeDomDynamicProperty()
+{
+}
+
+/*!
+ Assign \a other to this QDeclarativeDomDynamicProperty.
+*/
+QDeclarativeDomDynamicProperty &QDeclarativeDomDynamicProperty::operator=(const QDeclarativeDomDynamicProperty &other)
+{
+ d = other.d;
+ return *this;
+}
+
+bool QDeclarativeDomDynamicProperty::isValid() const
+{
+ return d && d->valid;
+}
+
+/*!
+ Return the name of this dynamic property.
+
+ \qml
+Item {
+ property int count: 10;
+}
+ \endqml
+
+ As illustrated above, a dynamic property name can have a name and a
+ default value ("10").
+*/
+QByteArray QDeclarativeDomDynamicProperty::propertyName() const
+{
+ if (isValid())
+ return d->property.name;
+ else
+ return QByteArray();
+}
+
+/*!
+ Returns the type of the dynamic property. Note that when the property is an
+ alias property, this will return -1. Use QDeclarativeDomProperty::isAlias() to check
+ if the property is an alias.
+*/
+int QDeclarativeDomDynamicProperty::propertyType() const
+{
+ if (isValid()) {
+ switch (d->property.type) {
+ case QDeclarativeParser::Object::DynamicProperty::Bool:
+ return QMetaType::type("bool");
+
+ case QDeclarativeParser::Object::DynamicProperty::Color:
+ return QMetaType::type("QColor");
+
+ case QDeclarativeParser::Object::DynamicProperty::Date:
+ return QMetaType::type("QDate");
+
+ case QDeclarativeParser::Object::DynamicProperty::Int:
+ return QMetaType::type("int");
+
+ case QDeclarativeParser::Object::DynamicProperty::Real:
+ return QMetaType::type("double");
+
+ case QDeclarativeParser::Object::DynamicProperty::String:
+ return QMetaType::type("QString");
+
+ case QDeclarativeParser::Object::DynamicProperty::Url:
+ return QMetaType::type("QUrl");
+
+ case QDeclarativeParser::Object::DynamicProperty::Variant:
+ return QMetaType::type("QVariant");
+
+ default:
+ break;
+ }
+ }
+
+ return -1;
+}
+
+QByteArray QDeclarativeDomDynamicProperty::propertyTypeName() const
+{
+ if (isValid())
+ return d->property.customType;
+
+ return QByteArray();
+}
+
+/*!
+ Return true if this property is used as a default property in the QML
+ document.
+
+ \qml
+<Text text="hello"/>
+<Text>hello</Text>
+ \endqml
+
+ The above two examples return the same DOM tree, except that the second has
+ the default property flag set on the text property. Observe that whether
+ or not a property has isDefaultProperty set is determined by how the
+ property is used, and not only by whether the property is the types default
+ property.
+*/
+bool QDeclarativeDomDynamicProperty::isDefaultProperty() const
+{
+ if (isValid())
+ return d->property.isDefaultProperty;
+ else
+ return false;
+}
+
+/*!
+ Returns the default value as a QDeclarativeDomProperty.
+*/
+QDeclarativeDomProperty QDeclarativeDomDynamicProperty::defaultValue() const
+{
+ QDeclarativeDomProperty rp;
+
+ if (isValid() && d->property.defaultValue) {
+ rp.d->property = d->property.defaultValue;
+ rp.d->propertyName = propertyName();
+ rp.d->property->addref();
+ }
+
+ return rp;
+}
+
+/*!
+ Returns true if this dynamic property is an alias for another property,
+ false otherwise.
+*/
+bool QDeclarativeDomDynamicProperty::isAlias() const
+{
+ if (isValid())
+ return d->property.type == QDeclarativeParser::Object::DynamicProperty::Alias;
+ else
+ return false;
+}
+
+/*!
+ Returns the position in the input data where the property ID startd, or 0 if
+ the property is invalid.
+*/
+int QDeclarativeDomDynamicProperty::position() const
+{
+ if (isValid()) {
+ return d->property.location.range.offset;
+ } else
+ return -1;
+}
+
+/*!
+ Returns the length in the input data from where the property ID started upto
+ the end of it, or 0 if the property is invalid.
+*/
+int QDeclarativeDomDynamicProperty::length() const
+{
+ if (isValid())
+ return d->property.location.range.length;
+ else
+ return -1;
+}
+
+QDeclarativeDomObjectPrivate::QDeclarativeDomObjectPrivate()
+: object(0)
+{
+}
+
+QDeclarativeDomObjectPrivate::~QDeclarativeDomObjectPrivate()
+{
+ if (object) object->release();
+}
+
+QDeclarativeDomObjectPrivate::Properties
+QDeclarativeDomObjectPrivate::properties() const
+{
+ Properties rv;
+
+ for (QHash<QByteArray, QDeclarativeParser::Property *>::ConstIterator iter =
+ object->properties.begin();
+ iter != object->properties.end();
+ ++iter) {
+
+ rv << properties(*iter);
+
+ }
+ return rv;
+}
+
+QDeclarativeDomObjectPrivate::Properties
+QDeclarativeDomObjectPrivate::properties(QDeclarativeParser::Property *property) const
+{
+ Properties rv;
+
+ if (property->value) {
+
+ for (QHash<QByteArray, QDeclarativeParser::Property *>::ConstIterator iter =
+ property->value->properties.begin();
+ iter != property->value->properties.end();
+ ++iter) {
+
+ rv << properties(*iter);
+
+ }
+
+ QByteArray name(property->name + '.');
+ for (Properties::Iterator iter = rv.begin(); iter != rv.end(); ++iter)
+ iter->second.prepend(name);
+
+ } else {
+ rv << qMakePair(property, property->name);
+ }
+
+ return rv;
+}
+
+/*!
+ \class QDeclarativeDomObject
+ \internal
+ \brief The QDeclarativeDomObject class represents an object instantiation.
+
+ Each object instantiated in a QML file has a corresponding QDeclarativeDomObject
+ node in the QML DOM.
+
+ In addition to the type information that determines the object to
+ instantiate, QDeclarativeDomObject's also have a set of associated QDeclarativeDomProperty's.
+ Each QDeclarativeDomProperty represents a QML property assignment on the instantiated
+ object. For example,
+
+ \qml
+QGraphicsWidget {
+ opacity: 0.5
+ size: "100x100"
+}
+ \endqml
+
+ describes a single QDeclarativeDomObject - "QGraphicsWidget" - with two properties,
+ "opacity" and "size". Obviously QGraphicsWidget has many more properties than just
+ these two, but the QML DOM representation only contains those assigned
+ values (or bindings) in the QML file.
+*/
+
+/*!
+ Construct an invalid QDeclarativeDomObject.
+*/
+QDeclarativeDomObject::QDeclarativeDomObject()
+: d(new QDeclarativeDomObjectPrivate)
+{
+}
+
+/*!
+ Create a copy of \a other QDeclarativeDomObject.
+*/
+QDeclarativeDomObject::QDeclarativeDomObject(const QDeclarativeDomObject &other)
+: d(other.d)
+{
+}
+
+/*!
+ Destroy the QDeclarativeDomObject.
+*/
+QDeclarativeDomObject::~QDeclarativeDomObject()
+{
+}
+
+/*!
+ Assign \a other to this QDeclarativeDomObject.
+*/
+QDeclarativeDomObject &QDeclarativeDomObject::operator=(const QDeclarativeDomObject &other)
+{
+ d = other.d;
+ return *this;
+}
+
+/*!
+ Returns true if this is a valid QDeclarativeDomObject, false otherwise.
+*/
+bool QDeclarativeDomObject::isValid() const
+{
+ return d->object != 0;
+}
+
+/*!
+ Returns the fully-qualified type name of this object.
+
+ For example, the type of this object would be "Qt/4.6/Rectangle".
+ \qml
+Rectangle { }
+ \endqml
+*/
+QByteArray QDeclarativeDomObject::objectType() const
+{
+ if (d->object) return d->object->typeName;
+ else return QByteArray();
+}
+
+/*!
+ Returns the type name as referenced in the qml file.
+
+ For example, the type of this object would be "Rectangle".
+ \qml
+Rectangle { }
+ \endqml
+*/
+QByteArray QDeclarativeDomObject::objectClassName() const
+{
+ if (d->object)
+ return d->object->className;
+ else
+ return QByteArray();
+}
+
+int QDeclarativeDomObject::objectTypeMajorVersion() const
+{
+ if (d->object)
+ return d->object->majorVersion;
+ else
+ return -1;
+}
+
+int QDeclarativeDomObject::objectTypeMinorVersion() const
+{
+ if (d->object)
+ return d->object->minorVersion;
+ else
+ return -1;
+}
+
+/*!
+ Returns the QML id assigned to this object, or an empty QByteArray if no id
+ has been assigned.
+
+ For example, the object id of this object would be "MyText".
+ \qml
+Text { id: myText }
+ \endqml
+*/
+QString QDeclarativeDomObject::objectId() const
+{
+ if (d->object) {
+ return d->object->id;
+ } else {
+ return QString();
+ }
+}
+
+/*!
+ Returns the list of assigned properties on this object.
+
+ In the following example, "text" and "x" properties would be returned.
+ \qml
+Text {
+ text: "Hello world!"
+ x: 100
+}
+ \endqml
+*/
+QList<QDeclarativeDomProperty> QDeclarativeDomObject::properties() const
+{
+ QList<QDeclarativeDomProperty> rv;
+
+ if (!d->object || isComponent())
+ return rv;
+
+ QDeclarativeDomObjectPrivate::Properties properties = d->properties();
+ for (int ii = 0; ii < properties.count(); ++ii) {
+
+ QDeclarativeDomProperty domProperty;
+ domProperty.d->property = properties.at(ii).first;
+ domProperty.d->property->addref();
+ domProperty.d->propertyName = properties.at(ii).second;
+ rv << domProperty;
+
+ }
+
+ if (d->object->defaultProperty) {
+ QDeclarativeDomProperty domProperty;
+ domProperty.d->property = d->object->defaultProperty;
+ domProperty.d->property->addref();
+ domProperty.d->propertyName = d->object->defaultProperty->name;
+ rv << domProperty;
+ }
+
+ return rv;
+}
+
+/*!
+ Returns the object's \a name property if a value has been assigned to
+ it, or an invalid QDeclarativeDomProperty otherwise.
+
+ In the example below, \c {object.property("source")} would return a valid
+ QDeclarativeDomProperty, and \c {object.property("tile")} an invalid QDeclarativeDomProperty.
+
+ \qml
+Image { source: "sample.jpg" }
+ \endqml
+*/
+QDeclarativeDomProperty QDeclarativeDomObject::property(const QByteArray &name) const
+{
+ QList<QDeclarativeDomProperty> props = properties();
+ for (int ii = 0; ii < props.count(); ++ii)
+ if (props.at(ii).propertyName() == name)
+ return props.at(ii);
+ return QDeclarativeDomProperty();
+}
+
+QList<QDeclarativeDomDynamicProperty> QDeclarativeDomObject::dynamicProperties() const
+{
+ QList<QDeclarativeDomDynamicProperty> properties;
+
+ for (int i = 0; i < d->object->dynamicProperties.size(); ++i) {
+ QDeclarativeDomDynamicProperty p;
+ p.d = new QDeclarativeDomDynamicPropertyPrivate;
+ p.d->property = d->object->dynamicProperties.at(i);
+ p.d->valid = true;
+
+ if (p.d->property.defaultValue)
+ p.d->property.defaultValue->addref();
+
+ properties.append(p);
+ }
+
+ return properties;
+}
+
+QDeclarativeDomDynamicProperty QDeclarativeDomObject::dynamicProperty(const QByteArray &name) const
+{
+ QDeclarativeDomDynamicProperty p;
+
+ if (!isValid())
+ return p;
+
+ for (int i = 0; i < d->object->dynamicProperties.size(); ++i) {
+ if (d->object->dynamicProperties.at(i).name == name) {
+ p.d = new QDeclarativeDomDynamicPropertyPrivate;
+ p.d->property = d->object->dynamicProperties.at(i);
+ if (p.d->property.defaultValue) p.d->property.defaultValue->addref();
+ p.d->valid = true;
+ }
+ }
+
+ return p;
+}
+
+/*!
+ Returns true if this object is a custom type. Custom types are special
+ types that allow embeddeding non-QML data, such as SVG or HTML data,
+ directly into QML files.
+
+ \note Currently this method will always return false, and is a placekeeper
+ for future functionality.
+
+ \sa QDeclarativeDomObject::customTypeData()
+*/
+bool QDeclarativeDomObject::isCustomType() const
+{
+ return false;
+}
+
+/*!
+ If this object represents a custom type, returns the data associated with
+ the custom type, otherwise returns an empty QByteArray().
+ QDeclarativeDomObject::isCustomType() can be used to check if this object represents
+ a custom type.
+*/
+QByteArray QDeclarativeDomObject::customTypeData() const
+{
+ return QByteArray();
+}
+
+/*!
+ Returns true if this object is a sub-component object. Sub-component
+ objects can be converted into QDeclarativeDomComponent instances by calling
+ QDeclarativeDomObject::toComponent().
+
+ \sa QDeclarativeDomObject::toComponent()
+*/
+bool QDeclarativeDomObject::isComponent() const
+{
+ return (d->object && d->object->typeName == "Qt/Component");
+}
+
+/*!
+ Returns a QDeclarativeDomComponent for this object if it is a sub-component, or
+ an invalid QDeclarativeDomComponent if not. QDeclarativeDomObject::isComponent() can be used
+ to check if this object represents a sub-component.
+
+ \sa QDeclarativeDomObject::isComponent()
+*/
+QDeclarativeDomComponent QDeclarativeDomObject::toComponent() const
+{
+ QDeclarativeDomComponent rv;
+ if (isComponent())
+ rv.d = d;
+ return rv;
+}
+
+/*!
+ Returns the position in the input data where the property assignment started
+, or -1 if the property is invalid.
+*/
+int QDeclarativeDomObject::position() const
+{
+ if (d && d->object)
+ return d->object->location.range.offset;
+ else
+ return -1;
+}
+
+/*!
+ Returns the length in the input data from where the property assignment star
+ted upto the end of it, or -1 if the property is invalid.
+*/
+int QDeclarativeDomObject::length() const
+{
+ if (d && d->object)
+ return d->object->location.range.length;
+ else
+ return -1;
+}
+
+// Returns the URL of the type, if it is an external type, or an empty URL if
+// not
+QUrl QDeclarativeDomObject::url() const
+{
+ if (d && d->object)
+ return d->object->url;
+ else
+ return QUrl();
+}
+
+QDeclarativeDomBasicValuePrivate::QDeclarativeDomBasicValuePrivate()
+: value(0)
+{
+}
+
+QDeclarativeDomBasicValuePrivate::~QDeclarativeDomBasicValuePrivate()
+{
+ if (value) value->release();
+}
+
+/*!
+ \class QDeclarativeDomValueLiteral
+ \internal
+ \brief The QDeclarativeDomValueLiteral class represents a literal value.
+
+ A literal value is a simple value, written inline with the QML. In the
+ example below, the "x", "y" and "color" properties are being assigned
+ literal values.
+
+ \qml
+Rectangle {
+ x: 10
+ y: 10
+ color: "red"
+}
+ \endqml
+*/
+
+/*!
+ Construct an empty QDeclarativeDomValueLiteral.
+*/
+QDeclarativeDomValueLiteral::QDeclarativeDomValueLiteral():
+ d(new QDeclarativeDomBasicValuePrivate)
+{
+}
+
+/*!
+ Create a copy of \a other QDeclarativeDomValueLiteral.
+*/
+QDeclarativeDomValueLiteral::QDeclarativeDomValueLiteral(const QDeclarativeDomValueLiteral &other)
+: d(other.d)
+{
+}
+
+/*!
+ Destroy the QDeclarativeDomValueLiteral.
+*/
+QDeclarativeDomValueLiteral::~QDeclarativeDomValueLiteral()
+{
+}
+
+/*!
+ Assign \a other to this QDeclarativeDomValueLiteral.
+*/
+QDeclarativeDomValueLiteral &QDeclarativeDomValueLiteral::operator=(const QDeclarativeDomValueLiteral &other)
+{
+ d = other.d;
+ return *this;
+}
+
+/*!
+ Return the literal value.
+
+ In the example below, the literal value will be the string "10".
+ \qml
+Rectangle { x: 10 }
+ \endqml
+*/
+QString QDeclarativeDomValueLiteral::literal() const
+{
+ if (d->value) return d->value->primitive();
+ else return QString();
+}
+
+/*!
+ \class QDeclarativeDomValueBinding
+ \internal
+ \brief The QDeclarativeDomValueBinding class represents a property binding.
+
+ A property binding is an ECMAScript expression assigned to a property. In
+ the example below, the "x" property is being assigned a property binding.
+
+ \qml
+Rectangle { x: Other.x }
+ \endqml
+*/
+
+/*!
+ Construct an empty QDeclarativeDomValueBinding.
+*/
+QDeclarativeDomValueBinding::QDeclarativeDomValueBinding():
+ d(new QDeclarativeDomBasicValuePrivate)
+{
+}
+
+/*!
+ Create a copy of \a other QDeclarativeDomValueBinding.
+*/
+QDeclarativeDomValueBinding::QDeclarativeDomValueBinding(const QDeclarativeDomValueBinding &other)
+: d(other.d)
+{
+}
+
+/*!
+ Destroy the QDeclarativeDomValueBinding.
+*/
+QDeclarativeDomValueBinding::~QDeclarativeDomValueBinding()
+{
+}
+
+/*!
+ Assign \a other to this QDeclarativeDomValueBinding.
+*/
+QDeclarativeDomValueBinding &QDeclarativeDomValueBinding::operator=(const QDeclarativeDomValueBinding &other)
+{
+ d = other.d;
+ return *this;
+}
+
+/*!
+ Return the binding expression.
+
+ In the example below, the string "Other.x" will be returned.
+ \qml
+Rectangle { x: Other.x }
+ \endqml
+*/
+QString QDeclarativeDomValueBinding::binding() const
+{
+ if (d->value)
+ return d->value->value.asScript();
+ else
+ return QString();
+}
+
+/*!
+ \class QDeclarativeDomValueValueSource
+ \internal
+ \brief The QDeclarativeDomValueValueSource class represents a value source assignment value.
+
+ In QML, value sources are special value generating types that may be
+ assigned to properties. Value sources inherit the QDeclarativePropertyValueSource
+ class. In the example below, the "x" property is being assigned the
+ NumberAnimation value source.
+
+ \qml
+Rectangle {
+ x: NumberAnimation {
+ from: 0
+ to: 100
+ repeat: true
+ running: true
+ }
+}
+ \endqml
+*/
+
+/*!
+ Construct an empty QDeclarativeDomValueValueSource.
+*/
+QDeclarativeDomValueValueSource::QDeclarativeDomValueValueSource():
+ d(new QDeclarativeDomBasicValuePrivate)
+{
+}
+
+/*!
+ Create a copy of \a other QDeclarativeDomValueValueSource.
+*/
+QDeclarativeDomValueValueSource::QDeclarativeDomValueValueSource(const QDeclarativeDomValueValueSource &other)
+: d(other.d)
+{
+}
+
+/*!
+ Destroy the QDeclarativeDomValueValueSource.
+*/
+QDeclarativeDomValueValueSource::~QDeclarativeDomValueValueSource()
+{
+}
+
+/*!
+ Assign \a other to this QDeclarativeDomValueValueSource.
+*/
+QDeclarativeDomValueValueSource &QDeclarativeDomValueValueSource::operator=(const QDeclarativeDomValueValueSource &other)
+{
+ d = other.d;
+ return *this;
+}
+
+/*!
+ Return the value source object.
+
+ In the example below, an object representing the NumberAnimation will be
+ returned.
+ \qml
+Rectangle {
+ x: NumberAnimation {
+ from: 0
+ to: 100
+ repeat: true
+ running: true
+ }
+}
+ \endqml
+*/
+QDeclarativeDomObject QDeclarativeDomValueValueSource::object() const
+{
+ QDeclarativeDomObject rv;
+ if (d->value) {
+ rv.d->object = d->value->object;
+ rv.d->object->addref();
+ }
+ return rv;
+}
+
+/*!
+ \class QDeclarativeDomValueValueInterceptor
+ \internal
+ \brief The QDeclarativeDomValueValueInterceptor class represents a value interceptor assignment value.
+
+ In QML, value interceptor are special write-intercepting types that may be
+ assigned to properties. Value interceptor inherit the QDeclarativePropertyValueInterceptor
+ class. In the example below, the "x" property is being assigned the
+ Behavior value interceptor.
+
+ \qml
+Rectangle {
+ Behavior on x { NumberAnimation { duration: 500 } }
+}
+ \endqml
+*/
+
+/*!
+ Construct an empty QDeclarativeDomValueValueInterceptor.
+*/
+QDeclarativeDomValueValueInterceptor::QDeclarativeDomValueValueInterceptor():
+ d(new QDeclarativeDomBasicValuePrivate)
+{
+}
+
+/*!
+ Create a copy of \a other QDeclarativeDomValueValueInterceptor.
+*/
+QDeclarativeDomValueValueInterceptor::QDeclarativeDomValueValueInterceptor(const QDeclarativeDomValueValueInterceptor &other)
+: d(other.d)
+{
+}
+
+/*!
+ Destroy the QDeclarativeDomValueValueInterceptor.
+*/
+QDeclarativeDomValueValueInterceptor::~QDeclarativeDomValueValueInterceptor()
+{
+}
+
+/*!
+ Assign \a other to this QDeclarativeDomValueValueInterceptor.
+*/
+QDeclarativeDomValueValueInterceptor &QDeclarativeDomValueValueInterceptor::operator=(const QDeclarativeDomValueValueInterceptor &other)
+{
+ d = other.d;
+ return *this;
+}
+
+/*!
+ Return the value interceptor object.
+
+ In the example below, an object representing the Behavior will be
+ returned.
+ \qml
+Rectangle {
+ Behavior on x { NumberAnimation { duration: 500 } }
+}
+ \endqml
+*/
+QDeclarativeDomObject QDeclarativeDomValueValueInterceptor::object() const
+{
+ QDeclarativeDomObject rv;
+ if (d->value) {
+ rv.d->object = d->value->object;
+ rv.d->object->addref();
+ }
+ return rv;
+}
+
+QDeclarativeDomValuePrivate::QDeclarativeDomValuePrivate()
+: property(0), value(0)
+{
+}
+
+QDeclarativeDomValuePrivate::~QDeclarativeDomValuePrivate()
+{
+ if (property) property->release();
+ if (value) value->release();
+}
+
+/*!
+ \class QDeclarativeDomValue
+ \internal
+ \brief The QDeclarativeDomValue class represents a generic Qml value.
+
+ QDeclarativeDomValue's can be assigned to QML \l {QDeclarativeDomProperty}{properties}. In
+ QML, properties can be assigned various different values, including basic
+ literals, property bindings, property value sources, objects and lists of
+ values. The QDeclarativeDomValue class allows a programmer to determine the specific
+ value type being assigned and access more detailed information through a
+ corresponding value type class.
+
+ For example, in the following example,
+
+ \qml
+Text {
+ text: "Hello World!"
+ y: Other.y
+}
+ \endqml
+
+ The text property is being assigned a literal, and the y property a property
+ binding. To output the values assigned to the text and y properties in the
+ above example from C++,
+
+ \code
+ QDeclarativeDomDocument document;
+ QDeclarativeDomObject root = document.rootObject();
+
+ QDeclarativeDomProperty text = root.property("text");
+ if (text.value().isLiteral()) {
+ QDeclarativeDomValueLiteral literal = text.value().toLiteral();
+ qDebug() << literal.literal();
+ }
+
+ QDeclarativeDomProperty y = root.property("y");
+ if (y.value().isBinding()) {
+ QDeclarativeDomValueBinding binding = y.value().toBinding();
+ qDebug() << binding.binding();
+ }
+ \endcode
+*/
+
+/*!
+ Construct an invalid QDeclarativeDomValue.
+*/
+QDeclarativeDomValue::QDeclarativeDomValue()
+: d(new QDeclarativeDomValuePrivate)
+{
+}
+
+/*!
+ Create a copy of \a other QDeclarativeDomValue.
+*/
+QDeclarativeDomValue::QDeclarativeDomValue(const QDeclarativeDomValue &other)
+: d(other.d)
+{
+}
+
+/*!
+ Destroy the QDeclarativeDomValue
+*/
+QDeclarativeDomValue::~QDeclarativeDomValue()
+{
+}
+
+/*!
+ Assign \a other to this QDeclarativeDomValue.
+*/
+QDeclarativeDomValue &QDeclarativeDomValue::operator=(const QDeclarativeDomValue &other)
+{
+ d = other.d;
+ return *this;
+}
+
+/*!
+ \enum QDeclarativeDomValue::Type
+
+ The type of the QDeclarativeDomValue node.
+
+ \value Invalid The QDeclarativeDomValue is invalid.
+ \value Literal The QDeclarativeDomValue is a literal value assignment. Use QDeclarativeDomValue::toLiteral() to access the type instance.
+ \value PropertyBinding The QDeclarativeDomValue is a property binding. Use QDeclarativeDomValue::toBinding() to access the type instance.
+ \value ValueSource The QDeclarativeDomValue is a property value source. Use QDeclarativeDomValue::toValueSource() to access the type instance.
+ \value ValueInterceptor The QDeclarativeDomValue is a property value interceptor. Use QDeclarativeDomValue::toValueInterceptor() to access the type instance.
+ \value Object The QDeclarativeDomValue is an object assignment. Use QDeclarativeDomValue::toObject() to access the type instnace.
+ \value List The QDeclarativeDomValue is a list of other values. Use QDeclarativeDomValue::toList() to access the type instance.
+*/
+
+/*!
+ Returns the type of this QDeclarativeDomValue.
+*/
+QDeclarativeDomValue::Type QDeclarativeDomValue::type() const
+{
+ if (d->property)
+ if (QDeclarativeMetaType::isList(d->property->type) ||
+ (d->property && (d->property->values.count() + d->property->onValues.count()) > 1))
+ return List;
+
+ QDeclarativeParser::Value *value = d->value;
+ if (!value && !d->property)
+ return Invalid;
+
+ switch(value->type) {
+ case QDeclarativeParser::Value::Unknown:
+ return Invalid;
+ case QDeclarativeParser::Value::Literal:
+ return Literal;
+ case QDeclarativeParser::Value::PropertyBinding:
+ return PropertyBinding;
+ case QDeclarativeParser::Value::ValueSource:
+ return ValueSource;
+ case QDeclarativeParser::Value::ValueInterceptor:
+ return ValueInterceptor;
+ case QDeclarativeParser::Value::CreatedObject:
+ return Object;
+ case QDeclarativeParser::Value::SignalObject:
+ return Invalid;
+ case QDeclarativeParser::Value::SignalExpression:
+ return Literal;
+ case QDeclarativeParser::Value::Id:
+ return Literal;
+ }
+ return Invalid;
+}
+
+/*!
+ Returns true if this is an invalid value, otherwise false.
+*/
+bool QDeclarativeDomValue::isInvalid() const
+{
+ return type() == Invalid;
+}
+
+/*!
+ Returns true if this is a literal value, otherwise false.
+*/
+bool QDeclarativeDomValue::isLiteral() const
+{
+ return type() == Literal;
+}
+
+/*!
+ Returns true if this is a property binding value, otherwise false.
+*/
+bool QDeclarativeDomValue::isBinding() const
+{
+ return type() == PropertyBinding;
+}
+
+/*!
+ Returns true if this is a value source value, otherwise false.
+*/
+bool QDeclarativeDomValue::isValueSource() const
+{
+ return type() == ValueSource;
+}
+
+/*!
+ Returns true if this is a value interceptor value, otherwise false.
+*/
+bool QDeclarativeDomValue::isValueInterceptor() const
+{
+ return type() == ValueInterceptor;
+}
+
+/*!
+ Returns true if this is an object value, otherwise false.
+*/
+bool QDeclarativeDomValue::isObject() const
+{
+ return type() == Object;
+}
+
+/*!
+ Returns true if this is a list value, otherwise false.
+*/
+bool QDeclarativeDomValue::isList() const
+{
+ return type() == List;
+}
+
+/*!
+ Returns a QDeclarativeDomValueLiteral if this value is a literal type, otherwise
+ returns an invalid QDeclarativeDomValueLiteral.
+
+ \sa QDeclarativeDomValue::type()
+*/
+QDeclarativeDomValueLiteral QDeclarativeDomValue::toLiteral() const
+{
+ QDeclarativeDomValueLiteral rv;
+ if (type() == Literal) {
+ rv.d->value = d->value;
+ rv.d->value->addref();
+ }
+ return rv;
+}
+
+/*!
+ Returns a QDeclarativeDomValueBinding if this value is a property binding type,
+ otherwise returns an invalid QDeclarativeDomValueBinding.
+
+ \sa QDeclarativeDomValue::type()
+*/
+QDeclarativeDomValueBinding QDeclarativeDomValue::toBinding() const
+{
+ QDeclarativeDomValueBinding rv;
+ if (type() == PropertyBinding) {
+ rv.d->value = d->value;
+ rv.d->value->addref();
+ }
+ return rv;
+}
+
+/*!
+ Returns a QDeclarativeDomValueValueSource if this value is a property value source
+ type, otherwise returns an invalid QDeclarativeDomValueValueSource.
+
+ \sa QDeclarativeDomValue::type()
+*/
+QDeclarativeDomValueValueSource QDeclarativeDomValue::toValueSource() const
+{
+ QDeclarativeDomValueValueSource rv;
+ if (type() == ValueSource) {
+ rv.d->value = d->value;
+ rv.d->value->addref();
+ }
+ return rv;
+}
+
+/*!
+ Returns a QDeclarativeDomValueValueInterceptor if this value is a property value interceptor
+ type, otherwise returns an invalid QDeclarativeDomValueValueInterceptor.
+
+ \sa QDeclarativeDomValue::type()
+*/
+QDeclarativeDomValueValueInterceptor QDeclarativeDomValue::toValueInterceptor() const
+{
+ QDeclarativeDomValueValueInterceptor rv;
+ if (type() == ValueInterceptor) {
+ rv.d->value = d->value;
+ rv.d->value->addref();
+ }
+ return rv;
+}
+
+/*!
+ Returns a QDeclarativeDomObject if this value is an object assignment type, otherwise
+ returns an invalid QDeclarativeDomObject.
+
+ \sa QDeclarativeDomValue::type()
+*/
+QDeclarativeDomObject QDeclarativeDomValue::toObject() const
+{
+ QDeclarativeDomObject rv;
+ if (type() == Object) {
+ rv.d->object = d->value->object;
+ rv.d->object->addref();
+ }
+ return rv;
+}
+
+/*!
+ Returns a QDeclarativeDomList if this value is a list type, otherwise returns an
+ invalid QDeclarativeDomList.
+
+ \sa QDeclarativeDomValue::type()
+*/
+QDeclarativeDomList QDeclarativeDomValue::toList() const
+{
+ QDeclarativeDomList rv;
+ if (type() == List) {
+ rv.d = d;
+ }
+ return rv;
+}
+
+/*!
+ Returns the position in the input data where the property value startd, or -1
+ if the value is invalid.
+*/
+int QDeclarativeDomValue::position() const
+{
+ if (type() == Invalid)
+ return -1;
+ else
+ return d->value->location.range.offset;
+}
+
+/*!
+ Returns the length in the input data from where the property value started u
+pto the end of it, or -1 if the value is invalid.
+*/
+int QDeclarativeDomValue::length() const
+{
+ if (type() == Invalid)
+ return -1;
+ else
+ return d->value->location.range.length;
+}
+
+/*!
+ \class QDeclarativeDomList
+ \internal
+ \brief The QDeclarativeDomList class represents a list of values assigned to a QML property.
+
+ Lists of values can be assigned to properties. For example, the following
+ example assigns multiple objects to Item's "children" property
+ \qml
+Item {
+ children: [
+ Text { },
+ Rectangle { }
+ ]
+}
+ \endqml
+
+ Lists can also be implicitly created by assigning multiple
+ \l {QDeclarativeDomValueValueSource}{value sources} or constants to a property.
+ \qml
+Item {
+ x: 10
+ x: NumberAnimation {
+ running: false
+ from: 0
+ to: 100
+ }
+}
+ \endqml
+*/
+
+/*!
+ Construct an empty QDeclarativeDomList.
+*/
+QDeclarativeDomList::QDeclarativeDomList()
+{
+}
+
+/*!
+ Create a copy of \a other QDeclarativeDomList.
+*/
+QDeclarativeDomList::QDeclarativeDomList(const QDeclarativeDomList &other)
+: d(other.d)
+{
+}
+
+/*!
+ Destroy the QDeclarativeDomList.
+*/
+QDeclarativeDomList::~QDeclarativeDomList()
+{
+}
+
+/*!
+ Assign \a other to this QDeclarativeDomList.
+*/
+QDeclarativeDomList &QDeclarativeDomList::operator=(const QDeclarativeDomList &other)
+{
+ d = other.d;
+ return *this;
+}
+
+/*!
+ Returns the list of QDeclarativeDomValue's.
+*/
+QList<QDeclarativeDomValue> QDeclarativeDomList::values() const
+{
+ QList<QDeclarativeDomValue> rv;
+ if (!d->property)
+ return rv;
+
+ for (int ii = 0; ii < d->property->values.count(); ++ii) {
+ QDeclarativeDomValue v;
+ v.d->value = d->property->values.at(ii);
+ v.d->value->addref();
+ rv << v;
+ }
+
+ for (int ii = 0; ii < d->property->onValues.count(); ++ii) {
+ QDeclarativeDomValue v;
+ v.d->value = d->property->onValues.at(ii);
+ v.d->value->addref();
+ rv << v;
+ }
+
+ return rv;
+}
+
+/*!
+ Returns the position in the input data where the list started, or -1 if
+ the property is invalid.
+*/
+int QDeclarativeDomList::position() const
+{
+ if (d && d->property) {
+ return d->property->listValueRange.offset;
+ } else
+ return -1;
+}
+
+/*!
+ Returns the length in the input data from where the list started upto
+ the end of it, or 0 if the property is invalid.
+*/
+int QDeclarativeDomList::length() const
+{
+ if (d && d->property)
+ return d->property->listValueRange.length;
+ else
+ return -1;
+}
+
+/*!
+ Returns a list of positions of the commas in the QML file.
+*/
+QList<int> QDeclarativeDomList:: commaPositions() const
+{
+ if (d && d->property)
+ return d->property->listCommaPositions;
+ else
+ return QList<int>();
+}
+
+/*!
+ \class QDeclarativeDomComponent
+ \internal
+ \brief The QDeclarativeDomComponent class represents sub-component within a QML document.
+
+ Sub-components are QDeclarativeComponents defined within a QML document. The
+ following example shows the definition of a sub-component with the id
+ "listDelegate".
+
+ \qml
+Item {
+ Component {
+ id: listDelegate
+ Text {
+ text: modelData.text
+ }
+ }
+}
+ \endqml
+
+ Like QDeclarativeDomDocument's, components contain a single root object.
+*/
+
+/*!
+ Construct an empty QDeclarativeDomComponent.
+*/
+QDeclarativeDomComponent::QDeclarativeDomComponent()
+{
+}
+
+/*!
+ Create a copy of \a other QDeclarativeDomComponent.
+*/
+QDeclarativeDomComponent::QDeclarativeDomComponent(const QDeclarativeDomComponent &other)
+: QDeclarativeDomObject(other)
+{
+}
+
+/*!
+ Destroy the QDeclarativeDomComponent.
+*/
+QDeclarativeDomComponent::~QDeclarativeDomComponent()
+{
+}
+
+/*!
+ Assign \a other to this QDeclarativeDomComponent.
+*/
+QDeclarativeDomComponent &QDeclarativeDomComponent::operator=(const QDeclarativeDomComponent &other)
+{
+ static_cast<QDeclarativeDomObject &>(*this) = other;
+ return *this;
+}
+
+/*!
+ Returns the component's root object.
+
+ In the example below, the root object is the "Text" object.
+ \qml
+Item {
+ Component {
+ id: listDelegate
+ Text {
+ text: modelData.text
+ }
+ }
+}
+ \endqml
+*/
+QDeclarativeDomObject QDeclarativeDomComponent::componentRoot() const
+{
+ QDeclarativeDomObject rv;
+ if (d->object) {
+ QDeclarativeParser::Object *obj = 0;
+ if (d->object->defaultProperty &&
+ d->object->defaultProperty->values.count() == 1 &&
+ d->object->defaultProperty->values.at(0)->object)
+ obj = d->object->defaultProperty->values.at(0)->object;
+
+ if (obj) {
+ rv.d->object = obj;
+ rv.d->object->addref();
+ }
+ }
+
+ return rv;
+}
+
+QDeclarativeDomImportPrivate::QDeclarativeDomImportPrivate()
+: type(File)
+{
+}
+
+QDeclarativeDomImportPrivate::~QDeclarativeDomImportPrivate()
+{
+}
+
+/*!
+ \class QDeclarativeDomImport
+ \internal
+ \brief The QDeclarativeDomImport class represents an import statement.
+*/
+
+/*!
+ Construct an empty QDeclarativeDomImport.
+*/
+QDeclarativeDomImport::QDeclarativeDomImport()
+: d(new QDeclarativeDomImportPrivate)
+{
+}
+
+/*!
+ Create a copy of \a other QDeclarativeDomImport.
+*/
+QDeclarativeDomImport::QDeclarativeDomImport(const QDeclarativeDomImport &other)
+: d(other.d)
+{
+}
+
+/*!
+ Destroy the QDeclarativeDomImport.
+*/
+QDeclarativeDomImport::~QDeclarativeDomImport()
+{
+}
+
+/*!
+ Assign \a other to this QDeclarativeDomImport.
+*/
+QDeclarativeDomImport &QDeclarativeDomImport::operator=(const QDeclarativeDomImport &other)
+{
+ d = other.d;
+ return *this;
+}
+
+/*!
+ Returns the type of the import.
+ */
+QDeclarativeDomImport::Type QDeclarativeDomImport::type() const
+{
+ return static_cast<QDeclarativeDomImport::Type>(d->type);
+}
+
+/*!
+ Returns the URI of the import (e.g. 'subdir' or 'com.nokia.Qt')
+ */
+QString QDeclarativeDomImport::uri() const
+{
+ return d->uri;
+}
+
+/*!
+ Returns the version specified by the import. An empty string if no version was specified.
+ */
+QString QDeclarativeDomImport::version() const
+{
+ return d->version;
+}
+
+/*!
+ Returns the (optional) qualifier string (the token following the 'as' keyword) of the import.
+ */
+QString QDeclarativeDomImport::qualifier() const
+{
+ return d->qualifier;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativedom_p.h b/src/declarative/qml/qdeclarativedom_p.h
new file mode 100644
index 0000000000..6043eaddab
--- /dev/null
+++ b/src/declarative/qml/qdeclarativedom_p.h
@@ -0,0 +1,360 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEDOM_P_H
+#define QDECLARATIVEDOM_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeerror.h"
+
+#include <QtCore/qlist.h>
+#include <QtCore/qshareddata.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QString;
+class QByteArray;
+class QDeclarativeDomObject;
+class QDeclarativeDomList;
+class QDeclarativeDomValue;
+class QDeclarativeEngine;
+class QDeclarativeDomComponent;
+class QDeclarativeDomImport;
+class QIODevice;
+
+class QDeclarativeDomDocumentPrivate;
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDomDocument
+{
+public:
+ QDeclarativeDomDocument();
+ QDeclarativeDomDocument(const QDeclarativeDomDocument &);
+ ~QDeclarativeDomDocument();
+ QDeclarativeDomDocument &operator=(const QDeclarativeDomDocument &);
+
+ QList<QDeclarativeDomImport> imports() const;
+
+ QList<QDeclarativeError> errors() const;
+ bool load(QDeclarativeEngine *, const QByteArray &, const QUrl & = QUrl());
+
+ QDeclarativeDomObject rootObject() const;
+
+private:
+ QSharedDataPointer<QDeclarativeDomDocumentPrivate> d;
+};
+
+class QDeclarativeDomPropertyPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeDomProperty
+{
+public:
+ QDeclarativeDomProperty();
+ QDeclarativeDomProperty(const QDeclarativeDomProperty &);
+ ~QDeclarativeDomProperty();
+ QDeclarativeDomProperty &operator=(const QDeclarativeDomProperty &);
+
+ bool isValid() const;
+
+ QByteArray propertyName() const;
+ QList<QByteArray> propertyNameParts() const;
+
+ bool isDefaultProperty() const;
+
+ QDeclarativeDomValue value() const;
+
+ int position() const;
+ int length() const;
+
+private:
+ friend class QDeclarativeDomObject;
+ friend class QDeclarativeDomDynamicProperty;
+ QSharedDataPointer<QDeclarativeDomPropertyPrivate> d;
+};
+
+class QDeclarativeDomDynamicPropertyPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeDomDynamicProperty
+{
+public:
+ QDeclarativeDomDynamicProperty();
+ QDeclarativeDomDynamicProperty(const QDeclarativeDomDynamicProperty &);
+ ~QDeclarativeDomDynamicProperty();
+ QDeclarativeDomDynamicProperty &operator=(const QDeclarativeDomDynamicProperty &);
+
+ bool isValid() const;
+
+ QByteArray propertyName() const;
+ int propertyType() const;
+ QByteArray propertyTypeName() const;
+
+ bool isDefaultProperty() const;
+ QDeclarativeDomProperty defaultValue() const;
+
+ bool isAlias() const;
+
+ int position() const;
+ int length() const;
+
+private:
+ friend class QDeclarativeDomObject;
+ QSharedDataPointer<QDeclarativeDomDynamicPropertyPrivate> d;
+};
+
+class QDeclarativeDomObjectPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeDomObject
+{
+public:
+ QDeclarativeDomObject();
+ QDeclarativeDomObject(const QDeclarativeDomObject &);
+ ~QDeclarativeDomObject();
+ QDeclarativeDomObject &operator=(const QDeclarativeDomObject &);
+
+ bool isValid() const;
+
+ QByteArray objectType() const;
+ QByteArray objectClassName() const;
+
+ int objectTypeMajorVersion() const;
+ int objectTypeMinorVersion() const;
+
+ QString objectId() const;
+
+ QList<QDeclarativeDomProperty> properties() const;
+ QDeclarativeDomProperty property(const QByteArray &) const;
+
+ QList<QDeclarativeDomDynamicProperty> dynamicProperties() const;
+ QDeclarativeDomDynamicProperty dynamicProperty(const QByteArray &) const;
+
+ bool isCustomType() const;
+ QByteArray customTypeData() const;
+
+ bool isComponent() const;
+ QDeclarativeDomComponent toComponent() const;
+
+ int position() const;
+ int length() const;
+
+ QUrl url() const;
+private:
+ friend class QDeclarativeDomDocument;
+ friend class QDeclarativeDomComponent;
+ friend class QDeclarativeDomValue;
+ friend class QDeclarativeDomValueValueSource;
+ friend class QDeclarativeDomValueValueInterceptor;
+ QSharedDataPointer<QDeclarativeDomObjectPrivate> d;
+};
+
+class QDeclarativeDomValuePrivate;
+class QDeclarativeDomBasicValuePrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeDomValueLiteral
+{
+public:
+ QDeclarativeDomValueLiteral();
+ QDeclarativeDomValueLiteral(const QDeclarativeDomValueLiteral &);
+ ~QDeclarativeDomValueLiteral();
+ QDeclarativeDomValueLiteral &operator=(const QDeclarativeDomValueLiteral &);
+
+ QString literal() const;
+
+private:
+ friend class QDeclarativeDomValue;
+ QSharedDataPointer<QDeclarativeDomBasicValuePrivate> d;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDomValueBinding
+{
+public:
+ QDeclarativeDomValueBinding();
+ QDeclarativeDomValueBinding(const QDeclarativeDomValueBinding &);
+ ~QDeclarativeDomValueBinding();
+ QDeclarativeDomValueBinding &operator=(const QDeclarativeDomValueBinding &);
+
+ QString binding() const;
+
+private:
+ friend class QDeclarativeDomValue;
+ QSharedDataPointer<QDeclarativeDomBasicValuePrivate> d;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDomValueValueSource
+{
+public:
+ QDeclarativeDomValueValueSource();
+ QDeclarativeDomValueValueSource(const QDeclarativeDomValueValueSource &);
+ ~QDeclarativeDomValueValueSource();
+ QDeclarativeDomValueValueSource &operator=(const QDeclarativeDomValueValueSource &);
+
+ QDeclarativeDomObject object() const;
+
+private:
+ friend class QDeclarativeDomValue;
+ QSharedDataPointer<QDeclarativeDomBasicValuePrivate> d;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDomValueValueInterceptor
+{
+public:
+ QDeclarativeDomValueValueInterceptor();
+ QDeclarativeDomValueValueInterceptor(const QDeclarativeDomValueValueInterceptor &);
+ ~QDeclarativeDomValueValueInterceptor();
+ QDeclarativeDomValueValueInterceptor &operator=(const QDeclarativeDomValueValueInterceptor &);
+
+ QDeclarativeDomObject object() const;
+
+private:
+ friend class QDeclarativeDomValue;
+ QSharedDataPointer<QDeclarativeDomBasicValuePrivate> d;
+};
+
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDomComponent : public QDeclarativeDomObject
+{
+public:
+ QDeclarativeDomComponent();
+ QDeclarativeDomComponent(const QDeclarativeDomComponent &);
+ ~QDeclarativeDomComponent();
+ QDeclarativeDomComponent &operator=(const QDeclarativeDomComponent &);
+
+ QDeclarativeDomObject componentRoot() const;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDomValue
+{
+public:
+ enum Type {
+ Invalid,
+ Literal,
+ PropertyBinding,
+ ValueSource,
+ ValueInterceptor,
+ Object,
+ List
+ };
+
+ QDeclarativeDomValue();
+ QDeclarativeDomValue(const QDeclarativeDomValue &);
+ ~QDeclarativeDomValue();
+ QDeclarativeDomValue &operator=(const QDeclarativeDomValue &);
+
+ Type type() const;
+
+ bool isInvalid() const;
+ bool isLiteral() const;
+ bool isBinding() const;
+ bool isValueSource() const;
+ bool isValueInterceptor() const;
+ bool isObject() const;
+ bool isList() const;
+
+ QDeclarativeDomValueLiteral toLiteral() const;
+ QDeclarativeDomValueBinding toBinding() const;
+ QDeclarativeDomValueValueSource toValueSource() const;
+ QDeclarativeDomValueValueInterceptor toValueInterceptor() const;
+ QDeclarativeDomObject toObject() const;
+ QDeclarativeDomList toList() const;
+
+ int position() const;
+ int length() const;
+
+private:
+ friend class QDeclarativeDomProperty;
+ friend class QDeclarativeDomList;
+ QSharedDataPointer<QDeclarativeDomValuePrivate> d;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeDomList
+{
+public:
+ QDeclarativeDomList();
+ QDeclarativeDomList(const QDeclarativeDomList &);
+ ~QDeclarativeDomList();
+ QDeclarativeDomList &operator=(const QDeclarativeDomList &);
+
+ QList<QDeclarativeDomValue> values() const;
+
+ int position() const;
+ int length() const;
+
+ QList<int> commaPositions() const;
+
+private:
+ friend class QDeclarativeDomValue;
+ QSharedDataPointer<QDeclarativeDomValuePrivate> d;
+};
+
+class QDeclarativeDomImportPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeDomImport
+{
+public:
+ enum Type { Library, File };
+
+ QDeclarativeDomImport();
+ QDeclarativeDomImport(const QDeclarativeDomImport &);
+ ~QDeclarativeDomImport();
+ QDeclarativeDomImport &operator=(const QDeclarativeDomImport &);
+
+ Type type() const;
+ QString uri() const;
+ QString version() const;
+ QString qualifier() const;
+
+private:
+ friend class QDeclarativeDomDocument;
+ QSharedDataPointer<QDeclarativeDomImportPrivate> d;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEDOM_P_H
diff --git a/src/declarative/qml/qdeclarativedom_p_p.h b/src/declarative/qml/qdeclarativedom_p_p.h
new file mode 100644
index 0000000000..a065282e36
--- /dev/null
+++ b/src/declarative/qml/qdeclarativedom_p_p.h
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEDOM_P_P_H
+#define QDECLARATIVEDOM_P_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeparser_p.h"
+
+#include <QtCore/QtGlobal>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeDomDocumentPrivate : public QSharedData
+{
+public:
+ QDeclarativeDomDocumentPrivate();
+ QDeclarativeDomDocumentPrivate(const QDeclarativeDomDocumentPrivate &o)
+ : QSharedData(o) { qFatal("Not impl"); }
+ ~QDeclarativeDomDocumentPrivate();
+
+ QList<QDeclarativeError> errors;
+ QList<QDeclarativeDomImport> imports;
+ QDeclarativeParser::Object *root;
+ QList<int> automaticSemicolonOffsets;
+};
+
+class QDeclarativeDomObjectPrivate : public QSharedData
+{
+public:
+ QDeclarativeDomObjectPrivate();
+ QDeclarativeDomObjectPrivate(const QDeclarativeDomObjectPrivate &o)
+ : QSharedData(o) { qFatal("Not impl"); }
+ ~QDeclarativeDomObjectPrivate();
+
+ typedef QList<QPair<QDeclarativeParser::Property *, QByteArray> > Properties;
+ Properties properties() const;
+ Properties properties(QDeclarativeParser::Property *) const;
+
+ QDeclarativeParser::Object *object;
+};
+
+class QDeclarativeDomPropertyPrivate : public QSharedData
+{
+public:
+ QDeclarativeDomPropertyPrivate();
+ QDeclarativeDomPropertyPrivate(const QDeclarativeDomPropertyPrivate &o)
+ : QSharedData(o) { qFatal("Not impl"); }
+ ~QDeclarativeDomPropertyPrivate();
+
+ QByteArray propertyName;
+ QDeclarativeParser::Property *property;
+};
+
+class QDeclarativeDomDynamicPropertyPrivate : public QSharedData
+{
+public:
+ QDeclarativeDomDynamicPropertyPrivate();
+ QDeclarativeDomDynamicPropertyPrivate(const QDeclarativeDomDynamicPropertyPrivate &o)
+ : QSharedData(o) { qFatal("Not impl"); }
+ ~QDeclarativeDomDynamicPropertyPrivate();
+
+ bool valid;
+ QDeclarativeParser::Object::DynamicProperty property;
+};
+
+class QDeclarativeDomValuePrivate : public QSharedData
+{
+public:
+ QDeclarativeDomValuePrivate();
+ QDeclarativeDomValuePrivate(const QDeclarativeDomValuePrivate &o)
+ : QSharedData(o) { qFatal("Not impl"); }
+ ~QDeclarativeDomValuePrivate();
+
+ QDeclarativeParser::Property *property;
+ QDeclarativeParser::Value *value;
+};
+
+class QDeclarativeDomBasicValuePrivate : public QSharedData
+{
+public:
+ QDeclarativeDomBasicValuePrivate();
+ QDeclarativeDomBasicValuePrivate(const QDeclarativeDomBasicValuePrivate &o)
+ : QSharedData(o) { qFatal("Not impl"); }
+ ~QDeclarativeDomBasicValuePrivate();
+
+ QDeclarativeParser::Value *value;
+};
+
+class QDeclarativeDomImportPrivate : public QSharedData
+{
+public:
+ QDeclarativeDomImportPrivate();
+ QDeclarativeDomImportPrivate(const QDeclarativeDomImportPrivate &o)
+ : QSharedData(o) { qFatal("Not impl"); }
+ ~QDeclarativeDomImportPrivate();
+
+ enum Type { Library, File };
+
+ Type type;
+ QString uri;
+ QString version;
+ QString qualifier;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEDOM_P_P_H
+
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
new file mode 100644
index 0000000000..c23b17c33c
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -0,0 +1,1989 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativeengine.h"
+
+#include "qdeclarativecontext_p.h"
+#include "qdeclarativecompiler_p.h"
+#include "qdeclarativeglobalscriptclass_p.h"
+#include "qdeclarative.h"
+#include "qdeclarativecontext.h"
+#include "qdeclarativeexpression.h"
+#include "qdeclarativecomponent.h"
+#include "qdeclarativebinding_p_p.h"
+#include "qdeclarativevme_p.h"
+#include "qdeclarativeenginedebug_p.h"
+#include "qdeclarativestringconverters_p.h"
+#include "qdeclarativexmlhttprequest_p.h"
+#include "qdeclarativesqldatabase_p.h"
+#include "qdeclarativetypenamescriptclass_p.h"
+#include "qdeclarativelistscriptclass_p.h"
+#include "qdeclarativescriptstring.h"
+#include "qdeclarativeglobal_p.h"
+#include "qdeclarativeworkerscript_p.h"
+#include "qdeclarativecomponent_p.h"
+#include "qdeclarativescriptclass_p.h"
+#include "qdeclarativenetworkaccessmanagerfactory.h"
+#include "qdeclarativeimageprovider.h"
+#include "qdeclarativedirparser_p.h"
+#include "qdeclarativeextensioninterface.h"
+#include "qdeclarativelist_p.h"
+#include "qdeclarativetypenamecache_p.h"
+
+#include <qfxperf_p_p.h>
+
+#include <QtCore/qmetaobject.h>
+#include <QScriptClass>
+#include <QNetworkReply>
+#include <QNetworkRequest>
+#include <QNetworkAccessManager>
+#include <QDesktopServices>
+#include <QTimer>
+#include <QList>
+#include <QPair>
+#include <QDebug>
+#include <QMetaObject>
+#include <QStack>
+#include <QPluginLoader>
+#include <QtCore/qlibraryinfo.h>
+#include <QtCore/qthreadstorage.h>
+#include <QtCore/qthread.h>
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qdir.h>
+#include <QtCore/qmutex.h>
+#include <QtGui/qcolor.h>
+#include <QtGui/qvector3d.h>
+#include <QtGui/qsound.h>
+#include <QGraphicsObject>
+#include <QtCore/qcryptographichash.h>
+
+#include <private/qobject_p.h>
+#include <private/qscriptdeclarativeclass_p.h>
+
+#include <private/qdeclarativeitemsmodule_p.h>
+#include <private/qdeclarativeutilmodule_p.h>
+
+#ifdef Q_OS_WIN // for %APPDATA%
+#include <qt_windows.h>
+#include <qlibrary.h>
+
+#define CSIDL_APPDATA 0x001a // <username>\Application Data
+#endif
+
+Q_DECLARE_METATYPE(QDeclarativeProperty)
+
+QT_BEGIN_NAMESPACE
+
+DEFINE_BOOL_CONFIG_OPTION(qmlImportTrace, QML_IMPORT_TRACE)
+
+/*!
+ \qmlclass QtObject QObject
+ \since 4.7
+ \brief The QtObject element is the most basic element in QML
+
+ The QtObject element is a non-visual element which contains only
+ the objectName property. It is useful for when you need an extremely
+ lightweight element to place your own custom properties in.
+
+ It can also be useful for C++ integration, as it is just a plain QObject. See
+ the QObject documentation for further details.
+*/
+/*!
+ \qmlproperty string QtObject::objectName
+ This property allows you to give a name to this specific object instance.
+
+ See \l{scripting.html#accessing-child-qobjects}{Accessing Child QObjects}
+ in the scripting documentation for details how objectName can be used from
+ scripts.
+*/
+
+struct StaticQtMetaObject : public QObject
+{
+ static const QMetaObject *get()
+ { return &static_cast<StaticQtMetaObject*> (0)->staticQtMetaObject; }
+};
+
+static bool qt_QmlQtModule_registered = false;
+
+void QDeclarativeEnginePrivate::defineModule()
+{
+ QML_REGISTER_TYPE(Qt,4,6,Component,QDeclarativeComponent);
+ QML_REGISTER_TYPE(Qt,4,6,QtObject,QObject);
+ QML_REGISTER_TYPE(Qt,4,6,WorkerScript,QDeclarativeWorkerScript);
+ QML_REGISTER_TYPE(Qt,4,6,WorkerListModel,QDeclarativeWorkerListModel);
+
+ QML_REGISTER_NOCREATE_TYPE(QDeclarativeBinding);
+}
+
+QDeclarativeEnginePrivate::QDeclarativeEnginePrivate(QDeclarativeEngine *e)
+: captureProperties(false), rootContext(0), currentExpression(0), isDebugging(false),
+ contextClass(0), sharedContext(0), sharedScope(0), objectClass(0), valueTypeClass(0),
+ globalClass(0), cleanup(0), erroredBindings(0), inProgressCreations(0),
+ scriptEngine(this), workerScriptEngine(0), componentAttacheds(0), inBeginCreate(false),
+ networkAccessManager(0), networkAccessManagerFactory(0),
+ typeManager(e), uniqueId(1)
+{
+ if (!qt_QmlQtModule_registered) {
+ qt_QmlQtModule_registered = true;
+ QDeclarativeItemModule::defineModule();
+ QDeclarativeUtilModule::defineModule();
+ QDeclarativeEnginePrivate::defineModule();
+ QDeclarativeValueTypeFactory::registerValueTypes();
+ }
+ globalClass = new QDeclarativeGlobalScriptClass(&scriptEngine);
+
+ // env import paths
+ QByteArray envImportPath = qgetenv("QML_IMPORT_PATH");
+ if (!envImportPath.isEmpty()) {
+#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+ QLatin1Char pathSep(';');
+#else
+ QLatin1Char pathSep(':');
+#endif
+ foreach (const QString &path, QString::fromLatin1(envImportPath).split(pathSep, QString::SkipEmptyParts)) {
+ QString canonicalPath = QDir(path).canonicalPath();
+ if (!canonicalPath.isEmpty() && !environmentImportPath.contains(canonicalPath))
+ environmentImportPath.append(canonicalPath);
+ }
+ }
+}
+
+QUrl QDeclarativeScriptEngine::resolvedUrl(QScriptContext *context, const QUrl& url)
+{
+ if (p) {
+ QDeclarativeContext *ctxt = QDeclarativeEnginePrivate::get(this)->getContext(context);
+ Q_ASSERT(ctxt);
+ return ctxt->resolvedUrl(url);
+ }
+ return baseUrl.resolved(url);
+}
+
+QDeclarativeScriptEngine::QDeclarativeScriptEngine(QDeclarativeEnginePrivate *priv)
+: p(priv), sqlQueryClass(0), namedNodeMapClass(0), nodeListClass(0)
+{
+ // Note that all documentation for stuff put on the global object goes in
+ // doc/src/declarative/globalobject.qdoc
+
+ bool mainthread = priv != 0;
+
+ QScriptValue qtObject =
+ newQMetaObject(StaticQtMetaObject::get());
+ globalObject().setProperty(QLatin1String("Qt"), qtObject);
+
+ offlineStoragePath = QDesktopServices::storageLocation(QDesktopServices::DataLocation).replace(QLatin1Char('/'), QDir::separator())
+ + QDir::separator() + QLatin1String("QML")
+ + QDir::separator() + QLatin1String("OfflineStorage");
+
+
+ qt_add_qmlxmlhttprequest(this);
+ qt_add_qmlsqldatabase(this);
+ // XXX A Multimedia "Qt.Sound" class also needs to be made available,
+ // XXX but we don't want a dependency in that cirection.
+ // XXX When the above a done some better way, that way should also be
+ // XXX used to add Qt.Sound class.
+
+
+ //types
+ qtObject.setProperty(QLatin1String("rgba"), newFunction(QDeclarativeEnginePrivate::rgba, 4));
+ qtObject.setProperty(QLatin1String("hsla"), newFunction(QDeclarativeEnginePrivate::hsla, 4));
+ qtObject.setProperty(QLatin1String("rect"), newFunction(QDeclarativeEnginePrivate::rect, 4));
+ qtObject.setProperty(QLatin1String("point"), newFunction(QDeclarativeEnginePrivate::point, 2));
+ qtObject.setProperty(QLatin1String("size"), newFunction(QDeclarativeEnginePrivate::size, 2));
+ qtObject.setProperty(QLatin1String("vector3d"), newFunction(QDeclarativeEnginePrivate::vector, 3));
+
+ if (mainthread) {
+ //color helpers
+ qtObject.setProperty(QLatin1String("lighter"), newFunction(QDeclarativeEnginePrivate::lighter, 1));
+ qtObject.setProperty(QLatin1String("darker"), newFunction(QDeclarativeEnginePrivate::darker, 1));
+ qtObject.setProperty(QLatin1String("tint"), newFunction(QDeclarativeEnginePrivate::tint, 2));
+ }
+
+ //date/time formatting
+ qtObject.setProperty(QLatin1String("formatDate"),newFunction(QDeclarativeEnginePrivate::formatDate, 2));
+ qtObject.setProperty(QLatin1String("formatTime"),newFunction(QDeclarativeEnginePrivate::formatTime, 2));
+ qtObject.setProperty(QLatin1String("formatDateTime"),newFunction(QDeclarativeEnginePrivate::formatDateTime, 2));
+
+ //misc methods
+ qtObject.setProperty(QLatin1String("closestAngle"), newFunction(QDeclarativeEnginePrivate::closestAngle, 2));
+ qtObject.setProperty(QLatin1String("openUrlExternally"),newFunction(QDeclarativeEnginePrivate::desktopOpenUrl, 1));
+ qtObject.setProperty(QLatin1String("md5"),newFunction(QDeclarativeEnginePrivate::md5, 1));
+ qtObject.setProperty(QLatin1String("btoa"),newFunction(QDeclarativeEnginePrivate::btoa, 1));
+ qtObject.setProperty(QLatin1String("atob"),newFunction(QDeclarativeEnginePrivate::atob, 1));
+ qtObject.setProperty(QLatin1String("quit"), newFunction(QDeclarativeEnginePrivate::quit, 0));
+ qtObject.setProperty(QLatin1String("resolvedUrl"),newFunction(QDeclarativeScriptEngine::resolvedUrl, 1));
+
+ //firebug/webkit compat
+ QScriptValue consoleObject = newObject();
+ consoleObject.setProperty(QLatin1String("log"),newFunction(QDeclarativeEnginePrivate::consoleLog, 1));
+ consoleObject.setProperty(QLatin1String("debug"),newFunction(QDeclarativeEnginePrivate::consoleLog, 1));
+ globalObject().setProperty(QLatin1String("console"), consoleObject);
+
+ if (mainthread) {
+ globalObject().setProperty(QLatin1String("createQmlObject"),
+ newFunction(QDeclarativeEnginePrivate::createQmlObject, 1));
+ globalObject().setProperty(QLatin1String("createComponent"),
+ newFunction(QDeclarativeEnginePrivate::createComponent, 1));
+ }
+
+ // translation functions need to be installed
+ // before the global script class is constructed (QTBUG-6437)
+ installTranslatorFunctions();
+}
+
+QDeclarativeScriptEngine::~QDeclarativeScriptEngine()
+{
+ delete sqlQueryClass;
+ delete nodeListClass;
+ delete namedNodeMapClass;
+}
+
+QScriptValue QDeclarativeScriptEngine::resolvedUrl(QScriptContext *ctxt, QScriptEngine *engine)
+{
+ QString arg = ctxt->argument(0).toString();
+ QUrl r = QDeclarativeScriptEngine::get(engine)->resolvedUrl(ctxt,QUrl(arg));
+ return QScriptValue(r.toString());
+}
+
+QNetworkAccessManager *QDeclarativeScriptEngine::networkAccessManager()
+{
+ return p->getNetworkAccessManager();
+}
+
+QDeclarativeEnginePrivate::~QDeclarativeEnginePrivate()
+{
+ while (cleanup) {
+ QDeclarativeCleanup *c = cleanup;
+ cleanup = c->next;
+ if (cleanup) cleanup->prev = &cleanup;
+ c->next = 0;
+ c->prev = 0;
+ c->clear();
+ }
+
+ delete rootContext;
+ rootContext = 0;
+ delete contextClass;
+ contextClass = 0;
+ delete objectClass;
+ objectClass = 0;
+ delete valueTypeClass;
+ valueTypeClass = 0;
+ delete typeNameClass;
+ typeNameClass = 0;
+ delete listClass;
+ listClass = 0;
+ delete globalClass;
+ globalClass = 0;
+
+ for(int ii = 0; ii < bindValues.count(); ++ii)
+ clear(bindValues[ii]);
+ for(int ii = 0; ii < parserStatus.count(); ++ii)
+ clear(parserStatus[ii]);
+ for(QHash<int, QDeclarativeCompiledData*>::ConstIterator iter = m_compositeTypes.constBegin(); iter != m_compositeTypes.constEnd(); ++iter)
+ (*iter)->release();
+ for(QHash<const QMetaObject *, QDeclarativePropertyCache *>::Iterator iter = propertyCache.begin(); iter != propertyCache.end(); ++iter)
+ (*iter)->release();
+
+}
+
+void QDeclarativeEnginePrivate::clear(SimpleList<QDeclarativeAbstractBinding> &bvs)
+{
+ bvs.clear();
+}
+
+void QDeclarativeEnginePrivate::clear(SimpleList<QDeclarativeParserStatus> &pss)
+{
+ for (int ii = 0; ii < pss.count; ++ii) {
+ QDeclarativeParserStatus *ps = pss.at(ii);
+ if(ps)
+ ps->d = 0;
+ }
+ pss.clear();
+}
+
+Q_GLOBAL_STATIC(QDeclarativeEngineDebugServer, qmlEngineDebugServer);
+Q_GLOBAL_STATIC(QSet<QString>, qmlEnginePluginsWithRegisteredTypes);
+
+void QDeclarativeEnginePrivate::init()
+{
+ Q_Q(QDeclarativeEngine);
+ qRegisterMetaType<QVariant>("QVariant");
+ qRegisterMetaType<QDeclarativeScriptString>("QDeclarativeScriptString");
+ qRegisterMetaType<QScriptValue>("QScriptValue");
+
+ contextClass = new QDeclarativeContextScriptClass(q);
+ objectClass = new QDeclarativeObjectScriptClass(q);
+ valueTypeClass = new QDeclarativeValueTypeScriptClass(q);
+ typeNameClass = new QDeclarativeTypeNameScriptClass(q);
+ listClass = new QDeclarativeListScriptClass(q);
+ rootContext = new QDeclarativeContext(q,true);
+
+ if (QCoreApplication::instance()->thread() == q->thread() &&
+ QDeclarativeEngineDebugServer::isDebuggingEnabled()) {
+ qmlEngineDebugServer();
+ isDebugging = true;
+ QDeclarativeEngineDebugServer::addEngine(q);
+
+ qmlEngineDebugServer()->waitForClients();
+ }
+}
+
+QDeclarativeWorkerScriptEngine *QDeclarativeEnginePrivate::getWorkerScriptEngine()
+{
+ Q_Q(QDeclarativeEngine);
+ if (!workerScriptEngine)
+ workerScriptEngine = new QDeclarativeWorkerScriptEngine(q);
+ return workerScriptEngine;
+}
+
+/*!
+ \class QDeclarativeEngine
+ \since 4.7
+ \brief The QDeclarativeEngine class provides an environment for instantiating QML components.
+ \mainclass
+
+ Each QML component is instantiated in a QDeclarativeContext. QDeclarativeContext's are
+ essential for passing data to QML components. In QML, contexts are arranged
+ hierarchically and this hierarchy is managed by the QDeclarativeEngine.
+
+ Prior to creating any QML components, an application must have created a
+ QDeclarativeEngine to gain access to a QML context. The following example shows how
+ to create a simple Text item.
+
+ \code
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.6\nText { text: \"Hello world!\" }", QUrl());
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(component.create());
+
+ //add item to view, etc
+ ...
+ \endcode
+
+ In this case, the Text item will be created in the engine's
+ \l {QDeclarativeEngine::rootContext()}{root context}.
+
+ \sa QDeclarativeComponent QDeclarativeContext
+*/
+
+/*!
+ Create a new QDeclarativeEngine with the given \a parent.
+*/
+QDeclarativeEngine::QDeclarativeEngine(QObject *parent)
+: QObject(*new QDeclarativeEnginePrivate(this), parent)
+{
+ Q_D(QDeclarativeEngine);
+ d->init();
+}
+
+/*!
+ Destroys the QDeclarativeEngine.
+
+ Any QDeclarativeContext's created on this engine will be invalidated, but not
+ destroyed (unless they are parented to the QDeclarativeEngine object).
+*/
+QDeclarativeEngine::~QDeclarativeEngine()
+{
+ Q_D(QDeclarativeEngine);
+ if (d->isDebugging)
+ QDeclarativeEngineDebugServer::remEngine(this);
+}
+
+/*! \fn void QDeclarativeEngine::quit()
+ This signal is emitted when the QDeclarativeEngine quits.
+ */
+
+/*!
+ Clears the engine's internal component cache.
+
+ Normally the QDeclarativeEngine caches components loaded from qml files. This method
+ clears this cache and forces the component to be reloaded.
+ */
+void QDeclarativeEngine::clearComponentCache()
+{
+ Q_D(QDeclarativeEngine);
+ d->typeManager.clearCache();
+}
+
+/*!
+ Returns the engine's root context.
+
+ The root context is automatically created by the QDeclarativeEngine. Data that
+ should be available to all QML component instances instantiated by the
+ engine should be put in the root context.
+
+ Additional data that should only be available to a subset of component
+ instances should be added to sub-contexts parented to the root context.
+*/
+QDeclarativeContext *QDeclarativeEngine::rootContext()
+{
+ Q_D(QDeclarativeEngine);
+ return d->rootContext;
+}
+
+/*!
+ Sets the \a factory to use for creating QNetworkAccessManager(s).
+
+ QNetworkAccessManager is used for all network access by QML.
+ By implementing a factory it is possible to create custom
+ QNetworkAccessManager with specialized caching, proxy and
+ cookie support.
+
+ The factory must be set before exceuting the engine.
+*/
+void QDeclarativeEngine::setNetworkAccessManagerFactory(QDeclarativeNetworkAccessManagerFactory *factory)
+{
+ Q_D(QDeclarativeEngine);
+ QMutexLocker locker(&d->mutex);
+ d->networkAccessManagerFactory = factory;
+}
+
+/*!
+ Returns the current QDeclarativeNetworkAccessManagerFactory.
+
+ \sa setNetworkAccessManagerFactory()
+*/
+QDeclarativeNetworkAccessManagerFactory *QDeclarativeEngine::networkAccessManagerFactory() const
+{
+ Q_D(const QDeclarativeEngine);
+ return d->networkAccessManagerFactory;
+}
+
+QNetworkAccessManager *QDeclarativeEnginePrivate::createNetworkAccessManager(QObject *parent) const
+{
+ QMutexLocker locker(&mutex);
+ QNetworkAccessManager *nam;
+ if (networkAccessManagerFactory) {
+ nam = networkAccessManagerFactory->create(parent);
+ } else {
+ nam = new QNetworkAccessManager(parent);
+ }
+
+ return nam;
+}
+
+QNetworkAccessManager *QDeclarativeEnginePrivate::getNetworkAccessManager() const
+{
+ Q_Q(const QDeclarativeEngine);
+ if (!networkAccessManager)
+ networkAccessManager = createNetworkAccessManager(const_cast<QDeclarativeEngine*>(q));
+ return networkAccessManager;
+}
+
+/*!
+ Returns a common QNetworkAccessManager which can be used by any QML element
+ instantiated by this engine.
+
+ If a QDeclarativeNetworkAccessManagerFactory has been set and a QNetworkAccessManager
+ has not yet been created, the QDeclarativeNetworkAccessManagerFactory will be used
+ to create the QNetworkAccessManager; otherwise the returned QNetworkAccessManager
+ will have no proxy or cache set.
+
+ \sa setNetworkAccessManagerFactory()
+*/
+QNetworkAccessManager *QDeclarativeEngine::networkAccessManager() const
+{
+ Q_D(const QDeclarativeEngine);
+ return d->getNetworkAccessManager();
+}
+
+/*!
+ Sets the \a provider to use for images requested via the \e image: url
+ scheme, with host \a providerId.
+
+ QDeclarativeImageProvider allows images to be provided to QML asynchronously.
+ The image request will be run in a low priority thread. This allows
+ potentially costly image loading to be done in the background, without
+ affecting the performance of the UI.
+
+ Note that images loaded from a QDeclarativeImageProvider are cached by
+ QPixmapCache, similar to any image loaded by QML.
+
+ The QDeclarativeEngine assumes ownership of the provider.
+
+ This example creates a provider with id \e colors:
+
+ \snippet examples/declarative/imageprovider/imageprovider.cpp 0
+
+ \snippet examples/declarative/imageprovider/imageprovider.qml 0
+
+ \sa removeImageProvider()
+*/
+void QDeclarativeEngine::addImageProvider(const QString &providerId, QDeclarativeImageProvider *provider)
+{
+ Q_D(QDeclarativeEngine);
+ QMutexLocker locker(&d->mutex);
+ d->imageProviders.insert(providerId, provider);
+}
+
+/*!
+ Returns the QDeclarativeImageProvider set for \a providerId.
+*/
+QDeclarativeImageProvider *QDeclarativeEngine::imageProvider(const QString &providerId) const
+{
+ Q_D(const QDeclarativeEngine);
+ QMutexLocker locker(&d->mutex);
+ return d->imageProviders.value(providerId);
+}
+
+/*!
+ Removes the QDeclarativeImageProvider for \a providerId.
+
+ Returns the provider if it was found; otherwise returns 0.
+
+ \sa addImageProvider()
+*/
+void QDeclarativeEngine::removeImageProvider(const QString &providerId)
+{
+ Q_D(QDeclarativeEngine);
+ QMutexLocker locker(&d->mutex);
+ delete d->imageProviders.take(providerId);
+}
+
+QImage QDeclarativeEnginePrivate::getImageFromProvider(const QUrl &url)
+{
+ QMutexLocker locker(&mutex);
+ QImage image;
+ QDeclarativeImageProvider *provider = imageProviders.value(url.host());
+ if (provider)
+ image = provider->request(url.path().mid(1));
+ return image;
+}
+
+/*!
+ Return the base URL for this engine. The base URL is only used to resolve
+ components when a relative URL is passed to the QDeclarativeComponent constructor.
+
+ If a base URL has not been explicitly set, this method returns the
+ application's current working directory.
+
+ \sa setBaseUrl()
+*/
+QUrl QDeclarativeEngine::baseUrl() const
+{
+ Q_D(const QDeclarativeEngine);
+ if (d->baseUrl.isEmpty()) {
+ return QUrl::fromLocalFile(QDir::currentPath() + QDir::separator());
+ } else {
+ return d->baseUrl;
+ }
+}
+
+/*!
+ Set the base URL for this engine to \a url.
+
+ \sa baseUrl()
+*/
+void QDeclarativeEngine::setBaseUrl(const QUrl &url)
+{
+ Q_D(QDeclarativeEngine);
+ d->baseUrl = url;
+}
+
+/*!
+ Returns the QDeclarativeContext for the \a object, or 0 if no context has been set.
+
+ When the QDeclarativeEngine instantiates a QObject, the context is set automatically.
+ */
+QDeclarativeContext *QDeclarativeEngine::contextForObject(const QObject *object)
+{
+ if(!object)
+ return 0;
+
+ QObjectPrivate *priv = QObjectPrivate::get(const_cast<QObject *>(object));
+
+ QDeclarativeDeclarativeData *data =
+ static_cast<QDeclarativeDeclarativeData *>(priv->declarativeData);
+
+ if (!data)
+ return 0;
+ else if (data->outerContext)
+ return data->outerContext;
+ else
+ return data->context;
+}
+
+/*!
+ Sets the QDeclarativeContext for the \a object to \a context.
+ If the \a object already has a context, a warning is
+ output, but the context is not changed.
+
+ When the QDeclarativeEngine instantiates a QObject, the context is set automatically.
+ */
+void QDeclarativeEngine::setContextForObject(QObject *object, QDeclarativeContext *context)
+{
+ if (!object || !context)
+ return;
+
+ QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(object, true);
+ if (data->context) {
+ qWarning("QDeclarativeEngine::setContextForObject(): Object already has a QDeclarativeContext");
+ return;
+ }
+
+ data->context = context;
+ data->nextContextObject = context->d_func()->contextObjects;
+ if (data->nextContextObject)
+ data->nextContextObject->prevContextObject = &data->nextContextObject;
+ data->prevContextObject = &context->d_func()->contextObjects;
+ context->d_func()->contextObjects = data;
+}
+
+void qmlExecuteDeferred(QObject *object)
+{
+ QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(object);
+
+ if (data && data->deferredComponent) {
+
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(data->context->engine());
+
+ QDeclarativeComponentPrivate::ConstructionState state;
+ QDeclarativeComponentPrivate::beginDeferred(data->context, ep, object, &state);
+
+ data->deferredComponent->release();
+ data->deferredComponent = 0;
+
+ QDeclarativeComponentPrivate::complete(ep, &state);
+
+ if (!state.errors.isEmpty())
+ qWarning() << state.errors;
+
+ }
+}
+
+QDeclarativeContext *qmlContext(const QObject *obj)
+{
+ return QDeclarativeEngine::contextForObject(obj);
+}
+
+QDeclarativeEngine *qmlEngine(const QObject *obj)
+{
+ QDeclarativeContext *context = QDeclarativeEngine::contextForObject(obj);
+ return context?context->engine():0;
+}
+
+QObject *qmlAttachedPropertiesObjectById(int id, const QObject *object, bool create)
+{
+ QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(object);
+ if (!data)
+ return 0; // Attached properties are only on objects created by QML
+
+ QObject *rv = data->attachedProperties?data->attachedProperties->value(id):0;
+ if (rv || !create)
+ return rv;
+
+ QDeclarativeAttachedPropertiesFunc pf = QDeclarativeMetaType::attachedPropertiesFuncById(id);
+ if (!pf)
+ return 0;
+
+ rv = pf(const_cast<QObject *>(object));
+
+ if (rv) {
+ if (!data->attachedProperties)
+ data->attachedProperties = new QHash<int, QObject *>();
+ data->attachedProperties->insert(id, rv);
+ }
+
+ return rv;
+}
+
+QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *object,
+ const QMetaObject *attachedMetaObject, bool create)
+{
+ if (*idCache == -1)
+ *idCache = QDeclarativeMetaType::attachedPropertiesFuncId(attachedMetaObject);
+
+ if (*idCache == -1 || !object)
+ return 0;
+
+ return qmlAttachedPropertiesObjectById(*idCache, object, create);
+}
+
+void QDeclarativeDeclarativeData::destroyed(QObject *object)
+{
+ if (deferredComponent)
+ deferredComponent->release();
+ if (attachedProperties)
+ delete attachedProperties;
+
+ if (nextContextObject)
+ nextContextObject->prevContextObject = prevContextObject;
+ if (prevContextObject)
+ *prevContextObject = nextContextObject;
+
+ QDeclarativeAbstractBinding *binding = bindings;
+ while (binding) {
+ QDeclarativeAbstractBinding *next = binding->m_nextBinding;
+ binding->m_prevBinding = 0;
+ binding->m_nextBinding = 0;
+ binding->destroy();
+ binding = next;
+ }
+
+ if (bindingBits)
+ free(bindingBits);
+
+ if (propertyCache)
+ propertyCache->release();
+
+ QDeclarativeGuard<QObject> *guard = guards;
+ while (guard) {
+ QDeclarativeGuard<QObject> *g = guard;
+ guard = guard->next;
+ g->o = 0;
+ g->prev = 0;
+ g->next = 0;
+ g->objectDestroyed(object);
+ }
+
+ delete this;
+}
+
+bool QDeclarativeDeclarativeData::hasBindingBit(int bit) const
+{
+ if (bindingBitsSize > bit)
+ return bindingBits[bit / 32] & (1 << (bit % 32));
+ else
+ return false;
+}
+
+void QDeclarativeDeclarativeData::clearBindingBit(int bit)
+{
+ if (bindingBitsSize > bit)
+ bindingBits[bit / 32] &= ~(1 << (bit % 32));
+}
+
+void QDeclarativeDeclarativeData::setBindingBit(QObject *obj, int bit)
+{
+ if (bindingBitsSize <= bit) {
+ int props = obj->metaObject()->propertyCount();
+ Q_ASSERT(bit < props);
+
+ int arraySize = (props + 31) / 32;
+ int oldArraySize = bindingBitsSize / 32;
+
+ bindingBits = (quint32 *)realloc(bindingBits,
+ arraySize * sizeof(quint32));
+
+ memset(bindingBits + oldArraySize,
+ 0x00,
+ sizeof(quint32) * (arraySize - oldArraySize));
+
+ bindingBitsSize = arraySize * 32;
+ }
+
+ bindingBits[bit / 32] |= (1 << (bit % 32));
+}
+
+/*!
+ Creates a QScriptValue allowing you to use \a object in QML script.
+ \a engine is the QDeclarativeEngine it is to be created in.
+
+ The QScriptValue returned is a QtScript Object, not a QtScript QObject, due
+ to the special needs of QML requiring more functionality than a standard
+ QtScript QObject.
+*/
+QScriptValue QDeclarativeEnginePrivate::qmlScriptObject(QObject* object,
+ QDeclarativeEngine* engine)
+{
+ QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
+ return enginePriv->objectClass->newQObject(object);
+}
+
+/*!
+ Returns the QDeclarativeContext for the executing QScript \a ctxt.
+*/
+QDeclarativeContext *QDeclarativeEnginePrivate::getContext(QScriptContext *ctxt)
+{
+ QScriptValue scopeNode = QScriptDeclarativeClass::scopeChainValue(ctxt, -3);
+ Q_ASSERT(scopeNode.isValid());
+ Q_ASSERT(QScriptDeclarativeClass::scriptClass(scopeNode) == contextClass);
+ return contextClass->contextFromValue(scopeNode);
+}
+
+QScriptValue QDeclarativeEnginePrivate::createComponent(QScriptContext *ctxt,
+ QScriptEngine *engine)
+{
+ QDeclarativeEnginePrivate *activeEnginePriv =
+ static_cast<QDeclarativeScriptEngine*>(engine)->p;
+ QDeclarativeEngine* activeEngine = activeEnginePriv->q_func();
+
+ QDeclarativeContext* context = activeEnginePriv->getContext(ctxt);
+ Q_ASSERT(context);
+ if(ctxt->argumentCount() != 1) {
+ return engine->nullValue();
+ }else{
+ QString arg = ctxt->argument(0).toString();
+ if (arg.isEmpty())
+ return engine->nullValue();
+ QUrl url = QUrl(context->resolvedUrl(QUrl(arg)));
+ QDeclarativeComponent *c = new QDeclarativeComponent(activeEngine, url, activeEngine);
+ c->setCreationContext(context);
+ return activeEnginePriv->objectClass->newQObject(c, qMetaTypeId<QDeclarativeComponent*>());
+ }
+}
+
+QScriptValue QDeclarativeEnginePrivate::createQmlObject(QScriptContext *ctxt, QScriptEngine *engine)
+{
+ QDeclarativeEnginePrivate *activeEnginePriv =
+ static_cast<QDeclarativeScriptEngine*>(engine)->p;
+ QDeclarativeEngine* activeEngine = activeEnginePriv->q_func();
+
+ if(ctxt->argumentCount() < 2 || ctxt->argumentCount() > 3)
+ return engine->nullValue();
+
+ QDeclarativeContext* context = activeEnginePriv->getContext(ctxt);
+ Q_ASSERT(context);
+
+ QString qml = ctxt->argument(0).toString();
+ if (qml.isEmpty())
+ return engine->nullValue();
+
+ QUrl url;
+ if(ctxt->argumentCount() > 2)
+ url = QUrl(ctxt->argument(2).toString());
+ else
+ url = QUrl(QLatin1String("inline"));
+
+ if (url.isValid() && url.isRelative())
+ url = context->resolvedUrl(url);
+
+ QObject *parentArg = activeEnginePriv->objectClass->toQObject(ctxt->argument(1));
+ if(!parentArg)
+ return engine->nullValue();
+
+ QDeclarativeComponent component(activeEngine);
+ component.setData(qml.toUtf8(), url);
+
+ if(component.isError()) {
+ QList<QDeclarativeError> errors = component.errors();
+ qWarning().nospace() << "QDeclarativeEngine::createQmlObject():";
+ foreach (const QDeclarativeError &error, errors)
+ qWarning().nospace() << " " << error;
+
+ return engine->nullValue();
+ }
+
+ if (!component.isReady()) {
+ qWarning().nospace() << "QDeclarativeEngine::createQmlObject(): Component is not ready";
+
+ return engine->nullValue();
+ }
+
+ QObject *obj = component.create(context);
+
+ if(component.isError()) {
+ QList<QDeclarativeError> errors = component.errors();
+ qWarning().nospace() << "QDeclarativeEngine::createQmlObject():";
+ foreach (const QDeclarativeError &error, errors)
+ qWarning().nospace() << " " << error;
+
+ return engine->nullValue();
+ }
+
+ Q_ASSERT(obj);
+
+ obj->setParent(parentArg);
+ QGraphicsObject* gobj = qobject_cast<QGraphicsObject*>(obj);
+ QGraphicsObject* gparent = qobject_cast<QGraphicsObject*>(parentArg);
+ if(gobj && gparent)
+ gobj->setParentItem(gparent);
+
+ return qmlScriptObject(obj, activeEngine);
+}
+
+QScriptValue QDeclarativeEnginePrivate::vector(QScriptContext *ctxt, QScriptEngine *engine)
+{
+ if(ctxt->argumentCount() != 3)
+ return engine->nullValue();
+ qsreal x = ctxt->argument(0).toNumber();
+ qsreal y = ctxt->argument(1).toNumber();
+ qsreal z = ctxt->argument(2).toNumber();
+ return engine->newVariant(qVariantFromValue(QVector3D(x, y, z)));
+}
+
+QScriptValue QDeclarativeEnginePrivate::formatDate(QScriptContext*ctxt, QScriptEngine*engine)
+{
+ int argCount = ctxt->argumentCount();
+ if(argCount == 0 || argCount > 2)
+ return engine->nullValue();
+
+ QDate date = ctxt->argument(0).toDateTime().date();
+ Qt::DateFormat enumFormat = Qt::DefaultLocaleShortDate;
+ if (argCount == 2) {
+ if (ctxt->argument(1).isString()) {
+ QString format = ctxt->argument(1).toString();
+ return engine->newVariant(qVariantFromValue(date.toString(format)));
+ } else if (ctxt->argument(1).isNumber()) {
+ enumFormat = Qt::DateFormat(ctxt->argument(1).toUInt32());
+ } else
+ return engine->nullValue();
+ }
+ return engine->newVariant(qVariantFromValue(date.toString(enumFormat)));
+}
+
+QScriptValue QDeclarativeEnginePrivate::formatTime(QScriptContext*ctxt, QScriptEngine*engine)
+{
+ int argCount = ctxt->argumentCount();
+ if(argCount == 0 || argCount > 2)
+ return engine->nullValue();
+
+ QTime date = ctxt->argument(0).toDateTime().time();
+ Qt::DateFormat enumFormat = Qt::DefaultLocaleShortDate;
+ if (argCount == 2) {
+ if (ctxt->argument(1).isString()) {
+ QString format = ctxt->argument(1).toString();
+ return engine->newVariant(qVariantFromValue(date.toString(format)));
+ } else if (ctxt->argument(1).isNumber()) {
+ enumFormat = Qt::DateFormat(ctxt->argument(1).toUInt32());
+ } else
+ return engine->nullValue();
+ }
+ return engine->newVariant(qVariantFromValue(date.toString(enumFormat)));
+}
+
+QScriptValue QDeclarativeEnginePrivate::formatDateTime(QScriptContext*ctxt, QScriptEngine*engine)
+{
+ int argCount = ctxt->argumentCount();
+ if(argCount == 0 || argCount > 2)
+ return engine->nullValue();
+
+ QDateTime date = ctxt->argument(0).toDateTime();
+ Qt::DateFormat enumFormat = Qt::DefaultLocaleShortDate;
+ if (argCount == 2) {
+ if (ctxt->argument(1).isString()) {
+ QString format = ctxt->argument(1).toString();
+ return engine->newVariant(qVariantFromValue(date.toString(format)));
+ } else if (ctxt->argument(1).isNumber()) {
+ enumFormat = Qt::DateFormat(ctxt->argument(1).toUInt32());
+ } else
+ return engine->nullValue();
+ }
+ return engine->newVariant(qVariantFromValue(date.toString(enumFormat)));
+}
+
+QScriptValue QDeclarativeEnginePrivate::rgba(QScriptContext *ctxt, QScriptEngine *engine)
+{
+ int argCount = ctxt->argumentCount();
+ if(argCount < 3 || argCount > 4)
+ return engine->nullValue();
+ qsreal r = ctxt->argument(0).toNumber();
+ qsreal g = ctxt->argument(1).toNumber();
+ qsreal b = ctxt->argument(2).toNumber();
+ qsreal a = (argCount == 4) ? ctxt->argument(3).toNumber() : 1;
+
+ if (r < 0 || r > 1 || g < 0 || g > 1 || b < 0 || b > 1 || a < 0 || a > 1)
+ return engine->nullValue();
+
+ return qScriptValueFromValue(engine, qVariantFromValue(QColor::fromRgbF(r, g, b, a)));
+}
+
+QScriptValue QDeclarativeEnginePrivate::hsla(QScriptContext *ctxt, QScriptEngine *engine)
+{
+ int argCount = ctxt->argumentCount();
+ if(argCount < 3 || argCount > 4)
+ return engine->nullValue();
+ qsreal h = ctxt->argument(0).toNumber();
+ qsreal s = ctxt->argument(1).toNumber();
+ qsreal l = ctxt->argument(2).toNumber();
+ qsreal a = (argCount == 4) ? ctxt->argument(3).toNumber() : 1;
+
+ if (h < 0 || h > 1 || s < 0 || s > 1 || l < 0 || l > 1 || a < 0 || a > 1)
+ return engine->nullValue();
+
+ return qScriptValueFromValue(engine, qVariantFromValue(QColor::fromHslF(h, s, l, a)));
+}
+
+QScriptValue QDeclarativeEnginePrivate::rect(QScriptContext *ctxt, QScriptEngine *engine)
+{
+ if(ctxt->argumentCount() != 4)
+ return engine->nullValue();
+
+ qsreal x = ctxt->argument(0).toNumber();
+ qsreal y = ctxt->argument(1).toNumber();
+ qsreal w = ctxt->argument(2).toNumber();
+ qsreal h = ctxt->argument(3).toNumber();
+
+ if (w < 0 || h < 0)
+ return engine->nullValue();
+
+ return qScriptValueFromValue(engine, qVariantFromValue(QRectF(x, y, w, h)));
+}
+
+QScriptValue QDeclarativeEnginePrivate::point(QScriptContext *ctxt, QScriptEngine *engine)
+{
+ if(ctxt->argumentCount() != 2)
+ return engine->nullValue();
+ qsreal x = ctxt->argument(0).toNumber();
+ qsreal y = ctxt->argument(1).toNumber();
+ return qScriptValueFromValue(engine, qVariantFromValue(QPointF(x, y)));
+}
+
+QScriptValue QDeclarativeEnginePrivate::size(QScriptContext *ctxt, QScriptEngine *engine)
+{
+ if(ctxt->argumentCount() != 2)
+ return engine->nullValue();
+ qsreal w = ctxt->argument(0).toNumber();
+ qsreal h = ctxt->argument(1).toNumber();
+ return qScriptValueFromValue(engine, qVariantFromValue(QSizeF(w, h)));
+}
+
+QScriptValue QDeclarativeEnginePrivate::lighter(QScriptContext *ctxt, QScriptEngine *engine)
+{
+ if(ctxt->argumentCount() != 1)
+ return engine->nullValue();
+ QVariant v = ctxt->argument(0).toVariant();
+ QColor color;
+ if (v.userType() == QVariant::Color)
+ color = v.value<QColor>();
+ else if (v.userType() == QVariant::String) {
+ bool ok;
+ color = QDeclarativeStringConverters::colorFromString(v.toString(), &ok);
+ if (!ok)
+ return engine->nullValue();
+ } else
+ return engine->nullValue();
+ color = color.lighter();
+ return qScriptValueFromValue(engine, qVariantFromValue(color));
+}
+
+QScriptValue QDeclarativeEnginePrivate::darker(QScriptContext *ctxt, QScriptEngine *engine)
+{
+ if(ctxt->argumentCount() != 1)
+ return engine->nullValue();
+ QVariant v = ctxt->argument(0).toVariant();
+ QColor color;
+ if (v.userType() == QVariant::Color)
+ color = v.value<QColor>();
+ else if (v.userType() == QVariant::String) {
+ bool ok;
+ color = QDeclarativeStringConverters::colorFromString(v.toString(), &ok);
+ if (!ok)
+ return engine->nullValue();
+ } else
+ return engine->nullValue();
+ color = color.darker();
+ return qScriptValueFromValue(engine, qVariantFromValue(color));
+}
+
+QScriptValue QDeclarativeEnginePrivate::desktopOpenUrl(QScriptContext *ctxt, QScriptEngine *e)
+{
+ if(ctxt->argumentCount() < 1)
+ return e->newVariant(QVariant(false));
+ bool ret = QDesktopServices::openUrl(QUrl(ctxt->argument(0).toString()));
+ return e->newVariant(QVariant(ret));
+}
+
+QScriptValue QDeclarativeEnginePrivate::md5(QScriptContext *ctxt, QScriptEngine *)
+{
+ QByteArray data;
+
+ if (ctxt->argumentCount() >= 1)
+ data = ctxt->argument(0).toString().toUtf8();
+
+ QByteArray result = QCryptographicHash::hash(data, QCryptographicHash::Md5);
+
+ return QScriptValue(QLatin1String(result.toHex()));
+}
+
+QScriptValue QDeclarativeEnginePrivate::btoa(QScriptContext *ctxt, QScriptEngine *)
+{
+ QByteArray data;
+
+ if (ctxt->argumentCount() >= 1)
+ data = ctxt->argument(0).toString().toUtf8();
+
+ return QScriptValue(QLatin1String(data.toBase64()));
+}
+
+QScriptValue QDeclarativeEnginePrivate::atob(QScriptContext *ctxt, QScriptEngine *)
+{
+ QByteArray data;
+
+ if (ctxt->argumentCount() >= 1)
+ data = ctxt->argument(0).toString().toUtf8();
+
+ return QScriptValue(QLatin1String(QByteArray::fromBase64(data)));
+}
+
+QScriptValue QDeclarativeEnginePrivate::consoleLog(QScriptContext *ctxt, QScriptEngine *e)
+{
+ if(ctxt->argumentCount() < 1)
+ return e->newVariant(QVariant(false));
+
+ QByteArray msg;
+
+ for (int i=0; i<ctxt->argumentCount(); ++i) {
+ if (!msg.isEmpty()) msg += ' ';
+ msg += ctxt->argument(i).toString().toLocal8Bit();
+ // does not support firebug "%[a-z]" formatting, since firebug really
+ // does just ignore the format letter, which makes it pointless.
+ }
+
+ qDebug("%s",msg.constData());
+
+ return e->newVariant(QVariant(true));
+}
+
+void QDeclarativeEnginePrivate::sendQuit ()
+{
+ Q_Q(QDeclarativeEngine);
+ emit q->quit();
+}
+
+QScriptValue QDeclarativeEnginePrivate::quit(QScriptContext * /*ctxt*/, QScriptEngine *e)
+{
+ QDeclarativeEnginePrivate *qe = get (e);
+ qe->sendQuit ();
+ return QScriptValue();
+}
+
+QScriptValue QDeclarativeEnginePrivate::closestAngle(QScriptContext *ctxt, QScriptEngine *e)
+{
+ if(ctxt->argumentCount() < 2)
+ return e->newVariant(QVariant(0.0));
+ qreal a = ctxt->argument(0).toNumber();
+ qreal b = ctxt->argument(1).toNumber();
+ qreal ret = b;
+ qreal diff = b-a;
+ while(diff > 180.0){
+ ret -= 360.0;
+ diff -= 360.0;
+ }
+ while(diff < -180.0){
+ ret += 360.0;
+ diff += 360.0;
+ }
+ return e->newVariant(QVariant(ret));
+}
+
+QScriptValue QDeclarativeEnginePrivate::tint(QScriptContext *ctxt, QScriptEngine *engine)
+{
+ if(ctxt->argumentCount() != 2)
+ return engine->nullValue();
+ //get color
+ QVariant v = ctxt->argument(0).toVariant();
+ QColor color;
+ if (v.userType() == QVariant::Color)
+ color = v.value<QColor>();
+ else if (v.userType() == QVariant::String) {
+ bool ok;
+ color = QDeclarativeStringConverters::colorFromString(v.toString(), &ok);
+ if (!ok)
+ return engine->nullValue();
+ } else
+ return engine->nullValue();
+
+ //get tint color
+ v = ctxt->argument(1).toVariant();
+ QColor tintColor;
+ if (v.userType() == QVariant::Color)
+ tintColor = v.value<QColor>();
+ else if (v.userType() == QVariant::String) {
+ bool ok;
+ tintColor = QDeclarativeStringConverters::colorFromString(v.toString(), &ok);
+ if (!ok)
+ return engine->nullValue();
+ } else
+ return engine->nullValue();
+
+ //tint
+ QColor finalColor;
+ int a = tintColor.alpha();
+ if (a == 0xFF)
+ finalColor = tintColor;
+ else if (a == 0x00)
+ finalColor = color;
+ else {
+ qreal a = tintColor.alphaF();
+ qreal inv_a = 1.0 - a;
+
+ finalColor.setRgbF(tintColor.redF() * a + color.redF() * inv_a,
+ tintColor.greenF() * a + color.greenF() * inv_a,
+ tintColor.blueF() * a + color.blueF() * inv_a,
+ a + inv_a * color.alphaF());
+ }
+
+ return qScriptValueFromValue(engine, qVariantFromValue(finalColor));
+}
+
+
+QScriptValue QDeclarativeEnginePrivate::scriptValueFromVariant(const QVariant &val)
+{
+ if (val.userType() == qMetaTypeId<QDeclarativeListReference>()) {
+ QDeclarativeListReferencePrivate *p = QDeclarativeListReferencePrivate::get((QDeclarativeListReference*)val.constData());
+ if (p->object) {
+ return listClass->newList(p->property, p->propertyType);
+ } else {
+ return scriptEngine.nullValue();
+ }
+ }
+
+ bool objOk;
+ QObject *obj = QDeclarativeMetaType::toQObject(val, &objOk);
+ if (objOk) {
+ return objectClass->newQObject(obj);
+ } else {
+ return qScriptValueFromValue(&scriptEngine, val);
+ }
+}
+
+QVariant QDeclarativeEnginePrivate::scriptValueToVariant(const QScriptValue &val)
+{
+ QScriptDeclarativeClass *dc = QScriptDeclarativeClass::scriptClass(val);
+ if (dc == objectClass)
+ return QVariant::fromValue(objectClass->toQObject(val));
+ else if (dc == contextClass)
+ return QVariant();
+
+ QScriptDeclarativeClass *sc = QScriptDeclarativeClass::scriptClass(val);
+ if (!sc) {
+ return val.toVariant();
+ } else if (sc == valueTypeClass) {
+ return valueTypeClass->toVariant(val);
+ } else {
+ return QVariant();
+ }
+}
+
+QDeclarativeScriptClass::QDeclarativeScriptClass(QScriptEngine *engine)
+: QScriptDeclarativeClass(engine)
+{
+}
+
+QVariant QDeclarativeScriptClass::toVariant(QDeclarativeEngine *engine, const QScriptValue &val)
+{
+ QDeclarativeEnginePrivate *ep =
+ static_cast<QDeclarativeEnginePrivate *>(QObjectPrivate::get(engine));
+
+ return ep->scriptValueToVariant(val);
+}
+
+// XXX this beyonds in QUrl::toLocalFile()
+static QString toLocalFileOrQrc(const QUrl& url)
+{
+ QString r = url.toLocalFile();
+ if (r.isEmpty() && url.scheme() == QLatin1String("qrc"))
+ r = QLatin1Char(':') + url.path();
+ return r;
+}
+
+/////////////////////////////////////////////////////////////
+struct QDeclarativeEnginePrivate::ImportedNamespace {
+ QStringList uris;
+ QStringList urls;
+ QList<int> majversions;
+ QList<int> minversions;
+ QList<bool> isLibrary;
+ QList<QString> qmlDirContent;
+
+ bool find(const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return, QUrl* url_return) const
+ {
+ for (int i=0; i<urls.count(); ++i) {
+ int vmaj = majversions.at(i);
+ int vmin = minversions.at(i);
+
+ QByteArray qt = uris.at(i).toUtf8();
+ qt += '/';
+ qt += type;
+
+ if (qmlImportTrace())
+ qDebug() << "Look in" << qt;
+ QDeclarativeType *t = QDeclarativeMetaType::qmlType(qt,vmaj,vmin);
+ if (t) {
+ if (vmajor) *vmajor = vmaj;
+ if (vminor) *vminor = vmin;
+ if (qmlImportTrace())
+ qDebug() << "Found" << qt;
+ if (type_return)
+ *type_return = t;
+ return true;
+ }
+
+ QUrl url = QUrl(urls.at(i) + QLatin1Char('/') + QString::fromUtf8(type) + QLatin1String(".qml"));
+ QString qmldircontent = qmlDirContent.at(i);
+ if (vmaj>=0 || !qmldircontent.isEmpty()) {
+ // Check version file - XXX cache these in QDeclarativeEngine!
+ if (qmldircontent.isEmpty()) {
+ QFile qmldir(toLocalFileOrQrc(QUrl(urls.at(i)+QLatin1String("/qmldir"))));
+ if (qmldir.open(QIODevice::ReadOnly)) {
+ qmldircontent = QString::fromUtf8(qmldir.readAll());
+ }
+ }
+
+ const QString typeName = QString::fromUtf8(type);
+
+ QDeclarativeDirParser qmldirParser;
+ qmldirParser.setUrl(url);
+ qmldirParser.setSource(qmldircontent);
+ qmldirParser.parse();
+
+ foreach (const QDeclarativeDirParser::Component &c, qmldirParser.components()) { // ### TODO: cache the components
+ if (c.majorVersion < vmaj || (c.majorVersion == vmaj && vmin >= c.minorVersion)) {
+ if (c.typeName == typeName) {
+ if (url_return)
+ *url_return = url.resolved(QUrl(c.fileName));
+
+ return true;
+ }
+ }
+ }
+
+ } else {
+ // XXX search non-files too! (eg. zip files, see QT-524)
+ QFileInfo f(toLocalFileOrQrc(url));
+ if (f.exists()) {
+ if (url_return)
+ *url_return = url;
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+};
+
+class QDeclarativeImportsPrivate {
+public:
+ QDeclarativeImportsPrivate() : ref(1)
+ {
+ }
+
+ ~QDeclarativeImportsPrivate()
+ {
+ foreach (QDeclarativeEnginePrivate::ImportedNamespace* s, set.values())
+ delete s;
+ }
+
+ QSet<QString> qmlDirFilesForWhichPluginsHaveBeenLoaded;
+
+ bool add(const QUrl& base, const QString& qmldircontent, const QString& uri, const QString& prefix, int vmaj, int vmin, QDeclarativeScriptParser::Import::Type importType, const QStringList& importPath, QDeclarativeEngine *engine)
+ {
+ QDeclarativeEnginePrivate::ImportedNamespace *s;
+ if (prefix.isEmpty()) {
+ s = &unqualifiedset;
+ } else {
+ s = set.value(prefix);
+ if (!s)
+ set.insert(prefix,(s=new QDeclarativeEnginePrivate::ImportedNamespace));
+ }
+ QString url = uri;
+ if (importType == QDeclarativeScriptParser::Import::Library) {
+ url.replace(QLatin1Char('.'), QLatin1Char('/'));
+ bool found = false;
+ QString content;
+ QString dir;
+
+ // user import paths
+ QStringList paths;
+
+ // base..
+ paths += QFileInfo(base.toLocalFile()).path();
+ paths += importPath;
+ paths += QDeclarativeEnginePrivate::get(engine)->environmentImportPath;
+#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0))
+ QString builtinPath = QLibraryInfo::location(QLibraryInfo::ImportsPath);
+#else
+ QString builtinPath;
+#endif
+ if (!builtinPath.isEmpty())
+ paths += builtinPath;
+
+ foreach (const QString &p, paths) {
+ dir = p+QLatin1Char('/')+url;
+ QFileInfo fi(dir+QLatin1String("/qmldir"));
+ const QString absoluteFilePath = fi.absoluteFilePath();
+
+ if (fi.isFile()) {
+ found = true;
+
+ url = QUrl::fromLocalFile(fi.absolutePath()).toString();
+
+ QFile file(absoluteFilePath);
+ if (file.open(QFile::ReadOnly))
+ content = QString::fromUtf8(file.readAll());
+
+ if (! qmlDirFilesForWhichPluginsHaveBeenLoaded.contains(absoluteFilePath)) {
+ qmlDirFilesForWhichPluginsHaveBeenLoaded.insert(absoluteFilePath);
+
+ QDeclarativeDirParser qmldirParser;
+ qmldirParser.setSource(content);
+ qmldirParser.parse();
+
+ foreach (const QDeclarativeDirParser::Plugin &plugin, qmldirParser.plugins()) {
+ QString resolvedFilePath = QDeclarativeEnginePrivate::get(engine)->resolvePlugin(QDir(dir + QDir::separator() + plugin.path),
+ plugin.name);
+
+ if (!resolvedFilePath.isEmpty())
+ engine->importExtension(resolvedFilePath, uri);
+ }
+ }
+
+ break;
+ }
+ }
+
+ } else {
+ url = base.resolved(QUrl(url)).toString();
+ }
+
+ s->uris.prepend(uri);
+ s->urls.prepend(url);
+ s->majversions.prepend(vmaj);
+ s->minversions.prepend(vmin);
+ s->isLibrary.prepend(importType == QDeclarativeScriptParser::Import::Library);
+ s->qmlDirContent.prepend(qmldircontent);
+ return true;
+ }
+
+ bool find(const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return, QUrl* url_return)
+ {
+ QDeclarativeEnginePrivate::ImportedNamespace *s = 0;
+ int slash = type.indexOf('/');
+ if (slash >= 0) {
+ s = set.value(QString::fromUtf8(type.left(slash)));
+ if (!s)
+ return false; // qualifier must be a namespace
+ int nslash = type.indexOf('/',slash+1);
+ if (nslash > 0)
+ return false; // only single qualification allowed
+ } else {
+ s = &unqualifiedset;
+ }
+ QByteArray unqualifiedtype = slash < 0 ? type : type.mid(slash+1); // common-case opt (QString::mid works fine, but slower)
+ if (s) {
+ if (s->find(unqualifiedtype,vmajor,vminor,type_return,url_return))
+ return true;
+ if (s->urls.count() == 1 && !s->isLibrary[0] && url_return) {
+ *url_return = QUrl(s->urls[0]+QLatin1Char('/')).resolved(QUrl(QString::fromUtf8(unqualifiedtype) + QLatin1String(".qml")));
+ return true;
+ }
+
+ }
+ if (url_return) {
+ *url_return = base.resolved(QUrl(QString::fromUtf8(type + ".qml")));
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ QDeclarativeEnginePrivate::ImportedNamespace *findNamespace(const QString& type)
+ {
+ return set.value(type);
+ }
+
+ QUrl base;
+ int ref;
+
+private:
+ friend struct QDeclarativeEnginePrivate::Imports;
+ QDeclarativeEnginePrivate::ImportedNamespace unqualifiedset;
+ QHash<QString,QDeclarativeEnginePrivate::ImportedNamespace* > set;
+};
+
+QDeclarativeEnginePrivate::Imports::Imports(const Imports &copy) :
+ d(copy.d)
+{
+ ++d->ref;
+}
+
+QDeclarativeEnginePrivate::Imports &QDeclarativeEnginePrivate::Imports::operator =(const Imports &copy)
+{
+ ++copy.d->ref;
+ if (--d->ref == 0)
+ delete d;
+ d = copy.d;
+ return *this;
+}
+
+QDeclarativeEnginePrivate::Imports::Imports() :
+ d(new QDeclarativeImportsPrivate)
+{
+}
+
+QDeclarativeEnginePrivate::Imports::~Imports()
+{
+ if (--d->ref == 0)
+ delete d;
+}
+
+static QDeclarativeTypeNameCache *cacheForNamespace(QDeclarativeEngine *engine, const QDeclarativeEnginePrivate::ImportedNamespace &set, QDeclarativeTypeNameCache *cache)
+{
+ if (!cache)
+ cache = new QDeclarativeTypeNameCache(engine);
+
+ QList<QDeclarativeType *> types = QDeclarativeMetaType::qmlTypes();
+
+ for (int ii = 0; ii < set.uris.count(); ++ii) {
+ QByteArray base = set.uris.at(ii).toUtf8() + '/';
+ int major = set.majversions.at(ii);
+ int minor = set.minversions.at(ii);
+
+ foreach (QDeclarativeType *type, types) {
+ if (type->qmlTypeName().startsWith(base) &&
+ type->qmlTypeName().lastIndexOf('/') == (base.length() - 1) &&
+ type->availableInVersion(major,minor))
+ {
+ QString name = QString::fromUtf8(type->qmlTypeName().mid(base.length()));
+
+ cache->add(name, type);
+ }
+ }
+ }
+
+ return cache;
+}
+
+QDeclarativeTypeNameCache *QDeclarativeEnginePrivate::Imports::cache(QDeclarativeEngine *engine) const
+{
+ const QDeclarativeEnginePrivate::ImportedNamespace &set = d->unqualifiedset;
+
+ QDeclarativeTypeNameCache *cache = new QDeclarativeTypeNameCache(engine);
+
+ for (QHash<QString,QDeclarativeEnginePrivate::ImportedNamespace* >::ConstIterator iter = d->set.begin();
+ iter != d->set.end(); ++iter) {
+
+ QDeclarativeTypeNameCache::Data *d = cache->data(iter.key());
+ if (d) {
+ if (!d->typeNamespace)
+ cacheForNamespace(engine, *(*iter), d->typeNamespace);
+ } else {
+ QDeclarativeTypeNameCache *nc = cacheForNamespace(engine, *(*iter), 0);
+ cache->add(iter.key(), nc);
+ nc->release();
+ }
+ }
+
+ cacheForNamespace(engine, set, cache);
+
+ return cache;
+}
+
+/*
+QStringList QDeclarativeEnginePrivate::Imports::unqualifiedSet() const
+{
+ QStringList rv;
+
+ const QDeclarativeEnginePrivate::ImportedNamespace &set = d->unqualifiedset;
+
+ for (int ii = 0; ii < set.urls.count(); ++ii) {
+ if (set.isBuiltin.at(ii))
+ rv << set.urls.at(ii);
+ }
+
+ return rv;
+}
+*/
+
+/*!
+ Sets the base URL to be used for all relative file imports added.
+*/
+void QDeclarativeEnginePrivate::Imports::setBaseUrl(const QUrl& url)
+{
+ d->base = url;
+}
+
+/*!
+ Returns the base URL to be used for all relative file imports added.
+*/
+QUrl QDeclarativeEnginePrivate::Imports::baseUrl() const
+{
+ return d->base;
+}
+
+/*!
+ Adds \a path as a directory where installed QML components are
+ defined in a URL-based directory structure.
+
+ For example, if you add \c /opt/MyApp/lib/imports and then load QML
+ that imports \c com.mycompany.Feature, then QDeclarativeEngine will look
+ in \c /opt/MyApp/lib/imports/com/mycompany/Feature/ for the components
+ provided by that module. A \c qmldir file is required for definiting the
+ type version mapping and possibly declarative extensions plugins.
+
+ The engine searches in the base directory of the qml file, then
+ the paths added via addImportPath(), then the paths specified in the
+ \c QML_IMPORT_PATH environment variable, then the builtin \c ImportsPath from
+ QLibraryInfo.
+
+*/
+void QDeclarativeEngine::addImportPath(const QString& path)
+{
+ if (qmlImportTrace())
+ qDebug() << "QDeclarativeEngine::addImportPath" << path;
+ Q_D(QDeclarativeEngine);
+ d->fileImportPath.prepend(path);
+}
+
+/*!
+ Imports the extension named \a fileName from the \a uri provided.
+ Returns true if the extension was successfully imported.
+*/
+bool QDeclarativeEngine::importExtension(const QString &fileName, const QString &uri)
+{
+ QFileInfo fileInfo(fileName);
+ const QString absoluteFilePath = fileInfo.absoluteFilePath();
+ QPluginLoader loader(absoluteFilePath);
+
+ if (QDeclarativeExtensionInterface *iface = qobject_cast<QDeclarativeExtensionInterface *>(loader.instance())) {
+ const QByteArray bytes = uri.toUtf8();
+ const char *moduleId = bytes.constData();
+
+ // ### this code should probably be protected with a mutex.
+ if (! qmlEnginePluginsWithRegisteredTypes()->contains(absoluteFilePath)) {
+ // types should only be registered once (they're global).
+
+ qmlEnginePluginsWithRegisteredTypes()->insert(absoluteFilePath);
+ iface->registerTypes(moduleId);
+ }
+
+ QDeclarativeEnginePrivate *d = QDeclarativeEnginePrivate::get(this);
+
+ if (! d->initializedPlugins.contains(absoluteFilePath)) {
+ // things on the engine (eg. adding new global objects) have to be done for every engine.
+
+ // protect against double initialization
+ d->initializedPlugins.insert(absoluteFilePath);
+ iface->initializeEngine(this, moduleId);
+ }
+
+ return true;
+ }
+
+ return false;
+}
+
+/*!
+ \property QDeclarativeEngine::offlineStoragePath
+ \brief the directory for storing offline user data
+
+ Returns the directory where SQL and other offline
+ storage is placed.
+
+ QDeclarativeWebView and the SQL databases created with openDatabase()
+ are stored here.
+
+ The default is QML/OfflineStorage in the platform-standard
+ user application data directory.
+
+ Note that the path may not currently exist on the filesystem, so
+ callers wanting to \e create new files at this location should create
+ it first - see QDir::mkpath().
+*/
+void QDeclarativeEngine::setOfflineStoragePath(const QString& dir)
+{
+ Q_D(QDeclarativeEngine);
+ d->scriptEngine.offlineStoragePath = dir;
+}
+
+QString QDeclarativeEngine::offlineStoragePath() const
+{
+ Q_D(const QDeclarativeEngine);
+ return d->scriptEngine.offlineStoragePath;
+}
+
+/*!
+ \internal
+
+ Returns the result of the merge of \a baseName with \a dir, \a suffixes, and \a prefix.
+ The \a prefix must contain the dot.
+ */
+QString QDeclarativeEnginePrivate::resolvePlugin(const QDir &dir, const QString &baseName,
+ const QStringList &suffixes,
+ const QString &prefix)
+{
+ foreach (const QString &suffix, suffixes) {
+ QString pluginFileName = prefix;
+
+ pluginFileName += baseName;
+ pluginFileName += suffix;
+
+ QFileInfo fileInfo(dir, pluginFileName);
+
+ if (fileInfo.exists())
+ return fileInfo.absoluteFilePath();
+ }
+
+ return QString();
+}
+
+/*!
+ \internal
+
+ Returns the result of the merge of \a baseName with \a dir and the platform suffix.
+
+ \table
+ \header \i Platform \i Valid suffixes
+ \row \i Windows \i \c .dll
+ \row \i Unix/Linux \i \c .so
+ \row \i AIX \i \c .a
+ \row \i HP-UX \i \c .sl, \c .so (HP-UXi)
+ \row \i Mac OS X \i \c .dylib, \c .bundle, \c .so
+ \row \i Symbian \i \c .dll
+ \endtable
+
+ Version number on unix are ignored.
+*/
+QString QDeclarativeEnginePrivate::resolvePlugin(const QDir &dir, const QString &baseName)
+{
+#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
+ return resolvePlugin(dir, baseName,
+ QStringList()
+# ifdef QT_DEBUG
+ << QLatin1String("d.dll") // try a qmake-style debug build first
+# endif
+ << QLatin1String(".dll"));
+#elif defined(Q_OS_SYMBIAN)
+ return resolvePlugin(dir, baseName,
+ QStringList()
+ << QLatin1String(".dll")
+ << QLatin1String(".qtplugin"));
+#else
+
+# if defined(Q_OS_DARWIN)
+
+ return resolvePlugin(dir, baseName,
+ QStringList()
+ << QLatin1String(".dylib")
+ << QLatin1String(".so")
+ << QLatin1String(".bundle"),
+ QLatin1String("lib"));
+# else // Generic Unix
+ QStringList validSuffixList;
+
+# if defined(Q_OS_HPUX)
+/*
+ See "HP-UX Linker and Libraries User's Guide", section "Link-time Differences between PA-RISC and IPF":
+ "In PA-RISC (PA-32 and PA-64) shared libraries are suffixed with .sl. In IPF (32-bit and 64-bit),
+ the shared libraries are suffixed with .so. For compatibility, the IPF linker also supports the .sl suffix."
+ */
+ validSuffixList << QLatin1String(".sl");
+# if defined __ia64
+ validSuffixList << QLatin1String(".so");
+# endif
+# elif defined(Q_OS_AIX)
+ validSuffixList << QLatin1String(".a") << QLatin1String(".so");
+# elif defined(Q_OS_UNIX)
+ validSuffixList << QLatin1String(".so");
+# endif
+
+ // Examples of valid library names:
+ // libfoo.so
+
+ return resolvePlugin(dir, baseName, validSuffixList, QLatin1String("lib"));
+# endif
+
+#endif
+}
+
+/*!
+ \internal
+
+ Adds information to \a imports such that subsequent calls to resolveType()
+ will resolve types qualified by \a prefix by considering types found at the given \a uri.
+
+ The uri is either a directory (if importType is FileImport), or a URI resolved using paths
+ added via addImportPath() (if importType is LibraryImport).
+
+ The \a prefix may be empty, in which case the import location is considered for
+ unqualified types.
+
+ The base URL must already have been set with Import::setBaseUrl().
+*/
+bool QDeclarativeEnginePrivate::addToImport(Imports* imports, const QString& qmldircontent, const QString& uri, const QString& prefix, int vmaj, int vmin, QDeclarativeScriptParser::Import::Type importType) const
+{
+ QDeclarativeEngine *engine = QDeclarativeEnginePrivate::get(const_cast<QDeclarativeEnginePrivate *>(this));
+ bool ok = imports->d->add(imports->d->base,qmldircontent,uri,prefix,vmaj,vmin,importType,fileImportPath, engine);
+ if (qmlImportTrace())
+ qDebug() << "QDeclarativeEngine::addToImport(" << imports << uri << prefix << vmaj << '.' << vmin << (importType==QDeclarativeScriptParser::Import::Library? "Library" : "File") << ": " << ok;
+ return ok;
+}
+
+/*!
+ \internal
+
+ Using the given \a imports, the given (namespace qualified) \a type is resolved to either
+ an ImportedNamespace stored at \a ns_return,
+ a QDeclarativeType stored at \a type_return, or
+ a component located at \a url_return.
+
+ If any return pointer is 0, the corresponding search is not done.
+
+ \sa addToImport()
+*/
+bool QDeclarativeEnginePrivate::resolveType(const Imports& imports, const QByteArray& type, QDeclarativeType** type_return, QUrl* url_return, int *vmaj, int *vmin, ImportedNamespace** ns_return) const
+{
+ ImportedNamespace* ns = imports.d->findNamespace(QString::fromUtf8(type));
+ if (ns) {
+ if (qmlImportTrace())
+ qDebug() << "QDeclarativeEngine::resolveType" << type << "is namespace for" << ns->urls;
+ if (ns_return)
+ *ns_return = ns;
+ return true;
+ }
+ if (type_return || url_return) {
+ if (imports.d->find(type,vmaj,vmin,type_return,url_return)) {
+ if (qmlImportTrace()) {
+ if (type_return && *type_return)
+ qDebug() << "QDeclarativeEngine::resolveType" << type << '=' << (*type_return)->typeName();
+ if (url_return)
+ qDebug() << "QDeclarativeEngine::resolveType" << type << '=' << *url_return;
+ }
+ return true;
+ }
+ if (qmlImportTrace())
+ qDebug() << "QDeclarativeEngine::resolveType" << type << "not found";
+ }
+ return false;
+}
+
+/*!
+ \internal
+
+ Searching \e only in the namespace \a ns (previously returned in a call to
+ resolveType(), \a type is found and returned to either
+ a QDeclarativeType stored at \a type_return, or
+ a component located at \a url_return.
+
+ If either return pointer is 0, the corresponding search is not done.
+*/
+void QDeclarativeEnginePrivate::resolveTypeInNamespace(ImportedNamespace* ns, const QByteArray& type, QDeclarativeType** type_return, QUrl* url_return, int *vmaj, int *vmin ) const
+{
+ ns->find(type,vmaj,vmin,type_return,url_return);
+}
+
+static void voidptr_destructor(void *v)
+{
+ void **ptr = (void **)v;
+ delete ptr;
+}
+
+static void *voidptr_constructor(const void *v)
+{
+ if (!v) {
+ return new void*;
+ } else {
+ return new void*(*(void **)v);
+ }
+}
+
+void QDeclarativeEnginePrivate::registerCompositeType(QDeclarativeCompiledData *data)
+{
+ QByteArray name = data->root->className();
+
+ QByteArray ptr = name + '*';
+ QByteArray lst = "QDeclarativeListProperty<" + name + ">";
+
+ int ptr_type = QMetaType::registerType(ptr.constData(), voidptr_destructor,
+ voidptr_constructor);
+ int lst_type = QMetaType::registerType(lst.constData(), voidptr_destructor,
+ voidptr_constructor);
+
+ m_qmlLists.insert(lst_type, ptr_type);
+ m_compositeTypes.insert(ptr_type, data);
+ data->addref();
+}
+
+bool QDeclarativeEnginePrivate::isList(int t) const
+{
+ return m_qmlLists.contains(t) || QDeclarativeMetaType::isList(t);
+}
+
+int QDeclarativeEnginePrivate::listType(int t) const
+{
+ QHash<int, int>::ConstIterator iter = m_qmlLists.find(t);
+ if (iter != m_qmlLists.end())
+ return *iter;
+ else
+ return QDeclarativeMetaType::listType(t);
+}
+
+bool QDeclarativeEnginePrivate::isQObject(int t)
+{
+ return m_compositeTypes.contains(t) || QDeclarativeMetaType::isQObject(t);
+}
+
+QObject *QDeclarativeEnginePrivate::toQObject(const QVariant &v, bool *ok) const
+{
+ int t = v.userType();
+ if (m_compositeTypes.contains(t)) {
+ if (ok) *ok = true;
+ return *(QObject **)(v.constData());
+ } else {
+ return QDeclarativeMetaType::toQObject(v, ok);
+ }
+}
+
+QDeclarativeMetaType::TypeCategory QDeclarativeEnginePrivate::typeCategory(int t) const
+{
+ if (m_compositeTypes.contains(t))
+ return QDeclarativeMetaType::Object;
+ else if (m_qmlLists.contains(t))
+ return QDeclarativeMetaType::List;
+ else
+ return QDeclarativeMetaType::typeCategory(t);
+}
+
+const QMetaObject *QDeclarativeEnginePrivate::rawMetaObjectForType(int t) const
+{
+ QHash<int, QDeclarativeCompiledData*>::ConstIterator iter = m_compositeTypes.find(t);
+ if (iter != m_compositeTypes.end()) {
+ return (*iter)->root;
+ } else {
+ QDeclarativeType *type = QDeclarativeMetaType::qmlType(t);
+ return type?type->baseMetaObject():0;
+ }
+}
+
+const QMetaObject *QDeclarativeEnginePrivate::metaObjectForType(int t) const
+{
+ QHash<int, QDeclarativeCompiledData*>::ConstIterator iter = m_compositeTypes.find(t);
+ if (iter != m_compositeTypes.end()) {
+ return (*iter)->root;
+ } else {
+ QDeclarativeType *type = QDeclarativeMetaType::qmlType(t);
+ return type?type->metaObject():0;
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeengine.h b/src/declarative/qml/qdeclarativeengine.h
new file mode 100644
index 0000000000..fd6635854d
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeengine.h
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEENGINE_H
+#define QDECLARATIVEENGINE_H
+
+#include <QtCore/qurl.h>
+#include <QtCore/qobject.h>
+#include <QtCore/qmap.h>
+#include <QtScript/qscriptvalue.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeComponent;
+class QDeclarativeEnginePrivate;
+class QDeclarativeImportsPrivate;
+class QDeclarativeExpression;
+class QDeclarativeContext;
+class QDeclarativeType;
+class QUrl;
+class QScriptEngine;
+class QScriptContext;
+class QDeclarativeImageProvider;
+class QNetworkAccessManager;
+class QDeclarativeNetworkAccessManagerFactory;
+class Q_DECLARATIVE_EXPORT QDeclarativeEngine : public QObject
+{
+ Q_PROPERTY(QString offlineStoragePath READ offlineStoragePath WRITE setOfflineStoragePath)
+ Q_OBJECT
+public:
+ QDeclarativeEngine(QObject *p = 0);
+ virtual ~QDeclarativeEngine();
+
+ QDeclarativeContext *rootContext();
+
+ void clearComponentCache();
+
+ void addImportPath(const QString& dir);
+ bool importExtension(const QString &fileName, const QString &uri);
+
+ void setNetworkAccessManagerFactory(QDeclarativeNetworkAccessManagerFactory *);
+ QDeclarativeNetworkAccessManagerFactory *networkAccessManagerFactory() const;
+
+ QNetworkAccessManager *networkAccessManager() const;
+
+ void addImageProvider(const QString &id, QDeclarativeImageProvider *);
+ QDeclarativeImageProvider *imageProvider(const QString &id) const;
+ void removeImageProvider(const QString &id);
+
+ void setOfflineStoragePath(const QString& dir);
+ QString offlineStoragePath() const;
+
+ QUrl baseUrl() const;
+ void setBaseUrl(const QUrl &);
+
+ static QDeclarativeContext *contextForObject(const QObject *);
+ static void setContextForObject(QObject *, QDeclarativeContext *);
+
+Q_SIGNALS:
+ void quit ();
+
+private:
+ Q_DECLARE_PRIVATE(QDeclarativeEngine)
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEENGINE_H
diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h
new file mode 100644
index 0000000000..459a325344
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeengine_p.h
@@ -0,0 +1,346 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEENGINE_P_H
+#define QDECLARATIVEENGINE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeengine.h"
+
+#include "qdeclarativeclassfactory_p.h"
+#include "qdeclarativecompositetypemanager_p.h"
+#include "qpodvector_p.h"
+#include "qdeclarative.h"
+#include "qdeclarativevaluetype_p.h"
+#include "qdeclarativecontext.h"
+#include "qdeclarativeexpression.h"
+#include "qdeclarativeproperty_p.h"
+#include "qdeclarativepropertycache_p.h"
+#include "qdeclarativeobjectscriptclass_p.h"
+#include "qdeclarativecontextscriptclass_p.h"
+#include "qdeclarativevaluetypescriptclass_p.h"
+#include "qdeclarativemetatype_p.h"
+
+#include <QtScript/QScriptClass>
+#include <QtScript/QScriptValue>
+#include <QtScript/QScriptString>
+#include <QtCore/qstring.h>
+#include <QtCore/qlist.h>
+#include <QtCore/qpair.h>
+#include <QtCore/qstack.h>
+#include <QtCore/qmutex.h>
+#include <QtScript/qscriptengine.h>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeContext;
+class QDeclarativeEngine;
+class QDeclarativeContextPrivate;
+class QDeclarativeExpression;
+class QDeclarativeContextScriptClass;
+class QDeclarativeObjectScriptClass;
+class QDeclarativeTypeNameScriptClass;
+class QDeclarativeValueTypeScriptClass;
+class QScriptEngineDebugger;
+class QNetworkReply;
+class QNetworkAccessManager;
+class QDeclarativeNetworkAccessManagerFactory;
+class QDeclarativeAbstractBinding;
+class QScriptDeclarativeClass;
+class QDeclarativeTypeNameScriptClass;
+class QDeclarativeTypeNameCache;
+class QDeclarativeComponentAttached;
+class QDeclarativeListScriptClass;
+class QDeclarativeCleanup;
+class QDeclarativeDelayedError;
+class QDeclarativeWorkerScriptEngine;
+class QDeclarativeGlobalScriptClass;
+class QDir;
+
+class QDeclarativeScriptEngine : public QScriptEngine
+{
+public:
+ QDeclarativeScriptEngine(QDeclarativeEnginePrivate *priv);
+ virtual ~QDeclarativeScriptEngine();
+
+ QUrl resolvedUrl(QScriptContext *context, const QUrl& url); // resolved against p's context, or baseUrl if no p
+ static QScriptValue resolvedUrl(QScriptContext *ctxt, QScriptEngine *engine);
+
+ static QDeclarativeScriptEngine *get(QScriptEngine* e) { return static_cast<QDeclarativeScriptEngine*>(e); }
+
+ QDeclarativeEnginePrivate *p;
+
+ // User by SQL API
+ QScriptClass *sqlQueryClass;
+ QString offlineStoragePath;
+
+ // Used by DOM Core 3 API
+ QScriptClass *namedNodeMapClass;
+ QScriptClass *nodeListClass;
+
+ QUrl baseUrl;
+
+ virtual QNetworkAccessManager *networkAccessManager();
+};
+
+class Q_AUTOTEST_EXPORT QDeclarativeEnginePrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeEngine)
+public:
+ QDeclarativeEnginePrivate(QDeclarativeEngine *);
+ ~QDeclarativeEnginePrivate();
+
+ void init();
+
+ struct CapturedProperty {
+ CapturedProperty(QObject *o, int c, int n)
+ : object(o), coreIndex(c), notifyIndex(n) {}
+
+ QObject *object;
+ int coreIndex;
+ int notifyIndex;
+ };
+ bool captureProperties;
+ QPODVector<CapturedProperty> capturedProperties;
+
+ QDeclarativeContext *rootContext;
+ QDeclarativeExpression *currentExpression;
+ bool isDebugging;
+
+ struct ImportedNamespace;
+ QDeclarativeContextScriptClass *contextClass;
+ QDeclarativeContext *sharedContext;
+ QObject *sharedScope;
+ QDeclarativeObjectScriptClass *objectClass;
+ QDeclarativeValueTypeScriptClass *valueTypeClass;
+ QDeclarativeTypeNameScriptClass *typeNameClass;
+ QDeclarativeListScriptClass *listClass;
+ // Global script class
+ QDeclarativeGlobalScriptClass *globalClass;
+
+ // Registered cleanup handlers
+ QDeclarativeCleanup *cleanup;
+
+ // Bindings that have had errors during startup
+ QDeclarativeDelayedError *erroredBindings;
+ int inProgressCreations;
+
+ QDeclarativeScriptEngine scriptEngine;
+
+ QDeclarativeWorkerScriptEngine *getWorkerScriptEngine();
+ QDeclarativeWorkerScriptEngine *workerScriptEngine;
+
+ QUrl baseUrl;
+
+ template<class T>
+ struct SimpleList {
+ SimpleList()
+ : count(0), values(0) {}
+ SimpleList(int r)
+ : count(0), values(new T*[r]) {}
+
+ int count;
+ T **values;
+
+ void append(T *v) {
+ values[count++] = v;
+ }
+
+ T *at(int idx) const {
+ return values[idx];
+ }
+
+ void clear() {
+ delete [] values;
+ }
+ };
+
+ static void clear(SimpleList<QDeclarativeAbstractBinding> &);
+ static void clear(SimpleList<QDeclarativeParserStatus> &);
+
+ QList<SimpleList<QDeclarativeAbstractBinding> > bindValues;
+ QList<SimpleList<QDeclarativeParserStatus> > parserStatus;
+ QDeclarativeComponentAttached *componentAttacheds;
+
+ bool inBeginCreate;
+
+ QNetworkAccessManager *createNetworkAccessManager(QObject *parent) const;
+ QNetworkAccessManager *getNetworkAccessManager() const;
+ mutable QNetworkAccessManager *networkAccessManager;
+ mutable QDeclarativeNetworkAccessManagerFactory *networkAccessManagerFactory;
+
+ QHash<QString,QDeclarativeImageProvider*> imageProviders;
+ QImage getImageFromProvider(const QUrl &url);
+
+ mutable QMutex mutex;
+
+ QDeclarativeCompositeTypeManager typeManager;
+ QStringList fileImportPath;
+ QString offlineStoragePath;
+
+ mutable quint32 uniqueId;
+ quint32 getUniqueId() const {
+ return uniqueId++;
+ }
+
+ QDeclarativeValueTypeFactory valueTypes;
+
+ QHash<const QMetaObject *, QDeclarativePropertyCache *> propertyCache;
+ QDeclarativePropertyCache *cache(QObject *obj) {
+ Q_Q(QDeclarativeEngine);
+ if (!obj || QObjectPrivate::get(obj)->metaObject ||
+ QObjectPrivate::get(obj)->wasDeleted) return 0;
+ const QMetaObject *mo = obj->metaObject();
+ QDeclarativePropertyCache *rv = propertyCache.value(mo);
+ if (!rv) {
+ rv = QDeclarativePropertyCache::create(q, mo);
+ propertyCache.insert(mo, rv);
+ }
+ return rv;
+ }
+
+ // ### This whole class is embarrassing
+ struct Imports {
+ Imports();
+ ~Imports();
+ Imports(const Imports &copy);
+ Imports &operator =(const Imports &copy);
+
+ void setBaseUrl(const QUrl& url);
+ QUrl baseUrl() const;
+
+ QDeclarativeTypeNameCache *cache(QDeclarativeEngine *) const;
+
+ private:
+ friend class QDeclarativeEnginePrivate;
+ QDeclarativeImportsPrivate *d;
+ };
+
+
+ QStringList environmentImportPath;
+ QSet<QString> initializedPlugins;
+
+ QString resolvePlugin(const QDir &dir, const QString &baseName,
+ const QStringList &suffixes,
+ const QString &prefix = QString());
+ QString resolvePlugin(const QDir &dir, const QString &baseName);
+
+
+ bool addToImport(Imports*, const QString& qmlDirContent,const QString& uri, const QString& prefix, int vmaj, int vmin, QDeclarativeScriptParser::Import::Type importType) const;
+ bool resolveType(const Imports&, const QByteArray& type,
+ QDeclarativeType** type_return, QUrl* url_return,
+ int *version_major, int *version_minor,
+ ImportedNamespace** ns_return) const;
+ void resolveTypeInNamespace(ImportedNamespace*, const QByteArray& type,
+ QDeclarativeType** type_return, QUrl* url_return,
+ int *version_major, int *version_minor ) const;
+
+
+ void registerCompositeType(QDeclarativeCompiledData *);
+
+ bool isQObject(int);
+ QObject *toQObject(const QVariant &, bool *ok = 0) const;
+ QDeclarativeMetaType::TypeCategory typeCategory(int) const;
+ bool isList(int) const;
+ int listType(int) const;
+ const QMetaObject *rawMetaObjectForType(int) const;
+ const QMetaObject *metaObjectForType(int) const;
+ QHash<int, int> m_qmlLists;
+ QHash<int, QDeclarativeCompiledData *> m_compositeTypes;
+
+ QScriptValue scriptValueFromVariant(const QVariant &);
+ QVariant scriptValueToVariant(const QScriptValue &);
+
+ void sendQuit ();
+
+ static QScriptValue qmlScriptObject(QObject*, QDeclarativeEngine*);
+
+ static QScriptValue createComponent(QScriptContext*, QScriptEngine*);
+ static QScriptValue createQmlObject(QScriptContext*, QScriptEngine*);
+ static QScriptValue vector(QScriptContext*, QScriptEngine*);
+ static QScriptValue rgba(QScriptContext*, QScriptEngine*);
+ static QScriptValue hsla(QScriptContext*, QScriptEngine*);
+ static QScriptValue point(QScriptContext*, QScriptEngine*);
+ static QScriptValue size(QScriptContext*, QScriptEngine*);
+ static QScriptValue rect(QScriptContext*, QScriptEngine*);
+
+ static QScriptValue lighter(QScriptContext*, QScriptEngine*);
+ static QScriptValue darker(QScriptContext*, QScriptEngine*);
+ static QScriptValue tint(QScriptContext*, QScriptEngine*);
+
+ static QScriptValue closestAngle(QScriptContext*, QScriptEngine*);
+ static QScriptValue desktopOpenUrl(QScriptContext*, QScriptEngine*);
+ static QScriptValue md5(QScriptContext*, QScriptEngine*);
+ static QScriptValue btoa(QScriptContext*, QScriptEngine*);
+ static QScriptValue atob(QScriptContext*, QScriptEngine*);
+ static QScriptValue consoleLog(QScriptContext*, QScriptEngine*);
+ static QScriptValue quit(QScriptContext*, QScriptEngine*);
+
+ static QScriptValue formatDate(QScriptContext*, QScriptEngine*);
+ static QScriptValue formatTime(QScriptContext*, QScriptEngine*);
+ static QScriptValue formatDateTime(QScriptContext*, QScriptEngine*);
+
+ static QScriptEngine *getScriptEngine(QDeclarativeEngine *e) { return &e->d_func()->scriptEngine; }
+ static QDeclarativeEngine *getEngine(QScriptEngine *e) { return static_cast<QDeclarativeScriptEngine*>(e)->p->q_func(); }
+ static QDeclarativeEnginePrivate *get(QDeclarativeEngine *e) { return e->d_func(); }
+ static QDeclarativeEnginePrivate *get(QDeclarativeContext *c) { return (c && c->engine()) ? QDeclarativeEnginePrivate::get(c->engine()) : 0; }
+ static QDeclarativeEnginePrivate *get(QScriptEngine *e) { return static_cast<QDeclarativeScriptEngine*>(e)->p; }
+ static QDeclarativeEngine *get(QDeclarativeEnginePrivate *p) { return p->q_func(); }
+ QDeclarativeContext *getContext(QScriptContext *);
+
+ static void defineModule();
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEENGINE_P_H
diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp
new file mode 100644
index 0000000000..3e4acbe839
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeenginedebug.cpp
@@ -0,0 +1,458 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeenginedebug_p.h"
+
+#include "qdeclarativeboundsignal_p.h"
+#include "qdeclarativeengine.h"
+#include "qdeclarativemetatype_p.h"
+#include "qdeclarativeproperty.h"
+#include "qdeclarativeproperty_p.h"
+#include "qdeclarativebinding_p.h"
+#include "qdeclarativecontext_p.h"
+#include "qdeclarativewatcher_p.h"
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qmetaobject.h>
+
+QT_BEGIN_NAMESPACE
+
+QList<QDeclarativeEngine *> QDeclarativeEngineDebugServer::m_engines;
+QDeclarativeEngineDebugServer::QDeclarativeEngineDebugServer(QObject *parent)
+: QDeclarativeDebugService(QLatin1String("QDeclarativeEngine"), parent),
+ m_watch(new QDeclarativeWatcher(this))
+{
+ QObject::connect(m_watch, SIGNAL(propertyChanged(int,int,QMetaProperty,QVariant)),
+ this, SLOT(propertyChanged(int,int,QMetaProperty,QVariant)));
+}
+
+QDataStream &operator<<(QDataStream &ds,
+ const QDeclarativeEngineDebugServer::QDeclarativeObjectData &data)
+{
+ ds << data.url << data.lineNumber << data.columnNumber << data.objectName
+ << data.objectType << data.objectId << data.contextId;
+ return ds;
+}
+
+QDataStream &operator>>(QDataStream &ds,
+ QDeclarativeEngineDebugServer::QDeclarativeObjectData &data)
+{
+ ds >> data.url >> data.lineNumber >> data.columnNumber >> data.objectName
+ >> data.objectType >> data.objectId >> data.contextId;
+ return ds;
+}
+
+QDataStream &operator<<(QDataStream &ds,
+ const QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &data)
+{
+ ds << (int)data.type << data.name << data.value << data.valueTypeName
+ << data.binding << data.hasNotifySignal;
+ return ds;
+}
+
+QDataStream &operator>>(QDataStream &ds,
+ QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &data)
+{
+ int type;
+ ds >> type >> data.name >> data.value >> data.valueTypeName
+ >> data.binding >> data.hasNotifySignal;
+ data.type = (QDeclarativeEngineDebugServer::QDeclarativeObjectProperty::Type)type;
+ return ds;
+}
+
+QDeclarativeEngineDebugServer::QDeclarativeObjectProperty
+QDeclarativeEngineDebugServer::propertyData(QObject *obj, int propIdx)
+{
+ QDeclarativeObjectProperty rv;
+
+ QMetaProperty prop = obj->metaObject()->property(propIdx);
+
+ rv.type = QDeclarativeObjectProperty::Unknown;
+ rv.valueTypeName = QString::fromUtf8(prop.typeName());
+ rv.name = QString::fromUtf8(prop.name());
+ rv.hasNotifySignal = prop.hasNotifySignal();
+ QDeclarativeAbstractBinding *binding =
+ QDeclarativePropertyPrivate::binding(QDeclarativeProperty(obj, rv.name));
+ if (binding)
+ rv.binding = binding->expression();
+
+ QVariant value = prop.read(obj);
+ rv.value = valueContents(value);
+
+ if (QDeclarativeValueTypeFactory::isValueType(prop.userType())) {
+ rv.type = QDeclarativeObjectProperty::Basic;
+ } else if (QDeclarativeMetaType::isQObject(prop.userType())) {
+ rv.type = QDeclarativeObjectProperty::Object;
+ } else if (QDeclarativeMetaType::isList(prop.userType())) {
+ rv.type = QDeclarativeObjectProperty::List;
+ }
+
+ return rv;
+}
+
+QVariant QDeclarativeEngineDebugServer::valueContents(const QVariant &value) const
+{
+ int userType = value.userType();
+ if (QDeclarativeValueTypeFactory::isValueType(userType))
+ return value;
+
+ /*
+ if (QDeclarativeMetaType::isList(userType)) {
+ int count = QDeclarativeMetaType::listCount(value);
+ QVariantList contents;
+ for (int i=0; i<count; i++)
+ contents << valueContents(QDeclarativeMetaType::listAt(value, i));
+ return contents;
+ } else */
+ if (QDeclarativeMetaType::isQObject(userType)) {
+ QObject *o = QDeclarativeMetaType::toQObject(value);
+ if (o) {
+ QString name = o->objectName();
+ if (name.isEmpty())
+ name = QLatin1String("<unnamed object>");
+ return name;
+ }
+ }
+
+ return QLatin1String("<unknown value>");
+}
+
+void QDeclarativeEngineDebugServer::buildObjectDump(QDataStream &message,
+ QObject *object, bool recur)
+{
+ message << objectData(object);
+
+ // Some children aren't added to an object until particular properties are read
+ // - e.g. child state objects aren't added until the 'states' property is read -
+ // but this should only affect internal objects that aren't shown by the
+ // debugger anyway.
+
+ QObjectList children = object->children();
+
+ int childrenCount = children.count();
+ for (int ii = 0; ii < children.count(); ++ii) {
+ if (qobject_cast<QDeclarativeContext*>(children[ii]) || QDeclarativeBoundSignal::cast(children[ii]))
+ --childrenCount;
+ }
+
+ message << childrenCount << recur;
+
+ QList<QDeclarativeObjectProperty> fakeProperties;
+
+ for (int ii = 0; ii < children.count(); ++ii) {
+ QObject *child = children.at(ii);
+ if (qobject_cast<QDeclarativeContext*>(child))
+ continue;
+ QDeclarativeBoundSignal *signal = QDeclarativeBoundSignal::cast(child);
+ if (signal) {
+ QDeclarativeObjectProperty prop;
+ prop.type = QDeclarativeObjectProperty::SignalProperty;
+ prop.hasNotifySignal = false;
+ QDeclarativeExpression *expr = signal->expression();
+ if (expr) {
+ prop.value = expr->expression();
+ QObject *scope = expr->scopeObject();
+ if (scope) {
+ QString sig = QLatin1String(scope->metaObject()->method(signal->index()).signature());
+ int lparen = sig.indexOf(QLatin1Char('('));
+ if (lparen >= 0) {
+ QString methodName = sig.mid(0, lparen);
+ prop.name = QLatin1String("on") + methodName[0].toUpper()
+ + methodName.mid(1);
+ }
+ }
+ }
+ fakeProperties << prop;
+ } else {
+ if (recur)
+ buildObjectDump(message, child, recur);
+ else
+ message << objectData(child);
+ }
+ }
+
+ message << (object->metaObject()->propertyCount() + fakeProperties.count());
+
+ for (int ii = 0; ii < object->metaObject()->propertyCount(); ++ii)
+ message << propertyData(object, ii);
+
+ for (int ii = 0; ii < fakeProperties.count(); ++ii)
+ message << fakeProperties[ii];
+}
+
+void QDeclarativeEngineDebugServer::buildObjectList(QDataStream &message,
+ QDeclarativeContext *ctxt)
+{
+ QDeclarativeContextPrivate *p = (QDeclarativeContextPrivate *)QObjectPrivate::get(ctxt);
+
+ QString ctxtName = ctxt->objectName();
+ int ctxtId = QDeclarativeDebugService::idForObject(ctxt);
+
+ message << ctxtName << ctxtId;
+
+ int count = 0;
+
+ for (QSet<QDeclarativeContext *>::ConstIterator iter = p->childContexts.begin();
+ iter != p->childContexts.end(); ++iter) {
+ QDeclarativeContextPrivate *p = (QDeclarativeContextPrivate *)QObjectPrivate::get(*iter);
+ if (p->isInternal)
+ continue;
+ ++count;
+ }
+
+ message << count;
+
+ for (QSet<QDeclarativeContext *>::ConstIterator iter = p->childContexts.begin();
+ iter != p->childContexts.end(); ++iter) {
+ QDeclarativeContextPrivate *p = (QDeclarativeContextPrivate *)QObjectPrivate::get(*iter);
+ if (p->isInternal)
+ continue;
+ buildObjectList(message, *iter);
+ }
+
+ // Clean deleted objects
+ for (int ii = 0; ii < p->instances.count(); ++ii) {
+ if (!p->instances.at(ii)) {
+ p->instances.removeAt(ii);
+ --ii;
+ }
+ }
+
+ message << p->instances.count();
+ for (int ii = 0; ii < p->instances.count(); ++ii) {
+ message << objectData(p->instances.at(ii));
+ }
+}
+
+QDeclarativeEngineDebugServer::QDeclarativeObjectData
+QDeclarativeEngineDebugServer::objectData(QObject *object)
+{
+ QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(object);
+ QDeclarativeObjectData rv;
+ if (ddata) {
+ rv.url = ddata->outerContext->baseUrl();
+ rv.lineNumber = ddata->lineNumber;
+ rv.columnNumber = ddata->columnNumber;
+ } else {
+ rv.lineNumber = -1;
+ rv.columnNumber = -1;
+ }
+
+ rv.objectName = object->objectName();
+ rv.objectId = QDeclarativeDebugService::idForObject(object);
+ rv.contextId = QDeclarativeDebugService::idForObject(qmlContext(object));
+
+ QDeclarativeType *type = QDeclarativeMetaType::qmlType(object->metaObject());
+ if (type) {
+ QString typeName = QLatin1String(type->qmlTypeName());
+ int lastSlash = typeName.lastIndexOf(QLatin1Char('/'));
+ rv.objectType = lastSlash < 0 ? typeName : typeName.mid(lastSlash+1);
+ } else {
+ rv.objectType = QString::fromUtf8(object->metaObject()->className());
+ int marker = rv.objectType.indexOf(QLatin1String("_QMLTYPE_"));
+ if (marker != -1)
+ rv.objectType = rv.objectType.left(marker);
+ }
+
+ return rv;
+}
+
+void QDeclarativeEngineDebugServer::messageReceived(const QByteArray &message)
+{
+ QDataStream ds(message);
+
+ QByteArray type;
+ ds >> type;
+
+ //qDebug() << "QDeclarativeEngineDebugServer::messageReceived()" << type;
+
+ if (type == "LIST_ENGINES") {
+ int queryId;
+ ds >> queryId;
+
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ rs << QByteArray("LIST_ENGINES_R");
+ rs << queryId << m_engines.count();
+
+ for (int ii = 0; ii < m_engines.count(); ++ii) {
+ QDeclarativeEngine *engine = m_engines.at(ii);
+
+ QString engineName = engine->objectName();
+ int engineId = QDeclarativeDebugService::idForObject(engine);
+
+ rs << engineName << engineId;
+ }
+
+ sendMessage(reply);
+ } else if (type == "LIST_OBJECTS") {
+ int queryId;
+ int engineId = -1;
+ ds >> queryId >> engineId;
+
+ QDeclarativeEngine *engine =
+ qobject_cast<QDeclarativeEngine *>(QDeclarativeDebugService::objectForId(engineId));
+
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ rs << QByteArray("LIST_OBJECTS_R") << queryId;
+
+ if (engine)
+ buildObjectList(rs, engine->rootContext());
+
+ sendMessage(reply);
+ } else if (type == "FETCH_OBJECT") {
+ int queryId;
+ int objectId;
+ bool recurse;
+
+ ds >> queryId >> objectId >> recurse;
+
+ QObject *object = QDeclarativeDebugService::objectForId(objectId);
+
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ rs << QByteArray("FETCH_OBJECT_R") << queryId;
+
+ if (object)
+ buildObjectDump(rs, object, recurse);
+
+ sendMessage(reply);
+ } else if (type == "WATCH_OBJECT") {
+ int queryId;
+ int objectId;
+
+ ds >> queryId >> objectId;
+ bool ok = m_watch->addWatch(queryId, objectId);
+
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ rs << QByteArray("WATCH_OBJECT_R") << queryId << ok;
+
+ sendMessage(reply);
+ } else if (type == "WATCH_PROPERTY") {
+ int queryId;
+ int objectId;
+ QByteArray property;
+
+ ds >> queryId >> objectId >> property;
+ bool ok = m_watch->addWatch(queryId, objectId, property);
+
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ rs << QByteArray("WATCH_PROPERTY_R") << queryId << ok;
+
+ sendMessage(reply);
+ } else if (type == "WATCH_EXPR_OBJECT") {
+ int queryId;
+ int debugId;
+ QString expr;
+
+ ds >> queryId >> debugId >> expr;
+ bool ok = m_watch->addWatch(queryId, debugId, expr);
+
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ rs << QByteArray("WATCH_EXPR_OBJECT_R") << queryId << ok;
+
+ sendMessage(reply);
+ } else if (type == "NO_WATCH") {
+ int queryId;
+
+ ds >> queryId;
+ m_watch->removeWatch(queryId);
+ } else if (type == "EVAL_EXPRESSION") {
+ int queryId;
+ int objectId;
+ QString expr;
+
+ ds >> queryId >> objectId >> expr;
+
+ QObject *object = QDeclarativeDebugService::objectForId(objectId);
+ QDeclarativeContext *context = qmlContext(object);
+ QVariant result;
+ if (object && context) {
+ QDeclarativeExpression exprObj(context, expr, object);
+ bool undefined = false;
+ QVariant value = exprObj.value(&undefined);
+ if (undefined)
+ result = QLatin1String("<undefined>");
+ else
+ result = valueContents(value);
+ } else {
+ result = QLatin1String("<unknown context>");
+ }
+
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+ rs << QByteArray("EVAL_EXPRESSION_R") << queryId << result;
+
+ sendMessage(reply);
+ }
+}
+
+void QDeclarativeEngineDebugServer::propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value)
+{
+ QByteArray reply;
+ QDataStream rs(&reply, QIODevice::WriteOnly);
+
+ rs << QByteArray("UPDATE_WATCH") << id << objectId << QByteArray(property.name()) << valueContents(value);
+
+ sendMessage(reply);
+}
+
+void QDeclarativeEngineDebugServer::addEngine(QDeclarativeEngine *engine)
+{
+ Q_ASSERT(engine);
+ Q_ASSERT(!m_engines.contains(engine));
+
+ m_engines.append(engine);
+}
+
+void QDeclarativeEngineDebugServer::remEngine(QDeclarativeEngine *engine)
+{
+ Q_ASSERT(engine);
+ Q_ASSERT(m_engines.contains(engine));
+
+ m_engines.removeAll(engine);
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeenginedebug_p.h b/src/declarative/qml/qdeclarativeenginedebug_p.h
new file mode 100644
index 0000000000..a95449b3ab
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeenginedebug_p.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEENGINEDEBUG_P_H
+#define QDECLARATIVEENGINEDEBUG_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <private/qdeclarativedebugservice_p.h>
+
+#include <QtCore/qurl.h>
+#include <QtCore/qvariant.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeEngine;
+class QDeclarativeContext;
+class QDeclarativeWatcher;
+class QDataStream;
+
+class QDeclarativeEngineDebugServer : public QDeclarativeDebugService
+{
+ Q_OBJECT
+public:
+ QDeclarativeEngineDebugServer(QObject * = 0);
+
+ struct QDeclarativeObjectData {
+ QUrl url;
+ int lineNumber;
+ int columnNumber;
+ QString objectName;
+ QString objectType;
+ int objectId;
+ int contextId;
+ };
+
+ struct QDeclarativeObjectProperty {
+ enum Type { Unknown, Basic, Object, List, SignalProperty };
+ Type type;
+ QString name;
+ QVariant value;
+ QString valueTypeName;
+ QString binding;
+ bool hasNotifySignal;
+ };
+
+ static void addEngine(QDeclarativeEngine *);
+ static void remEngine(QDeclarativeEngine *);
+
+protected:
+ virtual void messageReceived(const QByteArray &);
+
+private Q_SLOTS:
+ void propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value);
+
+private:
+ void buildObjectList(QDataStream &, QDeclarativeContext *);
+ void buildObjectDump(QDataStream &, QObject *, bool);
+ QDeclarativeObjectData objectData(QObject *);
+ QDeclarativeObjectProperty propertyData(QObject *, int);
+ QVariant valueContents(const QVariant &defaultValue) const;
+
+ static QList<QDeclarativeEngine *> m_engines;
+ QDeclarativeWatcher *m_watch;
+};
+Q_DECLARATIVE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugServer::QDeclarativeObjectData &);
+Q_DECLARATIVE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugServer::QDeclarativeObjectData &);
+Q_DECLARATIVE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &);
+Q_DECLARATIVE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &);
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEENGINEDEBUG_P_H
+
diff --git a/src/declarative/qml/qdeclarativeerror.cpp b/src/declarative/qml/qdeclarativeerror.cpp
new file mode 100644
index 0000000000..7e8aac0de6
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeerror.cpp
@@ -0,0 +1,258 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeerror.h"
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qfile.h>
+#include <QtCore/qstringlist.h>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QDeclarativeError
+ \since 4.7
+ \brief The QDeclarativeError class encapsulates a QML error
+*/
+class QDeclarativeErrorPrivate
+{
+public:
+ QDeclarativeErrorPrivate();
+
+ QUrl url;
+ QString description;
+ int line;
+ int column;
+};
+
+QDeclarativeErrorPrivate::QDeclarativeErrorPrivate()
+: line(-1), column(-1)
+{
+}
+
+/*!
+ Create an empty error object.
+*/
+QDeclarativeError::QDeclarativeError()
+: d(0)
+{
+}
+
+/*!
+ Create a copy of \a other.
+*/
+QDeclarativeError::QDeclarativeError(const QDeclarativeError &other)
+: d(0)
+{
+ *this = other;
+}
+
+/*!
+ Assign \a other to this error object.
+*/
+QDeclarativeError &QDeclarativeError::operator=(const QDeclarativeError &other)
+{
+ if (!other.d) {
+ delete d;
+ d = 0;
+ } else {
+ if (!d) d = new QDeclarativeErrorPrivate;
+ d->url = other.d->url;
+ d->description = other.d->description;
+ d->line = other.d->line;
+ d->column = other.d->column;
+ }
+ return *this;
+}
+
+/*!
+ \internal
+*/
+QDeclarativeError::~QDeclarativeError()
+{
+ delete d; d = 0;
+}
+
+/*!
+ Return true if this error is valid, otherwise false.
+*/
+bool QDeclarativeError::isValid() const
+{
+ return d != 0;
+}
+
+/*!
+ Return the url for the file that caused this error.
+*/
+QUrl QDeclarativeError::url() const
+{
+ if (d) return d->url;
+ else return QUrl();
+}
+
+/*!
+ Set the \a url for the file that caused this error.
+*/
+void QDeclarativeError::setUrl(const QUrl &url)
+{
+ if (!d) d = new QDeclarativeErrorPrivate;
+ d->url = url;
+}
+
+/*!
+ Return the error description.
+*/
+QString QDeclarativeError::description() const
+{
+ if (d) return d->description;
+ else return QString();
+}
+
+/*!
+ Set the error \a description.
+*/
+void QDeclarativeError::setDescription(const QString &description)
+{
+ if (!d) d = new QDeclarativeErrorPrivate;
+ d->description = description;
+}
+
+/*!
+ Return the error line number.
+*/
+int QDeclarativeError::line() const
+{
+ if (d) return d->line;
+ else return -1;
+}
+
+/*!
+ Set the error \a line number.
+*/
+void QDeclarativeError::setLine(int line)
+{
+ if (!d) d = new QDeclarativeErrorPrivate;
+ d->line = line;
+}
+
+/*!
+ Return the error column number.
+*/
+int QDeclarativeError::column() const
+{
+ if (d) return d->column;
+ else return -1;
+}
+
+/*!
+ Set the error \a column number.
+*/
+void QDeclarativeError::setColumn(int column)
+{
+ if (!d) d = new QDeclarativeErrorPrivate;
+ d->column = column;
+}
+
+/*!
+ Return the error as a human readable string.
+*/
+QString QDeclarativeError::toString() const
+{
+ QString rv;
+ rv = url().toString() + QLatin1Char(':') + QString::number(line());
+ if(column() != -1)
+ rv += QLatin1Char(':') + QString::number(column());
+
+ rv += QLatin1String(": ") + description();
+
+ return rv;
+}
+
+/*!
+ \relates QDeclarativeError
+ \fn QDebug operator<<(QDebug debug, const QDeclarativeError &error)
+
+ Output a human readable version of \a error to \a debug.
+*/
+
+QDebug operator<<(QDebug debug, const QDeclarativeError &error)
+{
+ debug << qPrintable(error.toString());
+
+ QUrl url = error.url();
+
+ if (error.line() > 0 && url.scheme() == QLatin1String("file")) {
+ QString file = url.toLocalFile();
+ QFile f(file);
+ if (f.open(QIODevice::ReadOnly)) {
+ QByteArray data = f.readAll();
+ QTextStream stream(data, QIODevice::ReadOnly);
+ stream.setCodec("UTF-8");
+ const QString code = stream.readAll();
+ const QStringList lines = code.split(QLatin1Char('\n'));
+
+ if (lines.count() >= error.line()) {
+ const QString &line = lines.at(error.line() - 1);
+ debug << "\n " << qPrintable(line);
+
+ if(error.column() > 0) {
+ int column = qMax(0, error.column() - 1);
+ column = qMin(column, line.length());
+
+ QByteArray ind;
+ ind.reserve(column);
+ for (int i = 0; i < column; ++i) {
+ const QChar ch = line.at(i);
+ if (ch.isSpace())
+ ind.append(ch.unicode());
+ else
+ ind.append(' ');
+ }
+ ind.append('^');
+ debug << "\n " << ind.constData();
+ }
+ }
+ }
+ }
+ return debug;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeerror.h b/src/declarative/qml/qdeclarativeerror.h
new file mode 100644
index 0000000000..04d5ff2bff
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeerror.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEERROR_H
+#define QDECLARATIVEERROR_H
+
+#include <QtCore/qurl.h>
+#include <QtCore/qstring.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDebug;
+class QDeclarativeErrorPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeError
+{
+public:
+ QDeclarativeError();
+ QDeclarativeError(const QDeclarativeError &);
+ QDeclarativeError &operator=(const QDeclarativeError &);
+ ~QDeclarativeError();
+
+ bool isValid() const;
+
+ QUrl url() const;
+ void setUrl(const QUrl &);
+ QString description() const;
+ void setDescription(const QString &);
+ int line() const;
+ void setLine(int);
+ int column() const;
+ void setColumn(int);
+
+ QString toString() const;
+private:
+ QDeclarativeErrorPrivate *d;
+};
+
+QDebug Q_DECLARATIVE_EXPORT operator<<(QDebug debug, const QDeclarativeError &error);
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEERROR_H
diff --git a/src/declarative/qml/qdeclarativeexpression.cpp b/src/declarative/qml/qdeclarativeexpression.cpp
new file mode 100644
index 0000000000..899f4027bb
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeexpression.cpp
@@ -0,0 +1,825 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeexpression.h"
+#include "qdeclarativeexpression_p.h"
+
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativecontext_p.h"
+#include "qdeclarativerewrite_p.h"
+#include "qdeclarativecompiler_p.h"
+#include "qdeclarativeglobalscriptclass_p.h"
+
+#include <QtCore/qdebug.h>
+#include <QtScript/qscriptprogram.h>
+
+#include <private/qscriptdeclarativeclass_p.h>
+
+QT_BEGIN_NAMESPACE
+
+bool QDeclarativeDelayedError::addError(QDeclarativeEnginePrivate *e)
+{
+ if (!e || prevError) return false;
+
+ if (e->inProgressCreations == 0) return false; // Not in construction
+
+ prevError = &e->erroredBindings;
+ nextError = e->erroredBindings;
+ e->erroredBindings = this;
+ if (nextError) nextError->prevError = &nextError;
+
+ return true;
+}
+
+QDeclarativeExpressionData::QDeclarativeExpressionData()
+: q(0), dataRef(0), expressionFunctionValid(false), expressionRewritten(false), me(0),
+ trackChange(false), isShared(false), line(-1), guardList(0), guardListLength(0)
+{
+}
+
+QDeclarativeExpressionData::~QDeclarativeExpressionData()
+{
+ if (guardList) { delete [] guardList; guardList = 0; }
+ if (dataRef) dataRef->release();
+}
+
+QDeclarativeExpressionPrivate::QDeclarativeExpressionPrivate()
+: data(new QDeclarativeExpressionData)
+{
+ data->q = this;
+}
+
+QDeclarativeExpressionPrivate::QDeclarativeExpressionPrivate(QDeclarativeExpressionData *d)
+: data(d)
+{
+ data->q = this;
+}
+
+QDeclarativeExpressionPrivate::~QDeclarativeExpressionPrivate()
+{
+ if (data) { data->q = 0; data->release(); data = 0; }
+}
+
+void QDeclarativeExpressionPrivate::init(QDeclarativeContext *ctxt, const QString &expr,
+ QObject *me)
+{
+ data->expression = expr;
+
+ data->QDeclarativeAbstractExpression::setContext(ctxt);
+ data->me = me;
+}
+
+void QDeclarativeExpressionPrivate::init(QDeclarativeContext *ctxt, void *expr, QDeclarativeRefCount *rc,
+ QObject *me, const QString &url, int lineNumber)
+{
+ data->url = url;
+ data->line = lineNumber;
+
+ if (data->dataRef) data->dataRef->release();
+ data->dataRef = rc;
+ if (data->dataRef) data->dataRef->addref();
+
+ quint32 *exprData = (quint32 *)expr;
+ QDeclarativeCompiledData *dd = (QDeclarativeCompiledData *)rc;
+
+ data->expressionRewritten = true;
+ data->expression = QString::fromRawData((QChar *)(exprData + 2), exprData[1]);
+
+ int progIdx = *(exprData);
+ bool isShared = progIdx & 0x80000000;
+ progIdx &= 0x7FFFFFFF;
+
+ QDeclarativeEngine *engine = ctxt->engine();
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+
+ if (isShared) {
+
+ if (!dd->cachedClosures.at(progIdx)) {
+ QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(scriptEngine);
+ scriptContext->pushScope(ep->contextClass->newSharedContext());
+ scriptContext->pushScope(ep->globalClass->globalObject());
+ dd->cachedClosures[progIdx] = new QScriptValue(scriptEngine->evaluate(data->expression, data->url, data->line));
+ scriptEngine->popContext();
+ }
+
+ data->expressionFunction = *dd->cachedClosures.at(progIdx);
+ data->isShared = true;
+ data->expressionFunctionValid = true;
+
+ } else {
+
+#if !defined(Q_OS_SYMBIAN) //XXX Why doesn't this work?
+ if (!dd->cachedPrograms.at(progIdx)) {
+ dd->cachedPrograms[progIdx] =
+ new QScriptProgram(data->expression, data->url, data->line);
+ }
+
+ data->expressionFunction = evalInObjectScope(ctxt, me, *dd->cachedPrograms.at(progIdx),
+ &data->expressionContext);
+#else
+ data->expressionFunction = evalInObjectScope(ctxt, me, data->expression,
+ &data->expressionContext);
+#endif
+
+ data->expressionFunctionValid = true;
+ }
+
+ data->QDeclarativeAbstractExpression::setContext(ctxt);
+ data->me = me;
+}
+
+QScriptValue QDeclarativeExpressionPrivate::evalInObjectScope(QDeclarativeContext *context, QObject *object,
+ const QString &program, QScriptValue *contextObject)
+{
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(context->engine());
+ QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(&ep->scriptEngine);
+ if (contextObject) {
+ *contextObject = ep->contextClass->newContext(context, object);
+ scriptContext->pushScope(*contextObject);
+ } else {
+ scriptContext->pushScope(ep->contextClass->newContext(context, object));
+ }
+ scriptContext->pushScope(ep->globalClass->globalObject());
+ QScriptValue rv = ep->scriptEngine.evaluate(program);
+ ep->scriptEngine.popContext();
+ return rv;
+}
+
+QScriptValue QDeclarativeExpressionPrivate::evalInObjectScope(QDeclarativeContext *context, QObject *object,
+ const QScriptProgram &program, QScriptValue *contextObject)
+{
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(context->engine());
+ QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(&ep->scriptEngine);
+ if (contextObject) {
+ *contextObject = ep->contextClass->newContext(context, object);
+ scriptContext->pushScope(*contextObject);
+ } else {
+ scriptContext->pushScope(ep->contextClass->newContext(context, object));
+ }
+ scriptContext->pushScope(ep->globalClass->globalObject());
+ QScriptValue rv = ep->scriptEngine.evaluate(program);
+ ep->scriptEngine.popContext();
+ return rv;
+}
+
+/*!
+ \class QDeclarativeExpression
+ \since 4.7
+ \brief The QDeclarativeExpression class evaluates JavaScript in a QML context.
+*/
+
+/*!
+ Create an invalid QDeclarativeExpression.
+
+ As the expression will not have an associated QDeclarativeContext, this will be a
+ null expression object and its value will always be an invalid QVariant.
+ */
+QDeclarativeExpression::QDeclarativeExpression()
+: QObject(*new QDeclarativeExpressionPrivate, 0)
+{
+}
+
+/*! \internal */
+QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContext *ctxt, void *expr,
+ QDeclarativeRefCount *rc, QObject *me,
+ const QString &url, int lineNumber,
+ QDeclarativeExpressionPrivate &dd)
+: QObject(dd, 0)
+{
+ Q_D(QDeclarativeExpression);
+ d->init(ctxt, expr, rc, me, url, lineNumber);
+}
+
+/*!
+ Create a QDeclarativeExpression object.
+
+ The \a expression JavaScript will be executed in the \a ctxt QDeclarativeContext.
+ If specified, the \a scope object's properties will also be in scope during
+ the expression's execution.
+*/
+QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContext *ctxt, const QString &expression,
+ QObject *scope)
+: QObject(*new QDeclarativeExpressionPrivate, 0)
+{
+ Q_D(QDeclarativeExpression);
+ d->init(ctxt, expression, scope);
+}
+
+/*! \internal */
+QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContext *ctxt, const QString &expression,
+ QObject *scope, QDeclarativeExpressionPrivate &dd)
+: QObject(dd, 0)
+{
+ Q_D(QDeclarativeExpression);
+ d->init(ctxt, expression, scope);
+}
+
+/*!
+ Destroy the QDeclarativeExpression instance.
+*/
+QDeclarativeExpression::~QDeclarativeExpression()
+{
+}
+
+/*!
+ Returns the QDeclarativeEngine this expression is associated with, or 0 if there
+ is no association or the QDeclarativeEngine has been destroyed.
+*/
+QDeclarativeEngine *QDeclarativeExpression::engine() const
+{
+ Q_D(const QDeclarativeExpression);
+ return d->data->context()?d->data->context()->engine():0;
+}
+
+/*!
+ Returns the QDeclarativeContext this expression is associated with, or 0 if there
+ is no association or the QDeclarativeContext has been destroyed.
+*/
+QDeclarativeContext *QDeclarativeExpression::context() const
+{
+ Q_D(const QDeclarativeExpression);
+ return d->data->context();
+}
+
+/*!
+ Returns the expression string.
+*/
+QString QDeclarativeExpression::expression() const
+{
+ Q_D(const QDeclarativeExpression);
+ return d->data->expression;
+}
+
+/*!
+ Set the expression to \a expression.
+*/
+void QDeclarativeExpression::setExpression(const QString &expression)
+{
+ Q_D(QDeclarativeExpression);
+
+ d->clearGuards();
+
+ d->data->expression = expression;
+ d->data->expressionFunctionValid = false;
+ d->data->expressionRewritten = false;
+ d->data->expressionFunction = QScriptValue();
+}
+
+void QDeclarativeExpressionPrivate::exceptionToError(QScriptEngine *scriptEngine,
+ QDeclarativeError &error)
+{
+ if (scriptEngine->hasUncaughtException() &&
+ scriptEngine->uncaughtException().isError()) {
+
+ QString fileName;
+ int lineNumber = scriptEngine->uncaughtExceptionLineNumber();
+
+ QScriptValue exception = scriptEngine->uncaughtException();
+ QLatin1String fileNameProp("fileName");
+
+ if (!exception.property(fileNameProp).toString().isEmpty()){
+ fileName = exception.property(fileNameProp).toString();
+ } else {
+ fileName = QLatin1String("<Unknown File>");
+ }
+
+ error.setUrl(QUrl(fileName));
+ error.setLine(lineNumber);
+ error.setColumn(-1);
+ error.setDescription(exception.toString());
+ } else {
+ error = QDeclarativeError();
+ }
+}
+
+QVariant QDeclarativeExpressionPrivate::evalQtScript(QObject *secondaryScope, bool *isUndefined)
+{
+#ifdef Q_ENABLE_PERFORMANCE_LOG
+ QDeclarativePerfTimer<QDeclarativePerf::BindValueQt> perfqt;
+#endif
+
+ QDeclarativeExpressionData *data = this->data;
+ QDeclarativeContextPrivate *ctxtPriv = data->context()->d_func();
+ QDeclarativeEngine *engine = data->context()->engine();
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+
+ if (!data->expressionFunctionValid) {
+
+ QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(scriptEngine);
+ data->expressionContext = ep->contextClass->newContext(data->context(), data->me);
+ scriptContext->pushScope(data->expressionContext);
+ scriptContext->pushScope(ep->globalClass->globalObject());
+
+ if (data->expressionRewritten) {
+ data->expressionFunction = scriptEngine->evaluate(data->expression,
+ data->url, data->line);
+ } else {
+ QDeclarativeRewrite::RewriteBinding rewriteBinding;
+
+ bool ok = true;
+ const QString code = rewriteBinding(data->expression, &ok);
+ if (!ok) {
+ scriptEngine->popContext();
+ return QVariant();
+ }
+ data->expressionFunction = scriptEngine->evaluate(code, data->url, data->line);
+ }
+
+ scriptEngine->popContext();
+ data->expressionFunctionValid = true;
+ }
+
+ QDeclarativeContext *oldSharedContext = 0;
+ QObject *oldSharedScope = 0;
+ QObject *oldOverride = 0;
+ if (data->isShared) {
+ oldSharedContext = ep->sharedContext;
+ oldSharedScope = ep->sharedScope;
+ ep->sharedContext = data->context();
+ ep->sharedScope = data->me;
+ } else {
+ oldOverride = ep->contextClass->setOverrideObject(data->expressionContext, secondaryScope);
+ }
+
+ QScriptValue svalue = data->expressionFunction.call();
+
+ if (data->isShared) {
+ ep->sharedContext = oldSharedContext;
+ ep->sharedScope = oldSharedScope;
+ } else {
+ ep->contextClass->setOverrideObject(data->expressionContext, oldOverride);
+ }
+
+ if (isUndefined)
+ *isUndefined = svalue.isUndefined() || scriptEngine->hasUncaughtException();
+
+ // Handle exception
+ if (scriptEngine->hasUncaughtException()) {
+ exceptionToError(scriptEngine, data->error);
+ scriptEngine->clearExceptions();
+ return QVariant();
+ } else {
+ data->error = QDeclarativeError();
+ }
+
+ QVariant rv;
+
+ if (svalue.isArray()) {
+ int length = svalue.property(QLatin1String("length")).toInt32();
+ if (length && svalue.property(0).isObject()) {
+ QList<QObject *> list;
+ for (int ii = 0; ii < length; ++ii) {
+ QScriptValue arrayItem = svalue.property(ii);
+ QObject *d = arrayItem.toQObject();
+ list << d;
+ }
+ rv = QVariant::fromValue(list);
+ }
+ } else if (svalue.isObject() &&
+ ep->objectClass->scriptClass(svalue) == ep->objectClass) {
+ QObject *o = svalue.toQObject();
+ int type = QMetaType::QObjectStar;
+ // If the object is null, we extract the predicted type. While this isn't
+ // 100% reliable, in many cases it gives us better error messages if we
+ // assign this null-object to an incompatible property
+ if (!o) type = ep->objectClass->objectType(svalue);
+
+ return QVariant(type, &o);
+ }
+
+ if (rv.isNull())
+ rv = svalue.toVariant();
+
+ return rv;
+}
+
+QVariant QDeclarativeExpressionPrivate::value(QObject *secondaryScope, bool *isUndefined)
+{
+ Q_Q(QDeclarativeExpression);
+
+ QVariant rv;
+ if (!q->engine()) {
+ qWarning("QDeclarativeExpression: Attempted to evaluate an expression in an invalid context");
+ return rv;
+ }
+
+ if (data->expression.isEmpty())
+ return rv;
+
+#ifdef Q_ENABLE_PERFORMANCE_LOG
+ QDeclarativePerfTimer<QDeclarativePerf::BindValue> perf;
+#endif
+
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(q->engine());
+
+ QDeclarativeExpression *lastCurrentExpression = ep->currentExpression;
+ bool lastCaptureProperties = ep->captureProperties;
+ QPODVector<QDeclarativeEnginePrivate::CapturedProperty> lastCapturedProperties;
+ ep->capturedProperties.copyAndClear(lastCapturedProperties);
+
+ ep->currentExpression = q;
+ ep->captureProperties = data->trackChange;
+
+ // This object might be deleted during the eval
+ QDeclarativeExpressionData *localData = data;
+ localData->addref();
+
+ rv = evalQtScript(secondaryScope, isUndefined);
+
+ ep->currentExpression = lastCurrentExpression;
+ ep->captureProperties = lastCaptureProperties;
+
+ // Check if we were deleted
+ if (localData->q) {
+ if ((!data->trackChange || !ep->capturedProperties.count()) && data->guardList) {
+ clearGuards();
+ } else if(data->trackChange) {
+ updateGuards(ep->capturedProperties);
+ }
+ }
+
+ localData->release();
+
+ lastCapturedProperties.copyAndClear(ep->capturedProperties);
+
+ return rv;
+}
+
+/*!
+ Returns the value of the expression, or an invalid QVariant if the
+ expression is invalid or has an error.
+
+ \a isUndefined is set to true if the expression resulted in an
+ undefined value.
+
+ \sa hasError(), error()
+*/
+QVariant QDeclarativeExpression::value(bool *isUndefined)
+{
+ Q_D(QDeclarativeExpression);
+ return d->value(0, isUndefined);
+}
+
+/*!
+Returns true if the valueChanged() signal is emitted when the expression's evaluated
+value changes.
+*/
+bool QDeclarativeExpression::notifyOnValueChanged() const
+{
+ Q_D(const QDeclarativeExpression);
+ return d->data->trackChange;
+}
+
+/*!
+ Sets whether the valueChanged() signal is emitted when the
+ expression's evaluated value changes.
+
+ If \a notifyOnChange is true, the QDeclarativeExpression will
+ monitor properties involved in the expression's evaluation, and emit
+ QDeclarativeExpression::valueChanged() if they have changed. This
+ allows an application to ensure that any value associated with the
+ result of the expression remains up to date.
+
+ If \a notifyOnChange is false (default), the QDeclarativeExpression
+ will not montitor properties involved in the expression's
+ evaluation, and QDeclarativeExpression::valueChanged() will never be
+ emitted. This is more efficient if an application wants a "one off"
+ evaluation of the expression.
+*/
+void QDeclarativeExpression::setNotifyOnValueChanged(bool notifyOnChange)
+{
+ Q_D(QDeclarativeExpression);
+ d->data->trackChange = notifyOnChange;
+}
+
+/*!
+ Returns the source file URL for this expression. The source location must
+ have been previously set by calling setSourceLocation().
+*/
+QString QDeclarativeExpression::sourceFile() const
+{
+ Q_D(const QDeclarativeExpression);
+ return d->data->url;
+}
+
+/*!
+ Returns the source file line number for this expression. The source location
+ must have been previously set by calling setSourceLocation().
+*/
+int QDeclarativeExpression::lineNumber() const
+{
+ Q_D(const QDeclarativeExpression);
+ return d->data->line;
+}
+
+/*!
+ Set the location of this expression to \a line of \a url. This information
+ is used by the script engine.
+*/
+void QDeclarativeExpression::setSourceLocation(const QString &url, int line)
+{
+ Q_D(QDeclarativeExpression);
+ d->data->url = url;
+ d->data->line = line;
+}
+
+/*!
+ Returns the expression's scope object, if provided, otherwise 0.
+
+ In addition to data provided by the expression's QDeclarativeContext, the scope
+ object's properties are also in scope during the expression's evaluation.
+*/
+QObject *QDeclarativeExpression::scopeObject() const
+{
+ Q_D(const QDeclarativeExpression);
+ return d->data->me;
+}
+
+/*!
+ Returns true if the last call to value() resulted in an error,
+ otherwise false.
+
+ \sa error(), clearError()
+*/
+bool QDeclarativeExpression::hasError() const
+{
+ Q_D(const QDeclarativeExpression);
+ return d->data->error.isValid();
+}
+
+/*!
+ Clear any expression errors. Calls to hasError() following this will
+ return false.
+
+ \sa hasError(), error()
+*/
+void QDeclarativeExpression::clearError()
+{
+ Q_D(QDeclarativeExpression);
+ d->data->error = QDeclarativeError();
+}
+
+/*!
+ Return any error from the last call to value(). If there was no error,
+ this returns an invalid QDeclarativeError instance.
+
+ \sa hasError(), clearError()
+*/
+
+QDeclarativeError QDeclarativeExpression::error() const
+{
+ Q_D(const QDeclarativeExpression);
+ return d->data->error;
+}
+
+/*! \internal */
+void QDeclarativeExpression::__q_notify()
+{
+ Q_D(QDeclarativeExpression);
+ d->emitValueChanged();
+}
+
+void QDeclarativeExpressionPrivate::clearGuards()
+{
+ Q_Q(QDeclarativeExpression);
+
+ static int notifyIdx = -1;
+ if (notifyIdx == -1)
+ notifyIdx =
+ QDeclarativeExpression::staticMetaObject.indexOfMethod("__q_notify()");
+
+ for (int ii = 0; ii < data->guardListLength; ++ii) {
+ if (data->guardList[ii].data()) {
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+ QMetaObject::disconnectOne(data->guardList[ii].data(),
+ data->guardList[ii].notifyIndex,
+ q, notifyIdx);
+#else
+ // QTBUG-6781
+ QMetaObject::disconnect(data->guardList[ii].data(),
+ data->guardList[ii].notifyIndex,
+ q, notifyIdx);
+#endif
+ }
+ }
+
+ delete [] data->guardList; data->guardList = 0;
+ data->guardListLength = 0;
+}
+
+void QDeclarativeExpressionPrivate::updateGuards(const QPODVector<QDeclarativeEnginePrivate::CapturedProperty> &properties)
+{
+ //clearGuards();
+ Q_Q(QDeclarativeExpression);
+
+ static int notifyIdx = -1;
+ if (notifyIdx == -1)
+ notifyIdx =
+ QDeclarativeExpression::staticMetaObject.indexOfMethod("__q_notify()");
+
+ QDeclarativeExpressionData::SignalGuard *newGuardList = 0;
+
+ if (properties.count() != data->guardListLength)
+ newGuardList = new QDeclarativeExpressionData::SignalGuard[properties.count()];
+
+ bool outputWarningHeader = false;
+ int hit = 0;
+ for (int ii = 0; ii < properties.count(); ++ii) {
+ const QDeclarativeEnginePrivate::CapturedProperty &property = properties.at(ii);
+
+ bool needGuard = true;
+ if (ii >= data->guardListLength) {
+ // New guard
+ } else if(data->guardList[ii].data() == property.object &&
+ data->guardList[ii].notifyIndex == property.notifyIndex) {
+ // Cache hit
+ if (!data->guardList[ii].isDuplicate ||
+ (data->guardList[ii].isDuplicate && hit == ii)) {
+ needGuard = false;
+ ++hit;
+ }
+ } else if(data->guardList[ii].data() && !data->guardList[ii].isDuplicate) {
+ // Cache miss
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+ QMetaObject::disconnectOne(data->guardList[ii].data(),
+ data->guardList[ii].notifyIndex,
+ q, notifyIdx);
+#else
+ // QTBUG-6781
+ QMetaObject::disconnect(data->guardList[ii].data(),
+ data->guardList[ii].notifyIndex,
+ q, notifyIdx);
+#endif
+ }
+ /* else {
+ // Cache miss, but nothing to do
+ } */
+
+ if (needGuard) {
+ if (!newGuardList) {
+ newGuardList = new QDeclarativeExpressionData::SignalGuard[properties.count()];
+ for (int jj = 0; jj < ii; ++jj)
+ newGuardList[jj] = data->guardList[jj];
+ }
+
+ if (property.notifyIndex != -1) {
+ bool existing = false;
+ for (int jj = 0; !existing && jj < ii; ++jj)
+ existing = newGuardList[jj].data() == property.object &&
+ newGuardList[jj].notifyIndex == property.notifyIndex;
+
+ newGuardList[ii] = property.object;
+ newGuardList[ii].notifyIndex = property.notifyIndex;
+ if (existing)
+ newGuardList[ii].isDuplicate = true;
+ else
+ QMetaObject::connect(property.object, property.notifyIndex,
+ q, notifyIdx);
+ } else {
+ if (!outputWarningHeader) {
+ outputWarningHeader = true;
+ qWarning() << "QDeclarativeExpression: Expression" << q->expression()
+ << "depends on non-NOTIFYable properties:";
+ }
+
+ const QMetaObject *metaObj = property.object->metaObject();
+ QMetaProperty metaProp = metaObj->property(property.coreIndex);
+
+ qWarning().nospace() << " " << metaObj->className()
+ << "::" << metaProp.name();
+ }
+ } else if (newGuardList) {
+ newGuardList[ii] = data->guardList[ii];
+ }
+ }
+
+ for (int ii = properties.count(); ii < data->guardListLength; ++ii) {
+ if (data->guardList[ii].data() && !data->guardList[ii].isDuplicate) {
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+ QMetaObject::disconnectOne(data->guardList[ii].data(),
+ data->guardList[ii].notifyIndex,
+ q, notifyIdx);
+#else
+ // QTBUG-6781
+ QMetaObject::disconnect(data->guardList[ii].data(),
+ data->guardList[ii].notifyIndex,
+ q, notifyIdx);
+#endif
+ }
+ }
+
+ if (newGuardList) {
+ if (data->guardList) delete [] data->guardList;
+ data->guardList = newGuardList;
+ data->guardListLength = properties.count();
+ }
+}
+
+/*!
+ \fn void QDeclarativeExpression::valueChanged()
+
+ Emitted each time the expression value changes from the last time it was
+ evaluated. The expression must have been evaluated at least once (by
+ calling QDeclarativeExpression::value()) before this signal will be emitted.
+*/
+
+void QDeclarativeExpressionPrivate::emitValueChanged()
+{
+ Q_Q(QDeclarativeExpression);
+ emit q->valueChanged();
+}
+
+QDeclarativeAbstractExpression::QDeclarativeAbstractExpression()
+: m_context(0), m_prevExpression(0), m_nextExpression(0)
+{
+}
+
+QDeclarativeAbstractExpression::~QDeclarativeAbstractExpression()
+{
+ if (m_prevExpression) {
+ *m_prevExpression = m_nextExpression;
+ if (m_nextExpression)
+ m_nextExpression->m_prevExpression = m_prevExpression;
+ }
+}
+
+QDeclarativeContext *QDeclarativeAbstractExpression::context() const
+{
+ return m_context;
+}
+
+void QDeclarativeAbstractExpression::setContext(QDeclarativeContext *context)
+{
+ if (m_prevExpression) {
+ *m_prevExpression = m_nextExpression;
+ if (m_nextExpression)
+ m_nextExpression->m_prevExpression = m_prevExpression;
+ m_prevExpression = 0;
+ m_nextExpression = 0;
+ }
+
+ m_context = context;
+
+ if (m_context) {
+ QDeclarativeContextPrivate *cp =
+ static_cast<QDeclarativeContextPrivate *>(QObjectPrivate::get(m_context));
+ m_nextExpression = cp->expressions;
+ if (m_nextExpression)
+ m_nextExpression->m_prevExpression = &m_nextExpression;
+ m_prevExpression = &cp->expressions;
+ cp->expressions = this;
+ }
+}
+
+void QDeclarativeAbstractExpression::refresh()
+{
+}
+
+bool QDeclarativeAbstractExpression::isValid() const
+{
+ return m_context != 0;
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/declarative/qml/qdeclarativeexpression.h b/src/declarative/qml/qdeclarativeexpression.h
new file mode 100644
index 0000000000..911d328371
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeexpression.h
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEEXPRESSION_H
+#define QDECLARATIVEEXPRESSION_H
+
+#include "qdeclarativeerror.h"
+
+#include <QtCore/qobject.h>
+#include <QtCore/qvariant.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QString;
+class QDeclarativeRefCount;
+class QDeclarativeEngine;
+class QDeclarativeContext;
+class QDeclarativeExpressionPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeExpression : public QObject
+{
+ Q_OBJECT
+public:
+ QDeclarativeExpression();
+ QDeclarativeExpression(QDeclarativeContext *, const QString &, QObject *);
+ virtual ~QDeclarativeExpression();
+
+ QDeclarativeEngine *engine() const;
+ QDeclarativeContext *context() const;
+
+ QString expression() const;
+ void setExpression(const QString &);
+
+ bool notifyOnValueChanged() const;
+ void setNotifyOnValueChanged(bool);
+
+ QString sourceFile() const;
+ int lineNumber() const;
+ void setSourceLocation(const QString &fileName, int line);
+
+ QObject *scopeObject() const;
+
+ bool hasError() const;
+ void clearError();
+ QDeclarativeError error() const;
+
+ QVariant value(bool *isUndefined = 0);
+
+Q_SIGNALS:
+ void valueChanged();
+
+protected:
+ QDeclarativeExpression(QDeclarativeContext *, const QString &, QObject *,
+ QDeclarativeExpressionPrivate &dd);
+ QDeclarativeExpression(QDeclarativeContext *, void *, QDeclarativeRefCount *rc, QObject *me, const QString &,
+ int, QDeclarativeExpressionPrivate &dd);
+
+private Q_SLOTS:
+ void __q_notify();
+
+private:
+ Q_DECLARE_PRIVATE(QDeclarativeExpression)
+ friend class QDeclarativeDebugger;
+ friend class QDeclarativeContext;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEEXPRESSION_H
+
diff --git a/src/declarative/qml/qdeclarativeexpression_p.h b/src/declarative/qml/qdeclarativeexpression_p.h
new file mode 100644
index 0000000000..cd1729d6ba
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeexpression_p.h
@@ -0,0 +1,190 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEEXPRESSION_P_H
+#define QDECLARATIVEEXPRESSION_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeexpression.h"
+
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativeguard_p.h"
+
+#include <QtScript/qscriptvalue.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeAbstractExpression
+{
+public:
+ QDeclarativeAbstractExpression();
+ virtual ~QDeclarativeAbstractExpression();
+
+ bool isValid() const;
+
+ QDeclarativeContext *context() const;
+ void setContext(QDeclarativeContext *);
+
+ virtual void refresh();
+
+private:
+ friend class QDeclarativeContext;
+ friend class QDeclarativeContextPrivate;
+ QDeclarativeContext *m_context;
+ QDeclarativeAbstractExpression **m_prevExpression;
+ QDeclarativeAbstractExpression *m_nextExpression;
+};
+
+class QDeclarativeDelayedError
+{
+public:
+ inline QDeclarativeDelayedError() : nextError(0), prevError(0) {}
+ inline ~QDeclarativeDelayedError() { removeError(); }
+
+ QDeclarativeError error;
+
+ bool addError(QDeclarativeEnginePrivate *);
+
+ inline void removeError() {
+ if (!prevError) return;
+ if (nextError) nextError->prevError = prevError;
+ *prevError = nextError;
+ nextError = 0;
+ prevError = 0;
+ }
+
+private:
+ QDeclarativeDelayedError *nextError;
+ QDeclarativeDelayedError **prevError;
+};
+
+class QDeclarativeExpressionData : public QDeclarativeAbstractExpression, public QDeclarativeDelayedError, public QDeclarativeRefCount
+{
+public:
+ QDeclarativeExpressionData();
+ virtual ~QDeclarativeExpressionData();
+
+ QDeclarativeExpressionPrivate *q;
+
+ QDeclarativeRefCount *dataRef;
+ QString expression;
+ bool expressionFunctionValid:1;
+ bool expressionRewritten:1;
+ QScriptValue expressionFunction;
+ QScriptValue expressionContext;
+
+ QObject *me;
+ bool trackChange;
+
+ bool isShared;
+
+ QString url; // This is a QString for a reason. QUrls are slooooooow...
+ int line;
+
+ struct SignalGuard : public QDeclarativeGuard<QObject> {
+ SignalGuard() : isDuplicate(false), notifyIndex(-1) {}
+
+ SignalGuard &operator=(QObject *obj) {
+ QDeclarativeGuard<QObject>::operator=(obj);
+ return *this;
+ }
+ SignalGuard &operator=(const SignalGuard &o) {
+ QDeclarativeGuard<QObject>::operator=(o);
+ isDuplicate = o.isDuplicate;
+ notifyIndex = o.notifyIndex;
+ return *this;
+ }
+
+ bool isDuplicate:1;
+ int notifyIndex:31;
+ };
+ SignalGuard *guardList;
+ int guardListLength;
+};
+
+class QDeclarativeExpression;
+class QString;
+class QDeclarativeExpressionPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeExpression)
+public:
+ QDeclarativeExpressionPrivate();
+ QDeclarativeExpressionPrivate(QDeclarativeExpressionData *);
+ ~QDeclarativeExpressionPrivate();
+
+ void init(QDeclarativeContext *, const QString &, QObject *);
+ void init(QDeclarativeContext *, void *, QDeclarativeRefCount *, QObject *, const QString &, int);
+
+ QDeclarativeExpressionData *data;
+
+ QVariant value(QObject *secondaryScope = 0, bool *isUndefined = 0);
+ QVariant evalQtScript(QObject *secondaryScope, bool *isUndefined = 0);
+
+ void updateGuards(const QPODVector<QDeclarativeEnginePrivate::CapturedProperty> &properties);
+ void clearGuards();
+
+ static QDeclarativeExpressionPrivate *get(QDeclarativeExpression *expr) {
+ return static_cast<QDeclarativeExpressionPrivate *>(QObjectPrivate::get(expr));
+ }
+ static QDeclarativeExpression *get(QDeclarativeExpressionPrivate *expr) {
+ return expr->q_func();
+ }
+
+ virtual void emitValueChanged();
+
+ static void exceptionToError(QScriptEngine *, QDeclarativeError &);
+ static QScriptValue evalInObjectScope(QDeclarativeContext *, QObject *, const QString &, QScriptValue * = 0);
+ static QScriptValue evalInObjectScope(QDeclarativeContext *, QObject *, const QScriptProgram &, QScriptValue * = 0);
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEEXPRESSION_P_H
diff --git a/src/declarative/qml/qdeclarativeextensioninterface.h b/src/declarative/qml/qdeclarativeextensioninterface.h
new file mode 100644
index 0000000000..0fabd6de89
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeextensioninterface.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEEXTENSIONINTERFACE_H
+#define QDECLARATIVEEXTENSIONINTERFACE_H
+
+#include <QtCore/qobject.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeEngine;
+
+struct Q_DECLARATIVE_EXPORT QDeclarativeExtensionInterface
+{
+ virtual ~QDeclarativeExtensionInterface() {}
+ virtual void registerTypes(const char *uri) = 0;
+ virtual void initializeEngine(QDeclarativeEngine *engine, const char *uri) = 0;
+};
+
+Q_DECLARE_INTERFACE(QDeclarativeExtensionInterface, "com.trolltech.Qt.QDeclarativeExtensionInterface/1.0")
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEEXTENSIONINTERFACE_H
diff --git a/src/declarative/qml/qdeclarativeextensionplugin.cpp b/src/declarative/qml/qdeclarativeextensionplugin.cpp
new file mode 100644
index 0000000000..7617977b70
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeextensionplugin.cpp
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeextensionplugin.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \since 4.7
+ \class QDeclarativeExtensionPlugin
+ \brief The QDeclarativeExtensionPlugin class provides an abstract base for custom QML extension plugins.
+
+ \ingroup plugins
+
+ QDeclarativeExtensionPlugin is a plugin interface that makes it
+ possible to offer extensions that can be loaded dynamically into
+ applications using the QDeclarativeEngine class.
+
+ Writing a QML extension plugin is achieved by subclassing this
+ base class, reimplementing the pure virtual initialize()
+ function, and exporting the class using the Q_EXPORT_PLUGIN2()
+ macro. See \l {How to Create Qt Plugins} for details.
+
+ \sa QDeclarativeEngine::importExtension()
+*/
+
+/*!
+ \fn void QDeclarativeExtensionPlugin::registerTypes(const char *uri)
+
+ Registers the QML types in the given \a uri.
+*/
+
+/*!
+ Constructs a QML extension plugin with the given \a parent.
+
+ Note that this constructor is invoked automatically by the
+ Q_EXPORT_PLUGIN2() macro, so there is no need for calling it
+ explicitly.
+*/
+QDeclarativeExtensionPlugin::QDeclarativeExtensionPlugin(QObject *parent)
+ : QObject(parent)
+{
+}
+
+QDeclarativeExtensionPlugin::~QDeclarativeExtensionPlugin()
+{
+}
+
+/*!
+ \fn void QDeclarativeExtensionPlugin::initializeEngine(QDeclarativeEngine *engine, const char *uri)
+
+ Initializes the extension from the \a uri using the \a engine.
+*/
+
+void QDeclarativeExtensionPlugin::initializeEngine(QDeclarativeEngine *engine, const char *uri)
+{
+ Q_UNUSED(engine);
+ Q_UNUSED(uri);
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeextensionplugin.h b/src/declarative/qml/qdeclarativeextensionplugin.h
new file mode 100644
index 0000000000..c2ad79867c
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeextensionplugin.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEEXTENSIONPLUGIN_H
+#define QDECLARATIVEEXTENSIONPLUGIN_H
+
+#include <QtCore/qplugin.h>
+
+#include "qdeclarativeextensioninterface.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeEngine;
+
+class Q_DECLARATIVE_EXPORT QDeclarativeExtensionPlugin : public QObject, public QDeclarativeExtensionInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QDeclarativeExtensionInterface)
+public:
+ explicit QDeclarativeExtensionPlugin(QObject *parent = 0);
+ ~QDeclarativeExtensionPlugin();
+
+ virtual void registerTypes(const char *uri) = 0;
+ virtual void initializeEngine(QDeclarativeEngine *engine, const char *uri);
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEEXTENSIONPLUGIN_H
diff --git a/src/declarative/qml/qdeclarativeglobal_p.h b/src/declarative/qml/qdeclarativeglobal_p.h
new file mode 100644
index 0000000000..104199227f
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeglobal_p.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEGLOBAL_H
+#define QDECLARATIVEGLOBAL_H
+
+#include <QtCore/qglobal.h>
+#include <QtCore/QObject>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+#define DEFINE_BOOL_CONFIG_OPTION(name, var) \
+ static bool name() \
+ { \
+ static enum { Yes, No, Unknown } status = Unknown; \
+ if (status == Unknown) { \
+ QByteArray v = qgetenv(#var); \
+ bool value = !v.isEmpty() && v != "0" && v != "false"; \
+ if (value) status = Yes; \
+ else status = No; \
+ } \
+ return status == Yes; \
+ }
+
+struct QDeclarativeGraphics_DerivedObject : public QObject
+{
+ void setParent_noEvent(QObject *parent) {
+ bool sce = d_ptr->sendChildEvents;
+ d_ptr->sendChildEvents = false;
+ setParent(parent);
+ d_ptr->sendChildEvents = sce;
+ }
+};
+
+/*!
+ Makes the \a object a child of \a parent. Note that when using this method,
+ neither \a parent nor the object's previous parent (if it had one) will
+ receive ChildRemoved or ChildAdded events.
+*/
+inline void QDeclarative_setParent_noEvent(QObject *object, QObject *parent)
+{
+ static_cast<QDeclarativeGraphics_DerivedObject *>(object)->setParent_noEvent(parent);
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEGLOBAL_H
diff --git a/src/declarative/qml/qdeclarativeglobalscriptclass.cpp b/src/declarative/qml/qdeclarativeglobalscriptclass.cpp
new file mode 100644
index 0000000000..9ee2fe5bb6
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeglobalscriptclass.cpp
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeglobalscriptclass_p.h"
+
+#include <QtScript/qscriptstring.h>
+#include <QtScript/qscriptengine.h>
+#include <QtScript/qscriptvalueiterator.h>
+
+QT_BEGIN_NAMESPACE
+
+/*
+ Used to prevent any writes to the global object.
+*/
+QDeclarativeGlobalScriptClass::QDeclarativeGlobalScriptClass(QScriptEngine *engine)
+: QScriptClass(engine)
+{
+ QScriptValue globalObject = engine->globalObject();
+ m_globalObject = engine->newObject();
+
+ QScriptValueIterator iter(globalObject);
+ while (iter.hasNext()) {
+ iter.next();
+ m_globalObject.setProperty(iter.scriptName(), iter.value());
+ m_illegalNames.insert(iter.name());
+ }
+
+ QScriptValue v = engine->newObject();
+ v.setScriptClass(this);
+ engine->setGlobalObject(v);
+}
+
+QScriptClass::QueryFlags
+QDeclarativeGlobalScriptClass::queryProperty(const QScriptValue &object,
+ const QScriptString &name,
+ QueryFlags flags, uint *id)
+{
+ Q_UNUSED(object);
+ Q_UNUSED(name);
+ Q_UNUSED(flags);
+ Q_UNUSED(id);
+ return HandlesReadAccess | HandlesWriteAccess;
+}
+
+QScriptValue
+QDeclarativeGlobalScriptClass::property(const QScriptValue &object,
+ const QScriptString &name,
+ uint id)
+{
+ Q_UNUSED(object);
+ Q_UNUSED(name);
+ Q_UNUSED(id);
+ return engine()->undefinedValue();
+}
+
+void QDeclarativeGlobalScriptClass::setProperty(QScriptValue &object,
+ const QScriptString &name,
+ uint id, const QScriptValue &value)
+{
+ Q_UNUSED(object);
+ Q_UNUSED(id);
+ Q_UNUSED(value);
+ QString error = QLatin1String("Invalid write to global property \"") +
+ name.toString() + QLatin1Char('\"');
+ engine()->currentContext()->throwError(error);
+}
+
+/* This method is for the use of tst_qdeclarativeecmascript::callQtInvokables() only */
+void QDeclarativeGlobalScriptClass::explicitSetProperty(const QString &name, const QScriptValue &value)
+{
+ QScriptValue globalObject = engine()->globalObject();
+
+ QScriptValue v = engine()->newObject();
+
+ QScriptValueIterator iter(v);
+ while (iter.hasNext()) {
+ iter.next();
+ v.setProperty(iter.scriptName(), iter.value());
+ }
+
+ v.setProperty(name, value);
+ v.setScriptClass(this);
+
+ engine()->setGlobalObject(v);
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/declarative/qml/qdeclarativeglobalscriptclass_p.h b/src/declarative/qml/qdeclarativeglobalscriptclass_p.h
new file mode 100644
index 0000000000..1b34aee203
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeglobalscriptclass_p.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEGLOBALSCRIPTCLASS_P_H
+#define QDECLARATIVEGLOBALSCRIPTCLASS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtScript/qscriptclass.h>
+#include <QtCore/qset.h>
+
+QT_BEGIN_NAMESPACE
+
+class Q_AUTOTEST_EXPORT QDeclarativeGlobalScriptClass : public QScriptClass
+{
+public:
+ QDeclarativeGlobalScriptClass(QScriptEngine *);
+
+ virtual QueryFlags queryProperty(const QScriptValue &object,
+ const QScriptString &name,
+ QueryFlags flags, uint *id);
+
+ virtual QScriptValue property(const QScriptValue &object,
+ const QScriptString &name, uint id);
+
+ virtual void setProperty(QScriptValue &object, const QScriptString &name,
+ uint id, const QScriptValue &value);
+
+ void explicitSetProperty(const QString &, const QScriptValue &);
+
+ const QScriptValue &globalObject() const { return m_globalObject; }
+ const QSet<QString> &illegalNames() const { return m_illegalNames; }
+
+private:
+ QSet<QString> m_illegalNames;
+ QScriptValue m_globalObject;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEGLOBALSCRIPTCLASS_P_H
diff --git a/src/declarative/qml/qdeclarativeguard_p.h b/src/declarative/qml/qdeclarativeguard_p.h
new file mode 100644
index 0000000000..0861e9a5f1
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeguard_p.h
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** 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 QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEGUARD_P_H
+#define QDECLARATIVEGUARD_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
+// file may change from version to version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qglobal.h>
+#include <QtCore/qvariant.h>
+
+QT_BEGIN_NAMESPACE
+
+class QObject;
+template<class T>
+class QDeclarativeGuard
+{
+ QObject *o;
+ QDeclarativeGuard<QObject> *next;
+ QDeclarativeGuard<QObject> **prev;
+ friend class QDeclarativeDeclarativeData;
+public:
+ inline QDeclarativeGuard();
+ inline QDeclarativeGuard(T *);
+ inline QDeclarativeGuard(const QDeclarativeGuard<T> &);
+ inline virtual ~QDeclarativeGuard();
+
+ inline QDeclarativeGuard<T> &operator=(const QDeclarativeGuard<T> &o);
+ inline QDeclarativeGuard<T> &operator=(T *);
+
+ inline bool isNull() const
+ { return !o; }
+
+ inline T* operator->() const
+ { return static_cast<T*>(const_cast<QObject*>(o)); }
+ inline T& operator*() const
+ { return *static_cast<T*>(const_cast<QObject*>(o)); }
+ inline operator T*() const
+ { return static_cast<T*>(const_cast<QObject*>(o)); }
+ inline T* data() const
+ { return static_cast<T*>(const_cast<QObject*>(o)); }
+
+protected:
+ virtual void objectDestroyed(T *) {}
+
+private:
+ inline void addGuard();
+ inline void remGuard();
+};
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QDeclarativeGuard<QObject>);
+
+#include "qdeclarativedeclarativedata_p.h"
+
+QT_BEGIN_NAMESPACE
+
+template<class T>
+QDeclarativeGuard<T>::QDeclarativeGuard()
+: o(0), next(0), prev(0)
+{
+}
+
+template<class T>
+QDeclarativeGuard<T>::QDeclarativeGuard(T *g)
+: o(g), next(0), prev(0)
+{
+ if (o) addGuard();
+}
+
+template<class T>
+QDeclarativeGuard<T>::QDeclarativeGuard(const QDeclarativeGuard<T> &g)
+: o(g.o), next(0), prev(0)
+{
+ if (o) addGuard();
+}
+
+template<class T>
+QDeclarativeGuard<T>::~QDeclarativeGuard()
+{
+ if (prev) remGuard();
+ o = 0;
+}
+
+template<class T>
+QDeclarativeGuard<T> &QDeclarativeGuard<T>::operator=(const QDeclarativeGuard<T> &g)
+{
+ if (g.o != o) {
+ if (prev) remGuard();
+ o = g.o;
+ if (o) addGuard();
+ }
+ return *this;
+}
+
+template<class T>
+QDeclarativeGuard<T> &QDeclarativeGuard<T>::operator=(T *g)
+{
+ if (g != o) {
+ if (prev) remGuard();
+ o = g;
+ if (o) addGuard();
+ }
+ return *this;
+}
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEGUARD_P_H
diff --git a/src/declarative/qml/qdeclarativeimageprovider.cpp b/src/declarative/qml/qdeclarativeimageprovider.cpp
new file mode 100644
index 0000000000..9ef8545db6
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeimageprovider.cpp
@@ -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 QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeimageprovider.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QDeclarativeImageProvider
+ \brief The QDeclarativeImageProvider class provides an interface for threaded image requests.
+
+ Note: the request() method may be called by multiple threads, so ensure the
+ implementation of this method is reentrant.
+
+ \sa QDeclarativeEngine::addImageProvider()
+*/
+
+/*!
+ The destructor is virtual.
+ */
+QDeclarativeImageProvider::~QDeclarativeImageProvider()
+{
+}
+
+/*!
+ \fn QImage QDeclarativeImageProvider::request(const QString &id)
+
+ Implement this method to return the image with \a id.
+
+ Note: this method may be called by multiple threads, so ensure the
+ implementation of this method is reentrant.
+*/
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeimageprovider.h b/src/declarative/qml/qdeclarativeimageprovider.h
new file mode 100644
index 0000000000..6ee7bcf368
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeimageprovider.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEIMAGEPROVIDER_H
+#define QDECLARATIVEIMAGEPROVIDER_H
+
+#include <QtGui/qimage.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class Q_DECLARATIVE_EXPORT QDeclarativeImageProvider
+{
+public:
+ virtual ~QDeclarativeImageProvider();
+ virtual QImage request(const QString &id) = 0;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEIMAGEPROVIDER
diff --git a/src/declarative/qml/qdeclarativeinfo.cpp b/src/declarative/qml/qdeclarativeinfo.cpp
new file mode 100644
index 0000000000..7dc61fd8d5
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeinfo.cpp
@@ -0,0 +1,127 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeinfo.h"
+
+#include "qdeclarativedeclarativedata_p.h"
+#include "qdeclarativecontext.h"
+#include "qdeclarativemetatype_p.h"
+
+#include <QCoreApplication>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \fn QDeclarativeInfo qmlInfo(const QObject *object)
+
+ \brief Prints warnings messages that include the file and line number for QML types.
+
+ When QML types display warning messages, it improves traceability
+ if they include the QML file and line number on which the
+ particular instance was instantiated.
+
+ To include the file and line number, an object must be passed. If
+ the file and line number is not available for that instance
+ (either it was not instantiated by the QML engine or location
+ information is disabled), "unknown location" will be used instead.
+
+ For example,
+
+ \code
+ qmlInfo(object) << tr("component property is a write-once property");
+ \endcode
+
+ prints
+
+ \code
+ QML MyCustomType (unknown location): component property is a write-once property
+ \endcode
+*/
+
+QDeclarativeInfo::QDeclarativeInfo(const QObject *object)
+: QDebug(QtWarningMsg)
+{
+ QString pos = QLatin1String("QML");
+ if (object) {
+ pos += QLatin1Char(' ');
+
+ QString typeName;
+ QDeclarativeType *type = QDeclarativeMetaType::qmlType(object->metaObject());
+ if (type) {
+ typeName = QLatin1String(type->qmlTypeName());
+ int lastSlash = typeName.lastIndexOf(QLatin1Char('/'));
+ if (lastSlash != -1)
+ typeName = typeName.mid(lastSlash+1);
+ } else {
+ typeName = QString::fromUtf8(object->metaObject()->className());
+ int marker = typeName.indexOf(QLatin1String("_QMLTYPE_"));
+ if (marker != -1)
+ typeName = typeName.left(marker);
+ }
+
+ pos += typeName;
+ }
+ QDeclarativeDeclarativeData *ddata = object?QDeclarativeDeclarativeData::get(object):0;
+ pos += QLatin1String(" (");
+ if (ddata) {
+ if (ddata->outerContext) {
+ pos += ddata->outerContext->baseUrl().toString();
+ pos += QLatin1Char(':');
+ pos += QString::number(ddata->lineNumber);
+ pos += QLatin1Char(':');
+ pos += QString::number(ddata->columnNumber);
+ } else {
+ pos += QCoreApplication::translate("QDeclarativeInfo","unknown location");
+ }
+ } else {
+ pos += QCoreApplication::translate("QDeclarativeInfo","unknown location");
+ }
+ pos += QLatin1Char(')');
+ *this << pos;
+ nospace();
+}
+
+QDeclarativeInfo::~QDeclarativeInfo()
+{
+}
+
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeinfo.h b/src/declarative/qml/qdeclarativeinfo.h
new file mode 100644
index 0000000000..8f69f73686
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeinfo.h
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEINFO_H
+#define QDECLARATIVEINFO_H
+
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class Q_DECLARATIVE_EXPORT QDeclarativeInfo : public QDebug
+{
+public:
+ QDeclarativeInfo(const QObject *);
+ ~QDeclarativeInfo();
+
+ inline QDeclarativeInfo &operator<<(QChar t) { QDebug::operator<<(t); return *this; }
+ inline QDeclarativeInfo &operator<<(QBool t) { QDebug::operator<<(t); return *this; }
+ inline QDeclarativeInfo &operator<<(bool t) { QDebug::operator<<(t); return *this; }
+ inline QDeclarativeInfo &operator<<(char t) { QDebug::operator<<(t); return *this; }
+ inline QDeclarativeInfo &operator<<(signed short t) { QDebug::operator<<(t); return *this; }
+ inline QDeclarativeInfo &operator<<(unsigned short t) { QDebug::operator<<(t); return *this; }
+ inline QDeclarativeInfo &operator<<(signed int t) { QDebug::operator<<(t); return *this; }
+ inline QDeclarativeInfo &operator<<(unsigned int t) { QDebug::operator<<(t); return *this; }
+ inline QDeclarativeInfo &operator<<(signed long t) { QDebug::operator<<(t); return *this; }
+ inline QDeclarativeInfo &operator<<(unsigned long t) { QDebug::operator<<(t); return *this; }
+ inline QDeclarativeInfo &operator<<(qint64 t) { QDebug::operator<<(t); return *this; }
+ inline QDeclarativeInfo &operator<<(quint64 t) { QDebug::operator<<(t); return *this; }
+ inline QDeclarativeInfo &operator<<(float t) { QDebug::operator<<(t); return *this; }
+ inline QDeclarativeInfo &operator<<(double t) { QDebug::operator<<(t); return *this; }
+ inline QDeclarativeInfo &operator<<(const char* t) { QDebug::operator<<(t); return *this; }
+ inline QDeclarativeInfo &operator<<(const QString & t) { QDebug::operator<<(t.toLocal8Bit().constData()); return *this; }
+ inline QDeclarativeInfo &operator<<(const QStringRef & t) { return operator<<(t.toString()); }
+ inline QDeclarativeInfo &operator<<(const QLatin1String &t) { QDebug::operator<<(t.latin1()); return *this; }
+ inline QDeclarativeInfo &operator<<(const QByteArray & t) { QDebug::operator<<(t); return *this; }
+ inline QDeclarativeInfo &operator<<(const void * t) { QDebug::operator<<(t); return *this; }
+ inline QDeclarativeInfo &operator<<(QTextStreamFunction f) { QDebug::operator<<(f); return *this; }
+ inline QDeclarativeInfo &operator<<(QTextStreamManipulator m) { QDebug::operator<<(m); return *this; }
+};
+
+Q_DECLARATIVE_EXPORT inline QDeclarativeInfo qmlInfo(const QObject *me)
+{
+ return QDeclarativeInfo(me);
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEINFO_H
diff --git a/src/declarative/qml/qdeclarativeinstruction.cpp b/src/declarative/qml/qdeclarativeinstruction.cpp
new file mode 100644
index 0000000000..cf485fe00c
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeinstruction.cpp
@@ -0,0 +1,210 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeinstruction_p.h"
+
+#include "qdeclarativecompiler_p.h"
+
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+void QDeclarativeCompiledData::dump(QDeclarativeInstruction *instr, int idx)
+{
+ QByteArray lineNumber = QByteArray::number(instr->line);
+ if (instr->line == (unsigned short)-1)
+ lineNumber = "NA";
+ const char *line = lineNumber.constData();
+
+ switch(instr->type) {
+ case QDeclarativeInstruction::Init:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "INIT\t\t\t" << instr->init.bindingsSize << "\t" << instr->init.parserStatusSize << "\t" << instr->init.contextCache << "\t" << instr->init.compiledBinding;
+ break;
+ case QDeclarativeInstruction::CreateObject:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "CREATE\t\t\t" << instr->create.type << "\t\t\t" << types.at(instr->create.type).className;
+ break;
+ case QDeclarativeInstruction::SetId:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "SETID\t\t\t" << instr->setId.value << "\t\t\t" << primitives.at(instr->setId.value);
+ break;
+ case QDeclarativeInstruction::SetDefault:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "SET_DEFAULT";
+ break;
+ case QDeclarativeInstruction::CreateComponent:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "CREATE_COMPONENT\t" << instr->createComponent.count;
+ break;
+ case QDeclarativeInstruction::StoreMetaObject:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_META\t\t" << instr->storeMeta.data;
+ break;
+
+ case QDeclarativeInstruction::StoreFloat:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_FLOAT\t\t" << instr->storeFloat.propertyIndex << "\t" << instr->storeFloat.value;
+ break;
+ case QDeclarativeInstruction::StoreDouble:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_DOUBLE\t\t" << instr->storeDouble.propertyIndex << "\t" << instr->storeDouble.value;
+ break;
+ case QDeclarativeInstruction::StoreInteger:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_INTEGER\t\t" << instr->storeInteger.propertyIndex << "\t" << instr->storeInteger.value;
+ break;
+ case QDeclarativeInstruction::StoreBool:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_BOOL\t\t" << instr->storeBool.propertyIndex << "\t" << instr->storeBool.value;
+ break;
+ case QDeclarativeInstruction::StoreString:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_STRING\t\t" << instr->storeString.propertyIndex << "\t" << instr->storeString.value << "\t\t" << primitives.at(instr->storeString.value);
+ break;
+ case QDeclarativeInstruction::StoreUrl:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_URL\t\t" << instr->storeUrl.propertyIndex << "\t" << instr->storeUrl.value << "\t\t" << primitives.at(instr->storeUrl.value);
+ break;
+ case QDeclarativeInstruction::StoreColor:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_COLOR\t\t" << instr->storeColor.propertyIndex << "\t\t\t" << QString::number(instr->storeColor.value, 16);
+ break;
+ case QDeclarativeInstruction::StoreDate:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_DATE\t\t" << instr->storeDate.propertyIndex << "\t" << instr->storeDate.value;
+ break;
+ case QDeclarativeInstruction::StoreTime:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_TIME\t\t" << instr->storeTime.propertyIndex << "\t" << instr->storeTime.valueIndex;
+ break;
+ case QDeclarativeInstruction::StoreDateTime:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_DATETIME\t\t" << instr->storeDateTime.propertyIndex << "\t" << instr->storeDateTime.valueIndex;
+ break;
+ case QDeclarativeInstruction::StorePoint:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_POINT\t\t" << instr->storeRealPair.propertyIndex << "\t" << instr->storeRealPair.valueIndex;
+ break;
+ case QDeclarativeInstruction::StorePointF:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_POINTF\t\t" << instr->storeRealPair.propertyIndex << "\t" << instr->storeRealPair.valueIndex;
+ break;
+ case QDeclarativeInstruction::StoreSize:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_SIZE\t\t" << instr->storeRealPair.propertyIndex << "\t" << instr->storeRealPair.valueIndex;
+ break;
+ case QDeclarativeInstruction::StoreSizeF:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_SIZEF\t\t" << instr->storeRealPair.propertyIndex << "\t" << instr->storeRealPair.valueIndex;
+ break;
+ case QDeclarativeInstruction::StoreRect:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_RECT\t\t" << instr->storeRect.propertyIndex << "\t" << instr->storeRect.valueIndex;
+ break;
+ case QDeclarativeInstruction::StoreRectF:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_RECTF\t\t" << instr->storeRect.propertyIndex << "\t" << instr->storeRect.valueIndex;
+ break;
+ case QDeclarativeInstruction::StoreVector3D:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_VECTOR3D\t\t" << instr->storeVector3D.propertyIndex << "\t" << instr->storeVector3D.valueIndex;
+ break;
+ case QDeclarativeInstruction::StoreVariant:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_VARIANT\t\t" << instr->storeString.propertyIndex << "\t" << instr->storeString.value << "\t\t" << primitives.at(instr->storeString.value);
+ break;
+ case QDeclarativeInstruction::StoreObject:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_OBJECT\t\t" << instr->storeObject.propertyIndex;
+ break;
+ case QDeclarativeInstruction::StoreVariantObject:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_VARIANT_OBJECT\t" << instr->storeObject.propertyIndex;
+ break;
+ case QDeclarativeInstruction::StoreInterface:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_INTERFACE\t\t" << instr->storeObject.propertyIndex;
+ break;
+
+ case QDeclarativeInstruction::StoreSignal:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_SIGNAL\t\t" << instr->storeSignal.signalIndex << "\t" << instr->storeSignal.value << "\t\t" << primitives.at(instr->storeSignal.value);
+ break;
+ case QDeclarativeInstruction::StoreScript:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_SCRIPT\t\t" << instr->storeScript.value;
+ break;
+ case QDeclarativeInstruction::StoreScriptString:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_SCRIPT_STRING\t" << instr->storeScriptString.propertyIndex << "\t" << instr->storeScriptString.value << "\t" << instr->storeScriptString.scope;
+ break;
+
+ case QDeclarativeInstruction::AssignSignalObject:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "ASSIGN_SIGNAL_OBJECT\t" << instr->assignSignalObject.signal << "\t\t\t" << datas.at(instr->assignSignalObject.signal);
+ break;
+ case QDeclarativeInstruction::AssignCustomType:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "ASSIGN_CUSTOMTYPE\t" << instr->assignCustomType.propertyIndex << "\t" << instr->assignCustomType.valueIndex;
+ break;
+
+ case QDeclarativeInstruction::StoreBinding:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_BINDING\t" << instr->assignBinding.property << "\t" << instr->assignBinding.value << "\t" << instr->assignBinding.context;
+ break;
+ case QDeclarativeInstruction::StoreCompiledBinding:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_COMPILED_BINDING\t" << instr->assignBinding.property << "\t" << instr->assignBinding.value << "\t" << instr->assignBinding.context;
+ break;
+ case QDeclarativeInstruction::StoreValueSource:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_VALUE_SOURCE\t" << instr->assignValueSource.property << "\t" << instr->assignValueSource.castValue;
+ break;
+ case QDeclarativeInstruction::StoreValueInterceptor:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_VALUE_INTERCEPTOR\t" << instr->assignValueInterceptor.property << "\t" << instr->assignValueInterceptor.castValue;
+ break;
+
+ case QDeclarativeInstruction::BeginObject:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "BEGIN\t\t\t" << instr->begin.castValue;
+ break;
+ case QDeclarativeInstruction::StoreObjectQList:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_OBJECT_QLIST";
+ break;
+ case QDeclarativeInstruction::AssignObjectList:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "ASSIGN_OBJECT_LIST";
+ break;
+ case QDeclarativeInstruction::FetchAttached:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "FETCH_ATTACHED\t\t" << instr->fetchAttached.id;
+ break;
+ case QDeclarativeInstruction::FetchQList:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "FETCH_QLIST\t\t" << instr->fetch.property;
+ break;
+ case QDeclarativeInstruction::FetchObject:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "FETCH\t\t\t" << instr->fetch.property;
+ break;
+ case QDeclarativeInstruction::FetchValueType:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "FETCH_VALUE\t\t" << instr->fetchValue.property << "\t" << instr->fetchValue.type;
+ break;
+ case QDeclarativeInstruction::PopFetchedObject:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "POP";
+ break;
+ case QDeclarativeInstruction::PopQList:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "POP_QLIST";
+ break;
+ case QDeclarativeInstruction::PopValueType:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "POP_VALUE\t\t" << instr->fetchValue.property << "\t" << instr->fetchValue.type;
+ break;
+ case QDeclarativeInstruction::Defer:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "DEFER" << "\t\t\t" << instr->defer.deferCount;
+ break;
+ default:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "XXX UNKOWN INSTRUCTION" << "\t" << instr->type;
+ break;
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeinstruction_p.h b/src/declarative/qml/qdeclarativeinstruction_p.h
new file mode 100644
index 0000000000..ec32b35a56
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeinstruction_p.h
@@ -0,0 +1,345 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEINSTRUCTION_P_H
+#define QDECLARATIVEINSTRUCTION_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeCompiledData;
+class Q_DECLARATIVE_EXPORT QDeclarativeInstruction
+{
+public:
+ enum Type {
+ //
+ // Object Creation
+ //
+ // CreateObject - Create a new object instance and push it on the
+ // object stack
+ // SetId - Set the id of the object on the top of the object stack
+ // SetDefault - Sets the instance on the top of the object stack to
+ // be the context's default object.
+ // StoreMetaObject - Assign the dynamic metaobject to object on the
+ // top of the stack.
+ Init, /* init */
+ CreateObject, /* create */
+ SetId, /* setId */
+ SetDefault,
+ CreateComponent, /* createComponent */
+ StoreMetaObject, /* storeMeta */
+
+ //
+ // Precomputed single assignment
+ //
+ // StoreFloat - Store a float in a core property
+ // StoreDouble - Store a double in a core property
+ // StoreInteger - Store a int or uint in a core property
+ // StoreBool - Store a bool in a core property
+ // StoreString - Store a QString in a core property
+ // StoreUrl - Store a QUrl in a core property
+ // StoreColor - Store a QColor in a core property
+ // StoreDate - Store a QDate in a core property
+ // StoreTime - Store a QTime in a core property
+ // StoreDateTime - Store a QDateTime in a core property
+ // StoreVariant - Store a QVariant in a core property
+ // StoreObject - Pop the object on the top of the object stack and
+ // store it in a core property
+ StoreFloat, /* storeFloat */
+ StoreDouble, /* storeDouble */
+ StoreInteger, /* storeInteger */
+ StoreBool, /* storeBool */
+ StoreString, /* storeString */
+ StoreUrl, /* storeUrl */
+ StoreColor, /* storeColor */
+ StoreDate, /* storeDate */
+ StoreTime, /* storeTime */
+ StoreDateTime, /* storeDateTime */
+ StorePoint, /* storeRealPair */
+ StorePointF, /* storeRealPair */
+ StoreSize, /* storeRealPair */
+ StoreSizeF, /* storeRealPair */
+ StoreRect, /* storeRect */
+ StoreRectF, /* storeRect */
+ StoreVector3D, /* storeVector3D */
+ StoreVariant, /* storeString */
+ StoreObject, /* storeObject */
+ StoreVariantObject, /* storeObject */
+ StoreInterface, /* storeObject */
+
+ StoreSignal, /* storeSignal */
+ StoreScript, /* storeScript */
+ StoreScriptString, /* storeScriptString */
+
+ //
+ // Unresolved single assignment
+ //
+ AssignSignalObject, /* assignSignalObject */
+ AssignCustomType, /* assignCustomType */
+
+ StoreBinding, /* assignBinding */
+ StoreCompiledBinding, /* assignBinding */
+ StoreValueSource, /* assignValueSource */
+ StoreValueInterceptor, /* assignValueInterceptor */
+
+ BeginObject, /* begin */
+
+ StoreObjectQList, /* NA */
+ AssignObjectList, /* NA */
+
+ FetchAttached, /* fetchAttached */
+ FetchQList, /* fetch */
+ FetchObject, /* fetch */
+ FetchValueType, /* fetchValue */
+
+ //
+ // Stack manipulation
+ //
+ // PopFetchedObject - Remove an object from the object stack
+ // PopQList - Remove a list from the list stack
+ PopFetchedObject,
+ PopQList,
+ PopValueType, /* fetchValue */
+
+ //
+ // Deferred creation
+ //
+ Defer, /* defer */
+ };
+ QDeclarativeInstruction()
+ : line(0) {}
+
+ Type type;
+ unsigned short line;
+
+ struct InitInstruction {
+ int bindingsSize;
+ int parserStatusSize;
+ int contextCache;
+ int compiledBinding;
+ };
+ struct CreateInstruction {
+ int type;
+ int data;
+ int bindingBits;
+ ushort column;
+ };
+ struct StoreMetaInstruction {
+ int data;
+ int aliasData;
+ int propertyCache;
+ };
+ struct SetIdInstruction {
+ int value;
+ int index;
+ };
+ struct AssignValueSourceInstruction {
+ int property;
+ int owner;
+ int castValue;
+ };
+ struct AssignValueInterceptorInstruction {
+ int property;
+ int owner;
+ int castValue;
+ };
+ struct AssignBindingInstruction {
+ unsigned int property;
+ int value;
+ short context;
+ short owner;
+ };
+ struct FetchInstruction {
+ int property;
+ };
+ struct FetchValueInstruction {
+ int property;
+ int type;
+ };
+ struct FetchQmlListInstruction {
+ int property;
+ int type;
+ };
+ struct BeginInstruction {
+ int castValue;
+ };
+ struct StoreFloatInstruction {
+ int propertyIndex;
+ float value;
+ };
+ struct StoreDoubleInstruction {
+ int propertyIndex;
+ double value;
+ };
+ struct StoreIntegerInstruction {
+ int propertyIndex;
+ int value;
+ };
+ struct StoreBoolInstruction {
+ int propertyIndex;
+ bool value;
+ };
+ struct StoreStringInstruction {
+ int propertyIndex;
+ int value;
+ };
+ struct StoreScriptStringInstruction {
+ int propertyIndex;
+ int value;
+ int scope;
+ };
+ struct StoreScriptInstruction {
+ int value;
+ };
+ struct StoreUrlInstruction {
+ int propertyIndex;
+ int value;
+ };
+ struct StoreColorInstruction {
+ int propertyIndex;
+ unsigned int value;
+ };
+ struct StoreDateInstruction {
+ int propertyIndex;
+ int value;
+ };
+ struct StoreTimeInstruction {
+ int propertyIndex;
+ int valueIndex;
+ };
+ struct StoreDateTimeInstruction {
+ int propertyIndex;
+ int valueIndex;
+ };
+ struct StoreRealPairInstruction {
+ int propertyIndex;
+ int valueIndex;
+ };
+ struct StoreRectInstruction {
+ int propertyIndex;
+ int valueIndex;
+ };
+ struct StoreVector3DInstruction {
+ int propertyIndex;
+ int valueIndex;
+ };
+ struct StoreObjectInstruction {
+ int propertyIndex;
+ };
+ struct AssignCustomTypeInstruction {
+ int propertyIndex;
+ int valueIndex;
+ };
+ struct StoreSignalInstruction {
+ int signalIndex;
+ int value;
+ int context;
+ };
+ struct AssignSignalObjectInstruction {
+ int signal;
+ };
+ struct CreateComponentInstruction {
+ int count;
+ ushort column;
+ int endLine;
+ int metaObject;
+ };
+ struct FetchAttachedInstruction {
+ int id;
+ };
+ struct DeferInstruction {
+ int deferCount;
+ };
+
+ union {
+ InitInstruction init;
+ CreateInstruction create;
+ StoreMetaInstruction storeMeta;
+ SetIdInstruction setId;
+ AssignValueSourceInstruction assignValueSource;
+ AssignValueInterceptorInstruction assignValueInterceptor;
+ AssignBindingInstruction assignBinding;
+ FetchInstruction fetch;
+ FetchValueInstruction fetchValue;
+ FetchQmlListInstruction fetchQmlList;
+ BeginInstruction begin;
+ StoreFloatInstruction storeFloat;
+ StoreDoubleInstruction storeDouble;
+ StoreIntegerInstruction storeInteger;
+ StoreBoolInstruction storeBool;
+ StoreStringInstruction storeString;
+ StoreScriptStringInstruction storeScriptString;
+ StoreScriptInstruction storeScript;
+ StoreUrlInstruction storeUrl;
+ StoreColorInstruction storeColor;
+ StoreDateInstruction storeDate;
+ StoreTimeInstruction storeTime;
+ StoreDateTimeInstruction storeDateTime;
+ StoreRealPairInstruction storeRealPair;
+ StoreRectInstruction storeRect;
+ StoreVector3DInstruction storeVector3D;
+ StoreObjectInstruction storeObject;
+ AssignCustomTypeInstruction assignCustomType;
+ StoreSignalInstruction storeSignal;
+ AssignSignalObjectInstruction assignSignalObject;
+ CreateComponentInstruction createComponent;
+ FetchAttachedInstruction fetchAttached;
+ DeferInstruction defer;
+ };
+
+ void dump(QDeclarativeCompiledData *);
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEINSTRUCTION_P_H
diff --git a/src/declarative/qml/qdeclarativeintegercache.cpp b/src/declarative/qml/qdeclarativeintegercache.cpp
new file mode 100644
index 0000000000..8fa210f5a9
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeintegercache.cpp
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeintegercache_p.h"
+
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativemetatype_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeIntegerCache::QDeclarativeIntegerCache(QDeclarativeEngine *e)
+: QDeclarativeCleanup(e), engine(e)
+{
+}
+
+QDeclarativeIntegerCache::~QDeclarativeIntegerCache()
+{
+ clear();
+}
+
+void QDeclarativeIntegerCache::clear()
+{
+ qDeleteAll(stringCache);
+ stringCache.clear();
+ identifierCache.clear();
+ engine = 0;
+}
+
+void QDeclarativeIntegerCache::add(const QString &id, int value)
+{
+ Q_ASSERT(!stringCache.contains(id));
+
+ QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
+
+ // ### use contextClass
+ Data *d = new Data(enginePriv->objectClass->createPersistentIdentifier(id), value);
+
+ stringCache.insert(id, d);
+ identifierCache.insert(d->identifier, d);
+}
+
+int QDeclarativeIntegerCache::value(const QString &id)
+{
+ Data *d = stringCache.value(id);
+ return d?d->value:-1;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeintegercache_p.h b/src/declarative/qml/qdeclarativeintegercache_p.h
new file mode 100644
index 0000000000..b57565e58e
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeintegercache_p.h
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEINTEGERCACHE_P_H
+#define QDECLARATIVEINTEGERCACHE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativerefcount_p.h"
+#include "qdeclarativecleanup_p.h"
+
+#include <QtCore/qhash.h>
+
+#include <private/qscriptdeclarativeclass_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeType;
+class QDeclarativeEngine;
+class QDeclarativeIntegerCache : public QDeclarativeRefCount, public QDeclarativeCleanup
+{
+public:
+ QDeclarativeIntegerCache(QDeclarativeEngine *);
+ virtual ~QDeclarativeIntegerCache();
+
+ inline int count() const;
+ void add(const QString &, int);
+ int value(const QString &);
+ inline int value(const QScriptDeclarativeClass::Identifier &id) const;
+
+protected:
+ virtual void clear();
+
+private:
+ struct Data : public QScriptDeclarativeClass::PersistentIdentifier {
+ Data(const QScriptDeclarativeClass::PersistentIdentifier &i, int v)
+ : QScriptDeclarativeClass::PersistentIdentifier(i), value(v) {}
+
+ int value;
+ };
+
+ typedef QHash<QString, Data *> StringCache;
+ typedef QHash<QScriptDeclarativeClass::Identifier, Data *> IdentifierCache;
+
+ StringCache stringCache;
+ IdentifierCache identifierCache;
+ QDeclarativeEngine *engine;
+};
+
+int QDeclarativeIntegerCache::value(const QScriptDeclarativeClass::Identifier &id) const
+{
+ Data *d = identifierCache.value(id);
+ return d?d->value:-1;
+}
+
+int QDeclarativeIntegerCache::count() const
+{
+ return stringCache.count();
+}
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEINTEGERCACHE_P_H
+
diff --git a/src/declarative/qml/qdeclarativelist.cpp b/src/declarative/qml/qdeclarativelist.cpp
new file mode 100644
index 0000000000..9691f322a6
--- /dev/null
+++ b/src/declarative/qml/qdeclarativelist.cpp
@@ -0,0 +1,409 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativelist.h"
+#include "qdeclarativelist_p.h"
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativeproperty_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeListReferencePrivate::QDeclarativeListReferencePrivate()
+: propertyType(-1), refCount(1)
+{
+}
+
+QDeclarativeListReference QDeclarativeListReferencePrivate::init(const QDeclarativeListProperty<QObject> &prop, int propType, QDeclarativeEngine *engine)
+{
+ QDeclarativeListReference rv;
+
+ if (!prop.object) return rv;
+
+ QDeclarativeEnginePrivate *p = engine?QDeclarativeEnginePrivate::get(engine):0;
+
+ int listType = p?p->listType(propType):QDeclarativeMetaType::listType(propType);
+ if (listType == -1) return rv;
+
+ rv.d = new QDeclarativeListReferencePrivate;
+ rv.d->object = prop.object;
+ rv.d->elementType = p?p->rawMetaObjectForType(listType):QDeclarativeMetaType::qmlType(listType)->baseMetaObject();
+ rv.d->property = prop;
+ rv.d->propertyType = propType;
+
+ return rv;
+}
+
+void QDeclarativeListReferencePrivate::addref()
+{
+ Q_ASSERT(refCount > 0);
+ ++refCount;
+}
+
+void QDeclarativeListReferencePrivate::release()
+{
+ Q_ASSERT(refCount > 0);
+ --refCount;
+ if (!refCount)
+ delete this;
+}
+
+/*!
+\class QDeclarativeListReference
+\brief The QDeclarativeListReference class allows the manipulation of QDeclarativeListProperty properties.
+
+QDeclarativeListReference allows programs to read from, and assign values to a QML list property in a
+simple and type safe way. A QDeclarativeListReference can be created by passing an object and property
+name or through a QDeclarativeProperty instance. These two are equivalant:
+
+\code
+QDeclarativeListReference ref1(object, "children");
+
+QDeclarativeProperty ref2(object, "children");
+QDeclarativeListReference ref2 = qvariant_cast<QDeclarativeListReference>(ref2.read());
+\endcode
+
+Not all QML list properties support all operations. A set of methods, canAppend(), canAt(), canClear() and
+canCount() allow programs to query whether an operation is supported on a given property.
+
+QML list properties are typesafe. Only QObject's that derive from the correct base class can be assigned to
+the list. The listElementType() method can be used to query the QMetaObject of the QObject type supported.
+Attempting to add objects of the incorrect type to a list property will fail.
+
+Like with normal lists, when accessing a list element by index, it is the callers responsibility to ensure
+that it does not request an out of range element using the count() method before calling at().
+*/
+
+/*!
+Constructs an invalid instance.
+*/
+QDeclarativeListReference::QDeclarativeListReference()
+: d(0)
+{
+}
+
+/*!
+Constructs a QDeclarativeListReference for \a object's \a property. If \a property is not a list
+property, an invalid QDeclarativeListReference is created. If \a object is destroyed after
+the reference is constructed, it will automatically become invalid. That is, it is safe to hold
+QDeclarativeListReference instances even after \a object is deleted.
+
+Passing \a engine is required to access some QML created list properties. If in doubt, and an engine
+is available, pass it.
+*/
+QDeclarativeListReference::QDeclarativeListReference(QObject *object, const char *property, QDeclarativeEngine *engine)
+: d(0)
+{
+ if (!object || !property) return;
+
+ QDeclarativePropertyCache::Data local;
+ QDeclarativePropertyCache::Data *data =
+ QDeclarativePropertyCache::property(engine, object, QLatin1String(property), local);
+
+ if (!data || !(data->flags & QDeclarativePropertyCache::Data::IsQList)) return;
+
+ QDeclarativeEnginePrivate *p = engine?QDeclarativeEnginePrivate::get(engine):0;
+
+ int listType = p?p->listType(data->propType):QDeclarativeMetaType::listType(data->propType);
+ if (listType == -1) return;
+
+ d = new QDeclarativeListReferencePrivate;
+ d->object = object;
+ d->elementType = p?p->rawMetaObjectForType(listType):QDeclarativeMetaType::qmlType(listType)->baseMetaObject();
+ d->propertyType = data->propType;
+
+ void *args[] = { &d->property, 0 };
+ QMetaObject::metacall(object, QMetaObject::ReadProperty, data->coreIndex, args);
+}
+
+/*! \internal */
+QDeclarativeListReference::QDeclarativeListReference(const QDeclarativeListReference &o)
+: d(o.d)
+{
+ if (d) d->addref();
+}
+
+/*! \internal */
+QDeclarativeListReference &QDeclarativeListReference::operator=(const QDeclarativeListReference &o)
+{
+ if (o.d) o.d->addref();
+ if (d) d->release();
+ d = o.d;
+ return *this;
+}
+
+/*! \internal */
+QDeclarativeListReference::~QDeclarativeListReference()
+{
+ if (d) d->release();
+}
+
+/*!
+Returns true if the instance refers to a valid list property, otherwise false.
+*/
+bool QDeclarativeListReference::isValid() const
+{
+ return d && d->object;
+}
+
+/*!
+Returns the list property's object. Returns 0 if the reference is invalid.
+*/
+QObject *QDeclarativeListReference::object() const
+{
+ if (isValid()) return d->object;
+ else return 0;
+}
+
+/*!
+Returns the QMetaObject for the elements stored in the list property. Returns 0 if the reference
+is invalid.
+
+The QMetaObject can be used ahead of time to determine whether a given instance can be added
+to a list.
+*/
+const QMetaObject *QDeclarativeListReference::listElementType() const
+{
+ if (isValid()) return d->elementType;
+ else return 0;
+}
+
+/*!
+Returns true if the list property can be appended to, otherwise false. Returns false if the
+reference is invalid.
+
+\sa append()
+*/
+bool QDeclarativeListReference::canAppend() const
+{
+ return (isValid() && d->property.append);
+}
+
+/*!
+Returns true if the list property can queried by index, otherwise false. Returns false if the
+reference is invalid.
+
+\sa at()
+*/
+bool QDeclarativeListReference::canAt() const
+{
+ return (isValid() && d->property.at);
+}
+
+/*!
+Returns true if the list property can be cleared, otherwise false. Returns false if the
+reference is invalid.
+
+\sa clear()
+*/
+bool QDeclarativeListReference::canClear() const
+{
+ return (isValid() && d->property.clear);
+}
+
+/*!
+Returns true if the list property can be queried for its element count, otherwise false.
+Returns false if the reference is invalid.
+
+\sa count()
+*/
+bool QDeclarativeListReference::canCount() const
+{
+ return (isValid() && d->property.count);
+}
+
+/*!
+Appends \a object to the list. Returns true if the operation succeeded, otherwise false.
+
+\sa canAppend()
+*/
+bool QDeclarativeListReference::append(QObject *object) const
+{
+ if (!canAppend()) return false;
+
+ if (object && !QDeclarativePropertyPrivate::canConvert(object->metaObject(), d->elementType))
+ return false;
+
+ d->property.append(&d->property, object);
+
+ return true;
+}
+
+/*!
+Returns the list element at \a index, or 0 if the operation failed.
+
+\sa canAt()
+*/
+QObject *QDeclarativeListReference::at(int index) const
+{
+ if (!canAt()) return 0;
+
+ return d->property.at(&d->property, index);
+}
+
+/*!
+Clears the list. Returns true if the operation succeeded, otherwise false.
+
+\sa canClear()
+*/
+bool QDeclarativeListReference::clear() const
+{
+ if (!canClear()) return false;
+
+ d->property.clear(&d->property);
+
+ return true;
+}
+
+/*!
+Returns the number of objects in the list, or 0 if the operation failed.
+*/
+int QDeclarativeListReference::count() const
+{
+ if (!canCount()) return 0;
+
+ return d->property.count(&d->property);
+}
+
+/*!
+\class QDeclarativeListProperty
+\brief The QDeclarativeListProperty class allows applications to explose list-like
+properties to QML.
+
+QML has many list properties, where more than one object value can be assigned.
+The use of a list property from QML looks like this:
+
+\code
+FruitBasket {
+ fruit: [
+ Apple {},
+ Orange{},
+ Banana {}
+ ]
+}
+\endcode
+
+The QDeclarativeListProperty encapsulates a group of function pointers that represet the
+set of actions QML can perform on the list - adding items, retrieving items and
+clearing the list. In the future, additional operations may be supported. All
+list properties must implement the append operation, but the rest are optional.
+
+To provide a list property, a C++ class must implement the operation callbacks,
+and then return an appropriate QDeclarativeListProperty value from the property getter.
+List properties should have no setter. In the example above, the Q_PROPERTY()
+declarative will look like this:
+
+\code
+Q_PROPERTY(QDeclarativeListProperty<Fruit> fruit READ fruit);
+\endcode
+
+QML list properties are typesafe - in this case \c {Fruit} is a QObject type that
+\c {Apple}, \c {Orange} and \c {Banana} all derive from.
+*/
+
+/*!
+\fn QDeclarativeListProperty::QDeclarativeListProperty()
+\internal
+*/
+
+/*!
+\fn QDeclarativeListProperty::QDeclarativeListProperty(QObject *object, QList<T *> &list)
+
+Convenience constructor for making a QDeclarativeListProperty value from an existing
+QList \a list. The \a list reference must remain valid for as long as \a object
+exists. \a object must be provided.
+
+Generally this constructor should not be used in production code, as a
+writable QList violates QML's memory management rules. However, this constructor
+can very useful while prototyping.
+*/
+
+/*!
+\fn QDeclarativeListProperty::QDeclarativeListProperty(QObject *object, void *data, AppendFunction append,
+ CountFunction count = 0, AtFunction at = 0,
+ ClearFunction clear = 0)
+
+Construct a QDeclarativeListProperty from a set of operation functions. An opaque \a data handle
+may be passed which can be accessed from within the operation functions. The list property
+remains valid while \a object exists.
+
+The \a append operation is compulsory and must be provided, while the \a count, \a at and
+\a clear methods are optional.
+*/
+
+/*!
+\typedef QDeclarativeListProperty::AppendFunction
+
+Synonym for \c {void (*)(QDeclarativeListProperty<T> *property, T *value)}.
+
+Append the \a value to the list \a property.
+*/
+
+/*!
+\typedef QDeclarativeListProperty::CountFunction
+
+Synonym for \c {int (*)(QDeclarativeListProperty<T> *property)}.
+
+Return the number of elements in the list \a property.
+*/
+
+/*!
+\fn bool QDeclarativeListProperty::operator==(const QDeclarativeListProperty &other) const
+
+Returns true if this QDeclarativeListProperty is equal to \a other, otherwise false.
+*/
+
+/*!
+\typedef QDeclarativeListProperty::AtFunction
+
+Synonym for \c {T *(*)(QDeclarativeListProperty<T> *property, int index)}.
+
+Return the element at position \a index in the list \a property.
+*/
+
+/*!
+\typedef QDeclarativeListProperty::ClearFunction
+
+Synonym for \c {void (*)(QDeclarativeListProperty<T> *property)}.
+
+Clear the list \a property.
+*/
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativelist.h b/src/declarative/qml/qdeclarativelist.h
new file mode 100644
index 0000000000..eac49674d8
--- /dev/null
+++ b/src/declarative/qml/qdeclarativelist.h
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVELIST_H
+#define QDECLARATIVELIST_H
+
+#include <QtCore/qglobal.h>
+#include <QtCore/qlist.h>
+#include <QtCore/qvariant.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QObject;
+struct QMetaObject;
+template<typename T>
+struct QDeclarativeListProperty {
+ typedef void (*AppendFunction)(QDeclarativeListProperty<T> *, T*);
+ typedef int (*CountFunction)(QDeclarativeListProperty<T> *);
+ typedef T *(*AtFunction)(QDeclarativeListProperty<T> *, int);
+ typedef void (*ClearFunction)(QDeclarativeListProperty<T> *);
+
+ QDeclarativeListProperty()
+ : object(0), data(0), append(0), count(0), at(0), clear(0), dummy1(0), dummy2(0) {}
+ QDeclarativeListProperty(QObject *o, QList<T *> &list)
+ : object(o), data(&list), append(qlist_append), count(qlist_count), at(qlist_at),
+ clear(qlist_clear), dummy1(0), dummy2(0) {}
+ QDeclarativeListProperty(QObject *o, void *d, AppendFunction a, CountFunction c = 0, AtFunction t = 0,
+ ClearFunction r = 0)
+ : object(o), data(d), append(a), count(c), at(t), clear(r), dummy1(0), dummy2(0) {}
+
+ bool operator==(const QDeclarativeListProperty &o) const {
+ return object == o.object &&
+ data == o.data &&
+ append == o.append &&
+ count == o.count &&
+ at == o.at &&
+ clear == o.clear;
+ }
+
+ QObject *object;
+ void *data;
+
+ AppendFunction append;
+
+ CountFunction count;
+ AtFunction at;
+
+ ClearFunction clear;
+
+ void *dummy1;
+ void *dummy2;
+
+private:
+ static void qlist_append(QDeclarativeListProperty *p, T *v) {
+ ((QList<T *> *)p->data)->append(v);
+ }
+ static int qlist_count(QDeclarativeListProperty *p) {
+ return ((QList<T *> *)p->data)->count();
+ }
+ static T *qlist_at(QDeclarativeListProperty *p, int idx) {
+ return ((QList<T *> *)p->data)->at(idx);
+ }
+ static void qlist_clear(QDeclarativeListProperty *p) {
+ return ((QList<T *> *)p->data)->clear();
+ }
+};
+
+class QDeclarativeEngine;
+class QDeclarativeListReferencePrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeListReference
+{
+public:
+ QDeclarativeListReference();
+ QDeclarativeListReference(QObject *, const char *property, QDeclarativeEngine * = 0);
+ QDeclarativeListReference(const QDeclarativeListReference &);
+ QDeclarativeListReference &operator=(const QDeclarativeListReference &);
+ ~QDeclarativeListReference();
+
+ bool isValid() const;
+
+ QObject *object() const;
+ const QMetaObject *listElementType() const;
+
+ bool canAppend() const;
+ bool canAt() const;
+ bool canClear() const;
+ bool canCount() const;
+
+ bool append(QObject *) const;
+ QObject *at(int) const;
+ bool clear() const;
+ int count() const;
+
+private:
+ friend class QDeclarativeListReferencePrivate;
+ QDeclarativeListReferencePrivate* d;
+};
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QDeclarativeListReference);
+
+QT_END_HEADER
+
+#endif // QDECLARATIVELIST_H
diff --git a/src/declarative/qml/qdeclarativelist_p.h b/src/declarative/qml/qdeclarativelist_p.h
new file mode 100644
index 0000000000..45a805a838
--- /dev/null
+++ b/src/declarative/qml/qdeclarativelist_p.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVELIST_P_H
+#define QDECLARATIVELIST_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativelist.h"
+#include "qdeclarativeguard_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeListReferencePrivate
+{
+public:
+ QDeclarativeListReferencePrivate();
+
+ static QDeclarativeListReference init(const QDeclarativeListProperty<QObject> &, int, QDeclarativeEngine *);
+
+ QDeclarativeGuard<QObject> object;
+ const QMetaObject *elementType;
+ QDeclarativeListProperty<QObject> property;
+ int propertyType;
+
+ void addref();
+ void release();
+ int refCount;
+
+ static inline QDeclarativeListReferencePrivate *get(QDeclarativeListReference *ref) {
+ return ref->d;
+ }
+};
+
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVELIST_P_H
diff --git a/src/declarative/qml/qdeclarativelistscriptclass.cpp b/src/declarative/qml/qdeclarativelistscriptclass.cpp
new file mode 100644
index 0000000000..ea04ad96ce
--- /dev/null
+++ b/src/declarative/qml/qdeclarativelistscriptclass.cpp
@@ -0,0 +1,149 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativelistscriptclass_p.h"
+
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativeguard_p.h"
+#include "qdeclarativelist_p.h"
+
+QT_BEGIN_NAMESPACE
+
+struct ListData : public QScriptDeclarativeClass::Object {
+ QDeclarativeGuard<QObject> object;
+ QDeclarativeListProperty<QObject> property;
+ int propertyType;
+};
+
+QDeclarativeListScriptClass::QDeclarativeListScriptClass(QDeclarativeEngine *e)
+: QDeclarativeScriptClass(QDeclarativeEnginePrivate::getScriptEngine(e)), engine(e)
+{
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+ Q_UNUSED(scriptEngine);
+
+ m_lengthId = createPersistentIdentifier(QLatin1String("length"));
+}
+
+QDeclarativeListScriptClass::~QDeclarativeListScriptClass()
+{
+}
+
+QScriptValue QDeclarativeListScriptClass::newList(QObject *object, int propId, int propType)
+{
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+
+ if (!object || propId == -1)
+ return scriptEngine->nullValue();
+
+ ListData *data = new ListData;
+ data->object = object;
+ data->propertyType = propType;
+ void *args[] = { &data->property, 0 };
+ QMetaObject::metacall(object, QMetaObject::ReadProperty, propId, args);
+
+ return newObject(scriptEngine, this, data);
+}
+
+QScriptValue QDeclarativeListScriptClass::newList(const QDeclarativeListProperty<QObject> &prop, int propType)
+{
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+
+ ListData *data = new ListData;
+ data->object = prop.object;
+ data->property = prop;
+ data->propertyType = propType;
+
+ return newObject(scriptEngine, this, data);
+}
+
+QScriptClass::QueryFlags
+QDeclarativeListScriptClass::queryProperty(Object *object, const Identifier &name,
+ QScriptClass::QueryFlags flags)
+{
+ Q_UNUSED(object);
+ Q_UNUSED(flags);
+ if (name == m_lengthId.identifier)
+ return QScriptClass::HandlesReadAccess;
+
+ bool ok = false;
+ quint32 idx = toArrayIndex(name, &ok);
+
+ if (ok) {
+ lastIndex = idx;
+ return QScriptClass::HandlesReadAccess;
+ } else {
+ return 0;
+ }
+}
+
+QDeclarativeListScriptClass::ScriptValue QDeclarativeListScriptClass::property(Object *obj, const Identifier &name)
+{
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+ QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
+
+ ListData *data = (ListData *)obj;
+ if (!data->object)
+ return Value();
+
+ quint32 count = data->property.count?data->property.count(&data->property):0;
+
+ if (name == m_lengthId.identifier)
+ return Value(scriptEngine, count);
+ else if (lastIndex < count && data->property.at)
+ return Value(scriptEngine, enginePriv->objectClass->newQObject(data->property.at(&data->property, lastIndex)));
+ else
+ return Value();
+}
+
+QVariant QDeclarativeListScriptClass::toVariant(Object *obj, bool *ok)
+{
+ ListData *data = (ListData *)obj;
+
+ if (!data->object) {
+ if (ok) *ok = false;
+ return QVariant();
+ }
+
+ return QVariant::fromValue(QDeclarativeListReferencePrivate::init(data->property, data->propertyType, engine));
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/declarative/qml/qdeclarativelistscriptclass_p.h b/src/declarative/qml/qdeclarativelistscriptclass_p.h
new file mode 100644
index 0000000000..68c680d435
--- /dev/null
+++ b/src/declarative/qml/qdeclarativelistscriptclass_p.h
@@ -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 QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVELISTSCRIPTCLASS_P_H
+#define QDECLARATIVELISTSCRIPTCLASS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <private/qdeclarativescriptclass_p.h>
+#include "qdeclarativelist.h"
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeEngine;
+class QDeclarativeListScriptClass : public QDeclarativeScriptClass
+{
+public:
+ QDeclarativeListScriptClass(QDeclarativeEngine *);
+ ~QDeclarativeListScriptClass();
+
+ QScriptValue newList(QObject *, int, int);
+ QScriptValue newList(const QDeclarativeListProperty<QObject> &, int);
+
+protected:
+ virtual QScriptClass::QueryFlags queryProperty(Object *, const Identifier &,
+ QScriptClass::QueryFlags flags);
+ virtual ScriptValue property(Object *, const Identifier &);
+ virtual QVariant toVariant(Object *, bool *ok);
+
+private:
+ PersistentIdentifier m_lengthId;
+ QDeclarativeEngine *engine;
+
+ quint32 lastIndex;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVELISTSCRIPTCLASS_P_H
+
diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp
new file mode 100644
index 0000000000..50ab56bcd5
--- /dev/null
+++ b/src/declarative/qml/qdeclarativemetatype.cpp
@@ -0,0 +1,1145 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativemetatype_p.h"
+
+#include "qdeclarativeproxymetaobject_p.h"
+#include "qdeclarativecustomparser_p.h"
+#include "qdeclarativeguard_p.h"
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qstringlist.h>
+#include <QtCore/qmetaobject.h>
+#include <QtCore/qbitarray.h>
+#include <QtCore/qreadwritelock.h>
+#include <qmetatype.h>
+#include <qobjectdefs.h>
+#include <qdatetime.h>
+#include <qbytearray.h>
+#include <qreadwritelock.h>
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qvector.h>
+#include <qlocale.h>
+#include <QtCore/qcryptographichash.h>
+#include <QtScript/qscriptvalue.h>
+
+#include <ctype.h>
+
+#ifdef QT_BOOTSTRAPPED
+# ifndef QT_NO_GEOM_VARIANT
+# define QT_NO_GEOM_VARIANT
+# endif
+#else
+# include <qbitarray.h>
+# include <qurl.h>
+# include <qvariant.h>
+#endif
+
+#ifndef QT_NO_GEOM_VARIANT
+# include <qsize.h>
+# include <qpoint.h>
+# include <qrect.h>
+# include <qline.h>
+# include <qvector3d.h>
+#endif
+#define NS(x) QT_PREPEND_NAMESPACE(x)
+
+QT_BEGIN_NAMESPACE
+
+struct QDeclarativeMetaTypeData
+{
+ ~QDeclarativeMetaTypeData();
+ QList<QDeclarativeType *> types;
+ typedef QHash<int, QDeclarativeType *> Ids;
+ Ids idToType;
+ typedef QHash<QByteArray, QDeclarativeType *> Names;
+ Names nameToType;
+ typedef QHash<const QMetaObject *, QDeclarativeType *> MetaObjects;
+ MetaObjects metaObjectToType;
+ typedef QHash<int, QDeclarativeMetaType::StringConverter> StringConverters;
+ StringConverters stringConverters;
+
+ QBitArray objects;
+ QBitArray interfaces;
+ QBitArray lists;
+};
+Q_GLOBAL_STATIC(QDeclarativeMetaTypeData, metaTypeData)
+Q_GLOBAL_STATIC(QReadWriteLock, metaTypeDataLock)
+
+QDeclarativeMetaTypeData::~QDeclarativeMetaTypeData()
+{
+ for (int i = 0; i < types.count(); ++i)
+ delete types.at(i);
+}
+
+class QDeclarativeTypePrivate
+{
+public:
+ QDeclarativeTypePrivate();
+
+ void init() const;
+
+ bool m_isInterface : 1;
+ const char *m_iid;
+ QByteArray m_name;
+ int m_version_maj;
+ int m_version_min;
+ int m_typeId; int m_listId;
+ QObject *(*m_newFunc)();
+ const QMetaObject *m_baseMetaObject;
+ QDeclarativeAttachedPropertiesFunc m_attachedPropertiesFunc;
+ const QMetaObject *m_attachedPropertiesType;
+ int m_parserStatusCast;
+ int m_propertyValueSourceCast;
+ int m_propertyValueInterceptorCast;
+ QObject *(*m_extFunc)(QObject *);
+ const QMetaObject *m_extMetaObject;
+ int m_index;
+ QDeclarativeCustomParser *m_customParser;
+ mutable volatile bool m_isSetup:1;
+ mutable QList<QDeclarativeProxyMetaObject::ProxyData> m_metaObjects;
+};
+
+QDeclarativeTypePrivate::QDeclarativeTypePrivate()
+: m_isInterface(false), m_iid(0), m_typeId(0), m_listId(0),
+ m_newFunc(0), m_baseMetaObject(0), m_attachedPropertiesFunc(0), m_attachedPropertiesType(0),
+ m_parserStatusCast(-1), m_propertyValueSourceCast(-1), m_propertyValueInterceptorCast(-1),
+ m_extFunc(0), m_extMetaObject(0), m_index(-1), m_customParser(0), m_isSetup(false)
+{
+}
+
+
+QDeclarativeType::QDeclarativeType(int index, const QDeclarativePrivate::RegisterInterface &interface)
+: d(new QDeclarativeTypePrivate)
+{
+ d->m_isInterface = true;
+ d->m_iid = interface.iid;
+ d->m_typeId = interface.typeId;
+ d->m_listId = interface.listId;
+ d->m_newFunc = 0;
+ d->m_index = index;
+ d->m_isSetup = true;
+ d->m_version_maj = 0;
+ d->m_version_min = 0;
+}
+
+QDeclarativeType::QDeclarativeType(int index, const QDeclarativePrivate::RegisterType &type)
+: d(new QDeclarativeTypePrivate)
+{
+ QByteArray name = type.uri;
+ if (type.uri) name += '/';
+ name += type.elementName;
+
+ d->m_name = name;
+ d->m_version_maj = type.versionMajor;
+ d->m_version_min = type.versionMinor;
+ d->m_typeId = type.typeId;
+ d->m_listId = type.listId;
+ d->m_newFunc = type.create;
+ d->m_baseMetaObject = type.metaObject;
+ d->m_attachedPropertiesFunc = type.attachedPropertiesFunction;
+ d->m_attachedPropertiesType = type.attachedPropertiesMetaObject;
+ d->m_parserStatusCast = type.parserStatusCast;
+ d->m_propertyValueSourceCast = type.valueSourceCast;
+ d->m_propertyValueInterceptorCast = type.valueInterceptorCast;
+ d->m_extFunc = type.extensionObjectCreate;
+ d->m_index = index;
+ d->m_customParser = type.customParser;
+
+ if (type.extensionMetaObject)
+ d->m_extMetaObject = type.extensionMetaObject;
+}
+
+QDeclarativeType::~QDeclarativeType()
+{
+ delete d->m_customParser;
+ delete d;
+}
+
+int QDeclarativeType::majorVersion() const
+{
+ return d->m_version_maj;
+}
+
+int QDeclarativeType::minorVersion() const
+{
+ return d->m_version_min;
+}
+
+bool QDeclarativeType::availableInVersion(int vmajor, int vminor) const
+{
+ return vmajor > d->m_version_maj || (vmajor == d->m_version_maj && vminor >= d->m_version_min);
+}
+
+void QDeclarativeTypePrivate::init() const
+{
+ if (m_isSetup) return;
+
+ QWriteLocker lock(metaTypeDataLock());
+ if (m_isSetup)
+ return;
+
+ // Setup extended meta object
+ // XXX - very inefficient
+ const QMetaObject *mo = m_baseMetaObject;
+ if (m_extFunc) {
+ QMetaObject *mmo = new QMetaObject;
+ *mmo = *m_extMetaObject;
+ mmo->d.superdata = mo;
+ QDeclarativeProxyMetaObject::ProxyData data = { mmo, m_extFunc, 0, 0 };
+ m_metaObjects << data;
+ }
+
+ mo = mo->d.superdata;
+ while(mo) {
+ QDeclarativeType *t = metaTypeData()->metaObjectToType.value(mo);
+ if (t) {
+ if (t->d->m_extFunc) {
+ QMetaObject *mmo = new QMetaObject;
+ *mmo = *t->d->m_extMetaObject;
+ mmo->d.superdata = m_baseMetaObject;
+ if (!m_metaObjects.isEmpty())
+ m_metaObjects.last().metaObject->d.superdata = mmo;
+ QDeclarativeProxyMetaObject::ProxyData data = { mmo, t->d->m_extFunc, 0, 0 };
+ m_metaObjects << data;
+ }
+ }
+ mo = mo->d.superdata;
+ }
+
+ for (int ii = 0; ii < m_metaObjects.count(); ++ii) {
+ m_metaObjects[ii].propertyOffset =
+ m_metaObjects.at(ii).metaObject->propertyOffset();
+ m_metaObjects[ii].methodOffset =
+ m_metaObjects.at(ii).metaObject->methodOffset();
+ }
+
+ m_isSetup = true;
+ lock.unlock();
+}
+
+QByteArray QDeclarativeType::typeName() const
+{
+ if (d->m_baseMetaObject)
+ return d->m_baseMetaObject->className();
+ else
+ return QByteArray();
+}
+
+QByteArray QDeclarativeType::qmlTypeName() const
+{
+ return d->m_name;
+}
+
+QObject *QDeclarativeType::create() const
+{
+ d->init();
+
+ QObject *rv = d->m_newFunc();
+ if (rv && !d->m_metaObjects.isEmpty())
+ (void *)new QDeclarativeProxyMetaObject(rv, &d->m_metaObjects);
+
+ return rv;
+}
+
+QDeclarativeCustomParser *QDeclarativeType::customParser() const
+{
+ return d->m_customParser;
+}
+
+bool QDeclarativeType::isCreatable() const
+{
+ return d->m_newFunc != 0;
+}
+
+bool QDeclarativeType::isInterface() const
+{
+ return d->m_isInterface;
+}
+
+int QDeclarativeType::typeId() const
+{
+ return d->m_typeId;
+}
+
+int QDeclarativeType::qListTypeId() const
+{
+ return d->m_listId;
+}
+
+const QMetaObject *QDeclarativeType::metaObject() const
+{
+ d->init();
+
+ if (d->m_metaObjects.isEmpty())
+ return d->m_baseMetaObject;
+ else
+ return d->m_metaObjects.first().metaObject;
+
+}
+
+const QMetaObject *QDeclarativeType::baseMetaObject() const
+{
+ return d->m_baseMetaObject;
+}
+
+QDeclarativeAttachedPropertiesFunc QDeclarativeType::attachedPropertiesFunction() const
+{
+ return d->m_attachedPropertiesFunc;
+}
+
+const QMetaObject *QDeclarativeType::attachedPropertiesType() const
+{
+ return d->m_attachedPropertiesType;
+}
+
+int QDeclarativeType::parserStatusCast() const
+{
+ return d->m_parserStatusCast;
+}
+
+int QDeclarativeType::propertyValueSourceCast() const
+{
+ return d->m_propertyValueSourceCast;
+}
+
+int QDeclarativeType::propertyValueInterceptorCast() const
+{
+ return d->m_propertyValueInterceptorCast;
+}
+
+const char *QDeclarativeType::interfaceIId() const
+{
+ return d->m_iid;
+}
+
+int QDeclarativeType::index() const
+{
+ return d->m_index;
+}
+
+int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterInterface &interface)
+{
+ if (interface.version > 0) {
+ qWarning("Cannot mix incompatible QML versions.");
+ return -1;
+ }
+
+ QWriteLocker lock(metaTypeDataLock());
+ QDeclarativeMetaTypeData *data = metaTypeData();
+
+ int index = data->types.count();
+
+ QDeclarativeType *type = new QDeclarativeType(index, interface);
+
+ data->types.append(type);
+ data->idToType.insert(type->typeId(), type);
+ data->idToType.insert(type->qListTypeId(), type);
+ // XXX No insertMulti, so no multi-version interfaces?
+ if (!type->qmlTypeName().isEmpty())
+ data->nameToType.insert(type->qmlTypeName(), type);
+
+ if (data->interfaces.size() <= interface.typeId)
+ data->interfaces.resize(interface.typeId + 16);
+ if (data->lists.size() <= interface.listId)
+ data->lists.resize(interface.listId + 16);
+ data->interfaces.setBit(interface.typeId, true);
+ data->lists.setBit(interface.listId, true);
+
+ return index;
+}
+
+int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterType &type)
+{
+ if (type.elementName) {
+ for (int ii = 0; type.elementName[ii]; ++ii) {
+ if (!isalnum(type.elementName[ii])) {
+ qWarning("QDeclarativeMetaType: Invalid QML element name %s", type.elementName);
+ return -1;
+ }
+ }
+ }
+
+ QWriteLocker lock(metaTypeDataLock());
+ QDeclarativeMetaTypeData *data = metaTypeData();
+ int index = data->types.count();
+
+ QDeclarativeType *dtype = new QDeclarativeType(index, type);
+
+ data->types.append(dtype);
+ data->idToType.insert(dtype->typeId(), dtype);
+ if (dtype->qListTypeId()) data->idToType.insert(dtype->qListTypeId(), dtype);
+
+ if (!dtype->qmlTypeName().isEmpty())
+ data->nameToType.insertMulti(dtype->qmlTypeName(), dtype);
+
+ data->metaObjectToType.insert(dtype->baseMetaObject(), dtype);
+
+ if (data->objects.size() <= type.typeId)
+ data->objects.resize(type.typeId + 16);
+ if (data->lists.size() <= type.listId)
+ data->lists.resize(type.listId + 16);
+ data->objects.setBit(type.typeId, true);
+ if (type.listId) data->lists.setBit(type.listId, true);
+
+ return index;
+}
+
+QObject *QDeclarativeMetaType::toQObject(const QVariant &v, bool *ok)
+{
+ if (!isQObject(v.userType())) {
+ if (ok) *ok = false;
+ return 0;
+ }
+
+ if (ok) *ok = true;
+
+ return *(QObject **)v.constData();
+}
+
+bool QDeclarativeMetaType::isQObject(int userType)
+{
+ if (userType == QMetaType::QObjectStar)
+ return true;
+
+ QReadLocker lock(metaTypeDataLock());
+ QDeclarativeMetaTypeData *data = metaTypeData();
+ return userType >= 0 && userType < data->objects.size() && data->objects.testBit(userType);
+}
+
+/*
+ Returns the item type for a list of type \a id.
+ */
+int QDeclarativeMetaType::listType(int id)
+{
+ QReadLocker lock(metaTypeDataLock());
+ QDeclarativeMetaTypeData *data = metaTypeData();
+ QDeclarativeType *type = data->idToType.value(id);
+ if (type && type->qListTypeId() == id)
+ return type->typeId();
+ else
+ return 0;
+}
+
+int QDeclarativeMetaType::attachedPropertiesFuncId(const QMetaObject *mo)
+{
+ QReadLocker lock(metaTypeDataLock());
+ QDeclarativeMetaTypeData *data = metaTypeData();
+
+ QDeclarativeType *type = data->metaObjectToType.value(mo);
+ if (type && type->attachedPropertiesFunction())
+ return type->index();
+ else
+ return -1;
+}
+
+QDeclarativeAttachedPropertiesFunc QDeclarativeMetaType::attachedPropertiesFuncById(int id)
+{
+ if (id < 0)
+ return 0;
+ QReadLocker lock(metaTypeDataLock());
+ QDeclarativeMetaTypeData *data = metaTypeData();
+ return data->types.at(id)->attachedPropertiesFunction();
+}
+
+QMetaProperty QDeclarativeMetaType::defaultProperty(const QMetaObject *metaObject)
+{
+ int idx = metaObject->indexOfClassInfo("DefaultProperty");
+ if (-1 == idx)
+ return QMetaProperty();
+
+ QMetaClassInfo info = metaObject->classInfo(idx);
+ if (!info.value())
+ return QMetaProperty();
+
+ idx = metaObject->indexOfProperty(info.value());
+ if (-1 == idx)
+ return QMetaProperty();
+
+ return metaObject->property(idx);
+}
+
+QMetaProperty QDeclarativeMetaType::defaultProperty(QObject *obj)
+{
+ if (!obj)
+ return QMetaProperty();
+
+ const QMetaObject *metaObject = obj->metaObject();
+ return defaultProperty(metaObject);
+}
+
+QMetaMethod QDeclarativeMetaType::defaultMethod(const QMetaObject *metaObject)
+{
+ int idx = metaObject->indexOfClassInfo("DefaultMethod");
+ if (-1 == idx)
+ return QMetaMethod();
+
+ QMetaClassInfo info = metaObject->classInfo(idx);
+ if (!info.value())
+ return QMetaMethod();
+
+ idx = metaObject->indexOfMethod(info.value());
+ if (-1 == idx)
+ return QMetaMethod();
+
+ return metaObject->method(idx);
+}
+
+QMetaMethod QDeclarativeMetaType::defaultMethod(QObject *obj)
+{
+ if (!obj)
+ return QMetaMethod();
+
+ const QMetaObject *metaObject = obj->metaObject();
+ return defaultMethod(metaObject);
+}
+
+QDeclarativeMetaType::TypeCategory QDeclarativeMetaType::typeCategory(int userType)
+{
+ if (userType < 0)
+ return Unknown;
+ if (userType == QMetaType::QObjectStar)
+ return Object;
+
+ QReadLocker lock(metaTypeDataLock());
+ QDeclarativeMetaTypeData *data = metaTypeData();
+ if (userType < data->objects.size() && data->objects.testBit(userType))
+ return Object;
+ else if (userType < data->lists.size() && data->lists.testBit(userType))
+ return List;
+ else
+ return Unknown;
+}
+
+bool QDeclarativeMetaType::isInterface(int userType)
+{
+ QReadLocker lock(metaTypeDataLock());
+ QDeclarativeMetaTypeData *data = metaTypeData();
+ return userType >= 0 && userType < data->interfaces.size() && data->interfaces.testBit(userType);
+}
+
+const char *QDeclarativeMetaType::interfaceIId(int userType)
+{
+ QReadLocker lock(metaTypeDataLock());
+ QDeclarativeMetaTypeData *data = metaTypeData();
+ QDeclarativeType *type = data->idToType.value(userType);
+ lock.unlock();
+ if (type && type->isInterface() && type->typeId() == userType)
+ return type->interfaceIId();
+ else
+ return 0;
+}
+
+bool QDeclarativeMetaType::isList(int userType)
+{
+ QReadLocker lock(metaTypeDataLock());
+ QDeclarativeMetaTypeData *data = metaTypeData();
+ return userType >= 0 && userType < data->lists.size() && data->lists.testBit(userType);
+}
+
+/*!
+ A custom string convertor allows you to specify a function pointer that
+ returns a variant of \a type. For example, if you have written your own icon
+ class that you want to support as an object property assignable in QML:
+
+ \code
+ int type = qRegisterMetaType<SuperIcon>("SuperIcon");
+ QML::addCustomStringConvertor(type, &SuperIcon::pixmapFromString);
+ \endcode
+
+ The function pointer must be of the form:
+ \code
+ QVariant (*StringConverter)(const QString &);
+ \endcode
+ */
+void QDeclarativeMetaType::registerCustomStringConverter(int type, StringConverter converter)
+{
+ QWriteLocker lock(metaTypeDataLock());
+
+ QDeclarativeMetaTypeData *data = metaTypeData();
+ if (data->stringConverters.contains(type))
+ return;
+ data->stringConverters.insert(type, converter);
+}
+
+/*!
+ Return the custom string converter for \a type, previously installed through
+ registerCustomStringConverter()
+ */
+QDeclarativeMetaType::StringConverter QDeclarativeMetaType::customStringConverter(int type)
+{
+ QReadLocker lock(metaTypeDataLock());
+
+ QDeclarativeMetaTypeData *data = metaTypeData();
+ return data->stringConverters.value(type);
+}
+
+/*!
+ Returns the type (if any) of URI-qualified named \a name in version specified
+ by \a version_major and \a version_minor.
+*/
+QDeclarativeType *QDeclarativeMetaType::qmlType(const QByteArray &name, int version_major, int version_minor)
+{
+ QReadLocker lock(metaTypeDataLock());
+ QDeclarativeMetaTypeData *data = metaTypeData();
+
+ QList<QDeclarativeType*> types = data->nameToType.values(name);
+ foreach (QDeclarativeType *t, types) {
+ // XXX version_major<0 just a kludge for QDeclarativePropertyPrivate::initProperty
+ if (version_major<0 || t->availableInVersion(version_major,version_minor))
+ return t;
+ }
+ return 0;
+}
+
+/*!
+ Returns the type (if any) that corresponds to the \a metaObject. Returns null if no
+ type is registered.
+*/
+QDeclarativeType *QDeclarativeMetaType::qmlType(const QMetaObject *metaObject)
+{
+ QReadLocker lock(metaTypeDataLock());
+ QDeclarativeMetaTypeData *data = metaTypeData();
+
+ return data->metaObjectToType.value(metaObject);
+}
+
+/*!
+ Returns the type (if any) that corresponds to the QVariant::Type \a userType.
+ Returns null if no type is registered.
+*/
+QDeclarativeType *QDeclarativeMetaType::qmlType(int userType)
+{
+ QReadLocker lock(metaTypeDataLock());
+ QDeclarativeMetaTypeData *data = metaTypeData();
+
+ QDeclarativeType *type = data->idToType.value(userType);
+ if (type && type->typeId() == userType)
+ return type;
+ else
+ return 0;
+}
+
+/*!
+ Returns the list of registered QML type names.
+*/
+QList<QByteArray> QDeclarativeMetaType::qmlTypeNames()
+{
+ QReadLocker lock(metaTypeDataLock());
+ QDeclarativeMetaTypeData *data = metaTypeData();
+
+ return data->nameToType.keys();
+}
+
+/*!
+ Returns the list of registered QML types.
+*/
+QList<QDeclarativeType*> QDeclarativeMetaType::qmlTypes()
+{
+ QReadLocker lock(metaTypeDataLock());
+ QDeclarativeMetaTypeData *data = metaTypeData();
+
+ return data->nameToType.values();
+}
+
+QT_END_NAMESPACE
+
+#include <QtGui/qfont.h>
+#include <QtGui/qpixmap.h>
+#include <QtGui/qbrush.h>
+#include <QtGui/qcolor.h>
+#include <QtGui/qpalette.h>
+#include <QtGui/qicon.h>
+#include <QtGui/qimage.h>
+#include <QtGui/qpolygon.h>
+#include <QtGui/qregion.h>
+#include <QtGui/qbitmap.h>
+#include <QtGui/qcursor.h>
+#include <QtGui/qsizepolicy.h>
+#include <QtGui/qkeysequence.h>
+#include <QtGui/qpen.h>
+
+//#include <QtGui/qtextlength.h>
+#include <QtGui/qtextformat.h>
+#include <QtGui/qmatrix.h>
+#include <QtGui/qtransform.h>
+#include <QtGui/qmatrix4x4.h>
+#include <QtGui/qvector2d.h>
+#include <QtGui/qvector3d.h>
+#include <QtGui/qvector4d.h>
+#include <QtGui/qquaternion.h>
+
+Q_DECLARE_METATYPE(QScriptValue);
+
+QT_BEGIN_NAMESPACE
+/*!
+ Copies \a copy into \a data, assuming they both are of type \a type. If
+ \a copy is zero, a default type is copied. Returns true if the copy was
+ successful and false if not.
+
+ \note This should move into QMetaType once complete
+
+*/
+bool QDeclarativeMetaType::copy(int type, void *data, const void *copy)
+{
+ if (copy) {
+ switch(type) {
+ case QMetaType::VoidStar:
+ case QMetaType::QObjectStar:
+ case QMetaType::QWidgetStar:
+ *static_cast<void **>(data) = *static_cast<void* const *>(copy);
+ return true;
+ case QMetaType::Long:
+ *static_cast<long *>(data) = *static_cast<const long*>(copy);
+ return true;
+ case QMetaType::Int:
+ *static_cast<int *>(data) = *static_cast<const int*>(copy);
+ return true;
+ case QMetaType::Short:
+ *static_cast<short *>(data) = *static_cast<const short*>(copy);
+ return true;
+ case QMetaType::Char:
+ *static_cast<char *>(data) = *static_cast<const char*>(copy);
+ return true;
+ case QMetaType::ULong:
+ *static_cast<ulong *>(data) = *static_cast<const ulong*>(copy);
+ return true;
+ case QMetaType::UInt:
+ *static_cast<uint *>(data) = *static_cast<const uint*>(copy);
+ return true;
+ case QMetaType::LongLong:
+ *static_cast<qlonglong *>(data) = *static_cast<const qlonglong*>(copy);
+ return true;
+ case QMetaType::ULongLong:
+ *static_cast<qulonglong *>(data) = *static_cast<const qulonglong*>(copy);
+ return true;
+ case QMetaType::UShort:
+ *static_cast<ushort *>(data) = *static_cast<const ushort*>(copy);
+ return true;
+ case QMetaType::UChar:
+ *static_cast<uchar *>(data) = *static_cast<const uchar*>(copy);
+ return true;
+ case QMetaType::Bool:
+ *static_cast<bool *>(data) = *static_cast<const bool*>(copy);
+ return true;
+ case QMetaType::Float:
+ *static_cast<float *>(data) = *static_cast<const float*>(copy);
+ return true;
+ case QMetaType::Double:
+ *static_cast<double *>(data) = *static_cast<const double*>(copy);
+ return true;
+ case QMetaType::QChar:
+ *static_cast<NS(QChar) *>(data) = *static_cast<const NS(QChar)*>(copy);
+ return true;
+ case QMetaType::QVariantMap:
+ *static_cast<NS(QVariantMap) *>(data) = *static_cast<const NS(QVariantMap)*>(copy);
+ return true;
+ case QMetaType::QVariantHash:
+ *static_cast<NS(QVariantHash) *>(data) = *static_cast<const NS(QVariantHash)*>(copy);
+ return true;
+ case QMetaType::QVariantList:
+ *static_cast<NS(QVariantList) *>(data) = *static_cast<const NS(QVariantList)*>(copy);
+ return true;
+ case QMetaType::QByteArray:
+ *static_cast<NS(QByteArray) *>(data) = *static_cast<const NS(QByteArray)*>(copy);
+ return true;
+ case QMetaType::QString:
+ *static_cast<NS(QString) *>(data) = *static_cast<const NS(QString)*>(copy);
+ return true;
+ case QMetaType::QStringList:
+ *static_cast<NS(QStringList) *>(data) = *static_cast<const NS(QStringList)*>(copy);
+ return true;
+ case QMetaType::QBitArray:
+ *static_cast<NS(QBitArray) *>(data) = *static_cast<const NS(QBitArray)*>(copy);
+ return true;
+ case QMetaType::QDate:
+ *static_cast<NS(QDate) *>(data) = *static_cast<const NS(QDate)*>(copy);
+ return true;
+ case QMetaType::QTime:
+ *static_cast<NS(QTime) *>(data) = *static_cast<const NS(QTime)*>(copy);
+ return true;
+ case QMetaType::QDateTime:
+ *static_cast<NS(QDateTime) *>(data) = *static_cast<const NS(QDateTime)*>(copy);
+ return true;
+ case QMetaType::QUrl:
+ *static_cast<NS(QUrl) *>(data) = *static_cast<const NS(QUrl)*>(copy);
+ return true;
+ case QMetaType::QLocale:
+ *static_cast<NS(QLocale) *>(data) = *static_cast<const NS(QLocale)*>(copy);
+ return true;
+ case QMetaType::QRect:
+ *static_cast<NS(QRect) *>(data) = *static_cast<const NS(QRect)*>(copy);
+ return true;
+ case QMetaType::QRectF:
+ *static_cast<NS(QRectF) *>(data) = *static_cast<const NS(QRectF)*>(copy);
+ return true;
+ case QMetaType::QSize:
+ *static_cast<NS(QSize) *>(data) = *static_cast<const NS(QSize)*>(copy);
+ return true;
+ case QMetaType::QSizeF:
+ *static_cast<NS(QSizeF) *>(data) = *static_cast<const NS(QSizeF)*>(copy);
+ return true;
+ case QMetaType::QLine:
+ *static_cast<NS(QLine) *>(data) = *static_cast<const NS(QLine)*>(copy);
+ return true;
+ case QMetaType::QLineF:
+ *static_cast<NS(QLineF) *>(data) = *static_cast<const NS(QLineF)*>(copy);
+ return true;
+ case QMetaType::QPoint:
+ *static_cast<NS(QPoint) *>(data) = *static_cast<const NS(QPoint)*>(copy);
+ return true;
+ case QMetaType::QPointF:
+ *static_cast<NS(QPointF) *>(data) = *static_cast<const NS(QPointF)*>(copy);
+ return true;
+ case QMetaType::QVector3D:
+ *static_cast<NS(QVector3D) *>(data) = *static_cast<const NS(QVector3D)*>(copy);
+ return true;
+#ifndef QT_NO_REGEXP
+ case QMetaType::QRegExp:
+ *static_cast<NS(QRegExp) *>(data) = *static_cast<const NS(QRegExp)*>(copy);
+ return true;
+#endif
+ case QMetaType::Void:
+ return true;
+
+
+#ifdef QT3_SUPPORT
+ case QMetaType::QColorGroup:
+ *static_cast<NS(QColorGroup) *>(data) = *static_cast<const NS(QColorGroup)*>(copy);
+ return true;
+#endif
+
+ case QMetaType::QFont:
+ *static_cast<NS(QFont) *>(data) = *static_cast<const NS(QFont)*>(copy);
+ return true;
+ case QMetaType::QPixmap:
+ *static_cast<NS(QPixmap) *>(data) = *static_cast<const NS(QPixmap)*>(copy);
+ return true;
+ case QMetaType::QBrush:
+ *static_cast<NS(QBrush) *>(data) = *static_cast<const NS(QBrush)*>(copy);
+ return true;
+ case QMetaType::QColor:
+ *static_cast<NS(QColor) *>(data) = *static_cast<const NS(QColor)*>(copy);
+ return true;
+ case QMetaType::QPalette:
+ *static_cast<NS(QPalette) *>(data) = *static_cast<const NS(QPalette)*>(copy);
+ return true;
+ case QMetaType::QIcon:
+ *static_cast<NS(QIcon) *>(data) = *static_cast<const NS(QIcon)*>(copy);
+ return true;
+ case QMetaType::QImage:
+ *static_cast<NS(QImage) *>(data) = *static_cast<const NS(QImage)*>(copy);
+ return true;
+ case QMetaType::QPolygon:
+ *static_cast<NS(QPolygon) *>(data) = *static_cast<const NS(QPolygon)*>(copy);
+ return true;
+ case QMetaType::QRegion:
+ *static_cast<NS(QRegion) *>(data) = *static_cast<const NS(QRegion)*>(copy);
+ return true;
+ case QMetaType::QBitmap:
+ *static_cast<NS(QBitmap) *>(data) = *static_cast<const NS(QBitmap)*>(copy);
+ return true;
+#ifndef QT_NO_CURSOR
+ case QMetaType::QCursor:
+ *static_cast<NS(QCursor) *>(data) = *static_cast<const NS(QCursor)*>(copy);
+ return true;
+#endif
+ case QMetaType::QSizePolicy:
+ *static_cast<NS(QSizePolicy) *>(data) = *static_cast<const NS(QSizePolicy)*>(copy);
+ return true;
+ case QMetaType::QKeySequence:
+ *static_cast<NS(QKeySequence) *>(data) = *static_cast<const NS(QKeySequence)*>(copy);
+ return true;
+ case QMetaType::QPen:
+ *static_cast<NS(QPen) *>(data) = *static_cast<const NS(QPen)*>(copy);
+ return true;
+ case QMetaType::QTextLength:
+ *static_cast<NS(QTextLength) *>(data) = *static_cast<const NS(QTextLength)*>(copy);
+ return true;
+ case QMetaType::QTextFormat:
+ *static_cast<NS(QTextFormat) *>(data) = *static_cast<const NS(QTextFormat)*>(copy);
+ return true;
+ case QMetaType::QMatrix:
+ *static_cast<NS(QMatrix) *>(data) = *static_cast<const NS(QMatrix)*>(copy);
+ return true;
+ case QMetaType::QTransform:
+ *static_cast<NS(QTransform) *>(data) = *static_cast<const NS(QTransform)*>(copy);
+ return true;
+ case QMetaType::QMatrix4x4:
+ *static_cast<NS(QMatrix4x4) *>(data) = *static_cast<const NS(QMatrix4x4)*>(copy);
+ return true;
+ case QMetaType::QVector2D:
+ *static_cast<NS(QVector2D) *>(data) = *static_cast<const NS(QVector2D)*>(copy);
+ return true;
+ case QMetaType::QVector4D:
+ *static_cast<NS(QVector4D) *>(data) = *static_cast<const NS(QVector4D)*>(copy);
+ return true;
+ case QMetaType::QQuaternion:
+ *static_cast<NS(QQuaternion) *>(data) = *static_cast<const NS(QQuaternion)*>(copy);
+ return true;
+
+ default:
+ if (type == qMetaTypeId<QVariant>()) {
+ *static_cast<NS(QVariant) *>(data) = *static_cast<const NS(QVariant)*>(copy);
+ return true;
+ } else if (type == qMetaTypeId<QScriptValue>()) {
+ *static_cast<NS(QScriptValue) *>(data) = *static_cast<const NS(QScriptValue)*>(copy);
+ return true;
+ } else if (typeCategory(type) != Unknown) {
+ *static_cast<void **>(data) = *static_cast<void* const *>(copy);
+ return true;
+ }
+ break;
+ }
+ } else {
+ switch(type) {
+ case QMetaType::VoidStar:
+ case QMetaType::QObjectStar:
+ case QMetaType::QWidgetStar:
+ *static_cast<void **>(data) = 0;
+ return true;
+ case QMetaType::Long:
+ *static_cast<long *>(data) = long(0);
+ return true;
+ case QMetaType::Int:
+ *static_cast<int *>(data) = int(0);
+ return true;
+ case QMetaType::Short:
+ *static_cast<short *>(data) = short(0);
+ return true;
+ case QMetaType::Char:
+ *static_cast<char *>(data) = char(0);
+ return true;
+ case QMetaType::ULong:
+ *static_cast<ulong *>(data) = ulong(0);
+ return true;
+ case QMetaType::UInt:
+ *static_cast<uint *>(data) = uint(0);
+ return true;
+ case QMetaType::LongLong:
+ *static_cast<qlonglong *>(data) = qlonglong(0);
+ return true;
+ case QMetaType::ULongLong:
+ *static_cast<qulonglong *>(data) = qulonglong(0);
+ return true;
+ case QMetaType::UShort:
+ *static_cast<ushort *>(data) = ushort(0);
+ return true;
+ case QMetaType::UChar:
+ *static_cast<uchar *>(data) = uchar(0);
+ return true;
+ case QMetaType::Bool:
+ *static_cast<bool *>(data) = bool(false);
+ return true;
+ case QMetaType::Float:
+ *static_cast<float *>(data) = float(0);
+ return true;
+ case QMetaType::Double:
+ *static_cast<double *>(data) = double();
+ return true;
+ case QMetaType::QChar:
+ *static_cast<NS(QChar) *>(data) = NS(QChar)();
+ return true;
+ case QMetaType::QVariantMap:
+ *static_cast<NS(QVariantMap) *>(data) = NS(QVariantMap)();
+ return true;
+ case QMetaType::QVariantHash:
+ *static_cast<NS(QVariantHash) *>(data) = NS(QVariantHash)();
+ return true;
+ case QMetaType::QVariantList:
+ *static_cast<NS(QVariantList) *>(data) = NS(QVariantList)();
+ return true;
+ case QMetaType::QByteArray:
+ *static_cast<NS(QByteArray) *>(data) = NS(QByteArray)();
+ return true;
+ case QMetaType::QString:
+ *static_cast<NS(QString) *>(data) = NS(QString)();
+ return true;
+ case QMetaType::QStringList:
+ *static_cast<NS(QStringList) *>(data) = NS(QStringList)();
+ return true;
+ case QMetaType::QBitArray:
+ *static_cast<NS(QBitArray) *>(data) = NS(QBitArray)();
+ return true;
+ case QMetaType::QDate:
+ *static_cast<NS(QDate) *>(data) = NS(QDate)();
+ return true;
+ case QMetaType::QTime:
+ *static_cast<NS(QTime) *>(data) = NS(QTime)();
+ return true;
+ case QMetaType::QDateTime:
+ *static_cast<NS(QDateTime) *>(data) = NS(QDateTime)();
+ return true;
+ case QMetaType::QUrl:
+ *static_cast<NS(QUrl) *>(data) = NS(QUrl)();
+ return true;
+ case QMetaType::QLocale:
+ *static_cast<NS(QLocale) *>(data) = NS(QLocale)();
+ return true;
+ case QMetaType::QRect:
+ *static_cast<NS(QRect) *>(data) = NS(QRect)();
+ return true;
+ case QMetaType::QRectF:
+ *static_cast<NS(QRectF) *>(data) = NS(QRectF)();
+ return true;
+ case QMetaType::QSize:
+ *static_cast<NS(QSize) *>(data) = NS(QSize)();
+ return true;
+ case QMetaType::QSizeF:
+ *static_cast<NS(QSizeF) *>(data) = NS(QSizeF)();
+ return true;
+ case QMetaType::QLine:
+ *static_cast<NS(QLine) *>(data) = NS(QLine)();
+ return true;
+ case QMetaType::QLineF:
+ *static_cast<NS(QLineF) *>(data) = NS(QLineF)();
+ return true;
+ case QMetaType::QPoint:
+ *static_cast<NS(QPoint) *>(data) = NS(QPoint)();
+ return true;
+ case QMetaType::QPointF:
+ *static_cast<NS(QPointF) *>(data) = NS(QPointF)();
+ return true;
+ case QMetaType::QVector3D:
+ *static_cast<NS(QVector3D) *>(data) = NS(QVector3D)();
+ return true;
+#ifndef QT_NO_REGEXP
+ case QMetaType::QRegExp:
+ *static_cast<NS(QRegExp) *>(data) = NS(QRegExp)();
+ return true;
+#endif
+ case QMetaType::Void:
+ return true;
+
+#ifdef QT3_SUPPORT
+ case QMetaType::QColorGroup:
+ *static_cast<NS(QColorGroup) *>(data) = NS(QColorGroup)();
+ return true;
+#endif
+
+ case QMetaType::QFont:
+ *static_cast<NS(QFont) *>(data) = NS(QFont)();
+ return true;
+ case QMetaType::QPixmap:
+ *static_cast<NS(QPixmap) *>(data) = NS(QPixmap)();
+ return true;
+ case QMetaType::QBrush:
+ *static_cast<NS(QBrush) *>(data) = NS(QBrush)();
+ return true;
+ case QMetaType::QColor:
+ *static_cast<NS(QColor) *>(data) = NS(QColor)();
+ return true;
+ case QMetaType::QPalette:
+ *static_cast<NS(QPalette) *>(data) = NS(QPalette)();
+ return true;
+ case QMetaType::QIcon:
+ *static_cast<NS(QIcon) *>(data) = NS(QIcon)();
+ return true;
+ case QMetaType::QImage:
+ *static_cast<NS(QImage) *>(data) = NS(QImage)();
+ return true;
+ case QMetaType::QPolygon:
+ *static_cast<NS(QPolygon) *>(data) = NS(QPolygon)();
+ return true;
+ case QMetaType::QRegion:
+ *static_cast<NS(QRegion) *>(data) = NS(QRegion)();
+ return true;
+ case QMetaType::QBitmap:
+ *static_cast<NS(QBitmap) *>(data) = NS(QBitmap)();
+ return true;
+#ifndef QT_NO_CURSOR
+ case QMetaType::QCursor:
+ *static_cast<NS(QCursor) *>(data) = NS(QCursor)();
+ return true;
+#endif
+ case QMetaType::QSizePolicy:
+ *static_cast<NS(QSizePolicy) *>(data) = NS(QSizePolicy)();
+ return true;
+ case QMetaType::QKeySequence:
+ *static_cast<NS(QKeySequence) *>(data) = NS(QKeySequence)();
+ return true;
+ case QMetaType::QPen:
+ *static_cast<NS(QPen) *>(data) = NS(QPen)();
+ return true;
+ case QMetaType::QTextLength:
+ *static_cast<NS(QTextLength) *>(data) = NS(QTextLength)();
+ return true;
+ case QMetaType::QTextFormat:
+ *static_cast<NS(QTextFormat) *>(data) = NS(QTextFormat)();
+ return true;
+ case QMetaType::QMatrix:
+ *static_cast<NS(QMatrix) *>(data) = NS(QMatrix)();
+ return true;
+ case QMetaType::QTransform:
+ *static_cast<NS(QTransform) *>(data) = NS(QTransform)();
+ return true;
+ case QMetaType::QMatrix4x4:
+ *static_cast<NS(QMatrix4x4) *>(data) = NS(QMatrix4x4)();
+ return true;
+ case QMetaType::QVector2D:
+ *static_cast<NS(QVector2D) *>(data) = NS(QVector2D)();
+ return true;
+ case QMetaType::QVector4D:
+ *static_cast<NS(QVector4D) *>(data) = NS(QVector4D)();
+ return true;
+ case QMetaType::QQuaternion:
+ *static_cast<NS(QQuaternion) *>(data) = NS(QQuaternion)();
+ return true;
+ default:
+ if (type == qMetaTypeId<QVariant>()) {
+ *static_cast<NS(QVariant) *>(data) = NS(QVariant)();
+ return true;
+ } else if (type == qMetaTypeId<QScriptValue>()) {
+ *static_cast<NS(QScriptValue) *>(data) = NS(QScriptValue)();
+ return true;
+ } else if (typeCategory(type) != Unknown) {
+ *static_cast<void **>(data) = 0;
+ return true;
+ }
+ break;
+ }
+ }
+
+ return false;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/declarative/qml/qdeclarativemetatype_p.h
new file mode 100644
index 0000000000..cf8946d4e1
--- /dev/null
+++ b/src/declarative/qml/qdeclarativemetatype_p.h
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEMETATYPE_P_H
+#define QDECLARATIVEMETATYPE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarative.h"
+
+#include <QtCore/qglobal.h>
+#include <QtCore/qvariant.h>
+#include <QtCore/qbitarray.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeType;
+class QDeclarativeCustomParser;
+class Q_DECLARATIVE_EXPORT QDeclarativeMetaType
+{
+public:
+ static bool copy(int type, void *data, const void *copy = 0);
+
+ static QList<QByteArray> qmlTypeNames();
+ static QList<QDeclarativeType*> qmlTypes();
+
+ static QDeclarativeType *qmlType(const QByteArray &, int, int);
+ static QDeclarativeType *qmlType(const QMetaObject *);
+ static QDeclarativeType *qmlType(int);
+
+ static QMetaProperty defaultProperty(const QMetaObject *);
+ static QMetaProperty defaultProperty(QObject *);
+ static QMetaMethod defaultMethod(const QMetaObject *);
+ static QMetaMethod defaultMethod(QObject *);
+
+ static bool isQObject(int);
+ static QObject *toQObject(const QVariant &, bool *ok = 0);
+
+ static int listType(int);
+ static int attachedPropertiesFuncId(const QMetaObject *);
+ static QDeclarativeAttachedPropertiesFunc attachedPropertiesFuncById(int);
+
+ enum TypeCategory { Unknown, Object, List };
+ static TypeCategory typeCategory(int);
+
+ static bool isInterface(int);
+ static const char *interfaceIId(int);
+ static bool isList(int);
+
+ typedef QVariant (*StringConverter)(const QString &);
+ static void registerCustomStringConverter(int, StringConverter);
+ static StringConverter customStringConverter(int);
+};
+
+class QDeclarativeTypePrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeType
+{
+public:
+ QByteArray typeName() const;
+ QByteArray qmlTypeName() const;
+
+ int majorVersion() const;
+ int minorVersion() const;
+ bool availableInVersion(int vmajor, int vminor) const;
+
+ QObject *create() const;
+
+ QDeclarativeCustomParser *customParser() const;
+
+ bool isCreatable() const;
+
+ bool isInterface() const;
+ int typeId() const;
+ int qListTypeId() const;
+
+ const QMetaObject *metaObject() const;
+ const QMetaObject *baseMetaObject() const;
+
+ QDeclarativeAttachedPropertiesFunc attachedPropertiesFunction() const;
+ const QMetaObject *attachedPropertiesType() const;
+
+ int parserStatusCast() const;
+ QVariant fromObject(QObject *) const;
+ const char *interfaceIId() const;
+ int propertyValueSourceCast() const;
+ int propertyValueInterceptorCast() const;
+
+ int index() const;
+private:
+ friend class QDeclarativeTypePrivate;
+ friend class QDeclarativeMetaTypeData;
+ friend int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterInterface &);
+ friend int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterType &);
+ QDeclarativeType(int, const QDeclarativePrivate::RegisterInterface &);
+ QDeclarativeType(int, const QDeclarativePrivate::RegisterType &);
+ ~QDeclarativeType();
+
+ QDeclarativeTypePrivate *d;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEMETATYPE_P_H
+
diff --git a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp b/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp
new file mode 100644
index 0000000000..9dd7d3974a
--- /dev/null
+++ b/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativenetworkaccessmanagerfactory.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QDeclarativeNetworkAccessManagerFactory
+ \since 4.7
+ \brief The QDeclarativeNetworkAccessManagerFactory class provides a factory for QNetworkAccessManager
+
+ QNetworkAccessManager is used for all network access by QML.
+ By implementing a factory it is possible to create custom
+ QNetworkAccessManager with specialized caching, proxy and
+ cookie support.
+
+ To implement a factory, subclass QDeclarativeNetworkAccessManagerFactory and implement
+ the create() method.
+
+ If the created QNetworkAccessManager becomes invalid, due to a
+ change in proxy settings, for example, call the invalidate() method.
+ This will cause all QNetworkAccessManagers to be recreated.
+
+ Note: the create() method may be called by multiple threads, so ensure the
+ implementation of this method is reentrant.
+*/
+
+/*!
+ The destructor is empty.
+ */
+QDeclarativeNetworkAccessManagerFactory::~QDeclarativeNetworkAccessManagerFactory()
+{
+}
+
+/*!
+ \fn QNetworkAccessManager *QDeclarativeNetworkAccessManagerFactory::create(QObject *parent)
+
+ Implement this method to create a QNetworkAccessManager with \a parent.
+ This allows proxies, caching and cookie support to be setup appropriately.
+
+ Note: this method may be called by multiple threads, so ensure the
+ implementation of this method is reentrant.
+*/
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.h b/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.h
new file mode 100644
index 0000000000..8c76013f92
--- /dev/null
+++ b/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVENETWORKACCESSMANAGERFACTORY_H
+#define QDECLARATIVENETWORKACCESSMANAGERFACTORY_H
+
+#include <QtCore/qobject.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QNetworkAccessManager;
+class Q_DECLARATIVE_EXPORT QDeclarativeNetworkAccessManagerFactory
+{
+public:
+ virtual ~QDeclarativeNetworkAccessManagerFactory();
+ virtual QNetworkAccessManager *create(QObject *parent) = 0;
+
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVENETWORKACCESSMANAGERFACTORY_H
diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
new file mode 100644
index 0000000000..e6f6e5f132
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
@@ -0,0 +1,754 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeobjectscriptclass_p.h"
+
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativecontext_p.h"
+#include "qdeclarativedeclarativedata_p.h"
+#include "qdeclarativetypenamescriptclass_p.h"
+#include "qdeclarativelistscriptclass_p.h"
+#include "qdeclarativebinding_p.h"
+#include "qdeclarativeguard_p.h"
+#include "qdeclarativevmemetaobject_p.h"
+
+#include <QtCore/qtimer.h>
+#include <QtCore/qvarlengtharray.h>
+
+Q_DECLARE_METATYPE(QScriptValue);
+
+QT_BEGIN_NAMESPACE
+
+struct ObjectData : public QScriptDeclarativeClass::Object {
+ ObjectData(QObject *o, int t) : object(o), type(t) {}
+ QDeclarativeGuard<QObject> object;
+ int type;
+};
+
+/*
+ The QDeclarativeObjectScriptClass handles property access for QObjects
+ via QtScript. It is also used to provide a more useful API in
+ QtScript for QML.
+ */
+QDeclarativeObjectScriptClass::QDeclarativeObjectScriptClass(QDeclarativeEngine *bindEngine)
+: QDeclarativeScriptClass(QDeclarativeEnginePrivate::getScriptEngine(bindEngine)),
+#if (QT_VERSION > QT_VERSION_CHECK(4, 6, 2)) || defined(QT_HAVE_QSCRIPTDECLARATIVECLASS_VALUE)
+ methods(bindEngine),
+#endif
+ lastData(0), engine(bindEngine)
+{
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+
+ m_destroy = scriptEngine->newFunction(destroy);
+ m_destroyId = createPersistentIdentifier(QLatin1String("destroy"));
+ m_toString = scriptEngine->newFunction(tostring);
+ m_toStringId = createPersistentIdentifier(QLatin1String("toString"));
+}
+
+QDeclarativeObjectScriptClass::~QDeclarativeObjectScriptClass()
+{
+}
+
+QScriptValue QDeclarativeObjectScriptClass::newQObject(QObject *object, int type)
+{
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+
+ if (!object)
+ return newObject(scriptEngine, this, new ObjectData(object, type));
+
+ QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(object, true);
+
+ if (!ddata->scriptValue.isValid()) {
+ ddata->scriptValue = newObject(scriptEngine, this, new ObjectData(object, type));
+ return ddata->scriptValue;
+ } else if (ddata->scriptValue.engine() == QDeclarativeEnginePrivate::getScriptEngine(engine)) {
+ return ddata->scriptValue;
+ } else {
+ return newObject(scriptEngine, this, new ObjectData(object, type));
+ }
+}
+
+QObject *QDeclarativeObjectScriptClass::toQObject(const QScriptValue &value) const
+{
+ return value.toQObject();
+}
+
+int QDeclarativeObjectScriptClass::objectType(const QScriptValue &value) const
+{
+ if (scriptClass(value) != this)
+ return QVariant::Invalid;
+
+ Object *o = object(value);
+ return ((ObjectData*)(o))->type;
+}
+
+QScriptClass::QueryFlags
+QDeclarativeObjectScriptClass::queryProperty(Object *object, const Identifier &name,
+ QScriptClass::QueryFlags flags)
+{
+ return queryProperty(toQObject(object), name, flags, 0);
+}
+
+QScriptClass::QueryFlags
+QDeclarativeObjectScriptClass::queryProperty(QObject *obj, const Identifier &name,
+ QScriptClass::QueryFlags flags, QDeclarativeContext *evalContext,
+ QueryHints hints)
+{
+ Q_UNUSED(flags);
+ lastData = 0;
+ lastTNData = 0;
+
+ if (name == m_destroyId.identifier ||
+ name == m_toStringId.identifier)
+ return QScriptClass::HandlesReadAccess;
+
+ if (!obj)
+ return 0;
+
+ QDeclarativeEnginePrivate *enginePrivate = QDeclarativeEnginePrivate::get(engine);
+ lastData = QDeclarativePropertyCache::property(engine, obj, name, local);
+
+ if (lastData)
+ return QScriptClass::HandlesReadAccess | QScriptClass::HandlesWriteAccess;
+
+ if (!(hints & SkipAttachedProperties)) {
+ if (!evalContext && context()) {
+ // Global object, QScriptContext activation object, QDeclarativeContext object
+ QScriptValue scopeNode = scopeChainValue(context(), -3);
+ if (scopeNode.isValid()) {
+ Q_ASSERT(scriptClass(scopeNode) == enginePrivate->contextClass);
+
+ evalContext = enginePrivate->contextClass->contextFromValue(scopeNode);
+ }
+ }
+
+ if (evalContext) {
+ QDeclarativeContextPrivate *cp = QDeclarativeContextPrivate::get(evalContext);
+
+ if (cp->imports) {
+ QDeclarativeTypeNameCache::Data *data = cp->imports->data(name);
+ if (data) {
+ lastTNData = data;
+ return QScriptClass::HandlesReadAccess;
+ }
+ }
+ }
+ }
+
+ if (!(hints & ImplicitObject)) {
+ local.coreIndex = -1;
+ lastData = &local;
+ return QScriptClass::HandlesReadAccess | QScriptClass::HandlesWriteAccess;
+ }
+
+ return 0;
+}
+
+QDeclarativeObjectScriptClass::ScriptValue
+QDeclarativeObjectScriptClass::property(Object *object, const Identifier &name)
+{
+ return property(toQObject(object), name);
+}
+
+QDeclarativeObjectScriptClass::ScriptValue
+QDeclarativeObjectScriptClass::property(QObject *obj, const Identifier &name)
+{
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+
+ if (name == m_destroyId.identifier)
+ return Value(scriptEngine, m_destroy);
+ else if (name == m_toStringId.identifier)
+ return Value(scriptEngine, m_toString);
+
+ if (lastData && !lastData->isValid())
+ return Value();
+
+ Q_ASSERT(obj);
+
+ QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
+
+ if (lastTNData) {
+
+ if (lastTNData->type)
+ return Value(scriptEngine, enginePriv->typeNameClass->newObject(obj, lastTNData->type));
+ else
+ return Value(scriptEngine, enginePriv->typeNameClass->newObject(obj, lastTNData->typeNamespace));
+
+ } else if (lastData->flags & QDeclarativePropertyCache::Data::IsFunction) {
+ if (lastData->flags & QDeclarativePropertyCache::Data::IsVMEFunction) {
+ return Value(scriptEngine, ((QDeclarativeVMEMetaObject *)(obj->metaObject()))->vmeMethod(lastData->coreIndex));
+ } else {
+#if (QT_VERSION > QT_VERSION_CHECK(4, 6, 2)) || defined(QT_HAVE_QSCRIPTDECLARATIVECLASS_VALUE)
+ // Uncomment to use QtScript method call logic
+ // QScriptValue sobj = scriptEngine->newQObject(obj);
+ // return Value(scriptEngine, sobj.property(toString(name)));
+ return Value(scriptEngine, methods.newMethod(obj, lastData));
+#else
+ QScriptValue sobj = scriptEngine->newQObject(obj);
+ return Value(scriptEngine, sobj.property(toString(name)));
+#endif
+ }
+ } else {
+ if (enginePriv->captureProperties && !(lastData->flags & QDeclarativePropertyCache::Data::IsConstant)) {
+ enginePriv->capturedProperties <<
+ QDeclarativeEnginePrivate::CapturedProperty(obj, lastData->coreIndex, lastData->notifyIndex);
+ }
+
+ if (QDeclarativeValueTypeFactory::isValueType((uint)lastData->propType)) {
+ QDeclarativeValueType *valueType = enginePriv->valueTypes[lastData->propType];
+ if (valueType)
+ return Value(scriptEngine, enginePriv->valueTypeClass->newObject(obj, lastData->coreIndex, valueType));
+ }
+
+ if (lastData->flags & QDeclarativePropertyCache::Data::IsQList) {
+ return Value(scriptEngine, enginePriv->listClass->newList(obj, lastData->coreIndex, lastData->propType));
+ } else if (lastData->flags & QDeclarativePropertyCache::Data::IsQObjectDerived) {
+ QObject *rv = 0;
+ void *args[] = { &rv, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args);
+ return Value(scriptEngine, newQObject(rv, lastData->propType));
+ } else if (lastData->flags & QDeclarativePropertyCache::Data::IsQScriptValue) {
+ QScriptValue rv = scriptEngine->nullValue();
+ void *args[] = { &rv, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args);
+ return Value(scriptEngine, rv);
+ } else if (lastData->propType == QMetaType::QReal) {
+ qreal rv = 0;
+ void *args[] = { &rv, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args);
+ return Value(scriptEngine, rv);
+ } else if (lastData->propType == QMetaType::Int) {
+ int rv = 0;
+ void *args[] = { &rv, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args);
+ return Value(scriptEngine, rv);
+ } else if (lastData->propType == QMetaType::Bool) {
+ bool rv = false;
+ void *args[] = { &rv, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args);
+ return Value(scriptEngine, rv);
+ } else if (lastData->propType == QMetaType::QString) {
+ QString rv;
+ void *args[] = { &rv, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args);
+ return Value(scriptEngine, rv);
+ } else if (lastData->propType == QMetaType::UInt) {
+ uint rv = 0;
+ void *args[] = { &rv, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args);
+ return Value(scriptEngine, rv);
+ } else if (lastData->propType == QMetaType::Float) {
+ float rv = 0;
+ void *args[] = { &rv, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args);
+ return Value(scriptEngine, rv);
+ } else if (lastData->propType == QMetaType::Double) {
+ double rv = 0;
+ void *args[] = { &rv, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args);
+ return Value(scriptEngine, rv);
+ } else {
+ QVariant var = obj->metaObject()->property(lastData->coreIndex).read(obj);
+ return Value(scriptEngine, enginePriv->scriptValueFromVariant(var));
+ }
+
+ }
+}
+
+void QDeclarativeObjectScriptClass::setProperty(Object *object,
+ const Identifier &name,
+ const QScriptValue &value)
+{
+ return setProperty(toQObject(object), name, value);
+}
+
+void QDeclarativeObjectScriptClass::setProperty(QObject *obj,
+ const Identifier &name,
+ const QScriptValue &value,
+ QDeclarativeContext *evalContext)
+{
+ Q_UNUSED(name);
+
+ Q_ASSERT(obj);
+ Q_ASSERT(lastData);
+
+ if (!lastData->isValid()) {
+ QString error = QLatin1String("Cannot assign to non-existent property \"") +
+ toString(name) + QLatin1Char('\"');
+ if (context())
+ context()->throwError(error);
+ return;
+ }
+
+ if (!(lastData->flags & QDeclarativePropertyCache::Data::IsWritable)) {
+ QString error = QLatin1String("Cannot assign to read-only property \"") +
+ toString(name) + QLatin1Char('\"');
+ if (context())
+ context()->throwError(error);
+ return;
+ }
+
+ QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
+
+ if (!evalContext && context()) {
+ // Global object, QScriptContext activation object, QDeclarativeContext object
+ QScriptValue scopeNode = scopeChainValue(context(), -3);
+ if (scopeNode.isValid()) {
+ Q_ASSERT(scriptClass(scopeNode) == enginePriv->contextClass);
+
+ evalContext = enginePriv->contextClass->contextFromValue(scopeNode);
+ }
+ }
+
+ QDeclarativeAbstractBinding *delBinding = QDeclarativePropertyPrivate::setBinding(obj, *lastData, 0);
+ if (delBinding)
+ delBinding->destroy();
+
+ if (value.isUndefined() && lastData->flags & QDeclarativePropertyCache::Data::IsResettable) {
+ void *a[] = { 0 };
+ QMetaObject::metacall(obj, QMetaObject::ResetProperty, lastData->coreIndex, a);
+ } else {
+ // ### Can well known types be optimized?
+ QVariant v = QDeclarativeScriptClass::toVariant(engine, value);
+ QDeclarativePropertyPrivate::write(obj, *lastData, v, evalContext);
+ }
+}
+
+bool QDeclarativeObjectScriptClass::isQObject() const
+{
+ return true;
+}
+
+QObject *QDeclarativeObjectScriptClass::toQObject(Object *object, bool *ok)
+{
+ if (ok) *ok = true;
+
+ ObjectData *data = (ObjectData*)object;
+ return data->object.data();
+}
+
+QScriptValue QDeclarativeObjectScriptClass::tostring(QScriptContext *context, QScriptEngine *)
+{
+ QObject* obj = context->thisObject().toQObject();
+
+ QString ret;
+ if(obj){
+ QString objectName = obj->objectName();
+
+ ret += QString::fromUtf8(obj->metaObject()->className());
+ ret += QLatin1String("(0x");
+ ret += QString::number((intptr_t)obj,16);
+
+ if (!objectName.isEmpty()) {
+ ret += QLatin1String(", \"");
+ ret += objectName;
+ ret += QLatin1Char('\"');
+ }
+
+ ret += QLatin1Char(')');
+ }else{
+ ret += QLatin1String("null");
+ }
+ return QScriptValue(ret);
+}
+
+QScriptValue QDeclarativeObjectScriptClass::destroy(QScriptContext *context, QScriptEngine *engine)
+{
+ QObject* obj = context->thisObject().toQObject();
+ if(obj){
+ int delay = 0;
+ if(context->argumentCount() > 0)
+ delay = context->argument(0).toInt32();
+ if (delay > 0)
+ QTimer::singleShot(delay, obj, SLOT(deleteLater()));
+ else
+ obj->deleteLater();
+ }
+ return engine->nullValue();
+}
+
+QStringList QDeclarativeObjectScriptClass::propertyNames(Object *object)
+{
+ QObject *obj = toQObject(object);
+ if (!obj)
+ return QStringList();
+
+ QDeclarativeEnginePrivate *enginePrivate = QDeclarativeEnginePrivate::get(engine);
+
+ QDeclarativePropertyCache *cache = 0;
+ QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(obj);
+ if (ddata)
+ cache = ddata->propertyCache;
+ if (!cache) {
+ cache = enginePrivate->cache(obj);
+ if (cache && ddata) { cache->addref(); ddata->propertyCache = cache; }
+ }
+
+ if (!cache)
+ return QStringList();
+
+ return cache->propertyNames();
+}
+
+#if (QT_VERSION > QT_VERSION_CHECK(4, 6, 2)) || defined(QT_HAVE_QSCRIPTDECLARATIVECLASS_VALUE)
+
+struct MethodData : public QScriptDeclarativeClass::Object {
+ MethodData(QObject *o, const QDeclarativePropertyCache::Data &d) : object(o), data(d) {}
+
+ QDeclarativeGuard<QObject> object;
+ QDeclarativePropertyCache::Data data;
+};
+
+QDeclarativeObjectMethodScriptClass::QDeclarativeObjectMethodScriptClass(QDeclarativeEngine *bindEngine)
+: QScriptDeclarativeClass(QDeclarativeEnginePrivate::getScriptEngine(bindEngine)),
+ engine(bindEngine)
+{
+ setSupportsCall(true);
+
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+
+ m_connect = scriptEngine->newFunction(connect);
+ m_connectId = createPersistentIdentifier(QLatin1String("connect"));
+ m_disconnect = scriptEngine->newFunction(disconnect);
+ m_disconnectId = createPersistentIdentifier(QLatin1String("disconnect"));
+}
+
+QDeclarativeObjectMethodScriptClass::~QDeclarativeObjectMethodScriptClass()
+{
+}
+
+QScriptValue QDeclarativeObjectMethodScriptClass::newMethod(QObject *object, const QDeclarativePropertyCache::Data *method)
+{
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+
+ return newObject(scriptEngine, this, new MethodData(object, *method));
+}
+
+QScriptValue QDeclarativeObjectMethodScriptClass::connect(QScriptContext *context, QScriptEngine *engine)
+{
+ QDeclarativeEnginePrivate *p = QDeclarativeEnginePrivate::get(engine);
+
+ QScriptValue that = context->thisObject();
+ if (&p->objectClass->methods != scriptClass(that))
+ return engine->undefinedValue();
+
+ MethodData *data = (MethodData *)object(that);
+
+ if (!data->object || context->argumentCount() == 0)
+ return engine->undefinedValue();
+
+ QByteArray signal("2");
+ signal.append(data->object->metaObject()->method(data->data.coreIndex).signature());
+
+ if (context->argumentCount() == 1) {
+ qScriptConnect(data->object, signal.constData(), QScriptValue(), context->argument(0));
+ } else {
+ qScriptConnect(data->object, signal.constData(), context->argument(0), context->argument(1));
+ }
+
+ return engine->undefinedValue();
+}
+
+QScriptValue QDeclarativeObjectMethodScriptClass::disconnect(QScriptContext *context, QScriptEngine *engine)
+{
+ QDeclarativeEnginePrivate *p = QDeclarativeEnginePrivate::get(engine);
+
+ QScriptValue that = context->thisObject();
+ if (&p->objectClass->methods != scriptClass(that))
+ return engine->undefinedValue();
+
+ MethodData *data = (MethodData *)object(that);
+
+ if (!data->object || context->argumentCount() == 0)
+ return engine->undefinedValue();
+
+ QByteArray signal("2");
+ signal.append(data->object->metaObject()->method(data->data.coreIndex).signature());
+
+ if (context->argumentCount() == 1) {
+ qScriptDisconnect(data->object, signal.constData(), QScriptValue(), context->argument(0));
+ } else {
+ qScriptDisconnect(data->object, signal.constData(), context->argument(0), context->argument(1));
+ }
+
+ return engine->undefinedValue();
+}
+
+QScriptClass::QueryFlags
+QDeclarativeObjectMethodScriptClass::queryProperty(Object *, const Identifier &name,
+ QScriptClass::QueryFlags flags)
+{
+ if (name == m_connectId.identifier || name == m_disconnectId.identifier)
+ return QScriptClass::HandlesReadAccess;
+ else
+ return 0;
+
+}
+
+QDeclarativeObjectScriptClass::ScriptValue
+QDeclarativeObjectMethodScriptClass::property(Object *, const Identifier &name)
+{
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+
+ if (name == m_connectId.identifier)
+ return Value(scriptEngine, m_connect);
+ else if (name == m_disconnectId.identifier)
+ return Value(scriptEngine, m_disconnect);
+ else
+ return Value();
+}
+
+namespace {
+struct MetaCallArgument {
+ inline MetaCallArgument();
+ inline ~MetaCallArgument();
+ inline void *dataPtr();
+
+ inline void initAsType(int type, QDeclarativeEngine *);
+ void fromScriptValue(int type, QDeclarativeEngine *, const QScriptValue &);
+ inline QScriptDeclarativeClass::Value toValue(QDeclarativeEngine *);
+
+private:
+ MetaCallArgument(const MetaCallArgument &);
+
+ inline void cleanup();
+
+ char *data[16];
+ int type;
+};
+}
+
+MetaCallArgument::MetaCallArgument()
+: type(QVariant::Invalid)
+{
+}
+
+MetaCallArgument::~MetaCallArgument()
+{
+ cleanup();
+}
+
+void MetaCallArgument::cleanup()
+{
+ if (type == QMetaType::QString) {
+ ((QString *)data)->~QString();
+ } else if (type == -1 || type == qMetaTypeId<QVariant>()) {
+ ((QVariant *)data)->~QVariant();
+ } else if (type == qMetaTypeId<QScriptValue>()) {
+ ((QScriptValue *)data)->~QScriptValue();
+ }
+}
+
+void *MetaCallArgument::dataPtr()
+{
+ if (type == -1)
+ return ((QVariant *)data)->data();
+ else
+ return (void *)data;
+}
+
+void MetaCallArgument::initAsType(int callType, QDeclarativeEngine *e)
+{
+ if (type != 0) { cleanup(); type = 0; }
+ if (callType == 0) return;
+
+ QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(e);
+
+ if (callType == qMetaTypeId<QScriptValue>()) {
+ new (data) QScriptValue(engine->undefinedValue());
+ type = callType;
+ } else if (callType == QMetaType::Int ||
+ callType == QMetaType::UInt ||
+ callType == QMetaType::Bool ||
+ callType == QMetaType::Double ||
+ callType == QMetaType::Float) {
+ type = callType;
+ } else if (callType == QMetaType::QObjectStar) {
+ *((QObject **)data) = 0;
+ type = callType;
+ } else if (callType == QMetaType::QString) {
+ new (data) QString();
+ type = callType;
+ } else if (callType == qMetaTypeId<QVariant>()) {
+ type = qMetaTypeId<QVariant>();
+ new (data) QVariant();
+ } else {
+ type = -1;
+ new (data) QVariant(callType, (void *)0);
+ }
+}
+
+void MetaCallArgument::fromScriptValue(int callType, QDeclarativeEngine *engine, const QScriptValue &value)
+{
+ if (type != 0) { cleanup(); type = 0; }
+
+ if (callType == qMetaTypeId<QScriptValue>()) {
+ new (data) QScriptValue(value);
+ type = qMetaTypeId<QScriptValue>();
+ } else if (callType == QMetaType::Int) {
+ *((int *)data) = int(value.toInt32());
+ type = callType;
+ } else if (callType == QMetaType::UInt) {
+ *((uint *)data) = uint(value.toUInt32());
+ type = callType;
+ } else if (callType == QMetaType::Bool) {
+ *((bool *)data) = value.toBool();
+ type = callType;
+ } else if (callType == QMetaType::Double) {
+ *((double *)data) = double(value.toNumber());
+ type = callType;
+ } else if (callType == QMetaType::Float) {
+ *((float *)data) = float(value.toNumber());
+ type = callType;
+ } else if (callType == QMetaType::QString) {
+ if (value.isNull() || value.isUndefined())
+ new (data) QString();
+ else
+ new (data) QString(value.toString());
+ type = callType;
+ } else if (callType == QMetaType::QObjectStar) {
+ *((QObject **)data) = value.toQObject();
+ type = callType;
+ } else if (callType == qMetaTypeId<QVariant>()) {
+ new (data) QVariant(QDeclarativeScriptClass::toVariant(engine, value));
+ type = callType;
+ } else {
+ new (data) QVariant();
+ type = -1;
+
+ QVariant v = QDeclarativeScriptClass::toVariant(engine, value);
+ if (v.userType() == callType) {
+ *((QVariant *)data) = v;
+ } else if (v.canConvert((QVariant::Type)callType)) {
+ *((QVariant *)data) = v;
+ ((QVariant *)data)->convert((QVariant::Type)callType);
+ } else {
+ *((QVariant *)data) = QVariant(callType, (void *)0);
+ }
+ }
+}
+
+QScriptDeclarativeClass::Value MetaCallArgument::toValue(QDeclarativeEngine *e)
+{
+ QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(e);
+
+ if (type == qMetaTypeId<QScriptValue>()) {
+ return QScriptDeclarativeClass::Value(engine, *((QScriptValue *)data));
+ } else if (type == QMetaType::Int) {
+ return QScriptDeclarativeClass::Value(engine, *((int *)data));
+ } else if (type == QMetaType::UInt) {
+ return QScriptDeclarativeClass::Value(engine, *((uint *)data));
+ } else if (type == QMetaType::Bool) {
+ return QScriptDeclarativeClass::Value(engine, *((bool *)data));
+ } else if (type == QMetaType::Double) {
+ return QScriptDeclarativeClass::Value(engine, *((double *)data));
+ } else if (type == QMetaType::Float) {
+ return QScriptDeclarativeClass::Value(engine, *((float *)data));
+ } else if (type == QMetaType::QString) {
+ return QScriptDeclarativeClass::Value(engine, *((QString *)data));
+ } else if (type == QMetaType::QObjectStar) {
+ return QScriptDeclarativeClass::Value(engine, QDeclarativeEnginePrivate::get(e)->objectClass->newQObject(*((QObject **)data)));
+ } else if (type == -1 || type == qMetaTypeId<QVariant>()) {
+ return QScriptDeclarativeClass::Value(engine, QDeclarativeEnginePrivate::get(e)->scriptValueFromVariant(*((QVariant *)data)));
+ } else {
+ return QScriptDeclarativeClass::Value();
+ }
+}
+
+QDeclarativeObjectMethodScriptClass::Value QDeclarativeObjectMethodScriptClass::call(Object *o, QScriptContext *ctxt)
+{
+ MethodData *method = static_cast<MethodData *>(o);
+
+ if (method->data.flags & QDeclarativePropertyCache::Data::HasArguments) {
+
+ QMetaMethod m = method->object->metaObject()->method(method->data.coreIndex);
+ QList<QByteArray> argTypeNames = m.parameterTypes();
+ QVarLengthArray<int, 9> argTypes(argTypeNames.count());
+
+ // ### Cache
+ for (int ii = 0; ii < argTypeNames.count(); ++ii) {
+ argTypes[ii] = QMetaType::type(argTypeNames.at(ii));
+ if (argTypes[ii] == QVariant::Invalid)
+ return Value(ctxt, ctxt->throwError(QString::fromLatin1("Unknown method parameter type: %1").arg(QLatin1String(argTypeNames.at(ii)))));
+ }
+
+ if (argTypes.count() > ctxt->argumentCount())
+ return Value(ctxt, ctxt->throwError(QLatin1String("Insufficient arguments")));
+
+ QVarLengthArray<MetaCallArgument, 9> args(argTypes.count() + 1);
+ args[0].initAsType(method->data.propType, engine);
+
+ for (int ii = 0; ii < argTypes.count(); ++ii)
+ args[ii + 1].fromScriptValue(argTypes[ii], engine, ctxt->argument(ii));
+
+ QVarLengthArray<void *, 9> argData(args.count());
+ for (int ii = 0; ii < args.count(); ++ii)
+ argData[ii] = args[ii].dataPtr();
+
+ QMetaObject::metacall(method->object, QMetaObject::InvokeMetaMethod, method->data.coreIndex, argData.data());
+
+ return args[0].toValue(engine);
+
+ } else if (method->data.propType != 0) {
+
+ MetaCallArgument arg;
+ arg.initAsType(method->data.propType, engine);
+
+ void *args[] = { arg.dataPtr() };
+
+ QMetaObject::metacall(method->object, QMetaObject::InvokeMetaMethod, method->data.coreIndex, args);
+
+ return arg.toValue(engine);
+
+ } else {
+
+ void *args[] = { 0 };
+ QMetaObject::metacall(method->object, QMetaObject::InvokeMetaMethod, method->data.coreIndex, args);
+ return Value();
+
+ }
+ return Value();
+}
+
+#endif
+
+QT_END_NAMESPACE
+
diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass_p.h b/src/declarative/qml/qdeclarativeobjectscriptclass_p.h
new file mode 100644
index 0000000000..04e760f21b
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeobjectscriptclass_p.h
@@ -0,0 +1,156 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEOBJECTSCRIPTCLASS_P_H
+#define QDECLARATIVEOBJECTSCRIPTCLASS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativepropertycache_p.h"
+#include "qdeclarativetypenamecache_p.h"
+
+#include <private/qdeclarativescriptclass_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeEngine;
+class QScriptContext;
+class QScriptEngine;
+class QDeclarativeContext;
+
+#if (QT_VERSION > QT_VERSION_CHECK(4, 6, 2)) || defined(QT_HAVE_QSCRIPTDECLARATIVECLASS_VALUE)
+class Q_AUTOTEST_EXPORT QDeclarativeObjectMethodScriptClass : public QScriptDeclarativeClass
+{
+public:
+ QDeclarativeObjectMethodScriptClass(QDeclarativeEngine *);
+ ~QDeclarativeObjectMethodScriptClass();
+
+ QScriptValue newMethod(QObject *, const QDeclarativePropertyCache::Data *);
+
+protected:
+ virtual Value call(Object *, QScriptContext *);
+ virtual QScriptClass::QueryFlags queryProperty(Object *, const Identifier &, QScriptClass::QueryFlags flags);
+ virtual Value property(Object *, const Identifier &);
+
+private:
+ PersistentIdentifier m_connectId;
+ PersistentIdentifier m_disconnectId;
+ QScriptValue m_connect;
+ QScriptValue m_disconnect;
+
+ static QScriptValue connect(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue disconnect(QScriptContext *context, QScriptEngine *engine);
+
+ QDeclarativeEngine *engine;
+};
+#endif
+
+class Q_AUTOTEST_EXPORT QDeclarativeObjectScriptClass : public QDeclarativeScriptClass
+{
+public:
+ QDeclarativeObjectScriptClass(QDeclarativeEngine *);
+ ~QDeclarativeObjectScriptClass();
+
+ QScriptValue newQObject(QObject *, int type = QMetaType::QObjectStar);
+ QObject *toQObject(const QScriptValue &) const;
+ int objectType(const QScriptValue &) const;
+
+ enum QueryHint {
+ ImplicitObject = 0x01,
+ SkipAttachedProperties = 0x02
+ };
+ Q_DECLARE_FLAGS(QueryHints, QueryHint)
+
+ QScriptClass::QueryFlags queryProperty(QObject *, const Identifier &,
+ QScriptClass::QueryFlags flags,
+ QDeclarativeContext *evalContext,
+ QueryHints hints = 0);
+
+ ScriptValue property(QObject *, const Identifier &);
+
+ void setProperty(QObject *, const Identifier &name, const QScriptValue &,
+ QDeclarativeContext *evalContext = 0);
+ virtual QStringList propertyNames(Object *);
+
+protected:
+ virtual QScriptClass::QueryFlags queryProperty(Object *, const Identifier &,
+ QScriptClass::QueryFlags flags);
+
+ virtual ScriptValue property(Object *, const Identifier &);
+ virtual void setProperty(Object *, const Identifier &name, const QScriptValue &);
+ virtual bool isQObject() const;
+ virtual QObject *toQObject(Object *, bool *ok = 0);
+
+private:
+#if (QT_VERSION > QT_VERSION_CHECK(4, 6, 2)) || defined(QT_HAVE_QSCRIPTDECLARATIVECLASS_VALUE)
+ friend class QDeclarativeObjectMethodScriptClass;
+ QDeclarativeObjectMethodScriptClass methods;
+#endif
+
+ QDeclarativeTypeNameCache::Data *lastTNData;
+ QDeclarativePropertyCache::Data *lastData;
+ QDeclarativePropertyCache::Data local;
+
+ PersistentIdentifier m_destroyId;
+ PersistentIdentifier m_toStringId;
+ QScriptValue m_destroy;
+ QScriptValue m_toString;
+
+ static QScriptValue tostring(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue destroy(QScriptContext *context, QScriptEngine *engine);
+
+ QDeclarativeEngine *engine;
+};
+Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeObjectScriptClass::QueryHints);
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEOBJECTSCRIPTCLASS_P_H
+
diff --git a/src/declarative/qml/qdeclarativeparser.cpp b/src/declarative/qml/qdeclarativeparser.cpp
new file mode 100644
index 0000000000..b0599ad9f0
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeparser.cpp
@@ -0,0 +1,394 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeparser_p.h"
+
+#include "qdeclarativepropertyvaluesource.h"
+#include "qdeclarativevme_p.h"
+#include "qdeclarative.h"
+#include "qdeclarativecomponent_p.h"
+#include "qdeclarativecomponent.h"
+#include "qmetaobjectbuilder_p.h"
+#include "qdeclarativevmemetaobject_p.h"
+#include "qdeclarativecompiler_p.h"
+#include "parser/qdeclarativejsast_p.h"
+#include "parser/qdeclarativejsengine_p.h"
+
+#include <qfxperf_p_p.h>
+
+#include <QStack>
+#include <QColor>
+#include <QPointF>
+#include <QSizeF>
+#include <QRectF>
+#include <QtDebug>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QDeclarativeJS;
+using namespace QDeclarativeParser;
+
+QDeclarativeParser::Object::Object()
+: type(-1), majorVersion(-1), minorVersion(-1), idIndex(-1), metatype(0), defaultProperty(0), parserStatusCast(-1)
+{
+}
+
+QDeclarativeParser::Object::~Object()
+{
+ if (defaultProperty) defaultProperty->release();
+ foreach(Property *prop, properties)
+ prop->release();
+ foreach(Property *prop, valueProperties)
+ prop->release();
+ foreach(Property *prop, signalProperties)
+ prop->release();
+ foreach(Property *prop, attachedProperties)
+ prop->release();
+ foreach(Property *prop, groupedProperties)
+ prop->release();
+ foreach(Property *prop, valueTypeProperties)
+ prop->release();
+ typedef QPair<Property *, int> PropPair;
+ foreach(const PropPair &prop, scriptStringProperties)
+ prop.first->release();
+ foreach(const DynamicProperty &prop, dynamicProperties)
+ if (prop.defaultValue) prop.defaultValue->release();
+ foreach(Object *obj, scriptBlockObjects)
+ obj->release();
+}
+
+void Object::setBindingBit(int b)
+{
+ while (bindingBitmask.size() < 4 * (1 + b / 32))
+ bindingBitmask.append(char(0));
+
+ quint32 *bits = (quint32 *)bindingBitmask.data();
+ bits[b / 32] |= (1 << (b % 32));
+}
+
+const QMetaObject *Object::metaObject() const
+{
+ if (!metadata.isEmpty() && metatype)
+ return &extObject;
+ else
+ return metatype;
+}
+
+QDeclarativeParser::Property *Object::getDefaultProperty()
+{
+ if (!defaultProperty) {
+ defaultProperty = new Property;
+ defaultProperty->parent = this;
+ }
+ return defaultProperty;
+}
+
+void QDeclarativeParser::Object::addValueProperty(Property *p)
+{
+ p->addref();
+ valueProperties << p;
+}
+
+void QDeclarativeParser::Object::addSignalProperty(Property *p)
+{
+ p->addref();
+ signalProperties << p;
+}
+
+void QDeclarativeParser::Object::addAttachedProperty(Property *p)
+{
+ p->addref();
+ attachedProperties << p;
+}
+
+void QDeclarativeParser::Object::addGroupedProperty(Property *p)
+{
+ p->addref();
+ groupedProperties << p;
+}
+
+void QDeclarativeParser::Object::addValueTypeProperty(Property *p)
+{
+ p->addref();
+ valueTypeProperties << p;
+}
+
+void QDeclarativeParser::Object::addScriptStringProperty(Property *p, int stack)
+{
+ p->addref();
+ scriptStringProperties << qMakePair(p, stack);
+}
+
+
+Property *QDeclarativeParser::Object::getProperty(const QByteArray &name, bool create)
+{
+ if (!properties.contains(name)) {
+ if (create) {
+ Property *property = new Property(name);
+ property->parent = this;
+ properties.insert(name, property);
+ } else {
+ return 0;
+ }
+ }
+ return properties[name];
+}
+
+QDeclarativeParser::Object::DynamicProperty::DynamicProperty()
+: isDefaultProperty(false), type(Variant), defaultValue(0)
+{
+}
+
+QDeclarativeParser::Object::DynamicProperty::DynamicProperty(const DynamicProperty &o)
+: isDefaultProperty(o.isDefaultProperty),
+ type(o.type),
+ customType(o.customType),
+ name(o.name),
+ defaultValue(o.defaultValue),
+ location(o.location)
+{
+}
+
+QDeclarativeParser::Object::DynamicSignal::DynamicSignal()
+{
+}
+
+QDeclarativeParser::Object::DynamicSignal::DynamicSignal(const DynamicSignal &o)
+: name(o.name), parameterTypes(o.parameterTypes),
+ parameterNames(o.parameterNames)
+{
+}
+
+QDeclarativeParser::Object::DynamicSlot::DynamicSlot()
+{
+}
+
+QDeclarativeParser::Object::DynamicSlot::DynamicSlot(const DynamicSlot &o)
+: name(o.name), body(o.body), parameterNames(o.parameterNames)
+{
+}
+
+QDeclarativeParser::Property::Property()
+: parent(0), type(0), index(-1), value(0), isDefault(true), isDeferred(false)
+{
+}
+
+QDeclarativeParser::Property::Property(const QByteArray &n)
+: parent(0), type(0), index(-1), value(0), name(n), isDefault(false),
+ isDeferred(false)
+{
+}
+
+QDeclarativeParser::Property::~Property()
+{
+ foreach(Value *value, values)
+ value->release();
+ foreach(Value *value, onValues)
+ value->release();
+ if (value) value->release();
+}
+
+Object *QDeclarativeParser::Property::getValue(const LocationSpan &l)
+{
+ if (!value) { value = new Object; value->location = l; }
+ return value;
+}
+
+void QDeclarativeParser::Property::addValue(Value *v)
+{
+ values << v;
+}
+
+void QDeclarativeParser::Property::addOnValue(Value *v)
+{
+ onValues << v;
+}
+
+bool QDeclarativeParser::Property::isEmpty() const
+{
+ return !value && values.isEmpty() && onValues.isEmpty();
+}
+
+QDeclarativeParser::Value::Value()
+: type(Unknown), object(0)
+{
+}
+
+QDeclarativeParser::Value::~Value()
+{
+ if (object) object->release();
+}
+
+QDeclarativeParser::Variant::Variant()
+: t(Invalid) {}
+
+QDeclarativeParser::Variant::Variant(const Variant &o)
+: t(o.t), d(o.d), s(o.s)
+{
+}
+
+QDeclarativeParser::Variant::Variant(bool v)
+: t(Boolean), b(v)
+{
+}
+
+QDeclarativeParser::Variant::Variant(double v, const QString &asWritten)
+: t(Number), d(v), s(asWritten)
+{
+}
+
+QDeclarativeParser::Variant::Variant(const QString &v)
+: t(String), s(v)
+{
+}
+
+QDeclarativeParser::Variant::Variant(const QString &v, QDeclarativeJS::AST::Node *n)
+: t(Script), n(n), s(v)
+{
+}
+
+QDeclarativeParser::Variant &QDeclarativeParser::Variant::operator=(const Variant &o)
+{
+ t = o.t;
+ d = o.d;
+ s = o.s;
+ return *this;
+}
+
+QDeclarativeParser::Variant::Type QDeclarativeParser::Variant::type() const
+{
+ return t;
+}
+
+bool QDeclarativeParser::Variant::asBoolean() const
+{
+ return b;
+}
+
+QString QDeclarativeParser::Variant::asString() const
+{
+ return s;
+}
+
+double QDeclarativeParser::Variant::asNumber() const
+{
+ return d;
+}
+
+QString QDeclarativeParser::Variant::asScript() const
+{
+ switch(type()) {
+ default:
+ case Invalid:
+ return QString();
+ case Boolean:
+ return b?QLatin1String("true"):QLatin1String("false");
+ case Number:
+ if (s.isEmpty())
+ return QString::number(d);
+ else
+ return s;
+ case String:
+ case Script:
+ return s;
+ }
+}
+
+QDeclarativeJS::AST::Node *QDeclarativeParser::Variant::asAST() const
+{
+ if (type() == Script)
+ return n;
+ else
+ return 0;
+}
+
+bool QDeclarativeParser::Variant::isStringList() const
+{
+ if (isString())
+ return true;
+
+ if (type() != Script || !n)
+ return false;
+
+ AST::ArrayLiteral *array = AST::cast<AST::ArrayLiteral *>(n);
+ if (!array)
+ return false;
+
+ AST::ElementList *elements = array->elements;
+
+ while (elements) {
+
+ if (!AST::cast<AST::StringLiteral *>(elements->expression))
+ return false;
+
+ elements = elements->next;
+ }
+
+ return true;
+}
+
+QStringList QDeclarativeParser::Variant::asStringList() const
+{
+ QStringList rv;
+ if (isString()) {
+ rv << asString();
+ return rv;
+ }
+
+ AST::ArrayLiteral *array = AST::cast<AST::ArrayLiteral *>(n);
+ if (!array)
+ return rv;
+
+ AST::ElementList *elements = array->elements;
+ while (elements) {
+
+ AST::StringLiteral *string = AST::cast<AST::StringLiteral *>(elements->expression);
+ if (!string)
+ return QStringList();
+ rv.append(string->value->asString());
+
+ elements = elements->next;
+ }
+
+ return rv;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeparser_p.h b/src/declarative/qml/qdeclarativeparser_p.h
new file mode 100644
index 0000000000..5bf4b68516
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeparser_p.h
@@ -0,0 +1,367 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEPARSER_P_H
+#define QDECLARATIVEPARSER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarative.h"
+#include "qdeclarativerefcount_p.h"
+
+#include <QtCore/qbytearray.h>
+#include <QtCore/qlist.h>
+#include <QtCore/qurl.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qstringlist.h>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+namespace QDeclarativeJS { namespace AST { class Node; } }
+
+/*
+ XXX
+
+ These types are created (and owned) by the QDeclarativeXmlParser and consumed by the
+ QDeclarativeCompiler. During the compilation phase the compiler will update some of
+ the fields for both its own use and for the use of the upcoming QDeclarativeDom API.
+
+ The types are part of the generic sounding "QDeclarativeParser" namespace for legacy
+ reasons (there used to be more in this namespace) and will be cleaned up and
+ migrated into a more appropriate location shortly.
+*/
+namespace QDeclarativeParser
+{
+ struct Location
+ {
+ Location() : line(-1), column(-1) {}
+ int line;
+ int column;
+ };
+
+ struct LocationRange
+ {
+ LocationRange() : offset(0), length(0) {}
+ quint32 offset;
+ quint32 length;
+ };
+
+ struct LocationSpan
+ {
+ Location start;
+ Location end;
+ LocationRange range;
+
+ bool operator<(LocationSpan &o) const {
+ return (start.line < o.start.line) ||
+ (start.line == o.start.line && start.column < o.start.column);
+ }
+ };
+
+ class Property;
+ class Object : public QDeclarativeRefCount
+ {
+ public:
+ Object();
+ virtual ~Object();
+
+ // Type of the object. The integer is an index into the
+ // QDeclarativeCompiledData::types array, or -1 if the object is a property
+ // group.
+ int type;
+ // The url of this object if it is an external type. Used by the DOM
+ QUrl url;
+
+ // version information if type is defined in library or C++
+ int majorVersion;
+ int minorVersion;
+
+ // The fully-qualified name of this type
+ QByteArray typeName;
+ // The class name
+ QByteArray className;
+ // The id assigned to the object (if any). Set by the QDeclarativeCompiler
+ QString id;
+ // The id index assigned to the object (if any). Set by the QDeclarativeCompiler
+ int idIndex;
+ // Custom parsed data
+ QByteArray custom;
+ // Bit mask of the properties assigned bindings
+ QByteArray bindingBitmask;
+ void setBindingBit(int);
+ // Returns the metaobject for this type, or 0 if not available.
+ // Internally selectd between the metatype and extObject variables
+ const QMetaObject *metaObject() const;
+
+ // The compile time metaobject for this type
+ const QMetaObject *metatype;
+ // The synthesized metaobject, if QML added signals or properties to
+ // this type. Otherwise null
+ QAbstractDynamicMetaObject extObject;
+ QByteArray metadata; // Generated by compiler
+ QByteArray synthdata; // Generated by compiler
+
+ Property *getDefaultProperty();
+ Property *getProperty(const QByteArray &name, bool create=true);
+
+ Property *defaultProperty;
+ QHash<QByteArray, Property *> properties;
+
+ QList<Object *> scriptBlockObjects;
+
+ // Output of the compilation phase (these properties continue to exist
+ // in either the defaultProperty or properties members too)
+ void addValueProperty(Property *);
+ void addSignalProperty(Property *);
+ void addAttachedProperty(Property *);
+ void addGroupedProperty(Property *);
+ void addValueTypeProperty(Property *);
+ void addScriptStringProperty(Property *, int = 0);
+ QList<Property *> valueProperties;
+ QList<Property *> signalProperties;
+ QList<Property *> attachedProperties;
+ QList<Property *> groupedProperties;
+ QList<Property *> valueTypeProperties;
+ QList<QPair<Property *, int> > scriptStringProperties;
+
+ // Script blocks that were nested under this object
+ struct ScriptBlock {
+ QStringList codes;
+ QStringList files;
+ QList<int> lineNumbers;
+ };
+ QList<ScriptBlock> scripts;
+
+ // The bytes to cast instances by to get to the QDeclarativeParserStatus
+ // interface. -1 indicates the type doesn't support this interface.
+ // Set by the QDeclarativeCompiler.
+ int parserStatusCast;
+
+ LocationSpan location;
+
+ struct DynamicProperty {
+ DynamicProperty();
+ DynamicProperty(const DynamicProperty &);
+
+ enum Type { Variant, Int, Bool, Real, String, Url, Color, Date, Alias, Custom, CustomList };
+
+ bool isDefaultProperty;
+ Type type;
+ QByteArray customType;
+ QByteArray name;
+ QDeclarativeParser::Property *defaultValue;
+ LocationSpan location;
+ };
+ struct DynamicSignal {
+ DynamicSignal();
+ DynamicSignal(const DynamicSignal &);
+
+ QByteArray name;
+ QList<QByteArray> parameterTypes;
+ QList<QByteArray> parameterNames;
+ };
+ struct DynamicSlot {
+ DynamicSlot();
+ DynamicSlot(const DynamicSlot &);
+
+ QByteArray name;
+ QString body;
+ QList<QByteArray> parameterNames;
+ };
+
+ // The list of dynamic properties
+ QList<DynamicProperty> dynamicProperties;
+ // The list of dynamic signals
+ QList<DynamicSignal> dynamicSignals;
+ // The list of dynamic slots
+ QList<DynamicSlot> dynamicSlots;
+ };
+
+ class Variant
+ {
+ public:
+ enum Type {
+ Invalid,
+ Boolean,
+ Number,
+ String,
+ Script
+ };
+
+ Variant();
+ Variant(const Variant &);
+ Variant(bool);
+ Variant(double, const QString &asWritten=QString());
+ Variant(const QString &);
+ Variant(const QString &, QDeclarativeJS::AST::Node *);
+ Variant &operator=(const Variant &);
+
+ Type type() const;
+
+ bool isBoolean() const { return type() == Boolean; }
+ bool isNumber() const { return type() == Number; }
+ bool isString() const { return type() == String; }
+ bool isScript() const { return type() == Script; }
+ bool isStringList() const;
+
+ bool asBoolean() const;
+ QString asString() const;
+ double asNumber() const;
+ QString asScript() const;
+ QDeclarativeJS::AST::Node *asAST() const;
+ QStringList asStringList() const;
+
+ private:
+ Type t;
+ union {
+ bool b;
+ double d;
+ QDeclarativeJS::AST::Node *n;
+ };
+ QString s;
+ };
+
+ class Value : public QDeclarativeRefCount
+ {
+ public:
+ Value();
+ virtual ~Value();
+
+ enum Type {
+ // The type of this value assignment is not yet known
+ Unknown,
+ // This is used as a literal property assignment
+ Literal,
+ // This is used as a property binding assignment
+ PropertyBinding,
+ // This is used as a QDeclarativePropertyValueSource assignment
+ ValueSource,
+ // This is used as a QDeclarativePropertyValueInterceptor assignment
+ ValueInterceptor,
+ // This is used as a property QObject assignment
+ CreatedObject,
+ // This is used as a signal object assignment
+ SignalObject,
+ // This is used as a signal expression assignment
+ SignalExpression,
+ // This is used as an id assignment only
+ Id
+ };
+ Type type;
+
+ // ### Temporary
+ QString primitive() const { return value.asScript(); }
+
+ // Primitive value
+ Variant value;
+ // Object value
+ Object *object;
+
+ LocationSpan location;
+ };
+
+ class Property : public QDeclarativeRefCount
+ {
+ public:
+ Property();
+ Property(const QByteArray &n);
+ virtual ~Property();
+
+ // The Object to which this property is attached
+ Object *parent;
+
+ Object *getValue(const LocationSpan &);
+ void addValue(Value *v);
+ void addOnValue(Value *v);
+
+ // The QVariant::Type of the property, or 0 (QVariant::Invalid) if
+ // unknown.
+ int type;
+ // The metaobject index of this property, or -1 if unknown.
+ int index;
+
+ // Returns true if this is an empty property - both value and values
+ // are unset.
+ bool isEmpty() const;
+ // The list of values assigned to this property. Content in values
+ // and value are mutually exclusive
+ QList<Value *> values;
+ // The list of values assigned to this property using the "on" syntax
+ QList<Value *> onValues;
+ // The accessed property. This is used to represent dot properties.
+ // Content in value and values are mutually exclusive.
+ Object *value;
+ // The property name
+ QByteArray name;
+ // True if this property was accessed as the default property.
+ bool isDefault;
+ // True if the setting of this property will be deferred. Set by the
+ // QDeclarativeCompiler
+ bool isDeferred;
+
+ LocationSpan location;
+ LocationRange listValueRange;
+ QList<int> listCommaPositions;
+ };
+}
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QDeclarativeParser::Variant)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEPARSER_P_H
diff --git a/src/declarative/qml/qdeclarativeparserstatus.cpp b/src/declarative/qml/qdeclarativeparserstatus.cpp
new file mode 100644
index 0000000000..ec6260e3c0
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeparserstatus.cpp
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeparserstatus.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QDeclarativeParserStatus
+ \since 4.7
+ \brief The QDeclarativeParserStatus class provides updates on the parser state.
+*/
+
+/*! \internal */
+QDeclarativeParserStatus::QDeclarativeParserStatus()
+: d(0)
+{
+}
+
+/*! \internal */
+QDeclarativeParserStatus::~QDeclarativeParserStatus()
+{
+ if(d)
+ (*d) = 0;
+}
+
+/*!
+ Invoked after class creation, but before any properties have been set.
+*/
+void QDeclarativeParserStatus::classBegin()
+{
+}
+
+/*!
+ Invoked after the root component that caused this instantiation has
+ completed construction. At this point all static values and binding values
+ have been assigned to the class.
+*/
+void QDeclarativeParserStatus::componentComplete()
+{
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeparserstatus.h b/src/declarative/qml/qdeclarativeparserstatus.h
new file mode 100644
index 0000000000..34528c11af
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeparserstatus.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEPARSERSTATUS_H
+#define QDECLARATIVEPARSERSTATUS_H
+
+#include <QtCore/qobject.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class Q_DECLARATIVE_EXPORT QDeclarativeParserStatus
+{
+public:
+ QDeclarativeParserStatus();
+ virtual ~QDeclarativeParserStatus();
+
+ virtual void classBegin();
+ virtual void componentComplete();
+
+private:
+ friend class QDeclarativeVME;
+ friend class QDeclarativeComponent;
+ friend class QDeclarativeComponentPrivate;
+ friend class QDeclarativeEnginePrivate;
+ QDeclarativeParserStatus **d;
+};
+Q_DECLARE_INTERFACE(QDeclarativeParserStatus, "com.trolltech.qml.QDeclarativeParserStatus")
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEPARSERSTATUS_H
diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/declarative/qml/qdeclarativeprivate.h
new file mode 100644
index 0000000000..01369d423d
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeprivate.h
@@ -0,0 +1,214 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEPRIVATE_H
+#define QDECLARATIVEPRIVATE_H
+
+#include <QtCore/qglobal.h>
+#include <QtCore/qvariant.h>
+#ifndef Q_OS_WIN
+#include <stdint.h>
+#endif
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+typedef QObject *(*QDeclarativeAttachedPropertiesFunc)(QObject *);
+
+template <typename TYPE>
+class QDeclarativeTypeInfo
+{
+public:
+ enum {
+ hasAttachedProperties = 0
+ };
+};
+
+
+class QDeclarativeCustomParser;
+namespace QDeclarativePrivate
+{
+ template<typename T>
+ QObject *create() { return new T; }
+
+ template<typename T>
+ QObject *createParent(QObject *p) { return new T(p); }
+
+ template<class From, class To, int N>
+ struct StaticCastSelectorClass
+ {
+ static inline int cast() { return -1; }
+ };
+
+ template<class From, class To>
+ struct StaticCastSelectorClass<From, To, sizeof(int)>
+ {
+ static inline int cast() { return (int)((intptr_t)static_cast<To *>((From *)0x10000000)) - 0x10000000; }
+ };
+
+ template<class From, class To>
+ struct StaticCastSelector
+ {
+ typedef int yes_type;
+ typedef char no_type;
+
+ static yes_type check(To *);
+ static no_type check(...);
+
+ static inline int cast()
+ {
+ return StaticCastSelectorClass<From, To, sizeof(check((From *)0))>::cast();
+ }
+ };
+
+ template <typename T>
+ struct has_attachedPropertiesMember
+ {
+ static bool const value = QDeclarativeTypeInfo<T>::hasAttachedProperties;
+ };
+
+ template <typename T, bool hasMember>
+ class has_attachedPropertiesMethod
+ {
+ typedef int yes_type;
+ typedef char no_type;
+
+ template<typename ReturnType>
+ static yes_type check(ReturnType *(*)(QObject *));
+ static no_type check(...);
+
+ public:
+ static bool const value = sizeof(check(&T::qmlAttachedProperties)) == sizeof(yes_type);
+ };
+
+ template <typename T>
+ class has_attachedPropertiesMethod<T, false>
+ {
+ public:
+ static bool const value = false;
+ };
+
+ template<typename T, int N>
+ class AttachedPropertySelector
+ {
+ public:
+ static inline QDeclarativeAttachedPropertiesFunc func() { return 0; }
+ static inline const QMetaObject *metaObject() { return 0; }
+ };
+ template<typename T>
+ class AttachedPropertySelector<T, 1>
+ {
+ static inline QObject *attachedProperties(QObject *obj) {
+ return T::qmlAttachedProperties(obj);
+ }
+ template<typename ReturnType>
+ static inline const QMetaObject *attachedPropertiesMetaObject(ReturnType *(*)(QObject *)) {
+ return &ReturnType::staticMetaObject;
+ }
+ public:
+ static inline QDeclarativeAttachedPropertiesFunc func() {
+ return &attachedProperties;
+ }
+ static inline const QMetaObject *metaObject() {
+ return attachedPropertiesMetaObject(&T::qmlAttachedProperties);
+ }
+ };
+
+ template<typename T>
+ inline QDeclarativeAttachedPropertiesFunc attachedPropertiesFunc()
+ {
+ return AttachedPropertySelector<T, has_attachedPropertiesMethod<T, has_attachedPropertiesMember<T>::value>::value>::func();
+ }
+
+ template<typename T>
+ inline const QMetaObject *attachedPropertiesMetaObject()
+ {
+ return AttachedPropertySelector<T, has_attachedPropertiesMethod<T, has_attachedPropertiesMember<T>::value>::value>::metaObject();
+ }
+
+ struct RegisterType {
+ int version;
+
+ int typeId;
+ int listId;
+ QObject *(*create)();
+
+ const char *uri;
+ int versionMajor;
+ int versionMinor;
+ const char *elementName;
+ const QMetaObject *metaObject;
+
+ QDeclarativeAttachedPropertiesFunc attachedPropertiesFunction;
+ const QMetaObject *attachedPropertiesMetaObject;
+
+ int parserStatusCast;
+ int valueSourceCast;
+ int valueInterceptorCast;
+
+ QObject *(*extensionObjectCreate)(QObject *);
+ const QMetaObject *extensionMetaObject;
+
+ QDeclarativeCustomParser *customParser;
+ };
+
+ struct RegisterInterface {
+ int version;
+
+ int typeId;
+ int listId;
+
+ const char *iid;
+ };
+
+ int Q_DECLARATIVE_EXPORT registerType(const RegisterType &);
+ int Q_DECLARATIVE_EXPORT registerType(const RegisterInterface &);
+
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEPRIVATE_H
diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp
new file mode 100644
index 0000000000..945d098a9e
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeproperty.cpp
@@ -0,0 +1,1342 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeproperty.h"
+#include "qdeclarativeproperty_p.h"
+
+#include "qdeclarativecompositetypedata_p.h"
+#include "qdeclarative.h"
+#include "qdeclarativebinding_p.h"
+#include "qdeclarativecontext.h"
+#include "qdeclarativecontext_p.h"
+#include "qdeclarativeboundsignal_p.h"
+#include "qdeclarativeengine.h"
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativedeclarativedata_p.h"
+#include "qdeclarativestringconverters_p.h"
+#include "qdeclarativelist_p.h"
+#include "qdeclarativecompiler_p.h"
+
+#include <QStringList>
+#include <QtCore/qdebug.h>
+
+#include <math.h>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+\class QDeclarativeProperty
+\brief The QDeclarativeProperty class abstracts accessing properties on objects created from QML.
+
+As QML uses Qt's meta-type system all of the existing QMetaObject classes can be used to introspect
+and interact with objects created by QML. However, some of the new features provided by QML - such
+as type safety and attached properties - are most easily used through the QDeclarativeProperty class
+that simplifies some of their natural complexity.
+
+Unlike QMetaProperty which represents a property on a class type, QDeclarativeProperty encapsulates
+a property on a specific object instance. To read a property's value, programmers create a
+QDeclarativeProperty instance and call the read() method. Likewise to write a property value the
+write() method is used.
+
+\code
+
+QObject *object = declarativeComponent.create();
+
+QDeclarativeProperty property(object, "font.pixelSize");
+qWarning() << "Current pixel size:" << property.read().toInt();
+property.write(24);
+qWarning() << "Pixel size should now be 24:" << property.read().toInt();
+
+\endcode
+*/
+
+/*!
+ Create an invalid QDeclarativeProperty.
+*/
+QDeclarativeProperty::QDeclarativeProperty()
+: d(new QDeclarativePropertyPrivate)
+{
+ d->q = this;
+}
+
+/*! \internal */
+QDeclarativeProperty::~QDeclarativeProperty()
+{
+ delete d; d = 0;
+}
+
+/*!
+ Creates a QDeclarativeProperty for the default property of \a obj. If there is no
+ default property, an invalid QDeclarativeProperty will be created.
+ */
+QDeclarativeProperty::QDeclarativeProperty(QObject *obj)
+: d(new QDeclarativePropertyPrivate)
+{
+ d->q = this;
+ d->initDefault(obj);
+}
+
+/*!
+ Creates a QDeclarativeProperty for the default property of \a obj
+ using the \l{QDeclarativeContext} {context} \a ctxt. If there is
+ no default property, an invalid QDeclarativeProperty will be
+ created.
+ */
+QDeclarativeProperty::QDeclarativeProperty(QObject *obj, QDeclarativeContext *ctxt)
+: d(new QDeclarativePropertyPrivate)
+{
+ d->q = this;
+ d->context = ctxt;
+ d->engine = ctxt?ctxt->engine():0;
+ d->initDefault(obj);
+}
+
+/*!
+ Creates a QDeclarativeProperty for the default property of \a obj
+ using the environment for instantiating QML components that is
+ provided by \a engine. If there is no default property, an
+ invalid QDeclarativeProperty will be created.
+ */
+QDeclarativeProperty::QDeclarativeProperty(QObject *obj, QDeclarativeEngine *engine)
+ : d(new QDeclarativePropertyPrivate)
+{
+ d->q = this;
+ d->context = 0;
+ d->engine = engine;
+ d->initDefault(obj);
+}
+
+/*!
+ Initialize from the default property of \a obj
+*/
+void QDeclarativePropertyPrivate::initDefault(QObject *obj)
+{
+ if (!obj)
+ return;
+
+ QMetaProperty p = QDeclarativeMetaType::defaultProperty(obj);
+ core.load(p);
+ if (core.isValid())
+ object = obj;
+}
+
+/*!
+ Creates a QDeclarativeProperty for the property \a name of \a obj.
+ */
+QDeclarativeProperty::QDeclarativeProperty(QObject *obj, const QString &name)
+: d(new QDeclarativePropertyPrivate)
+{
+ d->q = this;
+ d->initProperty(obj, name);
+ if (!isValid()) d->object = 0;
+}
+
+/*!
+ Creates a QDeclarativeProperty for the property \a name of \a obj
+ using the \l{QDeclarativeContext} {context} \a ctxt.
+*/
+QDeclarativeProperty::QDeclarativeProperty(QObject *obj, const QString &name, QDeclarativeContext *ctxt)
+: d(new QDeclarativePropertyPrivate)
+{
+ d->q = this;
+ d->context = ctxt;
+ d->engine = ctxt?ctxt->engine():0;
+ d->initProperty(obj, name);
+ if (!isValid()) { d->object = 0; d->context = 0; d->engine = 0; }
+}
+
+/*!
+ Creates a QDeclarativeProperty for the property \a name of \a obj
+ using the environment for instantiating QML components that is
+ provided by \a engine.
+ */
+QDeclarativeProperty::QDeclarativeProperty(QObject *obj, const QString &name, QDeclarativeEngine *engine)
+: d(new QDeclarativePropertyPrivate)
+{
+ d->q = this;
+ d->context = 0;
+ d->engine = engine;
+ d->initProperty(obj, name);
+ if (!isValid()) { d->object = 0; d->context = 0; d->engine = 0; }
+}
+
+Q_GLOBAL_STATIC(QDeclarativeValueTypeFactory, qmlValueTypes);
+
+void QDeclarativePropertyPrivate::initProperty(QObject *obj, const QString &name)
+{
+ if (!obj) return;
+
+ QDeclarativeTypeNameCache *typeNameCache = context?QDeclarativeContextPrivate::get(context)->imports:0;
+
+ QStringList path = name.split(QLatin1Char('.'));
+ if (path.isEmpty()) return;
+
+ QObject *currentObject = obj;
+
+ // Everything up to the last property must be an "object type" property
+ for (int ii = 0; ii < path.count() - 1; ++ii) {
+ const QString &pathName = path.at(ii);
+
+ if (QDeclarativeTypeNameCache::Data *data = typeNameCache?typeNameCache->data(pathName):0) {
+ if (data->type) {
+ QDeclarativeAttachedPropertiesFunc func = data->type->attachedPropertiesFunction();
+ if (!func) return; // Not an attachable type
+
+ currentObject = qmlAttachedPropertiesObjectById(data->type->index(), currentObject);
+ if (!currentObject) return; // Something is broken with the attachable type
+ } else {
+ Q_ASSERT(data->typeNamespace);
+ if ((ii + 1) == path.count()) return; // No type following the namespace
+
+ ++ii; data = data->typeNamespace->data(path.at(ii));
+ if (!data || !data->type) return; // Invalid type in namespace
+
+ QDeclarativeAttachedPropertiesFunc func = data->type->attachedPropertiesFunction();
+ if (!func) return; // Not an attachable type
+
+ currentObject = qmlAttachedPropertiesObjectById(data->type->index(), currentObject);
+ if (!currentObject) return; // Something is broken with the attachable type
+ }
+ } else {
+
+ QDeclarativePropertyCache::Data local;
+ QDeclarativePropertyCache::Data *property =
+ QDeclarativePropertyCache::property(engine, obj, pathName, local);
+
+ if (!property) return; // Not a property
+ if (property->flags & QDeclarativePropertyCache::Data::IsFunction)
+ return; // Not an object property
+
+ if (ii == (path.count() - 2) && QDeclarativeValueTypeFactory::isValueType(property->propType)) {
+ // We're now at a value type property. We can use a global valuetypes array as we
+ // never actually use the objects, just look up their properties.
+ QObject *typeObject = (*qmlValueTypes())[property->propType];
+ if (!typeObject) return; // Not a value type
+
+ int idx = typeObject->metaObject()->indexOfProperty(path.last().toUtf8().constData());
+ if (idx == -1) return; // Value type property does not exist
+
+ QMetaProperty vtProp = typeObject->metaObject()->property(idx);
+
+ object = currentObject;
+ core = *property;
+ valueType.flags = QDeclarativePropertyCache::Data::flagsForProperty(vtProp);
+ valueType.valueTypeCoreIdx = idx;
+ valueType.valueTypePropType = vtProp.userType();
+
+ return;
+ } else {
+ if (!(property->flags & QDeclarativePropertyCache::Data::IsQObjectDerived))
+ return; // Not an object property
+
+ void *args[] = { &currentObject, 0 };
+ QMetaObject::metacall(currentObject, QMetaObject::ReadProperty, property->coreIndex, args);
+ if (!currentObject) return; // No value
+
+ }
+ }
+
+ }
+
+ const QString &terminal = path.last();
+
+ if (terminal.count() >= 3 &&
+ terminal.at(0) == QLatin1Char('o') &&
+ terminal.at(1) == QLatin1Char('n') &&
+ terminal.at(2).isUpper()) {
+
+ QString signalName = terminal.mid(2);
+ signalName[0] = signalName.at(0).toLower();
+
+ QMetaMethod method = QDeclarativeCompiler::findSignalByName(currentObject->metaObject(), signalName.toLatin1().constData());
+ if (method.signature()) {
+ object = currentObject;
+ core.load(method);
+ return;
+ }
+ }
+
+ // Property
+ QDeclarativePropertyCache::Data local;
+ QDeclarativePropertyCache::Data *property =
+ QDeclarativePropertyCache::property(engine, currentObject, terminal, local);
+ if (property && !(property->flags & QDeclarativePropertyCache::Data::IsFunction)) {
+ object = currentObject;
+ core = *property;
+ }
+}
+
+/*!
+ Create a copy of \a other.
+*/
+QDeclarativeProperty::QDeclarativeProperty(const QDeclarativeProperty &other)
+: d(new QDeclarativePropertyPrivate(*other.d))
+{
+ d->q = this;
+}
+
+/*!
+ \enum QDeclarativeProperty::PropertyTypeCategory
+
+ This enum specifies a category of QML property.
+
+ \value InvalidCategory The property is invalid, or is a signal property.
+ \value List The property is a QDeclarativeListProperty list property
+ \value Object The property is a QObject derived type pointer
+ \value Normal The property is a normal value property.
+ */
+
+/*!
+ \enum QDeclarativeProperty::Type
+
+ This enum specifies a type of QML property.
+
+ \value Invalid The property is invalid.
+ \value Property The property is a regular Qt property.
+ \value SignalProperty The property is a signal property.
+*/
+
+/*!
+ Returns the property category.
+*/
+QDeclarativeProperty::PropertyTypeCategory QDeclarativeProperty::propertyTypeCategory() const
+{
+ return d->propertyTypeCategory();
+}
+
+QDeclarativeProperty::PropertyTypeCategory
+QDeclarativePropertyPrivate::propertyTypeCategory() const
+{
+ uint type = q->type();
+
+ if (isValueType()) {
+ return QDeclarativeProperty::Normal;
+ } else if (type & QDeclarativeProperty::Property) {
+ int type = propertyType();
+ if (type == QVariant::Invalid)
+ return QDeclarativeProperty::InvalidCategory;
+ else if (QDeclarativeValueTypeFactory::isValueType((uint)type))
+ return QDeclarativeProperty::Normal;
+ else if (core.flags & QDeclarativePropertyCache::Data::IsQObjectDerived)
+ return QDeclarativeProperty::Object;
+ else if (core.flags & QDeclarativePropertyCache::Data::IsQList)
+ return QDeclarativeProperty::List;
+ else
+ return QDeclarativeProperty::Normal;
+ } else {
+ return QDeclarativeProperty::InvalidCategory;
+ }
+}
+
+/*!
+ Returns the type name of the property, or 0 if the property has no type
+ name.
+*/
+const char *QDeclarativeProperty::propertyTypeName() const
+{
+ if (d->isValueType()) {
+
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(d->context);
+ QDeclarativeValueType *valueType = 0;
+ if (ep) valueType = ep->valueTypes[d->core.propType];
+ else valueType = QDeclarativeValueTypeFactory::valueType(d->core.propType);
+ Q_ASSERT(valueType);
+
+ const char *rv = valueType->metaObject()->property(d->valueType.valueTypeCoreIdx).typeName();
+
+ if (!ep) delete valueType;
+
+ return rv;
+ } else if (d->object && type() & Property && d->core.isValid()) {
+ return d->object->metaObject()->property(d->core.coreIndex).typeName();
+ } else {
+ return 0;
+ }
+}
+
+/*!
+ Returns true if \a other and this QDeclarativeProperty represent the same
+ property.
+*/
+bool QDeclarativeProperty::operator==(const QDeclarativeProperty &other) const
+{
+ // category is intentially omitted here as it is generated
+ // from the other members
+ return d->object == other.d->object &&
+ d->core == other.d->core &&
+ d->valueType == other.d->valueType;
+}
+
+/*!
+ Returns the QVariant type of the property, or QVariant::Invalid if the
+ property has no QVariant type.
+*/
+int QDeclarativeProperty::propertyType() const
+{
+ return d->propertyType();
+}
+
+bool QDeclarativePropertyPrivate::isValueType() const
+{
+ return valueType.valueTypeCoreIdx != -1;
+}
+
+int QDeclarativePropertyPrivate::propertyType() const
+{
+ uint type = q->type();
+ if (isValueType()) {
+ return valueType.valueTypePropType;
+ } else if (type & QDeclarativeProperty::Property) {
+ if (core.propType == (int)QVariant::LastType)
+ return qMetaTypeId<QVariant>();
+ else
+ return core.propType;
+ } else {
+ return QVariant::Invalid;
+ }
+}
+
+/*!
+ Returns the type of the property.
+*/
+QDeclarativeProperty::Type QDeclarativeProperty::type() const
+{
+ if (d->core.flags & QDeclarativePropertyCache::Data::IsFunction)
+ return SignalProperty;
+ else if (d->core.isValid())
+ return Property;
+ else
+ return Invalid;
+}
+
+/*!
+ Returns true if this QDeclarativeProperty represents a regular Qt property.
+*/
+bool QDeclarativeProperty::isProperty() const
+{
+ return type() & Property;
+}
+
+/*!
+ Returns true if this QDeclarativeProperty represents a QML signal property.
+*/
+bool QDeclarativeProperty::isSignalProperty() const
+{
+ return type() & SignalProperty;
+}
+
+/*!
+ Returns the QDeclarativeProperty's QObject.
+*/
+QObject *QDeclarativeProperty::object() const
+{
+ return d->object;
+}
+
+/*!
+ Assign \a other to this QDeclarativeProperty.
+*/
+QDeclarativeProperty &QDeclarativeProperty::operator=(const QDeclarativeProperty &other)
+{
+ d->context = other.d->context;
+ d->engine = other.d->engine;
+ d->object = other.d->object;
+
+ d->isNameCached = other.d->isNameCached;
+ d->core = other.d->core;
+ d->nameCache = other.d->nameCache;
+
+ d->valueType = other.d->valueType;
+
+ return *this;
+}
+
+/*!
+ Returns true if the property is writable, otherwise false.
+*/
+bool QDeclarativeProperty::isWritable() const
+{
+ QDeclarativeProperty::PropertyTypeCategory category = propertyTypeCategory();
+
+ if (!d->object)
+ return false;
+ if (category == List)
+ return true;
+ else if (type() & SignalProperty)
+ return false;
+ else if (d->core.isValid() && d->object)
+ return d->core.flags & QDeclarativePropertyCache::Data::IsWritable;
+ else
+ return false;
+}
+
+/*!
+ Returns true if the property is designable, otherwise false.
+*/
+bool QDeclarativeProperty::isDesignable() const
+{
+ if (type() & Property && d->core.isValid() && d->object)
+ return d->object->metaObject()->property(d->core.coreIndex).isDesignable();
+ else
+ return false;
+}
+
+/*!
+ Returns true if the property is resettable, otherwise false.
+*/
+bool QDeclarativeProperty::isResettable() const
+{
+ if (type() & Property && d->core.isValid() && d->object)
+ return d->core.flags & QDeclarativePropertyCache::Data::IsResettable;
+ else
+ return false;
+}
+
+/*!
+ Returns true if the QDeclarativeProperty refers to a valid property, otherwise
+ false.
+*/
+bool QDeclarativeProperty::isValid() const
+{
+ return type() != Invalid;
+}
+
+/*!
+ Return the name of this QML property.
+*/
+QString QDeclarativeProperty::name() const
+{
+ if (!d->isNameCached) {
+ // ###
+ if (!d->object) {
+ } else if (d->isValueType()) {
+ QString rv = d->core.name(d->object) + QLatin1Char('.');
+
+ QDeclarativeEnginePrivate *ep = d->engine?QDeclarativeEnginePrivate::get(d->engine):0;
+ QDeclarativeValueType *valueType = 0;
+ if (ep) valueType = ep->valueTypes[d->core.propType];
+ else valueType = QDeclarativeValueTypeFactory::valueType(d->core.propType);
+ Q_ASSERT(valueType);
+
+ rv += QString::fromUtf8(valueType->metaObject()->property(d->valueType.valueTypeCoreIdx).name());
+
+ if (!ep) delete valueType;
+
+ d->nameCache = rv;
+ } else if (type() & SignalProperty) {
+ QString name = QLatin1String("on") + d->core.name(d->object);
+ name[2] = name.at(2).toUpper();
+ d->nameCache = name;
+ } else {
+ d->nameCache = d->core.name(d->object);
+ }
+ d->isNameCached = true;
+ }
+
+ return d->nameCache;
+}
+
+/*!
+ Returns the \l{QMetaProperty} {Qt property} associated with
+ this QML property.
+ */
+QMetaProperty QDeclarativeProperty::property() const
+{
+ if (type() & Property && d->core.isValid() && d->object)
+ return d->object->metaObject()->property(d->core.coreIndex);
+ else
+ return QMetaProperty();
+}
+
+/*!
+ Return the QMetaMethod for this property if it is a SignalProperty,
+ otherwise returns an invalid QMetaMethod.
+*/
+QMetaMethod QDeclarativeProperty::method() const
+{
+ if (type() & SignalProperty && d->object)
+ return d->object->metaObject()->method(d->core.coreIndex);
+ else
+ return QMetaMethod();
+}
+
+
+/*!
+ Returns the binding associated with this property, or 0 if no binding
+ exists.
+*/
+QDeclarativeAbstractBinding *
+QDeclarativePropertyPrivate::binding(const QDeclarativeProperty &that)
+{
+ if (!that.isProperty() || !that.d->object)
+ return 0;
+
+ QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(that.d->object);
+ if (!data)
+ return 0;
+
+ if (!data->hasBindingBit(that.d->core.coreIndex))
+ return 0;
+
+ QDeclarativeAbstractBinding *binding = data->bindings;
+ while (binding) {
+ // ### This wont work for value types
+ if (binding->propertyIndex() == that.d->core.coreIndex)
+ return binding;
+ binding = binding->m_nextBinding;
+ }
+ return 0;
+}
+
+/*!
+ Set the binding associated with this property to \a newBinding. Returns
+ the existing binding (if any), otherwise 0.
+
+ \a newBinding will be enabled, and the returned binding (if any) will be
+ disabled.
+
+ Ownership of \a newBinding transfers to QML. Ownership of the return value
+ is assumed by the caller.
+
+ \a flags is passed through to the binding and is used for the initial update (when
+ the binding sets the intial value, it will use these flags for the write).
+*/
+QDeclarativeAbstractBinding *
+QDeclarativePropertyPrivate::setBinding(const QDeclarativeProperty &that,
+ QDeclarativeAbstractBinding *newBinding,
+ WriteFlags flags)
+{
+ if (!that.isProperty() || !that.d->object) {
+ if (newBinding)
+ newBinding->destroy();
+ return 0;
+ }
+
+ return that.d->setBinding(that.d->object, that.d->core, newBinding, flags);
+}
+
+QDeclarativeAbstractBinding *
+QDeclarativePropertyPrivate::setBinding(QObject *object, const QDeclarativePropertyCache::Data &core,
+ QDeclarativeAbstractBinding *newBinding, WriteFlags flags)
+{
+ QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(object, 0 != newBinding);
+
+ if (data && data->hasBindingBit(core.coreIndex)) {
+ QDeclarativeAbstractBinding *binding = data->bindings;
+ while (binding) {
+ // ### This wont work for value types
+ if (binding->propertyIndex() == core.coreIndex) {
+ binding->setEnabled(false);
+
+ if (newBinding)
+ newBinding->setEnabled(true, flags);
+
+ return binding; // ### QDeclarativeAbstractBinding;
+ }
+
+ binding = binding->m_nextBinding;
+ }
+ }
+
+ if (newBinding)
+ newBinding->setEnabled(true, flags);
+
+ return 0;
+}
+
+/*!
+ Returns the expression associated with this signal property, or 0 if no
+ signal expression exists.
+*/
+QDeclarativeExpression *
+QDeclarativePropertyPrivate::signalExpression(const QDeclarativeProperty &that)
+{
+ if (!(that.type() & QDeclarativeProperty::SignalProperty))
+ return 0;
+
+ const QObjectList &children = that.d->object->children();
+
+ for (int ii = 0; ii < children.count(); ++ii) {
+ QObject *child = children.at(ii);
+
+ QDeclarativeBoundSignal *signal = QDeclarativeBoundSignal::cast(child);
+ if (signal && signal->index() == that.index())
+ return signal->expression();
+ }
+
+ return 0;
+}
+
+/*!
+ Set the signal expression associated with this signal property to \a expr.
+ Returns the existing signal expression (if any), otherwise 0.
+
+ Ownership of \a expr transfers to QML. Ownership of the return value is
+ assumed by the caller.
+*/
+QDeclarativeExpression *
+QDeclarativePropertyPrivate::setSignalExpression(const QDeclarativeProperty &that,
+ QDeclarativeExpression *expr)
+{
+ if (!(that.type() & QDeclarativeProperty::SignalProperty)) {
+ delete expr;
+ return 0;
+ }
+
+ const QObjectList &children = that.d->object->children();
+
+ for (int ii = 0; ii < children.count(); ++ii) {
+ QObject *child = children.at(ii);
+
+ QDeclarativeBoundSignal *signal = QDeclarativeBoundSignal::cast(child);
+ if (signal && signal->index() == that.index())
+ return signal->setExpression(expr);
+ }
+
+ if (expr) {
+ QDeclarativeBoundSignal *signal = new QDeclarativeBoundSignal(that.d->object, that.method(), that.d->object);
+ return signal->setExpression(expr);
+ } else {
+ return 0;
+ }
+}
+
+/*!
+ Returns the property value.
+*/
+QVariant QDeclarativeProperty::read() const
+{
+ if (!d->object)
+ return QVariant();
+
+ if (type() & SignalProperty) {
+
+ return QVariant();
+
+ } else if (type() & Property) {
+
+ return d->readValueProperty();
+
+ }
+ return QVariant();
+}
+
+/*!
+Return the \a name property value of \a object. This method is equivalent to:
+\code
+ QDeclarativeProperty p(object, name);
+ p.read();
+\endcode
+*/
+QVariant QDeclarativeProperty::read(QObject *object, const QString &name)
+{
+ QDeclarativeProperty p(object, name);
+ return p.read();
+}
+
+/*!
+ Return the \a name property value of \a object using the
+ \l{QDeclarativeContext} {context} \a ctxt. This method is
+ equivalent to:
+
+ \code
+ QDeclarativeProperty p(object, name, context);
+ p.read();
+ \endcode
+*/
+QVariant QDeclarativeProperty::read(QObject *object, const QString &name, QDeclarativeContext *ctxt)
+{
+ QDeclarativeProperty p(object, name, ctxt);
+ return p.read();
+}
+
+/*!
+
+ Return the \a name property value of \a object using the environment
+ for instantiating QML components that is provided by \a engine. .
+ This method is equivalent to:
+
+ \code
+ QDeclarativeProperty p(object, name, engine);
+ p.read();
+ \endcode
+*/
+QVariant QDeclarativeProperty::read(QObject *object, const QString &name, QDeclarativeEngine *engine)
+{
+ QDeclarativeProperty p(object, name, engine);
+ return p.read();
+}
+
+QVariant QDeclarativePropertyPrivate::readValueProperty()
+{
+ if (isValueType()) {
+
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(context);
+ QDeclarativeValueType *valueType = 0;
+ if (ep) valueType = ep->valueTypes[core.propType];
+ else valueType = QDeclarativeValueTypeFactory::valueType(core.propType);
+ Q_ASSERT(valueType);
+
+ valueType->read(object, core.coreIndex);
+
+ QVariant rv =
+ valueType->metaObject()->property(this->valueType.valueTypeCoreIdx).read(valueType);
+
+ if (!ep) delete valueType;
+ return rv;
+
+ } else if (core.flags & QDeclarativePropertyCache::Data::IsQList) {
+
+ QDeclarativeListProperty<QObject> prop;
+ void *args[] = { &prop, 0 };
+ QMetaObject::metacall(object, QMetaObject::ReadProperty, core.coreIndex, args);
+ return QVariant::fromValue(QDeclarativeListReferencePrivate::init(prop, core.propType, engine));
+
+ } else if (core.flags & QDeclarativePropertyCache::Data::IsQObjectDerived) {
+
+ QObject *rv = 0;
+ void *args[] = { &rv, 0 };
+ QMetaObject::metacall(object, QMetaObject::ReadProperty, core.coreIndex, args);
+ return QVariant::fromValue(rv);
+
+ } else {
+
+ return object->metaObject()->property(core.coreIndex).read(object.data());
+
+ }
+}
+
+//writeEnumProperty MIRRORS the relelvant bit of QMetaProperty::write AND MUST BE KEPT IN SYNC!
+bool QDeclarativePropertyPrivate::writeEnumProperty(const QMetaProperty &prop, int idx, QObject *object, const QVariant &value, int flags)
+{
+ if (!object || !prop.isWritable())
+ return false;
+
+ QVariant v = value;
+ if (prop.isEnumType()) {
+ QMetaEnum menum = prop.enumerator();
+ if (v.userType() == QVariant::String
+#ifdef QT3_SUPPORT
+ || v.userType() == QVariant::CString
+#endif
+ ) {
+ if (prop.isFlagType())
+ v = QVariant(menum.keysToValue(value.toByteArray()));
+ else
+ v = QVariant(menum.keyToValue(value.toByteArray()));
+ } else if (v.userType() != QVariant::Int && v.userType() != QVariant::UInt) {
+ int enumMetaTypeId = QMetaType::type(QByteArray(menum.scope()) + "::" + menum.name());
+ if ((enumMetaTypeId == 0) || (v.userType() != enumMetaTypeId) || !v.constData())
+ return false;
+ v = QVariant(*reinterpret_cast<const int *>(v.constData()));
+ }
+ v.convert(QVariant::Int);
+ }
+
+ // the status variable is changed by qt_metacall to indicate what it did
+ // this feature is currently only used by QtDBus and should not be depended
+ // upon. Don't change it without looking into QDBusAbstractInterface first
+ // -1 (unchanged): normal qt_metacall, result stored in argv[0]
+ // changed: result stored directly in value, return the value of status
+ int status = -1;
+ void *argv[] = { v.data(), &v, &status, &flags };
+ QMetaObject::metacall(object, QMetaObject::WriteProperty, idx, argv);
+ return status;
+}
+
+bool QDeclarativePropertyPrivate::writeValueProperty(const QVariant &value, WriteFlags flags)
+{
+ // Remove any existing bindings on this property
+ if (!(flags & DontRemoveBinding)) {
+ QDeclarativeAbstractBinding *binding = setBinding(*q, 0);
+ if (binding) binding->destroy();
+ }
+
+ bool rv = false;
+ if (isValueType()) {
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(context);
+
+ QDeclarativeValueType *writeBack = 0;
+ if (ep) {
+ writeBack = ep->valueTypes[core.propType];
+ } else {
+ writeBack = QDeclarativeValueTypeFactory::valueType(core.propType);
+ }
+
+ writeBack->read(object, core.coreIndex);
+
+ QDeclarativePropertyCache::Data data = core;
+ data.flags = valueType.flags;
+ data.coreIndex = valueType.valueTypeCoreIdx;
+ data.propType = valueType.valueTypePropType;
+ rv = write(writeBack, data, value, context, flags);
+
+ writeBack->write(object, core.coreIndex, flags);
+ if (!ep) delete writeBack;
+
+ } else {
+
+ rv = write(object, core, value, context, flags);
+
+ }
+
+ return rv;
+}
+
+bool QDeclarativePropertyPrivate::write(QObject *object, const QDeclarativePropertyCache::Data &property,
+ const QVariant &value, QDeclarativeContext *context,
+ WriteFlags flags)
+{
+ int coreIdx = property.coreIndex;
+ int status = -1; //for dbus
+
+ if (property.flags & QDeclarativePropertyCache::Data::IsEnumType) {
+ QMetaProperty prop = object->metaObject()->property(property.coreIndex);
+ QVariant v = value;
+ // Enum values come through the script engine as doubles
+ if (value.userType() == QVariant::Double) {
+ double integral;
+ double fractional = modf(value.toDouble(), &integral);
+ if (qFuzzyIsNull(fractional))
+ v.convert(QVariant::Int);
+ }
+ return writeEnumProperty(prop, coreIdx, object, v, flags);
+ }
+
+ int propertyType = property.propType;
+ int variantType = value.userType();
+
+ QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(context);
+
+ if (propertyType == QVariant::Url) {
+
+ QUrl u;
+ bool found = false;
+ if (variantType == QVariant::Url) {
+ u = value.toUrl();
+ found = true;
+ } else if (variantType == QVariant::ByteArray) {
+ u = QUrl(QString::fromUtf8(value.toByteArray()));
+ found = true;
+ } else if (variantType == QVariant::String) {
+ u = QUrl(value.toString());
+ found = true;
+ }
+
+ if (!found)
+ return false;
+
+ if (context && u.isRelative() && !u.isEmpty())
+ u = context->resolvedUrl(u);
+ int status = -1;
+ void *argv[] = { &u, 0, &status, &flags };
+ QMetaObject::metacall(object, QMetaObject::WriteProperty, coreIdx, argv);
+
+ } else if (variantType == propertyType) {
+
+ void *a[] = { (void *)value.constData(), 0, &status, &flags };
+ QMetaObject::metacall(object, QMetaObject::WriteProperty, coreIdx, a);
+
+ } else if (qMetaTypeId<QVariant>() == propertyType) {
+
+ void *a[] = { (void *)&value, 0, &status, &flags };
+ QMetaObject::metacall(object, QMetaObject::WriteProperty, coreIdx, a);
+
+ } else if (property.flags & QDeclarativePropertyCache::Data::IsQObjectDerived) {
+
+ const QMetaObject *valMo = rawMetaObjectForType(enginePriv, value.userType());
+
+ if (!valMo)
+ return false;
+
+ QObject *o = *(QObject **)value.constData();
+ const QMetaObject *propMo = rawMetaObjectForType(enginePriv, propertyType);
+
+ if (o) valMo = o->metaObject();
+
+ if (canConvert(valMo, propMo)) {
+ void *args[] = { &o, 0, &status, &flags };
+ QMetaObject::metacall(object, QMetaObject::WriteProperty, coreIdx,
+ args);
+ } else if (!o && canConvert(propMo, valMo)) {
+ // In the case of a null QObject, we assign the null if there is
+ // any change that the null variant type could be up or down cast to
+ // the property type.
+ void *args[] = { &o, 0, &status, &flags };
+ QMetaObject::metacall(object, QMetaObject::WriteProperty, coreIdx,
+ args);
+ } else {
+ return false;
+ }
+
+ } else if (property.flags & QDeclarativePropertyCache::Data::IsQList) {
+
+ const QMetaObject *listType = 0;
+ if (enginePriv) {
+ listType = enginePriv->rawMetaObjectForType(enginePriv->listType(property.propType));
+ } else {
+ QDeclarativeType *type = QDeclarativeMetaType::qmlType(QDeclarativeMetaType::listType(property.propType));
+ if (!type) return false;
+ listType = type->baseMetaObject();
+ }
+ if (!listType) return false;
+
+ QDeclarativeListProperty<void> prop;
+ void *args[] = { &prop, 0 };
+ QMetaObject::metacall(object, QMetaObject::ReadProperty, coreIdx, args);
+
+ if (!prop.clear) return false;
+
+ prop.clear(&prop);
+
+ if (value.userType() == qMetaTypeId<QList<QObject *> >()) {
+ const QList<QObject *> &list = qvariant_cast<QList<QObject *> >(value);
+
+ for (int ii = 0; ii < list.count(); ++ii) {
+ QObject *o = list.at(ii);
+ if (o && !canConvert(o->metaObject(), listType))
+ o = 0;
+ prop.append(&prop, (void *)o);
+ }
+ } else {
+ QObject *o = enginePriv?enginePriv->toQObject(value):QDeclarativeMetaType::toQObject(value);
+ if (o && !canConvert(o->metaObject(), listType))
+ o = 0;
+ prop.append(&prop, (void *)o);
+ }
+
+ } else {
+ Q_ASSERT(variantType != propertyType);
+
+ QVariant v = value;
+ if (v.convert((QVariant::Type)propertyType)) {
+ void *a[] = { (void *)v.constData(), 0, &status, &flags};
+ QMetaObject::metacall(object, QMetaObject::WriteProperty, coreIdx, a);
+ } else if ((uint)propertyType >= QVariant::UserType && variantType == QVariant::String) {
+ QDeclarativeMetaType::StringConverter con = QDeclarativeMetaType::customStringConverter(propertyType);
+ if (!con)
+ return false;
+
+ QVariant v = con(value.toString());
+ if (v.userType() == propertyType) {
+ void *a[] = { (void *)v.constData(), 0, &status, &flags};
+ QMetaObject::metacall(object, QMetaObject::WriteProperty, coreIdx, a);
+ }
+ } else if (variantType == QVariant::String) {
+ bool ok = false;
+ QVariant v = QDeclarativeStringConverters::variantFromString(value.toString(), propertyType, &ok);
+ if (!ok)
+ return false;
+
+ void *a[] = { (void *)v.constData(), 0, &status, &flags};
+ QMetaObject::metacall(object, QMetaObject::WriteProperty, coreIdx, a);
+ } else {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+const QMetaObject *QDeclarativePropertyPrivate::rawMetaObjectForType(QDeclarativeEnginePrivate *engine, int userType)
+{
+ if (engine) {
+ return engine->rawMetaObjectForType(userType);
+ } else {
+ QDeclarativeType *type = QDeclarativeMetaType::qmlType(userType);
+ return type?type->baseMetaObject():0;
+ }
+}
+
+/*!
+ Sets the property value to \a value and returns true.
+ Returns false if the property can't be set because the
+ \a value is the wrong type, for example.
+ */
+bool QDeclarativeProperty::write(const QVariant &value) const
+{
+ return QDeclarativePropertyPrivate::write(*this, value, 0);
+}
+
+/*!
+ Writes \a value to the \a name property of \a object. This method
+ is equivalent to:
+
+ \code
+ QDeclarativeProperty p(object, name);
+ p.write(value);
+ \endcode
+*/
+bool QDeclarativeProperty::write(QObject *object, const QString &name, const QVariant &value)
+{
+ QDeclarativeProperty p(object, name);
+ return p.write(value);
+}
+
+/*!
+ Writes \a value to the \a name property of \a object using the
+ \l{QDeclarativeContext} {context} \a ctxt. This method is
+ equivalent to:
+
+ \code
+ QDeclarativeProperty p(object, name, ctxt);
+ p.write(value);
+ \endcode
+*/
+bool QDeclarativeProperty::write(QObject *object,
+ const QString &name,
+ const QVariant &value,
+ QDeclarativeContext *ctxt)
+{
+ QDeclarativeProperty p(object, name, ctxt);
+ return p.write(value);
+}
+
+/*!
+
+ Writes \a value to the \a name property of \a object using the
+ environment for instantiating QML components that is provided by
+ \a engine. This method is equivalent to:
+
+ \code
+ QDeclarativeProperty p(object, name, engine);
+ p.write(value);
+ \endcode
+*/
+bool QDeclarativeProperty::write(QObject *object, const QString &name, const QVariant &value,
+ QDeclarativeEngine *engine)
+{
+ QDeclarativeProperty p(object, name, engine);
+ return p.write(value);
+}
+
+/*!
+ Resets the property and returns true if the property is
+ resettable. If the property is not resettable, nothing happens
+ and false is returned.
+*/
+bool QDeclarativeProperty::reset() const
+{
+ if (isResettable()) {
+ void *args[] = { 0 };
+ QMetaObject::metacall(d->object, QMetaObject::ResetProperty, d->core.coreIndex, args);
+ return true;
+ } else {
+ return false;
+ }
+}
+
+bool QDeclarativePropertyPrivate::write(const QDeclarativeProperty &that,
+ const QVariant &value, WriteFlags flags)
+{
+ if (that.d->object && that.type() & QDeclarativeProperty::Property &&
+ that.d->core.isValid() && that.isWritable())
+ return that.d->writeValueProperty(value, flags);
+ else
+ return false;
+}
+
+/*!
+ Returns true if the property has a change notifier signal, otherwise false.
+*/
+bool QDeclarativeProperty::hasNotifySignal() const
+{
+ if (type() & Property && d->object) {
+ return d->object->metaObject()->property(d->core.coreIndex).hasNotifySignal();
+ }
+ return false;
+}
+
+/*!
+ Returns true if the property needs a change notifier signal for bindings
+ to remain upto date, false otherwise.
+
+ Some properties, such as attached properties or those whose value never
+ changes, do not require a change notifier.
+*/
+bool QDeclarativeProperty::needsNotifySignal() const
+{
+ return type() & Property && !property().isConstant();
+}
+
+/*!
+ Connects the property's change notifier signal to the
+ specified \a method of the \a dest object and returns
+ true. Returns false if this metaproperty does not
+ represent a regular Qt property or if it has no
+ change notifier signal, or if the \a dest object does
+ not have the specified \a method.
+*/
+bool QDeclarativeProperty::connectNotifySignal(QObject *dest, int method) const
+{
+ if (!(type() & Property) || !d->object)
+ return false;
+
+ QMetaProperty prop = d->object->metaObject()->property(d->core.coreIndex);
+ if (prop.hasNotifySignal()) {
+ return QMetaObject::connect(d->object, prop.notifySignalIndex(), dest, method, Qt::DirectConnection);
+ } else {
+ return false;
+ }
+}
+
+/*!
+ Connects the property's change notifier signal to the
+ specified \a slot of the \a dest object and returns
+ true. Returns false if this metaproperty does not
+ represent a regular Qt property or if it has no
+ change notifier signal, or if the \a dest object does
+ not have the specified \a slot.
+*/
+bool QDeclarativeProperty::connectNotifySignal(QObject *dest, const char *slot) const
+{
+ if (!(type() & Property) || !d->object)
+ return false;
+
+ QMetaProperty prop = d->object->metaObject()->property(d->core.coreIndex);
+ if (prop.hasNotifySignal()) {
+ QByteArray signal(QByteArray("2") + prop.notifySignal().signature());
+ return QObject::connect(d->object, signal.constData(), dest, slot);
+ } else {
+ return false;
+ }
+}
+
+/*!
+ Return the Qt metaobject index of the property.
+*/
+int QDeclarativeProperty::index() const
+{
+ return d->core.coreIndex;
+}
+
+int QDeclarativePropertyPrivate::valueTypeCoreIndex(const QDeclarativeProperty &that)
+{
+ return that.d->valueType.valueTypeCoreIdx;
+}
+
+struct SerializedData {
+ bool isValueType;
+ QDeclarativePropertyCache::Data core;
+};
+
+struct ValueTypeSerializedData : public SerializedData {
+ QDeclarativePropertyCache::ValueTypeData valueType;
+};
+
+QByteArray QDeclarativePropertyPrivate::saveValueType(const QMetaObject *metaObject, int index,
+ const QMetaObject *subObject, int subIndex)
+{
+ QMetaProperty prop = metaObject->property(index);
+ QMetaProperty subProp = subObject->property(subIndex);
+
+ ValueTypeSerializedData sd;
+ sd.isValueType = true;
+ sd.core.load(metaObject->property(index));
+ sd.valueType.flags = QDeclarativePropertyCache::Data::flagsForProperty(subProp);
+ sd.valueType.valueTypeCoreIdx = subIndex;
+ sd.valueType.valueTypePropType = subProp.userType();
+
+ QByteArray rv((const char *)&sd, sizeof(sd));
+
+ return rv;
+}
+
+QByteArray QDeclarativePropertyPrivate::saveProperty(const QMetaObject *metaObject, int index)
+{
+ SerializedData sd;
+ sd.isValueType = false;
+ sd.core.load(metaObject->property(index));
+
+ QByteArray rv((const char *)&sd, sizeof(sd));
+ return rv;
+}
+
+QDeclarativeProperty
+QDeclarativePropertyPrivate::restore(const QByteArray &data, QObject *object, QDeclarativeContext *ctxt)
+{
+ QDeclarativeProperty prop;
+
+ if (data.isEmpty())
+ return prop;
+
+ prop.d->object = object;
+ prop.d->context = ctxt;
+ prop.d->engine = ctxt?ctxt->engine():0;
+
+ const SerializedData *sd = (const SerializedData *)data.constData();
+ if (sd->isValueType) {
+ const ValueTypeSerializedData *vt = (const ValueTypeSerializedData *)sd;
+ prop.d->core = vt->core;
+ prop.d->valueType = vt->valueType;
+ } else {
+ prop.d->core = sd->core;
+ }
+
+ return prop;
+}
+
+/*!
+ Returns true if lhs and rhs refer to the same metaobject data
+*/
+bool QDeclarativePropertyPrivate::equal(const QMetaObject *lhs, const QMetaObject *rhs)
+{
+ return lhs == rhs || (1 && lhs && rhs && lhs->d.stringdata == rhs->d.stringdata);
+}
+
+/*!
+ Returns true if from inherits to.
+*/
+bool QDeclarativePropertyPrivate::canConvert(const QMetaObject *from, const QMetaObject *to)
+{
+ if (from && to == &QObject::staticMetaObject)
+ return true;
+
+ while (from) {
+ if (equal(from, to))
+ return true;
+ from = from->superClass();
+ }
+
+ return false;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeproperty.h b/src/declarative/qml/qdeclarativeproperty.h
new file mode 100644
index 0000000000..73bccf3cad
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeproperty.h
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEPROPERTY_H
+#define QDECLARATIVEPROPERTY_H
+
+#include <QtCore/qmetaobject.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QObject;
+class QVariant;
+class QDeclarativeContext;
+class QDeclarativeEngine;
+
+class QDeclarativePropertyPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeProperty
+{
+public:
+ enum PropertyTypeCategory {
+ InvalidCategory,
+ List,
+ Object,
+ Normal
+ };
+
+ enum Type {
+ Invalid,
+ Property,
+ SignalProperty
+ };
+
+ QDeclarativeProperty();
+ ~QDeclarativeProperty();
+
+ QDeclarativeProperty(QObject *);
+ QDeclarativeProperty(QObject *, QDeclarativeContext *);
+ QDeclarativeProperty(QObject *, QDeclarativeEngine *);
+
+ QDeclarativeProperty(QObject *, const QString &);
+ QDeclarativeProperty(QObject *, const QString &, QDeclarativeContext *);
+ QDeclarativeProperty(QObject *, const QString &, QDeclarativeEngine *);
+
+ QDeclarativeProperty(const QDeclarativeProperty &);
+ QDeclarativeProperty &operator=(const QDeclarativeProperty &);
+
+ bool operator==(const QDeclarativeProperty &) const;
+
+ Type type() const;
+ bool isValid() const;
+ bool isProperty() const;
+ bool isSignalProperty() const;
+
+ int propertyType() const;
+ PropertyTypeCategory propertyTypeCategory() const;
+ const char *propertyTypeName() const;
+
+ QString name() const;
+
+ QVariant read() const;
+ static QVariant read(QObject *, const QString &);
+ static QVariant read(QObject *, const QString &, QDeclarativeContext *);
+ static QVariant read(QObject *, const QString &, QDeclarativeEngine *);
+
+ bool write(const QVariant &) const;
+ static bool write(QObject *, const QString &, const QVariant &);
+ static bool write(QObject *, const QString &, const QVariant &, QDeclarativeContext *);
+ static bool write(QObject *, const QString &, const QVariant &, QDeclarativeEngine *);
+
+ bool reset() const;
+
+ bool hasNotifySignal() const;
+ bool needsNotifySignal() const;
+ bool connectNotifySignal(QObject *dest, const char *slot) const;
+ bool connectNotifySignal(QObject *dest, int method) const;
+
+ bool isWritable() const;
+ bool isDesignable() const;
+ bool isResettable() const;
+ QObject *object() const;
+
+ int index() const;
+ QMetaProperty property() const;
+ QMetaMethod method() const;
+
+private:
+ friend class QDeclarativePropertyPrivate;
+ QDeclarativePropertyPrivate *d;
+};
+typedef QList<QDeclarativeProperty> QDeclarativeProperties;
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEPROPERTY_H
diff --git a/src/declarative/qml/qdeclarativeproperty_p.h b/src/declarative/qml/qdeclarativeproperty_p.h
new file mode 100644
index 0000000000..c31e2d376a
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeproperty_p.h
@@ -0,0 +1,142 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEPROPERTY_P_H
+#define QDECLARATIVEPROPERTY_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeproperty.h"
+
+#include "qdeclarativepropertycache_p.h"
+#include "qdeclarativeguard_p.h"
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeContext;
+class QDeclarativeEnginePrivate;
+class QDeclarativeExpression;
+class Q_DECLARATIVE_EXPORT QDeclarativePropertyPrivate
+{
+public:
+ enum WriteFlag { BypassInterceptor = 0x01, DontRemoveBinding = 0x02 };
+ Q_DECLARE_FLAGS(WriteFlags, WriteFlag)
+
+ QDeclarativePropertyPrivate()
+ : q(0), context(0), engine(0), object(0), isNameCached(false) {}
+
+
+ QDeclarativePropertyPrivate(const QDeclarativePropertyPrivate &other)
+ : q(0), context(other.context), engine(other.engine), object(other.object),
+ isNameCached(other.isNameCached),
+ core(other.core), nameCache(other.nameCache),
+ valueType(other.valueType) {}
+
+ QDeclarativeProperty *q;
+ QDeclarativeContext *context;
+ QDeclarativeEngine *engine;
+ QDeclarativeGuard<QObject> object;
+
+ bool isNameCached:1;
+ QDeclarativePropertyCache::Data core;
+ QString nameCache;
+
+ // Describes the "virtual" value-type sub-property.
+ QDeclarativePropertyCache::ValueTypeData valueType;
+
+ void initProperty(QObject *obj, const QString &name);
+ void initDefault(QObject *obj);
+
+ QMetaMethod findSignal(QObject *, const QString &);
+
+ bool isValueType() const;
+ int propertyType() const;
+ QDeclarativeProperty::PropertyTypeCategory propertyTypeCategory() const;
+
+ QVariant readValueProperty();
+ bool writeValueProperty(const QVariant &, WriteFlags);
+
+ static const QMetaObject *rawMetaObjectForType(QDeclarativeEnginePrivate *, int);
+ static bool writeEnumProperty(const QMetaProperty &prop, int idx, QObject *object,
+ const QVariant &value, int flags);
+ static bool write(QObject *, const QDeclarativePropertyCache::Data &, const QVariant &,
+ QDeclarativeContext *, WriteFlags flags = 0);
+ static QDeclarativeAbstractBinding *setBinding(QObject *, const QDeclarativePropertyCache::Data &,
+ QDeclarativeAbstractBinding *,
+ WriteFlags flags = DontRemoveBinding);
+
+ static QByteArray saveValueType(const QMetaObject *, int,
+ const QMetaObject *, int);
+ static QByteArray saveProperty(const QMetaObject *, int);
+ static QDeclarativeProperty restore(const QByteArray &, QObject *, QDeclarativeContext *);
+
+ static bool equal(const QMetaObject *, const QMetaObject *);
+ static bool canConvert(const QMetaObject *from, const QMetaObject *to);
+
+
+ // "Public" (to QML) methods
+ static QDeclarativeAbstractBinding *binding(const QDeclarativeProperty &that);
+ static QDeclarativeAbstractBinding *setBinding(const QDeclarativeProperty &that,
+ QDeclarativeAbstractBinding *,
+ WriteFlags flags = DontRemoveBinding);
+ static QDeclarativeExpression *signalExpression(const QDeclarativeProperty &that);
+ static QDeclarativeExpression *setSignalExpression(const QDeclarativeProperty &that,
+ QDeclarativeExpression *) ;
+ static bool write(const QDeclarativeProperty &that, const QVariant &, WriteFlags);
+ static int valueTypeCoreIndex(const QDeclarativeProperty &that);
+};
+
+Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativePropertyPrivate::WriteFlags)
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEPROPERTY_P_H
diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp
new file mode 100644
index 0000000000..fea59e55c8
--- /dev/null
+++ b/src/declarative/qml/qdeclarativepropertycache.cpp
@@ -0,0 +1,423 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativepropertycache_p.h"
+
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativebinding_p.h"
+#include <QtCore/qdebug.h>
+
+Q_DECLARE_METATYPE(QScriptValue);
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativePropertyCache::Data::Flags QDeclarativePropertyCache::Data::flagsForProperty(const QMetaProperty &p, QDeclarativeEngine *engine)
+{
+ int propType = p.userType();
+
+ Flags flags;
+
+ if (p.isConstant())
+ flags |= Data::IsConstant;
+ if (p.isWritable())
+ flags |= Data::IsWritable;
+ if (p.isResettable())
+ flags |= Data::IsResettable;
+
+ if (propType == qMetaTypeId<QDeclarativeBinding *>()) {
+ flags |= Data::IsQmlBinding;
+ } else if (propType == qMetaTypeId<QScriptValue>()) {
+ flags |= Data::IsQScriptValue;
+ } else if (p.isEnumType()) {
+ flags |= Data::IsEnumType;
+ } else {
+ QDeclarativeMetaType::TypeCategory cat = engine ? QDeclarativeEnginePrivate::get(engine)->typeCategory(propType)
+ : QDeclarativeMetaType::typeCategory(propType);
+ if (cat == QDeclarativeMetaType::Object)
+ flags |= Data::IsQObjectDerived;
+ else if (cat == QDeclarativeMetaType::List)
+ flags |= Data::IsQList;
+ }
+
+ return flags;
+}
+
+void QDeclarativePropertyCache::Data::load(const QMetaProperty &p, QDeclarativeEngine *engine)
+{
+ propType = p.userType();
+ if (QVariant::Type(propType) == QVariant::LastType)
+ propType = qMetaTypeId<QVariant>();
+ coreIndex = p.propertyIndex();
+ notifyIndex = p.notifySignalIndex();
+ flags = flagsForProperty(p, engine);
+}
+
+void QDeclarativePropertyCache::Data::load(const QMetaMethod &m)
+{
+ coreIndex = m.methodIndex();
+ flags |= Data::IsFunction;
+ propType = QVariant::Invalid;
+
+ const char *returnType = m.typeName();
+ if (returnType)
+ propType = QMetaType::type(returnType);
+
+ QList<QByteArray> params = m.parameterTypes();
+ if (!params.isEmpty())
+ flags |= Data::HasArguments;
+}
+
+
+QDeclarativePropertyCache::QDeclarativePropertyCache(QDeclarativeEngine *e)
+: QDeclarativeCleanup(e), engine(e)
+{
+}
+
+QDeclarativePropertyCache::~QDeclarativePropertyCache()
+{
+ clear();
+}
+
+void QDeclarativePropertyCache::clear()
+{
+ for (int ii = 0; ii < indexCache.count(); ++ii)
+ indexCache.at(ii)->release();
+
+ for (StringCache::ConstIterator iter = stringCache.begin();
+ iter != stringCache.end(); ++iter)
+ (*iter)->release();
+
+ for (IdentifierCache::ConstIterator iter = identifierCache.begin();
+ iter != identifierCache.end(); ++iter)
+ (*iter)->release();
+
+ indexCache.clear();
+ stringCache.clear();
+ identifierCache.clear();
+}
+
+QDeclarativePropertyCache::Data QDeclarativePropertyCache::create(const QMetaObject *metaObject,
+ const QString &property)
+{
+ Q_ASSERT(metaObject);
+
+ QDeclarativePropertyCache::Data rv;
+ int idx = metaObject->indexOfProperty(property.toUtf8());
+ if (idx != -1) {
+ rv.load(metaObject->property(idx));
+ return rv;
+ }
+
+ int methodCount = metaObject->methodCount();
+ for (int ii = methodCount - 1; ii >= 0; --ii) {
+ QMetaMethod m = metaObject->method(ii);
+ if (m.access() == QMetaMethod::Private)
+ continue;
+ QString methodName = QString::fromUtf8(m.signature());
+
+ int parenIdx = methodName.indexOf(QLatin1Char('('));
+ Q_ASSERT(parenIdx != -1);
+ QStringRef methodNameRef = methodName.leftRef(parenIdx);
+
+ if (methodNameRef == property) {
+ rv.load(m);
+ return rv;
+ }
+ }
+
+ return rv;
+}
+
+QDeclarativePropertyCache *QDeclarativePropertyCache::copy() const
+{
+ QDeclarativePropertyCache *cache = new QDeclarativePropertyCache(engine);
+ cache->indexCache = indexCache;
+ cache->stringCache = stringCache;
+ cache->identifierCache = identifierCache;
+
+ for (int ii = 0; ii < indexCache.count(); ++ii)
+ indexCache.at(ii)->addref();
+ for (StringCache::ConstIterator iter = stringCache.begin(); iter != stringCache.end(); ++iter)
+ (*iter)->addref();
+ for (IdentifierCache::ConstIterator iter = identifierCache.begin(); iter != identifierCache.end(); ++iter)
+ (*iter)->addref();
+
+ return cache;
+}
+
+void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaObject *metaObject,
+ Data::Flag propertyFlags, Data::Flag methodFlags)
+{
+ QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
+
+ int propCount = metaObject->propertyCount();
+ int propOffset = metaObject->propertyOffset();
+
+ indexCache.resize(propCount);
+ for (int ii = propOffset; ii < propCount; ++ii) {
+ QMetaProperty p = metaObject->property(ii);
+ QString propName = QString::fromUtf8(p.name());
+
+ RData *data = new RData;
+ data->identifier = enginePriv->objectClass->createPersistentIdentifier(propName);
+
+ data->load(p, engine);
+ data->flags |= propertyFlags;
+
+ indexCache[ii] = data;
+
+ if (stringCache.contains(propName)) {
+ stringCache[propName]->release();
+ identifierCache[data->identifier.identifier]->release();
+ }
+
+ stringCache.insert(propName, data);
+ identifierCache.insert(data->identifier.identifier, data);
+ data->addref();
+ data->addref();
+ }
+
+ int methodCount = metaObject->methodCount();
+ int methodOffset = metaObject->methodOffset();
+ for (int ii = methodOffset; ii < methodCount; ++ii) {
+ QMetaMethod m = metaObject->method(ii);
+ if (m.access() == QMetaMethod::Private)
+ continue;
+ QString methodName = QString::fromUtf8(m.signature());
+
+ int parenIdx = methodName.indexOf(QLatin1Char('('));
+ Q_ASSERT(parenIdx != -1);
+ methodName = methodName.left(parenIdx);
+
+ RData *data = new RData;
+ data->identifier = enginePriv->objectClass->createPersistentIdentifier(methodName);
+
+ if (stringCache.contains(methodName)) {
+ stringCache[methodName]->release();
+ identifierCache[data->identifier.identifier]->release();
+ }
+
+ data->load(m);
+ if (m.methodType() == QMetaMethod::Slot || m.methodType() == QMetaMethod::Method)
+ data->flags |= methodFlags;
+
+ stringCache.insert(methodName, data);
+ identifierCache.insert(data->identifier.identifier, data);
+ data->addref();
+ }
+}
+
+// ### Optimize - check engine for the parent meta object etc.
+QDeclarativePropertyCache *QDeclarativePropertyCache::create(QDeclarativeEngine *engine, const QMetaObject *metaObject)
+{
+ Q_ASSERT(engine);
+ Q_ASSERT(metaObject);
+
+ QDeclarativePropertyCache *cache = new QDeclarativePropertyCache(engine);
+ cache->update(engine, metaObject);
+ return cache;
+}
+
+void QDeclarativePropertyCache::update(QDeclarativeEngine *engine, const QMetaObject *metaObject)
+{
+ Q_ASSERT(engine);
+ Q_ASSERT(metaObject);
+ QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
+
+ clear();
+
+ // ### The properties/methods should probably be spliced on a per-metaobject basis
+ int propCount = metaObject->propertyCount();
+
+ indexCache.resize(propCount);
+ for (int ii = propCount - 1; ii >= 0; --ii) {
+ QMetaProperty p = metaObject->property(ii);
+ QString propName = QString::fromUtf8(p.name());
+
+ RData *data = new RData;
+ data->identifier = enginePriv->objectClass->createPersistentIdentifier(propName);
+
+ data->load(p, engine);
+
+ indexCache[ii] = data;
+
+ if (stringCache.contains(propName))
+ continue;
+
+ stringCache.insert(propName, data);
+ identifierCache.insert(data->identifier.identifier, data);
+ data->addref();
+ data->addref();
+ }
+
+ int methodCount = metaObject->methodCount();
+ for (int ii = methodCount - 1; ii >= 0; --ii) {
+ QMetaMethod m = metaObject->method(ii);
+ if (m.access() == QMetaMethod::Private)
+ continue;
+ QString methodName = QString::fromUtf8(m.signature());
+
+ int parenIdx = methodName.indexOf(QLatin1Char('('));
+ Q_ASSERT(parenIdx != -1);
+ methodName = methodName.left(parenIdx);
+
+ if (stringCache.contains(methodName))
+ continue;
+
+ RData *data = new RData;
+ data->identifier = enginePriv->objectClass->createPersistentIdentifier(methodName);
+
+ data->load(m);
+
+ stringCache.insert(methodName, data);
+ identifierCache.insert(data->identifier.identifier, data);
+ data->addref();
+ }
+}
+
+QDeclarativePropertyCache::Data *
+QDeclarativePropertyCache::property(int index) const
+{
+ if (index < 0 || index >= indexCache.count())
+ return 0;
+
+ return indexCache.at(index);
+}
+
+QDeclarativePropertyCache::Data *
+QDeclarativePropertyCache::property(const QString &str) const
+{
+ return stringCache.value(str);
+}
+
+QString QDeclarativePropertyCache::Data::name(QObject *object)
+{
+ if (!object)
+ return QString();
+
+ return name(object->metaObject());
+}
+
+QString QDeclarativePropertyCache::Data::name(const QMetaObject *metaObject)
+{
+ if (!metaObject || coreIndex == -1)
+ return QString();
+
+ if (flags & IsFunction) {
+ QMetaMethod m = metaObject->method(coreIndex);
+
+ QString name = QString::fromUtf8(m.signature());
+ int parenIdx = name.indexOf(QLatin1Char('('));
+ if (parenIdx != -1)
+ name = name.left(parenIdx);
+ return name;
+ } else {
+ QMetaProperty p = metaObject->property(coreIndex);
+ return QString::fromUtf8(p.name());
+ }
+}
+
+QStringList QDeclarativePropertyCache::propertyNames() const
+{
+ return stringCache.keys();
+}
+
+QDeclarativePropertyCache::Data *QDeclarativePropertyCache::property(QDeclarativeEngine *engine, QObject *obj,
+ const QScriptDeclarativeClass::Identifier &name, Data &local)
+{
+ QDeclarativePropertyCache::Data *rv = 0;
+
+ QDeclarativeEnginePrivate *enginePrivate = QDeclarativeEnginePrivate::get(engine);
+
+ QDeclarativePropertyCache *cache = 0;
+ QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(obj);
+ if (ddata && ddata->propertyCache && ddata->propertyCache->qmlEngine() == engine)
+ cache = ddata->propertyCache;
+ if (!cache) {
+ cache = enginePrivate->cache(obj);
+ if (cache && ddata && !ddata->propertyCache) { cache->addref(); ddata->propertyCache = cache; }
+ }
+
+ if (cache) {
+ rv = cache->property(name);
+ } else {
+ local = QDeclarativePropertyCache::create(obj->metaObject(), enginePrivate->objectClass->toString(name));
+ if (local.isValid())
+ rv = &local;
+ }
+
+ return rv;
+}
+
+QDeclarativePropertyCache::Data *QDeclarativePropertyCache::property(QDeclarativeEngine *engine, QObject *obj,
+ const QString &name, Data &local)
+{
+ QDeclarativePropertyCache::Data *rv = 0;
+
+ if (!engine) {
+ local = QDeclarativePropertyCache::create(obj->metaObject(), name);
+ if (local.isValid())
+ rv = &local;
+ } else {
+ QDeclarativeEnginePrivate *enginePrivate = QDeclarativeEnginePrivate::get(engine);
+
+ QDeclarativePropertyCache *cache = 0;
+ QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(obj);
+ if (ddata && ddata->propertyCache && ddata->propertyCache->qmlEngine() == engine)
+ cache = ddata->propertyCache;
+ if (!cache) {
+ cache = enginePrivate->cache(obj);
+ if (cache && ddata && !ddata->propertyCache) { cache->addref(); ddata->propertyCache = cache; }
+ }
+
+ if (cache) {
+ rv = cache->property(name);
+ } else {
+ local = QDeclarativePropertyCache::create(obj->metaObject(), name);
+ if (local.isValid())
+ rv = &local;
+ }
+ }
+
+ return rv;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativepropertycache_p.h b/src/declarative/qml/qdeclarativepropertycache_p.h
new file mode 100644
index 0000000000..68e6e6b074
--- /dev/null
+++ b/src/declarative/qml/qdeclarativepropertycache_p.h
@@ -0,0 +1,196 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEPROPERTYCACHE_P_H
+#define QDECLARATIVEPROPERTYCACHE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativerefcount_p.h"
+#include "qdeclarativecleanup_p.h"
+
+#include <QtCore/qvector.h>
+
+#include <QtScript/private/qscriptdeclarativeclass_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeEngine;
+class QMetaProperty;
+class QDeclarativePropertyCache : public QDeclarativeRefCount, public QDeclarativeCleanup
+{
+public:
+ QDeclarativePropertyCache(QDeclarativeEngine *);
+ virtual ~QDeclarativePropertyCache();
+
+ struct Data {
+ inline Data();
+ inline bool operator==(const Data &);
+
+ enum Flag {
+ NoFlags = 0x00000000,
+
+ // Can apply to all properties, except IsFunction
+ IsConstant = 0x00000001,
+ IsWritable = 0x00000002,
+ IsResettable = 0x00000004,
+
+ // These are mutualy exclusive
+ IsFunction = 0x00000008,
+ IsQObjectDerived = 0x00000010,
+ IsEnumType = 0x00000020,
+ IsQList = 0x00000080,
+ IsQmlBinding = 0x00000100,
+ IsQScriptValue = 0x00000200,
+
+ // Apply only to IsFunctions
+ IsVMEFunction = 0x00000400,
+ HasArguments = 0x00000800
+
+ };
+ Q_DECLARE_FLAGS(Flags, Flag)
+
+ bool isValid() const { return coreIndex != -1; }
+
+ Flags flags;
+ int propType;
+ int coreIndex;
+ int notifyIndex;
+
+ static Flags flagsForProperty(const QMetaProperty &, QDeclarativeEngine *engine = 0);
+ void load(const QMetaProperty &, QDeclarativeEngine *engine = 0);
+ void load(const QMetaMethod &);
+ QString name(QObject *);
+ QString name(const QMetaObject *);
+ };
+
+ struct ValueTypeData {
+ inline ValueTypeData();
+ inline bool operator==(const ValueTypeData &);
+ Data::Flags flags; // flags on the value type wrapper
+ int valueTypeCoreIdx; // The prop index of the access property on the value type wrapper
+ int valueTypePropType; // The QVariant::Type of access property on the value type wrapper
+ };
+
+ void update(QDeclarativeEngine *, const QMetaObject *);
+
+ QDeclarativePropertyCache *copy() const;
+ void append(QDeclarativeEngine *, const QMetaObject *, Data::Flag propertyFlags = Data::NoFlags,
+ Data::Flag methodFlags = Data::NoFlags);
+
+ static QDeclarativePropertyCache *create(QDeclarativeEngine *, const QMetaObject *);
+ static Data create(const QMetaObject *, const QString &);
+
+ inline Data *property(const QScriptDeclarativeClass::Identifier &id) const;
+ Data *property(const QString &) const;
+ Data *property(int) const;
+ QStringList propertyNames() const;
+
+ inline QDeclarativeEngine *qmlEngine() const;
+ static Data *property(QDeclarativeEngine *, QObject *, const QScriptDeclarativeClass::Identifier &, Data &);
+ static Data *property(QDeclarativeEngine *, QObject *, const QString &, Data &);
+protected:
+ virtual void clear();
+
+private:
+ struct RData : public Data, public QDeclarativeRefCount {
+ QScriptDeclarativeClass::PersistentIdentifier identifier;
+ };
+
+ typedef QVector<RData *> IndexCache;
+ typedef QHash<QString, RData *> StringCache;
+ typedef QHash<QScriptDeclarativeClass::Identifier, RData *> IdentifierCache;
+
+ QDeclarativeEngine *engine;
+ IndexCache indexCache;
+ StringCache stringCache;
+ IdentifierCache identifierCache;
+};
+Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativePropertyCache::Data::Flags);
+
+QDeclarativePropertyCache::Data::Data()
+: flags(0), propType(0), coreIndex(-1), notifyIndex(-1)
+{
+}
+
+bool QDeclarativePropertyCache::Data::operator==(const QDeclarativePropertyCache::Data &other)
+{
+ return flags == other.flags &&
+ propType == other.propType &&
+ coreIndex == other.coreIndex &&
+ notifyIndex == other.notifyIndex;
+}
+
+QDeclarativePropertyCache::Data *
+QDeclarativePropertyCache::property(const QScriptDeclarativeClass::Identifier &id) const
+{
+ return identifierCache.value(id);
+}
+
+QDeclarativePropertyCache::ValueTypeData::ValueTypeData()
+: flags(QDeclarativePropertyCache::Data::NoFlags), valueTypeCoreIdx(-1), valueTypePropType(0)
+{
+}
+
+bool QDeclarativePropertyCache::ValueTypeData::operator==(const ValueTypeData &o)
+{
+ return flags == o.flags &&
+ valueTypeCoreIdx == o.valueTypeCoreIdx &&
+ valueTypePropType == o.valueTypePropType;
+}
+
+QDeclarativeEngine *QDeclarativePropertyCache::qmlEngine() const
+{
+ return engine;
+}
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEPROPERTYCACHE_P_H
diff --git a/src/declarative/qml/qdeclarativepropertyvalueinterceptor.cpp b/src/declarative/qml/qdeclarativepropertyvalueinterceptor.cpp
new file mode 100644
index 0000000000..3f6d805520
--- /dev/null
+++ b/src/declarative/qml/qdeclarativepropertyvalueinterceptor.cpp
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativepropertyvalueinterceptor.h"
+
+#include "qdeclarative.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QDeclarativePropertyValueInterceptor
+ \brief The QDeclarativePropertyValueInterceptor class is inherited by property interceptors such as Behavior.
+ \internal
+
+ This class intercepts property writes, allowing for custom handling. For example, Behavior uses this
+ interception to provide a default animation for all changes to a property's value.
+ */
+
+/*!
+ Constructs a QDeclarativePropertyValueInterceptor.
+*/
+QDeclarativePropertyValueInterceptor::QDeclarativePropertyValueInterceptor()
+{
+}
+
+QDeclarativePropertyValueInterceptor::~QDeclarativePropertyValueInterceptor()
+{
+}
+
+/*!
+ \fn void QDeclarativePropertyValueInterceptor::setTarget(const QDeclarativeProperty &property)
+ Set the target \a property for the value interceptor. This method will
+ be called by the QML engine when assigning a value interceptor.
+*/
+
+/*!
+ \fn void QDeclarativePropertyValueInterceptor::write(const QVariant &value)
+ This method will be called when a new \a value is assigned to the property being intercepted.
+*/
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativepropertyvalueinterceptor.h b/src/declarative/qml/qdeclarativepropertyvalueinterceptor.h
new file mode 100644
index 0000000000..3de5abca29
--- /dev/null
+++ b/src/declarative/qml/qdeclarativepropertyvalueinterceptor.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEPROPERTYVALUEINTERCEPTOR_H
+#define QDECLARATIVEPROPERTYVALUEINTERCEPTOR_H
+
+#include <QtCore/qobject.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeProperty;
+class Q_DECLARATIVE_EXPORT QDeclarativePropertyValueInterceptor
+{
+public:
+ QDeclarativePropertyValueInterceptor();
+ virtual ~QDeclarativePropertyValueInterceptor();
+ virtual void setTarget(const QDeclarativeProperty &property) = 0;
+ virtual void write(const QVariant &value) = 0;
+};
+Q_DECLARE_INTERFACE(QDeclarativePropertyValueInterceptor, "com.trolltech.qml.QDeclarativePropertyValueInterceptor")
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEPROPERTYVALUEINTERCEPTOR_H
diff --git a/src/declarative/qml/qdeclarativepropertyvaluesource.cpp b/src/declarative/qml/qdeclarativepropertyvaluesource.cpp
new file mode 100644
index 0000000000..b106d4f030
--- /dev/null
+++ b/src/declarative/qml/qdeclarativepropertyvaluesource.cpp
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativepropertyvaluesource.h"
+
+#include "qdeclarative.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QDeclarativePropertyValueSource
+ \brief The QDeclarativePropertyValueSource class is inherited by property value sources such as animations and bindings.
+ \internal
+ */
+
+/*!
+ Constructs a QDeclarativePropertyValueSource.
+*/
+QDeclarativePropertyValueSource::QDeclarativePropertyValueSource()
+{
+}
+
+QDeclarativePropertyValueSource::~QDeclarativePropertyValueSource()
+{
+}
+
+/*!
+ \fn void QDeclarativePropertyValueSource::setTarget(const QDeclarativeProperty &property)
+ Set the target \a property for the value source. This method will
+ be called by the QML engine when assigning a value source.
+*/
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativepropertyvaluesource.h b/src/declarative/qml/qdeclarativepropertyvaluesource.h
new file mode 100644
index 0000000000..70d2c0346b
--- /dev/null
+++ b/src/declarative/qml/qdeclarativepropertyvaluesource.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEPROPERTYVALUESOURCE_H
+#define QDECLARATIVEPROPERTYVALUESOURCE_H
+
+#include <QtCore/qobject.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeProperty;
+class Q_DECLARATIVE_EXPORT QDeclarativePropertyValueSource
+{
+public:
+ QDeclarativePropertyValueSource();
+ virtual ~QDeclarativePropertyValueSource();
+ virtual void setTarget(const QDeclarativeProperty &) = 0;
+};
+Q_DECLARE_INTERFACE(QDeclarativePropertyValueSource, "com.trolltech.qml.QDeclarativePropertyValueSource")
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEPROPERTYVALUESOURCE_H
diff --git a/src/declarative/qml/qdeclarativeproxymetaobject.cpp b/src/declarative/qml/qdeclarativeproxymetaobject.cpp
new file mode 100644
index 0000000000..1decea1328
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeproxymetaobject.cpp
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeproxymetaobject_p.h"
+
+#include <QDebug>
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeProxyMetaObject::QDeclarativeProxyMetaObject(QObject *obj, QList<ProxyData> *mList)
+: metaObjects(mList), proxies(0), parent(0), object(obj)
+{
+#ifdef QDECLARATIVEPROXYMETAOBJECT_DEBUG
+ qWarning() << "QDeclarativeProxyMetaObject" << obj->metaObject()->className();
+#endif
+
+ *static_cast<QMetaObject *>(this) = *metaObjects->first().metaObject;
+
+ QObjectPrivate *op = QObjectPrivate::get(obj);
+ if (op->metaObject)
+ parent = static_cast<QAbstractDynamicMetaObject*>(op->metaObject);
+
+ op->metaObject = this;
+
+#ifdef QDECLARATIVEPROXYMETAOBJECT_DEBUG
+ const QMetaObject *mo = obj->metaObject();
+ while(mo) {
+ qWarning() << " " << mo->className();
+ mo = mo->superClass();
+ }
+#endif
+}
+
+QDeclarativeProxyMetaObject::~QDeclarativeProxyMetaObject()
+{
+ if (parent)
+ delete parent;
+ parent = 0;
+
+ if (proxies)
+ delete [] proxies;
+ proxies = 0;
+}
+
+int QDeclarativeProxyMetaObject::metaCall(QMetaObject::Call c, int id, void **a)
+{
+ if ((c == QMetaObject::ReadProperty ||
+ c == QMetaObject::WriteProperty) &&
+ id >= metaObjects->last().propertyOffset) {
+
+ for (int ii = 0; ii < metaObjects->count(); ++ii) {
+ const ProxyData &data = metaObjects->at(ii);
+ if (id >= data.propertyOffset) {
+ if (!proxies) {
+ proxies = new QObject*[metaObjects->count()];
+ ::memset(proxies, 0,
+ sizeof(QObject *) * metaObjects->count());
+ }
+
+ if (!proxies[ii]) {
+ QObject *proxy = data.createFunc(object);
+ const QMetaObject *metaObject = proxy->metaObject();
+ proxies[ii] = proxy;
+
+ int localOffset = data.metaObject->methodOffset();
+ int methodOffset = metaObject->methodOffset();
+ int methods = metaObject->methodCount() - methodOffset;
+
+ // ### - Can this be done more optimally?
+ for (int jj = 0; jj < methods; ++jj) {
+ QMetaMethod method =
+ metaObject->method(jj + methodOffset);
+ if (method.methodType() == QMetaMethod::Signal)
+ QMetaObject::connect(proxy, methodOffset + jj,
+ object, localOffset + jj);
+ }
+ }
+
+ int proxyOffset = proxies[ii]->metaObject()->propertyOffset();
+ int proxyId = id - data.propertyOffset + proxyOffset;
+
+ return proxies[ii]->qt_metacall(c, proxyId, a);
+ }
+ }
+ } else if (c == QMetaObject::InvokeMetaMethod &&
+ id >= metaObjects->last().methodOffset) {
+ QMetaMethod m = object->metaObject()->method(id);
+ if (m.methodType() == QMetaMethod::Signal) {
+ QMetaObject::activate(object, id, a);
+ return -1;
+ }
+ }
+
+ if (parent)
+ return parent->metaCall(c, id, a);
+ else
+ return object->qt_metacall(c, id, a);
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeproxymetaobject_p.h b/src/declarative/qml/qdeclarativeproxymetaobject_p.h
new file mode 100644
index 0000000000..3f103b6ca7
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeproxymetaobject_p.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEPROXYMETAOBJECT_P_H
+#define QDECLARATIVEPROXYMETAOBJECT_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qmetaobjectbuilder_p.h"
+#include "qdeclarative.h"
+
+#include <QtCore/QMetaObject>
+#include <QtCore/QObject>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeProxyMetaObject : public QAbstractDynamicMetaObject
+{
+public:
+ struct ProxyData {
+ typedef QObject *(*CreateFunc)(QObject *);
+ QMetaObject *metaObject;
+ CreateFunc createFunc;
+ int propertyOffset;
+ int methodOffset;
+ };
+
+ QDeclarativeProxyMetaObject(QObject *, QList<ProxyData> *);
+ virtual ~QDeclarativeProxyMetaObject();
+
+protected:
+ virtual int metaCall(QMetaObject::Call _c, int _id, void **_a);
+
+private:
+ QList<ProxyData> *metaObjects;
+ QObject **proxies;
+
+ QAbstractDynamicMetaObject *parent;
+ QObject *object;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEPROXYMETAOBJECT_P_H
+
diff --git a/src/declarative/qml/qdeclarativerefcount.cpp b/src/declarative/qml/qdeclarativerefcount.cpp
new file mode 100644
index 0000000000..943e35c6ff
--- /dev/null
+++ b/src/declarative/qml/qdeclarativerefcount.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativerefcount_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeRefCount::QDeclarativeRefCount()
+: refCount(1)
+{
+}
+
+QDeclarativeRefCount::~QDeclarativeRefCount()
+{
+}
+
+void QDeclarativeRefCount::addref()
+{
+ Q_ASSERT(refCount > 0);
+ ++refCount;
+}
+
+void QDeclarativeRefCount::release()
+{
+ Q_ASSERT(refCount > 0);
+ --refCount;
+ if (refCount == 0)
+ delete this;
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/declarative/qml/qdeclarativerefcount_p.h b/src/declarative/qml/qdeclarativerefcount_p.h
new file mode 100644
index 0000000000..1170b866fd
--- /dev/null
+++ b/src/declarative/qml/qdeclarativerefcount_p.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEREFCOUNT_P_H
+#define QDECLARATIVEREFCOUNT_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class Q_AUTOTEST_EXPORT QDeclarativeRefCount
+{
+public:
+ QDeclarativeRefCount();
+ virtual ~QDeclarativeRefCount();
+ void addref();
+ void release();
+
+private:
+ int refCount;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEREFCOUNT_P_H
diff --git a/src/declarative/qml/qdeclarativerewrite.cpp b/src/declarative/qml/qdeclarativerewrite.cpp
new file mode 100644
index 0000000000..afc6e63250
--- /dev/null
+++ b/src/declarative/qml/qdeclarativerewrite.cpp
@@ -0,0 +1,215 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativerewrite_p.h"
+
+#include "qdeclarativeglobal_p.h"
+
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+DEFINE_BOOL_CONFIG_OPTION(rewriteDump, QML_REWRITE_DUMP);
+
+namespace QDeclarativeRewrite {
+
+bool SharedBindingTester::isSharable(const QString &code)
+{
+ Engine engine;
+ NodePool pool(QString(), &engine);
+ Lexer lexer(&engine);
+ Parser parser(&engine);
+ lexer.setCode(code, 0);
+ parser.parseStatement();
+ if (!parser.statement())
+ return false;
+
+ _sharable = true;
+ AST::Node::acceptChild(parser.statement(), this);
+ return _sharable;
+}
+
+QString RewriteBinding::operator()(const QString &code, bool *ok)
+{
+ Engine engine;
+ NodePool pool(QString(), &engine);
+ Lexer lexer(&engine);
+ Parser parser(&engine);
+ lexer.setCode(code, 0);
+ parser.parseStatement();
+ if (!parser.statement()) {
+ if (ok) *ok = false;
+ return QString();
+ } else {
+ if (ok) *ok = true;
+ }
+ return rewrite(code, 0, parser.statement());
+}
+
+void RewriteBinding::accept(AST::Node *node)
+{
+ AST::Node::acceptChild(node, this);
+}
+
+QString RewriteBinding::rewrite(QString code, unsigned position,
+ AST::Statement *node)
+{
+ TextWriter w;
+ _writer = &w;
+ _position = position;
+ _inLoop = 0;
+
+ accept(node);
+
+ unsigned startOfStatement = node->firstSourceLocation().begin() - _position;
+ unsigned endOfStatement = node->lastSourceLocation().end() - _position;
+
+ _writer->replace(startOfStatement, 0, QLatin1String("(function() { "));
+ _writer->replace(endOfStatement, 0, QLatin1String(" })"));
+
+ if (rewriteDump()) {
+ qWarning() << "=============================================================";
+ qWarning() << "Rewrote:";
+ qWarning() << qPrintable(code);
+ }
+
+ w.write(&code);
+
+ if (rewriteDump()) {
+ qWarning() << "To:";
+ qWarning() << qPrintable(code);
+ qWarning() << "=============================================================";
+ }
+
+ return code;
+}
+
+bool RewriteBinding::visit(AST::Block *ast)
+{
+ for (AST::StatementList *it = ast->statements; it; it = it->next) {
+ if (! it->next) {
+ // we need to rewrite only the last statement of a block.
+ accept(it->statement);
+ }
+ }
+
+ return false;
+}
+
+bool RewriteBinding::visit(AST::ExpressionStatement *ast)
+{
+ if (! _inLoop) {
+ unsigned startOfExpressionStatement = ast->firstSourceLocation().begin() - _position;
+ _writer->replace(startOfExpressionStatement, 0, QLatin1String("return "));
+ }
+
+ return false;
+}
+
+bool RewriteBinding::visit(AST::DoWhileStatement *)
+{
+ ++_inLoop;
+ return true;
+}
+
+void RewriteBinding::endVisit(AST::DoWhileStatement *)
+{
+ --_inLoop;
+}
+
+bool RewriteBinding::visit(AST::WhileStatement *)
+{
+ ++_inLoop;
+ return true;
+}
+
+void RewriteBinding::endVisit(AST::WhileStatement *)
+{
+ --_inLoop;
+}
+
+bool RewriteBinding::visit(AST::ForStatement *)
+{
+ ++_inLoop;
+ return true;
+}
+
+void RewriteBinding::endVisit(AST::ForStatement *)
+{
+ --_inLoop;
+}
+
+bool RewriteBinding::visit(AST::LocalForStatement *)
+{
+ ++_inLoop;
+ return true;
+}
+
+void RewriteBinding::endVisit(AST::LocalForStatement *)
+{
+ --_inLoop;
+}
+
+bool RewriteBinding::visit(AST::ForEachStatement *)
+{
+ ++_inLoop;
+ return true;
+}
+
+void RewriteBinding::endVisit(AST::ForEachStatement *)
+{
+ --_inLoop;
+}
+
+bool RewriteBinding::visit(AST::LocalForEachStatement *)
+{
+ ++_inLoop;
+ return true;
+}
+
+void RewriteBinding::endVisit(AST::LocalForEachStatement *)
+{
+ --_inLoop;
+}
+
+} // namespace QDeclarativeRewrite
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativerewrite_p.h b/src/declarative/qml/qdeclarativerewrite_p.h
new file mode 100644
index 0000000000..33b168c69e
--- /dev/null
+++ b/src/declarative/qml/qdeclarativerewrite_p.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEREWRITE_P_H
+#define QDECLARATIVEREWRITE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "rewriter/textwriter_p.h"
+#include "parser/qdeclarativejslexer_p.h"
+#include "parser/qdeclarativejsparser_p.h"
+#include "parser/qdeclarativejsnodepool_p.h"
+
+QT_BEGIN_NAMESPACE
+
+namespace QDeclarativeRewrite {
+using namespace QDeclarativeJS;
+
+class SharedBindingTester : protected AST::Visitor
+{
+ bool _sharable;
+public:
+ bool isSharable(const QString &code);
+
+ virtual bool visit(AST::FunctionDeclaration *) { _sharable = false; return false; }
+ virtual bool visit(AST::FunctionExpression *) { _sharable = false; return false; }
+ virtual bool visit(AST::CallExpression *) { _sharable = false; return false; }
+};
+
+class RewriteBinding: protected AST::Visitor
+{
+ unsigned _position;
+ TextWriter *_writer;
+
+public:
+ QString operator()(const QString &code, bool *ok = 0);
+
+protected:
+ using AST::Visitor::visit;
+
+ void accept(AST::Node *node);
+ QString rewrite(QString code, unsigned position, AST::Statement *node);
+
+ virtual bool visit(AST::Block *ast);
+ virtual bool visit(AST::ExpressionStatement *ast);
+
+ virtual bool visit(AST::DoWhileStatement *ast);
+ virtual void endVisit(AST::DoWhileStatement *ast);
+
+ virtual bool visit(AST::WhileStatement *ast);
+ virtual void endVisit(AST::WhileStatement *ast);
+
+ virtual bool visit(AST::ForStatement *ast);
+ virtual void endVisit(AST::ForStatement *ast);
+
+ virtual bool visit(AST::LocalForStatement *ast);
+ virtual void endVisit(AST::LocalForStatement *ast);
+
+ virtual bool visit(AST::ForEachStatement *ast);
+ virtual void endVisit(AST::ForEachStatement *ast);
+
+ virtual bool visit(AST::LocalForEachStatement *ast);
+ virtual void endVisit(AST::LocalForEachStatement *ast);
+
+private:
+ int _inLoop;
+};
+
+} // namespace QDeclarativeRewrite
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEREWRITE_P_H
+
diff --git a/src/declarative/qml/qdeclarativescript.cpp b/src/declarative/qml/qdeclarativescript.cpp
new file mode 100644
index 0000000000..ac4b2c1ca3
--- /dev/null
+++ b/src/declarative/qml/qdeclarativescript.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// This is just a dummy file to include the documentation
+
+/*!
+ \qmlclass Script QDeclarativeScript
+ \since 4.7
+ \brief The Script element provides a way to add JavaScript code snippets in QML.
+ \ingroup group_utility
+
+ The Script element is used to add convenient JavaScript "glue" methods to
+ your Qt Declarative application or component.
+
+ An example:
+
+ \qml
+ Script {
+ function debugMyComponent() {
+ console.log(text.text);
+ console.log(otherinterestingitem.property);
+ }
+ }
+ MouseArea { onClicked: debugMyComponent() }
+ \endqml
+
+ \note While it is possible to use any JavaScript code within a Script element,
+ it is recommended that the code be limited to defining functions. The Script
+ element executes JavaScript as soon as it is specified, so
+ when defining a component, this may be done before the execution context is
+ fully specified. As a result, some properties or items may not be
+ accessible. You can avoid this problem by limiting your JavaScript to
+ defining functions that are only executed later once the context is fully
+ defined.
+
+ \sa {JavaScript Blocks}
+*/
+
+/*!
+ \qmlproperty string Script::script
+ \default
+ The JavaScript code to be executed.
+*/
+
+/*!
+ \qmlproperty url Script::source
+
+ Specifies a source file containing JavaScript code. This can be used instead
+ of providing inline JavaScript code in the Script element.
+*/
diff --git a/src/declarative/qml/qdeclarativescriptclass_p.h b/src/declarative/qml/qdeclarativescriptclass_p.h
new file mode 100644
index 0000000000..d8733dba9d
--- /dev/null
+++ b/src/declarative/qml/qdeclarativescriptclass_p.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVESCRIPTCLASS_P_H
+#define QDECLARATIVESCRIPTCLASS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtScript/qscriptclass.h>
+#include <private/qscriptdeclarativeclass_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeEngine;
+class QDeclarativeScriptClass : public QScriptDeclarativeClass
+{
+public:
+ QDeclarativeScriptClass(QScriptEngine *);
+
+ static QVariant toVariant(QDeclarativeEngine *, const QScriptValue &);
+
+#if (QT_VERSION <= QT_VERSION_CHECK(4, 6, 2)) && !defined(QT_HAVE_QSCRIPTDECLARATIVECLASS_VALUE)
+ struct Value : public QScriptValue {
+ Value() : QScriptValue() {}
+ Value(QScriptEngine *engine, int v) : QScriptValue(engine, v) {}
+ Value(QScriptEngine *engine, uint v) : QScriptValue(engine, v) {}
+ Value(QScriptEngine *engine, bool v) : QScriptValue(engine, v) {}
+ Value(QScriptEngine *engine, double v) : QScriptValue(engine, v) {}
+ Value(QScriptEngine *engine, float v) : QScriptValue(engine, v) {}
+ Value(QScriptEngine *engine, const QString &v) : QScriptValue(engine, v) {}
+ Value(QScriptEngine *, const QScriptValue &v) : QScriptValue(v) {}
+ };
+
+ typedef QScriptValue ScriptValue;
+#else
+ typedef Value ScriptValue;
+#endif
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVESCRIPTCLASS_P_H
diff --git a/src/declarative/qml/qdeclarativescriptparser.cpp b/src/declarative/qml/qdeclarativescriptparser.cpp
new file mode 100644
index 0000000000..fe516c5aa4
--- /dev/null
+++ b/src/declarative/qml/qdeclarativescriptparser.cpp
@@ -0,0 +1,984 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativescriptparser_p.h"
+
+#include "qdeclarativeparser_p.h"
+#include "parser/qdeclarativejsengine_p.h"
+#include "parser/qdeclarativejsparser_p.h"
+#include "parser/qdeclarativejslexer_p.h"
+#include "parser/qdeclarativejsnodepool_p.h"
+#include "parser/qdeclarativejsastvisitor_p.h"
+#include "parser/qdeclarativejsast_p.h"
+#include "qdeclarativerewrite_p.h"
+
+#include <qfxperf_p_p.h>
+
+#include <QStack>
+#include <QCoreApplication>
+#include <QtDebug>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QDeclarativeJS;
+using namespace QDeclarativeParser;
+
+namespace {
+
+class ProcessAST: protected AST::Visitor
+{
+ struct State {
+ State() : object(0), property(0) {}
+ State(Object *o) : object(o), property(0) {}
+ State(Object *o, Property *p) : object(o), property(p) {}
+
+ Object *object;
+ Property *property;
+ };
+
+ struct StateStack : public QStack<State>
+ {
+ void pushObject(Object *obj)
+ {
+ push(State(obj));
+ }
+
+ void pushProperty(const QString &name, const LocationSpan &location)
+ {
+ const State &state = top();
+ if (state.property) {
+ State s(state.property->getValue(location),
+ state.property->getValue(location)->getProperty(name.toUtf8()));
+ s.property->location = location;
+ push(s);
+ } else {
+ State s(state.object,
+ state.object->getProperty(name.toUtf8()));
+
+ s.property->location = location;
+ push(s);
+ }
+ }
+ };
+
+public:
+ ProcessAST(QDeclarativeScriptParser *parser);
+ virtual ~ProcessAST();
+
+ void operator()(const QString &code, AST::Node *node);
+
+protected:
+ Object *defineObjectBinding(AST::UiQualifiedId *propertyName, bool onAssignment,
+ AST::UiQualifiedId *objectTypeName,
+ LocationSpan location,
+ AST::UiObjectInitializer *initializer = 0);
+
+ Object *defineObjectBinding_helper(AST::UiQualifiedId *propertyName, bool onAssignment,
+ const QString &objectType,
+ AST::SourceLocation typeLocation,
+ LocationSpan location,
+ AST::UiObjectInitializer *initializer = 0);
+
+ QDeclarativeParser::Variant getVariant(AST::ExpressionNode *expr);
+
+ LocationSpan location(AST::SourceLocation start, AST::SourceLocation end);
+ LocationSpan location(AST::UiQualifiedId *);
+
+ using AST::Visitor::visit;
+ using AST::Visitor::endVisit;
+
+ virtual bool visit(AST::UiProgram *node);
+ virtual bool visit(AST::UiImport *node);
+ virtual bool visit(AST::UiObjectDefinition *node);
+ virtual bool visit(AST::UiPublicMember *node);
+ virtual bool visit(AST::UiObjectBinding *node);
+
+ virtual bool visit(AST::UiScriptBinding *node);
+ virtual bool visit(AST::UiArrayBinding *node);
+ virtual bool visit(AST::UiSourceElement *node);
+
+ void accept(AST::Node *node);
+
+ QString asString(AST::UiQualifiedId *node) const;
+
+ const State state() const;
+ Object *currentObject() const;
+ Property *currentProperty() const;
+
+ QString qualifiedNameId() const;
+
+ QString textAt(const AST::SourceLocation &loc) const
+ { return _contents.mid(loc.offset, loc.length); }
+
+
+ QString textAt(const AST::SourceLocation &first,
+ const AST::SourceLocation &last) const
+ { return _contents.mid(first.offset, last.offset + last.length - first.offset); }
+
+ QString asString(AST::ExpressionNode *expr)
+ {
+ if (! expr)
+ return QString();
+
+ return textAt(expr->firstSourceLocation(), expr->lastSourceLocation());
+ }
+
+ QString asString(AST::Statement *stmt)
+ {
+ if (! stmt)
+ return QString();
+
+ QString s = textAt(stmt->firstSourceLocation(), stmt->lastSourceLocation());
+ s += QLatin1Char('\n');
+ return s;
+ }
+
+private:
+ QDeclarativeScriptParser *_parser;
+ StateStack _stateStack;
+ QStringList _scope;
+ QString _contents;
+
+ inline bool isSignalProperty(const QByteArray &propertyName) const {
+ return (propertyName.length() >= 3 && propertyName.startsWith("on") &&
+ ('A' <= propertyName.at(2) && 'Z' >= propertyName.at(2)));
+ }
+
+};
+
+ProcessAST::ProcessAST(QDeclarativeScriptParser *parser)
+ : _parser(parser)
+{
+}
+
+ProcessAST::~ProcessAST()
+{
+}
+
+void ProcessAST::operator()(const QString &code, AST::Node *node)
+{
+ _contents = code;
+ accept(node);
+}
+
+void ProcessAST::accept(AST::Node *node)
+{
+ AST::Node::acceptChild(node, this);
+}
+
+const ProcessAST::State ProcessAST::state() const
+{
+ if (_stateStack.isEmpty())
+ return State();
+
+ return _stateStack.back();
+}
+
+Object *ProcessAST::currentObject() const
+{
+ return state().object;
+}
+
+Property *ProcessAST::currentProperty() const
+{
+ return state().property;
+}
+
+QString ProcessAST::qualifiedNameId() const
+{
+ return _scope.join(QLatin1String("/"));
+}
+
+QString ProcessAST::asString(AST::UiQualifiedId *node) const
+{
+ QString s;
+
+ for (AST::UiQualifiedId *it = node; it; it = it->next) {
+ s.append(it->name->asString());
+
+ if (it->next)
+ s.append(QLatin1Char('.'));
+ }
+
+ return s;
+}
+
+Object *
+ProcessAST::defineObjectBinding_helper(AST::UiQualifiedId *propertyName,
+ bool onAssignment,
+ const QString &objectType,
+ AST::SourceLocation typeLocation,
+ LocationSpan location,
+ AST::UiObjectInitializer *initializer)
+{
+ int lastTypeDot = objectType.lastIndexOf(QLatin1Char('.'));
+ bool isType = !objectType.isEmpty() &&
+ (objectType.at(0).isUpper() ||
+ (lastTypeDot >= 0 && objectType.at(lastTypeDot+1).isUpper()));
+
+ int propertyCount = 0;
+ for (AST::UiQualifiedId *name = propertyName; name; name = name->next){
+ ++propertyCount;
+ _stateStack.pushProperty(name->name->asString(),
+ this->location(name));
+ }
+
+ if (!onAssignment && propertyCount && currentProperty() && currentProperty()->values.count()) {
+ QDeclarativeError error;
+ error.setDescription(QCoreApplication::translate("QDeclarativeParser","Property value set multiple times"));
+ error.setLine(this->location(propertyName).start.line);
+ error.setColumn(this->location(propertyName).start.column);
+ _parser->_errors << error;
+ return 0;
+ }
+
+ if (!isType) {
+
+ if(propertyCount || !currentObject()) {
+ QDeclarativeError error;
+ error.setDescription(QCoreApplication::translate("QDeclarativeParser","Expected type name"));
+ error.setLine(typeLocation.startLine);
+ error.setColumn(typeLocation.startColumn);
+ _parser->_errors << error;
+ return 0;
+ }
+
+ LocationSpan loc = ProcessAST::location(typeLocation, typeLocation);
+ if (propertyName)
+ loc = ProcessAST::location(propertyName);
+
+ _stateStack.pushProperty(objectType, loc);
+ accept(initializer);
+ _stateStack.pop();
+
+ return 0;
+
+ } else {
+ // Class
+
+ QString resolvableObjectType = objectType;
+ if (lastTypeDot >= 0)
+ resolvableObjectType.replace(QLatin1Char('.'),QLatin1Char('/'));
+
+ bool isScript = resolvableObjectType == QLatin1String("Script");
+
+ if (isScript) {
+ if (_stateStack.isEmpty() || _stateStack.top().property) {
+ QDeclarativeError error;
+ error.setDescription(QCoreApplication::translate("QDeclarativeParser","Invalid use of Script block"));
+ error.setLine(typeLocation.startLine);
+ error.setColumn(typeLocation.startColumn);
+ _parser->_errors << error;
+ return 0;
+ }
+ }
+
+ Object *obj = new Object;
+
+ if (!isScript) {
+ QDeclarativeScriptParser::TypeReference *typeRef = _parser->findOrCreateType(resolvableObjectType);
+ obj->type = typeRef->id;
+
+ typeRef->refObjects.append(obj);
+ }
+
+ // XXX this doesn't do anything (_scope never builds up)
+ _scope.append(resolvableObjectType);
+ obj->typeName = qualifiedNameId().toUtf8();
+ _scope.removeLast();
+
+ obj->location = location;
+
+ if (isScript) {
+
+ _stateStack.top().object->scriptBlockObjects.append(obj);
+
+ } else if (propertyCount) {
+
+ Property *prop = currentProperty();
+ Value *v = new Value;
+ v->object = obj;
+ v->location = obj->location;
+ if (onAssignment)
+ prop->addOnValue(v);
+ else
+ prop->addValue(v);
+
+ while (propertyCount--)
+ _stateStack.pop();
+
+ } else {
+
+ if (! _parser->tree()) {
+ _parser->setTree(obj);
+ } else {
+ const State state = _stateStack.top();
+ Value *v = new Value;
+ v->object = obj;
+ v->location = obj->location;
+ if (state.property) {
+ state.property->addValue(v);
+ } else {
+ Property *defaultProp = state.object->getDefaultProperty();
+ if (defaultProp->location.start.line == -1) {
+ defaultProp->location = v->location;
+ defaultProp->location.end = defaultProp->location.start;
+ defaultProp->location.range.length = 0;
+ }
+ defaultProp->addValue(v);
+ }
+ }
+ }
+
+ _stateStack.pushObject(obj);
+ accept(initializer);
+ _stateStack.pop();
+
+ return obj;
+ }
+}
+
+Object *ProcessAST::defineObjectBinding(AST::UiQualifiedId *qualifiedId, bool onAssignment,
+ AST::UiQualifiedId *objectTypeName,
+ LocationSpan location,
+ AST::UiObjectInitializer *initializer)
+{
+ const QString objectType = asString(objectTypeName);
+ const AST::SourceLocation typeLocation = objectTypeName->identifierToken;
+
+ if (objectType == QLatin1String("Script")) {
+
+ AST::UiObjectMemberList *it = initializer->members;
+ for (; it; it = it->next) {
+ AST::UiScriptBinding *scriptBinding = AST::cast<AST::UiScriptBinding *>(it->member);
+ if (! scriptBinding)
+ continue;
+
+ QString propertyName = asString(scriptBinding->qualifiedId);
+ if (propertyName == QLatin1String("source")) {
+ if (AST::ExpressionStatement *stmt = AST::cast<AST::ExpressionStatement *>(scriptBinding->statement)) {
+ QDeclarativeParser::Variant string = getVariant(stmt->expression);
+ if (string.isStringList()) {
+ QStringList urls = string.asStringList();
+ // We need to add this as a resource
+ for (int ii = 0; ii < urls.count(); ++ii)
+ _parser->_refUrls << QUrl(urls.at(ii));
+ }
+ }
+ }
+ }
+
+ }
+
+ return defineObjectBinding_helper(qualifiedId, onAssignment, objectType, typeLocation, location, initializer);
+}
+
+LocationSpan ProcessAST::location(AST::UiQualifiedId *id)
+{
+ return location(id->identifierToken, id->identifierToken);
+}
+
+LocationSpan ProcessAST::location(AST::SourceLocation start, AST::SourceLocation end)
+{
+ LocationSpan rv;
+ rv.start.line = start.startLine;
+ rv.start.column = start.startColumn;
+ rv.end.line = end.startLine;
+ rv.end.column = end.startColumn + end.length - 1;
+ rv.range.offset = start.offset;
+ rv.range.length = end.offset + end.length - start.offset;
+ return rv;
+}
+
+// UiProgram: UiImportListOpt UiObjectMemberList ;
+bool ProcessAST::visit(AST::UiProgram *node)
+{
+ accept(node->imports);
+ accept(node->members->member);
+ return false;
+}
+
+// UiImport: T_IMPORT T_STRING_LITERAL ;
+bool ProcessAST::visit(AST::UiImport *node)
+{
+ QString uri;
+ QDeclarativeScriptParser::Import import;
+
+ if (node->fileName) {
+ import.type = QDeclarativeScriptParser::Import::File;
+ uri = node->fileName->asString();
+ } else {
+ import.type = QDeclarativeScriptParser::Import::Library;
+ uri = asString(node->importUri);
+ }
+
+ AST::SourceLocation startLoc = node->importToken;
+ AST::SourceLocation endLoc = node->semicolonToken;
+
+ if (node->importId) {
+ import.qualifier = node->importId->asString();
+ if (!import.qualifier.at(0).isUpper()) {
+ QDeclarativeError error;
+ error.setDescription(QCoreApplication::translate("QDeclarativeParser","Invalid import qualifier ID"));
+ error.setLine(node->importIdToken.startLine);
+ error.setColumn(node->importIdToken.startColumn);
+ _parser->_errors << error;
+ return false;
+ }
+ }
+ if (node->versionToken.isValid())
+ import.version = textAt(node->versionToken);
+ else if (import.type == QDeclarativeScriptParser::Import::Library) {
+ QDeclarativeError error;
+ error.setDescription(QCoreApplication::translate("QDeclarativeParser","Library import requires a version"));
+ error.setLine(node->importIdToken.startLine);
+ error.setColumn(node->importIdToken.startColumn);
+ _parser->_errors << error;
+ return false;
+ }
+
+ import.location = location(startLoc, endLoc);
+ import.uri = uri;
+
+ _parser->_imports << import;
+
+ return false;
+}
+
+bool ProcessAST::visit(AST::UiPublicMember *node)
+{
+ const struct TypeNameToType {
+ const char *name;
+ Object::DynamicProperty::Type type;
+ const char *qtName;
+ } propTypeNameToTypes[] = {
+ { "int", Object::DynamicProperty::Int, "int" },
+ { "bool", Object::DynamicProperty::Bool, "bool" },
+ { "double", Object::DynamicProperty::Real, "double" },
+ { "real", Object::DynamicProperty::Real, "qreal" },
+ { "string", Object::DynamicProperty::String, "QString" },
+ { "url", Object::DynamicProperty::Url, "QUrl" },
+ { "color", Object::DynamicProperty::Color, "QColor" },
+ { "date", Object::DynamicProperty::Date, "QDate" },
+ { "var", Object::DynamicProperty::Variant, "QVariant" },
+ { "variant", Object::DynamicProperty::Variant, "QVariant" }
+ };
+ const int propTypeNameToTypesCount = sizeof(propTypeNameToTypes) /
+ sizeof(propTypeNameToTypes[0]);
+
+ if(node->type == AST::UiPublicMember::Signal) {
+ const QString name = node->name->asString();
+
+ Object::DynamicSignal signal;
+ signal.name = name.toUtf8();
+
+ AST::UiParameterList *p = node->parameters;
+ while (p) {
+ const QString memberType = p->type->asString();
+ const char *qtType = 0;
+ for(int ii = 0; !qtType && ii < propTypeNameToTypesCount; ++ii) {
+ if(QLatin1String(propTypeNameToTypes[ii].name) == memberType)
+ qtType = propTypeNameToTypes[ii].qtName;
+ }
+
+ if (!qtType) {
+ QDeclarativeError error;
+ error.setDescription(QCoreApplication::translate("QDeclarativeParser","Expected parameter type"));
+ error.setLine(node->typeToken.startLine);
+ error.setColumn(node->typeToken.startColumn);
+ _parser->_errors << error;
+ return false;
+ }
+
+ signal.parameterTypes << qtType;
+ signal.parameterNames << p->name->asString().toUtf8();
+ p = p->finish();
+ }
+
+ _stateStack.top().object->dynamicSignals << signal;
+ } else {
+ const QString memberType = node->memberType->asString();
+ const QString name = node->name->asString();
+
+ bool typeFound = false;
+ Object::DynamicProperty::Type type;
+
+ if (memberType == QLatin1String("alias")) {
+ type = Object::DynamicProperty::Alias;
+ typeFound = true;
+ }
+
+ for(int ii = 0; !typeFound && ii < propTypeNameToTypesCount; ++ii) {
+ if(QLatin1String(propTypeNameToTypes[ii].name) == memberType) {
+ type = propTypeNameToTypes[ii].type;
+ typeFound = true;
+ }
+ }
+
+ if (!typeFound && memberType.at(0).isUpper()) {
+ QString typemodifier;
+ if(node->typeModifier)
+ typemodifier = node->typeModifier->asString();
+ if (typemodifier == QString()) {
+ type = Object::DynamicProperty::Custom;
+ } else if(typemodifier == QLatin1String("list")) {
+ type = Object::DynamicProperty::CustomList;
+ } else {
+ QDeclarativeError error;
+ error.setDescription(QCoreApplication::translate("QDeclarativeParser","Invalid property type modifier"));
+ error.setLine(node->typeModifierToken.startLine);
+ error.setColumn(node->typeModifierToken.startColumn);
+ _parser->_errors << error;
+ return false;
+ }
+ typeFound = true;
+ } else if (node->typeModifier) {
+ QDeclarativeError error;
+ error.setDescription(QCoreApplication::translate("QDeclarativeParser","Unexpected property type modifier"));
+ error.setLine(node->typeModifierToken.startLine);
+ error.setColumn(node->typeModifierToken.startColumn);
+ _parser->_errors << error;
+ return false;
+ }
+
+ if(!typeFound) {
+ QDeclarativeError error;
+ error.setDescription(QCoreApplication::translate("QDeclarativeParser","Expected property type"));
+ error.setLine(node->typeToken.startLine);
+ error.setColumn(node->typeToken.startColumn);
+ _parser->_errors << error;
+ return false;
+ }
+
+ if (node->isReadonlyMember) {
+ QDeclarativeError error;
+ error.setDescription(QCoreApplication::translate("QDeclarativeParser","Readonly not yet supported"));
+ error.setLine(node->readonlyToken.startLine);
+ error.setColumn(node->readonlyToken.startColumn);
+ _parser->_errors << error;
+ return false;
+
+ }
+ Object::DynamicProperty property;
+ property.isDefaultProperty = node->isDefaultMember;
+ property.type = type;
+ if (type >= Object::DynamicProperty::Custom) {
+ QDeclarativeScriptParser::TypeReference *typeRef =
+ _parser->findOrCreateType(memberType);
+ typeRef->refObjects.append(_stateStack.top().object);
+ }
+ property.customType = memberType.toUtf8();
+ property.name = name.toUtf8();
+ property.location = location(node->firstSourceLocation(),
+ node->lastSourceLocation());
+
+ if (node->expression) { // default value
+ property.defaultValue = new Property;
+ property.defaultValue->parent = _stateStack.top().object;
+ property.defaultValue->location =
+ location(node->expression->firstSourceLocation(),
+ node->expression->lastSourceLocation());
+ Value *value = new Value;
+ value->location = location(node->expression->firstSourceLocation(),
+ node->expression->lastSourceLocation());
+ value->value = getVariant(node->expression);
+ property.defaultValue->values << value;
+ }
+
+ _stateStack.top().object->dynamicProperties << property;
+ }
+
+ return true;
+}
+
+
+// UiObjectMember: UiQualifiedId UiObjectInitializer ;
+bool ProcessAST::visit(AST::UiObjectDefinition *node)
+{
+ LocationSpan l = location(node->firstSourceLocation(),
+ node->lastSourceLocation());
+
+ defineObjectBinding(/*propertyName = */ 0, false,
+ node->qualifiedTypeNameId,
+ l,
+ node->initializer);
+
+ return false;
+}
+
+
+// UiObjectMember: UiQualifiedId T_COLON UiQualifiedId UiObjectInitializer ;
+bool ProcessAST::visit(AST::UiObjectBinding *node)
+{
+ LocationSpan l = location(node->qualifiedTypeNameId->identifierToken,
+ node->initializer->rbraceToken);
+
+ defineObjectBinding(node->qualifiedId, node->hasOnToken,
+ node->qualifiedTypeNameId,
+ l,
+ node->initializer);
+
+ return false;
+}
+
+QDeclarativeParser::Variant ProcessAST::getVariant(AST::ExpressionNode *expr)
+{
+ if (AST::StringLiteral *lit = AST::cast<AST::StringLiteral *>(expr)) {
+ return QDeclarativeParser::Variant(lit->value->asString());
+ } else if (expr->kind == AST::Node::Kind_TrueLiteral) {
+ return QDeclarativeParser::Variant(true);
+ } else if (expr->kind == AST::Node::Kind_FalseLiteral) {
+ return QDeclarativeParser::Variant(false);
+ } else if (AST::NumericLiteral *lit = AST::cast<AST::NumericLiteral *>(expr)) {
+ return QDeclarativeParser::Variant(lit->value, asString(expr));
+ } else {
+
+ if (AST::UnaryMinusExpression *unaryMinus = AST::cast<AST::UnaryMinusExpression *>(expr)) {
+ if (AST::NumericLiteral *lit = AST::cast<AST::NumericLiteral *>(unaryMinus->expression)) {
+ return QDeclarativeParser::Variant(-lit->value, asString(expr));
+ }
+ }
+
+ return QDeclarativeParser::Variant(asString(expr), expr);
+ }
+}
+
+
+// UiObjectMember: UiQualifiedId T_COLON Statement ;
+bool ProcessAST::visit(AST::UiScriptBinding *node)
+{
+ int propertyCount = 0;
+ AST::UiQualifiedId *propertyName = node->qualifiedId;
+ for (AST::UiQualifiedId *name = propertyName; name; name = name->next){
+ ++propertyCount;
+ _stateStack.pushProperty(name->name->asString(),
+ location(name));
+ }
+
+ Property *prop = currentProperty();
+
+ if (prop->values.count()) {
+ QDeclarativeError error;
+ error.setDescription(QCoreApplication::translate("QDeclarativeParser","Property value set multiple times"));
+ error.setLine(this->location(propertyName).start.line);
+ error.setColumn(this->location(propertyName).start.column);
+ _parser->_errors << error;
+ return 0;
+ }
+
+ QDeclarativeParser::Variant primitive;
+
+ if (AST::ExpressionStatement *stmt = AST::cast<AST::ExpressionStatement *>(node->statement)) {
+ primitive = getVariant(stmt->expression);
+ } else { // do binding
+ primitive = QDeclarativeParser::Variant(asString(node->statement),
+ node->statement);
+ }
+
+ prop->location.range.length = prop->location.range.offset + prop->location.range.length - node->qualifiedId->identifierToken.offset;
+ prop->location.range.offset = node->qualifiedId->identifierToken.offset;
+ Value *v = new Value;
+ v->value = primitive;
+ v->location = location(node->statement->firstSourceLocation(),
+ node->statement->lastSourceLocation());
+
+ prop->addValue(v);
+
+ while (propertyCount--)
+ _stateStack.pop();
+
+ return true;
+}
+
+static QList<int> collectCommas(AST::UiArrayMemberList *members)
+{
+ QList<int> commas;
+
+ if (members) {
+ for (AST::UiArrayMemberList *it = members->next; it; it = it->next) {
+ commas.append(it->commaToken.offset);
+ }
+ }
+
+ return commas;
+}
+
+// UiObjectMember: UiQualifiedId T_COLON T_LBRACKET UiArrayMemberList T_RBRACKET ;
+bool ProcessAST::visit(AST::UiArrayBinding *node)
+{
+ int propertyCount = 0;
+ AST::UiQualifiedId *propertyName = node->qualifiedId;
+ for (AST::UiQualifiedId *name = propertyName; name; name = name->next){
+ ++propertyCount;
+ _stateStack.pushProperty(name->name->asString(),
+ location(name));
+ }
+
+ Property* prop = currentProperty();
+
+ if (prop->values.count()) {
+ QDeclarativeError error;
+ error.setDescription(QCoreApplication::translate("QDeclarativeParser","Property value set multiple times"));
+ error.setLine(this->location(propertyName).start.line);
+ error.setColumn(this->location(propertyName).start.column);
+ _parser->_errors << error;
+ return 0;
+ }
+
+ accept(node->members);
+
+ // For the DOM, store the position of the T_LBRACKET upto the T_RBRACKET as the range:
+ prop->listValueRange.offset = node->lbracketToken.offset;
+ prop->listValueRange.length = node->rbracketToken.offset + node->rbracketToken.length - node->lbracketToken.offset;
+
+ // Store the positions of the comma token too, again for the DOM to be able to retreive it.
+ prop->listCommaPositions = collectCommas(node->members);
+
+ while (propertyCount--)
+ _stateStack.pop();
+
+ return false;
+}
+
+bool ProcessAST::visit(AST::UiSourceElement *node)
+{
+ QDeclarativeParser::Object *obj = currentObject();
+
+ bool isScript = (obj && obj->typeName == "Script");
+
+ if (!isScript) {
+
+ if (AST::FunctionDeclaration *funDecl = AST::cast<AST::FunctionDeclaration *>(node->sourceElement)) {
+
+ Object::DynamicSlot slot;
+
+ AST::FormalParameterList *f = funDecl->formals;
+ while (f) {
+ slot.parameterNames << f->name->asString().toUtf8();
+ f = f->finish();
+ }
+
+ QString body = textAt(funDecl->lbraceToken, funDecl->rbraceToken);
+ slot.name = funDecl->name->asString().toUtf8();
+ slot.body = body;
+ obj->dynamicSlots << slot;
+
+ } else {
+ QDeclarativeError error;
+ error.setDescription(QCoreApplication::translate("QDeclarativeParser","JavaScript declaration outside Script element"));
+ error.setLine(node->firstSourceLocation().startLine);
+ error.setColumn(node->firstSourceLocation().startColumn);
+ _parser->_errors << error;
+ }
+ return false;
+
+ } else {
+ QString source;
+
+ int line = 0;
+ if (AST::FunctionDeclaration *funDecl = AST::cast<AST::FunctionDeclaration *>(node->sourceElement)) {
+ line = funDecl->functionToken.startLine;
+ source = asString(funDecl);
+ } else if (AST::VariableStatement *varStmt = AST::cast<AST::VariableStatement *>(node->sourceElement)) {
+ // ignore variable declarations
+ line = varStmt->declarationKindToken.startLine;
+
+ QDeclarativeError error;
+ error.setDescription(QCoreApplication::translate("QDeclarativeParser", "Variable declarations not allow in inline Script blocks"));
+ error.setLine(node->firstSourceLocation().startLine);
+ error.setColumn(node->firstSourceLocation().startColumn);
+ _parser->_errors << error;
+ return false;
+ }
+
+ Value *value = new Value;
+ value->location = location(node->firstSourceLocation(),
+ node->lastSourceLocation());
+ value->value = QDeclarativeParser::Variant(source);
+
+ obj->getDefaultProperty()->addValue(value);
+ }
+
+ return false;
+}
+
+} // end of anonymous namespace
+
+
+QDeclarativeScriptParser::QDeclarativeScriptParser()
+: root(0), data(0)
+{
+
+}
+
+QDeclarativeScriptParser::~QDeclarativeScriptParser()
+{
+ clear();
+}
+
+class QDeclarativeScriptParserJsASTData
+{
+public:
+ QDeclarativeScriptParserJsASTData(const QString &filename)
+ : nodePool(filename, &engine) {}
+
+ Engine engine;
+ NodePool nodePool;
+};
+
+bool QDeclarativeScriptParser::parse(const QByteArray &qmldata, const QUrl &url)
+{
+#ifdef Q_ENABLE_PERFORMANCE_LOG
+ QDeclarativePerfTimer<QDeclarativePerf::QDeclarativeParsing> pt;
+#endif
+ clear();
+
+ const QString fileName = url.toString();
+
+ QTextStream stream(qmldata, QIODevice::ReadOnly);
+ stream.setCodec("UTF-8");
+ const QString code = stream.readAll();
+
+ data = new QDeclarativeScriptParserJsASTData(fileName);
+
+ Lexer lexer(&data->engine);
+ lexer.setCode(code, /*line = */ 1);
+
+ Parser parser(&data->engine);
+
+ if (! parser.parse() || !_errors.isEmpty()) {
+
+ // Extract errors from the parser
+ foreach (const DiagnosticMessage &m, parser.diagnosticMessages()) {
+
+ if (m.isWarning())
+ continue;
+
+ QDeclarativeError error;
+ error.setUrl(url);
+ error.setDescription(m.message);
+ error.setLine(m.loc.startLine);
+ error.setColumn(m.loc.startColumn);
+ _errors << error;
+
+ }
+ }
+
+ if (_errors.isEmpty()) {
+ ProcessAST process(this);
+ process(code, parser.ast());
+
+ // Set the url for process errors
+ for(int ii = 0; ii < _errors.count(); ++ii)
+ _errors[ii].setUrl(url);
+ }
+
+ return _errors.isEmpty();
+}
+
+QList<QDeclarativeScriptParser::TypeReference*> QDeclarativeScriptParser::referencedTypes() const
+{
+ return _refTypes;
+}
+
+QList<QUrl> QDeclarativeScriptParser::referencedResources() const
+{
+ return _refUrls;
+}
+
+Object *QDeclarativeScriptParser::tree() const
+{
+ return root;
+}
+
+QList<QDeclarativeScriptParser::Import> QDeclarativeScriptParser::imports() const
+{
+ return _imports;
+}
+
+QList<QDeclarativeError> QDeclarativeScriptParser::errors() const
+{
+ return _errors;
+}
+
+void QDeclarativeScriptParser::clear()
+{
+ if (root) {
+ root->release();
+ root = 0;
+ }
+ _imports.clear();
+ qDeleteAll(_refTypes);
+ _refTypes.clear();
+ _errors.clear();
+
+ if (data) {
+ delete data;
+ data = 0;
+ }
+}
+
+QDeclarativeScriptParser::TypeReference *QDeclarativeScriptParser::findOrCreateType(const QString &name)
+{
+ TypeReference *type = 0;
+ int i = 0;
+ for (; i < _refTypes.size(); ++i) {
+ if (_refTypes.at(i)->name == name) {
+ type = _refTypes.at(i);
+ break;
+ }
+ }
+ if (!type) {
+ type = new TypeReference(i, name);
+ _refTypes.append(type);
+ }
+
+ return type;
+}
+
+void QDeclarativeScriptParser::setTree(Object *tree)
+{
+ Q_ASSERT(! root);
+
+ root = tree;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativescriptparser_p.h b/src/declarative/qml/qdeclarativescriptparser_p.h
new file mode 100644
index 0000000000..b8f77d1f3a
--- /dev/null
+++ b/src/declarative/qml/qdeclarativescriptparser_p.h
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef QDECLARATIVESCRIPTPARSER_P_H
+#define QDECLARATIVESCRIPTPARSER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeerror.h"
+#include "qdeclarativeparser_p.h"
+
+#include <QtCore/QList>
+#include <QtCore/QUrl>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QByteArray;
+
+class QDeclarativeScriptParserJsASTData;
+class QDeclarativeScriptParser
+{
+public:
+ class Import
+ {
+ public:
+ Import() : type(Library) {}
+
+ enum Type { Library, File };
+ Type type;
+
+ QString uri;
+ QString qualifier;
+ QString version;
+
+ QDeclarativeParser::LocationSpan location;
+ };
+
+ class TypeReference
+ {
+ public:
+ TypeReference(int typeId, const QString &typeName) : id(typeId), name(typeName) {}
+
+ int id;
+ // type as it has been referenced in Qml
+ QString name;
+ // objects in parse tree referencing the type
+ QList<QDeclarativeParser::Object*> refObjects;
+ };
+
+ QDeclarativeScriptParser();
+ ~QDeclarativeScriptParser();
+
+ bool parse(const QByteArray &data, const QUrl &url = QUrl());
+
+ QList<TypeReference*> referencedTypes() const;
+ QList<QUrl> referencedResources() const;
+
+ QDeclarativeParser::Object *tree() const;
+ QList<Import> imports() const;
+
+ void clear();
+
+ QList<QDeclarativeError> errors() const;
+
+// ### private:
+ TypeReference *findOrCreateType(const QString &name);
+ void setTree(QDeclarativeParser::Object *tree);
+
+ void setScriptFile(const QString &filename) {_scriptFile = filename; }
+ QString scriptFile() const { return _scriptFile; }
+
+// ### private:
+ QList<QDeclarativeError> _errors;
+
+ QDeclarativeParser::Object *root;
+ QList<Import> _imports;
+ QList<TypeReference*> _refTypes;
+ QList<QUrl> _refUrls;
+ QString _scriptFile;
+ QDeclarativeScriptParserJsASTData *data;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVESCRIPTPARSER_P_H
diff --git a/src/declarative/qml/qdeclarativescriptstring.cpp b/src/declarative/qml/qdeclarativescriptstring.cpp
new file mode 100644
index 0000000000..5b9afe9cfc
--- /dev/null
+++ b/src/declarative/qml/qdeclarativescriptstring.cpp
@@ -0,0 +1,155 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativescriptstring.h"
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeScriptStringPrivate : public QSharedData
+{
+public:
+ QDeclarativeScriptStringPrivate() : context(0), scope(0) {}
+
+ QDeclarativeContext *context;
+ QObject *scope;
+ QString script;
+};
+
+/*!
+\class QDeclarativeScriptString
+ \since 4.7
+\brief The QDeclarativeScriptString class encapsulates a script and its context.
+
+The QDeclarativeScriptString is used by properties that want to accept a script "assignment" from QML.
+
+Normally, the following code would result in a binding being established for the \c script
+property. If the property had a type of QDeclarativeScriptString, the script - \e {console.log(1921)} - itself
+would be passed to the property and it could choose how to handle it.
+
+\code
+MyType {
+ script: console.log(1921)
+}
+\endcode
+*/
+
+/*!
+Construct an empty instance.
+*/
+QDeclarativeScriptString::QDeclarativeScriptString()
+: d(new QDeclarativeScriptStringPrivate)
+{
+}
+
+/*!
+Copy \a other.
+*/
+QDeclarativeScriptString::QDeclarativeScriptString(const QDeclarativeScriptString &other)
+: d(other.d)
+{
+}
+
+/*!
+\internal
+*/
+QDeclarativeScriptString::~QDeclarativeScriptString()
+{
+}
+
+/*!
+Assign \a other to this.
+*/
+QDeclarativeScriptString &QDeclarativeScriptString::operator=(const QDeclarativeScriptString &other)
+{
+ d = other.d;
+ return *this;
+}
+
+/*!
+Return the context for the script.
+*/
+QDeclarativeContext *QDeclarativeScriptString::context() const
+{
+ return d->context;
+}
+
+/*!
+Sets the \a context for the script.
+*/
+void QDeclarativeScriptString::setContext(QDeclarativeContext *context)
+{
+ d->context = context;
+}
+
+/*!
+Returns the scope object for the script.
+*/
+QObject *QDeclarativeScriptString::scopeObject() const
+{
+ return d->scope;
+}
+
+/*!
+Sets the scope \a object for the script.
+*/
+void QDeclarativeScriptString::setScopeObject(QObject *object)
+{
+ d->scope = object;
+}
+
+/*!
+Returns the script text.
+*/
+QString QDeclarativeScriptString::script() const
+{
+ return d->script;
+}
+
+/*!
+Sets the \a script text.
+*/
+void QDeclarativeScriptString::setScript(const QString &script)
+{
+ d->script = script;
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/declarative/qml/qdeclarativescriptstring.h b/src/declarative/qml/qdeclarativescriptstring.h
new file mode 100644
index 0000000000..43bef4460d
--- /dev/null
+++ b/src/declarative/qml/qdeclarativescriptstring.h
@@ -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 QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVESCRIPTSTRING_H
+#define QDECLARATIVESCRIPTSTRING_H
+
+#include <QtCore/qstring.h>
+#include <QtCore/qshareddata.h>
+#include <QtCore/qmetatype.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QObject;
+class QDeclarativeContext;
+class QDeclarativeScriptStringPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeScriptString
+{
+public:
+ QDeclarativeScriptString();
+ QDeclarativeScriptString(const QDeclarativeScriptString &);
+ ~QDeclarativeScriptString();
+
+ QDeclarativeScriptString &operator=(const QDeclarativeScriptString &);
+
+ QDeclarativeContext *context() const;
+ void setContext(QDeclarativeContext *);
+
+ QObject *scopeObject() const;
+ void setScopeObject(QObject *);
+
+ QString script() const;
+ void setScript(const QString &);
+
+private:
+ QSharedDataPointer<QDeclarativeScriptStringPrivate> d;
+};
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QDeclarativeScriptString);
+
+QT_END_HEADER
+
+#endif // QDECLARATIVESCRIPTSTRING_H
+
diff --git a/src/declarative/qml/qdeclarativesqldatabase.cpp b/src/declarative/qml/qdeclarativesqldatabase.cpp
new file mode 100644
index 0000000000..855d62331a
--- /dev/null
+++ b/src/declarative/qml/qdeclarativesqldatabase.cpp
@@ -0,0 +1,428 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativesqldatabase_p.h"
+
+#include "qdeclarativeengine.h"
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativerefcount_p.h"
+#include "qdeclarativeengine_p.h"
+
+#include <QtCore/qobject.h>
+#include <QtScript/qscriptvalue.h>
+#include <QtScript/qscriptvalueiterator.h>
+#include <QtScript/qscriptcontext.h>
+#include <QtScript/qscriptengine.h>
+#include <QtScript/qscriptclasspropertyiterator.h>
+#include <QtSql/qsqldatabase.h>
+#include <QtSql/qsqlquery.h>
+#include <QtSql/qsqlerror.h>
+#include <QtSql/qsqlrecord.h>
+#include <QtCore/qstack.h>
+#include <QtCore/qcryptographichash.h>
+#include <QtCore/qsettings.h>
+#include <QtCore/qdir.h>
+#include <QtCore/qdebug.h>
+
+Q_DECLARE_METATYPE(QSqlDatabase)
+Q_DECLARE_METATYPE(QSqlQuery)
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeSqlQueryScriptClass: public QScriptClass {
+public:
+ QDeclarativeSqlQueryScriptClass(QScriptEngine *engine) : QScriptClass(engine)
+ {
+ str_length = engine->toStringHandle(QLatin1String("length"));
+ str_forwardOnly = engine->toStringHandle(QLatin1String("forwardOnly")); // not in HTML5 (an optimization)
+ }
+
+ QueryFlags queryProperty(const QScriptValue &,
+ const QScriptString &name,
+ QueryFlags flags, uint *)
+ {
+ if (flags & HandlesReadAccess) {
+ if (name == str_length) {
+ return HandlesReadAccess;
+ } else if (name == str_forwardOnly) {
+ return flags;
+ }
+ }
+ if (flags & HandlesWriteAccess)
+ if (name == str_forwardOnly)
+ return flags;
+ return 0;
+ }
+
+ QScriptValue property(const QScriptValue &object,
+ const QScriptString &name, uint)
+ {
+ QSqlQuery query = qscriptvalue_cast<QSqlQuery>(object.data());
+ if (name == str_length) {
+ int s = query.size();
+ if (s<0) {
+ // Inefficient.
+ if (query.last()) {
+ return query.at()+1;
+ } else {
+ return 0;
+ }
+ } else {
+ return s;
+ }
+ } else if (name == str_forwardOnly) {
+ return query.isForwardOnly();
+ }
+ return engine()->undefinedValue();
+ }
+
+ void setProperty(QScriptValue &object,
+ const QScriptString &name, uint, const QScriptValue & value)
+ {
+ if (name == str_forwardOnly) {
+ QSqlQuery query = qscriptvalue_cast<QSqlQuery>(object.data());
+ query.setForwardOnly(value.toBool());
+ }
+ }
+
+ QScriptValue::PropertyFlags propertyFlags(const QScriptValue &/*object*/, const QScriptString &name, uint /*id*/)
+ {
+ if (name == str_length) {
+ return QScriptValue::Undeletable
+ | QScriptValue::SkipInEnumeration;
+ }
+ return QScriptValue::Undeletable;
+ }
+
+private:
+ QScriptString str_length;
+ QScriptString str_forwardOnly;
+};
+
+// If the spec changes to allow iteration, check git history...
+// class QDeclarativeSqlQueryScriptClassPropertyIterator : public QScriptClassPropertyIterator
+
+
+
+enum SqlException {
+ UNKNOWN_ERR,
+ DATABASE_ERR,
+ VERSION_ERR,
+ TOO_LARGE_ERR,
+ QUOTA_ERR,
+ SYNTAX_ERR,
+ CONSTRAINT_ERR,
+ TIMEOUT_ERR
+};
+
+static const char* sqlerror[] = {
+ "UNKNOWN_ERR",
+ "DATABASE_ERR",
+ "VERSION_ERR",
+ "TOO_LARGE_ERR",
+ "QUOTA_ERR",
+ "SYNTAX_ERR",
+ "CONSTRAINT_ERR",
+ "TIMEOUT_ERR",
+ 0
+};
+
+#define THROW_SQL(error, desc) \
+{ \
+ QScriptValue errorValue = context->throwError(desc); \
+ errorValue.setProperty(QLatin1String("code"), error); \
+ return errorValue; \
+}
+
+
+static QString databaseFile(const QString& connectionName, QScriptEngine *engine)
+{
+ QDeclarativeScriptEngine *qmlengine = static_cast<QDeclarativeScriptEngine*>(engine);
+ QString basename = qmlengine->offlineStoragePath
+ + QDir::separator() + QLatin1String("Databases") + QDir::separator();
+ basename += connectionName;
+ return basename;
+}
+
+
+
+static QScriptValue qmlsqldatabase_item(QScriptContext *context, QScriptEngine *engine)
+{
+ QSqlQuery query = qscriptvalue_cast<QSqlQuery>(context->thisObject().data());
+ int i = context->argument(0).toNumber();
+ if (query.at() == i || query.seek(i)) { // Qt 4.6 doesn't optimize seek(at())
+ QSqlRecord r = query.record();
+ QScriptValue row = engine->newObject();
+ for (int j=0; j<r.count(); ++j) {
+ row.setProperty(r.fieldName(j), QScriptValue(engine,r.value(j).toString()));
+ }
+ return row;
+ }
+ return engine->undefinedValue();
+}
+
+static QScriptValue qmlsqldatabase_executeSql_outsidetransaction(QScriptContext *context, QScriptEngine * /*engine*/)
+{
+ THROW_SQL(DATABASE_ERR,QDeclarativeEngine::tr("executeSql called outside transaction()"));
+}
+
+static QScriptValue qmlsqldatabase_executeSql(QScriptContext *context, QScriptEngine *engine)
+{
+ QSqlDatabase db = qscriptvalue_cast<QSqlDatabase>(context->thisObject());
+ QString sql = context->argument(0).toString();
+ QSqlQuery query(db);
+ bool err = false;
+
+ QScriptValue result;
+
+ if (query.prepare(sql)) {
+ if (context->argumentCount() > 1) {
+ QScriptValue values = context->argument(1);
+ if (values.isObject()) {
+ for (QScriptValueIterator it(values); it.hasNext();) {
+ it.next();
+ query.bindValue(it.name(),it.value().toVariant());
+ }
+ } else {
+ query.bindValue(0,values.toVariant());
+ }
+ }
+ if (query.exec()) {
+ result = engine->newObject();
+ QDeclarativeScriptEngine *qmlengine = static_cast<QDeclarativeScriptEngine*>(engine);
+ if (!qmlengine->sqlQueryClass)
+ qmlengine->sqlQueryClass = new QDeclarativeSqlQueryScriptClass(engine);
+ QScriptValue rows = engine->newObject(qmlengine->sqlQueryClass);
+ rows.setData(engine->newVariant(qVariantFromValue(query)));
+ rows.setProperty(QLatin1String("item"), engine->newFunction(qmlsqldatabase_item,1), QScriptValue::SkipInEnumeration);
+ result.setProperty(QLatin1String("rows"),rows);
+ result.setProperty(QLatin1String("rowsAffected"),query.numRowsAffected());
+ result.setProperty(QLatin1String("insertId"),query.lastInsertId().toString());
+ } else {
+ err = true;
+ }
+ } else {
+ err = true;
+ }
+ if (err)
+ THROW_SQL(DATABASE_ERR,query.lastError().text());
+ return result;
+}
+
+static QScriptValue qmlsqldatabase_executeSql_readonly(QScriptContext *context, QScriptEngine *engine)
+{
+ QString sql = context->argument(0).toString();
+ if (sql.startsWith(QLatin1String("SELECT"),Qt::CaseInsensitive)) {
+ return qmlsqldatabase_executeSql(context,engine);
+ } else {
+ THROW_SQL(SYNTAX_ERR,QDeclarativeEngine::tr("Read-only Transaction"))
+ }
+}
+
+static QScriptValue qmlsqldatabase_change_version(QScriptContext *context, QScriptEngine *engine)
+{
+ if (context->argumentCount() < 2)
+ return engine->undefinedValue();
+
+ QSqlDatabase db = qscriptvalue_cast<QSqlDatabase>(context->thisObject());
+ QString from_version = context->argument(0).toString();
+ QString to_version = context->argument(1).toString();
+ QScriptValue callback = context->argument(2);
+
+ QScriptValue instance = engine->newObject();
+ instance.setProperty(QLatin1String("executeSql"), engine->newFunction(qmlsqldatabase_executeSql,1));
+ QScriptValue tx = engine->newVariant(instance,qVariantFromValue(db));
+
+ QString foundvers = context->thisObject().property(QLatin1String("version")).toString();
+ if (from_version!=foundvers) {
+ THROW_SQL(2,QDeclarativeEngine::tr("Version mismatch: expected %1, found %2").arg(from_version).arg(foundvers));
+ return engine->undefinedValue();
+ }
+
+ bool ok = true;
+ if (callback.isFunction()) {
+ ok = false;
+ db.transaction();
+ callback.call(QScriptValue(), QScriptValueList() << tx);
+ if (engine->hasUncaughtException()) {
+ db.rollback();
+ } else {
+ if (!db.commit()) {
+ db.rollback();
+ THROW_SQL(0,QDeclarativeEngine::tr("SQL transaction failed"));
+ } else {
+ ok = true;
+ }
+ }
+ }
+
+ if (ok) {
+ context->thisObject().setProperty(QLatin1String("version"), to_version, QScriptValue::ReadOnly);
+ QSettings ini(databaseFile(db.connectionName(),engine)+QLatin1String(".ini"),QSettings::IniFormat);
+ ini.setValue(QLatin1String("Version"), to_version);
+ }
+
+ return engine->undefinedValue();
+}
+
+static QScriptValue qmlsqldatabase_transaction_shared(QScriptContext *context, QScriptEngine *engine, bool readOnly)
+{
+ QSqlDatabase db = qscriptvalue_cast<QSqlDatabase>(context->thisObject());
+ QScriptValue callback = context->argument(0);
+ if (!callback.isFunction())
+ THROW_SQL(UNKNOWN_ERR,QDeclarativeEngine::tr("transaction: missing callback"));
+
+ QScriptValue instance = engine->newObject();
+ instance.setProperty(QLatin1String("executeSql"),
+ engine->newFunction(readOnly ? qmlsqldatabase_executeSql_readonly : qmlsqldatabase_executeSql,1));
+ QScriptValue tx = engine->newVariant(instance,qVariantFromValue(db));
+
+ db.transaction();
+ callback.call(QScriptValue(), QScriptValueList() << tx);
+ instance.setProperty(QLatin1String("executeSql"),
+ engine->newFunction(qmlsqldatabase_executeSql_outsidetransaction));
+ if (engine->hasUncaughtException()) {
+ db.rollback();
+ } else {
+ if (!db.commit())
+ db.rollback();
+ }
+ return engine->undefinedValue();
+}
+
+static QScriptValue qmlsqldatabase_transaction(QScriptContext *context, QScriptEngine *engine)
+{
+ return qmlsqldatabase_transaction_shared(context,engine,false);
+}
+static QScriptValue qmlsqldatabase_read_transaction(QScriptContext *context, QScriptEngine *engine)
+{
+ return qmlsqldatabase_transaction_shared(context,engine,true);
+}
+
+/*
+ Currently documented in doc/src/declarastive/globalobject.qdoc
+*/
+static QScriptValue qmlsqldatabase_open_sync(QScriptContext *context, QScriptEngine *engine)
+{
+ QSqlDatabase database;
+
+ QString dbname = context->argument(0).toString();
+ QString dbversion = context->argument(1).toString();
+ QString dbdescription = context->argument(2).toString();
+ int dbestimatedsize = context->argument(3).toNumber();
+ QScriptValue dbcreationCallback = context->argument(4);
+
+ QCryptographicHash md5(QCryptographicHash::Md5);
+ md5.addData(dbname.toUtf8());
+ QString dbid(QLatin1String(md5.result().toHex()));
+
+ QString basename = databaseFile(dbid,engine);
+ bool created = false;
+ QString version = dbversion;
+
+ {
+ QSettings ini(basename+QLatin1String(".ini"),QSettings::IniFormat);
+
+ if (QSqlDatabase::connectionNames().contains(dbid)) {
+ database = QSqlDatabase::database(dbid);
+ version = ini.value(QLatin1String("Version")).toString();
+ if (version != dbversion && !dbversion.isEmpty() && !version.isEmpty())
+ THROW_SQL(VERSION_ERR,QDeclarativeEngine::tr("SQL: database version mismatch"));
+ } else {
+ created = !QFile::exists(basename+QLatin1String(".sqlite"));
+ database = QSqlDatabase::addDatabase(QLatin1String("QSQLITE"), dbid);
+ QDir().mkpath(basename);
+ if (created) {
+ ini.setValue(QLatin1String("Name"), dbname);
+ if (dbcreationCallback.isFunction())
+ version = QString();
+ ini.setValue(QLatin1String("Version"), version);
+ ini.setValue(QLatin1String("Description"), dbdescription);
+ ini.setValue(QLatin1String("EstimatedSize"), dbestimatedsize);
+ ini.setValue(QLatin1String("Driver"), QLatin1String("QSQLITE"));
+ } else {
+ if (!dbversion.isEmpty() && ini.value(QLatin1String("Version")) != dbversion) {
+ // Incompatible
+ THROW_SQL(VERSION_ERR,QDeclarativeEngine::tr("SQL: database version mismatch"));
+ }
+ version = ini.value(QLatin1String("Version")).toString();
+ }
+ database.setDatabaseName(basename+QLatin1String(".sqlite"));
+ }
+ if (!database.isOpen())
+ database.open();
+ }
+
+ QScriptValue instance = engine->newObject();
+ instance.setProperty(QLatin1String("transaction"), engine->newFunction(qmlsqldatabase_transaction,1));
+ instance.setProperty(QLatin1String("readTransaction"), engine->newFunction(qmlsqldatabase_read_transaction,1));
+ instance.setProperty(QLatin1String("version"), version, QScriptValue::ReadOnly);
+ instance.setProperty(QLatin1String("changeVersion"), engine->newFunction(qmlsqldatabase_change_version,3));
+
+ QScriptValue result = engine->newVariant(instance,qVariantFromValue(database));
+
+ if (created && dbcreationCallback.isFunction()) {
+ dbcreationCallback.call(QScriptValue(), QScriptValueList() << result);
+ }
+
+ return result;
+}
+
+void qt_add_qmlsqldatabase(QScriptEngine *engine)
+{
+ QScriptValue openDatabase = engine->newFunction(qmlsqldatabase_open_sync, 4);
+ engine->globalObject().setProperty(QLatin1String("openDatabaseSync"), openDatabase);
+
+ QScriptValue sqlExceptionPrototype = engine->newObject();
+ for (int i=0; sqlerror[i]; ++i)
+ sqlExceptionPrototype.setProperty(QLatin1String(sqlerror[i]),
+ i,QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+
+ engine->globalObject().setProperty(QLatin1String("SQLException"), sqlExceptionPrototype);
+}
+
+/*
+HTML5 "spec" says "rs.rows[n]", but WebKit only impelments "rs.rows.item(n)". We do both (and property iterator).
+We add a "forwardOnly" property that stops Qt caching results (code promises to only go forward
+through the data.
+*/
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativesqldatabase_p.h b/src/declarative/qml/qdeclarativesqldatabase_p.h
new file mode 100644
index 0000000000..d0b6c0b87a
--- /dev/null
+++ b/src/declarative/qml/qdeclarativesqldatabase_p.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVESQLDATABASE_P_H
+#define QDECLARATIVESQLDATABASE_P_H
+
+#include <QtScript/qscriptengine.h>
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
+
+class QScriptEngine;
+void qt_add_qmlsqldatabase(QScriptEngine *engine);
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVESQLDATABASE_P_H
+
diff --git a/src/declarative/qml/qdeclarativestringconverters.cpp b/src/declarative/qml/qdeclarativestringconverters.cpp
new file mode 100644
index 0000000000..f3497e52ee
--- /dev/null
+++ b/src/declarative/qml/qdeclarativestringconverters.cpp
@@ -0,0 +1,276 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativestringconverters_p.h"
+
+#include <QtGui/qcolor.h>
+#include <QtGui/qvector3d.h>
+#include <QtCore/qpoint.h>
+#include <QtCore/qrect.h>
+#include <QtCore/qsize.h>
+#include <QtCore/qvariant.h>
+#include <QtCore/qdatetime.h>
+
+QT_BEGIN_NAMESPACE
+
+static uchar fromHex(const uchar c, const uchar c2)
+{
+ uchar rv = 0;
+ if (c >= '0' && c <= '9')
+ rv += (c - '0') * 16;
+ else if (c >= 'A' && c <= 'F')
+ rv += (c - 'A' + 10) * 16;
+ else if (c >= 'a' && c <= 'f')
+ rv += (c - 'a' + 10) * 16;
+
+ if (c2 >= '0' && c2 <= '9')
+ rv += (c2 - '0');
+ else if (c2 >= 'A' && c2 <= 'F')
+ rv += (c2 - 'A' + 10);
+ else if (c2 >= 'a' && c2 <= 'f')
+ rv += (c2 - 'a' + 10);
+
+ return rv;
+}
+
+static uchar fromHex(const QString &s, int idx)
+{
+ uchar c = s.at(idx).toAscii();
+ uchar c2 = s.at(idx + 1).toAscii();
+ return fromHex(c, c2);
+}
+
+QVariant QDeclarativeStringConverters::variantFromString(const QString &s)
+{
+ if (s.isEmpty())
+ return QVariant(s);
+ if (s.startsWith(QLatin1Char('\'')) && s.endsWith(QLatin1Char('\''))) {
+ QString data = s.mid(1, s.length() - 2);
+ return QVariant(data);
+ }
+ bool ok = false;
+ QRectF r = rectFFromString(s, &ok);
+ if (ok) return QVariant(r);
+ QColor c = colorFromString(s, &ok);
+ if (ok) return QVariant(c);
+ QPointF p = pointFFromString(s, &ok);
+ if (ok) return QVariant(p);
+ QSizeF sz = sizeFFromString(s, &ok);
+ if (ok) return QVariant(sz);
+ QVector3D v = vector3DFromString(s, &ok);
+ if (ok) return qVariantFromValue(v);
+
+ return QVariant(s);
+}
+
+QVariant QDeclarativeStringConverters::variantFromString(const QString &s, int preferredType, bool *ok)
+{
+ switch (preferredType) {
+ case QMetaType::QColor:
+ return QVariant::fromValue(colorFromString(s, ok));
+ case QMetaType::QDate:
+ return QVariant::fromValue(dateFromString(s, ok));
+ case QMetaType::QTime:
+ return QVariant::fromValue(timeFromString(s, ok));
+ case QMetaType::QDateTime:
+ return QVariant::fromValue(dateTimeFromString(s, ok));
+ case QMetaType::QPointF:
+ return QVariant::fromValue(pointFFromString(s, ok));
+ case QMetaType::QPoint:
+ return QVariant::fromValue(pointFFromString(s, ok).toPoint());
+ case QMetaType::QSizeF:
+ return QVariant::fromValue(sizeFFromString(s, ok));
+ case QMetaType::QSize:
+ return QVariant::fromValue(sizeFFromString(s, ok).toSize());
+ case QMetaType::QRectF:
+ return QVariant::fromValue(rectFFromString(s, ok));
+ case QMetaType::QRect:
+ return QVariant::fromValue(rectFFromString(s, ok).toRect());
+ case QMetaType::QVector3D:
+ return QVariant::fromValue(vector3DFromString(s, ok));
+ default:
+ if (ok) *ok = false;
+ return QVariant();
+ }
+}
+
+QColor QDeclarativeStringConverters::colorFromString(const QString &s, bool *ok)
+{
+ if (s.startsWith(QLatin1Char('#')) && s.length() == 9) {
+ uchar a = fromHex(s, 1);
+ uchar r = fromHex(s, 3);
+ uchar g = fromHex(s, 5);
+ uchar b = fromHex(s, 7);
+ if (ok) *ok = true;
+ return QColor(r, g, b, a);
+ } else {
+ QColor rv;
+ if (s.startsWith(QLatin1Char('#')) || QColor::colorNames().contains(s.toLower()))
+ rv = QColor(s);
+ if (ok) *ok = rv.isValid();
+ return rv;
+ }
+}
+
+QDate QDeclarativeStringConverters::dateFromString(const QString &s, bool *ok)
+{
+ QDate d = QDate::fromString(s, Qt::ISODate);
+ if (ok) *ok = d.isValid();
+ return d;
+}
+
+QTime QDeclarativeStringConverters::timeFromString(const QString &s, bool *ok)
+{
+ QTime t = QTime::fromString(s, Qt::ISODate);
+ if (ok) *ok = t.isValid();
+ return t;
+}
+
+QDateTime QDeclarativeStringConverters::dateTimeFromString(const QString &s, bool *ok)
+{
+ QDateTime d = QDateTime::fromString(s, Qt::ISODate);
+ if (ok) *ok = d.isValid();
+ return d;
+}
+
+//expects input of "x,y"
+QPointF QDeclarativeStringConverters::pointFFromString(const QString &s, bool *ok)
+{
+ if (s.count(QLatin1Char(',')) != 1) {
+ if (ok)
+ *ok = false;
+ return QPointF();
+ }
+
+ bool xGood, yGood;
+ int index = s.indexOf(QLatin1Char(','));
+ qreal xCoord = s.left(index).toDouble(&xGood);
+ qreal yCoord = s.mid(index+1).toDouble(&yGood);
+ if (!xGood || !yGood) {
+ if (ok)
+ *ok = false;
+ return QPointF();
+ }
+
+ if (ok)
+ *ok = true;
+ return QPointF(xCoord, yCoord);
+}
+
+//expects input of "widthxheight"
+QSizeF QDeclarativeStringConverters::sizeFFromString(const QString &s, bool *ok)
+{
+ if (s.count(QLatin1Char('x')) != 1) {
+ if (ok)
+ *ok = false;
+ return QSizeF();
+ }
+
+ bool wGood, hGood;
+ int index = s.indexOf(QLatin1Char('x'));
+ qreal width = s.left(index).toDouble(&wGood);
+ qreal height = s.mid(index+1).toDouble(&hGood);
+ if (!wGood || !hGood) {
+ if (ok)
+ *ok = false;
+ return QSizeF();
+ }
+
+ if (ok)
+ *ok = true;
+ return QSizeF(width, height);
+}
+
+//expects input of "x,y,widthxheight" //### use space instead of second comma?
+QRectF QDeclarativeStringConverters::rectFFromString(const QString &s, bool *ok)
+{
+ if (s.count(QLatin1Char(',')) != 2 || s.count(QLatin1Char('x')) != 1) {
+ if (ok)
+ *ok = false;
+ return QRectF();
+ }
+
+ bool xGood, yGood, wGood, hGood;
+ int index = s.indexOf(QLatin1Char(','));
+ qreal x = s.left(index).toDouble(&xGood);
+ int index2 = s.indexOf(QLatin1Char(','), index+1);
+ qreal y = s.mid(index+1, index2-index-1).toDouble(&yGood);
+ index = s.indexOf(QLatin1Char('x'), index2+1);
+ qreal width = s.mid(index2+1, index-index2-1).toDouble(&wGood);
+ qreal height = s.mid(index+1).toDouble(&hGood);
+ if (!xGood || !yGood || !wGood || !hGood) {
+ if (ok)
+ *ok = false;
+ return QRectF();
+ }
+
+ if (ok)
+ *ok = true;
+ return QRectF(x, y, width, height);
+}
+
+//expects input of "x,y,z"
+QVector3D QDeclarativeStringConverters::vector3DFromString(const QString &s, bool *ok)
+{
+ if (s.count(QLatin1Char(',')) != 2) {
+ if (ok)
+ *ok = false;
+ return QVector3D();
+ }
+
+ bool xGood, yGood, zGood;
+ int index = s.indexOf(QLatin1Char(','));
+ int index2 = s.indexOf(QLatin1Char(','), index+1);
+ qreal xCoord = s.left(index).toDouble(&xGood);
+ qreal yCoord = s.mid(index+1, index2-index-1).toDouble(&yGood);
+ qreal zCoord = s.mid(index2+1).toDouble(&zGood);
+ if (!xGood || !yGood || !zGood) {
+ if (ok)
+ *ok = false;
+ return QVector3D();
+ }
+
+ if (ok)
+ *ok = true;
+ return QVector3D(xCoord, yCoord, zCoord);
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativestringconverters_p.h b/src/declarative/qml/qdeclarativestringconverters_p.h
new file mode 100644
index 0000000000..7afdfd3113
--- /dev/null
+++ b/src/declarative/qml/qdeclarativestringconverters_p.h
@@ -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 QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVESTRINGCONVERTERS_P_H
+#define QDECLARATIVESTRINGCONVERTERS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qglobal.h>
+#include <QtCore/qvariant.h>
+
+QT_BEGIN_NAMESPACE
+
+class QColor;
+class QPointF;
+class QSizeF;
+class QRectF;
+class QString;
+class QByteArray;
+class QVector3D;
+
+// XXX - Bauhaus currently uses these methods which is why they're exported
+namespace QDeclarativeStringConverters
+{
+ QVariant Q_DECLARATIVE_EXPORT variantFromString(const QString &);
+ QVariant Q_DECLARATIVE_EXPORT variantFromString(const QString &, int preferredType, bool *ok = 0);
+
+ QColor Q_DECLARATIVE_EXPORT colorFromString(const QString &, bool *ok = 0);
+ QDate Q_DECLARATIVE_EXPORT dateFromString(const QString &, bool *ok = 0);
+ QTime Q_DECLARATIVE_EXPORT timeFromString(const QString &, bool *ok = 0);
+ QDateTime Q_DECLARATIVE_EXPORT dateTimeFromString(const QString &, bool *ok = 0);
+ QPointF Q_DECLARATIVE_EXPORT pointFFromString(const QString &, bool *ok = 0);
+ QSizeF Q_DECLARATIVE_EXPORT sizeFFromString(const QString &, bool *ok = 0);
+ QRectF Q_DECLARATIVE_EXPORT rectFFromString(const QString &, bool *ok = 0);
+ QVector3D Q_DECLARATIVE_EXPORT vector3DFromString(const QString &, bool *ok = 0);
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVESTRINGCONVERTERS_P_H
diff --git a/src/declarative/qml/qdeclarativetypenamecache.cpp b/src/declarative/qml/qdeclarativetypenamecache.cpp
new file mode 100644
index 0000000000..f94f9441c2
--- /dev/null
+++ b/src/declarative/qml/qdeclarativetypenamecache.cpp
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativetypenamecache_p.h"
+
+#include "qdeclarativeengine_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeTypeNameCache::QDeclarativeTypeNameCache(QDeclarativeEngine *e)
+: QDeclarativeCleanup(e), engine(e)
+{
+}
+
+QDeclarativeTypeNameCache::~QDeclarativeTypeNameCache()
+{
+ clear();
+}
+
+void QDeclarativeTypeNameCache::clear()
+{
+ qDeleteAll(stringCache);
+ stringCache.clear();
+ identifierCache.clear();
+ engine = 0;
+}
+
+void QDeclarativeTypeNameCache::add(const QString &name, QDeclarativeType *type)
+{
+ if (stringCache.contains(name))
+ return;
+
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+
+ RData *data = new RData;
+ // ### Use typename class
+ data->identifier = ep->objectClass->createPersistentIdentifier(name);
+ data->type = type;
+ stringCache.insert(name, data);
+ identifierCache.insert(data->identifier.identifier, data);
+}
+
+void QDeclarativeTypeNameCache::add(const QString &name, QDeclarativeTypeNameCache *typeNamespace)
+{
+ if (stringCache.contains(name))
+ return;
+
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+
+ RData *data = new RData;
+ // ### Use typename class
+ data->identifier = ep->objectClass->createPersistentIdentifier(name);
+ data->typeNamespace = typeNamespace;
+ stringCache.insert(name, data);
+ identifierCache.insert(data->identifier.identifier, data);
+ typeNamespace->addref();
+}
+
+QDeclarativeTypeNameCache::Data *QDeclarativeTypeNameCache::data(const QString &id) const
+{
+ return stringCache.value(id);
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/declarative/qml/qdeclarativetypenamecache_p.h b/src/declarative/qml/qdeclarativetypenamecache_p.h
new file mode 100644
index 0000000000..eee5b77dd8
--- /dev/null
+++ b/src/declarative/qml/qdeclarativetypenamecache_p.h
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVETYPENAMECACHE_P_H
+#define QDECLARATIVETYPENAMECACHE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativerefcount_p.h"
+#include "qdeclarativecleanup_p.h"
+
+#include <private/qscriptdeclarativeclass_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeType;
+class QDeclarativeEngine;
+class QDeclarativeTypeNameCache : public QDeclarativeRefCount, public QDeclarativeCleanup
+{
+public:
+ QDeclarativeTypeNameCache(QDeclarativeEngine *);
+ virtual ~QDeclarativeTypeNameCache();
+
+ struct Data {
+ inline Data();
+ inline ~Data();
+ QDeclarativeType *type;
+ QDeclarativeTypeNameCache *typeNamespace;
+ };
+
+ void add(const QString &, QDeclarativeType *);
+ void add(const QString &, QDeclarativeTypeNameCache *);
+
+ Data *data(const QString &) const;
+ inline Data *data(const QScriptDeclarativeClass::Identifier &id) const;
+
+protected:
+ virtual void clear();
+
+private:
+ struct RData : public Data {
+ QScriptDeclarativeClass::PersistentIdentifier identifier;
+ };
+ typedef QHash<QString, RData *> StringCache;
+ typedef QHash<QScriptDeclarativeClass::Identifier, RData *> IdentifierCache;
+
+ StringCache stringCache;
+ IdentifierCache identifierCache;
+ QDeclarativeEngine *engine;
+};
+
+QDeclarativeTypeNameCache::Data::Data()
+: type(0), typeNamespace(0)
+{
+}
+
+QDeclarativeTypeNameCache::Data::~Data()
+{
+ if (typeNamespace) typeNamespace->release();
+}
+
+QDeclarativeTypeNameCache::Data *QDeclarativeTypeNameCache::data(const QScriptDeclarativeClass::Identifier &id) const
+{
+ return identifierCache.value(id);
+}
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVETYPENAMECACHE_P_H
+
diff --git a/src/declarative/qml/qdeclarativetypenamescriptclass.cpp b/src/declarative/qml/qdeclarativetypenamescriptclass.cpp
new file mode 100644
index 0000000000..02370e0716
--- /dev/null
+++ b/src/declarative/qml/qdeclarativetypenamescriptclass.cpp
@@ -0,0 +1,166 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativetypenamescriptclass_p.h"
+
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativetypenamecache_p.h"
+
+QT_BEGIN_NAMESPACE
+
+struct TypeNameData : public QScriptDeclarativeClass::Object {
+ TypeNameData(QObject *o, QDeclarativeType *t, QDeclarativeTypeNameScriptClass::TypeNameMode m) : object(o), type(t), typeNamespace(0), mode(m) {}
+ TypeNameData(QObject *o, QDeclarativeTypeNameCache *n, QDeclarativeTypeNameScriptClass::TypeNameMode m) : object(o), type(0), typeNamespace(n), mode(m) {
+ if (typeNamespace) typeNamespace->addref();
+ }
+ ~TypeNameData() {
+ if (typeNamespace) typeNamespace->release();
+ }
+
+ QObject *object;
+ QDeclarativeType *type;
+ QDeclarativeTypeNameCache *typeNamespace;
+ QDeclarativeTypeNameScriptClass::TypeNameMode mode;
+};
+
+QDeclarativeTypeNameScriptClass::QDeclarativeTypeNameScriptClass(QDeclarativeEngine *bindEngine)
+: QDeclarativeScriptClass(QDeclarativeEnginePrivate::getScriptEngine(bindEngine)),
+ engine(bindEngine), object(0), type(0)
+{
+}
+
+QDeclarativeTypeNameScriptClass::~QDeclarativeTypeNameScriptClass()
+{
+}
+
+QScriptValue QDeclarativeTypeNameScriptClass::newObject(QObject *object, QDeclarativeType *type, TypeNameMode mode)
+{
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+
+ return QScriptDeclarativeClass::newObject(scriptEngine, this, new TypeNameData(object, type, mode));
+}
+
+QScriptValue QDeclarativeTypeNameScriptClass::newObject(QObject *object, QDeclarativeTypeNameCache *ns, TypeNameMode mode)
+{
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+
+ return QScriptDeclarativeClass::newObject(scriptEngine, this, new TypeNameData(object, ns, mode));
+}
+
+QScriptClass::QueryFlags
+QDeclarativeTypeNameScriptClass::queryProperty(Object *obj, const Identifier &name,
+ QScriptClass::QueryFlags flags)
+{
+ Q_UNUSED(flags);
+
+ TypeNameData *data = (TypeNameData *)obj;
+
+ object = 0;
+ type = 0;
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+
+ if (data->typeNamespace) {
+
+ QDeclarativeTypeNameCache::Data *d = data->typeNamespace->data(name);
+ if (d && d->type) {
+ type = d->type;
+ return QScriptClass::HandlesReadAccess;
+ } else {
+ return 0;
+ }
+
+ } else {
+ Q_ASSERT(data->type);
+
+ QString strName = toString(name);
+
+ if (strName.at(0).isUpper()) {
+ // Must be an enum
+ if (data->mode == IncludeEnums) {
+ // ### Optimize
+ QByteArray enumName = strName.toUtf8();
+ const QMetaObject *metaObject = data->type->baseMetaObject();
+ for (int ii = metaObject->enumeratorCount() - 1; ii >= 0; --ii) {
+ QMetaEnum e = metaObject->enumerator(ii);
+ int value = e.keyToValue(enumName.constData());
+ if (value != -1) {
+ enumValue = value;
+ return QScriptClass::HandlesReadAccess;
+ }
+ }
+ }
+ return 0;
+ } else if (data->object) {
+ // Must be an attached property
+ object = qmlAttachedPropertiesObjectById(data->type->index(), data->object);
+ if (!object) return 0;
+ return ep->objectClass->queryProperty(object, name, flags, 0);
+ }
+ }
+
+ return 0;
+}
+
+QDeclarativeTypeNameScriptClass::ScriptValue
+QDeclarativeTypeNameScriptClass::property(Object *obj, const Identifier &name)
+{
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+ if (type) {
+ return Value(scriptEngine, newObject(((TypeNameData *)obj)->object, type, ((TypeNameData *)obj)->mode));
+ } else if (object) {
+ return ep->objectClass->property(object, name);
+ } else {
+ return Value(scriptEngine, enumValue);
+ }
+}
+
+void QDeclarativeTypeNameScriptClass::setProperty(Object *o, const Identifier &n, const QScriptValue &v)
+{
+ Q_ASSERT(object);
+ Q_ASSERT(!type);
+
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+ ep->objectClass->setProperty(((TypeNameData *)o)->object, n, v);
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/declarative/qml/qdeclarativetypenamescriptclass_p.h b/src/declarative/qml/qdeclarativetypenamescriptclass_p.h
new file mode 100644
index 0000000000..b6e3f514d2
--- /dev/null
+++ b/src/declarative/qml/qdeclarativetypenamescriptclass_p.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVETYPENAMESCRIPTCLASS_P_H
+#define QDECLARATIVETYPENAMESCRIPTCLASS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+#include "qdeclarativeengine_p.h"
+
+#include <QtScript/qscriptclass.h>
+
+#include <private/qdeclarativescriptclass_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeEngine;
+class QDeclarativeType;
+class QDeclarativeTypeNameCache;
+class QDeclarativeTypeNameScriptClass : public QDeclarativeScriptClass
+{
+public:
+ QDeclarativeTypeNameScriptClass(QDeclarativeEngine *);
+ ~QDeclarativeTypeNameScriptClass();
+
+ enum TypeNameMode { IncludeEnums, ExcludeEnums };
+ QScriptValue newObject(QObject *, QDeclarativeType *, TypeNameMode = IncludeEnums);
+ QScriptValue newObject(QObject *, QDeclarativeTypeNameCache *, TypeNameMode = IncludeEnums);
+
+protected:
+ virtual QScriptClass::QueryFlags queryProperty(Object *, const Identifier &,
+ QScriptClass::QueryFlags flags);
+
+ virtual ScriptValue property(Object *, const Identifier &);
+ virtual void setProperty(Object *, const Identifier &name, const QScriptValue &);
+
+private:
+ QDeclarativeEngine *engine;
+ QObject *object;
+ QDeclarativeType *type;
+ quint32 enumValue;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVETYPENAMESCRIPTCLASS_P_H
+
diff --git a/src/declarative/qml/qdeclarativevaluetype.cpp b/src/declarative/qml/qdeclarativevaluetype.cpp
new file mode 100644
index 0000000000..c070123e47
--- /dev/null
+++ b/src/declarative/qml/qdeclarativevaluetype.cpp
@@ -0,0 +1,781 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativevaluetype_p.h"
+
+#include "qdeclarativemetatype_p.h"
+
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+#if (QT_VERSION < QT_VERSION_CHECK(4,7,0))
+Q_DECLARE_METATYPE(QEasingCurve);
+#endif
+
+template<typename T>
+int qmlRegisterValueTypeEnums(const char *qmlName)
+{
+ QByteArray name(T::staticMetaObject.className());
+
+ QByteArray pointerName(name + '*');
+
+ QDeclarativePrivate::RegisterType type = {
+ 0,
+
+ qRegisterMetaType<T *>(pointerName.constData()), 0, 0,
+
+ "Qt", 4, 6, qmlName, &T::staticMetaObject,
+
+ 0, 0,
+
+ 0, 0, 0,
+
+ 0, 0,
+
+ 0
+ };
+
+ return QDeclarativePrivate::registerType(type);
+}
+
+QDeclarativeValueTypeFactory::QDeclarativeValueTypeFactory()
+{
+ // ### Optimize
+ for (unsigned int ii = 0; ii < (QVariant::UserType - 1); ++ii)
+ valueTypes[ii] = valueType(ii);
+#if (QT_VERSION < QT_VERSION_CHECK(4,7,0))
+ easingType = qMetaTypeId<QEasingCurve>();
+ easingValueType = valueType(easingType);
+#endif
+}
+
+QDeclarativeValueTypeFactory::~QDeclarativeValueTypeFactory()
+{
+ for (unsigned int ii = 0; ii < (QVariant::UserType - 1); ++ii)
+ delete valueTypes[ii];
+#if (QT_VERSION < QT_VERSION_CHECK(4,7,0))
+ delete easingValueType;
+#endif
+}
+
+bool QDeclarativeValueTypeFactory::isValueType(int idx)
+{
+ if ((uint)idx < QVariant::UserType)
+ return true;
+#if (QT_VERSION < QT_VERSION_CHECK(4,7,0))
+ if (idx == qMetaTypeId<QEasingCurve>())
+ return true;
+#endif
+ return false;
+}
+
+void QDeclarativeValueTypeFactory::registerValueTypes()
+{
+ qmlRegisterValueTypeEnums<QDeclarativeEasingValueType>("Easing");
+ qmlRegisterValueTypeEnums<QDeclarativeFontValueType>("Font");
+}
+
+QDeclarativeValueType *QDeclarativeValueTypeFactory::operator[](int idx) const
+{
+#if (QT_VERSION < QT_VERSION_CHECK(4,7,0))
+ if (idx == easingType) return easingValueType;
+#endif
+ return valueTypes[idx];
+}
+
+
+QDeclarativeValueType *QDeclarativeValueTypeFactory::valueType(int t)
+{
+ switch (t) {
+ case QVariant::Point:
+ return new QDeclarativePointValueType;
+ case QVariant::PointF:
+ return new QDeclarativePointFValueType;
+ case QVariant::Size:
+ return new QDeclarativeSizeValueType;
+ case QVariant::SizeF:
+ return new QDeclarativeSizeFValueType;
+ case QVariant::Rect:
+ return new QDeclarativeRectValueType;
+ case QVariant::RectF:
+ return new QDeclarativeRectFValueType;
+ case QVariant::Vector3D:
+ return new QDeclarativeVector3DValueType;
+#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0))
+ case QVariant::EasingCurve:
+ return new QDeclarativeEasingValueType;
+#endif
+ case QVariant::Font:
+ return new QDeclarativeFontValueType;
+ default:
+#if (QT_VERSION < QT_VERSION_CHECK(4,7,0))
+ if (t == qMetaTypeId<QEasingCurve>())
+ return new QDeclarativeEasingValueType;
+#endif
+ return 0;
+ }
+}
+
+QDeclarativeValueType::QDeclarativeValueType(QObject *parent)
+: QObject(parent)
+{
+}
+
+QDeclarativePointFValueType::QDeclarativePointFValueType(QObject *parent)
+: QDeclarativeValueType(parent)
+{
+}
+
+void QDeclarativePointFValueType::read(QObject *obj, int idx)
+{
+ void *a[] = { &point, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, idx, a);
+}
+
+void QDeclarativePointFValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
+{
+ int status = -1;
+ void *a[] = { &point, 0, &status, &flags };
+ QMetaObject::metacall(obj, QMetaObject::WriteProperty, idx, a);
+}
+
+QVariant QDeclarativePointFValueType::value()
+{
+ return QVariant(point);
+}
+
+void QDeclarativePointFValueType::setValue(QVariant value)
+{
+ point = qvariant_cast<QPointF>(value);
+}
+
+qreal QDeclarativePointFValueType::x() const
+{
+ return point.x();
+}
+
+qreal QDeclarativePointFValueType::y() const
+{
+ return point.y();
+}
+
+void QDeclarativePointFValueType::setX(qreal x)
+{
+ point.setX(x);
+}
+
+void QDeclarativePointFValueType::setY(qreal y)
+{
+ point.setY(y);
+}
+
+QDeclarativePointValueType::QDeclarativePointValueType(QObject *parent)
+: QDeclarativeValueType(parent)
+{
+}
+
+void QDeclarativePointValueType::read(QObject *obj, int idx)
+{
+ void *a[] = { &point, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, idx, a);
+}
+
+void QDeclarativePointValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
+{
+ int status = -1;
+ void *a[] = { &point, 0, &status, &flags };
+ QMetaObject::metacall(obj, QMetaObject::WriteProperty, idx, a);
+}
+
+QVariant QDeclarativePointValueType::value()
+{
+ return QVariant(point);
+}
+
+void QDeclarativePointValueType::setValue(QVariant value)
+{
+ point = qvariant_cast<QPoint>(value);
+}
+
+int QDeclarativePointValueType::x() const
+{
+ return point.x();
+}
+
+int QDeclarativePointValueType::y() const
+{
+ return point.y();
+}
+
+void QDeclarativePointValueType::setX(int x)
+{
+ point.setX(x);
+}
+
+void QDeclarativePointValueType::setY(int y)
+{
+ point.setY(y);
+}
+
+QDeclarativeSizeFValueType::QDeclarativeSizeFValueType(QObject *parent)
+: QDeclarativeValueType(parent)
+{
+}
+
+void QDeclarativeSizeFValueType::read(QObject *obj, int idx)
+{
+ void *a[] = { &size, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, idx, a);
+}
+
+void QDeclarativeSizeFValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
+{
+ int status = -1;
+ void *a[] = { &size, 0, &status, &flags };
+ QMetaObject::metacall(obj, QMetaObject::WriteProperty, idx, a);
+}
+
+QVariant QDeclarativeSizeFValueType::value()
+{
+ return QVariant(size);
+}
+
+void QDeclarativeSizeFValueType::setValue(QVariant value)
+{
+ size = qvariant_cast<QSizeF>(value);
+}
+
+qreal QDeclarativeSizeFValueType::width() const
+{
+ return size.width();
+}
+
+qreal QDeclarativeSizeFValueType::height() const
+{
+ return size.height();
+}
+
+void QDeclarativeSizeFValueType::setWidth(qreal w)
+{
+ size.setWidth(w);
+}
+
+void QDeclarativeSizeFValueType::setHeight(qreal h)
+{
+ size.setHeight(h);
+}
+
+QDeclarativeSizeValueType::QDeclarativeSizeValueType(QObject *parent)
+: QDeclarativeValueType(parent)
+{
+}
+
+void QDeclarativeSizeValueType::read(QObject *obj, int idx)
+{
+ void *a[] = { &size, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, idx, a);
+}
+
+void QDeclarativeSizeValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
+{
+ int status = -1;
+ void *a[] = { &size, 0, &status, &flags };
+ QMetaObject::metacall(obj, QMetaObject::WriteProperty, idx, a);
+}
+
+QVariant QDeclarativeSizeValueType::value()
+{
+ return QVariant(size);
+}
+
+void QDeclarativeSizeValueType::setValue(QVariant value)
+{
+ size = qvariant_cast<QSize>(value);
+}
+
+int QDeclarativeSizeValueType::width() const
+{
+ return size.width();
+}
+
+int QDeclarativeSizeValueType::height() const
+{
+ return size.height();
+}
+
+void QDeclarativeSizeValueType::setWidth(int w)
+{
+ size.setWidth(w);
+}
+
+void QDeclarativeSizeValueType::setHeight(int h)
+{
+ size.setHeight(h);
+}
+
+QDeclarativeRectFValueType::QDeclarativeRectFValueType(QObject *parent)
+: QDeclarativeValueType(parent)
+{
+}
+
+void QDeclarativeRectFValueType::read(QObject *obj, int idx)
+{
+ void *a[] = { &rect, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, idx, a);
+}
+
+void QDeclarativeRectFValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
+{
+ int status = -1;
+ void *a[] = { &rect, 0, &status, &flags };
+ QMetaObject::metacall(obj, QMetaObject::WriteProperty, idx, a);
+}
+
+QVariant QDeclarativeRectFValueType::value()
+{
+ return QVariant(rect);
+}
+
+void QDeclarativeRectFValueType::setValue(QVariant value)
+{
+ rect = qvariant_cast<QRectF>(value);
+}
+
+qreal QDeclarativeRectFValueType::x() const
+{
+ return rect.x();
+}
+
+qreal QDeclarativeRectFValueType::y() const
+{
+ return rect.y();
+}
+
+void QDeclarativeRectFValueType::setX(qreal x)
+{
+ rect.moveLeft(x);
+}
+
+void QDeclarativeRectFValueType::setY(qreal y)
+{
+ rect.moveTop(y);
+}
+
+qreal QDeclarativeRectFValueType::width() const
+{
+ return rect.width();
+}
+
+qreal QDeclarativeRectFValueType::height() const
+{
+ return rect.height();
+}
+
+void QDeclarativeRectFValueType::setWidth(qreal w)
+{
+ rect.setWidth(w);
+}
+
+void QDeclarativeRectFValueType::setHeight(qreal h)
+{
+ rect.setHeight(h);
+}
+
+QDeclarativeRectValueType::QDeclarativeRectValueType(QObject *parent)
+: QDeclarativeValueType(parent)
+{
+}
+
+void QDeclarativeRectValueType::read(QObject *obj, int idx)
+{
+ void *a[] = { &rect, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, idx, a);
+}
+
+void QDeclarativeRectValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
+{
+ int status = -1;
+ void *a[] = { &rect, 0, &status, &flags };
+ QMetaObject::metacall(obj, QMetaObject::WriteProperty, idx, a);
+}
+
+QVariant QDeclarativeRectValueType::value()
+{
+ return QVariant(rect);
+}
+
+void QDeclarativeRectValueType::setValue(QVariant value)
+{
+ rect = qvariant_cast<QRect>(value);
+}
+
+int QDeclarativeRectValueType::x() const
+{
+ return rect.x();
+}
+
+int QDeclarativeRectValueType::y() const
+{
+ return rect.y();
+}
+
+void QDeclarativeRectValueType::setX(int x)
+{
+ rect.moveLeft(x);
+}
+
+void QDeclarativeRectValueType::setY(int y)
+{
+ rect.moveTop(y);
+}
+
+int QDeclarativeRectValueType::width() const
+{
+ return rect.width();
+}
+
+int QDeclarativeRectValueType::height() const
+{
+ return rect.height();
+}
+
+void QDeclarativeRectValueType::setWidth(int w)
+{
+ rect.setWidth(w);
+}
+
+void QDeclarativeRectValueType::setHeight(int h)
+{
+ rect.setHeight(h);
+}
+
+QDeclarativeVector3DValueType::QDeclarativeVector3DValueType(QObject *parent)
+: QDeclarativeValueType(parent)
+{
+}
+
+void QDeclarativeVector3DValueType::read(QObject *obj, int idx)
+{
+ void *a[] = { &vector, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, idx, a);
+}
+
+void QDeclarativeVector3DValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
+{
+ int status = -1;
+ void *a[] = { &vector, 0, &status, &flags };
+ QMetaObject::metacall(obj, QMetaObject::WriteProperty, idx, a);
+}
+
+QVariant QDeclarativeVector3DValueType::value()
+{
+ return QVariant(vector);
+}
+
+void QDeclarativeVector3DValueType::setValue(QVariant value)
+{
+ vector = qvariant_cast<QVector3D>(value);
+}
+
+qreal QDeclarativeVector3DValueType::x() const
+{
+ return vector.x();
+}
+
+qreal QDeclarativeVector3DValueType::y() const
+{
+ return vector.y();
+}
+
+qreal QDeclarativeVector3DValueType::z() const
+{
+ return vector.z();
+}
+
+void QDeclarativeVector3DValueType::setX(qreal x)
+{
+ vector.setX(x);
+}
+
+void QDeclarativeVector3DValueType::setY(qreal y)
+{
+ vector.setY(y);
+}
+
+void QDeclarativeVector3DValueType::setZ(qreal z)
+{
+ vector.setZ(z);
+}
+
+QDeclarativeEasingValueType::QDeclarativeEasingValueType(QObject *parent)
+: QDeclarativeValueType(parent)
+{
+}
+
+void QDeclarativeEasingValueType::read(QObject *obj, int idx)
+{
+ void *a[] = { &easing, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, idx, a);
+}
+
+void QDeclarativeEasingValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
+{
+ int status = -1;
+ void *a[] = { &easing, 0, &status, &flags };
+ QMetaObject::metacall(obj, QMetaObject::WriteProperty, idx, a);
+}
+
+QVariant QDeclarativeEasingValueType::value()
+{
+#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0))
+ return QVariant(easing);
+#else
+ return QVariant::fromValue<QEasingCurve>(easing);
+#endif
+}
+
+void QDeclarativeEasingValueType::setValue(QVariant value)
+{
+ easing = qvariant_cast<QEasingCurve>(value);
+}
+
+QDeclarativeEasingValueType::Type QDeclarativeEasingValueType::type() const
+{
+ return (QDeclarativeEasingValueType::Type)easing.type();
+}
+
+qreal QDeclarativeEasingValueType::amplitude() const
+{
+ return easing.amplitude();
+}
+
+qreal QDeclarativeEasingValueType::overshoot() const
+{
+ return easing.overshoot();
+}
+
+qreal QDeclarativeEasingValueType::period() const
+{
+ return easing.period();
+}
+
+void QDeclarativeEasingValueType::setType(QDeclarativeEasingValueType::Type type)
+{
+ easing.setType((QEasingCurve::Type)type);
+}
+
+void QDeclarativeEasingValueType::setAmplitude(qreal amplitude)
+{
+ easing.setAmplitude(amplitude);
+}
+
+void QDeclarativeEasingValueType::setOvershoot(qreal overshoot)
+{
+ easing.setOvershoot(overshoot);
+}
+
+void QDeclarativeEasingValueType::setPeriod(qreal period)
+{
+ easing.setPeriod(period);
+}
+
+QDeclarativeFontValueType::QDeclarativeFontValueType(QObject *parent)
+: QDeclarativeValueType(parent), hasPixelSize(false)
+{
+}
+
+void QDeclarativeFontValueType::read(QObject *obj, int idx)
+{
+ void *a[] = { &font, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, idx, a);
+}
+
+void QDeclarativeFontValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
+{
+ int status = -1;
+ void *a[] = { &font, 0, &status, &flags };
+ QMetaObject::metacall(obj, QMetaObject::WriteProperty, idx, a);
+}
+
+QVariant QDeclarativeFontValueType::value()
+{
+ return QVariant(font);
+}
+
+void QDeclarativeFontValueType::setValue(QVariant value)
+{
+ font = qvariant_cast<QFont>(value);
+}
+
+
+QString QDeclarativeFontValueType::family() const
+{
+ return font.family();
+}
+
+void QDeclarativeFontValueType::setFamily(const QString &family)
+{
+ font.setFamily(family);
+}
+
+bool QDeclarativeFontValueType::bold() const
+{
+ return font.bold();
+}
+
+void QDeclarativeFontValueType::setBold(bool b)
+{
+ font.setBold(b);
+}
+
+QDeclarativeFontValueType::FontWeight QDeclarativeFontValueType::weight() const
+{
+ return (QDeclarativeFontValueType::FontWeight)font.weight();
+}
+
+void QDeclarativeFontValueType::setWeight(QDeclarativeFontValueType::FontWeight w)
+{
+ font.setWeight((QFont::Weight)w);
+}
+
+bool QDeclarativeFontValueType::italic() const
+{
+ return font.italic();
+}
+
+void QDeclarativeFontValueType::setItalic(bool b)
+{
+ font.setItalic(b);
+}
+
+bool QDeclarativeFontValueType::underline() const
+{
+ return font.underline();
+}
+
+void QDeclarativeFontValueType::setUnderline(bool b)
+{
+ font.setUnderline(b);
+}
+
+bool QDeclarativeFontValueType::overline() const
+{
+ return font.overline();
+}
+
+void QDeclarativeFontValueType::setOverline(bool b)
+{
+ font.setOverline(b);
+}
+
+bool QDeclarativeFontValueType::strikeout() const
+{
+ return font.strikeOut();
+}
+
+void QDeclarativeFontValueType::setStrikeout(bool b)
+{
+ font.setStrikeOut(b);
+}
+
+qreal QDeclarativeFontValueType::pointSize() const
+{
+ return font.pointSizeF();
+}
+
+void QDeclarativeFontValueType::setPointSize(qreal size)
+{
+ if (hasPixelSize) {
+ qWarning() << "Both point size and pixel size set. Using pixel size.";
+ return;
+ }
+
+ if (size >= 0.0)
+ font.setPointSizeF(size);
+}
+
+int QDeclarativeFontValueType::pixelSize() const
+{
+ return font.pixelSize();
+}
+
+void QDeclarativeFontValueType::setPixelSize(int size)
+{
+ if (size >=0) {
+ font.setPixelSize(size);
+ hasPixelSize = true;
+ } else {
+ hasPixelSize = false;
+ }
+}
+
+QDeclarativeFontValueType::Capitalization QDeclarativeFontValueType::capitalization() const
+{
+ return (QDeclarativeFontValueType::Capitalization)font.capitalization();
+}
+
+void QDeclarativeFontValueType::setCapitalization(QDeclarativeFontValueType::Capitalization c)
+{
+ font.setCapitalization((QFont::Capitalization)c);
+}
+
+qreal QDeclarativeFontValueType::letterSpacing() const
+{
+ return font.letterSpacing();
+}
+
+void QDeclarativeFontValueType::setLetterSpacing(qreal size)
+{
+ font.setLetterSpacing(QFont::PercentageSpacing, size);
+}
+
+qreal QDeclarativeFontValueType::wordSpacing() const
+{
+ return font.wordSpacing();
+}
+
+void QDeclarativeFontValueType::setWordSpacing(qreal size)
+{
+ font.setWordSpacing(size);
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativevaluetype_p.h b/src/declarative/qml/qdeclarativevaluetype_p.h
new file mode 100644
index 0000000000..ad2f6c4200
--- /dev/null
+++ b/src/declarative/qml/qdeclarativevaluetype_p.h
@@ -0,0 +1,407 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEVALUETYPE_P_H
+#define QDECLARATIVEVALUETYPE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeproperty.h"
+#include "qdeclarativeproperty_p.h"
+
+#include <QtCore/qobject.h>
+#include <QtCore/qrect.h>
+#include <QtCore/qeasingcurve.h>
+#include <QtCore/qvariant.h>
+#include <QtGui/qvector3d.h>
+#include <QtGui/qfont.h>
+
+QT_BEGIN_NAMESPACE
+
+class Q_DECLARATIVE_EXPORT QDeclarativeValueType : public QObject
+{
+ Q_OBJECT
+public:
+ QDeclarativeValueType(QObject *parent = 0);
+ virtual void read(QObject *, int) = 0;
+ virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags flags) = 0;
+ virtual QVariant value() = 0;
+ virtual void setValue(QVariant) = 0;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeValueTypeFactory
+{
+public:
+ QDeclarativeValueTypeFactory();
+ ~QDeclarativeValueTypeFactory();
+ static bool isValueType(int);
+ static QDeclarativeValueType *valueType(int);
+
+ static void registerValueTypes();
+
+ QDeclarativeValueType *operator[](int idx) const;
+
+private:
+ QDeclarativeValueType *valueTypes[QVariant::UserType - 1];
+#if (QT_VERSION < QT_VERSION_CHECK(4,7,0))
+ int easingType;
+ QDeclarativeValueType *easingValueType;
+#endif
+};
+
+class Q_AUTOTEST_EXPORT QDeclarativePointFValueType : public QDeclarativeValueType
+{
+ Q_PROPERTY(qreal x READ x WRITE setX)
+ Q_PROPERTY(qreal y READ y WRITE setY)
+ Q_OBJECT
+public:
+ QDeclarativePointFValueType(QObject *parent = 0);
+
+ virtual void read(QObject *, int);
+ virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags);
+ virtual QVariant value();
+ virtual void setValue(QVariant value);
+
+ qreal x() const;
+ qreal y() const;
+ void setX(qreal);
+ void setY(qreal);
+
+private:
+ QPointF point;
+};
+
+class Q_AUTOTEST_EXPORT QDeclarativePointValueType : public QDeclarativeValueType
+{
+ Q_PROPERTY(int x READ x WRITE setX)
+ Q_PROPERTY(int y READ y WRITE setY)
+ Q_OBJECT
+public:
+ QDeclarativePointValueType(QObject *parent = 0);
+
+ virtual void read(QObject *, int);
+ virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags);
+ virtual QVariant value();
+ virtual void setValue(QVariant value);
+
+ int x() const;
+ int y() const;
+ void setX(int);
+ void setY(int);
+
+private:
+ QPoint point;
+};
+
+class Q_AUTOTEST_EXPORT QDeclarativeSizeFValueType : public QDeclarativeValueType
+{
+ Q_PROPERTY(qreal width READ width WRITE setWidth)
+ Q_PROPERTY(qreal height READ height WRITE setHeight)
+ Q_OBJECT
+public:
+ QDeclarativeSizeFValueType(QObject *parent = 0);
+
+ virtual void read(QObject *, int);
+ virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags);
+ virtual QVariant value();
+ virtual void setValue(QVariant value);
+
+ qreal width() const;
+ qreal height() const;
+ void setWidth(qreal);
+ void setHeight(qreal);
+
+private:
+ QSizeF size;
+};
+
+class Q_AUTOTEST_EXPORT QDeclarativeSizeValueType : public QDeclarativeValueType
+{
+ Q_PROPERTY(int width READ width WRITE setWidth)
+ Q_PROPERTY(int height READ height WRITE setHeight)
+ Q_OBJECT
+public:
+ QDeclarativeSizeValueType(QObject *parent = 0);
+
+ virtual void read(QObject *, int);
+ virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags);
+ virtual QVariant value();
+ virtual void setValue(QVariant value);
+
+ int width() const;
+ int height() const;
+ void setWidth(int);
+ void setHeight(int);
+
+private:
+ QSize size;
+};
+
+class Q_AUTOTEST_EXPORT QDeclarativeRectFValueType : public QDeclarativeValueType
+{
+ Q_PROPERTY(qreal x READ x WRITE setX)
+ Q_PROPERTY(qreal y READ y WRITE setY)
+ Q_PROPERTY(qreal width READ width WRITE setWidth)
+ Q_PROPERTY(qreal height READ height WRITE setHeight)
+ Q_OBJECT
+public:
+ QDeclarativeRectFValueType(QObject *parent = 0);
+
+ virtual void read(QObject *, int);
+ virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags);
+ virtual QVariant value();
+ virtual void setValue(QVariant value);
+
+ qreal x() const;
+ qreal y() const;
+ void setX(qreal);
+ void setY(qreal);
+
+ qreal width() const;
+ qreal height() const;
+ void setWidth(qreal);
+ void setHeight(qreal);
+
+private:
+ QRectF rect;
+};
+
+class Q_AUTOTEST_EXPORT QDeclarativeRectValueType : public QDeclarativeValueType
+{
+ Q_PROPERTY(int x READ x WRITE setX)
+ Q_PROPERTY(int y READ y WRITE setY)
+ Q_PROPERTY(int width READ width WRITE setWidth)
+ Q_PROPERTY(int height READ height WRITE setHeight)
+ Q_OBJECT
+public:
+ QDeclarativeRectValueType(QObject *parent = 0);
+
+ virtual void read(QObject *, int);
+ virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags);
+ virtual QVariant value();
+ virtual void setValue(QVariant value);
+
+ int x() const;
+ int y() const;
+ void setX(int);
+ void setY(int);
+
+ int width() const;
+ int height() const;
+ void setWidth(int);
+ void setHeight(int);
+
+private:
+ QRect rect;
+};
+
+class Q_AUTOTEST_EXPORT QDeclarativeVector3DValueType : public QDeclarativeValueType
+{
+ Q_PROPERTY(qreal x READ x WRITE setX)
+ Q_PROPERTY(qreal y READ y WRITE setY)
+ Q_PROPERTY(qreal z READ z WRITE setZ)
+ Q_OBJECT
+public:
+ QDeclarativeVector3DValueType(QObject *parent = 0);
+
+ virtual void read(QObject *, int);
+ virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags);
+ virtual QVariant value();
+ virtual void setValue(QVariant value);
+
+ qreal x() const;
+ qreal y() const;
+ qreal z() const;
+ void setX(qreal);
+ void setY(qreal);
+ void setZ(qreal);
+
+private:
+ QVector3D vector;
+};
+
+class Q_AUTOTEST_EXPORT QDeclarativeEasingValueType : public QDeclarativeValueType
+{
+ Q_OBJECT
+ Q_ENUMS(Type)
+
+ Q_PROPERTY(QDeclarativeEasingValueType::Type type READ type WRITE setType)
+ Q_PROPERTY(qreal amplitude READ amplitude WRITE setAmplitude)
+ Q_PROPERTY(qreal overshoot READ overshoot WRITE setOvershoot)
+ Q_PROPERTY(qreal period READ period WRITE setPeriod)
+public:
+ enum Type {
+ Linear = QEasingCurve::Linear,
+ InQuad = QEasingCurve::InQuad, OutQuad = QEasingCurve::OutQuad,
+ InOutQuad = QEasingCurve::InOutQuad, OutInQuad = QEasingCurve::OutInQuad,
+ InCubic = QEasingCurve::InCubic, OutCubic = QEasingCurve::OutCubic,
+ InOutCubic = QEasingCurve::InOutCubic, OutInCubic = QEasingCurve::OutInCubic,
+ InQuart = QEasingCurve::InQuart, OutQuart = QEasingCurve::OutQuart,
+ InOutQuart = QEasingCurve::InOutQuart, OutInQuart = QEasingCurve::OutInQuart,
+ InQuint = QEasingCurve::InQuint, OutQuint = QEasingCurve::OutQuint,
+ InOutQuint = QEasingCurve::InOutQuint, OutInQuint = QEasingCurve::OutInQuint,
+ InSine = QEasingCurve::InSine, OutSine = QEasingCurve::OutSine,
+ InOutSine = QEasingCurve::InOutSine, OutInSine = QEasingCurve::OutInSine,
+ InExpo = QEasingCurve::InExpo, OutExpo = QEasingCurve::OutExpo,
+ InOutExpo = QEasingCurve::InOutExpo, OutInExpo = QEasingCurve::OutInExpo,
+ InCirc = QEasingCurve::InCirc, OutCirc = QEasingCurve::OutCirc,
+ InOutCirc = QEasingCurve::InOutCirc, OutInCirc = QEasingCurve::OutInCirc,
+ InElastic = QEasingCurve::InElastic, OutElastic = QEasingCurve::OutElastic,
+ InOutElastic = QEasingCurve::InOutElastic, OutInElastic = QEasingCurve::OutInElastic,
+ InBack = QEasingCurve::InBack, OutBack = QEasingCurve::OutBack,
+ InOutBack = QEasingCurve::InOutBack, OutInBack = QEasingCurve::OutInBack,
+ InBounce = QEasingCurve::InBounce, OutBounce = QEasingCurve::OutBounce,
+ InOutBounce = QEasingCurve::InOutBounce, OutInBounce = QEasingCurve::OutInBounce,
+ InCurve = QEasingCurve::InCurve, OutCurve = QEasingCurve::OutCurve,
+ SineCurve = QEasingCurve::SineCurve, CosineCurve = QEasingCurve::CosineCurve,
+ };
+
+ QDeclarativeEasingValueType(QObject *parent = 0);
+
+ virtual void read(QObject *, int);
+ virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags);
+ virtual QVariant value();
+ virtual void setValue(QVariant value);
+
+ Type type() const;
+ qreal amplitude() const;
+ qreal overshoot() const;
+ qreal period() const;
+ void setType(Type);
+ void setAmplitude(qreal);
+ void setOvershoot(qreal);
+ void setPeriod(qreal);
+
+private:
+ QEasingCurve easing;
+};
+
+class Q_AUTOTEST_EXPORT QDeclarativeFontValueType : public QDeclarativeValueType
+{
+ Q_OBJECT
+ Q_ENUMS(FontWeight)
+ Q_ENUMS(Capitalization)
+
+ Q_PROPERTY(QString family READ family WRITE setFamily)
+ Q_PROPERTY(bool bold READ bold WRITE setBold)
+ Q_PROPERTY(FontWeight weight READ weight WRITE setWeight)
+ Q_PROPERTY(bool italic READ italic WRITE setItalic)
+ Q_PROPERTY(bool underline READ underline WRITE setUnderline)
+ Q_PROPERTY(bool overline READ overline WRITE setOverline)
+ Q_PROPERTY(bool strikeout READ strikeout WRITE setStrikeout)
+ Q_PROPERTY(qreal pointSize READ pointSize WRITE setPointSize)
+ Q_PROPERTY(int pixelSize READ pixelSize WRITE setPixelSize)
+ Q_PROPERTY(Capitalization capitalization READ capitalization WRITE setCapitalization)
+ Q_PROPERTY(qreal letterSpacing READ letterSpacing WRITE setLetterSpacing)
+ Q_PROPERTY(qreal wordSpacing READ wordSpacing WRITE setWordSpacing)
+
+public:
+ enum FontWeight { Light = QFont::Light,
+ Normal = QFont::Normal,
+ DemiBold = QFont::DemiBold,
+ Bold = QFont::Bold,
+ Black = QFont::Black };
+ enum Capitalization { MixedCase = QFont::MixedCase,
+ AllUppercase = QFont::AllUppercase,
+ AllLowercase = QFont::AllLowercase,
+ SmallCaps = QFont::SmallCaps,
+ Capitalize = QFont::Capitalize };
+
+ QDeclarativeFontValueType(QObject *parent = 0);
+
+ virtual void read(QObject *, int);
+ virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags);
+ virtual QVariant value();
+ virtual void setValue(QVariant value);
+
+ QString family() const;
+ void setFamily(const QString &);
+
+ bool bold() const;
+ void setBold(bool b);
+
+ FontWeight weight() const;
+ void setWeight(FontWeight);
+
+ bool italic() const;
+ void setItalic(bool b);
+
+ bool underline() const;
+ void setUnderline(bool b);
+
+ bool overline() const;
+ void setOverline(bool b);
+
+ bool strikeout() const;
+ void setStrikeout(bool b);
+
+ qreal pointSize() const;
+ void setPointSize(qreal size);
+
+ int pixelSize() const;
+ void setPixelSize(int size);
+
+ Capitalization capitalization() const;
+ void setCapitalization(Capitalization);
+
+ qreal letterSpacing() const;
+ void setLetterSpacing(qreal spacing);
+
+ qreal wordSpacing() const;
+ void setWordSpacing(qreal spacing);
+
+private:
+ QFont font;
+ bool hasPixelSize;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEVALUETYPE_P_H
diff --git a/src/declarative/qml/qdeclarativevaluetypescriptclass.cpp b/src/declarative/qml/qdeclarativevaluetypescriptclass.cpp
new file mode 100644
index 0000000000..9cb65f8976
--- /dev/null
+++ b/src/declarative/qml/qdeclarativevaluetypescriptclass.cpp
@@ -0,0 +1,148 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativevaluetypescriptclass_p.h"
+
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativeguard_p.h"
+
+QT_BEGIN_NAMESPACE
+
+struct QDeclarativeValueTypeReference : public QScriptDeclarativeClass::Object {
+ QDeclarativeValueType *type;
+ QDeclarativeGuard<QObject> object;
+ int property;
+};
+
+QDeclarativeValueTypeScriptClass::QDeclarativeValueTypeScriptClass(QDeclarativeEngine *bindEngine)
+: QDeclarativeScriptClass(QDeclarativeEnginePrivate::getScriptEngine(bindEngine)), engine(bindEngine)
+{
+}
+
+QDeclarativeValueTypeScriptClass::~QDeclarativeValueTypeScriptClass()
+{
+}
+
+QScriptValue QDeclarativeValueTypeScriptClass::newObject(QObject *object, int coreIndex, QDeclarativeValueType *type)
+{
+ QDeclarativeValueTypeReference *ref = new QDeclarativeValueTypeReference;
+ ref->type = type;
+ ref->object = object;
+ ref->property = coreIndex;
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+ return QScriptDeclarativeClass::newObject(scriptEngine, this, ref);
+}
+
+QScriptClass::QueryFlags
+QDeclarativeValueTypeScriptClass::queryProperty(Object *obj, const Identifier &name,
+ QScriptClass::QueryFlags)
+{
+ QDeclarativeValueTypeReference *ref = static_cast<QDeclarativeValueTypeReference *>(obj);
+
+ m_lastIndex = -1;
+
+ if (!ref->object)
+ return 0;
+
+ QByteArray propName = toString(name).toUtf8();
+
+ m_lastIndex = ref->type->metaObject()->indexOfProperty(propName.constData());
+ if (m_lastIndex == -1)
+ return 0;
+
+ QMetaProperty prop = ref->object->metaObject()->property(m_lastIndex);
+
+ QScriptClass::QueryFlags rv =
+ QScriptClass::HandlesReadAccess;
+ if (prop.isWritable())
+ rv |= QScriptClass::HandlesWriteAccess;
+
+ return rv;
+}
+
+QDeclarativeValueTypeScriptClass::ScriptValue QDeclarativeValueTypeScriptClass::property(Object *obj, const Identifier &)
+{
+ QDeclarativeValueTypeReference *ref = static_cast<QDeclarativeValueTypeReference *>(obj);
+
+ QMetaProperty p = ref->type->metaObject()->property(m_lastIndex);
+ ref->type->read(ref->object, ref->property);
+ QVariant rv = p.read(ref->type);
+
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+ return Value(scriptEngine, static_cast<QDeclarativeEnginePrivate *>(QObjectPrivate::get(engine))->scriptValueFromVariant(rv));
+}
+
+void QDeclarativeValueTypeScriptClass::setProperty(Object *obj, const Identifier &,
+ const QScriptValue &value)
+{
+ QDeclarativeValueTypeReference *ref = static_cast<QDeclarativeValueTypeReference *>(obj);
+
+ QVariant v = QDeclarativeScriptClass::toVariant(engine, value);
+
+ ref->type->read(ref->object, ref->property);
+ QMetaProperty p = ref->type->metaObject()->property(m_lastIndex);
+ p.write(ref->type, v);
+ ref->type->write(ref->object, ref->property, 0);
+}
+
+QVariant QDeclarativeValueTypeScriptClass::toVariant(Object *obj, bool *ok)
+{
+ QDeclarativeValueTypeReference *ref = static_cast<QDeclarativeValueTypeReference *>(obj);
+
+ if (ok) *ok = true;
+
+ if (ref->object) {
+ ref->type->read(ref->object, ref->property);
+ return ref->type->value();
+ } else {
+ return QVariant();
+ }
+}
+
+QVariant QDeclarativeValueTypeScriptClass::toVariant(const QScriptValue &value)
+{
+ Q_ASSERT(scriptClass(value) == this);
+
+ return toVariant(object(value), 0);
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/declarative/qml/qdeclarativevaluetypescriptclass_p.h b/src/declarative/qml/qdeclarativevaluetypescriptclass_p.h
new file mode 100644
index 0000000000..31bd415a56
--- /dev/null
+++ b/src/declarative/qml/qdeclarativevaluetypescriptclass_p.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEVALUETYPESCRIPTCLASS_P_H
+#define QDECLARATIVEVALUETYPESCRIPTCLASS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+
+#include <private/qdeclarativescriptclass_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeEngine;
+class QDeclarativeValueType;
+class QDeclarativeValueTypeScriptClass : public QDeclarativeScriptClass
+{
+public:
+ QDeclarativeValueTypeScriptClass(QDeclarativeEngine *);
+ ~QDeclarativeValueTypeScriptClass();
+
+ QScriptValue newObject(QObject *object, int coreIndex, QDeclarativeValueType *);
+
+ virtual QScriptClass::QueryFlags queryProperty(Object *, const Identifier &,
+ QScriptClass::QueryFlags flags);
+ virtual ScriptValue property(Object *, const Identifier &);
+ virtual void setProperty(Object *, const Identifier &name, const QScriptValue &);
+
+ virtual QVariant toVariant(Object *, bool *ok = 0);
+ QVariant toVariant(const QScriptValue &);
+private:
+ QDeclarativeEngine *engine;
+ int m_lastIndex;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEVALUETYPESCRIPTCLASS_P_H
+
diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp
new file mode 100644
index 0000000000..6a08674f60
--- /dev/null
+++ b/src/declarative/qml/qdeclarativevme.cpp
@@ -0,0 +1,852 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativevme_p.h"
+
+#include "qdeclarativecompiler_p.h"
+#include "qdeclarativeboundsignal_p.h"
+#include "qdeclarativestringconverters_p.h"
+#include "qmetaobjectbuilder_p.h"
+#include "qdeclarativedeclarativedata_p.h"
+#include "qdeclarative.h"
+#include "qdeclarativecustomparser_p.h"
+#include "qdeclarativeengine.h"
+#include "qdeclarativecontext.h"
+#include "qdeclarativecomponent.h"
+#include "qdeclarativebinding_p.h"
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativecomponent_p.h"
+#include "qdeclarativevmemetaobject_p.h"
+#include "qdeclarativebinding_p_p.h"
+#include "qdeclarativecontext_p.h"
+#include "qdeclarativecompiledbindings_p.h"
+#include "qdeclarativeglobal_p.h"
+#include "qdeclarativescriptstring.h"
+
+#include <qfxperf_p_p.h>
+
+#include <QStack>
+#include <QWidget>
+#include <QColor>
+#include <QPointF>
+#include <QSizeF>
+#include <QRectF>
+#include <QtCore/qdebug.h>
+#include <QtCore/qvarlengtharray.h>
+#include <QtCore/qcoreapplication.h>
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeVME::QDeclarativeVME()
+{
+}
+
+#define VME_EXCEPTION(desc) \
+ { \
+ QDeclarativeError error; \
+ error.setDescription(desc.trimmed()); \
+ error.setLine(instr.line); \
+ error.setUrl(comp->url); \
+ vmeErrors << error; \
+ break; \
+ }
+
+struct ListInstance
+{
+ ListInstance()
+ : type(0) {}
+ ListInstance(int t)
+ : type(t) {}
+
+ int type;
+ QDeclarativeListProperty<void> qListProperty;
+};
+
+QObject *QDeclarativeVME::run(QDeclarativeContext *ctxt, QDeclarativeCompiledData *comp,
+ int start, int count,
+ const QBitField &bindingSkipList)
+{
+ QDeclarativeVMEStack<QObject *> stack;
+
+ if (start == -1) start = 0;
+ if (count == -1) count = comp->bytecode.count();
+
+ return run(stack, ctxt, comp, start, count, bindingSkipList);
+}
+
+void QDeclarativeVME::runDeferred(QObject *object)
+{
+ QDeclarativeDeclarativeData *data = QDeclarativeDeclarativeData::get(object);
+
+ if (!data || !data->context || !data->deferredComponent)
+ return;
+
+ QDeclarativeContext *ctxt = data->context;
+ QDeclarativeCompiledData *comp = data->deferredComponent;
+ int start = data->deferredIdx + 1;
+ int count = data->deferredComponent->bytecode.at(data->deferredIdx).defer.deferCount;
+ QDeclarativeVMEStack<QObject *> stack;
+ stack.push(object);
+
+ run(stack, ctxt, comp, start, count, QBitField());
+}
+
+QObject *QDeclarativeVME::run(QDeclarativeVMEStack<QObject *> &stack, QDeclarativeContext *ctxt,
+ QDeclarativeCompiledData *comp,
+ int start, int count,
+ const QBitField &bindingSkipList)
+{
+ Q_ASSERT(comp);
+ Q_ASSERT(ctxt);
+ const QList<QDeclarativeCompiledData::TypeReference> &types = comp->types;
+ const QList<QString> &primitives = comp->primitives;
+ const QList<QByteArray> &datas = comp->datas;
+ const QList<QDeclarativeCompiledData::CustomTypeData> &customTypeData = comp->customTypeData;
+ const QList<int> &intData = comp->intData;
+ const QList<float> &floatData = comp->floatData;
+ const QList<QDeclarativePropertyCache *> &propertyCaches = comp->propertyCaches;
+ const QList<QDeclarativeParser::Object::ScriptBlock> &scripts = comp->scripts;
+ const QList<QUrl> &urls = comp->urls;
+
+ QDeclarativeEnginePrivate::SimpleList<QDeclarativeAbstractBinding> bindValues;
+ QDeclarativeEnginePrivate::SimpleList<QDeclarativeParserStatus> parserStatus;
+
+ QDeclarativeVMEStack<ListInstance> qliststack;
+
+ vmeErrors.clear();
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(ctxt->engine());
+ QDeclarativeContextPrivate *cp = (QDeclarativeContextPrivate *)QObjectPrivate::get(ctxt);
+
+ int status = -1; //for dbus
+ QDeclarativePropertyPrivate::WriteFlags flags = QDeclarativePropertyPrivate::BypassInterceptor;
+
+ for (int ii = start; !isError() && ii < (start + count); ++ii) {
+ const QDeclarativeInstruction &instr = comp->bytecode.at(ii);
+
+ switch(instr.type) {
+ case QDeclarativeInstruction::Init:
+ {
+ if (instr.init.bindingsSize)
+ bindValues = QDeclarativeEnginePrivate::SimpleList<QDeclarativeAbstractBinding>(instr.init.bindingsSize);
+ if (instr.init.parserStatusSize)
+ parserStatus = QDeclarativeEnginePrivate::SimpleList<QDeclarativeParserStatus>(instr.init.parserStatusSize);
+ if (instr.init.contextCache != -1)
+ cp->setIdPropertyData(comp->contextCaches.at(instr.init.contextCache));
+ if (instr.init.compiledBinding != -1)
+ cp->optimizedBindings = new QDeclarativeCompiledBindings(datas.at(instr.init.compiledBinding).constData(), ctxt);
+ }
+ break;
+
+ case QDeclarativeInstruction::CreateObject:
+ {
+ QBitField bindings;
+ if (instr.create.bindingBits != -1) {
+ const QByteArray &bits = datas.at(instr.create.bindingBits);
+ bindings = QBitField((const quint32*)bits.constData(),
+ bits.size() * 8);
+ }
+ if (stack.isEmpty())
+ bindings = bindings.united(bindingSkipList);
+
+ QObject *o =
+ types.at(instr.create.type).createInstance(ctxt, bindings);
+ if (!o) {
+ if(types.at(instr.create.type).component)
+ vmeErrors << types.at(instr.create.type).component->errors();
+
+ VME_EXCEPTION(QCoreApplication::translate("QDeclarativeVME","Unable to create object of type %1").arg(QString::fromLatin1(types.at(instr.create.type).className)));
+ }
+
+ QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(o);
+ Q_ASSERT(ddata);
+ ddata->outerContext = ctxt;
+ ddata->lineNumber = instr.line;
+ ddata->columnNumber = instr.create.column;
+
+ if (instr.create.data != -1) {
+ QDeclarativeCustomParser *customParser =
+ types.at(instr.create.type).type->customParser();
+ customParser->setCustomData(o, datas.at(instr.create.data));
+ }
+ if (!stack.isEmpty()) {
+ QObject *parent = stack.top();
+ if (o->isWidgetType()) {
+ QWidget *widget = static_cast<QWidget*>(o);
+ if (parent->isWidgetType()) {
+ QWidget *parentWidget = static_cast<QWidget*>(parent);
+ widget->setParent(parentWidget);
+ } else {
+ // TODO: parent might be a layout
+ }
+ } else {
+ QDeclarative_setParent_noEvent(o, parent);
+ // o->setParent(parent);
+ }
+ }
+ stack.push(o);
+ }
+ break;
+
+ case QDeclarativeInstruction::SetId:
+ {
+ QObject *target = stack.top();
+ cp->setIdProperty(instr.setId.index, target);
+ }
+ break;
+
+
+ case QDeclarativeInstruction::SetDefault:
+ {
+ QObject *target = stack.top();
+ ctxt->addDefaultObject(target);
+ }
+ break;
+
+ case QDeclarativeInstruction::CreateComponent:
+ {
+ QObject *qcomp = new QDeclarativeComponent(ctxt->engine(), comp, ii + 1, instr.createComponent.count, stack.isEmpty() ? 0 : stack.top());
+
+ QDeclarativeEngine::setContextForObject(qcomp, ctxt);
+ QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(qcomp);
+ Q_ASSERT(ddata);
+ ddata->outerContext = ctxt;
+ ddata->lineNumber = instr.line;
+ ddata->columnNumber = instr.create.column;
+
+ stack.push(qcomp);
+ ii += instr.createComponent.count;
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreMetaObject:
+ {
+ QObject *target = stack.top();
+
+ QMetaObject mo;
+ const QByteArray &metadata = datas.at(instr.storeMeta.data);
+ QMetaObjectBuilder::fromRelocatableData(&mo, 0, metadata);
+
+ const QDeclarativeVMEMetaData *data =
+ (const QDeclarativeVMEMetaData *)datas.at(instr.storeMeta.aliasData).constData();
+
+ (void)new QDeclarativeVMEMetaObject(target, &mo, data, comp);
+
+ QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(target, true);
+ if (ddata->propertyCache) ddata->propertyCache->release();
+ ddata->propertyCache = propertyCaches.at(instr.storeMeta.propertyCache);
+ ddata->propertyCache->addref();
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreVariant:
+ {
+ QObject *target = stack.top();
+ // XXX - can be more efficient
+ QVariant v = QDeclarativeStringConverters::variantFromString(primitives.at(instr.storeString.value));
+ void *a[] = { &v, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeString.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreString:
+ {
+ QObject *target = stack.top();
+ void *a[] = { (void *)&primitives.at(instr.storeString.value), 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeString.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreUrl:
+ {
+ QObject *target = stack.top();
+ void *a[] = { (void *)&urls.at(instr.storeUrl.value), 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeUrl.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreFloat:
+ {
+ QObject *target = stack.top();
+ float f = instr.storeFloat.value;
+ void *a[] = { &f, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeFloat.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreDouble:
+ {
+ QObject *target = stack.top();
+ double d = instr.storeDouble.value;
+ void *a[] = { &d, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeDouble.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreBool:
+ {
+ QObject *target = stack.top();
+ void *a[] = { (void *)&instr.storeBool.value, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeBool.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreInteger:
+ {
+ QObject *target = stack.top();
+ void *a[] = { (void *)&instr.storeInteger.value, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeInteger.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreColor:
+ {
+ QObject *target = stack.top();
+ QColor c = QColor::fromRgba(instr.storeColor.value);
+ void *a[] = { &c, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeColor.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreDate:
+ {
+ QObject *target = stack.top();
+ QDate d = QDate::fromJulianDay(instr.storeDate.value);
+ void *a[] = { &d, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeDate.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreTime:
+ {
+ QObject *target = stack.top();
+ QTime t;
+ t.setHMS(intData.at(instr.storeTime.valueIndex),
+ intData.at(instr.storeTime.valueIndex+1),
+ intData.at(instr.storeTime.valueIndex+2),
+ intData.at(instr.storeTime.valueIndex+3));
+ void *a[] = { &t, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeTime.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreDateTime:
+ {
+ QObject *target = stack.top();
+ QTime t;
+ t.setHMS(intData.at(instr.storeDateTime.valueIndex+1),
+ intData.at(instr.storeDateTime.valueIndex+2),
+ intData.at(instr.storeDateTime.valueIndex+3),
+ intData.at(instr.storeDateTime.valueIndex+4));
+ QDateTime dt(QDate::fromJulianDay(intData.at(instr.storeDateTime.valueIndex)), t);
+ void *a[] = { &dt, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeDateTime.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StorePoint:
+ {
+ QObject *target = stack.top();
+ QPoint p = QPointF(floatData.at(instr.storeRealPair.valueIndex),
+ floatData.at(instr.storeRealPair.valueIndex+1)).toPoint();
+ void *a[] = { &p, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeRealPair.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StorePointF:
+ {
+ QObject *target = stack.top();
+ QPointF p(floatData.at(instr.storeRealPair.valueIndex),
+ floatData.at(instr.storeRealPair.valueIndex+1));
+ void *a[] = { &p, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeRealPair.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreSize:
+ {
+ QObject *target = stack.top();
+ QSize p = QSizeF(floatData.at(instr.storeRealPair.valueIndex),
+ floatData.at(instr.storeRealPair.valueIndex+1)).toSize();
+ void *a[] = { &p, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeRealPair.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreSizeF:
+ {
+ QObject *target = stack.top();
+ QSizeF s(floatData.at(instr.storeRealPair.valueIndex),
+ floatData.at(instr.storeRealPair.valueIndex+1));
+ void *a[] = { &s, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeRealPair.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreRect:
+ {
+ QObject *target = stack.top();
+ QRect r = QRectF(floatData.at(instr.storeRect.valueIndex),
+ floatData.at(instr.storeRect.valueIndex+1),
+ floatData.at(instr.storeRect.valueIndex+2),
+ floatData.at(instr.storeRect.valueIndex+3)).toRect();
+ void *a[] = { &r, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeRect.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreRectF:
+ {
+ QObject *target = stack.top();
+ QRectF r(floatData.at(instr.storeRect.valueIndex),
+ floatData.at(instr.storeRect.valueIndex+1),
+ floatData.at(instr.storeRect.valueIndex+2),
+ floatData.at(instr.storeRect.valueIndex+3));
+ void *a[] = { &r, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeRect.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreVector3D:
+ {
+ QObject *target = stack.top();
+ QVector3D p(floatData.at(instr.storeVector3D.valueIndex),
+ floatData.at(instr.storeVector3D.valueIndex+1),
+ floatData.at(instr.storeVector3D.valueIndex+2));
+ void *a[] = { &p, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeVector3D.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreObject:
+ {
+ QObject *assignObj = stack.pop();
+ QObject *target = stack.top();
+
+ void *a[] = { (void *)&assignObj, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeObject.propertyIndex, a);
+ }
+ break;
+
+
+ case QDeclarativeInstruction::AssignCustomType:
+ {
+ QObject *target = stack.top();
+ QDeclarativeCompiledData::CustomTypeData data = customTypeData.at(instr.assignCustomType.valueIndex);
+ const QString &primitive = primitives.at(data.index);
+ QDeclarativeMetaType::StringConverter converter =
+ QDeclarativeMetaType::customStringConverter(data.type);
+ QVariant v = (*converter)(primitive);
+
+ QMetaProperty prop =
+ target->metaObject()->property(instr.assignCustomType.propertyIndex);
+ if (v.isNull() || ((int)prop.type() != data.type && prop.userType() != data.type))
+ VME_EXCEPTION(QCoreApplication::translate("QDeclarativeVME","Cannot assign value %1 to property %2").arg(primitive).arg(QString::fromUtf8(prop.name())));
+
+ void *a[] = { (void *)v.data(), 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.assignCustomType.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::AssignSignalObject:
+ {
+ // XXX optimize
+
+ QObject *assign = stack.pop();
+ QObject *target = stack.top();
+ int sigIdx = instr.assignSignalObject.signal;
+ const QByteArray &pr = datas.at(sigIdx);
+
+ QDeclarativeProperty prop(target, QString::fromUtf8(pr));
+ if (prop.type() & QDeclarativeProperty::SignalProperty) {
+
+ QMetaMethod method = QDeclarativeMetaType::defaultMethod(assign);
+ if (method.signature() == 0)
+ VME_EXCEPTION(QCoreApplication::translate("QDeclarativeVME","Cannot assign object type %1 with no default method").arg(QString::fromLatin1(assign->metaObject()->className())));
+
+ if (!QMetaObject::checkConnectArgs(prop.method().signature(), method.signature()))
+ VME_EXCEPTION(QCoreApplication::translate("QDeclarativeVME","Cannot connect mismatched signal/slot %1 %vs. %2").arg(QString::fromLatin1(method.signature())).arg(QString::fromLatin1(prop.method().signature())));
+
+ QMetaObject::connect(target, prop.index(), assign, method.methodIndex());
+
+ } else {
+ VME_EXCEPTION(QCoreApplication::translate("QDeclarativeVME","Cannot assign an object to signal property %1").arg(QString::fromUtf8(pr)));
+ }
+
+
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreSignal:
+ {
+ QObject *target = stack.top();
+ QObject *context = stack.at(stack.count() - 1 - instr.assignBinding.context);
+
+ QMetaMethod signal = target->metaObject()->method(instr.storeSignal.signalIndex);
+
+ QDeclarativeBoundSignal *bs = new QDeclarativeBoundSignal(target, signal, target);
+ QDeclarativeExpression *expr =
+ new QDeclarativeExpression(ctxt, primitives.at(instr.storeSignal.value), context);
+ expr->setSourceLocation(comp->name, instr.line);
+ bs->setExpression(expr);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreScript:
+ {
+ QObject *target = stack.top();
+ cp->addScript(scripts.at(instr.storeScript.value), target);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreScriptString:
+ {
+ QObject *target = stack.top();
+ QObject *scope = stack.at(stack.count() - 1 - instr.storeScriptString.scope);
+ QDeclarativeScriptString ss;
+ ss.setContext(ctxt);
+ ss.setScopeObject(scope);
+ ss.setScript(primitives.at(instr.storeScriptString.value));
+
+ void *a[] = { &ss, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeScriptString.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::BeginObject:
+ {
+ QObject *target = stack.top();
+ QDeclarativeParserStatus *status = reinterpret_cast<QDeclarativeParserStatus *>(reinterpret_cast<char *>(target) + instr.begin.castValue);
+ parserStatus.append(status);
+ status->d = &parserStatus.values[parserStatus.count - 1];
+
+ status->classBegin();
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreBinding:
+ {
+ QObject *target =
+ stack.at(stack.count() - 1 - instr.assignBinding.owner);
+ QObject *context =
+ stack.at(stack.count() - 1 - instr.assignBinding.context);
+
+ QDeclarativeProperty mp =
+ QDeclarativePropertyPrivate::restore(datas.at(instr.assignBinding.property), target, ctxt);
+
+ int coreIndex = mp.index();
+
+ if (stack.count() == 1 && bindingSkipList.testBit(coreIndex))
+ break;
+
+ QDeclarativeBinding *bind = new QDeclarativeBinding((void *)datas.at(instr.assignBinding.value).constData(), comp, context, ctxt, comp->name, instr.line, 0);
+ bindValues.append(bind);
+ bind->m_mePtr = &bindValues.values[bindValues.count - 1];
+ bind->setTarget(mp);
+ bind->addToObject(target);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreCompiledBinding:
+ {
+ QObject *target =
+ stack.at(stack.count() - 1 - instr.assignBinding.owner);
+ QObject *scope =
+ stack.at(stack.count() - 1 - instr.assignBinding.context);
+
+ int property = instr.assignBinding.property;
+ if (stack.count() == 1 && bindingSkipList.testBit(property & 0xFFFF))
+ break;
+
+ QDeclarativeAbstractBinding *binding =
+ cp->optimizedBindings->configBinding(instr.assignBinding.value, target, scope, property);
+ bindValues.append(binding);
+ binding->m_mePtr = &bindValues.values[bindValues.count - 1];
+ binding->addToObject(target);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreValueSource:
+ {
+ QObject *obj = stack.pop();
+ QDeclarativePropertyValueSource *vs = reinterpret_cast<QDeclarativePropertyValueSource *>(reinterpret_cast<char *>(obj) + instr.assignValueSource.castValue);
+ QObject *target = stack.at(stack.count() - 1 - instr.assignValueSource.owner);
+
+ QDeclarativeProperty prop =
+ QDeclarativePropertyPrivate::restore(datas.at(instr.assignValueSource.property), target, ctxt);
+ obj->setParent(target);
+ vs->setTarget(prop);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreValueInterceptor:
+ {
+ QObject *obj = stack.pop();
+ QDeclarativePropertyValueInterceptor *vi = reinterpret_cast<QDeclarativePropertyValueInterceptor *>(reinterpret_cast<char *>(obj) + instr.assignValueInterceptor.castValue);
+ QObject *target = stack.at(stack.count() - 1 - instr.assignValueInterceptor.owner);
+ QDeclarativeProperty prop =
+ QDeclarativePropertyPrivate::restore(datas.at(instr.assignValueInterceptor.property), target, ctxt);
+ obj->setParent(target);
+ vi->setTarget(prop);
+ QDeclarativeVMEMetaObject *mo = static_cast<QDeclarativeVMEMetaObject *>((QMetaObject*)target->metaObject());
+ mo->registerInterceptor(prop.index(), QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), vi);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreObjectQList:
+ {
+ QObject *assign = stack.pop();
+
+ const ListInstance &list = qliststack.top();
+ list.qListProperty.append((QDeclarativeListProperty<void>*)&list.qListProperty, assign);
+ }
+ break;
+
+ case QDeclarativeInstruction::AssignObjectList:
+ {
+ // This is only used for assigning interfaces
+ QObject *assign = stack.pop();
+ const ListInstance &list = qliststack.top();
+
+ int type = list.type;
+
+ void *ptr = 0;
+
+ const char *iid = QDeclarativeMetaType::interfaceIId(type);
+ if (iid)
+ ptr = assign->qt_metacast(iid);
+ if (!ptr)
+ VME_EXCEPTION(QCoreApplication::translate("QDeclarativeVME","Cannot assign object to list"));
+
+
+ list.qListProperty.append((QDeclarativeListProperty<void>*)&list.qListProperty, ptr);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreVariantObject:
+ {
+ QObject *assign = stack.pop();
+ QObject *target = stack.top();
+
+ QVariant v = QVariant::fromValue(assign);
+ void *a[] = { &v, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeObject.propertyIndex, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::StoreInterface:
+ {
+ QObject *assign = stack.pop();
+ QObject *target = stack.top();
+
+ int coreIdx = instr.storeObject.propertyIndex;
+ QMetaProperty prop = target->metaObject()->property(coreIdx);
+ int t = prop.userType();
+ const char *iid = QDeclarativeMetaType::interfaceIId(t);
+ bool ok = false;
+ if (iid) {
+ void *ptr = assign->qt_metacast(iid);
+ if (ptr) {
+ void *a[] = { &ptr, 0, &status, &flags };
+ QMetaObject::metacall(target,
+ QMetaObject::WriteProperty,
+ coreIdx, a);
+ ok = true;
+ }
+ }
+
+ if (!ok)
+ VME_EXCEPTION(QCoreApplication::translate("QDeclarativeVME","Cannot assign object to interface property"));
+ }
+ break;
+
+ case QDeclarativeInstruction::FetchAttached:
+ {
+ QObject *target = stack.top();
+
+ QObject *qmlObject = qmlAttachedPropertiesObjectById(instr.fetchAttached.id, target);
+
+ if (!qmlObject)
+ VME_EXCEPTION(QCoreApplication::translate("QDeclarativeVME","Unable to create attached object"));
+
+ stack.push(qmlObject);
+ }
+ break;
+
+ case QDeclarativeInstruction::FetchQList:
+ {
+ QObject *target = stack.top();
+
+ qliststack.push(ListInstance(instr.fetchQmlList.type));
+
+ void *a[1];
+ a[0] = (void *)&(qliststack.top().qListProperty);
+ QMetaObject::metacall(target, QMetaObject::ReadProperty,
+ instr.fetchQmlList.property, a);
+ }
+ break;
+
+ case QDeclarativeInstruction::FetchObject:
+ {
+ QObject *target = stack.top();
+
+ QObject *obj = 0;
+ // NOTE: This assumes a cast to QObject does not alter the
+ // object pointer
+ void *a[1];
+ a[0] = &obj;
+ QMetaObject::metacall(target, QMetaObject::ReadProperty,
+ instr.fetch.property, a);
+
+ if (!obj)
+ VME_EXCEPTION(QCoreApplication::translate("QDeclarativeVME","Cannot set properties on %1 as it is null").arg(QString::fromUtf8(target->metaObject()->property(instr.fetch.property).name())));
+
+ stack.push(obj);
+ }
+ break;
+
+ case QDeclarativeInstruction::PopQList:
+ {
+ qliststack.pop();
+ }
+ break;
+
+ case QDeclarativeInstruction::Defer:
+ {
+ if (instr.defer.deferCount) {
+ QObject *target = stack.top();
+ QDeclarativeDeclarativeData *data =
+ QDeclarativeDeclarativeData::get(target, true);
+ comp->addref();
+ data->deferredComponent = comp;
+ data->deferredIdx = ii;
+ ii += instr.defer.deferCount;
+ }
+ }
+ break;
+
+ case QDeclarativeInstruction::PopFetchedObject:
+ {
+ stack.pop();
+ }
+ break;
+
+ case QDeclarativeInstruction::FetchValueType:
+ {
+ QObject *target = stack.top();
+ QDeclarativeValueType *valueHandler =
+ ep->valueTypes[instr.fetchValue.type];
+ valueHandler->read(target, instr.fetchValue.property);
+ stack.push(valueHandler);
+ }
+ break;
+
+ case QDeclarativeInstruction::PopValueType:
+ {
+ QDeclarativeValueType *valueHandler =
+ static_cast<QDeclarativeValueType *>(stack.pop());
+ QObject *target = stack.top();
+ valueHandler->write(target, instr.fetchValue.property,
+ QDeclarativePropertyPrivate::BypassInterceptor);
+ }
+ break;
+
+ default:
+ qFatal("QDeclarativeCompiledData: Internal error - unknown instruction %d", instr.type);
+ break;
+ }
+ }
+
+ if (isError()) {
+ if (!stack.isEmpty()) {
+ delete stack.at(0);
+ }
+
+ QDeclarativeEnginePrivate::clear(bindValues);
+ QDeclarativeEnginePrivate::clear(parserStatus);
+ return 0;
+ }
+
+ if (bindValues.count)
+ ep->bindValues << bindValues;
+ if (parserStatus.count)
+ ep->parserStatus << parserStatus;
+
+ if (stack.isEmpty())
+ return 0;
+ else
+ return stack.top();
+ return 0;
+}
+
+bool QDeclarativeVME::isError() const
+{
+ return !vmeErrors.isEmpty();
+}
+
+QList<QDeclarativeError> QDeclarativeVME::errors() const
+{
+ return vmeErrors;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativevme_p.h b/src/declarative/qml/qdeclarativevme_p.h
new file mode 100644
index 0000000000..951f6a7c89
--- /dev/null
+++ b/src/declarative/qml/qdeclarativevme_p.h
@@ -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 QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEVME_P_H
+#define QDECLARATIVEVME_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeerror.h"
+#include "qbitfield_p.h"
+
+#include <QtCore/QString>
+#include <QtCore/QStack>
+
+QT_BEGIN_NAMESPACE
+
+class QObject;
+class QDeclarativeInstruction;
+class QDeclarativeCompiledData;
+class QDeclarativeCompiledData;
+class QDeclarativeContext;
+
+template<typename T, int N = 128>
+class QDeclarativeVMEStack {
+public:
+ QDeclarativeVMEStack() : index(-1), maxSize(N), data(fixedData) {}
+ ~QDeclarativeVMEStack() { if (data != fixedData) qFree(fixedData); }
+
+ bool isEmpty() const { return index == -1; }
+ const T &top() const { return data[index]; }
+ void push(const T &i) { ++index; if (index == maxSize) realloc(); data[index] = i; }
+ const T &pop() { --index; return data[index + 1]; }
+ int count() const { return index + 1; }
+ const T &at(int idx) { return data[idx]; }
+
+private:
+ void realloc() {
+ maxSize += N;
+ if (data != fixedData) {
+ data = (T*)qRealloc(data, maxSize * sizeof(T));
+ } else {
+ data = (T*)qMalloc(maxSize * sizeof(T));
+ }
+ }
+ int index;
+ int maxSize;
+ T *data;
+ T fixedData[N];
+};
+
+class QDeclarativeVME
+{
+public:
+ QDeclarativeVME();
+
+ QObject *run(QDeclarativeContext *, QDeclarativeCompiledData *,
+ int start = -1, int count = -1,
+ const QBitField & = QBitField());
+ void runDeferred(QObject *);
+
+ bool isError() const;
+ QList<QDeclarativeError> errors() const;
+
+private:
+ QObject *run(QDeclarativeVMEStack<QObject *> &, QDeclarativeContext *, QDeclarativeCompiledData *,
+ int start, int count, const QBitField &);
+ QList<QDeclarativeError> vmeErrors;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEVME_P_H
diff --git a/src/declarative/qml/qdeclarativevmemetaobject.cpp b/src/declarative/qml/qdeclarativevmemetaobject.cpp
new file mode 100644
index 0000000000..d67c834d18
--- /dev/null
+++ b/src/declarative/qml/qdeclarativevmemetaobject.cpp
@@ -0,0 +1,366 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativevmemetaobject_p.h"
+
+#include "qdeclarative.h"
+#include "qdeclarativerefcount_p.h"
+#include "qdeclarativeexpression.h"
+#include "qdeclarativeexpression_p.h"
+#include "qdeclarativecontext_p.h"
+
+#include <QColor>
+#include <QDate>
+#include <QtCore/qlist.h>
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeVMEMetaObject::QDeclarativeVMEMetaObject(QObject *obj,
+ const QMetaObject *other,
+ const QDeclarativeVMEMetaData *meta,
+ QDeclarativeCompiledData *cdata)
+: object(obj), compiledData(cdata), ctxt(qmlContext(obj)), metaData(meta), methods(0),
+ parent(0)
+{
+ compiledData->addref();
+
+ *static_cast<QMetaObject *>(this) = *other;
+ this->d.superdata = obj->metaObject();
+
+ QObjectPrivate *op = QObjectPrivate::get(obj);
+ if (op->metaObject)
+ parent = static_cast<QAbstractDynamicMetaObject*>(op->metaObject);
+ op->metaObject = this;
+
+ propOffset = QAbstractDynamicMetaObject::propertyOffset();
+ methodOffset = QAbstractDynamicMetaObject::methodOffset();
+
+ data = new QVariant[metaData->propertyCount];
+ aConnected.resize(metaData->aliasCount);
+
+ int list_type = qMetaTypeId<QDeclarativeListProperty<QObject> >();
+ // ### Optimize
+ for (int ii = 0; ii < metaData->propertyCount; ++ii) {
+ int t = (metaData->propertyData() + ii)->propertyType;
+ if (t == list_type) {
+ listProperties.append(new List(methodOffset + ii));
+ data[ii] = QVariant::fromValue(QDeclarativeListProperty<QObject>(obj, listProperties.last(), list_append,
+ list_count, list_at, list_clear));
+ } else if (t != -1) {
+ data[ii] = QVariant((QVariant::Type)t);
+ }
+ }
+}
+
+QDeclarativeVMEMetaObject::~QDeclarativeVMEMetaObject()
+{
+ compiledData->release();
+ delete parent;
+ qDeleteAll(listProperties);
+ delete [] data;
+ delete [] methods;
+}
+
+int QDeclarativeVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a)
+{
+ int id = _id;
+ if(c == QMetaObject::WriteProperty) {
+ int flags = *reinterpret_cast<int*>(a[3]);
+ if (!(flags & QDeclarativePropertyPrivate::BypassInterceptor)
+ && !aInterceptors.isEmpty()
+ && aInterceptors.testBit(id)) {
+ QPair<int, QDeclarativePropertyValueInterceptor*> pair = interceptors.value(id);
+ int valueIndex = pair.first;
+ QDeclarativePropertyValueInterceptor *vi = pair.second;
+ int type = property(id).userType();
+
+ if (type != QVariant::Invalid) {
+ if (valueIndex != -1) {
+ QDeclarativeEnginePrivate *ep = ctxt?QDeclarativeEnginePrivate::get(ctxt->engine()):0;
+ QDeclarativeValueType *valueType = 0;
+ if (ep) valueType = ep->valueTypes[type];
+ else valueType = QDeclarativeValueTypeFactory::valueType(type);
+ Q_ASSERT(valueType);
+
+ valueType->setValue(QVariant(type, a[0]));
+ QMetaProperty valueProp = valueType->metaObject()->property(valueIndex);
+ vi->write(valueProp.read(valueType));
+
+ if (!ep) delete valueType;
+ return -1;
+ } else {
+ vi->write(QVariant(type, a[0]));
+ return -1;
+ }
+ }
+ }
+ }
+ if(c == QMetaObject::ReadProperty || c == QMetaObject::WriteProperty) {
+ if (id >= propOffset) {
+ id -= propOffset;
+
+ if (id < metaData->propertyCount) {
+ int t = (metaData->propertyData() + id)->propertyType;
+ bool needActivate = false;
+
+ if (t == -1) {
+
+ if (c == QMetaObject::ReadProperty) {
+ *reinterpret_cast<QVariant *>(a[0]) = data[id];
+ } else if (c == QMetaObject::WriteProperty) {
+ needActivate =
+ (data[id] != *reinterpret_cast<QVariant *>(a[0]));
+ data[id] = *reinterpret_cast<QVariant *>(a[0]);
+ }
+
+ } else {
+
+ if (c == QMetaObject::ReadProperty) {
+ switch(t) {
+ case QVariant::Int:
+ *reinterpret_cast<int *>(a[0]) = data[id].toInt();
+ break;
+ case QVariant::Bool:
+ *reinterpret_cast<bool *>(a[0]) = data[id].toBool();
+ break;
+ case QVariant::Double:
+ *reinterpret_cast<double *>(a[0]) = data[id].toDouble();
+ break;
+ case QVariant::String:
+ *reinterpret_cast<QString *>(a[0]) = data[id].toString();
+ break;
+ case QVariant::Url:
+ *reinterpret_cast<QUrl *>(a[0]) = data[id].toUrl();
+ break;
+ case QVariant::Color:
+ *reinterpret_cast<QColor *>(a[0]) = data[id].value<QColor>();
+ break;
+ case QVariant::Date:
+ *reinterpret_cast<QDate *>(a[0]) = data[id].toDate();
+ break;
+ case QMetaType::QObjectStar:
+ *reinterpret_cast<QObject **>(a[0]) = data[id].value<QObject*>();
+ break;
+ default:
+ break;
+ }
+ if (t == qMetaTypeId<QDeclarativeListProperty<QObject> >()) {
+ *reinterpret_cast<QDeclarativeListProperty<QObject> *>(a[0]) =
+ data[id].value<QDeclarativeListProperty<QObject> >();
+ }
+
+ } else if (c == QMetaObject::WriteProperty) {
+
+ QVariant value = QVariant((QVariant::Type)data[id].type(), a[0]);
+ needActivate = (data[id] != value);
+ data[id] = value;
+ }
+
+ }
+
+ if (c == QMetaObject::WriteProperty && needActivate) {
+ activate(object, methodOffset + id, 0);
+ }
+
+ return -1;
+ }
+
+ id -= metaData->propertyCount;
+
+ if (id < metaData->aliasCount) {
+
+ QDeclarativeVMEMetaData::AliasData *d = metaData->aliasData() + id;
+
+ if (d->flags & QML_ALIAS_FLAG_PTR && c == QMetaObject::ReadProperty)
+ *reinterpret_cast<void **>(a[0]) = 0;
+
+ if (!ctxt) return -1;
+ QDeclarativeContextPrivate *ctxtPriv =
+ (QDeclarativeContextPrivate *)QObjectPrivate::get(ctxt);
+
+ QObject *target = ctxtPriv->idValues[d->contextIdx].data();
+ if (!target)
+ return -1;
+
+ if (c == QMetaObject::ReadProperty && !aConnected.testBit(id)) {
+ int sigIdx = methodOffset + id + metaData->propertyCount;
+ QMetaObject::connect(ctxt, d->contextIdx + ctxtPriv->notifyIndex, object, sigIdx);
+
+ if (d->propertyIdx != -1) {
+ QMetaProperty prop =
+ target->metaObject()->property(d->propertyIdx);
+ if (prop.hasNotifySignal())
+ QMetaObject::connect(target, prop.notifySignalIndex(),
+ object, sigIdx);
+ }
+ aConnected.setBit(id);
+ }
+
+ if (d->propertyIdx == -1) {
+ *reinterpret_cast<QObject **>(a[0]) = target;
+ return -1;
+ } else {
+ return QMetaObject::metacall(target, c, d->propertyIdx, a);
+ }
+
+ }
+ return -1;
+
+ }
+
+ } else if(c == QMetaObject::InvokeMetaMethod) {
+
+ if (id >= methodOffset) {
+
+ id -= methodOffset;
+ int plainSignals = metaData->signalCount + metaData->propertyCount +
+ metaData->aliasCount;
+ if (id < plainSignals) {
+ QMetaObject::activate(object, _id, a);
+ return -1;
+ }
+
+ id -= plainSignals;
+
+ if (id < metaData->methodCount) {
+ if (!ctxt->engine())
+ return -1; // We can't run the method
+
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(ctxt->engine());
+
+ QScriptValue function = method(id);
+
+ QScriptValueList args;
+ QDeclarativeVMEMetaData::MethodData *data = metaData->methodData() + id;
+ if (data->parameterCount) {
+ for (int ii = 0; ii < data->parameterCount; ++ii) {
+ args << ep->scriptValueFromVariant(*(QVariant *)a[ii + 1]);
+ }
+ }
+ QScriptValue rv = function.call(ep->objectClass->newQObject(object), args);
+
+ if (a[0]) *reinterpret_cast<QVariant *>(a[0]) = ep->scriptValueToVariant(rv);
+
+ return -1;
+ }
+ return -1;
+ }
+ }
+
+ if (parent)
+ return parent->metaCall(c, _id, a);
+ else
+ return object->qt_metacall(c, _id, a);
+}
+
+QScriptValue QDeclarativeVMEMetaObject::method(int index)
+{
+ if (!methods)
+ methods = new QScriptValue[metaData->methodCount];
+
+ if (!methods[index].isValid()) {
+ QDeclarativeVMEMetaData::MethodData *data = metaData->methodData() + index;
+
+ const QChar *body =
+ (const QChar *)(((const char*)metaData) + data->bodyOffset);
+
+ QString code = QString::fromRawData(body, data->bodyLength);
+
+ // XXX Use QScriptProgram
+ // XXX We should evaluate all methods in a single big script block to
+ // improve the call time between dynamic methods defined on the same
+ // object
+ methods[index] = QDeclarativeExpressionPrivate::evalInObjectScope(ctxt, object, code);
+ }
+
+ return methods[index];
+}
+
+void QDeclarativeVMEMetaObject::listChanged(int id)
+{
+ activate(object, methodOffset + id, 0);
+}
+
+void QDeclarativeVMEMetaObject::list_append(QDeclarativeListProperty<QObject> *prop, QObject *o)
+{
+ List *list = static_cast<List *>(prop->data);
+ list->append(o);
+ QMetaObject::activate(prop->object, list->notifyIndex, 0);
+}
+
+int QDeclarativeVMEMetaObject::list_count(QDeclarativeListProperty<QObject> *prop)
+{
+ return static_cast<List *>(prop->data)->count();
+}
+
+QObject *QDeclarativeVMEMetaObject::list_at(QDeclarativeListProperty<QObject> *prop, int index)
+{
+ return static_cast<List *>(prop->data)->at(index);
+}
+
+void QDeclarativeVMEMetaObject::list_clear(QDeclarativeListProperty<QObject> *prop)
+{
+ List *list = static_cast<List *>(prop->data);
+ list->clear();
+ QMetaObject::activate(prop->object, list->notifyIndex, 0);
+}
+
+void QDeclarativeVMEMetaObject::registerInterceptor(int index, int valueIndex, QDeclarativePropertyValueInterceptor *interceptor)
+{
+ if (aInterceptors.isEmpty())
+ aInterceptors.resize(propertyCount() + metaData->propertyCount);
+ aInterceptors.setBit(index);
+ interceptors.insert(index, qMakePair(valueIndex, interceptor));
+}
+
+QScriptValue QDeclarativeVMEMetaObject::vmeMethod(int index)
+{
+ if (index < methodOffset) {
+ Q_ASSERT(parent);
+ return static_cast<QDeclarativeVMEMetaObject *>(parent)->vmeMethod(index);
+ }
+ int plainSignals = metaData->signalCount + metaData->propertyCount + metaData->aliasCount;
+ Q_ASSERT(index >= (methodOffset + plainSignals) && index < (methodOffset + plainSignals + metaData->methodCount));
+ return method(index - methodOffset - plainSignals);
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativevmemetaobject_p.h b/src/declarative/qml/qdeclarativevmemetaobject_p.h
new file mode 100644
index 0000000000..37c0b7acce
--- /dev/null
+++ b/src/declarative/qml/qdeclarativevmemetaobject_p.h
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEVMEMETAOBJECT_P_H
+#define QDECLARATIVEVMEMETAOBJECT_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarative.h"
+
+#include <QtCore/QMetaObject>
+#include <QtCore/QBitArray>
+#include <QtCore/QPair>
+
+#include <private/qobject_p.h>
+
+#include "qdeclarativeguard_p.h"
+#include "qdeclarativecompiler_p.h"
+
+QT_BEGIN_NAMESPACE
+
+#define QML_ALIAS_FLAG_PTR 0x00000001
+
+struct QDeclarativeVMEMetaData
+{
+ short propertyCount;
+ short aliasCount;
+ short signalCount;
+ short methodCount;
+
+ struct AliasData {
+ int contextIdx;
+ int propertyIdx;
+ int flags;
+ };
+
+ struct PropertyData {
+ int propertyType;
+ };
+
+ struct MethodData {
+ int parameterCount;
+ int bodyOffset;
+ int bodyLength;
+ int scriptProgram;
+ };
+
+ PropertyData *propertyData() const {
+ return (PropertyData *)(((const char *)this) + sizeof(QDeclarativeVMEMetaData));
+ }
+
+ AliasData *aliasData() const {
+ return (AliasData *)(propertyData() + propertyCount);
+ }
+
+ MethodData *methodData() const {
+ return (MethodData *)(aliasData() + aliasCount);
+ }
+};
+
+class QDeclarativeRefCount;
+class QDeclarativeVMEMetaObject : public QAbstractDynamicMetaObject
+{
+public:
+ QDeclarativeVMEMetaObject(QObject *obj, const QMetaObject *other, const QDeclarativeVMEMetaData *data,
+ QDeclarativeCompiledData *compiledData);
+ ~QDeclarativeVMEMetaObject();
+
+ void registerInterceptor(int index, int valueIndex, QDeclarativePropertyValueInterceptor *interceptor);
+ QScriptValue vmeMethod(int index);
+protected:
+ virtual int metaCall(QMetaObject::Call _c, int _id, void **_a);
+
+private:
+ QObject *object;
+ QDeclarativeCompiledData *compiledData;
+ QDeclarativeGuard<QDeclarativeContext> ctxt;
+
+ const QDeclarativeVMEMetaData *metaData;
+ int propOffset;
+ int methodOffset;
+
+ QVariant *data;
+ QBitArray aConnected;
+ QBitArray aInterceptors;
+ QHash<int, QPair<int, QDeclarativePropertyValueInterceptor*> > interceptors;
+
+ QScriptValue *methods;
+ QScriptValue method(int);
+
+ QAbstractDynamicMetaObject *parent;
+
+ void listChanged(int);
+ class List : public QList<QObject*>
+ {
+ public:
+ List(int lpi) : notifyIndex(lpi) {}
+ int notifyIndex;
+ };
+ QList<List *> listProperties;
+
+ static void list_append(QDeclarativeListProperty<QObject> *, QObject *);
+ static int list_count(QDeclarativeListProperty<QObject> *);
+ static QObject *list_at(QDeclarativeListProperty<QObject> *, int);
+ static void list_clear(QDeclarativeListProperty<QObject> *);
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEVMEMETAOBJECT_P_H
diff --git a/src/declarative/qml/qdeclarativewatcher.cpp b/src/declarative/qml/qdeclarativewatcher.cpp
new file mode 100644
index 0000000000..2f611956f7
--- /dev/null
+++ b/src/declarative/qml/qdeclarativewatcher.cpp
@@ -0,0 +1,186 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativewatcher_p.h"
+
+#include "qdeclarativeexpression.h"
+#include "qdeclarativecontext.h"
+#include "qdeclarative.h"
+
+#include <qdeclarativedebugservice_p.h>
+
+#include <QtCore/qmetaobject.h>
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+
+class QDeclarativeWatchProxy : public QObject
+{
+ Q_OBJECT
+public:
+ QDeclarativeWatchProxy(int id,
+ QObject *object,
+ int debugId,
+ const QMetaProperty &prop,
+ QDeclarativeWatcher *parent = 0);
+
+ QDeclarativeWatchProxy(int id,
+ QDeclarativeExpression *exp,
+ int debugId,
+ QDeclarativeWatcher *parent = 0);
+
+public slots:
+ void notifyValueChanged();
+
+private:
+ friend class QDeclarativeWatcher;
+ int m_id;
+ QDeclarativeWatcher *m_watch;
+ QObject *m_object;
+ int m_debugId;
+ QMetaProperty m_property;
+
+ QDeclarativeExpression *m_expr;
+};
+
+QDeclarativeWatchProxy::QDeclarativeWatchProxy(int id,
+ QDeclarativeExpression *exp,
+ int debugId,
+ QDeclarativeWatcher *parent)
+: QObject(parent), m_id(id), m_watch(parent), m_object(0), m_debugId(debugId), m_expr(exp)
+{
+ QObject::connect(m_expr, SIGNAL(valueChanged()), this, SLOT(notifyValueChanged()));
+}
+
+QDeclarativeWatchProxy::QDeclarativeWatchProxy(int id,
+ QObject *object,
+ int debugId,
+ const QMetaProperty &prop,
+ QDeclarativeWatcher *parent)
+: QObject(parent), m_id(id), m_watch(parent), m_object(object), m_debugId(debugId), m_property(prop), m_expr(0)
+{
+ static int refreshIdx = -1;
+ if(refreshIdx == -1)
+ refreshIdx = QDeclarativeWatchProxy::staticMetaObject.indexOfMethod("notifyValueChanged()");
+
+ if (prop.hasNotifySignal())
+ QMetaObject::connect(m_object, prop.notifySignalIndex(), this, refreshIdx);
+}
+
+void QDeclarativeWatchProxy::notifyValueChanged()
+{
+ QVariant v;
+ if (m_expr)
+ v = m_expr->value();
+ else
+ v = m_property.read(m_object);
+
+ emit m_watch->propertyChanged(m_id, m_debugId, m_property, v);
+}
+
+
+QDeclarativeWatcher::QDeclarativeWatcher(QObject *parent)
+ : QObject(parent)
+{
+}
+
+bool QDeclarativeWatcher::addWatch(int id, quint32 debugId)
+{
+ QObject *object = QDeclarativeDebugService::objectForId(debugId);
+ if (object) {
+ int propCount = object->metaObject()->propertyCount();
+ for (int ii=0; ii<propCount; ii++)
+ addPropertyWatch(id, object, debugId, object->metaObject()->property(ii));
+ return true;
+ }
+ return false;
+}
+
+bool QDeclarativeWatcher::addWatch(int id, quint32 debugId, const QByteArray &property)
+{
+ QObject *object = QDeclarativeDebugService::objectForId(debugId);
+ if (object) {
+ int index = object->metaObject()->indexOfProperty(property.constData());
+ if (index >= 0) {
+ addPropertyWatch(id, object, debugId, object->metaObject()->property(index));
+ return true;
+ }
+ }
+ return false;
+}
+
+bool QDeclarativeWatcher::addWatch(int id, quint32 objectId, const QString &expr)
+{
+ QObject *object = QDeclarativeDebugService::objectForId(objectId);
+ QDeclarativeContext *context = qmlContext(object);
+ if (context) {
+ QDeclarativeExpression *exprObj = new QDeclarativeExpression(context, expr, object);
+ exprObj->setNotifyOnValueChanged(true);
+ QDeclarativeWatchProxy *proxy = new QDeclarativeWatchProxy(id, exprObj, objectId, this);
+ exprObj->setParent(proxy);
+ m_proxies[id].append(proxy);
+ proxy->notifyValueChanged();
+ return true;
+ }
+ return false;
+}
+
+void QDeclarativeWatcher::removeWatch(int id)
+{
+ if (!m_proxies.contains(id))
+ return;
+
+ QList<QPointer<QDeclarativeWatchProxy> > proxies = m_proxies.take(id);
+ qDeleteAll(proxies);
+}
+
+void QDeclarativeWatcher::addPropertyWatch(int id, QObject *object, quint32 debugId, const QMetaProperty &property)
+{
+ QDeclarativeWatchProxy *proxy = new QDeclarativeWatchProxy(id, object, debugId, property, this);
+ m_proxies[id].append(proxy);
+
+ proxy->notifyValueChanged();
+}
+
+QT_END_NAMESPACE
+
+#include <qdeclarativewatcher.moc>
diff --git a/src/declarative/qml/qdeclarativewatcher_p.h b/src/declarative/qml/qdeclarativewatcher_p.h
new file mode 100644
index 0000000000..4e3352f3b1
--- /dev/null
+++ b/src/declarative/qml/qdeclarativewatcher_p.h
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEWATCHER_P_H
+#define QDECLARATIVEWATCHER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qobject.h>
+#include <QtCore/qlist.h>
+#include <QtCore/qpair.h>
+#include <QtCore/qhash.h>
+#include <QtCore/qset.h>
+#include <QtCore/qpointer.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeWatchProxy;
+class QDeclarativeExpression;
+class QDeclarativeContext;
+class QMetaProperty;
+
+class QDeclarativeWatcher : public QObject
+{
+ Q_OBJECT
+public:
+ QDeclarativeWatcher(QObject * = 0);
+
+ bool addWatch(int id, quint32 objectId);
+ bool addWatch(int id, quint32 objectId, const QByteArray &property);
+ bool addWatch(int id, quint32 objectId, const QString &expr);
+
+ void removeWatch(int id);
+
+Q_SIGNALS:
+ void propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value);
+
+private:
+ friend class QDeclarativeWatchProxy;
+ void addPropertyWatch(int id, QObject *object, quint32 objectId, const QMetaProperty &property);
+
+ QHash<int, QList<QPointer<QDeclarativeWatchProxy> > > m_proxies;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEWATCHER_P_H
diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp
new file mode 100644
index 0000000000..784353af2d
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeworkerscript.cpp
@@ -0,0 +1,1257 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeworkerscript_p.h"
+
+#include "qdeclarativeengine_p.h"
+
+#include <QtCore/qcoreevent.h>
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qdebug.h>
+#include <QtScript/qscriptengine.h>
+#include <QtCore/qmutex.h>
+#include <QtCore/qwaitcondition.h>
+#include <QtScript/qscriptvalueiterator.h>
+#include <QtCore/qfile.h>
+#include <QtNetwork/qnetworkaccessmanager.h>
+#include <QtDeclarative/qdeclarativeinfo.h>
+#include "qdeclarativenetworkaccessmanagerfactory.h"
+
+
+QT_BEGIN_NAMESPACE
+
+class WorkerDataEvent : public QEvent
+{
+public:
+ enum Type { WorkerData = QEvent::User };
+
+ WorkerDataEvent(int workerId, const QVariant &data);
+ virtual ~WorkerDataEvent();
+
+ int workerId() const;
+ QVariant data() const;
+
+private:
+ int m_id;
+ QVariant m_data;
+};
+
+class WorkerLoadEvent : public QEvent
+{
+public:
+ enum Type { WorkerLoad = WorkerDataEvent::WorkerData + 1 };
+
+ WorkerLoadEvent(int workerId, const QUrl &url);
+
+ int workerId() const;
+ QUrl url() const;
+
+private:
+ int m_id;
+ QUrl m_url;
+};
+
+class WorkerRemoveEvent : public QEvent
+{
+public:
+ enum Type { WorkerRemove = WorkerLoadEvent::WorkerLoad + 1 };
+
+ WorkerRemoveEvent(int workerId);
+
+ int workerId() const;
+
+private:
+ int m_id;
+};
+
+class QDeclarativeWorkerScriptEnginePrivate : public QObject
+{
+public:
+ QDeclarativeWorkerScriptEnginePrivate(QDeclarativeEngine *eng);
+
+ struct ScriptEngine : public QDeclarativeScriptEngine
+ {
+ ScriptEngine(QDeclarativeWorkerScriptEnginePrivate *parent) : QDeclarativeScriptEngine(0), p(parent), accessManager(0) {}
+ ~ScriptEngine() { delete accessManager; }
+ QDeclarativeWorkerScriptEnginePrivate *p;
+ QNetworkAccessManager *accessManager;
+
+ virtual QNetworkAccessManager *networkAccessManager() {
+ if (!accessManager) {
+ if (p->qmlengine && p->qmlengine->networkAccessManagerFactory()) {
+ accessManager = p->qmlengine->networkAccessManagerFactory()->create(this);
+ } else {
+ accessManager = new QNetworkAccessManager(this);
+ }
+ }
+ return accessManager;
+ }
+ };
+ ScriptEngine *workerEngine;
+ static QDeclarativeWorkerScriptEnginePrivate *get(QScriptEngine *e) {
+ return static_cast<ScriptEngine *>(e)->p;
+ }
+
+ QDeclarativeEngine *qmlengine;
+
+ QMutex m_lock;
+ QWaitCondition m_wait;
+
+ struct WorkerScript {
+ WorkerScript();
+
+ int id;
+ bool initialized;
+ QDeclarativeWorkerScript *owner;
+ QScriptValue object;
+
+ QScriptValue callback;
+ };
+
+ QHash<int, WorkerScript *> workers;
+ QScriptValue getWorker(int);
+
+ int m_nextId;
+
+ static QVariant scriptValueToVariant(const QScriptValue &);
+ static QScriptValue variantToScriptValue(const QVariant &, QScriptEngine *);
+
+ static QScriptValue onMessage(QScriptContext *ctxt, QScriptEngine *engine);
+ static QScriptValue sendMessage(QScriptContext *ctxt, QScriptEngine *engine);
+
+protected:
+ virtual bool event(QEvent *);
+
+private:
+ void processMessage(int, const QVariant &);
+ void processLoad(int, const QUrl &);
+};
+
+// Currently this will leak as no-one releases it in the worker thread
+class QDeclarativeWorkerListModelAgent : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int count READ count)
+
+public:
+ QDeclarativeWorkerListModelAgent(QDeclarativeWorkerListModel *);
+ ~QDeclarativeWorkerListModelAgent();
+
+ void addref();
+ void release();
+
+ int count() const;
+
+ Q_INVOKABLE void clear();
+ Q_INVOKABLE void remove(int index);
+ Q_INVOKABLE void append(const QScriptValue &);
+ Q_INVOKABLE void insert(int index, const QScriptValue&);
+ Q_INVOKABLE QScriptValue get(int index) const;
+ Q_INVOKABLE void set(int index, const QScriptValue &);
+ Q_INVOKABLE void sync();
+
+ struct VariantRef
+ {
+ VariantRef() : a(0) {}
+ VariantRef(const VariantRef &r) : a(r.a) { if (a) a->addref(); }
+ VariantRef(QDeclarativeWorkerListModelAgent *_a) : a(_a) { if (a) a->addref(); }
+ ~VariantRef() { if (a) a->release(); }
+
+ VariantRef &operator=(const VariantRef &o) {
+ if (o.a) o.a->addref();
+ if (a) a->release(); a = o.a;
+ return *this;
+ }
+
+ QDeclarativeWorkerListModelAgent *a;
+ };
+protected:
+ virtual bool event(QEvent *);
+
+private:
+ friend class QDeclarativeWorkerScriptEnginePrivate;
+ friend class QDeclarativeWorkerListModel;
+ QScriptEngine *m_engine;
+
+ struct Change {
+ enum { Inserted, Removed, Moved, Changed } type;
+ int index; // Inserted/Removed/Moved/Changed
+ int count; // Inserted/Removed/Moved/Changed
+ int to; // Moved
+ };
+
+ struct Data {
+ QHash<int, QString> roles;
+ QHash<QString, int> strings;
+ QList<QHash<int, QVariant> > values;
+ QList<Change> changes;
+
+ void clearChange();
+ void insertChange(int index, int count);
+ void removeChange(int index, int count);
+ void changedChange(int index, int count);
+ };
+ Data data;
+
+ struct Sync : public QEvent {
+ Sync() : QEvent(QEvent::User) {}
+ Data data;
+ };
+
+ QAtomicInt m_ref;
+ QDeclarativeWorkerListModel *m_model;
+};
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QDeclarativeWorkerListModelAgent::VariantRef);
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeWorkerScriptEnginePrivate::QDeclarativeWorkerScriptEnginePrivate(QDeclarativeEngine *engine)
+: workerEngine(0), qmlengine(engine), m_nextId(0)
+{
+}
+
+QScriptValue QDeclarativeWorkerScriptEnginePrivate::onMessage(QScriptContext *ctxt, QScriptEngine *engine)
+{
+ QDeclarativeWorkerScriptEnginePrivate *p = QDeclarativeWorkerScriptEnginePrivate::get(engine);
+
+ int id = ctxt->thisObject().data().toVariant().toInt();
+
+ WorkerScript *script = p->workers.value(id);
+ if (!script)
+ return engine->undefinedValue();
+
+ if (ctxt->argumentCount() >= 1)
+ script->callback = ctxt->argument(0);
+
+ return script->callback;
+}
+
+QScriptValue QDeclarativeWorkerScriptEnginePrivate::sendMessage(QScriptContext *ctxt, QScriptEngine *engine)
+{
+ if (!ctxt->argumentCount())
+ return engine->undefinedValue();
+
+ QDeclarativeWorkerScriptEnginePrivate *p = QDeclarativeWorkerScriptEnginePrivate::get(engine);
+
+ int id = ctxt->thisObject().data().toVariant().toInt();
+
+ WorkerScript *script = p->workers.value(id);
+ if (!script)
+ return engine->undefinedValue();
+
+ p->m_lock.lock();
+ if (script->owner)
+ QCoreApplication::postEvent(script->owner,
+ new WorkerDataEvent(0, scriptValueToVariant(ctxt->argument(0))));
+ p->m_lock.unlock();
+
+ return engine->undefinedValue();
+}
+
+QScriptValue QDeclarativeWorkerScriptEnginePrivate::getWorker(int id)
+{
+ QHash<int, WorkerScript *>::ConstIterator iter = workers.find(id);
+
+ if (iter == workers.end())
+ return workerEngine->nullValue();
+
+ WorkerScript *script = *iter;
+ if (!script->initialized) {
+
+ script->initialized = true;
+ script->object = workerEngine->newObject();
+
+ QScriptValue api = workerEngine->newObject();
+ api.setData(script->id);
+
+ api.setProperty(QLatin1String("onMessage"), workerEngine->newFunction(onMessage),
+ QScriptValue::PropertyGetter | QScriptValue::PropertySetter);
+ api.setProperty(QLatin1String("sendMessage"), workerEngine->newFunction(sendMessage));
+
+ script->object.setProperty(QLatin1String("WorkerScript"), api);
+ }
+
+ return script->object;
+}
+
+bool QDeclarativeWorkerScriptEnginePrivate::event(QEvent *event)
+{
+ if (event->type() == (QEvent::Type)WorkerDataEvent::WorkerData) {
+ WorkerDataEvent *workerEvent = static_cast<WorkerDataEvent *>(event);
+ processMessage(workerEvent->workerId(), workerEvent->data());
+ return true;
+ } else if (event->type() == (QEvent::Type)WorkerLoadEvent::WorkerLoad) {
+ WorkerLoadEvent *workerEvent = static_cast<WorkerLoadEvent *>(event);
+ processLoad(workerEvent->workerId(), workerEvent->url());
+ return true;
+ } else {
+ return QObject::event(event);
+ }
+}
+
+void QDeclarativeWorkerScriptEnginePrivate::processMessage(int id, const QVariant &data)
+{
+ WorkerScript *script = workers.value(id);
+ if (!script)
+ return;
+
+ if (script->callback.isFunction()) {
+ QScriptValue args = workerEngine->newArray(1);
+ args.setProperty(0, variantToScriptValue(data, workerEngine));
+
+ script->callback.call(script->object, args);
+ }
+}
+
+void QDeclarativeWorkerScriptEnginePrivate::processLoad(int id, const QUrl &url)
+{
+ if (url.isRelative() || url.scheme() != QLatin1String("file"))
+ return;
+
+ QString fileName = url.toLocalFile();
+
+ QFile f(fileName);
+ if (f.open(QIODevice::ReadOnly)) {
+ QByteArray data = f.readAll();
+ QString script = QString::fromUtf8(data);
+
+ QScriptValue activation = getWorker(id);
+
+ QScriptContext *ctxt = workerEngine->pushContext();
+ ctxt->setActivationObject(activation);
+
+ workerEngine->baseUrl = url;
+ workerEngine->evaluate(script);
+
+ workerEngine->popContext();
+ } else {
+ qWarning().nospace() << "WorkerScript: Cannot find source file " << url.toString();
+ }
+}
+
+QVariant QDeclarativeWorkerScriptEnginePrivate::scriptValueToVariant(const QScriptValue &value)
+{
+ if (value.isBool()) {
+ return QVariant(value.toBool());
+ } else if (value.isString()) {
+ return QVariant(value.toString());
+ } else if (value.isNumber()) {
+ return QVariant((qreal)value.toNumber());
+ } else if (value.isArray()) {
+ QVariantList list;
+
+ quint32 length = (quint32)value.property(QLatin1String("length")).toNumber();
+
+ for (quint32 ii = 0; ii < length; ++ii) {
+ QVariant v = scriptValueToVariant(value.property(ii));
+ list << v;
+ }
+
+ return QVariant(list);
+ } else if (value.isQObject()) {
+ QDeclarativeWorkerListModel *lm = qobject_cast<QDeclarativeWorkerListModel *>(value.toQObject());
+ if (lm) {
+ QDeclarativeWorkerListModelAgent::VariantRef v(lm->agent());
+ return qVariantFromValue(v);
+ } else {
+ // No other QObject's are allowed to be sent
+ return QVariant();
+ }
+ } else if (value.isObject()) {
+ QVariantHash hash;
+
+ QScriptValueIterator iter(value);
+
+ while (iter.hasNext()) {
+ iter.next();
+ hash.insert(iter.name(), scriptValueToVariant(iter.value()));
+ }
+
+ return QVariant(hash);
+ }
+
+ return QVariant();
+
+}
+
+QScriptValue QDeclarativeWorkerScriptEnginePrivate::variantToScriptValue(const QVariant &value, QScriptEngine *engine)
+{
+ if (value.userType() == QVariant::Bool) {
+ return QScriptValue(value.toBool());
+ } else if (value.userType() == QVariant::String) {
+ return QScriptValue(value.toString());
+ } else if (value.userType() == QMetaType::QReal) {
+ return QScriptValue(value.toReal());
+ } else if (value.userType() == qMetaTypeId<QDeclarativeWorkerListModelAgent::VariantRef>()) {
+ QDeclarativeWorkerListModelAgent::VariantRef vr = qvariant_cast<QDeclarativeWorkerListModelAgent::VariantRef>(value);
+ if (vr.a->m_engine == 0)
+ vr.a->m_engine = engine;
+ else if (vr.a->m_engine != engine)
+ return engine->nullValue();
+ QScriptValue o = engine->newQObject(vr.a);
+ o.setData(engine->newVariant(value)); // Keeps the agent ref so that it is cleaned up on gc
+ return o;
+ } else if (value.userType() == QMetaType::QVariantList) {
+ QVariantList list = qvariant_cast<QVariantList>(value);
+ QScriptValue rv = engine->newArray(list.count());
+
+ for (quint32 ii = 0; ii < quint32(list.count()); ++ii)
+ rv.setProperty(ii, variantToScriptValue(list.at(ii), engine));
+
+ return rv;
+ } else if (value.userType() == QMetaType::QVariantHash) {
+
+ QVariantHash hash = qvariant_cast<QVariantHash>(value);
+
+ QScriptValue rv = engine->newObject();
+
+ for (QVariantHash::ConstIterator iter = hash.begin(); iter != hash.end(); ++iter)
+ rv.setProperty(iter.key(), variantToScriptValue(iter.value(), engine));
+
+ return rv;
+ } else {
+ return engine->nullValue();
+ }
+}
+
+WorkerDataEvent::WorkerDataEvent(int workerId, const QVariant &data)
+: QEvent((QEvent::Type)WorkerData), m_id(workerId), m_data(data)
+{
+}
+
+WorkerDataEvent::~WorkerDataEvent()
+{
+}
+
+int WorkerDataEvent::workerId() const
+{
+ return m_id;
+}
+
+QVariant WorkerDataEvent::data() const
+{
+ return m_data;
+}
+
+WorkerLoadEvent::WorkerLoadEvent(int workerId, const QUrl &url)
+: QEvent((QEvent::Type)WorkerLoad), m_id(workerId), m_url(url)
+{
+}
+
+int WorkerLoadEvent::workerId() const
+{
+ return m_id;
+}
+
+QUrl WorkerLoadEvent::url() const
+{
+ return m_url;
+}
+
+WorkerRemoveEvent::WorkerRemoveEvent(int workerId)
+: QEvent((QEvent::Type)WorkerRemove), m_id(workerId)
+{
+}
+
+int WorkerRemoveEvent::workerId() const
+{
+ return m_id;
+}
+
+QDeclarativeWorkerScriptEngine::QDeclarativeWorkerScriptEngine(QDeclarativeEngine *parent)
+: QThread(parent), d(new QDeclarativeWorkerScriptEnginePrivate(parent))
+{
+ d->m_lock.lock();
+ start(QThread::LowPriority);
+ d->m_wait.wait(&d->m_lock);
+ d->moveToThread(this);
+ d->m_lock.unlock();
+}
+
+QDeclarativeWorkerScriptEngine::~QDeclarativeWorkerScriptEngine()
+{
+ qDeleteAll(d->workers);
+ delete d; d = 0;
+}
+
+QDeclarativeWorkerScriptEnginePrivate::WorkerScript::WorkerScript()
+: id(-1), initialized(false), owner(0)
+{
+}
+
+int QDeclarativeWorkerScriptEngine::registerWorkerScript(QDeclarativeWorkerScript *owner)
+{
+ QDeclarativeWorkerScriptEnginePrivate::WorkerScript *script = new QDeclarativeWorkerScriptEnginePrivate::WorkerScript;
+ script->id = d->m_nextId++;
+ script->owner = owner;
+
+ d->m_lock.lock();
+ d->workers.insert(script->id, script);
+ d->m_lock.unlock();
+
+ return script->id;
+}
+
+void QDeclarativeWorkerScriptEngine::removeWorkerScript(int id)
+{
+ QCoreApplication::postEvent(d, new WorkerRemoveEvent(id));
+}
+
+void QDeclarativeWorkerScriptEngine::executeUrl(int id, const QUrl &url)
+{
+ QCoreApplication::postEvent(d, new WorkerLoadEvent(id, url));
+}
+
+void QDeclarativeWorkerScriptEngine::sendMessage(int id, const QVariant &data)
+{
+ QCoreApplication::postEvent(d, new WorkerDataEvent(id, data));
+}
+
+void QDeclarativeWorkerScriptEngine::run()
+{
+ d->m_lock.lock();
+
+ d->workerEngine = new QDeclarativeWorkerScriptEnginePrivate::ScriptEngine(d);
+
+ d->m_wait.wakeAll();
+
+ d->m_lock.unlock();
+
+ exec();
+
+ delete d->workerEngine; d->workerEngine = 0;
+}
+
+
+/*!
+ \qmlclass WorkerScript QDeclarativeWorkerScript
+ \brief The WorkerScript element enables the use of threads in QML.
+
+ Use WorkerScript to run operations in a new thread.
+ This is useful for running operations in the background so
+ that the main GUI thread is not blocked.
+
+ Messages can be passed between the new thread and the parent thread
+ using sendMessage() and the onMessage() handler.
+
+ Here is an example:
+
+ \qml
+ import Qt 4.6
+
+ Rectangle {
+ width: 300
+ height: 300
+
+ Text {
+ id: myText
+ text: 'Click anywhere'
+ }
+
+ WorkerScript {
+ id: myWorker
+ source: "script.js"
+
+ onMessage: {
+ myText.text = messageObject.reply
+ }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: myWorker.sendMessage( {'x': mouse.x, 'y': mouse.y} );
+ }
+ }
+ \endqml
+
+ The above worker script specifies a javascript file, "script.js", that handles
+ the operations to be performed in the new thread:
+
+ \qml
+ WorkerScript.onMessage = function(message) {
+ // ... long-running operations and calculations are done here
+ WorkerScript.sendMessage( {'reply': 'Mouse is at ' + message.x + ',' + message.y} );
+ }
+ \endqml
+
+ When the user clicks anywhere within the rectangle, \c sendMessage() is
+ called, triggering the \tt WorkerScript.onMessage() handler in
+ \tt source.js. This in turn sends a reply message that is then received
+ by the \tt onMessage() handler of \tt myWorker.
+
+ \sa WorkerListModel
+*/
+QDeclarativeWorkerScript::QDeclarativeWorkerScript(QObject *parent)
+: QObject(parent), m_engine(0), m_scriptId(-1)
+{
+}
+
+QDeclarativeWorkerScript::~QDeclarativeWorkerScript()
+{
+ if (m_scriptId != -1) m_engine->removeWorkerScript(m_scriptId);
+}
+
+/*!
+ \qmlproperty url WorkerScript::source
+
+ This holds the url of the javascript file that implements the
+ \tt WorkerScript.onMessage() handler for threaded operations.
+*/
+QUrl QDeclarativeWorkerScript::source() const
+{
+ return m_source;
+}
+
+void QDeclarativeWorkerScript::setSource(const QUrl &source)
+{
+ if (m_source == source)
+ return;
+
+ m_source = source;
+
+ if (m_engine)
+ m_engine->executeUrl(m_scriptId, m_source);
+
+ emit sourceChanged();
+}
+
+/*
+ \qmlmethod WorkerScript::sendMessage(jsobject message)
+
+ Sends the given \a message to a worker script handler in another
+ thread. The other worker script handler can receive this message
+ through the onMessage() handler.
+*/
+void QDeclarativeWorkerScript::sendMessage(const QScriptValue &message)
+{
+ if (!m_engine) {
+ qWarning("QDeclarativeWorkerScript: Attempt to send message before WorkerScript establishment");
+ return;
+ }
+
+ m_engine->sendMessage(m_scriptId, QDeclarativeWorkerScriptEnginePrivate::scriptValueToVariant(message));
+}
+
+void QDeclarativeWorkerScript::componentComplete()
+{
+ if (!m_engine) {
+ QDeclarativeEngine *engine = qmlEngine(this);
+ if (!engine) {
+ qWarning("QDeclarativeWorkerScript: componentComplete() called without qmlEngine() set");
+ return;
+ }
+
+ m_engine = QDeclarativeEnginePrivate::get(engine)->getWorkerScriptEngine();
+ m_scriptId = m_engine->registerWorkerScript(this);
+
+ if (m_source.isValid())
+ m_engine->executeUrl(m_scriptId, m_source);
+ }
+}
+
+/*!
+ \qmlsignal WorkerScript::onMessage(jsobject msg)
+
+ This handler is called when a message \a msg is received from a worker
+ script in another thread through a call to sendMessage().
+*/
+
+bool QDeclarativeWorkerScript::event(QEvent *event)
+{
+ if (event->type() == (QEvent::Type)WorkerDataEvent::WorkerData) {
+ QDeclarativeEngine *engine = qmlEngine(this);
+ if (engine) {
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+ WorkerDataEvent *workerEvent = static_cast<WorkerDataEvent *>(event);
+ QScriptValue value =
+ QDeclarativeWorkerScriptEnginePrivate::variantToScriptValue(workerEvent->data(), scriptEngine);
+ emit message(value);
+ }
+ return true;
+ } else {
+ return QObject::event(event);
+ }
+}
+
+void QDeclarativeWorkerListModelAgent::Data::clearChange()
+{
+ changes.clear();
+}
+
+void QDeclarativeWorkerListModelAgent::Data::insertChange(int index, int count)
+{
+ Change c = { Change::Inserted, index, count, 0 };
+ changes << c;
+}
+
+void QDeclarativeWorkerListModelAgent::Data::removeChange(int index, int count)
+{
+ Change c = { Change::Removed, index, count, 0 };
+ changes << c;
+}
+
+void QDeclarativeWorkerListModelAgent::Data::changedChange(int index, int count)
+{
+ Change c = { Change::Changed, index, count, 0 };
+ changes << c;
+}
+
+QDeclarativeWorkerListModelAgent::QDeclarativeWorkerListModelAgent(QDeclarativeWorkerListModel *m)
+: m_engine(0), m_ref(1), m_model(m)
+{
+ data.roles = m_model->m_roles;
+ data.strings = m_model->m_strings;
+ data.values = m_model->m_values;
+}
+
+QDeclarativeWorkerListModelAgent::~QDeclarativeWorkerListModelAgent()
+{
+}
+
+void QDeclarativeWorkerListModelAgent::addref()
+{
+ m_ref.ref();
+}
+
+void QDeclarativeWorkerListModelAgent::release()
+{
+ bool del = !m_ref.deref();
+
+ if (del)
+ delete this;
+}
+
+int QDeclarativeWorkerListModelAgent::count() const
+{
+ return data.values.count();
+}
+
+void QDeclarativeWorkerListModelAgent::clear()
+{
+ data.clearChange();
+ data.removeChange(0, data.values.count());
+ data.values.clear();
+}
+
+void QDeclarativeWorkerListModelAgent::remove(int index)
+{
+ if (data.values.count() <= index)
+ return;
+
+ data.values.removeAt(index);
+ data.removeChange(index, 1);
+}
+
+void QDeclarativeWorkerListModelAgent::append(const QScriptValue &value)
+{
+ QHash<int, QVariant> row;
+
+ QScriptValueIterator it(value);
+ while (it.hasNext()) {
+ it.next();
+ QString name = it.name();
+ QVariant v = it.value().toVariant();
+
+ QHash<QString, int>::Iterator iter = data.strings.find(name);
+ if (iter == data.strings.end()) {
+ int role = data.roles.count();
+ data.roles.insert(role, name);
+ iter = data.strings.insert(name, role);
+ }
+ row.insert(*iter, v);
+ }
+
+ data.values.append(row);
+ data.insertChange(data.values.count() - 1, 1);
+}
+
+void QDeclarativeWorkerListModelAgent::insert(int index, const QScriptValue &value)
+{
+ if (index > data.values.count())
+ return;
+
+ QHash<int, QVariant> row;
+
+ QScriptValueIterator it(value);
+ while (it.hasNext()) {
+ it.next();
+ QString name = it.name();
+ QVariant v = it.value().toVariant();
+
+ QHash<QString, int>::Iterator iter = data.strings.find(name);
+ if (iter == data.strings.end()) {
+ int role = data.roles.count();
+ data.roles.insert(role, name);
+ iter = data.strings.insert(name, role);
+ }
+ row.insert(*iter, v);
+ }
+
+ data.values.insert(index, row);
+ data.insertChange(index, 1);
+}
+
+void QDeclarativeWorkerListModelAgent::set(int index, const QScriptValue &value)
+{
+ if (data.values.count() <= index)
+ return;
+
+ QHash<int, QVariant> row;
+
+ QScriptValueIterator it(value);
+ while (it.hasNext()) {
+ it.next();
+ QString name = it.name();
+ QVariant v = it.value().toVariant();
+
+ QHash<QString, int>::Iterator iter = data.strings.find(name);
+ if (iter == data.strings.end()) {
+ int role = data.roles.count();
+ data.roles.insert(role, name);
+ iter = data.strings.insert(name, role);
+ }
+ row.insert(*iter, v);
+ }
+
+ if (data.values.at(index) != row) {
+ data.values[index] = row;
+ data.changedChange(index, 1);
+ }
+}
+
+QScriptValue QDeclarativeWorkerListModelAgent::get(int index) const
+{
+ if (data.values.count() <= index)
+ return m_engine->undefinedValue();
+
+ QScriptValue rv = m_engine->newObject();
+
+ QHash<int, QVariant> row = data.values.at(index);
+ for (QHash<int, QVariant>::ConstIterator iter = row.begin(); iter != row.end(); ++iter)
+ rv.setProperty(data.roles.value(iter.key()), qScriptValueFromValue(m_engine, iter.value()));
+
+ return rv;
+}
+
+void QDeclarativeWorkerListModelAgent::sync()
+{
+ Sync *s = new Sync;
+ s->data = data;
+ data.changes.clear();
+ QCoreApplication::postEvent(this, s);
+}
+
+bool QDeclarativeWorkerListModelAgent::event(QEvent *e)
+{
+ if (e->type() == QEvent::User) {
+ Sync *s = static_cast<Sync *>(e);
+
+ const QList<Change> &changes = s->data.changes;
+
+ if (m_model) {
+ bool cc = m_model->m_values.count() != s->data.values.count();
+
+ m_model->m_roles = s->data.roles;
+ m_model->m_strings = s->data.strings;
+ m_model->m_values = s->data.values;
+
+ for (int ii = 0; ii < changes.count(); ++ii) {
+ const Change &change = changes.at(ii);
+ switch (change.type) {
+ case Change::Inserted:
+ emit m_model->itemsInserted(change.index, change.count);
+ break;
+ case Change::Removed:
+ emit m_model->itemsRemoved(change.index, change.count);
+ break;
+ case Change::Moved:
+ emit m_model->itemsMoved(change.index, change.to, change.count);
+ break;
+ case Change::Changed:
+ emit m_model->itemsMoved(change.index, change.to, change.count);
+ break;
+ }
+ }
+
+ if (cc)
+ emit m_model->countChanged();
+ }
+ }
+
+ return QObject::event(e);
+}
+
+/*!
+ \qmlclass WorkerListModel QDeclarativeWorkerListModel
+ \brief The WorkerListModel element provides a threaded list model.
+
+ Use WorkerListModel together with WorkerScript to define a list model
+ that is controlled by a separate thread. This is useful if list modification
+ operations are synchronous and take some time: using WorkerListModel
+ moves these operations to a different thread and avoids blocking of the
+ main GUI thread.
+
+ The thread that creates the WorkerListModel can modify the model for any
+ initial set-up requirements. However, once the model has been modified by
+ the associated WorkerScript, the model can only be modified by that worker
+ script and becomes read-only to all other threads.
+
+ Here is an example application that uses WorkerScript to append the
+ current time to a WorkerListModel:
+
+ \snippet examples/declarative/workerlistmodel/timedisplay.qml 0
+
+ The included file, \tt dataloader.js, looks like this:
+
+ \snippet examples/declarative/workerlistmodel/dataloader.js 0
+
+ The application's \tt Timer object periodically sends a message to the
+ worker script by calling \tt WorkerScript::sendMessage(). When this message
+ is received, \tt WorkerScript.onMessage() is invoked in
+ \tt dataloader.js, which appends the current time to the worker list
+ model.
+
+ Note that unlike ListModel, WorkerListModel does not have \tt move() and
+ \tt setProperty() methods.
+
+ \sa WorkerScript, ListModel
+*/
+QDeclarativeWorkerListModel::QDeclarativeWorkerListModel(QObject *parent)
+: QListModelInterface(parent), m_agent(0)
+{
+}
+
+QDeclarativeWorkerListModel::~QDeclarativeWorkerListModel()
+{
+ if (m_agent) {
+ m_agent->m_model = 0;
+ m_agent->release();
+ }
+}
+
+/*!
+ \qmlmethod WorkerListModel::clear()
+
+ Deletes all content from the model. The properties are cleared such that
+ different properties may be set on subsequent additions.
+
+ \sa append() remove()
+*/
+void QDeclarativeWorkerListModel::clear()
+{
+ if (m_agent) {
+ qmlInfo(this) << "List can only be modified from a WorkerScript";
+ return;
+ }
+
+ int count = m_values.count();
+ m_values.clear();
+ if (count) {
+ emit itemsRemoved(0, count);
+ emit countChanged();
+ }
+}
+
+/*!
+ \qmlmethod WorkerListModel::remove(int index)
+
+ Deletes the content at \a index from the model.
+
+ \sa clear()
+*/
+void QDeclarativeWorkerListModel::remove(int index)
+{
+ if (m_agent) {
+ qmlInfo(this) << "List can only be modified from a WorkerScript";
+ return;
+ }
+
+ if (m_values.count() <= index)
+ return;
+
+ m_values.removeAt(index);
+ emit itemsRemoved(index, 1);
+ emit countChanged();
+}
+
+/*!
+ \qmlmethod WorkerListModel::append(jsobject dict)
+
+ Adds a new item to the end of the list model, with the
+ values in \a dict.
+
+ \code
+ FruitModel.append({"cost": 5.95, "name":"Pizza"})
+ \endcode
+
+ \sa set() remove()
+*/
+void QDeclarativeWorkerListModel::append(const QScriptValue &value)
+{
+ if (m_agent) {
+ qmlInfo(this) << "List can only be modified from a WorkerScript";
+ return;
+ }
+
+ QHash<int, QVariant> data;
+
+ QScriptValueIterator it(value);
+ while (it.hasNext()) {
+ it.next();
+ QString name = it.name();
+ QVariant v = it.value().toVariant();
+
+ QHash<QString, int>::Iterator iter = m_strings.find(name);
+ if (iter == m_strings.end()) {
+ int role = m_roles.count();
+ m_roles.insert(role, name);
+ iter = m_strings.insert(name, role);
+ }
+ data.insert(*iter, v);
+ }
+
+ m_values.append(data);
+
+ emit itemsInserted(m_values.count() - 1, 1);
+ emit countChanged();
+}
+
+/*!
+ \qmlmethod WorkerListModel::insert(int index, jsobject dict)
+
+ Adds a new item to the list model at position \a index, with the
+ values in \a dict.
+
+ \code
+ FruitModel.insert(2, {"cost": 5.95, "name":"Pizza"})
+ \endcode
+
+ The \a index must be to an existing item in the list, or one past
+ the end of the list (equivalent to append).
+
+ \sa set() append()
+*/
+void QDeclarativeWorkerListModel::insert(int index, const QScriptValue &value)
+{
+ if (m_agent) {
+ qmlInfo(this) << "List can only be modified from a WorkerScript";
+ return;
+ }
+
+ if (index > m_values.count())
+ return;
+
+ QHash<int, QVariant> data;
+
+ QScriptValueIterator it(value);
+ while (it.hasNext()) {
+ it.next();
+ QString name = it.name();
+ QVariant v = it.value().toVariant();
+
+ QHash<QString, int>::Iterator iter = m_strings.find(name);
+ if (iter == m_strings.end()) {
+ int role = m_roles.count();
+ m_roles.insert(role, name);
+ iter = m_strings.insert(name, role);
+ }
+ data.insert(*iter, v);
+ }
+
+ m_values.insert(index, data);
+ emit itemsInserted(index, 1);
+ emit countChanged();
+}
+
+/*!
+ \qmlmethod object ListModel::get(int index)
+
+ Returns the item at \a index in the list model.
+
+ \code
+ FruitModel.append({"cost": 5.95, "name":"Jackfruit"})
+ FruitModel.get(0).cost
+ \endcode
+
+ The \a index must be an element in the list.
+
+ Note that properties of the returned object that are themselves objects
+ will also be models, and this get() method is used to access elements:
+
+ \code
+ FruitModel.append(..., "attributes":
+ [{"name":"spikes","value":"7mm"},
+ {"name":"color","value":"green"}]);
+ FruitModel.get(0).attributes.get(1).value; // == "green"
+ \endcode
+
+ \sa append()
+*/
+QScriptValue QDeclarativeWorkerListModel::get(int index) const
+{
+ QDeclarativeEngine *engine = qmlEngine(this);
+ if (!engine || m_values.count() <= index)
+ return QScriptValue();
+
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+ QScriptValue rv = scriptEngine->newObject();
+
+ QHash<int, QVariant> data = m_values.at(index);
+ for (QHash<int, QVariant>::ConstIterator iter = data.begin(); iter != data.end(); ++iter)
+ rv.setProperty(m_roles.value(iter.key()), qScriptValueFromValue(scriptEngine, iter.value()));
+
+ return rv;
+}
+
+/*!
+ \qmlmethod WorkerListModel::set(int index, jsobject dict)
+
+ Changes the item at \a index in the list model with the
+ values in \a dict. Properties not appearing in \a valuemap
+ are left unchanged.
+
+ \code
+ FruitModel.set(3, {"cost": 5.95, "name":"Pizza"})
+ \endcode
+
+ The \a index must be an element in the list.
+
+ \sa append()
+*/
+void QDeclarativeWorkerListModel::set(int index, const QScriptValue &value)
+{
+ if (m_agent) {
+ qmlInfo(this) << "List can only be modified from a WorkerScript";
+ return;
+ }
+
+ if (m_values.count() <= index)
+ return;
+
+ QHash<int, QVariant> data;
+
+ QScriptValueIterator it(value);
+ while (it.hasNext()) {
+ it.next();
+ QString name = it.name();
+ QVariant v = it.value().toVariant();
+
+ QHash<QString, int>::Iterator iter = m_strings.find(name);
+ if (iter == m_strings.end()) {
+ int role = m_roles.count();
+ m_roles.insert(role, name);
+ iter = m_strings.insert(name, role);
+ }
+ data.insert(*iter, v);
+ }
+
+ if (m_values.at(index) != data) {
+ m_values[index] = data;
+ emit itemsChanged(index, 1, m_roles.keys());
+ }
+}
+
+/*!
+ \qmlmethod WorkerListModel::sync()
+
+ Writes any unsaved changes to the list model. This must be called after
+ changes have been made to the list model in the worker script.
+
+ Note that this method can only be called from the associated worker script.
+*/
+void QDeclarativeWorkerListModel::sync()
+{
+ // This is really a dummy method to make it look like sync() exists in
+ // WorkerListModel (and not QDeclarativeWorkerListModelAgent) and to let
+ // us document sync().
+ qmlInfo(this) << "sync() can only be called from a WorkerScript";
+}
+
+QDeclarativeWorkerListModelAgent *QDeclarativeWorkerListModel::agent()
+{
+ if (!m_agent)
+ m_agent = new QDeclarativeWorkerListModelAgent(this);
+
+ return m_agent;
+}
+
+QList<int> QDeclarativeWorkerListModel::roles() const
+{
+ return m_roles.keys();
+}
+
+QString QDeclarativeWorkerListModel::toString(int role) const
+{
+ return m_roles.value(role);
+}
+
+/*!
+ \qmlproperty int ListModel::count
+ The number of data entries in the model.
+*/
+int QDeclarativeWorkerListModel::count() const
+{
+ return m_values.count();
+}
+
+QHash<int,QVariant> QDeclarativeWorkerListModel::data(int index, const QList<int> &) const
+{
+ if (m_values.count() <= index)
+ return QHash<int, QVariant>();
+ else
+ return m_values.at(index);
+}
+
+QVariant QDeclarativeWorkerListModel::data(int index, int role) const
+{
+ if (m_values.count() <= index)
+ return QVariant();
+ else
+ return m_values.at(index).value(role);
+}
+
+QT_END_NAMESPACE
+
+#include "qdeclarativeworkerscript.moc"
+
diff --git a/src/declarative/qml/qdeclarativeworkerscript_p.h b/src/declarative/qml/qdeclarativeworkerscript_p.h
new file mode 100644
index 0000000000..912eac9957
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeworkerscript_p.h
@@ -0,0 +1,167 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEWORKERSCRIPT_P_H
+#define QDECLARATIVEWORKERSCRIPT_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarative.h"
+#include "qdeclarativeparserstatus.h"
+#include <private/qlistmodelinterface_p.h>
+
+#include <QtCore/qthread.h>
+#include <QtScript/qscriptvalue.h>
+#include <QtCore/qurl.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeWorkerScript;
+class QDeclarativeWorkerScriptEnginePrivate;
+class QDeclarativeWorkerScriptEngine : public QThread
+{
+Q_OBJECT
+public:
+ QDeclarativeWorkerScriptEngine(QDeclarativeEngine *parent = 0);
+ virtual ~QDeclarativeWorkerScriptEngine();
+
+ int registerWorkerScript(QDeclarativeWorkerScript *);
+ void removeWorkerScript(int);
+ void executeUrl(int, const QUrl &);
+ void sendMessage(int, const QVariant &);
+
+protected:
+ virtual void run();
+
+private:
+ QDeclarativeWorkerScriptEnginePrivate *d;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeWorkerScript : public QObject, public QDeclarativeParserStatus
+{
+ Q_OBJECT
+ Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
+
+ Q_INTERFACES(QDeclarativeParserStatus)
+public:
+ QDeclarativeWorkerScript(QObject *parent = 0);
+ virtual ~QDeclarativeWorkerScript();
+
+ QUrl source() const;
+ void setSource(const QUrl &);
+
+public slots:
+ void sendMessage(const QScriptValue &);
+
+signals:
+ void sourceChanged();
+ void message(const QScriptValue &messageObject);
+
+protected:
+ virtual void componentComplete();
+ virtual bool event(QEvent *);
+
+private:
+ QDeclarativeWorkerScriptEngine *m_engine;
+ int m_scriptId;
+ QUrl m_source;
+};
+
+class QDeclarativeWorkerListModelAgent;
+class Q_DECLARATIVE_EXPORT QDeclarativeWorkerListModel : public QListModelInterface
+{
+ Q_OBJECT
+ Q_PROPERTY(int count READ count NOTIFY countChanged)
+
+public:
+ QDeclarativeWorkerListModel(QObject * = 0);
+ virtual ~QDeclarativeWorkerListModel();
+
+ Q_INVOKABLE void clear();
+ Q_INVOKABLE void remove(int index);
+ Q_INVOKABLE void append(const QScriptValue &);
+ Q_INVOKABLE void insert(int index, const QScriptValue&);
+ Q_INVOKABLE QScriptValue get(int index) const;
+ Q_INVOKABLE void set(int index, const QScriptValue &);
+ Q_INVOKABLE void sync();
+
+ QDeclarativeWorkerListModelAgent *agent();
+
+ virtual QList<int> roles() const;
+ virtual QString toString(int role) const;
+ virtual int count() const;
+ virtual QHash<int,QVariant> data(int index, const QList<int> &roles = (QList<int>())) const;
+ virtual QVariant data(int index, int role) const;
+
+Q_SIGNALS:
+ void countChanged();
+
+private:
+ friend class QDeclarativeWorkerListModelAgent;
+
+ QHash<int, QString> m_roles;
+ QHash<QString, int> m_strings;
+ QList<QHash<int, QVariant> > m_values;
+
+ QDeclarativeWorkerListModelAgent *m_agent;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeWorkerScript);
+QML_DECLARE_TYPE(QDeclarativeWorkerListModel);
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEWORKERSCRIPT_P_H
diff --git a/src/declarative/qml/qdeclarativexmlhttprequest.cpp b/src/declarative/qml/qdeclarativexmlhttprequest.cpp
new file mode 100644
index 0000000000..87cab85fae
--- /dev/null
+++ b/src/declarative/qml/qdeclarativexmlhttprequest.cpp
@@ -0,0 +1,1644 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativexmlhttprequest_p.h"
+
+#include "qdeclarativeengine.h"
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativerefcount_p.h"
+#include "qdeclarativeengine_p.h"
+#include "qdeclarativeexpression_p.h"
+
+#include <QtCore/qobject.h>
+#include <QtScript/qscriptvalue.h>
+#include <QtScript/qscriptcontext.h>
+#include <QtScript/qscriptengine.h>
+#include <QtNetwork/qnetworkreply.h>
+#include <QtCore/qtextcodec.h>
+#include <QtCore/qxmlstream.h>
+#include <QtCore/qstack.h>
+#include <QtCore/qdebug.h>
+
+// From DOM-Level-3-Core spec
+// http://www.w3.org/TR/DOM-Level-3-Core/core.html
+#define INDEX_SIZE_ERR 1
+#define DOMSTRING_SIZE_ERR 2
+#define HIERARCHY_REQUEST_ERR 3
+#define WRONG_DOCUMENT_ERR 4
+#define INVALID_CHARACTER_ERR 5
+#define NO_DATA_ALLOWED_ERR 6
+#define NO_MODIFICATION_ALLOWED_ERR 7
+#define NOT_FOUND_ERR 8
+#define NOT_SUPPORTED_ERR 9
+#define INUSE_ATTRIBUTE_ERR 10
+#define INVALID_STATE_ERR 11
+#define SYNTAX_ERR 12
+#define INVALID_MODIFICATION_ERR 13
+#define NAMESPACE_ERR 14
+#define INVALID_ACCESS_ERR 15
+#define VALIDATION_ERR 16
+#define TYPE_MISMATCH_ERR 17
+
+#define THROW_DOM(error, desc) \
+{ \
+ QScriptValue errorValue = context->throwError(QLatin1String(desc)); \
+ errorValue.setProperty(QLatin1String("code"), error); \
+ return errorValue; \
+}
+
+#define THROW_SYNTAX(desc) \
+ return context->throwError(QScriptContext::SyntaxError, QLatin1String(desc));
+#define THROW_REFERENCE(desc) \
+ return context->throwError(QScriptContext::ReferenceError, QLatin1String(desc));
+
+#define D(arg) (arg)->release()
+#define A(arg) (arg)->addref()
+
+QT_BEGIN_NAMESPACE
+
+class DocumentImpl;
+class NodeImpl
+{
+public:
+ NodeImpl() : type(Element), document(0), parent(0) {}
+ virtual ~NodeImpl() {
+ for (int ii = 0; ii < children.count(); ++ii)
+ delete children.at(ii);
+ for (int ii = 0; ii < attributes.count(); ++ii)
+ delete attributes.at(ii);
+ }
+
+ // These numbers are copied from the Node IDL definition
+ enum Type {
+ Attr = 2,
+ CDATA = 4,
+ Comment = 8,
+ Document = 9,
+ DocumentFragment = 11,
+ DocumentType = 10,
+ Element = 1,
+ Entity = 6,
+ EntityReference = 5,
+ Notation = 12,
+ ProcessingInstruction = 7,
+ Text = 3
+ };
+ Type type;
+
+ QString namespaceUri;
+ QString name;
+
+ QString data;
+
+ void addref();
+ void release();
+
+ DocumentImpl *document;
+ NodeImpl *parent;
+
+ QList<NodeImpl *> children;
+ QList<NodeImpl *> attributes;
+};
+
+class DocumentImpl : public QDeclarativeRefCount, public NodeImpl
+{
+public:
+ DocumentImpl() : root(0) { type = Document; }
+ virtual ~DocumentImpl() {
+ if (root) delete root;
+ }
+
+ QString version;
+ QString encoding;
+ bool isStandalone;
+
+ NodeImpl *root;
+
+ void addref() { QDeclarativeRefCount::addref(); }
+ void release() { QDeclarativeRefCount::release(); }
+};
+
+class NamedNodeMap
+{
+public:
+ // JS API
+ static QScriptValue length(QScriptContext *context, QScriptEngine *engine);
+
+ // C++ API
+ static QScriptValue prototype(QScriptEngine *);
+ static QScriptValue create(QScriptEngine *, NodeImpl *, QList<NodeImpl *> *);
+
+ NamedNodeMap();
+ NamedNodeMap(const NamedNodeMap &);
+ ~NamedNodeMap();
+ bool isNull();
+
+ NodeImpl *d;
+ QList<NodeImpl *> *list;
+private:
+ NamedNodeMap &operator=(const NamedNodeMap &);
+};
+
+class NamedNodeMapClass : public QScriptClass
+{
+public:
+ NamedNodeMapClass(QScriptEngine *engine) : QScriptClass(engine) {}
+
+ virtual QueryFlags queryProperty(const QScriptValue &object, const QScriptString &name, QueryFlags flags, uint *id);
+ virtual QScriptValue property(const QScriptValue &object, const QScriptString &name, uint id);
+};
+
+class NodeList
+{
+public:
+ // JS API
+ static QScriptValue length(QScriptContext *context, QScriptEngine *engine);
+
+ // C++ API
+ static QScriptValue prototype(QScriptEngine *);
+ static QScriptValue create(QScriptEngine *, NodeImpl *);
+
+ NodeList();
+ NodeList(const NodeList &);
+ ~NodeList();
+ bool isNull();
+
+ NodeImpl *d;
+private:
+ NodeList &operator=(const NodeList &);
+};
+
+class NodeListClass : public QScriptClass
+{
+public:
+ NodeListClass(QScriptEngine *engine) : QScriptClass(engine) {}
+ virtual QueryFlags queryProperty(const QScriptValue &object, const QScriptString &name, QueryFlags flags, uint *id);
+ virtual QScriptValue property(const QScriptValue &object, const QScriptString &name, uint id);
+};
+
+class Node
+{
+public:
+ // JS API
+ static QScriptValue nodeName(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue nodeValue(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue nodeType(QScriptContext *context, QScriptEngine *engine);
+
+ static QScriptValue parentNode(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue childNodes(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue firstChild(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue lastChild(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue previousSibling(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue nextSibling(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue attributes(QScriptContext *context, QScriptEngine *engine);
+
+ //static QScriptValue ownerDocument(QScriptContext *context, QScriptEngine *engine);
+ //static QScriptValue namespaceURI(QScriptContext *context, QScriptEngine *engine);
+ //static QScriptValue prefix(QScriptContext *context, QScriptEngine *engine);
+ //static QScriptValue localName(QScriptContext *context, QScriptEngine *engine);
+ //static QScriptValue baseURI(QScriptContext *context, QScriptEngine *engine);
+ //static QScriptValue textContent(QScriptContext *context, QScriptEngine *engine);
+
+ // C++ API
+ static QScriptValue prototype(QScriptEngine *);
+ static QScriptValue create(QScriptEngine *, NodeImpl *);
+
+ Node();
+ Node(const Node &o);
+ ~Node();
+ bool isNull() const;
+
+ NodeImpl *d;
+
+private:
+ Node &operator=(const Node &);
+};
+
+class Element : public Node
+{
+public:
+ // C++ API
+ static QScriptValue prototype(QScriptEngine *);
+};
+
+class Attr : public Node
+{
+public:
+ // JS API
+ static QScriptValue name(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue specified(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue value(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue ownerElement(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue schemaTypeInfo(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue isId(QScriptContext *context, QScriptEngine *engine);
+
+ // C++ API
+ static QScriptValue prototype(QScriptEngine *);
+};
+
+class CharacterData : public Node
+{
+public:
+ // JS API
+ static QScriptValue length(QScriptContext *context, QScriptEngine *engine);
+
+ // C++ API
+ static QScriptValue prototype(QScriptEngine *);
+};
+
+class Text : public CharacterData
+{
+public:
+ // JS API
+ static QScriptValue isElementContentWhitespace(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue wholeText(QScriptContext *context, QScriptEngine *engine);
+
+ // C++ API
+ static QScriptValue prototype(QScriptEngine *);
+};
+
+class CDATA : public Text
+{
+public:
+ // C++ API
+ static QScriptValue prototype(QScriptEngine *);
+};
+
+class Document : public Node
+{
+public:
+ // JS API
+ static QScriptValue xmlVersion(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue xmlEncoding(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue xmlStandalone(QScriptContext *context, QScriptEngine *engine);
+ static QScriptValue documentElement(QScriptContext *context, QScriptEngine *engine);
+
+ // C++ API
+ static QScriptValue prototype(QScriptEngine *);
+ static QScriptValue load(QScriptEngine *engine, const QByteArray &data);
+};
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(Node);
+Q_DECLARE_METATYPE(NodeList);
+Q_DECLARE_METATYPE(NamedNodeMap);
+
+QT_BEGIN_NAMESPACE
+
+void NodeImpl::addref()
+{
+ A(document);
+}
+
+void NodeImpl::release()
+{
+ D(document);
+}
+
+QScriptValue Node::nodeName(QScriptContext *context, QScriptEngine *engine)
+{
+ Node node = qscriptvalue_cast<Node>(context->thisObject());
+ if (node.isNull()) return engine->undefinedValue();
+
+ switch (node.d->type) {
+ case NodeImpl::Document:
+ return QScriptValue(QLatin1String("#document"));
+ case NodeImpl::CDATA:
+ return QScriptValue(QLatin1String("#cdata-section"));
+ case NodeImpl::Text:
+ return QScriptValue(QLatin1String("#text"));
+ default:
+ return QScriptValue(node.d->name);
+ }
+}
+
+QScriptValue Node::nodeValue(QScriptContext *context, QScriptEngine *engine)
+{
+ Node node = qscriptvalue_cast<Node>(context->thisObject());
+ if (node.isNull()) return engine->undefinedValue();
+
+ if (node.d->type == NodeImpl::Document ||
+ node.d->type == NodeImpl::DocumentFragment ||
+ node.d->type == NodeImpl::DocumentType ||
+ node.d->type == NodeImpl::Element ||
+ node.d->type == NodeImpl::Entity ||
+ node.d->type == NodeImpl::EntityReference ||
+ node.d->type == NodeImpl::Notation)
+ return engine->nullValue();
+
+ return QScriptValue(node.d->data);
+}
+
+QScriptValue Node::nodeType(QScriptContext *context, QScriptEngine *engine)
+{
+ Node node = qscriptvalue_cast<Node>(context->thisObject());
+ if (node.isNull()) return engine->undefinedValue();
+ return QScriptValue(node.d->type);
+}
+
+QScriptValue Node::parentNode(QScriptContext *context, QScriptEngine *engine)
+{
+ Node node = qscriptvalue_cast<Node>(context->thisObject());
+ if (node.isNull()) return engine->undefinedValue();
+
+ if (node.d->parent) return Node::create(engine, node.d->parent);
+ else return engine->nullValue();
+}
+
+QScriptValue Node::childNodes(QScriptContext *context, QScriptEngine *engine)
+{
+ Node node = qscriptvalue_cast<Node>(context->thisObject());
+ if (node.isNull()) return engine->undefinedValue();
+
+ return NodeList::create(engine, node.d);
+}
+
+QScriptValue Node::firstChild(QScriptContext *context, QScriptEngine *engine)
+{
+ Node node = qscriptvalue_cast<Node>(context->thisObject());
+ if (node.isNull()) return engine->undefinedValue();
+
+ if (node.d->children.isEmpty()) return engine->nullValue();
+ else return Node::create(engine, node.d->children.first());
+}
+
+QScriptValue Node::lastChild(QScriptContext *context, QScriptEngine *engine)
+{
+ Node node = qscriptvalue_cast<Node>(context->thisObject());
+ if (node.isNull()) return engine->undefinedValue();
+
+ if (node.d->children.isEmpty()) return engine->nullValue();
+ else return Node::create(engine, node.d->children.last());
+}
+
+QScriptValue Node::previousSibling(QScriptContext *context, QScriptEngine *engine)
+{
+ Node node = qscriptvalue_cast<Node>(context->thisObject());
+ if (node.isNull()) return engine->undefinedValue();
+
+ if (!node.d->parent) return engine->nullValue();
+
+ for (int ii = 0; ii < node.d->parent->children.count(); ++ii) {
+ if (node.d->parent->children.at(ii) == node.d) {
+ if (ii == 0) return engine->nullValue();
+ else return Node::create(engine, node.d->parent->children.at(ii - 1));
+ }
+ }
+
+ return engine->nullValue();
+}
+
+QScriptValue Node::nextSibling(QScriptContext *context, QScriptEngine *engine)
+{
+ Node node = qscriptvalue_cast<Node>(context->thisObject());
+ if (node.isNull()) return engine->undefinedValue();
+
+ if (!node.d->parent) return engine->nullValue();
+
+ for (int ii = 0; ii < node.d->parent->children.count(); ++ii) {
+ if (node.d->parent->children.at(ii) == node.d) {
+ if ((ii + 1) == node.d->parent->children.count()) return engine->nullValue();
+ else return Node::create(engine, node.d->parent->children.at(ii + 1));
+ }
+ }
+
+ return engine->nullValue();
+}
+
+QScriptValue Node::attributes(QScriptContext *context, QScriptEngine *engine)
+{
+ Node node = qscriptvalue_cast<Node>(context->thisObject());
+ if (node.isNull()) return engine->undefinedValue();
+
+ if (node.d->type != NodeImpl::Element)
+ return engine->nullValue();
+ else
+ return NamedNodeMap::create(engine, node.d, &node.d->attributes);
+}
+
+QScriptValue Node::prototype(QScriptEngine *engine)
+{
+ QScriptValue proto = engine->newObject();
+
+ proto.setProperty(QLatin1String("nodeName"), engine->newFunction(nodeName), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+ proto.setProperty(QLatin1String("nodeValue"), engine->newFunction(nodeValue), QScriptValue::ReadOnly | QScriptValue::PropertyGetter | QScriptValue::PropertySetter);
+ proto.setProperty(QLatin1String("nodeType"), engine->newFunction(nodeType), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+ proto.setProperty(QLatin1String("parentNode"), engine->newFunction(parentNode), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+ proto.setProperty(QLatin1String("childNodes"), engine->newFunction(childNodes), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+ proto.setProperty(QLatin1String("firstChild"), engine->newFunction(firstChild), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+ proto.setProperty(QLatin1String("lastChild"), engine->newFunction(lastChild), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+ proto.setProperty(QLatin1String("previousSibling"), engine->newFunction(previousSibling), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+ proto.setProperty(QLatin1String("nextSibling"), engine->newFunction(nextSibling), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+ proto.setProperty(QLatin1String("attributes"), engine->newFunction(attributes), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+
+ return proto;
+}
+
+QScriptValue Node::create(QScriptEngine *engine, NodeImpl *data)
+{
+ QScriptValue instance = engine->newObject();
+
+ switch (data->type) {
+ case NodeImpl::Attr:
+ instance.setPrototype(Attr::prototype(engine));
+ break;
+ case NodeImpl::Comment:
+ case NodeImpl::Document:
+ case NodeImpl::DocumentFragment:
+ case NodeImpl::DocumentType:
+ case NodeImpl::Entity:
+ case NodeImpl::EntityReference:
+ case NodeImpl::Notation:
+ case NodeImpl::ProcessingInstruction:
+ return QScriptValue();
+ case NodeImpl::CDATA:
+ instance.setPrototype(CDATA::prototype(engine));
+ break;
+ case NodeImpl::Text:
+ instance.setPrototype(Text::prototype(engine));
+ break;
+ case NodeImpl::Element:
+ instance.setPrototype(Element::prototype(engine));
+ break;
+ }
+
+ Node node;
+ node.d = data;
+ if (data) A(data);
+
+ return engine->newVariant(instance, qVariantFromValue(node));
+}
+
+QScriptValue Element::prototype(QScriptEngine *engine)
+{
+ QScriptValue proto = engine->newObject();
+ proto.setPrototype(Node::prototype(engine));
+
+ proto.setProperty(QLatin1String("tagName"), engine->newFunction(nodeName), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+
+ return proto;
+}
+
+QScriptValue Attr::prototype(QScriptEngine *engine)
+{
+ QScriptValue proto = engine->newObject();
+ proto.setPrototype(Node::prototype(engine));
+
+ proto.setProperty(QLatin1String("name"), engine->newFunction(name), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+ proto.setProperty(QLatin1String("value"), engine->newFunction(value), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+ proto.setProperty(QLatin1String("ownerElement"), engine->newFunction(ownerElement), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+
+ return proto;
+}
+
+QScriptValue Attr::name(QScriptContext *context, QScriptEngine *engine)
+{
+ Node node = qscriptvalue_cast<Node>(context->thisObject());
+ if (node.isNull()) return engine->undefinedValue();
+
+ return QScriptValue(node.d->name);
+}
+
+QScriptValue Attr::value(QScriptContext *context, QScriptEngine *engine)
+{
+ Node node = qscriptvalue_cast<Node>(context->thisObject());
+ if (node.isNull()) return engine->undefinedValue();
+
+ return QScriptValue(node.d->data);
+}
+
+QScriptValue Attr::ownerElement(QScriptContext *context, QScriptEngine *engine)
+{
+ Node node = qscriptvalue_cast<Node>(context->thisObject());
+ if (node.isNull()) return engine->undefinedValue();
+
+ return Node::create(engine, node.d->parent);
+}
+
+QScriptValue CharacterData::length(QScriptContext *context, QScriptEngine *engine)
+{
+ Node node = qscriptvalue_cast<Node>(context->thisObject());
+ if (node.isNull()) return engine->undefinedValue();
+
+ return QScriptValue(node.d->data.length());
+}
+
+QScriptValue CharacterData::prototype(QScriptEngine *engine)
+{
+ QScriptValue proto = engine->newObject();
+ proto.setPrototype(Node::prototype(engine));
+
+ proto.setProperty(QLatin1String("data"), engine->newFunction(nodeValue), QScriptValue::ReadOnly | QScriptValue::PropertyGetter | QScriptValue::PropertySetter);
+ proto.setProperty(QLatin1String("length"), engine->newFunction(length), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+
+ return proto;
+}
+
+QScriptValue Text::isElementContentWhitespace(QScriptContext *context, QScriptEngine *engine)
+{
+ Node node = qscriptvalue_cast<Node>(context->thisObject());
+ if (node.isNull()) return engine->undefinedValue();
+
+ return node.d->data.trimmed().isEmpty();
+}
+
+QScriptValue Text::wholeText(QScriptContext *context, QScriptEngine *engine)
+{
+ Node node = qscriptvalue_cast<Node>(context->thisObject());
+ if (node.isNull()) return engine->undefinedValue();
+
+ return node.d->data;
+}
+
+QScriptValue Text::prototype(QScriptEngine *engine)
+{
+ QScriptValue proto = engine->newObject();
+ proto.setPrototype(CharacterData::prototype(engine));
+
+ proto.setProperty(QLatin1String("isElementContentWhitespace"), engine->newFunction(isElementContentWhitespace), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+ proto.setProperty(QLatin1String("wholeText"), engine->newFunction(wholeText), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+
+ return proto;
+}
+
+QScriptValue CDATA::prototype(QScriptEngine *engine)
+{
+ QScriptValue proto = engine->newObject();
+ proto.setPrototype(Text::prototype(engine));
+ return proto;
+}
+
+QScriptValue Document::prototype(QScriptEngine *engine)
+{
+ QScriptValue proto = engine->newObject();
+ proto.setPrototype(Node::prototype(engine));
+
+ proto.setProperty(QLatin1String("xmlVersion"), engine->newFunction(xmlVersion), QScriptValue::ReadOnly | QScriptValue::PropertyGetter | QScriptValue::PropertySetter);
+ proto.setProperty(QLatin1String("xmlEncoding"), engine->newFunction(xmlEncoding), QScriptValue::ReadOnly | QScriptValue::PropertyGetter | QScriptValue::PropertySetter);
+ proto.setProperty(QLatin1String("xmlStandalone"), engine->newFunction(xmlStandalone), QScriptValue::ReadOnly | QScriptValue::PropertyGetter | QScriptValue::PropertySetter);
+ proto.setProperty(QLatin1String("documentElement"), engine->newFunction(documentElement), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+
+ return proto;
+}
+
+QScriptValue Document::load(QScriptEngine *engine, const QByteArray &data)
+{
+ Q_ASSERT(engine);
+
+ DocumentImpl *document = 0;
+ QStack<NodeImpl *> nodeStack;
+
+ QXmlStreamReader reader(data);
+
+ while (!reader.atEnd()) {
+ switch (reader.readNext()) {
+ case QXmlStreamReader::NoToken:
+ break;
+ case QXmlStreamReader::Invalid:
+ break;
+ case QXmlStreamReader::StartDocument:
+ Q_ASSERT(!document);
+ document = new DocumentImpl;
+ document->document = document;
+ document->version = reader.documentVersion().toString();
+ document->encoding = reader.documentEncoding().toString();
+ document->isStandalone = reader.isStandaloneDocument();
+ break;
+ case QXmlStreamReader::EndDocument:
+ break;
+ case QXmlStreamReader::StartElement:
+ {
+ Q_ASSERT(document);
+ NodeImpl *node = new NodeImpl;
+ node->document = document;
+ node->namespaceUri = reader.namespaceUri().toString();
+ node->name = reader.name().toString();
+ if (nodeStack.isEmpty()) {
+ document->root = node;
+ } else {
+ node->parent = nodeStack.top();
+ node->parent->children.append(node);
+ }
+ nodeStack.append(node);
+
+ foreach (const QXmlStreamAttribute &a, reader.attributes()) {
+ NodeImpl *attr = new NodeImpl;
+ attr->document = document;
+ attr->type = NodeImpl::Attr;
+ attr->namespaceUri = a.namespaceUri().toString();
+ attr->name = a.name().toString();
+ attr->data = a.value().toString();
+ attr->parent = node;
+ node->attributes.append(attr);
+ }
+ }
+ break;
+ case QXmlStreamReader::EndElement:
+ nodeStack.pop();
+ break;
+ case QXmlStreamReader::Characters:
+ {
+ NodeImpl *node = new NodeImpl;
+ node->document = document;
+ node->type = reader.isCDATA()?NodeImpl::CDATA:NodeImpl::Text;
+ node->parent = nodeStack.top();
+ node->parent->children.append(node);
+ node->data = reader.text().toString();
+ }
+ break;
+ case QXmlStreamReader::Comment:
+ break;
+ case QXmlStreamReader::DTD:
+ break;
+ case QXmlStreamReader::EntityReference:
+ break;
+ case QXmlStreamReader::ProcessingInstruction:
+ break;
+ }
+ }
+
+ if (!document || reader.hasError()) {
+ if (document) D(document);
+ return engine->nullValue();
+ }
+
+ QScriptValue instance = engine->newObject();
+ instance.setPrototype(Document::prototype(engine));
+ Node documentNode;
+ documentNode.d = document;
+ return engine->newVariant(instance, qVariantFromValue(documentNode));
+}
+
+Node::Node()
+: d(0)
+{
+}
+
+Node::Node(const Node &o)
+: d(o.d)
+{
+ if (d) A(d);
+}
+
+Node::~Node()
+{
+ if (d) D(d);
+}
+
+bool Node::isNull() const
+{
+ return d == 0;
+}
+
+QScriptValue NamedNodeMap::length(QScriptContext *context, QScriptEngine *engine)
+{
+ NamedNodeMap map = qscriptvalue_cast<NamedNodeMap>(context->thisObject().data());
+ if (map.isNull()) return engine->undefinedValue();
+
+ return QScriptValue(map.list->count());
+}
+
+QScriptValue NamedNodeMap::prototype(QScriptEngine *engine)
+{
+ QScriptValue proto = engine->newObject();
+
+ proto.setProperty(QLatin1String("length"), engine->newFunction(length), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+
+ return proto;
+}
+
+QScriptValue NamedNodeMap::create(QScriptEngine *engine, NodeImpl *data, QList<NodeImpl *> *list)
+{
+ QScriptValue instance = engine->newObject();
+ instance.setPrototype(NamedNodeMap::prototype(engine));
+
+ NamedNodeMap map;
+ map.d = data;
+ map.list = list;
+ if (data) A(data);
+
+ instance.setData(engine->newVariant(qVariantFromValue(map)));
+
+ if (!QDeclarativeScriptEngine::get(engine)->namedNodeMapClass)
+ QDeclarativeScriptEngine::get(engine)->namedNodeMapClass= new NamedNodeMapClass(engine);
+
+ instance.setScriptClass(QDeclarativeScriptEngine::get(engine)->namedNodeMapClass);
+
+ return instance;
+}
+
+NamedNodeMap::NamedNodeMap()
+: d(0), list(0)
+{
+}
+
+NamedNodeMap::NamedNodeMap(const NamedNodeMap &o)
+: d(o.d), list(o.list)
+{
+ if (d) A(d);
+}
+
+NamedNodeMap::~NamedNodeMap()
+{
+ if (d) D(d);
+}
+
+bool NamedNodeMap::isNull()
+{
+ return d == 0;
+}
+
+QScriptValue NodeList::length(QScriptContext *context, QScriptEngine *engine)
+{
+ NodeList list = qscriptvalue_cast<NodeList>(context->thisObject().data());
+ if (list.isNull()) return engine->undefinedValue();
+
+ return QScriptValue(list.d->children.count());
+}
+
+QScriptValue NodeList::prototype(QScriptEngine *engine)
+{
+ QScriptValue proto = engine->newObject();
+
+ proto.setProperty(QLatin1String("length"), engine->newFunction(length), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+
+ return proto;
+}
+
+QScriptValue NodeList::create(QScriptEngine *engine, NodeImpl *data)
+{
+ QScriptValue instance = engine->newObject();
+ instance.setPrototype(NodeList::prototype(engine));
+
+ NodeList list;
+ list.d = data;
+ if (data) A(data);
+
+ instance.setData(engine->newVariant(qVariantFromValue(list)));
+
+ if (!QDeclarativeScriptEngine::get(engine)->nodeListClass)
+ QDeclarativeScriptEngine::get(engine)->nodeListClass= new NodeListClass(engine);
+
+ instance.setScriptClass(QDeclarativeScriptEngine::get(engine)->nodeListClass);
+
+ return instance;
+}
+
+NodeList::NodeList()
+: d(0)
+{
+}
+
+NodeList::NodeList(const NodeList &o)
+: d(o.d)
+{
+ if (d) A(d);
+}
+
+NodeList::~NodeList()
+{
+ if (d) D(d);
+}
+
+bool NodeList::isNull()
+{
+ return d == 0;
+}
+
+NamedNodeMapClass::QueryFlags NamedNodeMapClass::queryProperty(const QScriptValue &object, const QScriptString &name, QueryFlags flags, uint *id)
+{
+ if (!(flags & HandlesReadAccess))
+ return 0;
+
+ NamedNodeMap map = qscriptvalue_cast<NamedNodeMap>(object.data());
+ Q_ASSERT(!map.isNull());
+
+ bool ok = false;
+ QString nameString = name.toString();
+ uint index = nameString.toUInt(&ok);
+ if (ok) {
+ if ((uint)map.list->count() <= index)
+ return 0;
+
+ *id = index;
+ return HandlesReadAccess;
+ } else {
+ for (int ii = 0; ii < map.list->count(); ++ii) {
+ if (map.list->at(ii) && map.list->at(ii)->name == nameString) {
+ *id = ii;
+ return HandlesReadAccess;
+ }
+ }
+ }
+
+ return 0;
+}
+
+QScriptValue NamedNodeMapClass::property(const QScriptValue &object, const QScriptString &, uint id)
+{
+ NamedNodeMap map = qscriptvalue_cast<NamedNodeMap>(object.data());
+ return Node::create(engine(), map.list->at(id));
+}
+
+NodeListClass::QueryFlags NodeListClass::queryProperty(const QScriptValue &object, const QScriptString &name, QueryFlags flags, uint *id)
+{
+ if (!(flags & HandlesReadAccess))
+ return 0;
+
+ bool ok = false;
+ uint index = name.toString().toUInt(&ok);
+ if (!ok)
+ return 0;
+
+ NodeList list = qscriptvalue_cast<NodeList>(object.data());
+ if (list.isNull() || (uint)list.d->children.count() <= index)
+ return 0; // ### I think we're meant to raise an exception
+
+ *id = index;
+ return HandlesReadAccess;
+}
+
+QScriptValue NodeListClass::property(const QScriptValue &object, const QScriptString &, uint id)
+{
+ NodeList list = qscriptvalue_cast<NodeList>(object.data());
+ return Node::create(engine(), list.d->children.at(id));
+}
+
+QScriptValue Document::documentElement(QScriptContext *context, QScriptEngine *engine)
+{
+ Node document = qscriptvalue_cast<Node>(context->thisObject());
+ if (document.isNull() || document.d->type != NodeImpl::Document) return engine->undefinedValue();
+
+ return Node::create(engine, static_cast<DocumentImpl *>(document.d)->root);
+}
+
+QScriptValue Document::xmlStandalone(QScriptContext *context, QScriptEngine *engine)
+{
+ Node document = qscriptvalue_cast<Node>(context->thisObject());
+ if (document.isNull() || document.d->type != NodeImpl::Document) return engine->undefinedValue();
+
+ return QScriptValue(static_cast<DocumentImpl *>(document.d)->isStandalone);
+}
+
+QScriptValue Document::xmlVersion(QScriptContext *context, QScriptEngine *engine)
+{
+ Node document = qscriptvalue_cast<Node>(context->thisObject());
+ if (document.isNull() || document.d->type != NodeImpl::Document) return engine->undefinedValue();
+
+ return QScriptValue(static_cast<DocumentImpl *>(document.d)->version);
+}
+
+QScriptValue Document::xmlEncoding(QScriptContext *context, QScriptEngine *engine)
+{
+ Node document = qscriptvalue_cast<Node>(context->thisObject());
+ if (document.isNull() || document.d->type != NodeImpl::Document) return engine->undefinedValue();
+
+ return QScriptValue(static_cast<DocumentImpl *>(document.d)->encoding);
+}
+
+class QDeclarativeXMLHttpRequest : public QObject
+{
+Q_OBJECT
+public:
+ enum State { Unsent = 0,
+ Opened = 1, HeadersReceived = 2,
+ Loading = 3, Done = 4 };
+
+ QDeclarativeXMLHttpRequest(QNetworkAccessManager *manager);
+ virtual ~QDeclarativeXMLHttpRequest();
+
+ bool sendFlag() const;
+ bool errorFlag() const;
+ quint32 readyState() const;
+ int replyStatus() const;
+ QString replyStatusText() const;
+
+ QScriptValue open(QScriptValue *me, const QString &, const QUrl &);
+
+ void addHeader(const QString &, const QString &);
+ QString header(const QString &name);
+ QString headers();
+ QScriptValue send(QScriptValue *me, const QByteArray &);
+ QScriptValue abort(QScriptValue *me);
+
+ QString responseBody() const;
+ const QByteArray & rawResponseBody() const;
+private slots:
+ void downloadProgress(qint64);
+ void error(QNetworkReply::NetworkError);
+ void finished();
+
+private:
+ void requestFromUrl(const QUrl &url);
+
+ State m_state;
+ bool m_errorFlag;
+ bool m_sendFlag;
+ QString m_method;
+ QUrl m_url;
+ QByteArray m_responseEntityBody;
+ QByteArray m_data;
+ int m_redirectCount;
+
+ typedef QPair<QByteArray, QByteArray> HeaderPair;
+ typedef QList<HeaderPair> HeadersList;
+ HeadersList m_headersList;
+ void fillHeadersList();
+
+ QScriptValue m_me; // Set to the data object while a send() is ongoing (to access the callback)
+
+ QScriptValue dispatchCallback(QScriptValue *me);
+ void printError(const QScriptValue&);
+
+ int m_status;
+ QString m_statusText;
+ QNetworkRequest m_request;
+ QNetworkReply *m_network;
+ void destroyNetwork();
+
+ QNetworkAccessManager *m_nam;
+ QNetworkAccessManager *networkAccessManager() { return m_nam; }
+};
+
+QDeclarativeXMLHttpRequest::QDeclarativeXMLHttpRequest(QNetworkAccessManager *manager)
+: m_state(Unsent), m_errorFlag(false), m_sendFlag(false),
+ m_redirectCount(0), m_network(0), m_nam(manager)
+{
+}
+
+QDeclarativeXMLHttpRequest::~QDeclarativeXMLHttpRequest()
+{
+ destroyNetwork();
+}
+
+bool QDeclarativeXMLHttpRequest::sendFlag() const
+{
+ return m_sendFlag;
+}
+
+bool QDeclarativeXMLHttpRequest::errorFlag() const
+{
+ return m_errorFlag;
+}
+
+quint32 QDeclarativeXMLHttpRequest::readyState() const
+{
+ return m_state;
+}
+
+int QDeclarativeXMLHttpRequest::replyStatus() const
+{
+ return m_status;
+}
+
+QString QDeclarativeXMLHttpRequest::replyStatusText() const
+{
+ return m_statusText;
+}
+
+QScriptValue QDeclarativeXMLHttpRequest::open(QScriptValue *me, const QString &method, const QUrl &url)
+{
+ destroyNetwork();
+ m_sendFlag = false;
+ m_errorFlag = false;
+ m_responseEntityBody = QByteArray();
+ m_method = method;
+ m_url = url;
+ m_state = Opened;
+ return dispatchCallback(me);
+}
+
+void QDeclarativeXMLHttpRequest::addHeader(const QString &name, const QString &value)
+{
+ QByteArray utfname = name.toUtf8();
+
+ if (m_request.hasRawHeader(utfname)) {
+ m_request.setRawHeader(utfname, m_request.rawHeader(utfname) + ',' + value.toUtf8());
+ } else {
+ m_request.setRawHeader(utfname, value.toUtf8());
+ }
+}
+
+QString QDeclarativeXMLHttpRequest::header(const QString &name)
+{
+ QByteArray utfname = name.toLower().toUtf8();
+
+ foreach (const HeaderPair &header, m_headersList) {
+ if (header.first == utfname)
+ return QString::fromUtf8(header.second);
+ }
+ return QString();
+}
+
+QString QDeclarativeXMLHttpRequest::headers()
+{
+ QString ret;
+
+ foreach (const HeaderPair &header, m_headersList) {
+ if (ret.length())
+ ret.append(QString::fromUtf8("\r\n"));
+ ret.append(QString::fromUtf8(header.first));
+ ret.append(QString::fromUtf8(": "));
+ ret.append(QString::fromUtf8(header.second));
+ }
+ return ret;
+}
+
+void QDeclarativeXMLHttpRequest::fillHeadersList()
+{
+ QList<QByteArray> headerList = m_network->rawHeaderList();
+
+ m_headersList.clear();
+ foreach (const QByteArray &header, headerList) {
+ HeaderPair pair (header.toLower(), m_network->rawHeader(header));
+ if (pair.first == "set-cookie" ||
+ pair.first == "set-cookie2")
+ continue;
+
+ m_headersList << pair;
+ }
+}
+
+void QDeclarativeXMLHttpRequest::requestFromUrl(const QUrl &url)
+{
+ QNetworkRequest request = m_request;
+ request.setUrl(url);
+ if(m_method == QLatin1String("POST") ||
+ m_method == QLatin1String("PUT")) {
+ QVariant var = request.header(QNetworkRequest::ContentTypeHeader);
+ if (var.isValid()) {
+ QString str = var.toString();
+ int charsetIdx = str.indexOf(QLatin1String("charset="));
+ if (charsetIdx == -1) {
+ // No charset - append
+ if (!str.isEmpty()) str.append(QLatin1Char(';'));
+ str.append(QLatin1String("charset=UTF-8"));
+ } else {
+ charsetIdx += 8;
+ int n = 0;
+ int semiColon = str.indexOf(QLatin1Char(';'), charsetIdx);
+ if (semiColon == -1) {
+ n = str.length() - charsetIdx;
+ } else {
+ n = semiColon - charsetIdx;
+ }
+
+ str.replace(charsetIdx, n, QLatin1String("UTF-8"));
+ }
+ request.setHeader(QNetworkRequest::ContentTypeHeader, str);
+ } else {
+ request.setHeader(QNetworkRequest::ContentTypeHeader,
+ QLatin1String("text/plain;charset=UTF-8"));
+ }
+ }
+
+ if (m_method == QLatin1String("GET"))
+ m_network = networkAccessManager()->get(request);
+ else if (m_method == QLatin1String("HEAD"))
+ m_network = networkAccessManager()->head(request);
+ else if(m_method == QLatin1String("POST"))
+ m_network = networkAccessManager()->post(request, m_data);
+ else if(m_method == QLatin1String("PUT"))
+ m_network = networkAccessManager()->put(request, m_data);
+
+ QObject::connect(m_network, SIGNAL(downloadProgress(qint64,qint64)),
+ this, SLOT(downloadProgress(qint64)));
+ QObject::connect(m_network, SIGNAL(error(QNetworkReply::NetworkError)),
+ this, SLOT(error(QNetworkReply::NetworkError)));
+ QObject::connect(m_network, SIGNAL(finished()),
+ this, SLOT(finished()));
+}
+
+QScriptValue QDeclarativeXMLHttpRequest::send(QScriptValue *me, const QByteArray &data)
+{
+ m_errorFlag = false;
+ m_sendFlag = true;
+ m_redirectCount = 0;
+ m_data = data;
+ m_me = *me;
+
+ requestFromUrl(m_url);
+
+ return QScriptValue();
+}
+
+QScriptValue QDeclarativeXMLHttpRequest::abort(QScriptValue *me)
+{
+ destroyNetwork();
+ m_responseEntityBody = QByteArray();
+ m_errorFlag = true;
+ m_request = QNetworkRequest();
+
+ if (!(m_state == Unsent ||
+ (m_state == Opened && !m_sendFlag) ||
+ m_state == Done)) {
+
+ m_state = Done;
+ m_sendFlag = false;
+ QScriptValue cbv = dispatchCallback(me);
+ if (cbv.isError()) return cbv;
+ }
+
+ m_state = Unsent;
+ return QScriptValue();
+}
+
+void QDeclarativeXMLHttpRequest::downloadProgress(qint64 bytes)
+{
+ Q_UNUSED(bytes)
+ m_status =
+ m_network->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
+ m_statusText =
+ QString::fromUtf8(m_network->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toByteArray());
+
+ // ### We assume if this is called the headers are now available
+ if (m_state < HeadersReceived) {
+ m_state = HeadersReceived;
+ fillHeadersList ();
+ QScriptValue cbv = dispatchCallback(&m_me);
+ if (cbv.isError()) printError(cbv);
+ }
+
+ bool wasEmpty = m_responseEntityBody.isEmpty();
+ m_responseEntityBody.append(m_network->readAll());
+ if (wasEmpty && !m_responseEntityBody.isEmpty()) {
+ m_state = Loading;
+ QScriptValue cbv = dispatchCallback(&m_me);
+ if (cbv.isError()) printError(cbv);
+ }
+}
+
+void QDeclarativeXMLHttpRequest::error(QNetworkReply::NetworkError error)
+{
+ Q_UNUSED(error)
+ m_status =
+ m_network->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
+ m_statusText =
+ QString::fromUtf8(m_network->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toByteArray());
+
+ m_responseEntityBody = QByteArray();
+
+ m_request = QNetworkRequest();
+ m_data.clear();
+ destroyNetwork();
+
+ if (error == QNetworkReply::ContentAccessDenied ||
+ error == QNetworkReply::ContentOperationNotPermittedError ||
+ error == QNetworkReply::ContentNotFoundError ||
+ error == QNetworkReply::AuthenticationRequiredError ||
+ error == QNetworkReply::ContentReSendError) {
+ m_state = Loading;
+ QScriptValue cbv = dispatchCallback(&m_me);
+ if (cbv.isError()) printError(cbv);
+ } else {
+ m_errorFlag = true;
+ }
+
+ m_state = Done;
+ QScriptValue cbv = dispatchCallback(&m_me);
+ if (cbv.isError()) printError(cbv);
+}
+
+#define XMLHTTPREQUEST_MAXIMUM_REDIRECT_RECURSION 15
+void QDeclarativeXMLHttpRequest::finished()
+{
+ m_redirectCount++;
+ if (m_redirectCount < XMLHTTPREQUEST_MAXIMUM_REDIRECT_RECURSION) {
+ QVariant redirect = m_network->attribute(QNetworkRequest::RedirectionTargetAttribute);
+ if (redirect.isValid()) {
+ QUrl url = redirect.toUrl();
+ destroyNetwork();
+ requestFromUrl(url);
+ return;
+ }
+ }
+
+ m_status =
+ m_network->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
+ m_statusText =
+ QString::fromUtf8(m_network->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toByteArray());
+
+ if (m_state < HeadersReceived) {
+ m_state = HeadersReceived;
+ fillHeadersList ();
+ QScriptValue cbv = dispatchCallback(&m_me);
+ if (cbv.isError()) printError(cbv);
+ }
+ m_responseEntityBody.append(m_network->readAll());
+ m_data.clear();
+ destroyNetwork();
+ if (m_state < Loading) {
+ m_state = Loading;
+ QScriptValue cbv = dispatchCallback(&m_me);
+ if (cbv.isError()) printError(cbv);
+ }
+ m_state = Done;
+ QScriptValue cbv = dispatchCallback(&m_me);
+ if (cbv.isError()) printError(cbv);
+
+ m_me = QScriptValue();
+}
+
+
+QString QDeclarativeXMLHttpRequest::responseBody() const
+{
+ QXmlStreamReader reader(m_responseEntityBody);
+ reader.readNext();
+ QTextCodec *codec = QTextCodec::codecForName(reader.documentEncoding().toString().toUtf8());
+ if (codec)
+ return codec->toUnicode(m_responseEntityBody);
+
+ return QString::fromUtf8(m_responseEntityBody);
+}
+
+const QByteArray &QDeclarativeXMLHttpRequest::rawResponseBody() const
+{
+ return m_responseEntityBody;
+}
+
+QScriptValue QDeclarativeXMLHttpRequest::dispatchCallback(QScriptValue *me)
+{
+ QScriptValue v = me->property(QLatin1String("callback"));
+ return v.call();
+}
+
+void QDeclarativeXMLHttpRequest::printError(const QScriptValue& sv)
+{
+ QDeclarativeError error;
+ QDeclarativeExpressionPrivate::exceptionToError(sv.engine(), error);
+ qWarning().nospace() << qPrintable(error.toString());
+}
+
+void QDeclarativeXMLHttpRequest::destroyNetwork()
+{
+ if (m_network) {
+ m_network->disconnect();
+ m_network->deleteLater();
+ m_network = 0;
+ }
+}
+
+// XMLHttpRequest methods
+static QScriptValue qmlxmlhttprequest_open(QScriptContext *context, QScriptEngine *engine)
+{
+ QScriptValue dataObject = context->thisObject().data();
+ QDeclarativeXMLHttpRequest *request = qobject_cast<QDeclarativeXMLHttpRequest *>(dataObject.toQObject());
+ if (!request)
+ THROW_REFERENCE("Not an XMLHttpRequest object");
+
+ if (context->argumentCount() < 2 || context->argumentCount() > 5)
+ THROW_DOM(SYNTAX_ERR, "Incorrect argument count");
+
+ // Argument 0 - Method
+ QString method = context->argument(0).toString().toUpper();
+ if (method != QLatin1String("GET") &&
+ method != QLatin1String("PUT") &&
+ method != QLatin1String("HEAD") &&
+ method != QLatin1String("POST"))
+ THROW_DOM(SYNTAX_ERR, "Unsupported HTTP method type");
+
+
+ // Argument 1 - URL
+ QUrl url = QUrl::fromEncoded(context->argument(1).toString().toUtf8());
+
+ if (url.isRelative()) {
+ url = QDeclarativeScriptEngine::get(engine)->resolvedUrl(context,url);
+ }
+
+ // Argument 2 - async (optional)
+ if (context->argumentCount() > 2 && !context->argument(2).toBoolean())
+ THROW_DOM(NOT_SUPPORTED_ERR, "Synchronous XMLHttpRequest calls are not supported");
+
+
+ // Argument 3/4 - user/pass (optional)
+ QString username, password;
+ if (context->argumentCount() > 3)
+ username = context->argument(3).toString();
+ if (context->argumentCount() > 4)
+ password = context->argument(4).toString();
+
+
+ // Clear the fragment (if any)
+ url.setFragment(QString());
+ // Set username/password
+ if (!username.isNull()) url.setUserName(username);
+ if (!password.isNull()) url.setPassword(password);
+
+ return request->open(&dataObject, method, url);
+}
+
+static QScriptValue qmlxmlhttprequest_setRequestHeader(QScriptContext *context, QScriptEngine *engine)
+{
+ QDeclarativeXMLHttpRequest *request = qobject_cast<QDeclarativeXMLHttpRequest *>(context->thisObject().data().toQObject());
+ if (!request)
+ THROW_REFERENCE("Not an XMLHttpRequest object");
+
+ if (context->argumentCount() != 2)
+ THROW_DOM(SYNTAX_ERR, "Incorrect argument count");
+
+
+ if (request->readyState() != QDeclarativeXMLHttpRequest::Opened ||
+ request->sendFlag())
+ THROW_DOM(INVALID_STATE_ERR, "Invalid state");
+
+
+ QString name = context->argument(0).toString();
+ QString value = context->argument(1).toString();
+
+ // ### Check that name and value are well formed
+
+ QString nameUpper = name.toUpper();
+ if (nameUpper == QLatin1String("ACCEPT-CHARSET") ||
+ nameUpper == QLatin1String("ACCEPT-ENCODING") ||
+ nameUpper == QLatin1String("CONNECTION") ||
+ nameUpper == QLatin1String("CONTENT-LENGTH") ||
+ nameUpper == QLatin1String("COOKIE") ||
+ nameUpper == QLatin1String("COOKIE2") ||
+ nameUpper == QLatin1String("CONTENT-TRANSFER-ENCODING") ||
+ nameUpper == QLatin1String("DATE") ||
+ nameUpper == QLatin1String("EXPECT") ||
+ nameUpper == QLatin1String("HOST") ||
+ nameUpper == QLatin1String("KEEP-ALIVE") ||
+ nameUpper == QLatin1String("REFERER") ||
+ nameUpper == QLatin1String("TE") ||
+ nameUpper == QLatin1String("TRAILER") ||
+ nameUpper == QLatin1String("TRANSFER-ENCODING") ||
+ nameUpper == QLatin1String("UPGRADE") ||
+ nameUpper == QLatin1String("USER-AGENT") ||
+ nameUpper == QLatin1String("VIA") ||
+ nameUpper.startsWith(QLatin1String("PROXY-")) ||
+ nameUpper.startsWith(QLatin1String("SEC-")))
+ return engine->undefinedValue();
+
+ request->addHeader(nameUpper, value);
+
+ return engine->undefinedValue();
+}
+
+static QScriptValue qmlxmlhttprequest_send(QScriptContext *context, QScriptEngine *)
+{
+ QScriptValue dataObject = context->thisObject().data();
+ QDeclarativeXMLHttpRequest *request = qobject_cast<QDeclarativeXMLHttpRequest *>(dataObject.toQObject());
+ if (!request)
+ THROW_REFERENCE("Not an XMLHttpRequest object");
+
+ if (request->readyState() != QDeclarativeXMLHttpRequest::Opened)
+ THROW_DOM(INVALID_STATE_ERR, "Invalid state");
+
+ if (request->sendFlag())
+ THROW_DOM(INVALID_STATE_ERR, "Invalid state");
+
+ QByteArray data;
+ if (context->argumentCount() > 0)
+ data = context->argument(0).toString().toUtf8();
+
+ return request->send(&dataObject, data);
+}
+
+static QScriptValue qmlxmlhttprequest_abort(QScriptContext *context, QScriptEngine *)
+{
+ QScriptValue dataObject = context->thisObject().data();
+ QDeclarativeXMLHttpRequest *request = qobject_cast<QDeclarativeXMLHttpRequest *>(dataObject.toQObject());
+ if (!request)
+ THROW_REFERENCE("Not an XMLHttpRequest object");
+
+ return request->abort(&dataObject);
+}
+
+static QScriptValue qmlxmlhttprequest_getResponseHeader(QScriptContext *context, QScriptEngine *engine)
+{
+ Q_UNUSED(engine)
+ QDeclarativeXMLHttpRequest *request = qobject_cast<QDeclarativeXMLHttpRequest *>(context->thisObject().data().toQObject());
+ if (!request)
+ THROW_REFERENCE("Not an XMLHttpRequest object");
+
+ if (context->argumentCount() != 1)
+ THROW_DOM(SYNTAX_ERR, "Incorrect argument count");
+
+ if (request->readyState() != QDeclarativeXMLHttpRequest::Loading &&
+ request->readyState() != QDeclarativeXMLHttpRequest::Done &&
+ request->readyState() != QDeclarativeXMLHttpRequest::HeadersReceived)
+ THROW_DOM(INVALID_STATE_ERR, "Invalid state");
+
+ QString headerName = context->argument(0).toString();
+
+ return QScriptValue(request->header(headerName));
+}
+
+static QScriptValue qmlxmlhttprequest_getAllResponseHeaders(QScriptContext *context, QScriptEngine *engine)
+{
+ Q_UNUSED(engine)
+ QDeclarativeXMLHttpRequest *request = qobject_cast<QDeclarativeXMLHttpRequest *>(context->thisObject().data().toQObject());
+ if (!request)
+ THROW_REFERENCE("Not an XMLHttpRequest object");
+
+ if (context->argumentCount() != 0)
+ THROW_DOM(SYNTAX_ERR, "Incorrect argument count");
+
+ if (request->readyState() != QDeclarativeXMLHttpRequest::Loading &&
+ request->readyState() != QDeclarativeXMLHttpRequest::Done &&
+ request->readyState() != QDeclarativeXMLHttpRequest::HeadersReceived)
+ THROW_DOM(INVALID_STATE_ERR, "Invalid state");
+
+ return QScriptValue(request->headers());
+}
+
+// XMLHttpRequest properties
+static QScriptValue qmlxmlhttprequest_readyState(QScriptContext *context, QScriptEngine *engine)
+{
+ Q_UNUSED(engine)
+ QDeclarativeXMLHttpRequest *request = qobject_cast<QDeclarativeXMLHttpRequest *>(context->thisObject().data().toQObject());
+ if (!request)
+ THROW_REFERENCE("Not an XMLHttpRequest object");
+
+ return QScriptValue(request->readyState());
+}
+
+static QScriptValue qmlxmlhttprequest_status(QScriptContext *context, QScriptEngine *engine)
+{
+ Q_UNUSED(engine)
+ QDeclarativeXMLHttpRequest *request = qobject_cast<QDeclarativeXMLHttpRequest *>(context->thisObject().data().toQObject());
+ if (!request)
+ THROW_REFERENCE("Not an XMLHttpRequest object");
+
+ if (request->readyState() == QDeclarativeXMLHttpRequest::Unsent ||
+ request->readyState() == QDeclarativeXMLHttpRequest::Opened)
+ THROW_DOM(INVALID_STATE_ERR, "Invalid state");
+
+ if (request->errorFlag())
+ return QScriptValue(0);
+ else
+ return QScriptValue(request->replyStatus());
+}
+
+static QScriptValue qmlxmlhttprequest_statusText(QScriptContext *context, QScriptEngine *engine)
+{
+ Q_UNUSED(engine)
+ QDeclarativeXMLHttpRequest *request = qobject_cast<QDeclarativeXMLHttpRequest *>(context->thisObject().data().toQObject());
+ if (!request)
+ THROW_REFERENCE("Not an XMLHttpRequest object");
+
+ if (request->readyState() == QDeclarativeXMLHttpRequest::Unsent ||
+ request->readyState() == QDeclarativeXMLHttpRequest::Opened)
+ THROW_DOM(INVALID_STATE_ERR, "Invalid state");
+
+ if (request->errorFlag())
+ return QScriptValue(0);
+ else
+ return QScriptValue(request->replyStatusText());
+}
+
+static QScriptValue qmlxmlhttprequest_responseText(QScriptContext *context, QScriptEngine *engine)
+{
+ Q_UNUSED(engine)
+ QDeclarativeXMLHttpRequest *request = qobject_cast<QDeclarativeXMLHttpRequest *>(context->thisObject().data().toQObject());
+ if (!request)
+ THROW_REFERENCE("Not an XMLHttpRequest object");
+
+ if (request->readyState() != QDeclarativeXMLHttpRequest::Loading &&
+ request->readyState() != QDeclarativeXMLHttpRequest::Done)
+ return QScriptValue(QString());
+ else
+ return QScriptValue(request->responseBody());
+}
+
+static QScriptValue qmlxmlhttprequest_responseXML(QScriptContext *context, QScriptEngine *engine)
+{
+ QDeclarativeXMLHttpRequest *request = qobject_cast<QDeclarativeXMLHttpRequest *>(context->thisObject().data().toQObject());
+ if (!request)
+ THROW_REFERENCE("Not an XMLHttpRequest object");
+
+ if (request->readyState() != QDeclarativeXMLHttpRequest::Loading &&
+ request->readyState() != QDeclarativeXMLHttpRequest::Done)
+ return engine->nullValue();
+ else
+ return Document::load(engine, request->rawResponseBody());
+}
+
+static QScriptValue qmlxmlhttprequest_onreadystatechange(QScriptContext *context, QScriptEngine *engine)
+{
+ Q_UNUSED(engine);
+ QScriptValue dataObject = context->thisObject().data();
+ QDeclarativeXMLHttpRequest *request = qobject_cast<QDeclarativeXMLHttpRequest *>(dataObject.toQObject());
+ if (!request)
+ THROW_REFERENCE("Not an XMLHttpRequest object");
+
+ if (context->argumentCount()) {
+ QScriptValue v = context->argument(0);
+ dataObject.setProperty(QLatin1String("callback"), v);
+ return v;
+ } else {
+ return dataObject.property(QLatin1String("callback"));
+ }
+}
+
+// Constructor
+static QScriptValue qmlxmlhttprequest_new(QScriptContext *context, QScriptEngine *engine)
+{
+ if (context->isCalledAsConstructor()) {
+ context->thisObject().setData(engine->newQObject(new QDeclarativeXMLHttpRequest(QDeclarativeScriptEngine::get(engine)->networkAccessManager()), QScriptEngine::ScriptOwnership));
+ }
+ return engine->undefinedValue();
+}
+
+void qt_add_qmlxmlhttprequest(QScriptEngine *engine)
+{
+ QScriptValue prototype = engine->newObject();
+
+ // Methods
+ prototype.setProperty(QLatin1String("open"), engine->newFunction(qmlxmlhttprequest_open, 2));
+ prototype.setProperty(QLatin1String("setRequestHeader"), engine->newFunction(qmlxmlhttprequest_setRequestHeader, 2));
+ prototype.setProperty(QLatin1String("send"), engine->newFunction(qmlxmlhttprequest_send));
+ prototype.setProperty(QLatin1String("abort"), engine->newFunction(qmlxmlhttprequest_abort));
+ prototype.setProperty(QLatin1String("getResponseHeader"), engine->newFunction(qmlxmlhttprequest_getResponseHeader, 1));
+ prototype.setProperty(QLatin1String("getAllResponseHeaders"), engine->newFunction(qmlxmlhttprequest_getAllResponseHeaders));
+
+ // Read-only properties
+ prototype.setProperty(QLatin1String("readyState"), engine->newFunction(qmlxmlhttprequest_readyState), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+ prototype.setProperty(QLatin1String("status"), engine->newFunction(qmlxmlhttprequest_status), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+ prototype.setProperty(QLatin1String("statusText"), engine->newFunction(qmlxmlhttprequest_statusText), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+ prototype.setProperty(QLatin1String("responseText"), engine->newFunction(qmlxmlhttprequest_responseText), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+ prototype.setProperty(QLatin1String("responseXML"), engine->newFunction(qmlxmlhttprequest_responseXML), QScriptValue::ReadOnly | QScriptValue::PropertyGetter);
+ prototype.setProperty(QLatin1String("onreadystatechange"), engine->newFunction(qmlxmlhttprequest_onreadystatechange), QScriptValue::PropertyGetter | QScriptValue::PropertySetter);
+
+ // State values
+ prototype.setProperty(QLatin1String("UNSENT"), 0, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ prototype.setProperty(QLatin1String("OPENED"), 1, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ prototype.setProperty(QLatin1String("HEADERS_RECEIVED"), 2, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ prototype.setProperty(QLatin1String("LOADING"), 3, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ prototype.setProperty(QLatin1String("DONE"), 4, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+
+ // Constructor
+ QScriptValue constructor = engine->newFunction(qmlxmlhttprequest_new, prototype);
+ constructor.setProperty(QLatin1String("UNSENT"), 0, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ constructor.setProperty(QLatin1String("OPENED"), 1, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ constructor.setProperty(QLatin1String("HEADERS_RECEIVED"), 2, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ constructor.setProperty(QLatin1String("LOADING"), 3, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ constructor.setProperty(QLatin1String("DONE"), 4, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ engine->globalObject().setProperty(QLatin1String("XMLHttpRequest"), constructor);
+
+ // DOM Exception
+ QScriptValue domExceptionPrototype = engine->newObject();
+ domExceptionPrototype.setProperty(QLatin1String("INDEX_SIZE_ERR"), INDEX_SIZE_ERR, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ domExceptionPrototype.setProperty(QLatin1String("DOMSTRING_SIZE_ERR"), DOMSTRING_SIZE_ERR, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ domExceptionPrototype.setProperty(QLatin1String("HIERARCHY_REQUEST_ERR"), HIERARCHY_REQUEST_ERR, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ domExceptionPrototype.setProperty(QLatin1String("WRONG_DOCUMENT_ERR"), WRONG_DOCUMENT_ERR, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ domExceptionPrototype.setProperty(QLatin1String("INVALID_CHARACTER_ERR"), INVALID_CHARACTER_ERR, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ domExceptionPrototype.setProperty(QLatin1String("NO_DATA_ALLOWED_ERR"), NO_DATA_ALLOWED_ERR, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ domExceptionPrototype.setProperty(QLatin1String("NO_MODIFICATION_ALLOWED_ERR"), NO_MODIFICATION_ALLOWED_ERR, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ domExceptionPrototype.setProperty(QLatin1String("NOT_FOUND_ERR"), NOT_FOUND_ERR, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ domExceptionPrototype.setProperty(QLatin1String("NOT_SUPPORTED_ERR"), NOT_SUPPORTED_ERR, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ domExceptionPrototype.setProperty(QLatin1String("INUSE_ATTRIBUTE_ERR"), INUSE_ATTRIBUTE_ERR, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ domExceptionPrototype.setProperty(QLatin1String("INVALID_STATE_ERR"), INVALID_STATE_ERR, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ domExceptionPrototype.setProperty(QLatin1String("SYNTAX_ERR"), SYNTAX_ERR, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ domExceptionPrototype.setProperty(QLatin1String("INVALID_MODIFICATION_ERR"), INVALID_MODIFICATION_ERR, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ domExceptionPrototype.setProperty(QLatin1String("NAMESPACE_ERR"), NAMESPACE_ERR, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ domExceptionPrototype.setProperty(QLatin1String("INVALID_ACCESS_ERR"), INVALID_ACCESS_ERR, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ domExceptionPrototype.setProperty(QLatin1String("VALIDATION_ERR"), VALIDATION_ERR, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+ domExceptionPrototype.setProperty(QLatin1String("TYPE_MISMATCH_ERR"), TYPE_MISMATCH_ERR, QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration);
+
+ engine->globalObject().setProperty(QLatin1String("DOMException"), domExceptionPrototype);
+}
+
+QT_END_NAMESPACE
+
+#include <qdeclarativexmlhttprequest.moc>
diff --git a/src/declarative/qml/qdeclarativexmlhttprequest_p.h b/src/declarative/qml/qdeclarativexmlhttprequest_p.h
new file mode 100644
index 0000000000..068cd0fb3e
--- /dev/null
+++ b/src/declarative/qml/qdeclarativexmlhttprequest_p.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEXMLHTTPREQUEST_P_H
+#define QDECLARATIVEXMLHTTPREQUEST_P_H
+
+#include <QtScript/qscriptengine.h>
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
+
+class QScriptEngine;
+void qt_add_qmlxmlhttprequest(QScriptEngine *engine);
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEXMLHTTPREQUEST_P_H
+
diff --git a/src/declarative/qml/qmetaobjectbuilder.cpp b/src/declarative/qml/qmetaobjectbuilder.cpp
new file mode 100644
index 0000000000..a518b0335c
--- /dev/null
+++ b/src/declarative/qml/qmetaobjectbuilder.cpp
@@ -0,0 +1,2575 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qmetaobjectbuilder_p.h"
+
+#ifndef Q_OS_WIN
+#include <stdint.h>
+#endif
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QMetaObjectBuilder
+ \internal
+ \brief The QMetaObjectBuilder class supports building QMetaObject objects at runtime.
+
+*/
+
+/*!
+ \enum QMetaObjectBuilder::AddMember
+ This enum defines which members of QMetaObject should be copied by QMetaObjectBuilder::addMetaObject()
+
+ \value ClassName Add the class name.
+ \value SuperClass Add the super class.
+ \value Methods Add methods that aren't signals or slots.
+ \value Signals Add signals.
+ \value Slots Add slots.
+ \value Constructors Add constructors.
+ \value Properties Add properties.
+ \value Enumerators Add enumerators.
+ \value ClassInfos Add items of class information.
+ \value RelatedMetaObjects Add related meta objects.
+ \value StaticMetacall Add the static metacall function.
+ \value PublicMethods Add public methods (ignored for signals).
+ \value ProtectedMethods Add protected methods (ignored for signals).
+ \value PrivateMethods All private methods (ignored for signals).
+ \value AllMembers Add all members.
+ \value AllPrimaryMembers Add everything except the class name, super class, and static metacall function.
+*/
+
+// copied from moc's generator.cpp
+uint qvariant_nameToType(const char* name)
+{
+ if (!name)
+ return 0;
+
+ if (strcmp(name, "QVariant") == 0)
+ return 0xffffffff;
+ if (strcmp(name, "QCString") == 0)
+ return QMetaType::QByteArray;
+ if (strcmp(name, "Q_LLONG") == 0)
+ return QMetaType::LongLong;
+ if (strcmp(name, "Q_ULLONG") == 0)
+ return QMetaType::ULongLong;
+ if (strcmp(name, "QIconSet") == 0)
+ return QMetaType::QIcon;
+
+ uint tp = QMetaType::type(name);
+ return tp < QMetaType::User ? tp : 0;
+}
+
+/*
+ Returns true if the type is a QVariant types.
+*/
+bool isVariantType(const char* type)
+{
+ return qvariant_nameToType(type) != 0;
+}
+
+// copied from qmetaobject.cpp
+// do not touch without touching the moc as well
+enum PropertyFlags {
+ Invalid = 0x00000000,
+ Readable = 0x00000001,
+ Writable = 0x00000002,
+ Resettable = 0x00000004,
+ EnumOrFlag = 0x00000008,
+ StdCppSet = 0x00000100,
+// Override = 0x00000200,
+ Designable = 0x00001000,
+ ResolveDesignable = 0x00002000,
+ Scriptable = 0x00004000,
+ ResolveScriptable = 0x00008000,
+ Stored = 0x00010000,
+ ResolveStored = 0x00020000,
+ Editable = 0x00040000,
+ ResolveEditable = 0x00080000,
+ User = 0x00100000,
+ ResolveUser = 0x00200000,
+ Notify = 0x00400000,
+ Dynamic = 0x00800000
+};
+
+enum MethodFlags {
+ AccessPrivate = 0x00,
+ AccessProtected = 0x01,
+ AccessPublic = 0x02,
+ AccessMask = 0x03, //mask
+
+ MethodMethod = 0x00,
+ MethodSignal = 0x04,
+ MethodSlot = 0x08,
+ MethodConstructor = 0x0c,
+ MethodTypeMask = 0x0c,
+
+ MethodCompatibility = 0x10,
+ MethodCloned = 0x20,
+ MethodScriptable = 0x40
+};
+
+struct QMetaObjectPrivate
+{
+ int revision;
+ int className;
+ int classInfoCount, classInfoData;
+ int methodCount, methodData;
+ int propertyCount, propertyData;
+ int enumeratorCount, enumeratorData;
+ int constructorCount, constructorData;
+ int flags;
+};
+
+static inline const QMetaObjectPrivate *priv(const uint* data)
+{ return reinterpret_cast<const QMetaObjectPrivate*>(data); }
+// end of copied lines from qmetaobject.cpp
+
+class QMetaMethodBuilderPrivate
+{
+public:
+ QMetaMethodBuilderPrivate
+ (QMetaMethod::MethodType _methodType,
+ const QByteArray& _signature,
+ const QByteArray& _returnType = QByteArray(),
+ QMetaMethod::Access _access = QMetaMethod::Public)
+ : signature(QMetaObject::normalizedSignature(_signature.constData())),
+ returnType(QMetaObject::normalizedType(_returnType)),
+ attributes(((int)_access) | (((int)_methodType) << 2))
+ {
+ }
+
+ QByteArray signature;
+ QByteArray returnType;
+ QList<QByteArray> parameterNames;
+ QByteArray tag;
+ int attributes;
+
+ QMetaMethod::MethodType methodType() const
+ {
+ return (QMetaMethod::MethodType)((attributes & MethodTypeMask) >> 2);
+ }
+
+ QMetaMethod::Access access() const
+ {
+ return (QMetaMethod::Access)(attributes & AccessMask);
+ }
+
+ void setAccess(QMetaMethod::Access value)
+ {
+ attributes = ((attributes & ~AccessMask) | (int)value);
+ }
+};
+
+class QMetaPropertyBuilderPrivate
+{
+public:
+ QMetaPropertyBuilderPrivate
+ (const QByteArray& _name, const QByteArray& _type, int notifierIdx=-1)
+ : name(_name),
+ type(QMetaObject::normalizedType(_type.constData())),
+ flags(Readable | Writable), notifySignal(-1)
+ {
+ if (notifierIdx >= 0) {
+ flags |= Notify;
+ notifySignal = notifierIdx;
+ }
+ }
+
+ QByteArray name;
+ QByteArray type;
+ int flags;
+ int notifySignal;
+
+ bool flag(int f) const
+ {
+ return ((flags & f) != 0);
+ }
+
+ void setFlag(int f, bool value)
+ {
+ if (value)
+ flags |= f;
+ else
+ flags &= ~f;
+ }
+};
+
+class QMetaEnumBuilderPrivate
+{
+public:
+ QMetaEnumBuilderPrivate(const QByteArray& _name)
+ : name(_name), isFlag(false)
+ {
+ }
+
+ QByteArray name;
+ bool isFlag;
+ QList<QByteArray> keys;
+ QList<int> values;
+};
+
+class QMetaObjectBuilderPrivate
+{
+public:
+ QMetaObjectBuilderPrivate()
+ : flags(0)
+ {
+ superClass = &QObject::staticMetaObject;
+ staticMetacallFunction = 0;
+ }
+
+ QByteArray className;
+ const QMetaObject *superClass;
+ QMetaObjectBuilder::StaticMetacallFunction staticMetacallFunction;
+ QList<QMetaMethodBuilderPrivate> methods;
+ QList<QMetaMethodBuilderPrivate> constructors;
+ QList<QMetaPropertyBuilderPrivate> properties;
+ QList<QByteArray> classInfoNames;
+ QList<QByteArray> classInfoValues;
+ QList<QMetaEnumBuilderPrivate> enumerators;
+#ifdef Q_NO_DATA_RELOCATION
+ QList<QMetaObjectAccessor> relatedMetaObjects;
+#else
+ QList<const QMetaObject *> relatedMetaObjects;
+#endif
+ int flags;
+};
+
+/*!
+ Constructs a new QMetaObjectBuilder.
+*/
+QMetaObjectBuilder::QMetaObjectBuilder()
+{
+ d = new QMetaObjectBuilderPrivate();
+}
+
+/*!
+ Constructs a new QMetaObjectBuilder which is a copy of the
+ meta object information in \a prototype. Note: the super class
+ contents for \a prototype are not copied, only the immediate
+ class that is defined by \a prototype.
+
+ The \a members parameter indicates which members of \a prototype
+ should be added. The default is AllMembers.
+
+ \sa addMetaObject()
+*/
+QMetaObjectBuilder::QMetaObjectBuilder
+ (const QMetaObject *prototype, QMetaObjectBuilder::AddMembers members)
+{
+ d = new QMetaObjectBuilderPrivate();
+ addMetaObject(prototype, members);
+}
+
+/*!
+ Destroys this meta object builder.
+*/
+QMetaObjectBuilder::~QMetaObjectBuilder()
+{
+ delete d;
+}
+
+/*!
+ Returns the name of the class being constructed by this
+ meta object builder. The default value is an empty QByteArray.
+
+ \sa setClassName(), superClass()
+*/
+QByteArray QMetaObjectBuilder::className() const
+{
+ return d->className;
+}
+
+/*!
+ Sets the \a name of the class being constructed by this
+ meta object builder.
+
+ \sa className(), setSuperClass()
+*/
+void QMetaObjectBuilder::setClassName(const QByteArray& name)
+{
+ d->className = name;
+}
+
+/*!
+ Returns the superclass meta object of the class being constructed
+ by this meta object builder. The default value is the meta object
+ for QObject.
+
+ \sa setSuperClass(), className()
+*/
+const QMetaObject *QMetaObjectBuilder::superClass() const
+{
+ return d->superClass;
+}
+
+/*!
+ Sets the superclass meta object of the class being constructed
+ by this meta object builder to \a meta. The \a meta parameter
+ must not be null.
+
+ \sa superClass(), setClassName()
+*/
+void QMetaObjectBuilder::setSuperClass(const QMetaObject *meta)
+{
+ Q_ASSERT(meta);
+ d->superClass = meta;
+}
+
+/*!
+ Returns the flags of the class being constructed by this meta object
+ builder.
+
+ \sa setFlags()
+*/
+QMetaObjectBuilder::MetaObjectFlags QMetaObjectBuilder::flags() const
+{
+ return (QMetaObjectBuilder::MetaObjectFlags)d->flags;
+}
+
+/*!
+ Sets the \a flags of the class being constructed by this meta object
+ builder.
+
+ \sa flags()
+*/
+void QMetaObjectBuilder::setFlags(MetaObjectFlags flags)
+{
+ d->flags = flags;
+}
+
+/*!
+ Returns the number of methods in this class, excluding the number
+ of methods in the base class. These include signals and slots
+ as well as normal member functions.
+
+ \sa addMethod(), method(), removeMethod(), indexOfMethod()
+*/
+int QMetaObjectBuilder::methodCount() const
+{
+ return d->methods.size();
+}
+
+/*!
+ Returns the number of constructors in this class.
+
+ \sa addConstructor(), constructor(), removeConstructor(), indexOfConstructor()
+*/
+int QMetaObjectBuilder::constructorCount() const
+{
+ return d->constructors.size();
+}
+
+/*!
+ Returns the number of properties in this class, excluding the number
+ of properties in the base class.
+
+ \sa addProperty(), property(), removeProperty(), indexOfProperty()
+*/
+int QMetaObjectBuilder::propertyCount() const
+{
+ return d->properties.size();
+}
+
+/*!
+ Returns the number of enumerators in this class, excluding the
+ number of enumerators in the base class.
+
+ \sa addEnumerator(), enumerator(), removeEnumerator()
+ \sa indexOfEnumerator()
+*/
+int QMetaObjectBuilder::enumeratorCount() const
+{
+ return d->enumerators.size();
+}
+
+/*!
+ Returns the number of items of class information in this class,
+ exclusing the number of items of class information in the base class.
+
+ \sa addClassInfo(), classInfoName(), classInfoValue(), removeClassInfo()
+ \sa indexOfClassInfo()
+*/
+int QMetaObjectBuilder::classInfoCount() const
+{
+ return d->classInfoNames.size();
+}
+
+/*!
+ Returns the number of related meta objects that are associated
+ with this class.
+
+ Related meta objects are used when resolving the enumerated type
+ associated with a property, where the enumerated type is in a
+ different class from the property.
+
+ \sa addRelatedMetaObject(), relatedMetaObject()
+ \sa removeRelatedMetaObject()
+*/
+int QMetaObjectBuilder::relatedMetaObjectCount() const
+{
+ return d->relatedMetaObjects.size();
+}
+
+/*!
+ Adds a new public method to this class with the specified \a signature.
+ Returns an object that can be used to adjust the other attributes
+ of the method. The \a signature will be normalized before it is
+ added to the class.
+
+ \sa method(), methodCount(), removeMethod(), indexOfMethod()
+*/
+QMetaMethodBuilder QMetaObjectBuilder::addMethod(const QByteArray& signature)
+{
+ int index = d->methods.size();
+ d->methods.append(QMetaMethodBuilderPrivate(QMetaMethod::Method, signature));
+ return QMetaMethodBuilder(this, index);
+}
+
+/*!
+ Adds a new public method to this class with the specified
+ \a signature and \a returnType. Returns an object that can be
+ used to adjust the other attributes of the method. The \a signature
+ and \a returnType will be normalized before they are added to
+ the class. If \a returnType is empty, then it indicates that
+ the method has \c{void} as its return type.
+
+ \sa method(), methodCount(), removeMethod(), indexOfMethod()
+*/
+QMetaMethodBuilder QMetaObjectBuilder::addMethod
+ (const QByteArray& signature, const QByteArray& returnType)
+{
+ int index = d->methods.size();
+ d->methods.append(QMetaMethodBuilderPrivate
+ (QMetaMethod::Method, signature, returnType));
+ return QMetaMethodBuilder(this, index);
+}
+
+/*!
+ Adds a new public method to this class that has the same information as
+ \a prototype. This is used to clone the methods of an existing
+ QMetaObject. Returns an object that can be used to adjust the
+ attributes of the method.
+
+ This function will detect if \a prototype is an ordinary method,
+ signal, slot, or constructor and act accordingly.
+
+ \sa method(), methodCount(), removeMethod(), indexOfMethod()
+*/
+QMetaMethodBuilder QMetaObjectBuilder::addMethod(const QMetaMethod& prototype)
+{
+ QMetaMethodBuilder method;
+ if (prototype.methodType() == QMetaMethod::Method)
+ method = addMethod(prototype.signature());
+ else if (prototype.methodType() == QMetaMethod::Signal)
+ method = addSignal(prototype.signature());
+ else if (prototype.methodType() == QMetaMethod::Slot)
+ method = addSlot(prototype.signature());
+ else if (prototype.methodType() == QMetaMethod::Constructor)
+ method = addConstructor(prototype.signature());
+ method.setReturnType(prototype.typeName());
+ method.setParameterNames(prototype.parameterNames());
+ method.setTag(prototype.tag());
+ method.setAccess(prototype.access());
+ method.setAttributes(prototype.attributes());
+ return method;
+}
+
+/*!
+ Adds a new public slot to this class with the specified \a signature.
+ Returns an object that can be used to adjust the other attributes
+ of the slot. The \a signature will be normalized before it is
+ added to the class.
+
+ \sa addMethod(), addSignal(), indexOfSlot()
+*/
+QMetaMethodBuilder QMetaObjectBuilder::addSlot(const QByteArray& signature)
+{
+ int index = d->methods.size();
+ d->methods.append(QMetaMethodBuilderPrivate(QMetaMethod::Slot, signature));
+ return QMetaMethodBuilder(this, index);
+}
+
+/*!
+ Adds a new signal to this class with the specified \a signature.
+ Returns an object that can be used to adjust the other attributes
+ of the signal. The \a signature will be normalized before it is
+ added to the class.
+
+ \sa addMethod(), addSlot(), indexOfSignal()
+*/
+QMetaMethodBuilder QMetaObjectBuilder::addSignal(const QByteArray& signature)
+{
+ int index = d->methods.size();
+ d->methods.append(QMetaMethodBuilderPrivate
+ (QMetaMethod::Signal, signature, QByteArray(), QMetaMethod::Protected));
+ return QMetaMethodBuilder(this, index);
+}
+
+/*!
+ Adds a new constructor to this class with the specified \a signature.
+ Returns an object that can be used to adjust the other attributes
+ of the constructor. The \a signature will be normalized before it is
+ added to the class.
+
+ \sa constructor(), constructorCount(), removeConstructor()
+ \sa indexOfConstructor()
+*/
+QMetaMethodBuilder QMetaObjectBuilder::addConstructor(const QByteArray& signature)
+{
+ int index = d->constructors.size();
+ d->constructors.append(QMetaMethodBuilderPrivate(QMetaMethod::Constructor, signature));
+ return QMetaMethodBuilder(this, -(index + 1));
+}
+
+/*!
+ Adds a new constructor to this class that has the same information as
+ \a prototype. This is used to clone the constructors of an existing
+ QMetaObject. Returns an object that can be used to adjust the
+ attributes of the constructor.
+
+ This function requires that \a prototype be a constructor.
+
+ \sa constructor(), constructorCount(), removeConstructor()
+ \sa indexOfConstructor()
+*/
+QMetaMethodBuilder QMetaObjectBuilder::addConstructor(const QMetaMethod& prototype)
+{
+ Q_ASSERT(prototype.methodType() == QMetaMethod::Constructor);
+ QMetaMethodBuilder ctor = addConstructor(prototype.signature());
+ ctor.setReturnType(prototype.typeName());
+ ctor.setParameterNames(prototype.parameterNames());
+ ctor.setTag(prototype.tag());
+ ctor.setAccess(prototype.access());
+ ctor.setAttributes(prototype.attributes());
+ return ctor;
+}
+
+/*!
+ Adds a new readable/writable property to this class with the
+ specified \a name and \a type. Returns an object that can be used
+ to adjust the other attributes of the property. The \a type will
+ be normalized before it is added to the class. \a notifierId will
+ be registered as the property's \e notify signal.
+
+ \sa property(), propertyCount(), removeProperty(), indexOfProperty()
+*/
+QMetaPropertyBuilder QMetaObjectBuilder::addProperty
+ (const QByteArray& name, const QByteArray& type, int notifierId)
+{
+ int index = d->properties.size();
+ d->properties.append(QMetaPropertyBuilderPrivate(name, type, notifierId));
+ return QMetaPropertyBuilder(this, index);
+}
+
+/*!
+ Adds a new property to this class that has the same information as
+ \a prototype. This is used to clone the properties of an existing
+ QMetaObject. Returns an object that can be used to adjust the
+ attributes of the property.
+
+ \sa property(), propertyCount(), removeProperty(), indexOfProperty()
+*/
+QMetaPropertyBuilder QMetaObjectBuilder::addProperty(const QMetaProperty& prototype)
+{
+ QMetaPropertyBuilder property = addProperty(prototype.name(), prototype.typeName());
+ property.setReadable(prototype.isReadable());
+ property.setWritable(prototype.isWritable());
+ property.setResettable(prototype.isResettable());
+ property.setDesignable(prototype.isDesignable());
+ property.setScriptable(prototype.isScriptable());
+ property.setStored(prototype.isStored());
+ property.setEditable(prototype.isEditable());
+ property.setUser(prototype.isUser());
+ property.setStdCppSet(prototype.hasStdCppSet());
+ property.setEnumOrFlag(prototype.isEnumType());
+ if (prototype.hasNotifySignal()) {
+ // Find an existing method for the notify signal, or add a new one.
+ QMetaMethod method = prototype.notifySignal();
+ int index = indexOfMethod(method.signature());
+ if (index == -1)
+ index = addMethod(method).index();
+ d->properties[property._index].notifySignal = index;
+ d->properties[property._index].setFlag(Notify, true);
+ }
+ return property;
+}
+
+/*!
+ Adds a new enumerator to this class with the specified
+ \a name. Returns an object that can be used to adjust
+ the other attributes of the enumerator.
+
+ \sa enumerator(), enumeratorCount(), removeEnumerator(),
+ \sa indexOfEnumerator()
+*/
+QMetaEnumBuilder QMetaObjectBuilder::addEnumerator(const QByteArray& name)
+{
+ int index = d->enumerators.size();
+ d->enumerators.append(QMetaEnumBuilderPrivate(name));
+ return QMetaEnumBuilder(this, index);
+}
+
+/*!
+ Adds a new enumerator to this class that has the same information as
+ \a prototype. This is used to clone the enumerators of an existing
+ QMetaObject. Returns an object that can be used to adjust the
+ attributes of the enumerator.
+
+ \sa enumerator(), enumeratorCount(), removeEnumerator(),
+ \sa indexOfEnumerator()
+*/
+QMetaEnumBuilder QMetaObjectBuilder::addEnumerator(const QMetaEnum& prototype)
+{
+ QMetaEnumBuilder en = addEnumerator(prototype.name());
+ en.setIsFlag(prototype.isFlag());
+ int count = prototype.keyCount();
+ for (int index = 0; index < count; ++index)
+ en.addKey(prototype.key(index), prototype.value(index));
+ return en;
+}
+
+/*!
+ Adds \a name and \a value as an item of class information to this class.
+ Returns the index of the new item of class information.
+
+ \sa classInfoCount(), classInfoName(), classInfoValue(), removeClassInfo()
+ \sa indexOfClassInfo()
+*/
+int QMetaObjectBuilder::addClassInfo(const QByteArray& name, const QByteArray& value)
+{
+ int index = d->classInfoNames.size();
+ d->classInfoNames += name;
+ d->classInfoValues += value;
+ return index;
+}
+
+/*!
+ Adds \a meta to this class as a related meta object. Returns
+ the index of the new related meta object entry.
+
+ Related meta objects are used when resolving the enumerated type
+ associated with a property, where the enumerated type is in a
+ different class from the property.
+
+ \sa relatedMetaObjectCount(), relatedMetaObject()
+ \sa removeRelatedMetaObject()
+*/
+#ifdef Q_NO_DATA_RELOCATION
+int QMetaObjectBuilder::addRelatedMetaObject(const QMetaObjectAccessor &meta)
+#else
+int QMetaObjectBuilder::addRelatedMetaObject(const QMetaObject *meta)
+#endif
+{
+ Q_ASSERT(meta);
+ int index = d->relatedMetaObjects.size();
+ d->relatedMetaObjects.append(meta);
+ return index;
+}
+
+/*!
+ Adds the contents of \a prototype to this meta object builder.
+ This function is useful for cloning the contents of an existing QMetaObject.
+
+ The \a members parameter indicates which members of \a prototype
+ should be added. The default is AllMembers.
+*/
+void QMetaObjectBuilder::addMetaObject
+ (const QMetaObject *prototype, QMetaObjectBuilder::AddMembers members)
+{
+ Q_ASSERT(prototype);
+ int index;
+
+ if ((members & ClassName) != 0)
+ d->className = prototype->className();
+
+ if ((members & SuperClass) != 0)
+ d->superClass = prototype->superClass();
+
+ if ((members & (Methods | Signals | Slots)) != 0) {
+ for (index = prototype->methodOffset(); index < prototype->methodCount(); ++index) {
+ QMetaMethod method = prototype->method(index);
+ if (method.methodType() != QMetaMethod::Signal) {
+ if (method.access() == QMetaMethod::Public && (members & PublicMethods) == 0)
+ continue;
+ if (method.access() == QMetaMethod::Private && (members & PrivateMethods) == 0)
+ continue;
+ if (method.access() == QMetaMethod::Protected && (members & ProtectedMethods) == 0)
+ continue;
+ }
+ if (method.methodType() == QMetaMethod::Method && (members & Methods) != 0) {
+ addMethod(method);
+ } else if (method.methodType() == QMetaMethod::Signal &&
+ (members & Signals) != 0) {
+ addMethod(method);
+ } else if (method.methodType() == QMetaMethod::Slot &&
+ (members & Slots) != 0) {
+ addMethod(method);
+ }
+ }
+ }
+
+ if ((members & Constructors) != 0) {
+ for (index = 0; index < prototype->constructorCount(); ++index)
+ addConstructor(prototype->constructor(index));
+ }
+
+ if ((members & Properties) != 0) {
+ for (index = prototype->propertyOffset(); index < prototype->propertyCount(); ++index)
+ addProperty(prototype->property(index));
+ }
+
+ if ((members & Enumerators) != 0) {
+ for (index = prototype->enumeratorOffset(); index < prototype->enumeratorCount(); ++index)
+ addEnumerator(prototype->enumerator(index));
+ }
+
+ if ((members & ClassInfos) != 0) {
+ for (index = prototype->classInfoOffset(); index < prototype->classInfoCount(); ++index) {
+ QMetaClassInfo ci = prototype->classInfo(index);
+ addClassInfo(ci.name(), ci.value());
+ }
+ }
+
+ if ((members & RelatedMetaObjects) != 0) {
+#ifdef Q_NO_DATA_RELOCATION
+ const QMetaObjectAccessor *objects = 0;
+#else
+ const QMetaObject **objects;
+ if (priv(prototype->d.data)->revision < 2) {
+ objects = (const QMetaObject **)(prototype->d.extradata);
+ } else
+#endif
+ {
+ const QMetaObjectExtraData *extra = (const QMetaObjectExtraData *)(prototype->d.extradata);
+ if (extra)
+ objects = extra->objects;
+ else
+ objects = 0;
+ }
+ if (objects) {
+ while (*objects != 0) {
+ addRelatedMetaObject(*objects);
+ ++objects;
+ }
+ }
+ }
+
+ if ((members & StaticMetacall) != 0) {
+ if (priv(prototype->d.data)->revision >= 2) {
+ const QMetaObjectExtraData *extra =
+ (const QMetaObjectExtraData *)(prototype->d.extradata);
+ if (extra && extra->static_metacall)
+ setStaticMetacallFunction(extra->static_metacall);
+ }
+ }
+}
+
+/*!
+ Returns the method at \a index in this class.
+
+ \sa methodCount(), addMethod(), removeMethod(), indexOfMethod()
+*/
+QMetaMethodBuilder QMetaObjectBuilder::method(int index) const
+{
+ if (index >= 0 && index < d->methods.size())
+ return QMetaMethodBuilder(this, index);
+ else
+ return QMetaMethodBuilder();
+}
+
+/*!
+ Returns the constructor at \a index in this class.
+
+ \sa methodCount(), addMethod(), removeMethod(), indexOfConstructor()
+*/
+QMetaMethodBuilder QMetaObjectBuilder::constructor(int index) const
+{
+ if (index >= 0 && index < d->constructors.size())
+ return QMetaMethodBuilder(this, -(index + 1));
+ else
+ return QMetaMethodBuilder();
+}
+
+/*!
+ Returns the property at \a index in this class.
+
+ \sa methodCount(), addMethod(), removeMethod(), indexOfProperty()
+*/
+QMetaPropertyBuilder QMetaObjectBuilder::property(int index) const
+{
+ if (index >= 0 && index < d->properties.size())
+ return QMetaPropertyBuilder(this, index);
+ else
+ return QMetaPropertyBuilder();
+}
+
+/*!
+ Returns the enumerator at \a index in this class.
+
+ \sa enumeratorCount(), addEnumerator(), removeEnumerator()
+ \sa indexOfEnumerator()
+*/
+QMetaEnumBuilder QMetaObjectBuilder::enumerator(int index) const
+{
+ if (index >= 0 && index < d->enumerators.size())
+ return QMetaEnumBuilder(this, index);
+ else
+ return QMetaEnumBuilder();
+}
+
+/*!
+ Returns the related meta object at \a index in this class.
+
+ Related meta objects are used when resolving the enumerated type
+ associated with a property, where the enumerated type is in a
+ different class from the property.
+
+ \sa relatedMetaObjectCount(), addRelatedMetaObject()
+ \sa removeRelatedMetaObject()
+*/
+const QMetaObject *QMetaObjectBuilder::relatedMetaObject(int index) const
+{
+ if (index >= 0 && index < d->relatedMetaObjects.size())
+#ifdef Q_NO_DATA_RELOCATION
+ return &((*(d->relatedMetaObjects[index]))());
+#else
+ return d->relatedMetaObjects[index];
+#endif
+ else
+ return 0;
+}
+
+/*!
+ Returns the name of the item of class information at \a index
+ in this class.
+
+ \sa classInfoCount(), addClassInfo(), classInfoValue(), removeClassInfo()
+ \sa indexOfClassInfo()
+*/
+QByteArray QMetaObjectBuilder::classInfoName(int index) const
+{
+ if (index >= 0 && index < d->classInfoNames.size())
+ return d->classInfoNames[index];
+ else
+ return QByteArray();
+}
+
+/*!
+ Returns the value of the item of class information at \a index
+ in this class.
+
+ \sa classInfoCount(), addClassInfo(), classInfoName(), removeClassInfo()
+ \sa indexOfClassInfo()
+*/
+QByteArray QMetaObjectBuilder::classInfoValue(int index) const
+{
+ if (index >= 0 && index < d->classInfoValues.size())
+ return d->classInfoValues[index];
+ else
+ return QByteArray();
+}
+
+/*!
+ Removes the method at \a index from this class. The indices of
+ all following methods will be adjusted downwards by 1. If the
+ method is registered as a notify signal on a property, then the
+ notify signal will be removed from the property.
+
+ \sa methodCount(), addMethod(), method(), indexOfMethod()
+*/
+void QMetaObjectBuilder::removeMethod(int index)
+{
+ if (index >= 0 && index < d->methods.size()) {
+ d->methods.removeAt(index);
+ for (int prop = 0; prop < d->properties.size(); ++prop) {
+ // Adjust the indices of property notify signal references.
+ if (d->properties[prop].notifySignal == index) {
+ d->properties[prop].notifySignal = -1;
+ d->properties[prop].setFlag(Notify, false);
+ } else if (d->properties[prop].notifySignal > index)
+ (d->properties[prop].notifySignal)--;
+ }
+ }
+}
+
+/*!
+ Removes the constructor at \a index from this class. The indices of
+ all following constructors will be adjusted downwards by 1.
+
+ \sa constructorCount(), addConstructor(), constructor()
+ \sa indexOfConstructor()
+*/
+void QMetaObjectBuilder::removeConstructor(int index)
+{
+ if (index >= 0 && index < d->constructors.size())
+ d->constructors.removeAt(index);
+}
+
+/*!
+ Removes the property at \a index from this class. The indices of
+ all following properties will be adjusted downwards by 1.
+
+ \sa propertyCount(), addProperty(), property(), indexOfProperty()
+*/
+void QMetaObjectBuilder::removeProperty(int index)
+{
+ if (index >= 0 && index < d->properties.size())
+ d->properties.removeAt(index);
+}
+
+/*!
+ Removes the enumerator at \a index from this class. The indices of
+ all following enumerators will be adjusted downwards by 1.
+
+ \sa enumertorCount(), addEnumerator(), enumerator()
+ \sa indexOfEnumerator()
+*/
+void QMetaObjectBuilder::removeEnumerator(int index)
+{
+ if (index >= 0 && index < d->enumerators.size())
+ d->enumerators.removeAt(index);
+}
+
+/*!
+ Removes the item of class information at \a index from this class.
+ The indices of all following items will be adjusted downwards by 1.
+
+ \sa classInfoCount(), addClassInfo(), classInfoName(), classInfoValue()
+ \sa indexOfClassInfo()
+*/
+void QMetaObjectBuilder::removeClassInfo(int index)
+{
+ if (index >= 0 && index < d->classInfoNames.size()) {
+ d->classInfoNames.removeAt(index);
+ d->classInfoValues.removeAt(index);
+ }
+}
+
+/*!
+ Removes the related meta object at \a index from this class.
+ The indices of all following related meta objects will be adjusted
+ downwards by 1.
+
+ Related meta objects are used when resolving the enumerated type
+ associated with a property, where the enumerated type is in a
+ different class from the property.
+
+ \sa relatedMetaObjectCount(), addRelatedMetaObject()
+ \sa relatedMetaObject()
+*/
+void QMetaObjectBuilder::removeRelatedMetaObject(int index)
+{
+ if (index >= 0 && index < d->relatedMetaObjects.size())
+ d->relatedMetaObjects.removeAt(index);
+}
+
+/*!
+ Finds a method with the specified \a signature and returns its index;
+ otherwise returns -1. The \a signature will be normalized by this method.
+
+ \sa method(), methodCount(), addMethod(), removeMethod()
+*/
+int QMetaObjectBuilder::indexOfMethod(const QByteArray& signature)
+{
+ QByteArray sig = QMetaObject::normalizedSignature(signature);
+ for (int index = 0; index < d->methods.size(); ++index) {
+ if (sig == d->methods[index].signature)
+ return index;
+ }
+ return -1;
+}
+
+/*!
+ Finds a signal with the specified \a signature and returns its index;
+ otherwise returns -1. The \a signature will be normalized by this method.
+
+ \sa indexOfMethod(), indexOfSlot()
+*/
+int QMetaObjectBuilder::indexOfSignal(const QByteArray& signature)
+{
+ QByteArray sig = QMetaObject::normalizedSignature(signature);
+ for (int index = 0; index < d->methods.size(); ++index) {
+ if (sig == d->methods[index].signature &&
+ d->methods[index].methodType() == QMetaMethod::Signal)
+ return index;
+ }
+ return -1;
+}
+
+/*!
+ Finds a slot with the specified \a signature and returns its index;
+ otherwise returns -1. The \a signature will be normalized by this method.
+
+ \sa indexOfMethod(), indexOfSignal()
+*/
+int QMetaObjectBuilder::indexOfSlot(const QByteArray& signature)
+{
+ QByteArray sig = QMetaObject::normalizedSignature(signature);
+ for (int index = 0; index < d->methods.size(); ++index) {
+ if (sig == d->methods[index].signature &&
+ d->methods[index].methodType() == QMetaMethod::Slot)
+ return index;
+ }
+ return -1;
+}
+
+/*!
+ Finds a constructor with the specified \a signature and returns its index;
+ otherwise returns -1. The \a signature will be normalized by this method.
+
+ \sa constructor(), constructorCount(), addConstructor(), removeConstructor()
+*/
+int QMetaObjectBuilder::indexOfConstructor(const QByteArray& signature)
+{
+ QByteArray sig = QMetaObject::normalizedSignature(signature);
+ for (int index = 0; index < d->constructors.size(); ++index) {
+ if (sig == d->constructors[index].signature)
+ return index;
+ }
+ return -1;
+}
+
+/*!
+ Finds a property with the specified \a name and returns its index;
+ otherwise returns -1.
+
+ \sa property(), propertyCount(), addProperty(), removeProperty()
+*/
+int QMetaObjectBuilder::indexOfProperty(const QByteArray& name)
+{
+ for (int index = 0; index < d->properties.size(); ++index) {
+ if (name == d->properties[index].name)
+ return index;
+ }
+ return -1;
+}
+
+/*!
+ Finds an enumerator with the specified \a name and returns its index;
+ otherwise returns -1.
+
+ \sa enumertor(), enumeratorCount(), addEnumerator(), removeEnumerator()
+*/
+int QMetaObjectBuilder::indexOfEnumerator(const QByteArray& name)
+{
+ for (int index = 0; index < d->enumerators.size(); ++index) {
+ if (name == d->enumerators[index].name)
+ return index;
+ }
+ return -1;
+}
+
+/*!
+ Finds an item of class information with the specified \a name and
+ returns its index; otherwise returns -1.
+
+ \sa classInfoName(), classInfoValue(), classInfoCount(), addClassInfo()
+ \sa removeClassInfo()
+*/
+int QMetaObjectBuilder::indexOfClassInfo(const QByteArray& name)
+{
+ for (int index = 0; index < d->classInfoNames.size(); ++index) {
+ if (name == d->classInfoNames[index])
+ return index;
+ }
+ return -1;
+}
+
+// Align on a specific type boundary.
+#define ALIGN(size,type) \
+ (size) = ((size) + sizeof(type) - 1) & ~(sizeof(type) - 1)
+
+// Build a string into a QMetaObject representation. Returns the
+// position in the string table where the string was placed.
+static int buildString
+ (char *buf, char *str, int *offset, const QByteArray& value, int empty)
+{
+ if (value.size() == 0 && empty >= 0)
+ return empty;
+ if (buf) {
+ memcpy(str + *offset, value.constData(), value.size());
+ str[*offset + value.size()] = '\0';
+ }
+ int posn = *offset;
+ *offset += value.size() + 1;
+ return posn;
+}
+
+// Build the parameter array string for a method.
+static QByteArray buildParameterNames
+ (const QByteArray& signature, const QList<QByteArray>& parameterNames)
+{
+ // If the parameter name list is specified, then concatenate them.
+ if (!parameterNames.isEmpty()) {
+ QByteArray names;
+ bool first = true;
+ foreach (QByteArray name, parameterNames) {
+ if (first)
+ first = false;
+ else
+ names += (char)',';
+ names += name;
+ }
+ return names;
+ }
+
+ // Count commas in the signature, excluding those inside template arguments.
+ int index = signature.indexOf('(');
+ if (index < 0)
+ return QByteArray();
+ ++index;
+ if (index >= signature.size())
+ return QByteArray();
+ if (signature[index] == ')')
+ return QByteArray();
+ int count = 1;
+ int brackets = 0;
+ while (index < signature.size() && signature[index] != ',') {
+ char ch = signature[index++];
+ if (ch == '<')
+ ++brackets;
+ else if (ch == '>')
+ --brackets;
+ else if (ch == ',' && brackets <= 0)
+ ++count;
+ }
+ return QByteArray(count - 1, ',');
+}
+
+// Build a QMetaObject in "buf" based on the information in "d".
+// If "buf" is null, then return the number of bytes needed to
+// build the QMetaObject. Returns -1 if the metaobject if
+// relocatable is set, but the metaobject contains extradata.
+static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf,
+ bool relocatable)
+{
+ int size = 0;
+ int dataIndex;
+ int enumIndex;
+ int index;
+ bool hasNotifySignals = false;
+
+ if (relocatable &&
+ (d->relatedMetaObjects.size() > 0 || d->staticMetacallFunction))
+ return -1;
+
+ // Create the main QMetaObject structure at the start of the buffer.
+ QMetaObject *meta = reinterpret_cast<QMetaObject *>(buf);
+ size += sizeof(QMetaObject);
+ ALIGN(size, int);
+ if (buf) {
+ if (!relocatable) meta->d.superdata = d->superClass;
+ meta->d.extradata = 0;
+ }
+
+ // Populate the QMetaObjectPrivate structure.
+ QMetaObjectPrivate *pmeta
+ = reinterpret_cast<QMetaObjectPrivate *>(buf + size);
+ int pmetaSize = size;
+ dataIndex = 13; // Number of fields in the QMetaObjectPrivate.
+ for (index = 0; index < d->properties.size(); ++index) {
+ if (d->properties[index].notifySignal != -1) {
+ hasNotifySignals = true;
+ break;
+ }
+ }
+ if (buf) {
+ pmeta->revision = 3;
+ pmeta->flags = d->flags;
+ pmeta->className = 0; // Class name is always the first string.
+
+ pmeta->classInfoCount = d->classInfoNames.size();
+ pmeta->classInfoData = dataIndex;
+ dataIndex += 2 * d->classInfoNames.size();
+
+ pmeta->methodCount = d->methods.size();
+ pmeta->methodData = dataIndex;
+ dataIndex += 5 * d->methods.size();
+
+ pmeta->propertyCount = d->properties.size();
+ pmeta->propertyData = dataIndex;
+ dataIndex += 3 * d->properties.size();
+ if (hasNotifySignals)
+ dataIndex += d->properties.size();
+
+ pmeta->enumeratorCount = d->enumerators.size();
+ pmeta->enumeratorData = dataIndex;
+ dataIndex += 4 * d->enumerators.size();
+
+ pmeta->constructorCount = d->constructors.size();
+ pmeta->constructorData = dataIndex;
+ dataIndex += 5 * d->constructors.size();
+ } else {
+ dataIndex += 2 * d->classInfoNames.size();
+ dataIndex += 5 * d->methods.size();
+ dataIndex += 3 * d->properties.size();
+ if (hasNotifySignals)
+ dataIndex += d->properties.size();
+ dataIndex += 4 * d->enumerators.size();
+ dataIndex += 5 * d->constructors.size();
+ }
+
+ // Allocate space for the enumerator key names and values.
+ enumIndex = dataIndex;
+ for (index = 0; index < d->enumerators.size(); ++index) {
+ QMetaEnumBuilderPrivate *enumerator = &(d->enumerators[index]);
+ dataIndex += 2 * enumerator->keys.size();
+ }
+
+ // Zero terminator at the end of the data offset table.
+ ++dataIndex;
+
+ // Find the start of the data and string tables.
+ int *data = reinterpret_cast<int *>(pmeta);
+ size += dataIndex * sizeof(int);
+ char *str = reinterpret_cast<char *>(buf + size);
+ if (buf) {
+ if (relocatable) {
+ meta->d.stringdata = reinterpret_cast<const char *>((intptr_t)size);
+ meta->d.data = reinterpret_cast<uint *>((intptr_t)pmetaSize);
+ } else {
+ meta->d.stringdata = str;
+ meta->d.data = reinterpret_cast<uint *>(data);
+ }
+ }
+
+ // Reset the current data position to just past the QMetaObjectPrivate.
+ dataIndex = 13;
+
+ // Add the class name to the string table.
+ int offset = 0;
+ buildString(buf, str, &offset, d->className, -1);
+
+ // Add a common empty string, which is used to indicate "void"
+ // method returns, empty tag strings, etc.
+ int empty = buildString(buf, str, &offset, QByteArray(), -1);
+
+ // Output the class infos,
+ for (index = 0; index < d->classInfoNames.size(); ++index) {
+ int name = buildString(buf, str, &offset, d->classInfoNames[index], empty);
+ int value = buildString(buf, str, &offset, d->classInfoValues[index], empty);
+ if (buf) {
+ data[dataIndex] = name;
+ data[dataIndex + 1] = value;
+ }
+ dataIndex += 2;
+ }
+
+ // Output the methods in the class.
+ for (index = 0; index < d->methods.size(); ++index) {
+ QMetaMethodBuilderPrivate *method = &(d->methods[index]);
+ int sig = buildString(buf, str, &offset, method->signature, empty);
+ int params;
+ QByteArray names = buildParameterNames
+ (method->signature, method->parameterNames);
+ params = buildString(buf, str, &offset, names, empty);
+ int ret = buildString(buf, str, &offset, method->returnType, empty);
+ int tag = buildString(buf, str, &offset, method->tag, empty);
+ int attrs = method->attributes;
+ if (buf) {
+ data[dataIndex] = sig;
+ data[dataIndex + 1] = params;
+ data[dataIndex + 2] = ret;
+ data[dataIndex + 3] = tag;
+ data[dataIndex + 4] = attrs;
+ }
+ dataIndex += 5;
+ }
+
+ // Output the properties in the class.
+ for (index = 0; index < d->properties.size(); ++index) {
+ QMetaPropertyBuilderPrivate *prop = &(d->properties[index]);
+ int name = buildString(buf, str, &offset, prop->name, empty);
+ int type = buildString(buf, str, &offset, prop->type, empty);
+ int flags = prop->flags;
+
+ if (!isVariantType(prop->type)) {
+ flags |= EnumOrFlag;
+ } else {
+ flags |= qvariant_nameToType(prop->type) << 24;
+ }
+
+ if (buf) {
+ data[dataIndex] = name;
+ data[dataIndex + 1] = type;
+ data[dataIndex + 2] = flags;
+ }
+ dataIndex += 3;
+ }
+ if (hasNotifySignals) {
+ for (index = 0; index < d->properties.size(); ++index) {
+ QMetaPropertyBuilderPrivate *prop = &(d->properties[index]);
+ if (buf) {
+ if (prop->notifySignal != -1)
+ data[dataIndex] = prop->notifySignal;
+ else
+ data[dataIndex] = 0;
+ }
+ ++dataIndex;
+ }
+ }
+
+ // Output the enumerators in the class.
+ for (index = 0; index < d->enumerators.size(); ++index) {
+ QMetaEnumBuilderPrivate *enumerator = &(d->enumerators[index]);
+ int name = buildString(buf, str, &offset, enumerator->name, empty);
+ int isFlag = (int)(enumerator->isFlag);
+ int count = enumerator->keys.size();
+ int enumOffset = enumIndex;
+ if (buf) {
+ data[dataIndex] = name;
+ data[dataIndex + 1] = isFlag;
+ data[dataIndex + 2] = count;
+ data[dataIndex + 3] = enumOffset;
+ }
+ for (int key = 0; key < count; ++key) {
+ int keyIndex = buildString(buf, str, &offset, enumerator->keys[key], empty);
+ if (buf) {
+ data[enumOffset++] = keyIndex;
+ data[enumOffset++] = enumerator->values[key];
+ }
+ }
+ dataIndex += 4;
+ enumIndex += 2 * count;
+ }
+
+ // Output the constructors in the class.
+ for (index = 0; index < d->constructors.size(); ++index) {
+ QMetaMethodBuilderPrivate *method = &(d->constructors[index]);
+ int sig = buildString(buf, str, &offset, method->signature, empty);
+ int params;
+ QByteArray names = buildParameterNames
+ (method->signature, method->parameterNames);
+ params = buildString(buf, str, &offset, names, empty);
+ int ret = buildString(buf, str, &offset, method->returnType, empty);
+ int tag = buildString(buf, str, &offset, method->tag, empty);
+ int attrs = method->attributes;
+ if (buf) {
+ data[dataIndex] = sig;
+ data[dataIndex + 1] = params;
+ data[dataIndex + 2] = ret;
+ data[dataIndex + 3] = tag;
+ data[dataIndex + 4] = attrs;
+ }
+ dataIndex += 5;
+ }
+
+ // One more empty string to act as a terminator.
+ buildString(buf, str, &offset, QByteArray(), -1);
+ size += offset;
+
+ // Output the zero terminator in the data array.
+ if (buf)
+ data[enumIndex] = 0;
+
+ // Create the extradata block if we need one.
+ if (d->relatedMetaObjects.size() > 0 || d->staticMetacallFunction) {
+ ALIGN(size, QMetaObject **);
+ ALIGN(size, QMetaObjectBuilder::StaticMetacallFunction);
+ QMetaObjectExtraData *extra =
+ reinterpret_cast<QMetaObjectExtraData *>(buf + size);
+ size += sizeof(QMetaObjectExtraData);
+ ALIGN(size, QMetaObject *);
+#ifdef Q_NO_DATA_RELOCATION
+ QMetaObjectAccessor *objects =
+ reinterpret_cast<QMetaObjectAccessor *>(buf + size);
+#else
+ const QMetaObject **objects =
+ reinterpret_cast<const QMetaObject **>(buf + size);
+#endif
+ if (buf) {
+ if (d->relatedMetaObjects.size() > 0) {
+ extra->objects = objects;
+ for (index = 0; index < d->relatedMetaObjects.size(); ++index)
+ objects[index] = d->relatedMetaObjects[index];
+ objects[index] = 0;
+ } else {
+ extra->objects = 0;
+ }
+ extra->static_metacall = d->staticMetacallFunction;
+ meta->d.extradata = reinterpret_cast<void *>(extra);
+ }
+ if (d->relatedMetaObjects.size() > 0)
+ size += sizeof(QMetaObject *) * (d->relatedMetaObjects.size() + 1);
+ }
+
+ // Align the final size and return it.
+ ALIGN(size, void *);
+ return size;
+}
+
+/*!
+ Converts this meta object builder into a concrete QMetaObject.
+ The return value should be deallocated using qFree() once it
+ is no longer needed.
+
+ The returned meta object is a snapshot of the state of the
+ QMetaObjectBuilder. Any further modifications to the QMetaObjectBuilder
+ will not be reflected in previous meta objects returned by
+ this method.
+*/
+QMetaObject *QMetaObjectBuilder::toMetaObject() const
+{
+ int size = buildMetaObject(d, 0, false);
+ char *buf = reinterpret_cast<char *>(qMalloc(size));
+ buildMetaObject(d, buf, false);
+ return reinterpret_cast<QMetaObject *>(buf);
+}
+
+/*
+ \internal
+
+ Converts this meta object builder into relocatable data. This data can
+ be stored, copied and later passed to fromRelocatableData() to create a
+ concrete QMetaObject.
+
+ The data is specific to the architecture on which it was created, but is not
+ specific to the process that created it. Not all meta object builder's can
+ be converted to data in this way. If \a ok is provided, it will be set to
+ true if the conversion succeeds, and false otherwise. If a
+ staticMetacallFunction() or any relatedMetaObject()'s are specified the
+ conversion to relocatable data will fail.
+*/
+QByteArray QMetaObjectBuilder::toRelocatableData(bool *ok) const
+{
+ int size = buildMetaObject(d, 0, true);
+ if (size == -1) {
+ if (ok) *ok = false;
+ return QByteArray();
+ }
+
+ QByteArray data;
+ data.resize(size);
+ char *buf = data.data();
+ buildMetaObject(d, buf, true);
+ if (ok) *ok = true;
+ return data;
+}
+
+/*
+ \internal
+
+ Sets the \a data returned from toRelocatableData() onto a concrete
+ QMetaObject instance, \a output. As the meta object's super class is not
+ saved in the relocatable data, it must be passed as \a superClass.
+*/
+void QMetaObjectBuilder::fromRelocatableData(QMetaObject *output,
+ const QMetaObject *superclass,
+ const QByteArray &data)
+{
+ if (!output)
+ return;
+
+ const char *buf = data.constData();
+ const QMetaObject *dataMo = reinterpret_cast<const QMetaObject *>(buf);
+
+ intptr_t stringdataOffset = (intptr_t)dataMo->d.stringdata;
+ intptr_t dataOffset = (intptr_t)dataMo->d.data;
+
+ output->d.superdata = superclass;
+ output->d.stringdata = buf + stringdataOffset;
+ output->d.data = reinterpret_cast<const uint *>(buf + dataOffset);
+}
+
+/*!
+ \typedef QMetaObjectBuilder::StaticMetacallFunction
+
+ Typedef for static metacall functions. The three parameters are
+ the call type value, the constructor index, and the
+ array of parameters.
+*/
+
+/*!
+ Returns the static metacall function to use to construct objects
+ of this class. The default value is null.
+
+ \sa setStaticMetacallFunction()
+*/
+QMetaObjectBuilder::StaticMetacallFunction QMetaObjectBuilder::staticMetacallFunction() const
+{
+ return d->staticMetacallFunction;
+}
+
+/*!
+ Sets the static metacall function to use to construct objects
+ of this class to \a value. The default value is null.
+
+ \sa staticMetacallFunction()
+*/
+void QMetaObjectBuilder::setStaticMetacallFunction
+ (QMetaObjectBuilder::StaticMetacallFunction value)
+{
+ d->staticMetacallFunction = value;
+}
+
+#ifndef QT_NO_DATASTREAM
+
+/*!
+ Serializes the contents of the meta object builder onto \a stream.
+
+ \sa deserialize()
+*/
+void QMetaObjectBuilder::serialize(QDataStream& stream) const
+{
+ int index;
+
+ // Write the class and super class names.
+ stream << d->className;
+ if (d->superClass)
+ stream << QByteArray(d->superClass->className());
+ else
+ stream << QByteArray();
+
+ // Write the counts for each type of class member.
+ stream << d->classInfoNames.size();
+ stream << d->methods.size();
+ stream << d->properties.size();
+ stream << d->enumerators.size();
+ stream << d->constructors.size();
+ stream << d->relatedMetaObjects.size();
+
+ // Write the items of class information.
+ for (index = 0; index < d->classInfoNames.size(); ++index) {
+ stream << d->classInfoNames[index];
+ stream << d->classInfoValues[index];
+ }
+
+ // Write the methods.
+ for (index = 0; index < d->methods.size(); ++index) {
+ const QMetaMethodBuilderPrivate *method = &(d->methods[index]);
+ stream << method->signature;
+ stream << method->returnType;
+ stream << method->parameterNames;
+ stream << method->tag;
+ stream << method->attributes;
+ }
+
+ // Write the properties.
+ for (index = 0; index < d->properties.size(); ++index) {
+ const QMetaPropertyBuilderPrivate *property = &(d->properties[index]);
+ stream << property->name;
+ stream << property->type;
+ stream << property->flags;
+ stream << property->notifySignal;
+ }
+
+ // Write the enumerators.
+ for (index = 0; index < d->enumerators.size(); ++index) {
+ const QMetaEnumBuilderPrivate *enumerator = &(d->enumerators[index]);
+ stream << enumerator->name;
+ stream << enumerator->isFlag;
+ stream << enumerator->keys;
+ stream << enumerator->values;
+ }
+
+ // Write the constructors.
+ for (index = 0; index < d->constructors.size(); ++index) {
+ const QMetaMethodBuilderPrivate *method = &(d->constructors[index]);
+ stream << method->signature;
+ stream << method->returnType;
+ stream << method->parameterNames;
+ stream << method->tag;
+ stream << method->attributes;
+ }
+
+ // Write the related meta objects.
+#ifdef Q_NO_DATA_RELOCATION
+ //### What do we do here?
+#else
+ for (index = 0; index < d->relatedMetaObjects.size(); ++index) {
+ const QMetaObject *meta = d->relatedMetaObjects[index];
+ stream << QByteArray(meta->className());
+ }
+#endif
+
+ // Add an extra empty QByteArray for additional data in future versions.
+ // This should help maintain backwards compatibility, allowing older
+ // versions to read newer data.
+ stream << QByteArray();
+}
+
+// Resolve a class name using the name reference map.
+static const QMetaObject *resolveClassName
+ (const QMap<QByteArray, const QMetaObject *>& references,
+ const QByteArray& name)
+{
+ if (name == QByteArray("QObject"))
+ return &QObject::staticMetaObject;
+ else
+ return references.value(name, 0);
+}
+
+/*!
+ Deserializes a meta object builder from \a stream into
+ this meta object builder.
+
+ The \a references parameter specifies a mapping from class names
+ to QMetaObject instances for resolving the super class name and
+ related meta objects in the object that is deserialized.
+ The meta object for QObject is implicitly added to \a references
+ and does not need to be supplied.
+
+ The QDataStream::status() value on \a stream will be set to
+ QDataStream::ReadCorruptData if the input data is corrupt.
+ The status will be set to QDataStream::ReadPastEnd if the
+ input was exhausted before the full meta object was read.
+
+ \sa serialize()
+*/
+void QMetaObjectBuilder::deserialize
+ (QDataStream& stream,
+ const QMap<QByteArray, const QMetaObject *>& references)
+{
+ QByteArray name;
+ const QMetaObject *cl;
+ int index;
+
+ // Clear all members in the builder to their default states.
+ d->className.clear();
+ d->superClass = &QObject::staticMetaObject;
+ d->classInfoNames.clear();
+ d->classInfoValues.clear();
+ d->methods.clear();
+ d->properties.clear();
+ d->enumerators.clear();
+ d->constructors.clear();
+ d->relatedMetaObjects.clear();
+ d->staticMetacallFunction = 0;
+
+ // Read the class and super class names.
+ stream >> d->className;
+ stream >> name;
+ if (name.isEmpty()) {
+ d->superClass = 0;
+ } else if ((cl = resolveClassName(references, name)) != 0) {
+ d->superClass = cl;
+ } else {
+ stream.setStatus(QDataStream::ReadCorruptData);
+ return;
+ }
+
+ // Read the counts for each type of class member.
+ int classInfoCount, methodCount, propertyCount;
+ int enumeratorCount, constructorCount, relatedMetaObjectCount;
+ stream >> classInfoCount;
+ stream >> methodCount;
+ stream >> propertyCount;
+ stream >> enumeratorCount;
+ stream >> constructorCount;
+ stream >> relatedMetaObjectCount;
+ if (classInfoCount < 0 || methodCount < 0 ||
+ propertyCount < 0 || enumeratorCount < 0 ||
+ constructorCount < 0 || relatedMetaObjectCount < 0) {
+ stream.setStatus(QDataStream::ReadCorruptData);
+ return;
+ }
+
+ // Read the items of class information.
+ for (index = 0; index < classInfoCount; ++index) {
+ if (stream.status() != QDataStream::Ok)
+ return;
+ QByteArray value;
+ stream >> name;
+ stream >> value;
+ addClassInfo(name, value);
+ }
+
+ // Read the member methods.
+ for (index = 0; index < methodCount; ++index) {
+ if (stream.status() != QDataStream::Ok)
+ return;
+ stream >> name;
+ addMethod(name);
+ QMetaMethodBuilderPrivate *method = &(d->methods[index]);
+ stream >> method->returnType;
+ stream >> method->parameterNames;
+ stream >> method->tag;
+ stream >> method->attributes;
+ if (method->methodType() == QMetaMethod::Constructor) {
+ // Cannot add a constructor in this set of methods.
+ stream.setStatus(QDataStream::ReadCorruptData);
+ return;
+ }
+ }
+
+ // Read the properties.
+ for (index = 0; index < propertyCount; ++index) {
+ if (stream.status() != QDataStream::Ok)
+ return;
+ QByteArray type;
+ stream >> name;
+ stream >> type;
+ addProperty(name, type);
+ QMetaPropertyBuilderPrivate *property = &(d->properties[index]);
+ stream >> property->flags;
+ stream >> property->notifySignal;
+ if (property->notifySignal < -1 ||
+ property->notifySignal >= d->methods.size()) {
+ // Notify signal method index is out of range.
+ stream.setStatus(QDataStream::ReadCorruptData);
+ return;
+ }
+ if (property->notifySignal >= 0 &&
+ d->methods[property->notifySignal].methodType() != QMetaMethod::Signal) {
+ // Notify signal method index does not refer to a signal.
+ stream.setStatus(QDataStream::ReadCorruptData);
+ return;
+ }
+ }
+
+ // Read the enumerators.
+ for (index = 0; index < enumeratorCount; ++index) {
+ if (stream.status() != QDataStream::Ok)
+ return;
+ stream >> name;
+ addEnumerator(name);
+ QMetaEnumBuilderPrivate *enumerator = &(d->enumerators[index]);
+ stream >> enumerator->isFlag;
+ stream >> enumerator->keys;
+ stream >> enumerator->values;
+ if (enumerator->keys.size() != enumerator->values.size()) {
+ // Mismatch between number of keys and number of values.
+ stream.setStatus(QDataStream::ReadCorruptData);
+ return;
+ }
+ }
+
+ // Read the constructor methods.
+ for (index = 0; index < constructorCount; ++index) {
+ if (stream.status() != QDataStream::Ok)
+ return;
+ stream >> name;
+ addConstructor(name);
+ QMetaMethodBuilderPrivate *method = &(d->constructors[index]);
+ stream >> method->returnType;
+ stream >> method->parameterNames;
+ stream >> method->tag;
+ stream >> method->attributes;
+ if (method->methodType() != QMetaMethod::Constructor) {
+ // The type must be Constructor.
+ stream.setStatus(QDataStream::ReadCorruptData);
+ return;
+ }
+ }
+
+ // Read the related meta objects.
+#ifdef Q_NO_DATA_RELOCATION
+ //### What do we do here
+#else
+ for (index = 0; index < relatedMetaObjectCount; ++index) {
+ if (stream.status() != QDataStream::Ok)
+ return;
+ stream >> name;
+ cl = resolveClassName(references, name);
+ if (!cl) {
+ stream.setStatus(QDataStream::ReadCorruptData);
+ return;
+ }
+ addRelatedMetaObject(cl);
+ }
+#endif
+
+ // Read the extra data block, which is reserved for future use.
+ stream >> name;
+}
+
+#endif // !QT_NO_DATASTREAM
+
+/*!
+ \class QMetaMethodBuilder
+ \internal
+ \brief The QMetaMethodBuilder class enables modifications to a method definition on a meta object builder.
+*/
+
+QMetaMethodBuilderPrivate *QMetaMethodBuilder::d_func() const
+{
+ // Positive indices indicate methods, negative indices indicate constructors.
+ if (_mobj && _index >= 0 && _index < _mobj->d->methods.size())
+ return &(_mobj->d->methods[_index]);
+ else if (_mobj && -_index >= 1 && -_index <= _mobj->d->constructors.size())
+ return &(_mobj->d->constructors[(-_index) - 1]);
+ else
+ return 0;
+}
+
+/*!
+ \fn QMetaMethodBuilder::QMetaMethodBuilder()
+ \internal
+*/
+
+/*!
+ Returns the index of this method within its QMetaObjectBuilder.
+*/
+int QMetaMethodBuilder::index() const
+{
+ if (_index >= 0)
+ return _index; // Method, signal, or slot
+ else
+ return (-_index) - 1; // Constructor
+}
+
+/*!
+ Returns the type of this method (signal, slot, method, or constructor).
+*/
+QMetaMethod::MethodType QMetaMethodBuilder::methodType() const
+{
+ QMetaMethodBuilderPrivate *d = d_func();
+ if (d)
+ return d->methodType();
+ else
+ return QMetaMethod::Method;
+}
+
+/*!
+ Returns the signature of this method.
+
+ \sa parameterNames(), returnType()
+*/
+QByteArray QMetaMethodBuilder::signature() const
+{
+ QMetaMethodBuilderPrivate *d = d_func();
+ if (d)
+ return d->signature;
+ else
+ return QByteArray();
+}
+
+/*!
+ Returns the return type for this method; empty if the method's
+ return type is \c{void}.
+
+ \sa setReturnType(), signature()
+*/
+QByteArray QMetaMethodBuilder::returnType() const
+{
+ QMetaMethodBuilderPrivate *d = d_func();
+ if (d)
+ return d->returnType;
+ else
+ return QByteArray();
+}
+
+/*!
+ Sets the return type for this method to \a value. If \a value
+ is empty, then the method's return type is \c{void}. The \a value
+ will be normalized before it is added to the method.
+
+ \sa returnType(), signature()
+*/
+void QMetaMethodBuilder::setReturnType(const QByteArray& value)
+{
+ QMetaMethodBuilderPrivate *d = d_func();
+ if (d)
+ d->returnType = QMetaObject::normalizedType(value);
+}
+
+/*!
+ Returns the list of parameter names for this method.
+
+ \sa setParameterNames()
+*/
+QList<QByteArray> QMetaMethodBuilder::parameterNames() const
+{
+ QMetaMethodBuilderPrivate *d = d_func();
+ if (d)
+ return d->parameterNames;
+ else
+ return QList<QByteArray>();
+}
+
+/*!
+ Sets the list of parameter names for this method to \a value.
+
+ \sa parameterNames()
+*/
+void QMetaMethodBuilder::setParameterNames(const QList<QByteArray>& value)
+{
+ QMetaMethodBuilderPrivate *d = d_func();
+ if (d)
+ d->parameterNames = value;
+}
+
+/*!
+ Returns the tag associated with this method.
+
+ \sa setTag()
+*/
+QByteArray QMetaMethodBuilder::tag() const
+{
+ QMetaMethodBuilderPrivate *d = d_func();
+ if (d)
+ return d->tag;
+ else
+ return QByteArray();
+}
+
+/*!
+ Sets the tag associated with this method to \a value.
+
+ \sa setTag()
+*/
+void QMetaMethodBuilder::setTag(const QByteArray& value)
+{
+ QMetaMethodBuilderPrivate *d = d_func();
+ if (d)
+ d->tag = value;
+}
+
+/*!
+ Returns the access specification of this method (private, protected,
+ or public). The default value is QMetaMethod::Public for methods,
+ slots, and constructors. The default value is QMetaMethod::Protected
+ for signals.
+
+ \sa setAccess()
+*/
+QMetaMethod::Access QMetaMethodBuilder::access() const
+{
+ QMetaMethodBuilderPrivate *d = d_func();
+ if (d)
+ return d->access();
+ else
+ return QMetaMethod::Public;
+}
+
+/*!
+ Sets the access specification of this method (private, protected,
+ or public) to \a value. If the method is a signal, this function
+ will be ignored.
+
+ \sa access()
+*/
+void QMetaMethodBuilder::setAccess(QMetaMethod::Access value)
+{
+ QMetaMethodBuilderPrivate *d = d_func();
+ if (d && d->methodType() != QMetaMethod::Signal)
+ d->setAccess(value);
+}
+
+/*!
+ Returns the additional attributes for this method.
+
+ \sa setAttributes()
+*/
+int QMetaMethodBuilder::attributes() const
+{
+ QMetaMethodBuilderPrivate *d = d_func();
+ if (d)
+ return (d->attributes >> 4);
+ else
+ return 0;
+}
+
+/*!
+ Sets the additional attributes for this method to \a value.
+
+ \sa attributes()
+*/
+void QMetaMethodBuilder::setAttributes(int value)
+{
+ QMetaMethodBuilderPrivate *d = d_func();
+ if (d)
+ d->attributes = ((d->attributes & 0x0f) | (value << 4));
+}
+
+/*!
+ \class QMetaPropertyBuilder
+ \internal
+ \brief The QMetaPropertyBuilder class enables modifications to a property definition on a meta object builder.
+*/
+
+QMetaPropertyBuilderPrivate *QMetaPropertyBuilder::d_func() const
+{
+ if (_mobj && _index >= 0 && _index < _mobj->d->properties.size())
+ return &(_mobj->d->properties[_index]);
+ else
+ return 0;
+}
+
+/*!
+ \fn QMetaPropertyBuilder::QMetaPropertyBuilder()
+ \internal
+*/
+
+/*!
+ \fn int QMetaPropertyBuilder::index() const
+
+ Returns the index of this property within its QMetaObjectBuilder.
+*/
+
+/*!
+ Returns the name associated with this property.
+
+ \sa type()
+*/
+QByteArray QMetaPropertyBuilder::name() const
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ return d->name;
+ else
+ return QByteArray();
+}
+
+/*!
+ Returns the type associated with this property.
+
+ \sa name()
+*/
+QByteArray QMetaPropertyBuilder::type() const
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ return d->type;
+ else
+ return QByteArray();
+}
+
+/*!
+ Returns true if this property has a notify signal; false otherwise.
+
+ \sa notifySignal(), setNotifySignal(), removeNotifySignal()
+*/
+bool QMetaPropertyBuilder::hasNotifySignal() const
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ return d->flag(Notify);
+ else
+ return false;
+}
+
+/*!
+ Returns the notify signal associated with this property.
+
+ \sa hasNotifySignal(), setNotifySignal(), removeNotifySignal()
+*/
+QMetaMethodBuilder QMetaPropertyBuilder::notifySignal() const
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d && d->notifySignal >= 0)
+ return QMetaMethodBuilder(_mobj, d->notifySignal);
+ else
+ return QMetaMethodBuilder();
+}
+
+/*!
+ Sets the notify signal associated with this property to \a value.
+
+ \sa hasNotifySignal(), notifySignal(), removeNotifySignal()
+*/
+void QMetaPropertyBuilder::setNotifySignal(const QMetaMethodBuilder& value)
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d) {
+ if (value._mobj) {
+ d->notifySignal = value._index;
+ d->setFlag(Notify, true);
+ } else {
+ d->notifySignal = -1;
+ d->setFlag(Notify, false);
+ }
+ }
+}
+
+/*!
+ Removes the notify signal from this property.
+
+ \sa hasNotifySignal(), notifySignal(), setNotifySignal()
+*/
+void QMetaPropertyBuilder::removeNotifySignal()
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d) {
+ d->notifySignal = -1;
+ d->setFlag(Notify, false);
+ }
+}
+
+/*!
+ Returns true if this property is readable; otherwise returns false.
+ The default value is true.
+
+ \sa setReadable(), isWritable()
+*/
+bool QMetaPropertyBuilder::isReadable() const
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ return d->flag(Readable);
+ else
+ return false;
+}
+
+/*!
+ Returns true if this property is writable; otherwise returns false.
+ The default value is true.
+
+ \sa setWritable(), isReadable()
+*/
+bool QMetaPropertyBuilder::isWritable() const
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ return d->flag(Writable);
+ else
+ return false;
+}
+
+/*!
+ Returns true if this property can be reset to a default value; otherwise
+ returns false. The default value is false.
+
+ \sa setResettable()
+*/
+bool QMetaPropertyBuilder::isResettable() const
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ return d->flag(Resettable);
+ else
+ return false;
+}
+
+/*!
+ Returns true if this property is designable; otherwise returns false.
+ This default value is false.
+
+ \sa setDesignable(), isScriptable(), isStored()
+*/
+bool QMetaPropertyBuilder::isDesignable() const
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ return d->flag(Designable);
+ else
+ return false;
+}
+
+/*!
+ Returns true if the property is scriptable; otherwise returns false.
+ This default value is false.
+
+ \sa setScriptable(), isDesignable(), isStored()
+*/
+bool QMetaPropertyBuilder::isScriptable() const
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ return d->flag(Scriptable);
+ else
+ return false;
+}
+
+/*!
+ Returns true if the property is stored; otherwise returns false.
+ This default value is false.
+
+ \sa setStored(), isDesignable(), isScriptable()
+*/
+bool QMetaPropertyBuilder::isStored() const
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ return d->flag(Stored);
+ else
+ return false;
+}
+
+/*!
+ Returns true if the property is editable; otherwise returns false.
+ This default value is false.
+
+ \sa setEditable(), isDesignable(), isScriptable(), isStored()
+*/
+bool QMetaPropertyBuilder::isEditable() const
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ return d->flag(Editable);
+ else
+ return false;
+}
+
+/*!
+ Returns true if this property is designated as the \c USER
+ property, i.e., the one that the user can edit or that is
+ significant in some other way. Otherwise it returns
+ false. This default value is false.
+
+ \sa setUser(), isDesignable(), isScriptable()
+*/
+bool QMetaPropertyBuilder::isUser() const
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ return d->flag(User);
+ else
+ return false;
+}
+
+/*!
+ Returns true if the property has a C++ setter function that
+ follows Qt's standard "name" / "setName" pattern. Designer and uic
+ query hasStdCppSet() in order to avoid expensive
+ QObject::setProperty() calls. All properties in Qt [should] follow
+ this pattern. The default value is false.
+
+ \sa setStdCppSet()
+*/
+bool QMetaPropertyBuilder::hasStdCppSet() const
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ return d->flag(StdCppSet);
+ else
+ return false;
+}
+
+/*!
+ Returns true if the property is an enumerator or flag type;
+ otherwise returns false. This default value is false.
+
+ \sa setEnumOrFlag()
+*/
+bool QMetaPropertyBuilder::isEnumOrFlag() const
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ return d->flag(EnumOrFlag);
+ else
+ return false;
+}
+
+/*!
+ Returns true if the property has the dynamic flag set;
+ otherwise returns false. The default value is false.
+
+ \sa setDynamic()
+*/
+bool QMetaPropertyBuilder::isDynamic() const
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ return d->flag(Dynamic);
+ else
+ return false;
+}
+
+/*!
+ Sets this property to readable if \a value is true.
+
+ \sa isReadable(), setWritable()
+*/
+void QMetaPropertyBuilder::setReadable(bool value)
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ d->setFlag(Readable, value);
+}
+
+/*!
+ Sets this property to writable if \a value is true.
+
+ \sa isWritable(), setReadable()
+*/
+void QMetaPropertyBuilder::setWritable(bool value)
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ d->setFlag(Writable, value);
+}
+
+/*!
+ Sets this property to resettable if \a value is true.
+
+ \sa isResettable()
+*/
+void QMetaPropertyBuilder::setResettable(bool value)
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ d->setFlag(Resettable, value);
+}
+
+/*!
+ Sets this property to designable if \a value is true.
+
+ \sa isDesignable(), setScriptable(), setStored()
+*/
+void QMetaPropertyBuilder::setDesignable(bool value)
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ d->setFlag(Designable, value);
+}
+
+/*!
+ Sets this property to scriptable if \a value is true.
+
+ \sa isScriptable(), setDesignable(), setStored()
+*/
+void QMetaPropertyBuilder::setScriptable(bool value)
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ d->setFlag(Scriptable, value);
+}
+
+/*!
+ Sets this property to storable if \a value is true.
+
+ \sa isStored(), setDesignable(), setScriptable()
+*/
+void QMetaPropertyBuilder::setStored(bool value)
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ d->setFlag(Stored, value);
+}
+
+/*!
+ Sets this property to editable if \a value is true.
+
+ \sa isEditable(), setDesignable(), setScriptable(), setStored()
+*/
+void QMetaPropertyBuilder::setEditable(bool value)
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ d->setFlag(Editable, value);
+}
+
+/*!
+ Sets the \c USER flag on this property to \a value.
+
+ \sa isUser(), setDesignable(), setScriptable()
+*/
+void QMetaPropertyBuilder::setUser(bool value)
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ d->setFlag(User, value);
+}
+
+/*!
+ Sets the C++ setter flag on this property to \a value, which is
+ true if the property has a C++ setter function that follows Qt's
+ standard "name" / "setName" pattern.
+
+ \sa hasStdCppSet()
+*/
+void QMetaPropertyBuilder::setStdCppSet(bool value)
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ d->setFlag(StdCppSet, value);
+}
+
+/*!
+ Sets this property to be of an enumerator or flag type if
+ \a value is true.
+
+ \sa isEnumOrFlag()
+*/
+void QMetaPropertyBuilder::setEnumOrFlag(bool value)
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ d->setFlag(EnumOrFlag, value);
+}
+
+/*!
+ Sets this property to have the dynamic flag if \a value is
+ true.
+
+ \sa isDynamic()
+*/
+void QMetaPropertyBuilder::setDynamic(bool value)
+{
+ QMetaPropertyBuilderPrivate *d = d_func();
+ if (d)
+ d->setFlag(Dynamic, value);
+}
+
+/*!
+ \class QMetaEnumBuilder
+ \internal
+ \brief The QMetaEnumBuilder class enables modifications to an enumerator definition on a meta object builder.
+*/
+
+QMetaEnumBuilderPrivate *QMetaEnumBuilder::d_func() const
+{
+ if (_mobj && _index >= 0 && _index < _mobj->d->enumerators.size())
+ return &(_mobj->d->enumerators[_index]);
+ else
+ return 0;
+}
+
+/*!
+ \fn QMetaEnumBuilder::QMetaEnumBuilder()
+ \internal
+*/
+
+/*!
+ \fn int QMetaEnumBuilder::index() const
+
+ Returns the index of this enumerator within its QMetaObjectBuilder.
+*/
+
+/*!
+ Returns the name of the enumerator (without the scope).
+*/
+QByteArray QMetaEnumBuilder::name() const
+{
+ QMetaEnumBuilderPrivate *d = d_func();
+ if (d)
+ return d->name;
+ else
+ return QByteArray();
+}
+
+/*!
+ Returns true if this enumerator is used as a flag; otherwise returns
+ false.
+
+ \sa setIsFlag()
+*/
+bool QMetaEnumBuilder::isFlag() const
+{
+ QMetaEnumBuilderPrivate *d = d_func();
+ if (d)
+ return d->isFlag;
+ else
+ return false;
+}
+
+/*!
+ Sets this enumerator to be used as a flag if \a value is true.
+
+ \sa isFlag()
+*/
+void QMetaEnumBuilder::setIsFlag(bool value)
+{
+ QMetaEnumBuilderPrivate *d = d_func();
+ if (d)
+ d->isFlag = value;
+}
+
+/*!
+ Returns the number of keys.
+
+ \sa key(), addKey()
+*/
+int QMetaEnumBuilder::keyCount() const
+{
+ QMetaEnumBuilderPrivate *d = d_func();
+ if (d)
+ return d->keys.size();
+ else
+ return 0;
+}
+
+/*!
+ Returns the key with the given \a index, or an empty QByteArray
+ if no such key exists.
+
+ \sa keyCount(), addKey(), value()
+*/
+QByteArray QMetaEnumBuilder::key(int index) const
+{
+ QMetaEnumBuilderPrivate *d = d_func();
+ if (d && index >= 0 && index < d->keys.size())
+ return d->keys[index];
+ else
+ return QByteArray();
+}
+
+/*!
+ Returns the value with the given \a index; or returns -1 if there
+ is no such value.
+
+ \sa keyCount(), addKey(), key()
+*/
+int QMetaEnumBuilder::value(int index) const
+{
+ QMetaEnumBuilderPrivate *d = d_func();
+ if (d && index >= 0 && index < d->keys.size())
+ return d->values[index];
+ else
+ return -1;
+}
+
+/*!
+ Adds a new key called \a name to this enumerator, associated
+ with \a value. Returns the index of the new key.
+
+ \sa keyCount(), key(), value(), removeKey()
+*/
+int QMetaEnumBuilder::addKey(const QByteArray& name, int value)
+{
+ QMetaEnumBuilderPrivate *d = d_func();
+ if (d) {
+ int index = d->keys.size();
+ d->keys += name;
+ d->values += value;
+ return index;
+ } else {
+ return -1;
+ }
+}
+
+/*!
+ Removes the key at \a index from this enumerator.
+
+ \sa addKey()
+*/
+void QMetaEnumBuilder::removeKey(int index)
+{
+ QMetaEnumBuilderPrivate *d = d_func();
+ if (d && index >= 0 && index < d->keys.size()) {
+ d->keys.removeAt(index);
+ d->values.removeAt(index);
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qmetaobjectbuilder_p.h b/src/declarative/qml/qmetaobjectbuilder_p.h
new file mode 100644
index 0000000000..dbaf9e6417
--- /dev/null
+++ b/src/declarative/qml/qmetaobjectbuilder_p.h
@@ -0,0 +1,321 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMETAOBJECTBUILDER_H
+#define QMETAOBJECTBUILDER_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of moc. This header file may change from version to version without notice,
+// or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qobject.h>
+#include <QtCore/qmetaobject.h>
+#include <QtCore/qdatastream.h>
+#include <QtCore/qmap.h>
+
+QT_BEGIN_NAMESPACE
+
+class QMetaObjectBuilderPrivate;
+class QMetaMethodBuilder;
+class QMetaMethodBuilderPrivate;
+class QMetaPropertyBuilder;
+class QMetaPropertyBuilderPrivate;
+class QMetaEnumBuilder;
+class QMetaEnumBuilderPrivate;
+
+class Q_DECLARATIVE_EXPORT QMetaObjectBuilder
+{
+public:
+ enum AddMember
+ {
+ ClassName = 0x00000001,
+ SuperClass = 0x00000002,
+ Methods = 0x00000004,
+ Signals = 0x00000008,
+ Slots = 0x00000010,
+ Constructors = 0x00000020,
+ Properties = 0x00000040,
+ Enumerators = 0x00000080,
+ ClassInfos = 0x00000100,
+ RelatedMetaObjects = 0x00000200,
+ StaticMetacall = 0x00000400,
+ PublicMethods = 0x00000800,
+ ProtectedMethods = 0x00001000,
+ PrivateMethods = 0x00002000,
+ AllMembers = 0x7FFFFFFF,
+ AllPrimaryMembers = 0x7FFFFBFC
+ };
+ Q_DECLARE_FLAGS(AddMembers, AddMember)
+
+ enum MetaObjectFlag {
+ DynamicMetaObject = 0x01
+ };
+ Q_DECLARE_FLAGS(MetaObjectFlags, MetaObjectFlag)
+
+ QMetaObjectBuilder();
+ explicit QMetaObjectBuilder(const QMetaObject *prototype, QMetaObjectBuilder::AddMembers members = AllMembers);
+ virtual ~QMetaObjectBuilder();
+
+ QByteArray className() const;
+ void setClassName(const QByteArray& name);
+
+ const QMetaObject *superClass() const;
+ void setSuperClass(const QMetaObject *meta);
+
+ MetaObjectFlags flags() const;
+ void setFlags(MetaObjectFlags);
+
+ int methodCount() const;
+ int constructorCount() const;
+ int propertyCount() const;
+ int enumeratorCount() const;
+ int classInfoCount() const;
+ int relatedMetaObjectCount() const;
+
+ QMetaMethodBuilder addMethod(const QByteArray& signature);
+ QMetaMethodBuilder addMethod(const QByteArray& signature, const QByteArray& returnType);
+ QMetaMethodBuilder addMethod(const QMetaMethod& prototype);
+
+ QMetaMethodBuilder addSlot(const QByteArray& signature);
+ QMetaMethodBuilder addSignal(const QByteArray& signature);
+
+ QMetaMethodBuilder addConstructor(const QByteArray& signature);
+ QMetaMethodBuilder addConstructor(const QMetaMethod& prototype);
+
+ QMetaPropertyBuilder addProperty(const QByteArray& name, const QByteArray& type, int notifierId=-1);
+ QMetaPropertyBuilder addProperty(const QMetaProperty& prototype);
+
+ QMetaEnumBuilder addEnumerator(const QByteArray& name);
+ QMetaEnumBuilder addEnumerator(const QMetaEnum& prototype);
+
+ int addClassInfo(const QByteArray& name, const QByteArray& value);
+
+#ifdef Q_NO_DATA_RELOCATION
+ int addRelatedMetaObject(const QMetaObjectAccessor &meta);
+#else
+ int addRelatedMetaObject(const QMetaObject *meta);
+#endif
+
+ void addMetaObject(const QMetaObject *prototype, QMetaObjectBuilder::AddMembers members = AllMembers);
+
+ QMetaMethodBuilder method(int index) const;
+ QMetaMethodBuilder constructor(int index) const;
+ QMetaPropertyBuilder property(int index) const;
+ QMetaEnumBuilder enumerator(int index) const;
+ const QMetaObject *relatedMetaObject(int index) const;
+
+ QByteArray classInfoName(int index) const;
+ QByteArray classInfoValue(int index) const;
+
+ void removeMethod(int index);
+ void removeConstructor(int index);
+ void removeProperty(int index);
+ void removeEnumerator(int index);
+ void removeClassInfo(int index);
+ void removeRelatedMetaObject(int index);
+
+ int indexOfMethod(const QByteArray& signature);
+ int indexOfSignal(const QByteArray& signature);
+ int indexOfSlot(const QByteArray& signature);
+ int indexOfConstructor(const QByteArray& signature);
+ int indexOfProperty(const QByteArray& name);
+ int indexOfEnumerator(const QByteArray& name);
+ int indexOfClassInfo(const QByteArray& name);
+
+ typedef int (*StaticMetacallFunction)(QMetaObject::Call, int, void **);
+
+ QMetaObjectBuilder::StaticMetacallFunction staticMetacallFunction() const;
+ void setStaticMetacallFunction(QMetaObjectBuilder::StaticMetacallFunction value);
+
+ QMetaObject *toMetaObject() const;
+ QByteArray toRelocatableData(bool * = 0) const;
+ static void fromRelocatableData(QMetaObject *, const QMetaObject *, const QByteArray &);
+
+#ifndef QT_NO_DATASTREAM
+ void serialize(QDataStream& stream) const;
+ void deserialize
+ (QDataStream& stream,
+ const QMap<QByteArray, const QMetaObject *>& references);
+#endif
+
+private:
+ Q_DISABLE_COPY(QMetaObjectBuilder)
+
+ QMetaObjectBuilderPrivate *d;
+
+ friend class QMetaMethodBuilder;
+ friend class QMetaPropertyBuilder;
+ friend class QMetaEnumBuilder;
+};
+
+class Q_DECLARATIVE_EXPORT QMetaMethodBuilder
+{
+public:
+ QMetaMethodBuilder() : _mobj(0), _index(0) {}
+
+ int index() const;
+
+ QMetaMethod::MethodType methodType() const;
+ QByteArray signature() const;
+
+ QByteArray returnType() const;
+ void setReturnType(const QByteArray& value);
+
+ QList<QByteArray> parameterNames() const;
+ void setParameterNames(const QList<QByteArray>& value);
+
+ QByteArray tag() const;
+ void setTag(const QByteArray& value);
+
+ QMetaMethod::Access access() const;
+ void setAccess(QMetaMethod::Access value);
+
+ int attributes() const;
+ void setAttributes(int value);
+
+private:
+ const QMetaObjectBuilder *_mobj;
+ int _index;
+
+ friend class QMetaObjectBuilder;
+ friend class QMetaPropertyBuilder;
+
+ QMetaMethodBuilder(const QMetaObjectBuilder *mobj, int index)
+ : _mobj(mobj), _index(index) {}
+
+ QMetaMethodBuilderPrivate *d_func() const;
+};
+
+class Q_DECLARATIVE_EXPORT QMetaPropertyBuilder
+{
+public:
+ QMetaPropertyBuilder() : _mobj(0), _index(0) {}
+
+ int index() const { return _index; }
+
+ QByteArray name() const;
+ QByteArray type() const;
+
+ bool hasNotifySignal() const;
+ QMetaMethodBuilder notifySignal() const;
+ void setNotifySignal(const QMetaMethodBuilder& value);
+ void removeNotifySignal();
+
+ bool isReadable() const;
+ bool isWritable() const;
+ bool isResettable() const;
+ bool isDesignable() const;
+ bool isScriptable() const;
+ bool isStored() const;
+ bool isEditable() const;
+ bool isUser() const;
+ bool hasStdCppSet() const;
+ bool isEnumOrFlag() const;
+ bool isDynamic() const;
+
+ void setReadable(bool value);
+ void setWritable(bool value);
+ void setResettable(bool value);
+ void setDesignable(bool value);
+ void setScriptable(bool value);
+ void setStored(bool value);
+ void setEditable(bool value);
+ void setUser(bool value);
+ void setStdCppSet(bool value);
+ void setEnumOrFlag(bool value);
+ void setDynamic(bool value);
+
+private:
+ const QMetaObjectBuilder *_mobj;
+ int _index;
+
+ friend class QMetaObjectBuilder;
+
+ QMetaPropertyBuilder(const QMetaObjectBuilder *mobj, int index)
+ : _mobj(mobj), _index(index) {}
+
+ QMetaPropertyBuilderPrivate *d_func() const;
+};
+
+class Q_DECLARATIVE_EXPORT QMetaEnumBuilder
+{
+public:
+ QMetaEnumBuilder() : _mobj(0), _index(0) {}
+
+ int index() const { return _index; }
+
+ QByteArray name() const;
+
+ bool isFlag() const;
+ void setIsFlag(bool value);
+
+ int keyCount() const;
+ QByteArray key(int index) const;
+ int value(int index) const;
+
+ int addKey(const QByteArray& name, int value);
+ void removeKey(int index);
+
+private:
+ const QMetaObjectBuilder *_mobj;
+ int _index;
+
+ friend class QMetaObjectBuilder;
+
+ QMetaEnumBuilder(const QMetaObjectBuilder *mobj, int index)
+ : _mobj(mobj), _index(index) {}
+
+ QMetaEnumBuilderPrivate *d_func() const;
+};
+
+Q_DECLARE_OPERATORS_FOR_FLAGS(QMetaObjectBuilder::AddMembers)
+Q_DECLARE_OPERATORS_FOR_FLAGS(QMetaObjectBuilder::MetaObjectFlags)
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri
new file mode 100644
index 0000000000..aa1a34bf85
--- /dev/null
+++ b/src/declarative/qml/qml.pri
@@ -0,0 +1,131 @@
+INCLUDEPATH += $$PWD
+SOURCES += \
+ $$PWD/qdeclarativeparser.cpp \
+ $$PWD/qdeclarativeinstruction.cpp \
+ $$PWD/qdeclarativevmemetaobject.cpp \
+ $$PWD/qdeclarativeengine.cpp \
+ $$PWD/qdeclarativeexpression.cpp \
+ $$PWD/qdeclarativebinding.cpp \
+ $$PWD/qdeclarativeproperty.cpp \
+ $$PWD/qdeclarativecomponent.cpp \
+ $$PWD/qdeclarativecontext.cpp \
+ $$PWD/qdeclarativecustomparser.cpp \
+ $$PWD/qdeclarativepropertyvaluesource.cpp \
+ $$PWD/qdeclarativepropertyvalueinterceptor.cpp \
+ $$PWD/qdeclarativeproxymetaobject.cpp \
+ $$PWD/qdeclarativevme.cpp \
+ $$PWD/qdeclarativecompiler.cpp \
+ $$PWD/qdeclarativecompileddata.cpp \
+ $$PWD/qdeclarativeboundsignal.cpp \
+ $$PWD/qdeclarativedom.cpp \
+ $$PWD/qdeclarativerefcount.cpp \
+ $$PWD/qdeclarativemetatype.cpp \
+ $$PWD/qdeclarativestringconverters.cpp \
+ $$PWD/qdeclarativeclassfactory.cpp \
+ $$PWD/qdeclarativeparserstatus.cpp \
+ $$PWD/qdeclarativecompositetypemanager.cpp \
+ $$PWD/qdeclarativeinfo.cpp \
+ $$PWD/qdeclarativeerror.cpp \
+ $$PWD/qdeclarativescriptparser.cpp \
+ $$PWD/qdeclarativeenginedebug.cpp \
+ $$PWD/qdeclarativerewrite.cpp \
+ $$PWD/qdeclarativevaluetype.cpp \
+ $$PWD/qdeclarativecompiledbindings.cpp \
+ $$PWD/qdeclarativexmlhttprequest.cpp \
+ $$PWD/qdeclarativesqldatabase.cpp \
+ $$PWD/qmetaobjectbuilder.cpp \
+ $$PWD/qdeclarativewatcher.cpp \
+ $$PWD/qdeclarativescript.cpp \
+ $$PWD/qdeclarativecleanup.cpp \
+ $$PWD/qdeclarativepropertycache.cpp \
+ $$PWD/qdeclarativeintegercache.cpp \
+ $$PWD/qdeclarativetypenamecache.cpp \
+ $$PWD/qdeclarativescriptstring.cpp \
+ $$PWD/qdeclarativeobjectscriptclass.cpp \
+ $$PWD/qdeclarativecontextscriptclass.cpp \
+ $$PWD/qdeclarativeglobalscriptclass.cpp \
+ $$PWD/qdeclarativevaluetypescriptclass.cpp \
+ $$PWD/qdeclarativetypenamescriptclass.cpp \
+ $$PWD/qdeclarativelistscriptclass.cpp \
+ $$PWD/qdeclarativeworkerscript.cpp \
+ $$PWD/qdeclarativeimageprovider.cpp \
+ $$PWD/qdeclarativenetworkaccessmanagerfactory.cpp \
+ $$PWD/qdeclarativedirparser.cpp \
+ $$PWD/qdeclarativeextensionplugin.cpp \
+ $$PWD/qdeclarativelist.cpp
+
+HEADERS += \
+ $$PWD/qdeclarativeparser_p.h \
+ $$PWD/qdeclarativeglobal_p.h \
+ $$PWD/qdeclarativeinstruction_p.h \
+ $$PWD/qdeclarativevmemetaobject_p.h \
+ $$PWD/qdeclarative.h \
+ $$PWD/qdeclarativebinding_p.h \
+ $$PWD/qdeclarativebinding_p_p.h \
+ $$PWD/qdeclarativeproperty.h \
+ $$PWD/qdeclarativecomponent.h \
+ $$PWD/qdeclarativecomponent_p.h \
+ $$PWD/qdeclarativecustomparser_p.h \
+ $$PWD/qdeclarativecustomparser_p_p.h \
+ $$PWD/qdeclarativepropertyvaluesource.h \
+ $$PWD/qdeclarativepropertyvalueinterceptor.h \
+ $$PWD/qdeclarativeboundsignal_p.h \
+ $$PWD/qdeclarativeparserstatus.h \
+ $$PWD/qdeclarativeproxymetaobject_p.h \
+ $$PWD/qdeclarativevme_p.h \
+ $$PWD/qdeclarativecompiler_p.h \
+ $$PWD/qdeclarativeengine_p.h \
+ $$PWD/qdeclarativeexpression_p.h \
+ $$PWD/qdeclarativeprivate.h \
+ $$PWD/qdeclarativedom_p.h \
+ $$PWD/qdeclarativedom_p_p.h \
+ $$PWD/qdeclarativerefcount_p.h \
+ $$PWD/qdeclarativemetatype_p.h \
+ $$PWD/qdeclarativeengine.h \
+ $$PWD/qdeclarativecontext.h \
+ $$PWD/qdeclarativeexpression.h \
+ $$PWD/qdeclarativestringconverters_p.h \
+ $$PWD/qdeclarativeclassfactory_p.h \
+ $$PWD/qdeclarativeinfo.h \
+ $$PWD/qdeclarativeproperty_p.h \
+ $$PWD/qdeclarativecontext_p.h \
+ $$PWD/qdeclarativecompositetypedata_p.h \
+ $$PWD/qdeclarativecompositetypemanager_p.h \
+ $$PWD/qdeclarativelist.h \
+ $$PWD/qdeclarativelist_p.h \
+ $$PWD/qdeclarativedeclarativedata_p.h \
+ $$PWD/qdeclarativeerror.h \
+ $$PWD/qdeclarativescriptparser_p.h \
+ $$PWD/qdeclarativeenginedebug_p.h \
+ $$PWD/qdeclarativerewrite_p.h \
+ $$PWD/qpodvector_p.h \
+ $$PWD/qbitfield_p.h \
+ $$PWD/qdeclarativevaluetype_p.h \
+ $$PWD/qdeclarativecompiledbindings_p.h \
+ $$PWD/qdeclarativexmlhttprequest_p.h \
+ $$PWD/qdeclarativesqldatabase_p.h \
+ $$PWD/qmetaobjectbuilder_p.h \
+ $$PWD/qdeclarativewatcher_p.h \
+ $$PWD/qdeclarativecleanup_p.h \
+ $$PWD/qdeclarativepropertycache_p.h \
+ $$PWD/qdeclarativeintegercache_p.h \
+ $$PWD/qdeclarativetypenamecache_p.h \
+ $$PWD/qdeclarativescriptstring.h \
+ $$PWD/qdeclarativeobjectscriptclass_p.h \
+ $$PWD/qdeclarativecontextscriptclass_p.h \
+ $$PWD/qdeclarativeglobalscriptclass_p.h \
+ $$PWD/qdeclarativevaluetypescriptclass_p.h \
+ $$PWD/qdeclarativetypenamescriptclass_p.h \
+ $$PWD/qdeclarativelistscriptclass_p.h \
+ $$PWD/qdeclarativeworkerscript_p.h \
+ $$PWD/qdeclarativescriptclass_p.h \
+ $$PWD/qdeclarativeguard_p.h \
+ $$PWD/qdeclarativeimageprovider.h \
+ $$PWD/qdeclarativenetworkaccessmanagerfactory.h \
+ $$PWD/qdeclarativedirparser_p.h \
+ $$PWD/qdeclarativeextensioninterface.h \
+ $$PWD/qdeclarativeextensionplugin.h
+
+QT += sql
+include(parser/parser.pri)
+include(rewriter/rewriter.pri)
diff --git a/src/declarative/qml/qpodvector_p.h b/src/declarative/qml/qpodvector_p.h
new file mode 100644
index 0000000000..caf564a039
--- /dev/null
+++ b/src/declarative/qml/qpodvector_p.h
@@ -0,0 +1,173 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPODVECTOR_P_H
+#define QPODVECTOR_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qglobal.h>
+#include <QDebug>
+
+QT_BEGIN_NAMESPACE
+
+template<class T, int Increment=1024>
+class QPODVector
+{
+public:
+ QPODVector()
+ : m_count(0), m_capacity(0), m_data(0) {}
+ ~QPODVector() { if (m_data) ::free(m_data); }
+
+ const T &at(int idx) const {
+ return m_data[idx];
+ }
+
+ T &operator[](int idx) {
+ return m_data[idx];
+ }
+
+ void clear() {
+ m_count = 0;
+ }
+
+ void prepend(const T &v) {
+ insert(0, v);
+ }
+
+ void append(const T &v) {
+ insert(m_count, v);
+ }
+
+ void insert(int idx, const T &v) {
+ if (m_count == m_capacity) {
+ m_capacity += Increment;
+ m_data = (T *)realloc(m_data, m_capacity * sizeof(T));
+ }
+ int moveCount = m_count - idx;
+ if (moveCount)
+ ::memmove(m_data + idx + 1, m_data + idx, moveCount * sizeof(T));
+ m_count++;
+ m_data[idx] = v;
+ }
+
+ void reserve(int count) {
+ if (count >= m_capacity) {
+ m_capacity = (count + (Increment-1)) & (0xFFFFFFFF - Increment + 1);
+ m_data = (T *)realloc(m_data, m_capacity * sizeof(T));
+ }
+ }
+
+ void insertBlank(int idx, int count) {
+ int newSize = m_count + count;
+ reserve(newSize);
+ int moveCount = m_count - idx;
+ if (moveCount)
+ ::memmove(m_data + idx + count, m_data + idx,
+ moveCount * sizeof(T));
+ m_count = newSize;
+ }
+
+ void remove(int idx, int count = 1) {
+ int moveCount = m_count - (idx + count);
+ if (moveCount)
+ ::memmove(m_data + idx, m_data + idx + count,
+ moveCount * sizeof(T));
+ m_count -= count;
+ }
+
+ void removeOne(const T &v) {
+ int idx = 0;
+ while (idx < m_count) {
+ if (m_data[idx] == v) {
+ remove(idx);
+ return;
+ }
+ ++idx;
+ }
+ }
+
+ int find(const T &v) {
+ for (int idx = 0; idx < m_count; ++idx)
+ if (m_data[idx] == v)
+ return idx;
+ return -1;
+ }
+
+ bool contains(const T &v) {
+ return find(v) != -1;
+ }
+
+ int count() const {
+ return m_count;
+ }
+
+ void copyAndClear(QPODVector<T,Increment> &other) {
+ if (other.m_data) ::free(other.m_data);
+ other.m_count = m_count;
+ other.m_capacity = m_capacity;
+ other.m_data = m_data;
+ m_count = 0;
+ m_capacity = 0;
+ m_data = 0;
+ }
+
+ QPODVector<T,Increment> &operator<<(const T &v) { append(v); return *this; }
+private:
+ QPODVector(const QPODVector &);
+ QPODVector &operator=(const QPODVector &);
+ int m_count;
+ int m_capacity;
+ T *m_data;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/declarative/qml/rewriter/rewriter.cpp b/src/declarative/qml/rewriter/rewriter.cpp
new file mode 100644
index 0000000000..b458a8d361
--- /dev/null
+++ b/src/declarative/qml/rewriter/rewriter.cpp
@@ -0,0 +1,102 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "rewriter_p.h"
+
+#include <qdeclarativejsast_p.h>
+
+QT_QML_BEGIN_NAMESPACE
+
+using namespace QDeclarativeJS;
+
+void Rewriter::replace(const AST::SourceLocation &loc, const QString &text)
+{ replace(loc.offset, loc.length, text); }
+
+void Rewriter::remove(const AST::SourceLocation &loc)
+{ return replace(loc.offset, loc.length, QString()); }
+
+void Rewriter::remove(const AST::SourceLocation &firstLoc, const AST::SourceLocation &lastLoc)
+{ return replace(firstLoc.offset, lastLoc.offset + lastLoc.length - firstLoc.offset, QString()); }
+
+void Rewriter::insertTextBefore(const AST::SourceLocation &loc, const QString &text)
+{ replace(loc.offset, 0, text); }
+
+void Rewriter::insertTextAfter(const AST::SourceLocation &loc, const QString &text)
+{ replace(loc.offset + loc.length, 0, text); }
+
+void Rewriter::replace(int offset, int length, const QString &text)
+{ textWriter.replace(offset, length, text); }
+
+void Rewriter::insertText(int offset, const QString &text)
+{ replace(offset, 0, text); }
+
+void Rewriter::removeText(int offset, int length)
+{ replace(offset, length, QString()); }
+
+QString Rewriter::textAt(const AST::SourceLocation &loc) const
+{ return _code.mid(loc.offset, loc.length); }
+
+QString Rewriter::textAt(const AST::SourceLocation &firstLoc, const AST::SourceLocation &lastLoc) const
+{ return _code.mid(firstLoc.offset, lastLoc.offset + lastLoc.length - firstLoc.offset); }
+
+void Rewriter::accept(QDeclarativeJS::AST::Node *node)
+{ QDeclarativeJS::AST::Node::acceptChild(node, this); }
+
+void Rewriter::moveTextBefore(const AST::SourceLocation &firstLoc,
+ const AST::SourceLocation &lastLoc,
+ const AST::SourceLocation &loc)
+{
+ move(firstLoc.offset, lastLoc.offset + lastLoc.length - firstLoc.offset, loc.offset);
+}
+
+void Rewriter::moveTextAfter(const AST::SourceLocation &firstLoc,
+ const AST::SourceLocation &lastLoc,
+ const AST::SourceLocation &loc)
+{
+ move(firstLoc.offset, lastLoc.offset + lastLoc.length - firstLoc.offset, loc.offset + loc.length);
+}
+
+void Rewriter::move(int pos, int length, int to)
+{
+ textWriter.move(pos, length, to);
+}
+
+QT_QML_END_NAMESPACE
diff --git a/src/declarative/qml/rewriter/rewriter.pri b/src/declarative/qml/rewriter/rewriter.pri
new file mode 100644
index 0000000000..2c290618da
--- /dev/null
+++ b/src/declarative/qml/rewriter/rewriter.pri
@@ -0,0 +1,9 @@
+INCLUDEPATH += $$PWD
+
+HEADERS += $$PWD/textwriter_p.h
+SOURCES += $$PWD/textwriter.cpp
+
+!no_ast_rewriter {
+ HEADERS += $$PWD/rewriter_p.h
+ SOURCES += $$PWD/rewriter.cpp
+}
diff --git a/src/declarative/qml/rewriter/rewriter_p.h b/src/declarative/qml/rewriter/rewriter_p.h
new file mode 100644
index 0000000000..d1445d80ac
--- /dev/null
+++ b/src/declarative/qml/rewriter/rewriter_p.h
@@ -0,0 +1,153 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef REWRITER_H
+#define REWRITER_H
+
+#include "textwriter_p.h"
+
+#include <qdeclarativejsastvisitor_p.h>
+
+#include <QtCore/QList>
+#include <QtCore/QString>
+
+QT_BEGIN_HEADER
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS {
+
+////////////////////////////////////////////////////////////////////////////////
+// Replacement
+////////////////////////////////////////////////////////////////////////////////
+class Replacement
+{
+ int _offset;
+ int _length;
+ QString _text;
+
+public:
+ Replacement(int offset = 0, int length = 0, const QString &text = QString())
+ : _offset(offset), _length(length), _text(text)
+ { }
+
+ bool isNull() const { return _offset == _length; }
+ operator bool() const { return ! isNull(); }
+
+ int offset() const { return _offset; }
+ int length() const { return _length; }
+ QString text() const { return _text; }
+};
+
+
+
+////////////////////////////////////////////////////////////////////////////////
+// Rewriter
+////////////////////////////////////////////////////////////////////////////////
+class Rewriter: public AST::Visitor
+{
+protected:
+ TextWriter textWriter;
+public:
+ //
+ // Token based API
+ //
+
+ /// Returns the text of the token at the given \a location.
+ QString textAt(const AST::SourceLocation &location) const;
+
+ QString textAt(const AST::SourceLocation &firstLoc,
+ const AST::SourceLocation &lastLoc) const;
+
+ /// Replace the token at \a loc with the given \a text.
+ void replace(const AST::SourceLocation &loc, const QString &text);
+
+ /// Remove the token at the given \a location.
+ void remove(const AST::SourceLocation &location);
+
+ /// Remove all tokens in the range [\a firstLoc, \a lastLoc].
+ void remove(const AST::SourceLocation &firstLoc, const AST::SourceLocation &lastLoc);
+
+ /// Insert \a text before the token at the given \a location.
+ void insertTextBefore(const AST::SourceLocation &location, const QString &text);
+
+ /// Insert \a text after the token at the given \a location.
+ void insertTextAfter(const AST::SourceLocation &loc, const QString &text);
+
+ void moveTextBefore(const AST::SourceLocation &firstLoc,
+ const AST::SourceLocation &lastLoc,
+ const AST::SourceLocation &loc);
+
+ void moveTextAfter(const AST::SourceLocation &firstLoc,
+ const AST::SourceLocation &lastLoc,
+ const AST::SourceLocation &loc);
+
+ //
+ // low-level offset based API
+ //
+ virtual void replace(int offset, int length, const QString &text);
+ virtual void move(int pos, int length, int to);
+ void insertText(int offset, const QString &text);
+ void removeText(int offset, int length);
+
+ /// Visit the given \a node.
+ void accept(AST::Node *node);
+
+ /// Returns the original unchanged source code.
+ QString code() const { return _code; }
+
+ /// Returns the list of replacements.
+ QList<Replacement> replacementList() const { return _replacementList; }
+
+protected:
+ /// \internal
+ void setCode(const QString &code) { _code = code; }
+
+private:
+ QString _code;
+ QList<Replacement> _replacementList;
+};
+
+} // end of namespace QDeclarativeJS
+
+QT_QML_END_NAMESPACE
+QT_END_HEADER
+
+#endif // REWRITER_H
diff --git a/src/declarative/qml/rewriter/textwriter.cpp b/src/declarative/qml/rewriter/textwriter.cpp
new file mode 100644
index 0000000000..e63d24c619
--- /dev/null
+++ b/src/declarative/qml/rewriter/textwriter.cpp
@@ -0,0 +1,217 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "textwriter_p.h"
+
+QT_QML_BEGIN_NAMESPACE
+
+using namespace QDeclarativeJS;
+
+TextWriter::TextWriter()
+ :string(0), cursor(0)
+{
+}
+
+static bool overlaps(int posA, int lengthA, int posB, int lengthB) {
+ return (posA < posB + lengthB && posA + lengthA > posB + lengthB)
+ || (posA < posB && posA + lengthA > posB);
+}
+
+bool TextWriter::hasOverlap(int pos, int length)
+{
+ {
+ QListIterator<Replace> i(replaceList);
+ while (i.hasNext()) {
+ const Replace &cmd = i.next();
+ if (overlaps(pos, length, cmd.pos, cmd.length))
+ return true;
+ }
+ }
+ {
+ QListIterator<Move> i(moveList);
+ while (i.hasNext()) {
+ const Move &cmd = i.next();
+ if (overlaps(pos, length, cmd.pos, cmd.length))
+ return true;
+ }
+ return false;
+ }
+}
+
+bool TextWriter::hasMoveInto(int pos, int length)
+{
+ QListIterator<Move> i(moveList);
+ while (i.hasNext()) {
+ const Move &cmd = i.next();
+ if (cmd.to >= pos && cmd.to < pos + length)
+ return true;
+ }
+ return false;
+}
+
+void TextWriter::replace(int pos, int length, const QString &replacement)
+{
+ Q_ASSERT(!hasOverlap(pos, length));
+ Q_ASSERT(!hasMoveInto(pos, length));
+
+ Replace cmd;
+ cmd.pos = pos;
+ cmd.length = length;
+ cmd.replacement = replacement;
+ replaceList += cmd;
+}
+
+void TextWriter::move(int pos, int length, int to)
+{
+ Q_ASSERT(!hasOverlap(pos, length));
+
+ Move cmd;
+ cmd.pos = pos;
+ cmd.length = length;
+ cmd.to = to;
+ moveList += cmd;
+}
+
+void TextWriter::doReplace(const Replace &replace)
+{
+ int diff = replace.replacement.size() - replace.length;
+ {
+ QMutableListIterator<Replace> i(replaceList);
+ while (i.hasNext()) {
+ Replace &c = i.next();
+ if (replace.pos < c.pos)
+ c.pos += diff;
+ else if (replace.pos + replace.length < c.pos + c.length)
+ c.length += diff;
+ }
+ }
+ {
+ QMutableListIterator<Move> i(moveList);
+ while (i.hasNext()) {
+ Move &c = i.next();
+ if (replace.pos < c.pos)
+ c.pos += diff;
+ else if (replace.pos + replace.length < c.pos + c.length)
+ c.length += diff;
+
+ if (replace.pos < c.to)
+ c.to += diff;
+ }
+ }
+
+ if (string) {
+ string->replace(replace.pos, replace.length, replace.replacement);
+ } else if (cursor) {
+ cursor->setPosition(replace.pos);
+ cursor->setPosition(replace.pos + replace.length, QTextCursor::KeepAnchor);
+ cursor->insertText(replace.replacement);
+ }
+}
+
+void TextWriter::doMove(const Move &move)
+{
+ QString text;
+ if (string) {
+ text = string->mid(move.pos, move.length);
+ } else if (cursor) {
+ cursor->setPosition(move.pos);
+ cursor->setPosition(move.pos + move.length, QTextCursor::KeepAnchor);
+ text = cursor->selectedText();
+ }
+
+ Replace cut;
+ cut.pos = move.pos;
+ cut.length = move.length;
+ Replace paste;
+ paste.pos = move.to;
+ paste.length = 0;
+ paste.replacement = text;
+
+ replaceList.append(cut);
+ replaceList.append(paste);
+
+ Replace cmd;
+ while (!replaceList.isEmpty()) {
+ cmd = replaceList.first();
+ replaceList.removeFirst();
+ doReplace(cmd);
+ }
+}
+
+void TextWriter::write(QString *s)
+{
+ string = s;
+ write_helper();
+ string = 0;
+}
+
+void TextWriter::write(QTextCursor *textCursor)
+{
+ cursor = textCursor;
+ write_helper();
+ cursor = 0;
+}
+
+void TextWriter::write_helper()
+{
+ if (cursor)
+ cursor->beginEditBlock();
+ {
+ Replace cmd;
+ while (!replaceList.isEmpty()) {
+ cmd = replaceList.first();
+ replaceList.removeFirst();
+ doReplace(cmd);
+ }
+ }
+ {
+ Move cmd;
+ while (!moveList.isEmpty()) {
+ cmd = moveList.first();
+ moveList.removeFirst();
+ doMove(cmd);
+ }
+ }
+ if (cursor)
+ cursor->endEditBlock();
+}
+
+QT_QML_END_NAMESPACE
diff --git a/src/declarative/qml/rewriter/textwriter_p.h b/src/declarative/qml/rewriter/textwriter_p.h
new file mode 100644
index 0000000000..c712626167
--- /dev/null
+++ b/src/declarative/qml/rewriter/textwriter_p.h
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TEXTWRITER_H
+#define TEXTWRITER_H
+
+#include <qdeclarativejsglobal_p.h>
+
+#include <QtCore/QString>
+#include <QtCore/QList>
+#include <QtGui/QTextCursor>
+
+QT_BEGIN_HEADER
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS {
+
+class TextWriter
+{
+ QString *string;
+ QTextCursor *cursor;
+
+ struct Replace {
+ int pos;
+ int length;
+ QString replacement;
+ };
+
+ QList<Replace> replaceList;
+
+ struct Move {
+ int pos;
+ int length;
+ int to;
+ };
+
+ QList<Move> moveList;
+
+ bool hasOverlap(int pos, int length);
+ bool hasMoveInto(int pos, int length);
+
+ void doReplace(const Replace &replace);
+ void doMove(const Move &move);
+
+ void write_helper();
+
+public:
+ TextWriter();
+
+ void replace(int pos, int length, const QString &replacement);
+ void move(int pos, int length, int to);
+
+ void write(QString *s);
+ void write(QTextCursor *textCursor);
+
+};
+
+} // end of namespace QDeclarativeJS
+
+QT_QML_END_NAMESPACE
+QT_END_HEADER
+
+#endif // TEXTWRITER_H
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
new file mode 100644
index 0000000000..20449d719a
--- /dev/null
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -0,0 +1,2746 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeanimation_p.h"
+#include "qdeclarativeanimation_p_p.h"
+
+#include "qdeclarativebehavior_p.h"
+#include "qdeclarativestateoperations_p.h"
+
+#include <qdeclarativepropertyvaluesource.h>
+#include <qdeclarative.h>
+#include <qdeclarativeinfo.h>
+#include <qdeclarativeexpression.h>
+#include <qdeclarativestringconverters_p.h>
+#include <qdeclarativeglobal_p.h>
+#include <qdeclarativemetatype_p.h>
+#include <qdeclarativevaluetype_p.h>
+#include <qdeclarativeproperty_p.h>
+
+#include <qvariant.h>
+#include <qcolor.h>
+#include <qfile.h>
+#include <QParallelAnimationGroup>
+#include <QSequentialAnimationGroup>
+#include <QtCore/qset.h>
+#include <QtCore/qrect.h>
+#include <QtCore/qpoint.h>
+#include <QtCore/qsize.h>
+#include <QtCore/qmath.h>
+
+#include <private/qvariantanimation_p.h>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \qmlclass Animation QDeclarativeAbstractAnimation
+ \since 4.7
+ \brief The Animation element is the base of all QML animations.
+
+ The Animation element cannot be used directly in a QML file. It exists
+ to provide a set of common properties and methods, available across all the
+ other animation types that inherit from it. Attempting to use the Animation
+ element directly will result in an error.
+*/
+
+/*!
+ \class QDeclarativeAbstractAnimation
+ \internal
+*/
+
+QDeclarativeAbstractAnimation::QDeclarativeAbstractAnimation(QObject *parent)
+: QObject(*(new QDeclarativeAbstractAnimationPrivate), parent)
+{
+}
+
+QDeclarativeAbstractAnimation::~QDeclarativeAbstractAnimation()
+{
+}
+
+QDeclarativeAbstractAnimation::QDeclarativeAbstractAnimation(QDeclarativeAbstractAnimationPrivate &dd, QObject *parent)
+: QObject(dd, parent)
+{
+}
+
+/*!
+ \qmlproperty bool Animation::running
+ This property holds whether the animation is currently running.
+
+ The \c running property can be set to declaratively control whether or not
+ an animation is running. The following example will animate a rectangle
+ whenever the \l MouseArea is pressed.
+
+ \code
+ Rectangle {
+ width: 100; height: 100
+ NumberAnimation on x {
+ running: myMouse.pressed
+ from: 0; to: 100
+ }
+ MouseArea { id: myMouse }
+ }
+ \endcode
+
+ Likewise, the \c running property can be read to determine if the animation
+ is running. In the following example the text element will indicate whether
+ or not the animation is running.
+
+ \code
+ NumberAnimation { id: myAnimation }
+ Text { text: myAnimation.running ? "Animation is running" : "Animation is not running" }
+ \endcode
+
+ Animations can also be started and stopped imperatively from JavaScript
+ using the \c start() and \c stop() methods.
+
+ By default, animations are not running. Though, when the animations are assigned to properties,
+ as property value sources, they are set to running by default.
+*/
+bool QDeclarativeAbstractAnimation::isRunning() const
+{
+ Q_D(const QDeclarativeAbstractAnimation);
+ return d->running;
+}
+
+//commence is called to start an animation when it is used as a
+//simple animation, and not as part of a transition
+void QDeclarativeAbstractAnimationPrivate::commence()
+{
+ Q_Q(QDeclarativeAbstractAnimation);
+
+ QDeclarativeStateActions actions;
+ QDeclarativeProperties properties;
+ q->transition(actions, properties, QDeclarativeAbstractAnimation::Forward);
+
+ q->qtAnimation()->start();
+ if (q->qtAnimation()->state() != QAbstractAnimation::Running) {
+ running = false;
+ emit q->completed();
+ }
+}
+
+QDeclarativeProperty QDeclarativeAbstractAnimationPrivate::createProperty(QObject *obj, const QString &str, QObject *infoObj)
+{
+ QDeclarativeProperty prop(obj, str, qmlContext(infoObj));
+ if (!prop.isValid()) {
+ qmlInfo(infoObj) << QDeclarativeAbstractAnimation::tr("Cannot animate non-existent property \"%1\"").arg(str);
+ return QDeclarativeProperty();
+ } else if (!prop.isWritable()) {
+ qmlInfo(infoObj) << QDeclarativeAbstractAnimation::tr("Cannot animate read-only property \"%1\"").arg(str);
+ return QDeclarativeProperty();
+ }
+ return prop;
+}
+
+void QDeclarativeAbstractAnimation::setRunning(bool r)
+{
+ Q_D(QDeclarativeAbstractAnimation);
+ if (!d->componentComplete) {
+ d->running = r;
+ if (r == false)
+ d->avoidPropertyValueSourceStart = true;
+ return;
+ }
+
+ if (d->running == r)
+ return;
+
+ if (d->group || d->disableUserControl) {
+ qWarning("QDeclarativeAbstractAnimation: setRunning() cannot be used on non-root animation nodes");
+ return;
+ }
+
+ d->running = r;
+ if (d->running) {
+ if (d->alwaysRunToEnd && d->repeat
+ && qtAnimation()->state() == QAbstractAnimation::Running) {
+ qtAnimation()->setLoopCount(-1);
+ }
+
+ if (!d->connectedTimeLine) {
+ QObject::connect(qtAnimation(), SIGNAL(finished()),
+ this, SLOT(timelineComplete()));
+ d->connectedTimeLine = true;
+ }
+ d->commence();
+ emit started();
+ } else {
+ if (d->alwaysRunToEnd) {
+ if (d->repeat)
+ qtAnimation()->setLoopCount(qtAnimation()->currentLoop()+1);
+ } else
+ qtAnimation()->stop();
+
+ emit completed();
+ }
+
+ emit runningChanged(d->running);
+}
+
+/*!
+ \qmlproperty bool Animation::paused
+ This property holds whether the animation is currently paused.
+
+ The \c paused property can be set to declaratively control whether or not
+ an animation is paused.
+
+ Animations can also be paused and resumed imperatively from JavaScript
+ using the \c pause() and \c resume() methods.
+
+ By default, animations are not paused.
+*/
+bool QDeclarativeAbstractAnimation::isPaused() const
+{
+ Q_D(const QDeclarativeAbstractAnimation);
+ return d->paused;
+}
+
+void QDeclarativeAbstractAnimation::setPaused(bool p)
+{
+ Q_D(QDeclarativeAbstractAnimation);
+ if (d->paused == p)
+ return;
+
+ if (d->group || d->disableUserControl) {
+ qWarning("QDeclarativeAbstractAnimation: setPaused() cannot be used on non-root animation nodes");
+ return;
+ }
+
+ d->paused = p;
+ if (d->paused)
+ qtAnimation()->pause();
+ else
+ qtAnimation()->resume();
+
+ emit pausedChanged(d->paused);
+}
+
+void QDeclarativeAbstractAnimation::classBegin()
+{
+ Q_D(QDeclarativeAbstractAnimation);
+ d->componentComplete = false;
+}
+
+void QDeclarativeAbstractAnimation::componentComplete()
+{
+ Q_D(QDeclarativeAbstractAnimation);
+ d->componentComplete = true;
+ if (d->running) {
+ d->running = false;
+ setRunning(true);
+ }
+}
+
+/*!
+ \qmlproperty bool Animation::alwaysRunToEnd
+ This property holds whether the animation should run to completion when it is stopped.
+
+ If this true the animation will complete its current iteration when it
+ is stopped - either by setting the \c running property to false, or by
+ calling the \c stop() method. The \c complete() method is not effected
+ by this value.
+
+ This behavior is most useful when the \c repeat property is set, as the
+ animation will finish playing normally but not restart.
+
+ By default, the alwaysRunToEnd property is not set.
+*/
+bool QDeclarativeAbstractAnimation::alwaysRunToEnd() const
+{
+ Q_D(const QDeclarativeAbstractAnimation);
+ return d->alwaysRunToEnd;
+}
+
+void QDeclarativeAbstractAnimation::setAlwaysRunToEnd(bool f)
+{
+ Q_D(QDeclarativeAbstractAnimation);
+ if (d->alwaysRunToEnd == f)
+ return;
+
+ d->alwaysRunToEnd = f;
+ emit alwaysRunToEndChanged(f);
+}
+
+/*!
+ \qmlproperty bool Animation::repeat
+ This property holds whether the animation should repeat.
+
+ If set, the animation will continuously repeat until it is explicitly
+ stopped - either by setting the \c running property to false, or by calling
+ the \c stop() method.
+
+ In the following example, the rectangle will spin indefinately.
+
+ \code
+ Rectangle {
+ NumberAnimation on rotation { running: true; repeat: true; from: 0 to: 360 }
+ }
+ \endcode
+*/
+bool QDeclarativeAbstractAnimation::repeat() const
+{
+ Q_D(const QDeclarativeAbstractAnimation);
+ return d->repeat;
+}
+
+void QDeclarativeAbstractAnimation::setRepeat(bool r)
+{
+ Q_D(QDeclarativeAbstractAnimation);
+ if (r == d->repeat)
+ return;
+
+ d->repeat = r;
+ int lc = r ? -1 : 1;
+ qtAnimation()->setLoopCount(lc);
+ emit repeatChanged(r);
+}
+
+int QDeclarativeAbstractAnimation::currentTime()
+{
+ return qtAnimation()->currentLoopTime();
+}
+
+void QDeclarativeAbstractAnimation::setCurrentTime(int time)
+{
+ qtAnimation()->setCurrentTime(time);
+}
+
+QDeclarativeAnimationGroup *QDeclarativeAbstractAnimation::group() const
+{
+ Q_D(const QDeclarativeAbstractAnimation);
+ return d->group;
+}
+
+void QDeclarativeAbstractAnimation::setGroup(QDeclarativeAnimationGroup *g)
+{
+ Q_D(QDeclarativeAbstractAnimation);
+ if (d->group == g)
+ return;
+ if (d->group)
+ static_cast<QDeclarativeAnimationGroupPrivate *>(d->group->d_func())->animations.removeAll(this);
+
+ d->group = g;
+
+ if (d->group && !static_cast<QDeclarativeAnimationGroupPrivate *>(d->group->d_func())->animations.contains(this))
+ static_cast<QDeclarativeAnimationGroupPrivate *>(d->group->d_func())->animations.append(this);
+
+ //if (g) //if removed from a group, then the group should no longer be the parent
+ setParent(g);
+}
+
+/*!
+ \qmlmethod Animation::start()
+ \brief Starts the animation.
+
+ If the animation is already running, calling this method has no effect. The
+ \c running property will be true following a call to \c start().
+*/
+void QDeclarativeAbstractAnimation::start()
+{
+ setRunning(true);
+}
+
+/*!
+ \qmlmethod Animation::pause()
+ \brief Pauses the animation.
+
+ If the animation is already paused, calling this method has no effect. The
+ \c paused property will be true following a call to \c pause().
+*/
+void QDeclarativeAbstractAnimation::pause()
+{
+ setPaused(true);
+}
+
+/*!
+ \qmlmethod Animation::resume()
+ \brief Resumes a paused animation.
+
+ If the animation is not paused, calling this method has no effect. The
+ \c paused property will be false following a call to \c resume().
+*/
+void QDeclarativeAbstractAnimation::resume()
+{
+ setPaused(false);
+}
+
+/*!
+ \qmlmethod Animation::stop()
+ \brief Stops the animation.
+
+ If the animation is not running, calling this method has no effect. The
+ \c running property will be false following a call to \c stop().
+
+ Normally \c stop() stops the animation immediately, and the animation has
+ no further influence on property values. In this example animation
+ \code
+ Rectangle {
+ NumberAnimation on x { from: 0; to: 100; duration: 500 }
+ }
+ \endcode
+ was stopped at time 250ms, the \c x property will have a value of 50.
+
+ However, if the \c alwaysRunToEnd property is set, the animation will
+ continue running until it completes and then stop. The \c running property
+ will still become false immediately.
+*/
+void QDeclarativeAbstractAnimation::stop()
+{
+ setRunning(false);
+}
+
+/*!
+ \qmlmethod Animation::restart()
+ \brief Restarts the animation.
+
+ This is a convenience method, and is equivalent to calling \c stop() and
+ then \c start().
+*/
+void QDeclarativeAbstractAnimation::restart()
+{
+ stop();
+ start();
+}
+
+/*!
+ \qmlmethod Animation::complete()
+ \brief Stops the animation, jumping to the final property values.
+
+ If the animation is not running, calling this method has no effect. The
+ \c running property will be false following a call to \c complete().
+
+ Unlike \c stop(), \c complete() immediately fast-forwards the animation to
+ its end. In the following example,
+ \code
+ Rectangle {
+ NumberAnimation on x { from: 0; to: 100; duration: 500 }
+ }
+ \endcode
+ calling \c stop() at time 250ms will result in the \c x property having
+ a value of 50, while calling \c complete() will set the \c x property to
+ 100, exactly as though the animation had played the whole way through.
+*/
+void QDeclarativeAbstractAnimation::complete()
+{
+ if (isRunning()) {
+ qtAnimation()->setCurrentTime(qtAnimation()->duration());
+ }
+}
+
+void QDeclarativeAbstractAnimation::setTarget(const QDeclarativeProperty &p)
+{
+ Q_D(QDeclarativeAbstractAnimation);
+ d->defaultProperty = p;
+
+ if (!d->avoidPropertyValueSourceStart)
+ setRunning(true);
+}
+
+/*
+ we rely on setTarget only being called when used as a value source
+ so this function allows us to do the same thing as setTarget without
+ that assumption
+*/
+void QDeclarativeAbstractAnimation::setDefaultTarget(const QDeclarativeProperty &p)
+{
+ Q_D(QDeclarativeAbstractAnimation);
+ d->defaultProperty = p;
+}
+
+/*
+ don't allow start/stop/pause/resume to be manually invoked,
+ because something else (like a Behavior) already has control
+ over the animation.
+*/
+void QDeclarativeAbstractAnimation::setDisableUserControl()
+{
+ Q_D(QDeclarativeAbstractAnimation);
+ d->disableUserControl = true;
+}
+
+void QDeclarativeAbstractAnimation::transition(QDeclarativeStateActions &actions,
+ QDeclarativeProperties &modified,
+ TransitionDirection direction)
+{
+ Q_UNUSED(actions);
+ Q_UNUSED(modified);
+ Q_UNUSED(direction);
+}
+
+void QDeclarativeAbstractAnimation::timelineComplete()
+{
+ Q_D(QDeclarativeAbstractAnimation);
+ setRunning(false);
+ if (d->alwaysRunToEnd && d->repeat) {
+ qtAnimation()->setLoopCount(-1);
+ }
+}
+
+/*!
+ \qmlclass PauseAnimation QDeclarativePauseAnimation
+ \since 4.7
+ \inherits Animation
+ \brief The PauseAnimation element provides a pause for an animation.
+
+ When used in a SequentialAnimation, PauseAnimation is a step when
+ nothing happens, for a specified duration.
+
+ A 500ms animation sequence, with a 100ms pause between two animations:
+ \code
+ SequentialAnimation {
+ NumberAnimation { ... duration: 200 }
+ PauseAnimation { duration: 100 }
+ NumberAnimation { ... duration: 200 }
+ }
+ \endcode
+*/
+/*!
+ \internal
+ \class QDeclarativePauseAnimation
+*/
+
+
+QDeclarativePauseAnimation::QDeclarativePauseAnimation(QObject *parent)
+: QDeclarativeAbstractAnimation(*(new QDeclarativePauseAnimationPrivate), parent)
+{
+ Q_D(QDeclarativePauseAnimation);
+ d->init();
+}
+
+QDeclarativePauseAnimation::~QDeclarativePauseAnimation()
+{
+}
+
+void QDeclarativePauseAnimationPrivate::init()
+{
+ Q_Q(QDeclarativePauseAnimation);
+ pa = new QPauseAnimation;
+ QDeclarative_setParent_noEvent(pa, q);
+}
+
+/*!
+ \qmlproperty int PauseAnimation::duration
+ This property holds the duration of the pause in milliseconds
+
+ The default value is 250.
+*/
+int QDeclarativePauseAnimation::duration() const
+{
+ Q_D(const QDeclarativePauseAnimation);
+ return d->pa->duration();
+}
+
+void QDeclarativePauseAnimation::setDuration(int duration)
+{
+ if (duration < 0) {
+ qmlInfo(this) << tr("Cannot set a duration of < 0");
+ return;
+ }
+
+ Q_D(QDeclarativePauseAnimation);
+ if (d->pa->duration() == duration)
+ return;
+ d->pa->setDuration(duration);
+ emit durationChanged(duration);
+}
+
+QAbstractAnimation *QDeclarativePauseAnimation::qtAnimation()
+{
+ Q_D(QDeclarativePauseAnimation);
+ return d->pa;
+}
+
+/*!
+ \qmlclass ColorAnimation QDeclarativeColorAnimation
+ \since 4.7
+ \inherits PropertyAnimation
+ \brief The ColorAnimation element allows you to animate color changes.
+
+ \code
+ ColorAnimation { from: "white"; to: "#c0c0c0"; duration: 100 }
+ \endcode
+
+ When used in a transition, ColorAnimation will by default animate
+ all properties of type color that are changing. If a property or properties
+ are explicitly set for the animation, then those will be used instead.
+*/
+/*!
+ \internal
+ \class QDeclarativeColorAnimation
+*/
+
+QDeclarativeColorAnimation::QDeclarativeColorAnimation(QObject *parent)
+: QDeclarativePropertyAnimation(parent)
+{
+ Q_D(QDeclarativePropertyAnimation);
+ d->interpolatorType = QMetaType::QColor;
+ d->interpolator = QVariantAnimationPrivate::getInterpolator(d->interpolatorType);
+ d->defaultToInterpolatorType = true;
+}
+
+QDeclarativeColorAnimation::~QDeclarativeColorAnimation()
+{
+}
+
+/*!
+ \qmlproperty color ColorAnimation::from
+ This property holds the starting color.
+*/
+QColor QDeclarativeColorAnimation::from() const
+{
+ Q_D(const QDeclarativePropertyAnimation);
+ return d->from.value<QColor>();
+}
+
+void QDeclarativeColorAnimation::setFrom(const QColor &f)
+{
+ QDeclarativePropertyAnimation::setFrom(f);
+}
+
+/*!
+ \qmlproperty color ColorAnimation::to
+ This property holds the ending color.
+*/
+QColor QDeclarativeColorAnimation::to() const
+{
+ Q_D(const QDeclarativePropertyAnimation);
+ return d->to.value<QColor>();
+}
+
+void QDeclarativeColorAnimation::setTo(const QColor &t)
+{
+ QDeclarativePropertyAnimation::setTo(t);
+}
+
+
+
+/*!
+ \qmlclass ScriptAction QDeclarativeScriptAction
+ \since 4.7
+ \inherits Animation
+ \brief The ScriptAction element allows scripts to be run during an animation.
+
+*/
+/*!
+ \internal
+ \class QDeclarativeScriptAction
+*/
+QDeclarativeScriptAction::QDeclarativeScriptAction(QObject *parent)
+ :QDeclarativeAbstractAnimation(*(new QDeclarativeScriptActionPrivate), parent)
+{
+ Q_D(QDeclarativeScriptAction);
+ d->init();
+}
+
+QDeclarativeScriptAction::~QDeclarativeScriptAction()
+{
+}
+
+void QDeclarativeScriptActionPrivate::init()
+{
+ Q_Q(QDeclarativeScriptAction);
+ rsa = new QActionAnimation(&proxy);
+ QDeclarative_setParent_noEvent(rsa, q);
+}
+
+/*!
+ \qmlproperty script ScriptAction::script
+ This property holds the script to run.
+*/
+QDeclarativeScriptString QDeclarativeScriptAction::script() const
+{
+ Q_D(const QDeclarativeScriptAction);
+ return d->script;
+}
+
+void QDeclarativeScriptAction::setScript(const QDeclarativeScriptString &script)
+{
+ Q_D(QDeclarativeScriptAction);
+ d->script = script;
+}
+
+/*!
+ \qmlproperty QString ScriptAction::stateChangeScriptName
+ This property holds the the name of the StateChangeScript to run.
+
+ This property is only valid when ScriptAction is used as part of a transition.
+ If both script and stateChangeScriptName are set, stateChangeScriptName will be used.
+*/
+QString QDeclarativeScriptAction::stateChangeScriptName() const
+{
+ Q_D(const QDeclarativeScriptAction);
+ return d->name;
+}
+
+void QDeclarativeScriptAction::setStateChangeScriptName(const QString &name)
+{
+ Q_D(QDeclarativeScriptAction);
+ d->name = name;
+}
+
+void QDeclarativeScriptActionPrivate::execute()
+{
+ QDeclarativeScriptString scriptStr = hasRunScriptScript ? runScriptScript : script;
+
+ const QString &str = scriptStr.script();
+ if (!str.isEmpty()) {
+ QDeclarativeExpression expr(scriptStr.context(), str, scriptStr.scopeObject());
+ expr.value();
+ }
+}
+
+void QDeclarativeScriptAction::transition(QDeclarativeStateActions &actions,
+ QDeclarativeProperties &modified,
+ TransitionDirection direction)
+{
+ Q_D(QDeclarativeScriptAction);
+ Q_UNUSED(modified);
+ Q_UNUSED(direction);
+
+ d->hasRunScriptScript = false;
+ for (int ii = 0; ii < actions.count(); ++ii) {
+ QDeclarativeAction &action = actions[ii];
+
+ if (action.event && action.event->typeName() == QLatin1String("StateChangeScript")
+ && static_cast<QDeclarativeStateChangeScript*>(action.event)->name() == d->name) {
+ //### how should we handle reverse direction?
+ d->runScriptScript = static_cast<QDeclarativeStateChangeScript*>(action.event)->script();
+ d->hasRunScriptScript = true;
+ action.actionDone = true;
+ break; //assumes names are unique
+ }
+ }
+}
+
+QAbstractAnimation *QDeclarativeScriptAction::qtAnimation()
+{
+ Q_D(QDeclarativeScriptAction);
+ return d->rsa;
+}
+
+
+
+/*!
+ \qmlclass PropertyAction QDeclarativePropertyAction
+ \since 4.7
+ \inherits Animation
+ \brief The PropertyAction element allows immediate property changes during animation.
+
+ Explicitly set \c theimage.smooth=true during a transition:
+ \code
+ PropertyAction { target: theimage; property: "smooth"; value: true }
+ \endcode
+
+ Set \c thewebview.url to the value set for the destination state:
+ \code
+ PropertyAction { target: thewebview; property: "url" }
+ \endcode
+
+ The PropertyAction is immediate -
+ the target property is not animated to the selected value in any way.
+*/
+/*!
+ \internal
+ \class QDeclarativePropertyAction
+*/
+QDeclarativePropertyAction::QDeclarativePropertyAction(QObject *parent)
+: QDeclarativeAbstractAnimation(*(new QDeclarativePropertyActionPrivate), parent)
+{
+ Q_D(QDeclarativePropertyAction);
+ d->init();
+}
+
+QDeclarativePropertyAction::~QDeclarativePropertyAction()
+{
+}
+
+void QDeclarativePropertyActionPrivate::init()
+{
+ Q_Q(QDeclarativePropertyAction);
+ spa = new QActionAnimation;
+ QDeclarative_setParent_noEvent(spa, q);
+}
+
+/*!
+ \qmlproperty Object PropertyAction::target
+ This property holds an explicit target object to animate.
+
+ The exact effect of the \c target property depends on how the animation
+ is being used. Refer to the \l animation documentation for details.
+*/
+
+QObject *QDeclarativePropertyAction::target() const
+{
+ Q_D(const QDeclarativePropertyAction);
+ return d->target;
+}
+
+void QDeclarativePropertyAction::setTarget(QObject *o)
+{
+ Q_D(QDeclarativePropertyAction);
+ if (d->target == o)
+ return;
+ d->target = o;
+ emit targetChanged(d->target, d->propertyName);
+}
+
+QString QDeclarativePropertyAction::property() const
+{
+ Q_D(const QDeclarativePropertyAction);
+ return d->propertyName;
+}
+
+void QDeclarativePropertyAction::setProperty(const QString &n)
+{
+ Q_D(QDeclarativePropertyAction);
+ if (d->propertyName == n)
+ return;
+ d->propertyName = n;
+ emit targetChanged(d->target, d->propertyName);
+}
+
+/*!
+ \qmlproperty list<Object> PropertyAction::targets
+ \qmlproperty string PropertyAction::property
+ \qmlproperty string PropertyAction::properties
+ \qmlproperty Object PropertyAction::target
+
+ These properties are used as a set to determine which properties should be
+ affected by this action.
+
+ The details of how these properties are interpreted in different situations
+ is covered in the \l{PropertyAnimation::properties}{corresponding} PropertyAnimation
+ documentation.
+
+ \sa exclude
+*/
+QString QDeclarativePropertyAction::properties() const
+{
+ Q_D(const QDeclarativePropertyAction);
+ return d->properties;
+}
+
+void QDeclarativePropertyAction::setProperties(const QString &p)
+{
+ Q_D(QDeclarativePropertyAction);
+ if (d->properties == p)
+ return;
+ d->properties = p;
+ emit propertiesChanged(p);
+}
+
+QDeclarativeListProperty<QObject> QDeclarativePropertyAction::targets()
+{
+ Q_D(QDeclarativePropertyAction);
+ return QDeclarativeListProperty<QObject>(this, d->targets);
+}
+
+/*!
+ \qmlproperty list<Object> PropertyAction::exclude
+ This property holds the objects not to be affected by this animation.
+
+ \sa targets
+*/
+QDeclarativeListProperty<QObject> QDeclarativePropertyAction::exclude()
+{
+ Q_D(QDeclarativePropertyAction);
+ return QDeclarativeListProperty<QObject>(this, d->exclude);
+}
+
+/*!
+ \qmlproperty any PropertyAction::value
+ This property holds the value to be set on the property.
+ If not set, then the value defined for the end state of the transition.
+*/
+QVariant QDeclarativePropertyAction::value() const
+{
+ Q_D(const QDeclarativePropertyAction);
+ return d->value;
+}
+
+void QDeclarativePropertyAction::setValue(const QVariant &v)
+{
+ Q_D(QDeclarativePropertyAction);
+ if (d->value.isNull || d->value != v) {
+ d->value = v;
+ emit valueChanged(v);
+ }
+}
+
+QAbstractAnimation *QDeclarativePropertyAction::qtAnimation()
+{
+ Q_D(QDeclarativePropertyAction);
+ return d->spa;
+}
+
+void QDeclarativePropertyAction::transition(QDeclarativeStateActions &actions,
+ QDeclarativeProperties &modified,
+ TransitionDirection direction)
+{
+ Q_D(QDeclarativePropertyAction);
+ Q_UNUSED(direction);
+
+ struct QDeclarativeSetPropertyAnimationAction : public QAbstractAnimationAction
+ {
+ QDeclarativeStateActions actions;
+ virtual void doAction()
+ {
+ for (int ii = 0; ii < actions.count(); ++ii) {
+ const QDeclarativeAction &action = actions.at(ii);
+ QDeclarativePropertyPrivate::write(action.property, action.toValue, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
+ }
+ }
+ };
+
+ QStringList props = d->properties.isEmpty() ? QStringList() : d->properties.split(QLatin1Char(','));
+ for (int ii = 0; ii < props.count(); ++ii)
+ props[ii] = props.at(ii).trimmed();
+ if (!d->propertyName.isEmpty())
+ props << d->propertyName;
+
+ QList<QObject*> targets = d->targets;
+ if (d->target)
+ targets.append(d->target);
+
+ bool hasSelectors = !props.isEmpty() || !targets.isEmpty() || !d->exclude.isEmpty();
+
+ if (d->defaultProperty.isValid() && !hasSelectors) {
+ props << d->defaultProperty.name();
+ targets << d->defaultProperty.object();
+ }
+
+ QDeclarativeSetPropertyAnimationAction *data = new QDeclarativeSetPropertyAnimationAction;
+
+ bool hasExplicit = false;
+ //an explicit animation has been specified
+ if (d->value.isValid()) {
+ for (int i = 0; i < props.count(); ++i) {
+ for (int j = 0; j < targets.count(); ++j) {
+ QDeclarativeAction myAction;
+ myAction.property = d->createProperty(targets.at(j), props.at(i), this);
+ if (myAction.property.isValid()) {
+ myAction.toValue = d->value;
+ QDeclarativePropertyAnimationPrivate::convertVariant(myAction.toValue, myAction.property.propertyType());
+ data->actions << myAction;
+ hasExplicit = true;
+ for (int ii = 0; ii < actions.count(); ++ii) {
+ QDeclarativeAction &action = actions[ii];
+ if (action.property.object() == myAction.property.object() &&
+ myAction.property.name() == action.property.name()) {
+ modified << action.property;
+ break; //### any chance there could be multiples?
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (!hasExplicit)
+ for (int ii = 0; ii < actions.count(); ++ii) {
+ QDeclarativeAction &action = actions[ii];
+
+ QObject *obj = action.property.object();
+ QString propertyName = action.property.name();
+ QObject *sObj = action.specifiedObject;
+ QString sPropertyName = action.specifiedProperty;
+ bool same = (obj == sObj);
+
+ if ((targets.isEmpty() || targets.contains(obj) || (!same && targets.contains(sObj))) &&
+ (!d->exclude.contains(obj)) && (same || (!d->exclude.contains(sObj))) &&
+ (props.contains(propertyName) || (!same && props.contains(sPropertyName)))) {
+ QDeclarativeAction myAction = action;
+
+ if (d->value.isValid())
+ myAction.toValue = d->value;
+ QDeclarativePropertyAnimationPrivate::convertVariant(myAction.toValue, myAction.property.propertyType());
+
+ modified << action.property;
+ data->actions << myAction;
+ action.fromValue = myAction.toValue;
+ }
+ }
+
+ if (data->actions.count()) {
+ d->spa->setAnimAction(data, QAbstractAnimation::DeleteWhenStopped);
+ } else {
+ delete data;
+ }
+}
+
+
+
+/*!
+ \qmlclass ParentAction QDeclarativeParentAction
+ \since 4.7
+ \inherits Animation
+ \brief The ParentAction element allows parent changes during animation.
+
+ ParentAction provides a way to specify at what point in a Transition a ParentChange should
+ occur.
+ \qml
+ State {
+ ParentChange {
+ target: myItem
+ parent: newParent
+ }
+ }
+ Transition {
+ SequentialAnimation {
+ PropertyAnimation { ... }
+ ParentAction {} //reparent myItem now
+ PropertyAnimation { ... }
+ }
+ }
+ \endqml
+
+ It also provides a way to explicitly reparent an item during an animation.
+ \qml
+ SequentialAnimation {
+ ParentAction { target: myItem; parent: newParent }
+ PropertyAnimation {}
+ }
+ \endqml
+
+ The ParentAction is immediate - it is not animated in any way.
+*/
+
+QDeclarativeParentAction::QDeclarativeParentAction(QObject *parent)
+: QDeclarativeAbstractAnimation(*(new QDeclarativeParentActionPrivate), parent)
+{
+ Q_D(QDeclarativeParentAction);
+ d->init();
+}
+
+QDeclarativeParentAction::~QDeclarativeParentAction()
+{
+}
+
+void QDeclarativeParentActionPrivate::init()
+{
+ Q_Q(QDeclarativeParentAction);
+ cpa = new QActionAnimation;
+ QDeclarative_setParent_noEvent(cpa, q);
+}
+
+/*!
+ \qmlproperty Item ParentAction::target
+
+ This property holds a target item to reparent.
+
+ In the following example, \c myItem will be reparented by the ParentAction, while
+ \c myOtherItem will not.
+ \qml
+ State {
+ ParentChange {
+ target: myItem
+ parent: newParent
+ }
+ ParentChange {
+ target: myOtherItem
+ parent: otherNewParent
+ }
+ }
+ Transition {
+ SequentialAnimation {
+ PropertyAnimation { ... }
+ ParentAction { target: myItem }
+ PropertyAnimation { ... }
+ }
+ }
+ \endqml
+
+ */
+QDeclarativeItem *QDeclarativeParentAction::object() const
+{
+ Q_D(const QDeclarativeParentAction);
+ return d->pcTarget;
+}
+
+void QDeclarativeParentAction::setObject(QDeclarativeItem *target)
+{
+ Q_D(QDeclarativeParentAction);
+ d->pcTarget = target;
+}
+
+/*!
+ \qmlproperty Item ParentAction::parent
+
+ The item to reparent to (i.e. the new parent).
+ */
+QDeclarativeItem *QDeclarativeParentAction::parent() const
+{
+ Q_D(const QDeclarativeParentAction);
+ return d->pcParent;
+}
+
+void QDeclarativeParentAction::setParent(QDeclarativeItem *parent)
+{
+ Q_D(QDeclarativeParentAction);
+ d->pcParent = parent;
+}
+
+void QDeclarativeParentActionPrivate::doAction()
+{
+ QDeclarativeParentChange pc;
+ pc.setObject(pcTarget);
+ pc.setParent(pcParent);
+ pc.execute();
+}
+
+QAbstractAnimation *QDeclarativeParentAction::qtAnimation()
+{
+ Q_D(QDeclarativeParentAction);
+ return d->cpa;
+}
+
+void QDeclarativeParentAction::transition(QDeclarativeStateActions &actions,
+ QDeclarativeProperties &modified,
+ TransitionDirection direction)
+{
+ Q_D(QDeclarativeParentAction);
+ Q_UNUSED(modified);
+ Q_UNUSED(direction);
+
+ struct QDeclarativeParentActionData : public QAbstractAnimationAction
+ {
+ QDeclarativeParentActionData(): pc(0) {}
+ ~QDeclarativeParentActionData() { delete pc; }
+
+ QDeclarativeStateActions actions;
+ bool reverse;
+ QDeclarativeParentChange *pc;
+ virtual void doAction()
+ {
+ for (int ii = 0; ii < actions.count(); ++ii) {
+ const QDeclarativeAction &action = actions.at(ii);
+ if (reverse)
+ action.event->reverse();
+ else
+ action.event->execute();
+ }
+ }
+ };
+
+ QDeclarativeParentActionData *data = new QDeclarativeParentActionData;
+
+ //### need to correctly handle modified/done
+
+ bool hasExplicit = false;
+ if (d->pcTarget && d->pcParent) {
+ data->reverse = false;
+ QDeclarativeAction myAction;
+ QDeclarativeParentChange *pc = new QDeclarativeParentChange;
+ pc->setObject(d->pcTarget);
+ pc->setParent(d->pcParent);
+ myAction.event = pc;
+ data->pc = pc;
+ data->actions << myAction;
+ hasExplicit = true;
+ }
+
+ if (!hasExplicit)
+ for (int ii = 0; ii < actions.count(); ++ii) {
+ QDeclarativeAction &action = actions[ii];
+
+ if (action.event && action.event->typeName() == QLatin1String("ParentChange")
+ && (!d->pcTarget || static_cast<QDeclarativeParentChange*>(action.event)->object() == d->pcTarget)) {
+ QDeclarativeAction myAction = action;
+ data->reverse = action.reverseEvent;
+ //### this logic differs from PropertyAnimation
+ // (probably a result of modified vs. done)
+ if (d->pcParent) {
+ //### should we disallow this case?
+ QDeclarativeParentChange *pc = new QDeclarativeParentChange;
+ pc->setObject(d->pcTarget);
+ pc->setParent(static_cast<QDeclarativeParentChange*>(action.event)->parent());
+ myAction.event = pc;
+ data->pc = pc;
+ data->actions << myAction;
+ break; //only match one
+ } else {
+ action.actionDone = true;
+ data->actions << myAction;
+ }
+ }
+ }
+
+ if (data->actions.count()) {
+ d->cpa->setAnimAction(data, QAbstractAnimation::DeleteWhenStopped);
+ } else {
+ delete data;
+ }
+}
+
+
+
+/*!
+ \qmlclass NumberAnimation QDeclarativeNumberAnimation
+ \since 4.7
+ \inherits PropertyAnimation
+ \brief The NumberAnimation element allows you to animate changes in properties of type qreal.
+
+ Animate a set of properties over 200ms, from their values in the start state to
+ their values in the end state of the transition:
+ \code
+ NumberAnimation { properties: "x,y,scale"; duration: 200 }
+ \endcode
+*/
+
+/*!
+ \internal
+ \class QDeclarativeNumberAnimation
+*/
+
+QDeclarativeNumberAnimation::QDeclarativeNumberAnimation(QObject *parent)
+: QDeclarativePropertyAnimation(parent)
+{
+ Q_D(QDeclarativePropertyAnimation);
+ d->interpolatorType = QMetaType::QReal;
+ d->interpolator = QVariantAnimationPrivate::getInterpolator(d->interpolatorType);
+}
+
+QDeclarativeNumberAnimation::~QDeclarativeNumberAnimation()
+{
+}
+
+/*!
+ \qmlproperty real NumberAnimation::from
+ This property holds the starting value.
+ If not set, then the value defined in the start state of the transition.
+*/
+qreal QDeclarativeNumberAnimation::from() const
+{
+ Q_D(const QDeclarativePropertyAnimation);
+ return d->from.toReal();
+}
+
+void QDeclarativeNumberAnimation::setFrom(qreal f)
+{
+ QDeclarativePropertyAnimation::setFrom(f);
+}
+
+/*!
+ \qmlproperty real NumberAnimation::to
+ This property holds the ending value.
+ If not set, then the value defined in the end state of the transition or Behavior.
+*/
+qreal QDeclarativeNumberAnimation::to() const
+{
+ Q_D(const QDeclarativePropertyAnimation);
+ return d->to.toReal();
+}
+
+void QDeclarativeNumberAnimation::setTo(qreal t)
+{
+ QDeclarativePropertyAnimation::setTo(t);
+}
+
+
+
+/*!
+ \qmlclass Vector3dAnimation QDeclarativeVector3dAnimation
+ \since 4.7
+ \inherits PropertyAnimation
+ \brief The Vector3dAnimation element allows you to animate changes in properties of type QVector3d.
+*/
+
+/*!
+ \internal
+ \class QDeclarativeVector3dAnimation
+*/
+
+QDeclarativeVector3dAnimation::QDeclarativeVector3dAnimation(QObject *parent)
+: QDeclarativePropertyAnimation(parent)
+{
+ Q_D(QDeclarativePropertyAnimation);
+ d->interpolatorType = QMetaType::QVector3D;
+ d->interpolator = QVariantAnimationPrivate::getInterpolator(d->interpolatorType);
+ d->defaultToInterpolatorType = true;
+}
+
+QDeclarativeVector3dAnimation::~QDeclarativeVector3dAnimation()
+{
+}
+
+/*!
+ \qmlproperty real Vector3dAnimation::from
+ This property holds the starting value.
+ If not set, then the value defined in the start state of the transition.
+*/
+QVector3D QDeclarativeVector3dAnimation::from() const
+{
+ Q_D(const QDeclarativePropertyAnimation);
+ return d->from.value<QVector3D>();
+}
+
+void QDeclarativeVector3dAnimation::setFrom(QVector3D f)
+{
+ QDeclarativePropertyAnimation::setFrom(f);
+}
+
+/*!
+ \qmlproperty real Vector3dAnimation::to
+ This property holds the ending value.
+ If not set, then the value defined in the end state of the transition or Behavior.
+*/
+QVector3D QDeclarativeVector3dAnimation::to() const
+{
+ Q_D(const QDeclarativePropertyAnimation);
+ return d->to.value<QVector3D>();
+}
+
+void QDeclarativeVector3dAnimation::setTo(QVector3D t)
+{
+ QDeclarativePropertyAnimation::setTo(t);
+}
+
+
+
+/*!
+ \qmlclass RotationAnimation QDeclarativeRotationAnimation
+ \since 4.7
+ \inherits PropertyAnimation
+ \brief The RotationAnimation element allows you to animate rotations.
+
+ RotationAnimation is a specialized PropertyAnimation that gives control
+ over the direction of rotation. By default, it will rotate
+ via the shortest path; for example, a rotation from 20 to 340 degrees will
+ rotation 40 degrees counterclockwise.
+
+ When used in a transition RotationAnimation will rotate all
+ properties named "rotation" or "angle". You can override this by providing
+ your own properties via \c properties or \c property.
+
+ In the following example we use RotationAnimation to animate the rotation
+ between states via the shortest path.
+ \qml
+ states: {
+ State { name: "180"; PropertyChanges { target: myItem; rotation: 180 } }
+ State { name: "90"; PropertyChanges { target: myItem; rotation: 90 } }
+ State { name: "-90"; PropertyChanges { target: myItem; rotation: -90 } }
+ }
+ transition: Transition {
+ RotationAnimation { }
+ }
+ \endqml
+*/
+
+/*!
+ \internal
+ \class QDeclarativeRotationAnimation
+*/
+
+QVariant _q_interpolateShortestRotation(qreal &f, qreal &t, qreal progress)
+{
+ qreal newt = t;
+ qreal diff = t-f;
+ while(diff > 180.0){
+ newt -= 360.0;
+ diff -= 360.0;
+ }
+ while(diff < -180.0){
+ newt += 360.0;
+ diff += 360.0;
+ }
+ return QVariant(f + (newt - f) * progress);
+}
+
+QVariant _q_interpolateClockwiseRotation(qreal &f, qreal &t, qreal progress)
+{
+ qreal newt = t;
+ qreal diff = t-f;
+ while(diff < 0.0){
+ newt += 360.0;
+ diff += 360.0;
+ }
+ return QVariant(f + (newt - f) * progress);
+}
+
+QVariant _q_interpolateCounterclockwiseRotation(qreal &f, qreal &t, qreal progress)
+{
+ qreal newt = t;
+ qreal diff = t-f;
+ while(diff > 0.0){
+ newt -= 360.0;
+ diff -= 360.0;
+ }
+ return QVariant(f + (newt - f) * progress);
+}
+
+QDeclarativeRotationAnimation::QDeclarativeRotationAnimation(QObject *parent)
+: QDeclarativePropertyAnimation(*(new QDeclarativeRotationAnimationPrivate), parent)
+{
+ Q_D(QDeclarativeRotationAnimation);
+ d->interpolatorType = QMetaType::QReal;
+ d->interpolator = reinterpret_cast<QVariantAnimation::Interpolator>(&_q_interpolateShortestRotation);
+ d->defaultProperties = QLatin1String("rotation,angle");
+}
+
+QDeclarativeRotationAnimation::~QDeclarativeRotationAnimation()
+{
+}
+
+/*!
+ \qmlproperty real RotationAnimation::from
+ This property holds the starting value.
+ If not set, then the value defined in the start state of the transition.
+*/
+qreal QDeclarativeRotationAnimation::from() const
+{
+ Q_D(const QDeclarativeRotationAnimation);
+ return d->from.toReal();
+}
+
+void QDeclarativeRotationAnimation::setFrom(qreal f)
+{
+ QDeclarativePropertyAnimation::setFrom(f);
+}
+
+/*!
+ \qmlproperty real RotationAnimation::to
+ This property holds the ending value.
+ If not set, then the value defined in the end state of the transition or Behavior.
+*/
+qreal QDeclarativeRotationAnimation::to() const
+{
+ Q_D(const QDeclarativeRotationAnimation);
+ return d->to.toReal();
+}
+
+void QDeclarativeRotationAnimation::setTo(qreal t)
+{
+ QDeclarativePropertyAnimation::setTo(t);
+}
+
+/*!
+ \qmlproperty enum RotationAnimation::direction
+ The direction in which to rotate.
+ Possible values are Numerical, Clockwise, Counterclockwise,
+ or Shortest.
+
+ \table
+ \row
+ \o Numerical
+ \o Rotate by linearly interpolating between the two numbers.
+ A rotation from 10 to 350 will rotate 340 degrees clockwise.
+ \row
+ \o Clockwise
+ \o Rotate clockwise between the two values
+ \row
+ \o Counterclockwise
+ \o Rotate counterclockwise between the two values
+ \row
+ \o Shortest
+ \o Rotate in the direction that produces the shortest animation path.
+ A rotation from 10 to 350 will rotate 20 degrees counterclockwise.
+ \endtable
+
+ The default direction is Shortest.
+*/
+QDeclarativeRotationAnimation::RotationDirection QDeclarativeRotationAnimation::direction() const
+{
+ Q_D(const QDeclarativeRotationAnimation);
+ return d->direction;
+}
+
+void QDeclarativeRotationAnimation::setDirection(QDeclarativeRotationAnimation::RotationDirection direction)
+{
+ Q_D(QDeclarativeRotationAnimation);
+ if (d->direction == direction)
+ return;
+
+ d->direction = direction;
+ switch(d->direction) {
+ case Clockwise:
+ d->interpolator = reinterpret_cast<QVariantAnimation::Interpolator>(&_q_interpolateClockwiseRotation);
+ break;
+ case Counterclockwise:
+ d->interpolator = reinterpret_cast<QVariantAnimation::Interpolator>(&_q_interpolateCounterclockwiseRotation);
+ break;
+ case Shortest:
+ d->interpolator = reinterpret_cast<QVariantAnimation::Interpolator>(&_q_interpolateShortestRotation);
+ break;
+ default:
+ d->interpolator = QVariantAnimationPrivate::getInterpolator(d->interpolatorType);
+ break;
+ }
+
+ emit directionChanged();
+}
+
+
+
+QDeclarativeAnimationGroup::QDeclarativeAnimationGroup(QObject *parent)
+: QDeclarativeAbstractAnimation(*(new QDeclarativeAnimationGroupPrivate), parent)
+{
+}
+
+QDeclarativeAnimationGroup::QDeclarativeAnimationGroup(QDeclarativeAnimationGroupPrivate &dd, QObject *parent)
+ : QDeclarativeAbstractAnimation(dd, parent)
+{
+}
+
+void QDeclarativeAnimationGroupPrivate::append_animation(QDeclarativeListProperty<QDeclarativeAbstractAnimation> *list, QDeclarativeAbstractAnimation *a)
+{
+ QDeclarativeAnimationGroup *q = qobject_cast<QDeclarativeAnimationGroup *>(list->object);
+ if (q) {
+ q->d_func()->animations.append(a);
+ a->setGroup(q);
+ q->d_func()->ag->addAnimation(a->qtAnimation());
+ }
+}
+
+void QDeclarativeAnimationGroupPrivate::clear_animation(QDeclarativeListProperty<QDeclarativeAbstractAnimation> *list)
+{
+ QDeclarativeAnimationGroup *q = qobject_cast<QDeclarativeAnimationGroup *>(list->object);
+ if (q) {
+ for (int i = 0; i < q->d_func()->animations.count(); ++i)
+ q->d_func()->animations.at(i)->setGroup(0);
+ q->d_func()->animations.clear();
+ }
+}
+
+QDeclarativeAnimationGroup::~QDeclarativeAnimationGroup()
+{
+}
+
+QDeclarativeListProperty<QDeclarativeAbstractAnimation> QDeclarativeAnimationGroup::animations()
+{
+ Q_D(QDeclarativeAnimationGroup);
+ QDeclarativeListProperty<QDeclarativeAbstractAnimation> list(this, d->animations);
+ list.append = &QDeclarativeAnimationGroupPrivate::append_animation;
+ list.clear = &QDeclarativeAnimationGroupPrivate::clear_animation;
+ return list;
+}
+
+/*!
+ \qmlclass SequentialAnimation QDeclarativeSequentialAnimation
+ \since 4.7
+ \inherits Animation
+ \brief The SequentialAnimation element allows you to run animations sequentially.
+
+ Animations controlled in SequentialAnimation will be run one after the other.
+
+ The following example chains two numeric animations together. The \c MyItem
+ object will animate from its current x position to 100, and then back to 0.
+
+ \code
+ SequentialAnimation {
+ NumberAnimation { target: MyItem; property: "x"; to: 100 }
+ NumberAnimation { target: MyItem; property: "x"; to: 0 }
+ }
+ \endcode
+
+ \sa ParallelAnimation
+*/
+
+QDeclarativeSequentialAnimation::QDeclarativeSequentialAnimation(QObject *parent) :
+ QDeclarativeAnimationGroup(parent)
+{
+ Q_D(QDeclarativeAnimationGroup);
+ d->ag = new QSequentialAnimationGroup;
+ QDeclarative_setParent_noEvent(d->ag, this);
+}
+
+QDeclarativeSequentialAnimation::~QDeclarativeSequentialAnimation()
+{
+}
+
+QAbstractAnimation *QDeclarativeSequentialAnimation::qtAnimation()
+{
+ Q_D(QDeclarativeAnimationGroup);
+ return d->ag;
+}
+
+void QDeclarativeSequentialAnimation::transition(QDeclarativeStateActions &actions,
+ QDeclarativeProperties &modified,
+ TransitionDirection direction)
+{
+ Q_D(QDeclarativeAnimationGroup);
+
+ int inc = 1;
+ int from = 0;
+ if (direction == Backward) {
+ inc = -1;
+ from = d->animations.count() - 1;
+ }
+
+ bool valid = d->defaultProperty.isValid();
+ for (int ii = from; ii < d->animations.count() && ii >= 0; ii += inc) {
+ if (valid)
+ d->animations.at(ii)->setDefaultTarget(d->defaultProperty);
+ d->animations.at(ii)->transition(actions, modified, direction);
+ }
+}
+
+
+
+/*!
+ \qmlclass ParallelAnimation QDeclarativeParallelAnimation
+ \since 4.7
+ \inherits Animation
+ \brief The ParallelAnimation element allows you to run animations in parallel.
+
+ Animations contained in ParallelAnimation will be run at the same time.
+
+ The following animation demonstrates animating the \c MyItem item
+ to (100,100) by animating the x and y properties in parallel.
+
+ \code
+ ParallelAnimation {
+ NumberAnimation { target: MyItem; property: "x"; to: 100 }
+ NumberAnimation { target: MyItem; property: "y"; to: 100 }
+ }
+ \endcode
+
+ \sa SequentialAnimation
+*/
+/*!
+ \internal
+ \class QDeclarativeParallelAnimation
+*/
+
+QDeclarativeParallelAnimation::QDeclarativeParallelAnimation(QObject *parent) :
+ QDeclarativeAnimationGroup(parent)
+{
+ Q_D(QDeclarativeAnimationGroup);
+ d->ag = new QParallelAnimationGroup;
+ QDeclarative_setParent_noEvent(d->ag, this);
+}
+
+QDeclarativeParallelAnimation::~QDeclarativeParallelAnimation()
+{
+}
+
+QAbstractAnimation *QDeclarativeParallelAnimation::qtAnimation()
+{
+ Q_D(QDeclarativeAnimationGroup);
+ return d->ag;
+}
+
+void QDeclarativeParallelAnimation::transition(QDeclarativeStateActions &actions,
+ QDeclarativeProperties &modified,
+ TransitionDirection direction)
+{
+ Q_D(QDeclarativeAnimationGroup);
+ bool valid = d->defaultProperty.isValid();
+ for (int ii = 0; ii < d->animations.count(); ++ii) {
+ if (valid)
+ d->animations.at(ii)->setDefaultTarget(d->defaultProperty);
+ d->animations.at(ii)->transition(actions, modified, direction);
+ }
+}
+
+
+
+//convert a variant from string type to another animatable type
+void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int type)
+{
+ if (variant.userType() != QVariant::String) {
+ variant.convert((QVariant::Type)type);
+ return;
+ }
+
+ switch (type) {
+ case QVariant::Rect: {
+ variant.setValue(QDeclarativeStringConverters::rectFFromString(variant.toString()).toRect());
+ break;
+ }
+ case QVariant::RectF: {
+ variant.setValue(QDeclarativeStringConverters::rectFFromString(variant.toString()));
+ break;
+ }
+ case QVariant::Point: {
+ variant.setValue(QDeclarativeStringConverters::pointFFromString(variant.toString()).toPoint());
+ break;
+ }
+ case QVariant::PointF: {
+ variant.setValue(QDeclarativeStringConverters::pointFFromString(variant.toString()));
+ break;
+ }
+ case QVariant::Size: {
+ variant.setValue(QDeclarativeStringConverters::sizeFFromString(variant.toString()).toSize());
+ break;
+ }
+ case QVariant::SizeF: {
+ variant.setValue(QDeclarativeStringConverters::sizeFFromString(variant.toString()));
+ break;
+ }
+ case QVariant::Color: {
+ variant.setValue(QDeclarativeStringConverters::colorFromString(variant.toString()));
+ break;
+ }
+ case QVariant::Vector3D: {
+ variant.setValue(QDeclarativeStringConverters::vector3DFromString(variant.toString()));
+ break;
+ }
+ default:
+ if (QDeclarativeValueTypeFactory::isValueType((uint)type)) {
+ variant.convert((QVariant::Type)type);
+ } else {
+ QDeclarativeMetaType::StringConverter converter = QDeclarativeMetaType::customStringConverter(type);
+ if (converter)
+ variant = converter(variant.toString());
+ }
+ break;
+ }
+}
+
+/*!
+ \qmlclass PropertyAnimation QDeclarativePropertyAnimation
+ \since 4.7
+ \inherits Animation
+ \brief The PropertyAnimation element allows you to animate property changes.
+
+ PropertyAnimation provides a way to animate changes to a property's value. It can
+ be used in many different situations:
+ \list
+ \o In a Transition
+
+ Animate any objects that have changed their x or y properties in the target state using
+ an InOutQuad easing curve:
+ \qml
+ Transition { PropertyAnimation { properties: "x,y"; easing.type: "InOutQuad" } }
+ \endqml
+ \o In a Behavior
+
+ Animate all changes to a rectangle's x property.
+ \qml
+ Rectangle {
+ Behavior on x { PropertyAnimation {} }
+ }
+ \endqml
+ \o As a property value source
+
+ Repeatedly animate the rectangle's x property.
+ \qml
+ Rectangle {
+ SequentialAnimation on x {
+ repeat: true
+ PropertyAnimation { to: 50 }
+ PropertyAnimation { to: 0 }
+ }
+ }
+ \endqml
+ \o In a signal handler
+
+ Fade out \c theObject when clicked:
+ \qml
+ MouseArea {
+ anchors.fill: theObject
+ onClicked: PropertyAnimation { target: theObject; property: "opacity"; to: 0 }
+ }
+ \endqml
+ \o Standalone
+
+ Animate \c theObject's size property over 200ms, from its current size to 20-by-20:
+ \qml
+ PropertyAnimation { target: theObject; property: "size"; to: "20x20"; duration: 200 }
+ \endqml
+ \endlist
+
+ Depending on how the animation is used, the set of properties normally used will be
+ different. For more information see the individual property documentation, as well
+ as the \l{QML Animation} introduction.
+*/
+
+QDeclarativePropertyAnimation::QDeclarativePropertyAnimation(QObject *parent)
+: QDeclarativeAbstractAnimation(*(new QDeclarativePropertyAnimationPrivate), parent)
+{
+ Q_D(QDeclarativePropertyAnimation);
+ d->init();
+}
+
+QDeclarativePropertyAnimation::QDeclarativePropertyAnimation(QDeclarativePropertyAnimationPrivate &dd, QObject *parent)
+: QDeclarativeAbstractAnimation(dd, parent)
+{
+ Q_D(QDeclarativePropertyAnimation);
+ d->init();
+}
+
+QDeclarativePropertyAnimation::~QDeclarativePropertyAnimation()
+{
+}
+
+void QDeclarativePropertyAnimationPrivate::init()
+{
+ Q_Q(QDeclarativePropertyAnimation);
+ va = new QDeclarativeBulkValueAnimator;
+ QDeclarative_setParent_noEvent(va, q);
+}
+
+/*!
+ \qmlproperty int PropertyAnimation::duration
+ This property holds the duration of the transition, in milliseconds.
+
+ The default value is 250.
+*/
+int QDeclarativePropertyAnimation::duration() const
+{
+ Q_D(const QDeclarativePropertyAnimation);
+ return d->va->duration();
+}
+
+void QDeclarativePropertyAnimation::setDuration(int duration)
+{
+ if (duration < 0) {
+ qmlInfo(this) << tr("Cannot set a duration of < 0");
+ return;
+ }
+
+ Q_D(QDeclarativePropertyAnimation);
+ if (d->va->duration() == duration)
+ return;
+ d->va->setDuration(duration);
+ emit durationChanged(duration);
+}
+
+/*!
+ \qmlproperty real PropertyAnimation::from
+ This property holds the starting value.
+ If not set, then the value defined in the start state of the transition.
+*/
+QVariant QDeclarativePropertyAnimation::from() const
+{
+ Q_D(const QDeclarativePropertyAnimation);
+ return d->from;
+}
+
+void QDeclarativePropertyAnimation::setFrom(const QVariant &f)
+{
+ Q_D(QDeclarativePropertyAnimation);
+ if (d->fromIsDefined && f == d->from)
+ return;
+ d->from = f;
+ d->fromIsDefined = f.isValid();
+ emit fromChanged(f);
+}
+
+/*!
+ \qmlproperty real PropertyAnimation::to
+ This property holds the ending value.
+ If not set, then the value defined in the end state of the transition or Behavior.
+*/
+QVariant QDeclarativePropertyAnimation::to() const
+{
+ Q_D(const QDeclarativePropertyAnimation);
+ return d->to;
+}
+
+void QDeclarativePropertyAnimation::setTo(const QVariant &t)
+{
+ Q_D(QDeclarativePropertyAnimation);
+ if (d->toIsDefined && t == d->to)
+ return;
+ d->to = t;
+ d->toIsDefined = t.isValid();
+ emit toChanged(t);
+}
+
+/*!
+ \qmlproperty QEasingCurve PropertyAnimation::easing
+ \brief the easing curve used for the transition.
+
+ For the easing you can specify the following parameters: type, amplitude, period and overshoot.
+
+ \qml
+ PropertyAnimation { properties: "y"; easing.type: "InOutElastc"; easing.amplitude: 2.0; easing.period: 1.5 }
+ \endqml
+
+ Available types are:
+
+ \table
+ \row
+ \o \c Linear
+ \o Easing curve for a linear (t) function: velocity is constant.
+ \o \inlineimage qeasingcurve-linear.png
+ \row
+ \o \c InQuad
+ \o Easing curve for a quadratic (t^2) function: accelerating from zero velocity.
+ \o \inlineimage qeasingcurve-inquad.png
+ \row
+ \o \c OutQuad
+ \o Easing curve for a quadratic (t^2) function: decelerating to zero velocity.
+ \o \inlineimage qeasingcurve-outquad.png
+ \row
+ \o \c InOutQuad
+ \o Easing curve for a quadratic (t^2) function: acceleration until halfway, then deceleration.
+ \o \inlineimage qeasingcurve-inoutquad.png
+ \row
+ \o \c OutInQuad
+ \o Easing curve for a quadratic (t^2) function: deceleration until halfway, then acceleration.
+ \o \inlineimage qeasingcurve-outinquad.png
+ \row
+ \o \c InCubic
+ \o Easing curve for a cubic (t^3) function: accelerating from zero velocity.
+ \o \inlineimage qeasingcurve-incubic.png
+ \row
+ \o \c OutCubic
+ \o Easing curve for a cubic (t^3) function: decelerating from zero velocity.
+ \o \inlineimage qeasingcurve-outcubic.png
+ \row
+ \o \c InOutCubic
+ \o Easing curve for a cubic (t^3) function: acceleration until halfway, then deceleration.
+ \o \inlineimage qeasingcurve-inoutcubic.png
+ \row
+ \o \c OutInCubic
+ \o Easing curve for a cubic (t^3) function: deceleration until halfway, then acceleration.
+ \o \inlineimage qeasingcurve-outincubic.png
+ \row
+ \o \c InQuart
+ \o Easing curve for a quartic (t^4) function: accelerating from zero velocity.
+ \o \inlineimage qeasingcurve-inquart.png
+ \row
+ \o \c OutQuart
+ \o Easing curve for a cubic (t^4) function: decelerating from zero velocity.
+ \o \inlineimage qeasingcurve-outquart.png
+ \row
+ \o \c InOutQuart
+ \o Easing curve for a cubic (t^4) function: acceleration until halfway, then deceleration.
+ \o \inlineimage qeasingcurve-inoutquart.png
+ \row
+ \o \c OutInQuart
+ \o Easing curve for a cubic (t^4) function: deceleration until halfway, then acceleration.
+ \o \inlineimage qeasingcurve-outinquart.png
+ \row
+ \o \c InQuint
+ \o Easing curve for a quintic (t^5) function: accelerating from zero velocity.
+ \o \inlineimage qeasingcurve-inquint.png
+ \row
+ \o \c OutQuint
+ \o Easing curve for a cubic (t^5) function: decelerating from zero velocity.
+ \o \inlineimage qeasingcurve-outquint.png
+ \row
+ \o \c InOutQuint
+ \o Easing curve for a cubic (t^5) function: acceleration until halfway, then deceleration.
+ \o \inlineimage qeasingcurve-inoutquint.png
+ \row
+ \o \c OutInQuint
+ \o Easing curve for a cubic (t^5) function: deceleration until halfway, then acceleration.
+ \o \inlineimage qeasingcurve-outinquint.png
+ \row
+ \o \c InSine
+ \o Easing curve for a sinusoidal (sin(t)) function: accelerating from zero velocity.
+ \o \inlineimage qeasingcurve-insine.png
+ \row
+ \o \c OutSine
+ \o Easing curve for a sinusoidal (sin(t)) function: decelerating from zero velocity.
+ \o \inlineimage qeasingcurve-outsine.png
+ \row
+ \o \c InOutSine
+ \o Easing curve for a sinusoidal (sin(t)) function: acceleration until halfway, then deceleration.
+ \o \inlineimage qeasingcurve-inoutsine.png
+ \row
+ \o \c OutInSine
+ \o Easing curve for a sinusoidal (sin(t)) function: deceleration until halfway, then acceleration.
+ \o \inlineimage qeasingcurve-outinsine.png
+ \row
+ \o \c InExpo
+ \o Easing curve for an exponential (2^t) function: accelerating from zero velocity.
+ \o \inlineimage qeasingcurve-inexpo.png
+ \row
+ \o \c OutExpo
+ \o Easing curve for an exponential (2^t) function: decelerating from zero velocity.
+ \o \inlineimage qeasingcurve-outexpo.png
+ \row
+ \o \c InOutExpo
+ \o Easing curve for an exponential (2^t) function: acceleration until halfway, then deceleration.
+ \o \inlineimage qeasingcurve-inoutexpo.png
+ \row
+ \o \c OutInExpo
+ \o Easing curve for an exponential (2^t) function: deceleration until halfway, then acceleration.
+ \o \inlineimage qeasingcurve-outinexpo.png
+ \row
+ \o \c InCirc
+ \o Easing curve for a circular (sqrt(1-t^2)) function: accelerating from zero velocity.
+ \o \inlineimage qeasingcurve-incirc.png
+ \row
+ \o \c OutCirc
+ \o Easing curve for a circular (sqrt(1-t^2)) function: decelerating from zero velocity.
+ \o \inlineimage qeasingcurve-outcirc.png
+ \row
+ \o \c InOutCirc
+ \o Easing curve for a circular (sqrt(1-t^2)) function: acceleration until halfway, then deceleration.
+ \o \inlineimage qeasingcurve-inoutcirc.png
+ \row
+ \o \c OutInCirc
+ \o Easing curve for a circular (sqrt(1-t^2)) function: deceleration until halfway, then acceleration.
+ \o \inlineimage qeasingcurve-outincirc.png
+ \row
+ \o \c InElastic
+ \o Easing curve for an elastic (exponentially decaying sine wave) function: accelerating from zero velocity.
+ \br The peak amplitude can be set with the \e amplitude parameter, and the period of decay by the \e period parameter.
+ \o \inlineimage qeasingcurve-inelastic.png
+ \row
+ \o \c OutElastic
+ \o Easing curve for an elastic (exponentially decaying sine wave) function: decelerating from zero velocity.
+ \br The peak amplitude can be set with the \e amplitude parameter, and the period of decay by the \e period parameter.
+ \o \inlineimage qeasingcurve-outelastic.png
+ \row
+ \o \c InOutElastic
+ \o Easing curve for an elastic (exponentially decaying sine wave) function: acceleration until halfway, then deceleration.
+ \o \inlineimage qeasingcurve-inoutelastic.png
+ \row
+ \o \c OutInElastic
+ \o Easing curve for an elastic (exponentially decaying sine wave) function: deceleration until halfway, then acceleration.
+ \o \inlineimage qeasingcurve-outinelastic.png
+ \row
+ \o \c InBack
+ \o Easing curve for a back (overshooting cubic function: (s+1)*t^3 - s*t^2) easing in: accelerating from zero velocity.
+ \o \inlineimage qeasingcurve-inback.png
+ \row
+ \o \c OutBack
+ \o Easing curve for a back (overshooting cubic function: (s+1)*t^3 - s*t^2) easing out: decelerating to zero velocity.
+ \o \inlineimage qeasingcurve-outback.png
+ \row
+ \o \c InOutBack
+ \o Easing curve for a back (overshooting cubic function: (s+1)*t^3 - s*t^2) easing in/out: acceleration until halfway, then deceleration.
+ \o \inlineimage qeasingcurve-inoutback.png
+ \row
+ \o \c OutInBack
+ \o Easing curve for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing out/in: deceleration until halfway, then acceleration.
+ \o \inlineimage qeasingcurve-outinback.png
+ \row
+ \o \c InBounce
+ \o Easing curve for a bounce (exponentially decaying parabolic bounce) function: accelerating from zero velocity.
+ \o \inlineimage qeasingcurve-inbounce.png
+ \row
+ \o \c OutBounce
+ \o Easing curve for a bounce (exponentially decaying parabolic bounce) function: decelerating from zero velocity.
+ \o \inlineimage qeasingcurve-outbounce.png
+ \row
+ \o \c InOutBounce
+ \o Easing curve for a bounce (exponentially decaying parabolic bounce) function easing in/out: acceleration until halfway, then deceleration.
+ \o \inlineimage qeasingcurve-inoutbounce.png
+ \row
+ \o \c OutInBounce
+ \o Easing curve for a bounce (exponentially decaying parabolic bounce) function easing out/in: deceleration until halfway, then acceleration.
+ \o \inlineimage qeasingcurve-outinbounce.png
+ \endtable
+
+ easing.amplitude is not applicable for all curve types. It is only applicable for bounce and elastic curves (curves of type
+ QEasingCurve::InBounce, QEasingCurve::OutBounce, QEasingCurve::InOutBounce, QEasingCurve::OutInBounce, QEasingCurve::InElastic,
+ QEasingCurve::OutElastic, QEasingCurve::InOutElastic or QEasingCurve::OutInElastic).
+
+ easing.overshoot is not applicable for all curve types. It is only applicable if type is: QEasingCurve::InBack, QEasingCurve::OutBack,
+ QEasingCurve::InOutBack or QEasingCurve::OutInBack.
+
+ easing.period is not applicable for all curve types. It is only applicable if type is: QEasingCurve::InElastic, QEasingCurve::OutElastic,
+ QEasingCurve::InOutElastic or QEasingCurve::OutInElastic.
+*/
+QEasingCurve QDeclarativePropertyAnimation::easing() const
+{
+ Q_D(const QDeclarativePropertyAnimation);
+ return d->easing;
+}
+
+void QDeclarativePropertyAnimation::setEasing(const QEasingCurve &e)
+{
+ Q_D(QDeclarativePropertyAnimation);
+ if (d->easing == e)
+ return;
+
+ d->easing = e;
+ d->va->setEasingCurve(d->easing);
+ emit easingChanged(e);
+}
+
+QObject *QDeclarativePropertyAnimation::target() const
+{
+ Q_D(const QDeclarativePropertyAnimation);
+ return d->target;
+}
+
+void QDeclarativePropertyAnimation::setTarget(QObject *o)
+{
+ Q_D(QDeclarativePropertyAnimation);
+ if (d->target == o)
+ return;
+ d->target = o;
+ emit targetChanged(d->target, d->propertyName);
+}
+
+QString QDeclarativePropertyAnimation::property() const
+{
+ Q_D(const QDeclarativePropertyAnimation);
+ return d->propertyName;
+}
+
+void QDeclarativePropertyAnimation::setProperty(const QString &n)
+{
+ Q_D(QDeclarativePropertyAnimation);
+ if (d->propertyName == n)
+ return;
+ d->propertyName = n;
+ emit targetChanged(d->target, d->propertyName);
+}
+
+QString QDeclarativePropertyAnimation::properties() const
+{
+ Q_D(const QDeclarativePropertyAnimation);
+ return d->properties;
+}
+
+void QDeclarativePropertyAnimation::setProperties(const QString &prop)
+{
+ Q_D(QDeclarativePropertyAnimation);
+ if (d->properties == prop)
+ return;
+
+ d->properties = prop;
+ emit propertiesChanged(prop);
+}
+
+/*!
+ \qmlproperty string PropertyAnimation::property
+ \qmlproperty string PropertyAnimation::properties
+ \qmlproperty Object PropertyAnimation::target
+ \qmlproperty list<Object> PropertyAnimation::targets
+
+ These properties are used as a set to determine which properties should be animated.
+ The singular and plural forms are functionally identical, e.g.
+ \qml
+ NumberAnimation { target: theItem; property: "x"; to: 500 }
+ \endqml
+ has the same meaning as
+ \qml
+ NumberAnimation { targets: theItem; properties: "x"; to: 500 }
+ \endqml
+ The singular forms are slightly optimized, so if you do have only a single target/property
+ to animate you should try to use them.
+
+ In many cases these properties do not need to be explicitly specified -- they can be
+ inferred from the animation framework.
+ \table 80%
+ \row
+ \o Value Source / Behavior
+ \o When an animation is used as a value source or in a Behavior, the default target and property
+ name to be animated can both be inferred.
+ \qml
+ Rectangle {
+ id: theRect
+ width: 100; height: 100
+ color: Qt.rgba(0,0,1)
+ NumberAnimation on x { to: 500; repeat: true } //animate theRect's x property
+ Behavior on y { NumberAnimation {} } //animate theRect's y property
+ }
+ \endqml
+ \row
+ \o Transition
+ \o When used in a transition, a property animation is assumed to match \e all targets
+ but \e no properties. In practice, that means you need to specify at least the properties
+ in order for the animation to do anything.
+ \qml
+ Rectangle {
+ id: theRect
+ width: 100; height: 100
+ color: Qt.rgba(0,0,1)
+ Item { id: uselessItem }
+ states: State {
+ name: "state1"
+ PropertyChanges { target: theRect; x: 200; y: 200; z: 4 }
+ PropertyChanges { target: uselessItem; x: 10; y: 10; z: 2 }
+ }
+ transitions: Transition {
+ //animate both theRect's and uselessItem's x and y to their final values
+ NumberAnimation { properties: "x,y" }
+
+ //animate theRect's z to its final value
+ NumberAnimation { target: theRect; property: "z" }
+ }
+ }
+ \endqml
+ \row
+ \o Standalone
+ \o When an animation is used standalone, both the target and property need to be
+ explicitly specified.
+ \qml
+ Rectangle {
+ id: theRect
+ width: 100; height: 100
+ color: Qt.rgba(0,0,1)
+ //need to explicitly specify target and property
+ NumberAnimation { id: theAnim; target: theRect; property: "x" to: 500 }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: theAnim.start()
+ }
+ }
+ \endqml
+ \endtable
+
+ As seen in the above example, properties is specified as a comma-separated string of property names to animate.
+
+ \sa exclude
+*/
+QDeclarativeListProperty<QObject> QDeclarativePropertyAnimation::targets()
+{
+ Q_D(QDeclarativePropertyAnimation);
+ return QDeclarativeListProperty<QObject>(this, d->targets);
+}
+
+/*!
+ \qmlproperty list<Object> PropertyAnimation::exclude
+ This property holds the items not to be affected by this animation.
+ \sa PropertyAnimation::targets
+*/
+QDeclarativeListProperty<QObject> QDeclarativePropertyAnimation::exclude()
+{
+ Q_D(QDeclarativePropertyAnimation);
+ return QDeclarativeListProperty<QObject>(this, d->exclude);
+}
+
+QAbstractAnimation *QDeclarativePropertyAnimation::qtAnimation()
+{
+ Q_D(QDeclarativePropertyAnimation);
+ return d->va;
+}
+
+struct PropertyUpdater : public QDeclarativeBulkValueUpdater
+{
+ QDeclarativeStateActions actions;
+ int interpolatorType; //for Number/ColorAnimation
+ int prevInterpolatorType; //for generic
+ QVariantAnimation::Interpolator interpolator;
+ bool reverse;
+ bool fromSourced;
+ bool fromDefined;
+ bool *wasDeleted;
+ PropertyUpdater() : prevInterpolatorType(0), wasDeleted(0) {}
+ ~PropertyUpdater() { if (wasDeleted) *wasDeleted = true; }
+ void setValue(qreal v)
+ {
+ bool deleted = false;
+ wasDeleted = &deleted;
+ if (reverse) //QVariantAnimation sends us 1->0 when reversed, but we are expecting 0->1
+ v = 1 - v;
+ for (int ii = 0; ii < actions.count(); ++ii) {
+ QDeclarativeAction &action = actions[ii];
+
+ if (v == 1.)
+ QDeclarativePropertyPrivate::write(action.property, action.toValue, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
+ else {
+ if (!fromSourced && !fromDefined) {
+ action.fromValue = action.property.read();
+ if (interpolatorType)
+ QDeclarativePropertyAnimationPrivate::convertVariant(action.fromValue, interpolatorType);
+ }
+ if (!interpolatorType) {
+ int propType = action.property.propertyType();
+ if (!prevInterpolatorType || prevInterpolatorType != propType) {
+ prevInterpolatorType = propType;
+ interpolator = QVariantAnimationPrivate::getInterpolator(prevInterpolatorType);
+ }
+ }
+ if (interpolator)
+ QDeclarativePropertyPrivate::write(action.property, interpolator(action.fromValue.constData(), action.toValue.constData(), v), QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
+ }
+ if (deleted)
+ return;
+ }
+ wasDeleted = 0;
+ fromSourced = true;
+ }
+};
+
+void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions,
+ QDeclarativeProperties &modified,
+ TransitionDirection direction)
+{
+ Q_D(QDeclarativePropertyAnimation);
+
+ QStringList props = d->properties.isEmpty() ? QStringList() : d->properties.split(QLatin1Char(','));
+ for (int ii = 0; ii < props.count(); ++ii)
+ props[ii] = props.at(ii).trimmed();
+ if (!d->propertyName.isEmpty())
+ props << d->propertyName;
+
+ QList<QObject*> targets = d->targets;
+ if (d->target)
+ targets.append(d->target);
+
+ bool hasSelectors = !props.isEmpty() || !targets.isEmpty() || !d->exclude.isEmpty();
+ bool useType = (props.isEmpty() && d->defaultToInterpolatorType) ? true : false;
+
+ if (d->defaultProperty.isValid() && !hasSelectors) {
+ props << d->defaultProperty.name();
+ targets << d->defaultProperty.object();
+ }
+
+ if (props.isEmpty() && !d->defaultProperties.isEmpty()) {
+ props << d->defaultProperties.split(QLatin1Char(','));
+ }
+
+ PropertyUpdater *data = new PropertyUpdater;
+ data->interpolatorType = d->interpolatorType;
+ data->interpolator = d->interpolator;
+ data->reverse = direction == Backward ? true : false;
+ data->fromSourced = false;
+ data->fromDefined = d->fromIsDefined;
+
+ bool hasExplicit = false;
+ //an explicit animation has been specified
+ if (d->toIsDefined) {
+ for (int i = 0; i < props.count(); ++i) {
+ for (int j = 0; j < targets.count(); ++j) {
+ QDeclarativeAction myAction;
+ myAction.property = d->createProperty(targets.at(j), props.at(i), this);
+ if (myAction.property.isValid()) {
+ if (d->fromIsDefined) {
+ myAction.fromValue = d->from;
+ d->convertVariant(myAction.fromValue, d->interpolatorType ? d->interpolatorType : myAction.property.propertyType());
+ }
+ myAction.toValue = d->to;
+ d->convertVariant(myAction.toValue, d->interpolatorType ? d->interpolatorType : myAction.property.propertyType());
+ data->actions << myAction;
+ hasExplicit = true;
+ for (int ii = 0; ii < actions.count(); ++ii) {
+ QDeclarativeAction &action = actions[ii];
+ if (action.property.object() == myAction.property.object() &&
+ myAction.property.name() == action.property.name()) {
+ modified << action.property;
+ break; //### any chance there could be multiples?
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (!hasExplicit)
+ for (int ii = 0; ii < actions.count(); ++ii) {
+ QDeclarativeAction &action = actions[ii];
+
+ QObject *obj = action.property.object();
+ QString propertyName = action.property.name();
+ QObject *sObj = action.specifiedObject;
+ QString sPropertyName = action.specifiedProperty;
+ bool same = (obj == sObj);
+
+ if ((targets.isEmpty() || targets.contains(obj) || (!same && targets.contains(sObj))) &&
+ (!d->exclude.contains(obj)) && (same || (!d->exclude.contains(sObj))) &&
+ (props.contains(propertyName) || (!same && props.contains(sPropertyName))
+ || (useType && action.property.propertyType() == d->interpolatorType))) {
+ QDeclarativeAction myAction = action;
+
+ if (d->fromIsDefined)
+ myAction.fromValue = d->from;
+ else
+ myAction.fromValue = QVariant();
+ if (d->toIsDefined)
+ myAction.toValue = d->to;
+
+ d->convertVariant(myAction.fromValue, d->interpolatorType ? d->interpolatorType : myAction.property.propertyType());
+ d->convertVariant(myAction.toValue, d->interpolatorType ? d->interpolatorType : myAction.property.propertyType());
+
+ modified << action.property;
+
+ data->actions << myAction;
+ action.fromValue = myAction.toValue;
+ }
+ }
+
+ if (data->actions.count()) {
+ if (!d->rangeIsSet) {
+ d->va->setStartValue(qreal(0));
+ d->va->setEndValue(qreal(1));
+ d->rangeIsSet = true;
+ }
+ d->va->setAnimValue(data, QAbstractAnimation::DeleteWhenStopped);
+ d->va->setFromSourcedValue(&data->fromSourced);
+ } else {
+ delete data;
+ }
+}
+
+/*!
+ \qmlclass ParentAnimation QDeclarativeParentAnimation
+ \since 4.7
+ \inherits Animation
+ \brief The ParentAnimation element allows you to animate parent changes.
+
+ ParentAnimation is used in conjunction with NumberAnimation to smoothly
+ animate changing an item's parent. In the following example,
+ ParentAnimation wraps a NumberAnimation which animates from the
+ current position in the old parent to the new position in the new
+ parent.
+
+ \qml
+ ...
+ State {
+ //reparent myItem to newParent. myItem's final location
+ //should be 10,10 in newParent.
+ ParentChange {
+ target: myItem
+ parent: newParent
+ x: 10; y: 10
+ }
+ }
+ ...
+ Transition {
+ //smoothly reparent myItem and move into new position
+ ParentAnimation {
+ target: theItem
+ NumberAnimation { properties: "x,y" }
+ }
+ }
+ \endqml
+
+ ParentAnimation can wrap any number of animations -- those animations will
+ be run in parallel (like those in a ParallelAnimation group).
+
+ In some cases, such as reparenting between items with clipping, it's useful
+ to animate the parent change via another item with no clipping.
+
+ When used in a transition, ParentAnimation will by default animate
+ all ParentChanges.
+*/
+
+/*!
+ \internal
+ \class QDeclarativeParentAnimation
+*/
+QDeclarativeParentAnimation::QDeclarativeParentAnimation(QObject *parent)
+ : QDeclarativeAnimationGroup(*(new QDeclarativeParentAnimationPrivate), parent)
+{
+ Q_D(QDeclarativeParentAnimation);
+ d->topLevelGroup = new QSequentialAnimationGroup;
+ QDeclarative_setParent_noEvent(d->topLevelGroup, this);
+
+ d->startAction = new QActionAnimation;
+ d->topLevelGroup->addAnimation(d->startAction);
+
+ d->ag = new QParallelAnimationGroup;
+ d->topLevelGroup->addAnimation(d->ag);
+
+ d->endAction = new QActionAnimation;
+ d->topLevelGroup->addAnimation(d->endAction);
+}
+
+QDeclarativeParentAnimation::~QDeclarativeParentAnimation()
+{
+}
+
+/*!
+ \qmlproperty item ParentAnimation::target
+ The item to reparent.
+
+ When used in a transition, if no target is specified all
+ ParentChanges will be animated by the ParentAnimation.
+*/
+QDeclarativeItem *QDeclarativeParentAnimation::target() const
+{
+ Q_D(const QDeclarativeParentAnimation);
+ return d->target;
+}
+
+void QDeclarativeParentAnimation::setTarget(QDeclarativeItem *target)
+{
+ Q_D(QDeclarativeParentAnimation);
+ d->target = target;
+}
+
+/*!
+ \qmlproperty item ParentAnimation::newParent
+ The new parent to animate to.
+
+ If not set, then the parent defined in the end state of the transition.
+*/
+QDeclarativeItem *QDeclarativeParentAnimation::newParent() const
+{
+ Q_D(const QDeclarativeParentAnimation);
+ return d->newParent;
+}
+
+void QDeclarativeParentAnimation::setNewParent(QDeclarativeItem *newParent)
+{
+ Q_D(QDeclarativeParentAnimation);
+ d->newParent = newParent;
+}
+
+/*!
+ \qmlproperty item ParentAnimation::via
+ The item to reparent via. This provides a way to do an unclipped animation
+ when both the old parent and new parent are clipped
+
+ \qml
+ ParentAnimation {
+ target: myItem
+ via: topLevelItem
+ ...
+ }
+ \endqml
+*/
+QDeclarativeItem *QDeclarativeParentAnimation::via() const
+{
+ Q_D(const QDeclarativeParentAnimation);
+ return d->via;
+}
+
+void QDeclarativeParentAnimation::setVia(QDeclarativeItem *via)
+{
+ Q_D(QDeclarativeParentAnimation);
+ d->via = via;
+}
+
+//### mirrors same-named function in QDeclarativeItem
+QPointF QDeclarativeParentAnimationPrivate::computeTransformOrigin(QDeclarativeItem::TransformOrigin origin, qreal width, qreal height) const
+{
+ switch(origin) {
+ default:
+ case QDeclarativeItem::TopLeft:
+ return QPointF(0, 0);
+ case QDeclarativeItem::Top:
+ return QPointF(width / 2., 0);
+ case QDeclarativeItem::TopRight:
+ return QPointF(width, 0);
+ case QDeclarativeItem::Left:
+ return QPointF(0, height / 2.);
+ case QDeclarativeItem::Center:
+ return QPointF(width / 2., height / 2.);
+ case QDeclarativeItem::Right:
+ return QPointF(width, height / 2.);
+ case QDeclarativeItem::BottomLeft:
+ return QPointF(0, height);
+ case QDeclarativeItem::Bottom:
+ return QPointF(width / 2., height);
+ case QDeclarativeItem::BottomRight:
+ return QPointF(width, height);
+ }
+}
+
+void QDeclarativeParentAnimation::transition(QDeclarativeStateActions &actions,
+ QDeclarativeProperties &modified,
+ TransitionDirection direction)
+{
+ Q_D(QDeclarativeParentAnimation);
+
+ struct QDeclarativeParentActionData : public QAbstractAnimationAction
+ {
+ QDeclarativeParentActionData() {}
+ ~QDeclarativeParentActionData() { qDeleteAll(pc); }
+
+ QDeclarativeStateActions actions;
+ //### reverse should probably apply on a per-action basis
+ bool reverse;
+ QList<QDeclarativeParentChange *> pc;
+ virtual void doAction()
+ {
+ for (int ii = 0; ii < actions.count(); ++ii) {
+ const QDeclarativeAction &action = actions.at(ii);
+ if (reverse)
+ action.event->reverse();
+ else
+ action.event->execute();
+ }
+ }
+ };
+
+ QDeclarativeParentActionData *data = new QDeclarativeParentActionData;
+ QDeclarativeParentActionData *viaData = new QDeclarativeParentActionData;
+
+ bool hasExplicit = false;
+ if (d->target && d->newParent) {
+ data->reverse = false;
+ QDeclarativeAction myAction;
+ QDeclarativeParentChange *pc = new QDeclarativeParentChange;
+ pc->setObject(d->target);
+ pc->setParent(d->newParent);
+ myAction.event = pc;
+ data->pc << pc;
+ data->actions << myAction;
+ hasExplicit = true;
+ if (d->via) {
+ viaData->reverse = false;
+ QDeclarativeAction myVAction;
+ QDeclarativeParentChange *vpc = new QDeclarativeParentChange;
+ vpc->setObject(d->target);
+ vpc->setParent(d->via);
+ myVAction.event = vpc;
+ viaData->pc << vpc;
+ viaData->actions << myVAction;
+ }
+ //### once actions have concept of modified,
+ // loop to match appropriate ParentChanges and mark as modified
+ }
+
+ if (!hasExplicit)
+ for (int i = 0; i < actions.size(); ++i) {
+ QDeclarativeAction &action = actions[i];
+ if (action.event && action.event->typeName() == QLatin1String("ParentChange")
+ && (!d->target || static_cast<QDeclarativeParentChange*>(action.event)->object() == d->target)) {
+
+ QDeclarativeParentChange *pc = static_cast<QDeclarativeParentChange*>(action.event);
+ QDeclarativeAction myAction = action;
+ data->reverse = action.reverseEvent;
+
+ //### this logic differs from PropertyAnimation
+ // (probably a result of modified vs. done)
+ if (d->newParent) {
+ QDeclarativeParentChange *epc = new QDeclarativeParentChange;
+ epc->setObject(static_cast<QDeclarativeParentChange*>(action.event)->object());
+ epc->setParent(d->newParent);
+ myAction.event = epc;
+ data->pc << epc;
+ data->actions << myAction;
+ pc = epc;
+ } else {
+ action.actionDone = true;
+ data->actions << myAction;
+ }
+
+ if (d->via) {
+ viaData->reverse = false;
+ QDeclarativeAction myAction;
+ QDeclarativeParentChange *vpc = new QDeclarativeParentChange;
+ vpc->setObject(pc->object());
+ vpc->setParent(d->via);
+ myAction.event = vpc;
+ viaData->pc << vpc;
+ viaData->actions << myAction;
+ QDeclarativeAction dummyAction;
+ QDeclarativeAction &xAction = pc->xIsSet() ? actions[++i] : dummyAction;
+ QDeclarativeAction &yAction = pc->yIsSet() ? actions[++i] : dummyAction;
+ QDeclarativeAction &sAction = pc->scaleIsSet() ? actions[++i] : dummyAction;
+ QDeclarativeAction &rAction = pc->rotationIsSet() ? actions[++i] : dummyAction;
+ bool forward = (direction == QDeclarativeAbstractAnimation::Forward);
+ QDeclarativeItem *target = pc->object();
+ QDeclarativeItem *targetParent = forward ? pc->parent() : pc->originalParent();
+
+ //### this mirrors the logic in QDeclarativeParentChange.
+ bool ok;
+ const QTransform &transform = targetParent->itemTransform(d->via, &ok);
+ if (transform.type() >= QTransform::TxShear || !ok) {
+ qmlInfo(this) << QDeclarativeParentAnimation::tr("Unable to preserve appearance under complex transform");
+ ok = false;
+ }
+
+ qreal scale = 1;
+ qreal rotation = 0;
+ if (ok && transform.type() != QTransform::TxRotate) {
+ if (transform.m11() == transform.m22())
+ scale = transform.m11();
+ else {
+ qmlInfo(this) << QDeclarativeParentAnimation::tr("Unable to preserve appearance under non-uniform scale");
+ ok = false;
+ }
+ } else if (ok && transform.type() == QTransform::TxRotate) {
+ if (transform.m11() == transform.m22())
+ scale = qSqrt(transform.m11()*transform.m11() + transform.m12()*transform.m12());
+ else {
+ qmlInfo(this) << QDeclarativeParentAnimation::tr("Unable to preserve appearance under non-uniform scale");
+ ok = false;
+ }
+
+ if (scale != 0)
+ rotation = atan2(transform.m12()/scale, transform.m11()/scale) * 180/M_PI;
+ else {
+ qmlInfo(this) << QDeclarativeParentAnimation::tr("Unable to preserve appearance under scale of 0");
+ ok = false;
+ }
+ }
+
+ const QPointF &point = transform.map(QPointF(xAction.toValue.toReal(),yAction.toValue.toReal()));
+ qreal x = point.x();
+ qreal y = point.y();
+ if (ok && target->transformOrigin() != QDeclarativeItem::TopLeft) {
+ qreal w = target->width();
+ qreal h = target->height();
+ if (pc->widthIsSet())
+ w = actions[++i].toValue.toReal();
+ if (pc->heightIsSet())
+ h = actions[++i].toValue.toReal();
+ const QPointF &transformOrigin
+ = d->computeTransformOrigin(target->transformOrigin(), w,h);
+ qreal tempxt = transformOrigin.x();
+ qreal tempyt = transformOrigin.y();
+ QTransform t;
+ t.translate(-tempxt, -tempyt);
+ t.rotate(rotation);
+ t.scale(scale, scale);
+ t.translate(tempxt, tempyt);
+ const QPointF &offset = t.map(QPointF(0,0));
+ x += offset.x();
+ y += offset.y();
+ }
+
+ if (ok) {
+ //qDebug() << x << y << rotation << scale;
+ xAction.toValue = x;
+ yAction.toValue = y;
+ sAction.toValue = sAction.toValue.toReal() * scale;
+ rAction.toValue = rAction.toValue.toReal() + rotation;
+ }
+ }
+ }
+ }
+
+ if (data->actions.count()) {
+ if (direction == QDeclarativeAbstractAnimation::Forward) {
+ d->startAction->setAnimAction(d->via ? viaData : data, QActionAnimation::DeleteWhenStopped);
+ d->endAction->setAnimAction(d->via ? data : 0, QActionAnimation::DeleteWhenStopped);
+ } else {
+ d->endAction->setAnimAction(d->via ? viaData : data, QActionAnimation::DeleteWhenStopped);
+ d->startAction->setAnimAction(d->via ? data : 0, QActionAnimation::DeleteWhenStopped);
+ }
+ } else {
+ delete data;
+ delete viaData;
+ }
+
+ //take care of any child animations
+ bool valid = d->defaultProperty.isValid();
+ for (int ii = 0; ii < d->animations.count(); ++ii) {
+ if (valid)
+ d->animations.at(ii)->setDefaultTarget(d->defaultProperty);
+ d->animations.at(ii)->transition(actions, modified, direction);
+ }
+
+}
+
+QAbstractAnimation *QDeclarativeParentAnimation::qtAnimation()
+{
+ Q_D(QDeclarativeParentAnimation);
+ return d->topLevelGroup;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativeanimation_p.h b/src/declarative/util/qdeclarativeanimation_p.h
new file mode 100644
index 0000000000..af48309abf
--- /dev/null
+++ b/src/declarative/util/qdeclarativeanimation_p.h
@@ -0,0 +1,501 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEANIMATION_H
+#define QDECLARATIVEANIMATION_H
+
+#include "qdeclarativetransition_p.h"
+#include "qdeclarativestate_p.h"
+#include <QtGui/qvector3d.h>
+
+#include <qdeclarativepropertyvaluesource.h>
+#include <qdeclarative.h>
+#include <qdeclarativescriptstring.h>
+
+#include <QtCore/qvariant.h>
+#include <QtCore/qeasingcurve.h>
+#include <QtCore/QAbstractAnimation>
+#include <QtGui/qcolor.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeAbstractAnimationPrivate;
+class QDeclarativeAnimationGroup;
+class Q_AUTOTEST_EXPORT QDeclarativeAbstractAnimation : public QObject, public QDeclarativePropertyValueSource, public QDeclarativeParserStatus
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeAbstractAnimation)
+
+ Q_INTERFACES(QDeclarativeParserStatus)
+ Q_INTERFACES(QDeclarativePropertyValueSource)
+ Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged)
+ Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged)
+ Q_PROPERTY(bool alwaysRunToEnd READ alwaysRunToEnd WRITE setAlwaysRunToEnd NOTIFY alwaysRunToEndChanged())
+ Q_PROPERTY(bool repeat READ repeat WRITE setRepeat NOTIFY repeatChanged)
+ Q_CLASSINFO("DefaultMethod", "start()")
+
+public:
+ QDeclarativeAbstractAnimation(QObject *parent=0);
+ virtual ~QDeclarativeAbstractAnimation();
+
+ bool isRunning() const;
+ void setRunning(bool);
+ bool isPaused() const;
+ void setPaused(bool);
+ bool alwaysRunToEnd() const;
+ void setAlwaysRunToEnd(bool);
+ bool repeat() const;
+ void setRepeat(bool);
+
+ int currentTime();
+ void setCurrentTime(int);
+
+ QDeclarativeAnimationGroup *group() const;
+ void setGroup(QDeclarativeAnimationGroup *);
+
+ void setDefaultTarget(const QDeclarativeProperty &);
+ void setDisableUserControl();
+
+ void classBegin();
+ void componentComplete();
+
+Q_SIGNALS:
+ void started();
+ void completed();
+ void runningChanged(bool);
+ void pausedChanged(bool);
+ void repeatChanged(bool);
+ void alwaysRunToEndChanged(bool);
+
+public Q_SLOTS:
+ void restart();
+ void start();
+ void pause();
+ void resume();
+ void stop();
+ void complete();
+
+protected:
+ QDeclarativeAbstractAnimation(QDeclarativeAbstractAnimationPrivate &dd, QObject *parent);
+
+public:
+ enum TransitionDirection { Forward, Backward };
+ virtual void transition(QDeclarativeStateActions &actions,
+ QDeclarativeProperties &modified,
+ TransitionDirection direction);
+ virtual QAbstractAnimation *qtAnimation() = 0;
+
+private Q_SLOTS:
+ void timelineComplete();
+
+private:
+ virtual void setTarget(const QDeclarativeProperty &);
+};
+
+class QDeclarativePauseAnimationPrivate;
+class Q_AUTOTEST_EXPORT QDeclarativePauseAnimation : public QDeclarativeAbstractAnimation
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativePauseAnimation)
+
+ Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged)
+
+public:
+ QDeclarativePauseAnimation(QObject *parent=0);
+ virtual ~QDeclarativePauseAnimation();
+
+ int duration() const;
+ void setDuration(int);
+
+Q_SIGNALS:
+ void durationChanged(int);
+
+protected:
+ virtual QAbstractAnimation *qtAnimation();
+};
+
+class QDeclarativeScriptActionPrivate;
+class QDeclarativeScriptAction : public QDeclarativeAbstractAnimation
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeScriptAction)
+
+ Q_PROPERTY(QDeclarativeScriptString script READ script WRITE setScript)
+ Q_PROPERTY(QString stateChangeScriptName READ stateChangeScriptName WRITE setStateChangeScriptName)
+
+public:
+ QDeclarativeScriptAction(QObject *parent=0);
+ virtual ~QDeclarativeScriptAction();
+
+ QDeclarativeScriptString script() const;
+ void setScript(const QDeclarativeScriptString &);
+
+ QString stateChangeScriptName() const;
+ void setStateChangeScriptName(const QString &);
+
+protected:
+ virtual void transition(QDeclarativeStateActions &actions,
+ QDeclarativeProperties &modified,
+ TransitionDirection direction);
+ virtual QAbstractAnimation *qtAnimation();
+};
+
+class QDeclarativePropertyActionPrivate;
+class QDeclarativePropertyAction : public QDeclarativeAbstractAnimation
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativePropertyAction)
+
+ Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged)
+ Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY targetChanged)
+ Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged)
+ Q_PROPERTY(QDeclarativeListProperty<QObject> targets READ targets)
+ Q_PROPERTY(QDeclarativeListProperty<QObject> exclude READ exclude)
+ Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged)
+
+public:
+ QDeclarativePropertyAction(QObject *parent=0);
+ virtual ~QDeclarativePropertyAction();
+
+ QObject *target() const;
+ void setTarget(QObject *);
+
+ QString property() const;
+ void setProperty(const QString &);
+
+ QString properties() const;
+ void setProperties(const QString &);
+
+ QDeclarativeListProperty<QObject> targets();
+ QDeclarativeListProperty<QObject> exclude();
+
+ QVariant value() const;
+ void setValue(const QVariant &);
+
+Q_SIGNALS:
+ void valueChanged(const QVariant &);
+ void propertiesChanged(const QString &);
+ void targetChanged(QObject *, const QString &);
+
+protected:
+ virtual void transition(QDeclarativeStateActions &actions,
+ QDeclarativeProperties &modified,
+ TransitionDirection direction);
+ virtual QAbstractAnimation *qtAnimation();
+};
+
+class QDeclarativeItem;
+class QDeclarativeParentActionPrivate;
+class QDeclarativeParentAction : public QDeclarativeAbstractAnimation
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeParentAction)
+
+ Q_PROPERTY(QDeclarativeItem *target READ object WRITE setObject)
+ Q_PROPERTY(QDeclarativeItem *parent READ parent WRITE setParent) //### newParent
+
+public:
+ QDeclarativeParentAction(QObject *parent=0);
+ virtual ~QDeclarativeParentAction();
+
+ QDeclarativeItem *object() const;
+ void setObject(QDeclarativeItem *);
+
+ QDeclarativeItem *parent() const;
+ void setParent(QDeclarativeItem *);
+
+protected:
+ virtual void transition(QDeclarativeStateActions &actions,
+ QDeclarativeProperties &modified,
+ TransitionDirection direction);
+ virtual QAbstractAnimation *qtAnimation();
+};
+
+class QDeclarativePropertyAnimationPrivate;
+class Q_AUTOTEST_EXPORT QDeclarativePropertyAnimation : public QDeclarativeAbstractAnimation
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativePropertyAnimation)
+
+ Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged)
+ Q_PROPERTY(QVariant from READ from WRITE setFrom NOTIFY fromChanged)
+ Q_PROPERTY(QVariant to READ to WRITE setTo NOTIFY toChanged)
+ Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged)
+ Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged)
+ Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY targetChanged)
+ Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged)
+ Q_PROPERTY(QDeclarativeListProperty<QObject> targets READ targets)
+ Q_PROPERTY(QDeclarativeListProperty<QObject> exclude READ exclude)
+
+public:
+ QDeclarativePropertyAnimation(QObject *parent=0);
+ virtual ~QDeclarativePropertyAnimation();
+
+ int duration() const;
+ void setDuration(int);
+
+ QVariant from() const;
+ void setFrom(const QVariant &);
+
+ QVariant to() const;
+ void setTo(const QVariant &);
+
+ QEasingCurve easing() const;
+ void setEasing(const QEasingCurve &);
+
+ QObject *target() const;
+ void setTarget(QObject *);
+
+ QString property() const;
+ void setProperty(const QString &);
+
+ QString properties() const;
+ void setProperties(const QString &);
+
+ QDeclarativeListProperty<QObject> targets();
+ QDeclarativeListProperty<QObject> exclude();
+
+protected:
+ QDeclarativePropertyAnimation(QDeclarativePropertyAnimationPrivate &dd, QObject *parent);
+ virtual void transition(QDeclarativeStateActions &actions,
+ QDeclarativeProperties &modified,
+ TransitionDirection direction);
+ virtual QAbstractAnimation *qtAnimation();
+
+Q_SIGNALS:
+ void durationChanged(int);
+ void fromChanged(QVariant);
+ void toChanged(QVariant);
+ void easingChanged(const QEasingCurve &);
+ void propertiesChanged(const QString &);
+ void targetChanged(QObject *, const QString &);
+};
+
+class Q_AUTOTEST_EXPORT QDeclarativeColorAnimation : public QDeclarativePropertyAnimation
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativePropertyAnimation)
+ Q_PROPERTY(QColor from READ from WRITE setFrom NOTIFY fromChanged)
+ Q_PROPERTY(QColor to READ to WRITE setTo NOTIFY toChanged)
+
+public:
+ QDeclarativeColorAnimation(QObject *parent=0);
+ virtual ~QDeclarativeColorAnimation();
+
+ QColor from() const;
+ void setFrom(const QColor &);
+
+ QColor to() const;
+ void setTo(const QColor &);
+};
+
+class Q_AUTOTEST_EXPORT QDeclarativeNumberAnimation : public QDeclarativePropertyAnimation
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativePropertyAnimation)
+
+ Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged)
+ Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged)
+
+public:
+ QDeclarativeNumberAnimation(QObject *parent=0);
+ virtual ~QDeclarativeNumberAnimation();
+
+ qreal from() const;
+ void setFrom(qreal);
+
+ qreal to() const;
+ void setTo(qreal);
+};
+
+class Q_AUTOTEST_EXPORT QDeclarativeVector3dAnimation : public QDeclarativePropertyAnimation
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativePropertyAnimation)
+
+ Q_PROPERTY(QVector3D from READ from WRITE setFrom NOTIFY fromChanged)
+ Q_PROPERTY(QVector3D to READ to WRITE setTo NOTIFY toChanged)
+
+public:
+ QDeclarativeVector3dAnimation(QObject *parent=0);
+ virtual ~QDeclarativeVector3dAnimation();
+
+ QVector3D from() const;
+ void setFrom(QVector3D);
+
+ QVector3D to() const;
+ void setTo(QVector3D);
+};
+
+class QDeclarativeRotationAnimationPrivate;
+class Q_AUTOTEST_EXPORT QDeclarativeRotationAnimation : public QDeclarativePropertyAnimation
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeRotationAnimation)
+ Q_ENUMS(RotationDirection)
+
+ Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged)
+ Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged)
+ Q_PROPERTY(RotationDirection direction READ direction WRITE setDirection NOTIFY directionChanged)
+
+public:
+ QDeclarativeRotationAnimation(QObject *parent=0);
+ virtual ~QDeclarativeRotationAnimation();
+
+ qreal from() const;
+ void setFrom(qreal);
+
+ qreal to() const;
+ void setTo(qreal);
+
+ enum RotationDirection { Numerical, Shortest, Clockwise, Counterclockwise };
+ RotationDirection direction() const;
+ void setDirection(RotationDirection direction);
+
+Q_SIGNALS:
+ void directionChanged();
+};
+
+class QDeclarativeAnimationGroupPrivate;
+class QDeclarativeAnimationGroup : public QDeclarativeAbstractAnimation
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeAnimationGroup)
+
+ Q_CLASSINFO("DefaultProperty", "animations")
+ Q_PROPERTY(QDeclarativeListProperty<QDeclarativeAbstractAnimation> animations READ animations)
+
+public:
+ QDeclarativeAnimationGroup(QObject *parent);
+ virtual ~QDeclarativeAnimationGroup();
+
+ QDeclarativeListProperty<QDeclarativeAbstractAnimation> animations();
+ friend class QDeclarativeAbstractAnimation;
+
+protected:
+ QDeclarativeAnimationGroup(QDeclarativeAnimationGroupPrivate &dd, QObject *parent);
+};
+
+class QDeclarativeSequentialAnimation : public QDeclarativeAnimationGroup
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeAnimationGroup)
+
+public:
+ QDeclarativeSequentialAnimation(QObject *parent=0);
+ virtual ~QDeclarativeSequentialAnimation();
+
+protected:
+ virtual void transition(QDeclarativeStateActions &actions,
+ QDeclarativeProperties &modified,
+ TransitionDirection direction);
+ virtual QAbstractAnimation *qtAnimation();
+};
+
+class QDeclarativeParallelAnimation : public QDeclarativeAnimationGroup
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeAnimationGroup)
+
+public:
+ QDeclarativeParallelAnimation(QObject *parent=0);
+ virtual ~QDeclarativeParallelAnimation();
+
+protected:
+ virtual void transition(QDeclarativeStateActions &actions,
+ QDeclarativeProperties &modified,
+ TransitionDirection direction);
+ virtual QAbstractAnimation *qtAnimation();
+};
+
+class QDeclarativeParentAnimationPrivate;
+class QDeclarativeParentAnimation : public QDeclarativeAnimationGroup
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeParentAnimation)
+
+ Q_PROPERTY(QDeclarativeItem *target READ target WRITE setTarget)
+ Q_PROPERTY(QDeclarativeItem *newParent READ newParent WRITE setNewParent)
+ Q_PROPERTY(QDeclarativeItem *via READ via WRITE setVia)
+
+public:
+ QDeclarativeParentAnimation(QObject *parent=0);
+ virtual ~QDeclarativeParentAnimation();
+
+ QDeclarativeItem *target() const;
+ void setTarget(QDeclarativeItem *);
+
+ QDeclarativeItem *newParent() const;
+ void setNewParent(QDeclarativeItem *);
+
+ QDeclarativeItem *via() const;
+ void setVia(QDeclarativeItem *);
+
+protected:
+ virtual void transition(QDeclarativeStateActions &actions,
+ QDeclarativeProperties &modified,
+ TransitionDirection direction);
+ virtual QAbstractAnimation *qtAnimation();
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeAbstractAnimation)
+QML_DECLARE_TYPE(QDeclarativePauseAnimation)
+QML_DECLARE_TYPE(QDeclarativeScriptAction)
+QML_DECLARE_TYPE(QDeclarativePropertyAction)
+QML_DECLARE_TYPE(QDeclarativeParentAction)
+QML_DECLARE_TYPE(QDeclarativePropertyAnimation)
+QML_DECLARE_TYPE(QDeclarativeColorAnimation)
+QML_DECLARE_TYPE(QDeclarativeNumberAnimation)
+QML_DECLARE_TYPE(QDeclarativeSequentialAnimation)
+QML_DECLARE_TYPE(QDeclarativeParallelAnimation)
+QML_DECLARE_TYPE(QDeclarativeVector3dAnimation)
+QML_DECLARE_TYPE(QDeclarativeRotationAnimation)
+QML_DECLARE_TYPE(QDeclarativeParentAnimation)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEANIMATION_H
diff --git a/src/declarative/util/qdeclarativeanimation_p_p.h b/src/declarative/util/qdeclarativeanimation_p_p.h
new file mode 100644
index 0000000000..ae82a908f3
--- /dev/null
+++ b/src/declarative/util/qdeclarativeanimation_p_p.h
@@ -0,0 +1,398 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEANIMATION_P_H
+#define QDECLARATIVEANIMATION_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeanimation_p.h"
+
+#include "qdeclarativenullablevalue_p_p.h"
+#include "qdeclarativetimeline_p_p.h"
+
+#include <qdeclarative.h>
+#include <qdeclarativeitem.h>
+#include <qdeclarativecontext.h>
+
+#include <QtCore/QPauseAnimation>
+#include <QtCore/QVariantAnimation>
+#include <QtCore/QAnimationGroup>
+#include <QtGui/QColor>
+#include <QDebug>
+
+#include <private/qobject_p.h>
+#include <private/qvariantanimation_p.h>
+
+QT_BEGIN_NAMESPACE
+
+//interface for classes that provide animation actions for QActionAnimation
+class QAbstractAnimationAction
+{
+public:
+ virtual ~QAbstractAnimationAction() {}
+ virtual void doAction() = 0;
+};
+
+//templated animation action
+//allows us to specify an action that calls a function of a class.
+//(so that class doesn't have to inherit QDeclarativeAbstractAnimationAction)
+template<class T, void (T::*method)()>
+class QAnimationActionProxy : public QAbstractAnimationAction
+{
+public:
+ QAnimationActionProxy(T *p) : m_p(p) {}
+ virtual void doAction() { (m_p->*method)(); }
+
+private:
+ T *m_p;
+};
+
+//performs an action of type QAbstractAnimationAction
+class QActionAnimation : public QAbstractAnimation
+{
+ Q_OBJECT
+public:
+ QActionAnimation(QObject *parent = 0) : QAbstractAnimation(parent), animAction(0), policy(KeepWhenStopped), running(false) {}
+ QActionAnimation(QAbstractAnimationAction *action, QObject *parent = 0)
+ : QAbstractAnimation(parent), animAction(action), policy(KeepWhenStopped), running(false) {}
+ ~QActionAnimation() { if (policy == DeleteWhenStopped) { delete animAction; animAction = 0; } }
+ virtual int duration() const { return 0; }
+ void clearAnimAction()
+ {
+ if (policy == DeleteWhenStopped)
+ delete animAction;
+ animAction = 0;
+ }
+ void setAnimAction(QAbstractAnimationAction *action, DeletionPolicy p)
+ {
+ if (state() == Running)
+ stop();
+ if (policy == DeleteWhenStopped)
+ delete animAction;
+ animAction = action;
+ policy = p;
+ }
+protected:
+ virtual void updateCurrentTime(int) {}
+
+ virtual void updateState(State newState, State /*oldState*/)
+ {
+ if (newState == Running) {
+ if (animAction) {
+ running = true;
+ animAction->doAction();
+ running = false;
+ if (state() == Stopped && policy == DeleteWhenStopped) {
+ delete animAction;
+ animAction = 0;
+ }
+ }
+ } /*else if (newState == Stopped && policy == DeleteWhenStopped) {
+ if (!running) {
+ delete animAction;
+ animAction = 0;
+ }
+ }*/
+ }
+
+private:
+ QAbstractAnimationAction *animAction;
+ DeletionPolicy policy;
+ bool running;
+};
+
+class QDeclarativeBulkValueUpdater
+{
+public:
+ virtual ~QDeclarativeBulkValueUpdater() {}
+ virtual void setValue(qreal value) = 0;
+};
+
+//animates QDeclarativeBulkValueUpdater (assumes start and end values will be reals or compatible)
+class QDeclarativeBulkValueAnimator : public QVariantAnimation
+{
+ Q_OBJECT
+public:
+ QDeclarativeBulkValueAnimator(QObject *parent = 0) : QVariantAnimation(parent), animValue(0), fromSourced(0), policy(KeepWhenStopped) {}
+ ~QDeclarativeBulkValueAnimator() { if (policy == DeleteWhenStopped) { delete animValue; animValue = 0; } }
+ void setAnimValue(QDeclarativeBulkValueUpdater *value, DeletionPolicy p)
+ {
+ if (state() == Running)
+ stop();
+ if (policy == DeleteWhenStopped)
+ delete animValue;
+ animValue = value;
+ policy = p;
+ }
+ void setFromSourcedValue(bool *value)
+ {
+ fromSourced = value;
+ }
+protected:
+ virtual void updateCurrentValue(const QVariant &value)
+ {
+ if (state() == QAbstractAnimation::Stopped)
+ return;
+
+ if (animValue)
+ animValue->setValue(value.toReal());
+ }
+ virtual void updateState(State newState, State oldState)
+ {
+ QVariantAnimation::updateState(newState, oldState);
+ if (newState == Running) {
+ //check for new from every loop
+ if (fromSourced)
+ *fromSourced = false;
+ } /*else if (newState == Stopped && policy == DeleteWhenStopped) {
+ delete animValue;
+ animValue = 0;
+ }*/ //### we get a stop each loop if we are in a group
+ //### top-level animation is the only reliable one for this
+ }
+
+private:
+ QDeclarativeBulkValueUpdater *animValue;
+ bool *fromSourced;
+ DeletionPolicy policy;
+};
+
+//an animation that just gives a tick
+template<class T, void (T::*method)(int)>
+class QTickAnimationProxy : public QAbstractAnimation
+{
+ //Q_OBJECT //doesn't work with templating
+public:
+ QTickAnimationProxy(T *p, QObject *parent = 0) : QAbstractAnimation(parent), m_p(p) {}
+ virtual int duration() const { return -1; }
+protected:
+ virtual void updateCurrentTime(int msec) { (m_p->*method)(msec); }
+
+private:
+ T *m_p;
+};
+
+class QDeclarativeAbstractAnimationPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeAbstractAnimation)
+public:
+ QDeclarativeAbstractAnimationPrivate()
+ : running(false), paused(false), alwaysRunToEnd(false), repeat(false),
+ connectedTimeLine(false), componentComplete(true),
+ avoidPropertyValueSourceStart(false), disableUserControl(false), group(0) {}
+
+ bool running:1;
+ bool paused:1;
+ bool alwaysRunToEnd:1;
+ bool repeat:1;
+ bool connectedTimeLine:1;
+ bool componentComplete:1;
+ bool avoidPropertyValueSourceStart:1;
+ bool disableUserControl:1;
+
+ void commence();
+
+ QDeclarativeProperty defaultProperty;
+
+ QDeclarativeAnimationGroup *group;
+
+ static QDeclarativeProperty createProperty(QObject *obj, const QString &str, QObject *infoObj);
+};
+
+class QDeclarativePauseAnimationPrivate : public QDeclarativeAbstractAnimationPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativePauseAnimation)
+public:
+ QDeclarativePauseAnimationPrivate()
+ : QDeclarativeAbstractAnimationPrivate(), pa(0) {}
+
+ void init();
+
+ QPauseAnimation *pa;
+};
+
+class QDeclarativeScriptActionPrivate : public QDeclarativeAbstractAnimationPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeScriptAction)
+public:
+ QDeclarativeScriptActionPrivate()
+ : QDeclarativeAbstractAnimationPrivate(), hasRunScriptScript(false), proxy(this), rsa(0) {}
+
+ void init();
+
+ QDeclarativeScriptString script;
+ QString name;
+ QDeclarativeScriptString runScriptScript;
+ bool hasRunScriptScript;
+
+ void execute();
+
+ QAnimationActionProxy<QDeclarativeScriptActionPrivate,
+ &QDeclarativeScriptActionPrivate::execute> proxy;
+ QActionAnimation *rsa;
+};
+
+class QDeclarativePropertyActionPrivate : public QDeclarativeAbstractAnimationPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativePropertyAction)
+public:
+ QDeclarativePropertyActionPrivate()
+ : QDeclarativeAbstractAnimationPrivate(), target(0), spa(0) {}
+
+ void init();
+
+ QObject *target;
+ QString propertyName;
+ QString properties;
+ QList<QObject *> targets;
+ QList<QObject *> exclude;
+
+ QDeclarativeNullableValue<QVariant> value;
+
+ QActionAnimation *spa;
+};
+
+class QDeclarativeParentActionPrivate : public QDeclarativeAbstractAnimationPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeParentAction)
+public:
+ QDeclarativeParentActionPrivate()
+ : QDeclarativeAbstractAnimationPrivate(), pcTarget(0), pcParent(0) {}
+
+ void init();
+
+ QDeclarativeItem *pcTarget;
+ QDeclarativeItem *pcParent;
+
+ void doAction();
+ QActionAnimation *cpa;
+};
+
+class QDeclarativeAnimationGroupPrivate : public QDeclarativeAbstractAnimationPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeAnimationGroup)
+public:
+ QDeclarativeAnimationGroupPrivate()
+ : QDeclarativeAbstractAnimationPrivate(), ag(0) {}
+
+ static void append_animation(QDeclarativeListProperty<QDeclarativeAbstractAnimation> *list, QDeclarativeAbstractAnimation *role);
+ static void clear_animation(QDeclarativeListProperty<QDeclarativeAbstractAnimation> *list);
+ QList<QDeclarativeAbstractAnimation *> animations;
+ QAnimationGroup *ag;
+};
+
+class QDeclarativePropertyAnimationPrivate : public QDeclarativeAbstractAnimationPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativePropertyAnimation)
+public:
+ QDeclarativePropertyAnimationPrivate()
+ : QDeclarativeAbstractAnimationPrivate(), target(0), fromSourced(false), fromIsDefined(false), toIsDefined(false),
+ rangeIsSet(false), defaultToInterpolatorType(0), interpolatorType(0), interpolator(0), va(0) {}
+
+ void init();
+
+ QVariant from;
+ QVariant to;
+
+ QEasingCurve easing;
+
+ QObject *target;
+ QString propertyName;
+ QString properties;
+ QList<QObject *> targets;
+ QList<QObject *> exclude;
+ QString defaultProperties;
+
+ bool fromSourced;
+ bool fromIsDefined:1;
+ bool toIsDefined:1;
+ bool rangeIsSet:1;
+ bool defaultToInterpolatorType:1;
+ int interpolatorType;
+ QVariantAnimation::Interpolator interpolator;
+
+ QDeclarativeBulkValueAnimator *va;
+
+ static QVariant interpolateVariant(const QVariant &from, const QVariant &to, qreal progress);
+ static void convertVariant(QVariant &variant, int type);
+};
+
+class QDeclarativeRotationAnimationPrivate : public QDeclarativePropertyAnimationPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeRotationAnimation)
+public:
+ QDeclarativeRotationAnimationPrivate() : direction(QDeclarativeRotationAnimation::Shortest) {}
+
+ QDeclarativeRotationAnimation::RotationDirection direction;
+};
+
+class QDeclarativeParentAnimationPrivate : public QDeclarativeAnimationGroupPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeParentAnimation)
+public:
+ QDeclarativeParentAnimationPrivate()
+ : QDeclarativeAnimationGroupPrivate(), target(0), newParent(0),
+ via(0), topLevelGroup(0), startAction(0), endAction(0) {}
+
+ QDeclarativeItem *target;
+ QDeclarativeItem *newParent;
+ QDeclarativeItem *via;
+
+ QSequentialAnimationGroup *topLevelGroup;
+ QActionAnimation *startAction;
+ QActionAnimation *endAction;
+
+ QPointF computeTransformOrigin(QDeclarativeItem::TransformOrigin origin, qreal width, qreal height) const;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEANIMATION_P_H
diff --git a/src/declarative/util/qdeclarativebehavior.cpp b/src/declarative/util/qdeclarativebehavior.cpp
new file mode 100644
index 0000000000..d90ca33450
--- /dev/null
+++ b/src/declarative/util/qdeclarativebehavior.cpp
@@ -0,0 +1,194 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativebehavior_p.h"
+
+#include "qdeclarativeanimation_p.h"
+#include "qdeclarativetransition_p.h"
+
+#include <qdeclarativecontext.h>
+#include <qdeclarativeinfo.h>
+#include <qdeclarativeproperty_p.h>
+
+#include <QtCore/qparallelanimationgroup.h>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+
+
+class QDeclarativeBehaviorPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeBehavior)
+public:
+ QDeclarativeBehaviorPrivate() : animation(0), enabled(true) {}
+
+ QDeclarativeProperty property;
+ QVariant currentValue;
+ QDeclarativeAbstractAnimation *animation;
+ bool enabled;
+};
+
+/*!
+ \qmlclass Behavior QDeclarativeBehavior
+ \since 4.7
+ \brief The Behavior element allows you to specify a default animation for a property change.
+
+ Behaviors provide one way to specify \l{qdeclarativeanimation.html}{animations} in QML.
+
+ In the example below, the rectangle will use a bounce easing curve over 200 millisecond for any changes to its y property:
+ \code
+ Rectangle {
+ width: 20; height: 20
+ color: "#00ff00"
+ y: 200 // initial value
+ Behavior on y {
+ NumberAnimation {
+ easing: "easeOutBounce(amplitude:100)"
+ duration: 200
+ }
+ }
+ }
+ \endcode
+
+ Currently only a single Behavior may be specified for a property;
+ this Behavior can be enabled and disabled via the \l{enabled} property.
+*/
+
+
+QDeclarativeBehavior::QDeclarativeBehavior(QObject *parent)
+ : QObject(*(new QDeclarativeBehaviorPrivate), parent)
+{
+}
+
+QDeclarativeBehavior::~QDeclarativeBehavior()
+{
+}
+
+/*!
+ \qmlproperty Animation Behavior::animation
+ \default
+
+ The animation to use when the behavior is triggered.
+*/
+
+QDeclarativeAbstractAnimation *QDeclarativeBehavior::animation()
+{
+ Q_D(QDeclarativeBehavior);
+ return d->animation;
+}
+
+void QDeclarativeBehavior::setAnimation(QDeclarativeAbstractAnimation *animation)
+{
+ Q_D(QDeclarativeBehavior);
+ if (d->animation) {
+ qmlInfo(this) << tr("Cannot change the animation assigned to a Behavior.");
+ return;
+ }
+
+ d->animation = animation;
+ if (d->animation) {
+ d->animation->setDefaultTarget(d->property);
+ d->animation->setDisableUserControl();
+ }
+}
+
+/*!
+ \qmlproperty bool Behavior::enabled
+ Whether the Behavior will be triggered when the property it is tracking changes.
+
+ By default a Behavior is enabled.
+*/
+
+bool QDeclarativeBehavior::enabled() const
+{
+ Q_D(const QDeclarativeBehavior);
+ return d->enabled;
+}
+
+void QDeclarativeBehavior::setEnabled(bool enabled)
+{
+ Q_D(QDeclarativeBehavior);
+ if (d->enabled == enabled)
+ return;
+ d->enabled = enabled;
+ emit enabledChanged();
+}
+
+void QDeclarativeBehavior::write(const QVariant &value)
+{
+ Q_D(QDeclarativeBehavior);
+ qmlExecuteDeferred(this);
+ if (!d->animation || !d->enabled) {
+ QDeclarativePropertyPrivate::write(d->property, value, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
+ return;
+ }
+
+ d->currentValue = d->property.read();
+
+ d->animation->qtAnimation()->stop();
+
+ QDeclarativeStateOperation::ActionList actions;
+ QDeclarativeAction action;
+ action.property = d->property;
+ action.fromValue = d->currentValue;
+ action.toValue = value;
+ actions << action;
+
+ QList<QDeclarativeProperty> after;
+ if (d->animation)
+ d->animation->transition(actions, after, QDeclarativeAbstractAnimation::Forward);
+ d->animation->qtAnimation()->start();
+ if (!after.contains(d->property))
+ QDeclarativePropertyPrivate::write(d->property, value, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
+}
+
+void QDeclarativeBehavior::setTarget(const QDeclarativeProperty &property)
+{
+ Q_D(QDeclarativeBehavior);
+ d->property = property;
+ d->currentValue = property.read();
+ if (d->animation)
+ d->animation->setDefaultTarget(property);
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativebehavior_p.h b/src/declarative/util/qdeclarativebehavior_p.h
new file mode 100644
index 0000000000..ff5821028e
--- /dev/null
+++ b/src/declarative/util/qdeclarativebehavior_p.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEBEHAVIOR_H
+#define QDECLARATIVEBEHAVIOR_H
+
+#include "qdeclarativestate_p.h"
+
+#include <qdeclarativepropertyvaluesource.h>
+#include <qdeclarativepropertyvalueinterceptor.h>
+#include <qdeclarative.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeAbstractAnimation;
+class QDeclarativeBehaviorPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeBehavior : public QObject, public QDeclarativePropertyValueInterceptor
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeBehavior)
+
+ Q_INTERFACES(QDeclarativePropertyValueInterceptor)
+ Q_CLASSINFO("DefaultProperty", "animation")
+ Q_PROPERTY(QDeclarativeAbstractAnimation *animation READ animation WRITE setAnimation)
+ Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
+ Q_CLASSINFO("DeferredPropertyNames", "animation")
+
+public:
+ QDeclarativeBehavior(QObject *parent=0);
+ ~QDeclarativeBehavior();
+
+ virtual void setTarget(const QDeclarativeProperty &);
+ virtual void write(const QVariant &value);
+
+ QDeclarativeAbstractAnimation *animation();
+ void setAnimation(QDeclarativeAbstractAnimation *);
+
+ bool enabled() const;
+ void setEnabled(bool enabled);
+
+Q_SIGNALS:
+ void enabledChanged();
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeBehavior)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEBEHAVIOR_H
diff --git a/src/declarative/util/qdeclarativebind.cpp b/src/declarative/util/qdeclarativebind.cpp
new file mode 100644
index 0000000000..26baa3858a
--- /dev/null
+++ b/src/declarative/util/qdeclarativebind.cpp
@@ -0,0 +1,216 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativebind_p.h"
+
+#include "qdeclarativenullablevalue_p_p.h"
+
+#include <qdeclarativeengine.h>
+#include <qdeclarativecontext.h>
+#include <qdeclarativeproperty.h>
+
+#include <QtCore/qfile.h>
+#include <QtCore/qdebug.h>
+#include <QtScript/qscriptvalue.h>
+#include <QtScript/qscriptcontext.h>
+#include <QtScript/qscriptengine.h>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeBindPrivate : public QObjectPrivate
+{
+public:
+ QDeclarativeBindPrivate() : when(true), componentComplete(false), obj(0) {}
+
+ bool when : 1;
+ bool componentComplete : 1;
+ QObject *obj;
+ QString prop;
+ QDeclarativeNullableValue<QVariant> value;
+};
+
+
+/*!
+ \qmlclass Binding QDeclarativeBind
+ \since 4.7
+ \brief The Binding element allows arbitrary property bindings to be created.
+
+ Sometimes it is necessary to bind to a property of an object that wasn't
+ directly instantiated by QML - generally a property of a class exported
+ to QML by C++. In these cases, regular property binding doesn't work. Binding
+ allows you to bind any value to any property.
+
+ For example, imagine a C++ application that maps an "app.enteredText"
+ property into QML. You could use Binding to update the enteredText property
+ like this.
+ \code
+ TextEdit { id: myTextField; text: "Please type here..." }
+ Binding { target: app; property: "enteredText"; value: myTextField.text }
+ \endcode
+ Whenever the text in the TextEdit is updated, the C++ property will be
+ updated also.
+
+ If the binding target or binding property is changed, the bound value is
+ immediately pushed onto the new target.
+ */
+/*!
+ \internal
+ \class QDeclarativeBind
+ \ingroup group_utility
+ \brief The QDeclarativeBind class allows arbitrary property bindings to be created.
+
+ Simple bindings are usually earier to do in-place rather than creating a
+ QDeclarativeBind item. For that reason, QDeclarativeBind is usually used to transfer property information
+ from Qml to C++.
+
+ \sa cppqml
+ */
+QDeclarativeBind::QDeclarativeBind(QObject *parent)
+ : QObject(*(new QDeclarativeBindPrivate), parent)
+{
+}
+
+QDeclarativeBind::~QDeclarativeBind()
+{
+}
+
+/*!
+ \qmlproperty bool Binding::when
+
+ This property holds when the binding is active.
+ This should be set to an expression that evaluates to true when you want the binding to be active.
+
+ \code
+ Binding {
+ target: contactName; property: 'text'
+ value: name; when: list.ListView.isCurrentItem
+ }
+ \endcode
+*/
+bool QDeclarativeBind::when() const
+{
+ Q_D(const QDeclarativeBind);
+ return d->when;
+}
+
+void QDeclarativeBind::setWhen(bool v)
+{
+ Q_D(QDeclarativeBind);
+ d->when = v;
+ eval();
+}
+
+/*!
+ \qmlproperty Object Binding::target
+
+ The object to be updated.
+*/
+QObject *QDeclarativeBind::object()
+{
+ Q_D(const QDeclarativeBind);
+ return d->obj;
+}
+
+void QDeclarativeBind::setObject(QObject *obj)
+{
+ Q_D(QDeclarativeBind);
+ d->obj = obj;
+ eval();
+}
+
+/*!
+ \qmlproperty string Binding::property
+
+ The property to be updated.
+*/
+QString QDeclarativeBind::property() const
+{
+ Q_D(const QDeclarativeBind);
+ return d->prop;
+}
+
+void QDeclarativeBind::setProperty(const QString &p)
+{
+ Q_D(QDeclarativeBind);
+ d->prop = p;
+ eval();
+}
+
+/*!
+ \qmlproperty any Binding::value
+
+ The value to be set on the target object and property. This can be a
+ constant (which isn't very useful), or a bound expression.
+*/
+QVariant QDeclarativeBind::value() const
+{
+ Q_D(const QDeclarativeBind);
+ return d->value.value;
+}
+
+void QDeclarativeBind::setValue(const QVariant &v)
+{
+ Q_D(QDeclarativeBind);
+ d->value.value = v;
+ d->value.isNull = false;
+ eval();
+}
+
+void QDeclarativeBind::componentComplete()
+{
+ Q_D(QDeclarativeBind);
+ d->componentComplete = true;
+ eval();
+}
+
+void QDeclarativeBind::eval()
+{
+ Q_D(QDeclarativeBind);
+ if (!d->obj || d->value.isNull || !d->when || !d->componentComplete)
+ return;
+
+ QDeclarativeProperty prop(d->obj, d->prop);
+ prop.write(d->value.value);
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativebind_p.h b/src/declarative/util/qdeclarativebind_p.h
new file mode 100644
index 0000000000..f756e802c1
--- /dev/null
+++ b/src/declarative/util/qdeclarativebind_p.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEBIND_H
+#define QDECLARATIVEBIND_H
+
+#include <qdeclarative.h>
+
+#include <QtCore/qobject.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeBindPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeBind : public QObject, public QDeclarativeParserStatus
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeBind)
+ Q_INTERFACES(QDeclarativeParserStatus)
+ Q_PROPERTY(QObject *target READ object WRITE setObject)
+ Q_PROPERTY(QString property READ property WRITE setProperty)
+ Q_PROPERTY(QVariant value READ value WRITE setValue)
+ Q_PROPERTY(bool when READ when WRITE setWhen)
+
+public:
+ QDeclarativeBind(QObject *parent=0);
+ ~QDeclarativeBind();
+
+ bool when() const;
+ void setWhen(bool);
+
+ QObject *object();
+ void setObject(QObject *);
+
+ QString property() const;
+ void setProperty(const QString &);
+
+ QVariant value() const;
+ void setValue(const QVariant &);
+
+protected:
+ virtual void componentComplete();
+
+private:
+ void eval();
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeBind)
+
+QT_END_HEADER
+
+#endif
diff --git a/src/declarative/util/qdeclarativeconnections.cpp b/src/declarative/util/qdeclarativeconnections.cpp
new file mode 100644
index 0000000000..0b9e3aba7f
--- /dev/null
+++ b/src/declarative/util/qdeclarativeconnections.cpp
@@ -0,0 +1,245 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeconnections_p.h"
+
+#include <qdeclarativeexpression.h>
+#include <qdeclarativeproperty_p.h>
+#include <qdeclarativeboundsignal_p.h>
+#include <qdeclarativecontext.h>
+#include <qdeclarativeinfo.h>
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qstringlist.h>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeConnectionsPrivate : public QObjectPrivate
+{
+public:
+ QDeclarativeConnectionsPrivate() : target(0), componentcomplete(false) {}
+
+ QList<QDeclarativeBoundSignal*> boundsignals;
+ QObject *target;
+
+ bool componentcomplete;
+
+ QByteArray data;
+};
+
+/*!
+ \qmlclass Connections QDeclarativeConnections
+ \since 4.7
+ \brief A Connections object describes generalized connections to signals.
+
+ When connecting to signals in QML, the usual way is to create an
+ "on<Signal>" handler that reacts when a signal is received, like this:
+
+ \qml
+ MouseArea {
+ onClicked: { foo(...) }
+ }
+ \endqml
+
+ However, in some cases, it is not possible to connect to a signal in this
+ way, such as:
+
+ \list
+ \i multiple connections to the same signal
+ \i connections outside the scope of the signal sender
+ \i connections to targets not defined in QML
+ \endlist
+
+ When any of these are needed, the Connections object can be used instead.
+
+ For example, the above code can be changed to use a Connections object,
+ like this:
+
+ \qml
+ MouseArea {
+ Connections {
+ onClicked: foo(...)
+ }
+ }
+ \endqml
+
+ More generally, the Connections object can be a child of some other object than
+ the sender of the signal:
+
+ \qml
+ MouseArea {
+ id: area
+ }
+ ...
+ Connections {
+ target: area
+ onClicked: foo(...)
+ }
+ \endqml
+*/
+
+/*!
+ \internal
+ \class QDeclarativeConnections
+ \brief The QDeclarativeConnections class describes generalized connections to signals.
+
+*/
+QDeclarativeConnections::QDeclarativeConnections(QObject *parent) :
+ QObject(*(new QDeclarativeConnectionsPrivate), parent)
+{
+}
+
+QDeclarativeConnections::~QDeclarativeConnections()
+{
+}
+
+/*!
+ \qmlproperty Object Connections::target
+ This property holds the object that sends the signal.
+
+ By default, the target is assumed to be the parent of the Connections.
+*/
+QObject *QDeclarativeConnections::target() const
+{
+ Q_D(const QDeclarativeConnections);
+ return d->target ? d->target : parent();
+}
+
+void QDeclarativeConnections::setTarget(QObject *obj)
+{
+ Q_D(QDeclarativeConnections);
+ if (d->target == obj)
+ return;
+ foreach (QDeclarativeBoundSignal *s, d->boundsignals)
+ delete s;
+ d->boundsignals.clear();
+ d->target = obj;
+ connectSignals();
+ emit targetChanged();
+}
+
+
+QByteArray
+QDeclarativeConnectionsParser::compile(const QList<QDeclarativeCustomParserProperty> &props)
+{
+ QByteArray rv;
+ QDataStream ds(&rv, QIODevice::WriteOnly);
+
+ for(int ii = 0; ii < props.count(); ++ii)
+ {
+ QString propName = QString::fromUtf8(props.at(ii).name());
+ if (!propName.startsWith(QLatin1String("on")) || !propName.at(2).isUpper()) {
+ error(props.at(ii), QDeclarativeConnections::tr("Cannot assign to non-existent property \"%1\"").arg(propName));
+ return QByteArray();
+ }
+
+ QList<QVariant> values = props.at(ii).assignedValues();
+
+ for (int i = 0; i < values.count(); ++i) {
+ const QVariant &value = values.at(i);
+
+ if (value.userType() == qMetaTypeId<QDeclarativeCustomParserNode>()) {
+ error(props.at(ii), QDeclarativeConnections::tr("Connections: nested objects not allowed"));
+ return QByteArray();
+ } else if (value.userType() == qMetaTypeId<QDeclarativeCustomParserProperty>()) {
+ error(props.at(ii), QDeclarativeConnections::tr("Connections: syntax error"));
+ return QByteArray();
+ } else {
+ QDeclarativeParser::Variant v = qvariant_cast<QDeclarativeParser::Variant>(value);
+ if (v.isScript()) {
+ ds << propName;
+ ds << v.asScript();
+ } else {
+ error(props.at(ii), QDeclarativeConnections::tr("Connections: script expected"));
+ return QByteArray();
+ }
+ }
+ }
+ }
+
+ return rv;
+}
+
+void QDeclarativeConnectionsParser::setCustomData(QObject *object,
+ const QByteArray &data)
+{
+ QDeclarativeConnectionsPrivate *p =
+ static_cast<QDeclarativeConnectionsPrivate *>(QObjectPrivate::get(object));
+ p->data = data;
+}
+
+
+void QDeclarativeConnections::connectSignals()
+{
+ Q_D(QDeclarativeConnections);
+ if (!d->componentcomplete)
+ return;
+
+ QDataStream ds(d->data);
+ while (!ds.atEnd()) {
+ QString propName;
+ ds >> propName;
+ QString script;
+ ds >> script;
+ QDeclarativeProperty prop(target(), propName);
+ if (!prop.isValid()) {
+ qmlInfo(this) << tr("Cannot assign to non-existent property \"%1\"").arg(propName);
+ } else if (prop.type() & QDeclarativeProperty::SignalProperty) {
+ QDeclarativeBoundSignal *signal =
+ new QDeclarativeBoundSignal(target(), prop.method(), this);
+ signal->setExpression(new QDeclarativeExpression(qmlContext(this), script, 0));
+ d->boundsignals += signal;
+ } else {
+ qmlInfo(this) << tr("Cannot assign to non-existent property \"%1\"").arg(propName);
+ }
+ }
+}
+
+void QDeclarativeConnections::componentComplete()
+{
+ Q_D(QDeclarativeConnections);
+ d->componentcomplete=true;
+ connectSignals();
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativeconnections_p.h b/src/declarative/util/qdeclarativeconnections_p.h
new file mode 100644
index 0000000000..3eacf12cc4
--- /dev/null
+++ b/src/declarative/util/qdeclarativeconnections_p.h
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVECONNECTIONS_H
+#define QDECLARATIVECONNECTIONS_H
+
+#include <qdeclarative.h>
+#include <qdeclarativescriptstring.h>
+#include <private/qdeclarativecustomparser_p.h>
+
+#include <QtCore/qobject.h>
+#include <QtCore/qstring.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeBoundSignal;
+class QDeclarativeContext;
+class QDeclarativeConnectionsPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeConnections : public QObject, public QDeclarativeParserStatus
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeConnections)
+
+ Q_INTERFACES(QDeclarativeParserStatus)
+ Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged)
+
+public:
+ QDeclarativeConnections(QObject *parent=0);
+ ~QDeclarativeConnections();
+
+ QObject *target() const;
+ void setTarget(QObject *);
+
+Q_SIGNALS:
+ void targetChanged();
+
+private:
+ void connectSignals();
+ void componentComplete();
+};
+
+class QDeclarativeConnectionsParser : public QDeclarativeCustomParser
+{
+public:
+ virtual QByteArray compile(const QList<QDeclarativeCustomParserProperty> &);
+ virtual void setCustomData(QObject *, const QByteArray &);
+};
+
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeConnections)
+
+QT_END_HEADER
+
+#endif
diff --git a/src/declarative/util/qdeclarativeeasefollow.cpp b/src/declarative/util/qdeclarativeeasefollow.cpp
new file mode 100644
index 0000000000..ee181ddcd9
--- /dev/null
+++ b/src/declarative/util/qdeclarativeeasefollow.cpp
@@ -0,0 +1,537 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeeasefollow_p.h"
+
+#include "qdeclarativeanimation_p_p.h"
+
+#include <qdeclarativeproperty.h>
+
+#include <QtCore/qdebug.h>
+
+#include <math.h>
+
+QT_BEGIN_NAMESPACE
+
+
+
+class QDeclarativeEaseFollowPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeEaseFollow)
+public:
+ QDeclarativeEaseFollowPrivate()
+ : source(0), velocity(200), duration(-1), maximumEasingTime(-1),
+ reversingMode(QDeclarativeEaseFollow::Eased), initialVelocity(0),
+ initialValue(0), invert(false), enabled(true), trackVelocity(0), clockOffset(0),
+ lastTick(0), clock(this)
+ {}
+
+ qreal source;
+ qreal velocity;
+ qreal duration;
+ qreal maximumEasingTime;
+ QDeclarativeEaseFollow::ReversingMode reversingMode;
+
+ qreal initialVelocity;
+ qreal initialValue;
+ bool invert;
+ bool enabled;
+
+ qreal trackVelocity;
+
+ QDeclarativeProperty target;
+
+ int clockOffset;
+ int lastTick;
+ void tick(int);
+ void clockStart();
+ void clockStop();
+ QTickAnimationProxy<QDeclarativeEaseFollowPrivate, &QDeclarativeEaseFollowPrivate::tick> clock;
+
+ void restart();
+
+ // Parameters for use in tick()
+ qreal a; // Acceleration
+ qreal d; // Deceleration
+ qreal tf; // Total time
+ qreal tp; // Time at which peak velocity occurs
+ qreal td; // Time at which decelleration begins
+ qreal vp; // Velocity at tp
+ qreal sp; // Displacement at tp
+ qreal sd; // Displacement at td
+ qreal vi; // "Normalized" initialvelocity
+ bool recalc();
+};
+
+bool QDeclarativeEaseFollowPrivate::recalc()
+{
+ qreal s = source - initialValue;
+ vi = initialVelocity;
+
+ s = (invert?-1.0:1.0) * s;
+ vi = (invert?-1.0:1.0) * vi;
+
+ if (duration > 0 && velocity > 0) {
+ tf = s / velocity;
+ if (tf > (duration / 1000.)) tf = (duration / 1000.);
+ } else if (duration > 0) {
+ tf = duration / 1000.;
+ } else if (velocity > 0) {
+ tf = s / velocity;
+ } else {
+ return false;
+ }
+
+ if (maximumEasingTime == 0) {
+ a = 0;
+ d = 0;
+ tp = 0;
+ td = tf;
+ vp = velocity;
+ sp = 0;
+ sd = s;
+ } else if (maximumEasingTime != -1 && tf > (maximumEasingTime / 1000.)) {
+
+ qreal met = maximumEasingTime / 1000.;
+ td = tf - met;
+
+ qreal c1 = td;
+ qreal c2 = (tf - td) * vi - tf * velocity;
+ qreal c3 = -0.5 * (tf - td) * vi * vi;
+
+ qreal vp1 = (-c2 + sqrt(c2 * c2 - 4 * c1 * c3)) / (2. * c1);
+ // qreal vp2 = (-c2 - sqrt(c2 * c2 - 4 * c1 * c3)) / (2. * c1);
+
+ vp = vp1;
+ a = vp / met;
+ d = a;
+ tp = (vp - vi) / a;
+ sp = vi * tp + 0.5 * a * tp * tp;
+ sd = sp + (td - tp) * vp;
+ } else {
+
+ qreal c1 = 0.25 * tf * tf;
+ qreal c2 = 0.5 * vi * tf - s;
+ qreal c3 = -0.25 * vi * vi;
+
+ qreal a1 = (-c2 + sqrt(c2 * c2 - 4 * c1 * c3)) / (2. * c1);
+ //qreal a2 = (-c2 - sqrt(c2 * c2 - 4 * c1 * c3)) / (2. * c1);
+
+ qreal tp1 = 0.5 * tf - 0.5 * vi / a1;
+ //qreal tp2 = 0.5 * tf - 0.5 * vi / a2;
+ qreal vp1 = a1 * tp1 + vi;
+ //qreal vp2 = a2 * tp2 + vi;
+
+ qreal sp1 = 0.5 * a1 * tp1 * tp1 + vi * tp1;
+ //qreal sp2 = 0.5 * a2 * tp2 * tp2 + vi * tp2;
+
+ a = a1;
+ d = a1;
+ tp = tp1;
+ td = tp1;
+ vp = vp1;
+ sp = sp1;
+ sd = sp1;
+ }
+
+ /*
+ qWarning() << "a:" << a << "tf:" << tf << "tp:" << tp << "vp:"
+ << vp << "sp:" << sp << "vi:" << vi << "invert:" << invert;
+ */
+ return true;
+}
+
+void QDeclarativeEaseFollowPrivate::clockStart()
+{
+ if (clock.state() == QAbstractAnimation::Running) {
+ clockOffset = lastTick;
+ return;
+ } else {
+ clockOffset = 0;
+ lastTick = 0;
+ clock.start();
+ }
+}
+
+void QDeclarativeEaseFollowPrivate::clockStop()
+{
+ clockOffset = 0;
+ lastTick = 0;
+ clock.stop();
+}
+
+void QDeclarativeEaseFollowPrivate::tick(int t)
+{
+ lastTick = t;
+ t -= clockOffset;
+
+ qreal time_seconds = qreal(t) / 1000.;
+
+ qreal out = 0;
+ if (time_seconds < tp) {
+
+ trackVelocity = vi + time_seconds * a;
+ trackVelocity = (invert?-1.0:1.0) * trackVelocity;
+
+ qreal value = 0.5 * a * time_seconds * time_seconds + vi * time_seconds;
+ value = (invert?-1.0:1.0) * value;
+ target.write(initialValue + value);
+ out = initialValue + value;
+ } else if (time_seconds < td) {
+
+ time_seconds -= tp;
+ trackVelocity = (invert?-1.0:1.0) * vp;
+ qreal value = sp + time_seconds * vp;
+ value = (invert?-1.0:1.0) * value;
+
+ target.write(initialValue + value);
+
+ out = initialValue + value;
+ } else if (time_seconds < tf) {
+
+ time_seconds -= td;
+
+ trackVelocity = vp - time_seconds * a;
+ trackVelocity = (invert?-1.0:1.0) * trackVelocity;
+
+ qreal value = sd - 0.5 * d * time_seconds * time_seconds + vp * time_seconds;
+ value = (invert?-1.0:1.0) * value;
+
+ target.write(initialValue + value);
+
+ out = initialValue + value;
+ } else {
+
+ clock.stop();
+
+ trackVelocity = 0;
+ target.write(source);
+ }
+
+ //qWarning() << out << trackVelocity << t << a;
+}
+
+/*!
+ \qmlclass EaseFollow QDeclarativeEaseFollow
+ \since 4.7
+ \brief The EaseFollow element allows a property to smoothly track a value.
+
+ The EaseFollow smoothly animates a property's value to a set target value
+ using an ease in/out quad easing curve. If the target value changes while
+ the animation is in progress, the easing curves used to animate to the old
+ and the new target values are spliced together to avoid any obvious visual
+ glitches.
+
+ The property animation is configured by setting the velocity at which the
+ animation should occur, or the duration that the animation should take.
+ If both a velocity and a duration are specified, the one that results in
+ the quickest animation is chosen for each change in the target value.
+
+ For example, animating from 0 to 800 will take 4 seconds if a velocity
+ of 200 is set, will take 8 seconds with a duration of 8000 set, and will
+ take 4 seconds with both a velocity of 200 and a duration of 8000 set.
+ Animating from 0 to 20000 will take 10 seconds if a velocity of 200 is set,
+ will take 8 seconds with a duration of 8000 set, and will take 8 seconds
+ with both a velocity of 200 and a duration of 8000 set.
+
+ The follow example shows one rectangle tracking the position of another.
+\code
+import Qt 4.6
+
+Rectangle {
+ width: 800; height: 600; color: "blue"
+
+ Rectangle {
+ color: "green"
+ width: 60; height: 60;
+ x: -5; y: -5;
+ EaseFollow on x { source: rect1.x - 5; velocity: 200 }
+ EaseFollow on y { source: rect1.y - 5; velocity: 200 }
+ }
+
+ Rectangle {
+ id: rect1
+ color: "red"
+ width: 50; height: 50;
+ }
+
+ focus: true
+ Keys.onRightPressed: rect1.x = rect1.x + 100
+ Keys.onLeftPressed: rect1.x = rect1.x - 100
+ Keys.onUpPressed: rect1.y = rect1.y - 100
+ Keys.onDownPressed: rect1.y = rect1.y + 100
+}
+\endcode
+
+ The default velocity of EaseFollow is 200 units/second. Note that if the range of the
+ value being animated is small, then the velocity will need to be adjusted
+ appropriately. For example, the opacity of an item ranges from 0 - 1.0.
+ To enable a smooth animation in this range the velocity will need to be
+ set to a value such as 0.5 units/second. Animating from 0 to 1.0 with a velocity
+ of 0.5 will take 2000 ms to complete.
+
+ \sa SpringFollow
+*/
+
+QDeclarativeEaseFollow::QDeclarativeEaseFollow(QObject *parent)
+: QObject(*(new QDeclarativeEaseFollowPrivate), parent)
+{
+}
+
+QDeclarativeEaseFollow::~QDeclarativeEaseFollow()
+{
+}
+
+/*!
+ \qmlproperty qreal EaseFollow::source
+ This property holds the source value which will be tracked.
+
+ Bind to a property in order to track its changes.
+*/
+qreal QDeclarativeEaseFollow::sourceValue() const
+{
+ Q_D(const QDeclarativeEaseFollow);
+ return d->source;
+}
+
+/*!
+ \qmlproperty enumeration EaseFollow::reversingMode
+
+ Sets how the EaseFollow behaves if an animation direction is reversed.
+
+ If reversing mode is \c Eased, the animation will smoothly decelerate, and
+ then reverse direction. If the reversing mode is \c Immediate, the
+ animation will immediately begin accelerating in the reverse direction,
+ begining with a velocity of 0. If the reversing mode is \c Sync, the
+ property is immediately set to the target value.
+*/
+QDeclarativeEaseFollow::ReversingMode QDeclarativeEaseFollow::reversingMode() const
+{
+ Q_D(const QDeclarativeEaseFollow);
+ return d->reversingMode;
+}
+
+void QDeclarativeEaseFollow::setReversingMode(ReversingMode m)
+{
+ Q_D(QDeclarativeEaseFollow);
+ if (d->reversingMode == m)
+ return;
+
+ d->reversingMode = m;
+ emit reversingModeChanged();
+}
+
+void QDeclarativeEaseFollowPrivate::restart()
+{
+ if (!enabled || velocity == 0) {
+ clockStop();
+ return;
+ }
+
+ initialValue = target.read().toReal();
+
+ if (source == initialValue) {
+ clockStop();
+ return;
+ }
+
+ bool hasReversed = trackVelocity != 0. &&
+ ((trackVelocity > 0) == ((initialValue - source) > 0));
+
+ if (hasReversed) {
+ switch (reversingMode) {
+ default:
+ case QDeclarativeEaseFollow::Eased:
+ break;
+ case QDeclarativeEaseFollow::Sync:
+ target.write(source);
+ return;
+ case QDeclarativeEaseFollow::Immediate:
+ initialVelocity = 0;
+ clockStop();
+ break;
+ }
+ }
+
+ trackVelocity = initialVelocity;
+
+ invert = (source < initialValue);
+
+ if (!recalc()) {
+ target.write(source);
+ clockStop();
+ return;
+ }
+
+ clockStart();
+}
+
+void QDeclarativeEaseFollow::setSourceValue(qreal s)
+{
+ Q_D(QDeclarativeEaseFollow);
+
+ if (d->clock.state() == QAbstractAnimation::Running && d->source == s)
+ return;
+
+ d->source = s;
+ d->initialVelocity = d->trackVelocity;
+ d->restart();
+
+ emit sourceChanged();
+}
+
+/*!
+ \qmlproperty qreal EaseFollow::duration
+
+ This property holds the animation duration used when tracking the source.
+
+ Setting this to -1 (the default) disables the duration value.
+*/
+qreal QDeclarativeEaseFollow::duration() const
+{
+ Q_D(const QDeclarativeEaseFollow);
+ return d->duration;
+}
+
+void QDeclarativeEaseFollow::setDuration(qreal v)
+{
+ Q_D(QDeclarativeEaseFollow);
+ if (d->duration == v)
+ return;
+
+ d->duration = v;
+ d->trackVelocity = 0;
+
+ if (d->clock.state() == QAbstractAnimation::Running)
+ d->restart();
+
+ emit durationChanged();
+}
+
+qreal QDeclarativeEaseFollow::velocity() const
+{
+ Q_D(const QDeclarativeEaseFollow);
+ return d->velocity;
+}
+
+/*!
+ \qmlproperty qreal EaseFollow::velocity
+
+ This property holds the average velocity allowed when tracking the source.
+
+ The default velocity of EaseFollow is 200 units/second.
+
+ Setting this to -1 disables the velocity value.
+*/
+void QDeclarativeEaseFollow::setVelocity(qreal v)
+{
+ Q_D(QDeclarativeEaseFollow);
+ if (d->velocity == v)
+ return;
+
+ d->velocity = v;
+ d->trackVelocity = 0;
+
+ if (d->clock.state() == QAbstractAnimation::Running)
+ d->restart();
+
+ emit velocityChanged();
+}
+
+/*!
+ \qmlproperty bool EaseFollow::enabled
+ This property holds whether the target will track the source.
+*/
+bool QDeclarativeEaseFollow::enabled() const
+{
+ Q_D(const QDeclarativeEaseFollow);
+ return d->enabled;
+}
+
+void QDeclarativeEaseFollow::setEnabled(bool enabled)
+{
+ Q_D(QDeclarativeEaseFollow);
+ if (d->enabled == enabled)
+ return;
+
+ d->enabled = enabled;
+ if (enabled)
+ d->restart();
+ else
+ d->clockStop();
+
+ emit enabledChanged();
+}
+
+void QDeclarativeEaseFollow::setTarget(const QDeclarativeProperty &t)
+{
+ Q_D(QDeclarativeEaseFollow);
+ d->target = t;
+}
+
+/*!
+\qmlproperty qreal EaseFollow::maximumEasingTime
+
+This property specifies the maximum time an "eases" during the follow should take.
+Setting this property causes the velocity to "level out" after at a time. Setting
+a negative value reverts to the normal mode of easing over the entire animation
+duration.
+
+The default value is -1.
+*/
+qreal QDeclarativeEaseFollow::maximumEasingTime() const
+{
+ Q_D(const QDeclarativeEaseFollow);
+ return d->maximumEasingTime;
+}
+
+void QDeclarativeEaseFollow::setMaximumEasingTime(qreal v)
+{
+ Q_D(QDeclarativeEaseFollow);
+ d->maximumEasingTime = v;
+
+ if (d->clock.state() == QAbstractAnimation::Running)
+ d->restart();
+
+ emit maximumEasingTimeChanged();
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativeeasefollow_p.h b/src/declarative/util/qdeclarativeeasefollow_p.h
new file mode 100644
index 0000000000..83d1eff8b6
--- /dev/null
+++ b/src/declarative/util/qdeclarativeeasefollow_p.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEEASEFOLLOW_H
+#define QDECLARATIVEEASEFOLLOW_H
+
+#include <qdeclarative.h>
+#include <qdeclarativepropertyvaluesource.h>
+
+#include <QtCore/qobject.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeProperty;
+class QDeclarativeEaseFollowPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeEaseFollow : public QObject,
+ public QDeclarativePropertyValueSource
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeEaseFollow)
+ Q_INTERFACES(QDeclarativePropertyValueSource)
+ Q_ENUMS(ReversingMode)
+
+ Q_PROPERTY(qreal source READ sourceValue WRITE setSourceValue NOTIFY sourceChanged)
+ Q_PROPERTY(qreal velocity READ velocity WRITE setVelocity NOTIFY velocityChanged)
+ Q_PROPERTY(qreal duration READ duration WRITE setDuration NOTIFY durationChanged)
+ Q_PROPERTY(ReversingMode reversingMode READ reversingMode WRITE setReversingMode NOTIFY reversingModeChanged)
+ Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
+ Q_PROPERTY(qreal maximumEasingTime READ maximumEasingTime WRITE setMaximumEasingTime NOTIFY maximumEasingTimeChanged)
+
+public:
+ enum ReversingMode { Eased, Immediate, Sync };
+
+ QDeclarativeEaseFollow(QObject *parent = 0);
+ ~QDeclarativeEaseFollow();
+
+ ReversingMode reversingMode() const;
+ void setReversingMode(ReversingMode);
+
+ qreal sourceValue() const;
+ void setSourceValue(qreal);
+
+ qreal velocity() const;
+ void setVelocity(qreal);
+
+ qreal duration() const;
+ void setDuration(qreal);
+
+ bool enabled() const;
+ void setEnabled(bool enabled);
+
+ qreal maximumEasingTime() const;
+ void setMaximumEasingTime(qreal);
+
+ virtual void setTarget(const QDeclarativeProperty &);
+
+Q_SIGNALS:
+ void sourceChanged();
+ void velocityChanged();
+ void durationChanged();
+ void reversingModeChanged();
+ void enabledChanged();
+ void maximumEasingTimeChanged();
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeEaseFollow);
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEEASEFOLLOW_H
diff --git a/src/declarative/util/qdeclarativefontloader.cpp b/src/declarative/util/qdeclarativefontloader.cpp
new file mode 100644
index 0000000000..8f5f53758a
--- /dev/null
+++ b/src/declarative/util/qdeclarativefontloader.cpp
@@ -0,0 +1,241 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativefontloader_p.h"
+
+#include <qdeclarativecontext.h>
+#include <qdeclarativeengine.h>
+
+#include <QStringList>
+#include <QUrl>
+#include <QDebug>
+#include <QNetworkRequest>
+#include <QNetworkReply>
+#include <QFile>
+#include <QFontDatabase>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeFontLoaderPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeFontLoader)
+
+public:
+ QDeclarativeFontLoaderPrivate() : reply(0), status(QDeclarativeFontLoader::Null) {}
+
+ void addFontToDatabase(const QByteArray &);
+
+ QUrl url;
+ QString name;
+ QNetworkReply *reply;
+ QDeclarativeFontLoader::Status status;
+};
+
+
+
+/*!
+ \qmlclass FontLoader QDeclarativeFontLoader
+ \since 4.7
+ \ingroup group_utility
+ \brief This item allows using fonts by name or url.
+
+ Example:
+ \qml
+ FontLoader { id: fixedFont; name: "Courier" }
+ FontLoader { id: webFont; source: "http://www.mysite.com/myfont.ttf" }
+
+ Text { text: "Fixed-size font"; font.family: fixedFont.name }
+ Text { text: "Fancy font"; font.family: webFont.name }
+ \endqml
+*/
+QDeclarativeFontLoader::QDeclarativeFontLoader(QObject *parent)
+ : QObject(*(new QDeclarativeFontLoaderPrivate), parent)
+{
+}
+
+QDeclarativeFontLoader::~QDeclarativeFontLoader()
+{
+}
+
+static QString toLocalFileOrQrc(const QUrl& url)
+{
+ QString r = url.toLocalFile();
+ if (r.isEmpty() && url.scheme() == QLatin1String("qrc"))
+ r = QLatin1Char(':') + url.path();
+ return r;
+}
+
+
+/*!
+ \qmlproperty url FontLoader::source
+ The url of the font to load.
+*/
+QUrl QDeclarativeFontLoader::source() const
+{
+ Q_D(const QDeclarativeFontLoader);
+ return d->url;
+}
+
+void QDeclarativeFontLoader::setSource(const QUrl &url)
+{
+ Q_D(QDeclarativeFontLoader);
+ if (url == d->url)
+ return;
+ d->url = qmlContext(this)->resolvedUrl(url);
+
+ d->status = Loading;
+ emit statusChanged();
+#ifndef QT_NO_LOCALFILE_OPTIMIZED_QML
+ QString lf = toLocalFileOrQrc(d->url);
+ if (!lf.isEmpty()) {
+ int id = QFontDatabase::addApplicationFont(lf);
+ if (id != -1) {
+ d->name = QFontDatabase::applicationFontFamilies(id).at(0);
+ emit nameChanged();
+ d->status = QDeclarativeFontLoader::Ready;
+ } else {
+ d->status = QDeclarativeFontLoader::Error;
+ qWarning() << "Cannot load font:" << url;
+ }
+ 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()));
+ }
+}
+
+/*!
+ \qmlproperty string FontLoader::name
+
+ This property holds the name of the font family.
+ It is set automatically when a font is loaded using the \c url property.
+
+ Use this to set the \c font.family property of a \c Text item.
+
+ Example:
+ \qml
+ FontLoader { id: webFont; source: "http://www.mysite.com/myfont.ttf" }
+ Text { text: "Fancy font"; font.family: webFont.name }
+ \endqml
+*/
+QString QDeclarativeFontLoader::name() const
+{
+ Q_D(const QDeclarativeFontLoader);
+ return d->name;
+}
+
+void QDeclarativeFontLoader::setName(const QString &name)
+{
+ Q_D(QDeclarativeFontLoader);
+ if (d->name == name )
+ return;
+ d->name = name;
+ emit nameChanged();
+ d->status = Ready;
+ emit statusChanged();
+}
+
+/*!
+ \qmlproperty enum FontLoader::status
+
+ This property holds the status of font loading. It can be one of:
+ \list
+ \o Null - no font has been set
+ \o Ready - the font has been loaded
+ \o Loading - the font is currently being loaded
+ \o Error - an error occurred while loading the font
+ \endlist
+
+ Note that a change in the status property does not cause anything to happen
+ (although it reflects what has happened to the font loader internally). If you wish
+ to react to the change in status you need to do it yourself, for example in one
+ of the following ways:
+ \list
+ \o Create a state, so that a state change occurs, e.g. State{name: 'loaded'; when: loader.status = FontLoader.Ready;}
+ \o Do something inside the onStatusChanged signal handler, e.g. FontLoader{id: loader; onStatusChanged: if(loader.status == FontLoader.Ready) console.log('Loaded');}
+ \o Bind to the status variable somewhere, e.g. Text{text: if(loader.status!=FontLoader.Ready){'Not Loaded';}else{'Loaded';}}
+ \endlist
+*/
+QDeclarativeFontLoader::Status QDeclarativeFontLoader::status() const
+{
+ Q_D(const QDeclarativeFontLoader);
+ return d->status;
+}
+
+void QDeclarativeFontLoader::replyFinished()
+{
+ Q_D(QDeclarativeFontLoader);
+ if (d->reply) {
+ if (!d->reply->error()) {
+ QByteArray ba = d->reply->readAll();
+ d->addFontToDatabase(ba);
+ } else {
+ d->status = Error;
+ 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;
+ qWarning() << "Cannot load font:" << url;
+ }
+ emit q->statusChanged();
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativefontloader_p.h b/src/declarative/util/qdeclarativefontloader_p.h
new file mode 100644
index 0000000000..14335ab098
--- /dev/null
+++ b/src/declarative/util/qdeclarativefontloader_p.h
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEFONTLOADER_H
+#define QDECLARATIVEFONTLOADER_H
+
+#include <qdeclarative.h>
+
+#include <QtCore/qobject.h>
+#include <QtCore/qurl.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeFontLoaderPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeFontLoader : public QObject
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeFontLoader)
+ Q_ENUMS(Status)
+
+ Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
+ Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
+ Q_PROPERTY(Status status READ status NOTIFY statusChanged)
+
+public:
+ enum Status { Null = 0, Ready, Loading, Error };
+
+ QDeclarativeFontLoader(QObject *parent = 0);
+ ~QDeclarativeFontLoader();
+
+ QUrl source() const;
+ void setSource(const QUrl &url);
+
+ QString name() const;
+ void setName(const QString &name);
+
+ Status status() const;
+
+private Q_SLOTS:
+ void replyFinished();
+
+Q_SIGNALS:
+ void nameChanged();
+ void statusChanged();
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeFontLoader)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEFONTLOADER_H
+
diff --git a/src/declarative/util/qdeclarativelistaccessor.cpp b/src/declarative/util/qdeclarativelistaccessor.cpp
new file mode 100644
index 0000000000..4e569093bd
--- /dev/null
+++ b/src/declarative/util/qdeclarativelistaccessor.cpp
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativelistaccessor_p.h"
+
+#include <qdeclarativemetatype_p.h>
+
+#include <QtCore/qstringlist.h>
+#include <QtCore/qdebug.h>
+
+// ### Remove me
+#include <qdeclarativeengine_p.h>
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeListAccessor::QDeclarativeListAccessor()
+: m_type(Invalid)
+{
+}
+
+QDeclarativeListAccessor::~QDeclarativeListAccessor()
+{
+}
+
+QVariant QDeclarativeListAccessor::list() const
+{
+ return d;
+}
+
+void QDeclarativeListAccessor::setList(const QVariant &v, QDeclarativeEngine *engine)
+{
+ d = v;
+
+ QDeclarativeEnginePrivate *enginePrivate = engine?QDeclarativeEnginePrivate::get(engine):0;
+
+ if (!d.isValid()) {
+ m_type = Invalid;
+ } else if (d.userType() == QVariant::StringList) {
+ m_type = StringList;
+ } else if (d.userType() == QMetaType::QVariantList) {
+ m_type = VariantList;
+ } else if (d.canConvert(QVariant::Int)) {
+ m_type = Integer;
+ } else if ((!enginePrivate && QDeclarativeMetaType::isQObject(d.userType())) ||
+ (enginePrivate && enginePrivate->isQObject(d.userType()))) {
+ QObject *data = enginePrivate?enginePrivate->toQObject(v):QDeclarativeMetaType::toQObject(v);
+ d = QVariant::fromValue(data);
+ m_type = Instance;
+ } else if (d.userType() == qMetaTypeId<QDeclarativeListReference>()) {
+ m_type = ListProperty;
+ } else {
+ m_type = Instance;
+ }
+}
+
+int QDeclarativeListAccessor::count() const
+{
+ switch(m_type) {
+ case StringList:
+ return qvariant_cast<QStringList>(d).count();
+ case VariantList:
+ return qvariant_cast<QVariantList>(d).count();
+ case ListProperty:
+ return ((QDeclarativeListReference *)d.constData())->count();
+ case Instance:
+ return 1;
+ case Integer:
+ return d.toInt();
+ default:
+ case Invalid:
+ return 0;
+ }
+}
+
+QVariant QDeclarativeListAccessor::at(int idx) const
+{
+ Q_ASSERT(idx >= 0 && idx < count());
+ switch(m_type) {
+ case StringList:
+ return QVariant::fromValue(qvariant_cast<QStringList>(d).at(idx));
+ case VariantList:
+ return qvariant_cast<QVariantList>(d).at(idx);
+ case ListProperty:
+ return QVariant::fromValue(((QDeclarativeListReference *)d.constData())->at(idx));
+ case Instance:
+ return d;
+ case Integer:
+ return QVariant(idx);
+ default:
+ case Invalid:
+ return QVariant();
+ }
+}
+
+bool QDeclarativeListAccessor::isValid() const
+{
+ return m_type != Invalid;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativelistaccessor_p.h b/src/declarative/util/qdeclarativelistaccessor_p.h
new file mode 100644
index 0000000000..d8bb8af057
--- /dev/null
+++ b/src/declarative/util/qdeclarativelistaccessor_p.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVELISTACCESSOR_H
+#define QDECLARATIVELISTACCESSOR_H
+
+#include <QtCore/QVariant>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeEngine;
+class Q_DECLARATIVE_EXPORT QDeclarativeListAccessor
+{
+public:
+ QDeclarativeListAccessor();
+ ~QDeclarativeListAccessor();
+
+ QVariant list() const;
+ void setList(const QVariant &, QDeclarativeEngine * = 0);
+
+ bool isValid() const;
+
+ int count() const;
+ QVariant at(int) const;
+
+ enum Type { Invalid, StringList, VariantList, ListProperty, Instance, Integer };
+ Type type() const { return m_type; }
+
+private:
+ Type m_type;
+ QVariant d;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVELISTACCESSOR_H
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp
new file mode 100644
index 0000000000..e3f26d79fa
--- /dev/null
+++ b/src/declarative/util/qdeclarativelistmodel.cpp
@@ -0,0 +1,985 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativelistmodel_p.h"
+
+#include "qdeclarativeopenmetaobject_p.h"
+
+#include <qdeclarativecustomparser_p.h>
+#include <qdeclarativeparser_p.h>
+#include <qdeclarativeengine_p.h>
+#include <qdeclarativecontext.h>
+#include <qdeclarativeinfo.h>
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qstack.h>
+#include <QXmlStreamReader>
+#include <QtScript/qscriptvalueiterator.h>
+
+Q_DECLARE_METATYPE(QListModelInterface *)
+
+QT_BEGIN_NAMESPACE
+
+#define DATA_ROLE_ID 1
+#define DATA_ROLE_NAME "data"
+
+QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListModelData::instructions() const
+{
+ return (QDeclarativeListModelParser::ListInstruction *)((char *)this + sizeof(ListModelData));
+}
+
+static void dump(ModelNode *node, int ind);
+
+/*!
+ \qmlclass ListModel QDeclarativeListModel
+ \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:
+
+ For example:
+
+ \code
+ ListModel {
+ id: fruitModel
+ ListElement {
+ name: "Apple"
+ cost: 2.45
+ }
+ ListElement {
+ name: "Orange"
+ cost: 3.25
+ }
+ ListElement {
+ name: "Banana"
+ cost: 1.95
+ }
+ }
+ \endcode
+
+ Roles (properties) must begin with a lower-case letter. The above example defines a
+ ListModel containing three elements, with the roles "name" and "cost".
+
+ The defined model can be used in views such as ListView:
+ \code
+ Component {
+ id: fruitDelegate
+ Item {
+ width: 200; height: 50
+ Text { text: name }
+ Text { text: '$'+cost; anchors.right: parent.right }
+ }
+ }
+
+ ListView {
+ model: fruitModel
+ delegate: fruitDelegate
+ anchors.fill: parent
+ }
+ \endcode
+
+ It is possible for roles to contain list data. In the example below we create a list of fruit attributes:
+
+ \code
+ ListModel {
+ id: fruitModel
+ ListElement {
+ name: "Apple"
+ cost: 2.45
+ attributes: [
+ ListElement { description: "Core" },
+ ListElement { description: "Deciduous" }
+ ]
+ }
+ ListElement {
+ name: "Orange"
+ cost: 3.25
+ attributes: [
+ ListElement { description: "Citrus" }
+ ]
+ }
+ ListElement {
+ name: "Banana"
+ cost: 1.95
+ attributes: [
+ ListElement { description: "Tropical" },
+ ListElement { description: "Seedless" }
+ ]
+ }
+ }
+ \endcode
+
+ The delegate below will list all the fruit attributes:
+ \code
+ Component {
+ id: fruitDelegate
+ Item {
+ width: 200; height: 50
+ Text { id: name; text: name }
+ Text { text: '$'+cost; anchors.right: parent.right }
+ Row {
+ anchors.top: name.bottom
+ spacing: 5
+ Text { text: "Attributes:" }
+ Repeater {
+ dataSource: attributes
+ Component { Text { text: description } }
+ }
+ }
+ }
+ }
+ \endcode
+
+ The content of a ListModel may be created and modified using the clear(),
+ append(), and set() methods. For example:
+
+ \code
+ Component {
+ id: fruitDelegate
+ Item {
+ width: 200; height: 50
+ Text { text: name }
+ Text { text: '$'+cost; anchors.right: parent.right }
+
+ // Double the price when clicked.
+ MouseArea {
+ anchors.fill: parent
+ onClicked: fruitModel.set(index, "cost", cost*2)
+ }
+ }
+ }
+ \endcode
+
+ When creating content dynamically, note that the set of available properties cannot be changed
+ except by first clearing the model - whatever properties are first added are then the
+ only permitted properties in the model.
+
+ \sa {qmlmodels}{Data Models}
+*/
+
+class ModelObject : public QObject
+{
+ Q_OBJECT
+public:
+ ModelObject();
+
+ void setValue(const QByteArray &name, const QVariant &val)
+ {
+ _mo->setValue(name, val);
+ }
+
+private:
+ QDeclarativeOpenMetaObject *_mo;
+};
+
+struct ModelNode
+{
+ ModelNode();
+ ~ModelNode();
+
+ QList<QVariant> values;
+ QHash<QString, ModelNode *> properties;
+
+ QDeclarativeListModel *model(const QDeclarativeListModel *parent) {
+ if (!modelCache) {
+ modelCache = new QDeclarativeListModel;
+ QDeclarativeEngine::setContextForObject(modelCache,QDeclarativeEngine::contextForObject(parent));
+
+ modelCache->_root = this;
+ }
+ return modelCache;
+ }
+
+ ModelObject *object(const QDeclarativeListModel *parent) {
+ if (!objectCache) {
+ objectCache = new ModelObject();
+ QHash<QString, ModelNode *>::iterator it;
+ for (it = properties.begin(); it != properties.end(); ++it) {
+ objectCache->setValue(it.key().toUtf8(), parent->valueForNode(*it));
+ }
+ }
+ return objectCache;
+ }
+
+ void setObjectValue(const QScriptValue& valuemap);
+ void setListValue(const QScriptValue& valuelist);
+
+ void setProperty(const QString& prop, const QVariant& val) {
+ QHash<QString, ModelNode *>::const_iterator it = properties.find(prop);
+ if (it != properties.end()) {
+ (*it)->values[0] = val;
+ } else {
+ ModelNode *n = new ModelNode;
+ n->values << val;
+ properties.insert(prop,n);
+ }
+ if (objectCache)
+ objectCache->setValue(prop.toUtf8(), val);
+ }
+
+ QDeclarativeListModel *modelCache;
+ ModelObject *objectCache;
+ bool isArray;
+};
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(ModelNode *)
+
+QT_BEGIN_NAMESPACE
+
+void ModelNode::setObjectValue(const QScriptValue& valuemap) {
+ QScriptValueIterator it(valuemap);
+ while (it.hasNext()) {
+ it.next();
+ ModelNode *value = new ModelNode;
+ QScriptValue v = it.value();
+ if (v.isArray()) {
+ value->isArray = true;
+ value->setListValue(v);
+ } else {
+ value->values << v.toVariant();
+ }
+ properties.insert(it.name(),value);
+ }
+}
+
+void ModelNode::setListValue(const QScriptValue& valuelist) {
+ QScriptValueIterator it(valuelist);
+ values.clear();
+ while (it.hasNext()) {
+ it.next();
+ ModelNode *value = new ModelNode;
+ QScriptValue v = it.value();
+ if (v.isArray()) {
+ value->isArray = true;
+ value->setListValue(v);
+ } else if (v.isObject()) {
+ value->setObjectValue(v);
+ } else {
+ value->values << v.toVariant();
+ }
+ values.append(qVariantFromValue(value));
+
+ }
+}
+
+
+ModelObject::ModelObject()
+: _mo(new QDeclarativeOpenMetaObject(this))
+{
+}
+
+QDeclarativeListModel::QDeclarativeListModel(QObject *parent)
+: QListModelInterface(parent), _rolesOk(false), _root(0)
+{
+}
+
+QDeclarativeListModel::~QDeclarativeListModel()
+{
+ delete _root;
+}
+
+void QDeclarativeListModel::checkRoles() const
+{
+ if (_rolesOk || !_root)
+ return;
+
+ for (int ii = 0; ii < _root->values.count(); ++ii) {
+ ModelNode *node = qvariant_cast<ModelNode *>(_root->values.at(ii));
+ if (node) {
+ foreach (const QString &role, node->properties.keys())
+ addRole(role);
+ }
+ }
+
+ _rolesOk = true;
+}
+
+void QDeclarativeListModel::addRole(const QString &role) const
+{
+ if (!roleStrings.contains(role))
+ roleStrings << role;
+}
+
+QList<int> QDeclarativeListModel::roles() const
+{
+ checkRoles();
+ QList<int> rv;
+ for (int ii = 0; ii < roleStrings.count(); ++ii)
+ rv << ii;
+ return rv;
+}
+
+QString QDeclarativeListModel::toString(int role) const
+{
+ checkRoles();
+ if (role < roleStrings.count())
+ return roleStrings.at(role);
+ else
+ return QString();
+}
+
+QVariant QDeclarativeListModel::valueForNode(ModelNode *node) const
+{
+ QObject *rv = 0;
+
+ if (node->isArray) {
+ // List
+ rv = node->model(this);
+ } else {
+ if (!node->properties.isEmpty()) {
+ // Object
+ rv = node->object(this);
+ } else if (node->values.count() == 0) {
+ // Invalid
+ return QVariant();
+ } else if (node->values.count() == 1) {
+ // Value
+ QVariant &var = node->values[0];
+ ModelNode *valueNode = qvariant_cast<ModelNode *>(var);
+ if (valueNode) {
+ if (!valueNode->properties.isEmpty())
+ rv = valueNode->object(this);
+ else
+ rv = valueNode->model(this);
+ } else {
+ return var;
+ }
+ }
+ }
+
+ if (rv)
+ return QVariant::fromValue(rv);
+ else
+ return QVariant();
+}
+
+QHash<int,QVariant> QDeclarativeListModel::data(int index, const QList<int> &roles) const
+{
+ checkRoles();
+ QHash<int, QVariant> rv;
+ if (index >= count() || index < 0)
+ return rv;
+
+ ModelNode *node = qvariant_cast<ModelNode *>(_root->values.at(index));
+ if (!node)
+ return rv;
+
+ for (int ii = 0; ii < roles.count(); ++ii) {
+ const QString &roleString = roleStrings.at(roles.at(ii));
+
+ QHash<QString, ModelNode *>::ConstIterator iter =
+ node->properties.find(roleString);
+ if (iter != node->properties.end()) {
+ ModelNode *row = *iter;
+ rv.insert(roles.at(ii), valueForNode(row));
+ }
+ }
+
+ return rv;
+}
+
+QVariant QDeclarativeListModel::data(int index, int role) const
+{
+ checkRoles();
+ QVariant rv;
+ if (index >= count() || index < 0)
+ return rv;
+
+ ModelNode *node = qvariant_cast<ModelNode *>(_root->values.at(index));
+ if (!node)
+ return rv;
+
+ const QString &roleString = roleStrings.at(role);
+
+ QHash<QString, ModelNode *>::ConstIterator iter =
+ node->properties.find(roleString);
+ if (iter != node->properties.end()) {
+ ModelNode *row = *iter;
+ rv = valueForNode(row);
+ }
+
+ return rv;
+}
+
+/*!
+ \qmlproperty int ListModel::count
+ The number of data entries in the model.
+*/
+int QDeclarativeListModel::count() const
+{
+ if (!_root) return 0;
+ return _root->values.count();
+}
+
+/*!
+ \qmlmethod ListModel::clear()
+
+ Deletes all content from the model. The properties are cleared such that
+ different properties may be set on subsequent additions.
+
+ \sa append() remove()
+*/
+void QDeclarativeListModel::clear()
+{
+ int cleared = count();
+ _rolesOk = false;
+ delete _root;
+ _root = 0;
+ roleStrings.clear();
+ emit itemsRemoved(0,cleared);
+ emit countChanged(0);
+}
+
+/*!
+ \qmlmethod ListModel::remove(int index)
+
+ Deletes the content at \a index from the model.
+
+ \sa clear()
+*/
+void QDeclarativeListModel::remove(int index)
+{
+ if (!_root || index < 0 || index >= _root->values.count()) {
+ qmlInfo(this) << tr("remove: index %1 out of range").arg(index);
+ return;
+ }
+
+ ModelNode *node = qvariant_cast<ModelNode *>(_root->values.at(index));
+ _root->values.removeAt(index);
+ if (node)
+ delete node;
+ emit itemsRemoved(index,1);
+ emit countChanged(_root->values.count());
+}
+
+/*!
+ \qmlmethod ListModel::insert(int index, jsobject dict)
+
+ Adds a new item to the list model at position \a index, with the
+ values in \a dict.
+
+ \code
+ FruitModel.insert(2, {"cost": 5.95, "name":"Pizza"})
+ \endcode
+
+ The \a index must be to an existing item in the list, or one past
+ the end of the list (equivalent to append).
+
+ \sa set() append()
+*/
+void QDeclarativeListModel::insert(int index, const QScriptValue& valuemap)
+{
+ if (!valuemap.isObject() || valuemap.isArray()) {
+ qmlInfo(this) << tr("insert: value is not an object");
+ return;
+ }
+ if (!_root)
+ _root = new ModelNode;
+ if (index >= _root->values.count() || index<0) {
+ if (index == _root->values.count())
+ append(valuemap);
+ else
+ qmlInfo(this) << tr("insert: index %1 out of range").arg(index);
+ return;
+ }
+ ModelNode *mn = new ModelNode;
+ mn->setObjectValue(valuemap);
+ _root->values.insert(index,qVariantFromValue(mn));
+ emit itemsInserted(index,1);
+ emit countChanged(_root->values.count());
+}
+
+/*!
+ \qmlmethod ListModel::move(int from, int to, int n)
+
+ Moves \a n items \a from one position \a to another.
+
+ The from and to ranges must exist; for example, to move the first 3 items
+ to the end of the list:
+
+ \code
+ FruitModel.move(0,FruitModel.count-3,3)
+ \endcode
+
+ \sa append()
+*/
+void QDeclarativeListModel::move(int from, int to, int n)
+{
+ if (n==0 || from==to)
+ return;
+ if (from+n > count() || to+n > count() || from < 0 || to < 0 || n < 0) {
+ qmlInfo(this) << tr("move: out of range");
+ return;
+ }
+ int origfrom=from; // preserve actual move, so any animations are correct
+ int origto=to;
+ int orign=n;
+ if (from > to) {
+ // Only move forwards - flip if backwards moving
+ int tfrom = from;
+ int tto = to;
+ from = tto;
+ to = tto+n;
+ n = tfrom-tto;
+ }
+ if (n==1) {
+ _root->values.move(from,to);
+ } else {
+ QList<QVariant> replaced;
+ int i=0;
+ QVariantList::const_iterator it=_root->values.begin(); it += from+n;
+ for (; i<to-from; ++i,++it)
+ replaced.append(*it);
+ i=0;
+ it=_root->values.begin(); it += from;
+ for (; i<n; ++i,++it)
+ replaced.append(*it);
+ QVariantList::const_iterator f=replaced.begin();
+ QVariantList::iterator t=_root->values.begin(); t += from;
+ for (; f != replaced.end(); ++f, ++t)
+ *t = *f;
+ }
+ emit itemsMoved(origfrom,origto,orign);
+}
+
+/*!
+ \qmlmethod ListModel::append(jsobject dict)
+
+ Adds a new item to the end of the list model, with the
+ values in \a dict.
+
+ \code
+ FruitModel.append({"cost": 5.95, "name":"Pizza"})
+ \endcode
+
+ \sa set() remove()
+*/
+void QDeclarativeListModel::append(const QScriptValue& valuemap)
+{
+ if (!valuemap.isObject() || valuemap.isArray()) {
+ qmlInfo(this) << tr("append: value is not an object");
+ return;
+ }
+ if (!_root)
+ _root = new ModelNode;
+ ModelNode *mn = new ModelNode;
+ mn->setObjectValue(valuemap);
+ _root->values << qVariantFromValue(mn);
+ emit itemsInserted(count()-1,1);
+ emit countChanged(_root->values.count());
+}
+
+/*!
+ \qmlmethod object ListModel::get(int index)
+
+ Returns the item at \a index in the list model.
+
+ \code
+ FruitModel.append({"cost": 5.95, "name":"Jackfruit"})
+ FruitModel.get(0).cost
+ \endcode
+
+ The \a index must be an element in the list.
+
+ Note that properties of the returned object that are themselves objects
+ will also be models, and this get() method is used to access elements:
+
+ \code
+ FruitModel.append(..., "attributes":
+ [{"name":"spikes","value":"7mm"},
+ {"name":"color","value":"green"}]);
+ FruitModel.get(0).attributes.get(1).value; // == "green"
+ \endcode
+
+ \sa append()
+*/
+QScriptValue QDeclarativeListModel::get(int index) const
+{
+ if (index >= count() || index < 0) {
+ qmlInfo(this) << tr("get: index %1 out of range").arg(index);
+ return 0;
+ }
+
+ ModelNode *node = qvariant_cast<ModelNode *>(_root->values.at(index));
+ if (!node)
+ return 0;
+ QDeclarativeEngine *eng = qmlEngine(this);
+ if (!eng) {
+ qWarning("Cannot call QDeclarativeListModel::get() without a QDeclarativeEngine");
+ return 0;
+ }
+ return QDeclarativeEnginePrivate::qmlScriptObject(node->object(this), eng);
+}
+
+/*!
+ \qmlmethod ListModel::set(int index, jsobject dict)
+
+ Changes the item at \a index in the list model with the
+ values in \a dict. Properties not appearing in \a valuemap
+ are left unchanged.
+
+ \code
+ FruitModel.set(3, {"cost": 5.95, "name":"Pizza"})
+ \endcode
+
+ The \a index must be an element in the list.
+
+ \sa append()
+*/
+void QDeclarativeListModel::set(int index, const QScriptValue& valuemap)
+{
+ if (!valuemap.isObject() || valuemap.isArray()) {
+ qmlInfo(this) << tr("set: value is not an object");
+ return;
+ }
+ if ( !_root || index > _root->values.count() || index < 0) {
+ qmlInfo(this) << tr("set: index %1 out of range").arg(index);
+ return;
+ }
+ if (index == _root->values.count())
+ append(valuemap);
+ else {
+ ModelNode *node = qvariant_cast<ModelNode *>(_root->values.at(index));
+ QList<int> roles;
+ node->setObjectValue(valuemap);
+ QScriptValueIterator it(valuemap);
+ while (it.hasNext()) {
+ it.next();
+ int r = roleStrings.indexOf(it.name());
+ if (r<0) {
+ r = roleStrings.count();
+ roleStrings << it.name();
+ }
+ roles.append(r);
+ }
+ emit itemsChanged(index,1,roles);
+ }
+}
+
+/*!
+ \qmlmethod ListModel::setProperty(int index, string property, variant value)
+
+ Changes the \a property of the item at \a index in the list model to \a value.
+
+ \code
+ FruitModel.set(3, "cost", 5.95)
+ \endcode
+
+ The \a index must be an element in the list.
+
+ \sa append()
+*/
+void QDeclarativeListModel::setProperty(int index, const QString& property, const QVariant& value)
+{
+ if ( !_root || index >= _root->values.count() || index < 0) {
+ qmlInfo(this) << tr("set: index %1 out of range").arg(index);
+ return;
+ }
+ ModelNode *node = qvariant_cast<ModelNode *>(_root->values.at(index));
+ int r = roleStrings.indexOf(property);
+ if (r<0) {
+ r = roleStrings.count();
+ roleStrings << property;
+ }
+ QList<int> roles;
+ roles.append(r);
+
+ if (node)
+ node->setProperty(property,value);
+ emit itemsChanged(index,1,roles);
+}
+
+bool QDeclarativeListModelParser::compileProperty(const QDeclarativeCustomParserProperty &prop, QList<ListInstruction> &instr, QByteArray &data)
+{
+ QList<QVariant> values = prop.assignedValues();
+ for(int ii = 0; ii < values.count(); ++ii) {
+ const QVariant &value = values.at(ii);
+
+ if(value.userType() == qMetaTypeId<QDeclarativeCustomParserNode>()) {
+ QDeclarativeCustomParserNode node =
+ qvariant_cast<QDeclarativeCustomParserNode>(value);
+
+ {
+ ListInstruction li;
+ li.type = ListInstruction::Push;
+ li.dataIdx = -1;
+ instr << li;
+ }
+
+ QList<QDeclarativeCustomParserProperty> props = node.properties();
+ for(int jj = 0; jj < props.count(); ++jj) {
+ const QDeclarativeCustomParserProperty &nodeProp = props.at(jj);
+ if (nodeProp.name() == "") {
+ error(nodeProp, QDeclarativeListModel::tr("ListElement: cannot use default property"));
+ return false;
+ }
+ if (nodeProp.name() == "id") {
+ error(nodeProp, QDeclarativeListModel::tr("ListElement: cannot use reserved \"id\" property"));
+ return false;
+ }
+
+ ListInstruction li;
+ int ref = data.count();
+ data.append(nodeProp.name());
+ data.append('\0');
+ li.type = ListInstruction::Set;
+ li.dataIdx = ref;
+ instr << li;
+
+ if(!compileProperty(nodeProp, instr, data))
+ return false;
+
+ li.type = ListInstruction::Pop;
+ li.dataIdx = -1;
+ instr << li;
+ }
+
+ {
+ ListInstruction li;
+ li.type = ListInstruction::Pop;
+ li.dataIdx = -1;
+ instr << li;
+ }
+
+ } else {
+
+ QDeclarativeParser::Variant variant =
+ qvariant_cast<QDeclarativeParser::Variant>(value);
+
+ int ref = data.count();
+
+ QByteArray d;
+ d += char(variant.type()); // type tag
+ if (variant.isString()) {
+ d += variant.asString().toUtf8();
+ } else if (variant.isNumber()) {
+ d += QByteArray::number(variant.asNumber(),'g',20);
+ } else if (variant.isBoolean()) {
+ d += char(variant.asBoolean());
+ } else if (variant.isScript()) {
+ if (definesEmptyList(variant.asScript())) {
+ d[0] = 0; // QDeclarativeParser::Variant::Invalid - marks empty list
+ } else {
+ error(prop, QDeclarativeListModel::tr("ListElement: cannot use script for property value"));
+ return false;
+ }
+ }
+ d.append('\0');
+ data.append(d);
+
+ ListInstruction li;
+ li.type = ListInstruction::Value;
+ li.dataIdx = ref;
+ instr << li;
+ }
+ }
+
+ return true;
+}
+
+QByteArray QDeclarativeListModelParser::compile(const QList<QDeclarativeCustomParserProperty> &customProps)
+{
+ QList<ListInstruction> instr;
+ QByteArray data;
+
+ for(int ii = 0; ii < customProps.count(); ++ii) {
+ const QDeclarativeCustomParserProperty &prop = customProps.at(ii);
+ if(prop.name() != "") { // isn't default property
+ error(prop, QDeclarativeListModel::tr("ListModel: undefined property '%1'").arg(QString::fromUtf8(prop.name())));
+ return QByteArray();
+ }
+
+ if(!compileProperty(prop, instr, data)) {
+ return QByteArray();
+ }
+ }
+
+ int size = sizeof(ListModelData) +
+ instr.count() * sizeof(ListInstruction) +
+ data.count();
+
+ QByteArray rv;
+ rv.resize(size);
+
+ ListModelData *lmd = (ListModelData *)rv.data();
+ lmd->dataOffset = sizeof(ListModelData) +
+ instr.count() * sizeof(ListInstruction);
+ lmd->instrCount = instr.count();
+ for (int ii = 0; ii < instr.count(); ++ii)
+ lmd->instructions()[ii] = instr.at(ii);
+ ::memcpy(rv.data() + lmd->dataOffset, data.constData(), data.count());
+
+ return rv;
+}
+
+void QDeclarativeListModelParser::setCustomData(QObject *obj, const QByteArray &d)
+{
+ QDeclarativeListModel *rv = static_cast<QDeclarativeListModel *>(obj);
+
+ ModelNode *root = new ModelNode;
+ rv->_root = root;
+ QStack<ModelNode *> nodes;
+ nodes << root;
+
+ bool processingSet = false;
+
+ const ListModelData *lmd = (const ListModelData *)d.constData();
+ const char *data = ((const char *)lmd) + lmd->dataOffset;
+
+ for (int ii = 0; ii < lmd->instrCount; ++ii) {
+ const ListInstruction &instr = lmd->instructions()[ii];
+
+ switch(instr.type) {
+ case ListInstruction::Push:
+ {
+ ModelNode *n = nodes.top();
+ ModelNode *n2 = new ModelNode;
+ n->values << qVariantFromValue(n2);
+ nodes.push(n2);
+ if (processingSet)
+ n->isArray = true;
+ }
+ break;
+
+ case ListInstruction::Pop:
+ nodes.pop();
+ break;
+
+ case ListInstruction::Value:
+ {
+ ModelNode *n = nodes.top();
+ switch (QDeclarativeParser::Variant::Type(data[instr.dataIdx])) {
+ case QDeclarativeParser::Variant::Invalid:
+ n->isArray = true;
+ break;
+ case QDeclarativeParser::Variant::Boolean:
+ n->values.append(bool(data[1 + instr.dataIdx]));
+ break;
+ case QDeclarativeParser::Variant::Number:
+ n->values.append(QByteArray(data + 1 + instr.dataIdx).toDouble());
+ break;
+ case QDeclarativeParser::Variant::String:
+ n->values.append(QString::fromUtf8(data + 1 + instr.dataIdx));
+ break;
+ default:
+ Q_ASSERT("Format error in ListInstruction");
+ }
+
+ processingSet = false;
+ }
+ break;
+
+ case ListInstruction::Set:
+ {
+ ModelNode *n = nodes.top();
+ ModelNode *n2 = new ModelNode;
+ n->properties.insert(QString::fromUtf8(data + instr.dataIdx), n2);
+ nodes.push(n2);
+ processingSet = true;
+ }
+ break;
+ }
+ }
+}
+
+bool QDeclarativeListModelParser::definesEmptyList(const QString &s)
+{
+ if (s.startsWith(QLatin1Char('[')) && s.endsWith(QLatin1Char(']'))) {
+ for (int i=1; i<s.length()-1; i++) {
+ if (!s[i].isSpace())
+ return false;
+ }
+ return true;
+ }
+ return false;
+}
+
+/*!
+ \qmlclass ListElement
+ \since 4.7
+ \brief The ListElement element defines a data item in a ListModel.
+
+ \sa ListModel
+*/
+
+static void dump(ModelNode *node, int ind)
+{
+ QByteArray indentBa(ind * 4, ' ');
+ const char *indent = indentBa.constData();
+
+ for (int ii = 0; ii < node->values.count(); ++ii) {
+ ModelNode *subNode = qvariant_cast<ModelNode *>(node->values.at(ii));
+ if (subNode) {
+ qWarning().nospace() << indent << "Sub-node " << ii;
+ dump(subNode, ind + 1);
+ } else {
+ qWarning().nospace() << indent << "Sub-node " << ii << ": " << node->values.at(ii).toString();
+ }
+ }
+
+ for (QHash<QString, ModelNode *>::ConstIterator iter = node->properties.begin(); iter != node->properties.end(); ++iter) {
+ qWarning().nospace() << indent << "Property " << iter.key() << ':';
+ dump(iter.value(), ind + 1);
+ }
+}
+
+ModelNode::ModelNode()
+: modelCache(0), objectCache(0), isArray(false)
+{
+}
+
+ModelNode::~ModelNode()
+{
+ qDeleteAll(properties);
+ for (int ii = 0; ii < values.count(); ++ii) {
+ ModelNode *node = qvariant_cast<ModelNode *>(values.at(ii));
+ if (node) { delete node; node = 0; }
+ }
+ if (modelCache) { modelCache->_root = 0/* ==this */; delete modelCache; modelCache = 0; }
+ if (objectCache) { delete objectCache; }
+}
+
+QT_END_NAMESPACE
+
+#include <qdeclarativelistmodel.moc>
diff --git a/src/declarative/util/qdeclarativelistmodel_p.h b/src/declarative/util/qdeclarativelistmodel_p.h
new file mode 100644
index 0000000000..8eb658395a
--- /dev/null
+++ b/src/declarative/util/qdeclarativelistmodel_p.h
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVELISTMODEL_H
+#define QDECLARATIVELISTMODEL_H
+
+#include <qdeclarative.h>
+#include <private/qdeclarativecustomparser_p.h>
+
+#include <QtCore/QObject>
+#include <QtCore/QStringList>
+#include <QtCore/QHash>
+#include <QtCore/QList>
+#include <QtCore/QVariant>
+#include <private/qlistmodelinterface_p.h>
+#include <QtScript/qscriptvalue.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+struct ModelNode;
+class Q_DECLARATIVE_EXPORT QDeclarativeListModel : public QListModelInterface
+{
+ Q_OBJECT
+ Q_PROPERTY(int count READ count NOTIFY countChanged)
+
+public:
+ QDeclarativeListModel(QObject *parent=0);
+ ~QDeclarativeListModel();
+
+ virtual QList<int> roles() const;
+ virtual QString toString(int role) const;
+ virtual int count() const;
+ virtual QHash<int,QVariant> data(int index, const QList<int> &roles = (QList<int>())) const;
+ virtual QVariant data(int index, int role) const;
+
+ Q_INVOKABLE void clear();
+ Q_INVOKABLE void remove(int index);
+ Q_INVOKABLE void append(const QScriptValue&);
+ Q_INVOKABLE void insert(int index, const QScriptValue&);
+ Q_INVOKABLE QScriptValue get(int index) const;
+ Q_INVOKABLE void set(int index, const QScriptValue&);
+ Q_INVOKABLE void setProperty(int index, const QString& property, const QVariant& value);
+ Q_INVOKABLE void move(int from, int to, int count);
+
+Q_SIGNALS:
+ void countChanged(int);
+
+private:
+ QVariant valueForNode(ModelNode *) const;
+ mutable QStringList roleStrings;
+ friend class QDeclarativeListModelParser;
+ friend struct ModelNode;
+
+ void checkRoles() const;
+ void addRole(const QString &) const;
+ mutable bool _rolesOk;
+ ModelNode *_root;
+};
+
+// ### FIXME
+class QDeclarativeListElement : public QObject
+{
+Q_OBJECT
+};
+
+class QDeclarativeListModelParser : public QDeclarativeCustomParser
+{
+public:
+ QByteArray compile(const QList<QDeclarativeCustomParserProperty> &);
+ void setCustomData(QObject *, const QByteArray &);
+
+private:
+ struct ListInstruction
+ {
+ enum { Push, Pop, Value, Set } type;
+ int dataIdx;
+ };
+ struct ListModelData
+ {
+ int dataOffset;
+ int instrCount;
+ ListInstruction *instructions() const;
+ };
+ bool compileProperty(const QDeclarativeCustomParserProperty &prop, QList<ListInstruction> &instr, QByteArray &data);
+
+ bool definesEmptyList(const QString &);
+};
+
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeListModel)
+QML_DECLARE_TYPE(QDeclarativeListElement)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVELISTMODEL_H
diff --git a/src/declarative/util/qdeclarativenullablevalue_p_p.h b/src/declarative/util/qdeclarativenullablevalue_p_p.h
new file mode 100644
index 0000000000..fc3f8af6dd
--- /dev/null
+++ b/src/declarative/util/qdeclarativenullablevalue_p_p.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVENULLABLEVALUE_P_H
+#define QDECLARATIVENULLABLEVALUE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+QT_BEGIN_NAMESPACE
+
+template<typename T>
+struct QDeclarativeNullableValue
+{
+ QDeclarativeNullableValue()
+ : isNull(true), value(T()) {}
+ QDeclarativeNullableValue(const QDeclarativeNullableValue<T> &o)
+ : isNull(o.isNull), value(o.value) {}
+ QDeclarativeNullableValue(const T &t)
+ : isNull(false), value(t) {}
+ QDeclarativeNullableValue<T> &operator=(const T &t)
+ { isNull = false; value = t; return *this; }
+ QDeclarativeNullableValue<T> &operator=(const QDeclarativeNullableValue<T> &o)
+ { isNull = o.isNull; value = o.value; return *this; }
+ operator T() const { return value; }
+
+ void invalidate() { isNull = true; }
+ bool isValid() const { return !isNull; }
+ bool isNull;
+ T value;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVENULLABLEVALUE_P_H
diff --git a/src/declarative/util/qdeclarativeopenmetaobject.cpp b/src/declarative/util/qdeclarativeopenmetaobject.cpp
new file mode 100644
index 0000000000..8c2335401f
--- /dev/null
+++ b/src/declarative/util/qdeclarativeopenmetaobject.cpp
@@ -0,0 +1,355 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeopenmetaobject_p.h"
+#include "qdeclarativepropertycache_p.h"
+#include "qdeclarativedeclarativedata_p.h"
+#include <qmetaobjectbuilder_p.h>
+#include <qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+
+class QDeclarativeOpenMetaObjectTypePrivate
+{
+public:
+ QDeclarativeOpenMetaObjectTypePrivate() : mem(0), cache(0), engine(0) {}
+
+ void init(const QMetaObject *metaObj);
+
+ int propertyOffset;
+ int signalOffset;
+ QHash<QByteArray, int> names;
+ QMetaObjectBuilder mob;
+ QMetaObject *mem;
+ QDeclarativePropertyCache *cache;
+ QDeclarativeEngine *engine;
+ QSet<QDeclarativeOpenMetaObject*> referers;
+};
+
+QDeclarativeOpenMetaObjectType::QDeclarativeOpenMetaObjectType(const QMetaObject *base, QDeclarativeEngine *engine)
+ : d(new QDeclarativeOpenMetaObjectTypePrivate)
+{
+ d->engine = engine;
+ d->init(base);
+}
+
+QDeclarativeOpenMetaObjectType::~QDeclarativeOpenMetaObjectType()
+{
+ if (d->mem)
+ qFree(d->mem);
+ if (d->cache)
+ d->cache->release();
+ delete d;
+}
+
+
+int QDeclarativeOpenMetaObjectType::propertyOffset() const
+{
+ return d->propertyOffset;
+}
+
+int QDeclarativeOpenMetaObjectType::signalOffset() const
+{
+ return d->signalOffset;
+}
+
+int QDeclarativeOpenMetaObjectType::createProperty(const QByteArray &name)
+{
+ int id = d->mob.propertyCount();
+ d->mob.addSignal("__" + QByteArray::number(id) + "()");
+ QMetaPropertyBuilder build = d->mob.addProperty(name, "QVariant", id);
+ build.setDynamic(true);
+ propertyCreated(id, build);
+ qFree(d->mem);
+ d->mem = d->mob.toMetaObject();
+ d->names.insert(name, id);
+ QSet<QDeclarativeOpenMetaObject*>::iterator it = d->referers.begin();
+ while (it != d->referers.end()) {
+ QDeclarativeOpenMetaObject *omo = *it;
+ *static_cast<QMetaObject *>(omo) = *d->mem;
+ if (d->cache)
+ d->cache->update(d->engine, omo);
+ ++it;
+ }
+
+ return d->propertyOffset + id;
+}
+
+void QDeclarativeOpenMetaObjectType::propertyCreated(int id, QMetaPropertyBuilder &builder)
+{
+ if (d->referers.count())
+ (*d->referers.begin())->propertyCreated(id, builder);
+}
+
+void QDeclarativeOpenMetaObjectTypePrivate::init(const QMetaObject *metaObj)
+{
+ if (!mem) {
+ mob.setSuperClass(metaObj);
+ mob.setClassName(metaObj->className());
+ mob.setFlags(QMetaObjectBuilder::DynamicMetaObject);
+
+ mem = mob.toMetaObject();
+
+ propertyOffset = mem->propertyOffset();
+ signalOffset = mem->methodOffset();
+ }
+}
+
+//----------------------------------------------------------------------------
+
+class QDeclarativeOpenMetaObjectPrivate
+{
+public:
+ QDeclarativeOpenMetaObjectPrivate(QDeclarativeOpenMetaObject *_q)
+ : q(_q), parent(0), type(0), cacheProperties(false) {}
+
+ inline QVariant &getData(int idx) {
+ while (data.count() <= idx)
+ data << QPair<QVariant, bool>(QVariant(), false);
+ QPair<QVariant, bool> &prop = data[idx];
+ if (!prop.second) {
+ prop.first = q->initialValue(idx);
+ prop.second = true;
+ }
+ return prop.first;
+ }
+
+ inline void writeData(int idx, const QVariant &value) {
+ while (data.count() <= idx)
+ data << QPair<QVariant, bool>(QVariant(), false);
+ QPair<QVariant, bool> &prop = data[idx];
+ prop.first = value;
+ prop.second = true;
+ }
+
+ bool autoCreate;
+ QDeclarativeOpenMetaObject *q;
+ QAbstractDynamicMetaObject *parent;
+ QList<QPair<QVariant, bool> > data;
+ QObject *object;
+ QDeclarativeOpenMetaObjectType *type;
+ bool cacheProperties;
+};
+
+QDeclarativeOpenMetaObject::QDeclarativeOpenMetaObject(QObject *obj, bool automatic)
+: d(new QDeclarativeOpenMetaObjectPrivate(this))
+{
+ d->autoCreate = automatic;
+ d->object = obj;
+
+ d->type = new QDeclarativeOpenMetaObjectType(obj->metaObject(), 0);
+ d->type->d->referers.insert(this);
+
+ QObjectPrivate *op = QObjectPrivate::get(obj);
+ *static_cast<QMetaObject *>(this) = *d->type->d->mem;
+ op->metaObject = this;
+}
+
+QDeclarativeOpenMetaObject::QDeclarativeOpenMetaObject(QObject *obj, QDeclarativeOpenMetaObjectType *type, bool automatic)
+: d(new QDeclarativeOpenMetaObjectPrivate(this))
+{
+ d->autoCreate = automatic;
+ d->object = obj;
+
+ d->type = type;
+ d->type->addref();
+ d->type->d->referers.insert(this);
+
+ QObjectPrivate *op = QObjectPrivate::get(obj);
+ *static_cast<QMetaObject *>(this) = *d->type->d->mem;
+ op->metaObject = this;
+}
+
+QDeclarativeOpenMetaObject::~QDeclarativeOpenMetaObject()
+{
+ if (d->parent)
+ delete d->parent;
+ d->type->d->referers.remove(this);
+ d->type->release();
+ delete d;
+}
+
+QDeclarativeOpenMetaObjectType *QDeclarativeOpenMetaObject::type() const
+{
+ return d->type;
+}
+
+int QDeclarativeOpenMetaObject::metaCall(QMetaObject::Call c, int id, void **a)
+{
+ if (( c == QMetaObject::ReadProperty || c == QMetaObject::WriteProperty)
+ && id >= d->type->d->propertyOffset) {
+ int propId = id - d->type->d->propertyOffset;
+ if (c == QMetaObject::ReadProperty) {
+ propertyRead(propId);
+ *reinterpret_cast<QVariant *>(a[0]) = d->getData(propId);
+ } else if (c == QMetaObject::WriteProperty) {
+ if (d->data[propId].first != *reinterpret_cast<QVariant *>(a[0])) {
+ propertyWrite(propId);
+ d->writeData(propId, *reinterpret_cast<QVariant *>(a[0]));
+ activate(d->object, d->type->d->signalOffset + propId, 0);
+ }
+ }
+ return -1;
+ } else {
+ if (d->parent)
+ return d->parent->metaCall(c, id, a);
+ else
+ return d->object->qt_metacall(c, id, a);
+ }
+}
+
+QAbstractDynamicMetaObject *QDeclarativeOpenMetaObject::parent() const
+{
+ return d->parent;
+}
+
+QVariant QDeclarativeOpenMetaObject::value(int id) const
+{
+ return d->getData(id);
+}
+
+void QDeclarativeOpenMetaObject::setValue(int id, const QVariant &value)
+{
+ d->writeData(id, value);
+ activate(d->object, id + d->type->d->signalOffset, 0);
+}
+
+QVariant QDeclarativeOpenMetaObject::value(const QByteArray &name) const
+{
+ QHash<QByteArray, int>::ConstIterator iter = d->type->d->names.find(name);
+ if (iter == d->type->d->names.end())
+ return QVariant();
+
+ return d->getData(*iter);
+}
+
+QVariant &QDeclarativeOpenMetaObject::operator[](const QByteArray &name)
+{
+ QHash<QByteArray, int>::ConstIterator iter = d->type->d->names.find(name);
+ Q_ASSERT(iter != d->type->d->names.end());
+
+ return d->getData(*iter);
+}
+
+void QDeclarativeOpenMetaObject::setValue(const QByteArray &name, const QVariant &val)
+{
+ QHash<QByteArray, int>::ConstIterator iter = d->type->d->names.find(name);
+
+ int id = -1;
+ if (iter == d->type->d->names.end()) {
+ id = d->type->createProperty(name.constData()) - d->type->d->propertyOffset;
+ } else {
+ id = *iter;
+ }
+
+ QVariant &dataVal = d->getData(id);
+ if (dataVal == val)
+ return;
+
+ dataVal = val;
+ activate(d->object, id + d->type->d->signalOffset, 0);
+}
+
+void QDeclarativeOpenMetaObject::setCached(bool c)
+{
+ if (c == d->cacheProperties || !d->type->d->engine)
+ return;
+
+ d->cacheProperties = c;
+
+ QDeclarativeDeclarativeData *qmldata = QDeclarativeDeclarativeData::get(d->object, true);
+ if (d->cacheProperties) {
+ if (!d->type->d->cache)
+ d->type->d->cache = QDeclarativePropertyCache::create(d->type->d->engine, this);
+ qmldata->propertyCache = d->type->d->cache;
+ d->type->d->cache->addref();
+ } else {
+ if (d->type->d->cache)
+ d->type->d->cache->release();
+ qmldata->propertyCache = 0;
+ }
+}
+
+
+int QDeclarativeOpenMetaObject::createProperty(const char *name, const char *)
+{
+ if (d->autoCreate)
+ return d->type->createProperty(name);
+ else
+ return -1;
+}
+
+void QDeclarativeOpenMetaObject::propertyRead(int)
+{
+}
+
+void QDeclarativeOpenMetaObject::propertyWrite(int)
+{
+}
+
+void QDeclarativeOpenMetaObject::propertyCreated(int, QMetaPropertyBuilder &)
+{
+}
+
+QVariant QDeclarativeOpenMetaObject::initialValue(int)
+{
+ return QVariant();
+}
+
+int QDeclarativeOpenMetaObject::count() const
+{
+ return d->type->d->names.count();
+}
+
+QByteArray QDeclarativeOpenMetaObject::name(int idx) const
+{
+ Q_ASSERT(idx >= 0 && idx < d->type->d->names.count());
+
+ return d->type->d->mob.property(idx).name();
+}
+
+QObject *QDeclarativeOpenMetaObject::object() const
+{
+ return d->object;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativeopenmetaobject_p.h b/src/declarative/util/qdeclarativeopenmetaobject_p.h
new file mode 100644
index 0000000000..ec5ac17b20
--- /dev/null
+++ b/src/declarative/util/qdeclarativeopenmetaobject_p.h
@@ -0,0 +1,125 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEOPENMETAOBJECT_H
+#define QDECLARATIVEOPENMETAOBJECT_H
+
+#include <private/qdeclarativerefcount_p.h>
+#include <QtCore/QMetaObject>
+#include <QtCore/QObject>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeEngine;
+class QMetaPropertyBuilder;
+class QDeclarativeOpenMetaObjectTypePrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeOpenMetaObjectType : public QDeclarativeRefCount
+{
+public:
+ QDeclarativeOpenMetaObjectType(const QMetaObject *base, QDeclarativeEngine *engine);
+ ~QDeclarativeOpenMetaObjectType();
+
+ int createProperty(const QByteArray &name);
+
+ int propertyOffset() const;
+ int signalOffset() const;
+
+protected:
+ virtual void propertyCreated(int, QMetaPropertyBuilder &);
+
+private:
+ QDeclarativeOpenMetaObjectTypePrivate *d;
+ friend class QDeclarativeOpenMetaObject;
+ friend class QDeclarativeOpenMetaObjectPrivate;
+};
+
+class QDeclarativeOpenMetaObjectPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeOpenMetaObject : public QAbstractDynamicMetaObject
+{
+public:
+ QDeclarativeOpenMetaObject(QObject *, bool = true);
+ QDeclarativeOpenMetaObject(QObject *, QDeclarativeOpenMetaObjectType *, bool = true);
+ ~QDeclarativeOpenMetaObject();
+
+ QVariant value(const QByteArray &) const;
+ void setValue(const QByteArray &, const QVariant &);
+ QVariant value(int) const;
+ void setValue(int, const QVariant &);
+ QVariant &operator[](const QByteArray &);
+
+ int count() const;
+ QByteArray name(int) const;
+
+ QObject *object() const;
+ virtual QVariant initialValue(int);
+
+ // Be careful - once setCached(true) is called createProperty() is no
+ // longer automatically called for new properties.
+ void setCached(bool);
+
+ QDeclarativeOpenMetaObjectType *type() const;
+
+protected:
+ virtual int metaCall(QMetaObject::Call _c, int _id, void **_a);
+ virtual int createProperty(const char *, const char *);
+
+ virtual void propertyRead(int);
+ virtual void propertyWrite(int);
+ virtual void propertyCreated(int, QMetaPropertyBuilder &);
+
+ QAbstractDynamicMetaObject *parent() const;
+
+private:
+ QDeclarativeOpenMetaObjectPrivate *d;
+ friend class QDeclarativeOpenMetaObjectType;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEOPENMETAOBJECT_H
diff --git a/src/declarative/util/qdeclarativepackage.cpp b/src/declarative/util/qdeclarativepackage.cpp
new file mode 100644
index 0000000000..d144777a97
--- /dev/null
+++ b/src/declarative/util/qdeclarativepackage.cpp
@@ -0,0 +1,194 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativepackage_p.h"
+
+#include <private/qobject_p.h>
+#include <private/qdeclarativeguard_p.h>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \qmlclass Package QDeclarativePackage
+ \brief Package provides a collection of named items
+
+ The Package class is currently used in conjunction with
+ VisualDataModel to enable delegates with a shared context
+ to be provided to multiple views.
+
+ Any item within a Package may be assigned a name via the
+ \e {Package.name} attached property.
+
+ The example below creates a Package containing two named items;
+ \e list and \e grid. The third element in the package is parented to whichever
+ delegate it should appear in. This allows an item to move
+ between views.
+
+ \snippet examples/declarative/package/Delegate.qml 0
+
+ These named items are used as the delegates by the two views who
+ reference the special VisualDataModel.parts property to select
+ a model which provides the chosen delegate.
+
+ \snippet examples/declarative/package/view.qml 0
+
+*/
+
+
+class QDeclarativePackagePrivate : public QObjectPrivate
+{
+public:
+ QDeclarativePackagePrivate() {}
+
+ struct DataGuard : public QDeclarativeGuard<QObject>
+ {
+ DataGuard(QObject *obj, QList<DataGuard> *l) : list(l) { (QDeclarativeGuard<QObject>&)*this = obj; }
+ QList<DataGuard> *list;
+ void objectDestroyed(QObject *) {
+ // we assume priv will always be destroyed after objectDestroyed calls
+ list->removeOne(*this);
+ }
+ };
+
+ QList<DataGuard> dataList;
+ static void data_append(QDeclarativeListProperty<QObject> *prop, QObject *o) {
+ QList<DataGuard> *list = static_cast<QList<DataGuard> *>(prop->data);
+ list->append(DataGuard(o, list));
+ }
+ static void data_clear(QDeclarativeListProperty<QObject> *prop) {
+ QList<DataGuard> *list = static_cast<QList<DataGuard> *>(prop->data);
+ list->clear();
+ }
+ static QObject *data_at(QDeclarativeListProperty<QObject> *prop, int index) {
+ QList<DataGuard> *list = static_cast<QList<DataGuard> *>(prop->data);
+ return list->at(index);
+ }
+ static int data_count(QDeclarativeListProperty<QObject> *prop) {
+ QList<DataGuard> *list = static_cast<QList<DataGuard> *>(prop->data);
+ return list->count();
+ }
+};
+
+QHash<QObject *, QDeclarativePackageAttached *> QDeclarativePackageAttached::attached;
+
+QDeclarativePackageAttached::QDeclarativePackageAttached(QObject *parent)
+: QObject(parent)
+{
+ attached.insert(parent, this);
+}
+
+QDeclarativePackageAttached::~QDeclarativePackageAttached()
+{
+ attached.remove(parent());
+}
+
+QString QDeclarativePackageAttached::name() const
+{
+ return _name;
+}
+
+void QDeclarativePackageAttached::setName(const QString &n)
+{
+ _name = n;
+}
+
+QDeclarativePackage::QDeclarativePackage(QObject *parent)
+ : QObject(*(new QDeclarativePackagePrivate), parent)
+{
+}
+
+QDeclarativePackage::~QDeclarativePackage()
+{
+ Q_D(QDeclarativePackage);
+ for (int ii = 0; ii < d->dataList.count(); ++ii) {
+ QObject *obj = d->dataList.at(ii);
+ obj->setParent(this);
+ }
+}
+
+QDeclarativeListProperty<QObject> QDeclarativePackage::data()
+{
+ Q_D(QDeclarativePackage);
+ return QDeclarativeListProperty<QObject>(this, &d->dataList, QDeclarativePackagePrivate::data_append,
+ QDeclarativePackagePrivate::data_count,
+ QDeclarativePackagePrivate::data_at,
+ QDeclarativePackagePrivate::data_clear);
+}
+
+bool QDeclarativePackage::hasPart(const QString &name)
+{
+ Q_D(QDeclarativePackage);
+ for (int ii = 0; ii < d->dataList.count(); ++ii) {
+ QObject *obj = d->dataList.at(ii);
+ QDeclarativePackageAttached *a = QDeclarativePackageAttached::attached.value(obj);
+ if (a && a->name() == name)
+ return true;
+ }
+ return false;
+}
+
+QObject *QDeclarativePackage::part(const QString &name)
+{
+ Q_D(QDeclarativePackage);
+ if (name.isEmpty() && !d->dataList.isEmpty())
+ return d->dataList.at(0);
+
+ for (int ii = 0; ii < d->dataList.count(); ++ii) {
+ QObject *obj = d->dataList.at(ii);
+ QDeclarativePackageAttached *a = QDeclarativePackageAttached::attached.value(obj);
+ if (a && a->name() == name)
+ return obj;
+ }
+
+ if (name == QLatin1String("default") && !d->dataList.isEmpty())
+ return d->dataList.at(0);
+
+ return 0;
+}
+
+QDeclarativePackageAttached *QDeclarativePackage::qmlAttachedProperties(QObject *o)
+{
+ return new QDeclarativePackageAttached(o);
+}
+
+
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativepackage_p.h b/src/declarative/util/qdeclarativepackage_p.h
new file mode 100644
index 0000000000..87d9b80240
--- /dev/null
+++ b/src/declarative/util/qdeclarativepackage_p.h
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEPACKAGE_H
+#define QDECLARATIVEPACKAGE_H
+
+#include <qdeclarative.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+/*****************************************************************************
+ *****************************************************************************
+ XXX Experimental
+ *****************************************************************************
+*****************************************************************************/
+
+class QDeclarativePackagePrivate;
+class QDeclarativePackageAttached;
+class QDeclarativePackage : public QObject
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativePackage)
+
+ Q_CLASSINFO("DefaultProperty", "data")
+ Q_PROPERTY(QDeclarativeListProperty<QObject> data READ data SCRIPTABLE false)
+
+public:
+ QDeclarativePackage(QObject *parent=0);
+ virtual ~QDeclarativePackage();
+
+ QDeclarativeListProperty<QObject> data();
+
+ QObject *part(const QString & = QString());
+ bool hasPart(const QString &);
+
+ static QDeclarativePackageAttached *qmlAttachedProperties(QObject *);
+};
+
+class QDeclarativePackageAttached : public QObject
+{
+Q_OBJECT
+Q_PROPERTY(QString name READ name WRITE setName)
+public:
+ QDeclarativePackageAttached(QObject *parent);
+ virtual ~QDeclarativePackageAttached();
+
+ QString name() const;
+ void setName(const QString &n);
+
+ static QHash<QObject *, QDeclarativePackageAttached *> attached;
+private:
+ QString _name;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativePackage)
+QML_DECLARE_TYPEINFO(QDeclarativePackage, QML_HAS_ATTACHED_PROPERTIES)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEPACKAGE_H
diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp
new file mode 100644
index 0000000000..cfb25ddc8d
--- /dev/null
+++ b/src/declarative/util/qdeclarativepixmapcache.cpp
@@ -0,0 +1,642 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativepixmapcache_p.h"
+#include "qdeclarativenetworkaccessmanagerfactory.h"
+#include "qdeclarativeimageprovider.h"
+
+#include "qfxperf_p_p.h"
+
+#include <qdeclarativeengine.h>
+#include <private/qdeclarativeglobal_p.h>
+#include <private/qdeclarativeengine_p.h>
+
+#include <QCoreApplication>
+#include <QImageReader>
+#include <QHash>
+#include <QNetworkReply>
+#include <QPixmapCache>
+#include <QFile>
+#include <QThread>
+#include <QMutex>
+#include <QWaitCondition>
+#include <QtCore/qdebug.h>
+#include <private/qobject_p.h>
+#include <QSslError>
+
+#ifdef Q_OS_LINUX
+#include <pthread.h>
+#include <linux/sched.h>
+#endif
+
+// Maximum number of simultaneous image requests to send.
+static const int maxImageRequestCount = 8;
+
+QT_BEGIN_NAMESPACE
+
+#if (QT_VERSION < QT_VERSION_CHECK(4, 7, 0))
+inline uint qHash(const QUrl &uri)
+{
+ return qHash(uri.toEncoded(QUrl::FormattingOption(0x100)));
+}
+#endif
+
+static QString toLocalFileOrQrc(const QUrl& url)
+{
+ QString r = url.toLocalFile();
+ if (r.isEmpty() && url.scheme() == QLatin1String("qrc"))
+ r = QLatin1Char(':') + url.path();
+ return r;
+}
+
+class QDeclarativeImageReaderEvent : public QEvent
+{
+public:
+ enum ReadError { NoError, Loading, Decoding };
+
+ QDeclarativeImageReaderEvent(QDeclarativeImageReaderEvent::ReadError err, const QString &errStr, const QImage &img)
+ : QEvent(QEvent::User), error(err), errorString(errStr), image(img) {}
+
+ ReadError error;
+ QString errorString;
+ QImage image;
+};
+
+class QDeclarativeImageRequestHandler;
+class QDeclarativeImageReader : public QThread
+{
+ Q_OBJECT
+public:
+ QDeclarativeImageReader(QDeclarativeEngine *eng);
+ ~QDeclarativeImageReader();
+
+ QDeclarativePixmapReply *getImage(const QUrl &url);
+ void cancel(QDeclarativePixmapReply *rep);
+
+ static QDeclarativeImageReader *instance(QDeclarativeEngine *engine);
+
+protected:
+ void run();
+
+private:
+ QList<QDeclarativePixmapReply*> jobs;
+ QList<QDeclarativePixmapReply*> cancelled;
+ QDeclarativeEngine *engine;
+ QDeclarativeImageRequestHandler *handler;
+ QMutex mutex;
+
+ static QHash<QDeclarativeEngine *,QDeclarativeImageReader*> readers;
+ static QMutex readerMutex;
+ friend class QDeclarativeImageRequestHandler;
+};
+
+QHash<QDeclarativeEngine *,QDeclarativeImageReader*> QDeclarativeImageReader::readers;
+QMutex QDeclarativeImageReader::readerMutex;
+
+
+class QDeclarativeImageRequestHandler : public QObject
+{
+ Q_OBJECT
+public:
+ QDeclarativeImageRequestHandler(QDeclarativeImageReader *read, QDeclarativeEngine *eng)
+ : QObject(), accessManager(0), engine(eng), reader(read)
+ {
+ QCoreApplication::postEvent(this, new QEvent(QEvent::User));
+ }
+
+ QDeclarativePixmapReply *getImage(const QUrl &url);
+ void cancel(QDeclarativePixmapReply *reply);
+
+protected:
+ bool event(QEvent *event);
+
+private slots:
+ void networkRequestDone();
+
+private:
+ QNetworkAccessManager *networkAccessManager() {
+ if (!accessManager)
+ accessManager = QDeclarativeEnginePrivate::get(engine)->createNetworkAccessManager(this);
+ return accessManager;
+ }
+
+ QHash<QNetworkReply*,QDeclarativePixmapReply*> replies;
+ QNetworkAccessManager *accessManager;
+ QDeclarativeEngine *engine;
+ QDeclarativeImageReader *reader;
+};
+
+//===========================================================================
+
+bool QDeclarativeImageRequestHandler::event(QEvent *event)
+{
+ if (event->type() == QEvent::User) {
+ static int replyDownloadProgress = -1;
+ static int replyFinished = -1;
+ static int downloadProgress = -1;
+ static int thisNetworkRequestDone = -1;
+
+ if (replyDownloadProgress == -1) {
+ replyDownloadProgress = QNetworkReply::staticMetaObject.indexOfSignal("downloadProgress(qint64,qint64)");
+ replyFinished = QNetworkReply::staticMetaObject.indexOfSignal("finished()");
+ downloadProgress = QDeclarativePixmapReply::staticMetaObject.indexOfSignal("downloadProgress(qint64,qint64)");
+ thisNetworkRequestDone = QDeclarativeImageRequestHandler::staticMetaObject.indexOfSlot("networkRequestDone()");
+ }
+
+ while (1) {
+ reader->mutex.lock();
+
+ if (reader->cancelled.count()) {
+ for (int i = 0; i < reader->cancelled.count(); ++i) {
+ QDeclarativePixmapReply *job = reader->cancelled.at(i);
+ // cancel any jobs already started
+ QNetworkReply *reply = replies.key(job, 0);
+ if (reply && reply->isRunning()) {
+ replies.remove(reply);
+ reply->close();
+ }
+ // remove from pending job list
+ for (int j = 0; j < reader->jobs.count(); ++j) {
+ if (reader->jobs.at(j) == job) {
+ reader->jobs.removeAt(j);
+ job->release(true);
+ break;
+ }
+ }
+ }
+ reader->cancelled.clear();
+ }
+
+ if (!reader->jobs.count() || replies.count() > maxImageRequestCount) {
+ reader->mutex.unlock();
+ break;
+ }
+
+ QDeclarativePixmapReply *runningJob = reader->jobs.takeLast();
+ QUrl url = runningJob->url();
+ reader->mutex.unlock();
+
+ // fetch
+ if (url.scheme() == QLatin1String("image")) {
+ // Use QmlImageProvider
+ QImage image = QDeclarativeEnginePrivate::get(engine)->getImageFromProvider(url);
+ QDeclarativeImageReaderEvent::ReadError errorCode = QDeclarativeImageReaderEvent::NoError;
+ QString errorStr;
+ if (image.isNull()) {
+ errorCode = QDeclarativeImageReaderEvent::Loading;
+ errorStr = QLatin1String("Failed to get image from provider: ") + url.toString();
+ }
+ QCoreApplication::postEvent(runningJob, new QDeclarativeImageReaderEvent(errorCode, errorStr, image));
+ } else {
+ QString lf = toLocalFileOrQrc(url);
+ if (!lf.isEmpty()) {
+ // Image is local - load/decode immediately
+ QImage image;
+ QDeclarativeImageReaderEvent::ReadError errorCode = QDeclarativeImageReaderEvent::NoError;
+ QString errorStr;
+ QFile f(lf);
+ if (f.open(QIODevice::ReadOnly)) {
+ QImageReader imgio(&f);
+ if (!imgio.read(&image)) {
+ errorStr = QLatin1String("Error decoding: ") + url.toString()
+ + QLatin1String(" \"") + imgio.errorString() + QLatin1String("\"");
+ errorCode = QDeclarativeImageReaderEvent::Loading;
+ }
+ } else {
+ errorStr = QLatin1String("Cannot open: ") + url.toString();
+ errorCode = QDeclarativeImageReaderEvent::Loading;
+ }
+ QCoreApplication::postEvent(runningJob, new QDeclarativeImageReaderEvent(errorCode, errorStr, image));
+ } else {
+ // Network resource
+ QNetworkRequest req(url);
+ req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
+ QNetworkReply *reply = networkAccessManager()->get(req);
+
+ QMetaObject::connect(reply, replyDownloadProgress, runningJob, downloadProgress);
+ QMetaObject::connect(reply, replyFinished, this, thisNetworkRequestDone);
+
+ replies.insert(reply, runningJob);
+ }
+ }
+ }
+ return true;
+ }
+
+ return QObject::event(event);
+}
+
+void QDeclarativeImageRequestHandler::networkRequestDone()
+{
+ QNetworkReply *reply = static_cast<QNetworkReply *>(sender());
+ QDeclarativePixmapReply *job = replies.take(reply);
+ if (job) {
+ QImage image;
+ QDeclarativeImageReaderEvent::ReadError error;
+ QString errorString;
+ if (reply->error()) {
+ error = QDeclarativeImageReaderEvent::Loading;
+ errorString = reply->errorString();
+ } else {
+ QImageReader imgio(reply);
+ if (imgio.read(&image)) {
+ error = QDeclarativeImageReaderEvent::NoError;
+ } else {
+ errorString = QLatin1String("Error decoding: ") + reply->url().toString()
+ + QLatin1String(" \"") + imgio.errorString() + QLatin1String("\"");
+ error = QDeclarativeImageReaderEvent::Decoding;
+ }
+ }
+ // send completion event to the QDeclarativePixmapReply
+ QCoreApplication::postEvent(job, new QDeclarativeImageReaderEvent(error, errorString, image));
+ }
+ // kick off event loop again if we have dropped below max request count
+ if (replies.count() == maxImageRequestCount)
+ QCoreApplication::postEvent(this, new QEvent(QEvent::User));
+ reply->deleteLater();
+}
+
+//===========================================================================
+
+QDeclarativeImageReader::QDeclarativeImageReader(QDeclarativeEngine *eng)
+ : QThread(eng), engine(eng), handler(0)
+{
+ start(QThread::LowPriority);
+}
+
+QDeclarativeImageReader::~QDeclarativeImageReader()
+{
+ readerMutex.lock();
+ readers.remove(engine);
+ readerMutex.unlock();
+
+ quit();
+ wait();
+}
+
+QDeclarativeImageReader *QDeclarativeImageReader::instance(QDeclarativeEngine *engine)
+{
+ readerMutex.lock();
+ QDeclarativeImageReader *reader = readers.value(engine);
+ if (!reader) {
+ reader = new QDeclarativeImageReader(engine);
+ readers.insert(engine, reader);
+ }
+ readerMutex.unlock();
+
+ return reader;
+}
+
+QDeclarativePixmapReply *QDeclarativeImageReader::getImage(const QUrl &url)
+{
+ mutex.lock();
+ QDeclarativePixmapReply *reply = new QDeclarativePixmapReply(this, url);
+ reply->addRef();
+ reply->setLoading();
+ jobs.append(reply);
+ if (jobs.count() == 1 && handler)
+ QCoreApplication::postEvent(handler, new QEvent(QEvent::User));
+ mutex.unlock();
+ return reply;
+}
+
+void QDeclarativeImageReader::cancel(QDeclarativePixmapReply *reply)
+{
+ mutex.lock();
+ if (reply->isLoading()) {
+ // Add to cancel list to be cancelled in reader thread.
+ cancelled.append(reply);
+ if (cancelled.count() == 1 && handler)
+ QCoreApplication::postEvent(handler, new QEvent(QEvent::User));
+ }
+ mutex.unlock();
+}
+
+void QDeclarativeImageReader::run()
+{
+#if defined(Q_OS_LINUX) && defined(SCHED_IDLE)
+ struct sched_param param;
+ int policy;
+
+ pthread_getschedparam(pthread_self(), &policy, &param);
+ pthread_setschedparam(pthread_self(), SCHED_IDLE, &param);
+#endif
+
+ handler = new QDeclarativeImageRequestHandler(this, engine);
+
+ exec();
+
+ delete handler;
+ handler = 0;
+}
+
+//===========================================================================
+
+static bool readImage(QIODevice *dev, QPixmap *pixmap, QString &errorString)
+{
+ QImageReader imgio(dev);
+
+//#define QT_TEST_SCALED_SIZE
+#ifdef QT_TEST_SCALED_SIZE
+ /*
+ Some mechanism is needed for loading images at a limited size, especially
+ for remote images. Loading only thumbnails of remote progressive JPEG
+ images can be efficient. (Qt jpeg handler does not do so currently)
+ */
+
+ QSize limit(60,60);
+ QSize sz = imgio.size();
+ if (sz.width() > limit.width() || sz.height() > limit.height()) {
+ sz.scale(limit,Qt::KeepAspectRatio);
+ imgio.setScaledSize(sz);
+ }
+#endif
+
+ QImage img;
+ if (imgio.read(&img)) {
+#ifdef QT_TEST_SCALED_SIZE
+ if (!sz.isValid())
+ img = img.scaled(limit,Qt::KeepAspectRatio);
+#endif
+ *pixmap = QPixmap::fromImage(img);
+ return true;
+ } else {
+ errorString = imgio.errorString();
+ return false;
+ }
+}
+
+/*!
+ \internal
+ \class QDeclarativePixmapCache
+ \brief Enacapsultes a pixmap for QDeclarativeGraphics items.
+
+ This class is NOT reentrant.
+ */
+
+typedef QHash<QUrl, QDeclarativePixmapReply *> QDeclarativePixmapReplyHash;
+Q_GLOBAL_STATIC(QDeclarativePixmapReplyHash, qmlActivePixmapReplies);
+
+class QDeclarativePixmapReplyPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativePixmapReply)
+
+public:
+ QDeclarativePixmapReplyPrivate(QDeclarativeImageReader *r, const QUrl &u)
+ : QObjectPrivate(), refCount(1), url(u), status(QDeclarativePixmapReply::Loading), loading(false), reader(r) {
+ }
+
+ int refCount;
+ QUrl url;
+ QPixmap pixmap; // ensure reference to pixmap so QPixmapCache does not discard
+ QDeclarativePixmapReply::Status status;
+ bool loading;
+ QDeclarativeImageReader *reader;
+};
+
+
+QDeclarativePixmapReply::QDeclarativePixmapReply(QDeclarativeImageReader *reader, const QUrl &url)
+ : QObject(*new QDeclarativePixmapReplyPrivate(reader, url), 0)
+{
+}
+
+QDeclarativePixmapReply::~QDeclarativePixmapReply()
+{
+}
+
+const QUrl &QDeclarativePixmapReply::url() const
+{
+ Q_D(const QDeclarativePixmapReply);
+ return d->url;
+}
+
+bool QDeclarativePixmapReply::event(QEvent *event)
+{
+ Q_D(QDeclarativePixmapReply);
+ if (event->type() == QEvent::User) {
+ d->loading = false;
+ if (!release(true)) {
+ QDeclarativeImageReaderEvent *de = static_cast<QDeclarativeImageReaderEvent*>(event);
+ d->status = (de->error == QDeclarativeImageReaderEvent::NoError) ? Ready : Error;
+ if (d->status == Ready)
+ d->pixmap = QPixmap::fromImage(de->image);
+ else
+ qWarning() << de->errorString;
+ QByteArray key = d->url.toEncoded(QUrl::FormattingOption(0x100));
+ QString strKey = QString::fromLatin1(key.constData(), key.count());
+ QPixmapCache::insert(strKey, d->pixmap); // note: may fail (returns false)
+ emit finished();
+ }
+ return true;
+ }
+
+ return QObject::event(event);
+}
+
+QDeclarativePixmapReply::Status QDeclarativePixmapReply::status() const
+{
+ Q_D(const QDeclarativePixmapReply);
+ return d->status;
+}
+
+bool QDeclarativePixmapReply::isLoading() const
+{
+ Q_D(const QDeclarativePixmapReply);
+ return d->loading;
+}
+
+void QDeclarativePixmapReply::setLoading()
+{
+ Q_D(QDeclarativePixmapReply);
+ d->loading = true;
+}
+
+void QDeclarativePixmapReply::addRef()
+{
+ Q_D(QDeclarativePixmapReply);
+ ++d->refCount;
+}
+
+bool QDeclarativePixmapReply::release(bool defer)
+{
+ Q_D(QDeclarativePixmapReply);
+ Q_ASSERT(d->refCount > 0);
+ --d->refCount;
+ if (d->refCount == 0) {
+ qmlActivePixmapReplies()->remove(d->url);
+ if (defer)
+ deleteLater();
+ else
+ delete this;
+ return true;
+ } else if (d->refCount == 1 && d->loading) {
+ // The only reference left is the reader thread.
+ qmlActivePixmapReplies()->remove(d->url);
+ d->reader->cancel(this);
+ }
+
+ return false;
+}
+
+/*!
+ Finds the cached pixmap corresponding to \a url.
+ If the image is a network resource and has not yet
+ been retrieved and cached, request() must be called.
+
+ Returns Ready, or Error if the image has been retrieved,
+ otherwise the current retrieval status.
+
+ If \a async is false the image will be loaded and decoded immediately;
+ otherwise the image will be loaded and decoded in a separate thread.
+
+ Note that images sourced from the network will always be loaded and
+ decoded asynchonously.
+*/
+QDeclarativePixmapReply::Status QDeclarativePixmapCache::get(const QUrl& url, QPixmap *pixmap, bool async)
+{
+ QDeclarativePixmapReply::Status status = QDeclarativePixmapReply::Unrequested;
+ QByteArray key = url.toEncoded(QUrl::FormattingOption(0x100));
+ QString strKey = QString::fromLatin1(key.constData(), key.count());
+
+#ifndef QT_NO_LOCALFILE_OPTIMIZED_QML
+ if (!async) {
+ QString lf = toLocalFileOrQrc(url);
+ if (!lf.isEmpty()) {
+ status = QDeclarativePixmapReply::Ready;
+ if (!QPixmapCache::find(strKey,pixmap)) {
+ QFile f(lf);
+ if (f.open(QIODevice::ReadOnly)) {
+ QString errorString;
+ if (!readImage(&f, pixmap, errorString)) {
+ errorString = QLatin1String("Error decoding: ") + url.toString()
+ + QLatin1String(" \"") + errorString + QLatin1String("\"");
+ qWarning() << errorString;
+ *pixmap = QPixmap();
+ status = QDeclarativePixmapReply::Error;
+ }
+ } else {
+ qWarning() << "Cannot open" << url;
+ *pixmap = QPixmap();
+ status = QDeclarativePixmapReply::Error;
+ }
+ if (status == QDeclarativePixmapReply::Ready)
+ QPixmapCache::insert(strKey, *pixmap);
+ }
+ return status;
+ }
+ }
+#endif
+
+ QDeclarativePixmapReplyHash::Iterator iter = qmlActivePixmapReplies()->find(url);
+ if (iter != qmlActivePixmapReplies()->end() && (*iter)->status() == QDeclarativePixmapReply::Ready) {
+ // Must check this, since QPixmapCache::insert may have failed.
+ *pixmap = (*iter)->d_func()->pixmap;
+ status = (*iter)->status();
+ (*iter)->release();
+ } else if (QPixmapCache::find(strKey, pixmap)) {
+ if (iter != qmlActivePixmapReplies()->end()) {
+ status = (*iter)->status();
+ (*iter)->release();
+ } else {
+ status = pixmap->isNull() ? QDeclarativePixmapReply::Error : QDeclarativePixmapReply::Ready;
+ }
+ } else if (iter != qmlActivePixmapReplies()->end()) {
+ status = QDeclarativePixmapReply::Loading;
+ }
+
+ return status;
+}
+
+/*!
+ Starts a network request to load \a url.
+
+ Returns a QDeclarativePixmapReply. Caller should connect to QDeclarativePixmapReply::finished()
+ and call get() when the image is available.
+
+ The returned QDeclarativePixmapReply will be deleted when all request() calls are
+ matched by a corresponding get() call.
+*/
+QDeclarativePixmapReply *QDeclarativePixmapCache::request(QDeclarativeEngine *engine, const QUrl &url)
+{
+ QDeclarativePixmapReplyHash::Iterator iter = qmlActivePixmapReplies()->find(url);
+ if (iter == qmlActivePixmapReplies()->end()) {
+ QDeclarativeImageReader *reader = QDeclarativeImageReader::instance(engine);
+ QDeclarativePixmapReply *item = reader->getImage(url);
+ iter = qmlActivePixmapReplies()->insert(url, item);
+ } else {
+ (*iter)->addRef();
+ }
+
+ return (*iter);
+}
+
+/*!
+ Cancels a previous call to request().
+
+ May also cancel loading (eg. if no other pending request).
+
+ Any connections from the QDeclarativePixmapReply returned by request() to \a obj will be
+ disconnected.
+*/
+void QDeclarativePixmapCache::cancel(const QUrl& url, QObject *obj)
+{
+ QDeclarativePixmapReplyHash::Iterator iter = qmlActivePixmapReplies()->find(url);
+ if (iter == qmlActivePixmapReplies()->end())
+ return;
+
+ QDeclarativePixmapReply *reply = *iter;
+ if (obj)
+ QObject::disconnect(reply, 0, obj, 0);
+ reply->release();
+}
+
+/*!
+ This function is mainly for test verification. It returns the number of
+ requests that are still unfinished.
+*/
+int QDeclarativePixmapCache::pendingRequests()
+{
+ return qmlActivePixmapReplies()->count();
+}
+
+QT_END_NAMESPACE
+
+#include <qdeclarativepixmapcache.moc>
diff --git a/src/declarative/util/qdeclarativepixmapcache_p.h b/src/declarative/util/qdeclarativepixmapcache_p.h
new file mode 100644
index 0000000000..b8949db9c4
--- /dev/null
+++ b/src/declarative/util/qdeclarativepixmapcache_p.h
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEPIXMAPCACHE_H
+#define QDECLARATIVEPIXMAPCACHE_H
+
+#include <QtCore/QString>
+#include <QtGui/QPixmap>
+#include <QtCore/qurl.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+class QDeclarativeEngine;
+class QNetworkReply;
+class QDeclarativeImageReader;
+
+class QDeclarativePixmapReplyPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativePixmapReply : public QObject
+{
+ Q_OBJECT
+public:
+ ~QDeclarativePixmapReply();
+
+ enum Status { Ready, Error, Unrequested, Loading };
+ Status status() const;
+
+ const QUrl &url() const;
+
+Q_SIGNALS:
+ void finished();
+ void downloadProgress(qint64, qint64);
+
+protected:
+ bool event(QEvent *event);
+
+private:
+ void addRef();
+ bool release(bool defer=false);
+ bool isLoading() const;
+ void setLoading();
+
+private:
+ QDeclarativePixmapReply(QDeclarativeImageReader *reader, const QUrl &url);
+ Q_DISABLE_COPY(QDeclarativePixmapReply)
+ Q_DECLARE_PRIVATE(QDeclarativePixmapReply)
+ friend class QDeclarativeImageRequestHandler;
+ friend class QDeclarativeImageReader;
+ friend class QDeclarativePixmapCache;
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativePixmapCache
+{
+public:
+ static QDeclarativePixmapReply::Status get(const QUrl& url, QPixmap *pixmap, bool async=false);
+ static QDeclarativePixmapReply *request(QDeclarativeEngine *, const QUrl& url);
+ static void cancel(const QUrl& url, QObject *obj);
+ static int pendingRequests();
+};
+
+
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEPIXMAPCACHE_H
diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp
new file mode 100644
index 0000000000..9c2b1e691f
--- /dev/null
+++ b/src/declarative/util/qdeclarativepropertychanges.cpp
@@ -0,0 +1,486 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativepropertychanges_p.h"
+
+#include "qdeclarativeopenmetaobject_p.h"
+
+#include <qdeclarativeinfo.h>
+#include <qdeclarativecustomparser_p.h>
+#include <qdeclarativeparser_p.h>
+#include <qdeclarativeexpression.h>
+#include <qdeclarativebinding_p.h>
+#include <qdeclarativecontext.h>
+#include <qdeclarativeguard_p.h>
+#include <qdeclarativeproperty_p.h>
+
+#include <QtCore/qdebug.h>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \qmlclass PropertyChanges QDeclarativePropertyChanges
+ \since 4.7
+ \brief The PropertyChanges element describes new property values for a state.
+
+ PropertyChanges provides a state change that modifies the properties of an item.
+
+ Here is a property change that modifies the text and color of a Text element
+ when it is clicked:
+
+ \qml
+ Text {
+ id: myText
+ width: 100; height: 100
+ text: "Hello"
+ color: "blue"
+
+ states: State {
+ name: "myState"
+
+ PropertyChanges {
+ target: myText
+ text: "Goodbye"
+ color: "red"
+ }
+ }
+
+ MouseArea { anchors.fill: parent; onClicked: myText.state = 'myState' }
+ }
+ \endqml
+
+ State-specific script for signal handlers can also be specified:
+
+ \qml
+ PropertyChanges {
+ target: myMouseArea
+ onClicked: doSomethingDifferent()
+ }
+ \endqml
+
+ You can reset a property in a state change by assigning \c undefined. In the following
+ example we reset \c theText's width when we enter state1. This will give the text its
+ natural width (which is the whole string on one line).
+
+ \qml
+ import Qt 4.6
+
+ Rectangle {
+ width: 640
+ height: 480
+ Text {
+ id: theText
+ width: 50
+ wrap: true
+ text: "a text string that is longer than 50 pixels"
+ }
+
+ states: State {
+ name: "state1"
+ PropertyChanges {
+ target: theText
+ width: undefined
+ }
+ }
+ }
+ \endqml
+
+ Changes to an Item's parent or anchors should be done using the associated change elements
+ (ParentChange and AnchorChanges, respectively) rather than PropertyChanges.
+
+ \sa {qmlstate}{States}
+*/
+
+/*!
+ \internal
+ \class QDeclarativePropertyChanges
+ \brief The QDeclarativePropertyChanges class describes new property values for a state.
+*/
+
+/*!
+ \qmlproperty Object PropertyChanges::target
+ This property holds the object which contains the properties to be changed.
+*/
+
+class QDeclarativeReplaceSignalHandler : public QDeclarativeActionEvent
+{
+public:
+ QDeclarativeReplaceSignalHandler() : expression(0), reverseExpression(0),
+ rewindExpression(0), ownedExpression(0) {}
+ ~QDeclarativeReplaceSignalHandler() {
+ delete ownedExpression;
+ }
+
+ virtual QString typeName() const { return QLatin1String("ReplaceSignalHandler"); }
+
+ QDeclarativeProperty property;
+ QDeclarativeExpression *expression;
+ QDeclarativeExpression *reverseExpression;
+ QDeclarativeExpression *rewindExpression;
+ QDeclarativeGuard<QDeclarativeExpression> ownedExpression;
+
+ virtual void execute() {
+ ownedExpression = QDeclarativePropertyPrivate::setSignalExpression(property, expression);
+ }
+
+ virtual bool isReversable() { return true; }
+ virtual void reverse() {
+ ownedExpression = QDeclarativePropertyPrivate::setSignalExpression(property, reverseExpression);
+ }
+
+ virtual void saveOriginals() {
+ saveCurrentValues();
+ reverseExpression = rewindExpression;
+ }
+
+ virtual void rewind() {
+ ownedExpression = QDeclarativePropertyPrivate::setSignalExpression(property, rewindExpression);
+ }
+ virtual void saveCurrentValues() {
+ rewindExpression = QDeclarativePropertyPrivate::signalExpression(property);
+ }
+
+ virtual bool override(QDeclarativeActionEvent*other) {
+ if (other == this)
+ return true;
+ if (other->typeName() != typeName())
+ return false;
+ if (static_cast<QDeclarativeReplaceSignalHandler*>(other)->property == property)
+ return true;
+ return false;
+ }
+};
+
+
+class QDeclarativePropertyChangesPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativePropertyChanges)
+public:
+ QDeclarativePropertyChangesPrivate() : object(0), decoded(true), restore(true),
+ isExplicit(false) {}
+
+ QObject *object;
+ QByteArray data;
+
+ bool decoded : 1;
+ bool restore : 1;
+ bool isExplicit : 1;
+
+ void decode();
+
+ QList<QPair<QByteArray, QVariant> > properties;
+ QList<QPair<QByteArray, QDeclarativeExpression *> > expressions;
+ QList<QDeclarativeReplaceSignalHandler*> signalReplacements;
+
+ QDeclarativeProperty property(const QByteArray &);
+};
+
+void
+QDeclarativePropertyChangesParser::compileList(QList<QPair<QByteArray, QVariant> > &list,
+ const QByteArray &pre,
+ const QDeclarativeCustomParserProperty &prop)
+{
+ QByteArray propName = pre + prop.name();
+
+ QList<QVariant> values = prop.assignedValues();
+ for (int ii = 0; ii < values.count(); ++ii) {
+ const QVariant &value = values.at(ii);
+
+ if (value.userType() == qMetaTypeId<QDeclarativeCustomParserNode>()) {
+ continue;
+ } else if(value.userType() == qMetaTypeId<QDeclarativeCustomParserProperty>()) {
+
+ QDeclarativeCustomParserProperty prop =
+ qvariant_cast<QDeclarativeCustomParserProperty>(value);
+ QByteArray pre = propName + '.';
+ compileList(list, pre, prop);
+
+ } else {
+ list << qMakePair(propName, value);
+ }
+ }
+}
+
+QByteArray
+QDeclarativePropertyChangesParser::compile(const QList<QDeclarativeCustomParserProperty> &props)
+{
+ QList<QPair<QByteArray, QVariant> > data;
+ for(int ii = 0; ii < props.count(); ++ii)
+ compileList(data, QByteArray(), props.at(ii));
+
+ QByteArray rv;
+ QDataStream ds(&rv, QIODevice::WriteOnly);
+
+ ds << data.count();
+ for(int ii = 0; ii < data.count(); ++ii) {
+ QDeclarativeParser::Variant v = qvariant_cast<QDeclarativeParser::Variant>(data.at(ii).second);
+ QVariant var;
+ bool isScript = v.isScript();
+ switch(v.type()) {
+ case QDeclarativeParser::Variant::Boolean:
+ var = QVariant(v.asBoolean());
+ break;
+ case QDeclarativeParser::Variant::Number:
+ var = QVariant(v.asNumber());
+ break;
+ case QDeclarativeParser::Variant::String:
+ var = QVariant(v.asString());
+ break;
+ case QDeclarativeParser::Variant::Invalid:
+ case QDeclarativeParser::Variant::Script:
+ var = QVariant(v.asScript());
+ break;
+ }
+
+ ds << data.at(ii).first << isScript << var;
+ }
+
+ return rv;
+}
+
+void QDeclarativePropertyChangesPrivate::decode()
+{
+ Q_Q(QDeclarativePropertyChanges);
+ if (decoded)
+ return;
+
+ QDataStream ds(&data, QIODevice::ReadOnly);
+
+ int count;
+ ds >> count;
+ for (int ii = 0; ii < count; ++ii) {
+ QByteArray name;
+ bool isScript;
+ QVariant data;
+ ds >> name;
+ ds >> isScript;
+ ds >> data;
+
+ QDeclarativeProperty prop = property(name); //### better way to check for signal property?
+ if (prop.type() & QDeclarativeProperty::SignalProperty) {
+ QDeclarativeExpression *expression = new QDeclarativeExpression(qmlContext(q), data.toString(), object);
+ QDeclarativeReplaceSignalHandler *handler = new QDeclarativeReplaceSignalHandler;
+ handler->property = prop;
+ handler->expression = expression;
+ signalReplacements << handler;
+ } else if (isScript) {
+ QDeclarativeExpression *expression = new QDeclarativeExpression(qmlContext(q), data.toString(), object);
+ expressions << qMakePair(name, expression);
+ } else {
+ properties << qMakePair(name, data);
+ }
+ }
+
+ decoded = true;
+ data.clear();
+}
+
+void QDeclarativePropertyChangesParser::setCustomData(QObject *object,
+ const QByteArray &data)
+{
+ QDeclarativePropertyChangesPrivate *p =
+ static_cast<QDeclarativePropertyChangesPrivate *>(QObjectPrivate::get(object));
+ p->data = data;
+ p->decoded = false;
+}
+
+QDeclarativePropertyChanges::QDeclarativePropertyChanges()
+: QDeclarativeStateOperation(*(new QDeclarativePropertyChangesPrivate))
+{
+}
+
+QDeclarativePropertyChanges::~QDeclarativePropertyChanges()
+{
+ Q_D(QDeclarativePropertyChanges);
+ for(int ii = 0; ii < d->expressions.count(); ++ii)
+ delete d->expressions.at(ii).second;
+ for(int ii = 0; ii < d->signalReplacements.count(); ++ii)
+ delete d->signalReplacements.at(ii);
+}
+
+QObject *QDeclarativePropertyChanges::object() const
+{
+ Q_D(const QDeclarativePropertyChanges);
+ return d->object;
+}
+
+void QDeclarativePropertyChanges::setObject(QObject *o)
+{
+ Q_D(QDeclarativePropertyChanges);
+ d->object = o;
+}
+
+/*!
+ \qmlproperty bool PropertyChanges::restoreEntryValues
+
+ Whether or not the previous values should be restored when
+ leaving the state. By default, restoreEntryValues is true.
+
+ By setting restoreEntryValues to false, you can create a temporary state
+ that has permanent effects on property values.
+*/
+bool QDeclarativePropertyChanges::restoreEntryValues() const
+{
+ Q_D(const QDeclarativePropertyChanges);
+ return d->restore;
+}
+
+void QDeclarativePropertyChanges::setRestoreEntryValues(bool v)
+{
+ Q_D(QDeclarativePropertyChanges);
+ d->restore = v;
+}
+
+QDeclarativeProperty
+QDeclarativePropertyChangesPrivate::property(const QByteArray &property)
+{
+ Q_Q(QDeclarativePropertyChanges);
+ QDeclarativeProperty prop(object, QString::fromUtf8(property));
+ if (!prop.isValid()) {
+ qmlInfo(q) << QDeclarativePropertyChanges::tr("Cannot assign to non-existent property \"%1\"").arg(QString::fromUtf8(property));
+ return QDeclarativeProperty();
+ } else if (!(prop.type() & QDeclarativeProperty::SignalProperty) && !prop.isWritable()) {
+ qmlInfo(q) << QDeclarativePropertyChanges::tr("Cannot assign to read-only property \"%1\"").arg(QString::fromUtf8(property));
+ return QDeclarativeProperty();
+ }
+ return prop;
+}
+
+QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions()
+{
+ Q_D(QDeclarativePropertyChanges);
+
+ d->decode();
+
+ ActionList list;
+
+ for (int ii = 0; ii < d->properties.count(); ++ii) {
+
+ QByteArray property = d->properties.at(ii).first;
+
+ QDeclarativeAction a(d->object, QString::fromLatin1(property),
+ d->properties.at(ii).second);
+
+ if (a.property.isValid()) {
+ a.restore = restoreEntryValues();
+
+ if (a.property.propertyType() == QVariant::Url &&
+ (a.toValue.userType() == QVariant::String || a.toValue.userType() == QVariant::ByteArray) && !a.toValue.isNull())
+ a.toValue.setValue(qmlContext(this)->resolvedUrl(QUrl(a.toValue.toString())));
+
+ list << a;
+ }
+ }
+
+ for (int ii = 0; ii < d->signalReplacements.count(); ++ii) {
+
+ QDeclarativeReplaceSignalHandler *handler = d->signalReplacements.at(ii);
+
+ if (handler->property.isValid()) {
+ QDeclarativeAction a;
+ a.event = handler;
+ list << a;
+ }
+ }
+
+ for (int ii = 0; ii < d->expressions.count(); ++ii) {
+
+ QByteArray property = d->expressions.at(ii).first;
+ QDeclarativeProperty prop = d->property(property);
+
+ if (prop.isValid()) {
+ QDeclarativeAction a;
+ a.restore = restoreEntryValues();
+ a.property = prop;
+ a.fromValue = a.property.read();
+ a.specifiedObject = d->object;
+ a.specifiedProperty = QString::fromLatin1(property);
+
+ if (d->isExplicit) {
+ a.toValue = d->expressions.at(ii).second->value();
+ } else {
+ QDeclarativeBinding *newBinding = new QDeclarativeBinding(d->expressions.at(ii).second->expression(), object(), qmlContext(this));
+ newBinding->setTarget(prop);
+ a.toBinding = newBinding;
+ a.deletableToBinding = true;
+ }
+
+ list << a;
+ }
+ }
+
+ return list;
+}
+
+/*!
+ \qmlproperty bool PropertyChanges::explicit
+
+ If explicit is set to true, any potential bindings will be interpreted as
+ once-off assignments that occur when the state is entered.
+
+ In the following example, the addition of explicit prevents myItem.width from
+ being bound to parent.width. Instead, it is assigned the value of parent.width
+ at the time of the state change.
+ \qml
+ PropertyChanges {
+ target: myItem
+ explicit: true
+ width: parent.width
+ }
+ \endqml
+
+ By default, explicit is false.
+*/
+bool QDeclarativePropertyChanges::isExplicit() const
+{
+ Q_D(const QDeclarativePropertyChanges);
+ return d->isExplicit;
+}
+
+void QDeclarativePropertyChanges::setIsExplicit(bool e)
+{
+ Q_D(QDeclarativePropertyChanges);
+ d->isExplicit = e;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativepropertychanges_p.h b/src/declarative/util/qdeclarativepropertychanges_p.h
new file mode 100644
index 0000000000..1274b0ca68
--- /dev/null
+++ b/src/declarative/util/qdeclarativepropertychanges_p.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEPROPERTYCHANGES_H
+#define QDECLARATIVEPROPERTYCHANGES_H
+
+#include "qdeclarativestateoperations_p.h"
+#include <private/qdeclarativecustomparser_p.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativePropertyChangesPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativePropertyChanges : public QDeclarativeStateOperation
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativePropertyChanges)
+
+ Q_PROPERTY(QObject *target READ object WRITE setObject)
+ Q_PROPERTY(bool restoreEntryValues READ restoreEntryValues WRITE setRestoreEntryValues)
+ Q_PROPERTY(bool explicit READ isExplicit WRITE setIsExplicit)
+public:
+ QDeclarativePropertyChanges();
+ ~QDeclarativePropertyChanges();
+
+ QObject *object() const;
+ void setObject(QObject *);
+
+ bool restoreEntryValues() const;
+ void setRestoreEntryValues(bool);
+
+ bool isExplicit() const;
+ void setIsExplicit(bool);
+
+ virtual ActionList actions();
+};
+
+class QDeclarativePropertyChangesParser : public QDeclarativeCustomParser
+{
+public:
+ void compileList(QList<QPair<QByteArray, QVariant> > &list, const QByteArray &pre, const QDeclarativeCustomParserProperty &prop);
+
+ virtual QByteArray compile(const QList<QDeclarativeCustomParserProperty> &);
+ virtual void setCustomData(QObject *, const QByteArray &);
+};
+
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativePropertyChanges)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEPROPERTYCHANGES_H
diff --git a/src/declarative/util/qdeclarativepropertymap.cpp b/src/declarative/util/qdeclarativepropertymap.cpp
new file mode 100644
index 0000000000..fcea515769
--- /dev/null
+++ b/src/declarative/util/qdeclarativepropertymap.cpp
@@ -0,0 +1,279 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativepropertymap.h"
+
+#include "qdeclarativeopenmetaobject_p.h"
+
+#include <QDebug>
+
+QT_BEGIN_NAMESPACE
+
+//QDeclarativePropertyMapMetaObject lets us listen for changes coming from QML
+//so we can emit the changed signal.
+class QDeclarativePropertyMapMetaObject : public QDeclarativeOpenMetaObject
+{
+public:
+ QDeclarativePropertyMapMetaObject(QDeclarativePropertyMap *obj, QDeclarativePropertyMapPrivate *objPriv);
+
+protected:
+ virtual void propertyWrite(int index);
+
+private:
+ QDeclarativePropertyMap *map;
+ QDeclarativePropertyMapPrivate *priv;
+};
+
+class QDeclarativePropertyMapPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativePropertyMap)
+public:
+ QDeclarativePropertyMapMetaObject *mo;
+ QStringList keys;
+ void emitChanged(const QString &key);
+};
+
+void QDeclarativePropertyMapPrivate::emitChanged(const QString &key)
+{
+ Q_Q(QDeclarativePropertyMap);
+ emit q->valueChanged(key);
+}
+
+QDeclarativePropertyMapMetaObject::QDeclarativePropertyMapMetaObject(QDeclarativePropertyMap *obj, QDeclarativePropertyMapPrivate *objPriv) : QDeclarativeOpenMetaObject(obj)
+{
+ map = obj;
+ priv = objPriv;
+}
+
+void QDeclarativePropertyMapMetaObject::propertyWrite(int index)
+{
+ priv->emitChanged(QString::fromUtf8(name(index)));
+}
+
+/*!
+ \class QDeclarativePropertyMap
+ \since 4.7
+ \brief The QDeclarativePropertyMap class allows you to set key-value pairs that can be used in bindings.
+
+ QDeclarativePropertyMap provides a convenient way to expose domain data to the UI layer.
+ The following example shows how you might declare data in C++ and then
+ access it in QML.
+
+ Setup in C++:
+ \code
+ //create our data
+ QDeclarativePropertyMap ownerData;
+ ownerData.insert("name", QVariant(QString("John Smith")));
+ ownerData.insert("phone", QVariant(QString("555-5555")));
+
+ //expose it to the UI layer
+ QDeclarativeContext *ctxt = view->bindContext();
+ ctxt->setProperty("owner", &data);
+ \endcode
+
+ Then, in QML:
+ \code
+ Text { text: owner.name }
+ Text { text: owner.phone }
+ \endcode
+
+ The binding is dynamic - whenever a key's value is updated, anything bound to that
+ key will be updated as well.
+
+ To detect value changes made in the UI layer you can connect to the valueChanged() signal.
+ However, note that valueChanged() is \bold NOT emitted when changes are made by calling insert()
+ or clear() - it is only emitted when a value is updated from QML.
+
+ \note It is not possible to remove keys from the map; once a key has been added, you can only
+ modify or clear its associated value.
+*/
+
+/*!
+ Constructs a bindable map with parent object \a parent.
+*/
+QDeclarativePropertyMap::QDeclarativePropertyMap(QObject *parent)
+: QObject(*(new QDeclarativePropertyMapPrivate), parent)
+{
+ Q_D(QDeclarativePropertyMap);
+ d->mo = new QDeclarativePropertyMapMetaObject(this, d);
+}
+
+/*!
+ Destroys the bindable map.
+*/
+QDeclarativePropertyMap::~QDeclarativePropertyMap()
+{
+}
+
+/*!
+ Clears the value (if any) associated with \a key.
+*/
+void QDeclarativePropertyMap::clear(const QString &key)
+{
+ Q_D(QDeclarativePropertyMap);
+ d->mo->setValue(key.toUtf8(), QVariant());
+}
+
+/*!
+ Returns the value associated with \a key.
+
+ If no value has been set for this key (or if the value has been cleared),
+ an invalid QVariant is returned.
+*/
+QVariant QDeclarativePropertyMap::value(const QString &key) const
+{
+ Q_D(const QDeclarativePropertyMap);
+ return d->mo->value(key.toUtf8());
+}
+
+/*!
+ Sets the value associated with \a key to \a value.
+
+ If the key doesn't exist, it is automatically created.
+*/
+void QDeclarativePropertyMap::insert(const QString &key, const QVariant &value)
+{
+ Q_D(QDeclarativePropertyMap);
+ if (!d->keys.contains(key))
+ d->keys.append(key);
+ d->mo->setValue(key.toUtf8(), value);
+}
+
+/*!
+ Returns the list of keys.
+
+ Keys that have been cleared will still appear in this list, even though their
+ associated values are invalid QVariants.
+*/
+QStringList QDeclarativePropertyMap::keys() const
+{
+ Q_D(const QDeclarativePropertyMap);
+ return d->keys;
+}
+
+/*!
+ \overload
+
+ Same as size().
+*/
+int QDeclarativePropertyMap::count() const
+{
+ Q_D(const QDeclarativePropertyMap);
+ return d->keys.count();
+}
+
+/*!
+ Returns the number of keys in the map.
+
+ \sa isEmpty(), count()
+*/
+int QDeclarativePropertyMap::size() const
+{
+ Q_D(const QDeclarativePropertyMap);
+ return d->keys.size();
+}
+
+/*!
+ Returns true if the map contains no keys; otherwise returns
+ false.
+
+ \sa size()
+*/
+bool QDeclarativePropertyMap::isEmpty() const
+{
+ Q_D(const QDeclarativePropertyMap);
+ return d->keys.isEmpty();
+}
+
+/*!
+ Returns true if the map contains \a key.
+
+ \sa size()
+*/
+bool QDeclarativePropertyMap::contains(const QString &key) const
+{
+ Q_D(const QDeclarativePropertyMap);
+ return d->keys.contains(key);
+}
+
+/*!
+ Returns the value associated with the key \a key as a modifiable
+ reference.
+
+ If the map contains no item with key \a key, the function inserts
+ an invalid QVariant into the map with key \a key, and
+ returns a reference to it.
+
+ \sa insert(), value()
+*/
+QVariant &QDeclarativePropertyMap::operator[](const QString &key)
+{
+ //### optimize
+ Q_D(QDeclarativePropertyMap);
+ QByteArray utf8key = key.toUtf8();
+ if (!d->keys.contains(key)) {
+ d->keys.append(key);
+ d->mo->setValue(utf8key, QVariant()); //force creation -- needed below
+ }
+
+ return (*(d->mo))[utf8key];
+}
+
+/*!
+ \overload
+
+ Same as value().
+*/
+const QVariant QDeclarativePropertyMap::operator[](const QString &key) const
+{
+ return value(key);
+}
+
+/*!
+ \fn void QDeclarativePropertyMap::valueChanged(const QString &key)
+ This signal is emitted whenever one of the values in the map is changed. \a key
+ is the key corresponding to the value that was changed.
+
+ \note valueChanged() is \bold NOT emitted when changes are made by calling insert()
+ or clear() - it is only emitted when a value is updated from QML.
+*/
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativepropertymap.h b/src/declarative/util/qdeclarativepropertymap.h
new file mode 100644
index 0000000000..513089f120
--- /dev/null
+++ b/src/declarative/util/qdeclarativepropertymap.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEPROPERTYMAP_H
+#define QDECLARATIVEPROPERTYMAP_H
+
+#include <QtCore/QObject>
+#include <QtCore/QHash>
+#include <QtCore/QStringList>
+#include <QtCore/QVariant>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativePropertyMapPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativePropertyMap : public QObject
+{
+ Q_OBJECT
+public:
+ QDeclarativePropertyMap(QObject *parent = 0);
+ virtual ~QDeclarativePropertyMap();
+
+ QVariant value(const QString &key) const;
+ void insert(const QString &key, const QVariant &value);
+ void clear(const QString &key);
+
+ Q_INVOKABLE QStringList keys() const;
+
+ int count() const;
+ int size() const;
+ bool isEmpty() const;
+ bool contains(const QString &key) const;
+
+ QVariant &operator[](const QString &key);
+ const QVariant operator[](const QString &key) const;
+
+Q_SIGNALS:
+ void valueChanged(const QString &key);
+
+private:
+ Q_DECLARE_PRIVATE(QDeclarativePropertyMap)
+ Q_DISABLE_COPY(QDeclarativePropertyMap)
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/declarative/util/qdeclarativespringfollow.cpp b/src/declarative/util/qdeclarativespringfollow.cpp
new file mode 100644
index 0000000000..1d69dd3232
--- /dev/null
+++ b/src/declarative/util/qdeclarativespringfollow.cpp
@@ -0,0 +1,465 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativespringfollow_p.h"
+
+#include "qdeclarativeanimation_p_p.h"
+
+#include <QtCore/qdebug.h>
+
+#include <private/qobject_p.h>
+
+#include <limits.h>
+#include <math.h>
+
+QT_BEGIN_NAMESPACE
+
+
+
+class QDeclarativeSpringFollowPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeSpringFollow)
+public:
+ QDeclarativeSpringFollowPrivate()
+ : currentValue(0), sourceValue(0), maxVelocity(0), lastTime(0)
+ , mass(1.0), spring(0.), damping(0.), velocity(0), epsilon(0.01)
+ , modulus(0.0), useMass(false), haveModulus(false), enabled(true), mode(Track), clock(this) {}
+
+ QDeclarativeProperty property;
+ qreal currentValue;
+ qreal sourceValue;
+ qreal maxVelocity;
+ qreal velocityms;
+ int lastTime;
+ qreal mass;
+ qreal spring;
+ qreal damping;
+ qreal velocity;
+ qreal epsilon;
+ qreal modulus;
+
+ bool useMass : 1;
+ bool haveModulus : 1;
+ bool enabled : 1;
+
+ enum Mode {
+ Track,
+ Velocity,
+ Spring
+ };
+ Mode mode;
+
+ void tick(int);
+ void updateMode();
+ void start();
+ void stop();
+
+ QTickAnimationProxy<QDeclarativeSpringFollowPrivate, &QDeclarativeSpringFollowPrivate::tick> clock;
+};
+
+void QDeclarativeSpringFollowPrivate::tick(int time)
+{
+ Q_Q(QDeclarativeSpringFollow);
+
+ int elapsed = time - lastTime;
+ if (!elapsed)
+ return;
+ qreal srcVal = sourceValue;
+ if (haveModulus) {
+ currentValue = fmod(currentValue, modulus);
+ srcVal = fmod(srcVal, modulus);
+ }
+ if (mode == Spring) {
+ if (elapsed < 16) // capped at 62fps.
+ return;
+ // Real men solve the spring DEs using RK4.
+ // We'll do something much simpler which gives a result that looks fine.
+ int count = elapsed / 16;
+ for (int i = 0; i < count; ++i) {
+ qreal diff = srcVal - currentValue;
+ if (haveModulus && qAbs(diff) > modulus / 2) {
+ if (diff < 0)
+ diff += modulus;
+ else
+ diff -= modulus;
+ }
+ if (useMass)
+ velocity = velocity + (spring * diff - damping * velocity) / mass;
+ else
+ velocity = velocity + spring * diff - damping * velocity;
+ if (maxVelocity > 0.) {
+ // limit velocity
+ if (velocity > maxVelocity)
+ velocity = maxVelocity;
+ else if (velocity < -maxVelocity)
+ velocity = -maxVelocity;
+ }
+ currentValue += velocity * 16.0 / 1000.0;
+ if (haveModulus) {
+ currentValue = fmod(currentValue, modulus);
+ if (currentValue < 0.0)
+ currentValue += modulus;
+ }
+ }
+ if (qAbs(velocity) < epsilon && qAbs(srcVal - currentValue) < epsilon) {
+ velocity = 0.0;
+ currentValue = srcVal;
+ clock.stop();
+ }
+ lastTime = time - (elapsed - count * 16);
+ } else {
+ qreal moveBy = elapsed * velocityms;
+ qreal diff = srcVal - currentValue;
+ if (haveModulus && qAbs(diff) > modulus / 2) {
+ if (diff < 0)
+ diff += modulus;
+ else
+ diff -= modulus;
+ }
+ if (diff > 0) {
+ currentValue += moveBy;
+ if (haveModulus)
+ currentValue = fmod(currentValue, modulus);
+ if (currentValue > sourceValue) {
+ currentValue = sourceValue;
+ clock.stop();
+ }
+ } else {
+ currentValue -= moveBy;
+ if (haveModulus && currentValue < 0.0)
+ currentValue = fmod(currentValue, modulus) + modulus;
+ if (currentValue < sourceValue) {
+ currentValue = sourceValue;
+ clock.stop();
+ }
+ }
+ lastTime = time;
+ }
+ property.write(currentValue);
+ emit q->valueChanged(currentValue);
+ if (clock.state() != QAbstractAnimation::Running)
+ emit q->syncChanged();
+}
+
+void QDeclarativeSpringFollowPrivate::updateMode()
+{
+ if (spring == 0. && maxVelocity == 0.)
+ mode = Track;
+ else if (spring > 0.)
+ mode = Spring;
+ else
+ mode = Velocity;
+}
+
+void QDeclarativeSpringFollowPrivate::start()
+{
+ if (!enabled)
+ return;
+
+ Q_Q(QDeclarativeSpringFollow);
+ if (mode == QDeclarativeSpringFollowPrivate::Track) {
+ currentValue = sourceValue;
+ property.write(currentValue);
+ } else if (sourceValue != currentValue && clock.state() != QAbstractAnimation::Running) {
+ lastTime = 0;
+ currentValue = property.read().toReal();
+ clock.start(); // infinity??
+ emit q->syncChanged();
+ }
+}
+
+void QDeclarativeSpringFollowPrivate::stop()
+{
+ clock.stop();
+}
+
+/*!
+ \qmlclass SpringFollow QDeclarativeSpringFollow
+ \since 4.7
+ \brief The SpringFollow element allows a property to track a value.
+
+ In example below, \e rect2 will follow \e rect1 moving with a velocity of up to 200:
+ \code
+ Rectangle {
+ id: rect1
+ width: 20; height: 20
+ color: "#00ff00"
+ y: 200 // initial value
+ SequentialAnimation on y {
+ running: true
+ repeat: true
+ NumberAnimation {
+ to: 200
+ easing: "easeOutBounce(amplitude:100)"
+ duration: 2000
+ }
+ PauseAnimation { duration: 1000 }
+ }
+ }
+ Rectangle {
+ id: rect2
+ x: rect1.width
+ width: 20; height: 20
+ color: "#ff0000"
+ SpringFollow on y { source: rect1.y; velocity: 200 }
+ }
+ \endcode
+
+ \sa EaseFollow
+*/
+
+QDeclarativeSpringFollow::QDeclarativeSpringFollow(QObject *parent)
+: QObject(*(new QDeclarativeSpringFollowPrivate),parent)
+{
+}
+
+QDeclarativeSpringFollow::~QDeclarativeSpringFollow()
+{
+}
+
+void QDeclarativeSpringFollow::setTarget(const QDeclarativeProperty &property)
+{
+ Q_D(QDeclarativeSpringFollow);
+ d->property = property;
+ d->currentValue = property.read().toReal();
+}
+
+qreal QDeclarativeSpringFollow::sourceValue() const
+{
+ Q_D(const QDeclarativeSpringFollow);
+ return d->sourceValue;
+}
+
+/*!
+ \qmlproperty qreal SpringFollow::source
+ This property holds the source value which will be tracked.
+
+ Bind to a property in order to track its changes.
+*/
+
+void QDeclarativeSpringFollow::setSourceValue(qreal value)
+{
+ Q_D(QDeclarativeSpringFollow);
+ if (d->clock.state() == QAbstractAnimation::Running && d->sourceValue == value)
+ return;
+
+ d->sourceValue = value;
+ d->start();
+}
+
+/*!
+ \qmlproperty qreal SpringFollow::velocity
+ This property holds the maximum velocity allowed when tracking the source.
+*/
+
+qreal QDeclarativeSpringFollow::velocity() const
+{
+ Q_D(const QDeclarativeSpringFollow);
+ return d->maxVelocity;
+}
+
+void QDeclarativeSpringFollow::setVelocity(qreal velocity)
+{
+ Q_D(QDeclarativeSpringFollow);
+ d->maxVelocity = velocity;
+ d->velocityms = velocity / 1000.0;
+ d->updateMode();
+}
+
+/*!
+ \qmlproperty qreal SpringFollow::spring
+ This property holds the spring constant
+
+ The spring constant describes how strongly the target is pulled towards the
+ source. Setting spring to 0 turns off spring tracking. Useful values 0 - 5.0
+
+ When a spring constant is set and the velocity property is greater than 0,
+ velocity limits the maximum speed.
+*/
+qreal QDeclarativeSpringFollow::spring() const
+{
+ Q_D(const QDeclarativeSpringFollow);
+ return d->spring;
+}
+
+void QDeclarativeSpringFollow::setSpring(qreal spring)
+{
+ Q_D(QDeclarativeSpringFollow);
+ d->spring = spring;
+ d->updateMode();
+}
+
+/*!
+ \qmlproperty qreal SpringFollow::damping
+ This property holds the spring damping constant
+
+ The damping constant describes how quickly a sprung follower comes to rest.
+ Useful range is 0 - 1.0
+*/
+qreal QDeclarativeSpringFollow::damping() const
+{
+ Q_D(const QDeclarativeSpringFollow);
+ return d->damping;
+}
+
+void QDeclarativeSpringFollow::setDamping(qreal damping)
+{
+ Q_D(QDeclarativeSpringFollow);
+ if (damping > 1.)
+ damping = 1.;
+
+ d->damping = damping;
+}
+
+
+/*!
+ \qmlproperty qreal SpringFollow::epsilon
+ This property holds the spring epsilon
+
+ The epsilon is the rate and amount of change in the value which is close enough
+ to 0 to be considered equal to zero. This will depend on the usage of the value.
+ For pixel positions, 0.25 would suffice. For scale, 0.005 will suffice.
+
+ The default is 0.01. Tuning this value can provide small performance improvements.
+*/
+qreal QDeclarativeSpringFollow::epsilon() const
+{
+ Q_D(const QDeclarativeSpringFollow);
+ return d->epsilon;
+}
+
+void QDeclarativeSpringFollow::setEpsilon(qreal epsilon)
+{
+ Q_D(QDeclarativeSpringFollow);
+ d->epsilon = epsilon;
+}
+
+/*!
+ \qmlproperty qreal SpringFollow::modulus
+ This property holds the modulus value.
+
+ Setting a \a modulus forces the target value to "wrap around" at the modulus.
+ For example, setting the modulus to 360 will cause a value of 370 to wrap around to 10.
+*/
+qreal QDeclarativeSpringFollow::modulus() const
+{
+ Q_D(const QDeclarativeSpringFollow);
+ return d->modulus;
+}
+
+void QDeclarativeSpringFollow::setModulus(qreal modulus)
+{
+ Q_D(QDeclarativeSpringFollow);
+ if (d->modulus != modulus) {
+ d->haveModulus = modulus != 0.0;
+ d->modulus = modulus;
+ emit modulusChanged();
+ }
+}
+
+/*!
+ \qmlproperty qreal SpringFollow::mass
+ This property holds the "mass" of the property being moved.
+
+ mass is 1.0 by default. Setting a different mass changes the dynamics of
+ a \l spring follow.
+*/
+qreal QDeclarativeSpringFollow::mass() const
+{
+ Q_D(const QDeclarativeSpringFollow);
+ return d->mass;
+}
+
+void QDeclarativeSpringFollow::setMass(qreal mass)
+{
+ Q_D(QDeclarativeSpringFollow);
+ if (d->mass != mass && mass > 0.0) {
+ d->useMass = mass != 1.0;
+ d->mass = mass;
+ emit massChanged();
+ }
+}
+
+/*!
+ \qmlproperty qreal SpringFollow::value
+ The current value.
+*/
+
+/*!
+ \qmlproperty bool SpringFollow::enabled
+ This property holds whether the target will track the source.
+*/
+bool QDeclarativeSpringFollow::enabled() const
+{
+ Q_D(const QDeclarativeSpringFollow);
+ return d->enabled;
+}
+
+void QDeclarativeSpringFollow::setEnabled(bool enabled)
+{
+ Q_D(QDeclarativeSpringFollow);
+ d->enabled = enabled;
+ if (enabled)
+ d->start();
+ else
+ d->stop();
+}
+
+/*!
+ \qmlproperty bool SpringFollow::inSync
+ This property is true when target is equal to the source; otherwise
+ false. If inSync is true the target is not being animated.
+
+ If \l enabled is false then inSync will also be false.
+*/
+bool QDeclarativeSpringFollow::inSync() const
+{
+ Q_D(const QDeclarativeSpringFollow);
+ return d->enabled && d->clock.state() != QAbstractAnimation::Running;
+}
+
+qreal QDeclarativeSpringFollow::value() const
+{
+ Q_D(const QDeclarativeSpringFollow);
+ return d->currentValue;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativespringfollow_p.h b/src/declarative/util/qdeclarativespringfollow_p.h
new file mode 100644
index 0000000000..2ac0d82cd4
--- /dev/null
+++ b/src/declarative/util/qdeclarativespringfollow_p.h
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVESMOOTHFOLLOW_H
+#define QDECLARATIVESMOOTHFOLLOW_H
+
+#include <qdeclarativepropertyvaluesource.h>
+#include <qdeclarative.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeSpringFollowPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeSpringFollow : public QObject,
+ public QDeclarativePropertyValueSource
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeSpringFollow)
+ Q_INTERFACES(QDeclarativePropertyValueSource)
+
+ Q_PROPERTY(qreal source READ sourceValue WRITE setSourceValue)
+ Q_PROPERTY(qreal velocity READ velocity WRITE setVelocity)
+ Q_PROPERTY(qreal spring READ spring WRITE setSpring)
+ Q_PROPERTY(qreal damping READ damping WRITE setDamping)
+ Q_PROPERTY(qreal epsilon READ epsilon WRITE setEpsilon)
+ Q_PROPERTY(bool enabled READ enabled WRITE setEnabled)
+ Q_PROPERTY(qreal value READ value NOTIFY valueChanged)
+ Q_PROPERTY(qreal modulus READ modulus WRITE setModulus NOTIFY modulusChanged)
+ Q_PROPERTY(qreal mass READ mass WRITE setMass NOTIFY massChanged)
+ Q_PROPERTY(bool inSync READ inSync NOTIFY syncChanged)
+
+public:
+ QDeclarativeSpringFollow(QObject *parent=0);
+ ~QDeclarativeSpringFollow();
+
+ virtual void setTarget(const QDeclarativeProperty &);
+
+ qreal sourceValue() const;
+ void setSourceValue(qreal value);
+ qreal velocity() const;
+ void setVelocity(qreal velocity);
+ qreal spring() const;
+ void setSpring(qreal spring);
+ qreal damping() const;
+ void setDamping(qreal damping);
+ qreal epsilon() const;
+ void setEpsilon(qreal epsilon);
+ qreal mass() const;
+ void setMass(qreal modulus);
+ qreal modulus() const;
+ void setModulus(qreal modulus);
+ bool enabled() const;
+ void setEnabled(bool enabled);
+ bool inSync() const;
+
+ qreal value() const;
+
+Q_SIGNALS:
+ void valueChanged(qreal);
+ void modulusChanged();
+ void massChanged();
+ void syncChanged();
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeSpringFollow)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVESMOOTHFOLLOW_H
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp
new file mode 100644
index 0000000000..1d70d33636
--- /dev/null
+++ b/src/declarative/util/qdeclarativestate.cpp
@@ -0,0 +1,483 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativestate_p_p.h"
+#include "qdeclarativestate_p.h"
+
+#include "qdeclarativetransition_p.h"
+#include "qdeclarativestategroup_p.h"
+#include "qdeclarativestateoperations_p.h"
+#include "qdeclarativeanimation_p.h"
+#include "qdeclarativeanimation_p_p.h"
+
+#include <qdeclarativebinding_p.h>
+#include <qdeclarativeglobal_p.h>
+
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+DEFINE_BOOL_CONFIG_OPTION(stateChangeDebug, STATECHANGE_DEBUG);
+
+QDeclarativeAction::QDeclarativeAction()
+: restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false), fromBinding(0), toBinding(0), event(0),
+ specifiedObject(0)
+{
+}
+
+QDeclarativeAction::QDeclarativeAction(QObject *target, const QString &propertyName,
+ const QVariant &value)
+: restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false),
+ property(target, propertyName), toValue(value),
+ fromBinding(0), toBinding(0), event(0),
+ specifiedObject(target), specifiedProperty(propertyName)
+{
+ if (property.isValid())
+ fromValue = property.read();
+}
+
+QDeclarativeActionEvent::~QDeclarativeActionEvent()
+{
+}
+
+QString QDeclarativeActionEvent::typeName() const
+{
+ return QString();
+}
+
+void QDeclarativeActionEvent::execute()
+{
+}
+
+bool QDeclarativeActionEvent::isReversable()
+{
+ return false;
+}
+
+void QDeclarativeActionEvent::reverse()
+{
+}
+
+QList<QDeclarativeAction> QDeclarativeActionEvent::extraActions()
+{
+ return QList<QDeclarativeAction>();
+}
+
+bool QDeclarativeActionEvent::changesBindings()
+{
+ return false;
+}
+
+void QDeclarativeActionEvent::clearForwardBindings()
+{
+}
+
+void QDeclarativeActionEvent::clearReverseBindings()
+{
+}
+
+bool QDeclarativeActionEvent::override(QDeclarativeActionEvent *other)
+{
+ Q_UNUSED(other);
+ return false;
+}
+
+/*!
+ \internal
+*/
+QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObject *parent)
+ : QObject(dd, parent)
+{
+}
+
+/*!
+ \qmlclass State QDeclarativeState
+ \since 4.7
+ \brief The State element defines configurations of objects and properties.
+
+ A state is specified as a set of batched changes from the default configuration.
+
+ Note that setting the state of an object from within another state of the same object is
+ inadvisible. Not only would this have the same effect as going directly to the second state
+ it may cause the program to crash.
+
+ \sa {qmlstates}{States}, {state-transitions}{Transitions}
+*/
+
+/*!
+ \internal
+ \class QDeclarativeState
+ \brief The QDeclarativeState class allows you to define configurations of objects and properties.
+
+ \ingroup group_states
+
+ QDeclarativeState allows you to specify a state as a set of batched changes from the default
+ configuration.
+
+ \sa {states-transitions}{States and Transitions}
+*/
+
+
+QDeclarativeState::QDeclarativeState(QObject *parent)
+: QObject(*(new QDeclarativeStatePrivate), parent)
+{
+ Q_D(QDeclarativeState);
+ d->transitionManager.setState(this);
+}
+
+QDeclarativeState::~QDeclarativeState()
+{
+ Q_D(QDeclarativeState);
+ if (d->group)
+ d->group->removeState(this);
+}
+
+/*!
+ \qmlproperty string State::name
+ This property holds the name of the state
+
+ Each state should have a unique name.
+*/
+QString QDeclarativeState::name() const
+{
+ Q_D(const QDeclarativeState);
+ return d->name;
+}
+
+void QDeclarativeState::setName(const QString &n)
+{
+ Q_D(QDeclarativeState);
+ d->name = n;
+}
+
+bool QDeclarativeState::isWhenKnown() const
+{
+ Q_D(const QDeclarativeState);
+ return d->when != 0;
+}
+
+/*!
+ \qmlproperty bool State::when
+ This property holds when the state should be applied
+
+ This should be set to an expression that evaluates to true when you want the state to
+ be applied.
+*/
+QDeclarativeBinding *QDeclarativeState::when() const
+{
+ Q_D(const QDeclarativeState);
+ return d->when;
+}
+
+void QDeclarativeState::setWhen(QDeclarativeBinding *when)
+{
+ Q_D(QDeclarativeState);
+ d->when = when;
+ if (d->group)
+ d->group->updateAutoState();
+}
+
+/*!
+ \qmlproperty string State::extend
+ This property holds the state that this state extends
+
+ The state being extended is treated as the base state in regards to
+ the changes specified by the extending state.
+*/
+QString QDeclarativeState::extends() const
+{
+ Q_D(const QDeclarativeState);
+ return d->extends;
+}
+
+void QDeclarativeState::setExtends(const QString &extends)
+{
+ Q_D(QDeclarativeState);
+ d->extends = extends;
+}
+
+/*!
+ \qmlproperty list<Change> State::changes
+ This property holds the changes to apply for this state
+ \default
+
+ By default these changes are applied against the default state. If the state
+ extends another state, then the changes are applied against the state being
+ extended.
+*/
+QDeclarativeListProperty<QDeclarativeStateOperation> QDeclarativeState::changes()
+{
+ Q_D(QDeclarativeState);
+ return QDeclarativeListProperty<QDeclarativeStateOperation>(this, &d->operations, QDeclarativeStatePrivate::operations_append,
+ QDeclarativeStatePrivate::operations_count, QDeclarativeStatePrivate::operations_at,
+ QDeclarativeStatePrivate::operations_clear);
+}
+
+int QDeclarativeState::operationCount() const
+{
+ Q_D(const QDeclarativeState);
+ return d->operations.count();
+}
+
+QDeclarativeStateOperation *QDeclarativeState::operationAt(int index) const
+{
+ Q_D(const QDeclarativeState);
+ return d->operations.at(index);
+}
+
+QDeclarativeState &QDeclarativeState::operator<<(QDeclarativeStateOperation *op)
+{
+ Q_D(QDeclarativeState);
+ d->operations.append(QDeclarativeStatePrivate::OperationGuard(op, &d->operations));
+ return *this;
+}
+
+void QDeclarativeStatePrivate::complete()
+{
+ Q_Q(QDeclarativeState);
+
+ for (int ii = 0; ii < reverting.count(); ++ii) {
+ for (int jj = 0; jj < revertList.count(); ++jj) {
+ if (revertList.at(jj).property == reverting.at(ii)) {
+ revertList.removeAt(jj);
+ break;
+ }
+ }
+ }
+ reverting.clear();
+
+ emit q->completed();
+}
+
+// Generate a list of actions for this state. This includes coelescing state
+// actions that this state "extends"
+QDeclarativeStateOperation::ActionList
+QDeclarativeStatePrivate::generateActionList(QDeclarativeStateGroup *group) const
+{
+ QDeclarativeStateOperation::ActionList applyList;
+ if (inState)
+ return applyList;
+
+ // Prevent "extends" recursion
+ inState = true;
+
+ if (!extends.isEmpty()) {
+ QList<QDeclarativeState *> states = group->states();
+ for (int ii = 0; ii < states.count(); ++ii)
+ if (states.at(ii)->name() == extends)
+ applyList = static_cast<QDeclarativeStatePrivate*>(states.at(ii)->d_func())->generateActionList(group);
+ }
+
+ foreach(QDeclarativeStateOperation *op, operations)
+ applyList << op->actions();
+
+ inState = false;
+ return applyList;
+}
+
+QDeclarativeStateGroup *QDeclarativeState::stateGroup() const
+{
+ Q_D(const QDeclarativeState);
+ return d->group;
+}
+
+void QDeclarativeState::setStateGroup(QDeclarativeStateGroup *group)
+{
+ Q_D(QDeclarativeState);
+ d->group = group;
+}
+
+void QDeclarativeState::cancel()
+{
+ Q_D(QDeclarativeState);
+ d->transitionManager.cancel();
+}
+
+void QDeclarativeAction::deleteFromBinding()
+{
+ if (fromBinding) {
+ QDeclarativePropertyPrivate::setBinding(property, 0);
+ fromBinding->destroy();
+ fromBinding = 0;
+ }
+}
+
+void QDeclarativeState::apply(QDeclarativeStateGroup *group, QDeclarativeTransition *trans, QDeclarativeState *revert)
+{
+ Q_D(QDeclarativeState);
+
+ qmlExecuteDeferred(this);
+
+ cancel();
+ if (revert)
+ revert->cancel();
+ d->revertList.clear();
+ d->reverting.clear();
+
+ if (revert) {
+ QDeclarativeStatePrivate *revertPrivate =
+ static_cast<QDeclarativeStatePrivate*>(revert->d_func());
+ d->revertList = revertPrivate->revertList;
+ revertPrivate->revertList.clear();
+ }
+
+ // List of actions caused by this state
+ QDeclarativeStateOperation::ActionList applyList = d->generateActionList(group);
+
+ // List of actions that need to be reverted to roll back (just) this state
+ QDeclarativeStatePrivate::SimpleActionList additionalReverts;
+ // First add the reverse of all the applyList actions
+ for (int ii = 0; ii < applyList.count(); ++ii) {
+ QDeclarativeAction &action = applyList[ii];
+
+ bool found = false;
+
+ int jj;
+ if (action.event) {
+ if (!action.event->isReversable())
+ continue;
+ for (jj = 0; jj < d->revertList.count(); ++jj) {
+ QDeclarativeActionEvent *event = d->revertList.at(jj).event;
+ if (event && event->typeName() == action.event->typeName()) {
+ if (action.event->override(event)) {
+ found = true;
+ break;
+ }
+ }
+ }
+ if (!found || action.event != d->revertList.at(jj).event)
+ action.event->saveOriginals();
+ else if (action.event->isRewindable())
+ action.event->saveCurrentValues();
+ } else {
+ action.fromBinding = QDeclarativePropertyPrivate::binding(action.property);
+
+ for (jj = 0; jj < d->revertList.count(); ++jj) {
+ if (d->revertList.at(jj).property == action.property) {
+ found = true;
+ break;
+ }
+ }
+ }
+
+ if (!found) {
+ if (!action.restore) {
+ action.deleteFromBinding();
+ } else {
+ // Only need to revert the applyList action if the previous
+ // state doesn't have a higher priority revert already
+ QDeclarativeSimpleAction r(action);
+ additionalReverts << r;
+ }
+ } else if (d->revertList.at(jj).binding != action.fromBinding) {
+ action.deleteFromBinding();
+ }
+ }
+
+ // Any reverts from a previous state that aren't carried forth
+ // 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 (!event->isReversable())
+ continue;
+ for (int jj = 0; !found && jj < applyList.count(); ++jj) {
+ const QDeclarativeAction &action = applyList.at(jj);
+ if (action.event && action.event->typeName() == event->typeName()) {
+ if (action.event->override(event))
+ found = true;
+ }
+ }
+ } else {
+ for (int jj = 0; !found && jj < applyList.count(); ++jj) {
+ const QDeclarativeAction &action = applyList.at(jj);
+ if (action.property == d->revertList.at(ii).property)
+ found = true;
+ }
+ }
+ if (!found) {
+ QVariant cur = d->revertList.at(ii).property.read();
+ QDeclarativeAbstractBinding *delBinding =
+ QDeclarativePropertyPrivate::setBinding(d->revertList.at(ii).property, 0);
+ if (delBinding)
+ delBinding->destroy();
+
+ QDeclarativeAction a;
+ 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;
+ 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;
+ }
+ }
+ // All the local reverts now become part of the ongoing revertList
+ d->revertList << additionalReverts;
+
+ // Output for debugging
+ if (stateChangeDebug()) {
+ foreach(const QDeclarativeAction &action, applyList) {
+ if (action.event)
+ qWarning() << " QDeclarativeAction event:" << action.event->typeName();
+ else
+ qWarning() << " QDeclarativeAction:" << action.property.object()
+ << action.property.name() << "From:" << action.fromValue
+ << "To:" << action.toValue;
+ }
+ }
+
+ d->transitionManager.transition(applyList, trans);
+}
+
+QDeclarativeStateOperation::ActionList QDeclarativeStateOperation::actions()
+{
+ return ActionList();
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativestate_p.h b/src/declarative/util/qdeclarativestate_p.h
new file mode 100644
index 0000000000..0c6e7a3fdd
--- /dev/null
+++ b/src/declarative/util/qdeclarativestate_p.h
@@ -0,0 +1,183 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVESTATE_H
+#define QDECLARATIVESTATE_H
+
+#include <qdeclarative.h>
+#include <qdeclarativeproperty.h>
+#include <QtCore/qobject.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeActionEvent;
+class QDeclarativeAbstractBinding;
+class QDeclarativeBinding;
+class QDeclarativeExpression;
+class Q_DECLARATIVE_EXPORT QDeclarativeAction
+{
+public:
+ QDeclarativeAction();
+ QDeclarativeAction(QObject *, const QString &, const QVariant &);
+
+ bool restore:1;
+ bool actionDone:1;
+ bool reverseEvent:1;
+ bool deletableToBinding:1;
+
+ QDeclarativeProperty property;
+ QVariant fromValue;
+ QVariant toValue;
+
+ QDeclarativeAbstractBinding *fromBinding;
+ QDeclarativeAbstractBinding *toBinding;
+ QDeclarativeActionEvent *event;
+
+ //strictly for matching
+ QObject *specifiedObject;
+ QString specifiedProperty;
+
+ void deleteFromBinding();
+};
+
+class QDeclarativeActionEvent
+{
+public:
+ virtual ~QDeclarativeActionEvent();
+ virtual QString typeName() const;
+
+ virtual void execute();
+ virtual bool isReversable();
+ virtual void reverse();
+ virtual void saveOriginals() {}
+
+ virtual bool isRewindable() { return isReversable(); }
+ virtual void rewind() {}
+ virtual void saveCurrentValues() {}
+
+ //virtual bool hasExtraActions();
+ virtual QList<QDeclarativeAction> extraActions();
+
+ virtual bool changesBindings();
+ virtual void clearForwardBindings();
+ virtual void clearReverseBindings();
+ virtual bool override(QDeclarativeActionEvent*other);
+};
+
+//### rename to QDeclarativeStateChange?
+class QDeclarativeStateGroup;
+class Q_DECLARATIVE_EXPORT QDeclarativeStateOperation : public QObject
+{
+ Q_OBJECT
+public:
+ QDeclarativeStateOperation(QObject *parent = 0)
+ : QObject(parent) {}
+ typedef QList<QDeclarativeAction> ActionList;
+
+ virtual ActionList actions();
+
+protected:
+ QDeclarativeStateOperation(QObjectPrivate &dd, QObject *parent = 0);
+};
+
+typedef QDeclarativeStateOperation::ActionList QDeclarativeStateActions;
+
+class QDeclarativeTransition;
+class QDeclarativeStatePrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeState : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(QDeclarativeBinding *when READ when WRITE setWhen)
+ Q_PROPERTY(QString extend READ extends WRITE setExtends)
+ Q_PROPERTY(QDeclarativeListProperty<QDeclarativeStateOperation> changes READ changes)
+ Q_CLASSINFO("DefaultProperty", "changes")
+ Q_CLASSINFO("DeferredPropertyNames", "changes")
+
+public:
+ QDeclarativeState(QObject *parent=0);
+ virtual ~QDeclarativeState();
+
+ QString name() const;
+ void setName(const QString &);
+
+ /*'when' is a QDeclarativeBinding to limit state changes oscillation
+ due to the unpredictable order of evaluation of bound expressions*/
+ bool isWhenKnown() const;
+ QDeclarativeBinding *when() const;
+ void setWhen(QDeclarativeBinding *);
+
+ QString extends() const;
+ void setExtends(const QString &);
+
+ QDeclarativeListProperty<QDeclarativeStateOperation> changes();
+ int operationCount() const;
+ QDeclarativeStateOperation *operationAt(int) const;
+
+ QDeclarativeState &operator<<(QDeclarativeStateOperation *);
+
+ void apply(QDeclarativeStateGroup *, QDeclarativeTransition *, QDeclarativeState *revert);
+ void cancel();
+
+ QDeclarativeStateGroup *stateGroup() const;
+ void setStateGroup(QDeclarativeStateGroup *);
+
+Q_SIGNALS:
+ void completed();
+
+private:
+ Q_DECLARE_PRIVATE(QDeclarativeState)
+ Q_DISABLE_COPY(QDeclarativeState)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeStateOperation)
+QML_DECLARE_TYPE(QDeclarativeState)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVESTATE_H
diff --git a/src/declarative/util/qdeclarativestate_p_p.h b/src/declarative/util/qdeclarativestate_p_p.h
new file mode 100644
index 0000000000..6f52219757
--- /dev/null
+++ b/src/declarative/util/qdeclarativestate_p_p.h
@@ -0,0 +1,153 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVESTATE_P_H
+#define QDECLARATIVESTATE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativestate_p.h"
+
+#include "qdeclarativeanimation_p_p.h"
+#include "qdeclarativetransitionmanager_p_p.h"
+
+#include <qdeclarativeproperty_p.h>
+#include <qdeclarativeguard_p.h>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeSimpleAction
+{
+public:
+ enum State { StartState, EndState };
+ QDeclarativeSimpleAction(const QDeclarativeAction &a, State state = StartState)
+ {
+ property = a.property;
+ specifiedObject = a.specifiedObject;
+ specifiedProperty = a.specifiedProperty;
+ event = a.event;
+ if (state == StartState) {
+ value = a.fromValue;
+ binding = QDeclarativePropertyPrivate::binding(property);
+ reverseEvent = true;
+ } else {
+ value = a.toValue;
+ binding = a.toBinding;
+ reverseEvent = false;
+ }
+ }
+
+ QDeclarativeProperty property;
+ QVariant value;
+ QDeclarativeAbstractBinding *binding;
+ QObject *specifiedObject;
+ QString specifiedProperty;
+ QDeclarativeActionEvent *event;
+ bool reverseEvent;
+};
+
+class QDeclarativeStatePrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeState)
+
+public:
+ QDeclarativeStatePrivate()
+ : when(0), inState(false), group(0) {}
+
+ typedef QList<QDeclarativeSimpleAction> SimpleActionList;
+
+ QString name;
+ QDeclarativeBinding *when;
+
+ struct OperationGuard : public QDeclarativeGuard<QDeclarativeStateOperation>
+ {
+ OperationGuard(QObject *obj, QList<OperationGuard> *l) : list(l) { (QDeclarativeGuard<QObject>&)*this = obj; }
+ QList<OperationGuard> *list;
+ void objectDestroyed(QDeclarativeStateOperation *) {
+ // we assume priv will always be destroyed after objectDestroyed calls
+ list->removeOne(*this);
+ }
+ };
+ QList<OperationGuard> operations;
+
+ static void operations_append(QDeclarativeListProperty<QDeclarativeStateOperation> *prop, QDeclarativeStateOperation *op) {
+ QList<OperationGuard> *list = static_cast<QList<OperationGuard> *>(prop->data);
+ list->append(OperationGuard(op, list));
+ }
+ static void operations_clear(QDeclarativeListProperty<QDeclarativeStateOperation> *prop) {
+ QList<OperationGuard> *list = static_cast<QList<OperationGuard> *>(prop->data);
+ list->clear();
+ }
+ static int operations_count(QDeclarativeListProperty<QDeclarativeStateOperation> *prop) {
+ QList<OperationGuard> *list = static_cast<QList<OperationGuard> *>(prop->data);
+ return list->count();
+ }
+ static QDeclarativeStateOperation *operations_at(QDeclarativeListProperty<QDeclarativeStateOperation> *prop, int index) {
+ QList<OperationGuard> *list = static_cast<QList<OperationGuard> *>(prop->data);
+ return list->at(index);
+ }
+
+ QDeclarativeTransitionManager transitionManager;
+
+ SimpleActionList revertList;
+ QList<QDeclarativeProperty> reverting;
+ QString extends;
+ mutable bool inState;
+ QDeclarativeStateGroup *group;
+
+ QDeclarativeStateOperation::ActionList generateActionList(QDeclarativeStateGroup *) const;
+ void complete();
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVESTATE_P_H
diff --git a/src/declarative/util/qdeclarativestategroup.cpp b/src/declarative/util/qdeclarativestategroup.cpp
new file mode 100644
index 0000000000..083e87d724
--- /dev/null
+++ b/src/declarative/util/qdeclarativestategroup.cpp
@@ -0,0 +1,441 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativestategroup_p.h"
+
+#include "qdeclarativetransition_p.h"
+#include "qdeclarativestate_p_p.h"
+
+#include <qdeclarativebinding_p.h>
+#include <qdeclarativeglobal_p.h>
+
+#include <QtCore/qdebug.h>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+DEFINE_BOOL_CONFIG_OPTION(stateChangeDebug, STATECHANGE_DEBUG);
+
+class QDeclarativeStateGroupPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeStateGroup)
+public:
+ QDeclarativeStateGroupPrivate()
+ : nullState(0), componentComplete(true),
+ ignoreTrans(false), applyingState(false) {}
+
+ QString currentState;
+ QDeclarativeState *nullState;
+
+ static void append_state(QDeclarativeListProperty<QDeclarativeState> *list, QDeclarativeState *state);
+ static int count_state(QDeclarativeListProperty<QDeclarativeState> *list);
+ static QDeclarativeState *at_state(QDeclarativeListProperty<QDeclarativeState> *list, int index);
+
+ QList<QDeclarativeState *> states;
+ QList<QDeclarativeTransition *> transitions;
+
+ bool componentComplete;
+ bool ignoreTrans;
+ bool applyingState;
+
+ QDeclarativeTransition *findTransition(const QString &from, const QString &to);
+ void setCurrentStateInternal(const QString &state, bool = false);
+ bool updateAutoState();
+};
+
+/*!
+ \qmlclass StateGroup QDeclarativeStateGroup
+ \since 4.7
+ \brief The StateGroup element provides state support for non-Item elements.
+
+ Item (and all dervied elements) provides built in support for states and transitions
+ via its state, states and transitions properties. StateGroup provides an easy way to
+ use this support in other (non-Item-derived) elements.
+
+ \qml
+ MyCustomObject {
+ StateGroup {
+ id: myStateGroup
+ states: State {
+ name: "state1"
+ ...
+ }
+ transitions: Transition {
+ ...
+ }
+ }
+
+ onSomethingHappened: myStateGroup.state = "state1";
+ }
+ \endqml
+
+ \sa {qmlstate}{States} {state-transitions}{Transitions}
+*/
+
+QDeclarativeStateGroup::QDeclarativeStateGroup(QObject *parent)
+ : QObject(*(new QDeclarativeStateGroupPrivate), parent)
+{
+}
+
+QDeclarativeStateGroup::~QDeclarativeStateGroup()
+{
+ Q_D(const QDeclarativeStateGroup);
+ for (int i = 0; i < d->states.count(); ++i)
+ d->states.at(i)->setStateGroup(0);
+}
+
+QList<QDeclarativeState *> QDeclarativeStateGroup::states() const
+{
+ Q_D(const QDeclarativeStateGroup);
+ return d->states;
+}
+
+/*!
+ \qmlproperty list<State> StateGroup::states
+ This property holds a list of states defined by the state group.
+
+ \qml
+ StateGroup {
+ states: [
+ State { ... },
+ State { ... }
+ ...
+ ]
+ }
+ \endqml
+
+ \sa {qmlstate}{States}
+*/
+QDeclarativeListProperty<QDeclarativeState> QDeclarativeStateGroup::statesProperty()
+{
+ Q_D(QDeclarativeStateGroup);
+ return QDeclarativeListProperty<QDeclarativeState>(this, &d->states, &QDeclarativeStateGroupPrivate::append_state,
+ &QDeclarativeStateGroupPrivate::count_state,
+ &QDeclarativeStateGroupPrivate::at_state);
+}
+
+void QDeclarativeStateGroupPrivate::append_state(QDeclarativeListProperty<QDeclarativeState> *list, QDeclarativeState *state)
+{
+ QDeclarativeStateGroup *_this = static_cast<QDeclarativeStateGroup *>(list->object);
+ if (state) {
+ _this->d_func()->states.append(state);
+ state->setStateGroup(_this);
+ }
+
+}
+
+int QDeclarativeStateGroupPrivate::count_state(QDeclarativeListProperty<QDeclarativeState> *list)
+{
+ QDeclarativeStateGroup *_this = static_cast<QDeclarativeStateGroup *>(list->object);
+ return _this->d_func()->states.count();
+}
+
+QDeclarativeState *QDeclarativeStateGroupPrivate::at_state(QDeclarativeListProperty<QDeclarativeState> *list, int index)
+{
+ QDeclarativeStateGroup *_this = static_cast<QDeclarativeStateGroup *>(list->object);
+ return _this->d_func()->states.at(index);
+}
+
+/*!
+ \qmlproperty list<Transition> StateGroup::transitions
+ This property holds a list of transitions defined by the state group.
+
+ \qml
+ StateGroup {
+ transitions: [
+ Transition { ... },
+ Transition { ... }
+ ...
+ ]
+ }
+ \endqml
+
+ \sa {state-transitions}{Transitions}
+*/
+QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeStateGroup::transitionsProperty()
+{
+ Q_D(QDeclarativeStateGroup);
+ return QDeclarativeListProperty<QDeclarativeTransition>(this, d->transitions);
+}
+
+/*!
+ \qmlproperty string StateGroup::state
+
+ This property holds the name of the current state of the state group.
+
+ This property is often used in scripts to change between states. For
+ example:
+
+ \qml
+ Script {
+ function toggle() {
+ if (button.state == 'On')
+ button.state = 'Off';
+ else
+ button.state = 'On';
+ }
+ }
+ \endqml
+
+ If the state group is in its base state (i.e. no explicit state has been
+ set), \c state will be a blank string. Likewise, you can return a
+ state group to its base state by setting its current state to \c ''.
+
+ \sa {qmlstates}{States}
+*/
+QString QDeclarativeStateGroup::state() const
+{
+ Q_D(const QDeclarativeStateGroup);
+ return d->currentState;
+}
+
+void QDeclarativeStateGroup::setState(const QString &state)
+{
+ Q_D(QDeclarativeStateGroup);
+ if (d->currentState == state)
+ return;
+
+ d->setCurrentStateInternal(state);
+}
+
+void QDeclarativeStateGroup::classBegin()
+{
+ Q_D(QDeclarativeStateGroup);
+ d->componentComplete = false;
+}
+
+void QDeclarativeStateGroup::componentComplete()
+{
+ Q_D(QDeclarativeStateGroup);
+ d->componentComplete = true;
+
+ if (d->updateAutoState()) {
+ return;
+ } else if (!d->currentState.isEmpty()) {
+ QString cs = d->currentState;
+ d->currentState = QString();
+ d->setCurrentStateInternal(cs, true);
+ }
+}
+
+/*!
+ Returns true if the state was changed, otherwise false.
+*/
+bool QDeclarativeStateGroup::updateAutoState()
+{
+ Q_D(QDeclarativeStateGroup);
+ return d->updateAutoState();
+}
+
+bool QDeclarativeStateGroupPrivate::updateAutoState()
+{
+ Q_Q(QDeclarativeStateGroup);
+ if (!componentComplete)
+ return false;
+
+ bool revert = false;
+ for (int ii = 0; ii < states.count(); ++ii) {
+ QDeclarativeState *state = states.at(ii);
+ if (state->isWhenKnown()) {
+ if (!state->name().isEmpty()) {
+ if (state->when() && state->when()->value().toBool()) {
+ if (stateChangeDebug())
+ qWarning() << "Setting auto state due to:"
+ << state->when()->expression();
+ if (currentState != state->name()) {
+ q->setState(state->name());
+ return true;
+ } else {
+ return false;
+ }
+ } else if (state->name() == currentState) {
+ revert = true;
+ }
+ }
+ }
+ }
+ if (revert) {
+ bool rv = currentState != QString();
+ q->setState(QString());
+ return rv;
+ } else {
+ return false;
+ }
+}
+
+QDeclarativeTransition *QDeclarativeStateGroupPrivate::findTransition(const QString &from, const QString &to)
+{
+ QDeclarativeTransition *highest = 0;
+ int score = 0;
+ bool reversed = false;
+ bool done = false;
+
+ for (int ii = 0; !done && ii < transitions.count(); ++ii) {
+ QDeclarativeTransition *t = transitions.at(ii);
+ for (int ii = 0; ii < 2; ++ii)
+ {
+ if (ii && (!t->reversible() ||
+ (t->fromState() == QLatin1String("*") &&
+ t->toState() == QLatin1String("*"))))
+ break;
+ QStringList fromState;
+ QStringList toState;
+
+ fromState = t->fromState().split(QLatin1Char(','));
+ toState = t->toState().split(QLatin1Char(','));
+ if (ii == 1)
+ qSwap(fromState, toState);
+ int tScore = 0;
+ if (fromState.contains(from))
+ tScore += 2;
+ else if (fromState.contains(QLatin1String("*")))
+ tScore += 1;
+ else
+ continue;
+
+ if (toState.contains(to))
+ tScore += 2;
+ else if (toState.contains(QLatin1String("*")))
+ tScore += 1;
+ else
+ continue;
+
+ if (ii == 1)
+ reversed = true;
+ else
+ reversed = false;
+
+ if (tScore == 4) {
+ highest = t;
+ done = true;
+ break;
+ } else if (tScore > score) {
+ score = tScore;
+ highest = t;
+ }
+ }
+ }
+
+ if (highest)
+ highest->setReversed(reversed);
+
+ return highest;
+}
+
+void QDeclarativeStateGroupPrivate::setCurrentStateInternal(const QString &state,
+ bool ignoreTrans)
+{
+ Q_Q(QDeclarativeStateGroup);
+ if (!componentComplete) {
+ currentState = state;
+ return;
+ }
+
+ if (applyingState) {
+ qWarning() << "Can't apply a state change as part of a state definition.";
+ return;
+ }
+
+ applyingState = true;
+
+ QDeclarativeTransition *transition = (ignoreTrans || ignoreTrans) ? 0 : findTransition(currentState, state);
+ if (stateChangeDebug()) {
+ qWarning() << this << "Changing state. From" << currentState << ". To" << state;
+ if (transition)
+ qWarning() << " using transition" << transition->fromState()
+ << transition->toState();
+ }
+
+ QDeclarativeState *oldState = 0;
+ if (!currentState.isEmpty()) {
+ for (int ii = 0; ii < states.count(); ++ii) {
+ if (states.at(ii)->name() == currentState) {
+ oldState = states.at(ii);
+ break;
+ }
+ }
+ }
+
+ currentState = state;
+ emit q->stateChanged(currentState);
+
+ QDeclarativeState *newState = 0;
+ for (int ii = 0; ii < states.count(); ++ii) {
+ if (states.at(ii)->name() == currentState) {
+ newState = states.at(ii);
+ break;
+ }
+ }
+
+ if (oldState == 0 || newState == 0) {
+ if (!nullState) { nullState = new QDeclarativeState; QDeclarative_setParent_noEvent(nullState, q); }
+ if (!oldState) oldState = nullState;
+ if (!newState) newState = nullState;
+ }
+
+ newState->apply(q, transition, oldState);
+ applyingState = false;
+ if (!transition)
+ static_cast<QDeclarativeStatePrivate*>(QObjectPrivate::get(newState))->complete();
+}
+
+QDeclarativeState *QDeclarativeStateGroup::findState(const QString &name) const
+{
+ Q_D(const QDeclarativeStateGroup);
+ for (int i = 0; i < d->states.count(); ++i) {
+ QDeclarativeState *state = d->states.at(i);
+ if (state->name() == name)
+ return state;
+ }
+
+ return 0;
+}
+
+void QDeclarativeStateGroup::removeState(QDeclarativeState *state)
+{
+ Q_D(QDeclarativeStateGroup);
+ d->states.removeOne(state);
+}
+
+QT_END_NAMESPACE
+
+
diff --git a/src/declarative/util/qdeclarativestategroup_p.h b/src/declarative/util/qdeclarativestategroup_p.h
new file mode 100644
index 0000000000..9650199f8c
--- /dev/null
+++ b/src/declarative/util/qdeclarativestategroup_p.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVESTATEGROUP_H
+#define QDECLARATIVESTATEGROUP_H
+
+#include "qdeclarativestate_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeStateGroupPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeStateGroup : public QObject, public QDeclarativeParserStatus
+{
+ Q_OBJECT
+ Q_INTERFACES(QDeclarativeParserStatus)
+ Q_DECLARE_PRIVATE(QDeclarativeStateGroup)
+
+ Q_PROPERTY(QString state READ state WRITE setState NOTIFY stateChanged)
+ Q_PROPERTY(QDeclarativeListProperty<QDeclarativeState> states READ statesProperty DESIGNABLE false)
+ Q_PROPERTY(QDeclarativeListProperty<QDeclarativeTransition> transitions READ transitionsProperty DESIGNABLE false)
+
+public:
+ QDeclarativeStateGroup(QObject * = 0);
+ virtual ~QDeclarativeStateGroup();
+
+ QString state() const;
+ void setState(const QString &);
+
+ QDeclarativeListProperty<QDeclarativeState> statesProperty();
+ QList<QDeclarativeState *> states() const;
+
+ QDeclarativeListProperty<QDeclarativeTransition> transitionsProperty();
+
+ QDeclarativeState *findState(const QString &name) const;
+
+ virtual void classBegin();
+ virtual void componentComplete();
+Q_SIGNALS:
+ void stateChanged(const QString &);
+
+private:
+ friend class QDeclarativeState;
+ bool updateAutoState();
+ void removeState(QDeclarativeState *state);
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeStateGroup)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVESTATEGROUP_H
diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp
new file mode 100644
index 0000000000..766d1bc15c
--- /dev/null
+++ b/src/declarative/util/qdeclarativestateoperations.cpp
@@ -0,0 +1,996 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativestateoperations_p.h"
+
+#include <qdeclarative.h>
+#include <qdeclarativecontext.h>
+#include <qdeclarativeexpression.h>
+#include <qdeclarativeinfo.h>
+#include <qdeclarativeanchors_p_p.h>
+#include <qdeclarativeitem_p.h>
+#include <qdeclarativeguard_p.h>
+#include <qdeclarativenullablevalue_p_p.h>
+
+#include <QtCore/qdebug.h>
+#include <QtGui/qgraphicsitem.h>
+#include <QtCore/qmath.h>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeParentChangePrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeParentChange)
+public:
+ QDeclarativeParentChangePrivate() : target(0), parent(0), origParent(0), origStackBefore(0),
+ rewindParent(0), rewindStackBefore(0) {}
+
+ QDeclarativeItem *target;
+ QDeclarativeItem *parent;
+ QDeclarativeGuard<QDeclarativeItem> origParent;
+ QDeclarativeGuard<QDeclarativeItem> origStackBefore;
+ QDeclarativeItem *rewindParent;
+ QDeclarativeItem *rewindStackBefore;
+
+ QDeclarativeNullableValue<qreal> x;
+ QDeclarativeNullableValue<qreal> y;
+ QDeclarativeNullableValue<qreal> width;
+ QDeclarativeNullableValue<qreal> height;
+ QDeclarativeNullableValue<qreal> scale;
+ QDeclarativeNullableValue<qreal> rotation;
+
+ void doChange(QDeclarativeItem *targetParent, QDeclarativeItem *stackBefore = 0);
+};
+
+void QDeclarativeParentChangePrivate::doChange(QDeclarativeItem *targetParent, QDeclarativeItem *stackBefore)
+{
+ if (targetParent && target && target->parentItem()) {
+ //### for backwards direction, can we just restore original x, y, scale, rotation
+ Q_Q(QDeclarativeParentChange);
+ bool ok;
+ const QTransform &transform = target->parentItem()->itemTransform(targetParent, &ok);
+ if (transform.type() >= QTransform::TxShear || !ok) {
+ qmlInfo(q) << QDeclarativeParentChange::tr("Unable to preserve appearance under complex transform");
+ ok = false;
+ }
+
+ qreal scale = 1;
+ qreal rotation = 0;
+ if (ok && transform.type() != QTransform::TxRotate) {
+ if (transform.m11() == transform.m22())
+ scale = transform.m11();
+ else {
+ qmlInfo(q) << QDeclarativeParentChange::tr("Unable to preserve appearance under non-uniform scale");
+ ok = false;
+ }
+ } else if (ok && transform.type() == QTransform::TxRotate) {
+ if (transform.m11() == transform.m22())
+ scale = qSqrt(transform.m11()*transform.m11() + transform.m12()*transform.m12());
+ else {
+ qmlInfo(q) << QDeclarativeParentChange::tr("Unable to preserve appearance under non-uniform scale");
+ ok = false;
+ }
+
+ if (scale != 0)
+ rotation = atan2(transform.m12()/scale, transform.m11()/scale) * 180/M_PI;
+ else {
+ qmlInfo(q) << QDeclarativeParentChange::tr("Unable to preserve appearance under scale of 0");
+ ok = false;
+ }
+ }
+
+ const QPointF &point = transform.map(QPointF(target->x(),target->y()));
+ qreal x = point.x();
+ qreal y = point.y();
+ if (ok && target->transformOrigin() != QDeclarativeItem::TopLeft) {
+ qreal tempxt = target->transformOriginPoint().x();
+ qreal tempyt = target->transformOriginPoint().y();
+ QTransform t;
+ t.translate(-tempxt, -tempyt);
+ t.rotate(rotation);
+ t.scale(scale, scale);
+ t.translate(tempxt, tempyt);
+ const QPointF &offset = t.map(QPointF(0,0));
+ x += offset.x();
+ y += offset.y();
+ }
+
+ target->setParentItem(targetParent);
+ if (ok) {
+ //qDebug() << x << y << rotation << scale;
+ target->setX(x);
+ target->setY(y);
+ target->setRotation(target->rotation() + rotation);
+ target->setScale(target->scale() * scale);
+ }
+ } else if (target) {
+ target->setParentItem(targetParent);
+ }
+
+ //restore the original stack position.
+ //### if stackBefore has also been reparented this won't work
+ if (stackBefore)
+ target->stackBefore(stackBefore);
+}
+
+/*!
+ \preliminary
+ \qmlclass ParentChange QDeclarativeParentChange
+ \brief The ParentChange element allows you to reparent an Item in a state change.
+
+ ParentChange reparents an item while preserving its visual appearance (position, size,
+ rotation, and scale) on screen. You can then specify a transition to move/resize/rotate/scale
+ the item to its final intended appearance.
+
+ ParentChange can only preserve visual appearance if no complex transforms are involved.
+ More specifically, it will not work if the transform property has been set for any
+ items involved in the reparenting (i.e. items in the common ancestor tree
+ for the original and new parent).
+
+ You can specify at which point in a transition you want a ParentChange to occur by
+ using a ParentAnimation or ParentAction.
+*/
+
+
+QDeclarativeParentChange::QDeclarativeParentChange(QObject *parent)
+ : QDeclarativeStateOperation(*(new QDeclarativeParentChangePrivate), parent)
+{
+}
+
+QDeclarativeParentChange::~QDeclarativeParentChange()
+{
+}
+
+/*!
+ \qmlproperty real ParentChange::x
+ \qmlproperty real ParentChange::y
+ \qmlproperty real ParentChange::width
+ \qmlproperty real ParentChange::height
+ \qmlproperty real ParentChange::scale
+ \qmlproperty real ParentChange::rotation
+ These properties hold the new position, size, scale, and rotation
+ for the item in this state.
+*/
+qreal QDeclarativeParentChange::x() const
+{
+ Q_D(const QDeclarativeParentChange);
+ return d->x.isNull ? qreal(0.) : d->x.value;
+}
+
+void QDeclarativeParentChange::setX(qreal x)
+{
+ Q_D(QDeclarativeParentChange);
+ d->x = x;
+}
+
+bool QDeclarativeParentChange::xIsSet() const
+{
+ Q_D(const QDeclarativeParentChange);
+ return d->x.isValid();
+}
+
+qreal QDeclarativeParentChange::y() const
+{
+ Q_D(const QDeclarativeParentChange);
+ return d->y.isNull ? qreal(0.) : d->y.value;
+}
+
+void QDeclarativeParentChange::setY(qreal y)
+{
+ Q_D(QDeclarativeParentChange);
+ d->y = y;
+}
+
+bool QDeclarativeParentChange::yIsSet() const
+{
+ Q_D(const QDeclarativeParentChange);
+ return d->y.isValid();
+}
+
+qreal QDeclarativeParentChange::width() const
+{
+ Q_D(const QDeclarativeParentChange);
+ return d->width.isNull ? qreal(0.) : d->width.value;
+}
+
+void QDeclarativeParentChange::setWidth(qreal width)
+{
+ Q_D(QDeclarativeParentChange);
+ d->width = width;
+}
+
+bool QDeclarativeParentChange::widthIsSet() const
+{
+ Q_D(const QDeclarativeParentChange);
+ return d->width.isValid();
+}
+
+qreal QDeclarativeParentChange::height() const
+{
+ Q_D(const QDeclarativeParentChange);
+ return d->height.isNull ? qreal(0.) : d->height.value;
+}
+
+void QDeclarativeParentChange::setHeight(qreal height)
+{
+ Q_D(QDeclarativeParentChange);
+ d->height = height;
+}
+
+bool QDeclarativeParentChange::heightIsSet() const
+{
+ Q_D(const QDeclarativeParentChange);
+ return d->height.isValid();
+}
+
+qreal QDeclarativeParentChange::scale() const
+{
+ Q_D(const QDeclarativeParentChange);
+ return d->scale.isNull ? qreal(1.) : d->scale.value;
+}
+
+void QDeclarativeParentChange::setScale(qreal scale)
+{
+ Q_D(QDeclarativeParentChange);
+ d->scale = scale;
+}
+
+bool QDeclarativeParentChange::scaleIsSet() const
+{
+ Q_D(const QDeclarativeParentChange);
+ return d->scale.isValid();
+}
+
+qreal QDeclarativeParentChange::rotation() const
+{
+ Q_D(const QDeclarativeParentChange);
+ return d->rotation.isNull ? qreal(0.) : d->rotation.value;
+}
+
+void QDeclarativeParentChange::setRotation(qreal rotation)
+{
+ Q_D(QDeclarativeParentChange);
+ d->rotation = rotation;
+}
+
+bool QDeclarativeParentChange::rotationIsSet() const
+{
+ Q_D(const QDeclarativeParentChange);
+ return d->rotation.isValid();
+}
+
+QDeclarativeItem *QDeclarativeParentChange::originalParent() const
+{
+ Q_D(const QDeclarativeParentChange);
+ return d->origParent;
+}
+
+/*!
+ \qmlproperty Item ParentChange::target
+ This property holds the item to be reparented
+*/
+
+QDeclarativeItem *QDeclarativeParentChange::object() const
+{
+ Q_D(const QDeclarativeParentChange);
+ return d->target;
+}
+
+void QDeclarativeParentChange::setObject(QDeclarativeItem *target)
+{
+ Q_D(QDeclarativeParentChange);
+ d->target = target;
+}
+
+/*!
+ \qmlproperty Item ParentChange::parent
+ This property holds the new parent for the item in this state.
+*/
+
+QDeclarativeItem *QDeclarativeParentChange::parent() const
+{
+ Q_D(const QDeclarativeParentChange);
+ return d->parent;
+}
+
+void QDeclarativeParentChange::setParent(QDeclarativeItem *parent)
+{
+ Q_D(QDeclarativeParentChange);
+ d->parent = parent;
+}
+
+QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions()
+{
+ Q_D(QDeclarativeParentChange);
+ if (!d->target || !d->parent)
+ return ActionList();
+
+ ActionList actions;
+
+ QDeclarativeAction a;
+ a.event = this;
+ actions << a;
+
+ if (d->x.isValid()) {
+ QDeclarativeAction xa(d->target, QLatin1String("x"), x());
+ actions << xa;
+ }
+
+ if (d->y.isValid()) {
+ QDeclarativeAction ya(d->target, QLatin1String("y"), y());
+ actions << ya;
+ }
+
+ if (d->scale.isValid()) {
+ QDeclarativeAction sa(d->target, QLatin1String("scale"), scale());
+ actions << sa;
+ }
+
+ if (d->rotation.isValid()) {
+ QDeclarativeAction ra(d->target, QLatin1String("rotation"), rotation());
+ actions << ra;
+ }
+
+ if (d->width.isValid()) {
+ QDeclarativeAction wa(d->target, QLatin1String("width"), width());
+ actions << wa;
+ }
+
+ if (d->height.isValid()) {
+ QDeclarativeAction ha(d->target, QLatin1String("height"), height());
+ actions << ha;
+ }
+
+ return actions;
+}
+
+class AccessibleFxItem : public QDeclarativeItem
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeItem)
+public:
+ int siblingIndex() {
+ Q_D(QDeclarativeItem);
+ return d->siblingIndex;
+ }
+};
+
+void QDeclarativeParentChange::saveOriginals()
+{
+ Q_D(QDeclarativeParentChange);
+ saveCurrentValues();
+ d->origParent = d->rewindParent;
+ d->origStackBefore = d->rewindStackBefore;
+}
+
+void QDeclarativeParentChange::execute()
+{
+ Q_D(QDeclarativeParentChange);
+ d->doChange(d->parent);
+}
+
+bool QDeclarativeParentChange::isReversable()
+{
+ return true;
+}
+
+void QDeclarativeParentChange::reverse()
+{
+ Q_D(QDeclarativeParentChange);
+ d->doChange(d->origParent, d->origStackBefore);
+}
+
+QString QDeclarativeParentChange::typeName() const
+{
+ return QLatin1String("ParentChange");
+}
+
+bool QDeclarativeParentChange::override(QDeclarativeActionEvent*other)
+{
+ Q_D(QDeclarativeParentChange);
+ if (other->typeName() != QLatin1String("ParentChange"))
+ return false;
+ if (QDeclarativeParentChange *otherPC = static_cast<QDeclarativeParentChange*>(other))
+ return (d->target == otherPC->object());
+ return false;
+}
+
+void QDeclarativeParentChange::saveCurrentValues()
+{
+ Q_D(QDeclarativeParentChange);
+ if (!d->target) {
+ d->rewindParent = 0;
+ d->rewindStackBefore = 0;
+ return;
+ }
+
+ d->rewindParent = d->target->parentItem();
+
+ if (!d->rewindParent) {
+ d->rewindStackBefore = 0;
+ return;
+ }
+
+ //try to determine the item's original stack position so we can restore it
+ int siblingIndex = ((AccessibleFxItem*)d->target)->siblingIndex() + 1;
+ QList<QGraphicsItem*> children = d->rewindParent->childItems();
+ for (int i = 0; i < children.count(); ++i) {
+ QDeclarativeItem *child = qobject_cast<QDeclarativeItem*>(children.at(i));
+ if (!child)
+ continue;
+ if (((AccessibleFxItem*)child)->siblingIndex() == siblingIndex) {
+ d->rewindStackBefore = child;
+ break;
+ }
+ }
+}
+
+void QDeclarativeParentChange::rewind()
+{
+ Q_D(QDeclarativeParentChange);
+ d->doChange(d->rewindParent, d->rewindStackBefore);
+}
+
+class QDeclarativeStateChangeScriptPrivate : public QObjectPrivate
+{
+public:
+ QDeclarativeStateChangeScriptPrivate() {}
+
+ QDeclarativeScriptString script;
+ QString name;
+};
+
+/*!
+ \qmlclass StateChangeScript QDeclarativeStateChangeScript
+ \brief The StateChangeScript element allows you to run a script in a state.
+
+ The script specified will be run immediately when the state is made current.
+ Alternatively you can use a ScriptAction to specify at which point in the transition
+ you want the StateChangeScript to be run.
+*/
+
+QDeclarativeStateChangeScript::QDeclarativeStateChangeScript(QObject *parent)
+: QDeclarativeStateOperation(*(new QDeclarativeStateChangeScriptPrivate), parent)
+{
+}
+
+QDeclarativeStateChangeScript::~QDeclarativeStateChangeScript()
+{
+}
+
+/*!
+ \qmlproperty script StateChangeScript::script
+ This property holds the script to run when the state is current.
+*/
+QDeclarativeScriptString QDeclarativeStateChangeScript::script() const
+{
+ Q_D(const QDeclarativeStateChangeScript);
+ return d->script;
+}
+
+void QDeclarativeStateChangeScript::setScript(const QDeclarativeScriptString &s)
+{
+ Q_D(QDeclarativeStateChangeScript);
+ d->script = s;
+}
+
+/*!
+ \qmlproperty script StateChangeScript::script
+ This property holds the name of the script. This name can be used by a
+ ScriptAction to target a specific script.
+
+ \sa ScriptAction::stateChangeScriptName
+*/
+QString QDeclarativeStateChangeScript::name() const
+{
+ Q_D(const QDeclarativeStateChangeScript);
+ return d->name;
+}
+
+void QDeclarativeStateChangeScript::setName(const QString &n)
+{
+ Q_D(QDeclarativeStateChangeScript);
+ d->name = n;
+}
+
+void QDeclarativeStateChangeScript::execute()
+{
+ Q_D(QDeclarativeStateChangeScript);
+ const QString &script = d->script.script();
+ if (!script.isEmpty()) {
+ QDeclarativeExpression expr(d->script.context(), script, d->script.scopeObject());
+ expr.value();
+ }
+}
+
+QDeclarativeStateChangeScript::ActionList QDeclarativeStateChangeScript::actions()
+{
+ ActionList rv;
+ QDeclarativeAction a;
+ a.event = this;
+ rv << a;
+ return rv;
+}
+
+QString QDeclarativeStateChangeScript::typeName() const
+{
+ return QLatin1String("StateChangeScript");
+}
+
+/*!
+ \qmlclass AnchorChanges QDeclarativeAnchorChanges
+ \brief The AnchorChanges element allows you to change the anchors of an item in a state.
+
+ AnchorChanges will 'inject' \c x, \c y, \c width, and \c height changes into the transition,
+ so you can animate them as you would normally changes to these properties:
+ \qml
+ //animate our anchor changes
+ NumberAnimation { targets: content; properties: "x,y,width,height" }
+ \endqml
+
+ For more information on anchors see \l {anchor-layout}{Anchor Layouts}.
+*/
+
+
+
+class QDeclarativeAnchorChangesPrivate : public QObjectPrivate
+{
+public:
+ QDeclarativeAnchorChangesPrivate() : target(0) {}
+
+ QString name;
+ QDeclarativeItem *target;
+ QString resetString;
+ QStringList resetList;
+ QDeclarativeAnchorLine left;
+ QDeclarativeAnchorLine right;
+ QDeclarativeAnchorLine horizontalCenter;
+ QDeclarativeAnchorLine top;
+ QDeclarativeAnchorLine bottom;
+ QDeclarativeAnchorLine verticalCenter;
+ QDeclarativeAnchorLine baseline;
+
+ QDeclarativeAnchorLine origLeft;
+ QDeclarativeAnchorLine origRight;
+ QDeclarativeAnchorLine origHCenter;
+ QDeclarativeAnchorLine origTop;
+ QDeclarativeAnchorLine origBottom;
+ QDeclarativeAnchorLine origVCenter;
+ QDeclarativeAnchorLine origBaseline;
+
+ QDeclarativeAnchorLine rewindLeft;
+ QDeclarativeAnchorLine rewindRight;
+ QDeclarativeAnchorLine rewindHCenter;
+ QDeclarativeAnchorLine rewindTop;
+ QDeclarativeAnchorLine rewindBottom;
+ QDeclarativeAnchorLine rewindVCenter;
+ QDeclarativeAnchorLine rewindBaseline;
+
+ qreal fromX;
+ qreal fromY;
+ qreal fromWidth;
+ qreal fromHeight;
+};
+
+/*!
+ \qmlproperty Item AnchorChanges::target
+ This property holds the Item whose anchors will change
+*/
+
+QDeclarativeAnchorChanges::QDeclarativeAnchorChanges(QObject *parent)
+ : QDeclarativeStateOperation(*(new QDeclarativeAnchorChangesPrivate), parent)
+{
+}
+
+QDeclarativeAnchorChanges::~QDeclarativeAnchorChanges()
+{
+}
+
+QDeclarativeAnchorChanges::ActionList QDeclarativeAnchorChanges::actions()
+{
+ QDeclarativeAction a;
+ a.event = this;
+ return ActionList() << a;
+}
+
+QDeclarativeItem *QDeclarativeAnchorChanges::object() const
+{
+ Q_D(const QDeclarativeAnchorChanges);
+ return d->target;
+}
+
+void QDeclarativeAnchorChanges::setObject(QDeclarativeItem *target)
+{
+ Q_D(QDeclarativeAnchorChanges);
+ d->target = target;
+}
+
+QString QDeclarativeAnchorChanges::reset() const
+{
+ Q_D(const QDeclarativeAnchorChanges);
+ return d->resetString;
+}
+
+void QDeclarativeAnchorChanges::setReset(const QString &reset)
+{
+ Q_D(QDeclarativeAnchorChanges);
+ d->resetString = reset;
+ d->resetList = d->resetString.split(QLatin1Char(','));
+ for (int i = 0; i < d->resetList.count(); ++i)
+ d->resetList[i] = d->resetList.at(i).trimmed();
+}
+
+/*!
+ \qmlproperty AnchorLine AnchorChanges::left
+ \qmlproperty AnchorLine AnchorChanges::right
+ \qmlproperty AnchorLine AnchorChanges::horizontalCenter
+ \qmlproperty AnchorLine AnchorChanges::top
+ \qmlproperty AnchorLine AnchorChanges::bottom
+ \qmlproperty AnchorLine AnchorChanges::verticalCenter
+ \qmlproperty AnchorLine AnchorChanges::baseline
+
+ These properties change the respective anchors of the item.
+*/
+
+QDeclarativeAnchorLine QDeclarativeAnchorChanges::left() const
+{
+ Q_D(const QDeclarativeAnchorChanges);
+ return d->left;
+}
+
+void QDeclarativeAnchorChanges::setLeft(const QDeclarativeAnchorLine &edge)
+{
+ Q_D(QDeclarativeAnchorChanges);
+ d->left = edge;
+}
+
+QDeclarativeAnchorLine QDeclarativeAnchorChanges::right() const
+{
+ Q_D(const QDeclarativeAnchorChanges);
+ return d->right;
+}
+
+void QDeclarativeAnchorChanges::setRight(const QDeclarativeAnchorLine &edge)
+{
+ Q_D(QDeclarativeAnchorChanges);
+ d->right = edge;
+}
+
+QDeclarativeAnchorLine QDeclarativeAnchorChanges::horizontalCenter() const
+{
+ Q_D(const QDeclarativeAnchorChanges);
+ return d->horizontalCenter;
+}
+
+void QDeclarativeAnchorChanges::setHorizontalCenter(const QDeclarativeAnchorLine &edge)
+{
+ Q_D(QDeclarativeAnchorChanges);
+ d->horizontalCenter = edge;
+}
+
+QDeclarativeAnchorLine QDeclarativeAnchorChanges::top() const
+{
+ Q_D(const QDeclarativeAnchorChanges);
+ return d->top;
+}
+
+void QDeclarativeAnchorChanges::setTop(const QDeclarativeAnchorLine &edge)
+{
+ Q_D(QDeclarativeAnchorChanges);
+ d->top = edge;
+}
+
+QDeclarativeAnchorLine QDeclarativeAnchorChanges::bottom() const
+{
+ Q_D(const QDeclarativeAnchorChanges);
+ return d->bottom;
+}
+
+void QDeclarativeAnchorChanges::setBottom(const QDeclarativeAnchorLine &edge)
+{
+ Q_D(QDeclarativeAnchorChanges);
+ d->bottom = edge;
+}
+
+QDeclarativeAnchorLine QDeclarativeAnchorChanges::verticalCenter() const
+{
+ Q_D(const QDeclarativeAnchorChanges);
+ return d->verticalCenter;
+}
+
+void QDeclarativeAnchorChanges::setVerticalCenter(const QDeclarativeAnchorLine &edge)
+{
+ Q_D(QDeclarativeAnchorChanges);
+ d->verticalCenter = edge;
+}
+
+QDeclarativeAnchorLine QDeclarativeAnchorChanges::baseline() const
+{
+ Q_D(const QDeclarativeAnchorChanges);
+ return d->baseline;
+}
+
+void QDeclarativeAnchorChanges::setBaseline(const QDeclarativeAnchorLine &edge)
+{
+ Q_D(QDeclarativeAnchorChanges);
+ d->baseline = edge;
+}
+
+void QDeclarativeAnchorChanges::execute()
+{
+ Q_D(QDeclarativeAnchorChanges);
+ if (!d->target)
+ return;
+
+ //set any anchors that have been specified
+ if (d->left.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setLeft(d->left);
+ if (d->right.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setRight(d->right);
+ if (d->horizontalCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setHorizontalCenter(d->horizontalCenter);
+ if (d->top.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setTop(d->top);
+ if (d->bottom.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setBottom(d->bottom);
+ if (d->verticalCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setVerticalCenter(d->verticalCenter);
+ if (d->baseline.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setBaseline(d->baseline);
+}
+
+bool QDeclarativeAnchorChanges::isReversable()
+{
+ return true;
+}
+
+void QDeclarativeAnchorChanges::reverse()
+{
+ Q_D(QDeclarativeAnchorChanges);
+ if (!d->target)
+ return;
+
+ //restore previous anchors
+ if (d->origLeft.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setLeft(d->origLeft);
+ if (d->origRight.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setRight(d->origRight);
+ if (d->origHCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setHorizontalCenter(d->origHCenter);
+ if (d->origTop.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setTop(d->origTop);
+ if (d->origBottom.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setBottom(d->origBottom);
+ if (d->origVCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setVerticalCenter(d->origVCenter);
+ if (d->origBaseline.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setBaseline(d->origBaseline);
+}
+
+QString QDeclarativeAnchorChanges::typeName() const
+{
+ return QLatin1String("AnchorChanges");
+}
+
+QList<QDeclarativeAction> QDeclarativeAnchorChanges::extraActions()
+{
+ Q_D(QDeclarativeAnchorChanges);
+ QList<QDeclarativeAction> extra;
+
+ //### try to be smarter about which ones we add.
+ // or short-circuit later on if they haven't actually changed.
+ // we shouldn't set explicit width if there wasn't one before.
+ if (d->target) {
+ QDeclarativeAction a;
+ a.fromValue = d->fromX;
+ a.property = QDeclarativeProperty(d->target, QLatin1String("x"));
+ extra << a;
+
+ a.fromValue = d->fromY;
+ a.property = QDeclarativeProperty(d->target, QLatin1String("y"));
+ extra << a;
+
+ a.fromValue = d->fromWidth;
+ a.property = QDeclarativeProperty(d->target, QLatin1String("width"));
+ extra << a;
+
+ a.fromValue = d->fromHeight;
+ a.property = QDeclarativeProperty(d->target, QLatin1String("height"));
+ extra << a;
+ }
+
+ return extra;
+}
+
+bool QDeclarativeAnchorChanges::changesBindings()
+{
+ return true;
+}
+
+void QDeclarativeAnchorChanges::saveOriginals()
+{
+ Q_D(QDeclarativeAnchorChanges);
+ d->origLeft = d->target->anchors()->left();
+ d->origRight = d->target->anchors()->right();
+ d->origHCenter = d->target->anchors()->horizontalCenter();
+ d->origTop = d->target->anchors()->top();
+ d->origBottom = d->target->anchors()->bottom();
+ d->origVCenter = d->target->anchors()->verticalCenter();
+ d->origBaseline = d->target->anchors()->baseline();
+
+ saveCurrentValues();
+}
+
+void QDeclarativeAnchorChanges::clearForwardBindings()
+{
+ Q_D(QDeclarativeAnchorChanges);
+ d->fromX = d->target->x();
+ d->fromY = d->target->y();
+ d->fromWidth = d->target->width();
+ d->fromHeight = d->target->height();
+
+ //reset any anchors that have been specified
+ if (d->resetList.contains(QLatin1String("left")))
+ d->target->anchors()->resetLeft();
+ if (d->resetList.contains(QLatin1String("right")))
+ d->target->anchors()->resetRight();
+ if (d->resetList.contains(QLatin1String("horizontalCenter")))
+ d->target->anchors()->resetHorizontalCenter();
+ if (d->resetList.contains(QLatin1String("top")))
+ d->target->anchors()->resetTop();
+ if (d->resetList.contains(QLatin1String("bottom")))
+ d->target->anchors()->resetBottom();
+ if (d->resetList.contains(QLatin1String("verticalCenter")))
+ d->target->anchors()->resetVerticalCenter();
+ if (d->resetList.contains(QLatin1String("baseline")))
+ d->target->anchors()->resetBaseline();
+
+ //reset any anchors that we'll be setting in the state
+ if (d->left.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetLeft();
+ if (d->right.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetRight();
+ if (d->horizontalCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetHorizontalCenter();
+ if (d->top.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetTop();
+ if (d->bottom.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetBottom();
+ if (d->verticalCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetVerticalCenter();
+ if (d->baseline.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetBaseline();
+}
+
+void QDeclarativeAnchorChanges::clearReverseBindings()
+{
+ Q_D(QDeclarativeAnchorChanges);
+ d->fromX = d->target->x();
+ d->fromY = d->target->y();
+ d->fromWidth = d->target->width();
+ d->fromHeight = d->target->height();
+
+ //reset any anchors that were set in the state
+ if (d->left.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetLeft();
+ if (d->right.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetRight();
+ if (d->horizontalCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetHorizontalCenter();
+ if (d->top.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetTop();
+ if (d->bottom.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetBottom();
+ if (d->verticalCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetVerticalCenter();
+ if (d->baseline.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetBaseline();
+
+ //reset any anchors that were set in the original state
+ if (d->origLeft.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetLeft();
+ if (d->origRight.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetRight();
+ if (d->origHCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetHorizontalCenter();
+ if (d->origTop.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetTop();
+ if (d->origBottom.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetBottom();
+ if (d->origVCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetVerticalCenter();
+ if (d->origBaseline.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->resetBaseline();
+}
+
+bool QDeclarativeAnchorChanges::override(QDeclarativeActionEvent*other)
+{
+ if (other->typeName() != QLatin1String("AnchorChanges"))
+ return false;
+ if (static_cast<QDeclarativeActionEvent*>(this) == other)
+ return true;
+ if (static_cast<QDeclarativeAnchorChanges*>(other)->object() == object())
+ return true;
+ return false;
+}
+
+void QDeclarativeAnchorChanges::rewind()
+{
+ Q_D(QDeclarativeAnchorChanges);
+ if (!d->target)
+ return;
+
+ //restore previous anchors
+ if (d->rewindLeft.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setLeft(d->rewindLeft);
+ if (d->rewindRight.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setRight(d->rewindRight);
+ if (d->rewindHCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setHorizontalCenter(d->rewindHCenter);
+ if (d->rewindTop.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setTop(d->rewindTop);
+ if (d->rewindBottom.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setBottom(d->rewindBottom);
+ if (d->rewindVCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setVerticalCenter(d->rewindVCenter);
+ if (d->rewindBaseline.anchorLine != QDeclarativeAnchorLine::Invalid)
+ d->target->anchors()->setBaseline(d->rewindBaseline);
+}
+
+void QDeclarativeAnchorChanges::saveCurrentValues()
+{
+ Q_D(QDeclarativeAnchorChanges);
+ d->rewindLeft = d->target->anchors()->left();
+ d->rewindRight = d->target->anchors()->right();
+ d->rewindHCenter = d->target->anchors()->horizontalCenter();
+ d->rewindTop = d->target->anchors()->top();
+ d->rewindBottom = d->target->anchors()->bottom();
+ d->rewindVCenter = d->target->anchors()->verticalCenter();
+ d->rewindBaseline = d->target->anchors()->baseline();
+}
+
+#include <qdeclarativestateoperations.moc>
+#include <moc_qdeclarativestateoperations_p.cpp>
+
+QT_END_NAMESPACE
+
diff --git a/src/declarative/util/qdeclarativestateoperations_p.h b/src/declarative/util/qdeclarativestateoperations_p.h
new file mode 100644
index 0000000000..dd42480231
--- /dev/null
+++ b/src/declarative/util/qdeclarativestateoperations_p.h
@@ -0,0 +1,216 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVESTATEOPERATIONS_H
+#define QDECLARATIVESTATEOPERATIONS_H
+
+#include "qdeclarativestate_p.h"
+
+#include <qdeclarativeitem.h>
+#include <private/qdeclarativeanchors_p.h>
+#include <qdeclarativescriptstring.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeParentChangePrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeParentChange : public QDeclarativeStateOperation, public QDeclarativeActionEvent
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeParentChange)
+
+ Q_PROPERTY(QDeclarativeItem *target READ object WRITE setObject)
+ Q_PROPERTY(QDeclarativeItem *parent READ parent WRITE setParent)
+ Q_PROPERTY(qreal x READ x WRITE setX)
+ Q_PROPERTY(qreal y READ y WRITE setY)
+ Q_PROPERTY(qreal width READ width WRITE setWidth)
+ Q_PROPERTY(qreal height READ height WRITE setHeight)
+ Q_PROPERTY(qreal scale READ scale WRITE setScale)
+ Q_PROPERTY(qreal rotation READ rotation WRITE setRotation)
+public:
+ QDeclarativeParentChange(QObject *parent=0);
+ ~QDeclarativeParentChange();
+
+ QDeclarativeItem *object() const;
+ void setObject(QDeclarativeItem *);
+
+ QDeclarativeItem *parent() const;
+ void setParent(QDeclarativeItem *);
+
+ QDeclarativeItem *originalParent() const;
+
+ qreal x() const;
+ void setX(qreal x);
+ bool xIsSet() const;
+
+ qreal y() const;
+ void setY(qreal y);
+ bool yIsSet() const;
+
+ qreal width() const;
+ void setWidth(qreal width);
+ bool widthIsSet() const;
+
+ qreal height() const;
+ void setHeight(qreal height);
+ bool heightIsSet() const;
+
+ qreal scale() const;
+ void setScale(qreal scale);
+ bool scaleIsSet() const;
+
+ qreal rotation() const;
+ void setRotation(qreal rotation);
+ bool rotationIsSet() const;
+
+ virtual ActionList actions();
+
+ virtual void saveOriginals();
+ virtual void execute();
+ virtual bool isReversable();
+ virtual void reverse();
+ virtual QString typeName() const;
+ virtual bool override(QDeclarativeActionEvent*other);
+ virtual void rewind();
+ virtual void saveCurrentValues();
+};
+
+class QDeclarativeStateChangeScriptPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeStateChangeScript : public QDeclarativeStateOperation, public QDeclarativeActionEvent
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeStateChangeScript)
+
+ Q_PROPERTY(QDeclarativeScriptString script READ script WRITE setScript)
+ Q_PROPERTY(QString name READ name WRITE setName)
+
+public:
+ QDeclarativeStateChangeScript(QObject *parent=0);
+ ~QDeclarativeStateChangeScript();
+
+ virtual ActionList actions();
+
+ virtual QString typeName() const;
+
+ QDeclarativeScriptString script() const;
+ void setScript(const QDeclarativeScriptString &);
+
+ QString name() const;
+ void setName(const QString &);
+
+ virtual void execute();
+};
+
+class QDeclarativeAnchorChangesPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeAnchorChanges : public QDeclarativeStateOperation, public QDeclarativeActionEvent
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeAnchorChanges)
+
+ Q_PROPERTY(QDeclarativeItem *target READ object WRITE setObject)
+ Q_PROPERTY(QString reset READ reset WRITE setReset)
+ Q_PROPERTY(QDeclarativeAnchorLine left READ left WRITE setLeft)
+ Q_PROPERTY(QDeclarativeAnchorLine right READ right WRITE setRight)
+ Q_PROPERTY(QDeclarativeAnchorLine horizontalCenter READ horizontalCenter WRITE setHorizontalCenter)
+ Q_PROPERTY(QDeclarativeAnchorLine top READ top WRITE setTop)
+ Q_PROPERTY(QDeclarativeAnchorLine bottom READ bottom WRITE setBottom)
+ Q_PROPERTY(QDeclarativeAnchorLine verticalCenter READ verticalCenter WRITE setVerticalCenter)
+ Q_PROPERTY(QDeclarativeAnchorLine baseline READ baseline WRITE setBaseline)
+
+public:
+ QDeclarativeAnchorChanges(QObject *parent=0);
+ ~QDeclarativeAnchorChanges();
+
+ virtual ActionList actions();
+
+ QDeclarativeItem *object() const;
+ void setObject(QDeclarativeItem *);
+
+ QString reset() const;
+ void setReset(const QString &);
+
+ QDeclarativeAnchorLine left() const;
+ void setLeft(const QDeclarativeAnchorLine &edge);
+
+ QDeclarativeAnchorLine right() const;
+ void setRight(const QDeclarativeAnchorLine &edge);
+
+ QDeclarativeAnchorLine horizontalCenter() const;
+ void setHorizontalCenter(const QDeclarativeAnchorLine &edge);
+
+ QDeclarativeAnchorLine top() const;
+ void setTop(const QDeclarativeAnchorLine &edge);
+
+ QDeclarativeAnchorLine bottom() const;
+ void setBottom(const QDeclarativeAnchorLine &edge);
+
+ QDeclarativeAnchorLine verticalCenter() const;
+ void setVerticalCenter(const QDeclarativeAnchorLine &edge);
+
+ QDeclarativeAnchorLine baseline() const;
+ void setBaseline(const QDeclarativeAnchorLine &edge);
+
+ virtual void execute();
+ virtual bool isReversable();
+ virtual void reverse();
+ virtual QString typeName() const;
+ virtual bool override(QDeclarativeActionEvent*other);
+ virtual QList<QDeclarativeAction> extraActions();
+ virtual bool changesBindings();
+ virtual void saveOriginals();
+ virtual void clearForwardBindings();
+ virtual void clearReverseBindings();
+ virtual void rewind();
+ virtual void saveCurrentValues();
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeParentChange)
+QML_DECLARE_TYPE(QDeclarativeStateChangeScript)
+QML_DECLARE_TYPE(QDeclarativeAnchorChanges)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVESTATEOPERATIONS_H
diff --git a/src/declarative/util/qdeclarativestyledtext.cpp b/src/declarative/util/qdeclarativestyledtext.cpp
new file mode 100644
index 0000000000..461de1248e
--- /dev/null
+++ b/src/declarative/util/qdeclarativestyledtext.cpp
@@ -0,0 +1,347 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QStack>
+#include <QVector>
+#include <QPainter>
+#include <QTextLayout>
+#include <QDebug>
+#include <qmath.h>
+#include "qdeclarativestyledtext_p.h"
+
+/*
+ QDeclarativeStyledText supports few tags:
+
+ <b></b> - bold
+ <i></i> - italic
+ <br> - new line
+ <font color="color_name" size="1-7"></font>
+
+ The opening and closing tags must be correctly nested.
+*/
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeStyledTextPrivate
+{
+public:
+ QDeclarativeStyledTextPrivate(const QString &t, QTextLayout &l) : text(t), layout(l), baseFont(layout.font()) {}
+
+ void parse();
+ bool parseTag(const QChar *&ch, const QString &textIn, QString &textOut, QTextCharFormat &format);
+ bool parseCloseTag(const QChar *&ch, const QString &textIn);
+ void parseEntity(const QChar *&ch, const QString &textIn, QString &textOut);
+ bool parseFontAttributes(const QChar *&ch, const QString &textIn, QTextCharFormat &format);
+ QPair<QStringRef,QStringRef> parseAttribute(const QChar *&ch, const QString &textIn);
+ QStringRef parseValue(const QChar *&ch, const QString &textIn);
+
+ inline void skipSpace(const QChar *&ch) {
+ while (ch->isSpace() && !ch->isNull())
+ ++ch;
+ }
+
+ QString text;
+ QTextLayout &layout;
+ QFont baseFont;
+
+ static const QChar lessThan;
+ static const QChar greaterThan;
+ static const QChar equals;
+ static const QChar singleQuote;
+ static const QChar doubleQuote;
+ static const QChar slash;
+ static const QChar ampersand;
+};
+
+const QChar QDeclarativeStyledTextPrivate::lessThan(QLatin1Char('<'));
+const QChar QDeclarativeStyledTextPrivate::greaterThan(QLatin1Char('>'));
+const QChar QDeclarativeStyledTextPrivate::equals(QLatin1Char('='));
+const QChar QDeclarativeStyledTextPrivate::singleQuote(QLatin1Char('\''));
+const QChar QDeclarativeStyledTextPrivate::doubleQuote(QLatin1Char('\"'));
+const QChar QDeclarativeStyledTextPrivate::slash(QLatin1Char('/'));
+const QChar QDeclarativeStyledTextPrivate::ampersand(QLatin1Char('&'));
+
+QDeclarativeStyledText::QDeclarativeStyledText(const QString &string, QTextLayout &layout)
+: d(new QDeclarativeStyledTextPrivate(string, layout))
+{
+}
+
+QDeclarativeStyledText::~QDeclarativeStyledText()
+{
+ delete d;
+}
+
+void QDeclarativeStyledText::parse(const QString &string, QTextLayout &layout)
+{
+ if (string.isEmpty())
+ return;
+ QDeclarativeStyledText styledText(string, layout);
+ styledText.d->parse();
+}
+
+void QDeclarativeStyledTextPrivate::parse()
+{
+ QList<QTextLayout::FormatRange> ranges;
+ QStack<QTextCharFormat> formatStack;
+
+ QString drawText;
+ drawText.reserve(text.count());
+
+ int textStart = 0;
+ int textLength = 0;
+ int rangeStart = 0;
+ const QChar *ch = text.constData();
+ while (!ch->isNull()) {
+ if (*ch == lessThan) {
+ if (textLength)
+ drawText.append(QStringRef(&text, textStart, textLength));
+ if (rangeStart != drawText.length() && formatStack.count()) {
+ QTextLayout::FormatRange formatRange;
+ formatRange.format = formatStack.top();
+ formatRange.start = rangeStart;
+ formatRange.length = drawText.length() - rangeStart;
+ ranges.append(formatRange);
+ }
+ rangeStart = drawText.length();
+ ++ch;
+ if (*ch == slash) {
+ ++ch;
+ if (parseCloseTag(ch, text)) {
+ if (formatStack.count())
+ formatStack.pop();
+ }
+ } else {
+ QTextCharFormat format;
+ if (formatStack.count())
+ format = formatStack.top();
+ else
+ format.setFont(baseFont);
+ if (parseTag(ch, text, drawText, format))
+ formatStack.push(format);
+ }
+ textStart = ch - text.constData() + 1;
+ textLength = 0;
+ } else if (*ch == ampersand) {
+ ++ch;
+ drawText.append(QStringRef(&text, textStart, textLength));
+ parseEntity(ch, text, drawText);
+ textStart = ch - text.constData() + 1;
+ textLength = 0;
+ } else {
+ ++textLength;
+ }
+ if (!ch->isNull())
+ ++ch;
+ }
+ if (textLength)
+ drawText.append(QStringRef(&text, textStart, textLength));
+ if (rangeStart != drawText.length() && formatStack.count()) {
+ QTextLayout::FormatRange formatRange;
+ formatRange.format = formatStack.top();
+ formatRange.start = rangeStart;
+ formatRange.length = drawText.length() - rangeStart;
+ ranges.append(formatRange);
+ }
+
+ layout.setText(drawText);
+ layout.setAdditionalFormats(ranges);
+}
+
+bool QDeclarativeStyledTextPrivate::parseTag(const QChar *&ch, const QString &textIn, QString &textOut, QTextCharFormat &format)
+{
+ skipSpace(ch);
+
+ int tagStart = ch - textIn.constData();
+ int tagLength = 0;
+ while (!ch->isNull()) {
+ if (*ch == greaterThan) {
+ QStringRef tag(&textIn, tagStart, tagLength);
+ const QChar char0 = tag.at(0);
+ if (char0 == QLatin1Char('b')) {
+ if (tagLength == 1)
+ format.setFontWeight(QFont::Bold);
+ else if (tagLength == 2 && tag.at(1) == QLatin1Char('r'))
+ textOut.append(QChar(QChar::LineSeparator));
+ } else if (char0 == QLatin1Char('i')) {
+ if (tagLength == 1)
+ format.setFontItalic(true);
+ }
+ return true;
+ } else if (ch->isSpace()) {
+ // may have params.
+ QStringRef tag(&textIn, tagStart, tagLength);
+ if (tag == QLatin1String("font"))
+ return parseFontAttributes(ch, textIn, format);
+ if (*ch == greaterThan || ch->isNull())
+ continue;
+ } else if (*ch != slash){
+ tagLength++;
+ }
+ ++ch;
+ }
+
+ return false;
+}
+
+bool QDeclarativeStyledTextPrivate::parseCloseTag(const QChar *&ch, const QString &textIn)
+{
+ skipSpace(ch);
+
+ int tagStart = ch - textIn.constData();
+ int tagLength = 0;
+ while (!ch->isNull()) {
+ if (*ch == greaterThan) {
+ QStringRef tag(&textIn, tagStart, tagLength);
+ const QChar char0 = tag.at(0);
+ if (char0 == QLatin1Char('b')) {
+ if (tagLength == 1)
+ return true;
+ else if (tag.at(1) == QLatin1Char('r') && tagLength == 2)
+ return true;
+ } else if (char0 == QLatin1Char('i')) {
+ if (tagLength == 1)
+ return true;
+ } else if (tag == QLatin1String("font")) {
+ return true;
+ }
+ return false;
+ } else if (!ch->isSpace()){
+ tagLength++;
+ }
+ ++ch;
+ }
+
+ return false;
+}
+
+void QDeclarativeStyledTextPrivate::parseEntity(const QChar *&ch, const QString &textIn, QString &textOut)
+{
+ int entityStart = ch - textIn.constData();
+ int entityLength = 0;
+ while (!ch->isNull()) {
+ if (*ch == QLatin1Char(';')) {
+ QStringRef entity(&textIn, entityStart, entityLength);
+ if (entity == QLatin1String("gt"))
+ textOut += QChar(62);
+ else if (entity == QLatin1String("lt"))
+ textOut += QChar(60);
+ else if (entity == QLatin1String("amp"))
+ textOut += QChar(38);
+ return;
+ }
+ ++entityLength;
+ ++ch;
+ }
+}
+
+bool QDeclarativeStyledTextPrivate::parseFontAttributes(const QChar *&ch, const QString &textIn, QTextCharFormat &format)
+{
+ bool valid = false;
+ QPair<QStringRef,QStringRef> attr;
+ do {
+ attr = parseAttribute(ch, textIn);
+ if (attr.first == QLatin1String("color")) {
+ valid = true;
+ format.setForeground(QColor(attr.second.toString()));
+ } else if (attr.first == QLatin1String("size")) {
+ valid = true;
+ int size = attr.second.toString().toInt();
+ if (attr.second.at(0) == QLatin1Char('-') || attr.second.at(0) == QLatin1Char('+'))
+ size += 3;
+ if (size >= 1 && size <= 7) {
+ static const qreal scaling[] = { 0.7, 0.8, 1.0, 1.2, 1.5, 2.0, 2.4 };
+ format.setFontPointSize(baseFont.pointSize() * scaling[size-1]);
+ }
+ }
+ } while (!ch->isNull() && !attr.first.isEmpty());
+
+ return valid;
+}
+
+QPair<QStringRef,QStringRef> QDeclarativeStyledTextPrivate::parseAttribute(const QChar *&ch, const QString &textIn)
+{
+ skipSpace(ch);
+
+ int attrStart = ch - textIn.constData();
+ int attrLength = 0;
+ while (!ch->isNull()) {
+ if (*ch == greaterThan) {
+ break;
+ } else if (*ch == equals) {
+ ++ch;
+ if (*ch != singleQuote && *ch != doubleQuote) {
+ while (*ch != greaterThan && !ch->isNull())
+ ++ch;
+ break;
+ }
+ ++ch;
+ if (!attrLength)
+ break;
+ QStringRef attr(&textIn, attrStart, attrLength);
+ QStringRef val = parseValue(ch, textIn);
+ if (!val.isEmpty())
+ return QPair<QStringRef,QStringRef>(attr,val);
+ break;
+ } else {
+ ++attrLength;
+ }
+ ++ch;
+ }
+
+ return QPair<QStringRef,QStringRef>();
+}
+
+QStringRef QDeclarativeStyledTextPrivate::parseValue(const QChar *&ch, const QString &textIn)
+{
+ int valStart = ch - textIn.constData();
+ int valLength = 0;
+ while (*ch != singleQuote && *ch != doubleQuote && !ch->isNull()) {
+ ++valLength;
+ ++ch;
+ }
+ if (ch->isNull())
+ return QStringRef();
+ ++ch; // skip quote
+
+ return QStringRef(&textIn, valStart, valLength);
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativestyledtext_p.h b/src/declarative/util/qdeclarativestyledtext_p.h
new file mode 100644
index 0000000000..8d2c42d2ff
--- /dev/null
+++ b/src/declarative/util/qdeclarativestyledtext_p.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVESTYLEDTEXT_H
+#define QDECLARATIVESTYLEDTEXT_H
+
+#include <QSizeF>
+
+QT_BEGIN_NAMESPACE
+
+class QPainter;
+class QPointF;
+class QString;
+class QDeclarativeStyledTextPrivate;
+class QTextLayout;
+
+class Q_DECLARATIVE_EXPORT QDeclarativeStyledText
+{
+public:
+ static void parse(const QString &string, QTextLayout &layout);
+
+private:
+ QDeclarativeStyledText(const QString &string, QTextLayout &layout);
+ ~QDeclarativeStyledText();
+
+ QDeclarativeStyledTextPrivate *d;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/declarative/util/qdeclarativesystempalette.cpp b/src/declarative/util/qdeclarativesystempalette.cpp
new file mode 100644
index 0000000000..d819c27d6b
--- /dev/null
+++ b/src/declarative/util/qdeclarativesystempalette.cpp
@@ -0,0 +1,304 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativesystempalette_p.h"
+
+#include <QApplication>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeSystemPalettePrivate : public QObjectPrivate
+{
+public:
+ QPalette palette;
+ QPalette::ColorGroup group;
+};
+
+
+
+/*!
+ \qmlclass SystemPalette QDeclarativeSystemPalette
+ \since 4.7
+ \ingroup group_utility
+ \brief The SystemPalette item gives access to the Qt palettes.
+ \sa QPalette
+
+ Example:
+ \qml
+ SystemPalette { id: myPalette; colorGroup: Qt.Active }
+
+ Rectangle {
+ width: 640; height: 480
+ color: myPalette.window
+ Text {
+ anchors.fill: parent
+ text: "Hello!"; color: myPalette.windowText
+ }
+ }
+ \endqml
+*/
+QDeclarativeSystemPalette::QDeclarativeSystemPalette(QObject *parent)
+ : QObject(*(new QDeclarativeSystemPalettePrivate), parent)
+{
+ Q_D(QDeclarativeSystemPalette);
+ d->palette = QApplication::palette();
+ d->group = QPalette::Active;
+ qApp->installEventFilter(this);
+}
+
+QDeclarativeSystemPalette::~QDeclarativeSystemPalette()
+{
+}
+
+/*!
+ \qmlproperty color SystemPalette::window
+ The window (general background) color of the current color group.
+
+ \sa QPalette::ColorRole
+*/
+QColor QDeclarativeSystemPalette::window() const
+{
+ Q_D(const QDeclarativeSystemPalette);
+ return d->palette.color(d->group, QPalette::Window);
+}
+
+/*!
+ \qmlproperty color SystemPalette::windowText
+ The window text (general foreground) color of the current color group.
+
+ \sa QPalette::ColorRole
+*/
+QColor QDeclarativeSystemPalette::windowText() const
+{
+ Q_D(const QDeclarativeSystemPalette);
+ return d->palette.color(d->group, QPalette::WindowText);
+}
+
+/*!
+ \qmlproperty color SystemPalette::base
+ The base color of the current color group.
+
+ \sa QPalette::ColorRole
+*/
+QColor QDeclarativeSystemPalette::base() const
+{
+ Q_D(const QDeclarativeSystemPalette);
+ return d->palette.color(d->group, QPalette::Base);
+}
+
+/*!
+ \qmlproperty color SystemPalette::text
+ The text color of the current color group.
+
+ \sa QPalette::ColorRole
+*/
+QColor QDeclarativeSystemPalette::text() const
+{
+ Q_D(const QDeclarativeSystemPalette);
+ return d->palette.color(d->group, QPalette::Text);
+}
+
+/*!
+ \qmlproperty color SystemPalette::alternateBase
+ The alternate base color of the current color group.
+
+ \sa QPalette::ColorRole
+*/
+QColor QDeclarativeSystemPalette::alternateBase() const
+{
+ Q_D(const QDeclarativeSystemPalette);
+ return d->palette.color(d->group, QPalette::AlternateBase);
+}
+
+/*!
+ \qmlproperty color SystemPalette::button
+ The button color of the current color group.
+
+ \sa QPalette::ColorRole
+*/
+QColor QDeclarativeSystemPalette::button() const
+{
+ Q_D(const QDeclarativeSystemPalette);
+ return d->palette.color(d->group, QPalette::Button);
+}
+
+/*!
+ \qmlproperty color SystemPalette::buttonText
+ The button text foreground color of the current color group.
+
+ \sa QPalette::ColorRole
+*/
+QColor QDeclarativeSystemPalette::buttonText() const
+{
+ Q_D(const QDeclarativeSystemPalette);
+ return d->palette.color(d->group, QPalette::ButtonText);
+}
+
+/*!
+ \qmlproperty color SystemPalette::light
+ The light color of the current color group.
+
+ \sa QPalette::ColorRole
+*/
+QColor QDeclarativeSystemPalette::light() const
+{
+ Q_D(const QDeclarativeSystemPalette);
+ return d->palette.color(d->group, QPalette::Light);
+}
+
+/*!
+ \qmlproperty color SystemPalette::midlight
+ The midlight color of the current color group.
+
+ \sa QPalette::ColorRole
+*/
+QColor QDeclarativeSystemPalette::midlight() const
+{
+ Q_D(const QDeclarativeSystemPalette);
+ return d->palette.color(d->group, QPalette::Midlight);
+}
+
+/*!
+ \qmlproperty color SystemPalette::dark
+ The dark color of the current color group.
+
+ \sa QPalette::ColorRole
+*/
+QColor QDeclarativeSystemPalette::dark() const
+{
+ Q_D(const QDeclarativeSystemPalette);
+ return d->palette.color(d->group, QPalette::Dark);
+}
+
+/*!
+ \qmlproperty color SystemPalette::mid
+ The mid color of the current color group.
+
+ \sa QPalette::ColorRole
+*/
+QColor QDeclarativeSystemPalette::mid() const
+{
+ Q_D(const QDeclarativeSystemPalette);
+ return d->palette.color(d->group, QPalette::Mid);
+}
+
+/*!
+ \qmlproperty color SystemPalette::shadow
+ The shadow color of the current color group.
+
+ \sa QPalette::ColorRole
+*/
+QColor QDeclarativeSystemPalette::shadow() const
+{
+ Q_D(const QDeclarativeSystemPalette);
+ return d->palette.color(d->group, QPalette::Shadow);
+}
+
+/*!
+ \qmlproperty color SystemPalette::highlight
+ The highlight color of the current color group.
+
+ \sa QPalette::ColorRole
+*/
+QColor QDeclarativeSystemPalette::highlight() const
+{
+ Q_D(const QDeclarativeSystemPalette);
+ return d->palette.color(d->group, QPalette::Highlight);
+}
+
+/*!
+ \qmlproperty color SystemPalette::highlightedText
+ The highlighted text color of the current color group.
+
+ \sa QPalette::ColorRole
+*/
+QColor QDeclarativeSystemPalette::highlightedText() const
+{
+ Q_D(const QDeclarativeSystemPalette);
+ return d->palette.color(d->group, QPalette::HighlightedText);
+}
+
+/*!
+ \qmlproperty QDeclarativeSystemPalette::ColorGroup SystemPalette::colorGroup
+
+ The color group of the palette. It can be Active, Inactive or Disabled.
+ Active is the default.
+
+ \sa QPalette::ColorGroup
+*/
+QDeclarativeSystemPalette::ColorGroup QDeclarativeSystemPalette::colorGroup() const
+{
+ Q_D(const QDeclarativeSystemPalette);
+ return (QDeclarativeSystemPalette::ColorGroup)d->group;
+}
+
+void QDeclarativeSystemPalette::setColorGroup(QDeclarativeSystemPalette::ColorGroup colorGroup)
+{
+ Q_D(QDeclarativeSystemPalette);
+ d->group = (QPalette::ColorGroup)colorGroup;
+ emit paletteChanged();
+}
+
+bool QDeclarativeSystemPalette::eventFilter(QObject *watched, QEvent *event)
+{
+ if (watched == qApp) {
+ if (event->type() == QEvent::ApplicationPaletteChange) {
+ QApplication::postEvent(this, new QEvent(QEvent::ApplicationPaletteChange));
+ return false;
+ }
+ }
+ return QObject::eventFilter(watched, event);
+}
+
+bool QDeclarativeSystemPalette::event(QEvent *event)
+{
+ Q_D(QDeclarativeSystemPalette);
+ if (event->type() == QEvent::ApplicationPaletteChange) {
+ d->palette = QApplication::palette();
+ emit paletteChanged();
+ return true;
+ }
+ return QObject::event(event);
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativesystempalette_p.h b/src/declarative/util/qdeclarativesystempalette_p.h
new file mode 100644
index 0000000000..9fa6b08594
--- /dev/null
+++ b/src/declarative/util/qdeclarativesystempalette_p.h
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVESYSTEMPALETTE_H
+#define QDECLARATIVESYSTEMPALETTE_H
+
+#include <qdeclarative.h>
+
+#include <QtCore/qobject.h>
+#include <QPalette>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeSystemPalettePrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeSystemPalette : public QObject
+{
+ Q_OBJECT
+ Q_ENUMS(ColorGroup)
+ Q_DECLARE_PRIVATE(QDeclarativeSystemPalette)
+
+ Q_PROPERTY(QDeclarativeSystemPalette::ColorGroup colorGroup READ colorGroup WRITE setColorGroup NOTIFY paletteChanged)
+ Q_PROPERTY(QColor window READ window NOTIFY paletteChanged)
+ Q_PROPERTY(QColor windowText READ windowText NOTIFY paletteChanged)
+ Q_PROPERTY(QColor base READ base NOTIFY paletteChanged)
+ Q_PROPERTY(QColor text READ text NOTIFY paletteChanged)
+ Q_PROPERTY(QColor alternateBase READ alternateBase NOTIFY paletteChanged)
+ Q_PROPERTY(QColor button READ button NOTIFY paletteChanged)
+ Q_PROPERTY(QColor buttonText READ buttonText NOTIFY paletteChanged)
+ Q_PROPERTY(QColor light READ light NOTIFY paletteChanged)
+ Q_PROPERTY(QColor midlight READ midlight NOTIFY paletteChanged)
+ Q_PROPERTY(QColor dark READ dark NOTIFY paletteChanged)
+ Q_PROPERTY(QColor mid READ mid NOTIFY paletteChanged)
+ Q_PROPERTY(QColor shadow READ shadow NOTIFY paletteChanged)
+ Q_PROPERTY(QColor highlight READ highlight NOTIFY paletteChanged)
+ Q_PROPERTY(QColor highlightedText READ highlightedText NOTIFY paletteChanged)
+
+public:
+ QDeclarativeSystemPalette(QObject *parent=0);
+ ~QDeclarativeSystemPalette();
+
+ enum ColorGroup { Active = QPalette::Active, Inactive = QPalette::Inactive, Disabled = QPalette::Disabled };
+
+ QColor window() const;
+ QColor windowText() const;
+
+ QColor base() const;
+ QColor text() const;
+ QColor alternateBase() const;
+
+ QColor button() const;
+ QColor buttonText() const;
+
+ QColor light() const;
+ QColor midlight() const;
+ QColor dark() const;
+ QColor mid() const;
+ QColor shadow() const;
+
+ QColor highlight() const;
+ QColor highlightedText() const;
+
+ QDeclarativeSystemPalette::ColorGroup colorGroup() const;
+ void setColorGroup(QDeclarativeSystemPalette::ColorGroup);
+
+Q_SIGNALS:
+ void paletteChanged();
+
+private:
+ bool eventFilter(QObject *watched, QEvent *event);
+ bool event(QEvent *event);
+
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeSystemPalette)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVESYSTEMPALETTE_H
diff --git a/src/declarative/util/qdeclarativetimeline.cpp b/src/declarative/util/qdeclarativetimeline.cpp
new file mode 100644
index 0000000000..8e133b6f86
--- /dev/null
+++ b/src/declarative/util/qdeclarativetimeline.cpp
@@ -0,0 +1,942 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativetimeline_p_p.h"
+
+#include <QDebug>
+#include <QMutex>
+#include <QThread>
+#include <QWaitCondition>
+#include <QEvent>
+#include <QCoreApplication>
+#include <QEasingCurve>
+#include <QTime>
+
+QT_BEGIN_NAMESPACE
+
+struct Update {
+ Update(QDeclarativeTimeLineValue *_g, qreal _v)
+ : g(_g), v(_v) {}
+ Update(const QDeclarativeTimeLineCallback &_e)
+ : g(0), v(0), e(_e) {}
+
+ QDeclarativeTimeLineValue *g;
+ qreal v;
+ QDeclarativeTimeLineCallback e;
+};
+
+struct QDeclarativeTimeLinePrivate
+{
+ QDeclarativeTimeLinePrivate(QDeclarativeTimeLine *);
+
+ struct Op {
+ enum Type {
+ Pause,
+ Set,
+ Move,
+ MoveBy,
+ Accel,
+ AccelDistance,
+ Execute
+ };
+ Op() {}
+ Op(Type t, int l, qreal v, qreal v2, int o,
+ const QDeclarativeTimeLineCallback &ev = QDeclarativeTimeLineCallback(), const QEasingCurve &es = QEasingCurve())
+ : type(t), length(l), value(v), value2(v2), order(o), event(ev),
+ easing(es) {}
+ Op(const Op &o)
+ : type(o.type), length(o.length), value(o.value), value2(o.value2),
+ order(o.order), event(o.event), easing(o.easing) {}
+ Op &operator=(const Op &o) {
+ type = o.type; length = o.length; value = o.value;
+ value2 = o.value2; order = o.order; event = o.event;
+ easing = o.easing;
+ return *this;
+ }
+
+ Type type;
+ int length;
+ qreal value;
+ qreal value2;
+
+ int order;
+ QDeclarativeTimeLineCallback event;
+ QEasingCurve easing;
+ };
+ struct TimeLine
+ {
+ TimeLine() : length(0), consumedOpLength(0), base(0.) {}
+ QList<Op> ops;
+ int length;
+ int consumedOpLength;
+ qreal base;
+ };
+
+ int length;
+ int syncPoint;
+ typedef QHash<QDeclarativeTimeLineObject *, TimeLine> Ops;
+ Ops ops;
+ QDeclarativeTimeLine *q;
+
+ void add(QDeclarativeTimeLineObject &, const Op &);
+ qreal value(const Op &op, int time, qreal base, bool *) const;
+
+ int advance(int);
+
+ bool clockRunning;
+ int prevTime;
+
+ int order;
+
+ QDeclarativeTimeLine::SyncMode syncMode;
+ int syncAdj;
+ QList<QPair<int, Update> > *updateQueue;
+};
+
+QDeclarativeTimeLinePrivate::QDeclarativeTimeLinePrivate(QDeclarativeTimeLine *parent)
+: length(0), syncPoint(0), q(parent), clockRunning(false), prevTime(0), order(0), syncMode(QDeclarativeTimeLine::LocalSync), syncAdj(0), updateQueue(0)
+{
+}
+
+void QDeclarativeTimeLinePrivate::add(QDeclarativeTimeLineObject &g, const Op &o)
+{
+ if (g._t && g._t != q) {
+ qWarning() << "QDeclarativeTimeLine: Cannot modify a QDeclarativeTimeLineValue owned by"
+ << "another timeline.";
+ return;
+ }
+ g._t = q;
+
+ Ops::Iterator iter = ops.find(&g);
+ if (iter == ops.end()) {
+ iter = ops.insert(&g, TimeLine());
+ if (syncPoint > 0)
+ q->pause(g, syncPoint);
+ }
+ if (!iter->ops.isEmpty() &&
+ o.type == Op::Pause &&
+ iter->ops.last().type == Op::Pause) {
+ iter->ops.last().length += o.length;
+ iter->length += o.length;
+ } else {
+ iter->ops.append(o);
+ iter->length += o.length;
+ }
+
+ if (iter->length > length)
+ length = iter->length;
+
+ if (!clockRunning) {
+ q->stop();
+ prevTime = 0;
+ clockRunning = true;
+
+ if (syncMode == QDeclarativeTimeLine::LocalSync) {
+ syncAdj = -1;
+ } else {
+ syncAdj = 0;
+ }
+ q->start();
+/* q->tick(0);
+ if (syncMode == QDeclarativeTimeLine::LocalSync) {
+ syncAdj = -1;
+ } else {
+ syncAdj = 0;
+ }
+ */
+ }
+}
+
+qreal QDeclarativeTimeLinePrivate::value(const Op &op, int time, qreal base, bool *changed) const
+{
+ Q_ASSERT(time >= 0);
+ Q_ASSERT(time <= op.length);
+ *changed = true;
+
+ switch(op.type) {
+ case Op::Pause:
+ *changed = false;
+ return base;
+ case Op::Set:
+ return op.value;
+ case Op::Move:
+ if (time == 0) {
+ return base;
+ } else if (time == (op.length)) {
+ return op.value;
+ } else {
+ qreal delta = op.value - base;
+ qreal pTime = (qreal)(time) / (qreal)op.length;
+ if (op.easing.type() == QEasingCurve::Linear)
+ return base + delta * pTime;
+ else
+ return base + delta * op.easing.valueForProgress(pTime);
+ }
+ case Op::MoveBy:
+ if (time == 0) {
+ return base;
+ } else if (time == (op.length)) {
+ return base + op.value;
+ } else {
+ qreal delta = op.value;
+ qreal pTime = (qreal)(time) / (qreal)op.length;
+ if (op.easing.type() == QEasingCurve::Linear)
+ return base + delta * pTime;
+ else
+ return base + delta * op.easing.valueForProgress(pTime);
+ }
+ case Op::Accel:
+ if (time == 0) {
+ return base;
+ } else {
+ qreal t = (qreal)(time) / 1000.0f;
+ qreal delta = op.value * t + 0.5f * op.value2 * t * t;
+ return base + delta;
+ }
+ case Op::AccelDistance:
+ if (time == 0) {
+ return base;
+ } else if (time == (op.length)) {
+ return base + op.value2;
+ } else {
+ qreal t = (qreal)(time) / 1000.0f;
+ qreal accel = -1.0f * 1000.0f * op.value / (qreal)op.length;
+ qreal delta = op.value * t + 0.5f * accel * t * t;
+ return base + delta;
+
+ }
+ case Op::Execute:
+ op.event.d0(op.event.d1);
+ *changed = false;
+ return -1;
+ }
+
+ return base;
+}
+
+/*!
+ \internal
+ \class QDeclarativeTimeLine
+ \ingroup group_animation
+ \brief The QDeclarativeTimeLine class provides a timeline for controlling animations.
+
+ QDeclarativeTimeLine is similar to QTimeLine except:
+ \list
+ \i It updates QDeclarativeTimeLineValue instances directly, rather than maintaining a single
+ current value.
+
+ For example, the following animates a simple value over 200 milliseconds:
+ \code
+ QDeclarativeTimeLineValue v(<starting value>);
+ QDeclarativeTimeLine tl;
+ tl.move(v, 100., 200);
+ tl.start()
+ \endcode
+
+ If your program needs to know when values are changed, it can either
+ connect to the QDeclarativeTimeLine's updated() signal, or inherit from QDeclarativeTimeLineValue
+ and reimplement the QDeclarativeTimeLineValue::setValue() method.
+
+ \i Supports multiple QDeclarativeTimeLineValue, arbitrary start and end values and allows
+ animations to be strung together for more complex effects.
+
+ For example, the following animation moves the x and y coordinates of
+ an object from wherever they are to the position (100, 100) in 50
+ milliseconds and then further animates them to (100, 200) in 50
+ milliseconds:
+
+ \code
+ QDeclarativeTimeLineValue x(<starting value>);
+ QDeclarativeTimeLineValue y(<starting value>);
+
+ QDeclarativeTimeLine tl;
+ tl.start();
+
+ tl.move(x, 100., 50);
+ tl.move(y, 100., 50);
+ tl.move(y, 200., 50);
+ \endcode
+
+ \i All QDeclarativeTimeLine instances share a single, synchronized clock.
+
+ Actions scheduled within the same event loop tick are scheduled
+ synchronously against each other, regardless of the wall time between the
+ scheduling. Synchronized scheduling applies both to within the same
+ QDeclarativeTimeLine and across separate QDeclarativeTimeLine's within the same process.
+
+ \endlist
+
+ Currently easing functions are not supported.
+*/
+
+
+/*!
+ Construct a new QDeclarativeTimeLine with the specified \a parent.
+*/
+QDeclarativeTimeLine::QDeclarativeTimeLine(QObject *parent)
+: QAbstractAnimation(parent)
+{
+ d = new QDeclarativeTimeLinePrivate(this);
+}
+
+/*!
+ Destroys the time line. Any inprogress animations are canceled, but not
+ completed.
+*/
+QDeclarativeTimeLine::~QDeclarativeTimeLine()
+{
+ for (QDeclarativeTimeLinePrivate::Ops::Iterator iter = d->ops.begin();
+ iter != d->ops.end();
+ ++iter)
+ iter.key()->_t = 0;
+
+ delete d; d = 0;
+}
+
+/*!
+ \enum QDeclarativeTimeLine::SyncMode
+ */
+
+/*!
+ Return the timeline's synchronization mode.
+ */
+QDeclarativeTimeLine::SyncMode QDeclarativeTimeLine::syncMode() const
+{
+ return d->syncMode;
+}
+
+/*!
+ Set the timeline's synchronization mode to \a syncMode.
+ */
+void QDeclarativeTimeLine::setSyncMode(SyncMode syncMode)
+{
+ d->syncMode = syncMode;
+}
+
+/*!
+ Pause \a obj for \a time milliseconds.
+*/
+void QDeclarativeTimeLine::pause(QDeclarativeTimeLineObject &obj, int time)
+{
+ if (time <= 0) return;
+ QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::Pause, time, 0., 0., d->order++);
+ d->add(obj, op);
+}
+
+/*!
+ Execute the \a event.
+ */
+void QDeclarativeTimeLine::callback(const QDeclarativeTimeLineCallback &callback)
+{
+ QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::Execute, 0, 0, 0., d->order++, callback);
+ d->add(*callback.callbackObject(), op);
+}
+
+/*!
+ Set the \a value of \a timeLineValue.
+*/
+void QDeclarativeTimeLine::set(QDeclarativeTimeLineValue &timeLineValue, qreal value)
+{
+ QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::Set, 0, value, 0., d->order++);
+ d->add(timeLineValue, op);
+}
+
+/*!
+ Decelerate \a timeLineValue from the starting \a velocity to zero at the
+ given \a acceleration rate. Although the \a acceleration is technically
+ a deceleration, it should always be positive. The QDeclarativeTimeLine will ensure
+ that the deceleration is in the opposite direction to the initial velocity.
+*/
+int QDeclarativeTimeLine::accel(QDeclarativeTimeLineValue &timeLineValue, qreal velocity, qreal acceleration)
+{
+ if ((velocity > 0.0f) == (acceleration > 0.0f))
+ acceleration = acceleration * -1.0f;
+
+ int time = static_cast<int>(-1000 * velocity / acceleration);
+
+ QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::Accel, time, velocity, acceleration, d->order++);
+ d->add(timeLineValue, op);
+
+ return time;
+}
+
+/*!
+ \overload
+
+ Decelerate \a timeLineValue from the starting \a velocity to zero at the
+ given \a acceleration rate over a maximum distance of maxDistance.
+
+ If necessary, QDeclarativeTimeLine will reduce the acceleration to ensure that the
+ entire operation does not require a move of more than \a maxDistance.
+ \a maxDistance should always be positive.
+*/
+int QDeclarativeTimeLine::accel(QDeclarativeTimeLineValue &timeLineValue, qreal velocity, qreal acceleration, qreal maxDistance)
+{
+ Q_ASSERT(acceleration >= 0.0f && maxDistance >= 0.0f);
+
+ qreal maxAccel = (velocity * velocity) / (2.0f * maxDistance);
+ if (maxAccel > acceleration)
+ acceleration = maxAccel;
+
+ if ((velocity > 0.0f) == (acceleration > 0.0f))
+ acceleration = acceleration * -1.0f;
+
+ int time = static_cast<int>(-1000 * velocity / acceleration);
+
+ QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::Accel, time, velocity, acceleration, d->order++);
+ d->add(timeLineValue, op);
+
+ return time;
+}
+
+/*!
+ Decelerate \a timeLineValue from the starting \a velocity to zero over the given
+ \a distance. This is like accel(), but the QDeclarativeTimeLine calculates the exact
+ deceleration to use.
+
+ \a distance should be positive.
+*/
+int QDeclarativeTimeLine::accelDistance(QDeclarativeTimeLineValue &timeLineValue, qreal velocity, qreal distance)
+{
+ if (distance == 0.0f || velocity == 0.0f)
+ return -1;
+ Q_ASSERT((distance >= 0.0f) == (velocity >= 0.0f));
+
+ int time = static_cast<int>(1000 * (2.0f * distance) / velocity);
+
+ QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::AccelDistance, time, velocity, distance, d->order++);
+ d->add(timeLineValue, op);
+
+ return time;
+}
+
+/*!
+ Linearly change the \a timeLineValue from its current value to the given
+ \a destination value over \a time milliseconds.
+*/
+void QDeclarativeTimeLine::move(QDeclarativeTimeLineValue &timeLineValue, qreal destination, int time)
+{
+ if (time <= 0) return;
+ QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::Move, time, destination, 0.0f, d->order++);
+ d->add(timeLineValue, op);
+}
+
+/*!
+ Change the \a timeLineValue from its current value to the given \a destination
+ value over \a time milliseconds using the \a easing curve.
+ */
+void QDeclarativeTimeLine::move(QDeclarativeTimeLineValue &timeLineValue, qreal destination, const QEasingCurve &easing, int time)
+{
+ if (time <= 0) return;
+ QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::Move, time, destination, 0.0f, d->order++, QDeclarativeTimeLineCallback(), easing);
+ d->add(timeLineValue, op);
+}
+
+/*!
+ Linearly change the \a timeLineValue from its current value by the \a change amount
+ over \a time milliseconds.
+*/
+void QDeclarativeTimeLine::moveBy(QDeclarativeTimeLineValue &timeLineValue, qreal change, int time)
+{
+ if (time <= 0) return;
+ QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::MoveBy, time, change, 0.0f, d->order++);
+ d->add(timeLineValue, op);
+}
+
+/*!
+ Change the \a timeLineValue from its current value by the \a change amount over
+ \a time milliseconds using the \a easing curve.
+ */
+void QDeclarativeTimeLine::moveBy(QDeclarativeTimeLineValue &timeLineValue, qreal change, const QEasingCurve &easing, int time)
+{
+ if (time <= 0) return;
+ QDeclarativeTimeLinePrivate::Op op(QDeclarativeTimeLinePrivate::Op::MoveBy, time, change, 0.0f, d->order++, QDeclarativeTimeLineCallback(), easing);
+ d->add(timeLineValue, op);
+}
+
+/*!
+ Cancel (but don't complete) all scheduled actions for \a timeLineValue.
+*/
+void QDeclarativeTimeLine::reset(QDeclarativeTimeLineValue &timeLineValue)
+{
+ if (!timeLineValue._t)
+ return;
+ if (timeLineValue._t != this) {
+ qWarning() << "QDeclarativeTimeLine: Cannot reset a QDeclarativeTimeLineValue owned by another timeline.";
+ return;
+ }
+ remove(&timeLineValue);
+ timeLineValue._t = 0;
+}
+
+int QDeclarativeTimeLine::duration() const
+{
+ return -1;
+}
+
+/*!
+ Synchronize the end point of \a timeLineValue to the endpoint of \a syncTo
+ within this timeline.
+
+ Following operations on \a timeLineValue in this timeline will be scheduled after
+ all the currently scheduled actions on \a syncTo are complete. In
+ psuedo-code this is equivalent to:
+ \code
+ QDeclarativeTimeLine::pause(timeLineValue, min(0, length_of(syncTo) - length_of(timeLineValue)))
+ \endcode
+*/
+void QDeclarativeTimeLine::sync(QDeclarativeTimeLineValue &timeLineValue, QDeclarativeTimeLineValue &syncTo)
+{
+ QDeclarativeTimeLinePrivate::Ops::Iterator iter = d->ops.find(&syncTo);
+ if (iter == d->ops.end())
+ return;
+ int length = iter->length;
+
+ iter = d->ops.find(&timeLineValue);
+ if (iter == d->ops.end()) {
+ pause(timeLineValue, length);
+ } else {
+ int glength = iter->length;
+ pause(timeLineValue, length - glength);
+ }
+}
+
+/*!
+ Synchronize the end point of \a timeLineValue to the endpoint of the longest
+ action cursrently scheduled in the timeline.
+
+ In psuedo-code, this is equivalent to:
+ \code
+ QDeclarativeTimeLine::pause(timeLineValue, length_of(timeline) - length_of(timeLineValue))
+ \endcode
+*/
+void QDeclarativeTimeLine::sync(QDeclarativeTimeLineValue &timeLineValue)
+{
+ QDeclarativeTimeLinePrivate::Ops::Iterator iter = d->ops.find(&timeLineValue);
+ if (iter == d->ops.end()) {
+ pause(timeLineValue, d->length);
+ } else {
+ pause(timeLineValue, d->length - iter->length);
+ }
+}
+
+/*
+ Synchronize all currently and future scheduled values in this timeline to
+ the longest action currently scheduled.
+
+ For example:
+ \code
+ value1->setValue(0.);
+ value2->setValue(0.);
+ value3->setValue(0.);
+ QDeclarativeTimeLine tl;
+ ...
+ tl.move(value1, 10, 200);
+ tl.move(value2, 10, 100);
+ tl.sync();
+ tl.move(value2, 20, 100);
+ tl.move(value3, 20, 100);
+ \endcode
+
+ will result in:
+
+ \table
+ \header \o \o 0ms \o 50ms \o 100ms \o 150ms \o 200ms \o 250ms \o 300ms
+ \row \o value1 \o 0 \o 2.5 \o 5.0 \o 7.5 \o 10 \o 10 \o 10
+ \row \o value2 \o 0 \o 5.0 \o 10.0 \o 10.0 \o 10.0 \o 15.0 \o 20.0
+ \row \o value2 \o 0 \o 0 \o 0 \o 0 \o 0 \o 10.0 \o 20.0
+ \endtable
+*/
+
+/*void QDeclarativeTimeLine::sync()
+{
+ for (QDeclarativeTimeLinePrivate::Ops::Iterator iter = d->ops.begin();
+ iter != d->ops.end();
+ ++iter)
+ pause(*iter.key(), d->length - iter->length);
+ d->syncPoint = d->length;
+}*/
+
+/*!
+ \internal
+
+ Temporary hack.
+ */
+void QDeclarativeTimeLine::setSyncPoint(int sp)
+{
+ d->syncPoint = sp;
+}
+
+/*!
+ \internal
+
+ Temporary hack.
+ */
+int QDeclarativeTimeLine::syncPoint() const
+{
+ return d->syncPoint;
+}
+
+/*!
+ Returns true if the timeline is active. An active timeline is one where
+ QDeclarativeTimeLineValue actions are still pending.
+*/
+bool QDeclarativeTimeLine::isActive() const
+{
+ return !d->ops.isEmpty();
+}
+
+/*!
+ Completes the timeline. All queued actions are played to completion, and then discarded. For example,
+ \code
+ QDeclarativeTimeLineValue v(0.);
+ QDeclarativeTimeLine tl;
+ tl.move(v, 100., 1000.);
+ // 500 ms passes
+ // v.value() == 50.
+ tl.complete();
+ // v.value() == 100.
+ \endcode
+*/
+void QDeclarativeTimeLine::complete()
+{
+ d->advance(d->length);
+}
+
+/*!
+ Resets the timeline. All queued actions are discarded and QDeclarativeTimeLineValue's retain their current value. For example,
+ \code
+ QDeclarativeTimeLineValue v(0.);
+ QDeclarativeTimeLine tl;
+ tl.move(v, 100., 1000.);
+ // 500 ms passes
+ // v.value() == 50.
+ tl.clear();
+ // v.value() == 50.
+ \endcode
+*/
+void QDeclarativeTimeLine::clear()
+{
+ for (QDeclarativeTimeLinePrivate::Ops::ConstIterator iter = d->ops.begin(); iter != d->ops.end(); ++iter)
+ iter.key()->_t = 0;
+ d->ops.clear();
+ d->length = 0;
+ d->syncPoint = 0;
+ //XXX need stop here?
+}
+
+int QDeclarativeTimeLine::time() const
+{
+ return d->prevTime;
+}
+
+/*!
+ \fn void QDeclarativeTimeLine::updated()
+
+ Emitted each time the timeline modifies QDeclarativeTimeLineValues. Even if multiple
+ QDeclarativeTimeLineValues are changed, this signal is only emitted once for each clock tick.
+*/
+
+void QDeclarativeTimeLine::updateCurrentTime(int v)
+{
+ if (d->syncAdj == -1)
+ d->syncAdj = v;
+ v -= d->syncAdj;
+
+ int timeChanged = v - d->prevTime;
+#if 0
+ if (!timeChanged)
+ return;
+#endif
+ d->prevTime = v;
+ d->advance(timeChanged);
+ emit updated();
+
+ // Do we need to stop the clock?
+ if (d->ops.isEmpty()) {
+ stop();
+ d->prevTime = 0;
+ d->clockRunning = false;
+ emit completed();
+ } /*else if (pauseTime > 0) {
+ GfxClock::cancelClock();
+ d->prevTime = 0;
+ GfxClock::pauseFor(pauseTime);
+ d->syncAdj = 0;
+ d->clockRunning = false;
+ }*/ else if (/*!GfxClock::isActive()*/ state() != Running) {
+ stop();
+ d->prevTime = 0;
+ d->clockRunning = true;
+ d->syncAdj = 0;
+ start();
+ }
+}
+
+bool operator<(const QPair<int, Update> &lhs,
+ const QPair<int, Update> &rhs)
+{
+ return lhs.first < rhs.first;
+}
+
+int QDeclarativeTimeLinePrivate::advance(int t)
+{
+ int pauseTime = -1;
+
+ // XXX - surely there is a more efficient way?
+ do {
+ pauseTime = -1;
+ // Minimal advance time
+ int advanceTime = t;
+ for (Ops::Iterator iter = ops.begin(); iter != ops.end(); ++iter) {
+ TimeLine &tl = *iter;
+ Op &op = tl.ops.first();
+ int length = op.length - tl.consumedOpLength;
+
+ if (length < advanceTime) {
+ advanceTime = length;
+ if (advanceTime == 0)
+ break;
+ }
+ }
+ t -= advanceTime;
+
+ // Process until then. A zero length advance time will only process
+ // sets.
+ QList<QPair<int, Update> > updates;
+
+ for (Ops::Iterator iter = ops.begin(); iter != ops.end(); ) {
+ QDeclarativeTimeLineValue *v = static_cast<QDeclarativeTimeLineValue *>(iter.key());
+ TimeLine &tl = *iter;
+ Q_ASSERT(!tl.ops.isEmpty());
+
+ do {
+ Op &op = tl.ops.first();
+ if (advanceTime == 0 && op.length != 0)
+ continue;
+
+ if (tl.consumedOpLength == 0 &&
+ op.type != Op::Pause &&
+ op.type != Op::Execute)
+ tl.base = v->value();
+
+ if ((tl.consumedOpLength + advanceTime) == op.length) {
+ if (op.type == Op::Execute) {
+ updates << qMakePair(op.order, Update(op.event));
+ } else {
+ bool changed = false;
+ qreal val = value(op, op.length, tl.base, &changed);
+ if (changed)
+ updates << qMakePair(op.order, Update(v, val));
+ }
+ tl.length -= qMin(advanceTime, tl.length);
+ tl.consumedOpLength = 0;
+ tl.ops.removeFirst();
+ } else {
+ tl.consumedOpLength += advanceTime;
+ bool changed = false;
+ qreal val = value(op, tl.consumedOpLength, tl.base, &changed);
+ if (changed)
+ updates << qMakePair(op.order, Update(v, val));
+ tl.length -= qMin(advanceTime, tl.length);
+ break;
+ }
+
+ } while(!tl.ops.isEmpty() && advanceTime == 0 && tl.ops.first().length == 0);
+
+
+ if (tl.ops.isEmpty()) {
+ iter = ops.erase(iter);
+ v->_t = 0;
+ } else {
+ if (tl.ops.first().type == Op::Pause && pauseTime != 0) {
+ int opPauseTime = tl.ops.first().length - tl.consumedOpLength;
+ if (pauseTime == -1 || opPauseTime < pauseTime)
+ pauseTime = opPauseTime;
+ } else {
+ pauseTime = 0;
+ }
+ ++iter;
+ }
+ }
+
+ length -= qMin(length, advanceTime);
+ syncPoint -= advanceTime;
+
+ qSort(updates.begin(), updates.end());
+ updateQueue = &updates;
+ for (int ii = 0; ii < updates.count(); ++ii) {
+ const Update &v = updates.at(ii).second;
+ if (v.g) {
+ v.g->setValue(v.v);
+ } else {
+ v.e.d0(v.e.d1);
+ }
+ }
+ updateQueue = 0;
+ } while(t);
+
+ return pauseTime;
+}
+
+void QDeclarativeTimeLine::remove(QDeclarativeTimeLineObject *v)
+{
+ QDeclarativeTimeLinePrivate::Ops::Iterator iter = d->ops.find(v);
+ Q_ASSERT(iter != d->ops.end());
+
+ int len = iter->length;
+ d->ops.erase(iter);
+ if (len == d->length) {
+ // We need to recalculate the length
+ d->length = 0;
+ for (QDeclarativeTimeLinePrivate::Ops::Iterator iter = d->ops.begin();
+ iter != d->ops.end();
+ ++iter) {
+
+ if (iter->length > d->length)
+ d->length = iter->length;
+
+ }
+ }
+ if (d->ops.isEmpty()) {
+ stop();
+ d->clockRunning = false;
+ } else if (/*!GfxClock::isActive()*/ state() != Running) {
+ stop();
+ d->prevTime = 0;
+ d->clockRunning = true;
+
+ if (d->syncMode == QDeclarativeTimeLine::LocalSync) {
+ d->syncAdj = -1;
+ } else {
+ d->syncAdj = 0;
+ }
+ start();
+ }
+
+ if (d->updateQueue) {
+ for (int ii = 0; ii < d->updateQueue->count(); ++ii) {
+ if (d->updateQueue->at(ii).second.g == v ||
+ d->updateQueue->at(ii).second.e.callbackObject() == v) {
+ d->updateQueue->removeAt(ii);
+ --ii;
+ }
+ }
+ }
+
+
+}
+
+/*!
+ \internal
+ \class QDeclarativeTimeLineValue
+ \ingroup group_animation
+ \brief The QDeclarativeTimeLineValue class provides a value that can be modified by QDeclarativeTimeLine.
+*/
+
+/*!
+ \fn QDeclarativeTimeLineValue::QDeclarativeTimeLineValue(qreal value = 0)
+
+ Construct a new QDeclarativeTimeLineValue with an initial \a value.
+*/
+
+/*!
+ \fn qreal QDeclarativeTimeLineValue::value() const
+
+ Return the current value.
+*/
+
+/*!
+ \fn void QDeclarativeTimeLineValue::setValue(qreal value)
+
+ Set the current \a value.
+*/
+
+/*!
+ \fn QDeclarativeTimeLine *QDeclarativeTimeLineValue::timeLine() const
+
+ If a QDeclarativeTimeLine is operating on this value, return a pointer to it,
+ otherwise return null.
+*/
+
+
+QDeclarativeTimeLineObject::QDeclarativeTimeLineObject()
+: _t(0)
+{
+}
+
+QDeclarativeTimeLineObject::~QDeclarativeTimeLineObject()
+{
+ if (_t) {
+ _t->remove(this);
+ _t = 0;
+ }
+}
+
+QDeclarativeTimeLineCallback::QDeclarativeTimeLineCallback()
+: d0(0), d1(0), d2(0)
+{
+}
+
+QDeclarativeTimeLineCallback::QDeclarativeTimeLineCallback(QDeclarativeTimeLineObject *b, Callback f, void *d)
+: d0(f), d1(d), d2(b)
+{
+}
+
+QDeclarativeTimeLineCallback::QDeclarativeTimeLineCallback(const QDeclarativeTimeLineCallback &o)
+: d0(o.d0), d1(o.d1), d2(o.d2)
+{
+}
+
+QDeclarativeTimeLineCallback &QDeclarativeTimeLineCallback::operator=(const QDeclarativeTimeLineCallback &o)
+{
+ d0 = o.d0;
+ d1 = o.d1;
+ d2 = o.d2;
+ return *this;
+}
+
+QDeclarativeTimeLineObject *QDeclarativeTimeLineCallback::callbackObject() const
+{
+ return d2;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativetimeline_p_p.h b/src/declarative/util/qdeclarativetimeline_p_p.h
new file mode 100644
index 0000000000..598c897f9f
--- /dev/null
+++ b/src/declarative/util/qdeclarativetimeline_p_p.h
@@ -0,0 +1,200 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVETIMELINE_H
+#define QDECLARATIVETIMELINE_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/QObject>
+#include <QtCore/QAbstractAnimation>
+
+QT_BEGIN_NAMESPACE
+
+class QEasingCurve;
+class QDeclarativeTimeLineValue;
+class QDeclarativeTimeLineCallback;
+struct QDeclarativeTimeLinePrivate;
+class QDeclarativeTimeLineObject;
+class QDeclarativeTimeLine : public QAbstractAnimation
+{
+Q_OBJECT
+public:
+ QDeclarativeTimeLine(QObject *parent = 0);
+ ~QDeclarativeTimeLine();
+
+ enum SyncMode { LocalSync, GlobalSync };
+ SyncMode syncMode() const;
+ void setSyncMode(SyncMode);
+
+ void pause(QDeclarativeTimeLineObject &, int);
+ void callback(const QDeclarativeTimeLineCallback &);
+ void set(QDeclarativeTimeLineValue &, qreal);
+
+ int accel(QDeclarativeTimeLineValue &, qreal velocity, qreal accel);
+ int accel(QDeclarativeTimeLineValue &, qreal velocity, qreal accel, qreal maxDistance);
+ int accelDistance(QDeclarativeTimeLineValue &, qreal velocity, qreal distance);
+
+ void move(QDeclarativeTimeLineValue &, qreal destination, int time = 500);
+ void move(QDeclarativeTimeLineValue &, qreal destination, const QEasingCurve &, int time = 500);
+ void moveBy(QDeclarativeTimeLineValue &, qreal change, int time = 500);
+ void moveBy(QDeclarativeTimeLineValue &, qreal change, const QEasingCurve &, int time = 500);
+
+ void sync();
+ void setSyncPoint(int);
+ int syncPoint() const;
+
+ void sync(QDeclarativeTimeLineValue &);
+ void sync(QDeclarativeTimeLineValue &, QDeclarativeTimeLineValue &);
+
+ void reset(QDeclarativeTimeLineValue &);
+
+ void complete();
+ void clear();
+ bool isActive() const;
+
+ int time() const;
+
+ virtual int duration() const;
+Q_SIGNALS:
+ void updated();
+ void completed();
+
+protected:
+ virtual void updateCurrentTime(int);
+
+private:
+ void remove(QDeclarativeTimeLineObject *);
+ friend class QDeclarativeTimeLineObject;
+ friend struct QDeclarativeTimeLinePrivate;
+ QDeclarativeTimeLinePrivate *d;
+};
+
+class QDeclarativeTimeLineObject
+{
+public:
+ QDeclarativeTimeLineObject();
+ virtual ~QDeclarativeTimeLineObject();
+
+protected:
+ friend class QDeclarativeTimeLine;
+ friend struct QDeclarativeTimeLinePrivate;
+ QDeclarativeTimeLine *_t;
+};
+
+class QDeclarativeTimeLineValue : public QDeclarativeTimeLineObject
+{
+public:
+ QDeclarativeTimeLineValue(qreal v = 0.) : _v(v) {}
+
+ virtual qreal value() const { return _v; }
+ virtual void setValue(qreal v) { _v = v; }
+
+ QDeclarativeTimeLine *timeLine() const { return _t; }
+
+ operator qreal() const { return _v; }
+ QDeclarativeTimeLineValue &operator=(qreal v) { setValue(v); return *this; }
+private:
+ friend class QDeclarativeTimeLine;
+ friend struct QDeclarativeTimeLinePrivate;
+ qreal _v;
+};
+
+class QDeclarativeTimeLineCallback
+{
+public:
+ typedef void (*Callback)(void *);
+
+ QDeclarativeTimeLineCallback();
+ QDeclarativeTimeLineCallback(QDeclarativeTimeLineObject *b, Callback, void * = 0);
+ QDeclarativeTimeLineCallback(const QDeclarativeTimeLineCallback &o);
+
+ QDeclarativeTimeLineCallback &operator=(const QDeclarativeTimeLineCallback &o);
+ QDeclarativeTimeLineObject *callbackObject() const;
+
+private:
+ friend struct QDeclarativeTimeLinePrivate;
+ Callback d0;
+ void *d1;
+ QDeclarativeTimeLineObject *d2;
+};
+
+template<class T>
+class QDeclarativeTimeLineValueProxy : public QDeclarativeTimeLineValue
+{
+public:
+ QDeclarativeTimeLineValueProxy(T *cls, void (T::*func)(qreal), qreal v = 0.)
+ : QDeclarativeTimeLineValue(v), _class(cls), _setFunctionReal(func), _setFunctionInt(0)
+ {
+ Q_ASSERT(_class);
+ }
+
+ QDeclarativeTimeLineValueProxy(T *cls, void (T::*func)(int), qreal v = 0.)
+ : QDeclarativeTimeLineValue(v), _class(cls), _setFunctionReal(0), _setFunctionInt(func)
+ {
+ Q_ASSERT(_class);
+ }
+
+ virtual void setValue(qreal v)
+ {
+ QDeclarativeTimeLineValue::setValue(v);
+ if (_setFunctionReal) (_class->*_setFunctionReal)(v);
+ else if (_setFunctionInt) (_class->*_setFunctionInt)((int)v);
+ }
+
+private:
+ T *_class;
+ void (T::*_setFunctionReal)(qreal);
+ void (T::*_setFunctionInt)(int);
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/declarative/util/qdeclarativetimer.cpp b/src/declarative/util/qdeclarativetimer.cpp
new file mode 100644
index 0000000000..104e3aeebb
--- /dev/null
+++ b/src/declarative/util/qdeclarativetimer.cpp
@@ -0,0 +1,317 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativetimer_p.h"
+
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qpauseanimation.h>
+#include <qdebug.h>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+
+
+class QDeclarativeTimerPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeTimer)
+public:
+ QDeclarativeTimerPrivate()
+ : interval(1000), running(false), repeating(false), triggeredOnStart(false)
+ , classBegun(false), componentComplete(false), firstTick(true) {}
+ int interval;
+ QPauseAnimation pause;
+ bool running : 1;
+ bool repeating : 1;
+ bool triggeredOnStart : 1;
+ bool classBegun : 1;
+ bool componentComplete : 1;
+ bool firstTick : 1;
+};
+
+/*!
+ \qmlclass Timer QDeclarativeTimer
+ \since 4.7
+ \brief The Timer item triggers a handler at a specified interval.
+
+ A timer can be used to trigger an action either once, or repeatedly
+ at a given interval.
+
+ Here is a timer that shows the current date and time, and updates
+ the text every 500 milliseconds:
+
+ \qml
+ Timer {
+ interval: 500; running: true; repeat: true
+ onTriggered: time.text = Date().toString()
+ }
+ Text {
+ id: time
+ }
+ \endqml
+
+ QDeclarativeTimer is synchronized with the animation timer. Since the animation
+ timer is usually set to 60fps, the resolution of QDeclarativeTimer will be
+ at best 16ms.
+
+ If the Timer is running and one of its properties is changed, the
+ elapsed time will be reset. For example, if a Timer with interval of
+ 1000ms has its \e repeat property changed 500ms after starting, the
+ elapsed time will be reset to 0, and the Timer will be triggered
+ 1000ms later.
+*/
+
+QDeclarativeTimer::QDeclarativeTimer(QObject *parent)
+ : QObject(*(new QDeclarativeTimerPrivate), parent)
+{
+ Q_D(QDeclarativeTimer);
+ connect(&d->pause, SIGNAL(currentLoopChanged(int)), this, SLOT(ticked()));
+ connect(&d->pause, SIGNAL(finished()), this, SLOT(finished()));
+ d->pause.setLoopCount(1);
+ d->pause.setDuration(d->interval);
+}
+
+/*!
+ \qmlproperty int Timer::interval
+
+ Sets the \a interval between triggers, in milliseconds.
+
+ The default interval is 1000 milliseconds.
+*/
+void QDeclarativeTimer::setInterval(int interval)
+{
+ Q_D(QDeclarativeTimer);
+ if (interval != d->interval) {
+ d->interval = interval;
+ update();
+ emit intervalChanged();
+ }
+}
+
+int QDeclarativeTimer::interval() const
+{
+ Q_D(const QDeclarativeTimer);
+ return d->interval;
+}
+
+/*!
+ \qmlproperty bool Timer::running
+
+ If set to true, starts the timer; otherwise stops the timer.
+ For a non-repeating timer, \a running is set to false after the
+ timer has been triggered.
+
+ \a running defaults to false.
+
+ \sa repeat
+*/
+bool QDeclarativeTimer::isRunning() const
+{
+ Q_D(const QDeclarativeTimer);
+ return d->running;
+}
+
+void QDeclarativeTimer::setRunning(bool running)
+{
+ Q_D(QDeclarativeTimer);
+ if (d->running != running) {
+ d->running = running;
+ d->firstTick = true;
+ emit runningChanged();
+ update();
+ }
+}
+
+/*!
+ \qmlproperty bool Timer::repeat
+
+ If \a repeat is true the timer is triggered repeatedly at the
+ specified interval; otherwise, the timer will trigger once at the
+ specified interval and then stop (i.e. running will be set to false).
+
+ \a repeat defaults to false.
+
+ \sa running
+*/
+bool QDeclarativeTimer::isRepeating() const
+{
+ Q_D(const QDeclarativeTimer);
+ return d->repeating;
+}
+
+void QDeclarativeTimer::setRepeating(bool repeating)
+{
+ Q_D(QDeclarativeTimer);
+ if (repeating != d->repeating) {
+ d->repeating = repeating;
+ update();
+ emit repeatChanged();
+ }
+}
+
+/*!
+ \qmlproperty bool Timer::triggeredOnStart
+
+ When a timer is started, the first trigger is usually after the specified
+ interval has elapsed. It is sometimes desirable to trigger immediately
+ when the timer is started; for example, to establish an initial
+ state.
+
+ If \a triggeredOnStart is true, the timer is triggered immediately
+ when started, and subsequently at the specified interval. Note that if
+ \e repeat is set to false, the timer is triggered twice; once on start,
+ and again at the interval.
+
+ \a triggeredOnStart defaults to false.
+
+ \sa running
+*/
+bool QDeclarativeTimer::triggeredOnStart() const
+{
+ Q_D(const QDeclarativeTimer);
+ return d->triggeredOnStart;
+}
+
+void QDeclarativeTimer::setTriggeredOnStart(bool triggeredOnStart)
+{
+ Q_D(QDeclarativeTimer);
+ if (d->triggeredOnStart != triggeredOnStart) {
+ d->triggeredOnStart = triggeredOnStart;
+ update();
+ emit triggeredOnStartChanged();
+ }
+}
+
+/*!
+ \qmlmethod Timer::start()
+ \brief Starts the timer.
+
+ If the timer is already running, calling this method has no effect. The
+ \c running property will be true following a call to \c start().
+*/
+void QDeclarativeTimer::start()
+{
+ setRunning(true);
+}
+
+/*!
+ \qmlmethod Timer::stop()
+ \brief Stops the timer.
+
+ If the timer is not running, calling this method has no effect. The
+ \c running property will be false following a call to \c stop().
+*/
+void QDeclarativeTimer::stop()
+{
+ setRunning(false);
+}
+
+/*!
+ \qmlmethod Timer::restart()
+ \brief Restarts the timer.
+
+ If the Timer is not running it will be started, otherwise it will be
+ stopped, reset to initial state and started. The \c running property
+ will be true following a call to \c restart().
+*/
+void QDeclarativeTimer::restart()
+{
+ setRunning(false);
+ setRunning(true);
+}
+
+void QDeclarativeTimer::update()
+{
+ Q_D(QDeclarativeTimer);
+ if (d->classBegun && !d->componentComplete)
+ return;
+ d->pause.stop();
+ if (d->running) {
+ d->pause.setCurrentTime(0);
+ d->pause.setLoopCount(d->repeating ? -1 : 1);
+ d->pause.setDuration(d->interval);
+ d->pause.start();
+ if (d->triggeredOnStart && d->firstTick) {
+ QCoreApplication::removePostedEvents(this, QEvent::MetaCall);
+ QMetaObject::invokeMethod(this, "ticked", Qt::QueuedConnection);
+ }
+ }
+}
+
+void QDeclarativeTimer::classBegin()
+{
+ Q_D(QDeclarativeTimer);
+ d->classBegun = true;
+}
+
+void QDeclarativeTimer::componentComplete()
+{
+ Q_D(QDeclarativeTimer);
+ d->componentComplete = true;
+ update();
+}
+
+/*!
+ \qmlsignal Timer::onTriggered()
+
+ This handler is called when the Timer is triggered.
+*/
+void QDeclarativeTimer::ticked()
+{
+ Q_D(QDeclarativeTimer);
+ if (d->running && (d->pause.currentTime() > 0 || (d->triggeredOnStart && d->firstTick)))
+ emit triggered();
+ d->firstTick = false;
+}
+
+void QDeclarativeTimer::finished()
+{
+ Q_D(QDeclarativeTimer);
+ if (d->repeating || !d->running)
+ return;
+ emit triggered();
+ d->running = false;
+ d->firstTick = false;
+ emit runningChanged();
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativetimer_p.h b/src/declarative/util/qdeclarativetimer_p.h
new file mode 100644
index 0000000000..d1e6630680
--- /dev/null
+++ b/src/declarative/util/qdeclarativetimer_p.h
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVETIMER_H
+#define QDECLARATIVETIMER_H
+
+#include <qdeclarative.h>
+
+#include <QtCore/qobject.h>
+#include <QtCore/qabstractanimation.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeTimerPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeTimer : public QObject, public QDeclarativeParserStatus
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeTimer)
+ Q_INTERFACES(QDeclarativeParserStatus)
+ Q_PROPERTY(int interval READ interval WRITE setInterval NOTIFY intervalChanged)
+ Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged)
+ Q_PROPERTY(bool repeat READ isRepeating WRITE setRepeating NOTIFY repeatChanged)
+ Q_PROPERTY(bool triggeredOnStart READ triggeredOnStart WRITE setTriggeredOnStart NOTIFY triggeredOnStartChanged)
+
+public:
+ QDeclarativeTimer(QObject *parent=0);
+
+ void setInterval(int interval);
+ int interval() const;
+
+ bool isRunning() const;
+ void setRunning(bool running);
+
+ bool isRepeating() const;
+ void setRepeating(bool repeating);
+
+ bool triggeredOnStart() const;
+ void setTriggeredOnStart(bool triggeredOnStart);
+
+protected:
+ void classBegin();
+ void componentComplete();
+
+public Q_SLOTS:
+ void start();
+ void stop();
+ void restart();
+
+Q_SIGNALS:
+ void triggered();
+ void runningChanged();
+ void intervalChanged();
+ void repeatChanged();
+ void triggeredOnStartChanged();
+
+private:
+ void update();
+
+private Q_SLOTS:
+ void ticked();
+ void finished();
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeTimer)
+
+QT_END_HEADER
+
+#endif
diff --git a/src/declarative/util/qdeclarativetransition.cpp b/src/declarative/util/qdeclarativetransition.cpp
new file mode 100644
index 0000000000..ac07b10c1e
--- /dev/null
+++ b/src/declarative/util/qdeclarativetransition.cpp
@@ -0,0 +1,249 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativestate_p.h"
+#include "qdeclarativestategroup_p.h"
+#include "qdeclarativestate_p_p.h"
+#include "qdeclarativestateoperations_p.h"
+#include "qdeclarativeanimation_p.h"
+#include "qdeclarativeanimation_p_p.h"
+#include "qdeclarativetransitionmanager_p_p.h"
+
+#include <QParallelAnimationGroup>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \qmlclass Transition QDeclarativeTransition
+ \since 4.7
+ \brief The Transition element defines animated transitions that occur on state changes.
+
+ \sa {qmlstates}{States}, {state-transitions}{Transitions}
+*/
+
+/*!
+ \internal
+ \class QDeclarativeTransition
+ \brief The QDeclarativeTransition class allows you to define animated transitions that occur on state changes.
+
+ \ingroup group_states
+*/
+
+//ParallelAnimationWrapperallows us to do a "callback" when the animation finishes, rather than connecting
+//and disconnecting signals and slots frequently
+class ParallelAnimationWrapper : public QParallelAnimationGroup
+{
+ Q_OBJECT
+public:
+ ParallelAnimationWrapper(QObject *parent = 0) : QParallelAnimationGroup(parent) {}
+ QDeclarativeTransitionPrivate *trans;
+protected:
+ virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
+};
+
+class QDeclarativeTransitionPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeTransition)
+public:
+ QDeclarativeTransitionPrivate()
+ : fromState(QLatin1String("*")), toState(QLatin1String("*")),
+ reversed(false), reversible(false), endState(0)
+ {
+ group.trans = this;
+ }
+
+ QString fromState;
+ QString toState;
+ bool reversed;
+ bool reversible;
+ ParallelAnimationWrapper group;
+ QDeclarativeTransitionManager *endState;
+
+ void complete()
+ {
+ endState->complete();
+ }
+ static void append_animation(QDeclarativeListProperty<QDeclarativeAbstractAnimation> *list, QDeclarativeAbstractAnimation *a);
+ QList<QDeclarativeAbstractAnimation *> animations;
+};
+
+void QDeclarativeTransitionPrivate::append_animation(QDeclarativeListProperty<QDeclarativeAbstractAnimation> *list, QDeclarativeAbstractAnimation *a)
+{
+ QDeclarativeTransition *q = static_cast<QDeclarativeTransition *>(list->object);
+ q->d_func()->animations.append(a);
+ q->d_func()->group.addAnimation(a->qtAnimation());
+ a->setDisableUserControl();
+}
+
+void ParallelAnimationWrapper::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
+{
+ QParallelAnimationGroup::updateState(newState, oldState);
+ if (newState == Stopped &&
+ ((direction() == QAbstractAnimation::Forward && currentLoopTime() == duration()) ||
+ (direction() == QAbstractAnimation::Backward && currentLoopTime() == 0)))
+ {
+ trans->complete();
+ }
+}
+
+
+
+QDeclarativeTransition::QDeclarativeTransition(QObject *parent)
+ : QObject(*(new QDeclarativeTransitionPrivate), parent)
+{
+}
+
+QDeclarativeTransition::~QDeclarativeTransition()
+{
+}
+
+void QDeclarativeTransition::stop()
+{
+ Q_D(QDeclarativeTransition);
+ d->group.stop();
+}
+
+void QDeclarativeTransition::setReversed(bool r)
+{
+ Q_D(QDeclarativeTransition);
+ d->reversed = r;
+}
+
+void QDeclarativeTransition::prepare(QDeclarativeStateOperation::ActionList &actions,
+ QList<QDeclarativeProperty> &after,
+ QDeclarativeTransitionManager *endState)
+{
+ Q_D(QDeclarativeTransition);
+
+ qmlExecuteDeferred(this);
+
+ if (d->reversed) {
+ for (int ii = d->animations.count() - 1; ii >= 0; --ii) {
+ d->animations.at(ii)->transition(actions, after, QDeclarativeAbstractAnimation::Backward);
+ }
+ } else {
+ for (int ii = 0; ii < d->animations.count(); ++ii) {
+ d->animations.at(ii)->transition(actions, after, QDeclarativeAbstractAnimation::Forward);
+ }
+ }
+
+ d->endState = endState;
+ d->group.setDirection(d->reversed ? QAbstractAnimation::Backward : QAbstractAnimation::Forward);
+ d->group.start();
+}
+
+/*!
+ \qmlproperty string Transition::from
+ \qmlproperty string Transition::to
+ These properties are selectors indicating which state changes should trigger the transition.
+
+ from is used in conjunction with to to determine when a transition should
+ be applied. By default from and to are both "*" (any state). In the following example,
+ the transition is applied when changing from state1 to state2.
+ \code
+ Transition {
+ from: "state1"
+ to: "state2"
+ ...
+ }
+ \endcode
+*/
+QString QDeclarativeTransition::fromState() const
+{
+ Q_D(const QDeclarativeTransition);
+ return d->fromState;
+}
+
+void QDeclarativeTransition::setFromState(const QString &f)
+{
+ Q_D(QDeclarativeTransition);
+ d->fromState = f;
+}
+
+/*!
+ \qmlproperty bool Transition::reversible
+ This property holds whether the transition should be automatically reversed when the conditions that triggered this transition are reversed.
+
+ The default value is false.
+*/
+bool QDeclarativeTransition::reversible() const
+{
+ Q_D(const QDeclarativeTransition);
+ return d->reversible;
+}
+
+void QDeclarativeTransition::setReversible(bool r)
+{
+ Q_D(QDeclarativeTransition);
+ d->reversible = r;
+}
+
+QString QDeclarativeTransition::toState() const
+{
+ Q_D(const QDeclarativeTransition);
+ return d->toState;
+}
+
+void QDeclarativeTransition::setToState(const QString &t)
+{
+ Q_D(QDeclarativeTransition);
+ d->toState = t;
+}
+
+/*!
+ \qmlproperty list<Animation> Transition::animations
+ \default
+ This property holds a list of the animations to be run for this transition.
+
+ The top-level animations are run in parallel. To run them sequentially,
+ you can create a single SequentialAnimation which contains all the animations,
+ and assign that to animations the animations property.
+ \default
+*/
+QDeclarativeListProperty<QDeclarativeAbstractAnimation> QDeclarativeTransition::animations()
+{
+ Q_D(QDeclarativeTransition);
+ return QDeclarativeListProperty<QDeclarativeAbstractAnimation>(this, &d->animations, QDeclarativeTransitionPrivate::append_animation);
+}
+
+QT_END_NAMESPACE
+
+#include <qdeclarativetransition.moc>
diff --git a/src/declarative/util/qdeclarativetransition_p.h b/src/declarative/util/qdeclarativetransition_p.h
new file mode 100644
index 0000000000..861111a225
--- /dev/null
+++ b/src/declarative/util/qdeclarativetransition_p.h
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVETRANSITION_H
+#define QDECLARATIVETRANSITION_H
+
+#include "qdeclarativestate_p.h"
+
+#include <qdeclarative.h>
+
+#include <QtCore/qobject.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeAbstractAnimation;
+class QDeclarativeTransitionPrivate;
+class QDeclarativeTransitionManager;
+class Q_DECLARATIVE_EXPORT QDeclarativeTransition : public QObject
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QDeclarativeTransition)
+
+ Q_PROPERTY(QString from READ fromState WRITE setFromState)
+ Q_PROPERTY(QString to READ toState WRITE setToState)
+ Q_PROPERTY(bool reversible READ reversible WRITE setReversible)
+ Q_PROPERTY(QDeclarativeListProperty<QDeclarativeAbstractAnimation> animations READ animations)
+ Q_CLASSINFO("DefaultProperty", "animations")
+ Q_CLASSINFO("DeferredPropertyNames", "animations")
+
+public:
+ QDeclarativeTransition(QObject *parent=0);
+ ~QDeclarativeTransition();
+
+ QString fromState() const;
+ void setFromState(const QString &);
+
+ QString toState() const;
+ void setToState(const QString &);
+
+ bool reversible() const;
+ void setReversible(bool);
+
+ QDeclarativeListProperty<QDeclarativeAbstractAnimation> animations();
+
+ void prepare(QDeclarativeStateOperation::ActionList &actions,
+ QList<QDeclarativeProperty> &after,
+ QDeclarativeTransitionManager *end);
+
+ void setReversed(bool r);
+ void stop();
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeTransition)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVETRANSITION_H
diff --git a/src/declarative/util/qdeclarativetransitionmanager.cpp b/src/declarative/util/qdeclarativetransitionmanager.cpp
new file mode 100644
index 0000000000..e1143fa65c
--- /dev/null
+++ b/src/declarative/util/qdeclarativetransitionmanager.cpp
@@ -0,0 +1,283 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativetransitionmanager_p_p.h"
+
+#include "qdeclarativestate_p_p.h"
+
+#include <qdeclarativebinding_p.h>
+#include <qdeclarativeglobal_p.h>
+#include <qdeclarativeproperty_p.h>
+
+QT_BEGIN_NAMESPACE
+
+DEFINE_BOOL_CONFIG_OPTION(stateChangeDebug, STATECHANGE_DEBUG);
+
+class QDeclarativeTransitionManagerPrivate
+{
+public:
+ QDeclarativeTransitionManagerPrivate()
+ : state(0), transition(0) {}
+
+ void applyBindings();
+ typedef QList<QDeclarativeSimpleAction> SimpleActionList;
+ QDeclarativeState *state;
+ QDeclarativeTransition *transition;
+ QDeclarativeStateOperation::ActionList bindingsList;
+ SimpleActionList completeList;
+};
+
+QDeclarativeTransitionManager::QDeclarativeTransitionManager()
+: d(new QDeclarativeTransitionManagerPrivate)
+{
+}
+
+void QDeclarativeTransitionManager::setState(QDeclarativeState *s)
+{
+ d->state = s;
+}
+
+QDeclarativeTransitionManager::~QDeclarativeTransitionManager()
+{
+ delete d; d = 0;
+}
+
+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);
+ }
+
+ d->completeList.clear();
+
+ if (d->state)
+ static_cast<QDeclarativeStatePrivate*>(QObjectPrivate::get(d->state))->complete();
+}
+
+void QDeclarativeTransitionManagerPrivate::applyBindings()
+{
+ foreach(const QDeclarativeAction &action, bindingsList) {
+ if (action.toBinding) {
+ QDeclarativePropertyPrivate::setBinding(action.property, action.toBinding);
+ } else if (action.event) {
+ if (action.reverseEvent)
+ action.event->reverse();
+ else
+ action.event->execute();
+ }
+
+ }
+
+ bindingsList.clear();
+}
+
+void QDeclarativeTransitionManager::transition(const QList<QDeclarativeAction> &list,
+ QDeclarativeTransition *transition)
+{
+ cancel();
+
+ QDeclarativeStateOperation::ActionList applyList = list;
+ // Determine which actions are binding changes.
+ foreach(const QDeclarativeAction &action, applyList) {
+ if (action.toBinding)
+ d->bindingsList << action;
+ if (action.fromBinding)
+ QDeclarativePropertyPrivate::setBinding(action.property, 0); // Disable current binding
+ if (action.event && action.event->changesBindings()) { //### assume isReversable()?
+ d->bindingsList << action;
+ if (action.reverseEvent)
+ action.event->clearReverseBindings();
+ else
+ action.event->clearForwardBindings();
+ }
+ }
+
+ // Animated transitions need both the start and the end value for
+ // each property change. In the presence of bindings, the end values
+ // are non-trivial to calculate. As a "best effort" attempt, we first
+ // apply all the property and binding changes, then read all the actual
+ // final values, then roll back the changes and proceed as normal.
+ //
+ // This doesn't catch everything, and it might be a little fragile in
+ // some cases - but whatcha going to do?
+
+ if (!d->bindingsList.isEmpty()) {
+
+ //### do extra actions here?
+
+ // Apply all the property and binding changes
+ for (int ii = 0; ii < applyList.size(); ++ii) {
+ const QDeclarativeAction &action = applyList.at(ii);
+ if (action.toBinding) {
+ QDeclarativePropertyPrivate::setBinding(action.property, action.toBinding, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
+ } else if (!action.event) {
+ QDeclarativePropertyPrivate::write(action.property, action.toValue, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
+ } else if (action.event->isReversable()) {
+ if (action.reverseEvent)
+ action.event->reverse();
+ else
+ action.event->execute();
+ applyList << action.event->extraActions();
+ }
+ }
+
+ // Read all the end values for binding changes
+ for (int ii = 0; ii < applyList.size(); ++ii) {
+ QDeclarativeAction *action = &applyList[ii];
+ if (action->event)
+ continue;
+ const QDeclarativeProperty &prop = action->property;
+ if (action->toBinding || !action->toValue.isValid()) { //### is this always right (used for exta actions)
+ action->toValue = prop.read();
+ }
+ }
+
+ // Revert back to the original values
+ foreach(const QDeclarativeAction &action, applyList) {
+ if (action.event) {
+ if (action.event->isReversable()) {
+ if (action.reverseEvent) { //reverse the reverse
+ action.event->clearForwardBindings();
+ action.event->rewind();
+ action.event->clearReverseBindings();
+ } else {
+ action.event->clearReverseBindings();
+ action.event->rewind();
+ action.event->clearForwardBindings();
+ }
+ }
+ continue;
+ }
+
+ if (action.toBinding)
+ QDeclarativePropertyPrivate::setBinding(action.property, 0); // Make sure this is disabled during the transition
+
+ QDeclarativePropertyPrivate::write(action.property, action.fromValue, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
+ }
+ }
+
+ if (transition) {
+ QList<QDeclarativeProperty> touched;
+ d->transition = transition;
+ d->transition->prepare(applyList, touched, this);
+
+ // Modify the action list to remove actions handled in the transition
+ for (int ii = 0; ii < applyList.count(); ++ii) {
+ const QDeclarativeAction &action = applyList.at(ii);
+
+ if (action.event) {
+
+ if (action.actionDone) {
+ applyList.removeAt(ii);
+ --ii;
+ }
+
+ } else {
+
+ if (touched.contains(action.property)) {
+ if (action.toValue != action.fromValue)
+ d->completeList <<
+ QDeclarativeSimpleAction(action, QDeclarativeSimpleAction::EndState);
+
+ applyList.removeAt(ii);
+ --ii;
+ }
+
+ }
+ }
+ }
+
+ // Any actions remaining have not been handled by the transition and should
+ // be applied immediately. We skip applying bindings, as they are all
+ // applied at the end in applyBindings() to avoid any nastiness mid
+ // transition
+ foreach(const QDeclarativeAction &action, applyList) {
+ if (action.event && !action.event->changesBindings()) {
+ if (action.event->isReversable() && action.reverseEvent)
+ action.event->reverse();
+ else
+ action.event->execute();
+ } else if (!action.event && !action.toBinding) {
+ action.property.write(action.toValue);
+ }
+ }
+ if (stateChangeDebug()) {
+ foreach(const QDeclarativeAction &action, applyList) {
+ if (action.event)
+ qWarning() << " No transition for event:" << action.event->typeName();
+ else
+ qWarning() << " No transition for:" << action.property.object()
+ << action.property.name() << "From:" << action.fromValue
+ << "To:" << action.toValue;
+ }
+ }
+ if (!transition)
+ d->applyBindings();
+}
+
+void QDeclarativeTransitionManager::cancel()
+{
+ if (d->transition) {
+ // ### this could potentially trigger a complete in rare circumstances
+ d->transition->stop();
+ d->transition = 0;
+ }
+
+ for(int i = 0; i < d->bindingsList.count(); ++i) {
+ QDeclarativeAction action = d->bindingsList[i];
+ if (action.toBinding && action.deletableToBinding) {
+ QDeclarativePropertyPrivate::setBinding(action.property, 0);
+ action.toBinding->destroy();
+ action.toBinding = 0;
+ action.deletableToBinding = false;
+ } else if (action.event) {
+ //### what do we do here?
+ }
+
+ }
+ d->bindingsList.clear();
+ d->completeList.clear();
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativetransitionmanager_p_p.h b/src/declarative/util/qdeclarativetransitionmanager_p_p.h
new file mode 100644
index 0000000000..d6e626e6f6
--- /dev/null
+++ b/src/declarative/util/qdeclarativetransitionmanager_p_p.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVETRANSITIONMANAGER_P_H
+#define QDECLARATIVETRANSITIONMANAGER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativestateoperations_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeStatePrivate;
+class QDeclarativeTransitionManagerPrivate;
+class QDeclarativeTransitionManager
+{
+public:
+ QDeclarativeTransitionManager();
+ ~QDeclarativeTransitionManager();
+
+ void transition(const QList<QDeclarativeAction> &, QDeclarativeTransition *transition);
+
+ void cancel();
+
+private:
+ Q_DISABLE_COPY(QDeclarativeTransitionManager);
+ QDeclarativeTransitionManagerPrivate *d;
+
+ void complete();
+ void setState(QDeclarativeState *);
+
+ friend class QDeclarativeState;
+ friend class QDeclarativeTransitionPrivate;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVETRANSITIONMANAGER_P_H
diff --git a/src/declarative/util/qdeclarativeutilmodule.cpp b/src/declarative/util/qdeclarativeutilmodule.cpp
new file mode 100644
index 0000000000..65bfdc1cc6
--- /dev/null
+++ b/src/declarative/util/qdeclarativeutilmodule.cpp
@@ -0,0 +1,118 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeutilmodule_p.h"
+#include "qfxperf_p_p.h"
+#include "qdeclarativeanimation_p.h"
+#include "qdeclarativeanimation_p_p.h"
+#include "qdeclarativebehavior_p.h"
+#include "qdeclarativebind_p.h"
+#include "qdeclarativeconnections_p.h"
+#include "qdeclarativeeasefollow_p.h"
+#include "qdeclarativefontloader_p.h"
+#include "qdeclarativelistaccessor_p.h"
+#include "qdeclarativelistmodel_p.h"
+#include "qdeclarativenullablevalue_p_p.h"
+#include "qdeclarativeopenmetaobject_p.h"
+#include "qdeclarativepackage_p.h"
+#include "qdeclarativepixmapcache_p.h"
+#include "qdeclarativepropertychanges_p.h"
+#include "qdeclarativepropertymap.h"
+#include "qdeclarativespringfollow_p.h"
+#include "qdeclarativestategroup_p.h"
+#include "qdeclarativestateoperations_p.h"
+#include "qdeclarativestate_p.h"
+#include "qdeclarativestate_p_p.h"
+#include "qdeclarativestyledtext_p.h"
+#include "qdeclarativesystempalette_p.h"
+#include "qdeclarativetimeline_p_p.h"
+#include "qdeclarativetimer_p.h"
+#include "qdeclarativetransitionmanager_p_p.h"
+#include "qdeclarativetransition_p.h"
+#include "qdeclarativeview.h"
+#ifndef QT_NO_XMLPATTERNS
+#include "qdeclarativexmllistmodel_p.h"
+#endif
+#include "qperformancelog_p_p.h"
+
+void QDeclarativeUtilModule::defineModule()
+{
+ QML_REGISTER_TYPE(Qt,4,6,AnchorChanges,QDeclarativeAnchorChanges);
+ QML_REGISTER_TYPE(Qt,4,6,Behavior,QDeclarativeBehavior);
+ QML_REGISTER_TYPE(Qt,4,6,Binding,QDeclarativeBind);
+ QML_REGISTER_TYPE(Qt,4,6,ColorAnimation,QDeclarativeColorAnimation);
+ QML_REGISTER_TYPE(Qt,4,6,Connections,QDeclarativeConnections);
+ QML_REGISTER_TYPE(Qt,4,6,EaseFollow,QDeclarativeEaseFollow);;
+ QML_REGISTER_TYPE(Qt,4,6,FontLoader,QDeclarativeFontLoader);
+ QML_REGISTER_TYPE(Qt,4,6,ListElement,QDeclarativeListElement);
+ QML_REGISTER_TYPE(Qt,4,6,NumberAnimation,QDeclarativeNumberAnimation);
+ QML_REGISTER_TYPE(Qt,4,6,Package,QDeclarativePackage);
+ QML_REGISTER_TYPE(Qt,4,6,ParallelAnimation,QDeclarativeParallelAnimation);
+ QML_REGISTER_TYPE(Qt,4,6,ParentAction,QDeclarativeParentAction);
+ QML_REGISTER_TYPE(Qt,4,6,ParentAnimation,QDeclarativeParentAnimation);
+ QML_REGISTER_TYPE(Qt,4,6,ParentChange,QDeclarativeParentChange);
+ QML_REGISTER_TYPE(Qt,4,6,PauseAnimation,QDeclarativePauseAnimation);
+ QML_REGISTER_TYPE(Qt,4,6,PropertyAction,QDeclarativePropertyAction);
+ QML_REGISTER_TYPE(Qt,4,6,PropertyAnimation,QDeclarativePropertyAnimation);
+ QML_REGISTER_TYPE(Qt,4,6,RotationAnimation,QDeclarativeRotationAnimation);
+ QML_REGISTER_TYPE(Qt,4,6,ScriptAction,QDeclarativeScriptAction);
+ QML_REGISTER_TYPE(Qt,4,6,SequentialAnimation,QDeclarativeSequentialAnimation);
+ QML_REGISTER_TYPE(Qt,4,6,SpringFollow,QDeclarativeSpringFollow);
+ QML_REGISTER_TYPE(Qt,4,6,StateChangeScript,QDeclarativeStateChangeScript);
+ QML_REGISTER_TYPE(Qt,4,6,StateGroup,QDeclarativeStateGroup);
+ QML_REGISTER_TYPE(Qt,4,6,State,QDeclarativeState);
+ QML_REGISTER_TYPE(Qt,4,6,SystemPalette,QDeclarativeSystemPalette);
+ QML_REGISTER_TYPE(Qt,4,6,Timer,QDeclarativeTimer);
+ QML_REGISTER_TYPE(Qt,4,6,Transition,QDeclarativeTransition);
+ QML_REGISTER_TYPE(Qt,4,6,Vector3dAnimation,QDeclarativeVector3dAnimation);
+#ifndef QT_NO_XMLPATTERNS
+ QML_REGISTER_TYPE(Qt,4,6,XmlListModel,QDeclarativeXmlListModel);
+ QML_REGISTER_TYPE(Qt,4,6,XmlRole,QDeclarativeXmlListModelRole);
+#endif
+
+ QML_REGISTER_NOCREATE_TYPE(QDeclarativeAnchors);
+ QML_REGISTER_NOCREATE_TYPE(QDeclarativeAbstractAnimation);
+ QML_REGISTER_NOCREATE_TYPE(QDeclarativeStateOperation);
+
+ QML_REGISTER_CUSTOM_TYPE(Qt, 4,6, ListModel, QDeclarativeListModel, QDeclarativeListModelParser);
+ QML_REGISTER_CUSTOM_TYPE(Qt, 4,6, PropertyChanges, QDeclarativePropertyChanges, QDeclarativePropertyChangesParser);
+ QML_REGISTER_CUSTOM_TYPE(Qt, 4,6, Connections, QDeclarativeConnections, QDeclarativeConnectionsParser);
+}
diff --git a/src/declarative/util/qdeclarativeutilmodule_p.h b/src/declarative/util/qdeclarativeutilmodule_p.h
new file mode 100644
index 0000000000..602c8c5a53
--- /dev/null
+++ b/src/declarative/util/qdeclarativeutilmodule_p.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEUTILMODULE_H
+#define QDECLARATIVEUTILMODULE_H
+
+#include <qdeclarative.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeUtilModule
+{
+public:
+ static void defineModule();
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEUTILMODULE_H
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
new file mode 100644
index 0000000000..735a0091b7
--- /dev/null
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -0,0 +1,585 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeview.h"
+
+#include "qperformancelog_p_p.h"
+#include "qfxperf_p_p.h"
+
+#include <qdeclarative.h>
+#include <qdeclarativeitem.h>
+#include <qdeclarativeengine.h>
+#include <qdeclarativecontext.h>
+#include <qdeclarativedebug_p.h>
+#include <qdeclarativedebugservice_p.h>
+#include <qdeclarativeglobal_p.h>
+#include <qdeclarativeguard_p.h>
+
+#include <qscriptvalueiterator.h>
+#include <qdebug.h>
+#include <qtimer.h>
+#include <qevent.h>
+#include <qdir.h>
+#include <qcoreapplication.h>
+#include <qfontdatabase.h>
+#include <qicon.h>
+#include <qurl.h>
+#include <qboxlayout.h>
+#include <qbasictimer.h>
+#include <QtCore/qabstractanimation.h>
+#include <private/qgraphicsview_p.h>
+
+QT_BEGIN_NAMESPACE
+
+DEFINE_BOOL_CONFIG_OPTION(frameRateDebug, QML_SHOW_FRAMERATE)
+
+class QDeclarativeViewDebugServer;
+class FrameBreakAnimation : public QAbstractAnimation
+{
+public:
+ FrameBreakAnimation(QDeclarativeViewDebugServer *s)
+ : QAbstractAnimation((QObject*)s), server(s)
+ {
+ start();
+ }
+
+ virtual int duration() const { return -1; }
+ virtual void updateCurrentTime(int msecs);
+
+private:
+ QDeclarativeViewDebugServer *server;
+};
+
+class QDeclarativeViewDebugServer : public QDeclarativeDebugService
+{
+public:
+ QDeclarativeViewDebugServer(QObject *parent = 0) : QDeclarativeDebugService(QLatin1String("CanvasFrameRate"), parent), breaks(0)
+ {
+ timer.start();
+ new FrameBreakAnimation(this);
+ }
+
+ void addTiming(int pe, int tbf)
+ {
+ if (!isEnabled())
+ return;
+
+ bool isFrameBreak = breaks > 1;
+ breaks = 0;
+ int e = timer.elapsed();
+ QByteArray data;
+ QDataStream ds(&data, QIODevice::WriteOnly);
+ ds << (int)pe << (int)tbf << (int)e
+ << (bool)isFrameBreak;
+ sendMessage(data);
+ }
+
+ void frameBreak() { ++breaks; }
+
+private:
+ QTime timer;
+ int breaks;
+};
+
+Q_GLOBAL_STATIC(QDeclarativeViewDebugServer, qfxViewDebugServer);
+
+void FrameBreakAnimation::updateCurrentTime(int msecs)
+{
+ Q_UNUSED(msecs);
+ server->frameBreak();
+}
+
+class QDeclarativeViewPrivate
+{
+public:
+ QDeclarativeViewPrivate(QDeclarativeView *view)
+ : q(view), root(0), component(0), resizeMode(QDeclarativeView::SizeViewToRootObject) {}
+
+ void execute();
+
+ QDeclarativeView *q;
+
+ QDeclarativeGuard<QGraphicsObject> root;
+ QDeclarativeGuard<QDeclarativeItem> qmlRoot;
+
+ QUrl source;
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent *component;
+ QBasicTimer resizetimer;
+
+ mutable QSize initialSize;
+ QDeclarativeView::ResizeMode resizeMode;
+ QTime frameTimer;
+
+ void init();
+
+ QGraphicsScene scene;
+};
+
+void QDeclarativeViewPrivate::execute()
+{
+ delete root;
+ delete component;
+ component = new QDeclarativeComponent(&engine, source, q);
+
+ if (!component->isLoading()) {
+ q->continueExecute();
+ } else {
+ QObject::connect(component, SIGNAL(statusChanged(QDeclarativeComponent::Status)), q, SLOT(continueExecute()));
+ }
+}
+
+
+/*!
+ \class QDeclarativeView
+ \since 4.7
+ \brief The QDeclarativeView class provides a widget for displaying a Qt Declarative user interface.
+
+ Any QGraphicsObject or QDeclarativeItem
+ created via QML can be placed on a standard QGraphicsScene and viewed with a standard
+ QGraphicsView.
+
+ QDeclarativeView is a QGraphicsView subclass provided as a convenience for displaying QML
+ files, and connecting between QML and C++ Qt objects.
+
+ QDeclarativeView performs the following functions:
+
+ \list
+ \o Manages QDeclarativeComponent loading and object creation.
+ \o Initializes QGraphicsView for optimal performance with QML:
+ \list
+ \o QGraphicsView::setOptimizationFlags(QGraphicsView::DontSavePainterState);
+ \o QGraphicsView::setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
+ \o QGraphicsScene::setItemIndexMethod(QGraphicsScene::NoIndex);
+ \endlist
+ \o Initializes QGraphicsView for QML key handling:
+ \list
+ \o QGraphicsView::viewport()->setFocusPolicy(Qt::NoFocus);
+ \o QGraphicsView::setFocusPolicy(Qt::StrongFocus);
+ \o QGraphicsScene::setStickyFocus(true);
+ \endlist
+ \endlist
+
+ Typical usage:
+ \code
+ ...
+ QDeclarativeView *view = new QDeclarativeView(this);
+ vbox->addWidget(view);
+
+ QUrl url(fileName);
+ view->setSource(url);
+ view->show();
+ \endcode
+
+ To receive errors related to loading and executing QML with QDeclarativeView,
+ you can connect to the statusChanged() signal and monitor for QDeclarativeView::Error.
+ The errors are available via QDeclarativeView::errors().
+*/
+
+
+/*! \fn void QDeclarativeView::sceneResized(QSize size)
+ This signal is emitted when the view is resized to \a size.
+*/
+
+/*! \fn void QDeclarativeView::statusChanged(QDeclarativeView::Status status)
+ This signal is emitted when the component's current \a status changes.
+*/
+
+/*!
+ \fn QDeclarativeView::QDeclarativeView(QWidget *parent)
+
+ Constructs a QDeclarativeView with the given \a parent.
+*/
+QDeclarativeView::QDeclarativeView(QWidget *parent)
+: QGraphicsView(parent), d(new QDeclarativeViewPrivate(this))
+{
+ setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Preferred);
+ d->init();
+}
+
+/*!
+ \fn QDeclarativeView::QDeclarativeView(const QUrl &source, QWidget *parent)
+
+ Constructs a QDeclarativeView with the given QML \a source and \a parent.
+*/
+QDeclarativeView::QDeclarativeView(const QUrl &source, QWidget *parent)
+: QGraphicsView(parent), d(new QDeclarativeViewPrivate(this))
+{
+ setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Preferred);
+ d->init();
+ setSource(source);
+}
+
+void QDeclarativeViewPrivate::init()
+{
+#ifdef Q_ENABLE_PERFORMANCE_LOG
+ {
+ QDeclarativePerfTimer<QDeclarativePerf::FontDatabase> perf;
+ QFontDatabase database;
+ }
+#endif
+
+ q->setScene(&scene);
+
+ q->setOptimizationFlags(QGraphicsView::DontSavePainterState);
+ q->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ q->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ q->setFrameStyle(0);
+
+ // These seem to give the best performance
+ q->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
+ scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+ q->viewport()->setFocusPolicy(Qt::NoFocus);
+ q->setFocusPolicy(Qt::StrongFocus);
+
+ scene.setStickyFocus(true); //### needed for correct focus handling
+}
+
+/*!
+ The destructor clears the view's \l {QGraphicsObject} {items} and
+ deletes the internal representation.
+ */
+QDeclarativeView::~QDeclarativeView()
+{
+ delete d->root;
+}
+
+/*! \property QDeclarativeView::source
+ \brief The URL of the source of the QML component.
+
+ Changing this property causes the QML component to be reloaded.
+ */
+
+/*!
+ Sets the source to the \a url, loads the QML component and instantiates it.
+
+ Calling this methods multiple times with the same url will result
+ in the QML being reloaded.
+ */
+void QDeclarativeView::setSource(const QUrl& url)
+{
+ d->source = url;
+ d->execute();
+}
+
+/*!
+ Returns the source URL, if set.
+
+ \sa setSource()
+ */
+QUrl QDeclarativeView::source() const
+{
+ return d->source;
+}
+
+/*!
+ Returns a pointer to the QDeclarativeEngine used for instantiating
+ QML Components.
+ */
+QDeclarativeEngine* QDeclarativeView::engine()
+{
+ return &d->engine;
+}
+
+/*!
+ This function returns the root of the context hierarchy. Each QML
+ component is instantiated in a QDeclarativeContext. QDeclarativeContext's are
+ essential for passing data to QML components. In QML, contexts are
+ arranged hierarchically and this hierarchy is managed by the
+ QDeclarativeEngine.
+ */
+QDeclarativeContext* QDeclarativeView::rootContext()
+{
+ return d->engine.rootContext();
+}
+
+/*!
+ \enum QDeclarativeView::Status
+
+ Specifies the loading status of the QDeclarativeView.
+
+ \value Null This QDeclarativeView has no source set.
+ \value Ready This QDeclarativeView has loaded and created the QML component.
+ \value Loading This QDeclarativeView is loading network data.
+ \value Error An error has occured. Calling errorDescription() to retrieve a description.
+*/
+
+/*! \enum QDeclarativeView::ResizeMode
+
+ This enum specifies how to resize the view.
+
+ \value SizeViewToRootObject
+ \value SizeRootObjectToView
+*/
+
+/*!
+ \property QDeclarativeView::status
+ The component's current \l{QDeclarativeView::Status} {status}.
+*/
+
+QDeclarativeView::Status QDeclarativeView::status() const
+{
+ if (!d->component)
+ return QDeclarativeView::Null;
+
+ return QDeclarativeView::Status(d->component->status());
+}
+
+/*!
+ Return the list of errors that occured during the last compile or create
+ operation. An empty list is returned if isError() is not set.
+*/
+QList<QDeclarativeError> QDeclarativeView::errors() const
+{
+ if (d->component)
+ return d->component->errors();
+ return QList<QDeclarativeError>();
+}
+
+
+/*!
+ \property QDeclarativeView::resizeMode
+ \brief whether the view should resize the canvas contents
+
+ If this property is set to SizeViewToRootObject (the default), the view
+ resizes with the root item in the QML.
+
+ If this property is set to SizeRootObjectToView, the view will
+ automatically resize the root item.
+
+ Regardless of this property, the sizeHint of the view
+ is the initial size of the root item. Note though that
+ since QML may load dynamically, that size may change.
+*/
+
+void QDeclarativeView::setResizeMode(ResizeMode mode)
+{
+ if (d->resizeMode == mode)
+ return;
+
+ d->resizeMode = mode;
+ if (d->qmlRoot) {
+ if (d->resizeMode == SizeRootObjectToView) {
+ d->qmlRoot->setWidth(width());
+ d->qmlRoot->setHeight(height());
+ } else {
+ d->qmlRoot->setWidth(d->initialSize.width());
+ d->qmlRoot->setHeight(d->initialSize.height());
+ }
+ }
+}
+
+QDeclarativeView::ResizeMode QDeclarativeView::resizeMode() const
+{
+ return d->resizeMode;
+}
+
+/*!
+ \internal
+ */
+void QDeclarativeView::continueExecute()
+{
+
+ disconnect(d->component, SIGNAL(statusChanged(QDeclarativeComponent::Status)), this, SLOT(continueExecute()));
+
+ if (d->component->isError()) {
+ QList<QDeclarativeError> errorList = d->component->errors();
+ foreach (const QDeclarativeError &error, errorList) {
+ qWarning() << error;
+ }
+ emit statusChanged(status());
+ return;
+ }
+
+ QObject *obj = d->component->create();
+
+ if(d->component->isError()) {
+ QList<QDeclarativeError> errorList = d->component->errors();
+ foreach (const QDeclarativeError &error, errorList) {
+ qWarning() << error;
+ }
+ emit statusChanged(status());
+ return;
+ }
+
+ setRootObject(obj);
+ emit statusChanged(status());
+}
+
+
+/*!
+ \internal
+*/
+void QDeclarativeView::setRootObject(QObject *obj)
+{
+ if (QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(obj)) {
+ d->scene.addItem(item);
+
+ QPerformanceLog::displayData();
+ QPerformanceLog::clear();
+ d->root = item;
+ d->qmlRoot = item;
+ connect(item, SIGNAL(widthChanged()), this, SLOT(sizeChanged()));
+ connect(item, SIGNAL(heightChanged()), this, SLOT(sizeChanged()));
+ if (d->initialSize.height() <= 0 && d->qmlRoot->width() > 0)
+ d->initialSize.setWidth(d->qmlRoot->width());
+ if (d->initialSize.height() <= 0 && d->qmlRoot->height() > 0)
+ d->initialSize.setHeight(d->qmlRoot->height());
+ resize(d->initialSize);
+
+ if (d->resizeMode == SizeRootObjectToView) {
+ d->qmlRoot->setWidth(width());
+ d->qmlRoot->setHeight(height());
+ } else {
+ QSize sz(d->qmlRoot->width(),d->qmlRoot->height());
+ emit sceneResized(sz);
+ resize(sz);
+ }
+ updateGeometry();
+ } else if (QGraphicsObject *item = qobject_cast<QGraphicsObject *>(obj)) {
+ d->scene.addItem(item);
+ qWarning() << "QDeclarativeView::resizeMode is not honored for components of type QGraphicsObject";
+ } else if (QWidget *wid = qobject_cast<QWidget *>(obj)) {
+ window()->setAttribute(Qt::WA_OpaquePaintEvent, false);
+ window()->setAttribute(Qt::WA_NoSystemBackground, false);
+ if (!layout()) {
+ setLayout(new QVBoxLayout);
+ layout()->setContentsMargins(0, 0, 0, 0);
+ } else if (layout()->count()) {
+ // Hide the QGraphicsView in GV mode.
+ QLayoutItem *item = layout()->itemAt(0);
+ if (item->widget())
+ item->widget()->hide();
+ }
+ layout()->addWidget(wid);
+ emit sceneResized(wid->size());
+ }
+}
+
+/*!
+ \internal
+ */
+void QDeclarativeView::sizeChanged()
+{
+ // delay, so we catch both width and height changing.
+ d->resizetimer.start(0,this);
+}
+
+/*!
+ \internal
+ If the \l {QTimerEvent} {timer event} \a e is this
+ view's resize timer, sceneResized() is emitted.
+ */
+void QDeclarativeView::timerEvent(QTimerEvent* e)
+{
+ if (!e || e->timerId() == d->resizetimer.timerId()) {
+ if (d->qmlRoot) {
+ QSize sz(d->qmlRoot->width(),d->qmlRoot->height());
+ emit sceneResized(sz);
+ //if (!d->resizable)
+ //resize(sz);
+ }
+ d->resizetimer.stop();
+ updateGeometry();
+ }
+}
+
+/*!
+ \internal
+ The size hint is the size of the root item.
+*/
+QSize QDeclarativeView::sizeHint() const
+{
+ if (d->qmlRoot) {
+ if (d->initialSize.width() <= 0)
+ d->initialSize.setWidth(d->qmlRoot->width());
+ if (d->initialSize.height() <= 0)
+ d->initialSize.setHeight(d->qmlRoot->height());
+ }
+ return d->initialSize;
+}
+
+/*!
+ Returns the view's root \l {QGraphicsObject} {item}.
+ */
+QGraphicsObject *QDeclarativeView::rootObject() const
+{
+ return d->root;
+}
+
+/*!
+ \internal
+ This function handles the \l {QResizeEvent} {resize event}
+ \a e.
+ */
+void QDeclarativeView::resizeEvent(QResizeEvent *e)
+{
+ if (d->resizeMode == SizeRootObjectToView && d->qmlRoot) {
+ d->qmlRoot->setWidth(width());
+ d->qmlRoot->setHeight(height());
+ }
+ if (d->qmlRoot) {
+ setSceneRect(QRectF(0, 0, d->qmlRoot->width(), d->qmlRoot->height()));
+ } else if (d->root) {
+ setSceneRect(d->root->boundingRect());
+ } else {
+ setSceneRect(rect());
+ }
+ QGraphicsView::resizeEvent(e);
+}
+
+/*!
+ \internal
+*/
+void QDeclarativeView::paintEvent(QPaintEvent *event)
+{
+ int time = 0;
+ if (frameRateDebug() || QDeclarativeViewDebugServer::isDebuggingEnabled())
+ time = d->frameTimer.restart();
+ QGraphicsView::paintEvent(event);
+ if (QDeclarativeViewDebugServer::isDebuggingEnabled())
+ qfxViewDebugServer()->addTiming(d->frameTimer.elapsed(), time);
+ if (frameRateDebug())
+ qDebug() << "paintEvent:" << d->frameTimer.elapsed() << "time since last frame:" << time;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativeview.h b/src/declarative/util/qdeclarativeview.h
new file mode 100644
index 0000000000..107f3f916c
--- /dev/null
+++ b/src/declarative/util/qdeclarativeview.h
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEVIEW_H
+#define QDECLARATIVEVIEW_H
+
+#include <QtCore/qdatetime.h>
+#include <QtCore/qurl.h>
+#include <QtGui/qgraphicssceneevent.h>
+#include <QtGui/qgraphicsview.h>
+#include <QtGui/qwidget.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QGraphicsObject;
+class QDeclarativeEngine;
+class QDeclarativeContext;
+class QDeclarativeError;
+
+class QDeclarativeViewPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeView : public QGraphicsView
+{
+ Q_OBJECT
+ Q_PROPERTY(ResizeMode resizeMode READ resizeMode WRITE setResizeMode)
+ Q_PROPERTY(Status status READ status NOTIFY statusChanged)
+ Q_PROPERTY(QUrl source READ source WRITE setSource DESIGNABLE true)
+ Q_ENUMS(ResizeMode Status)
+public:
+ explicit QDeclarativeView(QWidget *parent = 0);
+ QDeclarativeView(const QUrl &source, QWidget *parent = 0);
+ virtual ~QDeclarativeView();
+
+ QUrl source() const;
+ void setSource(const QUrl&);
+
+ QDeclarativeEngine* engine();
+ QDeclarativeContext* rootContext();
+
+ QGraphicsObject *rootObject() const;
+
+ enum ResizeMode { SizeViewToRootObject, SizeRootObjectToView };
+ ResizeMode resizeMode() const;
+ void setResizeMode(ResizeMode);
+
+ enum Status { Null, Ready, Loading, Error };
+ Status status() const;
+
+ QList<QDeclarativeError> errors() const;
+
+ QSize sizeHint() const;
+
+Q_SIGNALS:
+ void sceneResized(QSize size); // ???
+ void statusChanged(QDeclarativeView::Status);
+
+private Q_SLOTS:
+ void continueExecute();
+ void sizeChanged();
+
+protected:
+ virtual void resizeEvent(QResizeEvent *);
+ virtual void paintEvent(QPaintEvent *event);
+ virtual void timerEvent(QTimerEvent*);
+ virtual void setRootObject(QObject *obj);
+
+ friend class QDeclarativeViewPrivate;
+ QDeclarativeViewPrivate *d;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEVIEW_H
diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp
new file mode 100644
index 0000000000..49dbb27792
--- /dev/null
+++ b/src/declarative/util/qdeclarativexmllistmodel.cpp
@@ -0,0 +1,834 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativexmllistmodel_p.h"
+
+#include <qdeclarativecontext.h>
+#include <qdeclarativeengine.h>
+
+#include <QDebug>
+#include <QStringList>
+#include <QApplication>
+#include <QThread>
+#include <QMutex>
+#include <QWaitCondition>
+#include <QXmlQuery>
+#include <QXmlResultItems>
+#include <QXmlNodeModelIndex>
+#include <QBuffer>
+#include <QNetworkRequest>
+#include <QNetworkReply>
+
+#include <private/qobject_p.h>
+
+QT_BEGIN_NAMESPACE
+
+typedef QPair<int, int> QDeclarativeXmlListRange;
+
+/*!
+ \qmlclass XmlRole QDeclarativeXmlListModelRole
+ \since 4.7
+ \brief The XmlRole element allows you to specify a role for an XmlListModel.
+*/
+
+/*!
+ \qmlproperty string XmlRole::name
+ The name for the role. This name is used to access the model data for this role from Qml.
+
+ \qml
+ XmlRole { name: "title"; query: "title/string()" }
+
+ ...
+
+ Component {
+ id: myDelegate
+ Text { text: title }
+ }
+ \endqml
+*/
+
+/*!
+ \qmlproperty string XmlRole::query
+ The relative XPath query for this role. The query should not start with a '/' (i.e. it must be
+ relative).
+
+ \qml
+ XmlRole { name: "title"; query: "title/string()" }
+ \endqml
+*/
+
+/*!
+ \qmlproperty bool XmlRole::isKey
+ Defines whether this is a key role.
+
+ Key roles are used to to determine whether a set of values should
+ be updated or added to the XML list model when XmlListModel::reload()
+ is called.
+
+ \sa XmlListModel
+*/
+
+
+class QDeclarativeXmlQuery : public QThread
+{
+ Q_OBJECT
+public:
+ ~QDeclarativeXmlQuery() {
+ m_mutex.lock();
+ m_quit = true;
+ m_condition.wakeOne();
+ m_mutex.unlock();
+
+ wait();
+ }
+
+ static QDeclarativeXmlQuery *instance() {
+ static QDeclarativeXmlQuery *query = new QDeclarativeXmlQuery;
+ return query;
+ }
+
+ void abort() {
+ QMutexLocker locker(&m_mutex);
+ m_abort = true;
+ }
+
+ int doQuery(QString query, QString namespaces, QByteArray data, QList<QDeclarativeXmlListModelRole *> *roleObjects) {
+ QMutexLocker locker(&m_mutex);
+ m_size = 0;
+ m_data = data;
+ m_query = QLatin1String("doc($src)") + query;
+ m_namespaces = namespaces;
+ m_roleObjects = roleObjects;
+ if (!isRunning()) {
+ m_abort = false;
+ start();
+ } else {
+ m_restart = true;
+ m_condition.wakeOne();
+ }
+ m_queryId++;
+ return m_queryId;
+ }
+
+ QList<QList<QVariant> > modelData() {
+ QMutexLocker locker(&m_mutex);
+ return m_modelData;
+ }
+
+ QList<QDeclarativeXmlListRange> insertedItemRanges() {
+ QMutexLocker locker(&m_mutex);
+ return m_insertedItemRanges;
+ }
+
+ QList<QDeclarativeXmlListRange> removedItemRanges() {
+ QMutexLocker locker(&m_mutex);
+ return m_removedItemRanges;
+ }
+
+private:
+ QDeclarativeXmlQuery(QObject *parent=0)
+ : QThread(parent), m_quit(false), m_restart(false), m_abort(false), m_queryId(0) {
+ }
+
+Q_SIGNALS:
+ void queryCompleted(int queryId, int size);
+
+protected:
+ void run() {
+ while (!m_quit) {
+ m_mutex.lock();
+ int queryId = m_queryId;
+ doQueryJob();
+ doSubQueryJob();
+ m_data.clear(); // no longer needed
+ m_mutex.unlock();
+
+ m_mutex.lock();
+ if (!m_abort)
+ emit queryCompleted(queryId, m_size);
+ if (!m_restart)
+ m_condition.wait(&m_mutex);
+ m_abort = false;
+ m_restart = false;
+ m_mutex.unlock();
+ }
+ }
+
+private:
+ void doQueryJob();
+ void doSubQueryJob();
+ void getValuesOfKeyRoles(QStringList *values, QXmlQuery *query) const;
+ void addIndexToRangeList(QList<QDeclarativeXmlListRange> *ranges, int index) const;
+
+private:
+ QMutex m_mutex;
+ QWaitCondition m_condition;
+ bool m_quit;
+ bool m_restart;
+ bool m_abort;
+ QByteArray m_data;
+ QString m_query;
+ QString m_namespaces;
+ QString m_prefix;
+ int m_size;
+ int m_queryId;
+ const QList<QDeclarativeXmlListModelRole *> *m_roleObjects;
+ QList<QList<QVariant> > m_modelData;
+ QStringList m_keysValues;
+ QList<QDeclarativeXmlListRange> m_insertedItemRanges;
+ QList<QDeclarativeXmlListRange> m_removedItemRanges;
+};
+
+//Q_GLOBAL_STATIC(QDeclarativeXmlQuery, QDeclarativeXmlQuery::instance());
+
+void QDeclarativeXmlQuery::doQueryJob()
+{
+ QString r;
+ QXmlQuery query;
+ QBuffer buffer(&m_data);
+ buffer.open(QIODevice::ReadOnly);
+ query.bindVariable(QLatin1String("src"), &buffer);
+ query.setQuery(m_namespaces + m_query);
+ query.evaluateTo(&r);
+
+ //qDebug() << r;
+
+ //always need a single root element
+ QByteArray xml = "<dummy:items xmlns:dummy=\"http://qtsotware.com/dummy\">\n" + r.toUtf8() + "</dummy:items>";
+ QBuffer b(&xml);
+ b.open(QIODevice::ReadOnly);
+ //qDebug() << xml;
+
+ QString namespaces = QLatin1String("declare namespace dummy=\"http://qtsotware.com/dummy\";\n") + m_namespaces;
+ QString prefix = QLatin1String("doc($inputDocument)/dummy:items") +
+ m_query.mid(m_query.lastIndexOf(QLatin1Char('/')));
+
+ //figure out how many items we are dealing with
+ int count = -1;
+ {
+ QXmlResultItems result;
+ QXmlQuery countquery;
+ countquery.bindVariable(QLatin1String("inputDocument"), &b);
+ countquery.setQuery(namespaces + QLatin1String("count(") + prefix + QLatin1Char(')'));
+ countquery.evaluateTo(&result);
+ QXmlItem item(result.next());
+ if (item.isAtomicValue())
+ count = item.toAtomicValue().toInt();
+ }
+ //qDebug() << count;
+
+ m_prefix = namespaces + prefix + QLatin1Char('/');
+ m_data = xml;
+ if (count > 0)
+ m_size = count;
+}
+
+void QDeclarativeXmlQuery::getValuesOfKeyRoles(QStringList *values, QXmlQuery *query) const
+{
+ QStringList keysQueries;
+ for (int i=0; i<m_roleObjects->count(); i++) {
+ if (m_roleObjects->at(i)->isKey())
+ keysQueries << m_roleObjects->at(i)->query();
+ }
+ QString keysQuery;
+ if (keysQueries.count() == 1)
+ keysQuery = m_prefix + keysQueries[0];
+ else if (keysQueries.count() > 1)
+ keysQuery = m_prefix + QLatin1String("concat(") + keysQueries.join(QLatin1String(",")) + QLatin1String(")");
+
+ if (!keysQuery.isEmpty()) {
+ query->setQuery(keysQuery);
+ QXmlResultItems resultItems;
+ query->evaluateTo(&resultItems);
+ QXmlItem item(resultItems.next());
+ while (!item.isNull()) {
+ values->append(item.toAtomicValue().toString());
+ item = resultItems.next();
+ }
+ }
+}
+
+void QDeclarativeXmlQuery::addIndexToRangeList(QList<QDeclarativeXmlListRange> *ranges, int index) const {
+ if (ranges->isEmpty())
+ ranges->append(qMakePair(index, 1));
+ else if (ranges->last().first + ranges->last().second == index)
+ ranges->last().second += 1;
+ else
+ ranges->append(qMakePair(index, 1));
+}
+
+void QDeclarativeXmlQuery::doSubQueryJob()
+{
+ m_modelData.clear();
+
+ QBuffer b(&m_data);
+ b.open(QIODevice::ReadOnly);
+
+ QXmlQuery subquery;
+ subquery.bindVariable(QLatin1String("inputDocument"), &b);
+
+ QStringList keysValues;
+ getValuesOfKeyRoles(&keysValues, &subquery);
+
+ // See if any values of key roles have been inserted or removed.
+ m_insertedItemRanges.clear();
+ m_removedItemRanges.clear();
+ if (m_keysValues.isEmpty()) {
+ m_insertedItemRanges << qMakePair(0, m_size);
+ } else {
+ if (keysValues != m_keysValues) {
+ QStringList temp;
+ for (int i=0; i<m_keysValues.count(); i++) {
+ if (!keysValues.contains(m_keysValues[i]))
+ addIndexToRangeList(&m_removedItemRanges, i);
+ else
+ temp << m_keysValues[i];
+ }
+
+ for (int i=0; i<keysValues.count(); i++) {
+ if (temp.count() == i || keysValues[i] != temp[i]) {
+ temp.insert(i, keysValues[i]);
+ addIndexToRangeList(&m_insertedItemRanges, i);
+ }
+ }
+ }
+ }
+ m_keysValues = keysValues;
+
+ // Get the new values for each role.
+ //### we might be able to condense even further (query for everything in one go)
+ for (int i = 0; i < m_roleObjects->size(); ++i) {
+ QDeclarativeXmlListModelRole *role = m_roleObjects->at(i);
+ if (!role->isValid()) {
+ QList<QVariant> resultList;
+ for (int j = 0; j < m_size; ++j)
+ resultList << QVariant();
+ m_modelData << resultList;
+ continue;
+ }
+ subquery.setQuery(m_prefix + QLatin1String("(let $v := ") + role->query() + QLatin1String(" return if ($v) then ") + role->query() + QLatin1String(" else \"\")"));
+ QXmlResultItems resultItems;
+ subquery.evaluateTo(&resultItems);
+ QXmlItem item(resultItems.next());
+ QList<QVariant> resultList;
+ while (!item.isNull()) {
+ resultList << item.toAtomicValue(); //### we used to trim strings
+ item = resultItems.next();
+ }
+ //### should warn here if things have gone wrong.
+ while (resultList.count() < m_size)
+ resultList << QVariant();
+ m_modelData << resultList;
+ b.seek(0);
+ }
+
+ //this method is much slower, but works better for incremental loading
+ /*for (int j = 0; j < m_size; ++j) {
+ QList<QVariant> resultList;
+ for (int i = 0; i < m_roleObjects->size(); ++i) {
+ QDeclarativeXmlListModelRole *role = m_roleObjects->at(i);
+ subquery.setQuery(m_prefix.arg(j+1) + role->query());
+ if (role->isStringList()) {
+ QStringList data;
+ subquery.evaluateTo(&data);
+ resultList << QVariant(data);
+ //qDebug() << data;
+ } else {
+ QString s;
+ subquery.evaluateTo(&s);
+ if (role->isCData()) {
+ //un-escape
+ s.replace(QLatin1String("&lt;"), QLatin1String("<"));
+ s.replace(QLatin1String("&gt;"), QLatin1String(">"));
+ s.replace(QLatin1String("&amp;"), QLatin1String("&"));
+ }
+ resultList << s.trimmed();
+ //qDebug() << s;
+ }
+ b.seek(0);
+ }
+ m_modelData << resultList;
+ }*/
+}
+
+class QDeclarativeXmlListModelPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeXmlListModel)
+public:
+ QDeclarativeXmlListModelPrivate()
+ : isComponentComplete(true), size(-1), highestRole(Qt::UserRole)
+ , reply(0), status(QDeclarativeXmlListModel::Null), progress(0.0)
+ , queryId(-1), roleObjects() {}
+
+ bool isComponentComplete;
+ QUrl src;
+ QString xml;
+ QString query;
+ QString namespaces;
+ int size;
+ QList<int> roles;
+ QStringList roleNames;
+ int highestRole;
+ QNetworkReply *reply;
+ QDeclarativeXmlListModel::Status status;
+ qreal progress;
+ int queryId;
+ QList<QDeclarativeXmlListModelRole *> roleObjects;
+ static void append_role(QDeclarativeListProperty<QDeclarativeXmlListModelRole> *list, QDeclarativeXmlListModelRole *role);
+ static void clear_role(QDeclarativeListProperty<QDeclarativeXmlListModelRole> *list);
+ static void removeAt_role(QDeclarativeListProperty<QDeclarativeXmlListModelRole> *list, int i);
+ static void insert_role(QDeclarativeListProperty<QDeclarativeXmlListModelRole> *list, int i, QDeclarativeXmlListModelRole *role);
+ QList<QList<QVariant> > data;
+};
+
+
+void QDeclarativeXmlListModelPrivate::append_role(QDeclarativeListProperty<QDeclarativeXmlListModelRole> *list, QDeclarativeXmlListModelRole *role)
+{
+ QDeclarativeXmlListModel *_this = qobject_cast<QDeclarativeXmlListModel *>(list->object);
+ if (_this) {
+ int i = _this->d_func()->roleObjects.count();
+ _this->d_func()->roleObjects.append(role);
+ if (_this->d_func()->roleNames.contains(role->name())) {
+ qmlInfo(role) << QObject::tr("\"%1\" duplicates a previous role name and will be disabled.").arg(role->name());
+ return;
+ }
+ _this->d_func()->roles.insert(i, _this->d_func()->highestRole);
+ _this->d_func()->roleNames.insert(i, role->name());
+ ++_this->d_func()->highestRole;
+ }
+}
+
+//### clear needs to invalidate any cached data (in data table) as well
+// (and the model should emit the appropriate signals)
+void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDeclarativeXmlListModelRole> *list)
+{
+ QDeclarativeXmlListModel *_this = static_cast<QDeclarativeXmlListModel *>(list->object);
+ _this->d_func()->roles.clear();
+ _this->d_func()->roleNames.clear();
+ _this->d_func()->roleObjects.clear();
+}
+
+/*!
+ \class QDeclarativeXmlListModel
+ \internal
+*/
+
+/*!
+ \qmlclass XmlListModel QDeclarativeXmlListModel
+ \since 4.7
+ \brief The XmlListModel element is used to specify a model using XPath expressions.
+
+ XmlListModel is used to create a model from XML data that can be used as a data source
+ for the view classes (such as ListView, PathView, GridView) and other classes that interact with model
+ data (such as Repeater).
+
+ Here is an example of a model containing news from a Yahoo RSS feed:
+ \qml
+ XmlListModel {
+ id: feedModel
+ source: "http://rss.news.yahoo.com/rss/oceania"
+ query: "/rss/channel/item"
+ XmlRole { name: "title"; query: "title/string()" }
+ XmlRole { name: "pubDate"; query: "pubDate/string()" }
+ XmlRole { name: "description"; query: "description/string()" }
+ }
+ \endqml
+
+ You can also define certain roles as "keys" so that the model only adds data
+ that contains new values for these keys when reload() is called.
+
+ For example, if the roles above were defined like this:
+
+ \qml
+ XmlRole { name: "title"; query: "title/string()"; isKey: true }
+ XmlRole { name: "pubDate"; query: "pubDate/string()"; isKey: true }
+ \endqml
+
+ Then when reload() is called, the model will only add new items with a
+ "title" and "pubDate" value combination that is not already present in
+ the model.
+
+ This is useful to provide incremental updates and avoid repainting an
+ entire model in a view.
+*/
+
+QDeclarativeXmlListModel::QDeclarativeXmlListModel(QObject *parent)
+ : QListModelInterface(*(new QDeclarativeXmlListModelPrivate), parent)
+{
+ connect(QDeclarativeXmlQuery::instance(), SIGNAL(queryCompleted(int,int)),
+ this, SLOT(queryCompleted(int,int)));
+}
+
+QDeclarativeXmlListModel::~QDeclarativeXmlListModel()
+{
+}
+
+/*!
+ \qmlproperty list<XmlRole> XmlListModel::roles
+
+ The roles to make available for this model.
+*/
+QDeclarativeListProperty<QDeclarativeXmlListModelRole> QDeclarativeXmlListModel::roleObjects()
+{
+ Q_D(QDeclarativeXmlListModel);
+ QDeclarativeListProperty<QDeclarativeXmlListModelRole> list(this, d->roleObjects);
+ list.append = &QDeclarativeXmlListModelPrivate::append_role;
+ list.clear = &QDeclarativeXmlListModelPrivate::clear_role;
+ return list;
+}
+
+QHash<int,QVariant> QDeclarativeXmlListModel::data(int index, const QList<int> &roles) const
+{
+ Q_D(const QDeclarativeXmlListModel);
+ QHash<int, QVariant> rv;
+ for (int i = 0; i < roles.size(); ++i) {
+ int role = roles.at(i);
+ int roleIndex = d->roles.indexOf(role);
+ rv.insert(role, roleIndex == -1 ? QVariant() : d->data.at(roleIndex).at(index));
+ }
+ return rv;
+}
+
+QVariant QDeclarativeXmlListModel::data(int index, int role) const
+{
+ Q_D(const QDeclarativeXmlListModel);
+ int roleIndex = d->roles.indexOf(role);
+ return (roleIndex == -1) ? QVariant() : d->data.at(roleIndex).at(index);
+}
+
+/*!
+ \qmlproperty int XmlListModel::count
+ The number of data entries in the model.
+*/
+int QDeclarativeXmlListModel::count() const
+{
+ Q_D(const QDeclarativeXmlListModel);
+ return d->size;
+}
+
+QList<int> QDeclarativeXmlListModel::roles() const
+{
+ Q_D(const QDeclarativeXmlListModel);
+ return d->roles;
+}
+
+QString QDeclarativeXmlListModel::toString(int role) const
+{
+ Q_D(const QDeclarativeXmlListModel);
+ int index = d->roles.indexOf(role);
+ if (index == -1)
+ return QString();
+ return d->roleNames.at(index);
+}
+
+/*!
+ \qmlproperty url XmlListModel::source
+ The location of the XML data source.
+
+ If both source and xml are set, xml will be used.
+*/
+QUrl QDeclarativeXmlListModel::source() const
+{
+ Q_D(const QDeclarativeXmlListModel);
+ return d->src;
+}
+
+void QDeclarativeXmlListModel::setSource(const QUrl &src)
+{
+ Q_D(QDeclarativeXmlListModel);
+ if (d->src != src) {
+ reload();
+ d->src = src;
+ emit sourceChanged();
+ }
+}
+
+/*!
+ \qmlproperty string XmlListModel::xml
+ This property holds XML text set directly.
+
+ The text is assumed to be UTF-8 encoded.
+
+ If both source and xml are set, xml will be used.
+*/
+QString QDeclarativeXmlListModel::xml() const
+{
+ Q_D(const QDeclarativeXmlListModel);
+ return d->xml;
+}
+
+void QDeclarativeXmlListModel::setXml(const QString &xml)
+{
+ Q_D(QDeclarativeXmlListModel);
+ if (d->xml != xml) {
+ d->xml = xml;
+ reload();
+ emit xmlChanged();
+ }
+}
+
+/*!
+ \qmlproperty string XmlListModel::query
+ An absolute XPath query representing the base query for the model items. The query should start with
+ '/' or '//'.
+*/
+QString QDeclarativeXmlListModel::query() const
+{
+ Q_D(const QDeclarativeXmlListModel);
+ return d->query;
+}
+
+void QDeclarativeXmlListModel::setQuery(const QString &query)
+{
+ Q_D(QDeclarativeXmlListModel);
+ if (!query.startsWith(QLatin1Char('/'))) {
+ qmlInfo(this) << QCoreApplication::translate("QDeclarativeXmlRoleList", "An XmlListModel query must start with '/' or \"//\"");
+ return;
+ }
+
+ if (d->query != query) {
+ d->query = query;
+ reload();
+ emit queryChanged();
+ }
+}
+
+/*!
+ \qmlproperty string XmlListModel::namespaceDeclarations
+ A set of declarations for the namespaces used in the query.
+*/
+QString QDeclarativeXmlListModel::namespaceDeclarations() const
+{
+ Q_D(const QDeclarativeXmlListModel);
+ return d->namespaces;
+}
+
+void QDeclarativeXmlListModel::setNamespaceDeclarations(const QString &declarations)
+{
+ Q_D(QDeclarativeXmlListModel);
+ if (d->namespaces != declarations) {
+ d->namespaces = declarations;
+ reload();
+ emit namespaceDeclarationsChanged();
+ }
+}
+
+/*!
+ \qmlproperty enum XmlListModel::status
+
+ This property holds the status of data source loading. It can be one of:
+ \list
+ \o Null - no data source has been set
+ \o Ready - the data source has been loaded
+ \o Loading - the data source is currently being loaded
+ \o Error - an error occurred while loading the data source
+ \endlist
+
+ Note that a change in the status property does not cause anything to happen
+ (although it reflects what has happened to the XmlListModel internally). If you wish
+ to react to the change in status you need to do it yourself, for example in one
+ of the following ways:
+ \list
+ \o Create a state, so that a state change occurs, e.g. State{name: 'loaded'; when: xmlListModel.status = XmlListModel.Ready;}
+ \o Do something inside the onStatusChanged signal handler, e.g. XmlListModel{id: xmlListModel; onStatusChanged: if(xmlListModel.status == XmlListModel.Ready) console.log('Loaded');}
+ \o Bind to the status variable somewhere, e.g. Text{text: if(xmlListModel.status!=XmlListModel.Ready){'Not Loaded';}else{'Loaded';}}
+ \endlist
+
+ \sa progress
+
+*/
+QDeclarativeXmlListModel::Status QDeclarativeXmlListModel::status() const
+{
+ Q_D(const QDeclarativeXmlListModel);
+ return d->status;
+}
+
+/*!
+ \qmlproperty real XmlListModel::progress
+
+ This property holds the progress of data source loading, from 0.0 (nothing loaded)
+ to 1.0 (finished).
+
+ \sa status
+*/
+qreal QDeclarativeXmlListModel::progress() const
+{
+ Q_D(const QDeclarativeXmlListModel);
+ return d->progress;
+}
+
+void QDeclarativeXmlListModel::classBegin()
+{
+ Q_D(QDeclarativeXmlListModel);
+ d->isComponentComplete = false;
+}
+
+void QDeclarativeXmlListModel::componentComplete()
+{
+ Q_D(QDeclarativeXmlListModel);
+ d->isComponentComplete = true;
+ reload();
+}
+
+/*!
+ \qmlmethod XmlListModel::reload()
+
+ Reloads the model.
+
+ If no key roles have been specified, all existing model
+ data is removed, and the model is rebuilt from scratch.
+
+ Otherwise, items are only added if the model does not already
+ contain items with matching key role values.
+*/
+void QDeclarativeXmlListModel::reload()
+{
+ Q_D(QDeclarativeXmlListModel);
+
+ if (!d->isComponentComplete)
+ return;
+
+ QDeclarativeXmlQuery::instance()->abort();
+ d->queryId = -1;
+
+ int count = d->size;
+ if (count < 0)
+ d->size = 0;
+ bool hasKeys = false;
+ for (int i=0; i<d->roleObjects.count(); i++) {
+ if (d->roleObjects[i]->isKey()) {
+ hasKeys = true;
+ break;
+ }
+ }
+ if (!hasKeys) {
+ d->data.clear();
+ d->size = 0;
+ if (count > 0) {
+ emit itemsRemoved(0, count);
+ emit countChanged();
+ }
+ }
+
+ if (d->src.isEmpty() && d->xml.isEmpty())
+ return;
+
+ if (d->reply) {
+ d->reply->abort();
+ d->reply->deleteLater();
+ d->reply = 0;
+ }
+
+ if (!d->xml.isEmpty()) {
+ d->queryId = QDeclarativeXmlQuery::instance()->doQuery(d->query, d->namespaces, d->xml.toUtf8(), &d->roleObjects);
+ d->progress = 1.0;
+ d->status = Ready;
+ emit progressChanged(d->progress);
+ emit statusChanged(d->status);
+ return;
+ }
+
+ d->progress = 0.0;
+ d->status = Loading;
+ emit progressChanged(d->progress);
+ emit statusChanged(d->status);
+
+ QNetworkRequest req(d->src);
+ d->reply = qmlContext(this)->engine()->networkAccessManager()->get(req);
+ QObject::connect(d->reply, SIGNAL(finished()), this, SLOT(requestFinished()));
+ QObject::connect(d->reply, SIGNAL(downloadProgress(qint64,qint64)),
+ this, SLOT(requestProgress(qint64,qint64)));
+}
+
+void QDeclarativeXmlListModel::requestFinished()
+{
+ Q_D(QDeclarativeXmlListModel);
+ if (d->reply->error() != QNetworkReply::NoError) {
+ disconnect(d->reply, 0, this, 0);
+ d->reply->deleteLater();
+ d->reply = 0;
+ d->status = Error;
+ } else {
+ d->status = Ready;
+ QByteArray data = d->reply->readAll();
+ d->queryId = QDeclarativeXmlQuery::instance()->doQuery(d->query, d->namespaces, data, &d->roleObjects);
+ disconnect(d->reply, 0, this, 0);
+ d->reply->deleteLater();
+ d->reply = 0;
+ }
+ d->progress = 1.0;
+ emit progressChanged(d->progress);
+ emit statusChanged(d->status);
+}
+
+void QDeclarativeXmlListModel::requestProgress(qint64 received, qint64 total)
+{
+ Q_D(QDeclarativeXmlListModel);
+ if (d->status == Loading && total > 0) {
+ d->progress = qreal(received)/total;
+ emit progressChanged(d->progress);
+ }
+}
+
+void QDeclarativeXmlListModel::queryCompleted(int id, int size)
+{
+ Q_D(QDeclarativeXmlListModel);
+ if (id != d->queryId)
+ return;
+ bool sizeChanged = size != d->size;
+ d->size = size;
+ d->data = QDeclarativeXmlQuery::instance()->modelData();
+
+ QList<QDeclarativeXmlListRange> removed = QDeclarativeXmlQuery::instance()->removedItemRanges();
+ QList<QDeclarativeXmlListRange> inserted = QDeclarativeXmlQuery::instance()->insertedItemRanges();
+
+ for (int i=0; i<removed.count(); i++)
+ emit itemsRemoved(removed[i].first, removed[i].second);
+ for (int i=0; i<inserted.count(); i++)
+ emit itemsInserted(inserted[i].first, inserted[i].second);
+
+ if (sizeChanged)
+ emit countChanged();
+}
+
+QT_END_NAMESPACE
+
+#include <qdeclarativexmllistmodel.moc>
diff --git a/src/declarative/util/qdeclarativexmllistmodel_p.h b/src/declarative/util/qdeclarativexmllistmodel_p.h
new file mode 100644
index 0000000000..23ff7ce081
--- /dev/null
+++ b/src/declarative/util/qdeclarativexmllistmodel_p.h
@@ -0,0 +1,197 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEXMLLISTMODEL_H
+#define QDECLARATIVEXMLLISTMODEL_H
+
+#include <qdeclarative.h>
+#include <qdeclarativeinfo.h>
+
+#include <QtCore/qurl.h>
+
+#include <private/qlistmodelinterface_p.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeContext;
+
+class QDeclarativeXmlListModelRole;
+
+class QDeclarativeXmlListModelPrivate;
+class Q_DECLARATIVE_EXPORT QDeclarativeXmlListModel : public QListModelInterface, public QDeclarativeParserStatus
+{
+ Q_OBJECT
+ Q_INTERFACES(QDeclarativeParserStatus)
+ Q_ENUMS(Status)
+
+ Q_PROPERTY(Status status READ status NOTIFY statusChanged)
+ Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged)
+ Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
+ Q_PROPERTY(QString xml READ xml WRITE setXml NOTIFY xmlChanged)
+ Q_PROPERTY(QString query READ query WRITE setQuery NOTIFY queryChanged)
+ Q_PROPERTY(QString namespaceDeclarations READ namespaceDeclarations WRITE setNamespaceDeclarations NOTIFY namespaceDeclarationsChanged)
+ Q_PROPERTY(QDeclarativeListProperty<QDeclarativeXmlListModelRole> roles READ roleObjects)
+ Q_PROPERTY(int count READ count NOTIFY countChanged)
+ Q_CLASSINFO("DefaultProperty", "roles")
+
+public:
+ QDeclarativeXmlListModel(QObject *parent = 0);
+ ~QDeclarativeXmlListModel();
+
+ virtual QHash<int,QVariant> data(int index, const QList<int> &roles = (QList<int>())) const;
+ virtual QVariant data(int index, int role) const;
+ virtual int count() const;
+ virtual QList<int> roles() const;
+ virtual QString toString(int role) const;
+
+ QDeclarativeListProperty<QDeclarativeXmlListModelRole> roleObjects();
+
+ QUrl source() const;
+ void setSource(const QUrl&);
+
+ QString xml() const;
+ void setXml(const QString&);
+
+ QString query() const;
+ void setQuery(const QString&);
+
+ QString namespaceDeclarations() const;
+ void setNamespaceDeclarations(const QString&);
+
+ enum Status { Null, Ready, Loading, Error };
+ Status status() const;
+ qreal progress() const;
+
+ virtual void classBegin();
+ virtual void componentComplete();
+
+Q_SIGNALS:
+ void statusChanged(Status);
+ void progressChanged(qreal progress);
+ void countChanged();
+ void sourceChanged();
+ void xmlChanged();
+ void queryChanged();
+ void namespaceDeclarationsChanged();
+
+public Q_SLOTS:
+ // ### need to use/expose Expiry to guess when to call this?
+ // ### property to auto-call this on reasonable Expiry?
+ // ### LastModified/Age also useful to guess.
+ // ### Probably also applies to other network-requesting types.
+ void reload();
+
+private Q_SLOTS:
+ void requestFinished();
+ void requestProgress(qint64,qint64);
+ void queryCompleted(int,int);
+
+private:
+ Q_DECLARE_PRIVATE(QDeclarativeXmlListModel)
+ Q_DISABLE_COPY(QDeclarativeXmlListModel)
+};
+
+class Q_DECLARATIVE_EXPORT QDeclarativeXmlListModelRole : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
+ Q_PROPERTY(QString query READ query WRITE setQuery NOTIFY queryChanged)
+ Q_PROPERTY(bool isKey READ isKey WRITE setIsKey NOTIFY isKeyChanged)
+public:
+ QDeclarativeXmlListModelRole() : m_isKey(false) {}
+ ~QDeclarativeXmlListModelRole() {}
+
+ QString name() const { return m_name; }
+ void setName(const QString &name) {
+ if (name == m_name)
+ return;
+ m_name = name;
+ emit nameChanged();
+ }
+
+ QString query() const { return m_query; }
+ void setQuery(const QString &query)
+ {
+ if (query.startsWith(QLatin1Char('/'))) {
+ qmlInfo(this) << tr("An XmlRole query must not start with '/'");
+ return;
+ }
+ if (m_query == query)
+ return;
+ m_query = query;
+ emit queryChanged();
+ }
+
+ bool isKey() const { return m_isKey; }
+ void setIsKey(bool b) {
+ if (m_isKey == b)
+ return;
+ m_isKey = b;
+ emit isKeyChanged();
+ }
+
+ bool isValid() {
+ return !m_name.isEmpty() && !m_query.isEmpty();
+ }
+
+Q_SIGNALS:
+ void nameChanged();
+ void queryChanged();
+ void isKeyChanged();
+
+private:
+ QString m_name;
+ QString m_query;
+ bool m_isKey;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeXmlListModel)
+QML_DECLARE_TYPE(QDeclarativeXmlListModelRole)
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEXMLLISTMODEL_H
diff --git a/src/declarative/util/qfxperf.cpp b/src/declarative/util/qfxperf.cpp
new file mode 100644
index 0000000000..5611c49a83
--- /dev/null
+++ b/src/declarative/util/qfxperf.cpp
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qfxperf_p_p.h"
+
+QT_BEGIN_NAMESPACE
+
+Q_DEFINE_PERFORMANCE_LOG(QDeclarativePerf, "QDeclarativeGraphics") {
+ Q_DEFINE_PERFORMANCE_METRIC(QDeclarativeParsing, "Compilation: QML Parsing")
+ Q_DEFINE_PERFORMANCE_METRIC(Compilation, " QML Compilation")
+ Q_DEFINE_PERFORMANCE_METRIC(VMEExecution, "Execution: QML VME Execution")
+ Q_DEFINE_PERFORMANCE_METRIC(BindInit, "BindValue Initialization")
+ Q_DEFINE_PERFORMANCE_METRIC(BindValue, "BindValue execution")
+ Q_DEFINE_PERFORMANCE_METRIC(BindValueSSE, "BindValue execution SSE")
+ Q_DEFINE_PERFORMANCE_METRIC(BindValueQt, "BindValue execution QtScript")
+ Q_DEFINE_PERFORMANCE_METRIC(BindableValueUpdate, "QDeclarativeBinding::update")
+ Q_DEFINE_PERFORMANCE_METRIC(PixmapLoad, "Pixmap loading")
+ Q_DEFINE_PERFORMANCE_METRIC(FontDatabase, "Font database creation")
+ Q_DEFINE_PERFORMANCE_METRIC(QDeclarativePathViewPathCache, "FX Items: QDeclarativePathView: Path cache")
+ Q_DEFINE_PERFORMANCE_METRIC(CreateParticle, " QDeclarativeParticles: Particle creation")
+ Q_DEFINE_PERFORMANCE_METRIC(ItemComponentComplete, " QDeclarativeItem::componentComplete")
+ Q_DEFINE_PERFORMANCE_METRIC(ImageComponentComplete, " QDeclarativeImage::componentComplete")
+ Q_DEFINE_PERFORMANCE_METRIC(BaseLayoutComponentComplete, " QDeclarativeBasePositioner::componentComplete")
+ Q_DEFINE_PERFORMANCE_METRIC(TextComponentComplete, " QDeclarativeText::componentComplete")
+ Q_DEFINE_PERFORMANCE_METRIC(QDeclarativeText_setText, " QDeclarativeText::setText")
+ Q_DEFINE_PERFORMANCE_METRIC(AddScript, "QDeclarativeScript::addScriptToEngine")
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qfxperf_p_p.h b/src/declarative/util/qfxperf_p_p.h
new file mode 100644
index 0000000000..8b65821300
--- /dev/null
+++ b/src/declarative/util/qfxperf_p_p.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef QFXPERF_H
+#define QFXPERF_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qperformancelog_p_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+Q_DECLARE_PERFORMANCE_LOG(QDeclarativePerf) {
+ Q_DECLARE_PERFORMANCE_METRIC(QDeclarativeParsing)
+
+ Q_DECLARE_PERFORMANCE_METRIC(Compilation)
+ Q_DECLARE_PERFORMANCE_METRIC(VMEExecution)
+
+ Q_DECLARE_PERFORMANCE_METRIC(BindInit)
+ Q_DECLARE_PERFORMANCE_METRIC(BindValue)
+ Q_DECLARE_PERFORMANCE_METRIC(BindValueSSE)
+ Q_DECLARE_PERFORMANCE_METRIC(BindValueQt)
+ Q_DECLARE_PERFORMANCE_METRIC(BindableValueUpdate)
+ Q_DECLARE_PERFORMANCE_METRIC(PixmapLoad)
+ Q_DECLARE_PERFORMANCE_METRIC(FontDatabase)
+ Q_DECLARE_PERFORMANCE_METRIC(QDeclarativePathViewPathCache)
+ Q_DECLARE_PERFORMANCE_METRIC(CreateParticle)
+ Q_DECLARE_PERFORMANCE_METRIC(ItemComponentComplete)
+ Q_DECLARE_PERFORMANCE_METRIC(ImageComponentComplete)
+ Q_DECLARE_PERFORMANCE_METRIC(BaseLayoutComponentComplete)
+ Q_DECLARE_PERFORMANCE_METRIC(TextComponentComplete)
+ Q_DECLARE_PERFORMANCE_METRIC(QDeclarativeText_setText)
+ Q_DECLARE_PERFORMANCE_METRIC(AddScript)
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QFXPERF_H
diff --git a/src/declarative/util/qperformancelog.cpp b/src/declarative/util/qperformancelog.cpp
new file mode 100644
index 0000000000..83cc919c40
--- /dev/null
+++ b/src/declarative/util/qperformancelog.cpp
@@ -0,0 +1,181 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qperformancelog_p_p.h"
+
+#include <QHash>
+#include <QDebug>
+
+QT_BEGIN_NAMESPACE
+
+#ifdef Q_ENABLE_PERFORMANCE_LOG
+
+struct QPerformanceLogData
+{
+ struct Log
+ {
+ Log()
+ : logDescription(0), maxId(-1) {}
+
+ QHash<int, const char *> descriptions;
+ const char *logDescription;
+ int maxId;
+ };
+
+ typedef QHash<QPerformanceLog::LogData *, Log> Logs;
+ Logs logs;
+};
+Q_GLOBAL_STATIC(QPerformanceLogData, performanceLogData);
+
+QPerformanceLog::LogData::LogData(const char *desc)
+: sumTime(0), data(0)
+{
+ QPerformanceLogData *logData = performanceLogData();
+
+ QPerformanceLogData::Log log;
+ log.logDescription = desc;
+ logData->logs.insert(this, log);
+
+ timer.start();
+}
+
+QPerformanceLog::LogMetric::LogMetric(LogData *l, int id, const char *desc)
+{
+ if (id < 0)
+ qFatal("QPerformanceLog: Invalid log id %d ('%s')", id, desc);
+
+ QPerformanceLogData *logData = performanceLogData();
+
+ QPerformanceLogData::Logs::Iterator logIter = logData->logs.find(l);
+ if (logIter == logData->logs.end())
+ qFatal("QPerformanceLog: Unable to locate log for metric '%s'", desc);
+ QPerformanceLogData::Log &log = *logIter;
+ if (log.descriptions.contains(id))
+ qFatal("QPerformanceLog: Duplicate log metric %d ('%s')", id, desc);
+ log.descriptions.insert(id, desc);
+
+ if (log.maxId < id) {
+ log.maxId = id;
+ if (l->data) delete [] l->data;
+ l->data = new unsigned int[2 * (log.maxId + 1)];
+ ::memset(l->data, 0, 2 * (log.maxId + 1) * sizeof(unsigned int));
+ }
+}
+
+static void QPerformanceLog_clear(QPerformanceLog::LogData *l, const QPerformanceLogData::Log *pl)
+{
+ ::memset(l->data, 0, 2 * (pl->maxId + 1) * sizeof(unsigned int));
+}
+
+static void QPerformanceLog_displayData(const QPerformanceLog::LogData *l, const QPerformanceLogData::Log *pl)
+{
+ qWarning() << pl->logDescription << "performance data";
+ unsigned int total = 0;
+ for (QHash<int, const char *>::ConstIterator iter = pl->descriptions.begin();
+ iter != pl->descriptions.end();
+ ++iter) {
+
+ int id = iter.key();
+ unsigned int ms = l->data[id * 2];
+ total += ms;
+ unsigned int inst = l->data[id * 2 + 1];
+ float pi = float(ms) / float(inst);
+ qWarning().nospace() << " " << *iter << ": " << ms << " ms over "
+ << inst << " instances (" << pi << " ms/instance)";
+ }
+ qWarning().nospace() << " TOTAL: " << total;
+}
+
+void QPerformanceLog::displayData()
+{
+ QPerformanceLogData *logData = performanceLogData();
+
+ for (QPerformanceLogData::Logs::ConstIterator iter = logData->logs.begin();
+ iter != logData->logs.end();
+ ++iter) {
+ QPerformanceLog_displayData(iter.key(), &(*iter));
+ }
+}
+
+void QPerformanceLog::clear()
+{
+ QPerformanceLogData *logData = performanceLogData();
+
+ for (QPerformanceLogData::Logs::ConstIterator iter = logData->logs.begin();
+ iter != logData->logs.end();
+ ++iter) {
+ QPerformanceLog_clear(iter.key(), &(*iter));
+ }
+}
+
+void QPerformanceLog::displayData(LogData *l)
+{
+ QPerformanceLogData *logData = performanceLogData();
+ QPerformanceLogData::Logs::ConstIterator iter = logData->logs.find(l);
+ if (iter == logData->logs.end())
+ qFatal("QPerformanceLog: Internal corruption - unable to locate log");
+
+ QPerformanceLog_displayData(iter.key(), &(*iter));
+}
+
+void QPerformanceLog::clear(LogData *l)
+{
+ QPerformanceLogData *logData = performanceLogData();
+ QPerformanceLogData::Logs::ConstIterator iter = logData->logs.find(l);
+ if (iter == logData->logs.end())
+ qFatal("QPerformanceLog: Internal corruption - unable to locate log");
+
+ QPerformanceLog_clear(iter.key(), &(*iter));
+}
+
+#else // Q_ENABLE_PERFORMANCE_LOG
+
+void QPerformanceLog::displayData()
+{
+}
+
+void QPerformanceLog::clear()
+{
+}
+
+#endif // Q_ENABLE_PERFORMANCE_LOG
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qperformancelog_p_p.h b/src/declarative/util/qperformancelog_p_p.h
new file mode 100644
index 0000000000..a212f284cf
--- /dev/null
+++ b/src/declarative/util/qperformancelog_p_p.h
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPERFORMANCELOG_H
+#define QPERFORMANCELOG_H
+
+#include <QtCore/qdatetime.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace QPerformanceLog
+{
+ Q_DECLARATIVE_EXPORT void displayData();
+ Q_DECLARATIVE_EXPORT void clear();
+
+#ifdef Q_ENABLE_PERFORMANCE_LOG
+ struct LogData {
+ LogData(const char *);
+ QTime timer;
+ int sumTime;
+ unsigned int *data;
+ };
+
+ struct LogMetric {
+ LogMetric(LogData *, int, const char *);
+ };
+
+ // Internal
+ void displayData(LogData *);
+ void clear(LogData *);
+#endif
+}
+
+#ifdef Q_ENABLE_PERFORMANCE_LOG
+
+#define Q_DECLARE_PERFORMANCE_METRIC(name) \
+ enum { name = ValueChoice<0, ValueTracker<0, __LINE__>::value, __LINE__>::value }; \
+ template<int L> \
+ struct ValueTracker<name, L> \
+ { \
+ enum { value = name }; \
+ }; \
+ extern QPerformanceLog::LogMetric metric ## name;
+
+#define Q_DECLARE_PERFORMANCE_LOG(name) \
+ namespace name { \
+ extern QPerformanceLog::LogData log; \
+ inline void displayData() { QPerformanceLog::displayData(&log); } \
+ inline void clear() { QPerformanceLog::clear(&log); } \
+ } \
+ template<int N> \
+ class name ## Timer { \
+ public: \
+ name ## Timer() { \
+ lastSum = name::log.sumTime + name::log.timer.restart(); \
+ name::log.sumTime = 0; \
+ } \
+ ~ name ## Timer() { \
+ name::log.data[2 * N] += name::log.sumTime + name::log.timer.restart(); \
+ ++name::log.data[2 * N + 1]; \
+ name::log.sumTime = lastSum; \
+ } \
+ private: \
+ int lastSum; \
+ }; \
+ namespace name { \
+ template<int N, int L> \
+ struct ValueTracker \
+ { \
+ enum { value = -1 }; \
+ }; \
+ template<int DefNextValue, int NextValue, int L> \
+ struct ValueChoice \
+ { \
+ enum { value = ValueChoice<DefNextValue + 1, ValueTracker<DefNextValue + 1, L>::value, L>::value }; \
+ }; \
+ template<int DefNextValue, int L> \
+ struct ValueChoice<DefNextValue, -1, L> \
+ { \
+ enum { value = DefNextValue }; \
+ }; \
+ } \
+ namespace name
+
+#define Q_DEFINE_PERFORMANCE_LOG(name, desc) \
+ QPerformanceLog::LogData name::log(desc); \
+ namespace name
+
+#define Q_DEFINE_PERFORMANCE_METRIC(name, desc) \
+ QPerformanceLog::LogMetric metrix ## name(&log, name, desc);
+
+#else // Q_ENABLE_PERFORMANCE_LOG
+
+#define Q_DECLARE_PERFORMANCE_METRIC(name)
+#define Q_DECLARE_PERFORMANCE_LOG(name) namespace name
+#define Q_DEFINE_PERFORMANCE_LOG(name, desc) namespace name
+#define Q_DEFINE_PERFORMANCE_METRIC(name, desc)
+
+#endif // Q_ENABLE_PERFORMANCE_LOG
+
+QT_END_NAMESPACE
+
+#endif // QPERFORMANCELOG_H
diff --git a/src/declarative/util/util.pri b/src/declarative/util/util.pri
new file mode 100644
index 0000000000..26edecc4f7
--- /dev/null
+++ b/src/declarative/util/util.pri
@@ -0,0 +1,68 @@
+INCLUDEPATH += $$PWD
+
+SOURCES += \
+ $$PWD/qdeclarativeutilmodule.cpp\
+ $$PWD/qdeclarativeview.cpp \
+ $$PWD/qfxperf.cpp \
+ $$PWD/qperformancelog.cpp \
+ $$PWD/qdeclarativeconnections.cpp \
+ $$PWD/qdeclarativepackage.cpp \
+ $$PWD/qdeclarativeanimation.cpp \
+ $$PWD/qdeclarativesystempalette.cpp \
+ $$PWD/qdeclarativespringfollow.cpp \
+ $$PWD/qdeclarativeeasefollow.cpp \
+ $$PWD/qdeclarativestate.cpp\
+ $$PWD/qdeclarativetransitionmanager.cpp \
+ $$PWD/qdeclarativestateoperations.cpp \
+ $$PWD/qdeclarativepropertychanges.cpp \
+ $$PWD/qdeclarativestategroup.cpp \
+ $$PWD/qdeclarativetransition.cpp \
+ $$PWD/qdeclarativelistmodel.cpp\
+ $$PWD/qdeclarativelistaccessor.cpp \
+ $$PWD/qdeclarativeopenmetaobject.cpp \
+ $$PWD/qdeclarativetimeline.cpp \
+ $$PWD/qdeclarativetimer.cpp \
+ $$PWD/qdeclarativebind.cpp \
+ $$PWD/qdeclarativepropertymap.cpp \
+ $$PWD/qdeclarativepixmapcache.cpp \
+ $$PWD/qdeclarativebehavior.cpp \
+ $$PWD/qdeclarativefontloader.cpp \
+ $$PWD/qdeclarativestyledtext.cpp
+
+HEADERS += \
+ $$PWD/qdeclarativeutilmodule_p.h\
+ $$PWD/qdeclarativeview.h \
+ $$PWD/qfxperf_p_p.h \
+ $$PWD/qperformancelog_p_p.h \
+ $$PWD/qdeclarativeconnections_p.h \
+ $$PWD/qdeclarativepackage_p.h \
+ $$PWD/qdeclarativeanimation_p.h \
+ $$PWD/qdeclarativeanimation_p_p.h \
+ $$PWD/qdeclarativesystempalette_p.h \
+ $$PWD/qdeclarativespringfollow_p.h \
+ $$PWD/qdeclarativeeasefollow_p.h \
+ $$PWD/qdeclarativestate_p.h\
+ $$PWD/qdeclarativestateoperations_p.h \
+ $$PWD/qdeclarativepropertychanges_p.h \
+ $$PWD/qdeclarativestate_p_p.h\
+ $$PWD/qdeclarativetransitionmanager_p_p.h \
+ $$PWD/qdeclarativestategroup_p.h \
+ $$PWD/qdeclarativetransition_p.h \
+ $$PWD/qdeclarativelistmodel_p.h\
+ $$PWD/qdeclarativelistaccessor_p.h \
+ $$PWD/qdeclarativeopenmetaobject_p.h \
+ $$PWD/qdeclarativenullablevalue_p_p.h \
+ $$PWD/qdeclarativetimeline_p_p.h \
+ $$PWD/qdeclarativetimer_p.h \
+ $$PWD/qdeclarativebind_p.h \
+ $$PWD/qdeclarativepropertymap.h \
+ $$PWD/qdeclarativepixmapcache_p.h \
+ $$PWD/qdeclarativebehavior_p.h \
+ $$PWD/qdeclarativefontloader_p.h \
+ $$PWD/qdeclarativestyledtext_p.h
+
+contains(QT_CONFIG, xmlpatterns) {
+ QT+=xmlpatterns
+ SOURCES += $$PWD/qdeclarativexmllistmodel.cpp
+ HEADERS += $$PWD/qdeclarativexmllistmodel_p.h
+}
diff --git a/src/gui/dialogs/dialogs.pri b/src/gui/dialogs/dialogs.pri
index 63f64a2d0d..4e1b9a71d1 100644
--- a/src/gui/dialogs/dialogs.pri
+++ b/src/gui/dialogs/dialogs.pri
@@ -50,7 +50,8 @@ HEADERS += \
}
win32 {
- HEADERS += dialogs/qwizard_win_p.h
+ HEADERS += dialogs/qwizard_win_p.h \
+ dialogs/qfiledialog_win_p.h
SOURCES += dialogs/qdialogsbinarycompat_win.cpp \
dialogs/qfiledialog_win.cpp \
dialogs/qpagesetupdialog_win.cpp \
diff --git a/src/gui/dialogs/qabstractprintdialog.cpp b/src/gui/dialogs/qabstractprintdialog.cpp
index 4523433857..25d9ebbdb3 100644
--- a/src/gui/dialogs/qabstractprintdialog.cpp
+++ b/src/gui/dialogs/qabstractprintdialog.cpp
@@ -76,6 +76,7 @@ class QPrintDialogPrivate : public QAbstractPrintDialogPrivate
\value AllPages All pages should be printed.
\value Selection Only the selection should be printed.
\value PageRange The specified page range should be printed.
+ \value CurrentPage Only the currently visible page should be printed.
\sa QPrinter::PrintRange
*/
@@ -89,7 +90,9 @@ class QPrintDialogPrivate : public QAbstractPrintDialogPrivate
\value PrintToFile The print to file option is enabled.
\value PrintSelection The print selection option is enabled.
\value PrintPageRange The page range selection option is enabled.
- \value PrintCollateCopies
+ \value PrintShowPageSize Show the page size + margins page only if this is enabled.
+ \value PrintCollateCopies The collate copies option is enabled
+ \value PrintCurrentPage The print current page option is enabled
This value is obsolete and does nothing since Qt 4.5:
@@ -97,8 +100,6 @@ class QPrintDialogPrivate : public QAbstractPrintDialogPrivate
would create a sheet by default the dialog was given a parent.
This is no longer supported in Qt 4.5. If you want to use sheets, use
QPrintDialog::open() instead.
-
- \value PrintShowPageSize Show the page size + margins page only if this is enabled.
*/
/*!
diff --git a/src/gui/dialogs/qabstractprintdialog.h b/src/gui/dialogs/qabstractprintdialog.h
index 4d867f6809..82e3df8103 100644
--- a/src/gui/dialogs/qabstractprintdialog.h
+++ b/src/gui/dialogs/qabstractprintdialog.h
@@ -65,7 +65,8 @@ public:
enum PrintRange {
AllPages,
Selection,
- PageRange
+ PageRange,
+ CurrentPage
};
enum PrintDialogOption {
@@ -75,7 +76,8 @@ public:
PrintPageRange = 0x0004,
PrintShowPageSize = 0x0008,
PrintCollateCopies = 0x0010,
- DontUseSheet = 0x0020
+ DontUseSheet = 0x0020,
+ PrintCurrentPage = 0x0040
};
Q_DECLARE_FLAGS(PrintDialogOptions, PrintDialogOption)
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp
index d8ac9a88ce..4faa193dc2 100644
--- a/src/gui/dialogs/qdialog.cpp
+++ b/src/gui/dialogs/qdialog.cpp
@@ -655,13 +655,14 @@ void QDialog::contextMenuEvent(QContextMenuEvent *e)
while (w && w->whatsThis().size() == 0 && !w->testAttribute(Qt::WA_CustomWhatsThis))
w = w->isWindow() ? 0 : w->parentWidget();
if (w) {
- QMenu p(this);
- QAction *wt = p.addAction(tr("What's This?"));
- if (p.exec(e->globalPos()) == wt) {
+ QWeakPointer<QMenu> p = new QMenu(this);
+ QAction *wt = p.data()->addAction(tr("What's This?"));
+ if (p.data()->exec(e->globalPos()) == wt) {
QHelpEvent e(QEvent::WhatsThis, w->rect().center(),
w->mapToGlobal(w->rect().center()));
QApplication::sendEvent(w, &e);
}
+ delete p.data();
}
#endif
}
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm
index 67daced524..14a5f15709 100644
--- a/src/gui/dialogs/qfiledialog_mac.mm
+++ b/src/gui/dialogs/qfiledialog_mac.mm
@@ -295,10 +295,14 @@ QT_USE_NAMESPACE
if (!mQDirFilterEntryList->contains(info.fileName()))
return NO;
- // Always accept directories regardless of their names:
+ // Always accept directories regardless of their names (unless it is a bundle):
BOOL isDir;
- if ([[NSFileManager defaultManager] fileExistsAtPath:filename isDirectory:&isDir] && isDir)
- return YES;
+ if ([[NSFileManager defaultManager] fileExistsAtPath:filename isDirectory:&isDir] && isDir) {
+ if ([mSavePanel treatsFilePackagesAsDirectories] == NO) {
+ if ([[NSWorkspace sharedWorkspace] isFilePackageAtPath:filename] == NO)
+ return YES;
+ }
+ }
// No filter means accept everything
if (mSelectedNameFilter->isEmpty())
@@ -725,6 +729,7 @@ Boolean QFileDialogPrivate::qt_mac_filedialog_filter_proc(AEDesc *theItem, void
NavFileOrFolderInfo *theInfo = static_cast<NavFileOrFolderInfo *>(info);
QString file;
+ QString path;
const QtMacFilterName &fn
= fileDialogPrivate->filterInfo.filters.at(fileDialogPrivate->filterInfo.currentSelection);
if (theItem->descriptorType == typeFSRef) {
@@ -732,10 +737,12 @@ Boolean QFileDialogPrivate::qt_mac_filedialog_filter_proc(AEDesc *theItem, void
AEGetDescData(theItem, &ref, sizeof(ref));
UInt8 str_buffer[1024];
FSRefMakePath(&ref, str_buffer, 1024);
- file = QString::fromUtf8(reinterpret_cast<const char *>(str_buffer));
- int slsh = file.lastIndexOf(QLatin1Char('/'));
+ path = QString::fromUtf8(reinterpret_cast<const char *>(str_buffer));
+ int slsh = path.lastIndexOf(QLatin1Char('/'));
if (slsh != -1)
- file = file.right(file.length() - slsh - 1);
+ file = path.right(path.length() - slsh - 1);
+ else
+ file = path;
}
QStringList reg = fn.regexp.split(QLatin1String(";"));
for (QStringList::const_iterator it = reg.constBegin(); it != reg.constEnd(); ++it) {
@@ -747,7 +754,13 @@ Boolean QFileDialogPrivate::qt_mac_filedialog_filter_proc(AEDesc *theItem, void
if (rg.exactMatch(file))
return true;
}
- return (theInfo->isFolder && !file.endsWith(QLatin1String(".app")));
+
+ if (theInfo->isFolder) {
+ if ([[NSWorkspace sharedWorkspace] isFilePackageAtPath:qt_mac_QStringToNSString(path)])
+ return false;
+ return true;
+ }
+ return false;
}
void QFileDialogPrivate::qt_mac_filedialog_event_proc(const NavEventCallbackMessage msg,
diff --git a/src/gui/dialogs/qfiledialog_win.cpp b/src/gui/dialogs/qfiledialog_win.cpp
index 5a7ace99fe..3120938e43 100644
--- a/src/gui/dialogs/qfiledialog_win.cpp
+++ b/src/gui/dialogs/qfiledialog_win.cpp
@@ -53,53 +53,27 @@
#include <qdir.h>
#include <qstringlist.h>
#include <qlibrary.h>
+#include "qfiledialog_win_p.h"
#ifndef QT_NO_THREAD
# include <private/qmutexpool_p.h>
#endif
-#include <shlobj.h>
-//At some point we can hope that mingw will support that interface
-#if !defined(Q_WS_WINCE) && !defined(Q_CC_MINGW)
-#include <shobjidl.h>
-#endif
-
-#include <objbase.h>
-
-#if defined(__IFileDialog_INTERFACE_DEFINED__) \
- && defined(__IFileOpenDialog_INTERFACE_DEFINED__)
-#define USE_COMMON_ITEM_DIALOG
-#endif
-
#ifdef Q_WS_WINCE
+#include <shlobj.h>
#include <commdlg.h>
-# ifndef BFFM_SETSELECTION
-# define BFFM_SETSELECTION (WM_USER + 102)
-# endif
-// Windows Mobile has a broken definition for BROWSEINFO
-// Only compile fix
-typedef struct qt_priv_browseinfo {
- HWND hwndOwner;
- LPCITEMIDLIST pidlRoot;
- LPWSTR pszDisplayName;
- LPCWSTR lpszTitle;
- UINT ulFlags;
- BFFCALLBACK lpfn;
- LPARAM lParam;
- int iImage;
-} qt_BROWSEINFO;
bool qt_priv_ptr_valid = false;
+#else
+//we have to declare them here because they're not present for all SDK/compilers
+static const IID QT_IID_IFileOpenDialog = {0xd57c7288, 0xd4ad, 0x4768, {0xbe, 0x02, 0x9d, 0x96, 0x95, 0x32, 0xd9, 0x60} };
+static const IID QT_IID_IShellItem = {0x43826d1e, 0xe718, 0x42ee, {0xbc, 0x55, 0xa1, 0xe2, 0x61, 0xc3, 0x7b, 0xfe} };
+static const CLSID QT_CLSID_FileOpenDialog = {0xdc1c5a9c, 0xe88a, 0x4dde, {0xa5, 0xa1, 0x60, 0xf8, 0x2a, 0x20, 0xae, 0xf7} };
#endif
-// Don't remove the lines below!
-//
-// resolving the W methods manually is needed, because Windows 95 doesn't include
-// these methods in Shell32.lib (not even stubs!), so you'd get an unresolved symbol
-// when Qt calls getExistingDirectory(), etc.
-typedef LPITEMIDLIST (WINAPI *PtrSHBrowseForFolder)(BROWSEINFO*);
+typedef qt_LPITEMIDLIST (WINAPI *PtrSHBrowseForFolder)(qt_BROWSEINFO*);
static PtrSHBrowseForFolder ptrSHBrowseForFolder = 0;
-typedef BOOL (WINAPI *PtrSHGetPathFromIDList)(LPITEMIDLIST,LPWSTR);
+typedef BOOL (WINAPI *PtrSHGetPathFromIDList)(qt_LPITEMIDLIST, LPWSTR);
static PtrSHGetPathFromIDList ptrSHGetPathFromIDList = 0;
typedef HRESULT (WINAPI *PtrSHGetMalloc)(LPMALLOC *);
static PtrSHGetMalloc ptrSHGetMalloc = 0;
@@ -132,7 +106,7 @@ static void qt_win_resolve_libs()
ptrSHGetMalloc = (PtrSHGetMalloc) lib.resolve("SHGetMalloc");
#else
// CE stores them in a different lib and does not use unicode version
- HINSTANCE handle = LoadLibraryW(L"Ceshell");
+ HINSTANCE handle = LoadLibrary(L"Ceshell");
ptrSHBrowseForFolder = (PtrSHBrowseForFolder)GetProcAddress(handle, L"SHBrowseForFolder");
ptrSHGetPathFromIDList = (PtrSHGetPathFromIDList)GetProcAddress(handle, L"SHGetPathFromIDList");
ptrSHGetMalloc = (PtrSHGetMalloc)GetProcAddress(handle, L"SHGetMalloc");
@@ -421,7 +395,7 @@ QString qt_win_get_save_file_name(const QFileDialogArgs &args,
}
-#if defined(USE_COMMON_ITEM_DIALOG)
+#ifndef Q_WS_WINCE
typedef HRESULT (WINAPI *PtrSHCreateItemFromParsingName)(PCWSTR pszPath, IBindCtx *pbc, REFIID riid, void **ppv);
static PtrSHCreateItemFromParsingName pSHCreateItemFromParsingName = 0;
@@ -469,7 +443,7 @@ static bool qt_win_set_IFileDialogOptions(IFileDialog *pfd,
// Add the filters to the file dialog.
if (numFilters) {
wchar_t *szData = (wchar_t*)winfilters.utf16();
- COMDLG_FILTERSPEC *filterSpec = new COMDLG_FILTERSPEC[numFilters];
+ qt_COMDLG_FILTERSPEC *filterSpec = new qt_COMDLG_FILTERSPEC[numFilters];
for(int i = 0; i<numFilters; i++) {
filterSpec[i].pszName = szData+offsets[i*2];
filterSpec[i].pszSpec = szData+offsets[(i*2)+1];
@@ -481,9 +455,8 @@ static bool qt_win_set_IFileDialogOptions(IFileDialog *pfd,
tInitDir = QDir::toNativeSeparators(initialDirectory);
if (!tInitDir.isEmpty()) {
IShellItem *psiDefaultFolder;
- hr = pSHCreateItemFromParsingName((wchar_t*)tInitDir.utf16(),
- NULL,
- IID_PPV_ARGS(&psiDefaultFolder));
+ hr = pSHCreateItemFromParsingName((wchar_t*)tInitDir.utf16(), NULL, QT_IID_IShellItem,
+ reinterpret_cast<void**>(&psiDefaultFolder));
if (SUCCEEDED(hr)) {
hr = pfd->SetFolder(psiDefaultFolder);
@@ -522,7 +495,7 @@ static bool qt_win_set_IFileDialogOptions(IFileDialog *pfd,
return SUCCEEDED(hr);
}
-QStringList qt_win_CID_get_open_file_names(const QFileDialogArgs &args,
+static QStringList qt_win_CID_get_open_file_names(const QFileDialogArgs &args,
QString *initialDirectory,
const QStringList &filterList,
QString *selectedFilter,
@@ -535,10 +508,8 @@ QStringList qt_win_CID_get_open_file_names(const QFileDialogArgs &args,
QApplicationPrivate::enterModal(&modal_widget);
// Multiple selection is allowed only in IFileOpenDialog.
IFileOpenDialog *pfd = 0;
- HRESULT hr = CoCreateInstance(CLSID_FileOpenDialog,
- NULL,
- CLSCTX_INPROC_SERVER,
- IID_PPV_ARGS(&pfd));
+ HRESULT hr = CoCreateInstance(QT_CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, QT_IID_IFileOpenDialog,
+ reinterpret_cast<void**>(&pfd));
if (SUCCEEDED(hr)) {
qt_win_set_IFileDialogOptions(pfd, args.selection,
@@ -643,7 +614,7 @@ QStringList qt_win_get_open_file_names(const QFileDialogArgs &args,
// multiple files belonging to different folders from these search results, the
// GetOpenFileName() will return only one folder name for all the files. To retrieve
// the correct path for all selected files, we have to use Common Item Dialog interfaces.
-#if defined(USE_COMMON_ITEM_DIALOG)
+#ifndef Q_WS_WINCE
if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)
return qt_win_CID_get_open_file_names(args, initialDirectory, filterLst, selectedFilter, idx);
#endif
@@ -716,7 +687,7 @@ static int __stdcall winGetExistDirCallbackProc(HWND hwnd,
qt_win_resolve_libs();
if (ptrSHGetPathFromIDList) {
wchar_t path[MAX_PATH];
- ptrSHGetPathFromIDList(LPITEMIDLIST(lParam), path);
+ ptrSHGetPathFromIDList(qt_LPITEMIDLIST(lParam), path);
QString tmpStr = QString::fromWCharArray(path);
if (!tmpStr.isEmpty())
SendMessage(hwnd, BFFM_ENABLEOK, 1, 1);
@@ -728,11 +699,6 @@ static int __stdcall winGetExistDirCallbackProc(HWND hwnd,
return 0;
}
-#ifndef BIF_NEWDIALOGSTYLE
-#define BIF_NEWDIALOGSTYLE 0x0040 // Use the new dialog layout with the ability to resize
-#endif
-
-
QString qt_win_get_existing_directory(const QFileDialogArgs &args)
{
QString currentDir = QDir::currentPath();
@@ -757,11 +723,7 @@ QString qt_win_get_existing_directory(const QFileDialogArgs &args)
path[0] = 0;
tTitle = args.caption;
-#if !defined(Q_WS_WINCE)
- BROWSEINFO bi;
-#else
qt_BROWSEINFO bi;
-#endif
Q_ASSERT(!parent ||parent->testAttribute(Qt::WA_WState_Created));
bi.hwndOwner = (parent ? parent->winId() : 0);
@@ -775,7 +737,7 @@ QString qt_win_get_existing_directory(const QFileDialogArgs &args)
qt_win_resolve_libs();
if (ptrSHBrowseForFolder) {
- LPITEMIDLIST pItemIDList = ptrSHBrowseForFolder((BROWSEINFO*)&bi);
+ qt_LPITEMIDLIST pItemIDList = ptrSHBrowseForFolder(&bi);
if (pItemIDList) {
ptrSHGetPathFromIDList(pItemIDList, path);
IMalloc *pMalloc;
diff --git a/src/gui/dialogs/qfiledialog_win_p.h b/src/gui/dialogs/qfiledialog_win_p.h
new file mode 100644
index 0000000000..7079925b11
--- /dev/null
+++ b/src/gui/dialogs/qfiledialog_win_p.h
@@ -0,0 +1,243 @@
+/****************************************************************************
+**
+** 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 QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <objbase.h>
+#ifndef QFILEDIAG_WIN_P_H
+#define QFILEDIAG_WIN_P_H
+
+//these are the interface declarations needed for the file dialog on Vista and up
+
+//At some point we can hope that all compilers/sdk will support that interface
+//and we won't have to declare it ourselves
+
+//declarations
+#define FOS_OVERWRITEPROMPT 0x2
+#define FOS_STRICTFILETYPES 0x4
+#define FOS_NOCHANGEDIR 0x8
+#define FOS_PICKFOLDERS 0x20
+#define FOS_FORCEFILESYSTEM 0x40
+#define FOS_ALLNONSTORAGEITEMS 0x80
+#define FOS_NOVALIDATE 0x100
+#define FOS_ALLOWMULTISELECT 0x200
+#define FOS_PATHMUSTEXIST 0x800
+#define FOS_FILEMUSTEXIST 0x1000
+#define FOS_CREATEPROMPT 0x2000
+#define FOS_SHAREAWARE 0x4000
+#define FOS_NOREADONLYRETURN 0x8000
+#define FOS_NOTESTFILECREATE 0x10000
+#define FOS_HIDEMRUPLACES 0x20000
+#define FOS_HIDEPINNEDPLACES 0x40000
+#define FOS_NODEREFERENCELINKS 0x100000
+#define FOS_DONTADDTORECENT 0x2000000
+#define FOS_FORCESHOWHIDDEN 0x10000000
+#define FOS_DEFAULTNOMINIMODE 0x20000000
+#define FOS_FORCEPREVIEWPANEON 0x40000000
+
+typedef int GETPROPERTYSTOREFLAGS;
+#define GPS_DEFAULT 0x00000000
+#define GPS_HANDLERPROPERTIESONLY 0x00000001
+#define GPS_READWRITE 0x00000002
+#define GPS_TEMPORARY 0x00000004
+#define GPS_FASTPROPERTIESONLY 0x00000008
+#define GPS_OPENSLOWITEM 0x00000010
+#define GPS_DELAYCREATION 0x00000020
+#define GPS_BESTEFFORT 0x00000040
+#define GPS_MASK_VALID 0x0000007F
+
+typedef int (QT_WIN_CALLBACK* BFFCALLBACK)(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
+// message from browser
+#define BFFM_INITIALIZED 1
+#define BFFM_SELCHANGED 2
+#define BFFM_ENABLEOK (WM_USER + 101)
+#define BFFM_SETSELECTION (WM_USER + 103)
+#define BFFM_SETSTATUSTEXT (WM_USER + 104)
+
+// Browsing for directory.
+#define BIF_RETURNONLYFSDIRS 0x0001
+#define BIF_DONTGOBELOWDOMAIN 0x0002
+#define BIF_STATUSTEXT 0x0004
+#define BIF_RETURNFSANCESTORS 0x0008
+#define BIF_EDITBOX 0x0010
+#define BIF_VALIDATE 0x0020
+#define BIF_NEWDIALOGSTYLE 0x0040
+#define BIF_BROWSEINCLUDEURLS 0x0080
+#define BIF_UAHINT 0x0100
+#define BIF_NONEWFOLDERBUTTON 0x0200
+#define BIF_NOTRANSLATETARGETS 0x0400
+#define BIF_BROWSEFORCOMPUTER 0x1000
+#define BIF_BROWSEFORPRINTER 0x2000
+#define BIF_BROWSEINCLUDEFILES 0x4000
+#define BIF_SHAREABLE 0x8000
+
+//the enums
+typedef enum {
+ SIATTRIBFLAGS_AND = 0x1,
+ SIATTRIBFLAGS_OR = 0x2,
+ SIATTRIBFLAGS_APPCOMPAT = 0x3,
+ SIATTRIBFLAGS_MASK = 0x3
+} SIATTRIBFLAGS;
+typedef enum {
+ SIGDN_NORMALDISPLAY = 0x00000000,
+ SIGDN_PARENTRELATIVEPARSING = 0x80018001,
+ SIGDN_PARENTRELATIVEFORADDRESSBAR = 0x8001c001,
+ SIGDN_DESKTOPABSOLUTEPARSING = 0x80028000,
+ SIGDN_PARENTRELATIVEEDITING = 0x80031001,
+ SIGDN_DESKTOPABSOLUTEEDITING = 0x8004c000,
+ SIGDN_FILESYSPATH = 0x80058000,
+ SIGDN_URL = 0x80068000
+} SIGDN;
+typedef enum {
+ FDAP_BOTTOM = 0x00000000,
+ FDAP_TOP = 0x00000001
+} FDAP;
+typedef enum {
+ FDESVR_DEFAULT = 0x00000000,
+ FDESVR_ACCEPT = 0x00000001,
+ FDESVR_REFUSE = 0x00000002
+} FDE_SHAREVIOLATION_RESPONSE;
+typedef FDE_SHAREVIOLATION_RESPONSE FDE_OVERWRITE_RESPONSE;
+
+//the structs
+typedef struct {
+ LPCWSTR pszName;
+ LPCWSTR pszSpec;
+} qt_COMDLG_FILTERSPEC;
+typedef struct {
+ GUID fmtid;
+ DWORD pid;
+} qt_PROPERTYKEY;
+
+typedef struct {
+ USHORT cb;
+ BYTE abID[1];
+} qt_SHITEMID, *qt_LPSHITEMID;
+typedef struct {
+ qt_SHITEMID mkid;
+} qt_ITEMIDLIST, *qt_LPITEMIDLIST;
+typedef const qt_ITEMIDLIST *qt_LPCITEMIDLIST;
+typedef struct {
+ HWND hwndOwner;
+ qt_LPCITEMIDLIST pidlRoot;
+ LPWSTR pszDisplayName;
+ LPCWSTR lpszTitle;
+ UINT ulFlags;
+ BFFCALLBACK lpfn;
+ LPARAM lParam;
+ int iImage;
+} qt_BROWSEINFO;
+
+DECLARE_INTERFACE(IFileDialogEvents);
+DECLARE_INTERFACE_(IShellItem, IUnknown)
+{
+ STDMETHOD(BindToHandler)(THIS_ IBindCtx *pbc, REFGUID bhid, REFIID riid, void **ppv) PURE;
+ STDMETHOD(GetParent)(THIS_ IShellItem **ppsi) PURE;
+ STDMETHOD(GetDisplayName)(THIS_ SIGDN sigdnName, LPWSTR *ppszName) PURE;
+ STDMETHOD(GetAttributes)(THIS_ ULONG sfgaoMask, ULONG *psfgaoAttribs) PURE;
+ STDMETHOD(Compare)(THIS_ IShellItem *psi, DWORD hint, int *piOrder) PURE;
+};
+DECLARE_INTERFACE_(IShellItemFilter, IUnknown)
+{
+ STDMETHOD(IncludeItem)(THIS_ IShellItem *psi) PURE;
+ STDMETHOD(GetEnumFlagsForItem)(THIS_ IShellItem *psi, DWORD *pgrfFlags) PURE;
+};
+DECLARE_INTERFACE_(IEnumShellItems, IUnknown)
+{
+ STDMETHOD(Next)(THIS_ ULONG celt, IShellItem **rgelt, ULONG *pceltFetched) PURE;
+ STDMETHOD(Skip)(THIS_ ULONG celt) PURE;
+ STDMETHOD(Reset)(THIS_) PURE;
+ STDMETHOD(Clone)(THIS_ IEnumShellItems **ppenum) PURE;
+};
+DECLARE_INTERFACE_(IShellItemArray, IUnknown)
+{
+ STDMETHOD(BindToHandler)(THIS_ IBindCtx *pbc, REFGUID rbhid, REFIID riid, void **ppvOut) PURE;
+ STDMETHOD(GetPropertyStore)(THIS_ GETPROPERTYSTOREFLAGS flags, REFIID riid, void **ppv) PURE;
+ STDMETHOD(GetPropertyDescriptionList)(THIS_ const qt_PROPERTYKEY *keyType, REFIID riid, void **ppv) PURE;
+ STDMETHOD(GetAttributes)(THIS_ SIATTRIBFLAGS dwAttribFlags, ULONG sfgaoMask, ULONG *psfgaoAttribs) PURE;
+ STDMETHOD(GetCount)(THIS_ DWORD *pdwNumItems) PURE;
+ STDMETHOD(GetItemAt)(THIS_ DWORD dwIndex, IShellItem **ppsi) PURE;
+ STDMETHOD(EnumItems)(THIS_ IEnumShellItems **ppenumShellItems) PURE;
+};
+DECLARE_INTERFACE_(IModalWindow, IUnknown)
+{
+ STDMETHOD(Show)(THIS_ HWND hwndParent) PURE;
+};
+DECLARE_INTERFACE_(IFileDialog, IModalWindow)
+{
+ STDMETHOD(SetFileTypes)(THIS_ UINT cFileTypes, const qt_COMDLG_FILTERSPEC *rgFilterSpec) PURE;
+ STDMETHOD(SetFileTypeIndex)(THIS_ UINT iFileType) PURE;
+ STDMETHOD(GetFileTypeIndex)(THIS_ UINT *piFileType) PURE;
+ STDMETHOD(Advise)(THIS_ IFileDialogEvents *pfde, DWORD *pdwCookie) PURE;
+ STDMETHOD(Unadvise)(THIS_ DWORD dwCookie) PURE;
+ STDMETHOD(SetOptions)(THIS_ DWORD fos) PURE;
+ STDMETHOD(GetOptions)(THIS_ DWORD *pfos) PURE;
+ STDMETHOD(SetDefaultFolder)(THIS_ IShellItem *psi) PURE;
+ STDMETHOD(SetFolder)(THIS_ IShellItem *psi) PURE;
+ STDMETHOD(GetFolder)(THIS_ IShellItem **ppsi) PURE;
+ STDMETHOD(GetCurrentSelection)(THIS_ IShellItem **ppsi) PURE;
+ STDMETHOD(SetFileName)(THIS_ LPCWSTR pszName) PURE;
+ STDMETHOD(GetFileName)(THIS_ LPWSTR *pszName) PURE;
+ STDMETHOD(SetTitle)(THIS_ LPCWSTR pszTitle) PURE;
+ STDMETHOD(SetOkButtonLabel)(THIS_ LPCWSTR pszText) PURE;
+ STDMETHOD(SetFileNameLabel)(THIS_ LPCWSTR pszLabel) PURE;
+ STDMETHOD(GetResult)(THIS_ IShellItem **ppsi) PURE;
+ STDMETHOD(AddPlace)(THIS_ IShellItem *psi, FDAP fdap) PURE;
+ STDMETHOD(SetDefaultExtension)(THIS_ LPCWSTR pszDefaultExtension) PURE;
+ STDMETHOD(Close)(THIS_ HRESULT hr) PURE;
+ STDMETHOD(SetClientGuid)(THIS_ REFGUID guid) PURE;
+ STDMETHOD(ClearClientData)(THIS_) PURE;
+ STDMETHOD(SetFilter)(THIS_ IShellItemFilter *pFilter) PURE;
+};
+DECLARE_INTERFACE_(IFileDialogEvents, IUnknown)
+{
+ STDMETHOD(OnFileOk)(THIS_ IFileDialog *pfd) PURE;
+ STDMETHOD(OnFolderChanging)(THIS_ IFileDialog *pfd, IShellItem *psiFolder) PURE;
+ STDMETHOD(OnFolderChange)(THIS_ IFileDialog *pfd) PURE;
+ STDMETHOD(OnSelectionChange)(THIS_ IFileDialog *pfd) PURE;
+ STDMETHOD(OnShareViolation)(THIS_ IFileDialog *pfd, IShellItem *psi, FDE_SHAREVIOLATION_RESPONSE *pResponse) PURE;
+ STDMETHOD(OnTypeChange)(THIS_ IFileDialog *pfd) PURE;
+ STDMETHOD(OnOverwrite)(THIS_ IFileDialog *pfd, IShellItem *psi, FDE_OVERWRITE_RESPONSE *pResponse) PURE;
+};
+DECLARE_INTERFACE_(IFileOpenDialog, IFileDialog)
+{
+ STDMETHOD(GetResults)(THIS_ IShellItemArray **ppenum) PURE;
+ STDMETHOD(GetSelectedItems)(THIS_ IShellItemArray **ppsai) PURE;
+};
+#endif \ No newline at end of file
diff --git a/src/gui/dialogs/qfileinfogatherer.cpp b/src/gui/dialogs/qfileinfogatherer.cpp
index 1f619578bb..c75cdfd2b7 100644
--- a/src/gui/dialogs/qfileinfogatherer.cpp
+++ b/src/gui/dialogs/qfileinfogatherer.cpp
@@ -354,6 +354,7 @@ void QFileInfoGatherer::getFileInfos(const QString &path, const QStringList &fil
}
if (!updatedFiles.isEmpty())
emit updates(path, updatedFiles);
+ emit directoryLoaded(path);
}
void QFileInfoGatherer::fetch(const QFileInfo &fileInfo, QTime &base, bool &firstTime, QList<QPair<QString, QFileInfo> > &updatedFiles, const QString &path) {
diff --git a/src/gui/dialogs/qfileinfogatherer_p.h b/src/gui/dialogs/qfileinfogatherer_p.h
index 0242178292..b8b58a2c75 100644
--- a/src/gui/dialogs/qfileinfogatherer_p.h
+++ b/src/gui/dialogs/qfileinfogatherer_p.h
@@ -155,6 +155,7 @@ Q_SIGNALS:
void updates(const QString &directory, const QList<QPair<QString, QFileInfo> > &updates);
void newListOfFiles(const QString &directory, const QStringList &listOfFiles) const;
void nameResolved(const QString &fileName, const QString &resolvedName) const;
+ void directoryLoaded(const QString &path);
public:
QFileInfoGatherer(QObject *parent = 0);
diff --git a/src/gui/dialogs/qfilesystemmodel.cpp b/src/gui/dialogs/qfilesystemmodel.cpp
index 6fd947ce3b..ba0a560725 100644
--- a/src/gui/dialogs/qfilesystemmodel.cpp
+++ b/src/gui/dialogs/qfilesystemmodel.cpp
@@ -51,6 +51,9 @@
#ifdef Q_OS_WIN
#include <qt_windows.h>
#endif
+#ifdef Q_OS_WIN32
+#include <QtCore/QVarLengthArray>
+#endif
QT_BEGIN_NAMESPACE
@@ -150,6 +153,14 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \since 4.7
+ \fn void QFileSystemModel::directoryLoaded(const QString &path)
+
+ This signal is emitted when the gatherer thread has finished to load the \a path.
+
+*/
+
+/*!
\fn bool QFileSystemModel::remove(const QModelIndex &index) const
Removes the model item \a index from the file system model and \bold{deletes the
@@ -270,53 +281,38 @@ QFileSystemModelPrivate::QFileSystemNode *QFileSystemModelPrivate::node(const QM
return indexNode;
}
-#ifdef Q_OS_WIN
+#ifdef Q_OS_WIN32
static QString qt_GetLongPathName(const QString &strShortPath)
{
- QString longPath;
- int i = 0;
- if (strShortPath == QLatin1String(".")
- || (strShortPath.startsWith(QLatin1String("//")))
- || (strShortPath.startsWith(QLatin1String("\\\\")))) // unc
+ if (strShortPath.isEmpty()
+ || strShortPath == QLatin1String(".") || strShortPath == QLatin1String(".."))
return strShortPath;
- QString::const_iterator it = strShortPath.constBegin();
- QString::const_iterator constEnd = strShortPath.constEnd();
- do {
- bool isSep = (*it == QLatin1Char('\\') || *it == QLatin1Char('/'));
- if (isSep || it == constEnd) {
- QString section = (it == constEnd ? strShortPath : strShortPath.left(i));
- // FindFirstFile does not handle volumes ("C:"), so we have to catch that ourselves.
- if (section.endsWith(QLatin1Char(':'))) {
- longPath.append(section.toUpper());
- } else {
- HANDLE h;
-#ifndef Q_OS_WINCE
- //We add the extend length prefix to handle long path
- QString longSection = QLatin1String("\\\\?\\")+QDir::toNativeSeparators(section);
-#else
- QString longSection = QDir::toNativeSeparators(section);
-#endif
- WIN32_FIND_DATA findData;
- h = ::FindFirstFile((wchar_t*)longSection.utf16(), &findData);
- if (h != INVALID_HANDLE_VALUE) {
- longPath.append(QString::fromWCharArray(findData.cFileName));
- ::FindClose(h);
- } else {
- longPath.append(section);
- break;
- }
- }
- if (it != constEnd)
- longPath.append(*it);
- else
- break;
- }
- ++it;
- if (isSep && it == constEnd) // break out if the last character is a separator
- break;
- ++i;
- } while (true);
- return longPath;
+ if (strShortPath.length() == 2 && strShortPath.endsWith(QLatin1Char(':')))
+ return strShortPath.toUpper();
+ const QString absPath = QDir(strShortPath).absolutePath();
+ if (absPath.startsWith(QLatin1String("//"))
+ || absPath.startsWith(QLatin1String("\\\\"))) // unc
+ return QDir::fromNativeSeparators(absPath);
+ if (absPath.startsWith(QLatin1Char('/')))
+ return QString();
+ const QString inputString = QLatin1String("\\\\?\\") + QDir::toNativeSeparators(absPath);
+ QVarLengthArray<TCHAR, MAX_PATH> buffer(MAX_PATH);
+ DWORD result = ::GetLongPathName((wchar_t*)inputString.utf16(),
+ buffer.data(),
+ buffer.size());
+ if (result > DWORD(buffer.size())) {
+ buffer.resize(result);
+ result = ::GetLongPathName((wchar_t*)inputString.utf16(),
+ buffer.data(),
+ buffer.size());
+ }
+ if (result > 4) {
+ QString longPath = QString::fromWCharArray(buffer.data() + 4); // ignoring prefix
+ longPath[0] = longPath.at(0).toUpper(); // capital drive letters
+ return QDir::fromNativeSeparators(longPath);
+ } else {
+ return QDir::fromNativeSeparators(strShortPath);
+ }
}
#endif
@@ -334,7 +330,7 @@ QFileSystemModelPrivate::QFileSystemNode *QFileSystemModelPrivate::node(const QS
// Construct the nodes up to the new root path if they need to be built
QString absolutePath;
-#ifdef Q_OS_WIN
+#ifdef Q_OS_WIN32
QString longPath = qt_GetLongPathName(path);
#else
QString longPath = path;
@@ -673,7 +669,7 @@ QVariant QFileSystemModel::data(const QModelIndex &index, int role) const
case Qt::EditRole:
case Qt::DisplayRole:
switch (index.column()) {
- case 0: return d->name(index);
+ case 0: return d->displayName(index);
case 1: return d->size(index);
case 2: return d->type(index);
case 3: return d->time(index);
@@ -789,13 +785,25 @@ QString QFileSystemModelPrivate::name(const QModelIndex &index) const
if (resolvedSymLinks.contains(fullPath))
return resolvedSymLinks[fullPath];
}
- // ### TODO it would be nice to grab the volume name if dirNode->parent == root
return dirNode->fileName;
}
/*!
\internal
*/
+QString QFileSystemModelPrivate::displayName(const QModelIndex &index) const
+{
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+ QFileSystemNode *dirNode = node(index);
+ if (!dirNode->volumeName.isNull())
+ return dirNode->volumeName + QLatin1String(" (") + name(index) + QLatin1Char(')');
+#endif
+ return name(index);
+}
+
+/*!
+ \internal
+*/
QIcon QFileSystemModelPrivate::icon(const QModelIndex &index) const
{
if (!index.isValid())
@@ -1337,7 +1345,11 @@ QModelIndex QFileSystemModel::setRootPath(const QString &newPath)
{
Q_D(QFileSystemModel);
#ifdef Q_OS_WIN
- QString longNewPath = QDir::fromNativeSeparators(qt_GetLongPathName(newPath));
+#ifdef Q_OS_WIN32
+ QString longNewPath = qt_GetLongPathName(newPath);
+#else
+ QString longNewPath = QDir::fromNativeSeparators(newPath);
+#endif
#else
QString longNewPath = newPath;
#endif
@@ -1640,6 +1652,18 @@ QFileSystemModelPrivate::QFileSystemNode* QFileSystemModelPrivate::addNode(QFile
#ifndef QT_NO_FILESYSTEMWATCHER
node->populate(info);
#endif
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+ //The parentNode is "" so we are listing the drives
+ if (parentNode->fileName.isEmpty()) {
+ wchar_t name[MAX_PATH + 1];
+ //GetVolumeInformation requires to add trailing backslash
+ const QString nodeName = fileName + QLatin1String("\\");
+ BOOL success = ::GetVolumeInformation((wchar_t *)(nodeName.utf16()),
+ name, MAX_PATH + 1, NULL, 0, NULL, NULL, 0);
+ if (success && name[0])
+ node->volumeName = QString::fromWCharArray(name);
+ }
+#endif
parentNode->children.insert(fileName, node);
return node;
}
@@ -1869,6 +1893,8 @@ void QFileSystemModelPrivate::init()
q, SLOT(_q_fileSystemChanged(QString,QList<QPair<QString,QFileInfo> >)));
q->connect(&fileInfoGatherer, SIGNAL(nameResolved(QString,QString)),
q, SLOT(_q_resolvedName(QString,QString)));
+ q->connect(&fileInfoGatherer, SIGNAL(directoryLoaded(QString)),
+ q, SIGNAL(directoryLoaded(QString)));
q->connect(&delayedSortTimer, SIGNAL(timeout()), q, SLOT(_q_performDelayedSort()), Qt::QueuedConnection);
}
diff --git a/src/gui/dialogs/qfilesystemmodel.h b/src/gui/dialogs/qfilesystemmodel.h
index 4dcfe26835..d8178c70b0 100644
--- a/src/gui/dialogs/qfilesystemmodel.h
+++ b/src/gui/dialogs/qfilesystemmodel.h
@@ -70,6 +70,7 @@ class Q_GUI_EXPORT QFileSystemModel : public QAbstractItemModel
Q_SIGNALS:
void rootPathChanged(const QString &newPath);
void fileRenamed(const QString &path, const QString &oldName, const QString &newName);
+ void directoryLoaded(const QString &path);
public:
enum Roles {
diff --git a/src/gui/dialogs/qfilesystemmodel_p.h b/src/gui/dialogs/qfilesystemmodel_p.h
index 6c85a7c348..03e0bfb8bd 100644
--- a/src/gui/dialogs/qfilesystemmodel_p.h
+++ b/src/gui/dialogs/qfilesystemmodel_p.h
@@ -97,6 +97,9 @@ public:
}
QString fileName;
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+ QString volumeName;
+#endif
inline qint64 size() const { if (info && !info->isDir()) return info->size(); return 0; }
inline QString type() const { if (info) return info->displayType; return QLatin1String(""); }
@@ -278,6 +281,7 @@ public:
QIcon icon(const QModelIndex &index) const;
QString name(const QModelIndex &index) const;
+ QString displayName(const QModelIndex &index) const;
QString filePath(const QModelIndex &index) const;
QString size(const QModelIndex &index) const;
static QString size(qint64 bytes);
diff --git a/src/gui/dialogs/qfontdialog.cpp b/src/gui/dialogs/qfontdialog.cpp
index a4bf15dff2..b159fa79a3 100644
--- a/src/gui/dialogs/qfontdialog.cpp
+++ b/src/gui/dialogs/qfontdialog.cpp
@@ -174,6 +174,11 @@ void QFontDialogPrivate::init()
{
Q_Q(QFontDialog);
+#ifdef Q_WS_MAC
+ nativeDialogInUse = false;
+ delegate = 0;
+#endif
+
q->setSizeGripEnabled(true);
q->setWindowTitle(QFontDialog::tr("Select Font"));
@@ -329,10 +334,6 @@ void QFontDialogPrivate::init()
familyList->setFocus();
retranslateStrings();
-
-#ifdef Q_WS_MAC
- delegate = 0;
-#endif
}
/*!
@@ -345,8 +346,7 @@ QFontDialog::~QFontDialog()
#ifdef Q_WS_MAC
Q_D(QFontDialog);
if (d->delegate) {
- QFontDialogPrivate::closeCocoaFontPanel(d->delegate);
- QFontDialogPrivate::sharedFontPanelAvailable = true;
+ d->closeCocoaFontPanel();
return;
}
#endif
@@ -428,14 +428,6 @@ QFont QFontDialog::getFont(bool *ok, QWidget *parent)
QFont QFontDialogPrivate::getFont(bool *ok, const QFont &initial, QWidget *parent,
const QString &title, QFontDialog::FontDialogOptions options)
{
-#ifdef Q_WS_MAC
- if (!(options & QFontDialog::DontUseNativeDialog)
- && QFontDialogPrivate::sharedFontPanelAvailable) {
- return QFontDialogPrivate::execCocoaFontPanel(ok, initial, parent,
- title.isEmpty() ? QFontDialog::tr("Select Font") : title, options);
- }
-#endif
-
QFontDialog dlg(parent);
dlg.setOptions(options);
dlg.setCurrentFont(initial);
@@ -988,13 +980,10 @@ void QFontDialog::open(QObject *receiver, const char *member)
*/
void QFontDialog::setVisible(bool visible)
{
- Q_D(QFontDialog);
- if (visible) {
- if (testAttribute(Qt::WA_WState_ExplicitShowHide) && !testAttribute(Qt::WA_WState_Hidden))
- return;
- } else if (testAttribute(Qt::WA_WState_ExplicitShowHide) && testAttribute(Qt::WA_WState_Hidden))
+ if (testAttribute(Qt::WA_WState_ExplicitShowHide) && testAttribute(Qt::WA_WState_Hidden) != visible)
return;
#ifdef Q_WS_MAC
+ Q_D(QFontDialog);
if (d->canBeNativeDialog()){
if (d->setVisible_sys(visible)){
d->nativeDialogInUse = true;
diff --git a/src/gui/dialogs/qfontdialog_mac.mm b/src/gui/dialogs/qfontdialog_mac.mm
index 67d32b8daf..919790b733 100644
--- a/src/gui/dialogs/qfontdialog_mac.mm
+++ b/src/gui/dialogs/qfontdialog_mac.mm
@@ -58,6 +58,14 @@
typedef float CGFloat; // Should only not be defined on 32-bit platforms
#endif
+QT_BEGIN_NAMESPACE
+
+extern void macStartInterceptNSPanelCtor();
+extern void macStopInterceptNSPanelCtor();
+extern NSButton *macCreateButton(const char *text, NSView *superview);
+extern bool qt_mac_is_macsheet(const QWidget *w); // qwidget_mac.mm
+
+QT_END_NAMESPACE
QT_USE_NAMESPACE
// should a priori be kept in sync with qcolordialog_mac.mm
@@ -95,7 +103,8 @@ const int StyleMask = NSTitledWindowMask | NSClosableWindowMask | NSResizableWin
BOOL mPanelHackedWithButtons;
CGFloat mDialogExtraWidth;
CGFloat mDialogExtraHeight;
- NSModalSession mModalSession;
+ int mReturnCode;
+ BOOL mAppModal;
}
- (id)initWithFontPanel:(NSFontPanel *)panel
stolenContentView:(NSView *)stolenContentView
@@ -104,9 +113,11 @@ const int StyleMask = NSTitledWindowMask | NSClosableWindowMask | NSResizableWin
priv:(QFontDialogPrivate *)priv
extraWidth:(CGFloat)extraWidth
extraHeight:(CGFloat)extraHeight;
+- (void)showModelessPanel;
+- (void)showWindowModalSheet:(QWidget *)docWidget;
+- (void)runApplicationModalPanel;
- (void)changeFont:(id)sender;
- (void)changeAttributes:(id)sender;
-- (void)setModalSession:(NSModalSession)session;
- (BOOL)windowShouldClose:(id)window;
- (NSSize)windowWillResize:(NSWindow *)window toSize:(NSSize)proposedFrameSize;
- (void)relayout;
@@ -163,7 +174,8 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont)
mPanelHackedWithButtons = (okButton != 0);
mDialogExtraWidth = extraWidth;
mDialogExtraHeight = extraHeight;
- mModalSession = 0;
+ mReturnCode = -1;
+ mAppModal = false;
if (mPanelHackedWithButtons) {
[self relayout];
@@ -174,6 +186,20 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont)
[cancelButton setAction:@selector(onCancelClicked)];
[cancelButton setTarget:self];
}
+
+#ifdef QT_MAC_USE_COCOA
+ // Stack the native dialog in front of its parent, if any:
+ QFontDialog *q = mPriv->fontDialog();
+ if (!qt_mac_is_macsheet(q)) {
+ if (QWidget *parent = q->parentWidget()) {
+ if (parent->isWindow()) {
+ [qt_mac_window_for(parent)
+ addChildWindow:[mStolenContentView window] ordered:NSWindowAbove];
+ }
+ }
+ }
+#endif
+
mQtFont = new QFont();
return self;
}
@@ -184,6 +210,50 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont)
[super dealloc];
}
+- (void)showModelessPanel
+{
+ mAppModal = false;
+ NSWindow *ourPanel = [mStolenContentView window];
+ [ourPanel makeKeyAndOrderFront:self];
+}
+
+- (void)runApplicationModalPanel
+{
+ QBoolBlocker nativeDialogOnTop(QApplicationPrivate::native_modal_dialog_active);
+ mAppModal = true;
+ NSWindow *ourPanel = [mStolenContentView window];
+ [NSApp runModalForWindow:ourPanel];
+ QAbstractEventDispatcher::instance()->interrupt();
+
+ if (mReturnCode == NSOKButton)
+ mPriv->fontDialog()->accept();
+ else
+ mPriv->fontDialog()->reject();
+}
+
+- (void)showWindowModalSheet:(QWidget *)docWidget
+{
+#ifdef QT_MAC_USE_COCOA
+ NSWindow *window = qt_mac_window_for(docWidget);
+#else
+ WindowRef hiwindowRef = qt_mac_window_for(docWidget);
+ NSWindow *window = [[NSWindow alloc] initWithWindowRef:hiwindowRef];
+ CFRetain(hiwindowRef);
+#endif
+
+ mAppModal = false;
+ NSWindow *ourPanel = [mStolenContentView window];
+ [NSApp beginSheet:ourPanel
+ modalForWindow:window
+ modalDelegate:0
+ didEndSelector:0
+ contextInfo:0 ];
+
+#ifndef QT_MAC_USE_COCOA
+ CFRelease(hiwindowRef);
+#endif
+}
+
- (void)changeFont:(id)sender
{
NSFont *dummyFont = [NSFont userFontOfSize:12.0];
@@ -216,12 +286,6 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont)
mPriv->updateSampleFont(*mQtFont);
}
-- (void)setModalSession:(NSModalSession)session
-{
- Q_ASSERT(!mModalSession);
- mModalSession = session;
-}
-
- (BOOL)windowShouldClose:(id)window
{
Q_UNUSED(window);
@@ -282,9 +346,8 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont)
NSSize cancelSizeHint = [mCancelButton frame].size;
const CGFloat ButtonWidth = qMin(qMax(ButtonMinWidth,
- qMax(okSizeHint.width, cancelSizeHint.width)),
- CGFloat((frameSize.width - 2.0 * ButtonSideMargin
- - ButtonSpacing) * 0.5));
+ qMax(okSizeHint.width, cancelSizeHint.width)),
+ CGFloat((frameSize.width - 2.0 * ButtonSideMargin - ButtonSpacing) * 0.5));
const CGFloat ButtonHeight = qMax(ButtonMinHeight,
qMax(okSizeHint.height, cancelSizeHint.height));
@@ -317,14 +380,12 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont)
NSFontManager *fontManager = [NSFontManager sharedFontManager];
[self setQtFont:qfontForCocoaFont([fontManager convertFont:[fontManager selectedFont]],
*mQtFont)];
- [[mStolenContentView window] close];
[self finishOffWithCode:NSOKButton];
}
- (void)onCancelClicked
{
Q_ASSERT(mPanelHackedWithButtons);
- [[mStolenContentView window] close];
[self finishOffWithCode:NSCancelButton];
}
@@ -368,20 +429,26 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont)
- (void)finishOffWithCode:(NSInteger)code
{
- if (mPriv) {
- if (mModalSession) {
- [NSApp endModalSession:mModalSession];
- mModalSession = 0;
+#ifdef QT_MAC_USE_COCOA
+ QFontDialog *q = mPriv->fontDialog();
+ if (QWidget *parent = q->parentWidget()) {
+ if (parent->isWindow()) {
+ [qt_mac_window_for(parent) removeChildWindow:[mStolenContentView window]];
}
- // Hack alert!
- // Since this code path was never intended to be followed when starting from exec
- // we need to force the dialog to communicate the new font, otherwise the signal
- // won't get emitted.
- if(code == NSOKButton)
- mPriv->sampleEdit->setFont([self qtFont]);
- mPriv->done((code == NSOKButton) ? QDialog::Accepted : QDialog::Rejected);
- } else {
+ }
+#endif
+
+ if(code == NSOKButton)
+ mPriv->sampleEdit->setFont([self qtFont]);
+
+ if (mAppModal) {
+ mReturnCode = code;
[NSApp stopModalWithCode:code];
+ } else {
+ if (code == NSOKButton)
+ mPriv->fontDialog()->accept();
+ else
+ mPriv->fontDialog()->reject();
}
}
@@ -408,206 +475,16 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont)
QT_BEGIN_NAMESPACE
-extern void macStartInterceptNSPanelCtor();
-extern void macStopInterceptNSPanelCtor();
-extern NSButton *macCreateButton(const char *text, NSView *superview);
-
-void *QFontDialogPrivate::openCocoaFontPanel(const QFont &initial,
- QWidget *parent, const QString &title, QFontDialog::FontDialogOptions options,
- QFontDialogPrivate *priv)
-{
- Q_UNUSED(parent); // we would use the parent if only NSFontPanel could be a sheet
- QMacCocoaAutoReleasePool pool;
-
- /*
- The standard Cocoa font panel has no OK or Cancel button and
- is created as a utility window. For strange reasons (which seem
- to stem from the fact that the font panel is based on a NIB
- file), the approach we use for the color panel doesn't work for
- the font panel (and, inversely, the approach we use here doesn't
- quite work for color panel, and crashed last time I tried). So
- instead, we take the following steps:
-
- 1. Constructs a plain NSPanel that looks the way we want it
- to look. Specifically, if the NoButtons option is off, we
- construct a panel without the NSUtilityWindowMask flag
- and with buttons (OK and Cancel).
-
- 2. Steal the content view from the shared NSFontPanel and
- put it inside our new NSPanel's content view, together
- with the OK and Cancel buttons.
-
- 3. Lay out the original content view and the buttons when
- the font panel is shown and whenever it is resized.
-
- 4. Clean up after ourselves.
-
- PS. Some customization is also done in QCocoaApplication
- validModesForFontPanel:.
- */
-
- Qt::WindowModality modality = Qt::ApplicationModal;
- if (priv)
- modality = priv->fontDialog()->windowModality();
-
- bool needButtons = !(options & QFontDialog::NoButtons);
- // don't need our own panel if the title bar isn't visible anyway (in a sheet)
- bool needOwnPanel = (needButtons && modality != Qt::WindowModal);
-
- bool sharedFontPanelExisted = [NSFontPanel sharedFontPanelExists];
- NSFontPanel *sharedFontPanel = [NSFontPanel sharedFontPanel];
- [sharedFontPanel setHidesOnDeactivate:false];
-
- // hack to ensure that QCocoaApplication's validModesForFontPanel:
- // implementation is honored
- if (!sharedFontPanelExisted && needOwnPanel) {
- [sharedFontPanel makeKeyAndOrderFront:sharedFontPanel];
- [sharedFontPanel close];
- }
-
- NSPanel *ourPanel = 0;
- NSView *stolenContentView = 0;
- NSButton *okButton = 0;
- NSButton *cancelButton = 0;
-
- CGFloat dialogExtraWidth = 0.0;
- CGFloat dialogExtraHeight = 0.0;
-
- if (!needOwnPanel) {
- // we can reuse the NSFontPanel unchanged
- ourPanel = sharedFontPanel;
- } else {
- // compute dialogExtra{Width,Height}
- dialogExtraWidth = 2.0 * DialogSideMargin;
- dialogExtraHeight = DialogTopMargin + ButtonTopMargin + ButtonMinHeight
- + ButtonBottomMargin;
-
- // compute initial contents rectangle
- NSRect contentRect = [sharedFontPanel contentRectForFrameRect:[sharedFontPanel frame]];
- contentRect.size.width += dialogExtraWidth;
- contentRect.size.height += dialogExtraHeight;
-
- // create the new panel
- ourPanel = [[NSPanel alloc] initWithContentRect:contentRect
- styleMask:StyleMask
- backing:NSBackingStoreBuffered
- defer:YES];
- [ourPanel setReleasedWhenClosed:YES];
- }
-
- stolenContentView = [sharedFontPanel contentView];
-
- if (needButtons) {
- // steal the font panel's contents view
- [stolenContentView retain];
- [sharedFontPanel setContentView:0];
-
- // create a new content view and add the stolen one as a subview
- NSRect frameRect = { { 0.0, 0.0 }, { 0.0, 0.0 } };
- NSView *ourContentView = [[NSView alloc] initWithFrame:frameRect];
- [ourContentView addSubview:stolenContentView];
-
- // create OK and Cancel buttons and add these as subviews
- okButton = macCreateButton("&OK", ourContentView);
- cancelButton = macCreateButton("Cancel", ourContentView);
-
- [ourPanel setContentView:ourContentView];
- [ourPanel setDefaultButtonCell:[okButton cell]];
- }
-
- // create a delegate and set it
- QCocoaFontPanelDelegate *delegate =
- [[QCocoaFontPanelDelegate alloc] initWithFontPanel:sharedFontPanel
- stolenContentView:stolenContentView
- okButton:okButton
- cancelButton:cancelButton
- priv:priv
- extraWidth:dialogExtraWidth
- extraHeight:dialogExtraHeight];
- [ourPanel setDelegate:delegate];
- [[NSFontManager sharedFontManager] setDelegate:delegate];
-#ifdef QT_MAC_USE_COCOA
- [[NSFontManager sharedFontManager] setTarget:delegate];
-#endif
- setFont(delegate, initial);
-
- // hack to get correct initial layout
- NSRect frameRect = [ourPanel frame];
- frameRect.size.width += 1.0;
- [ourPanel setFrame:frameRect display:NO];
- frameRect.size.width -= 1.0;
- frameRect.size = [delegate windowWillResize:ourPanel toSize:frameRect.size];
- [ourPanel setFrame:frameRect display:NO];
- [ourPanel center];
-
- [ourPanel setTitle:(NSString*)(CFStringRef)QCFString(title)];
-
- if (priv) {
- switch (modality) {
- case Qt::WindowModal:
- if (parent) {
-#ifndef QT_MAC_USE_COCOA
- WindowRef hiwindowRef = qt_mac_window_for(parent);
- NSWindow *window =
- [[NSWindow alloc] initWithWindowRef:hiwindowRef];
- // Cocoa docs say I should retain the Carbon ref.
- CFRetain(hiwindowRef);
-#else
- NSWindow *window = qt_mac_window_for(parent);
-#endif
- [NSApp beginSheet:ourPanel
- modalForWindow:window
- modalDelegate:0
- didEndSelector:0
- contextInfo:0];
-#ifndef QT_MAC_USE_COCOA
- [window release];
-#endif
- break;
- }
- // fallthrough
- case Qt::ApplicationModal:
- [delegate setModalSession:[NSApp beginModalSessionForWindow:ourPanel]];
- break;
- default:
- [ourPanel makeKeyAndOrderFront:ourPanel];
- }
- }
- return delegate;
-}
-
-void QFontDialogPrivate::closeCocoaFontPanel(void *delegate)
+void QFontDialogPrivate::closeCocoaFontPanel()
{
QMacCocoaAutoReleasePool pool;
QCocoaFontPanelDelegate *theDelegate = static_cast<QCocoaFontPanelDelegate *>(delegate);
NSWindow *ourPanel = [theDelegate actualPanel];
[ourPanel close];
[theDelegate cleanUpAfterMyself];
- [theDelegate autorelease];
-}
-
-QFont QFontDialogPrivate::execCocoaFontPanel(bool *ok, const QFont &initial,
- QWidget *parent, const QString &title, QFontDialog::FontDialogOptions options)
-{
- QMacCocoaAutoReleasePool pool;
- QCocoaFontPanelDelegate *delegate =
- static_cast<QCocoaFontPanelDelegate *>(
- openCocoaFontPanel(initial, parent, title, options));
- NSWindow *ourPanel = [delegate actualPanel];
- [ourPanel retain];
- int rval = [NSApp runModalForWindow:ourPanel];
- QFont font([delegate qtFont]);
- [ourPanel release];
- [delegate cleanUpAfterMyself];
- [delegate release];
- bool isOk = ((options & QFontDialog::NoButtons) || rval == NSOKButton);
- if (ok)
- *ok = isOk;
- if (isOk) {
- return font;
- } else {
- return initial;
- }
+ [theDelegate release];
+ this->delegate = 0;
+ sharedFontPanelAvailable = true;
}
void QFontDialogPrivate::setFont(void *delegate, const QFont &font)
@@ -645,10 +522,13 @@ void QFontDialogPrivate::setFont(void *delegate, const QFont &font)
[static_cast<QCocoaFontPanelDelegate *>(delegate) setQtFont:font];
}
-void *QFontDialogPrivate::_q_constructNativePanel()
+void QFontDialogPrivate::createNSFontPanelDelegate()
{
- QMacCocoaAutoReleasePool pool;
+ if (delegate)
+ return;
+ sharedFontPanelAvailable = false;
+ QMacCocoaAutoReleasePool pool;
bool sharedFontPanelExisted = [NSFontPanel sharedFontPanelExists];
NSFontPanel *sharedFontPanel = [NSFontPanel sharedFontPanel];
[sharedFontPanel setHidesOnDeactivate:false];
@@ -670,8 +550,7 @@ void *QFontDialogPrivate::_q_constructNativePanel()
// compute dialogExtra{Width,Height}
dialogExtraWidth = 2.0 * DialogSideMargin;
- dialogExtraHeight = DialogTopMargin + ButtonTopMargin + ButtonMinHeight
- + ButtonBottomMargin;
+ dialogExtraHeight = DialogTopMargin + ButtonTopMargin + ButtonMinHeight + ButtonBottomMargin;
// compute initial contents rectangle
NSRect contentRect = [sharedFontPanel contentRectForFrameRect:[sharedFontPanel frame]];
@@ -684,7 +563,6 @@ void *QFontDialogPrivate::_q_constructNativePanel()
backing:NSBackingStoreBuffered
defer:YES];
[ourPanel setReleasedWhenClosed:YES];
-
stolenContentView = [sharedFontPanel contentView];
// steal the font panel's contents view
@@ -704,21 +582,23 @@ void *QFontDialogPrivate::_q_constructNativePanel()
[ourPanel setContentView:ourContentView];
[ourPanel setDefaultButtonCell:[okButton cell]];
}
- // create a delegate and set it
- QCocoaFontPanelDelegate *delegate =
- [[QCocoaFontPanelDelegate alloc] initWithFontPanel:sharedFontPanel
+
+ // create the delegate and set it
+ QCocoaFontPanelDelegate *del = [[QCocoaFontPanelDelegate alloc] initWithFontPanel:sharedFontPanel
stolenContentView:stolenContentView
okButton:okButton
cancelButton:cancelButton
priv:this
extraWidth:dialogExtraWidth
extraHeight:dialogExtraHeight];
- [ourPanel setDelegate:delegate];
- [[NSFontManager sharedFontManager] setDelegate:delegate];
+ delegate = del;
+ [ourPanel setDelegate:del];
+
+ [[NSFontManager sharedFontManager] setDelegate:del];
#ifdef QT_MAC_USE_COCOA
- [[NSFontManager sharedFontManager] setTarget:delegate];
+ [[NSFontManager sharedFontManager] setTarget:del];
#endif
- setFont(delegate, QApplication::font());
+ setFont(del, q_func()->currentFont());
{
// hack to get correct initial layout
@@ -726,15 +606,12 @@ void *QFontDialogPrivate::_q_constructNativePanel()
frameRect.size.width += 1.0;
[ourPanel setFrame:frameRect display:NO];
frameRect.size.width -= 1.0;
- frameRect.size = [delegate windowWillResize:ourPanel toSize:frameRect.size];
+ frameRect.size = [del windowWillResize:ourPanel toSize:frameRect.size];
[ourPanel setFrame:frameRect display:NO];
[ourPanel center];
}
NSString *title = @"Select font";
[ourPanel setTitle:title];
-
- [delegate setModalSession:[NSApp beginModalSessionForWindow:ourPanel]];
- return delegate;
}
void QFontDialogPrivate::mac_nativeDialogModalHelp()
@@ -759,29 +636,47 @@ void QFontDialogPrivate::mac_nativeDialogModalHelp()
// and "adding" the buttons.
void QFontDialogPrivate::_q_macRunNativeAppModalPanel()
{
- QBoolBlocker nativeDialogOnTop(QApplicationPrivate::native_modal_dialog_active);
+ createNSFontPanelDelegate();
+ QCocoaFontPanelDelegate *del = static_cast<QCocoaFontPanelDelegate *>(delegate);
+ [del runApplicationModalPanel];
+}
+
+bool QFontDialogPrivate::showCocoaFontPanel()
+{
+ if (!sharedFontPanelAvailable)
+ return false;
+
Q_Q(QFontDialog);
- QCocoaFontPanelDelegate *delegate = (QCocoaFontPanelDelegate *)_q_constructNativePanel();
- NSWindow *ourPanel = [delegate actualPanel];
- [ourPanel retain];
- int rval = [NSApp runModalForWindow:ourPanel];
- QAbstractEventDispatcher::instance()->interrupt();
- [ourPanel release];
- [delegate cleanUpAfterMyself];
- [delegate release];
- bool isOk = (rval == NSOKButton);
- if(isOk)
- rescode = QDialog::Accepted;
+ QMacCocoaAutoReleasePool pool;
+ createNSFontPanelDelegate();
+ QCocoaFontPanelDelegate *del = static_cast<QCocoaFontPanelDelegate *>(delegate);
+ if (qt_mac_is_macsheet(q))
+ [del showWindowModalSheet:q->parentWidget()];
else
- rescode = QDialog::Rejected;
+ [del showModelessPanel];
+ return true;
}
+bool QFontDialogPrivate::hideCocoaFontPanel()
+{
+ if (!delegate){
+ // Nothing to do. We return false to leave the question
+ // open regarding whether or not to go native:
+ return false;
+ } else {
+ closeCocoaFontPanel();
+ // Even when we hide it, we are still using a
+ // native dialog, so return true:
+ return true;
+ }
+}
bool QFontDialogPrivate::setVisible_sys(bool visible)
{
Q_Q(QFontDialog);
if (!visible == q->isHidden())
return false;
- return visible;
+
+ return visible ? showCocoaFontPanel() : hideCocoaFontPanel();
}
QT_END_NAMESPACE
diff --git a/src/gui/dialogs/qfontdialog_p.h b/src/gui/dialogs/qfontdialog_p.h
index 7654a80f7c..8676be360f 100644
--- a/src/gui/dialogs/qfontdialog_p.h
+++ b/src/gui/dialogs/qfontdialog_p.h
@@ -139,25 +139,21 @@ public:
QByteArray memberToDisconnectOnClose;
#ifdef Q_WS_MAC
- static void *openCocoaFontPanel(const QFont &initial,
- QWidget *parent, const QString &title,
- QFontDialog::FontDialogOptions options,
- QFontDialogPrivate *priv = 0);
- static void closeCocoaFontPanel(void *delegate);
- static QFont execCocoaFontPanel(bool *ok, const QFont &initial, QWidget *parent,
- const QString &title, QFontDialog::FontDialogOptions options);
static void setFont(void *delegate, const QFont &font);
inline void done(int result) { q_func()->done(result); }
inline QFontDialog *fontDialog() { return q_func(); }
void *delegate;
+ void closeCocoaFontPanel();
bool nativeDialogInUse;
bool canBeNativeDialog();
bool setVisible_sys(bool visible);
- void *_q_constructNativePanel();
+ void createNSFontPanelDelegate();
void _q_macRunNativeAppModalPanel();
void mac_nativeDialogModalHelp();
+ bool showCocoaFontPanel();
+ bool hideCocoaFontPanel();
static bool sharedFontPanelAvailable;
#endif
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp
index bd2df9c5ec..121ba62d47 100644
--- a/src/gui/dialogs/qmessagebox.cpp
+++ b/src/gui/dialogs/qmessagebox.cpp
@@ -92,8 +92,8 @@ public:
{
#ifndef QT_NO_CONTEXTMENU
QMenu *menu = createStandardContextMenu();
- menu->exec(e->globalPos());
- delete menu;
+ menu->setAttribute(Qt::WA_DeleteOnClose);
+ menu->popup(e->globalPos());
#else
Q_UNUSED(e);
#endif
diff --git a/src/gui/dialogs/qprintdialog_qws.cpp b/src/gui/dialogs/qprintdialog_qws.cpp
index 6b531a2659..b071427b4e 100644
--- a/src/gui/dialogs/qprintdialog_qws.cpp
+++ b/src/gui/dialogs/qprintdialog_qws.cpp
@@ -163,7 +163,7 @@ void QPrintDialogPrivate::_q_okClicked()
printer->setPaperSize(pageSize);
printer->setPageOrder(pageOrder2);
printer->setColorMode(colorMode2);
- printer->setNumCopies(numCopies);
+ printer->setCopyCount(numCopies);
switch ((rangeCombo->itemData(rangeCombo->currentIndex())).toInt()){
case (int)QPrintDialog::AllPages:
@@ -178,6 +178,10 @@ void QPrintDialogPrivate::_q_okClicked()
q->setPrintRange(QPrintDialog::PageRange);
q->setFromTo(firstPage->value(), lastPage->value());
break;
+ case (int)QPrintDialog::CurrentPage:
+ q->setPrintRange(QPrintDialog::CurrentPage);
+ q->setFromTo(0, 0);
+ break;
}
q->accept();
}
@@ -375,6 +379,7 @@ void QPrintDialogPrivate::setupOptions()
rangeCombo->addItem(QPrintDialog::tr("Print all"), QPrintDialog::AllPages);
rangeCombo->addItem(QPrintDialog::tr("Print selection"), QPrintDialog::Selection);
rangeCombo->addItem(QPrintDialog::tr("Print range"), QPrintDialog::PageRange);
+ rangeCombo->addItem(QPrintDialog::tr("Print current page"), QPrintDialog::CurrentPage);
QObject::connect(rangeCombo, SIGNAL(activated(int)),
q, SLOT(_q_printRangeSelected(int)));
@@ -479,8 +484,8 @@ void QPrintDialogPrivate::setPrinter(QPrinter *p, bool pickUpSettings)
printGray->setChecked(true);
// number of copies
- copies->setValue(p->numCopies());
- _q_setNumCopies(p->numCopies());
+ copies->setValue(p->copyCount());
+ _q_setNumCopies(p->copyCount());
}
if (p) {
@@ -490,6 +495,9 @@ void QPrintDialogPrivate::setPrinter(QPrinter *p, bool pickUpSettings)
if (!q->isOptionEnabled(QPrintDialog::PrintPageRange)
&& rangeCombo->findData(QPrintDialog::PageRange) > 0)
rangeCombo->removeItem(rangeCombo->findData(QPrintDialog::PageRange));
+ if (!q->isOptionEnabled(QPrintDialog::PrintCurrentPage)
+ && rangeCombo->findData(QPrintDialog::CurrentPage) > 0)
+ rangeCombo->removeItem(rangeCombo->findData(QPrintDialog::CurrentPage));
switch (q->printRange()) {
case QPrintDialog::AllPages:
@@ -501,6 +509,9 @@ void QPrintDialogPrivate::setPrinter(QPrinter *p, bool pickUpSettings)
case QPrintDialog::PageRange:
rangeCombo->setCurrentIndex((int)(QPrintDialog::PageRange));
break;
+ case QPrintDialog::CurrentPage:
+ rangeCombo->setCurrentIndex((int)(QPrintDialog::CurrentPage));
+ break;
}
}
diff --git a/src/gui/dialogs/qprintdialog_unix.cpp b/src/gui/dialogs/qprintdialog_unix.cpp
index 00dc3e62e5..17283f5d55 100644
--- a/src/gui/dialogs/qprintdialog_unix.cpp
+++ b/src/gui/dialogs/qprintdialog_unix.cpp
@@ -72,8 +72,6 @@
QT_BEGIN_NAMESPACE
-extern int qt_printerRealNumCopies(QPaintEngine *);
-
class QOptionTreeItem;
class QPPDOptionsModel;
@@ -442,7 +440,7 @@ void QPrintDialogPrivate::applyPrinterProperties(QPrinter *p)
case QPrinter::DuplexShortSide:
options.duplexShort->setChecked(true); break;
}
- options.copies->setValue(qt_printerRealNumCopies(p->paintEngine()));
+ options.copies->setValue(p->copyCount());
options.collate->setChecked(p->collateCopies());
options.reverse->setChecked(p->pageOrder() == QPrinter::LastPageFirst);
top->d->applyPrinterProperties(p);
@@ -507,13 +505,16 @@ void QPrintDialogPrivate::setupPrinter()
} else if (options.printSelection->isChecked()) {
p->setPrintRange(QPrinter::Selection);
p->setFromTo(0,0);
+ } else if (options.printCurrentPage->isChecked()) {
+ p->setPrintRange(QPrinter::CurrentPage);
+ p->setFromTo(0,0);
} else if (options.printRange->isChecked()) {
p->setPrintRange(QPrinter::PageRange);
p->setFromTo(options.from->value(), qMax(options.from->value(), options.to->value()));
}
// copies
- p->setNumCopies(options.copies->value());
+ p->setCopyCount(options.copies->value());
p->setCollateCopies(options.collate->isChecked());
top->d->setupPrinter();
@@ -523,10 +524,12 @@ void QPrintDialogPrivate::updateWidgets()
{
Q_Q(QPrintDialog);
options.gbPrintRange->setVisible(q->isOptionEnabled(QPrintDialog::PrintPageRange) ||
- q->isOptionEnabled(QPrintDialog::PrintSelection));
+ q->isOptionEnabled(QPrintDialog::PrintSelection) ||
+ q->isOptionEnabled(QPrintDialog::PrintCurrentPage));
options.printRange->setEnabled(q->isOptionEnabled(QPrintDialog::PrintPageRange));
options.printSelection->setVisible(q->isOptionEnabled(QPrintDialog::PrintSelection));
+ options.printCurrentPage->setVisible(q->isOptionEnabled(QPrintDialog::PrintCurrentPage));
options.collate->setVisible(q->isOptionEnabled(QPrintDialog::PrintCollateCopies));
switch (q->printRange()) {
@@ -539,6 +542,10 @@ void QPrintDialogPrivate::updateWidgets()
case QPrintDialog::PageRange:
options.printRange->setChecked(true);
break;
+ case QPrintDialog::CurrentPage:
+ if (q->isOptionEnabled(QPrintDialog::PrintCurrentPage))
+ options.printCurrentPage->setChecked(true);
+ break;
default:
break;
}
diff --git a/src/gui/dialogs/qprintdialog_win.cpp b/src/gui/dialogs/qprintdialog_win.cpp
index 5ccd33d27b..10616605ac 100644
--- a/src/gui/dialogs/qprintdialog_win.cpp
+++ b/src/gui/dialogs/qprintdialog_win.cpp
@@ -52,7 +52,7 @@
#include <private/qprintengine_win_p.h>
#include <private/qprinter_p.h>
-#if defined(Q_CC_MINGW) && !defined(PD_NOCURRENTPAGE)
+#if !defined(PD_NOCURRENTPAGE)
#define PD_NOCURRENTPAGE 0x00800000
#define PD_RESULT_PRINT 1
#define PD_RESULT_APPLY 2
@@ -128,11 +128,14 @@ static void qt_win_setup_PRINTDLGEX(PRINTDLGEX *pd, QWidget *parent,
if (pd->nMinPage==0 && pd->nMaxPage==0)
pd->Flags |= PD_NOPAGENUMS;
- // we don't have a 'current page' notion in the QPrinter API yet.
- // Neither do we support more than one page range, so limit those
- // options
- pd->Flags |= PD_NOCURRENTPAGE;
+ // Disable Current Page option if not required as default is Enabled
+ if (!pdlg->isOptionEnabled(QPrintDialog::PrintCurrentPage))
+ pd->Flags |= PD_NOCURRENTPAGE;
+
+ // Default to showing the General tab first
pd->nStartPage = START_PAGE_GENERAL;
+
+ // We don't support more than one page range in the QPrinter API yet.
pd->nPageRanges = 1;
pd->nMaxPageRanges = 1;
@@ -153,7 +156,10 @@ static void qt_win_read_back_PRINTDLGEX(PRINTDLGEX *pd, QPrintDialog *pdlg, QPri
} else if (pd->Flags & PD_PAGENUMS) {
pdlg->setPrintRange(QPrintDialog::PageRange);
pdlg->setFromTo(pd->lpPageRanges[0].nFromPage, pd->lpPageRanges[0].nToPage);
- } else {
+ } else if (pd->Flags & PD_CURRENTPAGE) {
+ pdlg->setPrintRange(QPrintDialog::CurrentPage);
+ pdlg->setFromTo(0, 0);
+ } else { // PD_ALLPAGES
pdlg->setPrintRange(QPrintDialog::AllPages);
pdlg->setFromTo(0, 0);
}
diff --git a/src/gui/dialogs/qprintsettingsoutput.ui b/src/gui/dialogs/qprintsettingsoutput.ui
index fc57e863f9..be916790fb 100644
--- a/src/gui/dialogs/qprintsettingsoutput.ui
+++ b/src/gui/dialogs/qprintsettingsoutput.ui
@@ -1,121 +1,114 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>QPrintSettingsOutput</class>
- <widget class="QWidget" name="QPrintSettingsOutput" >
- <property name="geometry" >
+ <widget class="QWidget" name="QPrintSettingsOutput">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>416</width>
- <height>166</height>
+ <width>426</width>
+ <height>171</height>
</rect>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>Form</string>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout_2" >
- <property name="margin" >
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <property name="margin">
<number>0</number>
</property>
<item>
- <widget class="QTabWidget" name="tabs" >
- <property name="currentIndex" >
+ <widget class="QTabWidget" name="tabs">
+ <property name="currentIndex">
<number>0</number>
</property>
- <widget class="QWidget" name="copiesTab" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>412</width>
- <height>139</height>
- </rect>
- </property>
- <attribute name="title" >
+ <widget class="QWidget" name="copiesTab">
+ <attribute name="title">
<string>Copies</string>
</attribute>
- <layout class="QHBoxLayout" name="horizontalLayout" >
+ <layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <widget class="QGroupBox" name="gbPrintRange" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
+ <widget class="QGroupBox" name="gbPrintRange">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="title" >
+ <property name="title">
<string>Print range</string>
</property>
- <layout class="QVBoxLayout" name="_3" >
- <property name="spacing" >
+ <layout class="QVBoxLayout" name="_3">
+ <property name="spacing">
<number>4</number>
</property>
- <property name="margin" >
+ <property name="margin">
<number>6</number>
</property>
<item>
- <widget class="QRadioButton" name="printAll" >
- <property name="text" >
+ <widget class="QRadioButton" name="printAll">
+ <property name="text">
<string>Print all</string>
</property>
- <property name="checked" >
+ <property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
- <layout class="QHBoxLayout" name="_4" >
- <property name="spacing" >
+ <layout class="QHBoxLayout" name="_4">
+ <property name="spacing">
<number>6</number>
</property>
- <property name="margin" >
+ <property name="margin">
<number>0</number>
</property>
<item>
- <widget class="QRadioButton" name="printRange" >
- <property name="text" >
+ <widget class="QRadioButton" name="printRange">
+ <property name="text">
<string>Pages from</string>
</property>
</widget>
</item>
<item>
- <widget class="QSpinBox" name="from" >
- <property name="enabled" >
+ <widget class="QSpinBox" name="from">
+ <property name="enabled">
<bool>false</bool>
</property>
- <property name="minimum" >
+ <property name="minimum">
<number>1</number>
</property>
- <property name="maximum" >
+ <property name="maximum">
<number>999</number>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="label_3" >
- <property name="text" >
+ <widget class="QLabel" name="label_3">
+ <property name="text">
<string>to</string>
</property>
</widget>
</item>
<item>
- <widget class="QSpinBox" name="to" >
- <property name="enabled" >
+ <widget class="QSpinBox" name="to">
+ <property name="enabled">
<bool>false</bool>
</property>
- <property name="minimum" >
+ <property name="minimum">
<number>1</number>
</property>
- <property name="maximum" >
+ <property name="maximum">
<number>999</number>
</property>
</widget>
</item>
<item>
<spacer>
- <property name="orientation" >
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
@@ -126,18 +119,25 @@
</layout>
</item>
<item>
- <widget class="QRadioButton" name="printSelection" >
- <property name="text" >
+ <widget class="QRadioButton" name="printCurrentPage">
+ <property name="text">
+ <string>Current Page</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="printSelection">
+ <property name="text">
<string>Selection</string>
</property>
</widget>
</item>
<item>
- <spacer name="verticalSpacer" >
- <property name="orientation" >
+ <spacer name="verticalSpacer">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>1</height>
@@ -149,37 +149,37 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="groupBox" >
- <property name="title" >
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
<string>Output Settings</string>
</property>
- <layout class="QGridLayout" name="gridLayout" >
- <item row="0" column="0" >
- <widget class="QLabel" name="label" >
- <property name="text" >
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
<string>Copies:</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>copies</cstring>
</property>
</widget>
</item>
- <item row="0" column="1" colspan="2" >
- <widget class="QSpinBox" name="copies" >
- <property name="minimum" >
+ <item row="0" column="1" colspan="2">
+ <widget class="QSpinBox" name="copies">
+ <property name="minimum">
<number>1</number>
</property>
- <property name="maximum" >
+ <property name="maximum">
<number>999</number>
</property>
</widget>
</item>
- <item row="0" column="3" >
- <spacer name="horizontalSpacer" >
- <property name="orientation" >
+ <item row="0" column="3">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>91</width>
<height>20</height>
@@ -187,36 +187,36 @@
</property>
</spacer>
</item>
- <item row="1" column="0" colspan="2" >
- <widget class="QCheckBox" name="collate" >
- <property name="text" >
+ <item row="1" column="0" colspan="2">
+ <widget class="QCheckBox" name="collate">
+ <property name="text">
<string>Collate</string>
</property>
</widget>
</item>
- <item rowspan="2" row="1" column="2" colspan="2" >
- <widget class="QLabel" name="outputIcon" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Ignored" hsizetype="Ignored" >
+ <item row="1" column="2" rowspan="2" colspan="2">
+ <widget class="QLabel" name="outputIcon">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Ignored" vsizetype="Ignored">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
- <item row="2" column="0" colspan="2" >
- <widget class="QCheckBox" name="reverse" >
- <property name="text" >
+ <item row="2" column="0" colspan="2">
+ <widget class="QCheckBox" name="reverse">
+ <property name="text">
<string>Reverse</string>
</property>
</widget>
</item>
- <item row="3" column="0" colspan="4" >
- <spacer name="verticalSpacer_2" >
- <property name="orientation" >
+ <item row="3" column="0" colspan="4">
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>1</height>
@@ -229,31 +229,23 @@
</item>
</layout>
</widget>
- <widget class="QWidget" name="optionsTab" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>412</width>
- <height>139</height>
- </rect>
- </property>
- <attribute name="title" >
+ <widget class="QWidget" name="optionsTab">
+ <attribute name="title">
<string>Options</string>
</attribute>
- <layout class="QGridLayout" name="gridLayout_2" >
- <item row="0" column="1" >
- <widget class="QGroupBox" name="colorMode" >
- <property name="title" >
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="1">
+ <widget class="QGroupBox" name="colorMode">
+ <property name="title">
<string>Color Mode</string>
</property>
- <layout class="QGridLayout" name="gridLayout_4" >
- <item row="2" column="0" >
- <spacer name="verticalSpacer_6" >
- <property name="orientation" >
+ <layout class="QGridLayout" name="gridLayout_4">
+ <item row="2" column="0">
+ <spacer name="verticalSpacer_6">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>0</height>
@@ -261,19 +253,19 @@
</property>
</spacer>
</item>
- <item row="0" column="0" >
- <widget class="QRadioButton" name="color" >
- <property name="text" >
+ <item row="0" column="0">
+ <widget class="QRadioButton" name="color">
+ <property name="text">
<string>Color</string>
</property>
</widget>
</item>
- <item rowspan="3" row="0" column="1" >
- <widget class="QLabel" name="colorIcon" />
+ <item row="0" column="1" rowspan="3">
+ <widget class="QLabel" name="colorIcon"/>
</item>
- <item row="1" column="0" >
- <widget class="QRadioButton" name="grayscale" >
- <property name="text" >
+ <item row="1" column="0">
+ <widget class="QRadioButton" name="grayscale">
+ <property name="text">
<string>Grayscale</string>
</property>
</widget>
@@ -281,42 +273,42 @@
</layout>
</widget>
</item>
- <item row="0" column="0" >
- <widget class="QGroupBox" name="duplex" >
- <property name="title" >
+ <item row="0" column="0">
+ <widget class="QGroupBox" name="duplex">
+ <property name="title">
<string>Duplex Printing</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout" >
+ <layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="QRadioButton" name="noDuplex" >
- <property name="text" >
+ <widget class="QRadioButton" name="noDuplex">
+ <property name="text">
<string>None</string>
</property>
- <property name="checked" >
+ <property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
- <widget class="QRadioButton" name="duplexLong" >
- <property name="text" >
+ <widget class="QRadioButton" name="duplexLong">
+ <property name="text">
<string>Long side</string>
</property>
</widget>
</item>
<item>
- <widget class="QRadioButton" name="duplexShort" >
- <property name="text" >
+ <widget class="QRadioButton" name="duplexShort">
+ <property name="text">
<string>Short side</string>
</property>
</widget>
</item>
<item>
- <spacer name="verticalSpacer_42" >
- <property name="orientation" >
+ <spacer name="verticalSpacer_42">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>0</height>
@@ -341,11 +333,11 @@
<receiver>from</receiver>
<slot>setEnabled(bool)</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>76</x>
<y>59</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>122</x>
<y>57</y>
</hint>
@@ -357,11 +349,11 @@
<receiver>to</receiver>
<slot>setEnabled(bool)</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>69</x>
<y>67</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>215</x>
<y>67</y>
</hint>
diff --git a/src/gui/egl/egl.pri b/src/gui/egl/egl.pri
index 669d311d97..b90b9b0f69 100644
--- a/src/gui/egl/egl.pri
+++ b/src/gui/egl/egl.pri
@@ -2,6 +2,7 @@ CONFIG += egl
HEADERS += \
egl/qegl_p.h \
+ egl/qeglcontext_p.h \
egl/qeglproperties_p.h
SOURCES += \
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp
index 0ed95ea32d..b8705239b8 100644
--- a/src/gui/egl/qegl.cpp
+++ b/src/gui/egl/qegl.cpp
@@ -43,7 +43,10 @@
#include <QtGui/qpixmap.h>
#include <QtGui/qwidget.h>
#include <QtCore/qdebug.h>
+
#include "qegl_p.h"
+#include "qeglcontext_p.h"
+
QT_BEGIN_NAMESPACE
@@ -54,12 +57,10 @@ QT_BEGIN_NAMESPACE
static QEglContext * volatile currentGLContext = 0;
static QEglContext * volatile currentVGContext = 0;
-EGLDisplay QEglContext::dpy = EGL_NO_DISPLAY;
-
QEglContext::QEglContext()
: apiType(QEgl::OpenGL)
, ctx(EGL_NO_CONTEXT)
- , cfg(0)
+ , cfg(QEGL_NO_CONFIG)
, currentSurface(EGL_NO_SURFACE)
, current(false)
, ownsContext(true)
@@ -87,15 +88,177 @@ bool QEglContext::isCurrent() const
return current;
}
+EGLConfig QEgl::defaultConfig(int devType, API api, ConfigOptions options)
+{
+ if ( (devType != QInternal::Pixmap) && ((options & Renderable) == 0))
+ qWarning("QEgl::defaultConfig() - Only configs for pixmaps make sense to be read-only!");
+
+ EGLConfig* targetConfig = 0;
+
+ static EGLConfig defaultVGConfigs[] = {
+ QEGL_NO_CONFIG, // 0 Window Renderable Translucent
+ QEGL_NO_CONFIG, // 1 Window Renderable Opaque
+ QEGL_NO_CONFIG, // 2 Pixmap Renderable Translucent
+ QEGL_NO_CONFIG, // 3 Pixmap Renderable Opaque
+ QEGL_NO_CONFIG, // 4 Pixmap ReadOnly Translucent
+ QEGL_NO_CONFIG // 5 Pixmap ReadOnly Opaque
+ };
+ if (api == OpenVG) {
+ if (devType == QInternal::Widget) {
+ if (options & Translucent)
+ targetConfig = &(defaultVGConfigs[0]);
+ else
+ targetConfig = &(defaultVGConfigs[1]);
+ } else if (devType == QInternal::Pixmap) {
+ if (options & Renderable) {
+ if (options & Translucent)
+ targetConfig = &(defaultVGConfigs[2]);
+ else // Opaque
+ targetConfig = &(defaultVGConfigs[3]);
+ } else { // Read-only
+ if (options & Translucent)
+ targetConfig = &(defaultVGConfigs[4]);
+ else // Opaque
+ targetConfig = &(defaultVGConfigs[5]);
+ }
+ }
+ }
+
+
+ static EGLConfig defaultGLConfigs[] = {
+ QEGL_NO_CONFIG, // 0 Window Renderable Translucent
+ QEGL_NO_CONFIG, // 1 Window Renderable Opaque
+ QEGL_NO_CONFIG, // 2 PBuffer Renderable Translucent
+ QEGL_NO_CONFIG, // 3 PBuffer Renderable Opaque
+ QEGL_NO_CONFIG, // 4 Pixmap Renderable Translucent
+ QEGL_NO_CONFIG, // 5 Pixmap Renderable Opaque
+ QEGL_NO_CONFIG, // 6 Pixmap ReadOnly Translucent
+ QEGL_NO_CONFIG // 7 Pixmap ReadOnly Opaque
+ };
+ if (api == OpenGL) {
+ if (devType == QInternal::Widget) {
+ if (options & Translucent)
+ targetConfig = &(defaultGLConfigs[0]);
+ else // Opaque
+ targetConfig = &(defaultGLConfigs[1]);
+ } else if (devType == QInternal::Pbuffer) {
+ if (options & Translucent)
+ targetConfig = &(defaultGLConfigs[2]);
+ else // Opaque
+ targetConfig = &(defaultGLConfigs[3]);
+ } else if (devType == QInternal::Pixmap) {
+ if (options & Renderable) {
+ if (options & Translucent)
+ targetConfig = &(defaultGLConfigs[4]);
+ else // Opaque
+ targetConfig = &(defaultGLConfigs[5]);
+ } else { // ReadOnly
+ if (options & Translucent)
+ targetConfig = &(defaultGLConfigs[6]);
+ else // Opaque
+ targetConfig = &(defaultGLConfigs[7]);
+ }
+ }
+ }
+
+ if (!targetConfig) {
+ qWarning("QEgl::defaultConfig() - No default config for device/api/options combo");
+ return QEGL_NO_CONFIG;
+ }
+ if (*targetConfig != QEGL_NO_CONFIG)
+ return *targetConfig;
+
+
+ // We haven't found an EGL config for the target config yet, so do it now:
+
+
+ // Allow overriding from an environment variable:
+ QByteArray configId;
+ if (api == OpenVG)
+ configId = qgetenv("QT_VG_EGL_CONFIG");
+ else
+ configId = qgetenv("QT_GL_EGL_CONFIG");
+ if (!configId.isEmpty()) {
+ // Overriden, so get the EGLConfig for the specified config ID:
+ EGLint properties[] = {
+ EGL_CONFIG_ID, (EGLint)configId.toInt(),
+ EGL_NONE
+ };
+ EGLint configCount = 0;
+ eglChooseConfig(display(), properties, targetConfig, 1, &configCount);
+ if (configCount > 0)
+ return *targetConfig;
+ qWarning() << "QEgl::defaultConfig() -" << configId << "appears to be invalid";
+ }
+
+ QEglProperties configAttribs;
+ configAttribs.setRenderableType(api);
+
+ EGLint surfaceType;
+ switch (devType) {
+ case QInternal::Widget:
+ surfaceType = EGL_WINDOW_BIT;
+ break;
+ case QInternal::Pixmap:
+ surfaceType = EGL_PIXMAP_BIT;
+ break;
+ case QInternal::Pbuffer:
+ surfaceType = EGL_PBUFFER_BIT;
+ break;
+ default:
+ qWarning("QEgl::defaultConfig() - Can't create EGL surface for %d device type", devType);
+ return QEGL_NO_CONFIG;
+ };
+#ifdef EGL_VG_ALPHA_FORMAT_PRE_BIT
+ // For OpenVG, we try to create a surface using a pre-multiplied format if
+ // the surface needs to have an alpha channel:
+ if (api == OpenVG && (options & Translucent))
+ surfaceType |= EGL_VG_ALPHA_FORMAT_PRE_BIT;
+#endif
+ configAttribs.setValue(EGL_SURFACE_TYPE, surfaceType);
+
+#ifdef EGL_BIND_TO_TEXTURE_RGBA
+ if (devType == QInternal::Pixmap || devType == QInternal::Pbuffer) {
+ if (options & Translucent)
+ configAttribs.setValue(EGL_BIND_TO_TEXTURE_RGBA, EGL_TRUE);
+ else
+ configAttribs.setValue(EGL_BIND_TO_TEXTURE_RGB, EGL_TRUE);
+ }
+#endif
+
+ // Add paint engine requirements
+ if (api == OpenVG) {
+#ifndef QVG_SCISSOR_CLIP
+ configAttribs.setValue(EGL_ALPHA_MASK_SIZE, 1);
+#endif
+ } else {
+ // Both OpenGL paint engines need to have stencil and sample buffers
+ configAttribs.setValue(EGL_STENCIL_SIZE, 1);
+ configAttribs.setValue(EGL_SAMPLE_BUFFERS, 1);
+#ifndef QT_OPENGL_ES_2
+ // Aditionally, the GL1 engine likes to have a depth buffer for clipping
+ configAttribs.setValue(EGL_DEPTH_SIZE, 1);
+#endif
+ }
+
+ if (options & Translucent)
+ configAttribs.setValue(EGL_ALPHA_SIZE, 1);
+
+ *targetConfig = chooseConfig(&configAttribs, QEgl::BestPixelFormat);
+ return *targetConfig;
+}
+
+
// Choose a configuration that matches "properties".
-bool QEglContext::chooseConfig
- (const QEglProperties& properties, QEgl::PixelFormatMatch match)
+EGLConfig QEgl::chooseConfig(const QEglProperties* properties, QEgl::PixelFormatMatch match)
{
- QEglProperties props(properties);
+ QEglProperties props(*properties);
+ EGLConfig cfg = QEGL_NO_CONFIG;
do {
// Get the number of matching configurations for this set of properties.
EGLint matching = 0;
- if (!eglChooseConfig(display(), props.properties(), 0, 0, &matching) || !matching)
+ EGLDisplay dpy = QEgl::display();
+ if (!eglChooseConfig(dpy, props.properties(), 0, 0, &matching) || !matching)
continue;
// If we want the best pixel format, then return the first
@@ -104,7 +267,7 @@ bool QEglContext::chooseConfig
eglChooseConfig(display(), props.properties(), &cfg, 1, &matching);
if (matching < 1)
continue;
- return true;
+ return cfg;
}
// Fetch all of the matching configurations and find the
@@ -125,7 +288,7 @@ bool QEglContext::chooseConfig
alpha == props.value(EGL_ALPHA_SIZE))) {
cfg = configs[index];
delete [] configs;
- return true;
+ return cfg;
}
}
delete [] configs;
@@ -142,11 +305,23 @@ bool QEglContext::chooseConfig
qWarning() << "QEglContext::chooseConfig(): Could not find a suitable EGL configuration";
qWarning() << "Requested:" << props.toString();
qWarning() << "Available:";
- dumpAllConfigs();
+ QEgl::dumpAllConfigs();
}
- return false;
+ return QEGL_NO_CONFIG;
+}
+
+bool QEglContext::chooseConfig(const QEglProperties& properties, QEgl::PixelFormatMatch match)
+{
+ cfg = QEgl::chooseConfig(&properties, match);
+ return cfg != QEGL_NO_CONFIG;
}
+EGLSurface QEglContext::createSurface(QPaintDevice* device, const QEglProperties *properties)
+{
+ return QEgl::createSurface(device, cfg, properties);
+}
+
+
// Create the EGLContext.
bool QEglContext::createContext(QEglContext *shareContext, const QEglProperties *properties)
{
@@ -172,9 +347,9 @@ bool QEglContext::createContext(QEglContext *shareContext, const QEglProperties
if (shareContext && shareContext->ctx == EGL_NO_CONTEXT)
shareContext = 0;
if (shareContext) {
- ctx = eglCreateContext(display(), cfg, shareContext->ctx, contextProps.properties());
+ ctx = eglCreateContext(QEgl::display(), cfg, shareContext->ctx, contextProps.properties());
if (ctx == EGL_NO_CONTEXT) {
- qWarning() << "QEglContext::createContext(): Could not share context:" << errorString(eglGetError());
+ qWarning() << "QEglContext::createContext(): Could not share context:" << QEgl::errorString();
shareContext = 0;
} else {
sharing = true;
@@ -183,7 +358,7 @@ bool QEglContext::createContext(QEglContext *shareContext, const QEglProperties
if (ctx == EGL_NO_CONTEXT) {
ctx = eglCreateContext(display(), cfg, 0, contextProps.properties());
if (ctx == EGL_NO_CONTEXT) {
- qWarning() << "QEglContext::createContext(): Unable to create EGL context:" << errorString(eglGetError());
+ qWarning() << "QEglContext::createContext(): Unable to create EGL context:" << QEgl::errorString();
return false;
}
}
@@ -217,6 +392,11 @@ bool QEglContext::makeCurrent(EGLSurface surface)
return false;
}
+ if (surface == EGL_NO_SURFACE) {
+ qWarning() << "QEglContext::makeCurrent(): Cannot make invalid surface current";
+ return false;
+ }
+
// If lazyDoneCurrent() was called on the surface, then we may be able
// to assume that it is still current within the thread.
if (surface == currentSurface && currentContext(apiType) == this) {
@@ -240,9 +420,9 @@ bool QEglContext::makeCurrent(EGLSurface surface)
eglBindAPI(EGL_OPENVG_API);
#endif
- bool ok = eglMakeCurrent(display(), surface, surface, ctx);
+ bool ok = eglMakeCurrent(QEgl::display(), surface, surface, ctx);
if (!ok)
- qWarning() << "QEglContext::makeCurrent():" << errorString(eglGetError());
+ qWarning() << "QEglContext::makeCurrent(" << surface << "):" << QEgl::errorString();
return ok;
}
@@ -269,9 +449,9 @@ bool QEglContext::doneCurrent()
eglBindAPI(EGL_OPENVG_API);
#endif
- bool ok = eglMakeCurrent(display(), EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+ bool ok = eglMakeCurrent(QEgl::display(), EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (!ok)
- qWarning() << "QEglContext::doneCurrent():" << errorString(eglGetError());
+ qWarning() << "QEglContext::doneCurrent():" << QEgl::errorString();
return ok;
}
@@ -291,9 +471,9 @@ bool QEglContext::swapBuffers(EGLSurface surface)
if(ctx == EGL_NO_CONTEXT)
return false;
- bool ok = eglSwapBuffers(display(), surface);
+ bool ok = eglSwapBuffers(QEgl::display(), surface);
if (!ok)
- qWarning() << "QEglContext::swapBuffers():" << errorString(eglGetError());
+ qWarning() << "QEglContext::swapBuffers():" << QEgl::errorString();
return ok;
}
@@ -330,43 +510,43 @@ void QEglContext::waitClient()
// Query the value of a configuration attribute.
bool QEglContext::configAttrib(int name, EGLint *value) const
{
- return eglGetConfigAttrib(display(), cfg, name, value);
+ return eglGetConfigAttrib(QEgl::display(), cfg, name, value);
}
-// Retrieve all of the properties on "cfg". If zero, return
-// the context's configuration.
-QEglProperties QEglContext::configProperties(EGLConfig cfg) const
+int QEglContext::configAttrib(int name) const
{
- if (!cfg)
- cfg = config();
- QEglProperties props;
- for (int name = 0x3020; name <= 0x304F; ++name) {
- EGLint value;
- if (name != EGL_NONE && eglGetConfigAttrib(display(), cfg, name, &value))
- props.setValue(name, value);
- }
- eglGetError(); // Clear the error state.
- return props;
+ EGLint value;
+ EGLBoolean success = eglGetConfigAttrib(QEgl::display(), cfg, name, &value);
+ if (success)
+ return value;
+ else
+ return EGL_DONT_CARE;
}
-EGLDisplay QEglContext::display()
+QEglProperties QEglContext::configProperties() const
{
+ return QEglProperties(config());
+}
+
+EGLDisplay QEgl::display()
+{
+ static EGLDisplay dpy = EGL_NO_DISPLAY;
static bool openedDisplay = false;
if (!openedDisplay) {
dpy = eglGetDisplay(nativeDisplay());
openedDisplay = true;
if (dpy == EGL_NO_DISPLAY) {
- qWarning("QEglContext::display(): Falling back to EGL_DEFAULT_DISPLAY");
+ qWarning("QEgl::display(): Falling back to EGL_DEFAULT_DISPLAY");
dpy = eglGetDisplay(EGLNativeDisplayType(EGL_DEFAULT_DISPLAY));
}
if (dpy == EGL_NO_DISPLAY) {
- qWarning("QEglContext::display(): Can't even open the default display");
+ qWarning("QEgl::display(): Can't even open the default display");
return EGL_NO_DISPLAY;
}
if (!eglInitialize(dpy, NULL, NULL)) {
- qWarning() << "QEglContext::display(): Cannot initialize EGL display:" << errorString(eglGetError());
+ qWarning() << "QEgl::display(): Cannot initialize EGL display:" << QEgl::errorString();
return EGL_NO_DISPLAY;
}
}
@@ -374,15 +554,49 @@ EGLDisplay QEglContext::display()
return dpy;
}
-#if !defined(Q_WS_X11) && !defined(Q_WS_WINCE) // WinCE & X11 implement this properly
-EGLNativeDisplayType QEglContext::nativeDisplay()
+#ifndef Q_WS_X11
+EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *properties)
{
- return EGL_DEFAULT_DISPLAY;
+ // Create the native drawable for the paint device.
+ int devType = device->devType();
+ EGLNativePixmapType pixmapDrawable = 0;
+ EGLNativeWindowType windowDrawable = 0;
+ bool ok;
+ if (devType == QInternal::Pixmap) {
+ pixmapDrawable = nativePixmap(static_cast<QPixmap *>(device));
+ ok = (pixmapDrawable != 0);
+ } else if (devType == QInternal::Widget) {
+ windowDrawable = nativeWindow(static_cast<QWidget *>(device));
+ ok = (windowDrawable != 0);
+ } else {
+ ok = false;
+ }
+ if (!ok) {
+ qWarning("QEglContext::createSurface(): Cannot create the native EGL drawable");
+ return EGL_NO_SURFACE;
+ }
+
+ // Create the EGL surface to draw into, based on the native drawable.
+ const int *props;
+ if (properties)
+ props = properties->properties();
+ else
+ props = 0;
+ EGLSurface surf;
+ if (devType == QInternal::Widget)
+ surf = eglCreateWindowSurface(QEgl::display(), cfg, windowDrawable, props);
+ else
+ surf = eglCreatePixmapSurface(QEgl::display(), cfg, pixmapDrawable, props);
+ if (surf == EGL_NO_SURFACE) {
+ qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError());
+ }
+ return surf;
}
#endif
+
// Return the error string associated with a specific code.
-QString QEglContext::errorString(EGLint code)
+QString QEgl::errorString(EGLint code)
{
static const char * const errors[] = {
"Success (0x3000)", // No tr
@@ -408,8 +622,24 @@ QString QEglContext::errorString(EGLint code)
}
}
+QString QEgl::errorString()
+{
+ return errorString(error());
+}
+
+void QEgl::clearError()
+{
+ eglGetError();
+}
+
+EGLint QEgl::error()
+{
+ return eglGetError();
+}
+
+
// Dump all of the EGL configurations supported by the system.
-void QEglContext::dumpAllConfigs()
+void QEgl::dumpAllConfigs()
{
QEglProperties props;
EGLint count = 0;
@@ -418,23 +648,23 @@ void QEglContext::dumpAllConfigs()
EGLConfig *configs = new EGLConfig [count];
eglGetConfigs(display(), configs, count, &count);
for (EGLint index = 0; index < count; ++index) {
- props = configProperties(configs[index]);
+ props = QEglProperties(configs[index]);
qWarning() << props.toString();
}
delete [] configs;
}
-QString QEglContext::extensions()
+QString QEgl::extensions()
{
- const char* exts = eglQueryString(QEglContext::display(), EGL_EXTENSIONS);
+ const char* exts = eglQueryString(QEgl::display(), EGL_EXTENSIONS);
return QString(QLatin1String(exts));
}
-bool QEglContext::hasExtension(const char* extensionName)
+bool QEgl::hasExtension(const char* extensionName)
{
QList<QByteArray> extensions =
QByteArray(reinterpret_cast<const char *>
- (eglQueryString(QEglContext::display(), EGL_EXTENSIONS))).split(' ');
+ (eglQueryString(QEgl::display(), EGL_EXTENSIONS))).split(' ');
return extensions.contains(extensionName);
}
diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h
index 87ed818c42..7dad9fe345 100644
--- a/src/gui/egl/qegl_p.h
+++ b/src/gui/egl/qegl_p.h
@@ -53,13 +53,40 @@
// We mean it.
//
-#include <QtCore/qsize.h>
-#include <QtGui/qimage.h>
+QT_BEGIN_INCLUDE_NAMESPACE
-#include <private/qeglproperties_p.h>
+#if defined(QT_OPENGL_ES_2)
+# include <GLES2/gl2.h>
+#endif
-QT_BEGIN_INCLUDE_NAMESPACE
+#if defined(QT_GLES_EGL)
+# include <GLES/egl.h>
+#else
+# include <EGL/egl.h>
+#endif
+
+#if defined(Q_WS_X11)
+// If <EGL/egl.h> included <X11/Xlib.h>, then the global namespace
+// may have been polluted with X #define's. The following makes sure
+// the X11 headers were included properly and then cleans things up.
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#undef Bool
+#undef Status
+#undef None
+#undef KeyPress
+#undef KeyRelease
+#undef FocusIn
+#undef FocusOut
+#undef Type
+#undef FontChange
+#undef CursorShape
+#undef Unsorted
+#undef GrayScale
+#endif
+// Internally we use the EGL-prefixed native types which are used in EGL >= 1.3.
+// For older versions of EGL, we have to define these types ourselves here:
#if !defined(EGL_VERSION_1_3) && !defined(QEGL_NATIVE_TYPES_DEFINED)
#undef EGLNativeWindowType
#undef EGLNativePixmapType
@@ -69,74 +96,75 @@ typedef NativePixmapType EGLNativePixmapType;
typedef NativeDisplayType EGLNativeDisplayType;
#define QEGL_NATIVE_TYPES_DEFINED 1
#endif
+
QT_END_INCLUDE_NAMESPACE
-QT_BEGIN_NAMESPACE
+#include <QtGui/qpaintdevice.h>
+
+#include <QFlags>
-class Q_GUI_EXPORT QEglContext
-{
-public:
- QEglContext();
- ~QEglContext();
+QT_BEGIN_NAMESPACE
- bool isValid() const;
- bool isCurrent() const;
- bool isSharing() const { return sharing; }
+#define QEGL_NO_CONFIG ((EGLConfig)-1)
- QEgl::API api() const { return apiType; }
- void setApi(QEgl::API api) { apiType = api; }
- bool chooseConfig(const QEglProperties& properties, QEgl::PixelFormatMatch match = QEgl::ExactPixelFormat);
- bool createContext(QEglContext *shareContext = 0, const QEglProperties *properties = 0);
- void destroyContext();
- EGLSurface createSurface(QPaintDevice *device, const QEglProperties *properties = 0);
- void destroySurface(EGLSurface surface);
- bool makeCurrent(EGLSurface surface);
- bool doneCurrent();
- bool lazyDoneCurrent();
- bool swapBuffers(EGLSurface surface);
+class QEglProperties;
- void waitNative();
- void waitClient();
+namespace QEgl {
+ enum API
+ {
+ OpenGL,
+ OpenVG
+ };
- bool configAttrib(int name, EGLint *value) const;
+ enum PixelFormatMatch
+ {
+ ExactPixelFormat,
+ BestPixelFormat
+ };
- static void clearError() { eglGetError(); }
- static EGLint error() { return eglGetError(); }
- static QString errorString(EGLint code);
+ enum ConfigOption
+ {
+ NoOptions = 0,
+ Translucent = 0x01,
+ Renderable = 0x02 // Config will be compatable with the paint engines (VG or GL)
+ };
+ Q_DECLARE_FLAGS(ConfigOptions, ConfigOption);
- static EGLDisplay display();
- EGLContext context() const { return ctx; }
- void setContext(EGLContext context) { ctx = context; ownsContext = false;}
+ // Most of the time we use the same config for things like widgets & pixmaps, so rather than
+ // go through the eglChooseConfig loop every time, we use defaultConfig, which will return
+ // the config for a particular device/api/option combo. This function assumes that once a
+ // config is chosen for a particular combo, it's safe to always use that combo.
+ Q_GUI_EXPORT EGLConfig defaultConfig(int devType, API api, ConfigOptions options);
- EGLConfig config() const { return cfg; }
- void setConfig(EGLConfig config) { cfg = config; }
+ Q_GUI_EXPORT EGLConfig chooseConfig(const QEglProperties* configAttribs, QEgl::PixelFormatMatch match = QEgl::ExactPixelFormat);
+ Q_GUI_EXPORT EGLSurface createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *surfaceAttribs = 0);
- QEglProperties configProperties(EGLConfig cfg = 0) const;
+ Q_GUI_EXPORT void dumpAllConfigs();
- void dumpAllConfigs();
+ Q_GUI_EXPORT void clearError();
+ Q_GUI_EXPORT EGLint error();
+ Q_GUI_EXPORT QString errorString(EGLint code);
+ Q_GUI_EXPORT QString errorString();
- static QString extensions();
- static bool hasExtension(const char* extensionName);
+ Q_GUI_EXPORT QString extensions();
+ Q_GUI_EXPORT bool hasExtension(const char* extensionName);
-private:
- QEgl::API apiType;
- EGLContext ctx;
- EGLConfig cfg;
- EGLSurface currentSurface;
- bool current;
- bool ownsContext;
- bool sharing;
+ Q_GUI_EXPORT EGLDisplay display();
- static EGLDisplay dpy;
- static EGLNativeDisplayType nativeDisplay();
+ Q_GUI_EXPORT EGLNativeDisplayType nativeDisplay();
+ Q_GUI_EXPORT EGLNativeWindowType nativeWindow(QWidget*);
+ Q_GUI_EXPORT EGLNativePixmapType nativePixmap(QPixmap*);
- static QEglContext *currentContext(QEgl::API api);
- static void setCurrentContext(QEgl::API api, QEglContext *context);
+#ifdef Q_WS_X11
+ Q_GUI_EXPORT VisualID getCompatibleVisualId(EGLConfig config);
+#endif
};
+Q_DECLARE_OPERATORS_FOR_FLAGS(QEgl::ConfigOptions);
+
QT_END_NAMESPACE
-#endif // QEGL_P_H
+#endif //QEGL_P_H
diff --git a/src/gui/egl/qegl_qws.cpp b/src/gui/egl/qegl_qws.cpp
index 2a61beb9c8..56383a5f1a 100644
--- a/src/gui/egl/qegl_qws.cpp
+++ b/src/gui/egl/qegl_qws.cpp
@@ -42,7 +42,9 @@
#include <QtGui/qpaintdevice.h>
#include <QtGui/qpixmap.h>
#include <QtGui/qwidget.h>
+
#include "qegl_p.h"
+#include "qeglcontext_p.h"
#if !defined(QT_NO_EGL)
@@ -53,17 +55,6 @@
QT_BEGIN_NAMESPACE
-// Create the surface for a QPixmap, QImage, or QWidget.
-// We don't have QGLScreen to create EGL surfaces for us,
-// so surface creation needs to be done in QtOpenGL or
-// QtOpenVG for Qt/Embedded.
-EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties)
-{
- Q_UNUSED(device);
- Q_UNUSED(properties);
- return EGL_NO_SURFACE;
-}
-
static QScreen *screenForDevice(QPaintDevice *device)
{
QScreen *screen = qt_screen;
@@ -101,6 +92,23 @@ void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev)
setPixelFormat(screen->pixelFormat());
}
+EGLNativeDisplayType QEgl::nativeDisplay()
+{
+ return EGL_DEFAULT_DISPLAY;
+}
+
+EGLNativeWindowType QEgl::nativeWindow(QWidget* widget)
+{
+ return (EGLNativeWindowType)(widget->winId()); // Might work
+}
+
+EGLNativePixmapType QEgl::nativePixmap(QPixmap*)
+{
+ qWarning("QEgl: EGL pixmap surfaces not supported on QWS");
+ return (EGLNativePixmapType)0;
+}
+
+
QT_END_NAMESPACE
#endif // !QT_NO_EGL
diff --git a/src/gui/egl/qegl_symbian.cpp b/src/gui/egl/qegl_symbian.cpp
index 5a010cd5d6..9744ed094a 100644
--- a/src/gui/egl/qegl_symbian.cpp
+++ b/src/gui/egl/qegl_symbian.cpp
@@ -42,48 +42,28 @@
#include <QtGui/qpaintdevice.h>
#include <QtGui/qpixmap.h>
#include <QtGui/qwidget.h>
+
#include "qegl_p.h"
+#include "qeglcontext_p.h"
#include <coecntrl.h>
QT_BEGIN_NAMESPACE
-EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties)
+EGLNativeDisplayType QEgl::nativeDisplay()
{
- // Create the native drawable for the paint device.
- int devType = device->devType();
- EGLNativePixmapType pixmapDrawable = 0;
- EGLNativeWindowType windowDrawable = 0;
- bool ok;
- if (devType == QInternal::Pixmap) {
- pixmapDrawable = 0;
- ok = (pixmapDrawable != 0);
- } else if (devType == QInternal::Widget) {
- QWidget *w = static_cast<QWidget *>(device);
- windowDrawable = (EGLNativeWindowType)(w->winId()->DrawableWindow());
- ok = (windowDrawable != 0);
- } else {
- ok = false;
- }
- if (!ok) {
- qWarning("QEglContext::createSurface(): Cannot create the native EGL drawable");
- return EGL_NO_SURFACE;
- }
+ return EGL_DEFAULT_DISPLAY;
+}
- // Create the EGL surface to draw into, based on the native drawable.
- const int *props;
- if (properties)
- props = properties->properties();
- else
- props = 0;
- EGLSurface surf;
- if (devType == QInternal::Widget)
- surf = eglCreateWindowSurface(dpy, cfg, windowDrawable, props);
- else
- surf = eglCreatePixmapSurface(dpy, cfg, pixmapDrawable, props);
- if (surf == EGL_NO_SURFACE)
- qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError());
- return surf;
+EGLNativeWindowType QEgl::nativeWindow(QWidget* widget)
+{
+ return (EGLNativeWindowType)(widget->winId()->DrawableWindow());
+}
+
+EGLNativePixmapType QEgl::nativePixmap(QPixmap*)
+{
+ qWarning("QEgl: EGL pixmap surfaces not implemented yet on Symbian");
+ return (EGLNativePixmapType)0;
}
// Set pixel format and other properties based on a paint device.
diff --git a/src/gui/egl/qegl_wince.cpp b/src/gui/egl/qegl_wince.cpp
index 87ec648e4c..2d08805f72 100644
--- a/src/gui/egl/qegl_wince.cpp
+++ b/src/gui/egl/qegl_wince.cpp
@@ -42,55 +42,18 @@
#include <QtGui/qpaintdevice.h>
#include <QtGui/qpixmap.h>
#include <QtGui/qwidget.h>
+
#include "qegl_p.h"
+#include "qeglcontext_p.h"
#include <windows.h>
QT_BEGIN_NAMESPACE
-EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties)
-{
- // Create the native drawable for the paint device.
- int devType = device->devType();
- EGLNativePixmapType pixmapDrawable = 0;
- EGLNativeWindowType windowDrawable = 0;
- bool ok;
- if (devType == QInternal::Pixmap) {
- pixmapDrawable = 0;
- ok = (pixmapDrawable != 0);
- } else if (devType == QInternal::Widget) {
- windowDrawable = (EGLNativeWindowType)(static_cast<QWidget *>(device))->winId();
- ok = (windowDrawable != 0);
- } else {
- ok = false;
- }
- if (!ok) {
- qWarning("QEglContext::createSurface(): Cannot create the native EGL drawable");
- return EGL_NO_SURFACE;
- }
-
- // Create the EGL surface to draw into, based on the native drawable.
- const int *props;
- if (properties)
- props = properties->properties();
- else
- props = 0;
- EGLSurface surf;
- if (devType == QInternal::Widget)
- surf = eglCreateWindowSurface(dpy, cfg, windowDrawable, props);
- else
- surf = eglCreatePixmapSurface(dpy, cfg, pixmapDrawable, props);
- if (surf == EGL_NO_SURFACE) {
- qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError());
- }
- return surf;
-}
-
-EGLNativeDisplayType QEglContext::nativeDisplay()
+EGLNativeDisplayType QEgl::nativeDisplay()
{
HDC myDc = GetDC(0);
-
if (!myDc) {
qWarning("QEglContext::nativeDisplay(): WinCE display is not open");
return EGL_DEFAULT_DISPLAY;
@@ -98,6 +61,17 @@ EGLNativeDisplayType QEglContext::nativeDisplay()
return EGLNativeDisplayType(myDc);
}
+EGLNativeWindowType QEgl::nativeWindow(QWidget* widget)
+{
+ return (EGLNativeWindowType)(widget->winId());
+}
+
+EGLNativePixmapType QEgl::nativePixmap(QPixmap*)
+{
+ qWarning("QEgl: EGL pixmap surfaces not supported on WinCE");
+ return (EGLNativePixmapType)0;
+}
+
// Set pixel format and other properties based on a paint device.
void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev)
{
diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp
index 634ff13208..91423c89b0 100644
--- a/src/gui/egl/qegl_x11.cpp
+++ b/src/gui/egl/qegl_x11.cpp
@@ -41,59 +41,24 @@
#include <QtCore/qdebug.h>
-#include <private/qt_x11_p.h>
+#include <QtGui/private/qt_x11_p.h>
#include <QtGui/qx11info_x11.h>
-#include <private/qpixmapdata_p.h>
-#include <private/qpixmap_x11_p.h>
+#include <QtGui/private/qpixmapdata_p.h>
+#include <QtGui/private/qpixmap_x11_p.h>
+#include <QtGui/private/qimagepixmapcleanuphooks_p.h>
#include <QtGui/qpaintdevice.h>
#include <QtGui/qpixmap.h>
#include <QtGui/qwidget.h>
-#include "qegl_p.h"
+#include <QtGui/qcolormap.h>
+#include "QtGui/private/qegl_p.h"
+#include "QtGui/private/qeglcontext_p.h"
QT_BEGIN_NAMESPACE
-EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties)
-{
- // Create the native drawable for the paint device.
- int devType = device->devType();
- EGLNativePixmapType pixmapDrawable = 0;
- EGLNativeWindowType windowDrawable = 0;
- bool ok;
- if (devType == QInternal::Pixmap) {
- pixmapDrawable = (EGLNativePixmapType)(static_cast<QPixmap *>(device))->handle();
- ok = (pixmapDrawable != 0);
- } else if (devType == QInternal::Widget) {
- windowDrawable = (EGLNativeWindowType)(static_cast<QWidget *>(device))->winId();
- ok = (windowDrawable != 0);
- } else {
- ok = false;
- }
- if (!ok) {
- qWarning("QEglContext::createSurface(): Cannot create the native EGL drawable");
- return EGL_NO_SURFACE;
- }
- // Create the EGL surface to draw into, based on the native drawable.
- const int *props;
- if (properties)
- props = properties->properties();
- else
- props = 0;
- EGLSurface surf;
- if (devType == QInternal::Widget)
- surf = eglCreateWindowSurface(dpy, cfg, windowDrawable, props);
- else
- surf = eglCreatePixmapSurface(dpy, cfg, pixmapDrawable, props);
- if (surf == EGL_NO_SURFACE) {
- qWarning() << "QEglContext::createSurface(): Unable to create EGL surface:"
- << errorString(eglGetError());
- }
- return surf;
-}
-
-EGLNativeDisplayType QEglContext::nativeDisplay()
+EGLNativeDisplayType QEgl::nativeDisplay()
{
Display *xdpy = QX11Info::display();
if (!xdpy) {
@@ -103,6 +68,16 @@ EGLNativeDisplayType QEglContext::nativeDisplay()
return EGLNativeDisplayType(xdpy);
}
+EGLNativeWindowType QEgl::nativeWindow(QWidget* widget)
+{
+ return (EGLNativeWindowType)(widget->winId());
+}
+
+EGLNativePixmapType QEgl::nativePixmap(QPixmap* pixmap)
+{
+ return (EGLNativePixmapType)(pixmap->handle());
+}
+
static int countBits(unsigned long mask)
{
int count = 0;
@@ -153,4 +128,292 @@ void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev)
setVisualFormat(qt_x11Info(dev));
}
+//#define QT_DEBUG_X11_VISUAL_SELECTION 1
+
+VisualID QEgl::getCompatibleVisualId(EGLConfig config)
+{
+ VisualID visualId = 0;
+ EGLint eglValue = 0;
+
+ EGLint configRedSize = 0;
+ eglGetConfigAttrib(display(), config, EGL_RED_SIZE, &configRedSize);
+
+ EGLint configGreenSize = 0;
+ eglGetConfigAttrib(display(), config, EGL_GREEN_SIZE, &configGreenSize);
+
+ EGLint configBlueSize = 0;
+ eglGetConfigAttrib(display(), config, EGL_BLUE_SIZE, &configBlueSize);
+
+ EGLint configAlphaSize = 0;
+ eglGetConfigAttrib(display(), config, EGL_ALPHA_SIZE, &configAlphaSize);
+
+ eglGetConfigAttrib(display(), config, EGL_BUFFER_SIZE, &eglValue);
+ int configBitDepth = eglValue;
+
+ eglGetConfigAttrib(display(), config, EGL_CONFIG_ID, &eglValue);
+ int configId = eglValue;
+
+ // See if EGL provided a valid VisualID:
+ eglGetConfigAttrib(display(), config, EGL_NATIVE_VISUAL_ID, &eglValue);
+ visualId = (VisualID)eglValue;
+ if (visualId) {
+ // EGL has suggested a visual id, so get the rest of the visual info for that id:
+ XVisualInfo visualInfoTemplate;
+ memset(&visualInfoTemplate, 0, sizeof(XVisualInfo));
+ visualInfoTemplate.visualid = visualId;
+
+ XVisualInfo *chosenVisualInfo;
+ int matchingCount = 0;
+ chosenVisualInfo = XGetVisualInfo(X11->display, VisualIDMask, &visualInfoTemplate, &matchingCount);
+ if (chosenVisualInfo) {
+ if (configBitDepth == chosenVisualInfo->depth) {
+#if !defined(QT_NO_XRENDER)
+ // If we have XRender, actually check the visual supplied by EGL is ARGB
+ if (configAlphaSize > 0) {
+ XRenderPictFormat *format;
+ format = XRenderFindVisualFormat(X11->display, chosenVisualInfo->visual);
+ if (!format || (format->type != PictTypeDirect) || (!format->direct.alphaMask)) {
+ qWarning("Warning: EGL suggested using X visual ID %d for config %d, but this is not ARGB",
+ (int)visualId, configId);
+ visualId = 0;
+ }
+ }
+#endif
+ } else {
+ qWarning("Warning: EGL suggested using X visual ID %d (%d bpp) for config %d (%d bpp), but the depths do not match!",
+ (int)visualId, chosenVisualInfo->depth, configId, configBitDepth);
+ visualId = 0;
+ }
+ }
+ XFree(chosenVisualInfo);
+ }
+
+ if (visualId) {
+#ifdef QT_DEBUG_X11_VISUAL_SELECTION
+ if (configAlphaSize > 0)
+ qDebug("Using ARGB Visual ID %d provided by EGL for config %d", (int)visualId, configId);
+ else
+ qDebug("Using Opaque Visual ID %d provided by EGL for config %d", (int)visualId, configId);
+#endif
+ return visualId;
+ }
+
+
+ // If EGL didn't give us a valid visual ID, try XRender
+#if !defined(QT_NO_XRENDER)
+ if (!visualId) {
+ XVisualInfo visualInfoTemplate;
+ memset(&visualInfoTemplate, 0, sizeof(XVisualInfo));
+
+ visualInfoTemplate.depth = configBitDepth;
+ visualInfoTemplate.c_class = TrueColor;
+
+ XVisualInfo *matchingVisuals;
+ int matchingCount = 0;
+ matchingVisuals = XGetVisualInfo(X11->display,
+ VisualDepthMask|VisualClassMask,
+ &visualInfoTemplate,
+ &matchingCount);
+
+ for (int i = 0; i < matchingCount; ++i) {
+ XRenderPictFormat *format;
+ format = XRenderFindVisualFormat(X11->display, matchingVisuals[i].visual);
+
+ // Check the format for the visual matches the EGL config
+ if ( (countBits(format->direct.redMask) == configRedSize) &&
+ (countBits(format->direct.greenMask) == configGreenSize) &&
+ (countBits(format->direct.blueMask) == configBlueSize) &&
+ (countBits(format->direct.alphaMask) == configAlphaSize) )
+ {
+ visualId = matchingVisuals[i].visualid;
+ break;
+ }
+ }
+ if (matchingVisuals)
+ XFree(matchingVisuals);
+
+ }
+ if (visualId) {
+# ifdef QT_DEBUG_X11_VISUAL_SELECTION
+ if (configAlphaSize > 0)
+ qDebug("Using ARGB Visual ID %d provided by XRender for EGL config %d", (int)visualId, configId);
+ else
+ qDebug("Using Opaque Visual ID %d provided by XRender for EGL config %d", (int)visualId, configId);
+# endif // QT_DEBUG_X11_VISUAL_SELECTION
+ return visualId;
+ }
+#endif //!defined(QT_NO_XRENDER)
+
+
+ // Finally, if XRender also failed to find a visual (or isn't present), try to
+ // use XGetVisualInfo and only use the bit depth to match on:
+ if (!visualId) {
+ XVisualInfo visualInfoTemplate;
+ memset(&visualInfoTemplate, 0, sizeof(XVisualInfo));
+
+ visualInfoTemplate.depth = configBitDepth;
+
+ XVisualInfo *matchingVisuals;
+ int matchingCount = 0;
+ matchingVisuals = XGetVisualInfo(X11->display,
+ VisualDepthMask,
+ &visualInfoTemplate,
+ &matchingCount);
+ if (matchingVisuals) {
+ visualId = matchingVisuals[0].visualid;
+ XFree(matchingVisuals);
+ }
+ }
+
+ if (visualId) {
+#ifdef QT_DEBUG_X11_VISUAL_SELECTION
+ qDebug("Using Visual ID %d provided by XGetVisualInfo for EGL config %d", (int)visualId, configId);
+#endif
+ return visualId;
+ }
+
+ qWarning("Unable to find an X11 visual which matches EGL config %d", configId);
+ return (VisualID)0;
+}
+
+void qt_set_winid_on_widget(QWidget* w, Qt::HANDLE id)
+{
+ w->create(id);
+}
+
+
+// NOTE: The X11 version of createSurface will re-create the native drawable if it's visual doesn't
+// match the one for the passed in EGLConfig
+EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEglProperties *unusedProperties)
+{
+ Q_UNUSED(unusedProperties);
+
+ int devType = device->devType();
+
+ if (devType == QInternal::Pbuffer) {
+ // TODO
+ return EGL_NO_SURFACE;
+ }
+
+ QX11PixmapData *x11PixmapData = 0;
+ if (devType == QInternal::Pixmap) {
+ QPixmapData *pmd = static_cast<QPixmap*>(device)->data_ptr().data();
+ if (pmd->classId() == QPixmapData::X11Class)
+ x11PixmapData = static_cast<QX11PixmapData*>(pmd);
+ else {
+ // TODO: Replace the pixmap's data with a new QX11PixmapData
+ qWarning("WARNING: Creating an EGL surface on a QPixmap is only supported for QX11PixmapData");
+ return EGL_NO_SURFACE;
+ }
+ } else if ((devType != QInternal::Widget) && (devType != QInternal::Pbuffer)) {
+ qWarning("WARNING: Creating an EGLSurface for device type %d isn't supported", devType);
+ return EGL_NO_SURFACE;
+ }
+
+ VisualID visualId = QEgl::getCompatibleVisualId(config);
+ EGLint alphaSize;
+ eglGetConfigAttrib(QEgl::display(), config, EGL_ALPHA_SIZE, &alphaSize);
+
+ if (devType == QInternal::Widget) {
+ QWidget *widget = static_cast<QWidget*>(device);
+
+ VisualID currentVisualId = 0;
+ if (widget->testAttribute(Qt::WA_WState_Created))
+ currentVisualId = XVisualIDFromVisual((Visual*)widget->x11Info().visual());
+
+ if (currentVisualId != visualId) {
+ // The window is either not created or has the wrong visual. Either way, we need
+ // to create a window with the correct visual and call create() on the widget:
+
+ bool visible = widget->isVisible();
+ if (visible)
+ widget->hide();
+
+ XVisualInfo visualInfo;
+ visualInfo.visualid = visualId;
+ {
+ XVisualInfo *visualInfoPtr;
+ int matchingCount = 0;
+ visualInfoPtr = XGetVisualInfo(widget->x11Info().display(), VisualIDMask,
+ &visualInfo, &matchingCount);
+ Q_ASSERT(visualInfoPtr); // visualId really should be valid!
+ visualInfo = *visualInfoPtr;
+ XFree(visualInfoPtr);
+ }
+
+ Window parentWindow = RootWindow(widget->x11Info().display(), widget->x11Info().screen());
+ if (widget->parentWidget())
+ parentWindow = widget->parentWidget()->winId();
+
+ XSetWindowAttributes windowAttribs;
+ QColormap colmap = QColormap::instance(widget->x11Info().screen());
+ windowAttribs.background_pixel = colmap.pixel(widget->palette().color(widget->backgroundRole()));
+ windowAttribs.border_pixel = colmap.pixel(Qt::black);
+
+ unsigned int valueMask = CWBackPixel|CWBorderPixel;
+ if (alphaSize > 0) {
+ windowAttribs.colormap = XCreateColormap(widget->x11Info().display(), parentWindow,
+ visualInfo.visual, AllocNone);
+ valueMask |= CWColormap;
+ }
+
+ Window window = XCreateWindow(widget->x11Info().display(), parentWindow,
+ widget->x(), widget->y(), widget->width(), widget->height(),
+ 0, visualInfo.depth, InputOutput, visualInfo.visual,
+ valueMask, &windowAttribs);
+
+ // This is a nasty hack to get round the fact that we can't be a friend of QWidget:
+ qt_set_winid_on_widget(widget, window);
+
+ if (visible)
+ widget->show();
+ }
+
+ // At this point, the widget's window should be created and have the correct visual. Now we
+ // just need to create the EGL surface for it:
+ return eglCreateWindowSurface(QEgl::display(), config, (EGLNativeWindowType)widget->winId(), 0);
+ }
+
+ if (x11PixmapData) {
+ // X11 Pixmaps are only created with a depth, so that's all we need to check
+ EGLint configDepth;
+ eglGetConfigAttrib(QEgl::display(), config, EGL_BUFFER_SIZE , &configDepth);
+ if (x11PixmapData->depth() != configDepth) {
+ // The bit depths are wrong which means the EGLConfig isn't compatable with
+ // this pixmap. So we need to replace the pixmap's existing data with a new
+ // one which is created with the correct depth:
+
+#ifndef QT_NO_XRENDER
+ if (configDepth == 32) {
+ qWarning("Warning: EGLConfig's depth (32) != pixmap's depth (%d), converting to ARGB32",
+ x11PixmapData->depth());
+ x11PixmapData->convertToARGB32(true);
+ } else
+#endif
+ {
+ qWarning("Warning: EGLConfig's depth (%d) != pixmap's depth (%d)",
+ configDepth, x11PixmapData->depth());
+ }
+ }
+
+ QEglProperties surfaceAttribs;
+
+ // If the pixmap can't be bound to a texture, it's pretty useless
+ surfaceAttribs.setValue(EGL_TEXTURE_TARGET, EGL_TEXTURE_2D);
+ if (alphaSize > 0)
+ surfaceAttribs.setValue(EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGBA);
+ else
+ surfaceAttribs.setValue(EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGB);
+
+ EGLSurface surf = eglCreatePixmapSurface(QEgl::display(), config,
+ (EGLNativePixmapType) x11PixmapData->handle(),
+ surfaceAttribs.properties());
+ x11PixmapData->gl_surface = (void*)surf;
+ QImagePixmapCleanupHooks::enableCleanupHooks(x11PixmapData);
+ return surf;
+ }
+
+ return EGL_NO_SURFACE;
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/egl/qeglcontext_p.h b/src/gui/egl/qeglcontext_p.h
new file mode 100644
index 0000000000..7eec7eb523
--- /dev/null
+++ b/src/gui/egl/qeglcontext_p.h
@@ -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 QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QEGLCONTEXT_P_H
+#define QEGLCONTEXT_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience of
+// the QtOpenGL and QtOpenVG modules. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qsize.h>
+#include <QtGui/qimage.h>
+
+#include <QtGui/private/qegl_p.h>
+#include <QtGui/private/qeglproperties_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class Q_GUI_EXPORT QEglContext
+{
+public:
+ QEglContext();
+ ~QEglContext();
+
+ bool isValid() const;
+ bool isCurrent() const;
+ bool isSharing() const { return sharing; }
+
+ QEgl::API api() const { return apiType; }
+ void setApi(QEgl::API api) { apiType = api; }
+
+ bool chooseConfig(const QEglProperties& properties, QEgl::PixelFormatMatch match = QEgl::ExactPixelFormat);
+ bool createContext(QEglContext *shareContext = 0, const QEglProperties *properties = 0);
+ void destroyContext();
+ EGLSurface createSurface(QPaintDevice *device, const QEglProperties *properties = 0);
+ void destroySurface(EGLSurface surface);
+
+ bool makeCurrent(EGLSurface surface);
+ bool doneCurrent();
+ bool lazyDoneCurrent();
+ bool swapBuffers(EGLSurface surface);
+
+ void waitNative();
+ void waitClient();
+
+ bool configAttrib(int name, EGLint *value) const;
+ int configAttrib(int name) const;
+
+ EGLContext context() const { return ctx; }
+ void setContext(EGLContext context) { ctx = context; ownsContext = false;}
+
+ EGLDisplay display() {return QEgl::display();}
+
+ EGLConfig config() const { return cfg; }
+ void setConfig(EGLConfig config) { cfg = config; }
+
+ QEglProperties configProperties() const;
+
+private:
+ QEgl::API apiType;
+ EGLContext ctx;
+ EGLConfig cfg;
+ EGLSurface currentSurface;
+ bool current;
+ bool ownsContext;
+ bool sharing;
+
+ static QEglContext *currentContext(QEgl::API api);
+ static void setCurrentContext(QEgl::API api, QEglContext *context);
+};
+
+QT_END_NAMESPACE
+
+#endif // QEGLCONTEXT_P_H
diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp
index d0d5de736e..b5d31033a5 100644
--- a/src/gui/egl/qeglproperties.cpp
+++ b/src/gui/egl/qeglproperties.cpp
@@ -43,12 +43,10 @@
#include <QtCore/qstringlist.h>
#include "qeglproperties_p.h"
+#include "qeglcontext_p.h"
QT_BEGIN_NAMESPACE
-#include "qegl_p.h"
-
-
// Initialize a property block.
QEglProperties::QEglProperties()
{
@@ -60,7 +58,7 @@ QEglProperties::QEglProperties(EGLConfig cfg)
props.append(EGL_NONE);
for (int name = 0x3020; name <= 0x304F; ++name) {
EGLint value;
- if (name != EGL_NONE && eglGetConfigAttrib(QEglContext::display(), cfg, name, &value))
+ if (name != EGL_NONE && eglGetConfigAttrib(QEgl::display(), cfg, name, &value))
setValue(name, value);
}
eglGetError(); // Clear the error state.
@@ -166,6 +164,17 @@ bool QEglProperties::removeValue(int name)
return false;
}
+void QEglProperties::setDeviceType(int devType)
+{
+ if (devType == QInternal::Pixmap || devType == QInternal::Image)
+ setValue(EGL_SURFACE_TYPE, EGL_PIXMAP_BIT);
+ else if (devType == QInternal::Pbuffer)
+ setValue(EGL_SURFACE_TYPE, EGL_PBUFFER_BIT);
+ else
+ setValue(EGL_SURFACE_TYPE, EGL_WINDOW_BIT);
+}
+
+
// Sets the red, green, blue, and alpha sizes based on a pixel format.
// Normally used to match a configuration request to the screen format.
void QEglProperties::setPixelFormat(QImage::Format pixelFormat)
@@ -229,6 +238,16 @@ void QEglProperties::setRenderableType(QEgl::API api)
// reductions in complexity are possible.
bool QEglProperties::reduceConfiguration()
{
+#ifdef EGL_VG_ALPHA_FORMAT_PRE_BIT
+ // For OpenVG, we sometimes try to create a surface using a pre-multiplied format. If we can't
+ // find a config which supports pre-multiplied formats, remove the flag on the surface type:
+ EGLint surfaceType = value(EGL_SURFACE_TYPE);
+ if (surfaceType & EGL_VG_ALPHA_FORMAT_PRE_BIT) {
+ surfaceType ^= EGL_VG_ALPHA_FORMAT_PRE_BIT;
+ setValue(EGL_SURFACE_TYPE, surfaceType);
+ return true;
+ }
+#endif
// EGL chooses configs with the highest color depth over
// those with smaller (but faster) lower color depths. One
// way around this is to set EGL_BUFFER_SIZE to 16, which
@@ -273,12 +292,12 @@ static void addTag(QString& str, const QString& tag)
void QEglProperties::dumpAllConfigs()
{
EGLint count = 0;
- eglGetConfigs(QEglContext::display(), 0, 0, &count);
+ eglGetConfigs(QEgl::display(), 0, 0, &count);
if (count < 1)
return;
EGLConfig *configs = new EGLConfig [count];
- eglGetConfigs(QEglContext::display(), configs, count, &count);
+ eglGetConfigs(QEgl::display(), configs, count, &count);
for (EGLint index = 0; index < count; ++index)
qWarning() << QEglProperties(configs[index]).toString();
delete [] configs;
diff --git a/src/gui/egl/qeglproperties_p.h b/src/gui/egl/qeglproperties_p.h
index 43c3393ef1..eebcf72d26 100644
--- a/src/gui/egl/qeglproperties_p.h
+++ b/src/gui/egl/qeglproperties_p.h
@@ -56,55 +56,10 @@
#include <QtCore/qvarlengtharray.h>
#include <QtGui/qimage.h>
-QT_BEGIN_INCLUDE_NAMESPACE
-
-#if defined(QT_OPENGL_ES_2)
-# include <GLES2/gl2.h>
-#endif
-
-#if defined(QT_GLES_EGL)
-# include <GLES/egl.h>
-#else
-# include <EGL/egl.h>
-#endif
-
-
-#if defined(Q_WS_X11)
-// If <EGL/egl.h> included <X11/Xlib.h>, then the global namespace
-// may have been polluted with X #define's. The following makes sure
-// the X11 headers were included properly and then cleans things up.
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#undef Bool
-#undef Status
-#undef None
-#undef KeyPress
-#undef KeyRelease
-#undef FocusIn
-#undef FocusOut
-#undef Type
-#undef FontChange
-#undef CursorShape
-#endif
-
-QT_END_INCLUDE_NAMESPACE
+#include <QtGui/private/qegl_p.h>
QT_BEGIN_NAMESPACE
-namespace QEgl {
- enum API
- {
- OpenGL,
- OpenVG
- };
-
- enum PixelFormatMatch
- {
- ExactPixelFormat,
- BestPixelFormat
- };
-};
-
class QX11Info;
class QPaintDevice;
@@ -127,9 +82,9 @@ public:
#ifdef Q_WS_X11
void setVisualFormat(const QX11Info *xinfo);
#endif
- void setRenderableType(QEgl::API api);
-
+ void setDeviceType(int devType);
void setPaintDeviceFormat(QPaintDevice *dev);
+ void setRenderableType(QEgl::API api);
bool reduceConfiguration();
diff --git a/src/gui/embedded/directfb.pri b/src/gui/embedded/directfb.pri
index 1795bbd566..75d693e0b4 100644
--- a/src/gui/embedded/directfb.pri
+++ b/src/gui/embedded/directfb.pri
@@ -15,7 +15,7 @@
#DEFINES += QT_DIRECTFB_TIMING
#DEFINES += QT_NO_DIRECTFB_OPAQUE_DETECTION
#DEFINES += QT_NO_DIRECTFB_STRETCHBLIT
-DIRECTFB_DRAWINGOPERATIONS=DRAW_RECTS|DRAW_LINES|DRAW_IMAGE|DRAW_PIXMAP|DRAW_TILED_PIXMAP|STROKE_PATH|DRAW_PATH|DRAW_POINTS|DRAW_ELLIPSE|DRAW_POLYGON|DRAW_TEXT|FILL_PATH|FILL_RECT|DRAW_COLORSPANS|DRAW_ROUNDED_RECT
+DIRECTFB_DRAWINGOPERATIONS=DRAW_RECTS|DRAW_LINES|DRAW_IMAGE|DRAW_PIXMAP|DRAW_TILED_PIXMAP|STROKE_PATH|DRAW_PATH|DRAW_POINTS|DRAW_ELLIPSE|DRAW_POLYGON|DRAW_TEXT|FILL_PATH|FILL_RECT|DRAW_COLORSPANS|DRAW_ROUNDED_RECT|DRAW_STATICTEXT
#DEFINES += \"QT_DIRECTFB_WARN_ON_RASTERFALLBACKS=$$DIRECTFB_DRAWINGOPERATIONS\"
#DEFINES += \"QT_DIRECTFB_DISABLE_RASTERFALLBACKS=$$DIRECTFB_DRAWINGOPERATIONS\"
diff --git a/src/gui/embedded/qscreen_qws.cpp b/src/gui/embedded/qscreen_qws.cpp
index 9bd73a485c..a3fe1abfc5 100644
--- a/src/gui/embedded/qscreen_qws.cpp
+++ b/src/gui/embedded/qscreen_qws.cpp
@@ -39,6 +39,7 @@
**
****************************************************************************/
+#include "qplatformdefs.h"
#include "qscreen_qws.h"
#include "qcolormap.h"
@@ -3223,13 +3224,13 @@ QScreen * qt_probe_bus()
return qt_dodriver("unaccel.so",0,0);
}
- DIR * dirptr=opendir("/proc/bus/pci");
+ QT_DIR *dirptr = QT_OPENDIR("/proc/bus/pci");
if(!dirptr)
return qt_dodriver("unaccel.so",0,0);
- DIR * dirptr2;
- dirent * cards;
+ QT_DIR * dirptr2;
+ QT_DIRENT *cards;
- dirent * busses=readdir(dirptr);
+ QT_DIRENT *busses = QT_READDIR(dirptr);
while(busses) {
if(busses->d_name[0]!='.') {
@@ -3237,9 +3238,9 @@ QScreen * qt_probe_bus()
strcpy(buf,"/proc/bus/pci/");
qstrcpy(buf+14,busses->d_name);
int p=strlen(buf);
- dirptr2=opendir(buf);
+ dirptr2 = QT_OPENDIR(buf);
if(dirptr2) {
- cards=readdir(dirptr2);
+ cards = QT_READDIR(dirptr2);
while(cards) {
if(cards->d_name[0]!='.') {
buf[p]='/';
@@ -3248,14 +3249,14 @@ QScreen * qt_probe_bus()
if(ret)
return ret;
}
- cards=readdir(dirptr2);
+ cards = QT_READDIR(dirptr2);
}
- closedir(dirptr2);
+ QT_CLOSEDIR(dirptr2);
}
}
- busses=readdir(dirptr);
+ busses = QT_READDIR(dirptr);
}
- closedir(dirptr);
+ QT_CLOSEDIR(dirptr);
return qt_dodriver("unaccel.so",0,0);
}
diff --git a/src/gui/embedded/qwsmanager_qws.cpp b/src/gui/embedded/qwsmanager_qws.cpp
index d6ef14858b..79076c5785 100644
--- a/src/gui/embedded/qwsmanager_qws.cpp
+++ b/src/gui/embedded/qwsmanager_qws.cpp
@@ -267,8 +267,10 @@ void QWSManager::mouseMoveEvent(QMouseEvent *e)
#ifndef QT_NO_CURSOR
- QWSDisplay *qwsd = QApplication::desktop()->qwsDisplay();
- qwsd->selectCursor(d->managed, regionToShape(d->cachedRegionAt()));
+ if (d->managed->minimumSize() != d->managed->maximumSize()) {
+ QWSDisplay *qwsd = QApplication::desktop()->qwsDisplay();
+ qwsd->selectCursor(d->managed, regionToShape(d->cachedRegionAt()));
+ }
#endif //QT_NO_CURSOR
if (d->activeRegion)
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index f3c90ca398..b7120165d4 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -673,6 +673,7 @@
#include <QtCore/qtimer.h>
#include <QtCore/qvariant.h>
#include <QtCore/qvarlengtharray.h>
+#include <QtCore/qnumeric.h>
#include <QtGui/qapplication.h>
#include <QtGui/qbitmap.h>
#include <QtGui/qpainter.h>
@@ -3478,6 +3479,9 @@ void QGraphicsItem::setX(qreal x)
if (d_ptr->inDestructor)
return;
+ if (qIsNaN(x))
+ return;
+
d_ptr->setPosHelper(QPointF(x, d_ptr->pos.y()));
}
@@ -3502,6 +3506,9 @@ void QGraphicsItem::setY(qreal y)
if (d_ptr->inDestructor)
return;
+ if (qIsNaN(y))
+ return;
+
d_ptr->setPosHelper(QPointF(d_ptr->pos.x(), y));
}
diff --git a/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h
index d72833bc6e..56f94a20c9 100644
--- a/src/gui/graphicsview/qgraphicsitem.h
+++ b/src/gui/graphicsview/qgraphicsitem.h
@@ -540,10 +540,10 @@ class Q_GUI_EXPORT QGraphicsObject : public QObject, public QGraphicsItem
Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged FINAL)
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged)
Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged FINAL)
- Q_PROPERTY(QPointF pos READ pos WRITE setPos)
- Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged)
- Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged)
- Q_PROPERTY(qreal z READ zValue WRITE setZValue NOTIFY zChanged)
+ Q_PROPERTY(QPointF pos READ pos WRITE setPos FINAL)
+ Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged FINAL)
+ Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged FINAL)
+ Q_PROPERTY(qreal z READ zValue WRITE setZValue NOTIFY zChanged FINAL)
Q_PROPERTY(qreal rotation READ rotation WRITE setRotation NOTIFY rotationChanged)
Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged)
Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint WRITE setTransformOriginPoint)
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index ea04e0be4d..de8cf56975 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -156,8 +156,8 @@ public:
needSortChildren(0),
allChildrenDirty(0),
fullUpdatePending(0),
- flags(0),
dirtyChildrenBoundingRect(1),
+ flags(0),
paintedViewBoundingRectsNeedRepaint(0),
dirtySceneTransform(1),
geometryChanged(1),
@@ -475,11 +475,11 @@ public:
quint32 inSetPosHelper : 1;
quint32 needSortChildren : 1;
quint32 allChildrenDirty : 1;
+ quint32 fullUpdatePending : 1;
+ quint32 dirtyChildrenBoundingRect : 1;
// Packed 32 bits
- quint32 fullUpdatePending : 1;
quint32 flags : 17;
- quint32 dirtyChildrenBoundingRect : 1;
quint32 paintedViewBoundingRectsNeedRepaint : 1;
quint32 dirtySceneTransform : 1;
quint32 geometryChanged : 1;
@@ -493,10 +493,10 @@ public:
quint32 sceneTransformTranslateOnly : 1;
quint32 notifyBoundingRectChanged : 1;
quint32 notifyInvalidated : 1;
-
- // New 32 bits
quint32 mouseSetsFocus : 1;
quint32 explicitActivate : 1;
+
+ // New 32 bits
quint32 wantsActive : 1;
quint32 holesInSiblingIndex : 1;
quint32 sequentialOrdering : 1;
@@ -504,6 +504,7 @@ public:
quint32 scenePosDescendants : 1;
quint32 pendingPolish : 1;
quint32 mayHaveChildWithGraphicsEffect : 1;
+ quint32 padding : 25;
// Optional stacking order
int globalStackingOrder;
@@ -609,7 +610,7 @@ public:
return item->type() == QGraphicsPixmapItem::Type
&& !(item->flags() & QGraphicsItem::ItemIsSelectable)
&& item->d_ptr->children.size() == 0;
- //|| (item->d_ptr->isObject && qobject_cast<QmlGraphicsImage *>(q_func()));
+ //|| (item->d_ptr->isObject && qobject_cast<QDeclarativeImage *>(q_func()));
}
inline const QStyleOption *styleOption() const
diff --git a/src/gui/graphicsview/qgraphicslinearlayout.cpp b/src/gui/graphicsview/qgraphicslinearlayout.cpp
index 6a9eb29cd4..9722683d3c 100644
--- a/src/gui/graphicsview/qgraphicslinearlayout.cpp
+++ b/src/gui/graphicsview/qgraphicslinearlayout.cpp
@@ -554,6 +554,8 @@ void QGraphicsLinearLayout::dump(int indent) const
d->orientation == Qt::Horizontal ? "Horizontal" : "Vertical");
d->engine.dump(indent + 1);
}
+#else
+ Q_UNUSED(indent);
#endif
}
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 4ee2301806..159c997f80 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -228,6 +228,7 @@
#include <QtCore/qstack.h>
#include <QtCore/qtimer.h>
#include <QtCore/qvarlengtharray.h>
+#include <QtCore/QMetaMethod>
#include <QtGui/qapplication.h>
#include <QtGui/qdesktopwidget.h>
#include <QtGui/qevent.h>
@@ -277,8 +278,6 @@ static void _q_hoverFromMouseEvent(QGraphicsSceneHoverEvent *hover, const QGraph
hover->setAccepted(mouseEvent->isAccepted());
}
-int QGraphicsScenePrivate::changedSignalIndex;
-
/*!
\internal
*/
@@ -329,9 +328,10 @@ void QGraphicsScenePrivate::init()
index = new QGraphicsSceneBspTreeIndex(q);
// Keep this index so we can check for connected slots later on.
- if (!changedSignalIndex) {
- changedSignalIndex = signalIndex("changed(QList<QRectF>)");
- }
+ changedSignalIndex = signalIndex("changed(QList<QRectF>)");
+ processDirtyItemsIndex = q->metaObject()->indexOfSlot("_q_processDirtyItems()");
+ polishItemsIndex = q->metaObject()->indexOfSlot("_q_polishItems()");
+
qApp->d_func()->scene_list.append(q);
q->update();
}
@@ -693,6 +693,18 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item)
--selectionChanging;
if (!selectionChanging && selectedItems.size() != oldSelectedItemsSize)
emit q->selectionChanged();
+
+ QHash<QGesture *, QGraphicsObject *>::iterator it;
+ for (it = gestureTargets.begin(); it != gestureTargets.end();) {
+ if (it.value() == item)
+ it = gestureTargets.erase(it);
+ else
+ ++it;
+ }
+ QGraphicsObject *dummy = static_cast<QGraphicsObject *>(item);
+ cachedTargetItems.removeOne(dummy);
+ cachedItemGestures.remove(dummy);
+ cachedAlreadyDeliveredGestures.remove(dummy);
}
/*!
@@ -2525,8 +2537,10 @@ void QGraphicsScene::addItem(QGraphicsItem *item)
return;
}
- if (d->unpolishedItems.isEmpty())
- QMetaObject::invokeMethod(this, "_q_polishItems", Qt::QueuedConnection);
+ if (d->unpolishedItems.isEmpty()) {
+ QMetaMethod method = metaObject()->method(d->polishItemsIndex);
+ method.invoke(this, Qt::QueuedConnection);
+ }
d->unpolishedItems.append(item);
item->d_ptr->pendingPolish = true;
@@ -4239,6 +4253,8 @@ static void _q_paintItem(QGraphicsItem *item, QPainter *painter,
widgetItem->paintWindowFrame(painter, option, widget);
if (painterStateProtection)
painter->restore();
+ } else if (widgetItem->autoFillBackground()) {
+ painter->fillRect(option->exposedRect, widgetItem->palette().window());
}
widgetItem->paint(painter, option, widget);
@@ -4865,7 +4881,9 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b
return;
if (!processDirtyItemsEmitted) {
- QMetaObject::invokeMethod(q_ptr, "_q_processDirtyItems", Qt::QueuedConnection);
+ QMetaMethod method = q_ptr->metaObject()->method(processDirtyItemsIndex);
+ method.invoke(q_ptr, Qt::QueuedConnection);
+// QMetaObject::invokeMethod(q_ptr, "_q_processDirtyItems", Qt::QueuedConnection);
processDirtyItemsEmitted = true;
}
@@ -5887,45 +5905,51 @@ void QGraphicsScenePrivate::leaveModal(QGraphicsItem *panel)
dispatchHoverEvent(&hoverEvent);
}
-void QGraphicsScenePrivate::getGestureTargets(const QSet<QGesture *> &gestures,
- QWidget *viewport,
- QMap<Qt::GestureType, QGesture *> *conflictedGestures,
- QList<QList<QGraphicsObject *> > *conflictedItems,
- QHash<QGesture *, QGraphicsObject *> *normalGestures)
+void QGraphicsScenePrivate::gestureTargetsAtHotSpots(const QSet<QGesture *> &gestures,
+ Qt::GestureFlag flag,
+ QHash<QGraphicsObject *, QSet<QGesture *> > *targets,
+ QSet<QGraphicsObject *> *itemsSet,
+ QSet<QGesture *> *normal,
+ QSet<QGesture *> *conflicts)
{
+ QSet<QGesture *> normalGestures; // that are not in conflicted state.
foreach (QGesture *gesture, gestures) {
- Qt::GestureType gestureType = gesture->gestureType();
- if (gesture->hasHotSpot()) {
- QPoint screenPos = gesture->hotSpot().toPoint();
- QList<QGraphicsItem *> items = itemsAtPosition(screenPos, QPointF(), viewport);
- QList<QGraphicsObject *> result;
- for (int j = 0; j < items.size(); ++j) {
- QGraphicsItem *item = items.at(j);
+ if (!gesture->hasHotSpot())
+ continue;
+ const Qt::GestureType gestureType = gesture->gestureType();
+ QList<QGraphicsItem *> items = itemsAtPosition(QPoint(), gesture->d_func()->sceneHotSpot, 0);
+ for (int j = 0; j < items.size(); ++j) {
+ QGraphicsItem *item = items.at(j);
- // Check if the item is blocked by a modal panel and use it as
- // a target instead of this item.
- (void) item->isBlockedByModalPanel(&item);
+ // Check if the item is blocked by a modal panel and use it as
+ // a target instead of this item.
+ (void) item->isBlockedByModalPanel(&item);
- if (QGraphicsObject *itemobj = item->toGraphicsObject()) {
- QGraphicsItemPrivate *d = item->d_func();
- if (d->gestureContext.contains(gestureType)) {
- result.append(itemobj);
+ if (QGraphicsObject *itemobj = item->toGraphicsObject()) {
+ QGraphicsItemPrivate *d = item->QGraphicsItem::d_func();
+ QMap<Qt::GestureType, Qt::GestureFlags>::const_iterator it =
+ d->gestureContext.find(gestureType);
+ if (it != d->gestureContext.end() && (!flag || (it.value() & flag))) {
+ if (normalGestures.contains(gesture)) {
+ normalGestures.remove(gesture);
+ if (conflicts)
+ conflicts->insert(gesture);
+ } else {
+ normalGestures.insert(gesture);
}
+ if (targets)
+ (*targets)[itemobj].insert(gesture);
+ if (itemsSet)
+ (*itemsSet).insert(itemobj);
}
- // Don't propagate through panels.
- if (item->isPanel())
- break;
- }
- DEBUG() << "QGraphicsScenePrivate::getGestureTargets:"
- << gesture << result;
- if (result.size() == 1) {
- normalGestures->insert(gesture, result.first());
- } else if (!result.isEmpty()) {
- conflictedGestures->insert(gestureType, gesture);
- conflictedItems->append(result);
}
+ // Don't propagate through panels.
+ if (item->isPanel())
+ break;
}
}
+ if (normal)
+ *normal = normalGestures;
}
void QGraphicsScenePrivate::gestureEventHandler(QGestureEvent *event)
@@ -5933,200 +5957,220 @@ void QGraphicsScenePrivate::gestureEventHandler(QGestureEvent *event)
QWidget *viewport = event->widget();
if (!viewport)
return;
+ QGraphicsView *graphicsView = qobject_cast<QGraphicsView *>(viewport->parent());
+ if (!graphicsView)
+ return;
+
QList<QGesture *> allGestures = event->gestures();
DEBUG() << "QGraphicsScenePrivate::gestureEventHandler:"
- << "Delivering gestures:" << allGestures;
-
- typedef QHash<QGraphicsObject *, QList<QGesture *> > GesturesPerItem;
- GesturesPerItem gesturesPerItem;
+ << "Gestures:" << allGestures;
QSet<QGesture *> startedGestures;
+ QPoint delta = viewport->mapFromGlobal(QPoint());
+ QTransform toScene = QTransform::fromTranslate(delta.x(), delta.y())
+ * graphicsView->viewportTransform().inverted();
foreach (QGesture *gesture, allGestures) {
+ // cache scene coordinates of the hot spot
+ if (gesture->hasHotSpot()) {
+ gesture->d_func()->sceneHotSpot = toScene.map(gesture->hotSpot());
+ } else {
+ gesture->d_func()->sceneHotSpot = QPointF();
+ }
+
QGraphicsObject *target = gestureTargets.value(gesture, 0);
if (!target) {
// when we are not in started mode but don't have a target
// then the only one interested in gesture is the view/scene
if (gesture->state() == Qt::GestureStarted)
startedGestures.insert(gesture);
- } else {
- gesturesPerItem[target].append(gesture);
}
}
- QMap<Qt::GestureType, QGesture *> conflictedGestures;
- QList<QList<QGraphicsObject *> > conflictedItems;
- QHash<QGesture *, QGraphicsObject *> normalGestures;
- getGestureTargets(startedGestures, viewport, &conflictedGestures, &conflictedItems,
- &normalGestures);
- DEBUG() << "QGraphicsScenePrivate::gestureEventHandler:"
- << "Conflicting gestures:" << conflictedGestures.values() << conflictedItems;
- Q_ASSERT((conflictedGestures.isEmpty() && conflictedItems.isEmpty()) ||
- (!conflictedGestures.isEmpty() && !conflictedItems.isEmpty()));
-
- // gestures that were sent as override events, but no one accepted them
- QHash<QGesture *, QGraphicsObject *> ignoredConflictedGestures;
-
- // deliver conflicted gestures as override events first
- while (!conflictedGestures.isEmpty() && !conflictedItems.isEmpty()) {
- // get the topmost item to deliver the override event
- Q_ASSERT(!conflictedItems.isEmpty());
- Q_ASSERT(!conflictedItems.first().isEmpty());
- QGraphicsObject *topmost = conflictedItems.first().first();
- for (int i = 1; i < conflictedItems.size(); ++i) {
- QGraphicsObject *item = conflictedItems.at(i).first();
- if (qt_closestItemFirst(item, topmost)) {
- topmost = item;
- }
- }
- // get a list of gestures to send to the item
- QList<Qt::GestureType> grabbedGestures =
- topmost->QGraphicsItem::d_func()->gestureContext.keys();
- QList<QGesture *> gestures;
- for (int i = 0; i < grabbedGestures.size(); ++i) {
- if (QGesture *g = conflictedGestures.value(grabbedGestures.at(i), 0)) {
- gestures.append(g);
- if (!ignoredConflictedGestures.contains(g))
- ignoredConflictedGestures.insert(g, topmost);
- }
- }
-
- // send gesture override to the topmost item
- QGestureEvent ev(gestures);
- ev.t = QEvent::GestureOverride;
- ev.setWidget(event->widget());
- // mark event and individual gestures as ignored
- ev.ignore();
- foreach(QGesture *g, gestures)
- ev.setAccepted(g, false);
+ if (!startedGestures.isEmpty()) {
+ QSet<QGesture *> normalGestures; // that have just one target
+ QSet<QGesture *> conflictedGestures; // that have multiple possible targets
+ gestureTargetsAtHotSpots(startedGestures, Qt::GestureFlag(0), &cachedItemGestures, 0,
+ &normalGestures, &conflictedGestures);
+ cachedTargetItems = cachedItemGestures.keys();
+ qSort(cachedTargetItems.begin(), cachedTargetItems.end(), qt_closestItemFirst);
DEBUG() << "QGraphicsScenePrivate::gestureEventHandler:"
- << "delivering override to"
- << topmost << gestures;
- sendEvent(topmost, &ev);
- // mark all accepted gestures to deliver them as normal gesture events
- foreach (QGesture *g, gestures) {
- if (ev.isAccepted() || ev.isAccepted(g)) {
- conflictedGestures.remove(g->gestureType());
- gestureTargets.remove(g);
- // add the gesture to the list of normal delivered gestures
- normalGestures.insert(g, topmost);
+ << "Normal gestures:" << normalGestures
+ << "Conflicting gestures:" << conflictedGestures;
+
+ // deliver conflicted gestures as override events AND remember
+ // initial gesture targets
+ if (!conflictedGestures.isEmpty()) {
+ for (int i = 0; i < cachedTargetItems.size(); ++i) {
+ QWeakPointer<QGraphicsObject> item = cachedTargetItems.at(i);
+
+ // get gestures to deliver to the current item
+ QSet<QGesture *> gestures = conflictedGestures & cachedItemGestures.value(item.data());
+ if (gestures.isEmpty())
+ continue;
+
DEBUG() << "QGraphicsScenePrivate::gestureEventHandler:"
- << "override was accepted:"
- << g << topmost;
- ignoredConflictedGestures.remove(g);
+ << "delivering override to"
+ << item.data() << gestures;
+ // send gesture override
+ QGestureEvent ev(gestures.toList());
+ ev.t = QEvent::GestureOverride;
+ ev.setWidget(event->widget());
+ // mark event and individual gestures as ignored
+ ev.ignore();
+ foreach(QGesture *g, gestures)
+ ev.setAccepted(g, false);
+ sendEvent(item.data(), &ev);
+ // mark all accepted gestures to deliver them as normal gesture events
+ foreach (QGesture *g, gestures) {
+ if (ev.isAccepted() || ev.isAccepted(g)) {
+ conflictedGestures.remove(g);
+ // mark the item as a gesture target
+ if (item)
+ gestureTargets.insert(g, item.data());
+ DEBUG() << "QGraphicsScenePrivate::gestureEventHandler:"
+ << "override was accepted:"
+ << g << item.data();
+ }
+ // remember the first item that received the override event
+ // as it most likely become a target if noone else accepts
+ // the override event
+ if (!gestureTargets.contains(g) && item)
+ gestureTargets.insert(g, item.data());
+
+ }
+ if (conflictedGestures.isEmpty())
+ break;
}
}
- // remove the item that we've already delivered from the list
- for (int i = 0; i < conflictedItems.size(); ) {
- QList<QGraphicsObject *> &items = conflictedItems[i];
- if (items.first() == topmost) {
- items.removeFirst();
- if (items.isEmpty()) {
- conflictedItems.removeAt(i);
- continue;
+ // remember the initial target item for each gesture that was not in
+ // the conflicted state.
+ if (!normalGestures.isEmpty()) {
+ for (int i = 0; i < cachedTargetItems.size() && !normalGestures.isEmpty(); ++i) {
+ QGraphicsObject *item = cachedTargetItems.at(i);
+
+ // get gestures to deliver to the current item
+ foreach (QGesture *g, cachedItemGestures.value(item)) {
+ if (!gestureTargets.contains(g)) {
+ gestureTargets.insert(g, item);
+ normalGestures.remove(g);
+ }
}
}
- ++i;
}
}
- // put back those started gestures that are not in the conflicted state
- // and remember their targets
- QHash<QGesture *, QGraphicsObject *>::const_iterator it = normalGestures.begin(),
- e = normalGestures.end();
- for (; it != e; ++it) {
- QGesture *g = it.key();
- QGraphicsObject *receiver = it.value();
- Q_ASSERT(!gestureTargets.contains(g));
- gestureTargets.insert(g, receiver);
- gesturesPerItem[receiver].append(g);
- }
- it = ignoredConflictedGestures.begin();
- e = ignoredConflictedGestures.end();
- for (; it != e; ++it) {
- QGesture *g = it.key();
- QGraphicsObject *receiver = it.value();
- Q_ASSERT(!gestureTargets.contains(g));
- gestureTargets.insert(g, receiver);
- gesturesPerItem[receiver].append(g);
- }
-
- DEBUG() << "QGraphicsScenePrivate::gestureEventHandler:"
- << "Started gestures:" << normalGestures.keys()
- << "All gestures:" << gesturesPerItem.values();
-
- // deliver all events
- QList<QGesture *> alreadyIgnoredGestures;
- QHash<QGraphicsObject *, QSet<QGesture *> > itemIgnoredGestures;
- QList<QGraphicsObject *> targetItems = gesturesPerItem.keys();
- qSort(targetItems.begin(), targetItems.end(), qt_closestItemFirst);
- for (int i = 0; i < targetItems.size(); ++i) {
- QGraphicsObject *item = targetItems.at(i);
- QList<QGesture *> gestures = gesturesPerItem.value(item);
- // remove gestures that were already delivered once and were ignored
- DEBUG() << "QGraphicsScenePrivate::gestureEventHandler:"
- << "already ignored gestures for item"
- << item << ":" << itemIgnoredGestures.value(item);
-
- if (itemIgnoredGestures.contains(item)) // don't deliver twice to the same item
- continue;
- QGraphicsItemPrivate *gid = item->QGraphicsItem::d_func();
- foreach(QGesture *g, alreadyIgnoredGestures) {
- QMap<Qt::GestureType, Qt::GestureFlags>::iterator contextit =
- gid->gestureContext.find(g->gestureType());
- bool deliver = contextit != gid->gestureContext.end() &&
- (g->state() == Qt::GestureStarted ||
- (contextit.value() & Qt::ReceivePartialGestures));
- if (deliver)
- gestures += g;
+ // deliver all gesture events
+ QSet<QGesture *> undeliveredGestures;
+ QSet<QGesture *> parentPropagatedGestures;
+ foreach (QGesture *gesture, allGestures) {
+ if (QGraphicsObject *target = gestureTargets.value(gesture, 0)) {
+ cachedItemGestures[target].insert(gesture);
+ cachedTargetItems.append(target);
+ undeliveredGestures.insert(gesture);
+ QGraphicsItemPrivate *d = target->QGraphicsItem::d_func();
+ const Qt::GestureFlags flags = d->gestureContext.value(gesture->gestureType());
+ if (flags & Qt::IgnoredGesturesPropagateToParent)
+ parentPropagatedGestures.insert(gesture);
+ } else {
+ DEBUG() << "QGraphicsScenePrivate::gestureEventHandler:"
+ << "no target for" << gesture << "at"
+ << gesture->hotSpot() << gesture->d_func()->sceneHotSpot;
}
+ }
+ qSort(cachedTargetItems.begin(), cachedTargetItems.end(), qt_closestItemFirst);
+ for (int i = 0; i < cachedTargetItems.size(); ++i) {
+ QWeakPointer<QGraphicsObject> receiver = cachedTargetItems.at(i);
+ QSet<QGesture *> gestures =
+ undeliveredGestures & cachedItemGestures.value(receiver.data());
+ gestures -= cachedAlreadyDeliveredGestures.value(receiver.data());
+
if (gestures.isEmpty())
continue;
+
+ cachedAlreadyDeliveredGestures[receiver.data()] += gestures;
+ const bool isPanel = receiver.data()->isPanel();
+
DEBUG() << "QGraphicsScenePrivate::gestureEventHandler:"
<< "delivering to"
- << item << gestures;
- QGestureEvent ev(gestures);
+ << receiver.data() << gestures;
+ QGestureEvent ev(gestures.toList());
ev.setWidget(event->widget());
- sendEvent(item, &ev);
+ sendEvent(receiver.data(), &ev);
QSet<QGesture *> ignoredGestures;
foreach (QGesture *g, gestures) {
if (!ev.isAccepted() && !ev.isAccepted(g)) {
- ignoredGestures.insert(g);
+ // if the gesture was ignored by its target, we will update the
+ // targetItems list with a possible target items (items that
+ // want to receive partial gestures).
+ // ### wont' work if the target was destroyed in the event
+ // we will just stop delivering it.
+ if (receiver && receiver.data() == gestureTargets.value(g, 0))
+ ignoredGestures.insert(g);
} else {
- if (g->state() == Qt::GestureStarted)
- gestureTargets[g] = item;
+ if (receiver && g->state() == Qt::GestureStarted) {
+ // someone accepted the propagated initial GestureStarted
+ // event, let it be the new target for all following events.
+ gestureTargets[g] = receiver.data();
+ }
+ undeliveredGestures.remove(g);
}
}
- if (!ignoredGestures.isEmpty()) {
- // get a list of items under the (current) hotspot of each ignored
- // gesture and start delivery again from the beginning
- DEBUG() << "QGraphicsScenePrivate::gestureEventHandler:"
- << "item has ignored the event, will propagate."
- << item << ignoredGestures;
- itemIgnoredGestures[item] += ignoredGestures;
- QMap<Qt::GestureType, QGesture *> conflictedGestures;
- QList<QList<QGraphicsObject *> > itemsForConflictedGestures;
- QHash<QGesture *, QGraphicsObject *> normalGestures;
- getGestureTargets(ignoredGestures, viewport,
- &conflictedGestures, &itemsForConflictedGestures,
- &normalGestures);
- QSet<QGraphicsObject *> itemsSet = targetItems.toSet();
- for (int k = 0; k < itemsForConflictedGestures.size(); ++k)
- itemsSet += itemsForConflictedGestures.at(k).toSet();
- targetItems = itemsSet.toList();
- qSort(targetItems.begin(), targetItems.end(), qt_closestItemFirst);
- alreadyIgnoredGestures = conflictedGestures.values();
+ if (undeliveredGestures.isEmpty())
+ break;
+
+ // ignoredGestures list is only filled when delivering to the gesture
+ // target item, so it is safe to assume item == target.
+ if (!ignoredGestures.isEmpty() && !isPanel) {
+ // look for new potential targets for gestures that were ignored
+ // and should be propagated.
+
+ QSet<QGraphicsObject *> targetsSet = cachedTargetItems.toSet();
+
+ if (receiver) {
+ // first if the gesture should be propagated to parents only
+ for (QSet<QGesture *>::iterator it = ignoredGestures.begin();
+ it != ignoredGestures.end();) {
+ if (parentPropagatedGestures.contains(*it)) {
+ QGesture *gesture = *it;
+ const Qt::GestureType gestureType = gesture->gestureType();
+ QGraphicsItem *item = receiver.data();
+ while (item) {
+ if (QGraphicsObject *obj = item->toGraphicsObject()) {
+ if (item->d_func()->gestureContext.contains(gestureType)) {
+ targetsSet.insert(obj);
+ cachedItemGestures[obj].insert(gesture);
+ }
+ }
+ if (item->isPanel())
+ break;
+ item = item->parentItem();
+ }
+
+ it = ignoredGestures.erase(it);
+ continue;
+ }
+ ++it;
+ }
+ }
+
+ gestureTargetsAtHotSpots(ignoredGestures, Qt::ReceivePartialGestures,
+ &cachedItemGestures, &targetsSet, 0, 0);
+
+ cachedTargetItems = targetsSet.toList();
+ qSort(cachedTargetItems.begin(), cachedTargetItems.end(), qt_closestItemFirst);
DEBUG() << "QGraphicsScenePrivate::gestureEventHandler:"
- << "new targets:" << targetItems;
+ << "new targets:" << cachedTargetItems;
i = -1; // start delivery again
continue;
}
}
+
foreach (QGesture *g, startedGestures) {
if (g->gestureCancelPolicy() == QGesture::CancelAllInContext) {
DEBUG() << "lets try to cancel some";
// find gestures in context in Qt::GestureStarted or Qt::GestureUpdated state and cancel them
- cancelGesturesForChildren(g, event->widget());
+ cancelGesturesForChildren(g);
}
}
@@ -6141,9 +6185,13 @@ void QGraphicsScenePrivate::gestureEventHandler(QGestureEvent *event)
break;
}
}
+
+ cachedTargetItems.clear();
+ cachedItemGestures.clear();
+ cachedAlreadyDeliveredGestures.clear();
}
-void QGraphicsScenePrivate::cancelGesturesForChildren(QGesture *original, QWidget *viewport)
+void QGraphicsScenePrivate::cancelGesturesForChildren(QGesture *original)
{
Q_ASSERT(original);
QGraphicsItem *originalItem = gestureTargets.value(original);
@@ -6199,8 +6247,7 @@ void QGraphicsScenePrivate::cancelGesturesForChildren(QGesture *original, QWidge
if (!g->hasHotSpot())
continue;
- QPoint screenPos = g->hotSpot().toPoint();
- QList<QGraphicsItem *> items = itemsAtPosition(screenPos, QPointF(), viewport);
+ QList<QGraphicsItem *> items = itemsAtPosition(QPoint(), g->d_func()->sceneHotSpot, 0);
for (int j = 0; j < items.size(); ++j) {
QGraphicsObject *item = items.at(j)->toGraphicsObject();
if (!item)
diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h
index 04ffe0f90e..11e250efca 100644
--- a/src/gui/graphicsview/qgraphicsscene_p.h
+++ b/src/gui/graphicsview/qgraphicsscene_p.h
@@ -87,7 +87,9 @@ public:
static QGraphicsScenePrivate *get(QGraphicsScene *q);
- static int changedSignalIndex;
+ int changedSignalIndex;
+ int processDirtyItemsIndex;
+ int polishItemsIndex;
QGraphicsScene::ItemIndexMethod indexMethod;
QGraphicsSceneIndex *index;
@@ -294,13 +296,18 @@ public:
bool allItemsIgnoreTouchEvents;
void enableTouchEventsOnViews();
+ QList<QGraphicsObject *> cachedTargetItems;
+ QHash<QGraphicsObject *, QSet<QGesture *> > cachedItemGestures;
+ QHash<QGraphicsObject *, QSet<QGesture *> > cachedAlreadyDeliveredGestures;
QHash<QGesture *, QGraphicsObject *> gestureTargets;
void gestureEventHandler(QGestureEvent *event);
- void getGestureTargets(const QSet<QGesture *> &gestures, QWidget *viewport,
- QMap<Qt::GestureType, QGesture *> *conflictedGestures,
- QList<QList<QGraphicsObject *> > *conflictedItems,
- QHash<QGesture *, QGraphicsObject *> *normalGestures);
- void cancelGesturesForChildren(QGesture *original, QWidget *viewport);
+ void gestureTargetsAtHotSpots(const QSet<QGesture *> &gestures,
+ Qt::GestureFlag flag,
+ QHash<QGraphicsObject *, QSet<QGesture *> > *targets,
+ QSet<QGraphicsObject *> *itemsSet = 0,
+ QSet<QGesture *> *normal = 0,
+ QSet<QGesture *> *conflicts = 0);
+ void cancelGesturesForChildren(QGesture *original);
void updateInputMethodSensitivityInViews();
diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h
index 9d3edcb84a..729837a4d3 100644
--- a/src/gui/graphicsview/qgraphicsview_p.h
+++ b/src/gui/graphicsview/qgraphicsview_p.h
@@ -65,7 +65,7 @@
QT_BEGIN_NAMESPACE
-class Q_AUTOTEST_EXPORT QGraphicsViewPrivate : public QAbstractScrollAreaPrivate
+class Q_GUI_EXPORT QGraphicsViewPrivate : public QAbstractScrollAreaPrivate
{
Q_DECLARE_PUBLIC(QGraphicsView)
public:
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp
index 5e01785307..87416b40f8 100644
--- a/src/gui/graphicsview/qgraphicswidget.cpp
+++ b/src/gui/graphicsview/qgraphicswidget.cpp
@@ -967,6 +967,36 @@ void QGraphicsWidget::setPalette(const QPalette &palette)
}
/*!
+ \property QGraphicsWidget::autoFillBackground
+ \brief whether the widget background is filled automatically
+ \since 4.7
+
+ If enabled, this property will cause Qt to fill the background of the
+ widget before invoking the paint() method. The color used is defined by the
+ QPalette::Window color role from the widget's \l{QPalette}{palette}.
+
+ In addition, Windows are always filled with QPalette::Window, unless the
+ WA_OpaquePaintEvent or WA_NoSystemBackground attributes are set.
+
+ By default, this property is false.
+
+ \sa Qt::WA_OpaquePaintEvent, Qt::WA_NoSystemBackground,
+*/
+bool QGraphicsWidget::autoFillBackground() const
+{
+ Q_D(const QGraphicsWidget);
+ return d->autoFillBackground;
+}
+void QGraphicsWidget::setAutoFillBackground(bool enabled)
+{
+ Q_D(QGraphicsWidget);
+ if (d->autoFillBackground != enabled) {
+ d->autoFillBackground = enabled;
+ update();
+ }
+}
+
+/*!
If this widget is currently managed by a layout, this function notifies
the layout that the widget's size hints have changed and the layout
may need to resize and reposition the widget accordingly.
diff --git a/src/gui/graphicsview/qgraphicswidget.h b/src/gui/graphicsview/qgraphicswidget.h
index f1d382bb44..4bea5be155 100644
--- a/src/gui/graphicsview/qgraphicswidget.h
+++ b/src/gui/graphicsview/qgraphicswidget.h
@@ -82,6 +82,7 @@ class Q_GUI_EXPORT QGraphicsWidget : public QGraphicsObject, public QGraphicsLay
Q_PROPERTY(Qt::WindowFlags windowFlags READ windowFlags WRITE setWindowFlags)
Q_PROPERTY(QString windowTitle READ windowTitle WRITE setWindowTitle)
Q_PROPERTY(QRectF geometry READ geometry WRITE setGeometry)
+ Q_PROPERTY(bool autoFillBackground READ autoFillBackground WRITE setAutoFillBackground)
public:
QGraphicsWidget(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0);
~QGraphicsWidget();
@@ -103,6 +104,9 @@ public:
QPalette palette() const;
void setPalette(const QPalette &palette);
+ bool autoFillBackground() const;
+ void setAutoFillBackground(bool enabled);
+
void resize(const QSizeF &size);
inline void resize(qreal w, qreal h) { resize(QSizeF(w, h)); }
QSizeF size() const;
diff --git a/src/gui/graphicsview/qgraphicswidget_p.h b/src/gui/graphicsview/qgraphicswidget_p.h
index 2c5b3bfedd..3ab8737478 100644
--- a/src/gui/graphicsview/qgraphicswidget_p.h
+++ b/src/gui/graphicsview/qgraphicswidget_p.h
@@ -80,6 +80,7 @@ public:
inSetGeometry(0),
polished(0),
inSetPos(0),
+ autoFillBackground(0),
focusPolicy(Qt::NoFocus),
focusNext(0),
focusPrev(0),
@@ -172,6 +173,7 @@ public:
quint32 inSetGeometry : 1;
quint32 polished: 1;
quint32 inSetPos : 1;
+ quint32 autoFillBackground : 1;
// Focus
Qt::FocusPolicy focusPolicy;
diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri
index b67be55f39..8d75fdd078 100644
--- a/src/gui/image/image.pri
+++ b/src/gui/image/image.pri
@@ -96,6 +96,7 @@ SOURCES += \
unix:LIBS_PRIVATE += -lpng
win32:LIBS += libpng.lib
} else {
+ DEFINES *= QT_USE_BUNDLED_LIBPNG
!isEqual(QT_ARCH, i386):!isEqual(QT_ARCH, x86_64):DEFINES += PNG_NO_ASSEMBLER_CODE
INCLUDEPATH += ../3rdparty/libpng ../3rdparty/zlib
SOURCES += ../3rdparty/libpng/png.c \
@@ -112,8 +113,7 @@ SOURCES += \
../3rdparty/libpng/pngwio.c \
../3rdparty/libpng/pngwrite.c \
../3rdparty/libpng/pngwtran.c \
- ../3rdparty/libpng/pngwutil.c \
- ../3rdparty/libpng/pnggccrd.c
+ ../3rdparty/libpng/pngwutil.c
}
} else {
DEFINES *= QT_NO_IMAGEFORMAT_PNG
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 4f5efa1c46..94307de8d7 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -480,9 +480,12 @@ bool QImageData::checkForAlphaPixels() const
\row
\o Low-level information
\o
+
The depth() function returns the depth of the image. The supported
- depths are 1 (monochrome), 8 and 32 (for more information see the
- \l {QImage#Image Formats}{Image Formats} section).
+ depths are 1 (monochrome), 8, 16, 24 and 32 bits. The
+ bitPlaneCount() function tells how many of those bits that are
+ used. For more information see the
+ \l {QImage#Image Formats}{Image Formats} section.
The format(), bytesPerLine(), and byteCount() functions provide
low-level information about the data stored in the image.
@@ -707,7 +710,7 @@ bool QImageData::checkForAlphaPixels() const
packed with the less significant bit (LSB) first.
\value Format_Indexed8 The image is stored using 8-bit indexes
- into a colormap.
+ into a colormap.
\value Format_RGB32 The image is stored using a 32-bit RGB format (0xffRRGGBB).
@@ -1580,12 +1583,12 @@ QRect QImage::rect() const
/*!
Returns the depth of the image.
- The image depth is the number of bits used to encode a single
+ The image depth is the number of bits used to store a single
pixel, also called bits per pixel (bpp).
The supported depths are 1, 8, 16, 24 and 32.
- \sa convertToFormat(), {QImage#Image Formats}{Image Formats},
+ \sa bitPlaneCount(), convertToFormat(), {QImage#Image Formats}{Image Formats},
{QImage#Image Information}{Image Information}
*/
@@ -1835,7 +1838,7 @@ void QImage::setColor(int i, QRgb c)
qAlpha() to access the pixels.
\sa bytesPerLine(), bits(), {QImage#Pixel Manipulation}{Pixel
- Manipulation}
+ Manipulation}, constScanLine()
*/
uchar *QImage::scanLine(int i)
{
@@ -1865,6 +1868,28 @@ const uchar *QImage::scanLine(int i) const
/*!
+ Returns a pointer to the pixel data at the scanline with index \a
+ i. The first scanline is at index 0.
+
+ The scanline data is aligned on a 32-bit boundary.
+
+ Note that QImage uses \l{Implicit Data Sharing} {implicit data
+ sharing}, but this function does \e not perform a deep copy of the
+ shared pixel data, because the returned data is const.
+
+ \sa scanLine(), constBits()
+ \since 4.7
+*/
+const uchar *QImage::constScanLine(int i) const
+{
+ if (!d)
+ return 0;
+
+ Q_ASSERT(i >= 0 && i < height());
+ return d->data + i * d->bytes_per_line;
+}
+
+/*!
Returns a pointer to the first pixel data. This is equivalent to
scanLine(0).
@@ -1873,7 +1898,7 @@ const uchar *QImage::scanLine(int i) const
data, thus ensuring that this QImage is the only one using the
current return value.
- \sa scanLine(), byteCount()
+ \sa scanLine(), byteCount(), constBits()
*/
uchar *QImage::bits()
{
@@ -1901,6 +1926,20 @@ const uchar *QImage::bits() const
}
+/*!
+ Returns a pointer to the first pixel data.
+
+ Note that QImage uses \l{Implicit Data Sharing} {implicit data
+ sharing}, but this function does \e not perform a deep copy of the
+ shared pixel data, because the returned data is const.
+
+ \sa bits(), constScanLine()
+ \since 4.7
+*/
+const uchar *QImage::constBits() const
+{
+ return d ? d->data : 0;
+}
/*!
\fn void QImage::reset()
@@ -5812,6 +5851,48 @@ bool QImage::hasAlphaChannel() const
}
+/*!
+ \since 4.7
+ Returns the number of bit planes in the image.
+
+ The number of bit planes is the number of bits of color and
+ transparency information for each pixel. This is different from
+ (i.e. smaller than) the depth when the image format contains
+ unused bits.
+
+ \sa depth(), format(), {QImage#Image Formats}{Image Formats}
+*/
+int QImage::bitPlaneCount() const
+{
+ if (!d)
+ return 0;
+ int bpc = 0;
+ switch (d->format) {
+ case QImage::Format_Invalid:
+ break;
+ case QImage::Format_RGB32:
+ bpc = 24;
+ break;
+ case QImage::Format_RGB666:
+ bpc = 18;
+ break;
+ case QImage::Format_RGB555:
+ bpc = 15;
+ break;
+ case QImage::Format_ARGB8555_Premultiplied:
+ bpc = 23;
+ break;
+ case QImage::Format_RGB444:
+ bpc = 12;
+ break;
+ default:
+ bpc = depthForFormat(d->format);
+ break;
+ }
+ return bpc;
+}
+
+
#ifdef QT3_SUPPORT
#if defined(Q_WS_X11)
QT_BEGIN_INCLUDE_NAMESPACE
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h
index ac973a1de9..896061ffc0 100644
--- a/src/gui/image/qimage.h
+++ b/src/gui/image/qimage.h
@@ -169,6 +169,7 @@ public:
QT_DEPRECATED int numColors() const;
#endif
int colorCount() const;
+ int bitPlaneCount() const;
QRgb color(int i) const;
void setColor(int i, QRgb c);
@@ -182,6 +183,7 @@ public:
uchar *bits();
const uchar *bits() const;
+ const uchar *constBits() const;
#ifdef QT_DEPRECATED
QT_DEPRECATED int numBytes() const;
#endif
@@ -189,6 +191,7 @@ public:
uchar *scanLine(int);
const uchar *scanLine(int) const;
+ const uchar *constScanLine(int) const;
int bytesPerLine() const;
bool valid(int x, int y) const;
diff --git a/src/gui/image/qpaintengine_pic.cpp b/src/gui/image/qpaintengine_pic.cpp
index 1aeb524867..029154bbcf 100644
--- a/src/gui/image/qpaintengine_pic.cpp
+++ b/src/gui/image/qpaintengine_pic.cpp
@@ -486,8 +486,11 @@ void QPicturePaintEngine::drawTextItem(const QPointF &p , const QTextItem &ti)
qDebug() << " -> drawTextItem():" << p << ti.text();
#endif
+ const QTextItemInt &si = static_cast<const QTextItemInt &>(ti);
+ if (si.chars == 0)
+ QPaintEngine::drawTextItem(p, ti); // Draw as path
+
if (d->pic_d->formatMajor >= 9) {
- const QTextItemInt &si = static_cast<const QTextItemInt &>(ti);
int pos;
SERIALIZE_CMD(QPicturePrivate::PdcDrawTextItem);
QFont fnt = ti.font();
diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp
index fb70e36e76..3220a67332 100644
--- a/src/gui/image/qpicture.cpp
+++ b/src/gui/image/qpicture.cpp
@@ -440,36 +440,6 @@ bool QPicture::play(QPainter *painter)
return true; // no end-command
}
-
-//
-// QFakeDevice is used to create fonts with a custom DPI
-//
-class QFakeDevice : public QPaintDevice
-{
-public:
- QFakeDevice() { dpi_x = qt_defaultDpiX(); dpi_y = qt_defaultDpiY(); }
- void setDpiX(int dpi) { dpi_x = dpi; }
- void setDpiY(int dpi) { dpi_y = dpi; }
- QPaintEngine *paintEngine() const { return 0; }
- int metric(PaintDeviceMetric m) const
- {
- switch(m) {
- case PdmPhysicalDpiX:
- case PdmDpiX:
- return dpi_x;
- case PdmPhysicalDpiY:
- case PdmDpiY:
- return dpi_y;
- default:
- return QPaintDevice::metric(m);
- }
- }
-
-private:
- int dpi_x;
- int dpi_y;
-};
-
/*!
\internal
Iterates over the internal picture data and draws the picture using
@@ -679,30 +649,29 @@ bool QPicture::exec(QPainter *painter, QDataStream &s, int nrecords)
if (d->formatMajor >= 9) {
s >> dbl;
- QFont fnt(font);
- if (dbl != 1.0) {
- QFakeDevice fake;
- fake.setDpiX(qRound(dbl*qt_defaultDpiX()));
- fake.setDpiY(qRound(dbl*qt_defaultDpiY()));
- fnt = QFont(font, &fake);
- }
+ QFont fnt(font, painter->device());
+
+ qreal scale = painter->device()->logicalDpiY() / (dbl*qt_defaultDpiY());
+ painter->save();
+ painter->scale(1/scale, 1/scale);
qreal justificationWidth;
s >> justificationWidth;
int flags = Qt::TextSingleLine | Qt::TextDontClip | Qt::TextForceLeftToRight;
- QSizeF size(1, 1);
+ QSizeF size(scale, scale);
if (justificationWidth > 0) {
- size.setWidth(justificationWidth);
+ size.setWidth(justificationWidth*scale);
flags |= Qt::TextJustificationForced;
flags |= Qt::AlignJustify;
}
QFontMetrics fm(fnt);
- QPointF pt(p.x(), p.y() - fm.ascent());
+ QPointF pt(p.x()*scale, p.y()*scale - fm.ascent());
qt_format_text(fnt, QRectF(pt, size), flags, /*opt*/0,
str, /*brect=*/0, /*tabstops=*/0, /*...*/0, /*tabarraylen=*/0, painter);
+ painter->restore();
} else {
qt_format_text(font, QRectF(p, QSizeF(1, 1)), Qt::TextSingleLine | Qt::TextDontClip, /*opt*/0,
str, /*brect=*/0, /*tabstops=*/0, /*...*/0, /*tabarraylen=*/0, painter);
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 7b225ebbdd..474cd2efa7 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1071,6 +1071,9 @@ QPixmap QPixmap::grabWidget(QWidget * widget, const QRect &rect)
if (widget->testAttribute(Qt::WA_PendingResizeEvent) || !widget->testAttribute(Qt::WA_WState_Created))
sendResizeEvents(widget);
+ widget->d_func()->prepareToRender(QRegion(),
+ QWidget::DrawWindowBackground | QWidget::DrawChildren | QWidget::IgnoreMask);
+
QRect r(rect);
if (r.width() < 0)
r.setWidth(widget->width() - rect.x());
@@ -1081,8 +1084,8 @@ QPixmap QPixmap::grabWidget(QWidget * widget, const QRect &rect)
return QPixmap();
QPixmap res(r.size());
- widget->render(&res, QPoint(), r,
- QWidget::DrawWindowBackground | QWidget::DrawChildren | QWidget::IgnoreMask);
+ widget->d_func()->render(&res, QPoint(), r, QWidget::DrawWindowBackground
+ | QWidget::DrawChildren | QWidget::IgnoreMask, true);
return res;
}
@@ -1363,10 +1366,27 @@ void QPixmap::deref()
*/
/*!
- \fn bool QPixmap::convertFromImage(const QImage &image, Qt::ImageConversionFlags flags)
+ Replaces this pixmap's data with the given \a image using the
+ specified \a flags to control the conversion. The \a flags
+ argument is a bitwise-OR of the \l{Qt::ImageConversionFlags}.
+ Passing 0 for \a flags sets all the default options. Returns true
+ if the result is that this pixmap is not null.
- Use the static fromImage() function instead.
+ Note: this function was part of Qt 3 support in Qt 4.6 and earlier.
+ It has been promoted to official API status in 4.7 to support updating
+ the pixmap's image without creating a new QPixmap as fromImage() would.
+
+ \sa fromImage()
+ \since 4.7
*/
+bool QPixmap::convertFromImage(const QImage &image, Qt::ImageConversionFlags flags)
+{
+ if (image.isNull() || !data)
+ *this = QPixmap::fromImage(image, flags);
+ else
+ data->fromImage(image, flags);
+ return !isNull();
+}
/*!
\fn QPixmap QPixmap::xForm(const QMatrix &matrix) const
diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h
index 46363f05a1..180af3be1b 100644
--- a/src/gui/image/qpixmap.h
+++ b/src/gui/image/qpixmap.h
@@ -141,6 +141,8 @@ public:
bool save(const QString& fileName, const char* format = 0, int quality = -1) const;
bool save(QIODevice* device, const char* format = 0, int quality = -1) const;
+ bool convertFromImage(const QImage &img, Qt::ImageConversionFlags flags = Qt::AutoColor);
+
#if defined(Q_WS_WIN)
enum HBitmapFormat {
NoAlpha,
@@ -224,8 +226,6 @@ public:
QT3_SUPPORT QPixmap &operator=(const QImage &);
inline QT3_SUPPORT QImage convertToImage() const { return toImage(); }
QT3_SUPPORT bool convertFromImage(const QImage &, ColorMode mode);
- QT3_SUPPORT bool convertFromImage(const QImage &img, Qt::ImageConversionFlags flags = Qt::AutoColor)
- { (*this) = fromImage(img, flags); return !isNull(); }
inline QT3_SUPPORT operator QImage() const { return toImage(); }
inline QT3_SUPPORT QPixmap xForm(const QMatrix &matrix) const { return transformed(QTransform(matrix)); }
inline QT3_SUPPORT bool selfMask() const { return false; }
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp
index e1e8a0db5e..5a882af5fc 100644
--- a/src/gui/image/qpixmap_x11.cpp
+++ b/src/gui/image/qpixmap_x11.cpp
@@ -314,8 +314,8 @@ static int qt_pixmap_serial = 0;
int Q_GUI_EXPORT qt_x11_preferred_pixmap_depth = 0;
QX11PixmapData::QX11PixmapData(PixelType type)
- : QPixmapData(type, X11Class), hd(0),
- flags(Uninitialized), x11_mask(0), picture(0), mask_picture(0), hd2(0), gl_surface(0),
+ : QPixmapData(type, X11Class), gl_surface(0), hd(0),
+ flags(Uninitialized), x11_mask(0), picture(0), mask_picture(0), hd2(0),
share_mode(QPixmap::ImplicitlyShared), pengine(0)
{
}
@@ -1142,7 +1142,7 @@ void QX11PixmapData::fromImage(const QImage &img,
}
}
-void QX11PixmapData::bitmapFromImage(const QImage &image)
+Qt::HANDLE QX11PixmapData::createBitmapFromImage(const QImage &image)
{
QImage img = image.convertToFormat(QImage::Format_MonoLSB);
const QRgb c0 = QColor(Qt::black).rgb();
@@ -1155,10 +1155,8 @@ void QX11PixmapData::bitmapFromImage(const QImage &image)
char *bits;
uchar *tmp_bits;
- w = img.width();
- h = img.height();
- d = 1;
- is_null = (w <= 0 || h <= 0);
+ int w = img.width();
+ int h = img.height();
int bpl = (w + 7) / 8;
int ibpl = img.bytesPerLine();
if (bpl != ibpl) {
@@ -1177,18 +1175,26 @@ void QX11PixmapData::bitmapFromImage(const QImage &image)
bits = (char *)img.bits();
tmp_bits = 0;
}
- hd = (Qt::HANDLE)XCreateBitmapFromData(xinfo.display(),
- RootWindow(xinfo.display(), xinfo.screen()),
+ Qt::HANDLE hd = (Qt::HANDLE)XCreateBitmapFromData(X11->display,
+ QX11Info::appRootWindow(),
bits, w, h);
+ if (tmp_bits) // Avoid purify complaint
+ delete [] tmp_bits;
+ return hd;
+}
+void QX11PixmapData::bitmapFromImage(const QImage &image)
+{
+ w = image.width();
+ h = image.height();
+ d = 1;
+ is_null = (w <= 0 || h <= 0);
+ hd = createBitmapFromImage(image);
#ifndef QT_NO_XRENDER
if (X11->use_xrender)
picture = XRenderCreatePicture(X11->display, hd,
XRenderFindStandardFormat(X11->display, PictStandardA1), 0, 0);
#endif // QT_NO_XRENDER
-
- if (tmp_bits) // Avoid purify complaint
- delete [] tmp_bits;
}
void QX11PixmapData::fill(const QColor &fillColor)
diff --git a/src/gui/image/qpixmap_x11_p.h b/src/gui/image/qpixmap_x11_p.h
index 20fb65470e..7575838163 100644
--- a/src/gui/image/qpixmap_x11_p.h
+++ b/src/gui/image/qpixmap_x11_p.h
@@ -92,6 +92,13 @@ public:
Qt::HANDLE handle() const { return hd; }
Qt::HANDLE x11ConvertToDefaultDepth();
+ static Qt::HANDLE createBitmapFromImage(const QImage &image);
+
+ void* gl_surface;
+#ifndef QT_NO_XRENDER
+ void convertToARGB32(bool preserveContents = true);
+#endif
+
protected:
int metric(QPaintDevice::PaintDeviceMetric metric) const;
@@ -103,6 +110,7 @@ private:
friend class QRasterWindowSurface;
friend class QGLContextPrivate; // Needs to access xinfo, gl_surface & flags
friend class QEglContext; // Needs gl_surface
+ friend class QGLContext; // Needs gl_surface
friend class QX11GLPixmapData; // Needs gl_surface
friend bool qt_createEGLSurfaceForPixmap(QPixmapData*, bool); // Needs gl_surface
@@ -128,10 +136,6 @@ private:
Qt::HANDLE picture;
Qt::HANDLE mask_picture;
Qt::HANDLE hd2; // sorted in the default display depth
- Qt::HANDLE gl_surface;
-#ifndef QT_NO_XRENDER
- void convertToARGB32(bool preserveContents = true);
-#endif
QPixmap::ShareMode share_mode;
QX11PaintEngine *pengine;
diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp
index c605880074..5355ad3d3a 100644
--- a/src/gui/image/qpixmapfilter.cpp
+++ b/src/gui/image/qpixmapfilter.cpp
@@ -726,7 +726,7 @@ void expblur(QImage &img, qreal radius, bool improvedQuality = false, int transp
int img_height = img.height();
for (int row = 0; row < img_height; ++row) {
- for (int i = 0; i <= improvedQuality; ++i)
+ for (int i = 0; i <= int(improvedQuality); ++i)
qt_blurrow<aprec, zprec, alphaOnly>(img, row, alpha);
}
@@ -759,7 +759,7 @@ void expblur(QImage &img, qreal radius, bool improvedQuality = false, int transp
img_height = temp.height();
for (int row = 0; row < img_height; ++row) {
- for (int i = 0; i <= improvedQuality; ++i)
+ for (int i = 0; i <= int(improvedQuality); ++i)
qt_blurrow<aprec, zprec, alphaOnly>(temp, row, alpha);
}
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index d5406cb847..dd31834cae 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -50,8 +50,13 @@
#include <qvariant.h>
#include <qvector.h>
+#ifdef QT_USE_BUNDLED_LIBPNG
+#include <../../3rdparty/libpng/png.h>
+#include <../../3rdparty/libpng/pngconf.h>
+#else
#include <png.h>
#include <pngconf.h>
+#endif
#ifdef Q_OS_WINCE
#define CALLBACK_CALL_TYPE __cdecl
@@ -162,11 +167,16 @@ void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, float scre
png_uint_32 height;
int bit_depth;
int color_type;
+ png_bytep trans_alpha = 0;
+ png_color_16p trans_color_p = 0;
+ int num_trans;
+ png_colorp palette = 0;
+ int num_palette;
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 0, 0, 0);
if (color_type == PNG_COLOR_TYPE_GRAY) {
// Black & White or 8-bit grayscale
- if (bit_depth == 1 && info_ptr->channels == 1) {
+ if (bit_depth == 1 && png_get_channels(png_ptr, info_ptr) == 1) {
png_set_invert_mono(png_ptr);
png_read_update_info(png_ptr, info_ptr);
if (image.size() != QSize(width, height) || image.format() != QImage::Format_Mono) {
@@ -207,20 +217,16 @@ void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, float scre
int c = i*255/(ncols-1);
image.setColor(i, qRgba(c,c,c,0xff));
}
- if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
-#if PNG_LIBPNG_VER_MAJOR < 1 || (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR < 4)
- const int g = info_ptr->trans_values.gray;
-#else
- const int g = info_ptr->trans_color.gray;
-#endif
+ if (png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans, &trans_color_p) && trans_color_p) {
+ const int g = trans_color_p->gray;
if (g < ncols) {
image.setColor(g, 0);
}
}
}
} else if (color_type == PNG_COLOR_TYPE_PALETTE
- && png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE)
- && info_ptr->num_palette <= 256)
+ && png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette)
+ && num_palette <= 256)
{
// 1-bit and 8-bit color
if (bit_depth != 1)
@@ -233,29 +239,26 @@ void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, float scre
if (image.isNull())
return;
}
- image.setColorCount(info_ptr->num_palette);
+ png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette);
+ image.setColorCount(num_palette);
int i = 0;
- if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
- while (i < info_ptr->num_trans) {
+ if (png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans, &trans_color_p) && trans_alpha) {
+ while (i < num_trans) {
image.setColor(i, qRgba(
- info_ptr->palette[i].red,
- info_ptr->palette[i].green,
- info_ptr->palette[i].blue,
-#if PNG_LIBPNG_VER_MAJOR < 1 || (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR < 4)
- info_ptr->trans[i]
-#else
- info_ptr->trans_alpha[i]
-#endif
+ palette[i].red,
+ palette[i].green,
+ palette[i].blue,
+ trans_alpha[i]
)
);
i++;
}
}
- while (i < info_ptr->num_palette) {
+ while (i < num_palette) {
image.setColor(i, qRgba(
- info_ptr->palette[i].red,
- info_ptr->palette[i].green,
- info_ptr->palette[i].blue,
+ palette[i].red,
+ palette[i].green,
+ palette[i].blue,
0xff
)
);
@@ -531,33 +534,36 @@ QImage::Format QPngHandlerPrivate::readImageFormat()
QImage::Format format = QImage::Format_Invalid;
png_uint_32 width, height;
int bit_depth, color_type;
- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY) {
+ png_colorp palette;
+ int num_palette;
+ png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 0, 0, 0);
+ if (color_type == PNG_COLOR_TYPE_GRAY) {
// Black & White or 8-bit grayscale
- if (info_ptr->bit_depth == 1 && info_ptr->channels == 1) {
+ if (bit_depth == 1 && png_get_channels(png_ptr, info_ptr) == 1) {
format = QImage::Format_Mono;
- } else if (info_ptr->bit_depth == 16 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
+ } else if (bit_depth == 16 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
format = QImage::Format_ARGB32;
} else {
format = QImage::Format_Indexed8;
}
- } else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE
- && png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE)
- && info_ptr->num_palette <= 256)
+ } else if (color_type == PNG_COLOR_TYPE_PALETTE
+ && png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette)
+ && num_palette <= 256)
{
// 1-bit and 8-bit color
- if (info_ptr->bit_depth != 1)
+ if (bit_depth != 1)
png_set_packing(png_ptr);
png_read_update_info(png_ptr, info_ptr);
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 0, 0, 0);
format = bit_depth == 1 ? QImage::Format_Mono : QImage::Format_Indexed8;
} else {
// 32-bit
- if (info_ptr->bit_depth == 16)
+ if (bit_depth == 16)
png_set_strip_16(png_ptr);
format = QImage::Format_ARGB32;
// Only add filler if no alpha, or we can get 5 channel data.
- if (!(info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
+ if (!(color_type & PNG_COLOR_MASK_ALPHA)
&& !png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
// We want 4 bytes, but it isn't an alpha channel
format = QImage::Format_RGB32;
@@ -648,7 +654,7 @@ static void set_text(const QImage &image, png_structp png_ptr, png_infop info_pt
text_ptr[i].text = qstrdup(value.constData());
text_ptr[i].text_length = 0;
text_ptr[i].itxt_length = value.size();
- text_ptr[i].lang = "UTF-8";
+ text_ptr[i].lang = const_cast<char*>("UTF-8");
text_ptr[i].lang_key = qstrdup(it.key().toUtf8().constData());
#endif
++i;
@@ -735,64 +741,51 @@ bool Q_INTERNAL_WIN_NO_THROW QPNGImageWriter::writeImage(const QImage& image_in,
png_set_compression_level(png_ptr, quality);
}
- if (gamma != 0.0) {
- png_set_gAMA(png_ptr, info_ptr, 1.0/gamma);
- }
-
png_set_write_fn(png_ptr, (void*)this, qpiw_write_fn, qpiw_flush_fn);
- info_ptr->channels =
- (image.depth() == 32)
- ? (image.format() == QImage::Format_RGB32 ? 3 : 4)
- : 1;
-
png_set_IHDR(png_ptr, info_ptr, image.width(), image.height(),
image.depth() == 1 ? 1 : 8 /* per channel */,
image.depth() == 32
? image.format() == QImage::Format_RGB32
? PNG_COLOR_TYPE_RGB
: PNG_COLOR_TYPE_RGB_ALPHA
- : PNG_COLOR_TYPE_PALETTE, 0, 0, 0);
+ : PNG_COLOR_TYPE_PALETTE, 0, 0, 0); // also sets #channels
+ if (gamma != 0.0) {
+ png_set_gAMA(png_ptr, info_ptr, 1.0/gamma);
+ }
- //png_set_sBIT(png_ptr, info_ptr, 8);
- info_ptr->sig_bit.red = 8;
- info_ptr->sig_bit.green = 8;
- info_ptr->sig_bit.blue = 8;
+ png_color_8 sig_bit;
+ sig_bit.red = 8;
+ sig_bit.green = 8;
+ sig_bit.blue = 8;
+ sig_bit.alpha = image.hasAlphaChannel() ? 8 : 0;
+ png_set_sBIT(png_ptr, info_ptr, &sig_bit);
if (image.format() == QImage::Format_MonoLSB)
png_set_packswap(png_ptr);
- png_colorp palette = 0;
- png_bytep copy_trans = 0;
if (image.colorCount()) {
// Paletted
- int num_palette = image.colorCount();
- palette = new png_color[num_palette];
- png_set_PLTE(png_ptr, info_ptr, palette, num_palette);
- int* trans = new int[num_palette];
+ int num_palette = qMin(256, image.colorCount());
+ png_color palette[256];
+ png_byte trans[256];
int num_trans = 0;
for (int i=0; i<num_palette; i++) {
- QRgb rgb=image.color(i);
- info_ptr->palette[i].red = qRed(rgb);
- info_ptr->palette[i].green = qGreen(rgb);
- info_ptr->palette[i].blue = qBlue(rgb);
- trans[i] = rgb >> 24;
+ QRgb rgba=image.color(i);
+ palette[i].red = qRed(rgba);
+ palette[i].green = qGreen(rgba);
+ palette[i].blue = qBlue(rgba);
+ trans[i] = qAlpha(rgba);
if (trans[i] < 255) {
num_trans = i+1;
}
}
+ png_set_PLTE(png_ptr, info_ptr, palette, num_palette);
+
if (num_trans) {
- copy_trans = new png_byte[num_trans];
- for (int i=0; i<num_trans; i++)
- copy_trans[i] = trans[i];
- png_set_tRNS(png_ptr, info_ptr, copy_trans, num_trans, 0);
+ png_set_tRNS(png_ptr, info_ptr, trans, num_trans, 0);
}
- delete [] trans;
- }
-
- if (image.format() != QImage::Format_RGB32) {
- info_ptr->sig_bit.alpha = 8;
}
// Swap ARGB to RGBA (normal PNG format) before saving on
@@ -868,11 +861,6 @@ bool Q_INTERNAL_WIN_NO_THROW QPNGImageWriter::writeImage(const QImage& image_in,
png_write_end(png_ptr, info_ptr);
frames_written++;
- if (palette)
- delete [] palette;
- if (copy_trans)
- delete [] copy_trans;
-
png_destroy_write_struct(&png_ptr, &info_ptr);
return true;
@@ -958,7 +946,8 @@ QVariant QPngHandler::option(ImageOption option) const
else if (option == Description)
return d->description;
else if (option == Size)
- return QSize(d->info_ptr->width, d->info_ptr->height);
+ return QSize(png_get_image_width(d->png_ptr, d->info_ptr),
+ png_get_image_height(d->png_ptr, d->info_ptr));
else if (option == ImageFormat)
return d->readImageFormat();
return 0;
diff --git a/src/gui/inputmethod/qwininputcontext_p.h b/src/gui/inputmethod/qwininputcontext_p.h
index 08cc3d2420..d5bedf49b7 100644
--- a/src/gui/inputmethod/qwininputcontext_p.h
+++ b/src/gui/inputmethod/qwininputcontext_p.h
@@ -56,7 +56,7 @@
#include "QtGui/qinputcontext.h"
#include "QtCore/qt_windows.h"
-#if defined(Q_CC_MINGW) && !defined(IMR_RECONVERTSTRING)
+#if !defined(IMR_RECONVERTSTRING)
typedef struct tagRECONVERTSTRING {
DWORD dwSize;
DWORD dwVersion;
diff --git a/src/gui/itemviews/qdirmodel.cpp b/src/gui/itemviews/qdirmodel.cpp
index ea608c1b3c..378a23878c 100644
--- a/src/gui/itemviews/qdirmodel.cpp
+++ b/src/gui/itemviews/qdirmodel.cpp
@@ -185,12 +185,12 @@ void QDirModelPrivate::invalidate()
/*!
\class QDirModel
-
+ \obsolete
\brief The QDirModel class provides a data model for the local filesystem.
\ingroup model-view
- \note The usage of QDirModel is not recommended anymore. The
+ The usage of QDirModel is not recommended anymore. The
QFileSystemModel class is a more performant alternative.
This class provides access to the local filesystem, providing functions
diff --git a/src/gui/itemviews/qfileiconprovider.cpp b/src/gui/itemviews/qfileiconprovider.cpp
index fcc61e55bf..f321ab305e 100644
--- a/src/gui/itemviews/qfileiconprovider.cpp
+++ b/src/gui/itemviews/qfileiconprovider.cpp
@@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE
/*!
\class QFileIconProvider
- \brief The QFileIconProvider class provides file icons for the QDirModel class.
+ \brief The QFileIconProvider class provides file icons for the QDirModel and the QFileSystemModel classes.
*/
/*!
diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp
index 8a456e6b9c..eb3db21e0e 100644
--- a/src/gui/itemviews/qheaderview.cpp
+++ b/src/gui/itemviews/qheaderview.cpp
@@ -1853,11 +1853,9 @@ void QHeaderViewPrivate::_q_layoutChanged()
persistentHiddenSections.clear();
return;
}
+
+ QBitArray oldSectionHidden = sectionHidden;
bool sectionCountChanged = false;
- for (int i = 0; i < sectionHidden.count(); ++i) {
- if (sectionHidden.testBit(i))
- q->setSectionHidden(logicalIndex(i), false);
- }
for (int i = 0; i < persistentHiddenSections.count(); ++i) {
QModelIndex index = persistentHiddenSections.at(i);
@@ -1866,6 +1864,7 @@ void QHeaderViewPrivate::_q_layoutChanged()
? index.column()
: index.row());
q->setSectionHidden(logical, true);
+ oldSectionHidden.setBit(logical, false);
} else if (!sectionCountChanged && (modelSectionCount() != sectionCount)) {
sectionCountChanged = true;
break;
@@ -1873,6 +1872,11 @@ void QHeaderViewPrivate::_q_layoutChanged()
}
persistentHiddenSections.clear();
+ for (int i = 0; i < oldSectionHidden.count(); ++i) {
+ if (oldSectionHidden.testBit(i))
+ q->setSectionHidden(logicalIndex(i), false);
+ }
+
// the number of sections changed; we need to reread the state of the model
if (sectionCountChanged)
q->initializeSections();
@@ -2033,7 +2037,7 @@ bool QHeaderView::event(QEvent *e)
updateSection(d->hover);
}
break; }
- case QEvent::Timer: { // ### reimplement timerEvent() instead ?
+ case QEvent::Timer: {
QTimerEvent *te = static_cast<QTimerEvent*>(e);
if (te->timerId() == d->delayedResize.timerId()) {
d->delayedResize.stop();
@@ -2217,7 +2221,8 @@ void QHeaderView::mouseMoveEvent(QMouseEvent *e)
return;
}
case QHeaderViewPrivate::MoveSection: {
- if (qAbs(pos - d->firstPos) >= QApplication::startDragDistance()) {
+ if (qAbs(pos - d->firstPos) >= QApplication::startDragDistance()
+ || !d->sectionIndicator->isHidden()) {
int indicatorCenter = (d->orientation == Qt::Horizontal
? d->sectionIndicator->width()
: d->sectionIndicator->height()) / 2;
@@ -2229,12 +2234,6 @@ void QHeaderView::mouseMoveEvent(QMouseEvent *e)
return;
d->target = d->logicalIndex(visual);
d->updateSectionIndicator(d->section, pos);
- } else {
- int visual = visualIndexAt(d->firstPos);
- if (visual == -1)
- return;
- d->target = d->logicalIndex(visual);
- d->updateSectionIndicator(d->section, d->firstPos);
}
return;
}
@@ -2300,7 +2299,7 @@ void QHeaderView::mouseReleaseEvent(QMouseEvent *e)
int section = logicalIndexAt(pos);
if (section != -1 && section == d->pressed) {
d->flipSortIndicator(section);
- emit sectionClicked(logicalIndexAt(pos));
+ emit sectionClicked(section);
}
if (d->pressed != -1)
updateSection(d->pressed);
@@ -2611,7 +2610,7 @@ void QHeaderView::updateGeometries()
Q_D(QHeaderView);
d->layoutChildren();
if (d->hasAutoResizeSections())
- resizeSections();
+ d->doDelayedResizeSections();
}
/*!
diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp
index 41c984e37f..5c7d24b74a 100644
--- a/src/gui/itemviews/qsortfilterproxymodel.cpp
+++ b/src/gui/itemviews/qsortfilterproxymodel.cpp
@@ -122,10 +122,10 @@ public:
QVector<int> proxy_rows;
QVector<int> proxy_columns;
QVector<QModelIndex> mapped_children;
- QMap<QModelIndex, Mapping *>::const_iterator map_iter;
+ QHash<QModelIndex, Mapping *>::const_iterator map_iter;
};
- mutable QMap<QModelIndex, Mapping*> source_index_mapping;
+ mutable QHash<QModelIndex, Mapping*> source_index_mapping;
int source_sort_column;
int proxy_sort_column;
@@ -142,7 +142,7 @@ public:
QModelIndexPairList saved_persistent_indexes;
- QMap<QModelIndex, Mapping *>::const_iterator create_mapping(
+ QHash<QModelIndex, Mapping *>::const_iterator create_mapping(
const QModelIndex &source_parent) const;
QModelIndex proxy_to_source(const QModelIndex &proxyIndex) const;
QModelIndex source_to_proxy(const QModelIndex &sourceIndex) const;
@@ -150,14 +150,14 @@ public:
void remove_from_mapping(const QModelIndex &source_parent);
- inline QMap<QModelIndex, Mapping *>::const_iterator index_to_iterator(
+ inline QHash<QModelIndex, Mapping *>::const_iterator index_to_iterator(
const QModelIndex &proxy_index) const
{
Q_ASSERT(proxy_index.isValid());
Q_ASSERT(proxy_index.model() == q_func());
const void *p = proxy_index.internalPointer();
Q_ASSERT(p);
- QMap<QModelIndex, Mapping *>::const_iterator it =
+ QHash<QModelIndex, Mapping *>::const_iterator it =
static_cast<const Mapping*>(p)->map_iter;
Q_ASSERT(it != source_index_mapping.constEnd());
Q_ASSERT(it.value());
@@ -165,7 +165,7 @@ public:
}
inline QModelIndex create_index(int row, int column,
- QMap<QModelIndex, Mapping*>::const_iterator it) const
+ QHash<QModelIndex, Mapping*>::const_iterator it) const
{
return q_func()->createIndex(row, column, *it);
}
@@ -246,7 +246,7 @@ public:
virtual void _q_sourceModelDestroyed();
};
-typedef QMap<QModelIndex, QSortFilterProxyModelPrivate::Mapping *> IndexMap;
+typedef QHash<QModelIndex, QSortFilterProxyModelPrivate::Mapping *> IndexMap;
void QSortFilterProxyModelPrivate::_q_sourceModelDestroyed()
{
@@ -270,6 +270,11 @@ void QSortFilterProxyModelPrivate::clear_mapping()
qDeleteAll(source_index_mapping);
source_index_mapping.clear();
+ if (dynamic_sortfilter && update_source_sort_column()) {
+ //update_source_sort_column might have created wrong mapping so we have to clear it again
+ qDeleteAll(source_index_mapping);
+ source_index_mapping.clear();
+ }
// update the persistent indexes
update_persistent_indexes(source_indexes);
@@ -287,11 +292,13 @@ IndexMap::const_iterator QSortFilterProxyModelPrivate::create_mapping(
Mapping *m = new Mapping;
int source_rows = model->rowCount(source_parent);
+ m->source_rows.reserve(source_rows);
for (int i = 0; i < source_rows; ++i) {
if (q->filterAcceptsRow(i, source_parent))
m->source_rows.append(i);
}
int source_cols = model->columnCount(source_parent);
+ m->source_columns.reserve(source_cols);
for (int i = 0; i < source_cols; ++i) {
if (q->filterAcceptsColumn(i, source_parent))
m->source_columns.append(i);
@@ -558,7 +565,7 @@ QVector<QPair<int, QVector<int > > > QSortFilterProxyModelPrivate::proxy_interva
int proxy_item = 0;
int source_items_index = 0;
QVector<int> source_items_in_interval;
- bool compare = (orient == Qt::Vertical && source_sort_column >= 0);
+ bool compare = (orient == Qt::Vertical && source_sort_column >= 0 && dynamic_sortfilter);
while (source_items_index < source_items.size()) {
source_items_in_interval.clear();
int first_new_source_item = source_items.at(source_items_index);
@@ -1208,11 +1215,6 @@ void QSortFilterProxyModelPrivate::_q_sourceLayoutAboutToBeChanged()
void QSortFilterProxyModelPrivate::_q_sourceLayoutChanged()
{
Q_Q(QSortFilterProxyModel);
- if (saved_persistent_indexes.isEmpty()) {
- clear_mapping();
- emit q->layoutChanged();
- return;
- }
qDeleteAll(source_index_mapping);
source_index_mapping.clear();
@@ -1220,7 +1222,11 @@ void QSortFilterProxyModelPrivate::_q_sourceLayoutChanged()
update_persistent_indexes(saved_persistent_indexes);
saved_persistent_indexes.clear();
- update_source_sort_column();
+ if (dynamic_sortfilter && update_source_sort_column()) {
+ //update_source_sort_column might have created wrong mapping so we have to clear it again
+ qDeleteAll(source_index_mapping);
+ source_index_mapping.clear();
+ }
emit q->layoutChanged();
}
@@ -1240,7 +1246,7 @@ void QSortFilterProxyModelPrivate::_q_sourceRowsInserted(
const QModelIndex &source_parent, int start, int end)
{
source_items_inserted(source_parent, start, end, Qt::Vertical);
- if (update_source_sort_column()) //previous call to update_source_sort_column may fail if the model has no column.
+ if (update_source_sort_column() && dynamic_sortfilter) //previous call to update_source_sort_column may fail if the model has no column.
sort(); // now it should succeed so we need to make sure to sort again
}
@@ -1277,8 +1283,8 @@ void QSortFilterProxyModelPrivate::_q_sourceColumnsInserted(
if (source_parent.isValid())
return; //we sort according to the root column only
if (source_sort_column == -1) {
- //we update the source_sort_column depending on the prox_sort_column
- if (update_source_sort_column())
+ //we update the source_sort_column depending on the proxy_sort_column
+ if (update_source_sort_column() && dynamic_sortfilter)
sort();
} else {
if (start <= source_sort_column)
@@ -1481,7 +1487,6 @@ QSortFilterProxyModel::QSortFilterProxyModel(QObject *parent)
d->filter_column = 0;
d->filter_role = Qt::DisplayRole;
d->dynamic_sortfilter = false;
- connect(this, SIGNAL(modelReset()), this, SLOT(invalidate()));
}
/*!
diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp
index c824a8accb..702a8bbc03 100644
--- a/src/gui/itemviews/qtableview.cpp
+++ b/src/gui/itemviews/qtableview.cpp
@@ -1968,12 +1968,7 @@ QModelIndexList QTableView::selectedIndexes() const
void QTableView::rowCountChanged(int /*oldCount*/, int /*newCount*/ )
{
Q_D(QTableView);
- updateGeometries();
- if (verticalScrollMode() == QAbstractItemView::ScrollPerItem)
- d->verticalHeader->setOffsetToSectionPosition(verticalScrollBar()->value());
- else
- d->verticalHeader->setOffset(verticalScrollBar()->value());
- d->viewport->update();
+ d->doDelayedItemsLayout();
}
/*!
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
index 37168eb319..4135ba0cf3 100644
--- a/src/gui/itemviews/qtreeview.cpp
+++ b/src/gui/itemviews/qtreeview.cpp
@@ -679,16 +679,20 @@ void QTreeView::dataChanged(const QModelIndex &topLeft, const QModelIndex &botto
d->defaultItemHeight = indexRowSizeHint(topLeft);
bool sizeChanged = false;
if (topViewIndex != -1) {
- if (topLeft == bottomRight) {
+ if (topLeft.row() == bottomRight.row()) {
int oldHeight = d->itemHeight(topViewIndex);
d->invalidateHeightCache(topViewIndex);
sizeChanged = (oldHeight != d->itemHeight(topViewIndex));
+ if (topLeft.column() == 0)
+ d->viewItems[topViewIndex].hasChildren = d->hasVisibleChildren(topLeft);
} else {
int bottomViewIndex = d->viewIndex(bottomRight);
for (int i = topViewIndex; i <= bottomViewIndex; ++i) {
int oldHeight = d->itemHeight(i);
d->invalidateHeightCache(i);
sizeChanged |= (oldHeight != d->itemHeight(i));
+ if (topLeft.column() == 0)
+ d->viewItems[i].hasChildren = d->hasVisibleChildren(d->viewItems.at(i).index);
}
}
}
@@ -2403,9 +2407,9 @@ void QTreeView::reexpand()
/*!
\internal
+ This function assume that left is a (grand-)child of the parent of left.
*/
-static bool treeViewItemLessThan(const QTreeViewItem &left,
- const QTreeViewItem &right)
+static bool treeViewItemLessThanInInsert(const QTreeViewItem &left, const QTreeViewItem &right)
{
if (left.level != right.level) {
Q_ASSERT(left.level > right.level);
@@ -2476,6 +2480,7 @@ void QTreeView::rowsInserted(const QModelIndex &parent, int start, int end)
for (int i = 0; i < delta; ++i) {
QTreeViewItem &item = insertedItems[i];
item.index = d->model->index(i + start, 0, parent);
+ item.parentItem = parentItem;
item.level = childLevel;
item.hasChildren = d->hasVisibleChildren(item.index);
item.hasMoreSiblings = !((i == delta - 1) && (parentRowCount == end +1));
@@ -2491,7 +2496,7 @@ void QTreeView::rowsInserted(const QModelIndex &parent, int start, int end)
QVector<QTreeViewItem>::iterator it;
it = qLowerBound(d->viewItems.begin() + firstChildItem,
d->viewItems.begin() + lastChildItem + 1,
- insertedItems.at(0), treeViewItemLessThan);
+ insertedItems.at(0), treeViewItemLessThanInInsert);
insertPos = it - d->viewItems.begin();
// update stale model indexes of siblings
@@ -2514,7 +2519,7 @@ void QTreeView::rowsInserted(const QModelIndex &parent, int start, int end)
}
}
- d->viewItems.insert(insertPos, delta, insertedItems.at(0));
+ d->insertViewItems(insertPos, delta, insertedItems.at(0));
if (delta > 1) {
qCopy(insertedItems.begin() + 1, insertedItems.end(),
d->viewItems.begin() + insertPos + 1);
@@ -2524,8 +2529,7 @@ void QTreeView::rowsInserted(const QModelIndex &parent, int start, int end)
d->viewItems[parentItem].hasChildren = true;
d->updateChildCount(parentItem, delta);
- updateGeometries();
- viewport()->update();
+ d->doDelayedItemsLayout();
} else if ((parentItem != -1) && d->viewItems.at(parentItem).expanded) {
d->doDelayedItemsLayout();
} else if (parentItem != -1 && (d->model->rowCount(parent) == end - start + 1)) {
@@ -2658,17 +2662,8 @@ void QTreeView::expandAll()
{
Q_D(QTreeView);
d->viewItems.clear();
- d->expandedIndexes.clear();
d->interruptDelayedItemsLayout();
- d->layout(-1);
- for (int i = 0; i < d->viewItems.count(); ++i) {
- if (d->viewItems[i].expanded)
- continue;
- d->viewItems[i].expanded = true;
- d->layout(i);
- QModelIndex idx = d->viewItems.at(i).index;
- d->expandedIndexes.insert(idx);
- }
+ d->layout(-1, true);
updateGeometries();
d->viewport->update();
}
@@ -2949,6 +2944,39 @@ void QTreeViewPrivate::expand(int item, bool emitSignal)
}
}
+void QTreeViewPrivate::insertViewItems(int pos, int count, const QTreeViewItem &viewItem)
+{
+ viewItems.insert(pos, count, viewItem);
+ QTreeViewItem *items = viewItems.data();
+ for (int i = pos + count; i < viewItems.count(); i++)
+ if (items[i].parentItem >= pos)
+ items[i].parentItem += count;
+}
+
+void QTreeViewPrivate::removeViewItems(int pos, int count)
+{
+ viewItems.remove(pos, count);
+ QTreeViewItem *items = viewItems.data();
+ for (int i = pos; i < viewItems.count(); i++)
+ if (items[i].parentItem >= pos)
+ items[i].parentItem -= count;
+}
+
+#if 0
+bool QTreeViewPrivate::checkViewItems() const
+{
+ for (int i = 0; i < viewItems.count(); ++i) {
+ const QTreeViewItem &vi = viewItems.at(i);
+ if (vi.parentItem == -1) {
+ Q_ASSERT(!vi.index.parent().isValid() || vi.index.parent() == root);
+ } else {
+ Q_ASSERT(vi.index.parent() == viewItems.at(vi.parentItem).index);
+ }
+ }
+ return true;
+}
+#endif
+
void QTreeViewPrivate::collapse(int item, bool emitSignal)
{
Q_Q(QTreeView);
@@ -2977,14 +3005,11 @@ void QTreeViewPrivate::collapse(int item, bool emitSignal)
expandedIndexes.erase(it);
viewItems[item].expanded = false;
int index = item;
- QModelIndex parent = modelIndex;
- while (parent.isValid() && parent != root) {
- Q_ASSERT(index > -1);
+ while (index > -1) {
viewItems[index].total -= total;
- parent = parent.parent();
- index = viewIndex(parent);
+ index = viewItems[index].parentItem;
}
- viewItems.remove(item + 1, total); // collapse
+ removeViewItems(item + 1, total); // collapse
q->setState(oldState);
if (emitSignal) {
@@ -3121,7 +3146,14 @@ void QTreeViewPrivate::_q_columnsRemoved(const QModelIndex &parent, int start, i
QAbstractItemViewPrivate::_q_columnsRemoved(parent, start, end);
}
-void QTreeViewPrivate::layout(int i)
+/** \internal
+ creates and initialize the viewItem structure of the children of the element \i
+
+ set \a recursiveExpanding if the function has to expand all the children (called from expandAll)
+ \a afterIsUninitialized is when we recurse from layout(-1), it means all the items after 'i' are
+ not yet initialized and need not to be moved
+ */
+void QTreeViewPrivate::layout(int i, bool recursiveExpanding, bool afterIsUninitialized)
{
Q_Q(QTreeView);
QModelIndex current;
@@ -3148,8 +3180,12 @@ void QTreeViewPrivate::layout(int i)
defaultItemHeight = q->indexRowSizeHint(index);
}
viewItems.resize(count);
+ afterIsUninitialized = true;
} else if (viewItems[i].total != (uint)count) {
- viewItems.insert(i + 1, count, QTreeViewItem()); // expand
+ if (!afterIsUninitialized)
+ insertViewItems(i + 1, count, QTreeViewItem()); // expand
+ else if (count > 0)
+ viewItems.resize(viewItems.count() + count);
} else {
expanding = false;
}
@@ -3171,15 +3207,18 @@ void QTreeViewPrivate::layout(int i)
item->hasMoreSiblings = true;
item = &viewItems[last];
item->index = current;
+ item->parentItem = i;
item->level = level;
item->height = 0;
item->spanning = q->isFirstColumnSpanned(current.row(), parent);
item->expanded = false;
item->total = 0;
item->hasMoreSiblings = false;
- if (isIndexExpanded(current)) {
+ if (recursiveExpanding || isIndexExpanded(current)) {
+ if (recursiveExpanding)
+ expandedIndexes.insert(current);
item->expanded = true;
- layout(last);
+ layout(last, recursiveExpanding, afterIsUninitialized);
item = &viewItems[last];
children += item->total;
item->hasChildren = item->total > 0;
@@ -3191,17 +3230,19 @@ void QTreeViewPrivate::layout(int i)
}
// remove hidden items
- if (hidden > 0)
- viewItems.remove(last + 1, hidden); // collapse
+ if (hidden > 0) {
+ if (!afterIsUninitialized)
+ removeViewItems(last + 1, hidden);
+ else
+ viewItems.resize(viewItems.size() - hidden);
+ }
if (!expanding)
return; // nothing changed
- while (parent != root) {
- Q_ASSERT(i > -1);
+ while (i > -1) {
viewItems[i].total += count - hidden;
- parent = parent.parent();
- i = viewIndex(parent);
+ i = viewItems[i].parentItem;
}
}
@@ -3356,46 +3397,39 @@ int QTreeViewPrivate::viewIndex(const QModelIndex &_index) const
const int totalCount = viewItems.count();
const QModelIndex index = _index.sibling(_index.row(), 0);
+ const int row = index.row();
+ const quint64 internalId = index.internalId();
-
- // A quick check near the last item to see if we are just incrementing
- const int start = lastViewedItem > 2 ? lastViewedItem - 2 : 0;
- const int end = lastViewedItem < totalCount - 2 ? lastViewedItem + 2 : totalCount;
- int row = index.row();
- for (int i = start; i < end; ++i) {
- const QModelIndex &idx = viewItems.at(i).index;
- if (idx.row() == row) {
- if (idx.internalId() == index.internalId()) {
- lastViewedItem = i;
- return i;
- }
+ // We start nearest to the lastViewedItem
+ int localCount = qMin(lastViewedItem - 1, totalCount - lastViewedItem);
+ for (int i = 0; i < localCount; ++i) {
+ const QModelIndex &idx1 = viewItems.at(lastViewedItem + i).index;
+ if (idx1.row() == row && idx1.internalId() == internalId) {
+ lastViewedItem = lastViewedItem + i;
+ return lastViewedItem;
+ }
+ const QModelIndex &idx2 = viewItems.at(lastViewedItem - i - 1).index;
+ if (idx2.row() == row && idx2.internalId() == internalId) {
+ lastViewedItem = lastViewedItem - i - 1;
+ return lastViewedItem;
}
}
- // NOTE: this function is slow if the item is outside the visible area
- // search in visible items first and below
- int t = firstVisibleItem();
- t = t > 100 ? t - 100 : 0; // start 100 items above the visible area
-
- for (int i = t; i < totalCount; ++i) {
- const QModelIndex &idx = viewItems.at(i).index;
- if (idx.row() == row) {
- if (idx.internalId() == index.internalId()) {
- lastViewedItem = i;
- return i;
- }
+ for (int j = qMax(0, lastViewedItem + localCount); j < totalCount; ++j) {
+ const QModelIndex &idx = viewItems.at(j).index;
+ if (idx.row() == row && idx.internalId() == internalId) {
+ lastViewedItem = j;
+ return j;
}
}
- // search from top to first visible
- for (int j = 0; j < t; ++j) {
+ for (int j = qMin(totalCount, lastViewedItem - localCount) - 1; j >= 0; --j) {
const QModelIndex &idx = viewItems.at(j).index;
- if (idx.row() == row) {
- if (idx.internalId() == index.internalId()) {
- lastViewedItem = j;
- return j;
- }
+ if (idx.row() == row && idx.internalId() == internalId) {
+ lastViewedItem = j;
+ return j;
}
}
+
// nothing found
return -1;
}
@@ -3720,7 +3754,6 @@ bool QTreeViewPrivate::hasVisibleChildren(const QModelIndex& parent) const
void QTreeViewPrivate::rowsRemoved(const QModelIndex &parent,
int start, int end, bool after)
{
- Q_Q(QTreeView);
// if we are going to do a complete relayout anyway, there is no need to update
if (delayedPendingLayout) {
_q_rowsRemoved(parent, start, end);
@@ -3754,7 +3787,7 @@ void QTreeViewPrivate::rowsRemoved(const QModelIndex &parent,
item += count;
} else if (modelIndex.row() <= end) {
// removed
- viewItems.remove(item, count);
+ removeViewItems(item, count);
removedCount += count;
lastChildItem -= count;
} else {
@@ -3780,8 +3813,7 @@ void QTreeViewPrivate::rowsRemoved(const QModelIndex &parent,
}
}
if (after) {
- q->updateGeometries();
- viewport->update();
+ doDelayedItemsLayout();
} else {
//we have removed items: we should at least update the scroll bar values.
// They are used to determine the item geometry.
diff --git a/src/gui/itemviews/qtreeview_p.h b/src/gui/itemviews/qtreeview_p.h
index 589a224da4..48997b7162 100644
--- a/src/gui/itemviews/qtreeview_p.h
+++ b/src/gui/itemviews/qtreeview_p.h
@@ -55,6 +55,7 @@
#include "private/qabstractitemview_p.h"
#include <QtCore/qvariantanimation.h>
+#include <QtCore/qabstractitemmodel.h>
#ifndef QT_NO_TREEVIEW
@@ -62,9 +63,10 @@ QT_BEGIN_NAMESPACE
struct QTreeViewItem
{
- QTreeViewItem() : expanded(false), spanning(false), hasChildren(false),
+ QTreeViewItem() : parentItem(-1), expanded(false), spanning(false), hasChildren(false),
hasMoreSiblings(false), total(0), level(0), height(0) {}
QModelIndex index; // we remove items whenever the indexes are invalidated
+ int parentItem; // parent item index in viewItems
uint expanded : 1;
uint spanning : 1;
uint hasChildren : 1; // if the item has visible children (even if collapsed)
@@ -74,6 +76,8 @@ struct QTreeViewItem
int height : 16; // row height
};
+Q_DECLARE_TYPEINFO(QTreeViewItem, Q_MOVABLE_TYPE);
+
class QTreeViewPrivate : public QAbstractItemViewPrivate
{
Q_DECLARE_PUBLIC(QTreeView)
@@ -123,7 +127,7 @@ public:
void _q_sortIndicatorChanged(int column, Qt::SortOrder order);
void _q_modelDestroyed();
- void layout(int item);
+ void layout(int item, bool recusiveExpanding = false, bool afterIsUninitialized = false);
int pageUp(int item) const;
int pageDown(int item) const;
@@ -136,6 +140,12 @@ public:
int viewIndex(const QModelIndex &index) const;
QModelIndex modelIndex(int i, int column = 0) const;
+ void insertViewItems(int pos, int count, const QTreeViewItem &viewItem);
+ void removeViewItems(int pos, int count);
+#if 0
+ bool checkViewItems() const;
+#endif
+
int firstVisibleItem(int *offset = 0) const;
int columnAt(int x) const;
bool hasVisibleChildren( const QModelIndex& parent) const;
diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri
index 0993b86c2d..6fd45adf44 100644
--- a/src/gui/kernel/kernel.pri
+++ b/src/gui/kernel/kernel.pri
@@ -206,6 +206,7 @@ embedded {
OBJECTIVE_HEADERS += \
qcocoawindow_mac_p.h \
+ qcocoapanel_mac_p.h \
qcocoawindowdelegate_mac_p.h \
qcocoaview_mac_p.h \
qcocoaapplication_mac_p.h \
diff --git a/src/gui/kernel/qaction.h b/src/gui/kernel/qaction.h
index 434136796b..538b04f77b 100644
--- a/src/gui/kernel/qaction.h
+++ b/src/gui/kernel/qaction.h
@@ -246,6 +246,9 @@ private:
friend class QMenuBar;
friend class QShortcutMap;
friend class QToolButton;
+#ifdef Q_WS_MAC
+ friend void qt_mac_clear_status_text(QAction *action);
+#endif
};
QT_BEGIN_INCLUDE_NAMESPACE
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 4fe39006d4..fea8c370e1 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -122,15 +122,19 @@ extern bool qt_wince_is_pocket_pc(); //qguifunctions_wince.cpp
static void initResources()
{
#if defined(Q_WS_WINCE)
+ Q_INIT_RESOURCE_EXTERN(qstyle_wince)
Q_INIT_RESOURCE(qstyle_wince);
#elif defined(Q_OS_SYMBIAN)
+ Q_INIT_RESOURCE_EXTERN(qstyle_s60)
Q_INIT_RESOURCE(qstyle_s60);
#else
+ Q_INIT_RESOURCE_EXTERN(qstyle)
Q_INIT_RESOURCE(qstyle);
#endif
-
+ Q_INIT_RESOURCE_EXTERN(qmessagebox)
Q_INIT_RESOURCE(qmessagebox);
#if !defined(QT_NO_PRINTDIALOG)
+ Q_INIT_RESOURCE_EXTERN(qprintdialog)
Q_INIT_RESOURCE(qprintdialog);
#endif
@@ -182,6 +186,15 @@ QApplicationPrivate::QApplicationPrivate(int &argc, char **argv, QApplication::T
gestureManager = 0;
gestureWidget = 0;
+#if defined(Q_WS_X11) || defined(Q_WS_WIN)
+ move_cursor = 0;
+ copy_cursor = 0;
+ link_cursor = 0;
+#endif
+#if defined(Q_WS_WIN)
+ ignore_cursor = 0;
+#endif
+
if (!self)
self = this;
}
@@ -485,9 +498,7 @@ inline bool QApplicationPrivate::isAlien(QWidget *widget)
{
if (!widget)
return false;
-#if defined(Q_WS_MAC) // Fake alien behavior on the Mac :)
- return !widget->isWindow() && widget->window()->testAttribute(Qt::WA_DontShowOnScreen);
-#elif defined(Q_WS_QWS)
+#if defined(Q_WS_QWS)
return !widget->isWindow()
# ifdef Q_BACKINGSTORE_SUBSURFACES
&& !(widget->d_func()->maybeTopData() && widget->d_func()->maybeTopData()->windowSurface)
@@ -925,7 +936,7 @@ void QApplicationPrivate::initialize()
// Set up which span functions should be used in raster engine...
qInitDrawhelperAsm();
-
+
#if !defined(Q_WS_X11) && !defined(Q_WS_QWS)
// initialize the graphics system - on X11 this is initialized inside
// qt_init() in qapplication_x11.cpp because of several reasons.
@@ -1032,6 +1043,15 @@ QApplication::~QApplication()
qt_clipboard = 0;
#endif
+#if defined(Q_WS_X11) || defined(Q_WS_WIN)
+ delete d->move_cursor; d->move_cursor = 0;
+ delete d->copy_cursor; d->copy_cursor = 0;
+ delete d->link_cursor; d->link_cursor = 0;
+#endif
+#if defined(Q_WS_WIN)
+ delete d->ignore_cursor; d->ignore_cursor = 0;
+#endif
+
delete QWidgetPrivate::mapper;
QWidgetPrivate::mapper = 0;
@@ -2289,6 +2309,19 @@ static bool qt_detectRTLLanguage()
" languages or to 'RTL' in right-to-left languages (such as Hebrew"
" and Arabic) to get proper widget layout.") == QLatin1String("RTL"));
}
+#if defined(QT_MAC_USE_COCOA)
+static const char *application_menu_strings[] = {
+ QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Services"),
+ QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Hide %1"),
+ QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Hide Others"),
+ QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Show All")
+ };
+QString qt_mac_applicationmenu_string(int type)
+{
+ return qApp->translate("MAC_APPLICATION_MENU",
+ application_menu_strings[type]);
+}
+#endif
#endif
/*!\reimp
@@ -2317,6 +2350,9 @@ bool QApplication::event(QEvent *e)
#ifndef QT_NO_TRANSLATION
setLayoutDirection(qt_detectRTLLanguage()?Qt::RightToLeft:Qt::LeftToRight);
#endif
+#if defined(QT_MAC_USE_COCOA)
+ qt_mac_post_retranslateAppMenu();
+#endif
QWidgetList list = topLevelWidgets();
for (int i = 0; i < list.size(); ++i) {
QWidget *w = list.at(i);
@@ -2991,7 +3027,7 @@ bool QApplicationPrivate::sendMouseEvent(QWidget *receiver, QMouseEvent *event,
return result;
}
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_QWS)
+#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_WS_MAC)
/*
This function should only be called when the widget changes visibility, i.e.
when the \a widget is shown, hidden or deleted. This function does nothing
@@ -3051,7 +3087,7 @@ void QApplicationPrivate::sendSyntheticEnterLeave(QWidget *widget)
sendMouseEvent(widgetUnderCursor, &e, widgetUnderCursor, tlw, &qt_button_down, qt_last_mouse_receiver);
#endif // QT_NO_CURSOR
}
-#endif // Q_WS_WIN || Q_WS_X11
+#endif // Q_WS_WIN || Q_WS_X11 || Q_WS_MAC
/*!
Returns the desktop widget (also called the root window).
@@ -5246,10 +5282,20 @@ QInputContext *QApplication::inputContext() const
qic = QInputContextFactory::create(QLatin1String("xim"), that);
that->d_func()->inputContext = qic;
}
-#elif defined(Q_WS_S60)
+#elif defined(Q_OS_SYMBIAN)
if (!d->inputContext) {
QApplication *that = const_cast<QApplication *>(this);
- that->d_func()->inputContext = QInputContextFactory::create(QString::fromLatin1("coefep"), that);
+ const QStringList keys = QInputContextFactory::keys();
+ // Try hbim and coefep first, then try others.
+ if (keys.contains("hbim")) {
+ that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("hbim"), that);
+ } else if (keys.contains("coefep")) {
+ that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("coefep"), that);
+ } else {
+ for (int c = 0; c < keys.size() && !d->inputContext; ++c) {
+ that->d_func()->inputContext = QInputContextFactory::create(keys[c], that);
+ }
+ }
}
#endif
return d->inputContext;
@@ -5689,6 +5735,228 @@ QGestureManager* QGestureManager::instance()
return qAppPriv->gestureManager;
}
+// These pixmaps approximate the images in the Windows User Interface Guidelines.
+
+// XPM
+
+static const char * const move_xpm[] = {
+"11 20 3 1",
+". c None",
+#if defined(Q_WS_WIN)
+"a c #000000",
+"X c #FFFFFF", // Windows cursor is traditionally white
+#else
+"a c #FFFFFF",
+"X c #000000", // X11 cursor is traditionally black
+#endif
+"aa.........",
+"aXa........",
+"aXXa.......",
+"aXXXa......",
+"aXXXXa.....",
+"aXXXXXa....",
+"aXXXXXXa...",
+"aXXXXXXXa..",
+"aXXXXXXXXa.",
+"aXXXXXXXXXa",
+"aXXXXXXaaaa",
+"aXXXaXXa...",
+"aXXaaXXa...",
+"aXa..aXXa..",
+"aa...aXXa..",
+"a.....aXXa.",
+"......aXXa.",
+".......aXXa",
+".......aXXa",
+"........aa."};
+
+#ifdef Q_WS_WIN
+/* XPM */
+static const char * const ignore_xpm[] = {
+"24 30 3 1",
+". c None",
+"a c #000000",
+"X c #FFFFFF",
+"aa......................",
+"aXa.....................",
+"aXXa....................",
+"aXXXa...................",
+"aXXXXa..................",
+"aXXXXXa.................",
+"aXXXXXXa................",
+"aXXXXXXXa...............",
+"aXXXXXXXXa..............",
+"aXXXXXXXXXa.............",
+"aXXXXXXaaaa.............",
+"aXXXaXXa................",
+"aXXaaXXa................",
+"aXa..aXXa...............",
+"aa...aXXa...............",
+"a.....aXXa..............",
+"......aXXa.....XXXX.....",
+".......aXXa..XXaaaaXX...",
+".......aXXa.XaaaaaaaaX..",
+"........aa.XaaaXXXXaaaX.",
+"...........XaaaaX..XaaX.",
+"..........XaaXaaaX..XaaX",
+"..........XaaXXaaaX.XaaX",
+"..........XaaX.XaaaXXaaX",
+"..........XaaX..XaaaXaaX",
+"...........XaaX..XaaaaX.",
+"...........XaaaXXXXaaaX.",
+"............XaaaaaaaaX..",
+".............XXaaaaXX...",
+"...............XXXX....."};
+#endif
+
+/* XPM */
+static const char * const copy_xpm[] = {
+"24 30 3 1",
+". c None",
+"a c #000000",
+"X c #FFFFFF",
+#if defined(Q_WS_WIN) // Windows cursor is traditionally white
+"aa......................",
+"aXa.....................",
+"aXXa....................",
+"aXXXa...................",
+"aXXXXa..................",
+"aXXXXXa.................",
+"aXXXXXXa................",
+"aXXXXXXXa...............",
+"aXXXXXXXXa..............",
+"aXXXXXXXXXa.............",
+"aXXXXXXaaaa.............",
+"aXXXaXXa................",
+"aXXaaXXa................",
+"aXa..aXXa...............",
+"aa...aXXa...............",
+"a.....aXXa..............",
+"......aXXa..............",
+".......aXXa.............",
+".......aXXa.............",
+"........aa...aaaaaaaaaaa",
+#else
+"XX......................",
+"XaX.....................",
+"XaaX....................",
+"XaaaX...................",
+"XaaaaX..................",
+"XaaaaaX.................",
+"XaaaaaaX................",
+"XaaaaaaaX...............",
+"XaaaaaaaaX..............",
+"XaaaaaaaaaX.............",
+"XaaaaaaXXXX.............",
+"XaaaXaaX................",
+"XaaXXaaX................",
+"XaX..XaaX...............",
+"XX...XaaX...............",
+"X.....XaaX..............",
+"......XaaX..............",
+".......XaaX.............",
+".......XaaX.............",
+"........XX...aaaaaaaaaaa",
+#endif
+".............aXXXXXXXXXa",
+".............aXXXXXXXXXa",
+".............aXXXXaXXXXa",
+".............aXXXXaXXXXa",
+".............aXXaaaaaXXa",
+".............aXXXXaXXXXa",
+".............aXXXXaXXXXa",
+".............aXXXXXXXXXa",
+".............aXXXXXXXXXa",
+".............aaaaaaaaaaa"};
+
+/* XPM */
+static const char * const link_xpm[] = {
+"24 30 3 1",
+". c None",
+"a c #000000",
+"X c #FFFFFF",
+#if defined(Q_WS_WIN) // Windows cursor is traditionally white
+"aa......................",
+"aXa.....................",
+"aXXa....................",
+"aXXXa...................",
+"aXXXXa..................",
+"aXXXXXa.................",
+"aXXXXXXa................",
+"aXXXXXXXa...............",
+"aXXXXXXXXa..............",
+"aXXXXXXXXXa.............",
+"aXXXXXXaaaa.............",
+"aXXXaXXa................",
+"aXXaaXXa................",
+"aXa..aXXa...............",
+"aa...aXXa...............",
+"a.....aXXa..............",
+"......aXXa..............",
+".......aXXa.............",
+".......aXXa.............",
+"........aa...aaaaaaaaaaa",
+#else
+"XX......................",
+"XaX.....................",
+"XaaX....................",
+"XaaaX...................",
+"XaaaaX..................",
+"XaaaaaX.................",
+"XaaaaaaX................",
+"XaaaaaaaX...............",
+"XaaaaaaaaX..............",
+"XaaaaaaaaaX.............",
+"XaaaaaaXXXX.............",
+"XaaaXaaX................",
+"XaaXXaaX................",
+"XaX..XaaX...............",
+"XX...XaaX...............",
+"X.....XaaX..............",
+"......XaaX..............",
+".......XaaX.............",
+".......XaaX.............",
+"........XX...aaaaaaaaaaa",
+#endif
+".............aXXXXXXXXXa",
+".............aXXXaaaaXXa",
+".............aXXXXaaaXXa",
+".............aXXXaaaaXXa",
+".............aXXaaaXaXXa",
+".............aXXaaXXXXXa",
+".............aXXaXXXXXXa",
+".............aXXXaXXXXXa",
+".............aXXXXXXXXXa",
+".............aaaaaaaaaaa"};
+
+QPixmap QApplicationPrivate::getPixmapCursor(Qt::CursorShape cshape)
+{
+ if (!move_cursor) {
+ move_cursor = new QPixmap((const char **)move_xpm);
+ copy_cursor = new QPixmap((const char **)copy_xpm);
+ link_cursor = new QPixmap((const char **)link_xpm);
+#ifdef Q_WS_WIN
+ ignore_cursor = new QPixmap((const char **)ignore_xpm);
+#endif
+ }
+
+ switch (cshape) {
+ case Qt::DragMoveCursor:
+ return *move_cursor;
+ case Qt::DragCopyCursor:
+ return *copy_cursor;
+ case Qt::DragLinkCursor:
+ return *link_cursor;
+#ifdef Q_WS_WIN
+ case Qt::ForbiddenCursor:
+ return *ignore_cursor;
+#endif
+ default:
+ break;
+ }
+ return QPixmap();
+}
+
QT_END_NAMESPACE
#include "moc_qapplication.cpp"
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index 54a490137e..c7d0e481f0 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -184,7 +184,8 @@ bool qt_mac_app_fullscreen = false;
bool qt_scrollbar_jump_to_pos = false;
static bool qt_mac_collapse_on_dblclick = true;
extern int qt_antialiasing_threshold; // from qapplication.cpp
-QPointer<QWidget> qt_button_down; // widget got last button-down
+QWidget * qt_button_down; // widget got last button-down
+QPointer<QWidget> qt_last_mouse_receiver;
#ifndef QT_MAC_USE_COCOA
static bool qt_button_down_in_content; // whether the button_down was in the content area.
static bool qt_mac_previous_press_in_popup_mode = false;
@@ -1222,9 +1223,16 @@ void qt_init(QApplicationPrivate *priv, int)
#endif
if (!app_proc_ae_handlerUPP) {
app_proc_ae_handlerUPP = AEEventHandlerUPP(QApplicationPrivate::globalAppleEventProcessor);
- for(uint i = 0; i < sizeof(app_apple_events) / sizeof(QMacAppleEventTypeSpec); ++i)
- AEInstallEventHandler(app_apple_events[i].mac_class, app_apple_events[i].mac_id,
- app_proc_ae_handlerUPP, SRefCon(qApp), false);
+ for(uint i = 0; i < sizeof(app_apple_events) / sizeof(QMacAppleEventTypeSpec); ++i) {
+ // Install apple event handler, but avoid overwriting an already
+ // existing handler (it means a 3rd party application has installed one):
+ SRefCon refCon = 0;
+ AEEventHandlerUPP current_handler = NULL;
+ AEGetEventHandler(app_apple_events[i].mac_class, app_apple_events[i].mac_id, &current_handler, &refCon, false);
+ if (!current_handler)
+ AEInstallEventHandler(app_apple_events[i].mac_class, app_apple_events[i].mac_id,
+ app_proc_ae_handlerUPP, SRefCon(qApp), false);
+ }
}
if (QApplicationPrivate::app_style) {
@@ -1237,7 +1245,7 @@ void qt_init(QApplicationPrivate *priv, int)
// Cocoa application delegate
#ifdef QT_MAC_USE_COCOA
- NSApplication *cocoaApp = [NSApplication sharedApplication];
+ NSApplication *cocoaApp = [QNSApplication sharedApplication];
QMacCocoaAutoReleasePool pool;
NSObject *oldDelegate = [cocoaApp delegate];
QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) *newDelegate = [QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) sharedDelegate];
@@ -1258,10 +1266,6 @@ void qt_init(QApplicationPrivate *priv, int)
[cocoaApp setMenu:[qtMenuLoader menu]];
[newDelegate setMenuLoader:qtMenuLoader];
[qtMenuLoader release];
-
- NSAppleEventManager *eventManager = [NSAppleEventManager sharedAppleEventManager];
- [eventManager setEventHandler:newDelegate andSelector:@selector(getUrl:withReplyEvent:)
- forEventClass:kInternetEventClass andEventID:kAEGetURL];
}
#endif
// Register for Carbon tablet proximity events on the event monitor target.
@@ -1361,12 +1365,39 @@ void QApplication::setMainWidget(QWidget *mainWidget)
/*****************************************************************************
QApplication cursor stack
*****************************************************************************/
+#ifdef QT_MAC_USE_COCOA
+void QApplicationPrivate::disableUsageOfCursorRects(bool disable)
+{
+ // In Cocoa there are two competing ways of setting the cursor; either
+ // by using cursor rects (see qcocoaview_mac.mm), or by pushing/popping
+ // the cursor manually. When we use override cursors, it makes most sense
+ // to use the latter. But then we need to tell cocoa to stop using the
+ // first approach so it doesn't change the cursor back when hovering over
+ // a cursor rect:
+ QWidgetList topLevels = qApp->topLevelWidgets();
+ for (int i=0; i<topLevels.size(); ++i) {
+ if (NSWindow *window = qt_mac_window_for(topLevels.at(i)))
+ disable ? [window disableCursorRects] : [window enableCursorRects];
+ }
+}
+
+void QApplicationPrivate::updateOverrideCursor()
+{
+ // Sometimes Cocoa forgets that we have set a Cursor
+ // manually. In those cases, remind it again:
+ if (QCursor *override = qApp->overrideCursor())
+ [static_cast<NSCursor *>(qt_mac_nsCursorForQCursor(*override)) set];
+}
+#endif
+
void QApplication::setOverrideCursor(const QCursor &cursor)
{
qApp->d_func()->cursor_list.prepend(cursor);
#ifdef QT_MAC_USE_COCOA
QMacCocoaAutoReleasePool pool;
+ if (qApp->d_func()->cursor_list.size() == 1)
+ qApp->d_func()->disableUsageOfCursorRects(true);
[static_cast<NSCursor *>(qt_mac_nsCursorForQCursor(cursor)) push];
#else
if (qApp && qApp->activeWindow())
@@ -1383,6 +1414,8 @@ void QApplication::restoreOverrideCursor()
#ifdef QT_MAC_USE_COCOA
QMacCocoaAutoReleasePool pool;
[NSCursor pop];
+ if (qApp->d_func()->cursor_list.isEmpty())
+ qApp->d_func()->disableUsageOfCursorRects(false);
#else
if (qApp && qApp->activeWindow()) {
const QCursor def(Qt::ArrowCursor);
@@ -2457,6 +2490,35 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event
#endif
}
+#ifdef QT_MAC_USE_COCOA
+void QApplicationPrivate::qt_initAfterNSAppStarted()
+{
+ setupAppleEvents();
+ updateOverrideCursor();
+}
+
+void QApplicationPrivate::setupAppleEvents()
+{
+ // This function is called from the event dispatcher when NSApplication has
+ // finished initialization, which appears to be just after [NSApplication run] has
+ // started to execute. By setting up our apple events handlers this late, we override
+ // the ones set up by NSApplication.
+
+ // If Qt is used as a plugin, we let the 3rd party application handle events
+ // like quit and open file events. Otherwise, if we install our own handlers, we
+ // easily end up breaking functionallity the 3rd party application depend on:
+ if (QApplication::testAttribute(Qt::AA_MacPluginApplication))
+ return;
+
+ QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) *newDelegate = [QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) sharedDelegate];
+ NSAppleEventManager *eventManager = [NSAppleEventManager sharedAppleEventManager];
+ [eventManager setEventHandler:newDelegate andSelector:@selector(appleEventQuit:withReplyEvent:)
+ forEventClass:kCoreEventClass andEventID:kAEQuitApplication];
+ [eventManager setEventHandler:newDelegate andSelector:@selector(getUrl:withReplyEvent:)
+ forEventClass:kInternetEventClass andEventID:kAEGetURL];
+}
+#endif
+
// In Carbon this is your one stop for apple events.
// In Cocoa, it ISN'T. This is the catch-all Apple Event handler that exists
// for the time between instantiating the NSApplication, but before the
@@ -3008,7 +3070,7 @@ void onApplicationWindowChangedActivation(QWidget *widget, bool activated)
}
QMenuBar::macUpdateMenuBar();
-
+ QApplicationPrivate::updateOverrideCursor();
#else
Q_UNUSED(widget);
Q_UNUSED(activated);
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index ce3933400b..6d71cfe466 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -459,6 +459,12 @@ public:
static OSStatus globalEventProcessor(EventHandlerCallRef, EventRef, void *);
static OSStatus globalAppleEventProcessor(const AppleEvent *, AppleEvent *, long);
static OSStatus tabletProximityCallback(EventHandlerCallRef, EventRef, void *);
+#ifdef QT_MAC_USE_COCOA
+ static void qt_initAfterNSAppStarted();
+ static void setupAppleEvents();
+ static void updateOverrideCursor();
+ static void disableUsageOfCursorRects(bool disable);
+#endif
static bool qt_mac_apply_settings();
#endif
@@ -508,12 +514,19 @@ public:
int symbianResourceChange(const QSymbianEvent *symbianEvent);
#endif
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS)
+#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC)
void sendSyntheticEnterLeave(QWidget *widget);
#endif
QGestureManager *gestureManager;
QWidget *gestureWidget;
+ QPixmap *move_cursor;
+ QPixmap *copy_cursor;
+ QPixmap *link_cursor;
+#if defined(Q_WS_WIN)
+ QPixmap *ignore_cursor;
+#endif
+ QPixmap getPixmapCursor(Qt::CursorShape cshape);
QMap<int, QWeakPointer<QWidget> > widgetForTouchPointId;
QMap<int, QTouchEvent::TouchPoint> appCurrentTouchPoints;
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 49cb0f277c..ae9b34cd5c 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -441,7 +441,7 @@ extern QCursor *qt_grab_cursor();
#define __export
#endif
-extern "C" LRESULT CALLBACK QtWndProc(HWND, UINT, WPARAM, LPARAM);
+extern "C" LRESULT QT_WIN_CALLBACK QtWndProc(HWND, UINT, WPARAM, LPARAM);
class QETWidget : public QWidget // event translator widget
{
@@ -1400,8 +1400,7 @@ static bool qt_is_translatable_mouse_event(UINT message)
;
}
-extern "C"
-LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+extern "C" LRESULT QT_WIN_CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
bool result = true;
QEvent::Type evt_type = QEvent::None;
@@ -2560,6 +2559,17 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
break;
}
#endif // !defined(Q_WS_WINCE) || defined(QT_WINCE_GESTURES)
+#ifndef QT_NO_CURSOR
+ case WM_SETCURSOR: {
+ QCursor *ovr = QApplication::overrideCursor();
+ if (ovr) {
+ SetCursor(ovr->handle());
+ RETURN(TRUE);
+ }
+ result = false;
+ break;
+ }
+#endif
default:
result = false; // event was not processed
break;
@@ -2982,7 +2992,10 @@ bool QETWidget::translateMouseEvent(const MSG &msg)
// most recent one.
msgPtr->lParam = mouseMsg.lParam;
msgPtr->wParam = mouseMsg.wParam;
- msgPtr->pt = mouseMsg.pt;
+ // Extract the x,y coordinates from the lParam as we do in the WndProc
+ msgPtr->pt.x = GET_X_LPARAM(mouseMsg.lParam);
+ msgPtr->pt.y = GET_Y_LPARAM(mouseMsg.lParam);
+ ClientToScreen(msg.hwnd, &(msgPtr->pt));
// Remove the mouse move message
PeekMessage(&mouseMsg, msg.hwnd, WM_MOUSEMOVE,
WM_MOUSEMOVE, PM_REMOVE);
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index 25a7750d96..20a7ff2908 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -213,11 +213,8 @@ static const char * x11_atomnames = {
"_MOTIF_WM_HINTS\0"
"DTWM_IS_RUNNING\0"
- "KDE_FULL_SESSION\0"
- "KWIN_RUNNING\0"
- "KWM_RUNNING\0"
- "GNOME_BACKGROUND_PROPERTIES\0"
"ENLIGHTENMENT_DESKTOP\0"
+ "_DT_SAVE_MODE\0"
"_SGI_DESKS_MANAGER\0"
// EWMH (aka NETWM)
@@ -624,6 +621,11 @@ static int (*original_xio_errhandler)(Display *dpy);
static int qt_x_errhandler(Display *dpy, XErrorEvent *err)
{
+ if (X11->display != dpy) {
+ // only handle X errors for our display
+ return 0;
+ }
+
switch (err->error_code) {
case BadAtom:
if (err->request_code == 20 /* X_GetProperty */
@@ -631,8 +633,6 @@ static int qt_x_errhandler(Display *dpy, XErrorEvent *err)
|| err->resourceid == XA_RGB_DEFAULT_MAP
|| err->resourceid == ATOM(_NET_SUPPORTED)
|| err->resourceid == ATOM(_NET_SUPPORTING_WM_CHECK)
- || err->resourceid == ATOM(KDE_FULL_SESSION)
- || err->resourceid == ATOM(KWIN_RUNNING)
|| err->resourceid == ATOM(XdndProxy)
|| err->resourceid == ATOM(XdndAware))) {
// Perhaps we're running under SECURITY reduction? :/
@@ -2227,87 +2227,66 @@ void qt_init(QApplicationPrivate *priv, int,
X11->desktopEnvironment = DE_UNKNOWN;
X11->desktopVersion = 0;
- // See if the current window manager is using the freedesktop.org spec to give its name
- Window windowManagerWindow = XNone;
- Atom typeReturned;
- int formatReturned;
- unsigned long nitemsReturned;
- unsigned long unused;
- unsigned char *data = 0;
- if (XGetWindowProperty(QX11Info::display(), QX11Info::appRootWindow(),
- ATOM(_NET_SUPPORTING_WM_CHECK),
- 0, 1024, False, XA_WINDOW, &typeReturned,
- &formatReturned, &nitemsReturned, &unused, &data)
- == Success) {
- if (typeReturned == XA_WINDOW && formatReturned == 32)
- windowManagerWindow = *((Window*) data);
- if (data)
- XFree(data);
+ Atom type;
+ int format;
+ unsigned long length, after;
+ uchar *data = 0;
+ int rc;
- if (windowManagerWindow != XNone) {
- QString wmName;
- Atom utf8atom = ATOM(UTF8_STRING);
- if (XGetWindowProperty(QX11Info::display(), windowManagerWindow, ATOM(_NET_WM_NAME),
- 0, 1024, False, utf8atom, &typeReturned,
- &formatReturned, &nitemsReturned, &unused, &data)
- == Success) {
- if (typeReturned == utf8atom && formatReturned == 8)
- wmName = QString::fromUtf8((const char*)data);
- if (data)
- XFree(data);
- if (wmName == QLatin1String("KWin"))
- X11->desktopEnvironment = DE_KDE;
- if (wmName == QLatin1String("Metacity"))
- X11->desktopEnvironment = DE_GNOME;
- }
+ do {
+ if (!qgetenv("KDE_FULL_SESSION").isEmpty()) {
+ X11->desktopEnvironment = DE_KDE;
+ X11->desktopVersion = qgetenv("KDE_SESSION_VERSION").toInt();
+ break;
}
- }
- // Running a different/newer/older window manager? Try some other things
- if (X11->desktopEnvironment == DE_UNKNOWN){
- Atom type;
- int format;
- unsigned long length, after;
- uchar *data = 0;
+ if (qgetenv("DESKTOP_SESSION") == "gnome") {
+ X11->desktopEnvironment = DE_GNOME;
+ break;
+ }
- QString session = QString::fromLocal8Bit(qgetenv("DESKTOP_SESSION"));
- if (session == QLatin1String("kde")) {
- X11->desktopEnvironment = DE_KDE;
- } else if (session == QLatin1String("gnome") || session == QLatin1String("xfce")) {
+ // GNOME_DESKTOP_SESSION_ID is deprecated for some reason, but still check it
+ if (!qgetenv("GNOME_DESKTOP_SESSION_ID").isEmpty()) {
X11->desktopEnvironment = DE_GNOME;
- } else if (XGetWindowProperty(X11->display, QX11Info::appRootWindow(), ATOM(DTWM_IS_RUNNING),
- 0, 1, False, AnyPropertyType, &type, &format, &length,
- &after, &data) == Success && length) {
+ break;
+ }
+
+ rc = XGetWindowProperty(X11->display, QX11Info::appRootWindow(), ATOM(_DT_SAVE_MODE),
+ 0, 2, False, XA_STRING, &type, &format, &length,
+ &after, &data);
+ if (rc == Success && length) {
+ if (!strcmp(reinterpret_cast<char *>(data), "xfce4")) {
+ // Pretend that xfce4 is gnome, as it uses the same libraries.
+ // The detection above is stolen from xdg-open.
+ X11->desktopEnvironment = DE_GNOME;
+ break;
+ }
+
+ // We got the property but it wasn't xfce4. Free data before it gets overwritten.
+ XFree(data);
+ data = 0;
+ }
+
+ rc = XGetWindowProperty(X11->display, QX11Info::appRootWindow(), ATOM(DTWM_IS_RUNNING),
+ 0, 1, False, AnyPropertyType, &type, &format, &length,
+ &after, &data);
+ if (rc == Success && length) {
// DTWM is running, meaning most likely CDE is running...
X11->desktopEnvironment = DE_CDE;
- } else if (XGetWindowProperty(X11->display, QX11Info::appRootWindow(),
- ATOM(GNOME_BACKGROUND_PROPERTIES), 0, 1, False, AnyPropertyType,
- &type, &format, &length, &after, &data) == Success && length) {
- X11->desktopEnvironment = DE_GNOME;
- } else if (!qgetenv("GNOME_DESKTOP_SESSION_ID").isEmpty()) {
- X11->desktopEnvironment = DE_GNOME;
- } else if ((XGetWindowProperty(X11->display, QX11Info::appRootWindow(), ATOM(KDE_FULL_SESSION),
- 0, 1, False, AnyPropertyType, &type, &format, &length, &after, &data) == Success
- && length)
- || (XGetWindowProperty(X11->display, QX11Info::appRootWindow(), ATOM(KWIN_RUNNING),
- 0, 1, False, AnyPropertyType, &type, &format, &length,
- &after, &data) == Success
- && length)
- || (XGetWindowProperty(X11->display, QX11Info::appRootWindow(), ATOM(KWM_RUNNING),
- 0, 1, False, AnyPropertyType, &type, &format, &length,
- &after, &data) == Success && length)) {
- X11->desktopEnvironment = DE_KDE;
- } else if (XGetWindowProperty(X11->display, QX11Info::appRootWindow(), ATOM(_SGI_DESKS_MANAGER),
- 0, 1, False, XA_WINDOW, &type, &format, &length, &after, &data) == Success
- && length) {
+ break;
+ }
+
+ rc = XGetWindowProperty(X11->display, QX11Info::appRootWindow(),
+ ATOM(_SGI_DESKS_MANAGER), 0, 1, False, XA_WINDOW,
+ &type, &format, &length, &after, &data);
+ if (rc == Success && length) {
X11->desktopEnvironment = DE_4DWM;
+ break;
}
- if (data)
- XFree((char *)data);
- }
+ } while(0);
- if (X11->desktopEnvironment == DE_KDE)
- X11->desktopVersion = QString::fromLocal8Bit(qgetenv("KDE_SESSION_VERSION")).toInt();
+ if (data)
+ XFree((char *)data);
#if !defined(QT_NO_STYLE_GTK)
if (X11->desktopEnvironment == DE_GNOME) {
diff --git a/src/gui/kernel/qclipboard.cpp b/src/gui/kernel/qclipboard.cpp
index a59bb98236..f7c0b6ee2a 100644
--- a/src/gui/kernel/qclipboard.cpp
+++ b/src/gui/kernel/qclipboard.cpp
@@ -107,6 +107,12 @@ QT_BEGIN_NAMESPACE
store or retrieve the clipboard contents in response to timer or
non-user-input events.
+ \i Since there is no standard way to copy and paste files between
+ applications on X11, various MIME types and conventions are currently
+ in use. For instance, Nautilus expects files to be supplied with a
+ \c{x-special/gnome-copied-files} MIME type with data beginning with
+ the cut/copy action, a newline character, and the URL of the file.
+
\endlist
\section1 Notes for Mac OS X Users
diff --git a/src/gui/kernel/qcocoaapplication_mac.mm b/src/gui/kernel/qcocoaapplication_mac.mm
index 5b9842074e..496286374a 100644
--- a/src/gui/kernel/qcocoaapplication_mac.mm
+++ b/src/gui/kernel/qcocoaapplication_mac.mm
@@ -79,6 +79,8 @@
#include <private/qcocoaapplicationdelegate_mac_p.h>
#include <private/qt_cocoa_helpers_mac_p.h>
+QT_USE_NAMESPACE
+
@implementation NSApplication (QT_MANGLE_NAMESPACE(QApplicationIntegration))
- (void)QT_MANGLE_NAMESPACE(qt_setDockMenu):(NSMenu *)newMenu
@@ -107,5 +109,49 @@
| NSFontPanelStrikethroughEffectModeMask;
}
+- (void)qt_sendPostedMessage:(NSEvent *)event
+{
+ // WARNING: data1 and data2 is truncated to from 64-bit to 32-bit on OS 10.5!
+ // That is why we need to split the address in two parts:
+ quint64 lower = [event data1];
+ quint64 upper = [event data2];
+ QCocoaPostMessageArgs *args = reinterpret_cast<QCocoaPostMessageArgs *>(lower | (upper << 32));
+ [args->target performSelector:args->selector];
+ delete args;
+}
+
+- (BOOL)qt_sendEvent:(NSEvent *)event
+{
+ if ([event type] == NSApplicationDefined) {
+ switch ([event subtype]) {
+ case QtCocoaEventSubTypePostMessage:
+ [NSApp qt_sendPostedMessage:event];
+ return true;
+ default:
+ break;
+ }
+ }
+ return false;
+}
+
@end
+
+@implementation QNSApplication
+
+// WARNING: If Qt did not create NSApplication (this can e.g.
+// happend if Qt is used as a plugin from a 3rd-party cocoa
+// application), QNSApplication::sendEvent will never be called.
+// SO DO NOT RELY ON THIS FUNCTION BEING AVAILABLE.
+// Plugin developers that _do_ control the NSApplication sub-class
+// implementation of the 3rd-party application can call qt_sendEvent
+// from the sub-class event handler (like we do here) to work around
+// any issues.
+- (void)sendEvent:(NSEvent *)event
+{
+ if (![self qt_sendEvent:event])
+ [super sendEvent:event];
+}
+
+@end
+
#endif
diff --git a/src/gui/kernel/qcocoaapplication_mac_p.h b/src/gui/kernel/qcocoaapplication_mac_p.h
index e845d58f98..5569feb2df 100644
--- a/src/gui/kernel/qcocoaapplication_mac_p.h
+++ b/src/gui/kernel/qcocoaapplication_mac_p.h
@@ -99,5 +99,13 @@ QT_FORWARD_DECLARE_CLASS(QApplicationPrivate)
- (QApplicationPrivate *)QT_MANGLE_NAMESPACE(qt_qappPrivate);
- (QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *)QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader);
- (int)QT_MANGLE_NAMESPACE(qt_validModesForFontPanel):(NSFontPanel *)fontPanel;
+
+- (void)qt_sendPostedMessage:(NSEvent *)event;
+- (BOOL)qt_sendEvent:(NSEvent *)event;
+@end
+
+@interface QNSApplication : NSApplication {
+}
@end
+
#endif
diff --git a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
index 47a8026f34..5dcf613d63 100644
--- a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
+++ b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
@@ -179,7 +179,7 @@ static void cleanupCocoaApplicationDelegate()
}
// This function will only be called when NSApp is actually running. Before
-// that, the kAEQuitApplication apple event will be sendt to
+// that, the kAEQuitApplication Apple event will be sent to
// QApplicationPrivate::globalAppleEventProcessor in qapplication_mac.mm
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
{
@@ -196,21 +196,18 @@ static void cleanupCocoaApplicationDelegate()
qAppInstance()->quit();
startedQuit = false;
}
+ return NSTerminateNow;
}
if (qtPrivate->threadData->eventLoops.size() == 0) {
// INVARIANT: No event loop is executing. This probably
// means that Qt is used as a plugin, or as a part of a native
- // Cocoa application. In any case it should be fine to
+ // Cocoa application. In any case it should be fine to
// terminate now:
return NSTerminateNow;
- } else {
- // Prevent Cocoa from terminating the application, since this simply
- // exits the program whithout allowing QApplication::exec() to return.
- // The call to QApplication::quit() above will instead quit the
- // application from the Qt side.
- return NSTerminateCancel;
}
+
+ return NSTerminateCancel;
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
@@ -317,5 +314,12 @@ static void cleanupCocoaApplicationDelegate()
qt_sendSpontaneousEvent(qAppInstance(), &qtEvent);
}
+- (void)appleEventQuit:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent
+{
+ Q_UNUSED(event);
+ Q_UNUSED(replyEvent);
+ [NSApp terminate:self];
+}
+
@end
#endif
diff --git a/src/gui/kernel/qcocoamenuloader_mac.mm b/src/gui/kernel/qcocoamenuloader_mac.mm
index 18b377257f..35d156a32e 100644
--- a/src/gui/kernel/qcocoamenuloader_mac.mm
+++ b/src/gui/kernel/qcocoamenuloader_mac.mm
@@ -46,7 +46,9 @@
#include <private/qcocoamenuloader_mac_p.h>
#include <private/qapplication_p.h>
#include <private/qt_mac_p.h>
+#include <private/qmenubar_p.h>
#include <qmenubar.h>
+#include <private/qt_cocoa_helpers_mac_p.h>
QT_FORWARD_DECLARE_CLASS(QCFString)
QT_FORWARD_DECLARE_CLASS(QString)
@@ -57,6 +59,10 @@ QT_USE_NAMESPACE
- (void)awakeFromNib
{
+ servicesItem = [[appMenu itemWithTitle:@"Services"] retain];
+ hideAllOthersItem = [[appMenu itemWithTitle:@"Hide Others"] retain];
+ showAllItem = [[appMenu itemWithTitle:@"Show All"] retain];
+
// Get the names in the nib to match the app name set by Qt.
NSString *appName = reinterpret_cast<const NSString*>(QCFString::toCFStringRef(qAppName()));
[quitItem setTitle:[[quitItem title] stringByReplacingOccurrencesOfString:@"NewApplication"
@@ -118,6 +124,10 @@ QT_USE_NAMESPACE
- (void)dealloc
{
+ [servicesItem release];
+ [hideAllOthersItem release];
+ [showAllItem release];
+
[lastAppSpecificItem release];
[theMenu release];
[appMenu release];
@@ -208,6 +218,22 @@ QT_USE_NAMESPACE
[NSApp hide:sender];
}
+- (void)qtUpdateMenubar
+{
+ QMenuBarPrivate::macUpdateMenuBarImmediatly();
+}
+
+- (void)qtTranslateApplicationMenu
+{
+#ifndef QT_NO_TRANSLATION
+ extern QString qt_mac_applicationmenu_string(int type);
+ [servicesItem setTitle: qt_mac_QStringToNSString(qt_mac_applicationmenu_string(0))];
+ [hideItem setTitle: qt_mac_QStringToNSString(qt_mac_applicationmenu_string(1).arg(qAppName()))];
+ [hideAllOthersItem setTitle: qt_mac_QStringToNSString(qt_mac_applicationmenu_string(2))];
+ [showAllItem setTitle: qt_mac_QStringToNSString(qt_mac_applicationmenu_string(3))];
+#endif
+}
+
- (IBAction)qtDispatcherToQAction:(id)sender
{
QScopedLoopLevelCounter loopLevelCounter(QApplicationPrivate::instance()->threadData);
diff --git a/src/gui/kernel/qcocoamenuloader_mac_p.h b/src/gui/kernel/qcocoamenuloader_mac_p.h
index 81c136eb87..a75ad0a21b 100644
--- a/src/gui/kernel/qcocoamenuloader_mac_p.h
+++ b/src/gui/kernel/qcocoamenuloader_mac_p.h
@@ -67,7 +67,9 @@
IBOutlet NSMenuItem *aboutQtItem;
IBOutlet NSMenuItem *hideItem;
NSMenuItem *lastAppSpecificItem;
-
+ NSMenuItem *servicesItem;
+ NSMenuItem *hideAllOthersItem;
+ NSMenuItem *showAllItem;
}
- (void)ensureAppMenuInMenu:(NSMenu *)menu;
- (void)removeActionsFromAppMenu;
@@ -85,6 +87,7 @@
- (IBAction)unhideAllApplications:(id)sender;
- (IBAction)hide:(id)sender;
- (IBAction)qtDispatcherToQAction:(id)sender;
+- (void)qtUpdateMenubar;
@end
#endif // QT_MAC_USE_COCOA
diff --git a/src/gui/kernel/qcocoapanel_mac.mm b/src/gui/kernel/qcocoapanel_mac.mm
index 5e24c84ac6..0b48efd432 100644
--- a/src/gui/kernel/qcocoapanel_mac.mm
+++ b/src/gui/kernel/qcocoapanel_mac.mm
@@ -46,6 +46,7 @@
#import <private/qcocoawindowdelegate_mac_p.h>
#import <private/qcocoaview_mac_p.h>
#import <private/qcocoawindowcustomthemeframe_mac_p.h>
+#import <private/qcocoaapplication_mac_p.h>
#include <private/qapplication_p.h>
#include <private/qbackingstore_p.h>
diff --git a/src/gui/kernel/qcocoapanel_mac_p.h b/src/gui/kernel/qcocoapanel_mac_p.h
index fc83bd892a..3678f81a32 100644
--- a/src/gui/kernel/qcocoapanel_mac_p.h
+++ b/src/gui/kernel/qcocoapanel_mac_p.h
@@ -54,10 +54,16 @@
#ifdef QT_MAC_USE_COCOA
#import <Cocoa/Cocoa.h>
+QT_FORWARD_DECLARE_CLASS(QStringList);
+
@interface QT_MANGLE_NAMESPACE(QCocoaPanel) : NSPanel {
bool leftButtonIsRightButton;
+ QStringList *currentCustomDragTypes;
}
+ (Class)frameViewClassForStyleMask:(NSUInteger)styleMask;
+- (void)registerDragTypes;
+
@end
#endif
+
diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
index d2b74d7420..9fe5ae08ce 100644
--- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
+++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
@@ -57,8 +57,32 @@
QT_BEGIN_NAMESPACE
extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm
extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp
+extern const QStringList& qEnabledDraggedTypes(); // qmime_mac.cpp
+extern bool qt_blockCocoaSettingModalWindowLevel; // qeventdispatcher_mac_p.h
+
+Q_GLOBAL_STATIC(QPointer<QWidget>, currentDragTarget);
+
QT_END_NAMESPACE
+- (id)initWithContentRect:(NSRect)contentRect
+ styleMask:(NSUInteger)windowStyle
+ backing:(NSBackingStoreType)bufferingType
+ defer:(BOOL)deferCreation
+{
+ self = [super initWithContentRect:contentRect styleMask:windowStyle
+ backing:bufferingType defer:deferCreation];
+ if (self) {
+ currentCustomDragTypes = 0;
+ }
+ return self;
+}
+
+- (void)dealloc
+{
+ delete currentCustomDragTypes;
+ [super dealloc];
+}
+
- (BOOL)canBecomeKeyWindow
{
QWidget *widget = [self QT_MANGLE_NAMESPACE(qt_qwidget)];
@@ -68,6 +92,40 @@ QT_END_NAMESPACE
return !(isPopup || isToolTip);
}
+- (BOOL)canBecomeMainWindow
+{
+ QWidget *widget = [self QT_MANGLE_NAMESPACE(qt_qwidget)];
+
+ bool isToolTip = (widget->windowType() == Qt::ToolTip);
+ bool isPopup = (widget->windowType() == Qt::Popup);
+ bool isTool = (widget->windowType() == Qt::Tool);
+ return !(isPopup || isToolTip || isTool);
+}
+
+- (void)orderWindow:(NSWindowOrderingMode)orderingMode relativeTo:(NSInteger)otherWindowNumber
+{
+ if (qt_blockCocoaSettingModalWindowLevel) {
+ // To avoid windows popping in front while restoring modal sessions
+ // in the event dispatcher, we block cocoa from ordering this window
+ // to front. The result of not doing this can be seen if executing
+ // a native color dialog on top of another executing dialog.
+ return;
+ }
+ [super orderWindow:orderingMode relativeTo:otherWindowNumber];
+}
+
+- (void)setLevel:(NSInteger)windowLevel
+{
+ if (qt_blockCocoaSettingModalWindowLevel) {
+ // To avoid windows popping in front while restoring modal sessions
+ // in the event dispatcher, we block cocoa from ordering this window
+ // to front. The result of not doing this can be seen if executing
+ // a native color dialog on top of another executing dialog.
+ return;
+ }
+ [super setLevel:windowLevel];
+}
+
- (void)toggleToolbarShown:(id)sender
{
macSendToolbarChangeEvent([self QT_MANGLE_NAMESPACE(qt_qwidget)]);
@@ -106,10 +164,37 @@ QT_END_NAMESPACE
qt_dispatchTabletProximityEvent(tabletEvent);
}
+- (void)qtDispatcherToQAction:(id)sender
+{
+ // If this window is modal, the menu bar will be modally shaddowed.
+ // In that case, since the window will be in the first responder chain,
+ // we can still catch the trigger here and forward it to the menu bar.
+ // This is needed as a single modal dialog on Qt should be able to access
+ // the application menu (e.g. quit).
+ [[NSApp QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)] qtDispatcherToQAction:sender];
+}
+
+- (void)terminate:(id)sender
+{
+ // This function is called from the quit item in the menubar when this window
+ // is in the first responder chain (see also qtDispatcherToQAction above)
+ [NSApp terminate:sender];
+}
+
- (void)sendEvent:(NSEvent *)event
{
- QWidget *widget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self];
+ if ([event type] == NSApplicationDefined) {
+ switch ([event subtype]) {
+ case QtCocoaEventSubTypePostMessage:
+ [NSApp qt_sendPostedMessage:event];
+ return;
+ default:
+ break;
+ }
+ return;
+ }
+ QWidget *widget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self];
// Cocoa can hold onto the window after we've disavowed its knowledge. So,
// if we get sent an event afterwards just have it go through the super's
// version and don't do any stuff with Qt.
@@ -133,7 +218,7 @@ QT_END_NAMESPACE
qt_button_down = widget;
handled = qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonPress, mouseButton);
// Don't call super here. This prevents us from getting the mouseUp event,
- // which we need to send even if the mouseDown event was not accepted.
+ // which we need to send even if the mouseDown event was not accepted.
// (this is standard Qt behavior.)
break;
case NSRightMouseDown:
@@ -188,6 +273,115 @@ QT_END_NAMESPACE
return [super frameViewClassForStyleMask:styleMask];
}
+-(void)registerDragTypes
+{
+ // Calling registerForDraggedTypes below is slow, so only do
+ // it once for each window, or when the custom types change.
+ QMacCocoaAutoReleasePool pool;
+ const QStringList& customTypes = qEnabledDraggedTypes();
+ if (currentCustomDragTypes == 0 || *currentCustomDragTypes != customTypes) {
+ if (currentCustomDragTypes == 0)
+ currentCustomDragTypes = new QStringList();
+ *currentCustomDragTypes = customTypes;
+ const NSString* mimeTypeGeneric = @"com.trolltech.qt.MimeTypeName";
+ NSMutableArray *supportedTypes = [NSMutableArray arrayWithObjects:NSColorPboardType,
+ NSFilenamesPboardType, NSStringPboardType,
+ NSFilenamesPboardType, NSPostScriptPboardType, NSTIFFPboardType,
+ NSRTFPboardType, NSTabularTextPboardType, NSFontPboardType,
+ NSRulerPboardType, NSFileContentsPboardType, NSColorPboardType,
+ NSRTFDPboardType, NSHTMLPboardType, NSPICTPboardType,
+ NSURLPboardType, NSPDFPboardType, NSVCardPboardType,
+ NSFilesPromisePboardType, NSInkTextPboardType,
+ NSMultipleTextSelectionPboardType, mimeTypeGeneric, nil];
+ // Add custom types supported by the application.
+ for (int i = 0; i < customTypes.size(); i++) {
+ [supportedTypes addObject:reinterpret_cast<const NSString *>(QCFString::toCFStringRef(customTypes[i]))];
+ }
+ [self registerForDraggedTypes:supportedTypes];
+ }
+}
+
+- (QWidget *)dragTargetHitTest:(id <NSDraggingInfo>)sender
+{
+ // Do a hittest to find the NSView under the
+ // mouse, and return the corresponding QWidget:
+ NSPoint windowPoint = [sender draggingLocation];
+ NSView *candidateView = [[self contentView] hitTest:windowPoint];
+ if (![candidateView isKindOfClass:[QT_MANGLE_NAMESPACE(QCocoaView) class]])
+ return 0;
+ return [static_cast<QT_MANGLE_NAMESPACE(QCocoaView) *>(candidateView) qt_qwidget];
+}
+
+- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
+{
+ // The user dragged something into the window. Send a draggingEntered message
+ // to the QWidget under the mouse. As the drag moves over the window, and over
+ // different widgets, we will handle enter and leave events from within
+ // draggingUpdated below. The reason why we handle this ourselves rather than
+ // subscribing for drag events directly in QCocoaView is that calling
+ // registerForDraggedTypes on the views will severly degrade initialization time
+ // for an application that uses a lot of drag subscribing widgets.
+
+ QWidget *target = [self dragTargetHitTest:sender];
+ if (!target)
+ return [super draggingEntered:sender];
+ if (target->testAttribute(Qt::WA_DropSiteRegistered) == false)
+ return NSDragOperationNone;
+
+ *currentDragTarget() = target;
+ return [reinterpret_cast<NSView *>((*currentDragTarget())->winId()) draggingEntered:sender];
+ }
+
+- (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender
+{
+ QWidget *target = [self dragTargetHitTest:sender];
+ if (!target)
+ return [super draggingUpdated:sender];
+
+ if (target == *currentDragTarget()) {
+ // The drag continues to move over the widget that we have sendt
+ // a draggingEntered message to. So just update the view:
+ return [reinterpret_cast<NSView *>((*currentDragTarget())->winId()) draggingUpdated:sender];
+ } else {
+ // The widget under the mouse has changed.
+ // So we need to fake enter/leave events:
+ if (*currentDragTarget())
+ [reinterpret_cast<NSView *>((*currentDragTarget())->winId()) draggingExited:sender];
+ if (target->testAttribute(Qt::WA_DropSiteRegistered) == false) {
+ *currentDragTarget() = 0;
+ return NSDragOperationNone;
+ }
+ *currentDragTarget() = target;
+ return [reinterpret_cast<NSView *>((*currentDragTarget())->winId()) draggingEntered:sender];
+ }
+}
+
+- (void)draggingExited:(id < NSDraggingInfo >)sender
+{
+ QWidget *target = [self dragTargetHitTest:sender];
+ if (!target)
+ return [super draggingExited:sender];
+
+ if (*currentDragTarget()) {
+ [reinterpret_cast<NSView *>((*currentDragTarget())->winId()) draggingExited:sender];
+ *currentDragTarget() = 0;
+ }
+}
+
+- (BOOL)performDragOperation:(id < NSDraggingInfo >)sender
+{
+ QWidget *target = [self dragTargetHitTest:sender];
+ if (!target)
+ return [super performDragOperation:sender];
+
+ BOOL dropResult = NO;
+ if (*currentDragTarget()) {
+ dropResult = [reinterpret_cast<NSView *>((*currentDragTarget())->winId()) performDragOperation:sender];
+ *currentDragTarget() = 0;
+ }
+ return dropResult;
+}
+
- (void)displayIfNeeded
{
@@ -203,5 +397,3 @@ QT_END_NAMESPACE
}
[super displayIfNeeded];
}
-
-
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index ad64a91251..f7cb21f0b0 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -81,24 +81,9 @@ Q_GLOBAL_STATIC(DnDParams, qMacDnDParams);
extern void qt_mac_update_cursor_at_global_pos(const QPoint &globalPos); // qcursor_mac.mm
extern bool qt_sendSpontaneousEvent(QObject *, QEvent *); // qapplication.cpp
extern OSViewRef qt_mac_nativeview_for(const QWidget *w); // qwidget_mac.mm
-extern const QStringList& qEnabledDraggedTypes(); // qmime_mac.cpp
extern QPointer<QWidget> qt_mouseover; //qapplication_mac.mm
extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp
-
-Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum)
-{
- if (buttonNum == 0)
- return Qt::LeftButton;
- if (buttonNum == 1)
- return Qt::RightButton;
- if (buttonNum == 2)
- return Qt::MidButton;
- if (buttonNum == 3)
- return Qt::XButton1;
- if (buttonNum == 4)
- return Qt::XButton2;
- return Qt::NoButton;
-}
+extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum);
struct dndenum_mapper
{
@@ -200,6 +185,9 @@ extern "C" {
extern NSString *NSTextInputReplacementRangeAttributeName;
}
+#ifdef ALIEN_DEBUG
+static int qCocoaViewCount = 0;
+#endif
@implementation QT_MANGLE_NAMESPACE(QCocoaView)
@@ -210,9 +198,14 @@ extern "C" {
[self finishInitWithQWidget:widget widgetPrivate:widgetprivate];
}
composingText = new QString();
+
+#ifdef ALIEN_DEBUG
+ ++qCocoaViewCount;
+ qDebug() << "init: qCocoaViewCount is" << qCocoaViewCount;
+#endif
+
composing = false;
sendKeyEvents = true;
- currentCustomTypes = 0;
[self setHidden:YES];
return self;
}
@@ -227,36 +220,12 @@ extern "C" {
object:self];
}
--(void)registerDragTypes
-{
- QMacCocoaAutoReleasePool pool;
- // Calling registerForDraggedTypes is slow, so only do it once for each widget
- // or when the custom types change.
- const QStringList& customTypes = qEnabledDraggedTypes();
- if (currentCustomTypes == 0 || *currentCustomTypes != customTypes) {
- if (currentCustomTypes == 0)
- currentCustomTypes = new QStringList();
- *currentCustomTypes = customTypes;
- const NSString* mimeTypeGeneric = @"com.trolltech.qt.MimeTypeName";
- NSMutableArray *supportedTypes = [NSMutableArray arrayWithObjects:NSColorPboardType,
- NSFilenamesPboardType, NSStringPboardType,
- NSFilenamesPboardType, NSPostScriptPboardType, NSTIFFPboardType,
- NSRTFPboardType, NSTabularTextPboardType, NSFontPboardType,
- NSRulerPboardType, NSFileContentsPboardType, NSColorPboardType,
- NSRTFDPboardType, NSHTMLPboardType, NSPICTPboardType,
- NSURLPboardType, NSPDFPboardType, NSVCardPboardType,
- NSFilesPromisePboardType, NSInkTextPboardType,
- NSMultipleTextSelectionPboardType, mimeTypeGeneric, nil];
- // Add custom types supported by the application.
- for (int i = 0; i < customTypes.size(); i++) {
- [supportedTypes addObject:reinterpret_cast<const NSString *>(QCFString::toCFStringRef(customTypes[i]))];
- }
- [self registerForDraggedTypes:supportedTypes];
- }
-}
-
- (void)resetCursorRects
{
+ // [NSView addCursorRect] is slow, so bail out early if we can:
+ if (NSIsEmptyRect([self visibleRect]))
+ return;
+
QWidget *cursorWidget = qwidget;
if (cursorWidget->testAttribute(Qt::WA_TransparentForMouseEvents))
@@ -300,15 +269,9 @@ extern "C" {
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
{
- if (qwidget->testAttribute(Qt::WA_DropSiteRegistered) == false)
- return NSDragOperationNone;
+ // NB: This function is called from QCoocaWindow/QCocoaPanel rather than directly
+ // from Cocoa. They modify the drag target, and might fake enter/leave events.
NSPoint windowPoint = [sender draggingLocation];
- if (qwidget->testAttribute(Qt::WA_TransparentForMouseEvents)) {
- // pass the drag enter event to the view underneath.
- NSView *candidateView = [[[self window] contentView] hitTest:windowPoint];
- if (candidateView && candidateView != self)
- return [candidateView draggingEntered:sender];
- }
dragEnterSequence = [sender draggingSequenceNumber];
[self addDropData:sender];
QMimeData *mimeData = dropData;
@@ -361,13 +324,9 @@ extern "C" {
}
- (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender
{
+ // NB: This function is called from QCoocaWindow/QCocoaPanel rather than directly
+ // from Cocoa. They modify the drag target, and might fake enter/leave events.
NSPoint windowPoint = [sender draggingLocation];
- if (qwidget->testAttribute(Qt::WA_TransparentForMouseEvents)) {
- // pass the drag move event to the view underneath.
- NSView *candidateView = [[[self window] contentView] hitTest:windowPoint];
- if (candidateView && candidateView != self)
- return [candidateView draggingUpdated:sender];
- }
// in cases like QFocusFrame, the view under the mouse might
// not have received the drag enter. Generate a synthetic
// drag enter event for that view.
@@ -417,14 +376,10 @@ extern "C" {
- (void)draggingExited:(id < NSDraggingInfo >)sender
{
+ // NB: This function is called from QCoocaWindow/QCocoaPanel rather than directly
+ // from Cocoa. They modify the drag target, and might fake enter/leave events.
+ Q_UNUSED(sender);
dragEnterSequence = -1;
- if (qwidget->testAttribute(Qt::WA_TransparentForMouseEvents)) {
- // try sending the leave event to the last view which accepted drag enter.
- DnDParams *dndParams = [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent];
- NSView *candidateView = [[[self window] contentView] hitTest:dndParams->activeDragEnterPos];
- if (candidateView && candidateView != self)
- return [candidateView draggingExited:sender];
- }
// drag enter event was rejected, so ignore the move event.
if (dropData) {
QDragLeaveEvent de;
@@ -435,14 +390,10 @@ extern "C" {
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
+ // NB: This function is called from QCoocaWindow/QCocoaPanel rather than directly
+ // from Cocoa. They modify the drag target, and might fake enter/leave events.
NSPoint windowPoint = [sender draggingLocation];
dragEnterSequence = -1;
- if (qwidget->testAttribute(Qt::WA_TransparentForMouseEvents)) {
- // pass the drop event to the view underneath.
- NSView *candidateView = [[[self window] contentView] hitTest:windowPoint];
- if (candidateView && candidateView != self)
- return [candidateView performDragOperation:sender];
- }
[self addDropData:sender];
NSPoint globalPoint = [[sender draggingDestinationWindow] convertBaseToScreen:windowPoint];
@@ -472,13 +423,19 @@ extern "C" {
{
delete composingText;
[[NSNotificationCenter defaultCenter] removeObserver:self];
- delete currentCustomTypes;
- [self unregisterDraggedTypes];
+
+#ifdef ALIEN_DEBUG
+ --qCocoaViewCount;
+ qDebug() << "qCocoaViewCount is" << qCocoaViewCount;
+#endif
+
[super dealloc];
}
- (BOOL)isOpaque;
{
+ if (!qwidgetprivate)
+ return [super isOpaque];
return qwidgetprivate->isOpaque;
}
@@ -510,7 +467,7 @@ extern "C" {
}
// Make sure the opengl context is updated on resize.
- if (qwidgetprivate->isGLWidget) {
+ if (qwidgetprivate && qwidgetprivate->isGLWidget) {
qwidgetprivate->needWindowChange = true;
QEvent event(QEvent::MacGLWindowChange);
qApp->sendEvent(qwidget, &event);
@@ -519,11 +476,15 @@ extern "C" {
- (void)drawRect:(NSRect)aRect
{
+ if (!qwidget)
+ return;
+
if (QApplicationPrivate::graphicsSystem() != 0) {
if (QWidgetBackingStore *bs = qwidgetprivate->maybeBackingStore()) {
// Drawing is handled on the window level
- // See qcocoasharedwindowmethods_mac_p.
- return;
+ // See qcocoasharedwindowmethods_mac_p.h
+ if (!qwidget->testAttribute(Qt::WA_PaintOnScreen))
+ return;
}
}
CGContextRef cg = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
@@ -535,7 +496,15 @@ extern "C" {
qWarning("QWidget::repaint: Recursive repaint detected");
const QRect qrect = QRect(aRect.origin.x, aRect.origin.y, aRect.size.width, aRect.size.height);
- QRegion qrgn(qrect);
+ QRegion qrgn;
+
+ const NSRect *rects;
+ NSInteger count;
+ [self getRectsBeingDrawn:&rects count:&count];
+ for (int i = 0; i < count; ++i) {
+ QRect tmpRect = QRect(rects[i].origin.x, rects[i].origin.y, rects[i].size.width, rects[i].size.height);
+ qrgn += tmpRect;
+ }
if (!qwidget->isWindow() && !qobject_cast<QAbstractScrollArea *>(qwidget->parent())) {
const QRegion &parentMask = qwidget->window()->mask();
@@ -569,6 +538,10 @@ extern "C" {
CGContextClearRect(cg, NSRectToCGRect(aRect));
}
+ // Check for alien widgets, use qwidgetPrivate->drawWidget() to draw the widget if this
+ // is the case. This makes sure child widgets are drawn as well, Cocoa does not know about
+ // those and wont send them drawRect calls.
+ if (qwidget->testAttribute(Qt::WA_NativeWindow) && qt_widget_private(qwidget)->hasAlienChildren == false) {
if (engine && !qwidget->testAttribute(Qt::WA_NoSystemBackground)
&& (qwidget->isWindow() || qwidget->autoFillBackground())
|| qwidget->testAttribute(Qt::WA_TintedBackground)
@@ -588,6 +561,12 @@ extern "C" {
e.setErased(true);
#endif
qt_sendSpontaneousEvent(qwidget, &e);
+ } else {
+ qwidget->setAttribute(Qt::WA_WState_InPaintEvent, false); // QWidgetPrivate::drawWidget sets this
+ QWidgetPrivate *qwidgetPrivate = qt_widget_private(qwidget);
+ qwidgetPrivate->drawWidget(qwidget, qrgn, QPoint(), QWidgetPrivate::DrawAsRoot | QWidgetPrivate::DrawPaintOnScreen | QWidgetPrivate::DrawRecursive, 0);
+ }
+
if (!redirectionOffset.isNull())
QPainter::restoreRedirected(qwidget);
if (engine)
@@ -603,12 +582,18 @@ extern "C" {
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
{
+ if (!qwidget)
+ return NO;
+
Q_UNUSED(theEvent);
return !qwidget->testAttribute(Qt::WA_MacNoClickThrough);
}
- (NSView *)hitTest:(NSPoint)aPoint
{
+ if (!qwidget)
+ return [super hitTest:aPoint];
+
if (qwidget->testAttribute(Qt::WA_TransparentForMouseEvents))
return nil; // You cannot hit a transparent for mouse event widget.
return [super hitTest:aPoint];
@@ -616,6 +601,13 @@ extern "C" {
- (void)updateTrackingAreas
{
+ if (!qwidget)
+ return;
+
+ // [NSView addTrackingArea] is slow, so bail out early if we can:
+ if (NSIsEmptyRect([self visibleRect]))
+ return;
+
QMacCocoaAutoReleasePool pool;
if (NSArray *trackingArray = [self trackingAreas]) {
NSUInteger size = [trackingArray count];
@@ -645,6 +637,9 @@ extern "C" {
- (void)mouseEntered:(NSEvent *)event
{
+ if (!qwidget)
+ return;
+
if (qwidgetprivate->data.in_destructor)
return;
QEvent enterEvent(QEvent::Enter);
@@ -667,6 +662,9 @@ extern "C" {
- (void)mouseExited:(NSEvent *)event
{
+ if (!qwidget)
+ return;
+
QEvent leaveEvent(QEvent::Leave);
NSPoint globalPoint = [[event window] convertBaseToScreen:[event locationInWindow]];
if (!qAppInstance()->activeModalWidget() || QApplicationPrivate::tryModalHelper(qwidget, 0)) {
@@ -685,6 +683,9 @@ extern "C" {
- (void)flagsChanged:(NSEvent *)theEvent
{
+ if (!qwidget)
+ return;
+
QWidget *widgetToGetKey = qwidget;
QWidget *popup = qAppInstance()->activePopupWidget();
@@ -696,6 +697,9 @@ extern "C" {
- (void)mouseMoved:(NSEvent *)theEvent
{
+ if (!qwidget)
+ return;
+
// We always enable mouse tracking for all QCocoaView-s. In cases where we have
// child views, we will receive mouseMoved for both parent & the child (if
// mouse is over the child). We need to ignore the parent mouseMoved in such
@@ -986,6 +990,8 @@ extern "C" {
- (void)frameDidChange:(NSNotification *)note
{
Q_UNUSED(note);
+ if (!qwidget)
+ return;
if (qwidget->isWindow())
return;
NSRect newFrame = [self frame];
@@ -1009,7 +1015,7 @@ extern "C" {
{
QMacCocoaAutoReleasePool pool;
[super setEnabled:flag];
- if (qwidget->isEnabled() != flag)
+ if (qwidget && qwidget->isEnabled() != flag)
qwidget->setEnabled(flag);
}
@@ -1020,13 +1026,20 @@ extern "C" {
- (BOOL)acceptsFirstResponder
{
- if (qwidget->isWindow())
+ if (!qwidget)
+ return NO;
+ // Before accepting the focus for a window, we check that
+ // the focusWidget (if any) is not contained in the same window.
+ if (qwidget->isWindow() && (!qApp->focusWidget()
+ || qApp->focusWidget()->window() != qwidget))
return YES; // Always do it, so that windows can accept key press events.
return qwidget->focusPolicy() != Qt::NoFocus;
}
- (BOOL)resignFirstResponder
{
+ if (!qwidget)
+ return NO;
// Seems like the following test only triggers if this
// view is inside a QMacNativeWidget:
if (qwidget == QApplication::focusWidget())
@@ -1062,6 +1075,12 @@ extern "C" {
return qwidget;
}
+- (void) qt_clearQWidget
+{
+ qwidget = 0;
+ qwidgetprivate = 0;
+}
+
- (BOOL)qt_leftButtonIsRightButton
{
return leftButtonIsRightButton;
@@ -1115,9 +1134,11 @@ extern "C" {
- (void)viewWillMoveToWindow:(NSWindow *)window
{
+ if (qwidget == 0)
+ return;
+
if (qwidget->windowFlags() & Qt::MSWindowsOwnDC
&& (window != [self window])) { // OpenGL Widget
- // Create a stupid ClearDrawable Event
QEvent event(QEvent::MacGLClearDrawable);
qApp->sendEvent(qwidget, &event);
}
@@ -1125,6 +1146,9 @@ extern "C" {
- (void)viewDidMoveToWindow
{
+ if (qwidget == 0)
+ return;
+
if (qwidget->windowFlags() & Qt::MSWindowsOwnDC && [self window]) {
// call update paint event
qwidgetprivate->needWindowChange = true;
@@ -1320,6 +1344,9 @@ extern "C" {
- (NSArray*) validAttributesForMarkedText
{
+ if (qwidget == 0)
+ return nil;
+
if (!qwidget->testAttribute(Qt::WA_InputMethodEnabled))
return nil; // Not sure if that's correct, but it's saves a malloc.
diff --git a/src/gui/kernel/qcocoaview_mac_p.h b/src/gui/kernel/qcocoaview_mac_p.h
index 797b4d5b2a..33aaa24f8b 100644
--- a/src/gui/kernel/qcocoaview_mac_p.h
+++ b/src/gui/kernel/qcocoaview_mac_p.h
@@ -87,7 +87,6 @@ Q_GUI_EXPORT
int composingLength;
bool sendKeyEvents;
QString *composingText;
- QStringList *currentCustomTypes;
NSInteger dragEnterSequence;
}
- (id)initWithQWidget:(QWidget *)widget widgetPrivate:(QWidgetPrivate *)widgetprivate;
@@ -97,7 +96,6 @@ Q_GUI_EXPORT
- (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender;
- (void)draggingExited:(id < NSDraggingInfo >)sender;
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
-- (void)registerDragTypes;
- (void)removeDropData;
- (void)addDropData:(id <NSDraggingInfo>)sender;
- (void)setSupportedActions:(NSDragOperation)actions;
@@ -105,6 +103,7 @@ Q_GUI_EXPORT
- (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation;
- (BOOL)isComposing;
- (QWidget *)qt_qwidget;
+- (void) qt_clearQWidget;
- (BOOL)qt_leftButtonIsRightButton;
- (void)qt_setLeftButtonIsRightButton:(BOOL)isSwapped;
+ (DnDParams*)currentMouseEvent;
diff --git a/src/gui/kernel/qcocoawindow_mac.mm b/src/gui/kernel/qcocoawindow_mac.mm
index a644dfebfe..f1b642b50c 100644
--- a/src/gui/kernel/qcocoawindow_mac.mm
+++ b/src/gui/kernel/qcocoawindow_mac.mm
@@ -46,6 +46,7 @@
#import <private/qcocoaview_mac_p.h>
#import <private/qt_cocoa_helpers_mac_p.h>
#import <private/qcocoawindowcustomthemeframe_mac_p.h>
+#import <private/qcocoaapplication_mac_p.h>
#include <QtGui/QWidget>
diff --git a/src/gui/kernel/qcocoawindow_mac_p.h b/src/gui/kernel/qcocoawindow_mac_p.h
index 04748822ce..21f82df078 100644
--- a/src/gui/kernel/qcocoawindow_mac_p.h
+++ b/src/gui/kernel/qcocoawindow_mac_p.h
@@ -73,9 +73,12 @@ QT_FORWARD_DECLARE_CLASS(QStringList);
@interface QT_MANGLE_NAMESPACE(QCocoaWindow) : NSWindow {
bool leftButtonIsRightButton;
+ QStringList *currentCustomDragTypes;
}
+ (Class)frameViewClassForStyleMask:(NSUInteger)styleMask;
+- (void)registerDragTypes;
+
@end
#endif
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac.mm b/src/gui/kernel/qcocoawindowdelegate_mac.mm
index db8749190a..24498f8cc0 100644
--- a/src/gui/kernel/qcocoawindowdelegate_mac.mm
+++ b/src/gui/kernel/qcocoawindowdelegate_mac.mm
@@ -269,9 +269,6 @@ static void cleanupCocoaWindowDelegate()
{
QWidget *qwidget = m_windowHash->value([notification object]);
Q_ASSERT(qwidget);
- if (qwidget->isActiveWindow())
- return; // Widget is already active, no need to go through re-activation.
-
onApplicationWindowChangedActivation(qwidget, true);
}
@@ -288,10 +285,6 @@ static void cleanupCocoaWindowDelegate()
{
QWidget *qwidget = m_windowHash->value([notification object]);
Q_ASSERT(qwidget);
- if (qwidget->isActiveWindow())
- return; // Widget is already active, no need to go through re-activation
-
-
onApplicationWindowChangedActivation(qwidget, true);
}
diff --git a/src/gui/kernel/qcursor.cpp b/src/gui/kernel/qcursor.cpp
index 6b21d56b5f..ae1f60d756 100644
--- a/src/gui/kernel/qcursor.cpp
+++ b/src/gui/kernel/qcursor.cpp
@@ -141,6 +141,12 @@ QT_BEGIN_NAMESPACE
\o Qt::WhatsThisCursor \o \c whats_this
\o \inlineimage cursor-closedhand.png
\o Qt::ClosedHandCursor \o \c closedhand
+ \row \o
+ \o Qt::DragMoveCursor \o \c dnd-move or \c move
+ \o
+ \o Qt::DragCopyCursor \o \c dnd-copy or \c copy
+ \row \o
+ \o Qt::DragLinkCursor \o \c dnd-link or \c link
\endtable
\sa QWidget, {fowler}{GUI Design Handbook: Cursors}
diff --git a/src/gui/kernel/qcursor_mac.mm b/src/gui/kernel/qcursor_mac.mm
index 48bb9cc709..03e38b0600 100644
--- a/src/gui/kernel/qcursor_mac.mm
+++ b/src/gui/kernel/qcursor_mac.mm
@@ -114,27 +114,18 @@ void qt_mac_set_cursor(const QCursor *c, const QPoint &)
}
c->handle(); //force the cursor to get loaded, if it's not
- if(1 || currentCursor != c->d) {
- if(currentCursor && currentCursor->type == QCursorData::TYPE_ThemeCursor
- && currentCursor->curs.tc.anim)
- currentCursor->curs.tc.anim->stop();
- QMacCocoaAutoReleasePool pool;
- if(c->d->type == QCursorData::TYPE_ImageCursor) {
- [static_cast<NSCursor *>(c->d->curs.cp.nscursor) set];
- } else if(c->d->type == QCursorData::TYPE_ThemeCursor) {
-#ifdef QT_MAC_USE_COCOA
- if (c->d->curs.cp.nscursor == 0)
- [[NSCursor arrowCursor] set];
- [static_cast<NSCursor *>(c->d->curs.cp.nscursor) set];
-#else
- if(SetAnimatedThemeCursor(c->d->curs.tc.curs, 0) == themeBadCursorIndexErr) {
- SetThemeCursor(c->d->curs.tc.curs);
- } else {
- if(!c->d->curs.tc.anim)
- c->d->curs.tc.anim = new QMacAnimateCursor;
- c->d->curs.tc.anim->start(c->d->curs.tc.curs);
- }
-#endif
+ if(currentCursor && currentCursor->type == QCursorData::TYPE_ThemeCursor
+ && currentCursor->curs.tc.anim)
+ currentCursor->curs.tc.anim->stop();
+ if(c->d->type == QCursorData::TYPE_ImageCursor) {
+ [static_cast<NSCursor *>(c->d->curs.cp.nscursor) set];
+ } else if(c->d->type == QCursorData::TYPE_ThemeCursor) {
+ if(SetAnimatedThemeCursor(c->d->curs.tc.curs, 0) == themeBadCursorIndexErr) {
+ SetThemeCursor(c->d->curs.tc.curs);
+ } else {
+ if(!c->d->curs.tc.anim)
+ c->d->curs.tc.anim = new QMacAnimateCursor;
+ c->d->curs.tc.anim->start(c->d->curs.tc.curs);
}
}
currentCursor = c->d;
@@ -424,6 +415,18 @@ void QCursorData::update()
type = QCursorData::TYPE_ThemeCursor;
curs.cp.nscursor = [NSCursor closedHandCursor];
break;
+ case Qt::DragCopyCursor:
+ type = QCursorData::TYPE_ThemeCursor;
+ curs.cp.nscursor = [NSCursor dragCopyCursor];
+ break;
+ case Qt::DragMoveCursor:
+ type = QCursorData::TYPE_ThemeCursor;
+ curs.cp.nscursor = [NSCursor arrowCursor];
+ break;
+ case Qt::DragLinkCursor:
+ type = QCursorData::TYPE_ThemeCursor;
+ curs.cp.nscursor = [NSCursor dragLinkCursor];
+ break;
#define QT_USE_APPROXIMATE_CURSORS
#ifdef QT_USE_APPROXIMATE_CURSORS
case Qt::SizeVerCursor:
@@ -519,6 +522,18 @@ void QCursorData::update()
type = QCursorData::TYPE_ThemeCursor;
curs.tc.curs = kThemeClosedHandCursor;
break;
+ case Qt::DragMoveCursor:
+ type = QCursorData::TYPE_ThemeCursor;
+ curs.tc.curs = kThemeArrowCursor;
+ break;
+ case Qt::DragCopyCursor:
+ type = QCursorData::TYPE_ThemeCursor;
+ curs.tc.curs = kThemeCopyArrowCursor;
+ break;
+ case Qt::DragLinkCursor:
+ type = QCursorData::TYPE_ThemeCursor;
+ curs.tc.curs = kThemeAliasArrowCursor;
+ break;
#define QT_USE_APPROXIMATE_CURSORS
#ifdef QT_USE_APPROXIMATE_CURSORS
case Qt::SizeVerCursor:
diff --git a/src/gui/kernel/qcursor_win.cpp b/src/gui/kernel/qcursor_win.cpp
index 6f651d4fab..ae1c004e39 100644
--- a/src/gui/kernel/qcursor_win.cpp
+++ b/src/gui/kernel/qcursor_win.cpp
@@ -47,6 +47,7 @@
#include <qimage.h>
#include <qt_windows.h>
+#include <private/qapplication_p.h>
QT_BEGIN_NAMESPACE
@@ -470,6 +471,12 @@ void QCursorData::update()
#endif
return;
}
+ case Qt::DragCopyCursor:
+ case Qt::DragMoveCursor:
+ case Qt::DragLinkCursor: {
+ QPixmap pixmap = QApplicationPrivate::instance()->getPixmapCursor(cshape);
+ hcurs = create32BitCursor(pixmap, hx, hy);
+ }
default:
qWarning("QCursor::update: Invalid cursor shape %d", cshape);
return;
diff --git a/src/gui/kernel/qcursor_x11.cpp b/src/gui/kernel/qcursor_x11.cpp
index 3e833638a2..4e871a6e1f 100644
--- a/src/gui/kernel/qcursor_x11.cpp
+++ b/src/gui/kernel/qcursor_x11.cpp
@@ -39,9 +39,11 @@
**
****************************************************************************/
+#include <qdebug.h>
#include <qdatastream.h>
#include <private/qcursor_p.h>
#include <private/qt_x11_p.h>
+#include <private/qapplication_p.h>
#include <qbitmap.h>
#include <qcursor.h>
#include <X11/cursorfont.h>
@@ -57,6 +59,7 @@
#endif // QT_NO_XFIXES
#include "qx11info_x11.h"
+#include <private/qpixmap_x11_p.h>
QT_BEGIN_NAMESPACE
@@ -262,12 +265,31 @@ void QCursorData::update()
"whats_this",
"left_ptr_watch",
"openhand",
- "closedhand"
+ "closedhand",
+ "copy",
+ "move",
+ "link"
};
#ifndef QT_NO_XCURSOR
- if (X11->ptrXcursorLibraryLoadCursor)
- hcurs = X11->ptrXcursorLibraryLoadCursor(dpy, cursorNames[cshape]);
+ if (X11->ptrXcursorLibraryLoadCursor) {
+ // special case for non-standard dnd-* cursors
+ switch (cshape) {
+ case Qt::DragCopyCursor:
+ hcurs = X11->ptrXcursorLibraryLoadCursor(dpy, "dnd-copy");
+ break;
+ case Qt::DragMoveCursor:
+ hcurs = X11->ptrXcursorLibraryLoadCursor(dpy, "dnd-move");
+ break;
+ case Qt::DragLinkCursor:
+ hcurs = X11->ptrXcursorLibraryLoadCursor(dpy, "dnd-link");
+ break;
+ default:
+ break;
+ }
+ if (!hcurs)
+ hcurs = X11->ptrXcursorLibraryLoadCursor(dpy, cursorNames[cshape]);
+ }
if (hcurs)
return;
#endif // QT_NO_XCURSOR
@@ -504,6 +526,19 @@ void QCursorData::update()
pm = XCreateBitmapFromData(dpy, rootwin, open ? openhand_bits : closedhand_bits, 16, 16);
pmm = XCreateBitmapFromData(dpy, rootwin, open ? openhandm_bits : closedhandm_bits, 16, 16);
hcurs = XCreatePixmapCursor(dpy, pm, pmm, &fg, &bg, 8, 8);
+ } else if (cshape == Qt::DragCopyCursor || cshape == Qt::DragMoveCursor
+ || cshape == Qt::DragLinkCursor) {
+ XColor bg, fg;
+ bg.red = 255 << 8;
+ bg.green = 255 << 8;
+ bg.blue = 255 << 8;
+ fg.red = 0;
+ fg.green = 0;
+ fg.blue = 0;
+ QImage image = QApplicationPrivate::instance()->getPixmapCursor(cshape).toImage();
+ pm = QX11PixmapData::createBitmapFromImage(image);
+ pmm = QX11PixmapData::createBitmapFromImage(image.createAlphaMask().convertToFormat(QImage::Format_MonoLSB));
+ hcurs = XCreatePixmapCursor(dpy, pm, pmm, &fg, &bg, 8, 8);
}
if (hcurs)
@@ -577,6 +612,15 @@ void QCursorData::update()
case Qt::BusyCursor:
sh = XC_watch;
break;
+ case Qt::DragCopyCursor:
+ sh = XC_tcross;
+ break;
+ case Qt::DragLinkCursor:
+ sh = XC_center_ptr;
+ break;
+ case Qt::DragMoveCursor:
+ sh = XC_top_left_arrow;
+ break;
#endif /* QT_USE_APPROXIMATE_CURSORS */
default:
qWarning("QCursor::update: Invalid cursor shape %d", cshape);
diff --git a/src/gui/kernel/qdesktopwidget_win.cpp b/src/gui/kernel/qdesktopwidget_win.cpp
index 1fea8d64d3..07dbc24b91 100644
--- a/src/gui/kernel/qdesktopwidget_win.cpp
+++ b/src/gui/kernel/qdesktopwidget_win.cpp
@@ -76,7 +76,7 @@ public:
};
typedef BOOL (WINAPI *InfoFunc)(HMONITOR, MONITORINFO*);
- typedef BOOL (CALLBACK *EnumProc)(HMONITOR, HDC, LPRECT, LPARAM);
+ typedef BOOL (QT_WIN_CALLBACK *EnumProc)(HMONITOR, HDC, LPRECT, LPARAM);
typedef BOOL (WINAPI *EnumFunc)(HDC, LPCRECT, EnumProc, LPARAM);
static EnumFunc enumDisplayMonitors;
@@ -107,7 +107,7 @@ static inline void qt_get_sip_info(QRect &rect)
#endif
-BOOL CALLBACK enumCallback(HMONITOR hMonitor, HDC, LPRECT, LPARAM)
+BOOL QT_WIN_CALLBACK enumCallback(HMONITOR hMonitor, HDC, LPRECT, LPARAM)
{
QDesktopWidgetPrivate::screenCount++;
QDesktopWidgetPrivate::rects->resize(QDesktopWidgetPrivate::screenCount);
diff --git a/src/gui/kernel/qdnd.cpp b/src/gui/kernel/qdnd.cpp
index 21438a8b8a..2b3a3d08c1 100644
--- a/src/gui/kernel/qdnd.cpp
+++ b/src/gui/kernel/qdnd.cpp
@@ -60,204 +60,12 @@
#include "qdebug.h"
#include <ctype.h>
+#include <private/qapplication_p.h>
+
#ifndef QT_NO_DRAGANDDROP
QT_BEGIN_NAMESPACE
-// These pixmaps approximate the images in the Windows User Interface Guidelines.
-
-// XPM
-
-static const char * const move_xpm[] = {
-"11 20 3 1",
-". c None",
-#if defined(Q_WS_WIN)
-"a c #000000",
-"X c #FFFFFF", // Windows cursor is traditionally white
-#else
-"a c #FFFFFF",
-"X c #000000", // X11 cursor is traditionally black
-#endif
-"aa.........",
-"aXa........",
-"aXXa.......",
-"aXXXa......",
-"aXXXXa.....",
-"aXXXXXa....",
-"aXXXXXXa...",
-"aXXXXXXXa..",
-"aXXXXXXXXa.",
-"aXXXXXXXXXa",
-"aXXXXXXaaaa",
-"aXXXaXXa...",
-"aXXaaXXa...",
-"aXa..aXXa..",
-"aa...aXXa..",
-"a.....aXXa.",
-"......aXXa.",
-".......aXXa",
-".......aXXa",
-"........aa."};
-
-#ifdef Q_WS_WIN
-/* XPM */
-static const char * const ignore_xpm[] = {
-"24 30 3 1",
-". c None",
-"a c #000000",
-"X c #FFFFFF",
-"aa......................",
-"aXa.....................",
-"aXXa....................",
-"aXXXa...................",
-"aXXXXa..................",
-"aXXXXXa.................",
-"aXXXXXXa................",
-"aXXXXXXXa...............",
-"aXXXXXXXXa..............",
-"aXXXXXXXXXa.............",
-"aXXXXXXaaaa.............",
-"aXXXaXXa................",
-"aXXaaXXa................",
-"aXa..aXXa...............",
-"aa...aXXa...............",
-"a.....aXXa..............",
-"......aXXa.....XXXX.....",
-".......aXXa..XXaaaaXX...",
-".......aXXa.XaaaaaaaaX..",
-"........aa.XaaaXXXXaaaX.",
-"...........XaaaaX..XaaX.",
-"..........XaaXaaaX..XaaX",
-"..........XaaXXaaaX.XaaX",
-"..........XaaX.XaaaXXaaX",
-"..........XaaX..XaaaXaaX",
-"...........XaaX..XaaaaX.",
-"...........XaaaXXXXaaaX.",
-"............XaaaaaaaaX..",
-".............XXaaaaXX...",
-"...............XXXX....."};
-#endif
-
-/* XPM */
-static const char * const copy_xpm[] = {
-"24 30 3 1",
-". c None",
-"a c #000000",
-"X c #FFFFFF",
-#if defined(Q_WS_WIN) // Windows cursor is traditionally white
-"aa......................",
-"aXa.....................",
-"aXXa....................",
-"aXXXa...................",
-"aXXXXa..................",
-"aXXXXXa.................",
-"aXXXXXXa................",
-"aXXXXXXXa...............",
-"aXXXXXXXXa..............",
-"aXXXXXXXXXa.............",
-"aXXXXXXaaaa.............",
-"aXXXaXXa................",
-"aXXaaXXa................",
-"aXa..aXXa...............",
-"aa...aXXa...............",
-"a.....aXXa..............",
-"......aXXa..............",
-".......aXXa.............",
-".......aXXa.............",
-"........aa...aaaaaaaaaaa",
-#else
-"XX......................",
-"XaX.....................",
-"XaaX....................",
-"XaaaX...................",
-"XaaaaX..................",
-"XaaaaaX.................",
-"XaaaaaaX................",
-"XaaaaaaaX...............",
-"XaaaaaaaaX..............",
-"XaaaaaaaaaX.............",
-"XaaaaaaXXXX.............",
-"XaaaXaaX................",
-"XaaXXaaX................",
-"XaX..XaaX...............",
-"XX...XaaX...............",
-"X.....XaaX..............",
-"......XaaX..............",
-".......XaaX.............",
-".......XaaX.............",
-"........XX...aaaaaaaaaaa",
-#endif
-".............aXXXXXXXXXa",
-".............aXXXXXXXXXa",
-".............aXXXXaXXXXa",
-".............aXXXXaXXXXa",
-".............aXXaaaaaXXa",
-".............aXXXXaXXXXa",
-".............aXXXXaXXXXa",
-".............aXXXXXXXXXa",
-".............aXXXXXXXXXa",
-".............aaaaaaaaaaa"};
-
-/* XPM */
-static const char * const link_xpm[] = {
-"24 30 3 1",
-". c None",
-"a c #000000",
-"X c #FFFFFF",
-#if defined(Q_WS_WIN) // Windows cursor is traditionally white
-"aa......................",
-"aXa.....................",
-"aXXa....................",
-"aXXXa...................",
-"aXXXXa..................",
-"aXXXXXa.................",
-"aXXXXXXa................",
-"aXXXXXXXa...............",
-"aXXXXXXXXa..............",
-"aXXXXXXXXXa.............",
-"aXXXXXXaaaa.............",
-"aXXXaXXa................",
-"aXXaaXXa................",
-"aXa..aXXa...............",
-"aa...aXXa...............",
-"a.....aXXa..............",
-"......aXXa..............",
-".......aXXa.............",
-".......aXXa.............",
-"........aa...aaaaaaaaaaa",
-#else
-"XX......................",
-"XaX.....................",
-"XaaX....................",
-"XaaaX...................",
-"XaaaaX..................",
-"XaaaaaX.................",
-"XaaaaaaX................",
-"XaaaaaaaX...............",
-"XaaaaaaaaX..............",
-"XaaaaaaaaaX.............",
-"XaaaaaaXXXX.............",
-"XaaaXaaX................",
-"XaaXXaaX................",
-"XaX..XaaX...............",
-"XX...XaaX...............",
-"X.....XaaX..............",
-"......XaaX..............",
-".......XaaX.............",
-".......XaaX.............",
-"........XX...aaaaaaaaaaa",
-#endif
-".............aXXXXXXXXXa",
-".............aXXXaaaaXXa",
-".............aXXXXaaaXXa",
-".............aXXXaaaaXXa",
-".............aXXaaaXaXXa",
-".............aXXaaXXXXXa",
-".............aXXaXXXXXXa",
-".............aXXXaXXXXXa",
-".............aXXXXXXXXXa",
-".............aaaaaaaaaaa"};
-
#ifndef QT_NO_DRAGANDDROP
//#define QDND_DEBUG
@@ -326,22 +134,9 @@ QDragManager::QDragManager()
{
Q_ASSERT(!instance);
-#ifdef Q_WS_WIN
- n_cursor = 4;
-#else
- n_cursor = 3;
-#endif
-
#ifdef Q_WS_QWS
currentActionForOverrideCursor = Qt::IgnoreAction;
#endif
- pm_cursor = new QPixmap[n_cursor];
- pm_cursor[0] = QPixmap((const char **)move_xpm);
- pm_cursor[1] = QPixmap((const char **)copy_xpm);
- pm_cursor[2] = QPixmap((const char **)link_xpm);
-#ifdef Q_WS_WIN
- pm_cursor[3] = QPixmap((const char **)ignore_xpm);
-#endif
object = 0;
beingCancelled = false;
restoreCursor = false;
@@ -362,7 +157,6 @@ QDragManager::~QDragManager()
QApplication::restoreOverrideCursor();
#endif
instance = 0;
- delete [] pm_cursor;
delete dropData;
}
@@ -379,14 +173,14 @@ QPixmap QDragManager::dragCursor(Qt::DropAction action) const
if (d && d->customCursors.contains(action))
return d->customCursors[action];
else if (action == Qt::MoveAction)
- return pm_cursor[0];
+ return QApplicationPrivate::instance()->getPixmapCursor(Qt::DragMoveCursor);
else if (action == Qt::CopyAction)
- return pm_cursor[1];
+ return QApplicationPrivate::instance()->getPixmapCursor(Qt::DragCopyCursor);
else if (action == Qt::LinkAction)
- return pm_cursor[2];
+ return QApplicationPrivate::instance()->getPixmapCursor(Qt::DragLinkCursor);
#ifdef Q_WS_WIN
else if (action == Qt::IgnoreAction)
- return pm_cursor[3];
+ return QApplicationPrivate::instance()->getPixmapCursor(Qt::ForbiddenCursor);
#endif
return QPixmap();
}
diff --git a/src/gui/kernel/qdnd_p.h b/src/gui/kernel/qdnd_p.h
index d70b983c30..033e6a6702 100644
--- a/src/gui/kernel/qdnd_p.h
+++ b/src/gui/kernel/qdnd_p.h
@@ -261,8 +261,6 @@ public:
#endif
private:
- QPixmap *pm_cursor;
- int n_cursor;
#ifdef Q_WS_QWS
Qt::DropAction currentActionForOverrideCursor;
#endif
diff --git a/src/gui/kernel/qdnd_x11.cpp b/src/gui/kernel/qdnd_x11.cpp
index 33968bd9fc..9591b9a36c 100644
--- a/src/gui/kernel/qdnd_x11.cpp
+++ b/src/gui/kernel/qdnd_x11.cpp
@@ -1340,9 +1340,9 @@ void QDragManager::updateCursor()
if (!noDropCursor) {
#ifndef QT_NO_CURSOR
noDropCursor = new QCursor(Qt::ForbiddenCursor);
- moveCursor = new QCursor(dragCursor(Qt::MoveAction), 0,0);
- copyCursor = new QCursor(dragCursor(Qt::CopyAction), 0,0);
- linkCursor = new QCursor(dragCursor(Qt::LinkAction), 0,0);
+ moveCursor = new QCursor(Qt::DragMoveCursor);
+ copyCursor = new QCursor(Qt::DragCopyCursor);
+ linkCursor = new QCursor(Qt::DragLinkCursor);
#endif
}
diff --git a/src/gui/kernel/qeventdispatcher_mac.mm b/src/gui/kernel/qeventdispatcher_mac.mm
index df09185ea7..afea3ecdca 100644
--- a/src/gui/kernel/qeventdispatcher_mac.mm
+++ b/src/gui/kernel/qeventdispatcher_mac.mm
@@ -90,11 +90,16 @@
#ifndef QT_NO_THREAD
# include "qmutex.h"
+#endif
QT_BEGIN_NAMESPACE
QT_USE_NAMESPACE
-#endif
+
+/*****************************************************************************
+ Internal variables and functions
+ *****************************************************************************/
+bool qt_blockCocoaSettingModalWindowLevel = false;
/*****************************************************************************
Externals
@@ -548,6 +553,12 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags)
{
Q_D(QEventDispatcherMac);
d->interrupt = false;
+
+#ifdef QT_MAC_USE_COCOA
+ bool interruptLater = false;
+ QtMacInterruptDispatcherHelp::cancelInterruptLater();
+#endif
+
// In case we end up recursing while we now process events, make sure
// that we send remaining posted Qt events before this call returns:
wakeUp();
@@ -562,25 +573,37 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags)
QMacCocoaAutoReleasePool pool;
NSEvent* event = 0;
- // If Qt is used as a plugin, or just added into a native cocoa
- // application, we should not run or stop NSApplication;
- // This will be done from outside Qt.
- // And if processEvents is called manually (rather than from QEventLoop), we
- // cannot enter a tight loop and block the call, but instead return after one flush:
- bool canExec_3rdParty = d->nsAppRunCalledByQt || ![NSApp isRunning];
- bool canExec_Qt = flags & QEventLoop::DialogExec || flags & QEventLoop::EventLoopExec;
+ // First, send all previously excluded input events, if any:
+ if (!(flags & QEventLoop::ExcludeUserInputEvents)) {
+ while (!d->queuedUserInputEvents.isEmpty()) {
+ event = static_cast<NSEvent *>(d->queuedUserInputEvents.takeFirst());
+ if (!filterEvent(event)) {
+ qt_mac_send_event(flags, event, 0);
+ retVal = true;
+ }
+ [event release];
+ }
+ }
+
+ // If Qt is used as a plugin, or as an extension in a native cocoa
+ // application, we should not run or stop NSApplication; This will be
+ // done from the application itself. And if processEvents is called
+ // manually (rather than from a QEventLoop), we cannot enter a tight
+ // loop and block this call, but instead we need to return after one flush:
+ const bool canExec_3rdParty = d->nsAppRunCalledByQt || ![NSApp isRunning];
+ const bool canExec_Qt = flags & QEventLoop::DialogExec || flags & QEventLoop::EventLoopExec;
if (canExec_Qt && canExec_3rdParty) {
// We can use exec-mode, meaning that we can stay in a tight loop until
- // interrupted. This is mostly an optimization, but it also allow us
- // to use [NSApp run], which is the recommended way of running applications
- // in cocoa. [NSApp run] should be called at least once for any cocoa app.
+ // interrupted. This is mostly an optimization, but it allow us to use
+ // [NSApp run], which is the normal code path for cocoa applications.
if (NSModalSession session = d->currentModalSession()) {
QBoolBlocker execGuard(d->currentExecIsNSAppRun, false);
while ([NSApp runModalSession:session] == NSRunContinuesResponse && !d->interrupt)
qt_mac_waitForMoreModalSessionEvents();
+
if (!d->interrupt && session == d->currentModalSessionCached) {
- // INVARIANT: Someone called e.g. [NSApp stopModal:] from outside the event
+ // Someone called [NSApp stopModal:] from outside the event
// dispatcher (e.g to stop a native dialog). But that call wrongly stopped
// 'session' as well. As a result, we need to restart all internal sessions:
d->temporarilyStopAllModalSessions();
@@ -591,54 +614,47 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags)
[NSApp run];
}
retVal = true;
- } else do {
- // INVARIANT: We cannot block the thread (and run in a tight loop).
+ } else {
+ // We cannot block the thread (and run in a tight loop).
// Instead we will process all current pending events and return.
- bool mustRelease = false;
-
- if (!(flags & QEventLoop::ExcludeUserInputEvents) && !d->queuedUserInputEvents.isEmpty()) {
- // Process a pending user input event
- mustRelease = true;
- event = static_cast<NSEvent *>(d->queuedUserInputEvents.takeFirst());
- } else {
- if (NSModalSession session = d->currentModalSession()) {
- if (flags & QEventLoop::WaitForMoreEvents)
- qt_mac_waitForMoreModalSessionEvents();
- NSInteger status = [NSApp runModalSession:session];
- if (status != NSRunContinuesResponse && session == d->currentModalSessionCached) {
- // INVARIANT: Someone called e.g. [NSApp stopModal:] from outside the event
- // dispatcher (e.g to stop a native dialog). But that call wrongly stopped
- // 'session' as well. As a result, we need to restart all internal sessions:
- d->temporarilyStopAllModalSessions();
- }
- retVal = true;
- break;
- } else {
- event = [NSApp nextEventMatchingMask:NSAnyEventMask
- untilDate:nil
- inMode:NSDefaultRunLoopMode
- dequeue: YES];
-
- if (event != nil) {
- if (flags & QEventLoop::ExcludeUserInputEvents) {
- if (IsMouseOrKeyEvent(event)) {
- // retain event here?
- [event retain];
- d->queuedUserInputEvents.append(event);
- continue;
- }
+ d->ensureNSAppInitialized();
+ if (NSModalSession session = d->currentModalSession()) {
+ if (flags & QEventLoop::WaitForMoreEvents)
+ qt_mac_waitForMoreModalSessionEvents();
+ NSInteger status = [NSApp runModalSession:session];
+ if (status != NSRunContinuesResponse && session == d->currentModalSessionCached) {
+ // INVARIANT: Someone called [NSApp stopModal:] from outside the event
+ // dispatcher (e.g to stop a native dialog). But that call wrongly stopped
+ // 'session' as well. As a result, we need to restart all internal sessions:
+ d->temporarilyStopAllModalSessions();
+ }
+ retVal = true;
+ } else do {
+ event = [NSApp nextEventMatchingMask:NSAnyEventMask
+ untilDate:nil
+ inMode:NSDefaultRunLoopMode
+ dequeue: YES];
+
+ if (event) {
+ if (flags & QEventLoop::ExcludeUserInputEvents) {
+ if (IsMouseOrKeyEvent(event)) {
+ [event retain];
+ d->queuedUserInputEvents.append(event);
+ continue;
}
}
+ if (!filterEvent(event) && qt_mac_send_event(flags, event, 0))
+ retVal = true;
}
- }
- if (event) {
- if (!filterEvent(event) && qt_mac_send_event(flags, event, 0))
- retVal = true;
- if (mustRelease)
- [event release];
- }
- } while(!d->interrupt && event != nil);
-
+ } while (!d->interrupt && event != nil);
+
+ // Since the window that holds modality might have changed while processing
+ // events, we we need to interrupt when we return back the previous process
+ // event recursion to ensure that we spin the correct modal session.
+ // We do the interruptLater at the end of the function to ensure that we don't
+ // disturb the 'wait for more events' below (as deleteLater will post an event):
+ interruptLater = true;
+ }
#else
do {
EventRef event;
@@ -690,25 +706,19 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags)
}
}
+ // If we're interrupted, we need to interrupt the _current_
+ // recursion as well to check if it is still supposed to be
+ // executing. This way we wind down the stack until we land
+ // on a recursion that again calls processEvents (typically
+ // from QEventLoop), and set interrupt to false:
+ if (d->interrupt)
+ interrupt();
+
#ifdef QT_MAC_USE_COCOA
- // In case we _now_ process events using [NSApp run], we need to stop it to
- // ensure that:
- // 1. the QEventLoop that called us is still executing, or
- // 2. we have a modal session that needs to be spun instead.
- // In case this is a plain call to processEvents (perhaps from a loop)
- // from the application (rather than from a QEventLoop), we delay the
- // interrupting until we/ actually enter a lower loop level (hence the
- // deffered delete of the object below):
- QtMacInterruptDispatcherHelp::interruptLater();
+ if (interruptLater)
+ QtMacInterruptDispatcherHelp::interruptLater();
#endif
- if (d->interrupt) {
- // We should continue to leave all recursion to processEvents until
- // processEvents is called again (e.g. from a QEventLoop that
- // was not yet told to quit:
- interrupt();
- }
-
return retVal;
}
@@ -737,39 +747,60 @@ void QEventDispatcherMac::flush()
*****************************************************************************/
MacTimerHash QEventDispatcherMacPrivate::macTimerHash;
bool QEventDispatcherMacPrivate::blockSendPostedEvents = false;
+bool QEventDispatcherMacPrivate::interrupt = false;
#ifdef QT_MAC_USE_COCOA
QStack<QCocoaModalSessionInfo> QEventDispatcherMacPrivate::cocoaModalSessionStack;
bool QEventDispatcherMacPrivate::currentExecIsNSAppRun = false;
+bool QEventDispatcherMacPrivate::modalSessionsTemporarilyStopped = false;
bool QEventDispatcherMacPrivate::nsAppRunCalledByQt = false;
+bool QEventDispatcherMacPrivate::cleanupModalSessionsNeeded = false;
NSModalSession QEventDispatcherMacPrivate::currentModalSessionCached = 0;
-int QEventDispatcherMacPrivate::activeModalSessionCount()
+void QEventDispatcherMacPrivate::ensureNSAppInitialized()
{
- // Returns the number of modal sessions created
- // (and not just pushed onto the stack, pending to be created)
- int count = 0;
- for (int i=cocoaModalSessionStack.size()-1; i>=0; --i) {
- QCocoaModalSessionInfo &info = cocoaModalSessionStack[i];
- if (info.session)
- ++count;
- }
- return count;
+ // Some elements in Cocoa require NSApplication to be running before
+ // they get fully initialized, in particular the menu bar. This
+ // function is intended for cases where a dialog is told to execute before
+ // QApplication::exec is called, or the application spins the events loop
+ // manually rather than calling QApplication:exec.
+ // The function makes sure that NSApplication starts running, but stops
+ // it again as soon as the send posted events callback is called. That way
+ // we let Cocoa finish the initialization it seems to need. We'll only
+ // apply this trick at most once for any application, and we avoid doing it
+ // for the common case where main just starts QApplication::exec.
+ if (nsAppRunCalledByQt || [NSApp isRunning])
+ return;
+ nsAppRunCalledByQt = true;
+ QBoolBlocker block1(interrupt, true);
+ QBoolBlocker block2(currentExecIsNSAppRun, true);
+ [NSApp run];
}
void QEventDispatcherMacPrivate::temporarilyStopAllModalSessions()
{
- // Stop all created modal session, and as such, make then
- // pending again. The next call to currentModalSession will
- // recreate the session on top again:
+ // Flush, and Stop, all created modal session, and as
+ // such, make them pending again. The next call to
+ // currentModalSession will recreate them again. The
+ // reason to stop all session like this is that otherwise
+ // a call [NSApp stop] would not stop NSApp, but rather
+ // the current modal session. So if we need to stop NSApp
+ // we need to stop all the modal session first. To avoid changing
+ // the stacking order of the windows while doing so, we put
+ // up a block that is used in QCocoaWindow and QCocoaPanel:
+ QBoolBlocker block1(blockSendPostedEvents, true);
+ QBoolBlocker block2(qt_blockCocoaSettingModalWindowLevel, true);
+
int stackSize = cocoaModalSessionStack.size();
for (int i=stackSize-1; i>=0; --i) {
QCocoaModalSessionInfo &info = cocoaModalSessionStack[i];
if (info.session) {
+ [NSApp runModalSession:info.session];
[NSApp endModalSession:info.session];
info.session = 0;
}
}
+ modalSessionsTemporarilyStopped = true;
currentModalSessionCached = 0;
}
@@ -783,23 +814,6 @@ NSModalSession QEventDispatcherMacPrivate::currentModalSession()
if (cocoaModalSessionStack.isEmpty())
return 0;
- // Since this code will end up calling our Qt event handler
- // (also from beginModalSessionForWindow), we need to block
- // that to avoid side effects of events beeing delivered:
- QBoolBlocker block(blockSendPostedEvents, true);
-
- if (![NSApp isRunning]) {
- // Sadly, we need to introduce this little event flush
- // to stop dialogs from blinking/poping in front if a
- // modal session restart was needed:
- while (NSEvent *event = [NSApp nextEventMatchingMask:0
- untilDate:nil
- inMode:NSDefaultRunLoopMode
- dequeue: YES]) {
- qt_mac_send_event(0, event, 0);
- }
- }
-
int sessionCount = cocoaModalSessionStack.size();
for (int i=0; i<sessionCount; ++i) {
QCocoaModalSessionInfo &info = cocoaModalSessionStack[i];
@@ -812,11 +826,28 @@ NSModalSession QEventDispatcherMacPrivate::currentModalSession()
NSWindow *window = qt_mac_window_for(info.widget);
if (!window)
continue;
+
+ ensureNSAppInitialized();
+ QBoolBlocker block1(blockSendPostedEvents, true);
info.session = [NSApp beginModalSessionForWindow:window];
}
currentModalSessionCached = info.session;
}
+ if (modalSessionsTemporarilyStopped && currentModalSessionCached) {
+ // After a call to temporarilyStopAllModalSessions, cocoa have
+ // now posted events to restore ended modal session windows to
+ // the correct window level. Those events will be processed
+ // _after_ our new calls to beginModalSessionForWindow have
+ // taken effect, which will end up stacking the windows wrong on
+ // screen. To work around this, we block cocoa from changing the
+ // stacking order of the windows, and flush out the pending events
+ // (the block is used in QCocoaWindow and QCocoaPanel):
+ QBoolBlocker block1(blockSendPostedEvents, true);
+ QBoolBlocker block2(qt_blockCocoaSettingModalWindowLevel, true);
+ [NSApp runModalSession:currentModalSessionCached];
+ }
+ modalSessionsTemporarilyStopped = false;
return currentModalSessionCached;
}
@@ -852,6 +883,34 @@ void QEventDispatcherMacPrivate::updateChildrenWorksWhenModal()
}
}
+void QEventDispatcherMacPrivate::cleanupModalSessions()
+{
+ // Go through the list of modal sessions, and end those
+ // that no longer has a widget assosiated; no widget means
+ // the the session has logically ended. The reason we wait like
+ // this to actually end the sessions for real (rather than at the
+ // point they were marked as stopped), is that ending a session
+ // when no other session runs below it on the stack will make cocoa
+ // drop some events on the floor.
+ QMacCocoaAutoReleasePool pool;
+ int stackSize = cocoaModalSessionStack.size();
+
+ for (int i=stackSize-1; i>=0; --i) {
+ QCocoaModalSessionInfo &info = cocoaModalSessionStack[i];
+ if (info.widget) {
+ currentModalSessionCached = info.session;
+ break;
+ }
+ cocoaModalSessionStack.remove(i);
+ currentModalSessionCached = 0;
+ if (info.session)
+ [NSApp endModalSession:info.session];
+ }
+
+ updateChildrenWorksWhenModal();
+ cleanupModalSessionsNeeded = false;
+}
+
void QEventDispatcherMacPrivate::beginModalSession(QWidget *widget)
{
// Add a new, empty (null), NSModalSession to the stack.
@@ -860,7 +919,7 @@ void QEventDispatcherMacPrivate::beginModalSession(QWidget *widget)
// is non-zero, and the session pointer is zero (it will become active upon a call to
// currentModalSession). A QCocoaModalSessionInfo is considered pending to be stopped if
// the widget pointer is zero, and the session pointer is non-zero (it will be fully
- // stopped in endModalSession().
+ // stopped in cleanupModalSessions()).
QCocoaModalSessionInfo info = {widget, 0};
cocoaModalSessionStack.push(info);
updateChildrenWorksWhenModal();
@@ -877,38 +936,21 @@ void QEventDispatcherMacPrivate::endModalSession(QWidget *widget)
int stackSize = cocoaModalSessionStack.size();
for (int i=stackSize-1; i>=0; --i) {
QCocoaModalSessionInfo &info = cocoaModalSessionStack[i];
- if (info.widget == widget)
+ if (info.widget == widget) {
info.widget = 0;
- }
-
- // Now we stop, and remove, all sessions marked as pending
- // to be stopped on _top_ of the stack, if any:
- bool needToInterruptEventDispatcher = false;
- bool needToUpdateChildrenWorksWhenModal = false;
-
- for (int i=stackSize-1; i>=0; --i) {
- QCocoaModalSessionInfo &info = cocoaModalSessionStack[i];
- if (info.widget)
- break;
- cocoaModalSessionStack.remove(i);
- needToUpdateChildrenWorksWhenModal = true;
- currentModalSessionCached = 0;
- if (info.session) {
- [NSApp endModalSession:info.session];
- needToInterruptEventDispatcher = true;
+ if (i == stackSize-1) {
+ // The top sessions ended. Interrupt the event dispatcher
+ // to start spinning the correct session immidiatly:
+ cleanupModalSessionsNeeded = true;
+ QEventDispatcherMac::instance()->interrupt();
+ }
}
}
-
- if (needToUpdateChildrenWorksWhenModal)
- updateChildrenWorksWhenModal();
- if (needToInterruptEventDispatcher)
- QEventDispatcherMac::instance()->interrupt();
}
#endif
QEventDispatcherMacPrivate::QEventDispatcherMacPrivate()
- : interrupt(false)
{
}
@@ -967,13 +1009,39 @@ Boolean QEventDispatcherMacPrivate::postedEventSourceEqualCallback(const void *i
inline static void processPostedEvents(QEventDispatcherMacPrivate *const d, const bool blockSendPostedEvents)
{
- if (blockSendPostedEvents || d->interrupt) {
+ if (blockSendPostedEvents) {
+ // We're told to not send posted events (because the event dispatcher
+ // is currently working on setting up the correct session to run). But
+ // we still need to make sure that we don't fall asleep until pending events
+ // are sendt, so we just signal this need, and return:
CFRunLoopSourceSignal(d->postedEventsSource);
- } else {
- if (!d->threadData->canWait || (d->serialNumber != d->lastSerial)) {
- d->lastSerial = d->serialNumber;
- QApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
+ return;
+ }
+
+#ifdef QT_MAC_USE_COCOA
+ if (d->cleanupModalSessionsNeeded)
+ d->cleanupModalSessions();
+#endif
+
+ if (d->interrupt) {
+#ifdef QT_MAC_USE_COCOA
+ if (d->currentExecIsNSAppRun) {
+ // The event dispatcher has been interrupted. But since
+ // [NSApplication run] is running the event loop, we
+ // delayed stopping it until now (to let cocoa process
+ // pending cocoa events first).
+ if (d->currentModalSessionCached)
+ d->temporarilyStopAllModalSessions();
+ [NSApp stop:NSApp];
+ d->cancelWaitForMoreEvents();
}
+#endif
+ return;
+ }
+
+ if (!d->threadData->canWait || (d->serialNumber != d->lastSerial)) {
+ d->lastSerial = d->serialNumber;
+ QApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
}
}
@@ -983,6 +1051,9 @@ void QEventDispatcherMacPrivate::firstLoopEntry(CFRunLoopObserverRef ref,
{
Q_UNUSED(ref);
Q_UNUSED(activity);
+#ifdef QT_MAC_USE_COCOA
+ QApplicationPrivate::qt_initAfterNSAppStarted();
+#endif
processPostedEvents(static_cast<QEventDispatcherMacPrivate *>(info), blockSendPostedEvents);
}
@@ -991,6 +1062,18 @@ void QEventDispatcherMacPrivate::postedEventsSourcePerformCallback(void *info)
processPostedEvents(static_cast<QEventDispatcherMacPrivate *>(info), blockSendPostedEvents);
}
+#ifdef QT_MAC_USE_COCOA
+void QEventDispatcherMacPrivate::cancelWaitForMoreEvents()
+{
+ // In case the event dispatcher is waiting for more
+ // events somewhere, we post a dummy event to wake it up:
+ QMacCocoaAutoReleasePool pool;
+ [NSApp postEvent:[NSEvent otherEventWithType:NSApplicationDefined location:NSZeroPoint
+ modifierFlags:0 timestamp:0. windowNumber:0 context:0
+ subtype:QtCocoaEventSubTypeWakeup data1:0 data2:0] atStart:NO];
+}
+#endif
+
void QEventDispatcherMac::interrupt()
{
Q_D(QEventDispatcherMac);
@@ -1000,20 +1083,14 @@ void QEventDispatcherMac::interrupt()
#ifndef QT_MAC_USE_COCOA
CFRunLoopStop(mainRunLoop());
#else
- QMacCocoaAutoReleasePool pool;
- // In case we wait for more events inside
- // processEvents (or NSApp run), post a dummy to wake it up:
- static const short NSAppShouldStopForQt = SHRT_MAX;
- [NSApp postEvent:[NSEvent otherEventWithType:NSApplicationDefined location:NSZeroPoint
- modifierFlags:0 timestamp:0. windowNumber:0 context:0
- subtype:NSAppShouldStopForQt data1:0 data2:0] atStart:NO];
-
- if (d->activeModalSessionCount() == 0) {
- // We should only stop NSApp if we actually started it (and
- // not some 3rd party application, e.g. if we are a plugin).
- if (d->nsAppRunCalledByQt)
- [NSApp stop:NSApp];
- }
+ // We do nothing more here than setting d->interrupt = true, and
+ // poke the event loop if it is sleeping. Actually stopping
+ // NSApp, or the current modal session, is done inside the send
+ // posted events callback. We do this to ensure that all current pending
+ // cocoa events gets delivered before we stop. Otherwise, if we now stop
+ // the last event loop recursion, cocoa will just drop pending posted
+ // events on the floor before we get a chance to reestablish a new session.
+ d->cancelWaitForMoreEvents();
#endif
}
@@ -1054,17 +1131,18 @@ QEventDispatcherMac::~QEventDispatcherMac()
CFRelease(d->firstTimeObserver);
}
-/////////////////////////////////////////////////////////////////////////////
-
#ifdef QT_MAC_USE_COCOA
QtMacInterruptDispatcherHelp* QtMacInterruptDispatcherHelp::instance = 0;
QtMacInterruptDispatcherHelp::QtMacInterruptDispatcherHelp() : cancelled(false)
{
- // This is the whole point of encapsulation this code
- // inside a class; we can make the code (inside destructor)
- // execute on lower loop level:
+ // The whole point of this class is that we enable a way to interrupt
+ // the event dispatcher when returning back to a lower recursion level
+ // than where interruptLater was called. This is needed to detect if
+ // [NSApp run] should still be running at the recursion level it is at.
+ // Since the interrupt is canceled if processEvents is called before
+ // this object gets deleted, we also avoid interrupting unnecessary.
deleteLater();
}
@@ -1072,34 +1150,26 @@ QtMacInterruptDispatcherHelp::~QtMacInterruptDispatcherHelp()
{
if (cancelled)
return;
-
instance = 0;
-
- if (QEventDispatcherMacPrivate::currentExecIsNSAppRun) {
- int activeCount = QEventDispatcherMacPrivate::activeModalSessionCount();
- if (activeCount > 0) {
- // The problem we now have hit: [NSApp stop] will not stop NSApp
- // if a session is active; it will stop the session instead.
- // So to stop NSApp, we need to temporarily stop all the
- // sessions, then stop NSApp, then restart the session on top again.
- // We need to do this to ensure that we're not stuck inside
- // [NSApp run] when we really should be running a modal session:
- QEventDispatcherMacPrivate::temporarilyStopAllModalSessions();
- }
- }
- // Always interrupt once more in case the modal session stack changed
- // while processEvents was called manually from within the application:
QEventDispatcherMac::instance()->interrupt();
}
-void QtMacInterruptDispatcherHelp::interruptLater() {
- if (instance) {
- instance->cancelled = true;
- delete instance;
- }
+void QtMacInterruptDispatcherHelp::cancelInterruptLater()
+{
+ if (!instance)
+ return;
+ instance->cancelled = true;
+ delete instance;
+ instance = 0;
+}
+
+void QtMacInterruptDispatcherHelp::interruptLater()
+{
+ cancelInterruptLater();
instance = new QtMacInterruptDispatcherHelp;
}
#endif
QT_END_NAMESPACE
+
diff --git a/src/gui/kernel/qeventdispatcher_mac_p.h b/src/gui/kernel/qeventdispatcher_mac_p.h
index a335f162fd..e932532346 100644
--- a/src/gui/kernel/qeventdispatcher_mac_p.h
+++ b/src/gui/kernel/qeventdispatcher_mac_p.h
@@ -174,13 +174,17 @@ public:
static QStack<QCocoaModalSessionInfo> cocoaModalSessionStack;
static bool currentExecIsNSAppRun;
static bool nsAppRunCalledByQt;
+ static bool cleanupModalSessionsNeeded;
+ static bool modalSessionsTemporarilyStopped;
static NSModalSession currentModalSessionCached;
- static void updateChildrenWorksWhenModal();
static NSModalSession currentModalSession();
- static int activeModalSessionCount();
+ static void updateChildrenWorksWhenModal();
static void temporarilyStopAllModalSessions();
static void beginModalSession(QWidget *widget);
static void endModalSession(QWidget *widget);
+ static void cancelWaitForMoreEvents();
+ static void cleanupModalSessions();
+ static void ensureNSAppInitialized();
#endif
MacSocketHash macSockets;
@@ -190,7 +194,7 @@ public:
CFRunLoopObserverRef firstTimeObserver;
QAtomicInt serialNumber;
int lastSerial;
- bool interrupt;
+ static bool interrupt;
private:
static Boolean postedEventSourceEqualCallback(const void *info1, const void *info2);
static void postedEventsSourcePerformCallback(void *info);
@@ -211,6 +215,7 @@ class QtMacInterruptDispatcherHelp : public QObject
public:
static void interruptLater();
+ static void cancelInterruptLater();
};
#endif
diff --git a/src/gui/kernel/qgesture_p.h b/src/gui/kernel/qgesture_p.h
index dee5592094..649a310ea1 100644
--- a/src/gui/kernel/qgesture_p.h
+++ b/src/gui/kernel/qgesture_p.h
@@ -69,13 +69,13 @@ public:
QGesturePrivate()
: gestureType(Qt::CustomGesture), state(Qt::NoGesture),
isHotSpotSet(false), gestureCancelPolicy(0)
-
{
}
Qt::GestureType gestureType;
Qt::GestureState state;
QPointF hotSpot;
+ QPointF sceneHotSpot;
uint isHotSpotSet : 1;
uint gestureCancelPolicy : 2;
};
diff --git a/src/gui/kernel/qgesturerecognizer.cpp b/src/gui/kernel/qgesturerecognizer.cpp
index 8735d272c0..c88a9a78b0 100644
--- a/src/gui/kernel/qgesturerecognizer.cpp
+++ b/src/gui/kernel/qgesturerecognizer.cpp
@@ -181,6 +181,7 @@ void QGestureRecognizer::reset(QGesture *gesture)
QGesturePrivate *d = gesture->d_func();
d->state = Qt::NoGesture;
d->hotSpot = QPointF();
+ d->sceneHotSpot = QPointF();
d->isHotSpotSet = false;
}
}
diff --git a/src/gui/kernel/qguieventdispatcher_glib.cpp b/src/gui/kernel/qguieventdispatcher_glib.cpp
index 7b30741e86..ac2b5f787c 100644
--- a/src/gui/kernel/qguieventdispatcher_glib.cpp
+++ b/src/gui/kernel/qguieventdispatcher_glib.cpp
@@ -216,4 +216,9 @@ void QGuiEventDispatcherGlib::startingUp()
g_source_add_poll(&d->x11EventSource->source, &d->x11EventSource->pollfd);
}
+void QGuiEventDispatcherGlib::flush()
+{
+ XFlush(X11->display);
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qguieventdispatcher_glib_p.h b/src/gui/kernel/qguieventdispatcher_glib_p.h
index ff778cc744..758650b434 100644
--- a/src/gui/kernel/qguieventdispatcher_glib_p.h
+++ b/src/gui/kernel/qguieventdispatcher_glib_p.h
@@ -71,6 +71,7 @@ public:
bool processEvents(QEventLoop::ProcessEventsFlags flags);
void startingUp();
+ void flush();
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qkeymapper_win.cpp b/src/gui/kernel/qkeymapper_win.cpp
index 578f32a0ad..f84b902498 100644
--- a/src/gui/kernel/qkeymapper_win.cpp
+++ b/src/gui/kernel/qkeymapper_win.cpp
@@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE
//#define DEBUG_KEYMAPPER
// Implemented elsewhere
-extern "C" LRESULT CALLBACK QtWndProc(HWND, UINT, WPARAM, LPARAM);
+extern "C" LRESULT QT_WIN_CALLBACK QtWndProc(HWND, UINT, WPARAM, LPARAM);
extern Q_CORE_EXPORT QLocale qt_localeFromLCID(LCID id);
#ifndef LANG_PASHTO
@@ -619,7 +619,7 @@ void QKeyMapperPrivate::clearMappings()
/* MAKELCID()'s first argument is a WORD, and GetKeyboardLayout()
* returns a DWORD. */
- LCID newLCID = MAKELCID((DWORD)GetKeyboardLayout(0), SORT_DEFAULT);
+ LCID newLCID = MAKELCID((quintptr)GetKeyboardLayout(0), SORT_DEFAULT);
// keyboardInputLocale = qt_localeFromLCID(newLCID);
bool bidi = false;
diff --git a/src/gui/kernel/qkeymapper_x11.cpp b/src/gui/kernel/qkeymapper_x11.cpp
index b32b62672d..d6d1042e55 100644
--- a/src/gui/kernel/qkeymapper_x11.cpp
+++ b/src/gui/kernel/qkeymapper_x11.cpp
@@ -1186,6 +1186,8 @@ static const unsigned int KeyTbl[] = {
XF86XK_LaunchB, Qt::Key_LaunchD,
XF86XK_LaunchC, Qt::Key_LaunchE,
XF86XK_LaunchD, Qt::Key_LaunchF,
+ XF86XK_LaunchE, Qt::Key_LaunchG,
+ XF86XK_LaunchF, Qt::Key_LaunchH,
// Qtopia keys
QTOPIAXK_Select, Qt::Key_Select,
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index 2a13546061..99bf971ab8 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -861,6 +861,8 @@ QKeySequence::QKeySequence()
Up to four key codes may be entered by separating them with
commas, e.g. "Alt+X,Ctrl+S,Q".
+ \a key should be in NativeText format.
+
This constructor is typically used with \link QObject::tr() tr
\endlink(), so that shortcut keys can be replaced in
translations:
@@ -877,6 +879,16 @@ QKeySequence::QKeySequence(const QString &key)
}
/*!
+ \since 4.x
+ Creates a key sequence from the \a key string based on \a format.
+*/
+QKeySequence::QKeySequence(const QString &key, QKeySequence::SequenceFormat format)
+{
+ d = new QKeySequencePrivate();
+ assign(key, format);
+}
+
+/*!
Constructs a key sequence with up to 4 keys \a k1, \a k2,
\a k3 and \a k4.
@@ -1055,9 +1067,24 @@ QKeySequence QKeySequence::mnemonic(const QString &text)
contain up to four key codes, provided they are separated by a
comma; for example, "Alt+X,Ctrl+S,Z". The return value is the
number of key codes added.
+ \a keys should be in NativeText format.
*/
int QKeySequence::assign(const QString &ks)
{
+ return assign(ks, NativeText);
+}
+
+/*!
+ \fn int QKeySequence::assign(const QString &keys, QKeySequence::SequenceFormat format)
+ \since 4.x
+
+ Adds the given \a keys to the key sequence (based on \a format).
+ \a keys may contain up to four key codes, provided they are
+ separated by a comma; for example, "Alt+X,Ctrl+S,Z". The return
+ value is the number of key codes added.
+*/
+int QKeySequence::assign(const QString &ks, QKeySequence::SequenceFormat format)
+{
QString keyseq = ks;
QString part;
int n = 0;
@@ -1086,7 +1113,7 @@ int QKeySequence::assign(const QString &ks)
}
part = keyseq.left(-1 == p ? keyseq.length() : p - diff);
keyseq = keyseq.right(-1 == p ? 0 : keyseq.length() - (p + 1));
- d->key[n] = decodeString(part);
+ d->key[n] = QKeySequencePrivate::decodeString(part, format);
++n;
}
return n;
@@ -1557,12 +1584,7 @@ QString QKeySequence::toString(SequenceFormat format) const
*/
QKeySequence QKeySequence::fromString(const QString &str, SequenceFormat format)
{
- QStringList sl = str.split(QLatin1String(", "));
- int keys[4] = {0, 0, 0, 0};
- int total = qMin(sl.count(), 4);
- for (int i = 0; i < total; ++i)
- keys[i] = QKeySequencePrivate::decodeString(sl[i], format);
- return QKeySequence(keys[0], keys[1], keys[2], keys[3]);
+ return QKeySequence(str, format);
}
/*****************************************************************************
diff --git a/src/gui/kernel/qkeysequence.h b/src/gui/kernel/qkeysequence.h
index 1409e28f3b..5a973e398c 100644
--- a/src/gui/kernel/qkeysequence.h
+++ b/src/gui/kernel/qkeysequence.h
@@ -141,8 +141,14 @@ public:
Quit
};
+ enum SequenceFormat {
+ NativeText,
+ PortableText
+ };
+
QKeySequence();
QKeySequence(const QString &key);
+ QKeySequence(const QString &key, SequenceFormat format);
QKeySequence(int k1, int k2 = 0, int k3 = 0, int k4 = 0);
QKeySequence(const QKeySequence &ks);
QKeySequence(StandardKey key);
@@ -160,11 +166,6 @@ public:
#endif
};
- enum SequenceFormat {
- NativeText,
- PortableText
- };
-
QString toString(SequenceFormat format = PortableText) const;
static QKeySequence fromString(const QString &str, SequenceFormat format = PortableText);
@@ -194,6 +195,7 @@ private:
static int decodeString(const QString &ks);
static QString encodeString(int key);
int assign(const QString &str);
+ int assign(const QString &str, SequenceFormat format);
void setKey(int key, int index);
QKeySequencePrivate *d;
diff --git a/src/gui/kernel/qmime_mac.cpp b/src/gui/kernel/qmime_mac.cpp
index 071f80df1f..c6fd184447 100644
--- a/src/gui/kernel/qmime_mac.cpp
+++ b/src/gui/kernel/qmime_mac.cpp
@@ -154,6 +154,7 @@ CFStringRef qt_mac_mime_typeUTI = CFSTR("com.pasteboard.trolltech.marker");
\i public.url - converts to "text/uri-list"
\i public.file-url - converts to "text/uri-list"
\i public.tiff - converts to "application/x-qt-image"
+ \i public.vcard - converts to "text/plain"
\i com.apple.traditional-mac-plain-text - converts to "text/plain"
\i com.apple.pict - converts to "application/x-qt-image"
\endlist
@@ -909,6 +910,61 @@ QList<QByteArray> QMacPasteboardMimeUrl::convertFromMime(const QString &mime, QV
return ret;
}
+class QMacPasteboardMimeVCard : public QMacPasteboardMime
+{
+public:
+ QMacPasteboardMimeVCard() : QMacPasteboardMime(MIME_ALL){ }
+ QString convertorName();
+
+ QString flavorFor(const QString &mime);
+ QString mimeFor(QString flav);
+ bool canConvert(const QString &mime, QString flav);
+ QVariant convertToMime(const QString &mime, QList<QByteArray> data, QString flav);
+ QList<QByteArray> convertFromMime(const QString &mime, QVariant data, QString flav);
+};
+
+QString QMacPasteboardMimeVCard::convertorName()
+{
+ return QString("VCard");
+}
+
+bool QMacPasteboardMimeVCard::canConvert(const QString &mime, QString flav)
+{
+ return mimeFor(flav) == mime;
+}
+
+QString QMacPasteboardMimeVCard::flavorFor(const QString &mime)
+{
+ if(mime.startsWith(QLatin1String("text/plain")))
+ return QLatin1String("public.vcard");
+ return QString();
+}
+
+QString QMacPasteboardMimeVCard::mimeFor(QString flav)
+{
+ if (flav == QLatin1String("public.vcard"))
+ return QLatin1String("text/plain");
+ return QString();
+}
+
+QVariant QMacPasteboardMimeVCard::convertToMime(const QString &mime, QList<QByteArray> data, QString)
+{
+ QByteArray cards;
+ if (mime == QLatin1String("text/plain")) {
+ for (int i=0; i<data.size(); ++i)
+ cards += data[i];
+ }
+ return QVariant(cards);
+}
+
+QList<QByteArray> QMacPasteboardMimeVCard::convertFromMime(const QString &mime, QVariant data, QString)
+{
+ QList<QByteArray> ret;
+ if (mime == QLatin1String("text/plain"))
+ ret.append(data.toString().toUtf8());
+ return ret;
+}
+
#ifdef QT3_SUPPORT
class QMacPasteboardMimeQt3Any : public QMacPasteboardMime {
private:
@@ -1116,6 +1172,7 @@ void QMacPasteboardMime::initialize()
new QMacPasteboardMimeFileUri;
new QMacPasteboardMimeUrl;
new QMacPasteboardMimeTypeName;
+ new QMacPasteboardMimeVCard;
//make sure our "non-standard" types are always last! --Sam
new QMacPasteboardMimeAny;
#ifdef QT3_SUPPORT
diff --git a/src/gui/kernel/qmime_win.cpp b/src/gui/kernel/qmime_win.cpp
index 39633bf7c0..2840843c07 100644
--- a/src/gui/kernel/qmime_win.cpp
+++ b/src/gui/kernel/qmime_win.cpp
@@ -952,6 +952,8 @@ bool QWindowsMimeImage::convertFromMime(const FORMATETC &formatetc, const QMimeD
QDataStream s(&ba, QIODevice::WriteOnly);
s.setByteOrder(QDataStream::LittleEndian);// Intel byte order ####
if (cf == CF_DIB) {
+ if (img.format() > QImage::Format_ARGB32)
+ img = img.convertToFormat(QImage::Format_RGB32);
if (qt_write_dib(s, img))
return setData(ba, pmedium);
} else {
diff --git a/src/gui/kernel/qnsthemeframe_mac_p.h b/src/gui/kernel/qnsthemeframe_mac_p.h
index 77a6963f10..d061b1bfbe 100644
--- a/src/gui/kernel/qnsthemeframe_mac_p.h
+++ b/src/gui/kernel/qnsthemeframe_mac_p.h
@@ -157,7 +157,7 @@
- (void)resetCursorRects;
- (char)shouldBeTreatedAsInkEvent:fp8;
- (char)_shouldBeTreatedAsInkEventInInactiveWindow:fp8;
-- hitTest:(struct _NSPoint)fp8;
+//- hitTest:(struct _NSPoint)fp8; // collides with hittest in qcocoasharedwindowmethods_mac_p.h
- (NSRect)_leftGroupRect;
- (NSRect)_rightGroupRect;
- (void)_updateWidgets;
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm
index 65c04e5a47..3fbd978515 100644
--- a/src/gui/kernel/qt_cocoa_helpers_mac.mm
+++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm
@@ -83,6 +83,7 @@
#include <private/qt_cocoa_helpers_mac_p.h>
#include <private/qt_mac_p.h>
#include <private/qapplication_p.h>
+#include <private/qcocoaapplication_mac_p.h>
#include <private/qcocoawindow_mac_p.h>
#include <private/qcocoaview_mac_p.h>
#include <private/qkeymapper_p.h>
@@ -137,9 +138,8 @@ void QMacWindowFader::performFade()
}
extern bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event); // qapplication.cpp;
-extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm
extern QWidget * mac_mouse_grabber;
-extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp
+extern QWidget *qt_button_down; //qapplication_mac.cpp
void macWindowFade(void * /*OSWindowRef*/ window, float durationSeconds)
{
@@ -369,6 +369,16 @@ QMacTabletHash *qt_mac_tablet_hash()
}
#ifdef QT_MAC_USE_COCOA
+
+// Clears the QWidget pointer that each QCocoaView holds.
+void qt_mac_clearCocoaViewQWidgetPointers(QWidget *widget)
+{
+ QT_MANGLE_NAMESPACE(QCocoaView) *cocoaView = reinterpret_cast<QT_MANGLE_NAMESPACE(QCocoaView) *>(qt_mac_nativeview_for(widget));
+ if (cocoaView && [cocoaView respondsToSelector:@selector(qt_qwidget)]) {
+ [cocoaView qt_clearQWidget];
+ }
+}
+
void qt_dispatchTabletProximityEvent(void * /*NSEvent * */ tabletEvent)
{
NSEvent *proximityEvent = static_cast<NSEvent *>(tabletEvent);
@@ -647,6 +657,21 @@ bool qt_dispatchKeyEventWithCocoa(void * /*NSEvent * */ keyEvent, QWidget *widge
}
#endif
+Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum)
+{
+ if (buttonNum == 0)
+ return Qt::LeftButton;
+ if (buttonNum == 1)
+ return Qt::RightButton;
+ if (buttonNum == 2)
+ return Qt::MidButton;
+ if (buttonNum == 3)
+ return Qt::XButton1;
+ if (buttonNum == 4)
+ return Qt::XButton2;
+ return Qt::NoButton;
+}
+
// Helper to share code between QCocoaWindow and QCocoaView
bool qt_dispatchKeyEvent(void * /*NSEvent * */ keyEvent, QWidget *widgetToGetEvent)
{
@@ -661,6 +686,12 @@ bool qt_dispatchKeyEvent(void * /*NSEvent * */ keyEvent, QWidget *widgetToGetEve
if ([event type] == NSKeyDown) {
qt_keymapper_private()->updateKeyMap(0, key_event, 0);
}
+
+ // Redirect keys to alien widgets.
+ if (widgetToGetEvent->testAttribute(Qt::WA_NativeWindow) == false) {
+ widgetToGetEvent = qApp->focusWidget();
+ }
+
if (widgetToGetEvent == 0)
return false;
@@ -915,7 +946,7 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev
[static_cast<QT_MANGLE_NAMESPACE(QCocoaView) *>(tmpView) qt_qwidget];
}
} else {
- extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp
+ extern QWidget * qt_button_down; //qapplication_mac.cpp
QPoint pos;
widgetToGetMouse = QApplicationPrivate::pickMouseReceiver(qwidget, qglobalPoint,
pos, eventType,
@@ -927,7 +958,20 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev
return false;
NSPoint localPoint = [tmpView convertPoint:windowPoint fromView:nil];
- QPoint qlocalPoint(localPoint.x, localPoint.y);
+ QPoint qlocalPoint = QPoint(localPoint.x, localPoint.y);
+
+ // Search for alien child widgets (either on this qwidget or on the popup)
+ if (widgetToGetMouse->testAttribute(Qt::WA_NativeWindow) == false || qt_widget_private(widgetToGetMouse)->hasAlienChildren) {
+ QPoint qScreenPoint = flipPoint(globalPoint).toPoint();
+#ifdef ALIEN_DEBUG
+ qDebug() << "alien mouse event" << qScreenPoint << possibleAlien;
+#endif
+ QWidget *possibleAlien = widgetToGetMouse->childAt(qlocalPoint);
+ if (possibleAlien) {
+ qlocalPoint = possibleAlien->mapFromGlobal(widgetToGetMouse->mapToGlobal(qlocalPoint));
+ widgetToGetMouse = possibleAlien;
+ }
+ }
EventRef carbonEvent = static_cast<EventRef>(const_cast<void *>([theEvent eventRef]));
if (qt_mac_sendMacEventToWidget(widgetToGetMouse, carbonEvent))
@@ -955,7 +999,7 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev
#ifndef QT_NAMESPACE
Q_ASSERT(clickCount > 0);
#endif
- if (clickCount % 2 == 0)
+ if (clickCount % 2 == 0 && buttons == button)
eventType = QEvent::MouseButtonDblClick;
if (button == Qt::LeftButton && (keyMods & Qt::MetaModifier)) {
button = Qt::RightButton;
@@ -967,11 +1011,24 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev
button = Qt::RightButton;
[theView qt_setLeftButtonIsRightButton: false];
}
+ qt_button_down = 0;
break;
}
[QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->localPoint = localPoint;
QMouseEvent qme(eventType, qlocalPoint, qglobalPoint, button, buttons, keyMods);
- qt_sendSpontaneousEvent(widgetToGetMouse, &qme);
+
+#ifdef ALIEN_DEBUG
+ qDebug() << "sending mouse event to" << widgetToGetMouse;
+#endif
+ extern QWidget *qt_button_down;
+ extern QPointer<QWidget> qt_last_mouse_receiver;
+
+ if (qwidget->testAttribute(Qt::WA_NativeWindow) && qt_widget_private(qwidget)->hasAlienChildren == false)
+ qt_sendSpontaneousEvent(widgetToGetMouse, &qme);
+ else
+ QApplicationPrivate::sendMouseEvent(widgetToGetMouse, &qme, widgetToGetMouse, qwidget, &qt_button_down,
+ qt_last_mouse_receiver);
+
if (eventType == QEvent::MouseButtonPress && button == Qt::RightButton) {
QContextMenuEvent qcme(QContextMenuEvent::Mouse, qlocalPoint, qglobalPoint, keyMods);
qt_sendSpontaneousEvent(widgetToGetMouse, &qcme);
@@ -1279,6 +1336,41 @@ void qt_cocoaChangeOverrideCursor(const QCursor &cursor)
QMacCocoaAutoReleasePool pool;
[static_cast<NSCursor *>(qt_mac_nsCursorForQCursor(cursor)) set];
}
+
+// WARNING: If Qt did not create NSApplication (e.g. in case it is
+// used as a plugin), and at the same time, there is no window on
+// screen (or the window that the event is sendt to becomes hidden etc
+// before the event gets delivered), the message will not be performed.
+bool qt_cocoaPostMessage(id target, SEL selector)
+{
+ if (!target)
+ return false;
+
+ NSInteger windowNumber = 0;
+ if (![NSApp isMemberOfClass:[QNSApplication class]]) {
+ // INVARIANT: Cocoa is not using our NSApplication subclass. That means
+ // we don't control the main event handler either. So target the event
+ // for one of the windows on screen:
+ NSWindow *nswin = [NSApp mainWindow];
+ if (!nswin) {
+ nswin = [NSApp keyWindow];
+ if (!nswin)
+ return false;
+ }
+ windowNumber = [nswin windowNumber];
+ }
+
+ // WARNING: data1 and data2 is truncated to from 64-bit to 32-bit on OS 10.5!
+ // That is why we need to split the address in two parts:
+ QCocoaPostMessageArgs *args = new QCocoaPostMessageArgs(target, selector);
+ quint32 lower = quintptr(args);
+ quint32 upper = quintptr(args) >> 32;
+ NSEvent *e = [NSEvent otherEventWithType:NSApplicationDefined
+ location:NSZeroPoint modifierFlags:0 timestamp:0 windowNumber:windowNumber
+ context:nil subtype:QtCocoaEventSubTypePostMessage data1:lower data2:upper];
+ [NSApp postEvent:e atStart:NO];
+ return true;
+}
#endif
QMacCocoaAutoReleasePool::QMacCocoaAutoReleasePool()
@@ -1294,4 +1386,12 @@ QMacCocoaAutoReleasePool::~QMacCocoaAutoReleasePool()
[(NSAutoreleasePool*)pool release];
}
+void qt_mac_post_retranslateAppMenu()
+{
+#ifdef QT_MAC_USE_COCOA
+ QMacCocoaAutoReleasePool pool;
+ qt_cocoaPostMessage([NSApp QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)], @selector(qtTranslateApplicationMenu));
+#endif
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac_p.h b/src/gui/kernel/qt_cocoa_helpers_mac_p.h
index 6f0c4ce1e3..3fd62a477b 100644
--- a/src/gui/kernel/qt_cocoa_helpers_mac_p.h
+++ b/src/gui/kernel/qt_cocoa_helpers_mac_p.h
@@ -114,6 +114,12 @@ typedef struct CGPoint NSPoint;
#endif
QT_BEGIN_NAMESPACE
+
+enum {
+ QtCocoaEventSubTypeWakeup = SHRT_MAX,
+ QtCocoaEventSubTypePostMessage = SHRT_MAX-1
+};
+
Qt::MouseButtons qt_mac_get_buttons(int buttons);
Qt::MouseButton qt_mac_get_button(EventMouseButton button);
void macWindowFade(void * /*OSWindowRef*/ window, float durationSeconds = 0.15);
@@ -181,6 +187,27 @@ inline QString qt_mac_NSStringToQString(const NSString *nsstr)
inline NSString *qt_mac_QStringToNSString(const QString &qstr)
{ return [reinterpret_cast<const NSString *>(QCFString::toCFStringRef(qstr)) autorelease]; }
+
+#ifdef QT_MAC_USE_COCOA
+class QCocoaPostMessageArgs {
+public:
+ id target;
+ SEL selector;
+ QCocoaPostMessageArgs(id target, SEL selector) : target(target), selector(selector)
+ {
+ [target retain];
+ }
+
+ ~QCocoaPostMessageArgs()
+ {
+ [target release];
+ }
+};
+bool qt_cocoaPostMessage(id target, SEL selector);
#endif
+#endif
+
+void qt_mac_post_retranslateAppMenu();
+
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qt_x11_p.h b/src/gui/kernel/qt_x11_p.h
index 14e04bbeee..8af4df538c 100644
--- a/src/gui/kernel/qt_x11_p.h
+++ b/src/gui/kernel/qt_x11_p.h
@@ -331,7 +331,7 @@ struct QXdndDropTransaction
class QMimeData;
struct QX11Data;
-extern QX11Data *qt_x11Data;
+extern Q_GUI_EXPORT QX11Data *qt_x11Data;
enum DesktopEnvironment {
DE_UNKNOWN,
@@ -564,11 +564,8 @@ struct QX11Data
_MOTIF_WM_HINTS,
DTWM_IS_RUNNING,
- KDE_FULL_SESSION,
- KWIN_RUNNING,
- KWM_RUNNING,
- GNOME_BACKGROUND_PROPERTIES,
ENLIGHTENMENT_DESKTOP,
+ _DT_SAVE_MODE,
_SGI_DESKS_MANAGER,
// EWMH (aka NETWM)
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index b5ccb3effa..e5310eab78 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -205,6 +205,7 @@ QWidgetPrivate::QWidgetPrivate(int version)
, nativeGesturePanEnabled(0)
#elif defined(Q_WS_MAC)
, needWindowChange(0)
+ , hasAlienChildren(0)
, window_event(0)
, qd_hd(0)
#endif
@@ -1121,7 +1122,8 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f)
qFatal("QWidget: Cannot create a QWidget when no GUI is being used");
Q_ASSERT(allWidgets);
- allWidgets->insert(q);
+ if (allWidgets)
+ allWidgets->insert(q);
QWidget *desktopWidget = 0;
if (parentWidget && parentWidget->windowType() == Qt::Desktop) {
@@ -1168,6 +1170,10 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f)
if (f & Qt::MSWindowsOwnDC)
q->setAttribute(Qt::WA_NativeWindow);
+#ifdef Q_WS_MAC
+ q->setAttribute(Qt::WA_NativeWindow);
+#endif
+
q->setAttribute(Qt::WA_QuitOnClose); // might be cleared in adjustQuitOnCloseAttribute()
adjustQuitOnCloseAttribute();
@@ -1263,6 +1269,10 @@ void QWidget::create(WId window, bool initializeWindow, bool destroyOldWindow)
}
if (QWidget *parent = parentWidget()) {
+#ifdef Q_WS_MAC
+ if (testAttribute(Qt::WA_NativeWindow) == false)
+ parent->d_func()->hasAlienChildren = true;
+#endif
if (type & Qt::Window) {
if (!parent->testAttribute(Qt::WA_WState_Created))
parent->createWinId();
@@ -1433,7 +1443,7 @@ QWidget::~QWidget()
}
}
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS)
+#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC)
else if (!internalWinId() && isVisible()) {
qApp->d_func()->sendSyntheticEnterLeave(this);
#ifdef Q_WS_QWS
@@ -1472,6 +1482,15 @@ QWidget::~QWidget()
d->declarativeData = 0; // don't activate again in ~QObject
}
+#ifdef QT_MAC_USE_COCOA
+ // QCocoaView holds a pointer back to this widget. Clear it now
+ // to make sure it's not followed later on. The lifetime of the
+ // QCocoaView might exceed the lifetime of this widget in cases
+ // where Cocoa itself holds references to it.
+ extern void qt_mac_clearCocoaViewQWidgetPointers(QWidget *);
+ qt_mac_clearCocoaViewQWidgetPointers(this);
+#endif
+
if (!d->children.isEmpty())
d->deleteChildren();
@@ -2297,6 +2316,9 @@ QWidget *QWidget::find(WId id)
WId QWidget::winId() const
{
if (!testAttribute(Qt::WA_WState_Created) || !internalWinId()) {
+#ifdef ALIEN_DEBUG
+ qDebug() << "QWidget::winId: creating native window for" << this;
+#endif
QWidget *that = const_cast<QWidget*>(this);
that->setAttribute(Qt::WA_NativeWindow);
that->d_func()->createWinId();
@@ -2309,6 +2331,10 @@ WId QWidget::winId() const
void QWidgetPrivate::createWinId(WId winid)
{
Q_Q(QWidget);
+
+#ifdef ALIEN_DEBUG
+ qDebug() << "QWidgetPrivate::createWinId for" << q << winid;
+#endif
const bool forceNativeWindow = q->testAttribute(Qt::WA_NativeWindow);
if (!q->testAttribute(Qt::WA_WState_Created) || (forceNativeWindow && !q->internalWinId())) {
if (!q->isWindow()) {
@@ -2351,6 +2377,9 @@ Ensures that the widget has a window system identifier, i.e. that it is known to
void QWidget::createWinId()
{
Q_D(QWidget);
+#ifdef ALIEN_DEBUG
+ qDebug() << "QWidget::createWinId" << this;
+#endif
// qWarning("QWidget::createWinId is obsolete, please fix your code.");
d->createWinId();
}
@@ -4880,90 +4909,7 @@ void QWidget::unsetCursor()
void QWidget::render(QPaintDevice *target, const QPoint &targetOffset,
const QRegion &sourceRegion, RenderFlags renderFlags)
{
- Q_D(QWidget);
- if (!target) {
- qWarning("QWidget::render: null pointer to paint device");
- return;
- }
-
- const bool inRenderWithPainter = d->extra && d->extra->inRenderWithPainter;
- QRegion paintRegion = !inRenderWithPainter ? d->prepareToRender(sourceRegion, renderFlags)
- : sourceRegion;
- if (paintRegion.isEmpty())
- return;
-
-#ifndef Q_WS_MAC
- QPainter *oldSharedPainter = inRenderWithPainter ? d->sharedPainter() : 0;
-
- // Use the target's shared painter if set (typically set when doing
- // "other->render(widget);" in the widget's paintEvent.
- if (target->devType() == QInternal::Widget) {
- QWidgetPrivate *targetPrivate = static_cast<QWidget *>(target)->d_func();
- if (targetPrivate->extra && targetPrivate->extra->inRenderWithPainter) {
- QPainter *targetPainter = targetPrivate->sharedPainter();
- if (targetPainter && targetPainter->isActive())
- d->setSharedPainter(targetPainter);
- }
- }
-#endif
-
- // Use the target's redirected device if set and adjust offset and paint
- // region accordingly. This is typically the case when people call render
- // from the paintEvent.
- QPoint offset = targetOffset;
- offset -= paintRegion.boundingRect().topLeft();
- QPoint redirectionOffset;
- QPaintDevice *redirected = 0;
-
- if (target->devType() == QInternal::Widget)
- redirected = static_cast<QWidget *>(target)->d_func()->redirected(&redirectionOffset);
- if (!redirected)
- redirected = QPainter::redirected(target, &redirectionOffset);
-
- if (redirected) {
- target = redirected;
- offset -= redirectionOffset;
- }
-
- if (!inRenderWithPainter) { // Clip handled by shared painter (in qpainter.cpp).
- if (QPaintEngine *targetEngine = target->paintEngine()) {
- const QRegion targetSystemClip = targetEngine->systemClip();
- if (!targetSystemClip.isEmpty())
- paintRegion &= targetSystemClip.translated(-offset);
- }
- }
-
- // Set backingstore flags.
- int flags = QWidgetPrivate::DrawPaintOnScreen | QWidgetPrivate::DrawInvisible;
- if (renderFlags & DrawWindowBackground)
- flags |= QWidgetPrivate::DrawAsRoot;
-
- if (renderFlags & DrawChildren)
- flags |= QWidgetPrivate::DrawRecursive;
- else
- flags |= QWidgetPrivate::DontSubtractOpaqueChildren;
-
-#ifdef Q_WS_QWS
- flags |= QWidgetPrivate::DontSetCompositionMode;
-#endif
-
- if (target->devType() == QInternal::Printer) {
- QPainter p(target);
- d->render_helper(&p, targetOffset, paintRegion, renderFlags);
- return;
- }
-
-#ifndef Q_WS_MAC
- // Render via backingstore.
- d->drawWidget(target, paintRegion, offset, flags, d->sharedPainter());
-
- // Restore shared painter.
- if (oldSharedPainter)
- d->setSharedPainter(oldSharedPainter);
-#else
- // Render via backingstore (no shared painter).
- d->drawWidget(target, paintRegion, offset, flags, 0);
-#endif
+ d_func()->render(target, targetOffset, sourceRegion, renderFlags, false);
}
/*!
@@ -5323,7 +5269,15 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
QPaintEngine *paintEngine = pdev->paintEngine();
if (paintEngine) {
setRedirected(pdev, -offset);
+#ifdef Q_WS_MAC
+ // (Alien support) Special case for Mac when redirecting: If the paint device
+ // is of the Widget type we need to set WA_WState_InPaintEvent since painting
+ // outside the paint event is not supported on QWidgets. The attributeis
+ // restored further down.
+ if (pdev->devType() == QInternal::Widget)
+ static_cast<QWidget *>(pdev)->setAttribute(Qt::WA_WState_InPaintEvent);
+#endif
if (sharedPainter)
paintEngine->d_func()->systemClip = toBePainted;
else
@@ -5364,6 +5318,10 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
//restore
if (paintEngine) {
+#ifdef Q_WS_MAC
+ if (pdev->devType() == QInternal::Widget)
+ static_cast<QWidget *>(pdev)->setAttribute(Qt::WA_WState_InPaintEvent, false);
+#endif
restoreRedirected();
if (!sharedPainter)
paintEngine->d_func()->systemRect = QRect();
@@ -5409,6 +5367,96 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
}
}
+void QWidgetPrivate::render(QPaintDevice *target, const QPoint &targetOffset,
+ const QRegion &sourceRegion, QWidget::RenderFlags renderFlags,
+ bool readyToRender)
+{
+ if (!target) {
+ qWarning("QWidget::render: null pointer to paint device");
+ return;
+ }
+
+ const bool inRenderWithPainter = extra && extra->inRenderWithPainter;
+ QRegion paintRegion = !inRenderWithPainter && !readyToRender
+ ? prepareToRender(sourceRegion, renderFlags)
+ : sourceRegion;
+ if (paintRegion.isEmpty())
+ return;
+
+#ifndef Q_WS_MAC
+ QPainter *oldSharedPainter = inRenderWithPainter ? sharedPainter() : 0;
+
+ // Use the target's shared painter if set (typically set when doing
+ // "other->render(widget);" in the widget's paintEvent.
+ if (target->devType() == QInternal::Widget) {
+ QWidgetPrivate *targetPrivate = static_cast<QWidget *>(target)->d_func();
+ if (targetPrivate->extra && targetPrivate->extra->inRenderWithPainter) {
+ QPainter *targetPainter = targetPrivate->sharedPainter();
+ if (targetPainter && targetPainter->isActive())
+ setSharedPainter(targetPainter);
+ }
+ }
+#endif
+
+ // Use the target's redirected device if set and adjust offset and paint
+ // region accordingly. This is typically the case when people call render
+ // from the paintEvent.
+ QPoint offset = targetOffset;
+ offset -= paintRegion.boundingRect().topLeft();
+ QPoint redirectionOffset;
+ QPaintDevice *redirected = 0;
+
+ if (target->devType() == QInternal::Widget)
+ redirected = static_cast<QWidget *>(target)->d_func()->redirected(&redirectionOffset);
+ if (!redirected)
+ redirected = QPainter::redirected(target, &redirectionOffset);
+
+ if (redirected) {
+ target = redirected;
+ offset -= redirectionOffset;
+ }
+
+ if (!inRenderWithPainter) { // Clip handled by shared painter (in qpainter.cpp).
+ if (QPaintEngine *targetEngine = target->paintEngine()) {
+ const QRegion targetSystemClip = targetEngine->systemClip();
+ if (!targetSystemClip.isEmpty())
+ paintRegion &= targetSystemClip.translated(-offset);
+ }
+ }
+
+ // Set backingstore flags.
+ int flags = DrawPaintOnScreen | DrawInvisible;
+ if (renderFlags & QWidget::DrawWindowBackground)
+ flags |= DrawAsRoot;
+
+ if (renderFlags & QWidget::DrawChildren)
+ flags |= DrawRecursive;
+ else
+ flags |= DontSubtractOpaqueChildren;
+
+#ifdef Q_WS_QWS
+ flags |= DontSetCompositionMode;
+#endif
+
+ if (target->devType() == QInternal::Printer) {
+ QPainter p(target);
+ render_helper(&p, targetOffset, paintRegion, renderFlags);
+ return;
+ }
+
+#ifndef Q_WS_MAC
+ // Render via backingstore.
+ drawWidget(target, paintRegion, offset, flags, sharedPainter());
+
+ // Restore shared painter.
+ if (oldSharedPainter)
+ setSharedPainter(oldSharedPainter);
+#else
+ // Render via backingstore (no shared painter).
+ drawWidget(target, paintRegion, offset, flags, 0);
+#endif
+}
+
void QWidgetPrivate::paintSiblingsRecursive(QPaintDevice *pdev, const QObjectList& siblings, int index, const QRegion &rgn,
const QPoint &offset, int flags
#ifdef Q_BACKINGSTORE_SUBSURFACES
@@ -6452,7 +6500,7 @@ void QWidget::setTabOrder(QWidget* first, QWidget *second)
// QWidget *fp = first->d_func()->focus_prev;
QWidget *fn = first->d_func()->focus_next;
- if (fn == second)
+ if (fn == second || first == second)
return;
QWidget *sp = second->d_func()->focus_prev;
@@ -7305,7 +7353,7 @@ void QWidgetPrivate::hide_helper()
// next bit tries to move the focus if the focus widget is now
// hidden.
if (wasVisible) {
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS)
+#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC)
qApp->d_func()->sendSyntheticEnterLeave(q);
#endif
@@ -7437,7 +7485,7 @@ void QWidget::setVisible(bool visible)
d->show_helper();
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS)
+#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC)
qApp->d_func()->sendSyntheticEnterLeave(this);
#endif
}
@@ -7569,7 +7617,7 @@ void QWidgetPrivate::hideChildren(bool spontaneous)
widget->d_func()->hide_sys();
}
}
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS)
+#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC)
qApp->d_func()->sendSyntheticEnterLeave(widget);
#endif
#ifndef QT_NO_ACCESSIBILITY
@@ -7613,23 +7661,21 @@ bool QWidgetPrivate::close_helper(CloseMode mode)
if (isMain)
QApplication::quit();
#endif
- // Attempt to close the application only if this widget has the
- // WA_QuitOnClose flag set set and has a non-visible parent
- quitOnClose = quitOnClose && (parentWidget.isNull() || !parentWidget->isVisible() || parentWidget->testAttribute(Qt::WA_DontShowOnScreen));
+ // Attempt to close the application only if this has WA_QuitOnClose set and a non-visible parent
+ quitOnClose = quitOnClose && (parentWidget.isNull() || !parentWidget->isVisible());
if (quitOnClose) {
- // If there is no non-withdrawn primary window left (except
- // the ones without QuitOnClose or with WA_DontShowOnScreen),
- // we emit the lastWindowClosed signal
+ /* if there is no non-withdrawn primary window left (except
+ the ones without QuitOnClose), we emit the lastWindowClosed
+ signal */
QWidgetList list = QApplication::topLevelWidgets();
bool lastWindowClosed = true;
for (int i = 0; i < list.size(); ++i) {
QWidget *w = list.at(i);
- if ((w->isVisible() && !w->testAttribute(Qt::WA_DontShowOnScreen))
- && !w->parentWidget() && w->testAttribute(Qt::WA_QuitOnClose)) {
- lastWindowClosed = false;
- break;
- }
+ if (!w->isVisible() || w->parentWidget() || !w->testAttribute(Qt::WA_QuitOnClose))
+ continue;
+ lastWindowClosed = false;
+ break;
}
if (lastWindowClosed)
QApplicationPrivate::emitLastWindowClosed();
@@ -9792,7 +9838,7 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f)
desktopWidget = parent;
bool newParent = (parent != parentWidget()) || !wasCreated || desktopWidget;
-#if defined(Q_WS_X11) || defined(Q_WS_WIN)
+#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_MAC)
if (newParent && parent && !desktopWidget) {
if (testAttribute(Qt::WA_NativeWindow) && !qApp->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings))
parent->d_func()->enforceNativeChildren();
@@ -10267,6 +10313,29 @@ const QPixmap *QWidget::icon() const
#endif // QT3_SUPPORT
+ /*!
+ \internal
+
+ This just sets the corresponding attribute bit to 1 or 0
+ */
+static void setAttribute_internal(Qt::WidgetAttribute attribute, bool on, QWidgetData *data,
+ QWidgetPrivate *d)
+{
+ if (attribute < int(8*sizeof(uint))) {
+ if (on)
+ data->widget_attributes |= (1<<attribute);
+ else
+ data->widget_attributes &= ~(1<<attribute);
+ } else {
+ const int x = attribute - 8*sizeof(uint);
+ const int int_off = x / (8*sizeof(uint));
+ if (on)
+ d->high_attributes[int_off] |= (1<<(x-(int_off*8*sizeof(uint))));
+ else
+ d->high_attributes[int_off] &= ~(1<<(x-(int_off*8*sizeof(uint))));
+ }
+}
+
/*!
Sets the attribute \a attribute on this widget if \a on is true;
otherwise clears the attribute.
@@ -10293,19 +10362,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
}
#endif
- if (attribute < int(8*sizeof(uint))) {
- if (on)
- data->widget_attributes |= (1<<attribute);
- else
- data->widget_attributes &= ~(1<<attribute);
- } else {
- const int x = attribute - 8*sizeof(uint);
- const int int_off = x / (8*sizeof(uint));
- if (on)
- d->high_attributes[int_off] |= (1<<(x-(int_off*8*sizeof(uint))));
- else
- d->high_attributes[int_off] &= ~(1<<(x-(int_off*8*sizeof(uint))));
- }
+ setAttribute_internal(attribute, on, data, d);
switch (attribute) {
@@ -10364,14 +10421,11 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
#ifdef Q_WS_MAC
{
// We can only have one of these set at a time
- static const int MacSizes[] = { Qt::WA_MacNormalSize, Qt::WA_MacSmallSize,
- Qt::WA_MacMiniSize, 0 };
- for (int i = 0; MacSizes[i] != 0; ++i) {
- if (MacSizes[i] == attribute)
- continue;
- int macsize_x = MacSizes[i] - 8*sizeof(uint);
- int macsize_int_off = macsize_x / (8*sizeof(uint));
- d->high_attributes[macsize_int_off] &= ~(1<<(macsize_x-(macsize_int_off*8*sizeof(uint))));
+ const Qt::WidgetAttribute MacSizes[] = { Qt::WA_MacNormalSize, Qt::WA_MacSmallSize,
+ Qt::WA_MacMiniSize };
+ for (int i = 0; i < 3; ++i) {
+ if (MacSizes[i] != attribute)
+ setAttribute_internal(MacSizes[i], false, data, d);
}
d->macUpdateSizeAttribute();
}
@@ -10438,7 +10492,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
}
case Qt::WA_PaintOnScreen:
d->updateIsOpaque();
-#if defined(Q_WS_WIN) || defined(Q_WS_X11)
+#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_MAC)
// Recreate the widget if it's already created as an alien widget and
// WA_PaintOnScreen is enabled. Paint on screen widgets must have win id.
// So must their children.
diff --git a/src/gui/kernel/qwidget.h b/src/gui/kernel/qwidget.h
index 0d7475e993..e12148b97f 100644
--- a/src/gui/kernel/qwidget.h
+++ b/src/gui/kernel/qwidget.h
@@ -773,6 +773,7 @@ private:
#ifdef Q_WS_X11
friend void qt_net_update_user_time(QWidget *tlw, unsigned long timestamp);
friend void qt_net_remove_user_time(QWidget *tlw);
+ friend void qt_set_winid_on_widget(QWidget*, Qt::HANDLE);
#endif
friend Q_GUI_EXPORT QWidgetData *qt_qwidget_data(QWidget *widget);
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index bee93b5555..a0e4050ccb 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -460,7 +460,13 @@ static bool qt_isGenuineQWidget(OSViewRef ref)
bool qt_isGenuineQWidget(const QWidget *window)
{
- return window && qt_isGenuineQWidget(OSViewRef(window->winId()));
+ if (!window)
+ return false;
+
+ if (!window->internalWinId())
+ return true; //alien
+
+ return qt_isGenuineQWidget(OSViewRef(window->internalWinId()));
}
Q_GUI_EXPORT OSWindowRef qt_mac_window_for(const QWidget *w)
@@ -1912,13 +1918,15 @@ void QWidgetPrivate::determineWindowClass()
wclass = kDocumentWindowClass;
else if(popup || (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5 && type == Qt::SplashScreen))
wclass = kModalWindowClass;
- else if(q->testAttribute(Qt::WA_ShowModal) || type == Qt::Dialog)
+ else if(type == Qt::Dialog)
wclass = kMovableModalWindowClass;
else if(type == Qt::ToolTip)
wclass = kHelpWindowClass;
else if(type == Qt::Tool || (QSysInfo::MacintoshVersion < QSysInfo::MV_10_5
&& type == Qt::SplashScreen))
wclass = kFloatingWindowClass;
+ else if(q->testAttribute(Qt::WA_ShowModal))
+ wclass = kMovableModalWindowClass;
else
wclass = kDocumentWindowClass;
@@ -2022,8 +2030,6 @@ void QWidgetPrivate::determineWindowClass()
for(int i = 0; tmp_wattr && known_attribs[i].name; i++) {
if((tmp_wattr & known_attribs[i].tag) == known_attribs[i].tag) {
tmp_wattr ^= known_attribs[i].tag;
- qDebug("Qt: internal: * %s %s", known_attribs[i].name,
- (GetAvailableWindowAttributes(wclass) & known_attribs[i].tag) ? "" : "(*)");
}
}
if(tmp_wattr)
@@ -2218,6 +2224,41 @@ void QWidgetPrivate::finishCreateWindow_sys_Carbon(OSWindowRef windowRef)
applyMaxAndMinSizeOnWindow();
}
#else // QT_MAC_USE_COCOA
+
+void QWidgetPrivate::setWindowLevel()
+{
+ Q_Q(QWidget);
+ const QWidget * const windowParent = q->window()->parentWidget();
+ const QWidget * const primaryWindow = windowParent ? windowParent->window() : 0;
+ NSInteger winLevel = -1;
+
+ if (q->windowType() == Qt::Popup) {
+ winLevel = NSPopUpMenuWindowLevel;
+ // Popup should be in at least the same level as its parent.
+ if (primaryWindow) {
+ OSWindowRef parentRef = qt_mac_window_for(primaryWindow);
+ winLevel = qMax([parentRef level], winLevel);
+ }
+ } else if (q->windowType() == Qt::Tool) {
+ winLevel = NSFloatingWindowLevel;
+ } else if (q->windowType() == Qt::Dialog) {
+ // Correct modality level (NSModalPanelWindowLevel) will be
+ // set by cocoa when creating a modal session later.
+ winLevel = NSNormalWindowLevel;
+ }
+
+ // StayOnTop window should appear above Tool windows.
+ if (data.window_flags & Qt::WindowStaysOnTopHint)
+ winLevel = NSPopUpMenuWindowLevel;
+ // Tooltips should appear above StayOnTop windows.
+ if (q->windowType() == Qt::ToolTip)
+ winLevel = NSScreenSaverWindowLevel;
+ // All other types are Normal level.
+ if (winLevel == -1)
+ winLevel = NSNormalWindowLevel;
+ [qt_mac_window_for(q) setLevel:winLevel];
+}
+
void QWidgetPrivate::finishCreateWindow_sys_Cocoa(void * /*NSWindow * */ voidWindowRef)
{
Q_Q(QWidget);
@@ -2290,6 +2331,10 @@ void QWidgetPrivate::finishCreateWindow_sys_Cocoa(void * /*NSWindow * */ voidWin
q->setAttribute(Qt::WA_WState_WindowOpacitySet, false);
}
+ if (qApp->overrideCursor())
+ [windowRef disableCursorRects];
+
+ setWindowLevel();
macUpdateHideOnSuspend();
macUpdateOpaqueSizeGrip();
macUpdateIgnoreMouseEvents();
@@ -2564,7 +2609,16 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
}
} else {
data.fstrut_dirty = false; // non-toplevel widgets don't have a frame, so no need to update the strut
- if(OSViewRef osview = qt_mac_create_widget(q, this, qt_mac_nativeview_for(parentWidget))) {
+
+#ifdef QT_MAC_USE_COCOA
+ if (q->testAttribute(Qt::WA_NativeWindow) == false ||
+ q->internalWinId() != 0) {
+#ifdef ALIEN_DEBUG
+ qDebug() << "Skipping native widget creation for" << this;
+#endif
+ } else
+#endif
+ if (OSViewRef osview = qt_mac_create_widget(q, this, qt_mac_nativeview_for(parentWidget))) {
#ifndef QT_MAC_USE_COCOA
HIRect bounds = CGRectMake(data.crect.x(), data.crect.y(), data.crect.width(), data.crect.height());
HIViewSetFrame(osview, &bounds);
@@ -2720,6 +2774,35 @@ void QWidgetPrivate::transferChildren()
}
}
+#ifdef QT_MAC_USE_COCOA
+void QWidgetPrivate::setSubWindowStacking(bool set)
+{
+ Q_Q(QWidget);
+ if (!q->isWindow() || !q->testAttribute(Qt::WA_WState_Created))
+ return;
+
+ if (QWidget *parent = q->parentWidget()) {
+ if (parent->testAttribute(Qt::WA_WState_Created)) {
+ if (set)
+ [qt_mac_window_for(parent) addChildWindow:qt_mac_window_for(q) ordered:NSWindowAbove];
+ else
+ [qt_mac_window_for(parent) removeChildWindow:qt_mac_window_for(q)];
+ }
+ }
+
+ QList<QWidget *> widgets = q->findChildren<QWidget *>();
+ for (int i=0; i<widgets.size(); ++i) {
+ QWidget *child = widgets.at(i);
+ if (child->isWindow() && child->testAttribute(Qt::WA_WState_Created)) {
+ if (set)
+ [qt_mac_window_for(q) addChildWindow:qt_mac_window_for(child) ordered:NSWindowAbove];
+ else
+ [qt_mac_window_for(q) removeChildWindow:qt_mac_window_for(child)];
+ }
+ }
+}
+#endif
+
void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f)
{
Q_Q(QWidget);
@@ -2780,13 +2863,14 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f)
//recreate and setup flags
QObjectPrivate::setParent_helper(parent);
- QPoint pt = q->pos();
bool explicitlyHidden = q->testAttribute(Qt::WA_WState_Hidden) && q->testAttribute(Qt::WA_WState_ExplicitShowHide);
if (wasCreated && !qt_isGenuineQWidget(q))
return;
- if ((data.window_flags & Qt::Sheet) && topData && topData->opacity == 242)
+ if (!q->testAttribute(Qt::WA_WState_WindowOpacitySet)) {
q->setWindowOpacity(1.0f);
+ q->setAttribute(Qt::WA_WState_WindowOpacitySet, false);
+ }
setWinId(0); //do after the above because they may want the id
@@ -2795,9 +2879,12 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f)
q->setAttribute(Qt::WA_WState_Visible, false);
q->setAttribute(Qt::WA_WState_Hidden, false);
adjustFlags(data.window_flags, q);
- // keep compatibility with previous versions, we need to preserve the created state
- // (but we recreate the winId for the widget being reparented, again for compatibility)
- if (wasCreated || (!q->isWindow() && parent->testAttribute(Qt::WA_WState_Created))) {
+ // keep compatibility with previous versions, we need to preserve the created state.
+ // (but we recreate the winId for the widget being reparented, again for compatibility,
+ // unless this is an alien widget. )
+ const bool nonWindowWithCreatedParent = !q->isWindow() && parent->testAttribute(Qt::WA_WState_Created);
+ const bool nativeWidget = q->internalWinId() != 0;
+ if (wasCreated || nativeWidget && nonWindowWithCreatedParent) {
createWinId();
if (q->isWindow()) {
#ifndef QT_MAC_USE_COCOA
@@ -2874,7 +2961,6 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f)
current = current->parentWidget();
}
}
-
invalidateBuffer(q->rect());
qt_event_request_window_change(q);
}
@@ -2882,7 +2968,7 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f)
QPoint QWidget::mapToGlobal(const QPoint &pos) const
{
Q_D(const QWidget);
- if (!testAttribute(Qt::WA_WState_Created)) {
+ if (!testAttribute(Qt::WA_WState_Created) || !internalWinId()) {
QPoint p = pos + data->crect.topLeft();
return isWindow() ? p : parentWidget()->mapToGlobal(p);
}
@@ -2909,7 +2995,7 @@ QPoint QWidget::mapToGlobal(const QPoint &pos) const
QPoint QWidget::mapFromGlobal(const QPoint &pos) const
{
Q_D(const QWidget);
- if (!testAttribute(Qt::WA_WState_Created)) {
+ if (!testAttribute(Qt::WA_WState_Created) || !internalWinId()) {
QPoint p = isWindow() ? pos : parentWidget()->mapFromGlobal(pos);
return p - data->crect.topLeft();
}
@@ -3180,10 +3266,10 @@ void QWidget::activateWindow()
|| windowActive) {
#ifndef QT_MAC_USE_COCOA
ActivateWindow(win, true);
+ qApp->setActiveWindow(tlw);
#else
[win makeKeyWindow];
#endif
- qApp->setActiveWindow(tlw);
} else if(!isMinimized()) {
#ifndef QT_MAC_USE_COCOA
SelectWindow(win);
@@ -3247,10 +3333,20 @@ void QWidgetPrivate::update_sys(const QRegion &rgn)
}
#else
// Cocoa doesn't do regions, it seems more efficient to just update the bounding rect instead of a potential number of message passes for each rect.
- const QRect &boundingRect = rgn.boundingRect();
- [qt_mac_nativeview_for(q) setNeedsDisplayInRect:NSMakeRect(boundingRect.x(),
- boundingRect.y(), boundingRect.width(),
- boundingRect.height())];
+ const QRect & boundingRect = rgn.boundingRect();
+
+ // Alien support: get the first native ancestor widget (will be q itself in the non-alien case),
+ // map the coordinates from q space to NSView space and invalidate the rect.
+ QWidget *nativeParent = q->internalWinId() ? q : q->nativeParentWidget();
+ if (nativeParent == 0)
+ return;
+ const QRect nativeBoundingRect = QRect(
+ QPoint(q->mapTo(nativeParent, boundingRect.topLeft())),
+ QSize(boundingRect.size()));
+
+ [qt_mac_nativeview_for(nativeParent) setNeedsDisplayInRect:NSMakeRect(nativeBoundingRect.x(),
+ nativeBoundingRect.y(), nativeBoundingRect.width(),
+ nativeBoundingRect.height())];
#endif
}
@@ -3274,38 +3370,20 @@ void QWidgetPrivate::show_sys()
return;
bool realWindow = isRealWindow();
+#ifndef QT_MAC_USE_COCOA
if (realWindow && !q->testAttribute(Qt::WA_Moved)) {
+ if (qt_mac_is_macsheet(q))
+ recreateMacWindow();
q->createWinId();
if (QWidget *p = q->parentWidget()) {
p->createWinId();
-#ifndef QT_MAC_USE_COCOA
RepositionWindow(qt_mac_window_for(q), qt_mac_window_for(p), kWindowCenterOnParentWindow);
-#else
- CGRect parentFrame = NSRectToCGRect([qt_mac_window_for(p) frame]);
- OSWindowRef windowRef = qt_mac_window_for(q);
- NSRect windowFrame = [windowRef frame];
- NSPoint parentCenter = NSMakePoint(CGRectGetMidX(parentFrame), CGRectGetMidY(parentFrame));
- [windowRef setFrameTopLeftPoint:NSMakePoint(parentCenter.x - (windowFrame.size.width / 2),
- (parentCenter.y + (windowFrame.size.height / 2)))];
-#endif
} else {
-#ifndef QT_MAC_USE_COCOA
RepositionWindow(qt_mac_window_for(q), 0, kWindowCenterOnMainScreen);
-#else
- // Ideally we would do a "center" here, but NSWindow's center is more equivalent to
- // kWindowAlertPositionOnMainScreen instead of kWindowCenterOnMainScreen.
- QRect availGeo = QApplication::desktop()->availableGeometry(q);
- // Center the content only.
- data.crect.moveCenter(availGeo.center());
- QRect fStrut = frameStrut();
- QRect frameRect(data.crect.x() - fStrut.left(), data.crect.y() - fStrut.top(),
- fStrut.left() + fStrut.right() + data.crect.width(),
- fStrut.top() + fStrut.bottom() + data.crect.height());
- NSRect cocoaFrameRect = NSMakeRect(frameRect.x(), flipYCoordinate(frameRect.bottom() + 1), frameRect.width(), frameRect.height());
- [qt_mac_window_for(q) setFrame:cocoaFrameRect display:NO];
-#endif
}
}
+#endif
+
data.fstrut_dirty = true;
if (realWindow) {
// Delegates can change window state, so record some things earlier.
@@ -3336,13 +3414,25 @@ void QWidgetPrivate::show_sys()
#else
// sync the opacity value back (in case of a fade).
[window setAlphaValue:q->windowOpacity()];
- [window makeKeyAndOrderFront:window];
-
- // If this window is app modal, we need to start spinning
- // a modal session for it. Interrupting
- // the event dispatcher will make this happend:
- if (data.window_modality == Qt::ApplicationModal)
- QEventDispatcherMac::instance()->interrupt();
+ setSubWindowStacking(true);
+
+ QWidget *top = 0;
+ if (QApplicationPrivate::tryModalHelper(q, &top)) {
+ [window makeKeyAndOrderFront:window];
+ // If this window is app modal, we need to start spinning
+ // a modal session for it. Interrupting
+ // the event dispatcher will make this happend:
+ if (data.window_modality == Qt::ApplicationModal)
+ QEventDispatcherMac::instance()->interrupt();
+ } else {
+ // The window is modally shaddowed, so we need to make
+ // sure that we don't pop in front of the modal window:
+ [window orderFront:window];
+ if (!top->testAttribute(Qt::WA_DontShowOnScreen)) {
+ if (NSWindow *modalWin = qt_mac_window_for(top))
+ [modalWin orderFront:window];
+ }
+ }
#endif
if (q->windowType() == Qt::Popup) {
if (q->focusWidget())
@@ -3361,8 +3451,6 @@ void QWidgetPrivate::show_sys()
} else if (!q->testAttribute(Qt::WA_ShowWithoutActivating)) {
#ifndef QT_MAC_USE_COCOA
qt_event_request_activate(q);
-#else
- [qt_mac_window_for(q) makeKeyWindow];
#endif
}
} else if(topData()->embedded || !q->parentWidget() || q->parentWidget()->isVisible()) {
@@ -3404,6 +3492,9 @@ void QWidgetPrivate::hide_sys()
return;
QMacCocoaAutoReleasePool pool;
if(q->isWindow()) {
+#ifdef QT_MAC_USE_COCOA
+ setSubWindowStacking(false);
+#endif
OSWindowRef window = qt_mac_window_for(q);
if(qt_mac_is_macsheet(q)) {
#ifndef QT_MAC_USE_COCOA
@@ -3469,12 +3560,15 @@ void QWidgetPrivate::hide_sys()
}
#endif
}
- if(q->isActiveWindow() && !(q->windowType() == Qt::Popup)) {
+#ifndef QT_MAC_USE_COCOA
+ // If the window we now hide was the active window, we need
+ // to find, and activate another window on screen. NB: Cocoa takes care of this
+ // logic for us (and distinquishes between main windows and key windows)
+ if (q->isActiveWindow() && !(q->windowType() == Qt::Popup)) {
QWidget *w = 0;
if(q->parentWidget())
w = q->parentWidget()->window();
if(!w || (!w->isVisible() && !w->isMinimized())) {
-#ifndef QT_MAC_USE_COCOA
for (WindowPtr wp = GetFrontWindowOfClass(kMovableModalWindowClass, true);
wp; wp = GetNextWindowOfClass(wp, kMovableModalWindowClass, true)) {
if((w = qt_mac_find_window(wp)))
@@ -3494,24 +3588,12 @@ void QWidgetPrivate::hide_sys()
break;
}
}
-#else
- NSArray *windows = [NSApp windows];
- NSUInteger totalWindows = [windows count];
- for (NSUInteger i = 0; i < totalWindows; ++i) {
- OSWindowRef wp = [windows objectAtIndex:i];
- if ((w = qt_mac_find_window(wp)))
- break;
- }
-#endif
}
if(w && w->isVisible() && !w->isMinimized()) {
-#ifndef QT_MAC_USE_COCOA
- qt_event_request_activate(w);
-#else
- [qt_mac_window_for(w) makeKeyWindow];
-#endif
+ qt_event_request_activate(w);
}
}
+#endif
} else {
invalidateBuffer(q->rect());
#ifndef QT_MAC_USE_COCOA
@@ -4195,6 +4277,22 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
setGeometry_sys_helper(x, y, w, h, isMove);
}
#else
+ if (!isMove && !q->testAttribute(Qt::WA_Moved) && !q->isVisible()) {
+ // INVARIANT: The location of the window has not yet been set. The default will
+ // instead be to center it on the desktop, or over the parent, if any. Since we now
+ // resize the window, we need to adjust the top left position to keep the window
+ // centeralized. And we need to to this now (and before show) in case the positioning
+ // of other windows (e.g. sub-windows) depend on this position:
+ if (QWidget *p = q->parentWidget()) {
+ x = p->geometry().center().x() - (w / 2);
+ y = p->geometry().center().y() - (h / 2);
+ } else {
+ QRect availGeo = QApplication::desktop()->availableGeometry(q);
+ x = availGeo.center().x() - (w / 2);
+ y = availGeo.center().y() - (h / 2);
+ }
+ }
+
QSize olds = q->size();
const bool isResize = (olds != QSize(w, h));
NSWindow *window = qt_mac_window_for(q);
@@ -4611,9 +4709,12 @@ void QWidgetPrivate::registerDropSite(bool on)
#ifndef QT_MAC_USE_COCOA
SetControlDragTrackingEnabled(qt_mac_nativeview_for(q), on);
#else
- NSView *view = qt_mac_nativeview_for(q);
- if (on && [view isKindOfClass:[QT_MANGLE_NAMESPACE(QCocoaView) class]]) {
- [static_cast<QT_MANGLE_NAMESPACE(QCocoaView) *>(view) registerDragTypes];
+ NSWindow *win = qt_mac_window_for(q);
+ if (on) {
+ if ([win isKindOfClass:[QT_MANGLE_NAMESPACE(QCocoaWindow) class]])
+ [static_cast<QT_MANGLE_NAMESPACE(QCocoaWindow) *>(win) registerDragTypes];
+ else if ([win isKindOfClass:[QT_MANGLE_NAMESPACE(QCocoaPanel) class]])
+ [static_cast<QT_MANGLE_NAMESPACE(QCocoaPanel) *>(win) registerDragTypes];
}
#endif
}
@@ -4769,7 +4870,7 @@ void QWidgetPrivate::setModal_sys()
bool alreadySheet = [windowRef styleMask] & NSDocModalWindowMask;
if (windowParent && q->windowModality() == Qt::WindowModal){
- // Window should be window-modal, which implies a sheet.
+ // INVARIANT: Window should be window-modal (which implies a sheet).
if (!alreadySheet) {
// NB: the following call will call setModal_sys recursivly:
recreateMacWindow();
@@ -4786,47 +4887,19 @@ void QWidgetPrivate::setModal_sys()
[static_cast<NSPanel *>(windowRef) setWorksWhenModal:YES];
}
} else {
- // Window shold not be window-modal, and as such, not a sheet.
+ // INVARIANT: Window shold _not_ be window-modal (and as such, not a sheet).
if (alreadySheet){
// NB: the following call will call setModal_sys recursivly:
recreateMacWindow();
windowRef = qt_mac_window_for(q);
}
- if (q->windowModality() == Qt::ApplicationModal) {
- [windowRef setLevel:NSModalPanelWindowLevel];
- } else if (primaryWindow && primaryWindow->windowModality() == Qt::ApplicationModal) {
- // INVARIANT: Our window is a dialog that has a dialog parent that is
- // application modal, or . This means that q is supposed to be on top of this
- // dialog and not be modally shaddowed:
- [windowRef setLevel:NSModalPanelWindowLevel];
+ if (q->windowModality() == Qt::NonModal
+ && primaryWindow && primaryWindow->windowModality() == Qt::ApplicationModal) {
+ // INVARIANT: Our window has a parent that is application modal.
+ // This means that q is supposed to be on top of this window and
+ // not be modally shaddowed:
if ([windowRef isKindOfClass:[NSPanel class]])
[static_cast<NSPanel *>(windowRef) setWorksWhenModal:YES];
- } else {
- // INVARIANT: q should not be modal.
- NSInteger winLevel = -1;
- if (q->windowType() == Qt::Popup) {
- winLevel = NSPopUpMenuWindowLevel;
- // Popup should be in at least the same level as its parent.
- if (primaryWindow) {
- OSWindowRef parentRef = qt_mac_window_for(primaryWindow);
- winLevel = qMax([parentRef level], winLevel);
- }
- } else if (q->windowType() == Qt::Tool) {
- winLevel = NSFloatingWindowLevel;
- } else if (q->windowType() == Qt::Dialog) {
- winLevel = NSModalPanelWindowLevel;
- }
-
- // StayOnTop window should appear above Tool windows.
- if (data.window_flags & Qt::WindowStaysOnTopHint)
- winLevel = NSPopUpMenuWindowLevel;
- // Tooltips should appear above StayOnTop windows.
- if (q->windowType() == Qt::ToolTip)
- winLevel = NSScreenSaverWindowLevel;
- // All other types are Normal level.
- if (winLevel == -1)
- winLevel = NSNormalWindowLevel;
- [windowRef setLevel:winLevel];
}
}
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index 1bbc0572cf..2cb85864a5 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -158,6 +158,7 @@ struct QTLWExtra {
quint32 newCounterValueLo;
#endif
#elif defined(Q_WS_WIN) // <--------------------------------------------------------- WIN
+ uint hotkeyRegistered: 1; // Hot key from the STARTUPINFO has been registered.
HICON winIconBig; // internal big Windows icon
HICON winIconSmall; // internal small Windows icon
#elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC
@@ -385,6 +386,8 @@ public:
QRegion prepareToRender(const QRegion &region, QWidget::RenderFlags renderFlags);
void render_helper(QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion,
QWidget::RenderFlags renderFlags);
+ void render(QPaintDevice *target, const QPoint &targetOffset, const QRegion &sourceRegion,
+ QWidget::RenderFlags renderFlags, bool readyToRender);
void drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QPoint &offset, int flags,
QPainter *sharedPainter = 0, QWidgetBackingStore *backingStore = 0);
@@ -717,6 +720,7 @@ public:
#elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC
// This is new stuff
uint needWindowChange : 1;
+ uint hasAlienChildren : 1;
// Each wiget keeps a list of all its child and grandchild OpenGL widgets.
// This list is used to update the gl context whenever a parent and a granparent
@@ -763,6 +767,8 @@ public:
void initWindowPtr();
void finishCreateWindow_sys_Carbon(OSWindowRef windowRef);
#else
+ void setSubWindowStacking(bool set);
+ void setWindowLevel();
void finishCreateWindow_sys_Cocoa(void * /*NSWindow * */ windowRef);
void syncCocoaMask();
void finishCocoaMaskSetup();
diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp
index 9acfb70409..7d647b79ee 100644
--- a/src/gui/kernel/qwidget_win.cpp
+++ b/src/gui/kernel/qwidget_win.cpp
@@ -243,7 +243,7 @@ static QCursor *mouseGrbCur = 0;
static QWidget *keyboardGrb = 0;
static HHOOK journalRec = 0;
-extern "C" LRESULT CALLBACK QtWndProc(HWND, UINT, WPARAM, LPARAM);
+extern "C" LRESULT QT_WIN_CALLBACK QtWndProc(HWND, UINT, WPARAM, LPARAM);
#define XCOORD_MAX 16383
#define WRECT_MAX 16383
@@ -825,7 +825,7 @@ QCursor *qt_grab_cursor()
// The procedure does nothing, but is required for mousegrabbing to work
#ifndef Q_WS_WINCE
-LRESULT CALLBACK qJournalRecordProc(int nCode, WPARAM wParam, LPARAM lParam)
+LRESULT QT_WIN_CALLBACK qJournalRecordProc(int nCode, WPARAM wParam, LPARAM lParam)
{
return CallNextHookEx(journalRec, nCode, wParam, lParam);
}
@@ -1094,6 +1094,21 @@ void QWidgetPrivate::show_sys()
return;
}
+ if (data.window_flags & Qt::Window) {
+ QTLWExtra *extra = topData();
+ if (!extra->hotkeyRegistered) {
+ // Try to set the hotkey using information from STARTUPINFO
+ STARTUPINFO startupInfo;
+ GetStartupInfo(&startupInfo);
+ // If STARTF_USEHOTKEY is set, hStdInput is the virtual keycode
+ if (startupInfo.dwFlags & 0x00000200) {
+ WPARAM hotKey = (WPARAM)startupInfo.hStdInput;
+ SendMessage(data.winid, WM_SETHOTKEY, hotKey, 0);
+ }
+ extra->hotkeyRegistered = 1;
+ }
+ }
+
int sm = SW_SHOWNORMAL;
bool fakedMaximize = false;
if (q->isWindow()) {
@@ -1141,6 +1156,11 @@ void QWidgetPrivate::show_sys()
data.window_state |= Qt::WindowMinimized;
if (IsZoomed(q->internalWinId()))
data.window_state |= Qt::WindowMaximized;
+ // This is to resolve the problem where popups are opened from the
+ // system tray and not being implicitly activated
+ if (q->windowType() == Qt::Popup &&
+ (!q->parentWidget() || !q->parentWidget()->isActiveWindow()))
+ q->activateWindow();
}
winSetupGestures();
@@ -1687,6 +1707,7 @@ void QWidgetPrivate::deleteSysExtra()
void QWidgetPrivate::createTLSysExtra()
{
+ extra->topextra->hotkeyRegistered = 0;
extra->topextra->savedFlags = 0;
extra->topextra->winIconBig = 0;
extra->topextra->winIconSmall = 0;
diff --git a/src/gui/kernel/qwidget_wince.cpp b/src/gui/kernel/qwidget_wince.cpp
index fa9470325b..509847b6d8 100644
--- a/src/gui/kernel/qwidget_wince.cpp
+++ b/src/gui/kernel/qwidget_wince.cpp
@@ -46,7 +46,7 @@
QT_BEGIN_NAMESPACE
const QString qt_reg_winclass(QWidget *w); // defined in qapplication_win.cpp
-extern "C" LRESULT CALLBACK QtWndProc(HWND, UINT, WPARAM, LPARAM);
+extern "C" LRESULT QT_WIN_CALLBACK QtWndProc(HWND, UINT, WPARAM, LPARAM);
//#define TABLET_DEBUG
#define PACKETDATA (PK_X | PK_Y | PK_BUTTONS | PK_NORMAL_PRESSURE | PK_TANGENT_PRESSURE \
@@ -586,7 +586,7 @@ void QWidgetPrivate::setWindowOpacity_sys(qreal level) {
}
// The procedure does nothing, but is required for mousegrabbing to work
-LRESULT CALLBACK qJournalRecordProc(int nCode, WPARAM wParam, LPARAM lParam) {
+LRESULT QT_WIN_CALLBACK qJournalRecordProc(int nCode, WPARAM wParam, LPARAM lParam) {
Q_UNUSED(nCode);
Q_UNUSED(wParam);
Q_UNUSED(lParam);
diff --git a/src/gui/mac/qt_menu.nib/classes.nib b/src/gui/mac/qt_menu.nib/classes.nib
index fed50a386c..0031e0e4e5 100644
--- a/src/gui/mac/qt_menu.nib/classes.nib
+++ b/src/gui/mac/qt_menu.nib/classes.nib
@@ -5,14 +5,6 @@
<key>IBClasses</key>
<array>
<dict>
- <key>CLASS</key>
- <string>FirstResponder</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>NSObject</string>
- </dict>
- <dict>
<key>ACTIONS</key>
<dict>
<key>hide</key>
@@ -52,6 +44,14 @@
<key>SUPERCLASS</key>
<string>NSResponder</string>
</dict>
+ <dict>
+ <key>CLASS</key>
+ <string>FirstResponder</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
</array>
<key>IBVersion</key>
<string>1</string>
diff --git a/src/gui/mac/qt_menu.nib/info.nib b/src/gui/mac/qt_menu.nib/info.nib
index 768cb8b9f1..02e5cca562 100644
--- a/src/gui/mac/qt_menu.nib/info.nib
+++ b/src/gui/mac/qt_menu.nib/info.nib
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>IBFramework Version</key>
- <string>670</string>
+ <string>672</string>
<key>IBOldestOS</key>
<integer>5</integer>
<key>IBOpenObjects</key>
@@ -11,7 +11,7 @@
<integer>57</integer>
</array>
<key>IBSystem Version</key>
- <string>9G55</string>
+ <string>9L31a</string>
<key>targetFramework</key>
<string>IBCocoaFramework</string>
</dict>
diff --git a/src/gui/mac/qt_menu.nib/keyedobjects.nib b/src/gui/mac/qt_menu.nib/keyedobjects.nib
index 18a66488f5..3edb0ed2eb 100644
--- a/src/gui/mac/qt_menu.nib/keyedobjects.nib
+++ b/src/gui/mac/qt_menu.nib/keyedobjects.nib
Binary files differ
diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h
index f9902d7083..0671fa8829 100644
--- a/src/gui/math3d/qmatrix4x4.h
+++ b/src/gui/math3d/qmatrix4x4.h
@@ -208,6 +208,8 @@ private:
friend class QGraphicsRotation;
};
+Q_DECLARE_TYPEINFO(QMatrix4x4, Q_MOVABLE_TYPE);
+
inline QMatrix4x4::QMatrix4x4
(qreal m11, qreal m12, qreal m13, qreal m14,
qreal m21, qreal m22, qreal m23, qreal m24,
diff --git a/src/gui/math3d/qquaternion.h b/src/gui/math3d/qquaternion.h
index a446f28af3..16aa5d0774 100644
--- a/src/gui/math3d/qquaternion.h
+++ b/src/gui/math3d/qquaternion.h
@@ -136,6 +136,8 @@ private:
qreal wp, xp, yp, zp;
};
+Q_DECLARE_TYPEINFO(QQuaternion, Q_MOVABLE_TYPE);
+
inline QQuaternion::QQuaternion() : wp(1.0f), xp(0.0f), yp(0.0f), zp(0.0f) {}
inline QQuaternion::QQuaternion(qreal aScalar, qreal xpos, qreal ypos, qreal zpos) : wp(aScalar), xp(xpos), yp(ypos), zp(zpos) {}
diff --git a/src/gui/math3d/qvector2d.h b/src/gui/math3d/qvector2d.h
index d76f35ac57..c92c5e0153 100644
--- a/src/gui/math3d/qvector2d.h
+++ b/src/gui/math3d/qvector2d.h
@@ -126,6 +126,8 @@ private:
friend class QVector4D;
};
+Q_DECLARE_TYPEINFO(QVector2D, Q_MOVABLE_TYPE);
+
inline QVector2D::QVector2D() : xp(0.0f), yp(0.0f) {}
inline QVector2D::QVector2D(float xpos, float ypos, int) : xp(xpos), yp(ypos) {}
diff --git a/src/gui/math3d/qvector3d.h b/src/gui/math3d/qvector3d.h
index 80c71526e0..2fdd1d3d41 100644
--- a/src/gui/math3d/qvector3d.h
+++ b/src/gui/math3d/qvector3d.h
@@ -141,6 +141,8 @@ private:
#endif
};
+Q_DECLARE_TYPEINFO(QVector3D, Q_MOVABLE_TYPE);
+
inline QVector3D::QVector3D() : xp(0.0f), yp(0.0f), zp(0.0f) {}
inline QVector3D::QVector3D(qreal xpos, qreal ypos, qreal zpos) : xp(xpos), yp(ypos), zp(zpos) {}
diff --git a/src/gui/math3d/qvector4d.h b/src/gui/math3d/qvector4d.h
index 4af2961715..a383fbb16f 100644
--- a/src/gui/math3d/qvector4d.h
+++ b/src/gui/math3d/qvector4d.h
@@ -138,6 +138,8 @@ private:
#endif
};
+Q_DECLARE_TYPEINFO(QVector4D, Q_MOVABLE_TYPE);
+
inline QVector4D::QVector4D() : xp(0.0f), yp(0.0f), zp(0.0f), wp(0.0f) {}
inline QVector4D::QVector4D(qreal xpos, qreal ypos, qreal zpos, qreal wpos) : xp(xpos), yp(ypos), zp(zpos), wp(wpos) {}
diff --git a/src/gui/painting/qbezier.cpp b/src/gui/painting/qbezier.cpp
index bbffda14ee..ea7fe4fe6d 100644
--- a/src/gui/painting/qbezier.cpp
+++ b/src/gui/painting/qbezier.cpp
@@ -112,6 +112,11 @@ QPolygonF QBezier::toPolygon() const
return polygon;
}
+QBezier QBezier::mapBy(const QTransform &transform) const
+{
+ return QBezier::fromPoints(transform.map(pt1()), transform.map(pt2()), transform.map(pt3()), transform.map(pt4()));
+}
+
//0.5 is really low
static const qreal flatness = 0.5;
@@ -140,6 +145,25 @@ static inline void flattenBezierWithoutInflections(QBezier &bez,
}
}
+QBezier QBezier::getSubRange(qreal t0, qreal t1) const
+{
+ QBezier result;
+ QBezier temp;
+
+ // cut at t1
+ if (qFuzzyIsNull(t1 - qreal(1.))) {
+ result = *this;
+ } else {
+ temp = *this;
+ temp.parameterSplitLeft(t1, &result);
+ }
+
+ // cut at t0
+ if (!qFuzzyIsNull(t0))
+ result.parameterSplitLeft(t0 / t1, &temp);
+
+ return result;
+}
static inline int quadraticRoots(qreal a, qreal b, qreal c,
qreal *x1, qreal *x2)
@@ -1018,13 +1042,19 @@ int QBezier::stationaryYPoints(qreal &t0, qreal &t1) const
const qreal b = 2 * y1 - 4 * y2 + 2 * y3;
const qreal c = -y1 + y2;
- qreal reciprocal = b * b - 4 * a * c;
+ if (qFuzzyIsNull(a)) {
+ if (qFuzzyIsNull(b))
+ return 0;
- QList<qreal> result;
+ t0 = -c / b;
+ return t0 > 0 && t0 < 1;
+ }
+
+ qreal reciprocal = b * b - 4 * a * c;
if (qFuzzyIsNull(reciprocal)) {
t0 = -b / (2 * a);
- return 1;
+ return t0 > 0 && t0 < 1;
} else if (reciprocal > 0) {
qreal temp = qSqrt(reciprocal);
diff --git a/src/gui/painting/qbezier_p.h b/src/gui/painting/qbezier_p.h
index 3409bc7994..f015ea8568 100644
--- a/src/gui/painting/qbezier_p.h
+++ b/src/gui/painting/qbezier_p.h
@@ -59,6 +59,7 @@
#include "QtCore/qvector.h"
#include "QtCore/qlist.h"
#include "QtCore/qpair.h"
+#include "QtGui/qtransform.h"
QT_BEGIN_NAMESPACE
@@ -96,6 +97,8 @@ public:
QPointF pt3() const { return QPointF(x3, y3); }
QPointF pt4() const { return QPointF(x4, y4); }
+ QBezier mapBy(const QTransform &transform) const;
+
inline QPointF midPoint() const;
inline QLineF midTangent() const;
@@ -104,6 +107,7 @@ public:
inline void parameterSplitLeft(qreal t, QBezier *left);
inline void split(QBezier *firstHalf, QBezier *secondHalf) const;
+
int shifted(QBezier *curveSegments, int maxSegmets,
qreal offset, float threshold) const;
@@ -117,6 +121,8 @@ public:
static bool findIntersections(const QBezier &a, const QBezier &b,
QVector<QPair<qreal, qreal> > *t);
+ QBezier getSubRange(qreal t0, qreal t1) const;
+
qreal x1, y1, x2, y2, x3, y3, x4, y4;
};
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp
index 1a83b1d1cd..a82d0f9432 100644
--- a/src/gui/painting/qbrush.cpp
+++ b/src/gui/painting/qbrush.cpp
@@ -912,7 +912,7 @@ void QBrush::setTransform(const QTransform &matrix)
otherwise returns false.
Two brushes are different if they have different styles, colors or
- pixmaps.
+ transforms or different pixmaps or gradients depending on the style.
\sa operator==()
*/
@@ -924,7 +924,7 @@ void QBrush::setTransform(const QTransform &matrix)
otherwise returns false.
Two brushes are equal if they have equal styles, colors and
- pixmaps.
+ transforms and equal pixmaps or gradients depending on the style.
\sa operator!=()
*/
@@ -933,26 +933,26 @@ bool QBrush::operator==(const QBrush &b) const
{
if (b.d == d)
return true;
- if (b.d->style == d->style && b.d->color == d->color) {
- switch (d->style) {
- case Qt::TexturePattern: {
- QPixmap &us = (static_cast<QTexturedBrushData *>(d.data()))->pixmap();
- QPixmap &them = (static_cast<QTexturedBrushData *>(b.d.data()))->pixmap();
+ if (b.d->style != d->style || b.d->color != d->color || b.d->transform != d->transform)
+ return false;
+ switch (d->style) {
+ case Qt::TexturePattern:
+ {
+ const QPixmap &us = (static_cast<QTexturedBrushData *>(d.data()))->pixmap();
+ const QPixmap &them = (static_cast<QTexturedBrushData *>(b.d.data()))->pixmap();
return ((us.isNull() && them.isNull()) || us.cacheKey() == them.cacheKey());
}
- case Qt::LinearGradientPattern:
- case Qt::RadialGradientPattern:
- case Qt::ConicalGradientPattern:
- {
- QGradientBrushData *d1 = static_cast<QGradientBrushData *>(d.data());
- QGradientBrushData *d2 = static_cast<QGradientBrushData *>(b.d.data());
- return d1->gradient == d2->gradient;
- }
- default:
- return true;
+ case Qt::LinearGradientPattern:
+ case Qt::RadialGradientPattern:
+ case Qt::ConicalGradientPattern:
+ {
+ const QGradientBrushData *d1 = static_cast<QGradientBrushData *>(d.data());
+ const QGradientBrushData *d2 = static_cast<QGradientBrushData *>(b.d.data());
+ return d1->gradient == d2->gradient;
}
+ default:
+ return true;
}
- return false;
}
/*!
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index d6d288ef95..08d5572b0a 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -532,25 +532,49 @@ QString QColor::name() const
void QColor::setNamedColor(const QString &name)
{
+ if (!setColorFromString(name))
+ qWarning("QColor::setNamedColor: Unknown color name '%s'", name.toLatin1().constData());
+}
+
+/*!
+ \since 4.7
+
+ Returns true if the \a name is a valid color name and can
+ be used to construct a valid QColor object, otherwise returns
+ false.
+
+ It uses the same algorithm used in setNamedColor().
+
+ \sa setNamedColor()
+*/
+bool QColor::isValidColor(const QString &name)
+{
+ return !name.isEmpty() && QColor().setColorFromString(name);
+}
+
+bool QColor::setColorFromString(const QString &name)
+{
if (name.isEmpty()) {
invalidate();
- return;
+ return true;
}
if (name.startsWith(QLatin1Char('#'))) {
QRgb rgb;
if (qt_get_hex_rgb(name.constData(), name.length(), &rgb)) {
setRgb(rgb);
+ return true;
} else {
invalidate();
+ return false;
}
- return;
}
#ifndef QT_NO_COLORNAMES
QRgb rgb;
if (qt_get_named_rgb(name.constData(), name.length(), &rgb)) {
setRgba(rgb);
+ return true;
} else
#endif
{
@@ -561,11 +585,12 @@ void QColor::setNamedColor(const QString &name)
&& QX11Info::display()
&& XParseColor(QX11Info::display(), QX11Info::appColormap(), name.toLatin1().constData(), &result)) {
setRgb(result.red >> 8, result.green >> 8, result.blue >> 8);
+ return true;
} else
#endif
{
- qWarning("QColor::setNamedColor: Unknown color name '%s'", name.toLatin1().constData());
invalidate();
+ return false;
}
}
}
@@ -2692,12 +2717,4 @@ QDataStream &operator>>(QDataStream &stream, QColor &color)
\sa QColor::rgb(), QColor::rgba()
*/
-/*! \fn void QColormap::initialize()
- \internal
-*/
-
-/*! \fn void QColormap::cleanup()
- \internal
-*/
-
QT_END_NAMESPACE
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index 332dc25beb..0ac828d91a 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -225,6 +225,8 @@ public:
QT3_SUPPORT uint pixel(int screen = -1) const;
#endif
+ static bool isValidColor(const QString &name);
+
private:
#ifndef QT3_SUPPORT
// do not allow a spec to be used as an alpha value
@@ -232,6 +234,7 @@ private:
#endif
void invalidate();
+ bool setColorFromString(const QString &name);
Spec cspec;
union {
diff --git a/src/gui/painting/qcolormap.qdoc b/src/gui/painting/qcolormap.qdoc
index 56fabf78bc..22a73fdd71 100644
--- a/src/gui/painting/qcolormap.qdoc
+++ b/src/gui/painting/qcolormap.qdoc
@@ -150,3 +150,13 @@
Assigns the given \a colormap to \e this color map and returns
a reference to \e this color map.
*/
+
+/*!
+ \fn void QColormap::initialize()
+ \internal
+*/
+
+/*!
+ \fn void QColormap::cleanup()
+ \internal
+*/
diff --git a/src/gui/painting/qcups.cpp b/src/gui/painting/qcups.cpp
index ac41692e74..1ea1670591 100644
--- a/src/gui/painting/qcups.cpp
+++ b/src/gui/painting/qcups.cpp
@@ -343,7 +343,8 @@ bool QCUPSSupport::printerHasPPD(const char *printerName)
if (!isAvailable())
return false;
const char *ppdFile = _cupsGetPPD(printerName);
- unlink(ppdFile);
+ if (ppdFile)
+ unlink(ppdFile);
return (ppdFile != 0);
}
diff --git a/src/gui/painting/qdatabuffer_p.h b/src/gui/painting/qdatabuffer_p.h
index a7834ea03c..bc5f1efcf7 100644
--- a/src/gui/painting/qdatabuffer_p.h
+++ b/src/gui/painting/qdatabuffer_p.h
@@ -81,7 +81,9 @@ public:
inline Type &at(int i) { Q_ASSERT(i >= 0 && i < siz); return buffer[i]; }
inline const Type &at(int i) const { Q_ASSERT(i >= 0 && i < siz); return buffer[i]; }
+ inline Type &last() { Q_ASSERT(!isEmpty()); return buffer[siz-1]; }
inline const Type &last() const { Q_ASSERT(!isEmpty()); return buffer[siz-1]; }
+ inline Type &first() { Q_ASSERT(!isEmpty()); return buffer[0]; }
inline const Type &first() const { Q_ASSERT(!isEmpty()); return buffer[0]; }
inline void add(const Type &t) {
@@ -90,6 +92,11 @@ public:
++siz;
}
+ inline void pop_back() {
+ Q_ASSERT(siz > 0);
+ --siz;
+ }
+
inline void resize(int size) {
reserve(size);
siz = size;
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 070491dba5..581b538dec 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -46,6 +46,7 @@
#include <private/qdrawhelper_armv6_p.h>
#include <private/qdrawhelper_neon_p.h>
#include <private/qmath_p.h>
+#include <private/qsimd_p.h>
#include <qmath.h>
QT_BEGIN_NAMESPACE
@@ -3700,7 +3701,7 @@ template <>
Q_STATIC_TEMPLATE_SPECIALIZATION
inline quint32 alpha_4(const qargb8555 *src)
{
- Q_ASSERT((long(src) & 0x3) == 0);
+ Q_ASSERT((quintptr(src) & 0x3) == 0);
const quint8 *src8 = reinterpret_cast<const quint8*>(src);
return src8[0] << 24 | src8[3] << 16 | src8[6] << 8 | src8[9];
}
@@ -4026,8 +4027,8 @@ template <>
inline void interpolate_pixel_4(qargb8565 *dest, const qargb8565 *src,
quint32 alpha)
{
- Q_ASSERT((long(dest) & 0x3) == 0);
- Q_ASSERT((long(src) & 0x3) == 0);
+ Q_ASSERT((quintptr(dest) & 0x3) == 0);
+ Q_ASSERT((quintptr(src) & 0x3) == 0);
const quint32 a = eff_alpha_4(alpha, dest);
const quint32 ia = eff_ialpha_4(alpha, dest);
@@ -4122,8 +4123,8 @@ template <>
inline void interpolate_pixel_4(qargb8555 *dest, const qargb8555 *src,
quint32 alpha)
{
- Q_ASSERT((long(dest) & 0x3) == 0);
- Q_ASSERT((long(src) & 0x3) == 0);
+ Q_ASSERT((quintptr(dest) & 0x3) == 0);
+ Q_ASSERT((quintptr(src) & 0x3) == 0);
const quint32 a = eff_alpha_4(alpha, dest);
@@ -4218,8 +4219,8 @@ template <>
inline void interpolate_pixel_4(qrgb888 *dest, const qrgb888 *src,
quint32 alpha)
{
- Q_ASSERT((long(dest) & 0x3) == 0);
- Q_ASSERT((long(src) & 0x3) == 0);
+ Q_ASSERT((quintptr(dest) & 0x3) == 0);
+ Q_ASSERT((quintptr(src) & 0x3) == 0);
const quint32 a = eff_alpha_4(alpha, dest);
const quint32 ia = eff_ialpha_4(alpha, dest);
@@ -4291,8 +4292,8 @@ template <class DST, class SRC>
inline void interpolate_pixel_4(DST *dest, quint8 a,
const SRC *src, quint8 b)
{
- Q_ASSERT((long(dest) & 0x3) == 0);
- Q_ASSERT((long(src) & 0x3) == 0);
+ Q_ASSERT((quintptr(dest) & 0x3) == 0);
+ Q_ASSERT((quintptr(src) & 0x3) == 0);
dest[0] = dest[0].byte_mul(a) + DST(src[0]).byte_mul(b);
dest[1] = dest[1].byte_mul(a) + DST(src[1]).byte_mul(b);
@@ -4303,8 +4304,8 @@ inline void interpolate_pixel_4(DST *dest, quint8 a,
template <class DST, class SRC>
inline void blend_sourceOver_4(DST *dest, const SRC *src)
{
- Q_ASSERT((long(dest) & 0x3) == 0);
- Q_ASSERT((long(src) & 0x3) == 0);
+ Q_ASSERT((quintptr(dest) & 0x3) == 0);
+ Q_ASSERT((quintptr(src) & 0x3) == 0);
const quint32 a = alpha_4(src);
if (a == 0xffffffff) {
@@ -4319,8 +4320,8 @@ inline void blend_sourceOver_4(DST *dest, const SRC *src)
template <>
inline void blend_sourceOver_4(qargb8565 *dest, const qargb8565 *src)
{
- Q_ASSERT((long(dest) & 0x3) == 0);
- Q_ASSERT((long(src) & 0x3) == 0);
+ Q_ASSERT((quintptr(dest) & 0x3) == 0);
+ Q_ASSERT((quintptr(src) & 0x3) == 0);
const quint32 a = alpha_4(src);
if (a == 0xffffffff) {
@@ -4333,8 +4334,8 @@ inline void blend_sourceOver_4(qargb8565 *dest, const qargb8565 *src)
template <>
inline void blend_sourceOver_4(qargb8555 *dest, const qargb8555 *src)
{
- Q_ASSERT((long(dest) & 0x3) == 0);
- Q_ASSERT((long(src) & 0x3) == 0);
+ Q_ASSERT((quintptr(dest) & 0x3) == 0);
+ Q_ASSERT((quintptr(src) & 0x3) == 0);
const quint32 a = alpha_4(src);
if (a == 0xffffffff) {
@@ -4347,8 +4348,8 @@ inline void blend_sourceOver_4(qargb8555 *dest, const qargb8555 *src)
template <>
inline void blend_sourceOver_4(qargb6666 *dest, const qargb6666 *src)
{
- Q_ASSERT((long(dest) & 0x3) == 0);
- Q_ASSERT((long(src) & 0x3) == 0);
+ Q_ASSERT((quintptr(dest) & 0x3) == 0);
+ Q_ASSERT((quintptr(src) & 0x3) == 0);
const quint32 a = alpha_4(src);
if (a == 0xffffffff) {
@@ -5071,7 +5072,7 @@ static void blend_tiled_argb8565(int count, const QSpan *spans, void *userData)
static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData)
{
-#if defined(QT_QWS_DEPTH_16)
+#if !defined(Q_WS_QWS) || defined(QT_QWS_DEPTH_16)
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
if (data->texture.format == QImage::Format_ARGB8565_Premultiplied)
@@ -7720,199 +7721,6 @@ static void qt_memfill16_setup(quint16 *dest, quint16 value, int count);
qt_memfill32_func qt_memfill32 = qt_memfill32_setup;
qt_memfill16_func qt_memfill16 = qt_memfill16_setup;
-enum CPUFeatures {
- None = 0,
- MMX = 0x1,
- MMXEXT = 0x2,
- MMX3DNOW = 0x4,
- MMX3DNOWEXT = 0x8,
- SSE = 0x10,
- SSE2 = 0x20,
- CMOV = 0x40,
- IWMMXT = 0x80,
- NEON = 0x100
-};
-
-static uint detectCPUFeatures()
-{
-#if defined (Q_OS_WINCE)
-#if defined (ARM)
- if (IsProcessorFeaturePresent(PF_ARM_INTEL_WMMX))
- return IWMMXT;
-#elif defined(_X86_)
- uint features = 0;
-#if defined QT_HAVE_MMX
- if (IsProcessorFeaturePresent(PF_MMX_INSTRUCTIONS_AVAILABLE))
- features |= MMX;
-#endif
-#if defined QT_HAVE_3DNOW
- if (IsProcessorFeaturePresent(PF_3DNOW_INSTRUCTIONS_AVAILABLE))
- features |= MMX3DNOW;
-#endif
- return features;
-#endif
- return 0;
-#elif defined(QT_HAVE_IWMMXT)
- // runtime detection only available when running as a previlegied process
- static const bool doIWMMXT = !qgetenv("QT_NO_IWMMXT").toInt();
- return doIWMMXT ? IWMMXT : 0;
-#elif defined(QT_HAVE_NEON)
- static const bool doNEON = !qgetenv("QT_NO_NEON").toInt();
- return doNEON ? NEON : 0;
-#else
- uint features = 0;
-#if defined(__x86_64__) || defined(Q_OS_WIN64)
- features = MMX|SSE|SSE2|CMOV;
-#elif defined(__ia64__)
- features = MMX|SSE|SSE2;
-#elif defined(__i386__) || defined(_M_IX86)
- unsigned int extended_result = 0;
- uint result = 0;
- /* see p. 118 of amd64 instruction set manual Vol3 */
-#if defined(Q_CC_GNU)
- asm ("push %%ebx\n"
- "pushf\n"
- "pop %%eax\n"
- "mov %%eax, %%ebx\n"
- "xor $0x00200000, %%eax\n"
- "push %%eax\n"
- "popf\n"
- "pushf\n"
- "pop %%eax\n"
- "xor %%edx, %%edx\n"
- "xor %%ebx, %%eax\n"
- "jz 1f\n"
-
- "mov $0x00000001, %%eax\n"
- "cpuid\n"
- "1:\n"
- "pop %%ebx\n"
- "mov %%edx, %0\n"
- : "=r" (result)
- :
- : "%eax", "%ecx", "%edx"
- );
-
- asm ("push %%ebx\n"
- "pushf\n"
- "pop %%eax\n"
- "mov %%eax, %%ebx\n"
- "xor $0x00200000, %%eax\n"
- "push %%eax\n"
- "popf\n"
- "pushf\n"
- "pop %%eax\n"
- "xor %%edx, %%edx\n"
- "xor %%ebx, %%eax\n"
- "jz 2f\n"
-
- "mov $0x80000000, %%eax\n"
- "cpuid\n"
- "cmp $0x80000000, %%eax\n"
- "jbe 2f\n"
- "mov $0x80000001, %%eax\n"
- "cpuid\n"
- "2:\n"
- "pop %%ebx\n"
- "mov %%edx, %0\n"
- : "=r" (extended_result)
- :
- : "%eax", "%ecx", "%edx"
- );
-#elif defined (Q_OS_WIN)
- _asm {
- push eax
- push ebx
- push ecx
- push edx
- pushfd
- pop eax
- mov ebx, eax
- xor eax, 00200000h
- push eax
- popfd
- pushfd
- pop eax
- mov edx, 0
- xor eax, ebx
- jz skip
-
- mov eax, 1
- cpuid
- mov result, edx
- skip:
- pop edx
- pop ecx
- pop ebx
- pop eax
- }
-
- _asm {
- push eax
- push ebx
- push ecx
- push edx
- pushfd
- pop eax
- mov ebx, eax
- xor eax, 00200000h
- push eax
- popfd
- pushfd
- pop eax
- mov edx, 0
- xor eax, ebx
- jz skip2
-
- mov eax, 80000000h
- cpuid
- cmp eax, 80000000h
- jbe skip2
- mov eax, 80000001h
- cpuid
- mov extended_result, edx
- skip2:
- pop edx
- pop ecx
- pop ebx
- pop eax
- }
-#endif
-
- // result now contains the standard feature bits
- if (result & (1u << 15))
- features |= CMOV;
- if (result & (1u << 23))
- features |= MMX;
- if (extended_result & (1u << 22))
- features |= MMXEXT;
- if (extended_result & (1u << 31))
- features |= MMX3DNOW;
- if (extended_result & (1u << 30))
- features |= MMX3DNOWEXT;
- if (result & (1u << 25))
- features |= SSE;
- if (result & (1u << 26))
- features |= SSE2;
-#endif // i386
-
- if (qgetenv("QT_NO_MMX").toInt())
- features ^= MMX;
- if (qgetenv("QT_NO_MMXEXT").toInt())
- features ^= MMXEXT;
- if (qgetenv("QT_NO_3DNOW").toInt())
- features ^= MMX3DNOW;
- if (qgetenv("QT_NO_3DNOWEXT").toInt())
- features ^= MMX3DNOWEXT;
- if (qgetenv("QT_NO_SSE").toInt())
- features ^= SSE;
- if (qgetenv("QT_NO_SSE2").toInt())
- features ^= SSE2;
-
- return features;
-#endif
-}
-
#if defined(Q_CC_RVCT) && defined(QT_HAVE_ARMV6)
// Move these to qdrawhelper_arm.c when all
// functions are implemented using arm assembly.
@@ -8005,10 +7813,6 @@ static void qt_blend_color_argb_armv6(int count, const QSpan *spans, void *userD
void qInitDrawhelperAsm()
{
- static uint features = 0xffffffff;
- if (features != 0xffffffff)
- return;
- features = detectCPUFeatures();
qt_memfill32 = qt_memfill_template<quint32, quint32>;
qt_memfill16 = qt_memfill_quint16; //qt_memfill_template<quint16, quint16>;
@@ -8016,7 +7820,7 @@ void qInitDrawhelperAsm()
CompositionFunction *functionForModeAsm = 0;
CompositionFunctionSolid *functionForModeSolidAsm = 0;
-#ifdef QT_NO_DEBUG
+ const uint features = qDetectCPUFeatures();
if (false) {
#ifdef QT_HAVE_SSE2
} else if (features & SSE2) {
@@ -8139,8 +7943,6 @@ void qInitDrawhelperAsm()
}
#endif // IWMMXT
-#endif // QT_NO_DEBUG
-
#if defined(Q_CC_RVCT) && defined(QT_HAVE_ARMV6)
functionForModeAsm = qt_functionForMode_ARMv6;
functionForModeSolidAsm = qt_functionForModeSolid_ARMv6;
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index cb0db4fdb3..f5b17ea09b 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -67,15 +67,6 @@
#include "QtGui/qscreen_qws.h"
#endif
-// Disable MMX and SSE on Mac/PPC builds, or if the compiler
-// does not support -Xarch argument passing
-#if defined(QT_NO_MAC_XARCH) || (defined(Q_OS_DARWIN) && (defined(__ppc__) || defined(__ppc64__)))
-#undef QT_HAVE_SSE2
-#undef QT_HAVE_SSE
-#undef QT_HAVE_3DNOW
-#undef QT_HAVE_MMX
-#endif
-
QT_BEGIN_NAMESPACE
#if defined(Q_CC_MSVC) && _MSCVER <= 1300 && !defined(Q_CC_INTEL)
@@ -1649,7 +1640,7 @@ inline void qt_memconvert(qrgb666 *dest, const quint32 *src, int count)
return;
}
- const int align = (long(dest) & 3);
+ const int align = (quintptr(dest) & 3);
switch (align) {
case 1: *dest++ = qrgb666(*src++); --count;
case 2: *dest++ = qrgb666(*src++); --count;
diff --git a/src/gui/painting/qdrawutil.cpp b/src/gui/painting/qdrawutil.cpp
index 35bf2bfd24..a62f06bde9 100644
--- a/src/gui/painting/qdrawutil.cpp
+++ b/src/gui/painting/qdrawutil.cpp
@@ -1081,7 +1081,7 @@ void qDrawItem(QPainter *p, Qt::GUIStyle gs,
according to the \a margins structure.
*/
-typedef QVarLengthArray<QDrawPixmaps::Data, 16> QDrawPixmapsDataArray;
+typedef QVarLengthArray<QPainter::PixmapFragment, 16> QPixmapFragmentsArray;
/*!
\since 4.6
@@ -1102,12 +1102,12 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
const QPixmap &pixmap, const QRect &sourceRect,const QMargins &sourceMargins,
const QTileRules &rules, QDrawBorderPixmap::DrawingHints hints)
{
- QDrawPixmaps::Data d;
+ QPainter::PixmapFragment d;
d.opacity = 1.0;
d.rotation = 0.0;
- QDrawPixmapsDataArray opaqueData;
- QDrawPixmapsDataArray translucentData;
+ QPixmapFragmentsArray opaqueData;
+ QPixmapFragmentsArray translucentData;
// source center
const int sourceCenterTop = sourceRect.top() + sourceMargins.top();
@@ -1182,44 +1182,56 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
// corners
if (targetMargins.top() > 0 && targetMargins.left() > 0 && sourceMargins.top() > 0 && sourceMargins.left() > 0) { // top left
- d.point.setX(0.5 * (xTarget[1] + xTarget[0]));
- d.point.setY(0.5 * (yTarget[1] + yTarget[0]));
- d.source = QRectF(sourceRect.left(), sourceRect.top(), sourceMargins.left(), sourceMargins.top());
- d.scaleX = qreal(xTarget[1] - xTarget[0]) / d.source.width();
- d.scaleY = qreal(yTarget[1] - yTarget[0]) / d.source.height();
+ d.x = (0.5 * (xTarget[1] + xTarget[0]));
+ d.y = (0.5 * (yTarget[1] + yTarget[0]));
+ d.sourceLeft = sourceRect.left();
+ d.sourceTop = sourceRect.top();
+ d.width = sourceMargins.left();
+ d.height = sourceMargins.top();
+ d.scaleX = qreal(xTarget[1] - xTarget[0]) / d.width;
+ d.scaleY = qreal(yTarget[1] - yTarget[0]) / d.height;
if (hints & QDrawBorderPixmap::OpaqueTopLeft)
opaqueData.append(d);
else
translucentData.append(d);
}
if (targetMargins.top() > 0 && targetMargins.right() > 0 && sourceMargins.top() > 0 && sourceMargins.right() > 0) { // top right
- d.point.setX(0.5 * (xTarget[columns] + xTarget[columns - 1]));
- d.point.setY(0.5 * (yTarget[1] + yTarget[0]));
- d.source = QRectF(sourceCenterRight, sourceRect.top(), sourceMargins.right(), sourceMargins.top());
- d.scaleX = qreal(xTarget[columns] - xTarget[columns - 1]) / d.source.width();
- d.scaleY = qreal(yTarget[1] - yTarget[0]) / d.source.height();
+ d.x = (0.5 * (xTarget[columns] + xTarget[columns - 1]));
+ d.y = (0.5 * (yTarget[1] + yTarget[0]));
+ d.sourceLeft = sourceCenterRight;
+ d.sourceTop = sourceRect.top();
+ d.width = sourceMargins.right();
+ d.height = sourceMargins.top();
+ d.scaleX = qreal(xTarget[columns] - xTarget[columns - 1]) / d.width;
+ d.scaleY = qreal(yTarget[1] - yTarget[0]) / d.height;
if (hints & QDrawBorderPixmap::OpaqueTopRight)
opaqueData.append(d);
else
translucentData.append(d);
}
if (targetMargins.bottom() > 0 && targetMargins.left() > 0 && sourceMargins.bottom() > 0 && sourceMargins.left() > 0) { // bottom left
- d.point.setX(0.5 * (xTarget[1] + xTarget[0]));
- d.point.setY(0.5 * (yTarget[rows] + yTarget[rows - 1]));
- d.source = QRectF(sourceRect.left(), sourceCenterBottom, sourceMargins.left(), sourceMargins.bottom());
- d.scaleX = qreal(xTarget[1] - xTarget[0]) / d.source.width();
- d.scaleY = qreal(yTarget[rows] - yTarget[rows - 1]) / d.source.height();
+ d.x = (0.5 * (xTarget[1] + xTarget[0]));
+ d.y =(0.5 * (yTarget[rows] + yTarget[rows - 1]));
+ d.sourceLeft = sourceRect.left();
+ d.sourceTop = sourceCenterBottom;
+ d.width = sourceMargins.left();
+ d.height = sourceMargins.bottom();
+ d.scaleX = qreal(xTarget[1] - xTarget[0]) / d.width;
+ d.scaleY = qreal(yTarget[rows] - yTarget[rows - 1]) / d.height;
if (hints & QDrawBorderPixmap::OpaqueBottomLeft)
opaqueData.append(d);
else
translucentData.append(d);
}
if (targetMargins.bottom() > 0 && targetMargins.right() > 0 && sourceMargins.bottom() > 0 && sourceMargins.right() > 0) { // bottom right
- d.point.setX(0.5 * (xTarget[columns] + xTarget[columns - 1]));
- d.point.setY(0.5 * (yTarget[rows] + yTarget[rows - 1]));
- d.source = QRectF(sourceCenterRight, sourceCenterBottom, sourceMargins.right(), sourceMargins.bottom());
- d.scaleX = qreal(xTarget[columns] - xTarget[columns - 1]) / d.source.width();
- d.scaleY = qreal(yTarget[rows] - yTarget[rows - 1]) / d.source.height();
+ d.x = (0.5 * (xTarget[columns] + xTarget[columns - 1]));
+ d.y = (0.5 * (yTarget[rows] + yTarget[rows - 1]));
+ d.sourceLeft = sourceCenterRight;
+ d.sourceTop = sourceCenterBottom;
+ d.width = sourceMargins.right();
+ d.height = sourceMargins.bottom();
+ d.scaleX = qreal(xTarget[columns] - xTarget[columns - 1]) / d.width;
+ d.scaleY = qreal(yTarget[rows] - yTarget[rows - 1]) / d.height;
if (hints & QDrawBorderPixmap::OpaqueBottomRight)
opaqueData.append(d);
else
@@ -1229,158 +1241,107 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
// horizontal edges
if (targetCenterWidth > 0 && sourceCenterWidth > 0) {
if (targetMargins.top() > 0 && sourceMargins.top() > 0) { // top
- QDrawPixmapsDataArray &data = hints & QDrawBorderPixmap::OpaqueTop ? opaqueData : translucentData;
- d.source = QRectF(sourceCenterLeft, sourceRect.top(), sourceCenterWidth, sourceMargins.top());
- d.point.setY(0.5 * (yTarget[1] + yTarget[0]));
- d.scaleX = dx / d.source.width();
- d.scaleY = qreal(yTarget[1] - yTarget[0]) / d.source.height();
+ QPixmapFragmentsArray &data = hints & QDrawBorderPixmap::OpaqueTop ? opaqueData : translucentData;
+ d.sourceLeft = sourceCenterLeft;
+ d.sourceTop = sourceRect.top();
+ d.width = sourceCenterWidth;
+ d.height = sourceMargins.top();
+ d.y = (0.5 * (yTarget[1] + yTarget[0]));
+ d.scaleX = dx / d.width;
+ d.scaleY = qreal(yTarget[1] - yTarget[0]) / d.height;
for (int i = 1; i < columns - 1; ++i) {
- d.point.setX(0.5 * (xTarget[i + 1] + xTarget[i]));
+ d.x = (0.5 * (xTarget[i + 1] + xTarget[i]));
data.append(d);
}
if (rules.horizontal == Qt::RepeatTile)
- data[data.size() - 1].source.setWidth((xTarget[columns - 1] - xTarget[columns - 2]) / d.scaleX);
+ data[data.size() - 1].width = ((xTarget[columns - 1] - xTarget[columns - 2]) / d.scaleX);
}
if (targetMargins.bottom() > 0 && sourceMargins.bottom() > 0) { // bottom
- QDrawPixmapsDataArray &data = hints & QDrawBorderPixmap::OpaqueBottom ? opaqueData : translucentData;
- d.source = QRectF(sourceCenterLeft, sourceCenterBottom, sourceCenterWidth, sourceMargins.bottom());;
- d.point.setY(0.5 * (yTarget[rows] + yTarget[rows - 1]));
- d.scaleX = dx / d.source.width();
- d.scaleY = qreal(yTarget[rows] - yTarget[rows - 1]) / d.source.height();
+ QPixmapFragmentsArray &data = hints & QDrawBorderPixmap::OpaqueBottom ? opaqueData : translucentData;
+ d.sourceLeft = sourceCenterLeft;
+ d.sourceTop = sourceCenterBottom;
+ d.width = sourceCenterWidth;
+ d.height = sourceMargins.bottom();
+ d.y = (0.5 * (yTarget[rows] + yTarget[rows - 1]));
+ d.scaleX = dx / d.width;
+ d.scaleY = qreal(yTarget[rows] - yTarget[rows - 1]) / d.height;
for (int i = 1; i < columns - 1; ++i) {
- d.point.setX(0.5 * (xTarget[i + 1] + xTarget[i]));
+ d.x = (0.5 * (xTarget[i + 1] + xTarget[i]));
data.append(d);
}
if (rules.horizontal == Qt::RepeatTile)
- data[data.size() - 1].source.setWidth((xTarget[columns - 1] - xTarget[columns - 2]) / d.scaleX);
+ data[data.size() - 1].width = ((xTarget[columns - 1] - xTarget[columns - 2]) / d.scaleX);
}
}
// vertical edges
if (targetCenterHeight > 0 && sourceCenterHeight > 0) {
if (targetMargins.left() > 0 && sourceMargins.left() > 0) { // left
- QDrawPixmapsDataArray &data = hints & QDrawBorderPixmap::OpaqueLeft ? opaqueData : translucentData;
- d.source = QRectF(sourceRect.left(), sourceCenterTop, sourceMargins.left(), sourceCenterHeight);
- d.point.setX(0.5 * (xTarget[1] + xTarget[0]));
- d.scaleX = qreal(xTarget[1] - xTarget[0]) / d.source.width();
- d.scaleY = dy / d.source.height();
+ QPixmapFragmentsArray &data = hints & QDrawBorderPixmap::OpaqueLeft ? opaqueData : translucentData;
+ d.sourceLeft = sourceRect.left();
+ d.sourceTop = sourceCenterTop;
+ d.width = sourceMargins.left();
+ d.height = sourceCenterHeight;
+ d.x = (0.5 * (xTarget[1] + xTarget[0]));
+ d.scaleX = qreal(xTarget[1] - xTarget[0]) / d.width;
+ d.scaleY = dy / d.height;
for (int i = 1; i < rows - 1; ++i) {
- d.point.setY(0.5 * (yTarget[i + 1] + yTarget[i]));
+ d.y = (0.5 * (yTarget[i + 1] + yTarget[i]));
data.append(d);
}
if (rules.vertical == Qt::RepeatTile)
- data[data.size() - 1].source.setHeight((yTarget[rows - 1] - yTarget[rows - 2]) / d.scaleY);
+ data[data.size() - 1].height = ((yTarget[rows - 1] - yTarget[rows - 2]) / d.scaleY);
}
if (targetMargins.right() > 0 && sourceMargins.right() > 0) { // right
- QDrawPixmapsDataArray &data = hints & QDrawBorderPixmap::OpaqueRight ? opaqueData : translucentData;
- d.source = QRectF(sourceCenterRight, sourceCenterTop, sourceMargins.right(), sourceCenterHeight);
- d.point.setX(0.5 * (xTarget[columns] + xTarget[columns - 1]));
- d.scaleX = qreal(xTarget[columns] - xTarget[columns - 1]) / d.source.width();
- d.scaleY = dy / d.source.height();
+ QPixmapFragmentsArray &data = hints & QDrawBorderPixmap::OpaqueRight ? opaqueData : translucentData;
+ d.sourceLeft = sourceCenterRight;
+ d.sourceTop = sourceCenterTop;
+ d.width = sourceMargins.right();
+ d.height = sourceCenterHeight;
+ d.x = (0.5 * (xTarget[columns] + xTarget[columns - 1]));
+ d.scaleX = qreal(xTarget[columns] - xTarget[columns - 1]) / d.width;
+ d.scaleY = dy / d.height;
for (int i = 1; i < rows - 1; ++i) {
- d.point.setY(0.5 * (yTarget[i + 1] + yTarget[i]));
+ d.y = (0.5 * (yTarget[i + 1] + yTarget[i]));
data.append(d);
}
if (rules.vertical == Qt::RepeatTile)
- data[data.size() - 1].source.setHeight((yTarget[rows - 1] - yTarget[rows - 2]) / d.scaleY);
+ data[data.size() - 1].height = ((yTarget[rows - 1] - yTarget[rows - 2]) / d.scaleY);
}
}
// center
if (targetCenterWidth > 0 && targetCenterHeight > 0 && sourceCenterWidth > 0 && sourceCenterHeight > 0) {
- QDrawPixmapsDataArray &data = hints & QDrawBorderPixmap::OpaqueCenter ? opaqueData : translucentData;
- d.source = QRectF(sourceCenterLeft, sourceCenterTop, sourceCenterWidth, sourceCenterHeight);
- d.scaleX = dx / d.source.width();
- d.scaleY = dy / d.source.height();
+ QPixmapFragmentsArray &data = hints & QDrawBorderPixmap::OpaqueCenter ? opaqueData : translucentData;
+ d.sourceLeft = sourceCenterLeft;
+ d.sourceTop = sourceCenterTop;
+ d.width = sourceCenterWidth;
+ d.height = sourceCenterHeight;
+ d.scaleX = dx / d.width;
+ d.scaleY = dy / d.height;
qreal repeatWidth = (xTarget[columns - 1] - xTarget[columns - 2]) / d.scaleX;
qreal repeatHeight = (yTarget[rows - 1] - yTarget[rows - 2]) / d.scaleY;
for (int j = 1; j < rows - 1; ++j) {
- d.point.setY(0.5 * (yTarget[j + 1] + yTarget[j]));
+ d.y = (0.5 * (yTarget[j + 1] + yTarget[j]));
for (int i = 1; i < columns - 1; ++i) {
- d.point.setX(0.5 * (xTarget[i + 1] + xTarget[i]));
+ d.x = (0.5 * (xTarget[i + 1] + xTarget[i]));
data.append(d);
}
if (rules.horizontal == Qt::RepeatTile)
- data[data.size() - 1].source.setWidth(repeatWidth);
+ data[data.size() - 1].width = repeatWidth;
}
if (rules.vertical == Qt::RepeatTile) {
for (int i = 1; i < columns - 1; ++i)
- data[data.size() - i].source.setHeight(repeatHeight);
+ data[data.size() - i].height = repeatHeight;
}
}
if (opaqueData.size())
- qDrawPixmaps(painter, opaqueData.data(), opaqueData.size(), pixmap, QDrawPixmaps::OpaqueHint);
+ painter->drawPixmapFragments(opaqueData.data(), opaqueData.size(), pixmap, QPainter::OpaqueHint);
if (translucentData.size())
- qDrawPixmaps(painter, translucentData.data(), translucentData.size(), pixmap);
-}
-
-/*!
- \class QDrawPixmaps::Data
- \since 4.6
- \internal
-
- This structure is used with the qDrawPixmaps() function.
-
- QPointF point: Specifies the center of the target rectangle.
- QRectF source: Specifies the source rectangle in the pixmap passed into the qDrawPixmaps() call.
- qreal scaleX: Specifies the horizontal scale of the target rectangle.
- qreal scaleY: Specifies the vertical scale of the target rectangle.
- qreal rotation: Specifies the rotation of the target rectangle in degrees.
- The target rectangle is rotated after scaling.
- qreal opacity: Specifies the opacity of the rectangle.
-*/
-
-/*!
- \enum QDrawPixmaps::DrawingHint
- \internal
-*/
-
-/*!
- \internal
- \since 4.6
-
- This function is used to draw \a pixmap, or a sub-rectangle of \a pixmap, at multiple positions
- with different scale, rotation and opacity on \a painter. \a drawingData is an array of \a
- dataCount elements specifying the parameters used to draw each pixmap instance.
- This can be used for example to implement a particle system.
-*/
-void qDrawPixmaps(QPainter *painter, const QDrawPixmaps::Data *drawingData, int dataCount, const QPixmap &pixmap, QDrawPixmaps::DrawingHints hints)
-{
- QPaintEngine *engine = painter->paintEngine();
- if (!engine)
- return;
-
- if (engine->isExtended()) {
- static_cast<QPaintEngineEx *>(engine)->drawPixmaps(drawingData, dataCount, pixmap, hints);
- } else {
- qreal oldOpacity = painter->opacity();
- QTransform oldTransform = painter->transform();
-
- for (int i = 0; i < dataCount; ++i) {
- QTransform transform = oldTransform;
- qreal xOffset = 0;
- qreal yOffset = 0;
- if (drawingData[i].rotation == 0) {
- xOffset = drawingData[i].point.x();
- yOffset = drawingData[i].point.y();
- } else {
- transform.translate(drawingData[i].point.x(), drawingData[i].point.y());
- transform.rotate(drawingData[i].rotation);
- }
- painter->setTransform(transform);
- painter->setOpacity(oldOpacity * drawingData[i].opacity);
-
- qreal w = drawingData[i].scaleX * drawingData[i].source.width();
- qreal h = drawingData[i].scaleY * drawingData[i].source.height();
- painter->drawPixmap(QRectF(-0.5 * w + xOffset, -0.5 * h + yOffset, w, h), pixmap, drawingData[i].source);
- }
-
- painter->setOpacity(oldOpacity);
- painter->setTransform(oldTransform);
- }
+ painter->drawPixmapFragments(translucentData.data(), translucentData.size(), pixmap);
}
QT_END_NAMESPACE
diff --git a/src/gui/painting/qdrawutil.h b/src/gui/painting/qdrawutil.h
index 2801b2fbb3..31e352f6f5 100644
--- a/src/gui/painting/qdrawutil.h
+++ b/src/gui/painting/qdrawutil.h
@@ -188,31 +188,6 @@ inline void qDrawBorderPixmap(QPainter *painter,
qDrawBorderPixmap(painter, target, margins, pixmap, pixmap.rect(), margins);
}
-// For internal use only.
-namespace QDrawPixmaps
-{
- struct Data
- {
- QPointF point;
- QRectF source;
- qreal scaleX;
- qreal scaleY;
- qreal rotation;
- qreal opacity;
- };
-
- enum DrawingHint
- {
- OpaqueHint = 0x01
- };
-
- Q_DECLARE_FLAGS(DrawingHints, DrawingHint)
-}
-
-// This function is private and may change without notice. Do not use outside Qt!!!
-Q_GUI_EXPORT void qDrawPixmaps(QPainter *painter, const QDrawPixmaps::Data *drawingData,
- int dataCount, const QPixmap &pixmap, QDrawPixmaps::DrawingHints hints = 0);
-
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/gui/painting/qemulationpaintengine.cpp b/src/gui/painting/qemulationpaintengine.cpp
index f2f0c73035..0510b103a7 100644
--- a/src/gui/painting/qemulationpaintengine.cpp
+++ b/src/gui/painting/qemulationpaintengine.cpp
@@ -172,9 +172,44 @@ void QEmulationPaintEngine::drawTextItem(const QPointF &p, const QTextItem &text
QRectF rect(p.x(), p.y() - ti.ascent.toReal(), ti.width.toReal(), (ti.ascent + ti.descent + 1).toReal());
fillBGRect(rect);
}
+
+ QPainterState *s = state();
+ Qt::BrushStyle style = qbrush_style(s->pen.brush());
+ if (style >= Qt::LinearGradientPattern && style <= Qt::ConicalGradientPattern)
+ {
+ QPen savedPen = s->pen;
+ QGradient g = *s->pen.brush().gradient();
+
+ if (g.coordinateMode() > QGradient::LogicalMode) {
+ QTransform mat = s->pen.brush().transform();
+ if (g.coordinateMode() == QGradient::StretchToDeviceMode) {
+ mat.scale(real_engine->painter()->device()->width(), real_engine->painter()->device()->height());
+ } else if (g.coordinateMode() == QGradient::ObjectBoundingMode) {
+ const QTextItemInt &ti = static_cast<const QTextItemInt &>(textItem);
+ QRectF r(p.x(), p.y() - ti.ascent.toReal(), ti.width.toReal(), (ti.ascent + ti.descent + 1).toReal());
+ mat.translate(r.x(), r.y());
+ mat.scale(r.width(), r.height());
+ }
+ g.setCoordinateMode(QGradient::LogicalMode);
+ QBrush brush(g);
+ brush.setTransform(mat);
+ s->pen.setBrush(brush);
+ penChanged();
+ real_engine->drawTextItem(p, textItem);
+ s->pen = savedPen;
+ penChanged();
+ return;
+ }
+ }
+
real_engine->drawTextItem(p, textItem);
}
+void QEmulationPaintEngine::drawStaticTextItem(QStaticTextItem *item)
+{
+ real_engine->drawStaticTextItem(item);
+}
+
void QEmulationPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s)
{
if (state()->bgMode == Qt::OpaqueMode && pixmap.isQBitmap())
diff --git a/src/gui/painting/qemulationpaintengine_p.h b/src/gui/painting/qemulationpaintengine_p.h
index 0ed641b250..5835f10afb 100644
--- a/src/gui/painting/qemulationpaintengine_p.h
+++ b/src/gui/painting/qemulationpaintengine_p.h
@@ -78,6 +78,7 @@ public:
virtual void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr);
virtual void drawTextItem(const QPointF &p, const QTextItem &textItem);
+ virtual void drawStaticTextItem(QStaticTextItem *item);
virtual void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s);
virtual void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr, Qt::ImageConversionFlags flags);
diff --git a/src/gui/painting/qmemrotate_p.h b/src/gui/painting/qmemrotate_p.h
index 8df0520f03..2911860d3b 100644
--- a/src/gui/painting/qmemrotate_p.h
+++ b/src/gui/painting/qmemrotate_p.h
@@ -82,8 +82,9 @@ QT_BEGIN_NAMESPACE
void Q_GUI_QWS_EXPORT qt_memrotate270(const srctype*, int, int, int, desttype*, int)
void Q_GUI_EXPORT qt_memrotate90(const quint32*, int, int, int, quint32*, int);
+void Q_GUI_QWS_EXPORT qt_memrotate180(const quint32*, int, int, int, quint32*, int);
+void Q_GUI_QWS_EXPORT qt_memrotate270(const quint32*, int, int, int, quint32*, int);
-QT_DECL_MEMROTATE(quint32, quint32);
QT_DECL_MEMROTATE(quint32, quint16);
QT_DECL_MEMROTATE(quint16, quint32);
QT_DECL_MEMROTATE(quint16, quint16);
diff --git a/src/gui/painting/qpaintbuffer.cpp b/src/gui/painting/qpaintbuffer.cpp
index 2344c04ec2..39b76c8e0f 100644
--- a/src/gui/painting/qpaintbuffer.cpp
+++ b/src/gui/painting/qpaintbuffer.cpp
@@ -45,6 +45,8 @@
#include <private/qfontengine_p.h>
#include <private/qemulationpaintengine_p.h>
#include <private/qimage_p.h>
+#include <qstatictext.h>
+#include <private/qstatictext_p.h>
#include <QDebug>
@@ -306,6 +308,8 @@ public:
Q_Q(QPaintBufferEngine);
q->buffer->addCommand(QPaintBufferPrivate::Cmd_SystemStateChanged, QVariant(systemClip));
}
+
+ QTransform last;
};
@@ -492,6 +496,32 @@ void QPaintBufferEngine::renderHintsChanged()
void QPaintBufferEngine::transformChanged()
{
+ Q_D(QPaintBufferEngine);
+ const QTransform &transform = state()->matrix;
+
+ QTransform delta;
+
+ bool invertible = false;
+ if (transform.type() <= QTransform::TxScale && transform.type() == d->last.type())
+ delta = transform * d->last.inverted(&invertible);
+
+ d->last = transform;
+
+ if (invertible && delta.type() == QTransform::TxNone)
+ return;
+
+ if (invertible && delta.type() == QTransform::TxTranslate) {
+#ifdef QPAINTBUFFER_DEBUG_DRAW
+ qDebug() << "QPaintBufferEngine: transformChanged (translate only) " << state()->matrix;
+#endif
+ QPaintBufferCommand *cmd =
+ buffer->addCommand(QPaintBufferPrivate::Cmd_Translate);
+
+ qreal data[] = { delta.dx(), delta.dy() };
+ cmd->extra = buffer->addData((qreal *) data, 2);
+ return;
+ }
+
// ### accumulate, like in QBrush case...
if (!buffer->commands.isEmpty()
&& buffer->commands.last().id == QPaintBufferPrivate::Cmd_SetTransform) {
@@ -960,6 +990,18 @@ void QPaintBufferEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pm, con
buffer->updateBoundingRect(r);
}
+void QPaintBufferEngine::drawStaticTextItem(QStaticTextItem *staticTextItem)
+{
+ QString text = QString(staticTextItem->chars, staticTextItem->numChars);
+
+ QStaticText staticText(text);
+ staticText.prepare(state()->matrix, staticTextItem->font);
+
+ QVariantList variants;
+ variants << QVariant(staticTextItem->font) << QVariant::fromValue(staticText);
+ buffer->addCommand(QPaintBufferPrivate::Cmd_DrawStaticText, QVariant(variants));
+}
+
void QPaintBufferEngine::drawTextItem(const QPointF &pos, const QTextItem &ti)
{
#ifdef QPAINTBUFFER_DEBUG_DRAW
@@ -999,6 +1041,7 @@ void QPaintBufferEngine::drawTextItem(const QPointF &pos, const QTextItem &ti)
void QPaintBufferEngine::setState(QPainterState *s)
{
+ Q_D(QPaintBufferEngine);
if (m_begin_detected) {
#ifdef QPAINTBUFFER_DEBUG_DRAW
qDebug() << "QPaintBufferEngine: setState: begin, ignoring.";
@@ -1017,6 +1060,8 @@ void QPaintBufferEngine::setState(QPainterState *s)
buffer->addCommand(QPaintBufferPrivate::Cmd_Restore);
}
+ d->last = s->matrix;
+
QPaintEngineEx::setState(s);
}
@@ -1138,6 +1183,15 @@ void QPainterReplayer::process(const QPaintBufferCommand &cmd)
painter->setTransform(xform * m_world_matrix);
break; }
+ case QPaintBufferPrivate::Cmd_Translate: {
+ QPointF delta(d->floats.at(cmd.extra), d->floats.at(cmd.extra+1));
+#ifdef QPAINTBUFFER_DEBUG_DRAW
+ qDebug() << " -> Cmd_Translate, offset: " << cmd.offset << delta;
+#endif
+ painter->translate(delta.x(), delta.y());
+ return;
+ }
+
case QPaintBufferPrivate::Cmd_SetCompositionMode: {
QPainter::CompositionMode mode = (QPainter::CompositionMode) cmd.extra;
#ifdef QPAINTBUFFER_DEBUG_DRAW
@@ -1425,6 +1479,19 @@ void QPainterReplayer::process(const QPaintBufferCommand &cmd)
#endif
painter->setClipRegion(region, Qt::ClipOperation(cmd.extra));
break; }
+
+ case QPaintBufferPrivate::Cmd_DrawStaticText: {
+
+ QVariantList variants(d->variants.at(cmd.offset).value<QVariantList>());
+
+ QFont font(variants.at(0).value<QFont>());
+ QStaticText text(variants.at(0).value<QStaticText>());
+
+ painter->setFont(font);
+ painter->drawStaticText(QPointF(0, 0), text);
+
+ break;
+ }
case QPaintBufferPrivate::Cmd_DrawText: {
QPointF pos(d->floats.at(cmd.extra), d->floats.at(cmd.extra+1));
@@ -1770,8 +1837,28 @@ struct QPaintBufferCacheEntry
QVariant::Type type;
quint64 cacheKey;
};
+
+struct QPaintBufferCacheEntryV2
+{
+ enum Type {
+ ImageKey,
+ PixmapKey
+ };
+
+ struct Flags {
+ uint type : 8;
+ uint key : 24;
+ };
+
+ union {
+ Flags flags;
+ uint bits;
+ };
+};
+
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QPaintBufferCacheEntry)
+Q_DECLARE_METATYPE(QPaintBufferCacheEntryV2)
QT_BEGIN_NAMESPACE
QDataStream &operator<<(QDataStream &stream, const QPaintBufferCacheEntry &entry)
@@ -1784,10 +1871,22 @@ QDataStream &operator>>(QDataStream &stream, QPaintBufferCacheEntry &entry)
return stream >> entry.type >> entry.cacheKey;
}
+QDataStream &operator<<(QDataStream &stream, const QPaintBufferCacheEntryV2 &entry)
+{
+ return stream << entry.bits;
+}
+
+QDataStream &operator>>(QDataStream &stream, QPaintBufferCacheEntryV2 &entry)
+{
+ return stream >> entry.bits;
+}
+
static int qRegisterPaintBufferMetaTypes()
{
qRegisterMetaType<QPaintBufferCacheEntry>();
qRegisterMetaTypeStreamOperators<QPaintBufferCacheEntry>("QPaintBufferCacheEntry");
+ qRegisterMetaType<QPaintBufferCacheEntryV2>();
+ qRegisterMetaTypeStreamOperators<QPaintBufferCacheEntryV2>("QPaintBufferCacheEntryV2");
return 0; // something
}
@@ -1796,6 +1895,9 @@ Q_CONSTRUCTOR_FUNCTION(qRegisterPaintBufferMetaTypes)
QDataStream &operator<<(QDataStream &stream, const QPaintBuffer &buffer)
{
+ QHash<qint64, uint> pixmapKeys;
+ QHash<qint64, uint> imageKeys;
+
QHash<qint64, QPixmap> pixmaps;
QHash<qint64, QImage> images;
@@ -1804,19 +1906,33 @@ QDataStream &operator<<(QDataStream &stream, const QPaintBuffer &buffer)
const QVariant &v = variants.at(i);
if (v.type() == QVariant::Image) {
const QImage image(v.value<QImage>());
- images[image.cacheKey()] = image;
- QPaintBufferCacheEntry entry;
- entry.type = QVariant::Image;
- entry.cacheKey = image.cacheKey();
+ QPaintBufferCacheEntryV2 entry;
+ entry.flags.type = QPaintBufferCacheEntryV2::ImageKey;
+
+ QHash<qint64, uint>::iterator it = imageKeys.find(image.cacheKey());
+ if (it != imageKeys.end()) {
+ entry.flags.key = *it;
+ } else {
+ imageKeys[image.cacheKey()] = entry.flags.key = images.size();
+ images[images.size()] = image;
+ }
+
variants[i] = QVariant::fromValue(entry);
} else if (v.type() == QVariant::Pixmap) {
const QPixmap pixmap(v.value<QPixmap>());
- pixmaps[pixmap.cacheKey()] = pixmap;
- QPaintBufferCacheEntry entry;
- entry.type = QVariant::Pixmap;
- entry.cacheKey = pixmap.cacheKey();
+ QPaintBufferCacheEntryV2 entry;
+ entry.flags.type = QPaintBufferCacheEntryV2::PixmapKey;
+
+ QHash<qint64, uint>::iterator it = pixmapKeys.find(pixmap.cacheKey());
+ if (it != pixmapKeys.end()) {
+ entry.flags.key = *it;
+ } else {
+ pixmapKeys[pixmap.cacheKey()] = entry.flags.key = pixmaps.size();
+ pixmaps[pixmaps.size()] = pixmap;
+ }
+
variants[i] = QVariant::fromValue(entry);
}
}
@@ -1858,6 +1974,15 @@ QDataStream &operator>>(QDataStream &stream, QPaintBuffer &buffer)
variants[i] = QVariant(images.value(entry.cacheKey));
else
variants[i] = QVariant(pixmaps.value(entry.cacheKey));
+ } else if (v.canConvert<QPaintBufferCacheEntryV2>()) {
+ QPaintBufferCacheEntryV2 entry = v.value<QPaintBufferCacheEntryV2>();
+
+ if (entry.flags.type == QPaintBufferCacheEntryV2::ImageKey)
+ variants[i] = QVariant(images.value(entry.flags.key));
+ else if (entry.flags.type == QPaintBufferCacheEntryV2::PixmapKey)
+ variants[i] = QVariant(pixmaps.value(entry.flags.key));
+ else
+ qWarning() << "operator<<(QDataStream &stream, QPaintBuffer &buffer): unrecognized cache entry type:" << entry.flags.type;
}
}
diff --git a/src/gui/painting/qpaintbuffer_p.h b/src/gui/painting/qpaintbuffer_p.h
index 79d7b35713..0fde290632 100644
--- a/src/gui/painting/qpaintbuffer_p.h
+++ b/src/gui/painting/qpaintbuffer_p.h
@@ -183,6 +183,10 @@ public:
Cmd_DrawTiledPixmap,
Cmd_SystemStateChanged,
+ Cmd_Translate,
+ Cmd_DrawStaticText,
+
+ // new commands must be added above this line
Cmd_LastCommand
};
@@ -394,6 +398,7 @@ public:
virtual void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s);
virtual void drawTextItem(const QPointF &pos, const QTextItem &ti);
+ virtual void drawStaticTextItem(QStaticTextItem *staticTextItem);
virtual void setState(QPainterState *s);
virtual uint flags() const {return QPaintEngineEx::DoNotEmulate;}
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 3c2cc8cd7d..03d08250d8 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -67,6 +67,7 @@
// #include <private/qpolygonclipper_p.h>
// #include <private/qrasterizer_p.h>
#include <private/qimage_p.h>
+#include <private/qstatictext_p.h>
#include "qpaintengine_raster_p.h"
// #include "qbezier_p.h"
@@ -1724,9 +1725,10 @@ void QRasterPaintEngine::stroke(const QVectorPath &path, const QPen &pen)
if (patternLength > 0) {
int n = qFloor(dashOffset / patternLength);
dashOffset -= n * patternLength;
- while (dashOffset > pattern.at(dashIndex)) {
+ while (dashOffset >= pattern.at(dashIndex)) {
dashOffset -= pattern.at(dashIndex);
- dashIndex = (dashIndex + 1) % pattern.size();
+ if (++dashIndex >= pattern.size())
+ dashIndex = 0;
inDash = !inDash;
}
}
@@ -1737,7 +1739,6 @@ void QRasterPaintEngine::stroke(const QVectorPath &path, const QPen &pen)
const QLineF *lines = reinterpret_cast<const QLineF *>(path.points());
for (int i = 0; i < lineCount; ++i) {
- dashOffset = s->lastPen.dashOffset();
if (lines[i].p1() == lines[i].p2()) {
if (s->lastPen.capStyle() != Qt::FlatCap) {
QPointF p = lines[i].p1();
@@ -3002,27 +3003,22 @@ void QRasterPaintEngine::alphaPenBlt(const void* src, int bpl, int depth, int rx
blend(current, spans, &s->penData);
}
-void QRasterPaintEngine::drawCachedGlyphs(const QPointF &p, const QTextItemInt &ti)
+void QRasterPaintEngine::drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs,
+ const QFixedPoint *positions, QFontEngine *fontEngine)
{
Q_D(QRasterPaintEngine);
QRasterPaintEngineState *s = state();
- QVarLengthArray<QFixedPoint> positions;
- QVarLengthArray<glyph_t> glyphs;
- QTransform matrix = s->matrix;
- matrix.translate(p.x(), p.y());
- ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
-
- QFontEngineGlyphCache::Type glyphType = ti.fontEngine->glyphFormat >= 0 ? QFontEngineGlyphCache::Type(ti.fontEngine->glyphFormat) : d->glyphCacheType;
+ QFontEngineGlyphCache::Type glyphType = fontEngine->glyphFormat >= 0 ? QFontEngineGlyphCache::Type(fontEngine->glyphFormat) : d->glyphCacheType;
QImageTextureGlyphCache *cache =
- (QImageTextureGlyphCache *) ti.fontEngine->glyphCache(0, glyphType, s->matrix);
+ static_cast<QImageTextureGlyphCache *>(fontEngine->glyphCache(0, glyphType, s->matrix));
if (!cache) {
cache = new QImageTextureGlyphCache(glyphType, s->matrix);
- ti.fontEngine->setGlyphCache(0, cache);
+ fontEngine->setGlyphCache(0, cache);
}
- cache->populate(ti, glyphs, positions);
+ cache->populate(fontEngine, numGlyphs, glyphs, positions);
const QImage &image = cache->image();
int bpl = image.bytesPerLine();
@@ -3040,7 +3036,7 @@ void QRasterPaintEngine::drawCachedGlyphs(const QPointF &p, const QTextItemInt &
const QFixed offs = QFixed::fromReal(aliasedCoordinateDelta);
const uchar *bits = image.bits();
- for (int i=0; i<glyphs.size(); ++i) {
+ for (int i=0; i<numGlyphs; ++i) {
const QTextureGlyphCache::Coord &c = cache->coords.value(glyphs[i]);
int x = qFloor(positions[i].x + offs) + c.baseLineX - margin;
int y = qFloor(positions[i].y + offs) - c.baseLineY - margin;
@@ -3218,6 +3214,18 @@ QRasterPaintEnginePrivate::getPenFunc(const QRectF &rect,
}
/*!
+ \reimp
+*/
+void QRasterPaintEngine::drawStaticTextItem(QStaticTextItem *textItem)
+{
+ ensurePen();
+ ensureState();
+
+ drawCachedGlyphs(textItem->numGlyphs, textItem->glyphs, textItem->glyphPositions,
+ textItem->fontEngine);
+}
+
+/*!
\reimp
*/
void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem)
@@ -3265,7 +3273,17 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
drawCached = false;
#endif
if (drawCached) {
- drawCachedGlyphs(p, ti);
+ QRasterPaintEngineState *s = state();
+
+ QVarLengthArray<QFixedPoint> positions;
+ QVarLengthArray<glyph_t> glyphs;
+
+ QTransform matrix = s->matrix;
+ matrix.translate(p.x(), p.y());
+
+ ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
+
+ drawCachedGlyphs(glyphs.size(), glyphs.constData(), positions.constData(), ti.fontEngine);
return;
}
@@ -3372,7 +3390,7 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
};
for(int i = 0; i < glyphs.size(); i++) {
- QFontEngineFT::Glyph *glyph = gset->glyph_data.value(glyphs[i]);
+ QFontEngineFT::Glyph *glyph = gset->getGlyph(glyphs[i]);
if (!glyph || glyph->format != neededFormat) {
if (!lockedFace)
@@ -3608,13 +3626,14 @@ void QRasterPaintEnginePrivate::rasterizeLine_dashed(QLineF line,
} else {
*dashOffset = 0;
*inDash = !(*inDash);
- *dashIndex = (*dashIndex + 1) % pattern.size();
+ if (++*dashIndex >= pattern.size())
+ *dashIndex = 0;
length -= dash;
l.setLength(dash);
line.setP1(l.p2());
}
- if (rasterize && dash != 0)
+ if (rasterize && dash > 0)
rasterizer->rasterizeLine(l.p1(), l.p2(), width / dash, squareCap);
}
}
diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h
index a1c73ccdc2..55eb82ee50 100644
--- a/src/gui/painting/qpaintengine_raster_p.h
+++ b/src/gui/painting/qpaintengine_raster_p.h
@@ -203,6 +203,8 @@ public:
void clip(const QRect &rect, Qt::ClipOperation op);
void clip(const QRegion &region, Qt::ClipOperation op);
+ void drawStaticTextItem(QStaticTextItem *textItem);
+
enum ClipType {
RectClip,
ComplexClip
@@ -257,7 +259,8 @@ private:
void fillRect(const QRectF &rect, QSpanData *data);
void drawBitmap(const QPointF &pos, const QImage &image, QSpanData *fill);
- void drawCachedGlyphs(const QPointF &p, const QTextItemInt &ti);
+ void drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs, const QFixedPoint *positions,
+ QFontEngine *fontEngine);
#if defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE)
void drawGlyphsS60(const QPointF &p, const QTextItemInt &ti);
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index 4f2fffaa24..1fd622d5e5 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -893,7 +893,7 @@ void QPaintEngineEx::drawPoints(const QPoint *points, int pointCount)
for (int i=0; i<count; ++i) {
pts[++oset] = points[i].x();
pts[++oset] = points[i].y();
- pts[++oset] = points[i].x() + 1/63;
+ pts[++oset] = points[i].x() + 1/63.;
pts[++oset] = points[i].y();
}
QVectorPath path(pts, count * 2, qpaintengineex_line_types_16, QVectorPath::LinesHint);
@@ -970,23 +970,26 @@ void QPaintEngineEx::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, con
fill(path, brush);
}
-void QPaintEngineEx::drawPixmaps(const QDrawPixmaps::Data *drawingData, int dataCount, const QPixmap &pixmap, QDrawPixmaps::DrawingHints /*hints*/)
+void QPaintEngineEx::drawPixmapFragments(const QPainter::PixmapFragment *fragments, int fragmentCount,
+ const QPixmap &pixmap, QPainter::PixmapFragmentHints /*hints*/)
{
qreal oldOpacity = state()->opacity;
QTransform oldTransform = state()->matrix;
- for (int i = 0; i < dataCount; ++i) {
+ for (int i = 0; i < fragmentCount; ++i) {
QTransform transform = oldTransform;
- transform.translate(drawingData[i].point.x(), drawingData[i].point.y());
- transform.rotate(drawingData[i].rotation);
- state()->opacity = oldOpacity * drawingData[i].opacity;
+ transform.translate(fragments[i].x, fragments[i].y);
+ transform.rotate(fragments[i].rotation);
+ state()->opacity = oldOpacity * fragments[i].opacity;
state()->matrix = transform;
opacityChanged();
transformChanged();
- qreal w = drawingData[i].scaleX * drawingData[i].source.width();
- qreal h = drawingData[i].scaleY * drawingData[i].source.height();
- drawPixmap(QRectF(-0.5 * w, -0.5 * h, w, h), pixmap, drawingData[i].source);
+ qreal w = fragments[i].scaleX * fragments[i].width;
+ qreal h = fragments[i].scaleY * fragments[i].height;
+ QRectF sourceRect(fragments[i].sourceLeft, fragments[i].sourceTop,
+ fragments[i].width, fragments[i].height);
+ drawPixmap(QRectF(-0.5 * w, -0.5 * h, w, h), pixmap, sourceRect);
}
state()->opacity = oldOpacity;
diff --git a/src/gui/painting/qpaintengineex_p.h b/src/gui/painting/qpaintengineex_p.h
index fccd1dcdc2..6c654bd85c 100644
--- a/src/gui/painting/qpaintengineex_p.h
+++ b/src/gui/painting/qpaintengineex_p.h
@@ -70,6 +70,7 @@ QT_MODULE(Gui)
class QPainterState;
class QPaintEngineExPrivate;
+class QStaticTextItem;
struct StrokeHandler;
struct QIntRect {
@@ -196,10 +197,13 @@ public:
virtual void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s);
- virtual void drawPixmaps(const QDrawPixmaps::Data *drawingData, int dataCount, const QPixmap &pixmap, QFlags<QDrawPixmaps::DrawingHint> hints);
+ virtual void drawPixmapFragments(const QPainter::PixmapFragment *fragments, int fragmentCount, const QPixmap &pixmap,
+ QFlags<QPainter::PixmapFragmentHint> hints);
virtual void updateState(const QPaintEngineState &state);
+ virtual void drawStaticTextItem(QStaticTextItem *) = 0;
+
virtual void setState(QPainterState *s);
inline QPainterState *state() { return static_cast<QPainterState *>(QPaintEngine::state); }
inline const QPainterState *state() const { return static_cast<const QPainterState *>(QPaintEngine::state); }
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 075c457e3b..a1ed8f5522 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -38,6 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+
// QtCore
#include <qdebug.h>
#include <qmath.h>
@@ -69,6 +70,8 @@
#include <private/qwidget_p.h>
#include <private/qpaintengine_raster_p.h>
#include <private/qmath_p.h>
+#include <qstatictext.h>
+#include <private/qstatictext_p.h>
QT_BEGIN_NAMESPACE
@@ -5697,6 +5700,78 @@ void QPainter::drawImage(const QRectF &targetRect, const QImage &image, const QR
d->engine->drawImage(QRectF(x, y, w, h), image, QRectF(sx, sy, sw, sh), flags);
}
+
+void qt_draw_glyphs(QPainter *painter, const quint32 *glyphArray, const QPointF *positionArray,
+ int glyphCount)
+{
+ QPainterPrivate *painter_d = QPainterPrivate::get(painter);
+ painter_d->drawGlyphs(glyphArray, positionArray, glyphCount);
+}
+
+void QPainterPrivate::drawGlyphs(const quint32 *glyphArray, const QPointF *positionArray,
+ int glyphCount)
+{
+ updateState(state);
+
+ QFontEngine *fontEngine = state->font.d->engineForScript(QUnicodeTables::Common);
+
+ QVarLengthArray<QFixedPoint, 128> positions;
+ for (int i=0; i<glyphCount; ++i) {
+ QFixedPoint fp = QFixedPoint::fromPointF(positionArray[i]);
+ positions.append(fp);
+ }
+
+ if (extended != 0) {
+ QStaticTextItem staticTextItem;
+ staticTextItem.color = state->pen.color();
+ staticTextItem.font = state->font;
+ staticTextItem.fontEngine = fontEngine;
+ staticTextItem.numGlyphs = glyphCount;
+ staticTextItem.glyphs = reinterpret_cast<glyph_t *>(const_cast<glyph_t *>(glyphArray));
+ staticTextItem.glyphPositions = positions.data();
+
+ extended->drawStaticTextItem(&staticTextItem);
+ } else {
+ QTextItemInt textItem;
+ textItem.f = &state->font;
+ textItem.fontEngine = fontEngine;
+
+ QVarLengthArray<QFixed, 128> advances(glyphCount);
+ QVarLengthArray<QGlyphJustification, 128> glyphJustifications(glyphCount);
+ QVarLengthArray<HB_GlyphAttributes, 128> glyphAttributes(glyphCount);
+ qMemSet(glyphAttributes.data(), 0, glyphAttributes.size() * sizeof(HB_GlyphAttributes));
+ qMemSet(advances.data(), 0, advances.size() * sizeof(QFixed));
+ qMemSet(glyphJustifications.data(), 0, glyphJustifications.size() * sizeof(QGlyphJustification));
+
+ textItem.glyphs.numGlyphs = glyphCount;
+ textItem.glyphs.glyphs = reinterpret_cast<HB_Glyph *>(const_cast<quint32 *>(glyphArray));
+ textItem.glyphs.offsets = positions.data();
+ textItem.glyphs.advances_x = advances.data();
+ textItem.glyphs.advances_y = advances.data();
+ textItem.glyphs.justifications = glyphJustifications.data();
+ textItem.glyphs.attributes = glyphAttributes.data();
+
+ engine->drawTextItem(QPointF(0, 0), textItem);
+ }
+}
+
+/*!
+
+ \fn void QPainter::drawStaticText(const QPoint &position, const QStaticText &staticText)
+ \since 4.7
+ \overload
+
+ Draws the \a staticText at the \a position.
+*/
+
+/*!
+ \fn void QPainter::drawStaticText(int x, int y, const QStaticText &staticText)
+ \since 4.7
+ \overload
+
+ Draws the \a staticText at coordinates \a x and \a y.
+*/
+
/*!
\fn void QPainter::drawText(const QPointF &position, const QString &text)
@@ -5720,6 +5795,124 @@ void QPainter::drawText(const QPointF &p, const QString &str)
}
/*!
+ \since 4.7
+
+ Draws the given \a staticText at the given \a position.
+
+ The text will be drawn using the font and the transformation set on the painter. If the
+ font and/or transformation set on the painter are different from the ones used to initialize
+ the layout of the QStaticText, then the layout will have to be recalculated. Use
+ QStaticText::prepare() to initialize \a staticText with the font and transformation with which
+ it will later be drawn.
+
+ If \a position is not the same as when \a staticText was initialized, or when it was last drawn,
+ then there will be a slight overhead when translating the text to its new position.
+
+ \note If the painter's transformation is not affine, then \a staticText will be drawn using regular
+ calls to drawText(), losing any potential performance improvement.
+
+ \sa QStaticText
+*/
+void QPainter::drawStaticText(const QPointF &position, const QStaticText &staticText)
+{
+ Q_D(QPainter);
+ if (!d->engine || staticText.text().isEmpty() || pen().style() == Qt::NoPen)
+ return;
+
+ QStaticTextPrivate *staticText_d =
+ const_cast<QStaticTextPrivate *>(QStaticTextPrivate::get(&staticText));
+
+ // If we don't have an extended paint engine, or if the painter is projected,
+ // we go through standard code path
+ if (d->extended == 0 || !d->state->matrix.isAffine()) {
+ staticText_d->paintText(position, this);
+ return;
+ }
+
+ // Don't recalculate entire layout because of translation, rather add the dx and dy
+ // into the position to move each text item the correct distance.
+ QPointF transformedPosition = position * d->state->matrix;
+ QTransform matrix = d->state->matrix;
+
+ // The translation has been applied to transformedPosition. Remove translation
+ // component from matrix.
+ if (d->state->matrix.isTranslating()) {
+ qreal m11 = d->state->matrix.m11();
+ qreal m12 = d->state->matrix.m12();
+ qreal m13 = d->state->matrix.m13();
+ qreal m21 = d->state->matrix.m21();
+ qreal m22 = d->state->matrix.m22();
+ qreal m23 = d->state->matrix.m23();
+ qreal m33 = d->state->matrix.m33();
+
+ d->state->matrix.setMatrix(m11, m12, m13,
+ m21, m22, m23,
+ 0.0, 0.0, m33);
+ }
+
+ // If the transform is not identical to the text transform,
+ // we have to relayout the text (for other transformations than plain translation)
+ bool staticTextNeedsReinit = false;
+ if (staticText_d->matrix != d->state->matrix) {
+ staticText_d->matrix = d->state->matrix;
+ staticTextNeedsReinit = true;
+ }
+
+ bool restoreWhenFinished = false;
+ if (staticText_d->needsClipRect) {
+ save();
+ setClipRect(QRectF(position, staticText_d->maximumSize));
+
+ restoreWhenFinished = true;
+ }
+
+ if (font() != staticText_d->font) {
+ staticText_d->font = font();
+ staticTextNeedsReinit = true;
+ }
+
+ // Recreate the layout of the static text because the matrix or font has changed
+ if (staticTextNeedsReinit)
+ staticText_d->init();
+
+ if (transformedPosition != staticText_d->position) { // Translate to actual position
+ QFixed fx = QFixed::fromReal(transformedPosition.x());
+ QFixed fy = QFixed::fromReal(transformedPosition.y());
+ QFixed oldX = QFixed::fromReal(staticText_d->position.x());
+ QFixed oldY = QFixed::fromReal(staticText_d->position.y());
+ for (int item=0; item<staticText_d->itemCount;++item) {
+ QStaticTextItem *textItem = staticText_d->items + item;
+ for (int i=0; i<textItem->numGlyphs; ++i) {
+ textItem->glyphPositions[i].x += fx - oldX;
+ textItem->glyphPositions[i].y += fy - oldY;
+ }
+ textItem->userDataNeedsUpdate = true;
+ }
+
+ staticText_d->position = transformedPosition;
+ }
+
+ QPen oldPen = d->state->pen;
+ QColor currentColor = oldPen.color();
+ for (int i=0; i<staticText_d->itemCount; ++i) {
+ QStaticTextItem *item = staticText_d->items + i;
+ if (currentColor != item->color) {
+ setPen(item->color);
+ currentColor = item->color;
+ }
+ d->extended->drawStaticTextItem(item);
+ }
+ if (currentColor != oldPen.color())
+ setPen(oldPen);
+
+ if (restoreWhenFinished)
+ restore();
+
+ if (matrix.isTranslating())
+ d->state->matrix = matrix;
+}
+
+/*!
\internal
*/
void QPainter::drawText(const QPointF &p, const QString &str, int tf, int justificationPadding)
@@ -7801,10 +7994,11 @@ start_lengthVariant:
for (int i = 0; i < textLayout.lineCount(); i++) {
QTextLine line = textLayout.lineAt(i);
+ qreal advance = textLayout.engine()->lines[i].textAdvance.toReal();
if (tf & Qt::AlignRight)
- xoff = r.width() - line.naturalTextWidth();
+ xoff = r.width() - advance;
else if (tf & Qt::AlignHCenter)
- xoff = (r.width() - line.naturalTextWidth())/2;
+ xoff = (r.width() - advance)/2;
line.draw(painter, QPointF(r.x() + xoff + line.x(), r.y() + yoff));
}
@@ -8709,6 +8903,167 @@ QTransform QPainter::combinedTransform() const
return d->state->worldMatrix * d->viewTransform();
}
+/*!
+ \since 4.7
+
+ This function is used to draw \a pixmap, or a sub-rectangle of \a pixmap,
+ at multiple positions with different scale, rotation and opacity. \a
+ fragments is an array of \a fragmentCount elements specifying the
+ parameters used to draw each pixmap fragment. The \a hints
+ parameter can be used to pass in drawing hints.
+
+ This function is potentially faster than multiple calls to drawPixmap(),
+ since the backend can optimize state changes.
+
+ \sa QPainter::PixmapFragment, QPainter::PixmapFragmentHint
+*/
+
+void QPainter::drawPixmapFragments(const PixmapFragment *fragments, int fragmentCount,
+ const QPixmap &pixmap, PixmapFragmentHints hints)
+{
+ Q_D(QPainter);
+
+ if (!d->engine)
+ return;
+
+ if (d->engine->isExtended()) {
+ d->extended->drawPixmapFragments(fragments, fragmentCount, pixmap, hints);
+ } else {
+ qreal oldOpacity = opacity();
+ QTransform oldTransform = transform();
+
+ for (int i = 0; i < fragmentCount; ++i) {
+ QTransform transform = oldTransform;
+ qreal xOffset = 0;
+ qreal yOffset = 0;
+ if (fragments[i].rotation == 0) {
+ xOffset = fragments[i].x;
+ yOffset = fragments[i].y;
+ } else {
+ transform.translate(fragments[i].x, fragments[i].y);
+ transform.rotate(fragments[i].rotation);
+ }
+ setOpacity(oldOpacity * fragments[i].opacity);
+ setTransform(transform);
+
+ qreal w = fragments[i].scaleX * fragments[i].width;
+ qreal h = fragments[i].scaleY * fragments[i].height;
+ QRectF sourceRect(fragments[i].sourceLeft, fragments[i].sourceTop,
+ fragments[i].width, fragments[i].height);
+ drawPixmap(QRectF(-0.5 * w + xOffset, -0.5 * h + yOffset, w, h), pixmap, sourceRect);
+ }
+
+ setOpacity(oldOpacity);
+ setTransform(oldTransform);
+ }
+}
+
+/*!
+ \since 4.7
+ \class QPainter::PixmapFragment
+
+ \brief This class is used in conjunction with the
+ QPainter::drawPixmapFragments() function to specify how a pixmap, or
+ sub-rect of a pixmap, is drawn.
+
+ The \a sourceLeft, \a sourceTop, \a width and \a height variables are used
+ as a source rectangle within the pixmap passed into the
+ QPainter::drawPixmapFragments() function. The variables \a x, \a y, \a
+ width and \a height are used to calculate the target rectangle that is
+ drawn. \a x and \a y denotes the center of the target rectangle. The \a
+ width and \a heigth in the target rectangle is scaled by the \a scaleX and
+ \a scaleY values. The resulting target rectangle is then rotated \a
+ rotation degrees around the \a x, \a y center point.
+
+ \sa QPainter::drawPixmapFragments()
+*/
+
+/*!
+ \since 4.7
+
+ This is a convenience function that returns a QPainter::PixmapFragment that is
+ initialized with the \a pos, \a sourceRect, \a scaleX, \a scaleY, \a
+ rotation, \a opacity parameters.
+*/
+
+QPainter::PixmapFragment QPainter::PixmapFragment::create(const QPointF &pos, const QRectF &sourceRect,
+ qreal scaleX, qreal scaleY, qreal rotation,
+ qreal opacity)
+{
+ PixmapFragment fragment = {pos.x(), pos.y(), sourceRect.x(), sourceRect.y(), sourceRect.width(),
+ sourceRect.height(), scaleX, scaleY, rotation, opacity};
+ return fragment;
+}
+
+/*!
+ \variable QPainter::PixmapFragment::x
+ \brief the x coordinate of center point in the target rectangle.
+*/
+
+/*!
+ \variable QPainter::PixmapFragment::y
+ \brief the y coordinate of the center point in the target rectangle.
+*/
+
+/*!
+ \variable QPainter::PixmapFragment::sourceLeft
+ \brief the left coordinate of the source rectangle.
+*/
+
+/*!
+ \variable QPainter::PixmapFragment::sourceTop
+ \brief the top coordinate of the source rectangle.
+*/
+
+/*!
+ \variable QPainter::PixmapFragment::width
+
+ \brief the width of the source rectangle and is used to calculate the width
+ of the target rectangle.
+*/
+
+/*!
+ \variable QPainter::PixmapFragment::height
+
+ \brief the height of the source rectangle and is used to calculate the
+ height of the target rectangle.
+*/
+
+/*!
+ \variable QPainter::PixmapFragment::scaleX
+ \brief the horizontal scale of the target rectangle.
+*/
+
+/*!
+ \variable QPainter::PixmapFragment::scaleY
+ \brief the vertical scale of the target rectangle.
+*/
+
+/*!
+ \variable QPainter::PixmapFragment::rotation
+
+ \brief the rotation of the target rectangle in degrees. The target
+ rectangle is rotated after it has been scaled.
+*/
+
+/*!
+ \variable QPainter::PixmapFragment::opacity
+
+ \brief the opacity of the target rectangle, where 0.0 is fully transparent
+ and 1.0 is fully opaque.
+*/
+
+/*!
+ \since 4.7
+
+ \enum QPainter::PixmapFragmentHint
+
+ \value OpaqueHint Indicates that the pixmap fragments to be drawn are
+ opaque. Opaque fragments are potentially faster to draw.
+
+ \sa QPainter::drawPixmapFragments(), QPainter::PixmapFragment
+*/
+
void qt_draw_helper(QPainterPrivate *p, const QPainterPath &path, QPainterPrivate::DrawOperation operation)
{
p->draw_helper(path, operation);
diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h
index ffddcbad23..443925b771 100644
--- a/src/gui/painting/qpainter.h
+++ b/src/gui/painting/qpainter.h
@@ -78,6 +78,7 @@ class QPolygon;
class QTextItem;
class QMatrix;
class QTransform;
+class QStaticText;
class QPainterPrivateDeleter;
@@ -98,6 +99,29 @@ public:
Q_DECLARE_FLAGS(RenderHints, RenderHint)
+ class PixmapFragment {
+ public:
+ qreal x;
+ qreal y;
+ qreal sourceLeft;
+ qreal sourceTop;
+ qreal width;
+ qreal height;
+ qreal scaleX;
+ qreal scaleY;
+ qreal rotation;
+ qreal opacity;
+ static PixmapFragment Q_GUI_EXPORT create(const QPointF &pos, const QRectF &sourceRect,
+ qreal scaleX = 1, qreal scaleY = 1,
+ qreal rotation = 0, qreal opacity = 1);
+ };
+
+ enum PixmapFragmentHint {
+ OpaqueHint = 0x01
+ };
+
+ Q_DECLARE_FLAGS(PixmapFragmentHints, PixmapFragmentHint)
+
QPainter();
explicit QPainter(QPaintDevice *);
~QPainter();
@@ -351,6 +375,9 @@ public:
inline void drawPixmap(const QRect &r, const QPixmap &pm);
inline void drawPixmap(int x, int y, int w, int h, const QPixmap &pm);
+ void drawPixmapFragments(const PixmapFragment *fragments, int fragmentCount,
+ const QPixmap &pixmap, PixmapFragmentHints hints = 0);
+
void drawImage(const QRectF &targetRect, const QImage &image, const QRectF &sourceRect,
Qt::ImageConversionFlags flags = Qt::AutoColor);
inline void drawImage(const QRect &targetRect, const QImage &image, const QRect &sourceRect,
@@ -369,6 +396,10 @@ public:
void setLayoutDirection(Qt::LayoutDirection direction);
Qt::LayoutDirection layoutDirection() const;
+ void drawStaticText(const QPointF &p, const QStaticText &staticText);
+ inline void drawStaticText(const QPoint &p, const QStaticText &staticText);
+ inline void drawStaticText(int x, int y, const QStaticText &staticText);
+
void drawText(const QPointF &p, const QString &s);
inline void drawText(const QPoint &p, const QString &s);
inline void drawText(int x, int y, const QString &s);
@@ -896,6 +927,16 @@ inline void QPainter::drawImage(int x, int y, const QImage &image, int sx, int s
drawImage(QRectF(x, y, -1, -1), image, QRectF(sx, sy, sw, sh), flags);
}
+inline void QPainter::drawStaticText(const QPoint &p, const QStaticText &staticText)
+{
+ drawStaticText(QPointF(p), staticText);
+}
+
+inline void QPainter::drawStaticText(int x, int y, const QStaticText &staticText)
+{
+ drawStaticText(QPointF(x, y), staticText);
+}
+
inline void QPainter::drawTextItem(const QPoint &p, const QTextItem &ti)
{
drawTextItem(QPointF(p), ti);
diff --git a/src/gui/painting/qpainter_p.h b/src/gui/painting/qpainter_p.h
index 02a91aa27d..9362dbe80c 100644
--- a/src/gui/painting/qpainter_p.h
+++ b/src/gui/painting/qpainter_p.h
@@ -228,6 +228,7 @@ public:
void draw_helper(const QPainterPath &path, DrawOperation operation = StrokeAndFillDraw);
void drawStretchedGradient(const QPainterPath &path, DrawOperation operation);
void drawOpaqueBackground(const QPainterPath &path, DrawOperation operation);
+ void drawGlyphs(const quint32 *glyphArray, const QPointF *positionArray, int glyphCount);
void updateMatrix();
void updateInvMatrix();
@@ -238,6 +239,11 @@ public:
void checkEmulation();
+ static QPainterPrivate *get(QPainter *painter)
+ {
+ return painter->d_ptr.data();
+ }
+
QTransform viewTransform() const;
static bool attachPainterPrivate(QPainter *q, QPaintDevice *pdev);
void detachPainterPrivate(QPainter *q);
@@ -252,6 +258,8 @@ public:
};
Q_GUI_EXPORT void qt_draw_helper(QPainterPrivate *p, const QPainterPath &path, QPainterPrivate::DrawOperation operation);
+Q_GUI_EXPORT void qt_draw_glyphs(QPainter *painter, const quint32 *glyphArray,
+ const QPointF *positionArray, int glyphCount);
QString qt_generate_brush_key(const QBrush &brush);
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index fba3595b92..f78de34e38 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -1257,6 +1257,8 @@ Qt::FillRule QPainterPath::fillRule() const
void QPainterPath::setFillRule(Qt::FillRule fillRule)
{
ensureData();
+ if (d_func()->fillRule == fillRule)
+ return;
detach();
d_func()->fillRule = fillRule;
diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp
index bc81514067..949a820b21 100644
--- a/src/gui/painting/qpathclipper.cpp
+++ b/src/gui/painting/qpathclipper.cpp
@@ -1705,6 +1705,9 @@ QPainterPath QPathClipper::clip(Operation operation)
if (subjectPath == clipPath)
return op == BoolSub ? QPainterPath() : subjectPath;
+ bool subjectIsRect = pathToRect(subjectPath, 0);
+ bool clipIsRect = pathToRect(clipPath, 0);
+
const QRectF clipBounds = clipPath.boundingRect();
const QRectF subjectBounds = subjectPath.boundingRect();
@@ -1732,8 +1735,7 @@ QPainterPath QPathClipper::clip(Operation operation)
}
if (clipBounds.contains(subjectBounds)) {
- QRectF clipRect;
- if (pathToRect(clipPath, &clipRect) && clipRect.contains(subjectBounds)) {
+ if (clipIsRect) {
switch (op) {
case BoolSub:
return QPainterPath();
@@ -1746,17 +1748,16 @@ QPainterPath QPathClipper::clip(Operation operation)
}
}
} else if (subjectBounds.contains(clipBounds)) {
- QRectF subjectRect;
- if (pathToRect(subjectPath, &subjectRect) && subjectRect.contains(clipBounds)) {
+ if (subjectIsRect) {
switch (op) {
case BoolSub:
if (clipPath.fillRule() == Qt::OddEvenFill) {
QPainterPath result = clipPath;
- result.addRect(subjectRect);
+ result.addRect(subjectBounds);
return result;
} else {
QPainterPath result = clipPath.simplified();
- result.addRect(subjectRect);
+ result.addRect(subjectBounds);
return result;
}
break;
@@ -1769,6 +1770,13 @@ QPainterPath QPathClipper::clip(Operation operation)
}
}
}
+
+ if (op == BoolAnd) {
+ if (subjectIsRect)
+ return intersect(clipPath, subjectBounds);
+ else if (clipIsRect)
+ return intersect(subjectPath, clipBounds);
+ }
}
QWingedEdge list(subjectPath, clipPath);
@@ -2052,4 +2060,243 @@ bool QPathClipper::handleCrossingEdges(QWingedEdge &list, qreal y, ClipperMode m
return false;
}
+namespace {
+
+QList<QPainterPath> toSubpaths(const QPainterPath &path)
+{
+
+ QList<QPainterPath> subpaths;
+ if (path.isEmpty())
+ return subpaths;
+
+ QPainterPath current;
+ for (int i = 0; i < path.elementCount(); ++i) {
+ const QPainterPath::Element &e = path.elementAt(i);
+ switch (e.type) {
+ case QPainterPath::MoveToElement:
+ if (current.elementCount() > 1)
+ subpaths += current;
+ current = QPainterPath();
+ current.moveTo(e);
+ break;
+ case QPainterPath::LineToElement:
+ current.lineTo(e);
+ break;
+ case QPainterPath::CurveToElement: {
+ current.cubicTo(e, path.elementAt(i + 1), path.elementAt(i + 2));
+ i+=2;
+ break;
+ }
+ case QPainterPath::CurveToDataElement:
+ Q_ASSERT(!"toSubpaths(), bad element type");
+ break;
+ }
+ }
+
+ if (current.elementCount() > 1)
+ subpaths << current;
+
+ return subpaths;
+}
+
+enum Edge
+{
+ Left, Top, Right, Bottom
+};
+
+static bool isVertical(Edge edge)
+{
+ return edge == Left || edge == Right;
+}
+
+template <Edge edge>
+bool compare(const QPointF &p, qreal t)
+{
+ switch (edge)
+ {
+ case Left:
+ return p.x() < t;
+ case Right:
+ return p.x() > t;
+ case Top:
+ return p.y() < t;
+ default:
+ return p.y() > t;
+ }
+}
+
+template <Edge edge>
+QPointF intersectLine(const QPointF &a, const QPointF &b, qreal t)
+{
+ QLineF line(a, b);
+ switch (edge) {
+ case Left: // fall-through
+ case Right:
+ return line.pointAt((t - a.x()) / (b.x() - a.x()));
+ default:
+ return line.pointAt((t - a.y()) / (b.y() - a.y()));
+ }
+}
+
+void addLine(QPainterPath &path, const QLineF &line)
+{
+ if (path.elementCount() > 0)
+ path.lineTo(line.p1());
+ else
+ path.moveTo(line.p1());
+
+ path.lineTo(line.p2());
+}
+
+template <Edge edge>
+void clipLine(const QPointF &a, const QPointF &b, qreal t, QPainterPath &result)
+{
+ bool outA = compare<edge>(a, t);
+ bool outB = compare<edge>(b, t);
+ if (outA && outB)
+ return;
+
+ if (outA)
+ addLine(result, QLineF(intersectLine<edge>(a, b, t), b));
+ else if(outB)
+ addLine(result, QLineF(a, intersectLine<edge>(a, b, t)));
+ else
+ addLine(result, QLineF(a, b));
+}
+
+void addBezier(QPainterPath &path, const QBezier &bezier)
+{
+ if (path.elementCount() > 0)
+ path.lineTo(bezier.pt1());
+ else
+ path.moveTo(bezier.pt1());
+
+ path.cubicTo(bezier.pt2(), bezier.pt3(), bezier.pt4());
+}
+
+template <Edge edge>
+void clipBezier(const QPointF &a, const QPointF &b, const QPointF &c, const QPointF &d, qreal t, QPainterPath &result)
+{
+ QBezier bezier = QBezier::fromPoints(a, b, c, d);
+
+ bool outA = compare<edge>(a, t);
+ bool outB = compare<edge>(b, t);
+ bool outC = compare<edge>(c, t);
+ bool outD = compare<edge>(d, t);
+
+ int outCount = int(outA) + int(outB) + int(outC) + int(outD);
+
+ if (outCount == 4)
+ return;
+
+ if (outCount == 0) {
+ addBezier(result, bezier);
+ return;
+ }
+
+ QTransform flip = isVertical(edge) ? QTransform(0, 1, 1, 0, 0, 0) : QTransform();
+ QBezier unflipped = bezier;
+ QBezier flipped = bezier.mapBy(flip);
+
+ qreal t0 = 0, t1 = 1;
+ int stationary = flipped.stationaryYPoints(t0, t1);
+
+ qreal segments[4];
+ QPointF points[4];
+ points[0] = unflipped.pt1();
+ segments[0] = 0;
+
+ int segmentCount = 0;
+ if (stationary > 0) {
+ ++segmentCount;
+ segments[segmentCount] = t0;
+ points[segmentCount] = unflipped.pointAt(t0);
+ }
+ if (stationary > 1) {
+ ++segmentCount;
+ segments[segmentCount] = t1;
+ points[segmentCount] = unflipped.pointAt(t1);
+ }
+ ++segmentCount;
+ segments[segmentCount] = 1;
+ points[segmentCount] = unflipped.pt4();
+
+ qreal lastIntersection = 0;
+ for (int i = 0; i < segmentCount; ++i) {
+ outA = compare<edge>(points[i], t);
+ outB = compare<edge>(points[i+1], t);
+
+ if (outA != outB) {
+ qreal intersection = flipped.tForY(segments[i], segments[i+1], t);
+
+ if (outB)
+ addBezier(result, unflipped.getSubRange(lastIntersection, intersection));
+
+ lastIntersection = intersection;
+ }
+ }
+
+ if (!outB)
+ addBezier(result, unflipped.getSubRange(lastIntersection, 1));
+}
+
+// clips a single subpath against a single edge
+template <Edge edge>
+QPainterPath clip(const QPainterPath &path, qreal t)
+{
+ QPainterPath result;
+ for (int i = 1; i < path.elementCount(); ++i) {
+ const QPainterPath::Element &element = path.elementAt(i);
+ Q_ASSERT(!element.isMoveTo());
+ if (element.isLineTo()) {
+ clipLine<edge>(path.elementAt(i-1), path.elementAt(i), t, result);
+ } else {
+ clipBezier<edge>(path.elementAt(i-1), path.elementAt(i), path.elementAt(i+1), path.elementAt(i+2), t, result);
+ i += 2;
+ }
+ }
+
+ int last = path.elementCount() - 1;
+ if (QPointF(path.elementAt(last)) != QPointF(path.elementAt(0)))
+ clipLine<edge>(path.elementAt(last), path.elementAt(0), t, result);
+
+ return result;
+}
+
+QPainterPath intersectPath(const QPainterPath &path, const QRectF &rect)
+{
+ QList<QPainterPath> subpaths = toSubpaths(path);
+
+ QPainterPath result;
+ result.setFillRule(path.fillRule());
+ for (int i = 0; i < subpaths.size(); ++i) {
+ QPainterPath subPath = subpaths.at(i);
+ QRectF bounds = subPath.boundingRect();
+ if (bounds.intersects(rect)) {
+ if (bounds.left() < rect.left())
+ subPath = clip<Left>(subPath, rect.left());
+ if (bounds.right() > rect.right())
+ subPath = clip<Right>(subPath, rect.right());
+
+ bounds = subPath.boundingRect();
+
+ if (bounds.top() < rect.top())
+ subPath = clip<Top>(subPath, rect.top());
+ if (bounds.bottom() > rect.bottom())
+ subPath = clip<Bottom>(subPath, rect.bottom());
+
+ if (subPath.elementCount() > 1)
+ result.addPath(subPath);
+ }
+ }
+ return result;
+}
+
+}
+
+QPainterPath QPathClipper::intersect(const QPainterPath &path, const QRectF &rect)
+{
+ return intersectPath(path, rect);
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/painting/qpathclipper_p.h b/src/gui/painting/qpathclipper_p.h
index b90086215b..b42dc1d2a2 100644
--- a/src/gui/painting/qpathclipper_p.h
+++ b/src/gui/painting/qpathclipper_p.h
@@ -87,6 +87,7 @@ public:
bool contains();
static bool pathToRect(const QPainterPath &path, QRectF *rect = 0);
+ static QPainterPath intersect(const QPainterPath &path, const QRectF &rect);
private:
Q_DISABLE_COPY(QPathClipper)
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index dd516b1535..dcf745ff13 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -1415,6 +1415,7 @@ void QPdfBaseEngine::setProperty(PrintEnginePropertyKey key, const QVariant &val
case PPK_FullPage:
d->fullPage = value.toBool();
break;
+ case PPK_CopyCount: // fallthrough
case PPK_NumberOfCopies:
d->copies = value.toInt();
break;
@@ -1504,6 +1505,17 @@ QVariant QPdfBaseEngine::property(PrintEnginePropertyKey key) const
case PPK_FullPage:
ret = d->fullPage;
break;
+ case PPK_CopyCount:
+ ret = d->copies;
+ break;
+ case PPK_SupportsMultipleCopies:
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+ if (QCUPSSupport::isAvailable())
+ ret = true;
+ else
+#endif
+ ret = false;
+ break;
case PPK_NumberOfCopies:
#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
if (QCUPSSupport::isAvailable())
diff --git a/src/gui/painting/qpdf_p.h b/src/gui/painting/qpdf_p.h
index f79c5cc067..9c4d05da49 100644
--- a/src/gui/painting/qpdf_p.h
+++ b/src/gui/painting/qpdf_p.h
@@ -216,8 +216,6 @@ public:
private:
void updateClipPath(const QPainterPath & path, Qt::ClipOperation op);
-
- friend int qt_printerRealNumCopies(QPaintEngine *);
};
class QPdfBaseEnginePrivate : public QAlphaPaintEnginePrivate
diff --git a/src/gui/painting/qprintengine.h b/src/gui/painting/qprintengine.h
index 35715fbf97..71ff954d79 100644
--- a/src/gui/painting/qprintengine.h
+++ b/src/gui/painting/qprintengine.h
@@ -86,6 +86,8 @@ public:
PPK_PaperSources,
PPK_CustomPaperSize,
PPK_PageMargins,
+ PPK_CopyCount,
+ PPK_SupportsMultipleCopies,
PPK_PaperSize = PPK_PageSize,
PPK_CustomBase = 0xff00
diff --git a/src/gui/painting/qprintengine_mac.mm b/src/gui/painting/qprintengine_mac.mm
index 7195c631f8..3d5d1d5271 100644
--- a/src/gui/painting/qprintengine_mac.mm
+++ b/src/gui/painting/qprintengine_mac.mm
@@ -685,6 +685,7 @@ void QMacPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &va
case PPK_FullPage:
d->fullPage = value.toBool();
break;
+ case PPK_CopyCount: // fallthrough
case PPK_NumberOfCopies:
PMSetCopies(d->settings, value.toInt(), false);
break;
@@ -787,6 +788,15 @@ QVariant QMacPrintEngine::property(PrintEnginePropertyKey key) const
case PPK_NumberOfCopies:
ret = 1;
break;
+ case PPK_CopyCount: {
+ UInt32 copies = 1;
+ PMGetCopies(d->settings, &copies);
+ ret = (uint) copies;
+ break;
+ }
+ case PPK_SupportsMultipleCopies:
+ ret = true;
+ break;
case PPK_Orientation:
PMOrientation orientation;
PMGetOrientation(d->format, &orientation);
diff --git a/src/gui/painting/qprintengine_qws.cpp b/src/gui/painting/qprintengine_qws.cpp
index 2d355b8d25..396d712ae9 100644
--- a/src/gui/painting/qprintengine_qws.cpp
+++ b/src/gui/painting/qprintengine_qws.cpp
@@ -268,9 +268,13 @@ QVariant QtopiaPrintEngine::property(PrintEnginePropertyKey key) const
case PPK_FullPage:
ret = d->fullPage;
break;
+ case PPK_CopyCount: // fallthrough
case PPK_NumberOfCopies:
ret = d->numCopies;
break;
+ case PPK_SupportsMultipleCopies:
+ ret = false;
+ break;
case PPK_Orientation:
ret = d->orientation;
break;
@@ -329,6 +333,7 @@ void QtopiaPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
case PPK_FullPage:
d->fullPage = value.toBool();
break;
+ case PPK_CopyCount: // fallthrough
case PPK_NumberOfCopies:
d->numCopies = value.toInt();
break;
diff --git a/src/gui/painting/qprintengine_win.cpp b/src/gui/painting/qprintengine_win.cpp
index 374bfa0aba..ea9dc5d986 100644
--- a/src/gui/painting/qprintengine_win.cpp
+++ b/src/gui/painting/qprintengine_win.cpp
@@ -368,7 +368,8 @@ void QWin32PrintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem
}
// We only want to convert the glyphs to text if the entire string is compatible with ASCII
- bool convertToText = true;
+ // and if we actually have access to the chars.
+ bool convertToText = ti.chars != 0;
for (int i=0; i < ti.num_chars; ++i) {
if (ti.chars[i].unicode() >= 0x80) {
convertToText = false;
@@ -1240,6 +1241,7 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
d->updateOrigin();
break;
+ case PPK_CopyCount: // fallthrough
case PPK_NumberOfCopies:
if (!d->devMode)
break;
@@ -1406,6 +1408,14 @@ QVariant QWin32PrintEngine::property(PrintEnginePropertyKey key) const
value = d->fullPage;
break;
+ case PPK_CopyCount:
+ value = d->num_copies;
+ break;
+
+ case PPK_SupportsMultipleCopies:
+ value = true;
+ break;
+
case PPK_NumberOfCopies:
value = 1;
break;
diff --git a/src/gui/painting/qprintengine_win_p.h b/src/gui/painting/qprintengine_win_p.h
index a3271cb190..d435831ac8 100644
--- a/src/gui/painting/qprintengine_win_p.h
+++ b/src/gui/painting/qprintengine_win_p.h
@@ -108,7 +108,6 @@ public:
private:
friend class QPrintDialog;
friend class QPageSetupDialog;
- friend int qt_printerRealNumCopies(QPaintEngine *);
};
class QWin32PrintEnginePrivate : public QAlphaPaintEnginePrivate
diff --git a/src/gui/painting/qprinter.cpp b/src/gui/painting/qprinter.cpp
index 4d2b50ae35..ae2141662d 100644
--- a/src/gui/painting/qprinter.cpp
+++ b/src/gui/painting/qprinter.cpp
@@ -158,27 +158,6 @@ QSizeF qt_printerPaperSize(QPrinter::Orientation orientation,
(qt_paperSizes[paperSize][height_index] * 72 / 25.4) / multiplier);
}
-
-// returns the actual num copies set on a printer, not
-// the number that is documented in QPrinter::numCopies()
-int qt_printerRealNumCopies(QPaintEngine *engine)
-{
- int numCopies = 1;
- if (engine->type() == QPaintEngine::PostScript
- || engine->type() == QPaintEngine::Pdf)
- {
- QPdfBaseEngine *base = static_cast<QPdfBaseEngine *>(engine);
- numCopies = base->d_func()->copies;
- }
-#ifdef Q_WS_WIN
- else if (engine->type() == QPaintEngine::Windows) {
- QWin32PrintEngine *base = static_cast<QWin32PrintEngine *>(engine);
- numCopies = base->d_func()->num_copies;
- }
-#endif
- return numCopies;
-}
-
void QPrinterPrivate::createDefaultEngines()
{
QPrinter::OutputFormat realOutputFormat = outputFormat;
@@ -302,7 +281,7 @@ void QPrinterPrivate::addToManualSetList(QPrintEngine::PrintEnginePropertyKey ke
printer to provide, in dots per inch (DPI).
\i setFullPage() tells QPrinter whether you want to deal with the
full page or just with the part the printer can draw on.
- \i setNumCopies() tells QPrinter how many copies of the document
+ \i setCopyCount() tells QPrinter how many copies of the document
it should print.
\endlist
@@ -403,6 +382,7 @@ void QPrinterPrivate::addToManualSetList(QPrintEngine::PrintEnginePropertyKey ke
\value AllPages All pages should be printed.
\value Selection Only the selection should be printed.
\value PageRange The specified page range should be printed.
+ \value CurrentPage Only the current page should be printed.
\sa QAbstractPrintDialog::PrintRange
*/
@@ -592,6 +572,7 @@ void QPrinterPrivate::addToManualSetList(QPrintEngine::PrintEnginePropertyKey ke
\value AllPages All the pages should be printed.
\value Selection Only the selection should be printed.
\value PageRange Print according to the from page and to page options.
+ \value CurrentPage Only the current page should be printed.
\sa setPrintRange(), printRange()
*/
@@ -607,6 +588,7 @@ void QPrinterPrivate::addToManualSetList(QPrintEngine::PrintEnginePropertyKey ke
\value PrintSelection Describes if printing selections should be enabled.
\value PrintPageRange Describes if printing page ranges (from, to) should
be enabled
+ \value PrintCurrentPage if Print Current Page option should be enabled
\sa setOptionEnabled(), isOptionEnabled()
*/
@@ -748,7 +730,6 @@ void QPrinter::setOutputFormat(OutputFormat format)
d->outputFormat = format;
QPrintEngine *oldPrintEngine = d->printEngine;
- QPaintEngine *oldPaintEngine = d->paintEngine; // same as the above - shouldn't be deleted
const bool def_engine = d->use_default_engine;
d->printEngine = 0;
@@ -761,7 +742,7 @@ void QPrinter::setOutputFormat(OutputFormat format)
// PPK_NumberOfCopies need special treatmeant since it in most cases
// will return 1, disregarding the actual value that was set
if (key == QPrintEngine::PPK_NumberOfCopies)
- prop = QVariant(qt_printerRealNumCopies(oldPaintEngine));
+ prop = QVariant(copyCount());
else
prop = oldPrintEngine->property(key);
if (prop.isValid())
@@ -1263,6 +1244,7 @@ QPrinter::ColorMode QPrinter::colorMode() const
/*!
+ \obsolete
Returns the number of copies to be printed. The default value is 1.
On Windows, Mac OS X and X11 systems that support CUPS, this will always
@@ -1275,6 +1257,8 @@ QPrinter::ColorMode QPrinter::colorMode() const
buffering up the copies and in those cases the application must make an
explicit call to the print code for each copy.
+ Use copyCount() in conjunction with supportsMultipleCopies() instead.
+
\sa setNumCopies(), actualNumCopies()
*/
@@ -1286,6 +1270,7 @@ int QPrinter::numCopies() const
/*!
+ \obsolete
\since 4.6
Returns the number of copies that will be printed. The default
@@ -1294,22 +1279,26 @@ int QPrinter::numCopies() const
This function always returns the actual value specified in the print
dialog or using setNumCopies().
+ Use copyCount() instead.
+
\sa setNumCopies(), numCopies()
*/
int QPrinter::actualNumCopies() const
{
- Q_D(const QPrinter);
- return qt_printerRealNumCopies(d->paintEngine);
+ return copyCount();
}
/*!
+ \obsolete
Sets the number of copies to be printed to \a numCopies.
The printer driver reads this setting and prints the specified
number of copies.
+ Use setCopyCount() instead.
+
\sa numCopies()
*/
@@ -1321,6 +1310,58 @@ void QPrinter::setNumCopies(int numCopies)
d->addToManualSetList(QPrintEngine::PPK_NumberOfCopies);
}
+/*!
+ \since 4.7
+
+ Sets the number of copies to be printed to \a count.
+
+ The printer driver reads this setting and prints the specified number of
+ copies.
+
+ \sa copyCount(), supportsMultipleCopies()
+*/
+
+void QPrinter::setCopyCount(int count)
+{
+ Q_D(QPrinter);
+ ABORT_IF_ACTIVE("QPrinter::setCopyCount;");
+ d->printEngine->setProperty(QPrintEngine::PPK_CopyCount, count);
+ d->addToManualSetList(QPrintEngine::PPK_CopyCount);
+}
+
+/*!
+ \since 4.7
+
+ Returns the number of copies that will be printed. The default value is 1.
+
+ \sa setCopyCount(), supportsMultipleCopies()
+*/
+
+int QPrinter::copyCount() const
+{
+ Q_D(const QPrinter);
+ return d->printEngine->property(QPrintEngine::PPK_CopyCount).toInt();
+}
+
+/*!
+ \since 4.7
+
+ Returns true if the printer supports printing multiple copies of the same
+ document in one job; otherwise false is returned.
+
+ On most systems this function will return true. However, on X11 systems
+ that do not support CUPS, this function will return false. That means the
+ application has to handle the number of copies by printing the same
+ document the required number of times.
+
+ \sa setCopyCount(), copyCount()
+*/
+
+bool QPrinter::supportsMultipleCopies() const
+{
+ Q_D(const QPrinter);
+ return d->printEngine->property(QPrintEngine::PPK_SupportsMultipleCopies).toBool();
+}
/*!
\since 4.1
@@ -2262,8 +2303,8 @@ bool QPrinter::isOptionEnabled( PrinterOption option ) const
\value PPK_FullPage A boolean describing if the printer should be
full page or not.
- \value PPK_NumberOfCopies An integer specifying the number of
- copies
+ \value PPK_NumberOfCopies Obsolete. An integer specifying the number of
+ copies. Use PPK_CopyCount instead.
\value PPK_Orientation Specifies a QPrinter::Orientation value.
@@ -2310,6 +2351,11 @@ bool QPrinter::isOptionEnabled( PrinterOption option ) const
\value PPK_PageMargins A QList<QVariant> containing the left, top,
right and bottom margin values.
+ \value PPK_CopyCount An integer specifying the number of copies to print.
+
+ \value PPK_SupportsMultipleCopies A boolean value indicating whether or not
+ the printer supports printing multiple copies in one job.
+
\value PPK_CustomBase Basis for extension.
*/
diff --git a/src/gui/painting/qprinter.h b/src/gui/painting/qprinter.h
index 5aa891e769..996a954eca 100644
--- a/src/gui/painting/qprinter.h
+++ b/src/gui/painting/qprinter.h
@@ -124,7 +124,7 @@ public:
enum OutputFormat { NativeFormat, PdfFormat, PostScriptFormat };
// ### Qt 5: Merge with QAbstractPrintDialog::PrintRange
- enum PrintRange { AllPages, Selection, PageRange };
+ enum PrintRange { AllPages, Selection, PageRange, CurrentPage };
enum Unit {
Millimeter,
@@ -199,6 +199,10 @@ public:
int actualNumCopies() const;
+ void setCopyCount(int);
+ int copyCount() const;
+ bool supportsMultipleCopies() const;
+
void setPaperSource(PaperSource);
PaperSource paperSource() const;
diff --git a/src/gui/painting/qstroker.cpp b/src/gui/painting/qstroker.cpp
index 16e3c38df2..9740fce4bc 100644
--- a/src/gui/painting/qstroker.cpp
+++ b/src/gui/painting/qstroker.cpp
@@ -1043,6 +1043,47 @@ QVector<qfixed> QDashStroker::patternForStyle(Qt::PenStyle style)
return pattern;
}
+static inline bool lineRectIntersectsRect(qfixed2d p1, qfixed2d p2, const qfixed2d &tl, const qfixed2d &br)
+{
+ return ((p1.x > tl.x || p2.x > tl.x) && (p1.x < br.x || p2.x < br.x)
+ && (p1.y > tl.y || p2.y > tl.y) && (p1.y < br.y || p2.y < br.y));
+}
+
+// If the line intersects the rectangle, this function will return true.
+static bool lineIntersectsRect(qfixed2d p1, qfixed2d p2, const qfixed2d &tl, const qfixed2d &br)
+{
+ if (!lineRectIntersectsRect(p1, p2, tl, br))
+ return false;
+ if (p1.x == p2.x || p1.y == p2.y)
+ return true;
+
+ if (p1.y > p2.y)
+ qSwap(p1, p2); // make p1 above p2
+ qfixed2d u;
+ qfixed2d v;
+ qfixed2d w = {p2.x - p1.x, p2.y - p1.y};
+ if (p1.x < p2.x) {
+ // backslash
+ u.x = tl.x - p1.x; u.y = br.y - p1.y;
+ v.x = br.x - p1.x; v.y = tl.y - p1.y;
+ } else {
+ // slash
+ u.x = tl.x - p1.x; u.y = tl.y - p1.y;
+ v.x = br.x - p1.x; v.y = br.y - p1.y;
+ }
+#if defined(QFIXED_IS_26_6) || defined(QFIXED_IS_16_16)
+ qint64 val1 = qint64(u.x) * qint64(w.y) - qint64(u.y) * qint64(w.x);
+ qint64 val2 = qint64(v.x) * qint64(w.y) - qint64(v.y) * qint64(w.x);
+ return (val1 < 0 && val2 > 0) || (val1 > 0 && val2 < 0);
+#elif defined(QFIXED_IS_32_32)
+ // Cannot do proper test because it may overflow.
+ return true;
+#else
+ qreal val1 = u.x * w.y - u.y * w.x;
+ qreal val2 = v.x * w.y - v.y * w.x;
+ return (val1 < 0 && val2 > 0) || (val1 > 0 && val2 < 0);
+#endif
+}
void QDashStroker::processCurrentSubpath()
{
@@ -1067,9 +1108,11 @@ void QDashStroker::processCurrentSubpath()
if (qFuzzyIsNull(sumLength))
return;
+ qreal invSumLength = qreal(1) / sumLength;
+
Q_ASSERT(dashCount > 0);
- dashCount = (dashCount / 2) * 2; // Round down to even number
+ dashCount = dashCount & -2; // Round down to even number
int idash = 0; // Index to current dash
qreal pos = 0; // The position on the curve, 0 <= pos <= path.length
@@ -1077,11 +1120,12 @@ void QDashStroker::processCurrentSubpath()
qreal doffset = m_dashOffset * m_stroke_width;
// make sure doffset is in range [0..sumLength)
- doffset -= qFloor(doffset / sumLength) * sumLength;
+ doffset -= qFloor(doffset * invSumLength) * sumLength;
while (doffset >= dashes[idash]) {
doffset -= dashes[idash];
- idash = (idash + 1) % dashCount;
+ if (++idash >= dashCount)
+ idash = 0;
}
qreal estart = 0; // The elements starting position
@@ -1119,12 +1163,41 @@ void QDashStroker::processCurrentSubpath()
estop = estart + elen;
bool done = pos >= estop;
+
+ if (clipping) {
+ // Check if the entire line can be clipped away.
+ if (!lineIntersectsRect(prev, e, clip_tl, clip_br)) {
+ // Cut away full dash sequences.
+ elen -= qFloor(elen * invSumLength) * sumLength;
+ // Update dash offset.
+ while (!done) {
+ qreal dpos = pos + dashes[idash] - doffset - estart;
+
+ Q_ASSERT(dpos >= 0);
+
+ if (dpos > elen) { // dash extends this line
+ doffset = dashes[idash] - (dpos - elen); // subtract the part already used
+ pos = estop; // move pos to next path element
+ done = true;
+ } else { // Dash is on this line
+ pos = dpos + estart;
+ done = pos >= estop;
+ if (++idash >= dashCount)
+ idash = 0;
+ doffset = 0; // full segment so no offset on next.
+ }
+ }
+ hasMoveTo = false;
+ move_to_pos = e;
+ }
+ }
+
// Dash away...
while (!done) {
QPointF p2;
- int idash_incr = 0;
bool has_offset = doffset > 0;
+ bool evenDash = (idash & 1) == 0;
qreal dpos = pos + dashes[idash] - doffset - estart;
Q_ASSERT(dpos >= 0);
@@ -1138,39 +1211,36 @@ void QDashStroker::processCurrentSubpath()
p2 = cline.pointAt(dpos/elen);
pos = dpos + estart;
done = pos >= estop;
- idash_incr = 1;
+ if (++idash >= dashCount)
+ idash = 0;
doffset = 0; // full segment so no offset on next.
}
- if (idash % 2 == 0) {
+ if (evenDash) {
line_to_pos.x = qt_real_to_fixed(p2.x());
line_to_pos.y = qt_real_to_fixed(p2.y());
- // If we have an offset, we're continuing a dash
- // from a previous element and should only
- // continue the current dash, without starting a
- // new subpath.
- if (!has_offset || !hasMoveTo) {
- emitMoveTo(move_to_pos.x, move_to_pos.y);
- hasMoveTo = true;
- }
-
if (!clipping
- // if move_to is inside...
- || (move_to_pos.x > clip_tl.x && move_to_pos.x < clip_br.x
- && move_to_pos.y > clip_tl.y && move_to_pos.y < clip_br.y)
- // Or if line_to is inside...
- || (line_to_pos.x > clip_tl.x && line_to_pos.x < clip_br.x
- && line_to_pos.y > clip_tl.y && line_to_pos.y < clip_br.y))
+ || lineRectIntersectsRect(move_to_pos, line_to_pos, clip_tl, clip_br))
{
+ // If we have an offset, we're continuing a dash
+ // from a previous element and should only
+ // continue the current dash, without starting a
+ // new subpath.
+ if (!has_offset || !hasMoveTo) {
+ emitMoveTo(move_to_pos.x, move_to_pos.y);
+ hasMoveTo = true;
+ }
+
emitLineTo(line_to_pos.x, line_to_pos.y);
+ } else {
+ hasMoveTo = false;
}
+ move_to_pos = line_to_pos;
} else {
move_to_pos.x = qt_real_to_fixed(p2.x());
move_to_pos.y = qt_real_to_fixed(p2.y());
}
-
- idash = (idash + idash_incr) % dashCount;
}
// Shuffle to the next cycle...
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index 7b7f3250fc..4418018492 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -55,29 +55,42 @@ QT_BEGIN_NAMESPACE
// #define CACHE_DEBUG
-void QTextureGlyphCache::populate(const QTextItemInt &ti,
- const QVarLengthArray<glyph_t> &glyphs,
- const QVarLengthArray<QFixedPoint> &)
+// returns the highest number closest to v, which is a power of 2
+// NB! assumes 32 bit ints
+int qt_next_power_of_two(int v)
+{
+ v--;
+ v |= v >> 1;
+ v |= v >> 2;
+ v |= v >> 4;
+ v |= v >> 8;
+ v |= v >> 16;
+ ++v;
+ return v;
+}
+
+void QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const glyph_t *glyphs,
+ const QFixedPoint *)
{
#ifdef CACHE_DEBUG
printf("Populating with '%s'\n", QString::fromRawData(ti.chars, ti.num_chars).toLatin1().data());
qDebug() << " -> current transformation: " << m_transform;
#endif
- m_current_textitem = &ti;
+ m_current_fontengine = fontEngine;
const int margin = glyphMargin();
QHash<glyph_t, Coord> listItemCoordinates;
int rowHeight = 0;
// check each glyph for its metrics and get the required rowHeight.
- for (int i=0; i < glyphs.size(); ++i) {
+ for (int i=0; i < numGlyphs; ++i) {
const glyph_t glyph = glyphs[i];
if (coords.contains(glyph))
continue;
if (listItemCoordinates.contains(glyph))
continue;
- glyph_metrics_t metrics = ti.fontEngine->boundingBox(glyph, m_transform);
+ glyph_metrics_t metrics = fontEngine->boundingBox(glyph, m_transform);
#ifdef CACHE_DEBUG
printf("'%c' (%4x): w=%.2f, h=%.2f, xoff=%.2f, yoff=%.2f, x=%.2f, y=%.2f, ti.ascent=%.2f, ti.descent=%.2f\n",
@@ -116,7 +129,7 @@ void QTextureGlyphCache::populate(const QTextItemInt &ti,
rowHeight += margin * 2;
if (isNull())
- createCache(QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH, rowHeight);
+ createCache(QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH, qt_next_power_of_two(rowHeight));
// now actually use the coords and paint the wanted glyps into cache.
QHash<glyph_t, Coord>::iterator iter = listItemCoordinates.begin();
@@ -129,13 +142,9 @@ void QTextureGlyphCache::populate(const QTextItemInt &ti,
m_cy = m_h;
}
if (m_cy + c.h > m_h) {
- int new_height;
- if (m_cx == 0) { // add a whole row
- new_height = m_h + rowHeight;
- m_cy = m_h;
- } else { // just extend row
- new_height = m_cy + rowHeight;
- }
+ int new_height = m_h*2;
+ while (new_height < m_cy + c.h)
+ new_height *= 2;
// if no room in the current texture - realloc a larger texture
resizeTextureData(m_w, new_height);
m_h = new_height;
@@ -182,11 +191,11 @@ QImage QTextureGlyphCache::textureMapForGlyph(glyph_t g) const
break;
};
- QFontEngineFT *ft = static_cast<QFontEngineFT*> (m_current_textitem->fontEngine);
+ QFontEngineFT *ft = static_cast<QFontEngineFT*> (m_current_fontengine);
QFontEngineFT::QGlyphSet *gset = ft->loadTransformedGlyphSet(m_transform);
if (gset && ft->loadGlyphs(gset, &g, 1, format)) {
- QFontEngineFT::Glyph *glyph = gset->glyph_data.value(g);
+ QFontEngineFT::Glyph *glyph = gset->getGlyph(g);
const int bytesPerLine = (format == QFontEngineFT::Format_Mono ? ((glyph->width + 31) & ~31) >> 3
: (glyph->width + 3) & ~3);
return QImage(glyph->data, glyph->width, glyph->height, bytesPerLine, imageFormat);
@@ -194,9 +203,9 @@ QImage QTextureGlyphCache::textureMapForGlyph(glyph_t g) const
} else
#endif
if (m_type == QFontEngineGlyphCache::Raster_RGBMask)
- return m_current_textitem->fontEngine->alphaRGBMapForGlyph(g, glyphMargin(), m_transform);
+ return m_current_fontengine->alphaRGBMapForGlyph(g, glyphMargin(), m_transform);
else
- return m_current_textitem->fontEngine->alphaMapForGlyph(g, m_transform);
+ return m_current_fontengine->alphaMapForGlyph(g, m_transform);
return QImage();
}
diff --git a/src/gui/painting/qtextureglyphcache_p.h b/src/gui/painting/qtextureglyphcache_p.h
index d347e618bb..803e71b23b 100644
--- a/src/gui/painting/qtextureglyphcache_p.h
+++ b/src/gui/painting/qtextureglyphcache_p.h
@@ -76,7 +76,9 @@ class Q_GUI_EXPORT QTextureGlyphCache : public QFontEngineGlyphCache
{
public:
QTextureGlyphCache(QFontEngineGlyphCache::Type type, const QTransform &matrix)
- : QFontEngineGlyphCache(matrix, type), m_w(0), m_h(0), m_cx(0), m_cy(0) { }
+ : QFontEngineGlyphCache(matrix, type), m_current_fontengine(0),
+ m_w(0), m_h(0), m_cx(0), m_cy(0)
+ { }
virtual ~QTextureGlyphCache() { }
@@ -90,9 +92,8 @@ public:
int baseLineY;
};
- void populate(const QTextItemInt &ti,
- const QVarLengthArray<glyph_t> &glyphs,
- const QVarLengthArray<QFixedPoint> &positions);
+ void populate(QFontEngine *fontEngine, int numGlyphs, const glyph_t *glyphs,
+ const QFixedPoint *positions);
virtual void createTextureData(int width, int height) = 0;
virtual void resizeTextureData(int width, int height) = 0;
@@ -113,7 +114,7 @@ public:
QImage textureMapForGlyph(glyph_t g) const;
protected:
- const QTextItemInt *m_current_textitem;
+ QFontEngine *m_current_fontengine;
int m_w; // image width
int m_h; // image height
diff --git a/src/gui/statemachine/qguistatemachine.cpp b/src/gui/statemachine/qguistatemachine.cpp
index 70f152d573..63ad94ef59 100644
--- a/src/gui/statemachine/qguistatemachine.cpp
+++ b/src/gui/statemachine/qguistatemachine.cpp
@@ -469,12 +469,6 @@ static QEvent *cloneEvent(QEvent *e)
case QEvent::UngrabKeyboard:
return new QEvent(*e);
-#ifdef QT_MAC_USE_COCOA
- case QEvent::CocoaRequestModal:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-#endif
-
case QEvent::TouchBegin:
case QEvent::TouchUpdate:
case QEvent::TouchEnd:
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index b1924e7566..b0e2d37741 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -4760,7 +4760,7 @@ QSize QCommonStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
int margins = 0;
// we add 4 pixels for label margins
- if (btn->icon.isNull() || !btn->text.isEmpty())
+ if (!btn->icon.isNull() || !btn->text.isEmpty())
margins = 4 + proxy()->pixelMetric(isRadio ? PM_RadioButtonLabelSpacing
: PM_CheckBoxLabelSpacing, opt, widget);
sz += QSize(w + margins, 4);
@@ -5662,10 +5662,16 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons
OSType iconType = 0;
switch (standardIcon) {
case QStyle::SP_MessageBoxQuestion:
+ iconType = kQuestionMarkIcon;
+ break;
case QStyle::SP_MessageBoxInformation:
+ iconType = kAlertNoteIcon;
+ break;
case QStyle::SP_MessageBoxWarning:
+ iconType = kAlertCautionIcon;
+ break;
case QStyle::SP_MessageBoxCritical:
- iconType = kGenericApplicationIcon;
+ iconType = kAlertStopIcon;
break;
case SP_DesktopIcon:
iconType = kDesktopIcon;
@@ -5755,88 +5761,88 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons
switch (standardIcon) {
#ifndef QT_NO_IMAGEFORMAT_PNG
case SP_FileDialogNewFolder:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/newdirectory-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/newdirectory-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/newdirectory-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/newdirectory-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/newdirectory-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/newdirectory-128.png"), QSize(128, 128));
break;
case SP_FileDialogBack:
return standardIconImplementation(SP_ArrowBack, option, widget);
case SP_FileDialogToParent:
return standardIconImplementation(SP_ArrowUp, option, widget);
case SP_FileDialogDetailedView:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewdetailed-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewdetailed-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewdetailed-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewdetailed-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewdetailed-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewdetailed-128.png"), QSize(128, 128));
break;
case SP_FileDialogInfoView:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/fileinfo-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/fileinfo-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/fileinfo-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/fileinfo-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/fileinfo-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/fileinfo-128.png"), QSize(128, 128));
break;
case SP_FileDialogContentsView:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filecontents-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filecontents-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filecontents-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filecontents-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filecontents-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filecontents-128.png"), QSize(128, 128));
break;
case SP_FileDialogListView:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewlist-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewlist-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewlist-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewlist-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewlist-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewlist-128.png"), QSize(128, 128));
break;
case SP_DialogOkButton:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-ok-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-ok-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-ok-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-ok-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-ok-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-ok-128.png"), QSize(128, 128));
break;
case SP_DialogCancelButton:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-cancel-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-cancel-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-cancel-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-cancel-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-cancel-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-cancel-128.png"), QSize(128, 128));
break;
case SP_DialogHelpButton:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-help-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-help-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-help-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-help-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-help-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-help-128.png"), QSize(128, 128));
break;
case SP_DialogOpenButton:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-open-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-open-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-open-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-open-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-open-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-open-128.png"), QSize(128, 128));
break;
case SP_DialogSaveButton:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-save-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-save-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-save-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-save-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-save-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-save-128.png"), QSize(128, 128));
break;
case SP_DialogCloseButton:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-close-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-close-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-close-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-close-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-close-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-close-128.png"), QSize(128, 128));
break;
case SP_DialogApplyButton:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-apply-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-apply-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-apply-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-apply-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-apply-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-apply-128.png"), QSize(128, 128));
break;
case SP_DialogResetButton:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-clear-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-clear-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-clear-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-clear-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-clear-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-clear-128.png"), QSize(128, 128));
break;
case SP_DialogDiscardButton:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-delete-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-delete-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-delete-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-delete-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-delete-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-delete-128.png"), QSize(128, 128));
break;
case SP_DialogYesButton:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-yes-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-yes-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-yes-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-yes-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-yes-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-yes-128.png"), QSize(128, 128));
break;
case SP_DialogNoButton:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-no-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-no-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-no-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-no-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-no-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-no-128.png"), QSize(128, 128));
break;
case SP_ArrowForward:
if (rtl)
@@ -5847,24 +5853,24 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons
return standardIconImplementation(SP_ArrowRight, option, widget);
return standardIconImplementation(SP_ArrowLeft, option, widget);
case SP_ArrowLeft:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/left-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/left-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/left-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/left-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/left-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/left-128.png"), QSize(128, 128));
break;
case SP_ArrowRight:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/right-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/right-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/right-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/right-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/right-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/right-128.png"), QSize(128, 128));
break;
case SP_ArrowUp:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/up-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/up-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/up-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/up-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/up-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/up-128.png"), QSize(128, 128));
break;
case SP_ArrowDown:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/down-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/down-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/down-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/down-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/down-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/down-128.png"), QSize(128, 128));
break;
case SP_DirHomeIcon:
case SP_DirIcon:
@@ -5882,71 +5888,71 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons
QSize(128, 128), QIcon::Normal, QIcon::On);
break;
case SP_DriveCDIcon:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/cdr-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/cdr-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/cdr-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/cdr-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/cdr-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/cdr-128.png"), QSize(128, 128));
break;
case SP_DriveDVDIcon:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/dvd-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/dvd-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/dvd-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/dvd-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/dvd-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/dvd-128.png"), QSize(128, 128));
break;
case SP_FileIcon:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/file-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/file-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/file-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/file-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/file-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/file-128.png"), QSize(128, 128));
break;
case SP_FileLinkIcon:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filelink-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filelink-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filelink-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filelink-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filelink-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filelink-128.png"), QSize(128, 128));
break;
case SP_TrashIcon:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/trash-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/trash-32.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/trash-128.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/trash-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/trash-32.png"), QSize(32, 32));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/trash-128.png"), QSize(128, 128));
break;
case SP_BrowserReload:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/refresh-24.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/refresh-32.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/refresh-24.png"), QSize(24, 24));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/refresh-32.png"), QSize(32, 32));
break;
case SP_BrowserStop:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/stop-24.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/stop-32.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/stop-24.png"), QSize(24, 24));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/stop-32.png"), QSize(32, 32));
break;
case SP_MediaPlay:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-play-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-play-32.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-play-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-play-32.png"), QSize(32, 32));
break;
case SP_MediaPause:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-pause-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-pause-32.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-pause-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-pause-32.png"), QSize(32, 32));
break;
case SP_MediaStop:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-stop-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-stop-32.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-stop-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-stop-32.png"), QSize(32, 32));
break;
case SP_MediaSeekForward:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-seek-forward-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-seek-forward-32.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-seek-forward-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-seek-forward-32.png"), QSize(32, 32));
break;
case SP_MediaSeekBackward:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-seek-backward-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-seek-backward-32.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-seek-backward-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-seek-backward-32.png"), QSize(32, 32));
break;
case SP_MediaSkipForward:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-skip-forward-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-skip-forward-32.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-skip-forward-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-skip-forward-32.png"), QSize(32, 32));
break;
case SP_MediaSkipBackward:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-skip-backward-16.png"));
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-skip-backward-32.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-skip-backward-16.png"), QSize(16, 16));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-skip-backward-32.png"), QSize(32, 32));
break;
case SP_MediaVolume:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-volume-16.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-volume-16.png"), QSize(16, 16));
break;
case SP_MediaVolumeMuted:
- icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-volume-muted-16.png"));
+ icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-volume-muted-16.png"), QSize(16, 16));
break;
#endif // QT_NO_IMAGEFORMAT_PNG
default:
diff --git a/src/gui/styles/qgtkpainter.cpp b/src/gui/styles/qgtkpainter.cpp
index 6cc745508f..1f68f2f768 100644
--- a/src/gui/styles/qgtkpainter.cpp
+++ b/src/gui/styles/qgtkpainter.cpp
@@ -142,7 +142,7 @@ QPixmap QGtkPainter::renderTheme(uchar *bdata, uchar *wdata, const QRect &rect)
}
QGtkPainter::QGtkPainter(QPainter *_painter)
- : m_window(QGtkStylePrivate::gtkWidget(QLatin1String("GtkWindow")))
+ : m_window(QGtkStylePrivate::gtkWidget("GtkWindow"))
, m_painter(_painter)
, m_alpha(true)
, m_hflipped(false)
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index b5f052b709..e2de43a6c4 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -222,7 +222,7 @@ QPalette QGtkStyle::standardPalette() const
QPalette palette = QCleanlooksStyle::standardPalette();
if (d->isThemeAvailable()) {
GtkStyle *style = d->gtkStyle();
- GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton"));
+ GtkWidget *gtkButton = d->gtkWidget("GtkButton");
GtkWidget *gtkEntry = d->getTextColorWidget();
GdkColor gdkBg, gdkBase, gdkText, gdkForeground, gdkSbg, gdkSfg;
@@ -253,7 +253,7 @@ QPalette QGtkStyle::standardPalette() const
palette.setColor(QPalette::Base, base);
QColor alternateRowColor = palette.base().color().lighter(93); // ref gtkstyle.c draw_flat_box
- GtkWidget *gtkTreeView = d->gtkWidget(QLS("GtkTreeView"));
+ GtkWidget *gtkTreeView = d->gtkWidget("GtkTreeView");
GdkColor *gtkAltBase = NULL;
d->gtk_widget_style_get(gtkTreeView, "odd-row-color", &gtkAltBase, NULL);
if (gtkAltBase) {
@@ -421,14 +421,14 @@ int QGtkStyle::pixelMetric(PixelMetric metric,
return 0;
case PM_ButtonShiftHorizontal: {
- GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton"));
+ GtkWidget *gtkButton = d->gtkWidget("GtkButton");
guint horizontal_shift;
d->gtk_widget_style_get(gtkButton, "child-displacement-x", &horizontal_shift, NULL);
return horizontal_shift;
}
case PM_ButtonShiftVertical: {
- GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton"));
+ GtkWidget *gtkButton = d->gtkWidget("GtkButton");
guint vertical_shift;
d->gtk_widget_style_get(gtkButton, "child-displacement-y", &vertical_shift, NULL);
return vertical_shift;
@@ -438,7 +438,7 @@ int QGtkStyle::pixelMetric(PixelMetric metric,
return 0;
case PM_MenuPanelWidth: {
- GtkWidget *gtkMenu = d->gtkWidget(QLS("GtkMenu"));
+ GtkWidget *gtkMenu = d->gtkWidget("GtkMenu");
guint horizontal_padding = 0;
// horizontal-padding is used by Maemo to get thicker borders
if (!d->gtk_check_version(2, 10, 0))
@@ -495,7 +495,7 @@ int QGtkStyle::pixelMetric(PixelMetric metric,
case PM_SliderThickness:
case PM_SliderControlThickness: {
- GtkWidget *gtkScale = d->gtkWidget(QLS("GtkHScale"));
+ GtkWidget *gtkScale = d->gtkWidget("GtkHScale");
gint val;
d->gtk_widget_style_get(gtkScale, "slider-width", &val, NULL);
if (metric == PM_SliderControlThickness)
@@ -506,7 +506,7 @@ int QGtkStyle::pixelMetric(PixelMetric metric,
case PM_ScrollBarExtent: {
gint sliderLength;
gint trough_border;
- GtkWidget *hScrollbar = d->gtkWidget(QLS("GtkHScrollbar"));
+ GtkWidget *hScrollbar = d->gtkWidget("GtkHScrollbar");
d->gtk_widget_style_get(hScrollbar,
"trough-border", &trough_border,
"slider-width", &sliderLength,
@@ -519,34 +519,34 @@ int QGtkStyle::pixelMetric(PixelMetric metric,
case PM_SliderLength:
gint val;
- d->gtk_widget_style_get(d->gtkWidget(QLS("GtkHScale")), "slider-length", &val, NULL);
+ d->gtk_widget_style_get(d->gtkWidget("GtkHScale"), "slider-length", &val, NULL);
return val;
case PM_ExclusiveIndicatorWidth:
case PM_ExclusiveIndicatorHeight:
case PM_IndicatorWidth:
case PM_IndicatorHeight: {
- GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton"));
+ GtkWidget *gtkCheckButton = d->gtkWidget("GtkCheckButton");
gint size, spacing;
d->gtk_widget_style_get(gtkCheckButton, "indicator-spacing", &spacing, "indicator-size", &size, NULL);
return size + 2 * spacing;
}
case PM_MenuBarVMargin: {
- GtkWidget *gtkMenubar = d->gtkWidget(QLS("GtkMenuBar"));
+ GtkWidget *gtkMenubar = d->gtkWidget("GtkMenuBar");
return qMax(0, gtkMenubar->style->ythickness);
}
case PM_ScrollView_ScrollBarSpacing:
{
gint spacing = 3;
- GtkWidget *gtkScrollWindow = d->gtkWidget(QLS("GtkScrolledWindow"));
+ GtkWidget *gtkScrollWindow = d->gtkWidget("GtkScrolledWindow");
Q_ASSERT(gtkScrollWindow);
d->gtk_widget_style_get(gtkScrollWindow, "scrollbar-spacing", &spacing, NULL);
return spacing;
}
case PM_SubMenuOverlap: {
gint offset = 0;
- GtkWidget *gtkMenu = d->gtkWidget(QLS("GtkMenu"));
+ GtkWidget *gtkMenu = d->gtkWidget("GtkMenu");
d->gtk_widget_style_get(gtkMenu, "horizontal-offset", &offset, NULL);
return offset;
}
@@ -587,7 +587,7 @@ int QGtkStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidg
{
if (d->isKDE4Session())
return QCleanlooksStyle::styleHint(hint, option, widget, returnData);
- GtkWidget *gtkToolbar = d->gtkWidget(QLS("GtkToolbar"));
+ GtkWidget *gtkToolbar = d->gtkWidget("GtkToolbar");
GtkToolbarStyle toolbar_style = GTK_TOOLBAR_ICONS;
g_object_get(gtkToolbar, "toolbar-style", &toolbar_style, NULL);
switch (toolbar_style) {
@@ -610,7 +610,7 @@ int QGtkStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidg
return int(false);
case SH_ComboBox_Popup: {
- GtkWidget *gtkComboBox = d->gtkWidget(QLS("GtkComboBox"));
+ GtkWidget *gtkComboBox = d->gtkWidget("GtkComboBox");
gboolean appears_as_list;
d->gtk_widget_style_get((GtkWidget*)gtkComboBox, "appears-as-list", &appears_as_list, NULL);
return appears_as_list ? 0 : 1;
@@ -634,7 +634,7 @@ int QGtkStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidg
if (widget && widget->isWindow())
scrollbars_within_bevel = true;
else if (!d->gtk_check_version(2, 12, 0)) {
- GtkWidget *gtkScrollWindow = d->gtkWidget(QLS("GtkScrolledWindow"));
+ GtkWidget *gtkScrollWindow = d->gtkWidget("GtkScrolledWindow");
d->gtk_widget_style_get(gtkScrollWindow, "scrollbars-within-bevel", &scrollbars_within_bevel, NULL);
}
return !scrollbars_within_bevel;
@@ -712,7 +712,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
GtkStyle *style = d->gtk_rc_get_style_by_paths(d->gtk_settings_get_default(),
"*.GtkScrolledWindow", "*.GtkScrolledWindow", d->gtk_window_get_type());
if (style)
- gtkFramePainter.paintShadow(d->gtkWidget(QLS("GtkFrame")), "viewport", pmRect,
+ gtkFramePainter.paintShadow(d->gtkWidget("GtkFrame"), "viewport", pmRect,
option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE,
shadow_type, style);
QPixmapCache::insert(pmKey, pixmap);
@@ -739,7 +739,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
break;
case PE_PanelTipLabel: {
- GtkWidget *gtkWindow = d->gtkWidget(QLS("GtkWindow")); // The Murrine Engine currently assumes a widget is passed
+ GtkWidget *gtkWindow = d->gtkWidget("GtkWindow"); // The Murrine Engine currently assumes a widget is passed
style = d->gtk_rc_get_style_by_paths(d->gtk_settings_get_default(), "gtk-tooltips", "GtkWindow",
d->gtk_window_get_type());
gtkPainter.paintFlatBox(gtkWindow, "tooltip", option->rect, GTK_STATE_NORMAL, GTK_SHADOW_NONE, style);
@@ -754,7 +754,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
break;
}
GtkShadowType shadow_type;
- GtkWidget *gtkStatusbarFrame = d->gtkWidget(QLS("GtkStatusbar.GtkFrame"));
+ GtkWidget *gtkStatusbarFrame = d->gtkWidget("GtkStatusbar.GtkFrame");
d->gtk_widget_style_get(gtkStatusbarFrame->parent, "shadow-type", &shadow_type, NULL);
gtkPainter.paintShadow(gtkStatusbarFrame, "frame", option->rect, GTK_STATE_NORMAL,
shadow_type, gtkStatusbarFrame->style);
@@ -763,7 +763,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
case PE_IndicatorHeaderArrow:
if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) {
- GtkWidget *gtkTreeHeader = d->gtkWidget(QLS("GtkTreeView.GtkButton"));
+ GtkWidget *gtkTreeHeader = d->gtkWidget("GtkTreeView.GtkButton");
GtkStateType state = gtkPainter.gtkState(option);
style = gtkTreeHeader->style;
GtkArrowType type = GTK_ARROW_UP;
@@ -801,7 +801,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
rect.translate(2, 0);
GtkExpanderStyle openState = GTK_EXPANDER_EXPANDED;
GtkExpanderStyle closedState = GTK_EXPANDER_COLLAPSED;
- GtkWidget *gtkTreeView = d->gtkWidget(QLS("GtkTreeView"));
+ GtkWidget *gtkTreeView = d->gtkWidget("GtkTreeView");
GtkStateType state = GTK_STATE_NORMAL;
if (!(option->state & State_Enabled))
@@ -837,7 +837,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
case PE_IndicatorToolBarSeparator:
{
const int margin = 6;
- GtkWidget *gtkSeparator = d->gtkWidget(QLS("GtkToolbar.GtkSeparatorToolItem"));
+ GtkWidget *gtkSeparator = d->gtkWidget("GtkToolbar.GtkSeparatorToolItem");
if (option->state & State_Horizontal) {
const int offset = option->rect.width()/2;
QRect rect = option->rect.adjusted(offset, margin, 0, -margin);
@@ -857,7 +857,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
break;
case PE_IndicatorToolBarHandle: {
- GtkWidget *gtkToolbar = d->gtkWidget(QLS("GtkToolbar"));
+ GtkWidget *gtkToolbar = d->gtkWidget("GtkToolbar");
GtkShadowType shadow_type;
d->gtk_widget_style_get(gtkToolbar, "shadow-type", &shadow_type, NULL);
//Note when the toolbar is horizontal, the handle is vertical
@@ -905,7 +905,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
GtkStateType state = gtkPainter.gtkState(option);
QColor arrowColor = option->palette.buttonText().color();
- GtkWidget *gtkArrow = d->gtkWidget(QLS("GtkArrow"));
+ GtkWidget *gtkArrow = d->gtkWidget("GtkArrow");
GdkColor color = fromQColor(arrowColor);
d->gtk_widget_modify_fg (gtkArrow, state, &color);
gtkPainter.paintArrow(gtkArrow, "button", arrowRect,
@@ -921,7 +921,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
break;
case PE_PanelMenu: {
- GtkWidget *gtkMenu = d->gtkWidget(QLS("GtkMenu"));
+ GtkWidget *gtkMenu = d->gtkWidget("GtkMenu");
gtkPainter.setAlphaSupport(false); // Note, alpha disabled for performance reasons
gtkPainter.paintBox(gtkMenu, "menu", option->rect, GTK_STATE_NORMAL, GTK_SHADOW_OUT, gtkMenu->style, QString());
}
@@ -933,7 +933,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
// This is only used by floating tool bars
if (qobject_cast<const QToolBar *>(widget)) {
- GtkWidget *gtkMenubar = d->gtkWidget(QLS("GtkMenuBar"));
+ GtkWidget *gtkMenubar = d->gtkWidget("GtkMenuBar");
gtkPainter.paintBox( gtkMenubar, "toolbar", option->rect,
GTK_STATE_NORMAL, GTK_SHADOW_OUT, style);
gtkPainter.paintBox( gtkMenubar, "menu", option->rect,
@@ -942,7 +942,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
break;
case PE_FrameLineEdit: {
- GtkWidget *gtkEntry = d->gtkWidget(QLS("GtkEntry"));
+ GtkWidget *gtkEntry = d->gtkWidget("GtkEntry");
gboolean interior_focus;
@@ -976,7 +976,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
case PE_PanelLineEdit:
if (const QStyleOptionFrame *panel = qstyleoption_cast<const QStyleOptionFrame *>(option)) {
- GtkWidget *gtkEntry = d->gtkWidget(QLS("GtkEntry"));
+ GtkWidget *gtkEntry = d->gtkWidget("GtkEntry");
if (panel->lineWidth > 0)
proxy()->drawPrimitive(PE_FrameLineEdit, option, painter, widget);
uint resolve_mask = option->palette.resolve();
@@ -994,7 +994,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
case PE_FrameTabWidget:
if (const QStyleOptionTabWidgetFrame *frame = qstyleoption_cast<const QStyleOptionTabWidgetFrame*>(option)) {
- GtkWidget *gtkNotebook = d->gtkWidget(QLS("GtkNotebook"));
+ GtkWidget *gtkNotebook = d->gtkWidget("GtkNotebook");
style = gtkPainter.getStyle(gtkNotebook);
gtkPainter.setAlphaSupport(false);
GtkShadowType shadow = GTK_SHADOW_OUT;
@@ -1042,7 +1042,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
GtkStateType state = gtkPainter.gtkState(option);
if (option->state & State_On || option->state & State_Sunken)
state = GTK_STATE_ACTIVE;
- GtkWidget *gtkButton = d->gtkWidget(isTool ? QLS("GtkToolButton.GtkButton") : QLS("GtkButton"));
+ GtkWidget *gtkButton = isTool ? d->gtkWidget("GtkToolButton.GtkButton") : d->gtkWidget("GtkButton");
gint focusWidth, focusPad;
gboolean interiorFocus = false;
d->gtk_widget_style_get (gtkButton,
@@ -1098,14 +1098,14 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
else
shadow = GTK_SHADOW_OUT;
- GtkWidget *gtkRadioButton = d->gtkWidget(QLS("GtkRadioButton"));
+ GtkWidget *gtkRadioButton = d->gtkWidget("GtkRadioButton");
gint spacing;
d->gtk_widget_style_get(gtkRadioButton, "indicator-spacing", &spacing, NULL);
QRect buttonRect = option->rect.adjusted(spacing, spacing, -spacing, -spacing);
gtkPainter.setClipRect(option->rect);
// ### Note: Ubuntulooks breaks when the proper widget is passed
// Murrine engine requires a widget not to get RGBA check - warnings
- GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton"));
+ GtkWidget *gtkCheckButton = d->gtkWidget("GtkCheckButton");
QString key(QLS("radiobutton"));
if (option->state & State_HasFocus) { // Themes such as Nodoka check this flag
key += QLatin1Char('f');
@@ -1133,7 +1133,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
int spacing;
- GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton"));
+ GtkWidget *gtkCheckButton = d->gtkWidget("GtkCheckButton");
QString key(QLS("checkbutton"));
if (option->state & State_HasFocus) { // Themes such as Nodoka checks this flag
key += QLatin1Char('f');
@@ -1275,7 +1275,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
if ((groupBox->subControls & QStyle::SC_GroupBoxLabel) && !groupBox->text.isEmpty()) {
// Draw prelight background
- GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton"));
+ GtkWidget *gtkCheckButton = d->gtkWidget("GtkCheckButton");
if (option->state & State_MouseOver) {
QRect bgRect = textRect | checkBoxRect;
@@ -1348,7 +1348,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
GtkShadowType shadow = (option->state & State_Sunken || option->state & State_On ) ?
GTK_SHADOW_IN : GTK_SHADOW_OUT;
- QString comboBoxPath = QLS(comboBox->editable ? "GtkComboBoxEntry" : "GtkComboBox");
+ const QHashableLatin1Literal comboBoxPath = comboBox->editable ? QHashableLatin1Literal("GtkComboBoxEntry") : QHashableLatin1Literal("GtkComboBox");
// We use the gtk widget to position arrows and separators for us
GtkWidget *gtkCombo = d->gtkWidget(comboBoxPath);
@@ -1356,7 +1356,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
d->gtk_widget_set_direction(gtkCombo, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
d->gtk_widget_size_allocate(gtkCombo, &geometry);
- QString buttonPath = comboBoxPath + QLS(".GtkToggleButton");
+ QHashableLatin1Literal buttonPath = comboBox->editable ? QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton")
+ : QHashableLatin1Literal("GtkComboBox.GtkToggleButton");
GtkWidget *gtkToggleButton = d->gtkWidget(buttonPath);
d->gtk_widget_set_direction(gtkToggleButton, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
if (gtkToggleButton && (appears_as_list || comboBox->editable)) {
@@ -1365,7 +1366,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
// Draw the combo box as a line edit with a button next to it
if (comboBox->editable || appears_as_list) {
GtkStateType frameState = (state == GTK_STATE_PRELIGHT) ? GTK_STATE_NORMAL : state;
- QString entryPath = QLS(comboBox->editable ? "GtkComboBoxEntry.GtkEntry" : "GtkComboBox.GtkFrame");
+ QHashableLatin1Literal entryPath = comboBox->editable ? QHashableLatin1Literal("GtkComboBoxEntry.GtkEntry") : QHashableLatin1Literal("GtkComboBox.GtkFrame");
GtkWidget *gtkEntry = d->gtkWidget(entryPath);
d->gtk_widget_set_direction(gtkEntry, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
QRect frameRect = option->rect;
@@ -1391,11 +1392,11 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
else {
gtkCachedPainter.paintFlatBox(gtkEntry, "entry_bg", contentRect,
option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE,
- GTK_SHADOW_NONE, gtkEntry->style, entryPath + QString::number(focus));
+ GTK_SHADOW_NONE, gtkEntry->style, entryPath.toString() + QString::number(focus));
}
gtkCachedPainter.paintShadow(gtkEntry, comboBox->editable ? "entry" : "frame", frameRect, frameState,
- GTK_SHADOW_IN, gtkEntry->style, entryPath +
+ GTK_SHADOW_IN, gtkEntry->style, entryPath.toString() +
QString::number(focus) + QString::number(comboBox->editable) +
QString::number(option->direction));
if (focus)
@@ -1416,7 +1417,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
Q_ASSERT(gtkToggleButton);
gtkCachedPainter.paintBox( gtkToggleButton, "button", arrowButtonRect, buttonState,
- shadow, gtkToggleButton->style, buttonPath +
+ shadow, gtkToggleButton->style, buttonPath.toString() +
QString::number(focus) + QString::number(option->direction));
if (focus)
GTK_WIDGET_UNSET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS);
@@ -1429,12 +1430,17 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
gtkCachedPainter.paintBox(gtkToggleButton, "button",
buttonRect, state,
shadow, gtkToggleButton->style,
- buttonPath + QString::number(focus));
+ buttonPath.toString() + QString::number(focus));
if (focus)
GTK_WIDGET_UNSET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS);
+ QHashableLatin1Literal buttonPath = comboBox->editable ? QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton")
+ : QHashableLatin1Literal("GtkComboBox.GtkToggleButton");
+
// Draw the separator between label and arrows
- QString vSeparatorPath = buttonPath + QLS(".GtkHBox.GtkVSeparator");
+ QHashableLatin1Literal vSeparatorPath = comboBox->editable
+ ? QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton.GtkHBox.GtkVSeparator")
+ : QHashableLatin1Literal("GtkComboBox.GtkToggleButton.GtkHBox.GtkVSeparator");
if (GtkWidget *gtkVSeparator = d->gtkWidget(vSeparatorPath)) {
QRect vLineRect(gtkVSeparator->allocation.x,
@@ -1444,7 +1450,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
gtkCachedPainter.paintVline( gtkVSeparator, "vseparator",
vLineRect, state, gtkVSeparator->style,
- 0, vLineRect.height(), 0, vSeparatorPath);
+ 0, vLineRect.height(), 0, vSeparatorPath.toString());
gint interiorFocus = true;
@@ -1469,8 +1475,18 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
else
state = GTK_STATE_NORMAL;
- QString arrowPath = comboBoxPath + QLS(appears_as_list ? ".GtkToggleButton.GtkArrow"
- : ".GtkToggleButton.GtkHBox.GtkArrow");
+ QHashableLatin1Literal arrowPath("");
+ if (comboBox->editable) {
+ if (appears_as_list)
+ arrowPath = QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton.GtkArrow");
+ else
+ arrowPath = QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton.GtkHBox.GtkArrow");
+ } else {
+ if (appears_as_list)
+ arrowPath = QHashableLatin1Literal("GtkComboBox.GtkToggleButton.GtkArrow");
+ else
+ arrowPath = QHashableLatin1Literal("GtkComboBox.GtkToggleButton.GtkHBox.GtkArrow");
+ }
GtkWidget *gtkArrow = d->gtkWidget(arrowPath);
gfloat scale = 0.7;
@@ -1497,7 +1513,11 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
if (sunken) {
int xoff, yoff;
- GtkWidget *gtkButton = d->gtkWidget(comboBoxPath + QLS(".GtkToggleButton"));
+ const QHashableLatin1Literal toggleButtonPath = comboBox->editable
+ ? QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton")
+ : QHashableLatin1Literal("GtkComboBox.GtkToggleButton");
+
+ GtkWidget *gtkButton = d->gtkWidget(toggleButtonPath);
d->gtk_widget_style_get(gtkButton, "child-displacement-x", &xoff, NULL);
d->gtk_widget_style_get(gtkButton, "child-displacement-y", &yoff, NULL);
arrowRect = arrowRect.adjusted(xoff, yoff, xoff, yoff);
@@ -1509,7 +1529,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
gtkCachedPainter.setClipRect(option->rect);
gtkCachedPainter.paintArrow( gtkArrow, "arrow", arrowRect,
GTK_ARROW_DOWN, state, GTK_SHADOW_NONE, TRUE,
- style, arrowPath + QString::number(option->direction));
+ style, arrowPath.toString() + QString::number(option->direction));
}
}
END_STYLE_PIXMAPCACHE;
@@ -1570,7 +1590,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
QStyleOptionToolButton label = *toolbutton;
label.state = bflags;
- GtkWidget *gtkButton = d->gtkWidget(QLS("GtkToolButton.GtkButton"));
+ GtkWidget *gtkButton = d->gtkWidget("GtkToolButton.GtkButton");
QPalette pal = toolbutton->palette;
if (option->state & State_Enabled &&
option->state & State_MouseOver && !(widget && widget->testAttribute(Qt::WA_SetPalette))) {
@@ -1605,8 +1625,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
case CC_ScrollBar:
if (const QStyleOptionSlider *scrollBar = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
- GtkWidget *gtkHScrollBar = d->gtkWidget(QLS("GtkHScrollbar"));
- GtkWidget *gtkVScrollBar = d->gtkWidget(QLS("GtkVScrollbar"));
+ GtkWidget *gtkHScrollBar = d->gtkWidget("GtkHScrollbar");
+ GtkWidget *gtkVScrollBar = d->gtkWidget("GtkVScrollbar");
// Fill background in case the scrollbar is partially transparent
painter->fillRect(option->rect, option->palette.background());
@@ -1751,10 +1771,9 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
case CC_SpinBox:
if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
- GtkWidget *gtkSpinButton = d->gtkWidget(
- spinBox->buttonSymbols == QAbstractSpinBox::NoButtons ?
- QLS("GtkEntry") :
- QLS("GtkSpinButton"));
+ GtkWidget *gtkSpinButton = spinBox->buttonSymbols == QAbstractSpinBox::NoButtons
+ ? d->gtkWidget("GtkEntry")
+ : d->gtkWidget("GtkSpinButton");
bool isEnabled = (spinBox->state & State_Enabled);
bool hover = isEnabled && (spinBox->state & State_MouseOver);
bool sunken = (spinBox->state & State_Sunken);
@@ -1906,8 +1925,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
case CC_Slider:
if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
- GtkWidget *hScaleWidget = d->gtkWidget(QLS("GtkHScale"));
- GtkWidget *vScaleWidget = d->gtkWidget(QLS("GtkVScale"));
+ GtkWidget *hScaleWidget = d->gtkWidget("GtkHScale");
+ GtkWidget *vScaleWidget = d->gtkWidget("GtkVScale");
QRect groove = proxy()->subControlRect(CC_Slider, option, SC_SliderGroove, widget);
QRect handle = proxy()->subControlRect(CC_Slider, option, SC_SliderHandle, widget);
@@ -2097,7 +2116,7 @@ void QGtkStyle::drawControl(ControlElement element,
switch (element) {
case CE_ProgressBarLabel:
if (const QStyleOptionProgressBar *bar = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) {
- GtkWidget *gtkProgressBar = d->gtkWidget(QLS("GtkProgressBar"));
+ GtkWidget *gtkProgressBar = d->gtkWidget("GtkProgressBar");
if (!gtkProgressBar)
return;
@@ -2200,7 +2219,7 @@ void QGtkStyle::drawControl(ControlElement element,
if (button->features & QStyleOptionButton::HasMenu)
ir = ir.adjusted(0, 0, -pixelMetric(PM_MenuButtonIndicator, button, widget), 0);
- GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton"));
+ GtkWidget *gtkButton = d->gtkWidget("GtkButton");
QPalette pal = button->palette;
int labelState = GTK_STATE_INSENSITIVE;
if (option->state & State_Enabled)
@@ -2221,7 +2240,7 @@ void QGtkStyle::drawControl(ControlElement element,
bool isRadio = (element == CE_RadioButton);
// Draw prelight background
- GtkWidget *gtkRadioButton = d->gtkWidget(QLS("GtkRadioButton"));
+ GtkWidget *gtkRadioButton = d->gtkWidget("GtkRadioButton");
if (option->state & State_MouseOver) {
gtkPainter.paintFlatBox(gtkRadioButton, "checkbutton", option->rect,
@@ -2289,7 +2308,7 @@ void QGtkStyle::drawControl(ControlElement element,
}
if (!cb->currentText.isEmpty() && !cb->editable) {
- GtkWidget *gtkCombo = d->gtkWidget(QLS("GtkComboBox"));
+ GtkWidget *gtkCombo = d->gtkWidget("GtkComboBox");
QPalette pal = cb->palette;
int labelState = GTK_STATE_INSENSITIVE;
@@ -2366,7 +2385,7 @@ void QGtkStyle::drawControl(ControlElement element,
// Draws the header in tables.
if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) {
Q_UNUSED(header);
- GtkWidget *gtkTreeView = d->gtkWidget(QLS("GtkTreeView"));
+ GtkWidget *gtkTreeView = d->gtkWidget("GtkTreeView");
// Get the middle column
GtkTreeViewColumn *column = d->gtk_tree_view_get_column((GtkTreeView*)gtkTreeView, 1);
Q_ASSERT(column);
@@ -2387,7 +2406,7 @@ void QGtkStyle::drawControl(ControlElement element,
#ifndef QT_NO_SIZEGRIP
case CE_SizeGrip: {
- GtkWidget *gtkStatusbar = d->gtkWidget(QLS("GtkStatusbar.GtkFrame"));
+ GtkWidget *gtkStatusbar = d->gtkWidget("GtkStatusbar.GtkFrame");
QRect gripRect = option->rect.adjusted(0, 0, -gtkStatusbar->style->xthickness, -gtkStatusbar->style->ythickness);
gtkPainter.paintResizeGrip( gtkStatusbar, "statusbar", gripRect, GTK_STATE_NORMAL,
GTK_SHADOW_OUT, QApplication::isRightToLeft() ?
@@ -2399,7 +2418,7 @@ void QGtkStyle::drawControl(ControlElement element,
#endif // QT_NO_SIZEGRIP
case CE_MenuBarEmptyArea: {
- GtkWidget *gtkMenubar = d->gtkWidget(QLS("GtkMenuBar"));
+ GtkWidget *gtkMenubar = d->gtkWidget("GtkMenuBar");
GdkColor gdkBg = gtkMenubar->style->bg[GTK_STATE_NORMAL]; // Theme can depend on transparency
painter->fillRect(option->rect, QColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8));
if (widget) { // See CE_MenuBarItem
@@ -2422,8 +2441,8 @@ void QGtkStyle::drawControl(ControlElement element,
painter->save();
if (const QStyleOptionMenuItem *mbi = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) {
- GtkWidget *gtkMenubarItem = d->gtkWidget(QLS("GtkMenuBar.GtkMenuItem"));
- GtkWidget *gtkMenubar = d->gtkWidget(QLS("GtkMenuBar"));
+ GtkWidget *gtkMenubarItem = d->gtkWidget("GtkMenuBar.GtkMenuItem");
+ GtkWidget *gtkMenubar = d->gtkWidget("GtkMenuBar");
style = gtkMenubarItem->style;
@@ -2479,7 +2498,7 @@ void QGtkStyle::drawControl(ControlElement element,
break;
case CE_Splitter: {
- GtkWidget *gtkWindow = d->gtkWidget(QLS("GtkWindow")); // The Murrine Engine currently assumes a widget is passed
+ GtkWidget *gtkWindow = d->gtkWidget("GtkWindow"); // The Murrine Engine currently assumes a widget is passed
gtkPainter.paintHandle(gtkWindow, "splitter", option->rect, gtkPainter.gtkState(option), GTK_SHADOW_NONE,
!(option->state & State_Horizontal) ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL,
style);
@@ -2499,7 +2518,7 @@ void QGtkStyle::drawControl(ControlElement element,
if (toolbar->positionWithinLine != QStyleOptionToolBar::End)
rect.adjust(0, 0, 1, 0);
- GtkWidget *gtkToolbar = d->gtkWidget(QLS("GtkToolbar"));
+ GtkWidget *gtkToolbar = d->gtkWidget("GtkToolbar");
GtkShadowType shadow_type = GTK_SHADOW_NONE;
d->gtk_widget_style_get(gtkToolbar, "shadow-type", &shadow_type, NULL);
gtkPainter.paintBox( gtkToolbar, "toolbar", rect,
@@ -2518,15 +2537,15 @@ void QGtkStyle::drawControl(ControlElement element,
const int windowsItemHMargin = 3; // menu item hor text margin
const int windowsItemVMargin = 26; // menu item ver text margin
const int windowsRightBorder = 15; // right border on windows
- GtkWidget *gtkMenuItem = menuItem->checked ? d->gtkWidget(QLS("GtkMenu.GtkCheckMenuItem")) :
- d->gtkWidget(QLS("GtkMenu.GtkMenuItem"));
+ GtkWidget *gtkMenuItem = menuItem->checked ? d->gtkWidget("GtkMenu.GtkCheckMenuItem") :
+ d->gtkWidget("GtkMenu.GtkMenuItem");
style = gtkPainter.getStyle(gtkMenuItem);
QColor borderColor = option->palette.background().color().darker(160);
QColor shadow = option->palette.dark().color();
if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) {
- GtkWidget *gtkMenuSeparator = d->gtkWidget(QLS("GtkMenu.GtkSeparatorMenuItem"));
+ GtkWidget *gtkMenuSeparator = d->gtkWidget("GtkMenu.GtkSeparatorMenuItem");
painter->setPen(shadow.lighter(106));
gboolean wide_separators = 0;
gint separator_height = 0;
@@ -2570,7 +2589,7 @@ void QGtkStyle::drawControl(ControlElement element,
bool ignoreCheckMark = false;
gint checkSize;
- d->gtk_widget_style_get(d->gtkWidget(QLS("GtkMenu.GtkCheckMenuItem")), "indicator-size", &checkSize, NULL);
+ d->gtk_widget_style_get(d->gtkWidget("GtkMenu.GtkCheckMenuItem"), "indicator-size", &checkSize, NULL);
int checkcol = qMax(menuItem->maxIconWidth, qMax(20, checkSize));
@@ -2781,7 +2800,7 @@ void QGtkStyle::drawControl(ControlElement element,
case CE_PushButton:
if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(option)) {
- GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton"));
+ GtkWidget *gtkButton = d->gtkWidget("GtkButton");
proxy()->drawControl(CE_PushButtonBevel, btn, painter, widget);
QStyleOptionButton subopt = *btn;
subopt.rect = subElementRect(SE_PushButtonContents, btn, widget);
@@ -2807,7 +2826,7 @@ void QGtkStyle::drawControl(ControlElement element,
case CE_TabBarTabShape:
if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) {
- GtkWidget *gtkNotebook = d->gtkWidget(QLS("GtkNotebook"));
+ GtkWidget *gtkNotebook = d->gtkWidget("GtkNotebook");
style = gtkPainter.getStyle(gtkNotebook);
QRect rect = option->rect;
@@ -2874,7 +2893,7 @@ void QGtkStyle::drawControl(ControlElement element,
case CE_ProgressBarGroove:
if (const QStyleOptionProgressBar *bar = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) {
Q_UNUSED(bar);
- GtkWidget *gtkProgressBar = d->gtkWidget(QLS("GtkProgressBar"));
+ GtkWidget *gtkProgressBar = d->gtkWidget("GtkProgressBar");
GtkStateType state = gtkPainter.gtkState(option);
gtkPainter.paintBox( gtkProgressBar, "trough", option->rect, state, GTK_SHADOW_IN, gtkProgressBar->style);
}
@@ -2884,7 +2903,7 @@ void QGtkStyle::drawControl(ControlElement element,
case CE_ProgressBarContents:
if (const QStyleOptionProgressBar *bar = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) {
GtkStateType state = option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE;
- GtkWidget *gtkProgressBar = d->gtkWidget(QLS("GtkProgressBar"));
+ GtkWidget *gtkProgressBar = d->gtkWidget("GtkProgressBar");
style = gtkProgressBar->style;
gtkPainter.paintBox( gtkProgressBar, "trough", option->rect, state, GTK_SHADOW_IN, style);
int xt = style->xthickness;
@@ -3042,7 +3061,7 @@ QRect QGtkStyle::subControlRect(ComplexControl control, const QStyleOptionComple
case CC_SpinBox:
if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
- GtkWidget *gtkSpinButton = d->gtkWidget(QLS("GtkSpinButton"));
+ GtkWidget *gtkSpinButton = d->gtkWidget("GtkSpinButton");
int center = spinbox->rect.height() / 2;
int xt = spinbox->frame ? gtkSpinButton->style->xthickness : 0;
int yt = spinbox->frame ? gtkSpinButton->style->ythickness : 0;
@@ -3096,15 +3115,19 @@ QRect QGtkStyle::subControlRect(ComplexControl control, const QStyleOptionComple
if (const QStyleOptionComboBox *box = qstyleoption_cast<const QStyleOptionComboBox *>(option)) {
// We employ the gtk widget to position arrows and separators for us
QString comboBoxPath = box->editable ? QLS("GtkComboBoxEntry") : QLS("GtkComboBox");
- GtkWidget *gtkCombo = d->gtkWidget(comboBoxPath);
+ GtkWidget *gtkCombo = box->editable ? d->gtkWidget("GtkComboBoxEntry")
+ : d->gtkWidget("GtkComboBox");
d->gtk_widget_set_direction(gtkCombo, (option->direction == Qt::RightToLeft) ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
GtkAllocation geometry = {0, 0, qMax(0, option->rect.width()), qMax(0, option->rect.height())};
d->gtk_widget_size_allocate(gtkCombo, &geometry);
int appears_as_list = !proxy()->styleHint(QStyle::SH_ComboBox_Popup, option, widget);
- QString arrowPath = comboBoxPath + QLS(".GtkToggleButton");
-
- if (!box->editable && !appears_as_list)
- arrowPath += QLS(".GtkHBox.GtkArrow");
+ QHashableLatin1Literal arrowPath("GtkComboBoxEntry.GtkToggleButton");
+ if (!box->editable) {
+ if (appears_as_list)
+ arrowPath = "GtkComboBox.GtkToggleButton";
+ else
+ arrowPath = "GtkComboBox.GtkToggleButton.GtkHBox.GtkArrow";
+ }
GtkWidget *arrowWidget = d->gtkWidget(arrowPath);
if (!arrowWidget)
@@ -3163,7 +3186,7 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option,
case CT_ToolButton:
if (const QStyleOptionToolButton *toolbutton = qstyleoption_cast<const QStyleOptionToolButton *>(option)) {
- GtkWidget *gtkButton = d->gtkWidget(QLS("GtkToolButton.GtkButton"));
+ GtkWidget *gtkButton = d->gtkWidget("GtkToolButton.GtkButton");
newSize = size + QSize(2 * gtkButton->style->xthickness, 2 + 2 * gtkButton->style->ythickness);
if (widget && qobject_cast<QToolBar *>(widget->parentWidget())) {
QSize minSize(0, 25);
@@ -3181,14 +3204,14 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option,
int textMargin = 8;
if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) {
- GtkWidget *gtkMenuSeparator = d->gtkWidget(QLS("GtkMenu.GtkSeparatorMenuItem"));
+ GtkWidget *gtkMenuSeparator = d->gtkWidget("GtkMenu.GtkSeparatorMenuItem");
GtkRequisition sizeReq = {0, 0};
d->gtk_widget_size_request(gtkMenuSeparator, &sizeReq);
newSize = QSize(size.width(), sizeReq.height);
break;
}
- GtkWidget *gtkMenuItem = d->gtkWidget(QLS("GtkMenu.GtkCheckMenuItem"));
+ GtkWidget *gtkMenuItem = d->gtkWidget("GtkMenu.GtkCheckMenuItem");
GtkStyle* style = gtkMenuItem->style;
// Note we get the perfect height for the default font since we
@@ -3210,12 +3233,12 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option,
case CT_SpinBox:
// QSpinBox does some nasty things that depends on CT_LineEdit
- newSize = size + QSize(0, -d->gtkWidget(QLS("GtkSpinButton"))->style->ythickness * 2);
+ newSize = size + QSize(0, -d->gtkWidget("GtkSpinButton")->style->ythickness * 2);
break;
case CT_PushButton:
if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(option)) {
- GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton"));
+ GtkWidget *gtkButton = d->gtkWidget("GtkButton");
gint focusPadding, focusWidth;
d->gtk_widget_style_get(gtkButton, "focus-padding", &focusPadding, NULL);
d->gtk_widget_style_get(gtkButton, "focus-line-width", &focusWidth, NULL);
@@ -3223,7 +3246,7 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option,
newSize += QSize(2*gtkButton->style->xthickness + 4, 2*gtkButton->style->ythickness);
newSize += QSize(2*(focusWidth + focusPadding + 2), 2*(focusWidth + focusPadding));
- GtkWidget *gtkButtonBox = d->gtkWidget(QLS("GtkHButtonBox"));
+ GtkWidget *gtkButtonBox = d->gtkWidget("GtkHButtonBox");
gint minWidth = 85, minHeight = 0;
d->gtk_widget_style_get(gtkButtonBox, "child-min-width", &minWidth,
"child-min-height", &minHeight, NULL);
@@ -3236,13 +3259,13 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option,
break;
case CT_Slider: {
- GtkWidget *gtkSlider = d->gtkWidget(QLS("GtkHScale"));
+ GtkWidget *gtkSlider = d->gtkWidget("GtkHScale");
newSize = size + QSize(2*gtkSlider->style->xthickness, 2*gtkSlider->style->ythickness);
}
break;
case CT_LineEdit: {
- GtkWidget *gtkEntry = d->gtkWidget(QLS("GtkEntry"));
+ GtkWidget *gtkEntry = d->gtkWidget("GtkEntry");
newSize = size + QSize(2*gtkEntry->style->xthickness, 2 + 2*gtkEntry->style->ythickness);
}
break;
@@ -3253,7 +3276,7 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option,
case CT_ComboBox:
if (const QStyleOptionComboBox *combo = qstyleoption_cast<const QStyleOptionComboBox *>(option)) {
- GtkWidget *gtkCombo = d->gtkWidget(QLS("GtkComboBox"));
+ GtkWidget *gtkCombo = d->gtkWidget("GtkComboBox");
QRect arrowButtonRect = proxy()->subControlRect(CC_ComboBox, combo, SC_ComboBoxArrow, widget);
newSize = size + QSize(12 + arrowButtonRect.width() + 2*gtkCombo->style->xthickness, 4 + 2*gtkCombo->style->ythickness);
@@ -3405,7 +3428,7 @@ QRect QGtkStyle::subElementRect(SubElement element, const QStyleOption *option,
return option->rect;
case SE_PushButtonContents:
if (!d->gtk_check_version(2, 10, 0)) {
- GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton"));
+ GtkWidget *gtkButton = d->gtkWidget("GtkButton");
GtkBorder *border = 0;
d->gtk_widget_style_get(gtkButton, "inner-border", &border, NULL);
if (border) {
diff --git a/src/gui/styles/qgtkstyle_p.cpp b/src/gui/styles/qgtkstyle_p.cpp
index ad6746f8bc..3c6a1efe3e 100644
--- a/src/gui/styles/qgtkstyle_p.cpp
+++ b/src/gui/styles/qgtkstyle_p.cpp
@@ -60,6 +60,7 @@
#include <QtCore/QHash>
#include <QtCore/QUrl>
#include <QtCore/QLibrary>
+#include <QtCore/QDebug>
#include <private/qapplication_p.h>
#include <private/qiconloader_p.h>
@@ -233,17 +234,22 @@ static void update_toolbar_style(GtkWidget *gtkToolBar, GParamSpec *, gpointer)
}
}
-static QString classPath(GtkWidget *widget)
+static QHashableLatin1Literal classPath(GtkWidget *widget)
{
- char* class_path;
+ char *class_path;
QGtkStylePrivate::gtk_widget_path (widget, NULL, &class_path, NULL);
- QString path = QLS(class_path);
+
+ char *copy = class_path;
+ if (strncmp(copy, "GtkWindow.", 10) == 0)
+ copy += 10;
+ if (strncmp(copy, "GtkFixed.", 9) == 0)
+ copy += 9;
+
+ copy = strdup(copy);
+
g_free(class_path);
- // Remove the prefixes
- path.remove(QLS("GtkWindow."));
- path.remove(QLS("GtkFixed."));
- return path;
+ return QHashableLatin1Literal::fromData(copy);
}
@@ -261,6 +267,7 @@ bool QGtkStyleFilter::eventFilter(QObject *obj, QEvent *e)
}
QList<QGtkStylePrivate *> QGtkStylePrivate::instances;
+QGtkStylePrivate::WidgetMap *QGtkStylePrivate::widgetMap = 0;
QGtkStylePrivate::QGtkStylePrivate()
: QCleanlooksStylePrivate()
@@ -282,7 +289,7 @@ void QGtkStylePrivate::init()
qApp->installEventFilter(&filter);
}
-GtkWidget* QGtkStylePrivate::gtkWidget(const QString &path)
+GtkWidget* QGtkStylePrivate::gtkWidget(const QHashableLatin1Literal &path)
{
GtkWidget *widget = gtkWidgetMap()->value(path);
if (!widget) {
@@ -292,10 +299,10 @@ GtkWidget* QGtkStylePrivate::gtkWidget(const QString &path)
return widget;
}
-GtkStyle* QGtkStylePrivate::gtkStyle(const QString &path)
+GtkStyle* QGtkStylePrivate::gtkStyle(const QHashableLatin1Literal &path)
{
- if (gtkWidgetMap()->contains(path))
- return gtkWidgetMap()->value(path)->style;
+ if (GtkWidget *w = gtkWidgetMap()->value(path))
+ return w->style;
return 0;
}
@@ -494,7 +501,7 @@ void QGtkStylePrivate::initGtkWidgets() const
}
static QString themeName;
- if (!gtkWidgetMap()->contains(QLS("GtkWindow")) && themeName.isEmpty()) {
+ if (!gtkWidgetMap()->contains("GtkWindow") && themeName.isEmpty()) {
themeName = getThemeName();
if (themeName.isEmpty()) {
@@ -519,14 +526,14 @@ void QGtkStylePrivate::initGtkWidgets() const
QGtkStylePrivate::gtk_widget_realize(gtkWindow);
if (displayDepth == -1)
displayDepth = QGtkStylePrivate::gdk_drawable_get_depth(gtkWindow->window);
- gtkWidgetMap()->insert(QLS("GtkWindow"), gtkWindow);
+ gtkWidgetMap()->insert(QHashableLatin1Literal::fromData(strdup("GtkWindow")), gtkWindow);
// Make all other widgets. respect the text direction
if (qApp->layoutDirection() == Qt::RightToLeft)
QGtkStylePrivate::gtk_widget_set_default_direction(GTK_TEXT_DIR_RTL);
- if (!gtkWidgetMap()->contains(QLS("GtkButton"))) {
+ if (!gtkWidgetMap()->contains("GtkButton")) {
GtkWidget *gtkButton = QGtkStylePrivate::gtk_button_new();
addWidget(gtkButton);
g_signal_connect(gtkButton, "style-set", G_CALLBACK(gtkStyleSetCallback), 0);
@@ -563,12 +570,12 @@ void QGtkStylePrivate::initGtkWidgets() const
// When styles change subwidgets can get rearranged
// as with the combo box. We need to update the widget map
// to reflect this;
- QHash<QString, GtkWidget*> oldMap = *gtkWidgetMap();
+ QHash<QHashableLatin1Literal, GtkWidget*> oldMap = *gtkWidgetMap();
gtkWidgetMap()->clear();
- QHashIterator<QString, GtkWidget*> it(oldMap);
+ QHashIterator<QHashableLatin1Literal, GtkWidget*> it(oldMap);
while (it.hasNext()) {
it.next();
- if (!it.key().contains(QLatin1Char('.'))) {
+ if (!strchr(it.key().data(), '.')) {
addAllSubWidgets(it.value());
}
}
@@ -583,8 +590,13 @@ void QGtkStylePrivate::initGtkWidgets() const
*/
void QGtkStylePrivate::cleanupGtkWidgets()
{
- if (gtkWidgetMap()->contains(QLS("GtkWindow"))) // Gtk will destroy all children
- gtk_widget_destroy(gtkWidgetMap()->value(QLS("GtkWindow")));
+ if (!widgetMap)
+ return;
+ if (widgetMap->contains("GtkWindow")) // Gtk will destroy all children
+ gtk_widget_destroy(widgetMap->value("GtkWindow"));
+ for (QHash<QHashableLatin1Literal, GtkWidget *>::const_iterator it = widgetMap->constBegin();
+ it != widgetMap->constEnd(); ++it)
+ free(const_cast<char *>(it.key().data()));
}
static bool resolveGConf()
@@ -675,7 +687,7 @@ QString QGtkStylePrivate::getThemeName()
int QGtkStylePrivate::getSpinboxArrowSize() const
{
const int MIN_ARROW_WIDTH = 6;
- GtkWidget *spinButton = gtkWidget(QLS("GtkSpinButton"));
+ GtkWidget *spinButton = gtkWidget("GtkSpinButton");
GtkStyle *style = spinButton->style;
gint size = pango_font_description_get_size (style->font_desc);
gint arrow_size;
@@ -695,17 +707,17 @@ bool QGtkStylePrivate::isKDE4Session()
void QGtkStylePrivate::applyCustomPaletteHash()
{
- QPalette menuPal = gtkWidgetPalette(QLS("GtkMenu"));
- GdkColor gdkBg = gtkWidget(QLS("GtkMenu"))->style->bg[GTK_STATE_NORMAL];
+ QPalette menuPal = gtkWidgetPalette("GtkMenu");
+ GdkColor gdkBg = gtkWidget("GtkMenu")->style->bg[GTK_STATE_NORMAL];
QColor bgColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8);
menuPal.setBrush(QPalette::Base, bgColor);
menuPal.setBrush(QPalette::Window, bgColor);
qApp->setPalette(menuPal, "QMenu");
- QPalette toolbarPal = gtkWidgetPalette(QLS("GtkToolbar"));
+ QPalette toolbarPal = gtkWidgetPalette("GtkToolbar");
qApp->setPalette(toolbarPal, "QToolBar");
- QPalette menuBarPal = gtkWidgetPalette(QLS("GtkMenuBar"));
+ QPalette menuBarPal = gtkWidgetPalette("GtkMenuBar");
qApp->setPalette(menuBarPal, "QMenuBar");
}
@@ -714,7 +726,7 @@ void QGtkStylePrivate::applyCustomPaletteHash()
*/
GtkWidget* QGtkStylePrivate::getTextColorWidget() const
{
- return gtkWidget(QLS("GtkEntry"));
+ return gtkWidget("GtkEntry");
}
void QGtkStylePrivate::setupGtkWidget(GtkWidget* widget)
@@ -723,7 +735,7 @@ void QGtkStylePrivate::setupGtkWidget(GtkWidget* widget)
static GtkWidget* protoLayout = 0;
if (!protoLayout) {
protoLayout = QGtkStylePrivate::gtk_fixed_new();
- QGtkStylePrivate::gtk_container_add((GtkContainer*)(gtkWidgetMap()->value(QLS("GtkWindow"))), protoLayout);
+ QGtkStylePrivate::gtk_container_add((GtkContainer*)(gtkWidgetMap()->value("GtkWindow")), protoLayout);
}
Q_ASSERT(protoLayout);
@@ -736,8 +748,19 @@ void QGtkStylePrivate::setupGtkWidget(GtkWidget* widget)
void QGtkStylePrivate::addWidgetToMap(GtkWidget *widget)
{
if (Q_GTK_IS_WIDGET(widget)) {
- gtk_widget_realize(widget);
- gtkWidgetMap()->insert(classPath(widget), widget);
+ gtk_widget_realize(widget);
+ QHashableLatin1Literal widgetPath = classPath(widget);
+
+ WidgetMap *map = gtkWidgetMap();
+ WidgetMap::iterator it = map->find(widgetPath);
+ if (it != map->end()) {
+ free(const_cast<char *>(it.key().data()));
+ map->erase(it);
+ }
+ map->insert(widgetPath, widget);
+#ifdef DUMP_GTK_WIDGET_TREE
+ qWarning("Inserted Gtk Widget: %s", widgetPath.data());
+#endif
}
}
@@ -750,7 +773,7 @@ void QGtkStylePrivate::addAllSubWidgets(GtkWidget *widget, gpointer v)
}
// Updates window/windowtext palette based on the indicated gtk widget
-QPalette QGtkStylePrivate::gtkWidgetPalette(const QString &gtkWidgetName) const
+QPalette QGtkStylePrivate::gtkWidgetPalette(const QHashableLatin1Literal &gtkWidgetName) const
{
GtkWidget *gtkWidget = QGtkStylePrivate::gtkWidget(gtkWidgetName);
Q_ASSERT(gtkWidget);
@@ -1086,6 +1109,28 @@ QIcon QGtkStylePrivate::getFilesystemIcon(const QFileInfo &info)
return icon;
}
+bool operator==(const QHashableLatin1Literal &l1, const QHashableLatin1Literal &l2)
+{
+ return l1.size() == l2.size() || qstrcmp(l1.data(), l2.data()) == 0;
+}
+
+// copied from qHash.cpp
+uint qHash(const QHashableLatin1Literal &key)
+{
+ int n = key.size();
+ const uchar *p = reinterpret_cast<const uchar *>(key.data());
+ uint h = 0;
+ uint g;
+
+ while (n--) {
+ h = (h << 4) + *p++;
+ if ((g = (h & 0xf0000000)) != 0)
+ h ^= g >> 23;
+ h &= ~g;
+ }
+ return h;
+}
+
QT_END_NAMESPACE
#endif // !defined(QT_NO_STYLE_GTK)
diff --git a/src/gui/styles/qgtkstyle_p.h b/src/gui/styles/qgtkstyle_p.h
index 31a16dbdb9..5bb75500fa 100644
--- a/src/gui/styles/qgtkstyle_p.h
+++ b/src/gui/styles/qgtkstyle_p.h
@@ -56,6 +56,10 @@
#include <QtCore/qglobal.h>
#if !defined(QT_NO_STYLE_GTK)
+#include <QtCore/qstring.h>
+#include <QtCore/qstringbuilder.h>
+#include <QtCore/qcoreapplication.h>
+
#include <QtGui/QFileDialog>
#include <QtGui/QGtkStyle>
@@ -72,6 +76,54 @@ typedef unsigned long XID;
#define QLS(x) QLatin1String(x)
+QT_BEGIN_NAMESPACE
+
+// ### Qt 4.7 - merge with QLatin1Literal
+class QHashableLatin1Literal
+{
+public:
+ int size() const { return m_size; }
+ const char *data() const { return m_data; }
+
+ template <int N>
+ QHashableLatin1Literal(const char (&str)[N])
+ : m_size(N - 1), m_data(str) {}
+
+ QHashableLatin1Literal(const QHashableLatin1Literal &other)
+ : m_size(other.m_size), m_data(other.m_data)
+ {}
+
+ QHashableLatin1Literal &operator=(const QHashableLatin1Literal &other)
+ {
+ if (this == &other)
+ return *this;
+ *const_cast<int *>(&m_size) = other.m_size;
+ *const_cast<char **>(&m_data) = const_cast<char *>(other.m_data);
+ return *this;
+ }
+
+ QString toString() const { return QString::fromLatin1(m_data, m_size); }
+
+ static QHashableLatin1Literal fromData(const char *str)
+ {
+ return QHashableLatin1Literal(str, qstrlen(str));
+ }
+
+private:
+ QHashableLatin1Literal(const char *str, int length)
+ : m_size(length), m_data(str)
+ {}
+
+ const int m_size;
+ const char *m_data;
+};
+
+bool operator==(const QHashableLatin1Literal &l1, const QHashableLatin1Literal &l2);
+inline bool operator!=(const QHashableLatin1Literal &l1, const QHashableLatin1Literal &l2) { return !operator==(l1, l2); }
+uint qHash(const QHashableLatin1Literal &key);
+
+QT_END_NAMESPACE
+
class GConf;
class GConfClient;
@@ -252,7 +304,6 @@ typedef char* (*Ptr_gnome_icon_lookup_sync) (
GnomeIconLookupFlags flags,
GnomeIconLookupResultFlags *result);
-
class QGtkStylePrivate : public QCleanlooksStylePrivate
{
Q_DECLARE_PUBLIC(QGtkStyle)
@@ -262,8 +313,8 @@ public:
QGtkStyleFilter filter;
- static GtkWidget* gtkWidget(const QString &path);
- static GtkStyle* gtkStyle(const QString &path = QLatin1String("GtkWindow"));
+ static GtkWidget* gtkWidget(const QHashableLatin1Literal &path);
+ static GtkStyle* gtkStyle(const QHashableLatin1Literal &path = QHashableLatin1Literal("GtkWindow"));
virtual void resolveGtk() const;
virtual void initGtkMenu() const;
@@ -418,17 +469,25 @@ public:
static Ptr_gnome_icon_lookup_sync gnome_icon_lookup_sync;
static Ptr_gnome_vfs_init gnome_vfs_init;
- virtual QPalette gtkWidgetPalette(const QString &gtkWidgetName) const;
+ virtual QPalette gtkWidgetPalette(const QHashableLatin1Literal &gtkWidgetName) const;
protected:
- typedef QHash<QString, GtkWidget*> WidgetMap;
+ typedef QHash<QHashableLatin1Literal, GtkWidget*> WidgetMap;
+
+ static inline void destroyWidgetMap()
+ {
+ cleanupGtkWidgets();
+ delete widgetMap;
+ widgetMap = 0;
+ }
static inline WidgetMap *gtkWidgetMap()
{
- static WidgetMap *map = 0;
- if (!map)
- map = new WidgetMap();
- return map;
+ if (!widgetMap) {
+ widgetMap = new WidgetMap();
+ qAddPostRoutine(destroyWidgetMap);
+ }
+ return widgetMap;
}
static QStringList extract_filter(const QString &rawFilter);
@@ -443,6 +502,7 @@ protected:
private:
static QList<QGtkStylePrivate *> instances;
+ static WidgetMap *widgetMap;
friend class QGtkStyleUpdateScheduler;
};
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index 5bd939f5b3..116b03e3ac 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -3146,6 +3146,18 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
break;
case PE_PanelLineEdit:
QWindowsStyle::drawPrimitive(pe, opt, p, w);
+ // Draw the focus frame for widgets other than QLineEdit (e.g. for line edits in Webkit).
+ // Focus frame is drawn outside the rectangle passed in the option-rect.
+ if (const QStyleOptionFrame *panel = qstyleoption_cast<const QStyleOptionFrame *>(opt)) {
+ if ((opt->state & State_HasFocus) && !qobject_cast<const QLineEdit*>(w)) {
+ int vmargin = pixelMetric(QStyle::PM_FocusFrameVMargin);
+ int hmargin = pixelMetric(QStyle::PM_FocusFrameHMargin);
+ QStyleOptionFrame focusFrame = *panel;
+ focusFrame.rect = panel->rect.adjusted(-hmargin, -vmargin, hmargin, vmargin);
+ drawControl(CE_FocusFrame, &focusFrame, p, w);
+ }
+ }
+
break;
case PE_FrameTabWidget:
if (const QStyleOptionTabWidgetFrame *twf
@@ -3169,7 +3181,6 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
p->drawLine(opt->rect.topLeft(), opt->rect.bottomLeft());
} break;
case PE_FrameStatusBarItem:
- QCommonStyle::drawPrimitive(pe, opt, p, w);
break;
case PE_IndicatorTabClose: {
bool hover = (opt->state & State_MouseOver);
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index 5202701b0e..ecac3d6740 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -58,8 +58,8 @@
#include <AknsSkinInstance.h>
#include <AknsBasicBackgroundControlContext.h>
#include <avkon.mbg>
-#include <AknFontAccess.h>
-#include <AknLayoutFont.h>
+#include <aknfontaccess.h>
+#include <aknlayoutfont.h>
#include <AknUtils.h>
#include <aknnavi.h>
#include <gulicon.h>
diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp
index f87cf282e4..3f09ebc0c3 100644
--- a/src/gui/styles/qs60style_simulated.cpp
+++ b/src/gui/styles/qs60style_simulated.cpp
@@ -94,12 +94,12 @@ bool saveThemeToBlob(const QString &themeBlob,
dataOut << color;
}
- const int picturesCount = partPictures.count();
- dataOut << picturesCount;
- foreach (const QString &key, partPictures.keys()) {
- const QPicture picture = partPictures.value(key);
- dataOut << key;
- dataOut << picture;
+ dataOut << partPictures.count();
+ QHashIterator<QString, QPicture> i(partPictures);
+ while (i.hasNext()) {
+ i.next();
+ dataOut << i.key();
+ dataOut << i.value(); // the QPicture
}
QDataStream blobOut(&blob);
diff --git a/src/gui/styles/qstylehelper.cpp b/src/gui/styles/qstylehelper.cpp
index 071ec232b4..296c51c05a 100644
--- a/src/gui/styles/qstylehelper.cpp
+++ b/src/gui/styles/qstylehelper.cpp
@@ -54,24 +54,71 @@
#include <private/qt_cocoa_helpers_mac_p.h>
#endif
+#include <qstringbuilder.h>
+
QT_BEGIN_NAMESPACE
+// internal helper. Converts an integer value to an unique string token
+template <typename T>
+struct HexString
+{
+ inline HexString(const T t)
+ : val(t)
+ {}
+
+ inline void write(QChar *&dest) const
+ {
+ const ushort hexChars[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
+ const char *c = reinterpret_cast<const char *>(&val);
+ for (uint i = 0; i < sizeof(T); ++i) {
+ *dest++ = hexChars[*c & 0xf];
+ *dest++ = hexChars[(*c & 0xf0) >> 4];
+ ++c;
+ }
+ }
+
+ const T val;
+};
+
+// specialization to enable fast concatenating of our string tokens to a string
+template <typename T>
+struct QConcatenable<HexString<T> >
+{
+ typedef HexString<T> type;
+ enum { ExactSize = true };
+ static int size(const HexString<T> &str) { return sizeof(str.val) * 2; }
+ static inline void appendTo(const HexString<T> &str, QChar *&out) { str.write(out); }
+};
+
namespace QStyleHelper {
QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size)
{
const QStyleOptionComplex *complexOption = qstyleoption_cast<const QStyleOptionComplex *>(option);
- QString tmp = QString::fromLatin1("%1-%2-%3-%4-%5-%6x%7").arg(key).arg(uint(option->state)).arg(option->direction)
- .arg(complexOption ? uint(complexOption->activeSubControls) : uint(0))
- .arg(option->palette.cacheKey()).arg(size.width()).arg(size.height());
+
+ QString tmp = key
+ % QLatin1Char('-')
+ % HexString<uint>(option->state)
+ % QLatin1Char('-')
+ % HexString<uint>(option->direction)
+ % QLatin1Char('-')
+ % HexString<uint>(complexOption ? uint(complexOption->activeSubControls) : 0u)
+ % QLatin1Char('-')
+ % HexString<quint64>(option->palette.cacheKey())
+ % QLatin1Char('-')
+ % HexString<uint>(size.width())
+ % QLatin1Char('x')
+ % HexString<uint>(size.height());
+
#ifndef QT_NO_SPINBOX
if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
- tmp.append(QLatin1Char('-'));
- tmp.append(QString::number(spinBox->buttonSymbols));
- tmp.append(QLatin1Char('-'));
- tmp.append(QString::number(spinBox->stepEnabled));
- tmp.append(QLatin1Char('-'));
- tmp.append(QLatin1Char(spinBox->frame ? '1' : '0'));
+ tmp = tmp
+ % QLatin1Char('-')
+ % HexString<uint>(spinBox->buttonSymbols)
+ % QLatin1Char('-')
+ % HexString<uint>(spinBox->stepEnabled)
+ % QLatin1Char('-')
+ % QLatin1Char(spinBox->frame ? '1' : '0');
}
#endif // QT_NO_SPINBOX
return tmp;
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index c550938940..537638600f 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -1065,7 +1065,7 @@ QRect QRenderRule::boxRect(const QRect& cr, int flags) const
r.adjust(-p[LeftEdge], -p[TopEdge], p[RightEdge], p[BottomEdge]);
}
}
- if (!hasNativeBorder() && (flags & Border)) {
+ if (hasBorder() && (flags & Border)) {
const int *b = border()->borders;
r.adjust(-b[LeftEdge], -b[TopEdge], b[RightEdge], b[BottomEdge]);
}
@@ -1352,6 +1352,12 @@ void QRenderRule::configurePalette(QPalette *p, QPalette::ColorRole fr, QPalette
if (br != QPalette::NoRole)
p->setBrush(br, bg->brush);
p->setBrush(QPalette::Window, bg->brush);
+ if (bg->brush.style() == Qt::SolidPattern) {
+ p->setBrush(QPalette::Light, bg->brush.color().lighter(115));
+ p->setBrush(QPalette::Midlight, bg->brush.color().lighter(107));
+ p->setBrush(QPalette::Dark, bg->brush.color().darker(150));
+ p->setBrush(QPalette::Shadow, bg->brush.color().darker(300));
+ }
}
if (!hasPalette())
@@ -3451,10 +3457,17 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
case CE_RadioButton:
case CE_CheckBox:
- rule.drawRule(p, opt->rect);
- ParentStyle::drawControl(ce, opt, p, w);
- return;
-
+ if (rule.hasBox() || !rule.hasNativeBorder() || rule.hasDrawable() || hasStyleRule(w, PseudoElement_Indicator)) {
+ rule.drawRule(p, opt->rect);
+ ParentStyle::drawControl(ce, opt, p, w);
+ return;
+ } else if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) {
+ QStyleOptionButton butOpt(*btn);
+ rule.configurePalette(&butOpt.palette, QPalette::ButtonText, QPalette::Button);
+ baseStyle()->drawControl(ce, &butOpt, p, w);
+ return;
+ }
+ break;
case CE_RadioButtonLabel:
case CE_CheckBoxLabel:
if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) {
diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h
index a2fff703ef..5adf237af7 100644
--- a/src/gui/text/qfont.h
+++ b/src/gui/text/qfont.h
@@ -291,6 +291,7 @@ private:
friend class QFontMetricsF;
friend class QFontInfo;
friend class QPainter;
+ friend class QPainterPrivate;
friend class QPSPrintEngineFont;
friend class QApplication;
friend class QWidget;
diff --git a/src/gui/text/qfontdatabase_qws.cpp b/src/gui/text/qfontdatabase_qws.cpp
index 62d77931a7..a3d8d65663 100644
--- a/src/gui/text/qfontdatabase_qws.cpp
+++ b/src/gui/text/qfontdatabase_qws.cpp
@@ -632,8 +632,9 @@ QFontEngine *loadSingleEngine(int script, const QFontPrivate *fp,
#ifndef QT_NO_FREETYPE
QScopedPointer<QFontEngineFT> fte(new QFontEngineFT(def));
- if (fte->init(faceId, style->antialiased,
- style->antialiased ? QFontEngineFT::Format_A8 : QFontEngineFT::Format_Mono)) {
+ bool antialias = style->antialiased && !(request.styleStrategy & QFont::NoAntialias);
+ if (fte->init(faceId, antialias,
+ antialias ? QFontEngineFT::Format_A8 : QFontEngineFT::Format_Mono)) {
#ifdef QT_NO_QWS_QPF2
return fte.take();
#else
@@ -793,7 +794,7 @@ QFontDatabase::findFont(int script, const QFontPrivate *fp,
" family: %s [%s], script: %d\n"
" weight: %d, style: %d\n"
" stretch: %d\n"
- " pixelSize: %d\n"
+ " pixelSize: %g\n"
" pitch: %c",
family_name.isEmpty() ? "-- first in script --" : family_name.toLatin1().constData(),
foundry_name.isEmpty() ? "-- any --" : foundry_name.toLatin1().constData(),
diff --git a/src/gui/text/qfontdatabase_win.cpp b/src/gui/text/qfontdatabase_win.cpp
index a6ceee16b5..c50d363d94 100644
--- a/src/gui/text/qfontdatabase_win.cpp
+++ b/src/gui/text/qfontdatabase_win.cpp
@@ -1111,7 +1111,6 @@ static void registerFont(QFontDatabasePrivate::ApplicationFont *fnt)
if (AddFontResource((LPCWSTR)fnt->fileName.utf16()) == 0)
return;
#else
- // supported from 2000 on, so no need to deal with the *A variant
PtrAddFontResourceExW ptrAddFontResourceExW = (PtrAddFontResourceExW)QLibrary::resolve(QLatin1String("gdi32"),
"AddFontResourceExW");
if (!ptrAddFontResourceExW
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index c000457360..e5975d2a72 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -587,8 +587,9 @@ QImage QFontEngine::alphaMapForGlyph(glyph_t glyph, const QTransform &t)
{
QImage i = alphaMapForGlyph(glyph);
if (t.type() > QTransform::TxTranslate)
- i = i.transformed(t);
+ i = i.transformed(t).convertToFormat(QImage::Format_Indexed8);
Q_ASSERT(i.depth() <= 8); // To verify that transformed didn't change the format...
+
return i;
}
@@ -597,11 +598,14 @@ QImage QFontEngine::alphaRGBMapForGlyph(glyph_t glyph, int /* margin */, const Q
QImage alphaMask = alphaMapForGlyph(glyph, t);
QImage rgbMask(alphaMask.width(), alphaMask.height(), QImage::Format_RGB32);
+ QVector<QRgb> colorTable = alphaMask.colorTable();
for (int y=0; y<alphaMask.height(); ++y) {
uint *dst = (uint *) rgbMask.scanLine(y);
uchar *src = (uchar *) alphaMask.scanLine(y);
- for (int x=0; x<alphaMask.width(); ++x)
- dst[x] = qRgb(src[x], src[x], src[x]);
+ for (int x=0; x<alphaMask.width(); ++x) {
+ int val = qAlpha(colorTable.at(src[x]));
+ dst[x] = qRgb(val, val, val);
+ }
}
return rgbMask;
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index 17ade64004..a9def8e09b 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -619,7 +619,7 @@ QFontEngineFT::QFontEngineFT(const QFontDef &fd)
transform = false;
antialias = true;
freetype = 0;
- default_load_flags = 0;
+ default_load_flags = FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH;
default_hint_style = HintNone;
subpixelType = Subpixel_None;
lcdFilterType = 0;
@@ -746,7 +746,7 @@ bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format)
QFontEngineFT::Glyph *QFontEngineFT::loadGlyphMetrics(QGlyphSet *set, uint glyph) const
{
- Glyph *g = set->glyph_data.value(glyph);
+ Glyph *g = set->getGlyph(glyph);
if (g)
return g;
@@ -858,10 +858,10 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph, Glyph
}
}
- Glyph *g = set->glyph_data.value(glyph);
+ Glyph *g = set->getGlyph(glyph);
if (g && g->format == format) {
if (uploadToServer && !g->uploadedToServer) {
- set->glyph_data[glyph] = 0;
+ set->setGlyph(glyph, 0);
delete g;
g = 0;
} else {
@@ -1158,7 +1158,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph, Glyph
uploadGlyphToServer(set, glyph, g, &info, glyph_buffer_size);
}
- set->glyph_data[glyph] = g;
+ set->setGlyph(glyph, g);
return g;
}
@@ -1381,8 +1381,7 @@ QFontEngineFT::QGlyphSet *QFontEngineFT::loadTransformedGlyphSet(const QTransfor
}
gs = &transformedGlyphSets[0];
- qDeleteAll(gs->glyph_data);
- gs->glyph_data.clear();
+ gs->clear();
gs->id = allocateServerGlyphSet();
@@ -1398,7 +1397,7 @@ bool QFontEngineFT::loadGlyphs(QGlyphSet *gs, glyph_t *glyphs, int num_glyphs, G
FT_Face face = 0;
for (int i = 0; i < num_glyphs; ++i) {
- Glyph *glyph = gs->glyph_data.value(glyphs[i]);
+ Glyph *glyph = gs->getGlyph(glyphs[i]);
if (glyph == 0 || glyph->format != format) {
if (!face) {
face = lockFace();
@@ -1635,7 +1634,7 @@ void QFontEngineFT::recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFlag
FT_Face face = 0;
if (flags & QTextEngine::DesignMetrics) {
for (int i = 0; i < glyphs->numGlyphs; i++) {
- Glyph *g = defaultGlyphSet.glyph_data.value(glyphs->glyphs[i]);
+ Glyph *g = defaultGlyphSet.getGlyph(glyphs->glyphs[i]);
if (g) {
glyphs->advances_x[i] = QFixed::fromFixed(g->linearAdvance);
} else {
@@ -1648,7 +1647,7 @@ void QFontEngineFT::recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFlag
}
} else {
for (int i = 0; i < glyphs->numGlyphs; i++) {
- Glyph *g = defaultGlyphSet.glyph_data.value(glyphs->glyphs[i]);
+ Glyph *g = defaultGlyphSet.getGlyph(glyphs->glyphs[i]);
if (g) {
glyphs->advances_x[i] = QFixed(g->advance);
} else {
@@ -1677,7 +1676,7 @@ glyph_metrics_t QFontEngineFT::boundingBox(const QGlyphLayout &glyphs)
QFixed ymax = 0;
QFixed xmax = 0;
for (int i = 0; i < glyphs.numGlyphs; i++) {
- Glyph *g = defaultGlyphSet.glyph_data.value(glyphs.glyphs[i]);
+ Glyph *g = defaultGlyphSet.getGlyph(glyphs.glyphs[i]);
if (!g) {
if (!face)
face = lockFace();
@@ -1719,7 +1718,7 @@ glyph_metrics_t QFontEngineFT::boundingBox(glyph_t glyph)
{
FT_Face face = 0;
glyph_metrics_t overall;
- Glyph *g = defaultGlyphSet.glyph_data.value(glyph);
+ Glyph *g = defaultGlyphSet.getGlyph(glyph);
if (!g) {
face = lockFace();
g = loadGlyph(glyph, Format_None, true);
@@ -1783,8 +1782,7 @@ glyph_metrics_t QFontEngineFT::boundingBox(glyph_t glyph, const QTransform &matr
transformedGlyphSets.prepend(QGlyphSet());
}
glyphSet = &transformedGlyphSets[0];
- qDeleteAll(glyphSet->glyph_data);
- glyphSet->glyph_data.clear();
+ glyphSet->clear();
glyphSet->id = allocateServerGlyphSet();
glyphSet->transformationMatrix = m;
}
@@ -1792,7 +1790,7 @@ glyph_metrics_t QFontEngineFT::boundingBox(glyph_t glyph, const QTransform &matr
} else {
glyphSet = &defaultGlyphSet;
}
- Glyph * g = glyphSet->glyph_data.value(glyph);
+ Glyph * g = glyphSet->getGlyph(glyph);
if (!g) {
face = lockFace();
g = loadGlyphMetrics(glyphSet, glyph);
@@ -1881,7 +1879,7 @@ QImage QFontEngineFT::alphaRGBMapForGlyph(glyph_t g, int margin, const QTransfor
void QFontEngineFT::removeGlyphFromCache(glyph_t glyph)
{
- delete defaultGlyphSet.glyph_data.take(glyph);
+ defaultGlyphSet.removeGlyphFromCache(glyph);
}
int QFontEngineFT::glyphCount() const
@@ -1937,11 +1935,53 @@ QFontEngineFT::QGlyphSet::QGlyphSet()
transformationMatrix.yy = 0x10000;
transformationMatrix.xy = 0;
transformationMatrix.yx = 0;
+ memset(fast_glyph_data, 0, sizeof(fast_glyph_data));
+ fast_glyph_count = 0;
}
QFontEngineFT::QGlyphSet::~QGlyphSet()
{
+ clear();
+}
+
+void QFontEngineFT::QGlyphSet::clear()
+{
+ if (fast_glyph_count > 0) {
+ for (int i = 0; i < 256; ++i) {
+ if (fast_glyph_data[i]) {
+ delete fast_glyph_data[i];
+ fast_glyph_data[i] = 0;
+ }
+ }
+ fast_glyph_count = 0;
+ }
qDeleteAll(glyph_data);
+ glyph_data.clear();
+}
+
+void QFontEngineFT::QGlyphSet::removeGlyphFromCache(int index)
+{
+ if (index < 256) {
+ if (fast_glyph_data[index]) {
+ delete fast_glyph_data[index];
+ fast_glyph_data[index] = 0;
+ if (fast_glyph_count > 0)
+ --fast_glyph_count;
+ }
+ } else {
+ delete glyph_data.take(index);
+ }
+}
+
+void QFontEngineFT::QGlyphSet::setGlyph(int index, Glyph *glyph)
+{
+ if (index < 256) {
+ if (!fast_glyph_data[index])
+ ++fast_glyph_count;
+ fast_glyph_data[index] = glyph;
+ } else {
+ glyph_data.insert(index, glyph);
+ }
}
unsigned long QFontEngineFT::allocateServerGlyphSet()
diff --git a/src/gui/text/qfontengine_ft_p.h b/src/gui/text/qfontengine_ft_p.h
index 98dd002719..12b7da86a1 100644
--- a/src/gui/text/qfontengine_ft_p.h
+++ b/src/gui/text/qfontengine_ft_p.h
@@ -180,7 +180,21 @@ public:
FT_Matrix transformationMatrix;
unsigned long id; // server sided id, GlyphSet for X11
bool outline_drawing;
+
+ void removeGlyphFromCache(int index);
+ void clear();
+ inline Glyph *getGlyph(int index) const
+ {
+ if (index < 256)
+ return fast_glyph_data[index];
+ return glyph_data.value(index);
+ }
+ void setGlyph(int index, Glyph *glyph);
+
+private:
mutable QHash<int, Glyph *> glyph_data; // maps from glyph index to glyph data
+ mutable Glyph *fast_glyph_data[256]; // for fast lookup of glyphs < 256
+ mutable int fast_glyph_count;
};
virtual QFontEngine::FaceId faceId() const;
@@ -252,7 +266,7 @@ public:
QGlyphSet *defaultGlyphs() { return &defaultGlyphSet; }
GlyphFormat defaultGlyphFormat() const { return defaultFormat; }
- inline Glyph *cachedGlyph(glyph_t g) const { return defaultGlyphSet.glyph_data.value(g); }
+ inline Glyph *cachedGlyph(glyph_t g) const { return defaultGlyphSet.getGlyph(g); }
QGlyphSet *loadTransformedGlyphSet(const QTransform &matrix);
bool loadGlyphs(QGlyphSet *gs, glyph_t *glyphs, int num_glyphs, GlyphFormat format = Format_Render);
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm
index 48bc6351e4..8588214b5c 100644
--- a/src/gui/text/qfontengine_mac.mm
+++ b/src/gui/text/qfontengine_mac.mm
@@ -308,7 +308,7 @@ bool QCoreTextFontEngineMulti::stringToCMap(const QChar *str, int len, QGlyphLay
CTFontGetAdvancesForGlyphs(runFont, kCTFontHorizontalOrientation, tmpGlyphs + glyphCount - 1, &lastGlyphAdvance, 1);
outGlyphs[rtl ? 0 : (glyphCount - 1)] = tmpGlyphs[glyphCount - 1] | fontIndex;
- outAdvances_x[rtl ? 0 : (glyphCount - 1)] = QFixed::fromReal(lastGlyphAdvance.width).ceil();
+ outAdvances_x[rtl ? 0 : (glyphCount - 1)] = QFixed::fromReal(lastGlyphAdvance.width);
}
outGlyphs += glyphCount;
outAttributes += glyphCount;
diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp
index 136737dc78..a0593cc478 100644
--- a/src/gui/text/qfontengine_qpf.cpp
+++ b/src/gui/text/qfontengine_qpf.cpp
@@ -920,8 +920,18 @@ void QFontEngineQPF::loadGlyph(glyph_t glyph)
if (!renderingFontEngine)
return;
-
- QImage img = renderingFontEngine->alphaMapForGlyph(glyph).convertToFormat(QImage::Format_Indexed8);
+ QImage img = renderingFontEngine->alphaMapForGlyph(glyph);
+ if (img.format() != QImage::Format_Indexed8) {
+ bool mono = img.depth() == 1;
+ img = img.convertToFormat(QImage::Format_Indexed8);
+ if (mono) {
+ //### we know that 1 is opaque and 0 is transparent
+ uchar *byte = img.bits();
+ int count = img.byteCount();
+ while (count--)
+ *byte++ *= 0xff;
+ }
+ }
glyph_metrics_t metrics = renderingFontEngine->boundingBox(glyph);
renderingFontEngine->removeGlyphFromCache(glyph);
diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp
index 1a815d3d21..55e93bd3c2 100644
--- a/src/gui/text/qfontengine_win.cpp
+++ b/src/gui/text/qfontengine_win.cpp
@@ -208,7 +208,7 @@ void QFontEngineWin::getCMap()
unitsPerEm = otm->otmEMSquare;
x_height = (int)otm->otmsXHeight;
loadKerningPairs(designToDevice);
- _faceId.filename = QString::fromWCharArray((wchar_t *)((char *)otm + (int)otm->otmpFullName)).toLatin1();
+ _faceId.filename = QString::fromWCharArray((wchar_t *)((char *)otm + (quintptr)otm->otmpFullName)).toLatin1();
lineWidth = otm->otmsUnderscoreSize;
fsType = otm->otmfsType;
free(otm);
@@ -1006,8 +1006,8 @@ QFontEngine::Properties QFontEngineWin::properties() const
Properties p;
p.emSquare = unitsPerEm;
p.italicAngle = otm->otmItalicAngle;
- p.postscriptName = QString::fromWCharArray((wchar_t *)((char *)otm + (int)otm->otmpFamilyName)).toLatin1();
- p.postscriptName += QString::fromWCharArray((wchar_t *)((char *)otm + (int)otm->otmpStyleName)).toLatin1();
+ p.postscriptName = QString::fromWCharArray((wchar_t *)((char *)otm + (quintptr)otm->otmpFamilyName)).toLatin1();
+ p.postscriptName += QString::fromWCharArray((wchar_t *)((char *)otm + (quintptr)otm->otmpStyleName)).toLatin1();
#ifndef QT_NO_PRINTER
p.postscriptName = QPdf::stripSpecialCharacters(p.postscriptName);
#endif
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
new file mode 100644
index 0000000000..1fabf12395
--- /dev/null
+++ b/src/gui/text/qstatictext.cpp
@@ -0,0 +1,616 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qstatictext.h"
+#include "qstatictext_p.h"
+#include <private/qtextengine_p.h>
+#include <private/qfontengine_p.h>
+
+#include <QtGui/qapplication.h>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QStaticText
+ \brief The QStaticText class enables optimized drawing of text when the text and its layout
+ is updated rarely.
+ \since 4.7
+
+ \ingroup multimedia
+ \ingroup text
+ \mainclass
+
+ QStaticText provides a way to cache layout data for a block of text so that it can be drawn
+ more efficiently than by using QPainter::drawText() in which the layout information is
+ recalculated with every call.
+
+ The class primarily provides an optimization for cases where the text, its font and the
+ transformations on the painter are static over several paint events. If the text or its layout
+ is changed for every iteration, QPainter::drawText() is the more efficient alternative, since
+ the static text's layout would have to be recalculated to take the new state into consideration.
+
+ Translating the painter will not cause the layout of the text to be recalculated, but will cause
+ a very small performance impact on drawStaticText(). Altering any other parts of the painter's
+ transformation or the painter's font will cause the layout of the static text to be
+ recalculated. This should be avoided as often as possible to maximize the performance
+ benefit of using QStaticText.
+
+ In addition, only affine transformations are supported by drawStaticText(). Calling
+ drawStaticText() on a projected painter will perform slightly worse than using the regular
+ drawText() call, so this should be avoided.
+
+ \code
+ class MyWidget: public QWidget
+ {
+ public:
+ MyWidget(QWidget *parent = 0) : QWidget(parent), m_staticText("This is static text")
+
+ protected:
+ void paintEvent(QPaintEvent *)
+ {
+ QPainter painter(this);
+ painter.drawStaticText(0, 0, m_staticText);
+ }
+
+ private:
+ QStaticText m_staticText;
+ };
+ \endcode
+
+ The QStaticText class can be used to mimic the behavior of QPainter::drawText() to a specific
+ point with no boundaries, and also when QPainter::drawText() is called with a bounding
+ rectangle.
+
+ If a bounding rectangle is not required, create a QStaticText object without setting a maximum
+ size. The text will then occupy a single line.
+
+ If you set a maximum size on the QStaticText object, this will bound the text. The text will
+ be formatted so that no line exceeds the given width. When the object is painted, it will
+ be clipped at the given size. The position of the text is decided by the argument
+ passed to QPainter::drawStaticText() and can change from call to call with a minimal impact
+ on performance.
+
+ QStaticText will attempt to guess the format of the input text using Qt::mightBeRichText().
+ To force QStaticText to display its contents as either plain text or rich text, use the
+ function QStaticText::setTextFormat() and pass in, respectively, Qt::PlainText and
+ Qt::RichText.
+
+ \sa QPainter::drawText(), QPainter::drawStaticText(), QTextLayout, QTextDocument
+*/
+
+/*!
+ \enum QStaticText::PerformanceHint
+
+ This enum the different performance hints that can be set on the QStaticText. These hints
+ can be used to indicate that the QStaticText should use additional caches, if possible,
+ to improve performance at the expense of memory. In particular, setting the performance hint
+ AggressiveCaching on the QStaticText will improve performance when using the OpenGL graphics
+ system or when drawing to a QGLWidget.
+
+ \value ModerateCaching Do basic caching for high performance at a low memory cost.
+ \value AggressiveCaching Use additional caching when available. This may improve performance
+ at a higher memory cost.
+*/
+
+/*!
+ Constructs an empty QStaticText
+*/
+QStaticText::QStaticText()
+ : data(new QStaticTextPrivate)
+{
+}
+
+/*!
+ Constructs a QStaticText object with the given \a text and bounded by the given \a size.
+
+ If an invalid size is passed for \a size the text will be unbounded.
+*/
+QStaticText::QStaticText(const QString &text, const QSizeF &size)
+ : data(new QStaticTextPrivate)
+{
+ data->text = text;
+ data->maximumSize = size;
+ data->init();
+}
+
+/*!
+ Constructs a QStaticText object which is a copy of \a other.
+*/
+QStaticText::QStaticText(const QStaticText &other)
+{
+ data = other.data;
+}
+
+/*!
+ Destroys the QStaticText.
+*/
+QStaticText::~QStaticText()
+{
+ Q_ASSERT(!data || data->ref >= 1);
+}
+
+/*!
+ \internal
+*/
+void QStaticText::detach()
+{
+ if (data->ref != 1)
+ data.detach();
+}
+
+/*!
+ Prepares the QStaticText object for being painted with the given \a matrix and the given
+ \a font to avoid overhead when the actual drawStaticText() call is made.
+
+ When drawStaticText() is called, the layout of the QStaticText will be recalculated if the
+ painter's font or matrix is different from the one used for the currently cached layout. By
+ default, QStaticText will use a default constructed QFont and an identity matrix to create
+ its layout.
+
+ To avoid the overhead of creating the layout the first time you draw the QStaticText with
+ a painter whose matrix or font are different from the defaults, you can use the prepare()
+ function and pass in the matrix and font you expect to use when drawing the text.
+
+ \sa QPainter::setFont(), QPainter::setMatrix()
+*/
+void QStaticText::prepare(const QTransform &matrix, const QFont &font)
+{
+ data->matrix = matrix;
+ data->font = font;
+ data->init();
+}
+
+
+/*!
+ Assigns \a other to this QStaticText.
+*/
+QStaticText &QStaticText::operator=(const QStaticText &other)
+{
+ data = other.data;
+ return *this;
+}
+
+/*!
+ Compares \a other to this QStaticText. Returns true if the texts, fonts and maximum sizes
+ are equal.
+*/
+bool QStaticText::operator==(const QStaticText &other) const
+{
+ return (data == other.data
+ || (data->text == other.data->text
+ && data->font == other.data->font
+ && data->maximumSize == other.data->maximumSize));
+}
+
+/*!
+ Compares \a other to this QStaticText. Returns true if the texts, fonts or maximum sizes
+ are different.
+*/
+bool QStaticText::operator!=(const QStaticText &other) const
+{
+ return !(*this == other);
+}
+
+/*!
+ Sets the text of the QStaticText to \a text.
+
+ \note This function will cause the layout of the text to be recalculated.
+
+ \sa text()
+*/
+void QStaticText::setText(const QString &text)
+{
+ detach();
+ data->text = text;
+ data->init();
+}
+
+/*!
+ Sets the text format of the QStaticText to \a textFormat. If \a textFormat is set to
+ Qt::AutoText (the default), the format of the text will try to be determined using the
+ function Qt::mightBeRichText(). If the text format is Qt::PlainText, then the text will be
+ displayed as is, whereas it will be interpreted as HTML if the format is Qt::RichText. HTML tags
+ that alter the font of the text, its color, or its layout are supported by QStaticText.
+
+ \note This function will cause the layout of the text to be recalculated.
+
+ \sa textFormat(), setText(), text()
+*/
+void QStaticText::setTextFormat(Qt::TextFormat textFormat)
+{
+ detach();
+ data->textFormat = textFormat;
+ data->init();
+}
+
+/*!
+ Returns the text format of the QStaticText.
+
+ \sa setTextFormat(), setText(), text()
+*/
+Qt::TextFormat QStaticText::textFormat() const
+{
+ return Qt::TextFormat(data->textFormat);
+}
+
+/*!
+ Returns the text of the QStaticText.
+
+ \sa setText()
+*/
+QString QStaticText::text() const
+{
+ return data->text;
+}
+
+/*!
+ Sets the performance hint of the QStaticText according to the \a
+ performanceHint provided. The \a performanceHint is used to
+ customize how much caching is done internally to improve
+ performance.
+
+ The default is QStaticText::ModerateCaching.
+
+ \note This function will cause the layout of the text to be recalculated.
+
+ \sa performanceHint()
+*/
+void QStaticText::setPerformanceHint(PerformanceHint performanceHint)
+{
+ if ((performanceHint == ModerateCaching && !data->useBackendOptimizations)
+ || (performanceHint == AggressiveCaching && data->useBackendOptimizations)) {
+ return;
+ }
+ detach();
+ data->useBackendOptimizations = (performanceHint == AggressiveCaching);
+ data->init();
+}
+
+/*!
+ Returns which performance hint is set for the QStaticText.
+
+ \sa setPerformanceHint()
+*/
+QStaticText::PerformanceHint QStaticText::performanceHint() const
+{
+ return data->useBackendOptimizations ? AggressiveCaching : ModerateCaching;
+}
+
+/*!
+ Sets the maximum size of the QStaticText to \a size.
+
+ \note This function will cause the layout of the text to be recalculated.
+
+ \sa maximumSize(), size()
+*/
+void QStaticText::setMaximumSize(const QSizeF &size)
+{
+ detach();
+ data->maximumSize = size;
+ data->init();
+}
+
+/*!
+ Returns the maximum size of the QStaticText.
+
+ \sa setMaximumSize()
+*/
+QSizeF QStaticText::maximumSize() const
+{
+ return data->maximumSize;
+}
+
+/*!
+ Returns the size of the bounding rect for this QStaticText.
+
+ \sa maximumSize()
+*/
+QSizeF QStaticText::size() const
+{
+ return data->actualSize;
+}
+
+QStaticTextPrivate::QStaticTextPrivate()
+ : items(0), itemCount(0), glyphPool(0), positionPool(0), needsClipRect(false),
+ useBackendOptimizations(false), textFormat(Qt::AutoText)
+{
+}
+
+QStaticTextPrivate::QStaticTextPrivate(const QStaticTextPrivate &other)
+ : text(other.text), font(other.font), maximumSize(other.maximumSize), matrix(other.matrix),
+ items(0), itemCount(0), glyphPool(0), positionPool(0), needsClipRect(false),
+ useBackendOptimizations(other.useBackendOptimizations), textFormat(other.textFormat)
+{
+}
+
+QStaticTextPrivate::~QStaticTextPrivate()
+{
+ delete[] items;
+ delete[] glyphPool;
+ delete[] positionPool;
+}
+
+QStaticTextPrivate *QStaticTextPrivate::get(const QStaticText *q)
+{
+ return q->data.data();
+}
+
+extern int qt_defaultDpiX();
+extern int qt_defaultDpiY();
+
+namespace {
+
+ class DrawTextItemRecorder: public QPaintEngine
+ {
+ public:
+ DrawTextItemRecorder(int expectedItemCount, QStaticTextItem *items,
+ int expectedGlyphCount, QFixedPoint *positionPool, glyph_t *glyphPool)
+ : m_items(items),
+ m_itemCount(0), m_glyphCount(0),
+ m_expectedItemCount(expectedItemCount),
+ m_expectedGlyphCount(expectedGlyphCount),
+ m_glyphPool(glyphPool),
+ m_positionPool(positionPool)
+ {
+ }
+
+ virtual void drawTextItem(const QPointF &position, const QTextItem &textItem)
+ {
+ const QTextItemInt &ti = static_cast<const QTextItemInt &>(textItem);
+
+ m_itemCount++;
+ m_glyphCount += ti.glyphs.numGlyphs;
+ if (m_items == 0)
+ return;
+
+ Q_ASSERT(m_itemCount <= m_expectedItemCount);
+ Q_ASSERT(m_glyphCount <= m_expectedGlyphCount);
+
+ QStaticTextItem *currentItem = (m_items + (m_itemCount - 1));
+ currentItem->fontEngine = ti.fontEngine;
+ currentItem->font = ti.font();
+ currentItem->chars = ti.chars;
+ currentItem->numChars = ti.num_chars;
+ currentItem->numGlyphs = ti.glyphs.numGlyphs;
+ currentItem->glyphs = m_glyphPool;
+ currentItem->glyphPositions = m_positionPool;
+ currentItem->color = state->pen().color();
+
+ QTransform matrix = state->transform();
+ matrix.translate(position.x(), position.y());
+
+ QVarLengthArray<glyph_t> glyphs;
+ QVarLengthArray<QFixedPoint> positions;
+ ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
+
+ int size = glyphs.size();
+ Q_ASSERT(size == ti.glyphs.numGlyphs);
+ Q_ASSERT(size == positions.size());
+
+ memmove(currentItem->glyphs, glyphs.constData(), sizeof(glyph_t) * size);
+ memmove(currentItem->glyphPositions, positions.constData(), sizeof(QFixedPoint) * size);
+
+ m_glyphPool += size;
+ m_positionPool += size;
+ }
+
+
+ virtual bool begin(QPaintDevice *) { return true; }
+ virtual bool end() { return true; }
+ virtual void updateState(const QPaintEngineState &) {}
+ virtual void drawPixmap(const QRectF &, const QPixmap &, const QRectF &) {}
+ virtual Type type() const
+ {
+ return User;
+ }
+
+ int itemCount() const
+ {
+ return m_itemCount;
+ }
+
+ int glyphCount() const
+ {
+ return m_glyphCount;
+ }
+
+ private:
+ QStaticTextItem *m_items;
+ int m_itemCount;
+ int m_glyphCount;
+ int m_expectedItemCount;
+ int m_expectedGlyphCount;
+
+ glyph_t *m_glyphPool;
+ QFixedPoint *m_positionPool;
+ };
+
+ class DrawTextItemDevice: public QPaintDevice
+ {
+ public:
+ DrawTextItemDevice(int expectedItemCount = -1, QStaticTextItem *items = 0,
+ int expectedGlyphCount = -1, QFixedPoint *positionPool = 0,
+ glyph_t *glyphPool = 0)
+ {
+ m_paintEngine = new DrawTextItemRecorder(expectedItemCount, items,
+ expectedGlyphCount, positionPool, glyphPool);
+ }
+
+ ~DrawTextItemDevice()
+ {
+ delete m_paintEngine;
+ }
+
+ int metric(PaintDeviceMetric m) const
+ {
+ int val;
+ switch (m) {
+ case PdmWidth:
+ case PdmHeight:
+ case PdmWidthMM:
+ case PdmHeightMM:
+ val = 0;
+ break;
+ case PdmDpiX:
+ case PdmPhysicalDpiX:
+ val = qt_defaultDpiX();
+ break;
+ case PdmDpiY:
+ case PdmPhysicalDpiY:
+ val = qt_defaultDpiY();
+ break;
+ case PdmNumColors:
+ val = 16777216;
+ break;
+ case PdmDepth:
+ val = 24;
+ break;
+ default:
+ val = 0;
+ qWarning("DrawTextItemDevice::metric: Invalid metric command");
+ }
+ return val;
+ }
+
+ virtual QPaintEngine *paintEngine() const
+ {
+ return m_paintEngine;
+ }
+
+ int itemCount() const
+ {
+ return m_paintEngine->itemCount();
+ }
+
+ int glyphCount() const
+ {
+ return m_paintEngine->glyphCount();
+ }
+
+ private:
+ DrawTextItemRecorder *m_paintEngine;
+ };
+}
+
+void QStaticTextPrivate::paintText(const QPointF &pos, QPainter *p)
+{
+ bool preferRichText = textFormat == Qt::RichText
+ || (textFormat == Qt::AutoText && Qt::mightBeRichText(text));
+
+ if (!preferRichText) {
+ if (maximumSize.isValid()) {
+ QRectF boundingRect;
+ p->drawText(QRectF(pos, maximumSize), Qt::TextWordWrap, text, &boundingRect);
+
+ actualSize = boundingRect.size();
+ needsClipRect = boundingRect.width() > maximumSize.width()
+ || boundingRect.height() > maximumSize.height();
+ } else {
+ p->drawText(pos, text);
+ needsClipRect = false;
+
+ QFontMetrics fm(font);
+ actualSize = fm.boundingRect(text).size();
+ }
+ } else {
+ QTextDocument document;
+ document.setDefaultFont(font);
+ document.setHtml(text);
+
+ QRectF rect = maximumSize.isValid() ? QRectF(pos, maximumSize) : QRectF();
+ document.adjustSize();
+ p->save();
+ p->translate(pos);
+ document.drawContents(p, rect);
+ p->restore();
+ actualSize = document.size();
+ needsClipRect = maximumSize.isValid()
+ && (actualSize.width() > maximumSize.width()
+ || actualSize.height() > maximumSize.height());
+ }
+}
+
+void QStaticTextPrivate::init()
+{
+ delete[] items;
+ delete[] glyphPool;
+ delete[] positionPool;
+
+ position = QPointF(0, 0);
+
+ // Draw once to count number of items and glyphs, so that we can use as little memory
+ // as possible to store the data
+ DrawTextItemDevice counterDevice;
+ {
+ QPainter painter(&counterDevice);
+ painter.setFont(font);
+ painter.setTransform(matrix);
+
+ paintText(QPointF(0, 0), &painter);
+
+ }
+
+ itemCount = counterDevice.itemCount();
+ items = new QStaticTextItem[itemCount];
+
+ if (useBackendOptimizations) {
+ for (int i=0; i<itemCount; ++i)
+ items[i].useBackendOptimizations = true;
+ }
+
+
+ int glyphCount = counterDevice.glyphCount();
+ glyphPool = new glyph_t[glyphCount];
+ positionPool = new QFixedPoint[glyphCount];
+
+ // Draw again to actually record the items and glyphs
+ DrawTextItemDevice recorderDevice(itemCount, items, glyphCount, positionPool, glyphPool);
+ {
+ QPainter painter(&recorderDevice);
+ painter.setFont(font);
+ painter.setTransform(matrix);
+
+ paintText(QPointF(0, 0), &painter);
+ }
+
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h
new file mode 100644
index 0000000000..00d42e0515
--- /dev/null
+++ b/src/gui/text/qstatictext.h
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QSTATICTEXT_H
+#define QSTATICTEXT_H
+
+#include <QtCore/qsize.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qmetatype.h>
+
+#include <QtGui/qtransform.h>
+#include <QtGui/qfont.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+class QStaticTextPrivate;
+class Q_GUI_EXPORT QStaticText
+{
+public:
+ enum PerformanceHint {
+ ModerateCaching,
+ AggressiveCaching
+ };
+
+ QStaticText();
+ QStaticText(const QString &text, const QSizeF &maximumSize = QSizeF());
+ QStaticText(const QStaticText &other);
+ ~QStaticText();
+
+ void setText(const QString &text);
+ QString text() const;
+
+ void setTextFormat(Qt::TextFormat textFormat);
+ Qt::TextFormat textFormat() const;
+
+ void setMaximumSize(const QSizeF &maximumSize);
+ QSizeF maximumSize() const;
+
+ QSizeF size() const;
+
+ void prepare(const QTransform &matrix, const QFont &font);
+
+ void setPerformanceHint(PerformanceHint performanceHint);
+ PerformanceHint performanceHint() const;
+
+ QStaticText &operator=(const QStaticText &);
+ bool operator==(const QStaticText &) const;
+ bool operator!=(const QStaticText &) const;
+
+private:
+ void detach();
+
+ QExplicitlySharedDataPointer<QStaticTextPrivate> data;
+ friend class QStaticTextPrivate;
+};
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QStaticText)
+
+QT_END_HEADER
+
+#endif // QSTATICTEXT_H
diff --git a/src/gui/text/qstatictext_p.h b/src/gui/text/qstatictext_p.h
new file mode 100644
index 0000000000..e75824468b
--- /dev/null
+++ b/src/gui/text/qstatictext_p.h
@@ -0,0 +1,146 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QSTATICTEXT_P_H
+#define QSTATICTEXT_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of internal files. This header file may change from version to version
+// without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <private/qtextureglyphcache_p.h>
+#include <QtGui/qcolor.h>
+
+QT_BEGIN_NAMESPACE
+
+class QStaticTextUserData
+{
+public:
+ enum Type {
+ NoUserData,
+ OpenGLUserData
+ };
+
+ QStaticTextUserData(Type t) : type(t) {}
+ virtual ~QStaticTextUserData() {}
+
+ Type type;
+};
+
+class Q_GUI_EXPORT QStaticTextItem
+{
+public:
+ QStaticTextItem() : chars(0), numChars(0), fontEngine(0), userData(0),
+ useBackendOptimizations(false), userDataNeedsUpdate(0) {}
+ ~QStaticTextItem() { delete userData; }
+
+ void setUserData(QStaticTextUserData *newUserData)
+ {
+ if (userData == newUserData)
+ return;
+
+ delete userData;
+ userData = newUserData;
+ }
+
+ QFixedPoint *glyphPositions; // 8 bytes per glyph
+ glyph_t *glyphs; // 4 bytes per glyph
+ const QChar *chars; // 2 bytes per glyph
+ // =================
+ // 14 bytes per glyph
+
+ // 12 bytes for pointers
+ int numGlyphs; // 4 bytes per item
+ int numChars; // 4 bytes per item
+ QFontEngine *fontEngine; // 4 bytes per item
+ QFont font; // 8 bytes per item
+ QColor color; // 10 bytes per item
+ QStaticTextUserData *userData; // 8 bytes per item
+ char useBackendOptimizations : 1; // 1 byte per item
+ char userDataNeedsUpdate : 1; //
+ // ================
+ // 51 bytes per item
+};
+
+class QStaticText;
+class Q_AUTOTEST_EXPORT QStaticTextPrivate
+{
+public:
+ QStaticTextPrivate();
+ QStaticTextPrivate(const QStaticTextPrivate &other);
+ ~QStaticTextPrivate();
+
+ void init();
+ void paintText(const QPointF &pos, QPainter *p);
+
+ QAtomicInt ref; // 4 bytes per text
+
+ QString text; // 4 bytes per text
+ QFont font; // 8 bytes per text
+ QSizeF maximumSize; // 16 bytes per text
+ QSizeF actualSize; // 16 bytes per text
+ QPointF position; // 16 bytes per text
+
+ QTransform matrix; // 80 bytes per text
+ QStaticTextItem *items; // 4 bytes per text
+ int itemCount; // 4 bytes per text
+ glyph_t *glyphPool; // 4 bytes per text
+ QFixedPoint *positionPool; // 4 bytes per text
+
+ unsigned char needsClipRect : 1; // 1 byte per text
+ unsigned char useBackendOptimizations : 1;
+ unsigned char textFormat : 2;
+ // ================
+ // 171 bytes per text
+
+ static QStaticTextPrivate *get(const QStaticText *q);
+};
+
+QT_END_NAMESPACE
+
+#endif // QSTATICTEXT_P_H
diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp
index 6750c093d3..e594b7e1ae 100644
--- a/src/gui/text/qsyntaxhighlighter.cpp
+++ b/src/gui/text/qsyntaxhighlighter.cpp
@@ -59,23 +59,24 @@ class QSyntaxHighlighterPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QSyntaxHighlighter)
public:
- inline QSyntaxHighlighterPrivate() : rehighlightPending(false) {}
+ inline QSyntaxHighlighterPrivate()
+ : rehighlightPending(false), inReformatBlocks(false)
+ {}
QPointer<QTextDocument> doc;
void _q_reformatBlocks(int from, int charsRemoved, int charsAdded);
- void reformatBlock(QTextBlock block);
-
+ void reformatBlocks(int from, int charsRemoved, int charsAdded);
+ void reformatBlock(const QTextBlock &block);
+
inline void rehighlight(QTextCursor &cursor, QTextCursor::MoveOperation operation) {
- QObject::disconnect(doc, SIGNAL(contentsChange(int,int,int)),
- q_func(), SLOT(_q_reformatBlocks(int,int,int)));
+ inReformatBlocks = true;
cursor.beginEditBlock();
int from = cursor.position();
cursor.movePosition(operation);
- _q_reformatBlocks(from, 0, cursor.position() - from);
+ reformatBlocks(from, 0, cursor.position() - from);
cursor.endEditBlock();
- QObject::connect(doc, SIGNAL(contentsChange(int,int,int)),
- q_func(), SLOT(_q_reformatBlocks(int,int,int)));
+ inReformatBlocks = false;
}
inline void _q_delayedRehighlight() {
@@ -83,17 +84,19 @@ public:
return;
rehighlightPending = false;
q_func()->rehighlight();
- return;
}
void applyFormatChanges();
QVector<QTextCharFormat> formatChanges;
QTextBlock currentBlock;
bool rehighlightPending;
+ bool inReformatBlocks;
};
void QSyntaxHighlighterPrivate::applyFormatChanges()
{
+ bool formatsChanged = false;
+
QTextLayout *layout = currentBlock.layout();
QList<QTextLayout::FormatRange> ranges = layout->additionalFormats();
@@ -101,19 +104,26 @@ void QSyntaxHighlighterPrivate::applyFormatChanges()
const int preeditAreaStart = layout->preeditAreaPosition();
const int preeditAreaLength = layout->preeditAreaText().length();
- QList<QTextLayout::FormatRange>::Iterator it = ranges.begin();
- while (it != ranges.end()) {
- if (it->start >= preeditAreaStart
- && it->start + it->length <= preeditAreaStart + preeditAreaLength)
- ++it;
- else
- it = ranges.erase(it);
+ if (preeditAreaLength != 0) {
+ QList<QTextLayout::FormatRange>::Iterator it = ranges.begin();
+ while (it != ranges.end()) {
+ if (it->start >= preeditAreaStart
+ && it->start + it->length <= preeditAreaStart + preeditAreaLength) {
+ ++it;
+ } else {
+ it = ranges.erase(it);
+ formatsChanged = true;
+ }
+ }
+ } else if (!ranges.isEmpty()) {
+ ranges.clear();
+ formatsChanged = true;
}
QTextCharFormat emptyFormat;
QTextLayout::FormatRange r;
- r.start = r.length = -1;
+ r.start = -1;
int i = 0;
while (i < formatChanges.count()) {
@@ -135,34 +145,46 @@ void QSyntaxHighlighterPrivate::applyFormatChanges()
r.length = i - r.start;
- if (r.start >= preeditAreaStart) {
- r.start += preeditAreaLength;
- } else if (r.start + r.length >= preeditAreaStart) {
- r.length += preeditAreaLength;
+ if (preeditAreaLength != 0) {
+ if (r.start >= preeditAreaStart)
+ r.start += preeditAreaLength;
+ else if (r.start + r.length >= preeditAreaStart)
+ r.length += preeditAreaLength;
}
ranges << r;
- r.start = r.length = -1;
+ formatsChanged = true;
+ r.start = -1;
}
if (r.start != -1) {
r.length = formatChanges.count() - r.start;
- if (r.start >= preeditAreaStart) {
- r.start += preeditAreaLength;
- } else if (r.start + r.length >= preeditAreaStart) {
- r.length += preeditAreaLength;
+ if (preeditAreaLength != 0) {
+ if (r.start >= preeditAreaStart)
+ r.start += preeditAreaLength;
+ else if (r.start + r.length >= preeditAreaStart)
+ r.length += preeditAreaLength;
}
ranges << r;
+ formatsChanged = true;
}
- layout->setAdditionalFormats(ranges);
+ if (formatsChanged) {
+ layout->setAdditionalFormats(ranges);
+ doc->markContentsDirty(currentBlock.position(), currentBlock.length());
+ }
}
void QSyntaxHighlighterPrivate::_q_reformatBlocks(int from, int charsRemoved, int charsAdded)
{
- Q_UNUSED(charsRemoved);
+ if (!inReformatBlocks)
+ reformatBlocks(from, charsRemoved, charsAdded);
+}
+
+void QSyntaxHighlighterPrivate::reformatBlocks(int from, int charsRemoved, int charsAdded)
+{
rehighlightPending = false;
QTextBlock block = doc->findBlock(from);
@@ -191,21 +213,18 @@ void QSyntaxHighlighterPrivate::_q_reformatBlocks(int from, int charsRemoved, in
formatChanges.clear();
}
-void QSyntaxHighlighterPrivate::reformatBlock(QTextBlock block)
+void QSyntaxHighlighterPrivate::reformatBlock(const QTextBlock &block)
{
Q_Q(QSyntaxHighlighter);
Q_ASSERT_X(!currentBlock.isValid(), "QSyntaxHighlighter::reformatBlock()", "reFormatBlock() called recursively");
currentBlock = block;
- QTextBlock previous = block.previous();
formatChanges.fill(QTextCharFormat(), block.length() - 1);
q->highlightBlock(block.text());
applyFormatChanges();
- doc->markContentsDirty(block.position(), block.length());
-
currentBlock = QTextBlock();
}
@@ -349,8 +368,8 @@ void QSyntaxHighlighter::setDocument(QTextDocument *doc)
if (d->doc) {
connect(d->doc, SIGNAL(contentsChange(int,int,int)),
this, SLOT(_q_reformatBlocks(int,int,int)));
- QTimer::singleShot(0, this, SLOT(_q_delayedRehighlight()));
d->rehighlightPending = true;
+ QTimer::singleShot(0, this, SLOT(_q_delayedRehighlight()));
}
}
@@ -391,11 +410,16 @@ void QSyntaxHighlighter::rehighlight()
void QSyntaxHighlighter::rehighlightBlock(const QTextBlock &block)
{
Q_D(QSyntaxHighlighter);
- if (!d->doc)
+ if (!d->doc || !block.isValid() || block.document() != d->doc)
return;
+ const bool rehighlightPending = d->rehighlightPending;
+
QTextCursor cursor(block);
d->rehighlight(cursor, QTextCursor::EndOfBlock);
+
+ if (rehighlightPending)
+ d->rehighlightPending = rehighlightPending;
}
/*!
@@ -460,7 +484,6 @@ void QSyntaxHighlighter::rehighlightBlock(const QTextBlock &block)
void QSyntaxHighlighter::setFormat(int start, int count, const QTextCharFormat &format)
{
Q_D(QSyntaxHighlighter);
-
if (start < 0 || start >= d->formatChanges.count())
return;
@@ -628,7 +651,7 @@ QTextBlockUserData *QSyntaxHighlighter::currentBlockUserData() const
\since 4.4
Returns the current text block.
- */
+*/
QTextBlock QSyntaxHighlighter::currentBlock() const
{
Q_D(const QSyntaxHighlighter);
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index aaaa3caec5..f345cd1df3 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -441,7 +441,6 @@ void QTextControlPrivate::setContent(Qt::TextFormat format, const QString &text,
QObject::connect(doc, SIGNAL(documentLayoutChanged()), q, SLOT(_q_documentLayoutChanged()));
// convenience signal forwards
- QObject::connect(doc, SIGNAL(contentsChanged()), q, SIGNAL(textChanged()));
QObject::connect(doc, SIGNAL(undoAvailable(bool)), q, SIGNAL(undoAvailable(bool)));
QObject::connect(doc, SIGNAL(redoAvailable(bool)), q, SIGNAL(redoAvailable(bool)));
QObject::connect(doc, SIGNAL(modificationChanged(bool)), q, SIGNAL(modificationChanged(bool)));
@@ -452,8 +451,11 @@ void QTextControlPrivate::setContent(Qt::TextFormat format, const QString &text,
if (!document)
doc->setUndoRedoEnabled(false);
+ //Saving the index save some time.
+ static int contentsChangedIndex = QTextDocument::staticMetaObject.indexOfSignal("contentsChanged()");
+ static int textChangedIndex = QTextControl::staticMetaObject.indexOfSignal("textChanged()");
// avoid multiple textChanged() signals being emitted
- QObject::disconnect(doc, SIGNAL(contentsChanged()), q, SIGNAL(textChanged()));
+ QMetaObject::disconnect(doc, contentsChangedIndex, q, textChangedIndex);
if (!text.isEmpty()) {
// clear 'our' cursor for insertion to prevent
@@ -488,7 +490,7 @@ void QTextControlPrivate::setContent(Qt::TextFormat format, const QString &text,
}
cursor.setCharFormat(charFormatForInsertion);
- QObject::connect(doc, SIGNAL(contentsChanged()), q, SIGNAL(textChanged()));
+ QMetaObject::connect(doc, contentsChangedIndex, q, textChangedIndex);
emit q->textChanged();
if (!document)
doc->setUndoRedoEnabled(previousUndoRedoState);
@@ -1762,8 +1764,8 @@ void QTextControlPrivate::contextMenuEvent(const QPoint &screenPos, const QPoint
QMenu *menu = q->createStandardContextMenu(docPos, contextWidget);
if (!menu)
return;
- menu->exec(screenPos);
- delete menu;
+ menu->setAttribute(Qt::WA_DeleteOnClose);
+ menu->popup(screenPos);
#endif
}
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index c81d538937..c91df3cadf 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -1145,7 +1145,7 @@ void QTextCursor::setPosition(int pos, MoveMode m)
Returns the absolute position of the cursor within the document.
The cursor is positioned between characters.
- \sa setPosition() movePosition() anchor()
+ \sa setPosition() movePosition() anchor() positionInBlock()
*/
int QTextCursor::position() const
{
@@ -1155,6 +1155,22 @@ int QTextCursor::position() const
}
/*!
+ \since 4.7
+ Returns the relative position of the cursor within the block.
+ The cursor is positioned between characters.
+
+ This is equivalent to \c{ position() - block().position()}.
+
+ \sa position()
+*/
+int QTextCursor::positionInBlock() const
+{
+ if (!d || !d->priv)
+ return 0;
+ return d->position - d->block().position();
+}
+
+/*!
Returns the anchor position; this is the same as position() unless
there is a selection in which case position() marks one end of the
selection and anchor() marks the other end. Just like the cursor
@@ -2414,9 +2430,17 @@ int QTextCursor::blockNumber() const
return d->block().blockNumber();
}
+
/*!
\since 4.2
Returns the position of the cursor within its containing line.
+
+ Note that this is the column number relative to a wrapped line,
+ not relative to the block (i.e. the paragraph).
+
+ You probably want to call positionInBlock() instead.
+
+ \sa positionInBlock()
*/
int QTextCursor::columnNumber() const
{
diff --git a/src/gui/text/qtextcursor.h b/src/gui/text/qtextcursor.h
index 38bc39d240..3e968a31fd 100644
--- a/src/gui/text/qtextcursor.h
+++ b/src/gui/text/qtextcursor.h
@@ -89,6 +89,7 @@ public:
void setPosition(int pos, MoveMode mode = MoveAnchor);
int position() const;
+ int positionInBlock() const;
int anchor() const;
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index 21f318906f..9a1b70cb63 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -61,6 +61,7 @@
#include <qapplication.h>
#include "qtextcontrol_p.h"
#include "private/qtextedit_p.h"
+#include "private/qdataurl_p.h"
#include "qtextdocument_p.h"
#include <private/qprinter_p.h>
@@ -434,6 +435,30 @@ void QTextDocument::redo(QTextCursor *cursor)
}
}
+/*! \enum QTextDocument::Stacks
+
+ \value UndoStack The undo stack.
+ \value RedoStack The redo stack.
+ \value UndoAndRedoStacks Both the undo and redo stacks.
+*/
+
+/*!
+ \since 4.7
+ Clears the stacks specified by \a stacksToClear.
+
+ This method clears any commands on the undo stack, the redo stack,
+ or both (the default). If commands are cleared, the appropriate
+ signals are emitted, QTextDocument::undoAvailable() or
+ QTextDocument::redoAvailable().
+
+ \sa QTextDocument::undoAvailable() QTextDocument::redoAvailable()
+*/
+void QTextDocument::clearUndoRedoStacks(Stacks stacksToClear)
+{
+ Q_D(QTextDocument);
+ d->clearUndoRedoStacks(stacksToClear, true);
+}
+
/*!
\overload
@@ -1749,9 +1774,9 @@ void QTextDocument::print(QPrinter *printer) const
int pageCopies;
if (printer->collateCopies() == true){
docCopies = 1;
- pageCopies = printer->numCopies();
+ pageCopies = printer->supportsMultipleCopies() ? 1 : printer->copyCount();
} else {
- docCopies = printer->numCopies();
+ docCopies = printer->supportsMultipleCopies() ? 1 : printer->copyCount();
pageCopies = 1;
}
@@ -1924,6 +1949,10 @@ QVariant QTextDocument::loadResource(int type, const QUrl &name)
}
#endif
+ // handle data: URLs
+ if (r.isNull() && name.scheme() == QLatin1String("data"))
+ r = qDecodeDataUrl(name).second;
+
// if resource was not loaded try to load it here
if (!doc && r.isNull() && name.isRelative()) {
QUrl currentURL = d->url;
diff --git a/src/gui/text/qtextdocument.h b/src/gui/text/qtextdocument.h
index b5bcb41277..0140772e1d 100644
--- a/src/gui/text/qtextdocument.h
+++ b/src/gui/text/qtextdocument.h
@@ -256,6 +256,13 @@ public:
void undo(QTextCursor *cursor);
void redo(QTextCursor *cursor);
+ enum Stacks {
+ UndoStack = 0x01,
+ RedoStack = 0x02,
+ UndoAndRedoStacks = UndoStack | RedoStack
+ };
+ void clearUndoRedoStacks(Stacks historyToClear = UndoAndRedoStacks);
+
int maximumBlockCount() const;
void setMaximumBlockCount(int maximum);
diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp
index 372b9dc3e2..969d5b4632 100644
--- a/src/gui/text/qtextdocument_p.cpp
+++ b/src/gui/text/qtextdocument_p.cpp
@@ -259,8 +259,7 @@ void QTextDocumentPrivate::clear()
objects.clear();
title.clear();
- undoState = 0;
- truncateUndoStack();
+ clearUndoRedoStacks(QTextDocument::UndoAndRedoStacks);
text = QString();
unreachableCharacterCount = 0;
modifiedState = 0;
@@ -292,7 +291,7 @@ QTextDocumentPrivate::~QTextDocumentPrivate()
cursors.clear();
undoState = 0;
undoEnabled = true;
- truncateUndoStack();
+ clearUndoRedoStacks(QTextDocument::RedoStack);
}
void QTextDocumentPrivate::setLayout(QAbstractTextDocumentLayout *layout)
@@ -1027,7 +1026,7 @@ void QTextDocumentPrivate::appendUndoItem(const QTextUndoCommand &c)
if (!undoEnabled)
return;
if (undoState < undoStack.size())
- truncateUndoStack();
+ clearUndoRedoStacks(QTextDocument::RedoStack);
if (!undoStack.isEmpty() && modified) {
QTextUndoCommand &last = undoStack[undoState - 1];
@@ -1050,26 +1049,46 @@ void QTextDocumentPrivate::appendUndoItem(const QTextUndoCommand &c)
emit document()->undoCommandAdded();
}
-void QTextDocumentPrivate::truncateUndoStack()
+void QTextDocumentPrivate::clearUndoRedoStacks(QTextDocument::Stacks stacksToClear,
+ bool emitSignals)
{
- if (undoState == undoStack.size())
- return;
-
- for (int i = undoState; i < undoStack.size(); ++i) {
- QTextUndoCommand c = undoStack[i];
- if (c.command & QTextUndoCommand::Removed) {
- // ########
-// QTextFragment *f = c.fragment_list;
-// while (f) {
-// QTextFragment *n = f->right;
-// delete f;
-// f = n;
-// }
- } else if (c.command & QTextUndoCommand::Custom) {
- delete c.custom;
+ bool undoCommandsAvailable = undoState != 0;
+ bool redoCommandsAvailable = undoState != undoStack.size();
+ if (stacksToClear == QTextDocument::UndoStack && undoCommandsAvailable) {
+ for (int i = 0; i < undoState; ++i) {
+ QTextUndoCommand c = undoStack[undoState];
+ if (c.command & QTextUndoCommand::Custom)
+ delete c.custom;
}
+ undoStack.remove(0, undoState);
+ undoStack.resize(undoStack.size() - undoState);
+ undoState = 0;
+ if (emitSignals)
+ emitUndoAvailable(false);
+ } else if (stacksToClear == QTextDocument::RedoStack
+ && redoCommandsAvailable) {
+ for (int i = undoState; i < undoStack.size(); ++i) {
+ QTextUndoCommand c = undoStack[i];
+ if (c.command & QTextUndoCommand::Custom)
+ delete c.custom;
+ }
+ undoStack.resize(undoState);
+ if (emitSignals)
+ emitRedoAvailable(false);
+ } else if (stacksToClear == QTextDocument::UndoAndRedoStacks
+ && !undoStack.isEmpty()) {
+ for (int i = 0; i < undoStack.size(); ++i) {
+ QTextUndoCommand c = undoStack[i];
+ if (c.command & QTextUndoCommand::Custom)
+ delete c.custom;
+ }
+ undoState = 0;
+ undoStack.resize(0);
+ if (emitSignals && undoCommandsAvailable)
+ emitUndoAvailable(false);
+ if (emitSignals && redoCommandsAvailable)
+ emitRedoAvailable(false);
}
- undoStack.resize(undoState);
}
void QTextDocumentPrivate::emitUndoAvailable(bool available)
@@ -1097,7 +1116,7 @@ void QTextDocumentPrivate::enableUndoRedo(bool enable)
if (!enable) {
undoState = 0;
- truncateUndoStack();
+ clearUndoRedoStacks(QTextDocument::RedoStack);
emitUndoAvailable(false);
emitRedoAvailable(false);
}
diff --git a/src/gui/text/qtextdocument_p.h b/src/gui/text/qtextdocument_p.h
index 4ecc2fa6cf..ac5ed3c86e 100644
--- a/src/gui/text/qtextdocument_p.h
+++ b/src/gui/text/qtextdocument_p.h
@@ -252,10 +252,11 @@ public:
inline QFont defaultFont() const { return formats.defaultFont(); }
inline void setDefaultFont(const QFont &f) { formats.setDefaultFont(f); }
+ void clearUndoRedoStacks(QTextDocument::Stacks stacksToClear, bool emitSignals = false);
+
private:
bool split(int pos);
bool unite(uint f);
- void truncateUndoStack();
void insert_string(int pos, uint strPos, uint length, int format, QTextUndoCommand::Operation op);
int insert_block(int pos, uint strPos, int format, int blockformat, QTextUndoCommand::Operation op, int command);
diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h
index f36cbd2619..5054b66941 100644
--- a/src/gui/text/qtextengine_p.h
+++ b/src/gui/text/qtextengine_p.h
@@ -382,6 +382,7 @@ struct Q_AUTOTEST_EXPORT QScriptLine
QFixed y;
QFixed width;
QFixed textWidth;
+ QFixed textAdvance;
int from;
signed int length : 29;
mutable uint justified : 1;
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index af916030f9..cc6793d759 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1875,6 +1875,7 @@ void QTextLine::layout_helper(int maxGlyphs)
line.textWidth += lbh.softHyphenWidth;
}
+ line.textAdvance = line.textWidth;
line.textWidth += lbh.rightBearing;
goto found;
@@ -1885,6 +1886,7 @@ void QTextLine::layout_helper(int maxGlyphs)
}
LB_DEBUG("reached end of line");
lbh.checkFullOtherwiseExtend(line);
+ line.textAdvance = line.textWidth;
line.textWidth += lbh.rightBearing;
found:
diff --git a/src/gui/text/qzipreader_p.h b/src/gui/text/qzipreader_p.h
index 67a2ace547..9b73373cdc 100644
--- a/src/gui/text/qzipreader_p.h
+++ b/src/gui/text/qzipreader_p.h
@@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE
class QZipReaderPrivate;
-class Q_AUTOTEST_EXPORT QZipReader
+class Q_GUI_EXPORT QZipReader
{
public:
QZipReader(const QString &fileName, QIODevice::OpenMode mode = QIODevice::ReadOnly );
@@ -73,7 +73,7 @@ public:
bool isReadable() const;
bool exists() const;
- struct Q_AUTOTEST_EXPORT FileInfo
+ struct Q_GUI_EXPORT FileInfo
{
FileInfo();
FileInfo(const FileInfo &other);
diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri
index b7615a43e8..9ec314299c 100644
--- a/src/gui/text/text.pri
+++ b/src/gui/text/text.pri
@@ -37,7 +37,9 @@ HEADERS += \
text/qtexttable_p.h \
text/qzipreader_p.h \
text/qzipwriter_p.h \
- text/qtextodfwriter_p.h
+ text/qtextodfwriter_p.h \
+ text/qstatictext_p.h \
+ text/qstatictext.h
SOURCES += \
text/qfont.cpp \
@@ -66,7 +68,8 @@ SOURCES += \
text/qsyntaxhighlighter.cpp \
text/qcssparser.cpp \
text/qzip.cpp \
- text/qtextodfwriter.cpp
+ text/qtextodfwriter.cpp \
+ text/qstatictext.cpp
win32 {
SOURCES += \
diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp
index cefdb27c6d..b7be967c3e 100644
--- a/src/gui/util/qcompleter.cpp
+++ b/src/gui/util/qcompleter.cpp
@@ -62,7 +62,7 @@
\snippet doc/src/snippets/code/src_gui_util_qcompleter.cpp 0
- A QDirModel can be used to provide auto completion of file names.
+ A QFileSystemModel can be used to provide auto completion of file names.
For example:
\snippet doc/src/snippets/code/src_gui_util_qcompleter.cpp 1
@@ -120,7 +120,7 @@
completion is then performed one level at a time.
Let's take the example of a user typing in a file system path.
- The model is a (hierarchical) QDirModel. The completion
+ The model is a (hierarchical) QFileSystemModel. The completion
occurs for every element in the path. For example, if the current
text is \c C:\Wind, QCompleter might suggest \c Windows to
complete the current path element. Similarly, if the current text
@@ -130,12 +130,12 @@
split the path into a list of strings that are matched at each level.
For \c C:\Windows\Sy, it needs to be split as "C:", "Windows" and "Sy".
The default implementation of splitPath(), splits the completionPrefix
- using QDir::separator() if the model is a QDirModel.
+ using QDir::separator() if the model is a QFileSystemModel.
To provide completions, QCompleter needs to know the path from an index.
This is provided by pathFromIndex(). The default implementation of
pathFromIndex(), returns the data for the \l{Qt::EditRole}{edit role}
- for list models and the absolute file path if the mode is a QDirModel.
+ for list models and the absolute file path if the mode is a QFileSystemModel.
\sa QAbstractItemModel, QLineEdit, QComboBox, {Completer Example}
*/
@@ -147,6 +147,7 @@
#include "QtGui/qscrollbar.h"
#include "QtGui/qstringlistmodel.h"
#include "QtGui/qdirmodel.h"
+#include "QtGui/qfilesystemmodel.h"
#include "QtGui/qheaderview.h"
#include "QtGui/qlistview.h"
#include "QtGui/qapplication.h"
@@ -470,9 +471,13 @@ QMatchData QCompletionEngine::filterHistory()
QAbstractItemModel *source = c->proxy->sourceModel();
if (curParts.count() <= 1 || c->proxy->showAll || !source)
return QMatchData();
- bool dirModel = false;
+ bool isDirModel = false;
+ bool isFsModel = false;
#ifndef QT_NO_DIRMODEL
- dirModel = (qobject_cast<QDirModel *>(source) != 0);
+ isDirModel = (qobject_cast<QDirModel *>(source) != 0);
+#endif
+#ifndef QT_NO_FILESYSTEMMODEL
+ isFsModel = (qobject_cast<QFileSystemModel *>(source) != 0);
#endif
QVector<int> v;
QIndexMapper im(v);
@@ -482,7 +487,7 @@ QMatchData QCompletionEngine::filterHistory()
QString str = source->index(i, c->column).data().toString();
if (str.startsWith(c->prefix, c->cs)
#if (!defined(Q_OS_WIN) || defined(Q_OS_WINCE)) && !defined(Q_OS_SYMBIAN)
- && (!dirModel || QDir::toNativeSeparators(str) != QDir::separator())
+ && ((!isFsModel && !isDirModel) || QDir::toNativeSeparators(str) != QDir::separator())
#endif
)
m.indices.append(i);
@@ -838,6 +843,13 @@ void QCompleterPrivate::_q_complete(QModelIndex index, bool highlighted)
completion += QDir::separator();
}
#endif
+#ifndef QT_NO_FILESYSTEMMODEL
+ // add a trailing separator in inline
+ if (mode == QCompleter::InlineCompletion) {
+ if (qobject_cast<QFileSystemModel *>(proxy->sourceModel()) && QFileInfo(completion).isDir())
+ completion += QDir::separator();
+ }
+#endif
}
if (highlighted) {
@@ -891,6 +903,14 @@ void QCompleterPrivate::showPopup(const QRect& rect)
popup->show();
}
+void QCompleterPrivate::_q_fileSystemModelDirectoryLoaded(const QString &path)
+{
+ Q_Q(QCompleter);
+ //the path given by QFileSystemModel does not end with /
+ if (q->completionPrefix() != path + QLatin1Char('/'))
+ q->complete();
+}
+
/*!
Constructs a completer object with the given \a parent.
*/
@@ -971,7 +991,7 @@ QWidget *QCompleter::widget() const
be list model or a tree model. If a model has been already previously set
and it has the QCompleter as its parent, it is deleted.
- For convenience, if \a model is a QDirModel, QCompleter switches its
+ For convenience, if \a model is a QFileSystemModel, QCompleter switches its
caseSensitivity to Qt::CaseInsensitive on Windows and Qt::CaseSensitive
on other platforms.
@@ -995,6 +1015,18 @@ void QCompleter::setModel(QAbstractItemModel *model)
#endif
}
#endif // QT_NO_DIRMODEL
+#ifndef QT_NO_FILESYSTEMMODEL
+ QFileSystemModel *fsModel = qobject_cast<QFileSystemModel *>(model);
+ if (fsModel) {
+#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN)
+ setCaseSensitivity(Qt::CaseInsensitive);
+#else
+ setCaseSensitivity(Qt::CaseSensitive);
+#endif
+ setCompletionRole(QFileSystemModel::FileNameRole);
+ connect(fsModel, SIGNAL(directoryLoaded(QString)), this, SLOT(_q_fileSystemModelDirectoryLoaded(QString)));
+ }
+#endif // QT_NO_FILESYSTEMMODEL
}
/*!
@@ -1626,10 +1658,11 @@ QAbstractItemModel *QCompleter::completionModel() const
The default implementation returns the \l{Qt::EditRole}{edit role} of the
item for list models. It returns the absolute file path if the model is a
- QDirModel.
+ QFileSystemModel.
\sa splitPath()
*/
+
QString QCompleter::pathFromIndex(const QModelIndex& index) const
{
Q_D(const QCompleter);
@@ -1639,16 +1672,25 @@ QString QCompleter::pathFromIndex(const QModelIndex& index) const
QAbstractItemModel *sourceModel = d->proxy->sourceModel();
if (!sourceModel)
return QString();
+ bool isDirModel = false;
+ bool isFsModel = false;
#ifndef QT_NO_DIRMODEL
- QDirModel *dirModel = qobject_cast<QDirModel *>(sourceModel);
- if (!dirModel)
+ isDirModel = qobject_cast<QDirModel *>(d->proxy->sourceModel()) != 0;
+#endif
+#ifndef QT_NO_FILESYSTEMMODEL
+ isFsModel = qobject_cast<QFileSystemModel *>(d->proxy->sourceModel()) != 0;
#endif
+ if (!isDirModel && !isFsModel)
return sourceModel->data(index, d->role).toString();
QModelIndex idx = index;
QStringList list;
do {
- QString t = sourceModel->data(idx, Qt::EditRole).toString();
+ QString t;
+ if (isDirModel)
+ t = sourceModel->data(idx, Qt::EditRole).toString();
+ else
+ t = sourceModel->data(idx, QFileSystemModel::FileNameRole).toString();
list.prepend(t);
QModelIndex parent = idx.parent();
idx = parent.sibling(parent.row(), index.column());
@@ -1668,7 +1710,7 @@ QString QCompleter::pathFromIndex(const QModelIndex& index) const
in the model().
The default implementation of splitPath() splits a file system path based on
- QDir::separator() when the sourceModel() is a QDirModel.
+ QDir::separator() when the sourceModel() is a QFileSystemModel.
When used with list models, the first item in the returned list is used for
matching.
@@ -1678,12 +1720,19 @@ QString QCompleter::pathFromIndex(const QModelIndex& index) const
QStringList QCompleter::splitPath(const QString& path) const
{
bool isDirModel = false;
+ bool isFsModel = false;
#ifndef QT_NO_DIRMODEL
Q_D(const QCompleter);
isDirModel = qobject_cast<QDirModel *>(d->proxy->sourceModel()) != 0;
#endif
+#ifndef QT_NO_FILESYSTEMMODEL
+#ifdef QT_NO_DIRMODEL
+ Q_D(const QCompleter);
+#endif
+ isFsModel = qobject_cast<QFileSystemModel *>(d->proxy->sourceModel()) != 0;
+#endif
- if (!isDirModel || path.isEmpty())
+ if ((!isDirModel && !isFsModel) || path.isEmpty())
return QStringList(completionPrefix());
QString pathCopy = QDir::toNativeSeparators(path);
diff --git a/src/gui/util/qcompleter.h b/src/gui/util/qcompleter.h
index 5123a40432..0cef9be3bc 100644
--- a/src/gui/util/qcompleter.h
+++ b/src/gui/util/qcompleter.h
@@ -159,6 +159,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_complete(QModelIndex))
Q_PRIVATE_SLOT(d_func(), void _q_completionSelected(const QItemSelection&))
Q_PRIVATE_SLOT(d_func(), void _q_autoResizePopup())
+ Q_PRIVATE_SLOT(d_func(), void _q_fileSystemModelDirectoryLoaded(const QString&))
};
#endif // QT_NO_COMPLETER
diff --git a/src/gui/util/qcompleter_p.h b/src/gui/util/qcompleter_p.h
index 44be4c0204..8f00793856 100644
--- a/src/gui/util/qcompleter_p.h
+++ b/src/gui/util/qcompleter_p.h
@@ -98,6 +98,7 @@ public:
void _q_complete(QModelIndex, bool = false);
void _q_completionSelected(const QItemSelection&);
void _q_autoResizePopup();
+ void _q_fileSystemModelDirectoryLoaded(const QString &path);
void setCurrentIndex(QModelIndex, bool = true);
};
diff --git a/src/gui/util/qdesktopservices_s60.cpp b/src/gui/util/qdesktopservices_s60.cpp
index 39240e6a37..a415180fb9 100644
--- a/src/gui/util/qdesktopservices_s60.cpp
+++ b/src/gui/util/qdesktopservices_s60.cpp
@@ -415,11 +415,11 @@ QString QDesktopServices::storageLocation(StandardLocation type)
//return QDir::homePath(); break;
break;
case DataLocation:
- CEikonEnv::Static()->FsSession().PrivatePath(path);
+ qt_s60GetRFs().PrivatePath(path);
path.Insert(0, writableExeDrive().Name());
break;
case CacheLocation:
- CEikonEnv::Static()->FsSession().PrivatePath(path);
+ qt_s60GetRFs().PrivatePath(path);
path.Insert(0, writableExeDrive().Name());
path.Append(KCacheSubDir);
break;
diff --git a/src/gui/util/qdesktopservices_win.cpp b/src/gui/util/qdesktopservices_win.cpp
index 9f3b6e1e9e..aab7e16631 100644
--- a/src/gui/util/qdesktopservices_win.cpp
+++ b/src/gui/util/qdesktopservices_win.cpp
@@ -59,7 +59,7 @@
# endif
#endif
-#if defined(Q_CC_MINGW) && !defined(CSIDL_MYMUSIC)
+#ifndef CSIDL_MYMUSIC
#define CSIDL_MYMUSIC 13
#define CSIDL_MYVIDEO 14
#endif
@@ -97,19 +97,19 @@ static bool launchWebBrowser(const QUrl &url)
if (url.scheme() == QLatin1String("mailto")) {
//Retrieve the commandline for the default mail client
//the default key used below is the command line for the mailto: shell command
- DWORD bufferSize = 2 * MAX_PATH;
+ DWORD bufferSize = sizeof(wchar_t) * MAX_PATH;
long returnValue = -1;
QString command;
HKEY handle;
LONG res;
- wchar_t keyValue[2 * MAX_PATH] = {0};
+ wchar_t keyValue[MAX_PATH] = {0};
QString keyName(QLatin1String("mailto"));
//Check if user has set preference, otherwise use default.
- res = RegOpenKeyExW(HKEY_CURRENT_USER,
- L"Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\mailto\\UserChoice",
- 0, KEY_READ, &handle);
+ res = RegOpenKeyEx(HKEY_CURRENT_USER,
+ L"Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\mailto\\UserChoice",
+ 0, KEY_READ, &handle);
if (res == ERROR_SUCCESS) {
returnValue = RegQueryValueEx(handle, L"Progid", 0, 0, reinterpret_cast<unsigned char*>(keyValue), &bufferSize);
if (!returnValue)
@@ -121,8 +121,8 @@ static bool launchWebBrowser(const QUrl &url)
if (res != ERROR_SUCCESS)
return false;
- bufferSize = 2 * MAX_PATH;
- returnValue = RegQueryValueExW(handle, L"", 0, 0, reinterpret_cast<unsigned char*>(keyValue), &bufferSize);
+ bufferSize = sizeof(wchar_t) * MAX_PATH;
+ returnValue = RegQueryValueEx(handle, L"", 0, 0, reinterpret_cast<unsigned char*>(keyValue), &bufferSize);
if (!returnValue)
command = QString::fromRawData((QChar*)keyValue, bufferSize);
RegCloseKey(handle);
diff --git a/src/gui/util/qsystemtrayicon_mac.mm b/src/gui/util/qsystemtrayicon_mac.mm
index d829947054..d943c8ca0e 100644
--- a/src/gui/util/qsystemtrayicon_mac.mm
+++ b/src/gui/util/qsystemtrayicon_mac.mm
@@ -93,6 +93,7 @@ extern bool qt_mac_execute_apple_script(const QString &script, AEDesc *ret); //q
extern void qtsystray_sendActivated(QSystemTrayIcon *i, int r); //qsystemtrayicon.cpp
extern NSString *keySequenceToKeyEqivalent(const QKeySequence &accel); // qmenu_mac.mm
extern NSUInteger keySequenceModifierMask(const QKeySequence &accel); // qmenu_mac.mm
+extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum);
QT_END_NAMESPACE
QT_USE_NAMESPACE
@@ -110,7 +111,7 @@ QT_USE_NAMESPACE
-(QSystemTrayIcon*)icon;
-(NSStatusItem*)item;
-(QRectF)geometry;
-- (void)triggerSelector:(id)sender;
+- (void)triggerSelector:(id)sender button:(Qt::MouseButton)mouseButton;
- (void)doubleClickSelector:(id)sender;
@end
@@ -121,7 +122,7 @@ QT_USE_NAMESPACE
-(id)initWithParent:(QNSStatusItem*)myParent;
-(QSystemTrayIcon*)icon;
-(void)menuTrackingDone:(NSNotification*)notification;
--(void)mousePressed:(NSEvent *)mouseEvent;
+-(void)mousePressed:(NSEvent *)mouseEvent button:(Qt::MouseButton)mouseButton;
@end
@@ -333,12 +334,10 @@ QT_END_NAMESPACE
[self setNeedsDisplay:YES];
}
--(void)mousePressed:(NSEvent *)mouseEvent
+-(void)mousePressed:(NSEvent *)mouseEvent button:(Qt::MouseButton)mouseButton
{
- int clickCount = [mouseEvent clickCount];
- down = !down;
- if(!down && [self icon]->contextMenu())
- [self icon]->contextMenu()->hide();
+ down = YES;
+ int clickCount = [mouseEvent clickCount];
[self setNeedsDisplay:YES];
#ifndef QT_MAC_USE_COCOA
@@ -348,47 +347,52 @@ QT_END_NAMESPACE
const short scale = hgt - 4;
#endif
- if( down && ![self icon]->icon().isNull() ) {
+ if (![self icon]->icon().isNull() ) {
NSImage *nsaltimage = static_cast<NSImage *>(qt_mac_create_nsimage([self icon]->icon().pixmap(QSize(scale, scale), QIcon::Selected)));
[self setImage: nsaltimage];
[nsaltimage release];
}
-
- if (down)
- [parent triggerSelector:self];
- else if ((clickCount%2))
+ if ((clickCount == 2)) {
+ [self menuTrackingDone:nil];
[parent doubleClickSelector:self];
- while (down) {
- mouseEvent = [[self window] nextEventMatchingMask:NSLeftMouseDownMask | NSLeftMouseUpMask
- | NSLeftMouseDraggedMask | NSRightMouseDownMask | NSRightMouseUpMask
- | NSRightMouseDraggedMask];
- switch ([mouseEvent type]) {
- case NSRightMouseDown:
- case NSRightMouseUp:
- case NSLeftMouseDown:
- case NSLeftMouseUp:
- [self menuTrackingDone:nil];
- break;
- case NSRightMouseDragged:
- case NSLeftMouseDragged:
- default:
- /* Ignore any other kind of event. */
- break;
- }
- };
+ } else {
+ [parent triggerSelector:self button:mouseButton];
+ }
}
-(void)mouseDown:(NSEvent *)mouseEvent
{
- [self mousePressed:mouseEvent];
+ [self mousePressed:mouseEvent button:Qt::LeftButton];
+}
+
+-(void)mouseUp:(NSEvent *)mouseEvent
+{
+ Q_UNUSED(mouseEvent);
+ [self menuTrackingDone:nil];
}
- (void)rightMouseDown:(NSEvent *)mouseEvent
{
- [self mousePressed:mouseEvent];
+ [self mousePressed:mouseEvent button:Qt::RightButton];
+}
+
+-(void)rightMouseUp:(NSEvent *)mouseEvent
+{
+ Q_UNUSED(mouseEvent);
+ [self menuTrackingDone:nil];
}
+- (void)otherMouseDown:(NSEvent *)mouseEvent
+{
+ [self mousePressed:mouseEvent button:cocoaButton2QtButton([mouseEvent buttonNumber])];
+}
+
+-(void)otherMouseUp:(NSEvent *)mouseEvent
+{
+ Q_UNUSED(mouseEvent);
+ [self menuTrackingDone:nil];
+}
-(void)drawRect:(NSRect)rect {
[[parent item] drawStatusBarBackgroundInRect:rect withHighlight:down];
@@ -433,45 +437,40 @@ QT_END_NAMESPACE
}
return QRectF();
}
-- (void)triggerSelector:(id)sender {
+
+- (void)triggerSelector:(id)sender button:(Qt::MouseButton)mouseButton {
Q_UNUSED(sender);
- if(!icon)
+ if (!icon)
return;
- qtsystray_sendActivated(icon, QSystemTrayIcon::Trigger);
+
+ if (mouseButton == Qt::MidButton)
+ qtsystray_sendActivated(icon, QSystemTrayIcon::MiddleClick);
+ else
+ qtsystray_sendActivated(icon, QSystemTrayIcon::Trigger);
+
if (icon->contextMenu()) {
-#if 0
- const QRectF geom = [self geometry];
- if(!geom.isNull()) {
- [[NSNotificationCenter defaultCenter] addObserver:imageCell
- selector:@selector(menuTrackingDone:)
- name:nil
- object:self];
- icon->contextMenu()->exec(geom.topLeft().toPoint(), 0);
- [imageCell menuTrackingDone:nil];
- } else
-#endif
- {
#ifndef QT_MAC_USE_COCOA
- [[[self item] view] removeAllToolTips];
- iconPrivate->updateToolTip_sys();
+ [[[self item] view] removeAllToolTips];
+ iconPrivate->updateToolTip_sys();
#endif
- NSMenu *m = [[QNSMenu alloc] initWithQMenu:icon->contextMenu()];
- [m setAutoenablesItems: NO];
- [[NSNotificationCenter defaultCenter] addObserver:imageCell
- selector:@selector(menuTrackingDone:)
- name:NSMenuDidEndTrackingNotification
- object:m];
- [item popUpStatusItemMenu: m];
- [m release];
- }
+ NSMenu *m = [[QNSMenu alloc] initWithQMenu:icon->contextMenu()];
+ [m setAutoenablesItems: NO];
+ [[NSNotificationCenter defaultCenter] addObserver:imageCell
+ selector:@selector(menuTrackingDone:)
+ name:NSMenuDidEndTrackingNotification
+ object:m];
+ [item popUpStatusItemMenu: m];
+ [m release];
}
}
+
- (void)doubleClickSelector:(id)sender {
Q_UNUSED(sender);
if(!icon)
return;
qtsystray_sendActivated(icon, QSystemTrayIcon::DoubleClick);
}
+
@end
class QSystemTrayIconQMenu : public QMenu
diff --git a/src/gui/util/qsystemtrayicon_win.cpp b/src/gui/util/qsystemtrayicon_win.cpp
index 6db158e94c..8e482e050c 100644
--- a/src/gui/util/qsystemtrayicon_win.cpp
+++ b/src/gui/util/qsystemtrayicon_win.cpp
@@ -53,7 +53,6 @@
#include <qt_windows.h>
#include <commctrl.h>
-#include <shlwapi.h>
#include <QBitmap>
#include <QLibrary>
#include <QApplication>
@@ -326,8 +325,6 @@ bool QSystemTrayIconSys::winEvent( MSG *m, long *result )
q->contextMenu()->move(gpos);
}
#endif
- q->contextMenu()->activateWindow();
- //Must be activated for proper keyboardfocus and menu closing on windows:
}
emit q->activated(QSystemTrayIcon::Context);
break;
diff --git a/src/gui/widgets/qabstractscrollarea_p.h b/src/gui/widgets/qabstractscrollarea_p.h
index 7c728594b6..9a0d66faa4 100644
--- a/src/gui/widgets/qabstractscrollarea_p.h
+++ b/src/gui/widgets/qabstractscrollarea_p.h
@@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE
class QScrollBar;
class QAbstractScrollAreaScrollBarContainer;
-class Q_AUTOTEST_EXPORT QAbstractScrollAreaPrivate: public QFramePrivate
+class Q_GUI_EXPORT QAbstractScrollAreaPrivate: public QFramePrivate
{
Q_DECLARE_PUBLIC(QAbstractScrollArea)
diff --git a/src/gui/widgets/qabstractspinbox.cpp b/src/gui/widgets/qabstractspinbox.cpp
index 4a6235c36a..7e2f20df1e 100644
--- a/src/gui/widgets/qabstractspinbox.cpp
+++ b/src/gui/widgets/qabstractspinbox.cpp
@@ -1248,8 +1248,11 @@ void QAbstractSpinBox::contextMenuEvent(QContextMenuEvent *event)
#else
Q_D(QAbstractSpinBox);
- d->reset();
QPointer<QMenu> menu = d->edit->createStandardContextMenu();
+ if (!menu)
+ return;
+
+ d->reset();
QAction *selAll = new QAction(tr("&Select All"), menu);
menu->insertAction(d->edit->d_func()->selectAllAction,
diff --git a/src/gui/widgets/qcheckbox.cpp b/src/gui/widgets/qcheckbox.cpp
index 4e0ff667d4..bc0900e94e 100644
--- a/src/gui/widgets/qcheckbox.cpp
+++ b/src/gui/widgets/qcheckbox.cpp
@@ -291,7 +291,7 @@ QSize QCheckBox::sizeHint() const
QFontMetrics fm = fontMetrics();
QStyleOptionButton opt;
initStyleOption(&opt);
- QSize sz = style()->itemTextRect(fm, QRect(0, 0, 1, 1), Qt::TextShowMnemonic, false,
+ QSize sz = style()->itemTextRect(fm, QRect(), Qt::TextShowMnemonic, false,
text()).size();
if (!opt.icon.isNull())
sz = QSize(sz.width() + opt.iconSize.width() + 4, qMax(sz.height(), opt.iconSize.height()));
diff --git a/src/gui/widgets/qcocoamenu_mac.mm b/src/gui/widgets/qcocoamenu_mac.mm
index a7e0b7960f..ce859191a7 100644
--- a/src/gui/widgets/qcocoamenu_mac.mm
+++ b/src/gui/widgets/qcocoamenu_mac.mm
@@ -46,6 +46,7 @@
#import <private/qcocoamenuloader_mac_p.h>
#include <private/qt_cocoa_helpers_mac_p.h>
#include <private/qapplication_p.h>
+#include <private/qaction_p.h>
#include <QtGui/QMenu>
@@ -70,6 +71,7 @@ QT_USE_NAMESPACE
self = [super init];
if (self) {
qmenu = menu;
+ previousAction = 0;
[self setAutoenablesItems:NO];
[self setDelegate:self];
}
@@ -81,13 +83,20 @@ QT_USE_NAMESPACE
Q_UNUSED(menu);
if (!item) {
- // ### According to the docs everything will be highlighted. Not sure what we should do in
- // Qt, so just return.
+ if (previousAction) {
+ qt_mac_clear_status_text(previousAction);
+ previousAction = 0;
+ }
return;
}
- if (QAction *action = reinterpret_cast<QAction *>([item tag]))
+ if (QAction *action = reinterpret_cast<QAction *>([item tag])) {
+ QMenu *qtmenu = static_cast<QT_MANGLE_NAMESPACE(QCocoaMenu) *>(menu)->qmenu;
+ previousAction = action;
action->activate(QAction::Hover);
+ qt_mac_menu_emit_hovered(qtmenu, action);
+ action->showStatusText(0); // 0 widget -> action's parent
+ }
}
- (void)menuWillOpen:(NSMenu*)menu;
@@ -100,9 +109,13 @@ QT_USE_NAMESPACE
qt_mac_menu_collapseSeparators(menu, qtmenu->separatorsCollapsible());
}
-- (void)menuWillClose:(NSMenu*)menu;
+- (void)menuDidClose:(NSMenu*)menu;
{
qt_mac_emit_menuSignals(((QT_MANGLE_NAMESPACE(QCocoaMenu) *)menu)->qmenu, false);
+ if (previousAction) {
+ qt_mac_clear_status_text(previousAction);
+ previousAction = 0;
+ }
}
- (BOOL)hasShortcut:(NSMenu *)menu forKey:(NSString *)key forModifiers:(NSUInteger)modifier
@@ -194,6 +207,18 @@ void qt_mac_emit_menuSignals(QMenu *menu, bool show)
}
qt_mac_menus_open_count += delta;
}
+
+void qt_mac_clear_status_text(QAction *action)
+{
+ action->d_func()->showStatusText(0, QString());
+}
+
+void qt_mac_menu_emit_hovered(QMenu *menu, QAction *action)
+{
+ emit menu->hovered(action);
+}
+
+
QT_END_NAMESPACE
#endif
diff --git a/src/gui/widgets/qcocoamenu_mac_p.h b/src/gui/widgets/qcocoamenu_mac_p.h
index 9f50c40875..d6ac8c59ab 100644
--- a/src/gui/widgets/qcocoamenu_mac_p.h
+++ b/src/gui/widgets/qcocoamenu_mac_p.h
@@ -55,13 +55,14 @@
#import <Cocoa/Cocoa.h>
QT_FORWARD_DECLARE_CLASS(QMenu)
+QT_FORWARD_DECLARE_CLASS(QAction)
#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
@protocol NSMenuDelegate <NSObject>
- (void)menu:(NSMenu*)menu willHighlightItem:(NSMenuItem*)item;
- (void)menuWillOpen:(NSMenu*)menu;
-- (void)menuWillClose:(NSMenu*)menu;
+- (void)menuDidClose:(NSMenu*)menu;
- (BOOL)hasShortcut:(NSMenu *)menu forKey:(NSString *)key forModifiers:(NSUInteger)modifier
whichItem:(NSMenuItem**)outItem;
@end
@@ -71,6 +72,7 @@ QT_FORWARD_DECLARE_CLASS(QMenu)
@interface QT_MANGLE_NAMESPACE(QCocoaMenu) : NSMenu <NSMenuDelegate>
{
QMenu *qmenu;
+ QAction *previousAction;
}
- (id)initWithQMenu:(QMenu*)menu;
- (BOOL)menuHasKeyEquivalent:(NSMenu *)menu forEvent:(NSEvent *)event target:(id *)target action:(SEL *)action;
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index 585db7061f..f71d2506f1 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -1274,7 +1274,8 @@ QComboBox::~QComboBox()
By default, this property has a value of 10.
- \note This property is ignored for non-editable comboboxes in Mac style.
+ \note This property is ignored for non-editable comboboxes in styles that returns
+ false for QStyle::SH_ComboBox_Popup such as the Mac style or the Gtk+ Style.
*/
int QComboBox::maxVisibleItems() const
{
@@ -2354,7 +2355,7 @@ void QComboBox::showPopup()
toCheck.push(idx);
#endif
++count;
- if (!usePopup && count > d->maxVisibleItems) {
+ if (!usePopup && count >= d->maxVisibleItems) {
toCheck.clear();
break;
}
diff --git a/src/gui/widgets/qcombobox.h b/src/gui/widgets/qcombobox.h
index 9b19a66f1a..fb9af9ff99 100644
--- a/src/gui/widgets/qcombobox.h
+++ b/src/gui/widgets/qcombobox.h
@@ -111,10 +111,10 @@ public:
bool hasFrame() const;
inline int findText(const QString &text,
- Qt::MatchFlags flags = Qt::MatchExactly|Qt::MatchCaseSensitive) const
+ Qt::MatchFlags flags = static_cast<Qt::MatchFlags>(Qt::MatchExactly|Qt::MatchCaseSensitive)) const
{ return findData(text, Qt::DisplayRole, flags); }
int findData(const QVariant &data, int role = Qt::UserRole,
- Qt::MatchFlags flags = Qt::MatchExactly|Qt::MatchCaseSensitive) const;
+ Qt::MatchFlags flags = static_cast<Qt::MatchFlags>(Qt::MatchExactly|Qt::MatchCaseSensitive)) const;
enum InsertPolicy {
NoInsert,
diff --git a/src/gui/widgets/qdatetimeedit.cpp b/src/gui/widgets/qdatetimeedit.cpp
index 762db864c4..50fa9c9b49 100644
--- a/src/gui/widgets/qdatetimeedit.cpp
+++ b/src/gui/widgets/qdatetimeedit.cpp
@@ -1175,7 +1175,7 @@ void QDateTimeEdit::keyPressEvent(QKeyEvent *event)
return; }
}
QAbstractSpinBox::keyPressEvent(event);
- if (select && !(event->modifiers() & Qt::ShiftModifier) && !d->edit->hasSelectedText()) {
+ if (select && !d->edit->hasSelectedText()) {
if (inserted && d->sectionAt(d->edit->cursorPosition()) == QDateTimeParser::NoSectionIndex) {
QString str = d->displayText();
int pos = d->edit->cursorPosition();
diff --git a/src/gui/widgets/qdialogbuttonbox.cpp b/src/gui/widgets/qdialogbuttonbox.cpp
index 6a0e36357a..cc74a53a95 100644
--- a/src/gui/widgets/qdialogbuttonbox.cpp
+++ b/src/gui/widgets/qdialogbuttonbox.cpp
@@ -103,7 +103,7 @@ QT_BEGIN_NAMESPACE
You can mix and match normal buttons and standard buttons.
Currently the buttons are laid out in the following way if the button box is horizontal:
- \table 100%
+ \table
\row \o \inlineimage buttonbox-gnomelayout-horizontal.png GnomeLayout Horizontal
\o Button box laid out in horizontal GnomeLayout
\row \o \inlineimage buttonbox-kdelayout-horizontal.png KdeLayout Horizontal
@@ -116,25 +116,23 @@ QT_BEGIN_NAMESPACE
The buttons are laid out the following way if the button box is vertical:
- \table 100%
+ \table
+ \row \o GnomeLayout
+ \o KdeLayout
+ \o MacLayout
+ \o WinLayout
\row \o \inlineimage buttonbox-gnomelayout-vertical.png GnomeLayout Vertical
- \o Button box laid out in vertical GnomeLayout
- \row \o \inlineimage buttonbox-kdelayout-vertical.png KdeLayout Vertical
- \o Button box laid out in vertical KdeLayout
- \row \o \inlineimage buttonbox-maclayout-vertical.png MacLayout Vertical
- \o Button box laid out in vertical MacLayout
- \row \o \inlineimage buttonbox-winlayout-vertical.png WinLayout Vertical
- \o Button box laid out in vertical WinLayout
+ \o \inlineimage buttonbox-kdelayout-vertical.png KdeLayout Vertical
+ \o \inlineimage buttonbox-maclayout-vertical.png MacLayout Vertical
+ \o \inlineimage buttonbox-winlayout-vertical.png WinLayout Vertical
\endtable
Additionally, button boxes that contain only buttons with ActionRole or
- HelpRole can be considered modeless and have an alternate look on the mac:
+ HelpRole can be considered modeless and have an alternate look on Mac OS X:
- \table 100%
- \row \o \inlineimage buttonbox-mac-modeless-horizontal.png Screenshot of modeless horizontal MacLayout
- \o modeless horizontal MacLayout
- \row \o \inlineimage buttonbox-mac-modeless-vertical.png Screenshot of modeless vertical MacLayout
- \o modeless vertical MacLayout
+ \table
+ \row \o modeless horizontal MacLayout
+ \o \inlineimage buttonbox-mac-modeless-horizontal.png Screenshot of modeless horizontal MacLayout
\endtable
When a button is clicked in the button box, the clicked() signal is emitted
diff --git a/src/gui/widgets/qdockarealayout.cpp b/src/gui/widgets/qdockarealayout.cpp
index 794863b62f..806654c99c 100644
--- a/src/gui/widgets/qdockarealayout.cpp
+++ b/src/gui/widgets/qdockarealayout.cpp
@@ -220,15 +220,17 @@ static quintptr tabId(const QDockAreaLayoutItem &item)
}
#endif
+static const int zero = 0;
+
QDockAreaLayoutInfo::QDockAreaLayoutInfo()
- : sep(0), dockPos(QInternal::LeftDock), o(Qt::Horizontal), mainWindow(0)
+ : sep(&zero), dockPos(QInternal::LeftDock), o(Qt::Horizontal), mainWindow(0)
#ifndef QT_NO_TABBAR
, tabbed(false), tabBar(0), tabBarShape(QTabBar::RoundedSouth), tabBarVisible(false)
#endif
{
}
-QDockAreaLayoutInfo::QDockAreaLayoutInfo(int _sep, QInternal::DockPosition _dockPos,
+QDockAreaLayoutInfo::QDockAreaLayoutInfo(const int *_sep, QInternal::DockPosition _dockPos,
Qt::Orientation _o, int tbshape,
QMainWindow *window)
: sep(_sep), dockPos(_dockPos), o(_o), mainWindow(window)
@@ -281,7 +283,7 @@ QSize QDockAreaLayoutInfo::minimumSize() const
#endif
{
if (!first)
- a += sep;
+ a += *sep;
a += pick(o, min_size);
}
b = qMax(b, perp(o, min_size));
@@ -349,7 +351,7 @@ QSize QDockAreaLayoutInfo::maximumSize() const
#endif
{
if (!first)
- a += sep;
+ a += *sep;
a += pick(o, max_size);
}
b = qMin(b, perp(o, max_size));
@@ -415,7 +417,7 @@ QSize QDockAreaLayoutInfo::sizeHint() const
{
if (previous && !gap && !(previous->flags & QDockAreaLayoutItem::GapItem)
&& !previous->hasFixedSize(o)) {
- a += sep;
+ a += *sep;
}
a += gap ? item.size : pick(o, size_hint);
}
@@ -491,7 +493,7 @@ static int realMinSize(const QDockAreaLayoutInfo &info)
min = pick(info.o, item.minimumSize());
if (!first)
- result += info.sep;
+ result += *info.sep;
result += min;
first = false;
@@ -516,7 +518,7 @@ static int realMaxSize(const QDockAreaLayoutInfo &info)
max = pick(info.o, item.maximumSize());
if (!first)
- result += info.sep;
+ result += *info.sep;
result += max;
if (result >= QWIDGETSIZE_MAX)
@@ -555,7 +557,7 @@ void QDockAreaLayoutInfo::fitItems()
if (!(previous->flags & QDockAreaLayoutItem::GapItem)) {
QLayoutStruct &ls = layout_struct_list[j++];
ls.init();
- ls.minimumSize = ls.maximumSize = ls.sizeHint = previous->hasFixedSize(o) ? 0 : sep;
+ ls.minimumSize = ls.maximumSize = ls.sizeHint = previous->hasFixedSize(o) ? 0 : *sep;
ls.empty = false;
}
}
@@ -938,7 +940,7 @@ int QDockAreaLayoutInfo::separatorMove(int index, int delta)
if (item.skip()) {
ls.empty = true;
} else {
- const int separatorSpace = item.hasFixedSize(o) ? 0 : sep;
+ const int separatorSpace = item.hasFixedSize(o) ? 0 : *sep;
ls.empty = false;
ls.pos = item.pos;
ls.size = item.size + separatorSpace;
@@ -956,7 +958,7 @@ int QDockAreaLayoutInfo::separatorMove(int index, int delta)
if (item.skip())
continue;
QLayoutStruct &ls = list[i];
- const int separatorSpace = item.hasFixedSize(o) ? 0 : sep;
+ const int separatorSpace = item.hasFixedSize(o) ? 0 : *sep;
item.size = ls.size - separatorSpace;
item.pos = ls.pos;
if (item.subinfo != 0) {
@@ -1041,11 +1043,11 @@ QLayoutItem *QDockAreaLayoutInfo::plug(const QList<int> &path)
int next = this->next(index);
if (prev != -1 && !(item_list.at(prev).flags & QDockAreaLayoutItem::GapItem)) {
- item.pos += sep;
- item.size -= sep;
+ item.pos += *sep;
+ item.size -= *sep;
}
if (next != -1 && !(item_list.at(next).flags & QDockAreaLayoutItem::GapItem))
- item.size -= sep;
+ item.size -= *sep;
QPoint pos;
rpick(o, pos) = item.pos;
@@ -1083,11 +1085,11 @@ QLayoutItem *QDockAreaLayoutInfo::unplug(const QList<int> &path)
#endif
{
if (prev != -1 && !(item_list.at(prev).flags & QDockAreaLayoutItem::GapItem)) {
- item.pos -= sep;
- item.size += sep;
+ item.pos -= *sep;
+ item.size += *sep;
}
if (next != -1 && !(item_list.at(next).flags & QDockAreaLayoutItem::GapItem))
- item.size += sep;
+ item.size += *sep;
}
return item.widgetItem;
@@ -1255,9 +1257,9 @@ bool QDockAreaLayoutInfo::insertGap(const QList<int> &path, QLayoutItem *dockWid
QRect r = dockedGeometry(dockWidgetItem->widget());
gap_size = pick(o, r.size());
if (prev != -1 && !(item_list.at(prev).flags & QDockAreaLayoutItem::GapItem))
- sep_size += sep;
+ sep_size += *sep;
if (next != -1 && !(item_list.at(next).flags & QDockAreaLayoutItem::GapItem))
- sep_size += sep;
+ sep_size += *sep;
}
if (gap_size + sep_size > space)
gap_size = pick(o, gap_item.minimumSize());
@@ -1364,7 +1366,7 @@ QRect QDockAreaLayoutInfo::separatorRect(int index) const
QPoint pos = rect.topLeft();
rpick(o, pos) = item.pos + item.size;
QSize s = rect.size();
- rpick(o, s) = sep;
+ rpick(o, s) = *sep;
return QRect(pos, s);
}
@@ -1413,7 +1415,7 @@ QList<int> QDockAreaLayoutInfo::findSeparator(const QPoint &_pos) const
continue;
QRect sepRect = separatorRect(i);
- if (!sepRect.isNull() && sep == 1)
+ if (!sepRect.isNull() && *sep == 1)
sepRect.adjust(-2, -2, 2, 2);
//we also make sure we don't find a separator that's not there
if (sepRect.contains(_pos) && !item.hasFixedSize(o)) {
@@ -1560,7 +1562,7 @@ void QDockAreaLayoutInfo::apply(bool animate)
}
}
#ifndef QT_NO_TABBAR
- if (sep == 1)
+ if (*sep == 1)
updateSeparatorWidgets();
#endif //QT_NO_TABBAR
}
@@ -1983,7 +1985,10 @@ bool QDockAreaLayoutInfo::restoreState(QDataStream &stream, QList<QDockWidget*>
emit widget->dockLocationChanged(toDockWidgetArea(dockPos));
}
}
-
+ if (testing) {
+ //was it is not really added to the layout, we need to delete the object here
+ delete item.widgetItem;
+ }
}
} else if (nextMarker == SequenceMarker) {
int dummy;
@@ -2013,7 +2018,7 @@ bool QDockAreaLayoutInfo::restoreState(QDataStream &stream, QList<QDockWidget*>
updateTabBar();
setCurrentTabId(tabId(item_list.at(index)));
}
- if (!testing && sep == 1)
+ if (!testing && *sep == 1)
updateSeparatorWidgets();
#endif
@@ -2276,13 +2281,13 @@ QDockAreaLayout::QDockAreaLayout(QMainWindow *win) : fallbackToSizeHints(true)
const int tabShape = 0;
#endif
docks[QInternal::LeftDock]
- = QDockAreaLayoutInfo(sep, QInternal::LeftDock, Qt::Vertical, tabShape, win);
+ = QDockAreaLayoutInfo(&sep, QInternal::LeftDock, Qt::Vertical, tabShape, win);
docks[QInternal::RightDock]
- = QDockAreaLayoutInfo(sep, QInternal::RightDock, Qt::Vertical, tabShape, win);
+ = QDockAreaLayoutInfo(&sep, QInternal::RightDock, Qt::Vertical, tabShape, win);
docks[QInternal::TopDock]
- = QDockAreaLayoutInfo(sep, QInternal::TopDock, Qt::Horizontal, tabShape, win);
+ = QDockAreaLayoutInfo(&sep, QInternal::TopDock, Qt::Horizontal, tabShape, win);
docks[QInternal::BottomDock]
- = QDockAreaLayoutInfo(sep, QInternal::BottomDock, Qt::Horizontal, tabShape, win);
+ = QDockAreaLayoutInfo(&sep, QInternal::BottomDock, Qt::Horizontal, tabShape, win);
centralWidgetItem = 0;
@@ -2994,8 +2999,7 @@ bool QDockAreaLayout::restoreDockWidget(QDockWidget *dockWidget)
QRect r = constrainedRect(placeHolder->topLevelRect, desktop.screenGeometry(dockWidget));
dockWidget->d_func()->setWindowState(true, true, r);
}
- dockWidget->show();
-// dockWidget->setVisible(!placeHolder->hidden);
+ dockWidget->setVisible(!placeHolder->hidden);
#ifdef Q_WS_X11
if (placeHolder->window) // gets rid of the X11BypassWindowManager window flag
dockWidget->d_func()->setWindowState(true);
@@ -3031,7 +3035,7 @@ void QDockAreaLayout::addDockWidget(QInternal::DockPosition pos, QDockWidget *do
#else
int tbshape = 0;
#endif
- QDockAreaLayoutInfo new_info(sep, pos, orientation, tbshape, mainWindow);
+ QDockAreaLayoutInfo new_info(&sep, pos, orientation, tbshape, mainWindow);
new_info.item_list.append(new QDockAreaLayoutInfo(info));
new_info.item_list.append(dockWidgetItem);
info = new_info;
@@ -3327,6 +3331,12 @@ void QDockAreaLayout::keepSize(QDockWidget *w)
item.flags |= QDockAreaLayoutItem::KeepSize;
}
+void QDockAreaLayout::styleChangedEvent()
+{
+ sep = mainWindow->style()->pixelMetric(QStyle::PM_DockWidgetSeparatorExtent, 0, mainWindow);
+ fitLayout();
+}
+
QT_END_NAMESPACE
#endif // QT_NO_DOCKWIDGET
diff --git a/src/gui/widgets/qdockarealayout_p.h b/src/gui/widgets/qdockarealayout_p.h
index 0bc1aa9eee..0088f0053b 100644
--- a/src/gui/widgets/qdockarealayout_p.h
+++ b/src/gui/widgets/qdockarealayout_p.h
@@ -128,7 +128,7 @@ class Q_AUTOTEST_EXPORT QDockAreaLayoutInfo
{
public:
QDockAreaLayoutInfo();
- QDockAreaLayoutInfo(int _sep, QInternal::DockPosition _dockPos, Qt::Orientation _o,
+ QDockAreaLayoutInfo(const int *_sep, QInternal::DockPosition _dockPos, Qt::Orientation _o,
int tbhape, QMainWindow *window);
QSize minimumSize() const;
@@ -189,7 +189,7 @@ public:
QMainWindowLayout *mainWindowLayout() const;
- int sep;
+ const int *sep;
mutable QVector<QWidget*> separatorWidgets;
QInternal::DockPosition dockPos;
Qt::Orientation o;
@@ -300,6 +300,7 @@ public:
QSet<QTabBar*> usedTabBars() const;
QSet<QWidget*> usedSeparatorWidgets() const;
#endif //QT_NO_TABBAR
+ void styleChangedEvent();
};
QT_END_NAMESPACE
diff --git a/src/gui/widgets/qdockwidget.cpp b/src/gui/widgets/qdockwidget.cpp
index fdace46ced..54189de819 100644
--- a/src/gui/widgets/qdockwidget.cpp
+++ b/src/gui/widgets/qdockwidget.cpp
@@ -1010,7 +1010,7 @@ void QDockWidgetPrivate::setWindowState(bool floating, bool unplug, const QRect
if (!floating && parent) {
QMainWindowLayout *mwlayout = qobject_cast<QMainWindowLayout *>(q->parentWidget()->layout());
- if (!mwlayout || mwlayout->dockWidgetArea(q) == Qt::NoDockWidgetArea)
+ if (mwlayout && mwlayout->dockWidgetArea(q) == Qt::NoDockWidgetArea)
return; // this dockwidget can't be redocked
}
diff --git a/src/gui/widgets/qfocusframe.cpp b/src/gui/widgets/qfocusframe.cpp
index d9cd5bb6fc..4f20bce001 100644
--- a/src/gui/widgets/qfocusframe.cpp
+++ b/src/gui/widgets/qfocusframe.cpp
@@ -53,11 +53,14 @@ class QFocusFramePrivate : public QWidgetPrivate
{
Q_DECLARE_PUBLIC(QFocusFrame)
QWidget *widget;
-
+ QWidget *frameParent;
+ bool showFrameAboveWidget;
public:
QFocusFramePrivate() {
widget = 0;
+ frameParent = 0;
sendChildEvents = false;
+ showFrameAboveWidget = false;
}
void updateSize();
void update();
@@ -66,10 +69,10 @@ public:
void QFocusFramePrivate::update()
{
Q_Q(QFocusFrame);
- q->setParent(widget->parentWidget());
+ q->setParent(frameParent);
updateSize();
if (q->parentWidget()->rect().intersects(q->geometry())) {
- if (q->style()->styleHint(QStyle::SH_FocusFrame_AboveWidget, 0, q))
+ if (showFrameAboveWidget)
q->raise();
else
q->stackUnder(widget);
@@ -84,7 +87,10 @@ void QFocusFramePrivate::updateSize()
Q_Q(QFocusFrame);
int vmargin = q->style()->pixelMetric(QStyle::PM_FocusFrameVMargin),
hmargin = q->style()->pixelMetric(QStyle::PM_FocusFrameHMargin);
- QRect geom(widget->x()-hmargin, widget->y()-vmargin,
+ QPoint pos(widget->x(), widget->y());
+ if (q->parentWidget() != widget->parentWidget())
+ pos = widget->parentWidget()->mapTo(q->parentWidget(), pos);
+ QRect geom(pos.x()-hmargin, pos.y()-vmargin,
widget->width()+(hmargin*2), widget->height()+(vmargin*2));
if(q->geometry() == geom)
return;
@@ -176,14 +182,52 @@ void
QFocusFrame::setWidget(QWidget *widget)
{
Q_D(QFocusFrame);
- if(widget == d->widget)
- return;
- if(d->widget)
- d->widget->removeEventFilter(this);
- if(widget && !widget->isWindow() && widget->parentWidget()->windowType() != Qt::SubWindow) {
+ if (style()->styleHint(QStyle::SH_FocusFrame_AboveWidget, 0, this))
+ d->showFrameAboveWidget = true;
+ else
+ d->showFrameAboveWidget = false;
+
+ if (widget == d->widget)
+ return;
+ if (d->widget) {
+ // Remove event filters from the widget hierarchy.
+ QWidget *p = d->widget;
+ do {
+ p->removeEventFilter(this);
+ if (!d->showFrameAboveWidget || p == d->frameParent)
+ break;
+ p = p->parentWidget();
+ }while (p);
+ }
+ if (widget && !widget->isWindow() && widget->parentWidget()->windowType() != Qt::SubWindow) {
d->widget = widget;
- widget->installEventFilter(this);
+ d->widget->installEventFilter(this);
+ QWidget *p = widget->parentWidget();
+ QWidget *prev = 0;
+ if (d->showFrameAboveWidget) {
+ // Find the right parent for the focus frame.
+ while (p) {
+ // Traverse the hirerarchy of the 'widget' for setting event filter.
+ // During this if come across toolbar or a top level, use that
+ // as the parent for the focus frame. If we find a scroll area
+ // use its viewport as the parent.
+ bool isScrollArea = false;
+ if (p->isWindow() || p->inherits("QToolBar") || (isScrollArea = p->inherits("QAbstractScrollArea"))) {
+ d->frameParent = p;
+ // The previous one in the hierarchy will be the viewport.
+ if (prev && isScrollArea)
+ d->frameParent = prev;
+ break;
+ } else {
+ p->installEventFilter(this);
+ prev = p;
+ p = p->parentWidget();
+ }
+ }
+ } else {
+ d->frameParent = p;
+ }
d->update();
} else {
d->widget = 0;
@@ -210,9 +254,15 @@ QFocusFrame::widget() const
void
QFocusFrame::paintEvent(QPaintEvent *)
{
+ Q_D(QFocusFrame);
QStylePainter p(this);
QStyleOption option;
initStyleOption(&option);
+ int vmargin = style()->pixelMetric(QStyle::PM_FocusFrameVMargin);
+ int hmargin = style()->pixelMetric(QStyle::PM_FocusFrameHMargin);
+ QWidgetPrivate *wd = qt_widget_private(d->widget);
+ QRect rect = wd->clipRect().adjusted(0, 0, hmargin*2, vmargin*2);
+ p.setClipRect(rect);
p.drawControl(QStyle::CE_FocusFrame, option);
}
@@ -233,7 +283,13 @@ QFocusFrame::eventFilter(QObject *o, QEvent *e)
hide();
break;
case QEvent::ParentChange:
- d->update();
+ if (d->showFrameAboveWidget) {
+ QWidget *w = d->widget;
+ setWidget(0);
+ setWidget(w);
+ } else {
+ d->update();
+ }
break;
case QEvent::Show:
d->update();
@@ -254,6 +310,19 @@ QFocusFrame::eventFilter(QObject *o, QEvent *e)
default:
break;
}
+ } else if (d->showFrameAboveWidget) {
+ // Handle changes in the parent widgets we are monitoring.
+ switch(e->type()) {
+ case QEvent::Move:
+ case QEvent::Resize:
+ d->updateSize();
+ break;
+ case QEvent::ZOrderChange:
+ raise();
+ break;
+ default:
+ break;
+ }
}
return false;
}
diff --git a/src/gui/widgets/qlabel.cpp b/src/gui/widgets/qlabel.cpp
index 8428ad7ca5..b81f04fec6 100644
--- a/src/gui/widgets/qlabel.cpp
+++ b/src/gui/widgets/qlabel.cpp
@@ -781,6 +781,95 @@ Qt::TextInteractionFlags QLabel::textInteractionFlags() const
return d->textInteractionFlags;
}
+/*!
+ Selects text from position \a start and for \a length characters.
+
+ \sa selectedText()
+
+ \bold{Note:} The textInteractionFlags set on the label need to include
+ either TextSelectableByMouse or TextSelectableByKeyboard.
+
+ \since 4.7
+*/
+void QLabel::setSelection(int start, int length)
+{
+ Q_D(QLabel);
+ if (d->control) {
+ d->ensureTextPopulated();
+ QTextCursor cursor = d->control->textCursor();
+ cursor.setPosition(start);
+ cursor.setPosition(start + length, QTextCursor::KeepAnchor);
+ d->control->setTextCursor(cursor);
+ }
+}
+
+/*!
+ \property QLabel::hasSelectedText
+ \brief whether there is any text selected
+
+ hasSelectedText() returns true if some or all of the text has been
+ selected by the user; otherwise returns false.
+
+ By default, this property is false.
+
+ \sa selectedText()
+
+ \bold{Note:} The textInteractionFlags set on the label need to include
+ either TextSelectableByMouse or TextSelectableByKeyboard.
+
+ \since 4.7
+*/
+bool QLabel::hasSelectedText() const
+{
+ Q_D(const QLabel);
+ if (d->control)
+ return d->control->textCursor().hasSelection();
+ return false;
+}
+
+/*!
+ \property QLabel::selectedText
+ \brief the selected text
+
+ If there is no selected text this property's value is
+ an empty string.
+
+ By default, this property contains an empty string.
+
+ \sa hasSelectedText()
+
+ \bold{Note:} The textInteractionFlags set on the label need to include
+ either TextSelectableByMouse or TextSelectableByKeyboard.
+
+ \since 4.7
+*/
+QString QLabel::selectedText() const
+{
+ Q_D(const QLabel);
+ if (d->control)
+ return d->control->textCursor().selectedText();
+ return QString();
+}
+
+/*!
+ selectionStart() returns the index of the first selected character in the
+ label or -1 if no text is selected.
+
+ \sa selectedText()
+
+ \bold{Note:} The textInteractionFlags set on the label need to include
+ either TextSelectableByMouse or TextSelectableByKeyboard.
+
+ \since 4.7
+*/
+int QLabel::selectionStart() const
+{
+ Q_D(const QLabel);
+ if (d->control && d->control->textCursor().hasSelection())
+ return d->control->textCursor().selectionStart();
+ return -1;
+}
+
/*!\reimp
*/
QSize QLabel::sizeHint() const
@@ -862,8 +951,8 @@ void QLabel::contextMenuEvent(QContextMenuEvent *ev)
return;
}
ev->accept();
- menu->exec(ev->globalPos());
- delete menu;
+ menu->setAttribute(Qt::WA_DeleteOnClose);
+ menu->popup(ev->globalPos());
#endif
}
diff --git a/src/gui/widgets/qlabel.h b/src/gui/widgets/qlabel.h
index d916078da6..54babb1564 100644
--- a/src/gui/widgets/qlabel.h
+++ b/src/gui/widgets/qlabel.h
@@ -65,6 +65,8 @@ class Q_GUI_EXPORT QLabel : public QFrame
Q_PROPERTY(int indent READ indent WRITE setIndent)
Q_PROPERTY(bool openExternalLinks READ openExternalLinks WRITE setOpenExternalLinks)
Q_PROPERTY(Qt::TextInteractionFlags textInteractionFlags READ textInteractionFlags WRITE setTextInteractionFlags)
+ Q_PROPERTY(bool hasSelectedText READ hasSelectedText)
+ Q_PROPERTY(QString selectedText READ selectedText)
public:
explicit QLabel(QWidget *parent=0, Qt::WindowFlags f=0);
@@ -111,6 +113,11 @@ public:
void setTextInteractionFlags(Qt::TextInteractionFlags flags);
Qt::TextInteractionFlags textInteractionFlags() const;
+ void setSelection(int, int);
+ bool hasSelectedText() const;
+ QString selectedText() const;
+ int selectionStart() const;
+
public Q_SLOTS:
void setText(const QString &);
void setPixmap(const QPixmap &);
diff --git a/src/gui/widgets/qlabel_p.h b/src/gui/widgets/qlabel_p.h
index 21eb128f59..fba72240b1 100644
--- a/src/gui/widgets/qlabel_p.h
+++ b/src/gui/widgets/qlabel_p.h
@@ -55,7 +55,7 @@
#include "qlabel.h"
-#include "../text/qtextdocumentlayout_p.h"
+#include "private/qtextdocumentlayout_p.h"
#include "private/qtextcontrol_p.h"
#include "qtextdocumentfragment.h"
#include "qframe_p.h"
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index db099e8a5b..9ec0feb851 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE
Updates the display text based of the current edit text
If the text has changed will emit displayTextChanged()
*/
-void QLineControl::updateDisplayText()
+void QLineControl::updateDisplayText(bool forceUpdate)
{
QString orig = m_textLayout.text();
QString str;
@@ -102,7 +102,7 @@ void QLineControl::updateDisplayText()
m_textLayout.endLayout();
m_ascent = qRound(l.ascent());
- if (str != orig)
+ if (str != orig || forceUpdate)
emit displayTextChanged(str);
}
@@ -476,7 +476,7 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event)
}
}
m_textLayout.setAdditionalFormats(formats);
- updateDisplayText();
+ updateDisplayText(/*force*/ true);
if (cursorPositionChanged)
emitCursorPositionChanged();
if (isGettingInput)
diff --git a/src/gui/widgets/qlinecontrol_p.h b/src/gui/widgets/qlinecontrol_p.h
index d6f270541e..3f1bc2c605 100644
--- a/src/gui/widgets/qlinecontrol_p.h
+++ b/src/gui/widgets/qlinecontrol_p.h
@@ -239,7 +239,7 @@ private:
void init(const QString &txt);
void removeSelectedText();
void internalSetText(const QString &txt, int pos = -1, bool edited = true);
- void updateDisplayText();
+ void updateDisplayText(bool forceUpdate = false);
void internalInsert(const QString &s);
void internalDelete(bool wasBackspace = false);
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index 2d2df92278..817547ca7d 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -383,8 +383,6 @@ void QLineEdit::setText(const QString& text)
d->control->setText(text);
}
-// ### Qt 4.7: remove this #if guard
-#if (QT_VERSION >= 0x407000) || defined(Q_WS_MAEMO_5)
/*!
\since 4.7
@@ -414,7 +412,6 @@ void QLineEdit::setPlaceholderText(const QString& placeholderText)
update();
}
}
-#endif
/*!
\property QLineEdit::displayText
@@ -542,11 +539,16 @@ void QLineEdit::setEchoMode(EchoMode mode)
if (mode == (EchoMode)d->control->echoMode())
return;
Qt::InputMethodHints imHints = inputMethodHints();
- if (mode == Password) {
+ if (mode == Password || mode == NoEcho) {
imHints |= Qt::ImhHiddenText;
} else {
imHints &= ~Qt::ImhHiddenText;
}
+ if (mode != Normal) {
+ imHints |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText);
+ } else {
+ imHints &= ~(Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText);
+ }
setInputMethodHints(imHints);
d->control->setEchoMode(mode);
update();
@@ -1637,12 +1639,8 @@ void QLineEdit::keyPressEvent(QKeyEvent *event)
if (!hasEditFocus() && !(event->modifiers() & Qt::ControlModifier)) {
if (!event->text().isEmpty() && event->text().at(0).isPrint()
&& !isReadOnly())
- {
setEditFocus(true);
-#ifndef Q_OS_SYMBIAN
- clear();
-#endif
- } else {
+ else {
event->ignore();
return;
}
@@ -1698,12 +1696,8 @@ void QLineEdit::inputMethodEvent(QInputMethodEvent *e)
// commit text as they focus out without interfering with focus
if (QApplication::keypadNavigationEnabled()
&& hasFocus() && !hasEditFocus()
- && !e->preeditString().isEmpty()) {
+ && !e->preeditString().isEmpty())
setEditFocus(true);
-#ifndef Q_OS_SYMBIAN
- selectAll(); // so text is replaced rather than appended to
-#endif
- }
#endif
d->control->processInputMethodEvent(e);
@@ -2046,9 +2040,10 @@ void QLineEdit::dropEvent(QDropEvent* e)
*/
void QLineEdit::contextMenuEvent(QContextMenuEvent *event)
{
- QPointer<QMenu> menu = createStandardContextMenu();
- menu->exec(event->globalPos());
- delete menu;
+ if (QMenu *menu = createStandardContextMenu()) {
+ menu->setAttribute(Qt::WA_DeleteOnClose);
+ menu->popup(event->globalPos());
+ }
}
#if defined(Q_WS_WIN)
diff --git a/src/gui/widgets/qlineedit.h b/src/gui/widgets/qlineedit.h
index fa04bfc73c..94e0dbe6dc 100644
--- a/src/gui/widgets/qlineedit.h
+++ b/src/gui/widgets/qlineedit.h
@@ -83,10 +83,7 @@ class Q_GUI_EXPORT QLineEdit : public QWidget
Q_PROPERTY(bool undoAvailable READ isUndoAvailable)
Q_PROPERTY(bool redoAvailable READ isRedoAvailable)
Q_PROPERTY(bool acceptableInput READ hasAcceptableInput)
-// ### Qt 4.7: remove this #if guard
-#if (QT_VERSION >= 0x407000) || defined(Q_WS_MAEMO_5)
Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText)
-#endif
public:
explicit QLineEdit(QWidget* parent=0);
@@ -102,11 +99,8 @@ public:
QString displayText() const;
-// ### Qt 4.7: remove this #if guard
-#if (QT_VERSION >= 0x407000) || defined(Q_WS_MAEMO_5)
QString placeholderText() const;
void setPlaceholderText(const QString &);
-#endif
int maxLength() const;
void setMaxLength(int);
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp
index 16a7c31423..d2eda80166 100644
--- a/src/gui/widgets/qmainwindow.cpp
+++ b/src/gui/widgets/qmainwindow.cpp
@@ -1374,6 +1374,7 @@ bool QMainWindow::event(QEvent *event)
#endif // QT_NO_STATUSTIP
case QEvent::StyleChange:
+ d->layout->layoutState.dockAreaLayout.styleChangedEvent();
if (!d->explicitIconSize)
setIconSize(QSize());
break;
@@ -1453,7 +1454,8 @@ void QMainWindow::setUnifiedTitleAndToolBarOnMac(bool set)
return;
// ### Disable the unified toolbar when using anything but the native graphics system.
- if (windowSurface())
+ // ### Disable when using alien widgets as well
+ if (windowSurface() || testAttribute(Qt::WA_NativeWindow) == false)
return;
d->useHIToolBar = set;
@@ -1535,11 +1537,15 @@ void QMainWindow::contextMenuEvent(QContextMenuEvent *event)
#ifndef QT_NO_MENU
QMenu *popup = createPopupMenu();
- if (popup && !popup->isEmpty()) {
- popup->exec(event->globalPos());
- event->accept();
+ if (popup) {
+ if (!popup->isEmpty()) {
+ popup->setAttribute(Qt::WA_DeleteOnClose);
+ popup->popup(event->globalPos());
+ event->accept();
+ } else {
+ delete popup;
+ }
}
- delete popup;
#endif
}
#endif // QT_NO_CONTEXTMENU
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index 42b7406ba8..ebc05d9726 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -85,9 +85,8 @@
QT_BEGIN_NAMESPACE
-QPointer<QMenu> QMenuPrivate::mouseDown;
-QBasicTimer QMenuPrivate::menuDelayTimer;
-QBasicTimer QMenuPrivate::sloppyDelayTimer;
+QMenu *QMenuPrivate::mouseDown = 0;
+int QMenuPrivate::sloppyDelayTimer = 0;
/* QMenu code */
// internal class used for the torn off popup
@@ -261,9 +260,6 @@ void QMenuPrivate::updateActionRects() const
icone = style->pixelMetric(QStyle::PM_SmallIconSize, &opt, q);
const int fw = style->pixelMetric(QStyle::PM_MenuPanelWidth, &opt, q);
const int deskFw = style->pixelMetric(QStyle::PM_MenuDesktopFrameWidth, &opt, q);
-
- const int sfcMargin = style->sizeFromContents(QStyle::CT_Menu, &opt, QApplication::globalStrut(), q).width() - QApplication::globalStrut().width();
- const int min_column_width = q->minimumWidth() - (sfcMargin + leftmargin + rightmargin + 2 * (fw + hmargin));
const int tearoffHeight = tearoff ? style->pixelMetric(QStyle::PM_MenuTearoffHeight, &opt, q) : 0;
//for compatability now - will have to refactor this away..
@@ -337,7 +333,7 @@ void QMenuPrivate::updateActionRects() const
if (!sz.isEmpty()) {
- max_column_width = qMax(min_column_width, qMax(max_column_width, sz.width()));
+ max_column_width = qMax(max_column_width, sz.width());
//wrapping
if (!scroll &&
y+sz.height()+vmargin > dh - (deskFw * 2)) {
@@ -351,6 +347,10 @@ void QMenuPrivate::updateActionRects() const
}
max_column_width += tabWidth; //finally add in the tab width
+ const int sfcMargin = style->sizeFromContents(QStyle::CT_Menu, &opt, QApplication::globalStrut(), q).width() - QApplication::globalStrut().width();
+ const int min_column_width = q->minimumWidth() - (sfcMargin + leftmargin + rightmargin + 2 * (fw + hmargin));
+ max_column_width = qMax(min_column_width, max_column_width);
+
//calculate position
const int base_y = vmargin + fw + topmargin +
@@ -487,8 +487,8 @@ void QMenuPrivate::popupAction(QAction *action, int delay, bool activateFirst)
if (action && action->isEnabled()) {
if (!delay)
q->internalDelayedPopup();
- else
- QMenuPrivate::menuDelayTimer.start(delay, q);
+ else if (!menuDelayTimer.isActive() && (!action->menu() || !action->menu()->isVisible()))
+ menuDelayTimer.start(delay, q);
if (activateFirst && action->menu())
action->menu()->d_func()->setFirstActionActive();
} else if (QMenu *menu = activeMenu) { //hide the current item
@@ -543,15 +543,6 @@ void QMenuPrivate::setCurrentAction(QAction *action, int popup, SelectionReason
{
Q_Q(QMenu);
tearoffHighlighted = 0;
- if (action == currentAction) {
- if (!action || !action->menu() || action->menu() == activeMenu) {
- if(QMenu *menu = qobject_cast<QMenu*>(causedPopup.widget)) {
- if(causedPopup.action && menu->d_func()->activeMenu == q)
- menu->d_func()->setCurrentAction(causedPopup.action, 0, reason, false);
- }
- }
- return;
- }
if (currentAction)
q->update(actionRect(currentAction));
@@ -565,6 +556,7 @@ void QMenuPrivate::setCurrentAction(QAction *action, int popup, SelectionReason
#ifdef QT3_SUPPORT
emitHighlighted = action;
#endif
+
currentAction = action;
if (action) {
if (!action->isSeparator()) {
@@ -2309,9 +2301,7 @@ void QMenu::mouseReleaseEvent(QMouseEvent *e)
QAction *action = d->actionAt(e->pos());
if (action && action == d->currentAction) {
- if (action->menu())
- action->menu()->d_func()->setFirstActionActive();
- else {
+ if (!action->menu()){
#if defined(Q_WS_WIN)
//On Windows only context menus can be activated with the right button
if (e->button() == Qt::LeftButton || d->topCausedWidget() == 0)
@@ -2385,8 +2375,8 @@ QMenu::event(QEvent *e)
}
} break;
case QEvent::ContextMenu:
- if(QMenuPrivate::menuDelayTimer.isActive()) {
- QMenuPrivate::menuDelayTimer.stop();
+ if(d->menuDelayTimer.isActive()) {
+ d->menuDelayTimer.stop();
internalDelayedPopup();
}
break;
@@ -2819,7 +2809,7 @@ void QMenu::mouseMoveEvent(QMouseEvent *e)
}
if (d->sloppyRegion.contains(e->pos())) {
d->sloppyAction = action;
- QMenuPrivate::sloppyDelayTimer.start(style()->styleHint(QStyle::SH_Menu_SubMenuPopupDelay, 0, this)*6, this);
+ QMenuPrivate::sloppyDelayTimer = startTimer(style()->styleHint(QStyle::SH_Menu_SubMenuPopupDelay, 0, this)*6);
} else {
d->setCurrentAction(action, style()->styleHint(QStyle::SH_Menu_SubMenuPopupDelay, 0, this));
}
@@ -2857,11 +2847,12 @@ QMenu::timerEvent(QTimerEvent *e)
d->scrollMenu((QMenuPrivate::QMenuScroller::ScrollDirection)d->scroll->scrollDirection);
if (d->scroll->scrollFlags == QMenuPrivate::QMenuScroller::ScrollNone)
d->scroll->scrollTimer.stop();
- } else if(QMenuPrivate::menuDelayTimer.timerId() == e->timerId()) {
- QMenuPrivate::menuDelayTimer.stop();
+ } else if(d->menuDelayTimer.timerId() == e->timerId()) {
+ d->menuDelayTimer.stop();
internalDelayedPopup();
- } else if(QMenuPrivate::sloppyDelayTimer.timerId() == e->timerId()) {
- QMenuPrivate::sloppyDelayTimer.stop();
+ } else if(QMenuPrivate::sloppyDelayTimer == e->timerId()) {
+ killTimer(QMenuPrivate::sloppyDelayTimer);
+ QMenuPrivate::sloppyDelayTimer = 0;
internalSetSloppyAction();
} else if(d->searchBufferTimer.timerId() == e->timerId()) {
d->searchBuffer.clear();
diff --git a/src/gui/widgets/qmenu.h b/src/gui/widgets/qmenu.h
index 47dff2b4ee..a040afab17 100644
--- a/src/gui/widgets/qmenu.h
+++ b/src/gui/widgets/qmenu.h
@@ -417,6 +417,7 @@ private:
friend OSStatus qt_mac_menu_event(EventHandlerCallRef, EventRef, void *);
friend bool qt_mac_activate_action(OSMenuRef, uint, QAction::ActionEvent, bool);
friend void qt_mac_emit_menuSignals(QMenu *, bool);
+ friend void qt_mac_menu_emit_hovered(QMenu *menu, QAction *action);
#endif
};
diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm
index 7e4bbb51ad..43722a1f96 100644
--- a/src/gui/widgets/qmenu_mac.mm
+++ b/src/gui/widgets/qmenu_mac.mm
@@ -247,7 +247,7 @@ bool qt_mac_activate_action(MenuRef menu, uint command, QAction::ActionEvent act
//now walk up firing for each "caused" widget (like in the platform independent menu)
QWidget *caused = 0;
- if (GetMenuItemProperty(menu, 0, kMenuCreatorQt, kMenuPropertyCausedQWidget, sizeof(caused), 0, &caused) == noErr) {
+ if (action_e == QAction::Hover && GetMenuItemProperty(menu, 0, kMenuCreatorQt, kMenuPropertyCausedQWidget, sizeof(caused), 0, &caused) == noErr) {
MenuRef caused_menu = 0;
if (QMenu *qmenu2 = qobject_cast<QMenu*>(caused))
caused_menu = qmenu2->macMenu();
@@ -260,25 +260,17 @@ bool qt_mac_activate_action(MenuRef menu, uint command, QAction::ActionEvent act
QWidget *widget = 0;
GetMenuItemProperty(caused_menu, 0, kMenuCreatorQt, kMenuPropertyQWidget, sizeof(widget), 0, &widget);
if (QMenu *qmenu = qobject_cast<QMenu*>(widget)) {
- if (action_e == QAction::Trigger) {
- emit qmenu->triggered(action->action);
- } else if (action_e == QAction::Hover) {
- action->action->showStatusText(widget);
- emit qmenu->hovered(action->action);
- }
+ action->action->showStatusText(widget);
+ emit qmenu->hovered(action->action);
} else if (QMenuBar *qmenubar = qobject_cast<QMenuBar*>(widget)) {
- if (action_e == QAction::Trigger) {
- emit qmenubar->triggered(action->action);
- } else if (action_e == QAction::Hover) {
- action->action->showStatusText(widget);
- emit qmenubar->hovered(action->action);
- }
+ action->action->showStatusText(widget);
+ emit qmenubar->hovered(action->action);
break; //nothing more..
}
//walk up
if (GetMenuItemProperty(caused_menu, 0, kMenuCreatorQt, kMenuPropertyCausedQWidget,
- sizeof(caused), 0, &caused) != noErr)
+ sizeof(caused), 0, &caused) != noErr)
break;
if (QMenu *qmenu2 = qobject_cast<QMenu*>(caused))
caused_menu = qmenu2->macMenu();
@@ -649,7 +641,7 @@ static NSMenuItem *createNSMenuItem(const QString &title)
NSMenuItem *item = [[NSMenuItem alloc]
initWithTitle:qt_mac_QStringToNSString(title)
action:@selector(qtDispatcherToQAction:) keyEquivalent:@""];
- [item setTarget:getMenuLoader()];
+ [item setTarget:nil];
return item;
}
#endif
@@ -749,32 +741,6 @@ bool qt_mac_menubar_is_open()
return qt_mac_menus_open_count > 0;
}
-void qt_mac_clear_menubar()
-{
- if (QApplication::testAttribute(Qt::AA_MacPluginApplication))
- return;
-
-#ifndef QT_MAC_USE_COCOA
- MenuRef clear_menu = 0;
- if (CreateNewMenu(0, 0, &clear_menu) == noErr) {
- SetRootMenu(clear_menu);
- ReleaseMenu(clear_menu);
- } else {
- qWarning("QMenu: Internal error at %s:%d", __FILE__, __LINE__);
- }
- ClearMenuBar();
- qt_mac_command_set_enabled(0, kHICommandPreferences, false);
- InvalMenuBar();
-#else
- QMacCocoaAutoReleasePool pool;
- QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *loader = getMenuLoader();
- NSMenu *menu = [loader menu];
- [loader ensureAppMenuInMenu:menu];
- [NSApp setMainMenu:menu];
-#endif
-}
-
-
QMacMenuAction::~QMacMenuAction()
{
#ifdef QT_MAC_USE_COCOA
@@ -958,14 +924,27 @@ static QString qt_mac_menu_merge_text(QMacMenuAction *action)
else if (action->command == kHICommandQuit)
ret = QMenuBar::tr("Quit %1").arg(qAppName());
#else
- else if (action->menuItem == [loader aboutMenuItem])
- ret = QMenuBar::tr("About %1").arg(qAppName());
- else if (action->menuItem == [loader aboutQtMenuItem])
- ret = QMenuBar::tr("About Qt");
- else if (action->menuItem == [loader preferencesMenuItem])
- ret = QMenuBar::tr("Preferences");
- else if (action->menuItem == [loader quitMenuItem])
- ret = QMenuBar::tr("Quit %1").arg(qAppName());
+ else if (action->menuItem == [loader aboutMenuItem]) {
+ if (action->action->text() == QString("About %1").arg(qAppName()))
+ ret = QMenuBar::tr("About %1").arg(qAppName());
+ else
+ ret = action->action->text();
+ } else if (action->menuItem == [loader aboutQtMenuItem]) {
+ if (action->action->text() == QString("About Qt"))
+ ret = QMenuBar::tr("About Qt");
+ else
+ ret = action->action->text();
+ } else if (action->menuItem == [loader preferencesMenuItem]) {
+ if (action->action->text() == QString("Preferences"))
+ ret = QMenuBar::tr("Preferences");
+ else
+ ret = action->action->text();
+ } else if (action->menuItem == [loader quitMenuItem]) {
+ if (action->action->text() == QString("Quit %1").arg(qAppName()))
+ ret = QMenuBar::tr("About %1").arg(qAppName());
+ else
+ ret = action->action->text();
+ }
#endif
return ret;
}
@@ -1130,7 +1109,7 @@ QMenuPrivate::QMacMenuPrivate::addAction(QMacMenuAction *action, QMacMenuAction
action->menu = merge;
[cmd retain];
[cmd setAction:@selector(qtDispatcherToQAction:)];
- [cmd setTarget:getMenuLoader()];
+ [cmd setTarget:nil];
[action->menuItem release];
action->menuItem = cmd;
QMenuMergeList *list = QMenuPrivate::mergeMenuItemsHash.value(merge);
@@ -1936,43 +1915,53 @@ static bool qt_mac_is_ancestor(QWidget* possibleAncestor, QWidget *child)
Returns true if the entries of menuBar should be disabled,
based on the modality type of modalWidget.
*/
-static bool qt_mac_should_disable_menu(QMenuBar *menuBar, QWidget *modalWidget)
+static bool qt_mac_should_disable_menu(QMenuBar *menuBar)
{
- if (modalWidget == 0 || menuBar == 0)
+ QWidget *modalWidget = qApp->activeModalWidget();
+ if (!modalWidget)
return false;
- // If there is an application modal window on
- // screen, the entries of the menubar should be disabled:
+ if (menuBar && menuBar == menubars()->value(modalWidget))
+ // The menu bar is owned by the modal widget.
+ // In that case we should enable it:
+ return false;
+
+ // When there is an application modal window on screen, the entries of
+ // the menubar should be disabled. The exception in Qt is that if the
+ // modal window is the only window on screen, then we enable the menu bar.
QWidget *w = modalWidget;
+ QWidgetList topLevelWidgets = QApplication::topLevelWidgets();
while (w) {
- if (w->isVisible() && w->windowModality() == Qt::ApplicationModal)
- return true;
+ if (w->isVisible() && w->windowModality() == Qt::ApplicationModal) {
+ for (int i=0; i<topLevelWidgets.size(); ++i) {
+ QWidget *top = topLevelWidgets.at(i);
+ if (w != top && top->isVisible()) {
+ // INVARIANT: we found another visible window
+ // on screen other than our modalWidget. We therefore
+ // disable the menu bar to follow normal modality logic:
+ return true;
+ }
+ }
+ // INVARIANT: We have only one window on screen that happends
+ // to be application modal. We choose to enable the menu bar
+ // in that case to e.g. enable the quit menu item.
+ return false;
+ }
w = w->parentWidget();
}
// INVARIANT: modalWidget is window modal. Disable menu entries
- // if the menu bar belongs to an ancestor of modalWidget:
- return qt_mac_is_ancestor(menuBar->parentWidget(), modalWidget);
+ // if the menu bar belongs to an ancestor of modalWidget. If menuBar
+ // is nil, we understand it as the default menu bar set by the nib:
+ return menuBar ? qt_mac_is_ancestor(menuBar->parentWidget(), modalWidget) : false;
}
-/*!
- \internal
-
- This function will update the current menu bar and set it as the
- active menu bar in the Menu Manager.
-
- \warning This function is not portable.
-
- \sa QMenu::macMenu(), QMenuBar::macMenu()
-*/
-bool QMenuBar::macUpdateMenuBar()
+static QWidget *findWindowThatShouldDisplayMenubar()
{
- cancelAllMenuTracking();
- QMenuBar *mb = 0;
- //find a menu bar
QWidget *w = qApp->activeWindow();
-
if (!w) {
+ // We have no active window on screen. Try to
+ // find a window from the list of top levels:
QWidgetList tlws = QApplication::topLevelWidgets();
for(int i = 0; i < tlws.size(); ++i) {
QWidget *tlw = tlws.at(i);
@@ -1983,6 +1972,12 @@ bool QMenuBar::macUpdateMenuBar()
}
}
}
+ return w;
+}
+
+static QMenuBar *findMenubarForWindow(QWidget *w)
+{
+ QMenuBar *mb = 0;
if (w) {
mb = menubars()->value(w);
#ifndef QT_NO_MAINWINDOW
@@ -1996,11 +1991,77 @@ bool QMenuBar::macUpdateMenuBar()
while(w && !mb)
mb = menubars()->value((w = w->parentWidget()));
}
- if (!mb)
+
+ if (!mb) {
+ // We could not find a menu bar for the window. Lets
+ // check if we have a global (parentless) menu bar instead:
mb = fallback;
- //now set it
+ }
+
+ return mb;
+}
+
+void qt_mac_clear_menubar()
+{
+ if (QApplication::testAttribute(Qt::AA_MacPluginApplication))
+ return;
+
+#ifndef QT_MAC_USE_COCOA
+ MenuRef clear_menu = 0;
+ if (CreateNewMenu(0, 0, &clear_menu) == noErr) {
+ SetRootMenu(clear_menu);
+ ReleaseMenu(clear_menu);
+ } else {
+ qWarning("QMenu: Internal error at %s:%d", __FILE__, __LINE__);
+ }
+ ClearMenuBar();
+ qt_mac_command_set_enabled(0, kHICommandPreferences, false);
+ InvalMenuBar();
+#else
+ QMacCocoaAutoReleasePool pool;
+ QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *loader = getMenuLoader();
+ NSMenu *menu = [loader menu];
+ [loader ensureAppMenuInMenu:menu];
+ [NSApp setMainMenu:menu];
+ const bool modal = qt_mac_should_disable_menu(0);
+ if (qt_mac_current_menubar.qmenubar || modal != qt_mac_current_menubar.modal)
+ qt_mac_set_modal_state(menu, modal);
+ qt_mac_current_menubar.qmenubar = 0;
+ qt_mac_current_menubar.modal = modal;
+#endif
+}
+
+/*!
+ \internal
+
+ This function will update the current menu bar and set it as the
+ active menu bar in the Menu Manager.
+
+ \warning This function is not portable.
+
+ \sa QMenu::macMenu(), QMenuBar::macMenu()
+*/
+bool QMenuBar::macUpdateMenuBar()
+{
+#ifdef QT_MAC_USE_COCOA
+ QMacCocoaAutoReleasePool pool;
+ if (!qt_cocoaPostMessage(getMenuLoader(), @selector(qtUpdateMenubar)))
+ return QMenuBarPrivate::macUpdateMenuBarImmediatly();
+ return true;
+#else
+ return QMenuBarPrivate::macUpdateMenuBarImmediatly();
+#endif
+}
+
+bool QMenuBarPrivate::macUpdateMenuBarImmediatly()
+{
bool ret = false;
+ cancelAllMenuTracking();
+ QWidget *w = findWindowThatShouldDisplayMenubar();
+ QMenuBar *mb = findMenubarForWindow(w);
+
if (mb && mb->isNativeMenuBar()) {
+ bool modal = QApplicationPrivate::modalState();
#ifdef QT_MAC_USE_COCOA
QMacCocoaAutoReleasePool pool;
#endif
@@ -2030,16 +2091,18 @@ bool QMenuBar::macUpdateMenuBar()
}
}
#endif
- QWidget *modalWidget = qApp->activeModalWidget();
- if (mb != menubars()->value(modalWidget)) {
- qt_mac_set_modal_state(menu, qt_mac_should_disable_menu(mb, modalWidget));
- }
+ // Check if menu is modally shaddowed and should be disabled:
+ modal = qt_mac_should_disable_menu(mb);
+ if (mb != qt_mac_current_menubar.qmenubar || modal != qt_mac_current_menubar.modal)
+ qt_mac_set_modal_state(menu, modal);
}
qt_mac_current_menubar.qmenubar = mb;
- qt_mac_current_menubar.modal = QApplicationPrivate::modalState();
+ qt_mac_current_menubar.modal = modal;
ret = true;
} else if (qt_mac_current_menubar.qmenubar && qt_mac_current_menubar.qmenubar->isNativeMenuBar()) {
- const bool modal = QApplicationPrivate::modalState();
+ // INVARIANT: The currently active menu bar (if any) is not native. But we do have a
+ // native menu bar from before. So we need to decide whether or not is should be enabled:
+ const bool modal = qt_mac_should_disable_menu(qt_mac_current_menubar.qmenubar);
if (modal != qt_mac_current_menubar.modal) {
ret = true;
if (OSMenuRef menu = qt_mac_current_menubar.qmenubar->macMenu()) {
@@ -2051,16 +2114,15 @@ bool QMenuBar::macUpdateMenuBar()
[NSApp setMainMenu:menu];
syncMenuBarItemsVisiblity(qt_mac_current_menubar.qmenubar->d_func()->mac_menubar);
#endif
- QWidget *modalWidget = qApp->activeModalWidget();
- if (qt_mac_current_menubar.qmenubar != menubars()->value(modalWidget)) {
- qt_mac_set_modal_state(menu, qt_mac_should_disable_menu(mb, modalWidget));
- }
+ qt_mac_set_modal_state(menu, modal);
}
qt_mac_current_menubar.modal = modal;
}
}
- if(!ret)
+
+ if (!ret) {
qt_mac_clear_menubar();
+ }
return ret;
}
@@ -2131,3 +2193,4 @@ static OSMenuRef qt_mac_create_menu(QWidget *w)
QT_END_NAMESPACE
+
diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h
index 495872cd41..39cbbd8422 100644
--- a/src/gui/widgets/qmenu_p.h
+++ b/src/gui/widgets/qmenu_p.h
@@ -202,7 +202,7 @@ public:
bool activationRecursionGuard;
//selection
- static QPointer<QMenu> mouseDown;
+ static QMenu *mouseDown;
QPoint mousePopupPos;
uint hasHadMouse : 1;
uint aboutToHide : 1;
@@ -212,7 +212,7 @@ public:
QAction *selectAction;
QAction *cancelAction;
#endif
- static QBasicTimer menuDelayTimer;
+ QBasicTimer menuDelayTimer;
enum SelectionReason {
SelectedFromKeyboard,
SelectedFromElsewhere
@@ -272,7 +272,7 @@ public:
mutable bool hasCheckableItems;
//sloppy selection
- static QBasicTimer sloppyDelayTimer;
+ static int sloppyDelayTimer;
mutable QAction *sloppyAction;
QRegion sloppyRegion;
diff --git a/src/gui/widgets/qmenubar_p.h b/src/gui/widgets/qmenubar_p.h
index e4db6ce275..82070feaa5 100644
--- a/src/gui/widgets/qmenubar_p.h
+++ b/src/gui/widgets/qmenubar_p.h
@@ -196,6 +196,7 @@ public:
return 0;
}
} *mac_menubar;
+ static bool macUpdateMenuBarImmediatly();
bool macWidgetHasNativeMenubar(QWidget *widget);
void macCreateMenuBar(QWidget *);
void macDestroyMenuBar();
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index ab598d9121..ef9fac382d 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -911,6 +911,7 @@ void QPlainTextEditPrivate::pageUpDown(QTextCursor::MoveOperation op, QTextCurso
setTopBlock(block.blockNumber(), line);
if (moveCursor) {
+ cursor.setVisualNavigation(true);
// move using movePosition to keep the cursor's x
lastY += verticalOffset();
bool moved = false;
@@ -1319,6 +1320,26 @@ QTextCursor QPlainTextEdit::textCursor() const
return d->control->textCursor();
}
+/*!
+ Returns the reference of the anchor at position \a pos, or an
+ empty string if no anchor exists at that point.
+
+ \since 4.7
+ */
+QString QPlainTextEdit::anchorAt(const QPoint &pos) const
+{
+ Q_D(const QPlainTextEdit);
+ int cursorPos = d->control->hitTest(pos + QPoint(d->horizontalOffset(),
+ d->verticalOffset()),
+ Qt::ExactHit);
+ if (cursorPos < 0)
+ return QString();
+
+ QTextDocumentPrivate *pieceTable = document()->docHandle();
+ QTextDocumentPrivate::FragmentIterator it = pieceTable->find(cursorPos);
+ QTextCharFormat fmt = pieceTable->formatCollection()->charFormat(it->format);
+ return fmt.anchorHref();
+}
/*!
Undoes the last operation.
@@ -2393,7 +2414,7 @@ void QPlainTextEdit::setReadOnly(bool ro)
then the focus policy is also automatically set to Qt::ClickFocus.
The default value depends on whether the QPlainTextEdit is read-only
- or editable, and whether it is a QTextBrowser or not.
+ or editable.
*/
void QPlainTextEdit::setTextInteractionFlags(Qt::TextInteractionFlags flags)
diff --git a/src/gui/widgets/qplaintextedit.h b/src/gui/widgets/qplaintextedit.h
index 15cf096732..106ae6d853 100644
--- a/src/gui/widgets/qplaintextedit.h
+++ b/src/gui/widgets/qplaintextedit.h
@@ -159,6 +159,8 @@ public:
QRect cursorRect(const QTextCursor &cursor) const;
QRect cursorRect() const;
+ QString anchorAt(const QPoint &pos) const;
+
bool overwriteMode() const;
void setOverwriteMode(bool overwrite);
diff --git a/src/gui/widgets/qradiobutton.cpp b/src/gui/widgets/qradiobutton.cpp
index d73ff2f993..20b6c7202e 100644
--- a/src/gui/widgets/qradiobutton.cpp
+++ b/src/gui/widgets/qradiobutton.cpp
@@ -195,7 +195,7 @@ QSize QRadioButton::sizeHint() const
ensurePolished();
QStyleOptionButton opt;
initStyleOption(&opt);
- QSize sz = style()->itemTextRect(fontMetrics(), QRect(0, 0, 1, 1), Qt::TextShowMnemonic,
+ QSize sz = style()->itemTextRect(fontMetrics(), QRect(), Qt::TextShowMnemonic,
false, text()).size();
if (!opt.icon.isNull())
sz = QSize(sz.width() + opt.iconSize.width() + 4, qMax(sz.height(), opt.iconSize.height()));
diff --git a/src/gui/widgets/qscrollbar.cpp b/src/gui/widgets/qscrollbar.cpp
index 4eff260588..c0eeb2fd69 100644
--- a/src/gui/widgets/qscrollbar.cpp
+++ b/src/gui/widgets/qscrollbar.cpp
@@ -523,6 +523,7 @@ bool QScrollBar::event(QEvent *event)
break;
#ifndef QT_NO_WHEELEVENT
case QEvent::Wheel: {
+ event->ignore();
// override wheel event without adding virtual function override
QWheelEvent *ev = static_cast<QWheelEvent *>(event);
int delta = ev->delta();
diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp
index 22e825561b..7559311db6 100644
--- a/src/gui/widgets/qtabbar.cpp
+++ b/src/gui/widgets/qtabbar.cpp
@@ -1947,7 +1947,8 @@ void QTabBar::changeEvent(QEvent *event)
{
Q_D(QTabBar);
if (event->type() == QEvent::StyleChange) {
- d->elideMode = Qt::TextElideMode(style()->styleHint(QStyle::SH_TabBar_ElideMode, 0, this));
+ if (!d->elideModeSetByUser)
+ d->elideMode = Qt::TextElideMode(style()->styleHint(QStyle::SH_TabBar_ElideMode, 0, this));
if (!d->useScrollButtonsSetByUser)
d->useScrollButtons = !style()->styleHint(QStyle::SH_TabBar_PreferNoArrows, 0, this);
d->refresh();
@@ -1980,6 +1981,7 @@ void QTabBar::setElideMode(Qt::TextElideMode mode)
{
Q_D(QTabBar);
d->elideMode = mode;
+ d->elideModeSetByUser = true;
d->refresh();
}
diff --git a/src/gui/widgets/qtabbar_p.h b/src/gui/widgets/qtabbar_p.h
index 7588035961..83636e6b13 100644
--- a/src/gui/widgets/qtabbar_p.h
+++ b/src/gui/widgets/qtabbar_p.h
@@ -75,7 +75,7 @@ class QTabBarPrivate : public QWidgetPrivate
public:
QTabBarPrivate()
:currentIndex(-1), pressedIndex(-1), shape(QTabBar::RoundedNorth), layoutDirty(false),
- drawBase(true), scrollOffset(0), useScrollButtonsSetByUser(false) , expanding(true), closeButtonOnTabs(false),
+ drawBase(true), scrollOffset(0), elideModeSetByUser(false), useScrollButtonsSetByUser(false), expanding(true), closeButtonOnTabs(false),
selectionBehaviorOnRemove(QTabBar::SelectRightTab), paintWithOffsets(true), movable(false),
dragInProgress(false), documentMode(false), movingTab(0)
#ifdef Q_WS_MAC
@@ -186,6 +186,7 @@ public:
void makeVisible(int index);
QSize iconSize;
Qt::TextElideMode elideMode;
+ bool elideModeSetByUser;
bool useScrollButtons;
bool useScrollButtonsSetByUser;
diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp
index b6886b4a40..45417307fc 100644
--- a/src/gui/widgets/qtextedit.cpp
+++ b/src/gui/widgets/qtextedit.cpp
@@ -1212,12 +1212,9 @@ void QTextEdit::keyPressEvent(QKeyEvent *e)
default:
if (QApplication::keypadNavigationEnabled()) {
if (!hasEditFocus() && !(e->modifiers() & Qt::ControlModifier)) {
- if (e->text()[0].isPrint()) {
+ if (e->text()[0].isPrint())
setEditFocus(true);
-#ifndef Q_OS_SYMBIAN
- clear();
-#endif
- } else {
+ else {
e->ignore();
return;
}
@@ -1677,12 +1674,8 @@ void QTextEdit::inputMethodEvent(QInputMethodEvent *e)
#ifdef QT_KEYPAD_NAVIGATION
if (d->control->textInteractionFlags() & Qt::TextEditable
&& QApplication::keypadNavigationEnabled()
- && !hasEditFocus()) {
+ && !hasEditFocus())
setEditFocus(true);
-#ifndef Q_OS_SYMBIAN
- selectAll(); // so text is replaced rather than appended to
-#endif
- }
#endif
d->sendControlEvent(e);
ensureCursorVisible();
diff --git a/src/gui/widgets/qtoolbar.cpp b/src/gui/widgets/qtoolbar.cpp
index 8beda554b1..7ed27ea33d 100644
--- a/src/gui/widgets/qtoolbar.cpp
+++ b/src/gui/widgets/qtoolbar.cpp
@@ -533,6 +533,14 @@ void QToolBarPrivate::plug(const QRect &r)
/*!
+ \fn void QToolBar::visibilityChanged(bool visible)
+ \since 4.7
+
+ This signal is emitted when the toolbar becomes \a visible (or
+ invisible). This happens when the widget is hidden or shown.
+*/
+
+/*!
Constructs a QToolBar with the given \a parent.
*/
QToolBar::QToolBar(QWidget *parent)
@@ -1122,6 +1130,7 @@ bool QToolBar::event(QEvent *event)
// fallthrough intended
case QEvent::Show:
d->toggleViewAction->setChecked(event->type() == QEvent::Show);
+ emit visibilityChanged(event->type() == QEvent::Show);
#if defined(Q_WS_MAC)
if (toolbarInUnifiedToolBar(this)) {
// I can static_cast because I did the qobject_cast in the if above, therefore
diff --git a/src/gui/widgets/qtoolbar.h b/src/gui/widgets/qtoolbar.h
index 90f20dd43b..b733477fd0 100644
--- a/src/gui/widgets/qtoolbar.h
+++ b/src/gui/widgets/qtoolbar.h
@@ -143,6 +143,7 @@ Q_SIGNALS:
void iconSizeChanged(const QSize &iconSize);
void toolButtonStyleChanged(Qt::ToolButtonStyle toolButtonStyle);
void topLevelChanged(bool topLevel);
+ void visibilityChanged(bool visible);
protected:
void actionEvent(QActionEvent *event);
diff --git a/src/gui/widgets/qvalidator.cpp b/src/gui/widgets/qvalidator.cpp
index a5276d38bf..0b5cc5ab10 100644
--- a/src/gui/widgets/qvalidator.cpp
+++ b/src/gui/widgets/qvalidator.cpp
@@ -400,8 +400,10 @@ QValidator::State QIntValidator::validate(QString & input, int&) const
qlonglong entered = QLocalePrivate::bytearrayToLongLong(buff.constData(), 10, &ok, &overflow);
if (overflow || !ok)
return Invalid;
- if (entered >= b && entered <= t)
- return Acceptable;
+ if (entered >= b && entered <= t) {
+ locale().toInt(input, &ok);
+ return ok ? Acceptable : Intermediate;
+ }
if (entered >= 0) {
// the -entered < b condition is necessary to allow people to type
@@ -412,6 +414,20 @@ QValidator::State QIntValidator::validate(QString & input, int&) const
}
}
+/*! \reimp */
+void QIntValidator::fixup(QString &input) const
+{
+ QByteArray buff;
+ if (!locale().d()->validateChars(input, QLocalePrivate::IntegerMode, &buff)) {
+ QLocale cl(QLocale::C);
+ if (!cl.d()->validateChars(input, QLocalePrivate::IntegerMode, &buff))
+ return;
+ }
+ bool ok, overflow;
+ qlonglong entered = QLocalePrivate::bytearrayToLongLong(buff.constData(), 10, &ok, &overflow);
+ if (ok && !overflow)
+ input = locale().toString(entered);
+}
/*!
Sets the range of the validator to only accept integers between \a
diff --git a/src/gui/widgets/qvalidator.h b/src/gui/widgets/qvalidator.h
index 30afbd6713..63734ca21d 100644
--- a/src/gui/widgets/qvalidator.h
+++ b/src/gui/widgets/qvalidator.h
@@ -105,6 +105,7 @@ public:
~QIntValidator();
QValidator::State validate(QString &, int &) const;
+ void fixup(QString &input) const;
void setBottom(int);
void setTop(int);
@@ -136,10 +137,11 @@ class Q_GUI_EXPORT QDoubleValidator : public QValidator
Q_PROPERTY(double bottom READ bottom WRITE setBottom)
Q_PROPERTY(double top READ top WRITE setTop)
Q_PROPERTY(int decimals READ decimals WRITE setDecimals)
+ Q_ENUMS(Notation)
Q_PROPERTY(Notation notation READ notation WRITE setNotation)
public:
- explicit QDoubleValidator(QObject * parent);
+ explicit QDoubleValidator(QObject * parent = 0);
QDoubleValidator(double bottom, double top, int decimals, QObject * parent);
~QDoubleValidator();
@@ -183,7 +185,7 @@ class Q_GUI_EXPORT QRegExpValidator : public QValidator
Q_PROPERTY(QRegExp regExp READ regExp WRITE setRegExp)
public:
- explicit QRegExpValidator(QObject *parent);
+ explicit QRegExpValidator(QObject *parent = 0);
QRegExpValidator(const QRegExp& rx, QObject *parent);
~QRegExpValidator();
diff --git a/src/imports/imports.pro b/src/imports/imports.pro
new file mode 100644
index 0000000000..8b470438c5
--- /dev/null
+++ b/src/imports/imports.pro
@@ -0,0 +1,7 @@
+TEMPLATE = subdirs
+
+SUBDIRS += widgets
+
+contains(QT_CONFIG, webkit): SUBDIRS += webkit
+contains(QT_CONFIG, multimedia): SUBDIRS += multimedia
+
diff --git a/src/imports/multimedia/multimedia.cpp b/src/imports/multimedia/multimedia.cpp
new file mode 100644
index 0000000000..a2e74f4729
--- /dev/null
+++ b/src/imports/multimedia/multimedia.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtDeclarative/qdeclarativeextensionplugin.h>
+#include <QtDeclarative/qdeclarative.h>
+#include <QtMultimedia/private/qsoundeffect_p.h>
+
+#include "qdeclarativevideo_p.h"
+#include "qdeclarativeaudio_p.h"
+
+
+QML_DECLARE_TYPE(QSoundEffect)
+
+QT_BEGIN_NAMESPACE
+
+class QMultimediaDeclarativeModule : public QDeclarativeExtensionPlugin
+{
+ Q_OBJECT
+public:
+ virtual void registerTypes(const char *uri)
+ {
+ Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.multimedia"));
+
+ qmlRegisterType<QSoundEffect>(uri, 4, 7, "SoundEffect");
+ qmlRegisterType<QDeclarativeAudio>(uri, 4, 7, "Audio");
+ qmlRegisterType<QDeclarativeVideo>(uri, 4, 7, "Video");
+ }
+};
+
+QT_END_NAMESPACE
+
+#include "multimedia.moc"
+
+Q_EXPORT_PLUGIN2(qmultimediadeclarativemodule, QT_PREPEND_NAMESPACE(QMultimediaDeclarativeModule));
+
diff --git a/src/imports/multimedia/multimedia.pro b/src/imports/multimedia/multimedia.pro
new file mode 100644
index 0000000000..f7a1d1b2f0
--- /dev/null
+++ b/src/imports/multimedia/multimedia.pro
@@ -0,0 +1,26 @@
+TARGET = multimedia
+TARGETPATH = Qt/multimedia
+include(../qimportbase.pri)
+
+QT += multimedia declarative
+
+HEADERS += \
+ qdeclarativeaudio_p.h \
+ qdeclarativemediabase_p.h \
+ qdeclarativevideo_p.h \
+ qmetadatacontrolmetaobject_p.h \
+
+SOURCES += \
+ multimedia.cpp \
+ qdeclarativeaudio.cpp \
+ qdeclarativemediabase.cpp \
+ qdeclarativevideo.cpp \
+ qmetadatacontrolmetaobject.cpp
+
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/imports/Qt/multimedia
+target.path = $$TARGETPATH
+
+qmldir.files += $$QT_BUILD_TREE/imports/Qt/multimedia/qmldir
+qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
+
+INSTALLS += target qmldir
diff --git a/src/imports/multimedia/qdeclarativeaudio.cpp b/src/imports/multimedia/qdeclarativeaudio.cpp
new file mode 100644
index 0000000000..40133ee23c
--- /dev/null
+++ b/src/imports/multimedia/qdeclarativeaudio.cpp
@@ -0,0 +1,328 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeaudio_p.h"
+
+#include <QtMultimedia/qmediaplayercontrol.h>
+
+QT_BEGIN_NAMESPACE
+
+
+/*!
+ \qmlclass Audio QDeclarativeAudio
+ \since 4.7
+ \brief The Audio element allows you to add audio playback to a scene.
+
+ \qml
+ Audio { source: "audio/song.mp3" }
+ \endqml
+
+ \sa Video
+*/
+
+/*!
+ \internal
+ \class QDeclarativeAudio
+ \brief The QDeclarativeAudio class provides an audio item that you can add to a QDeclarativeView.
+*/
+
+void QDeclarativeAudio::_q_error(int errorCode, const QString &errorString)
+{
+ m_error = QMediaPlayer::Error(errorCode);
+ m_errorString = errorString;
+
+ emit error(Error(errorCode), errorString);
+ emit errorChanged();
+}
+
+
+QDeclarativeAudio::QDeclarativeAudio(QObject *parent)
+ : QObject(parent)
+{
+ setObject(this);
+}
+
+QDeclarativeAudio::~QDeclarativeAudio()
+{
+ shutdown();
+}
+
+/*!
+ \qmlmethod Audio::play()
+
+ Starts playback of the media.
+
+ Sets the \l playing property to true, and the \l paused property to false.
+*/
+
+void QDeclarativeAudio::play()
+{
+ m_playerControl->play();
+
+ if (m_paused) {
+ m_paused = false;
+ emit pausedChanged();
+ }
+}
+
+/*!
+ \qmlmethod Audio::pause()
+
+ Pauses playback of the media.
+
+ Sets the \l playing and \l paused properties to true.
+*/
+
+void QDeclarativeAudio::pause()
+{
+ m_playerControl->pause();
+
+ if (!m_paused && m_state == QMediaPlayer::PausedState) {
+ m_paused = true;
+ emit pausedChanged();
+ }
+}
+
+/*!
+ \qmlmethod Audio::stop()
+
+ Stops playback of the media.
+
+ Sets the \l playing and \l paused properties to false.
+*/
+
+void QDeclarativeAudio::stop()
+{
+ m_playerControl->stop();
+
+ if (m_paused) {
+ m_paused = false;
+ emit pausedChanged();
+ }
+}
+
+/*!
+ \qmlproperty url Audio::source
+
+ This property holds the source URL of the media.
+*/
+
+/*!
+ \qmlproperty bool Audio::playing
+
+ This property holds whether the media is playing.
+
+ Defaults to false, and can be set to true to start playback.
+*/
+
+/*!
+ \qmlproperty bool Audio::paused
+
+ This property holds whether the media is paused.
+
+ Defaults to false, and can be set to true to pause playback.
+*/
+
+/*!
+ \qmlsignal Audio::onStarted()
+
+ This handler is called when playback is started.
+*/
+
+/*!
+ \qmlsignal Audio::onResumed()
+
+ This handler is called when playback is resumed from the paused state.
+*/
+
+/*!
+ \qmlsignal Audio::onPaused()
+
+ This handler is called when playback is paused.
+*/
+
+/*!
+ \qmlsignal Audio::onStopped()
+
+ This handler is called when playback is stopped.
+*/
+
+/*!
+ \qmlproperty enum Audio::status
+
+ This property holds the status of media loading. It can be one of:
+
+ \list
+ \o NoMedia - no media has been set.
+ \o Loading - the media is currently being loaded.
+ \o Loaded - the media has been loaded.
+ \o Buffering - the media is buffering data.
+ \o Stalled - playback has been interrupted while the media is buffering data.
+ \o Buffered - the media has buffered data.
+ \o EndOfMedia - the media has played to the end.
+ \o InvalidMedia - the media cannot be played.
+ \o UnknownStatus - the status of the media is unknown.
+ \endlist
+*/
+
+QDeclarativeAudio::Status QDeclarativeAudio::status() const
+{
+ return Status(m_status);
+}
+
+/*!
+ \qmlsignal Audio::onLoaded()
+
+ This handler is called when the media source has been loaded.
+*/
+
+/*!
+ \qmlsignal Audio::onBuffering()
+
+ This handler is called when the media starts buffering.
+*/
+
+/*!
+ \qmlsignal Audio::onStalled()
+
+ This handler is called when playback has stalled while the media buffers.
+*/
+
+/*!
+ \qmlsignal Audio::onBuffered()
+
+ This handler is called when the media has finished buffering.
+*/
+
+/*!
+ \qmlsignal Audio::onEndOfMedia()
+
+ This handler is called when playback stops because end of the media has been reached.
+*/
+/*!
+ \qmlproperty int Audio::duration
+
+ This property holds the duration of the media in milliseconds.
+
+ If the media doesn't have a fixed duration (a live stream for example) this will be 0.
+*/
+
+/*!
+ \qmlproperty int Audio::position
+
+ This property holds the current playback position in milliseconds.
+
+ If the \l seekable property is true, this property can be set to seek to a new position.
+*/
+
+/*!
+ \qmlproperty qreal Audio::volume
+
+ This property holds the volume of the audio output, from 0.0 (silent) to 1.0 (maximum volume).
+*/
+
+/*!
+ \qmlproperty bool Audio::muted
+
+ This property holds whether the audio output is muted.
+*/
+
+/*!
+ \qmlproperty qreal Audio::bufferProgress
+
+ This property holds how much of the data buffer is currently filled, from 0.0 (empty) to 1.0
+ (full).
+*/
+
+/*!
+ \qmlproperty bool Audio::seekable
+
+ This property holds whether position of the audio can be changed.
+
+ If true; setting a \l position value will cause playback to seek to the new position.
+*/
+
+/*!
+ \qmlproperty qreal Audio::playbackRate
+
+ This property holds the rate at which audio is played at as a multiple of the normal rate.
+*/
+
+/*!
+ \qmlproperty enum Audio::error
+
+ This property holds the error state of the audio. It can be one of:
+
+ \list
+ \o NoError - there is no current error.
+ \o ResourceError - the audio cannot be played due to a problem allocating resources.
+ \o FormatError - the audio format is not supported.
+ \o NetworkError - the audio cannot be played due to network issues.
+ \o AccessDenied - the audio cannot be played due to insufficient permissions.
+ \o ServiceMissing - the audio cannot be played because the media service could not be
+ instantiated.
+ \endlist
+*/
+
+QDeclarativeAudio::Error QDeclarativeAudio::error() const
+{
+ return Error(m_error);
+}
+
+/*!
+ \qmlproperty string Audio::errorString
+
+ This property holds a string describing the current error condition in more detail.
+*/
+
+/*!
+ \qmlsignal Audio::onError(error, errorString)
+
+ This handler is called when an \l {QMediaPlayer::Error}{error} has
+ occurred. The errorString parameter may contain more detailed
+ information about the error.
+*/
+
+QT_END_NAMESPACE
+
+#include "moc_qdeclarativeaudio_p.cpp"
+
+
diff --git a/src/imports/multimedia/qdeclarativeaudio_p.h b/src/imports/multimedia/qdeclarativeaudio_p.h
new file mode 100644
index 0000000000..9881dbce17
--- /dev/null
+++ b/src/imports/multimedia/qdeclarativeaudio_p.h
@@ -0,0 +1,173 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEAUDIO_P_H
+#define QDECLARATIVEAUDIO_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativemediabase_p.h"
+
+#include <QtCore/qbasictimer.h>
+#include <QtDeclarative/qdeclarativeitem.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QTimerEvent;
+
+class QDeclarativeAudio : public QObject, public QDeclarativeMediaBase, public QDeclarativeParserStatus
+{
+ Q_OBJECT
+ Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
+ Q_PROPERTY(bool playing READ isPlaying WRITE setPlaying NOTIFY playingChanged)
+ Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged)
+ Q_PROPERTY(Status status READ status NOTIFY statusChanged)
+ Q_PROPERTY(int duration READ duration NOTIFY durationChanged)
+ Q_PROPERTY(int position READ position WRITE setPosition NOTIFY positionChanged)
+ Q_PROPERTY(qreal volume READ volume WRITE setVolume NOTIFY volumeChanged)
+ Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged)
+ Q_PROPERTY(int bufferProgress READ bufferProgress NOTIFY bufferProgressChanged)
+ Q_PROPERTY(bool seekable READ isSeekable NOTIFY seekableChanged)
+ Q_PROPERTY(qreal playbackRate READ playbackRate WRITE setPlaybackRate NOTIFY playbackRateChanged)
+ Q_PROPERTY(Error error READ error NOTIFY errorChanged)
+ Q_PROPERTY(QString errorString READ errorString NOTIFY errorChanged)
+ Q_ENUMS(Status)
+ Q_ENUMS(Error)
+ Q_INTERFACES(QDeclarativeParserStatus)
+public:
+ enum Status
+ {
+ UnknownStatus = QMediaPlayer::UnknownMediaStatus,
+ NoMedia = QMediaPlayer::NoMedia,
+ Loading = QMediaPlayer::LoadingMedia,
+ Loaded = QMediaPlayer::LoadedMedia,
+ Stalled = QMediaPlayer::StalledMedia,
+ Buffering = QMediaPlayer::BufferingMedia,
+ Buffered = QMediaPlayer::BufferedMedia,
+ EndOfMedia = QMediaPlayer::EndOfMedia,
+ InvalidMedia = QMediaPlayer::InvalidMedia
+ };
+
+ enum Error
+ {
+ NoError = QMediaPlayer::NoError,
+ ResourceError = QMediaPlayer::ResourceError,
+ FormatError = QMediaPlayer::FormatError,
+ NetworkError = QMediaPlayer::NetworkError,
+ AccessDenied = QMediaPlayer::AccessDeniedError,
+ ServiceMissing = QMediaPlayer::ServiceMissingError
+ };
+
+ QDeclarativeAudio(QObject *parent = 0);
+ ~QDeclarativeAudio();
+
+ Status status() const;
+ Error error() const;
+
+public Q_SLOTS:
+ void play();
+ void pause();
+ void stop();
+
+Q_SIGNALS:
+ void sourceChanged();
+
+ void playingChanged();
+ void pausedChanged();
+
+ void started();
+ void resumed();
+ void paused();
+ void stopped();
+
+ void statusChanged();
+
+ void loaded();
+ void buffering();
+ void stalled();
+ void buffered();
+ void endOfMedia();
+
+ void durationChanged();
+ void positionChanged();
+
+ void volumeChanged();
+ void mutedChanged();
+
+ void bufferProgressChanged();
+
+ void seekableChanged();
+ void playbackRateChanged();
+
+ void errorChanged();
+ void error(QDeclarativeAudio::Error error, const QString &errorString);
+
+private Q_SLOTS:
+ void _q_error(int, const QString &);
+
+private:
+ Q_DISABLE_COPY(QDeclarativeAudio)
+ Q_PRIVATE_SLOT(mediaBase(), void _q_stateChanged(QMediaPlayer::State))
+ Q_PRIVATE_SLOT(mediaBase(), void _q_mediaStatusChanged(QMediaPlayer::MediaStatus))
+ Q_PRIVATE_SLOT(mediaBase(), void _q_metaDataChanged())
+
+ inline QDeclarativeMediaBase *mediaBase() { return this; }
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativeAudio))
+
+QT_END_HEADER
+
+#endif
diff --git a/src/imports/multimedia/qdeclarativemediabase.cpp b/src/imports/multimedia/qdeclarativemediabase.cpp
new file mode 100644
index 0000000000..8e87e448b1
--- /dev/null
+++ b/src/imports/multimedia/qdeclarativemediabase.cpp
@@ -0,0 +1,413 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativemediabase_p.h"
+
+#include <QtCore/qcoreevent.h>
+#include <QtCore/qurl.h>
+
+#include <QtMultimedia/qmediaplayercontrol.h>
+#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/qmediaserviceprovider.h>
+#include <QtMultimedia/qmetadatacontrol.h>
+#include "qmetadatacontrolmetaobject_p.h"
+
+
+
+QT_BEGIN_NAMESPACE
+
+
+class QDeclarativeMediaBaseObject : public QMediaObject
+{
+public:
+ QDeclarativeMediaBaseObject(QMediaService *service)
+ : QMediaObject(0, service)
+ {
+ }
+};
+
+class QDeclarativeMediaBasePlayerControl : public QMediaPlayerControl
+{
+public:
+ QDeclarativeMediaBasePlayerControl(QObject *parent)
+ : QMediaPlayerControl(parent)
+ {
+ }
+
+ QMediaPlayer::State state() const { return QMediaPlayer::StoppedState; }
+ QMediaPlayer::MediaStatus mediaStatus() const { return QMediaPlayer::NoMedia; }
+
+ qint64 duration() const { return 0; }
+ qint64 position() const { return 0; }
+ void setPosition(qint64) {}
+ int volume() const { return 0; }
+ void setVolume(int) {}
+ bool isMuted() const { return false; }
+ void setMuted(bool) {}
+ int bufferStatus() const { return 0; }
+ bool isAudioAvailable() const { return false; }
+ bool isVideoAvailable() const { return false; }
+ bool isSeekable() const { return false; }
+ QMediaTimeRange availablePlaybackRanges() const { return QMediaTimeRange(); }
+ qreal playbackRate() const { return 1; }
+ void setPlaybackRate(qreal) {}
+ QMediaContent media() const { return QMediaContent(); }
+ const QIODevice *mediaStream() const { return 0; }
+ void setMedia(const QMediaContent &, QIODevice *) {}
+
+ void play() {}
+ void pause() {}
+ void stop() {}
+};
+
+class QDeclarativeMediaBaseAnimation : public QObject
+{
+public:
+ QDeclarativeMediaBaseAnimation(QDeclarativeMediaBase *media)
+ : m_media(media)
+ {
+ }
+
+ void start() { if (!m_timer.isActive()) m_timer.start(500, this); }
+ void stop() { m_timer.stop(); }
+
+protected:
+ void timerEvent(QTimerEvent *event)
+ {
+ if (event->timerId() == m_timer.timerId()) {
+ event->accept();
+
+ if (m_media->m_state == QMediaPlayer::PlayingState)
+ emit m_media->positionChanged();
+ if (m_media->m_status == QMediaPlayer::BufferingMedia || QMediaPlayer::StalledMedia)
+ emit m_media->bufferProgressChanged();
+ } else {
+ QObject::timerEvent(event);
+ }
+ }
+
+private:
+ QDeclarativeMediaBase *m_media;
+ QBasicTimer m_timer;
+};
+
+void QDeclarativeMediaBase::_q_stateChanged(QMediaPlayer::State state)
+{
+ if (state != m_state) {
+ QMediaPlayer::State oldState = m_state;
+
+ m_state = state;
+
+ if (state == QMediaPlayer::StoppedState) {
+ emit stopped();
+ emit playingChanged();
+ } else if (oldState == QMediaPlayer::StoppedState) {
+ emit started();
+ emit playingChanged();
+ } else if (oldState == QMediaPlayer::PausedState) {
+ m_paused = false;
+
+ emit resumed();
+ emit pausedChanged();
+ }
+
+ if (state == m_state && state == QMediaPlayer::PausedState) {
+ bool wasPaused = m_paused;
+
+ m_paused = true;
+
+ emit paused();
+
+ if (!wasPaused)
+ emit pausedChanged();
+ }
+
+ if (m_state == QMediaPlayer::PlayingState
+ || m_status == QMediaPlayer::BufferingMedia
+ || m_status == QMediaPlayer::StalledMedia) {
+ m_animation->start();
+ } else {
+ m_animation->stop();
+ }
+ }
+}
+
+void QDeclarativeMediaBase::_q_mediaStatusChanged(QMediaPlayer::MediaStatus status)
+{
+ if (status != m_status) {
+ m_status = status;
+
+ switch (status) {
+ case QMediaPlayer::LoadedMedia:
+ emit loaded();
+ break;
+ case QMediaPlayer::BufferingMedia:
+ emit buffering();
+ break;
+ case QMediaPlayer::BufferedMedia:
+ emit buffered();
+ break;
+ case QMediaPlayer::StalledMedia:
+ emit stalled();
+ break;
+ case QMediaPlayer::EndOfMedia:
+ emit endOfMedia();
+ break;
+ default:
+ break;
+ }
+
+ emit statusChanged();
+
+ if (m_state == QMediaPlayer::PlayingState
+ || m_status == QMediaPlayer::BufferingMedia
+ || m_status == QMediaPlayer::StalledMedia) {
+ m_animation->start();
+ } else {
+ m_animation->stop();
+ }
+ }
+}
+
+void QDeclarativeMediaBase::_q_metaDataChanged()
+{
+ m_metaObject->metaDataChanged();
+}
+
+QDeclarativeMediaBase::QDeclarativeMediaBase()
+ : m_mediaService(0)
+ , m_playerControl(0)
+ , m_mediaObject(0)
+ , m_mediaProvider(0)
+ , m_metaDataControl(0)
+ , m_metaObject(0)
+ , m_animation(0)
+ , m_state(QMediaPlayer::StoppedState)
+ , m_status(QMediaPlayer::NoMedia)
+ , m_error(QMediaPlayer::NoError)
+ , m_paused(false)
+{
+}
+
+QDeclarativeMediaBase::~QDeclarativeMediaBase()
+{
+}
+
+void QDeclarativeMediaBase::shutdown()
+{
+ delete m_metaObject;
+ delete m_mediaObject;
+
+ if (m_mediaProvider)
+ m_mediaProvider->releaseService(m_mediaService);
+
+ delete m_animation;
+
+}
+
+void QDeclarativeMediaBase::setObject(QObject *object)
+{
+ if ((m_mediaProvider = QMediaServiceProvider::defaultServiceProvider())) {
+ if ((m_mediaService = m_mediaProvider->requestService(Q_MEDIASERVICE_MEDIAPLAYER))) {
+ m_playerControl = qobject_cast<QMediaPlayerControl *>(
+ m_mediaService->control(QMediaPlayerControl_iid));
+ m_metaDataControl = qobject_cast<QMetaDataControl *>(
+ m_mediaService->control(QMetaDataControl_iid));
+ m_mediaObject = new QDeclarativeMediaBaseObject(m_mediaService);
+ }
+ }
+
+ if (m_playerControl) {
+ QObject::connect(m_playerControl, SIGNAL(stateChanged(QMediaPlayer::State)),
+ object, SLOT(_q_stateChanged(QMediaPlayer::State)));
+ QObject::connect(m_playerControl, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)),
+ object, SLOT(_q_mediaStatusChanged(QMediaPlayer::MediaStatus)));
+ QObject::connect(m_playerControl, SIGNAL(mediaChanged(QMediaContent)),
+ object, SIGNAL(sourceChanged()));
+ QObject::connect(m_playerControl, SIGNAL(durationChanged(qint64)),
+ object, SIGNAL(durationChanged()));
+ QObject::connect(m_playerControl, SIGNAL(positionChanged(qint64)),
+ object, SIGNAL(positionChanged()));
+ QObject::connect(m_playerControl, SIGNAL(volumeChanged(int)),
+ object, SIGNAL(volumeChanged()));
+ QObject::connect(m_playerControl, SIGNAL(mutedChanged(bool)),
+ object, SIGNAL(mutedChanged()));
+ QObject::connect(m_playerControl, SIGNAL(bufferStatusChanged(int)),
+ object, SIGNAL(bufferProgressChanged()));
+ QObject::connect(m_playerControl, SIGNAL(seekableChanged(bool)),
+ object, SIGNAL(seekableChanged()));
+ QObject::connect(m_playerControl, SIGNAL(playbackRateChanged(qreal)),
+ object, SIGNAL(playbackRateChanged()));
+ QObject::connect(m_playerControl, SIGNAL(error(int,QString)),
+ object, SLOT(_q_error(int,QString)));
+
+ m_animation = new QDeclarativeMediaBaseAnimation(this);
+ } else {
+ m_error = QMediaPlayer::ServiceMissingError;
+
+ m_playerControl = new QDeclarativeMediaBasePlayerControl(object);
+ }
+
+ if (m_metaDataControl) {
+ m_metaObject = new QMetaDataControlMetaObject(m_metaDataControl, object);
+
+ QObject::connect(m_metaDataControl, SIGNAL(metaDataChanged()),
+ object, SLOT(_q_metaDataChanged()));
+ }
+}
+
+QUrl QDeclarativeMediaBase::source() const
+{
+ return m_playerControl->media().canonicalUrl();
+}
+
+void QDeclarativeMediaBase::setSource(const QUrl &url)
+{
+ if (m_error != QMediaPlayer::ServiceMissingError && m_error != QMediaPlayer::NoError) {
+ m_error = QMediaPlayer::NoError;
+ m_errorString = QString();
+
+ emit errorChanged();
+ }
+
+ m_playerControl->setMedia(QMediaContent(url), 0);
+}
+
+bool QDeclarativeMediaBase::isPlaying() const
+{
+ return m_state != QMediaPlayer::StoppedState;
+}
+
+void QDeclarativeMediaBase::setPlaying(bool playing)
+{
+ if (playing && m_state == QMediaPlayer::StoppedState) {
+ if (m_paused)
+ m_playerControl->pause();
+ else
+ m_playerControl->play();
+ } else if (!playing) {
+ m_playerControl->stop();
+ }
+}
+
+bool QDeclarativeMediaBase::isPaused() const
+{
+ return m_paused;
+}
+
+void QDeclarativeMediaBase::setPaused(bool paused)
+{
+ if (m_paused != paused) {
+ if (paused && m_state == QMediaPlayer::PlayingState) {
+ m_playerControl->pause();
+ } else if (!paused && m_state == QMediaPlayer::PausedState) {
+ m_playerControl->play();
+ } else {
+ m_paused = paused;
+
+ emit pausedChanged();
+ }
+ }
+}
+
+int QDeclarativeMediaBase::duration() const
+{
+ return m_playerControl->duration();
+}
+
+int QDeclarativeMediaBase::position() const
+{
+ return m_playerControl->position();
+
+}
+
+void QDeclarativeMediaBase::setPosition(int position)
+{
+ m_playerControl->setPosition(position);
+}
+
+qreal QDeclarativeMediaBase::volume() const
+{
+ return qreal(m_playerControl->volume()) / 100;
+}
+
+void QDeclarativeMediaBase::setVolume(qreal volume)
+{
+ m_playerControl->setVolume(qRound(volume * 100));
+}
+
+bool QDeclarativeMediaBase::isMuted() const
+{
+ return m_playerControl->isMuted();
+}
+
+void QDeclarativeMediaBase::setMuted(bool muted)
+{
+ m_playerControl->setMuted(muted);
+}
+
+qreal QDeclarativeMediaBase::bufferProgress() const
+{
+ return qreal(m_playerControl->bufferStatus()) / 100;
+}
+
+bool QDeclarativeMediaBase::isSeekable() const
+{
+ return m_playerControl->isSeekable();
+}
+
+qreal QDeclarativeMediaBase::playbackRate() const
+{
+ return m_playerControl->playbackRate();
+}
+
+void QDeclarativeMediaBase::setPlaybackRate(qreal rate)
+{
+ m_playerControl->setPlaybackRate(rate);
+}
+
+QString QDeclarativeMediaBase::errorString() const
+{
+ return m_errorString;
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/imports/multimedia/qdeclarativemediabase_p.h b/src/imports/multimedia/qdeclarativemediabase_p.h
new file mode 100644
index 0000000000..b40e84e6c4
--- /dev/null
+++ b/src/imports/multimedia/qdeclarativemediabase_p.h
@@ -0,0 +1,168 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEMEDIABASE_P_H
+#define QDECLARATIVEMEDIABASE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qbasictimer.h>
+#include <QtMultimedia/qmediaplayer.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QMediaPlayerControl;
+class QMediaService;
+class QMediaServiceProvider;
+class QMetaDataControl;
+class QMetaDataControlMetaObject;
+class QDeclarativeMediaBaseAnimation;
+
+class QDeclarativeMediaBase
+{
+public:
+ QDeclarativeMediaBase();
+ virtual ~QDeclarativeMediaBase();
+
+ QUrl source() const;
+ void setSource(const QUrl &url);
+
+ bool isPlaying() const;
+ void setPlaying(bool playing);
+
+ bool isPaused() const;
+ void setPaused(bool paused);
+
+ int duration() const;
+
+ int position() const;
+ void setPosition(int position);
+
+ qreal volume() const;
+ void setVolume(qreal volume);
+
+ bool isMuted() const;
+ void setMuted(bool muted);
+
+ qreal bufferProgress() const;
+
+ bool isSeekable() const;
+
+ qreal playbackRate() const;
+ void setPlaybackRate(qreal rate);
+
+ QString errorString() const;
+
+ void _q_stateChanged(QMediaPlayer::State state);
+ void _q_mediaStatusChanged(QMediaPlayer::MediaStatus status);
+
+ void _q_metaDataChanged();
+
+protected:
+ void shutdown();
+
+ void setObject(QObject *object);
+
+ virtual void sourceChanged() = 0;
+
+ virtual void playingChanged() = 0;
+ virtual void pausedChanged() = 0;
+
+ virtual void started() = 0;
+ virtual void resumed() = 0;
+ virtual void paused() = 0;
+ virtual void stopped() = 0;
+
+ virtual void statusChanged() = 0;
+
+ virtual void loaded() = 0;
+ virtual void buffering() = 0;
+ virtual void stalled() = 0;
+ virtual void buffered() = 0;
+ virtual void endOfMedia() = 0;
+
+ virtual void durationChanged() = 0;
+ virtual void positionChanged() = 0;
+
+ virtual void volumeChanged() = 0;
+ virtual void mutedChanged() = 0;
+
+ virtual void bufferProgressChanged() = 0;
+
+ virtual void seekableChanged() = 0;
+ virtual void playbackRateChanged() = 0;
+
+ virtual void errorChanged() = 0;
+
+ QMediaService *m_mediaService;
+ QMediaPlayerControl *m_playerControl;
+
+ QMediaObject *m_mediaObject;
+ QMediaServiceProvider *m_mediaProvider;
+ QMetaDataControl *m_metaDataControl;
+ QMetaDataControlMetaObject *m_metaObject;
+ QDeclarativeMediaBaseAnimation *m_animation;
+
+ QMediaPlayer::State m_state;
+ QMediaPlayer::MediaStatus m_status;
+ QMediaPlayer::Error m_error;
+ bool m_paused;
+ QString m_errorString;
+
+ friend class QDeclarativeMediaBaseAnimation;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/imports/multimedia/qdeclarativevideo.cpp b/src/imports/multimedia/qdeclarativevideo.cpp
new file mode 100644
index 0000000000..80c0ba4abf
--- /dev/null
+++ b/src/imports/multimedia/qdeclarativevideo.cpp
@@ -0,0 +1,946 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativevideo_p.h"
+
+#include <QtMultimedia/qmediaplayercontrol.h>
+#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/private/qpaintervideosurface_p.h>
+#include <QtMultimedia/qvideooutputcontrol.h>
+#include <QtMultimedia/qvideorenderercontrol.h>
+
+
+QT_BEGIN_NAMESPACE
+
+
+void QDeclarativeVideo::_q_nativeSizeChanged(const QSizeF &size)
+{
+ setImplicitWidth(size.width());
+ setImplicitHeight(size.height());
+}
+
+void QDeclarativeVideo::_q_error(int errorCode, const QString &errorString)
+{
+ m_error = QMediaPlayer::Error(errorCode);
+ m_errorString = errorString;
+
+ emit error(Error(errorCode), errorString);
+ emit errorChanged();
+}
+
+
+/*!
+ \qmlclass Video QDeclarativeVideo
+ \since 4.7
+ \brief The Video element allows you to add videos to a scene.
+ \inherits Item
+
+ \qml
+ Video { source: "video/movie.mpg" }
+ \endqml
+
+ The video item supports untransformed, stretched, and uniformly scaled video presentation.
+ For a description of stretched uniformly scaled presentation, see the \l fillMode property
+ description.
+
+ The video item is only visible when the \l hasVideo property is true and the video is playing.
+
+ \sa Audio
+*/
+
+/*!
+ \internal
+ \class QDeclarativeVideo
+ \brief The QDeclarativeVideo class provides a video item that you can add to a QDeclarativeView.
+*/
+
+QDeclarativeVideo::QDeclarativeVideo(QDeclarativeItem *parent)
+ : QDeclarativeItem(parent)
+ , m_graphicsItem(0)
+
+{
+ m_graphicsItem = new QGraphicsVideoItem(this);
+ connect(m_graphicsItem, SIGNAL(nativeSizeChanged(QSizeF)),
+ this, SLOT(_q_nativeSizeChanged(QSizeF)));
+
+ setObject(this);
+
+ if (m_mediaService) {
+ connect(m_playerControl, SIGNAL(audioAvailableChanged(bool)),
+ this, SIGNAL(hasAudioChanged()));
+ connect(m_playerControl, SIGNAL(videoAvailableChanged(bool)),
+ this, SIGNAL(hasVideoChanged()));
+
+ m_graphicsItem->setMediaObject(m_mediaObject);
+ }
+}
+
+QDeclarativeVideo::~QDeclarativeVideo()
+{
+ shutdown();
+
+ delete m_graphicsItem;
+}
+
+/*!
+ \qmlproperty url Video::source
+
+ This property holds the source URL of the media.
+*/
+
+/*!
+ \qmlproperty bool Video::playing
+
+ This property holds whether the media is playing.
+
+ Defaults to false, and can be set to true to start playback.
+*/
+
+/*!
+ \qmlproperty bool Video::paused
+
+ This property holds whether the media is paused.
+
+ Defaults to false, and can be set to true to pause playback.
+*/
+
+/*!
+ \qmlsignal Video::onStarted()
+
+ This handler is called when playback is started.
+*/
+
+/*!
+ \qmlsignal Video::onResumed()
+
+ This handler is called when playback is resumed from the paused state.
+*/
+
+/*!
+ \qmlsignal Video::onPaused()
+
+ This handler is called when playback is paused.
+*/
+
+/*!
+ \qmlsignal Video::onStopped()
+
+ This handler is called when playback is stopped.
+*/
+
+/*!
+ \qmlproperty enum Video::status
+
+ This property holds the status of media loading. It can be one of:
+
+ \list
+ \o NoMedia - no media has been set.
+ \o Loading - the media is currently being loaded.
+ \o Loaded - the media has been loaded.
+ \o Buffering - the media is buffering data.
+ \o Stalled - playback has been interrupted while the media is buffering data.
+ \o Buffered - the media has buffered data.
+ \o EndOfMedia - the media has played to the end.
+ \o InvalidMedia - the media cannot be played.
+ \o UnknownStatus - the status of the media is cannot be determined.
+ \endlist
+*/
+
+QDeclarativeVideo::Status QDeclarativeVideo::status() const
+{
+ return Status(m_status);
+}
+
+/*!
+ \qmlsignal Video::onLoaded()
+
+ This handler is called when the media source has been loaded.
+*/
+
+/*!
+ \qmlsignal Video::onBuffering()
+
+ This handler is called when the media starts buffering.
+*/
+
+/*!
+ \qmlsignal Video::onStalled()
+
+ This handler is called when playback has stalled while the media buffers.
+*/
+
+/*!
+ \qmlsignal Video::onBuffered()
+
+ This handler is called when the media has finished buffering.
+*/
+
+/*!
+ \qmlsignal Video::onEndOfMedia()
+
+ This handler is called when playback stops because end of the media has been reached.
+*/
+
+/*!
+ \qmlproperty int Video::duration
+
+ This property holds the duration of the media in milliseconds.
+
+ If the media doesn't have a fixed duration (a live stream for example) this will be 0.
+*/
+
+/*!
+ \qmlproperty int Video::position
+
+ This property holds the current playback position in milliseconds.
+*/
+
+/*!
+ \qmlproperty qreal Video::volume
+
+ This property holds the volume of the audio output, from 0.0 (silent) to 1.0 (maximum volume).
+*/
+
+/*!
+ \qmlproperty bool Video::muted
+
+ This property holds whether the audio output is muted.
+*/
+
+/*!
+ \qmlproperty bool Video::hasAudio
+
+ This property holds whether the media contains audio.
+*/
+
+bool QDeclarativeVideo::hasAudio() const
+{
+ return m_playerControl->isAudioAvailable();
+}
+
+/*!
+ \qmlproperty bool Video::hasVideo
+
+ This property holds whether the media contains video.
+*/
+
+bool QDeclarativeVideo::hasVideo() const
+{
+ return m_playerControl->isVideoAvailable();
+}
+
+/*!
+ \qmlproperty qreal Video::bufferProgress
+
+ This property holds how much of the data buffer is currently filled, from 0.0 (empty) to 1.0
+ (full).
+*/
+
+/*!
+ \qmlproperty bool Video::seekable
+
+ This property holds whether position of the video can be changed.
+*/
+
+/*!
+ \qmlproperty qreal Video::playbackRate
+
+ This property holds the rate at which video is played at as a multiple of the normal rate.
+*/
+
+/*!
+ \qmlproperty enum Video::error
+
+ This property holds the error state of the video. It can be one of:
+
+ \list
+ \o NoError - there is no current error.
+ \o ResourceError - the video cannot be played due to a problem allocating resources.
+ \o FormatError - the video format is not supported.
+ \o NetworkError - the video cannot be played due to network issues.
+ \o AccessDenied - the video cannot be played due to insufficient permissions.
+ \o ServiceMissing - the video cannot be played because the media service could not be
+ instantiated.
+ \endlist
+*/
+
+
+QDeclarativeVideo::Error QDeclarativeVideo::error() const
+{
+ return Error(m_error);
+}
+
+/*!
+ \qmlproperty string Video::errorString
+
+ This property holds a string describing the current error condition in more detail.
+*/
+
+/*!
+ \qmlsignal Video::onError(error, errorString)
+
+ This handler is called when an \l {QMediaPlayer::Error}{error} has
+ occurred. The errorString parameter may contain more detailed
+ information about the error.
+*/
+
+/*!
+ \qmlproperty enum Video::fillMode
+
+ Set this property to define how the video is scaled to fit the target area.
+
+ \list
+ \o Stretch - the video is scaled to fit.
+ \o PreserveAspectFit - the video is scaled uniformly to fit without cropping
+ \o PreserveAspectCrop - the video is scaled uniformly to fill, cropping if necessary
+ \endlist
+
+ The default fill mode is PreserveAspectFit.
+*/
+
+QDeclarativeVideo::FillMode QDeclarativeVideo::fillMode() const
+{
+ return FillMode(m_graphicsItem->aspectRatioMode());
+}
+
+void QDeclarativeVideo::setFillMode(FillMode mode)
+{
+ m_graphicsItem->setAspectRatioMode(Qt::AspectRatioMode(mode));
+}
+
+/*!
+ \qmlmethod Video::play()
+
+ Starts playback of the media.
+
+ Sets the \l playing property to true, and the \l paused property to false.
+*/
+
+void QDeclarativeVideo::play()
+{
+ m_playerControl->play();
+
+ if (m_paused) {
+ m_paused = false;
+ emit pausedChanged();
+ }
+}
+
+/*!
+ \qmlmethod Video::pause()
+
+ Pauses playback of the media.
+
+ Sets the \l playing and \l paused properties to true.
+*/
+
+void QDeclarativeVideo::pause()
+{
+ m_playerControl->pause();
+
+ if (!m_paused && m_state == QMediaPlayer::PausedState) {
+ m_paused = true;
+ emit pausedChanged();
+ }
+}
+
+/*!
+ \qmlmethod Video::stop()
+
+ Stops playback of the media.
+
+ Sets the \l playing and \l paused properties to false.
+*/
+
+void QDeclarativeVideo::stop()
+{
+ m_playerControl->stop();
+
+ if (m_paused) {
+ m_paused = false;
+ emit pausedChanged();
+ }
+}
+
+void QDeclarativeVideo::paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
+{
+}
+
+void QDeclarativeVideo::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
+{
+ m_graphicsItem->setSize(newGeometry.size());
+
+ QDeclarativeItem::geometryChanged(newGeometry, oldGeometry);
+}
+
+QT_END_NAMESPACE
+
+// ***************************************
+// Documentation for meta-data properties.
+// ***************************************
+
+/*!
+ \qmlproperty variant Video::title
+
+ This property holds the tile of the media.
+
+ \sa {QtMultimedia::Title}
+*/
+
+/*!
+ \qmlproperty variant Video::subTitle
+
+ This property holds the sub-title of the media.
+
+ \sa {QtMultimedia::SubTitle}
+*/
+
+/*!
+ \qmlproperty variant Video::author
+
+ This property holds the author of the media.
+
+ \sa {QtMultimedia::Author}
+*/
+
+/*!
+ \qmlproperty variant Video::comment
+
+ This property holds a user comment about the media.
+
+ \sa {QtMultimedia::Comment}
+*/
+
+/*!
+ \qmlproperty variant Video::description
+
+ This property holds a description of the media.
+
+ \sa {QtMultimedia::Description}
+*/
+
+/*!
+ \qmlproperty variant Video::category
+
+ This property holds the category of the media
+
+ \sa {QtMultimedia::Category}
+*/
+
+/*!
+ \qmlproperty variant Video::genre
+
+ This property holds the genre of the media.
+
+ \sa {QtMultimedia::Genre}
+*/
+
+/*!
+ \qmlproperty variant Video::year
+
+ This property holds the year of release of the media.
+
+ \sa {QtMultimedia::Year}
+*/
+
+/*!
+ \qmlproperty variant Video::date
+
+ This property holds the date of the media.
+
+ \sa {QtMultimedia::Date}
+*/
+
+/*!
+ \qmlproperty variant Video::userRating
+
+ This property holds a user rating of the media in the range of 0 to 100.
+
+ \sa {QtMultimedia::UserRating}
+*/
+
+/*!
+ \qmlproperty variant Video::keywords
+
+ This property holds a list of keywords describing the media.
+
+ \sa {QtMultimedia::Keywords}
+*/
+
+/*!
+ \qmlproperty variant Video::language
+
+ This property holds the language of the media, as an ISO 639-2 code.
+
+ \sa {QtMultimedia::Language}
+*/
+
+/*!
+ \qmlproperty variant Video::publisher
+
+ This property holds the publisher of the media.
+
+ \sa {QtMultimedia::Publisher}
+*/
+
+/*!
+ \qmlproperty variant Video::copyright
+
+ This property holds the media's copyright notice.
+
+ \sa {QtMultimedia::Copyright}
+*/
+
+/*!
+ \qmlproperty variant Video::parentalRating
+
+ This property holds the parental rating of the media.
+
+ \sa {QtMultimedia::ParentalRating}
+*/
+
+/*!
+ \qmlproperty variant Video::ratingOrganisation
+
+ This property holds the name of the rating organisation responsible for the
+ parental rating of the media.
+
+ \sa {QtMultimedia::RatingOrganisation}
+*/
+
+/*!
+ \qmlproperty variant Video::size
+
+ This property property holds the size of the media in bytes.
+
+ \sa {QtMultimedia::Size}
+*/
+
+/*!
+ \qmlproperty variant Video::mediaType
+
+ This property holds the type of the media.
+
+ \sa {QtMultimedia::MediaType}
+*/
+
+/*!
+ \qmlproperty variant Video::audioBitRate
+
+ This property holds the bit rate of the media's audio stream ni bits per
+ second.
+
+ \sa {QtMultimedia::AudioBitRate}
+*/
+
+/*!
+ \qmlproperty variant Video::audioCodec
+
+ This property holds the encoding of the media audio stream.
+
+ \sa {QtMultimedia::AudioCodec}
+*/
+
+/*!
+ \qmlproperty variant Video::averageLevel
+
+ This property holds the average volume level of the media.
+
+ \sa {QtMultimedia::AverageLevel}
+*/
+
+/*!
+ \qmlproperty variant Video::channelCount
+
+ This property holds the number of channels in the media's audio stream.
+
+ \sa {QtMultimedia::ChannelCount}
+*/
+
+/*!
+ \qmlproperty variant Video::peakValue
+
+ This property holds the peak volume of media's audio stream.
+
+ \sa {QtMultimedia::PeakValue}
+*/
+
+/*!
+ \qmlproperty variant Video::sampleRate
+
+ This property holds the sample rate of the media's audio stream in hertz.
+
+ \sa {QtMultimedia::SampleRate}
+*/
+
+/*!
+ \qmlproperty variant Video::albumTitle
+
+ This property holds the title of the album the media belongs to.
+
+ \sa {QtMultimedia::AlbumTitle}
+*/
+
+/*!
+ \qmlproperty variant Video::albumArtist
+
+ This property holds the name of the principal artist of the album the media
+ belongs to.
+
+ \sa {QtMultimedia::AlbumArtist}
+*/
+
+/*!
+ \qmlproperty variant Video::contributingArtist
+
+ This property holds the names of artists contributing to the media.
+
+ \sa {QtMultimedia::ContributingArtist}
+*/
+
+/*!
+ \qmlproperty variant Video::composer
+
+ This property holds the composer of the media.
+
+ \sa {QtMultimedia::Composer}
+*/
+
+/*!
+ \qmlproperty variant Video::conductor
+
+ This property holds the conductor of the media.
+
+ \sa {QtMultimedia::Conductor}
+*/
+
+/*!
+ \qmlproperty variant Video::lyrics
+
+ This property holds the lyrics to the media.
+
+ \sa {QtMultimedia::Lyrics}
+*/
+
+/*!
+ \qmlproperty variant Video::mood
+
+ This property holds the mood of the media.
+
+ \sa {QtMultimedia::Mood}
+*/
+
+/*!
+ \qmlproperty variant Video::trackNumber
+
+ This property holds the track number of the media.
+
+ \sa {QtMultimedia::TrackNumber}
+*/
+
+/*!
+ \qmlproperty variant Video::trackCount
+
+ This property holds the number of track on the album containing the media.
+
+ \sa {QtMultimedia::TrackNumber}
+*/
+
+/*!
+ \qmlproperty variant Video::coverArtUrlSmall
+
+ This property holds the URL of a small cover art image.
+
+ \sa {QtMultimedia::CoverArtUrlSmall}
+*/
+
+/*!
+ \qmlproperty variant Video::coverArtUrlLarge
+
+ This property holds the URL of a large cover art image.
+
+ \sa {QtMultimedia::CoverArtUrlLarge}
+*/
+
+/*!
+ \qmlproperty variant Video::resolution
+
+ This property holds the dimension of an image or video.
+
+ \sa {QtMultimedia::Resolution}
+*/
+
+/*!
+ \qmlproperty variant Video::pixelAspectRatio
+
+ This property holds the pixel aspect ratio of an image or video.
+
+ \sa {QtMultimedia::PixelAspectRatio}
+*/
+
+/*!
+ \qmlproperty variant Video::videoFrameRate
+
+ This property holds the frame rate of the media's video stream.
+
+ \sa {QtMultimedia::VideoFrameRate}
+*/
+
+/*!
+ \qmlproperty variant Video::videoBitRate
+
+ This property holds the bit rate of the media's video stream in bits per
+ second.
+
+ \sa {QtMultimedia::VideoBitRate}
+*/
+
+/*!
+ \qmlproperty variant Video::videoCodec
+
+ This property holds the encoding of the media's video stream.
+
+ \sa {QtMultimedia::VideoCodec}
+*/
+
+/*!
+ \qmlproperty variant Video::posterUrl
+
+ This property holds the URL of a poster image.
+
+ \sa {QtMultimedia::PosterUrl}
+*/
+
+/*!
+ \qmlproperty variant Video::chapterNumber
+
+ This property holds the chapter number of the media.
+
+ \sa {QtMultimedia::ChapterNumber}
+*/
+
+/*!
+ \qmlproperty variant Video::director
+
+ This property holds the director of the media.
+
+ \sa {QtMultimedia::Director}
+*/
+
+/*!
+ \qmlproperty variant Video::leadPerformer
+
+ This property holds the lead performer in the media.
+
+ \sa {QtMultimedia::LeadPerformer}
+*/
+
+/*!
+ \qmlproperty variant Video::writer
+
+ This property holds the writer of the media.
+
+ \sa {QtMultimedia::Writer}
+*/
+
+// The remaining properties are related to photos, and are technically
+// available but will certainly never have values.
+#ifndef Q_QDOC
+
+/*!
+ \qmlproperty variant Video::cameraManufacturer
+
+ \sa {QtMultimedia::CameraManufacturer}
+*/
+
+/*!
+ \qmlproperty variant Video::cameraModel
+
+ \sa {QtMultimedia::CameraModel}
+*/
+
+/*!
+ \qmlproperty variant Video::event
+
+ \sa {QtMultimedia::Event}
+*/
+
+/*!
+ \qmlproperty variant Video::subject
+
+ \sa {QtMultimedia::Subject}
+*/
+
+/*!
+ \qmlproperty variant Video::orientation
+
+ \sa {QtMultimedia::Orientation}
+*/
+
+/*!
+ \qmlproperty variant Video::exposureTime
+
+ \sa {QtMultimedia::ExposureTime}
+*/
+
+/*!
+ \qmlproperty variant Video::fNumber
+
+ \sa {QtMultimedia::FNumber}
+*/
+
+/*!
+ \qmlproperty variant Video::exposureProgram
+
+ \sa {QtMultimedia::ExposureProgram}
+*/
+
+/*!
+ \qmlproperty variant Video::isoSpeedRatings
+
+ \sa {QtMultimedia::ISOSpeedRatings}
+*/
+
+/*!
+ \qmlproperty variant Video::exposureBiasValue
+
+ \sa {QtMultimedia::ExposureBiasValue}
+*/
+
+/*!
+ \qmlproperty variant Video::dateTimeDigitized
+
+ \sa {QtMultimedia::DateTimeDigitized}
+*/
+
+/*!
+ \qmlproperty variant Video::subjectDistance
+
+ \sa {QtMultimedia::SubjectDistance}
+*/
+
+/*!
+ \qmlproperty variant Video::meteringMode
+
+ \sa {QtMultimedia::MeteringMode}
+*/
+
+/*!
+ \qmlproperty variant Video::lightSource
+
+ \sa {QtMultimedia::LightSource}
+*/
+
+/*!
+ \qmlproperty variant Video::flash
+
+ \sa {QtMultimedia::Flash}
+*/
+
+/*!
+ \qmlproperty variant Video::focalLength
+
+ \sa {QtMultimedia::FocalLength}
+*/
+
+/*!
+ \qmlproperty variant Video::exposureMode
+
+ \sa {QtMultimedia::ExposureMode}
+*/
+
+/*!
+ \qmlproperty variant Video::whiteBalance
+
+ \sa {QtMultimedia::WhiteBalance}
+*/
+
+/*!
+ \qmlproperty variant Video::DigitalZoomRatio
+
+ \sa {QtMultimedia::DigitalZoomRatio}
+*/
+
+/*!
+ \qmlproperty variant Video::focalLengthIn35mmFilm
+
+ \sa {QtMultimedia::FocalLengthIn35mmFile}
+*/
+
+/*!
+ \qmlproperty variant Video::sceneCaptureType
+
+ \sa {QtMultimedia::SceneCaptureType}
+*/
+
+/*!
+ \qmlproperty variant Video::gainControl
+
+ \sa {QtMultimedia::GainControl}
+*/
+
+/*!
+ \qmlproperty variant Video::contrast
+
+ \sa {QtMultimedia::contrast}
+*/
+
+/*!
+ \qmlproperty variant Video::saturation
+
+ \sa {QtMultimedia::Saturation}
+*/
+
+/*!
+ \qmlproperty variant Video::sharpness
+
+ \sa {QtMultimedia::Sharpness}
+*/
+
+/*!
+ \qmlproperty variant Video::deviceSettingDescription
+
+ \sa {QtMultimedia::DeviceSettingDescription}
+*/
+
+#endif
+
+#include "moc_qdeclarativevideo_p.cpp"
diff --git a/src/imports/multimedia/qdeclarativevideo_p.h b/src/imports/multimedia/qdeclarativevideo_p.h
new file mode 100644
index 0000000000..fb13519cfa
--- /dev/null
+++ b/src/imports/multimedia/qdeclarativevideo_p.h
@@ -0,0 +1,204 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEVIDEO_H
+#define QDECLARATIVEVIDEO_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativemediabase_p.h"
+
+#include <QtMultimedia/qgraphicsvideoitem.h>
+
+#include <QtCore/qbasictimer.h>
+#include <QtDeclarative/qdeclarativeitem.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QTimerEvent;
+class QVideoSurfaceFormat;
+
+
+class QDeclarativeVideo : public QDeclarativeItem, public QDeclarativeMediaBase
+{
+ Q_OBJECT
+ Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
+ Q_PROPERTY(bool playing READ isPlaying WRITE setPlaying NOTIFY playingChanged)
+ Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged)
+ Q_PROPERTY(Status status READ status NOTIFY statusChanged)
+ Q_PROPERTY(int duration READ duration NOTIFY durationChanged)
+ Q_PROPERTY(int position READ position WRITE setPosition NOTIFY positionChanged)
+ Q_PROPERTY(qreal volume READ volume WRITE setVolume NOTIFY volumeChanged)
+ Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged)
+ Q_PROPERTY(bool hasAudio READ hasAudio NOTIFY hasAudioChanged)
+ Q_PROPERTY(bool hasVideo READ hasVideo NOTIFY hasVideoChanged)
+ Q_PROPERTY(int bufferProgress READ bufferProgress NOTIFY bufferProgressChanged)
+ Q_PROPERTY(bool seekable READ isSeekable NOTIFY seekableChanged)
+ Q_PROPERTY(qreal playbackRate READ playbackRate WRITE setPlaybackRate NOTIFY playbackRateChanged)
+ Q_PROPERTY(Error error READ error NOTIFY errorChanged)
+ Q_PROPERTY(QString errorString READ errorString NOTIFY errorChanged)
+ Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode)
+ Q_ENUMS(FillMode)
+ Q_ENUMS(Status)
+ Q_ENUMS(Error)
+public:
+ enum FillMode
+ {
+ Stretch = Qt::IgnoreAspectRatio,
+ PreserveAspectFit = Qt::KeepAspectRatio,
+ PreserveAspectCrop = Qt::KeepAspectRatioByExpanding
+ };
+
+ enum Status
+ {
+ UnknownStatus = QMediaPlayer::UnknownMediaStatus,
+ NoMedia = QMediaPlayer::NoMedia,
+ Loading = QMediaPlayer::LoadingMedia,
+ Loaded = QMediaPlayer::LoadedMedia,
+ Stalled = QMediaPlayer::StalledMedia,
+ Buffering = QMediaPlayer::BufferingMedia,
+ Buffered = QMediaPlayer::BufferedMedia,
+ EndOfMedia = QMediaPlayer::EndOfMedia,
+ InvalidMedia = QMediaPlayer::InvalidMedia
+ };
+
+ enum Error
+ {
+ NoError = QMediaPlayer::NoError,
+ ResourceError = QMediaPlayer::ResourceError,
+ FormatError = QMediaPlayer::FormatError,
+ NetworkError = QMediaPlayer::NetworkError,
+ AccessDenied = QMediaPlayer::AccessDeniedError,
+ ServiceMissing = QMediaPlayer::ServiceMissingError
+ };
+
+ QDeclarativeVideo(QDeclarativeItem *parent = 0);
+ ~QDeclarativeVideo();
+
+ bool hasAudio() const;
+ bool hasVideo() const;
+
+ FillMode fillMode() const;
+ void setFillMode(FillMode mode);
+
+ Status status() const;
+ Error error() const;
+
+ void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
+
+public Q_SLOTS:
+ void play();
+ void pause();
+ void stop();
+
+Q_SIGNALS:
+ void sourceChanged();
+
+ void playingChanged();
+ void pausedChanged();
+
+ void started();
+ void resumed();
+ void paused();
+ void stopped();
+
+ void statusChanged();
+
+ void loaded();
+ void buffering();
+ void stalled();
+ void buffered();
+ void endOfMedia();
+
+ void durationChanged();
+ void positionChanged();
+
+ void volumeChanged();
+ void mutedChanged();
+ void hasAudioChanged();
+ void hasVideoChanged();
+
+ void bufferProgressChanged();
+
+ void seekableChanged();
+ void playbackRateChanged();
+
+ void errorChanged();
+ void error(QDeclarativeVideo::Error error, const QString &errorString);
+
+protected:
+ void geometryChanged(const QRectF &geometry, const QRectF &);
+
+private Q_SLOTS:
+ void _q_nativeSizeChanged(const QSizeF &size);
+ void _q_error(int, const QString &);
+
+private:
+ Q_DISABLE_COPY(QDeclarativeVideo)
+
+ QGraphicsVideoItem *m_graphicsItem;
+
+ Q_PRIVATE_SLOT(mediaBase(), void _q_stateChanged(QMediaPlayer::State))
+ Q_PRIVATE_SLOT(mediaBase(), void _q_mediaStatusChanged(QMediaPlayer::MediaStatus))
+ Q_PRIVATE_SLOT(mediaBase(), void _q_metaDataChanged())
+
+ inline QDeclarativeMediaBase *mediaBase() { return this; }
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativeVideo))
+
+QT_END_HEADER
+
+#endif
diff --git a/src/imports/multimedia/qmetadatacontrolmetaobject.cpp b/src/imports/multimedia/qmetadatacontrolmetaobject.cpp
new file mode 100644
index 0000000000..e90cbd6021
--- /dev/null
+++ b/src/imports/multimedia/qmetadatacontrolmetaobject.cpp
@@ -0,0 +1,362 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qmetadatacontrolmetaobject_p.h"
+#include <QtMultimedia/qmetadatacontrol.h>
+
+
+QT_BEGIN_NAMESPACE
+
+// copied from qmetaobject.cpp
+// do not touch without touching the moc as well
+enum PropertyFlags {
+ Invalid = 0x00000000,
+ Readable = 0x00000001,
+ Writable = 0x00000002,
+ Resettable = 0x00000004,
+ EnumOrFlag = 0x00000008,
+ StdCppSet = 0x00000100,
+// Override = 0x00000200,
+ Designable = 0x00001000,
+ ResolveDesignable = 0x00002000,
+ Scriptable = 0x00004000,
+ ResolveScriptable = 0x00008000,
+ Stored = 0x00010000,
+ ResolveStored = 0x00020000,
+ Editable = 0x00040000,
+ ResolveEditable = 0x00080000,
+ User = 0x00100000,
+ ResolveUser = 0x00200000,
+ Notify = 0x00400000,
+ Dynamic = 0x00800000
+};
+
+enum MethodFlags {
+ AccessPrivate = 0x00,
+ AccessProtected = 0x01,
+ AccessPublic = 0x02,
+ AccessMask = 0x03, //mask
+
+ MethodMethod = 0x00,
+ MethodSignal = 0x04,
+ MethodSlot = 0x08,
+ MethodConstructor = 0x0c,
+ MethodTypeMask = 0x0c,
+
+ MethodCompatibility = 0x10,
+ MethodCloned = 0x20,
+ MethodScriptable = 0x40
+};
+
+struct QMetaObjectPrivate
+{
+ int revision;
+ int className;
+ int classInfoCount, classInfoData;
+ int methodCount, methodData;
+ int propertyCount, propertyData;
+ int enumeratorCount, enumeratorData;
+ int constructorCount, constructorData;
+ int flags;
+};
+
+static inline const QMetaObjectPrivate *priv(const uint* m_data)
+{ return reinterpret_cast<const QMetaObjectPrivate*>(m_data); }
+// end of copied lines from qmetaobject.cpp
+
+namespace
+{
+ struct MetaDataKey
+ {
+ QtMultimedia::MetaData key;
+ const char *name;
+ };
+
+ const MetaDataKey qt_metaDataKeys[] =
+ {
+ { QtMultimedia::Title, "title" },
+ { QtMultimedia::SubTitle, "subTitle" },
+ { QtMultimedia::Author, "author" },
+ { QtMultimedia::Comment, "comment" },
+ { QtMultimedia::Description, "description" },
+ { QtMultimedia::Category, "category" },
+ { QtMultimedia::Genre, "genre" },
+ { QtMultimedia::Year, "year" },
+ { QtMultimedia::Date, "date" },
+ { QtMultimedia::UserRating, "userRating" },
+ { QtMultimedia::Keywords, "keywords" },
+ { QtMultimedia::Language, "language" },
+ { QtMultimedia::Publisher, "publisher" },
+ { QtMultimedia::Copyright, "copyright" },
+ { QtMultimedia::ParentalRating, "parentalRating" },
+ { QtMultimedia::RatingOrganisation, "ratingOrganisation" },
+
+ // Media
+ { QtMultimedia::Size, "size" },
+ { QtMultimedia::MediaType, "mediaType" },
+// { QtMultimedia::Duration, "duration" },
+
+ // Audio
+ { QtMultimedia::AudioBitRate, "audioBitRate" },
+ { QtMultimedia::AudioCodec, "audioCodec" },
+ { QtMultimedia::AverageLevel, "averageLevel" },
+ { QtMultimedia::ChannelCount, "channelCount" },
+ { QtMultimedia::PeakValue, "peakValue" },
+ { QtMultimedia::SampleRate, "sampleRate" },
+
+ // Music
+ { QtMultimedia::AlbumTitle, "albumTitle" },
+ { QtMultimedia::AlbumArtist, "albumArtist" },
+ { QtMultimedia::ContributingArtist, "contributingArtist" },
+ { QtMultimedia::Composer, "composer" },
+ { QtMultimedia::Conductor, "conductor" },
+ { QtMultimedia::Lyrics, "lyrics" },
+ { QtMultimedia::Mood, "mood" },
+ { QtMultimedia::TrackNumber, "trackNumber" },
+ { QtMultimedia::TrackCount, "trackCount" },
+
+ { QtMultimedia::CoverArtUrlSmall, "coverArtUrlSmall" },
+ { QtMultimedia::CoverArtUrlLarge, "coverArtUrlLarge" },
+
+ // Image/Video
+ { QtMultimedia::Resolution, "resolution" },
+ { QtMultimedia::PixelAspectRatio, "pixelAspectRatio" },
+
+ // Video
+ { QtMultimedia::VideoFrameRate, "videoFrameRate" },
+ { QtMultimedia::VideoBitRate, "videoBitRate" },
+ { QtMultimedia::VideoCodec, "videoCodec" },
+
+ { QtMultimedia::PosterUrl, "posterUrl" },
+
+ // Movie
+ { QtMultimedia::ChapterNumber, "chapterNumber" },
+ { QtMultimedia::Director, "director" },
+ { QtMultimedia::LeadPerformer, "leadPerformer" },
+ { QtMultimedia::Writer, "writer" },
+
+ // Photos
+ { QtMultimedia::CameraManufacturer, "cameraManufacturer" },
+ { QtMultimedia::CameraModel, "cameraModel" },
+ { QtMultimedia::Event, "event" },
+ { QtMultimedia::Subject, "subject" },
+ { QtMultimedia::Orientation, "orientation" },
+ { QtMultimedia::ExposureTime, "exposureTime" },
+ { QtMultimedia::FNumber, "fNumber" },
+ { QtMultimedia::ExposureProgram, "exposureProgram" },
+ { QtMultimedia::ISOSpeedRatings, "isoSpeedRatings" },
+ { QtMultimedia::ExposureBiasValue, "exposureBiasValue" },
+ { QtMultimedia::DateTimeOriginal, "dateTimeOriginal" },
+ { QtMultimedia::DateTimeDigitized, "dateTimeDigitized" },
+ { QtMultimedia::SubjectDistance, "subjectDistance" },
+ { QtMultimedia::MeteringMode, "meteringMode" },
+ { QtMultimedia::LightSource, "lightSource" },
+ { QtMultimedia::Flash, "flash" },
+ { QtMultimedia::FocalLength, "focalLength" },
+ { QtMultimedia::ExposureMode, "exposureMode" },
+ { QtMultimedia::WhiteBalance, "whiteBalance" },
+ { QtMultimedia::DigitalZoomRatio, "digitalZoomRatio" },
+ { QtMultimedia::FocalLengthIn35mmFilm, "focalLengthIn35mmFilm" },
+ { QtMultimedia::SceneCaptureType, "sceneCaptureType" },
+ { QtMultimedia::GainControl, "gainControl" },
+ { QtMultimedia::Contrast, "contrast" },
+ { QtMultimedia::Saturation, "saturation" },
+ { QtMultimedia::Sharpness, "sharpness" },
+ { QtMultimedia::DeviceSettingDescription, "deviceSettingDescription" }
+ };
+
+ class QMetaDataControlObject : public QObject
+ {
+ public:
+ inline QObjectData *data() { return d_ptr.data(); }
+ };
+}
+
+QMetaDataControlMetaObject::QMetaDataControlMetaObject(QMetaDataControl *control, QObject *object)
+ : m_control(control)
+ , m_object(object)
+ , m_string(0)
+ , m_data(0)
+ , m_propertyOffset(0)
+ , m_signalOffset(0)
+{
+ const QMetaObject *superClass = m_object->metaObject();
+
+ const int propertyCount = sizeof(qt_metaDataKeys) / sizeof(MetaDataKey);
+ const int dataSize = sizeof(uint)
+ * (13 // QMetaObjectPrivate members.
+ + 5 // 5 members per signal.
+ + 4 * propertyCount // 3 members per property + 1 notify signal per property.
+ + 1); // Terminating value.
+
+ m_data = reinterpret_cast<uint *>(qMalloc(dataSize));
+
+ QMetaObjectPrivate *pMeta = reinterpret_cast<QMetaObjectPrivate *>(m_data);
+
+ pMeta->revision = 3;
+ pMeta->className = 0;
+ pMeta->classInfoCount = 0;
+ pMeta->classInfoData = 0;
+ pMeta->methodCount = 1;
+ pMeta->methodData = 13;
+ pMeta->propertyCount = propertyCount;
+ pMeta->propertyData = 18;
+ pMeta->enumeratorCount = 0;
+ pMeta->enumeratorData = 0;
+ pMeta->constructorCount = 0;
+ pMeta->constructorData = 0;
+ pMeta->flags = 0x01; // Dynamic meta object flag.
+
+ const int classNameSize = qstrlen(superClass->className()) + 1;
+
+ int stringIndex = classNameSize + 1;
+
+ // __metaDataChanged() signal.
+ static const char *changeSignal = "__metaDataChanged()";
+ const int changeSignalSize = qstrlen(changeSignal) + 1;
+
+ m_data[13] = stringIndex; // Signature.
+ m_data[14] = classNameSize; // Parameters.
+ m_data[15] = classNameSize; // Type.
+ m_data[16] = classNameSize; // Tag.
+ m_data[17] = MethodSignal | AccessProtected; // Flags.
+
+ stringIndex += changeSignalSize;
+
+ const char *qvariantName = "QVariant";
+ const int qvariantSize = qstrlen(qvariantName) + 1;
+ const int qvariantIndex = stringIndex;
+
+ stringIndex += qvariantSize;
+
+ // Properties.
+ for (int i = 0; i < propertyCount; ++i) {
+ m_data[18 + 3 * i] = stringIndex; // Name.
+ m_data[19 + 3 * i] = qvariantIndex; // Type.
+ m_data[20 + 3 * i]
+ = Readable | Writable | Notify | Dynamic | (0xffffffff << 24); // Flags.
+ m_data[18 + propertyCount * 3 + i] = 0; // Notify signal.
+
+ stringIndex += qstrlen(qt_metaDataKeys[i].name) + 1;
+ }
+
+ // Terminating value.
+ m_data[18 + propertyCount * 4] = 0;
+
+ // Build string.
+ m_string = reinterpret_cast<char *>(qMalloc(stringIndex + 1));
+
+ // Class name.
+ qMemCopy(m_string, superClass->className(), classNameSize);
+
+ stringIndex = classNameSize;
+
+ // Null m_string.
+ m_string[stringIndex] = '\0';
+ stringIndex += 1;
+
+ // __metaDataChanged() signal.
+ qMemCopy(m_string + stringIndex, changeSignal, changeSignalSize);
+ stringIndex += changeSignalSize;
+
+ qMemCopy(m_string + stringIndex, qvariantName, qvariantSize);
+ stringIndex += qvariantSize;
+
+ // Properties.
+ for (int i = 0; i < propertyCount; ++i) {
+ const int propertyNameSize = qstrlen(qt_metaDataKeys[i].name) + 1;
+
+ qMemCopy(m_string + stringIndex, qt_metaDataKeys[i].name, propertyNameSize);
+ stringIndex += propertyNameSize;
+ }
+
+ // Terminating character.
+ m_string[stringIndex] = '\0';
+
+ d.superdata = superClass;
+ d.stringdata = m_string;
+ d.data = m_data;
+ d.extradata = 0;
+
+ static_cast<QMetaDataControlObject *>(m_object)->data()->metaObject = this;
+
+ m_propertyOffset = propertyOffset();
+ m_signalOffset = methodOffset();
+}
+
+QMetaDataControlMetaObject::~QMetaDataControlMetaObject()
+{
+ static_cast<QMetaDataControlObject *>(m_object)->data()->metaObject = 0;
+
+ qFree(m_data);
+ qFree(m_string);
+}
+
+int QMetaDataControlMetaObject::metaCall(QMetaObject::Call c, int id, void **a)
+{
+ if (c == QMetaObject::ReadProperty && id >= m_propertyOffset) {
+ int propId = id - m_propertyOffset;
+
+ *reinterpret_cast<QVariant *>(a[0]) = m_control->metaData(qt_metaDataKeys[propId].key);
+
+ return -1;
+ } else if (c == QMetaObject::WriteProperty && id >= m_propertyOffset) {
+ int propId = id - m_propertyOffset;
+
+ m_control->setMetaData(qt_metaDataKeys[propId].key, *reinterpret_cast<QVariant *>(a[0]));
+
+ return -1;
+ } else {
+ return m_object->qt_metacall(c, id, a);
+ }
+}
+
+int QMetaDataControlMetaObject::createProperty(const char *, const char *)
+{
+ return -1;
+}
+
+void QMetaDataControlMetaObject::metaDataChanged()
+{
+ activate(m_object, m_signalOffset, 0);
+}
+
+QT_END_NAMESPACE
diff --git a/src/imports/multimedia/qmetadatacontrolmetaobject_p.h b/src/imports/multimedia/qmetadatacontrolmetaobject_p.h
new file mode 100644
index 0000000000..c381f2dcec
--- /dev/null
+++ b/src/imports/multimedia/qmetadatacontrolmetaobject_p.h
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMETADATACONTROLMETAOBJECT_P_H
+#define QMETADATACONTROLMETAOJBECT_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qmetaobject.h>
+#include <QtMultimedia/qtmedianamespace.h>
+
+#include <QtCore/private/qobject_p.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QMetaDataControl;
+
+class QMetaDataControlMetaObject : public QAbstractDynamicMetaObject
+{
+public:
+ QMetaDataControlMetaObject(QMetaDataControl *control, QObject *object);
+ ~QMetaDataControlMetaObject();
+
+ int metaCall(QMetaObject::Call call, int _id, void **arguments);
+ int createProperty(const char *, const char *);
+
+ void metaDataChanged();
+
+private:
+ QMetaDataControl *m_control;
+ QObject *m_object;
+ char *m_string;
+ uint *m_data;
+
+ int m_propertyOffset;
+ int m_signalOffset;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/imports/multimedia/qmldir b/src/imports/multimedia/qmldir
new file mode 100644
index 0000000000..0e6f6563f6
--- /dev/null
+++ b/src/imports/multimedia/qmldir
@@ -0,0 +1 @@
+plugin multimedia
diff --git a/src/imports/qimportbase.pri b/src/imports/qimportbase.pri
new file mode 100644
index 0000000000..5433059c19
--- /dev/null
+++ b/src/imports/qimportbase.pri
@@ -0,0 +1,33 @@
+TEMPLATE = lib
+CONFIG += qt plugin
+
+win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release
+
+isEmpty(TARGETPATH) {
+ error("qimportbase.pri: You must provide a TARGETPATH!")
+}
+isEmpty(TARGET) {
+ error("qimportbase.pri: You must provide a TARGET!")
+}
+
+QMLDIRFILE = $${_PRO_FILE_PWD_}/qmldir
+copy2build.input = QMLDIRFILE
+copy2build.output = $$QT_BUILD_TREE/imports/$$TARGETPATH/qmldir
+isEmpty(vcproj):copy2build.variable_out = PRE_TARGETDEPS
+copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
+copy2build.name = COPY ${QMAKE_FILE_IN}
+copy2build.CONFIG += no_link
+QMAKE_EXTRA_COMPILERS += copy2build
+
+TARGET = $$qtLibraryTarget($$TARGET)
+contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
+
+include(../../qt_targets.pri)
+
+wince*:LIBS += $$QMAKE_LIBS_GUI
+
+symbian: {
+ TARGET.EPOCALLOWDLLDATA=1
+ TARGET.CAPABILITY = All -Tcb
+ load(armcc_warnings)
+}
diff --git a/src/imports/webkit/plugin.cpp b/src/imports/webkit/plugin.cpp
new file mode 100644
index 0000000000..799fe9e9b3
--- /dev/null
+++ b/src/imports/webkit/plugin.cpp
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtDeclarative/qdeclarativeextensionplugin.h>
+#include <QtDeclarative/qdeclarative.h>
+
+#include "qdeclarativewebview_p.h"
+#include "qdeclarativewebview_p_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class WebKitQmlPlugin : public QDeclarativeExtensionPlugin
+{
+ Q_OBJECT
+public:
+ virtual void registerTypes(const char *uri)
+ {
+ Q_ASSERT(QLatin1String(uri) == QLatin1String("org.webkit"));
+ QML_REGISTER_NOCREATE_TYPE(QDeclarativeWebSettings);
+ qmlRegisterType<QDeclarativeWebView>(uri,1,0,"WebView");
+ }
+};
+
+QT_END_NAMESPACE
+
+#include "plugin.moc"
+
+Q_EXPORT_PLUGIN2(webkitqmlplugin, QT_PREPEND_NAMESPACE(WebKitQmlPlugin));
+
diff --git a/src/imports/webkit/qdeclarativewebview.cpp b/src/imports/webkit/qdeclarativewebview.cpp
new file mode 100644
index 0000000000..d78ba28312
--- /dev/null
+++ b/src/imports/webkit/qdeclarativewebview.cpp
@@ -0,0 +1,1340 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativewebview_p.h"
+#include "qdeclarativewebview_p_p.h"
+
+#include <private/qdeclarativepainteditem_p_p.h>
+
+#include <qdeclarative.h>
+#include <qdeclarativeengine.h>
+#include <private/qdeclarativestate_p.h>
+
+#include <QDebug>
+#include <QPen>
+#include <QFile>
+#include <QEvent>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <QBasicTimer>
+#include <QApplication>
+#include <QGraphicsSceneMouseEvent>
+#include <QtWebKit/QWebPage>
+#include <QtWebKit/QWebFrame>
+#include <QtWebKit/QWebElement>
+#include <QtWebKit/QWebSettings>
+#include <private/qlistmodelinterface_p.h>
+
+QT_BEGIN_NAMESPACE
+
+static const int MAX_DOUBLECLICK_TIME=500; // XXX need better gesture system
+
+class QDeclarativeWebViewPrivate : public QDeclarativePaintedItemPrivate
+{
+ Q_DECLARE_PUBLIC(QDeclarativeWebView)
+
+public:
+ QDeclarativeWebViewPrivate()
+ : QDeclarativePaintedItemPrivate(), page(0), preferredwidth(0), preferredheight(0),
+ progress(1.0), status(QDeclarativeWebView::Null), pending(PendingNone),
+ newWindowComponent(0), newWindowParent(0),
+ pressTime(400),
+ rendering(true)
+ {
+ }
+
+ QUrl url; // page url might be different if it has not loaded yet
+ QWebPage *page;
+
+ int preferredwidth, preferredheight;
+ qreal progress;
+ QDeclarativeWebView::Status status;
+ QString statusText;
+ enum { PendingNone, PendingUrl, PendingHtml, PendingContent } pending;
+ QUrl pending_url;
+ QString pending_string;
+ QByteArray pending_data;
+ mutable QDeclarativeWebSettings settings;
+ QDeclarativeComponent *newWindowComponent;
+ QDeclarativeItem *newWindowParent;
+
+ QBasicTimer pressTimer;
+ QPoint pressPoint;
+ int pressTime; // milliseconds before it's a "hold"
+
+
+ static void windowObjects_append(QDeclarativeListProperty<QObject> *prop, QObject *o) {
+ static_cast<QDeclarativeWebViewPrivate *>(prop->data)->windowObjects.append(o);
+ static_cast<QDeclarativeWebViewPrivate *>(prop->data)->updateWindowObjects();
+ }
+
+ void updateWindowObjects();
+ QObjectList windowObjects;
+
+ bool rendering;
+};
+
+/*!
+ \qmlclass WebView QDeclarativeWebView
+ \since 4.7
+ \brief The WebView item allows you to add web content to a canvas.
+ \inherits Item
+
+ A WebView renders web content based on a URL.
+
+ If the width and height of the item is not set, they will
+ dynamically adjust to a size appropriate for the content.
+ This width may be large for typical online web pages.
+
+ If the preferredWidth is set, the width will be this amount or larger,
+ usually laying out the web content to fit the preferredWidth.
+
+ \qml
+ import org.webkit 1.0
+
+ WebView {
+ url: "http://www.nokia.com"
+ width: 490
+ height: 400
+ scale: 0.5
+ smooth: false
+ smoothCache: true
+ }
+ \endqml
+
+ \image webview.png
+
+ The item includes no scrolling, scaling,
+ toolbars, etc., those must be implemented around WebView. See the WebBrowser example
+ for a demonstration of this.
+*/
+
+/*!
+ \internal
+ \class QDeclarativeWebView
+ \brief The QDeclarativeWebView class allows you to add web content to a QDeclarativeView.
+
+ A WebView renders web content base on a URL.
+
+ \image webview.png
+
+ The item includes no scrolling, scaling,
+ toolbars, etc., those must be implemented around WebView. See the WebBrowser example
+ for a demonstration of this.
+
+ A QDeclarativeWebView object can be instantiated in Qml using the tag \l WebView.
+*/
+
+QDeclarativeWebView::QDeclarativeWebView(QDeclarativeItem *parent)
+ : QDeclarativePaintedItem(*(new QDeclarativeWebViewPrivate), parent)
+{
+ init();
+}
+
+QDeclarativeWebView::~QDeclarativeWebView()
+{
+ Q_D(QDeclarativeWebView);
+ delete d->page;
+}
+
+void QDeclarativeWebView::init()
+{
+ Q_D(QDeclarativeWebView);
+
+ QWebSettings::enablePersistentStorage();
+
+ setAcceptHoverEvents(true);
+ setAcceptedMouseButtons(Qt::LeftButton);
+ setFlag(QGraphicsItem::ItemHasNoContents, false);
+
+ d->page = 0;
+}
+
+void QDeclarativeWebView::componentComplete()
+{
+ QDeclarativePaintedItem::componentComplete();
+ Q_D(QDeclarativeWebView);
+ switch (d->pending) {
+ case QDeclarativeWebViewPrivate::PendingUrl:
+ setUrl(d->pending_url);
+ break;
+ case QDeclarativeWebViewPrivate::PendingHtml:
+ setHtml(d->pending_string, d->pending_url);
+ break;
+ case QDeclarativeWebViewPrivate::PendingContent:
+ setContent(d->pending_data, d->pending_string, d->pending_url);
+ break;
+ default:
+ break;
+ }
+ d->pending = QDeclarativeWebViewPrivate::PendingNone;
+ d->updateWindowObjects();
+}
+
+QDeclarativeWebView::Status QDeclarativeWebView::status() const
+{
+ Q_D(const QDeclarativeWebView);
+ return d->status;
+}
+
+
+/*!
+ \qmlproperty real WebView::progress
+ This property holds the progress of loading the current URL, from 0 to 1.
+
+ If you just want to know when progress gets to 1, use
+ WebView::onLoadFinished() or WebView::onLoadFailed() instead.
+*/
+qreal QDeclarativeWebView::progress() const
+{
+ Q_D(const QDeclarativeWebView);
+ return d->progress;
+}
+
+void QDeclarativeWebView::doLoadStarted()
+{
+ Q_D(QDeclarativeWebView);
+
+ if (!d->url.isEmpty()) {
+ d->status = Loading;
+ emit statusChanged(d->status);
+ }
+ emit loadStarted();
+}
+
+void QDeclarativeWebView::doLoadProgress(int p)
+{
+ Q_D(QDeclarativeWebView);
+ if (d->progress == p/100.0)
+ return;
+ d->progress = p/100.0;
+ emit progressChanged();
+}
+
+void QDeclarativeWebView::pageUrlChanged()
+{
+ Q_D(QDeclarativeWebView);
+
+ page()->setViewportSize(QSize(
+ d->preferredwidth>0 ? d->preferredwidth : width(),
+ d->preferredheight>0 ? d->preferredheight : height()));
+ expandToWebPage();
+
+ if ((d->url.isEmpty() && page()->mainFrame()->url() != QUrl(QLatin1String("about:blank")))
+ || (d->url != page()->mainFrame()->url() && !page()->mainFrame()->url().isEmpty()))
+ {
+ d->url = page()->mainFrame()->url();
+ if (d->url == QUrl(QLatin1String("about:blank")))
+ d->url = QUrl();
+ emit urlChanged();
+ }
+}
+
+void QDeclarativeWebView::doLoadFinished(bool ok)
+{
+ Q_D(QDeclarativeWebView);
+
+ if (title().isEmpty())
+ pageUrlChanged(); // XXX bug 232556 - pages with no title never get urlChanged()
+
+ if (ok) {
+ d->status = d->url.isEmpty() ? Null : Ready;
+ emit loadFinished();
+ } else {
+ d->status = Error;
+ emit loadFailed();
+ }
+ emit statusChanged(d->status);
+}
+
+/*!
+ \qmlproperty url WebView::url
+ This property holds the URL to the page displayed in this item. It can be set,
+ but also can change spontaneously (eg. because of network redirection).
+
+ If the url is empty, the page is blank.
+
+ The url is always absolute (QML will resolve relative URL strings in the context
+ of the containing QML document).
+*/
+QUrl QDeclarativeWebView::url() const
+{
+ Q_D(const QDeclarativeWebView);
+ return d->url;
+}
+
+void QDeclarativeWebView::setUrl(const QUrl &url)
+{
+ Q_D(QDeclarativeWebView);
+ if (url == d->url)
+ return;
+
+ if (isComponentComplete()) {
+ d->url = url;
+ page()->setViewportSize(QSize(
+ d->preferredwidth>0 ? d->preferredwidth : width(),
+ d->preferredheight>0 ? d->preferredheight : height()));
+ QUrl seturl = url;
+ if (seturl.isEmpty())
+ seturl = QUrl(QLatin1String("about:blank"));
+
+ Q_ASSERT(!seturl.isRelative());
+
+ page()->mainFrame()->load(seturl);
+
+ emit urlChanged();
+ } else {
+ d->pending = d->PendingUrl;
+ d->pending_url = url;
+ }
+}
+
+/*!
+ \qmlproperty int WebView::preferredWidth
+ This property holds the ideal width for displaying the current URL.
+*/
+int QDeclarativeWebView::preferredWidth() const
+{
+ Q_D(const QDeclarativeWebView);
+ return d->preferredwidth;
+}
+
+void QDeclarativeWebView::setPreferredWidth(int iw)
+{
+ Q_D(QDeclarativeWebView);
+ if (d->preferredwidth == iw) return;
+ d->preferredwidth = iw;
+ //expandToWebPage();
+ emit preferredWidthChanged();
+}
+
+/*!
+ \qmlproperty int WebView::preferredHeight
+ This property holds the ideal height for displaying the current URL.
+ This only affects the area zoomed by heuristicZoom().
+*/
+int QDeclarativeWebView::preferredHeight() const
+{
+ Q_D(const QDeclarativeWebView);
+ return d->preferredheight;
+}
+void QDeclarativeWebView::setPreferredHeight(int ih)
+{
+ Q_D(QDeclarativeWebView);
+ if (d->preferredheight == ih) return;
+ d->preferredheight = ih;
+ emit preferredHeightChanged();
+}
+
+/*!
+ \qmlmethod bool WebView::evaluateJavaScript(string)
+
+ Evaluates the \a scriptSource JavaScript inside the context of the
+ main web frame, and returns the result of the last executed statement.
+
+ Note that this JavaScript does \e not have any access to QML objects
+ except as made available as windowObjects.
+*/
+QVariant QDeclarativeWebView::evaluateJavaScript(const QString &scriptSource)
+{
+ return this->page()->mainFrame()->evaluateJavaScript(scriptSource);
+}
+
+void QDeclarativeWebView::focusChanged(bool hasFocus)
+{
+ QFocusEvent e(hasFocus ? QEvent::FocusIn : QEvent::FocusOut);
+ page()->event(&e);
+ QDeclarativeItem::focusChanged(hasFocus);
+}
+
+void QDeclarativeWebView::initialLayout()
+{
+ // nothing useful to do at this point
+}
+
+void QDeclarativeWebView::noteContentsSizeChanged(const QSize&)
+{
+ expandToWebPage();
+}
+
+void QDeclarativeWebView::expandToWebPage()
+{
+ Q_D(QDeclarativeWebView);
+ QSize cs = page()->mainFrame()->contentsSize();
+ if (cs.width() < d->preferredwidth)
+ cs.setWidth(d->preferredwidth);
+ if (cs.height() < d->preferredheight)
+ cs.setHeight(d->preferredheight);
+ if (widthValid())
+ cs.setWidth(width());
+ if (heightValid())
+ cs.setHeight(height());
+ if (cs != page()->viewportSize()) {
+ page()->setViewportSize(cs);
+ }
+ if (cs != contentsSize())
+ setContentsSize(cs);
+}
+
+void QDeclarativeWebView::geometryChanged(const QRectF &newGeometry,
+ const QRectF &oldGeometry)
+{
+ if (newGeometry.size() != oldGeometry.size())
+ expandToWebPage();
+ QDeclarativePaintedItem::geometryChanged(newGeometry, oldGeometry);
+}
+
+void QDeclarativeWebView::paintPage(const QRect& r)
+{
+ dirtyCache(r);
+ update();
+}
+
+/*!
+ \qmlproperty list<object> WebView::javaScriptWindowObjects
+
+ This property is a list of object that are available from within
+ the webview's JavaScript context.
+
+ The \a object will be inserted as a child of the frame's window
+ object, under the name given by the attached property \c WebView.windowObjectName.
+
+ \qml
+ WebView {
+ javaScriptWindowObjects: Object {
+ WebView.windowObjectName: "coordinates"
+ }
+ }
+ \endqml
+
+ Properties of the object will be exposed as JavaScript properties and slots as
+ JavaScript methods.
+
+ If Javascript is not enabled for this page, then this property does nothing.
+*/
+QDeclarativeListProperty<QObject> QDeclarativeWebView::javaScriptWindowObjects()
+{
+ Q_D(QDeclarativeWebView);
+ return QDeclarativeListProperty<QObject>(this, d, &QDeclarativeWebViewPrivate::windowObjects_append);
+}
+
+QDeclarativeWebViewAttached *QDeclarativeWebView::qmlAttachedProperties(QObject *o)
+{
+ return new QDeclarativeWebViewAttached(o);
+}
+
+void QDeclarativeWebViewPrivate::updateWindowObjects()
+{
+ Q_Q(QDeclarativeWebView);
+ if (!q->isComponentComplete() || !page)
+ return;
+
+ for (int ii = 0; ii < windowObjects.count(); ++ii) {
+ QObject *object = windowObjects.at(ii);
+ QDeclarativeWebViewAttached *attached = static_cast<QDeclarativeWebViewAttached *>(qmlAttachedPropertiesObject<QDeclarativeWebView>(object));
+ if (attached && !attached->windowObjectName().isEmpty()) {
+ page->mainFrame()->addToJavaScriptWindowObject(attached->windowObjectName(), object);
+ }
+ }
+}
+
+bool QDeclarativeWebView::renderingEnabled() const
+{
+ Q_D(const QDeclarativeWebView);
+ return d->rendering;
+}
+
+void QDeclarativeWebView::setRenderingEnabled(bool enabled)
+{
+ Q_D(QDeclarativeWebView);
+ if (d->rendering == enabled)
+ return;
+ d->rendering = enabled;
+ emit renderingEnabledChanged();
+
+ setCacheFrozen(!enabled);
+ if (enabled)
+ clearCache();
+}
+
+
+void QDeclarativeWebView::drawContents(QPainter *p, const QRect &r)
+{
+ Q_D(QDeclarativeWebView);
+ if (d->rendering)
+ page()->mainFrame()->render(p,r);
+}
+
+QMouseEvent *QDeclarativeWebView::sceneMouseEventToMouseEvent(QGraphicsSceneMouseEvent *e)
+{
+ QEvent::Type t;
+ switch(e->type()) {
+ default:
+ case QEvent::GraphicsSceneMousePress:
+ t = QEvent::MouseButtonPress;
+ break;
+ case QEvent::GraphicsSceneMouseRelease:
+ t = QEvent::MouseButtonRelease;
+ break;
+ case QEvent::GraphicsSceneMouseMove:
+ t = QEvent::MouseMove;
+ break;
+ case QGraphicsSceneEvent::GraphicsSceneMouseDoubleClick:
+ t = QEvent::MouseButtonDblClick;
+ break;
+ }
+
+ QMouseEvent *me = new QMouseEvent(t, (e->pos()/contentsScale()).toPoint(), e->button(), e->buttons(), 0);
+ return me;
+}
+
+QMouseEvent *QDeclarativeWebView::sceneHoverMoveEventToMouseEvent(QGraphicsSceneHoverEvent *e)
+{
+ QEvent::Type t = QEvent::MouseMove;
+
+ QMouseEvent *me = new QMouseEvent(t, (e->pos()/contentsScale()).toPoint(), Qt::NoButton, Qt::NoButton, 0);
+
+ return me;
+}
+
+
+/*!
+ \qmlsignal WebView::onDoubleClick(clickx,clicky)
+
+ The WebView does not pass double-click events to the web engine, but rather
+ emits this signals.
+*/
+
+void QDeclarativeWebView::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
+{
+ QMouseEvent *me = sceneMouseEventToMouseEvent(event);
+ emit doubleClick(me->x(),me->y());
+ delete me;
+}
+
+/*!
+ \qmlmethod bool WebView::heuristicZoom(clickX,clickY,maxzoom)
+
+ Finds a zoom that:
+ \list
+ \i shows a whole item
+ \i includes (\a clickX, \a clickY)
+ \i fits into the preferredWidth and preferredHeight
+ \i zooms by no more than \a maxzoom
+ \i is more than 10% above the current zoom
+ \endlist
+
+ If such a zoom exists, emits zoomTo(zoom,centerX,centerY) and returns true; otherwise,
+ no signal is emitted and returns false.
+*/
+bool QDeclarativeWebView::heuristicZoom(int clickX, int clickY, qreal maxzoom)
+{
+ Q_D(QDeclarativeWebView);
+ if (contentsScale() >= maxzoom/zoomFactor())
+ return false;
+ qreal ozf = contentsScale();
+ QRect showarea = elementAreaAt(clickX, clickY, d->preferredwidth/maxzoom, d->preferredheight/maxzoom);
+ qreal z = qMin(qreal(d->preferredwidth)/showarea.width(),qreal(d->preferredheight)/showarea.height());
+ if (z > maxzoom/zoomFactor())
+ z = maxzoom/zoomFactor();
+ if (z/ozf > 1.2) {
+ QRectF r(showarea.left()*z, showarea.top()*z, showarea.width()*z, showarea.height()*z);
+ emit zoomTo(z,r.x()+r.width()/2, r.y()+r.height()/2);
+ return true;
+ } else {
+ return false;
+ }
+}
+
+/*!
+ \qmlproperty int WebView::pressGrabTime
+
+ The number of milliseconds the user must press before the WebView
+ starts passing move events through to the web engine (rather than
+ letting other QML elements such as a Flickable take them).
+
+ Defaults to 400ms. Set to 0 to always grab and pass move events to
+ the web engine.
+*/
+int QDeclarativeWebView::pressGrabTime() const
+{
+ Q_D(const QDeclarativeWebView);
+ return d->pressTime;
+}
+
+void QDeclarativeWebView::setPressGrabTime(int ms)
+{
+ Q_D(QDeclarativeWebView);
+ if (d->pressTime == ms)
+ return;
+ d->pressTime = ms;
+ emit pressGrabTimeChanged();
+}
+
+void QDeclarativeWebView::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeWebView);
+
+ setFocus (true);
+ QMouseEvent *me = sceneMouseEventToMouseEvent(event);
+
+ d->pressPoint = me->pos();
+ if (d->pressTime) {
+ d->pressTimer.start(d->pressTime,this);
+ setKeepMouseGrab(false);
+ } else {
+ grabMouse();
+ setKeepMouseGrab(true);
+ }
+
+ page()->event(me);
+ event->setAccepted(
+/*
+ It is not correct to send the press event upwards, if it is not accepted by WebKit
+ e.g. push button does not work, if done so as QGraphicsScene will not send the release event at all to WebKit
+ Might be a bug in WebKit, though
+ */
+#if 1 //QT_VERSION <= 0x040500 // XXX see bug 230835
+ true
+#else
+ me->isAccepted()
+#endif
+ );
+ delete me;
+ if (!event->isAccepted()) {
+ QDeclarativePaintedItem::mousePressEvent(event);
+ }
+}
+
+void QDeclarativeWebView::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeWebView);
+
+ QMouseEvent *me = sceneMouseEventToMouseEvent(event);
+ page()->event(me);
+ d->pressTimer.stop();
+ event->setAccepted(
+/*
+ It is not correct to send the press event upwards, if it is not accepted by WebKit
+ e.g. push button does not work, if done so as QGraphicsScene will not send all the events to WebKit
+ */
+#if 1 //QT_VERSION <= 0x040500 // XXX see bug 230835
+ true
+#else
+ me->isAccepted()
+#endif
+ );
+ delete me;
+ if (!event->isAccepted()) {
+ QDeclarativePaintedItem::mouseReleaseEvent(event);
+ }
+ setKeepMouseGrab(false);
+ ungrabMouse();
+}
+
+void QDeclarativeWebView::timerEvent(QTimerEvent *event)
+{
+ Q_D(QDeclarativeWebView);
+ if (event->timerId() == d->pressTimer.timerId()) {
+ d->pressTimer.stop();
+ grabMouse();
+ setKeepMouseGrab(true);
+ }
+}
+
+void QDeclarativeWebView::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeWebView);
+
+ QMouseEvent *me = sceneMouseEventToMouseEvent(event);
+ if (d->pressTimer.isActive()) {
+ if ((me->pos() - d->pressPoint).manhattanLength() > QApplication::startDragDistance()) {
+ d->pressTimer.stop();
+ }
+ }
+ if (keepMouseGrab()) {
+ page()->event(me);
+ event->setAccepted(
+/*
+ It is not correct to send the press event upwards, if it is not accepted by WebKit
+ e.g. push button does not work, if done so as QGraphicsScene will not send the release event at all to WebKit
+ Might be a bug in WebKit, though
+ */
+#if 1 // QT_VERSION <= 0x040500 // XXX see bug 230835
+ true
+#else
+ me->isAccepted()
+#endif
+ );
+ }
+ delete me;
+ if (!event->isAccepted())
+ QDeclarativePaintedItem::mouseMoveEvent(event);
+
+}
+void QDeclarativeWebView::hoverMoveEvent (QGraphicsSceneHoverEvent * event)
+{
+ QMouseEvent *me = sceneHoverMoveEventToMouseEvent(event);
+ page()->event(me);
+ event->setAccepted(
+#if QT_VERSION <= 0x040500 // XXX see bug 230835
+ true
+#else
+ me->isAccepted()
+#endif
+ );
+ delete me;
+ if (!event->isAccepted())
+ QDeclarativePaintedItem::hoverMoveEvent(event);
+}
+
+void QDeclarativeWebView::keyPressEvent(QKeyEvent* event)
+{
+ page()->event(event);
+ if (!event->isAccepted())
+ QDeclarativePaintedItem::keyPressEvent(event);
+}
+
+void QDeclarativeWebView::keyReleaseEvent(QKeyEvent* event)
+{
+ page()->event(event);
+ if (!event->isAccepted())
+ QDeclarativePaintedItem::keyReleaseEvent(event);
+}
+
+bool QDeclarativeWebView::sceneEvent(QEvent *event)
+{
+ if (event->type() == QEvent::KeyPress) {
+ QKeyEvent *k = static_cast<QKeyEvent *>(event);
+ if (k->key() == Qt::Key_Tab || k->key() == Qt::Key_Backtab) {
+ if (!(k->modifiers() & (Qt::ControlModifier | Qt::AltModifier))) { //### Add MetaModifier?
+ page()->event(event);
+ if (event->isAccepted())
+ return true;
+ }
+ }
+ }
+ return QDeclarativePaintedItem::sceneEvent(event);
+}
+
+
+/*!
+ \qmlproperty action WebView::back
+ This property holds the action for causing the previous URL in the history to be displayed.
+*/
+QAction *QDeclarativeWebView::backAction() const
+{
+ return page()->action(QWebPage::Back);
+}
+
+/*!
+ \qmlproperty action WebView::forward
+ This property holds the action for causing the next URL in the history to be displayed.
+*/
+QAction *QDeclarativeWebView::forwardAction() const
+{
+ return page()->action(QWebPage::Forward);
+}
+
+/*!
+ \qmlproperty action WebView::reload
+ This property holds the action for reloading with the current URL
+*/
+QAction *QDeclarativeWebView::reloadAction() const
+{
+ return page()->action(QWebPage::Reload);
+}
+
+/*!
+ \qmlproperty action WebView::stop
+ This property holds the action for stopping loading with the current URL
+*/
+QAction *QDeclarativeWebView::stopAction() const
+{
+ return page()->action(QWebPage::Stop);
+}
+
+/*!
+ \qmlproperty real WebView::title
+ This property holds the title of the web page currently viewed
+
+ By default, this property contains an empty string.
+*/
+QString QDeclarativeWebView::title() const
+{
+ return page()->mainFrame()->title();
+}
+
+
+
+/*!
+ \qmlproperty pixmap WebView::icon
+ This property holds the icon associated with the web page currently viewed
+*/
+QPixmap QDeclarativeWebView::icon() const
+{
+ return page()->mainFrame()->icon().pixmap(QSize(256,256));
+}
+
+
+/*!
+ \qmlproperty real WebView::zoomFactor
+ This property holds the multiplier used to scale the contents of a Web page.
+*/
+void QDeclarativeWebView::setZoomFactor(qreal factor)
+{
+ Q_D(QDeclarativeWebView);
+ if (factor == page()->mainFrame()->zoomFactor())
+ return;
+
+ page()->mainFrame()->setZoomFactor(factor);
+ page()->setViewportSize(QSize(
+ d->preferredwidth>0 ? d->preferredwidth*factor : width()*factor,
+ d->preferredheight>0 ? d->preferredheight*factor : height()*factor));
+ expandToWebPage();
+
+ emit zoomFactorChanged();
+}
+
+qreal QDeclarativeWebView::zoomFactor() const
+{
+ return page()->mainFrame()->zoomFactor();
+}
+
+/*!
+ \qmlproperty string WebView::statusText
+
+ This property is the current status suggested by the current web page. In a web browser,
+ such status is often shown in some kind of status bar.
+*/
+void QDeclarativeWebView::setStatusText(const QString& s)
+{
+ Q_D(QDeclarativeWebView);
+ d->statusText = s;
+ emit statusTextChanged();
+}
+
+void QDeclarativeWebView::windowObjectCleared()
+{
+ Q_D(QDeclarativeWebView);
+ d->updateWindowObjects();
+}
+
+QString QDeclarativeWebView::statusText() const
+{
+ Q_D(const QDeclarativeWebView);
+ return d->statusText;
+}
+
+QWebPage *QDeclarativeWebView::page() const
+{
+ Q_D(const QDeclarativeWebView);
+
+ if (!d->page) {
+ QDeclarativeWebView *self = const_cast<QDeclarativeWebView*>(this);
+ QWebPage *wp = new QDeclarativeWebPage(self);
+
+ // QML items don't default to having a background,
+ // even though most we pages will set one anyway.
+ QPalette pal = QApplication::palette();
+ pal.setBrush(QPalette::Base, QColor::fromRgbF(0, 0, 0, 0));
+ wp->setPalette(pal);
+
+ wp->setNetworkAccessManager(qmlEngine(this)->networkAccessManager());
+
+ self->setPage(wp);
+
+ return wp;
+ }
+
+ return d->page;
+}
+
+
+// The QObject interface to settings().
+/*!
+ \qmlproperty string WebView::settings.standardFontFamily
+ \qmlproperty string WebView::settings.fixedFontFamily
+ \qmlproperty string WebView::settings.serifFontFamily
+ \qmlproperty string WebView::settings.sansSerifFontFamily
+ \qmlproperty string WebView::settings.cursiveFontFamily
+ \qmlproperty string WebView::settings.fantasyFontFamily
+
+ \qmlproperty int WebView::settings.minimumFontSize
+ \qmlproperty int WebView::settings.minimumLogicalFontSize
+ \qmlproperty int WebView::settings.defaultFontSize
+ \qmlproperty int WebView::settings.defaultFixedFontSize
+
+ \qmlproperty bool WebView::settings.autoLoadImages
+ \qmlproperty bool WebView::settings.javascriptEnabled
+ \qmlproperty bool WebView::settings.javaEnabled
+ \qmlproperty bool WebView::settings.pluginsEnabled
+ \qmlproperty bool WebView::settings.privateBrowsingEnabled
+ \qmlproperty bool WebView::settings.javascriptCanOpenWindows
+ \qmlproperty bool WebView::settings.javascriptCanAccessClipboard
+ \qmlproperty bool WebView::settings.developerExtrasEnabled
+ \qmlproperty bool WebView::settings.linksIncludedInFocusChain
+ \qmlproperty bool WebView::settings.zoomTextOnly
+ \qmlproperty bool WebView::settings.printElementBackgrounds
+ \qmlproperty bool WebView::settings.offlineStorageDatabaseEnabled
+ \qmlproperty bool WebView::settings.offlineWebApplicationCacheEnabled
+ \qmlproperty bool WebView::settings.localStorageDatabaseEnabled
+ \qmlproperty bool WebView::settings.localContentCanAccessRemoteUrls
+
+ These properties give access to the settings controlling the web view.
+
+ See QWebSettings for details of these properties.
+
+ \qml
+ WebView {
+ settings.pluginsEnabled: true
+ settings.standardFontFamily: "Arial"
+ ...
+ }
+ \endqml
+*/
+QDeclarativeWebSettings *QDeclarativeWebView::settingsObject() const
+{
+ Q_D(const QDeclarativeWebView);
+ d->settings.s = page()->settings();
+ return &d->settings;
+}
+
+void QDeclarativeWebView::setPage(QWebPage *page)
+{
+ Q_D(QDeclarativeWebView);
+ if (d->page == page)
+ return;
+ if (d->page) {
+ if (d->page->parent() == this) {
+ delete d->page;
+ } else {
+ d->page->disconnect(this);
+ }
+ }
+ d->page = page;
+ d->page->setViewportSize(QSize(
+ d->preferredwidth>0 ? d->preferredwidth : width(),
+ d->preferredheight>0 ? d->preferredheight : height()));
+ d->page->mainFrame()->setScrollBarPolicy(Qt::Horizontal,Qt::ScrollBarAlwaysOff);
+ d->page->mainFrame()->setScrollBarPolicy(Qt::Vertical,Qt::ScrollBarAlwaysOff);
+ connect(d->page,SIGNAL(repaintRequested(QRect)),this,SLOT(paintPage(QRect)));
+ connect(d->page->mainFrame(),SIGNAL(urlChanged(QUrl)),this,SLOT(pageUrlChanged()));
+ connect(d->page->mainFrame(), SIGNAL(titleChanged(QString)), this, SIGNAL(titleChanged(QString)));
+ connect(d->page->mainFrame(), SIGNAL(titleChanged(QString)), this, SIGNAL(iconChanged()));
+ connect(d->page->mainFrame(), SIGNAL(iconChanged()), this, SIGNAL(iconChanged()));
+ connect(d->page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)), this, SLOT(noteContentsSizeChanged(QSize)));
+ connect(d->page->mainFrame(), SIGNAL(initialLayoutCompleted()), this, SLOT(initialLayout()));
+
+ connect(d->page,SIGNAL(loadStarted()),this,SLOT(doLoadStarted()));
+ connect(d->page,SIGNAL(loadProgress(int)),this,SLOT(doLoadProgress(int)));
+ connect(d->page,SIGNAL(loadFinished(bool)),this,SLOT(doLoadFinished(bool)));
+ connect(d->page,SIGNAL(statusBarMessage(QString)),this,SLOT(setStatusText(QString)));
+
+ connect(d->page->mainFrame(),SIGNAL(javaScriptWindowObjectCleared()),this,SLOT(windowObjectCleared()));
+}
+
+/*!
+ \qmlsignal WebView::onLoadStarted()
+
+ This handler is called when the web engine begins loading
+ a page. Later, WebView::onLoadFinished() or WebView::onLoadFailed()
+ will be emitted.
+*/
+
+/*!
+ \qmlsignal WebView::onLoadFinished()
+
+ This handler is called when the web engine \e successfully
+ finishes loading a page, including any component content
+ (WebView::onLoadFailed() will be emitted otherwise).
+
+ \sa progress
+*/
+
+/*!
+ \qmlsignal WebView::onLoadFailed()
+
+ This handler is called when the web engine fails loading
+ a page or any component content
+ (WebView::onLoadFinished() will be emitted on success).
+*/
+
+void QDeclarativeWebView::load(const QNetworkRequest &request,
+ QNetworkAccessManager::Operation operation,
+ const QByteArray &body)
+{
+ page()->mainFrame()->load(request, operation, body);
+}
+
+QString QDeclarativeWebView::html() const
+{
+ return page()->mainFrame()->toHtml();
+}
+
+/*!
+ \qmlproperty string WebView::html
+ This property holds HTML text set directly
+
+ The html property can be set as a string.
+
+ \qml
+ WebView {
+ html: "<p>This is <b>HTML</b>."
+ }
+ \endqml
+*/
+void QDeclarativeWebView::setHtml(const QString &html, const QUrl &baseUrl)
+{
+ Q_D(QDeclarativeWebView);
+ page()->setViewportSize(QSize(
+ d->preferredwidth>0 ? d->preferredwidth : width(),
+ d->preferredheight>0 ? d->preferredheight : height()));
+ if (isComponentComplete())
+ page()->mainFrame()->setHtml(html, baseUrl);
+ else {
+ d->pending = d->PendingHtml;
+ d->pending_url = baseUrl;
+ d->pending_string = html;
+ }
+ emit htmlChanged();
+}
+
+void QDeclarativeWebView::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl)
+{
+ Q_D(QDeclarativeWebView);
+ page()->setViewportSize(QSize(
+ d->preferredwidth>0 ? d->preferredwidth : width(),
+ d->preferredheight>0 ? d->preferredheight : height()));
+
+ if (isComponentComplete())
+ page()->mainFrame()->setContent(data,mimeType,qmlContext(this)->resolvedUrl(baseUrl));
+ else {
+ d->pending = d->PendingContent;
+ d->pending_url = baseUrl;
+ d->pending_string = mimeType;
+ d->pending_data = data;
+ }
+}
+
+QWebHistory *QDeclarativeWebView::history() const
+{
+ return page()->history();
+}
+
+QWebSettings *QDeclarativeWebView::settings() const
+{
+ return page()->settings();
+}
+
+QDeclarativeWebView *QDeclarativeWebView::createWindow(QWebPage::WebWindowType type)
+{
+ Q_D(QDeclarativeWebView);
+ switch (type) {
+ case QWebPage::WebBrowserWindow: {
+ if (!d->newWindowComponent && d->newWindowParent)
+ qWarning("WebView::newWindowComponent not set - WebView::newWindowParent ignored");
+ else if (d->newWindowComponent && !d->newWindowParent)
+ qWarning("WebView::newWindowParent not set - WebView::newWindowComponent ignored");
+ else if (d->newWindowComponent && d->newWindowParent) {
+ QDeclarativeWebView *webview = 0;
+ QDeclarativeContext *windowContext = new QDeclarativeContext(qmlContext(this));
+
+ QObject *nobj = d->newWindowComponent->create(windowContext);
+ if (nobj) {
+ windowContext->setParent(nobj);
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(nobj);
+ if (!item) {
+ delete nobj;
+ } else {
+ webview = item->findChild<QDeclarativeWebView*>();
+ if (!webview) {
+ delete item;
+ } else {
+ nobj->setParent(d->newWindowParent);
+ static_cast<QGraphicsObject*>(item)->setParentItem(d->newWindowParent);
+ }
+ }
+ } else {
+ delete windowContext;
+ }
+
+ return webview;
+ }
+ }
+ break;
+ case QWebPage::WebModalDialog: {
+ // Not supported
+ }
+ }
+ return 0;
+}
+
+/*!
+ \qmlproperty component WebView::newWindowComponent
+
+ This property holds the component to use for new windows.
+ The component must have a WebView somewhere in its structure.
+
+ When the web engine requests a new window, it will be an instance of
+ this component.
+
+ The parent of the new window is set by newWindowParent. It must be set.
+*/
+QDeclarativeComponent *QDeclarativeWebView::newWindowComponent() const
+{
+ Q_D(const QDeclarativeWebView);
+ return d->newWindowComponent;
+}
+
+void QDeclarativeWebView::setNewWindowComponent(QDeclarativeComponent *newWindow)
+{
+ Q_D(QDeclarativeWebView);
+ if (newWindow == d->newWindowComponent)
+ return;
+ d->newWindowComponent = newWindow;
+ emit newWindowComponentChanged();
+}
+
+
+/*!
+ \qmlproperty item WebView::newWindowParent
+
+ The parent item for new windows.
+
+ \sa newWindowComponent
+*/
+QDeclarativeItem *QDeclarativeWebView::newWindowParent() const
+{
+ Q_D(const QDeclarativeWebView);
+ return d->newWindowParent;
+}
+
+void QDeclarativeWebView::setNewWindowParent(QDeclarativeItem *parent)
+{
+ Q_D(QDeclarativeWebView);
+ if (parent == d->newWindowParent)
+ return;
+ if (d->newWindowParent && parent) {
+ QList<QGraphicsItem *> children = d->newWindowParent->childItems();
+ for (int i = 0; i < children.count(); ++i) {
+ children.at(i)->setParentItem(parent);
+ }
+ }
+ d->newWindowParent = parent;
+ emit newWindowParentChanged();
+}
+
+/*!
+ Returns the area of the largest element at position (\a x,\a y) that is no larger
+ than \a maxwidth by \a maxheight pixels.
+
+ May return an area larger in the case when no smaller element is at the position.
+*/
+QRect QDeclarativeWebView::elementAreaAt(int x, int y, int maxwidth, int maxheight) const
+{
+ QWebHitTestResult hit = page()->mainFrame()->hitTestContent(QPoint(x,y));
+ QRect rv = hit.boundingRect();
+ QWebElement element = hit.enclosingBlockElement();
+ if (maxwidth<=0) maxwidth = INT_MAX;
+ if (maxheight<=0) maxheight = INT_MAX;
+ while (!element.parent().isNull() && element.geometry().width() <= maxwidth && element.geometry().height() <= maxheight) {
+ rv = element.geometry();
+ element = element.parent();
+ }
+ return rv;
+}
+
+/*!
+ \internal
+ \class QDeclarativeWebPage
+ \brief The QDeclarativeWebPage class is a QWebPage that can create QML plugins.
+
+ \sa QDeclarativeWebView
+*/
+QDeclarativeWebPage::QDeclarativeWebPage(QDeclarativeWebView *parent) :
+ QWebPage(parent)
+{
+}
+
+QDeclarativeWebPage::~QDeclarativeWebPage()
+{
+}
+
+void QDeclarativeWebPage::javaScriptConsoleMessage(const QString& message, int lineNumber, const QString& sourceID)
+{
+ qWarning() << sourceID << ':' << lineNumber << ':' << message;
+}
+
+QString QDeclarativeWebPage::chooseFile(QWebFrame *originatingFrame, const QString& oldFile)
+{
+ // Not supported (it's modal)
+ Q_UNUSED(originatingFrame)
+ Q_UNUSED(oldFile)
+ return oldFile;
+}
+
+void QDeclarativeWebPage::javaScriptAlert(QWebFrame *originatingFrame, const QString& msg)
+{
+ Q_UNUSED(originatingFrame)
+ emit viewItem()->alert(msg);
+}
+
+bool QDeclarativeWebPage::javaScriptConfirm(QWebFrame *originatingFrame, const QString& msg)
+{
+ // Not supported (it's modal)
+ Q_UNUSED(originatingFrame)
+ Q_UNUSED(msg)
+ return false;
+}
+
+bool QDeclarativeWebPage::javaScriptPrompt(QWebFrame *originatingFrame, const QString& msg, const QString& defaultValue, QString* result)
+{
+ // Not supported (it's modal)
+ Q_UNUSED(originatingFrame)
+ Q_UNUSED(msg)
+ Q_UNUSED(defaultValue)
+ Q_UNUSED(result)
+ return false;
+}
+
+
+/*
+ Qt WebKit does not understand non-QWidget plugins, so dummy widgets
+ are created, parented to a single dummy tool window.
+
+ The requirements for QML object plugins are input to the Qt WebKit
+ non-QWidget plugin support, which will obsolete this kludge.
+*/
+class QWidget_Dummy_Plugin : public QWidget
+{
+ Q_OBJECT
+public:
+ static QWidget *dummy_shared_parent()
+ {
+ static QWidget *dsp = 0;
+ if (!dsp) {
+ dsp = new QWidget(0,Qt::Tool);
+ dsp->setGeometry(-10000,-10000,0,0);
+ dsp->show();
+ }
+ return dsp;
+ }
+ QWidget_Dummy_Plugin(const QUrl& url, QDeclarativeWebView *view, const QStringList &paramNames, const QStringList &paramValues) :
+ QWidget(dummy_shared_parent()),
+ propertyNames(paramNames),
+ propertyValues(paramValues),
+ webview(view)
+ {
+ QDeclarativeEngine *engine = qmlEngine(webview);
+ component = new QDeclarativeComponent(engine, url, this);
+ item = 0;
+ if (component->isLoading())
+ connect(component, SIGNAL(statusChanged(QDeclarativeComponent::Status)), this, SLOT(qmlLoaded()));
+ else
+ qmlLoaded();
+ }
+
+public Q_SLOTS:
+ void qmlLoaded()
+ {
+ if (component->isError()) {
+ // ### Could instead give these errors to the WebView to handle.
+ qWarning() << component->errors();
+ return;
+ }
+ item = qobject_cast<QDeclarativeItem*>(component->create(qmlContext(webview)));
+ item->setParent(webview);
+ QString jsObjName;
+ for (int i=0; i<propertyNames.count(); ++i) {
+ if (propertyNames[i] != QLatin1String("type") && propertyNames[i] != QLatin1String("data")) {
+ item->setProperty(propertyNames[i].toUtf8(),propertyValues[i]);
+ if (propertyNames[i] == QLatin1String("objectname"))
+ jsObjName = propertyValues[i];
+ }
+ }
+ if (!jsObjName.isNull()) {
+ QWebFrame *f = webview->page()->mainFrame();
+ f->addToJavaScriptWindowObject(jsObjName, item);
+ }
+ resizeEvent(0);
+ delete component;
+ component = 0;
+ }
+ void resizeEvent(QResizeEvent*)
+ {
+ if (item) {
+ item->setX(x());
+ item->setY(y());
+ item->setWidth(width());
+ item->setHeight(height());
+ }
+ }
+
+private:
+ QDeclarativeComponent *component;
+ QDeclarativeItem *item;
+ QStringList propertyNames, propertyValues;
+ QDeclarativeWebView *webview;
+};
+
+QDeclarativeWebView *QDeclarativeWebPage::viewItem()
+{
+ return static_cast<QDeclarativeWebView*>(parent());
+}
+
+QObject *QDeclarativeWebPage::createPlugin(const QString &, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues)
+{
+ QUrl comp = qmlContext(viewItem())->resolvedUrl(url);
+ return new QWidget_Dummy_Plugin(comp,viewItem(),paramNames,paramValues);
+}
+
+QWebPage *QDeclarativeWebPage::createWindow(WebWindowType type)
+{
+ QDeclarativeWebView *newView = viewItem()->createWindow(type);
+ if (newView)
+ return newView->page();
+ return 0;
+}
+
+QT_END_NAMESPACE
+
+#include <qdeclarativewebview.moc>
diff --git a/src/imports/webkit/qdeclarativewebview_p.h b/src/imports/webkit/qdeclarativewebview_p.h
new file mode 100644
index 0000000000..145e74bfeb
--- /dev/null
+++ b/src/imports/webkit/qdeclarativewebview_p.h
@@ -0,0 +1,288 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEWEBVIEW_H
+#define QDECLARATIVEWEBVIEW_H
+
+#include "webkitqmlplugin_export.h"
+
+#include <private/qdeclarativepainteditem_p.h>
+
+#include <QtGui/QAction>
+#include <QtCore/QUrl>
+#include <QtNetwork/qnetworkaccessmanager.h>
+#include <QtWebKit/QWebPage>
+
+QT_BEGIN_HEADER
+
+class QWebHistory;
+class QWebSettings;
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+class QDeclarativeWebSettings;
+class QDeclarativeWebViewPrivate;
+class QNetworkRequest;
+class QDeclarativeWebView;
+
+class WEBKITQMLPLUGIN_EXPORT QDeclarativeWebPage : public QWebPage
+{
+ Q_OBJECT
+public:
+ explicit QDeclarativeWebPage(QDeclarativeWebView *parent);
+ ~QDeclarativeWebPage();
+protected:
+ QObject *createPlugin(const QString &classid, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues);
+ QWebPage *createWindow(WebWindowType type);
+ void javaScriptConsoleMessage(const QString& message, int lineNumber, const QString& sourceID);
+ QString chooseFile(QWebFrame *originatingFrame, const QString& oldFile);
+ void javaScriptAlert(QWebFrame *originatingFrame, const QString& msg);
+ bool javaScriptConfirm(QWebFrame *originatingFrame, const QString& msg);
+ bool javaScriptPrompt(QWebFrame *originatingFrame, const QString& msg, const QString& defaultValue, QString* result);
+
+private:
+ QDeclarativeWebView *viewItem();
+};
+
+
+class QDeclarativeWebViewAttached;
+
+//### TODO: browser plugins
+
+class WEBKITQMLPLUGIN_EXPORT QDeclarativeWebView : public QDeclarativePaintedItem
+{
+ Q_OBJECT
+
+ Q_ENUMS(Status SelectionMode)
+
+ Q_PROPERTY(QString title READ title NOTIFY titleChanged)
+ Q_PROPERTY(QPixmap icon READ icon NOTIFY iconChanged)
+ Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor NOTIFY zoomFactorChanged)
+ Q_PROPERTY(QString statusText READ statusText NOTIFY statusTextChanged)
+
+ Q_PROPERTY(QString html READ html WRITE setHtml NOTIFY htmlChanged)
+
+ Q_PROPERTY(int pressGrabTime READ pressGrabTime WRITE setPressGrabTime NOTIFY pressGrabTimeChanged)
+
+ Q_PROPERTY(int preferredWidth READ preferredWidth WRITE setPreferredWidth NOTIFY preferredWidthChanged)
+ Q_PROPERTY(int preferredHeight READ preferredHeight WRITE setPreferredHeight NOTIFY preferredHeightChanged)
+ Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged)
+ Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged)
+ Q_PROPERTY(Status status READ status NOTIFY statusChanged)
+
+ Q_PROPERTY(QAction* reload READ reloadAction CONSTANT)
+ Q_PROPERTY(QAction* back READ backAction CONSTANT)
+ Q_PROPERTY(QAction* forward READ forwardAction CONSTANT)
+ Q_PROPERTY(QAction* stop READ stopAction CONSTANT)
+
+ Q_PROPERTY(QDeclarativeWebSettings* settings READ settingsObject CONSTANT)
+
+ Q_PROPERTY(QDeclarativeListProperty<QObject> javaScriptWindowObjects READ javaScriptWindowObjects CONSTANT)
+
+ Q_PROPERTY(QDeclarativeComponent* newWindowComponent READ newWindowComponent WRITE setNewWindowComponent NOTIFY newWindowComponentChanged)
+ Q_PROPERTY(QDeclarativeItem* newWindowParent READ newWindowParent WRITE setNewWindowParent NOTIFY newWindowParentChanged)
+
+ Q_PROPERTY(bool renderingEnabled READ renderingEnabled WRITE setRenderingEnabled NOTIFY renderingEnabledChanged)
+
+public:
+ QDeclarativeWebView(QDeclarativeItem *parent=0);
+ ~QDeclarativeWebView();
+
+ QUrl url() const;
+ void setUrl(const QUrl &);
+
+ QString title() const;
+
+ QPixmap icon() const;
+
+ qreal zoomFactor() const;
+ void setZoomFactor(qreal);
+ Q_INVOKABLE bool heuristicZoom(int clickX, int clickY, qreal maxzoom);
+ QRect elementAreaAt(int x, int y, int minwidth, int minheight) const;
+
+ int pressGrabTime() const;
+ void setPressGrabTime(int);
+
+ int preferredWidth() const;
+ void setPreferredWidth(int);
+ int preferredHeight() const;
+ void setPreferredHeight(int);
+
+ enum Status { Null, Ready, Loading, Error };
+ Status status() const;
+ qreal progress() const;
+ QString statusText() const;
+
+ QAction *reloadAction() const;
+ QAction *backAction() const;
+ QAction *forwardAction() const;
+ QAction *stopAction() const;
+
+ QWebPage *page() const;
+ void setPage(QWebPage *page);
+
+ void load(const QNetworkRequest &request,
+ QNetworkAccessManager::Operation operation = QNetworkAccessManager::GetOperation,
+ const QByteArray &body = QByteArray());
+
+ QString html() const;
+
+ void setHtml(const QString &html, const QUrl &baseUrl = QUrl());
+ void setContent(const QByteArray &data, const QString &mimeType = QString(), const QUrl &baseUrl = QUrl());
+
+ QWebHistory *history() const;
+ QWebSettings *settings() const;
+ QDeclarativeWebSettings *settingsObject() const;
+
+ bool renderingEnabled() const;
+ void setRenderingEnabled(bool);
+
+ QDeclarativeListProperty<QObject> javaScriptWindowObjects();
+
+ static QDeclarativeWebViewAttached *qmlAttachedProperties(QObject *);
+
+ QDeclarativeComponent *newWindowComponent() const;
+ void setNewWindowComponent(QDeclarativeComponent *newWindow);
+ QDeclarativeItem *newWindowParent() const;
+ void setNewWindowParent(QDeclarativeItem *newWindow);
+
+Q_SIGNALS:
+ void preferredWidthChanged();
+ void preferredHeightChanged();
+ void urlChanged();
+ void progressChanged();
+ void statusChanged(Status);
+ void titleChanged(const QString&);
+ void iconChanged();
+ void statusTextChanged();
+ void htmlChanged();
+ void pressGrabTimeChanged();
+ void zoomFactorChanged();
+ void newWindowComponentChanged();
+ void newWindowParentChanged();
+ void renderingEnabledChanged();
+
+ void loadStarted();
+ void loadFinished();
+ void loadFailed();
+
+ void doubleClick(int clickX, int clickY);
+
+ void zoomTo(qreal zoom, int centerX, int centerY);
+
+ void alert(const QString& message);
+
+public Q_SLOTS:
+ QVariant evaluateJavaScript(const QString&);
+
+private Q_SLOTS:
+ void expandToWebPage();
+ void paintPage(const QRect&);
+ void doLoadStarted();
+ void doLoadProgress(int p);
+ void doLoadFinished(bool ok);
+ void setStatusText(const QString&);
+ void windowObjectCleared();
+ void pageUrlChanged();
+ void noteContentsSizeChanged(const QSize&);
+ void initialLayout();
+
+protected:
+ void drawContents(QPainter *, const QRect &);
+
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+ void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
+ void timerEvent(QTimerEvent *event);
+ void hoverMoveEvent (QGraphicsSceneHoverEvent * event);
+ void keyPressEvent(QKeyEvent* event);
+ void keyReleaseEvent(QKeyEvent* event);
+ virtual void geometryChanged(const QRectF &newGeometry,
+ const QRectF &oldGeometry);
+ virtual void focusChanged(bool);
+ virtual bool sceneEvent(QEvent *event);
+ QDeclarativeWebView *createWindow(QWebPage::WebWindowType type);
+
+private:
+ void init();
+ virtual void componentComplete();
+ Q_DISABLE_COPY(QDeclarativeWebView)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeWebView)
+ QMouseEvent *sceneMouseEventToMouseEvent(QGraphicsSceneMouseEvent *);
+ QMouseEvent *sceneHoverMoveEventToMouseEvent(QGraphicsSceneHoverEvent *);
+ friend class QDeclarativeWebPage;
+};
+
+class QDeclarativeWebViewAttached : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString windowObjectName READ windowObjectName WRITE setWindowObjectName)
+public:
+ QDeclarativeWebViewAttached(QObject *parent)
+ : QObject(parent)
+ {
+ }
+
+ QString windowObjectName() const
+ {
+ return m_windowObjectName;
+ }
+
+ void setWindowObjectName(const QString &n)
+ {
+ m_windowObjectName = n;
+ }
+
+private:
+ QString m_windowObjectName;
+};
+
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeWebView)
+QML_DECLARE_TYPEINFO(QDeclarativeWebView, QML_HAS_ATTACHED_PROPERTIES)
+
+QT_END_HEADER
+
+#endif
diff --git a/src/imports/webkit/qdeclarativewebview_p_p.h b/src/imports/webkit/qdeclarativewebview_p_p.h
new file mode 100644
index 0000000000..3ad9e9a602
--- /dev/null
+++ b/src/imports/webkit/qdeclarativewebview_p_p.h
@@ -0,0 +1,153 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEWEBVIEW_P_H
+#define QDECLARATIVEWEBVIEW_P_H
+
+#include "webkitqmlplugin_export.h"
+
+#include <qdeclarative.h>
+
+#include <QtWebKit/QWebPage>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class WEBKITQMLPLUGIN_EXPORT QDeclarativeWebSettings : public QObject {
+ Q_OBJECT
+
+ Q_PROPERTY(QString standardFontFamily READ standardFontFamily WRITE setStandardFontFamily)
+ Q_PROPERTY(QString fixedFontFamily READ fixedFontFamily WRITE setFixedFontFamily)
+ Q_PROPERTY(QString serifFontFamily READ serifFontFamily WRITE setSerifFontFamily)
+ Q_PROPERTY(QString sansSerifFontFamily READ sansSerifFontFamily WRITE setSansSerifFontFamily)
+ Q_PROPERTY(QString cursiveFontFamily READ cursiveFontFamily WRITE setCursiveFontFamily)
+ Q_PROPERTY(QString fantasyFontFamily READ fantasyFontFamily WRITE setFantasyFontFamily)
+
+ Q_PROPERTY(int minimumFontSize READ minimumFontSize WRITE setMinimumFontSize)
+ Q_PROPERTY(int minimumLogicalFontSize READ minimumLogicalFontSize WRITE setMinimumLogicalFontSize)
+ Q_PROPERTY(int defaultFontSize READ defaultFontSize WRITE setDefaultFontSize)
+ Q_PROPERTY(int defaultFixedFontSize READ defaultFixedFontSize WRITE setDefaultFixedFontSize)
+
+ Q_PROPERTY(bool autoLoadImages READ autoLoadImages WRITE setAutoLoadImages)
+ Q_PROPERTY(bool javascriptEnabled READ javascriptEnabled WRITE setJavascriptEnabled)
+ Q_PROPERTY(bool javaEnabled READ javaEnabled WRITE setJavaEnabled)
+ Q_PROPERTY(bool pluginsEnabled READ pluginsEnabled WRITE setPluginsEnabled)
+ Q_PROPERTY(bool privateBrowsingEnabled READ privateBrowsingEnabled WRITE setPrivateBrowsingEnabled)
+ Q_PROPERTY(bool javascriptCanOpenWindows READ javascriptCanOpenWindows WRITE setJavascriptCanOpenWindows)
+ Q_PROPERTY(bool javascriptCanAccessClipboard READ javascriptCanAccessClipboard WRITE setJavascriptCanAccessClipboard)
+ Q_PROPERTY(bool developerExtrasEnabled READ developerExtrasEnabled WRITE setDeveloperExtrasEnabled)
+ Q_PROPERTY(bool linksIncludedInFocusChain READ linksIncludedInFocusChain WRITE setLinksIncludedInFocusChain)
+ Q_PROPERTY(bool zoomTextOnly READ zoomTextOnly WRITE setZoomTextOnly)
+ Q_PROPERTY(bool printElementBackgrounds READ printElementBackgrounds WRITE setPrintElementBackgrounds)
+ Q_PROPERTY(bool offlineStorageDatabaseEnabled READ offlineStorageDatabaseEnabled WRITE setOfflineStorageDatabaseEnabled)
+ Q_PROPERTY(bool offlineWebApplicationCacheEnabled READ offlineWebApplicationCacheEnabled WRITE setOfflineWebApplicationCacheEnabled)
+ Q_PROPERTY(bool localStorageDatabaseEnabled READ localStorageDatabaseEnabled WRITE setLocalStorageDatabaseEnabled)
+ Q_PROPERTY(bool localContentCanAccessRemoteUrls READ localContentCanAccessRemoteUrls WRITE setLocalContentCanAccessRemoteUrls)
+
+public:
+ QDeclarativeWebSettings() {}
+
+ QString standardFontFamily() const { return s->fontFamily(QWebSettings::StandardFont); }
+ void setStandardFontFamily(const QString& f) { s->setFontFamily(QWebSettings::StandardFont,f); }
+ QString fixedFontFamily() const { return s->fontFamily(QWebSettings::FixedFont); }
+ void setFixedFontFamily(const QString& f) { s->setFontFamily(QWebSettings::FixedFont,f); }
+ QString serifFontFamily() const { return s->fontFamily(QWebSettings::SerifFont); }
+ void setSerifFontFamily(const QString& f) { s->setFontFamily(QWebSettings::SerifFont,f); }
+ QString sansSerifFontFamily() const { return s->fontFamily(QWebSettings::SansSerifFont); }
+ void setSansSerifFontFamily(const QString& f) { s->setFontFamily(QWebSettings::SansSerifFont,f); }
+ QString cursiveFontFamily() const { return s->fontFamily(QWebSettings::CursiveFont); }
+ void setCursiveFontFamily(const QString& f) { s->setFontFamily(QWebSettings::CursiveFont,f); }
+ QString fantasyFontFamily() const { return s->fontFamily(QWebSettings::FantasyFont); }
+ void setFantasyFontFamily(const QString& f) { s->setFontFamily(QWebSettings::FantasyFont,f); }
+
+ int minimumFontSize() const { return s->fontSize(QWebSettings::MinimumFontSize); }
+ void setMinimumFontSize(int size) { s->setFontSize(QWebSettings::MinimumFontSize,size); }
+ int minimumLogicalFontSize() const { return s->fontSize(QWebSettings::MinimumLogicalFontSize); }
+ void setMinimumLogicalFontSize(int size) { s->setFontSize(QWebSettings::MinimumLogicalFontSize,size); }
+ int defaultFontSize() const { return s->fontSize(QWebSettings::DefaultFontSize); }
+ void setDefaultFontSize(int size) { s->setFontSize(QWebSettings::DefaultFontSize,size); }
+ int defaultFixedFontSize() const { return s->fontSize(QWebSettings::DefaultFixedFontSize); }
+ void setDefaultFixedFontSize(int size) { s->setFontSize(QWebSettings::DefaultFixedFontSize,size); }
+
+ bool autoLoadImages() const { return s->testAttribute(QWebSettings::AutoLoadImages); }
+ void setAutoLoadImages(bool on) { s->setAttribute(QWebSettings::AutoLoadImages, on); }
+ bool javascriptEnabled() const { return s->testAttribute(QWebSettings::JavascriptEnabled); }
+ void setJavascriptEnabled(bool on) { s->setAttribute(QWebSettings::JavascriptEnabled, on); }
+ bool javaEnabled() const { return s->testAttribute(QWebSettings::JavaEnabled); }
+ void setJavaEnabled(bool on) { s->setAttribute(QWebSettings::JavaEnabled, on); }
+ bool pluginsEnabled() const { return s->testAttribute(QWebSettings::PluginsEnabled); }
+ void setPluginsEnabled(bool on) { s->setAttribute(QWebSettings::PluginsEnabled, on); }
+ bool privateBrowsingEnabled() const { return s->testAttribute(QWebSettings::PrivateBrowsingEnabled); }
+ void setPrivateBrowsingEnabled(bool on) { s->setAttribute(QWebSettings::PrivateBrowsingEnabled, on); }
+ bool javascriptCanOpenWindows() const { return s->testAttribute(QWebSettings::JavascriptCanOpenWindows); }
+ void setJavascriptCanOpenWindows(bool on) { s->setAttribute(QWebSettings::JavascriptCanOpenWindows, on); }
+ bool javascriptCanAccessClipboard() const { return s->testAttribute(QWebSettings::JavascriptCanAccessClipboard); }
+ void setJavascriptCanAccessClipboard(bool on) { s->setAttribute(QWebSettings::JavascriptCanAccessClipboard, on); }
+ bool developerExtrasEnabled() const { return s->testAttribute(QWebSettings::DeveloperExtrasEnabled); }
+ void setDeveloperExtrasEnabled(bool on) { s->setAttribute(QWebSettings::DeveloperExtrasEnabled, on); }
+ bool linksIncludedInFocusChain() const { return s->testAttribute(QWebSettings::LinksIncludedInFocusChain); }
+ void setLinksIncludedInFocusChain(bool on) { s->setAttribute(QWebSettings::LinksIncludedInFocusChain, on); }
+ bool zoomTextOnly() const { return s->testAttribute(QWebSettings::ZoomTextOnly); }
+ void setZoomTextOnly(bool on) { s->setAttribute(QWebSettings::ZoomTextOnly, on); }
+ bool printElementBackgrounds() const { return s->testAttribute(QWebSettings::PrintElementBackgrounds); }
+ void setPrintElementBackgrounds(bool on) { s->setAttribute(QWebSettings::PrintElementBackgrounds, on); }
+ bool offlineStorageDatabaseEnabled() const { return s->testAttribute(QWebSettings::OfflineStorageDatabaseEnabled); }
+ void setOfflineStorageDatabaseEnabled(bool on) { s->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, on); }
+ bool offlineWebApplicationCacheEnabled() const { return s->testAttribute(QWebSettings::OfflineWebApplicationCacheEnabled); }
+ void setOfflineWebApplicationCacheEnabled(bool on) { s->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, on); }
+ bool localStorageDatabaseEnabled() const { return s->testAttribute(QWebSettings::LocalStorageDatabaseEnabled); }
+ void setLocalStorageDatabaseEnabled(bool on) { s->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, on); }
+ bool localContentCanAccessRemoteUrls() const { return s->testAttribute(QWebSettings::LocalContentCanAccessRemoteUrls); }
+ void setLocalContentCanAccessRemoteUrls(bool on) { s->setAttribute(QWebSettings::LocalContentCanAccessRemoteUrls, on); }
+
+ QWebSettings *s;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeWebSettings)
+
+QT_END_HEADER
+
+#endif
diff --git a/src/imports/webkit/qmldir b/src/imports/webkit/qmldir
new file mode 100644
index 0000000000..258aa2cb59
--- /dev/null
+++ b/src/imports/webkit/qmldir
@@ -0,0 +1 @@
+plugin webkitqmlplugin
diff --git a/src/imports/webkit/webkit.pro b/src/imports/webkit/webkit.pro
new file mode 100644
index 0000000000..fdc12cc734
--- /dev/null
+++ b/src/imports/webkit/webkit.pro
@@ -0,0 +1,19 @@
+TARGET = webkitqmlplugin
+TARGETPATH = org/webkit
+include(../qimportbase.pri)
+
+QT += webkit declarative
+DEFINES += WEBKITQMLPLUGIN_EXPORTS
+
+SOURCES += qdeclarativewebview.cpp plugin.cpp
+HEADERS += qdeclarativewebview_p.h \
+ qdeclarativewebview_p_p.h \
+ webkitqmlplugin_export.h
+
+QTDIR_build:DESTDIR = $$TARGETPATH
+target.path = $$TARGETPATH
+
+qmldir.files += $$QT_BUILD_TREE/imports/org/webkit/qmldir
+qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
+
+INSTALLS += target qmldir
diff --git a/src/imports/webkit/webkitqmlplugin_export.h b/src/imports/webkit/webkitqmlplugin_export.h
new file mode 100644
index 0000000000..974fd2435f
--- /dev/null
+++ b/src/imports/webkit/webkitqmlplugin_export.h
@@ -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 QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WEBKITQMLPLUGIN_EXPORT_H
+#define WEBKITQMLPLUGIN_EXPORT_H
+
+#include <QtCore/QtGlobal>
+
+#if defined WEBKITQMLPLUGIN_EXPORTS
+# define WEBKITQMLPLUGIN_EXPORT Q_DECL_EXPORT
+#else
+# define WEBKITQMLPLUGIN_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // WEBKITQMLPLUGIN_EXPORT_H
diff --git a/src/imports/widgets/graphicslayouts.cpp b/src/imports/widgets/graphicslayouts.cpp
new file mode 100644
index 0000000000..fc15ad2981
--- /dev/null
+++ b/src/imports/widgets/graphicslayouts.cpp
@@ -0,0 +1,260 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "graphicslayouts_p.h"
+
+#include <QtGui/qgraphicswidget.h>
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+LinearLayoutAttached::LinearLayoutAttached(QObject *parent)
+: QObject(parent), _stretch(1), _alignment(Qt::AlignCenter)
+{
+}
+
+void LinearLayoutAttached::setStretchFactor(int f)
+{
+ if (_stretch == f)
+ return;
+
+ _stretch = f;
+ emit stretchChanged(reinterpret_cast<QGraphicsLayoutItem*>(parent()), _stretch);
+}
+
+void LinearLayoutAttached::setAlignment(Qt::Alignment a)
+{
+ if (_alignment == a)
+ return;
+
+ _alignment = a;
+ emit alignmentChanged(reinterpret_cast<QGraphicsLayoutItem*>(parent()), _alignment);
+}
+
+QGraphicsLinearLayoutStretchItemObject::QGraphicsLinearLayoutStretchItemObject(QObject *parent)
+ : QObject(parent)
+{
+}
+
+QSizeF QGraphicsLinearLayoutStretchItemObject::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
+{
+Q_UNUSED(which);
+Q_UNUSED(constraint);
+return QSizeF();
+}
+
+
+QGraphicsLinearLayoutObject::QGraphicsLinearLayoutObject(QObject *parent)
+: QObject(parent)
+{
+}
+
+QGraphicsLinearLayoutObject::~QGraphicsLinearLayoutObject()
+{
+}
+
+void QGraphicsLinearLayoutObject::insertLayoutItem(int index, QGraphicsLayoutItem *item)
+{
+insertItem(index, item);
+
+//connect attached properties
+if (LinearLayoutAttached *obj = attachedProperties.value(item)) {
+ setStretchFactor(item, obj->stretchFactor());
+ setAlignment(item, obj->alignment());
+ QObject::connect(obj, SIGNAL(stretchChanged(QGraphicsLayoutItem*,int)),
+ this, SLOT(updateStretch(QGraphicsLayoutItem*,int)));
+ QObject::connect(obj, SIGNAL(alignmentChanged(QGraphicsLayoutItem*,Qt::Alignment)),
+ this, SLOT(updateAlignment(QGraphicsLayoutItem*,Qt::Alignment)));
+ //### need to disconnect when widget is removed?
+}
+}
+
+//### is there a better way to do this?
+void QGraphicsLinearLayoutObject::clearChildren()
+{
+for (int i = 0; i < count(); ++i)
+ removeAt(i);
+}
+
+void QGraphicsLinearLayoutObject::updateStretch(QGraphicsLayoutItem *item, int stretch)
+{
+QGraphicsLinearLayout::setStretchFactor(item, stretch);
+}
+
+void QGraphicsLinearLayoutObject::updateAlignment(QGraphicsLayoutItem *item, Qt::Alignment alignment)
+{
+QGraphicsLinearLayout::setAlignment(item, alignment);
+}
+
+QHash<QGraphicsLayoutItem*, LinearLayoutAttached*> QGraphicsLinearLayoutObject::attachedProperties;
+LinearLayoutAttached *QGraphicsLinearLayoutObject::qmlAttachedProperties(QObject *obj)
+{
+// ### This is not allowed - you must attach to any object
+if (!qobject_cast<QGraphicsLayoutItem*>(obj))
+ return 0;
+LinearLayoutAttached *rv = new LinearLayoutAttached(obj);
+attachedProperties.insert(qobject_cast<QGraphicsLayoutItem*>(obj), rv);
+return rv;
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////
+// QGraphicsGridLayout-related classes
+//////////////////////////////////////////////////////////////////////////////////////////////////////
+GridLayoutAttached::GridLayoutAttached(QObject *parent)
+: QObject(parent), _row(-1), _column(-1), _rowspan(1), _colspan(1), _alignment(-1)
+{
+}
+
+void GridLayoutAttached::setRow(int r)
+{
+ if (_row == r)
+ return;
+
+ _row = r;
+ //emit rowChanged(reinterpret_cast<QGraphicsLayoutItem*>(parent()), _row);
+}
+
+void GridLayoutAttached::setColumn(int c)
+{
+ if (_column == c)
+ return;
+
+ _column = c;
+ //emit columnChanged(reinterpret_cast<QGraphicsLayoutItem*>(parent()), _column);
+}
+
+void GridLayoutAttached::setRowSpan(int rs)
+{
+ if (_rowspan == rs)
+ return;
+
+ _rowspan = rs;
+ //emit rowSpanChanged(reinterpret_cast<QGraphicsLayoutItem*>(parent()), _rowSpan);
+}
+
+void GridLayoutAttached::setColumnSpan(int cs)
+{
+ if (_colspan == cs)
+ return;
+
+ _colspan = cs;
+ //emit columnSpanChanged(reinterpret_cast<QGraphicsLayoutItem*>(parent()), _columnSpan);
+}
+
+void GridLayoutAttached::setAlignment(Qt::Alignment a)
+{
+ if (_alignment == a)
+ return;
+
+ _alignment = a;
+ //emit alignmentChanged(reinterpret_cast<QGraphicsLayoutItem*>(parent()), _alignment);
+}
+
+QGraphicsGridLayoutObject::QGraphicsGridLayoutObject(QObject *parent)
+: QObject(parent)
+{
+}
+
+QGraphicsGridLayoutObject::~QGraphicsGridLayoutObject()
+{
+}
+
+void QGraphicsGridLayoutObject::addWidget(QGraphicsWidget *wid)
+{
+//use attached properties
+if (QObject *obj = attachedProperties.value(qobject_cast<QGraphicsLayoutItem*>(wid))) {
+ int row = static_cast<GridLayoutAttached *>(obj)->row();
+ int column = static_cast<GridLayoutAttached *>(obj)->column();
+ int rowSpan = static_cast<GridLayoutAttached *>(obj)->rowSpan();
+ int columnSpan = static_cast<GridLayoutAttached *>(obj)->columnSpan();
+ if (row == -1 || column == -1) {
+ qWarning() << "Must set row and column for an item in a grid layout";
+ return;
+ }
+ addItem(wid, row, column, rowSpan, columnSpan);
+}
+}
+
+void QGraphicsGridLayoutObject::addLayoutItem(QGraphicsLayoutItem *item)
+{
+//use attached properties
+if (GridLayoutAttached *obj = attachedProperties.value(item)) {
+ int row = obj->row();
+ int column = obj->column();
+ int rowSpan = obj->rowSpan();
+ int columnSpan = obj->columnSpan();
+ Qt::Alignment alignment = obj->alignment();
+ if (row == -1 || column == -1) {
+ qWarning() << "Must set row and column for an item in a grid layout";
+ return;
+ }
+ addItem(item, row, column, rowSpan, columnSpan);
+ if (alignment != -1)
+ setAlignment(item,alignment);
+}
+}
+
+//### is there a better way to do this?
+void QGraphicsGridLayoutObject::clearChildren()
+{
+for (int i = 0; i < count(); ++i)
+ removeAt(i);
+}
+
+qreal QGraphicsGridLayoutObject::spacing() const
+{
+if (verticalSpacing() == horizontalSpacing())
+ return verticalSpacing();
+return -1; //###
+}
+
+QHash<QGraphicsLayoutItem*, GridLayoutAttached*> QGraphicsGridLayoutObject::attachedProperties;
+GridLayoutAttached *QGraphicsGridLayoutObject::qmlAttachedProperties(QObject *obj)
+{
+// ### This is not allowed - you must attach to any object
+if (!qobject_cast<QGraphicsLayoutItem*>(obj))
+ return 0;
+GridLayoutAttached *rv = new GridLayoutAttached(obj);
+attachedProperties.insert(qobject_cast<QGraphicsLayoutItem*>(obj), rv);
+return rv;
+}
+
+QT_END_NAMESPACE
diff --git a/src/imports/widgets/graphicslayouts_p.h b/src/imports/widgets/graphicslayouts_p.h
new file mode 100644
index 0000000000..f9b9ae81a6
--- /dev/null
+++ b/src/imports/widgets/graphicslayouts_p.h
@@ -0,0 +1,226 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GRAPHICSLAYOUTS_H
+#define GRAPHICSLAYOUTS_H
+
+#include "graphicswidgets_p.h"
+
+#include <QtGui/QGraphicsLinearLayout>
+#include <QtGui/QGraphicsGridLayout>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QGraphicsLinearLayoutStretchItemObject : public QObject, public QGraphicsLayoutItem
+{
+ Q_OBJECT
+ Q_INTERFACES(QGraphicsLayoutItem)
+public:
+ QGraphicsLinearLayoutStretchItemObject(QObject *parent = 0);
+
+ virtual QSizeF sizeHint(Qt::SizeHint, const QSizeF &) const;
+};
+
+class LinearLayoutAttached;
+class QGraphicsLinearLayoutObject : public QObject, public QGraphicsLinearLayout
+{
+ Q_OBJECT
+ Q_INTERFACES(QGraphicsLayout QGraphicsLayoutItem)
+
+ Q_PROPERTY(QDeclarativeListProperty<QGraphicsLayoutItem> children READ children)
+ Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
+ Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing)
+ Q_CLASSINFO("DefaultProperty", "children")
+public:
+ QGraphicsLinearLayoutObject(QObject * = 0);
+ ~QGraphicsLinearLayoutObject();
+
+ QDeclarativeListProperty<QGraphicsLayoutItem> children() { return QDeclarativeListProperty<QGraphicsLayoutItem>(this, 0, children_append, children_count, children_at, children_clear); }
+
+ static LinearLayoutAttached *qmlAttachedProperties(QObject *);
+
+private Q_SLOTS:
+ void updateStretch(QGraphicsLayoutItem*,int);
+ void updateAlignment(QGraphicsLayoutItem*,Qt::Alignment);
+
+private:
+ friend class LinearLayoutAttached;
+ void clearChildren();
+ void insertLayoutItem(int, QGraphicsLayoutItem *);
+ static QHash<QGraphicsLayoutItem*, LinearLayoutAttached*> attachedProperties;
+
+ static void children_append(QDeclarativeListProperty<QGraphicsLayoutItem> *prop, QGraphicsLayoutItem *item) {
+ static_cast<QGraphicsLinearLayoutObject*>(prop->object)->insertLayoutItem(-1, item);
+ }
+
+ static void children_clear(QDeclarativeListProperty<QGraphicsLayoutItem> *prop) {
+ static_cast<QGraphicsLinearLayoutObject*>(prop->object)->clearChildren();
+ }
+
+ static int children_count(QDeclarativeListProperty<QGraphicsLayoutItem> *prop) {
+ return static_cast<QGraphicsLinearLayoutObject*>(prop->object)->count();
+ }
+
+ static QGraphicsLayoutItem *children_at(QDeclarativeListProperty<QGraphicsLayoutItem> *prop, int index) {
+ return static_cast<QGraphicsLinearLayoutObject*>(prop->object)->itemAt(index);
+ }
+};
+
+class GridLayoutAttached;
+class QGraphicsGridLayoutObject : public QObject, public QGraphicsGridLayout
+{
+ Q_OBJECT
+ Q_INTERFACES(QGraphicsLayout QGraphicsLayoutItem)
+
+ Q_PROPERTY(QDeclarativeListProperty<QGraphicsLayoutItem> children READ children)
+ Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing)
+ Q_PROPERTY(qreal verticalSpacing READ verticalSpacing WRITE setVerticalSpacing)
+ Q_PROPERTY(qreal horizontalSpacing READ horizontalSpacing WRITE setHorizontalSpacing)
+ Q_CLASSINFO("DefaultProperty", "children")
+public:
+ QGraphicsGridLayoutObject(QObject * = 0);
+ ~QGraphicsGridLayoutObject();
+
+ QDeclarativeListProperty<QGraphicsLayoutItem> children() { return QDeclarativeListProperty<QGraphicsLayoutItem>(this, 0, children_append, children_count, children_at, children_clear); }
+
+ qreal spacing() const;
+
+ static GridLayoutAttached *qmlAttachedProperties(QObject *);
+
+private:
+ friend class GraphicsLayoutAttached;
+ void addWidget(QGraphicsWidget *);
+ void clearChildren();
+ void addLayoutItem(QGraphicsLayoutItem *);
+ static QHash<QGraphicsLayoutItem*, GridLayoutAttached*> attachedProperties;
+
+ static void children_append(QDeclarativeListProperty<QGraphicsLayoutItem> *prop, QGraphicsLayoutItem *item) {
+ static_cast<QGraphicsGridLayoutObject*>(prop->object)->addLayoutItem(item);
+ }
+
+ static void children_clear(QDeclarativeListProperty<QGraphicsLayoutItem> *prop) {
+ static_cast<QGraphicsGridLayoutObject*>(prop->object)->clearChildren();
+ }
+
+ static int children_count(QDeclarativeListProperty<QGraphicsLayoutItem> *prop) {
+ return static_cast<QGraphicsGridLayoutObject*>(prop->object)->count();
+ }
+
+ static QGraphicsLayoutItem *children_at(QDeclarativeListProperty<QGraphicsLayoutItem> *prop, int index) {
+ return static_cast<QGraphicsGridLayoutObject*>(prop->object)->itemAt(index);
+ }
+};
+
+class LinearLayoutAttached : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(int stretchFactor READ stretchFactor WRITE setStretchFactor NOTIFY stretchChanged)
+ Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment NOTIFY alignmentChanged)
+public:
+ LinearLayoutAttached(QObject *parent);
+
+ int stretchFactor() const { return _stretch; }
+ void setStretchFactor(int f);
+ Qt::Alignment alignment() const { return _alignment; }
+ void setAlignment(Qt::Alignment a);
+
+Q_SIGNALS:
+ void stretchChanged(QGraphicsLayoutItem*,int);
+ void alignmentChanged(QGraphicsLayoutItem*,Qt::Alignment);
+
+private:
+ int _stretch;
+ Qt::Alignment _alignment;
+};
+
+class GridLayoutAttached : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(int row READ row WRITE setRow)
+ Q_PROPERTY(int column READ column WRITE setColumn)
+ Q_PROPERTY(int rowSpan READ rowSpan WRITE setRowSpan)
+ Q_PROPERTY(int columnSpan READ columnSpan WRITE setColumnSpan)
+ Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
+public:
+ GridLayoutAttached(QObject *parent);
+
+ int row() const { return _row; }
+ void setRow(int r);
+
+ int column() const { return _column; }
+ void setColumn(int c);
+
+ int rowSpan() const { return _rowspan; }
+ void setRowSpan(int rs);
+
+ int columnSpan() const { return _colspan; }
+ void setColumnSpan(int cs);
+
+ Qt::Alignment alignment() const { return _alignment; }
+ void setAlignment(Qt::Alignment a);
+
+private:
+ int _row;
+ int _column;
+ int _rowspan;
+ int _colspan;
+ Qt::Alignment _alignment;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_INTERFACE(QGraphicsLayoutItem)
+QML_DECLARE_INTERFACE(QGraphicsLayout)
+QML_DECLARE_TYPE(QGraphicsLinearLayoutStretchItemObject)
+QML_DECLARE_TYPE(QGraphicsLinearLayoutObject)
+QML_DECLARE_TYPEINFO(QGraphicsLinearLayoutObject, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(QGraphicsGridLayoutObject)
+QML_DECLARE_TYPEINFO(QGraphicsGridLayoutObject, QML_HAS_ATTACHED_PROPERTIES)
+
+QT_END_HEADER
+
+#endif // GRAPHICSLAYOUTS_H
diff --git a/src/imports/widgets/graphicswidgets.cpp b/src/imports/widgets/graphicswidgets.cpp
new file mode 100644
index 0000000000..062e516300
--- /dev/null
+++ b/src/imports/widgets/graphicswidgets.cpp
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
diff --git a/src/imports/widgets/graphicswidgets_p.h b/src/imports/widgets/graphicswidgets_p.h
new file mode 100644
index 0000000000..2c2b707901
--- /dev/null
+++ b/src/imports/widgets/graphicswidgets_p.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GRAPHICSWIDGETS_H
+#define GRAPHICSWIDGETS_H
+
+#include <qdeclarative.h>
+
+#include <QtGui/QGraphicsScene>
+#include <QtGui/QGraphicsView>
+#include <QtGui/QGraphicsWidget>
+#include <QtGui/QGraphicsItem>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QGraphicsView)
+QML_DECLARE_TYPE_HASMETATYPE(QGraphicsScene)
+QML_DECLARE_TYPE(QGraphicsWidget)
+QML_DECLARE_TYPE(QGraphicsObject)
+QML_DECLARE_INTERFACE_HASMETATYPE(QGraphicsItem)
+
+QT_END_HEADER
+
+#endif // GRAPHICSWIDGETS_H
diff --git a/src/imports/widgets/qmldir b/src/imports/widgets/qmldir
new file mode 100644
index 0000000000..6f19878671
--- /dev/null
+++ b/src/imports/widgets/qmldir
@@ -0,0 +1 @@
+plugin widgets
diff --git a/src/imports/widgets/widgets.cpp b/src/imports/widgets/widgets.cpp
new file mode 100644
index 0000000000..ec21cc41e0
--- /dev/null
+++ b/src/imports/widgets/widgets.cpp
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtDeclarative/qdeclarativeextensionplugin.h>
+#include <QtDeclarative/qdeclarative.h>
+
+#include "graphicslayouts_p.h"
+#include "graphicswidgets_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QGraphicsViewDeclarativeUI : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QGraphicsScene *scene READ scene WRITE setScene)
+ Q_CLASSINFO("DefaultProperty", "scene")
+public:
+ QGraphicsViewDeclarativeUI(QObject *other) : QObject(other) {}
+
+ QGraphicsScene *scene() const { return static_cast<QGraphicsView *>(parent())->scene(); }
+ void setScene(QGraphicsScene *scene)
+ {
+ static_cast<QGraphicsView *>(parent())->setScene(scene);
+ }
+};
+
+class QGraphicsSceneDeclarativeUI : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QDeclarativeListProperty<QObject> children READ children)
+ Q_CLASSINFO("DefaultProperty", "children")
+public:
+ QGraphicsSceneDeclarativeUI(QObject *other) : QObject(other) {}
+
+ QDeclarativeListProperty<QObject> children() { return QDeclarativeListProperty<QObject>(this->parent(), 0, children_append); }
+
+private:
+ static void children_append(QDeclarativeListProperty<QObject> *prop, QObject *o) {
+ if (QGraphicsObject *go = qobject_cast<QGraphicsObject *>(o))
+ static_cast<QGraphicsScene *>(prop->object)->addItem(go);
+ }
+};
+
+class QGraphicsWidgetDeclarativeUI : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QDeclarativeListProperty<QGraphicsItem> children READ children)
+ Q_PROPERTY(QGraphicsLayout *layout READ layout WRITE setLayout)
+ Q_CLASSINFO("DefaultProperty", "children")
+public:
+ QGraphicsWidgetDeclarativeUI(QObject *other) : QObject(other) {}
+
+ QDeclarativeListProperty<QGraphicsItem> children() { return QDeclarativeListProperty<QGraphicsItem>(this, 0, children_append); }
+
+ QGraphicsLayout *layout() const { return static_cast<QGraphicsWidget *>(parent())->layout(); }
+ void setLayout(QGraphicsLayout *lo)
+ {
+ static_cast<QGraphicsWidget *>(parent())->setLayout(lo);
+ }
+
+private:
+ void setItemParent(QGraphicsItem *wid)
+ {
+ wid->setParentItem(static_cast<QGraphicsWidget *>(parent()));
+ }
+
+ static void children_append(QDeclarativeListProperty<QGraphicsItem> *prop, QGraphicsItem *i) {
+ static_cast<QGraphicsWidgetDeclarativeUI*>(prop->object)->setItemParent(i);
+ }
+};
+
+class QWidgetsQmlModule : public QDeclarativeExtensionPlugin
+{
+ Q_OBJECT
+public:
+ virtual void registerTypes(const char *uri)
+ {
+ Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.widgets"));
+
+ QML_REGISTER_INTERFACE(QGraphicsLayoutItem);
+ QML_REGISTER_INTERFACE(QGraphicsLayout);
+ qmlRegisterType<QGraphicsLinearLayoutStretchItemObject>(uri,4,6,"QGraphicsLinearLayoutStretchItem");
+ qmlRegisterType<QGraphicsLinearLayoutObject>(uri,4,6,"QGraphicsLinearLayout");
+ qmlRegisterType<QGraphicsGridLayoutObject>(uri,4,6,"QGraphicsGridLayout");
+ qmlRegisterExtendedType<QGraphicsView, QGraphicsViewDeclarativeUI>(uri,4,6,"QGraphicsView");
+ qmlRegisterExtendedType<QGraphicsScene,QGraphicsSceneDeclarativeUI>(uri,4,6,"QGraphicsScene");
+ qmlRegisterExtendedType<QGraphicsWidget,QGraphicsWidgetDeclarativeUI>(uri,4,6,"QGraphicsWidget");
+ QML_REGISTER_INTERFACE(QGraphicsItem);
+ }
+};
+
+QT_END_NAMESPACE
+
+#include "widgets.moc"
+
+Q_EXPORT_PLUGIN2(qtwidgetsqmlmodule, QT_PREPEND_NAMESPACE(QWidgetsQmlModule));
+
diff --git a/src/imports/widgets/widgets.pro b/src/imports/widgets/widgets.pro
new file mode 100644
index 0000000000..02223d724a
--- /dev/null
+++ b/src/imports/widgets/widgets.pro
@@ -0,0 +1,22 @@
+TARGET = widgets
+TARGETPATH = Qt/widgets
+include(../qimportbase.pri)
+
+QT += declarative
+
+SOURCES += \
+ graphicslayouts.cpp \
+ widgets.cpp
+
+HEADERS += \
+ graphicswidgets_p.h \
+ graphicslayouts_p.h
+
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/imports/Qt/widgets
+target.path = $$TARGETPATH
+
+# install qmldir file
+qmldir.files += qmldir
+qmldir.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
+
+INSTALLS += target qmldir
diff --git a/src/multimedia/audio/qaudiodeviceinfo.cpp b/src/multimedia/audio/qaudiodeviceinfo.cpp
index 092efc505d..ff04b4e3d1 100644
--- a/src/multimedia/audio/qaudiodeviceinfo.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo.cpp
@@ -105,8 +105,8 @@ public:
The values supported by the the device for each of these
parameters can be fetched with
- supportedByteOrders(), supportedChannels(), supportedCodecs(),
- supportedFrequencies(), supportedSampleSizes(), and
+ supportedByteOrders(), supportedChannelCounts(), supportedCodecs(),
+ supportedSampleRates(), supportedSampleSizes(), and
supportedSampleTypes(). The combinations supported are dependent on the platform,
audio plugins installed and the audio device capabilities. If you need a specific format, you can check if
the device supports it with isFormatSupported(), or fetch a
@@ -259,7 +259,20 @@ QStringList QAudioDeviceInfo::supportedCodecs() const
}
/*!
- Returns a list of supported frequencies.
+ Returns a list of supported sample rates.
+
+ \since 4.7
+*/
+
+QList<int> QAudioDeviceInfo::supportedSampleRates() const
+{
+ return supportedFrequencies();
+}
+
+/*!
+ \obsolete
+
+ Use supportedSampleRates() instead.
*/
QList<int> QAudioDeviceInfo::supportedFrequencies() const
@@ -268,7 +281,20 @@ QList<int> QAudioDeviceInfo::supportedFrequencies() const
}
/*!
- Returns a list of supported channels.
+ Returns a list of supported channel counts.
+
+ \since 4.7
+*/
+
+QList<int> QAudioDeviceInfo::supportedChannelCounts() const
+{
+ return supportedChannels();
+}
+
+/*!
+ \obsolete
+
+ Use supportedChannelCount() instead.
*/
QList<int> QAudioDeviceInfo::supportedChannels() const
diff --git a/src/multimedia/audio/qaudiodeviceinfo.h b/src/multimedia/audio/qaudiodeviceinfo.h
index 62dc8a2761..1cc07319d8 100644
--- a/src/multimedia/audio/qaudiodeviceinfo.h
+++ b/src/multimedia/audio/qaudiodeviceinfo.h
@@ -84,7 +84,9 @@ public:
QStringList supportedCodecs() const;
QList<int> supportedFrequencies() const;
+ QList<int> supportedSampleRates() const;
QList<int> supportedChannels() const;
+ QList<int> supportedChannelCounts() const;
QList<int> supportedSampleSizes() const;
QList<QAudioFormat::Endian> supportedByteOrders() const;
QList<QAudioFormat::SampleType> supportedSampleTypes() const;
diff --git a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
index f6b8154a54..67dc90ca72 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
@@ -95,14 +95,14 @@ QAudioFormat QAudioDeviceInfoInternal::preferredFormat() const
QAudioFormat nearest;
if(mode == QAudio::AudioOutput) {
nearest.setFrequency(44100);
- nearest.setChannels(2);
+ nearest.setChannelCount(2);
nearest.setByteOrder(QAudioFormat::LittleEndian);
nearest.setSampleType(QAudioFormat::SignedInt);
nearest.setSampleSize(16);
nearest.setCodec(QLatin1String("audio/pcm"));
} else {
nearest.setFrequency(11025);
- nearest.setChannels(1);
+ nearest.setChannelCount(1);
nearest.setByteOrder(QAudioFormat::LittleEndian);
nearest.setSampleType(QAudioFormat::SignedInt);
nearest.setSampleSize(8);
@@ -218,7 +218,7 @@ void QAudioDeviceInfoInternal::updateLists()
for(i=0;i<iNumDevs;i++) {
if(waveOutGetDevCaps(i, &woc, sizeof(WAVEOUTCAPS))
== MMSYSERR_NOERROR) {
- tmp = QString::fromUtf16((const unsigned short*)woc.szPname);
+ tmp = QString((const QChar *)woc.szPname);
if(tmp.compare(device) == 0) {
match = true;
fmt = woc.dwFormats;
@@ -238,7 +238,7 @@ void QAudioDeviceInfoInternal::updateLists()
for(i=0;i<iNumDevs;i++) {
if(waveInGetDevCaps(i, &woc, sizeof(WAVEINCAPS))
== MMSYSERR_NOERROR) {
- tmp = QString::fromUtf16((const unsigned short*)woc.szPname);
+ tmp = QString((const QChar *)woc.szPname);
if(tmp.compare(device) == 0) {
match = true;
fmt = woc.dwFormats;
@@ -347,7 +347,7 @@ QList<QByteArray> QAudioDeviceInfoInternal::availableDevices(QAudio::Mode mode)
for(i=0;i<iNumDevs;i++) {
if(waveOutGetDevCaps(i, &woc, sizeof(WAVEOUTCAPS))
== MMSYSERR_NOERROR) {
- devices.append(QString::fromUtf16((const unsigned short*)woc.szPname).toLocal8Bit().constData());
+ devices.append(QString((const QChar *)woc.szPname).toLocal8Bit().constData());
}
}
} else {
@@ -357,7 +357,7 @@ QList<QByteArray> QAudioDeviceInfoInternal::availableDevices(QAudio::Mode mode)
for(i=0;i<iNumDevs;i++) {
if(waveInGetDevCaps(i, &woc, sizeof(WAVEINCAPS))
== MMSYSERR_NOERROR) {
- devices.append(QString::fromUtf16((const unsigned short*)woc.szPname).toLocal8Bit().constData());
+ devices.append(QString((const QChar *)woc.szPname).toLocal8Bit().constData());
}
}
diff --git a/src/multimedia/audio/qaudioformat.cpp b/src/multimedia/audio/qaudioformat.cpp
index 89ae0ffefb..86d72f6197 100644
--- a/src/multimedia/audio/qaudioformat.cpp
+++ b/src/multimedia/audio/qaudioformat.cpp
@@ -111,7 +111,7 @@ public:
\o Parameter
\o Description
\row
- \o Frequency
+ \o Sample Rate
\o Samples per second of audio data in Hertz.
\row
\o Number of channels
@@ -143,8 +143,8 @@ public:
Values are initialized as follows:
\list
- \o frequency() = -1
- \o channels() = -1
+ \o sampleRate() = -1
+ \o channelCount() = -1
\o sampleSize() = -1
\o byteOrder() = QAudioFormat::Endian(QSysInfo::ByteOrder)
\o sampleType() = QAudioFormat::Unknown
@@ -224,7 +224,20 @@ bool QAudioFormat::isValid() const
}
/*!
- Sets the frequency to \a frequency.
+ Sets the sample rate to \a samplerate Hertz.
+
+ \since 4.7
+*/
+
+void QAudioFormat::setSampleRate(int samplerate)
+{
+ d->frequency = samplerate;
+}
+
+/*!
+ \obsolete
+
+ Use setSampleRate() instead.
*/
void QAudioFormat::setFrequency(int frequency)
@@ -233,7 +246,20 @@ void QAudioFormat::setFrequency(int frequency)
}
/*!
- Returns the current frequency value.
+ Returns the current sample rate in Hertz.
+
+ \since 4.7
+*/
+
+int QAudioFormat::sampleRate() const
+{
+ return d->frequency;
+}
+
+/*!
+ \obsolete
+
+ Use sampleRate() instead.
*/
int QAudioFormat::frequency() const
@@ -242,7 +268,20 @@ int QAudioFormat::frequency() const
}
/*!
- Sets the channels to \a channels.
+ Sets the channel count to \a channels.
+
+ \since 4.7
+*/
+
+void QAudioFormat::setChannelCount(int channels)
+{
+ d->channels = channels;
+}
+
+/*!
+ \obsolete
+
+ Use setChannelCount() instead.
*/
void QAudioFormat::setChannels(int channels)
@@ -251,7 +290,20 @@ void QAudioFormat::setChannels(int channels)
}
/*!
- Returns the current channel value.
+ Returns the current channel count value.
+
+ \since 4.7
+*/
+
+int QAudioFormat::channelCount() const
+{
+ return d->channels;
+}
+
+/*!
+ \obsolete
+
+ Use channelCount() instead.
*/
int QAudioFormat::channels() const
diff --git a/src/multimedia/audio/qaudioformat.h b/src/multimedia/audio/qaudioformat.h
index cb58d1ca27..6c835b77ed 100644
--- a/src/multimedia/audio/qaudioformat.h
+++ b/src/multimedia/audio/qaudioformat.h
@@ -75,9 +75,13 @@ public:
void setFrequency(int frequency);
int frequency() const;
+ void setSampleRate(int sampleRate);
+ int sampleRate() const;
void setChannels(int channels);
int channels() const;
+ void setChannelCount(int channelCount);
+ int channelCount() const;
void setSampleSize(int sampleSize);
int sampleSize() const;
diff --git a/src/multimedia/audio/qaudioinput_win32_p.cpp b/src/multimedia/audio/qaudioinput_win32_p.cpp
index ec0359ac5d..180cbdabd0 100644
--- a/src/multimedia/audio/qaudioinput_win32_p.cpp
+++ b/src/multimedia/audio/qaudioinput_win32_p.cpp
@@ -88,7 +88,7 @@ QAudioInputPrivate::~QAudioInputPrivate()
DeleteCriticalSection(&waveInCriticalSection);
}
-void CALLBACK QAudioInputPrivate::waveInProc( HWAVEIN hWaveIn, UINT uMsg,
+void QT_WIN_CALLBACK QAudioInputPrivate::waveInProc( HWAVEIN hWaveIn, UINT uMsg,
DWORD dwInstance, DWORD dwParam1, DWORD dwParam2 )
{
Q_UNUSED(dwParam1)
@@ -232,6 +232,11 @@ bool QAudioInputPrivate::open()
} else {
period_size = buffer_size/5;
}
+#ifdef Q_OS_WINCE
+ // For wince reduce size to 40ms for buffer size and 20ms period
+ buffer_size = settings.sampleRate()*settings.channelCount()*(settings.sampleSize()/8)*0.04;
+ period_size = buffer_size/2;
+#endif
timeStamp.restart();
elapsedTimeOffset = 0;
wfx.nSamplesPerSec = settings.frequency();
@@ -252,7 +257,7 @@ bool QAudioInputPrivate::open()
if(waveInGetDevCaps(ii, &wic, sizeof(WAVEINCAPS))
== MMSYSERR_NOERROR) {
QString tmp;
- tmp = QString::fromUtf16((const unsigned short*)wic.szPname);
+ tmp = QString((const QChar *)wic.szPname);
if(tmp.compare(QLatin1String(m_device)) == 0) {
devId = ii;
break;
diff --git a/src/multimedia/audio/qaudiooutput_win32_p.cpp b/src/multimedia/audio/qaudiooutput_win32_p.cpp
index f3ba07997a..ab8da53eb7 100644
--- a/src/multimedia/audio/qaudiooutput_win32_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_win32_p.cpp
@@ -88,7 +88,7 @@ QAudioOutputPrivate::~QAudioOutputPrivate()
DeleteCriticalSection(&waveOutCriticalSection);
}
-void CALLBACK QAudioOutputPrivate::waveOutProc( HWAVEOUT hWaveOut, UINT uMsg,
+void QT_WIN_CALLBACK QAudioOutputPrivate::waveOutProc( HWAVEOUT hWaveOut, UINT uMsg,
DWORD dwInstance, DWORD dwParam1, DWORD dwParam2 )
{
Q_UNUSED(dwParam1)
@@ -257,7 +257,7 @@ bool QAudioOutputPrivate::open()
if(waveOutGetDevCaps(ii, &woc, sizeof(WAVEOUTCAPS))
== MMSYSERR_NOERROR) {
QString tmp;
- tmp = QString::fromUtf16((const unsigned short*)woc.szPname);
+ tmp = QString((const QChar *)woc.szPname);
if(tmp.compare(QLatin1String(m_device)) == 0) {
devId = ii;
break;
diff --git a/src/multimedia/audio/qaudiooutput_win32_p.h b/src/multimedia/audio/qaudiooutput_win32_p.h
index 6e0899f3ea..bb176a0f6a 100644
--- a/src/multimedia/audio/qaudiooutput_win32_p.h
+++ b/src/multimedia/audio/qaudiooutput_win32_p.h
@@ -116,7 +116,7 @@ private:
qint64 totalTimeValue;
bool pullMode;
int intervalTime;
- static void CALLBACK waveOutProc( HWAVEOUT hWaveOut, UINT uMsg,
+ static void QT_WIN_CALLBACK waveOutProc( HWAVEOUT hWaveOut, UINT uMsg,
DWORD dwInstance, DWORD dwParam1, DWORD dwParam2 );
WAVEHDR* allocateBlocks(int size, int count);
diff --git a/src/multimedia/base/base.pri b/src/multimedia/base/base.pri
new file mode 100644
index 0000000000..5aebbf07ed
--- /dev/null
+++ b/src/multimedia/base/base.pri
@@ -0,0 +1,63 @@
+
+QT += network
+contains(QT_CONFIG, opengl):QT += opengl
+
+HEADERS += \
+ $$PWD/qmediaresource.h \
+ $$PWD/qmediacontent.h \
+ $$PWD/qmediaobject.h \
+ $$PWD/qmediaobject_p.h \
+ $$PWD/qmediapluginloader_p.h \
+ $$PWD/qmediaservice.h \
+ $$PWD/qmediaservice_p.h \
+ $$PWD/qmediaserviceprovider.h \
+ $$PWD/qmediaserviceproviderplugin.h \
+ $$PWD/qmediacontrol.h \
+ $$PWD/qmediacontrol_p.h \
+ $$PWD/qmetadatacontrol.h \
+ $$PWD/qvideooutputcontrol.h \
+ $$PWD/qvideowindowcontrol.h \
+ $$PWD/qvideorenderercontrol.h \
+ $$PWD/qvideodevicecontrol.h \
+ $$PWD/qvideowidgetcontrol.h \
+ $$PWD/qvideowidget.h \
+ $$PWD/qvideowidget_p.h \
+ $$PWD/qgraphicsvideoitem.h \
+ $$PWD/qmediaplaylistcontrol.h \
+ $$PWD/qmediaplaylist.h \
+ $$PWD/qmediaplaylist_p.h \
+ $$PWD/qmediaplaylistprovider.h \
+ $$PWD/qmediaplaylistprovider_p.h \
+ $$PWD/qmediaplaylistioplugin.h \
+ $$PWD/qlocalmediaplaylistprovider.h \
+ $$PWD/qmediaplaylistnavigator.h \
+ $$PWD/qpaintervideosurface_p.h \
+ $$PWD/qmediatimerange.h \
+ $$PWD/qtmedianamespace.h
+
+SOURCES += \
+ $$PWD/qmediaresource.cpp \
+ $$PWD/qmediacontent.cpp \
+ $$PWD/qmediaobject.cpp \
+ $$PWD/qmediapluginloader.cpp \
+ $$PWD/qmediaservice.cpp \
+ $$PWD/qmediaserviceprovider.cpp \
+ $$PWD/qmediacontrol.cpp \
+ $$PWD/qmetadatacontrol.cpp \
+ $$PWD/qvideooutputcontrol.cpp \
+ $$PWD/qvideowindowcontrol.cpp \
+ $$PWD/qvideorenderercontrol.cpp \
+ $$PWD/qvideodevicecontrol.cpp \
+ $$PWD/qvideowidgetcontrol.cpp \
+ $$PWD/qvideowidget.cpp \
+ $$PWD/qgraphicsvideoitem.cpp \
+ $$PWD/qmediaplaylistcontrol.cpp \
+ $$PWD/qmediaplaylist.cpp \
+ $$PWD/qmediaplaylistprovider.cpp \
+ $$PWD/qmediaplaylistioplugin.cpp \
+ $$PWD/qlocalmediaplaylistprovider.cpp \
+ $$PWD/qmediaplaylistnavigator.cpp \
+ $$PWD/qpaintervideosurface.cpp \
+ $$PWD/qmediatimerange.cpp
+
+
diff --git a/src/multimedia/base/qgraphicsvideoitem.cpp b/src/multimedia/base/qgraphicsvideoitem.cpp
new file mode 100644
index 0000000000..d5ca9e89ce
--- /dev/null
+++ b/src/multimedia/base/qgraphicsvideoitem.cpp
@@ -0,0 +1,418 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtMultimedia/qgraphicsvideoitem.h>
+
+#include <QtMultimedia/qmediaobject.h>
+#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/private/qpaintervideosurface_p.h>
+#include <QtMultimedia/qvideooutputcontrol.h>
+#include <QtMultimedia/qvideorenderercontrol.h>
+#include <QtMultimedia/qvideosurfaceformat.h>
+
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+#include <QtOpenGL/qgl.h>
+#endif
+
+QT_BEGIN_NAMESPACE
+
+
+class QGraphicsVideoItemPrivate
+{
+public:
+ QGraphicsVideoItemPrivate()
+ : q_ptr(0)
+ , surface(0)
+ , mediaObject(0)
+ , service(0)
+ , outputControl(0)
+ , rendererControl(0)
+ , aspectRatioMode(Qt::KeepAspectRatio)
+ , updatePaintDevice(true)
+ , rect(0.0, 0.0, 320, 240)
+ {
+ }
+
+ QGraphicsVideoItem *q_ptr;
+
+ QPainterVideoSurface *surface;
+ QMediaObject *mediaObject;
+ QMediaService *service;
+ QVideoOutputControl *outputControl;
+ QVideoRendererControl *rendererControl;
+ Qt::AspectRatioMode aspectRatioMode;
+ bool updatePaintDevice;
+ QRectF rect;
+ QRectF boundingRect;
+ QRectF sourceRect;
+ QSizeF nativeSize;
+
+ void clearService();
+ void updateRects();
+
+ void _q_present();
+ void _q_formatChanged(const QVideoSurfaceFormat &format);
+ void _q_serviceDestroyed();
+ void _q_mediaObjectDestroyed();
+};
+
+void QGraphicsVideoItemPrivate::clearService()
+{
+ if (outputControl) {
+ outputControl->setOutput(QVideoOutputControl::NoOutput);
+ outputControl = 0;
+ }
+ if (rendererControl) {
+ surface->stop();
+ rendererControl->setSurface(0);
+ rendererControl = 0;
+ }
+ if (service) {
+ QObject::disconnect(service, SIGNAL(destroyed()), q_ptr, SLOT(_q_serviceDestroyed()));
+ service = 0;
+ }
+}
+
+void QGraphicsVideoItemPrivate::updateRects()
+{
+ q_ptr->prepareGeometryChange();
+
+ if (nativeSize.isEmpty()) {
+ boundingRect = QRectF();
+ } else if (aspectRatioMode == Qt::IgnoreAspectRatio) {
+ boundingRect = rect;
+ sourceRect = QRectF(0, 0, 1, 1);
+ } else if (aspectRatioMode == Qt::KeepAspectRatio) {
+ QSizeF size = nativeSize;
+ size.scale(rect.size(), Qt::KeepAspectRatio);
+
+ boundingRect = QRectF(0, 0, size.width(), size.height());
+ boundingRect.moveCenter(rect.center());
+
+ sourceRect = QRectF(0, 0, 1, 1);
+ } else if (aspectRatioMode == Qt::KeepAspectRatioByExpanding) {
+ boundingRect = rect;
+
+ QSizeF size = rect.size();
+ size.scale(nativeSize, Qt::KeepAspectRatio);
+
+ sourceRect = QRectF(
+ 0, 0, size.width() / nativeSize.width(), size.height() / nativeSize.height());
+ sourceRect.moveCenter(QPointF(0.5, 0.5));
+ }
+}
+
+void QGraphicsVideoItemPrivate::_q_present()
+{
+ if (q_ptr->isObscured()) {
+ q_ptr->update(boundingRect);
+ surface->setReady(true);
+ } else {
+ q_ptr->update(boundingRect);
+ }
+}
+
+void QGraphicsVideoItemPrivate::_q_formatChanged(const QVideoSurfaceFormat &format)
+{
+ nativeSize = format.sizeHint();
+
+ updateRects();
+
+ emit q_ptr->nativeSizeChanged(nativeSize);
+}
+
+void QGraphicsVideoItemPrivate::_q_serviceDestroyed()
+{
+ rendererControl = 0;
+ outputControl = 0;
+ service = 0;
+
+ surface->stop();
+}
+
+void QGraphicsVideoItemPrivate::_q_mediaObjectDestroyed()
+{
+ mediaObject = 0;
+
+ clearService();
+}
+
+/*!
+ \class QGraphicsVideoItem
+ \brief The QGraphicsVideoItem class provides a graphics item which display video produced by a QMediaObject.
+
+ \since 4.7
+
+ \ingroup multimedia
+
+ Attaching a QGraphicsVideoItem to a QMediaObject allows it to display
+ the video or image output of that media object. A QGraphicsVideoItem
+ is attached to a media object by passing a pointer to the QMediaObject
+ to the setMediaObject() function.
+
+ \code
+ player = new QMediaPlayer(this);
+
+ QGraphicsVideoItem *item = new QGraphicsVideoItem;
+ item->setMediaObject(player);
+ graphicsView->scence()->addItem(item);
+ graphicsView->show();
+
+ player->setMedia(video);
+ player->play();
+ \endcode
+
+ \bold {Note}: Only a single display output can be attached to a media
+ object at one time.
+
+ \sa QMediaObject, QMediaPlayer, QVideoWidget
+*/
+
+/*!
+ Constructs a graphics item that displays video.
+
+ The \a parent is passed to QGraphicsItem.
+*/
+QGraphicsVideoItem::QGraphicsVideoItem(QGraphicsItem *parent)
+ : QGraphicsObject(parent)
+ , d_ptr(new QGraphicsVideoItemPrivate)
+{
+ d_ptr->q_ptr = this;
+ d_ptr->surface = new QPainterVideoSurface;
+
+ connect(d_ptr->surface, SIGNAL(frameChanged()), this, SLOT(_q_present()));
+ connect(d_ptr->surface, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat)),
+ this, SLOT(_q_formatChanged(QVideoSurfaceFormat)));
+}
+
+/*!
+ Destroys a video graphics item.
+*/
+QGraphicsVideoItem::~QGraphicsVideoItem()
+{
+ if (d_ptr->outputControl)
+ d_ptr->outputControl->setOutput(QVideoOutputControl::NoOutput);
+
+ if (d_ptr->rendererControl)
+ d_ptr->rendererControl->setSurface(0);
+
+ delete d_ptr->surface;
+ delete d_ptr;
+}
+
+/*!
+ \property QGraphicsVideoItem::mediaObject
+ \brief the media object which provides the video displayed by a graphics
+ item.
+*/
+
+QMediaObject *QGraphicsVideoItem::mediaObject() const
+{
+ return d_func()->mediaObject;
+}
+
+void QGraphicsVideoItem::setMediaObject(QMediaObject *object)
+{
+ Q_D(QGraphicsVideoItem);
+
+ if (object == d->mediaObject)
+ return;
+
+ d->clearService();
+
+ if (d->mediaObject) {
+ disconnect(d->mediaObject, SIGNAL(destroyed()), this, SLOT(_q_mediaObjectDestroyed()));
+ d->mediaObject->unbind(this);
+ }
+
+ d->mediaObject = object;
+
+ if (d->mediaObject) {
+ d->mediaObject->bind(this);
+
+ connect(d->mediaObject, SIGNAL(destroyed()), this, SLOT(_q_mediaObjectDestroyed()));
+
+ d->service = d->mediaObject->service();
+
+ if (d->service) {
+ connect(d->service, SIGNAL(destroyed()), this, SLOT(_q_serviceDestroyed()));
+
+ d->outputControl = qobject_cast<QVideoOutputControl *>(
+ d->service->control(QVideoOutputControl_iid));
+ d->rendererControl = qobject_cast<QVideoRendererControl *>(
+ d->service->control(QVideoRendererControl_iid));
+
+ if (d->outputControl != 0 && d->rendererControl != 0) {
+ d->rendererControl->setSurface(d->surface);
+
+ if (isVisible())
+ d->outputControl->setOutput(QVideoOutputControl::RendererOutput);
+ }
+ }
+ }
+}
+
+/*!
+ \property QGraphicsVideoItem::aspectRatioMode
+ \brief how a video is scaled to fit the graphics item's size.
+*/
+
+Qt::AspectRatioMode QGraphicsVideoItem::aspectRatioMode() const
+{
+ return d_func()->aspectRatioMode;
+}
+
+void QGraphicsVideoItem::setAspectRatioMode(Qt::AspectRatioMode mode)
+{
+ Q_D(QGraphicsVideoItem);
+
+ d->aspectRatioMode = mode;
+ d->updateRects();
+}
+
+/*!
+ \property QGraphicsVideoItem::offset
+ \brief the video item's offset.
+
+ QGraphicsVideoItem will draw video using the offset for its top left
+ corner.
+*/
+
+QPointF QGraphicsVideoItem::offset() const
+{
+ return d_func()->rect.topLeft();
+}
+
+void QGraphicsVideoItem::setOffset(const QPointF &offset)
+{
+ Q_D(QGraphicsVideoItem);
+
+ d->rect.moveTo(offset);
+ d->updateRects();
+}
+
+/*!
+ \property QGraphicsVideoItem::size
+ \brief the video item's size.
+
+ QGraphicsVideoItem will draw video scaled to fit size according to its
+ fillMode.
+*/
+
+QSizeF QGraphicsVideoItem::size() const
+{
+ return d_func()->rect.size();
+}
+
+void QGraphicsVideoItem::setSize(const QSizeF &size)
+{
+ Q_D(QGraphicsVideoItem);
+
+ d->rect.setSize(size.isValid() ? size : QSizeF(0, 0));
+ d->updateRects();
+}
+
+/*!
+ \property QGraphicsVideoItem::nativeSize
+ \brief the native size of the video.
+*/
+
+QSizeF QGraphicsVideoItem::nativeSize() const
+{
+ return d_func()->nativeSize;
+}
+
+/*!
+ \fn QGraphicsVideoItem::nativeSizeChanged(const QSizeF &size)
+
+ Signals that the native \a size of the video has changed.
+*/
+
+/*!
+ \reimp
+*/
+QRectF QGraphicsVideoItem::boundingRect() const
+{
+ return d_func()->boundingRect;
+}
+
+/*!
+ \reimp
+*/
+void QGraphicsVideoItem::paint(
+ QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+ Q_D(QGraphicsVideoItem);
+
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
+
+ if (d->surface && d->surface->isActive()) {
+ d->surface->paint(painter, d->boundingRect, d->sourceRect);
+ d->surface->setReady(true);
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+ } else if (d->updatePaintDevice && (painter->paintEngine()->type() == QPaintEngine::OpenGL
+ || painter->paintEngine()->type() == QPaintEngine::OpenGL2)) {
+ d->updatePaintDevice = false;
+
+ d->surface->setGLContext(const_cast<QGLContext *>(QGLContext::currentContext()));
+ if (d->surface->supportedShaderTypes() & QPainterVideoSurface::GlslShader) {
+ d->surface->setShaderType(QPainterVideoSurface::GlslShader);
+ } else {
+ d->surface->setShaderType(QPainterVideoSurface::FragmentProgramShader);
+ }
+#endif
+ }
+}
+
+/*!
+ \reimp
+
+ \internal
+*/
+QVariant QGraphicsVideoItem::itemChange(GraphicsItemChange change, const QVariant &value)
+{
+ return QGraphicsItem::itemChange(change, value);
+}
+
+QT_END_NAMESPACE
+
+#include "moc_qgraphicsvideoitem.cpp"
diff --git a/src/multimedia/base/qgraphicsvideoitem.h b/src/multimedia/base/qgraphicsvideoitem.h
new file mode 100644
index 0000000000..c339606769
--- /dev/null
+++ b/src/multimedia/base/qgraphicsvideoitem.h
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGRAPHICSVIDEOITEM_H
+#define QGRAPHICSVIDEOITEM_H
+
+#include <QtGui/qgraphicsitem.h>
+
+#include <QtMultimedia/qvideowidget.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+class QVideoSurfaceFormat;
+
+class QGraphicsVideoItemPrivate;
+class Q_MULTIMEDIA_EXPORT QGraphicsVideoItem : public QGraphicsObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QMediaObject* mediaObject READ mediaObject WRITE setMediaObject)
+ Q_PROPERTY(Qt::AspectRatioMode aspectRatioMode READ aspectRatioMode WRITE setAspectRatioMode)
+ Q_PROPERTY(QPointF offset READ offset WRITE setOffset)
+ Q_PROPERTY(QSizeF size READ size WRITE setSize)
+ Q_PROPERTY(QSizeF nativeSize READ nativeSize NOTIFY nativeSizeChanged)
+public:
+ QGraphicsVideoItem(QGraphicsItem *parent = 0);
+ ~QGraphicsVideoItem();
+
+ QMediaObject *mediaObject() const;
+ void setMediaObject(QMediaObject *object);
+
+ Qt::AspectRatioMode aspectRatioMode() const;
+ void setAspectRatioMode(Qt::AspectRatioMode mode);
+
+ QPointF offset() const;
+ void setOffset(const QPointF &offset);
+
+ QSizeF size() const;
+ void setSize(const QSizeF &size);
+
+ QSizeF nativeSize() const;
+
+ QRectF boundingRect() const;
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+
+Q_SIGNALS:
+ void nativeSizeChanged(const QSizeF &size);
+
+protected:
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value);
+
+ QGraphicsVideoItemPrivate *d_ptr;
+
+private:
+ Q_DECLARE_PRIVATE(QGraphicsVideoItem)
+ Q_PRIVATE_SLOT(d_func(), void _q_present())
+ Q_PRIVATE_SLOT(d_func(), void _q_formatChanged(const QVideoSurfaceFormat &))
+ Q_PRIVATE_SLOT(d_func(), void _q_serviceDestroyed())
+ Q_PRIVATE_SLOT(d_func(), void _q_mediaObjectDestroyed())
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/multimedia/base/qlocalmediaplaylistprovider.cpp b/src/multimedia/base/qlocalmediaplaylistprovider.cpp
new file mode 100644
index 0000000000..40ff1fc487
--- /dev/null
+++ b/src/multimedia/base/qlocalmediaplaylistprovider.cpp
@@ -0,0 +1,196 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtMultimedia/qlocalmediaplaylistprovider.h>
+#include "qmediaplaylistprovider_p.h"
+#include <QtMultimedia/qmediacontent.h>
+
+
+QT_BEGIN_NAMESPACE
+
+class QLocalMediaPlaylistProviderPrivate: public QMediaPlaylistProviderPrivate
+{
+public:
+ QList<QMediaContent> resources;
+};
+
+QLocalMediaPlaylistProvider::QLocalMediaPlaylistProvider(QObject *parent)
+ :QMediaPlaylistProvider(*new QLocalMediaPlaylistProviderPrivate, parent)
+{
+}
+
+QLocalMediaPlaylistProvider::~QLocalMediaPlaylistProvider()
+{
+}
+
+bool QLocalMediaPlaylistProvider::isReadOnly() const
+{
+ return false;
+}
+
+int QLocalMediaPlaylistProvider::mediaCount() const
+{
+ return d_func()->resources.size();
+}
+
+QMediaContent QLocalMediaPlaylistProvider::media(int pos) const
+{
+ return d_func()->resources.value(pos);
+}
+
+bool QLocalMediaPlaylistProvider::addMedia(const QMediaContent &content)
+{
+ Q_D(QLocalMediaPlaylistProvider);
+
+ int pos = d->resources.count();
+
+ emit mediaAboutToBeInserted(pos, pos);
+ d->resources.append(content);
+ emit mediaInserted(pos, pos);
+
+ return true;
+}
+
+bool QLocalMediaPlaylistProvider::addMedia(const QList<QMediaContent> &items)
+{
+ Q_D(QLocalMediaPlaylistProvider);
+
+ if (items.isEmpty())
+ return true;
+
+ int pos = d->resources.count();
+ int end = pos+items.count()-1;
+
+ emit mediaAboutToBeInserted(pos, end);
+ d->resources.append(items);
+ emit mediaInserted(pos, end);
+
+ return true;
+}
+
+
+bool QLocalMediaPlaylistProvider::insertMedia(int pos, const QMediaContent &content)
+{
+ Q_D(QLocalMediaPlaylistProvider);
+
+ emit mediaAboutToBeInserted(pos, pos);
+ d->resources.insert(pos, content);
+ emit mediaInserted(pos,pos);
+
+ return true;
+}
+
+bool QLocalMediaPlaylistProvider::insertMedia(int pos, const QList<QMediaContent> &items)
+{
+ Q_D(QLocalMediaPlaylistProvider);
+
+ if (items.isEmpty())
+ return true;
+
+ const int last = pos+items.count()-1;
+
+ emit mediaAboutToBeInserted(pos, last);
+ for (int i=0; i<items.count(); i++)
+ d->resources.insert(pos+i, items.at(i));
+ emit mediaInserted(pos, last);
+
+ return true;
+}
+
+bool QLocalMediaPlaylistProvider::removeMedia(int fromPos, int toPos)
+{
+ Q_D(QLocalMediaPlaylistProvider);
+
+ Q_ASSERT(fromPos >= 0);
+ Q_ASSERT(fromPos <= toPos);
+ Q_ASSERT(toPos < mediaCount());
+
+ emit mediaAboutToBeRemoved(fromPos, toPos);
+ d->resources.erase(d->resources.begin()+fromPos, d->resources.begin()+toPos+1);
+ emit mediaRemoved(fromPos, toPos);
+
+ return true;
+}
+
+bool QLocalMediaPlaylistProvider::removeMedia(int pos)
+{
+ Q_D(QLocalMediaPlaylistProvider);
+
+ emit mediaAboutToBeRemoved(pos, pos);
+ d->resources.removeAt(pos);
+ emit mediaRemoved(pos, pos);
+
+ return true;
+}
+
+bool QLocalMediaPlaylistProvider::clear()
+{
+ Q_D(QLocalMediaPlaylistProvider);
+ if (!d->resources.isEmpty()) {
+ int lastPos = mediaCount()-1;
+ emit mediaAboutToBeRemoved(0, lastPos);
+ d->resources.clear();
+ emit mediaRemoved(0, lastPos);
+ }
+
+ return true;
+}
+
+void QLocalMediaPlaylistProvider::shuffle()
+{
+ Q_D(QLocalMediaPlaylistProvider);
+ if (!d->resources.isEmpty()) {
+ QList<QMediaContent> resources;
+
+ while (!d->resources.isEmpty()) {
+ resources.append(d->resources.takeAt(qrand() % d->resources.size()));
+ }
+
+ d->resources = resources;
+ emit mediaChanged(0, mediaCount()-1);
+ }
+
+}
+
+#include "moc_qlocalmediaplaylistprovider.cpp"
+
+QT_END_NAMESPACE
+
diff --git a/src/multimedia/base/qlocalmediaplaylistprovider.h b/src/multimedia/base/qlocalmediaplaylistprovider.h
new file mode 100644
index 0000000000..db8deb1d8b
--- /dev/null
+++ b/src/multimedia/base/qlocalmediaplaylistprovider.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QLOCALMEDIAPAYLISTPROVIDER_H
+#define QLOCALMEDIAPAYLISTPROVIDER_H
+
+#include <QtMultimedia/qmediaplaylistprovider.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+
+class QLocalMediaPlaylistProviderPrivate;
+class Q_MULTIMEDIA_EXPORT QLocalMediaPlaylistProvider : public QMediaPlaylistProvider
+{
+ Q_OBJECT
+
+public:
+ QLocalMediaPlaylistProvider(QObject *parent=0);
+ virtual ~QLocalMediaPlaylistProvider();
+
+ virtual int mediaCount() const;
+ virtual QMediaContent media(int pos) const;
+
+ virtual bool isReadOnly() const;
+
+ virtual bool addMedia(const QMediaContent &content);
+ virtual bool addMedia(const QList<QMediaContent> &items);
+ virtual bool insertMedia(int pos, const QMediaContent &content);
+ virtual bool insertMedia(int pos, const QList<QMediaContent> &items);
+ virtual bool removeMedia(int pos);
+ virtual bool removeMedia(int start, int end);
+ virtual bool clear();
+
+public Q_SLOTS:
+ virtual void shuffle();
+
+private:
+ Q_DECLARE_PRIVATE(QLocalMediaPlaylistProvider)
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QLOCALMEDIAPAYLISTSOURCE_H
diff --git a/src/multimedia/base/qmediacontent.cpp b/src/multimedia/base/qmediacontent.cpp
new file mode 100644
index 0000000000..b6bf56b267
--- /dev/null
+++ b/src/multimedia/base/qmediacontent.cpp
@@ -0,0 +1,242 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qurl.h>
+#include <QtCore/qvariant.h>
+
+#include <qmediacontent.h>
+
+
+QT_BEGIN_NAMESPACE
+
+
+class QMediaContentPrivate : public QSharedData
+{
+public:
+ QMediaContentPrivate() {}
+ QMediaContentPrivate(const QMediaResourceList &r):
+ resources(r) {}
+
+ QMediaContentPrivate(const QMediaContentPrivate &other):
+ QSharedData(other),
+ resources(other.resources)
+ {}
+
+ bool operator==(const QMediaContentPrivate &other) const
+ {
+ return resources == other.resources;
+ }
+
+ QMediaResourceList resources;
+
+private:
+ QMediaContentPrivate& operator=(const QMediaContentPrivate &other);
+};
+
+
+/*!
+ \class QMediaContent
+ \preliminary
+ \brief The QMediaContent class provides access to the resources relating to a media content.
+ \since 4.7
+
+ \ingroup multimedia
+
+ QMediaContent is used within the multimedia framework as the logical handle
+ to media content. A QMediaContent object is composed of one or more
+ \l {QMediaResource}s where each resource provides the URL and format
+ information of a different encoding of the content.
+
+ A non-null QMediaContent will always have a primary or canonical reference to
+ the content available through the canonicalUrl() or canonicalResource()
+ methods, any additional resources are optional.
+*/
+
+
+/*!
+ Constructs a null QMediaContent.
+*/
+
+QMediaContent::QMediaContent()
+{
+}
+
+/*!
+ Constructs a media content with \a url providing a reference to the content.
+*/
+
+QMediaContent::QMediaContent(const QUrl &url):
+ d(new QMediaContentPrivate)
+{
+ d->resources << QMediaResource(url);
+}
+
+/*!
+ Constructs a media content with \a request providing a reference to the content.
+
+ This constructor can be used to reference media content via network protocols such as HTTP.
+ This may include additional information required to obtain the resource, such as Cookies or HTTP headers.
+*/
+
+QMediaContent::QMediaContent(const QNetworkRequest &request):
+ d(new QMediaContentPrivate)
+{
+ d->resources << QMediaResource(request);
+}
+
+/*!
+ Constructs a media content with \a resource providing a reference to the content.
+*/
+
+QMediaContent::QMediaContent(const QMediaResource &resource):
+ d(new QMediaContentPrivate)
+{
+ d->resources << resource;
+}
+
+/*!
+ Constructs a media content with \a resources providing a reference to the content.
+*/
+
+QMediaContent::QMediaContent(const QMediaResourceList &resources):
+ d(new QMediaContentPrivate(resources))
+{
+}
+
+/*!
+ Constructs a copy of the media content \a other.
+*/
+
+QMediaContent::QMediaContent(const QMediaContent &other):
+ d(other.d)
+{
+}
+
+/*!
+ Destroys the media content object.
+*/
+
+QMediaContent::~QMediaContent()
+{
+}
+
+/*!
+ Assigns the value of \a other to this media content.
+*/
+
+QMediaContent& QMediaContent::operator=(const QMediaContent &other)
+{
+ d = other.d;
+ return *this;
+}
+
+/*!
+ Returns true if \a other is equivalent to this media content; false otherwise.
+*/
+
+bool QMediaContent::operator==(const QMediaContent &other) const
+{
+ return (d.constData() == 0 && other.d.constData() == 0) ||
+ (d.constData() != 0 && other.d.constData() != 0 &&
+ *d.constData() == *other.d.constData());
+}
+
+/*!
+ Returns true if \a other is not equivalent to this media content; false otherwise.
+*/
+
+bool QMediaContent::operator!=(const QMediaContent &other) const
+{
+ return !(*this == other);
+}
+
+/*!
+ Returns true if this media content is null (uninitialized); false otherwise.
+*/
+
+bool QMediaContent::isNull() const
+{
+ return d.constData() == 0;
+}
+
+/*!
+ Returns a QUrl that represents that canonical resource for this media content.
+*/
+
+QUrl QMediaContent::canonicalUrl() const
+{
+ return canonicalResource().url();
+}
+
+/*!
+ Returns a QNetworkRequest that represents that canonical resource for this media content.
+*/
+
+QNetworkRequest QMediaContent::canonicalRequest() const
+{
+ return canonicalResource().request();
+}
+
+/*!
+ Returns a QMediaResource that represents that canonical resource for this media content.
+*/
+
+QMediaResource QMediaContent::canonicalResource() const
+{
+ return d.constData() != 0
+ ? d->resources.value(0)
+ : QMediaResource();
+}
+
+/*!
+ Returns a list of alternative resources for this media content. The first item in this list
+ is always the canonical resource.
+*/
+
+QMediaResourceList QMediaContent::resources() const
+{
+ return d.constData() != 0
+ ? d->resources
+ : QMediaResourceList();
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/multimedia/base/qmediacontent.h b/src/multimedia/base/qmediacontent.h
new file mode 100644
index 0000000000..5a279c1ede
--- /dev/null
+++ b/src/multimedia/base/qmediacontent.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMEDIACONTENT_H
+#define QMEDIACONTENT_H
+
+#include <QtCore/qmetatype.h>
+#include <QtCore/qshareddata.h>
+
+#include <QtMultimedia/qmediaresource.h>
+#include <QtNetwork/qnetworkrequest.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+class QMediaContentPrivate;
+class Q_MULTIMEDIA_EXPORT QMediaContent
+{
+public:
+ QMediaContent();
+ QMediaContent(const QUrl &contentUrl);
+ QMediaContent(const QNetworkRequest &contentRequest);
+ QMediaContent(const QMediaResource &contentResource);
+ QMediaContent(const QMediaResourceList &resources);
+ QMediaContent(const QMediaContent &other);
+ ~QMediaContent();
+
+ QMediaContent& operator=(const QMediaContent &other);
+
+ bool operator==(const QMediaContent &other) const;
+ bool operator!=(const QMediaContent &other) const;
+
+ bool isNull() const;
+
+ QUrl canonicalUrl() const;
+ QNetworkRequest canonicalRequest() const;
+ QMediaResource canonicalResource() const;
+
+ QMediaResourceList resources() const;
+
+private:
+ QSharedDataPointer<QMediaContentPrivate> d;
+};
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QMediaContent)
+
+QT_END_HEADER
+
+#endif // QMEDIACONTENT_H
diff --git a/src/multimedia/base/qmediacontrol.cpp b/src/multimedia/base/qmediacontrol.cpp
new file mode 100644
index 0000000000..b84c49e773
--- /dev/null
+++ b/src/multimedia/base/qmediacontrol.cpp
@@ -0,0 +1,140 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qmetaobject.h>
+#include <QtCore/qtimer.h>
+
+#include <QtMultimedia/qmediacontrol.h>
+#include "qmediacontrol_p.h"
+
+
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QMediaControl
+ \ingroup multimedia-serv
+ \since 4.7
+
+ \preliminary
+ \brief The QMediaControl class provides a base interface for media service controls.
+
+ Media controls provide an interface to individual features provided by a media service. Most
+ services implement a principal control which exposes the core functionality of the service and
+ a number optional controls which expose any additional functionality.
+
+ A pointer to a control implemented by a media service can be obtained using the
+ \l {QMediaService::control()}{control()} member of QMediaService. If the service doesn't
+ implement a control it will instead return a null pointer.
+
+ \code
+ QMediaPlayerControl *control = qobject_cast<QMediaPlayerControl *>(
+ service->control("com.nokia.Qt.QMediaPlayerControl/1.0"));
+ \endcode
+
+ Alternatively if the IId of the control has been declared using Q_MEDIA_DECLARE_CONTROL
+ the template version of QMediaService::control() can be used to request the service without
+ explicitly passing the IId.
+
+ \code
+ QMediaPlayerControl *control = service->control<QMediaPlayerControl *>();
+ \endcode
+
+ Most application code will not interface directly with a media service's controls, instead the
+ QMediaObject which owns the service acts as an intermeditary between one or more controls and
+ the application.
+
+ \sa QMediaService, QMediaObject
+*/
+
+/*!
+ \macro Q_MEDIA_DECLARE_CONTROL(Class, IId)
+ \relates QMediaControl
+
+ The Q_MEDIA_DECLARE_CONTROL macro declares an \a IId for a \a Class that inherits from
+ QMediaControl.
+
+ Declaring an IId for a QMediaControl allows an instance of that control to be requested from
+ QMediaService::control() without explicitly passing the IId.
+
+ \code
+ QMediaPlayerControl *control = service->control<QMediaPlayerControl *>();
+ \endcode
+
+ \sa QMediaService::control()
+*/
+
+/*!
+ Destroys a media control.
+*/
+
+QMediaControl::~QMediaControl()
+{
+ delete d_ptr;
+}
+
+/*!
+ Constructs a media control with the given \a parent.
+*/
+
+QMediaControl::QMediaControl(QObject *parent)
+ : QObject(parent)
+ , d_ptr(new QMediaControlPrivate)
+{
+ d_ptr->q_ptr = this;
+}
+
+/*!
+ \internal
+*/
+
+QMediaControl::QMediaControl(QMediaControlPrivate &dd, QObject *parent)
+ : QObject(parent)
+ , d_ptr(&dd)
+
+{
+ d_ptr->q_ptr = this;
+}
+
+#include "moc_qmediacontrol.cpp"
+
+QT_END_NAMESPACE
+
diff --git a/src/multimedia/base/qmediacontrol.h b/src/multimedia/base/qmediacontrol.h
new file mode 100644
index 0000000000..8ed9fe86e9
--- /dev/null
+++ b/src/multimedia/base/qmediacontrol.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QABSTRACTMEDIACONTROL_H
+#define QABSTRACTMEDIACONTROL_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qvariant.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+class QMediaControlPrivate;
+class Q_MULTIMEDIA_EXPORT QMediaControl : public QObject
+{
+ Q_OBJECT
+
+public:
+ ~QMediaControl();
+
+protected:
+ QMediaControl(QObject *parent = 0);
+ QMediaControl(QMediaControlPrivate &dd, QObject *parent = 0);
+
+ QMediaControlPrivate *d_ptr;
+
+private:
+ Q_DECLARE_PRIVATE(QMediaControl)
+};
+
+template <typename T> const char *qmediacontrol_iid() { return 0; }
+
+#define Q_MEDIA_DECLARE_CONTROL(Class, IId) \
+ template <> inline const char *qmediacontrol_iid<Class *>() { return IId; }
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QABSTRACTMEDIACONTROL_H
diff --git a/src/multimedia/base/qmediacontrol_p.h b/src/multimedia/base/qmediacontrol_p.h
new file mode 100644
index 0000000000..4d00f11e02
--- /dev/null
+++ b/src/multimedia/base/qmediacontrol_p.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QABSTRACTMEDIACONTROL_P_H
+#define QABSTRACTMEDIACONTROL_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QMediaControl;
+
+class QMediaControlPrivate
+{
+public:
+ virtual ~QMediaControlPrivate() {}
+
+ QMediaControl *q_ptr;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/multimedia/base/qmediaobject.cpp b/src/multimedia/base/qmediaobject.cpp
new file mode 100644
index 0000000000..0422718743
--- /dev/null
+++ b/src/multimedia/base/qmediaobject.cpp
@@ -0,0 +1,419 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qmetaobject.h>
+
+#include "qmediaobject_p.h"
+
+#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/qmetadatacontrol.h>
+
+
+QT_BEGIN_NAMESPACE
+
+void QMediaObjectPrivate::_q_notify()
+{
+ Q_Q(QMediaObject);
+
+ const QMetaObject* m = q->metaObject();
+
+ foreach (int pi, notifyProperties) {
+ QMetaProperty p = m->property(pi);
+ p.notifySignal().invoke(
+ q, QGenericArgument(QMetaType::typeName(p.userType()), p.read(q).data()));
+ }
+}
+
+
+/*!
+ \class QMediaObject
+ \preliminary
+ \brief The QMediaObject class provides a common base for multimedia objects.
+ \since 4.7
+
+ \ingroup multimedia
+
+ QMediaObject derived classes provide access to the functionality of a
+ QMediaService. Each media object hosts a QMediaService and uses the
+ QMediaControl interfaces implemented by the service to implement its
+ API. Most media objects when constructed will request a new
+ QMediaService instance from a QMediaServiceProvider, but some like
+ QMediaRecorder will share a service with another object.
+
+ QMediaObject itself provides an API for accessing a media service's \l {metaData()}{meta-data} and a means of connecting other media objects,
+ and peripheral classes like QVideoWidget and QMediaPlaylist.
+
+ \sa QMediaService, QMediaControl
+*/
+
+/*!
+ Destroys a media object.
+*/
+
+QMediaObject::~QMediaObject()
+{
+ delete d_ptr;
+}
+
+/*!
+ Returns the service availability error state.
+*/
+
+QtMultimedia::AvailabilityError QMediaObject::availabilityError() const
+{
+ return QtMultimedia::ServiceMissingError;
+}
+
+/*!
+ Returns true if the service is available for use.
+*/
+
+bool QMediaObject::isAvailable() const
+{
+ return false;
+}
+
+/*!
+ Returns the media service that provides the functionality of a multimedia object.
+*/
+
+QMediaService* QMediaObject::service() const
+{
+ return d_func()->service;
+}
+
+int QMediaObject::notifyInterval() const
+{
+ return d_func()->notifyTimer->interval();
+}
+
+void QMediaObject::setNotifyInterval(int milliSeconds)
+{
+ Q_D(QMediaObject);
+
+ if (d->notifyTimer->interval() != milliSeconds) {
+ d->notifyTimer->setInterval(milliSeconds);
+
+ emit notifyIntervalChanged(milliSeconds);
+ }
+}
+
+/*!
+ \internal
+*/
+void QMediaObject::bind(QObject*)
+{
+}
+
+/*!
+ \internal
+*/
+void QMediaObject::unbind(QObject*)
+{
+}
+
+
+/*!
+ Constructs a media object which uses the functionality provided by a media \a service.
+
+ The \a parent is passed to QObject.
+
+ This class is meant as a base class for Multimedia objects so this
+ constructor is protected.
+*/
+
+QMediaObject::QMediaObject(QObject *parent, QMediaService *service):
+ QObject(parent),
+ d_ptr(new QMediaObjectPrivate)
+
+{
+ Q_D(QMediaObject);
+
+ d->q_ptr = this;
+
+ d->notifyTimer = new QTimer(this);
+ d->notifyTimer->setInterval(1000);
+ connect(d->notifyTimer, SIGNAL(timeout()), SLOT(_q_notify()));
+
+ d->service = service;
+
+ setupMetaData();
+}
+
+/*!
+ \internal
+*/
+
+QMediaObject::QMediaObject(QMediaObjectPrivate &dd, QObject *parent,
+ QMediaService *service):
+ QObject(parent),
+ d_ptr(&dd)
+{
+ Q_D(QMediaObject);
+ d->q_ptr = this;
+
+ d->notifyTimer = new QTimer(this);
+ d->notifyTimer->setInterval(1000);
+ connect(d->notifyTimer, SIGNAL(timeout()), SLOT(_q_notify()));
+
+ d->service = service;
+
+ setupMetaData();
+}
+
+/*!
+ Watch the property \a name. The property's notify signal will be emitted
+ once every notifyInterval milliseconds.
+
+ \sa notifyInterval
+*/
+
+void QMediaObject::addPropertyWatch(QByteArray const &name)
+{
+ Q_D(QMediaObject);
+
+ const QMetaObject* m = metaObject();
+
+ int index = m->indexOfProperty(name.constData());
+
+ if (index != -1 && m->property(index).hasNotifySignal()) {
+ d->notifyProperties.insert(index);
+
+ if (!d->notifyTimer->isActive())
+ d->notifyTimer->start();
+ }
+}
+
+/*!
+ Remove property \a name from the list of properties whose changes are
+ regularly signaled.
+
+ \sa notifyInterval
+*/
+
+void QMediaObject::removePropertyWatch(QByteArray const &name)
+{
+ Q_D(QMediaObject);
+
+ int index = metaObject()->indexOfProperty(name.constData());
+
+ if (index != -1) {
+ d->notifyProperties.remove(index);
+
+ if (d->notifyProperties.isEmpty())
+ d->notifyTimer->stop();
+ }
+}
+
+/*!
+ \property QMediaObject::notifyInterval
+
+ The interval at which notifiable properties will update.
+
+ The interval is expressed in milliseconds, the default value is 1000.
+
+ \sa addPropertyWatch(), removePropertyWatch()
+*/
+
+/*!
+ \fn void QMediaObject::notifyIntervalChanged(int milliseconds)
+
+ Signal a change in the notify interval period to \a milliseconds.
+*/
+
+/*!
+ \property QMediaObject::metaDataAvailable
+ \brief whether access to a media object's meta-data is available.
+
+ If this is true there is meta-data available, otherwise there is no meta-data available.
+*/
+
+bool QMediaObject::isMetaDataAvailable() const
+{
+ Q_D(const QMediaObject);
+
+ return d->metaDataControl
+ ? d->metaDataControl->isMetaDataAvailable()
+ : false;
+}
+
+/*!
+ \fn QMediaObject::metaDataAvailableChanged(bool available)
+
+ Signals that the \a available state of a media object's meta-data has changed.
+*/
+
+/*!
+ \property QMediaObject::metaDataWritable
+ \brief whether a media object's meta-data is writable.
+
+ If this is true the meta-data is writable, otherwise the meta-data is read-only.
+*/
+
+bool QMediaObject::isMetaDataWritable() const
+{
+ Q_D(const QMediaObject);
+
+ return d->metaDataControl
+ ? d->metaDataControl->isWritable()
+ : false;
+}
+
+/*!
+ \fn QMediaObject::metaDataWritableChanged(bool writable)
+
+ Signals that the \a writable state of a media object's meta-data has changed.
+*/
+
+/*!
+ Returns the value associated with a meta-data \a key.
+*/
+QVariant QMediaObject::metaData(QtMultimedia::MetaData key) const
+{
+ Q_D(const QMediaObject);
+
+ return d->metaDataControl
+ ? d->metaDataControl->metaData(key)
+ : QVariant();
+}
+
+/*!
+ Sets a \a value for a meta-data \a key.
+*/
+void QMediaObject::setMetaData(QtMultimedia::MetaData key, const QVariant &value)
+{
+ Q_D(QMediaObject);
+
+ if (d->metaDataControl)
+ d->metaDataControl->setMetaData(key, value);
+}
+
+/*!
+ Returns a list of keys there is meta-data available for.
+*/
+QList<QtMultimedia::MetaData> QMediaObject::availableMetaData() const
+{
+ Q_D(const QMediaObject);
+
+ return d->metaDataControl
+ ? d->metaDataControl->availableMetaData()
+ : QList<QtMultimedia::MetaData>();
+}
+
+/*!
+ \fn QMediaObject::metaDataChanged()
+
+ Signals that a media object's meta-data has changed.
+*/
+
+/*!
+ Returns the value associated with a meta-data \a key.
+
+ The naming and type of extended meta-data is not standardized, so the values and meaning
+ of keys may vary between backends.
+*/
+QVariant QMediaObject::extendedMetaData(const QString &key) const
+{
+ Q_D(const QMediaObject);
+
+ return d->metaDataControl
+ ? d->metaDataControl->extendedMetaData(key)
+ : QVariant();
+}
+
+/*!
+ Sets a \a value for a meta-data \a key.
+
+ The naming and type of extended meta-data is not standardized, so the values and meaning
+ of keys may vary between backends.
+*/
+void QMediaObject::setExtendedMetaData(const QString &key, const QVariant &value)
+{
+ Q_D(QMediaObject);
+
+ if (d->metaDataControl)
+ d->metaDataControl->setExtendedMetaData(key, value);
+}
+
+/*!
+ Returns a list of keys there is extended meta-data available for.
+*/
+QStringList QMediaObject::availableExtendedMetaData() const
+{
+ Q_D(const QMediaObject);
+
+ return d->metaDataControl
+ ? d->metaDataControl->availableExtendedMetaData()
+ : QStringList();
+}
+
+
+void QMediaObject::setupMetaData()
+{
+ Q_D(QMediaObject);
+
+ if (d->service != 0) {
+ d->metaDataControl =
+ qobject_cast<QMetaDataControl*>(d->service->control(QMetaDataControl_iid));
+
+ if (d->metaDataControl) {
+ connect(d->metaDataControl, SIGNAL(metaDataChanged()), SIGNAL(metaDataChanged()));
+ connect(d->metaDataControl,
+ SIGNAL(metaDataAvailableChanged(bool)),
+ SIGNAL(metaDataAvailableChanged(bool)));
+ connect(d->metaDataControl,
+ SIGNAL(writableChanged(bool)),
+ SIGNAL(metaDataWritableChanged(bool)));
+ }
+ }
+}
+
+/*!
+ \fn QMediaObject::availabilityChanged(bool available)
+
+ Signal emitted when the availability state has changed to \a available
+*/
+
+
+#include "moc_qmediaobject.cpp"
+
+QT_END_NAMESPACE
+
diff --git a/src/multimedia/base/qmediaobject.h b/src/multimedia/base/qmediaobject.h
new file mode 100644
index 0000000000..d09b1afc63
--- /dev/null
+++ b/src/multimedia/base/qmediaobject.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QABSTRACTMEDIAOBJECT_H
+#define QABSTRACTMEDIAOBJECT_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qstringlist.h>
+
+#include <QtMultimedia/qtmedianamespace.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+class QMediaService;
+
+class QMediaObjectPrivate;
+class Q_MULTIMEDIA_EXPORT QMediaObject : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int notifyInterval READ notifyInterval WRITE setNotifyInterval NOTIFY notifyIntervalChanged)
+ Q_PROPERTY(bool metaDataAvailable READ isMetaDataAvailable NOTIFY metaDataAvailableChanged)
+ Q_PROPERTY(bool metaDataWritable READ isMetaDataWritable NOTIFY metaDataWritableChanged)
+
+public:
+ ~QMediaObject();
+
+ virtual bool isAvailable() const;
+ virtual QtMultimedia::AvailabilityError availabilityError() const;
+
+ virtual QMediaService* service() const;
+
+ int notifyInterval() const;
+ void setNotifyInterval(int milliSeconds);
+
+ virtual void bind(QObject*);
+ virtual void unbind(QObject*);
+
+ bool isMetaDataAvailable() const;
+ bool isMetaDataWritable() const;
+
+ QVariant metaData(QtMultimedia::MetaData key) const;
+ void setMetaData(QtMultimedia::MetaData key, const QVariant &value);
+ QList<QtMultimedia::MetaData> availableMetaData() const;
+
+ QVariant extendedMetaData(const QString &key) const;
+ void setExtendedMetaData(const QString &key, const QVariant &value);
+ QStringList availableExtendedMetaData() const;
+
+Q_SIGNALS:
+ void notifyIntervalChanged(int milliSeconds);
+
+ void metaDataAvailableChanged(bool available);
+ void metaDataWritableChanged(bool writable);
+ void metaDataChanged();
+
+ void availabilityChanged(bool available);
+
+protected:
+ QMediaObject(QObject *parent, QMediaService *service);
+ QMediaObject(QMediaObjectPrivate &dd, QObject *parent, QMediaService *service);
+
+ void addPropertyWatch(QByteArray const &name);
+ void removePropertyWatch(QByteArray const &name);
+
+ QMediaObjectPrivate *d_ptr;
+
+private:
+ void setupMetaData();
+
+ Q_DECLARE_PRIVATE(QMediaObject)
+ Q_PRIVATE_SLOT(d_func(), void _q_notify())
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+
+#endif // QABSTRACTMEDIAOBJECT_H
diff --git a/src/multimedia/base/qmediaobject_p.h b/src/multimedia/base/qmediaobject_p.h
new file mode 100644
index 0000000000..ec2f75a823
--- /dev/null
+++ b/src/multimedia/base/qmediaobject_p.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QABSTRACTMEDIAOBJECT_P_H
+#define QABSTRACTMEDIAOBJECT_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qbytearray.h>
+#include <QtCore/qset.h>
+#include <QtCore/qtimer.h>
+
+#include <QtMultimedia/qmediaobject.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QMetaDataControl;
+
+#define Q_DECLARE_NON_CONST_PUBLIC(Class) \
+ inline Class* q_func() { return static_cast<Class *>(q_ptr); } \
+ friend class Class;
+
+
+class QMediaObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QMediaObject)
+
+public:
+ QMediaObjectPrivate():metaDataControl(0), notifyTimer(0) {}
+ virtual ~QMediaObjectPrivate() {}
+
+ void _q_notify();
+
+ QMediaService *service;
+ QMetaDataControl *metaDataControl;
+ QTimer* notifyTimer;
+ QSet<int> notifyProperties;
+
+ QMediaObject *q_ptr;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/multimedia/base/qmediaplaylist.cpp b/src/multimedia/base/qmediaplaylist.cpp
new file mode 100644
index 0000000000..b3f3dd3cf3
--- /dev/null
+++ b/src/multimedia/base/qmediaplaylist.cpp
@@ -0,0 +1,724 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qlist.h>
+#include <QtCore/qfile.h>
+#include <QtCore/qurl.h>
+#include <QtCore/qcoreevent.h>
+#include <QtCore/qcoreapplication.h>
+
+#include <QtMultimedia/qmediaplaylist.h>
+#include "qmediaplaylist_p.h"
+#include <QtMultimedia/qmediaplaylistprovider.h>
+#include <QtMultimedia/qlocalmediaplaylistprovider.h>
+#include <QtMultimedia/qmediaplaylistioplugin.h>
+#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/qmediaplaylistcontrol.h>
+#include <QtMultimedia/qmediaplayercontrol.h>
+
+#include "qmediapluginloader_p.h"
+
+
+QT_BEGIN_NAMESPACE
+
+Q_GLOBAL_STATIC_WITH_ARGS(QMediaPluginLoader, playlistIOLoader,
+ (QMediaPlaylistIOInterface_iid, QLatin1String("/playlistformats"), Qt::CaseInsensitive))
+
+
+/*!
+ \class QMediaPlaylist
+ \ingroup multimedia
+ \since 4.7
+
+ \preliminary
+ \brief The QMediaPlaylist class provides a list of media content to play.
+
+ QMediaPlaylist is intended to be used with other media objects,
+ like QMediaPlayer or QMediaImageViewer.
+ QMediaPlaylist allows to access the service intrinsic playlist functionality
+ if available, otherwise it provides the the local memory playlist implementation.
+
+\code
+ player = new QMediaPlayer;
+
+ playlist = new QMediaPlaylist;
+ playlist->setMediaObject(player);
+ playlist->append(QUrl("http://example.com/movie1.mp4"));
+ playlist->append(QUrl("http://example.com/movie2.mp4"));
+ playlist->append(QUrl("http://example.com/movie3.mp4"));
+
+ playlist->setCurrentIndex(1);
+
+ player->play();
+\endcode
+
+ Depending on playlist source implementation,
+ most of playlist modifcation operations can be asynchronous.
+
+ \sa QMediaContent
+*/
+
+
+/*!
+ \enum QMediaPlaylist::PlaybackMode
+
+ The QMediaPlaylist::PlaybackMode describes the order items in playlist are played.
+
+ \value CurrentItemOnce The current item is played only once.
+
+ \value CurrentItemInLoop The current item is played in the loop.
+
+ \value Linear Playback starts from the first to the last items and stops.
+ next item is a null item when the last one is currently playing.
+
+ \value Loop Playback continues from the first item after the last one finished playing.
+
+ \value Random Play items in random order.
+*/
+
+
+
+/*!
+ Create a new playlist object for with the given \a parent.
+*/
+
+QMediaPlaylist::QMediaPlaylist(QObject *parent)
+ : QObject(parent)
+ , d_ptr(new QMediaPlaylistPrivate)
+{
+ Q_D(QMediaPlaylist);
+
+ d->q_ptr = this;
+ d->localPlaylistControl = new QLocalMediaPlaylistControl(this);
+
+ setMediaObject(0);
+}
+
+/*!
+ Destroys the playlist.
+ */
+
+QMediaPlaylist::~QMediaPlaylist()
+{
+ Q_D(QMediaPlaylist);
+
+ if (d->mediaObject)
+ d->mediaObject->unbind(this);
+
+ delete d_ptr;
+}
+
+/*!
+ Returns the QMediaObject that is being used to play the contents of this playlist.
+*/
+
+QMediaObject *QMediaPlaylist::mediaObject() const
+{
+ return d_func()->mediaObject;
+}
+
+/*!
+ If \a mediaObject is null or doesn't have an intrinsic playlist,
+ internal local memory playlist source will be created.
+*/
+void QMediaPlaylist::setMediaObject(QMediaObject *mediaObject)
+{
+ Q_D(QMediaPlaylist);
+
+ if (mediaObject && mediaObject == d->mediaObject)
+ return;
+
+ QMediaService *service = mediaObject
+ ? mediaObject->service() : 0;
+
+ QMediaPlaylistControl *newControl = 0;
+
+ if (service)
+ newControl = qobject_cast<QMediaPlaylistControl*>(service->control(QMediaPlaylistControl_iid));
+
+ if (!newControl)
+ newControl = d->localPlaylistControl;
+
+ if (d->control != newControl) {
+ int oldSize = 0;
+ if (d->control) {
+ QMediaPlaylistProvider *playlist = d->control->playlistProvider();
+ oldSize = playlist->mediaCount();
+ disconnect(playlist, SIGNAL(loadFailed(QMediaPlaylist::Error,QString)),
+ this, SLOT(_q_loadFailed(QMediaPlaylist::Error,QString)));
+
+ disconnect(playlist, SIGNAL(mediaChanged(int,int)), this, SIGNAL(mediaChanged(int,int)));
+ disconnect(playlist, SIGNAL(mediaAboutToBeInserted(int,int)), this, SIGNAL(mediaAboutToBeInserted(int,int)));
+ disconnect(playlist, SIGNAL(mediaInserted(int,int)), this, SIGNAL(mediaInserted(int,int)));
+ disconnect(playlist, SIGNAL(mediaAboutToBeRemoved(int,int)), this, SIGNAL(mediaAboutToBeRemoved(int,int)));
+ disconnect(playlist, SIGNAL(mediaRemoved(int,int)), this, SIGNAL(mediaRemoved(int,int)));
+
+ disconnect(playlist, SIGNAL(loaded()), this, SIGNAL(loaded()));
+
+ disconnect(d->control, SIGNAL(playbackModeChanged(QMediaPlaylist::PlaybackMode)),
+ this, SIGNAL(playbackModeChanged(QMediaPlaylist::PlaybackMode)));
+ disconnect(d->control, SIGNAL(currentIndexChanged(int)),
+ this, SIGNAL(currentIndexChanged(int)));
+ disconnect(d->control, SIGNAL(currentMediaChanged(QMediaContent)),
+ this, SIGNAL(currentMediaChanged(QMediaContent)));
+ }
+
+ d->control = newControl;
+ QMediaPlaylistProvider *playlist = d->control->playlistProvider();
+ connect(playlist, SIGNAL(loadFailed(QMediaPlaylist::Error,QString)),
+ this, SLOT(_q_loadFailed(QMediaPlaylist::Error,QString)));
+
+ connect(playlist, SIGNAL(mediaChanged(int,int)), this, SIGNAL(mediaChanged(int,int)));
+ connect(playlist, SIGNAL(mediaAboutToBeInserted(int,int)), this, SIGNAL(mediaAboutToBeInserted(int,int)));
+ connect(playlist, SIGNAL(mediaInserted(int,int)), this, SIGNAL(mediaInserted(int,int)));
+ connect(playlist, SIGNAL(mediaAboutToBeRemoved(int,int)), this, SIGNAL(mediaAboutToBeRemoved(int,int)));
+ connect(playlist, SIGNAL(mediaRemoved(int,int)), this, SIGNAL(mediaRemoved(int,int)));
+
+ connect(playlist, SIGNAL(loaded()), this, SIGNAL(loaded()));
+
+ connect(d->control, SIGNAL(playbackModeChanged(QMediaPlaylist::PlaybackMode)),
+ this, SIGNAL(playbackModeChanged(QMediaPlaylist::PlaybackMode)));
+ connect(d->control, SIGNAL(currentIndexChanged(int)),
+ this, SIGNAL(currentIndexChanged(int)));
+ connect(d->control, SIGNAL(currentMediaChanged(QMediaContent)),
+ this, SIGNAL(currentMediaChanged(QMediaContent)));
+
+ if (oldSize)
+ emit mediaRemoved(0, oldSize-1);
+
+ if (playlist->mediaCount()) {
+ emit mediaAboutToBeInserted(0,playlist->mediaCount()-1);
+ emit mediaInserted(0,playlist->mediaCount()-1);
+ }
+ }
+
+ if (d->mediaObject)
+ d->mediaObject->unbind(this);
+
+ d->mediaObject = mediaObject;
+ if (d->mediaObject)
+ d->mediaObject->bind(this);
+}
+
+/*!
+ \property QMediaPlaylist::playbackMode
+
+ This property defines the order, items in playlist are played.
+
+ \sa QMediaPlaylist::PlaybackMode
+*/
+
+QMediaPlaylist::PlaybackMode QMediaPlaylist::playbackMode() const
+{
+ return d_func()->control->playbackMode();
+}
+
+void QMediaPlaylist::setPlaybackMode(QMediaPlaylist::PlaybackMode mode)
+{
+ Q_D(QMediaPlaylist);
+ d->control->setPlaybackMode(mode);
+}
+
+/*!
+ Returns position of the current media source in the playlist.
+*/
+int QMediaPlaylist::currentIndex() const
+{
+ return d_func()->control->currentIndex();
+}
+
+/*!
+ Returns the current media content.
+*/
+
+QMediaContent QMediaPlaylist::currentMedia() const
+{
+ return d_func()->playlist()->media(currentIndex());
+}
+
+/*!
+ Returns the index of item, which were current after calling next()
+ \a steps times.
+
+ Returned value depends on the size of playlist, current position
+ and playback mode.
+
+ \sa QMediaPlaylist::playbackMode
+*/
+int QMediaPlaylist::nextIndex(int steps) const
+{
+ return d_func()->control->nextIndex(steps);
+}
+
+/*!
+ Returns the index of item, which were current after calling previous()
+ \a steps times.
+
+ \sa QMediaPlaylist::playbackMode
+*/
+
+int QMediaPlaylist::previousIndex(int steps) const
+{
+ return d_func()->control->previousIndex(steps);
+}
+
+
+/*!
+ Returns the number of items in the playlist.
+
+ \sa isEmpty()
+ */
+int QMediaPlaylist::mediaCount() const
+{
+ return d_func()->playlist()->mediaCount();
+}
+
+/*!
+ Returns true if the playlist contains no items; otherwise returns false.
+ \sa mediaCount()
+ */
+bool QMediaPlaylist::isEmpty() const
+{
+ return mediaCount() == 0;
+}
+
+/*!
+ Returns true if the playlist can be modified; otherwise returns false.
+ \sa mediaCount()
+ */
+bool QMediaPlaylist::isReadOnly() const
+{
+ return d_func()->playlist()->isReadOnly();
+}
+
+/*!
+ Returns the media content at \a index in the playlist.
+*/
+
+QMediaContent QMediaPlaylist::media(int index) const
+{
+ return d_func()->playlist()->media(index);
+}
+
+/*!
+ Append the media \a content to the playlist.
+
+ Returns true if the operation is successfull, other wise return false.
+ */
+bool QMediaPlaylist::addMedia(const QMediaContent &content)
+{
+ return d_func()->control->playlistProvider()->addMedia(content);
+}
+
+/*!
+ Append multiple media content \a items to the playlist.
+
+ Returns true if the operation is successfull, other wise return false.
+ */
+bool QMediaPlaylist::addMedia(const QList<QMediaContent> &items)
+{
+ return d_func()->control->playlistProvider()->addMedia(items);
+}
+
+/*!
+ Insert the media \a content to the playlist at position \a pos.
+
+ Returns true if the operation is successful, otherwise false.
+*/
+
+bool QMediaPlaylist::insertMedia(int pos, const QMediaContent &content)
+{
+ return d_func()->playlist()->insertMedia(pos, content);
+}
+
+/*!
+ Insert multiple media content \a items to the playlist at position \a pos.
+
+ Returns true if the operation is successful, otherwise false.
+*/
+
+bool QMediaPlaylist::insertMedia(int pos, const QList<QMediaContent> &items)
+{
+ return d_func()->playlist()->insertMedia(pos, items);
+}
+
+/*!
+ Remove the item from the playlist at position \a pos.
+
+ Returns true if the operation is successfull, other wise return false.
+ */
+bool QMediaPlaylist::removeMedia(int pos)
+{
+ Q_D(QMediaPlaylist);
+ return d->playlist()->removeMedia(pos);
+}
+
+/*!
+ Remove the items from the playlist from position \a start to \a end inclusive.
+
+ Returns true if the operation is successfull, other wise return false.
+ */
+bool QMediaPlaylist::removeMedia(int start, int end)
+{
+ Q_D(QMediaPlaylist);
+ return d->playlist()->removeMedia(start, end);
+}
+
+/*!
+ Remove all the items from the playlist.
+
+ Returns true if the operation is successfull, other wise return false.
+ */
+bool QMediaPlaylist::clear()
+{
+ Q_D(QMediaPlaylist);
+ return d->playlist()->clear();
+}
+
+bool QMediaPlaylistPrivate::readItems(QMediaPlaylistReader *reader)
+{
+ while (!reader->atEnd())
+ playlist()->addMedia(reader->readItem());
+
+ return true;
+}
+
+bool QMediaPlaylistPrivate::writeItems(QMediaPlaylistWriter *writer)
+{
+ for (int i=0; i<playlist()->mediaCount(); i++) {
+ if (!writer->writeItem(playlist()->media(i)))
+ return false;
+ }
+ writer->close();
+ return true;
+}
+
+/*!
+ Load playlist from \a location. If \a format is specified, it is used,
+ otherwise format is guessed from location name and data.
+
+ New items are appended to playlist.
+
+ QMediaPlaylist::loaded() signal is emited if playlist was loaded succesfully,
+ otherwise the playlist emits loadFailed().
+*/
+void QMediaPlaylist::load(const QUrl &location, const char *format)
+{
+ Q_D(QMediaPlaylist);
+
+ d->error = NoError;
+ d->errorString.clear();
+
+ if (d->playlist()->load(location,format))
+ return;
+
+ if (isReadOnly()) {
+ d->error = AccessDeniedError;
+ d->errorString = tr("Could not add items to read only playlist.");
+ emit loadFailed();
+ return;
+ }
+
+ foreach (QString const& key, playlistIOLoader()->keys()) {
+ QMediaPlaylistIOInterface* plugin = qobject_cast<QMediaPlaylistIOInterface*>(playlistIOLoader()->instance(key));
+ if (plugin && plugin->canRead(location,format)) {
+ QMediaPlaylistReader *reader = plugin->createReader(location,QByteArray(format));
+ if (reader && d->readItems(reader)) {
+ delete reader;
+ emit loaded();
+ return;
+ }
+ delete reader;
+ }
+ }
+
+ d->error = FormatNotSupportedError;
+ d->errorString = tr("Playlist format is not supported");
+ emit loadFailed();
+
+ return;
+}
+
+/*!
+ Load playlist from QIODevice \a device. If \a format is specified, it is used,
+ otherwise format is guessed from device data.
+
+ New items are appended to playlist.
+
+ QMediaPlaylist::loaded() signal is emited if playlist was loaded succesfully,
+ otherwise the playlist emits loadFailed().
+*/
+void QMediaPlaylist::load(QIODevice * device, const char *format)
+{
+ Q_D(QMediaPlaylist);
+
+ d->error = NoError;
+ d->errorString.clear();
+
+ if (d->playlist()->load(device,format))
+ return;
+
+ if (isReadOnly()) {
+ d->error = AccessDeniedError;
+ d->errorString = tr("Could not add items to read only playlist.");
+ emit loadFailed();
+ return;
+ }
+
+ foreach (QString const& key, playlistIOLoader()->keys()) {
+ QMediaPlaylistIOInterface* plugin = qobject_cast<QMediaPlaylistIOInterface*>(playlistIOLoader()->instance(key));
+ if (plugin && plugin->canRead(device,format)) {
+ QMediaPlaylistReader *reader = plugin->createReader(device,QByteArray(format));
+ if (reader && d->readItems(reader)) {
+ delete reader;
+ emit loaded();
+ return;
+ }
+ delete reader;
+ }
+ }
+
+ d->error = FormatNotSupportedError;
+ d->errorString = tr("Playlist format is not supported");
+ emit loadFailed();
+
+ return;
+}
+
+/*!
+ Save playlist to \a location. If \a format is specified, it is used,
+ otherwise format is guessed from location name.
+
+ Returns true if playlist was saved succesfully, otherwise returns false.
+ */
+bool QMediaPlaylist::save(const QUrl &location, const char *format)
+{
+ Q_D(QMediaPlaylist);
+
+ d->error = NoError;
+ d->errorString.clear();
+
+ if (d->playlist()->save(location,format))
+ return true;
+
+ QFile file(location.toLocalFile());
+
+ if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
+ d->error = AccessDeniedError;
+ d->errorString = tr("The file could not be accessed.");
+ return false;
+ }
+
+ return save(&file, format);
+}
+
+/*!
+ Save playlist to QIODevice \a device using format \a format.
+
+ Returns true if playlist was saved succesfully, otherwise returns false.
+*/
+bool QMediaPlaylist::save(QIODevice * device, const char *format)
+{
+ Q_D(QMediaPlaylist);
+
+ d->error = NoError;
+ d->errorString.clear();
+
+ if (d->playlist()->save(device,format))
+ return true;
+
+ foreach (QString const& key, playlistIOLoader()->keys()) {
+ QMediaPlaylistIOInterface* plugin = qobject_cast<QMediaPlaylistIOInterface*>(playlistIOLoader()->instance(key));
+ if (plugin && plugin->canWrite(device,format)) {
+ QMediaPlaylistWriter *writer = plugin->createWriter(device,QByteArray(format));
+ if (writer && d->writeItems(writer)) {
+ delete writer;
+ return true;
+ }
+ delete writer;
+ }
+ }
+
+ d->error = FormatNotSupportedError;
+ d->errorString = tr("Playlist format is not supported.");
+
+ return false;
+}
+
+/*!
+ Returns the last error condition.
+*/
+QMediaPlaylist::Error QMediaPlaylist::error() const
+{
+ return d_func()->error;
+}
+
+/*!
+ Returns the string describing the last error condition.
+*/
+QString QMediaPlaylist::errorString() const
+{
+ return d_func()->errorString;
+}
+
+/*!
+ Shuffle items in the playlist.
+*/
+void QMediaPlaylist::shuffle()
+{
+ d_func()->playlist()->shuffle();
+}
+
+
+/*!
+ Advance to the next media content in playlist.
+*/
+void QMediaPlaylist::next()
+{
+ d_func()->control->next();
+}
+
+/*!
+ Return to the previous media content in playlist.
+*/
+void QMediaPlaylist::previous()
+{
+ d_func()->control->previous();
+}
+
+/*!
+ Activate media content from playlist at position \a playlistPosition.
+*/
+
+void QMediaPlaylist::setCurrentIndex(int playlistPosition)
+{
+ d_func()->control->setCurrentIndex(playlistPosition);
+}
+
+/*!
+ \fn void QMediaPlaylist::mediaInserted(int start, int end)
+
+ This signal is emitted after media has been inserted into the playlist.
+ The new items are those between \a start and \a end inclusive.
+ */
+
+/*!
+ \fn void QMediaPlaylist::mediaRemoved(int start, int end)
+
+ This signal is emitted after media has been removed from the playlist.
+ The removed items are those between \a start and \a end inclusive.
+ */
+
+/*!
+ \fn void QMediaPlaylist::mediaChanged(int start, int end)
+
+ This signal is emitted after media has been changed in the playlist
+ between \a start and \a end positions inclusive.
+ */
+
+/*!
+ \fn void QMediaPlaylist::currentIndexChanged(int position)
+
+ Signal emitted when playlist position changed to \a position.
+*/
+
+/*!
+ \fn void QMediaPlaylist::playbackModeChanged(QMediaPlaylist::PlaybackMode mode)
+
+ Signal emitted when playback mode changed to \a mode.
+*/
+
+/*!
+ \fn void QMediaPlaylist::mediaAboutToBeInserted(int start, int end)
+
+ Signal emitted when item to be inserted at \a start and ending at \a end.
+*/
+
+/*!
+ \fn void QMediaPlaylist::mediaAboutToBeRemoved(int start, int end)
+
+ Signal emitted when item to de deleted ar \a start and ending at \a end.
+*/
+
+/*!
+ \fn void QMediaPlaylist::currentMediaChanged(const QMediaContent &content)
+
+ Signal emitted when current media changes to \a content.
+*/
+
+/*!
+ \property QMediaPlaylist::currentIndex
+ \brief Current position.
+*/
+
+/*!
+ \property QMediaPlaylist::currentMedia
+ \brief Current media content.
+*/
+
+/*!
+ \fn QMediaPlaylist::loaded()
+
+ Signal emitted when playlist finished loading.
+*/
+
+/*!
+ \fn QMediaPlaylist::loadFailed()
+
+ Signal emitted if failed to load playlist.
+*/
+
+/*!
+ \enum QMediaPlaylist::Error
+
+ This enum describes the QMediaPlaylist error codes.
+
+ \value NoError No errors.
+ \value FormatError Format error.
+ \value FormatNotSupportedError Format not supported.
+ \value NetworkError Network error.
+ \value AccessDeniedError Access denied error.
+*/
+
+QT_END_NAMESPACE
+
+#include "moc_qmediaplaylist.cpp"
+#include "moc_qmediaplaylist_p.cpp"
diff --git a/src/multimedia/base/qmediaplaylist.h b/src/multimedia/base/qmediaplaylist.h
new file mode 100644
index 0000000000..494cf11897
--- /dev/null
+++ b/src/multimedia/base/qmediaplaylist.h
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMEDIAPLAYLIST_H
+#define QMEDIAPLAYLIST_H
+
+#include <QtCore/qobject.h>
+
+#include <QtMultimedia/qmediacontent.h>
+#include <QtMultimedia/qmediaobject.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+class QMediaPlaylistProvider;
+
+class QMediaPlaylistPrivate;
+class Q_MULTIMEDIA_EXPORT QMediaPlaylist : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QMediaPlaylist::PlaybackMode playbackMode READ playbackMode WRITE setPlaybackMode NOTIFY playbackModeChanged)
+ Q_PROPERTY(QMediaContent currentMedia READ currentMedia NOTIFY currentMediaChanged)
+ Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged)
+ Q_ENUMS(PlaybackMode Error)
+
+public:
+ enum PlaybackMode { CurrentItemOnce, CurrentItemInLoop, Linear, Loop, Random };
+ enum Error { NoError, FormatError, FormatNotSupportedError, NetworkError, AccessDeniedError };
+
+ QMediaPlaylist(QObject *parent = 0);
+ virtual ~QMediaPlaylist();
+
+ QMediaObject *mediaObject() const;
+ void setMediaObject(QMediaObject *object);
+
+ PlaybackMode playbackMode() const;
+ void setPlaybackMode(PlaybackMode mode);
+
+ int currentIndex() const;
+ QMediaContent currentMedia() const;
+
+ int nextIndex(int steps = 1) const;
+ int previousIndex(int steps = 1) const;
+
+ QMediaContent media(int index) const;
+
+ int mediaCount() const;
+ bool isEmpty() const;
+ bool isReadOnly() const;
+
+ bool addMedia(const QMediaContent &content);
+ bool addMedia(const QList<QMediaContent> &items);
+ bool insertMedia(int index, const QMediaContent &content);
+ bool insertMedia(int index, const QList<QMediaContent> &items);
+ bool removeMedia(int pos);
+ bool removeMedia(int start, int end);
+ bool clear();
+
+ void load(const QUrl &location, const char *format = 0);
+ void load(QIODevice * device, const char *format = 0);
+
+ bool save(const QUrl &location, const char *format = 0);
+ bool save(QIODevice * device, const char *format);
+
+ Error error() const;
+ QString errorString() const;
+
+public Q_SLOTS:
+ void shuffle();
+
+ void next();
+ void previous();
+
+ void setCurrentIndex(int index);
+
+Q_SIGNALS:
+ void currentIndexChanged(int index);
+ void playbackModeChanged(QMediaPlaylist::PlaybackMode mode);
+ void currentMediaChanged(const QMediaContent&);
+
+ void mediaAboutToBeInserted(int start, int end);
+ void mediaInserted(int start, int end);
+ void mediaAboutToBeRemoved(int start, int end);
+ void mediaRemoved(int start, int end);
+ void mediaChanged(int start, int end);
+
+ void loaded();
+ void loadFailed();
+
+protected:
+ QMediaPlaylistPrivate *d_ptr;
+
+private:
+ Q_DECLARE_PRIVATE(QMediaPlaylist)
+ Q_PRIVATE_SLOT(d_func(), void _q_loadFailed(QMediaPlaylist::Error, const QString &))
+};
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QMediaPlaylist::PlaybackMode)
+Q_DECLARE_METATYPE(QMediaPlaylist::Error)
+
+QT_END_HEADER
+
+#endif // QMEDIAPLAYLIST_H
diff --git a/src/multimedia/base/qmediaplaylist_p.h b/src/multimedia/base/qmediaplaylist_p.h
new file mode 100644
index 0000000000..da529b749b
--- /dev/null
+++ b/src/multimedia/base/qmediaplaylist_p.h
@@ -0,0 +1,172 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMEDIAPLAYLIST_P_H
+#define QMEDIAPLAYLIST_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtMultimedia/qmediaplaylist.h>
+#include <QtMultimedia/qmediaplaylistcontrol.h>
+#include <QtMultimedia/qmediaplayer.h>
+#include <QtMultimedia/qmediaplayercontrol.h>
+#include <QtMultimedia/qlocalmediaplaylistprovider.h>
+#include "qmediaobject_p.h"
+
+#include <QtCore/qdebug.h>
+
+#ifdef Q_MOC_RUN
+# pragma Q_MOC_EXPAND_MACROS
+#endif
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QMediaPlaylistControl;
+class QMediaPlaylistProvider;
+class QMediaPlaylistReader;
+class QMediaPlaylistWriter;
+class QMediaPlayerControl;
+
+class QMediaPlaylistPrivate
+{
+ Q_DECLARE_PUBLIC(QMediaPlaylist)
+public:
+ QMediaPlaylistPrivate()
+ :mediaObject(0),
+ control(0),
+ localPlaylistControl(0),
+ error(QMediaPlaylist::NoError)
+ {
+ }
+
+ virtual ~QMediaPlaylistPrivate() {}
+
+ void _q_loadFailed(QMediaPlaylist::Error error, const QString &errorString)
+ {
+ this->error = error;
+ this->errorString = errorString;
+
+ emit q_ptr->loadFailed();
+ }
+
+ void _q_mediaObjectDeleted()
+ {
+ Q_Q(QMediaPlaylist);
+ mediaObject = 0;
+ if (control != localPlaylistControl)
+ control = 0;
+ q->setMediaObject(0);
+ }
+
+ QMediaObject *mediaObject;
+
+ QMediaPlaylistControl *control;
+ QMediaPlaylistProvider *playlist() const { return control->playlistProvider(); }
+
+ QMediaPlaylistControl *localPlaylistControl;
+
+ bool readItems(QMediaPlaylistReader *reader);
+ bool writeItems(QMediaPlaylistWriter *writer);
+
+ QMediaPlaylist::Error error;
+ QString errorString;
+
+ QMediaPlaylist *q_ptr;
+};
+
+
+class QLocalMediaPlaylistControl : public QMediaPlaylistControl
+{
+ Q_OBJECT
+public:
+ QLocalMediaPlaylistControl(QObject *parent)
+ :QMediaPlaylistControl(parent)
+ {
+ QMediaPlaylistProvider *playlist = new QLocalMediaPlaylistProvider(this);
+ m_navigator = new QMediaPlaylistNavigator(playlist,this);
+ m_navigator->setPlaybackMode(QMediaPlaylist::Linear);
+
+ connect(m_navigator, SIGNAL(currentIndexChanged(int)), SIGNAL(currentIndexChanged(int)));
+ connect(m_navigator, SIGNAL(activated(QMediaContent)), SIGNAL(currentMediaChanged(QMediaContent)));
+ }
+
+ virtual ~QLocalMediaPlaylistControl() {};
+
+ QMediaPlaylistProvider* playlistProvider() const { return m_navigator->playlist(); }
+ bool setPlaylistProvider(QMediaPlaylistProvider *mediaPlaylist)
+ {
+ m_navigator->setPlaylist(mediaPlaylist);
+ emit playlistProviderChanged();
+ return true;
+ }
+
+ int currentIndex() const { return m_navigator->currentIndex(); }
+ void setCurrentIndex(int position) { m_navigator->jump(position); }
+ int nextIndex(int steps) const { return m_navigator->nextIndex(steps); }
+ int previousIndex(int steps) const { return m_navigator->previousIndex(steps); }
+
+ void next() { m_navigator->next(); }
+ void previous() { m_navigator->previous(); }
+
+ QMediaPlaylist::PlaybackMode playbackMode() const { return m_navigator->playbackMode(); }
+ void setPlaybackMode(QMediaPlaylist::PlaybackMode mode) { m_navigator->setPlaybackMode(mode); }
+
+private:
+ QMediaPlaylistNavigator *m_navigator;
+};
+
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QMEDIAPLAYLIST_P_H
diff --git a/src/multimedia/base/qmediaplaylistcontrol.cpp b/src/multimedia/base/qmediaplaylistcontrol.cpp
new file mode 100644
index 0000000000..ba3d224487
--- /dev/null
+++ b/src/multimedia/base/qmediaplaylistcontrol.cpp
@@ -0,0 +1,204 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QtMultimedia/qmediaplaylistcontrol.h>
+#include "qmediacontrol_p.h"
+
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QMediaPlaylistControl
+ \ingroup multimedia-serv
+ \since 4.7
+
+ \preliminary
+ \brief The QMediaPlaylistControl class provides access to the playlist functionality of a
+ QMediaService.
+
+ If a QMediaService contains an internal playlist it will implement QMediaPlaylistControl. This
+ control provides access to the contents of the \l {playlistProvider()}{playlist}, as well as the
+ \l {currentIndex()}{position} of the current media, and a means of navigating to the
+ \l {next()}{next} and \l {previous()}{previous} media.
+
+ The functionality provided by the control is exposed to application code through the
+ QMediaPlaylist class.
+
+ The interface name of QMediaPlaylistControl is \c com.nokia.Qt.QMediaPlaylistControl/1.0 as
+ defined in QMediaPlaylistControl_iid.
+
+ \sa QMediaService::control(), QMediaPlayer
+*/
+
+/*!
+ \macro QMediaPlaylistControl_iid
+
+ \c com.nokia.Qt.QMediaPlaylistControl/1.0
+
+ Defines the interface name of the QMediaPlaylistControl class.
+
+ \relates QMediaPlaylistControl
+*/
+
+/*!
+ Create a new playlist control object with the given \a parent.
+*/
+QMediaPlaylistControl::QMediaPlaylistControl(QObject *parent):
+ QMediaControl(*new QMediaControlPrivate, parent)
+{
+}
+
+/*!
+ Destroys the playlist control.
+*/
+QMediaPlaylistControl::~QMediaPlaylistControl()
+{
+}
+
+
+/*!
+ \fn QMediaPlaylistControl::playlistProvider() const
+
+ Returns the playlist used by this media player.
+*/
+
+/*!
+ \fn QMediaPlaylistControl::setPlaylistProvider(QMediaPlaylistProvider *playlist)
+
+ Set the playlist of this media player to \a playlist.
+
+ In many cases it is possible just to use the playlist
+ constructed by player, but sometimes replacing the whole
+ playlist allows to avoid copyting of all the items bettween playlists.
+
+ Returns true if player can use this passed playlist; otherwise returns false.
+
+*/
+
+/*!
+ \fn QMediaPlaylistControl::currentIndex() const
+
+ Returns position of the current media source in the playlist.
+*/
+
+/*!
+ \fn QMediaPlaylistControl::setCurrentIndex(int position)
+
+ Jump to the item at the given \a position.
+*/
+
+/*!
+ \fn QMediaPlaylistControl::nextIndex(int step) const
+
+ Returns the index of item, which were current after calling next()
+ \a step times.
+
+ Returned value depends on the size of playlist, current position
+ and playback mode.
+
+ \sa QMediaPlaylist::playbackMode
+*/
+
+/*!
+ \fn QMediaPlaylistControl::previousIndex(int step) const
+
+ Returns the index of item, which were current after calling previous()
+ \a step times.
+
+ \sa QMediaPlaylist::playbackMode
+*/
+
+/*!
+ \fn QMediaPlaylistControl::next()
+
+ Moves to the next item in playlist.
+*/
+
+/*!
+ \fn QMediaPlaylistControl::previous()
+
+ Returns to the previous item in playlist.
+*/
+
+/*!
+ \fn QMediaPlaylistControl::playbackMode() const
+
+ Returns the playlist navigation mode.
+
+ \sa QMediaPlaylist::PlaybackMode
+*/
+
+/*!
+ \fn QMediaPlaylistControl::setPlaybackMode(QMediaPlaylist::PlaybackMode mode)
+
+ Sets the playback \a mode.
+
+ \sa QMediaPlaylist::PlaybackMode
+*/
+
+/*!
+ \fn QMediaPlaylistControl::playlistProviderChanged()
+
+ Signal emited when the playlist provider has changed.
+*/
+
+/*!
+ \fn QMediaPlaylistControl::currentIndexChanged(int position)
+
+ Signal emited when the playlist \a position is changed.
+*/
+
+/*!
+ \fn QMediaPlaylistControl::playbackModeChanged(QMediaPlaylist::PlaybackMode mode)
+
+ Signal emited when the playback \a mode is changed.
+*/
+
+/*!
+ \fn QMediaPlaylistControl::currentMediaChanged(const QMediaContent& content)
+
+ Signal emitted when current media changes to \a content.
+*/
+
+#include "moc_qmediaplaylistcontrol.cpp"
+QT_END_NAMESPACE
+
diff --git a/src/multimedia/base/qmediaplaylistcontrol.h b/src/multimedia/base/qmediaplaylistcontrol.h
new file mode 100644
index 0000000000..228ee19cdb
--- /dev/null
+++ b/src/multimedia/base/qmediaplaylistcontrol.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#ifndef QMEDIAPLAYLISTCONTROL_H
+#define QMEDIAPLAYLISTCONTROL_H
+
+#include <QtMultimedia/qmediacontrol.h>
+#include <QtMultimedia/qmediaplaylistnavigator.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+
+class QMediaPlaylistProvider;
+
+class Q_MULTIMEDIA_EXPORT QMediaPlaylistControl : public QMediaControl
+{
+ Q_OBJECT
+
+public:
+ virtual ~QMediaPlaylistControl();
+
+ virtual QMediaPlaylistProvider* playlistProvider() const = 0;
+ virtual bool setPlaylistProvider(QMediaPlaylistProvider *playlist) = 0;
+
+ virtual int currentIndex() const = 0;
+ virtual void setCurrentIndex(int position) = 0;
+ virtual int nextIndex(int steps) const = 0;
+ virtual int previousIndex(int steps) const = 0;
+
+ virtual void next() = 0;
+ virtual void previous() = 0;
+
+ virtual QMediaPlaylist::PlaybackMode playbackMode() const = 0;
+ virtual void setPlaybackMode(QMediaPlaylist::PlaybackMode mode) = 0;
+
+Q_SIGNALS:
+ void playlistProviderChanged();
+ void currentIndexChanged(int position);
+ void currentMediaChanged(const QMediaContent&);
+ void playbackModeChanged(QMediaPlaylist::PlaybackMode mode);
+
+protected:
+ QMediaPlaylistControl(QObject* parent = 0);
+};
+
+#define QMediaPlaylistControl_iid "com.nokia.Qt.QMediaPlaylistControl/1.0"
+Q_MEDIA_DECLARE_CONTROL(QMediaPlaylistControl, QMediaPlaylistControl_iid)
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QMEDIAPLAYLISTCONTROL_H
diff --git a/src/multimedia/base/qmediaplaylistioplugin.cpp b/src/multimedia/base/qmediaplaylistioplugin.cpp
new file mode 100644
index 0000000000..48fd721686
--- /dev/null
+++ b/src/multimedia/base/qmediaplaylistioplugin.cpp
@@ -0,0 +1,192 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtMultimedia/qmediaplaylistioplugin.h>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QMediaPlaylistReader
+ \preliminary
+ \since 4.7
+ \brief The QMediaPlaylistReader class provides an interface for reading a playlist file.
+
+ \sa QMediaPlaylistIOPlugin
+*/
+
+/*!
+ Destroys a media playlist reader.
+*/
+QMediaPlaylistReader::~QMediaPlaylistReader()
+{
+}
+
+/*!
+ \fn QMediaPlaylistReader::atEnd() const
+
+ Identifies if a playlist reader has reached the end of its input.
+
+ Returns true if the reader has reached the end; and false otherwise.
+*/
+
+/*!
+ \fn QMediaPlaylistReader::readItem()
+
+ Reads an item of media from a playlist file.
+
+ Returns the read media, or a null QMediaContent if no more media is available.
+*/
+
+/*!
+ \fn QMediaPlaylistReader::close()
+
+ Closes a playlist reader's input device.
+*/
+
+/*!
+ \class QMediaPlaylistWriter
+ \preliminary
+ \since 4.7
+ \brief The QMediaPlaylistWriter class provides an interface for writing a playlist file.
+
+ \sa QMediaPlaylistIOPlugin
+*/
+
+/*!
+ Destroys a media playlist writer.
+*/
+QMediaPlaylistWriter::~QMediaPlaylistWriter()
+{
+}
+
+/*!
+ \fn QMediaPlaylistWriter::writeItem(const QMediaContent &media)
+
+ Writes an item of \a media to a playlist file.
+
+ Returns true if the media was written succesfully; and false otherwise.
+*/
+
+/*!
+ \fn QMediaPlaylistWriter::close()
+
+ Finalizes the writing of a playlist and closes the output device.
+*/
+
+/*!
+ \class QMediaPlaylistIOPlugin
+ \since 4.7
+ \brief The QMediaPlaylistIOPlugin class provides an interface for media playlist I/O plug-ins.
+*/
+
+/*!
+ Constructs a media playlist I/O plug-in with the given \a parent.
+*/
+QMediaPlaylistIOPlugin::QMediaPlaylistIOPlugin(QObject *parent)
+ :QObject(parent)
+{
+}
+
+/*!
+ Destroys a media playlist I/O plug-in.
+*/
+QMediaPlaylistIOPlugin::~QMediaPlaylistIOPlugin()
+{
+}
+
+/*!
+ \fn QMediaPlaylistIOPlugin::canRead(QIODevice *device, const QByteArray &format) const
+
+ Identifies if plug-in can read \a format data from an I/O \a device.
+
+ Returns true if the data can be read; and false otherwise.
+*/
+
+/*!
+ \fn QMediaPlaylistIOPlugin::canRead(const QUrl& location, const QByteArray &format) const
+
+ Identifies if a plug-in can read \a format data from a URL \a location.
+
+ Returns true if the data can be read; and false otherwise.
+*/
+
+/*!
+ \fn QMediaPlaylistIOPlugin::canWrite(QIODevice *device, const QByteArray &format) const
+
+ Identifies if a plug-in can write \a format data to an I/O \a device.
+
+ Returns true if the data can be written; and false otherwise.
+*/
+
+/*!
+ \fn QMediaPlaylistIOPlugin::keys() const
+
+ Returns a list of format keys supported by a plug-in.
+*/
+
+/*!
+ \fn QMediaPlaylistIOPlugin::createReader(QIODevice *device, const QByteArray &format)
+
+ Returns a new QMediaPlaylistReader which reads \a format data from an I/O \a device.
+
+ If the device is invalid or the format is unsupported this will return a null pointer.
+*/
+
+/*!
+ \fn QMediaPlaylistIOPlugin::createReader(const QUrl& location, const QByteArray &format)
+
+ Returns a new QMediaPlaylistReader which reads \a format data from a URL \a location.
+
+ If the location or the format is unsupported this will return a null pointer.
+*/
+
+/*!
+ \fn QMediaPlaylistIOPlugin::createWriter(QIODevice *device, const QByteArray &format)
+
+ Returns a new QMediaPlaylistWriter which writes \a format data to an I/O \a device.
+
+ If the device is invalid or the format is unsupported this will return a null pointer.
+*/
+
+QT_END_NAMESPACE
+
+#include "moc_qmediaplaylistioplugin.cpp"
+
diff --git a/src/multimedia/base/qmediaplaylistioplugin.h b/src/multimedia/base/qmediaplaylistioplugin.h
new file mode 100644
index 0000000000..e55298dcfb
--- /dev/null
+++ b/src/multimedia/base/qmediaplaylistioplugin.h
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMEDIAPLAYLISTIOPLUGIN_H
+#define QMEDIAPLAYLISTIOPLUGIN_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qplugin.h>
+#include <QtCore/qfactoryinterface.h>
+
+#include <QtMultimedia/qmediacontent.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+
+class QString;
+class QUrl;
+class QByteArray;
+class QIODevice;
+class QStringList;
+
+class Q_MULTIMEDIA_EXPORT QMediaPlaylistReader
+{
+public:
+ virtual ~QMediaPlaylistReader();
+
+ virtual bool atEnd() const = 0;
+ virtual QMediaContent readItem() = 0;
+ virtual void close() = 0;
+};
+
+class Q_MULTIMEDIA_EXPORT QMediaPlaylistWriter
+{
+public:
+ virtual ~QMediaPlaylistWriter();
+
+ virtual bool writeItem(const QMediaContent &content) = 0;
+ virtual void close() = 0;
+};
+
+struct Q_MULTIMEDIA_EXPORT QMediaPlaylistIOInterface : public QFactoryInterface
+{
+ virtual bool canRead(QIODevice *device, const QByteArray &format = QByteArray() ) const = 0;
+ virtual bool canRead(const QUrl& location, const QByteArray &format = QByteArray()) const = 0;
+
+ virtual bool canWrite(QIODevice *device, const QByteArray &format) const = 0;
+
+ virtual QMediaPlaylistReader *createReader(QIODevice *device, const QByteArray &format = QByteArray()) = 0;
+ virtual QMediaPlaylistReader *createReader(const QUrl& location, const QByteArray &format = QByteArray()) = 0;
+
+ virtual QMediaPlaylistWriter *createWriter(QIODevice *device, const QByteArray &format) = 0;
+};
+
+#define QMediaPlaylistIOInterface_iid "com.nokia.Qt.QMediaPlaylistIOInterface"
+Q_DECLARE_INTERFACE(QMediaPlaylistIOInterface, QMediaPlaylistIOInterface_iid);
+
+class Q_MULTIMEDIA_EXPORT QMediaPlaylistIOPlugin : public QObject, public QMediaPlaylistIOInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QMediaPlaylistIOInterface:QFactoryInterface)
+
+public:
+ explicit QMediaPlaylistIOPlugin(QObject *parent = 0);
+ virtual ~QMediaPlaylistIOPlugin();
+
+ virtual bool canRead(QIODevice *device, const QByteArray &format = QByteArray() ) const = 0;
+ virtual bool canRead(const QUrl& location, const QByteArray &format = QByteArray()) const = 0;
+
+ virtual bool canWrite(QIODevice *device, const QByteArray &format) const = 0;
+
+ virtual QStringList keys() const = 0;
+
+ virtual QMediaPlaylistReader *createReader(QIODevice *device, const QByteArray &format = QByteArray()) = 0;
+ virtual QMediaPlaylistReader *createReader(const QUrl& location, const QByteArray &format = QByteArray()) = 0;
+
+ virtual QMediaPlaylistWriter *createWriter(QIODevice *device, const QByteArray &format) = 0;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QMEDIAPLAYLISTIOPLUGIN_H
diff --git a/src/multimedia/base/qmediaplaylistnavigator.cpp b/src/multimedia/base/qmediaplaylistnavigator.cpp
new file mode 100644
index 0000000000..0c52c71f79
--- /dev/null
+++ b/src/multimedia/base/qmediaplaylistnavigator.cpp
@@ -0,0 +1,545 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtMultimedia/qmediaplaylistnavigator.h>
+#include <QtMultimedia/qmediaplaylistprovider.h>
+#include <QtMultimedia/qmediaplaylist.h>
+#include "qmediaobject_p.h"
+
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+class QMediaPlaylistNullProvider : public QMediaPlaylistProvider
+{
+public:
+ QMediaPlaylistNullProvider() :QMediaPlaylistProvider() {}
+ virtual ~QMediaPlaylistNullProvider() {}
+ virtual int mediaCount() const {return 0;}
+ virtual QMediaContent media(int) const { return QMediaContent(); }
+};
+
+Q_GLOBAL_STATIC(QMediaPlaylistNullProvider, _q_nullMediaPlaylist)
+
+class QMediaPlaylistNavigatorPrivate
+{
+ Q_DECLARE_NON_CONST_PUBLIC(QMediaPlaylistNavigator)
+public:
+ QMediaPlaylistNavigatorPrivate()
+ :playlist(0),
+ currentPos(-1),
+ lastValidPos(-1),
+ playbackMode(QMediaPlaylist::Linear),
+ randomPositionsOffset(-1)
+ {
+ }
+
+ QMediaPlaylistProvider *playlist;
+ int currentPos;
+ int lastValidPos; //to be used with CurrentItemOnce playback mode
+ QMediaPlaylist::PlaybackMode playbackMode;
+ QMediaContent currentItem;
+
+ mutable QList<int> randomModePositions;
+ mutable int randomPositionsOffset;
+
+ int nextItemPos(int steps = 1) const;
+ int previousItemPos(int steps = 1) const;
+
+ void _q_mediaInserted(int start, int end);
+ void _q_mediaRemoved(int start, int end);
+ void _q_mediaChanged(int start, int end);
+
+ QMediaPlaylistNavigator *q_ptr;
+};
+
+
+int QMediaPlaylistNavigatorPrivate::nextItemPos(int steps) const
+{
+ if (playlist->mediaCount() == 0)
+ return -1;
+
+ if (steps == 0)
+ return currentPos;
+
+ switch (playbackMode) {
+ case QMediaPlaylist::CurrentItemOnce:
+ return /*currentPos == -1 ? lastValidPos :*/ -1;
+ case QMediaPlaylist::CurrentItemInLoop:
+ return currentPos;
+ case QMediaPlaylist::Linear:
+ {
+ int nextPos = currentPos+steps;
+ return nextPos < playlist->mediaCount() ? nextPos : -1;
+ }
+ case QMediaPlaylist::Loop:
+ return (currentPos+steps) % playlist->mediaCount();
+ case QMediaPlaylist::Random:
+ {
+ //TODO: limit the history size
+
+ if (randomPositionsOffset == -1) {
+ randomModePositions.clear();
+ randomModePositions.append(currentPos);
+ randomPositionsOffset = 0;
+ }
+
+ while (randomModePositions.size() < randomPositionsOffset+steps+1)
+ randomModePositions.append(-1);
+ int res = randomModePositions[randomPositionsOffset+steps];
+ if (res<0 || res >= playlist->mediaCount()) {
+ res = qrand() % playlist->mediaCount();
+ randomModePositions[randomPositionsOffset+steps] = res;
+ }
+
+ return res;
+ }
+ }
+
+ return -1;
+}
+
+int QMediaPlaylistNavigatorPrivate::previousItemPos(int steps) const
+{
+ if (playlist->mediaCount() == 0)
+ return -1;
+
+ if (steps == 0)
+ return currentPos;
+
+ switch (playbackMode) {
+ case QMediaPlaylist::CurrentItemOnce:
+ return /*currentPos == -1 ? lastValidPos :*/ -1;
+ case QMediaPlaylist::CurrentItemInLoop:
+ return currentPos;
+ case QMediaPlaylist::Linear:
+ {
+ int prevPos = currentPos == -1 ? playlist->mediaCount() - steps : currentPos - steps;
+ return prevPos>=0 ? prevPos : -1;
+ }
+ case QMediaPlaylist::Loop:
+ {
+ int prevPos = currentPos - steps;
+ while (prevPos<0)
+ prevPos += playlist->mediaCount();
+ return prevPos;
+ }
+ case QMediaPlaylist::Random:
+ {
+ //TODO: limit the history size
+
+ if (randomPositionsOffset == -1) {
+ randomModePositions.clear();
+ randomModePositions.append(currentPos);
+ randomPositionsOffset = 0;
+ }
+
+ while (randomPositionsOffset-steps < 0) {
+ randomModePositions.prepend(-1);
+ randomPositionsOffset++;
+ }
+
+ int res = randomModePositions[randomPositionsOffset-steps];
+ if (res<0 || res >= playlist->mediaCount()) {
+ res = qrand() % playlist->mediaCount();
+ randomModePositions[randomPositionsOffset-steps] = res;
+ }
+
+ return res;
+ }
+ }
+
+ return -1;
+}
+
+/*!
+ \class QMediaPlaylistNavigator
+ \preliminary
+ \since 4.7
+ \brief The QMediaPlaylistNavigator class provides navigation for a media playlist.
+
+ \sa QMediaPlaylist, QMediaPlaylistProvider
+*/
+
+
+/*!
+ Constructs a media playlist navigator for a \a playlist.
+
+ The \a parent is passed to QObject.
+ */
+QMediaPlaylistNavigator::QMediaPlaylistNavigator(QMediaPlaylistProvider *playlist, QObject *parent)
+ : QObject(parent)
+ , d_ptr(new QMediaPlaylistNavigatorPrivate)
+{
+ d_ptr->q_ptr = this;
+
+ setPlaylist(playlist ? playlist : _q_nullMediaPlaylist());
+}
+
+/*!
+ Destroys a media playlist navigator.
+ */
+
+QMediaPlaylistNavigator::~QMediaPlaylistNavigator()
+{
+ delete d_ptr;
+}
+
+
+/*! \property QMediaPlaylistNavigator::playbackMode
+ Contains the playback mode.
+ */
+QMediaPlaylist::PlaybackMode QMediaPlaylistNavigator::playbackMode() const
+{
+ return d_func()->playbackMode;
+}
+
+/*!
+ Sets the playback \a mode.
+ */
+void QMediaPlaylistNavigator::setPlaybackMode(QMediaPlaylist::PlaybackMode mode)
+{
+ Q_D(QMediaPlaylistNavigator);
+ if (d->playbackMode == mode)
+ return;
+
+ if (mode == QMediaPlaylist::Random) {
+ d->randomPositionsOffset = 0;
+ d->randomModePositions.append(d->currentPos);
+ } else if (d->playbackMode == QMediaPlaylist::Random) {
+ d->randomPositionsOffset = -1;
+ d->randomModePositions.clear();
+ }
+
+ d->playbackMode = mode;
+
+ emit playbackModeChanged(mode);
+ emit surroundingItemsChanged();
+}
+
+/*!
+ Returns the playlist being navigated.
+*/
+
+QMediaPlaylistProvider *QMediaPlaylistNavigator::playlist() const
+{
+ return d_func()->playlist;
+}
+
+/*!
+ Sets the \a playlist to navigate.
+*/
+void QMediaPlaylistNavigator::setPlaylist(QMediaPlaylistProvider *playlist)
+{
+ Q_D(QMediaPlaylistNavigator);
+
+ if (d->playlist == playlist)
+ return;
+
+ if (d->playlist) {
+ d->playlist->disconnect(this);
+ }
+
+ if (playlist) {
+ d->playlist = playlist;
+ } else {
+ //assign to shared readonly null playlist
+ d->playlist = _q_nullMediaPlaylist();
+ }
+
+ connect(d->playlist, SIGNAL(mediaInserted(int,int)), SLOT(_q_mediaInserted(int,int)));
+ connect(d->playlist, SIGNAL(mediaRemoved(int,int)), SLOT(_q_mediaRemoved(int,int)));
+ connect(d->playlist, SIGNAL(mediaChanged(int,int)), SLOT(_q_mediaChanged(int,int)));
+
+ d->randomPositionsOffset = -1;
+ d->randomModePositions.clear();
+
+ if (d->currentPos != -1) {
+ d->currentPos = -1;
+ emit currentIndexChanged(-1);
+ }
+
+ if (!d->currentItem.isNull()) {
+ d->currentItem = QMediaContent();
+ emit activated(d->currentItem); //stop playback
+ }
+}
+
+/*! \property QMediaPlaylistNavigator::currentItem
+
+ Contains the media at the current position in the playlist.
+
+ \sa currentIndex()
+*/
+
+QMediaContent QMediaPlaylistNavigator::currentItem() const
+{
+ return itemAt(d_func()->currentPos);
+}
+
+/*! \fn QMediaContent QMediaPlaylistNavigator::nextItem(int steps) const
+
+ Returns the media that is \a steps positions ahead of the current
+ position in the playlist.
+
+ \sa nextIndex()
+*/
+QMediaContent QMediaPlaylistNavigator::nextItem(int steps) const
+{
+ return itemAt(nextIndex(steps));
+}
+
+/*!
+ Returns the media that is \a steps positions behind the current
+ position in the playlist.
+
+ \sa previousIndex()
+ */
+QMediaContent QMediaPlaylistNavigator::previousItem(int steps) const
+{
+ return itemAt(previousIndex(steps));
+}
+
+/*!
+ Returns the media at a \a position in the playlist.
+ */
+QMediaContent QMediaPlaylistNavigator::itemAt(int position) const
+{
+ return d_func()->playlist->media(position);
+}
+
+/*! \property QMediaPlaylistNavigator::currentIndex
+
+ Contains the position of the current media.
+
+ If no media is current, the property contains -1.
+
+ \sa nextIndex(), previousIndex()
+*/
+
+int QMediaPlaylistNavigator::currentIndex() const
+{
+ return d_func()->currentPos;
+}
+
+/*!
+ Returns a position \a steps ahead of the current position
+ accounting for the playbackMode().
+
+ If the position is beyond the end of the playlist, this value
+ returned is -1.
+
+ \sa currentIndex(), previousIndex(), playbackMode()
+*/
+
+int QMediaPlaylistNavigator::nextIndex(int steps) const
+{
+ return d_func()->nextItemPos(steps);
+}
+
+/*!
+
+ Returns a position \a steps behind the current position accounting
+ for the playbackMode().
+
+ If the position is prior to the beginning of the playlist this will
+ return -1.
+
+ \sa currentIndex(), nextIndex(), playbackMode()
+*/
+int QMediaPlaylistNavigator::previousIndex(int steps) const
+{
+ return d_func()->previousItemPos(steps);
+}
+
+/*!
+ Advances to the next item in the playlist.
+
+ \sa previous(), jump(), playbackMode()
+ */
+void QMediaPlaylistNavigator::next()
+{
+ Q_D(QMediaPlaylistNavigator);
+
+ int nextPos = d->nextItemPos();
+
+ if ( playbackMode() == QMediaPlaylist::Random )
+ d->randomPositionsOffset++;
+
+ jump(nextPos);
+}
+
+/*!
+ Returns to the previous item in the playlist,
+
+ \sa next(), jump(), playbackMode()
+ */
+void QMediaPlaylistNavigator::previous()
+{
+ Q_D(QMediaPlaylistNavigator);
+
+ int prevPos = d->previousItemPos();
+ if ( playbackMode() == QMediaPlaylist::Random )
+ d->randomPositionsOffset--;
+
+ jump(prevPos);
+}
+
+/*!
+ Jumps to a new \a position in the playlist.
+ */
+void QMediaPlaylistNavigator::jump(int position)
+{
+ Q_D(QMediaPlaylistNavigator);
+
+ if (position<-1 || position>=d->playlist->mediaCount()) {
+ qWarning() << "QMediaPlaylistNavigator: Jump outside playlist range";
+ position = -1;
+ }
+
+ if (position != -1)
+ d->lastValidPos = position;
+
+ if (playbackMode() == QMediaPlaylist::Random) {
+ if (d->randomModePositions[d->randomPositionsOffset] != position) {
+ d->randomModePositions.clear();
+ d->randomModePositions.append(position);
+ d->randomPositionsOffset = 0;
+ }
+ }
+
+ if (position != -1)
+ d->currentItem = d->playlist->media(position);
+ else
+ d->currentItem = QMediaContent();
+
+ if (position != d->currentPos) {
+ d->currentPos = position;
+ emit currentIndexChanged(d->currentPos);
+ emit surroundingItemsChanged();
+ }
+
+ emit activated(d->currentItem);
+}
+
+/*!
+ \internal
+*/
+void QMediaPlaylistNavigatorPrivate::_q_mediaInserted(int start, int end)
+{
+ Q_Q(QMediaPlaylistNavigator);
+
+ if (currentPos >= start) {
+ currentPos = end-start+1;
+ q->jump(currentPos);
+ }
+
+ //TODO: check if they really changed
+ emit q->surroundingItemsChanged();
+}
+
+/*!
+ \internal
+*/
+void QMediaPlaylistNavigatorPrivate::_q_mediaRemoved(int start, int end)
+{
+ Q_Q(QMediaPlaylistNavigator);
+
+ if (currentPos > end) {
+ currentPos = currentPos - end-start+1;
+ q->jump(currentPos);
+ } else if (currentPos >= start) {
+ //current item was removed
+ currentPos = qMin(start, playlist->mediaCount()-1);
+ q->jump(currentPos);
+ }
+
+ //TODO: check if they really changed
+ emit q->surroundingItemsChanged();
+}
+
+/*!
+ \internal
+*/
+void QMediaPlaylistNavigatorPrivate::_q_mediaChanged(int start, int end)
+{
+ Q_Q(QMediaPlaylistNavigator);
+
+ if (currentPos >= start && currentPos<=end) {
+ QMediaContent src = playlist->media(currentPos);
+ if (src != currentItem) {
+ currentItem = src;
+ emit q->activated(src);
+ }
+ }
+
+ //TODO: check if they really changed
+ emit q->surroundingItemsChanged();
+}
+
+/*!
+ \fn QMediaPlaylistNavigator::activated(const QMediaContent &media)
+
+ Signals that the current \a media has changed.
+*/
+
+/*!
+ \fn QMediaPlaylistNavigator::currentIndexChanged(int position)
+
+ Signals the \a position of the current media has changed.
+*/
+
+/*!
+ \fn QMediaPlaylistNavigator::playbackModeChanged(QMediaPlaylist::PlaybackMode mode)
+
+ Signals that the playback \a mode has changed.
+*/
+
+/*!
+ \fn QMediaPlaylistNavigator::surroundingItemsChanged()
+
+ Signals that media immediately surrounding the current position has changed.
+*/
+
+#include "moc_qmediaplaylistnavigator.cpp"
+
+QT_END_NAMESPACE
+
diff --git a/src/multimedia/base/qmediaplaylistnavigator.h b/src/multimedia/base/qmediaplaylistnavigator.h
new file mode 100644
index 0000000000..73789afe6e
--- /dev/null
+++ b/src/multimedia/base/qmediaplaylistnavigator.h
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMEDIAPLAYLISTNAVIGATOR_H
+#define QMEDIAPLAYLISTNAVIGATOR_H
+
+#include <QtCore/qobject.h>
+
+#include <QtMultimedia/qmediaplaylistprovider.h>
+#include <QtMultimedia/qmediaplaylist.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+
+class QMediaPlaylistNavigatorPrivate;
+class Q_MULTIMEDIA_EXPORT QMediaPlaylistNavigator : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QMediaPlaylist::PlaybackMode playbackMode READ playbackMode WRITE setPlaybackMode NOTIFY playbackModeChanged)
+ Q_PROPERTY(int currentIndex READ currentIndex WRITE jump NOTIFY currentIndexChanged)
+ Q_PROPERTY(QMediaContent currentItem READ currentItem NOTIFY currentItemChanged)
+
+public:
+ QMediaPlaylistNavigator(QMediaPlaylistProvider *playlist, QObject *parent = 0);
+ virtual ~QMediaPlaylistNavigator();
+
+ QMediaPlaylistProvider *playlist() const;
+ void setPlaylist(QMediaPlaylistProvider *playlist);
+
+ QMediaPlaylist::PlaybackMode playbackMode() const;
+
+ QMediaContent currentItem() const;
+ QMediaContent nextItem(int steps = 1) const;
+ QMediaContent previousItem(int steps = 1) const;
+
+ QMediaContent itemAt(int position) const;
+
+ int currentIndex() const;
+ int nextIndex(int steps = 1) const;
+ int previousIndex(int steps = 1) const;
+
+public Q_SLOTS:
+ void next();
+ void previous();
+
+ void jump(int);
+
+ void setPlaybackMode(QMediaPlaylist::PlaybackMode mode);
+
+Q_SIGNALS:
+ void activated(const QMediaContent &content);
+ void currentIndexChanged(int);
+ void playbackModeChanged(QMediaPlaylist::PlaybackMode mode);
+
+ void surroundingItemsChanged();
+
+protected:
+ QMediaPlaylistNavigatorPrivate *d_ptr;
+
+private:
+ Q_DISABLE_COPY(QMediaPlaylistNavigator)
+ Q_DECLARE_PRIVATE(QMediaPlaylistNavigator)
+
+ Q_PRIVATE_SLOT(d_func(), void _q_mediaInserted(int start, int end))
+ Q_PRIVATE_SLOT(d_func(), void _q_mediaRemoved(int start, int end))
+ Q_PRIVATE_SLOT(d_func(), void _q_mediaChanged(int start, int end))
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QMEDIAPLAYLISTNAVIGATOR_H
diff --git a/src/multimedia/base/qmediaplaylistprovider.cpp b/src/multimedia/base/qmediaplaylistprovider.cpp
new file mode 100644
index 0000000000..942f1557e9
--- /dev/null
+++ b/src/multimedia/base/qmediaplaylistprovider.cpp
@@ -0,0 +1,308 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qurl.h>
+
+#include <QtMultimedia/qmediaplaylistprovider.h>
+#include "qmediaplaylistprovider_p.h"
+
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QMediaPlaylistProvider
+ \preliminary
+ \since 4.7
+ \brief The QMediaPlaylistProvider class provides an abstract list of media.
+
+ \sa QMediaPlaylist
+*/
+
+/*!
+ Constructs a playlist provider with the given \a parent.
+*/
+QMediaPlaylistProvider::QMediaPlaylistProvider(QObject *parent)
+ :QObject(parent), d_ptr(new QMediaPlaylistProviderPrivate)
+{
+}
+
+/*!
+ \internal
+*/
+QMediaPlaylistProvider::QMediaPlaylistProvider(QMediaPlaylistProviderPrivate &dd, QObject *parent)
+ :QObject(parent), d_ptr(&dd)
+{
+}
+
+/*!
+ Destroys a playlist provider.
+*/
+QMediaPlaylistProvider::~QMediaPlaylistProvider()
+{
+ delete d_ptr;
+}
+
+/*!
+ \fn QMediaPlaylistProvider::mediaCount() const;
+
+ Returns the size of playlist.
+*/
+
+/*!
+ \fn QMediaPlaylistProvider::media(int index) const;
+
+ Returns the media at \a index in the playlist.
+
+ If the index is invalid this will return a null media content.
+*/
+
+
+/*!
+ Loads a playlist from from a URL \a location. If no playlist \a format is specified the loader
+ will inspect the URL or probe the headers to guess the format.
+
+ New items are appended to playlist.
+
+ Returns true if the provider supports the format and loading from the locations URL protocol,
+ otherwise this will return false.
+*/
+bool QMediaPlaylistProvider::load(const QUrl &location, const char *format)
+{
+ Q_UNUSED(location);
+ Q_UNUSED(format);
+ return false;
+}
+
+/*!
+ Loads a playlist from from an I/O \a device. If no playlist \a format is specified the loader
+ will probe the headers to guess the format.
+
+ New items are appended to playlist.
+
+ Returns true if the provider supports the format and loading from an I/O device, otherwise this
+ will return false.
+*/
+bool QMediaPlaylistProvider::load(QIODevice * device, const char *format)
+{
+ Q_UNUSED(device);
+ Q_UNUSED(format);
+ return false;
+}
+
+/*!
+ Saves the contents of a playlist to a URL \a location. If no playlist \a format is specified
+ the writer will inspect the URL to guess the format.
+
+ Returns true if the playlist was saved succesfully; and false otherwise.
+ */
+bool QMediaPlaylistProvider::save(const QUrl &location, const char *format)
+{
+ Q_UNUSED(location);
+ Q_UNUSED(format);
+ return false;
+}
+
+/*!
+ Saves the contents of a playlist to an I/O \a device in the specified \a format.
+
+ Returns true if the playlist was saved succesfully; and false otherwise.
+*/
+bool QMediaPlaylistProvider::save(QIODevice * device, const char *format)
+{
+ Q_UNUSED(device);
+ Q_UNUSED(format);
+ return false;
+}
+
+/*!
+ Returns true if a playlist is read-only; otherwise returns false.
+*/
+bool QMediaPlaylistProvider::isReadOnly() const
+{
+ return true;
+}
+
+/*!
+ Append \a media to a playlist.
+
+ Returns true if the media was appended; and false otherwise.
+*/
+bool QMediaPlaylistProvider::addMedia(const QMediaContent &media)
+{
+ Q_UNUSED(media);
+ return false;
+}
+
+/*!
+ Append multiple media \a items to a playlist.
+
+ Returns true if the media items were appended; and false otherwise.
+*/
+bool QMediaPlaylistProvider::addMedia(const QList<QMediaContent> &items)
+{
+ foreach(const QMediaContent &item, items) {
+ if (!addMedia(item))
+ return false;
+ }
+
+ return true;
+}
+
+/*!
+ Inserts \a media into a playlist at \a position.
+
+ Returns true if the media was inserted; and false otherwise.
+*/
+bool QMediaPlaylistProvider::insertMedia(int position, const QMediaContent &media)
+{
+ Q_UNUSED(position);
+ Q_UNUSED(media);
+ return false;
+}
+
+/*!
+ Inserts multiple media \a items into a playlist at \a position.
+
+ Returns true if the media \a items were inserted; and false otherwise.
+*/
+bool QMediaPlaylistProvider::insertMedia(int position, const QList<QMediaContent> &items)
+{
+ for (int i=0; i<items.count(); i++) {
+ if (!insertMedia(position+i,items.at(i)))
+ return false;
+ }
+
+ return true;
+}
+
+
+/*!
+ Removes the media at \a position from a playlist.
+
+ Returns true if the media was removed; and false otherwise.
+*/
+bool QMediaPlaylistProvider::removeMedia(int position)
+{
+ Q_UNUSED(position);
+ return false;
+}
+
+/*!
+ Removes the media between the given \a start and \a end positions from a playlist.
+
+ Returns true if the media was removed; and false otherwise.
+ */
+bool QMediaPlaylistProvider::removeMedia(int start, int end)
+{
+ for (int pos=start; pos<=end; pos++) {
+ if (!removeMedia(pos))
+ return false;
+ }
+
+ return true;
+}
+
+/*!
+ Removes all media from a playlist.
+
+ Returns true if the media was removed; and false otherwise.
+*/
+bool QMediaPlaylistProvider::clear()
+{
+ return removeMedia(0, mediaCount()-1);
+}
+
+/*!
+ Shuffles the contents of a playlist.
+*/
+void QMediaPlaylistProvider::shuffle()
+{
+}
+
+/*!
+ \fn void QMediaPlaylistProvider::mediaAboutToBeInserted(int start, int end);
+
+ Signals that new media is about to be inserted into a playlist between the \a start and \a end
+ positions.
+*/
+
+/*!
+ \fn void QMediaPlaylistProvider::mediaInserted(int start, int end);
+
+ Signals that new media has been inserted into a playlist between the \a start and \a end
+ positions.
+*/
+
+/*!
+ \fn void QMediaPlaylistProvider::mediaAboutToBeRemoved(int start, int end);
+
+ Signals that media is about to be removed from a playlist between the \a start and \a end
+ positions.
+*/
+
+/*!
+ \fn void QMediaPlaylistProvider::mediaRemoved(int start, int end);
+
+ Signals that media has been removed from a playlist between the \a start and \a end positions.
+*/
+
+/*!
+ \fn void QMediaPlaylistProvider::mediaChanged(int start, int end);
+
+ Signals that media in playlist between the \a start and \a end positions inclusive has changed.
+*/
+
+/*!
+ \fn void QMediaPlaylistProvider::loaded()
+
+ Signals that a load() finished successfully.
+*/
+
+/*!
+ \fn void QMediaPlaylistProvider::loadFailed(QMediaPlaylist::Error error, const QString& errorMessage)
+
+ Signals that a load failed() due to an \a error. The \a errorMessage provides more information.
+*/
+
+#include "moc_qmediaplaylistprovider.cpp"
+
+QT_END_NAMESPACE
+
diff --git a/src/multimedia/base/qmediaplaylistprovider.h b/src/multimedia/base/qmediaplaylistprovider.h
new file mode 100644
index 0000000000..b8f07d15d2
--- /dev/null
+++ b/src/multimedia/base/qmediaplaylistprovider.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMEDIAPLAYLISTPROVIDER_H
+#define QMEDIAPLAYLISTPROVIDER_H
+
+#include <QtCore/qobject.h>
+
+#include <QtMultimedia/qmediacontent.h>
+#include <QtMultimedia/qmediaplaylist.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+class QString;
+
+
+class QMediaPlaylistProviderPrivate;
+class Q_MULTIMEDIA_EXPORT QMediaPlaylistProvider : public QObject
+{
+ Q_OBJECT
+
+public:
+ QMediaPlaylistProvider(QObject *parent=0);
+ virtual ~QMediaPlaylistProvider();
+
+ virtual bool load(const QUrl &location, const char *format = 0);
+ virtual bool load(QIODevice * device, const char *format = 0);
+ virtual bool save(const QUrl &location, const char *format = 0);
+ virtual bool save(QIODevice * device, const char *format);
+
+ virtual int mediaCount() const = 0;
+ virtual QMediaContent media(int index) const = 0;
+
+ virtual bool isReadOnly() const;
+
+ virtual bool addMedia(const QMediaContent &content);
+ virtual bool addMedia(const QList<QMediaContent> &contentList);
+ virtual bool insertMedia(int index, const QMediaContent &content);
+ virtual bool insertMedia(int index, const QList<QMediaContent> &content);
+ virtual bool removeMedia(int pos);
+ virtual bool removeMedia(int start, int end);
+ virtual bool clear();
+
+public Q_SLOTS:
+ virtual void shuffle();
+
+Q_SIGNALS:
+ void mediaAboutToBeInserted(int start, int end);
+ void mediaInserted(int start, int end);
+
+ void mediaAboutToBeRemoved(int start, int end);
+ void mediaRemoved(int start, int end);
+
+ void mediaChanged(int start, int end);
+
+ void loaded();
+ void loadFailed(QMediaPlaylist::Error, const QString& errorMessage);
+
+protected:
+ QMediaPlaylistProviderPrivate *d_ptr;
+ QMediaPlaylistProvider(QMediaPlaylistProviderPrivate &dd, QObject *parent);
+
+private:
+ Q_DECLARE_PRIVATE(QMediaPlaylistProvider)
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QMEDIAPLAYLISTPROVIDER_H
diff --git a/src/multimedia/base/qmediaplaylistprovider_p.h b/src/multimedia/base/qmediaplaylistprovider_p.h
new file mode 100644
index 0000000000..aaf6deb7dd
--- /dev/null
+++ b/src/multimedia/base/qmediaplaylistprovider_p.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMEDIAPLAYLISTPROVIDER_P_H
+#define QMEDIAPLAYLISTPROVIDER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtMultimedia/qmediaplaylist.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QMediaPlaylistProviderPrivate
+{
+public:
+ QMediaPlaylistProviderPrivate()
+ {}
+ virtual ~QMediaPlaylistProviderPrivate()
+ {}
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QMEDIAPLAYLISTSOURCE_P_H
diff --git a/src/multimedia/base/qmediapluginloader.cpp b/src/multimedia/base/qmediapluginloader.cpp
new file mode 100644
index 0000000000..24c5abaa4c
--- /dev/null
+++ b/src/multimedia/base/qmediapluginloader.cpp
@@ -0,0 +1,133 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qmediapluginloader_p.h"
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qpluginloader.h>
+#include <QtCore/qdir.h>
+#include <QtCore/qdebug.h>
+
+#include <QtMultimedia/qmediaserviceproviderplugin.h>
+
+
+QT_BEGIN_NAMESPACE
+
+
+typedef QMap<QString,QObjectList> ObjectListMap;
+Q_GLOBAL_STATIC(ObjectListMap, staticMediaPlugins);
+
+QMediaPluginLoader::QMediaPluginLoader(const char *iid, const QString &location, Qt::CaseSensitivity):
+ m_iid(iid)
+{
+ m_location = location + QLatin1String("/");
+ load();
+}
+
+QStringList QMediaPluginLoader::keys() const
+{
+ return m_instances.keys();
+}
+
+QObject* QMediaPluginLoader::instance(QString const &key)
+{
+ return m_instances.value(key);
+}
+
+QList<QObject*> QMediaPluginLoader::instances(QString const &key)
+{
+ return m_instances.values(key);
+}
+
+//to be used for testing purposes only
+void QMediaPluginLoader::setStaticPlugins(const QString &location, const QObjectList& objects)
+{
+ staticMediaPlugins()->insert(location + QLatin1String("/"), objects);
+}
+
+void QMediaPluginLoader::load()
+{
+ if (!m_instances.isEmpty())
+ return;
+
+ if (staticMediaPlugins() && staticMediaPlugins()->contains(m_location)) {
+ foreach(QObject *o, staticMediaPlugins()->value(m_location)) {
+ if (o != 0 && o->qt_metacast(m_iid) != 0) {
+ QFactoryInterface* p = qobject_cast<QFactoryInterface*>(o);
+ if (p != 0) {
+ foreach (QString const &key, p->keys())
+ m_instances.insertMulti(key, o);
+ }
+ }
+ }
+ } else {
+ QStringList paths = QCoreApplication::libraryPaths();
+
+ foreach (QString const &path, paths) {
+ QString pluginPathName(path + m_location);
+ QDir pluginDir(pluginPathName);
+
+ if (!pluginDir.exists())
+ continue;
+
+ foreach (QString pluginLib, pluginDir.entryList(QDir::Files)) {
+ QPluginLoader loader(pluginPathName + pluginLib);
+
+ QObject *o = loader.instance();
+ if (o != 0 && o->qt_metacast(m_iid) != 0) {
+ QFactoryInterface* p = qobject_cast<QFactoryInterface*>(o);
+ if (p != 0) {
+ foreach (QString const &key, p->keys())
+ m_instances.insertMulti(key, o);
+ }
+
+ continue;
+ } else {
+ qWarning() << "QMediaPluginLoader: Failed to load plugin: " << pluginLib << loader.errorString();
+ }
+ delete o;
+ loader.unload();
+ }
+ }
+ }
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/multimedia/base/qmediapluginloader_p.h b/src/multimedia/base/qmediapluginloader_p.h
new file mode 100644
index 0000000000..351d2f1e4c
--- /dev/null
+++ b/src/multimedia/base/qmediapluginloader_p.h
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMEDIAPLUGINLOADER_H
+#define QMEDIAPLUGINLOADER_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qobject.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qmap.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QMediaServiceProviderPlugin;
+
+class Q_AUTOTEST_EXPORT QMediaPluginLoader
+{
+public:
+ QMediaPluginLoader(const char *iid,
+ const QString &suffix = QString(),
+ Qt::CaseSensitivity = Qt::CaseSensitive);
+
+ QStringList keys() const;
+ QObject* instance(QString const &key);
+ QList<QObject*> instances(QString const &key);
+
+ static void setStaticPlugins(const QString &location, const QObjectList& objects);
+
+private:
+ void load();
+
+ QByteArray m_iid;
+ QString m_location;
+ QMap<QString, QObject*> m_instances;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QMEDIAPLUGINLOADER_H
diff --git a/src/multimedia/base/qmediaresource.cpp b/src/multimedia/base/qmediaresource.cpp
new file mode 100644
index 0000000000..646d9a721a
--- /dev/null
+++ b/src/multimedia/base/qmediaresource.cpp
@@ -0,0 +1,399 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qsize.h>
+#include <QtCore/qurl.h>
+#include <QtCore/qvariant.h>
+
+#include <QtMultimedia/qmediaresource.h>
+
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QMediaResource
+ \preliminary
+ \since 4.7
+ \brief The QMediaResource class provides a description of a media resource.
+ \ingroup multimedia
+
+ A media resource is composed of a \l {url()}{URL} containing the
+ location of the resource and a set of properties that describe the
+ format of the resource. The properties provide a means to assess a
+ resource without first attempting to load it, and in situations where
+ media be represented by multiple alternative representations provide a
+ means to select the appropriate resource.
+
+ Media made available by a remote services can often be available in
+ multiple encodings or quality levels, this allows a client to select
+ an appropriate resource based on considerations such as codecs supported,
+ network bandwidth, and display constraints. QMediaResource includes
+ information such as the \l {mimeType()}{MIME type}, \l {audioCodec()}{audio}
+ and \l {videoCodec()}{video} codecs, \l {audioBitRate()}{audio} and
+ \l {videoBitRate()}{video} bit rates, and \l {resolution()}{resolution}
+ so these constraints and others can be evaluated.
+
+ The only mandatory property of a QMediaResource is the url().
+
+ \sa QMediaContent
+*/
+
+/*!
+ \typedef QMediaResourceList
+
+ Synonym for \c QList<QMediaResource>
+*/
+
+/*!
+ Constructs a null media resource.
+*/
+QMediaResource::QMediaResource()
+{
+}
+
+/*!
+ Constructs a media resource with the given \a mimeType from a \a url.
+*/
+QMediaResource::QMediaResource(const QUrl &url, const QString &mimeType)
+{
+ values.insert(Url, url);
+ values.insert(MimeType, mimeType);
+}
+
+/*!
+ Constructs a media resource with the given \a mimeType from a network \a request.
+*/
+QMediaResource::QMediaResource(const QNetworkRequest &request, const QString &mimeType)
+{
+ values.insert(Request, QVariant::fromValue(request));
+ values.insert(Url, request.url());
+ values.insert(MimeType, mimeType);
+}
+
+/*!
+ Constructs a copy of a media resource \a other.
+*/
+QMediaResource::QMediaResource(const QMediaResource &other)
+ : values(other.values)
+{
+}
+
+/*!
+ Assigns the value of \a other to a media resource.
+*/
+QMediaResource &QMediaResource::operator =(const QMediaResource &other)
+{
+ values = other.values;
+
+ return *this;
+}
+
+/*!
+ Destroys a media resource.
+*/
+QMediaResource::~QMediaResource()
+{
+}
+
+
+/*!
+ Compares a media resource to \a other.
+
+ Returns true if the resources are identical, and false otherwise.
+*/
+bool QMediaResource::operator ==(const QMediaResource &other) const
+{
+ return values == other.values;
+}
+
+/*!
+ Compares a media resource to \a other.
+
+ Returns true if they are different, and false otherwise.
+*/
+bool QMediaResource::operator !=(const QMediaResource &other) const
+{
+ return values != other.values;
+}
+
+/*!
+ Identifies if a media resource is null.
+
+ Returns true if the resource is null, and false otherwise.
+*/
+bool QMediaResource::isNull() const
+{
+ return values.isEmpty();
+}
+
+/*!
+ Returns the URL of a media resource.
+*/
+QUrl QMediaResource::url() const
+{
+ return qvariant_cast<QUrl>(values.value(Url));
+}
+
+/*!
+ Returns the network request associated with this media resource.
+*/
+QNetworkRequest QMediaResource::request() const
+{
+ if(values.contains(Request))
+ return qvariant_cast<QNetworkRequest>(values.value(Request));
+
+ return QNetworkRequest(url());
+}
+
+/*!
+ Returns the MIME type of a media resource.
+
+ This may be null if the MIME type is unknown.
+*/
+QString QMediaResource::mimeType() const
+{
+ return qvariant_cast<QString>(values.value(MimeType));
+}
+
+/*!
+ Returns the language of a media resource as an ISO 639-2 code.
+
+ This may be null if the language is unknown.
+*/
+QString QMediaResource::language() const
+{
+ return qvariant_cast<QString>(values.value(Language));
+}
+
+/*!
+ Sets the \a language of a media resource.
+*/
+void QMediaResource::setLanguage(const QString &language)
+{
+ if (!language.isNull())
+ values.insert(Language, language);
+ else
+ values.remove(Language);
+}
+
+/*!
+ Returns the audio codec of a media resource.
+
+ This may be null if the media resource does not contain an audio stream, or the codec is
+ unknown.
+*/
+QString QMediaResource::audioCodec() const
+{
+ return qvariant_cast<QString>(values.value(AudioCodec));
+}
+
+/*!
+ Sets the audio \a codec of a media resource.
+*/
+void QMediaResource::setAudioCodec(const QString &codec)
+{
+ if (!codec.isNull())
+ values.insert(AudioCodec, codec);
+ else
+ values.remove(AudioCodec);
+}
+
+/*!
+ Returns the video codec of a media resource.
+
+ This may be null if the media resource does not contain a video stream, or the codec is
+ unknonwn.
+*/
+QString QMediaResource::videoCodec() const
+{
+ return qvariant_cast<QString>(values.value(VideoCodec));
+}
+
+/*!
+ Sets the video \a codec of media resource.
+*/
+void QMediaResource::setVideoCodec(const QString &codec)
+{
+ if (!codec.isNull())
+ values.insert(VideoCodec, codec);
+ else
+ values.remove(VideoCodec);
+}
+
+/*!
+ Returns the size in bytes of a media resource.
+
+ This may be zero if the size is unknown.
+*/
+qint64 QMediaResource::dataSize() const
+{
+ return qvariant_cast<qint64>(values.value(DataSize));
+}
+
+/*!
+ Sets the \a size in bytes of a media resource.
+*/
+void QMediaResource::setDataSize(const qint64 size)
+{
+ if (size != 0)
+ values.insert(DataSize, size);
+ else
+ values.remove(DataSize);
+}
+
+/*!
+ Returns the bit rate in bits per second of a media resource's audio stream.
+
+ This may be zero if the bit rate is unknown, or the resource contains no audio stream.
+*/
+int QMediaResource::audioBitRate() const
+{
+ return values.value(AudioBitRate).toInt();
+}
+
+/*!
+ Sets the bit \a rate in bits per second of a media resource's video stream.
+*/
+void QMediaResource::setAudioBitRate(int rate)
+{
+ if (rate != 0)
+ values.insert(AudioBitRate, rate);
+ else
+ values.remove(AudioBitRate);
+}
+
+/*!
+ Returns the audio sample rate of a media resource.
+
+ This may be zero if the sample size is unknown, or the resource contains no audio stream.
+*/
+int QMediaResource::sampleRate() const
+{
+ return qvariant_cast<int>(values.value(SampleRate));
+}
+
+/*!
+ Sets the audio \a sampleRate of a media resource.
+*/
+void QMediaResource::setSampleRate(int sampleRate)
+{
+ if (sampleRate != 0)
+ values.insert(SampleRate, sampleRate);
+ else
+ values.remove(SampleRate);
+}
+
+/*!
+ Returns the number of audio channels in a media resource.
+
+ This may be zero if the sample size is unknown, or the resource contains no audio stream.
+*/
+int QMediaResource::channelCount() const
+{
+ return qvariant_cast<int>(values.value(ChannelCount));
+}
+
+/*!
+ Sets the number of audio \a channels in a media resource.
+*/
+void QMediaResource::setChannelCount(int channels)
+{
+ if (channels != 0)
+ values.insert(ChannelCount, channels);
+ else
+ values.remove(ChannelCount);
+}
+
+/*!
+ Returns the bit rate in bits per second of a media resource's video stream.
+
+ This may be zero if the bit rate is unknown, or the resource contains no video stream.
+*/
+int QMediaResource::videoBitRate() const
+{
+ return values.value(VideoBitRate).toInt();
+}
+
+/*!
+ Sets the bit \a rate in bits per second of a media resource's video stream.
+*/
+void QMediaResource::setVideoBitRate(int rate)
+{
+ if (rate != 0)
+ values.insert(VideoBitRate, rate);
+ else
+ values.remove(VideoBitRate);
+}
+
+/*!
+ Returns the resolution in pixels of a media resource.
+
+ This may be null is the resolution is unknown, or the resource contains no pixel data (i.e. the
+ resource is an audio stream.
+*/
+QSize QMediaResource::resolution() const
+{
+ return qvariant_cast<QSize>(values.value(Resolution));
+}
+
+/*!
+ Sets the \a resolution in pixels of a media resource.
+*/
+void QMediaResource::setResolution(const QSize &resolution)
+{
+ if (resolution.width() != -1 || resolution.height() != -1)
+ values.insert(Resolution, resolution);
+ else
+ values.remove(Resolution);
+}
+
+/*!
+ Sets the \a width and \a height in pixels of a media resource.
+*/
+void QMediaResource::setResolution(int width, int height)
+{
+ if (width != -1 || height != -1)
+ values.insert(Resolution, QSize(width, height));
+ else
+ values.remove(Resolution);
+}
+QT_END_NAMESPACE
+
diff --git a/src/multimedia/base/qmediaresource.h b/src/multimedia/base/qmediaresource.h
new file mode 100644
index 0000000000..a535bbd366
--- /dev/null
+++ b/src/multimedia/base/qmediaresource.h
@@ -0,0 +1,134 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMEDIARESOURCE_H
+#define QMEDIARESOURCE_H
+
+#include <QtCore/qmap.h>
+#include <QtCore/qmetatype.h>
+#include <QtNetwork/qnetworkrequest.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+
+class Q_MULTIMEDIA_EXPORT QMediaResource
+{
+public:
+ QMediaResource();
+ QMediaResource(const QUrl &url, const QString &mimeType = QString());
+ QMediaResource(const QNetworkRequest &request, const QString &mimeType = QString());
+ QMediaResource(const QMediaResource &other);
+ QMediaResource &operator =(const QMediaResource &other);
+ ~QMediaResource();
+
+ bool isNull() const;
+
+ bool operator ==(const QMediaResource &other) const;
+ bool operator !=(const QMediaResource &other) const;
+
+ QUrl url() const;
+ QNetworkRequest request() const;
+ QString mimeType() const;
+
+ QString language() const;
+ void setLanguage(const QString &language);
+
+ QString audioCodec() const;
+ void setAudioCodec(const QString &codec);
+
+ QString videoCodec() const;
+ void setVideoCodec(const QString &codec);
+
+ qint64 dataSize() const;
+ void setDataSize(const qint64 size);
+
+ int audioBitRate() const;
+ void setAudioBitRate(int rate);
+
+ int sampleRate() const;
+ void setSampleRate(int frequency);
+
+ int channelCount() const;
+ void setChannelCount(int channels);
+
+ int videoBitRate() const;
+ void setVideoBitRate(int rate);
+
+ QSize resolution() const;
+ void setResolution(const QSize &resolution);
+ void setResolution(int width, int height);
+
+
+private:
+ enum Property
+ {
+ Url,
+ Request,
+ MimeType,
+ Language,
+ AudioCodec,
+ VideoCodec,
+ DataSize,
+ AudioBitRate,
+ VideoBitRate,
+ SampleRate,
+ ChannelCount,
+ Resolution
+ };
+ QMap<int, QVariant> values;
+};
+
+typedef QList<QMediaResource> QMediaResourceList;
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QMediaResource)
+Q_DECLARE_METATYPE(QMediaResourceList)
+
+QT_END_HEADER
+
+
+#endif
diff --git a/src/multimedia/base/qmediaservice.cpp b/src/multimedia/base/qmediaservice.cpp
new file mode 100644
index 0000000000..d9e980bd57
--- /dev/null
+++ b/src/multimedia/base/qmediaservice.cpp
@@ -0,0 +1,140 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qtimer.h>
+
+#include <QtMultimedia/qmediaservice.h>
+#include "qmediaservice_p.h"
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+/*!
+ \class QMediaService
+ \brief The QMediaService class provides a common base class for media
+ service implementations.
+ \ingroup multimedia-serv
+ \preliminary
+ \since 4.7
+
+ Media services provide implementations of the functionality promised
+ by media objects, and allow multiple providers to implement a QMediaObject.
+
+ To provide the functionality of a QMediaObject media services implement
+ QMediaControl interfaces. Services typically implement one core media
+ control which provides the core feature of a media object, and some
+ number of additional controls which provide either optional features of
+ the media object, or features of a secondary media object or peripheral
+ object.
+
+ A pointer to media service's QMediaControl implementation can be
+ obtained by passing the control's interface name to the control() function.
+
+ \code
+ QMediaPlayerControl *control = qobject_cast<QMediaPlayerControl *>(
+ service->control("com.nokia.Qt.QMediaPlayerControl/1.0"));
+ \endcode
+
+ Media objects can use services loaded dynamically from plug-ins or
+ implemented statically within an applications. Plug-in based services
+ should also implement the QMediaServiceProviderPlugin interface. Static
+ services should implement the QMediaServiceProvider interface.
+
+ \sa QMediaObject, QMediaControl, QMediaServiceProvider, QMediaServiceProviderPlugin
+*/
+
+/*!
+ Construct a media service with the given \a parent. This class is meant as a
+ base class for Multimedia services so this constructor is protected.
+*/
+
+QMediaService::QMediaService(QObject *parent)
+ : QObject(parent)
+ , d_ptr(new QMediaServicePrivate)
+{
+ d_ptr->q_ptr = this;
+}
+
+/*!
+ \internal
+*/
+QMediaService::QMediaService(QMediaServicePrivate &dd, QObject *parent)
+ : QObject(parent)
+ , d_ptr(&dd)
+{
+ d_ptr->q_ptr = this;
+}
+
+/*!
+ Destroys a media service.
+*/
+
+QMediaService::~QMediaService()
+{
+ delete d_ptr;
+}
+
+/*!
+ \fn QMediaService::control(const char *interface) const
+
+ Returns a pointer to the media control implementing \a interface.
+
+ If the service does not implement the control a null pointer is returned instead.
+*/
+
+/*!
+ \fn QMediaService::control() const
+
+ Returns a pointer to the media control of type T implemented by a media service.
+
+ If the service does not implment the control a null pointer is returned instead.
+*/
+
+#include "moc_qmediaservice.cpp"
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
diff --git a/src/multimedia/base/qmediaservice.h b/src/multimedia/base/qmediaservice.h
new file mode 100644
index 0000000000..c53a15f82a
--- /dev/null
+++ b/src/multimedia/base/qmediaservice.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QABSTRACTMEDIASERVICE_H
+#define QABSTRACTMEDIASERVICE_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qstringlist.h>
+
+#include <QtMultimedia/qmediacontrol.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+class QMediaServicePrivate;
+class Q_MULTIMEDIA_EXPORT QMediaService : public QObject
+{
+ Q_OBJECT
+
+public:
+ ~QMediaService();
+
+ virtual QMediaControl* control(const char *name) const = 0;
+
+#ifndef QT_NO_MEMBER_TEMPLATES
+ template <typename T> inline T control() const {
+ if (QObject *object = control(qmediacontrol_iid<T>())) {
+ return qobject_cast<T>(object);
+ }
+ return 0;
+ }
+#endif
+
+protected:
+ QMediaService(QObject* parent);
+ QMediaService(QMediaServicePrivate &dd, QObject *parent);
+
+ QMediaServicePrivate *d_ptr;
+
+private:
+ Q_DECLARE_PRIVATE(QMediaService)
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QABSTRACTMEDIASERVICE_H
+
diff --git a/src/multimedia/base/qmediaservice_p.h b/src/multimedia/base/qmediaservice_p.h
new file mode 100644
index 0000000000..7dbcd8ad90
--- /dev/null
+++ b/src/multimedia/base/qmediaservice_p.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QABSTRACTMEDIASERVICE_P_H
+#define QABSTRACTMEDIASERVICE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QAudioDeviceControl;
+
+class QMediaServicePrivate
+{
+public:
+ QMediaServicePrivate(): q_ptr(0) {}
+ virtual ~QMediaServicePrivate() {}
+
+ QMediaService *q_ptr;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/multimedia/base/qmediaserviceprovider.cpp b/src/multimedia/base/qmediaserviceprovider.cpp
new file mode 100644
index 0000000000..b089b3909e
--- /dev/null
+++ b/src/multimedia/base/qmediaserviceprovider.cpp
@@ -0,0 +1,738 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qmap.h>
+
+#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/qmediaserviceprovider.h>
+#include <QtMultimedia/qmediaserviceproviderplugin.h>
+#include "qmediapluginloader_p.h"
+#include <QtMultimedia/qmediaplayer.h>
+
+QT_BEGIN_NAMESPACE
+
+class QMediaServiceProviderHintPrivate : public QSharedData
+{
+public:
+ QMediaServiceProviderHintPrivate(QMediaServiceProviderHint::Type type)
+ :type(type), features(0)
+ {
+ }
+
+ QMediaServiceProviderHintPrivate(const QMediaServiceProviderHintPrivate &other)
+ :QSharedData(other),
+ type(other.type),
+ device(other.device),
+ mimeType(other.mimeType),
+ codecs(other.codecs),
+ features(other.features)
+ {
+ }
+
+ ~QMediaServiceProviderHintPrivate()
+ {
+ }
+
+ QMediaServiceProviderHint::Type type;
+ QByteArray device;
+ QString mimeType;
+ QStringList codecs;
+ QMediaServiceProviderHint::Features features;
+};
+
+/*!
+ \class QMediaServiceProviderHint
+ \preliminary
+ \since 4.7
+ \brief The QMediaServiceProviderHint class describes what is required of a QMediaService.
+
+ \ingroup multimedia-serv
+
+ The QMediaServiceProvider class uses hints to select an appropriate media service.
+*/
+
+/*!
+ \enum QMediaServiceProviderHint::Feature
+
+ Enumerates features a media service may provide.
+
+ \value LowLatencyPlayback
+ The service is expected to play simple audio formats,
+ but playback should start without significant delay.
+ Such playback service can be used for beeps, ringtones, etc.
+
+ \value RecordingSupport
+ The service provides audio or video recording functions.
+
+ \value StreamPlayback
+ The service is capable of playing QIODevice based streams.
+*/
+
+/*!
+ \enum QMediaServiceProviderHint::Type
+
+ Enumerates the possible types of media service provider hint.
+
+ \value Null En empty hint, use the default service.
+ \value ContentType Select media service most suitable for certain content type.
+ \value Device Select media service which supports certain device.
+ \value SupportedFeatures Select media service supporting the set of optional features.
+*/
+
+
+/*!
+ Constructs an empty media service provider hint.
+*/
+QMediaServiceProviderHint::QMediaServiceProviderHint()
+ :d(new QMediaServiceProviderHintPrivate(Null))
+{
+}
+
+/*!
+ Constructs a ContentType media service provider hint.
+
+ This type of hint describes a service that is able to play content of a specific MIME \a type
+ encoded with one or more of the listed \a codecs.
+*/
+QMediaServiceProviderHint::QMediaServiceProviderHint(const QString &type, const QStringList& codecs)
+ :d(new QMediaServiceProviderHintPrivate(ContentType))
+{
+ d->mimeType = type;
+ d->codecs = codecs;
+}
+
+/*!
+ Constructs a Device media service provider hint.
+
+ This type of hint describes a media service that utilizes a specific \a device.
+*/
+QMediaServiceProviderHint::QMediaServiceProviderHint(const QByteArray &device)
+ :d(new QMediaServiceProviderHintPrivate(Device))
+{
+ d->device = device;
+}
+
+/*!
+ Constructs a SupportedFeatures media service provider hint.
+
+ This type of hint describes a service which supports a specific set of \a features.
+*/
+QMediaServiceProviderHint::QMediaServiceProviderHint(QMediaServiceProviderHint::Features features)
+ :d(new QMediaServiceProviderHintPrivate(SupportedFeatures))
+{
+ d->features = features;
+}
+
+/*!
+ Constructs a copy of the media service provider hint \a other.
+*/
+QMediaServiceProviderHint::QMediaServiceProviderHint(const QMediaServiceProviderHint &other)
+ :d(other.d)
+{
+}
+
+/*!
+ Destroys a media service provider hint.
+*/
+QMediaServiceProviderHint::~QMediaServiceProviderHint()
+{
+}
+
+/*!
+ Assigns the value \a other to a media service provider hint.
+*/
+QMediaServiceProviderHint& QMediaServiceProviderHint::operator=(const QMediaServiceProviderHint &other)
+{
+ d = other.d;
+ return *this;
+}
+
+/*!
+ Identifies if \a other is of equal value to a media service provider hint.
+
+ Returns true if the hints are equal, and false if they are not.
+*/
+bool QMediaServiceProviderHint::operator == (const QMediaServiceProviderHint &other) const
+{
+ return (d == other.d) ||
+ (d->type == other.d->type &&
+ d->device == other.d->device &&
+ d->mimeType == other.d->mimeType &&
+ d->codecs == other.d->codecs &&
+ d->features == other.d->features);
+}
+
+/*!
+ Identifies if \a other is not of equal value to a media service provider hint.
+
+ Returns true if the hints are not equal, and false if they are.
+*/
+bool QMediaServiceProviderHint::operator != (const QMediaServiceProviderHint &other) const
+{
+ return !(*this == other);
+}
+
+/*!
+ Returns true if a media service provider is null.
+*/
+bool QMediaServiceProviderHint::isNull() const
+{
+ return d->type == Null;
+}
+
+/*!
+ Returns the type of a media service provider hint.
+*/
+QMediaServiceProviderHint::Type QMediaServiceProviderHint::type() const
+{
+ return d->type;
+}
+
+/*!
+ Returns the mime type of the media a service is expected to be able play.
+*/
+QString QMediaServiceProviderHint::mimeType() const
+{
+ return d->mimeType;
+}
+
+/*!
+ Returns a list of codes a media service is expected to be able to decode.
+*/
+QStringList QMediaServiceProviderHint::codecs() const
+{
+ return d->codecs;
+}
+
+/*!
+ Returns the name of a device a media service is expected to utilize.
+*/
+QByteArray QMediaServiceProviderHint::device() const
+{
+ return d->device;
+}
+
+/*!
+ Returns a set of features a media service is expected to provide.
+*/
+QMediaServiceProviderHint::Features QMediaServiceProviderHint::features() const
+{
+ return d->features;
+}
+
+
+Q_GLOBAL_STATIC_WITH_ARGS(QMediaPluginLoader, loader,
+ (QMediaServiceProviderFactoryInterface_iid, QLatin1String("/mediaservices"), Qt::CaseInsensitive))
+
+
+class QPluginServiceProvider : public QMediaServiceProvider
+{
+ QMap<QMediaService*, QMediaServiceProviderPlugin*> pluginMap;
+
+public:
+ QMediaService* requestService(const QByteArray &type, const QMediaServiceProviderHint &hint)
+ {
+ QString key(QString::fromLatin1(type.constData(),type.length()));
+
+ QList<QMediaServiceProviderPlugin *>plugins;
+ foreach (QObject *obj, loader()->instances(key)) {
+ QMediaServiceProviderPlugin *plugin =
+ qobject_cast<QMediaServiceProviderPlugin*>(obj);
+ if (plugin)
+ plugins << plugin;
+ }
+
+ if (!plugins.isEmpty()) {
+ QMediaServiceProviderPlugin *plugin = 0;
+
+ switch (hint.type()) {
+ case QMediaServiceProviderHint::Null:
+ plugin = plugins[0];
+ //special case for media player, if low latency was not asked,
+ //prefer services not offering it, since they are likely to support
+ //more formats
+ if (type == QByteArray(Q_MEDIASERVICE_MEDIAPLAYER)) {
+ foreach (QMediaServiceProviderPlugin *currentPlugin, plugins) {
+ QMediaServiceFeaturesInterface *iface =
+ qobject_cast<QMediaServiceFeaturesInterface*>(currentPlugin);
+
+ if (!iface || !(iface->supportedFeatures(type) &
+ QMediaServiceProviderHint::LowLatencyPlayback)) {
+ plugin = currentPlugin;
+ break;
+ }
+
+ }
+ }
+ break;
+ case QMediaServiceProviderHint::SupportedFeatures:
+ plugin = plugins[0];
+ foreach (QMediaServiceProviderPlugin *currentPlugin, plugins) {
+ QMediaServiceFeaturesInterface *iface =
+ qobject_cast<QMediaServiceFeaturesInterface*>(currentPlugin);
+
+ if (iface) {
+ if ((iface->supportedFeatures(type) & hint.features()) == hint.features()) {
+ plugin = currentPlugin;
+ break;
+ }
+ }
+ }
+ break;
+ case QMediaServiceProviderHint::Device: {
+ foreach (QMediaServiceProviderPlugin *currentPlugin, plugins) {
+ QMediaServiceSupportedDevicesInterface *iface =
+ qobject_cast<QMediaServiceSupportedDevicesInterface*>(currentPlugin);
+
+ if (!iface) {
+ // the plugin may support the device,
+ // but this choice still can be overridden
+ plugin = currentPlugin;
+ } else {
+ if (iface->devices(type).contains(hint.device())) {
+ plugin = currentPlugin;
+ break;
+ }
+ }
+ }
+ }
+ break;
+ case QMediaServiceProviderHint::ContentType: {
+ QtMultimedia::SupportEstimate estimate = QtMultimedia::NotSupported;
+ foreach (QMediaServiceProviderPlugin *currentPlugin, plugins) {
+ QtMultimedia::SupportEstimate currentEstimate = QtMultimedia::MaybeSupported;
+ QMediaServiceSupportedFormatsInterface *iface =
+ qobject_cast<QMediaServiceSupportedFormatsInterface*>(currentPlugin);
+
+ if (iface)
+ currentEstimate = iface->hasSupport(hint.mimeType(), hint.codecs());
+
+ if (currentEstimate > estimate) {
+ estimate = currentEstimate;
+ plugin = currentPlugin;
+
+ if (currentEstimate == QtMultimedia::PreferredService)
+ break;
+ }
+ }
+ }
+ break;
+ }
+
+ if (plugin != 0) {
+ QMediaService *service = plugin->create(key);
+ if (service != 0)
+ pluginMap.insert(service, plugin);
+
+ return service;
+ }
+ }
+
+ qWarning() << "defaultServiceProvider::requestService(): no service found for -" << key;
+ return 0;
+ }
+
+ void releaseService(QMediaService *service)
+ {
+ if (service != 0) {
+ QMediaServiceProviderPlugin *plugin = pluginMap.take(service);
+
+ if (plugin != 0)
+ plugin->release(service);
+ }
+ }
+
+ QtMultimedia::SupportEstimate hasSupport(const QByteArray &serviceType,
+ const QString &mimeType,
+ const QStringList& codecs,
+ int flags) const
+ {
+ QList<QObject*> instances = loader()->instances(
+ QString::fromLatin1(serviceType.constData(),serviceType.length()));
+
+ if (instances.isEmpty())
+ return QtMultimedia::NotSupported;
+
+ bool allServicesProvideInterface = true;
+ QtMultimedia::SupportEstimate supportEstimate = QtMultimedia::NotSupported;
+
+ foreach(QObject *obj, instances) {
+ QMediaServiceSupportedFormatsInterface *iface =
+ qobject_cast<QMediaServiceSupportedFormatsInterface*>(obj);
+
+
+ if (flags) {
+ QMediaServiceFeaturesInterface *iface =
+ qobject_cast<QMediaServiceFeaturesInterface*>(obj);
+
+ if (iface) {
+ QMediaServiceProviderHint::Features features = iface->supportedFeatures(serviceType);
+
+ //if low latency playback was asked, skip services known
+ //not to provide low latency playback
+ if ((flags & QMediaPlayer::LowLatency) &&
+ !(features & QMediaServiceProviderHint::LowLatencyPlayback))
+ continue;
+
+ //the same for QIODevice based streams support
+ if ((flags & QMediaPlayer::StreamPlayback) &&
+ !(features & QMediaServiceProviderHint::StreamPlayback))
+ continue;
+ }
+ }
+
+ if (iface)
+ supportEstimate = qMax(supportEstimate, iface->hasSupport(mimeType, codecs));
+ else
+ allServicesProvideInterface = false;
+ }
+
+ //don't return PreferredService
+ supportEstimate = qMin(supportEstimate, QtMultimedia::ProbablySupported);
+
+ //Return NotSupported only if no services are available of serviceType
+ //or all the services returned NotSupported, otherwise return at least MaybeSupported
+ if (!allServicesProvideInterface)
+ supportEstimate = qMax(QtMultimedia::MaybeSupported, supportEstimate);
+
+ return supportEstimate;
+ }
+
+ QStringList supportedMimeTypes(const QByteArray &serviceType, int flags) const
+ {
+ QList<QObject*> instances = loader()->instances(
+ QString::fromLatin1(serviceType.constData(),serviceType.length()));
+
+ QStringList supportedTypes;
+
+ foreach(QObject *obj, instances) {
+ QMediaServiceSupportedFormatsInterface *iface =
+ qobject_cast<QMediaServiceSupportedFormatsInterface*>(obj);
+
+
+ if (flags & QMediaPlayer::LowLatency) {
+ QMediaServiceFeaturesInterface *iface =
+ qobject_cast<QMediaServiceFeaturesInterface*>(obj);
+
+ if (iface) {
+ QMediaServiceProviderHint::Features features = iface->supportedFeatures(serviceType);
+
+ // If low latency playback was asked for, skip MIME types from services known
+ // not to provide low latency playback
+ if ((flags & QMediaPlayer::LowLatency) &&
+ !(features & QMediaServiceProviderHint::LowLatencyPlayback))
+ continue;
+
+ //the same for QIODevice based streams support
+ if ((flags & QMediaPlayer::StreamPlayback) &&
+ !(features & QMediaServiceProviderHint::StreamPlayback))
+ continue;
+ }
+ }
+
+ if (iface) {
+ supportedTypes << iface->supportedMimeTypes();
+ }
+ }
+
+ // Multiple services may support the same MIME type
+ supportedTypes.removeDuplicates();
+
+ return supportedTypes;
+ }
+
+ QList<QByteArray> devices(const QByteArray &serviceType) const
+ {
+ QList<QByteArray> res;
+
+ foreach(QObject *obj, loader()->instances(
+ QString::fromLatin1(serviceType.constData(),serviceType.length()))) {
+ QMediaServiceSupportedDevicesInterface *iface =
+ qobject_cast<QMediaServiceSupportedDevicesInterface*>(obj);
+
+ if (iface) {
+ res.append(iface->devices(serviceType));
+ }
+ }
+
+ return res;
+ }
+
+ QString deviceDescription(const QByteArray &serviceType, const QByteArray &device)
+ {
+ foreach(QObject *obj, loader()->instances(
+ QString::fromLatin1(serviceType.constData(),serviceType.length()))) {
+ QMediaServiceSupportedDevicesInterface *iface =
+ qobject_cast<QMediaServiceSupportedDevicesInterface*>(obj);
+
+ if (iface) {
+ if (iface->devices(serviceType).contains(device))
+ return iface->deviceDescription(serviceType, device);
+ }
+ }
+
+ return QString();
+ }
+};
+
+Q_GLOBAL_STATIC(QPluginServiceProvider, pluginProvider);
+
+/*!
+ \class QMediaServiceProvider
+ \preliminary
+ \since 4.7
+ \brief The QMediaServiceProvider class provides an abstract allocator for media services.
+*/
+
+/*!
+ \fn QMediaServiceProvider::requestService(const QByteArray &type, const QMediaServiceProviderHint &hint)
+
+ Requests an instance of a \a type service which best matches the given \a hint.
+
+ Returns a pointer to the requested service, or a null pointer if there is no suitable service.
+
+ The returned service must be released with releaseService when it is finished with.
+*/
+
+/*!
+ \fn QMediaServiceProvider::releaseService(QMediaService *service)
+
+ Releases a media \a service requested with requestService().
+*/
+
+/*!
+ \fn QtMultimedia::SupportEstimate QMediaServiceProvider::hasSupport(const QByteArray &serviceType, const QString &mimeType, const QStringList& codecs, int flags) const
+
+ Returns how confident a media service provider is that is can provide a \a serviceType
+ service that is able to play media of a specific \a mimeType that is encoded using the listed
+ \a codecs while adhearing to constraints identified in \a flags.
+*/
+QtMultimedia::SupportEstimate QMediaServiceProvider::hasSupport(const QByteArray &serviceType,
+ const QString &mimeType,
+ const QStringList& codecs,
+ int flags) const
+{
+ Q_UNUSED(serviceType);
+ Q_UNUSED(mimeType);
+ Q_UNUSED(codecs);
+ Q_UNUSED(flags);
+
+ return QtMultimedia::MaybeSupported;
+}
+
+/*!
+ \fn QStringList QMediaServiceProvider::supportedMimeTypes(const QByteArray &serviceType, int flags) const
+
+ Returns a list of MIME types supported by the service provider for the specified \a serviceType.
+
+ The resultant list is restricted to MIME types which can be supported given the constraints in \a flags.
+*/
+QStringList QMediaServiceProvider::supportedMimeTypes(const QByteArray &serviceType, int flags) const
+{
+ Q_UNUSED(serviceType);
+ Q_UNUSED(flags);
+
+ return QStringList();
+}
+
+/*!
+ Returns the list of devices related to \a service type.
+*/
+QList<QByteArray> QMediaServiceProvider::devices(const QByteArray &service) const
+{
+ Q_UNUSED(service);
+ return QList<QByteArray>();
+}
+
+/*!
+ Returns the description of \a device related to \a serviceType,
+ suitable to be displayed to user.
+*/
+QString QMediaServiceProvider::deviceDescription(const QByteArray &serviceType, const QByteArray &device)
+{
+ Q_UNUSED(serviceType);
+ Q_UNUSED(device);
+ return QString();
+}
+
+
+#ifdef QT_BUILD_INTERNAL
+
+static QMediaServiceProvider *qt_defaultMediaServiceProvider = 0;
+
+/*!
+ Sets a media service \a provider as the default.
+
+ \internal
+*/
+void QMediaServiceProvider::setDefaultServiceProvider(QMediaServiceProvider *provider)
+{
+ qt_defaultMediaServiceProvider = provider;
+}
+
+#endif
+
+/*!
+ Returns a default provider of media services.
+*/
+QMediaServiceProvider *QMediaServiceProvider::defaultServiceProvider()
+{
+#ifdef QT_BUILD_INTERNAL
+ return qt_defaultMediaServiceProvider != 0
+ ? qt_defaultMediaServiceProvider
+ : static_cast<QMediaServiceProvider *>(pluginProvider());
+#else
+ return pluginProvider();
+#endif
+}
+
+/*!
+ \class QMediaServiceProviderPlugin
+ \preliminary
+ \since 4.7
+ \brief The QMediaServiceProviderPlugin class interface provides an interface for QMediaService
+ plug-ins.
+
+ A media service provider plug-in may implement one or more of
+ QMediaServiceSupportedFormatsInterface, QMediaServiceSupportedDevicesInterface,
+ and QMediaServiceFeaturesInterface to identify the features it supports.
+*/
+
+/*!
+ \fn QMediaServiceProviderPlugin::keys() const
+
+ Returns a list of keys for media services a plug-in can create.
+*/
+
+/*!
+ \fn QMediaServiceProviderPlugin::create(const QString &key)
+
+ Constructs a new instance of the QMediaService identified by \a key.
+
+ The QMediaService returned must be destroyed with release().
+*/
+
+/*!
+ \fn QMediaServiceProviderPlugin::release(QMediaService *service)
+
+ Destroys a media \a service constructed with create().
+*/
+
+
+/*!
+ \class QMediaServiceSupportedFormatsInterface
+ \brief The QMediaServiceSupportedFormatsInterface class interface
+ identifies if a media service plug-in supports a media format.
+ \since 4.7
+
+ A QMediaServiceProviderPlugin may implement this interface.
+*/
+
+/*!
+ \fn QMediaServiceSupportedFormatsInterface::~QMediaServiceSupportedFormatsInterface()
+
+ Destroys a media service supported formats interface.
+*/
+
+/*!
+ \fn QMediaServiceSupportedFormatsInterface::hasSupport(const QString &mimeType, const QStringList& codecs) const
+
+ Returns the level of support a media service plug-in has for a \a mimeType and set of \a codecs.
+*/
+
+/*!
+ \fn QMediaServiceSupportedFormatsInterface::supportedMimeTypes() const
+
+ Returns a list of MIME types supported by the media service plug-in.
+*/
+
+/*!
+ \class QMediaServiceSupportedDevicesInterface
+ \brief The QMediaServiceSupportedDevicesInterface class interface
+ identifies the devices supported by a media service plug-in.
+ \since 4.7
+
+ A QMediaServiceProviderPlugin may implement this interface.
+*/
+
+/*!
+ \fn QMediaServiceSupportedDevicesInterface::~QMediaServiceSupportedDevicesInterface()
+
+ Destroys a media service supported devices interface.
+*/
+
+/*!
+ \fn QMediaServiceSupportedDevicesInterface::devices(const QByteArray &service) const
+
+ Returns a list of devices supported by a plug-in \a service.
+*/
+
+/*!
+ \fn QMediaServiceSupportedDevicesInterface::deviceDescription(const QByteArray &service, const QByteArray &device)
+
+ Returns a description of a \a device supported by a plug-in \a service.
+*/
+
+/*!
+ \class QMediaServiceFeaturesInterface
+ \brief The QMediaServiceFeaturesInterface class interface identifies
+ features supported by a media service plug-in.
+ \since 4.7
+
+ A QMediaServiceProviderPlugin may implement this interface.
+*/
+
+/*!
+ \fn QMediaServiceFeaturesInterface::~QMediaServiceFeaturesInterface()
+
+ Destroys a media service features interface.
+*/
+/*!
+ \fn QMediaServiceFeaturesInterface::supportedFeatures(const QByteArray &service) const
+
+ Returns a set of features supported by a plug-in \a service.
+*/
+
+QT_END_NAMESPACE
+
+#include "moc_qmediaserviceprovider.cpp"
+#include "moc_qmediaserviceproviderplugin.cpp"
diff --git a/src/multimedia/base/qmediaserviceprovider.h b/src/multimedia/base/qmediaserviceprovider.h
new file mode 100644
index 0000000000..6e3149396b
--- /dev/null
+++ b/src/multimedia/base/qmediaserviceprovider.h
@@ -0,0 +1,174 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMEDIASERVICEPROVIDER_H
+#define QMEDIASERVICEPROVIDER_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qshareddata.h>
+
+#include <QtMultimedia/qtmedianamespace.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+
+class QMediaService;
+
+class QMediaServiceProviderHintPrivate;
+class Q_MULTIMEDIA_EXPORT QMediaServiceProviderHint
+{
+public:
+ enum Type { Null, ContentType, Device, SupportedFeatures };
+
+ enum Feature {
+ LowLatencyPlayback = 0x01,
+ RecordingSupport = 0x02,
+ StreamPlayback = 0x04
+ };
+ Q_DECLARE_FLAGS(Features, Feature)
+
+ QMediaServiceProviderHint();
+ QMediaServiceProviderHint(const QString &mimeType, const QStringList& codecs);
+ QMediaServiceProviderHint(const QByteArray &device);
+ QMediaServiceProviderHint(Features features);
+ QMediaServiceProviderHint(const QMediaServiceProviderHint &other);
+ ~QMediaServiceProviderHint();
+
+ QMediaServiceProviderHint& operator=(const QMediaServiceProviderHint &other);
+
+ bool operator == (const QMediaServiceProviderHint &other) const;
+ bool operator != (const QMediaServiceProviderHint &other) const;
+
+ bool isNull() const;
+
+ Type type() const;
+
+ QString mimeType() const;
+ QStringList codecs() const;
+
+ QByteArray device() const;
+
+ Features features() const;
+
+ //to be extended, if necessary
+
+private:
+ QSharedDataPointer<QMediaServiceProviderHintPrivate> d;
+};
+
+class Q_MULTIMEDIA_EXPORT QMediaServiceProvider : public QObject
+{
+ Q_OBJECT
+
+public:
+ virtual QMediaService* requestService(const QByteArray &type, const QMediaServiceProviderHint &hint = QMediaServiceProviderHint()) = 0;
+ virtual void releaseService(QMediaService *service) = 0;
+
+ virtual QtMultimedia::SupportEstimate hasSupport(const QByteArray &serviceType,
+ const QString &mimeType,
+ const QStringList& codecs,
+ int flags = 0) const;
+ virtual QStringList supportedMimeTypes(const QByteArray &serviceType, int flags = 0) const;
+
+ virtual QList<QByteArray> devices(const QByteArray &serviceType) const;
+ virtual QString deviceDescription(const QByteArray &serviceType, const QByteArray &device);
+
+ static QMediaServiceProvider* defaultServiceProvider();
+
+#ifdef QT_BUILD_INTERNAL
+ static void setDefaultServiceProvider(QMediaServiceProvider *provider);
+#endif
+};
+
+/*!
+ Service with support for media playback
+ Required Controls: QMediaPlayerControl
+ Optional Controls: QMediaPlaylistControl, QAudioDeviceControl
+ Video Output Controls (used by QWideoWidget and QGraphicsVideoItem):
+ Required: QVideoOutputControl
+ Optional: QVideoWindowControl, QVideoRendererControl, QVideoWidgetControl
+*/
+#define Q_MEDIASERVICE_MEDIAPLAYER "com.nokia.qt.mediaplayer"
+
+/*!
+ Service with support for recording from audio sources
+ Required Controls: QAudioDeviceControl
+ Recording Controls (QMediaRecorder):
+ Required: QMediaRecorderControl
+ Recommended: QAudioEncoderControl
+ Optional: QMediaContainerControl
+*/
+#define Q_MEDIASERVICE_AUDIOSOURCE "com.nokia.qt.audiosource"
+
+/*!
+ Service with support for camera use.
+ Required Controls: QCameraControl
+ Optional Controls: QCameraExposureControl, QCameraFocusControl, QImageProcessingControl
+ Still Capture Controls: QImageCaptureControl
+ Recording Controls (QMediaRecorder):
+ Required: QMediaRecorderControl
+ Recommended: QAudioEncoderControl, QVideoEncoderControl, QMediaContainerControl
+ Viewfinder Video Output Controls (used by QWideoWidget and QGraphicsVideoItem):
+ Required: QVideoOutputControl
+ Optional: QVideoWindowControl, QVideoRendererControl, QVideoWidgetControl
+*/
+#define Q_MEDIASERVICE_CAMERA "com.nokia.qt.camera"
+
+/*!
+ Service with support for radio tuning.
+ Required Controls: QRadioTunerControl
+ Recording Controls (Optional, used by QMediaRecorder):
+ Required: QMediaRecorderControl
+ Recommended: QAudioEncoderControl
+ Optional: QMediaContainerControl
+*/
+#define Q_MEDIASERVICE_RADIO "com.nokia.qt.radio"
+
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QMEDIASERVICEPROVIDER_H
diff --git a/src/multimedia/base/qmediaserviceproviderplugin.h b/src/multimedia/base/qmediaserviceproviderplugin.h
new file mode 100644
index 0000000000..b1e728be7c
--- /dev/null
+++ b/src/multimedia/base/qmediaserviceproviderplugin.h
@@ -0,0 +1,125 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMEDIASERVICEPROVIDERPLUGIN_H
+#define QMEDIASERVICEPROVIDERPLUGIN_H
+
+#include <QtCore/qstringlist.h>
+#include <QtCore/qplugin.h>
+#include <QtCore/qfactoryinterface.h>
+
+#include <QtMultimedia/qmediaserviceprovider.h>
+
+#ifdef Q_MOC_RUN
+# pragma Q_MOC_EXPAND_MACROS
+#endif
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+class QMediaService;
+
+
+struct Q_MULTIMEDIA_EXPORT QMediaServiceProviderFactoryInterface : public QFactoryInterface
+{
+ virtual QStringList keys() const = 0;
+ virtual QMediaService* create(QString const& key) = 0;
+ virtual void release(QMediaService *service) = 0;
+};
+
+#define QMediaServiceProviderFactoryInterface_iid \
+ "com.nokia.Qt.QMediaServiceProviderFactoryInterface/1.0"
+Q_DECLARE_INTERFACE(QMediaServiceProviderFactoryInterface, QMediaServiceProviderFactoryInterface_iid)
+
+
+struct Q_MULTIMEDIA_EXPORT QMediaServiceSupportedFormatsInterface
+{
+ virtual ~QMediaServiceSupportedFormatsInterface() {}
+ virtual QtMultimedia::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const = 0;
+ virtual QStringList supportedMimeTypes() const = 0;
+};
+
+#define QMediaServiceSupportedFormatsInterface_iid \
+ "com.nokia.Qt.QMediaServiceSupportedFormatsInterface/1.0"
+Q_DECLARE_INTERFACE(QMediaServiceSupportedFormatsInterface, QMediaServiceSupportedFormatsInterface_iid)
+
+
+struct Q_MULTIMEDIA_EXPORT QMediaServiceSupportedDevicesInterface
+{
+ virtual ~QMediaServiceSupportedDevicesInterface() {}
+ virtual QList<QByteArray> devices(const QByteArray &service) const = 0;
+ virtual QString deviceDescription(const QByteArray &service, const QByteArray &device) = 0;
+};
+
+#define QMediaServiceSupportedDevicesInterface_iid \
+ "com.nokia.Qt.QMediaServiceSupportedDevicesInterface/1.0"
+Q_DECLARE_INTERFACE(QMediaServiceSupportedDevicesInterface, QMediaServiceSupportedDevicesInterface_iid)
+
+
+struct Q_MULTIMEDIA_EXPORT QMediaServiceFeaturesInterface
+{
+ virtual ~QMediaServiceFeaturesInterface() {}
+ virtual QMediaServiceProviderHint::Features supportedFeatures(const QByteArray &service) const = 0;
+};
+
+#define QMediaServiceFeaturesInterface_iid \
+ "com.nokia.Qt.QMediaServiceFeaturesInterface/1.0"
+Q_DECLARE_INTERFACE(QMediaServiceFeaturesInterface, QMediaServiceFeaturesInterface_iid)
+
+class Q_MULTIMEDIA_EXPORT QMediaServiceProviderPlugin : public QObject, public QMediaServiceProviderFactoryInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QMediaServiceProviderFactoryInterface:QFactoryInterface)
+
+public:
+ virtual QStringList keys() const = 0;
+ virtual QMediaService* create(const QString& key) = 0;
+ virtual void release(QMediaService *service) = 0;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QMEDIASERVICEPROVIDERPLUGIN_H
diff --git a/src/multimedia/base/qmediatimerange.cpp b/src/multimedia/base/qmediatimerange.cpp
new file mode 100644
index 0000000000..e1cea7e112
--- /dev/null
+++ b/src/multimedia/base/qmediatimerange.cpp
@@ -0,0 +1,708 @@
+/****************************************************************************
+**
+** 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 QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtMultimedia/qmediatimerange.h>
+
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QMediaTimeInterval
+ \brief The QMediaTimeInterval class represents a time interval with integer precision.
+ \ingroup multimedia
+ \since 4.7
+
+ An interval is specified by an inclusive start() and end() time.
+ These must be set in the constructor, as this is an immutable class.
+ The specific units of time represented by the class have not been defined -
+ it is suitable for any times which can be represented by a signed 64 bit integer.
+
+ The isNormal() method determines if a time interval is normal
+ (a normal time interval has start() <= end()). An abnormal interval can be converted
+ in to a normal interval by calling the normalized() method.
+
+ The contains() method determines if a specified time lies within
+ the time interval.
+
+ The translated() method returns a time interval which has been translated
+ forwards or backwards through time by a specified offset.
+
+ \sa QMediaTimeRange
+*/
+
+/*!
+ \fn QMediaTimeInterval::QMediaTimeInterval()
+
+ Constructs an empty interval.
+*/
+QMediaTimeInterval::QMediaTimeInterval()
+ : s(0)
+ , e(0)
+{
+
+}
+
+/*!
+ \fn QMediaTimeInterval::QMediaTimeInterval(qint64 start, qint64 end)
+
+ Constructs an interval with the specified \a start and \a end times.
+*/
+QMediaTimeInterval::QMediaTimeInterval(qint64 start, qint64 end)
+ : s(start)
+ , e(end)
+{
+
+}
+
+/*!
+ \fn QMediaTimeInterval::QMediaTimeInterval(const QMediaTimeInterval &other)
+
+ Constructs an interval by taking a copy of \a other.
+*/
+QMediaTimeInterval::QMediaTimeInterval(const QMediaTimeInterval &other)
+ : s(other.s)
+ , e(other.e)
+{
+
+}
+
+/*!
+ \fn QMediaTimeInterval::start() const
+
+ Returns the start time of the interval.
+
+ \sa end()
+*/
+qint64 QMediaTimeInterval::start() const
+{
+ return s;
+}
+
+/*!
+ \fn QMediaTimeInterval::end() const
+
+ Returns the end time of the interval.
+
+ \sa start()
+*/
+qint64 QMediaTimeInterval::end() const
+{
+ return e;
+}
+
+/*!
+ \fn QMediaTimeInterval::contains(qint64 time) const
+
+ Returns true if the time interval contains the specified \a time.
+ That is, start() <= time <= end().
+*/
+bool QMediaTimeInterval::contains(qint64 time) const
+{
+ return isNormal() ? (s <= time && time <= e)
+ : (e <= time && time <= s);
+}
+
+/*!
+ \fn QMediaTimeInterval::isNormal() const
+
+ Returns true if this time interval is normal.
+ A normal time interval has start() <= end().
+
+ \sa normalized()
+*/
+bool QMediaTimeInterval::isNormal() const
+{
+ return s <= e;
+}
+
+/*!
+ \fn QMediaTimeInterval::normalized() const
+
+ Returns a normalized version of this interval.
+
+ If the start() time of the interval is greater than the end() time,
+ then the returned interval has the start and end times swapped.
+*/
+QMediaTimeInterval QMediaTimeInterval::normalized() const
+{
+ if(s > e)
+ return QMediaTimeInterval(e, s);
+
+ return *this;
+}
+
+/*!
+ \fn QMediaTimeInterval::translated(qint64 offset) const
+
+ Returns a copy of this time interval, translated by a value of \a offset.
+ An interval can be moved forward through time with a positive offset, or backward
+ through time with a negative offset.
+*/
+QMediaTimeInterval QMediaTimeInterval::translated(qint64 offset) const
+{
+ return QMediaTimeInterval(s + offset, e + offset);
+}
+
+/*!
+ \fn operator==(const QMediaTimeInterval &a, const QMediaTimeInterval &b)
+ \relates QMediaTimeRange
+
+ Returns true if \a a is exactly equal to \a b.
+*/
+bool operator==(const QMediaTimeInterval &a, const QMediaTimeInterval &b)
+{
+ return a.start() == b.start() && a.end() == b.end();
+}
+
+/*!
+ \fn operator!=(const QMediaTimeInterval &a, const QMediaTimeInterval &b)
+ \relates QMediaTimeRange
+
+ Returns true if \a a is not exactly equal to \a b.
+*/
+bool operator!=(const QMediaTimeInterval &a, const QMediaTimeInterval &b)
+{
+ return a.start() != b.start() || a.end() != b.end();
+}
+
+class QMediaTimeRangePrivate : public QSharedData
+{
+public:
+
+ QMediaTimeRangePrivate();
+ QMediaTimeRangePrivate(const QMediaTimeRangePrivate &other);
+ QMediaTimeRangePrivate(const QMediaTimeInterval &interval);
+
+ QList<QMediaTimeInterval> intervals;
+
+ void addInterval(const QMediaTimeInterval &interval);
+ void removeInterval(const QMediaTimeInterval &interval);
+};
+
+QMediaTimeRangePrivate::QMediaTimeRangePrivate()
+ : QSharedData()
+{
+
+}
+
+QMediaTimeRangePrivate::QMediaTimeRangePrivate(const QMediaTimeRangePrivate &other)
+ : QSharedData()
+ , intervals(other.intervals)
+{
+
+}
+
+QMediaTimeRangePrivate::QMediaTimeRangePrivate(const QMediaTimeInterval &interval)
+ : QSharedData()
+{
+ if(interval.isNormal())
+ intervals << interval;
+}
+
+void QMediaTimeRangePrivate::addInterval(const QMediaTimeInterval &interval)
+{
+ // Handle normalized intervals only
+ if(!interval.isNormal())
+ return;
+
+ // Find a place to insert the interval
+ int i;
+ for (i = 0; i < intervals.count(); i++) {
+ // Insert before this element
+ if(interval.s < intervals[i].s) {
+ intervals.insert(i, interval);
+ break;
+ }
+ }
+
+ // Interval needs to be added to the end of the list
+ if (i == intervals.count())
+ intervals.append(interval);
+
+ // Do we need to correct the element before us?
+ if(i > 0 && intervals[i - 1].e >= interval.s - 1)
+ i--;
+
+ // Merge trailing ranges
+ while (i < intervals.count() - 1
+ && intervals[i].e >= intervals[i + 1].s - 1) {
+ intervals[i].e = qMax(intervals[i].e, intervals[i + 1].e);
+ intervals.removeAt(i + 1);
+ }
+}
+
+void QMediaTimeRangePrivate::removeInterval(const QMediaTimeInterval &interval)
+{
+ // Handle normalized intervals only
+ if(!interval.isNormal())
+ return;
+
+ for (int i = 0; i < intervals.count(); i++) {
+ QMediaTimeInterval r = intervals[i];
+
+ if (r.e < interval.s) {
+ // Before the removal interval
+ continue;
+ } else if (interval.e < r.s) {
+ // After the removal interval - stop here
+ break;
+ } else if (r.s < interval.s && interval.e < r.e) {
+ // Split case - a single range has a chunk removed
+ intervals[i].e = interval.s -1;
+ addInterval(QMediaTimeInterval(interval.e + 1, r.e));
+ break;
+ } else if (r.s < interval.s) {
+ // Trimming Tail Case
+ intervals[i].e = interval.s - 1;
+ } else if (interval.e < r.e) {
+ // Trimming Head Case - we can stop after this
+ intervals[i].s = interval.e + 1;
+ break;
+ } else {
+ // Complete coverage case
+ intervals.removeAt(i);
+ --i;
+ }
+ }
+}
+
+/*!
+ \class QMediaTimeRange
+ \brief The QMediaTimeRange class represents a set of zero or more disjoint
+ time intervals.
+ \ingroup multimedia
+ \since 4.7
+
+ \reentrant
+
+ The earliestTime(), latestTime(), intervals() and isEmpty()
+ methods are used to get information about the current time range.
+
+ The addInterval(), removeInterval() and clear() methods are used to modify
+ the current time range.
+
+ When adding or removing intervals from the time range, existing intervals
+ within the range may be expanded, trimmed, deleted, merged or split to ensure
+ that all intervals within the time range remain distinct and disjoint. As a
+ consequence, all intervals added or removed from a time range must be
+ \l{QMediaTimeInterval::isNormal()}{normal}.
+
+ \sa QMediaTimeInterval
+*/
+
+/*!
+ \fn QMediaTimeRange::QMediaTimeRange()
+
+ Constructs an empty time range.
+*/
+QMediaTimeRange::QMediaTimeRange()
+ : d(new QMediaTimeRangePrivate)
+{
+
+}
+
+/*!
+ \fn QMediaTimeRange::QMediaTimeRange(qint64 start, qint64 end)
+
+ Constructs a time range that contains an initial interval from
+ \a start to \a end inclusive.
+
+ If the interval is not \l{QMediaTimeInterval::isNormal()}{normal},
+ the resulting time range will be empty.
+
+ \sa addInterval()
+*/
+QMediaTimeRange::QMediaTimeRange(qint64 start, qint64 end)
+ : d(new QMediaTimeRangePrivate(QMediaTimeInterval(start, end)))
+{
+
+}
+
+/*!
+ \fn QMediaTimeRange::QMediaTimeRange(const QMediaTimeInterval &interval)
+
+ Constructs a time range that contains an intitial interval, \a interval.
+
+ If \a interval is not \l{QMediaTimeInterval::isNormal()}{normal},
+ the resulting time range will be empty.
+
+ \sa addInterval()
+*/
+QMediaTimeRange::QMediaTimeRange(const QMediaTimeInterval &interval)
+ : d(new QMediaTimeRangePrivate(interval))
+{
+
+}
+
+/*!
+ \fn QMediaTimeRange::QMediaTimeRange(const QMediaTimeRange &range)
+
+ Constructs a time range by copying another time \a range.
+*/
+QMediaTimeRange::QMediaTimeRange(const QMediaTimeRange &range)
+ : d(range.d)
+{
+
+}
+
+/*!
+ \fn QMediaTimeRange::~QMediaTimeRange()
+
+ Destructor.
+*/
+QMediaTimeRange::~QMediaTimeRange()
+{
+
+}
+
+/*!
+ \fn QMediaTimeRange::operator=(const QMediaTimeRange &other)
+
+ Takes a copy of the \a other time range and returns itself.
+*/
+QMediaTimeRange &QMediaTimeRange::operator=(const QMediaTimeRange &other)
+{
+ d = other.d;
+ return *this;
+}
+
+/*!
+ \fn QMediaTimeRange::operator=(const QMediaTimeInterval &interval)
+
+ Sets the time range to a single continuous interval, \a interval.
+*/
+QMediaTimeRange &QMediaTimeRange::operator=(const QMediaTimeInterval &interval)
+{
+ d = new QMediaTimeRangePrivate(interval);
+ return *this;
+}
+
+/*!
+ \fn QMediaTimeRange::earliestTime() const
+
+ Returns the earliest time within the time range.
+
+ For empty time ranges, this value is equal to zero.
+
+ \sa latestTime()
+*/
+qint64 QMediaTimeRange::earliestTime() const
+{
+ if (!d->intervals.isEmpty())
+ return d->intervals[0].s;
+
+ return 0;
+}
+
+/*!
+ \fn QMediaTimeRange::latestTime() const
+
+ Returns the latest time within the time range.
+
+ For empty time ranges, this value is equal to zero.
+
+ \sa earliestTime()
+*/
+qint64 QMediaTimeRange::latestTime() const
+{
+ if (!d->intervals.isEmpty())
+ return d->intervals[d->intervals.count() - 1].e;
+
+ return 0;
+}
+
+/*!
+ \fn QMediaTimeRange::addInterval(qint64 start, qint64 end)
+ \overload
+
+ Adds the interval specified by \a start and \a end
+ to the time range.
+
+ \sa addInterval()
+*/
+void QMediaTimeRange::addInterval(qint64 start, qint64 end)
+{
+ d->addInterval(QMediaTimeInterval(start, end));
+}
+
+/*!
+ \fn QMediaTimeRange::addInterval(const QMediaTimeInterval &interval)
+
+ Adds the specified \a interval to the time range.
+
+ Adding intervals which are not \l{QMediaTimeInterval::isNormal()}{normal}
+ is invalid, and will be ignored.
+
+ If the specified interval is adjacent to, or overlaps existing
+ intervals within the time range, these intervals will be merged.
+
+ This operation takes \l{linear time}
+
+ \sa removeInterval()
+*/
+void QMediaTimeRange::addInterval(const QMediaTimeInterval &interval)
+{
+ d->addInterval(interval);
+}
+
+/*!
+ \fn QMediaTimeRange::addTimeRange(const QMediaTimeRange &range)
+
+ Adds each of the intervals in \a range to this time range.
+
+ Equivalent to calling addInterval() for each interval in \a range.
+*/
+void QMediaTimeRange::addTimeRange(const QMediaTimeRange &range)
+{
+ foreach(const QMediaTimeInterval &i, range.intervals()) {
+ d->addInterval(i);
+ }
+}
+
+/*!
+ \fn QMediaTimeRange::removeInterval(qint64 start, qint64 end)
+ \overload
+
+ Removes the interval specified by \a start and \a end
+ from the time range.
+
+ \sa removeInterval()
+*/
+void QMediaTimeRange::removeInterval(qint64 start, qint64 end)
+{
+ d->removeInterval(QMediaTimeInterval(start, end));
+}
+
+/*!
+ \fn QMediaTimeRange::removeInterval(const QMediaTimeInterval &interval)
+
+ Removes the specified \a interval from the time range.
+
+ Removing intervals which are not \l{QMediaTimeInterval::isNormal()}{normal}
+ is invalid, and will be ignored.
+
+ Intervals within the time range will be trimmed, split or deleted
+ such that no intervals within the time range include any part of the
+ target interval.
+
+ This operation takes \l{linear time}
+
+ \sa addInterval()
+*/
+void QMediaTimeRange::removeInterval(const QMediaTimeInterval &interval)
+{
+ d->removeInterval(interval);
+}
+
+/*!
+ \fn QMediaTimeRange::removeTimeRange(const QMediaTimeRange &range)
+
+ Removes each of the intervals in \a range from this time range.
+
+ Equivalent to calling removeInterval() for each interval in \a range.
+*/
+void QMediaTimeRange::removeTimeRange(const QMediaTimeRange &range)
+{
+ foreach(const QMediaTimeInterval &i, range.intervals()) {
+ d->removeInterval(i);
+ }
+}
+
+/*!
+ \fn QMediaTimeRange::operator+=(const QMediaTimeRange &other)
+
+ Adds each interval in \a other to the time range and returns the result.
+*/
+QMediaTimeRange& QMediaTimeRange::operator+=(const QMediaTimeRange &other)
+{
+ addTimeRange(other);
+ return *this;
+}
+
+/*!
+ \fn QMediaTimeRange::operator+=(const QMediaTimeInterval &interval)
+
+ Adds the specified \a interval to the time range and returns the result.
+*/
+QMediaTimeRange& QMediaTimeRange::operator+=(const QMediaTimeInterval &interval)
+{
+ addInterval(interval);
+ return *this;
+}
+
+/*!
+ \fn QMediaTimeRange::operator-=(const QMediaTimeRange &other)
+
+ Removes each interval in \a other from the time range and returns the result.
+*/
+QMediaTimeRange& QMediaTimeRange::operator-=(const QMediaTimeRange &other)
+{
+ removeTimeRange(other);
+ return *this;
+}
+
+/*!
+ \fn QMediaTimeRange::operator-=(const QMediaTimeInterval &interval)
+
+ Removes the specified \a interval from the time range and returns the result.
+*/
+QMediaTimeRange& QMediaTimeRange::operator-=(const QMediaTimeInterval &interval)
+{
+ removeInterval(interval);
+ return *this;
+}
+
+/*!
+ \fn QMediaTimeRange::clear()
+
+ Removes all intervals from the time range.
+
+ \sa removeInterval()
+*/
+void QMediaTimeRange::clear()
+{
+ d->intervals.clear();
+}
+
+/*!
+ \fn QMediaTimeRange::intervals() const
+
+ Returns the list of intervals covered by this time range.
+*/
+QList<QMediaTimeInterval> QMediaTimeRange::intervals() const
+{
+ return d->intervals;
+}
+
+/*!
+ \fn QMediaTimeRange::isEmpty() const
+
+ Returns true if there are no intervals within the time range.
+
+ \sa intervals()
+*/
+bool QMediaTimeRange::isEmpty() const
+{
+ return d->intervals.isEmpty();
+}
+
+/*!
+ \fn QMediaTimeRange::isContinuous() const
+
+ Returns true if the time range consists of a continuous interval.
+ That is, there is one or fewer disjoint intervals within the time range.
+*/
+bool QMediaTimeRange::isContinuous() const
+{
+ return (d->intervals.count() <= 1);
+}
+
+/*!
+ \fn QMediaTimeRange::contains(qint64 time) const
+
+ Returns true if the specified \a time lies within the time range.
+*/
+bool QMediaTimeRange::contains(qint64 time) const
+{
+ for (int i = 0; i < d->intervals.count(); i++) {
+ if (d->intervals[i].contains(time))
+ return true;
+
+ if (time < d->intervals[i].s)
+ break;
+ }
+
+ return false;
+}
+
+/*!
+ \fn operator==(const QMediaTimeRange &a, const QMediaTimeRange &b)
+ \relates QMediaTimeRange
+
+ Returns true if all intervals in \a a are present in \a b.
+*/
+bool operator==(const QMediaTimeRange &a, const QMediaTimeRange &b)
+{
+ if (a.intervals().count() != b.intervals().count())
+ return false;
+
+ for (int i = 0; i < a.intervals().count(); i++)
+ {
+ if(a.intervals()[i] != b.intervals()[i])
+ return false;
+ }
+
+ return true;
+}
+
+/*!
+ \fn operator!=(const QMediaTimeRange &a, const QMediaTimeRange &b)
+ \relates QMediaTimeRange
+
+ Returns true if one or more intervals in \a a are not present in \a b.
+*/
+bool operator!=(const QMediaTimeRange &a, const QMediaTimeRange &b)
+{
+ return !(a == b);
+}
+
+/*!
+ \fn operator+(const QMediaTimeRange &r1, const QMediaTimeRange &r2)
+
+ Returns a time range containing the union between \a r1 and \a r2.
+ */
+QMediaTimeRange operator+(const QMediaTimeRange &r1, const QMediaTimeRange &r2)
+{
+ return (QMediaTimeRange(r1) += r2);
+}
+
+/*!
+ \fn operator-(const QMediaTimeRange &r1, const QMediaTimeRange &r2)
+
+ Returns a time range containing \a r2 subtracted from \a r1.
+ */
+QMediaTimeRange operator-(const QMediaTimeRange &r1, const QMediaTimeRange &r2)
+{
+ return (QMediaTimeRange(r1) -= r2);
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/multimedia/base/qmediatimerange.h b/src/multimedia/base/qmediatimerange.h
new file mode 100644
index 0000000000..a65629e829
--- /dev/null
+++ b/src/multimedia/base/qmediatimerange.h
@@ -0,0 +1,135 @@
+/****************************************************************************
+**
+** 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 QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMEDIATIMERANGE_H
+#define QMEDIATIMERANGE_H
+
+#include <QtCore/qshareddata.h>
+#include <QtMultimedia/qtmedianamespace.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+class QMediaTimeRangePrivate;
+
+class Q_MULTIMEDIA_EXPORT QMediaTimeInterval
+{
+public:
+ QMediaTimeInterval();
+ QMediaTimeInterval(qint64 start, qint64 end);
+ QMediaTimeInterval(const QMediaTimeInterval&);
+
+ qint64 start() const;
+ qint64 end() const;
+
+ bool contains(qint64 time) const;
+
+ bool isNormal() const;
+ QMediaTimeInterval normalized() const;
+ QMediaTimeInterval translated(qint64 offset) const;
+
+private:
+ friend class QMediaTimeRangePrivate;
+ friend class QMediaTimeRange;
+
+ qint64 s;
+ qint64 e;
+};
+
+Q_MULTIMEDIA_EXPORT bool operator==(const QMediaTimeInterval&, const QMediaTimeInterval&);
+Q_MULTIMEDIA_EXPORT bool operator!=(const QMediaTimeInterval&, const QMediaTimeInterval&);
+
+class Q_MULTIMEDIA_EXPORT QMediaTimeRange
+{
+public:
+
+ QMediaTimeRange();
+ QMediaTimeRange(qint64 start, qint64 end);
+ QMediaTimeRange(const QMediaTimeInterval&);
+ QMediaTimeRange(const QMediaTimeRange &range);
+ ~QMediaTimeRange();
+
+ QMediaTimeRange &operator=(const QMediaTimeRange&);
+ QMediaTimeRange &operator=(const QMediaTimeInterval&);
+
+ qint64 earliestTime() const;
+ qint64 latestTime() const;
+
+ QList<QMediaTimeInterval> intervals() const;
+ bool isEmpty() const;
+ bool isContinuous() const;
+
+ bool contains(qint64 time) const;
+
+ void addInterval(qint64 start, qint64 end);
+ void addInterval(const QMediaTimeInterval &interval);
+ void addTimeRange(const QMediaTimeRange&);
+
+ void removeInterval(qint64 start, qint64 end);
+ void removeInterval(const QMediaTimeInterval &interval);
+ void removeTimeRange(const QMediaTimeRange&);
+
+ QMediaTimeRange& operator+=(const QMediaTimeRange&);
+ QMediaTimeRange& operator+=(const QMediaTimeInterval&);
+ QMediaTimeRange& operator-=(const QMediaTimeRange&);
+ QMediaTimeRange& operator-=(const QMediaTimeInterval&);
+
+ void clear();
+
+private:
+ QSharedDataPointer<QMediaTimeRangePrivate> d;
+};
+
+Q_MULTIMEDIA_EXPORT bool operator==(const QMediaTimeRange&, const QMediaTimeRange&);
+Q_MULTIMEDIA_EXPORT bool operator!=(const QMediaTimeRange&, const QMediaTimeRange&);
+Q_MULTIMEDIA_EXPORT QMediaTimeRange operator+(const QMediaTimeRange&, const QMediaTimeRange&);
+Q_MULTIMEDIA_EXPORT QMediaTimeRange operator-(const QMediaTimeRange&, const QMediaTimeRange&);
+
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QMEDIATIMERANGE_H
diff --git a/src/multimedia/base/qmetadatacontrol.cpp b/src/multimedia/base/qmetadatacontrol.cpp
new file mode 100644
index 0000000000..28a82ec3d5
--- /dev/null
+++ b/src/multimedia/base/qmetadatacontrol.cpp
@@ -0,0 +1,185 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtMultimedia/qmetadatacontrol.h>
+#include "qmediacontrol_p.h"
+
+
+QT_BEGIN_NAMESPACE
+
+
+/*!
+ \class QMetaDataControl
+ \ingroup multimedia-serv
+ \since 4.7
+ \preliminary
+ \brief The QMetaDataControl class provides access to the meta-data of a
+ QMediaService's media.
+
+ If a QMediaService can provide read or write access to the meta-data of
+ its current media it will implement QMetaDataControl. This control
+ provides functions for both retrieving and setting meta-data values.
+ Meta-data may be addressed by the well defined keys in the
+ QtMultimedia::MetaData enumeration using the metaData() functions, or by
+ string keys using the extendedMetaData() functions.
+
+ The functionality provided by this control is exposed to application
+ code by the meta-data members of QMediaObject, and so meta-data access
+ is potentially available in any of the media object classes. Any media
+ service may implement QMetaDataControl.
+
+ The interface name of QMetaDataControl is \c com.nokia.Qt.QMetaDataControl/1.0 as
+ defined in QMetaDataControl_iid.
+
+ \sa QMediaService::control(), QMediaObject
+*/
+
+/*!
+ \macro QMetaDataControl_iid
+
+ \c com.nokia.Qt.QMetaDataControl/1.0
+
+ Defines the interface name of the QMetaDataControl class.
+
+ \relates QMetaDataControl
+*/
+
+/*!
+ Construct a QMetaDataControl with \a parent. This class is meant as a base class
+ for service specific meta data providers so this constructor is protected.
+*/
+
+QMetaDataControl::QMetaDataControl(QObject *parent):
+ QMediaControl(*new QMediaControlPrivate, parent)
+{
+}
+
+/*!
+ Destroy the meta-data object.
+*/
+
+QMetaDataControl::~QMetaDataControl()
+{
+}
+
+/*!
+ \fn bool QMetaDataControl::isMetaDataAvailable() const
+
+ Identifies if meta-data is available from a media service.
+
+ Returns true if the meta-data is available and false otherwise.
+*/
+
+/*!
+ \fn bool QMetaDataControl::isWritable() const
+
+ Identifies if a media service's meta-data can be edited.
+
+ Returns true if the meta-data is writable and false otherwise.
+*/
+
+/*!
+ \fn QVariant QMetaDataControl::metaData(QtMultimedia::MetaData key) const
+
+ Returns the meta-data for the given \a key.
+*/
+
+/*!
+ \fn void QMetaDataControl::setMetaData(QtMultimedia::MetaData key, const QVariant &value)
+
+ Sets the \a value of the meta-data element with the given \a key.
+*/
+
+/*!
+ \fn QMetaDataControl::availableMetaData() const
+
+ Returns a list of keys there is meta-data available for.
+*/
+
+/*!
+ \fn QMetaDataControl::extendedMetaData(const QString &key) const
+
+ Returns the metaData for an abitrary string \a key.
+
+ The valid selection of keys for extended meta-data is determined by the provider and the meaning
+ and type may differ between providers.
+*/
+
+/*!
+ \fn QMetaDataControl::setExtendedMetaData(const QString &key, const QVariant &value)
+
+ Change the value of the meta-data element with an abitrary string \a key to \a value.
+
+ The valid selection of keys for extended meta-data is determined by the provider and the meaning
+ and type may differ between providers.
+*/
+
+/*!
+ \fn QMetaDataControl::availableExtendedMetaData() const
+
+ Returns a list of keys there is extended meta-data available for.
+*/
+
+
+/*!
+ \fn void QMetaDataControl::metaDataChanged()
+
+ Signal the changes of meta-data.
+*/
+
+/*!
+ \fn void QMetaDataControl::metaDataAvailableChanged(bool available)
+
+ Signal the availability of meta-data has changed, \a available will
+ be true if the multimedia object has meta-data.
+*/
+
+/*!
+ \fn void QMetaDataControl::writableChanged(bool writable)
+
+ Signal a change in the writable status of meta-data, \a writable will be
+ true if meta-data elements can be added or adjusted.
+*/
+
+#include "moc_qmetadatacontrol.cpp"
+
+QT_END_NAMESPACE
+
diff --git a/src/multimedia/base/qmetadatacontrol.h b/src/multimedia/base/qmetadatacontrol.h
new file mode 100644
index 0000000000..8e18c1697d
--- /dev/null
+++ b/src/multimedia/base/qmetadatacontrol.h
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMETADATACONTROL_H
+#define QMETADATACONTROL_H
+
+#include <QtMultimedia/qmediacontrol.h>
+#include <QtMultimedia/qmediaobject.h>
+#include <QtMultimedia/qmediaresource.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+class Q_MULTIMEDIA_EXPORT QMetaDataControl : public QMediaControl
+{
+ Q_OBJECT
+
+public:
+ ~QMetaDataControl();
+
+ virtual bool isWritable() const = 0;
+ virtual bool isMetaDataAvailable() const = 0;
+
+ virtual QVariant metaData(QtMultimedia::MetaData key) const = 0;
+ virtual void setMetaData(QtMultimedia::MetaData key, const QVariant &value) = 0;
+ virtual QList<QtMultimedia::MetaData> availableMetaData() const = 0;
+
+ virtual QVariant extendedMetaData(const QString &key) const = 0;
+ virtual void setExtendedMetaData(const QString &key, const QVariant &value) = 0;
+ virtual QStringList availableExtendedMetaData() const = 0;
+
+Q_SIGNALS:
+ void metaDataChanged();
+
+ void writableChanged(bool writable);
+ void metaDataAvailableChanged(bool available);
+
+protected:
+ QMetaDataControl(QObject *parent = 0);
+};
+
+#define QMetaDataControl_iid "com.nokia.Qt.QMetaDataControl/1.0"
+Q_MEDIA_DECLARE_CONTROL(QMetaDataControl, QMetaDataControl_iid)
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+
+#endif // QMETADATAPROVIDER_H
diff --git a/src/multimedia/base/qpaintervideosurface.cpp b/src/multimedia/base/qpaintervideosurface.cpp
new file mode 100644
index 0000000000..ed93fad8f3
--- /dev/null
+++ b/src/multimedia/base/qpaintervideosurface.cpp
@@ -0,0 +1,1574 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qpaintervideosurface_p.h"
+
+#include <qmath.h>
+
+#include <qpainter.h>
+#include <qvariant.h>
+#include <QtMultimedia/qvideosurfaceformat.h>
+
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+#include <qglshaderprogram.h>
+#endif
+
+#include <QtDebug>
+
+
+QT_BEGIN_NAMESPACE
+
+class QVideoSurfacePainter
+{
+public:
+ virtual ~QVideoSurfacePainter();
+
+ virtual QList<QVideoFrame::PixelFormat> supportedPixelFormats(
+ QAbstractVideoBuffer::HandleType handleType) const = 0;
+
+ virtual bool isFormatSupported(
+ const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar) const = 0;
+
+ virtual QAbstractVideoSurface::Error start(const QVideoSurfaceFormat &format) = 0;
+ virtual void stop() = 0;
+
+ virtual QAbstractVideoSurface::Error setCurrentFrame(const QVideoFrame &frame) = 0;
+
+ virtual QAbstractVideoSurface::Error paint(
+ const QRectF &target, QPainter *painter, const QRectF &source) = 0;
+
+ virtual void updateColors(int brightness, int contrast, int hue, int saturation) = 0;
+};
+
+QVideoSurfacePainter::~QVideoSurfacePainter()
+{
+}
+
+class QVideoSurfaceRasterPainter : public QVideoSurfacePainter
+{
+public:
+ QVideoSurfaceRasterPainter();
+
+ QList<QVideoFrame::PixelFormat> supportedPixelFormats(
+ QAbstractVideoBuffer::HandleType handleType) const;
+
+ bool isFormatSupported(
+ const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar) const;
+
+ QAbstractVideoSurface::Error start(const QVideoSurfaceFormat &format);
+ void stop();
+
+ QAbstractVideoSurface::Error setCurrentFrame(const QVideoFrame &frame);
+
+ QAbstractVideoSurface::Error paint(
+ const QRectF &target, QPainter *painter, const QRectF &source);
+
+ void updateColors(int brightness, int contrast, int hue, int saturation);
+
+private:
+ QList<QVideoFrame::PixelFormat> m_imagePixelFormats;
+ QVideoFrame m_frame;
+ QSize m_imageSize;
+ QImage::Format m_imageFormat;
+ QVideoSurfaceFormat::Direction m_scanLineDirection;
+};
+
+QVideoSurfaceRasterPainter::QVideoSurfaceRasterPainter()
+ : m_imageFormat(QImage::Format_Invalid)
+ , m_scanLineDirection(QVideoSurfaceFormat::TopToBottom)
+{
+ m_imagePixelFormats
+ << QVideoFrame::Format_RGB32
+#ifndef QT_OPENGL_ES // The raster formats should be a subset of the GL formats.
+ << QVideoFrame::Format_RGB24
+#endif
+ << QVideoFrame::Format_ARGB32
+ << QVideoFrame::Format_RGB565;
+}
+
+QList<QVideoFrame::PixelFormat> QVideoSurfaceRasterPainter::supportedPixelFormats(
+ QAbstractVideoBuffer::HandleType handleType) const
+{
+ return handleType == QAbstractVideoBuffer::NoHandle
+ ? m_imagePixelFormats
+ : QList<QVideoFrame::PixelFormat>();
+}
+
+bool QVideoSurfaceRasterPainter::isFormatSupported(
+ const QVideoSurfaceFormat &format, QVideoSurfaceFormat *) const
+{
+ return format.handleType() == QAbstractVideoBuffer::NoHandle
+ && m_imagePixelFormats.contains(format.pixelFormat())
+ && !format.frameSize().isEmpty();
+}
+
+QAbstractVideoSurface::Error QVideoSurfaceRasterPainter::start(const QVideoSurfaceFormat &format)
+{
+ m_frame = QVideoFrame();
+ m_imageFormat = QVideoFrame::imageFormatFromPixelFormat(format.pixelFormat());
+ m_imageSize = format.frameSize();
+ m_scanLineDirection = format.scanLineDirection();
+
+ return format.handleType() == QAbstractVideoBuffer::NoHandle
+ && m_imageFormat != QImage::Format_Invalid
+ && !m_imageSize.isEmpty()
+ ? QAbstractVideoSurface::NoError
+ : QAbstractVideoSurface::UnsupportedFormatError;
+}
+
+void QVideoSurfaceRasterPainter::stop()
+{
+ m_frame = QVideoFrame();
+}
+
+QAbstractVideoSurface::Error QVideoSurfaceRasterPainter::setCurrentFrame(const QVideoFrame &frame)
+{
+ m_frame = frame;
+
+ return QAbstractVideoSurface::NoError;
+}
+
+QAbstractVideoSurface::Error QVideoSurfaceRasterPainter::paint(
+ const QRectF &target, QPainter *painter, const QRectF &source)
+{
+ if (m_frame.map(QAbstractVideoBuffer::ReadOnly)) {
+ QImage image(
+ m_frame.bits(),
+ m_imageSize.width(),
+ m_imageSize.height(),
+ m_frame.bytesPerLine(),
+ m_imageFormat);
+
+ if (m_scanLineDirection == QVideoSurfaceFormat::BottomToTop) {
+ const QTransform oldTransform = painter->transform();
+
+ painter->scale(1, -1);
+ painter->translate(0, -target.bottom());
+ painter->drawImage(
+ QRectF(target.x(), 0, target.width(), target.height()), image, source);
+ painter->setTransform(oldTransform);
+ } else {
+ painter->drawImage(target, image, source);
+ }
+
+ m_frame.unmap();
+ } else if (m_frame.isValid()) {
+ return QAbstractVideoSurface::IncorrectFormatError;
+ } else {
+ painter->fillRect(target, Qt::black);
+ }
+ return QAbstractVideoSurface::NoError;
+}
+
+void QVideoSurfaceRasterPainter::updateColors(int, int, int, int)
+{
+}
+
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+
+#ifndef Q_WS_MAC
+# ifndef APIENTRYP
+# ifdef APIENTRY
+# define APIENTRYP APIENTRY *
+# else
+# define APIENTRY
+# define APIENTRYP *
+# endif
+# endif
+#else
+# define APIENTRY
+# define APIENTRYP *
+#endif
+
+#ifndef GL_TEXTURE0
+# define GL_TEXTURE0 0x84C0
+# define GL_TEXTURE1 0x84C1
+# define GL_TEXTURE2 0x84C2
+#endif
+#ifndef GL_PROGRAM_ERROR_STRING_ARB
+# define GL_PROGRAM_ERROR_STRING_ARB 0x8874
+#endif
+
+#ifndef GL_UNSIGNED_SHORT_5_6_5
+# define GL_UNSIGNED_SHORT_5_6_5 33635
+#endif
+
+class QVideoSurfaceGLPainter : public QVideoSurfacePainter
+{
+public:
+ QVideoSurfaceGLPainter(QGLContext *context);
+ ~QVideoSurfaceGLPainter();
+ QList<QVideoFrame::PixelFormat> supportedPixelFormats(
+ QAbstractVideoBuffer::HandleType handleType) const;
+
+ bool isFormatSupported(
+ const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar) const;
+
+ QAbstractVideoSurface::Error setCurrentFrame(const QVideoFrame &frame);
+
+ void updateColors(int brightness, int contrast, int hue, int saturation);
+
+protected:
+ void initRgbTextureInfo(GLenum internalFormat, GLuint format, GLenum type, const QSize &size);
+ void initYuv420PTextureInfo(const QSize &size);
+ void initYv12TextureInfo(const QSize &size);
+
+#ifndef QT_OPENGL_ES
+ typedef void (APIENTRY *_glActiveTexture) (GLenum);
+ _glActiveTexture glActiveTexture;
+#endif
+
+ QList<QVideoFrame::PixelFormat> m_imagePixelFormats;
+ QList<QVideoFrame::PixelFormat> m_glPixelFormats;
+ QMatrix4x4 m_colorMatrix;
+ QVideoFrame m_frame;
+
+ QGLContext *m_context;
+ QAbstractVideoBuffer::HandleType m_handleType;
+ QVideoSurfaceFormat::Direction m_scanLineDirection;
+ GLenum m_textureFormat;
+ GLuint m_textureInternalFormat;
+ GLenum m_textureType;
+ int m_textureCount;
+ GLuint m_textureIds[3];
+ int m_textureWidths[3];
+ int m_textureHeights[3];
+ int m_textureOffsets[3];
+ bool m_yuv;
+};
+
+QVideoSurfaceGLPainter::QVideoSurfaceGLPainter(QGLContext *context)
+ : m_context(context)
+ , m_handleType(QAbstractVideoBuffer::NoHandle)
+ , m_scanLineDirection(QVideoSurfaceFormat::TopToBottom)
+ , m_textureFormat(0)
+ , m_textureInternalFormat(0)
+ , m_textureType(0)
+ , m_textureCount(0)
+ , m_yuv(false)
+{
+#ifndef QT_OPENGL_ES
+ glActiveTexture = (_glActiveTexture)m_context->getProcAddress(QLatin1String("glActiveTexture"));
+#endif
+}
+
+QVideoSurfaceGLPainter::~QVideoSurfaceGLPainter()
+{
+}
+
+QList<QVideoFrame::PixelFormat> QVideoSurfaceGLPainter::supportedPixelFormats(
+ QAbstractVideoBuffer::HandleType handleType) const
+{
+ switch (handleType) {
+ case QAbstractVideoBuffer::NoHandle:
+ return m_imagePixelFormats;
+ case QAbstractVideoBuffer::GLTextureHandle:
+ return m_glPixelFormats;
+ default:
+ return QList<QVideoFrame::PixelFormat>();
+ }
+}
+
+bool QVideoSurfaceGLPainter::isFormatSupported(
+ const QVideoSurfaceFormat &format, QVideoSurfaceFormat *) const
+{
+ if (format.frameSize().isEmpty()) {
+ return false;
+ } else {
+ switch (format.handleType()) {
+ case QAbstractVideoBuffer::NoHandle:
+ return m_imagePixelFormats.contains(format.pixelFormat());
+ case QAbstractVideoBuffer::GLTextureHandle:
+ return m_glPixelFormats.contains(format.pixelFormat());
+ default:
+ return false;
+ }
+ }
+}
+
+QAbstractVideoSurface::Error QVideoSurfaceGLPainter::setCurrentFrame(const QVideoFrame &frame)
+{
+ m_frame = frame;
+
+ if (m_handleType == QAbstractVideoBuffer::GLTextureHandle) {
+ m_textureIds[0] = frame.handle().toInt();
+ } else if (m_frame.map(QAbstractVideoBuffer::ReadOnly)) {
+ m_context->makeCurrent();
+
+ for (int i = 0; i < m_textureCount; ++i) {
+ glBindTexture(GL_TEXTURE_2D, m_textureIds[i]);
+ glTexImage2D(
+ GL_TEXTURE_2D,
+ 0,
+ m_textureInternalFormat,
+ m_textureWidths[i],
+ m_textureHeights[i],
+ 0,
+ m_textureFormat,
+ m_textureType,
+ m_frame.bits() + m_textureOffsets[i]);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+ }
+ m_frame.unmap();
+ } else if (m_frame.isValid()) {
+ return QAbstractVideoSurface::IncorrectFormatError;
+ }
+
+ return QAbstractVideoSurface::NoError;
+}
+
+void QVideoSurfaceGLPainter::updateColors(int brightness, int contrast, int hue, int saturation)
+{
+ const qreal b = brightness / 200.0;
+ const qreal c = contrast / 100.0 + 1.0;
+ const qreal h = hue / 100.0;
+ const qreal s = saturation / 100.0 + 1.0;
+
+ const qreal cosH = qCos(M_PI * h);
+ const qreal sinH = qSin(M_PI * h);
+
+ const qreal h11 = 0.787 * cosH - 0.213 * sinH + 0.213;
+ const qreal h21 = -0.213 * cosH + 0.143 * sinH + 0.213;
+ const qreal h31 = -0.213 * cosH - 0.787 * sinH + 0.213;
+
+ const qreal h12 = -0.715 * cosH - 0.715 * sinH + 0.715;
+ const qreal h22 = 0.285 * cosH + 0.140 * sinH + 0.715;
+ const qreal h32 = -0.715 * cosH + 0.715 * sinH + 0.715;
+
+ const qreal h13 = -0.072 * cosH + 0.928 * sinH + 0.072;
+ const qreal h23 = -0.072 * cosH - 0.283 * sinH + 0.072;
+ const qreal h33 = 0.928 * cosH + 0.072 * sinH + 0.072;
+
+ const qreal sr = (1.0 - s) * 0.3086;
+ const qreal sg = (1.0 - s) * 0.6094;
+ const qreal sb = (1.0 - s) * 0.0820;
+
+ const qreal sr_s = sr + s;
+ const qreal sg_s = sg + s;
+ const qreal sb_s = sr + s;
+
+ const float m4 = (s + sr + sg + sb) * (0.5 - 0.5 * c + b);
+
+ m_colorMatrix(0, 0) = c * (sr_s * h11 + sg * h21 + sb * h31);
+ m_colorMatrix(0, 1) = c * (sr_s * h12 + sg * h22 + sb * h32);
+ m_colorMatrix(0, 2) = c * (sr_s * h13 + sg * h23 + sb * h33);
+ m_colorMatrix(0, 3) = m4;
+
+ m_colorMatrix(1, 0) = c * (sr * h11 + sg_s * h21 + sb * h31);
+ m_colorMatrix(1, 1) = c * (sr * h12 + sg_s * h22 + sb * h32);
+ m_colorMatrix(1, 2) = c * (sr * h13 + sg_s * h23 + sb * h33);
+ m_colorMatrix(1, 3) = m4;
+
+ m_colorMatrix(2, 0) = c * (sr * h11 + sg * h21 + sb_s * h31);
+ m_colorMatrix(2, 1) = c * (sr * h12 + sg * h22 + sb_s * h32);
+ m_colorMatrix(2, 2) = c * (sr * h13 + sg * h23 + sb_s * h33);
+ m_colorMatrix(2, 3) = m4;
+
+ m_colorMatrix(3, 0) = 0.0;
+ m_colorMatrix(3, 1) = 0.0;
+ m_colorMatrix(3, 2) = 0.0;
+ m_colorMatrix(3, 3) = 1.0;
+
+ if (m_yuv) {
+ m_colorMatrix = m_colorMatrix * QMatrix4x4(
+ 1.0, 0.000, 1.140, -0.5700,
+ 1.0, -0.394, -0.581, 0.4875,
+ 1.0, 2.028, 0.000, -1.0140,
+ 0.0, 0.000, 0.000, 1.0000);
+ }
+}
+
+void QVideoSurfaceGLPainter::initRgbTextureInfo(
+ GLenum internalFormat, GLuint format, GLenum type, const QSize &size)
+{
+ m_yuv = false;
+ m_textureInternalFormat = internalFormat;
+ m_textureFormat = format;
+ m_textureType = type;
+ m_textureCount = 1;
+ m_textureWidths[0] = size.width();
+ m_textureHeights[0] = size.height();
+ m_textureOffsets[0] = 0;
+}
+
+void QVideoSurfaceGLPainter::initYuv420PTextureInfo(const QSize &size)
+{
+ int w = (size.width() + 3) & ~3;
+ int w2 = (size.width()/2 + 3) & ~3;
+
+ m_yuv = true;
+ m_textureInternalFormat = GL_LUMINANCE;
+ m_textureFormat = GL_LUMINANCE;
+ m_textureType = GL_UNSIGNED_BYTE;
+ m_textureCount = 3;
+ m_textureWidths[0] = size.width();
+ m_textureHeights[0] = size.height();
+ m_textureOffsets[0] = 0;
+ m_textureWidths[1] = size.width() / 2;
+ m_textureHeights[1] = size.height() / 2;
+ m_textureOffsets[1] = w * size.height();
+ m_textureWidths[2] = size.width() / 2;
+ m_textureHeights[2] = size.height() / 2;
+ m_textureOffsets[2] = w * size.height() + w2 * (size.height() / 2);
+}
+
+void QVideoSurfaceGLPainter::initYv12TextureInfo(const QSize &size)
+{
+ int w = (size.width() + 3) & ~3;
+ int w2 = (size.width()/2 + 3) & ~3;
+
+ m_yuv = true;
+ m_textureInternalFormat = GL_LUMINANCE;
+ m_textureFormat = GL_LUMINANCE;
+ m_textureType = GL_UNSIGNED_BYTE;
+ m_textureCount = 3;
+ m_textureWidths[0] = size.width();
+ m_textureHeights[0] = size.height();
+ m_textureOffsets[0] = 0;
+ m_textureWidths[1] = size.width() / 2;
+ m_textureHeights[1] = size.height() / 2;
+ m_textureOffsets[1] = w * size.height() + w2 * (size.height() / 2);
+ m_textureWidths[2] = size.width() / 2;
+ m_textureHeights[2] = size.height() / 2;
+ m_textureOffsets[2] = w * size.height();
+}
+
+#ifndef QT_OPENGL_ES
+
+# ifndef GL_FRAGMENT_PROGRAM_ARB
+# define GL_FRAGMENT_PROGRAM_ARB 0x8804
+# define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
+# endif
+
+// Paints an RGB32 frame
+static const char *qt_arbfp_xrgbShaderProgram =
+ "!!ARBfp1.0\n"
+ "PARAM matrix[4] = { program.local[0..2],"
+ "{ 0.0, 0.0, 0.0, 1.0 } };\n"
+ "TEMP xrgb;\n"
+ "TEX xrgb.xyz, fragment.texcoord[0], texture[0], 2D;\n"
+ "MOV xrgb.w, matrix[3].w;\n"
+ "DP4 result.color.x, xrgb.zyxw, matrix[0];\n"
+ "DP4 result.color.y, xrgb.zyxw, matrix[1];\n"
+ "DP4 result.color.z, xrgb.zyxw, matrix[2];\n"
+ "END";
+
+// Paints an ARGB frame.
+static const char *qt_arbfp_argbShaderProgram =
+ "!!ARBfp1.0\n"
+ "PARAM matrix[4] = { program.local[0..2],"
+ "{ 0.0, 0.0, 0.0, 1.0 } };\n"
+ "TEMP argb;\n"
+ "TEX argb, fragment.texcoord[0], texture[0], 2D;\n"
+ "MOV argb.w, matrix[3].w;\n"
+ "DP4 result.color.x, argb.zyxw, matrix[0];\n"
+ "DP4 result.color.y, argb.zyxw, matrix[1];\n"
+ "DP4 result.color.z, argb.zyxw, matrix[2];\n"
+ "TEX result.color.w, fragment.texcoord[0], texture, 2D;\n"
+ "END";
+
+// Paints an RGB(A) frame.
+static const char *qt_arbfp_rgbShaderProgram =
+ "!!ARBfp1.0\n"
+ "PARAM matrix[4] = { program.local[0..2],"
+ "{ 0.0, 0.0, 0.0, 1.0 } };\n"
+ "TEMP rgb;\n"
+ "TEX rgb, fragment.texcoord[0], texture[0], 2D;\n"
+ "MOV rgb.w, matrix[3].w;\n"
+ "DP4 result.color.x, rgb, matrix[0];\n"
+ "DP4 result.color.y, rgb, matrix[1];\n"
+ "DP4 result.color.z, rgb, matrix[2];\n"
+ "TEX result.color.w, fragment.texcoord[0], texture, 2D;\n"
+ "END";
+
+// Paints a YUV420P or YV12 frame.
+static const char *qt_arbfp_yuvPlanarShaderProgram =
+ "!!ARBfp1.0\n"
+ "PARAM matrix[4] = { program.local[0..2],"
+ "{ 0.0, 0.0, 0.0, 1.0 } };\n"
+ "TEMP yuv;\n"
+ "TEX yuv.x, fragment.texcoord[0], texture[0], 2D;\n"
+ "TEX yuv.y, fragment.texcoord[0], texture[1], 2D;\n"
+ "TEX yuv.z, fragment.texcoord[0], texture[2], 2D;\n"
+ "MOV yuv.w, matrix[3].w;\n"
+ "DP4 result.color.x, yuv, matrix[0];\n"
+ "DP4 result.color.y, yuv, matrix[1];\n"
+ "DP4 result.color.z, yuv, matrix[2];\n"
+ "END";
+
+// Paints a YUV444 frame.
+static const char *qt_arbfp_xyuvShaderProgram =
+ "!!ARBfp1.0\n"
+ "PARAM matrix[4] = { program.local[0..2],"
+ "{ 0.0, 0.0, 0.0, 1.0 } };\n"
+ "TEMP ayuv;\n"
+ "TEX ayuv, fragment.texcoord[0], texture[0], 2D;\n"
+ "MOV ayuv.x, matrix[3].w;\n"
+ "DP4 result.color.x, ayuv.yzwx, matrix[0];\n"
+ "DP4 result.color.y, ayuv.yzwx, matrix[1];\n"
+ "DP4 result.color.z, ayuv.yzwx, matrix[2];\n"
+ "END";
+
+// Paints a AYUV444 frame.
+static const char *qt_arbfp_ayuvShaderProgram =
+ "!!ARBfp1.0\n"
+ "PARAM matrix[4] = { program.local[0..2],"
+ "{ 0.0, 0.0, 0.0, 1.0 } };\n"
+ "TEMP ayuv;\n"
+ "TEX ayuv, fragment.texcoord[0], texture[0], 2D;\n"
+ "MOV ayuv.x, matrix[3].w;\n"
+ "DP4 result.color.x, ayuv.yzwx, matrix[0];\n"
+ "DP4 result.color.y, ayuv.yzwx, matrix[1];\n"
+ "DP4 result.color.z, ayuv.yzwx, matrix[2];\n"
+ "TEX result.color.w, fragment.texcoord[0], texture, 2D;\n"
+ "END";
+
+class QVideoSurfaceArbFpPainter : public QVideoSurfaceGLPainter
+{
+public:
+ QVideoSurfaceArbFpPainter(QGLContext *context);
+
+ QAbstractVideoSurface::Error start(const QVideoSurfaceFormat &format);
+ void stop();
+
+ QAbstractVideoSurface::Error paint(
+ const QRectF &target, QPainter *painter, const QRectF &source);
+
+private:
+ typedef void (APIENTRY *_glProgramStringARB) (GLenum, GLenum, GLsizei, const GLvoid *);
+ typedef void (APIENTRY *_glBindProgramARB) (GLenum, GLuint);
+ typedef void (APIENTRY *_glDeleteProgramsARB) (GLsizei, const GLuint *);
+ typedef void (APIENTRY *_glGenProgramsARB) (GLsizei, GLuint *);
+ typedef void (APIENTRY *_glProgramLocalParameter4fARB) (
+ GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
+ typedef void (APIENTRY *_glActiveTexture) (GLenum);
+
+ _glProgramStringARB glProgramStringARB;
+ _glBindProgramARB glBindProgramARB;
+ _glDeleteProgramsARB glDeleteProgramsARB;
+ _glGenProgramsARB glGenProgramsARB;
+ _glProgramLocalParameter4fARB glProgramLocalParameter4fARB;
+
+ GLuint m_programId;
+ QSize m_frameSize;
+};
+
+QVideoSurfaceArbFpPainter::QVideoSurfaceArbFpPainter(QGLContext *context)
+ : QVideoSurfaceGLPainter(context)
+ , m_programId(0)
+{
+ glProgramStringARB = (_glProgramStringARB) m_context->getProcAddress(
+ QLatin1String("glProgramStringARB"));
+ glBindProgramARB = (_glBindProgramARB) m_context->getProcAddress(
+ QLatin1String("glBindProgramARB"));
+ glDeleteProgramsARB = (_glDeleteProgramsARB) m_context->getProcAddress(
+ QLatin1String("glDeleteProgramsARB"));
+ glGenProgramsARB = (_glGenProgramsARB) m_context->getProcAddress(
+ QLatin1String("glGenProgramsARB"));
+ glProgramLocalParameter4fARB = (_glProgramLocalParameter4fARB) m_context->getProcAddress(
+ QLatin1String("glProgramLocalParameter4fARB"));
+
+ m_imagePixelFormats
+ << QVideoFrame::Format_RGB32
+ << QVideoFrame::Format_BGR32
+ << QVideoFrame::Format_ARGB32
+ << QVideoFrame::Format_RGB24
+ << QVideoFrame::Format_BGR24
+ << QVideoFrame::Format_RGB565
+ << QVideoFrame::Format_AYUV444
+ << QVideoFrame::Format_YUV444
+ << QVideoFrame::Format_YV12
+ << QVideoFrame::Format_YUV420P;
+ m_glPixelFormats
+ << QVideoFrame::Format_RGB32
+ << QVideoFrame::Format_ARGB32;
+}
+
+QAbstractVideoSurface::Error QVideoSurfaceArbFpPainter::start(const QVideoSurfaceFormat &format)
+{
+ Q_ASSERT(m_textureCount == 0);
+
+ QAbstractVideoSurface::Error error = QAbstractVideoSurface::NoError;
+
+ m_context->makeCurrent();
+
+ const char *program = 0;
+
+ if (format.handleType() == QAbstractVideoBuffer::NoHandle) {
+ switch (format.pixelFormat()) {
+ case QVideoFrame::Format_RGB32:
+ initRgbTextureInfo(GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
+ program = qt_arbfp_xrgbShaderProgram;
+ break;
+ case QVideoFrame::Format_BGR32:
+ initRgbTextureInfo(GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
+ program = qt_arbfp_rgbShaderProgram;
+ break;
+ case QVideoFrame::Format_ARGB32:
+ initRgbTextureInfo(GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
+ program = qt_arbfp_argbShaderProgram;
+ break;
+ case QVideoFrame::Format_RGB24:
+ initRgbTextureInfo(GL_RGB8, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
+ program = qt_arbfp_rgbShaderProgram;
+ break;
+ case QVideoFrame::Format_BGR24:
+ initRgbTextureInfo(GL_RGB8, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
+ program = qt_arbfp_xrgbShaderProgram;
+ break;
+ case QVideoFrame::Format_RGB565:
+ initRgbTextureInfo(GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, format.frameSize());
+ program = qt_arbfp_rgbShaderProgram;
+ break;
+ case QVideoFrame::Format_YUV444:
+ initRgbTextureInfo(GL_RGB, GL_RGB, GL_UNSIGNED_BYTE, format.frameSize());
+ program = qt_arbfp_xyuvShaderProgram;
+ m_yuv = true;
+ break;
+ case QVideoFrame::Format_AYUV444:
+ initRgbTextureInfo(GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
+ program = qt_arbfp_ayuvShaderProgram;
+ m_yuv = true;
+ break;
+ case QVideoFrame::Format_YV12:
+ initYv12TextureInfo(format.frameSize());
+ program = qt_arbfp_yuvPlanarShaderProgram;
+ break;
+ case QVideoFrame::Format_YUV420P:
+ initYuv420PTextureInfo(format.frameSize());
+ program = qt_arbfp_yuvPlanarShaderProgram;
+ break;
+ default:
+ break;
+ }
+ } else if (format.handleType() == QAbstractVideoBuffer::GLTextureHandle) {
+ switch (format.pixelFormat()) {
+ case QVideoFrame::Format_RGB32:
+ case QVideoFrame::Format_ARGB32:
+ m_yuv = false;
+ m_textureCount = 1;
+ program = qt_arbfp_rgbShaderProgram;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (!program) {
+ error = QAbstractVideoSurface::UnsupportedFormatError;
+ } else {
+ glGenProgramsARB(1, &m_programId);
+
+ GLenum glError = glGetError();
+ if (glError != GL_NO_ERROR) {
+ qWarning("QPainterVideoSurface: ARBfb Shader allocation error %x", int(glError));
+ m_textureCount = 0;
+ m_programId = 0;
+
+ error = QAbstractVideoSurface::ResourceError;
+ } else {
+ glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, m_programId);
+ glProgramStringARB(
+ GL_FRAGMENT_PROGRAM_ARB,
+ GL_PROGRAM_FORMAT_ASCII_ARB,
+ qstrlen(program),
+ reinterpret_cast<const GLvoid *>(program));
+
+ if ((glError = glGetError()) != GL_NO_ERROR) {
+ const GLubyte* errorString = glGetString(GL_PROGRAM_ERROR_STRING_ARB);
+
+ qWarning("QPainterVideoSurface: ARBfp Shader compile error %x, %s",
+ int(glError),
+ reinterpret_cast<const char *>(errorString));
+ glDeleteProgramsARB(1, &m_programId);
+
+ m_textureCount = 0;
+ m_programId = 0;
+
+ error = QAbstractVideoSurface::ResourceError;
+ } else {
+ m_handleType = format.handleType();
+ m_scanLineDirection = format.scanLineDirection();
+ m_frameSize = format.frameSize();
+
+ if (m_handleType == QAbstractVideoBuffer::NoHandle)
+ glGenTextures(m_textureCount, m_textureIds);
+ }
+ }
+ }
+
+ return error;
+}
+
+void QVideoSurfaceArbFpPainter::stop()
+{
+ m_context->makeCurrent();
+
+ if (m_handleType != QAbstractVideoBuffer::GLTextureHandle)
+ glDeleteTextures(m_textureCount, m_textureIds);
+ glDeleteProgramsARB(1, &m_programId);
+
+ m_textureCount = 0;
+ m_programId = 0;
+ m_handleType = QAbstractVideoBuffer::NoHandle;
+}
+
+QAbstractVideoSurface::Error QVideoSurfaceArbFpPainter::paint(
+ const QRectF &target, QPainter *painter, const QRectF &source)
+{
+ if (m_frame.isValid()) {
+ painter->beginNativePainting();
+
+ glEnable(GL_STENCIL_TEST);
+ glEnable(GL_SCISSOR_TEST);
+
+ const float txLeft = source.left() / m_frameSize.width();
+ const float txRight = source.right() / m_frameSize.width();
+ const float txTop = m_scanLineDirection == QVideoSurfaceFormat::TopToBottom
+ ? source.top() / m_frameSize.height()
+ : source.bottom() / m_frameSize.height();
+ const float txBottom = m_scanLineDirection == QVideoSurfaceFormat::TopToBottom
+ ? source.bottom() / m_frameSize.height()
+ : source.top() / m_frameSize.height();
+
+
+ const float tx_array[] =
+ {
+ txLeft , txBottom,
+ txRight, txBottom,
+ txLeft , txTop,
+ txRight, txTop
+ };
+ const float v_array[] =
+ {
+ target.left() , target.bottom() + 1,
+ target.right() + 1, target.bottom() + 1,
+ target.left() , target.top(),
+ target.right() + 1, target.top()
+ };
+
+ glEnable(GL_FRAGMENT_PROGRAM_ARB);
+ glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, m_programId);
+
+ glProgramLocalParameter4fARB(
+ GL_FRAGMENT_PROGRAM_ARB,
+ 0,
+ m_colorMatrix(0, 0),
+ m_colorMatrix(0, 1),
+ m_colorMatrix(0, 2),
+ m_colorMatrix(0, 3));
+ glProgramLocalParameter4fARB(
+ GL_FRAGMENT_PROGRAM_ARB,
+ 1,
+ m_colorMatrix(1, 0),
+ m_colorMatrix(1, 1),
+ m_colorMatrix(1, 2),
+ m_colorMatrix(1, 3));
+ glProgramLocalParameter4fARB(
+ GL_FRAGMENT_PROGRAM_ARB,
+ 2,
+ m_colorMatrix(2, 0),
+ m_colorMatrix(2, 1),
+ m_colorMatrix(2, 2),
+ m_colorMatrix(2, 3));
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, m_textureIds[0]);
+
+ if (m_textureCount == 3) {
+ glActiveTexture(GL_TEXTURE1);
+ glBindTexture(GL_TEXTURE_2D, m_textureIds[1]);
+ glActiveTexture(GL_TEXTURE2);
+ glBindTexture(GL_TEXTURE_2D, m_textureIds[2]);
+ glActiveTexture(GL_TEXTURE0);
+ }
+
+ glVertexPointer(2, GL_FLOAT, 0, v_array);
+ glTexCoordPointer(2, GL_FLOAT, 0, tx_array);
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+
+ glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+ glDisableClientState(GL_VERTEX_ARRAY);
+ glDisable(GL_FRAGMENT_PROGRAM_ARB);
+
+ glDisable(GL_STENCIL_TEST);
+ glDisable(GL_SCISSOR_TEST);
+
+ painter->endNativePainting();
+ }
+ return QAbstractVideoSurface::NoError;
+}
+
+#endif
+
+static const char *qt_glsl_vertexShaderProgram =
+ "attribute highp vec4 vertexCoordArray;\n"
+ "attribute highp vec2 textureCoordArray;\n"
+ "uniform highp mat4 positionMatrix;\n"
+ "varying highp vec2 textureCoord;\n"
+ "void main(void)\n"
+ "{\n"
+ " gl_Position = positionMatrix * vertexCoordArray;\n"
+ " textureCoord = textureCoordArray;\n"
+ "}\n";
+
+// Paints an RGB32 frame
+static const char *qt_glsl_xrgbShaderProgram =
+ "uniform sampler2D texRgb;\n"
+ "uniform mediump mat4 colorMatrix;\n"
+ "varying highp vec2 textureCoord;\n"
+ "void main(void)\n"
+ "{\n"
+ " highp vec4 color = vec4(texture2D(texRgb, textureCoord.st).bgr, 1.0);\n"
+ " gl_FragColor = colorMatrix * color;\n"
+ "}\n";
+
+// Paints an ARGB frame.
+static const char *qt_glsl_argbShaderProgram =
+ "uniform sampler2D texRgb;\n"
+ "uniform mediump mat4 colorMatrix;\n"
+ "varying highp vec2 textureCoord;\n"
+ "void main(void)\n"
+ "{\n"
+ " highp vec4 color = vec4(texture2D(texRgb, textureCoord.st).bgr, 1.0);\n"
+ " color = colorMatrix * color;\n"
+ " gl_FragColor = vec4(color.rgb, texture2D(texRgb, textureCoord.st).a);\n"
+ "}\n";
+
+// Paints an RGB(A) frame.
+static const char *qt_glsl_rgbShaderProgram =
+ "uniform sampler2D texRgb;\n"
+ "uniform mediump mat4 colorMatrix;\n"
+ "varying highp vec2 textureCoord;\n"
+ "void main(void)\n"
+ "{\n"
+ " highp vec4 color = vec4(texture2D(texRgb, textureCoord.st).rgb, 1.0);\n"
+ " color = colorMatrix * color;\n"
+ " gl_FragColor = vec4(color.rgb, texture2D(texRgb, textureCoord.st).a);\n"
+ "}\n";
+
+// Paints a YUV420P or YV12 frame.
+static const char *qt_glsl_yuvPlanarShaderProgram =
+ "uniform sampler2D texY;\n"
+ "uniform sampler2D texU;\n"
+ "uniform sampler2D texV;\n"
+ "uniform mediump mat4 colorMatrix;\n"
+ "varying highp vec2 textureCoord;\n"
+ "void main(void)\n"
+ "{\n"
+ " highp vec4 color = vec4(\n"
+ " texture2D(texY, textureCoord.st).r,\n"
+ " texture2D(texU, textureCoord.st).r,\n"
+ " texture2D(texV, textureCoord.st).r,\n"
+ " 1.0);\n"
+ " gl_FragColor = colorMatrix * color;\n"
+ "}\n";
+
+// Paints a YUV444 frame.
+static const char *qt_glsl_xyuvShaderProgram =
+ "uniform sampler2D texRgb;\n"
+ "uniform mediump mat4 colorMatrix;\n"
+ "varying highp vec2 textureCoord;\n"
+ "void main(void)\n"
+ "{\n"
+ " highp vec4 color = vec4(texture2D(texRgb, textureCoord.st).gba, 1.0);\n"
+ " gl_FragColor = colorMatrix * color;\n"
+ "}\n";
+
+// Paints a AYUV444 frame.
+static const char *qt_glsl_ayuvShaderProgram =
+ "uniform sampler2D texRgb;\n"
+ "uniform mediump mat4 colorMatrix;\n"
+ "varying highp vec2 textureCoord;\n"
+ "void main(void)\n"
+ "{\n"
+ " highp vec4 color = vec4(texture2D(texRgb, textureCoord.st).gba, 1.0);\n"
+ " color = colorMatrix * color;\n"
+ " gl_FragColor = vec4(color.rgb, texture2D(texRgb, textureCoord.st).r);\n"
+ "}\n";
+
+class QVideoSurfaceGlslPainter : public QVideoSurfaceGLPainter
+{
+public:
+ QVideoSurfaceGlslPainter(QGLContext *context);
+
+ QAbstractVideoSurface::Error start(const QVideoSurfaceFormat &format);
+ void stop();
+
+ QAbstractVideoSurface::Error paint(
+ const QRectF &target, QPainter *painter, const QRectF &source);
+
+private:
+ QGLShaderProgram m_program;
+ QSize m_frameSize;
+};
+
+QVideoSurfaceGlslPainter::QVideoSurfaceGlslPainter(QGLContext *context)
+ : QVideoSurfaceGLPainter(context)
+ , m_program(context)
+{
+ m_imagePixelFormats
+ << QVideoFrame::Format_RGB32
+ << QVideoFrame::Format_BGR32
+ << QVideoFrame::Format_ARGB32
+#ifndef QT_OPENGL_ES
+ << QVideoFrame::Format_RGB24
+ << QVideoFrame::Format_BGR24
+#endif
+ << QVideoFrame::Format_RGB565
+ << QVideoFrame::Format_YUV444
+ << QVideoFrame::Format_AYUV444
+ << QVideoFrame::Format_YV12
+ << QVideoFrame::Format_YUV420P;
+ m_glPixelFormats
+ << QVideoFrame::Format_RGB32
+ << QVideoFrame::Format_ARGB32;
+}
+
+QAbstractVideoSurface::Error QVideoSurfaceGlslPainter::start(const QVideoSurfaceFormat &format)
+{
+ Q_ASSERT(m_textureCount == 0);
+
+ QAbstractVideoSurface::Error error = QAbstractVideoSurface::NoError;
+
+ m_context->makeCurrent();
+
+ const char *fragmentProgram = 0;
+
+ if (format.handleType() == QAbstractVideoBuffer::NoHandle) {
+ switch (format.pixelFormat()) {
+ case QVideoFrame::Format_RGB32:
+ initRgbTextureInfo(GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
+ fragmentProgram = qt_glsl_xrgbShaderProgram;
+ break;
+ case QVideoFrame::Format_BGR32:
+ initRgbTextureInfo(GL_RGB, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
+ fragmentProgram = qt_glsl_rgbShaderProgram;
+ break;
+ case QVideoFrame::Format_ARGB32:
+ initRgbTextureInfo(GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
+ fragmentProgram = qt_glsl_argbShaderProgram;
+ break;
+#ifndef QT_OPENGL_ES
+ case QVideoFrame::Format_RGB24:
+ initRgbTextureInfo(GL_RGB8, GL_RGB, GL_UNSIGNED_BYTE, format.frameSize());
+ fragmentProgram = qt_glsl_rgbShaderProgram;
+ break;
+ case QVideoFrame::Format_BGR24:
+ initRgbTextureInfo(GL_RGB8, GL_RGB, GL_UNSIGNED_BYTE, format.frameSize());
+ fragmentProgram = qt_glsl_argbShaderProgram;
+ break;
+#endif
+ case QVideoFrame::Format_RGB565:
+ initRgbTextureInfo(GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, format.frameSize());
+ fragmentProgram = qt_glsl_rgbShaderProgram;
+ break;
+ case QVideoFrame::Format_YUV444:
+ initRgbTextureInfo(GL_RGB, GL_RGB, GL_UNSIGNED_BYTE, format.frameSize());
+ fragmentProgram = qt_glsl_xyuvShaderProgram;
+ m_yuv = true;
+ break;
+ case QVideoFrame::Format_AYUV444:
+ initRgbTextureInfo(GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
+ fragmentProgram = qt_glsl_ayuvShaderProgram;
+ m_yuv = true;
+ break;
+ case QVideoFrame::Format_YV12:
+ initYv12TextureInfo(format.frameSize());
+ fragmentProgram = qt_glsl_yuvPlanarShaderProgram;
+ break;
+ case QVideoFrame::Format_YUV420P:
+ initYuv420PTextureInfo(format.frameSize());
+ fragmentProgram = qt_glsl_yuvPlanarShaderProgram;
+ break;
+ default:
+ break;
+ }
+ } else if (format.handleType() == QAbstractVideoBuffer::GLTextureHandle) {
+ switch (format.pixelFormat()) {
+ case QVideoFrame::Format_RGB32:
+ case QVideoFrame::Format_ARGB32:
+ m_yuv = false;
+ m_textureCount = 1;
+ fragmentProgram = qt_glsl_rgbShaderProgram;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (!fragmentProgram) {
+ error = QAbstractVideoSurface::UnsupportedFormatError;
+ } else if (!m_program.addShaderFromSourceCode(QGLShader::Vertex, qt_glsl_vertexShaderProgram)) {
+ qWarning("QPainterVideoSurface: Vertex shader compile error %s",
+ qPrintable(m_program.log()));
+ error = QAbstractVideoSurface::ResourceError;
+ } else if (!m_program.addShaderFromSourceCode(QGLShader::Fragment, fragmentProgram)) {
+ qWarning("QPainterVideoSurface: Shader compile error %s", qPrintable(m_program.log()));
+ error = QAbstractVideoSurface::ResourceError;
+ m_program.removeAllShaders();
+ } else if(!m_program.link()) {
+ qWarning("QPainterVideoSurface: Shader link error %s", qPrintable(m_program.log()));
+ m_program.removeAllShaders();
+ error = QAbstractVideoSurface::ResourceError;
+ } else {
+ m_handleType = format.handleType();
+ m_scanLineDirection = format.scanLineDirection();
+ m_frameSize = format.frameSize();
+
+ if (m_handleType == QAbstractVideoBuffer::NoHandle)
+ glGenTextures(m_textureCount, m_textureIds);
+ }
+
+ return error;
+}
+
+void QVideoSurfaceGlslPainter::stop()
+{
+ m_context->makeCurrent();
+
+ if (m_handleType != QAbstractVideoBuffer::GLTextureHandle)
+ glDeleteTextures(m_textureCount, m_textureIds);
+ m_program.removeAllShaders();
+
+ m_textureCount = 0;
+ m_handleType = QAbstractVideoBuffer::NoHandle;
+}
+
+QAbstractVideoSurface::Error QVideoSurfaceGlslPainter::paint(
+ const QRectF &target, QPainter *painter, const QRectF &source)
+{
+ if (m_frame.isValid()) {
+ painter->beginNativePainting();
+
+ glEnable(GL_STENCIL_TEST);
+ glEnable(GL_SCISSOR_TEST);
+
+ const int width = QGLContext::currentContext()->device()->width();
+ const int height = QGLContext::currentContext()->device()->height();
+
+ const QTransform transform = painter->deviceTransform();
+
+ const GLfloat wfactor = 2.0 / width;
+ const GLfloat hfactor = -2.0 / height;
+
+ const GLfloat positionMatrix[4][4] =
+ {
+ {
+ /*(0,0)*/ wfactor * transform.m11() - transform.m13(),
+ /*(0,1)*/ hfactor * transform.m12() + transform.m13(),
+ /*(0,2)*/ 0.0,
+ /*(0,3)*/ transform.m13()
+ }, {
+ /*(1,0)*/ wfactor * transform.m21() - transform.m23(),
+ /*(1,1)*/ hfactor * transform.m22() + transform.m23(),
+ /*(1,2)*/ 0.0,
+ /*(1,3)*/ transform.m23()
+ }, {
+ /*(2,0)*/ 0.0,
+ /*(2,1)*/ 0.0,
+ /*(2,2)*/ -1.0,
+ /*(2,3)*/ 0.0
+ }, {
+ /*(3,0)*/ wfactor * transform.dx() - transform.m33(),
+ /*(3,1)*/ hfactor * transform.dy() + transform.m33(),
+ /*(3,2)*/ 0.0,
+ /*(3,3)*/ transform.m33()
+ }
+ };
+
+ const GLfloat vertexCoordArray[] =
+ {
+ target.left() , target.bottom() + 1,
+ target.right() + 1, target.bottom() + 1,
+ target.left() , target.top(),
+ target.right() + 1, target.top()
+ };
+
+ const GLfloat txLeft = source.left() / m_frameSize.width();
+ const GLfloat txRight = source.right() / m_frameSize.width();
+ const GLfloat txTop = m_scanLineDirection == QVideoSurfaceFormat::TopToBottom
+ ? source.top() / m_frameSize.height()
+ : source.bottom() / m_frameSize.height();
+ const GLfloat txBottom = m_scanLineDirection == QVideoSurfaceFormat::TopToBottom
+ ? source.bottom() / m_frameSize.height()
+ : source.top() / m_frameSize.height();
+
+ const GLfloat textureCoordArray[] =
+ {
+ txLeft , txBottom,
+ txRight, txBottom,
+ txLeft , txTop,
+ txRight, txTop
+ };
+
+ m_program.bind();
+
+ m_program.enableAttributeArray("vertexCoordArray");
+ m_program.enableAttributeArray("textureCoordArray");
+ m_program.setAttributeArray("vertexCoordArray", vertexCoordArray, 2);
+ m_program.setAttributeArray("textureCoordArray", textureCoordArray, 2);
+ m_program.setUniformValue("positionMatrix", positionMatrix);
+
+ if (m_textureCount == 3) {
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, m_textureIds[0]);
+ glActiveTexture(GL_TEXTURE1);
+ glBindTexture(GL_TEXTURE_2D, m_textureIds[1]);
+ glActiveTexture(GL_TEXTURE2);
+ glBindTexture(GL_TEXTURE_2D, m_textureIds[2]);
+ glActiveTexture(GL_TEXTURE0);
+
+ m_program.setUniformValue("texY", GLint(0));
+ m_program.setUniformValue("texU", GLint(1));
+ m_program.setUniformValue("texV", GLint(2));
+ } else {
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, m_textureIds[0]);
+
+ m_program.setUniformValue("texRgb", GLint(0));
+ }
+ m_program.setUniformValue("colorMatrix", m_colorMatrix);
+
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+
+ m_program.release();
+
+
+ glDisable(GL_SCISSOR_TEST);
+ glDisable(GL_STENCIL_TEST);
+ painter->endNativePainting();
+ }
+ return QAbstractVideoSurface::NoError;
+}
+
+#endif
+
+/*!
+ \class QPainterVideoSurface
+ \internal
+*/
+
+/*!
+*/
+QPainterVideoSurface::QPainterVideoSurface(QObject *parent)
+ : QAbstractVideoSurface(parent)
+ , m_painter(0)
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+ , m_glContext(0)
+ , m_shaderTypes(NoShaders)
+ , m_shaderType(NoShaders)
+#endif
+ , m_brightness(0)
+ , m_contrast(0)
+ , m_hue(0)
+ , m_saturation(0)
+ , m_pixelFormat(QVideoFrame::Format_Invalid)
+ , m_colorsDirty(true)
+ , m_ready(false)
+{
+}
+
+/*!
+*/
+QPainterVideoSurface::~QPainterVideoSurface()
+{
+ if (isActive())
+ m_painter->stop();
+
+ delete m_painter;
+}
+
+/*!
+*/
+QList<QVideoFrame::PixelFormat> QPainterVideoSurface::supportedPixelFormats(
+ QAbstractVideoBuffer::HandleType handleType) const
+{
+ if (!m_painter)
+ const_cast<QPainterVideoSurface *>(this)->createPainter();
+
+ return m_painter->supportedPixelFormats(handleType);
+}
+
+/*!
+*/
+bool QPainterVideoSurface::isFormatSupported(
+ const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar) const
+{
+ if (!m_painter)
+ const_cast<QPainterVideoSurface *>(this)->createPainter();
+
+ return m_painter->isFormatSupported(format, similar);
+}
+
+/*!
+*/
+bool QPainterVideoSurface::start(const QVideoSurfaceFormat &format)
+{
+ if (isActive())
+ m_painter->stop();
+
+ if (!m_painter)
+ createPainter();
+
+ if (format.frameSize().isEmpty()) {
+ setError(UnsupportedFormatError);
+ } else {
+ QAbstractVideoSurface::Error error = m_painter->start(format);
+
+ if (error != QAbstractVideoSurface::NoError) {
+ setError(error);
+ } else {
+ m_pixelFormat = format.pixelFormat();
+ m_frameSize = format.frameSize();
+ m_sourceRect = format.viewport();
+ m_colorsDirty = true;
+ m_ready = true;
+
+ return QAbstractVideoSurface::start(format);
+ }
+ }
+
+ QAbstractVideoSurface::stop();
+
+ return false;
+}
+
+/*!
+*/
+void QPainterVideoSurface::stop()
+{
+ if (isActive()) {
+ m_painter->stop();
+ m_ready = false;
+
+ QAbstractVideoSurface::stop();
+ }
+}
+
+/*!
+*/
+bool QPainterVideoSurface::present(const QVideoFrame &frame)
+{
+ if (!m_ready) {
+ if (!isActive())
+ setError(StoppedError);
+ } else if (frame.isValid()
+ && (frame.pixelFormat() != m_pixelFormat || frame.size() != m_frameSize)) {
+ setError(IncorrectFormatError);
+
+ stop();
+ } else {
+ QAbstractVideoSurface::Error error = m_painter->setCurrentFrame(frame);
+
+ if (error != QAbstractVideoSurface::NoError) {
+ setError(error);
+
+ stop();
+ } else {
+ m_ready = false;
+
+ emit frameChanged();
+
+ return true;
+ }
+ }
+ return false;
+}
+
+/*!
+*/
+int QPainterVideoSurface::brightness() const
+{
+ return m_brightness;
+}
+
+/*!
+*/
+void QPainterVideoSurface::setBrightness(int brightness)
+{
+ m_brightness = brightness;
+
+ m_colorsDirty = true;
+}
+
+/*!
+*/
+int QPainterVideoSurface::contrast() const
+{
+ return m_contrast;
+}
+
+/*!
+*/
+void QPainterVideoSurface::setContrast(int contrast)
+{
+ m_contrast = contrast;
+
+ m_colorsDirty = true;
+}
+
+/*!
+*/
+int QPainterVideoSurface::hue() const
+{
+ return m_hue;
+}
+
+/*!
+*/
+void QPainterVideoSurface::setHue(int hue)
+{
+ m_hue = hue;
+
+ m_colorsDirty = true;
+}
+
+/*!
+*/
+int QPainterVideoSurface::saturation() const
+{
+ return m_saturation;
+}
+
+/*!
+*/
+void QPainterVideoSurface::setSaturation(int saturation)
+{
+ m_saturation = saturation;
+
+ m_colorsDirty = true;
+}
+
+/*!
+*/
+bool QPainterVideoSurface::isReady() const
+{
+ return m_ready;
+}
+
+/*!
+*/
+void QPainterVideoSurface::setReady(bool ready)
+{
+ m_ready = ready;
+}
+
+/*!
+*/
+void QPainterVideoSurface::paint(QPainter *painter, const QRectF &target, const QRectF &source)
+{
+ if (!isActive()) {
+ painter->fillRect(target, QBrush(Qt::black));
+ } else {
+ if (m_colorsDirty) {
+ m_painter->updateColors(m_brightness, m_contrast, m_hue, m_saturation);
+ m_colorsDirty = false;
+ }
+
+ const QRectF sourceRect(
+ m_sourceRect.x() + m_sourceRect.width() * source.x(),
+ m_sourceRect.y() + m_sourceRect.height() * source.y(),
+ m_sourceRect.width() * source.width(),
+ m_sourceRect.height() * source.height());
+
+ QAbstractVideoSurface::Error error = m_painter->paint(target, painter, sourceRect);
+
+ if (error != QAbstractVideoSurface::NoError) {
+ setError(error);
+
+ stop();
+ }
+ }
+}
+
+/*!
+ \fn QPainterVideoSurface::frameChanged()
+*/
+
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+
+/*!
+*/
+const QGLContext *QPainterVideoSurface::glContext() const
+{
+ return m_glContext;
+}
+
+/*!
+*/
+void QPainterVideoSurface::setGLContext(QGLContext *context)
+{
+ if (m_glContext == context)
+ return;
+
+ m_glContext = context;
+
+ m_shaderTypes = NoShaders;
+
+ if (m_glContext) {
+ m_glContext->makeCurrent();
+
+ const QByteArray extensions(reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS)));
+#ifndef QT_OPENGL_ES
+
+ if (extensions.contains("ARB_fragment_program"))
+ m_shaderTypes |= FragmentProgramShader;
+#endif
+
+ if (QGLShaderProgram::hasOpenGLShaderPrograms(m_glContext)
+ && extensions.contains("ARB_shader_objects"))
+ m_shaderTypes |= GlslShader;
+ }
+
+ ShaderType type = (m_shaderType & m_shaderTypes)
+ ? m_shaderType
+ : NoShaders;
+
+ if (type != m_shaderType || type != NoShaders) {
+ m_shaderType = type;
+
+ if (isActive()) {
+ m_painter->stop();
+ delete m_painter;
+ m_painter = 0;
+ m_ready = false;
+
+ setError(ResourceError);
+ QAbstractVideoSurface::stop();
+ }
+ emit supportedFormatsChanged();
+ }
+}
+
+/*!
+ \enum QPainterVideoSurface::ShaderType
+
+ \value NoShaders
+ \value FragmentProgramShader
+ \value HlslShader
+*/
+
+/*!
+ \typedef QPainterVideoSurface::ShaderTypes
+*/
+
+/*!
+*/
+QPainterVideoSurface::ShaderTypes QPainterVideoSurface::supportedShaderTypes() const
+{
+ return m_shaderTypes;
+}
+
+/*!
+*/
+QPainterVideoSurface::ShaderType QPainterVideoSurface::shaderType() const
+{
+ return m_shaderType;
+}
+
+/*!
+*/
+void QPainterVideoSurface::setShaderType(ShaderType type)
+{
+ if (!(type & m_shaderTypes))
+ type = NoShaders;
+
+ if (type != m_shaderType) {
+ m_shaderType = type;
+
+ if (isActive()) {
+ m_painter->stop();
+ delete m_painter;
+ m_painter = 0;
+ m_ready = false;
+
+ setError(ResourceError);
+ QAbstractVideoSurface::stop();
+ } else {
+ delete m_painter;
+ m_painter = 0;
+ }
+ emit supportedFormatsChanged();
+ }
+}
+
+#endif
+
+void QPainterVideoSurface::createPainter()
+{
+ Q_ASSERT(!m_painter);
+
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+ switch (m_shaderType) {
+#ifndef QT_OPENGL_ES
+ case FragmentProgramShader:
+ Q_ASSERT(m_glContext);
+ m_glContext->makeCurrent();
+ m_painter = new QVideoSurfaceArbFpPainter(m_glContext);
+ break;
+#endif
+ case GlslShader:
+ Q_ASSERT(m_glContext);
+ m_glContext->makeCurrent();
+ m_painter = new QVideoSurfaceGlslPainter(m_glContext);
+ break;
+ default:
+ m_painter = new QVideoSurfaceRasterPainter;
+ break;
+ }
+#else
+ m_painter = new QVideoSurfaceRasterPainter;
+#endif
+}
+
+QT_END_NAMESPACE
+
+#include "moc_qpaintervideosurface_p.cpp"
+
+
diff --git a/src/multimedia/base/qpaintervideosurface_p.h b/src/multimedia/base/qpaintervideosurface_p.h
new file mode 100644
index 0000000000..d4b6740149
--- /dev/null
+++ b/src/multimedia/base/qpaintervideosurface_p.h
@@ -0,0 +1,158 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPAINTERVIDEOSURFACE_P_H
+#define QPAINTERVIDEOSURFACE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qsize.h>
+#include <QtGui/qimage.h>
+#include <QtGui/qmatrix4x4.h>
+#include <QtGui/qpaintengine.h>
+#include <QtMultimedia/qabstractvideosurface.h>
+#include <QtMultimedia/qvideoframe.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QGLContext;
+
+
+class QVideoSurfacePainter;
+class Q_MULTIMEDIA_EXPORT QPainterVideoSurface : public QAbstractVideoSurface
+{
+ Q_OBJECT
+public:
+ explicit QPainterVideoSurface(QObject *parent = 0);
+ ~QPainterVideoSurface();
+
+ QList<QVideoFrame::PixelFormat> supportedPixelFormats(
+ QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const;
+
+ bool isFormatSupported(
+ const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar = 0) const;
+
+ bool start(const QVideoSurfaceFormat &format);
+ void stop();
+
+ bool present(const QVideoFrame &frame);
+
+ int brightness() const;
+ void setBrightness(int brightness);
+
+ int contrast() const;
+ void setContrast(int contrast);
+
+ int hue() const;
+ void setHue(int hue);
+
+ int saturation() const;
+ void setSaturation(int saturation);
+
+ bool isReady() const;
+ void setReady(bool ready);
+
+ void paint(QPainter *painter, const QRectF &target, const QRectF &source = QRectF(0, 0, 1, 1));
+
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+ const QGLContext *glContext() const;
+ void setGLContext(QGLContext *context);
+
+ enum ShaderType
+ {
+ NoShaders = 0x00,
+ FragmentProgramShader = 0x01,
+ GlslShader = 0x02
+ };
+
+ Q_DECLARE_FLAGS(ShaderTypes, ShaderType)
+
+ ShaderTypes supportedShaderTypes() const;
+
+ ShaderType shaderType() const;
+ void setShaderType(ShaderType type);
+#endif
+
+Q_SIGNALS:
+ void frameChanged();
+
+private:
+ void createPainter();
+
+ QVideoSurfacePainter *m_painter;
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+ QGLContext *m_glContext;
+ ShaderTypes m_shaderTypes;
+ ShaderType m_shaderType;
+#endif
+ int m_brightness;
+ int m_contrast;
+ int m_hue;
+ int m_saturation;
+
+ QVideoFrame::PixelFormat m_pixelFormat;
+ QSize m_frameSize;
+ QRect m_sourceRect;
+ bool m_colorsDirty;
+ bool m_ready;
+};
+
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+Q_DECLARE_OPERATORS_FOR_FLAGS(QPainterVideoSurface::ShaderTypes)
+#endif
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/multimedia/base/qtmedianamespace.h b/src/multimedia/base/qtmedianamespace.h
new file mode 100644
index 0000000000..fe20a053d0
--- /dev/null
+++ b/src/multimedia/base/qtmedianamespace.h
@@ -0,0 +1,189 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTMEDIANAMESPACE_H
+#define QTMEDIANAMESPACE_H
+
+#include <QtCore/qpair.h>
+#include <QtCore/qmetatype.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+namespace QtMultimedia
+{
+ enum MetaData
+ {
+ // Common
+ Title,
+ SubTitle,
+ Author,
+ Comment,
+ Description,
+ Category,
+ Genre,
+ Year,
+ Date,
+ UserRating,
+ Keywords,
+ Language,
+ Publisher,
+ Copyright,
+ ParentalRating,
+ RatingOrganisation,
+
+ // Media
+ Size,
+ MediaType,
+ Duration,
+
+ // Audio
+ AudioBitRate,
+ AudioCodec,
+ AverageLevel,
+ ChannelCount,
+ PeakValue,
+ SampleRate,
+
+ // Music
+ AlbumTitle,
+ AlbumArtist,
+ ContributingArtist,
+ Composer,
+ Conductor,
+ Lyrics,
+ Mood,
+ TrackNumber,
+ TrackCount,
+
+ CoverArtUrlSmall,
+ CoverArtUrlLarge,
+
+ // Image/Video
+ Resolution,
+ PixelAspectRatio,
+
+ // Video
+ VideoFrameRate,
+ VideoBitRate,
+ VideoCodec,
+
+ PosterUrl,
+
+ // Movie
+ ChapterNumber,
+ Director,
+ LeadPerformer,
+ Writer,
+
+ // Photos
+ CameraManufacturer,
+ CameraModel,
+ Event,
+ Subject,
+ Orientation,
+ ExposureTime,
+ FNumber,
+ ExposureProgram,
+ ISOSpeedRatings,
+ ExposureBiasValue,
+ DateTimeOriginal,
+ DateTimeDigitized,
+ SubjectDistance,
+ MeteringMode,
+ LightSource,
+ Flash,
+ FocalLength,
+ ExposureMode,
+ WhiteBalance,
+ DigitalZoomRatio,
+ FocalLengthIn35mmFilm,
+ SceneCaptureType,
+ GainControl,
+ Contrast,
+ Saturation,
+ Sharpness,
+ DeviceSettingDescription
+ };
+
+ enum SupportEstimate
+ {
+ NotSupported,
+ MaybeSupported,
+ ProbablySupported,
+ PreferredService
+ };
+
+ enum EncodingQuality
+ {
+ VeryLowQuality,
+ LowQuality,
+ NormalQuality,
+ HighQuality,
+ VeryHighQuality
+ };
+
+ enum EncodingMode
+ {
+ ConstantQualityEncoding,
+ ConstantBitRateEncoding,
+ AverageBitRateEncoding,
+ TwoPassEncoding
+ };
+
+ enum AvailabilityError
+ {
+ NoError,
+ ServiceMissingError,
+ BusyError,
+ ResourceError
+ };
+
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/multimedia/base/qtmedianamespace.qdoc b/src/multimedia/base/qtmedianamespace.qdoc
new file mode 100644
index 0000000000..58e9c92f33
--- /dev/null
+++ b/src/multimedia/base/qtmedianamespace.qdoc
@@ -0,0 +1,210 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \namespace QtMultimedia
+ \ingroup multimedia
+
+ \brief The QtMultimedia namespace contains miscellaneous identifiers used
+ throughout the Qt Multimedia library.
+*/
+
+/*!
+ \enum QtMultimedia::MetaData
+
+ This enum provides identifiers for meta-data attributes.
+
+ Common attributes
+ \value Title The title of the media. QString.
+ \value SubTitle The sub-title of the media. QString.
+ \value Author The authors of the media. QStringList.
+ \value Comment A user comment about the media. QString.
+ \value Description A description of the media. QString
+ \value Category The category of the media. QStringList.
+ \value Genre The genre of the media. QStringList.
+ \value Year The year of release of the media. int.
+ \value Date The date of the media. QDate.
+ \value UserRating A user rating of the media. int [0..100].
+ \value Keywords A list of keywords describing the media. QStringList.
+ \value Language The language of media, as an ISO 639-2 code.
+
+ \value Publisher The publisher of the media. QString.
+ \value Copyright The media's copyright notice. QString.
+ \value ParentalRating The parental rating of the media. QString.
+ \value RatingOrganisation The organisation responsible for the parental rating of the media.
+ QString.
+
+ Media attributes
+ \value Size The size in bytes of the media. qint64
+ \value MediaType The type of the media (audio, video, etc). QString.
+ \value Duration The duration in millseconds of the media. qint64.
+
+ Audio attributes
+ \value AudioBitRate The bit rate of the media's audio stream in bits per second. int.
+ \value AudioCodec The codec of the media's audio stream. QString.
+ \value AverageLevel The average volume level of the media. int.
+ \value ChannelCount The number of channels in the media's audio stream. int.
+ \value PeakValue The peak volume of the media's audio stream. int
+ \value SampleRate The sample rate of the media's audio stream in hertz. int
+
+ Music attributes
+ \value AlbumTitle The title of the album the media belongs to. QString.
+ \value AlbumArtist The principal artist of the album the media belongs to. QString.
+ \value ContributingArtist The artists contributing to the media. QStringList.
+ \value Composer The composer of the media. QStringList.
+ \value Conductor The conductor of the media. QString.
+ \value Lyrics The lyrics to the media. QString.
+ \value Mood The mood of the media. QString.
+ \value TrackNumber The track number of the media. int.
+ \value TrackCount The number of tracks on the album containing the media. int.
+
+ \value CoverArtUrlSmall The URL of a small cover art image. QUrl.
+ \value CoverArtUrlLarge The URL of a large cover art image. QUrl.
+
+ Image and video attributes
+ \value Resolution The dimensions of an image or video. QSize.
+ \value PixelAspectRatio The pixel aspect ratio of an image or video. QSize.
+
+ Video attributes
+ \value VideoFrameRate The frame rate of the media's video stream. qreal.
+ \value VideoBitRate The bit rate of the media's video stream in bits per second. int.
+ \value VideoCodec The codec of the media's video stream. QString.
+
+ \value PosterUrl The URL of a poster image. QUrl.
+
+ Movie attributes
+ \value ChapterNumber The chapter number of the media. int.
+ \value Director The director of the media. QString.
+ \value LeadPerformer The lead performer in the media. QStringList.
+ \value Writer The writer of the media. QStringList.
+
+ Photo attributes.
+ \value CameraManufacturer The manufacturer of the camera used to capture the media. QString.
+ \value CameraModel The model of the camera used to capture the media. QString.
+ \value Event The event during which the media was captured. QString.
+ \value Subject The subject of the media. QString.
+ \value Orientation Orientation of image.
+ \value ExposureTime Exposure time, given in seconds.
+ \value FNumber The F Number.
+ \value ExposureProgram
+ The class of the program used by the camera to set exposure when the picture is taken.
+ \value ISOSpeedRatings
+ Indicates the ISO Speed and ISO Latitude of the camera or input device as specified in ISO 12232.
+ \value ExposureBiasValue
+ The exposure bias.
+ The unit is the APEX (Additive System of Photographic Exposure) setting.
+ \value DateTimeOriginal The date and time when the original image data was generated.
+ \value DateTimeDigitized The date and time when the image was stored as digital data.
+ \value SubjectDistance The distance to the subject, given in meters.
+ \value MeteringMode The metering mode.
+ \value LightSource
+ The kind of light source.
+ \value Flash
+ Status of flash when the image was shot.
+ \value FocalLength
+ The actual focal length of the lens, in mm.
+ \value ExposureMode
+ Indicates the exposure mode set when the image was shot.
+ \value WhiteBalance
+ Indicates the white balance mode set when the image was shot.
+ \value DigitalZoomRatio
+ Indicates the digital zoom ratio when the image was shot.
+ \value FocalLengthIn35mmFilm
+ Indicates the equivalent focal length assuming a 35mm film camera, in mm.
+ \value SceneCaptureType
+ Indicates the type of scene that was shot.
+ It can also be used to record the mode in which the image was shot.
+ \value GainControl
+ Indicates the degree of overall image gain adjustment.
+ \value Contrast
+ Indicates the direction of contrast processing applied by the camera when the image was shot.
+ \value Saturation
+ Indicates the direction of saturation processing applied by the camera when the image was shot.
+ \value Sharpness
+ Indicates the direction of sharpness processing applied by the camera when the image was shot.
+ \value DeviceSettingDescription
+ Exif tag, indicates information on the picture-taking conditions of a particular camera model. QString
+*/
+
+/*!
+ \enum QtMultimedia::SupportEstimate
+
+ Enumerates the levels of support a media service provider may have for a feature.
+
+ \value NotSupported The feature is not supported.
+ \value MaybeSupported The feature may be supported.
+ \value ProbablySupported The feature is probably supported.
+ \value PreferredService The service is the preferred provider of a service.
+*/
+
+/*!
+ \enum QtMultimedia::EncodingQuality
+
+ Enumerates quality encoding levels.
+
+ \value VeryLowQuality
+ \value LowQuality
+ \value NormalQuality
+ \value HighQuality
+ \value VeryHighQuality
+*/
+
+/*!
+ \enum QtMultimedia::EncodingMode
+
+ Enumerates encoding modes.
+
+ \value ConstantQualityEncoding
+ \value ConstantBitRateEncoding
+ \value AverageBitRateEncoding
+ \value TwoPassEncoding
+*/
+
+/*!
+ \enum QtMultimedia::AvailabilityError
+
+ Enumerates Service status errors.
+
+ \value NoError
+ \value ServiceMissingError
+ \value ResourceError
+ \value BusyError
+*/
diff --git a/src/multimedia/base/qvideodevicecontrol.cpp b/src/multimedia/base/qvideodevicecontrol.cpp
new file mode 100644
index 0000000000..c0fe9a8e8a
--- /dev/null
+++ b/src/multimedia/base/qvideodevicecontrol.cpp
@@ -0,0 +1,155 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtMultimedia/qvideodevicecontrol.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QVideoDeviceControl
+ \preliminary
+ \since 4.7
+ \brief The QVideoDeviceControl class provides an video device selector media control.
+ \ingroup multimedia-serv
+
+ The QVideoDeviceControl class provides descriptions of the video devices
+ available on a system and allows one to be selected as the endpoint of
+ a media service.
+
+ The interface name of QVideoDeviceControl is \c com.nokia.Qt.VideoDeviceControl as
+ defined in QVideoDeviceControl_iid.
+*/
+
+/*!
+ \macro QVideoDeviceControl_iid
+
+ \c com.nokia.Qt.VideoDeviceControl
+
+ Defines the interface name of the QVideoDeviceControl class.
+
+ \relates QVideoDeviceControl
+*/
+
+/*!
+ Constructs a video device control with the given \a parent.
+*/
+QVideoDeviceControl::QVideoDeviceControl(QObject *parent)
+ :QMediaControl(parent)
+{
+}
+
+/*!
+ Destroys a video device control.
+*/
+QVideoDeviceControl::~QVideoDeviceControl()
+{
+}
+
+/*!
+ \fn QVideoDeviceControl::deviceCount() const
+
+ Returns the number of available video devices;
+*/
+
+/*!
+ \fn QVideoDeviceControl::deviceName(int index) const
+
+ Returns the name of the video device at \a index.
+*/
+
+/*!
+ \fn QVideoDeviceControl::deviceDescription(int index) const
+
+ Returns a description of the video device at \a index.
+*/
+
+/*!
+ \fn QVideoDeviceControl::deviceIcon(int index) const
+
+ Returns an icon for the video device at \a index.
+*/
+
+/*!
+ \fn QVideoDeviceControl::defaultDevice() const
+
+ Returns the index of the default video device.
+*/
+
+/*!
+ \fn QVideoDeviceControl::selectedDevice() const
+
+ Returns the index of the selected video device.
+*/
+
+/*!
+ \fn QVideoDeviceControl::setSelectedDevice(int index)
+
+ Sets the selected video device \a index.
+*/
+
+/*!
+ \fn QVideoDeviceControl::devicesChanged()
+
+ Signals that the list of available video devices has changed.
+*/
+
+/*!
+ \fn QVideoDeviceControl::selectedDeviceChanged(int index)
+
+ Signals that the selected video device \a index has changed.
+*/
+
+/*!
+ \fn QVideoDeviceControl::selectedDeviceChanged(const QString &name)
+
+ Signals that the selected video device \a name has changed.
+*/
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#include "moc_qvideodevicecontrol.cpp"
+
+
diff --git a/src/multimedia/base/qvideodevicecontrol.h b/src/multimedia/base/qvideodevicecontrol.h
new file mode 100644
index 0000000000..ce99fd137b
--- /dev/null
+++ b/src/multimedia/base/qvideodevicecontrol.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QVIDEODEVICECONTROL_H
+#define QVIDEODEVICECONTROL_H
+
+#include <QtMultimedia/qmediacontrol.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+class Q_MULTIMEDIA_EXPORT QVideoDeviceControl : public QMediaControl
+{
+ Q_OBJECT
+
+public:
+ virtual ~QVideoDeviceControl();
+
+ virtual int deviceCount() const = 0;
+
+ virtual QString deviceName(int index) const = 0;
+ virtual QString deviceDescription(int index) const = 0;
+ virtual QIcon deviceIcon(int index) const = 0;
+
+ virtual int defaultDevice() const = 0;
+ virtual int selectedDevice() const = 0;
+
+public Q_SLOTS:
+ virtual void setSelectedDevice(int index) = 0;
+
+Q_SIGNALS:
+ void selectedDeviceChanged(int index);
+ void selectedDeviceChanged(const QString &deviceName);
+ void devicesChanged();
+
+protected:
+ QVideoDeviceControl(QObject *parent = 0);
+};
+
+#define QVideoDeviceControl_iid "com.nokia.Qt.QVideoDeviceControl/1.0"
+Q_MEDIA_DECLARE_CONTROL(QVideoDeviceControl, QVideoDeviceControl_iid)
+
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QVIDEODEVICECONTROL_H
diff --git a/src/multimedia/base/qvideooutputcontrol.cpp b/src/multimedia/base/qvideooutputcontrol.cpp
new file mode 100644
index 0000000000..58f1527de1
--- /dev/null
+++ b/src/multimedia/base/qvideooutputcontrol.cpp
@@ -0,0 +1,135 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtMultimedia/qvideooutputcontrol.h>
+
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QVideoOutputControl
+ \preliminary
+ \since 4.7
+ \brief The QVideoOutputControl class provides a means of selecting the
+ active video output control.
+
+ \ingroup multimedia-serv
+
+ There are multiple controls which a QMediaService may use to output
+ video ony one of which may be active at one time, QVideoOutputControl
+ is the means by which this active control is selected.
+
+ The possible output controls are QVideoRendererControl,
+ QVideoWindowControl, and QVideoWidgetControl.
+
+ The interface name of QVideoOutputControl is \c com.nokia.Qt.QVideoOutputControl/1.0 as
+ defined in QVideoOutputControl_iid.
+
+ \sa QMediaService::control(), QVideoWidget, QVideoRendererControl,
+ QVideoWindowControl, QVideoWidgetControl
+*/
+
+/*!
+ \macro QVideoOutputControl_iid
+
+ \c com.nokia.Qt.QVideoOutputControl/1.0
+
+ Defines the interface name of the QVideoOutputControl class.
+
+ \relates QVideoOutputControl
+*/
+
+/*!
+ \enum QVideoOutputControl::Output
+
+ Identifies the possible render targets of a video output.
+
+ \value NoOutput Video is not rendered.
+ \value WindowOutput Video is rendered to the target of a QVideoWindowControl.
+ \value RendererOutput Video is rendered to the target of a QVideoRendererControl.
+ \value WidgetOutput Video is rendered to a QWidget provided by QVideoWidgetControl.
+ \value UserOutput Start value for user defined video targets.
+ \value MaxUserOutput End value for user defined video targets.
+*/
+
+/*!
+ Constructs a new video output control with the given \a parent.
+*/
+QVideoOutputControl::QVideoOutputControl(QObject *parent)
+ : QMediaControl(parent)
+{
+}
+
+/*!
+ Destroys a video output control.
+*/
+QVideoOutputControl::~QVideoOutputControl()
+{
+}
+
+/*!
+ \fn QList<QVideoOutputControl::Output> QVideoOutputControl::availableOutputs() const
+
+ Returns a list of available video output targets.
+*/
+
+/*!
+ \fn QVideoOutputControl::output() const
+
+ Returns the current video output target.
+*/
+
+/*!
+ \fn QVideoOutputControl::setOutput(Output output)
+
+ Sets the current video \a output target.
+*/
+
+/*!
+ \fn QVideoOutputControl::availableOutputsChanged(const QList<QVideoOutputControl::Output> &outputs)
+
+ Signals that available set of video \a outputs has changed.
+*/
+
+#include "moc_qvideooutputcontrol.cpp"
+
+QT_END_NAMESPACE
+
diff --git a/src/multimedia/base/qvideooutputcontrol.h b/src/multimedia/base/qvideooutputcontrol.h
new file mode 100644
index 0000000000..805da580be
--- /dev/null
+++ b/src/multimedia/base/qvideooutputcontrol.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QVIDEOOUTPUTCONTROL_H
+#define QVIDEOOUTPUTCONTROL_H
+
+#include <QtMultimedia/qmediacontrol.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+
+class Q_MULTIMEDIA_EXPORT QVideoOutputControl : public QMediaControl
+{
+ Q_OBJECT
+
+public:
+ enum Output
+ {
+ NoOutput,
+ WindowOutput,
+ RendererOutput,
+ WidgetOutput,
+ UserOutput = 100,
+ MaxUserOutput = 1000
+ };
+
+ ~QVideoOutputControl();
+
+ virtual QList<Output> availableOutputs() const = 0;
+
+ virtual Output output() const = 0;
+ virtual void setOutput(Output output) = 0;
+
+Q_SIGNALS:
+ void availableOutputsChanged(const QList<QVideoOutputControl::Output> &outputs);
+
+protected:
+ QVideoOutputControl(QObject *parent = 0);
+};
+
+#define QVideoOutputControl_iid "com.nokia.Qt.QVideoOutputControl/1.0"
+Q_MEDIA_DECLARE_CONTROL(QVideoOutputControl, QVideoOutputControl_iid)
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/multimedia/base/qvideorenderercontrol.cpp b/src/multimedia/base/qvideorenderercontrol.cpp
new file mode 100644
index 0000000000..a34ef9b107
--- /dev/null
+++ b/src/multimedia/base/qvideorenderercontrol.cpp
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtMultimedia/qvideorenderercontrol.h>
+
+#include "qmediacontrol_p.h"
+
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QVideoRendererControl
+ \preliminary
+ \since 4.7
+ \brief The QVideoRendererControl class provides a control for rendering
+ to a video surface.
+
+ \ingroup multimedia-serv
+
+ Using the surface() property of QVideoRendererControl a QAbstractVideoSurface
+ may be set as the video render target of a QMediaService.
+
+ \code
+ QVideoRendererControl *rendererControl = mediaService->control<QVideoRendererControl *>();
+ rendererControl->setSurface(myVideoSurface);
+ \endcode
+
+ QVideoRendererControl is one of number of possible video output controls,
+ in order to receive video it must be made the active video output
+ control by setting the output property of QVideoOutputControl to
+ \l {QVideoOutputControl::RendererOutput}{RendererOutput}. Consequently any
+ QMediaService that implements QVideoRendererControl must also implement
+ QVideoOutputControl.
+
+ \code
+ QVideoOutputControl *outputControl = mediaService->control<QVideoOutputControl *>();
+ outputControl->setOutput(QVideoOutputControl::RendererOutput);
+ \endcode
+
+ The interface name of QVideoRendererControl is \c com.nokia.Qt.QVideoRendererControl/1.0 as
+ defined in QVideoRendererControl_iid.
+
+ \sa QMediaService::control(), QVideoOutputControl, QVideoWidget
+*/
+
+/*!
+ \macro QVideoRendererControl_iid
+
+ \c com.nokia.Qt.QVideoRendererControl/1.0
+
+ Defines the interface name of the QVideoRendererControl class.
+
+ \relates QVideoRendererControl
+*/
+
+/*!
+ Constructs a new video renderer media end point with the given \a parent.
+*/
+QVideoRendererControl::QVideoRendererControl(QObject *parent)
+ : QMediaControl(parent)
+{
+}
+
+/*!
+ Destroys a video renderer media end point.
+*/
+QVideoRendererControl::~QVideoRendererControl()
+{
+}
+
+/*!
+ \fn QVideoRendererControl::surface() const
+
+ Returns the surface a video producer renders to.
+*/
+
+/*!
+ \fn QVideoRendererControl::setSurface(QAbstractVideoSurface *surface)
+
+ Sets the \a surface a video producer renders to.
+*/
+
+#include "moc_qvideorenderercontrol.cpp"
+
+QT_END_NAMESPACE
+
diff --git a/src/multimedia/base/qvideorenderercontrol.h b/src/multimedia/base/qvideorenderercontrol.h
new file mode 100644
index 0000000000..f5ba83e0cb
--- /dev/null
+++ b/src/multimedia/base/qvideorenderercontrol.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QVIDEORENDERERCONTROL_H
+#define QVIDEORENDERERCONTROL_H
+
+#include <QtMultimedia/qmediacontrol.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+
+class QAbstractVideoSurface;
+
+class Q_MULTIMEDIA_EXPORT QVideoRendererControl : public QMediaControl
+{
+ Q_OBJECT
+
+public:
+ ~QVideoRendererControl();
+
+ virtual QAbstractVideoSurface *surface() const = 0;
+ virtual void setSurface(QAbstractVideoSurface *surface) = 0;
+
+protected:
+ QVideoRendererControl(QObject *parent = 0);
+};
+
+#define QVideoRendererControl_iid "com.nokia.Qt.QVideoRendererControl/1.0"
+Q_MEDIA_DECLARE_CONTROL(QVideoRendererControl, QVideoRendererControl_iid)
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QVIDEORENDERERCONTROL_H
diff --git a/src/multimedia/base/qvideowidget.cpp b/src/multimedia/base/qvideowidget.cpp
new file mode 100644
index 0000000000..aabfefc856
--- /dev/null
+++ b/src/multimedia/base/qvideowidget.cpp
@@ -0,0 +1,913 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qvideowidget_p.h"
+
+#include <QtMultimedia/qmediaobject.h>
+#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/qvideooutputcontrol.h>
+#include <QtMultimedia/qvideowindowcontrol.h>
+#include <QtMultimedia/qvideowidgetcontrol.h>
+
+#include "qpaintervideosurface_p.h"
+#include <QtMultimedia/qvideorenderercontrol.h>
+#include <QtMultimedia/qvideosurfaceformat.h>
+#include <qpainter.h>
+
+#include <qapplication.h>
+#include <qevent.h>
+#include <qdialog.h>
+#include <qboxlayout.h>
+#include <qnamespace.h>
+
+
+QT_BEGIN_NAMESPACE
+
+QVideoWidgetControlBackend::QVideoWidgetControlBackend(
+ QVideoWidgetControl *control, QWidget *widget)
+ : m_widgetControl(control)
+{
+ connect(control, SIGNAL(brightnessChanged(int)), widget, SLOT(_q_brightnessChanged(int)));
+ connect(control, SIGNAL(contrastChanged(int)), widget, SLOT(_q_contrastChanged(int)));
+ connect(control, SIGNAL(hueChanged(int)), widget, SLOT(_q_hueChanged(int)));
+ connect(control, SIGNAL(saturationChanged(int)), widget, SLOT(_q_saturationChanged(int)));
+ connect(control, SIGNAL(fullScreenChanged(bool)), widget, SLOT(_q_fullScreenChanged(bool)));
+
+ QBoxLayout *layout = new QVBoxLayout;
+ layout->setMargin(0);
+ layout->setSpacing(0);
+ layout->addWidget(control->videoWidget());
+
+ widget->setLayout(layout);
+}
+
+void QVideoWidgetControlBackend::setBrightness(int brightness)
+{
+ m_widgetControl->setBrightness(brightness);
+}
+
+void QVideoWidgetControlBackend::setContrast(int contrast)
+{
+ m_widgetControl->setContrast(contrast);
+}
+
+void QVideoWidgetControlBackend::setHue(int hue)
+{
+ m_widgetControl->setHue(hue);
+}
+
+void QVideoWidgetControlBackend::setSaturation(int saturation)
+{
+ m_widgetControl->setSaturation(saturation);
+}
+
+void QVideoWidgetControlBackend::setFullScreen(bool fullScreen)
+{
+ m_widgetControl->setFullScreen(fullScreen);
+}
+
+
+QVideoWidget::AspectRatioMode QVideoWidgetControlBackend::aspectRatioMode() const
+{
+ return m_widgetControl->aspectRatioMode();
+}
+
+void QVideoWidgetControlBackend::setAspectRatioMode(QVideoWidget::AspectRatioMode mode)
+{
+ m_widgetControl->setAspectRatioMode(mode);
+}
+
+QRendererVideoWidgetBackend::QRendererVideoWidgetBackend(
+ QVideoRendererControl *control, QWidget *widget)
+ : m_rendererControl(control)
+ , m_widget(widget)
+ , m_surface(new QPainterVideoSurface)
+ , m_aspectRatioMode(QVideoWidget::KeepAspectRatio)
+ , m_updatePaintDevice(true)
+{
+ connect(this, SIGNAL(brightnessChanged(int)), m_widget, SLOT(_q_brightnessChanged(int)));
+ connect(this, SIGNAL(contrastChanged(int)), m_widget, SLOT(_q_contrastChanged(int)));
+ connect(this, SIGNAL(hueChanged(int)), m_widget, SLOT(_q_hueChanged(int)));
+ connect(this, SIGNAL(saturationChanged(int)), m_widget, SLOT(_q_saturationChanged(int)));
+ connect(m_surface, SIGNAL(frameChanged()), m_widget, SLOT(update()));
+ connect(m_surface, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat)),
+ m_widget, SLOT(_q_dimensionsChanged()));
+
+ m_rendererControl->setSurface(m_surface);
+}
+
+QRendererVideoWidgetBackend::~QRendererVideoWidgetBackend()
+{
+ delete m_surface;
+}
+
+void QRendererVideoWidgetBackend::clearSurface()
+{
+ m_rendererControl->setSurface(0);
+}
+
+void QRendererVideoWidgetBackend::setBrightness(int brightness)
+{
+ m_surface->setBrightness(brightness);
+
+ emit brightnessChanged(brightness);
+}
+
+void QRendererVideoWidgetBackend::setContrast(int contrast)
+{
+ m_surface->setContrast(contrast);
+
+ emit contrastChanged(contrast);
+}
+
+void QRendererVideoWidgetBackend::setHue(int hue)
+{
+ m_surface->setHue(hue);
+
+ emit hueChanged(hue);
+}
+
+void QRendererVideoWidgetBackend::setSaturation(int saturation)
+{
+ m_surface->setSaturation(saturation);
+
+ emit saturationChanged(saturation);
+}
+
+QVideoWidget::AspectRatioMode QRendererVideoWidgetBackend::aspectRatioMode() const
+{
+ return m_aspectRatioMode;
+}
+
+void QRendererVideoWidgetBackend::setAspectRatioMode(QVideoWidget::AspectRatioMode mode)
+{
+ m_aspectRatioMode = mode;
+
+ m_widget->updateGeometry();
+}
+
+void QRendererVideoWidgetBackend::setFullScreen(bool)
+{
+}
+
+QSize QRendererVideoWidgetBackend::sizeHint() const
+{
+ return m_surface->surfaceFormat().sizeHint();
+}
+
+void QRendererVideoWidgetBackend::showEvent()
+{
+}
+
+void QRendererVideoWidgetBackend::hideEvent(QHideEvent *)
+{
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+ m_updatePaintDevice = true;
+ m_surface->setGLContext(0);
+#endif
+}
+
+void QRendererVideoWidgetBackend::resizeEvent(QResizeEvent *)
+{
+}
+
+void QRendererVideoWidgetBackend::moveEvent(QMoveEvent *)
+{
+}
+
+void QRendererVideoWidgetBackend::paintEvent(QPaintEvent *event)
+{
+ QPainter painter(m_widget);
+
+ if (m_surface->isActive()) {
+ m_surface->paint(&painter, displayRect());
+
+ m_surface->setReady(true);
+ } else {
+ painter.fillRect(event->rect(), m_widget->palette().background());
+
+ #if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+ if (m_updatePaintDevice && (painter.paintEngine()->type() == QPaintEngine::OpenGL
+ || painter.paintEngine()->type() == QPaintEngine::OpenGL2)) {
+ m_updatePaintDevice = false;
+
+ m_surface->setGLContext(const_cast<QGLContext *>(QGLContext::currentContext()));
+ if (m_surface->supportedShaderTypes() & QPainterVideoSurface::GlslShader) {
+ m_surface->setShaderType(QPainterVideoSurface::GlslShader);
+ } else {
+ m_surface->setShaderType(QPainterVideoSurface::FragmentProgramShader);
+ }
+ }
+#endif
+ }
+}
+
+QRect QRendererVideoWidgetBackend::displayRect() const
+{
+ QRect displayRect = m_widget->rect();
+
+ if (m_aspectRatioMode != QVideoWidget::IgnoreAspectRatio) {
+ QVideoSurfaceFormat format = m_surface->surfaceFormat();
+
+ QSize aspectRatio = format.pixelAspectRatio();
+
+ QSize size = format.viewport().size();
+ size.rwidth() *= aspectRatio.width();
+ size.rheight() *= aspectRatio.height();
+ size.scale(displayRect.size(), Qt::KeepAspectRatio);
+
+ QPoint center = displayRect.center();
+
+ displayRect = QRect(QPoint(0, 0), size);
+ displayRect.moveCenter(center);
+ }
+
+ return displayRect;
+}
+
+QWindowVideoWidgetBackend::QWindowVideoWidgetBackend(QVideoWindowControl *control, QWidget *widget)
+ : m_windowControl(control)
+ , m_widget(widget)
+ , m_aspectRatioMode(QVideoWidget::KeepAspectRatio)
+{
+ connect(control, SIGNAL(brightnessChanged(int)), m_widget, SLOT(_q_brightnessChanged(int)));
+ connect(control, SIGNAL(contrastChanged(int)), m_widget, SLOT(_q_contrastChanged(int)));
+ connect(control, SIGNAL(hueChanged(int)), m_widget, SLOT(_q_hueChanged(int)));
+ connect(control, SIGNAL(saturationChanged(int)), m_widget, SLOT(_q_saturationChanged(int)));
+ connect(control, SIGNAL(fullScreenChanged(bool)), m_widget, SLOT(_q_fullScreenChanged(bool)));
+ connect(control, SIGNAL(nativeSizeChanged()), m_widget, SLOT(_q_dimensionsChanged()));
+}
+
+QWindowVideoWidgetBackend::~QWindowVideoWidgetBackend()
+{
+}
+
+void QWindowVideoWidgetBackend::setBrightness(int brightness)
+{
+ m_windowControl->setBrightness(brightness);
+}
+
+void QWindowVideoWidgetBackend::setContrast(int contrast)
+{
+ m_windowControl->setContrast(contrast);
+}
+
+void QWindowVideoWidgetBackend::setHue(int hue)
+{
+ m_windowControl->setHue(hue);
+}
+
+void QWindowVideoWidgetBackend::setSaturation(int saturation)
+{
+ m_windowControl->setSaturation(saturation);
+}
+
+void QWindowVideoWidgetBackend::setFullScreen(bool fullScreen)
+{
+ m_windowControl->setFullScreen(fullScreen);
+}
+
+QVideoWidget::AspectRatioMode QWindowVideoWidgetBackend::aspectRatioMode() const
+{
+ return m_windowControl->aspectRatioMode();
+}
+
+void QWindowVideoWidgetBackend::setAspectRatioMode(QVideoWidget::AspectRatioMode mode)
+{
+ m_windowControl->setAspectRatioMode(mode);
+}
+
+QSize QWindowVideoWidgetBackend::sizeHint() const
+{
+ return m_windowControl->nativeSize();
+}
+
+void QWindowVideoWidgetBackend::showEvent()
+{
+ m_windowControl->setWinId(m_widget->winId());
+
+ m_windowControl->setDisplayRect(m_widget->rect());
+}
+
+void QWindowVideoWidgetBackend::hideEvent(QHideEvent *)
+{
+}
+
+void QWindowVideoWidgetBackend::moveEvent(QMoveEvent *)
+{
+ m_windowControl->setDisplayRect(m_widget->rect());
+}
+
+void QWindowVideoWidgetBackend::resizeEvent(QResizeEvent *)
+{
+ m_windowControl->setDisplayRect(m_widget->rect());
+}
+
+void QWindowVideoWidgetBackend::paintEvent(QPaintEvent *event)
+{
+ m_windowControl->repaint();
+
+ event->accept();
+}
+
+void QVideoWidgetPrivate::setCurrentControl(QVideoWidgetControlInterface *control)
+{
+ if (currentControl != control) {
+ currentControl = control;
+
+ currentControl->setBrightness(brightness);
+ currentControl->setContrast(contrast);
+ currentControl->setHue(hue);
+ currentControl->setSaturation(saturation);
+ currentControl->setAspectRatioMode(aspectRatioMode);
+ }
+}
+
+void QVideoWidgetPrivate::show()
+{
+ if (outputControl) {
+ if (widgetBackend != 0) {
+ setCurrentControl(widgetBackend);
+ outputControl->setOutput(QVideoOutputControl::WidgetOutput);
+ } else if (windowBackend != 0 && (q_func()->window() == 0
+ || !q_func()->window()->testAttribute(Qt::WA_DontShowOnScreen))) {
+ windowBackend->showEvent();
+ currentBackend = windowBackend;
+ setCurrentControl(windowBackend);
+ outputControl->setOutput(QVideoOutputControl::WindowOutput);
+ } else if (rendererBackend != 0) {
+ rendererBackend->showEvent();
+ currentBackend = rendererBackend;
+ setCurrentControl(rendererBackend);
+ outputControl->setOutput(QVideoOutputControl::RendererOutput);
+ } else {
+ outputControl->setOutput(QVideoOutputControl::NoOutput);
+ }
+ }
+}
+
+void QVideoWidgetPrivate::clearService()
+{
+ if (service) {
+ QObject::disconnect(service, SIGNAL(destroyed()), q_func(), SLOT(_q_serviceDestroyed()));
+
+ if (outputControl)
+ outputControl->setOutput(QVideoOutputControl::NoOutput);
+
+ if (widgetBackend) {
+ QLayout *layout = q_func()->layout();
+
+ for (QLayoutItem *item = layout->takeAt(0); item; item = layout->takeAt(0)) {
+ item->widget()->setParent(0);
+ delete item;
+ }
+ delete layout;
+
+ delete widgetBackend;
+ widgetBackend = 0;
+ }
+
+ delete windowBackend;
+ windowBackend = 0;
+
+ if (rendererBackend) {
+ rendererBackend->clearSurface();
+
+ delete rendererBackend;
+ rendererBackend = 0;
+ }
+
+ currentBackend = 0;
+ currentControl = 0;
+ outputControl = 0;
+ service = 0;
+ }
+}
+
+void QVideoWidgetPrivate::_q_serviceDestroyed()
+{
+ if (widgetBackend) {
+ delete q_func()->layout();
+
+ delete widgetBackend;
+ widgetBackend = 0;
+ }
+
+ delete windowBackend;
+ windowBackend = 0;
+
+ delete rendererBackend;
+ rendererBackend = 0;
+
+ currentControl = 0;
+ currentBackend = 0;
+ outputControl = 0;
+ service = 0;
+}
+
+void QVideoWidgetPrivate::_q_mediaObjectDestroyed()
+{
+ mediaObject = 0;
+ clearService();
+}
+
+void QVideoWidgetPrivate::_q_brightnessChanged(int b)
+{
+ if (b != brightness)
+ emit q_func()->brightnessChanged(brightness = b);
+}
+
+void QVideoWidgetPrivate::_q_contrastChanged(int c)
+{
+ if (c != contrast)
+ emit q_func()->contrastChanged(contrast = c);
+}
+
+void QVideoWidgetPrivate::_q_hueChanged(int h)
+{
+ if (h != hue)
+ emit q_func()->hueChanged(hue = h);
+}
+
+void QVideoWidgetPrivate::_q_saturationChanged(int s)
+{
+ if (s != saturation)
+ emit q_func()->saturationChanged(saturation = s);
+}
+
+
+void QVideoWidgetPrivate::_q_fullScreenChanged(bool fullScreen)
+{
+ if (!fullScreen && q_func()->isFullScreen())
+ q_func()->showNormal();
+}
+
+void QVideoWidgetPrivate::_q_dimensionsChanged()
+{
+ q_func()->updateGeometry();
+}
+
+/*!
+ \class QVideoWidget
+ \preliminary
+ \since 4.7
+ \brief The QVideoWidget class provides a widget which presents video
+ produced by a media object.
+ \ingroup multimedia
+
+ Attaching a QVideoWidget to a QMediaObject allows it to display the
+ video or image output of that media object. A QVideoWidget is attached
+ to media object by passing a pointer to the QMediaObject in its
+ constructor, and detached by destroying the QVideoWidget.
+
+ \code
+ player = new QMediaPlayer;
+
+ widget = new QVideoWidget(player);
+ widget->show();
+
+ player->setMedia(QUrl("http://example.com/movie.mp4"));
+ player->play();
+ \endcode
+
+ \bold {Note}: Only a single display output can be attached to a media
+ object at one time.
+
+ \sa QMediaObject, QMediaPlayer, QGraphicsVideoItem
+*/
+
+/*!
+ \enum QVideoWidget::AspectRatioMode
+
+ Specfies how video is scaled with respect to its aspect ratio.
+
+ \value IgnoreAspectRatio The video is scaled to fill the widget ignoring its aspect ratio.
+ \value KeepAspectRatio The video is scaled to the largest rectangle that will fit within the
+ widget's dimensions while still retaining its original aspect ratio.
+*/
+
+/*!
+ Constructs a new video widget.
+
+ The \a parent is passed to QWidget.
+*/
+QVideoWidget::QVideoWidget(QWidget *parent)
+ : QWidget(parent, 0)
+ , d_ptr(new QVideoWidgetPrivate)
+{
+ d_ptr->q_ptr = this;
+
+ QPalette palette = QWidget::palette();
+ palette.setColor(QPalette::Background, Qt::black);
+ setPalette(palette);
+}
+
+/*!
+ Destroys a video widget.
+*/
+QVideoWidget::~QVideoWidget()
+{
+ setMediaObject(0);
+ delete d_ptr;
+}
+
+/*!
+ \property QVideoWidget::mediaObject
+ \brief the media object which provides the video displayed by a widget.
+*/
+
+QMediaObject *QVideoWidget::mediaObject() const
+{
+ return d_func()->mediaObject;
+}
+
+void QVideoWidget::setMediaObject(QMediaObject *object)
+{
+ Q_D(QVideoWidget);
+
+ if (object == d->mediaObject)
+ return;
+
+ if (d->mediaObject) {
+ disconnect(d->mediaObject, SIGNAL(destroyed()), this, SLOT(_q_mediaObjectDestroyed()));
+ d->mediaObject->unbind(this);
+ }
+
+ d->clearService();
+
+ d->mediaObject = object;
+
+ if (d->mediaObject) {
+ d->service = d->mediaObject->service();
+
+ connect(d->mediaObject, SIGNAL(destroyed()), this, SLOT(_q_mediaObjectDestroyed()));
+ d->mediaObject->bind(this);
+ }
+
+ if (d->service) {
+ connect(d->service, SIGNAL(destroyed()), SLOT(_q_serviceDestroyed()));
+
+ d->outputControl = qobject_cast<QVideoOutputControl *>(
+ d->service->control(QVideoOutputControl_iid));
+
+ QVideoWidgetControl *widgetControl = qobject_cast<QVideoWidgetControl *>(
+ d->service->control(QVideoWidgetControl_iid));
+
+ if (widgetControl != 0) {
+ d->widgetBackend = new QVideoWidgetControlBackend(widgetControl, this);
+ } else {
+ QVideoWindowControl *windowControl = qobject_cast<QVideoWindowControl *>(
+ d->service->control(QVideoWindowControl_iid));
+
+ if (windowControl != 0)
+ d->windowBackend = new QWindowVideoWidgetBackend(windowControl, this);
+
+ QVideoRendererControl *rendererControl = qobject_cast<QVideoRendererControl *>(
+ d->service->control(QVideoRendererControl_iid));
+
+ if (rendererControl != 0)
+ d->rendererBackend = new QRendererVideoWidgetBackend(rendererControl, this);
+ }
+
+ if (isVisible())
+ d->show();
+ }
+}
+
+/*!
+ \property QVideoWidget::aspectRatioMode
+ \brief how video is scaled with respect to its aspect ratio.
+*/
+
+QVideoWidget::AspectRatioMode QVideoWidget::aspectRatioMode() const
+{
+ return d_func()->aspectRatioMode;
+}
+
+void QVideoWidget::setAspectRatioMode(QVideoWidget::AspectRatioMode mode)
+{
+ Q_D(QVideoWidget);
+
+ if (d->currentControl) {
+ d->currentControl->setAspectRatioMode(mode);
+ d->aspectRatioMode = d->currentControl->aspectRatioMode();
+ } else {
+ d->aspectRatioMode = mode;
+ }
+}
+
+/*!
+ \property QVideoWidget::fullScreen
+ \brief whether video display is confined to a window or is fullScreen.
+*/
+
+void QVideoWidget::setFullScreen(bool fullScreen)
+{
+ Q_D(QVideoWidget);
+
+ if (fullScreen) {
+ Qt::WindowFlags flags = windowFlags();
+
+ d->nonFullScreenFlags = flags & (Qt::Window | Qt::SubWindow);
+ flags |= Qt::Window;
+ flags &= ~Qt::SubWindow;
+ setWindowFlags(flags);
+
+ showFullScreen();
+ } else {
+ showNormal();
+ }
+}
+
+/*!
+ \fn QVideoWidget::fullScreenChanged(bool fullScreen)
+
+ Signals that the \a fullScreen mode of a video widget has changed.
+
+ \sa fullScreen
+*/
+
+/*!
+ \property QVideoWidget::brightness
+ \brief an adjustment to the brightness of displayed video.
+
+ Valid brightness values range between -100 and 100, the default is 0.
+*/
+
+int QVideoWidget::brightness() const
+{
+ return d_func()->brightness;
+}
+
+void QVideoWidget::setBrightness(int brightness)
+{
+ Q_D(QVideoWidget);
+
+ int boundedBrightness = qBound(-100, brightness, 100);
+
+ if (d->currentControl)
+ d->currentControl->setBrightness(boundedBrightness);
+ else if (d->brightness != boundedBrightness)
+ emit brightnessChanged(d->brightness = boundedBrightness);
+}
+
+/*!
+ \fn QVideoWidget::brightnessChanged(int brightness)
+
+ Signals that a video widgets's \a brightness adjustment has changed.
+
+ \sa brightness
+*/
+
+/*!
+ \property QVideoWidget::contrast
+ \brief an adjustment to the contrast of displayed video.
+
+ Valid contrast values range between -100 and 100, the default is 0.
+
+*/
+
+int QVideoWidget::contrast() const
+{
+ return d_func()->contrast;
+}
+
+void QVideoWidget::setContrast(int contrast)
+{
+ Q_D(QVideoWidget);
+
+ int boundedContrast = qBound(-100, contrast, 100);
+
+ if (d->currentControl)
+ d->currentControl->setContrast(boundedContrast);
+ else if (d->contrast != boundedContrast)
+ emit contrastChanged(d->contrast = boundedContrast);
+}
+
+/*!
+ \fn QVideoWidget::contrastChanged(int contrast)
+
+ Signals that a video widgets's \a contrast adjustment has changed.
+
+ \sa contrast
+*/
+
+/*!
+ \property QVideoWidget::hue
+ \brief an adjustment to the hue of displayed video.
+
+ Valid hue values range between -100 and 100, the default is 0.
+*/
+
+int QVideoWidget::hue() const
+{
+ return d_func()->hue;
+}
+
+void QVideoWidget::setHue(int hue)
+{
+ Q_D(QVideoWidget);
+
+ int boundedHue = qBound(-100, hue, 100);
+
+ if (d->currentControl)
+ d->currentControl->setHue(boundedHue);
+ else if (d->hue != boundedHue)
+ emit hueChanged(d->hue = boundedHue);
+}
+
+/*!
+ \fn QVideoWidget::hueChanged(int hue)
+
+ Signals that a video widgets's \a hue has changed.
+
+ \sa hue
+*/
+
+/*!
+ \property QVideoWidget::saturation
+ \brief an adjustment to the saturation of displayed video.
+
+ Valid saturation values range between -100 and 100, the default is 0.
+*/
+
+int QVideoWidget::saturation() const
+{
+ return d_func()->saturation;
+}
+
+void QVideoWidget::setSaturation(int saturation)
+{
+ Q_D(QVideoWidget);
+
+ int boundedSaturation = qBound(-100, saturation, 100);
+
+ if (d->currentControl)
+ d->currentControl->setSaturation(boundedSaturation);
+ else if (d->saturation != boundedSaturation)
+ emit saturationChanged(d->saturation = boundedSaturation);
+
+}
+
+/*!
+ \fn QVideoWidget::saturationChanged(int saturation)
+
+ Signals that a video widgets's \a saturation has changed.
+
+ \sa saturation
+*/
+
+/*!
+ Returns the size hint for the current back end,
+ if there is one, or else the size hint from QWidget.
+ */
+QSize QVideoWidget::sizeHint() const
+{
+ Q_D(const QVideoWidget);
+
+ if (d->currentBackend)
+ return d->currentBackend->sizeHint();
+ else
+ return QWidget::sizeHint();
+
+
+}
+
+/*!
+ \reimp
+ \internal
+ */
+bool QVideoWidget::event(QEvent *event)
+{
+ Q_D(QVideoWidget);
+
+ if (event->type() == QEvent::WindowStateChange) {
+ Qt::WindowFlags flags = windowFlags();
+
+ if (windowState() & Qt::WindowFullScreen) {
+ if (d->currentControl)
+ d->currentControl->setFullScreen(true);
+
+ if (!d->wasFullScreen)
+ emit fullScreenChanged(d->wasFullScreen = true);
+ } else {
+ if (d->currentControl)
+ d->currentControl->setFullScreen(false);
+
+ if (d->wasFullScreen) {
+ flags &= ~(Qt::Window | Qt::SubWindow); //clear the flags...
+ flags |= d->nonFullScreenFlags; //then we reset the flags (window and subwindow)
+ setWindowFlags(flags);
+
+ emit fullScreenChanged(d->wasFullScreen = false);
+ }
+ }
+ }
+ return QWidget::event(event);
+}
+
+/*!
+ Handles the show \a event.
+ */
+void QVideoWidget::showEvent(QShowEvent *event)
+{
+ Q_D(QVideoWidget);
+
+ QWidget::showEvent(event);
+
+ d->show();
+
+}
+
+/*!
+
+ Handles the hide \a event.
+*/
+void QVideoWidget::hideEvent(QHideEvent *event)
+{
+ Q_D(QVideoWidget);
+
+ if (d->currentBackend)
+ d->currentBackend->hideEvent(event);
+
+ QWidget::hideEvent(event);
+}
+
+/*!
+ Handles the resize \a event.
+ */
+void QVideoWidget::resizeEvent(QResizeEvent *event)
+{
+ Q_D(QVideoWidget);
+
+ QWidget::resizeEvent(event);
+
+ if (d->currentBackend)
+ d->currentBackend->resizeEvent(event);
+}
+
+/*!
+ Handles the move \a event.
+ */
+void QVideoWidget::moveEvent(QMoveEvent *event)
+{
+ Q_D(QVideoWidget);
+
+ if (d->currentBackend)
+ d->currentBackend->moveEvent(event);
+}
+
+/*!
+ Handles the paint \a event.
+ */
+void QVideoWidget::paintEvent(QPaintEvent *event)
+{
+ Q_D(QVideoWidget);
+
+ if (d->currentBackend)
+ d->currentBackend->paintEvent(event);
+}
+
+#include "moc_qvideowidget.cpp"
+#include "moc_qvideowidget_p.cpp"
+
+QT_END_NAMESPACE
+
diff --git a/src/multimedia/base/qvideowidget.h b/src/multimedia/base/qvideowidget.h
new file mode 100644
index 0000000000..4e6cf2e3ec
--- /dev/null
+++ b/src/multimedia/base/qvideowidget.h
@@ -0,0 +1,134 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QVIDEOWIDGET_H
+#define QVIDEOWIDGET_H
+
+#include <QtGui/qwidget.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+
+class QMediaObject;
+
+class QVideoWidgetPrivate;
+class Q_MULTIMEDIA_EXPORT QVideoWidget : public QWidget
+{
+ Q_OBJECT
+ Q_PROPERTY(QMediaObject* mediaObject READ mediaObject WRITE setMediaObject)
+ Q_PROPERTY(bool fullScreen READ isFullScreen WRITE setFullScreen NOTIFY fullScreenChanged)
+ Q_PROPERTY(AspectRatioMode aspectRatioMode READ aspectRatioMode WRITE setAspectRatioMode NOTIFY aspectRatioModeChanged)
+ Q_PROPERTY(int brightness READ brightness WRITE setBrightness NOTIFY brightnessChanged)
+ Q_PROPERTY(int contrast READ contrast WRITE setContrast NOTIFY contrastChanged)
+ Q_PROPERTY(int hue READ hue WRITE setHue NOTIFY hueChanged)
+ Q_PROPERTY(int saturation READ saturation WRITE setSaturation NOTIFY saturationChanged)
+ Q_ENUMS(AspectRatio)
+
+public:
+ enum AspectRatioMode { IgnoreAspectRatio, KeepAspectRatio };
+
+ QVideoWidget(QWidget *parent = 0);
+ ~QVideoWidget();
+
+ QMediaObject *mediaObject() const;
+ void setMediaObject(QMediaObject *object);
+
+#ifdef Q_QDOC
+ bool isFullScreen() const;
+#endif
+
+ AspectRatioMode aspectRatioMode() const;
+
+ int brightness() const;
+ int contrast() const;
+ int hue() const;
+ int saturation() const;
+
+ QSize sizeHint() const;
+
+public Q_SLOTS:
+ void setFullScreen(bool fullScreen);
+ void setAspectRatioMode(QVideoWidget::AspectRatioMode mode);
+ void setBrightness(int brightness);
+ void setContrast(int contrast);
+ void setHue(int hue);
+ void setSaturation(int saturation);
+
+Q_SIGNALS:
+ void fullScreenChanged(bool fullScreen);
+ void brightnessChanged(int brightness);
+ void contrastChanged(int contrast);
+ void hueChanged(int hue);
+ void saturationChanged(int saturation);
+
+protected:
+ bool event(QEvent *event);
+ void showEvent(QShowEvent *event);
+ void hideEvent(QHideEvent *event);
+ void resizeEvent(QResizeEvent *event);
+ void moveEvent(QMoveEvent *event);
+ void paintEvent(QPaintEvent *event);
+
+protected:
+ QVideoWidgetPrivate *d_ptr;
+
+private:
+ Q_DECLARE_PRIVATE(QVideoWidget)
+ Q_PRIVATE_SLOT(d_func(), void _q_serviceDestroyed())
+ Q_PRIVATE_SLOT(d_func(), void _q_mediaObjectDestroyed())
+ Q_PRIVATE_SLOT(d_func(), void _q_brightnessChanged(int))
+ Q_PRIVATE_SLOT(d_func(), void _q_contrastChanged(int))
+ Q_PRIVATE_SLOT(d_func(), void _q_hueChanged(int))
+ Q_PRIVATE_SLOT(d_func(), void _q_saturationChanged(int))
+ Q_PRIVATE_SLOT(d_func(), void _q_fullScreenChanged(bool))
+ Q_PRIVATE_SLOT(d_func(), void _q_dimensionsChanged());
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/multimedia/base/qvideowidget_p.h b/src/multimedia/base/qvideowidget_p.h
new file mode 100644
index 0000000000..4227afdbb1
--- /dev/null
+++ b/src/multimedia/base/qvideowidget_p.h
@@ -0,0 +1,265 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QVIDEOWIDGET_P_H
+#define QVIDEOWIDGET_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtMultimedia/qvideowidget.h>
+
+#ifndef QT_NO_OPENGL
+#include <QGLWidget>
+#endif
+
+#include "qpaintervideosurface_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+
+class QVideoWidgetControlInterface
+{
+public:
+ virtual ~QVideoWidgetControlInterface() {}
+
+ virtual void setBrightness(int brightness) = 0;
+ virtual void setContrast(int contrast) = 0;
+ virtual void setHue(int hue) = 0;
+ virtual void setSaturation(int saturation) = 0;
+
+ virtual void setFullScreen(bool fullScreen) = 0;
+
+ virtual QVideoWidget::AspectRatioMode aspectRatioMode() const = 0;
+ virtual void setAspectRatioMode(QVideoWidget::AspectRatioMode mode) = 0;
+};
+
+class QVideoWidgetBackend : public QObject, public QVideoWidgetControlInterface
+{
+ Q_OBJECT
+
+public:
+ virtual QSize sizeHint() const = 0;
+
+ virtual void showEvent() = 0;
+ virtual void hideEvent(QHideEvent *event) = 0;
+ virtual void resizeEvent(QResizeEvent *event) = 0;
+ virtual void moveEvent(QMoveEvent *event) = 0;
+ virtual void paintEvent(QPaintEvent *event) = 0;
+};
+
+class QVideoWidgetControl;
+
+class QVideoWidgetControlBackend : public QObject, public QVideoWidgetControlInterface
+{
+ Q_OBJECT
+public:
+ QVideoWidgetControlBackend(QVideoWidgetControl *control, QWidget *widget);
+
+ void setBrightness(int brightness);
+ void setContrast(int contrast);
+ void setHue(int hue);
+ void setSaturation(int saturation);
+
+ void setFullScreen(bool fullScreen);
+
+ QVideoWidget::AspectRatioMode aspectRatioMode() const;
+ void setAspectRatioMode(QVideoWidget::AspectRatioMode mode);
+
+private:
+ QVideoWidgetControl *m_widgetControl;
+};
+
+
+class QVideoRendererControl;
+
+class QRendererVideoWidgetBackend : public QVideoWidgetBackend
+{
+ Q_OBJECT
+public:
+ QRendererVideoWidgetBackend(QVideoRendererControl *control, QWidget *widget);
+ ~QRendererVideoWidgetBackend();
+
+ void clearSurface();
+
+ void setBrightness(int brightness);
+ void setContrast(int contrast);
+ void setHue(int hue);
+ void setSaturation(int saturation);
+
+ void setFullScreen(bool fullScreen);
+
+ QVideoWidget::AspectRatioMode aspectRatioMode() const;
+ void setAspectRatioMode(QVideoWidget::AspectRatioMode mode);
+
+ QSize sizeHint() const;
+
+ void showEvent();
+ void hideEvent(QHideEvent *event);
+ void resizeEvent(QResizeEvent *event);
+ void moveEvent(QMoveEvent *event);
+ void paintEvent(QPaintEvent *event);
+
+Q_SIGNALS:
+ void fullScreenChanged(bool fullScreen);
+ void brightnessChanged(int brightness);
+ void contrastChanged(int contrast);
+ void hueChanged(int hue);
+ void saturationChanged(int saturation);
+
+private:
+ QRect displayRect() const;
+
+ QVideoRendererControl *m_rendererControl;
+ QWidget *m_widget;
+ QPainterVideoSurface *m_surface;
+ QVideoWidget::AspectRatioMode m_aspectRatioMode;
+ QSize m_aspectRatio;
+ bool m_updatePaintDevice;
+};
+
+class QVideoWindowControl;
+
+class QWindowVideoWidgetBackend : public QVideoWidgetBackend
+{
+ Q_OBJECT
+public:
+ QWindowVideoWidgetBackend(QVideoWindowControl *control, QWidget *widget);
+ ~QWindowVideoWidgetBackend();
+
+ void setBrightness(int brightness);
+ void setContrast(int contrast);
+ void setHue(int hue);
+ void setSaturation(int saturation);
+
+ void setFullScreen(bool fullScreen);
+
+ QVideoWidget::AspectRatioMode aspectRatioMode() const;
+ void setAspectRatioMode(QVideoWidget::AspectRatioMode mode);
+
+ QSize sizeHint() const;
+
+ void showEvent();
+ void hideEvent(QHideEvent *event);
+ void resizeEvent(QResizeEvent *event);
+ void moveEvent(QMoveEvent *event);
+ void paintEvent(QPaintEvent *event);
+
+private:
+ QVideoWindowControl *m_windowControl;
+ QWidget *m_widget;
+ QVideoWidget::AspectRatioMode m_aspectRatioMode;
+ QSize m_pixelAspectRatio;
+};
+
+class QMediaService;
+class QVideoOutputControl;
+
+class QVideoWidgetPrivate
+{
+ Q_DECLARE_PUBLIC(QVideoWidget)
+public:
+ QVideoWidgetPrivate()
+ : q_ptr(0)
+ , mediaObject(0)
+ , service(0)
+ , outputControl(0)
+ , widgetBackend(0)
+ , windowBackend(0)
+ , rendererBackend(0)
+ , currentControl(0)
+ , currentBackend(0)
+ , brightness(0)
+ , contrast(0)
+ , hue(0)
+ , saturation(0)
+ , aspectRatioMode(QVideoWidget::KeepAspectRatio)
+ , nonFullScreenFlags(0)
+ , wasFullScreen(false)
+ {
+ }
+
+ QVideoWidget *q_ptr;
+ QMediaObject *mediaObject;
+ QMediaService *service;
+ QVideoOutputControl *outputControl;
+ QVideoWidgetControlBackend *widgetBackend;
+ QWindowVideoWidgetBackend *windowBackend;
+ QRendererVideoWidgetBackend *rendererBackend;
+ QVideoWidgetControlInterface *currentControl;
+ QVideoWidgetBackend *currentBackend;
+ int brightness;
+ int contrast;
+ int hue;
+ int saturation;
+ QVideoWidget::AspectRatioMode aspectRatioMode;
+ Qt::WindowFlags nonFullScreenFlags;
+ bool wasFullScreen;
+
+ void setCurrentControl(QVideoWidgetControlInterface *control);
+ void show();
+ void clearService();
+
+ void _q_serviceDestroyed();
+ void _q_mediaObjectDestroyed();
+ void _q_brightnessChanged(int brightness);
+ void _q_contrastChanged(int contrast);
+ void _q_hueChanged(int hue);
+ void _q_saturationChanged(int saturation);
+ void _q_fullScreenChanged(bool fullScreen);
+ void _q_dimensionsChanged();
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/multimedia/base/qvideowidgetcontrol.cpp b/src/multimedia/base/qvideowidgetcontrol.cpp
new file mode 100644
index 0000000000..c53c77bb22
--- /dev/null
+++ b/src/multimedia/base/qvideowidgetcontrol.cpp
@@ -0,0 +1,235 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtMultimedia/qvideowidgetcontrol.h>
+#include "qmediacontrol_p.h"
+
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QVideoWidgetControl
+ \preliminary
+ \since 4.7
+ \brief The QVideoWidgetControl class provides a media control which
+ implements a video widget.
+
+ \ingroup multimedia-serv
+
+ The videoWidget() property of QVideoWidgetControl provides a pointer to
+ a video widget implemented by the control's media service. This widget
+ is owned by the media service and so care should be taken not to delete it.
+
+ \code
+ QVideoWidgetControl *widgetControl = mediaService->control<QVideoWidgetControl *>();
+
+ layout->addWidget(widgetControl->widget());
+ \endcode
+
+ QVideoWidgetControl is one of number of possible video output controls,
+ in order to receive video it must be made the active video output
+ control by setting the output property of QVideoOutputControl to \l {QVideoOutputControl::WidgetOutput}{WidgetOutput}. Consequently any
+ QMediaService that implements QVideoWidgetControl must also implement
+ QVideoOutputControl.
+
+ The interface name of QVideoWidgetControl is \c com.nokia.Qt.QVideoWidgetControl/1.0 as
+ defined in QVideoWidgetControl_iid.
+
+ \sa QMediaService::control(), QVideoOutputControl, QVideoWidget
+*/
+
+/*!
+ \macro QVideoWidgetControl_iid
+
+ \c com.nokia.Qt.QVideoWidgetControl/1.0
+
+ Defines the interface name of the QVideoWidgetControl class.
+
+ \relates QVideoWidgetControl
+*/
+
+/*!
+ Constructs a new video widget control with the given \a parent.
+*/
+QVideoWidgetControl::QVideoWidgetControl(QObject *parent)
+ :QMediaControl(parent)
+{
+}
+
+/*!
+ Destroys a video widget control.
+*/
+QVideoWidgetControl::~QVideoWidgetControl()
+{
+}
+
+/*!
+ \fn QVideoWidgetControl::isFullScreen() const
+
+ Returns true if the video is shown using the complete screen.
+*/
+
+/*!
+ \fn QVideoWidgetControl::setFullScreen(bool fullScreen)
+
+ Sets whether a video widget is in \a fullScreen mode.
+*/
+
+/*!
+ \fn QVideoWidgetControl::fullScreenChanged(bool fullScreen)
+
+ Signals that the \a fullScreen state of a video widget has changed.
+*/
+
+/*!
+ \fn QVideoWidgetControl::aspectRatioMode() const
+
+ Returns how video is scaled to fit the widget with respect to its aspect ratio.
+*/
+
+/*!
+ \fn QVideoWidgetControl::setAspectRatioMode(QVideoWidget::AspectRatioMode mode)
+
+ Sets the aspect ratio \a mode which determines how video is scaled to the fit the widget with
+ respect to its aspect ratio.
+*/
+
+/*!
+ \fn QVideoWidgetControl::brightness() const
+
+ Returns the brightness adjustment applied to a video.
+
+ Valid brightness values range between -100 and 100, the default is 0.
+*/
+
+/*!
+ \fn QVideoWidgetControl::setBrightness(int brightness)
+
+ Sets a \a brightness adjustment for a video.
+
+ Valid brightness values range between -100 and 100, the default is 0.
+*/
+
+/*!
+ \fn QVideoWidgetControl::brightnessChanged(int brightness)
+
+ Signals that a video widget's \a brightness adjustment has changed.
+*/
+
+/*!
+ \fn QVideoWidgetControl::contrast() const
+
+ Returns the contrast adjustment applied to a video.
+
+ Valid contrast values range between -100 and 100, the default is 0.
+*/
+
+/*!
+ \fn QVideoWidgetControl::setContrast(int contrast)
+
+ Sets the contrast adjustment for a video widget to \a contrast.
+
+ Valid contrast values range between -100 and 100, the default is 0.
+*/
+
+
+/*!
+ \fn QVideoWidgetControl::contrastChanged(int contrast)
+
+ Signals that a video widget's \a contrast adjustment has changed.
+*/
+
+/*!
+ \fn QVideoWidgetControl::hue() const
+
+ Returns the hue adjustment applied to a video widget.
+
+ Value hue values range between -100 and 100, the default is 0.
+*/
+
+/*!
+ \fn QVideoWidgetControl::setHue(int hue)
+
+ Sets a \a hue adjustment for a video widget.
+
+ Valid hue values range between -100 and 100, the default is 0.
+*/
+
+
+/*!
+ \fn QVideoWidgetControl::hueChanged(int hue)
+
+ Signals that a video widget's \a hue adjustment has changed.
+*/
+
+/*!
+ \fn QVideoWidgetControl::saturation() const
+
+ Returns the saturation adjustment applied to a video widget.
+
+ Value saturation values range between -100 and 100, the default is 0.
+*/
+
+
+/*!
+ \fn QVideoWidgetControl::setSaturation(int saturation)
+
+ Sets a \a saturation adjustment for a video widget.
+
+ Valid saturation values range between -100 and 100, the default is 0.
+*/
+
+/*!
+ \fn QVideoWidgetControl::saturationChanged(int saturation)
+
+ Signals that a video widget's \a saturation adjustment has changed.
+*/
+
+/*!
+ \fn QVideoWidgetControl::videoWidget()
+
+ Returns the QWidget.
+*/
+
+#include "moc_qvideowidgetcontrol.cpp"
+
+QT_END_NAMESPACE
+
diff --git a/src/multimedia/base/qvideowidgetcontrol.h b/src/multimedia/base/qvideowidgetcontrol.h
new file mode 100644
index 0000000000..6981e895a8
--- /dev/null
+++ b/src/multimedia/base/qvideowidgetcontrol.h
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QVIDEOWIDGETCONTROL_H
+#define QVIDEOWIDGETCONTROL_H
+
+#include <QtGui/qwidget.h>
+
+#include <QtMultimedia/qvideowidget.h>
+#include <QtMultimedia/qmediacontrol.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+
+class QVideoWidgetControlPrivate;
+
+class Q_MULTIMEDIA_EXPORT QVideoWidgetControl : public QMediaControl
+{
+ Q_OBJECT
+
+public:
+ virtual ~QVideoWidgetControl();
+
+ virtual QWidget *videoWidget() = 0;
+
+ virtual QVideoWidget::AspectRatioMode aspectRatioMode() const = 0;
+ virtual void setAspectRatioMode(QVideoWidget::AspectRatioMode mode) = 0;
+
+ virtual bool isFullScreen() const = 0;
+ virtual void setFullScreen(bool fullScreen) = 0;
+
+ virtual int brightness() const = 0;
+ virtual void setBrightness(int brightness) = 0;
+
+ virtual int contrast() const = 0;
+ virtual void setContrast(int contrast) = 0;
+
+ virtual int hue() const = 0;
+ virtual void setHue(int hue) = 0;
+
+ virtual int saturation() const = 0;
+ virtual void setSaturation(int saturation) = 0;
+
+Q_SIGNALS:
+ void fullScreenChanged(bool fullScreen);
+ void brightnessChanged(int brightness);
+ void contrastChanged(int contrast);
+ void hueChanged(int hue);
+ void saturationChanged(int saturation);
+
+protected:
+ QVideoWidgetControl(QObject *parent = 0);
+};
+
+#define QVideoWidgetControl_iid "com.nokia.Qt.QVideoWidgetControl/1.0"
+Q_MEDIA_DECLARE_CONTROL(QVideoWidgetControl, QVideoWidgetControl_iid)
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/multimedia/base/qvideowindowcontrol.cpp b/src/multimedia/base/qvideowindowcontrol.cpp
new file mode 100644
index 0000000000..da46823e1a
--- /dev/null
+++ b/src/multimedia/base/qvideowindowcontrol.cpp
@@ -0,0 +1,275 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtMultimedia/qvideowindowcontrol.h>
+
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QVideoWindowControl
+ \preliminary
+ \since 4.7
+ \ingroup multimedia-serv
+ \brief The QVideoWindowControl class provides a media control for rendering video to a window.
+
+
+ The winId() property QVideoWindowControl allows a platform specific
+ window ID to be set as the video render target of a QMediaService. The
+ displayRect() property is used to set the region of the window the
+ video should be rendered to, and the aspectRatioMode() property
+ indicates how the video should be scaled to fit the displayRect().
+
+ \code
+ QVideoWindowControl *windowControl = mediaService->control<QVideoWindowControl *>();
+ windowControl->setWinId(widget->winId());
+ windowControl->setDisplayRect(widget->rect());
+ windowControl->setAspectRatioMode(QVideoWidget::KeepAspectRatio);
+ \endcode
+
+ QVideoWindowControl is one of number of possible video output controls,
+ in order to receive video it must be made the active video output
+ control by setting the output property of QVideoOutputControl to \l {QVideoOutputControl::WindowOutput}{WindowOutput}.
+ Consequently any QMediaService that implements QVideoWindowControl must
+ also implement QVideoOutputControl.
+
+ \code
+ QVideoOutputControl *outputControl = mediaService->control<QVideoOutputControl *>();
+ outputControl->setOutput(QVideoOutputControl::WindowOutput);
+ \endcode
+
+ The interface name of QVideoWindowControl is \c com.nokia.Qt.QVideoWindowControl/1.0 as
+ defined in QVideoWindowControl_iid.
+
+ \sa QMediaService::control(), QVideoOutputControl, QVideoWidget
+*/
+
+/*!
+ \macro QVideoWindowControl_iid
+
+ \c com.nokia.Qt.QVideoWindowControl/1.0
+
+ Defines the interface name of the QVideoWindowControl class.
+
+ \relates QVideoWindowControl
+*/
+
+/*!
+ Constructs a new video window control with the given \a parent.
+*/
+QVideoWindowControl::QVideoWindowControl(QObject *parent)
+ : QMediaControl(parent)
+{
+}
+
+/*!
+ Destroys a video window control.
+*/
+QVideoWindowControl::~QVideoWindowControl()
+{
+}
+
+/*!
+ \fn QVideoWindowControl::winId() const
+
+ Returns the ID of the window a video overlay end point renders to.
+*/
+
+/*!
+ \fn QVideoWindowControl::setWinId(WId id)
+
+ Sets the \a id of the window a video overlay end point renders to.
+*/
+
+/*!
+ \fn QVideoWindowControl::displayRect() const
+ Returns the sub-rect of a window where video is displayed.
+*/
+
+/*!
+ \fn QVideoWindowControl::setDisplayRect(const QRect &rect)
+ Sets the sub-\a rect of a window where video is displayed.
+*/
+
+/*!
+ \fn QVideoWindowControl::isFullScreen() const
+
+ Identifies if a video overlay is a fullScreen overlay.
+
+ Returns true if the video overlay is fullScreen, and false otherwise.
+*/
+
+/*!
+ \fn QVideoWindowControl::setFullScreen(bool fullScreen)
+
+ Sets whether a video overlay is a \a fullScreen overlay.
+*/
+
+/*!
+ \fn QVideoWindowControl::fullScreenChanged(bool fullScreen)
+
+ Signals that the \a fullScreen state of a video overlay has changed.
+*/
+
+/*!
+ \fn QVideoWindowControl::repaint()
+
+ Repaints the last frame.
+*/
+
+/*!
+ \fn QVideoWindowControl::nativeSize() const
+
+ Returns a suggested size for the video display based on the resolution and aspect ratio of the
+ video.
+*/
+
+/*!
+ \fn QVideoWindowControl::nativeSizeChanged()
+
+ Signals that the native dimensions of the video have changed.
+*/
+
+
+/*!
+ \fn QVideoWindowControl::aspectRatioMode() const
+
+ Returns how video is scaled to fit the display region with respect to its aspect ratio.
+*/
+
+/*!
+ \fn QVideoWindowControl::setAspectRatioMode(QVideoWidget::AspectRatioMode mode)
+
+ Sets the aspect ratio \a mode which determines how video is scaled to the fit the display region
+ with respect to its aspect ratio.
+*/
+
+/*!
+ \fn QVideoWindowControl::brightness() const
+
+ Returns the brightness adjustment applied to a video overlay.
+
+ Valid brightness values range between -100 and 100, the default is 0.
+*/
+
+/*!
+ \fn QVideoWindowControl::setBrightness(int brightness)
+
+ Sets a \a brightness adjustment for a video overlay.
+
+ Valid brightness values range between -100 and 100, the default is 0.
+*/
+
+/*!
+ \fn QVideoWindowControl::brightnessChanged(int brightness)
+
+ Signals that a video overlay's \a brightness adjustment has changed.
+*/
+
+/*!
+ \fn QVideoWindowControl::contrast() const
+
+ Returns the contrast adjustment applied to a video overlay.
+
+ Valid contrast values range between -100 and 100, the default is 0.
+*/
+
+/*!
+ \fn QVideoWindowControl::setContrast(int contrast)
+
+ Sets the \a contrast adjustment for a video overlay.
+
+ Valid contrast values range between -100 and 100, the default is 0.
+*/
+
+/*!
+ \fn QVideoWindowControl::contrastChanged(int contrast)
+
+ Signals that a video overlay's \a contrast adjustment has changed.
+*/
+
+/*!
+ \fn QVideoWindowControl::hue() const
+
+ Returns the hue adjustment applied to a video overlay.
+
+ Value hue values range between -100 and 100, the default is 0.
+*/
+
+/*!
+ \fn QVideoWindowControl::setHue(int hue)
+
+ Sets a \a hue adjustment for a video overlay.
+
+ Valid hue values range between -100 and 100, the default is 0.
+*/
+
+/*!
+ \fn QVideoWindowControl::hueChanged(int hue)
+
+ Signals that a video overlay's \a hue adjustment has changed.
+*/
+
+/*!
+ \fn QVideoWindowControl::saturation() const
+
+ Returns the saturation adjustment applied to a video overlay.
+
+ Value saturation values range between -100 and 100, the default is 0.
+*/
+
+/*!
+ \fn QVideoWindowControl::setSaturation(int saturation)
+ Sets a \a saturation adjustment for a video overlay.
+
+ Valid saturation values range between -100 and 100, the default is 0.
+*/
+
+/*!
+ \fn QVideoWindowControl::saturationChanged(int saturation)
+
+ Signals that a video overlay's \a saturation adjustment has changed.
+*/
+
+#include "moc_qvideowindowcontrol.cpp"
+
+QT_END_NAMESPACE
+
diff --git a/src/multimedia/base/qvideowindowcontrol.h b/src/multimedia/base/qvideowindowcontrol.h
new file mode 100644
index 0000000000..9ee96ab726
--- /dev/null
+++ b/src/multimedia/base/qvideowindowcontrol.h
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QVIDEOWINDOWCONTROL_H
+#define QVIDEOWINDOWCONTROL_H
+
+#include <QtGui/qwidget.h>
+
+#include <QtMultimedia/qmediacontrol.h>
+#include <QtMultimedia/qvideowidget.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+
+class Q_MULTIMEDIA_EXPORT QVideoWindowControl : public QMediaControl
+{
+ Q_OBJECT
+
+public:
+ ~QVideoWindowControl();
+
+ virtual WId winId() const = 0;
+ virtual void setWinId(WId id) = 0;
+
+ virtual QRect displayRect() const = 0;
+ virtual void setDisplayRect(const QRect &rect) = 0;
+
+ virtual bool isFullScreen() const = 0;
+ virtual void setFullScreen(bool fullScreen) = 0;
+
+ virtual void repaint() = 0;
+
+ virtual QSize nativeSize() const = 0;
+
+ virtual QVideoWidget::AspectRatioMode aspectRatioMode() const = 0;
+ virtual void setAspectRatioMode(QVideoWidget::AspectRatioMode mode) = 0;
+
+ virtual int brightness() const = 0;
+ virtual void setBrightness(int brightness) = 0;
+
+ virtual int contrast() const = 0;
+ virtual void setContrast(int contrast) = 0;
+
+ virtual int hue() const = 0;
+ virtual void setHue(int hue) = 0;
+
+ virtual int saturation() const = 0;
+ virtual void setSaturation(int saturation) = 0;
+
+Q_SIGNALS:
+ void fullScreenChanged(bool fullScreen);
+ void brightnessChanged(int brightness);
+ void contrastChanged(int contrast);
+ void hueChanged(int hue);
+ void saturationChanged(int saturation);
+ void nativeSizeChanged();
+
+protected:
+ QVideoWindowControl(QObject *parent = 0);
+};
+
+#define QVideoWindowControl_iid "com.nokia.Qt.QVideoWindowControl/1.0"
+Q_MEDIA_DECLARE_CONTROL(QVideoWindowControl, QVideoWindowControl_iid)
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/multimedia/effects/effects.pri b/src/multimedia/effects/effects.pri
new file mode 100644
index 0000000000..be2b6967c6
--- /dev/null
+++ b/src/multimedia/effects/effects.pri
@@ -0,0 +1,25 @@
+
+
+unix:!mac {
+ contains(QT_CONFIG, pulseaudio) {
+ DEFINES += QT_MULTIMEDIA_PULSEAUDIO
+ HEADERS += $$PWD/qsoundeffect_pulse_p.h
+ SOURCES += $$PWD/qsoundeffect_pulse_p.cpp
+ LIBS += -lpulse
+ } else {
+ DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER
+ HEADERS += $$PWD/qsoundeffect_qmedia_p.h
+ SOURCES += $$PWD/qsoundeffect_qmedia_p.cpp
+ }
+} else {
+ HEADERS += $$PWD/qsoundeffect_qsound_p.h
+ SOURCES += $$PWD/qsoundeffect_qsound_p.cpp
+}
+
+HEADERS += \
+ $$PWD/qsoundeffect_p.h \
+ $$PWD/wavedecoder_p.h
+
+SOURCES += \
+ $$PWD/qsoundeffect.cpp \
+ $$PWD/wavedecoder_p.cpp
diff --git a/src/multimedia/effects/qsoundeffect.cpp b/src/multimedia/effects/qsoundeffect.cpp
new file mode 100644
index 0000000000..53cad8e363
--- /dev/null
+++ b/src/multimedia/effects/qsoundeffect.cpp
@@ -0,0 +1,200 @@
+/****************************************************************************
+**
+** 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 QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qsoundeffect_p.h"
+
+#if defined(QT_MULTIMEDIA_PULSEAUDIO)
+#include "qsoundeffect_pulse_p.h"
+#elif(QT_MULTIMEDIA_QMEDIAPLAYER)
+#include "qsoundeffect_qmedia_p.h"
+#else
+#include "qsoundeffect_qsound_p.h"
+#endif
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \qmlclass SoundEffect QSoundEffect
+ \since 4.7
+ \brief The SoundEffect element provides a way to play sound effects in qml.
+
+ The following example plays a wav file on mouse click.
+
+ \qml
+ SoundEffect {
+ id: playSound
+ source: "test.wav"
+ }
+ MouseArea {
+ id: playArea
+ anchors.fill: parent
+ onPressed: {
+ playSound.play()
+ }
+ }
+ \endqml
+*/
+
+/*!
+ \qmlproperty QUrl SoundEffect::source
+
+ This property provides a way to control the sound to play.
+*/
+
+/*!
+ \qmlproperty int SoundEffect::loopCount
+
+ This property provides a way to control the number of times to repeat the sound on each play().
+*/
+
+/*!
+ \qmlproperty int SoundEffect::volume
+
+ This property provides a way to control the volume for playback.
+*/
+
+/*!
+ \qmlproperty bool SoundEffect::muted
+
+ This property provides a way to control muting.
+*/
+
+/*!
+ \qmlsignal SoundEffect::sourceChanged()
+
+ This handler is called when the source has changed.
+*/
+
+/*!
+ \qmlsignal SoundEffect::loopCountChanged()
+
+ This handler is called when the number of loops has changes.
+*/
+
+/*!
+ \qmlsignal SoundEffect::volumeChanged()
+
+ This handler is called when the volume has changed.
+*/
+
+/*!
+ \qmlsignal SoundEffect::mutedChanged()
+
+ This handler is called when the mute state has changed.
+*/
+
+
+QSoundEffect::QSoundEffect(QObject *parent) :
+ QObject(parent)
+{
+ d = new QSoundEffectPrivate(this);
+ connect(d, SIGNAL(volumeChanged()), SIGNAL(volumeChanged()));
+ connect(d, SIGNAL(mutedChanged()), SIGNAL(mutedChanged()));
+}
+
+QSoundEffect::~QSoundEffect()
+{
+ d->deleteLater();
+}
+
+QUrl QSoundEffect::source() const
+{
+ return d->source();
+}
+
+void QSoundEffect::setSource(const QUrl &url)
+{
+ if (d->source() == url)
+ return;
+
+ d->setSource(url);
+
+ emit sourceChanged();
+}
+
+int QSoundEffect::loopCount() const
+{
+ return d->loopCount();
+}
+
+void QSoundEffect::setLoopCount(int loopCount)
+{
+ if (d->loopCount() == loopCount)
+ return;
+
+ d->setLoopCount(loopCount);
+ emit loopCountChanged();
+}
+
+int QSoundEffect::volume() const
+{
+ return d->volume();
+}
+
+void QSoundEffect::setVolume(int volume)
+{
+ if (d->volume() == volume)
+ return;
+
+ d->setVolume(volume);
+ emit volumeChanged();
+}
+
+bool QSoundEffect::isMuted() const
+{
+ return d->isMuted();
+}
+
+void QSoundEffect::setMuted(bool muted)
+{
+ if (d->isMuted() == muted)
+ return;
+
+ d->setMuted(muted);
+ emit mutedChanged();
+}
+
+void QSoundEffect::play()
+{
+ d->play();
+}
+
+QT_END_NAMESPACE
diff --git a/src/multimedia/effects/qsoundeffect_p.h b/src/multimedia/effects/qsoundeffect_p.h
new file mode 100644
index 0000000000..ec6a2f7b5a
--- /dev/null
+++ b/src/multimedia/effects/qsoundeffect_p.h
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** 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 QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QSOUNDEFFECT_H
+#define QSOUNDEFFECT_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+
+#include <QtCore/qobject.h>
+#include <QtCore/qurl.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QSoundEffectPrivate;
+class Q_MULTIMEDIA_EXPORT QSoundEffect : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
+ Q_PROPERTY(int loopCount READ loopCount WRITE setLoopCount NOTIFY loopCountChanged)
+ Q_PROPERTY(int volume READ volume WRITE setVolume NOTIFY volumeChanged)
+ Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged)
+
+public:
+ explicit QSoundEffect(QObject *parent = 0);
+ ~QSoundEffect();
+
+ QUrl source() const;
+ void setSource(const QUrl &url);
+
+ int loopCount() const;
+ void setLoopCount(int loopCount);
+
+ int volume() const;
+ void setVolume(int volume);
+
+ bool isMuted() const;
+ void setMuted(bool muted);
+
+Q_SIGNALS:
+ void sourceChanged();
+ void loopCountChanged();
+ void volumeChanged();
+ void mutedChanged();
+
+public Q_SLOTS:
+ void play();
+
+private:
+ Q_DISABLE_COPY(QSoundEffect)
+ QSoundEffectPrivate* d;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+
+#endif // QSOUNDEFFECT_H
diff --git a/src/multimedia/effects/qsoundeffect_pulse_p.cpp b/src/multimedia/effects/qsoundeffect_pulse_p.cpp
new file mode 100644
index 0000000000..e37925973d
--- /dev/null
+++ b/src/multimedia/effects/qsoundeffect_pulse_p.cpp
@@ -0,0 +1,499 @@
+/****************************************************************************
+**
+** 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 QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qcoreapplication.h>
+#include <QtMultimedia/qaudioformat.h>
+#include <QtNetwork>
+#include <QTime>
+
+#include "wavedecoder_p.h"
+
+#include "qsoundeffect_pulse_p.h"
+
+#if defined(Q_WS_MAEMO_5)
+#include <pulse/ext-stream-restore.h>
+#endif
+
+#include <unistd.h>
+
+// Less than ideal
+#define PA_SCACHE_ENTRY_SIZE_MAX (1024*1024*16)
+
+QT_BEGIN_NAMESPACE
+
+namespace
+{
+inline pa_sample_spec audioFormatToSampleSpec(const QAudioFormat &format)
+{
+ pa_sample_spec spec;
+
+ spec.rate = format.frequency();
+ spec.channels = format.channels();
+
+ if (format.sampleSize() == 8)
+ spec.format = PA_SAMPLE_U8;
+ else if (format.sampleSize() == 16) {
+ switch (format.byteOrder()) {
+ case QAudioFormat::BigEndian: spec.format = PA_SAMPLE_S16BE; break;
+ case QAudioFormat::LittleEndian: spec.format = PA_SAMPLE_S16LE; break;
+ }
+ }
+ else if (format.sampleSize() == 32) {
+ switch (format.byteOrder()) {
+ case QAudioFormat::BigEndian: spec.format = PA_SAMPLE_S32BE; break;
+ case QAudioFormat::LittleEndian: spec.format = PA_SAMPLE_S32LE; break;
+ }
+ }
+
+ return spec;
+}
+
+class PulseDaemon
+{
+public:
+ PulseDaemon():m_prepared(false)
+ {
+ prepare();
+ }
+
+ ~PulseDaemon()
+ {
+ if (m_prepared)
+ release();
+ }
+
+ inline void lock()
+ {
+ pa_threaded_mainloop_lock(m_mainLoop);
+ }
+
+ inline void unlock()
+ {
+ pa_threaded_mainloop_unlock(m_mainLoop);
+ }
+
+ inline pa_context *context() const
+ {
+ return m_context;
+ }
+
+ int volume()
+ {
+ return m_vol;
+ }
+
+private:
+ void prepare()
+ {
+ m_vol = 100;
+
+ m_mainLoop = pa_threaded_mainloop_new();
+ if (m_mainLoop == 0) {
+ qWarning("PulseAudioService: unable to create pulseaudio mainloop");
+ return;
+ }
+
+ if (pa_threaded_mainloop_start(m_mainLoop) != 0) {
+ qWarning("PulseAudioService: unable to start pulseaudio mainloop");
+ pa_threaded_mainloop_free(m_mainLoop);
+ return;
+ }
+
+ m_mainLoopApi = pa_threaded_mainloop_get_api(m_mainLoop);
+
+ lock();
+ m_context = pa_context_new(m_mainLoopApi, QString(QLatin1String("QtPulseAudio:%1")).arg(::getpid()).toAscii().constData());
+
+#if defined(Q_WS_MAEMO_5)
+ pa_context_set_state_callback(m_context, context_state_callback, this);
+#endif
+ if (m_context == 0) {
+ qWarning("PulseAudioService: Unable to create new pulseaudio context");
+ pa_threaded_mainloop_free(m_mainLoop);
+ return;
+ }
+
+ if (pa_context_connect(m_context, NULL, (pa_context_flags_t)0, NULL) < 0) {
+ qWarning("PulseAudioService: pa_context_connect() failed");
+ pa_context_unref(m_context);
+ pa_threaded_mainloop_free(m_mainLoop);
+ return;
+ }
+ unlock();
+
+ m_prepared = true;
+ }
+
+ void release()
+ {
+ if (!m_prepared) return;
+ pa_threaded_mainloop_stop(m_mainLoop);
+ pa_threaded_mainloop_free(m_mainLoop);
+ m_prepared = false;
+ }
+
+#if defined(Q_WS_MAEMO_5)
+ static void context_state_callback(pa_context *c, void *userdata)
+ {
+ PulseDaemon *self = reinterpret_cast<PulseDaemon*>(userdata);
+ switch (pa_context_get_state(c)) {
+ case PA_CONTEXT_CONNECTING:
+ case PA_CONTEXT_AUTHORIZING:
+ case PA_CONTEXT_SETTING_NAME:
+ break;
+ case PA_CONTEXT_READY:
+ pa_ext_stream_restore_set_subscribe_cb(c, &stream_restore_monitor_callback, self);
+ pa_ext_stream_restore_subscribe(c, 1, NULL, self);
+ break;
+ default:
+ break;
+ }
+ }
+ static void stream_restore_monitor_callback(pa_context *c, void *userdata)
+ {
+ PulseDaemon *self = reinterpret_cast<PulseDaemon*>(userdata);
+ pa_ext_stream_restore2_read(c, &stream_restore_info_callback, self);
+ }
+ static void stream_restore_info_callback(pa_context *c, const pa_ext_stream_restore2_info *info,
+ int eol, void *userdata)
+ {
+ Q_UNUSED(c)
+
+ PulseDaemon *self = reinterpret_cast<PulseDaemon*>(userdata);
+
+ if (!eol) {
+ if (QString(info->name).startsWith(QLatin1String("sink-input-by-media-role:x-maemo"))) {
+ const unsigned str_length = 256;
+ char str[str_length];
+ pa_cvolume_snprint(str, str_length, &info->volume);
+ self->m_vol = QString(str).replace(" ","").replace("%","").mid(2).toInt();
+ }
+ }
+ }
+#endif
+
+ int m_vol;
+ bool m_prepared;
+ pa_context *m_context;
+ pa_threaded_mainloop *m_mainLoop;
+ pa_mainloop_api *m_mainLoopApi;
+};
+}
+
+Q_GLOBAL_STATIC(PulseDaemon, daemon)
+
+
+QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent):
+ QObject(parent),
+ m_retry(false),
+ m_muted(false),
+ m_playQueued(false),
+ m_sampleLoaded(false),
+ m_volume(100),
+ m_duration(0),
+ m_dataUploaded(0),
+ m_loopCount(1),
+ m_runningCount(0),
+ m_reply(0),
+ m_stream(0),
+ m_networkAccessManager(0)
+{
+}
+
+QSoundEffectPrivate::~QSoundEffectPrivate()
+{
+ m_reply->deleteLater();
+ unloadSample();
+}
+
+QUrl QSoundEffectPrivate::source() const
+{
+ return m_source;
+}
+
+void QSoundEffectPrivate::setSource(const QUrl &url)
+{
+ if (url.isEmpty()) {
+ m_source = QUrl();
+ unloadSample();
+ return;
+ }
+
+ m_source = url;
+
+ if (m_networkAccessManager == 0)
+ m_networkAccessManager = new QNetworkAccessManager(this);
+
+ m_stream = m_networkAccessManager->get(QNetworkRequest(m_source));
+
+ unloadSample();
+ loadSample();
+}
+
+int QSoundEffectPrivate::loopCount() const
+{
+ return m_loopCount;
+}
+
+void QSoundEffectPrivate::setLoopCount(int loopCount)
+{
+ m_loopCount = loopCount;
+}
+
+int QSoundEffectPrivate::volume() const
+{
+ return m_volume;
+}
+
+void QSoundEffectPrivate::setVolume(int volume)
+{
+ m_volume = volume;
+}
+
+bool QSoundEffectPrivate::isMuted() const
+{
+ return m_muted;
+}
+
+void QSoundEffectPrivate::setMuted(bool muted)
+{
+ m_muted = muted;
+}
+
+void QSoundEffectPrivate::play()
+{
+ if (m_retry) {
+ m_retry = false;
+ setSource(m_source);
+ return;
+ }
+
+ if (!m_sampleLoaded) {
+ m_playQueued = true;
+ return;
+ }
+
+ m_runningCount += m_loopCount;
+
+ playSample();
+}
+
+void QSoundEffectPrivate::decoderReady()
+{
+ if (m_waveDecoder->size() >= PA_SCACHE_ENTRY_SIZE_MAX) {
+ m_waveDecoder->deleteLater();
+ qWarning("QSoundEffect(pulseaudio): Attempting to load to large a sample");
+ return;
+ }
+
+ if (m_name.isNull())
+ m_name = QString(QLatin1String("QtPulseSample-%1-%2")).arg(::getpid()).arg(quintptr(this)).toUtf8();
+
+ pa_sample_spec spec = audioFormatToSampleSpec(m_waveDecoder->audioFormat());
+
+ daemon()->lock();
+ pa_stream *stream = pa_stream_new(daemon()->context(), m_name.constData(), &spec, 0);
+ pa_stream_set_state_callback(stream, stream_state_callback, this);
+ pa_stream_set_write_callback(stream, stream_write_callback, this);
+ pa_stream_connect_upload(stream, (size_t)m_waveDecoder->size());
+ m_pulseStream = stream;
+ daemon()->unlock();
+}
+
+void QSoundEffectPrivate::decoderError()
+{
+ qWarning("QSoundEffect(pulseaudio): Error decoding source");
+}
+
+void QSoundEffectPrivate::checkPlayTime()
+{
+ int elapsed = m_playbackTime.elapsed();
+
+ if (elapsed < m_duration)
+ startTimer(m_duration - elapsed);
+}
+
+void QSoundEffectPrivate::loadSample()
+{
+ m_sampleLoaded = false;
+ m_dataUploaded = 0;
+ m_waveDecoder = new WaveDecoder(m_stream);
+ connect(m_waveDecoder, SIGNAL(formatKnown()), SLOT(decoderReady()));
+ connect(m_waveDecoder, SIGNAL(invalidFormat()), SLOT(decoderError()));
+}
+
+void QSoundEffectPrivate::unloadSample()
+{
+ if (!m_sampleLoaded)
+ return;
+
+ daemon()->lock();
+ pa_context_remove_sample(daemon()->context(), m_name.constData(), NULL, NULL);
+ daemon()->unlock();
+
+ m_duration = 0;
+ m_dataUploaded = 0;
+ m_sampleLoaded = false;
+}
+
+void QSoundEffectPrivate::uploadSample()
+{
+ daemon()->lock();
+
+ size_t bufferSize = qMin(pa_stream_writable_size(m_pulseStream),
+ size_t(m_waveDecoder->bytesAvailable()));
+ char buffer[bufferSize];
+
+ size_t len = 0;
+ while (len < (m_waveDecoder->size())) {
+ qint64 read = m_waveDecoder->read(buffer, qMin((int)bufferSize,
+ (int)(m_waveDecoder->size()-len)));
+ if (read > 0) {
+ if (pa_stream_write(m_pulseStream, buffer, size_t(read), 0, 0, PA_SEEK_RELATIVE) == 0)
+ len += size_t(read);
+ else
+ break;
+ }
+ }
+
+ m_dataUploaded += len;
+ pa_stream_set_write_callback(m_pulseStream, NULL, NULL);
+
+ if (m_waveDecoder->size() == m_dataUploaded) {
+ int err = pa_stream_finish_upload(m_pulseStream);
+ if(err != 0) {
+ qWarning("pa_stream_finish_upload() err=%d",err);
+ pa_stream_disconnect(m_pulseStream);
+ m_retry = true;
+ m_playQueued = false;
+ QMetaObject::invokeMethod(this, "play");
+ daemon()->unlock();
+ return;
+ }
+ m_duration = m_waveDecoder->duration();
+ m_waveDecoder->deleteLater();
+ m_stream->deleteLater();
+ m_sampleLoaded = true;
+ if (m_playQueued) {
+ m_playQueued = false;
+ QMetaObject::invokeMethod(this, "play");
+ }
+ }
+ daemon()->unlock();
+}
+
+void QSoundEffectPrivate::playSample()
+{
+ pa_volume_t volume = PA_VOLUME_NORM;
+
+ daemon()->lock();
+#ifdef Q_WS_MAEMO_5
+ volume = PA_VOLUME_NORM / 100 * ((daemon()->volume() + m_volume) / 2);
+#endif
+ pa_operation_unref(
+ pa_context_play_sample(daemon()->context(),
+ m_name.constData(),
+ 0,
+ volume,
+ play_callback,
+ this)
+ );
+ daemon()->unlock();
+
+ m_playbackTime.start();
+}
+
+void QSoundEffectPrivate::timerEvent(QTimerEvent *event)
+{
+ if (m_runningCount > 0)
+ playSample();
+
+ killTimer(event->timerId());
+}
+
+void QSoundEffectPrivate::stream_write_callback(pa_stream *s, size_t length, void *userdata)
+{
+ Q_UNUSED(length);
+
+ QSoundEffectPrivate *self = reinterpret_cast<QSoundEffectPrivate*>(userdata);
+
+ QMetaObject::invokeMethod(self, "uploadSample", Qt::QueuedConnection);
+}
+
+void QSoundEffectPrivate::stream_state_callback(pa_stream *s, void *userdata)
+{
+ switch (pa_stream_get_state(s)) {
+ case PA_STREAM_CREATING:
+ case PA_STREAM_READY:
+ case PA_STREAM_TERMINATED:
+ break;
+
+ case PA_STREAM_FAILED:
+ default:
+ qWarning("QSoundEffect(pulseaudio): Error in pulse audio stream");
+ break;
+ }
+}
+
+void QSoundEffectPrivate::play_callback(pa_context *c, int success, void *userdata)
+{
+ Q_UNUSED(c);
+
+ QSoundEffectPrivate *self = reinterpret_cast<QSoundEffectPrivate*>(userdata);
+
+ if (success == 1) {
+ self->m_runningCount--;
+ QMetaObject::invokeMethod(self, "checkPlayTime", Qt::QueuedConnection);
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/multimedia/effects/qsoundeffect_pulse_p.h b/src/multimedia/effects/qsoundeffect_pulse_p.h
new file mode 100644
index 0000000000..aff729c8ae
--- /dev/null
+++ b/src/multimedia/effects/qsoundeffect_pulse_p.h
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** 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 QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QSOUNDEFFECT_PULSE_H
+#define QSOUNDEFFECT_PULSE_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+
+#include "qsoundeffect_p.h"
+
+#include <QtCore/qobject.h>
+#include <QtCore/qdatetime.h>
+#include <QtMultimedia/qmediaplayer.h>
+#include <pulse/pulseaudio.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QNetworkReply;
+class QNetworkAccessManager;
+class WaveDecoder;
+
+class QSoundEffectPrivate : public QObject
+{
+ Q_OBJECT
+public:
+ explicit QSoundEffectPrivate(QObject* parent);
+ ~QSoundEffectPrivate();
+
+ QUrl source() const;
+ void setSource(const QUrl &url);
+ int loopCount() const;
+ void setLoopCount(int loopCount);
+ int volume() const;
+ void setVolume(int volume);
+ bool isMuted() const;
+ void setMuted(bool muted);
+
+public Q_SLOTS:
+ void play();
+
+Q_SIGNALS:
+ void volumeChanged();
+ void mutedChanged();
+
+private Q_SLOTS:
+ void decoderReady();
+ void decoderError();
+ void checkPlayTime();
+ void uploadSample();
+
+private:
+ void loadSample();
+ void unloadSample();
+ void playSample();
+
+ void timerEvent(QTimerEvent *event);
+
+ static void stream_write_callback(pa_stream *s, size_t length, void *userdata);
+ static void stream_state_callback(pa_stream *s, void *userdata);
+ static void play_callback(pa_context *c, int success, void *userdata);
+
+ pa_stream *m_pulseStream;
+
+ bool m_retry;
+ bool m_muted;
+ bool m_playQueued;
+ bool m_sampleLoaded;
+ int m_volume;
+ int m_duration;
+ int m_dataUploaded;
+ int m_loopCount;
+ int m_runningCount;
+ QUrl m_source;
+ QTime m_playbackTime;
+ QByteArray m_name;
+ QNetworkReply *m_reply;
+ WaveDecoder *m_waveDecoder;
+ QIODevice *m_stream;
+ QNetworkAccessManager *m_networkAccessManager;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QSOUNDEFFECT_PULSE_H
diff --git a/src/multimedia/effects/qsoundeffect_qmedia_p.cpp b/src/multimedia/effects/qsoundeffect_qmedia_p.cpp
new file mode 100644
index 0000000000..36c36dd317
--- /dev/null
+++ b/src/multimedia/effects/qsoundeffect_qmedia_p.cpp
@@ -0,0 +1,132 @@
+/****************************************************************************
+**
+** 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 QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qsoundeffect_qmedia_p.h"
+
+#include <QtCore/qcoreapplication.h>
+
+#include <QtMultimedia/qmediacontent.h>
+#include <QtMultimedia/qmediaplayer.h>
+
+
+QT_BEGIN_NAMESPACE
+
+QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent):
+ QObject(parent),
+ m_loopCount(1),
+ m_runningCount(0),
+ m_player(0)
+{
+ m_player = new QMediaPlayer(this, QMediaPlayer::LowLatency);
+ connect(m_player, SIGNAL(stateChanged(QMediaPlayer::State)), SLOT(stateChanged(QMediaPlayer::State)));
+}
+
+QSoundEffectPrivate::~QSoundEffectPrivate()
+{
+}
+
+QUrl QSoundEffectPrivate::source() const
+{
+ return m_player->media().canonicalUrl();
+}
+
+void QSoundEffectPrivate::setSource(const QUrl &url)
+{
+ m_player->setMedia(url);
+}
+
+int QSoundEffectPrivate::loopCount() const
+{
+ return m_loopCount;
+}
+
+void QSoundEffectPrivate::setLoopCount(int loopCount)
+{
+ m_loopCount = loopCount;
+}
+
+int QSoundEffectPrivate::volume() const
+{
+ return m_player->volume();
+}
+
+void QSoundEffectPrivate::setVolume(int volume)
+{
+ m_player->setVolume(volume);
+}
+
+bool QSoundEffectPrivate::isMuted() const
+{
+ return m_player->isMuted();
+}
+
+void QSoundEffectPrivate::setMuted(bool muted)
+{
+ m_player->setMuted(muted);
+}
+
+void QSoundEffectPrivate::play()
+{
+ m_runningCount += m_loopCount;
+ m_player->play();
+}
+
+void QSoundEffectPrivate::stateChanged(QMediaPlayer::State state)
+{
+ if (state == QMediaPlayer::StoppedState) {
+ if (--m_runningCount > 0)
+ m_player->play();
+ }
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/multimedia/effects/qsoundeffect_qmedia_p.h b/src/multimedia/effects/qsoundeffect_qmedia_p.h
new file mode 100644
index 0000000000..6ad9d79abb
--- /dev/null
+++ b/src/multimedia/effects/qsoundeffect_qmedia_p.h
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** 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 QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QSOUNDEFFECT_QMEDIA_H
+#define QSOUNDEFFECT_QMEDIA_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+
+#include <QtCore/qobject.h>
+#include <QtCore/qurl.h>
+#include <QtMultimedia/qmediaplayer.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+
+class QSoundEffectPrivate : public QObject
+{
+ Q_OBJECT
+public:
+ explicit QSoundEffectPrivate(QObject* parent);
+ ~QSoundEffectPrivate();
+
+ QUrl source() const;
+ void setSource(const QUrl &url);
+ int loopCount() const;
+ void setLoopCount(int loopCount);
+ int volume() const;
+ void setVolume(int volume);
+ bool isMuted() const;
+ void setMuted(bool muted);
+
+public Q_SLOTS:
+ void play();
+
+Q_SIGNALS:
+ void volumeChanged();
+ void mutedChanged();
+
+private Q_SLOTS:
+ void stateChanged(QMediaPlayer::State);
+
+private:
+ int m_loopCount;
+ int m_runningCount;
+ QMediaPlayer *m_player;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QSOUNDEFFECT_QMEDIA_H
diff --git a/src/multimedia/effects/qsoundeffect_qsound_p.cpp b/src/multimedia/effects/qsoundeffect_qsound_p.cpp
new file mode 100644
index 0000000000..ff30f67d06
--- /dev/null
+++ b/src/multimedia/effects/qsoundeffect_qsound_p.cpp
@@ -0,0 +1,131 @@
+/****************************************************************************
+**
+** 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 QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qsoundeffect_qsound_p.h"
+
+#include <QtCore/qcoreapplication.h>
+#include <QtGui/qsound.h>
+
+
+QT_BEGIN_NAMESPACE
+
+QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent):
+ QObject(parent),
+ m_muted(false),
+ m_loopCount(1),
+ m_volume(100),
+ m_sound(0)
+{
+}
+
+QSoundEffectPrivate::~QSoundEffectPrivate()
+{
+}
+
+QUrl QSoundEffectPrivate::source() const
+{
+ return m_source;
+}
+
+void QSoundEffectPrivate::setSource(const QUrl &url)
+{
+ if (url.isEmpty() || url.scheme() != QLatin1String("file")) {
+ m_source = QUrl();
+ return;
+ }
+
+ if (m_sound != 0)
+ delete m_sound;
+
+ m_source = url;
+ m_sound = new QSound(m_source.toLocalFile(), this);
+ m_sound->setLoops(m_loopCount);
+}
+
+int QSoundEffectPrivate::loopCount() const
+{
+ return m_loopCount;
+}
+
+void QSoundEffectPrivate::setLoopCount(int lc)
+{
+ m_loopCount = lc;
+ if (m_sound)
+ m_sound->setLoops(lc);
+}
+
+int QSoundEffectPrivate::volume() const
+{
+ return m_volume;
+}
+
+void QSoundEffectPrivate::setVolume(int v)
+{
+ m_volume = v;
+}
+
+bool QSoundEffectPrivate::isMuted() const
+{
+ return m_muted;
+}
+
+void QSoundEffectPrivate::setMuted(bool muted)
+{
+ m_muted = muted;
+}
+
+void QSoundEffectPrivate::play()
+{
+ m_sound->play();
+}
+
+QT_END_NAMESPACE
diff --git a/src/multimedia/effects/qsoundeffect_qsound_p.h b/src/multimedia/effects/qsoundeffect_qsound_p.h
new file mode 100644
index 0000000000..6fb3cfa004
--- /dev/null
+++ b/src/multimedia/effects/qsoundeffect_qsound_p.h
@@ -0,0 +1,102 @@
+/****************************************************************************
+**
+** 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 QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QSOUNDEFFECT_QSOUND_H
+#define QSOUNDEFFECT_QSOUND_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+
+#include <QtCore/qobject.h>
+#include <QtCore/qurl.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QSound;
+
+class QSoundEffectPrivate : public QObject
+{
+ Q_OBJECT
+public:
+ explicit QSoundEffectPrivate(QObject* parent);
+ ~QSoundEffectPrivate();
+
+ QUrl source() const;
+ void setSource(const QUrl &url);
+ int loopCount() const;
+ void setLoopCount(int loopCount);
+ int volume() const;
+ void setVolume(int volume);
+ bool isMuted() const;
+ void setMuted(bool muted);
+
+public Q_SLOTS:
+ void play();
+
+Q_SIGNALS:
+ void volumeChanged();
+ void mutedChanged();
+
+private:
+ bool m_muted;
+ int m_loopCount;
+ int m_volume;
+ QSound *m_sound;
+ QUrl m_source;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QSOUNDEFFECT_QSOUND_H
diff --git a/src/multimedia/effects/wavedecoder_p.cpp b/src/multimedia/effects/wavedecoder_p.cpp
new file mode 100644
index 0000000000..b534ded192
--- /dev/null
+++ b/src/multimedia/effects/wavedecoder_p.cpp
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** 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 QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "wavedecoder_p.h"
+
+#include <QtCore/qtimer.h>
+#include <QtCore/qendian.h>
+
+QT_BEGIN_NAMESPACE
+
+WaveDecoder::WaveDecoder(QIODevice *s, QObject *parent):
+ QIODevice(parent),
+ haveFormat(false),
+ dataSize(0),
+ remaining(0),
+ source(s)
+{
+ open(QIODevice::ReadOnly | QIODevice::Unbuffered);
+
+ if (source->bytesAvailable() >= qint64(sizeof(CombinedHeader) + sizeof(DATAHeader) + sizeof(quint16)))
+ QTimer::singleShot(0, this, SLOT(handleData()));
+ else
+ connect(source, SIGNAL(readyRead()), SLOT(handleData()));
+}
+
+WaveDecoder::~WaveDecoder()
+{
+}
+
+QAudioFormat WaveDecoder::audioFormat() const
+{
+ return format;
+}
+
+int WaveDecoder::duration() const
+{
+ return size() * 1000 / (format.sampleSize() / 8) / format.channels() / format.frequency();
+}
+
+qint64 WaveDecoder::size() const
+{
+ return haveFormat ? dataSize : 0;
+}
+
+bool WaveDecoder::isSequential() const
+{
+ return source->isSequential();
+}
+
+qint64 WaveDecoder::bytesAvailable() const
+{
+ return haveFormat ? source->bytesAvailable() : 0;
+}
+
+qint64 WaveDecoder::readData(char *data, qint64 maxlen)
+{
+ return haveFormat ? source->read(data, maxlen) : 0;
+}
+
+qint64 WaveDecoder::writeData(const char *data, qint64 len)
+{
+ Q_UNUSED(data);
+ Q_UNUSED(len);
+
+ return -1;
+}
+
+void WaveDecoder::handleData()
+{
+ if (source->bytesAvailable() < qint64(sizeof(CombinedHeader) + sizeof(DATAHeader) + sizeof(quint16)))
+ return;
+
+ source->disconnect(SIGNAL(readyRead()), this, SLOT(handleData()));
+ source->read((char*)&header, sizeof(CombinedHeader));
+
+ if (qstrncmp(header.riff.descriptor.id, "RIFF", 4) != 0 ||
+ qstrncmp(header.riff.type, "WAVE", 4) != 0 ||
+ qstrncmp(header.wave.descriptor.id, "fmt ", 4) != 0 ||
+ (header.wave.audioFormat != 0 && header.wave.audioFormat != 1)) {
+
+ emit invalidFormat();
+ }
+ else {
+ DATAHeader dataHeader;
+
+ if (qFromLittleEndian<quint32>(header.wave.descriptor.size) > sizeof(WAVEHeader)) {
+ // Extended data available
+ quint16 extraFormatBytes;
+ source->peek((char*)&extraFormatBytes, sizeof(quint16));
+ extraFormatBytes = qFromLittleEndian<quint16>(extraFormatBytes);
+ source->read(sizeof(quint16) + extraFormatBytes); // dump it all
+ }
+
+ source->read((char*)&dataHeader, sizeof(DATAHeader));
+
+ int bps = qFromLittleEndian<quint16>(header.wave.bitsPerSample);
+
+ format.setCodec(QLatin1String("audio/pcm"));
+ format.setSampleType(bps == 8 ? QAudioFormat::UnSignedInt : QAudioFormat::SignedInt);
+ format.setByteOrder(QAudioFormat::LittleEndian);
+ format.setFrequency(qFromLittleEndian<quint32>(header.wave.sampleRate));
+ format.setSampleSize(bps);
+ format.setChannels(qFromLittleEndian<quint16>(header.wave.numChannels));
+
+ dataSize = qFromLittleEndian<quint32>(dataHeader.descriptor.size);
+
+ haveFormat = true;
+ connect(source, SIGNAL(readyRead()), SIGNAL(readyRead()));
+ emit formatKnown();
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/multimedia/effects/wavedecoder_p.h b/src/multimedia/effects/wavedecoder_p.h
new file mode 100644
index 0000000000..c1892bb49d
--- /dev/null
+++ b/src/multimedia/effects/wavedecoder_p.h
@@ -0,0 +1,133 @@
+/****************************************************************************
+**
+** 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 QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WAVEDECODER_H
+#define WAVEDECODER_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qiodevice.h>
+#include <QtMultimedia/qaudioformat.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+
+class WaveDecoder : public QIODevice
+{
+ Q_OBJECT
+
+public:
+ explicit WaveDecoder(QIODevice *source, QObject *parent = 0);
+ ~WaveDecoder();
+
+ QAudioFormat audioFormat() const;
+ int duration() const;
+
+ qint64 size() const;
+ bool isSequential() const;
+ qint64 bytesAvailable() const;
+
+Q_SIGNALS:
+ void formatKnown();
+ void invalidFormat();
+
+private Q_SLOTS:
+ void handleData();
+
+private:
+ qint64 readData(char *data, qint64 maxlen);
+ qint64 writeData(const char *data, qint64 len);
+
+ struct chunk
+ {
+ char id[4];
+ quint32 size;
+ };
+ struct RIFFHeader
+ {
+ chunk descriptor;
+ char type[4];
+ };
+ struct WAVEHeader
+ {
+ chunk descriptor;
+ quint16 audioFormat;
+ quint16 numChannels;
+ quint32 sampleRate;
+ quint32 byteRate;
+ quint16 blockAlign;
+ quint16 bitsPerSample;
+ };
+ struct DATAHeader
+ {
+ chunk descriptor;
+ };
+ struct CombinedHeader
+ {
+ RIFFHeader riff;
+ WAVEHeader wave;
+ };
+
+ bool haveFormat;
+ qint64 dataSize;
+ qint64 remaining;
+ QAudioFormat format;
+ QIODevice *source;
+ CombinedHeader header;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // WAVEDECODER_H
diff --git a/src/multimedia/multimedia.pro b/src/multimedia/multimedia.pro
index c729103978..500aff71ce 100644
--- a/src/multimedia/multimedia.pro
+++ b/src/multimedia/multimedia.pro
@@ -10,5 +10,8 @@ include(../qbase.pri)
include(audio/audio.pri)
include(video/video.pri)
+include(base/base.pri)
+include(playback/playback.pri)
+include(effects/effects.pri)
-symbian: TARGET.UID3 = 0x2001E627 \ No newline at end of file
+symbian: TARGET.UID3 = 0x2001E627
diff --git a/src/multimedia/playback/playback.pri b/src/multimedia/playback/playback.pri
new file mode 100644
index 0000000000..09a81c9aab
--- /dev/null
+++ b/src/multimedia/playback/playback.pri
@@ -0,0 +1,11 @@
+
+HEADERS += \
+ $$PWD/qmediaplayer.h \
+ $$PWD/qmediaplayercontrol.h
+
+SOURCES += \
+ $$PWD/qmediaplayer.cpp \
+ $$PWD/qmediaplayercontrol.cpp
+
+
+
diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp
new file mode 100644
index 0000000000..9466cad3ca
--- /dev/null
+++ b/src/multimedia/playback/qmediaplayer.cpp
@@ -0,0 +1,982 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qcoreevent.h>
+#include <QtCore/qmetaobject.h>
+#include <QtCore/qtimer.h>
+#include <QtCore/qpointer.h>
+#include <QtCore/qdebug.h>
+
+#include <QtMultimedia/qmediaplayer.h>
+
+#include <QtMultimedia/private/qmediaobject_p.h>
+#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/qmediaplayercontrol.h>
+#include <QtMultimedia/qmediaserviceprovider.h>
+#include <QtMultimedia/qmediaplaylist.h>
+#include <QtMultimedia/qmediaplaylistcontrol.h>
+#include <QtMultimedia/qvideowidget.h>
+#include <QtMultimedia/qgraphicsvideoitem.h>
+
+//#define DEBUG_PLAYER_STATE
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+/*!
+ \class QMediaPlayer
+ \brief The QMediaPlayer class allows the playing of a media source.
+ \ingroup multimedia
+ \since 4.7
+ \preliminary
+
+ The QMediaPlayer class is a high level media playback class. It can be used
+ to playback such content as songs, movies and internet radio. The content
+ to playback is specified as a QMediaContent, which can be thought of as a
+ main or canonical URL with addition information attached. When provided
+ with a QMediaContent playback may be able to commence.
+
+ \code
+ player = new QMediaPlayer;
+ connect(player, SIGNAL(positionChanged(qint64)), this, SLOT(positionChanged(qint64)));
+ player->setMedia(QUrl::fromLocalFile("/Users/me/Music/coolsong.mp3"));
+ player->setVolume(50);
+ player->play();
+ \endcode
+
+ QVideoWidget can be used with QMediaPlayer for video rendering and QMediaPlaylist
+ for accessing playlist functionality.
+
+ \code
+ player = new QMediaPlayer;
+
+ playlist = new QMediaPlaylist;
+ playlist->setMediaObject(player);
+ playlist->append(QUrl("http://example.com/movie1.mp4"));
+ playlist->append(QUrl("http://example.com/movie2.mp4"));
+
+ widget = new QVideoWidget;
+ widget->setMediaObject(player);
+ widget->show();
+
+ player->play();
+ \endcode
+
+ \sa QMediaObject, QMediaService, QVideoWidget, QMediaPlaylist
+*/
+
+namespace
+{
+class MediaPlayerRegisterMetaTypes
+{
+public:
+ MediaPlayerRegisterMetaTypes()
+ {
+ qRegisterMetaType<QMediaPlayer::State>();
+ qRegisterMetaType<QMediaPlayer::MediaStatus>();
+ qRegisterMetaType<QMediaPlayer::Error>();
+ }
+} _registerPlayerMetaTypes;
+}
+
+class QMediaPlayerPrivate : public QMediaObjectPrivate
+{
+ Q_DECLARE_NON_CONST_PUBLIC(QMediaPlayer)
+
+public:
+ QMediaPlayerPrivate()
+ : provider(0)
+ , control(0)
+ , playlistControl(0)
+ , state(QMediaPlayer::StoppedState)
+ , error(QMediaPlayer::NoError)
+ , filterStates(false)
+ , playlist(0)
+ {}
+
+ QMediaServiceProvider *provider;
+ QMediaPlayerControl* control;
+ QMediaPlaylistControl* playlistControl;
+ QMediaPlayer::State state;
+ QMediaPlayer::Error error;
+ QString errorString;
+ bool filterStates;
+
+ QMediaPlaylist *playlist;
+ QPointer<QVideoWidget> videoWidget;
+ QPointer<QGraphicsVideoItem> videoItem;
+
+ void _q_stateChanged(QMediaPlayer::State state);
+ void _q_mediaStatusChanged(QMediaPlayer::MediaStatus status);
+ void _q_error(int error, const QString &errorString);
+ void _q_updateMedia(const QMediaContent&);
+ void _q_playlistDestroyed();
+};
+
+#define ENUM_NAME(c,e,v) (c::staticMetaObject.enumerator(c::staticMetaObject.indexOfEnumerator(e)).valueToKey((v)))
+
+void QMediaPlayerPrivate::_q_stateChanged(QMediaPlayer::State ps)
+{
+ Q_Q(QMediaPlayer);
+
+#ifdef DEBUG_PLAYER_STATE
+ qDebug() << "State changed:" << ENUM_NAME(QMediaPlayer, "State", ps) << (filterStates ? "(filtered)" : "");
+#endif
+
+ if (filterStates)
+ return;
+
+ if (playlist
+ && !playlistControl //service should do this itself
+ && ps != state && ps == QMediaPlayer::StoppedState
+ && control->mediaStatus() == QMediaPlayer::EndOfMedia) {
+ playlist->next();
+ ps = control->state();
+ }
+
+ if (ps != state) {
+ state = ps;
+
+ if (ps == QMediaPlayer::PlayingState)
+ q->addPropertyWatch("position");
+ else
+ q->removePropertyWatch("position");
+
+ emit q->stateChanged(ps);
+ }
+}
+
+void QMediaPlayerPrivate::_q_mediaStatusChanged(QMediaPlayer::MediaStatus status)
+{
+ Q_Q(QMediaPlayer);
+
+#ifdef DEBUG_PLAYER_STATE
+ qDebug() << "MediaStatus changed:" << ENUM_NAME(QMediaPlayer, "MediaStatus", status);
+#endif
+
+ switch (status) {
+ case QMediaPlayer::StalledMedia:
+ case QMediaPlayer::BufferingMedia:
+ q->addPropertyWatch("bufferStatus");
+ emit q->mediaStatusChanged(status);
+ break;
+ default:
+ q->removePropertyWatch("bufferStatus");
+ emit q->mediaStatusChanged(status);
+ break;
+ }
+
+}
+
+void QMediaPlayerPrivate::_q_error(int error, const QString &errorString)
+{
+ Q_Q(QMediaPlayer);
+
+ this->error = QMediaPlayer::Error(error);
+ this->errorString = errorString;
+
+ emit q->error(this->error);
+}
+
+void QMediaPlayerPrivate::_q_updateMedia(const QMediaContent &media)
+{
+ const QMediaPlayer::State currentState = state;
+
+ filterStates = true;
+ control->setMedia(media, 0);
+
+ if (!media.isNull()) {
+ switch (currentState) {
+ case QMediaPlayer::PlayingState:
+ control->play();
+ break;
+ case QMediaPlayer::PausedState:
+ control->pause();
+ break;
+ default:
+ break;
+ }
+ }
+ filterStates = false;
+
+ state = control->state();
+
+ if (state != currentState) {
+#ifdef DEBUG_PLAYER_STATE
+ qDebug() << "State changed:" << ENUM_NAME(QMediaPlayer, "State", state);
+#endif
+ emit q_func()->stateChanged(state);
+ }
+}
+
+void QMediaPlayerPrivate::_q_playlistDestroyed()
+{
+ playlist = 0;
+
+ control->setMedia(QMediaContent(), 0);
+}
+
+static QMediaService *playerService(QMediaPlayer::Flags flags, QMediaServiceProvider *provider)
+{
+ if (flags) {
+ QMediaServiceProviderHint::Features features = 0;
+ if (flags & QMediaPlayer::LowLatency)
+ features |= QMediaServiceProviderHint::LowLatencyPlayback;
+
+ if (flags & QMediaPlayer::StreamPlayback)
+ features |= QMediaServiceProviderHint::StreamPlayback;
+
+ return provider->requestService(Q_MEDIASERVICE_MEDIAPLAYER,
+ QMediaServiceProviderHint(features));
+ } else
+ return provider->requestService(Q_MEDIASERVICE_MEDIAPLAYER);
+}
+
+
+/*!
+ Construct a QMediaPlayer that uses the playback service from \a provider,
+ parented to \a parent and with \a flags.
+
+ If a playback service is not specified the system default will be used.
+*/
+
+QMediaPlayer::QMediaPlayer(QObject *parent, QMediaPlayer::Flags flags, QMediaServiceProvider *provider):
+ QMediaObject(*new QMediaPlayerPrivate,
+ parent,
+ playerService(flags,provider))
+{
+ Q_D(QMediaPlayer);
+
+ d->provider = provider;
+
+ if (d->service == 0) {
+ d->error = ServiceMissingError;
+ } else {
+ d->control = qobject_cast<QMediaPlayerControl*>(d->service->control(QMediaPlayerControl_iid));
+ d->playlistControl = qobject_cast<QMediaPlaylistControl*>(d->service->control(QMediaPlaylistControl_iid));
+ if (d->control != 0) {
+ connect(d->control, SIGNAL(mediaChanged(QMediaContent)), SIGNAL(mediaChanged(QMediaContent)));
+ connect(d->control, SIGNAL(stateChanged(QMediaPlayer::State)), SLOT(_q_stateChanged(QMediaPlayer::State)));
+ connect(d->control, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)),
+ SLOT(_q_mediaStatusChanged(QMediaPlayer::MediaStatus)));
+ connect(d->control, SIGNAL(error(int,QString)), SLOT(_q_error(int,QString)));
+
+ connect(d->control, SIGNAL(durationChanged(qint64)), SIGNAL(durationChanged(qint64)));
+ connect(d->control, SIGNAL(positionChanged(qint64)), SIGNAL(positionChanged(qint64)));
+ connect(d->control, SIGNAL(audioAvailableChanged(bool)), SIGNAL(audioAvailableChanged(bool)));
+ connect(d->control, SIGNAL(videoAvailableChanged(bool)), SIGNAL(videoAvailableChanged(bool)));
+ connect(d->control, SIGNAL(volumeChanged(int)), SIGNAL(volumeChanged(int)));
+ connect(d->control, SIGNAL(mutedChanged(bool)), SIGNAL(mutedChanged(bool)));
+ connect(d->control, SIGNAL(seekableChanged(bool)), SIGNAL(seekableChanged(bool)));
+ connect(d->control, SIGNAL(playbackRateChanged(qreal)), SIGNAL(playbackRateChanged(qreal)));
+
+ if (d->control->state() == PlayingState)
+ addPropertyWatch("position");
+
+ if (d->control->mediaStatus() == StalledMedia || d->control->mediaStatus() == BufferingMedia)
+ addPropertyWatch("bufferStatus");
+ }
+ }
+}
+
+
+/*!
+ Destroys the player object.
+*/
+
+QMediaPlayer::~QMediaPlayer()
+{
+ Q_D(QMediaPlayer);
+
+ d->provider->releaseService(d->service);
+}
+
+QMediaContent QMediaPlayer::media() const
+{
+ Q_D(const QMediaPlayer);
+
+ if (d->control != 0)
+ return d->control->media();
+
+ return QMediaContent();
+}
+
+/*!
+ Returns the stream source of media data.
+
+ This is only valid if a stream was passed to setMedia().
+
+ \sa setMedia()
+*/
+
+const QIODevice *QMediaPlayer::mediaStream() const
+{
+ Q_D(const QMediaPlayer);
+
+ if (d->control != 0)
+ return d->control->mediaStream();
+
+ return 0;
+}
+
+QMediaPlayer::State QMediaPlayer::state() const
+{
+ return d_func()->state;
+}
+
+QMediaPlayer::MediaStatus QMediaPlayer::mediaStatus() const
+{
+ Q_D(const QMediaPlayer);
+
+ if (d->control != 0)
+ return d->control->mediaStatus();
+
+ return QMediaPlayer::UnknownMediaStatus;
+}
+
+qint64 QMediaPlayer::duration() const
+{
+ Q_D(const QMediaPlayer);
+
+ if (d->control != 0)
+ return d->control->duration();
+
+ return -1;
+}
+
+qint64 QMediaPlayer::position() const
+{
+ Q_D(const QMediaPlayer);
+
+ if (d->control != 0)
+ return d->control->position();
+
+ return 0;
+}
+
+int QMediaPlayer::volume() const
+{
+ Q_D(const QMediaPlayer);
+
+ if (d->control != 0)
+ return d->control->volume();
+
+ return 0;
+}
+
+bool QMediaPlayer::isMuted() const
+{
+ Q_D(const QMediaPlayer);
+
+ if (d->control != 0)
+ return d->control->isMuted();
+
+ return false;
+}
+
+int QMediaPlayer::bufferStatus() const
+{
+ Q_D(const QMediaPlayer);
+
+ if (d->control != 0)
+ return d->control->bufferStatus();
+
+ return 0;
+}
+
+bool QMediaPlayer::isAudioAvailable() const
+{
+ Q_D(const QMediaPlayer);
+
+ if (d->control != 0)
+ return d->control->isAudioAvailable();
+
+ return false;
+}
+
+bool QMediaPlayer::isVideoAvailable() const
+{
+ Q_D(const QMediaPlayer);
+
+ if (d->control != 0)
+ return d->control->isVideoAvailable();
+
+ return false;
+}
+
+bool QMediaPlayer::isSeekable() const
+{
+ Q_D(const QMediaPlayer);
+
+ if (d->control != 0)
+ return d->control->isSeekable();
+
+ return false;
+}
+
+qreal QMediaPlayer::playbackRate() const
+{
+ Q_D(const QMediaPlayer);
+
+ if (d->control != 0)
+ return d->control->playbackRate();
+
+ return 0.0;
+}
+
+/*!
+ Returns the current error state.
+*/
+
+QMediaPlayer::Error QMediaPlayer::error() const
+{
+ return d_func()->error;
+}
+
+QString QMediaPlayer::errorString() const
+{
+ return d_func()->errorString;
+}
+
+//public Q_SLOTS:
+/*!
+ Start or resume playing the current source.
+*/
+
+void QMediaPlayer::play()
+{
+ Q_D(QMediaPlayer);
+
+ if (d->control == 0) {
+ QMetaObject::invokeMethod(this, "_q_error", Qt::QueuedConnection);
+ Q_ARG(int, QMediaPlayer::ServiceMissingError),
+ Q_ARG(QString, tr("The QMediaPlayer object does not have a valid service"));
+ return;
+ }
+
+ //if playlist control is available, the service should advance itself
+ if (d->playlist && !d->playlistControl && d->playlist->currentIndex() == -1 && !d->playlist->isEmpty())
+ d->playlist->setCurrentIndex(0);
+
+ // Reset error conditions
+ d->error = NoError;
+ d->errorString = QString();
+
+ d->control->play();
+}
+
+/*!
+ Pause playing the current source.
+*/
+
+void QMediaPlayer::pause()
+{
+ Q_D(QMediaPlayer);
+
+ if (d->control != 0)
+ d->control->pause();
+}
+
+/*!
+ Stop playing, and reset the play position to the beginning.
+*/
+
+void QMediaPlayer::stop()
+{
+ Q_D(QMediaPlayer);
+
+ if (d->control != 0)
+ d->control->stop();
+}
+
+void QMediaPlayer::setPosition(qint64 position)
+{
+ Q_D(QMediaPlayer);
+
+ if (d->control == 0 || !isSeekable())
+ return;
+
+ d->control->setPosition(qBound(qint64(0), duration(), position));
+}
+
+void QMediaPlayer::setVolume(int v)
+{
+ Q_D(QMediaPlayer);
+
+ if (d->control == 0)
+ return;
+
+ int clamped = qBound(0, v, 100);
+ if (clamped == volume())
+ return;
+
+ d->control->setVolume(clamped);
+}
+
+void QMediaPlayer::setMuted(bool muted)
+{
+ Q_D(QMediaPlayer);
+
+ if (d->control == 0 || muted == isMuted())
+ return;
+
+ d->control->setMuted(muted);
+}
+
+void QMediaPlayer::setPlaybackRate(qreal rate)
+{
+ Q_D(QMediaPlayer);
+
+ if (d->control != 0)
+ d->control->setPlaybackRate(rate);
+}
+
+/*!
+ Sets the current \a media source.
+
+ If a \a stream is supplied; media data will be read from it instead of resolving the media
+ source. In this case the media source may still be used to resolve additional information
+ about the media such as mime type.
+
+ Setting the media to a null QMediaContent will cause the player to discard all
+ information relating to the current media source and to cease all I/O operations related
+ to that media.
+*/
+
+void QMediaPlayer::setMedia(const QMediaContent &media, QIODevice *stream)
+{
+ Q_D(QMediaPlayer);
+
+ if (d->control != 0)
+ d_func()->control->setMedia(media, stream);
+}
+
+/*!
+ \internal
+*/
+
+void QMediaPlayer::bind(QObject *obj)
+{
+ Q_D(QMediaPlayer);
+
+ if (d->control != 0) {
+ QMediaPlaylist *playlist = qobject_cast<QMediaPlaylist*>(obj);
+
+ if (playlist) {
+ if (d->playlist)
+ d->playlist->setMediaObject(0);
+
+ d->playlist = playlist;
+ connect(d->playlist, SIGNAL(currentMediaChanged(QMediaContent)),
+ this, SLOT(_q_updateMedia(QMediaContent)));
+ connect(d->playlist, SIGNAL(destroyed()), this, SLOT(_q_playlistDestroyed()));
+
+ setMedia(playlist->currentMedia());
+
+ return;
+ }
+
+ QVideoWidget *videoWidget = qobject_cast<QVideoWidget*>(obj);
+ QGraphicsVideoItem *videoItem = qobject_cast<QGraphicsVideoItem*>(obj);
+
+ if (videoWidget || videoItem) {
+ //detach the current video output
+ if (d->videoWidget) {
+ d->videoWidget->setMediaObject(0);
+ d->videoWidget = 0;
+ }
+
+ if (d->videoItem) {
+ d->videoItem->setMediaObject(0);
+ d->videoItem = 0;
+ }
+ }
+
+ if (videoWidget)
+ d->videoWidget = videoWidget;
+
+ if (videoItem)
+ d->videoItem = videoItem;
+ }
+}
+
+/*!
+ \internal
+*/
+
+void QMediaPlayer::unbind(QObject *obj)
+{
+ Q_D(QMediaPlayer);
+
+ if (obj == d->videoWidget) {
+ d->videoWidget = 0;
+ } else if (obj == d->videoItem) {
+ d->videoItem = 0;
+ } else if (obj == d->playlist) {
+ disconnect(d->playlist, SIGNAL(currentMediaChanged(QMediaContent)),
+ this, SLOT(_q_updateMedia(QMediaContent)));
+ disconnect(d->playlist, SIGNAL(destroyed()), this, SLOT(_q_playlistDestroyed()));
+ d->playlist = 0;
+ setMedia(QMediaContent());
+ }
+}
+
+/*!
+ Returns the level of support a media player has for a \a mimeType and a set of \a codecs.
+
+ The \a flags argument allows additional requirements such as performance indicators to be
+ specified.
+*/
+QtMultimedia::SupportEstimate QMediaPlayer::hasSupport(const QString &mimeType,
+ const QStringList& codecs,
+ Flags flags)
+{
+ return QMediaServiceProvider::defaultServiceProvider()->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER),
+ mimeType,
+ codecs,
+ flags);
+}
+
+/*!
+ Returns a list of MIME types supported by the media player.
+
+ The \a flags argument causes the resultant list to be restricted to MIME types which can be supported
+ given additional requirements, such as performance indicators.
+*/
+QStringList QMediaPlayer::supportedMimeTypes(Flags flags)
+{
+ return QMediaServiceProvider::defaultServiceProvider()->supportedMimeTypes(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER),
+ flags);
+}
+
+
+// Enums
+/*!
+ \enum QMediaPlayer::State
+
+ Defines the current state of a media player.
+
+ \value PlayingState The media player is currently playing content.
+ \value PausedState The media player has paused playback, playback of the current track will
+ resume from the position the player was paused at.
+ \value StoppedState The media player is not playing content, playback will begin from the start
+ of the current track.
+*/
+
+/*!
+ \enum QMediaPlayer::MediaStatus
+
+ Defines the status of a media player's current media.
+
+ \value UnknownMediaStatus The status of the media cannot be determined.
+ \value NoMedia The is no current media. The player is in the StoppedState.
+ \value LoadingMedia The current media is being loaded. The player may be in any state.
+ \value LoadedMedia The current media has been loaded. The player is in the StoppedState.
+ \value StalledMedia Playback of the current media has stalled due to insufficient buffering or
+ some other temporary interruption. The player is in the PlayingState or PausedState.
+ \value BufferingMedia The player is buffering data but has enough data buffered for playback to
+ continue for the immediate future. The player is in the PlayingState or PausedState.
+ \value BufferedMedia The player has fully buffered the current media. The player is in the
+ PlayingState or PausedState.
+ \value EndOfMedia Playback has reached the end of the current media. The player is in the
+ StoppedState.
+ \value InvalidMedia The current media cannot be played. The player is in the StoppedState.
+*/
+
+/*!
+ \enum QMediaPlayer::Error
+
+ Defines a media player error condition.
+
+ \value NoError No error has occurred.
+ \value ResourceError A media resource couldn't be resolved.
+ \value FormatError The format of a media resource isn't (fully) supported. Playback may still
+ be possible, but without an audio or video component.
+ \value NetworkError A network error occurred.
+ \value AccessDeniedError There are not the appropriate permissions to play a media resource.
+ \value ServiceMissingError A valid playback service was not found, playback cannot proceed.
+*/
+
+// Signals
+/*!
+ \fn QMediaPlayer::error(QMediaPlayer::Error error)
+
+ Signals that an \a error condition has occurred.
+
+ \sa errorString()
+*/
+
+/*!
+ \fn void QMediaPlayer::stateChanged(State state)
+
+ Signal the \a state of the Player object has changed.
+*/
+
+/*!
+ \fn QMediaPlayer::mediaStatusChanged(QMediaPlayer::MediaStatus status)
+
+ Signals that the \a status of the current media has changed.
+
+ \sa mediaStatus()
+*/
+
+/*!
+ \fn void QMediaPlayer::mediaChanged(const QMediaContent &media);
+
+ Signals that the current playing content will be obtained from \a media.
+
+ \sa media()
+*/
+
+/*!
+ \fn void QMediaPlayer::playbackRateChanged(qreal rate);
+
+ Signals the playbackRate has changed to \a rate.
+*/
+
+/*!
+ \fn void QMediaPlayer::seekableChanged(bool seekable);
+
+ Signals the \a seekable status of the player object has changed.
+*/
+
+// Properties
+/*!
+ \property QMediaPlayer::state
+ \brief the media player's playback state.
+
+ By default this property is QMediaPlayer::Stopped
+
+ \sa mediaStatus(), play(), pause(), stop()
+*/
+
+/*!
+ \property QMediaPlayer::error
+ \brief a string describing the last error condition.
+
+ \sa error()
+*/
+
+/*!
+ \property QMediaPlayer::media
+ \brief the active media source being used by the player object.
+
+ The player object will use the QMediaContent for selection of the content to
+ be played.
+
+ By default this property has a null QMediaContent.
+
+ Setting this property to a null QMediaContent will cause the player to discard all
+ information relating to the current media source and to cease all I/O operations related
+ to that media.
+
+ \sa QMediaContent
+*/
+
+/*!
+ \property QMediaPlayer::mediaStatus
+ \brief the status of the current media stream.
+
+ The stream status describes how the playback of the current stream is
+ progressing.
+
+ By default this property is QMediaPlayer::NoMedia
+
+ \sa state
+*/
+
+/*!
+ \property QMediaPlayer::duration
+ \brief the duration of the current media.
+
+ The value is the total playback time in milliseconds of the current media.
+ The value may change across the life time of the QMediaPlayer object and
+ may not be available when initial playback begins, connect to the
+ durationChanged() signal to receive status notifications.
+*/
+
+/*!
+ \property QMediaPlayer::position
+ \brief the playback position of the current media.
+
+ The value is the current playback position, expressed in milliseconds since
+ the beginning of the media. Periodically changes in the position will be
+ indicated with the signal positionChanged(), the interval between updates
+ can be set with QMediaObject's method setNotifyInterval().
+*/
+
+/*!
+ \property QMediaPlayer::volume
+ \brief the current playback volume.
+
+ The playback volume is a linear in effect and the value can range from 0 -
+ 100, values outside this range will be clamped.
+*/
+
+/*!
+ \property QMediaPlayer::muted
+ \brief the muted state of the current media.
+
+ The value will be true if the playback volume is muted; otherwise false.
+*/
+
+/*!
+ \property QMediaPlayer::bufferStatus
+ \brief the percentage of the temporary buffer filled before playback begins.
+
+ When the player object is buffering; this property holds the percentage of
+ the temporary buffer that is filled. The buffer will need to reach 100%
+ filled before playback can resume, at which time the MediaStatus will be
+ BufferedMedia.
+
+ \sa mediaStatus()
+*/
+
+/*!
+ \property QMediaPlayer::audioAvailable
+ \brief the audio availabilty status for the current media.
+
+ As the life time of QMediaPlayer can be longer than the playback of one
+ QMediaContent, this property may change over time, the
+ audioAvailableChanged signal can be used to monitor it's status.
+*/
+
+/*!
+ \property QMediaPlayer::videoAvailable
+ \brief the video availability status for the current media.
+
+ If available, the QVideoWidget class can be used to view the video. As the
+ life time of QMediaPlayer can be longer than the playback of one
+ QMediaContent, this property may change over time, the
+ videoAvailableChanged signal can be used to monitor it's status.
+
+ \sa QVideoWidget, QMediaContent
+*/
+
+/*!
+ \property QMediaPlayer::seekable
+ \brief the seek-able status of the current media
+
+ If seeking is supported this property will be true; false otherwise. The
+ status of this property may change across the life time of the QMediaPlayer
+ object, use the seekableChanged signal to monitor changes.
+*/
+
+/*!
+ \property QMediaPlayer::playbackRate
+ \brief the playback rate of the current media.
+
+ This value is a multiplier applied to the media's standard play rate. By
+ default this value is 1.0, indicating that the media is playing at the
+ standard pace. Values higher than 1.0 will increase the rate of play.
+ Values less than zero can be set and indicate the media will rewind at the
+ multiplier of the standard pace.
+
+ Not all playback services support change of the playback rate. It is
+ framework defined as to the status and quality of audio and video
+ while fast forwarding or rewinding.
+*/
+
+/*!
+ \fn void QMediaPlayer::durationChanged(qint64 duration)
+
+ Signal the duration of the content has changed to \a duration, expressed in milliseconds.
+*/
+
+/*!
+ \fn void QMediaPlayer::positionChanged(qint64 position)
+
+ Signal the position of the content has changed to \a position, expressed in
+ milliseconds.
+*/
+
+/*!
+ \fn void QMediaPlayer::volumeChanged(int volume)
+
+ Signal the playback volume has changed to \a volume.
+*/
+
+/*!
+ \fn void QMediaPlayer::mutedChanged(bool muted)
+
+ Signal the mute state has changed to \a muted.
+*/
+
+/*!
+ \fn void QMediaPlayer::audioAvailableChanged(bool available)
+
+ Signals the availability of audio content has changed to \a available.
+*/
+
+/*!
+ \fn void QMediaPlayer::videoAvailableChanged(bool videoAvailable)
+
+ Signal the availability of visual content has changed to \a videoAvailable.
+*/
+
+/*!
+ \fn void QMediaPlayer::bufferStatusChanged(int percentFilled)
+
+ Signal the amount of the local buffer filled as a percentage by \a percentFilled.
+*/
+
+/*!
+ \enum QMediaPlayer::Flag
+
+ \value LowLatency
+ The player is expected to be used with simple audio formats,
+ but playback should start without significant delay.
+ Such playback service can be used for beeps, ringtones, etc.
+
+ \value StreamPlayback
+ The player is expected to play QIODevice based streams.
+ If passed to QMediaPlayer constructor, the service supporting
+ streams playback will be choosen.
+*/
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#include "moc_qmediaplayer.cpp"
diff --git a/src/multimedia/playback/qmediaplayer.h b/src/multimedia/playback/qmediaplayer.h
new file mode 100644
index 0000000000..129b24453c
--- /dev/null
+++ b/src/multimedia/playback/qmediaplayer.h
@@ -0,0 +1,203 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMEDIAPLAYER_H
+#define QMEDIAPLAYER_H
+
+#include <QtMultimedia/qmediaserviceprovider.h>
+#include <QtMultimedia/qmediaobject.h>
+#include <QtMultimedia/qmediacontent.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+
+class QMediaPlaylist;
+
+class QMediaPlayerPrivate;
+class Q_MULTIMEDIA_EXPORT QMediaPlayer : public QMediaObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QMediaContent media READ media WRITE setMedia NOTIFY mediaChanged)
+ Q_PROPERTY(qint64 duration READ duration NOTIFY durationChanged)
+ Q_PROPERTY(qint64 position READ position WRITE setPosition NOTIFY positionChanged)
+ Q_PROPERTY(int volume READ volume WRITE setVolume NOTIFY volumeChanged)
+ Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged)
+ Q_PROPERTY(int bufferStatus READ bufferStatus NOTIFY bufferStatusChanged)
+ Q_PROPERTY(bool audioAvailable READ isAudioAvailable NOTIFY audioAvailableChanged)
+ Q_PROPERTY(bool videoAvailable READ isVideoAvailable NOTIFY videoAvailableChanged)
+ Q_PROPERTY(bool seekable READ isSeekable NOTIFY seekableChanged)
+ Q_PROPERTY(qreal playbackRate READ playbackRate WRITE setPlaybackRate NOTIFY playbackRateChanged)
+ Q_PROPERTY(State state READ state NOTIFY stateChanged)
+ Q_PROPERTY(MediaStatus mediaStatus READ mediaStatus NOTIFY mediaStatusChanged)
+ Q_PROPERTY(QString error READ errorString)
+ Q_ENUMS(State)
+ Q_ENUMS(MediaStatus)
+
+public:
+ enum State
+ {
+ StoppedState,
+ PlayingState,
+ PausedState
+ };
+
+ enum MediaStatus
+ {
+ UnknownMediaStatus,
+ NoMedia,
+ LoadingMedia,
+ LoadedMedia,
+ StalledMedia,
+ BufferingMedia,
+ BufferedMedia,
+ EndOfMedia,
+ InvalidMedia
+ };
+
+ enum Flag
+ {
+ LowLatency = 0x01,
+ StreamPlayback = 0x02
+ };
+ Q_DECLARE_FLAGS(Flags, Flag)
+
+ enum Error
+ {
+ NoError,
+ ResourceError,
+ FormatError,
+ NetworkError,
+ AccessDeniedError,
+ ServiceMissingError
+ };
+
+ QMediaPlayer(QObject *parent = 0, Flags flags = 0, QMediaServiceProvider *provider = QMediaServiceProvider::defaultServiceProvider());
+ ~QMediaPlayer();
+
+ static QtMultimedia::SupportEstimate hasSupport(const QString &mimeType,
+ const QStringList& codecs = QStringList(),
+ Flags flags = 0);
+ static QStringList supportedMimeTypes(Flags flags = 0);
+
+ QMediaContent media() const;
+ const QIODevice *mediaStream() const;
+
+ State state() const;
+ MediaStatus mediaStatus() const;
+
+ qint64 duration() const;
+ qint64 position() const;
+
+ int volume() const;
+ bool isMuted() const;
+ bool isAudioAvailable() const;
+ bool isVideoAvailable() const;
+
+ int bufferStatus() const;
+
+ bool isSeekable() const;
+ qreal playbackRate() const;
+
+ Error error() const;
+ QString errorString() const;
+
+public Q_SLOTS:
+ void play();
+ void pause();
+ void stop();
+
+ void setPosition(qint64 position);
+ void setVolume(int volume);
+ void setMuted(bool muted);
+
+ void setPlaybackRate(qreal rate);
+
+ void setMedia(const QMediaContent &media, QIODevice *stream = 0);
+
+Q_SIGNALS:
+ void mediaChanged(const QMediaContent &media);
+
+ void stateChanged(QMediaPlayer::State newState);
+ void mediaStatusChanged(QMediaPlayer::MediaStatus status);
+
+ void durationChanged(qint64 duration);
+ void positionChanged(qint64 position);
+
+ void volumeChanged(int volume);
+ void mutedChanged(bool muted);
+ void audioAvailableChanged(bool audioAvailable);
+ void videoAvailableChanged(bool videoAvailable);
+
+ void bufferStatusChanged(int percentFilled);
+
+ void seekableChanged(bool seekable);
+ void playbackRateChanged(qreal rate);
+
+ void error(QMediaPlayer::Error error);
+
+public:
+ virtual void bind(QObject*);
+ virtual void unbind(QObject*);
+
+private:
+ Q_DISABLE_COPY(QMediaPlayer)
+ Q_DECLARE_PRIVATE(QMediaPlayer)
+ Q_PRIVATE_SLOT(d_func(), void _q_stateChanged(QMediaPlayer::State))
+ Q_PRIVATE_SLOT(d_func(), void _q_mediaStatusChanged(QMediaPlayer::MediaStatus))
+ Q_PRIVATE_SLOT(d_func(), void _q_error(int, const QString &))
+ Q_PRIVATE_SLOT(d_func(), void _q_updateMedia(const QMediaContent&))
+ Q_PRIVATE_SLOT(d_func(), void _q_playlistDestroyed())
+};
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QMediaPlayer::State)
+Q_DECLARE_METATYPE(QMediaPlayer::MediaStatus)
+Q_DECLARE_METATYPE(QMediaPlayer::Error)
+
+QT_END_HEADER
+
+#endif // QMEDIAPLAYER_H
diff --git a/src/multimedia/playback/qmediaplayercontrol.cpp b/src/multimedia/playback/qmediaplayercontrol.cpp
new file mode 100644
index 0000000000..2129098d33
--- /dev/null
+++ b/src/multimedia/playback/qmediaplayercontrol.cpp
@@ -0,0 +1,378 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtMultimedia/qmediaplayercontrol.h>
+#include <QtMultimedia/private/qmediacontrol_p.h>
+#include <QtMultimedia/qmediaplayer.h>
+
+
+QT_BEGIN_NAMESPACE
+
+
+/*!
+ \class QMediaPlayerControl
+ \ingroup multimedia-serv
+ \since 4.7
+ \preliminary
+ \brief The QMediaPlayerControl class provides access to the media playing
+ functionality of a QMediaService.
+
+ If a QMediaService can play media is will implement QMediaPlayerControl.
+ This control provides a means to set the \l {setMedia()}{media} to play,
+ \l {play()}{start}, \l {pause()} {pause} and \l {stop()}{stop} playback,
+ \l {setPosition()}{seek}, and control the \l {setVolume()}{volume}.
+ It also provides feedback on the \l {duration()}{duration} of the media,
+ the current \l {position()}{position}, and \l {bufferStatus()}{buffering}
+ progress.
+
+ The functionality provided by this control is exposed to application
+ code through the QMediaPlayer class.
+
+ The interface name of QMediaPlayerControl is \c com.nokia.Qt.QMediaPlayerControl/1.0 as
+ defined in QMediaPlayerControl_iid.
+
+ \sa QMediaService::control(), QMediaPlayer
+*/
+
+/*!
+ \macro QMediaPlayerControl_iid
+
+ \c com.nokia.Qt.QMediaPlayerControl/1.0
+
+ Defines the interface name of the QMediaPlayerControl class.
+
+ \relates QMediaPlayerControl
+*/
+
+/*!
+ Destroys a media player control.
+*/
+QMediaPlayerControl::~QMediaPlayerControl()
+{
+}
+
+/*!
+ Constructs a new media player control with the given \a parent.
+*/
+QMediaPlayerControl::QMediaPlayerControl(QObject *parent):
+ QMediaControl(*new QMediaControlPrivate, parent)
+{
+}
+
+/*!
+ \fn QMediaPlayerControl::state() const
+
+ Returns the state of a player control.
+*/
+
+/*!
+ \fn QMediaPlayerControl::stateChanged(QMediaPlayer::State state)
+
+ Signals that the \a state of a player control has changed.
+
+ \sa state()
+*/
+
+/*!
+ \fn QMediaPlayerControl::mediaStatus() const
+
+ Returns the status of the current media.
+*/
+
+/*!
+ \fn QMediaPlayerControl::mediaStatusChanged(QMediaPlayer::MediaStatus status)
+
+ Signals that the \a status of the current media has changed.
+
+ \sa mediaStatus()
+*/
+
+
+/*!
+ \fn QMediaPlayerControl::duration() const
+
+ Returns the duration of the current media in milliseconds.
+*/
+
+/*!
+ \fn QMediaPlayerControl::durationChanged(qint64 duration)
+
+ Signals that the \a duration of the current media has changed.
+
+ \sa duration()
+*/
+
+/*!
+ \fn QMediaPlayerControl::position() const
+
+ Returns the current playback position in milliseconds.
+*/
+
+/*!
+ \fn QMediaPlayerControl::setPosition(qint64 position)
+
+ Sets the playback \a position of the current media. This will initiate a seek and it may take
+ some time for playback to reach the position set.
+*/
+
+/*!
+ \fn QMediaPlayerControl::positionChanged(qint64 position)
+
+ Signals the playback \a position has changed.
+
+ This is only emitted in when there has been a discontinous change in the playback postion, such
+ as a seek or the position being reset.
+
+ \sa position()
+*/
+
+/*!
+ \fn QMediaPlayerControl::volume() const
+
+ Returns the audio volume of a player control.
+*/
+
+/*!
+ \fn QMediaPlayerControl::setVolume(int volume)
+
+ Sets the audio \a volume of a player control.
+*/
+
+/*!
+ \fn QMediaPlayerControl::volumeChanged(int volume)
+
+ Signals the audio \a volume of a player control has changed.
+
+ \sa volume()
+*/
+
+/*!
+ \fn QMediaPlayerControl::isMuted() const
+
+ Returns the mute state of a player control.
+*/
+
+/*!
+ \fn QMediaPlayerControl::setMuted(bool mute)
+
+ Sets the \a mute state of a player control.
+*/
+
+/*!
+ \fn QMediaPlayerControl::mutedChanged(bool mute)
+
+ Signals a change in the \a mute status of a player control.
+
+ \sa isMuted()
+*/
+
+/*!
+ \fn QMediaPlayerControl::bufferStatus() const
+
+ Returns the buffering progress of the current media. Progress is measured in the percentage
+ of the buffer filled.
+*/
+
+/*!
+ \fn QMediaPlayerControl::bufferStatusChanged(int progress)
+
+ Signals that buffering \a progress has changed.
+
+ \sa bufferStatus()
+*/
+
+/*!
+ \fn QMediaPlayerControl::isAudioAvailable() const
+
+ Identifies if there is audio output available for the current media.
+
+ Returns true if audio output is available and false otherwise.
+*/
+
+/*!
+ \fn QMediaPlayerControl::audioAvailableChanged(bool audio)
+
+ Signals that there has been a change in the availability of \a audio output.
+
+ \sa isAudioAvailable()
+*/
+
+/*!
+ \fn QMediaPlayerControl::isVideoAvailable() const
+
+ Identifies if there is video output available for the current media.
+
+ Returns true if video output is available and false otherwise.
+*/
+
+/*!
+ \fn QMediaPlayerControl::videoAvailableChanged(bool video)
+
+ Signals that there has been a change in the availability of \a video output.
+
+ \sa isVideoAvailable()
+*/
+
+/*!
+ \fn QMediaPlayerControl::isSeekable() const
+
+ Identifies if the current media is seekable.
+
+ Returns true if it possible to seek within the current media, and false otherwise.
+*/
+
+/*!
+ \fn QMediaPlayerControl::seekableChanged(bool seekable)
+
+ Signals that the \a seekable state of a player control has changed.
+
+ \sa isSeekable()
+*/
+
+/*!
+ \fn QMediaPlayerControl::availablePlaybackRanges() const
+
+ Returns a range of times in milliseconds that can be played back.
+
+ Usually for local files this is a continuous interval equal to [0..duration()]
+ or an empty time range if seeking is not supported, but for network sources
+ it refers to the buffered parts of the media.
+*/
+
+/*!
+ \fn QMediaPlayerControl::availablePlaybackRangesChanged(const QMediaTimeRange &ranges)
+
+ Signals that the available media playback \a ranges have changed.
+
+ \sa QMediaPlayerControl::availablePlaybackRanges()
+*/
+
+/*!
+ \fn qreal QMediaPlayerControl::playbackRate() const
+
+ Returns the rate of playback.
+*/
+
+/*!
+ \fn QMediaPlayerControl::setPlaybackRate(qreal rate)
+
+ Sets the \a rate of playback.
+*/
+
+/*!
+ \fn QMediaPlayerControl::media() const
+
+ Returns the current media source.
+*/
+
+/*!
+ \fn QMediaPlayerControl::mediaStream() const
+
+ Returns the current media stream. This is only a valid if a stream was passed to setMedia().
+
+ \sa setMedia()
+*/
+
+/*!
+ \fn QMediaPlayerControl::setMedia(const QMediaContent &media, QIODevice *stream)
+
+ Sets the current \a media source. If a \a stream is supplied; data will be read from that
+ instead of attempting to resolve the media source. The media source may still be used to
+ supply media information such as mime type.
+
+ Setting the media to a null QMediaContent will cause the control to discard all
+ information relating to the current media source and to cease all I/O operations related
+ to that media.
+*/
+
+/*!
+ \fn QMediaPlayerControl::mediaChanged(const QMediaContent& content)
+
+ Signals that the current media \a content has changed.
+*/
+
+/*!
+ \fn QMediaPlayerControl::play()
+
+ Starts playback of the current media.
+
+ If successful the player control will immediately enter the \l {QMediaPlayer::PlayingState}
+ {playing} state.
+
+ \sa state()
+*/
+
+/*!
+ \fn QMediaPlayerControl::pause()
+
+ Pauses playback of the current media.
+
+ If sucessful the player control will immediately enter the \l {QMediaPlayer::PausedState}
+ {paused} state.
+
+ \sa state(), play(), stop()
+*/
+
+/*!
+ \fn QMediaPlayerControl::stop()
+
+ Stops playback of the current media.
+
+ If succesful the player control will immediately enter the \l {QMediaPlayer::StoppedState}
+ {stopped} state.
+*/
+
+/*!
+ \fn QMediaPlayerControl::error(int error, const QString &errorString)
+
+ Signals that an \a error has occurred. The \a errorString provides a more detailed explanation.
+*/
+
+/*!
+ \fn QMediaPlayerControl::playbackRateChanged(qreal rate)
+
+ Signal emitted when playback rate changes to \a rate.
+*/
+
+QT_END_NAMESPACE
+
+#include "moc_qmediaplayercontrol.cpp"
+
diff --git a/src/multimedia/playback/qmediaplayercontrol.h b/src/multimedia/playback/qmediaplayercontrol.h
new file mode 100644
index 0000000000..a7e418b8dc
--- /dev/null
+++ b/src/multimedia/playback/qmediaplayercontrol.h
@@ -0,0 +1,131 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtMultimedia module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMEDIAPLAYERCONTROL_H
+#define QMEDIAPLAYERCONTROL_H
+
+#include <QtCore/qpair.h>
+
+#include <QtMultimedia/qmediacontrol.h>
+#include <QtMultimedia/qmediaplayer.h>
+#include <QtMultimedia/qmediatimerange.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+
+class QMediaPlaylist;
+
+class Q_MULTIMEDIA_EXPORT QMediaPlayerControl : public QMediaControl
+{
+ Q_OBJECT
+
+public:
+ ~QMediaPlayerControl();
+
+ virtual QMediaPlayer::State state() const = 0;
+
+ virtual QMediaPlayer::MediaStatus mediaStatus() const = 0;
+
+ virtual qint64 duration() const = 0;
+
+ virtual qint64 position() const = 0;
+ virtual void setPosition(qint64 position) = 0;
+
+ virtual int volume() const = 0;
+ virtual void setVolume(int volume) = 0;
+
+ virtual bool isMuted() const = 0;
+ virtual void setMuted(bool muted) = 0;
+
+ virtual int bufferStatus() const = 0;
+
+ virtual bool isAudioAvailable() const = 0;
+ virtual bool isVideoAvailable() const = 0;
+
+ virtual bool isSeekable() const = 0;
+
+ virtual QMediaTimeRange availablePlaybackRanges() const = 0;
+
+ virtual qreal playbackRate() const = 0;
+ virtual void setPlaybackRate(qreal rate) = 0;
+
+ virtual QMediaContent media() const = 0;
+ virtual const QIODevice *mediaStream() const = 0;
+ virtual void setMedia(const QMediaContent &media, QIODevice *stream) = 0;
+
+ virtual void play() = 0;
+ virtual void pause() = 0;
+ virtual void stop() = 0;
+
+Q_SIGNALS:
+ void mediaChanged(const QMediaContent& content);
+ void durationChanged(qint64 duration);
+ void positionChanged(qint64 position);
+ void stateChanged(QMediaPlayer::State newState);
+ void mediaStatusChanged(QMediaPlayer::MediaStatus status);
+ void volumeChanged(int volume);
+ void mutedChanged(bool muted);
+ void audioAvailableChanged(bool audioAvailable);
+ void videoAvailableChanged(bool videoAvailable);
+ void bufferStatusChanged(int percentFilled);
+ void seekableChanged(bool);
+ void availablePlaybackRangesChanged(const QMediaTimeRange&);
+ void playbackRateChanged(qreal rate);
+ void error(int error, const QString &errorString);
+
+protected:
+ QMediaPlayerControl(QObject* parent = 0);
+};
+
+#define QMediaPlayerControl_iid "com.nokia.Qt.QMediaPlayerControl/1.0"
+Q_MEDIA_DECLARE_CONTROL(QMediaPlayerControl, QMediaPlayerControl_iid)
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QMEDIAPLAYERCONTROL_H
+
diff --git a/src/network/access/qhttpnetworkrequest.cpp b/src/network/access/qhttpnetworkrequest.cpp
index 8cdfe6a472..9eb2399b25 100644
--- a/src/network/access/qhttpnetworkrequest.cpp
+++ b/src/network/access/qhttpnetworkrequest.cpp
@@ -61,6 +61,7 @@ QHttpNetworkRequestPrivate::QHttpNetworkRequestPrivate(const QHttpNetworkRequest
uploadByteDevice = other.uploadByteDevice;
autoDecompress = other.autoDecompress;
pipeliningAllowed = other.pipeliningAllowed;
+ customVerb = other.customVerb;
}
QHttpNetworkRequestPrivate::~QHttpNetworkRequestPrivate()
@@ -76,36 +77,38 @@ bool QHttpNetworkRequestPrivate::operator==(const QHttpNetworkRequestPrivate &ot
QByteArray QHttpNetworkRequestPrivate::methodName() const
{
- QByteArray ba;
switch (operation) {
- case QHttpNetworkRequest::Options:
- ba += "OPTIONS";
- break;
case QHttpNetworkRequest::Get:
- ba += "GET";
+ return "GET";
break;
case QHttpNetworkRequest::Head:
- ba += "HEAD";
+ return "HEAD";
break;
case QHttpNetworkRequest::Post:
- ba += "POST";
+ return "POST";
+ break;
+ case QHttpNetworkRequest::Options:
+ return "OPTIONS";
break;
case QHttpNetworkRequest::Put:
- ba += "PUT";
+ return "PUT";
break;
case QHttpNetworkRequest::Delete:
- ba += "DELETE";
+ return "DELETE";
break;
case QHttpNetworkRequest::Trace:
- ba += "TRACE";
+ return "TRACE";
break;
case QHttpNetworkRequest::Connect:
- ba += "CONNECT";
+ return "CONNECT";
+ break;
+ case QHttpNetworkRequest::Custom:
+ return customVerb;
break;
default:
break;
}
- return ba;
+ return QByteArray();
}
QByteArray QHttpNetworkRequestPrivate::uri(bool throughProxy) const
@@ -128,26 +131,37 @@ QByteArray QHttpNetworkRequestPrivate::uri(bool throughProxy) const
QByteArray QHttpNetworkRequestPrivate::header(const QHttpNetworkRequest &request, bool throughProxy)
{
- QByteArray ba = request.d->methodName();
- QByteArray uri = request.d->uri(throughProxy);
- ba += ' ' + uri;
+ QList<QPair<QByteArray, QByteArray> > fields = request.header();
+ QByteArray ba;
+ ba.reserve(40 + fields.length()*25); // very rough lower bound estimation
- QString majorVersion = QString::number(request.majorVersion());
- QString minorVersion = QString::number(request.minorVersion());
- ba += " HTTP/" + majorVersion.toLatin1() + '.' + minorVersion.toLatin1() + "\r\n";
+ ba += request.d->methodName();
+ ba += ' ';
+ ba += request.d->uri(throughProxy);
+
+ ba += " HTTP/";
+ ba += QByteArray::number(request.majorVersion());
+ ba += '.';
+ ba += QByteArray::number(request.minorVersion());
+ ba += "\r\n";
- QList<QPair<QByteArray, QByteArray> > fields = request.header();
QList<QPair<QByteArray, QByteArray> >::const_iterator it = fields.constBegin();
- for (; it != fields.constEnd(); ++it)
- ba += it->first + ": " + it->second + "\r\n";
+ QList<QPair<QByteArray, QByteArray> >::const_iterator endIt = fields.constEnd();
+ for (; it != endIt; ++it) {
+ ba += it->first;
+ ba += ": ";
+ ba += it->second;
+ ba += "\r\n";
+ }
if (request.d->operation == QHttpNetworkRequest::Post) {
// add content type, if not set in the request
if (request.headerField("content-type").isEmpty())
ba += "Content-Type: application/x-www-form-urlencoded\r\n";
if (!request.d->uploadByteDevice && request.d->url.hasQuery()) {
QByteArray query = request.d->url.encodedQuery();
- ba += "Content-Length: "+ QByteArray::number(query.size()) + "\r\n";
- ba += "\r\n";
+ ba += "Content-Length: ";
+ ba += QByteArray::number(query.size());
+ ba += "\r\n\r\n";
ba += query;
} else {
ba += "\r\n";
@@ -230,6 +244,16 @@ void QHttpNetworkRequest::setOperation(Operation operation)
d->operation = operation;
}
+QByteArray QHttpNetworkRequest::customVerb() const
+{
+ return d->customVerb;
+}
+
+void QHttpNetworkRequest::setCustomVerb(const QByteArray &customVerb)
+{
+ d->customVerb = customVerb;
+}
+
QHttpNetworkRequest::Priority QHttpNetworkRequest::priority() const
{
return d->priority;
diff --git a/src/network/access/qhttpnetworkrequest_p.h b/src/network/access/qhttpnetworkrequest_p.h
index dad118e9fe..1b35a84642 100644
--- a/src/network/access/qhttpnetworkrequest_p.h
+++ b/src/network/access/qhttpnetworkrequest_p.h
@@ -72,7 +72,8 @@ public:
Put,
Delete,
Trace,
- Connect
+ Connect,
+ Custom
};
enum Priority {
@@ -103,6 +104,9 @@ public:
Operation operation() const;
void setOperation(Operation operation);
+ QByteArray customVerb() const;
+ void setCustomVerb(const QByteArray &customOperation);
+
Priority priority() const;
void setPriority(Priority priority);
@@ -133,6 +137,7 @@ public:
static QByteArray header(const QHttpNetworkRequest &request, bool throughProxy);
QHttpNetworkRequest::Operation operation;
+ QByteArray customVerb;
QHttpNetworkRequest::Priority priority;
mutable QNonContiguousByteDevice* uploadByteDevice;
bool autoDecompress;
diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp
index 8ac64d21a9..1fcfebbf38 100644
--- a/src/network/access/qnetworkaccessbackend.cpp
+++ b/src/network/access/qnetworkaccessbackend.cpp
@@ -46,9 +46,11 @@
#include "qnetworkreply_p.h"
#include "QtCore/qhash.h"
#include "QtCore/qmutex.h"
+#include "QtNetwork/qnetworksession.h"
#include "qnetworkaccesscachebackend_p.h"
#include "qabstractnetworkcache.h"
+#include "qhostinfo.h"
#include "private/qnoncontiguousbytedevice_p.h"
@@ -120,8 +122,11 @@ QNonContiguousByteDevice* QNetworkAccessBackend::createUploadByteDevice()
if (reply->outgoingDataBuffer)
device = QNonContiguousByteDeviceFactory::create(reply->outgoingDataBuffer);
- else
+ else if (reply->outgoingData) {
device = QNonContiguousByteDeviceFactory::create(reply->outgoingData);
+ } else {
+ return 0;
+ }
bool bufferDisallowed =
reply->request.attribute(QNetworkRequest::DoNotBufferUploadDataAttribute,
@@ -341,4 +346,35 @@ void QNetworkAccessBackend::sslErrors(const QList<QSslError> &errors)
#endif
}
+/*!
+ Starts the backend. Returns true if the backend is started. Returns false if the backend
+ could not be started due to an unopened or roaming session. The caller should recall this
+ function once the session has been opened or the roaming process has finished.
+*/
+bool QNetworkAccessBackend::start()
+{
+ if (!manager->networkSession) {
+ open();
+ return true;
+ }
+
+ // This is not ideal.
+ const QString host = reply->url.host();
+ if (host == QLatin1String("localhost") ||
+ QHostAddress(host) == QHostAddress::LocalHost ||
+ QHostAddress(host) == QHostAddress::LocalHostIPv6) {
+ // Don't need an open session for localhost access.
+ open();
+ return true;
+ }
+
+ if (manager->networkSession->isOpen() &&
+ manager->networkSession->state() == QNetworkSession::Connected) {
+ open();
+ return true;
+ }
+
+ return false;
+}
+
QT_END_NAMESPACE
diff --git a/src/network/access/qnetworkaccessbackend_p.h b/src/network/access/qnetworkaccessbackend_p.h
index 43d993ccfc..9bc15e5aad 100644
--- a/src/network/access/qnetworkaccessbackend_p.h
+++ b/src/network/access/qnetworkaccessbackend_p.h
@@ -111,6 +111,7 @@ public:
// socket).
virtual void open() = 0;
+ virtual bool start();
virtual void closeDownstreamChannel() = 0;
virtual bool waitForDownstreamReadyRead(int msecs) = 0;
@@ -160,6 +161,10 @@ public:
// This will possibly enable buffering of the upload data.
virtual bool needsResetableUploadData() { return false; }
+ // Returns true if backend is able to resume downloads.
+ virtual bool canResume() const { return false; }
+ virtual void setResumeOffset(quint64 offset) { Q_UNUSED(offset); }
+
protected:
// Create the device used for reading the upload data
QNonContiguousByteDevice* createUploadByteDevice();
@@ -190,6 +195,7 @@ private:
friend class QNetworkAccessManager;
friend class QNetworkAccessManagerPrivate;
friend class QNetworkAccessBackendUploadIODevice;
+ friend class QNetworkReplyImplPrivate;
QNetworkAccessManagerPrivate *manager;
QNetworkReplyImplPrivate *reply;
};
diff --git a/src/network/access/qnetworkaccessdatabackend.cpp b/src/network/access/qnetworkaccessdatabackend.cpp
index 52c554f6aa..efb6e3ef26 100644
--- a/src/network/access/qnetworkaccessdatabackend.cpp
+++ b/src/network/access/qnetworkaccessdatabackend.cpp
@@ -43,6 +43,8 @@
#include "qnetworkrequest.h"
#include "qnetworkreply.h"
#include "qurlinfo.h"
+#include "private/qdataurl_p.h"
+#include <qcoreapplication.h>
QT_BEGIN_NAMESPACE
@@ -71,64 +73,33 @@ void QNetworkAccessDataBackend::open()
if (operation() != QNetworkAccessManager::GetOperation &&
operation() != QNetworkAccessManager::HeadOperation) {
// data: doesn't support anything but GET
- QString msg = QObject::tr("Operation not supported on %1")
+ const QString msg = QCoreApplication::translate("QNetworkAccessDataBackend",
+ "Operation not supported on %1")
.arg(uri.toString());
error(QNetworkReply::ContentOperationNotPermittedError, msg);
finished();
return;
}
- if (uri.host().isEmpty()) {
- setHeader(QNetworkRequest::ContentTypeHeader, QLatin1String("text/plain;charset=US-ASCII"));
-
- // the following would have been the correct thing, but
- // reality often differs from the specification. People have
- // data: URIs with ? and #
- //QByteArray data = QByteArray::fromPercentEncoding(uri.encodedPath());
- QByteArray data = QByteArray::fromPercentEncoding(uri.toEncoded());
-
- // remove the data: scheme
- data.remove(0, 5);
-
- // parse it:
- int pos = data.indexOf(',');
- if (pos != -1) {
- QByteArray payload = data.mid(pos + 1);
- data.truncate(pos);
- data = data.trimmed();
-
- // find out if the payload is encoded in Base64
- if (data.endsWith(";base64")) {
- payload = QByteArray::fromBase64(payload);
- data.chop(7);
- }
-
- if (data.toLower().startsWith("charset")) {
- int i = 7; // strlen("charset")
- while (data.at(i) == ' ')
- ++i;
- if (data.at(i) == '=')
- data.prepend("text/plain;");
- }
-
- if (!data.isEmpty())
- setHeader(QNetworkRequest::ContentTypeHeader, data.trimmed());
-
- setHeader(QNetworkRequest::ContentLengthHeader, payload.size());
- emit metaDataChanged();
-
- QByteDataBuffer list;
- list.append(payload);
- payload.clear(); // important because of implicit sharing!
- writeDownstreamData(list);
-
- finished();
- return;
- }
+ QPair<QString, QByteArray> decoded = qDecodeDataUrl(uri);
+
+ if (! decoded.first.isNull()) {
+ setHeader(QNetworkRequest::ContentTypeHeader, decoded.first);
+ setHeader(QNetworkRequest::ContentLengthHeader, decoded.second.size());
+ emit metaDataChanged();
+
+ QByteDataBuffer list;
+ list.append(decoded.second);
+ decoded.second.clear(); // important because of implicit sharing!
+ writeDownstreamData(list);
+
+ finished();
+ return;
}
// something wrong with this URI
- QString msg = QObject::tr("Invalid URI: %1").arg(uri.toString());
+ const QString msg = QCoreApplication::translate("QNetworkAccessDataBackend",
+ "Invalid URI: %1").arg(uri.toString());
error(QNetworkReply::ProtocolFailure, msg);
finished();
}
diff --git a/src/network/access/qnetworkaccessdebugpipebackend.cpp b/src/network/access/qnetworkaccessdebugpipebackend.cpp
index 5926d0b5d6..cd077e7056 100644
--- a/src/network/access/qnetworkaccessdebugpipebackend.cpp
+++ b/src/network/access/qnetworkaccessdebugpipebackend.cpp
@@ -252,7 +252,7 @@ void QNetworkAccessDebugPipeBackend::socketError()
break;
}
- error(code, QObject::tr("Socket error on %1: %2")
+ error(code, QNetworkAccessDebugPipeBackend::tr("Socket error on %1: %2")
.arg(url().toString(), socket.errorString()));
finished();
disconnect(&socket, SIGNAL(disconnected()), this, SLOT(socketDisconnected()));
@@ -267,7 +267,7 @@ void QNetworkAccessDebugPipeBackend::socketDisconnected()
// normal close
} else {
// abnormal close
- QString msg = QObject::tr("Remote host closed the connection prematurely on %1")
+ QString msg = QNetworkAccessDebugPipeBackend::tr("Remote host closed the connection prematurely on %1")
.arg(url().toString());
error(QNetworkReply::RemoteHostClosedError, msg);
finished();
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index af971a71f9..7a48c2b16e 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -213,6 +213,7 @@ QNetworkAccessHttpBackendFactory::create(QNetworkAccessManager::Operation op,
case QNetworkAccessManager::HeadOperation:
case QNetworkAccessManager::PutOperation:
case QNetworkAccessManager::DeleteOperation:
+ case QNetworkAccessManager::CustomOperation:
break;
default:
@@ -296,6 +297,7 @@ QNetworkAccessHttpBackend::QNetworkAccessHttpBackend()
#ifndef QT_NO_OPENSSL
, pendingSslConfiguration(0), pendingIgnoreAllSslErrors(false)
#endif
+ , resumeOffset(0)
{
}
@@ -480,10 +482,24 @@ void QNetworkAccessHttpBackend::validateCache(QHttpNetworkRequest &httpRequest,
loadedFromCache = false;
}
+static QHttpNetworkRequest::Priority convert(const QNetworkRequest::Priority& prio)
+{
+ switch (prio) {
+ case QNetworkRequest::LowPriority:
+ return QHttpNetworkRequest::LowPriority;
+ case QNetworkRequest::HighPriority:
+ return QHttpNetworkRequest::HighPriority;
+ case QNetworkRequest::NormalPriority:
+ default:
+ return QHttpNetworkRequest::NormalPriority;
+ }
+}
+
void QNetworkAccessHttpBackend::postRequest()
{
bool loadedFromCache = false;
QHttpNetworkRequest httpRequest;
+ httpRequest.setPriority(convert(request().priority()));
switch (operation()) {
case QNetworkAccessManager::GetOperation:
httpRequest.setOperation(QHttpNetworkRequest::Get);
@@ -512,6 +528,14 @@ void QNetworkAccessHttpBackend::postRequest()
httpRequest.setOperation(QHttpNetworkRequest::Delete);
break;
+ case QNetworkAccessManager::CustomOperation:
+ invalidateCache(); // for safety reasons, we don't know what the operation does
+ httpRequest.setOperation(QHttpNetworkRequest::Custom);
+ httpRequest.setUploadByteDevice(createUploadByteDevice());
+ httpRequest.setCustomVerb(request().attribute(
+ QNetworkRequest::CustomVerbAttribute).toByteArray());
+ break;
+
default:
break; // can't happen
}
@@ -519,6 +543,28 @@ void QNetworkAccessHttpBackend::postRequest()
httpRequest.setUrl(url());
QList<QByteArray> headers = request().rawHeaderList();
+ if (resumeOffset != 0) {
+ if (headers.contains("Range")) {
+ // Need to adjust resume offset for user specified range
+
+ headers.removeOne("Range");
+
+ // We've already verified that requestRange starts with "bytes=", see canResume.
+ QByteArray requestRange = request().rawHeader("Range").mid(6);
+
+ int index = requestRange.indexOf('-');
+
+ quint64 requestStartOffset = requestRange.left(index).toULongLong();
+ quint64 requestEndOffset = requestRange.mid(index + 1).toULongLong();
+
+ requestRange = "bytes=" + QByteArray::number(resumeOffset + requestStartOffset) +
+ '-' + QByteArray::number(requestEndOffset);
+
+ httpRequest.setHeaderField("Range", requestRange);
+ } else {
+ httpRequest.setHeaderField("Range", "bytes=" + QByteArray::number(resumeOffset) + '-');
+ }
+ }
foreach (const QByteArray &header, headers)
httpRequest.setHeaderField(header, request().rawHeader(header));
@@ -1094,6 +1140,31 @@ QNetworkCacheMetaData QNetworkAccessHttpBackend::fetchCacheMetaData(const QNetwo
return metaData;
}
+bool QNetworkAccessHttpBackend::canResume() const
+{
+ // Only GET operation supports resuming.
+ if (operation() != QNetworkAccessManager::GetOperation)
+ return false;
+
+ // Can only resume if server/resource supports Range header.
+ if (httpReply->headerField("Accept-Ranges", "none") == "none")
+ return false;
+
+ // We only support resuming for byte ranges.
+ if (request().hasRawHeader("Range")) {
+ QByteArray range = request().rawHeader("Range");
+ if (!range.startsWith("bytes="))
+ return false;
+ }
+
+ return true;
+}
+
+void QNetworkAccessHttpBackend::setResumeOffset(quint64 offset)
+{
+ resumeOffset = offset;
+}
+
QT_END_NAMESPACE
#endif // QT_NO_HTTP
diff --git a/src/network/access/qnetworkaccesshttpbackend_p.h b/src/network/access/qnetworkaccesshttpbackend_p.h
index 0eaf003587..e5cc0ab281 100644
--- a/src/network/access/qnetworkaccesshttpbackend_p.h
+++ b/src/network/access/qnetworkaccesshttpbackend_p.h
@@ -99,6 +99,9 @@ public:
// we return true since HTTP needs to send PUT/POST data again after having authenticated
bool needsResetableUploadData() { return true; }
+ bool canResume() const;
+ void setResumeOffset(quint64 offset);
+
private slots:
void replyReadyRead();
void replyFinished();
@@ -120,6 +123,8 @@ private:
QList<QSslError> pendingIgnoreSslErrorsList;
#endif
+ quint64 resumeOffset;
+
void disconnectFromHttp();
void setupConnection();
void validateCache(QHttpNetworkRequest &httpRequest, bool &loadedFromCache);
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 03b7192f02..7bb1399618 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -47,6 +47,8 @@
#include "qnetworkcookie.h"
#include "qabstractnetworkcache.h"
+#include "QtNetwork/qnetworksession.h"
+
#include "qnetworkaccesshttpbackend_p.h"
#include "qnetworkaccessftpbackend_p.h"
#include "qnetworkaccessfilebackend_p.h"
@@ -59,6 +61,7 @@
#include "QtCore/qvector.h"
#include "QtNetwork/qauthenticator.h"
#include "QtNetwork/qsslconfiguration.h"
+#include "QtNetwork/qnetworkconfigmanager.h"
QT_BEGIN_NAMESPACE
@@ -161,12 +164,52 @@ static void ensureInitialized()
\value DeleteOperation delete contents operation (created with
deleteResource())
+ \value CustomOperation custom operation (created with
+ sendCustomRequest())
+
\omitvalue UnknownOperation
\sa QNetworkReply::operation()
*/
/*!
+ \property QNetworkAccessManager::networkAccess
+ \brief states whether network access is enabled or disabled through this network access
+ manager.
+
+ \since 4.7
+
+ Network access is enabled by default.
+
+ When network access is disabled the network access manager will not process any new network
+ requests, all such requests will fail with an error. Requests with URLs with the file:// scheme
+ will still be processed.
+
+ This property can be used to enable and disable network access for all clients of a single
+ network access manager instance.
+*/
+
+/*!
+ \fn void QNetworkAccessManager::networkAccessChanged(bool enabled)
+
+ This signal is emitted when the value of the \l networkAccess property changes. If \a enabled
+ is true new requests that access the network will be processed; otherwise new network requests
+ that require network access will fail with an error.
+*/
+
+/*!
+ \fn void QNetworkAccessManager::networkSessionOnline()
+
+ \since 4.7
+
+ \internal
+
+ This signal is emitted when the status of the network session changes into a usable state.
+ It is used to signal QNetworkReply's to start or migrate their network operation once the
+ network session has been opened / roamed.
+*/
+
+/*!
\fn void QNetworkAccessManager::proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *authenticator)
This signal is emitted whenever a proxy requests authentication
@@ -573,7 +616,7 @@ QNetworkReply *QNetworkAccessManager::head(const QNetworkRequest &request)
The contents as well as associated headers will be downloaded.
- \sa post(), put(), deleteResource()
+ \sa post(), put(), deleteResource(), sendCustomRequest()
*/
QNetworkReply *QNetworkAccessManager::get(const QNetworkRequest &request)
{
@@ -592,7 +635,7 @@ QNetworkReply *QNetworkAccessManager::get(const QNetworkRequest &request)
\note Sending a POST request on protocols other than HTTP and
HTTPS is undefined and will probably fail.
- \sa get(), put(), deleteResource()
+ \sa get(), put(), deleteResource(), sendCustomRequest()
*/
QNetworkReply *QNetworkAccessManager::post(const QNetworkRequest &request, QIODevice *data)
{
@@ -633,7 +676,7 @@ QNetworkReply *QNetworkAccessManager::post(const QNetworkRequest &request, const
do not allow. Form upload mechanisms, including that of uploading
files through HTML forms, use the POST mechanism.
- \sa get(), post()
+ \sa get(), post(), deleteResource(), sendCustomRequest()
*/
QNetworkReply *QNetworkAccessManager::put(const QNetworkRequest &request, QIODevice *data)
{
@@ -664,7 +707,7 @@ QNetworkReply *QNetworkAccessManager::put(const QNetworkRequest &request, const
\note This feature is currently available for HTTP only, performing an
HTTP DELETE request.
- \sa get(), post(), put()
+ \sa get(), post(), put(), sendCustomRequest()
*/
QNetworkReply *QNetworkAccessManager::deleteResource(const QNetworkRequest &request)
{
@@ -672,6 +715,136 @@ QNetworkReply *QNetworkAccessManager::deleteResource(const QNetworkRequest &requ
}
/*!
+ \since 4.7
+
+ Sets the network configuration that will be used when creating the
+ \l {QNetworkSession}{network session} to \a config.
+
+ The network configuration is used to create and open a network session before any request that
+ requires network access is process. If no network configuration is explicitly set via this
+ function the network configuration returned by
+ QNetworkConfigurationManager::defaultConfiguration() will be used.
+
+ To restore the default network configuration set the network configuration to the value
+ returned from QNetworkConfigurationManager::defaultConfiguration().
+
+ \snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 2
+
+ If an invalid network configuration is set, a network session will not be created. In this
+ case network requests will be processed regardless, but may fail. For example:
+
+ \snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 3
+
+ \sa configuration(), QNetworkSession
+*/
+void QNetworkAccessManager::setConfiguration(const QNetworkConfiguration &config)
+{
+ d_func()->createSession(config);
+}
+
+/*!
+ \since 4.7
+
+ Returns the network configuration that will be used to create the
+ \l {QNetworkSession}{network session} which will be used when processing network requests.
+
+ \sa setConfiguration(), activeConfiguration()
+*/
+QNetworkConfiguration QNetworkAccessManager::configuration() const
+{
+ Q_D(const QNetworkAccessManager);
+
+ if (d->networkSession)
+ return d->networkSession->configuration();
+ else
+ return QNetworkConfiguration();
+}
+
+/*!
+ \since 4.7
+
+ Returns the current active network configuration.
+
+ If the network configuration returned by configuration() is of type
+ QNetworkConfiguration::ServiceNetwork this function will return the current active child
+ network configuration of that configuration. Otherwise returns the same network configuration
+ as configuration().
+
+ Use this function to return the actual network configuration currently in use by the network
+ session.
+
+ \sa configuration()
+*/
+QNetworkConfiguration QNetworkAccessManager::activeConfiguration() const
+{
+ Q_D(const QNetworkAccessManager);
+
+ if (d->networkSession) {
+ QNetworkConfigurationManager manager;
+
+ return manager.configurationFromIdentifier(
+ d->networkSession->sessionProperty(QLatin1String("ActiveConfiguration")).toString());
+ } else {
+ return QNetworkConfiguration();
+ }
+}
+
+/*!
+ \since 4.7
+
+ Enables network access via this QNetworkAccessManager if \a enabled is true; otherwise disables
+ access.
+*/
+void QNetworkAccessManager::setNetworkAccessEnabled(bool enabled)
+{
+ Q_D(QNetworkAccessManager);
+
+ if (d->networkAccessEnabled != enabled) {
+ d->networkAccessEnabled = enabled;
+ emit networkAccessChanged(enabled);
+ }
+}
+
+/*!
+ \since 4.7
+
+ Returns true if network access via this QNetworkAccessManager is enabled; otherwise returns
+ false.
+*/
+bool QNetworkAccessManager::networkAccessEnabled() const
+{
+ Q_D(const QNetworkAccessManager);
+
+ return d->networkAccessEnabled;
+}
+
+/*!
+ \since 4.7
+
+ Sends a custom request to the server identified by the URL of \a request.
+
+ It is the user's responsibility to send a \a verb to the server that is valid
+ according to the HTTP specification.
+
+ This method provides means to send verbs other than the common ones provided
+ via get() or post() etc., for instance sending an HTTP OPTIONS command.
+
+ If \a data is not empty, the contents of the \a data
+ device will be uploaded to the server; in that case, data must be open for
+ reading and must remain valid until the finished() signal is emitted for this reply.
+
+ \note This feature is currently available for HTTP only.
+
+ \sa get(), post(), put(), deleteResource()
+*/
+QNetworkReply *QNetworkAccessManager::sendCustomRequest(const QNetworkRequest &request, const QByteArray &verb, QIODevice *data)
+{
+ QNetworkRequest newRequest(request);
+ newRequest.setAttribute(QNetworkRequest::CustomVerbAttribute, verb);
+ return d_func()->postProcess(createRequest(QNetworkAccessManager::CustomOperation, newRequest, data));
+}
+
+/*!
Returns a new QNetworkReply object to handle the operation \a op
and request \a req. The device \a outgoingData is always 0 for Get and
Head requests, but is the value passed to post() and put() in
@@ -700,6 +873,25 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
return new QFileNetworkReply(this, req, op);
}
+ // Return a disabled network reply if network access is disabled.
+ // Except if the scheme is empty or file://.
+ if (!d->networkAccessEnabled && !(req.url().scheme() == QLatin1String("file") ||
+ req.url().scheme().isEmpty())) {
+ return new QDisabledNetworkReply(this, req, op);
+ }
+
+ if (!d->networkSession && (d->initializeSession || !d->networkConfiguration.isEmpty())) {
+ QNetworkConfigurationManager manager;
+ if (d->networkConfiguration.isEmpty())
+ d->createSession(manager.defaultConfiguration());
+ else
+ d->createSession(manager.configurationFromIdentifier(d->networkConfiguration));
+
+ d->initializeSession = false;
+ } else if (d->networkSession) {
+ d->networkSession->setSessionProperty(QLatin1String("AutoCloseSessionTimeout"), -1);
+ }
+
QNetworkRequest request = req;
if (!request.header(QNetworkRequest::ContentLengthHeader).isValid() &&
outgoingData && !outgoingData->isSequential()) {
@@ -716,6 +908,8 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
// first step: create the reply
QUrl url = request.url();
QNetworkReplyImpl *reply = new QNetworkReplyImpl(this);
+ if (req.url().scheme() != QLatin1String("file") && !req.url().scheme().isEmpty())
+ connect(this, SIGNAL(networkSessionOnline()), reply, SLOT(_q_networkSessionOnline()));
QNetworkReplyImplPrivate *priv = reply->d_func();
priv->manager = this;
@@ -750,9 +944,13 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
void QNetworkAccessManagerPrivate::_q_replyFinished()
{
Q_Q(QNetworkAccessManager);
+
QNetworkReply *reply = qobject_cast<QNetworkReply *>(q->sender());
if (reply)
emit q->finished(reply);
+
+ if (networkSession && q->findChildren<QNetworkReply *>().count() == 1)
+ networkSession->setSessionProperty(QLatin1String("AutoCloseSessionTimeout"), 120000);
}
void QNetworkAccessManagerPrivate::_q_replySslErrors(const QList<QSslError> &errors)
@@ -1005,6 +1203,52 @@ QNetworkAccessManagerPrivate::~QNetworkAccessManagerPrivate()
{
}
+void QNetworkAccessManagerPrivate::createSession(const QNetworkConfiguration &config)
+{
+ Q_Q(QNetworkAccessManager);
+
+ if (networkSession)
+ delete networkSession;
+
+ if (!config.isValid()) {
+ networkSession = 0;
+ return;
+ }
+
+ networkSession = new QNetworkSession(config, q);
+
+ QObject::connect(networkSession, SIGNAL(opened()), q, SIGNAL(networkSessionOnline()));
+ QObject::connect(networkSession, SIGNAL(closed()), q, SLOT(_q_networkSessionClosed()));
+ QObject::connect(networkSession, SIGNAL(newConfigurationActivated()),
+ q, SLOT(_q_networkSessionNewConfigurationActivated()));
+ QObject::connect(networkSession,
+ SIGNAL(preferredConfigurationChanged(QNetworkConfiguration,bool)),
+ q,
+ SLOT(_q_networkSessionPreferredConfigurationChanged(QNetworkConfiguration,bool)));
+}
+
+void QNetworkAccessManagerPrivate::_q_networkSessionClosed()
+{
+ networkConfiguration = networkSession->configuration().identifier();
+
+ delete networkSession;
+ networkSession = 0;
+}
+
+void QNetworkAccessManagerPrivate::_q_networkSessionNewConfigurationActivated()
+{
+ Q_Q(QNetworkAccessManager);
+
+ networkSession->accept();
+
+ emit q->networkSessionOnline();
+}
+
+void QNetworkAccessManagerPrivate::_q_networkSessionPreferredConfigurationChanged(const QNetworkConfiguration &, bool)
+{
+ networkSession->migrate();
+}
+
QT_END_NAMESPACE
#include "moc_qnetworkaccessmanager.cpp"
diff --git a/src/network/access/qnetworkaccessmanager.h b/src/network/access/qnetworkaccessmanager.h
index d2fe52750a..694a54fd22 100644
--- a/src/network/access/qnetworkaccessmanager.h
+++ b/src/network/access/qnetworkaccessmanager.h
@@ -62,12 +62,16 @@ class QNetworkReply;
class QNetworkProxy;
class QNetworkProxyFactory;
class QSslError;
+class QNetworkConfiguration;
class QNetworkReplyImplPrivate;
class QNetworkAccessManagerPrivate;
class Q_NETWORK_EXPORT QNetworkAccessManager: public QObject
{
Q_OBJECT
+
+ Q_PROPERTY(bool networkAccess READ networkAccessEnabled WRITE setNetworkAccessEnabled NOTIFY networkAccessChanged)
+
public:
enum Operation {
HeadOperation = 1,
@@ -75,6 +79,7 @@ public:
PutOperation,
PostOperation,
DeleteOperation,
+ CustomOperation,
UnknownOperation = 0
};
@@ -102,6 +107,14 @@ public:
QNetworkReply *put(const QNetworkRequest &request, QIODevice *data);
QNetworkReply *put(const QNetworkRequest &request, const QByteArray &data);
QNetworkReply *deleteResource(const QNetworkRequest &request);
+ QNetworkReply *sendCustomRequest(const QNetworkRequest &request, const QByteArray &verb, QIODevice *data = 0);
+
+ void setConfiguration(const QNetworkConfiguration &config);
+ QNetworkConfiguration configuration() const;
+ QNetworkConfiguration activeConfiguration() const;
+
+ void setNetworkAccessEnabled(bool enabled);
+ bool networkAccessEnabled() const;
Q_SIGNALS:
#ifndef QT_NO_NETWORKPROXY
@@ -113,6 +126,10 @@ Q_SIGNALS:
void sslErrors(QNetworkReply *reply, const QList<QSslError> &errors);
#endif
+ void networkSessionOnline();
+
+ void networkAccessChanged(bool enabled);
+
protected:
virtual QNetworkReply *createRequest(Operation op, const QNetworkRequest &request,
QIODevice *outgoingData = 0);
@@ -122,6 +139,9 @@ private:
Q_DECLARE_PRIVATE(QNetworkAccessManager)
Q_PRIVATE_SLOT(d_func(), void _q_replyFinished())
Q_PRIVATE_SLOT(d_func(), void _q_replySslErrors(QList<QSslError>))
+ Q_PRIVATE_SLOT(d_func(), void _q_networkSessionClosed())
+ Q_PRIVATE_SLOT(d_func(), void _q_networkSessionNewConfigurationActivated())
+ Q_PRIVATE_SLOT(d_func(), void _q_networkSessionPreferredConfigurationChanged(QNetworkConfiguration,bool))
};
QT_END_NAMESPACE
diff --git a/src/network/access/qnetworkaccessmanager_p.h b/src/network/access/qnetworkaccessmanager_p.h
index 1749373c38..0140268b73 100644
--- a/src/network/access/qnetworkaccessmanager_p.h
+++ b/src/network/access/qnetworkaccessmanager_p.h
@@ -65,6 +65,7 @@ class QAuthenticator;
class QAbstractNetworkCache;
class QNetworkAuthenticationCredential;
class QNetworkCookieJar;
+class QNetworkSession;
class QNetworkAccessManagerPrivate: public QObjectPrivate
{
@@ -74,6 +75,9 @@ public:
#ifndef QT_NO_NETWORKPROXY
proxyFactory(0),
#endif
+ networkSession(0),
+ networkAccessEnabled(true),
+ initializeSession(true),
cookieJarCreated(false)
{ }
~QNetworkAccessManagerPrivate();
@@ -99,6 +103,13 @@ public:
QNetworkAccessBackend *findBackend(QNetworkAccessManager::Operation op, const QNetworkRequest &request);
+ void createSession(const QNetworkConfiguration &config);
+
+ void _q_networkSessionClosed();
+ void _q_networkSessionNewConfigurationActivated();
+ void _q_networkSessionPreferredConfigurationChanged(const QNetworkConfiguration &config,
+ bool isSeamless);
+
// this is the cache for storing downloaded files
QAbstractNetworkCache *networkCache;
@@ -110,8 +121,12 @@ public:
QNetworkProxyFactory *proxyFactory;
#endif
- bool cookieJarCreated;
+ QNetworkSession *networkSession;
+ QString networkConfiguration;
+ bool networkAccessEnabled;
+ bool initializeSession;
+ bool cookieJarCreated;
// this cache can be used by individual backends to cache e.g. their TCP connections to a server
// and use the connections for multiple requests.
diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp
index 0a8ea5d03a..c8b8c1f23c 100644
--- a/src/network/access/qnetworkreply.cpp
+++ b/src/network/access/qnetworkreply.cpp
@@ -125,6 +125,11 @@ QNetworkReplyPrivate::QNetworkReplyPrivate()
encrypted channel could not be established. The sslErrors() signal
should have been emitted.
+ \value TemporaryNetworkFailureError the connection was broken due
+ to disconnection from the network, however the system has initiated
+ roaming to another access point. The request should be resubmitted
+ and will be processed as soon as the connection is re-established.
+
\value ProxyConnectionRefusedError the connection to the proxy
server was refused (the proxy server is not accepting requests)
@@ -533,6 +538,21 @@ QByteArray QNetworkReply::rawHeader(const QByteArray &headerName) const
return QByteArray();
}
+/*! \typedef QNetworkReply::RawHeaderPair
+
+ RawHeaderPair is a QPair<QByteArray, QByteArray> where the first
+ QByteArray is the header name and the second is the header.
+ */
+
+/*!
+ Returns a list of raw header pairs.
+ */
+const QList<QNetworkReply::RawHeaderPair>& QNetworkReply::rawHeaderPairs() const
+{
+ Q_D(const QNetworkReply);
+ return d->rawHeaders;
+}
+
/*!
Returns a list of headers fields that were sent by the remote
server, in the order that they were sent. Duplicate headers are
diff --git a/src/network/access/qnetworkreply.h b/src/network/access/qnetworkreply.h
index 5be4cce264..acb7379a14 100644
--- a/src/network/access/qnetworkreply.h
+++ b/src/network/access/qnetworkreply.h
@@ -77,6 +77,7 @@ public:
TimeoutError,
OperationCanceledError,
SslHandshakeFailedError,
+ TemporaryNetworkFailureError,
UnknownNetworkError = 99,
// proxy errors (101-199):
@@ -128,6 +129,9 @@ public:
QList<QByteArray> rawHeaderList() const;
QByteArray rawHeader(const QByteArray &headerName) const;
+ typedef QPair<QByteArray, QByteArray> RawHeaderPair;
+ const QList<RawHeaderPair>& rawHeaderPairs() const;
+
// attributes
QVariant attribute(QNetworkRequest::Attribute code) const;
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index 59c7d76dac..b201380d53 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -46,7 +46,9 @@
#include "QtCore/qcoreapplication.h"
#include "QtCore/qdatetime.h"
#include "QtNetwork/qsslconfiguration.h"
+#include "QtNetwork/qnetworksession.h"
#include "qnetworkaccesshttpbackend_p.h"
+#include "qnetworkaccessmanager_p.h"
#include <QtCore/QCoreApplication>
@@ -57,7 +59,7 @@ inline QNetworkReplyImplPrivate::QNetworkReplyImplPrivate()
copyDevice(0),
cacheEnabled(false), cacheSaveDevice(0),
notificationHandlingPaused(false),
- bytesDownloaded(0), lastBytesDownloaded(-1), bytesUploaded(-1),
+ bytesDownloaded(0), lastBytesDownloaded(-1), bytesUploaded(-1), preMigrationDownloaded(-1),
httpStatusCode(0),
state(Idle)
{
@@ -82,7 +84,24 @@ void QNetworkReplyImplPrivate::_q_startOperation()
return;
}
- backend->open();
+ if (!backend->start()) {
+ // backend failed to start because the session state is not Connected.
+ // QNetworkAccessManager will call reply->backend->start() again for us when the session
+ // state changes.
+ state = WaitingForSession;
+
+ QNetworkSession *session = manager->d_func()->networkSession;
+
+ if (session) {
+ if (!session->isOpen())
+ session->open();
+ } else {
+ qWarning("Backend is waiting for QNetworkSession to connect, but there is none!");
+ }
+
+ return;
+ }
+
if (state != Finished) {
if (operation == QNetworkAccessManager::GetOperation)
pendingNotifications.append(NotifyDownstreamReadyWrite);
@@ -134,6 +153,8 @@ void QNetworkReplyImplPrivate::_q_copyReadyRead()
lastBytesDownloaded = bytesDownloaded;
QVariant totalSize = cookedHeaders.value(QNetworkRequest::ContentLengthHeader);
+ if (preMigrationDownloaded != Q_INT64_C(-1))
+ totalSize = totalSize.toLongLong() + preMigrationDownloaded;
pauseNotificationHandling();
emit q->downloadProgress(bytesDownloaded,
totalSize.isNull() ? Q_INT64_C(-1) : totalSize.toLongLong());
@@ -206,6 +227,26 @@ void QNetworkReplyImplPrivate::_q_bufferOutgoingData()
}
}
+void QNetworkReplyImplPrivate::_q_networkSessionOnline()
+{
+ Q_Q(QNetworkReplyImpl);
+
+ switch (state) {
+ case QNetworkReplyImplPrivate::Buffering:
+ case QNetworkReplyImplPrivate::Working:
+ case QNetworkReplyImplPrivate::Reconnecting:
+ // Migrate existing downloads to new network connection.
+ migrateBackend();
+ break;
+ case QNetworkReplyImplPrivate::WaitingForSession:
+ // Start waiting requests.
+ QMetaObject::invokeMethod(q, "_q_startOperation", Qt::QueuedConnection);
+ break;
+ default:
+ ;
+ }
+}
+
void QNetworkReplyImplPrivate::setup(QNetworkAccessManager::Operation op, const QNetworkRequest &req,
QIODevice *data)
{
@@ -457,6 +498,8 @@ void QNetworkReplyImplPrivate::appendDownstreamData(QByteDataBuffer &data)
QPointer<QNetworkReplyImpl> qq = q;
QVariant totalSize = cookedHeaders.value(QNetworkRequest::ContentLengthHeader);
+ if (preMigrationDownloaded != Q_INT64_C(-1))
+ totalSize = totalSize.toLongLong() + preMigrationDownloaded;
pauseNotificationHandling();
emit q->downloadProgress(bytesDownloaded,
totalSize.isNull() ? Q_INT64_C(-1) : totalSize.toLongLong());
@@ -498,14 +541,42 @@ void QNetworkReplyImplPrivate::appendDownstreamData(QIODevice *data)
void QNetworkReplyImplPrivate::finished()
{
Q_Q(QNetworkReplyImpl);
- if (state == Finished || state == Aborted)
+
+ if (state == Finished || state == Aborted || state == WaitingForSession)
return;
+ pauseNotificationHandling();
+ QVariant totalSize = cookedHeaders.value(QNetworkRequest::ContentLengthHeader);
+ if (preMigrationDownloaded != Q_INT64_C(-1))
+ totalSize = totalSize.toLongLong() + preMigrationDownloaded;
+
+ if (!manager.isNull()) {
+ QNetworkSession *session = manager->d_func()->networkSession;
+ if (session && session->state() == QNetworkSession::Roaming &&
+ state == Working && errorCode != QNetworkReply::OperationCanceledError) {
+ // only content with a known size will fail with a temporary network failure error
+ if (!totalSize.isNull()) {
+ if (bytesDownloaded != totalSize) {
+ if (migrateBackend()) {
+ // either we are migrating or the request is finished/aborted
+ if (state == Reconnecting || state == WaitingForSession) {
+ resumeNotificationHandling();
+ return; // exit early if we are migrating.
+ }
+ } else {
+ error(QNetworkReply::TemporaryNetworkFailureError,
+ QNetworkReply::tr("Temporary network failure."));
+ }
+ }
+ }
+ }
+ }
+ resumeNotificationHandling();
+
state = Finished;
pendingNotifications.clear();
pauseNotificationHandling();
- QVariant totalSize = cookedHeaders.value(QNetworkRequest::ContentLengthHeader);
if (totalSize.isNull() || totalSize == -1) {
emit q->downloadProgress(bytesDownloaded, bytesDownloaded);
}
@@ -514,7 +585,9 @@ void QNetworkReplyImplPrivate::finished()
emit q->uploadProgress(0, 0);
resumeNotificationHandling();
- completeCacheSave();
+ // if we don't know the total size of or we received everything save the cache
+ if (totalSize.isNull() || totalSize == -1 || bytesDownloaded == totalSize)
+ completeCacheSave();
// note: might not be a good idea, since users could decide to delete us
// which would delete the backend too...
@@ -722,6 +795,83 @@ bool QNetworkReplyImpl::event(QEvent *e)
return QObject::event(e);
}
+/*
+ Migrates the backend of the QNetworkReply to a new network connection if required. Returns
+ true if the reply is migrated or it is not required; otherwise returns false.
+*/
+bool QNetworkReplyImplPrivate::migrateBackend()
+{
+ Q_Q(QNetworkReplyImpl);
+
+ // Network reply is already finished or aborted, don't need to migrate.
+ if (state == Finished || state == Aborted)
+ return true;
+
+ // Backend does not support resuming download.
+ if (!backend->canResume())
+ return false;
+
+ // Request has outgoing data, not migrating.
+ if (outgoingData)
+ return false;
+
+ // Request is serviced from the cache, don't need to migrate.
+ if (copyDevice)
+ return true;
+
+ state = QNetworkReplyImplPrivate::Reconnecting;
+
+ if (backend) {
+ delete backend;
+ backend = 0;
+ }
+
+ cookedHeaders.clear();
+ rawHeaders.clear();
+
+ preMigrationDownloaded = bytesDownloaded;
+
+ backend = manager->d_func()->findBackend(operation, request);
+
+ if (backend) {
+ backend->setParent(q);
+ backend->reply = this;
+ backend->setResumeOffset(bytesDownloaded);
+ }
+
+ if (qobject_cast<QNetworkAccessHttpBackend *>(backend)) {
+ _q_startOperation();
+ } else {
+ QMetaObject::invokeMethod(q, "_q_startOperation", Qt::QueuedConnection);
+ }
+
+ return true;
+}
+
+QDisabledNetworkReply::QDisabledNetworkReply(QObject *parent,
+ const QNetworkRequest &req,
+ QNetworkAccessManager::Operation op)
+: QNetworkReply(parent)
+{
+ setRequest(req);
+ setUrl(req.url());
+ setOperation(op);
+
+ qRegisterMetaType<QNetworkReply::NetworkError>("QNetworkReply::NetworkError");
+
+ QString msg = QCoreApplication::translate("QNetworkAccessManager",
+ "Network access is disabled.");
+ setError(UnknownNetworkError, msg);
+
+ QMetaObject::invokeMethod(this, "error", Qt::QueuedConnection,
+ Q_ARG(QNetworkReply::NetworkError, UnknownNetworkError));
+ QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection);
+}
+
+QDisabledNetworkReply::~QDisabledNetworkReply()
+{
+}
+
QT_END_NAMESPACE
#include "moc_qnetworkreplyimpl_p.cpp"
diff --git a/src/network/access/qnetworkreplyimpl_p.h b/src/network/access/qnetworkreplyimpl_p.h
index 168e5cf147..b4fbd1ebd7 100644
--- a/src/network/access/qnetworkreplyimpl_p.h
+++ b/src/network/access/qnetworkreplyimpl_p.h
@@ -98,6 +98,7 @@ public:
Q_PRIVATE_SLOT(d_func(), void _q_copyReadChannelFinished())
Q_PRIVATE_SLOT(d_func(), void _q_bufferOutgoingData())
Q_PRIVATE_SLOT(d_func(), void _q_bufferOutgoingDataFinished())
+ Q_PRIVATE_SLOT(d_func(), void _q_networkSessionOnline())
};
class QNetworkReplyImplPrivate: public QNetworkReplyPrivate
@@ -110,11 +111,13 @@ public:
};
enum State {
- Idle,
- Buffering,
- Working,
- Finished,
- Aborted
+ Idle, // The reply is idle.
+ Buffering, // The reply is buffering outgoing data.
+ Working, // The reply is uploading/downloading data.
+ Finished, // The reply has finished.
+ Aborted, // The reply has been aborted.
+ WaitingForSession, // The reply is waiting for the session to open before connecting.
+ Reconnecting // The reply will reconnect to once roaming has completed.
};
typedef QQueue<InternalNotifications> NotificationQueue;
@@ -128,6 +131,7 @@ public:
void _q_copyReadChannelFinished();
void _q_bufferOutgoingData();
void _q_bufferOutgoingDataFinished();
+ void _q_networkSessionOnline();
void setup(QNetworkAccessManager::Operation op, const QNetworkRequest &request,
QIODevice *outgoingData);
@@ -161,6 +165,8 @@ public:
QIODevice *copyDevice;
QAbstractNetworkCache *networkCache() const;
+ bool migrateBackend();
+
bool cacheEnabled;
QIODevice *cacheSaveDevice;
@@ -177,6 +183,7 @@ public:
qint64 bytesDownloaded;
qint64 lastBytesDownloaded;
qint64 bytesUploaded;
+ qint64 preMigrationDownloaded;
QString httpReasonPhrase;
int httpStatusCode;
@@ -186,6 +193,20 @@ public:
Q_DECLARE_PUBLIC(QNetworkReplyImpl)
};
+class QDisabledNetworkReply : public QNetworkReply
+{
+ Q_OBJECT
+
+public:
+ QDisabledNetworkReply(QObject *parent, const QNetworkRequest &req,
+ QNetworkAccessManager::Operation op);
+ ~QDisabledNetworkReply();
+
+ void abort() { }
+protected:
+ qint64 readData(char *, qint64) { return -1; }
+};
+
QT_END_NAMESPACE
#endif
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index c4ff24d5c3..61c116def2 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -184,6 +184,12 @@ QT_BEGIN_NAMESPACE
Indicates whether the HTTP pipelining was used for receiving
this reply.
+ \value CustomVerbAttribute
+ Requests only, type: QVariant::ByteArray
+ Holds the value for the custom HTTP verb to send (destined for usage
+ of other verbs than GET, POST, PUT and DELETE). This verb is set
+ when calling QNetworkAccessManager::sendCustomRequest().
+
\value User
Special type. Additional information can be passed in
QVariants with types ranging from User to UserMax. The default
@@ -220,8 +226,9 @@ class QNetworkRequestPrivate: public QSharedData, public QNetworkHeadersPrivate
{
public:
inline QNetworkRequestPrivate()
+ : priority(QNetworkRequest::NormalPriority)
#ifndef QT_NO_OPENSSL
- : sslConfiguration(0)
+ , sslConfiguration(0)
#endif
{ qRegisterMetaType<QNetworkRequest>(); }
~QNetworkRequestPrivate()
@@ -236,6 +243,7 @@ public:
: QSharedData(other), QNetworkHeadersPrivate(other)
{
url = other.url;
+ priority = other.priority;
#ifndef QT_NO_OPENSSL
sslConfiguration = 0;
@@ -247,12 +255,14 @@ public:
inline bool operator==(const QNetworkRequestPrivate &other) const
{
return url == other.url &&
+ priority == other.priority &&
rawHeaders == other.rawHeaders &&
attributes == other.attributes;
// don't compare cookedHeaders
}
QUrl url;
+ QNetworkRequest::Priority priority;
#ifndef QT_NO_OPENSSL
mutable QSslConfiguration *sslConfiguration;
#endif
@@ -518,6 +528,45 @@ QObject *QNetworkRequest::originatingObject() const
return d->originatingObject.data();
}
+/*!
+ \since 4.7
+
+ Return the priority of this request.
+
+ \sa setPriority()
+*/
+QNetworkRequest::Priority QNetworkRequest::priority() const
+{
+ return d->priority;
+}
+
+/*! \enum QNetworkRequest::Priority
+
+ \since 4.7
+
+ This enum lists the possible network request priorities.
+
+ \value HighPriority High priority
+ \value NormalPriority Normal priority
+ \value LowPriority Low priority
+ */
+
+/*!
+ \since 4.7
+
+ Set the priority of this request to \a priority.
+
+ \note The \a priority is only a hint to the network access
+ manager. It can use it or not. Currently it is used for HTTP to
+ decide which request should be sent first to a server.
+
+ \sa priority()
+*/
+void QNetworkRequest::setPriority(Priority priority)
+{
+ d->priority = priority;
+}
+
static QByteArray headerName(QNetworkRequest::KnownHeaders header)
{
switch (header) {
diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h
index fe01f8c9a1..a0ef1a61ae 100644
--- a/src/network/access/qnetworkrequest.h
+++ b/src/network/access/qnetworkrequest.h
@@ -78,6 +78,7 @@ public:
DoNotBufferUploadDataAttribute,
HttpPipeliningAllowedAttribute,
HttpPipeliningWasUsedAttribute,
+ CustomVerbAttribute,
User = 1000,
UserMax = 32767
@@ -89,6 +90,12 @@ public:
AlwaysCache
};
+ enum Priority {
+ HighPriority = 1,
+ NormalPriority = 3,
+ LowPriority = 5
+ };
+
explicit QNetworkRequest(const QUrl &url = QUrl());
QNetworkRequest(const QNetworkRequest &other);
~QNetworkRequest();
@@ -123,6 +130,9 @@ public:
void setOriginatingObject(QObject *object);
QObject *originatingObject() const;
+ Priority priority() const;
+ void setPriority(Priority priority);
+
private:
QSharedDataPointer<QNetworkRequestPrivate> d;
friend class QNetworkRequestPrivate;
diff --git a/src/network/bearer/bearer.pri b/src/network/bearer/bearer.pri
new file mode 100644
index 0000000000..44e97fdef0
--- /dev/null
+++ b/src/network/bearer/bearer.pri
@@ -0,0 +1,18 @@
+# Qt network bearer management module
+
+HEADERS += bearer/qnetworkconfiguration.h \
+ bearer/qnetworksession.h \
+ bearer/qnetworkconfigmanager.h \
+ bearer/qnetworkconfigmanager_p.h \
+ bearer/qnetworkconfiguration_p.h \
+ bearer/qnetworksession_p.h \
+ bearer/qbearerengine_p.h \
+ bearer/qbearerplugin_p.h
+
+SOURCES += bearer/qnetworksession.cpp \
+ bearer/qnetworkconfigmanager.cpp \
+ bearer/qnetworkconfiguration.cpp \
+ bearer/qnetworkconfigmanager_p.cpp \
+ bearer/qbearerengine.cpp \
+ bearer/qbearerplugin.cpp
+
diff --git a/src/network/bearer/qbearerengine.cpp b/src/network/bearer/qbearerengine.cpp
new file mode 100644
index 0000000000..c42e2d2e48
--- /dev/null
+++ b/src/network/bearer/qbearerengine.cpp
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** 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 QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qbearerengine_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QBearerEngine::QBearerEngine(QObject *parent)
+: QObject(parent), mutex(QMutex::Recursive)
+{
+}
+
+QBearerEngine::~QBearerEngine()
+{
+ QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator it;
+ QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator end;
+ for (it = snapConfigurations.begin(), end = snapConfigurations.end(); it != end; ++it) {
+ it.value()->isValid = false;
+ it.value()->id.clear();
+ }
+
+ for (it = accessPointConfigurations.begin(), end = accessPointConfigurations.end();
+ it != end; ++it) {
+ it.value()->isValid = false;
+ it.value()->id.clear();
+ }
+
+ for (it = userChoiceConfigurations.begin(), end = userChoiceConfigurations.end();
+ it != end; ++it) {
+ it.value()->isValid = false;
+ it.value()->id.clear();
+ }
+}
+
+bool QBearerEngine::requiresPolling() const
+{
+ return false;
+}
+
+/*
+ Returns true if configurations are in use; otherwise returns false.
+
+ If configurations are in use and requiresPolling() returns true, polling will be enabled for
+ this engine.
+*/
+bool QBearerEngine::configurationsInUse() const
+{
+ QHash<QString, QNetworkConfigurationPrivatePointer>::ConstIterator it;
+ QHash<QString, QNetworkConfigurationPrivatePointer>::ConstIterator end;
+
+ QMutexLocker locker(&mutex);
+
+ for (it = accessPointConfigurations.begin(),
+ end = accessPointConfigurations.end(); it != end; ++it) {
+ if (it.value()->ref > 1)
+ return true;
+ }
+
+ for (it = snapConfigurations.begin(), end = snapConfigurations.end(); it != end; ++it) {
+ if (it.value()->ref > 1)
+ return true;
+ }
+
+ for (it = userChoiceConfigurations.begin(),
+ end = userChoiceConfigurations.end(); it != end; ++it) {
+ if (it.value()->ref > 1)
+ return true;
+ }
+
+ return false;
+}
+
+#include "moc_qbearerengine_p.cpp"
+
+QT_END_NAMESPACE
diff --git a/src/network/bearer/qbearerengine_p.h b/src/network/bearer/qbearerengine_p.h
new file mode 100644
index 0000000000..028c174eae
--- /dev/null
+++ b/src/network/bearer/qbearerengine_p.h
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** 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 QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QBEARERENGINE_P_H
+#define QBEARERENGINE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qnetworkconfiguration_p.h"
+#include "qnetworksession.h"
+#include "qnetworkconfigmanager.h"
+
+#include <QtCore/qobject.h>
+#include <QtCore/qglobal.h>
+#include <QtCore/qlist.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qhash.h>
+#include <QtCore/qsharedpointer.h>
+#include <QtCore/qmutex.h>
+
+QT_BEGIN_NAMESPACE
+
+class QNetworkConfiguration;
+
+class Q_NETWORK_EXPORT QBearerEngine : public QObject
+{
+ Q_OBJECT
+
+ friend class QNetworkConfigurationManager;
+
+public:
+ QBearerEngine(QObject *parent = 0);
+ virtual ~QBearerEngine();
+
+ virtual bool hasIdentifier(const QString &id) = 0;
+
+ virtual void requestUpdate() = 0;
+
+ virtual QNetworkConfigurationManager::Capabilities capabilities() const = 0;
+
+ virtual QNetworkSessionPrivate *createSessionBackend() = 0;
+
+ virtual QNetworkConfigurationPrivatePointer defaultConfiguration() = 0;
+
+ virtual bool requiresPolling() const;
+ bool configurationsInUse() const;
+
+Q_SIGNALS:
+ void configurationAdded(QNetworkConfigurationPrivatePointer config);
+ void configurationRemoved(QNetworkConfigurationPrivatePointer config);
+ void configurationChanged(QNetworkConfigurationPrivatePointer config);
+
+ void updateCompleted();
+
+protected:
+ //this table contains an up to date list of all configs at any time.
+ //it must be updated if configurations change, are added/removed or
+ //the members of ServiceNetworks change
+ QHash<QString, QNetworkConfigurationPrivatePointer> accessPointConfigurations;
+ QHash<QString, QNetworkConfigurationPrivatePointer> snapConfigurations;
+ QHash<QString, QNetworkConfigurationPrivatePointer> userChoiceConfigurations;
+
+ mutable QMutex mutex;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/network/bearer/qbearerplugin.cpp b/src/network/bearer/qbearerplugin.cpp
new file mode 100644
index 0000000000..4509fd02bf
--- /dev/null
+++ b/src/network/bearer/qbearerplugin.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** 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 QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qbearerplugin_p.h"
+
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+QBearerEnginePlugin::QBearerEnginePlugin(QObject *parent)
+: QObject(parent)
+{
+}
+
+QBearerEnginePlugin::~QBearerEnginePlugin()
+{
+}
+
+QT_END_NAMESPACE
diff --git a/src/network/bearer/qbearerplugin_p.h b/src/network/bearer/qbearerplugin_p.h
new file mode 100644
index 0000000000..36709c2743
--- /dev/null
+++ b/src/network/bearer/qbearerplugin_p.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** 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 QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QBEARERPLUGIN_P_H
+#define QBEARERPLUGIN_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qbearerengine_p.h"
+
+#include <QtCore/qplugin.h>
+#include <QtCore/qfactoryinterface.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Network)
+
+struct Q_NETWORK_EXPORT QBearerEngineFactoryInterface : public QFactoryInterface
+{
+ virtual QBearerEngine *create(const QString &key = QString()) const = 0;
+};
+
+#define QBearerEngineFactoryInterface_iid "com.trolltech.Qt.QBearerEngineFactoryInterface"
+Q_DECLARE_INTERFACE(QBearerEngineFactoryInterface, QBearerEngineFactoryInterface_iid)
+
+class Q_NETWORK_EXPORT QBearerEnginePlugin : public QObject, public QBearerEngineFactoryInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QBearerEngineFactoryInterface:QFactoryInterface)
+
+public:
+ explicit QBearerEnginePlugin(QObject *parent = 0);
+ virtual ~QBearerEnginePlugin();
+
+ virtual QStringList keys() const = 0;
+ virtual QBearerEngine *create(const QString &key = QString()) const = 0;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
+
diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp
new file mode 100644
index 0000000000..b631cf15d4
--- /dev/null
+++ b/src/network/bearer/qnetworkconfigmanager.cpp
@@ -0,0 +1,463 @@
+/****************************************************************************
+**
+** 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 QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qnetworkconfigmanager.h"
+
+#include "qnetworkconfigmanager_p.h"
+#include "qbearerengine_p.h"
+
+#include <QtCore/qstringlist.h>
+
+QT_BEGIN_NAMESPACE
+
+Q_GLOBAL_STATIC(QNetworkConfigurationManagerPrivate, connManager);
+
+QNetworkConfigurationManagerPrivate *qNetworkConfigurationManagerPrivate()
+{
+ return connManager();
+}
+
+/*!
+ \class QNetworkConfigurationManager
+
+ \brief The QNetworkConfigurationManager class manages the network configurations provided
+ by the system.
+
+ \since 4.7
+
+ \inmodule QtNetwork
+ \ingroup bearer
+
+ QNetworkConfigurationManager provides access to the network configurations known to the system and
+ enables applications to detect the system capabilities (with regards to network sessions) at runtime.
+
+ A QNetworkConfiguration abstracts a set of configuration options describing how a
+ network interface has to be configured to connect to a particular target network.
+ QNetworkConfigurationManager maintains and updates the global list of
+ QNetworkConfigurations. Applications can access and filter this list via
+ allConfigurations(). If a new configuration is added or an existing one is removed or changed
+ the configurationAdded(), configurationRemoved() and configurationChanged() signals are emitted
+ respectively.
+
+ The defaultConfiguration() can be used when intending to immediately create a new
+ network session without caring about the particular configuration. It returns
+ a \l QNetworkConfiguration::Discovered configuration. If there are not any
+ discovered ones an invalid configuration is returned.
+
+ Some configuration updates may require some time to perform updates. A WLAN scan is
+ such an example. Unless the platform performs internal updates it may be required to
+ manually trigger configuration updates via QNetworkConfigurationManager::updateConfigurations().
+ The completion of the update process is indicted by emitting the updateCompleted()
+ signal. The update process ensures that every existing QNetworkConfiguration instance
+ is updated. There is no need to ask for a renewed configuration list via allConfigurations().
+
+ \sa QNetworkConfiguration
+*/
+
+/*!
+ \fn void QNetworkConfigurationManager::configurationAdded(const QNetworkConfiguration& config)
+
+ This signal is emitted whenever a new network configuration is added to the system. The new
+ configuration is specified by \a config.
+*/
+
+/*!
+ \fn void QNetworkConfigurationManager::configurationRemoved(const QNetworkConfiguration& configuration)
+
+ This signal is emitted when a configuration is about to be removed from the system. The removed
+ \a configuration is invalid but retains name and identifier.
+*/
+
+/*!
+ \fn void QNetworkConfigurationManager::updateCompleted()
+
+ This signal is emitted when the configuration update has been completed. Such an update can
+ be initiated via \l updateConfigurations().
+*/
+
+/*! \fn void QNetworkConfigurationManager::configurationChanged(const QNetworkConfiguration& config)
+
+ This signal is emitted when the \l {QNetworkConfiguration::state()}{state} of \a config changes.
+*/
+
+/*!
+ \fn void QNetworkConfigurationManager::onlineStateChanged(bool isOnline)
+
+ This signal is emitted when the device changes from online to offline mode or vice versa.
+ \a isOnline represents the new state of the device.
+
+ The state is considered to be online for as long as
+ \l{allConfigurations()}{allConfigurations}(QNetworkConfiguration::Active) returns a list with
+ at least one entry.
+*/
+
+/*!
+ \enum QNetworkConfigurationManager::Capability
+
+ Specifies the system capabilities of the bearer API. The possible values are:
+
+ \value CanStartAndStopInterfaces Network sessions and their underlying access points can be
+ started and stopped. If this flag is not set QNetworkSession
+ can only monitor but not influence the state of access points.
+ On some platforms this feature may require elevated user
+ permissions. This option is platform specific and may not
+ always be available.
+ \value DirectConnectionRouting Network sessions and their sockets can be bound to a
+ particular network interface. Any packet that passes through
+ the socket goes to the specified network interface and thus
+ disregards standard routing table entries. This may be useful
+ when two interfaces can reach overlapping IP ranges or an
+ application has specific needs in regards to target networks.
+ This option is platform specific and may not always be
+ available.
+ \value SystemSessionSupport If this flag is set the underlying platform ensures that a
+ network interface is not shut down until the last network
+ session has been \l{QNetworkSession::close()}{closed()}. This
+ works across multiple processes. If the platform session
+ support is missing this API can only ensure the above behavior
+ for network sessions within the same process.
+ In general mobile platforms (such as Symbian/S60) have such
+ support whereas most desktop platform lack this capability.
+ \value ApplicationLevelRoaming The system gives applications control over the systems roaming
+ behavior. Applications can initiate roaming (in case the
+ current link is not suitable) and are consulted if the system
+ has identified a more suitable access point.
+ \value ForcedRoaming The system disconnects an existing access point and reconnects
+ via a more suitable one. The application does not have any
+ control over this process and has to reconnect its active
+ sockets.
+ \value DataStatistics If this flag is set QNetworkSession can provide statistics
+ about transmitted and received data.
+*/
+
+/*!
+ Constructs a QNetworkConfigurationManager with the given \a parent.
+*/
+QNetworkConfigurationManager::QNetworkConfigurationManager( QObject* parent )
+ : QObject(parent)
+{
+ QNetworkConfigurationManagerPrivate *priv = connManager();
+
+ connect(priv, SIGNAL(configurationAdded(QNetworkConfiguration)),
+ this, SIGNAL(configurationAdded(QNetworkConfiguration)));
+ connect(priv, SIGNAL(configurationRemoved(QNetworkConfiguration)),
+ this, SIGNAL(configurationRemoved(QNetworkConfiguration)));
+ connect(priv, SIGNAL(configurationUpdateComplete()),
+ this, SIGNAL(updateCompleted()));
+ connect(priv, SIGNAL(onlineStateChanged(bool)),
+ this, SIGNAL(onlineStateChanged(bool)));
+ connect(priv, SIGNAL(configurationChanged(QNetworkConfiguration)),
+ this, SIGNAL(configurationChanged(QNetworkConfiguration)));
+
+ priv->enablePolling();
+}
+
+/*!
+ Frees the resources associated with the QNetworkConfigurationManager object.
+*/
+QNetworkConfigurationManager::~QNetworkConfigurationManager()
+{
+ QNetworkConfigurationManagerPrivate *priv = connManager();
+
+ priv->disablePolling();
+}
+
+
+/*!
+ Returns the default configuration to be used. This function always returns a discovered
+ configuration; otherwise an invalid configuration.
+
+ In some cases it may be required to call updateConfigurations() and wait for the
+ updateCompleted() signal before calling this function.
+
+ \sa allConfigurations()
+*/
+QNetworkConfiguration QNetworkConfigurationManager::defaultConfiguration() const
+{
+ QNetworkConfigurationManagerPrivate *conPriv = connManager();
+
+ foreach (QBearerEngine *engine, conPriv->engines()) {
+ QNetworkConfigurationPrivatePointer ptr = engine->defaultConfiguration();
+
+ if (ptr) {
+ QNetworkConfiguration config;
+ config.d = ptr;
+ return config;
+ }
+ }
+
+ // Engines don't have a default configuration.
+
+ // Return first active snap
+ QNetworkConfigurationPrivatePointer defaultConfiguration;
+
+ foreach (QBearerEngine *engine, conPriv->engines()) {
+ QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator it;
+ QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator end;
+
+ QMutexLocker locker(&engine->mutex);
+
+ for (it = engine->snapConfigurations.begin(), end = engine->snapConfigurations.end();
+ it != end; ++it) {
+ if ((it.value()->state & QNetworkConfiguration::Active) ==
+ QNetworkConfiguration::Active) {
+ QNetworkConfiguration config;
+ config.d = it.value();
+ return config;
+ } else if (!defaultConfiguration) {
+ if ((it.value()->state & QNetworkConfiguration::Discovered) ==
+ QNetworkConfiguration::Discovered) {
+ defaultConfiguration = it.value();
+ }
+ }
+ }
+ }
+
+ // No Active SNAPs return first Discovered SNAP.
+ if (defaultConfiguration) {
+ QNetworkConfiguration config;
+ config.d = defaultConfiguration;
+ return config;
+ }
+
+ /*
+ No Active or Discovered SNAPs, find the perferred access point.
+ The following priority order is used:
+
+ 1. Active Ethernet
+ 2. Active WLAN
+ 3. Active Other
+ 4. Discovered Ethernet
+ 5. Discovered WLAN
+ 6. Discovered Other
+ */
+
+ defaultConfiguration.reset();
+
+ foreach (QBearerEngine *engine, conPriv->engines()) {
+ QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator it;
+ QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator end;
+
+ QMutexLocker locker(&engine->mutex);
+
+ for (it = engine->accessPointConfigurations.begin(),
+ end = engine->accessPointConfigurations.end(); it != end; ++it) {
+
+ if ((it.value()->state & QNetworkConfiguration::Discovered) ==
+ QNetworkConfiguration::Discovered) {
+ if (!defaultConfiguration) {
+ defaultConfiguration = it.value();
+ } else {
+ if (defaultConfiguration->state == it.value()->state) {
+ if (defaultConfiguration->bearerName() == QLatin1String("Ethernet")) {
+ // do nothing
+ } else if (defaultConfiguration->bearerName() == QLatin1String("WLAN")) {
+ // ethernet beats wlan
+ if (it.value()->bearerName() == QLatin1String("Ethernet"))
+ defaultConfiguration = it.value();
+ } else {
+ // ethernet and wlan beats other
+ if (it.value()->bearerName() == QLatin1String("Ethernet") ||
+ it.value()->bearerName() == QLatin1String("WLAN")) {
+ defaultConfiguration = it.value();
+ }
+ }
+ } else {
+ // active beats discovered
+ if ((defaultConfiguration->state & QNetworkConfiguration::Active) !=
+ QNetworkConfiguration::Active) {
+ defaultConfiguration = it.value();
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // No Active InternetAccessPoint return first Discovered InternetAccessPoint.
+ if (defaultConfiguration) {
+ QNetworkConfiguration config;
+ config.d = defaultConfiguration;
+ return config;
+ }
+
+ return QNetworkConfiguration();
+}
+
+/*!
+ Returns the list of configurations which comply with the given \a filter.
+
+ By default this function returns all (defined and undefined) configurations.
+
+ A wireless network with a particular SSID may only be accessible in a
+ certain area despite the fact that the system has a valid configuration
+ for it. Therefore the filter flag may be used to limit the list to
+ discovered and possibly connected configurations only.
+
+ If \a filter is set to zero this function returns all possible configurations.
+
+ Note that this function returns the states for all configurations as they are known at
+ the time of this function call. If for instance a configuration of type WLAN is defined
+ the system may have to perform a WLAN scan in order to determine whether it is
+ actually available. To obtain the most accurate state updateConfigurations() should
+ be used to update each configuration's state. Note that such an update may require
+ some time. It's completion is signalled by updateCompleted(). In the absence of a
+ configuration update this function returns the best estimate at the time of the call.
+ Therefore, if WLAN configurations are of interest, it is recommended that
+ updateConfigurations() is called once after QNetworkConfigurationManager
+ instantiation (WLAN scans are too time consuming to perform in constructor).
+ After this the data is kept automatically up-to-date as the system reports
+ any changes.
+*/
+QList<QNetworkConfiguration> QNetworkConfigurationManager::allConfigurations(QNetworkConfiguration::StateFlags filter) const
+{
+ QList<QNetworkConfiguration> result;
+ QNetworkConfigurationManagerPrivate* conPriv = connManager();
+
+ foreach (QBearerEngine *engine, conPriv->engines()) {
+ QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator it;
+ QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator end;
+
+ QMutexLocker locker(&engine->mutex);
+
+ //find all InternetAccessPoints
+ for (it = engine->accessPointConfigurations.begin(),
+ end = engine->accessPointConfigurations.end(); it != end; ++it) {
+ if ((it.value()->state & filter) == filter) {
+ QNetworkConfiguration pt;
+ pt.d = it.value();
+ result << pt;
+ }
+ }
+
+ //find all service networks
+ for (it = engine->snapConfigurations.begin(),
+ end = engine->snapConfigurations.end(); it != end; ++it) {
+ if ((it.value()->state & filter) == filter) {
+ QNetworkConfiguration pt;
+ pt.d = it.value();
+ result << pt;
+ }
+ }
+ }
+
+ return result;
+}
+
+/*!
+ Returns the QNetworkConfiguration for \a identifier; otherwise returns an
+ invalid QNetworkConfiguration.
+
+ \sa QNetworkConfiguration::identifier()
+*/
+QNetworkConfiguration QNetworkConfigurationManager::configurationFromIdentifier(const QString& identifier) const
+{
+ QNetworkConfigurationManagerPrivate* conPriv = connManager();
+
+ QNetworkConfiguration item;
+
+ foreach (QBearerEngine *engine, conPriv->engines()) {
+ QMutexLocker locker(&engine->mutex);
+
+ if (engine->accessPointConfigurations.contains(identifier))
+ item.d = engine->accessPointConfigurations.value(identifier);
+ else if (engine->snapConfigurations.contains(identifier))
+ item.d = engine->snapConfigurations.value(identifier);
+ else if (engine->userChoiceConfigurations.contains(identifier))
+ item.d = engine->userChoiceConfigurations.value(identifier);
+ else
+ continue;
+
+ return item;
+ }
+
+ return item;
+}
+
+/*!
+ Returns true if the system is considered to be connected to another device via an active
+ network interface; otherwise returns false.
+
+ This is equivalent to the following code snippet:
+
+ \snippet doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp 0
+
+ \sa onlineStateChanged()
+*/
+bool QNetworkConfigurationManager::isOnline() const
+{
+ QNetworkConfigurationManagerPrivate* conPriv = connManager();
+ Q_UNUSED(conPriv);
+ QList<QNetworkConfiguration> activeConfigs = allConfigurations(QNetworkConfiguration::Active);
+ return activeConfigs.count() > 0;
+}
+
+/*!
+ Returns the capabilities supported by the current platform.
+*/
+QNetworkConfigurationManager::Capabilities QNetworkConfigurationManager::capabilities() const
+{
+ return connManager()->capFlags;
+}
+
+/*!
+ Initiates an update of all configurations. This may be used to initiate WLAN scans or other
+ time consuming updates which may be required to obtain the correct state for configurations.
+
+ This call is asynchronous. On completion of this update the updateCompleted() signal is
+ emitted. If new configurations are discovered or old ones were removed or changed the update
+ process may trigger the emission of one or multiple configurationAdded(),
+ configurationRemoved() and configurationChanged() signals.
+
+ If a configuration state changes as a result of this update all existing QNetworkConfiguration
+ instances are updated automatically.
+
+ \sa allConfigurations()
+*/
+void QNetworkConfigurationManager::updateConfigurations()
+{
+ connManager()->performAsyncConfigurationUpdate();
+}
+
+#include "moc_qnetworkconfigmanager.cpp"
+
+QT_END_NAMESPACE
+
diff --git a/src/network/bearer/qnetworkconfigmanager.h b/src/network/bearer/qnetworkconfigmanager.h
new file mode 100644
index 0000000000..73041fe98f
--- /dev/null
+++ b/src/network/bearer/qnetworkconfigmanager.h
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** 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 QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QNETWORKCONFIGURATIONMANAGER_H
+#define QNETWORKCONFIGURATIONMANAGER_H
+
+#include <QtCore/qobject.h>
+#include <QtNetwork/qnetworkconfiguration.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Network)
+
+class QNetworkConfigurationManagerPrivate;
+class Q_NETWORK_EXPORT QNetworkConfigurationManager : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ enum Capability {
+ CanStartAndStopInterfaces = 0x00000001,
+ DirectConnectionRouting = 0x00000002,
+ SystemSessionSupport = 0x00000004,
+ ApplicationLevelRoaming = 0x00000008,
+ ForcedRoaming = 0x00000010,
+ DataStatistics = 0x00000020
+ };
+
+ Q_DECLARE_FLAGS(Capabilities, Capability)
+
+ QNetworkConfigurationManager( QObject* parent = 0 );
+ virtual ~QNetworkConfigurationManager();
+
+
+ QNetworkConfigurationManager::Capabilities capabilities() const;
+
+ QNetworkConfiguration defaultConfiguration() const;
+ QList<QNetworkConfiguration> allConfigurations(QNetworkConfiguration::StateFlags flags = 0) const;
+ QNetworkConfiguration configurationFromIdentifier(const QString& identifier) const;
+ void updateConfigurations();
+
+ bool isOnline() const;
+
+Q_SIGNALS:
+ void configurationAdded(const QNetworkConfiguration& config);
+ void configurationRemoved(const QNetworkConfiguration& config);
+ void configurationChanged(const QNetworkConfiguration& config);
+ void onlineStateChanged(bool isOnline);
+ void updateCompleted();
+
+};
+
+Q_DECLARE_OPERATORS_FOR_FLAGS(QNetworkConfigurationManager::Capabilities)
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif //QNETWORKCONFIGURATIONMANAGER_H
+
diff --git a/src/network/bearer/qnetworkconfigmanager_p.cpp b/src/network/bearer/qnetworkconfigmanager_p.cpp
new file mode 100644
index 0000000000..9740424bc6
--- /dev/null
+++ b/src/network/bearer/qnetworkconfigmanager_p.cpp
@@ -0,0 +1,291 @@
+/****************************************************************************
+**
+** 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 QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qnetworkconfigmanager_p.h"
+#include "qbearerplugin_p.h"
+
+#include <QtCore/private/qfactoryloader_p.h>
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qtimer.h>
+#include <QtCore/qstringlist.h>
+#include <QtCore/private/qcoreapplication_p.h>
+
+QT_BEGIN_NAMESPACE
+
+Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
+ (QBearerEngineFactoryInterface_iid, QLatin1String("/bearer")))
+
+QNetworkConfigurationManagerPrivate::QNetworkConfigurationManagerPrivate()
+: capFlags(0), mutex(QMutex::Recursive), pollTimer(0), forcedPolling(0), firstUpdate(true)
+{
+ updateConfigurations();
+
+ moveToThread(QCoreApplicationPrivate::mainThread());
+ foreach (QBearerEngine *engine, sessionEngines)
+ engine->moveToThread(QCoreApplicationPrivate::mainThread());
+}
+
+QNetworkConfigurationManagerPrivate::~QNetworkConfigurationManagerPrivate()
+{
+ QMutexLocker locker(&mutex);
+
+ qDeleteAll(sessionEngines);
+}
+
+void QNetworkConfigurationManagerPrivate::configurationAdded(QNetworkConfigurationPrivatePointer ptr)
+{
+ QMutexLocker locker(&mutex);
+
+ if (!firstUpdate) {
+ QNetworkConfiguration item;
+ item.d = ptr;
+ emit configurationAdded(item);
+ }
+
+ if (ptr->state == QNetworkConfiguration::Active) {
+ onlineConfigurations.insert(ptr->id);
+ if (!firstUpdate && onlineConfigurations.count() == 1)
+ emit onlineStateChanged(true);
+ }
+}
+
+void QNetworkConfigurationManagerPrivate::configurationRemoved(QNetworkConfigurationPrivatePointer ptr)
+{
+ QMutexLocker locker(&mutex);
+
+ ptr->isValid = false;
+
+ if (!firstUpdate) {
+ QNetworkConfiguration item;
+ item.d = ptr;
+ emit configurationRemoved(item);
+ }
+
+ onlineConfigurations.remove(ptr->id);
+ if (!firstUpdate && onlineConfigurations.isEmpty())
+ emit onlineStateChanged(false);
+}
+
+void QNetworkConfigurationManagerPrivate::configurationChanged(QNetworkConfigurationPrivatePointer ptr)
+{
+ QMutexLocker locker(&mutex);
+
+ if (!firstUpdate) {
+ QNetworkConfiguration item;
+ item.d = ptr;
+ emit configurationChanged(item);
+ }
+
+ bool previous = !onlineConfigurations.isEmpty();
+
+ if (ptr->state == QNetworkConfiguration::Active)
+ onlineConfigurations.insert(ptr->id);
+ else
+ onlineConfigurations.remove(ptr->id);
+
+ bool online = !onlineConfigurations.isEmpty();
+
+ if (!firstUpdate && online != previous)
+ emit onlineStateChanged(online);
+}
+
+void QNetworkConfigurationManagerPrivate::updateConfigurations()
+{
+ QMutexLocker locker(&mutex);
+
+ if (firstUpdate) {
+ if (sender())
+ return;
+
+ updating = false;
+
+ QFactoryLoader *l = loader();
+
+ QBearerEngine *generic = 0;
+
+ foreach (const QString &key, l->keys()) {
+ QBearerEnginePlugin *plugin = qobject_cast<QBearerEnginePlugin *>(l->instance(key));
+ if (plugin) {
+ QBearerEngine *engine = plugin->create(key);
+ if (!engine)
+ continue;
+
+ if (key == QLatin1String("generic"))
+ generic = engine;
+ else
+ sessionEngines.append(engine);
+
+ connect(engine, SIGNAL(updateCompleted()),
+ this, SLOT(updateConfigurations()));
+ connect(engine, SIGNAL(configurationAdded(QNetworkConfigurationPrivatePointer)),
+ this, SLOT(configurationAdded(QNetworkConfigurationPrivatePointer)));
+ connect(engine, SIGNAL(configurationRemoved(QNetworkConfigurationPrivatePointer)),
+ this, SLOT(configurationRemoved(QNetworkConfigurationPrivatePointer)));
+ connect(engine, SIGNAL(configurationChanged(QNetworkConfigurationPrivatePointer)),
+ this, SLOT(configurationChanged(QNetworkConfigurationPrivatePointer)));
+
+ capFlags |= engine->capabilities();
+
+ engine->requestUpdate();
+ }
+ }
+
+ if (generic)
+ sessionEngines.append(generic);
+ }
+
+ QBearerEngine *engine = qobject_cast<QBearerEngine *>(sender());
+ if (!updatingEngines.isEmpty() && engine) {
+ int index = sessionEngines.indexOf(engine);
+ if (index >= 0)
+ updatingEngines.remove(index);
+ }
+
+ if (updating && updatingEngines.isEmpty()) {
+ updating = false;
+ emit configurationUpdateComplete();
+ }
+
+ if (engine && !pollingEngines.isEmpty()) {
+ int index = sessionEngines.indexOf(engine);
+ if (index >= 0)
+ pollingEngines.remove(index);
+
+ if (pollingEngines.isEmpty())
+ startPolling();
+ }
+
+ if (firstUpdate)
+ firstUpdate = false;
+}
+
+void QNetworkConfigurationManagerPrivate::performAsyncConfigurationUpdate()
+{
+ QMutexLocker locker(&mutex);
+
+ if (sessionEngines.isEmpty()) {
+ emit configurationUpdateComplete();
+ return;
+ }
+
+ updating = true;
+
+ for (int i = 0; i < sessionEngines.count(); ++i) {
+ updatingEngines.insert(i);
+ sessionEngines.at(i)->requestUpdate();
+ }
+}
+
+QList<QBearerEngine *> QNetworkConfigurationManagerPrivate::engines()
+{
+ QMutexLocker locker(&mutex);
+
+ return sessionEngines;
+}
+
+void QNetworkConfigurationManagerPrivate::startPolling()
+{
+ QMutexLocker locker(&mutex);
+
+ bool pollingRequired = false;
+
+ if (forcedPolling > 0) {
+ foreach (QBearerEngine *engine, sessionEngines) {
+ if (engine->requiresPolling()) {
+ pollingRequired = true;
+ break;
+ }
+ }
+ }
+
+ if (!pollingRequired) {
+ foreach (QBearerEngine *engine, sessionEngines) {
+ if (engine->configurationsInUse()) {
+ pollingRequired = true;
+ break;
+ }
+ }
+ }
+
+ if (pollingRequired) {
+ if (!pollTimer) {
+ pollTimer = new QTimer(this);
+ pollTimer->setInterval(10000);
+ pollTimer->setSingleShot(true);
+ connect(pollTimer, SIGNAL(timeout()), this, SLOT(pollEngines()));
+ }
+
+ pollTimer->start();
+ }
+}
+
+void QNetworkConfigurationManagerPrivate::pollEngines()
+{
+ QMutexLocker locker(&mutex);
+
+ for (int i = 0; i < sessionEngines.count(); ++i) {
+ if ((forcedPolling && sessionEngines.at(i)->requiresPolling()) ||
+ sessionEngines.at(i)->configurationsInUse()) {
+ pollingEngines.insert(i);
+ sessionEngines.at(i)->requestUpdate();
+ }
+ }
+}
+
+void QNetworkConfigurationManagerPrivate::enablePolling()
+{
+ QMutexLocker locker(&mutex);
+
+ ++forcedPolling;
+
+ if (forcedPolling == 1)
+ startPolling();
+}
+
+void QNetworkConfigurationManagerPrivate::disablePolling()
+{
+ QMutexLocker locker(&mutex);
+
+ --forcedPolling;
+}
+
+QT_END_NAMESPACE
diff --git a/src/network/bearer/qnetworkconfigmanager_p.h b/src/network/bearer/qnetworkconfigmanager_p.h
new file mode 100644
index 0000000000..ac8518c2e3
--- /dev/null
+++ b/src/network/bearer/qnetworkconfigmanager_p.h
@@ -0,0 +1,127 @@
+/****************************************************************************
+**
+** 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 QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QNETWORKCONFIGURATIONMANAGERPRIVATE_H
+#define QNETWORKCONFIGURATIONMANAGERPRIVATE_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qnetworkconfigmanager.h"
+#include "qnetworkconfiguration_p.h"
+
+#include <QtCore/qmutex.h>
+
+QT_BEGIN_NAMESPACE
+
+class QBearerEngine;
+class QTimer;
+
+class Q_NETWORK_EXPORT QNetworkConfigurationManagerPrivate : public QObject
+{
+ Q_OBJECT
+public:
+ QNetworkConfigurationManagerPrivate();
+ virtual ~QNetworkConfigurationManagerPrivate();
+
+ QNetworkConfiguration defaultConfiguration();
+
+ QNetworkConfigurationManager::Capabilities capFlags;
+
+ void performAsyncConfigurationUpdate();
+
+ QList<QBearerEngine *> engines();
+
+ void startPolling();
+
+ void enablePolling();
+ void disablePolling();
+
+public slots:
+ void updateConfigurations();
+
+Q_SIGNALS:
+ void configurationAdded(const QNetworkConfiguration& config);
+ void configurationRemoved(const QNetworkConfiguration& config);
+ void configurationUpdateComplete();
+ void configurationChanged(const QNetworkConfiguration& config);
+ void onlineStateChanged(bool isOnline);
+
+ void abort();
+
+private:
+ QMutex mutex;
+
+ QTimer *pollTimer;
+
+ QList<QBearerEngine *> sessionEngines;
+
+ QSet<QString> onlineConfigurations;
+
+ QSet<int> updatingEngines;
+ bool updating;
+
+ QSet<int> pollingEngines;
+ int forcedPolling;
+
+ bool firstUpdate;
+
+private Q_SLOTS:
+ void configurationAdded(QNetworkConfigurationPrivatePointer ptr);
+ void configurationRemoved(QNetworkConfigurationPrivatePointer ptr);
+ void configurationChanged(QNetworkConfigurationPrivatePointer ptr);
+
+ void pollEngines();
+};
+
+Q_NETWORK_EXPORT QNetworkConfigurationManagerPrivate *qNetworkConfigurationManagerPrivate();
+
+QT_END_NAMESPACE
+
+#endif //QNETWORKCONFIGURATIONMANAGERPRIVATE_H
diff --git a/src/network/bearer/qnetworkconfiguration.cpp b/src/network/bearer/qnetworkconfiguration.cpp
new file mode 100644
index 0000000000..c4ba406d92
--- /dev/null
+++ b/src/network/bearer/qnetworkconfiguration.cpp
@@ -0,0 +1,395 @@
+/****************************************************************************
+**
+** 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 QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qnetworkconfiguration.h"
+#include "qnetworkconfiguration_p.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QNetworkConfiguration
+
+ \brief The QNetworkConfiguration class provides an abstraction of one or more access point configurations.
+
+ \since 4.7
+
+ \inmodule QtNetwork
+ \ingroup bearer
+
+ QNetworkConfiguration encapsulates a single access point or service network.
+ In most cases a single access point configuration can be mapped to one network
+ interface. However a single network interface may not always map to only one
+ access point configuration. Multiple configurations for the same
+ network device may enable multiple access points. An example
+ device that could exhibit such a configuration might be a
+ Smartphone which allows the user to manage multiple WLAN
+ configurations while the device itself has only one WLAN network device.
+
+ The QNetworkConfiguration also supports the concept of service networks.
+ This concept allows the grouping of multiple access point configurations
+ into one entity. Such a group is called service network and can be
+ beneficial in cases whereby a network session to a
+ particular destination network is required (e.g. a company network).
+ When using a service network the user doesn't usually care which one of the
+ connectivity options is chosen (e.g. corporate WLAN or VPN via GPRS)
+ as long as he can reach the company's target server. Depending
+ on the current position and time some of the access points that make
+ up the service network may not even be available. Furthermore
+ automated access point roaming can be enabled which enables the device
+ to change the network interface configuration dynamically while maintaining
+ the applications connection to the target network. It allows adaption
+ to the changing environment and may enable optimization with regards to
+ cost, speed or other network parameters.
+
+ Special configurations of type UserChoice provide a placeholder configuration which is
+ resolved to an actual network configuration by the platform when a
+ \l {QNetworkSession}{session} is \l {QNetworkSession::open()}{opened}. Not all platforms
+ support the concept of a user choice configuration.
+
+ \section1 Configuration states
+
+ The list of available configurations can be obtained via
+ QNetworkConfigurationManager::allConfigurations(). A configuration can have
+ multiple states. The \l Defined configuration state indicates that the configuration
+ is stored on the device. However the configuration is not yet ready to be activated
+ as e.g. a WLAN may not be available at the current time.
+
+ The \l Discovered state implies that the configuration is \l Defined and
+ the outside conditions are such that the configuration can be used immediately
+ to open a new network session. An example of such an outside condition may be
+ that the Ethernet cable is actually connected to the device or that the WLAN
+ with the specified SSID is in range.
+
+ The \l Active state implies that the configuration is \l Discovered. A configuration
+ in this state is currently being used by an application. The underlying network
+ interface has a valid IP configuration and can transfer IP packets between the
+ device and the target network.
+
+ The \l Undefined state indicates that the system has knowledge of possible target
+ networks but cannot actually use that knowledge to connect to it. An example
+ for such a state could be an encrypted WLAN that has been discovered
+ but the user hasn't actually saved a configuration including the required password
+ which would allow the device to connect to it.
+
+ Depending on the type of configuration some states are transient in nature. A GPRS/UMTS
+ connection may almost always be \l Discovered if the GSM/UMTS network is available.
+ However if the GSM/UMTS network looses the connection the associated configuration may change its state
+ from \l Discovered to \l Defined as well. A similar use case might be triggered by
+ WLAN availability. QNetworkConfigurationManager::updateConfigurations() can be used to
+ manually trigger updates of states. Note that some platforms do not require such updates
+ as they implicitly change the state once it has been discovered. If the state of a
+ configuration changes all related QNetworkConfiguration instances change their state automatically.
+
+ \sa QNetworkSession, QNetworkConfigurationManager
+*/
+
+/*!
+ \enum QNetworkConfiguration::Type
+
+ This enum describes the type of configuration.
+
+ \value InternetAccessPoint The configuration specifies the details for a single access point.
+ Note that configurations of type InternetAccessPoint may be part
+ of other QNetworkConfigurations of type ServiceNetwork.
+ \value ServiceNetwork The configuration is based on a group of QNetworkConfigurations of
+ type InternetAccessPoint. All group members can reach the same
+ target network. This type of configuration is a mandatory
+ requirement for roaming enabled network sessions. On some
+ platforms this form of configuration may also be called Service
+ Network Access Point (SNAP).
+ \value UserChoice The configuration is a placeholder which will be resolved to an
+ actual configuration by the platform when a session is opened. Depending
+ on the platform the selection may generate a popup dialog asking the user
+ for his preferred choice.
+ \value Invalid The configuration is invalid.
+*/
+
+/*!
+ \enum QNetworkConfiguration::StateFlag
+
+ Specifies the configuration states.
+
+ \value Undefined This state is used for transient configurations such as newly discovered
+ WLANs for which the user has not actually created a configuration yet.
+ \value Defined Defined configurations are known to the system but are not immediately
+ usable (e.g. a configured WLAN is not within range or the Ethernet cable
+ is currently not plugged into the machine).
+ \value Discovered A discovered configuration can be immediately used to create a new
+ QNetworkSession. An example of a discovered configuration could be a WLAN
+ which is within in range. If the device moves out of range the discovered
+ flag is dropped. A second example is a GPRS configuration which generally
+ remains discovered for as long as the device has network coverage. A
+ configuration that has this state is also in state
+ QNetworkConfiguration::Defined. If the configuration is a service network
+ this flag is set if at least one of the underlying access points
+ configurations has the Discovered state.
+ \value Active The configuration is currently used by an open network session
+ (see \l QNetworkSession::isOpen()). However this does not mean that the
+ current process is the entity that created the open session. It merely
+ indicates that if a new QNetworkSession were to be constructed based on
+ this configuration \l QNetworkSession::state() would return
+ \l QNetworkSession::Connected. This state implies the
+ QNetworkConfiguration::Discovered state.
+*/
+
+/*!
+ \enum QNetworkConfiguration::Purpose
+
+ Specifies the purpose of the configuration.
+
+ \value UnknownPurpose The configuration doesn't specify any purpose. This is the default value.
+ \value PublicPurpose The configuration can be used for general purpose internet access.
+ \value PrivatePurpose The configuration is suitable to access a private network such as an office Intranet.
+ \value ServiceSpecificPurpose The configuration can be used for operator specific services (e.g.
+ receiving MMS messages or content streaming).
+*/
+
+/*!
+ Constructs an invalid configuration object.
+
+ \sa isValid()
+*/
+QNetworkConfiguration::QNetworkConfiguration()
+ : d(0)
+{
+}
+
+/*!
+ Creates a copy of the QNetworkConfiguration object contained in \a other.
+*/
+QNetworkConfiguration::QNetworkConfiguration(const QNetworkConfiguration& other)
+ : d(other.d)
+{
+}
+
+/*!
+ Copies the content of the QNetworkConfiguration object contained in \a other into this one.
+*/
+QNetworkConfiguration& QNetworkConfiguration::operator=(const QNetworkConfiguration& other)
+{
+ d = other.d;
+ return *this;
+}
+
+/*!
+ Frees the resources associated with the QNetworkConfiguration object.
+*/
+QNetworkConfiguration::~QNetworkConfiguration()
+{
+}
+
+/*!
+ Returns true, if this configuration is the same as the \a other
+ configuration given; otherwise returns false.
+*/
+bool QNetworkConfiguration::operator==(const QNetworkConfiguration& other) const
+{
+ if (!d)
+ return !other.d;
+
+ if (!other.d)
+ return false;
+
+ return (d == other.d);
+}
+
+/*!
+ \fn bool QNetworkConfiguration::operator!=(const QNetworkConfiguration& other) const
+
+ Returns true if this configuration is not the same as the \a other
+ configuration given; otherwise returns false.
+*/
+
+/*!
+ Returns the user visible name of this configuration.
+
+ The name may either be the name of the underlying access point or the
+ name for service network that this configuration represents.
+*/
+QString QNetworkConfiguration::name() const
+{
+ return d ? d->name : QString();
+}
+
+/*!
+ Returns the unique and platform specific identifier for this network configuration;
+ otherwise an empty string.
+*/
+QString QNetworkConfiguration::identifier() const
+{
+ return d ? d->id : QString();
+}
+
+/*!
+ Returns the type of the configuration.
+
+ A configuration can represent a single access point configuration or
+ a set of access point configurations. Such a set is called service network.
+ A configuration that is based on a service network can potentially support
+ roaming of network sessions.
+*/
+QNetworkConfiguration::Type QNetworkConfiguration::type() const
+{
+ return d ? d->type : QNetworkConfiguration::Invalid;
+}
+
+/*!
+ Returns true if this QNetworkConfiguration object is valid.
+ A configuration may become invalid if the user deletes the configuration or
+ the configuration was default-constructed.
+
+ The addition and removal of configurations can be monitored via the
+ QNetworkConfigurationManager.
+
+ \sa QNetworkConfigurationManager
+*/
+bool QNetworkConfiguration::isValid() const
+{
+ return d ? d->isValid : false;
+}
+
+/*!
+ Returns the current state of the configuration.
+*/
+QNetworkConfiguration::StateFlags QNetworkConfiguration::state() const
+{
+ return d ? d->state : QNetworkConfiguration::Undefined;
+}
+
+/*!
+ Returns the purpose of this configuration.
+
+ The purpose field may be used to programmatically determine the
+ purpose of a configuration. Such information is usually part of the
+ access point or service network meta data.
+*/
+QNetworkConfiguration::Purpose QNetworkConfiguration::purpose() const
+{
+ return d ? d->purpose : QNetworkConfiguration::UnknownPurpose;
+}
+
+/*!
+ Returns true if this configuration supports roaming; otherwise false.
+*/
+bool QNetworkConfiguration::isRoamingAvailable() const
+{
+ return d ? d->roamingSupported : false;
+}
+
+/*!
+ Returns all sub configurations of this network configuration.
+ Only network configurations of type \l ServiceNetwork can have children. Otherwise
+ this function returns an empty list.
+*/
+QList<QNetworkConfiguration> QNetworkConfiguration::children() const
+{
+ QList<QNetworkConfiguration> results;
+ if (type() != QNetworkConfiguration::ServiceNetwork || !isValid() )
+ return results;
+
+ QMutableListIterator<QNetworkConfigurationPrivatePointer> iter(d->serviceNetworkMembers);
+ while(iter.hasNext()) {
+ QNetworkConfigurationPrivatePointer p = iter.next();
+ //if we have an invalid member get rid of it -> was deleted earlier on
+ if (!p->isValid)
+ iter.remove();
+
+ QNetworkConfiguration item;
+ item.d = p;
+ results << item;
+ }
+
+ return results;
+}
+
+/*!
+ Returns the type of bearer. The string is not translated and
+ therefore can not be shown to the user. The subsequent table presents the currently known
+ bearer types:
+
+ \table
+ \header
+ \o Value
+ \o Description
+ \row
+ \o Unknown
+ \o The session is based on an unknown or unspecified bearer type.
+ \row
+ \o Ethernet
+ \o The session is based on Ethernet.
+ \row
+ \o WLAN
+ \o The session is based on Wireless LAN.
+ \row
+ \o 2G
+ \o The session uses CSD, GPRS, HSCSD, EDGE or cdmaOne.
+ \row
+ \o CDMA2000
+ \o The session uses CDMA.
+ \row
+ \o WCDMA
+ \o The session uses W-CDMA/UMTS.
+ \row
+ \o HSPA
+ \o The session uses High Speed Packet Access.
+ \row
+ \o Bluetooth
+ \o The session uses Bluetooth.
+ \row
+ \o WiMAX
+ \o The session uses WiMAX.
+ \endtable
+
+ This function returns an empty string if this is an invalid configuration,
+ a network configuration of type \l QNetworkConfiguration::ServiceNetwork or
+ \l QNetworkConfiguration::UserChoice.
+*/
+QString QNetworkConfiguration::bearerName() const
+{
+ if (!isValid())
+ return QString();
+
+ return d->bearerName();
+}
+
+
+QT_END_NAMESPACE
+
diff --git a/src/network/bearer/qnetworkconfiguration.h b/src/network/bearer/qnetworkconfiguration.h
new file mode 100644
index 0000000000..dad6198214
--- /dev/null
+++ b/src/network/bearer/qnetworkconfiguration.h
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** 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 QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QNETWORKCONFIGURATION_H
+#define QNETWORKCONFIGURATION_H
+
+#include <QtCore/qglobal.h>
+#include <QtCore/qshareddata.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qlist.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Network)
+
+class QNetworkConfigurationPrivate;
+class Q_NETWORK_EXPORT QNetworkConfiguration
+{
+public:
+ QNetworkConfiguration();
+ QNetworkConfiguration(const QNetworkConfiguration& other);
+ QNetworkConfiguration &operator=(const QNetworkConfiguration& other);
+ ~QNetworkConfiguration();
+
+ bool operator==(const QNetworkConfiguration& cp) const;
+ inline bool operator!=(const QNetworkConfiguration& cp) const
+ { return !operator==(cp); }
+
+ enum Type {
+ InternetAccessPoint = 0,
+ ServiceNetwork,
+ UserChoice,
+ Invalid
+ };
+
+ enum Purpose {
+ UnknownPurpose = 0,
+ PublicPurpose,
+ PrivatePurpose,
+ ServiceSpecificPurpose
+ };
+
+ enum StateFlag {
+ Undefined = 0x0000001,
+ Defined = 0x0000002,
+ Discovered = 0x0000006,
+ Active = 0x000000e
+ };
+
+ Q_DECLARE_FLAGS(StateFlags, StateFlag)
+
+ StateFlags state() const;
+ Type type() const;
+ Purpose purpose() const;
+ QString bearerName() const;
+ QString identifier() const;
+ bool isRoamingAvailable() const;
+ QList<QNetworkConfiguration> children() const;
+
+ QString name() const;
+ bool isValid() const;
+
+private:
+ friend class QNetworkConfigurationPrivate;
+ friend class QNetworkConfigurationManager;
+ friend class QNetworkConfigurationManagerPrivate;
+ friend class QNetworkSessionPrivate;
+ QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> d;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif //QNETWORKCONFIGURATION_H
diff --git a/src/network/bearer/qnetworkconfiguration_p.h b/src/network/bearer/qnetworkconfiguration_p.h
new file mode 100644
index 0000000000..6b40946437
--- /dev/null
+++ b/src/network/bearer/qnetworkconfiguration_p.h
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** 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 QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QNETWORKCONFIGURATIONPRIVATE_H
+#define QNETWORKCONFIGURATIONPRIVATE_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qnetworkconfiguration.h"
+#include <QtCore/qshareddata.h>
+#include <QtNetwork/QNetworkInterface>
+
+QT_BEGIN_NAMESPACE
+
+typedef QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> QNetworkConfigurationPrivatePointer;
+class QNetworkConfigurationPrivate : public QSharedData
+{
+public:
+ QNetworkConfigurationPrivate ()
+ : isValid(false), type(QNetworkConfiguration::Invalid),
+ roamingSupported(false), purpose(QNetworkConfiguration::UnknownPurpose), internet(false)
+ {
+ }
+
+ ~QNetworkConfigurationPrivate()
+ {
+ //release pointers to member configurations
+ serviceNetworkMembers.clear();
+ }
+
+ virtual QString bearerName() const
+ {
+ return bearer;
+ }
+
+ QString bearer;
+
+ QString name;
+
+ bool isValid;
+ QString id;
+ QNetworkConfiguration::StateFlags state;
+ QNetworkConfiguration::Type type;
+ bool roamingSupported;
+ QNetworkConfiguration::Purpose purpose;
+
+ bool internet;
+
+ QList<QNetworkConfigurationPrivatePointer> serviceNetworkMembers;
+
+private:
+
+ // disallow detaching
+ QNetworkConfigurationPrivate &operator=(const QNetworkConfigurationPrivate &other);
+ QNetworkConfigurationPrivate(const QNetworkConfigurationPrivate &other);
+};
+
+QT_END_NAMESPACE
+
+#endif //QNETWORKCONFIGURATIONPRIVATE_H
diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp
new file mode 100644
index 0000000000..cf9f4b2701
--- /dev/null
+++ b/src/network/bearer/qnetworksession.cpp
@@ -0,0 +1,702 @@
+/****************************************************************************
+**
+** 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 QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QEventLoop>
+#include <QTimer>
+
+#include "qnetworksession.h"
+#include "qbearerengine_p.h"
+#include "qnetworkconfigmanager_p.h"
+#include "qnetworksession_p.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QNetworkSession
+
+ \brief The QNetworkSession class provides control over the system's access points
+ and enables session management for cases when multiple clients access the same access point.
+
+ \since 4.7
+
+ \inmodule QtNetwork
+ \ingroup bearer
+
+ A QNetworkSession enables control over the system's network interfaces. The session's configuration
+ parameter are determined via the QNetworkConfiguration object to which it is bound. Depending on the
+ type of the session (single access point or service network) a session may be linked to one or more
+ network interfaces. By means of \l{open()}{opening} and \l{close()}{closing} of network sessions
+ a developer can start and stop the systems network interfaces. If the configuration represents
+ multiple access points (see \l QNetworkConfiguration::ServiceNetwork) more advanced features such as roaming may be supported.
+
+ QNetworkSession supports session management within the same process and depending on the platform's
+ capabilities may support out-of-process sessions. If the same
+ network configuration is used by multiple open sessions the underlying network interface is only terminated once
+ the last session has been closed.
+
+ \section1 Roaming
+
+ Applications may connect to the preferredConfigurationChanged() signal in order to
+ receive notifications when a more suitable access point becomes available.
+ In response to this signal the application must either initiate the roaming via migrate()
+ or ignore() the new access point. Once the session has roamed the
+ newConfigurationActivated() signal is emitted. The application may now test the
+ carrier and must either accept() or reject() it. The session will return to the previous
+ access point if the roaming was rejected. The subsequent state diagram depicts the required
+ state transitions.
+
+ \image roaming-states.png
+
+ Some platforms may distinguish forced roaming and application level roaming (ALR).
+ ALR implies that the application controls (via migrate(), ignore(), accept() and reject())
+ whether a network session can roam from one access point to the next. Such control is useful
+ if the application maintains stateful socket connections and wants to control the transition from
+ one interface to the next. Forced roaming implies that the system automatically roams to the next network without
+ consulting the application. This has the advantage that the application can make use of roaming features
+ without actually being aware of it. It is expected that the application detects that the underlying
+ socket is broken and automatically reconnects via the new network link.
+
+ If the platform supports both modes of roaming, an application indicates its preference
+ by connecting to the preferredConfigurationChanged() signal. Connecting to this signal means that
+ the application wants to take control over the roaming behavior and therefore implies application
+ level roaming. If the client does not connect to the preferredConfigurationChanged(), forced roaming
+ is used. If forced roaming is not supported the network session will not roam by default.
+
+ Some applications may want to suppress any form of roaming altogether. Possible use cases may be
+ high priority downloads or remote services which cannot handle a roaming enabled client. Clients
+ can suppress roaming by connecting to the preferredConfigurationChanged() signal and answer each
+ signal emission with ignore().
+
+ \sa QNetworkConfiguration, QNetworkConfigurationManager
+*/
+
+/*!
+ \enum QNetworkSession::State
+
+ This enum describes the connectivity state of the session. If the session is based on a
+ single access point configuration the state of the session is the same as the state of the
+ associated network interface.
+
+ \value Invalid The session is invalid due to an invalid configuration. This may
+ happen due to a removed access point or a configuration that was
+ invalid to begin with.
+ \value NotAvailable The session is based on a defined but not yet discovered QNetworkConfiguration
+ (see \l QNetworkConfiguration::StateFlag).
+ \value Connecting The network session is being established.
+ \value Connected The network session is connected. If the current process wishes to use this session
+ it has to register its interest by calling open(). A network session
+ is considered to be ready for socket operations if it isOpen() and connected.
+ \value Closing The network session is in the process of being shut down.
+ \value Disconnected The network session is not connected. The associated QNetworkConfiguration
+ has the state QNetworkConfiguration::Discovered.
+ \value Roaming The network session is roaming from one access point to another
+ access point.
+*/
+
+/*!
+ \enum QNetworkSession::SessionError
+
+ This enum describes the session errors that can occur.
+
+ \value UnknownSessionError An unidentified error occurred.
+ \value SessionAbortedError The session was aborted by the user or system.
+ \value RoamingError The session cannot roam to a new configuration.
+ \value OperationNotSupportedError The operation is not supported for current configuration.
+ \value InvalidConfigurationError The operation cannot currently be performed for the
+ current configuration.
+*/
+
+/*!
+ \fn void QNetworkSession::stateChanged(QNetworkSession::State state)
+
+ This signal is emitted whenever the state of the network session changes.
+ The \a state parameter is the new state.
+
+ \sa state()
+*/
+
+/*!
+ \fn void QNetworkSession::error(QNetworkSession::SessionError error)
+
+ This signal is emitted after an error occurred. The \a error parameter
+ describes the error that occurred.
+
+ \sa error(), errorString()
+*/
+
+/*!
+ \fn void QNetworkSession::preferredConfigurationChanged(const QNetworkConfiguration& config, bool isSeamless)
+
+ This signal is emitted when the preferred configuration/access point for the
+ session changes. Only sessions which are based on service network configurations
+ may emit this signal. \a config can be used to determine access point specific
+ details such as proxy settings and \a isSeamless indicates whether roaming will
+ break the sessions IP address.
+
+ As a consequence to this signal the application must either start the roaming process
+ by calling migrate() or choose to ignore() the new access point.
+
+ If the roaming process is non-seamless the IP address will change which means that
+ a socket becomes invalid. However seamless mobility can ensure that the local IP address
+ does not change. This is achieved by using a virtual IP address which is bound to the actual
+ link address. During the roaming process the virtual address is attached to the new link
+ address.
+
+ Some platforms may support the concept of Forced Roaming and Application Level Roaming (ALR).
+ Forced roaming implies that the platform may simply roam to a new configuration without
+ consulting applications. It is up to the application to detect the link layer loss and reestablish
+ its sockets. In contrast ALR provides the opportunity to prevent the system from roaming.
+ If this session is based on a configuration that supports roaming the application can choose
+ whether it wants to be consulted (ALR use case) by connecting to this signal. For as long as this signal
+ connection remains the session remains registered as a roaming stakeholder; otherwise roaming will
+ be enforced by the platform.
+
+ \sa migrate(), ignore(), QNetworkConfiguration::isRoamingAvailable()
+*/
+
+/*!
+ \fn void QNetworkSession::newConfigurationActivated()
+
+ This signal is emitted once the session has roamed to the new access point.
+ The application may reopen its socket and test the suitability of the new network link.
+ Subsequently it must either accept() or reject() the new access point.
+
+ \sa accept(), reject()
+*/
+
+/*!
+ \fn void QNetworkSession::opened()
+
+ This signal is emitted when the network session has been opened.
+
+ The underlying network interface will not be shut down as long as the session remains open.
+ Note that this feature is dependent on \l{QNetworkConfigurationManager::SystemSessionSupport}{system wide session support}.
+*/
+
+/*!
+ \fn void QNetworkSession::closed()
+
+ This signal is emitted when the network session has been closed.
+*/
+
+/*!
+ Constructs a session based on \a connectionConfig with the given \a parent.
+
+ \sa QNetworkConfiguration
+*/
+QNetworkSession::QNetworkSession(const QNetworkConfiguration& connectionConfig, QObject* parent)
+: QObject(parent), d(0)
+{
+ foreach (QBearerEngine *engine, qNetworkConfigurationManagerPrivate()->engines()) {
+ if (engine->hasIdentifier(connectionConfig.identifier())) {
+ d = engine->createSessionBackend();
+ d->q = this;
+ d->publicConfig = connectionConfig;
+ d->syncStateWithInterface();
+ connect(d, SIGNAL(quitPendingWaitsForOpened()), this, SIGNAL(opened()));
+ connect(d, SIGNAL(error(QNetworkSession::SessionError)),
+ this, SIGNAL(error(QNetworkSession::SessionError)));
+ connect(d, SIGNAL(stateChanged(QNetworkSession::State)),
+ this, SIGNAL(stateChanged(QNetworkSession::State)));
+ connect(d, SIGNAL(closed()), this, SIGNAL(closed()));
+ connect(d, SIGNAL(preferredConfigurationChanged(QNetworkConfiguration,bool)),
+ this, SIGNAL(preferredConfigurationChanged(QNetworkConfiguration,bool)));
+ connect(d, SIGNAL(newConfigurationActivated()),
+ this, SIGNAL(newConfigurationActivated()));
+ break;
+ }
+ }
+}
+
+/*!
+ Frees the resources associated with the QNetworkSession object.
+*/
+QNetworkSession::~QNetworkSession()
+{
+ delete d;
+}
+
+/*!
+ Creates an open session which increases the session counter on the underlying network interface.
+ The system will not terminate a network interface until the session reference counter reaches zero.
+ Therefore an open session allows an application to register its use of the interface.
+
+ As a result of calling open() the interface will be started if it is not connected/up yet.
+ Some platforms may not provide support for out-of-process sessions. On such platforms the session
+ counter ignores any sessions held by another process. The platform capabilities can be
+ detected via QNetworkConfigurationManager::capabilities().
+
+ Note that this call is asynchronous. Depending on the outcome of this call the results can be enquired
+ by connecting to the stateChanged(), opened() or error() signals.
+
+ It is not a requirement to open a session in order to monitor the underlying network interface.
+
+ \sa close(), stop(), isOpen()
+*/
+void QNetworkSession::open()
+{
+ if (d)
+ d->open();
+ else
+ emit error(InvalidConfigurationError);
+}
+
+/*!
+ Waits until the session has been opened, up to \a msecs milliseconds. If the session has been opened, this
+ function returns true; otherwise it returns false. In the case where it returns false, you can call error()
+ to determine the cause of the error.
+
+ The following example waits up to one second for the session to be opened:
+
+ \code
+ session->open();
+ if (session->waitForOpened(1000))
+ qDebug("Open!");
+ \endcode
+
+ If \a msecs is -1, this function will not time out.
+
+ \sa open(), error()
+*/
+bool QNetworkSession::waitForOpened(int msecs)
+{
+ if (!d)
+ return false;
+
+ if (d->isOpen)
+ return true;
+
+ if (d->state != Connecting)
+ return false;
+
+ QEventLoop* loop = new QEventLoop(this);
+ QObject::connect(d, SIGNAL(quitPendingWaitsForOpened()),
+ loop, SLOT(quit()));
+ QObject::connect(this, SIGNAL(error(QNetworkSession::SessionError)),
+ loop, SLOT(quit()));
+
+ //final call
+ if (msecs>=0)
+ QTimer::singleShot(msecs, loop, SLOT(quit()));
+
+ loop->exec();
+ loop->disconnect();
+ loop->deleteLater();
+
+ return d->isOpen;
+}
+
+/*!
+ Decreases the session counter on the associated network configuration. If the session counter reaches zero
+ the active network interface is shut down. This also means that state() will only change from \l Connected to
+ \l Disconnected if the current session was the last open session.
+
+ If the platform does not support out-of-process sessions calling this function does not stop the
+ interface. In this case \l{stop()} has to be used to force a shut down.
+ The platform capabilities can be detected via QNetworkConfigurationManager::capabilities().
+
+ Note that this call is asynchronous. Depending on the outcome of this call the results can be enquired
+ by connecting to the stateChanged(), opened() or error() signals.
+
+ \sa open(), stop(), isOpen()
+*/
+void QNetworkSession::close()
+{
+ if (d)
+ d->close();
+}
+
+/*!
+ Invalidates all open sessions against the network interface and therefore stops the
+ underlying network interface. This function always changes the session's state() flag to
+ \l Disconnected.
+
+ On Symbian platform, a 'NetworkControl' capability is required for
+ full interface-level stop (without the capability, only the current session is stopped).
+
+ \sa open(), close()
+*/
+void QNetworkSession::stop()
+{
+ if (d)
+ d->stop();
+}
+
+/*!
+ Returns the QNetworkConfiguration that this network session object is based on.
+
+ \sa QNetworkConfiguration
+*/
+QNetworkConfiguration QNetworkSession::configuration() const
+{
+ return d ? d->publicConfig : QNetworkConfiguration();
+}
+
+/*!
+ Returns the network interface that is used by this session.
+
+ This function only returns a valid QNetworkInterface when this session is \l Connected.
+
+ The returned interface may change as a result of a roaming process.
+
+ Note: this function does not work in Symbian emulator due to the way the
+ connectivity is emulated on Windows.
+
+ \sa state()
+*/
+QNetworkInterface QNetworkSession::interface() const
+{
+ return d ? d->currentInterface() : QNetworkInterface();
+}
+
+/*!
+ Returns true if this session is open. If the number of all open sessions is greater than
+ zero the underlying network interface will remain connected/up.
+
+ The session can be controlled via open() and close().
+*/
+bool QNetworkSession::isOpen() const
+{
+ return d ? d->isOpen : false;
+}
+
+/*!
+ Returns the state of the session.
+
+ If the session is based on a single access point configuration the state of the
+ session is the same as the state of the associated network interface. Therefore
+ a network session object can be used to monitor network interfaces.
+
+ A \l QNetworkConfiguration::ServiceNetwork based session summarizes the state of all its children
+ and therefore returns the \l Connected state if at least one of the service network's
+ \l {QNetworkConfiguration::children()}{children()} configurations is active.
+
+ Note that it is not required to hold an open session in order to obtain the network interface state.
+ A connected but closed session may be used to monitor network interfaces whereas an open and connected
+ session object may prevent the network interface from being shut down.
+
+ \sa error(), stateChanged()
+*/
+QNetworkSession::State QNetworkSession::state() const
+{
+ return d ? d->state : QNetworkSession::Invalid;
+}
+
+/*!
+ Returns the type of error that last occurred.
+
+ \sa state(), errorString()
+*/
+QNetworkSession::SessionError QNetworkSession::error() const
+{
+ return d ? d->error() : InvalidConfigurationError;
+}
+
+/*!
+ Returns a human-readable description of the last device error that
+ occurred.
+
+ \sa error()
+*/
+QString QNetworkSession::errorString() const
+{
+ return d ? d->errorString() : tr("Invalid configuration.");
+}
+
+/*!
+ Returns the value for property \a key.
+
+ A network session can have properties attached which may describe the session in more details.
+ This function can be used to gain access to those properties.
+
+ The following property keys are guaranteed to be specified on all platforms:
+
+ \table
+ \header
+ \o Key \o Description
+ \row
+ \o ActiveConfiguration
+ \o If the session \l isOpen() this property returns the identifier of the
+ QNetworkConfiguration that is used by this session; otherwise an empty string.
+
+ The main purpose of this key is to determine which Internet access point is used
+ if the session is based on a \l{QNetworkConfiguration::ServiceNetwork}{ServiceNetwork}.
+ The following code snippet highlights the difference:
+ \code
+ QNetworkConfigurationManager mgr;
+ QNetworkConfiguration ap = mgr.defaultConfiguration();
+ QNetworkSession* session = new QNetworkSession(ap);
+ ... //code activates session
+
+ QString ident = session->sessionProperty("ActiveConfiguration").toString();
+ if ( ap.type() == QNetworkConfiguration::ServiceNetwork ) {
+ Q_ASSERT( ap.identifier() != ident );
+ Q_ASSERT( ap.children().contains( mgr.configurationFromIdentifier(ident) ) );
+ } else if ( ap.type() == QNetworkConfiguration::InternetAccessPoint ) {
+ Q_ASSERT( ap.identifier() == ident );
+ }
+ \endcode
+ \row
+ \o UserChoiceConfiguration
+ \o If the session \l isOpen() and is bound to a QNetworkConfiguration of type
+ UserChoice, this property returns the identifier of the QNetworkConfiguration that the
+ configuration resolved to when \l open() was called; otherwise an empty string.
+
+ The purpose of this key is to determine the real QNetworkConfiguration that the
+ session is using. This key is different to \i ActiveConfiguration in that
+ this key may return an identifier for either a
+ \l {QNetworkConfiguration::ServiceNetwork}{service network} or a
+ \l {QNetworkConfiguration::InternetAccessPoint}{Internet access points} configurations
+ whereas \i ActiveConfiguration always returns identifiers to
+ \l {QNetworkConfiguration::InternetAccessPoint}{Internet access points} configurations.
+ \row
+ \o ConnectInBackground
+ \o Setting this property to \i true before calling \l open() implies that the connection attempt
+ is made but if no connection can be established, the user is not connsulted and asked to select
+ a suitable connection. This property is not set by default and support for it depends on the platform.
+
+ \row
+ \o AutoCloseSessionTimeout
+ \o If the session requires polling to keep its state up to date, this property holds
+ the timeout in milliseconds before the session will automatically close. If the
+ value of this property is -1 the session will not automatically close. This property
+ is set to -1 by default.
+
+ The purpose of this property is to minimize resource use on platforms that use
+ polling to update the state of the session. Applications can set the value of this
+ property to the desired timeout before the session is closed. In response to the
+ closed() signal the network session should be deleted to ensure that all polling is
+ stopped. The session can then be recreated once it is required again. This property
+ has no effect for sessions that do not require polling.
+ \endtable
+*/
+QVariant QNetworkSession::sessionProperty(const QString& key) const
+{
+ if (!d)
+ return QVariant();
+
+ if (!d->publicConfig.isValid())
+ return QVariant();
+
+ if (key == QLatin1String("ActiveConfiguration")) {
+ if (!d->isOpen)
+ return QString();
+ else
+ return d->activeConfig.identifier();
+ }
+
+ if (key == QLatin1String("UserChoiceConfiguration")) {
+ if (!d->isOpen || d->publicConfig.type() != QNetworkConfiguration::UserChoice)
+ return QString();
+
+ if (d->serviceConfig.isValid())
+ return d->serviceConfig.identifier();
+ else
+ return d->activeConfig.identifier();
+ }
+
+ return d->sessionProperty(key);
+}
+
+/*!
+ Sets the property \a value on the session. The property is identified using
+ \a key. Removing an already set property can be achieved by passing an
+ invalid QVariant.
+
+ Note that the \e UserChoiceConfiguration and \e ActiveConfiguration
+ properties are read only and cannot be changed using this method.
+*/
+void QNetworkSession::setSessionProperty(const QString& key, const QVariant& value)
+{
+ if (!d)
+ return;
+
+ if (key == QLatin1String("ActiveConfiguration") ||
+ key == QLatin1String("UserChoiceConfiguration")) {
+ return;
+ }
+
+ d->setSessionProperty(key, value);
+}
+
+/*!
+ Instructs the session to roam to the new access point. The old access point remains active
+ until the application calls accept().
+
+ The newConfigurationActivated() signal is emitted once roaming has been completed.
+
+ \sa accept()
+*/
+void QNetworkSession::migrate()
+{
+ if (d)
+ d->migrate();
+}
+
+/*!
+ This function indicates that the application does not wish to roam the session.
+
+ \sa migrate()
+*/
+void QNetworkSession::ignore()
+{
+ // Needed on at least Symbian platform: the roaming must be explicitly
+ // ignore()'d or migrate()'d
+ if (d)
+ d->ignore();
+}
+
+/*!
+ Instructs the session to permanently accept the new access point. Once this function
+ has been called the session may not return to the old access point.
+
+ The old access point may be closed in the process if there are no other network sessions for it.
+ Therefore any open socket that still uses the old access point
+ may become unusable and should be closed before completing the migration.
+*/
+void QNetworkSession::accept()
+{
+ if (d)
+ d->accept();
+}
+
+/*!
+ The new access point is not suitable for the application. By calling this function the
+ session returns to the previous access point/configuration. This action may invalidate
+ any socket that has been created via the not desired access point.
+
+ \sa accept()
+*/
+void QNetworkSession::reject()
+{
+ if (d)
+ d->reject();
+}
+
+
+/*!
+ Returns the amount of data sent in bytes; otherwise 0.
+
+ This field value includes the usage across all open network
+ sessions which use the same network interface.
+
+ If the session is based on a service network configuration the number of
+ sent bytes across all active member configurations are returned.
+
+ This function may not always be supported on all platforms and returns
+ 0. The platform capability can be detected via QNetworkConfigurationManager::DataStatistics.
+*/
+quint64 QNetworkSession::bytesWritten() const
+{
+ return d ? d->bytesWritten() : Q_UINT64_C(0);
+}
+
+/*!
+ Returns the amount of data received in bytes; otherwise 0.
+
+ This field value includes the usage across all open network
+ sessions which use the same network interface.
+
+ If the session is based on a service network configuration the number of
+ sent bytes across all active member configurations are returned.
+
+ This function may not always be supported on all platforms and returns
+ 0. The platform capability can be detected via QNetworkConfigurationManager::DataStatistics.
+*/
+quint64 QNetworkSession::bytesReceived() const
+{
+ return d ? d->bytesReceived() : Q_UINT64_C(0);
+}
+
+/*!
+ Returns the number of seconds that the session has been active.
+*/
+quint64 QNetworkSession::activeTime() const
+{
+ return d ? d->activeTime() : Q_UINT64_C(0);
+}
+
+/*!
+ \internal
+
+ This function is required to detect whether the client wants to control
+ the roaming process. If he connects to preferredConfigurationChanged() signal
+ he intends to influence it. Otherwise QNetworkSession always roams
+ without registering this session as a stakeholder in the roaming process.
+
+ For more details check the Forced vs ALR roaming section in the QNetworkSession
+ class description.
+*/
+void QNetworkSession::connectNotify(const char *signal)
+{
+ QObject::connectNotify(signal);
+ //check for preferredConfigurationChanged() signal connect notification
+ //This is not required on all platforms
+ if (!d)
+ return;
+
+ if (qstrcmp(signal, SIGNAL(preferredConfigurationChanged(QNetworkConfiguration,bool))) == 0)
+ d->setALREnabled(true);
+}
+
+/*!
+ \internal
+
+ This function is called when the client disconnects from the preferredConfigurationChanged()
+ signal.
+
+ \sa connectNotify()
+*/
+void QNetworkSession::disconnectNotify(const char *signal)
+{
+ QObject::disconnectNotify(signal);
+ //check for preferredConfigurationChanged() signal disconnect notification
+ //This is not required on all platforms
+ if (!d)
+ return;
+
+ if (qstrcmp(signal, SIGNAL(preferredConfigurationChanged(QNetworkConfiguration,bool))) == 0)
+ d->setALREnabled(false);
+}
+
+#include "moc_qnetworksession.cpp"
+
+QT_END_NAMESPACE
diff --git a/src/network/bearer/qnetworksession.h b/src/network/bearer/qnetworksession.h
new file mode 100644
index 0000000000..18437f6c3e
--- /dev/null
+++ b/src/network/bearer/qnetworksession.h
@@ -0,0 +1,132 @@
+/****************************************************************************
+**
+** 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 QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QNETWORKSESSION_H
+#define QNETWORKSESSION_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qstring.h>
+#include <QtNetwork/qnetworkinterface.h>
+#include <QtCore/qvariant.h>
+#include <QtNetwork/qnetworkconfiguration.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Network)
+
+class QNetworkSessionPrivate;
+class Q_NETWORK_EXPORT QNetworkSession : public QObject
+{
+ Q_OBJECT
+public:
+ enum State {
+ Invalid = 0,
+ NotAvailable,
+ Connecting,
+ Connected,
+ Closing,
+ Disconnected,
+ Roaming
+ };
+
+ enum SessionError {
+ UnknownSessionError = 0,
+ SessionAbortedError,
+ RoamingError,
+ OperationNotSupportedError,
+ InvalidConfigurationError
+ };
+
+ QNetworkSession(const QNetworkConfiguration& connConfig, QObject* parent =0);
+ virtual ~QNetworkSession();
+
+ bool isOpen() const;
+ QNetworkConfiguration configuration() const;
+ QNetworkInterface interface() const;
+
+ State state() const;
+ SessionError error() const;
+ QString errorString() const;
+ QVariant sessionProperty(const QString& key) const;
+ void setSessionProperty(const QString& key, const QVariant& value);
+
+ quint64 bytesWritten() const;
+ quint64 bytesReceived() const;
+ quint64 activeTime() const;
+
+ bool waitForOpened(int msecs = 30000);
+
+public Q_SLOTS:
+ void open();
+ void close();
+ void stop();
+
+ //roaming related slots
+ void migrate();
+ void ignore();
+ void accept();
+ void reject();
+
+
+Q_SIGNALS:
+ void stateChanged(QNetworkSession::State);
+ void opened();
+ void closed();
+ void error(QNetworkSession::SessionError);
+ void preferredConfigurationChanged(const QNetworkConfiguration& config, bool isSeamless);
+ void newConfigurationActivated();
+
+protected:
+ virtual void connectNotify(const char *signal);
+ virtual void disconnectNotify(const char *signal);
+
+private:
+ QNetworkSessionPrivate* d;
+ friend class QNetworkSessionPrivate;
+ };
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif //QNETWORKSESSION_H
diff --git a/src/network/bearer/qnetworksession_p.h b/src/network/bearer/qnetworksession_p.h
new file mode 100644
index 0000000000..76691b31fd
--- /dev/null
+++ b/src/network/bearer/qnetworksession_p.h
@@ -0,0 +1,150 @@
+/****************************************************************************
+**
+** 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 QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QNETWORKSESSIONPRIVATE_H
+#define QNETWORKSESSIONPRIVATE_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qnetworksession.h"
+#include "qnetworkconfiguration_p.h"
+
+#include <QNetworkInterface>
+
+QT_BEGIN_NAMESPACE
+
+class Q_NETWORK_EXPORT QNetworkSessionPrivate : public QObject
+{
+ Q_OBJECT
+
+ friend class QNetworkSession;
+
+public:
+ QNetworkSessionPrivate()
+ : state(QNetworkSession::Invalid), isOpen(false)
+ {
+ }
+
+ virtual ~QNetworkSessionPrivate()
+ {
+ }
+
+ //called by QNetworkSession constructor and ensures
+ //that the state is immediately updated (w/o actually opening
+ //a session). Also this function should take care of
+ //notification hooks to discover future state changes.
+ virtual void syncStateWithInterface() = 0;
+
+ virtual QNetworkInterface currentInterface() const = 0;
+ virtual QVariant sessionProperty(const QString& key) const = 0;
+ virtual void setSessionProperty(const QString& key, const QVariant& value) = 0;
+
+ virtual void open() = 0;
+ virtual void close() = 0;
+ virtual void stop() = 0;
+
+ virtual void setALREnabled(bool /*enabled*/) { }
+ virtual void migrate() = 0;
+ virtual void accept() = 0;
+ virtual void ignore() = 0;
+ virtual void reject() = 0;
+
+ virtual QString errorString() const = 0; //must return translated string
+ virtual QNetworkSession::SessionError error() const = 0;
+
+ virtual quint64 bytesWritten() const = 0;
+ virtual quint64 bytesReceived() const = 0;
+ virtual quint64 activeTime() const = 0;
+
+protected:
+ inline QNetworkConfigurationPrivatePointer privateConfiguration(const QNetworkConfiguration &config) const
+ {
+ return config.d;
+ }
+
+ inline void setPrivateConfiguration(QNetworkConfiguration &config,
+ QNetworkConfigurationPrivatePointer ptr) const
+ {
+ config.d = ptr;
+ }
+
+Q_SIGNALS:
+ //releases any pending waitForOpened() calls
+ void quitPendingWaitsForOpened();
+
+ void error(QNetworkSession::SessionError error);
+ void stateChanged(QNetworkSession::State state);
+ void closed();
+ void newConfigurationActivated();
+ void preferredConfigurationChanged(const QNetworkConfiguration &config, bool isSeamless);
+
+protected:
+ // The config set on QNetworkSession.
+ QNetworkConfiguration publicConfig;
+
+ // If publicConfig is a ServiceNetwork this is a copy of publicConfig.
+ // If publicConfig is an UserChoice that is resolved to a ServiceNetwork this is the actual
+ // ServiceNetwork configuration.
+ QNetworkConfiguration serviceConfig;
+
+ // This is the actual active configuration currently in use by the session.
+ // Either a copy of publicConfig or one of serviceConfig.children().
+ QNetworkConfiguration activeConfig;
+
+ QNetworkSession::State state;
+ bool isOpen;
+
+ QNetworkSession *q;
+};
+
+QT_END_NAMESPACE
+
+#endif //QNETWORKSESSIONPRIVATE_H
+
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
index 7150fb7e28..3d0c32dcd7 100644
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -172,7 +172,7 @@ int QHostInfo::lookupHost(const QString &name, QObject *receiver,
if (name.isEmpty()) {
QHostInfo hostInfo(id);
hostInfo.setError(QHostInfo::HostNotFound);
- hostInfo.setErrorString(QObject::tr("No host name given"));
+ hostInfo.setErrorString(QCoreApplication::translate("QHostInfo", "No host name given"));
QScopedPointer<QHostInfoResult> result(new QHostInfoResult);
QObject::connect(result.data(), SIGNAL(resultsReady(QHostInfo)),
receiver, member, Qt::QueuedConnection);
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
index be06b6eb7f..a186e78a19 100644
--- a/src/network/kernel/qhostinfo_unix.cpp
+++ b/src/network/kernel/qhostinfo_unix.cpp
@@ -193,7 +193,9 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName)
results.setHostName(hostName);
if (aceHostname.isEmpty()) {
results.setError(QHostInfo::HostNotFound);
- results.setErrorString(hostName.isEmpty() ? QObject::tr("No host name given") : QObject::tr("Invalid hostname"));
+ results.setErrorString(hostName.isEmpty() ?
+ QCoreApplication::translate("QHostInfoAgent", "No host name given") :
+ QCoreApplication::translate("QHostInfoAgent", "Invalid hostname"));
return results;
}
diff --git a/src/network/network.pro b/src/network/network.pro
index e890b94715..8582d8ad56 100644
--- a/src/network/network.pro
+++ b/src/network/network.pro
@@ -17,6 +17,7 @@ unix:QMAKE_PKGCONFIG_REQUIRES = QtCore
include(../qbase.pri)
include(access/access.pri)
+include(bearer/bearer.pri)
include(kernel/kernel.pri)
include(socket/socket.pri)
include(ssl/ssl.pri)
diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp
index a890b3b4be..a169ca0947 100644
--- a/src/network/socket/qnativesocketengine.cpp
+++ b/src/network/socket/qnativesocketengine.cpp
@@ -185,6 +185,9 @@ void QNativeSocketEnginePrivate::setError(QAbstractSocket::SocketError error, Er
// socket to recreate its engine after an error. Note: There's
// one exception: SocketError(11) bypasses this as it's purely
// a temporary internal error condition.
+ // Another exception is the way the waitFor*() functions set
+ // an error when a timeout occurs. After the call to setError()
+ // they reset the hasSetSocketError to false
return;
}
if (error != QAbstractSocket::SocketError(11))
@@ -859,6 +862,7 @@ bool QNativeSocketEngine::waitForRead(int msecs, bool *timedOut)
*timedOut = true;
d->setError(QAbstractSocket::SocketTimeoutError,
QNativeSocketEnginePrivate::TimeOutErrorString);
+ d->hasSetSocketError = false; // A timeout error is temporary in waitFor functions
return false;
} else if (state() == QAbstractSocket::ConnectingState) {
connectToHost(d->peerAddress, d->peerPort);
@@ -927,6 +931,7 @@ bool QNativeSocketEngine::waitForWrite(int msecs, bool *timedOut)
*timedOut = true;
d->setError(QAbstractSocket::SocketTimeoutError,
QNativeSocketEnginePrivate::TimeOutErrorString);
+ d->hasSetSocketError = false; // A timeout error is temporary in waitFor functions
return false;
} else if (state() == QAbstractSocket::ConnectingState) {
connectToHost(d->peerAddress, d->peerPort);
@@ -978,6 +983,7 @@ bool QNativeSocketEngine::waitForReadOrWrite(bool *readyToRead, bool *readyToWri
*timedOut = true;
d->setError(QAbstractSocket::SocketTimeoutError,
QNativeSocketEnginePrivate::TimeOutErrorString);
+ d->hasSetSocketError = false; // A timeout error is temporary in waitFor functions
return false;
} else if (state() == QAbstractSocket::ConnectingState) {
connectToHost(d->peerAddress, d->peerPort);
diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp
index 516b847aa1..559a6fd62d 100644
--- a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp
+++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp
@@ -61,12 +61,6 @@ QGLRect QGL2PEXVertexArray::boundingRect() const
return QGLRect(minX, minY, maxX, maxY);
}
-void QGL2PEXVertexArray::addRect(const QRectF &rect)
-{
- vertexArray << rect.topLeft() << rect.topRight() << rect.bottomRight()
- << rect.bottomRight() << rect.bottomLeft() << rect.topLeft();
-}
-
void QGL2PEXVertexArray::addClosingLine(int index)
{
if (QPointF(vertexArray.at(index)) != QPointF(vertexArray.last()))
@@ -145,7 +139,7 @@ void QGL2PEXVertexArray::addPath(const QVectorPath &path, GLfloat curveInverseSc
// threshold based on same algorithm as in qtriangulatingstroker.cpp
int threshold = qMin<float>(64, qMax(bounds.width(), bounds.height()) * 3.14f / (curveInverseScale * 6));
if (threshold < 3) threshold = 3;
- qreal one_over_threshold_minus_1 = 1.f / (threshold - 1);
+ qreal one_over_threshold_minus_1 = qreal(1) / (threshold - 1);
for (int t=0; t<threshold; ++t) {
QPointF pt = b.pointAt(t * one_over_threshold_minus_1);
lineToArray(pt.x(), pt.y());
diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h
index e0497b1625..d1e7615222 100644
--- a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h
+++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h
@@ -102,8 +102,36 @@ public:
QGL2PEXVertexArray() :
maxX(-2e10), maxY(-2e10), minX(2e10), minY(2e10),
boundingRectDirty(true) {}
+
+ inline void addRect(const QRectF &rect)
+ {
+ qreal top = rect.top();
+ qreal left = rect.left();
+ qreal bottom = rect.bottom();
+ qreal right = rect.right();
+
+ vertexArray << QGLPoint(left, top)
+ << QGLPoint(right, top)
+ << QGLPoint(right, bottom)
+ << QGLPoint(right, bottom)
+ << QGLPoint(left, bottom)
+ << QGLPoint(left, top);
+ }
+
+ inline void addQuad(const QRectF &rect)
+ {
+ qreal top = rect.top();
+ qreal left = rect.left();
+ qreal bottom = rect.bottom();
+ qreal right = rect.right();
+
+ vertexArray << QGLPoint(left, top)
+ << QGLPoint(right, top)
+ << QGLPoint(left, bottom)
+ << QGLPoint(right, bottom);
+
+ }
- void addRect(const QRectF &rect);
void addPath(const QVectorPath &path, GLfloat curveInverseScale, bool outline = true);
void clear();
diff --git a/src/opengl/gl2paintengineex/qglgradientcache.cpp b/src/opengl/gl2paintengineex/qglgradientcache.cpp
index 192e01c2e2..a1495dd8a9 100644
--- a/src/opengl/gl2paintengineex/qglgradientcache.cpp
+++ b/src/opengl/gl2paintengineex/qglgradientcache.cpp
@@ -39,10 +39,10 @@
**
****************************************************************************/
+#include "qglgradientcache_p.h"
#include <private/qdrawhelper_p.h>
#include <private/qgl_p.h>
-#include "qglgradientcache_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 2b8e0974f0..d68a268646 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -64,6 +64,7 @@
// #define QT_OPENGL_CACHE_AS_VBOS
+#include "qglgradientcache_p.h"
#include "qpaintengineex_opengl2_p.h"
#include <string.h> //for memcpy
@@ -77,8 +78,9 @@
#include <private/qfontengine_p.h>
#include <private/qpixmapdata_gl_p.h>
#include <private/qdatabuffer_p.h>
+#include <private/qstatictext_p.h>
+#include <private/qtriangulator_p.h>
-#include "qglgradientcache_p.h"
#include "qglengineshadermanager_p.h"
#include "qgl2pexvertexarray_p.h"
#include "qtriangulatingstroker_p.h"
@@ -107,6 +109,11 @@ QGL2PaintEngineExPrivate::~QGL2PaintEngineExPrivate()
e->data = 0;
e->engine = 0;
}
+
+ if (elementIndicesVBOId != 0) {
+ glDeleteBuffers(1, &elementIndicesVBOId);
+ elementIndicesVBOId = 0;
+ }
}
void QGL2PaintEngineExPrivate::updateTextureFilter(GLenum target, GLenum wrapMode, bool smoothPixmapTransform, GLuint id)
@@ -611,10 +618,13 @@ struct QGL2PEVectorPathCache
{
#ifdef QT_OPENGL_CACHE_AS_VBOS
GLuint vbo;
+ GLuint ibo;
#else
float *vertices;
+ quint32 *indices;
#endif
int vertexCount;
+ int indexCount;
GLenum primitiveType;
qreal iscale;
};
@@ -625,9 +635,12 @@ void QGL2PaintEngineExPrivate::cleanupVectorPath(QPaintEngineEx *engine, void *d
#ifdef QT_OPENGL_CACHE_AS_VBOS
Q_ASSERT(engine->type() == QPaintEngine::OpenGL2);
static_cast<QGL2PaintEngineEx *>(engine)->d_func()->unusedVBOSToClean << c->vbo;
+ if (c->ibo)
+ d->unusedIBOSToClean << c->ibo;
#else
Q_UNUSED(engine);
qFree(c->vertices);
+ qFree(c->indices);
#endif
delete c;
}
@@ -658,6 +671,9 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path)
const QPointF* const points = reinterpret_cast<const QPointF*>(path.points());
+ // ### Remove before release...
+ static bool do_vectorpath_cache = qgetenv("QT_OPENGL_NO_PATH_CACHE").isEmpty();
+
// Check to see if there's any hints
if (path.shape() == QVectorPath::RectangleHint) {
QGLRect rect(points[0].x(), points[0].y(), points[2].x(), points[2].y());
@@ -669,6 +685,8 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path)
QVectorPath::CacheEntry *data = path.lookupCacheData(q);
QGL2PEVectorPathCache *cache;
+ bool updateCache = false;
+
if (data) {
cache = (QGL2PEVectorPathCache *) data->data;
// Check if scale factor is exceeded for curved paths and generate curves if so...
@@ -678,34 +696,39 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path)
#ifdef QT_OPENGL_CACHE_AS_VBOS
glDeleteBuffers(1, &cache->vbo);
cache->vbo = 0;
+ Q_ASSERT(cache->ibo == 0);
#else
qFree(cache->vertices);
+ Q_ASSERT(cache->indices == 0);
#endif
- cache->vertexCount = 0;
+ updateCache = true;
}
}
} else {
cache = new QGL2PEVectorPathCache;
- cache->vertexCount = 0;
data = const_cast<QVectorPath &>(path).addCacheData(q, cache, cleanupVectorPath);
+ updateCache = true;
}
// Flatten the path at the current scale factor and fill it into the cache struct.
- if (!cache->vertexCount) {
+ if (updateCache) {
vertexCoordinateArray.clear();
vertexCoordinateArray.addPath(path, inverseScale, false);
int vertexCount = vertexCoordinateArray.vertexCount();
int floatSizeInBytes = vertexCount * 2 * sizeof(float);
cache->vertexCount = vertexCount;
+ cache->indexCount = 0;
cache->primitiveType = GL_TRIANGLE_FAN;
cache->iscale = inverseScale;
#ifdef QT_OPENGL_CACHE_AS_VBOS
glGenBuffers(1, &cache->vbo);
glBindBuffer(GL_ARRAY_BUFFER, cache->vbo);
glBufferData(GL_ARRAY_BUFFER, floatSizeInBytes, vertexCoordinateArray.data(), GL_STATIC_DRAW);
+ cache->ibo = 0;
#else
cache->vertices = (float *) qMalloc(floatSizeInBytes);
memcpy(cache->vertices, vertexCoordinateArray.data(), floatSizeInBytes);
+ cache->indices = 0;
#endif
}
@@ -721,8 +744,6 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path)
} else {
// printf(" - Marking path as cachable...\n");
// Tag it for later so that if the same path is drawn twice, it is assumed to be static and thus cachable
- // ### Remove before release...
- static bool do_vectorpath_cache = qgetenv("QT_OPENGL_NO_PATH_CACHE").isEmpty();
if (do_vectorpath_cache)
path.makeCacheable();
vertexCoordinateArray.clear();
@@ -732,31 +753,117 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path)
}
} else {
- // The path is too complicated & needs the stencil technique
- vertexCoordinateArray.clear();
- vertexCoordinateArray.addPath(path, inverseScale, false);
+ bool useCache = path.isCacheable();
+ if (useCache) {
+ QRectF bbox = path.controlPointRect();
+ // If the path doesn't fit within these limits, it is possible that the triangulation will fail.
+ useCache &= (bbox.left() > -0x8000 * inverseScale)
+ && (bbox.right() < 0x8000 * inverseScale)
+ && (bbox.top() > -0x8000 * inverseScale)
+ && (bbox.bottom() < 0x8000 * inverseScale);
+ }
- fillStencilWithVertexArray(vertexCoordinateArray, path.hasWindingFill());
+ if (useCache) {
+ QVectorPath::CacheEntry *data = path.lookupCacheData(q);
+ QGL2PEVectorPathCache *cache;
- glStencilMask(0xff);
- glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE);
+ bool updateCache = false;
+
+ if (data) {
+ cache = (QGL2PEVectorPathCache *) data->data;
+ // Check if scale factor is exceeded for curved paths and generate curves if so...
+ if (path.isCurved()) {
+ qreal scaleFactor = cache->iscale / inverseScale;
+ if (scaleFactor < 0.5 || scaleFactor > 2.0) {
+#ifdef QT_OPENGL_CACHE_AS_VBOS
+ glDeleteBuffers(1, &cache->vbo);
+ glDeleteBuffers(1, &cache->ibo);
+#else
+ qFree(cache->vertices);
+ qFree(cache->indices);
+#endif
+ updateCache = true;
+ }
+ }
+ } else {
+ cache = new QGL2PEVectorPathCache;
+ data = const_cast<QVectorPath &>(path).addCacheData(q, cache, cleanupVectorPath);
+ updateCache = true;
+ }
+
+ // Flatten the path at the current scale factor and fill it into the cache struct.
+ if (updateCache) {
+ QTriangleSet polys = qTriangulate(path, QTransform().scale(1 / inverseScale, 1 / inverseScale));
+ cache->vertexCount = polys.vertices.size() / 2;
+ cache->indexCount = polys.indices.size();
+ cache->primitiveType = GL_TRIANGLES;
+ cache->iscale = inverseScale;
+
+#ifdef QT_OPENGL_CACHE_AS_VBOS
+ glGenBuffers(1, &cache->vbo);
+ glGenBuffers(1, &cache->ibo);
+ glBindBuffer(GL_ARRAY_BUFFER, cache->vbo);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, cache->ibo);
+ glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(quint32) * polys.indices.size(), polys.indices.data(), GL_STATIC_DRAW);
+
+ QVarLengthArray<float> vertices(polys.vertices.size());
+ for (int i = 0; i < polys.vertices.size(); ++i)
+ vertices[i] = float(inverseScale * polys.vertices.at(i));
+ glBufferData(GL_ARRAY_BUFFER, sizeof(float) * vertices.size(), vertices.data(), GL_STATIC_DRAW);
+#else
+ cache->vertices = (float *) qMalloc(sizeof(float) * polys.vertices.size());
+ cache->indices = (quint32 *) qMalloc(sizeof(quint32) * polys.indices.size());
+ memcpy(cache->indices, polys.indices.data(), sizeof(quint32) * polys.indices.size());
+ for (int i = 0; i < polys.vertices.size(); ++i)
+ cache->vertices[i] = float(inverseScale * polys.vertices.at(i));
+#endif
+ }
+
+ prepareForDraw(currentBrush.isOpaque());
+#ifdef QT_OPENGL_CACHE_AS_VBOS
+ glBindBuffer(GL_ARRAY_BUFFER, cache->vbo);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, cache->ibo);
+ setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, 0);
+ glDrawElements(cache->primitiveType, cache->indexCount, GL_UNSIGNED_INT, 0);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+#else
+ setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, cache->vertices);
+ glDrawElements(cache->primitiveType, cache->indexCount, GL_UNSIGNED_INT, cache->indices);
+#endif
- if (q->state()->clipTestEnabled) {
- // Pass when high bit is set, replace stencil value with current clip
- glStencilFunc(GL_NOTEQUAL, q->state()->currentClip, GL_STENCIL_HIGH_BIT);
- } else if (path.hasWindingFill()) {
- // Pass when any bit is set, replace stencil value with 0
- glStencilFunc(GL_NOTEQUAL, 0, 0xff);
} else {
- // Pass when high bit is set, replace stencil value with 0
- glStencilFunc(GL_NOTEQUAL, 0, GL_STENCIL_HIGH_BIT);
- }
- prepareForDraw(currentBrush.isOpaque());
+ // printf(" - Marking path as cachable...\n");
+ // Tag it for later so that if the same path is drawn twice, it is assumed to be static and thus cachable
+ if (do_vectorpath_cache)
+ path.makeCacheable();
- // Stencil the brush onto the dest buffer
- composite(vertexCoordinateArray.boundingRect());
- glStencilMask(0);
- updateClipScissorTest();
+ // The path is too complicated & needs the stencil technique
+ vertexCoordinateArray.clear();
+ vertexCoordinateArray.addPath(path, inverseScale, false);
+
+ fillStencilWithVertexArray(vertexCoordinateArray, path.hasWindingFill());
+
+ glStencilMask(0xff);
+ glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE);
+
+ if (q->state()->clipTestEnabled) {
+ // Pass when high bit is set, replace stencil value with current clip
+ glStencilFunc(GL_NOTEQUAL, q->state()->currentClip, GL_STENCIL_HIGH_BIT);
+ } else if (path.hasWindingFill()) {
+ // Pass when any bit is set, replace stencil value with 0
+ glStencilFunc(GL_NOTEQUAL, 0, 0xff);
+ } else {
+ // Pass when high bit is set, replace stencil value with 0
+ glStencilFunc(GL_NOTEQUAL, 0, GL_STENCIL_HIGH_BIT);
+ }
+ prepareForDraw(currentBrush.isOpaque());
+
+ // Stencil the brush onto the dest buffer
+ composite(vertexCoordinateArray.boundingRect());
+ glStencilMask(0);
+ updateClipScissorTest();
+ }
}
}
@@ -1048,16 +1155,20 @@ void QGL2PaintEngineExPrivate::stroke(const QVectorPath &path, const QPen &pen)
// prepareForDraw() down below.
updateMatrix();
+ QRectF clip = q->state()->matrix.inverted().mapRect(q->state()->clipEnabled
+ ? q->state()->rectangleClip
+ : QRectF(0, 0, width, height));
+
if (penStyle == Qt::SolidLine) {
- stroker.process(path, pen);
+ stroker.process(path, pen, clip);
} else { // Some sort of dash
- dasher.process(path, pen);
+ dasher.process(path, pen, clip);
QVectorPath dashStroke(dasher.points(),
dasher.elementCount(),
dasher.elementTypes());
- stroker.process(dashStroke, pen);
+ stroker.process(dashStroke, pen, clip);
}
if (opaque) {
@@ -1192,6 +1303,19 @@ void QGL2PaintEngineEx::drawImage(const QRectF& dest, const QImage& image, const
d->drawTexture(dest, src, image.size(), !image.hasAlphaChannel());
}
+void QGL2PaintEngineEx::drawStaticTextItem(QStaticTextItem *textItem)
+{
+ Q_D(QGL2PaintEngineEx);
+
+ ensureActive();
+
+ QFontEngineGlyphCache::Type glyphType = textItem->fontEngine->glyphFormat >= 0
+ ? QFontEngineGlyphCache::Type(textItem->fontEngine->glyphFormat)
+ : d->glyphCacheType;
+
+ d->drawCachedGlyphs(glyphType, textItem, true);
+}
+
void QGL2PaintEngineEx::drawTexture(const QRectF &dest, GLuint textureId, const QSize &size, const QRectF &src)
{
Q_D(QGL2PaintEngineEx);
@@ -1245,33 +1369,72 @@ void QGL2PaintEngineEx::drawTextItem(const QPointF &p, const QTextItem &textItem
}
if (drawCached) {
- d->drawCachedGlyphs(p, glyphType, ti);
+ QVarLengthArray<QFixedPoint> positions;
+ QVarLengthArray<glyph_t> glyphs;
+ QTransform matrix = QTransform::fromTranslate(p.x(), p.y());
+ ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
+
+ {
+ QStaticTextItem staticTextItem;
+ staticTextItem.chars = ti.chars;
+ staticTextItem.fontEngine = ti.fontEngine;
+ staticTextItem.glyphs = glyphs.data();
+ staticTextItem.numChars = ti.num_chars;
+ staticTextItem.numGlyphs = glyphs.size();
+ staticTextItem.glyphPositions = positions.data();
+
+ d->drawCachedGlyphs(glyphType, &staticTextItem, false);
+ }
return;
}
QPaintEngineEx::drawTextItem(p, ti);
}
-void QGL2PaintEngineExPrivate::drawCachedGlyphs(const QPointF &p, QFontEngineGlyphCache::Type glyphType,
- const QTextItemInt &ti)
+namespace {
+
+ class QOpenGLStaticTextUserData: public QStaticTextUserData
+ {
+ public:
+ QOpenGLStaticTextUserData()
+ : QStaticTextUserData(OpenGLUserData)
+ {
+ }
+
+ ~QOpenGLStaticTextUserData()
+ {
+ }
+
+ QGL2PEXVertexArray vertexCoordinateArray;
+ QGL2PEXVertexArray textureCoordinateArray;
+ };
+
+}
+
+// #define QT_OPENGL_DRAWCACHEDGLYPHS_INDEX_ARRAY_VBO
+
+void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyphType,
+ QStaticTextItem *staticTextItem,
+ bool includeMatrixInCache)
{
Q_Q(QGL2PaintEngineEx);
- QVarLengthArray<QFixedPoint> positions;
- QVarLengthArray<glyph_t> glyphs;
- QTransform matrix = QTransform::fromTranslate(p.x(), p.y());
- ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
+ QOpenGL2PaintEngineState *s = q->state();
QGLTextureGlyphCache *cache =
- (QGLTextureGlyphCache *) ti.fontEngine->glyphCache(ctx, glyphType, QTransform());
-
+ (QGLTextureGlyphCache *) staticTextItem->fontEngine->glyphCache(ctx, glyphType,
+ includeMatrixInCache
+ ? s->matrix
+ : QTransform());
if (!cache || cache->cacheType() != glyphType) {
- cache = new QGLTextureGlyphCache(ctx, glyphType, QTransform());
- ti.fontEngine->setGlyphCache(ctx, cache);
+ cache = new QGLTextureGlyphCache(ctx, glyphType,
+ includeMatrixInCache ? s->matrix : QTransform());
+ staticTextItem->fontEngine->setGlyphCache(ctx, cache);
}
cache->setPaintEnginePrivate(this);
- cache->populate(ti, glyphs, positions);
+ cache->populate(staticTextItem->fontEngine, staticTextItem->numGlyphs, staticTextItem->glyphs,
+ staticTextItem->glyphPositions);
if (cache->width() == 0 || cache->height() == 0)
return;
@@ -1283,20 +1446,83 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(const QPointF &p, QFontEngineGly
GLfloat dx = 1.0 / cache->width();
GLfloat dy = 1.0 / cache->height();
- vertexCoordinateArray.clear();
- textureCoordinateArray.clear();
+ bool recreateVertexArrays = false;
+ if (staticTextItem->userDataNeedsUpdate)
+ recreateVertexArrays = true;
+ else if (staticTextItem->userData == 0)
+ recreateVertexArrays = true;
+ else if (staticTextItem->userData->type != QStaticTextUserData::OpenGLUserData)
+ recreateVertexArrays = true;
+
+ // Use global arrays by default
+ QGL2PEXVertexArray *vertexCoordinates = &vertexCoordinateArray;
+ QGL2PEXVertexArray *textureCoordinates = &textureCoordinateArray;
+
+ if (staticTextItem->useBackendOptimizations) {
+ QOpenGLStaticTextUserData *userData = 0;
+
+ if (staticTextItem->userData == 0
+ || staticTextItem->userData->type != QStaticTextUserData::OpenGLUserData) {
- for (int i=0; i<glyphs.size(); ++i) {
- const QTextureGlyphCache::Coord &c = cache->coords.value(glyphs[i]);
- int x = positions[i].x.toInt() + c.baseLineX - margin;
- int y = positions[i].y.toInt() - c.baseLineY - margin;
+ userData = new QOpenGLStaticTextUserData();
+ staticTextItem->setUserData(userData);
- vertexCoordinateArray.addRect(QRectF(x, y, c.w, c.h));
- textureCoordinateArray.addRect(QRectF(c.x*dx, c.y*dy, c.w * dx, c.h * dy));
+ } else {
+ userData = static_cast<QOpenGLStaticTextUserData*>(staticTextItem->userData);
+ }
+
+ // Use cache if backend optimizations is turned on
+ vertexCoordinates = &userData->vertexCoordinateArray;
+ textureCoordinates = &userData->textureCoordinateArray;
}
- setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, (GLfloat*)vertexCoordinateArray.data());
- setVertexAttributePointer(QT_TEXTURE_COORDS_ATTR, (GLfloat*)textureCoordinateArray.data());
+
+ if (recreateVertexArrays) {
+ vertexCoordinates->clear();
+ textureCoordinates->clear();
+
+ for (int i=0; i<staticTextItem->numGlyphs; ++i) {
+ const QTextureGlyphCache::Coord &c = cache->coords.value(staticTextItem->glyphs[i]);
+ int x = staticTextItem->glyphPositions[i].x.toInt() + c.baseLineX - margin;
+ int y = staticTextItem->glyphPositions[i].y.toInt() - c.baseLineY - margin;
+
+ vertexCoordinates->addQuad(QRectF(x, y, c.w, c.h));
+ textureCoordinates->addQuad(QRectF(c.x*dx, c.y*dy, c.w * dx, c.h * dy));
+ }
+
+ staticTextItem->userDataNeedsUpdate = false;
+ }
+
+ if (elementIndices.size() < staticTextItem->numGlyphs*6) {
+ Q_ASSERT(elementIndices.size() % 6 == 0);
+ int j = elementIndices.size() / 6 * 4;
+ while (j < staticTextItem->numGlyphs*4) {
+ elementIndices.append(j + 0);
+ elementIndices.append(j + 0);
+ elementIndices.append(j + 1);
+ elementIndices.append(j + 2);
+ elementIndices.append(j + 3);
+ elementIndices.append(j + 3);
+
+ j += 4;
+ }
+
+#if defined(QT_OPENGL_DRAWCACHEDGLYPHS_INDEX_ARRAY_VBO)
+ if (elementIndicesVBOId == 0)
+ glGenBuffers(1, &elementIndicesVBOId);
+
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, elementIndicesVBOId);
+ glBufferData(GL_ELEMENT_ARRAY_BUFFER, elementIndices.size() * sizeof(GLushort),
+ elementIndices.constData(), GL_STATIC_DRAW);
+#endif
+ } else {
+#if defined(QT_OPENGL_DRAWCACHEDGLYPHS_INDEX_ARRAY_VBO)
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, elementIndicesVBOId);
+#endif
+ }
+
+ setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, (GLfloat*)vertexCoordinates->data());
+ setVertexAttributePointer(QT_TEXTURE_COORDS_ATTR, (GLfloat*)textureCoordinates->data());
if (addOffset) {
addOffset = false;
@@ -1310,6 +1536,13 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(const QPointF &p, QFontEngineGly
QBrush pensBrush = q->state()->pen.brush();
setBrush(pensBrush);
+ // When painting a QStaticTextItem, the glyph positions are already in device coordinates,
+ // therefore we temporarily set an identity matrix on the painter for the draw call to
+ // avoid transforming the positions twice.
+ QTransform old = s->matrix;
+ if (includeMatrixInCache)
+ s->matrix = QTransform();
+
if (glyphType == QFontEngineGlyphCache::Raster_RGBMask) {
// Subpixel antialiasing without gamma correction
@@ -1363,7 +1596,11 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(const QPointF &p, QFontEngineGly
updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, false);
shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::MaskTexture), QT_MASK_TEXTURE_UNIT);
- glDrawArrays(GL_TRIANGLES, 0, 6 * glyphs.size());
+#if defined(QT_OPENGL_DRAWCACHEDGLYPHS_INDEX_ARRAY_VBO)
+ glDrawElements(GL_TRIANGLE_STRIP, 6 * staticTextItem->numGlyphs, GL_UNSIGNED_SHORT, 0);
+#else
+ glDrawElements(GL_TRIANGLE_STRIP, 6 * staticTextItem->numGlyphs, GL_UNSIGNED_SHORT, elementIndices.data());
+#endif
shaderManager->setMaskType(QGLEngineShaderManager::SubPixelMaskPass2);
@@ -1389,28 +1626,43 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(const QPointF &p, QFontEngineGly
//### TODO: Gamma correction
glActiveTexture(GL_TEXTURE0 + QT_MASK_TEXTURE_UNIT);
- glBindTexture(GL_TEXTURE_2D, cache->texture());
+ if (lastMaskTextureUsed != cache->texture()) {
+ glBindTexture(GL_TEXTURE_2D, cache->texture());
+ lastMaskTextureUsed = cache->texture();
+ }
updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, false);
shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::MaskTexture), QT_MASK_TEXTURE_UNIT);
- glDrawArrays(GL_TRIANGLES, 0, 6 * glyphs.size());
+
+#if defined(QT_OPENGL_DRAWCACHEDGLYPHS_INDEX_ARRAY_VBO)
+ glDrawElements(GL_TRIANGLE_STRIP, 6 * staticTextItem->numGlyphs, GL_UNSIGNED_SHORT, 0);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
+#else
+ glDrawElements(GL_TRIANGLE_STRIP, 6 * staticTextItem->numGlyphs, GL_UNSIGNED_SHORT, elementIndices.data());
+#endif
+
+ if (includeMatrixInCache)
+ s->matrix = old;
}
-void QGL2PaintEngineEx::drawPixmaps(const QDrawPixmaps::Data *drawingData, int dataCount, const QPixmap &pixmap, QDrawPixmaps::DrawingHints hints)
+void QGL2PaintEngineEx::drawPixmapFragments(const QPainter::PixmapFragment *fragments, int fragmentCount, const QPixmap &pixmap,
+ QPainter::PixmapFragmentHints hints)
{
Q_D(QGL2PaintEngineEx);
// Use fallback for extended composition modes.
if (state()->composition_mode > QPainter::CompositionMode_Plus) {
- QPaintEngineEx::drawPixmaps(drawingData, dataCount, pixmap, hints);
+ QPaintEngineEx::drawPixmapFragments(fragments, fragmentCount, pixmap, hints);
return;
}
ensureActive();
- d->drawPixmaps(drawingData, dataCount, pixmap, hints);
+ d->drawPixmapFragments(fragments, fragmentCount, pixmap, hints);
}
-void QGL2PaintEngineExPrivate::drawPixmaps(const QDrawPixmaps::Data *drawingData, int dataCount, const QPixmap &pixmap, QDrawPixmaps::DrawingHints hints)
+void QGL2PaintEngineExPrivate::drawPixmapFragments(const QPainter::PixmapFragment *fragments,
+ int fragmentCount, const QPixmap &pixmap,
+ QPainter::PixmapFragmentHints hints)
{
GLfloat dx = 1.0f / pixmap.size().width();
GLfloat dy = 1.0f / pixmap.size().height();
@@ -1431,28 +1683,29 @@ void QGL2PaintEngineExPrivate::drawPixmaps(const QDrawPixmaps::Data *drawingData
bool allOpaque = true;
- for (int i = 0; i < dataCount; ++i) {
+ for (int i = 0; i < fragmentCount; ++i) {
qreal s = 0;
qreal c = 1;
- if (drawingData[i].rotation != 0) {
- s = qFastSin(drawingData[i].rotation * Q_PI / 180);
- c = qFastCos(drawingData[i].rotation * Q_PI / 180);
+ if (fragments[i].rotation != 0) {
+ s = qFastSin(fragments[i].rotation * Q_PI / 180);
+ c = qFastCos(fragments[i].rotation * Q_PI / 180);
}
- qreal right = 0.5 * drawingData[i].scaleX * drawingData[i].source.width();
- qreal bottom = 0.5 * drawingData[i].scaleY * drawingData[i].source.height();
+ qreal right = 0.5 * fragments[i].scaleX * fragments[i].width;
+ qreal bottom = 0.5 * fragments[i].scaleY * fragments[i].height;
QGLPoint bottomRight(right * c - bottom * s, right * s + bottom * c);
QGLPoint bottomLeft(-right * c - bottom * s, -right * s + bottom * c);
- vertexCoordinateArray.lineToArray(bottomRight.x + drawingData[i].point.x(), bottomRight.y + drawingData[i].point.y());
- vertexCoordinateArray.lineToArray(-bottomLeft.x + drawingData[i].point.x(), -bottomLeft.y + drawingData[i].point.y());
- vertexCoordinateArray.lineToArray(-bottomRight.x + drawingData[i].point.x(), -bottomRight.y + drawingData[i].point.y());
- vertexCoordinateArray.lineToArray(-bottomRight.x + drawingData[i].point.x(), -bottomRight.y + drawingData[i].point.y());
- vertexCoordinateArray.lineToArray(bottomLeft.x + drawingData[i].point.x(), bottomLeft.y + drawingData[i].point.y());
- vertexCoordinateArray.lineToArray(bottomRight.x + drawingData[i].point.x(), bottomRight.y + drawingData[i].point.y());
+ vertexCoordinateArray.lineToArray(bottomRight.x + fragments[i].x, bottomRight.y + fragments[i].y);
+ vertexCoordinateArray.lineToArray(-bottomLeft.x + fragments[i].x, -bottomLeft.y + fragments[i].y);
+ vertexCoordinateArray.lineToArray(-bottomRight.x + fragments[i].x, -bottomRight.y + fragments[i].y);
+ vertexCoordinateArray.lineToArray(-bottomRight.x + fragments[i].x, -bottomRight.y + fragments[i].y);
+ vertexCoordinateArray.lineToArray(bottomLeft.x + fragments[i].x, bottomLeft.y + fragments[i].y);
+ vertexCoordinateArray.lineToArray(bottomRight.x + fragments[i].x, bottomRight.y + fragments[i].y);
- QGLRect src(drawingData[i].source.left() * dx, drawingData[i].source.top() * dy,
- drawingData[i].source.right() * dx, drawingData[i].source.bottom() * dy);
+ QGLRect src(fragments[i].sourceLeft * dx, fragments[i].sourceTop * dy,
+ (fragments[i].sourceLeft + fragments[i].width) * dx,
+ (fragments[i].sourceTop + fragments[i].height) * dy);
textureCoordinateArray.lineToArray(src.right, src.bottom);
textureCoordinateArray.lineToArray(src.right, src.top);
@@ -1461,7 +1714,7 @@ void QGL2PaintEngineExPrivate::drawPixmaps(const QDrawPixmaps::Data *drawingData
textureCoordinateArray.lineToArray(src.left, src.bottom);
textureCoordinateArray.lineToArray(src.right, src.bottom);
- qreal opacity = drawingData[i].opacity * q->state()->opacity;
+ qreal opacity = fragments[i].opacity * q->state()->opacity;
opacityArray << opacity << opacity << opacity << opacity << opacity << opacity;
allOpaque &= (opacity >= 0.99f);
}
@@ -1474,21 +1727,22 @@ void QGL2PaintEngineExPrivate::drawPixmaps(const QDrawPixmaps::Data *drawingData
if (texture->options & QGLContext::InvertedYBindOption) {
// Flip texture y-coordinate.
QGLPoint *data = textureCoordinateArray.data();
- for (int i = 0; i < 6 * dataCount; ++i)
+ for (int i = 0; i < 6 * fragmentCount; ++i)
data[i].y = 1 - data[i].y;
}
transferMode(ImageArrayDrawingMode);
bool isBitmap = pixmap.isQBitmap();
- bool isOpaque = !isBitmap && (!pixmap.hasAlphaChannel() || (hints & QDrawPixmaps::OpaqueHint)) && allOpaque;
+ bool isOpaque = !isBitmap && (!pixmap.hasAlphaChannel() || (hints & QPainter::OpaqueHint)) && allOpaque;
updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE,
q->state()->renderHints & QPainter::SmoothPixmapTransform, texture->id);
// Setup for texture drawing
currentBrush = noBrush;
- shaderManager->setSrcPixelType(isBitmap ? QGLEngineShaderManager::PatternSrc : QGLEngineShaderManager::ImageSrc);
+ shaderManager->setSrcPixelType(isBitmap ? QGLEngineShaderManager::PatternSrc
+ : QGLEngineShaderManager::ImageSrc);
if (prepareForDraw(isOpaque))
shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::ImageTexture), QT_IMAGE_TEXTURE_UNIT);
@@ -1497,7 +1751,7 @@ void QGL2PaintEngineExPrivate::drawPixmaps(const QDrawPixmaps::Data *drawingData
shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::PatternColor), col);
}
- glDrawArrays(GL_TRIANGLES, 0, 6 * dataCount);
+ glDrawArrays(GL_TRIANGLES, 0, 6 * fragmentCount);
}
bool QGL2PaintEngineEx::begin(QPaintDevice *pdev)
@@ -1532,6 +1786,27 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev)
d->dirtyStencilRegion = QRect(0, 0, d->width, d->height);
d->stencilClean = true;
+ switch (pdev->devType()) {
+ case QInternal::Pixmap:
+ d->deviceHasAlpha = static_cast<QPixmap *>(pdev)->hasAlphaChannel();
+ break;
+ case QInternal::FramebufferObject:
+ {
+ GLenum f = static_cast<QGLFramebufferObject *>(pdev)->format().internalTextureFormat();
+#ifndef QT_OPENGL_ES
+ d->deviceHasAlpha = (f != GL_RGB && f != GL_RGB5 && f != GL_RGB8);
+#else
+ d->deviceHasAlpha = (f == GL_RGBA);
+#endif
+ }
+ break;
+ default:
+ // widget, pbuffer
+ d->deviceHasAlpha = d->ctx->d_func()->reqFormat.alpha();
+ break;
+ }
+
+
// Calling begin paint should make the correct context current. So, any
// code which calls into GL or otherwise needs a current context *must*
// go after beginPaint:
@@ -1604,6 +1879,10 @@ bool QGL2PaintEngineEx::end()
glDeleteBuffers(d->unusedVBOSToClean.size(), d->unusedVBOSToClean.constData());
d->unusedVBOSToClean.clear();
}
+ if (!d->unusedIBOSToClean.isEmpty()) {
+ glDeleteBuffers(d->unusedIBOSToClean.size(), d->unusedIBOSToClean.constData());
+ d->unusedIBOSToClean.clear();
+ }
#endif
return false;
@@ -1625,6 +1904,7 @@ void QGL2PaintEngineEx::ensureActive()
d->transferMode(BrushDrawingMode);
glViewport(0, 0, d->width, d->height);
d->needsSync = false;
+ d->lastMaskTextureUsed = 0;
d->shaderManager->setDirty();
d->ctx->d_func()->syncGlState();
for (int i = 0; i < 3; ++i)
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index 8fa0eff42c..ed8fbbc05e 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -125,7 +125,8 @@ public:
virtual void drawTexture(const QRectF &r, GLuint textureId, const QSize &size, const QRectF &sr);
virtual void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr);
- virtual void drawPixmaps(const QDrawPixmaps::Data *drawingData, int dataCount, const QPixmap &pixmap, QDrawPixmaps::DrawingHints hints);
+ virtual void drawPixmapFragments(const QPainter::PixmapFragment *fragments, int fragmentCount, const QPixmap &pixmap,
+ QPainter::PixmapFragmentHints hints);
virtual void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr,
Qt::ImageConversionFlags flags = Qt::AutoColor);
virtual void drawTextItem(const QPointF &p, const QTextItem &textItem);
@@ -133,6 +134,7 @@ public:
virtual void stroke(const QVectorPath &path, const QPen &pen);
virtual void clip(const QVectorPath &path, Qt::ClipOperation op);
+ virtual void drawStaticTextItem(QStaticTextItem *textItem);
Type type() const { return OpenGL2; }
@@ -173,9 +175,11 @@ public:
width(0), height(0),
ctx(0),
useSystemClip(true),
+ elementIndicesVBOId(0),
snapToPixelGrid(false),
addOffset(false),
- inverseScale(1)
+ inverseScale(1),
+ lastMaskTextureUsed(0)
{ }
~QGL2PaintEngineExPrivate();
@@ -193,8 +197,10 @@ public:
void fill(const QVectorPath &path);
void stroke(const QVectorPath &path, const QPen &pen);
void drawTexture(const QGLRect& dest, const QGLRect& src, const QSize &textureSize, bool opaque, bool pattern = false);
- void drawPixmaps(const QDrawPixmaps::Data *drawingData, int dataCount, const QPixmap &pixmap, QDrawPixmaps::DrawingHints hints);
- void drawCachedGlyphs(const QPointF &p, QFontEngineGlyphCache::Type glyphType, const QTextItemInt &ti);
+ void drawPixmapFragments(const QPainter::PixmapFragment *fragments, int fragmentCount, const QPixmap &pixmap,
+ QPainter::PixmapFragmentHints hints);
+ void drawCachedGlyphs(QFontEngineGlyphCache::Type glyphType, QStaticTextItem *staticTextItem,
+ bool includeMatrixInCache);
// Calls glVertexAttributePointer if the pointer has changed
inline void setVertexAttributePointer(unsigned int arrayIndex, const GLfloat *pointer);
@@ -265,6 +271,8 @@ public:
QGL2PEXVertexArray vertexCoordinateArray;
QGL2PEXVertexArray textureCoordinateArray;
+ QVector<GLushort> elementIndices;
+ GLuint elementIndicesVBOId;
QDataBuffer<GLfloat> opacityArray;
GLfloat staticVertexCoordinateArray[8];
GLfloat staticTextureCoordinateArray[8];
@@ -275,9 +283,11 @@ public:
GLfloat inverseScale;
GLuint lastTextureUsed;
+ GLuint lastMaskTextureUsed;
bool needsSync;
bool multisamplingAlwaysEnabled;
+ bool deviceHasAlpha;
GLfloat depthRange[2];
@@ -293,6 +303,7 @@ public:
QSet<QVectorPath::CacheEntry *> pathCaches;
QVector<GLuint> unusedVBOSToClean;
+ QVector<GLuint> unusedIBOSToClean;
const GLfloat *vertexAttribPointers[3];
};
diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp
index 5229d3fb99..d952988cfa 100644
--- a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp
+++ b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp
@@ -73,7 +73,7 @@ void QTriangulatingStroker::endCapOrJoinClosed(const qreal *start, const qreal *
}
-void QTriangulatingStroker::process(const QVectorPath &path, const QPen &pen)
+void QTriangulatingStroker::process(const QVectorPath &path, const QPen &pen, const QRectF &)
{
const qreal *pts = path.points();
const QPainterPath::ElementType *types = path.elements();
@@ -480,7 +480,7 @@ QDashedStrokeProcessor::QDashedStrokeProcessor()
m_dash_stroker.setCubicToHook(qdashprocessor_cubicTo);
}
-void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen)
+void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen, const QRectF &clip)
{
const qreal *pts = path.points();
@@ -497,6 +497,7 @@ void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen)
m_dash_stroker.setDashPattern(pen.dashPattern());
m_dash_stroker.setStrokeWidth(pen.isCosmetic() ? width * m_inv_scale : width);
m_dash_stroker.setMiterLimit(pen.miterLimit());
+ m_dash_stroker.setClipRect(clip);
qreal curvyness = sqrt(width) * m_inv_scale / 8;
if (count < 2)
diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h b/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h
index 06b8a4479b..956d7cc839 100644
--- a/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h
+++ b/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
class QTriangulatingStroker
{
public:
- void process(const QVectorPath &path, const QPen &pen);
+ void process(const QVectorPath &path, const QPen &pen, const QRectF &clip);
inline int vertexCount() const { return m_vertices.size(); }
inline const float *vertices() const { return m_vertices.data(); }
@@ -96,7 +96,7 @@ class QDashedStrokeProcessor
public:
QDashedStrokeProcessor();
- void process(const QVectorPath &path, const QPen &pen);
+ void process(const QVectorPath &path, const QPen &pen, const QRectF &clip);
inline void addElement(QPainterPath::ElementType type, qreal x, qreal y) {
m_points.add(x);
diff --git a/src/opengl/gl2paintengineex/qtriangulator.cpp b/src/opengl/gl2paintengineex/qtriangulator.cpp
new file mode 100644
index 0000000000..ce917ff582
--- /dev/null
+++ b/src/opengl/gl2paintengineex/qtriangulator.cpp
@@ -0,0 +1,2983 @@
+/****************************************************************************
+**
+** 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 QtOpenGL module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qtriangulator_p.h"
+
+#include <QtGui/qdialog.h>
+#include <QtGui/qevent.h>
+#include <QtGui/qpainter.h>
+#include <QtGui/qpainterpath.h>
+#include <QtGui/private/qbezier_p.h>
+#include <QtGui/private/qdatabuffer_p.h>
+#include <QtCore/qbitarray.h>
+#include <QtCore/qvarlengtharray.h>
+#include <QtCore/qqueue.h>
+#include <QtCore/qglobal.h>
+#include <QtCore/qpoint.h>
+#include <QtCore/qalgorithms.h>
+#include <QtDebug>
+
+#include <math.h>
+
+QT_BEGIN_NAMESPACE
+
+//#define Q_TRIANGULATOR_DEBUG
+
+#define Q_FIXED_POINT_SCALE 32
+
+// Quick sort.
+template <class T, class LessThan>
+static void sort(T *array, int count, LessThan lessThan)
+{
+ // If the number of elements fall below some threshold, use insertion sort.
+ const int INSERTION_SORT_LIMIT = 7; // About 7 is fastest on my computer...
+ if (count <= INSERTION_SORT_LIMIT) {
+ for (int i = 1; i < count; ++i) {
+ T temp = array[i];
+ int j = i;
+ while (j > 0 && lessThan(temp, array[j - 1])) {
+ array[j] = array[j - 1];
+ --j;
+ }
+ array[j] = temp;
+ }
+ return;
+ }
+
+ int high = count - 1;
+ int low = 0;
+ int mid = high / 2;
+ if (lessThan(array[mid], array[low]))
+ qSwap(array[mid], array[low]);
+ if (lessThan(array[high], array[mid]))
+ qSwap(array[high], array[mid]);
+ if (lessThan(array[mid], array[low]))
+ qSwap(array[mid], array[low]);
+
+ --high;
+ ++low;
+ qSwap(array[mid], array[high]);
+ int pivot = high;
+ --high;
+
+ while (low <= high) {
+ while (!lessThan(array[pivot], array[low])) {
+ ++low;
+ if (low > high)
+ goto sort_loop_end;
+ }
+ while (!lessThan(array[high], array[pivot])) {
+ --high;
+ if (low > high)
+ goto sort_loop_end;
+ }
+ qSwap(array[low], array[high]);
+ ++low;
+ --high;
+ }
+sort_loop_end:
+ if (low != pivot)
+ qSwap(array[pivot], array[low]);
+ sort(array, low, lessThan);
+ sort(array + low + 1, count - low - 1, lessThan);
+}
+
+// Quick sort.
+template <class T>
+static void sort(T *array, int count)
+{
+ // If the number of elements fall below some threshold, use insertion sort.
+ const int INSERTION_SORT_LIMIT = 25; // About 25 is fastest on my computer...
+ if (count <= INSERTION_SORT_LIMIT) {
+ for (int i = 1; i < count; ++i) {
+ T temp = array[i];
+ int j = i;
+ while (j > 0 && (temp < array[j - 1])) {
+ array[j] = array[j - 1];
+ --j;
+ }
+ array[j] = temp;
+ }
+ return;
+ }
+
+ int high = count - 1;
+ int low = 0;
+ int mid = high / 2;
+ if ((array[mid] < array[low]))
+ qSwap(array[mid], array[low]);
+ if ((array[high] < array[mid]))
+ qSwap(array[high], array[mid]);
+ if ((array[mid] < array[low]))
+ qSwap(array[mid], array[low]);
+
+ --high;
+ ++low;
+ qSwap(array[mid], array[high]);
+ int pivot = high;
+ --high;
+
+ while (low <= high) {
+ while (!(array[pivot] < array[low])) {
+ ++low;
+ if (low > high)
+ goto sort_loop_end;
+ }
+ while (!(array[high] < array[pivot])) {
+ --high;
+ if (low > high)
+ goto sort_loop_end;
+ }
+ qSwap(array[low], array[high]);
+ ++low;
+ --high;
+ }
+sort_loop_end:
+ if (low != pivot)
+ qSwap(array[pivot], array[low]);
+ sort(array, low);
+ sort(array + low + 1, count - low - 1);
+}
+
+//============================================================================//
+// QFraction //
+//============================================================================//
+
+// Fraction must be in the range [0, 1)
+struct QFraction
+{
+ // Comparison operators must not be called on invalid fractions.
+ inline bool operator < (const QFraction &other) const;
+ inline bool operator == (const QFraction &other) const;
+ inline bool operator != (const QFraction &other) const {return !(*this == other);}
+ inline bool operator > (const QFraction &other) const {return other < *this;}
+ inline bool operator >= (const QFraction &other) const {return !(*this < other);}
+ inline bool operator <= (const QFraction &other) const {return !(*this > other);}
+
+ inline bool isValid() const {return denominator != 0;}
+
+ // numerator and denominator must not have common denominators.
+ quint64 numerator, denominator;
+};
+
+static inline quint64 gcd(quint64 x, quint64 y)
+{
+ while (y != 0) {
+ quint64 z = y;
+ y = x % y;
+ x = z;
+ }
+ return x;
+}
+
+static inline int compare(quint64 a, quint64 b)
+{
+ return (a > b) - (a < b);
+}
+
+// Compare a/b with c/d.
+// Return negative if less, 0 if equal, positive if greater.
+// a < b, c < d
+static int qCompareFractions(quint64 a, quint64 b, quint64 c, quint64 d)
+{
+ const quint64 LIMIT = Q_UINT64_C(0x100000000);
+ for (;;) {
+ // If the products 'ad' and 'bc' fit into 64 bits, they can be directly compared.
+ if (b < LIMIT && d < LIMIT)
+ return compare(a * d, b * c);
+
+ if (a == 0 || c == 0)
+ return compare(a, c);
+
+ // a/b < c/d <=> d/c < b/a
+ quint64 b_div_a = b / a;
+ quint64 d_div_c = d / c;
+ if (b_div_a != d_div_c)
+ return compare(d_div_c, b_div_a);
+
+ // floor(d/c) == floor(b/a)
+ // frac(d/c) < frac(b/a) ?
+ // frac(x/y) = (x%y)/y
+ d -= d_div_c * c; //d %= c;
+ b -= b_div_a * a; //b %= a;
+ qSwap(a, d);
+ qSwap(b, c);
+ }
+}
+
+// Fraction must be in the range [0, 1)
+// Assume input is valid.
+static QFraction qFraction(quint64 n, quint64 d) {
+ QFraction result;
+ if (n == 0) {
+ result.numerator = 0;
+ result.denominator = 1;
+ } else {
+ quint64 g = gcd(n, d);
+ result.numerator = n / g;
+ result.denominator = d / g;
+ }
+ return result;
+}
+
+inline bool QFraction::operator < (const QFraction &other) const
+{
+ return qCompareFractions(numerator, denominator, other.numerator, other.denominator) < 0;
+}
+
+inline bool QFraction::operator == (const QFraction &other) const
+{
+ return numerator == other.numerator && denominator == other.denominator;
+}
+
+//============================================================================//
+// QPodPoint //
+//============================================================================//
+
+struct QPodPoint
+{
+ inline bool operator < (const QPodPoint &other) const
+ {
+ if (y != other.y)
+ return y < other.y;
+ return x < other.x;
+ }
+
+ inline bool operator > (const QPodPoint &other) const {return other < *this;}
+ inline bool operator <= (const QPodPoint &other) const {return !(*this > other);}
+ inline bool operator >= (const QPodPoint &other) const {return !(*this < other);}
+ inline bool operator == (const QPodPoint &other) const {return x == other.x && y == other.y;}
+ inline bool operator != (const QPodPoint &other) const {return x != other.x || y != other.y;}
+
+ inline QPodPoint &operator += (const QPodPoint &other) {x += other.x; y += other.y; return *this;}
+ inline QPodPoint &operator -= (const QPodPoint &other) {x -= other.x; y -= other.y; return *this;}
+ inline QPodPoint operator + (const QPodPoint &other) const {QPodPoint result = {x + other.x, y + other.y}; return result;}
+ inline QPodPoint operator - (const QPodPoint &other) const {QPodPoint result = {x - other.x, y - other.y}; return result;}
+
+ int x;
+ int y;
+};
+
+static inline qint64 qCross(const QPodPoint &u, const QPodPoint &v)
+{
+ return qint64(u.x) * qint64(v.y) - qint64(u.y) * qint64(v.x);
+}
+
+static inline qint64 qDot(const QPodPoint &u, const QPodPoint &v)
+{
+ return qint64(u.x) * qint64(v.x) + qint64(u.y) * qint64(v.y);
+}
+
+// Return positive value if 'p' is to the right of the line 'v1'->'v2', negative if left of the
+// line and zero if exactly on the line.
+// The returned value is the z-component of the qCross product between 'v2-v1' and 'p-v1',
+// which is twice the signed area of the triangle 'p'->'v1'->'v2' (positive for CW order).
+static inline qint64 qPointDistanceFromLine(const QPodPoint &p, const QPodPoint &v1, const QPodPoint &v2)
+{
+ return qCross(v2 - v1, p - v1);
+}
+
+static inline bool qPointIsLeftOfLine(const QPodPoint &p, const QPodPoint &v1, const QPodPoint &v2)
+{
+ return qPointDistanceFromLine(p, v1, v2) < 0;
+}
+
+// Return:
+// -1 if u < v
+// 0 if u == v
+// 1 if u > v
+static int comparePoints(const QPodPoint &u, const QPodPoint &v)
+{
+ if (u.y < v.y)
+ return -1;
+ if (u.y > v.y)
+ return 1;
+ if (u.x < v.x)
+ return -1;
+ if (u.x > v.x)
+ return 1;
+ return 0;
+}
+
+//============================================================================//
+// QIntersectionPoint //
+//============================================================================//
+
+struct QIntersectionPoint
+{
+ inline bool isValid() const {return xOffset.isValid() && yOffset.isValid();}
+ QPodPoint round() const;
+ inline bool isAccurate() const {return xOffset.numerator == 0 && yOffset.numerator == 0;}
+ bool operator < (const QIntersectionPoint &other) const;
+ bool operator == (const QIntersectionPoint &other) const;
+ inline bool operator != (const QIntersectionPoint &other) const {return !(*this == other);}
+ inline bool operator > (const QIntersectionPoint &other) const {return other < *this;}
+ inline bool operator >= (const QIntersectionPoint &other) const {return !(*this < other);}
+ inline bool operator <= (const QIntersectionPoint &other) const {return !(*this > other);}
+ bool isOnLine(const QPodPoint &u, const QPodPoint &v) const;
+
+ QPodPoint upperLeft;
+ QFraction xOffset;
+ QFraction yOffset;
+};
+
+static inline QIntersectionPoint qIntersectionPoint(const QPodPoint &point)
+{
+ // upperLeft = point, xOffset = 0/1, yOffset = 0/1.
+ QIntersectionPoint p = {{point.x, point.y}, {0, 1}, {0, 1}};
+ return p;
+}
+
+static inline QIntersectionPoint qIntersectionPoint(int x, int y)
+{
+ // upperLeft = (x, y), xOffset = 0/1, yOffset = 0/1.
+ QIntersectionPoint p = {{x, y}, {0, 1}, {0, 1}};
+ return p;
+}
+
+static QIntersectionPoint qIntersectionPoint(const QPodPoint &u1, const QPodPoint &u2, const QPodPoint &v1, const QPodPoint &v2)
+{
+ QIntersectionPoint result = {{0, 0}, {0, 0}, {0, 0}};
+
+ QPodPoint u = u2 - u1;
+ QPodPoint v = v2 - v1;
+ qint64 d1 = qCross(u, v1 - u1);
+ qint64 d2 = qCross(u, v2 - u1);
+ qint64 det = d2 - d1;
+ qint64 d3 = qCross(v, u1 - v1);
+ qint64 d4 = d3 - det; //qCross(v, u2 - v1);
+
+ // Check that the math is correct.
+ Q_ASSERT(d4 == qCross(v, u2 - v1));
+
+ // The intersection point can be expressed as:
+ // v1 - v * d1/det
+ // v2 - v * d2/det
+ // u1 + u * d3/det
+ // u2 + u * d4/det
+
+ // I'm only interested in lines that are crossing, so ignore parallel lines even if they overlap.
+ if (det == 0)
+ return result;
+
+ if (det < 0) {
+ det = -det;
+ d1 = -d1;
+ d2 = -d2;
+ d3 = -d3;
+ d4 = -d4;
+ }
+
+ // I'm only interested in lines intersecting at their interior, not at their end points.
+ // The lines intersect at their interior if and only if 'd1 < 0', 'd2 > 0', 'd3 < 0' and 'd4 > 0'.
+ if (d1 >= 0 || d2 <= 0 || d3 <= 0 || d4 >= 0)
+ return result;
+
+ // Calculate the intersection point as follows:
+ // v1 - v * d1/det | v1 <= v2 (component-wise)
+ // v2 - v * d2/det | v2 < v1 (component-wise)
+
+ // Assuming 21 bits per vector component.
+ // TODO: Make code path for 31 bits per vector component.
+ if (v.x >= 0) {
+ result.upperLeft.x = v1.x + (-v.x * d1) / det;
+ result.xOffset = qFraction(quint64(-v.x * d1) % quint64(det), quint64(det));
+ } else {
+ result.upperLeft.x = v2.x + (-v.x * d2) / det;
+ result.xOffset = qFraction(quint64(-v.x * d2) % quint64(det), quint64(det));
+ }
+
+ if (v.y >= 0) {
+ result.upperLeft.y = v1.y + (-v.y * d1) / det;
+ result.yOffset = qFraction(quint64(-v.y * d1) % quint64(det), quint64(det));
+ } else {
+ result.upperLeft.y = v2.y + (-v.y * d2) / det;
+ result.yOffset = qFraction(quint64(-v.y * d2) % quint64(det), quint64(det));
+ }
+
+ Q_ASSERT(result.xOffset.isValid());
+ Q_ASSERT(result.yOffset.isValid());
+ return result;
+}
+
+QPodPoint QIntersectionPoint::round() const
+{
+ QPodPoint result = upperLeft;
+ if (2 * xOffset.numerator >= xOffset.denominator)
+ ++result.x;
+ if (2 * yOffset.numerator >= yOffset.denominator)
+ ++result.y;
+ return result;
+}
+
+bool QIntersectionPoint::operator < (const QIntersectionPoint &other) const
+{
+ if (upperLeft.y != other.upperLeft.y)
+ return upperLeft.y < other.upperLeft.y;
+ if (yOffset != other.yOffset)
+ return yOffset < other.yOffset;
+ if (upperLeft.x != other.upperLeft.x)
+ return upperLeft.x < other.upperLeft.x;
+ return xOffset < other.xOffset;
+}
+
+bool QIntersectionPoint::operator == (const QIntersectionPoint &other) const
+{
+ return upperLeft == other.upperLeft && xOffset == other.xOffset && yOffset == other.yOffset;
+}
+
+// Returns true if this point is on the infinite line passing through 'u' and 'v'.
+bool QIntersectionPoint::isOnLine(const QPodPoint &u, const QPodPoint &v) const
+{
+ // TODO: Make code path for coordinates with more than 21 bits.
+ const QPodPoint p = upperLeft - u;
+ const QPodPoint q = v - u;
+ bool isHorizontal = p.y == 0 && yOffset.numerator == 0;
+ bool isVertical = p.x == 0 && xOffset.numerator == 0;
+ if (isHorizontal && isVertical)
+ return true;
+ if (isHorizontal)
+ return q.y == 0;
+ if (q.y == 0)
+ return false;
+ if (isVertical)
+ return q.x == 0;
+ if (q.x == 0)
+ return false;
+
+ // At this point, 'p+offset' and 'q' cannot lie on the x or y axis.
+
+ if (((q.x < 0) == (q.y < 0)) != ((p.x < 0) == (p.y < 0)))
+ return false; // 'p + offset' and 'q' pass through different quadrants.
+
+ // Move all coordinates into the first quadrant.
+ quint64 nx, ny;
+ if (p.x < 0)
+ nx = quint64(-p.x) * xOffset.denominator - xOffset.numerator;
+ else
+ nx = quint64(p.x) * xOffset.denominator + xOffset.numerator;
+ if (p.y < 0)
+ ny = quint64(-p.y) * yOffset.denominator - yOffset.numerator;
+ else
+ ny = quint64(p.y) * yOffset.denominator + yOffset.numerator;
+
+ return qFraction(quint64(qAbs(q.x)) * xOffset.denominator, quint64(qAbs(q.y)) * yOffset.denominator) == qFraction(nx, ny);
+}
+
+//============================================================================//
+// QMaxHeap //
+//============================================================================//
+
+template <class T>
+class QMaxHeap
+{
+public:
+ inline int size() const {return m_data.size();}
+ inline bool empty() const {return m_data.isEmpty();}
+ inline bool isEmpty() const {return m_data.isEmpty();}
+ void push(const T &x);
+ T pop();
+ inline const T &top() const {return m_data.first();}
+private:
+ static inline int parent(int i) {return (i - 1) / 2;}
+ static inline int left(int i) {return 2 * i + 1;}
+ static inline int right(int i) {return 2 * i + 2;}
+
+ QDataBuffer<T> m_data;
+};
+
+template <class T>
+void QMaxHeap<T>::push(const T &x)
+{
+ int current = m_data.size();
+ int parent = QMaxHeap::parent(current);
+ m_data.add(x);
+ while (current != 0 && m_data.at(parent) < x) {
+ m_data.at(current) = m_data.at(parent);
+ current = parent;
+ parent = QMaxHeap::parent(current);
+ }
+ m_data.at(current) = x;
+}
+
+template <class T>
+T QMaxHeap<T>::pop()
+{
+ T result = m_data.first();
+ T back = m_data.last();
+ m_data.pop_back();
+ if (!m_data.isEmpty()) {
+ int current = 0;
+ for (;;) {
+ int left = QMaxHeap::left(current);
+ int right = QMaxHeap::right(current);
+ if (left >= m_data.size())
+ break;
+ int greater = left;
+ if (right < m_data.size() && m_data.at(left) < m_data.at(right))
+ greater = right;
+ if (m_data.at(greater) < back)
+ break;
+ m_data.at(current) = m_data.at(greater);
+ current = greater;
+ }
+ m_data.at(current) = back;
+ }
+ return result;
+}
+
+//============================================================================//
+// QRBTree //
+//============================================================================//
+
+template <class T>
+struct QRBTree
+{
+ struct Node
+ {
+ inline Node() : parent(0), left(0), right(0), red(true) { }
+ inline ~Node() {if (left) delete left; if (right) delete right;}
+ T data;
+ Node *parent;
+ Node *left;
+ Node *right;
+ bool red;
+ };
+
+ inline QRBTree() : root(0), freeList(0) { }
+ inline ~QRBTree();
+
+ inline void clear();
+
+ void attachBefore(Node *parent, Node *child);
+ void attachAfter(Node *parent, Node *child);
+
+ inline Node *front(Node *node) const;
+ inline Node *back(Node *node) const;
+ Node *next(Node *node) const;
+ Node *previous(Node *node) const;
+
+ inline void deleteNode(Node *&node);
+ inline Node *newNode();
+
+ // Return 1 if 'left' comes after 'right', 0 if equal, and -1 otherwise.
+ // 'left' and 'right' cannot be null.
+ int order(Node *left, Node *right);
+ inline bool verify() const;
+
+private:
+ void rotateLeft(Node *node);
+ void rotateRight(Node *node);
+ void update(Node *node);
+
+ inline void attachLeft(Node *parent, Node *child);
+ inline void attachRight(Node *parent, Node *child);
+
+ int blackDepth(Node *top) const;
+ bool checkRedBlackProperty(Node *top) const;
+
+ void swapNodes(Node *n1, Node *n2);
+ void detach(Node *node);
+
+ // 'node' must be black. rebalance will reduce the depth of black nodes by one in the sibling tree.
+ void rebalance(Node *node);
+
+public:
+ Node *root;
+private:
+ Node *freeList;
+};
+
+template <class T>
+inline QRBTree<T>::~QRBTree()
+{
+ clear();
+ while (freeList) {
+ // Avoid recursively calling the destructor, as this list may become large.
+ Node *next = freeList->right;
+ freeList->right = 0;
+ delete freeList;
+ freeList = next;
+ }
+}
+
+template <class T>
+inline void QRBTree<T>::clear()
+{
+ if (root)
+ delete root;
+ root = 0;
+}
+
+template <class T>
+void QRBTree<T>::rotateLeft(Node *node)
+{
+ // | | //
+ // N B //
+ // / \ / \ //
+ // A B ---> N D //
+ // / \ / \ //
+ // C D A C //
+
+ Node *&ref = (node->parent ? (node == node->parent->left ? node->parent->left : node->parent->right) : root);
+ ref = node->right;
+ node->right->parent = node->parent;
+
+ // : //
+ // N //
+ // / :| //
+ // A B //
+ // / \ //
+ // C D //
+
+ node->right = ref->left;
+ if (ref->left)
+ ref->left->parent = node;
+
+ // : | //
+ // N B //
+ // / \ : \ //
+ // A C D //
+
+ ref->left = node;
+ node->parent = ref;
+
+ // | //
+ // B //
+ // / \ //
+ // N D //
+ // / \ //
+ // A C //
+}
+
+template <class T>
+void QRBTree<T>::rotateRight(Node *node)
+{
+ // | | //
+ // N A //
+ // / \ / \ //
+ // A B ---> C N //
+ // / \ / \ //
+ // C D D B //
+
+ Node *&ref = (node->parent ? (node == node->parent->left ? node->parent->left : node->parent->right) : root);
+ ref = node->left;
+ node->left->parent = node->parent;
+
+ node->left = ref->right;
+ if (ref->right)
+ ref->right->parent = node;
+
+ ref->right = node;
+ node->parent = ref;
+}
+
+template <class T>
+void QRBTree<T>::update(Node *node) // call this after inserting a node
+{
+ for (;;) {
+ Node *parent = node->parent;
+
+ // if the node is the root, color it black
+ if (!parent) {
+ node->red = false;
+ return;
+ }
+
+ // if the parent is black, the node can be left red
+ if (!parent->red)
+ return;
+
+ // at this point, the parent is red and cannot be the root
+ Node *grandpa = parent->parent;
+ Q_ASSERT(grandpa);
+
+ Node *uncle = (parent == grandpa->left ? grandpa->right : grandpa->left);
+ if (uncle && uncle->red) {
+ // grandpa's black, parent and uncle are red.
+ // let parent and uncle be black, grandpa red and recursively update grandpa.
+ Q_ASSERT(!grandpa->red);
+ parent->red = false;
+ uncle->red = false;
+ grandpa->red = true;
+ node = grandpa;
+ continue;
+ }
+
+ // at this point, uncle is black
+ if (node == parent->right && parent == grandpa->left)
+ rotateLeft(node = parent);
+ else if (node == parent->left && parent == grandpa->right)
+ rotateRight(node = parent);
+ parent = node->parent;
+
+ if (parent == grandpa->left) {
+ rotateRight(grandpa);
+ parent->red = false;
+ grandpa->red = true;
+ } else {
+ rotateLeft(grandpa);
+ parent->red = false;
+ grandpa->red = true;
+ }
+ return;
+ }
+}
+
+template <class T>
+inline void QRBTree<T>::attachLeft(Node *parent, Node *child)
+{
+ Q_ASSERT(!parent->left);
+ parent->left = child;
+ child->parent = parent;
+ update(child);
+}
+
+template <class T>
+inline void QRBTree<T>::attachRight(Node *parent, Node *child)
+{
+ Q_ASSERT(!parent->right);
+ parent->right = child;
+ child->parent = parent;
+ update(child);
+}
+
+template <class T>
+void QRBTree<T>::attachBefore(Node *parent, Node *child)
+{
+ if (!root)
+ update(root = child);
+ else if (!parent)
+ attachRight(back(root), child);
+ else if (parent->left)
+ attachRight(back(parent->left), child);
+ else
+ attachLeft(parent, child);
+}
+
+template <class T>
+void QRBTree<T>::attachAfter(Node *parent, Node *child)
+{
+ if (!root)
+ update(root = child);
+ else if (!parent)
+ attachLeft(front(root), child);
+ else if (parent->right)
+ attachLeft(front(parent->right), child);
+ else
+ attachRight(parent, child);
+}
+
+template <class T>
+void QRBTree<T>::swapNodes(Node *n1, Node *n2)
+{
+ // Since iterators must not be invalidated, it is not sufficient to only swap the data.
+ if (n1->parent == n2) {
+ n1->parent = n2->parent;
+ n2->parent = n1;
+ } else if (n2->parent == n1) {
+ n2->parent = n1->parent;
+ n1->parent = n2;
+ } else {
+ qSwap(n1->parent, n2->parent);
+ }
+
+ qSwap(n1->left, n2->left);
+ qSwap(n1->right, n2->right);
+ qSwap(n1->red, n2->red);
+
+ if (n1->parent) {
+ if (n1->parent->left == n2)
+ n1->parent->left = n1;
+ else
+ n1->parent->right = n1;
+ } else {
+ root = n1;
+ }
+
+ if (n2->parent) {
+ if (n2->parent->left == n1)
+ n2->parent->left = n2;
+ else
+ n2->parent->right = n2;
+ } else {
+ root = n2;
+ }
+
+ if (n1->left)
+ n1->left->parent = n1;
+ if (n1->right)
+ n1->right->parent = n1;
+
+ if (n2->left)
+ n2->left->parent = n2;
+ if (n2->right)
+ n2->right->parent = n2;
+}
+
+template <class T>
+void QRBTree<T>::detach(Node *node) // call this before removing a node.
+{
+ if (node->right)
+ swapNodes(node, front(node->right));
+
+ Node *child = (node->left ? node->left : node->right);
+
+ if (!node->red) {
+ if (child && child->red)
+ child->red = false;
+ else
+ rebalance(node);
+ }
+
+ Node *&ref = (node->parent ? (node == node->parent->left ? node->parent->left : node->parent->right) : root);
+ ref = child;
+ if (child)
+ child->parent = node->parent;
+ node->left = node->right = node->parent = 0;
+}
+
+// 'node' must be black. rebalance will reduce the depth of black nodes by one in the sibling tree.
+template <class T>
+void QRBTree<T>::rebalance(Node *node)
+{
+ Q_ASSERT(!node->red);
+ for (;;) {
+ if (!node->parent)
+ return;
+
+ // at this point, node is not a parent, it is black, thus it must have a sibling.
+ Node *sibling = (node == node->parent->left ? node->parent->right : node->parent->left);
+ Q_ASSERT(sibling);
+
+ if (sibling->red) {
+ sibling->red = false;
+ node->parent->red = true;
+ if (node == node->parent->left)
+ rotateLeft(node->parent);
+ else
+ rotateRight(node->parent);
+ sibling = (node == node->parent->left ? node->parent->right : node->parent->left);
+ Q_ASSERT(sibling);
+ }
+
+ // at this point, the sibling is black.
+ Q_ASSERT(!sibling->red);
+
+ if ((!sibling->left || !sibling->left->red) && (!sibling->right || !sibling->right->red)) {
+ bool parentWasRed = node->parent->red;
+ sibling->red = true;
+ node->parent->red = false;
+ if (parentWasRed)
+ return;
+ node = node->parent;
+ continue;
+ }
+
+ // at this point, at least one of the sibling's children is red.
+
+ if (node == node->parent->left) {
+ if (!sibling->right || !sibling->right->red) {
+ Q_ASSERT(sibling->left);
+ sibling->red = true;
+ sibling->left->red = false;
+ rotateRight(sibling);
+
+ sibling = sibling->parent;
+ Q_ASSERT(sibling);
+ }
+ sibling->red = node->parent->red;
+ node->parent->red = false;
+
+ Q_ASSERT(sibling->right->red);
+ sibling->right->red = false;
+ rotateLeft(node->parent);
+ } else {
+ if (!sibling->left || !sibling->left->red) {
+ Q_ASSERT(sibling->right);
+ sibling->red = true;
+ sibling->right->red = false;
+ rotateLeft(sibling);
+
+ sibling = sibling->parent;
+ Q_ASSERT(sibling);
+ }
+ sibling->red = node->parent->red;
+ node->parent->red = false;
+
+ Q_ASSERT(sibling->left->red);
+ sibling->left->red = false;
+ rotateRight(node->parent);
+ }
+ return;
+ }
+}
+
+template <class T>
+inline typename QRBTree<T>::Node *QRBTree<T>::front(Node *node) const
+{
+ while (node->left)
+ node = node->left;
+ return node;
+}
+
+template <class T>
+inline typename QRBTree<T>::Node *QRBTree<T>::back(Node *node) const
+{
+ while (node->right)
+ node = node->right;
+ return node;
+}
+
+template <class T>
+typename QRBTree<T>::Node *QRBTree<T>::next(Node *node) const
+{
+ if (node->right)
+ return front(node->right);
+ while (node->parent && node == node->parent->right)
+ node = node->parent;
+ return node->parent;
+}
+
+template <class T>
+typename QRBTree<T>::Node *QRBTree<T>::previous(Node *node) const
+{
+ if (node->left)
+ return back(node->left);
+ while (node->parent && node == node->parent->left)
+ node = node->parent;
+ return node->parent;
+}
+
+template <class T>
+int QRBTree<T>::blackDepth(Node *top) const
+{
+ if (!top)
+ return 0;
+ int leftDepth = blackDepth(top->left);
+ int rightDepth = blackDepth(top->right);
+ if (leftDepth != rightDepth)
+ return -1;
+ if (!top->red)
+ ++leftDepth;
+ return leftDepth;
+}
+
+template <class T>
+bool QRBTree<T>::checkRedBlackProperty(Node *top) const
+{
+ if (!top)
+ return true;
+ if (top->left && !checkRedBlackProperty(top->left))
+ return false;
+ if (top->right && !checkRedBlackProperty(top->right))
+ return false;
+ return !(top->red && ((top->left && top->left->red) || (top->right && top->right->red)));
+}
+
+template <class T>
+inline bool QRBTree<T>::verify() const
+{
+ return checkRedBlackProperty(root) && blackDepth(root) != -1;
+}
+
+template <class T>
+inline void QRBTree<T>::deleteNode(Node *&node)
+{
+ Q_ASSERT(node);
+ detach(node);
+ node->right = freeList;
+ freeList = node;
+ node = 0;
+}
+
+template <class T>
+inline typename QRBTree<T>::Node *QRBTree<T>::newNode()
+{
+ if (freeList) {
+ Node *node = freeList;
+ freeList = freeList->right;
+ node->parent = node->left = node->right = 0;
+ node->red = true;
+ return node;
+ }
+ return new Node;
+}
+
+// Return 1 if 'left' comes after 'right', 0 if equal, and -1 otherwise.
+// 'left' and 'right' cannot be null.
+template <class T>
+int QRBTree<T>::order(Node *left, Node *right)
+{
+ Q_ASSERT(left && right);
+ if (left == right)
+ return 0;
+
+ QVector<Node *> leftAncestors;
+ QVector<Node *> rightAncestors;
+ while (left) {
+ leftAncestors.push_back(left);
+ left = left->parent;
+ }
+ while (right) {
+ rightAncestors.push_back(right);
+ right = right->parent;
+ }
+ Q_ASSERT(leftAncestors.back() == root && rightAncestors.back() == root);
+
+ while (!leftAncestors.empty() && !rightAncestors.empty() && leftAncestors.back() == rightAncestors.back()) {
+ leftAncestors.pop_back();
+ rightAncestors.pop_back();
+ }
+
+ if (!leftAncestors.empty())
+ return (leftAncestors.back() == leftAncestors.back()->parent->left ? -1 : 1);
+
+ if (!rightAncestors.empty())
+ return (rightAncestors.back() == rightAncestors.back()->parent->right ? -1 : 1);
+
+ // The code should never reach this point.
+ Q_ASSERT(!leftAncestors.empty() || !rightAncestors.empty());
+ return 0;
+}
+
+//============================================================================//
+// QInt64Hash //
+//============================================================================//
+
+// Copied from qhash.cpp
+static const uchar prime_deltas[] = {
+ 0, 0, 1, 3, 1, 5, 3, 3, 1, 9, 7, 5, 3, 9, 25, 3,
+ 1, 21, 3, 21, 7, 15, 9, 5, 3, 29, 15, 0, 0, 0, 0, 0
+};
+
+// Copied from qhash.cpp
+static inline int primeForNumBits(int numBits)
+{
+ return (1 << numBits) + prime_deltas[numBits];
+}
+
+static inline int primeForCount(int count)
+{
+ int low = 0;
+ int high = 32;
+ for (int i = 0; i < 5; ++i) {
+ int mid = (high + low) / 2;
+ if (count >= 1 << mid)
+ low = mid;
+ else
+ high = mid;
+ }
+ return primeForNumBits(high);
+}
+
+// Hash set of quint64s. Elements cannot be removed without clearing the
+// entire set. A value of -1 is used to mark unused entries.
+class QInt64Set
+{
+public:
+ inline QInt64Set(int capacity = 64);
+ inline ~QInt64Set() {if (m_array) delete[] m_array;}
+ inline bool isValid() const {return m_array;}
+ void insert(quint64 key);
+ bool contains(quint64 key) const;
+ inline void clear();
+private:
+ bool rehash(int capacity);
+
+ static const quint64 UNUSED;
+
+ quint64 *m_array;
+ int m_capacity;
+ int m_count;
+};
+
+const quint64 QInt64Set::UNUSED = quint64(-1);
+
+inline QInt64Set::QInt64Set(int capacity)
+{
+ m_capacity = primeForCount(capacity);
+ m_array = new quint64[m_capacity];
+ if (m_array)
+ clear();
+ else
+ m_capacity = 0;
+}
+
+bool QInt64Set::rehash(int capacity)
+{
+ quint64 *oldArray = m_array;
+ int oldCapacity = m_capacity;
+
+ m_capacity = capacity;
+ m_array = new quint64[m_capacity];
+ if (m_array) {
+ clear();
+ if (oldArray) {
+ for (int i = 0; i < oldCapacity; ++i) {
+ if (oldArray[i] != UNUSED)
+ insert(oldArray[i]);
+ }
+ delete[] oldArray;
+ }
+ return true;
+ } else {
+ m_capacity = oldCapacity;
+ m_array = oldArray;
+ return false;
+ }
+}
+
+void QInt64Set::insert(quint64 key)
+{
+ if (m_count > 3 * m_capacity / 4)
+ rehash(primeForCount(2 * m_capacity));
+ Q_ASSERT_X(m_array, "QInt64Hash<T>::insert", "Hash set not allocated.");
+ int index = int(key % m_capacity);
+ for (int i = 0; i < m_capacity; ++i) {
+ index += i;
+ if (index >= m_capacity)
+ index -= m_capacity;
+ if (m_array[index] == key)
+ return;
+ if (m_array[index] == UNUSED) {
+ ++m_count;
+ m_array[index] = key;
+ return;
+ }
+ }
+ Q_ASSERT_X(0, "QInt64Hash<T>::insert", "Hash set full.");
+}
+
+bool QInt64Set::contains(quint64 key) const
+{
+ Q_ASSERT_X(m_array, "QInt64Hash<T>::contains", "Hash set not allocated.");
+ int index = int(key % m_capacity);
+ for (int i = 0; i < m_capacity; ++i) {
+ index += i;
+ if (index >= m_capacity)
+ index -= m_capacity;
+ if (m_array[index] == key)
+ return true;
+ if (m_array[index] == UNUSED)
+ return false;
+ }
+ return false;
+}
+
+inline void QInt64Set::clear()
+{
+ Q_ASSERT_X(m_array, "QInt64Hash<T>::clear", "Hash set not allocated.");
+ for (int i = 0; i < m_capacity; ++i)
+ m_array[i] = UNUSED;
+ m_count = 0;
+}
+
+//============================================================================//
+// QRingBuffer //
+//============================================================================//
+
+// T must be POD.
+template <class T>
+class QRingBuffer
+{
+public:
+ inline QRingBuffer() : m_array(0), m_head(0), m_size(0), m_capacity(0) { }
+ inline ~QRingBuffer() {if (m_array) delete[] m_array;}
+ bool reallocate(int capacity);
+ inline const T &head() const {Q_ASSERT(m_size > 0); return m_array[m_head];}
+ inline const T &dequeue();
+ inline void enqueue(const T &x);
+ inline bool isEmpty() const {return m_size == 0;}
+private:
+ T *m_array;
+ int m_head;
+ int m_size;
+ int m_capacity;
+};
+
+template <class T>
+bool QRingBuffer<T>::reallocate(int capacity)
+{
+ T *oldArray = m_array;
+ m_array = new T[capacity];
+ if (m_array) {
+ if (oldArray) {
+ if (m_head + m_size > m_capacity) {
+ memcpy(m_array, oldArray + m_head, (m_capacity - m_head) * sizeof(T));
+ memcpy(m_array + (m_capacity - m_head), oldArray, (m_head + m_size - m_capacity) * sizeof(T));
+ } else {
+ memcpy(m_array, oldArray + m_head, m_size * sizeof(T));
+ }
+ delete[] oldArray;
+ }
+ m_capacity = capacity;
+ m_head = 0;
+ return true;
+ } else {
+ m_array = oldArray;
+ return false;
+ }
+}
+
+template <class T>
+inline const T &QRingBuffer<T>::dequeue()
+{
+ Q_ASSERT(m_size > 0);
+ Q_ASSERT(m_array);
+ Q_ASSERT(m_capacity >= m_size);
+ int index = m_head;
+ if (++m_head >= m_capacity)
+ m_head -= m_capacity;
+ --m_size;
+ return m_array[index];
+}
+
+template <class T>
+inline void QRingBuffer<T>::enqueue(const T &x)
+{
+ if (m_size == m_capacity)
+ reallocate(qMax(2 * m_capacity, 64));
+ int index = m_head + m_size;
+ if (index >= m_capacity)
+ index -= m_capacity;
+ m_array[index] = x;
+ ++m_size;
+}
+
+//============================================================================//
+// QTriangulator //
+//============================================================================//
+
+class QTriangulator
+{
+public:
+ typedef QVarLengthArray<int, 6> ShortArray;
+
+ //================================//
+ // QTriangulator::ComplexToSimple //
+ //================================//
+ friend class ComplexToSimple;
+ class ComplexToSimple
+ {
+ public:
+ inline ComplexToSimple(QTriangulator *parent) : m_parent(parent) { }
+ void decompose();
+ private:
+ struct Edge
+ {
+ inline int &upper() {return pointingUp ? to : from;}
+ inline int &lower() {return pointingUp ? from : to;}
+ inline int upper() const {return pointingUp ? to : from;}
+ inline int lower() const {return pointingUp ? from : to;}
+
+ QRBTree<int>::Node *node;
+ int from, to; // vertex
+ int next, previous; // edge
+ int winding;
+ bool mayIntersect;
+ bool pointingUp, originallyPointingUp;
+ };
+
+ friend class CompareEdges;
+ class CompareEdges
+ {
+ public:
+ inline CompareEdges(ComplexToSimple *parent) : m_parent(parent) { }
+ bool operator () (int i, int j) const;
+ private:
+ ComplexToSimple *m_parent;
+ };
+
+ struct Intersection
+ {
+ bool operator < (const Intersection &other) const {return other.intersectionPoint < intersectionPoint;}
+
+ QIntersectionPoint intersectionPoint;
+ int vertex;
+ int leftEdge;
+ int rightEdge;
+ };
+
+ struct Split
+ {
+ int vertex;
+ int edge;
+ bool accurate;
+ };
+
+ struct Event
+ {
+ enum Type {Upper, Lower};
+ inline bool operator < (const Event &other) const;
+
+ QPodPoint point;
+ Type type;
+ int edge;
+ };
+
+#ifdef Q_TRIANGULATOR_DEBUG
+ friend class DebugDialog;
+ friend class QTriangulator;
+ class DebugDialog : public QDialog
+ {
+ public:
+ DebugDialog(ComplexToSimple *parent, int currentVertex);
+ protected:
+ void paintEvent(QPaintEvent *);
+ void wheelEvent(QWheelEvent *);
+ void mouseMoveEvent(QMouseEvent *);
+ void mousePressEvent(QMouseEvent *);
+ private:
+ ComplexToSimple *m_parent;
+ QRectF m_window;
+ QPoint m_lastMousePos;
+ int m_vertex;
+ };
+#endif
+
+ void initEdges();
+ bool calculateIntersection(int left, int right);
+ bool edgeIsLeftOfEdge(int leftEdgeIndex, int rightEdgeIndex) const;
+ QRBTree<int>::Node *searchEdgeLeftOf(int edgeIndex) const;
+ QRBTree<int>::Node *searchEdgeLeftOf(int edgeIndex, QRBTree<int>::Node *after) const;
+ QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> bounds(const QPodPoint &point) const;
+ QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> outerBounds(const QPodPoint &point) const;
+ void splitEdgeListRange(QRBTree<int>::Node *leftmost, QRBTree<int>::Node *rightmost, int vertex, const QIntersectionPoint &intersectionPoint);
+ void reorderEdgeListRange(QRBTree<int>::Node *leftmost, QRBTree<int>::Node *rightmost);
+ void sortEdgeList(const QPodPoint eventPoint);
+ void fillPriorityQueue();
+ void calculateIntersections();
+ int splitEdge(int splitIndex);
+ bool splitEdgesAtIntersections();
+ void insertEdgeIntoVectorIfWanted(ShortArray &orderedEdges, int i);
+ void removeUnwantedEdgesAndConnect();
+ void removeUnusedPoints();
+
+ QTriangulator *m_parent;
+ QDataBuffer<Edge> m_edges;
+ QRBTree<int> m_edgeList;
+ QDataBuffer<Event> m_events;
+ QDataBuffer<Split> m_splits;
+ QMaxHeap<Intersection> m_topIntersection;
+ QInt64Set m_processedEdgePairs;
+ int m_initialPointCount;
+ };
+#ifdef Q_TRIANGULATOR_DEBUG
+ friend class ComplexToSimple::DebugDialog;
+#endif
+
+ //=================================//
+ // QTriangulator::SimpleToMonotone //
+ //=================================//
+ friend class SimpleToMonotone;
+ class SimpleToMonotone
+ {
+ public:
+ inline SimpleToMonotone(QTriangulator *parent) : m_parent(parent) { }
+ void decompose();
+ private:
+ enum VertexType {MergeVertex, EndVertex, RegularVertex, StartVertex, SplitVertex};
+
+ struct Edge
+ {
+ QRBTree<int>::Node *node;
+ int helper, twin, next, previous;
+ quint32 from, to;
+ VertexType type;
+ bool pointingUp;
+ int upper() const {return (pointingUp ? to : from);}
+ int lower() const {return (pointingUp ? from : to);}
+ };
+
+ friend class CompareVertices;
+ class CompareVertices
+ {
+ public:
+ CompareVertices(SimpleToMonotone *parent) : m_parent(parent) { }
+ bool operator () (int i, int j) const;
+ private:
+ SimpleToMonotone *m_parent;
+ };
+
+ void setupDataStructures();
+ void removeZeroLengthEdges();
+ void fillPriorityQueue();
+ bool edgeIsLeftOfEdge(int leftEdgeIndex, int rightEdgeIndex) const;
+ // Returns the rightmost edge not to the right of the given edge.
+ QRBTree<int>::Node *searchEdgeLeftOfEdge(int edgeIndex) const;
+ // Returns the rightmost edge left of the given point.
+ QRBTree<int>::Node *searchEdgeLeftOfPoint(int pointIndex) const;
+ void classifyVertex(int i);
+ void classifyVertices();
+ bool pointIsInSector(const QPodPoint &p, const QPodPoint &v1, const QPodPoint &v2, const QPodPoint &v3);
+ bool pointIsInSector(int vertex, int sector);
+ int findSector(int edge, int vertex);
+ void createDiagonal(int lower, int upper);
+ void monotoneDecomposition();
+
+ QTriangulator *m_parent;
+ QRBTree<int> m_edgeList;
+ QDataBuffer<Edge> m_edges;
+ QDataBuffer<int> m_upperVertex;
+ bool m_clockwiseOrder;
+ };
+
+ //====================================//
+ // QTriangulator::MonotoneToTriangles //
+ //====================================//
+ friend class MonotoneToTriangles;
+ class MonotoneToTriangles
+ {
+ public:
+ inline MonotoneToTriangles(QTriangulator *parent) : m_parent(parent) { }
+ void decompose();
+ private:
+ inline quint32 indices(int index) const {return m_parent->m_indices.at(index + m_first);}
+ inline int next(int index) const {return (index + 1) % m_length;}
+ inline int previous(int index) const {return (index + m_length - 1) % m_length;}
+ inline bool less(int i, int j) const {return m_parent->m_vertices.at(indices(i)) < m_parent->m_vertices.at(indices(j));}
+ inline bool leftOfEdge(int i, int j, int k) const
+ {
+ return qPointIsLeftOfLine(m_parent->m_vertices.at(indices(i)),
+ m_parent->m_vertices.at(indices(j)), m_parent->m_vertices.at(indices(k)));
+ }
+
+ QTriangulator *m_parent;
+ int m_first;
+ int m_length;
+ };
+
+ inline QTriangulator() { }
+
+ // Call this only once.
+ void initialize(const qreal *polygon, int count, uint hint, const QTransform &matrix);
+ // Call this only once.
+ void initialize(const QVectorPath &path, const QTransform &matrix, qreal lod);
+ // Call this only once.
+ void initialize(const QPainterPath &path, const QTransform &matrix, qreal lod);
+ // Call either triangulate() or polyline() only once.
+ QTriangleSet triangulate();
+ QPolylineSet polyline();
+private:
+ QDataBuffer<QPodPoint> m_vertices;
+ QVector<quint32> m_indices;
+ uint m_hint;
+};
+
+//============================================================================//
+// QTriangulator //
+//============================================================================//
+
+QTriangleSet QTriangulator::triangulate()
+{
+ for (int i = 0; i < m_vertices.size(); ++i) {
+ Q_ASSERT(qAbs(m_vertices.at(i).x) < (1 << 21));
+ Q_ASSERT(qAbs(m_vertices.at(i).y) < (1 << 21));
+ }
+
+ if (!(m_hint & (QVectorPath::OddEvenFill | QVectorPath::WindingFill)))
+ m_hint |= QVectorPath::OddEvenFill;
+
+ if (m_hint & QVectorPath::NonConvexShapeMask) {
+ ComplexToSimple c2s(this);
+ c2s.decompose();
+ SimpleToMonotone s2m(this);
+ s2m.decompose();
+ }
+ MonotoneToTriangles m2t(this);
+ m2t.decompose();
+
+ QTriangleSet result;
+ result.indices = m_indices;
+ result.vertices.resize(2 * m_vertices.size());
+ for (int i = 0; i < m_vertices.size(); ++i) {
+ result.vertices[2 * i + 0] = qreal(m_vertices.at(i).x) / Q_FIXED_POINT_SCALE;
+ result.vertices[2 * i + 1] = qreal(m_vertices.at(i).y) / Q_FIXED_POINT_SCALE;
+ }
+ return result;
+}
+
+QPolylineSet QTriangulator::polyline()
+{
+ QPolylineSet result;
+ result.indices = m_indices;
+ result.vertices.resize(2 * m_vertices.size());
+ for (int i = 0; i < m_vertices.size(); ++i) {
+ result.vertices[2 * i + 0] = qreal(m_vertices.at(i).x) / Q_FIXED_POINT_SCALE;
+ result.vertices[2 * i + 1] = qreal(m_vertices.at(i).y) / Q_FIXED_POINT_SCALE;
+ }
+ return result;
+}
+
+void QTriangulator::initialize(const qreal *polygon, int count, uint hint, const QTransform &matrix)
+{
+ m_hint = hint;
+ m_vertices.resize(count);
+ m_indices.resize(count + 1);
+ for (int i = 0; i < count; ++i) {
+ qreal x, y;
+ matrix.map(polygon[2 * i + 0], polygon[2 * i + 1], &x, &y);
+ m_vertices.at(i).x = qRound(x * Q_FIXED_POINT_SCALE);
+ m_vertices.at(i).y = qRound(y * Q_FIXED_POINT_SCALE);
+ m_indices[i] = i;
+ }
+ m_indices[count] = Q_TRIANGULATE_END_OF_POLYGON;
+}
+
+void QTriangulator::initialize(const QVectorPath &path, const QTransform &matrix, qreal lod)
+{
+ m_hint = path.hints();
+ // Curved paths will be converted to complex polygons.
+ m_hint &= ~QVectorPath::CurvedShapeMask;
+
+ const qreal *p = path.points();
+ const QPainterPath::ElementType *e = path.elements();
+ if (e) {
+ for (int i = 0; i < path.elementCount(); ++i, ++e, p += 2) {
+ switch (*e) {
+ case QPainterPath::MoveToElement:
+ if (!m_indices.isEmpty())
+ m_indices.push_back(Q_TRIANGULATE_END_OF_POLYGON);
+ // Fall through.
+ case QPainterPath::LineToElement:
+ m_indices.push_back(quint32(m_vertices.size()));
+ m_vertices.resize(m_vertices.size() + 1);
+ qreal x, y;
+ matrix.map(p[0], p[1], &x, &y);
+ m_vertices.last().x = qRound(x * Q_FIXED_POINT_SCALE);
+ m_vertices.last().y = qRound(y * Q_FIXED_POINT_SCALE);
+ break;
+ case QPainterPath::CurveToElement:
+ {
+ qreal pts[8];
+ for (int i = 0; i < 4; ++i)
+ matrix.map(p[2 * i - 2], p[2 * i - 1], &pts[2 * i + 0], &pts[2 * i + 1]);
+ for (int i = 0; i < 8; ++i)
+ pts[i] *= lod;
+ QBezier bezier = QBezier::fromPoints(QPointF(pts[0], pts[1]), QPointF(pts[2], pts[3]), QPointF(pts[4], pts[5]), QPointF(pts[6], pts[7]));
+ QPolygonF poly = bezier.toPolygon();
+ // Skip first point, it already exists in 'm_vertices'.
+ for (int j = 1; j < poly.size(); ++j) {
+ m_indices.push_back(quint32(m_vertices.size()));
+ m_vertices.resize(m_vertices.size() + 1);
+ m_vertices.last().x = qRound(poly.at(j).x() * Q_FIXED_POINT_SCALE / lod);
+ m_vertices.last().y = qRound(poly.at(j).y() * Q_FIXED_POINT_SCALE / lod);
+ }
+ }
+ i += 2;
+ e += 2;
+ p += 4;
+ break;
+ default:
+ Q_ASSERT_X(0, "QTriangulator::triangulate", "Unexpected element type.");
+ break;
+ }
+ }
+ } else {
+ for (int i = 0; i < path.elementCount(); ++i, p += 2) {
+ m_indices.push_back(quint32(m_vertices.size()));
+ m_vertices.resize(m_vertices.size() + 1);
+ qreal x, y;
+ matrix.map(p[0], p[1], &x, &y);
+ m_vertices.last().x = qRound(x * Q_FIXED_POINT_SCALE);
+ m_vertices.last().y = qRound(y * Q_FIXED_POINT_SCALE);
+ }
+ }
+ m_indices.push_back(Q_TRIANGULATE_END_OF_POLYGON);
+}
+
+void QTriangulator::initialize(const QPainterPath &path, const QTransform &matrix, qreal lod)
+{
+ initialize(qtVectorPathForPath(path), matrix, lod);
+}
+
+//============================================================================//
+// QTriangulator::ComplexToSimple //
+//============================================================================//
+
+void QTriangulator::ComplexToSimple::decompose()
+{
+ m_initialPointCount = m_parent->m_vertices.size();
+ initEdges();
+ do {
+ calculateIntersections();
+ } while (splitEdgesAtIntersections());
+
+ removeUnwantedEdgesAndConnect();
+ removeUnusedPoints();
+
+ m_parent->m_indices.clear();
+ QBitArray processed(m_edges.size(), false);
+ for (int first = 0; first < m_edges.size(); ++first) {
+ // If already processed, or if unused path, skip.
+ if (processed.at(first) || m_edges.at(first).next == -1)
+ continue;
+
+ int i = first;
+ do {
+ Q_ASSERT(!processed.at(i));
+ Q_ASSERT(m_edges.at(m_edges.at(i).next).previous == i);
+ m_parent->m_indices.push_back(m_edges.at(i).from);
+ processed.setBit(i);
+ i = m_edges.at(i).next; // CCW order
+ } while (i != first);
+ m_parent->m_indices.push_back(Q_TRIANGULATE_END_OF_POLYGON);
+ }
+}
+
+void QTriangulator::ComplexToSimple::initEdges()
+{
+ // Initialize edge structure.
+ // 'next' and 'previous' are not being initialized at this point.
+ int first = 0;
+ for (int i = 0; i < m_parent->m_indices.size(); ++i) {
+ if (m_parent->m_indices.at(i) == Q_TRIANGULATE_END_OF_POLYGON) {
+ if (m_edges.size() != first)
+ m_edges.last().to = m_edges.at(first).from;
+ first = m_edges.size();
+ } else {
+ Q_ASSERT(i + 1 < m_parent->m_indices.size());
+ // {node, from, to, next, previous, winding, mayIntersect, pointingUp, originallyPointingUp}
+ Edge edge = {0, m_parent->m_indices.at(i), m_parent->m_indices.at(i + 1), -1, -1, 0, true, false, false};
+ m_edges.add(edge);
+ }
+ }
+ if (first != m_edges.size())
+ m_edges.last().to = m_edges.at(first).from;
+ for (int i = 0; i < m_edges.size(); ++i) {
+ m_edges.at(i).originallyPointingUp = m_edges.at(i).pointingUp =
+ m_parent->m_vertices.at(m_edges.at(i).to) < m_parent->m_vertices.at(m_edges.at(i).from);
+ }
+}
+
+// Return true if new intersection was found
+bool QTriangulator::ComplexToSimple::calculateIntersection(int left, int right)
+{
+ const Edge &e1 = m_edges.at(left);
+ const Edge &e2 = m_edges.at(right);
+
+ const QPodPoint &u1 = m_parent->m_vertices.at(e1.from);
+ const QPodPoint &u2 = m_parent->m_vertices.at(e1.to);
+ const QPodPoint &v1 = m_parent->m_vertices.at(e2.from);
+ const QPodPoint &v2 = m_parent->m_vertices.at(e2.to);
+ if (qMax(u1.x, u2.x) <= qMin(v1.x, v2.x))
+ return false;
+
+ quint64 key = (left > right ? (quint64(right) << 32) | quint64(left) : (quint64(left) << 32) | quint64(right));
+ if (m_processedEdgePairs.contains(key))
+ return false;
+ m_processedEdgePairs.insert(key);
+
+ Intersection intersection;
+ intersection.leftEdge = left;
+ intersection.rightEdge = right;
+ intersection.intersectionPoint = qIntersectionPoint(u1, u2, v1, v2);
+
+ if (!intersection.intersectionPoint.isValid())
+ return false;
+
+ Q_ASSERT(intersection.intersectionPoint.isOnLine(u1, u2));
+ Q_ASSERT(intersection.intersectionPoint.isOnLine(v1, v2));
+
+ intersection.vertex = m_parent->m_vertices.size();
+ m_topIntersection.push(intersection);
+ m_parent->m_vertices.add(intersection.intersectionPoint.round());
+ return true;
+}
+
+bool QTriangulator::ComplexToSimple::edgeIsLeftOfEdge(int leftEdgeIndex, int rightEdgeIndex) const
+{
+ const Edge &leftEdge = m_edges.at(leftEdgeIndex);
+ const Edge &rightEdge = m_edges.at(rightEdgeIndex);
+ const QPodPoint &u = m_parent->m_vertices.at(rightEdge.upper());
+ const QPodPoint &l = m_parent->m_vertices.at(rightEdge.lower());
+ const QPodPoint &upper = m_parent->m_vertices.at(leftEdge.upper());
+ if (upper.x < qMin(l.x, u.x))
+ return true;
+ if (upper.x > qMax(l.x, u.x))
+ return false;
+ qint64 d = qPointDistanceFromLine(upper, l, u);
+ // d < 0: left, d > 0: right, d == 0: on top
+ if (d == 0)
+ d = qPointDistanceFromLine(m_parent->m_vertices.at(leftEdge.lower()), l, u);
+ return d < 0;
+}
+
+QRBTree<int>::Node *QTriangulator::ComplexToSimple::searchEdgeLeftOf(int edgeIndex) const
+{
+ QRBTree<int>::Node *current = m_edgeList.root;
+ QRBTree<int>::Node *result = 0;
+ while (current) {
+ if (edgeIsLeftOfEdge(edgeIndex, current->data)) {
+ current = current->left;
+ } else {
+ result = current;
+ current = current->right;
+ }
+ }
+ return result;
+}
+
+QRBTree<int>::Node *QTriangulator::ComplexToSimple::searchEdgeLeftOf(int edgeIndex, QRBTree<int>::Node *after) const
+{
+ if (!m_edgeList.root)
+ return after;
+ QRBTree<int>::Node *result = after;
+ QRBTree<int>::Node *current = (after ? m_edgeList.next(after) : m_edgeList.front(m_edgeList.root));
+ while (current) {
+ if (edgeIsLeftOfEdge(edgeIndex, current->data))
+ return result;
+ result = current;
+ current = m_edgeList.next(current);
+ }
+ return result;
+}
+
+QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> QTriangulator::ComplexToSimple::bounds(const QPodPoint &point) const
+{
+ QRBTree<int>::Node *current = m_edgeList.root;
+ QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> result(0, 0);
+ while (current) {
+ const QPodPoint &v1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
+ const QPodPoint &v2 = m_parent->m_vertices.at(m_edges.at(current->data).upper());
+ qint64 d = qPointDistanceFromLine(point, v1, v2);
+ if (d == 0) {
+ result.first = result.second = current;
+ break;
+ }
+ current = (d < 0 ? current->left : current->right);
+ }
+ if (current == 0)
+ return result;
+
+ current = result.first->left;
+ while (current) {
+ const QPodPoint &v1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
+ const QPodPoint &v2 = m_parent->m_vertices.at(m_edges.at(current->data).upper());
+ qint64 d = qPointDistanceFromLine(point, v1, v2);
+ Q_ASSERT(d >= 0);
+ if (d == 0) {
+ result.first = current;
+ current = current->left;
+ } else {
+ current = current->right;
+ }
+ }
+
+ current = result.second->right;
+ while (current) {
+ const QPodPoint &v1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
+ const QPodPoint &v2 = m_parent->m_vertices.at(m_edges.at(current->data).upper());
+ qint64 d = qPointDistanceFromLine(point, v1, v2);
+ Q_ASSERT(d <= 0);
+ if (d == 0) {
+ result.second = current;
+ current = current->right;
+ } else {
+ current = current->left;
+ }
+ }
+
+ return result;
+}
+
+QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> QTriangulator::ComplexToSimple::outerBounds(const QPodPoint &point) const
+{
+ QRBTree<int>::Node *current = m_edgeList.root;
+ QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> result(0, 0);
+
+ while (current) {
+ const QPodPoint &v1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
+ const QPodPoint &v2 = m_parent->m_vertices.at(m_edges.at(current->data).upper());
+ qint64 d = qPointDistanceFromLine(point, v1, v2);
+ if (d == 0)
+ break;
+ if (d < 0) {
+ result.second = current;
+ current = current->left;
+ } else {
+ result.first = current;
+ current = current->right;
+ }
+ }
+
+ if (!current)
+ return result;
+
+ QRBTree<int>::Node *mid = current;
+
+ current = mid->left;
+ while (current) {
+ const QPodPoint &v1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
+ const QPodPoint &v2 = m_parent->m_vertices.at(m_edges.at(current->data).upper());
+ qint64 d = qPointDistanceFromLine(point, v1, v2);
+ Q_ASSERT(d >= 0);
+ if (d == 0) {
+ current = current->left;
+ } else {
+ result.first = current;
+ current = current->right;
+ }
+ }
+
+ current = mid->right;
+ while (current) {
+ const QPodPoint &v1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
+ const QPodPoint &v2 = m_parent->m_vertices.at(m_edges.at(current->data).upper());
+ qint64 d = qPointDistanceFromLine(point, v1, v2);
+ Q_ASSERT(d <= 0);
+ if (d == 0) {
+ current = current->right;
+ } else {
+ result.second = current;
+ current = current->left;
+ }
+ }
+
+ return result;
+}
+
+void QTriangulator::ComplexToSimple::splitEdgeListRange(QRBTree<int>::Node *leftmost, QRBTree<int>::Node *rightmost, int vertex, const QIntersectionPoint &intersectionPoint)
+{
+ Q_ASSERT(leftmost && rightmost);
+
+ // Split.
+ for (;;) {
+ const QPodPoint &u = m_parent->m_vertices.at(m_edges.at(leftmost->data).from);
+ const QPodPoint &v = m_parent->m_vertices.at(m_edges.at(leftmost->data).to);
+ Q_ASSERT(intersectionPoint.isOnLine(u, v));
+ const Split split = {vertex, leftmost->data, intersectionPoint.isAccurate()};
+ if (intersectionPoint.xOffset.numerator != 0 || intersectionPoint.yOffset.numerator != 0 || (intersectionPoint.upperLeft != u && intersectionPoint.upperLeft != v))
+ m_splits.add(split);
+ if (leftmost == rightmost)
+ break;
+ leftmost = m_edgeList.next(leftmost);
+ }
+}
+
+
+void QTriangulator::ComplexToSimple::reorderEdgeListRange(QRBTree<int>::Node *leftmost, QRBTree<int>::Node *rightmost)
+{
+ Q_ASSERT(leftmost && rightmost);
+
+ QRBTree<int>::Node *storeLeftmost = leftmost;
+ QRBTree<int>::Node *storeRightmost = rightmost;
+
+ // Reorder.
+ while (leftmost != rightmost) {
+ Edge &left = m_edges.at(leftmost->data);
+ Edge &right = m_edges.at(rightmost->data);
+ qSwap(left.node, right.node);
+ qSwap(leftmost->data, rightmost->data);
+ leftmost = m_edgeList.next(leftmost);
+ if (leftmost == rightmost)
+ break;
+ rightmost = m_edgeList.previous(rightmost);
+ }
+
+ rightmost = m_edgeList.next(storeRightmost);
+ leftmost = m_edgeList.previous(storeLeftmost);
+ if (leftmost)
+ calculateIntersection(leftmost->data, storeLeftmost->data);
+ if (rightmost)
+ calculateIntersection(storeRightmost->data, rightmost->data);
+}
+
+void QTriangulator::ComplexToSimple::sortEdgeList(const QPodPoint eventPoint)
+{
+ QIntersectionPoint eventPoint2 = qIntersectionPoint(eventPoint);
+ while (!m_topIntersection.isEmpty() && m_topIntersection.top().intersectionPoint < eventPoint2) {
+ Intersection intersection = m_topIntersection.pop();
+
+ QIntersectionPoint currentIntersectionPoint = intersection.intersectionPoint;
+ int currentVertex = intersection.vertex;
+
+ QRBTree<int>::Node *leftmost = m_edges.at(intersection.leftEdge).node;
+ QRBTree<int>::Node *rightmost = m_edges.at(intersection.rightEdge).node;
+
+ for (;;) {
+ QRBTree<int>::Node *previous = m_edgeList.previous(leftmost);
+ if (!previous)
+ break;
+ const Edge &edge = m_edges.at(previous->data);
+ const QPodPoint &u = m_parent->m_vertices.at(edge.from);
+ const QPodPoint &v = m_parent->m_vertices.at(edge.to);
+ if (!currentIntersectionPoint.isOnLine(u, v)) {
+ Q_ASSERT(!currentIntersectionPoint.isAccurate() || qCross(currentIntersectionPoint.upperLeft - u, v - u) != 0);
+ break;
+ }
+ leftmost = previous;
+ }
+
+ for (;;) {
+ QRBTree<int>::Node *next = m_edgeList.next(rightmost);
+ if (!next)
+ break;
+ const Edge &edge = m_edges.at(next->data);
+ const QPodPoint &u = m_parent->m_vertices.at(edge.from);
+ const QPodPoint &v = m_parent->m_vertices.at(edge.to);
+ if (!currentIntersectionPoint.isOnLine(u, v)) {
+ Q_ASSERT(!currentIntersectionPoint.isAccurate() || qCross(currentIntersectionPoint.upperLeft - u, v - u) != 0);
+ break;
+ }
+ rightmost = next;
+ }
+
+ Q_ASSERT(leftmost && rightmost);
+ splitEdgeListRange(leftmost, rightmost, currentVertex, currentIntersectionPoint);
+ reorderEdgeListRange(leftmost, rightmost);
+
+ while (!m_topIntersection.isEmpty() && m_topIntersection.top().intersectionPoint <= currentIntersectionPoint)
+ m_topIntersection.pop();
+
+#ifdef Q_TRIANGULATOR_DEBUG
+ DebugDialog dialog(this, intersection.vertex);
+ dialog.exec();
+#endif
+
+ }
+}
+
+void QTriangulator::ComplexToSimple::fillPriorityQueue()
+{
+ m_events.reset();
+ m_events.reserve(m_edges.size() * 2);
+ for (int i = 0; i < m_edges.size(); ++i) {
+ Q_ASSERT(m_edges.at(i).previous == -1 && m_edges.at(i).next == -1);
+ Q_ASSERT(m_edges.at(i).node == 0);
+ Q_ASSERT(m_edges.at(i).pointingUp == m_edges.at(i).originallyPointingUp);
+ Q_ASSERT(m_edges.at(i).pointingUp == (m_parent->m_vertices.at(m_edges.at(i).to) < m_parent->m_vertices.at(m_edges.at(i).from)));
+ // Ignore zero-length edges.
+ if (m_parent->m_vertices.at(m_edges.at(i).to) != m_parent->m_vertices.at(m_edges.at(i).from)) {
+ QPodPoint upper = m_parent->m_vertices.at(m_edges.at(i).upper());
+ QPodPoint lower = m_parent->m_vertices.at(m_edges.at(i).lower());
+ Event upperEvent = {{upper.x, upper.y}, Event::Upper, i};
+ Event lowerEvent = {{lower.x, lower.y}, Event::Lower, i};
+ m_events.add(upperEvent);
+ m_events.add(lowerEvent);
+ }
+ }
+ //qSort(m_events.data(), m_events.data() + m_events.size());
+ sort(m_events.data(), m_events.size());
+}
+
+void QTriangulator::ComplexToSimple::calculateIntersections()
+{
+ fillPriorityQueue();
+
+ Q_ASSERT(m_topIntersection.empty());
+ Q_ASSERT(m_edgeList.root == 0);
+
+ // Find all intersection points.
+ while (!m_events.isEmpty()) {
+ Event event = m_events.last();
+ sortEdgeList(event.point);
+
+ // Find all edges in the edge list that contain the current vertex and mark them to be split later.
+ QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> range = bounds(event.point);
+ QRBTree<int>::Node *leftNode = range.first ? m_edgeList.previous(range.first) : 0;
+ int vertex = (event.type == Event::Upper ? m_edges.at(event.edge).upper() : m_edges.at(event.edge).lower());
+ QIntersectionPoint eventPoint = qIntersectionPoint(event.point);
+
+ if (range.first != 0) {
+ splitEdgeListRange(range.first, range.second, vertex, eventPoint);
+ reorderEdgeListRange(range.first, range.second);
+ }
+
+ // Handle the edges with start or end point in the current vertex.
+ while (!m_events.isEmpty() && m_events.last().point == event.point) {
+ event = m_events.last();
+ m_events.pop_back();
+ int i = event.edge;
+
+ if (m_edges.at(i).node) {
+ // Remove edge from edge list.
+ Q_ASSERT(event.type == Event::Lower);
+ QRBTree<int>::Node *left = m_edgeList.previous(m_edges.at(i).node);
+ QRBTree<int>::Node *right = m_edgeList.next(m_edges.at(i).node);
+ m_edgeList.deleteNode(m_edges.at(i).node);
+ if (!left || !right)
+ continue;
+ calculateIntersection(left->data, right->data);
+ } else {
+ // Insert edge into edge list.
+ Q_ASSERT(event.type == Event::Upper);
+ QRBTree<int>::Node *left = searchEdgeLeftOf(i, leftNode);
+ m_edgeList.attachAfter(left, m_edges.at(i).node = m_edgeList.newNode());
+ m_edges.at(i).node->data = i;
+ QRBTree<int>::Node *right = m_edgeList.next(m_edges.at(i).node);
+ if (left)
+ calculateIntersection(left->data, i);
+ if (right)
+ calculateIntersection(i, right->data);
+ }
+ }
+ while (!m_topIntersection.isEmpty() && m_topIntersection.top().intersectionPoint <= eventPoint)
+ m_topIntersection.pop();
+#ifdef Q_TRIANGULATOR_DEBUG
+ DebugDialog dialog(this, vertex);
+ dialog.exec();
+#endif
+ }
+ m_processedEdgePairs.clear();
+}
+
+// Split an edge into two pieces at the given point.
+// The upper piece is pushed to the end of the 'm_edges' vector.
+// The lower piece replaces the old edge.
+// Return the edge whose 'from' is 'pointIndex'.
+int QTriangulator::ComplexToSimple::splitEdge(int splitIndex)
+{
+ const Split &split = m_splits.at(splitIndex);
+ Edge &lowerEdge = m_edges.at(split.edge);
+ Q_ASSERT(lowerEdge.node == 0);
+ Q_ASSERT(lowerEdge.previous == -1 && lowerEdge.next == -1);
+
+ if (lowerEdge.from == split.vertex)
+ return split.edge;
+ if (lowerEdge.to == split.vertex)
+ return lowerEdge.next;
+
+ // Check that angle >= 90 degrees.
+ //Q_ASSERT(qDot(m_points.at(m_edges.at(edgeIndex).from) - m_points.at(pointIndex),
+ // m_points.at(m_edges.at(edgeIndex).to) - m_points.at(pointIndex)) <= 0);
+
+ Edge upperEdge = lowerEdge;
+ upperEdge.mayIntersect |= !split.accurate; // The edge may have been split before at an inaccurate split point.
+ lowerEdge.mayIntersect = !split.accurate;
+ if (lowerEdge.pointingUp) {
+ lowerEdge.to = upperEdge.from = split.vertex;
+ m_edges.add(upperEdge);
+ return m_edges.size() - 1;
+ } else {
+ lowerEdge.from = upperEdge.to = split.vertex;
+ m_edges.add(upperEdge);
+ return split.edge;
+ }
+}
+
+bool QTriangulator::ComplexToSimple::splitEdgesAtIntersections()
+{
+ for (int i = 0; i < m_edges.size(); ++i)
+ m_edges.at(i).mayIntersect = false;
+ bool checkForNewIntersections = false;
+ for (int i = 0; i < m_splits.size(); ++i) {
+ splitEdge(i);
+ checkForNewIntersections |= !m_splits.at(i).accurate;
+ }
+ for (int i = 0; i < m_edges.size(); ++i) {
+ m_edges.at(i).originallyPointingUp = m_edges.at(i).pointingUp =
+ m_parent->m_vertices.at(m_edges.at(i).to) < m_parent->m_vertices.at(m_edges.at(i).from);
+ }
+ m_splits.reset();
+ return checkForNewIntersections;
+}
+
+void QTriangulator::ComplexToSimple::insertEdgeIntoVectorIfWanted(ShortArray &orderedEdges, int i)
+{
+ // Edges with zero length should not reach this part.
+ Q_ASSERT(m_parent->m_vertices.at(m_edges.at(i).from) != m_parent->m_vertices.at(m_edges.at(i).to));
+
+ // Skip edges with unwanted winding number.
+ int windingNumber = m_edges.at(i).winding;
+ if (m_edges.at(i).originallyPointingUp)
+ ++windingNumber;
+
+ // Make sure exactly one fill rule is specified.
+ Q_ASSERT(((m_parent->m_hint & QVectorPath::WindingFill) != 0) != ((m_parent->m_hint & QVectorPath::OddEvenFill) != 0));
+
+ if ((m_parent->m_hint & QVectorPath::WindingFill) && windingNumber != 0 && windingNumber != 1)
+ return;
+
+ // Skip cancelling edges.
+ if (!orderedEdges.isEmpty()) {
+ int j = orderedEdges[orderedEdges.size() - 1];
+ // If the last edge is already connected in one end, it should not be cancelled.
+ if (m_edges.at(j).next == -1 && m_edges.at(j).previous == -1
+ && (m_parent->m_vertices.at(m_edges.at(i).from) == m_parent->m_vertices.at(m_edges.at(j).to))
+ && (m_parent->m_vertices.at(m_edges.at(i).to) == m_parent->m_vertices.at(m_edges.at(j).from))) {
+ orderedEdges.removeLast();
+ return;
+ }
+ }
+ orderedEdges.append(i);
+}
+
+void QTriangulator::ComplexToSimple::removeUnwantedEdgesAndConnect()
+{
+ Q_ASSERT(m_edgeList.root == 0);
+ // Initialize priority queue.
+ fillPriorityQueue();
+
+ ShortArray orderedEdges;
+
+ while (!m_events.isEmpty()) {
+ Event event = m_events.last();
+ int edgeIndex = event.edge;
+
+ // Check that all the edges in the list crosses the current scanline
+ //if (m_edgeList.root) {
+ // for (QRBTree<int>::Node *node = m_edgeList.front(m_edgeList.root); node; node = m_edgeList.next(node)) {
+ // Q_ASSERT(event.point <= m_points.at(m_edges.at(node->data).lower()));
+ // }
+ //}
+
+ orderedEdges.clear();
+ QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> b = outerBounds(event.point);
+ if (m_edgeList.root) {
+ QRBTree<int>::Node *current = (b.first ? m_edgeList.next(b.first) : m_edgeList.front(m_edgeList.root));
+ // Process edges that are going to be removed from the edge list at the current event point.
+ while (current != b.second) {
+ Q_ASSERT(current);
+ Q_ASSERT(m_edges.at(current->data).node == current);
+ Q_ASSERT(qIntersectionPoint(event.point).isOnLine(m_parent->m_vertices.at(m_edges.at(current->data).from), m_parent->m_vertices.at(m_edges.at(current->data).to)));
+ Q_ASSERT(m_parent->m_vertices.at(m_edges.at(current->data).from) == event.point || m_parent->m_vertices.at(m_edges.at(current->data).to) == event.point);
+ insertEdgeIntoVectorIfWanted(orderedEdges, current->data);
+ current = m_edgeList.next(current);
+ }
+ }
+
+ // Remove edges above the event point, insert edges below the event point.
+ do {
+ event = m_events.last();
+ m_events.pop_back();
+ edgeIndex = event.edge;
+
+ // Edges with zero length should not reach this part.
+ Q_ASSERT(m_parent->m_vertices.at(m_edges.at(edgeIndex).from) != m_parent->m_vertices.at(m_edges.at(edgeIndex).to));
+
+ if (m_edges.at(edgeIndex).node) {
+ Q_ASSERT(event.type == Event::Lower);
+ Q_ASSERT(event.point == m_parent->m_vertices.at(m_edges.at(event.edge).lower()));
+ m_edgeList.deleteNode(m_edges.at(edgeIndex).node);
+ } else {
+ Q_ASSERT(event.type == Event::Upper);
+ Q_ASSERT(event.point == m_parent->m_vertices.at(m_edges.at(event.edge).upper()));
+ QRBTree<int>::Node *left = searchEdgeLeftOf(edgeIndex, b.first);
+ m_edgeList.attachAfter(left, m_edges.at(edgeIndex).node = m_edgeList.newNode());
+ m_edges.at(edgeIndex).node->data = edgeIndex;
+ }
+ } while (!m_events.isEmpty() && m_events.last().point == event.point);
+
+ if (m_edgeList.root) {
+ QRBTree<int>::Node *current = (b.first ? m_edgeList.next(b.first) : m_edgeList.front(m_edgeList.root));
+
+ // Calculate winding number and turn counter-clockwise.
+ int currentWindingNumber = (b.first ? m_edges.at(b.first->data).winding : 0);
+ while (current != b.second) {
+ Q_ASSERT(current);
+ //Q_ASSERT(b.second == 0 || m_edgeList.order(current, b.second) < 0);
+ int i = current->data;
+ Q_ASSERT(m_edges.at(i).node == current);
+
+ // Winding number.
+ int ccwWindingNumber = m_edges.at(i).winding = currentWindingNumber;
+ if (m_edges.at(i).originallyPointingUp) {
+ --m_edges.at(i).winding;
+ } else {
+ ++m_edges.at(i).winding;
+ ++ccwWindingNumber;
+ }
+ currentWindingNumber = m_edges.at(i).winding;
+
+ // Turn counter-clockwise.
+ if ((ccwWindingNumber & 1) == 0) {
+ Q_ASSERT(m_edges.at(i).previous == -1 && m_edges.at(i).next == -1);
+ qSwap(m_edges.at(i).from, m_edges.at(i).to);
+ m_edges.at(i).pointingUp = !m_edges.at(i).pointingUp;
+ }
+
+ current = m_edgeList.next(current);
+ }
+
+ // Process edges that were inserted into the edge list at the current event point.
+ current = (b.second ? m_edgeList.previous(b.second) : m_edgeList.back(m_edgeList.root));
+ while (current != b.first) {
+ Q_ASSERT(current);
+ Q_ASSERT(m_edges.at(current->data).node == current);
+ insertEdgeIntoVectorIfWanted(orderedEdges, current->data);
+ current = m_edgeList.previous(current);
+ }
+ }
+ if (orderedEdges.isEmpty())
+ continue;
+
+ Q_ASSERT((orderedEdges.size() & 1) == 0);
+
+ // Connect edges.
+ // First make sure the first edge point towards the current point.
+ int i;
+ if (m_parent->m_vertices.at(m_edges.at(orderedEdges[0]).from) == event.point) {
+ i = 1;
+ int copy = orderedEdges[0]; // Make copy in case the append() will cause a reallocation.
+ orderedEdges.append(copy);
+ } else {
+ Q_ASSERT(m_parent->m_vertices.at(m_edges.at(orderedEdges[0]).to) == event.point);
+ i = 0;
+ }
+
+ // Remove references to duplicate points. First find the point with lowest index.
+ int pointIndex = INT_MAX;
+ for (int j = i; j < orderedEdges.size(); j += 2) {
+ Q_ASSERT(j + 1 < orderedEdges.size());
+ Q_ASSERT(m_parent->m_vertices.at(m_edges.at(orderedEdges[j]).to) == event.point);
+ Q_ASSERT(m_parent->m_vertices.at(m_edges.at(orderedEdges[j + 1]).from) == event.point);
+ if (m_edges.at(orderedEdges[j]).to < pointIndex)
+ pointIndex = m_edges.at(orderedEdges[j]).to;
+ if (m_edges.at(orderedEdges[j + 1]).from < pointIndex)
+ pointIndex = m_edges.at(orderedEdges[j + 1]).from;
+ }
+
+ for (; i < orderedEdges.size(); i += 2) {
+ // Remove references to duplicate points by making all edges reference one common point.
+ m_edges.at(orderedEdges[i]).to = m_edges.at(orderedEdges[i + 1]).from = pointIndex;
+
+ Q_ASSERT(m_edges.at(orderedEdges[i]).pointingUp || m_edges.at(orderedEdges[i]).previous != -1);
+ Q_ASSERT(!m_edges.at(orderedEdges[i + 1]).pointingUp || m_edges.at(orderedEdges[i + 1]).next != -1);
+
+ m_edges.at(orderedEdges[i]).next = orderedEdges[i + 1];
+ m_edges.at(orderedEdges[i + 1]).previous = orderedEdges[i];
+ }
+ } // end while
+}
+
+void QTriangulator::ComplexToSimple::removeUnusedPoints() {
+ QBitArray used(m_parent->m_vertices.size(), false);
+ for (int i = 0; i < m_edges.size(); ++i) {
+ Q_ASSERT((m_edges.at(i).previous == -1) == (m_edges.at(i).next == -1));
+ if (m_edges.at(i).next != -1)
+ used.setBit(m_edges.at(i).from);
+ }
+ QDataBuffer<quint32> newMapping(m_parent->m_vertices.size());
+ newMapping.resize(m_parent->m_vertices.size());
+ int count = 0;
+ for (int i = 0; i < m_parent->m_vertices.size(); ++i) {
+ if (used.at(i)) {
+ m_parent->m_vertices.at(count) = m_parent->m_vertices.at(i);
+ newMapping.at(i) = count;
+ ++count;
+ }
+ }
+ m_parent->m_vertices.resize(count);
+ for (int i = 0; i < m_edges.size(); ++i) {
+ m_edges.at(i).from = newMapping.at(m_edges.at(i).from);
+ m_edges.at(i).to = newMapping.at(m_edges.at(i).to);
+ }
+}
+
+bool QTriangulator::ComplexToSimple::CompareEdges::operator () (int i, int j) const
+{
+ int cmp = comparePoints(m_parent->m_parent->m_vertices.at(m_parent->m_edges.at(i).from),
+ m_parent->m_parent->m_vertices.at(m_parent->m_edges.at(j).from));
+ if (cmp == 0) {
+ cmp = comparePoints(m_parent->m_parent->m_vertices.at(m_parent->m_edges.at(i).to),
+ m_parent->m_parent->m_vertices.at(m_parent->m_edges.at(j).to));
+ }
+ return cmp > 0;
+}
+
+inline bool QTriangulator::ComplexToSimple::Event::operator < (const Event &other) const
+{
+ if (point == other.point)
+ return type < other.type; // 'Lower' has higher priority than 'Upper'.
+ return other.point < point;
+}
+
+//============================================================================//
+// QTriangulator::ComplexToSimple::DebugDialog //
+//============================================================================//
+
+#ifdef Q_TRIANGULATOR_DEBUG
+
+QTriangulator::ComplexToSimple::DebugDialog::DebugDialog(ComplexToSimple *parent, int currentVertex)
+ : m_parent(parent), m_vertex(currentVertex)
+{
+ QDataBuffer<QPodPoint> &vertices = m_parent->m_parent->m_vertices;
+ if (vertices.isEmpty())
+ return;
+
+ int minX, maxX, minY, maxY;
+ minX = maxX = vertices.at(0).x;
+ minY = maxY = vertices.at(0).y;
+ for (int i = 1; i < vertices.size(); ++i) {
+ minX = qMin(minX, vertices.at(i).x);
+ maxX = qMax(maxX, vertices.at(i).x);
+ minY = qMin(minY, vertices.at(i).y);
+ maxY = qMax(maxY, vertices.at(i).y);
+ }
+ int w = maxX - minX;
+ int h = maxY - minY;
+ qreal border = qMin(w, h) / 10.0;
+ m_window = QRectF(minX - border, minY - border, (maxX - minX + 2 * border), (maxY - minY + 2 * border));
+}
+
+void QTriangulator::ComplexToSimple::DebugDialog::paintEvent(QPaintEvent *)
+{
+ QPainter p(this);
+ p.setRenderHint(QPainter::Antialiasing, true);
+ p.fillRect(rect(), Qt::black);
+ QDataBuffer<QPodPoint> &vertices = m_parent->m_parent->m_vertices;
+ if (vertices.isEmpty())
+ return;
+
+ qreal halfPointSize = qMin(m_window.width(), m_window.height()) / 300.0;
+ p.setWindow(m_window.toRect());
+
+ p.setPen(Qt::white);
+
+ QDataBuffer<Edge> &edges = m_parent->m_edges;
+ for (int i = 0; i < edges.size(); ++i) {
+ QPodPoint u = vertices.at(edges.at(i).from);
+ QPodPoint v = vertices.at(edges.at(i).to);
+ p.drawLine(u.x, u.y, v.x, v.y);
+ }
+
+ for (int i = 0; i < vertices.size(); ++i) {
+ QPodPoint q = vertices.at(i);
+ p.fillRect(QRectF(q.x - halfPointSize, q.y - halfPointSize, 2 * halfPointSize, 2 * halfPointSize), Qt::red);
+ }
+
+ Qt::GlobalColor colors[6] = {Qt::red, Qt::green, Qt::blue, Qt::cyan, Qt::magenta, Qt::yellow};
+ p.setOpacity(0.5);
+ int count = 0;
+ if (m_parent->m_edgeList.root) {
+ QRBTree<int>::Node *current = m_parent->m_edgeList.front(m_parent->m_edgeList.root);
+ while (current) {
+ p.setPen(colors[count++ % 6]);
+ QPodPoint u = vertices.at(edges.at(current->data).from);
+ QPodPoint v = vertices.at(edges.at(current->data).to);
+ p.drawLine(u.x, u.y, v.x, v.y);
+ current = m_parent->m_edgeList.next(current);
+ }
+ }
+
+ p.setOpacity(1.0);
+ QPodPoint q = vertices.at(m_vertex);
+ p.fillRect(QRectF(q.x - halfPointSize, q.y - halfPointSize, 2 * halfPointSize, 2 * halfPointSize), Qt::green);
+
+ p.setPen(Qt::gray);
+ QDataBuffer<Split> &splits = m_parent->m_splits;
+ for (int i = 0; i < splits.size(); ++i) {
+ QPodPoint q = vertices.at(splits.at(i).vertex);
+ QPodPoint u = vertices.at(edges.at(splits.at(i).edge).from) - q;
+ QPodPoint v = vertices.at(edges.at(splits.at(i).edge).to) - q;
+ qreal uLen = sqrt(qreal(qDot(u, u)));
+ qreal vLen = sqrt(qreal(qDot(v, v)));
+ if (uLen) {
+ u.x *= 2 * halfPointSize / uLen;
+ u.y *= 2 * halfPointSize / uLen;
+ }
+ if (vLen) {
+ v.x *= 2 * halfPointSize / vLen;
+ v.y *= 2 * halfPointSize / vLen;
+ }
+ u += q;
+ v += q;
+ p.drawLine(u.x, u.y, v.x, v.y);
+ }
+}
+
+void QTriangulator::ComplexToSimple::DebugDialog::wheelEvent(QWheelEvent *event)
+{
+ qreal scale = exp(-0.001 * event->delta());
+ QPointF center = m_window.center();
+ QPointF delta = scale * (m_window.bottomRight() - center);
+ m_window = QRectF(center - delta, center + delta);
+ event->accept();
+ update();
+}
+
+void QTriangulator::ComplexToSimple::DebugDialog::mouseMoveEvent(QMouseEvent *event)
+{
+ if (event->buttons() & Qt::LeftButton) {
+ QPointF delta = event->pos() - m_lastMousePos;
+ delta.setX(delta.x() * m_window.width() / width());
+ delta.setY(delta.y() * m_window.height() / height());
+ m_window.translate(-delta.x(), -delta.y());
+ m_lastMousePos = event->pos();
+ event->accept();
+ update();
+ }
+}
+
+void QTriangulator::ComplexToSimple::DebugDialog::mousePressEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton)
+ m_lastMousePos = event->pos();
+ event->accept();
+}
+
+
+#endif
+
+//============================================================================//
+// QTriangulator::SimpleToMonotone //
+//============================================================================//
+
+void QTriangulator::SimpleToMonotone::decompose()
+{
+ setupDataStructures();
+ removeZeroLengthEdges();
+ monotoneDecomposition();
+
+ m_parent->m_indices.clear();
+ QBitArray processed(m_edges.size(), false);
+ for (int first = 0; first < m_edges.size(); ++first) {
+ if (processed.at(first))
+ continue;
+ int i = first;
+ do {
+ Q_ASSERT(!processed.at(i));
+ Q_ASSERT(m_edges.at(m_edges.at(i).next).previous == i);
+ m_parent->m_indices.push_back(m_edges.at(i).from);
+ processed.setBit(i);
+ i = m_edges.at(i).next;
+ } while (i != first);
+ if (m_parent->m_indices.size() > 0 && m_parent->m_indices.back() != Q_TRIANGULATE_END_OF_POLYGON)
+ m_parent->m_indices.push_back(Q_TRIANGULATE_END_OF_POLYGON);
+ }
+}
+
+void QTriangulator::SimpleToMonotone::setupDataStructures()
+{
+ int i = 0;
+ Edge e;
+ e.node = 0;
+ e.twin = -1;
+
+ while (i + 3 <= m_parent->m_indices.size()) {
+ int start = m_edges.size();
+
+ do {
+ e.from = m_parent->m_indices.at(i);
+ e.type = RegularVertex;
+ e.next = m_edges.size() + 1;
+ e.previous = m_edges.size() - 1;
+ m_edges.add(e);
+ ++i;
+ Q_ASSERT(i < m_parent->m_indices.size());
+ } while (m_parent->m_indices.at(i) != Q_TRIANGULATE_END_OF_POLYGON);
+
+ m_edges.last().next = start;
+ m_edges.at(start).previous = m_edges.size() - 1;
+ ++i; // Skip Q_TRIANGULATE_END_OF_POLYGON.
+ }
+
+ for (i = 0; i < m_edges.size(); ++i) {
+ m_edges.at(i).to = m_edges.at(m_edges.at(i).next).from;
+ m_edges.at(i).pointingUp = m_parent->m_vertices.at(m_edges.at(i).to) < m_parent->m_vertices.at(m_edges.at(i).from);
+ m_edges.at(i).helper = -1; // Not initialized here.
+ }
+}
+
+void QTriangulator::SimpleToMonotone::removeZeroLengthEdges()
+{
+ for (int i = 0; i < m_edges.size(); ++i) {
+ if (m_parent->m_vertices.at(m_edges.at(i).from) == m_parent->m_vertices.at(m_edges.at(i).to)) {
+ m_edges.at(m_edges.at(i).previous).next = m_edges.at(i).next;
+ m_edges.at(m_edges.at(i).next).previous = m_edges.at(i).previous;
+ m_edges.at(m_edges.at(i).next).from = m_edges.at(i).from;
+ m_edges.at(i).next = -1; // Mark as removed.
+ }
+ }
+
+ QDataBuffer<int> newMapping(m_edges.size());
+ newMapping.resize(m_edges.size());
+ int count = 0;
+ for (int i = 0; i < m_edges.size(); ++i) {
+ if (m_edges.at(i).next != -1) {
+ m_edges.at(count) = m_edges.at(i);
+ newMapping.at(i) = count;
+ ++count;
+ }
+ }
+ m_edges.resize(count);
+ for (int i = 0; i < m_edges.size(); ++i) {
+ m_edges.at(i).next = newMapping.at(m_edges.at(i).next);
+ m_edges.at(i).previous = newMapping.at(m_edges.at(i).previous);
+ }
+}
+
+void QTriangulator::SimpleToMonotone::fillPriorityQueue()
+{
+ m_upperVertex.reset();
+ m_upperVertex.reserve(m_edges.size());
+ for (int i = 0; i < m_edges.size(); ++i)
+ m_upperVertex.add(i);
+ CompareVertices cmp(this);
+ //qSort(m_upperVertex.data(), m_upperVertex.data() + m_upperVertex.size(), cmp);
+ sort(m_upperVertex.data(), m_upperVertex.size(), cmp);
+ //for (int i = 1; i < m_upperVertex.size(); ++i) {
+ // Q_ASSERT(!cmp(m_upperVertex.at(i), m_upperVertex.at(i - 1)));
+ //}
+}
+
+bool QTriangulator::SimpleToMonotone::edgeIsLeftOfEdge(int leftEdgeIndex, int rightEdgeIndex) const
+{
+ const Edge &leftEdge = m_edges.at(leftEdgeIndex);
+ const Edge &rightEdge = m_edges.at(rightEdgeIndex);
+ const QPodPoint &u = m_parent->m_vertices.at(rightEdge.upper());
+ const QPodPoint &l = m_parent->m_vertices.at(rightEdge.lower());
+ qint64 d = qPointDistanceFromLine(m_parent->m_vertices.at(leftEdge.upper()), l, u);
+ // d < 0: left, d > 0: right, d == 0: on top
+ if (d == 0)
+ d = qPointDistanceFromLine(m_parent->m_vertices.at(leftEdge.lower()), l, u);
+ return d < 0;
+}
+
+// Returns the rightmost edge not to the right of the given edge.
+QRBTree<int>::Node *QTriangulator::SimpleToMonotone::searchEdgeLeftOfEdge(int edgeIndex) const
+{
+ QRBTree<int>::Node *current = m_edgeList.root;
+ QRBTree<int>::Node *result = 0;
+ while (current) {
+ if (edgeIsLeftOfEdge(edgeIndex, current->data)) {
+ current = current->left;
+ } else {
+ result = current;
+ current = current->right;
+ }
+ }
+ return result;
+}
+
+// Returns the rightmost edge left of the given point.
+QRBTree<int>::Node *QTriangulator::SimpleToMonotone::searchEdgeLeftOfPoint(int pointIndex) const
+{
+ QRBTree<int>::Node *current = m_edgeList.root;
+ QRBTree<int>::Node *result = 0;
+ while (current) {
+ const QPodPoint &p1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
+ const QPodPoint &p2 = m_parent->m_vertices.at(m_edges.at(current->data).upper());
+ qint64 d = qPointDistanceFromLine(m_parent->m_vertices.at(pointIndex), p1, p2);
+ if (d <= 0) {
+ current = current->left;
+ } else {
+ result = current;
+ current = current->right;
+ }
+ }
+ return result;
+}
+
+void QTriangulator::SimpleToMonotone::classifyVertex(int i)
+{
+ Edge &e2 = m_edges.at(i);
+ const Edge &e1 = m_edges.at(e2.previous);
+
+ bool startOrSplit = (e1.pointingUp && !e2.pointingUp);
+ bool endOrMerge = (!e1.pointingUp && e2.pointingUp);
+
+ const QPodPoint &p1 = m_parent->m_vertices.at(e1.from);
+ const QPodPoint &p2 = m_parent->m_vertices.at(e2.from);
+ const QPodPoint &p3 = m_parent->m_vertices.at(e2.to);
+ qint64 d = qPointDistanceFromLine(p1, p2, p3);
+ Q_ASSERT(d != 0 || (!startOrSplit && !endOrMerge));
+
+ e2.type = RegularVertex;
+
+ if (m_clockwiseOrder) {
+ if (startOrSplit)
+ e2.type = (d < 0 ? SplitVertex : StartVertex);
+ else if (endOrMerge)
+ e2.type = (d < 0 ? MergeVertex : EndVertex);
+ } else {
+ if (startOrSplit)
+ e2.type = (d > 0 ? SplitVertex : StartVertex);
+ else if (endOrMerge)
+ e2.type = (d > 0 ? MergeVertex : EndVertex);
+ }
+}
+
+void QTriangulator::SimpleToMonotone::classifyVertices()
+{
+ for (int i = 0; i < m_edges.size(); ++i)
+ classifyVertex(i);
+}
+
+bool QTriangulator::SimpleToMonotone::pointIsInSector(const QPodPoint &p, const QPodPoint &v1, const QPodPoint &v2, const QPodPoint &v3)
+{
+ bool leftOfPreviousEdge = !qPointIsLeftOfLine(p, v2, v1);
+ bool leftOfNextEdge = !qPointIsLeftOfLine(p, v3, v2);
+
+ if (qPointIsLeftOfLine(v1, v2, v3))
+ return leftOfPreviousEdge && leftOfNextEdge;
+ else
+ return leftOfPreviousEdge || leftOfNextEdge;
+}
+
+bool QTriangulator::SimpleToMonotone::pointIsInSector(int vertex, int sector)
+{
+ const QPodPoint &center = m_parent->m_vertices.at(m_edges.at(sector).from);
+ // Handle degenerate edges.
+ while (m_parent->m_vertices.at(m_edges.at(vertex).from) == center)
+ vertex = m_edges.at(vertex).next;
+ int next = m_edges.at(sector).next;
+ while (m_parent->m_vertices.at(m_edges.at(next).from) == center)
+ next = m_edges.at(next).next;
+ int previous = m_edges.at(sector).previous;
+ while (m_parent->m_vertices.at(m_edges.at(previous).from) == center)
+ previous = m_edges.at(previous).previous;
+
+ const QPodPoint &p = m_parent->m_vertices.at(m_edges.at(vertex).from);
+ const QPodPoint &v1 = m_parent->m_vertices.at(m_edges.at(previous).from);
+ const QPodPoint &v3 = m_parent->m_vertices.at(m_edges.at(next).from);
+ if (m_clockwiseOrder)
+ return pointIsInSector(p, v3, center, v1);
+ else
+ return pointIsInSector(p, v1, center, v3);
+}
+
+int QTriangulator::SimpleToMonotone::findSector(int edge, int vertex)
+{
+ while (!pointIsInSector(vertex, edge)) {
+ edge = m_edges.at(m_edges.at(edge).previous).twin;
+ Q_ASSERT(edge != -1);
+ }
+ return edge;
+}
+
+void QTriangulator::SimpleToMonotone::createDiagonal(int lower, int upper)
+{
+ lower = findSector(lower, upper);
+ upper = findSector(upper, lower);
+
+ int prevLower = m_edges.at(lower).previous;
+ int prevUpper = m_edges.at(upper).previous;
+
+ Edge e;
+
+ e.twin = m_edges.size() + 1;
+ e.next = upper;
+ e.previous = prevLower;
+ e.from = m_edges.at(lower).from;
+ e.to = m_edges.at(upper).from;
+ m_edges.at(upper).previous = m_edges.at(prevLower).next = int(m_edges.size());
+ m_edges.add(e);
+
+ e.twin = m_edges.size() - 1;
+ e.next = lower;
+ e.previous = prevUpper;
+ e.from = m_edges.at(upper).from;
+ e.to = m_edges.at(lower).from;
+ m_edges.at(lower).previous = m_edges.at(prevUpper).next = int(m_edges.size());
+ m_edges.add(e);
+}
+
+void QTriangulator::SimpleToMonotone::monotoneDecomposition()
+{
+ if (m_edges.isEmpty())
+ return;
+
+ Q_ASSERT(!m_edgeList.root);
+ QDataBuffer<QPair<int, int> > diagonals;
+
+ int i = 0;
+ for (int index = 1; index < m_edges.size(); ++index) {
+ if (m_parent->m_vertices.at(m_edges.at(index).from) < m_parent->m_vertices.at(m_edges.at(i).from))
+ i = index;
+ }
+ Q_ASSERT(i < m_edges.size());
+ int j = m_edges.at(i).previous;
+ Q_ASSERT(j < m_edges.size());
+ m_clockwiseOrder = qPointIsLeftOfLine(m_parent->m_vertices.at(m_edges.at(i).from),
+ m_parent->m_vertices.at(m_edges.at(j).from), m_parent->m_vertices.at(m_edges.at(i).to));
+
+ classifyVertices();
+ fillPriorityQueue();
+
+ // debug: set helpers explicitly (shouldn't be necessary)
+ //for (int i = 0; i < m_edges.size(); ++i)
+ // m_edges.at(i).helper = m_edges.at(i).upper();
+
+ while (!m_upperVertex.isEmpty()) {
+ i = m_upperVertex.last();
+ Q_ASSERT(i < m_edges.size());
+ m_upperVertex.pop_back();
+ j = m_edges.at(i).previous;
+ Q_ASSERT(j < m_edges.size());
+
+ QRBTree<int>::Node *leftEdgeNode = 0;
+
+ switch (m_edges.at(i).type) {
+ case RegularVertex:
+ // If polygon interior is to the right of the vertex...
+ if (m_edges.at(i).pointingUp == m_clockwiseOrder) {
+ if (m_edges.at(i).node) {
+ Q_ASSERT(!m_edges.at(j).node);
+ if (m_edges.at(m_edges.at(i).helper).type == MergeVertex)
+ diagonals.add(QPair<int, int>(i, m_edges.at(i).helper));
+ m_edges.at(j).node = m_edges.at(i).node;
+ m_edges.at(i).node = 0;
+ m_edges.at(j).node->data = j;
+ m_edges.at(j).helper = i;
+ } else if (m_edges.at(j).node) {
+ Q_ASSERT(!m_edges.at(i).node);
+ if (m_edges.at(m_edges.at(j).helper).type == MergeVertex)
+ diagonals.add(QPair<int, int>(i, m_edges.at(j).helper));
+ m_edges.at(i).node = m_edges.at(j).node;
+ m_edges.at(j).node = 0;
+ m_edges.at(i).node->data = i;
+ m_edges.at(i).helper = i;
+ } else {
+ qWarning("Inconsistent polygon. (#1)");
+ }
+ } else {
+ leftEdgeNode = searchEdgeLeftOfPoint(m_edges.at(i).from);
+ if (leftEdgeNode) {
+ if (m_edges.at(m_edges.at(leftEdgeNode->data).helper).type == MergeVertex)
+ diagonals.add(QPair<int, int>(i, m_edges.at(leftEdgeNode->data).helper));
+ m_edges.at(leftEdgeNode->data).helper = i;
+ } else {
+ qWarning("Inconsistent polygon. (#2)");
+ }
+ }
+ break;
+ case SplitVertex:
+ leftEdgeNode = searchEdgeLeftOfPoint(m_edges.at(i).from);
+ if (leftEdgeNode) {
+ diagonals.add(QPair<int, int>(i, m_edges.at(leftEdgeNode->data).helper));
+ m_edges.at(leftEdgeNode->data).helper = i;
+ } else {
+ qWarning("Inconsistent polygon. (#3)");
+ }
+ // Fall through.
+ case StartVertex:
+ if (m_clockwiseOrder) {
+ leftEdgeNode = searchEdgeLeftOfEdge(j);
+ QRBTree<int>::Node *node = m_edgeList.newNode();
+ node->data = j;
+ m_edges.at(j).node = node;
+ m_edges.at(j).helper = i;
+ m_edgeList.attachAfter(leftEdgeNode, node);
+ Q_ASSERT(m_edgeList.verify());
+ } else {
+ leftEdgeNode = searchEdgeLeftOfEdge(i);
+ QRBTree<int>::Node *node = m_edgeList.newNode();
+ node->data = i;
+ m_edges.at(i).node = node;
+ m_edges.at(i).helper = i;
+ m_edgeList.attachAfter(leftEdgeNode, node);
+ Q_ASSERT(m_edgeList.verify());
+ }
+ break;
+ case MergeVertex:
+ leftEdgeNode = searchEdgeLeftOfPoint(m_edges.at(i).from);
+ if (leftEdgeNode) {
+ if (m_edges.at(m_edges.at(leftEdgeNode->data).helper).type == MergeVertex)
+ diagonals.add(QPair<int, int>(i, m_edges.at(leftEdgeNode->data).helper));
+ m_edges.at(leftEdgeNode->data).helper = i;
+ } else {
+ qWarning("Inconsistent polygon. (#4)");
+ }
+ // Fall through.
+ case EndVertex:
+ if (m_clockwiseOrder) {
+ if (m_edges.at(m_edges.at(i).helper).type == MergeVertex)
+ diagonals.add(QPair<int, int>(i, m_edges.at(i).helper));
+ if (m_edges.at(i).node) {
+ m_edgeList.deleteNode(m_edges.at(i).node);
+ Q_ASSERT(m_edgeList.verify());
+ } else {
+ qWarning("Inconsistent polygon. (#5)");
+ }
+ } else {
+ if (m_edges.at(m_edges.at(j).helper).type == MergeVertex)
+ diagonals.add(QPair<int, int>(i, m_edges.at(j).helper));
+ if (m_edges.at(j).node) {
+ m_edgeList.deleteNode(m_edges.at(j).node);
+ Q_ASSERT(m_edgeList.verify());
+ } else {
+ qWarning("Inconsistent polygon. (#6)");
+ }
+ }
+ break;
+ }
+ }
+
+ for (int i = 0; i < diagonals.size(); ++i)
+ createDiagonal(diagonals.at(i).first, diagonals.at(i).second);
+}
+
+bool QTriangulator::SimpleToMonotone::CompareVertices::operator () (int i, int j) const
+{
+ if (m_parent->m_edges.at(i).from == m_parent->m_edges.at(j).from)
+ return m_parent->m_edges.at(i).type > m_parent->m_edges.at(j).type;
+ return m_parent->m_parent->m_vertices.at(m_parent->m_edges.at(i).from) >
+ m_parent->m_parent->m_vertices.at(m_parent->m_edges.at(j).from);
+}
+
+//============================================================================//
+// QTriangulator::MonotoneToTriangles //
+//============================================================================//
+
+void QTriangulator::MonotoneToTriangles::decompose()
+{
+ QVector<quint32> result;
+ QDataBuffer<int> stack;
+ m_first = 0;
+ // Require at least three more indices.
+ while (m_first + 3 <= m_parent->m_indices.size()) {
+ m_length = 0;
+ while (m_parent->m_indices.at(m_first + m_length) != Q_TRIANGULATE_END_OF_POLYGON) {
+ ++m_length;
+ Q_ASSERT(m_first + m_length < m_parent->m_indices.size());
+ }
+ if (m_length < 3) {
+ m_first += m_length + 1;
+ continue;
+ }
+
+ int minimum = 0;
+ while (less(next(minimum), minimum))
+ minimum = next(minimum);
+ while (less(previous(minimum), minimum))
+ minimum = previous(minimum);
+
+ stack.reset();
+ stack.add(minimum);
+ int left = previous(minimum);
+ int right = next(minimum);
+ bool stackIsOnLeftSide;
+ bool clockwiseOrder = leftOfEdge(minimum, left, right);
+
+ if (less(left, right)) {
+ stack.add(left);
+ left = previous(left);
+ stackIsOnLeftSide = true;
+ } else {
+ stack.add(right);
+ right = next(right);
+ stackIsOnLeftSide = false;
+ }
+
+ for (int count = 0; count + 2 < m_length; ++count)
+ {
+ Q_ASSERT(stack.size() >= 2);
+ if (less(left, right)) {
+ if (stackIsOnLeftSide == false) {
+ for (int i = 0; i + 1 < stack.size(); ++i) {
+ result.push_back(indices(stack.at(i + 1)));
+ result.push_back(indices(left));
+ result.push_back(indices(stack.at(i)));
+ }
+ stack.first() = stack.last();
+ stack.resize(1);
+ } else {
+ while (stack.size() >= 2 && (clockwiseOrder ^ !leftOfEdge(left, stack.at(stack.size() - 2), stack.last()))) {
+ result.push_back(indices(stack.at(stack.size() - 2)));
+ result.push_back(indices(left));
+ result.push_back(indices(stack.last()));
+ stack.pop_back();
+ }
+ }
+ stack.add(left);
+ left = previous(left);
+ stackIsOnLeftSide = true;
+ } else {
+ if (stackIsOnLeftSide == true) {
+ for (int i = 0; i + 1 < stack.size(); ++i) {
+ result.push_back(indices(stack.at(i)));
+ result.push_back(indices(right));
+ result.push_back(indices(stack.at(i + 1)));
+ }
+ stack.first() = stack.last();
+ stack.resize(1);
+ } else {
+ while (stack.size() >= 2 && (clockwiseOrder ^ !leftOfEdge(right, stack.last(), stack.at(stack.size() - 2)))) {
+ result.push_back(indices(stack.last()));
+ result.push_back(indices(right));
+ result.push_back(indices(stack.at(stack.size() - 2)));
+ stack.pop_back();
+ }
+ }
+ stack.add(right);
+ right = next(right);
+ stackIsOnLeftSide = false;
+ }
+ }
+
+ m_first += m_length + 1;
+ }
+ m_parent->m_indices = result;
+}
+
+//============================================================================//
+// qTriangulate //
+//============================================================================//
+
+QTriangleSet qTriangulate(const qreal *polygon, int count, uint hint, const QTransform &matrix)
+{
+ QTriangulator triangulator;
+ triangulator.initialize(polygon, count, hint, matrix);
+ return triangulator.triangulate();
+}
+
+QTriangleSet qTriangulate(const QVectorPath &path, const QTransform &matrix, qreal lod)
+{
+ QTriangulator triangulator;
+ triangulator.initialize(path, matrix, lod);
+ return triangulator.triangulate();
+}
+
+QTriangleSet qTriangulate(const QPainterPath &path, const QTransform &matrix, qreal lod)
+{
+ QTriangulator triangulator;
+ triangulator.initialize(path, matrix, lod);
+ return triangulator.triangulate();
+}
+
+QPolylineSet qPolyline(const QVectorPath &path, const QTransform &matrix, qreal lod)
+{
+ QTriangulator triangulator;
+ triangulator.initialize(path, matrix, lod);
+ return triangulator.polyline();
+}
+
+QPolylineSet qPolyline(const QPainterPath &path, const QTransform &matrix, qreal lod)
+{
+ QTriangulator triangulator;
+ triangulator.initialize(path, matrix, lod);
+ return triangulator.polyline();
+}
+
+QT_END_NAMESPACE
diff --git a/src/opengl/gl2paintengineex/qtriangulator_p.h b/src/opengl/gl2paintengineex/qtriangulator_p.h
new file mode 100644
index 0000000000..e5eec39f57
--- /dev/null
+++ b/src/opengl/gl2paintengineex/qtriangulator_p.h
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** 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 QtOpenGL module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTRIANGULATOR_P_H
+#define QTRIANGULATOR_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qvector.h>
+#include <QtGui/private/qvectorpath_p.h>
+
+QT_BEGIN_NAMESPACE
+
+#define Q_TRIANGULATE_END_OF_POLYGON quint32(-1)
+
+struct QTriangleSet
+{
+ inline QTriangleSet() { }
+ inline QTriangleSet(const QTriangleSet &other) : vertices(other.vertices), indices(other.indices) { }
+ QTriangleSet &operator = (const QTriangleSet &other) {vertices = other.vertices; indices = other.indices; return *this;}
+
+ // The vertices of a triangle are given by: (x[i[n]], y[i[n]]), (x[j[n]], y[j[n]]), (x[k[n]], y[k[n]]), n = 0, 1, ...
+ QVector<qreal> vertices; // [x[0], y[0], x[1], y[1], x[2], ...]
+ QVector<quint32> indices; // [i[0], j[0], k[0], i[1], j[1], k[1], i[2], ...]
+};
+
+struct QPolylineSet
+{
+ inline QPolylineSet() { }
+ inline QPolylineSet(const QPolylineSet &other) : vertices(other.vertices), indices(other.indices) { }
+ QPolylineSet &operator = (const QPolylineSet &other) {vertices = other.vertices; indices = other.indices; return *this;}
+
+ QVector<qreal> vertices; // [x[0], y[0], x[1], y[1], x[2], ...]
+ QVector<quint32> indices;
+
+};
+
+// The vertex coordinates of the returned triangle set will be rounded to a grid with a mesh size
+// of 1/32. The polygon is first transformed, then scaled by 32, the coordinates are rounded to
+// integers, the polygon is triangulated, and then scaled back by 1/32.
+// 'hint' should be a combination of QVectorPath::Hints.
+// 'lod' is the level of detail. Default is 1. Curves are split into more lines when 'lod' is higher.
+QTriangleSet qTriangulate(const qreal *polygon, int count, uint hint = QVectorPath::PolygonHint | QVectorPath::OddEvenFill, const QTransform &matrix = QTransform());
+QTriangleSet qTriangulate(const QVectorPath &path, const QTransform &matrix = QTransform(), qreal lod = 1);
+QTriangleSet qTriangulate(const QPainterPath &path, const QTransform &matrix = QTransform(), qreal lod = 1);
+QPolylineSet qPolyline(const QVectorPath &path, const QTransform &matrix = QTransform(), qreal lod = 1);
+QPolylineSet qPolyline(const QPainterPath &path, const QTransform &matrix = QTransform(), qreal lod = 1);
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro
index 60768910c1..ff42a49e3c 100644
--- a/src/opengl/opengl.pro
+++ b/src/opengl/opengl.pro
@@ -13,7 +13,6 @@ include(../qbase.pri)
!win32:!embedded:!mac:CONFIG += x11
contains(QT_CONFIG, opengl):CONFIG += opengl
contains(QT_CONFIG, opengles1):CONFIG += opengles1
-contains(QT_CONFIG, opengles1cl):CONFIG += opengles1cl
contains(QT_CONFIG, opengles2):CONFIG += opengles2
contains(QT_CONFIG, egl):CONFIG += egl
@@ -26,6 +25,7 @@ HEADERS += qgl.h \
qglframebufferobject_p.h \
qglextensions_p.h \
qglpaintdevice_p.h \
+ qglbuffer.h \
SOURCES += qgl.cpp \
@@ -34,6 +34,7 @@ SOURCES += qgl.cpp \
qglframebufferobject.cpp \
qglextensions.cpp \
qglpaintdevice.cpp \
+ qglbuffer.cpp \
!contains(QT_CONFIG, opengles2) {
@@ -41,7 +42,7 @@ SOURCES += qgl.cpp \
SOURCES += qpaintengine_opengl.cpp
}
-!contains(QT_CONFIG, opengles1):!contains(QT_CONFIG, opengles1cl) {
+!contains(QT_CONFIG, opengles1) {
HEADERS += qglshaderprogram.h \
qglpixmapfilter_p.h \
qgraphicsshadereffect_p.h \
@@ -55,6 +56,7 @@ SOURCES += qgl.cpp \
gl2paintengineex/qglengineshadersource_p.h \
gl2paintengineex/qglcustomshaderstage_p.h \
gl2paintengineex/qtriangulatingstroker_p.h \
+ gl2paintengineex/qtriangulator_p.h \
gl2paintengineex/qtextureglyphcache_gl_p.h
SOURCES += qglshaderprogram.cpp \
@@ -69,12 +71,13 @@ SOURCES += qgl.cpp \
gl2paintengineex/qpaintengineex_opengl2.cpp \
gl2paintengineex/qglcustomshaderstage.cpp \
gl2paintengineex/qtriangulatingstroker.cpp \
+ gl2paintengineex/qtriangulator.cpp \
gl2paintengineex/qtextureglyphcache_gl.cpp
}
x11 {
- contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles1cl)|contains(QT_CONFIG, opengles2) {
+ contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
SOURCES += qgl_x11egl.cpp \
qglpixelbuffer_egl.cpp \
qgl_egl.cpp \
@@ -121,8 +124,7 @@ wince*: {
qglpixelbuffer_egl.cpp \
qgl_egl.cpp
- HEADERS += qgl_cl_p.h \
- qgl_egl_p.h \
+ HEADERS += qgl_egl_p.h
}
embedded {
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index ca898c7552..e0030adec6 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -67,7 +67,7 @@
#include "qimage.h"
#include "qgl_p.h"
-#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
+#if !defined(QT_OPENGL_ES_1)
#include "gl2paintengineex/qpaintengineex_opengl2_p.h"
#endif
@@ -95,11 +95,6 @@
QT_BEGIN_NAMESPACE
-#ifdef QT_OPENGL_ES_1_CL
-#include "qgl_cl_p.h"
-#endif
-
-
#if defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_QWS)
QGLExtensionFuncs QGLContextPrivate::qt_extensionFuncs;
#endif
@@ -226,6 +221,9 @@ bool qt_gl_preferGL2Engine()
\value DirectRendering Specifies that the context is used for direct rendering to a display.
\value HasOverlay Enables the use of an overlay.
\value SampleBuffers Enables the use of sample buffers.
+ \value DeprecatedFunctions Enables the use of deprecated functionality for OpenGL 3.x
+ contexts. A context with deprecated functionality enabled is
+ called a full context in the OpenGL specification.
\value SingleBuffer Specifies the use of a single buffer, as opposed to double buffers.
\value NoDepthBuffer Disables the use of a depth buffer.
\value ColorIndex Specifies that the context should use a color index as its pixel format.
@@ -236,6 +234,9 @@ bool qt_gl_preferGL2Engine()
\value IndirectRendering Specifies that the context is used for indirect rendering to a buffer.
\value NoOverlay Disables the use of an overlay.
\value NoSampleBuffers Disables the use of sample buffers.
+ \value NoDeprecatedFunctions Disables the use of deprecated functionality for OpenGL 3.x
+ contexts. A context with deprecated functionality disabled is
+ called a forward compatible context in the OpenGL specification.
\sa {Sample Buffers Example}
*/
@@ -765,6 +766,7 @@ void QGLFormat::setSamples(int numSamples)
return;
}
d->numSamples = numSamples;
+ setSampleBuffers(numSamples > 0);
}
/*!
@@ -903,6 +905,7 @@ void QGLFormat::setDepthBufferSize(int size)
return;
}
d->depthSize = size;
+ setDepth(size > 0);
}
/*!
@@ -1016,7 +1019,7 @@ void QGLFormat::setAlphaBufferSize(int size)
return;
}
d->alphaSize = size;
- setOption(QGL::AlphaChannel);
+ setAlpha(size > 0);
}
/*!
@@ -1043,6 +1046,7 @@ void QGLFormat::setAccumBufferSize(int size)
return;
}
d->accumSize = size;
+ setAccum(size > 0);
}
/*!
@@ -1068,6 +1072,7 @@ void QGLFormat::setStencilBufferSize(int size)
return;
}
d->stencilSize = size;
+ setStencil(size > 0);
}
/*!
@@ -1081,6 +1086,90 @@ int QGLFormat::stencilBufferSize() const
}
/*!
+ \since 4.7
+
+ Set the OpenGL version to the \a major and \a minor numbers. If a
+ context compatible with the requested OpenGL version cannot be
+ created, a context compatible with version 1.x is created instead.
+
+ \sa majorVersion(), minorVersion()
+*/
+void QGLFormat::setVersion(int major, int minor)
+{
+ if (major < 1 || minor < 0) {
+ qWarning("QGLFormat::setVersion: Cannot set zero or negative version number %d.%d", major, minor);
+ return;
+ }
+ detach();
+ d->majorVersion = major;
+ d->minorVersion = minor;
+}
+
+/*!
+ \since 4.7
+
+ Returns the OpenGL major version.
+
+ \sa setVersion(), minorVersion()
+*/
+int QGLFormat::majorVersion() const
+{
+ return d->majorVersion;
+}
+
+/*!
+ \since 4.7
+
+ Returns the OpenGL minor version.
+
+ \sa setVersion(), majorVersion()
+*/
+int QGLFormat::minorVersion() const
+{
+ return d->minorVersion;
+}
+
+/*!
+ \enum QGLFormat::OpenGLContextProfile
+ \since 4.7
+
+ This enum describes the OpenGL context profiles that can be
+ specified for contexts implementing OpenGL version 3.2 or
+ higher. These profiles are different from OpenGL ES profiles.
+
+ \value NoProfile OpenGL version is lower than 3.2.
+ \value CoreProfile Functionality deprecated in OpenGL version 3.0 is not available.
+ \value CompatibilityProfile Functionality from earlier OpenGL versions is available.
+*/
+
+/*!
+ \since 4.7
+
+ Set the OpenGL context profile to \a profile. The \a profile is
+ ignored if the requested OpenGL version is less than 3.2.
+
+ \sa profile()
+*/
+void QGLFormat::setProfile(OpenGLContextProfile profile)
+{
+ detach();
+ d->profile = profile;
+}
+
+/*!
+ \since 4.7
+
+ Returns the OpenGL context profile.
+
+ \sa setProfile()
+*/
+QGLFormat::OpenGLContextProfile QGLFormat::profile() const
+{
+ return d->profile;
+}
+
+
+/*!
\fn bool QGLFormat::hasOpenGL()
Returns true if the window system has any OpenGL support;
@@ -1116,25 +1205,21 @@ QGLFormat::OpenGLVersionFlags Q_AUTOTEST_EXPORT qOpenGLVersionFlagsFromString(co
if (parts[2].startsWith(QLatin1String("1.1")))
versionFlags |= QGLFormat::OpenGL_ES_Common_Version_1_1 |
QGLFormat::OpenGL_ES_CommonLite_Version_1_1;
- }
- else {
+ } else {
// Not -CM, must be CL, CommonLite
versionFlags |= QGLFormat::OpenGL_ES_CommonLite_Version_1_0;
if (parts[2].startsWith(QLatin1String("1.1")))
versionFlags |= QGLFormat::OpenGL_ES_CommonLite_Version_1_1;
}
- }
- else {
+ } else {
// OpenGL ES version 2.0 or higher
versionFlags |= QGLFormat::OpenGL_ES_Version_2_0;
}
- }
- else {
+ } else {
// if < 3 parts to the name, it is an unrecognised OpenGL ES
qWarning("Unrecognised OpenGL ES version");
}
- }
- else {
+ } else {
// not ES, regular OpenGL, the version numbers are first in the string
if (versionString.startsWith(QLatin1String("1."))) {
switch (versionString[2].toAscii()) {
@@ -1151,30 +1236,35 @@ QGLFormat::OpenGLVersionFlags Q_AUTOTEST_EXPORT qOpenGLVersionFlagsFromString(co
default:
break;
}
- }
- else if (versionString.startsWith(QLatin1String("2."))) {
+ } else if (versionString.startsWith(QLatin1String("2."))) {
versionFlags |= QGLFormat::OpenGL_Version_1_1 |
QGLFormat::OpenGL_Version_1_2 |
QGLFormat::OpenGL_Version_1_3 |
QGLFormat::OpenGL_Version_1_4 |
QGLFormat::OpenGL_Version_1_5 |
QGLFormat::OpenGL_Version_2_0;
- QString minorVersion = versionString.section(QLatin1Char(' '), 0, 0).section(QLatin1Char('.'), 1, 1);
- if (minorVersion == QChar(QLatin1Char('1')))
+ if (versionString[2].toAscii() == '1')
versionFlags |= QGLFormat::OpenGL_Version_2_1;
- }
- else if (versionString.startsWith(QLatin1String("3."))) {
- versionFlags |= QGLFormat::OpenGL_Version_1_1 |
- QGLFormat::OpenGL_Version_1_2 |
- QGLFormat::OpenGL_Version_1_3 |
- QGLFormat::OpenGL_Version_1_4 |
- QGLFormat::OpenGL_Version_1_5 |
- QGLFormat::OpenGL_Version_2_0 |
- QGLFormat::OpenGL_Version_2_1 |
- QGLFormat::OpenGL_Version_3_0;
- }
- else
+ } else if (versionString.startsWith(QLatin1String("3."))) {
+ versionFlags |= QGLFormat::OpenGL_Version_1_1 |
+ QGLFormat::OpenGL_Version_1_2 |
+ QGLFormat::OpenGL_Version_1_3 |
+ QGLFormat::OpenGL_Version_1_4 |
+ QGLFormat::OpenGL_Version_1_5 |
+ QGLFormat::OpenGL_Version_2_0 |
+ QGLFormat::OpenGL_Version_2_1 |
+ QGLFormat::OpenGL_Version_3_0;
+ switch (versionString[2].toAscii()) {
+ case '2':
+ versionFlags |= QGLFormat::OpenGL_Version_3_2;
+ case '1':
+ versionFlags |= QGLFormat::OpenGL_Version_3_1;
+ default:
+ break;
+ }
+ } else {
qWarning("Unrecognised OpenGL version");
+ }
}
return versionFlags;
}
@@ -1206,6 +1296,12 @@ QGLFormat::OpenGLVersionFlags Q_AUTOTEST_EXPORT qOpenGLVersionFlagsFromString(co
\value OpenGL_Version_3_0 OpenGL version 3.0 or higher is present.
+ \value OpenGL_Version_3_1 OpenGL version 3.1 or higher is present.
+ Note that OpenGL version 3.1 or higher does not necessarily support all the features of
+ version 3.0 and lower.
+
+ \value OpenGL_Version_3_2 OpenGL version 3.2 or higher is present.
+
\value OpenGL_ES_CommonLite_Version_1_0 OpenGL ES version 1.0 Common Lite or higher is present.
\value OpenGL_ES_Common_Version_1_0 OpenGL ES version 1.0 Common or higher is present.
@@ -1377,14 +1473,20 @@ void QGLFormat::setDefaultOverlayFormat(const QGLFormat &f)
bool operator==(const QGLFormat& a, const QGLFormat& b)
{
- return (int) a.d->opts == (int) b.d->opts && a.d->pln == b.d->pln && a.d->alphaSize == b.d->alphaSize
- && a.d->accumSize == b.d->accumSize && a.d->stencilSize == b.d->stencilSize
+ return (a.d == b.d) || ((int) a.d->opts == (int) b.d->opts
+ && a.d->pln == b.d->pln
+ && a.d->alphaSize == b.d->alphaSize
+ && a.d->accumSize == b.d->accumSize
+ && a.d->stencilSize == b.d->stencilSize
&& a.d->depthSize == b.d->depthSize
&& a.d->redSize == b.d->redSize
&& a.d->greenSize == b.d->greenSize
&& a.d->blueSize == b.d->blueSize
&& a.d->numSamples == b.d->numSamples
- && a.d->swapInterval == b.d->swapInterval;
+ && a.d->swapInterval == b.d->swapInterval
+ && a.d->majorVersion == b.d->majorVersion
+ && a.d->minorVersion == b.d->minorVersion
+ && a.d->profile == b.d->profile);
}
@@ -1481,6 +1583,7 @@ void QGLContextPrivate::init(QPaintDevice *dev, const QGLFormat &format)
vi = 0;
#endif
#if defined(QT_OPENGL_ES)
+ ownsEglContext = false;
eglContext = 0;
eglSurface = EGL_NO_SURFACE;
#endif
@@ -1558,7 +1661,7 @@ QImage qt_gl_read_texture(const QSize &size, bool alpha_format, bool include_alp
QImage img(size, alpha_format ? QImage::Format_ARGB32_Premultiplied : QImage::Format_RGB32);
int w = size.width();
int h = size.height();
-#if !defined(QT_OPENGL_ES_2) && !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
+#if !defined(QT_OPENGL_ES_2) && !defined(QT_OPENGL_ES_1)
//### glGetTexImage not in GL ES 2.0, need to do something else here!
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, img.bits());
#endif
@@ -1586,14 +1689,12 @@ typedef void (*_qt_image_cleanup_hook_64)(qint64);
extern Q_GUI_EXPORT _qt_pixmap_cleanup_hook_64 qt_pixmap_cleanup_hook_64;
extern Q_GUI_EXPORT _qt_image_cleanup_hook_64 qt_image_cleanup_hook_64;
-static QGLTextureCache *qt_gl_texture_cache = 0;
+
+Q_GLOBAL_STATIC(QGLTextureCache, qt_gl_texture_cache)
QGLTextureCache::QGLTextureCache()
: m_cache(64*1024) // cache ~64 MB worth of textures - this is not accurate though
{
- Q_ASSERT(qt_gl_texture_cache == 0);
- qt_gl_texture_cache = this;
-
QImagePixmapCleanupHooks::instance()->addPixmapDataModificationHook(cleanupTexturesForPixampData);
QImagePixmapCleanupHooks::instance()->addPixmapDataDestructionHook(cleanupBeforePixmapDestruction);
QImagePixmapCleanupHooks::instance()->addImageHook(cleanupTexturesForCacheKey);
@@ -1601,8 +1702,7 @@ QGLTextureCache::QGLTextureCache()
QGLTextureCache::~QGLTextureCache()
{
- qt_gl_texture_cache = 0;
-
+ Q_ASSERT(size() == 0);
QImagePixmapCleanupHooks::instance()->removePixmapDataModificationHook(cleanupTexturesForPixampData);
QImagePixmapCleanupHooks::instance()->removePixmapDataDestructionHook(cleanupBeforePixmapDestruction);
QImagePixmapCleanupHooks::instance()->removeImageHook(cleanupTexturesForCacheKey);
@@ -1610,6 +1710,7 @@ QGLTextureCache::~QGLTextureCache()
void QGLTextureCache::insert(QGLContext* ctx, qint64 key, QGLTexture* texture, int cost)
{
+ QWriteLocker locker(&m_lock);
if (m_cache.totalCost() + cost > m_cache.maxCost()) {
// the cache is full - make an attempt to remove something
const QList<qint64> keys = m_cache.keys();
@@ -1627,6 +1728,7 @@ void QGLTextureCache::insert(QGLContext* ctx, qint64 key, QGLTexture* texture, i
bool QGLTextureCache::remove(QGLContext* ctx, GLuint textureId)
{
+ QWriteLocker locker(&m_lock);
QList<qint64> keys = m_cache.keys();
for (int i = 0; i < keys.size(); ++i) {
QGLTexture *tex = m_cache.object(keys.at(i));
@@ -1641,6 +1743,7 @@ bool QGLTextureCache::remove(QGLContext* ctx, GLuint textureId)
void QGLTextureCache::removeContextTextures(QGLContext* ctx)
{
+ QWriteLocker locker(&m_lock);
QList<qint64> keys = m_cache.keys();
for (int i = 0; i < keys.size(); ++i) {
const qint64 &key = keys.at(i);
@@ -1649,25 +1752,14 @@ void QGLTextureCache::removeContextTextures(QGLContext* ctx)
}
}
-QGLTextureCache* QGLTextureCache::instance()
-{
- if (!qt_gl_texture_cache)
- qt_gl_texture_cache = new QGLTextureCache;
-
- return qt_gl_texture_cache;
-}
-
/*
a hook that removes textures from the cache when a pixmap/image
is deref'ed
*/
void QGLTextureCache::cleanupTexturesForCacheKey(qint64 cacheKey)
{
- // ### remove when the GL texture cache becomes thread-safe
- if (qApp->thread() == QThread::currentThread()) {
- instance()->remove(cacheKey);
- Q_ASSERT(instance()->getTexture(cacheKey) == 0);
- }
+ qt_gl_texture_cache()->remove(cacheKey);
+ Q_ASSERT(qt_gl_texture_cache()->getTexture(cacheKey) == 0);
}
@@ -1689,10 +1781,9 @@ void QGLTextureCache::cleanupBeforePixmapDestruction(QPixmapData* pmd)
#endif
}
-void QGLTextureCache::deleteIfEmpty()
+QGLTextureCache *QGLTextureCache::instance()
{
- if (instance()->size() == 0)
- delete instance();
+ return qt_gl_texture_cache();
}
// DDS format structure
@@ -1858,7 +1949,6 @@ QGLContext::~QGLContext()
{
// remove any textures cached in this context
QGLTextureCache::instance()->removeContextTextures(this);
- QGLTextureCache::deleteIfEmpty(); // ### thread safety
d_ptr->group->cleanupResources(this);
@@ -2290,7 +2380,7 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
#ifndef QT_NO_DEBUG
GLenum error = glGetError();
if (error != GL_NO_ERROR) {
- qWarning(" - texture upload failed, error code 0x%x\n", error);
+ qWarning(" - texture upload failed, error code 0x%x, enum: %d (%x)\n", error, target, target);
}
#endif
@@ -2327,7 +2417,7 @@ QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target,
{
Q_Q(QGLContext);
QPixmapData *pd = pixmap.pixmapData();
-#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
+#if !defined(QT_OPENGL_ES_1)
if (target == GL_TEXTURE_2D && pd->classId() == QPixmapData::OpenGLClass) {
const QGLPixmapData *data = static_cast<const QGLPixmapData *>(pd);
@@ -2579,41 +2669,41 @@ void QGLContext::deleteTexture(QMacCompatGLuint id)
}
#endif
-void qt_add_rect_to_array(const QRectF &r, q_vertexType *array)
+void qt_add_rect_to_array(const QRectF &r, GLfloat *array)
{
qreal left = r.left();
qreal right = r.right();
qreal top = r.top();
qreal bottom = r.bottom();
- array[0] = f2vt(left);
- array[1] = f2vt(top);
- array[2] = f2vt(right);
- array[3] = f2vt(top);
- array[4] = f2vt(right);
- array[5] = f2vt(bottom);
- array[6] = f2vt(left);
- array[7] = f2vt(bottom);
+ array[0] = left;
+ array[1] = top;
+ array[2] = right;
+ array[3] = top;
+ array[4] = right;
+ array[5] = bottom;
+ array[6] = left;
+ array[7] = bottom;
}
-void qt_add_texcoords_to_array(qreal x1, qreal y1, qreal x2, qreal y2, q_vertexType *array)
+void qt_add_texcoords_to_array(qreal x1, qreal y1, qreal x2, qreal y2, GLfloat *array)
{
- array[0] = f2vt(x1);
- array[1] = f2vt(y1);
- array[2] = f2vt(x2);
- array[3] = f2vt(y1);
- array[4] = f2vt(x2);
- array[5] = f2vt(y2);
- array[6] = f2vt(x1);
- array[7] = f2vt(y2);
+ array[0] = x1;
+ array[1] = y1;
+ array[2] = x2;
+ array[3] = y1;
+ array[4] = x2;
+ array[5] = y2;
+ array[6] = x1;
+ array[7] = y2;
}
#if !defined(QT_OPENGL_ES_2)
static void qDrawTextureRect(const QRectF &target, GLint textureWidth, GLint textureHeight, GLenum textureTarget)
{
- q_vertexType tx = f2vt(1);
- q_vertexType ty = f2vt(1);
+ GLfloat tx = 1.0f;
+ GLfloat ty = 1.0f;
#ifdef QT_OPENGL_ES
Q_UNUSED(textureWidth);
@@ -2626,20 +2716,20 @@ static void qDrawTextureRect(const QRectF &target, GLint textureWidth, GLint tex
glGetTexLevelParameteriv(textureTarget, 0, GL_TEXTURE_HEIGHT, &textureHeight);
}
- tx = f2vt(textureWidth);
- ty = f2vt(textureHeight);
+ tx = GLfloat(textureWidth);
+ ty = GLfloat(textureHeight);
}
#endif
- q_vertexType texCoordArray[4*2] = {
+ GLfloat texCoordArray[4*2] = {
0, ty, tx, ty, tx, 0, 0, 0
};
- q_vertexType vertexArray[4*2];
+ GLfloat vertexArray[4*2];
qt_add_rect_to_array(target, vertexArray);
- glVertexPointer(2, q_vertexTypeEnum, 0, vertexArray);
- glTexCoordPointer(2, q_vertexTypeEnum, 0, texCoordArray);
+ glVertexPointer(2, GL_FLOAT, 0, vertexArray);
+ glTexCoordPointer(2, GL_FLOAT, 0, texCoordArray);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
@@ -3192,6 +3282,7 @@ void QGLContextPrivate::setCurrentContext(QGLContext *context)
*/
+
/*****************************************************************************
QGLWidget implementation
*****************************************************************************/
@@ -3312,6 +3403,15 @@ void QGLContextPrivate::setCurrentContext(QGLContext *context)
One approach to doing this is shown in the
\l{Overpainting Example}{Overpainting} example.
+ \section1 Threading
+
+ It is possible to render into a QGLWidget from another thread, but it
+ requires that all access to the GL context is safe guarded. The Qt GUI
+ thread will try to use the context in resizeEvent and paintEvent, so in
+ order for threaded rendering using a GL widget to work, these functions
+ need to be intercepted in the GUI thread and handled accordingly in the
+ application.
+
\e{OpenGL is a trademark of Silicon Graphics, Inc. in the United States and other
countries.}
@@ -4801,7 +4901,7 @@ void QGLWidget::drawTexture(const QPointF &point, QMacCompatGLuint textureId, QM
}
#endif
-#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
+#if !defined(QT_OPENGL_ES_1)
Q_GLOBAL_STATIC(QGL2PaintEngineEx, qt_gl_2_engine)
#endif
@@ -4811,7 +4911,7 @@ Q_GLOBAL_STATIC(QOpenGLPaintEngine, qt_gl_engine)
Q_OPENGL_EXPORT QPaintEngine* qt_qgl_paint_engine()
{
-#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL)
+#if defined(QT_OPENGL_ES_1)
return qt_gl_engine();
#elif defined(QT_OPENGL_ES_2)
return qt_gl_2_engine();
@@ -4934,7 +5034,7 @@ QGLExtensions::Extensions QGLExtensions::currentContextExtensions()
glExtensions |= GenerateMipmap;
glExtensions |= FragmentShader;
#endif
-#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL)
+#if defined(QT_OPENGL_ES_1)
if (extensions.match("GL_OES_framebuffer_object"))
glExtensions |= FramebufferObject;
#endif
@@ -4960,6 +5060,20 @@ QGLExtensions::Extensions QGLExtensions::currentContextExtensions()
return glExtensions;
}
+
+class QGLDefaultExtensions
+{
+public:
+ QGLDefaultExtensions() {
+ QGLTemporaryContext tempContext;
+ extensions = QGLExtensions::currentContextExtensions();
+ }
+
+ QGLExtensions::Extensions extensions;
+};
+
+Q_GLOBAL_STATIC(QGLDefaultExtensions, qtDefaultExtensions)
+
/*
Returns the GL extensions for the current QGLContext. If there is no
current QGLContext, a default context will be created and the extensions
@@ -4967,34 +5081,19 @@ QGLExtensions::Extensions QGLExtensions::currentContextExtensions()
*/
QGLExtensions::Extensions QGLExtensions::glExtensions()
{
- QGLTemporaryContext *tmpContext = 0;
- static bool cachedDefault = false;
- static Extensions defaultExtensions = 0;
+ Extensions extensionFlags = 0;
QGLContext *currentCtx = const_cast<QGLContext *>(QGLContext::currentContext());
if (currentCtx && currentCtx->d_func()->extension_flags_cached)
return currentCtx->d_func()->extension_flags;
if (!currentCtx) {
- if (cachedDefault) {
- return defaultExtensions;
- } else {
- tmpContext = new QGLTemporaryContext;
- cachedDefault = true;
- }
- }
-
- Extensions extensionFlags = currentContextExtensions();
- if (currentCtx) {
+ extensionFlags = qtDefaultExtensions()->extensions;
+ } else {
+ extensionFlags = currentContextExtensions();
currentCtx->d_func()->extension_flags_cached = true;
currentCtx->d_func()->extension_flags = extensionFlags;
- } else {
- defaultExtensions = extensionFlags;
}
-
- if (tmpContext)
- delete tmpContext;
-
return extensionFlags;
}
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h
index 1a04ff914e..64f54a3730 100644
--- a/src/opengl/qgl.h
+++ b/src/opengl/qgl.h
@@ -57,7 +57,7 @@ QT_BEGIN_HEADER
#if defined(Q_WS_MAC)
# include <OpenGL/gl.h>
# include <OpenGL/glu.h>
-#elif defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL)
+#elif defined(QT_OPENGL_ES_1)
# include <GLES/gl.h>
#ifndef GL_DOUBLE
# define GL_DOUBLE GL_FLOAT
@@ -144,6 +144,7 @@ namespace QGL
DirectRendering = 0x0080,
HasOverlay = 0x0100,
SampleBuffers = 0x0200,
+ DeprecatedFunctions = 0x0400,
SingleBuffer = DoubleBuffer << 16,
NoDepthBuffer = DepthBuffer << 16,
ColorIndex = Rgba << 16,
@@ -153,7 +154,8 @@ namespace QGL
NoStereoBuffers = StereoBuffers << 16,
IndirectRendering = DirectRendering << 16,
NoOverlay = HasOverlay << 16,
- NoSampleBuffers = SampleBuffers << 16
+ NoSampleBuffers = SampleBuffers << 16,
+ NoDeprecatedFunctions = DeprecatedFunctions << 16
};
Q_DECLARE_FLAGS(FormatOptions, FormatOption)
}
@@ -235,7 +237,20 @@ public:
static bool hasOpenGL();
static bool hasOpenGLOverlays();
- enum OpenGLVersionFlag {
+ void setVersion(int major, int minor);
+ int majorVersion() const;
+ int minorVersion() const;
+
+ enum OpenGLContextProfile {
+ NoProfile,
+ CoreProfile,
+ CompatibilityProfile
+ };
+
+ void setProfile(OpenGLContextProfile profile);
+ OpenGLContextProfile profile() const;
+
+ enum OpenGLVersionFlag {
OpenGL_Version_None = 0x00000000,
OpenGL_Version_1_1 = 0x00000001,
OpenGL_Version_1_2 = 0x00000002,
@@ -249,7 +264,9 @@ public:
OpenGL_ES_Common_Version_1_1 = 0x00000200,
OpenGL_ES_CommonLite_Version_1_1 = 0x00000400,
OpenGL_ES_Version_2_0 = 0x00000800,
- OpenGL_Version_3_0 = 0x00001000
+ OpenGL_Version_3_0 = 0x00001000,
+ OpenGL_Version_3_1 = 0x00002000,
+ OpenGL_Version_3_2 = 0x00004000
};
Q_DECLARE_FLAGS(OpenGLVersionFlags, OpenGLVersionFlag)
diff --git a/src/opengl/qgl_cl_p.h b/src/opengl/qgl_cl_p.h
deleted file mode 100644
index 82b492b55d..0000000000
--- a/src/opengl/qgl_cl_p.h
+++ /dev/null
@@ -1,141 +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 QtOpenGL module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#ifdef QT_OPENGL_ES_1_CL
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of the QGLWidget class. This header file may change from
-// version to version without notice, or even be removed.
-//
-// We mean it.
-//
-
-QT_BEGIN_NAMESPACE
-
-inline void glTexParameterf (GLenum target, GLenum pname, GLfloat param)
-{
- glTexParameterx(target, pname, FLOAT2X(param));
-}
-inline void glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
-{
- glClearColorx(FLOAT2X(red) ,FLOAT2X(green), FLOAT2X(blue), FLOAT2X(alpha));
-}
-inline void glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
-{
- glColor4x(FLOAT2X(red) ,FLOAT2X(green), FLOAT2X(blue), FLOAT2X(alpha));
-}
-
-inline void glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
-{
- glOrthox(FLOAT2X(left), FLOAT2X(right), FLOAT2X(bottom), FLOAT2X(top), FLOAT2X(zNear), FLOAT2X(zFar));
-}
-
-inline void glPointSize (GLfloat size)
-{
- glPointSizex(FLOAT2X(size));
-}
-
-inline void glPolygonOffset (GLfloat factor, GLfloat units)
-{
- glPolygonOffsetx (FLOAT2X(factor), FLOAT2X(units));
-}
-
-inline void glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
-{
- glRotatex(FLOAT2X(angle), FLOAT2X(x), FLOAT2X(y), FLOAT2X(z));
-}
-
-inline void glTranslatef (GLfloat x, GLfloat y, GLfloat z)
-{
- glTranslatex(FLOAT2X(x) ,FLOAT2X(y) ,FLOAT2X(z));
-}
-
-inline void glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz)
-{
- glNormal3x(FLOAT2X(nx), FLOAT2X(ny), FLOAT2X(nz));
-}
-
-inline void glScalef(GLfloat x, GLfloat y, GLfloat z)
-{
- glScalex(FLOAT2X(x), FLOAT2X(y), FLOAT2X(z));
-}
-
-inline void glClearDepthf (GLclampf depth)
-{
- glClearDepthx(FLOAT2X(depth));
-}
-
-inline void glAlphaFunc (GLenum func, GLclampf ref)
-{
- glAlphaFuncx(func, FLOAT2X(ref));
-}
-
-inline void glLoadMatrixf (const GLfloat *_m)
-{
- GLfixed m[16];
- for (int i =0; i < 16; i++)
- m[i] = FLOAT2X(_m[i]);
- glLoadMatrixx(m);
-}
-
-inline void glMultMatrixf (const GLfloat *_m)
-{
- GLfixed m[16];
- for (int i =0; i < 16; i++)
- m[i] = FLOAT2X(_m[i]);
- glMultMatrixx (m);
-}
-
-
-inline void glLineWidth (GLfloat width)
-{
- glLineWidthx(FLOAT2X(width));
-}
-
-QT_END_NAMESPACE
-
-#endif //QT_OPENGL_ES_1_CL
-
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index 3addea112b..822c9f690a 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -40,93 +40,114 @@
****************************************************************************/
#include <QtOpenGL/qgl.h>
+#include <QtOpenGL/qglpixelbuffer.h>
#include "qgl_p.h"
#include "qgl_egl_p.h"
+#include "qglpixelbuffer_p.h"
+
+#ifdef Q_WS_X11
+#include <QtGui/private/qpixmap_x11_p.h>
+#endif
QT_BEGIN_NAMESPACE
-// Set device configuration attributes from a QGLFormat instance.
-void qt_egl_set_format(QEglProperties& props, int deviceType, const QGLFormat& f)
+void qt_eglproperties_set_glformat(QEglProperties& eglProperties, const QGLFormat& glFormat)
{
- if (deviceType == QInternal::Pixmap || deviceType == QInternal::Image)
- props.setValue(EGL_SURFACE_TYPE, EGL_PIXMAP_BIT);
- else if (deviceType == QInternal::Pbuffer)
- props.setValue(EGL_SURFACE_TYPE, EGL_PBUFFER_BIT);
- else
- props.setValue(EGL_SURFACE_TYPE, EGL_WINDOW_BIT);
-
- // Set the pixel format to that contained in the QGLFormat
- // if the system hasn't already chosen a fixed format to
- // match the pixmap, widget, etc.
- if (props.value(EGL_RED_SIZE) == 0 || f.redBufferSize() != -1)
- props.setValue(EGL_RED_SIZE, f.redBufferSize() == -1 ? 1 : f.redBufferSize());
- if (props.value(EGL_GREEN_SIZE) == 0 || f.greenBufferSize() != -1)
- props.setValue(EGL_GREEN_SIZE, f.greenBufferSize() == -1 ? 1 : f.greenBufferSize());
- if (props.value(EGL_BLUE_SIZE) == 0 || f.blueBufferSize() != -1)
- props.setValue(EGL_BLUE_SIZE, f.blueBufferSize() == -1 ? 1 : f.blueBufferSize());
- if (f.alpha()) {
- if (props.value(EGL_ALPHA_SIZE) == 0 || f.alphaBufferSize() != -1)
- props.setValue(EGL_ALPHA_SIZE, f.alphaBufferSize() == -1 ? 1 : f.alphaBufferSize());
- }
+ int redSize = glFormat.redBufferSize();
+ int greenSize = glFormat.greenBufferSize();
+ int blueSize = glFormat.blueBufferSize();
+ int alphaSize = glFormat.alphaBufferSize();
+ int depthSize = glFormat.depthBufferSize();
+ int stencilSize = glFormat.stencilBufferSize();
+ int sampleCount = glFormat.samples();
- if (f.depth())
- props.setValue(EGL_DEPTH_SIZE, f.depthBufferSize() == -1 ? 1 : f.depthBufferSize());
- if (f.stencil())
- props.setValue(EGL_STENCIL_SIZE, f.stencilBufferSize() == -1 ? 1 : f.stencilBufferSize());
- if (f.sampleBuffers()) {
- props.setValue(EGL_SAMPLE_BUFFERS, 1);
- props.setValue(EGL_SAMPLES, f.samples() == -1 ? 1 : f.samples());
- } else {
- props.setValue(EGL_SAMPLE_BUFFERS, 0);
- }
- if (deviceType == QInternal::Widget)
- props.setValue(EGL_LEVEL, f.plane());
+ // QGLFormat uses a magic value of -1 to indicate "don't care", even when a buffer of that
+ // type has been requested. So we must check QGLFormat's booleans too if size is -1:
+ if (glFormat.alpha() && alphaSize <= 0)
+ alphaSize = 1;
+ if (glFormat.depth() && depthSize <= 0)
+ depthSize = 1;
+ if (glFormat.stencil() && stencilSize <= 0)
+ stencilSize = 1;
+ if (glFormat.sampleBuffers() && sampleCount <= 0)
+ sampleCount = 1;
+
+ // We want to make sure 16-bit configs are chosen over 32-bit configs as they will provide
+ // the best performance. The EGL config selection algorithm is a bit stange in this regard:
+ // The selection criteria for EGL_BUFFER_SIZE is "AtLeast", so we can't use it to discard
+ // 32-bit configs completely from the selection. So it then comes to the sorting algorithm.
+ // The red/green/blue sizes have a sort priority of 3, so they are sorted by first. The sort
+ // order is special and described as "by larger _total_ number of color bits.". So EGL will
+ // put 32-bit configs in the list before the 16-bit configs. However, the spec also goes on
+ // to say "If the requested number of bits in attrib_list for a particular component is 0,
+ // then the number of bits for that component is not considered". This part of the spec also
+ // seems to imply that setting the red/green/blue bits to zero means none of the components
+ // are considered and EGL disregards the entire sorting rule. It then looks to the next
+ // highest priority rule, which is EGL_BUFFER_SIZE. Despite the selection criteria being
+ // "AtLeast" for EGL_BUFFER_SIZE, it's sort order is "smaller" meaning 16-bit configs are
+ // put in the list before 32-bit configs. So, to make sure 16-bit is preffered over 32-bit,
+ // we must set the red/green/blue sizes to zero. This has an unfortunate consequence that
+ // if the application sets the red/green/blue size to 5/6/5 on the QGLFormat, they will
+ // probably get a 32-bit config, even when there's an RGB565 config avaliable. Oh well.
+
+ // Now normalize the values so -1 becomes 0
+ redSize = redSize > 0 ? redSize : 0;
+ greenSize = greenSize > 0 ? greenSize : 0;
+ blueSize = blueSize > 0 ? blueSize : 0;
+ alphaSize = alphaSize > 0 ? alphaSize : 0;
+ depthSize = depthSize > 0 ? depthSize : 0;
+ stencilSize = stencilSize > 0 ? stencilSize : 0;
+ sampleCount = sampleCount > 0 ? sampleCount : 0;
+
+ eglProperties.setValue(EGL_RED_SIZE, redSize);
+ eglProperties.setValue(EGL_GREEN_SIZE, greenSize);
+ eglProperties.setValue(EGL_BLUE_SIZE, blueSize);
+ eglProperties.setValue(EGL_ALPHA_SIZE, alphaSize);
+ eglProperties.setValue(EGL_DEPTH_SIZE, depthSize);
+ eglProperties.setValue(EGL_STENCIL_SIZE, stencilSize);
+ eglProperties.setValue(EGL_SAMPLES, sampleCount);
+ eglProperties.setValue(EGL_SAMPLE_BUFFERS, sampleCount ? 1 : 0);
}
// Updates "format" with the parameters of the selected configuration.
-void qt_egl_update_format(const QEglContext& context, QGLFormat& format)
+void qt_glformat_from_eglconfig(QGLFormat& format, const EGLConfig config)
{
- EGLint value = 0;
-
- if (context.configAttrib(EGL_RED_SIZE, &value))
- format.setRedBufferSize(value);
- if (context.configAttrib(EGL_GREEN_SIZE, &value))
- format.setGreenBufferSize(value);
- if (context.configAttrib(EGL_BLUE_SIZE, &value))
- format.setBlueBufferSize(value);
- if (context.configAttrib(EGL_ALPHA_SIZE, &value)) {
- format.setAlpha(value != 0);
- if (format.alpha())
- format.setAlphaBufferSize(value);
- }
-
- if (context.configAttrib(EGL_DEPTH_SIZE, &value)) {
- format.setDepth(value != 0);
- if (format.depth())
- format.setDepthBufferSize(value);
- }
-
- if (context.configAttrib(EGL_LEVEL, &value))
- format.setPlane(value);
+ EGLint redSize = 0;
+ EGLint greenSize = 0;
+ EGLint blueSize = 0;
+ EGLint alphaSize = 0;
+ EGLint depthSize = 0;
+ EGLint stencilSize = 0;
+ EGLint sampleCount = 0;
+ EGLint level = 0;
- if (context.configAttrib(EGL_SAMPLE_BUFFERS, &value)) {
- format.setSampleBuffers(value != 0);
- if (format.sampleBuffers()) {
- context.configAttrib(EGL_SAMPLES, &value);
- format.setSamples(value);
- }
- }
+ EGLDisplay display = QEgl::display();
+ eglGetConfigAttrib(display, config, EGL_RED_SIZE, &redSize);
+ eglGetConfigAttrib(display, config, EGL_GREEN_SIZE, &greenSize);
+ eglGetConfigAttrib(display, config, EGL_BLUE_SIZE, &blueSize);
+ eglGetConfigAttrib(display, config, EGL_ALPHA_SIZE, &alphaSize);
+ eglGetConfigAttrib(display, config, EGL_DEPTH_SIZE, &depthSize);
+ eglGetConfigAttrib(display, config, EGL_STENCIL_SIZE, &stencilSize);
+ eglGetConfigAttrib(display, config, EGL_SAMPLES, &sampleCount);
+ eglGetConfigAttrib(display, config, EGL_LEVEL, &level);
- if (context.configAttrib(EGL_STENCIL_SIZE, &value)) {
- format.setStencil(value != 0);
- if (format.stencil())
- format.setStencilBufferSize(value);
- }
+ format.setRedBufferSize(redSize);
+ format.setGreenBufferSize(greenSize);
+ format.setBlueBufferSize(blueSize);
+ format.setAlphaBufferSize(alphaSize);
+ format.setDepthBufferSize(depthSize);
+ format.setStencilBufferSize(stencilSize);
+ format.setSamples(sampleCount);
+ format.setPlane(level + 1); // EGL calls level 0 "normal" whereas Qt calls 1 "normal"
+ format.setDirectRendering(true); // All EGL contexts are direct-rendered
+ format.setRgba(true); // EGL doesn't support colour index rendering
+ format.setStereo(false); // EGL doesn't support stereo buffers
+ format.setAccumBufferSize(0); // EGL doesn't support accululation buffers
// Clear the EGL error state because some of the above may
// have errored out because the attribute is not applicable
// to the surface type. Such errors don't matter.
- context.clearError();
+ QEgl::clearError();
}
bool QGLFormat::hasOpenGL()
@@ -141,10 +162,11 @@ void QGLContext::reset()
return;
d->cleanup();
doneCurrent();
- if (d->eglContext) {
+ if (d->eglContext && d->ownsEglContext) {
d->destroyEglSurfaceForDevice();
delete d->eglContext;
}
+ d->ownsEglContext = false;
d->eglContext = 0;
d->eglSurface = EGL_NO_SURFACE;
d->crWin = false;
@@ -158,12 +180,12 @@ void QGLContext::reset()
void QGLContext::makeCurrent()
{
Q_D(QGLContext);
- if (!d->valid || !d->eglContext || d->eglSurface == EGL_NO_SURFACE) {
+ if (!d->valid || !d->eglContext || d->eglSurfaceForDevice() == EGL_NO_SURFACE) {
qWarning("QGLContext::makeCurrent(): Cannot make invalid context current");
return;
}
- if (d->eglContext->makeCurrent(d->eglSurface))
+ if (d->eglContext->makeCurrent(d->eglSurfaceForDevice()))
QGLContextPrivate::setCurrentContext(this);
}
@@ -183,7 +205,7 @@ void QGLContext::swapBuffers() const
if (!d->valid || !d->eglContext)
return;
- d->eglContext->swapBuffers(d->eglSurface);
+ d->eglContext->swapBuffers(d->eglSurfaceForDevice());
}
void QGLContextPrivate::destroyEglSurfaceForDevice()
@@ -192,7 +214,7 @@ void QGLContextPrivate::destroyEglSurfaceForDevice()
#ifdef Q_WS_X11
// Make sure we don't call eglDestroySurface on a surface which
// was created for a different winId:
- if (paintDevice->devType() == QInternal::Widget) {
+ if (paintDevice && paintDevice->devType() == QInternal::Widget) {
QGLWidget* w = static_cast<QGLWidget*>(paintDevice);
if (w->d_func()->eglSurfaceWindowId == w->winId())
@@ -206,6 +228,30 @@ void QGLContextPrivate::destroyEglSurfaceForDevice()
}
}
+EGLSurface QGLContextPrivate::eglSurfaceForDevice() const
+{
+ // If a QPixmapData had to create the QGLContext, we don't have a paintDevice
+ if (!paintDevice)
+ return eglSurface;
+
+#ifdef Q_WS_X11
+ if (paintDevice->devType() == QInternal::Pixmap) {
+ QPixmapData *pmd = static_cast<QPixmap*>(paintDevice)->data_ptr().data();
+ if (pmd->classId() == QPixmapData::X11Class) {
+ QX11PixmapData* x11PixmapData = static_cast<QX11PixmapData*>(pmd);
+ return (EGLSurface)x11PixmapData->gl_surface;
+ }
+ }
+#endif
+
+ if (paintDevice->devType() == QInternal::Pbuffer) {
+ QGLPixelBuffer* pbuf = static_cast<QGLPixelBuffer*>(paintDevice);
+ return pbuf->d_func()->pbuf;
+ }
+
+ return eglSurface;
+}
+
void QGLWidget::setMouseTracking(bool enable)
{
QWidget::setMouseTracking(enable);
diff --git a/src/opengl/qgl_egl_p.h b/src/opengl/qgl_egl_p.h
index c503724b91..43793cd16c 100644
--- a/src/opengl/qgl_egl_p.h
+++ b/src/opengl/qgl_egl_p.h
@@ -53,15 +53,15 @@
// We mean it.
//
-#include <QtGui/private/qegl_p.h>
+#include <QtGui/private/qeglcontext_p.h>
+#include <QtGui/private/qeglproperties_p.h>
QT_BEGIN_NAMESPACE
class QGLFormat;
-void qt_egl_set_format(QEglProperties& props, int deviceType, const QGLFormat& f);
-void qt_egl_update_format(const QEglContext& context, QGLFormat& format);
-void qt_egl_add_platform_config(QEglProperties& props, QPaintDevice *device);
+void qt_eglproperties_set_glformat(QEglProperties& props, const QGLFormat& format);
+void qt_glformat_from_eglconfig(QGLFormat& format, const EGLConfig config);
QT_END_NAMESPACE
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 80217c02e1..45f8f3049d 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -64,36 +64,8 @@
#include "qcache.h"
#include "qglpaintdevice_p.h"
-#ifndef QT_OPENGL_ES_1_CL
-#define q_vertexType float
-#define q_vertexTypeEnum GL_FLOAT
-#define f2vt(f) (f)
-#define vt2f(x) (x)
-#define i2vt(i) (float(i))
-#else
-#define FLOAT2X(f) (int( (f) * (65536)))
-#define X2FLOAT(x) (float(x) / 65536.0f)
-#define f2vt(f) FLOAT2X(f)
-#define i2vt(i) ((i)*65536)
-#define vt2f(x) X2FLOAT(x)
-#define q_vertexType GLfixed
-#define q_vertexTypeEnum GL_FIXED
-#endif //QT_OPENGL_ES_1_CL
-
#if defined(QT_OPENGL_ES) || defined(QT_OPENGL_ES_2)
-QT_BEGIN_INCLUDE_NAMESPACE
-
-#if defined(QT_OPENGL_ES_2)
-# include <GLES2/gl2.h>
-#endif
-
-#if defined(QT_GLES_EGL)
-# include <GLES/egl.h>
-#else
-# include <EGL/egl.h>
-#endif
-
-QT_END_INCLUDE_NAMESPACE
+#include <QtGui/private/qegl_p.h>
#endif
QT_BEGIN_NAMESPACE
@@ -138,11 +110,15 @@ public:
QGLFormatPrivate()
: ref(1)
{
- opts = QGL::DoubleBuffer | QGL::DepthBuffer | QGL::Rgba | QGL::DirectRendering | QGL::StencilBuffer;
+ opts = QGL::DoubleBuffer | QGL::DepthBuffer | QGL::Rgba | QGL::DirectRendering
+ | QGL::StencilBuffer | QGL::DeprecatedFunctions;
pln = 0;
depthSize = accumSize = stencilSize = redSize = greenSize = blueSize = alphaSize = -1;
numSamples = -1;
swapInterval = -1;
+ majorVersion = 1;
+ minorVersion = 0;
+ profile = QGLFormat::NoProfile;
}
QGLFormatPrivate(const QGLFormatPrivate *other)
: ref(1),
@@ -156,7 +132,10 @@ public:
blueSize(other->blueSize),
alphaSize(other->alphaSize),
numSamples(other->numSamples),
- swapInterval(other->swapInterval)
+ swapInterval(other->swapInterval),
+ majorVersion(other->majorVersion),
+ minorVersion(other->minorVersion),
+ profile(other->profile)
{
}
QAtomicInt ref;
@@ -171,6 +150,9 @@ public:
int alphaSize;
int numSamples;
int swapInterval;
+ int majorVersion;
+ int minorVersion;
+ QGLFormat::OpenGLContextProfile profile;
};
class QGLWidgetPrivate : public QWidgetPrivate
@@ -296,8 +278,6 @@ public:
Q_DECLARE_FLAGS(Extensions, Extension)
static Extensions glExtensions();
-
-private:
static Extensions currentContextExtensions();
};
@@ -352,6 +332,10 @@ public:
void syncGlState(); // Makes sure the GL context's state is what we think it is
#if defined(Q_WS_WIN)
+ void updateFormatVersion();
+#endif
+
+#if defined(Q_WS_WIN)
HGLRC rc;
HDC dc;
WId win;
@@ -361,9 +345,11 @@ public:
HDC hbitmap_hdc;
#endif
#if defined(QT_OPENGL_ES)
+ bool ownsEglContext;
QEglContext *eglContext;
EGLSurface eglSurface;
void destroyEglSurfaceForDevice();
+ EGLSurface eglSurfaceForDevice() const;
#elif defined(Q_WS_X11) || defined(Q_WS_MAC)
void* cx;
#endif
@@ -536,24 +522,53 @@ public:
~QGLTextureCache();
void insert(QGLContext *ctx, qint64 key, QGLTexture *texture, int cost);
- void remove(quint64 key) { m_cache.remove(key); }
+ inline void remove(quint64 key);
+ inline int size();
+ inline void setMaxCost(int newMax);
+ inline int maxCost();
+ inline QGLTexture* getTexture(quint64 key);
+
bool remove(QGLContext *ctx, GLuint textureId);
void removeContextTextures(QGLContext *ctx);
- int size() { return m_cache.size(); }
- void setMaxCost(int newMax) { m_cache.setMaxCost(newMax); }
- int maxCost() {return m_cache.maxCost(); }
- QGLTexture* getTexture(quint64 key) { return m_cache.object(key); }
-
static QGLTextureCache *instance();
- static void deleteIfEmpty();
static void cleanupTexturesForCacheKey(qint64 cacheKey);
static void cleanupTexturesForPixampData(QPixmapData* pixmap);
static void cleanupBeforePixmapDestruction(QPixmapData* pixmap);
private:
QCache<qint64, QGLTexture> m_cache;
+ QReadWriteLock m_lock;
};
+int QGLTextureCache::size() {
+ QReadLocker locker(&m_lock);
+ return m_cache.size();
+}
+
+void QGLTextureCache::setMaxCost(int newMax)
+{
+ QWriteLocker locker(&m_lock);
+ m_cache.setMaxCost(newMax);
+}
+
+int QGLTextureCache::maxCost()
+{
+ QReadLocker locker(&m_lock);
+ return m_cache.maxCost();
+}
+
+QGLTexture* QGLTextureCache::getTexture(quint64 key)
+{
+ QReadLocker locker(&m_lock);
+ return m_cache.object(key);
+}
+
+void QGLTextureCache::remove(quint64 key)
+{
+ QWriteLocker locker(&m_lock);
+ m_cache.remove(key);
+}
+
extern Q_OPENGL_EXPORT QPaintEngine* qt_qgl_paint_engine();
diff --git a/src/opengl/qgl_qws.cpp b/src/opengl/qgl_qws.cpp
index fd17a27bf2..38c3774464 100644
--- a/src/opengl/qgl_qws.cpp
+++ b/src/opengl/qgl_qws.cpp
@@ -119,21 +119,6 @@ bool QGLFormat::hasOpenGLOverlays()
return false;
}
-void qt_egl_add_platform_config(QEglProperties& props, QPaintDevice *device)
-{
- // Find the QGLScreen for this paint device.
- QGLScreen *glScreen = glScreenForDevice(device);
- if (!glScreen) {
- qWarning("QGLContext::chooseContext(): The screen is not a QGLScreen");
- return;
- }
- int devType = device->devType();
- if (devType == QInternal::Image)
- props.setPixelFormat(static_cast<QImage *>(device)->format());
- else
- props.setPixelFormat(glScreen->pixelFormat());
-}
-
static EGLSurface qt_egl_create_surface
(QEglContext *context, QPaintDevice *device,
const QEglProperties *properties = 0)
@@ -197,12 +182,14 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
// Get the display and initialize it.
d->eglContext = new QEglContext();
+ d->ownsEglContext = true;
d->eglContext->setApi(QEgl::OpenGL);
// Construct the configuration we need for this surface.
QEglProperties configProps;
- qt_egl_add_platform_config(configProps, device());
- qt_egl_set_format(configProps, devType, d->glFormat);
+ qt_eglproperties_set_glformat(configProps, d->glFormat);
+ configProps.setDeviceType(devType);
+ configProps.setPaintDeviceFormat(device());
configProps.setRenderableType(QEgl::OpenGL);
// Search for a matching configuration, reducing the complexity
@@ -214,7 +201,7 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
}
// Inform the higher layers about the actual format properties.
- qt_egl_update_format(*(d->eglContext), d->glFormat);
+ qt_glformat_from_eglconfig(d->glFormat, d->eglContext->config());
// Create a new context for the configuration.
if (!d->eglContext->createContext
diff --git a/src/opengl/qgl_win.cpp b/src/opengl/qgl_win.cpp
index ed4814f860..5ab944a8d2 100644
--- a/src/opengl/qgl_win.cpp
+++ b/src/opengl/qgl_win.cpp
@@ -122,6 +122,30 @@ typedef bool (APIENTRY *PFNWGLCHOOSEPIXELFORMATARB)(HDC hdc,
#define WGL_TYPE_COLORINDEX_ARB 0x202C
#endif
+#ifndef WGL_ARB_create_context
+#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
+#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
+#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
+#define WGL_CONTEXT_FLAGS_ARB 0x2094
+#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
+#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
+#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
+#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x0001
+#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x0002
+// Error codes returned by GetLastError().
+#define ERROR_INVALID_VERSION_ARB 0x2095
+#define ERROR_INVALID_PROFILE_ARB 0x2096
+#endif
+
+#ifndef GL_VERSION_3_2
+#define GL_CONTEXT_PROFILE_MASK 0x9126
+#define GL_MAJOR_VERSION 0x821B
+#define GL_MINOR_VERSION 0x821C
+#define GL_NUM_EXTENSIONS 0x821D
+#define GL_CONTEXT_FLAGS 0x821E
+#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001
+#endif
+
QT_BEGIN_NAMESPACE
class QGLCmapPrivate
@@ -682,8 +706,118 @@ QGLTemporaryContext::~QGLTemporaryContext()
wglMakeCurrent(d->old_dc, d->old_context);
}
+static bool qgl_create_context(HDC hdc, QGLContextPrivate *d, QGLContextPrivate *shareContext)
+{
+ d->rc = 0;
+
+ typedef HGLRC (APIENTRYP PFNWGLCREATECONTEXTATTRIBSARB)(HDC, HGLRC, const int *);
+ PFNWGLCREATECONTEXTATTRIBSARB wglCreateContextAttribsARB =
+ (PFNWGLCREATECONTEXTATTRIBSARB) wglGetProcAddress("wglCreateContextAttribsARB");
+ if (wglCreateContextAttribsARB) {
+ int attributes[11];
+ int attribIndex = 0;
+ const int major = d->reqFormat.majorVersion();
+ const int minor = d->reqFormat.minorVersion();
+ attributes[attribIndex++] = WGL_CONTEXT_MAJOR_VERSION_ARB;
+ attributes[attribIndex++] = major;
+ attributes[attribIndex++] = WGL_CONTEXT_MINOR_VERSION_ARB;
+ attributes[attribIndex++] = minor;
+
+ if (major >= 3 && !d->reqFormat.testOption(QGL::DeprecatedFunctions)) {
+ attributes[attribIndex++] = WGL_CONTEXT_FLAGS_ARB;
+ attributes[attribIndex++] = WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
+ }
+
+ if ((major == 3 && minor >= 2) || major > 3) {
+ switch (d->reqFormat.profile()) {
+ case QGLFormat::NoProfile:
+ break;
+ case QGLFormat::CoreProfile:
+ attributes[attribIndex++] = WGL_CONTEXT_PROFILE_MASK_ARB;
+ attributes[attribIndex++] = WGL_CONTEXT_CORE_PROFILE_BIT_ARB;
+ break;
+ case QGLFormat::CompatibilityProfile:
+ attributes[attribIndex++] = WGL_CONTEXT_PROFILE_MASK_ARB;
+ attributes[attribIndex++] = WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;
+ break;
+ default:
+ qWarning("QGLContext::chooseContext(): Context profile not supported.");
+ return false;
+ }
+ }
+
+ if (d->reqFormat.plane() != 0) {
+ attributes[attribIndex++] = WGL_CONTEXT_LAYER_PLANE_ARB;
+ attributes[attribIndex++] = d->reqFormat.plane();
+ }
+
+ attributes[attribIndex++] = 0; // Terminate list.
+ d->rc = wglCreateContextAttribsARB(hdc, shareContext && shareContext->valid
+ ? shareContext->rc : 0, attributes);
+ if (d->rc) {
+ if (shareContext)
+ shareContext->sharing = d->sharing = true;
+ return true;
+ }
+ }
+
+ d->rc = wglCreateLayerContext(hdc, d->reqFormat.plane());
+ if (d->rc && shareContext && shareContext->valid)
+ shareContext->sharing = d->sharing = wglShareLists(shareContext->rc, d->rc);
+ return d->rc != 0;
+}
+
+void QGLContextPrivate::updateFormatVersion()
+{
+ const GLubyte *s = glGetString(GL_VERSION);
+
+ if (!(s && s[0] >= '0' && s[0] <= '9' && s[1] == '.' && s[2] >= '0' && s[2] <= '9')) {
+ if (!s)
+ qWarning("QGLContext::chooseContext(): OpenGL version string is null.");
+ else
+ qWarning("QGLContext::chooseContext(): Unexpected OpenGL version string format.");
+ glFormat.setVersion(0, 0);
+ glFormat.setProfile(QGLFormat::NoProfile);
+ glFormat.setOption(QGL::DeprecatedFunctions);
+ return;
+ }
+
+ int major = s[0] - '0';
+ int minor = s[2] - '0';
+ glFormat.setVersion(major, minor);
+
+ if (major < 3) {
+ glFormat.setProfile(QGLFormat::NoProfile);
+ glFormat.setOption(QGL::DeprecatedFunctions);
+ } else {
+ GLint value = 0;
+ if (major > 3 || minor >= 2)
+ glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &value);
+
+ switch (value) {
+ case WGL_CONTEXT_CORE_PROFILE_BIT_ARB:
+ glFormat.setProfile(QGLFormat::CoreProfile);
+ break;
+ case WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB:
+ glFormat.setProfile(QGLFormat::CompatibilityProfile);
+ break;
+ default:
+ glFormat.setProfile(QGLFormat::NoProfile);
+ break;
+ }
+
+ glGetIntegerv(GL_CONTEXT_FLAGS, &value);
+ if (value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)
+ glFormat.setOption(QGL::NoDeprecatedFunctions);
+ else
+ glFormat.setOption(QGL::DeprecatedFunctions);
+ }
+}
+
bool QGLContext::chooseContext(const QGLContext* shareContext)
{
+ QGLContextPrivate *share = shareContext ? const_cast<QGLContext *>(shareContext)->d_func() : 0;
+
Q_D(QGLContext);
// workaround for matrox driver:
// make a cheap call to opengl to force loading of DLL
@@ -741,8 +875,7 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
goto end;
}
- d->rc = wglCreateLayerContext(myDc, d->glFormat.plane());
- if (!d->rc) {
+ if (!qgl_create_context(myDc, d, share)) {
qwglError("QGLContext::chooseContext()", "CreateLayerContext");
result = false;
goto end;
@@ -792,16 +925,7 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
d->cmap = new QGLCmap(1 << lpfd.cColorBits);
d->cmap->setEntry(lpfd.crTransparent, qRgb(1, 2, 3));//, QGLCmap::Reserved);
}
-
- if (shareContext && shareContext->isValid()) {
- QGLContext *share = const_cast<QGLContext *>(shareContext);
- d->sharing = (wglShareLists(shareContext->d_func()->rc, d->rc) != 0);
- share->d_func()->sharing = d->sharing;
- }
-
- goto end;
- }
- {
+ } else {
PIXELFORMATDESCRIPTOR pfd;
PIXELFORMATDESCRIPTOR realPfd;
d->pixelFormatId = choosePixelFormat(&pfd, myDc);
@@ -840,17 +964,12 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
goto end;
}
- if (!(d->rc = wglCreateLayerContext(myDc, 0))) {
+ if (!qgl_create_context(myDc, d, share)) {
qwglError("QGLContext::chooseContext()", "wglCreateContext");
result = false;
goto end;
}
- if (shareContext && shareContext->isValid()) {
- d->sharing = (wglShareLists(shareContext->d_func()->rc, d->rc) != 0);
- const_cast<QGLContext *>(shareContext)->d_func()->sharing = d->sharing;
- }
-
if(!deviceIsPixmap()) {
QRgb* pal = qgl_create_rgb_palette(&realPfd);
if (pal) {
@@ -865,6 +984,9 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
end:
// vblanking
wglMakeCurrent(myDc, d->rc);
+ if (d->rc)
+ d->updateFormatVersion();
+
typedef BOOL (APIENTRYP PFNWGLSWAPINTERVALEXT) (int interval);
typedef int (APIENTRYP PFNWGLGETSWAPINTERVALEXT) (void);
PFNWGLSWAPINTERVALEXT wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXT) wglGetProcAddress("wglSwapIntervalEXT");
@@ -1158,8 +1280,9 @@ void QGLContext::reset()
void QGLContext::makeCurrent()
{
Q_D(QGLContext);
- if (d->rc == wglGetCurrentContext() || !d->valid) // already current
+ if (d->rc == wglGetCurrentContext() || !d->valid) // already current
return;
+
if (d->win) {
d->dc = GetDC(d->win);
if (!d->dc) {
diff --git a/src/opengl/qgl_wince.cpp b/src/opengl/qgl_wince.cpp
index f81115c95e..47a19b5719 100644
--- a/src/opengl/qgl_wince.cpp
+++ b/src/opengl/qgl_wince.cpp
@@ -54,7 +54,8 @@
#include <windows.h>
-#include <private/qegl_p.h>
+#include <private/qeglproperties_p.h>
+#include <private/qeglcontext_p.h>
#include <private/qgl_egl_p.h>
#include <private/qgl_cl_p.h>
@@ -121,16 +122,6 @@ QGLTemporaryContext::~QGLTemporaryContext()
QGLFormat Win32/WGL-specific code
*****************************************************************************/
-void qt_egl_add_platform_config(QEglProperties& props, QPaintDevice *device)
-{
- int devType = device->devType();
- if (devType == QInternal::Image)
- props.setPixelFormat(static_cast<QImage *>(device)->format());
- else
- props.setPixelFormat(QImage::Format_RGB16);
-}
-
-
static bool opengl32dll = false;
bool QGLFormat::hasOpenGLOverlays()
@@ -154,12 +145,14 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
// Get the display and initialize it.
d->eglContext = new QEglContext();
+ d->ownsEglContext = true;
d->eglContext->setApi(QEgl::OpenGL);
// Construct the configuration we need for this surface.
QEglProperties configProps;
- qt_egl_add_platform_config(configProps, device());
- qt_egl_set_format(configProps, devType, d->glFormat);
+ qt_eglproperties_set_glformat(configProps, d->glFormat);
+ configProps.setDeviceType(devType);
+ configProps.setPaintDeviceFormat(device());
configProps.setRenderableType(QEgl::OpenGL);
// Search for a matching configuration, reducing the complexity
@@ -171,7 +164,7 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
}
// Inform the higher layers about the actual format properties.
- qt_egl_update_format(*(d->eglContext), d->glFormat);
+ qt_glformat_from_eglconfig(d->glFormat, d->eglContext->config());
// Create a new context for the configuration.
if (!d->eglContext->createContext
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp
index f0b06ef580..4fa1467faf 100644
--- a/src/opengl/qgl_x11.cpp
+++ b/src/opengl/qgl_x11.cpp
@@ -1753,7 +1753,7 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData *pmd, con
if (!glxPixmap)
return 0;
- pixmapData->gl_surface = (Qt::HANDLE)glxPixmap;
+ pixmapData->gl_surface = (void*)glxPixmap;
// Make sure the cleanup hook gets called so we can delete the glx pixmap
QImagePixmapCleanupHooks::enableCleanupHooks(pixmapData);
diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp
index 3d183eee5b..0954e69471 100644
--- a/src/opengl/qgl_x11egl.cpp
+++ b/src/opengl/qgl_x11egl.cpp
@@ -42,20 +42,17 @@
#include "qgl.h"
#include <private/qt_x11_p.h>
#include <private/qpixmap_x11_p.h>
-#include <private/qimagepixmapcleanuphooks_p.h>
#include <private/qgl_p.h>
#include <private/qpaintengine_opengl_p.h>
#include "qgl_egl_p.h"
#include "qcolormap.h"
#include <QDebug>
+#include <QPixmap>
QT_BEGIN_NAMESPACE
-bool qt_egl_setup_x11_visual(XVisualInfo &vi, EGLDisplay display, EGLConfig config,
- const QX11Info &x11Info, bool useArgbVisual);
-
/*
QGLTemporaryContext implementation
*/
@@ -79,12 +76,7 @@ QGLTemporaryContext::QGLTemporaryContext(bool, QWidget *)
d->surface = 0;
int screen = 0;
- d->display = eglGetDisplay(EGLNativeDisplayType(X11->display));
-
- if (!eglInitialize(d->display, NULL, NULL)) {
- qWarning("QGLTemporaryContext: Unable to initialize EGL display.");
- return;
- }
+ d->display = QEgl::display();
EGLConfig config;
int numConfigs = 0;
@@ -107,15 +99,7 @@ QGLTemporaryContext::QGLTemporaryContext(bool, QWidget *)
int numVisuals;
EGLint id = 0;
- eglGetConfigAttrib(d->display, config, EGL_NATIVE_VISUAL_ID, &id);
- if (id == 0) {
- // EGL_NATIVE_VISUAL_ID is optional and might not be supported
- // on some implementations - we'll have to do it the hard way
- QX11Info xinfo;
- qt_egl_setup_x11_visual(visualInfo, d->display, config, xinfo, false);
- } else {
- visualInfo.visualid = id;
- }
+ visualInfo.visualid = QEgl::getCompatibleVisualId(config);
vi = XGetVisualInfo(X11->display, VisualIDMask, &visualInfo, &numVisuals);
if (!vi || numVisuals < 1) {
qWarning("QGLTemporaryContext: Unable to get X11 visual info id.");
@@ -170,12 +154,6 @@ bool QGLFormat::hasOpenGLOverlays()
return false;
}
-void qt_egl_add_platform_config(QEglProperties& props, QPaintDevice *device)
-{
- if (device->devType() == QInternal::Image)
- props.setPixelFormat(static_cast<QImage *>(device)->format());
-}
-
// Chooses the EGL config and creates the EGL context
bool QGLContext::chooseContext(const QGLContext* shareContext)
{
@@ -186,54 +164,50 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
int devType = device()->devType();
- // Get the display and initialize it.
+ QX11PixmapData *x11PixmapData = 0;
+ if (devType == QInternal::Pixmap) {
+ QPixmapData *pmd = static_cast<QPixmap*>(device())->data_ptr().data();
+ if (pmd->classId() == QPixmapData::X11Class)
+ x11PixmapData = static_cast<QX11PixmapData*>(pmd);
+ else {
+ // TODO: Replace the pixmap's data with a new QX11PixmapData
+ qWarning("WARNING: Creating a QGLContext on a QPixmap is only supported for X11 pixmap backend");
+ return false;
+ }
+ } else if ((devType != QInternal::Widget) && (devType != QInternal::Pbuffer)) {
+ qWarning("WARNING: Creating a QGLContext not supported on device type %d", devType);
+ return false;
+ }
+
+ // Only create the eglContext if we don't already have one:
if (d->eglContext == 0) {
d->eglContext = new QEglContext();
+ d->ownsEglContext = true;
d->eglContext->setApi(QEgl::OpenGL);
+ // If the device is a widget with WA_TranslucentBackground set, make sure the glFormat
+ // has the alpha channel option set:
+ if (devType == QInternal::Widget) {
+ QWidget* widget = static_cast<QWidget*>(device());
+ if (widget->testAttribute(Qt::WA_TranslucentBackground))
+ d->glFormat.setAlpha(true);
+ }
+
// Construct the configuration we need for this surface.
QEglProperties configProps;
- qt_egl_set_format(configProps, devType, d->glFormat);
- qt_egl_add_platform_config(configProps, device());
+ configProps.setDeviceType(devType);
configProps.setRenderableType(QEgl::OpenGL);
-
-#if We_have_an_EGL_library_which_bothers_to_check_EGL_BUFFER_SIZE
- if (device()->depth() == 16 && configProps.value(EGL_ALPHA_SIZE) <= 0) {
- qDebug("Setting EGL_BUFFER_SIZE to 16");
- configProps.setValue(EGL_BUFFER_SIZE, 16);
- configProps.setValue(EGL_ALPHA_SIZE, 0);
- }
+ qt_eglproperties_set_glformat(configProps, d->glFormat);
if (!d->eglContext->chooseConfig(configProps, QEgl::BestPixelFormat)) {
delete d->eglContext;
d->eglContext = 0;
return false;
}
-#else
- QEgl::PixelFormatMatch matchType = QEgl::BestPixelFormat;
- if ((device()->depth() == 16) && configProps.value(EGL_ALPHA_SIZE) == 0) {
- configProps.setValue(EGL_RED_SIZE, 5);
- configProps.setValue(EGL_GREEN_SIZE, 6);
- configProps.setValue(EGL_BLUE_SIZE, 5);
- configProps.setValue(EGL_ALPHA_SIZE, 0);
- matchType = QEgl::ExactPixelFormat;
- }
-
- // Search for a matching configuration, reducing the complexity
- // each time until we get something that matches.
- if (!d->eglContext->chooseConfig(configProps, matchType)) {
- delete d->eglContext;
- d->eglContext = 0;
- return false;
- }
-#endif
-
-// qDebug("QGLContext::chooseContext() - using EGL config %d:", d->eglContext->config());
-// qDebug() << QEglProperties(d->eglContext->config()).toString();
// Create a new context for the configuration.
- if (!d->eglContext->createContext
- (shareContext ? shareContext->d_func()->eglContext : 0)) {
+ QEglContext* eglSharedContext = shareContext ? shareContext->d_func()->eglContext : 0;
+ if (!d->eglContext->createContext(eglSharedContext)) {
delete d->eglContext;
d->eglContext = 0;
return false;
@@ -241,15 +215,32 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
d->sharing = d->eglContext->isSharing();
if (d->sharing && shareContext)
const_cast<QGLContext *>(shareContext)->d_func()->sharing = true;
+ }
-#if defined(EGL_VERSION_1_1)
- if (d->glFormat.swapInterval() != -1 && devType == QInternal::Widget)
- eglSwapInterval(d->eglContext->display(), d->glFormat.swapInterval());
-#endif
+ // Inform the higher layers about the actual format properties
+ qt_glformat_from_eglconfig(d->glFormat, d->eglContext->config());
+
+ // Do don't create the EGLSurface for everything.
+ // QWidget - yes, create the EGLSurface and store it in QGLContextPrivate::eglSurface
+ // QGLWidget - yes, create the EGLSurface and store it in QGLContextPrivate::eglSurface
+ // QPixmap - yes, create the EGLSurface but store it in QX11PixmapData::gl_surface
+ // QGLPixelBuffer - no, it creates the surface itself and stores it in QGLPixelBufferPrivate::pbuf
+
+ if (devType == QInternal::Widget) {
+ if (d->eglSurface != EGL_NO_SURFACE)
+ eglDestroySurface(d->eglContext->display(), d->eglSurface);
+ d->eglSurface = QEgl::createSurface(device(), d->eglContext->config());
+ XFlush(X11->display);
+ setWindowCreated(true);
}
- // Inform the higher layers about the actual format properties.
- qt_egl_update_format(*(d->eglContext), d->glFormat);
+ if (x11PixmapData) {
+ // TODO: Actually check to see if the existing surface can be re-used
+ if (x11PixmapData->gl_surface)
+ eglDestroySurface(d->eglContext->display(), (EGLSurface)x11PixmapData->gl_surface);
+
+ x11PixmapData->gl_surface = (void*)QEgl::createSurface(device(), d->eglContext->config());
+ }
return true;
}
@@ -281,142 +272,6 @@ void QGLWidget::updateOverlayGL()
//handle overlay
}
-//#define QT_DEBUG_X11_VISUAL_SELECTION 1
-
-bool qt_egl_setup_x11_visual(XVisualInfo &vi, EGLDisplay display, EGLConfig config, const QX11Info &x11Info, bool useArgbVisual)
-{
- bool foundVisualIsArgb = useArgbVisual;
-
-#ifdef QT_DEBUG_X11_VISUAL_SELECTION
- qDebug("qt_egl_setup_x11_visual() - useArgbVisual=%d", useArgbVisual);
-#endif
-
- memset(&vi, 0, sizeof(XVisualInfo));
-
- EGLint eglConfigColorSize;
- eglGetConfigAttrib(display, config, EGL_BUFFER_SIZE, &eglConfigColorSize);
-
- // Check to see if EGL is suggesting an appropriate visual id:
- EGLint nativeVisualId;
- eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &nativeVisualId);
- vi.visualid = nativeVisualId;
-
- if (vi.visualid) {
- // EGL has suggested a visual id, so get the rest of the visual info for that id:
- XVisualInfo *chosenVisualInfo;
- int matchingCount = 0;
- chosenVisualInfo = XGetVisualInfo(x11Info.display(), VisualIDMask, &vi, &matchingCount);
- if (chosenVisualInfo) {
-#if !defined(QT_NO_XRENDER)
- if (useArgbVisual) {
- // Check to make sure the visual provided by EGL is ARGB
- XRenderPictFormat *format;
- format = XRenderFindVisualFormat(x11Info.display(), chosenVisualInfo->visual);
- if (format->type == PictTypeDirect && format->direct.alphaMask) {
-#ifdef QT_DEBUG_X11_VISUAL_SELECTION
- qDebug("Using ARGB X Visual ID (%d) provided by EGL", (int)vi.visualid);
-#endif
- foundVisualIsArgb = true;
- vi = *chosenVisualInfo;
- }
- else {
- qWarning("Warning: EGL suggested using X visual ID %d for config %d, but this is not ARGB",
- nativeVisualId, (int)config);
- vi.visualid = 0;
- }
- } else
-#endif
- {
- if (eglConfigColorSize == chosenVisualInfo->depth) {
-#ifdef QT_DEBUG_X11_VISUAL_SELECTION
- qDebug("Using opaque X Visual ID (%d) provided by EGL", (int)vi.visualid);
-#endif
- vi = *chosenVisualInfo;
- } else
- qWarning("Warning: EGL suggested using X visual ID %d (%d bpp) for config %d (%d bpp), but the depths do not match!",
- nativeVisualId, chosenVisualInfo->depth, (int)config, eglConfigColorSize);
- }
- XFree(chosenVisualInfo);
- }
- else {
- qWarning("Warning: EGL suggested using X visual ID %d for config %d, but this seems to be invalid!",
- nativeVisualId, (int)config);
- vi.visualid = 0;
- }
- }
-
- // If EGL does not know the visual ID, so try to select an appropriate one ourselves, first
- // using XRender if we're supposed to have an alpha, then falling back to XGetVisualInfo
-
-#if !defined(QT_NO_XRENDER)
- if (vi.visualid == 0 && useArgbVisual) {
- // Try to use XRender to find an ARGB visual we can use
- vi.screen = x11Info.screen();
- vi.depth = 32; //### We might at some point (soon) get ARGB4444
- vi.c_class = TrueColor;
- XVisualInfo *matchingVisuals;
- int matchingCount = 0;
- matchingVisuals = XGetVisualInfo(x11Info.display(),
- VisualScreenMask|VisualDepthMask|VisualClassMask,
- &vi, &matchingCount);
-
- for (int i = 0; i < matchingCount; ++i) {
- XRenderPictFormat *format;
- format = XRenderFindVisualFormat(x11Info.display(), matchingVisuals[i].visual);
- if (format->type == PictTypeDirect && format->direct.alphaMask) {
- vi = matchingVisuals[i];
- foundVisualIsArgb = true;
-#ifdef QT_DEBUG_X11_VISUAL_SELECTION
- qDebug("Using X Visual ID (%d) for ARGB visual as provided by XRender", (int)vi.visualid);
-#endif
- break;
- }
- }
- XFree(matchingVisuals);
- }
-#endif
-
- if (vi.visualid == 0) {
- EGLint depth;
- eglGetConfigAttrib(display, config, EGL_BUFFER_SIZE, &depth);
- int err;
- err = XMatchVisualInfo(x11Info.display(), x11Info.screen(), depth, TrueColor, &vi);
- if (err == 0) {
- qWarning("Warning: Can't find an X visual which matches the EGL config(%d)'s depth (%d)!",
- (int)config, depth);
- depth = x11Info.depth();
- err = XMatchVisualInfo(x11Info.display(), x11Info.screen(), depth, TrueColor, &vi);
- if (err == 0) {
- qWarning("Error: Couldn't get any matching X visual!");
- return false;
- } else
- qWarning(" - Falling back to X11 suggested depth (%d)", depth);
- }
-#ifdef QT_DEBUG_X11_VISUAL_SELECTION
- else
- qDebug("Using X Visual ID (%d) for EGL provided depth (%d)", (int)vi.visualid, depth);
-#endif
-
- // Don't try to use ARGB now unless the visual is 32-bit - even then it might stil fail :-(
- if (useArgbVisual)
- foundVisualIsArgb = vi.depth == 32; //### We might at some point (soon) get ARGB4444
- }
-
-#ifdef QT_DEBUG_X11_VISUAL_SELECTION
- qDebug("Visual Info:");
- qDebug(" bits_per_rgb=%d", vi.bits_per_rgb);
- qDebug(" red_mask=0x%x", vi.red_mask);
- qDebug(" green_mask=0x%x", vi.green_mask);
- qDebug(" blue_mask=0x%x", vi.blue_mask);
- qDebug(" colormap_size=%d", vi.colormap_size);
- qDebug(" c_class=%d", vi.c_class);
- qDebug(" depth=%d", vi.depth);
- qDebug(" screen=%d", vi.screen);
- qDebug(" visualid=%d", vi.visualid);
-#endif
- return foundVisualIsArgb;
-}
-
void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, bool deleteOldContext)
{
Q_D(QGLWidget);
@@ -434,20 +289,6 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext,
QGLContext* oldcx = d->glcx;
d->glcx = context;
- if (parentWidget()) {
- // force creation of delay-created widgets
- parentWidget()->winId();
- if (parentWidget()->x11Info().screen() != x11Info().screen())
- d_func()->xinfo = parentWidget()->d_func()->xinfo;
- }
-
- // If the application has set WA_TranslucentBackground and not explicitly set
- // the alpha buffer size to zero, modify the format so it have an alpha channel
- QGLFormat& fmt = d->glcx->d_func()->glFormat;
- const bool tryArgbVisual = testAttribute(Qt::WA_TranslucentBackground) || fmt.alpha();
- if (tryArgbVisual && fmt.alphaBufferSize() == -1)
- fmt.setAlphaBufferSize(1);
-
bool createFailed = false;
if (!d->glcx->isValid()) {
// Create the QGLContext here, which in turn chooses the EGL config
@@ -461,63 +302,8 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext,
return;
}
- if (d->glcx->windowCreated() || d->glcx->deviceIsPixmap()) {
- if (deleteOldContext)
- delete oldcx;
- return;
- }
-
- bool visible = isVisible();
- if (visible)
- hide();
-
- XVisualInfo vi;
- QEglContext *eglContext = d->glcx->d_func()->eglContext;
- bool usingArgbVisual = qt_egl_setup_x11_visual(vi, eglContext->display(), eglContext->config(),
- x11Info(), tryArgbVisual);
-
- XSetWindowAttributes a;
-
- Window p = RootWindow(x11Info().display(), x11Info().screen());
- if (parentWidget())
- p = parentWidget()->winId();
-
- QColormap colmap = QColormap::instance(vi.screen);
- a.background_pixel = colmap.pixel(palette().color(backgroundRole()));
- a.border_pixel = colmap.pixel(Qt::black);
-
- unsigned int valueMask = CWBackPixel|CWBorderPixel;
- if (usingArgbVisual) {
- a.colormap = XCreateColormap(x11Info().display(), p, vi.visual, AllocNone);
- valueMask |= CWColormap;
- }
-
- Window w = XCreateWindow(x11Info().display(), p, x(), y(), width(), height(),
- 0, vi.depth, InputOutput, vi.visual, valueMask, &a);
-
- if (deleteOldContext)
- delete oldcx;
- oldcx = 0;
-
- create(w); // Create with the ID of the window we've just created
-
-
- // Create the EGL surface to draw into.
- QGLContextPrivate *ctxpriv = d->glcx->d_func();
- ctxpriv->eglSurface = ctxpriv->eglContext->createSurface(this);
- if (ctxpriv->eglSurface == EGL_NO_SURFACE) {
- delete ctxpriv->eglContext;
- ctxpriv->eglContext = 0;
- return;
- }
-
- d->eglSurfaceWindowId = w; // Remember the window id we created the surface for
- if (visible)
- show();
-
- XFlush(X11->display);
- d->glcx->setWindowCreated(true);
+ d->eglSurfaceWindowId = winId(); // Remember the window id we created the surface for
}
void QGLWidgetPrivate::init(QGLContext *context, const QGLWidget* shareWidget)
@@ -526,7 +312,7 @@ void QGLWidgetPrivate::init(QGLContext *context, const QGLWidget* shareWidget)
initContext(context, shareWidget);
- if(q->isValid() && glcx->format().hasOverlay()) {
+ if (q->isValid() && glcx->format().hasOverlay()) {
//no overlay
qWarning("QtOpenGL ES doesn't currently support overlays");
}
@@ -567,114 +353,6 @@ void QGLWidgetPrivate::recreateEglSurface(bool force)
}
}
-// Selects which configs should be used
-EGLConfig Q_OPENGL_EXPORT qt_chooseEGLConfigForPixmap(bool hasAlpha, bool readOnly)
-{
- // Cache the configs we select as they wont change:
- static EGLConfig roPixmapRGBConfig = 0;
- static EGLConfig roPixmapRGBAConfig = 0;
- static EGLConfig rwPixmapRGBConfig = 0;
- static EGLConfig rwPixmapRGBAConfig = 0;
-
- EGLConfig* targetConfig;
-
- if (hasAlpha) {
- if (readOnly)
- targetConfig = &roPixmapRGBAConfig;
- else
- targetConfig = &rwPixmapRGBAConfig;
- }
- else {
- if (readOnly)
- targetConfig = &roPixmapRGBConfig;
- else
- targetConfig = &rwPixmapRGBConfig;
- }
-
- if (*targetConfig == 0) {
- QEglProperties configAttribs;
- configAttribs.setValue(EGL_SURFACE_TYPE, EGL_PIXMAP_BIT);
- configAttribs.setRenderableType(QEgl::OpenGL);
- if (hasAlpha)
- configAttribs.setValue(EGL_BIND_TO_TEXTURE_RGBA, EGL_TRUE);
- else
- configAttribs.setValue(EGL_BIND_TO_TEXTURE_RGB, EGL_TRUE);
-
- // If this is going to be a render target, it needs to have a depth, stencil & sample buffer
- if (!readOnly) {
- configAttribs.setValue(EGL_DEPTH_SIZE, 1);
- configAttribs.setValue(EGL_STENCIL_SIZE, 1);
- configAttribs.setValue(EGL_SAMPLE_BUFFERS, 1);
- }
-
- EGLint configCount = 0;
- do {
- eglChooseConfig(QEglContext::display(), configAttribs.properties(), targetConfig, 1, &configCount);
- if (configCount > 0) {
- // Got one
- qDebug() << "Found an" << (hasAlpha ? "ARGB" : "RGB") << (readOnly ? "readonly" : "target" )
- << "config (" << int(*targetConfig) << ") to create a pixmap surface:";
-
-// QEglProperties configProps(*targetConfig);
-// qDebug() << configProps.toString();
- break;
- }
- qWarning("choosePixmapConfig() - No suitible config found, reducing requirements");
- } while (configAttribs.reduceConfiguration());
- }
-
- if (*targetConfig == 0)
- qWarning("choosePixmapConfig() - Couldn't find a suitable config");
-
- return *targetConfig;
-}
-
-bool Q_OPENGL_EXPORT qt_createEGLSurfaceForPixmap(QPixmapData* pmd, bool readOnly)
-{
- Q_ASSERT(pmd->classId() == QPixmapData::X11Class);
- QX11PixmapData* pixmapData = static_cast<QX11PixmapData*>(pmd);
-
- bool hasAlpha = pixmapData->hasAlphaChannel();
-
- EGLConfig pixmapConfig = qt_chooseEGLConfigForPixmap(hasAlpha, readOnly);
-
- QEglProperties pixmapAttribs;
-
- // If the pixmap can't be bound to a texture, it's pretty useless
- pixmapAttribs.setValue(EGL_TEXTURE_TARGET, EGL_TEXTURE_2D);
- if (hasAlpha)
- pixmapAttribs.setValue(EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGBA);
- else
- pixmapAttribs.setValue(EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGB);
-
- EGLSurface pixmapSurface;
- pixmapSurface = eglCreatePixmapSurface(QEglContext::display(),
- pixmapConfig,
- (EGLNativePixmapType) pixmapData->handle(),
- pixmapAttribs.properties());
-// qDebug("qt_createEGLSurfaceForPixmap() created surface 0x%x for pixmap 0x%x",
-// pixmapSurface, pixmapData->handle());
- if (pixmapSurface == EGL_NO_SURFACE) {
- qWarning() << "Failed to create a pixmap surface using config" << (int)pixmapConfig
- << ":" << QEglContext::errorString(eglGetError());
- return false;
- }
-
- static bool doneOnce = false;
- if (!doneOnce) {
- // Make sure QGLTextureCache is instanciated so it can install cleanup hooks
- // which cleanup the EGL surface.
- QGLTextureCache::instance();
- doneOnce = true;
- }
-
- Q_ASSERT(sizeof(Qt::HANDLE) >= sizeof(EGLSurface)); // Just to make totally sure!
- pixmapData->gl_surface = (Qt::HANDLE)pixmapSurface;
- QImagePixmapCleanupHooks::enableCleanupHooks(pixmapData); // Make sure the cleanup hook gets called
-
- return true;
-}
-
QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData* pd, const qint64 key,
QGLContext::BindOptions options)
@@ -693,8 +371,8 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData* pd, cons
if (!checkedForTFP) {
// Check for texture_from_pixmap egl extension
checkedForTFP = true;
- if (eglContext->hasExtension("EGL_NOKIA_texture_from_pixmap") ||
- eglContext->hasExtension("EGL_EXT_texture_from_pixmap"))
+ if (QEgl::hasExtension("EGL_NOKIA_texture_from_pixmap") ||
+ QEgl::hasExtension("EGL_EXT_texture_from_pixmap"))
{
qDebug("Found texture_from_pixmap EGL extension!");
haveTFP = true;
@@ -717,8 +395,13 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData* pd, cons
}
if (pixmapData->gl_surface == 0) {
- bool success = qt_createEGLSurfaceForPixmap(pixmapData, true);
- if (!success) {
+ EGLConfig config = QEgl::defaultConfig(QInternal::Pixmap,
+ QEgl::OpenGL,
+ hasAlpha ? QEgl::Translucent : QEgl::NoOptions);
+
+ QPixmap tmpPixmap(pixmapData); //###
+ pixmapData->gl_surface = (void*)QEgl::createSurface(&tmpPixmap, config);
+ if (pixmapData->gl_surface == (void*)EGL_NO_SURFACE) {
haveTFP = false;
return 0;
}
@@ -734,9 +417,9 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData* pd, cons
EGLBoolean success;
success = eglBindTexImage(eglContext->display(), (EGLSurface)pixmapData->gl_surface, EGL_BACK_BUFFER);
if (success == EGL_FALSE) {
- qWarning() << "eglBindTexImage() failed:" << eglContext->errorString(eglGetError());
+ qWarning() << "eglBindTexImage() failed:" << QEgl::errorString();
eglDestroySurface(eglContext->display(), (EGLSurface)pixmapData->gl_surface);
- pixmapData->gl_surface = (Qt::HANDLE)EGL_NO_SURFACE;
+ pixmapData->gl_surface = (void*)EGL_NO_SURFACE;
haveTFP = false;
return 0;
}
@@ -757,10 +440,10 @@ void QGLContextPrivate::destroyGlSurfaceForPixmap(QPixmapData* pmd)
QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pmd);
if (pixmapData->gl_surface) {
EGLBoolean success;
- success = eglDestroySurface(QEglContext::display(), (EGLSurface)pixmapData->gl_surface);
+ success = eglDestroySurface(QEgl::display(), (EGLSurface)pixmapData->gl_surface);
if (success == EGL_FALSE) {
qWarning() << "destroyGlSurfaceForPixmap() - Error deleting surface: "
- << QEglContext::errorString(eglGetError());
+ << QEgl::errorString();
}
pixmapData->gl_surface = 0;
}
@@ -772,12 +455,12 @@ void QGLContextPrivate::unbindPixmapFromTexture(QPixmapData* pmd)
QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pmd);
if (pixmapData->gl_surface) {
EGLBoolean success;
- success = eglReleaseTexImage(QEglContext::display(),
+ success = eglReleaseTexImage(QEgl::display(),
(EGLSurface)pixmapData->gl_surface,
EGL_BACK_BUFFER);
if (success == EGL_FALSE) {
qWarning() << "unbindPixmapFromTexture() - Unable to release bound texture: "
- << QEglContext::errorString(eglGetError());
+ << QEgl::errorString();
}
}
}
diff --git a/src/opengl/qglbuffer.cpp b/src/opengl/qglbuffer.cpp
new file mode 100644
index 0000000000..7022a53535
--- /dev/null
+++ b/src/opengl/qglbuffer.cpp
@@ -0,0 +1,454 @@
+/****************************************************************************
+**
+** 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 QtOpenGL module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtOpenGL/qgl.h>
+#include <QtOpenGL/private/qgl_p.h>
+#include <QtOpenGL/private/qglextensions_p.h>
+#include "qglbuffer.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QGLBuffer
+ \brief The QGLBuffer class provides functions for creating and managing GL buffer objects.
+ \since 4.7
+ \ingroup painting-3D
+
+ Buffer objects are created in the GL server so that the
+ client application can avoid uploading vertices, indices,
+ texture image data, etc every time they are needed.
+*/
+
+/*!
+ \enum QGLBuffer::Type
+ This enum defines the type of GL buffer object to create with QGLBuffer.
+
+ \value VertexBuffer Vertex buffer object for use when specifying
+ vertex arrays.
+ \value IndexBuffer Index buffer object for use with \c{glDrawElements()}.
+ \value PixelPackBuffer Pixel pack buffer object for reading pixel
+ data from the GL server (for example, with \c{glReadPixels()}).
+ Not supported under OpenGL/ES.
+ \value PixelUnpackBuffer Pixel unpack buffer object for writing pixel
+ data to the GL server (for example, with \c{glTexImage2D()}).
+ Not supported under OpenGL/ES.
+*/
+
+/*!
+ \enum QGLBuffer::UsagePattern
+ This enum defines the usage pattern of a QGLBuffer object.
+
+ \value StreamDraw The data will be set once and used a few times
+ for drawing operations. Under OpenGL/ES 1.1 this is identical
+ to StaticDraw.
+ \value StreamRead The data will be set once and used a few times
+ for reading data back from the GL server. Not supported
+ under OpenGL/ES.
+ \value StreamCopy The data will be set once and used a few times
+ for reading data back from the GL server for use in further
+ drawing operations. Not supported under OpenGL/ES.
+ \value StaticDraw The data will be set once and used many times
+ for drawing operations.
+ \value StaticRead The data will be set once and used many times
+ for reading data back from the GL server. Not supported
+ under OpenGL/ES.
+ \value StaticCopy The data will be set once and used many times
+ for reading data back from the GL server for use in further
+ drawing operations. Not supported under OpenGL/ES.
+ \value DynamicDraw The data will be modified repeatedly and used
+ many times for drawing operations.
+ \value DynamicRead The data will be modified repeatedly and used
+ many times for reading data back from the GL server.
+ Not supported under OpenGL/ES.
+ \value DynamicCopy The data will be modified repeatedly and used
+ many times for reading data back from the GL server for
+ use in further drawing operations. Not supported under OpenGL/ES.
+*/
+
+/*!
+ \enum QGLBuffer::Access
+ This enum defines the access mode for QGLBuffer::map().
+
+ \value ReadOnly The buffer will be mapped for reading only.
+ \value WriteOnly The buffer will be mapped for writing only.
+ \value ReadWrite The buffer will be mapped for reading and writing.
+*/
+
+class QGLBufferPrivate
+{
+public:
+ QGLBufferPrivate(QGLBuffer::Type t)
+ : type(t),
+ guard(0),
+ usagePattern(QGLBuffer::StaticDraw),
+ actualUsagePattern(QGLBuffer::StaticDraw)
+ {
+ }
+
+ QGLBuffer::Type type;
+ QGLSharedResourceGuard guard;
+ QGLBuffer::UsagePattern usagePattern;
+ QGLBuffer::UsagePattern actualUsagePattern;
+};
+
+/*!
+ Constructs a new buffer object of \a type.
+
+ Note: this constructor just creates the QGLBuffer instance. The actual
+ buffer object in the GL server is not created until create() is called.
+
+ \sa create()
+*/
+QGLBuffer::QGLBuffer(QGLBuffer::Type type)
+ : d_ptr(new QGLBufferPrivate(type))
+{
+}
+
+#define ctx d->guard.context()
+
+/*!
+ Destroys this buffer object, including the storage being
+ used in the GL server.
+*/
+QGLBuffer::~QGLBuffer()
+{
+ Q_D(QGLBuffer);
+ GLuint bufferId = d->guard.id();
+ if (bufferId) {
+ // Switch to the original creating context to destroy it.
+ QGLShareContextScope scope(d->guard.context());
+ glDeleteBuffers(1, &bufferId);
+ }
+}
+
+/*!
+ Returns the type of buffer represented by this object.
+*/
+QGLBuffer::Type QGLBuffer::type() const
+{
+ Q_D(const QGLBuffer);
+ return d->type;
+}
+
+/*!
+ Returns the usage pattern for this buffer object.
+ The default value is StaticDraw.
+
+ \sa setUsagePattern()
+*/
+QGLBuffer::UsagePattern QGLBuffer::usagePattern() const
+{
+ Q_D(const QGLBuffer);
+ return d->usagePattern;
+}
+
+/*!
+ Sets the usage pattern for this buffer object to \a value.
+ This function must be called before allocate() or write().
+
+ \sa usagePattern(), allocate(), write()
+*/
+void QGLBuffer::setUsagePattern(QGLBuffer::UsagePattern value)
+{
+ Q_D(QGLBuffer);
+#if defined(QT_OPENGL_ES_1)
+ // OpenGL/ES 1.1 does not support GL_STREAM_DRAW, so use GL_STATIC_DRAW.
+ // OpenGL/ES 2.0 does support GL_STREAM_DRAW.
+ d->usagePattern = value;
+ if (value == StreamDraw)
+ d->actualUsagePattern = StaticDraw;
+ else
+ d->actualUsagePattern = value;
+#else
+ d->usagePattern = d->actualUsagePattern = value;
+#endif
+}
+
+#undef ctx
+
+/*!
+ Creates the buffer object in the GL server. Returns true if
+ the object was created; false otherwise.
+
+ This function must be called with a current QGLContext.
+ The buffer will be bound to and can only be used in
+ that context (or any other context that is shared with it).
+
+ This function will return false if the GL implementation
+ does not support buffers, or there is no current QGLContext.
+
+ \sa isCreated(), allocate(), write()
+*/
+bool QGLBuffer::create()
+{
+ Q_D(QGLBuffer);
+ if (d->guard.id())
+ return true;
+ const QGLContext *ctx = QGLContext::currentContext();
+ if (ctx) {
+ if (!qt_resolve_buffer_extensions(const_cast<QGLContext *>(ctx)))
+ return false;
+ GLuint bufferId = 0;
+ glGenBuffers(1, &bufferId);
+ if (bufferId) {
+ d->guard.setContext(ctx);
+ d->guard.setId(bufferId);
+ return true;
+ }
+ }
+ return false;
+}
+
+#define ctx d->guard.context()
+
+/*!
+ Returns true if this buffer has been created; false otherwise.
+
+ \sa create()
+*/
+bool QGLBuffer::isCreated() const
+{
+ Q_D(const QGLBuffer);
+ return d->guard.id() != 0;
+}
+
+/*!
+ Reads the \a count bytes in this buffer starting at \a offset
+ into \a data. Returns true on success; false if reading from
+ the buffer is not supported. Buffer reading is not supported
+ under OpenGL/ES.
+
+ It is assumed that this buffer has been bound to the current context.
+
+ \sa write(), bind()
+*/
+bool QGLBuffer::read(int offset, void *data, int count)
+{
+#if !defined(QT_OPENGL_ES)
+ Q_D(QGLBuffer);
+ if (!glGetBufferSubData || !d->guard.id())
+ return false;
+ while (glGetError() != GL_NO_ERROR) ; // Clear error state.
+ glGetBufferSubData(d->type, offset, count, data);
+ return glGetError() == GL_NO_ERROR;
+#else
+ Q_UNUSED(offset);
+ Q_UNUSED(data);
+ Q_UNUSED(count);
+ return false;
+#endif
+}
+
+/*!
+ Replaces the \a count bytes of this buffer starting at \a offset
+ with the contents of \a data. Any other bytes in the buffer
+ will be left unmodified.
+
+ It is assumed that create() has been called on this buffer and that
+ it has been bound to the current context.
+
+ \sa create(), read(), allocate()
+*/
+void QGLBuffer::write(int offset, const void *data, int count)
+{
+ Q_D(QGLBuffer);
+ if (d->guard.id())
+ glBufferSubData(d->type, offset, count, data);
+}
+
+/*!
+ Allocates \a count bytes of space to the buffer, initialized to
+ the contents of \a data. Any previous contents will be removed.
+
+ It is assumed that create() has been called on this buffer and that
+ it has been bound to the current context.
+
+ \sa create(), read(), write()
+*/
+void QGLBuffer::allocate(const void *data, int count)
+{
+ Q_D(QGLBuffer);
+ if (d->guard.id())
+ glBufferData(d->type, count, data, d->actualUsagePattern);
+}
+
+/*!
+ \fn void QGLBuffer::allocate(int count)
+ \overload
+
+ Allocates \a count bytes of space to the buffer. Any previous
+ contents will be removed.
+
+ It is assumed that create() has been called on this buffer and that
+ it has been bound to the current context.
+
+ \sa create(), write()
+*/
+
+/*!
+ Binds the buffer associated with this object to the current
+ GL context. Returns false if binding was not possible, usually because
+ type() is not supported on this GL implementation.
+
+ The buffer must be bound to the same QGLContext current when create()
+ was called, or to another QGLContext that is sharing with it.
+ Otherwise, false will be returned from this function.
+
+ \sa release(), create()
+*/
+bool QGLBuffer::bind() const
+{
+ Q_D(const QGLBuffer);
+ GLuint bufferId = d->guard.id();
+ if (bufferId) {
+ if (!QGLContext::areSharing(QGLContext::currentContext(),
+ d->guard.context())) {
+#ifndef QT_NO_DEBUG
+ qWarning("QGLBuffer::bind: buffer is not valid in the current context");
+#endif
+ return false;
+ }
+ glBindBuffer(d->type, bufferId);
+ return true;
+ } else {
+ return false;
+ }
+}
+
+/*!
+ Releases the buffer associated with this object from the
+ current GL context.
+
+ This function must be called with the same QGLContext current
+ as when bind() was called on the buffer.
+
+ \sa bind()
+*/
+void QGLBuffer::release() const
+{
+ Q_D(const QGLBuffer);
+ if (d->guard.id())
+ glBindBuffer(d->type, 0);
+}
+
+/*!
+ Returns the GL identifier associated with this buffer; zero if
+ the buffer has not been created.
+
+ \sa isCreated()
+*/
+uint QGLBuffer::bufferId() const
+{
+ Q_D(const QGLBuffer);
+ return d->guard.id();
+}
+
+#ifndef GL_BUFFER_SIZE
+#define GL_BUFFER_SIZE 0x8764
+#endif
+
+/*!
+ Returns the size of the data in this buffer, for reading operations.
+ Returns -1 if fetching the buffer size is not supported, or the
+ buffer has not been created.
+
+ It is assumed that this buffer has been bound to the current context.
+
+ \sa isCreated(), bind()
+*/
+int QGLBuffer::size() const
+{
+ Q_D(const QGLBuffer);
+ if (!d->guard.id())
+ return -1;
+ GLint value = -1;
+ glGetBufferParameteriv(d->type, GL_BUFFER_SIZE, &value);
+ return value;
+}
+
+/*!
+ Maps the contents of this buffer into the application's memory
+ space and returns a pointer to it. Returns null if memory
+ mapping is not possible. The \a access parameter indicates the
+ type of access to be performed.
+
+ It is assumed that create() has been called on this buffer and that
+ it has been bound to the current context.
+
+ This function is only supported under OpenGL/ES if the
+ \c{GL_OES_mapbuffer} extension is present.
+
+ \sa unmap(), create(), bind()
+*/
+void *QGLBuffer::map(QGLBuffer::Access access)
+{
+ Q_D(QGLBuffer);
+ if (!d->guard.id())
+ return 0;
+ if (!glMapBufferARB)
+ return 0;
+ return glMapBufferARB(d->type, access);
+}
+
+/*!
+ Unmaps the buffer after it was mapped into the application's
+ memory space with a previous call to map(). Returns true if
+ the unmap succeeded; false otherwise.
+
+ It is assumed that this buffer has been bound to the current context,
+ and that it was previously mapped with map().
+
+ This function is only supported under OpenGL/ES if the
+ \c{GL_OES_mapbuffer} extension is present.
+
+ \sa map()
+*/
+bool QGLBuffer::unmap()
+{
+ Q_D(QGLBuffer);
+ if (!d->guard.id())
+ return false;
+ if (!glUnmapBufferARB)
+ return false;
+ return glUnmapBufferARB(d->type) == GL_TRUE;
+}
+
+QT_END_NAMESPACE
diff --git a/src/opengl/qglbuffer.h b/src/opengl/qglbuffer.h
new file mode 100644
index 0000000000..ecb86e2025
--- /dev/null
+++ b/src/opengl/qglbuffer.h
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** 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 QtOpenGL module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGLBUFFER_H
+#define QGLBUFFER_H
+
+#include <QtCore/qscopedpointer.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(OpenGL)
+
+class QGLBufferPrivate;
+
+class Q_OPENGL_EXPORT QGLBuffer
+{
+public:
+ enum Type
+ {
+ VertexBuffer = 0x8892, // GL_ARRAY_BUFFER
+ IndexBuffer = 0x8893, // GL_ELEMENT_ARRAY_BUFFER
+ PixelPackBuffer = 0x88EB, // GL_PIXEL_PACK_BUFFER
+ PixelUnpackBuffer = 0x88EC // GL_PIXEL_UNPACK_BUFFER
+ };
+
+ explicit QGLBuffer(QGLBuffer::Type type);
+ ~QGLBuffer();
+
+ enum UsagePattern
+ {
+ StreamDraw = 0x88E0, // GL_STREAM_DRAW
+ StreamRead = 0x88E1, // GL_STREAM_READ
+ StreamCopy = 0x88E2, // GL_STREAM_COPY
+ StaticDraw = 0x88E4, // GL_STATIC_DRAW
+ StaticRead = 0x88E5, // GL_STATIC_READ
+ StaticCopy = 0x88E6, // GL_STATIC_COPY
+ DynamicDraw = 0x88E8, // GL_DYNAMIC_DRAW
+ DynamicRead = 0x88E9, // GL_DYNAMIC_READ
+ DynamicCopy = 0x88EA // GL_DYNAMIC_COPY
+ };
+
+ enum Access
+ {
+ ReadOnly = 0x88B8, // GL_READ_ONLY
+ WriteOnly = 0x88B9, // GL_WRITE_ONLY
+ ReadWrite = 0x88BA // GL_READ_WRITE
+ };
+
+ QGLBuffer::Type type() const;
+
+ QGLBuffer::UsagePattern usagePattern() const;
+ void setUsagePattern(QGLBuffer::UsagePattern value);
+
+ bool create();
+ bool isCreated() const;
+
+ bool bind() const;
+ void release() const;
+
+ uint bufferId() const;
+
+ int size() const;
+
+ bool read(int offset, void *data, int count);
+ void write(int offset, const void *data, int count);
+
+ void allocate(const void *data, int count);
+ inline void allocate(int count) { allocate(0, count); }
+
+ void *map(QGLBuffer::Access access);
+ bool unmap();
+
+private:
+ QScopedPointer<QGLBufferPrivate> d_ptr;
+
+ Q_DISABLE_COPY(QGLBuffer)
+ Q_DECLARE_PRIVATE(QGLBuffer)
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/opengl/qglextensions.cpp b/src/opengl/qglextensions.cpp
index c091191a86..02d55014f4 100644
--- a/src/opengl/qglextensions.cpp
+++ b/src/opengl/qglextensions.cpp
@@ -191,35 +191,45 @@ bool qt_resolve_frag_program_extensions(QGLContext *ctx)
bool qt_resolve_buffer_extensions(QGLContext *ctx)
{
- if (glMapBufferARB && glUnmapBufferARB
-#if !defined(QT_OPENGL_ES_2)
- && glBindBuffer && glDeleteBuffers && glGenBuffers && glBufferData
-#endif
- )
+#if defined(QGL_RESOLVE_BUFFER_FUNCS)
+ if (glBindBuffer && glDeleteBuffers && glGenBuffers && glBufferData
+ && glBufferSubData && glGetBufferParameteriv)
return true;
+#endif
-#if !defined(QT_OPENGL_ES_2)
+#if defined(QGL_RESOLVE_BUFFER_FUNCS)
glBindBuffer = (_glBindBuffer) qt_gl_getProcAddressARB(ctx, "glBindBuffer");
glDeleteBuffers = (_glDeleteBuffers) qt_gl_getProcAddressARB(ctx, "glDeleteBuffers");
glGenBuffers = (_glGenBuffers) qt_gl_getProcAddressARB(ctx, "glGenBuffers");
glBufferData = (_glBufferData) qt_gl_getProcAddressARB(ctx, "glBufferData");
+ glBufferSubData = (_glBufferSubData) qt_gl_getProcAddressARB(ctx, "glBufferSubData");
+ glGetBufferSubData = (_glGetBufferSubData) qt_gl_getProcAddressARB(ctx, "glGetBufferSubData");
+ glGetBufferParameteriv = (_glGetBufferParameteriv) qt_gl_getProcAddressARB(ctx, "glGetBufferParameteriv");
#endif
glMapBufferARB = (_glMapBufferARB) qt_gl_getProcAddressARB(ctx, "glMapBuffer");
glUnmapBufferARB = (_glUnmapBufferARB) qt_gl_getProcAddressARB(ctx, "glUnmapBuffer");
- return glMapBufferARB
- && glUnmapBufferARB
-#if !defined(QT_OPENGL_ES_2)
- && glBindBuffer
+#if defined(QGL_RESOLVE_BUFFER_FUNCS)
+ return glBindBuffer
&& glDeleteBuffers
&& glGenBuffers
&& glBufferData
+ && glBufferSubData
+ && glGetBufferParameteriv;
+ // glGetBufferSubData() is optional
+#else
+ return true;
#endif
- ;
}
bool qt_resolve_glsl_extensions(QGLContext *ctx)
{
+ // Geometry shaders are optional...
+ glProgramParameteriEXT = (_glProgramParameteriEXT) ctx->getProcAddress(QLatin1String("glProgramParameteriEXT"));
+ glFramebufferTextureEXT = (_glFramebufferTextureEXT) ctx->getProcAddress(QLatin1String("glFramebufferTextureEXT"));
+ glFramebufferTextureLayerEXT = (_glFramebufferTextureLayerEXT) ctx->getProcAddress(QLatin1String("glFramebufferTextureLayerEXT"));
+ glFramebufferTextureFaceEXT = (_glFramebufferTextureFaceEXT) ctx->getProcAddress(QLatin1String("glFramebufferTextureFaceEXT"));
+
#if defined(QT_OPENGL_ES_2)
// The GLSL shader functions are always present in OpenGL/ES 2.0.
// The only exceptions are glGetProgramBinaryOES and glProgramBinaryOES.
diff --git a/src/opengl/qglextensions_p.h b/src/opengl/qglextensions_p.h
index b0cb429890..f6926f320f 100644
--- a/src/opengl/qglextensions_p.h
+++ b/src/opengl/qglextensions_p.h
@@ -71,6 +71,7 @@
#include <QtCore/qglobal.h>
#ifndef GL_ARB_vertex_buffer_object
+typedef ptrdiff_t GLintptrARB;
typedef ptrdiff_t GLsizeiptrARB;
#endif
@@ -78,13 +79,25 @@ typedef ptrdiff_t GLsizeiptrARB;
typedef char GLchar;
#endif
-// ARB_pixel_buffer_object
+// ARB_vertex_buffer_object
typedef void (APIENTRY *_glBindBuffer) (GLenum, GLuint);
typedef void (APIENTRY *_glDeleteBuffers) (GLsizei, const GLuint *);
typedef void (APIENTRY *_glGenBuffers) (GLsizei, GLuint *);
typedef void (APIENTRY *_glBufferData) (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
+typedef void (APIENTRY *_glBufferSubData) (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *);
+typedef void (APIENTRY *_glGetBufferSubData) (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *);
+typedef void (APIENTRY *_glGetBufferParameteriv) (GLenum, GLenum, GLint *);
typedef GLvoid* (APIENTRY *_glMapBufferARB) (GLenum, GLenum);
typedef GLboolean (APIENTRY *_glUnmapBufferARB) (GLenum);
+// We can call the buffer functions directly in OpenGL/ES 1.1 or higher,
+// but all other platforms need to resolve the extensions.
+#if defined(QT_OPENGL_ES)
+#if defined(GL_OES_VERSION_1_0) && !defined(GL_OES_VERSION_1_1)
+#define QGL_RESOLVE_BUFFER_FUNCS 1
+#endif
+#else
+#define QGL_RESOLVE_BUFFER_FUNCS 1
+#endif
// ARB_fragment_program
typedef void (APIENTRY *_glProgramStringARB) (GLenum, GLenum, GLsizei, const GLvoid *);
@@ -184,6 +197,15 @@ typedef void (APIENTRY *_glBlitFramebufferEXT) (int srcX0, int srcY0, int srcX1,
typedef void (APIENTRY *_glRenderbufferStorageMultisampleEXT) (GLenum target, GLsizei samples,
GLenum internalformat, GLsizei width, GLsizei height);
+// GL_EXT_geometry_shader4
+typedef void (APIENTRY *_glProgramParameteriEXT)(GLuint program, GLenum pname, GLint value);
+typedef void (APIENTRY *_glFramebufferTextureEXT)(GLenum target, GLenum attachment,
+ GLuint texture, GLint level);
+typedef void (APIENTRY *_glFramebufferTextureLayerEXT)(GLenum target, GLenum attachment,
+ GLuint texture, GLint level, GLint layer);
+typedef void (APIENTRY *_glFramebufferTextureFaceEXT)(GLenum target, GLenum attachment,
+ GLuint texture, GLint level, GLenum face);
+
// ARB_texture_compression
typedef void (APIENTRY *_glCompressedTexImage2DARB) (GLenum, GLint, GLenum, GLsizei,
GLsizei, GLint, GLsizei, const GLvoid *);
@@ -285,15 +307,22 @@ struct QGLExtensionFuncs
qt_glRenderbufferStorageMultisampleEXT = 0;
// Buffer objects:
-#if !defined(QT_OPENGL_ES_2)
+#if defined(QGL_RESOLVE_BUFFER_FUNCS)
qt_glBindBuffer = 0;
qt_glDeleteBuffers = 0;
qt_glGenBuffers = 0;
qt_glBufferData = 0;
+ qt_glBufferSubData = 0;
+ qt_glGetBufferSubData = 0;
+ qt_glGetBufferParameteriv = 0;
#endif
qt_glMapBufferARB = 0;
qt_glUnmapBufferARB = 0;
+ qt_glProgramParameteriEXT = 0;
+ qt_glFramebufferTextureEXT = 0;
+ qt_glFramebufferTextureLayerEXT = 0;
+ qt_glFramebufferTextureFaceEXT = 0;
#if !defined(QT_OPENGL_ES)
// Texture compression
qt_glCompressedTexImage2DARB = 0;
@@ -397,15 +426,23 @@ struct QGLExtensionFuncs
_glRenderbufferStorageMultisampleEXT qt_glRenderbufferStorageMultisampleEXT;
// Buffer objects
-#if !defined(QT_OPENGL_ES_2)
+#if defined(QGL_RESOLVE_BUFFER_FUNCS)
_glBindBuffer qt_glBindBuffer;
_glDeleteBuffers qt_glDeleteBuffers;
_glGenBuffers qt_glGenBuffers;
_glBufferData qt_glBufferData;
+ _glBufferSubData qt_glBufferSubData;
+ _glGetBufferSubData qt_glGetBufferSubData;
+ _glGetBufferParameteriv qt_glGetBufferParameteriv;
#endif
_glMapBufferARB qt_glMapBufferARB;
_glUnmapBufferARB qt_glUnmapBufferARB;
+ // Geometry shaders...
+ _glProgramParameteriEXT qt_glProgramParameteriEXT;
+ _glFramebufferTextureEXT qt_glFramebufferTextureEXT;
+ _glFramebufferTextureLayerEXT qt_glFramebufferTextureLayerEXT;
+ _glFramebufferTextureFaceEXT qt_glFramebufferTextureFaceEXT;
#if !defined(QT_OPENGL_ES)
// Texture compression
_glCompressedTexImage2DARB qt_glCompressedTexImage2DARB;
@@ -415,6 +452,14 @@ struct QGLExtensionFuncs
// OpenGL constants
+#ifndef GL_ARRAY_BUFFER
+#define GL_ARRAY_BUFFER 0x8892
+#endif
+
+#ifndef GL_STATIC_DRAW
+#define GL_STATIC_DRAW 0x88E4
+#endif
+
/* NV_texture_rectangle */
#ifndef GL_NV_texture_rectangle
#define GL_TEXTURE_RECTANGLE_NV 0x84F5
@@ -428,11 +473,11 @@ struct QGLExtensionFuncs
#endif
#ifndef GL_RGB16
-#define GL_RGB16 32852
+#define GL_RGB16 0x8054
#endif
#ifndef GL_UNSIGNED_SHORT_5_6_5
-#define GL_UNSIGNED_SHORT_5_6_5 33635
+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
#endif
#ifndef GL_UNSIGNED_INT_8_8_8_8_REV
@@ -599,6 +644,20 @@ struct QGLExtensionFuncs
#define GL_DECR_WRAP 0x8508
#endif
+#ifndef GL_VERSION_1_5
+#define GL_ARRAY_BUFFER 0x8892
+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
+#define GL_STREAM_DRAW 0x88E0
+#define GL_STREAM_READ 0x88E1
+#define GL_STREAM_COPY 0x88E2
+#define GL_STATIC_DRAW 0x88E4
+#define GL_STATIC_READ 0x88E5
+#define GL_STATIC_COPY 0x88E6
+#define GL_DYNAMIC_DRAW 0x88E8
+#define GL_DYNAMIC_READ 0x88E9
+#define GL_DYNAMIC_COPY 0x88EA
+#endif
+
#ifndef GL_VERSION_2_0
#define GL_FRAGMENT_SHADER 0x8B30
#define GL_VERTEX_SHADER 0x8B31
@@ -628,6 +687,29 @@ struct QGLExtensionFuncs
#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
#endif
+// Geometry shader defines
+#ifndef GL_GEOMETRY_SHADER_EXT
+# define GL_GEOMETRY_SHADER_EXT 0x8DD9
+# define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
+# define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
+# define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
+# define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
+# define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
+# define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
+# define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
+# define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
+# define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
+# define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
+# define GL_LINES_ADJACENCY_EXT 0xA
+# define GL_LINE_STRIP_ADJACENCY_EXT 0xB
+# define GL_TRIANGLES_ADJACENCY_EXT 0xC
+# define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0xD
+# define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
+# define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
+# define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
+# define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
+# define GL_PROGRAM_POINT_SIZE_EXT 0x8642
+#endif
#if !defined(QT_OPENGL_ES_2)
#define glProgramStringARB QGLContextPrivate::extensionFuncs(ctx).qt_glProgramStringARB
@@ -667,11 +749,14 @@ struct QGLExtensionFuncs
// Buffer objects
-#if !defined(QT_OPENGL_ES_2)
+#if defined(QGL_RESOLVE_BUFFER_FUNCS)
#define glBindBuffer QGLContextPrivate::extensionFuncs(ctx).qt_glBindBuffer
#define glDeleteBuffers QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteBuffers
#define glGenBuffers QGLContextPrivate::extensionFuncs(ctx).qt_glGenBuffers
#define glBufferData QGLContextPrivate::extensionFuncs(ctx).qt_glBufferData
+#define glBufferSubData QGLContextPrivate::extensionFuncs(ctx).qt_glBufferSubData
+#define glGetBufferSubData QGLContextPrivate::extensionFuncs(ctx).qt_glGetBufferSubData
+#define glGetBufferParameteriv QGLContextPrivate::extensionFuncs(ctx).qt_glGetBufferParameteriv
#endif
#define glMapBufferARB QGLContextPrivate::extensionFuncs(ctx).qt_glMapBufferARB
#define glUnmapBufferARB QGLContextPrivate::extensionFuncs(ctx).qt_glUnmapBufferARB
@@ -745,6 +830,11 @@ struct QGLExtensionFuncs
#define glClearDepth glClearDepthf
#endif
+#define glProgramParameteriEXT QGLContextPrivate::extensionFuncs(ctx).qt_glProgramParameteriEXT
+#define glFramebufferTextureEXT QGLContextPrivate::extensionFuncs(ctx).qt_glFramebufferTextureEXT
+#define glFramebufferTextureLayerEXT QGLContextPrivate::extensionFuncs(ctx).qt_glFramebufferTextureLayerEXT
+#define glFramebufferTextureFaceEXT QGLContextPrivate::extensionFuncs(ctx).qt_glFramebufferTextureFaceEXT
+
#if !defined(QT_OPENGL_ES)
#define glCompressedTexImage2D QGLContextPrivate::extensionFuncs(ctx).qt_glCompressedTexImage2DARB
#endif
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index dd6a3d59bb..890b029140 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -44,7 +44,7 @@
#include <qdebug.h>
#include <private/qgl_p.h>
-#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
+#if !defined(QT_OPENGL_ES_1)
#include <private/qpaintengineex_opengl2_p.h>
#endif
@@ -56,10 +56,6 @@
#include <qlibrary.h>
#include <qimage.h>
-#ifdef QT_OPENGL_ES_1_CL
-#include "qgl_cl_p.h"
-#endif
-
QT_BEGIN_NAMESPACE
extern QImage qt_gl_read_framebuffer(const QSize&, bool, bool);
@@ -132,7 +128,7 @@ void QGLFramebufferObjectFormat::detach()
attachments, texture target \c GL_TEXTURE_2D, and internal format \c GL_RGBA8.
On OpenGL/ES systems, the default internal format is \c GL_RGBA.
- \sa samples(), attachment(), target(), internalTextureFormat()
+ \sa samples(), attachment(), internalTextureFormat()
*/
QGLFramebufferObjectFormat::QGLFramebufferObjectFormat()
@@ -987,7 +983,7 @@ QImage QGLFramebufferObject::toImage() const
return image;
}
-#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
+#if !defined(QT_OPENGL_ES_1)
Q_GLOBAL_STATIC(QGL2PaintEngineEx, qt_buffer_2_engine)
#endif
@@ -1002,7 +998,7 @@ QPaintEngine *QGLFramebufferObject::paintEngine() const
if (d->engine)
return d->engine;
-#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
+#if !defined(QT_OPENGL_ES_1)
#if !defined (QT_OPENGL_ES_2)
if (qt_gl_preferGL2Engine()) {
#endif
diff --git a/src/opengl/qglpaintdevice.cpp b/src/opengl/qglpaintdevice.cpp
index 8ba010857c..2d82222871 100644
--- a/src/opengl/qglpaintdevice.cpp
+++ b/src/opengl/qglpaintdevice.cpp
@@ -48,14 +48,10 @@
#include <private/qpixmapdata_x11gl_p.h>
#endif
-#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
+#if !defined(QT_OPENGL_ES_1)
#include <private/qpixmapdata_gl_p.h>
#endif
-#if defined(QT_OPENGL_ES_1_CL)
-#include "qgl_cl_p.h"
-#endif
-
QT_BEGIN_NAMESPACE
QGLPaintDevice::QGLPaintDevice()
@@ -203,7 +199,7 @@ QGLPaintDevice* QGLPaintDevice::getDevice(QPaintDevice* pd)
glpd = &(static_cast<QGLFramebufferObject*>(pd)->d_func()->glDevice);
break;
case QInternal::Pixmap: {
-#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
+#if !defined(QT_OPENGL_ES_1)
QPixmapData* pmd = static_cast<QPixmap*>(pd)->pixmapData();
if (pmd->classId() == QPixmapData::OpenGLClass)
glpd = static_cast<QGLPixmapData*>(pmd)->glDevice();
diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp
index 46f7697fd3..eca9550fc8 100644
--- a/src/opengl/qglpixelbuffer.cpp
+++ b/src/opengl/qglpixelbuffer.cpp
@@ -78,7 +78,7 @@
#include <QtCore/qglobal.h>
-#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
+#if !defined(QT_OPENGL_ES_1)
#include <private/qpaintengineex_opengl2_p.h>
#endif
@@ -387,7 +387,7 @@ bool QGLPixelBuffer::isValid() const
return !d->invalid;
}
-#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
+#if !defined(QT_OPENGL_ES_1)
Q_GLOBAL_STATIC(QGL2PaintEngineEx, qt_buffer_2_engine)
#endif
@@ -398,7 +398,7 @@ Q_GLOBAL_STATIC(QOpenGLPaintEngine, qt_buffer_engine)
/*! \reimp */
QPaintEngine *QGLPixelBuffer::paintEngine() const
{
-#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL)
+#if defined(QT_OPENGL_ES_1)
return qt_buffer_engine();
#elif defined(QT_OPENGL_ES_2)
return qt_buffer_2_engine();
diff --git a/src/opengl/qglpixelbuffer.h b/src/opengl/qglpixelbuffer.h
index 3304dd8362..d9c7e3e5ef 100644
--- a/src/opengl/qglpixelbuffer.h
+++ b/src/opengl/qglpixelbuffer.h
@@ -112,6 +112,7 @@ private:
friend class QGLWindowSurface;
friend class QGLPaintDevice;
friend class QGLPBufferGLPaintDevice;
+ friend class QGLContextPrivate;
};
QT_END_NAMESPACE
diff --git a/src/opengl/qglpixelbuffer_egl.cpp b/src/opengl/qglpixelbuffer_egl.cpp
index dbe919deb5..db9e754a57 100644
--- a/src/opengl/qglpixelbuffer_egl.cpp
+++ b/src/opengl/qglpixelbuffer_egl.cpp
@@ -47,10 +47,6 @@
#include <qimage.h>
#include <private/qgl_p.h>
-#ifdef QT_OPENGL_ES_1_CL
-#include "qgl_cl_p.h"
-#endif
-
QT_BEGIN_NAMESPACE
#ifdef EGL_BIND_TO_TEXTURE_RGBA
@@ -86,7 +82,8 @@ bool QGLPixelBufferPrivate::init(const QSize &size, const QGLFormat &f, QGLWidge
#endif
} else {
QEglProperties configProps;
- qt_egl_set_format(configProps, QInternal::Pbuffer, f);
+ qt_eglproperties_set_glformat(configProps, f);
+ configProps.setDeviceType(QInternal::Pbuffer);
configProps.setRenderableType(ctx->api());
bool ok = false;
#if QGL_RENDER_TEXTURE
@@ -116,7 +113,7 @@ bool QGLPixelBufferPrivate::init(const QSize &size, const QGLFormat &f, QGLWidge
}
// Retrieve the actual format properties.
- qt_egl_update_format(*ctx, format);
+ qt_glformat_from_eglconfig(format, ctx->config());
// Create the attributes needed for the pbuffer.
QEglProperties attribs;
@@ -141,7 +138,7 @@ bool QGLPixelBufferPrivate::init(const QSize &size, const QGLFormat &f, QGLWidge
}
#endif
if (pbuf == EGL_NO_SURFACE) {
- qWarning() << "QGLPixelBufferPrivate::init(): Unable to create EGL pbuffer surface:" << QEglContext::errorString(eglGetError());
+ qWarning() << "QGLPixelBufferPrivate::init(): Unable to create EGL pbuffer surface:" << QEgl::errorString();
return false;
}
@@ -208,11 +205,12 @@ GLuint QGLPixelBuffer::generateDynamicTexture() const
bool QGLPixelBuffer::hasOpenGLPbuffers()
{
// See if we have at least 1 configuration that matches the default format.
- EGLDisplay dpy = QEglContext::display();
+ EGLDisplay dpy = QEgl::display();
if (dpy == EGL_NO_DISPLAY)
return false;
QEglProperties configProps;
- qt_egl_set_format(configProps, QInternal::Pbuffer, QGLFormat::defaultFormat());
+ qt_eglproperties_set_glformat(configProps, QGLFormat::defaultFormat());
+ configProps.setDeviceType(QInternal::Pbuffer);
configProps.setRenderableType(QEgl::OpenGL);
do {
EGLConfig cfg = 0;
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index 79484fa094..739983ec14 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -50,7 +50,7 @@
QT_BEGIN_NAMESPACE
-#if !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+#if !defined(QT_OPENGL_ES_1)
/*!
\class QGLShaderProgram
@@ -143,6 +143,8 @@ QT_BEGIN_NAMESPACE
\value Vertex Vertex shader written in the OpenGL Shading Language (GLSL).
\value Fragment Fragment shader written in the OpenGL Shading Language (GLSL).
+ \value Geometry Geometry shaders written in the OpenGL Shading
+ Language (GLSL), based on the GL_EXT_geometry_shader4 extension.
*/
#ifndef GL_FRAGMENT_SHADER
@@ -226,6 +228,8 @@ bool QGLShaderPrivate::create()
GLuint shader;
if (shaderType == QGLShader::Vertex)
shader = glCreateShader(GL_VERTEX_SHADER);
+ else if (shaderType == QGLShader::Geometry)
+ shader = glCreateShader(GL_GEOMETRY_SHADER_EXT);
else
shader = glCreateShader(GL_FRAGMENT_SHADER);
if (!shader) {
@@ -509,6 +513,10 @@ GLuint QGLShader::shaderId() const
return d->shaderGuard.id();
}
+
+
+
+
#undef ctx
#define ctx programGuard.context()
@@ -521,8 +529,9 @@ public:
, linked(false)
, inited(false)
, removingShaders(false)
- , vertexShader(0)
- , fragmentShader(0)
+ , geometryVertexCount(64)
+ , geometryInputType(0)
+ , geometryOutputType(0)
{
}
~QGLShaderProgramPrivate();
@@ -531,11 +540,14 @@ public:
bool linked;
bool inited;
bool removingShaders;
+
+ int geometryVertexCount;
+ GLenum geometryInputType;
+ GLenum geometryOutputType;
+
QString log;
QList<QGLShader *> shaders;
QList<QGLShader *> anonShaders;
- QGLShader *vertexShader;
- QGLShader *fragmentShader;
bool hasShader(QGLShader::ShaderType type) const;
};
@@ -604,6 +616,7 @@ bool QGLShaderProgram::init()
context = QGLContext::currentContext();
d->programGuard.setContext(context);
}
+
if (!context)
return false;
if (qt_resolve_glsl_extensions(const_cast<QGLContext *>(context))) {
@@ -831,6 +844,7 @@ bool QGLShaderProgram::link()
GLuint program = d->programGuard.id();
if (!program)
return false;
+
GLint value;
if (d->shaders.isEmpty()) {
// If there are no explicit shaders, then it is possible that the
@@ -843,6 +857,22 @@ bool QGLShaderProgram::link()
if (d->linked)
return true;
}
+
+ // Set up the geometry shader parameters
+ if (glProgramParameteriEXT) {
+ foreach (QGLShader *shader, d->shaders) {
+ if (shader->shaderType() & QGLShader::Geometry) {
+ glProgramParameteriEXT(program, GL_GEOMETRY_INPUT_TYPE_EXT,
+ d->geometryInputType);
+ glProgramParameteriEXT(program, GL_GEOMETRY_OUTPUT_TYPE_EXT,
+ d->geometryOutputType);
+ glProgramParameteriEXT(program, GL_GEOMETRY_VERTICES_OUT_EXT,
+ d->geometryVertexCount);
+ break;
+ }
+ }
+ }
+
glLinkProgram(program);
value = 0;
glGetProgramiv(program, GL_LINK_STATUS, &value);
@@ -1426,6 +1456,38 @@ void QGLShaderProgram::setAttributeArray
}
/*!
+ Sets an array of vertex \a values on the attribute at \a location
+ in this shader program. The \a stride indicates the number of bytes
+ between vertices. A default \a stride value of zero indicates that
+ the vertices are densely packed in \a values.
+
+ The \a type indicates the type of elements in the \a values array,
+ usually \c{GL_FLOAT}, \c{GL_UNSIGNED_BYTE}, etc. The \a tupleSize
+ indicates the number of components per vertex: 1, 2, 3, or 4.
+
+ The array will become active when enableAttributeArray() is called
+ on the \a location. Otherwise the value specified with
+ setAttributeValue() for \a location will be used.
+
+ The setAttributeBuffer() function can be used to set the attribute
+ array to an offset within a vertex buffer.
+
+ \sa setAttributeValue(), setUniformValue(), enableAttributeArray()
+ \sa disableAttributeArray(), setAttributeBuffer()
+ \since 4.7
+*/
+void QGLShaderProgram::setAttributeArray
+ (int location, GLenum type, const void *values, int tupleSize, int stride)
+{
+ Q_D(QGLShaderProgram);
+ Q_UNUSED(d);
+ if (location != -1) {
+ glVertexAttribPointer(location, tupleSize, type, GL_FALSE,
+ stride, values);
+ }
+}
+
+/*!
\overload
Sets an array of vertex \a values on the attribute called \a name
@@ -1511,6 +1573,92 @@ void QGLShaderProgram::setAttributeArray
}
/*!
+ \overload
+
+ Sets an array of vertex \a values on the attribute called \a name
+ in this shader program. The \a stride indicates the number of bytes
+ between vertices. A default \a stride value of zero indicates that
+ the vertices are densely packed in \a values.
+
+ The \a type indicates the type of elements in the \a values array,
+ usually \c{GL_FLOAT}, \c{GL_UNSIGNED_BYTE}, etc. The \a tupleSize
+ indicates the number of components per vertex: 1, 2, 3, or 4.
+
+ The array will become active when enableAttributeArray() is called
+ on the \a name. Otherwise the value specified with
+ setAttributeValue() for \a name will be used.
+
+ The setAttributeBuffer() function can be used to set the attribute
+ array to an offset within a vertex buffer.
+
+ \sa setAttributeValue(), setUniformValue(), enableAttributeArray()
+ \sa disableAttributeArray(), setAttributeBuffer()
+ \since 4.7
+*/
+void QGLShaderProgram::setAttributeArray
+ (const char *name, GLenum type, const void *values, int tupleSize, int stride)
+{
+ setAttributeArray(attributeLocation(name), type, values, tupleSize, stride);
+}
+
+/*!
+ Sets an array of vertex values on the attribute at \a location in
+ this shader program, starting at a specific \a offset in the
+ currently bound vertex buffer. The \a stride indicates the number
+ of bytes between vertices. A default \a stride value of zero
+ indicates that the vertices are densely packed in the value array.
+
+ The \a type indicates the type of elements in the vertex value
+ array, usually \c{GL_FLOAT}, \c{GL_UNSIGNED_BYTE}, etc. The \a
+ tupleSize indicates the number of components per vertex: 1, 2, 3,
+ or 4.
+
+ The array will become active when enableAttributeArray() is called
+ on the \a location. Otherwise the value specified with
+ setAttributeValue() for \a location will be used.
+
+ \sa setAttributeArray()
+ \since 4.7
+*/
+void QGLShaderProgram::setAttributeBuffer
+ (int location, GLenum type, int offset, int tupleSize, int stride)
+{
+ Q_D(QGLShaderProgram);
+ Q_UNUSED(d);
+ if (location != -1) {
+ glVertexAttribPointer(location, tupleSize, type, GL_FALSE, stride,
+ reinterpret_cast<const void *>(offset));
+ }
+}
+
+/*!
+ \overload
+
+ Sets an array of vertex values on the attribute called \a name
+ in this shader program, starting at a specific \a offset in the
+ currently bound vertex buffer. The \a stride indicates the number
+ of bytes between vertices. A default \a stride value of zero
+ indicates that the vertices are densely packed in the value array.
+
+ The \a type indicates the type of elements in the vertex value
+ array, usually \c{GL_FLOAT}, \c{GL_UNSIGNED_BYTE}, etc. The \a
+ tupleSize indicates the number of components per vertex: 1, 2, 3,
+ or 4.
+
+ The array will become active when enableAttributeArray() is called
+ on the \a name. Otherwise the value specified with
+ setAttributeValue() for \a name will be used.
+
+ \sa setAttributeArray()
+ \since 4.7
+*/
+void QGLShaderProgram::setAttributeBuffer
+ (const char *name, GLenum type, int offset, int tupleSize, int stride)
+{
+ setAttributeBuffer(attributeLocation(name), type, offset, tupleSize, stride);
+}
+
+/*!
Enables the vertex array at \a location in this shader program
so that the value set by setAttributeArray() on \a location
will be used by the shader program.
@@ -2307,6 +2455,42 @@ void QGLShaderProgram::setUniformValue(const char *name, const QMatrix4x4& value
\overload
Sets the uniform variable at \a location in the current context
+ to a 2x2 matrix \a value. The matrix elements must be specified
+ in column-major order.
+
+ \sa setAttributeValue()
+ \since 4.7
+*/
+void QGLShaderProgram::setUniformValue(int location, const GLfloat value[2][2])
+{
+ Q_D(QGLShaderProgram);
+ Q_UNUSED(d);
+ if (location != -1)
+ glUniformMatrix2fv(location, 1, GL_FALSE, value[0]);
+}
+
+/*!
+ \overload
+
+ Sets the uniform variable at \a location in the current context
+ to a 3x3 matrix \a value. The matrix elements must be specified
+ in column-major order.
+
+ \sa setAttributeValue()
+ \since 4.7
+*/
+void QGLShaderProgram::setUniformValue(int location, const GLfloat value[3][3])
+{
+ Q_D(QGLShaderProgram);
+ Q_UNUSED(d);
+ if (location != -1)
+ glUniformMatrix3fv(location, 1, GL_FALSE, value[0]);
+}
+
+/*!
+ \overload
+
+ Sets the uniform variable at \a location in the current context
to a 4x4 matrix \a value. The matrix elements must be specified
in column-major order.
@@ -2320,6 +2504,37 @@ void QGLShaderProgram::setUniformValue(int location, const GLfloat value[4][4])
glUniformMatrix4fv(location, 1, GL_FALSE, value[0]);
}
+
+/*!
+ \overload
+
+ Sets the uniform variable called \a name in the current context
+ to a 2x2 matrix \a value. The matrix elements must be specified
+ in column-major order.
+
+ \sa setAttributeValue()
+ \since 4.7
+*/
+void QGLShaderProgram::setUniformValue(const char *name, const GLfloat value[2][2])
+{
+ setUniformValue(uniformLocation(name), value);
+}
+
+/*!
+ \overload
+
+ Sets the uniform variable called \a name in the current context
+ to a 3x3 matrix \a value. The matrix elements must be specified
+ in column-major order.
+
+ \sa setAttributeValue()
+ \since 4.7
+*/
+void QGLShaderProgram::setUniformValue(const char *name, const GLfloat value[3][3])
+{
+ setUniformValue(uniformLocation(name), value);
+}
+
/*!
\overload
@@ -2862,6 +3077,108 @@ void QGLShaderProgram::setUniformValueArray(const char *name, const QMatrix4x4 *
#undef ctx
/*!
+ Returns the hardware limit for how many vertices a geometry shader
+ can output.
+
+ \since 4.7
+
+ \sa setGeometryOutputVertexCount()
+*/
+int QGLShaderProgram::maxGeometryOutputVertices() const
+{
+ GLint n;
+ glGetIntegerv(GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT, &n);
+ return n;
+}
+
+/*!
+ Sets the maximum number of vertices the current geometry shader
+ program will produce, if active, to \a count.
+
+ \since 4.7
+
+ This parameter takes effect the next time the program is linked.
+*/
+void QGLShaderProgram::setGeometryOutputVertexCount(int count)
+{
+#ifndef QT_NO_DEBUG
+ int max = maxGeometryOutputVertices();
+ if (count > max) {
+ qWarning("QGLShaderProgram::setGeometryOutputVertexCount: count: %d higher than maximum: %d",
+ count, max);
+ }
+#endif
+ d_func()->geometryVertexCount = count;
+}
+
+
+/*!
+ Returns the maximum number of vertices the current geometry shader
+ program will produce, if active.
+
+ \since 4.7
+
+ This parameter takes effect the ntext time the program is linked.
+*/
+int QGLShaderProgram::geometryOutputVertexCount() const
+{
+ return d_func()->geometryVertexCount;
+}
+
+
+/*!
+ Sets the input type from \a inputType.
+
+ This parameter takes effect the next time the program is linked.
+*/
+void QGLShaderProgram::setGeometryInputType(GLenum inputType)
+{
+ d_func()->geometryInputType = inputType;
+}
+
+
+/*!
+ Returns the geometry shader input type, if active.
+
+ This parameter takes effect the next time the program is linked.
+
+ \since 4.7
+ */
+
+GLenum QGLShaderProgram::geometryInputType() const
+{
+ return d_func()->geometryInputType;
+}
+
+
+/*!
+ Sets the output type from the geometry shader, if active, to
+ \a outputType.
+
+ This parameter takes effect the next time the program is linked.
+
+ \since 4.7
+*/
+void QGLShaderProgram::setGeometryOutputType(GLenum outputType)
+{
+ d_func()->geometryOutputType = outputType;
+}
+
+
+/*!
+ Returns the geometry shader output type, if active.
+
+ This parameter takes effect the next time the program is linked.
+
+ \since 4.7
+ */
+GLenum QGLShaderProgram::geometryOutputType() const
+{
+ return d_func()->geometryOutputType;
+}
+
+
+/*!
Returns true if shader programs written in the OpenGL Shading
Language (GLSL) are supported on this system; false otherwise.
@@ -2893,8 +3210,71 @@ void QGLShaderProgram::shaderDestroyed()
removeShader(shader);
}
+
+#undef ctx
+#undef context
+
+/*!
+ Returns true if shader programs of type \a type are supported on
+ this system; false otherwise.
+
+ The \a context is used to resolve the GLSL extensions.
+ If \a context is null, then QGLContext::currentContext() is used.
+
+ \since 4.7
+*/
+bool QGLShader::hasOpenGLShaders(ShaderType type, const QGLContext *context)
+{
+ if (!context)
+ context = QGLContext::currentContext();
+ if (!context)
+ return false;
+
+ if ((type & ~(Geometry | Vertex | Fragment)) || type == 0)
+ return false;
+
+ bool resolved = qt_resolve_glsl_extensions(const_cast<QGLContext *>(context));
+ if (!resolved)
+ return false;
+
+ if ((type & Geometry) && !QByteArray((const char *) glGetString(GL_EXTENSIONS)).contains("GL_EXT_geometry_shader4"))
+ return false;
+
+ return true;
+}
+
+
+
#ifdef Q_MAC_COMPAT_GL_FUNCTIONS
/*! \internal */
+void QGLShaderProgram::setAttributeArray
+ (int location, QMacCompatGLenum type, const void *values, int tupleSize, int stride)
+{
+ setAttributeArray(location, GLenum(type), values, tupleSize, stride);
+}
+
+/*! \internal */
+void QGLShaderProgram::setAttributeArray
+ (const char *name, QMacCompatGLenum type, const void *values, int tupleSize, int stride)
+{
+ setAttributeArray(name, GLenum(type), values, tupleSize, stride);
+}
+
+/*! \internal */
+void QGLShaderProgram::setAttributeBuffer
+ (int location, QMacCompatGLenum type, int offset, int tupleSize, int stride)
+{
+ setAttributeBuffer(location, GLenum(type), offset, tupleSize, stride);
+}
+
+/*! \internal */
+void QGLShaderProgram::setAttributeBuffer
+ (const char *name, QMacCompatGLenum type, int offset, int tupleSize, int stride)
+{
+ setAttributeBuffer(name, GLenum(type), offset, tupleSize, stride);
+}
+
+/*! \internal */
void QGLShaderProgram::setUniformValue(int location, QMacCompatGLint value)
{
setUniformValue(location, GLint(value));
@@ -2943,6 +3323,6 @@ void QGLShaderProgram::setUniformValueArray(const char *name, const QMacCompatGL
}
#endif
-#endif // !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+#endif // !defined(QT_OPENGL_ES_1)
QT_END_NAMESPACE
diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h
index 24ab986843..d612b05ce2 100644
--- a/src/opengl/qglshaderprogram.h
+++ b/src/opengl/qglshaderprogram.h
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(OpenGL)
-#if !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+#if !defined(QT_OPENGL_ES_1)
class QGLShaderProgram;
class QGLShaderPrivate;
@@ -66,7 +66,8 @@ public:
enum ShaderTypeBit
{
Vertex = 0x0001,
- Fragment = 0x0002
+ Fragment = 0x0002,
+ Geometry = 0x0004
};
Q_DECLARE_FLAGS(ShaderType, ShaderTypeBit)
@@ -88,6 +89,8 @@ public:
GLuint shaderId() const;
+ static bool hasOpenGLShaders(ShaderType type, const QGLContext *context = 0);
+
private:
friend class QGLShaderProgram;
@@ -100,6 +103,14 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QGLShader::ShaderType)
class QGLShaderProgramPrivate;
+#ifndef GL_EXT_geometry_shader4
+# define GL_LINES_ADJACENCY_EXT 0xA
+# define GL_LINE_STRIP_ADJACENCY_EXT 0xB
+# define GL_TRIANGLES_ADJACENCY_EXT 0xC
+# define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0xD
+#endif
+
+
class Q_OPENGL_EXPORT QGLShaderProgram : public QObject
{
Q_OBJECT
@@ -128,6 +139,17 @@ public:
GLuint programId() const;
+ int maxGeometryOutputVertices() const;
+
+ void setGeometryOutputVertexCount(int count);
+ int geometryOutputVertexCount() const;
+
+ void setGeometryInputType(GLenum inputType);
+ GLenum geometryInputType() const;
+
+ void setGeometryOutputType(GLenum outputType);
+ GLenum geometryOutputType() const;
+
void bindAttributeLocation(const char *name, int location);
void bindAttributeLocation(const QByteArray& name, int location);
void bindAttributeLocation(const QString& name, int location);
@@ -165,6 +187,8 @@ public:
void setAttributeArray
(int location, const QVector4D *values, int stride = 0);
void setAttributeArray
+ (int location, GLenum type, const void *values, int tupleSize, int stride = 0);
+ void setAttributeArray
(const char *name, const GLfloat *values, int tupleSize, int stride = 0);
void setAttributeArray
(const char *name, const QVector2D *values, int stride = 0);
@@ -172,6 +196,24 @@ public:
(const char *name, const QVector3D *values, int stride = 0);
void setAttributeArray
(const char *name, const QVector4D *values, int stride = 0);
+ void setAttributeArray
+ (const char *name, GLenum type, const void *values, int tupleSize, int stride = 0);
+
+ void setAttributeBuffer
+ (int location, GLenum type, int offset, int tupleSize, int stride = 0);
+ void setAttributeBuffer
+ (const char *name, GLenum type, int offset, int tupleSize, int stride = 0);
+
+#ifdef Q_MAC_COMPAT_GL_FUNCTIONS
+ void setAttributeArray
+ (int location, QMacCompatGLenum type, const void *values, int tupleSize, int stride = 0);
+ void setAttributeArray
+ (const char *name, QMacCompatGLenum type, const void *values, int tupleSize, int stride = 0);
+ void setAttributeBuffer
+ (int location, QMacCompatGLenum type, int offset, int tupleSize, int stride = 0);
+ void setAttributeBuffer
+ (const char *name, QMacCompatGLenum type, int offset, int tupleSize, int stride = 0);
+#endif
void enableAttributeArray(int location);
void enableAttributeArray(const char *name);
@@ -216,6 +258,8 @@ public:
void setUniformValue(int location, const QMatrix4x2& value);
void setUniformValue(int location, const QMatrix4x3& value);
void setUniformValue(int location, const QMatrix4x4& value);
+ void setUniformValue(int location, const GLfloat value[2][2]);
+ void setUniformValue(int location, const GLfloat value[3][3]);
void setUniformValue(int location, const GLfloat value[4][4]);
void setUniformValue(int location, const QTransform& value);
@@ -242,6 +286,8 @@ public:
void setUniformValue(const char *name, const QMatrix4x2& value);
void setUniformValue(const char *name, const QMatrix4x3& value);
void setUniformValue(const char *name, const QMatrix4x4& value);
+ void setUniformValue(const char *name, const GLfloat value[2][2]);
+ void setUniformValue(const char *name, const GLfloat value[3][3]);
void setUniformValue(const char *name, const GLfloat value[4][4]);
void setUniformValue(const char *name, const QTransform& value);
diff --git a/src/opengl/qgraphicsshadereffect.cpp b/src/opengl/qgraphicsshadereffect.cpp
index dddc85d882..f53ef5418b 100644
--- a/src/opengl/qgraphicsshadereffect.cpp
+++ b/src/opengl/qgraphicsshadereffect.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include "qgraphicsshadereffect_p.h"
-#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
+#if !defined(QT_OPENGL_ES_1)
#include "qglshaderprogram.h"
#include "gl2paintengineex/qglcustomshaderstage_p.h"
#define QGL_HAVE_CUSTOM_SHADERS 1
diff --git a/src/opengl/qgraphicssystem_gl.cpp b/src/opengl/qgraphicssystem_gl.cpp
index 3a399ae4c1..a282e4c118 100644
--- a/src/opengl/qgraphicssystem_gl.cpp
+++ b/src/opengl/qgraphicssystem_gl.cpp
@@ -62,7 +62,6 @@ QPixmapData *QGLGraphicsSystem::createPixmapData(QPixmapData::PixelType type) co
if (type == QPixmapData::PixmapType && QX11GLPixmapData::hasX11GLPixmaps())
return new QX11GLPixmapData();
#endif
-
return new QGLPixmapData(type);
}
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index 57918d06e7..c8307a09e2 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -60,6 +60,7 @@
#include <private/qglpixelbuffer_p.h>
#include <private/qbezier_p.h>
#include <qglframebufferobject.h>
+#include <private/qstatictext_p.h>
#include "private/qtessellator_p.h"
@@ -71,10 +72,6 @@
#include "private/qwsmanager_p.h"
#endif
-#ifdef QT_OPENGL_ES_1_CL
-#include "qgl_cl_p.h"
-#endif
-
#define QGL_FUNC_CONTEXT QGLContext *ctx = const_cast<QGLContext *>(device->context());
#include <stdlib.h>
@@ -780,7 +777,7 @@ public:
void drawOffscreenPath(const QPainterPath &path);
void composite(const QRectF &rect, const QPoint &maskOffset = QPoint());
- void composite(GLuint primitive, const q_vertexType *vertexArray, int vertexCount, const QPoint &maskOffset = QPoint());
+ void composite(GLuint primitive, const GLfloat *vertexArray, int vertexCount, const QPoint &maskOffset = QPoint());
bool createFragmentPrograms();
void deleteFragmentPrograms();
@@ -1787,7 +1784,7 @@ class QOpenGLTrapezoidToArrayTessellator : public QOpenGLTessellator
public:
QOpenGLTrapezoidToArrayTessellator() : vertices(0), allocated(0), size(0) {}
~QOpenGLTrapezoidToArrayTessellator() { free(vertices); }
- q_vertexType *vertices;
+ GLfloat *vertices;
int allocated;
int size;
QRectF bounds;
@@ -1808,36 +1805,36 @@ void QOpenGLTrapezoidToArrayTessellator::addTrap(const Trapezoid &trap)
if (size > allocated - 12) {
#endif
allocated = qMax(2*allocated, 512);
- vertices = (q_vertexType *)realloc(vertices, allocated * sizeof(q_vertexType));
+ vertices = (GLfloat *)realloc(vertices, allocated * sizeof(GLfloat));
}
QGLTrapezoid t = toGLTrapezoid(trap);
#ifndef QT_OPENGL_ES
- vertices[size++] = f2vt(t.topLeftX);
- vertices[size++] = f2vt(t.top);
- vertices[size++] = f2vt(t.topRightX);
- vertices[size++] = f2vt(t.top);
- vertices[size++] = f2vt(t.bottomRightX);
- vertices[size++] = f2vt(t.bottom);
- vertices[size++] = f2vt(t.bottomLeftX);
- vertices[size++] = f2vt(t.bottom);
+ vertices[size++] = t.topLeftX;
+ vertices[size++] = t.top;
+ vertices[size++] = t.topRightX;
+ vertices[size++] = t.top;
+ vertices[size++] = t.bottomRightX;
+ vertices[size++] = t.bottom;
+ vertices[size++] = t.bottomLeftX;
+ vertices[size++] = t.bottom;
#else
// First triangle
- vertices[size++] = f2vt(t.topLeftX);
- vertices[size++] = f2vt(t.top);
- vertices[size++] = f2vt(t.topRightX);
- vertices[size++] = f2vt(t.top);
- vertices[size++] = f2vt(t.bottomRightX);
- vertices[size++] = f2vt(t.bottom);
+ vertices[size++] = t.topLeftX;
+ vertices[size++] = t.top;
+ vertices[size++] = t.topRightX;
+ vertices[size++] = t.top;
+ vertices[size++] = t.bottomRightX;
+ vertices[size++] = t.bottom;
// Second triangle
- vertices[size++] = f2vt(t.bottomLeftX);
- vertices[size++] = f2vt(t.bottom);
- vertices[size++] = f2vt(t.topLeftX);
- vertices[size++] = f2vt(t.top);
- vertices[size++] = f2vt(t.bottomRightX);
- vertices[size++] = f2vt(t.bottom);
+ vertices[size++] = t.bottomLeftX;
+ vertices[size++] = t.bottom;
+ vertices[size++] = t.topLeftX;
+ vertices[size++] = t.top;
+ vertices[size++] = t.bottomRightX;
+ vertices[size++] = t.bottom;
#endif
}
@@ -1864,7 +1861,7 @@ void QOpenGLPaintEnginePrivate::fillPolygon_dev(const QPointF *polygonPoints, in
if (use_fragment_programs && !(fast_style && has_fast_composition_mode)) {
composite(geometry_mode, tessellator.vertices, tessellator.size / 2);
} else {
- glVertexPointer(2, q_vertexTypeEnum, 0, tessellator.vertices);
+ glVertexPointer(2, GL_FLOAT, 0, tessellator.vertices);
glEnableClientState(GL_VERTEX_ARRAY);
glDrawArrays(geometry_mode, 0, tessellator.size/2);
glDisableClientState(GL_VERTEX_ARRAY);
@@ -2265,7 +2262,7 @@ void QOpenGLPaintEnginePrivate::updateDepthClip()
return;
}
-#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_ES_1_CL)
+#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_2)
glClearDepthf(0.0f);
#else
glClearDepth(0.0f);
@@ -2281,12 +2278,12 @@ void QOpenGLPaintEnginePrivate::updateDepthClip()
const QVector<QRect> rects = q->state()->clipEnabled ? q->state()->clipRegion.rects() : q->systemClip().rects();
// rectangle count * 2 (triangles) * vertex count * component count (Z omitted)
- QDataBuffer<q_vertexType> clipVertex(rects.size()*2*3*2);
+ QDataBuffer<GLfloat> clipVertex(rects.size()*2*3*2);
for (int i = 0; i < rects.size(); ++i) {
- q_vertexType x = i2vt(rects.at(i).left());
- q_vertexType w = i2vt(rects.at(i).width());
- q_vertexType h = i2vt(rects.at(i).height());
- q_vertexType y = i2vt(rects.at(i).top());
+ GLfloat x = GLfloat(rects.at(i).left());
+ GLfloat w = GLfloat(rects.at(i).width());
+ GLfloat h = GLfloat(rects.at(i).height());
+ GLfloat y = GLfloat(rects.at(i).top());
// First triangle
clipVertex.add(x);
@@ -2314,7 +2311,7 @@ void QOpenGLPaintEnginePrivate::updateDepthClip()
glLoadIdentity();
glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(2, q_vertexTypeEnum, 0, clipVertex.data());
+ glVertexPointer(2, GL_FLOAT, 0, clipVertex.data());
glDrawArrays(GL_TRIANGLES, 0, rects.size()*2*3);
glDisableClientState(GL_VERTEX_ARRAY);
@@ -3106,8 +3103,8 @@ QGLTrapezoidMaskGenerator::QGLTrapezoidMaskGenerator(const QPainterPath &path, c
{
}
-extern void qt_add_rect_to_array(const QRectF &r, q_vertexType *array);
-extern void qt_add_texcoords_to_array(qreal x1, qreal y1, qreal x2, qreal y2, q_vertexType *array);
+extern void qt_add_rect_to_array(const QRectF &r, GLfloat *array);
+extern void qt_add_texcoords_to_array(qreal x1, qreal y1, qreal x2, qreal y2, GLfloat *array);
void QGLTrapezoidMaskGenerator::drawMask(const QRect &rect)
{
@@ -3138,7 +3135,7 @@ void QGLTrapezoidMaskGenerator::drawMask(const QRect &rect)
// clear mask
glBlendFunc(GL_ZERO, GL_ZERO); // clear
- glVertexPointer(2, q_vertexTypeEnum, 0, vertexArray);
+ glVertexPointer(2, GL_FLOAT, 0, vertexArray);
glEnableClientState(GL_VERTEX_ARRAY);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
glDisableClientState(GL_VERTEX_ARRAY);
@@ -3369,7 +3366,7 @@ void QGLEllipseMaskGenerator::drawMask(const QRect &rect)
glProgramLocalParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, maskVariableLocations[VAR_ELLIPSE_OFFSET], ellipse_offset);
glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(2, q_vertexTypeEnum, 0, vertexArray);
+ glVertexPointer(2, GL_FLOAT, 0, vertexArray);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
glDisableClientState(GL_VERTEX_ARRAY);
glDisable(GL_FRAGMENT_PROGRAM_ARB);
@@ -3399,7 +3396,7 @@ void QOpenGLPaintEnginePrivate::drawFastRect(const QRectF &r)
Q_Q(QOpenGLPaintEngine);
DEBUG_ONCE_STR("QOpenGLPaintEngine::drawRects(): drawing fast rect");
- q_vertexType vertexArray[10];
+ GLfloat vertexArray[10];
qt_add_rect_to_array(r, vertexArray);
if (has_pen)
@@ -3420,7 +3417,7 @@ void QOpenGLPaintEnginePrivate::drawFastRect(const QRectF &r)
if (fast_style && has_fast_composition_mode) {
glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(2, q_vertexTypeEnum, 0, vertexArray);
+ glVertexPointer(2, GL_FLOAT, 0, vertexArray);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
glDisableClientState(GL_VERTEX_ARRAY);
} else {
@@ -3439,7 +3436,7 @@ void QOpenGLPaintEnginePrivate::drawFastRect(const QRectF &r)
vertexArray[8] = vertexArray[0];
vertexArray[9] = vertexArray[1];
- glVertexPointer(2, q_vertexTypeEnum, 0, vertexArray);
+ glVertexPointer(2, GL_FLOAT, 0, vertexArray);
glEnableClientState(GL_VERTEX_ARRAY);
glDrawArrays(GL_LINE_STRIP, 0, 5);
glDisableClientState(GL_VERTEX_ARRAY);
@@ -3546,7 +3543,7 @@ void QOpenGLPaintEngine::drawRects(const QRectF *rects, int rectCount)
}
}
-static void addQuadAsTriangle(q_vertexType *quad, q_vertexType *triangle)
+static void addQuadAsTriangle(GLfloat *quad, GLfloat *triangle)
{
triangle[0] = quad[0];
triangle[1] = quad[1];
@@ -3607,7 +3604,7 @@ void QOpenGLPaintEngine::drawPoints(const QPointF *points, int pointCount)
d->flushDrawQueue();
if (d->has_fast_pen) {
- QVarLengthArray<q_vertexType> vertexArray(6 * pointCount);
+ QVarLengthArray<GLfloat> vertexArray(6 * pointCount);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
@@ -3617,25 +3614,22 @@ void QOpenGLPaintEngine::drawPoints(const QPointF *points, int pointCount)
for (int i = 0; i < pointCount; ++i) {
QPointF mapped = d->matrix.map(points[i]);
- qreal xf = qRound(mapped.x());
- qreal yf = qRound(mapped.y());
-
- q_vertexType x = f2vt(xf);
- q_vertexType y = f2vt(yf);
+ GLfloat x = GLfloat(qRound(mapped.x()));
+ GLfloat y = GLfloat(qRound(mapped.y()));
vertexArray[j++] = x;
- vertexArray[j++] = y - f2vt(0.5);
+ vertexArray[j++] = y - 0.5f;
- vertexArray[j++] = x + f2vt(1.5);
- vertexArray[j++] = y + f2vt(1.0);
+ vertexArray[j++] = x + 1.5f;
+ vertexArray[j++] = y + 1.0f;
vertexArray[j++] = x;
- vertexArray[j++] = y + f2vt(1.0);
+ vertexArray[j++] = y + 1.0f;
}
glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(2, q_vertexTypeEnum, 0, vertexArray.constData());
+ glVertexPointer(2, GL_FLOAT, 0, vertexArray.constData());
glDrawArrays(GL_TRIANGLES, 0, pointCount*3);
glDisableClientState(GL_VERTEX_ARRAY);
@@ -3652,7 +3646,7 @@ void QOpenGLPaintEngine::drawPoints(const QPointF *points, int pointCount)
}
else {
Q_ASSERT(sizeof(QPointF) == 8);
- glVertexPointer(2, q_vertexTypeEnum, 0, vertexArray);
+ glVertexPointer(2, GL_FLOAT, 0, vertexArray);
}
glEnableClientState(GL_VERTEX_ARRAY);
@@ -3720,47 +3714,47 @@ void QOpenGLPaintEngine::drawLines(const QLineF *lines, int lineCount)
}
}
- q_vertexType endCap = f2vt(d->cpen.capStyle() == Qt::FlatCap ? 0 : 0.5);
+ GLfloat endCap = d->cpen.capStyle() == Qt::FlatCap ? 0.0f : 0.5f;
if (useRects) {
- QVarLengthArray<q_vertexType> vertexArray(12 * lineCount);
+ QVarLengthArray<GLfloat> vertexArray(12 * lineCount);
- q_vertexType quad[8];
+ GLfloat quad[8];
for (int i = 0; i < lineCount; ++i) {
- q_vertexType x1 = f2vt(lines[i].x1());
- q_vertexType x2 = f2vt(lines[i].x2());
- q_vertexType y1 = f2vt(lines[i].y1());
- q_vertexType y2 = f2vt(lines[i].y2());
+ GLfloat x1 = lines[i].x1();
+ GLfloat x2 = lines[i].x2();
+ GLfloat y1 = lines[i].y1();
+ GLfloat y2 = lines[i].y2();
if (x1 == x2) {
if (y1 > y2)
qSwap(y1, y2);
- quad[0] = x1 - f2vt(0.5);
+ quad[0] = x1 - 0.5f;
quad[1] = y1 - endCap;
- quad[2] = x1 + f2vt(0.5);
+ quad[2] = x1 + 0.5f;
quad[3] = y1 - endCap;
- quad[4] = x1 + f2vt(0.5);
+ quad[4] = x1 + 0.5f;
quad[5] = y2 + endCap;
- quad[6] = x1 - f2vt(0.5);
+ quad[6] = x1 - 0.5f;
quad[7] = y2 + endCap;
} else {
if (x1 > x2)
qSwap(x1, x2);
quad[0] = x1 - endCap;
- quad[1] = y1 + f2vt(0.5);
+ quad[1] = y1 + 0.5f;
quad[2] = x1 - endCap;
- quad[3] = y1 - f2vt(0.5);
+ quad[3] = y1 - 0.5f;
quad[4] = x2 + endCap;
- quad[5] = y1 - f2vt(0.5);
+ quad[5] = y1 - 0.5f;
quad[6] = x2 + endCap;
- quad[7] = y1 + f2vt(0.5);
+ quad[7] = y1 + 0.5f;
}
addQuadAsTriangle(quad, &vertexArray[12*i]);
@@ -3768,26 +3762,26 @@ void QOpenGLPaintEngine::drawLines(const QLineF *lines, int lineCount)
glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(2, q_vertexTypeEnum, 0, vertexArray.constData());
+ glVertexPointer(2, GL_FLOAT, 0, vertexArray.constData());
glDrawArrays(GL_TRIANGLES, 0, lineCount*6);
glDisableClientState(GL_VERTEX_ARRAY);
} else {
- QVarLengthArray<q_vertexType> vertexArray(4 * lineCount);
+ QVarLengthArray<GLfloat> vertexArray(4 * lineCount);
for (int i = 0; i < lineCount; ++i) {
const QPointF a = lines[i].p1();
- vertexArray[4*i] = f2vt(lines[i].x1());
- vertexArray[4*i+1] = f2vt(lines[i].y1());
- vertexArray[4*i+2] = f2vt(lines[i].x2());
- vertexArray[4*i+3] = f2vt(lines[i].y2());
+ vertexArray[4*i] = lines[i].x1();
+ vertexArray[4*i+1] = lines[i].y1();
+ vertexArray[4*i+2] = lines[i].x2();
+ vertexArray[4*i+3] = lines[i].y2();
}
glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(2, q_vertexTypeEnum, 0, vertexArray.constData());
+ glVertexPointer(2, GL_FLOAT, 0, vertexArray.constData());
glDrawArrays(GL_LINES, 0, lineCount*2);
- glVertexPointer(2, q_vertexTypeEnum, 4*sizeof(q_vertexType), vertexArray.constData() + 2);
+ glVertexPointer(2, GL_FLOAT, 4*sizeof(GLfloat), vertexArray.constData() + 2);
glDrawArrays(GL_POINTS, 0, lineCount);
glDisableClientState(GL_VERTEX_ARRAY);
@@ -3874,7 +3868,7 @@ void QOpenGLPaintEngine::drawPolygon(const QPointF *points, int pointCount, Poly
}
else {
Q_ASSERT(sizeof(QPointF) == 8);
- glVertexPointer(2, q_vertexTypeEnum, 0, vertexArray);
+ glVertexPointer(2, GL_FLOAT, 0, vertexArray);
}
glEnableClientState(GL_VERTEX_ARRAY);
@@ -3893,12 +3887,12 @@ void QOpenGLPaintEngine::drawPolygon(const QPointF *points, int pointCount, Poly
if (d->has_pen) {
if (d->has_fast_pen && !d->high_quality_antialiasing) {
d->setGradientOps(d->cpen.brush(), bounds);
- QVarLengthArray<q_vertexType> vertexArray(pointCount*2 + 2);
- glVertexPointer(2, q_vertexTypeEnum, 0, vertexArray.constData());
+ QVarLengthArray<GLfloat> vertexArray(pointCount*2 + 2);
+ glVertexPointer(2, GL_FLOAT, 0, vertexArray.constData());
int i;
for (i=0; i<pointCount; ++i) {
- vertexArray[i*2] = f2vt(points[i].x());
- vertexArray[i*2+1] = f2vt(points[i].y());
+ vertexArray[i*2] = points[i].x();
+ vertexArray[i*2+1] = points[i].y();
}
glEnableClientState(GL_VERTEX_ARRAY);
@@ -4074,7 +4068,7 @@ void QOpenGLPaintEnginePrivate::strokePathFastPen(const QPainterPath &path, bool
switch (e.type) {
case QPainterPath::MoveToElement:
if (i != 0) {
- glVertexPointer(2, q_vertexTypeEnum, 0, tess_points.data());
+ glVertexPointer(2, GL_FLOAT, 0, tess_points.data());
glDrawArrays(GL_LINE_STRIP, 0, tess_points.size());
tess_points.reset();
}
@@ -4124,7 +4118,7 @@ void QOpenGLPaintEnginePrivate::strokePathFastPen(const QPainterPath &path, bool
break;
} // end of switch
}
- glVertexPointer(2, q_vertexTypeEnum, 0, tess_points.data());
+ glVertexPointer(2, GL_FLOAT, 0, tess_points.data());
glDrawArrays(GL_LINE_STRIP, 0, tess_points.size());
glDisableClientState(GL_VERTEX_ARRAY);
#endif
@@ -4391,8 +4385,8 @@ void QOpenGLPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pm, con
glRotatef(180.0, 0.0, 0.0, 1.0);
}
- q_vertexType vertexArray[4*2];
- q_vertexType texCoordArray[4*2];
+ GLfloat vertexArray[4*2];
+ GLfloat texCoordArray[4*2];
double offset_x = offset.x() / pm.width();
double offset_y = offset.y() / pm.height();
@@ -4401,8 +4395,8 @@ void QOpenGLPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pm, con
qt_add_texcoords_to_array(offset_x, offset_y,
tc_w + offset_x, tc_h + offset_y, texCoordArray);
- glVertexPointer(2, q_vertexTypeEnum, 0, vertexArray);
- glTexCoordPointer(2, q_vertexTypeEnum, 0, texCoordArray);
+ glVertexPointer(2, GL_FLOAT, 0, vertexArray);
+ glTexCoordPointer(2, GL_FLOAT, 0, texCoordArray);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
@@ -4483,14 +4477,14 @@ void QOpenGLPaintEngine::drawTextureRect(int tx_width, int tx_height, const QRec
y2 = sr.y();
}
- q_vertexType vertexArray[4*2];
- q_vertexType texCoordArray[4*2];
+ GLfloat vertexArray[4*2];
+ GLfloat texCoordArray[4*2];
qt_add_rect_to_array(r, vertexArray);
qt_add_texcoords_to_array(x1, y2, x2, y1, texCoordArray);
- glVertexPointer(2, q_vertexTypeEnum, 0, vertexArray);
- glTexCoordPointer(2, q_vertexTypeEnum, 0, texCoordArray);
+ glVertexPointer(2, GL_FLOAT, 0, vertexArray);
+ glTexCoordPointer(2, GL_FLOAT, 0, texCoordArray);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
@@ -4555,7 +4549,7 @@ public:
QGLGlyphCache() : QObject(0) { current_cache = 0; }
~QGLGlyphCache();
QGLGlyphCoord *lookup(QFontEngine *, glyph_t);
- void cacheGlyphs(QGLContext *, const QTextItemInt &, const QVarLengthArray<glyph_t> &);
+ void cacheGlyphs(QGLContext *, QFontEngine *, glyph_t *glyphs, int numGlyphs);
void cleanCache();
void allocTexture(int width, int height, GLuint texture);
@@ -4707,8 +4701,8 @@ static QImage getCurrentTexture(const QColor &color, QGLFontTexture *font_tex)
}
#endif
-void QGLGlyphCache::cacheGlyphs(QGLContext *context, const QTextItemInt &ti,
- const QVarLengthArray<glyph_t> &glyphs)
+void QGLGlyphCache::cacheGlyphs(QGLContext *context, QFontEngine *fontEngine,
+ glyph_t *glyphs, int numGlyphs)
{
QGLContextHash::const_iterator dev_it = qt_context_cache.constFind(context);
QGLFontGlyphHash *font_cache = 0;
@@ -4744,25 +4738,25 @@ void QGLGlyphCache::cacheGlyphs(QGLContext *context, const QTextItemInt &ti,
}
Q_ASSERT(font_cache != 0);
- QGLFontGlyphHash::const_iterator cache_it = font_cache->constFind(ti.fontEngine);
+ QGLFontGlyphHash::const_iterator cache_it = font_cache->constFind(fontEngine);
QGLGlyphHash *cache = 0;
if (cache_it == font_cache->constEnd()) {
cache = new QGLGlyphHash;
- font_cache->insert(ti.fontEngine, cache);
- connect(ti.fontEngine, SIGNAL(destroyed(QObject*)), SLOT(fontEngineDestroyed(QObject*)));
+ font_cache->insert(fontEngine, cache);
+ connect(fontEngine, SIGNAL(destroyed(QObject*)), SLOT(fontEngineDestroyed(QObject*)));
} else {
cache = cache_it.value();
}
current_cache = cache;
quint64 font_key = (reinterpret_cast<quint64>(context_key ? context_key : context) << 32)
- | reinterpret_cast<quint64>(ti.fontEngine);
+ | reinterpret_cast<quint64>(fontEngine);
QGLFontTexHash::const_iterator it = qt_font_textures.constFind(font_key);
QGLFontTexture *font_tex;
if (it == qt_font_textures.constEnd()) {
GLuint font_texture;
glGenTextures(1, &font_texture);
- GLint tex_height = qt_next_power_of_two(qRound(ti.ascent.toReal() + ti.descent.toReal())+2);
+ GLint tex_height = qt_next_power_of_two(qRound(fontEngine->ascent().toReal() + fontEngine->descent().toReal())+2);
GLint tex_width = qt_next_power_of_two(tex_height*30); // ###
GLint max_tex_size;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_tex_size);
@@ -4784,16 +4778,16 @@ void QGLGlyphCache::cacheGlyphs(QGLContext *context, const QTextItemInt &ti,
glBindTexture(GL_TEXTURE_2D, font_tex->texture);
}
- for (int i=0; i< glyphs.size(); ++i) {
+ for (int i=0; i< numGlyphs; ++i) {
QGLGlyphHash::const_iterator it = cache->constFind(glyphs[i]);
if (it == cache->constEnd()) {
// render new glyph and put it in the cache
- glyph_metrics_t metrics = ti.fontEngine->boundingBox(glyphs[i]);
+ glyph_metrics_t metrics = fontEngine->boundingBox(glyphs[i]);
int glyph_width = qRound(metrics.width.toReal())+2;
- int glyph_height = qRound(ti.ascent.toReal() + ti.descent.toReal())+2;
+ int glyph_height = qRound(fontEngine->ascent().toReal() + fontEngine->descent().toReal())+2;
if (font_tex->x_offset + glyph_width + x_margin > font_tex->width) {
- int strip_height = qt_next_power_of_two(qRound(ti.ascent.toReal() + ti.descent.toReal())+2);
+ int strip_height = qt_next_power_of_two(qRound(fontEngine->ascent().toReal() + fontEngine->descent().toReal())+2);
font_tex->x_offset = x_margin;
font_tex->y_offset += strip_height;
if (font_tex->y_offset >= font_tex->height) {
@@ -4826,7 +4820,7 @@ void QGLGlyphCache::cacheGlyphs(QGLContext *context, const QTextItemInt &ti,
}
}
- QImage glyph_im(ti.fontEngine->alphaMapForGlyph(glyphs[i]));
+ QImage glyph_im(fontEngine->alphaMapForGlyph(glyphs[i]));
glyph_im = glyph_im.convertToFormat(QImage::Format_Indexed8);
glyph_width = glyph_im.width();
Q_ASSERT(glyph_width >= 0);
@@ -4906,30 +4900,15 @@ void qgl_cleanup_glyph_cache(QGLContext *ctx)
qt_glyph_cache()->cleanupContext(ctx);
}
-void QOpenGLPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem)
+void QOpenGLPaintEngine::drawStaticTextItem(QStaticTextItem *textItem)
{
Q_D(QOpenGLPaintEngine);
- const QTextItemInt &ti = static_cast<const QTextItemInt &>(textItem);
-
- // fall back to drawing a polygon if the scale factor is large, or
- // we use a gradient pen
- if ((d->matrix.det() > 1) || (d->pen_brush_style >= Qt::LinearGradientPattern
- && d->pen_brush_style <= Qt::ConicalGradientPattern)) {
- QPaintEngine::drawTextItem(p, textItem);
- return;
- }
-
d->flushDrawQueue();
- // add the glyphs used to the glyph texture cache
- QVarLengthArray<QFixedPoint> positions;
- QVarLengthArray<glyph_t> glyphs;
- QTransform matrix = QTransform::fromTranslate(qRound(p.x()), qRound(p.y()));
- ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
-
// make sure the glyphs we want to draw are in the cache
- qt_glyph_cache()->cacheGlyphs(d->device->context(), ti, glyphs);
+ qt_glyph_cache()->cacheGlyphs(d->device->context(), textItem->fontEngine, textItem->glyphs,
+ textItem->numGlyphs);
d->setGradientOps(Qt::SolidPattern, QRectF()); // turns off gradient ops
qt_glColor4ubv(d->pen_color);
@@ -4943,21 +4922,21 @@ void QOpenGLPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
#endif
// do the actual drawing
- q_vertexType vertexArray[4*2];
- q_vertexType texCoordArray[4*2];
+ GLfloat vertexArray[4*2];
+ GLfloat texCoordArray[4*2];
- glVertexPointer(2, q_vertexTypeEnum, 0, vertexArray);
- glTexCoordPointer(2, q_vertexTypeEnum, 0, texCoordArray);
+ glVertexPointer(2, GL_FLOAT, 0, vertexArray);
+ glTexCoordPointer(2, GL_FLOAT, 0, texCoordArray);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- bool antialias = !(ti.fontEngine->fontDef.styleStrategy & QFont::NoAntialias)
- && (d->matrix.type() > QTransform::TxTranslate);
+ bool antialias = !(textItem->fontEngine->fontDef.styleStrategy & QFont::NoAntialias)
+ && (d->matrix.type() > QTransform::TxTranslate);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, antialias ? GL_LINEAR : GL_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, antialias ? GL_LINEAR : GL_NEAREST);
- for (int i=0; i< glyphs.size(); ++i) {
- QGLGlyphCoord *g = qt_glyph_cache()->lookup(ti.fontEngine, glyphs[i]);
+ for (int i=0; i< textItem->numGlyphs; ++i) {
+ QGLGlyphCoord *g = qt_glyph_cache()->lookup(textItem->fontEngine, textItem->glyphs[i]);
// we don't cache glyphs with no width/height
if (!g)
@@ -4969,8 +4948,8 @@ void QOpenGLPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
x2 = x1 + g->width;
y2 = y1 + g->height;
- QPointF logical_pos((positions[i].x - g->x_offset).toReal(),
- (positions[i].y + g->y_offset).toReal());
+ QPointF logical_pos((textItem->glyphPositions[i].x - g->x_offset).toReal(),
+ (textItem->glyphPositions[i].y + g->y_offset).toReal());
qt_add_rect_to_array(QRectF(logical_pos, QSizeF(g->log_width, g->log_height)), vertexArray);
qt_add_texcoords_to_array(x1, y1, x2, y2, texCoordArray);
@@ -4987,6 +4966,40 @@ void QOpenGLPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
// XXX: This may not be needed as this behavior does seem to be caused by driver bug
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
#endif
+
+}
+
+void QOpenGLPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem)
+{
+ Q_D(QOpenGLPaintEngine);
+
+ const QTextItemInt &ti = static_cast<const QTextItemInt &>(textItem);
+
+ // fall back to drawing a polygon if the scale factor is large, or
+ // we use a gradient pen
+ if ((d->matrix.det() > 1) || (d->pen_brush_style >= Qt::LinearGradientPattern
+ && d->pen_brush_style <= Qt::ConicalGradientPattern)) {
+ QPaintEngine::drawTextItem(p, textItem);
+ return;
+ }
+
+ // add the glyphs used to the glyph texture cache
+ QVarLengthArray<QFixedPoint> positions;
+ QVarLengthArray<glyph_t> glyphs;
+ QTransform matrix = QTransform::fromTranslate(qRound(p.x()), qRound(p.y()));
+ ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
+
+ {
+ QStaticTextItem staticTextItem;
+ staticTextItem.chars = ti.chars;
+ staticTextItem.fontEngine = ti.fontEngine;
+ staticTextItem.glyphs = glyphs.data();
+ staticTextItem.numChars = ti.num_chars;
+ staticTextItem.numGlyphs = glyphs.size();
+ staticTextItem.glyphPositions = positions.data();
+ drawStaticTextItem(&staticTextItem);
+ }
+
}
@@ -5160,7 +5173,7 @@ void QOpenGLPaintEnginePrivate::composite(const QRectF &rect, const QPoint &mask
Q_UNUSED(rect);
Q_UNUSED(maskOffset);
#else
- q_vertexType vertexArray[8];
+ GLfloat vertexArray[8];
qt_add_rect_to_array(rect, vertexArray);
composite(GL_TRIANGLE_FAN, vertexArray, 4, maskOffset);
@@ -5168,7 +5181,7 @@ void QOpenGLPaintEnginePrivate::composite(const QRectF &rect, const QPoint &mask
}
-void QOpenGLPaintEnginePrivate::composite(GLuint primitive, const q_vertexType *vertexArray, int vertexCount, const QPoint &maskOffset)
+void QOpenGLPaintEnginePrivate::composite(GLuint primitive, const GLfloat *vertexArray, int vertexCount, const QPoint &maskOffset)
{
#ifdef QT_OPENGL_ES
Q_UNUSED(primitive);
@@ -5191,8 +5204,8 @@ void QOpenGLPaintEnginePrivate::composite(GLuint primitive, const q_vertexType *
qreal minX = 1e9, minY = 1e9, maxX = -1e9, maxY = -1e9;
for (int i = 0; i < vertexCount; ++i) {
- qreal x = vt2f(vertexArray[2 * i]);
- qreal y = vt2f(vertexArray[2 * i + 1]);
+ qreal x = vertexArray[2 * i];
+ qreal y = vertexArray[2 * i + 1];
qreal tx, ty;
matrix.map(x, y, &tx, &ty);
@@ -5251,7 +5264,7 @@ void QOpenGLPaintEnginePrivate::composite(GLuint primitive, const q_vertexType *
}
glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(2, q_vertexTypeEnum, 0, vertexArray);
+ glVertexPointer(2, GL_FLOAT, 0, vertexArray);
glEnable(GL_FRAGMENT_PROGRAM_ARB);
GLuint program = qt_gl_program_cache()->getProgram(device->context(),
fragment_brush,
diff --git a/src/opengl/qpaintengine_opengl_p.h b/src/opengl/qpaintengine_opengl_p.h
index de0086aa75..55f779209e 100644
--- a/src/opengl/qpaintengine_opengl_p.h
+++ b/src/opengl/qpaintengine_opengl_p.h
@@ -133,6 +133,7 @@ public:
void drawImage(const QRectF &r, const QImage &image, const QRectF &sr,
Qt::ImageConversionFlags conversionFlags);
void drawTextItem(const QPointF &p, const QTextItem &ti);
+ void drawStaticTextItem(QStaticTextItem *staticTextItem);
void drawEllipse(const QRectF &rect);
diff --git a/src/opengl/qpixmapdata_x11gl_egl.cpp b/src/opengl/qpixmapdata_x11gl_egl.cpp
index 229f75a77e..a01eec4c03 100644
--- a/src/opengl/qpixmapdata_x11gl_egl.cpp
+++ b/src/opengl/qpixmapdata_x11gl_egl.cpp
@@ -44,8 +44,9 @@
#include <private/qgl_p.h>
#include <private/qegl_p.h>
#include <private/qeglproperties_p.h>
+#include <private/qeglcontext_p.h>
-#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
+#if !defined(QT_OPENGL_ES_1)
#include <private/qpaintengineex_opengl2_p.h>
#endif
@@ -57,13 +58,16 @@
QT_BEGIN_NAMESPACE
-extern EGLConfig qt_chooseEGLConfigForPixmap(bool hasAlpha, bool readOnly); // in qgl_x11egl.cpp
-extern bool qt_createEGLSurfaceForPixmap(QPixmapData* pmd, bool readOnly); // in qgl_x11egl.cpp
// On 16bpp systems, RGB & ARGB pixmaps are different bit-depths and therefore need
// different contexts:
-static EGLContext qPixmapARGBSharedEglContext = EGL_NO_CONTEXT;
-static EGLContext qPixmapRGBSharedEglContext = EGL_NO_CONTEXT;
+
+Q_GLOBAL_STATIC(QEglContext, qt_x11gl_rgbContext);
+Q_GLOBAL_STATIC(QEglContext, qt_x11gl_argbContext)
+
+QEglContext* QX11GLPixmapData::rgbContext = 0;
+QEglContext* QX11GLPixmapData::argbContext = 0;
+
bool QX11GLPixmapData::hasX11GLPixmaps()
{
@@ -75,111 +79,94 @@ bool QX11GLPixmapData::hasX11GLPixmaps()
checkedForX11Pixmaps = true;
- QX11PixmapData *argbPixmapData = 0;
- QX11PixmapData *rgbPixmapData = 0;
+ EGLint rgbConfigId;
+ EGLint argbConfigId;
+
do {
if (qgetenv("QT_USE_X11GL_PIXMAPS").isEmpty())
break;
- // Check we actually have EGL configs which support pixmaps
- EGLConfig argbConfig = qt_chooseEGLConfigForPixmap(true, false);
- EGLConfig rgbConfig = qt_chooseEGLConfigForPixmap(false, false);
+ EGLConfig rgbConfig = QEgl::defaultConfig(QInternal::Pixmap, QEgl::OpenGL, QEgl::Renderable);
+ EGLConfig argbConfig = QEgl::defaultConfig(QInternal::Pixmap, QEgl::OpenGL,
+ QEgl::Renderable | QEgl::Translucent);
- if (argbConfig == 0 || rgbConfig == 0)
- break;
+ eglGetConfigAttrib(QEgl::display(), rgbConfig, EGL_CONFIG_ID, &rgbConfigId);
+ eglGetConfigAttrib(QEgl::display(), argbConfig, EGL_CONFIG_ID, &argbConfigId);
- // Create the shared contexts:
- eglBindAPI(EGL_OPENGL_ES_API);
- EGLint contextAttribs[] = {
-#if defined(QT_OPENGL_ES_2)
- EGL_CONTEXT_CLIENT_VERSION, 2,
-#endif
- EGL_NONE
- };
- qPixmapARGBSharedEglContext = eglCreateContext(QEglContext::display(),
- argbConfig, 0, contextAttribs);
-
- if (argbConfig == rgbConfig) {
- // If the configs are the same, we can re-use the same context.
- qPixmapRGBSharedEglContext = qPixmapARGBSharedEglContext;
- } else {
- qPixmapRGBSharedEglContext = eglCreateContext(QEglContext::display(),
- rgbConfig, 0, contextAttribs);
+ if (!rgbContext) {
+ rgbContext = qt_x11gl_rgbContext();
+ rgbContext->setConfig(rgbConfig);
+ rgbContext->createContext();
}
- argbPixmapData = new QX11PixmapData(QPixmapData::PixmapType);
- argbPixmapData->resize(100, 100);
- argbPixmapData->fill(Qt::transparent); // Force ARGB
+ if (!rgbContext->isValid())
+ break;
+
+ // If the configs are the same, use the same egl contexts:
+ if (rgbConfig == argbConfig)
+ argbContext = rgbContext;
+
+ if (!argbContext) {
+ argbContext = qt_x11gl_argbContext();
+ argbContext->setConfig(argbConfig);
+ argbContext->createContext();
+ }
- if (!qt_createEGLSurfaceForPixmap(argbPixmapData, false))
+ if (!argbContext->isValid())
break;
- haveX11Pixmaps = eglMakeCurrent(QEglContext::display(),
- (EGLSurface)argbPixmapData->gl_surface,
- (EGLSurface)argbPixmapData->gl_surface,
- qPixmapARGBSharedEglContext);
+ {
+ QX11PixmapData *argbPixmapData = new QX11PixmapData(QPixmapData::PixmapType);
+ argbPixmapData->resize(100, 100);
+ argbPixmapData->fill(Qt::transparent); // Force ARGB
+ QPixmap argbPixmap(argbPixmapData);
+ EGLSurface argbPixmapSurface = QEgl::createSurface(&argbPixmap, argbConfig);
+ haveX11Pixmaps = argbContext->makeCurrent(argbPixmapSurface);
+ argbContext->doneCurrent();
+ eglDestroySurface(QEgl::display(), argbPixmapSurface);
+ }
+
if (!haveX11Pixmaps) {
- EGLint err = eglGetError();
- qWarning() << "Unable to make pixmap config current:" << err << QEglContext::errorString(err);
+ qWarning() << "Unable to make pixmap surface current:" << QEgl::errorString();
break;
}
- // If the ARGB & RGB configs are the same, we don't need to check RGB too
- if (haveX11Pixmaps && (argbConfig != rgbConfig)) {
- rgbPixmapData = new QX11PixmapData(QPixmapData::PixmapType);
+ // If the ARGB & RGB configs are different, check RGB too:
+ if (argbConfig != rgbConfig) {
+ QX11PixmapData *rgbPixmapData = new QX11PixmapData(QPixmapData::PixmapType);
rgbPixmapData->resize(100, 100);
rgbPixmapData->fill(Qt::red);
- // Try to actually create an EGL pixmap surface
- if (!qt_createEGLSurfaceForPixmap(rgbPixmapData, false))
- break;
+ QPixmap rgbPixmap(rgbPixmapData);
+ EGLSurface rgbPixmapSurface = QEgl::createSurface(&rgbPixmap, rgbConfig);
+ haveX11Pixmaps = rgbContext->makeCurrent(rgbPixmapSurface);
+ rgbContext->doneCurrent();
+ eglDestroySurface(QEgl::display(), rgbPixmapSurface);
- haveX11Pixmaps = eglMakeCurrent(QEglContext::display(),
- (EGLSurface)rgbPixmapData->gl_surface,
- (EGLSurface)rgbPixmapData->gl_surface,
- qPixmapRGBSharedEglContext);
if (!haveX11Pixmaps) {
- EGLint err = eglGetError();
- qWarning() << "Unable to make pixmap config current:" << err << QEglContext::errorString(err);
+ qWarning() << "Unable to make pixmap config current:" << QEgl::errorString();
break;
}
}
- } while (0);
- if (qPixmapARGBSharedEglContext || qPixmapRGBSharedEglContext) {
- eglMakeCurrent(QEglContext::display(),
- EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
- }
-
- if (argbPixmapData) {
- if (argbPixmapData->gl_surface)
- QGLContextPrivate::destroyGlSurfaceForPixmap(argbPixmapData);
- delete argbPixmapData;
- argbPixmapData = 0;
- }
- if (rgbPixmapData) {
- if (rgbPixmapData->gl_surface)
- QGLContextPrivate::destroyGlSurfaceForPixmap(rgbPixmapData);
- delete rgbPixmapData;
- rgbPixmapData = 0;
- }
+ // The pixmap surface destruction hooks are installed by QGLTextureCache, so we
+ // must make sure this is instanciated:
+ QGLTextureCache::instance();
+ } while (0);
if (!haveX11Pixmaps) {
- // Clean up the context(s) if we can't use X11GL pixmaps
- if (qPixmapARGBSharedEglContext != EGL_NO_CONTEXT)
- eglDestroyContext(QEglContext::display(), qPixmapARGBSharedEglContext);
-
- if (qPixmapRGBSharedEglContext != qPixmapARGBSharedEglContext &&
- qPixmapRGBSharedEglContext != EGL_NO_CONTEXT)
- {
- eglDestroyContext(QEglContext::display(), qPixmapRGBSharedEglContext);
+ if (argbContext && (argbContext != rgbContext)) {
+ delete argbContext;
+ argbContext = 0;
+ }
+ if (rgbContext) {
+ delete rgbContext;
+ rgbContext = 0;
}
- qPixmapRGBSharedEglContext = EGL_NO_CONTEXT;
- qPixmapARGBSharedEglContext = EGL_NO_CONTEXT;
}
if (haveX11Pixmaps)
- qDebug("QX11GLPixmapData is supported");
+ qDebug("Using QX11GLPixmapData with EGL config %d for ARGB and config %d for RGB", argbConfigId, rgbConfigId);
else
qDebug("QX11GLPixmapData is *NOT* being used");
@@ -194,9 +181,11 @@ QX11GLPixmapData::QX11GLPixmapData()
QX11GLPixmapData::~QX11GLPixmapData()
{
+ if (ctx)
+ delete ctx;
}
-#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
+#if !defined(QT_OPENGL_ES_1)
Q_GLOBAL_STATIC(QGL2PaintEngineEx, qt_gl_pixmap_2_engine)
#endif
@@ -210,16 +199,13 @@ QPaintEngine* QX11GLPixmapData::paintEngine() const
// We need to create the context before beginPaint - do it here:
if (!ctx) {
ctx = new QGLContext(glFormat());
- if (ctx->d_func()->eglContext == 0)
- ctx->d_func()->eglContext = new QEglContext();
- ctx->d_func()->eglContext->setApi(QEgl::OpenGL);
- ctx->d_func()->eglContext->setContext(hasAlphaChannel() ? qPixmapARGBSharedEglContext
- : qPixmapRGBSharedEglContext);
+ Q_ASSERT(ctx->d_func()->eglContext == 0);
+ ctx->d_func()->eglContext = hasAlphaChannel() ? argbContext : rgbContext;
}
QPaintEngine* engine;
-#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL)
+#if defined(QT_OPENGL_ES_1)
engine = qt_gl_pixmap_engine();
#elif defined(QT_OPENGL_ES_2)
engine = qt_gl_pixmap_2_engine();
@@ -236,7 +222,7 @@ QPaintEngine* QX11GLPixmapData::paintEngine() const
if (engine->isActive()) {
qWarning("Pixmap paint engine already active");
-#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL)
+#if defined(QT_OPENGL_ES_1)
engine = new QOpenGLPaintEngine;
#elif defined(QT_OPENGL_ES_2)
engine = new QGL2PaintEngineEx;
@@ -257,10 +243,20 @@ QPaintEngine* QX11GLPixmapData::paintEngine() const
void QX11GLPixmapData::beginPaint()
{
// qDebug("QX11GLPixmapData::beginPaint()");
+ // TODO: Check to see if the surface is renderable
if ((EGLSurface)gl_surface == EGL_NO_SURFACE) {
- qt_createEGLSurfaceForPixmap(this, false);
- ctx->d_func()->eglSurface = (EGLSurface)gl_surface;
- ctx->d_func()->valid = true; // ;-)
+ QPixmap tmpPixmap(this);
+ EGLConfig cfg = ctx->d_func()->eglContext->config();
+ Q_ASSERT(cfg != QEGL_NO_CONFIG);
+
+ EGLSurface surface = QEgl::createSurface(&tmpPixmap, cfg);
+ if (surface == EGL_NO_SURFACE) {
+ qWarning() << "Error creating EGL surface for pixmap:" << QEgl::errorString();
+ return;
+ }
+ gl_surface = (void*)surface;
+ ctx->d_func()->eglSurface = surface;
+ ctx->d_func()->valid = true;
}
QGLPaintDevice::beginPaint();
}
diff --git a/src/opengl/qpixmapdata_x11gl_p.h b/src/opengl/qpixmapdata_x11gl_p.h
index c9f4f566ab..83cd780432 100644
--- a/src/opengl/qpixmapdata_x11gl_p.h
+++ b/src/opengl/qpixmapdata_x11gl_p.h
@@ -59,6 +59,10 @@
#include <qgl.h>
+#ifndef QT_NO_EGL
+#include <QtGui/private/qeglcontext_p.h>
+#endif
+
QT_BEGIN_NAMESPACE
class QX11GLPixmapData : public QX11PixmapData, public QGLPaintDevice
@@ -76,6 +80,11 @@ public:
static bool hasX11GLPixmaps();
static QGLFormat glFormat();
+
+#ifndef QT_NO_EGL
+ static QEglContext* rgbContext;
+ static QEglContext* argbContext;
+#endif
private:
mutable QGLContext* ctx;
};
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index 7a565e68d7..ca88de3434 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -82,12 +82,8 @@
#define GLX_SAMPLES_ARB 100001
#endif
-#ifdef QT_OPENGL_ES_1_CL
-#include "qgl_cl_p.h"
-#endif
-
#ifdef QT_OPENGL_ES
-#include <private/qegl_p.h>
+#include <private/qeglcontext_p.h>
#endif
QT_BEGIN_NAMESPACE
@@ -357,18 +353,6 @@ void QGLWindowSurface::hijackWindow(QWidget *widget)
QGLContext *ctx = new QGLContext(surfaceFormat, widget);
ctx->create(qt_gl_share_widget()->context());
-#if defined(Q_WS_X11) && defined(QT_OPENGL_ES)
- // Create the EGL surface to draw into. QGLContext::chooseContext()
- // does not do this for X11/EGL, but does do it for other platforms.
- // This probably belongs in qgl_x11egl.cpp.
- QGLContextPrivate *ctxpriv = ctx->d_func();
- ctxpriv->eglSurface = ctxpriv->eglContext->createSurface(widget);
- if (ctxpriv->eglSurface == EGL_NO_SURFACE) {
- qWarning() << "hijackWindow() could not create EGL surface";
- }
- qDebug("QGLWindowSurface - using EGLConfig %d", reinterpret_cast<int>(ctxpriv->eglContext->config()));
-#endif
-
widgetPrivate->extraData()->glContext = ctx;
union { QGLContext **ctxPtr; void **voidPtr; };
@@ -838,22 +822,22 @@ static void drawTexture(const QRectF &rect, GLuint tex_id, const QSize &texSize,
src.setBottom(src.bottom() / height);
}
- const q_vertexType tx1 = f2vt(src.left());
- const q_vertexType tx2 = f2vt(src.right());
- const q_vertexType ty1 = f2vt(src.top());
- const q_vertexType ty2 = f2vt(src.bottom());
+ const GLfloat tx1 = src.left();
+ const GLfloat tx2 = src.right();
+ const GLfloat ty1 = src.top();
+ const GLfloat ty2 = src.bottom();
- q_vertexType texCoordArray[4*2] = {
+ GLfloat texCoordArray[4*2] = {
tx1, ty2, tx2, ty2, tx2, ty1, tx1, ty1
};
- q_vertexType vertexArray[4*2];
- extern void qt_add_rect_to_array(const QRectF &r, q_vertexType *array); // qpaintengine_opengl.cpp
+ GLfloat vertexArray[4*2];
+ extern void qt_add_rect_to_array(const QRectF &r, GLfloat *array); // qpaintengine_opengl.cpp
qt_add_rect_to_array(rect, vertexArray);
#if !defined(QT_OPENGL_ES_2)
- glVertexPointer(2, q_vertexTypeEnum, 0, vertexArray);
- glTexCoordPointer(2, q_vertexTypeEnum, 0, texCoordArray);
+ glVertexPointer(2, GL_FLOAT, 0, vertexArray);
+ glTexCoordPointer(2, GL_FLOAT, 0, texCoordArray);
glBindTexture(target, tex_id);
glEnable(target);
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 4a97a6fe6d..4902cbd108 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -45,15 +45,15 @@
#include "qvgcompositionhelper_p.h"
#include "qvgimagepool_p.h"
#if !defined(QT_NO_EGL)
-#include <QtGui/private/qegl_p.h>
+#include <QtGui/private/qeglcontext_p.h>
#include "qwindowsurface_vgegl_p.h"
#endif
#include <QtCore/qvarlengtharray.h>
#include <QtGui/private/qdrawhelper_p.h>
-#include <QtGui/private/qtextureglyphcache_p.h>
#include <QtGui/private/qtextengine_p.h>
#include <QtGui/private/qfontengine_p.h>
#include <QtGui/private/qpainterpath_p.h>
+#include <QtGui/private/qstatictext_p.h>
#include <QDebug>
#include <QSet>
@@ -86,15 +86,14 @@ public:
QVGFontGlyphCache();
~QVGFontGlyphCache();
- void cacheGlyphs(QVGPaintEnginePrivate *d,
- const QTextItemInt &ti,
- const QVarLengthArray<glyph_t> &glyphs);
- void setScaleFromText(const QTextItemInt &ti);
+ void cacheGlyphs(QVGPaintEnginePrivate *d, QFontEngine *fontEngine, const glyph_t *g, int count);
+
+ void setScaleFromText(const QFont &font, QFontEngine *fontEngine);
VGFont font;
VGfloat scaleX;
VGfloat scaleY;
-
+
uint cachedGlyphsMask[256 / 32];
QSet<glyph_t> cachedGlyphs;
};
@@ -985,7 +984,7 @@ static QImage colorizeBitmap(const QImage &image, const QColor &color)
int height = sourceImage.height();
int width = sourceImage.width();
for (int y=0; y<height; ++y) {
- uchar *source = sourceImage.scanLine(y);
+ const uchar *source = sourceImage.constScanLine(y);
QRgb *target = reinterpret_cast<QRgb *>(dest.scanLine(y));
for (int x=0; x < width; ++x)
target[x] = (source[x>>3] >> (x&7)) & 1 ? fg : bg;
@@ -993,9 +992,6 @@ static QImage colorizeBitmap(const QImage &image, const QColor &color)
return dest;
}
-// defined in qpixmapdata_vg.cpp.
-const uchar *qt_vg_imageBits(const QImage& image);
-
static VGImage toVGImage
(const QImage & image, Qt::ImageConversionFlags flags = Qt::AutoColor)
{
@@ -1029,7 +1025,7 @@ static VGImage toVGImage
break;
}
- const uchar *pixels = qt_vg_imageBits(img);
+ const uchar *pixels = img.constBits();
VGImage vgImg = QVGImagePool::instance()->createPermanentImage
(format, img.width(), img.height(), VG_IMAGE_QUALITY_FASTER);
@@ -1073,7 +1069,7 @@ static VGImage toVGImageSubRect
break;
}
- const uchar *pixels = qt_vg_imageBits(img) + bpp * sr.x() +
+ const uchar *pixels = img.constBits() + bpp * sr.x() +
img.bytesPerLine() * sr.y();
VGImage vgImg = QVGImagePool::instance()->createPermanentImage
@@ -1095,7 +1091,7 @@ static VGImage toVGImageWithOpacity(const QImage & image, qreal opacity)
painter.drawImage(0, 0, image);
painter.end();
- const uchar *pixels = qt_vg_imageBits(img);
+ const uchar *pixels = img.constBits();
VGImage vgImg = QVGImagePool::instance()->createPermanentImage
(VG_sARGB_8888_PRE, img.width(), img.height(), VG_IMAGE_QUALITY_FASTER);
@@ -1117,7 +1113,7 @@ static VGImage toVGImageWithOpacitySubRect
painter.drawImage(QPoint(0, 0), image, sr);
painter.end();
- const uchar *pixels = qt_vg_imageBits(img);
+ const uchar *pixels = img.constBits();
VGImage vgImg = QVGImagePool::instance()->createPermanentImage
(VG_sARGB_8888_PRE, img.width(), img.height(), VG_IMAGE_QUALITY_FASTER);
@@ -3045,9 +3041,8 @@ void QVGPaintEngine::drawTiledPixmap
// (i.e. no opacity), no rotation or scaling, and drawing the full
// pixmap rather than parts of the pixmap. Even having just one of
// these conditions will improve performance.
-void QVGPaintEngine::drawPixmaps
- (const QDrawPixmaps::Data *drawingData, int dataCount,
- const QPixmap &pixmap, QFlags<QDrawPixmaps::DrawingHint> hints)
+void QVGPaintEngine::drawPixmapFragments(const QPainter::PixmapFragment *drawingData, int dataCount,
+ const QPixmap &pixmap, QFlags<QPainter::PixmapFragmentHint> hints)
{
#if !defined(QT_SHIVAVG)
Q_D(QVGPaintEngine);
@@ -3058,7 +3053,7 @@ void QVGPaintEngine::drawPixmaps
if (!pd)
return; // null QPixmap
if (pd->classId() != QPixmapData::OpenVGClass || !d->simpleTransform) {
- QPaintEngineEx::drawPixmaps(drawingData, dataCount, pixmap, hints);
+ QPaintEngineEx::drawPixmapFragments(drawingData, dataCount, pixmap, hints);
return;
}
@@ -3082,7 +3077,7 @@ void QVGPaintEngine::drawPixmaps
QVarLengthArray<QRect> cachedSources;
// Select the opacity paint object.
- if ((hints & QDrawPixmaps::OpaqueHint) != 0 && d->opacity == 1.0f) {
+ if ((hints & QPainter::OpaqueHint) != 0 && d->opacity == 1.0f) {
d->setImageMode(VG_DRAW_IMAGE_NORMAL);
} else {
hints = 0;
@@ -3094,12 +3089,13 @@ void QVGPaintEngine::drawPixmaps
for (int i = 0; i < dataCount; ++i) {
QTransform transform(d->imageTransform);
- transform.translate(drawingData[i].point.x(), drawingData[i].point.y());
+ transform.translate(drawingData[i].x, drawingData[i].y);
transform.rotate(drawingData[i].rotation);
VGImage child;
QSize imageSize = vgpd->size();
- QRectF sr = drawingData[i].source;
+ QRectF sr(drawingData[i].sourceLeft, drawingData[i].sourceTop,
+ drawingData[i].width, drawingData[i].height);
if (sr.topLeft().isNull() && sr.size() == imageSize) {
child = vgImg;
} else {
@@ -3128,7 +3124,7 @@ void QVGPaintEngine::drawPixmaps
transform.scale(scaleX, scaleY);
d->setTransform(VG_MATRIX_IMAGE_USER_TO_SURFACE, transform);
- if ((hints & QDrawPixmaps::OpaqueHint) == 0) {
+ if ((hints & QPainter::OpaqueHint) == 0) {
qreal opacity = d->opacity * drawingData[i].opacity;
if (opacity != 1.0f) {
if (d->paintOpacity != opacity) {
@@ -3154,7 +3150,7 @@ void QVGPaintEngine::drawPixmaps
for (int i = 0; i < cachedImages.size(); ++i)
vgDestroyImage(cachedImages[i]);
#else
- QPaintEngineEx::drawPixmaps(drawingData, dataCount, pixmap, hints);
+ QPaintEngineEx::drawPixmapFragments(drawingData, dataCount, pixmap, hints);
#endif
}
@@ -3194,22 +3190,20 @@ QVGFontGlyphCache::~QVGFontGlyphCache()
vgDestroyFont(font);
}
-void QVGFontGlyphCache::setScaleFromText(const QTextItemInt &ti)
+void QVGFontGlyphCache::setScaleFromText(const QFont &font, QFontEngine *fontEngine)
{
- QFontInfo fi(ti.font());
+ QFontInfo fi(font);
qreal pixelSize = fi.pixelSize();
- qreal emSquare = ti.fontEngine->properties().emSquare.toReal();
+ qreal emSquare = fontEngine->properties().emSquare.toReal();
scaleX = scaleY = static_cast<VGfloat>(pixelSize / emSquare);
}
-void QVGFontGlyphCache::cacheGlyphs
- (QVGPaintEnginePrivate *d, const QTextItemInt &ti,
- const QVarLengthArray<glyph_t> &glyphs)
+void QVGFontGlyphCache::cacheGlyphs(QVGPaintEnginePrivate *d,
+ QFontEngine *fontEngine,
+ const glyph_t *g, int count)
{
VGfloat origin[2];
VGfloat escapement[2];
- const glyph_t *g = glyphs.constData();
- int count = glyphs.size();
glyph_metrics_t metrics;
// Some Qt font engines don't set yoff in getUnscaledGlyph().
// Zero the metric structure so that everything has a default value.
@@ -3228,21 +3222,21 @@ void QVGFontGlyphCache::cacheGlyphs
}
#if !defined(QVG_NO_IMAGE_GLYPHS)
Q_UNUSED(d);
- QImage scaledImage = ti.fontEngine->alphaMapForGlyph(glyph);
+ QImage scaledImage = fontEngine->alphaMapForGlyph(glyph);
VGImage vgImage = VG_INVALID_HANDLE;
- metrics = ti.fontEngine->boundingBox(glyph);
+ metrics = fontEngine->boundingBox(glyph);
if (!scaledImage.isNull()) { // Not a space character
if (scaledImage.format() == QImage::Format_Indexed8) {
vgImage = vgCreateImage(VG_A_8, scaledImage.width(), scaledImage.height(), VG_IMAGE_QUALITY_FASTER);
- vgImageSubData(vgImage, qt_vg_imageBits(scaledImage), scaledImage.bytesPerLine(), VG_A_8, 0, 0, scaledImage.width(), scaledImage.height());
+ vgImageSubData(vgImage, scaledImage.constBits(), scaledImage.bytesPerLine(), VG_A_8, 0, 0, scaledImage.width(), scaledImage.height());
} else if (scaledImage.format() == QImage::Format_Mono) {
QImage img = scaledImage.convertToFormat(QImage::Format_Indexed8);
vgImage = vgCreateImage(VG_A_8, img.width(), img.height(), VG_IMAGE_QUALITY_FASTER);
- vgImageSubData(vgImage, qt_vg_imageBits(img), img.bytesPerLine(), VG_A_8, 0, 0, img.width(), img.height());
+ vgImageSubData(vgImage, img.constBits(), img.bytesPerLine(), VG_A_8, 0, 0, img.width(), img.height());
} else {
QImage img = scaledImage.convertToFormat(QImage::Format_ARGB32_Premultiplied);
vgImage = vgCreateImage(VG_sARGB_8888_PRE, img.width(), img.height(), VG_IMAGE_QUALITY_FASTER);
- vgImageSubData(vgImage, qt_vg_imageBits(img), img.bytesPerLine(), VG_sARGB_8888_PRE, 0, 0, img.width(), img.height());
+ vgImageSubData(vgImage, img.constBits(), img.bytesPerLine(), VG_sARGB_8888_PRE, 0, 0, img.width(), img.height());
}
}
origin[0] = -metrics.x.toReal() + 0.5f;
@@ -3254,7 +3248,7 @@ void QVGFontGlyphCache::cacheGlyphs
#else
// Calculate the path for the glyph and cache it.
QPainterPath path;
- ti.fontEngine->getUnscaledGlyph(glyph, &path, &metrics);
+ fontEngine->getUnscaledGlyph(glyph, &path, &metrics);
VGPath vgPath;
if (!path.isEmpty()) {
vgPath = d->painterPathToVGPath(path);
@@ -3286,7 +3280,7 @@ void QVGPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem)
QPaintEngineEx::drawTextItem(p, textItem);
return;
}
-
+
// Get the glyphs and positions associated with the text item.
QVarLengthArray<QFixedPoint> positions;
QVarLengthArray<glyph_t> glyphs;
@@ -3295,8 +3289,29 @@ void QVGPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem)
ti.fontEngine->getGlyphPositions
(ti.glyphs, matrix, ti.flags, glyphs, positions);
+ if (!drawCachedGlyphs(glyphs.size(), glyphs.data(), ti.font(), ti.fontEngine, p))
+ QPaintEngineEx::drawTextItem(p, textItem);
+#else
+ // OpenGL 1.0 does not have support for VGFont and glyphs,
+ // so fall back to the default Qt path stroking algorithm.
+ QPaintEngineEx::drawTextItem(p, textItem);
+#endif
+}
+
+void QVGPaintEngine::drawStaticTextItem(QStaticTextItem *textItem)
+{
+ drawCachedGlyphs(textItem->numGlyphs, textItem->glyphs, textItem->font, textItem->fontEngine,
+ QPointF(0, 0));
+}
+
+ bool QVGPaintEngine::drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs, const QFont &font,
+ QFontEngine *fontEngine, const QPointF &p)
+ {
+#if !defined(QVG_NO_DRAW_GLYPHS)
+ Q_D(QVGPaintEngine);
+
// Find the glyph cache for this font.
- QVGFontCache::ConstIterator it = d->fontCache.constFind(ti.fontEngine);
+ QVGFontCache::ConstIterator it = d->fontCache.constFind(fontEngine);
QVGFontGlyphCache *glyphCache;
if (it != d->fontCache.constEnd()) {
glyphCache = it.value();
@@ -3305,14 +3320,13 @@ void QVGPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem)
if (glyphCache->font == VG_INVALID_HANDLE) {
qWarning("QVGPaintEngine::drawTextItem: OpenVG fonts are not supported by the OpenVG engine");
delete glyphCache;
- QPaintEngineEx::drawTextItem(p, textItem);
- return;
+ return false;
}
- glyphCache->setScaleFromText(ti);
- d->fontCache.insert(ti.fontEngine, glyphCache);
+ glyphCache->setScaleFromText(font, fontEngine);
+ d->fontCache.insert(fontEngine, glyphCache);
if (!d->fontEngineCleaner)
d->fontEngineCleaner = new QVGFontEngineCleaner(d);
- QObject::connect(ti.fontEngine, SIGNAL(destroyed()),
+ QObject::connect(fontEngine, SIGNAL(destroyed()),
d->fontEngineCleaner, SLOT(fontEngineDestroyed()));
}
@@ -3325,7 +3339,7 @@ void QVGPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem)
d->setTransform(VG_MATRIX_GLYPH_USER_TO_SURFACE, glyphTransform);
// Add the glyphs from the text item into the glyph cache.
- glyphCache->cacheGlyphs(d, ti, glyphs);
+ glyphCache->cacheGlyphs(d, fontEngine, glyphs, numGlyphs);
// Set the glyph drawing origin.
VGfloat origin[2];
@@ -3344,12 +3358,17 @@ void QVGPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem)
// Draw the glyphs. We need to fill with the brush associated with
// the Qt pen, not the Qt brush.
d->ensureBrush(state()->pen.brush());
- vgDrawGlyphs(glyphCache->font, glyphs.size(), (VGuint*)glyphs.data(),
+ vgDrawGlyphs(glyphCache->font, numGlyphs, (VGuint*)glyphs,
NULL, NULL, VG_FILL_PATH, VG_TRUE);
+
+ return true;
#else
- // OpenGL 1.0 does not have support for VGFont and glyphs,
- // so fall back to the default Qt path stroking algorithm.
- QPaintEngineEx::drawTextItem(p, textItem);
+ Q_UNUSED(numGlyphs);
+ Q_UNUSED(glyphs);
+ Q_UNUSED(font);
+ Q_UNUSED(fontEngine);
+ Q_UNUSED(p);
+ return false;
#endif
}
@@ -3710,7 +3729,7 @@ void QVGCompositionHelper::drawCursorPixmap
if (vgImage == VG_INVALID_HANDLE)
return;
vgImageSubData
- (vgImage, qt_vg_imageBits(img) + img.bytesPerLine() * (img.height() - 1),
+ (vgImage, img.constBits() + img.bytesPerLine() * (img.height() - 1),
-(img.bytesPerLine()), VG_sARGB_8888_PRE, 0, 0,
img.width(), img.height());
diff --git a/src/openvg/qpaintengine_vg_p.h b/src/openvg/qpaintengine_vg_p.h
index 3f87a7221b..1e7e26c3df 100644
--- a/src/openvg/qpaintengine_vg_p.h
+++ b/src/openvg/qpaintengine_vg_p.h
@@ -54,6 +54,7 @@
//
#include <QtGui/private/qpaintengineex_p.h>
+#include <QtGui/private/qtextureglyphcache_p.h>
QT_BEGIN_NAMESPACE
@@ -136,9 +137,13 @@ public:
void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s);
- void drawPixmaps(const QDrawPixmaps::Data *drawingData, int dataCount, const QPixmap &pixmap, QFlags<QDrawPixmaps::DrawingHint> hints);
+ void drawPixmapFragments(const QPainter::PixmapFragment *drawingData, int dataCount, const QPixmap &pixmap,
+ QFlags<QPainter::PixmapFragmentHint> hints);
void drawTextItem(const QPointF &p, const QTextItem &textItem);
+ void drawStaticTextItem(QStaticTextItem *staticTextItem);
+ bool drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs, const QFont &font,
+ QFontEngine *fontEngine, const QPointF &p);
void setState(QPainterState *s);
QVGPainterState *state() { return static_cast<QVGPainterState *>(QPaintEngineEx::state()); }
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp
index 3087b779f1..44814cc016 100644
--- a/src/openvg/qpixmapdata_vg.cpp
+++ b/src/openvg/qpixmapdata_vg.cpp
@@ -231,14 +231,6 @@ QPaintEngine* QVGPixmapData::paintEngine() const
return source.paintEngine();
}
-// This function works around QImage::bits() making a deep copy if the
-// QImage is not const. We force it to be const and then get the bits.
-// XXX: Should add a QImage::constBits() in the future to replace this.
-const uchar *qt_vg_imageBits(const QImage& image)
-{
- return image.bits();
-}
-
VGImage QVGPixmapData::toVGImage()
{
if (!isValid())
@@ -271,7 +263,7 @@ VGImage QVGPixmapData::toVGImage()
if (!source.isNull() && recreate) {
vgImageSubData
(vgImage,
- qt_vg_imageBits(source), source.bytesPerLine(),
+ source.constBits(), source.bytesPerLine(),
VG_sARGB_8888_PRE, 0, 0, w, h);
}
@@ -670,7 +662,7 @@ void* QVGPixmapData::toNativeType(NativeType type)
if (bitmap) {
if (bitmap->Create(TSize(source.width(), source.height()),
EColor16MAP) == KErrNone) {
- const uchar *sptr = qt_vg_imageBits(source);
+ const uchar *sptr = source.constBits();
bitmap->BeginDataAccess();
uchar *dptr = (uchar*)bitmap->DataAddress();
diff --git a/src/openvg/qvg_p.h b/src/openvg/qvg_p.h
index 7857bb685e..51abbee645 100644
--- a/src/openvg/qvg_p.h
+++ b/src/openvg/qvg_p.h
@@ -58,7 +58,7 @@
#include <QtGui/qimage.h>
#if !defined(QT_NO_EGL)
-#include <QtGui/private/qegl_p.h>
+#include <QtGui/private/qeglcontext_p.h>
#endif
QT_BEGIN_NAMESPACE
diff --git a/src/openvg/qwindowsurface_vg.cpp b/src/openvg/qwindowsurface_vg.cpp
index 83b0764bd3..07d9209e5a 100644
--- a/src/openvg/qwindowsurface_vg.cpp
+++ b/src/openvg/qwindowsurface_vg.cpp
@@ -47,7 +47,7 @@
#if !defined(QT_NO_EGL)
-#include <QtGui/private/qegl_p.h>
+#include <QtGui/private/qeglcontext_p.h>
#include <QtGui/private/qwidget_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/openvg/qwindowsurface_vgegl_p.h b/src/openvg/qwindowsurface_vgegl_p.h
index aa0c648a4e..f6adbf37db 100644
--- a/src/openvg/qwindowsurface_vgegl_p.h
+++ b/src/openvg/qwindowsurface_vgegl_p.h
@@ -58,7 +58,7 @@
#if !defined(QT_NO_EGL)
-#include <QtGui/private/qegl_p.h>
+#include <QtGui/private/qeglcontext_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
index ad33d0bd30..499eb1dd7f 100644
--- a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
+++ b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
@@ -176,7 +176,7 @@ static inline QWidget *mdiAreaNavigate(QWidget *area,
int minimumDistance = INT_MAX;
QWidget *target = 0;
- foreach (QWidget *candidate, candidates.values()) {
+ foreach (QWidget *candidate, candidates) {
switch (relation) {
case QAccessible::Up:
case QAccessible::Down:
diff --git a/src/plugins/bearer/bearer.pro b/src/plugins/bearer/bearer.pro
new file mode 100644
index 0000000000..a67c8f6723
--- /dev/null
+++ b/src/plugins/bearer/bearer.pro
@@ -0,0 +1,14 @@
+TEMPLATE = subdirs
+
+!maemo:contains(QT_CONFIG, dbus):contains(QT_CONFIG, networkmanager) {
+ SUBDIRS += networkmanager generic
+}
+#win32:SUBDIRS += nla
+win32:SUBDIRS += generic
+win32:!wince*:SUBDIRS += nativewifi
+macx:contains(QT_CONFIG, corewlan):SUBDIRS += corewlan
+macx:SUBDIRS += generic
+symbian:SUBDIRS += symbian
+maemo6:contains(QT_CONFIG, dbus):SUBDIRS += icd
+
+isEmpty(SUBDIRS):SUBDIRS += generic
diff --git a/src/plugins/bearer/corewlan/corewlan.pro b/src/plugins/bearer/corewlan/corewlan.pro
new file mode 100644
index 0000000000..50c72b2450
--- /dev/null
+++ b/src/plugins/bearer/corewlan/corewlan.pro
@@ -0,0 +1,24 @@
+TARGET = qcorewlanbearer
+include(../../qpluginbase.pri)
+
+QT += network
+LIBS += -framework Foundation -framework SystemConfiguration
+
+contains(QT_CONFIG, corewlan) {
+ isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, "/Developer/SDKs/MacOSX10.6.sdk") {
+ LIBS += -framework CoreWLAN
+ DEFINES += MAC_SDK_10_6
+ }
+}
+
+HEADERS += qcorewlanengine.h \
+ ../qnetworksession_impl.h \
+ ../qbearerengine_impl.h
+
+SOURCES += main.cpp \
+ qcorewlanengine.mm \
+ ../qnetworksession_impl.cpp
+
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer
+target.path += $$[QT_INSTALL_PLUGINS]/bearer
+INSTALLS += target
diff --git a/src/plugins/bearer/corewlan/main.cpp b/src/plugins/bearer/corewlan/main.cpp
new file mode 100644
index 0000000000..5be8c0ee40
--- /dev/null
+++ b/src/plugins/bearer/corewlan/main.cpp
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qcorewlanengine.h"
+
+#include <QtNetwork/private/qbearerplugin_p.h>
+
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+class QCoreWlanEnginePlugin : public QBearerEnginePlugin
+{
+public:
+ QCoreWlanEnginePlugin();
+ ~QCoreWlanEnginePlugin();
+
+ QStringList keys() const;
+ QBearerEngine *create(const QString &key) const;
+};
+
+QCoreWlanEnginePlugin::QCoreWlanEnginePlugin()
+{
+}
+
+QCoreWlanEnginePlugin::~QCoreWlanEnginePlugin()
+{
+}
+
+QStringList QCoreWlanEnginePlugin::keys() const
+{
+ return QStringList() << QLatin1String("corewlan");
+}
+
+QBearerEngine *QCoreWlanEnginePlugin::create(const QString &key) const
+{
+ if (key == QLatin1String("corewlan"))
+ return new QCoreWlanEngine;
+ else
+ return 0;
+}
+
+Q_EXPORT_STATIC_PLUGIN(QCoreWlanEnginePlugin)
+Q_EXPORT_PLUGIN2(qcorewlanbearer, QCoreWlanEnginePlugin)
+
+QT_END_NAMESPACE
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.h b/src/plugins/bearer/corewlan/qcorewlanengine.h
new file mode 100644
index 0000000000..cbaa9d6b93
--- /dev/null
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.h
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QCOREWLANENGINE_H
+#define QCOREWLANENGINE_H
+
+#include "../qbearerengine_impl.h"
+
+#include <QMap>
+#include <QTimer>
+#include <SystemConfiguration/SystemConfiguration.h>
+
+QT_BEGIN_NAMESPACE
+
+class QNetworkConfigurationPrivate;
+
+class QCoreWlanEngine : public QBearerEngineImpl
+{
+ Q_OBJECT
+
+public:
+ QCoreWlanEngine(QObject *parent = 0);
+ ~QCoreWlanEngine();
+
+ QString getInterfaceFromId(const QString &id);
+ bool hasIdentifier(const QString &id);
+
+ QString bearerName(const QString &id);
+
+ void connectToId(const QString &id);
+ void disconnectFromId(const QString &id);
+
+ void requestUpdate();
+
+ QNetworkSession::State sessionStateForId(const QString &id);
+
+ QNetworkConfigurationManager::Capabilities capabilities() const;
+
+ QNetworkSessionPrivate *createSessionBackend();
+
+ QNetworkConfigurationPrivatePointer defaultConfiguration();
+
+ bool getWifiInterfaces();
+
+ bool requiresPolling() const;
+
+private Q_SLOTS:
+ void doRequestUpdate();
+
+private:
+ bool isWifiReady(const QString &dev);
+ QMap<QString, QString> configurationInterface;
+ QStringList scanForSsids(const QString &interfaceName);
+
+ bool isKnownSsid(const QString &interfaceName, const QString &ssid);
+ QList<QNetworkConfigurationPrivate *> foundConfigurations;
+
+ SCDynamicStoreRef storeSession;
+ CFRunLoopSourceRef runloopSource;
+
+ void startNetworkChangeLoop();
+
+};
+
+QT_END_NAMESPACE
+
+#endif
+
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
new file mode 100644
index 0000000000..cb278d9de5
--- /dev/null
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
@@ -0,0 +1,615 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qcorewlanengine.h"
+#include "../qnetworksession_impl.h"
+
+#include <QtNetwork/private/qnetworkconfiguration_p.h>
+
+#include <QtCore/qthread.h>
+#include <QtCore/qmutex.h>
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qstringlist.h>
+
+#include <QtCore/qdebug.h>
+
+#if defined(MAC_SDK_10_6) //not much functionality without this
+#include <CoreWLAN/CoreWLAN.h>
+#include <CoreWLAN/CWInterface.h>
+#include <CoreWLAN/CWNetwork.h>
+#include <CoreWLAN/CWNetwork.h>
+#endif
+
+#include <Foundation/NSEnumerator.h>
+#include <Foundation/NSKeyValueObserving.h>
+#include <Foundation/NSAutoreleasePool.h>
+#include <Foundation/NSLock.h>
+
+#include <SystemConfiguration/SCNetworkConfiguration.h>
+#include <private/qt_cocoa_helpers_mac_p.h>
+#include "private/qcore_mac_p.h"
+
+QMap <QString, QString> networkInterfaces;
+
+#ifdef MAC_SDK_10_6
+@interface QNSListener : NSObject
+{
+ NSNotificationCenter *center;
+ CWInterface *currentInterface;
+ QCoreWlanEngine *engine;
+ NSAutoreleasePool *autoreleasepool;
+ NSLock *locker;
+}
+- (void)notificationHandler:(NSNotification *)notification;
+- (void)remove;
+- (void)setEngine:(QCoreWlanEngine *)coreEngine;
+- (void)dealloc;
+
+@property (assign) QCoreWlanEngine* engine;
+
+@end
+
+@implementation QNSListener
+- (id) init
+{
+ [locker lock];
+ autoreleasepool = [[NSAutoreleasePool alloc] init];
+ center = [NSNotificationCenter defaultCenter];
+ currentInterface = [CWInterface interface];
+// [center addObserver:self selector:@selector(notificationHandler:) name:kCWLinkDidChangeNotification object:nil];
+ [center addObserver:self selector:@selector(notificationHandler:) name:kCWPowerDidChangeNotification object:nil];
+ [locker unlock];
+ return self;
+}
+
+-(void)dealloc
+{
+ [autoreleasepool release];
+ [super dealloc];
+}
+
+-(void)setEngine:(QCoreWlanEngine *)coreEngine
+{
+ [locker lock];
+ if(!engine)
+ engine = coreEngine;
+ [locker unlock];
+}
+
+-(void)remove
+{
+ [locker lock];
+ [center removeObserver:self];
+ [locker unlock];
+}
+
+- (void)notificationHandler:(NSNotification *)notification
+{
+ engine->requestUpdate();
+}
+@end
+
+QNSListener *listener = 0;
+
+#endif
+
+QT_BEGIN_NAMESPACE
+
+
+static QString qGetInterfaceType(const QString &interfaceString)
+{
+ return networkInterfaces.value(interfaceString, QLatin1String("Unknown"));
+}
+
+void networkChangeCallback(SCDynamicStoreRef/* store*/, CFArrayRef changedKeys, void *info)
+{
+ for ( long i = 0; i < CFArrayGetCount(changedKeys); i++) {
+
+ QString changed = QCFString::toQString((CFStringRef)CFArrayGetValueAtIndex(changedKeys, i));
+ if( changed.contains("/Network/Global/IPv4")) {
+ QCoreWlanEngine* wlanEngine = static_cast<QCoreWlanEngine*>(info);
+ wlanEngine->requestUpdate();
+ }
+ }
+ return;
+}
+
+QCoreWlanEngine::QCoreWlanEngine(QObject *parent)
+: QBearerEngineImpl(parent)
+{
+ startNetworkChangeLoop();
+
+#if defined(MAC_SDK_10_6)
+ if(!listener) {
+ listener = [[QNSListener alloc] init];
+ listener.engine = this;
+ }
+#endif
+}
+
+QCoreWlanEngine::~QCoreWlanEngine()
+{
+ while (!foundConfigurations.isEmpty())
+ delete foundConfigurations.takeFirst();
+#if defined(MAC_SDK_10_6)
+ [listener remove];
+ [listener release];
+#endif
+}
+
+QString QCoreWlanEngine::getInterfaceFromId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ return configurationInterface.value(id);
+}
+
+bool QCoreWlanEngine::hasIdentifier(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ return configurationInterface.contains(id);
+}
+
+void QCoreWlanEngine::connectToId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
+ QString interfaceString = getInterfaceFromId(id);
+
+ if(networkInterfaces.value(interfaceString) == "WLAN") {
+#if defined(MAC_SDK_10_6)
+ CWInterface *wifiInterface = [CWInterface interfaceWithName: qt_mac_QStringToNSString(interfaceString)];
+ CWConfiguration *userConfig = [ wifiInterface configuration];
+
+ NSSet *remNets = [userConfig rememberedNetworks]; //CWWirelessProfile
+
+ NSEnumerator *enumerator = [remNets objectEnumerator];
+ CWWirelessProfile *wProfile;
+ NSUInteger index=0;
+ NSDictionary *parametersDict;
+ NSArray* apArray;
+
+ CW8021XProfile *user8021XProfile;
+ NSError *err;
+ NSMutableDictionary *params;
+
+ while ((wProfile = [enumerator nextObject])) { //CWWirelessProfile
+
+ if(id == QString::number(qHash(QLatin1String("corewlan:") + qt_mac_NSStringToQString([wProfile ssid])))) {
+ user8021XProfile = nil;
+ user8021XProfile = [ wProfile user8021XProfile];
+
+ err = nil;
+ params = [NSMutableDictionary dictionaryWithCapacity:0];
+
+ if(user8021XProfile) {
+ [params setValue: user8021XProfile forKey:kCWAssocKey8021XProfile];
+ } else {
+ [params setValue: [wProfile passphrase] forKey: kCWAssocKeyPassphrase];
+ }
+
+ parametersDict = nil;
+ apArray = [NSMutableArray arrayWithArray:[wifiInterface scanForNetworksWithParameters:parametersDict error:&err]];
+
+ if(!err) {
+
+ for(uint row=0; row < [apArray count]; row++ ) {
+ CWNetwork *apNetwork = [apArray objectAtIndex:row];
+ if([[apNetwork ssid] compare:[wProfile ssid]] == NSOrderedSame) {
+
+ bool result = [wifiInterface associateToNetwork: apNetwork parameters:[NSDictionary dictionaryWithDictionary:params] error:&err];
+
+ if(!result) {
+ emit connectionError(id, ConnectError);
+ } else {
+ [autoreleasepool release];
+ return;
+ }
+ }
+ }
+ }
+ }
+ index++;
+ }
+
+ emit connectionError(id, InterfaceLookupError);
+#endif
+ } else {
+ // not wifi
+ }
+ emit connectionError(id, OperationNotSupported);
+ [autoreleasepool release];
+}
+
+void QCoreWlanEngine::disconnectFromId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ QString interfaceString = getInterfaceFromId(id);
+ if(networkInterfaces.value(getInterfaceFromId(id)) == "WLAN") { //wifi only for now
+#if defined(MAC_SDK_10_6)
+ NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
+ CWInterface *wifiInterface = [CWInterface interfaceWithName: qt_mac_QStringToNSString(interfaceString)];
+ [wifiInterface disassociate];
+ if([[wifiInterface interfaceState]intValue] != kCWInterfaceStateInactive) {
+ emit connectionError(id, DisconnectionError);
+ }
+ [autoreleasepool release];
+ return;
+#endif
+ } else {
+
+ }
+ emit connectionError(id, OperationNotSupported);
+}
+
+void QCoreWlanEngine::requestUpdate()
+{
+ QMutexLocker locker(&mutex);
+
+ doRequestUpdate();
+}
+
+void QCoreWlanEngine::doRequestUpdate()
+{
+ QMutexLocker locker(&mutex);
+
+ getWifiInterfaces();
+
+ QStringList previous = accessPointConfigurations.keys();
+
+ QMapIterator<QString, QString> i(networkInterfaces);
+ while (i.hasNext()) {
+ i.next();
+ if (i.value() == QLatin1String("WLAN")) {
+ QStringList added = scanForSsids(i.key());
+ while (!added.isEmpty()) {
+ previous.removeAll(added.takeFirst());
+ }
+ }
+
+ QNetworkInterface interface = QNetworkInterface::interfaceFromName(i.key());
+
+ if (!interface.isValid())
+ continue;
+
+ uint identifier;
+ if (interface.index())
+ identifier = qHash(QLatin1String("corewlan:") + QString::number(interface.index()));
+ else
+ identifier = qHash(QLatin1String("corewlan:") + interface.hardwareAddress());
+
+ const QString id = QString::number(identifier);
+
+ previous.removeAll(id);
+
+ QString name = interface.humanReadableName();
+ if (name.isEmpty())
+ name = interface.name();
+
+ QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined;
+
+ if (interface.flags() && QNetworkInterface::IsRunning)
+ state = QNetworkConfiguration::Defined;
+
+ if (!interface.addressEntries().isEmpty())
+ state = QNetworkConfiguration::Active;
+
+ if (accessPointConfigurations.contains(id)) { //handle only scanned AP's
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+
+ bool changed = false;
+
+ if (!ptr->isValid) {
+ ptr->isValid = true;
+ changed = true;
+ }
+
+ if (ptr->name != name) {
+ ptr->name = name;
+ changed = true;
+ }
+
+ if (ptr->id != id) {
+ ptr->id = id;
+ changed = true;
+ }
+
+ if (ptr->state != state) {
+ ptr->state = state;
+ changed = true;
+ }
+
+ if (changed)
+ emit configurationChanged(ptr);
+ }
+ }
+
+ while (!previous.isEmpty()) {
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.take(previous.takeFirst());
+
+ configurationInterface.remove(ptr->id);
+ emit configurationRemoved(ptr);
+ }
+
+ emit updateCompleted();
+}
+
+QStringList QCoreWlanEngine::scanForSsids(const QString &interfaceName)
+{
+ QMutexLocker locker(&mutex);
+
+ QStringList found;
+
+#if defined(MAC_SDK_10_6)
+ QMacCocoaAutoReleasePool pool;
+
+ CWInterface *currentInterface = [CWInterface interfaceWithName:qt_mac_QStringToNSString(interfaceName)];
+ if([currentInterface power]) {
+ NSError *err = nil;
+ NSDictionary *parametersDict = nil;
+ NSArray* apArray = [currentInterface scanForNetworksWithParameters:parametersDict error:&err];
+
+ CWNetwork *apNetwork;
+ if (!err) {
+ for(uint row=0; row < [apArray count]; row++ ) {
+
+ apNetwork = [apArray objectAtIndex:row];
+
+ const QString networkSsid = qt_mac_NSStringToQString([apNetwork ssid]);
+
+ const QString id = QString::number(qHash(QLatin1String("corewlan:") + networkSsid));
+ found.append(id);
+
+ QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined;
+
+ if ([currentInterface.interfaceState intValue] == kCWInterfaceStateRunning) {
+ if (networkSsid == qt_mac_NSStringToQString([currentInterface ssid]))
+ state = QNetworkConfiguration::Active;
+ } else {
+ if (isKnownSsid(interfaceName, networkSsid))
+ state = QNetworkConfiguration::Discovered;
+ else
+ state = QNetworkConfiguration::Defined;
+ }
+
+ if (accessPointConfigurations.contains(id)) {
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+
+ bool changed = false;
+
+ if (!ptr->isValid) {
+ ptr->isValid = true;
+ changed = true;
+ }
+
+ if (ptr->name != networkSsid) {
+ ptr->name = networkSsid;
+ changed = true;
+ }
+
+ if (ptr->id != id) {
+ ptr->id = id;
+ changed = true;
+ }
+
+ if (ptr->state != state) {
+ ptr->state = state;
+ changed = true;
+ }
+
+ if (changed)
+ emit configurationChanged(ptr);
+ } else {
+ QNetworkConfigurationPrivatePointer ptr(new QNetworkConfigurationPrivate);
+
+ ptr->name = networkSsid;
+ ptr->isValid = true;
+ ptr->id = id;
+ ptr->state = state;
+ ptr->type = QNetworkConfiguration::InternetAccessPoint;
+ ptr->bearer = QLatin1String("WLAN");
+
+ accessPointConfigurations.insert(id, ptr);
+ configurationInterface.insert(id, interfaceName);
+
+ emit configurationAdded(ptr);
+ }
+ }
+ }
+ }
+#else
+ Q_UNUSED(interfaceName);
+#endif
+ return found;
+}
+
+bool QCoreWlanEngine::isWifiReady(const QString &wifiDeviceName)
+{
+ QMutexLocker locker(&mutex);
+
+#if defined(MAC_SDK_10_6)
+ CWInterface *defaultInterface = [CWInterface interfaceWithName: qt_mac_QStringToNSString(wifiDeviceName)];
+ if([defaultInterface power])
+ return true;
+#else
+ Q_UNUSED(wifiDeviceName);
+#endif
+ return false;
+}
+
+bool QCoreWlanEngine::isKnownSsid(const QString &interfaceName, const QString &ssid)
+{
+ QMutexLocker locker(&mutex);
+
+#if defined(MAC_SDK_10_6)
+ CWInterface *wifiInterface = [CWInterface interfaceWithName: qt_mac_QStringToNSString(interfaceName)];
+ CWConfiguration *userConfig = [wifiInterface configuration];
+ NSSet *remNets = [userConfig rememberedNetworks];
+ for (CWWirelessProfile *wProfile in remNets) {
+ if(ssid == qt_mac_NSStringToQString([wProfile ssid]))
+ return true;
+ }
+#else
+ Q_UNUSED(interfaceName);
+ Q_UNUSED(ssid);
+#endif
+ return false;
+}
+
+bool QCoreWlanEngine::getWifiInterfaces()
+{
+ QMutexLocker locker(&mutex);
+
+ networkInterfaces.clear();
+ QMacCocoaAutoReleasePool pool;
+
+ NSArray *wifiInterfaces = [CWInterface supportedInterfaces];
+ for(uint row=0; row < [wifiInterfaces count]; row++ ) {
+ networkInterfaces.insert( qt_mac_NSStringToQString([wifiInterfaces objectAtIndex:row]),"WLAN");
+ }
+
+ return true;
+}
+
+QNetworkSession::State QCoreWlanEngine::sessionStateForId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+
+ if (!ptr)
+ return QNetworkSession::Invalid;
+
+ if (!ptr->isValid) {
+ return QNetworkSession::Invalid;
+ } else if ((ptr->state & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
+ return QNetworkSession::Connected;
+ } else if ((ptr->state & QNetworkConfiguration::Discovered) ==
+ QNetworkConfiguration::Discovered) {
+ return QNetworkSession::Disconnected;
+ } else if ((ptr->state & QNetworkConfiguration::Defined) == QNetworkConfiguration::Defined) {
+ return QNetworkSession::NotAvailable;
+ } else if ((ptr->state & QNetworkConfiguration::Undefined) ==
+ QNetworkConfiguration::Undefined) {
+ return QNetworkSession::NotAvailable;
+ }
+
+ return QNetworkSession::Invalid;
+}
+
+QNetworkConfigurationManager::Capabilities QCoreWlanEngine::capabilities() const
+{
+ return QNetworkConfigurationManager::ForcedRoaming;
+}
+
+void QCoreWlanEngine::startNetworkChangeLoop()
+{
+ storeSession = NULL;
+
+ SCDynamicStoreContext dynStoreContext = { 0, this/*(void *)storeSession*/, NULL, NULL, NULL };
+ storeSession = SCDynamicStoreCreate(NULL,
+ CFSTR("networkChangeCallback"),
+ networkChangeCallback,
+ &dynStoreContext);
+ if (!storeSession ) {
+ qWarning() << "could not open dynamic store: error:" << SCErrorString(SCError());
+ return;
+ }
+
+ CFMutableArrayRef notificationKeys;
+ notificationKeys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
+ CFMutableArrayRef patternsArray;
+ patternsArray = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
+
+ CFStringRef storeKey;
+ storeKey = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL,
+ kSCDynamicStoreDomainState,
+ kSCEntNetIPv4);
+ CFArrayAppendValue(notificationKeys, storeKey);
+ CFRelease(storeKey);
+
+ storeKey = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL,
+ kSCDynamicStoreDomainState,
+ kSCCompAnyRegex,
+ kSCEntNetIPv4);
+ CFArrayAppendValue(patternsArray, storeKey);
+ CFRelease(storeKey);
+
+ if (!SCDynamicStoreSetNotificationKeys(storeSession , notificationKeys, patternsArray)) {
+ qWarning() << "register notification error:"<< SCErrorString(SCError());
+ CFRelease(storeSession );
+ CFRelease(notificationKeys);
+ CFRelease(patternsArray);
+ return;
+ }
+ CFRelease(notificationKeys);
+ CFRelease(patternsArray);
+
+ runloopSource = SCDynamicStoreCreateRunLoopSource(NULL, storeSession , 0);
+ if (!runloopSource) {
+ qWarning() << "runloop source error:"<< SCErrorString(SCError());
+ CFRelease(storeSession );
+ return;
+ }
+
+ CFRunLoopAddSource(CFRunLoopGetCurrent(), runloopSource, kCFRunLoopDefaultMode);
+ return;
+}
+
+QNetworkSessionPrivate *QCoreWlanEngine::createSessionBackend()
+{
+ return new QNetworkSessionPrivateImpl;
+}
+
+QNetworkConfigurationPrivatePointer QCoreWlanEngine::defaultConfiguration()
+{
+ return QNetworkConfigurationPrivatePointer();
+}
+
+bool QCoreWlanEngine::requiresPolling() const
+{
+ return true;
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/bearer/generic/generic.pro b/src/plugins/bearer/generic/generic.pro
new file mode 100644
index 0000000000..1d141fd732
--- /dev/null
+++ b/src/plugins/bearer/generic/generic.pro
@@ -0,0 +1,16 @@
+TARGET = qgenericbearer
+include(../../qpluginbase.pri)
+
+QT += network
+
+HEADERS += qgenericengine.h \
+ ../qnetworksession_impl.h \
+ ../qbearerengine_impl.h \
+ ../platformdefs_win.h
+SOURCES += qgenericengine.cpp \
+ ../qnetworksession_impl.cpp \
+ main.cpp
+
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer
+target.path += $$[QT_INSTALL_PLUGINS]/bearer
+INSTALLS += target
diff --git a/src/plugins/bearer/generic/main.cpp b/src/plugins/bearer/generic/main.cpp
new file mode 100644
index 0000000000..ba85d9389d
--- /dev/null
+++ b/src/plugins/bearer/generic/main.cpp
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qgenericengine.h"
+
+#include <QtNetwork/private/qbearerplugin_p.h>
+
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+class QGenericEnginePlugin : public QBearerEnginePlugin
+{
+public:
+ QGenericEnginePlugin();
+ ~QGenericEnginePlugin();
+
+ QStringList keys() const;
+ QBearerEngine *create(const QString &key) const;
+};
+
+QGenericEnginePlugin::QGenericEnginePlugin()
+{
+}
+
+QGenericEnginePlugin::~QGenericEnginePlugin()
+{
+}
+
+QStringList QGenericEnginePlugin::keys() const
+{
+ return QStringList() << QLatin1String("generic");
+}
+
+QBearerEngine *QGenericEnginePlugin::create(const QString &key) const
+{
+ if (key == QLatin1String("generic"))
+ return new QGenericEngine;
+ else
+ return 0;
+}
+
+Q_EXPORT_STATIC_PLUGIN(QGenericEnginePlugin)
+Q_EXPORT_PLUGIN2(qgenericbearer, QGenericEnginePlugin)
+
+QT_END_NAMESPACE
diff --git a/src/plugins/bearer/generic/qgenericengine.cpp b/src/plugins/bearer/generic/qgenericengine.cpp
new file mode 100644
index 0000000000..a9e78b2bed
--- /dev/null
+++ b/src/plugins/bearer/generic/qgenericengine.cpp
@@ -0,0 +1,332 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qgenericengine.h"
+#include "../qnetworksession_impl.h"
+
+#include <QtNetwork/private/qnetworkconfiguration_p.h>
+
+#include <QtCore/qthread.h>
+#include <QtCore/qmutex.h>
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qstringlist.h>
+
+#include <QtCore/qdebug.h>
+
+#ifdef Q_OS_WIN
+#include "../platformdefs_win.h"
+#endif
+
+#ifdef Q_OS_LINUX
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <net/if.h>
+#include <net/if_arp.h>
+#include <unistd.h>
+#endif
+
+QT_BEGIN_NAMESPACE
+
+static QString qGetInterfaceType(const QString &interface)
+{
+#ifdef Q_OS_WIN32
+ unsigned long oid;
+ DWORD bytesWritten;
+
+ NDIS_MEDIUM medium;
+ NDIS_PHYSICAL_MEDIUM physicalMedium;
+
+ HANDLE handle = CreateFile((TCHAR *)QString("\\\\.\\%1").arg(interface).utf16(), 0,
+ FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
+ if (handle == INVALID_HANDLE_VALUE)
+ return QLatin1String("Unknown");
+
+ oid = OID_GEN_MEDIA_SUPPORTED;
+ bytesWritten = 0;
+ bool result = DeviceIoControl(handle, IOCTL_NDIS_QUERY_GLOBAL_STATS, &oid, sizeof(oid),
+ &medium, sizeof(medium), &bytesWritten, 0);
+ if (!result) {
+ CloseHandle(handle);
+ return QLatin1String("Unknown");
+ }
+
+ oid = OID_GEN_PHYSICAL_MEDIUM;
+ bytesWritten = 0;
+ result = DeviceIoControl(handle, IOCTL_NDIS_QUERY_GLOBAL_STATS, &oid, sizeof(oid),
+ &physicalMedium, sizeof(physicalMedium), &bytesWritten, 0);
+ if (!result) {
+ CloseHandle(handle);
+
+ if (medium == NdisMedium802_3)
+ return QLatin1String("Ethernet");
+ else
+ return QLatin1String("Unknown");
+ }
+
+ CloseHandle(handle);
+
+ if (medium == NdisMedium802_3) {
+ switch (physicalMedium) {
+ case NdisPhysicalMediumWirelessLan:
+ return QLatin1String("WLAN");
+ case NdisPhysicalMediumBluetooth:
+ return QLatin1String("Bluetooth");
+ case NdisPhysicalMediumWiMax:
+ return QLatin1String("WiMAX");
+ default:
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "Physical Medium" << physicalMedium;
+#endif
+ return QLatin1String("Ethernet");
+ }
+ }
+
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << medium << physicalMedium;
+#endif
+#elif defined(Q_OS_LINUX)
+ int sock = socket(AF_INET, SOCK_DGRAM, 0);
+
+ ifreq request;
+ strncpy(request.ifr_name, interface.toLocal8Bit().data(), sizeof(request.ifr_name));
+ int result = ioctl(sock, SIOCGIFHWADDR, &request);
+ close(sock);
+
+ if (result >= 0 && request.ifr_hwaddr.sa_family == ARPHRD_ETHER)
+ return QLatin1String("Ethernet");
+#else
+ Q_UNUSED(interface);
+#endif
+
+ return QLatin1String("Unknown");
+}
+
+QGenericEngine::QGenericEngine(QObject *parent)
+: QBearerEngineImpl(parent)
+{
+}
+
+QGenericEngine::~QGenericEngine()
+{
+}
+
+QString QGenericEngine::getInterfaceFromId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ return configurationInterface.value(id);
+}
+
+bool QGenericEngine::hasIdentifier(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ return configurationInterface.contains(id);
+}
+
+void QGenericEngine::connectToId(const QString &id)
+{
+ emit connectionError(id, OperationNotSupported);
+}
+
+void QGenericEngine::disconnectFromId(const QString &id)
+{
+ emit connectionError(id, OperationNotSupported);
+}
+
+void QGenericEngine::requestUpdate()
+{
+ QMutexLocker locker(&mutex);
+
+ doRequestUpdate();
+}
+
+void QGenericEngine::doRequestUpdate()
+{
+ QMutexLocker locker(&mutex);
+
+ // Immediately after connecting with a wireless access point
+ // QNetworkInterface::allInterfaces() will sometimes return an empty list. Calling it again a
+ // second time results in a non-empty list. If we loose interfaces we will end up removing
+ // network configurations which will break current sessions.
+ QList<QNetworkInterface> interfaces = QNetworkInterface::allInterfaces();
+ if (interfaces.isEmpty())
+ interfaces = QNetworkInterface::allInterfaces();
+
+ QStringList previous = accessPointConfigurations.keys();
+
+ // create configuration for each interface
+ while (!interfaces.isEmpty()) {
+ QNetworkInterface interface = interfaces.takeFirst();
+
+ if (!interface.isValid())
+ continue;
+
+ // ignore loopback interface
+ if (interface.flags() & QNetworkInterface::IsLoopBack)
+ continue;
+
+ // ignore WLAN interface handled in seperate engine
+ if (qGetInterfaceType(interface.name()) == QLatin1String("WLAN"))
+ continue;
+
+ uint identifier;
+ if (interface.index())
+ identifier = qHash(QLatin1String("generic:") + QString::number(interface.index()));
+ else
+ identifier = qHash(QLatin1String("generic:") + interface.hardwareAddress());
+
+ const QString id = QString::number(identifier);
+
+ previous.removeAll(id);
+
+ QString name = interface.humanReadableName();
+ if (name.isEmpty())
+ name = interface.name();
+
+ QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Discovered;
+ if (interface.flags() & QNetworkInterface::IsUp)
+ state |= QNetworkConfiguration::Active;
+
+ if (accessPointConfigurations.contains(id)) {
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+
+ bool changed = false;
+
+ if (!ptr->isValid) {
+ ptr->isValid = true;
+ changed = true;
+ }
+
+ if (ptr->name != name) {
+ ptr->name = name;
+ changed = true;
+ }
+
+ if (ptr->id != id) {
+ ptr->id = id;
+ changed = true;
+ }
+
+ if (ptr->state != state) {
+ ptr->state = state;
+ changed = true;
+ }
+
+ if (changed)
+ emit configurationChanged(ptr);
+ } else {
+ QNetworkConfigurationPrivatePointer ptr(new QNetworkConfigurationPrivate);
+
+ ptr->name = name;
+ ptr->isValid = true;
+ ptr->id = id;
+ ptr->state = state;
+ ptr->type = QNetworkConfiguration::InternetAccessPoint;
+ ptr->bearer = qGetInterfaceType(interface.name());
+
+ accessPointConfigurations.insert(id, ptr);
+ configurationInterface.insert(id, interface.name());
+
+ emit configurationAdded(ptr);
+ }
+ }
+
+ while (!previous.isEmpty()) {
+ QNetworkConfigurationPrivatePointer ptr =
+ accessPointConfigurations.take(previous.takeFirst());
+
+ configurationInterface.remove(ptr->id);
+ emit configurationRemoved(ptr);
+ }
+
+ emit updateCompleted();
+}
+
+QNetworkSession::State QGenericEngine::sessionStateForId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+
+ if (!ptr)
+ return QNetworkSession::Invalid;
+
+ if (!ptr->isValid) {
+ return QNetworkSession::Invalid;
+ } else if ((ptr->state & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
+ return QNetworkSession::Connected;
+ } else if ((ptr->state & QNetworkConfiguration::Discovered) ==
+ QNetworkConfiguration::Discovered) {
+ return QNetworkSession::Disconnected;
+ } else if ((ptr->state & QNetworkConfiguration::Defined) == QNetworkConfiguration::Defined) {
+ return QNetworkSession::NotAvailable;
+ } else if ((ptr->state & QNetworkConfiguration::Undefined) ==
+ QNetworkConfiguration::Undefined) {
+ return QNetworkSession::NotAvailable;
+ }
+
+ return QNetworkSession::Invalid;
+}
+
+QNetworkConfigurationManager::Capabilities QGenericEngine::capabilities() const
+{
+ return QNetworkConfigurationManager::ForcedRoaming;
+}
+
+QNetworkSessionPrivate *QGenericEngine::createSessionBackend()
+{
+ return new QNetworkSessionPrivateImpl;
+}
+
+QNetworkConfigurationPrivatePointer QGenericEngine::defaultConfiguration()
+{
+ return QNetworkConfigurationPrivatePointer();
+}
+
+
+bool QGenericEngine::requiresPolling() const
+{
+ return true;
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/plugins/bearer/generic/qgenericengine.h b/src/plugins/bearer/generic/qgenericengine.h
new file mode 100644
index 0000000000..a1b9167817
--- /dev/null
+++ b/src/plugins/bearer/generic/qgenericengine.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGENERICENGINE_H
+#define QGENERICENGINE_H
+
+#include "../qbearerengine_impl.h"
+
+#include <QMap>
+#include <QTimer>
+
+QT_BEGIN_NAMESPACE
+
+class QNetworkConfigurationPrivate;
+class QNetworkSessionPrivate;
+
+class QGenericEngine : public QBearerEngineImpl
+{
+ Q_OBJECT
+
+public:
+ QGenericEngine(QObject *parent = 0);
+ ~QGenericEngine();
+
+ QString getInterfaceFromId(const QString &id);
+ bool hasIdentifier(const QString &id);
+
+ QString bearerName(const QString &id);
+
+ void connectToId(const QString &id);
+ void disconnectFromId(const QString &id);
+
+ void requestUpdate();
+
+ QNetworkSession::State sessionStateForId(const QString &id);
+
+ QNetworkConfigurationManager::Capabilities capabilities() const;
+
+ QNetworkSessionPrivate *createSessionBackend();
+
+ QNetworkConfigurationPrivatePointer defaultConfiguration();
+
+ bool requiresPolling() const;
+
+private Q_SLOTS:
+ void doRequestUpdate();
+
+private:
+ QMap<QString, QString> configurationInterface;
+};
+
+QT_END_NAMESPACE
+
+#endif
+
diff --git a/src/plugins/bearer/icd/icd.pro b/src/plugins/bearer/icd/icd.pro
new file mode 100644
index 0000000000..5eaf5af458
--- /dev/null
+++ b/src/plugins/bearer/icd/icd.pro
@@ -0,0 +1,22 @@
+TARGET = qicdbearer
+include(../../qpluginbase.pri)
+
+QT += network dbus
+
+CONFIG += link_pkgconfig
+PKGCONFIG += glib-2.0 dbus-glib-1 gconf-2.0 osso-ic conninet
+
+HEADERS += qicdengine.h \
+ monitor.h \
+ qnetworksession_impl.h
+
+SOURCES += main.cpp \
+ qicdengine.cpp \
+ monitor.cpp \
+ qnetworksession_impl.cpp
+
+#DEFINES += BEARER_MANAGEMENT_DEBUG
+
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer
+target.path += $$[QT_INSTALL_PLUGINS]/bearer
+INSTALLS += target
diff --git a/src/plugins/bearer/icd/main.cpp b/src/plugins/bearer/icd/main.cpp
new file mode 100644
index 0000000000..ad1a918644
--- /dev/null
+++ b/src/plugins/bearer/icd/main.cpp
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qicdengine.h"
+
+#include <QtNetwork/private/qbearerplugin_p.h>
+
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+class QIcdEnginePlugin : public QBearerEnginePlugin
+{
+public:
+ QIcdEnginePlugin();
+ ~QIcdEnginePlugin();
+
+ QStringList keys() const;
+ QBearerEngine *create(const QString &key) const;
+};
+
+QIcdEnginePlugin::QIcdEnginePlugin()
+{
+}
+
+QIcdEnginePlugin::~QIcdEnginePlugin()
+{
+}
+
+QStringList QIcdEnginePlugin::keys() const
+{
+ return QStringList() << QLatin1String("icd");
+}
+
+QBearerEngine *QIcdEnginePlugin::create(const QString &key) const
+{
+ if (key == QLatin1String("icd"))
+ return new QIcdEngine;
+ else
+ return 0;
+}
+
+Q_EXPORT_STATIC_PLUGIN(QIcdEnginePlugin)
+Q_EXPORT_PLUGIN2(qicdbearer, QIcdEnginePlugin)
+
+QT_END_NAMESPACE
diff --git a/src/plugins/bearer/icd/monitor.cpp b/src/plugins/bearer/icd/monitor.cpp
new file mode 100644
index 0000000000..5b0af7e40e
--- /dev/null
+++ b/src/plugins/bearer/icd/monitor.cpp
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "monitor.h"
+#include "qicdengine.h"
+
+#include <wlancond.h>
+#include <libicd-network-wlan-dev.h>
+#include <maemo_icd.h>
+#include <iapconf.h>
+
+
+void IapMonitor::setup(QIcdEngine *d_ptr)
+{
+ if (first_call) {
+ d = d_ptr;
+ first_call = false;
+ }
+}
+
+
+void IapMonitor::cleanup()
+{
+ if (!first_call) {
+ timers.removeAll();
+ first_call = true;
+ }
+}
+
+
+void IapMonitor::iapAdded(const QString &iap_id)
+{
+ /* We cannot know when the IAP is fully added to db, so a timer is
+ * installed instead. When the timer expires we hope that IAP is added ok.
+ */
+ QString id = iap_id;
+ timers.add(id, d);
+}
+
+
+void IapMonitor::iapRemoved(const QString &iap_id)
+{
+ QString id = iap_id;
+ d->deleteConfiguration(id);
+}
+
diff --git a/src/plugins/bearer/icd/monitor.h b/src/plugins/bearer/icd/monitor.h
new file mode 100644
index 0000000000..10ffb30b1c
--- /dev/null
+++ b/src/plugins/bearer/icd/monitor.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MONITOR_H
+#define MONITOR_H
+
+#include <QtCore/qhash.h>
+#include <QtCore/qtimer.h>
+
+#include <gconf/gconf.h>
+#include <gconf/gconf-client.h>
+
+#include <iapmonitor.h>
+
+class QIcdEngine;
+
+/* The IapAddTimer is a helper class that makes sure we update
+ * the configuration only after all db additions to certain
+ * iap are finished (after a certain timeout)
+ */
+class _IapAddTimer : public QObject
+{
+ Q_OBJECT
+
+public:
+ _IapAddTimer() {}
+ ~_IapAddTimer()
+ {
+ if (timer.isActive()) {
+ QObject::disconnect(&timer, SIGNAL(timeout()), this, SLOT(timeout()));
+ timer.stop();
+ }
+ }
+
+ void add(QString& iap_id, QIcdEngine *d);
+
+ QString iap_id;
+ QTimer timer;
+ QIcdEngine *d;
+
+public Q_SLOTS:
+ void timeout();
+};
+
+class IapAddTimer {
+ QHash<QString, _IapAddTimer* > timers;
+
+public:
+ IapAddTimer() {}
+ ~IapAddTimer() {}
+
+ void add(QString& iap_id, QIcdEngine *d);
+ void del(QString& iap_id);
+ void removeAll();
+};
+
+class IapMonitor : public Maemo::IAPMonitor
+{
+public:
+ IapMonitor() : first_call(true) { }
+
+ void setup(QIcdEngine *d);
+ void cleanup();
+
+protected:
+ void iapAdded(const QString &iapId);
+ void iapRemoved(const QString &iapId);
+
+private:
+ bool first_call;
+
+ QIcdEngine *d;
+ IapAddTimer timers;
+};
+
+#endif // MONITOR_H
diff --git a/src/plugins/bearer/icd/qicdengine.cpp b/src/plugins/bearer/icd/qicdengine.cpp
new file mode 100644
index 0000000000..5e506ef907
--- /dev/null
+++ b/src/plugins/bearer/icd/qicdengine.cpp
@@ -0,0 +1,415 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qicdengine.h"
+#include "monitor.h"
+#include "qnetworksession_impl.h"
+
+#include <libicd-network-wlan-dev.h>
+#include <maemo_icd.h>
+#include <iapconf.h>
+
+QT_BEGIN_NAMESPACE
+
+IcdNetworkConfigurationPrivate::IcdNetworkConfigurationPrivate()
+: network_attrs(0), service_attrs(0)
+{
+}
+
+IcdNetworkConfigurationPrivate::~IcdNetworkConfigurationPrivate()
+{
+}
+
+QString IcdNetworkConfigurationPrivate::bearerName() const
+{
+ if (iap_type == QLatin1String("WLAN_INFRA") ||
+ iap_type == QLatin1String("WLAN_ADHOC")) {
+ return QLatin1String("WLAN");
+ } else if (iap_type == QLatin1String("GPRS")) {
+ return QLatin1String("HSPA");
+ } else {
+ return iap_type;
+ }
+}
+
+static inline QString network_attrs_to_security(uint network_attrs)
+{
+ uint cap = 0;
+ nwattr2cap(network_attrs, &cap); /* from libicd-network-wlan-dev.h */
+ if (cap & WLANCOND_OPEN)
+ return "NONE";
+ else if (cap & WLANCOND_WEP)
+ return "WEP";
+ else if (cap & WLANCOND_WPA_PSK)
+ return "WPA_PSK";
+ else if (cap & WLANCOND_WPA_EAP)
+ return "WPA_EAP";
+ return "";
+}
+
+QIcdEngine::QIcdEngine(QObject *parent)
+: QBearerEngine(parent), iapMonitor(new IapMonitor)
+{
+ /* Turn on IAP monitoring */
+ iapMonitor->setup(this);
+
+ doRequestUpdate();
+}
+
+QIcdEngine::~QIcdEngine()
+{
+}
+
+bool QIcdEngine::hasIdentifier(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ return accessPointConfigurations.contains(id) ||
+ snapConfigurations.contains(id) ||
+ userChoiceConfigurations.contains(id);
+}
+
+void QIcdEngine::requestUpdate()
+{
+ QMutexLocker locker(&mutex);
+
+ QTimer::singleShot(0, this, SLOT(doRequestUpdate()));
+}
+
+static uint32_t getNetworkAttrs(bool is_iap_id,
+ QString& iap_id,
+ QString& iap_type,
+ QString security_method)
+{
+ guint network_attr = 0;
+ dbus_uint32_t cap = 0;
+
+ if (iap_type == "WLAN_INFRA")
+ cap |= WLANCOND_INFRA;
+ else if (iap_type == "WLAN_ADHOC")
+ cap |= WLANCOND_ADHOC;
+
+ if (security_method.isEmpty() && (cap & (WLANCOND_INFRA | WLANCOND_ADHOC))) {
+ Maemo::IAPConf saved_ap(iap_id);
+ security_method = saved_ap.value("wlan_security").toString();
+ }
+
+ if (!security_method.isEmpty()) {
+ if (security_method == "WEP")
+ cap |= WLANCOND_WEP;
+ else if (security_method == "WPA_PSK")
+ cap |= WLANCOND_WPA_PSK;
+ else if (security_method == "WPA_EAP")
+ cap |= WLANCOND_WPA_EAP;
+ else if (security_method == "NONE")
+ cap |= WLANCOND_OPEN;
+
+ if (cap & (WLANCOND_WPA_PSK | WLANCOND_WPA_EAP)) {
+ Maemo::IAPConf saved_iap(iap_id);
+ bool wpa2_only = saved_iap.value("EAP_wpa2_only_mode").toBool();
+ if (wpa2_only) {
+ cap |= WLANCOND_WPA2;
+ }
+ }
+ }
+
+ cap2nwattr(cap, &network_attr);
+ if (is_iap_id)
+ network_attr |= ICD_NW_ATTR_IAPNAME;
+
+ return (uint32_t)network_attr;
+}
+
+void QIcdEngine::doRequestUpdate()
+{
+ QMutexLocker locker(&mutex);
+
+ QStringList previous = accessPointConfigurations.keys();
+
+ /* All the scanned access points */
+ QList<Maemo::IcdScanResult> scanned;
+
+ /* We create a default configuration which is a pseudo config */
+ if (!userChoiceConfigurations.contains(OSSO_IAP_ANY)) {
+ QNetworkConfigurationPrivatePointer ptr(new IcdNetworkConfigurationPrivate);
+
+ ptr->name = QLatin1String("UserChoice");
+ ptr->state = QNetworkConfiguration::Discovered;
+ ptr->isValid = true;
+ ptr->id = OSSO_IAP_ANY;
+ ptr->type = QNetworkConfiguration::UserChoice;
+ ptr->purpose = QNetworkConfiguration::UnknownPurpose;
+ ptr->roamingSupported = false;
+
+ userChoiceConfigurations.insert(ptr->id, ptr);
+ emit configurationAdded(ptr);
+ }
+
+ /* We return currently configured IAPs in the first run and do the WLAN
+ * scan in subsequent runs.
+ */
+ QList<QString> all_iaps;
+ Maemo::IAPConf::getAll(all_iaps);
+
+ foreach (QString iap_id, all_iaps) {
+ QByteArray ssid;
+
+ previous.removeAll(iap_id);
+
+ Maemo::IAPConf saved_ap(iap_id);
+ bool is_temporary = saved_ap.value("temporary").toBool();
+ if (is_temporary) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "IAP" << iap_id << "is temporary, skipping it.";
+#endif
+ continue;
+ }
+
+ QString iap_type = saved_ap.value("type").toString();
+ if (iap_type.startsWith("WLAN")) {
+ ssid = saved_ap.value("wlan_ssid").toByteArray();
+ if (ssid.isEmpty())
+ continue;
+
+ QString security_method = saved_ap.value("wlan_security").toString();
+ } else if (iap_type.isEmpty()) {
+ continue;
+ } else {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "IAP" << iap_id << "network type is" << iap_type;
+#endif
+ ssid.clear();
+ }
+
+ if (!accessPointConfigurations.contains(iap_id)) {
+ IcdNetworkConfigurationPrivate *cpPriv = new IcdNetworkConfigurationPrivate;
+
+ cpPriv->name = saved_ap.value("name").toString();
+ if (cpPriv->name.isEmpty()) {
+ if (!ssid.isEmpty() && ssid.size() > 0)
+ cpPriv->name = ssid.data();
+ else
+ cpPriv->name = iap_id;
+ }
+ cpPriv->isValid = true;
+ cpPriv->id = iap_id;
+ cpPriv->network_id = ssid;
+ cpPriv->network_attrs = getNetworkAttrs(true, iap_id, iap_type, QString());
+ cpPriv->iap_type = iap_type;
+ cpPriv->service_id = saved_ap.value("service_id").toString();
+ cpPriv->service_type = saved_ap.value("service_type").toString();
+ cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
+ cpPriv->state = QNetworkConfiguration::Defined;
+
+ QNetworkConfigurationPrivatePointer ptr(cpPriv);
+ accessPointConfigurations.insert(iap_id, ptr);
+ emit configurationAdded(ptr);
+
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("IAP: %s, name: %s, ssid: %s, added to known list",
+ iap_id.toAscii().data(), ptr->name.toAscii().data(),
+ !ssid.isEmpty() ? ssid.data() : "-");
+#endif
+ } else {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("IAP: %s, ssid: %s, already exists in the known list",
+ iap_id.toAscii().data(), !ssid.isEmpty() ? ssid.data() : "-");
+#endif
+ }
+ }
+
+ if (sender()) {
+ QStringList scannedNetworkTypes;
+ QStringList networkTypesToScan;
+ QString error;
+ Maemo::Icd icd(ICD_SHORT_SCAN_TIMEOUT);
+
+ scannedNetworkTypes = icd.scan(ICD_SCAN_REQUEST_ACTIVE,
+ networkTypesToScan,
+ scanned,
+ error);
+ if (!error.isEmpty()) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "Network scanning failed" << error;
+#endif
+ } else {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ if (!scanned.isEmpty())
+ qDebug() << "Scan returned" << scanned.size() << "networks";
+ else
+ qDebug() << "Scan returned nothing.";
+#endif
+ }
+ }
+
+ /* This is skipped in the first update as scanned size is zero */
+ if (!scanned.isEmpty()) {
+ for (int i=0; i<scanned.size(); ++i) {
+ const Maemo::IcdScanResult ap = scanned.at(i);
+
+ QByteArray scanned_ssid = ap.scan.network_id;
+
+ if (ap.scan.network_attrs & ICD_NW_ATTR_IAPNAME) {
+ /* The network_id is IAP id, so the IAP is a known one */
+ QString iapid = ap.scan.network_id.data();
+
+ previous.removeAll(iapid);
+
+ if (accessPointConfigurations.contains(iapid)) {
+ QNetworkConfigurationPrivatePointer ptr =
+ accessPointConfigurations.value(iapid);
+
+ bool changed = false;
+
+ if (!ptr->isValid) {
+ ptr->isValid = true;
+ changed = true;
+ }
+
+ if (ptr->state != QNetworkConfiguration::Discovered) {
+ ptr->state = QNetworkConfiguration::Discovered;
+ changed = true;
+ }
+
+ toIcdConfig(ptr)->network_attrs = ap.scan.network_attrs;
+ toIcdConfig(ptr)->service_id = ap.scan.service_id;
+ toIcdConfig(ptr)->service_type = ap.scan.service_type;
+ toIcdConfig(ptr)->service_attrs = ap.scan.service_attrs;
+
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("IAP: %s, ssid: %s, discovered",
+ iapid.toAscii().data(), scanned_ssid.data());
+#endif
+
+ if (changed)
+ emit configurationChanged(ptr);
+
+ if (!ap.scan.network_type.startsWith("WLAN"))
+ continue; // not a wlan AP
+ }
+ } else {
+ IcdNetworkConfigurationPrivate *cpPriv = new IcdNetworkConfigurationPrivate;
+
+ QString hrs = scanned_ssid.data();
+
+ cpPriv->name = ap.network_name.isEmpty() ? hrs : ap.network_name;
+ cpPriv->isValid = true;
+ // Note: id is now ssid, it should be set to IAP id if the IAP is saved
+ cpPriv->id = scanned_ssid.data();
+ cpPriv->network_id = scanned_ssid;
+ cpPriv->iap_type = ap.scan.network_type;
+ if (cpPriv->iap_type.isEmpty())
+ cpPriv->iap_type = QLatin1String("WLAN");
+ cpPriv->network_attrs = ap.scan.network_attrs;
+ cpPriv->service_id = ap.scan.service_id;
+ cpPriv->service_type = ap.scan.service_type;
+ cpPriv->service_attrs = ap.scan.service_attrs;
+
+ cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
+ cpPriv->state = QNetworkConfiguration::Undefined;
+
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "IAP with network id" << cpPriv->id << "was found in the scan.";
+#endif
+
+ previous.removeAll(cpPriv->id);
+
+ QNetworkConfigurationPrivatePointer ptr(cpPriv);
+ accessPointConfigurations.insert(ptr->id, ptr);
+ emit configurationAdded(ptr);
+ }
+ }
+ }
+
+ while (!previous.isEmpty()) {
+ QNetworkConfigurationPrivatePointer ptr =
+ accessPointConfigurations.take(previous.takeFirst());
+
+ emit configurationRemoved(ptr);
+ }
+
+ if (sender())
+ emit updateCompleted();
+}
+
+void QIcdEngine::deleteConfiguration(const QString &iap_id)
+{
+ QMutexLocker locker(&mutex);
+
+ /* Called when IAPs are deleted in db, in this case we do not scan
+ * or read all the IAPs from db because it might take too much power
+ * (multiple applications would need to scan and read all IAPs from db)
+ */
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.take(iap_id);
+ if (ptr) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "IAP" << iap_id << "was removed from storage.";
+#endif
+
+ emit configurationRemoved(ptr);
+ } else {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("IAP: %s, already missing from the known list", iap_id.toAscii().data());
+#endif
+ }
+}
+
+QNetworkConfigurationManager::Capabilities QIcdEngine::capabilities() const
+{
+ return QNetworkConfigurationManager::CanStartAndStopInterfaces |
+ QNetworkConfigurationManager::DataStatistics |
+ QNetworkConfigurationManager::ForcedRoaming;
+}
+
+QNetworkSessionPrivate *QIcdEngine::createSessionBackend()
+{
+ return new QNetworkSessionPrivateImpl(this);
+}
+
+QNetworkConfigurationPrivatePointer QIcdEngine::defaultConfiguration()
+{
+ QMutexLocker locker(&mutex);
+
+ // Here we just return [ANY] request to icd and let the icd decide which IAP to connect.
+ return userChoiceConfigurations.value(OSSO_IAP_ANY);
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/bearer/icd/qicdengine.h b/src/plugins/bearer/icd/qicdengine.h
new file mode 100644
index 0000000000..6ebe40d1b3
--- /dev/null
+++ b/src/plugins/bearer/icd/qicdengine.h
@@ -0,0 +1,130 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QICDENGINE_H
+#define QICDENGINE_H
+
+#include <QtNetwork/private/qbearerengine_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QNetworkConfigurationPrivate;
+class IapMonitor;
+
+class IcdNetworkConfigurationPrivate : public QNetworkConfigurationPrivate
+{
+public:
+ IcdNetworkConfigurationPrivate();
+ ~IcdNetworkConfigurationPrivate();
+
+ QString bearerName() const;
+
+ // In Maemo the id field (defined in QNetworkConfigurationPrivate)
+ // is the IAP id (which typically is UUID)
+ QByteArray network_id; // typically WLAN ssid or similar
+ QString iap_type; // is this one WLAN or GPRS
+
+ // Network attributes for this IAP, this is the value returned by icd and
+ // passed to it when connecting.
+ uint32_t network_attrs;
+
+ QString service_type;
+ QString service_id;
+ uint32_t service_attrs;
+};
+
+inline IcdNetworkConfigurationPrivate *toIcdConfig(QNetworkConfigurationPrivatePointer ptr)
+{
+ return static_cast<IcdNetworkConfigurationPrivate *>(ptr.data());
+}
+
+class QIcdEngine : public QBearerEngine
+{
+ Q_OBJECT
+
+public:
+ QIcdEngine(QObject *parent = 0);
+ ~QIcdEngine();
+
+ bool hasIdentifier(const QString &id);
+
+ void requestUpdate();
+
+ QNetworkConfigurationManager::Capabilities capabilities() const;
+
+ QNetworkSessionPrivate *createSessionBackend();
+
+ QNetworkConfigurationPrivatePointer defaultConfiguration();
+
+ void deleteConfiguration(const QString &iap_id);
+
+ inline QNetworkConfigurationPrivatePointer configuration(const QString &id)
+ {
+ QMutexLocker locker(&mutex);
+
+ return accessPointConfigurations.value(id);
+ }
+
+ inline void addSessionConfiguration(QNetworkConfigurationPrivatePointer ptr)
+ {
+ QMutexLocker locker(&mutex);
+
+ accessPointConfigurations.insert(ptr->id, ptr);
+ emit configurationAdded(ptr);
+ }
+
+ inline void changedSessionConfiguration(QNetworkConfigurationPrivatePointer ptr)
+ {
+ QMutexLocker locker(&mutex);
+
+ emit configurationChanged(ptr);
+ }
+
+private Q_SLOTS:
+ void doRequestUpdate();
+
+private:
+ IapMonitor *iapMonitor;
+};
+
+QT_END_NAMESPACE
+
+#endif // QICDENGINE_H
diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp
new file mode 100644
index 0000000000..bb81408adf
--- /dev/null
+++ b/src/plugins/bearer/icd/qnetworksession_impl.cpp
@@ -0,0 +1,1123 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qnetworksession_impl.h"
+#include "qicdengine.h"
+
+#include <QHash>
+
+#include <dbus/dbus.h>
+#include <dbus/dbus-glib-lowlevel.h>
+
+#include <maemo_icd.h>
+#include <iapconf.h>
+#include <proxyconf.h>
+
+#include <sys/types.h>
+#include <ifaddrs.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+QT_BEGIN_NAMESPACE
+
+static QHash<QString, QVariant> properties;
+
+static QString get_network_interface();
+static DBusConnection *dbus_connection;
+static DBusHandlerResult signal_handler(DBusConnection *connection,
+ DBusMessage *message,
+ void *user_data);
+
+#define ICD_DBUS_MATCH "type='signal'," \
+ "interface='" ICD_DBUS_INTERFACE "'," \
+ "path='" ICD_DBUS_PATH "'"
+
+
+static inline DBusConnection *get_dbus_conn(DBusError *error)
+{
+ DBusConnection *conn = dbus_bus_get(DBUS_BUS_SYSTEM, error);
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "Listening to bus" << dbus_bus_get_unique_name(conn);
+#endif
+
+ return conn;
+}
+
+
+/* Helper class that monitors the Icd status messages and
+ * can change the IAP status accordingly. This is a singleton.
+ */
+class IcdListener : public QObject
+{
+ Q_OBJECT
+
+public:
+ IcdListener() : first_call(true) { }
+ friend DBusHandlerResult signal_handler(DBusConnection *connection,
+ DBusMessage *message,
+ void *user_data);
+ void setup(QNetworkSessionPrivateImpl *d);
+ void cleanup();
+ void cleanupSession(QNetworkSessionPrivateImpl *ptr);
+
+ enum IapConnectionStatus {
+ /* The IAP was connected */
+ CONNECTED = 0,
+ /* The IAP was disconnected */
+ DISCONNECTED,
+ /* The IAP is disconnecting */
+ DISCONNECTING,
+ /* The IAP has a network address, but is not yet fully connected */
+ NETWORK_UP
+ };
+
+private:
+ void icdSignalReceived(QString&, QString&, QString&);
+ bool first_call;
+ QHash<QString, QNetworkSessionPrivateImpl *> sessions;
+};
+
+Q_GLOBAL_STATIC(IcdListener, icdListener);
+
+
+static DBusHandlerResult signal_handler(DBusConnection *,
+ DBusMessage *message,
+ void *user_data)
+{
+ if (dbus_message_is_signal(message,
+ ICD_DBUS_INTERFACE,
+ ICD_STATUS_CHANGED_SIG)) {
+
+ IcdListener *icd = (IcdListener *)user_data;
+ DBusError error;
+ dbus_error_init(&error);
+
+ char *iap_id = 0;
+ char *network_type = 0;
+ char *state = 0;
+
+ if (dbus_message_get_args(message, &error,
+ DBUS_TYPE_STRING, &iap_id,
+ DBUS_TYPE_STRING, &network_type,
+ DBUS_TYPE_STRING, &state,
+ DBUS_TYPE_INVALID) == FALSE) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << QString("Failed to parse icd status signal: %1").arg(error.message);
+#endif
+ } else {
+ QString _iap_id(iap_id);
+ QString _network_type(network_type);
+ QString _state(state);
+
+ icd->icdSignalReceived(_iap_id, _network_type, _state);
+ }
+
+ dbus_error_free(&error);
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+
+void IcdListener::setup(QNetworkSessionPrivateImpl *d)
+{
+ if (first_call) {
+ // We use the old Icd dbus interface like in ConIC
+ DBusError error;
+ dbus_error_init(&error);
+
+ dbus_connection = get_dbus_conn(&error);
+ if (dbus_error_is_set(&error)) {
+ dbus_error_free(&error);
+ return;
+ }
+
+ static struct DBusObjectPathVTable icd_vtable;
+ icd_vtable.message_function = signal_handler;
+
+ dbus_bus_add_match(dbus_connection, ICD_DBUS_MATCH, &error);
+ if (dbus_error_is_set(&error)) {
+ dbus_error_free(&error);
+ return;
+ }
+
+ if (dbus_connection_register_object_path(dbus_connection,
+ ICD_DBUS_PATH,
+ &icd_vtable,
+ (void*)this) == FALSE) {
+ dbus_error_free(&error);
+ return;
+ }
+
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "Listening" << ICD_STATUS_CHANGED_SIG << "signal from" << ICD_DBUS_SERVICE;
+#endif
+ first_call = false;
+ dbus_error_free(&error);
+ }
+
+ QString id = d->activeConfig.identifier();
+ if (!sessions.contains(id)) {
+ QNetworkSessionPrivateImpl *ptr = d;
+ sessions.insert(id, ptr);
+ }
+}
+
+
+void IcdListener::icdSignalReceived(QString& iap_id,
+#ifdef BEARER_MANAGEMENT_DEBUG
+ QString& network_type,
+#else
+ QString&,
+#endif
+ QString& state)
+{
+ if (iap_id == OSSO_IAP_SCAN) // icd sends scan status signals which we will ignore
+ return;
+
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "Status received:" << iap_id << "type" << network_type << "state" << state;
+#endif
+
+ if (!sessions.contains(iap_id)) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "No session for IAP" << iap_id;
+#endif
+ return;
+ }
+
+ QNetworkSessionPrivateImpl *session = sessions.value(iap_id);
+ QNetworkConfiguration ap_conf =
+ QNetworkConfigurationManager().configurationFromIdentifier(iap_id);
+ if (!ap_conf.isValid()) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "Unknown IAP" << iap_id;
+#endif
+ return;
+ }
+
+ IapConnectionStatus status;
+
+ if (state == "IDLE") {
+ status = DISCONNECTED;
+ } else if (state == "CONNECTED") {
+ status = CONNECTED;
+ } else if (state == "NETWORKUP") {
+ status = NETWORK_UP;
+ } else {
+ //qDebug() << "Unknown state" << state;
+ return;
+ }
+
+ if (status == DISCONNECTED) {
+ if (ap_conf.state() == QNetworkConfiguration::Active) {
+ /* The IAP was just disconnected by Icd */
+ session->updateState(QNetworkSession::Disconnected);
+ } else {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "Got a network disconnect when in state" << ap_conf.state();
+#endif
+ }
+ } else if (status == CONNECTED) {
+ /* The IAP was just connected by Icd */
+ session->updateState(QNetworkSession::Connected);
+ session->updateIdentifier(iap_id);
+
+ if (session->publicConfig.identifier() == OSSO_IAP_ANY) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "IAP" << iap_id << "connected when connecting to" << OSSO_IAP_ANY;
+#endif
+ } else {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "IAP" << iap_id << "connected";
+#endif
+ }
+ }
+
+ return;
+}
+
+
+void IcdListener::cleanup()
+{
+ if (!first_call) {
+ dbus_bus_remove_match(dbus_connection, ICD_DBUS_MATCH, NULL);
+ dbus_connection_unref(dbus_connection);
+ }
+}
+
+
+void IcdListener::cleanupSession(QNetworkSessionPrivateImpl *ptr)
+{
+ if (ptr->publicConfig.type() == QNetworkConfiguration::UserChoice)
+ (void)sessions.take(ptr->activeConfig.identifier());
+ else
+ (void)sessions.take(ptr->publicConfig.identifier());
+}
+
+
+void QNetworkSessionPrivateImpl::cleanupSession(void)
+{
+ icdListener()->cleanupSession(this);
+
+ QObject::disconnect(q, SIGNAL(stateChanged(QNetworkSession::State)), this, SLOT(updateProxies(QNetworkSession::State)));
+}
+
+
+void QNetworkSessionPrivateImpl::updateState(QNetworkSession::State newState)
+{
+ if (newState == state)
+ return;
+
+ state = newState;
+
+ if (state == QNetworkSession::Disconnected) {
+ isOpen = false;
+ currentNetworkInterface.clear();
+ if (publicConfig.type() == QNetworkConfiguration::UserChoice)
+ privateConfiguration(activeConfig)->state = QNetworkConfiguration::Defined;
+ privateConfiguration(publicConfig)->state = QNetworkConfiguration::Defined;
+
+ } else if (state == QNetworkSession::Connected) {
+ isOpen = true;
+ if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
+ privateConfiguration(activeConfig)->state = QNetworkConfiguration::Active;
+ privateConfiguration(activeConfig)->type = QNetworkConfiguration::InternetAccessPoint;
+ }
+ privateConfiguration(publicConfig)->state = QNetworkConfiguration::Active;
+ }
+
+ emit stateChanged(newState);
+}
+
+
+void QNetworkSessionPrivateImpl::updateIdentifier(QString &newId)
+{
+ if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
+ toIcdConfig(privateConfiguration(activeConfig))->network_attrs |= ICD_NW_ATTR_IAPNAME;
+ privateConfiguration(activeConfig)->id = newId;
+ } else {
+ toIcdConfig(privateConfiguration(publicConfig))->network_attrs |= ICD_NW_ATTR_IAPNAME;
+ if (privateConfiguration(publicConfig)->id != newId) {
+ privateConfiguration(publicConfig)->id = newId;
+ }
+ }
+}
+
+
+quint64 QNetworkSessionPrivateImpl::getStatistics(bool sent) const
+{
+ /* This could be also implemented by using the Maemo::Icd::statistics()
+ * that gets the statistics data for a specific IAP. Change if
+ * necessary.
+ */
+ Maemo::Icd icd;
+ QList<Maemo::IcdStatisticsResult> stats_results;
+ quint64 counter_rx = 0, counter_tx = 0;
+
+ if (!icd.statistics(stats_results)) {
+ return 0;
+ }
+
+ foreach (Maemo::IcdStatisticsResult res, stats_results) {
+ if (res.params.network_attrs & ICD_NW_ATTR_IAPNAME) {
+ /* network_id is the IAP UUID */
+ if (QString(res.params.network_id.data()) == activeConfig.identifier()) {
+ counter_tx = res.bytes_sent;
+ counter_rx = res.bytes_received;
+ }
+ } else {
+ /* We probably will never get to this branch */
+ if (res.params.network_id == toIcdConfig(privateConfiguration(activeConfig))->network_id) {
+ counter_tx = res.bytes_sent;
+ counter_rx = res.bytes_received;
+ }
+ }
+ }
+
+ if (sent)
+ return counter_tx;
+ else
+ return counter_rx;
+}
+
+
+quint64 QNetworkSessionPrivateImpl::bytesWritten() const
+{
+ return getStatistics(true);
+}
+
+quint64 QNetworkSessionPrivateImpl::bytesReceived() const
+{
+ return getStatistics(false);
+}
+
+quint64 QNetworkSessionPrivateImpl::activeTime() const
+{
+ if (startTime.isNull()) {
+ return 0;
+ }
+ return startTime.secsTo(QDateTime::currentDateTime());
+}
+
+
+QNetworkConfiguration& QNetworkSessionPrivateImpl::copyConfig(QNetworkConfiguration &fromConfig,
+ QNetworkConfiguration &toConfig,
+ bool deepCopy)
+{
+ IcdNetworkConfigurationPrivate *cpPriv;
+ if (deepCopy) {
+ cpPriv = new IcdNetworkConfigurationPrivate;
+ setPrivateConfiguration(toConfig, QNetworkConfigurationPrivatePointer(cpPriv));
+ } else {
+ cpPriv = toIcdConfig(privateConfiguration(toConfig));
+ }
+
+ cpPriv->name = privateConfiguration(fromConfig)->name;
+ cpPriv->isValid = privateConfiguration(fromConfig)->isValid;
+ // Note that we do not copy id field here as the publicConfig does
+ // not contain a valid IAP id.
+ cpPriv->state = privateConfiguration(fromConfig)->state;
+ cpPriv->type = privateConfiguration(fromConfig)->type;
+ cpPriv->roamingSupported = privateConfiguration(fromConfig)->roamingSupported;
+ cpPriv->purpose = privateConfiguration(fromConfig)->purpose;
+ cpPriv->network_id = toIcdConfig(privateConfiguration(fromConfig))->network_id;
+ cpPriv->iap_type = toIcdConfig(privateConfiguration(fromConfig))->iap_type;
+ cpPriv->network_attrs = toIcdConfig(privateConfiguration(fromConfig))->network_attrs;
+ cpPriv->service_type = toIcdConfig(privateConfiguration(fromConfig))->service_type;
+ cpPriv->service_id = toIcdConfig(privateConfiguration(fromConfig))->service_id;
+ cpPriv->service_attrs = toIcdConfig(privateConfiguration(fromConfig))->service_attrs;
+
+ return toConfig;
+}
+
+
+/* This is called by QNetworkSession constructor and it updates the current
+ * state of the configuration.
+ */
+void QNetworkSessionPrivateImpl::syncStateWithInterface()
+{
+ /* Start to listen Icd status messages. */
+ icdListener()->setup(this);
+
+ /* Initially we are not active although the configuration might be in
+ * connected state.
+ */
+ isOpen = false;
+ opened = false;
+
+ connect(&manager, SIGNAL(updateCompleted()), this, SLOT(networkConfigurationsChanged()));
+
+ connect(&manager, SIGNAL(configurationChanged(QNetworkConfiguration)),
+ this, SLOT(configurationChanged(QNetworkConfiguration)));
+
+ QObject::connect(q, SIGNAL(stateChanged(QNetworkSession::State)), this, SLOT(updateProxies(QNetworkSession::State)));
+
+ state = QNetworkSession::Invalid;
+ lastError = QNetworkSession::UnknownSessionError;
+
+ switch (publicConfig.type()) {
+ case QNetworkConfiguration::InternetAccessPoint:
+ activeConfig = publicConfig;
+ break;
+ case QNetworkConfiguration::ServiceNetwork:
+ serviceConfig = publicConfig;
+ break;
+ case QNetworkConfiguration::UserChoice:
+ // active config will contain correct data after open() has succeeded
+ copyConfig(publicConfig, activeConfig);
+
+ /* We create new configuration that holds the actual configuration
+ * returned by icd. This way publicConfig still contains the
+ * original user specified configuration.
+ *
+ * Note that the new activeConfig configuration is not inserted
+ * to configurationManager as manager class will get the newly
+ * connected configuration from gconf when the IAP is saved.
+ * This configuration manager update is done by IapMonitor class.
+ * If the ANY connection fails in open(), then the configuration
+ * data is not saved to gconf and will not be added to
+ * configuration manager IAP list.
+ */
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug()<<"New configuration created for" << publicConfig.identifier();
+#endif
+ break;
+ default:
+ /* Invalid configuration, no point continuing */
+ return;
+ }
+
+ if (!activeConfig.isValid())
+ return;
+
+ /* Get the initial state from icd */
+ Maemo::Icd icd;
+ QList<Maemo::IcdStateResult> state_results;
+
+ /* Update the active config from first connection, this is ok as icd
+ * supports only one connection anyway.
+ */
+ if (icd.state(state_results) && !state_results.isEmpty()) {
+
+ /* If we did not get full state back, then we are not
+ * connected and can skip the next part.
+ */
+ if (!(state_results.first().params.network_attrs == 0 &&
+ state_results.first().params.network_id.isEmpty())) {
+
+ /* If we try to connect to specific IAP and we get results back
+ * that tell the icd is actually connected to another IAP,
+ * then do not update current state etc.
+ */
+ if (publicConfig.type() == QNetworkConfiguration::UserChoice ||
+ privateConfiguration(publicConfig)->id == state_results.first().params.network_id) {
+
+ switch (state_results.first().state) {
+ case ICD_STATE_DISCONNECTED:
+ state = QNetworkSession::Disconnected;
+ if (privateConfiguration(activeConfig))
+ privateConfiguration(activeConfig)->isValid = true;
+ break;
+ case ICD_STATE_CONNECTING:
+ state = QNetworkSession::Connecting;
+ if (privateConfiguration(activeConfig))
+ privateConfiguration(activeConfig)->isValid = true;
+ break;
+ case ICD_STATE_CONNECTED:
+ {
+ if (!state_results.first().error.isEmpty())
+ break;
+
+ const QString id = state_results.first().params.network_id;
+
+ QNetworkConfiguration config = manager.configurationFromIdentifier(id);
+ if (config.isValid()) {
+ //we don't want the copied data if the config is already known by the manager
+ //just reuse it so that existing references to the old data get the same update
+ setPrivateConfiguration(activeConfig, privateConfiguration(config));
+ }
+
+ QNetworkConfigurationPrivatePointer ptr = privateConfiguration(activeConfig);
+
+ state = QNetworkSession::Connected;
+ toIcdConfig(ptr)->network_id = state_results.first().params.network_id;
+ ptr->id = toIcdConfig(ptr)->network_id;
+ toIcdConfig(ptr)->network_attrs = state_results.first().params.network_attrs;
+ toIcdConfig(ptr)->iap_type = state_results.first().params.network_type;
+ toIcdConfig(ptr)->service_type = state_results.first().params.service_type;
+ toIcdConfig(ptr)->service_id = state_results.first().params.service_id;
+ toIcdConfig(ptr)->service_attrs = state_results.first().params.service_attrs;
+ ptr->type = QNetworkConfiguration::InternetAccessPoint;
+ ptr->state = QNetworkConfiguration::Active;
+ ptr->isValid = true;
+ currentNetworkInterface = get_network_interface();
+
+ Maemo::IAPConf iap_name(privateConfiguration(activeConfig)->id);
+ QString name_value = iap_name.value("name").toString();
+ if (!name_value.isEmpty())
+ privateConfiguration(activeConfig)->name = name_value;
+ else
+ privateConfiguration(activeConfig)->name = privateConfiguration(activeConfig)->id;
+
+
+ // Add the new active configuration to manager or update the old config
+ if (!engine->hasIdentifier(privateConfiguration(activeConfig)->id))
+ engine->addSessionConfiguration(privateConfiguration(activeConfig));
+ else
+ engine->changedSessionConfiguration(privateConfiguration(activeConfig));
+ }
+ break;
+
+ case ICD_STATE_DISCONNECTING:
+ state = QNetworkSession::Closing;
+ if (privateConfiguration(activeConfig))
+ privateConfiguration(activeConfig)->isValid = true;
+ break;
+ default:
+ break;
+ }
+ }
+ } else {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "status_req tells icd is not connected";
+#endif
+ }
+ } else {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "status_req did not return any results from icd";
+#endif
+ }
+
+ networkConfigurationsChanged();
+}
+
+
+void QNetworkSessionPrivateImpl::networkConfigurationsChanged()
+{
+ if (serviceConfig.isValid())
+ updateStateFromServiceNetwork();
+ else
+ updateStateFromActiveConfig();
+}
+
+
+void QNetworkSessionPrivateImpl::updateStateFromServiceNetwork()
+{
+ QNetworkSession::State oldState = state;
+
+ foreach (const QNetworkConfiguration &config, serviceConfig.children()) {
+ if ((config.state() & QNetworkConfiguration::Active) != QNetworkConfiguration::Active)
+ continue;
+
+ if (activeConfig != config) {
+ activeConfig = config;
+ emit newConfigurationActivated();
+ }
+
+ state = QNetworkSession::Connected;
+ if (state != oldState)
+ emit stateChanged(state);
+
+ return;
+ }
+
+ if (serviceConfig.children().isEmpty())
+ state = QNetworkSession::NotAvailable;
+ else
+ state = QNetworkSession::Disconnected;
+
+ if (state != oldState)
+ emit stateChanged(state);
+}
+
+
+void QNetworkSessionPrivateImpl::clearConfiguration(QNetworkConfiguration &config)
+{
+ toIcdConfig(privateConfiguration(config))->network_id.clear();
+ toIcdConfig(privateConfiguration(config))->iap_type.clear();
+ toIcdConfig(privateConfiguration(config))->network_attrs = 0;
+ toIcdConfig(privateConfiguration(config))->service_type.clear();
+ toIcdConfig(privateConfiguration(config))->service_id.clear();
+ toIcdConfig(privateConfiguration(config))->service_attrs = 0;
+}
+
+
+void QNetworkSessionPrivateImpl::updateStateFromActiveConfig()
+{
+ QNetworkSession::State oldState = state;
+
+ bool newActive = false;
+
+ if (!privateConfiguration(activeConfig))
+ return;
+
+ if (!activeConfig.isValid()) {
+ state = QNetworkSession::Invalid;
+ clearConfiguration(activeConfig);
+ } else if ((activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
+ state = QNetworkSession::Connected;
+ newActive = opened;
+ } else if ((activeConfig.state() & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered) {
+ state = QNetworkSession::Disconnected;
+ } else if ((activeConfig.state() & QNetworkConfiguration::Defined) == QNetworkConfiguration::Defined) {
+ state = QNetworkSession::NotAvailable;
+ } else if ((activeConfig.state() & QNetworkConfiguration::Undefined) == QNetworkConfiguration::Undefined) {
+ state = QNetworkSession::NotAvailable;
+ //clearConfiguration(activeConfig);
+ }
+
+ bool oldActive = isOpen;
+ isOpen = newActive;
+
+ if (!oldActive && isOpen)
+ emit quitPendingWaitsForOpened();
+
+ if (oldActive && !isOpen)
+ emit closed();
+
+ if (oldState != state) {
+ emit stateChanged(state);
+
+ if (state == QNetworkSession::Disconnected) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ //qDebug()<<"session aborted error emitted for"<<activeConfig.identifier();
+#endif
+ lastError = QNetworkSession::SessionAbortedError;
+ emit QNetworkSessionPrivate::error(lastError);
+ }
+ }
+
+#ifdef BEARER_MANAGEMENT_DEBUG
+ //qDebug()<<"oldState ="<<oldState<<" state ="<<state<<" oldActive ="<<oldActive<<" newActive ="<<newActive<<" opened ="<<opened;
+#endif
+}
+
+
+void QNetworkSessionPrivateImpl::configurationChanged(const QNetworkConfiguration &config)
+{
+ if (serviceConfig.isValid() && (config == serviceConfig || config == activeConfig))
+ updateStateFromServiceNetwork();
+ else if (config == activeConfig)
+ updateStateFromActiveConfig();
+}
+
+
+static QString get_network_interface()
+{
+ Maemo::Icd icd;
+ QList<Maemo::IcdAddressInfoResult> addr_results;
+ uint ret;
+ QString iface;
+
+ ret = icd.addrinfo(addr_results);
+ if (ret == 0) {
+ /* No results */
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "Cannot get addrinfo from icd, are you connected or is icd running?";
+#endif
+ return iface;
+ }
+
+ const char *address = addr_results.first().ip_info.first().address.toAscii().constData();
+ struct in_addr addr;
+ if (inet_aton(address, &addr) == 0) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "address" << address << "invalid";
+#endif
+ return iface;
+ }
+
+ struct ifaddrs *ifaddr, *ifa;
+ int family;
+
+ if (getifaddrs(&ifaddr) == -1) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "getifaddrs() failed";
+#endif
+ return iface;
+ }
+
+ for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
+ family = ifa->ifa_addr->sa_family;
+ if (family != AF_INET) {
+ continue; /* Currently only IPv4 is supported by icd dbus interface */
+ }
+ if (((struct sockaddr_in *)ifa->ifa_addr)->sin_addr.s_addr == addr.s_addr) {
+ iface = QString(ifa->ifa_name);
+ break;
+ }
+ }
+
+ freeifaddrs(ifaddr);
+ return iface;
+}
+
+
+void QNetworkSessionPrivateImpl::open()
+{
+ if (serviceConfig.isValid()) {
+ lastError = QNetworkSession::OperationNotSupportedError;
+ emit QNetworkSessionPrivate::error(lastError);
+ } else if (!isOpen) {
+
+ if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
+ /* Caller is trying to connect to default IAP.
+ * At this time we will not know the IAP details so we just
+ * connect and update the active config when the IAP is
+ * connected.
+ */
+ opened = true;
+ state = QNetworkSession::Connecting;
+ emit stateChanged(state);
+ QTimer::singleShot(0, this, SLOT(do_open()));
+ return;
+ }
+
+ /* User is connecting to one specific IAP. If that IAP is not
+ * in discovered state we cannot continue.
+ */
+ if ((activeConfig.state() & QNetworkConfiguration::Discovered) !=
+ QNetworkConfiguration::Discovered) {
+ lastError =QNetworkSession::InvalidConfigurationError;
+ emit QNetworkSessionPrivate::error(lastError);
+ return;
+ }
+ opened = true;
+
+ if ((activeConfig.state() & QNetworkConfiguration::Active) != QNetworkConfiguration::Active) {
+ state = QNetworkSession::Connecting;
+ emit stateChanged(state);
+
+ QTimer::singleShot(0, this, SLOT(do_open()));
+ return;
+ }
+
+ isOpen = (activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active;
+ if (isOpen)
+ emit quitPendingWaitsForOpened();
+ } else {
+ /* We seem to be active so inform caller */
+ emit quitPendingWaitsForOpened();
+ }
+}
+
+
+void QNetworkSessionPrivateImpl::do_open()
+{
+ icd_connection_flags flags = connectFlags;
+ bool st;
+ QString result;
+ QString iap = publicConfig.identifier();
+
+ if (state == QNetworkSession::Connected) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "Already connected to" << activeConfig.identifier();
+#endif
+ emit stateChanged(QNetworkSession::Connected);
+ emit quitPendingWaitsForOpened();
+ return;
+ }
+
+ Maemo::IcdConnectResult connect_result;
+ Maemo::Icd icd(ICD_LONG_CONNECT_TIMEOUT);
+ QNetworkConfiguration config;
+ if (publicConfig.type() == QNetworkConfiguration::UserChoice)
+ config = activeConfig;
+ else
+ config = publicConfig;
+
+ if (iap == OSSO_IAP_ANY) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "connecting to default IAP" << iap;
+#endif
+ st = icd.connect(flags, connect_result);
+
+ } else {
+
+ QList<Maemo::ConnectParams> params;
+ Maemo::ConnectParams param;
+ param.connect.service_type = toIcdConfig(privateConfiguration(config))->service_type;
+ param.connect.service_attrs = toIcdConfig(privateConfiguration(config))->service_attrs;
+ param.connect.service_id = toIcdConfig(privateConfiguration(config))->service_id;
+ param.connect.network_type = toIcdConfig(privateConfiguration(config))->iap_type;
+ param.connect.network_attrs = toIcdConfig(privateConfiguration(config))->network_attrs;
+ if (toIcdConfig(privateConfiguration(config))->network_attrs & ICD_NW_ATTR_IAPNAME)
+ param.connect.network_id = QByteArray(iap.toLatin1());
+ else
+ param.connect.network_id = toIcdConfig(privateConfiguration(config))->network_id;
+ params.append(param);
+
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("connecting to %s/%s/0x%x/%s/0x%x/%s",
+ param.connect.network_id.data(),
+ param.connect.network_type.toAscii().constData(),
+ param.connect.network_attrs,
+ param.connect.service_type.toAscii().constData(),
+ param.connect.service_attrs,
+ param.connect.service_id.toAscii().constData());
+#endif
+ st = icd.connect(flags, params, connect_result);
+ }
+
+ if (st) {
+ result = connect_result.connect.network_id.data();
+ QString connected_iap = result;
+
+ if (connected_iap.isEmpty()) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "connect to"<< iap << "failed, result is empty";
+#endif
+ updateState(QNetworkSession::Disconnected);
+ emit QNetworkSessionPrivate::error(QNetworkSession::InvalidConfigurationError);
+ if (publicConfig.type() == QNetworkConfiguration::UserChoice)
+ cleanupAnyConfiguration();
+ return;
+ }
+
+ /* If the user tried to connect to some specific connection (foo)
+ * and we were already connected to some other connection (bar),
+ * then we cannot activate this session although icd has a valid
+ * connection to somewhere.
+ */
+ if ((publicConfig.type() != QNetworkConfiguration::UserChoice) &&
+ (connected_iap != config.identifier())) {
+ updateState(QNetworkSession::Disconnected);
+ emit QNetworkSessionPrivate::error(QNetworkSession::InvalidConfigurationError);
+ return;
+ }
+
+
+ /* Did we connect to non saved IAP? */
+ if (!(toIcdConfig(privateConfiguration(config))->network_attrs & ICD_NW_ATTR_IAPNAME)) {
+ /* Because the connection succeeded, the IAP is now known.
+ */
+ toIcdConfig(privateConfiguration(config))->network_attrs |= ICD_NW_ATTR_IAPNAME;
+ privateConfiguration(config)->id = connected_iap;
+ }
+
+ /* User might have changed the IAP name when a new IAP was saved */
+ Maemo::IAPConf iap_name(privateConfiguration(config)->id);
+ QString name = iap_name.value("name").toString();
+ if (!name.isEmpty())
+ privateConfiguration(config)->name = name;
+
+ toIcdConfig(privateConfiguration(config))->iap_type = connect_result.connect.network_type;
+
+ privateConfiguration(config)->isValid = true;
+ privateConfiguration(config)->state = QNetworkConfiguration::Active;
+ privateConfiguration(config)->type = QNetworkConfiguration::InternetAccessPoint;
+
+ startTime = QDateTime::currentDateTime();
+ updateState(QNetworkSession::Connected);
+
+ currentNetworkInterface = get_network_interface();
+
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "connected to" << result << config.name() << "at" << currentNetworkInterface;
+#endif
+
+ /* We first check if the configuration already exists in the manager
+ * and if it is not found there, we then insert it. Note that this
+ * is only done for user choice config only because it can be missing
+ * from config manager list.
+ */
+
+ if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
+ if (!engine->hasIdentifier(result)) {
+ engine->addSessionConfiguration(privateConfiguration(config));
+ } else {
+ QNetworkConfigurationPrivatePointer priv = engine->configuration(result);
+ QNetworkConfiguration reference;
+ setPrivateConfiguration(reference, priv);
+ copyConfig(config, reference, false);
+ config = reference;
+ activeConfig = reference;
+ engine->changedSessionConfiguration(privateConfiguration(config));
+ }
+ }
+
+ emit quitPendingWaitsForOpened();
+
+ } else {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "connect to"<< iap << "failed, status:" << connect_result.status;
+#endif
+ updateState(QNetworkSession::Disconnected);
+ if (publicConfig.type() == QNetworkConfiguration::UserChoice)
+ cleanupAnyConfiguration();
+ emit QNetworkSessionPrivate::error(QNetworkSession::UnknownSessionError);
+ }
+}
+
+
+void QNetworkSessionPrivateImpl::cleanupAnyConfiguration()
+{
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug()<<"Removing configuration created for" << activeConfig.identifier();
+#endif
+ activeConfig = publicConfig;
+}
+
+
+void QNetworkSessionPrivateImpl::close()
+{
+ if (serviceConfig.isValid()) {
+ lastError = QNetworkSession::OperationNotSupportedError;
+ emit QNetworkSessionPrivate::error(lastError);
+ } else if (isOpen) {
+ opened = false;
+ isOpen = false;
+ emit closed();
+ }
+}
+
+
+void QNetworkSessionPrivateImpl::stop()
+{
+ if (serviceConfig.isValid()) {
+ lastError = QNetworkSession::OperationNotSupportedError;
+ emit QNetworkSessionPrivate::error(lastError);
+ } else {
+ if ((activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
+ state = QNetworkSession::Closing;
+ emit stateChanged(state);
+
+ Maemo::Icd icd;
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "stopping session" << publicConfig.identifier();
+#endif
+ icd.disconnect(ICD_CONNECTION_FLAG_APPLICATION_EVENT);
+ startTime = QDateTime();
+
+ /* Note that the state will go disconnected in
+ * updateStateFromActiveConfig() which gets called after
+ * configurationChanged is emitted (below).
+ */
+
+ privateConfiguration(activeConfig)->state = QNetworkConfiguration::Discovered;
+ engine->changedSessionConfiguration(privateConfiguration(activeConfig));
+
+ opened = false;
+ isOpen = false;
+
+ } else {
+ opened = false;
+ isOpen = false;
+ emit closed();
+ }
+ }
+}
+
+
+void QNetworkSessionPrivateImpl::migrate()
+{
+}
+
+
+void QNetworkSessionPrivateImpl::accept()
+{
+}
+
+
+void QNetworkSessionPrivateImpl::ignore()
+{
+}
+
+
+void QNetworkSessionPrivateImpl::reject()
+{
+}
+
+
+QNetworkInterface QNetworkSessionPrivateImpl::currentInterface() const
+{
+ if (!publicConfig.isValid() || state != QNetworkSession::Connected)
+ return QNetworkInterface();
+
+ if (currentNetworkInterface.isEmpty())
+ return QNetworkInterface();
+
+ return QNetworkInterface::interfaceFromName(currentNetworkInterface);
+}
+
+
+void QNetworkSessionPrivateImpl::setSessionProperty(const QString& key, const QVariant& value)
+{
+ if (value.isValid()) {
+ properties.insert(key, value);
+
+ if (key == "ConnectInBackground") {
+ bool v = value.toBool();
+ if (v)
+ connectFlags = ICD_CONNECTION_FLAG_APPLICATION_EVENT;
+ else
+ connectFlags = ICD_CONNECTION_FLAG_USER_EVENT;
+ }
+ } else {
+ properties.remove(key);
+
+ /* Set default value when property is removed */
+ if (key == "ConnectInBackground")
+ connectFlags = ICD_CONNECTION_FLAG_USER_EVENT;
+ }
+}
+
+
+QVariant QNetworkSessionPrivateImpl::sessionProperty(const QString& key) const
+{
+ return properties.value(key);
+}
+
+
+QString QNetworkSessionPrivateImpl::errorString() const
+{
+ QString errorStr;
+ switch(q->error()) {
+ case QNetworkSession::RoamingError:
+ errorStr = QNetworkSessionPrivateImpl::tr("Roaming error");
+ break;
+ case QNetworkSession::SessionAbortedError:
+ errorStr = QNetworkSessionPrivateImpl::tr("Session aborted by user or system");
+ break;
+ default:
+ case QNetworkSession::UnknownSessionError:
+ errorStr = QNetworkSessionPrivateImpl::tr("Unidentified Error");
+ break;
+ }
+ return errorStr;
+}
+
+
+QNetworkSession::SessionError QNetworkSessionPrivateImpl::error() const
+{
+ return QNetworkSession::UnknownSessionError;
+}
+
+void QNetworkSessionPrivateImpl::updateProxies(QNetworkSession::State newState)
+{
+ if ((newState == QNetworkSession::Connected) &&
+ (newState != currentState))
+ updateProxyInformation();
+ else if ((newState == QNetworkSession::Disconnected) &&
+ (currentState == QNetworkSession::Closing))
+ clearProxyInformation();
+
+ currentState = newState;
+}
+
+
+void QNetworkSessionPrivateImpl::updateProxyInformation()
+{
+ Maemo::ProxyConf::update();
+}
+
+
+void QNetworkSessionPrivateImpl::clearProxyInformation()
+{
+ Maemo::ProxyConf::clear();
+}
+
+#include "qnetworksession_impl.moc"
+
+QT_END_NAMESPACE
diff --git a/src/plugins/bearer/icd/qnetworksession_impl.h b/src/plugins/bearer/icd/qnetworksession_impl.h
new file mode 100644
index 0000000000..587e6dc97a
--- /dev/null
+++ b/src/plugins/bearer/icd/qnetworksession_impl.h
@@ -0,0 +1,152 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QNETWORKSESSION_IMPL_H
+#define QNETWORKSESSION_IMPL_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of the QLibrary class. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtNetwork/private/qnetworksession_p.h>
+#include <QtNetwork/qnetworkconfigmanager.h>
+
+//#include "qnetworkconfigmanager_maemo_p.h"
+//#include "qnetworksession.h"
+
+//#include <qnetworksession.h>
+//#include <QNetworkInterface>
+#include <QtCore/qdatetime.h>
+
+#include <icd/dbus_api.h>
+
+QT_BEGIN_NAMESPACE
+
+class QIcdEngine;
+
+class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate
+{
+ Q_OBJECT
+
+public:
+ QNetworkSessionPrivateImpl(QIcdEngine *engine)
+ : engine(engine), connectFlags(ICD_CONNECTION_FLAG_USER_EVENT), currentState(QNetworkSession::Invalid)
+ {
+ }
+
+ ~QNetworkSessionPrivateImpl()
+ {
+ cleanupSession();
+ }
+
+ //called by QNetworkSession constructor and ensures
+ //that the state is immediately updated (w/o actually opening
+ //a session). Also this function should take care of
+ //notification hooks to discover future state changes.
+ void syncStateWithInterface();
+
+ QNetworkInterface currentInterface() const;
+ QVariant sessionProperty(const QString& key) const;
+ void setSessionProperty(const QString& key, const QVariant& value);
+
+ void open();
+ void close();
+ void stop();
+
+ void migrate();
+ void accept();
+ void ignore();
+ void reject();
+
+ QString errorString() const; //must return translated string
+ QNetworkSession::SessionError error() const;
+
+ quint64 bytesWritten() const;
+ quint64 bytesReceived() const;
+ quint64 activeTime() const;
+
+private:
+ void updateStateFromServiceNetwork();
+ void updateStateFromActiveConfig();
+
+private Q_SLOTS:
+ void do_open();
+ void networkConfigurationsChanged();
+ void configurationChanged(const QNetworkConfiguration &config);
+ void updateProxies(QNetworkSession::State newState);
+
+private:
+ QNetworkConfigurationManager manager;
+ QIcdEngine *engine;
+
+ QNetworkConfiguration& copyConfig(QNetworkConfiguration &fromConfig, QNetworkConfiguration &toConfig, bool deepCopy = true);
+ void clearConfiguration(QNetworkConfiguration &config);
+ void cleanupAnyConfiguration();
+
+ bool opened;
+ icd_connection_flags connectFlags;
+
+ QNetworkSession::SessionError lastError;
+
+ QDateTime startTime;
+ QString currentNetworkInterface;
+ friend class IcdListener;
+ void updateState(QNetworkSession::State);
+ void updateIdentifier(QString &newId);
+ quint64 getStatistics(bool sent) const;
+ void cleanupSession(void);
+
+ void updateProxyInformation();
+ void clearProxyInformation();
+ QNetworkSession::State currentState;
+};
+
+QT_END_NAMESPACE
+
+#endif //QNETWORKSESSIONPRIVATE_H
+
diff --git a/src/plugins/bearer/nativewifi/main.cpp b/src/plugins/bearer/nativewifi/main.cpp
new file mode 100644
index 0000000000..d77462e6bc
--- /dev/null
+++ b/src/plugins/bearer/nativewifi/main.cpp
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qnativewifiengine.h"
+#include "platformdefs.h"
+
+#include <QtCore/qmutex.h>
+#include <QtCore/private/qmutexpool_p.h>
+#include <QtCore/qlibrary.h>
+
+#include <QtNetwork/private/qbearerplugin_p.h>
+
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+static void resolveLibrary()
+{
+ static volatile bool triedResolve = false;
+
+ if (!triedResolve) {
+#ifndef QT_NO_THREAD
+ QMutexLocker locker(QMutexPool::globalInstanceGet(&local_WlanOpenHandle));
+#endif
+
+ if (!triedResolve) {
+ local_WlanOpenHandle = (WlanOpenHandleProto)
+ QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanOpenHandle");
+ local_WlanRegisterNotification = (WlanRegisterNotificationProto)
+ QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanRegisterNotification");
+ local_WlanEnumInterfaces = (WlanEnumInterfacesProto)
+ QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanEnumInterfaces");
+ local_WlanGetAvailableNetworkList = (WlanGetAvailableNetworkListProto)
+ QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanGetAvailableNetworkList");
+ local_WlanQueryInterface = (WlanQueryInterfaceProto)
+ QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanQueryInterface");
+ local_WlanConnect = (WlanConnectProto)
+ QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanConnect");
+ local_WlanDisconnect = (WlanDisconnectProto)
+ QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanDisconnect");
+ local_WlanScan = (WlanScanProto)
+ QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanScan");
+ local_WlanFreeMemory = (WlanFreeMemoryProto)
+ QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanFreeMemory");
+ local_WlanCloseHandle = (WlanCloseHandleProto)
+ QLibrary::resolve(QLatin1String("wlanapi.dll"), "WlanCloseHandle");
+
+ triedResolve = true;
+ }
+ }
+}
+
+class QNativeWifiEnginePlugin : public QBearerEnginePlugin
+{
+public:
+ QNativeWifiEnginePlugin();
+ ~QNativeWifiEnginePlugin();
+
+ QStringList keys() const;
+ QBearerEngine *create(const QString &key) const;
+};
+
+QNativeWifiEnginePlugin::QNativeWifiEnginePlugin()
+{
+}
+
+QNativeWifiEnginePlugin::~QNativeWifiEnginePlugin()
+{
+}
+
+QStringList QNativeWifiEnginePlugin::keys() const
+{
+ return QStringList() << QLatin1String("nativewifi");
+}
+
+QBearerEngine *QNativeWifiEnginePlugin::create(const QString &key) const
+{
+ if (key != QLatin1String("nativewifi"))
+ return 0;
+
+ resolveLibrary();
+
+ // native wifi dll not available
+ if (!local_WlanOpenHandle)
+ return 0;
+
+ QNativeWifiEngine *engine = new QNativeWifiEngine;
+
+ // could not initialise subsystem
+ if (engine && !engine->available()) {
+ delete engine;
+ return 0;
+ }
+
+ return engine;
+}
+
+Q_EXPORT_STATIC_PLUGIN(QNativeWifiEnginePlugin)
+Q_EXPORT_PLUGIN2(qnativewifibearer, QNativeWifiEnginePlugin)
+
+QT_END_NAMESPACE
diff --git a/src/plugins/bearer/nativewifi/nativewifi.pro b/src/plugins/bearer/nativewifi/nativewifi.pro
new file mode 100644
index 0000000000..f277a0459e
--- /dev/null
+++ b/src/plugins/bearer/nativewifi/nativewifi.pro
@@ -0,0 +1,17 @@
+TARGET = qnativewifibearer
+include(../../qpluginbase.pri)
+
+QT += network
+
+HEADERS += qnativewifiengine.h \
+ platformdefs.h \
+ ../qnetworksession_impl.h \
+ ../qbearerengine_impl.h
+
+SOURCES += main.cpp \
+ qnativewifiengine.cpp \
+ ../qnetworksession_impl.cpp
+
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer
+target.path += $$[QT_INSTALL_PLUGINS]/bearer
+INSTALLS += target
diff --git a/src/plugins/bearer/nativewifi/platformdefs.h b/src/plugins/bearer/nativewifi/platformdefs.h
new file mode 100644
index 0000000000..57ae852aa6
--- /dev/null
+++ b/src/plugins/bearer/nativewifi/platformdefs.h
@@ -0,0 +1,322 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PLATFORMDEFS_H
+#define PLATFORMDEFS_H
+
+#include <wtypes.h>
+#undef interface
+
+#define WLAN_MAX_NAME_LENGTH 256
+#define WLAN_MAX_PHY_TYPE_NUMBER 8
+#define WLAN_NOTIFICATION_SOURCE_ALL 0x0000ffff
+#define WLAN_AVAILABLE_NETWORK_CONNECTED 1
+#define WLAN_AVAILABLE_NETWORK_HAS_PROFILE 2
+#define DOT11_SSID_MAX_LENGTH 32
+
+struct WLAN_NOTIFICATION_DATA {
+ DWORD NotificationSource;
+ DWORD NotificationCode;
+ GUID InterfaceGuid;
+ DWORD dwDataSize;
+ PVOID pData;
+};
+
+enum WLAN_INTERFACE_STATE {
+ wlan_interface_state_not_ready = 0,
+ wlan_interface_state_connected,
+ wlan_interface_state_ad_hoc_network_formed,
+ wlan_interface_state_disconnecting,
+ wlan_interface_state_disconnected,
+ wlan_interface_state_associating,
+ wlan_interface_state_discovering,
+ wlan_interface_state_authenticating
+};
+
+struct WLAN_INTERFACE_INFO {
+ GUID InterfaceGuid;
+ WCHAR strInterfaceDescription[WLAN_MAX_NAME_LENGTH];
+ WLAN_INTERFACE_STATE isState;
+};
+
+struct WLAN_INTERFACE_INFO_LIST {
+ DWORD dwNumberOfItems;
+ DWORD dwIndex;
+ WLAN_INTERFACE_INFO InterfaceInfo[1];
+};
+
+struct DOT11_SSID {
+ ULONG uSSIDLength;
+ UCHAR ucSSID[DOT11_SSID_MAX_LENGTH];
+};
+
+struct NDIS_OBJECT_HEADER {
+ UCHAR Type;
+ UCHAR Revision;
+ USHORT Size;
+};
+
+typedef UCHAR DOT11_MAC_ADDRESS[6];
+struct DOT11_BSSID_LIST {
+ NDIS_OBJECT_HEADER Header;
+ ULONG uNumberOfEntries;
+ ULONG uTotalNumOfEntries;
+ DOT11_MAC_ADDRESS BSSIDs[1];
+};
+
+enum DOT11_BSS_TYPE {
+ dot11_BSS_type_infrastructure = 1,
+ dot11_BSS_type_independent = 2,
+ dot11_BSS_type_any = 3
+};
+
+enum DOT11_PHY_TYPE {
+ dot11_phy_type_unknown = 0,
+ dot11_phy_type_any = dot11_phy_type_unknown,
+ dot11_phy_type_fhss = 1,
+ dot11_phy_type_dsss = 2,
+ dot11_phy_type_irbaseband = 3,
+ dot11_phy_type_ofdm = 4,
+ dot11_phy_type_hrdsss = 5,
+ dot11_phy_type_erp = 6,
+ dot11_phy_type_ht = 7,
+ dot11_phy_type_IHV_start = 0x80000000,
+ dot11_phy_type_IHV_end = 0xffffffff
+};
+
+enum DOT11_AUTH_ALGORITHM {
+ DOT11_AUTH_ALGO_80211_OPEN = 1,
+ DOT11_AUTH_ALGO_80211_SHARED_KEY = 2,
+ DOT11_AUTH_ALGO_WPA = 3,
+ DOT11_AUTH_ALGO_WPA_PSK = 4,
+ DOT11_AUTH_ALGO_WPA_NONE = 5,
+ DOT11_AUTH_ALGO_RSNA = 6,
+ DOT11_AUTH_ALGO_RSNA_PSK = 7,
+ DOT11_AUTH_ALGO_IHV_START = 0x80000000,
+ DOT11_AUTH_ALGO_IHV_END = 0xffffffff
+};
+
+enum DOT11_CIPHER_ALGORITHM {
+ DOT11_CIPHER_ALGO_NONE = 0x00,
+ DOT11_CIPHER_ALGO_WEP40 = 0x01,
+ DOT11_CIPHER_ALGO_TKIP = 0x02,
+ DOT11_CIPHER_ALGO_CCMP = 0x04,
+ DOT11_CIPHER_ALGO_WEP104 = 0x05,
+ DOT11_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
+ DOT11_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
+ DOT11_CIPHER_ALGO_WEP = 0x101,
+ DOT11_CIPHER_ALGO_IHV_START = 0x80000000,
+ DOT11_CIPHER_ALGO_IHV_END = 0xffffffff
+};
+
+struct WLAN_AVAILABLE_NETWORK {
+ WCHAR strProfileName[WLAN_MAX_NAME_LENGTH];
+ DOT11_SSID dot11Ssid;
+ DOT11_BSS_TYPE dot11BssType;
+ ULONG uNumberOfBssids;
+ BOOL bNetworkConnectable;
+ DWORD wlanNotConnectableReason;
+ ULONG uNumberOfPhyTypes;
+ DOT11_PHY_TYPE dot11PhyTypes[WLAN_MAX_PHY_TYPE_NUMBER];
+ BOOL bMorePhyTypes;
+ ULONG wlanSignalQuality;
+ BOOL bSecurityEnabled;
+ DOT11_AUTH_ALGORITHM dot11DefaultAuthAlgorithm;
+ DOT11_CIPHER_ALGORITHM dot11DefaultCipherAlgorithm;
+ DWORD dwFlags;
+ DWORD dwReserved;
+};
+
+struct WLAN_AVAILABLE_NETWORK_LIST {
+ DWORD dwNumberOfItems;
+ DWORD dwIndex;
+ WLAN_AVAILABLE_NETWORK Network[1];
+};
+
+enum WLAN_INTF_OPCODE {
+ wlan_intf_opcode_autoconf_start = 0x000000000,
+ wlan_intf_opcode_autoconf_enabled,
+ wlan_intf_opcode_background_scan_enabled,
+ wlan_intf_opcode_media_streaming_mode,
+ wlan_intf_opcode_radio_state,
+ wlan_intf_opcode_bss_type,
+ wlan_intf_opcode_interface_state,
+ wlan_intf_opcode_current_connection,
+ wlan_intf_opcode_channel_number,
+ wlan_intf_opcode_supported_infrastructure_auth_cipher_pairs,
+ wlan_intf_opcode_supported_adhoc_auth_cipher_pairs,
+ wlan_intf_opcode_supported_country_or_region_string_list,
+ wlan_intf_opcode_current_operation_mode,
+ wlan_intf_opcode_supported_safe_mode,
+ wlan_intf_opcode_certified_safe_mode,
+ wlan_intf_opcode_autoconf_end = 0x0fffffff,
+ wlan_intf_opcode_msm_start = 0x10000100,
+ wlan_intf_opcode_statistics,
+ wlan_intf_opcode_rssi,
+ wlan_intf_opcode_msm_end = 0x1fffffff,
+ wlan_intf_opcode_security_start = 0x20010000,
+ wlan_intf_opcode_security_end = 0x2fffffff,
+ wlan_intf_opcode_ihv_start = 0x30000000,
+ wlan_intf_opcode_ihv_end = 0x3fffffff
+};
+
+enum WLAN_OPCODE_VALUE_TYPE {
+ wlan_opcode_value_type_query_only = 0,
+ wlan_opcode_value_type_set_by_group_policy,
+ wlan_opcode_value_type_set_by_user,
+ wlan_opcode_value_type_invalid
+};
+
+enum WLAN_CONNECTION_MODE {
+ wlan_connection_mode_profile = 0,
+ wlan_connection_mode_temporary_profile,
+ wlan_connection_mode_discovery_secure,
+ wlan_connection_mode_discovery_unsecure,
+ wlan_connection_mode_auto,
+ wlan_connection_mode_invalid
+};
+
+struct WLAN_CONNECTION_PARAMETERS {
+ WLAN_CONNECTION_MODE wlanConnectionMode;
+ LPCWSTR strProfile;
+ DOT11_SSID *pDot11Ssid;
+ DOT11_BSSID_LIST *pDesiredBssidList;
+ DOT11_BSS_TYPE dot11BssType;
+ DWORD dwFlags;
+};
+
+struct WLAN_RAW_DATA {
+ DWORD dwDataSize;
+ BYTE DataBlob[1];
+};
+
+enum WLAN_NOTIFICATION_ACM {
+ wlan_notification_acm_start = 0,
+ wlan_notification_acm_autoconf_enabled,
+ wlan_notification_acm_autoconf_disabled,
+ wlan_notification_acm_background_scan_enabled,
+ wlan_notification_acm_background_scan_disabled,
+ wlan_notification_acm_bss_type_change,
+ wlan_notification_acm_power_setting_change,
+ wlan_notification_acm_scan_complete,
+ wlan_notification_acm_scan_fail,
+ wlan_notification_acm_connection_start,
+ wlan_notification_acm_connection_complete,
+ wlan_notification_acm_connection_attempt_fail,
+ wlan_notification_acm_filter_list_change,
+ wlan_notification_acm_interface_arrival,
+ wlan_notification_acm_interface_removal,
+ wlan_notification_acm_profile_change,
+ wlan_notification_acm_profile_name_change,
+ wlan_notification_acm_profiles_exhausted,
+ wlan_notification_acm_network_not_available,
+ wlan_notification_acm_network_available,
+ wlan_notification_acm_disconnecting,
+ wlan_notification_acm_disconnected,
+ wlan_notification_acm_adhoc_network_state_change,
+ wlan_notification_acm_end
+};
+
+struct WLAN_ASSOCIATION_ATTRIBUTES {
+ DOT11_SSID dot11Ssid;
+ DOT11_BSS_TYPE dot11BssType;
+ DOT11_MAC_ADDRESS dot11Bssid;
+ DOT11_PHY_TYPE dot11PhyType;
+ ULONG uDot11PhyIndex;
+ ULONG wlanSignalQuality;
+ ULONG ulRxRate;
+ ULONG ulTxRate;
+};
+
+struct WLAN_SECURITY_ATTRIBUTES {
+ BOOL bSecurityEnabled;
+ BOOL bOneXEnabled;
+ DOT11_AUTH_ALGORITHM dot11AuthAlgorithm;
+ DOT11_CIPHER_ALGORITHM dot11CipherAlgorithm;
+};
+
+struct WLAN_CONNECTION_ATTRIBUTES {
+ WLAN_INTERFACE_STATE isState;
+ WLAN_CONNECTION_MODE wlanConnectionMode;
+ WCHAR strProfileName[WLAN_MAX_NAME_LENGTH];
+ WLAN_ASSOCIATION_ATTRIBUTES wlanAssociationAttributes;
+ WLAN_SECURITY_ATTRIBUTES wlanSecurityAttributes;
+};
+
+typedef void (WINAPI *WLAN_NOTIFICATION_CALLBACK)(WLAN_NOTIFICATION_DATA *, PVOID);
+
+typedef DWORD (WINAPI *WlanOpenHandleProto)
+ (DWORD dwClientVersion, PVOID pReserved, PDWORD pdwNegotiatedVersion, PHANDLE phClientHandle);
+typedef DWORD (WINAPI *WlanRegisterNotificationProto)
+ (HANDLE hClientHandle, DWORD dwNotifSource, BOOL bIgnoreDuplicate,
+ WLAN_NOTIFICATION_CALLBACK funcCallback, PVOID pCallbackContext,
+ PVOID pReserved, PDWORD pdwPrevNotifSource);
+typedef DWORD (WINAPI *WlanEnumInterfacesProto)
+ (HANDLE hClientHandle, PVOID pReserved, WLAN_INTERFACE_INFO_LIST **ppInterfaceList);
+typedef DWORD (WINAPI *WlanGetAvailableNetworkListProto)
+ (HANDLE hClientHandle, const GUID* pInterfaceGuid, DWORD dwFlags, PVOID pReserved,
+ WLAN_AVAILABLE_NETWORK_LIST **ppAvailableNetworkList);
+typedef DWORD (WINAPI *WlanQueryInterfaceProto)
+ (HANDLE hClientHandle, const GUID *pInterfaceGuid, WLAN_INTF_OPCODE OpCode, PVOID pReserved,
+ PDWORD pdwDataSize, PVOID *ppData, WLAN_OPCODE_VALUE_TYPE *pWlanOpcodeValueType);
+typedef DWORD (WINAPI *WlanConnectProto)
+ (HANDLE hClientHandle, const GUID *pInterfaceGuid,
+ const WLAN_CONNECTION_PARAMETERS *pConnectionParameters, PVOID pReserved);
+typedef DWORD (WINAPI *WlanDisconnectProto)
+ (HANDLE hClientHandle, const GUID *pInterfaceGuid, PVOID pReserved);
+typedef DWORD (WINAPI *WlanScanProto)
+ (HANDLE hClientHandle, const GUID *pInterfaceGuid, const DOT11_SSID *pDot11Ssid,
+ const WLAN_RAW_DATA *pIeData, PVOID pReserved);
+typedef VOID (WINAPI *WlanFreeMemoryProto)(PVOID pMemory);
+typedef DWORD (WINAPI *WlanCloseHandleProto)(HANDLE hClientHandle, PVOID pReserved);
+
+extern WlanOpenHandleProto local_WlanOpenHandle;
+extern WlanRegisterNotificationProto local_WlanRegisterNotification;
+extern WlanEnumInterfacesProto local_WlanEnumInterfaces;
+extern WlanGetAvailableNetworkListProto local_WlanGetAvailableNetworkList;
+extern WlanQueryInterfaceProto local_WlanQueryInterface;
+extern WlanConnectProto local_WlanConnect;
+extern WlanDisconnectProto local_WlanDisconnect;
+extern WlanScanProto local_WlanScan;
+extern WlanFreeMemoryProto local_WlanFreeMemory;
+extern WlanCloseHandleProto local_WlanCloseHandle;
+
+#endif // PLATFORMDEFS_H
diff --git a/src/plugins/bearer/nativewifi/qnativewifiengine.cpp b/src/plugins/bearer/nativewifi/qnativewifiengine.cpp
new file mode 100644
index 0000000000..b6522ada7b
--- /dev/null
+++ b/src/plugins/bearer/nativewifi/qnativewifiengine.cpp
@@ -0,0 +1,541 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qnativewifiengine.h"
+#include "platformdefs.h"
+#include "../qnetworksession_impl.h"
+
+#include <QtNetwork/private/qnetworkconfiguration_p.h>
+
+#include <QtCore/qstringlist.h>
+
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+WlanOpenHandleProto local_WlanOpenHandle = 0;
+WlanRegisterNotificationProto local_WlanRegisterNotification = 0;
+WlanEnumInterfacesProto local_WlanEnumInterfaces = 0;
+WlanGetAvailableNetworkListProto local_WlanGetAvailableNetworkList = 0;
+WlanQueryInterfaceProto local_WlanQueryInterface = 0;
+WlanConnectProto local_WlanConnect = 0;
+WlanDisconnectProto local_WlanDisconnect = 0;
+WlanScanProto local_WlanScan = 0;
+WlanFreeMemoryProto local_WlanFreeMemory = 0;
+WlanCloseHandleProto local_WlanCloseHandle = 0;
+
+void qNotificationCallback(WLAN_NOTIFICATION_DATA *data, QNativeWifiEngine *d)
+{
+ Q_UNUSED(d);
+
+ switch (data->NotificationCode) {
+ case wlan_notification_acm_connection_complete:
+ case wlan_notification_acm_disconnected:
+ QMetaObject::invokeMethod(d, "scanComplete", Qt::QueuedConnection);
+ break;
+ default:
+ ;
+ }
+}
+
+QNativeWifiEngine::QNativeWifiEngine(QObject *parent)
+: QBearerEngineImpl(parent), handle(0)
+{
+ DWORD clientVersion;
+
+ DWORD result = local_WlanOpenHandle(1, 0, &clientVersion, &handle);
+ if (result != ERROR_SUCCESS) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ if (result != ERROR_SERVICE_NOT_ACTIVE)
+ qDebug("%s: WlanOpenHandle failed with error %ld\n", __FUNCTION__, result);
+#endif
+
+ return;
+ }
+
+ result = local_WlanRegisterNotification(handle, WLAN_NOTIFICATION_SOURCE_ALL, true,
+ WLAN_NOTIFICATION_CALLBACK(qNotificationCallback),
+ this, 0, 0);
+#ifdef BEARER_MANAGEMENT_DEBUG
+ if (result != ERROR_SUCCESS)
+ qDebug("%s: WlanRegisterNotification failed with error %ld\n", __FUNCTION__, result);
+#endif
+
+ scanComplete();
+}
+
+QNativeWifiEngine::~QNativeWifiEngine()
+{
+ local_WlanCloseHandle(handle, 0);
+}
+
+void QNativeWifiEngine::scanComplete()
+{
+ QMutexLocker locker(&mutex);
+
+ // enumerate interfaces
+ WLAN_INTERFACE_INFO_LIST *interfaceList;
+ DWORD result = local_WlanEnumInterfaces(handle, 0, &interfaceList);
+ if (result != ERROR_SUCCESS) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("%s: WlanEnumInterfaces failed with error %ld\n", __FUNCTION__, result);
+#endif
+
+ locker.unlock();
+ emit updateCompleted();
+
+ return;
+ }
+
+ QStringList previous = accessPointConfigurations.keys();
+
+ for (unsigned int i = 0; i < interfaceList->dwNumberOfItems; ++i) {
+ const WLAN_INTERFACE_INFO &interface = interfaceList->InterfaceInfo[i];
+
+ WLAN_AVAILABLE_NETWORK_LIST *networkList;
+ result = local_WlanGetAvailableNetworkList(handle, &interface.InterfaceGuid,
+ 3, 0, &networkList);
+ if (result != ERROR_SUCCESS) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("%s: WlanGetAvailableNetworkList failed with error %ld\n",
+ __FUNCTION__, result);
+#endif
+ continue;
+ }
+
+ QStringList seenNetworks;
+
+ for (unsigned int j = 0; j < networkList->dwNumberOfItems; ++j) {
+ WLAN_AVAILABLE_NETWORK &network = networkList->Network[j];
+
+ QString networkName;
+
+ if (network.strProfileName[0] != 0) {
+ networkName = QString::fromWCharArray(network.strProfileName);
+ } else {
+ networkName = QByteArray(reinterpret_cast<char *>(network.dot11Ssid.ucSSID),
+ network.dot11Ssid.uSSIDLength);
+ }
+
+ const QString id = QString::number(qHash(QLatin1String("WLAN:") + networkName));
+
+ previous.removeAll(id);
+
+ QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined;
+
+ if (!(network.dwFlags & WLAN_AVAILABLE_NETWORK_HAS_PROFILE))
+ state = QNetworkConfiguration::Undefined;
+
+ if (network.strProfileName[0] != 0) {
+ if (network.bNetworkConnectable) {
+ if (network.dwFlags & WLAN_AVAILABLE_NETWORK_CONNECTED)
+ state = QNetworkConfiguration::Active;
+ else
+ state = QNetworkConfiguration::Discovered;
+ } else {
+ state = QNetworkConfiguration::Defined;
+ }
+ }
+
+ if (seenNetworks.contains(networkName))
+ continue;
+ else
+ seenNetworks.append(networkName);
+
+ if (accessPointConfigurations.contains(id)) {
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+
+ bool changed = false;
+
+ if (!ptr->isValid) {
+ ptr->isValid = true;
+ changed = true;
+ }
+
+ if (ptr->name != networkName) {
+ ptr->name = networkName;
+ changed = true;
+ }
+
+ if (ptr->state != state) {
+ ptr->state = state;
+ changed = true;
+ }
+
+ if (changed)
+ emit configurationChanged(ptr);
+ } else {
+ QNetworkConfigurationPrivatePointer ptr(new QNetworkConfigurationPrivate);
+
+ ptr->name = networkName;
+ ptr->isValid = true;
+ ptr->id = id;
+ ptr->state = state;
+ ptr->type = QNetworkConfiguration::InternetAccessPoint;
+ ptr->bearer = QLatin1String("WLAN");
+
+ accessPointConfigurations.insert(id, ptr);
+
+ emit configurationAdded(ptr);
+ }
+ }
+
+ local_WlanFreeMemory(networkList);
+ }
+
+ local_WlanFreeMemory(interfaceList);
+
+ while (!previous.isEmpty()) {
+ QNetworkConfigurationPrivatePointer ptr =
+ accessPointConfigurations.take(previous.takeFirst());
+
+ emit configurationRemoved(ptr);
+ }
+
+ emit updateCompleted();
+}
+
+QString QNativeWifiEngine::getInterfaceFromId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ // enumerate interfaces
+ WLAN_INTERFACE_INFO_LIST *interfaceList;
+ DWORD result = local_WlanEnumInterfaces(handle, 0, &interfaceList);
+ if (result != ERROR_SUCCESS) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("%s: WlanEnumInterfaces failed with error %ld\n", __FUNCTION__, result);
+#endif
+ return QString();
+ }
+
+ for (unsigned int i = 0; i < interfaceList->dwNumberOfItems; ++i) {
+ const WLAN_INTERFACE_INFO &interface = interfaceList->InterfaceInfo[i];
+
+ DWORD dataSize;
+ WLAN_CONNECTION_ATTRIBUTES *connectionAttributes;
+ result = local_WlanQueryInterface(handle, &interface.InterfaceGuid,
+ wlan_intf_opcode_current_connection, 0, &dataSize,
+ reinterpret_cast<PVOID *>(&connectionAttributes), 0);
+ if (result != ERROR_SUCCESS) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ if (result != ERROR_INVALID_STATE)
+ qDebug("%s: WlanQueryInterface failed with error %ld\n", __FUNCTION__, result);
+#endif
+
+ continue;
+ }
+
+ if (qHash(QLatin1String("WLAN:") +
+ QString::fromWCharArray(connectionAttributes->strProfileName)) == id.toUInt()) {
+ QString guid("{%1-%2-%3-%4%5-%6%7%8%9%10%11}");
+
+ guid = guid.arg(interface.InterfaceGuid.Data1, 8, 16, QChar('0'));
+ guid = guid.arg(interface.InterfaceGuid.Data2, 4, 16, QChar('0'));
+ guid = guid.arg(interface.InterfaceGuid.Data3, 4, 16, QChar('0'));
+ for (int i = 0; i < 8; ++i)
+ guid = guid.arg(interface.InterfaceGuid.Data4[i], 2, 16, QChar('0'));
+
+ local_WlanFreeMemory(connectionAttributes);
+ local_WlanFreeMemory(interfaceList);
+
+ return guid.toUpper();
+ }
+
+ local_WlanFreeMemory(connectionAttributes);
+ }
+
+ local_WlanFreeMemory(interfaceList);
+
+ return QString();
+}
+
+bool QNativeWifiEngine::hasIdentifier(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ // enumerate interfaces
+ WLAN_INTERFACE_INFO_LIST *interfaceList;
+ DWORD result = local_WlanEnumInterfaces(handle, 0, &interfaceList);
+ if (result != ERROR_SUCCESS) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("%s: WlanEnumInterfaces failed with error %ld\n", __FUNCTION__, result);
+#endif
+ return false;
+ }
+
+ for (unsigned int i = 0; i < interfaceList->dwNumberOfItems; ++i) {
+ const WLAN_INTERFACE_INFO &interface = interfaceList->InterfaceInfo[i];
+
+ WLAN_AVAILABLE_NETWORK_LIST *networkList;
+ result = local_WlanGetAvailableNetworkList(handle, &interface.InterfaceGuid,
+ 3, 0, &networkList);
+ if (result != ERROR_SUCCESS) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("%s: WlanGetAvailableNetworkList failed with error %ld\n",
+ __FUNCTION__, result);
+#endif
+ continue;
+ }
+
+ for (unsigned int j = 0; j < networkList->dwNumberOfItems; ++j) {
+ WLAN_AVAILABLE_NETWORK &network = networkList->Network[j];
+
+ QString networkName;
+
+ if (network.strProfileName[0] != 0) {
+ networkName = QString::fromWCharArray(network.strProfileName);
+ } else {
+ networkName = QByteArray(reinterpret_cast<char *>(network.dot11Ssid.ucSSID),
+ network.dot11Ssid.uSSIDLength);
+ }
+
+ if (qHash(QLatin1String("WLAN:") + networkName) == id.toUInt()) {
+ local_WlanFreeMemory(networkList);
+ local_WlanFreeMemory(interfaceList);
+ return true;
+ }
+ }
+
+ local_WlanFreeMemory(networkList);
+ }
+
+ local_WlanFreeMemory(interfaceList);
+
+ return false;
+}
+
+/*QString QNativeWifiEngine::bearerName(const QString &)
+{
+ return QLatin1String("WLAN");
+}*/
+
+void QNativeWifiEngine::connectToId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ WLAN_INTERFACE_INFO_LIST *interfaceList;
+ DWORD result = local_WlanEnumInterfaces(handle, 0, &interfaceList);
+ if (result != ERROR_SUCCESS) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("%s: WlanEnumInterfaces failed with error %ld\n", __FUNCTION__, result);
+#endif
+ emit connectionError(id, InterfaceLookupError);
+ return;
+ }
+
+ QString profile;
+
+ for (unsigned int i = 0; i < interfaceList->dwNumberOfItems; ++i) {
+ const WLAN_INTERFACE_INFO &interface = interfaceList->InterfaceInfo[i];
+
+ WLAN_AVAILABLE_NETWORK_LIST *networkList;
+ result = local_WlanGetAvailableNetworkList(handle, &interface.InterfaceGuid,
+ 3, 0, &networkList);
+ if (result != ERROR_SUCCESS) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("%s: WlanGetAvailableNetworkList failed with error %ld\n",
+ __FUNCTION__, result);
+#endif
+ continue;
+ }
+
+ for (unsigned int j = 0; j < networkList->dwNumberOfItems; ++j) {
+ WLAN_AVAILABLE_NETWORK &network = networkList->Network[j];
+
+ profile = QString::fromWCharArray(network.strProfileName);
+
+ if (qHash(QLatin1String("WLAN:") + profile) == id.toUInt())
+ break;
+ else
+ profile.clear();
+ }
+
+ local_WlanFreeMemory(networkList);
+
+ if (!profile.isEmpty()) {
+ WLAN_CONNECTION_PARAMETERS parameters;
+ parameters.wlanConnectionMode = wlan_connection_mode_profile;
+ parameters.strProfile = reinterpret_cast<LPCWSTR>(profile.utf16());
+ parameters.pDot11Ssid = 0;
+ parameters.pDesiredBssidList = 0;
+ parameters.dot11BssType = dot11_BSS_type_any;
+ parameters.dwFlags = 0;
+
+ DWORD result = local_WlanConnect(handle, &interface.InterfaceGuid, &parameters, 0);
+ if (result != ERROR_SUCCESS) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("%s: WlanConnect failed with error %ld\n", __FUNCTION__, result);
+#endif
+ emit connectionError(id, ConnectError);
+ break;
+ }
+
+ break;
+ }
+ }
+
+ local_WlanFreeMemory(interfaceList);
+
+ if (profile.isEmpty())
+ emit connectionError(id, InterfaceLookupError);
+}
+
+void QNativeWifiEngine::disconnectFromId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ QString interface = getInterfaceFromId(id);
+
+ if (interface.isEmpty()) {
+ emit connectionError(id, InterfaceLookupError);
+ return;
+ }
+
+ QStringList split = interface.mid(1, interface.length() - 2).split('-');
+
+ GUID guid;
+ guid.Data1 = split.at(0).toUInt(0, 16);
+ guid.Data2 = split.at(1).toUShort(0, 16);
+ guid.Data3 = split.at(2).toUShort(0, 16);
+ guid.Data4[0] = split.at(3).left(2).toUShort(0, 16);
+ guid.Data4[1] = split.at(3).right(2).toUShort(0, 16);
+ for (int i = 0; i < 6; ++i)
+ guid.Data4[i + 2] = split.at(4).mid(i*2, 2).toUShort(0, 16);
+
+ DWORD result = local_WlanDisconnect(handle, &guid, 0);
+ if (result != ERROR_SUCCESS) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("%s: WlanDisconnect failed with error %ld\n", __FUNCTION__, result);
+#endif
+ emit connectionError(id, DisconnectionError);
+ return;
+ }
+}
+
+void QNativeWifiEngine::requestUpdate()
+{
+ QMutexLocker locker(&mutex);
+
+ // enumerate interfaces
+ WLAN_INTERFACE_INFO_LIST *interfaceList;
+ DWORD result = local_WlanEnumInterfaces(handle, 0, &interfaceList);
+ if (result != ERROR_SUCCESS) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("%s: WlanEnumInterfaces failed with error %ld\n", __FUNCTION__, result);
+#endif
+
+ locker.unlock();
+ emit updateCompleted();
+
+ return;
+ }
+
+ bool requested = false;
+ for (unsigned int i = 0; i < interfaceList->dwNumberOfItems; ++i) {
+ result = local_WlanScan(handle, &interfaceList->InterfaceInfo[i].InterfaceGuid, 0, 0, 0);
+ if (result != ERROR_SUCCESS) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("%s: WlanScan failed with error %ld\n", __FUNCTION__, result);
+#endif
+ } else {
+ requested = true;
+ }
+ }
+
+ local_WlanFreeMemory(interfaceList);
+
+ if (!requested) {
+ locker.unlock();
+ emit updateCompleted();
+ }
+}
+
+QNetworkSession::State QNativeWifiEngine::sessionStateForId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+
+ if (!ptr)
+ return QNetworkSession::Invalid;
+
+ if (!ptr->isValid) {
+ return QNetworkSession::Invalid;
+ } else if ((ptr->state & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
+ return QNetworkSession::Connected;
+ } else if ((ptr->state & QNetworkConfiguration::Discovered) ==
+ QNetworkConfiguration::Discovered) {
+ return QNetworkSession::Disconnected;
+ } else if ((ptr->state & QNetworkConfiguration::Defined) == QNetworkConfiguration::Defined) {
+ return QNetworkSession::NotAvailable;
+ } else if ((ptr->state & QNetworkConfiguration::Undefined) ==
+ QNetworkConfiguration::Undefined) {
+ return QNetworkSession::NotAvailable;
+ }
+
+ return QNetworkSession::Invalid;
+}
+
+QNetworkConfigurationManager::Capabilities QNativeWifiEngine::capabilities() const
+{
+ return QNetworkConfigurationManager::ForcedRoaming |
+ QNetworkConfigurationManager::CanStartAndStopInterfaces;
+}
+
+QNetworkSessionPrivate *QNativeWifiEngine::createSessionBackend()
+{
+ return new QNetworkSessionPrivateImpl;
+}
+
+QNetworkConfigurationPrivatePointer QNativeWifiEngine::defaultConfiguration()
+{
+ return QNetworkConfigurationPrivatePointer();
+}
+
+bool QNativeWifiEngine::requiresPolling() const
+{
+ // On Windows XP SP2 and SP3 only connection and disconnection notifications are available.
+ // We need to poll for changes in available wireless networks.
+ return true;
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/bearer/nativewifi/qnativewifiengine.h b/src/plugins/bearer/nativewifi/qnativewifiengine.h
new file mode 100644
index 0000000000..56489b6dd3
--- /dev/null
+++ b/src/plugins/bearer/nativewifi/qnativewifiengine.h
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QNATIVEWIFIENGINE_P_H
+#define QNATIVEWIFIENGINE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "../qbearerengine_impl.h"
+
+#include <QtCore/qtimer.h>
+
+QT_BEGIN_NAMESPACE
+
+class QNetworkConfigurationPrivate;
+struct WLAN_NOTIFICATION_DATA;
+
+class QNativeWifiEngine : public QBearerEngineImpl
+{
+ Q_OBJECT
+
+public:
+ QNativeWifiEngine(QObject *parent = 0);
+ ~QNativeWifiEngine();
+
+ QString getInterfaceFromId(const QString &id);
+ bool hasIdentifier(const QString &id);
+
+ //QString bearerName(const QString &id);
+
+ void connectToId(const QString &id);
+ void disconnectFromId(const QString &id);
+
+ void requestUpdate();
+
+ QNetworkSession::State sessionStateForId(const QString &id);
+
+ QNetworkConfigurationManager::Capabilities capabilities() const;
+
+ QNetworkSessionPrivate *createSessionBackend();
+
+ QNetworkConfigurationPrivatePointer defaultConfiguration();
+
+ inline bool available() const { return handle != 0; }
+
+ bool requiresPolling() const;
+
+public Q_SLOTS:
+ void scanComplete();
+
+private:
+ Qt::HANDLE handle;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/plugins/bearer/networkmanager/main.cpp b/src/plugins/bearer/networkmanager/main.cpp
new file mode 100644
index 0000000000..6c97a22ae7
--- /dev/null
+++ b/src/plugins/bearer/networkmanager/main.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qnetworkmanagerengine.h"
+
+#include <QtNetwork/private/qbearerplugin_p.h>
+
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+class QNetworkManagerEnginePlugin : public QBearerEnginePlugin
+{
+public:
+ QNetworkManagerEnginePlugin();
+ ~QNetworkManagerEnginePlugin();
+
+ QStringList keys() const;
+ QBearerEngine *create(const QString &key) const;
+};
+
+QNetworkManagerEnginePlugin::QNetworkManagerEnginePlugin()
+{
+}
+
+QNetworkManagerEnginePlugin::~QNetworkManagerEnginePlugin()
+{
+}
+
+QStringList QNetworkManagerEnginePlugin::keys() const
+{
+ return QStringList() << QLatin1String("networkmanager");
+}
+
+QBearerEngine *QNetworkManagerEnginePlugin::create(const QString &key) const
+{
+ if (key == QLatin1String("networkmanager")) {
+ QNetworkManagerEngine *engine = new QNetworkManagerEngine;
+ if (engine->networkManagerAvailable())
+ return engine;
+ else
+ delete engine;
+ }
+
+ return 0;
+}
+
+Q_EXPORT_STATIC_PLUGIN(QNetworkManagerEnginePlugin)
+Q_EXPORT_PLUGIN2(qnmbearer, QNetworkManagerEnginePlugin)
+
+QT_END_NAMESPACE
diff --git a/src/plugins/bearer/networkmanager/networkmanager.pro b/src/plugins/bearer/networkmanager/networkmanager.pro
new file mode 100644
index 0000000000..bf0d29a7bc
--- /dev/null
+++ b/src/plugins/bearer/networkmanager/networkmanager.pro
@@ -0,0 +1,20 @@
+TARGET = qnmbearer
+include(../../qpluginbase.pri)
+
+QT += network dbus
+
+HEADERS += qnmdbushelper.h \
+ qnetworkmanagerservice.h \
+ qnetworkmanagerengine.h \
+ ../qnetworksession_impl.h \
+ ../qbearerengine_impl.h
+
+SOURCES += main.cpp \
+ qnmdbushelper.cpp \
+ qnetworkmanagerservice.cpp \
+ qnetworkmanagerengine.cpp \
+ ../qnetworksession_impl.cpp
+
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer
+target.path += $$[QT_INSTALL_PLUGINS]/bearer
+INSTALLS += target
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
new file mode 100644
index 0000000000..0fa8f3cf11
--- /dev/null
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
@@ -0,0 +1,846 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qnetworkmanagerengine.h"
+#include "qnetworkmanagerservice.h"
+#include "../qnetworksession_impl.h"
+
+#include <QtNetwork/private/qnetworkconfiguration_p.h>
+
+#include <QtNetwork/qnetworksession.h>
+
+#include <QtCore/qdebug.h>
+
+#include <QtDBus>
+#include <QDBusConnection>
+#include <QDBusError>
+#include <QDBusInterface>
+#include <QDBusMessage>
+#include <QDBusReply>
+
+QT_BEGIN_NAMESPACE
+
+QNetworkManagerEngine::QNetworkManagerEngine(QObject *parent)
+: QBearerEngineImpl(parent),
+ interface(new QNetworkManagerInterface(this)),
+ systemSettings(new QNetworkManagerSettings(NM_DBUS_SERVICE_SYSTEM_SETTINGS, this)),
+ userSettings(new QNetworkManagerSettings(NM_DBUS_SERVICE_USER_SETTINGS, this))
+{
+ if (!interface->isValid())
+ return;
+
+ interface->setConnections();
+ connect(interface, SIGNAL(deviceAdded(QDBusObjectPath)),
+ this, SLOT(deviceAdded(QDBusObjectPath)));
+ connect(interface, SIGNAL(deviceRemoved(QDBusObjectPath)),
+ this, SLOT(deviceRemoved(QDBusObjectPath)));
+#if 0
+ connect(interface, SIGNAL(stateChanged(const QString,quint32)),
+ this, SIGNAL(configurationsChanged()));
+#endif
+ connect(interface, SIGNAL(activationFinished(QDBusPendingCallWatcher*)),
+ this, SLOT(activationFinished(QDBusPendingCallWatcher*)));
+ connect(interface, SIGNAL(propertiesChanged(QString,QMap<QString,QVariant>)),
+ this, SLOT(interfacePropertiesChanged(QString,QMap<QString,QVariant>)));
+
+ qDBusRegisterMetaType<QNmSettingsMap>();
+
+ systemSettings->setConnections();
+ connect(systemSettings, SIGNAL(newConnection(QDBusObjectPath)),
+ this, SLOT(newConnection(QDBusObjectPath)));
+
+ userSettings->setConnections();
+ connect(userSettings, SIGNAL(newConnection(QDBusObjectPath)),
+ this, SLOT(newConnection(QDBusObjectPath)));
+
+ // Get current list of access points.
+ foreach (const QDBusObjectPath &devicePath, interface->getDevices())
+ deviceAdded(devicePath);
+
+ // Get connections.
+ foreach (const QDBusObjectPath &settingsPath, systemSettings->listConnections())
+ newConnection(settingsPath, systemSettings);
+ foreach (const QDBusObjectPath &settingsPath, userSettings->listConnections())
+ newConnection(settingsPath, userSettings);
+
+ // Get active connections.
+ foreach (const QDBusObjectPath &acPath, interface->activeConnections()) {
+ QNetworkManagerConnectionActive *activeConnection =
+ new QNetworkManagerConnectionActive(acPath.path());
+ activeConnections.insert(acPath.path(), activeConnection);
+
+ activeConnection->setConnections();
+ connect(activeConnection, SIGNAL(propertiesChanged(QString,QMap<QString,QVariant>)),
+ this, SLOT(activeConnectionPropertiesChanged(QString,QMap<QString,QVariant>)));
+ }
+}
+
+QNetworkManagerEngine::~QNetworkManagerEngine()
+{
+}
+
+bool QNetworkManagerEngine::networkManagerAvailable() const
+{
+ QMutexLocker locker(&mutex);
+
+ return interface->isValid();
+}
+
+void QNetworkManagerEngine::doRequestUpdate()
+{
+ emit updateCompleted();
+}
+
+QString QNetworkManagerEngine::getInterfaceFromId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ foreach (const QDBusObjectPath &acPath, interface->activeConnections()) {
+ QNetworkManagerConnectionActive activeConnection(acPath.path());
+
+ const QString identifier = QString::number(qHash(activeConnection.serviceName() + ' ' +
+ activeConnection.connection().path()));
+
+ if (id == identifier) {
+ QList<QDBusObjectPath> devices = activeConnection.devices();
+
+ if (devices.isEmpty())
+ continue;
+
+ QNetworkManagerInterfaceDevice device(devices.at(0).path());
+ return device.networkInterface().name();
+ }
+ }
+
+ return QString();
+}
+
+bool QNetworkManagerEngine::hasIdentifier(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ if (connectionFromId(id))
+ return true;
+
+ for (int i = 0; i < accessPoints.count(); ++i) {
+ QNetworkManagerInterfaceAccessPoint *accessPoint = accessPoints.at(i);
+
+ const QString identifier =
+ QString::number(qHash(accessPoint->connectionInterface()->path()));
+
+ if (id == identifier)
+ return true;
+ }
+
+ return false;
+}
+
+QString QNetworkManagerEngine::bearerName(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkManagerSettingsConnection *connection = connectionFromId(id);
+
+ if (!connection)
+ return QString();
+
+ QNmSettingsMap map = connection->getSettings();
+ const QString connectionType = map.value("connection").value("type").toString();
+
+ if (connectionType == "802-3-ethernet")
+ return QLatin1String("Ethernet");
+ else if (connectionType == "802-11-wireless")
+ return QLatin1String("WLAN");
+ else if (connectionType == "gsm")
+ return QLatin1String("2G");
+ else if (connectionType == "cdma")
+ return QLatin1String("CDMA2000");
+ else
+ return QString();
+}
+
+void QNetworkManagerEngine::connectToId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkManagerSettingsConnection *connection = connectionFromId(id);
+
+ if (!connection)
+ return;
+
+ QNmSettingsMap map = connection->getSettings();
+ const QString connectionType = map.value("connection").value("type").toString();
+
+ QString dbusDevicePath;
+ foreach (const QDBusObjectPath &devicePath, interface->getDevices()) {
+ QNetworkManagerInterfaceDevice device(devicePath.path());
+ if (device.deviceType() == DEVICE_TYPE_802_3_ETHERNET &&
+ connectionType == QLatin1String("802-3-ethernet")) {
+ dbusDevicePath = devicePath.path();
+ break;
+ } else if (device.deviceType() == DEVICE_TYPE_802_11_WIRELESS &&
+ connectionType == QLatin1String("802-11-wireless")) {
+ dbusDevicePath = devicePath.path();
+ break;
+ }
+ }
+
+ const QString service = connection->connectionInterface()->service();
+ const QString settingsPath = connection->connectionInterface()->path();
+
+ interface->activateConnection(service, QDBusObjectPath(settingsPath),
+ QDBusObjectPath(dbusDevicePath), QDBusObjectPath("/"));
+}
+
+void QNetworkManagerEngine::disconnectFromId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ foreach (const QDBusObjectPath &acPath, interface->activeConnections()) {
+ QNetworkManagerConnectionActive activeConnection(acPath.path());
+
+ const QString identifier = QString::number(qHash(activeConnection.serviceName() + ' ' +
+ activeConnection.connection().path()));
+
+ if (id == identifier && accessPointConfigurations.contains(id)) {
+ interface->deactivateConnection(acPath);
+ break;
+ }
+ }
+}
+
+void QNetworkManagerEngine::requestUpdate()
+{
+ QMutexLocker locker(&mutex);
+
+ QTimer::singleShot(0, this, SLOT(doRequestUpdate()));
+}
+
+void QNetworkManagerEngine::interfacePropertiesChanged(const QString &path,
+ const QMap<QString, QVariant> &properties)
+{
+ QMutexLocker locker(&mutex);
+
+ Q_UNUSED(path)
+
+ QMapIterator<QString, QVariant> i(properties);
+ while (i.hasNext()) {
+ i.next();
+
+ if (i.key() == QLatin1String("ActiveConnections")) {
+ // Active connections changed, update configurations.
+
+ QList<QDBusObjectPath> activeConnections =
+ qdbus_cast<QList<QDBusObjectPath> >(i.value().value<QDBusArgument>());
+
+ QStringList identifiers = accessPointConfigurations.keys();
+ foreach (const QString &id, identifiers)
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+
+ QStringList priorActiveConnections = this->activeConnections.keys();
+
+ foreach (const QDBusObjectPath &acPath, activeConnections) {
+ priorActiveConnections.removeOne(acPath.path());
+ QNetworkManagerConnectionActive *activeConnection =
+ this->activeConnections.value(acPath.path());
+ if (!activeConnection) {
+ activeConnection = new QNetworkManagerConnectionActive(acPath.path());
+ this->activeConnections.insert(acPath.path(), activeConnection);
+
+ activeConnection->setConnections();
+ connect(activeConnection, SIGNAL(propertiesChanged(QString,QMap<QString,QVariant>)),
+ this, SLOT(activeConnectionPropertiesChanged(QString,QMap<QString,QVariant>)));
+ }
+
+ const QString id = QString::number(qHash(activeConnection->serviceName() + ' ' +
+ activeConnection->connection().path()));
+
+ identifiers.removeOne(id);
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+ if (ptr) {
+ if (activeConnection->state() == 2 &&
+ ptr->state != QNetworkConfiguration::Active) {
+ ptr->state = QNetworkConfiguration::Active;
+ emit configurationChanged(ptr);
+ }
+ }
+ }
+
+ while (!priorActiveConnections.isEmpty())
+ delete this->activeConnections.take(priorActiveConnections.takeFirst());
+
+ while (!identifiers.isEmpty()) {
+ // These configurations are not active
+ QNetworkConfigurationPrivatePointer ptr =
+ accessPointConfigurations.value(identifiers.takeFirst());
+
+ if ((ptr->state & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
+ ptr->state = QNetworkConfiguration::Discovered;
+ emit configurationChanged(ptr);
+ }
+ }
+ }
+ }
+}
+
+void QNetworkManagerEngine::activeConnectionPropertiesChanged(const QString &path,
+ const QMap<QString, QVariant> &properties)
+{
+ QMutexLocker locker(&mutex);
+
+ Q_UNUSED(properties)
+
+ QNetworkManagerConnectionActive *activeConnection = activeConnections.value(path);
+
+ if (!activeConnection)
+ return;
+
+ const QString id = QString::number(qHash(activeConnection->serviceName() + ' ' +
+ activeConnection->connection().path()));
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+ if (ptr) {
+ if (activeConnection->state() == 2 &&
+ ptr->state != QNetworkConfiguration::Active) {
+ ptr->state = QNetworkConfiguration::Active;
+ emit configurationChanged(ptr);
+ }
+ }
+}
+
+void QNetworkManagerEngine::devicePropertiesChanged(const QString &path,
+ const QMap<QString, QVariant> &properties)
+{
+ Q_UNUSED(path);
+ Q_UNUSED(properties);
+}
+
+void QNetworkManagerEngine::deviceAdded(const QDBusObjectPath &path)
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkManagerInterfaceDevice device(path.path());
+ if (device.deviceType() == DEVICE_TYPE_802_11_WIRELESS) {
+ QNetworkManagerInterfaceDeviceWireless *wirelessDevice =
+ new QNetworkManagerInterfaceDeviceWireless(device.connectionInterface()->path());
+ wirelessDevices.insert(path.path(), wirelessDevice);
+
+ wirelessDevice->setConnections();
+ connect(wirelessDevice, SIGNAL(accessPointAdded(QString,QDBusObjectPath)),
+ this, SLOT(newAccessPoint(QString,QDBusObjectPath)));
+ connect(wirelessDevice, SIGNAL(accessPointRemoved(QString,QDBusObjectPath)),
+ this, SLOT(removeAccessPoint(QString,QDBusObjectPath)));
+ connect(wirelessDevice, SIGNAL(propertiesChanged(QString,QMap<QString,QVariant>)),
+ this, SLOT(devicePropertiesChanged(QString,QMap<QString,QVariant>)));
+
+ foreach (const QDBusObjectPath &apPath, wirelessDevice->getAccessPoints())
+ newAccessPoint(QString(), apPath);
+ }
+}
+
+void QNetworkManagerEngine::deviceRemoved(const QDBusObjectPath &path)
+{
+ QMutexLocker locker(&mutex);
+
+ delete wirelessDevices.value(path.path());
+}
+
+void QNetworkManagerEngine::newConnection(const QDBusObjectPath &path,
+ QNetworkManagerSettings *settings)
+{
+ QMutexLocker locker(&mutex);
+
+ if (!settings)
+ settings = qobject_cast<QNetworkManagerSettings *>(sender());
+
+ if (!settings)
+ return;
+
+ QNetworkManagerSettingsConnection *connection =
+ new QNetworkManagerSettingsConnection(settings->connectionInterface()->service(),
+ path.path());
+ connections.append(connection);
+
+ connect(connection, SIGNAL(removed(QString)), this, SLOT(removeConnection(QString)));
+ connect(connection, SIGNAL(updated(const QNmSettingsMap&)),
+ this, SLOT(updateConnection(const QNmSettingsMap&)));
+
+ const QString service = connection->connectionInterface()->service();
+ const QString settingsPath = connection->connectionInterface()->path();
+
+ QNetworkConfigurationPrivate *cpPriv =
+ parseConnection(service, settingsPath, connection->getSettings());
+
+ // Check if connection is active.
+ foreach (const QDBusObjectPath &acPath, interface->activeConnections()) {
+ QNetworkManagerConnectionActive activeConnection(acPath.path());
+
+ if (activeConnection.serviceName() == service &&
+ activeConnection.connection().path() == settingsPath &&
+ activeConnection.state() == 2) {
+ cpPriv->state |= QNetworkConfiguration::Active;
+ break;
+ }
+ }
+
+ QNetworkConfigurationPrivatePointer ptr(cpPriv);
+ accessPointConfigurations.insert(ptr->id, ptr);
+ emit configurationAdded(ptr);
+}
+
+void QNetworkManagerEngine::removeConnection(const QString &path)
+{
+ QMutexLocker locker(&mutex);
+
+ Q_UNUSED(path)
+
+ QNetworkManagerSettingsConnection *connection =
+ qobject_cast<QNetworkManagerSettingsConnection *>(sender());
+ if (!connection)
+ return;
+
+ connections.removeAll(connection);
+
+ const QString id = QString::number(qHash(connection->connectionInterface()->service() + ' ' +
+ connection->connectionInterface()->path()));
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.take(id);
+ ptr->isValid = false;
+ emit configurationRemoved(ptr);
+}
+
+void QNetworkManagerEngine::updateConnection(const QNmSettingsMap &settings)
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkManagerSettingsConnection *connection =
+ qobject_cast<QNetworkManagerSettingsConnection *>(sender());
+ if (!connection)
+ return;
+
+ const QString service = connection->connectionInterface()->service();
+ const QString settingsPath = connection->connectionInterface()->path();
+
+ QNetworkConfigurationPrivate *cpPriv = parseConnection(service, settingsPath, settings);
+
+ // Check if connection is active.
+ foreach (const QDBusObjectPath &acPath, interface->activeConnections()) {
+ QNetworkManagerConnectionActive activeConnection(acPath.path());
+
+ if (activeConnection.serviceName() == service &&
+ activeConnection.connection().path() == settingsPath &&
+ activeConnection.state() == NM_ACTIVE_CONNECTION_STATE_ACTIVATED) {
+ cpPriv->state |= QNetworkConfiguration::Active;
+ break;
+ }
+ }
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(cpPriv->id);
+
+ ptr->isValid = cpPriv->isValid;
+ ptr->name = cpPriv->name;
+ ptr->id = cpPriv->id;
+ ptr->state = cpPriv->state;
+
+ emit configurationChanged(ptr);
+ delete cpPriv;
+}
+
+void QNetworkManagerEngine::activationFinished(QDBusPendingCallWatcher *watcher)
+{
+ QMutexLocker locker(&mutex);
+
+ QDBusPendingReply<QDBusObjectPath> reply = *watcher;
+ if (!reply.isError()) {
+ QDBusObjectPath result = reply.value();
+
+ QNetworkManagerConnectionActive activeConnection(result.path());
+
+ const QString id = QString::number(qHash(activeConnection.serviceName() + ' ' +
+ activeConnection.connection().path()));
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+ if (ptr) {
+ if (activeConnection.state() == 2 &&
+ ptr->state != QNetworkConfiguration::Active) {
+ ptr->state = QNetworkConfiguration::Active;
+ emit configurationChanged(ptr);
+ }
+ }
+ }
+}
+
+void QNetworkManagerEngine::newAccessPoint(const QString &path, const QDBusObjectPath &objectPath)
+{
+ QMutexLocker locker(&mutex);
+
+ Q_UNUSED(path)
+
+ QNetworkManagerInterfaceAccessPoint *accessPoint =
+ new QNetworkManagerInterfaceAccessPoint(objectPath.path());
+ accessPoints.append(accessPoint);
+
+ accessPoint->setConnections();
+ connect(accessPoint, SIGNAL(propertiesChanged(QMap<QString,QVariant>)),
+ this, SLOT(updateAccessPoint(QMap<QString,QVariant>)));
+
+ // Check if configuration for this SSID already exists.
+ for (int i = 0; i < accessPoints.count(); ++i) {
+ if (accessPoint != accessPoints.at(i) &&
+ accessPoint->ssid() == accessPoints.at(i)->ssid()) {
+ return;
+ }
+ }
+
+ // Check if configuration exists for connection.
+ if (!accessPoint->ssid().isEmpty()) {
+ for (int i = 0; i < connections.count(); ++i) {
+ QNetworkManagerSettingsConnection *connection = connections.at(i);
+
+ if (accessPoint->ssid() == connection->getSsid()) {
+ const QString service = connection->connectionInterface()->service();
+ const QString settingsPath = connection->connectionInterface()->path();
+ const QString connectionId = QString::number(qHash(service + ' ' + settingsPath));
+
+ QNetworkConfigurationPrivatePointer ptr =
+ accessPointConfigurations.value(connectionId);
+ ptr->state = QNetworkConfiguration::Discovered;
+ emit configurationChanged(ptr);
+ return;
+ }
+ }
+ }
+
+ // New access point.
+ QNetworkConfigurationPrivatePointer ptr(new QNetworkConfigurationPrivate);
+
+ ptr->name = accessPoint->ssid();
+ ptr->isValid = true;
+ ptr->id = QString::number(qHash(objectPath.path()));
+ ptr->type = QNetworkConfiguration::InternetAccessPoint;
+ ptr->purpose = QNetworkConfiguration::PublicPurpose;
+ ptr->state = QNetworkConfiguration::Undefined;
+ ptr->bearer = QLatin1String("WLAN");
+
+ accessPointConfigurations.insert(ptr->id, ptr);
+ emit configurationAdded(ptr);
+}
+
+void QNetworkManagerEngine::removeAccessPoint(const QString &path,
+ const QDBusObjectPath &objectPath)
+{
+ QMutexLocker locker(&mutex);
+
+ Q_UNUSED(path)
+
+ for (int i = 0; i < accessPoints.count(); ++i) {
+ QNetworkManagerInterfaceAccessPoint *accessPoint = accessPoints.at(i);
+
+ if (accessPoint->connectionInterface()->path() == objectPath.path()) {
+ accessPoints.removeOne(accessPoint);
+
+ if (configuredAccessPoints.contains(accessPoint)) {
+ // find connection and change state to Defined
+ configuredAccessPoints.removeOne(accessPoint);
+ for (int i = 0; i < connections.count(); ++i) {
+ QNetworkManagerSettingsConnection *connection = connections.at(i);
+
+ if (accessPoint->ssid() == connection->getSsid()) {
+ const QString service = connection->connectionInterface()->service();
+ const QString settingsPath = connection->connectionInterface()->path();
+ const QString connectionId =
+ QString::number(qHash(service + ' ' + settingsPath));
+
+ QNetworkConfigurationPrivatePointer ptr =
+ accessPointConfigurations.value(connectionId);
+ ptr->state = QNetworkConfiguration::Defined;
+ emit configurationChanged(ptr);
+ return;
+ }
+ }
+ } else {
+ QNetworkConfigurationPrivatePointer ptr =
+ accessPointConfigurations.take(QString::number(qHash(objectPath.path())));
+
+ if (ptr)
+ emit configurationRemoved(ptr);
+ }
+
+ delete accessPoint;
+
+ break;
+ }
+ }
+}
+
+void QNetworkManagerEngine::updateAccessPoint(const QMap<QString, QVariant> &map)
+{
+ QMutexLocker locker(&mutex);
+
+ Q_UNUSED(map)
+
+ QNetworkManagerInterfaceAccessPoint *accessPoint =
+ qobject_cast<QNetworkManagerInterfaceAccessPoint *>(sender());
+ if (!accessPoint)
+ return;
+
+ for (int i = 0; i < connections.count(); ++i) {
+ QNetworkManagerSettingsConnection *connection = connections.at(i);
+
+ if (accessPoint->ssid() == connection->getSsid()) {
+ const QString service = connection->connectionInterface()->service();
+ const QString settingsPath = connection->connectionInterface()->path();
+ const QString connectionId = QString::number(qHash(service + ' ' + settingsPath));
+
+ QNetworkConfigurationPrivatePointer ptr =
+ accessPointConfigurations.value(connectionId);
+ ptr->state = QNetworkConfiguration::Discovered;
+ emit configurationChanged(ptr);
+ return;
+ }
+ }
+}
+
+QNetworkConfigurationPrivate *QNetworkManagerEngine::parseConnection(const QString &service,
+ const QString &settingsPath,
+ const QNmSettingsMap &map)
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkConfigurationPrivate *cpPriv = new QNetworkConfigurationPrivate;
+ cpPriv->name = map.value("connection").value("id").toString();
+ cpPriv->isValid = true;
+ cpPriv->id = QString::number(qHash(service + ' ' + settingsPath));
+ cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
+
+ cpPriv->purpose = QNetworkConfiguration::PublicPurpose;
+
+ cpPriv->state = QNetworkConfiguration::Defined;
+
+ const QString connectionType = map.value("connection").value("type").toString();
+
+ if (connectionType == QLatin1String("802-3-ethernet")) {
+ cpPriv->bearer = QLatin1String("Ethernet");
+
+ foreach (const QDBusObjectPath &devicePath, interface->getDevices()) {
+ QNetworkManagerInterfaceDevice device(devicePath.path());
+ if (device.deviceType() == DEVICE_TYPE_802_3_ETHERNET) {
+ QNetworkManagerInterfaceDeviceWired wiredDevice(device.connectionInterface()->path());
+ if (wiredDevice.carrier()) {
+ cpPriv->state |= QNetworkConfiguration::Discovered;
+ break;
+ }
+
+ }
+ }
+ } else if (connectionType == QLatin1String("802-11-wireless")) {
+ cpPriv->bearer = QLatin1String("WLAN");
+
+ const QString connectionSsid = map.value("802-11-wireless").value("ssid").toString();
+
+ for (int i = 0; i < accessPoints.count(); ++i) {
+ if (connectionSsid == accessPoints.at(i)->ssid()) {
+ cpPriv->state |= QNetworkConfiguration::Discovered;
+ if (!configuredAccessPoints.contains(accessPoints.at(i))) {
+ configuredAccessPoints.append(accessPoints.at(i));
+
+ const QString accessPointId =
+ QString::number(qHash(accessPoints.at(i)->connectionInterface()->path()));
+ QNetworkConfigurationPrivatePointer ptr =
+ accessPointConfigurations.take(accessPointId);
+ emit configurationRemoved(ptr);
+ }
+ break;
+ }
+ }
+ } else if (connectionType == "gsm") {
+ cpPriv->bearer = QLatin1String("2G");
+ } else if (connectionType == "cdma") {
+ cpPriv->bearer = QLatin1String("CDMA2000");
+ }
+
+ return cpPriv;
+}
+
+QNetworkManagerSettingsConnection *QNetworkManagerEngine::connectionFromId(const QString &id) const
+{
+ QMutexLocker locker(&mutex);
+
+ for (int i = 0; i < connections.count(); ++i) {
+ QNetworkManagerSettingsConnection *connection = connections.at(i);
+ const QString service = connection->connectionInterface()->service();
+ const QString settingsPath = connection->connectionInterface()->path();
+
+ const QString identifier = QString::number(qHash(service + ' ' + settingsPath));
+
+ if (id == identifier)
+ return connection;
+ }
+
+ return 0;
+}
+
+QNetworkSession::State QNetworkManagerEngine::sessionStateForId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+
+ if (!ptr)
+ return QNetworkSession::Invalid;
+
+ if (!ptr->isValid)
+ return QNetworkSession::Invalid;
+
+ foreach (const QString &acPath, activeConnections.keys()) {
+ QNetworkManagerConnectionActive *activeConnection = activeConnections.value(acPath);
+
+ const QString identifier = QString::number(qHash(activeConnection->serviceName() + ' ' +
+ activeConnection->connection().path()));
+
+ if (id == identifier) {
+ switch (activeConnection->state()) {
+ case 0:
+ return QNetworkSession::Disconnected;
+ case 1:
+ return QNetworkSession::Connecting;
+ case 2:
+ return QNetworkSession::Connected;
+ }
+ }
+ }
+
+ if ((ptr->state & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered)
+ return QNetworkSession::Disconnected;
+ else if ((ptr->state & QNetworkConfiguration::Defined) == QNetworkConfiguration::Defined)
+ return QNetworkSession::NotAvailable;
+ else if ((ptr->state & QNetworkConfiguration::Undefined) == QNetworkConfiguration::Undefined)
+ return QNetworkSession::NotAvailable;
+
+ return QNetworkSession::Invalid;
+}
+
+quint64 QNetworkManagerEngine::bytesWritten(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+ if (ptr && (ptr->state & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
+ const QString networkInterface = getInterfaceFromId(id);
+ if (!networkInterface.isEmpty()) {
+ const QString devFile = QLatin1String("/sys/class/net/") +
+ networkInterface +
+ QLatin1String("/statistics/tx_bytes");
+
+ quint64 result = Q_UINT64_C(0);
+
+ QFile tx(devFile);
+ if (tx.exists() && tx.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ QTextStream in(&tx);
+ in >> result;
+ tx.close();
+ }
+
+ return result;
+ }
+ }
+
+ return Q_UINT64_C(0);
+}
+
+quint64 QNetworkManagerEngine::bytesReceived(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+ if (ptr && (ptr->state & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
+ const QString networkInterface = getInterfaceFromId(id);
+ if (!networkInterface.isEmpty()) {
+ const QString devFile = QLatin1String("/sys/class/net/") +
+ networkInterface +
+ QLatin1String("/statistics/rx_bytes");
+
+ quint64 result = Q_UINT64_C(0);
+
+ QFile tx(devFile);
+ if (tx.exists() && tx.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ QTextStream in(&tx);
+ in >> result;
+ tx.close();
+ }
+
+ return result;
+ }
+ }
+
+ return Q_UINT64_C(0);
+}
+
+quint64 QNetworkManagerEngine::startTime(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkManagerSettingsConnection *connection = connectionFromId(id);
+ if (connection)
+ return connection->getTimestamp();
+ else
+ return Q_UINT64_C(0);
+}
+
+QNetworkConfigurationManager::Capabilities QNetworkManagerEngine::capabilities() const
+{
+ return QNetworkConfigurationManager::ForcedRoaming |
+ QNetworkConfigurationManager::CanStartAndStopInterfaces;
+}
+
+QNetworkSessionPrivate *QNetworkManagerEngine::createSessionBackend()
+{
+ return new QNetworkSessionPrivateImpl;
+}
+
+QNetworkConfigurationPrivatePointer QNetworkManagerEngine::defaultConfiguration()
+{
+ return QNetworkConfigurationPrivatePointer();
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
new file mode 100644
index 0000000000..ca1f857883
--- /dev/null
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QNETWORKMANAGERENGINE_P_H
+#define QNETWORKMANAGERENGINE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of the QLibrary class. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "../qbearerengine_impl.h"
+
+#include "qnetworkmanagerservice.h"
+
+#include <QMap>
+#include <QVariant>
+
+QT_BEGIN_NAMESPACE
+
+class QNetworkManagerEngine : public QBearerEngineImpl
+{
+ Q_OBJECT
+
+public:
+ QNetworkManagerEngine(QObject *parent = 0);
+ ~QNetworkManagerEngine();
+
+ bool networkManagerAvailable() const;
+
+ QString getInterfaceFromId(const QString &id);
+ bool hasIdentifier(const QString &id);
+
+ QString bearerName(const QString &id);
+
+ void connectToId(const QString &id);
+ void disconnectFromId(const QString &id);
+
+ void requestUpdate();
+
+ QNetworkSession::State sessionStateForId(const QString &id);
+
+ quint64 bytesWritten(const QString &id);
+ quint64 bytesReceived(const QString &id);
+ quint64 startTime(const QString &id);
+
+ QNetworkConfigurationManager::Capabilities capabilities() const;
+
+ QNetworkSessionPrivate *createSessionBackend();
+
+ QNetworkConfigurationPrivatePointer defaultConfiguration();
+
+private Q_SLOTS:
+ void interfacePropertiesChanged(const QString &path,
+ const QMap<QString, QVariant> &properties);
+ void activeConnectionPropertiesChanged(const QString &path,
+ const QMap<QString, QVariant> &properties);
+ void devicePropertiesChanged(const QString &path,
+ const QMap<QString, QVariant> &properties);
+
+ void deviceAdded(const QDBusObjectPath &path);
+ void deviceRemoved(const QDBusObjectPath &path);
+
+ void newConnection(const QDBusObjectPath &path, QNetworkManagerSettings *settings = 0);
+ void removeConnection(const QString &path);
+ void updateConnection(const QNmSettingsMap &settings);
+ void activationFinished(QDBusPendingCallWatcher *watcher);
+
+ void newAccessPoint(const QString &path, const QDBusObjectPath &objectPath);
+ void removeAccessPoint(const QString &path, const QDBusObjectPath &objectPath);
+ void updateAccessPoint(const QMap<QString, QVariant> &map);
+
+ void doRequestUpdate();
+
+private:
+ QNetworkConfigurationPrivate *parseConnection(const QString &service,
+ const QString &settingsPath,
+ const QNmSettingsMap &map);
+ QNetworkManagerSettingsConnection *connectionFromId(const QString &id) const;
+
+private:
+ QNetworkManagerInterface *interface;
+ QNetworkManagerSettings *systemSettings;
+ QNetworkManagerSettings *userSettings;
+ QHash<QString, QNetworkManagerInterfaceDeviceWireless *> wirelessDevices;
+ QHash<QString, QNetworkManagerConnectionActive *> activeConnections;
+ QList<QNetworkManagerSettingsConnection *> connections;
+ QList<QNetworkManagerInterfaceAccessPoint *> accessPoints;
+ QList<QNetworkManagerInterfaceAccessPoint *> configuredAccessPoints;
+};
+
+QT_END_NAMESPACE
+
+#endif
+
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp
new file mode 100644
index 0000000000..d23bb0de52
--- /dev/null
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp
@@ -0,0 +1,995 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QObject>
+#include <QList>
+#include <QtDBus/QtDBus>
+#include <QtDBus/QDBusConnection>
+#include <QtDBus/QDBusError>
+#include <QtDBus/QDBusInterface>
+#include <QtDBus/QDBusMessage>
+#include <QtDBus/QDBusReply>
+#include <QtDBus/QDBusPendingCallWatcher>
+#include <QtDBus/QDBusObjectPath>
+#include <QtDBus/QDBusPendingCall>
+
+#include "qnetworkmanagerservice.h"
+#include "qnmdbushelper.h"
+
+QT_BEGIN_NAMESPACE
+
+static QDBusConnection dbusConnection = QDBusConnection::systemBus();
+
+class QNetworkManagerInterfacePrivate
+{
+public:
+ QDBusInterface *connectionInterface;
+ bool valid;
+};
+
+QNetworkManagerInterface::QNetworkManagerInterface(QObject *parent)
+ : QObject(parent)
+{
+ d = new QNetworkManagerInterfacePrivate();
+ d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE),
+ QLatin1String(NM_DBUS_PATH),
+ QLatin1String(NM_DBUS_INTERFACE),
+ dbusConnection);
+ if (!d->connectionInterface->isValid()) {
+ d->valid = false;
+ return;
+ }
+ d->valid = true;
+ nmDBusHelper = new QNmDBusHelper(this);
+ connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(const QString &,QMap<QString,QVariant>)),
+ this,SIGNAL(propertiesChanged( const QString &, QMap<QString,QVariant>)));
+ connect(nmDBusHelper,SIGNAL(pathForStateChanged(const QString &, quint32)),
+ this, SIGNAL(stateChanged(const QString&, quint32)));
+
+}
+
+QNetworkManagerInterface::~QNetworkManagerInterface()
+{
+ delete d->connectionInterface;
+ delete d;
+}
+
+bool QNetworkManagerInterface::isValid()
+{
+ return d->valid;
+}
+
+bool QNetworkManagerInterface::setConnections()
+{
+ if(!isValid() )
+ return false;
+ bool allOk = false;
+ if (!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
+ QLatin1String(NM_DBUS_PATH),
+ QLatin1String(NM_DBUS_INTERFACE),
+ QLatin1String("PropertiesChanged"),
+ nmDBusHelper,SLOT(slotPropertiesChanged( QMap<QString,QVariant>)))) {
+ allOk = true;
+ }
+ if (!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
+ QLatin1String(NM_DBUS_PATH),
+ QLatin1String(NM_DBUS_INTERFACE),
+ QLatin1String("DeviceAdded"),
+ this,SIGNAL(deviceAdded(QDBusObjectPath)))) {
+ allOk = true;
+ }
+ if (!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
+ QLatin1String(NM_DBUS_PATH),
+ QLatin1String(NM_DBUS_INTERFACE),
+ QLatin1String("DeviceRemoved"),
+ this,SIGNAL(deviceRemoved(QDBusObjectPath)))) {
+ allOk = true;
+ }
+
+ return allOk;
+}
+
+QDBusInterface *QNetworkManagerInterface::connectionInterface() const
+{
+ return d->connectionInterface;
+}
+
+QList <QDBusObjectPath> QNetworkManagerInterface::getDevices() const
+{
+ QDBusReply<QList<QDBusObjectPath> > reply = d->connectionInterface->call(QLatin1String("GetDevices"));
+ return reply.value();
+}
+
+void QNetworkManagerInterface::activateConnection( const QString &serviceName,
+ QDBusObjectPath connectionPath,
+ QDBusObjectPath devicePath,
+ QDBusObjectPath specificObject)
+{
+ QDBusPendingCall pendingCall = d->connectionInterface->asyncCall(QLatin1String("ActivateConnection"),
+ QVariant(serviceName),
+ QVariant::fromValue(connectionPath),
+ QVariant::fromValue(devicePath),
+ QVariant::fromValue(specificObject));
+
+ QDBusPendingCallWatcher *callWatcher = new QDBusPendingCallWatcher(pendingCall, this);
+ connect(callWatcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
+ this, SIGNAL(activationFinished(QDBusPendingCallWatcher*)));
+}
+
+void QNetworkManagerInterface::deactivateConnection(QDBusObjectPath connectionPath) const
+{
+ d->connectionInterface->call(QLatin1String("DeactivateConnection"), QVariant::fromValue(connectionPath));
+}
+
+bool QNetworkManagerInterface::wirelessEnabled() const
+{
+ return d->connectionInterface->property("WirelessEnabled").toBool();
+}
+
+bool QNetworkManagerInterface::wirelessHardwareEnabled() const
+{
+ return d->connectionInterface->property("WirelessHardwareEnabled").toBool();
+}
+
+QList <QDBusObjectPath> QNetworkManagerInterface::activeConnections() const
+{
+ QVariant prop = d->connectionInterface->property("ActiveConnections");
+ return prop.value<QList<QDBusObjectPath> >();
+}
+
+quint32 QNetworkManagerInterface::state()
+{
+ return d->connectionInterface->property("State").toUInt();
+}
+
+class QNetworkManagerInterfaceAccessPointPrivate
+{
+public:
+ QDBusInterface *connectionInterface;
+ QString path;
+ bool valid;
+};
+
+QNetworkManagerInterfaceAccessPoint::QNetworkManagerInterfaceAccessPoint(const QString &dbusPathName, QObject *parent)
+ : QObject(parent), nmDBusHelper(0)
+{
+ d = new QNetworkManagerInterfaceAccessPointPrivate();
+ d->path = dbusPathName;
+ d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE),
+ d->path,
+ QLatin1String(NM_DBUS_INTERFACE_ACCESS_POINT),
+ dbusConnection);
+ if (!d->connectionInterface->isValid()) {
+ d->valid = false;
+ return;
+ }
+ d->valid = true;
+
+}
+
+QNetworkManagerInterfaceAccessPoint::~QNetworkManagerInterfaceAccessPoint()
+{
+ delete d->connectionInterface;
+ delete d;
+}
+
+bool QNetworkManagerInterfaceAccessPoint::isValid()
+{
+ return d->valid;
+}
+
+bool QNetworkManagerInterfaceAccessPoint::setConnections()
+{
+ if(!isValid() )
+ return false;
+
+ bool allOk = false;
+ delete nmDBusHelper;
+ nmDBusHelper = new QNmDBusHelper(this);
+ connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(const QString &,QMap<QString,QVariant>)),
+ this,SIGNAL(propertiesChanged( const QString &, QMap<QString,QVariant>)));
+
+ if(dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
+ d->path,
+ QLatin1String(NM_DBUS_INTERFACE_ACCESS_POINT),
+ QLatin1String("PropertiesChanged"),
+ nmDBusHelper,SLOT(slotPropertiesChanged( QMap<QString,QVariant>))) ) {
+ allOk = true;
+
+ }
+ return allOk;
+}
+
+QDBusInterface *QNetworkManagerInterfaceAccessPoint::connectionInterface() const
+{
+ return d->connectionInterface;
+}
+
+quint32 QNetworkManagerInterfaceAccessPoint::flags() const
+{
+ return d->connectionInterface->property("Flags").toUInt();
+}
+
+quint32 QNetworkManagerInterfaceAccessPoint::wpaFlags() const
+{
+ return d->connectionInterface->property("WpaFlags").toUInt();
+}
+
+quint32 QNetworkManagerInterfaceAccessPoint::rsnFlags() const
+{
+ return d->connectionInterface->property("RsnFlags").toUInt();
+}
+
+QString QNetworkManagerInterfaceAccessPoint::ssid() const
+{
+ return d->connectionInterface->property("Ssid").toString();
+}
+
+quint32 QNetworkManagerInterfaceAccessPoint::frequency() const
+{
+ return d->connectionInterface->property("Frequency").toUInt();
+}
+
+QString QNetworkManagerInterfaceAccessPoint::hwAddress() const
+{
+ return d->connectionInterface->property("HwAddress").toString();
+}
+
+quint32 QNetworkManagerInterfaceAccessPoint::mode() const
+{
+ return d->connectionInterface->property("Mode").toUInt();
+}
+
+quint32 QNetworkManagerInterfaceAccessPoint::maxBitrate() const
+{
+ return d->connectionInterface->property("MaxBitrate").toUInt();
+}
+
+quint32 QNetworkManagerInterfaceAccessPoint::strength() const
+{
+ return d->connectionInterface->property("Strength").toUInt();
+}
+
+class QNetworkManagerInterfaceDevicePrivate
+{
+public:
+ QDBusInterface *connectionInterface;
+ QString path;
+ bool valid;
+};
+
+QNetworkManagerInterfaceDevice::QNetworkManagerInterfaceDevice(const QString &deviceObjectPath, QObject *parent)
+ : QObject(parent), nmDBusHelper(0)
+{
+ d = new QNetworkManagerInterfaceDevicePrivate();
+ d->path = deviceObjectPath;
+ d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE),
+ d->path,
+ QLatin1String(NM_DBUS_INTERFACE_DEVICE),
+ dbusConnection);
+ if (!d->connectionInterface->isValid()) {
+ d->valid = false;
+ return;
+ }
+ d->valid = true;
+}
+
+QNetworkManagerInterfaceDevice::~QNetworkManagerInterfaceDevice()
+{
+ delete d->connectionInterface;
+ delete d;
+}
+
+bool QNetworkManagerInterfaceDevice::isValid()
+{
+ return d->valid;
+}
+
+bool QNetworkManagerInterfaceDevice::setConnections()
+{
+ if(!isValid() )
+ return false;
+
+ bool allOk = false;
+ delete nmDBusHelper;
+ nmDBusHelper = new QNmDBusHelper(this);
+ connect(nmDBusHelper,SIGNAL(pathForStateChanged(const QString &, quint32)),
+ this, SIGNAL(stateChanged(const QString&, quint32)));
+ if(dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
+ d->path,
+ QLatin1String(NM_DBUS_INTERFACE_DEVICE),
+ QLatin1String("StateChanged"),
+ nmDBusHelper,SLOT(deviceStateChanged(quint32)))) {
+ allOk = true;
+ }
+ return allOk;
+}
+
+QDBusInterface *QNetworkManagerInterfaceDevice::connectionInterface() const
+{
+ return d->connectionInterface;
+}
+
+QString QNetworkManagerInterfaceDevice::udi() const
+{
+ return d->connectionInterface->property("Udi").toString();
+}
+
+QNetworkInterface QNetworkManagerInterfaceDevice::networkInterface() const
+{
+ return QNetworkInterface::interfaceFromName(d->connectionInterface->property("Interface").toString());
+}
+
+quint32 QNetworkManagerInterfaceDevice::ip4Address() const
+{
+ return d->connectionInterface->property("Ip4Address").toUInt();
+}
+
+quint32 QNetworkManagerInterfaceDevice::state() const
+{
+ return d->connectionInterface->property("State").toUInt();
+}
+
+quint32 QNetworkManagerInterfaceDevice::deviceType() const
+{
+ return d->connectionInterface->property("DeviceType").toUInt();
+}
+
+QDBusObjectPath QNetworkManagerInterfaceDevice::ip4config() const
+{
+ QVariant prop = d->connectionInterface->property("Ip4Config");
+ return prop.value<QDBusObjectPath>();
+}
+
+class QNetworkManagerInterfaceDeviceWiredPrivate
+{
+public:
+ QDBusInterface *connectionInterface;
+ QString path;
+ bool valid;
+};
+
+QNetworkManagerInterfaceDeviceWired::QNetworkManagerInterfaceDeviceWired(const QString &ifaceDevicePath, QObject *parent)
+ : QObject(parent), nmDBusHelper(0)
+{
+ d = new QNetworkManagerInterfaceDeviceWiredPrivate();
+ d->path = ifaceDevicePath;
+ d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE),
+ d->path,
+ QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRED),
+ dbusConnection, parent);
+ if (!d->connectionInterface->isValid()) {
+ d->valid = false;
+ return;
+ }
+ d->valid = true;
+}
+
+QNetworkManagerInterfaceDeviceWired::~QNetworkManagerInterfaceDeviceWired()
+{
+ delete d->connectionInterface;
+ delete d;
+}
+
+bool QNetworkManagerInterfaceDeviceWired::isValid()
+{
+
+ return d->valid;
+}
+
+bool QNetworkManagerInterfaceDeviceWired::setConnections()
+{
+ if(!isValid() )
+ return false;
+
+ bool allOk = false;
+
+ delete nmDBusHelper;
+ nmDBusHelper = new QNmDBusHelper(this);
+ connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(const QString &,QMap<QString,QVariant>)),
+ this,SIGNAL(propertiesChanged( const QString &, QMap<QString,QVariant>)));
+ if(dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
+ d->path,
+ QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRED),
+ QLatin1String("PropertiesChanged"),
+ nmDBusHelper,SLOT(slotPropertiesChanged( QMap<QString,QVariant>))) ) {
+ allOk = true;
+ }
+ return allOk;
+}
+
+QDBusInterface *QNetworkManagerInterfaceDeviceWired::connectionInterface() const
+{
+ return d->connectionInterface;
+}
+
+QString QNetworkManagerInterfaceDeviceWired::hwAddress() const
+{
+ return d->connectionInterface->property("HwAddress").toString();
+}
+
+quint32 QNetworkManagerInterfaceDeviceWired::speed() const
+{
+ return d->connectionInterface->property("Speed").toUInt();
+}
+
+bool QNetworkManagerInterfaceDeviceWired::carrier() const
+{
+ return d->connectionInterface->property("Carrier").toBool();
+}
+
+class QNetworkManagerInterfaceDeviceWirelessPrivate
+{
+public:
+ QDBusInterface *connectionInterface;
+ QString path;
+ bool valid;
+};
+
+QNetworkManagerInterfaceDeviceWireless::QNetworkManagerInterfaceDeviceWireless(const QString &ifaceDevicePath, QObject *parent)
+ : QObject(parent), nmDBusHelper(0)
+{
+ d = new QNetworkManagerInterfaceDeviceWirelessPrivate();
+ d->path = ifaceDevicePath;
+ d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE),
+ d->path,
+ QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS),
+ dbusConnection, parent);
+ if (!d->connectionInterface->isValid()) {
+ d->valid = false;
+ return;
+ }
+ d->valid = true;
+}
+
+QNetworkManagerInterfaceDeviceWireless::~QNetworkManagerInterfaceDeviceWireless()
+{
+ delete d->connectionInterface;
+ delete d;
+}
+
+bool QNetworkManagerInterfaceDeviceWireless::isValid()
+{
+ return d->valid;
+}
+
+bool QNetworkManagerInterfaceDeviceWireless::setConnections()
+{
+ if(!isValid() )
+ return false;
+
+ bool allOk = false;
+ delete nmDBusHelper;
+ nmDBusHelper = new QNmDBusHelper(this);
+ connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(const QString &,QMap<QString,QVariant>)),
+ this,SIGNAL(propertiesChanged( const QString &, QMap<QString,QVariant>)));
+
+ connect(nmDBusHelper, SIGNAL(pathForAccessPointAdded(const QString &,QDBusObjectPath)),
+ this,SIGNAL(accessPointAdded(const QString &,QDBusObjectPath)));
+
+ connect(nmDBusHelper, SIGNAL(pathForAccessPointRemoved(const QString &,QDBusObjectPath)),
+ this,SIGNAL(accessPointRemoved(const QString &,QDBusObjectPath)));
+
+ if(!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
+ d->path,
+ QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS),
+ QLatin1String("AccessPointAdded"),
+ nmDBusHelper, SLOT(slotAccessPointAdded( QDBusObjectPath )))) {
+ allOk = true;
+ }
+
+
+ if(!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
+ d->path,
+ QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS),
+ QLatin1String("AccessPointRemoved"),
+ nmDBusHelper, SLOT(slotAccessPointRemoved( QDBusObjectPath )))) {
+ allOk = true;
+ }
+
+
+ if(!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
+ d->path,
+ QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS),
+ QLatin1String("PropertiesChanged"),
+ nmDBusHelper,SLOT(slotPropertiesChanged( QMap<QString,QVariant>)))) {
+ allOk = true;
+ }
+
+ return allOk;
+}
+
+QDBusInterface *QNetworkManagerInterfaceDeviceWireless::connectionInterface() const
+{
+ return d->connectionInterface;
+}
+
+QList <QDBusObjectPath> QNetworkManagerInterfaceDeviceWireless::getAccessPoints()
+{
+ QDBusReply<QList<QDBusObjectPath> > reply = d->connectionInterface->call(QLatin1String("GetAccessPoints"));
+ return reply.value();
+}
+
+QString QNetworkManagerInterfaceDeviceWireless::hwAddress() const
+{
+ return d->connectionInterface->property("HwAddress").toString();
+}
+
+quint32 QNetworkManagerInterfaceDeviceWireless::mode() const
+{
+ return d->connectionInterface->property("Mode").toUInt();
+}
+
+quint32 QNetworkManagerInterfaceDeviceWireless::bitrate() const
+{
+ return d->connectionInterface->property("Bitrate").toUInt();
+}
+
+QDBusObjectPath QNetworkManagerInterfaceDeviceWireless::activeAccessPoint() const
+{
+ return d->connectionInterface->property("ActiveAccessPoint").value<QDBusObjectPath>();
+}
+
+quint32 QNetworkManagerInterfaceDeviceWireless::wirelessCapabilities() const
+{
+ return d->connectionInterface->property("WirelelessCapabilities").toUInt();
+}
+
+class QNetworkManagerSettingsPrivate
+{
+public:
+ QDBusInterface *connectionInterface;
+ QString path;
+ bool valid;
+};
+
+QNetworkManagerSettings::QNetworkManagerSettings(const QString &settingsService, QObject *parent)
+ : QObject(parent)
+{
+ d = new QNetworkManagerSettingsPrivate();
+ d->path = settingsService;
+ d->connectionInterface = new QDBusInterface(settingsService,
+ QLatin1String(NM_DBUS_PATH_SETTINGS),
+ QLatin1String(NM_DBUS_IFACE_SETTINGS),
+ dbusConnection);
+ if (!d->connectionInterface->isValid()) {
+ d->valid = false;
+ return;
+ }
+ d->valid = true;
+}
+
+QNetworkManagerSettings::~QNetworkManagerSettings()
+{
+ delete d->connectionInterface;
+ delete d;
+}
+
+bool QNetworkManagerSettings::isValid()
+{
+ return d->valid;
+}
+
+bool QNetworkManagerSettings::setConnections()
+{
+ bool allOk = false;
+
+ if (!dbusConnection.connect(d->path, QLatin1String(NM_DBUS_PATH_SETTINGS),
+ QLatin1String(NM_DBUS_IFACE_SETTINGS), QLatin1String("NewConnection"),
+ this, SIGNAL(newConnection(QDBusObjectPath)))) {
+ allOk = true;
+ }
+
+ return allOk;
+}
+
+QList <QDBusObjectPath> QNetworkManagerSettings::listConnections()
+{
+ QDBusReply<QList<QDBusObjectPath> > reply = d->connectionInterface->call(QLatin1String("ListConnections"));
+ return reply.value();
+}
+
+QDBusInterface *QNetworkManagerSettings::connectionInterface() const
+{
+ return d->connectionInterface;
+}
+
+
+class QNetworkManagerSettingsConnectionPrivate
+{
+public:
+ QDBusInterface *connectionInterface;
+ QString path;
+ QString service;
+ QNmSettingsMap settingsMap;
+ bool valid;
+};
+
+QNetworkManagerSettingsConnection::QNetworkManagerSettingsConnection(const QString &settingsService, const QString &connectionObjectPath, QObject *parent)
+ : QObject(parent), nmDBusHelper(0)
+{
+ qDBusRegisterMetaType<QNmSettingsMap>();
+ d = new QNetworkManagerSettingsConnectionPrivate();
+ d->path = connectionObjectPath;
+ d->service = settingsService;
+ d->connectionInterface = new QDBusInterface(settingsService,
+ d->path,
+ QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION),
+ dbusConnection, parent);
+ if (!d->connectionInterface->isValid()) {
+ d->valid = false;
+ return;
+ }
+ d->valid = true;
+ QDBusReply< QNmSettingsMap > rep = d->connectionInterface->call(QLatin1String("GetSettings"));
+ d->settingsMap = rep.value();
+}
+
+QNetworkManagerSettingsConnection::~QNetworkManagerSettingsConnection()
+{
+ delete d->connectionInterface;
+ delete d;
+}
+
+bool QNetworkManagerSettingsConnection::isValid()
+{
+ return d->valid;
+}
+
+bool QNetworkManagerSettingsConnection::setConnections()
+{
+ if(!isValid() )
+ return false;
+
+ bool allOk = false;
+ if(!dbusConnection.connect(d->service, d->path,
+ QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION), QLatin1String("Updated"),
+ this, SIGNAL(updated(QNmSettingsMap)))) {
+ allOk = true;
+ } else {
+ QDBusError error = dbusConnection.lastError();
+ }
+
+ delete nmDBusHelper;
+ nmDBusHelper = new QNmDBusHelper(this);
+ connect(nmDBusHelper, SIGNAL(pathForSettingsRemoved(const QString &)),
+ this,SIGNAL(removed( const QString &)));
+
+ if (!dbusConnection.connect(d->service, d->path,
+ QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION), QLatin1String("Removed"),
+ nmDBusHelper, SIGNAL(slotSettingsRemoved()))) {
+ allOk = true;
+ }
+
+ return allOk;
+}
+
+QDBusInterface *QNetworkManagerSettingsConnection::connectionInterface() const
+{
+ return d->connectionInterface;
+}
+
+QNmSettingsMap QNetworkManagerSettingsConnection::getSettings()
+{
+ QDBusReply< QNmSettingsMap > rep = d->connectionInterface->call(QLatin1String("GetSettings"));
+ d->settingsMap = rep.value();
+ return d->settingsMap;
+}
+
+NMDeviceType QNetworkManagerSettingsConnection::getType()
+{
+ QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("connection"));
+ while (i != d->settingsMap.end() && i.key() == QLatin1String("connection")) {
+ QMap<QString,QVariant> innerMap = i.value();
+ QMap<QString,QVariant>::const_iterator ii = innerMap.find(QLatin1String("type"));
+ while (ii != innerMap.end() && ii.key() == QLatin1String("type")) {
+ QString devType = ii.value().toString();
+ if (devType == QLatin1String("802-3-ethernet")) {
+ return DEVICE_TYPE_802_3_ETHERNET;
+ }
+ if (devType == QLatin1String("802-11-wireless")) {
+ return DEVICE_TYPE_802_11_WIRELESS;
+ }
+ ii++;
+ }
+ i++;
+ }
+ return DEVICE_TYPE_UNKNOWN;
+}
+
+bool QNetworkManagerSettingsConnection::isAutoConnect()
+{
+ QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("connection"));
+ while (i != d->settingsMap.end() && i.key() == QLatin1String("connection")) {
+ QMap<QString,QVariant> innerMap = i.value();
+ QMap<QString,QVariant>::const_iterator ii = innerMap.find(QLatin1String("autoconnect"));
+ while (ii != innerMap.end() && ii.key() == QLatin1String("autoconnect")) {
+ return ii.value().toBool();
+ ii++;
+ }
+ i++;
+ }
+ return true; //default networkmanager is autoconnect
+}
+
+quint64 QNetworkManagerSettingsConnection::getTimestamp()
+{
+ QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("connection"));
+ while (i != d->settingsMap.end() && i.key() == QLatin1String("connection")) {
+ QMap<QString,QVariant> innerMap = i.value();
+ QMap<QString,QVariant>::const_iterator ii = innerMap.find(QLatin1String("timestamp"));
+ while (ii != innerMap.end() && ii.key() == QLatin1String("timestamp")) {
+ return ii.value().toUInt();
+ ii++;
+ }
+ i++;
+ }
+ return 0;
+}
+
+QString QNetworkManagerSettingsConnection::getId()
+{
+ QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("connection"));
+ while (i != d->settingsMap.end() && i.key() == QLatin1String("connection")) {
+ QMap<QString,QVariant> innerMap = i.value();
+ QMap<QString,QVariant>::const_iterator ii = innerMap.find(QLatin1String("id"));
+ while (ii != innerMap.end() && ii.key() == QLatin1String("id")) {
+ return ii.value().toString();
+ ii++;
+ }
+ i++;
+ }
+ return QString();
+}
+
+QString QNetworkManagerSettingsConnection::getUuid()
+{
+ QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("connection"));
+ while (i != d->settingsMap.end() && i.key() == QLatin1String("connection")) {
+ QMap<QString,QVariant> innerMap = i.value();
+ QMap<QString,QVariant>::const_iterator ii = innerMap.find(QLatin1String("uuid"));
+ while (ii != innerMap.end() && ii.key() == QLatin1String("uuid")) {
+ return ii.value().toString();
+ ii++;
+ }
+ i++;
+ }
+ // is no uuid, return the connection path
+ return d->connectionInterface->path();
+}
+
+QString QNetworkManagerSettingsConnection::getSsid()
+{
+ QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("802-11-wireless"));
+ while (i != d->settingsMap.end() && i.key() == QLatin1String("802-11-wireless")) {
+ QMap<QString,QVariant> innerMap = i.value();
+ QMap<QString,QVariant>::const_iterator ii = innerMap.find(QLatin1String("ssid"));
+ while (ii != innerMap.end() && ii.key() == QLatin1String("ssid")) {
+ return ii.value().toString();
+ ii++;
+ }
+ i++;
+ }
+ return QString();
+}
+
+QString QNetworkManagerSettingsConnection::getMacAddress()
+{
+ if(getType() == DEVICE_TYPE_802_3_ETHERNET) {
+ QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("802-3-ethernet"));
+ while (i != d->settingsMap.end() && i.key() == QLatin1String("802-3-ethernet")) {
+ QMap<QString,QVariant> innerMap = i.value();
+ QMap<QString,QVariant>::const_iterator ii = innerMap.find(QLatin1String("mac-address"));
+ while (ii != innerMap.end() && ii.key() == QLatin1String("mac-address")) {
+ return ii.value().toString();
+ ii++;
+ }
+ i++;
+ }
+ }
+
+ else if(getType() == DEVICE_TYPE_802_11_WIRELESS) {
+ QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("802-11-wireless"));
+ while (i != d->settingsMap.end() && i.key() == QLatin1String("802-11-wireless")) {
+ QMap<QString,QVariant> innerMap = i.value();
+ QMap<QString,QVariant>::const_iterator ii = innerMap.find(QLatin1String("mac-address"));
+ while (ii != innerMap.end() && ii.key() == QLatin1String("mac-address")) {
+ return ii.value().toString();
+ ii++;
+ }
+ i++;
+ }
+ }
+ return QString();
+}
+
+QStringList QNetworkManagerSettingsConnection::getSeenBssids()
+{
+ if(getType() == DEVICE_TYPE_802_11_WIRELESS) {
+ QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("802-11-wireless"));
+ while (i != d->settingsMap.end() && i.key() == QLatin1String("802-11-wireless")) {
+ QMap<QString,QVariant> innerMap = i.value();
+ QMap<QString,QVariant>::const_iterator ii = innerMap.find(QLatin1String("seen-bssids"));
+ while (ii != innerMap.end() && ii.key() == QLatin1String("seen-bssids")) {
+ return ii.value().toStringList();
+ ii++;
+ }
+ i++;
+ }
+ }
+ return QStringList();
+}
+
+class QNetworkManagerConnectionActivePrivate
+{
+public:
+ QDBusInterface *connectionInterface;
+ QString path;
+ bool valid;
+};
+
+QNetworkManagerConnectionActive::QNetworkManagerConnectionActive( const QString &activeConnectionObjectPath, QObject *parent)
+ : QObject(parent), nmDBusHelper(0)
+{
+ d = new QNetworkManagerConnectionActivePrivate();
+ d->path = activeConnectionObjectPath;
+ d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE),
+ d->path,
+ QLatin1String(NM_DBUS_INTERFACE_ACTIVE_CONNECTION),
+ dbusConnection, parent);
+ if (!d->connectionInterface->isValid()) {
+ d->valid = false;
+ return;
+ }
+ d->valid = true;
+}
+
+QNetworkManagerConnectionActive::~QNetworkManagerConnectionActive()
+{
+ delete d->connectionInterface;
+ delete d;
+}
+
+bool QNetworkManagerConnectionActive::isValid()
+{
+ return d->valid;
+}
+
+bool QNetworkManagerConnectionActive::setConnections()
+{
+ if(!isValid() )
+ return false;
+
+ bool allOk = false;
+ delete nmDBusHelper;
+ nmDBusHelper = new QNmDBusHelper(this);
+ connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(const QString &,QMap<QString,QVariant>)),
+ this,SIGNAL(propertiesChanged( const QString &, QMap<QString,QVariant>)));
+ if(dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
+ d->path,
+ QLatin1String(NM_DBUS_INTERFACE_ACTIVE_CONNECTION),
+ QLatin1String("PropertiesChanged"),
+ nmDBusHelper,SLOT(slotPropertiesChanged( QMap<QString,QVariant>))) ) {
+ allOk = true;
+ }
+
+ return allOk;
+}
+
+QDBusInterface *QNetworkManagerConnectionActive::connectionInterface() const
+{
+ return d->connectionInterface;
+}
+
+QString QNetworkManagerConnectionActive::serviceName() const
+{
+ return d->connectionInterface->property("ServiceName").toString();
+}
+
+QDBusObjectPath QNetworkManagerConnectionActive::connection() const
+{
+ QVariant prop = d->connectionInterface->property("Connection");
+ return prop.value<QDBusObjectPath>();
+}
+
+QDBusObjectPath QNetworkManagerConnectionActive::specificObject() const
+{
+ QVariant prop = d->connectionInterface->property("SpecificObject");
+ return prop.value<QDBusObjectPath>();
+}
+
+QList<QDBusObjectPath> QNetworkManagerConnectionActive::devices() const
+{
+ QVariant prop = d->connectionInterface->property("Devices");
+ return prop.value<QList<QDBusObjectPath> >();
+}
+
+quint32 QNetworkManagerConnectionActive::state() const
+{
+ return d->connectionInterface->property("State").toUInt();
+}
+
+bool QNetworkManagerConnectionActive::defaultRoute() const
+{
+ return d->connectionInterface->property("Default").toBool();
+}
+
+class QNetworkManagerIp4ConfigPrivate
+{
+public:
+ QDBusInterface *connectionInterface;
+ QString path;
+ bool valid;
+};
+
+QNetworkManagerIp4Config::QNetworkManagerIp4Config( const QString &deviceObjectPath, QObject *parent)
+ : QObject(parent)
+{
+ d = new QNetworkManagerIp4ConfigPrivate();
+ d->path = deviceObjectPath;
+ d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE),
+ d->path,
+ QLatin1String(NM_DBUS_INTERFACE_IP4_CONFIG),
+ dbusConnection, parent);
+ if (!d->connectionInterface->isValid()) {
+ d->valid = false;
+ return;
+ }
+ d->valid = true;
+}
+
+QNetworkManagerIp4Config::~QNetworkManagerIp4Config()
+{
+ delete d->connectionInterface;
+ delete d;
+}
+
+bool QNetworkManagerIp4Config::isValid()
+{
+ return d->valid;
+}
+
+QStringList QNetworkManagerIp4Config::domains() const
+{
+ return d->connectionInterface->property("Domains").toStringList();
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h
new file mode 100644
index 0000000000..048f628108
--- /dev/null
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h
@@ -0,0 +1,445 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QNETWORKMANAGERSERVICE_H
+#define QNETWORKMANAGERSERVICE_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtDBus/QtDBus>
+#include <QtDBus/QDBusConnection>
+#include <QtDBus/QDBusError>
+#include <QtDBus/QDBusInterface>
+#include <QtDBus/QDBusMessage>
+#include <QtDBus/QDBusReply>
+#include <QNetworkInterface>
+
+
+#include <QtDBus/QDBusPendingCallWatcher>
+#include <QtDBus/QDBusObjectPath>
+#include <QtDBus/QDBusContext>
+#include <QMap>
+#include "qnmdbushelper.h"
+
+#ifndef NETWORK_MANAGER_H
+typedef enum NMDeviceType
+{
+ DEVICE_TYPE_UNKNOWN = 0,
+ DEVICE_TYPE_802_3_ETHERNET,
+ DEVICE_TYPE_802_11_WIRELESS,
+ DEVICE_TYPE_GSM,
+ DEVICE_TYPE_CDMA
+} NMDeviceType;
+
+typedef enum
+{
+ NM_DEVICE_STATE_UNKNOWN = 0,
+ NM_DEVICE_STATE_UNMANAGED,
+ NM_DEVICE_STATE_UNAVAILABLE,
+ NM_DEVICE_STATE_DISCONNECTED,
+ NM_DEVICE_STATE_PREPARE,
+ NM_DEVICE_STATE_CONFIG,
+ NM_DEVICE_STATE_NEED_AUTH,
+ NM_DEVICE_STATE_IP_CONFIG,
+ NM_DEVICE_STATE_ACTIVATED,
+ NM_DEVICE_STATE_FAILED
+} NMDeviceState;
+
+typedef enum
+{
+ NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0,
+ NM_ACTIVE_CONNECTION_STATE_ACTIVATING,
+ NM_ACTIVE_CONNECTION_STATE_ACTIVATED
+} NMActiveConnectionState;
+
+#define NM_DBUS_SERVICE "org.freedesktop.NetworkManager"
+
+#define NM_DBUS_PATH "/org/freedesktop/NetworkManager"
+#define NM_DBUS_INTERFACE "org.freedesktop.NetworkManager"
+#define NM_DBUS_INTERFACE_DEVICE NM_DBUS_INTERFACE ".Device"
+#define NM_DBUS_INTERFACE_DEVICE_WIRED NM_DBUS_INTERFACE_DEVICE ".Wired"
+#define NM_DBUS_INTERFACE_DEVICE_WIRELESS NM_DBUS_INTERFACE_DEVICE ".Wireless"
+#define NM_DBUS_PATH_ACCESS_POINT NM_DBUS_PATH "/AccessPoint"
+#define NM_DBUS_INTERFACE_ACCESS_POINT NM_DBUS_INTERFACE ".AccessPoint"
+
+#define NM_DBUS_PATH_SETTINGS "/org/freedesktop/NetworkManagerSettings"
+
+#define NM_DBUS_IFACE_SETTINGS_CONNECTION "org.freedesktop.NetworkManagerSettings.Connection"
+#define NM_DBUS_IFACE_SETTINGS "org.freedesktop.NetworkManagerSettings"
+#define NM_DBUS_INTERFACE_ACTIVE_CONNECTION NM_DBUS_INTERFACE ".Connection.Active"
+#define NM_DBUS_INTERFACE_IP4_CONFIG NM_DBUS_INTERFACE ".IP4Config"
+
+#define NM_DBUS_SERVICE_USER_SETTINGS "org.freedesktop.NetworkManagerUserSettings"
+#define NM_DBUS_SERVICE_SYSTEM_SETTINGS "org.freedesktop.NetworkManagerSystemSettings"
+
+#define NM_802_11_AP_FLAGS_NONE 0x00000000
+#define NM_802_11_AP_FLAGS_PRIVACY 0x00000001
+#endif
+
+QT_BEGIN_NAMESPACE
+
+typedef QMap< QString, QMap<QString,QVariant> > QNmSettingsMap;
+typedef QList<quint32> ServerThing;
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QNmSettingsMap))
+Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(ServerThing))
+
+QT_BEGIN_NAMESPACE
+
+class QNetworkManagerInterfacePrivate;
+class QNetworkManagerInterface : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ QNetworkManagerInterface(QObject *parent = 0);
+ ~QNetworkManagerInterface();
+
+ QList <QDBusObjectPath> getDevices() const;
+ void activateConnection(const QString &serviceName, QDBusObjectPath connection, QDBusObjectPath device, QDBusObjectPath specificObject);
+ void deactivateConnection(QDBusObjectPath connectionPath) const;
+
+ QDBusObjectPath path() const;
+ QDBusInterface *connectionInterface() const;
+
+ bool wirelessEnabled() const;
+ bool wirelessHardwareEnabled() const;
+ QList <QDBusObjectPath> activeConnections() const;
+ quint32 state();
+ bool setConnections();
+ bool isValid();
+
+Q_SIGNALS:
+ void deviceAdded(QDBusObjectPath);
+ void deviceRemoved(QDBusObjectPath);
+ void propertiesChanged( const QString &, QMap<QString,QVariant>);
+ void stateChanged(const QString&, quint32);
+ void activationFinished(QDBusPendingCallWatcher*);
+
+private Q_SLOTS:
+private:
+ QNetworkManagerInterfacePrivate *d;
+ QNmDBusHelper *nmDBusHelper;
+};
+
+class QNetworkManagerInterfaceAccessPointPrivate;
+class QNetworkManagerInterfaceAccessPoint : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ enum DeviceState {
+ Unknown = 0,
+ Unmanaged,
+ Unavailable,
+ Disconnected,
+ Prepare,
+ Config,
+ NeedAuthentication,
+ IpConfig,
+ Activated,
+ Failed
+ };
+
+ enum ApFlag {
+ ApNone = 0x0,
+ Privacy = 0x1
+ };
+
+ Q_DECLARE_FLAGS(ApFlags, ApFlag);
+
+ enum ApSecurityFlag {
+ ApSecurityNone = 0x0,
+ PairWep40 = 0x1,
+ PairWep104 = 0x2,
+ PairTkip = 0x4,
+ PairCcmp = 0x8,
+ GroupWep40 = 0x10,
+ GroupWep104 = 0x20,
+ GroupTkip = 0x40,
+ GroupCcmp = 0x80,
+ KeyPsk = 0x100,
+ Key8021x = 0x200
+ };
+
+ Q_DECLARE_FLAGS(ApSecurityFlags, ApSecurityFlag);
+
+ QNetworkManagerInterfaceAccessPoint(const QString &dbusPathName, QObject *parent = 0);
+ ~QNetworkManagerInterfaceAccessPoint();
+
+ QDBusInterface *connectionInterface() const;
+
+ quint32 flags() const;
+ quint32 wpaFlags() const;
+ quint32 rsnFlags() const;
+ QString ssid() const;
+ quint32 frequency() const;
+ QString hwAddress() const;
+ quint32 mode() const;
+ quint32 maxBitrate() const;
+ quint32 strength() const;
+ bool setConnections();
+ bool isValid();
+
+Q_SIGNALS:
+ void propertiesChanged(QMap <QString,QVariant>);
+ void propertiesChanged( const QString &, QMap<QString,QVariant>);
+private:
+ QNetworkManagerInterfaceAccessPointPrivate *d;
+ QNmDBusHelper *nmDBusHelper;
+
+};
+
+class QNetworkManagerInterfaceDevicePrivate;
+class QNetworkManagerInterfaceDevice : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ QNetworkManagerInterfaceDevice(const QString &deviceObjectPath, QObject *parent = 0);
+ ~QNetworkManagerInterfaceDevice();
+
+ QString udi() const;
+ QNetworkInterface networkInterface() const;
+ QDBusInterface *connectionInterface() const;
+ quint32 ip4Address() const;
+ quint32 state() const;
+ quint32 deviceType() const;
+
+ QDBusObjectPath ip4config() const;
+ bool setConnections();
+ bool isValid();
+
+Q_SIGNALS:
+ void stateChanged(const QString &, quint32);
+
+private:
+ QNetworkManagerInterfaceDevicePrivate *d;
+ QNmDBusHelper *nmDBusHelper;
+};
+
+class QNetworkManagerInterfaceDeviceWiredPrivate;
+class QNetworkManagerInterfaceDeviceWired : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ QNetworkManagerInterfaceDeviceWired(const QString &ifaceDevicePath, QObject *parent = 0);
+ ~QNetworkManagerInterfaceDeviceWired();
+
+ QDBusInterface *connectionInterface() const;
+ QString hwAddress() const;
+ quint32 speed() const;
+ bool carrier() const;
+ bool setConnections();
+ bool isValid();
+
+Q_SIGNALS:
+ void propertiesChanged( const QString &, QMap<QString,QVariant>);
+private:
+ QNetworkManagerInterfaceDeviceWiredPrivate *d;
+ QNmDBusHelper *nmDBusHelper;
+};
+
+class QNetworkManagerInterfaceDeviceWirelessPrivate;
+class QNetworkManagerInterfaceDeviceWireless : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ enum DeviceCapability {
+ None = 0x0,
+ Wep40 = 0x1,
+ Wep104 = 0x2,
+ Tkip = 0x4,
+ Ccmp = 0x8,
+ Wpa = 0x10,
+ Rsn = 0x20
+ };
+
+ QNetworkManagerInterfaceDeviceWireless(const QString &ifaceDevicePath, QObject *parent = 0);
+ ~QNetworkManagerInterfaceDeviceWireless();
+
+ QDBusObjectPath path() const;
+ QList <QDBusObjectPath> getAccessPoints();
+ QDBusInterface *connectionInterface() const;
+
+ QString hwAddress() const;
+ quint32 mode() const;
+ quint32 bitrate() const;
+ QDBusObjectPath activeAccessPoint() const;
+ quint32 wirelessCapabilities() const;
+ bool setConnections();
+ bool isValid();
+
+Q_SIGNALS:
+ void propertiesChanged( const QString &, QMap<QString,QVariant>);
+ void accessPointAdded(const QString &,QDBusObjectPath);
+ void accessPointRemoved(const QString &,QDBusObjectPath);
+private:
+ QNetworkManagerInterfaceDeviceWirelessPrivate *d;
+ QNmDBusHelper *nmDBusHelper;
+};
+
+class QNetworkManagerSettingsPrivate;
+class QNetworkManagerSettings : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ QNetworkManagerSettings(const QString &settingsService, QObject *parent = 0);
+ ~QNetworkManagerSettings();
+
+ QDBusInterface *connectionInterface() const;
+ QList <QDBusObjectPath> listConnections();
+ bool setConnections();
+ bool isValid();
+
+Q_SIGNALS:
+ void newConnection(QDBusObjectPath);
+private:
+ QNetworkManagerSettingsPrivate *d;
+};
+
+class QNetworkManagerSettingsConnectionPrivate;
+class QNetworkManagerSettingsConnection : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ QNetworkManagerSettingsConnection(const QString &settingsService, const QString &connectionObjectPath, QObject *parent = 0);
+ ~QNetworkManagerSettingsConnection();
+
+ QDBusInterface *connectionInterface() const;
+ QNmSettingsMap getSettings();
+ bool setConnections();
+ NMDeviceType getType();
+ bool isAutoConnect();
+ quint64 getTimestamp();
+ QString getId();
+ QString getUuid();
+ QString getSsid();
+ QString getMacAddress();
+ QStringList getSeenBssids();
+ bool isValid();
+
+Q_SIGNALS:
+
+ void updated(const QNmSettingsMap &settings);
+ void removed(const QString &path);
+
+private:
+ QNmDBusHelper *nmDBusHelper;
+ QNetworkManagerSettingsConnectionPrivate *d;
+};
+
+class QNetworkManagerConnectionActivePrivate;
+class QNetworkManagerConnectionActive : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ enum ActiveConnectionState {
+ Unknown = 0,
+ Activating = 1,
+ Activated = 2
+ };
+
+ QNetworkManagerConnectionActive(const QString &dbusPathName, QObject *parent = 0);
+ ~ QNetworkManagerConnectionActive();
+
+ QDBusInterface *connectionInterface() const;
+ QString serviceName() const;
+ QDBusObjectPath connection() const;
+ QDBusObjectPath specificObject() const;
+ QList<QDBusObjectPath> devices() const;
+ quint32 state() const;
+ bool defaultRoute() const;
+ bool setConnections();
+ bool isValid();
+
+
+Q_SIGNALS:
+ void propertiesChanged(QList<QDBusObjectPath>);
+ void propertiesChanged( const QString &, QMap<QString,QVariant>);
+private:
+ QNetworkManagerConnectionActivePrivate *d;
+ QNmDBusHelper *nmDBusHelper;
+};
+
+class QNetworkManagerIp4ConfigPrivate;
+class QNetworkManagerIp4Config : public QObject
+{
+ Q_OBJECT
+
+public:
+ QNetworkManagerIp4Config(const QString &dbusPathName, QObject *parent = 0);
+ ~QNetworkManagerIp4Config();
+
+ QStringList domains() const;
+ bool isValid();
+
+ private:
+ QNetworkManagerIp4ConfigPrivate *d;
+};
+
+QT_END_NAMESPACE
+
+#endif //QNETWORKMANAGERSERVICE_H
diff --git a/src/plugins/bearer/networkmanager/qnmdbushelper.cpp b/src/plugins/bearer/networkmanager/qnmdbushelper.cpp
new file mode 100644
index 0000000000..e195eeb3db
--- /dev/null
+++ b/src/plugins/bearer/networkmanager/qnmdbushelper.cpp
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// this class is for helping qdbus get stuff
+
+#include "qnmdbushelper.h"
+
+#include "qnetworkmanagerservice.h"
+
+#include <QDBusError>
+#include <QDBusInterface>
+#include <QDBusMessage>
+#include <QDBusReply>
+
+#include <QDebug>
+
+QT_BEGIN_NAMESPACE
+
+QNmDBusHelper::QNmDBusHelper(QObject * parent)
+ : QObject(parent)
+{
+}
+
+QNmDBusHelper::~QNmDBusHelper()
+{
+}
+
+void QNmDBusHelper::deviceStateChanged(quint32 state)
+ {
+ QDBusMessage msg = this->message();
+ if(state == NM_DEVICE_STATE_ACTIVATED
+ || state == NM_DEVICE_STATE_DISCONNECTED
+ || state == NM_DEVICE_STATE_UNAVAILABLE
+ || state == NM_DEVICE_STATE_FAILED) {
+ emit pathForStateChanged(msg.path(), state);
+ }
+ }
+
+void QNmDBusHelper::slotAccessPointAdded(QDBusObjectPath path)
+{
+ if(path.path().length() > 2) {
+ QDBusMessage msg = this->message();
+ emit pathForAccessPointAdded(msg.path(), path);
+ }
+}
+
+void QNmDBusHelper::slotAccessPointRemoved(QDBusObjectPath path)
+{
+ if(path.path().length() > 2) {
+ QDBusMessage msg = this->message();
+ emit pathForAccessPointRemoved(msg.path(), path);
+ }
+}
+
+void QNmDBusHelper::slotPropertiesChanged(QMap<QString,QVariant> map)
+{
+ QDBusMessage msg = this->message();
+ QMapIterator<QString, QVariant> i(map);
+ while (i.hasNext()) {
+ i.next();
+ if( i.key() == "State") { //state only applies to device interfaces
+ quint32 state = i.value().toUInt();
+ if( state == NM_DEVICE_STATE_ACTIVATED
+ || state == NM_DEVICE_STATE_DISCONNECTED
+ || state == NM_DEVICE_STATE_UNAVAILABLE
+ || state == NM_DEVICE_STATE_FAILED) {
+ emit pathForPropertiesChanged( msg.path(), map);
+ }
+ } else if( i.key() == "ActiveAccessPoint") {
+ emit pathForPropertiesChanged(msg.path(), map);
+ // qWarning() << __PRETTY_FUNCTION__ << i.key() << ": " << i.value().value<QDBusObjectPath>().path();
+ // } else if( i.key() == "Strength")
+ // qWarning() << __PRETTY_FUNCTION__ << i.key() << ": " << i.value().toUInt();
+ // else
+ // qWarning() << __PRETTY_FUNCTION__ << i.key() << ": " << i.value();
+ } else if (i.key() == "ActiveConnections") {
+ emit pathForPropertiesChanged(msg.path(), map);
+ }
+ }
+}
+
+void QNmDBusHelper::slotSettingsRemoved()
+{
+ QDBusMessage msg = this->message();
+ emit pathForSettingsRemoved(msg.path());
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/bearer/networkmanager/qnmdbushelper.h b/src/plugins/bearer/networkmanager/qnmdbushelper.h
new file mode 100644
index 0000000000..933d55a2ca
--- /dev/null
+++ b/src/plugins/bearer/networkmanager/qnmdbushelper.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QNMDBUSHELPERPRIVATE_H
+#define QNMDBUSHELPERPRIVATE_H
+
+#include <QDBusObjectPath>
+#include <QDBusContext>
+#include <QMap>
+
+QT_BEGIN_NAMESPACE
+
+class QNmDBusHelper: public QObject, protected QDBusContext
+ {
+ Q_OBJECT
+ public:
+ QNmDBusHelper(QObject *parent = 0);
+ ~QNmDBusHelper();
+
+ public slots:
+ void deviceStateChanged(quint32);
+ void slotAccessPointAdded( QDBusObjectPath );
+ void slotAccessPointRemoved( QDBusObjectPath );
+ void slotPropertiesChanged( QMap<QString,QVariant>);
+ void slotSettingsRemoved();
+
+Q_SIGNALS:
+ void pathForStateChanged(const QString &, quint32);
+ void pathForAccessPointAdded(const QString &, QDBusObjectPath );
+ void pathForAccessPointRemoved(const QString &, QDBusObjectPath );
+ void pathForPropertiesChanged(const QString &, QMap<QString,QVariant>);
+ void pathForSettingsRemoved(const QString &);
+};
+
+QT_END_NAMESPACE
+
+#endif// QNMDBUSHELPERPRIVATE_H
diff --git a/src/plugins/bearer/nla/main.cpp b/src/plugins/bearer/nla/main.cpp
new file mode 100644
index 0000000000..479a933240
--- /dev/null
+++ b/src/plugins/bearer/nla/main.cpp
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qnlaengine.h"
+
+#include <QtNetwork/private/qbearerplugin_p.h>
+
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+class QNlaEnginePlugin : public QBearerEnginePlugin
+{
+public:
+ QNlaEnginePlugin();
+ ~QNlaEnginePlugin();
+
+ QStringList keys() const;
+ QBearerEngine *create(const QString &key) const;
+};
+
+QNlaEnginePlugin::QNlaEnginePlugin()
+{
+}
+
+QNlaEnginePlugin::~QNlaEnginePlugin()
+{
+}
+
+QStringList QNlaEnginePlugin::keys() const
+{
+ return QStringList() << QLatin1String("nla");
+}
+
+QBearerEngine *QNlaEnginePlugin::create(const QString &key) const
+{
+ if (key == QLatin1String("nla"))
+ return new QNlaEngine;
+ else
+ return 0;
+}
+
+Q_EXPORT_STATIC_PLUGIN(QNlaEnginePlugin)
+Q_EXPORT_PLUGIN2(qnlabearer, QNlaEnginePlugin)
+
+QT_END_NAMESPACE
diff --git a/src/plugins/bearer/nla/nla.pro b/src/plugins/bearer/nla/nla.pro
new file mode 100644
index 0000000000..5148b09a22
--- /dev/null
+++ b/src/plugins/bearer/nla/nla.pro
@@ -0,0 +1,23 @@
+TARGET = qnlabearer
+include(../../qpluginbase.pri)
+
+QT += network
+
+!wince* {
+ LIBS += -lWs2_32
+} else {
+ LIBS += -lWs2
+}
+
+HEADERS += qnlaengine.h \
+ ../platformdefs_win.h \
+ ../qnetworksession_impl.h \
+ ../qbearerengine_impl.h
+
+SOURCES += main.cpp \
+ qnlaengine.cpp \
+ ../qnetworksession_impl.cpp
+
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer
+target.path += $$[QT_INSTALL_PLUGINS]/bearer
+INSTALLS += target
diff --git a/src/plugins/bearer/nla/qnlaengine.cpp b/src/plugins/bearer/nla/qnlaengine.cpp
new file mode 100644
index 0000000000..334eb14a3c
--- /dev/null
+++ b/src/plugins/bearer/nla/qnlaengine.cpp
@@ -0,0 +1,647 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qnlaengine.h"
+#include "../qnetworksession_impl.h"
+
+#include <QtNetwork/private/qnetworkconfiguration_p.h>
+
+#include <QtCore/qthread.h>
+#include <QtCore/qmutex.h>
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qstringlist.h>
+
+#include <QtCore/qdebug.h>
+
+#include "../platformdefs_win.h"
+
+QT_BEGIN_NAMESPACE
+
+QWindowsSockInit2::QWindowsSockInit2()
+: version(0)
+{
+ //### should we try for 2.2 on all platforms ??
+ WSAData wsadata;
+
+ // IPv6 requires Winsock v2.0 or better.
+ if (WSAStartup(MAKEWORD(2,0), &wsadata) != 0) {
+ qWarning("QBearerManagementAPI: WinSock v2.0 initialization failed.");
+ } else {
+ version = 0x20;
+ }
+}
+
+QWindowsSockInit2::~QWindowsSockInit2()
+{
+ WSACleanup();
+}
+
+#ifdef BEARER_MANAGEMENT_DEBUG
+static void printBlob(NLA_BLOB *blob)
+{
+ qDebug() << "==== BEGIN NLA_BLOB ====";
+
+ qDebug() << "type:" << blob->header.type;
+ qDebug() << "size:" << blob->header.dwSize;
+ qDebug() << "next offset:" << blob->header.nextOffset;
+
+ switch (blob->header.type) {
+ case NLA_RAW_DATA:
+ qDebug() << "Raw Data";
+ qDebug() << '\t' << blob->data.rawData;
+ break;
+ case NLA_INTERFACE:
+ qDebug() << "Interface";
+ qDebug() << "\ttype:" << blob->data.interfaceData.dwType;
+ qDebug() << "\tspeed:" << blob->data.interfaceData.dwSpeed;
+ qDebug() << "\tadapter:" << blob->data.interfaceData.adapterName;
+ break;
+ case NLA_802_1X_LOCATION:
+ qDebug() << "802.1x Location";
+ qDebug() << '\t' << blob->data.locationData.information;
+ break;
+ case NLA_CONNECTIVITY:
+ qDebug() << "Connectivity";
+ qDebug() << "\ttype:" << blob->data.connectivity.type;
+ qDebug() << "\tinternet:" << blob->data.connectivity.internet;
+ break;
+ case NLA_ICS:
+ qDebug() << "ICS";
+ qDebug() << "\tspeed:" << blob->data.ICS.remote.speed;
+ qDebug() << "\ttype:" << blob->data.ICS.remote.type;
+ qDebug() << "\tstate:" << blob->data.ICS.remote.state;
+ qDebug() << "\tmachine name:" << blob->data.ICS.remote.machineName;
+ qDebug() << "\tshared adapter name:" << blob->data.ICS.remote.sharedAdapterName;
+ break;
+ default:
+ qDebug() << "UNKNOWN BLOB TYPE";
+ }
+
+ qDebug() << "===== END NLA_BLOB =====";
+}
+#endif
+
+static QString qGetInterfaceType(const QString &interface)
+{
+#ifdef Q_OS_WINCE
+ Q_UNUSED(interface)
+#else
+ unsigned long oid;
+ DWORD bytesWritten;
+
+ NDIS_MEDIUM medium;
+ NDIS_PHYSICAL_MEDIUM physicalMedium;
+
+ HANDLE handle = CreateFile((TCHAR *)QString(QLatin1String("\\\\.\\%1")).arg(interface).utf16(),
+ 0, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
+ if (handle == INVALID_HANDLE_VALUE)
+ return QLatin1String("Unknown");
+
+ oid = OID_GEN_MEDIA_SUPPORTED;
+ bytesWritten = 0;
+ bool result = DeviceIoControl(handle, IOCTL_NDIS_QUERY_GLOBAL_STATS, &oid, sizeof(oid),
+ &medium, sizeof(medium), &bytesWritten, 0);
+ if (!result) {
+ CloseHandle(handle);
+ return QLatin1String("Unknown");
+ }
+
+ oid = OID_GEN_PHYSICAL_MEDIUM;
+ bytesWritten = 0;
+ result = DeviceIoControl(handle, IOCTL_NDIS_QUERY_GLOBAL_STATS, &oid, sizeof(oid),
+ &physicalMedium, sizeof(physicalMedium), &bytesWritten, 0);
+ if (!result) {
+ CloseHandle(handle);
+
+ if (medium == NdisMedium802_3)
+ return QLatin1String("Ethernet");
+ else
+ return QLatin1String("Unknown");
+ }
+
+ CloseHandle(handle);
+
+ if (medium == NdisMedium802_3) {
+ switch (physicalMedium) {
+ case NdisPhysicalMediumWirelessLan:
+ return QLatin1String("WLAN");
+ case NdisPhysicalMediumBluetooth:
+ return QLatin1String("Bluetooth");
+ case NdisPhysicalMediumWiMax:
+ return QLatin1String("WiMAX");
+ default:
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "Physical Medium" << physicalMedium;
+#endif
+ return QLatin1String("Ethernet");
+ }
+ }
+
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << medium << physicalMedium;
+#endif
+
+#endif
+
+ return QLatin1String("Unknown");
+}
+
+class QNlaThread : public QThread
+{
+ Q_OBJECT
+
+public:
+ QNlaThread(QNlaEngine *parent = 0);
+ ~QNlaThread();
+
+ QList<QNetworkConfigurationPrivate *> getConfigurations();
+
+ void forceUpdate();
+
+protected:
+ virtual void run();
+
+private:
+ void updateConfigurations(QList<QNetworkConfigurationPrivate *> &configs);
+ DWORD parseBlob(NLA_BLOB *blob, QNetworkConfigurationPrivate *cpPriv) const;
+ QNetworkConfigurationPrivate *parseQuerySet(const WSAQUERYSET *querySet) const;
+ void fetchConfigurations();
+
+signals:
+ void networksChanged();
+
+private:
+ QMutex mutex;
+ HANDLE handle;
+ bool done;
+ QList<QNetworkConfigurationPrivate *> fetchedConfigurations;
+};
+
+QNlaThread::QNlaThread(QNlaEngine *parent)
+: QThread(parent), handle(0), done(false)
+{
+}
+
+QNlaThread::~QNlaThread()
+{
+ mutex.lock();
+
+ done = true;
+
+ if (handle) {
+ /* cancel completion event */
+ if (WSALookupServiceEnd(handle) == SOCKET_ERROR) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("WSALookupServiceEnd error %d", WSAGetLastError());
+#endif
+ }
+ }
+ mutex.unlock();
+
+ wait();
+}
+
+QList<QNetworkConfigurationPrivate *> QNlaThread::getConfigurations()
+{
+ QMutexLocker locker(&mutex);
+
+ QList<QNetworkConfigurationPrivate *> foundConfigurations = fetchedConfigurations;
+ fetchedConfigurations.clear();
+
+ return foundConfigurations;
+}
+
+void QNlaThread::forceUpdate()
+{
+ mutex.lock();
+
+ if (handle) {
+ /* cancel completion event */
+ if (WSALookupServiceEnd(handle) == SOCKET_ERROR) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("WSALookupServiceEnd error %d", WSAGetLastError());
+#endif
+ }
+ handle = 0;
+ }
+ mutex.unlock();
+}
+
+void QNlaThread::run()
+{
+ WSAEVENT changeEvent = WSACreateEvent();
+ if (changeEvent == WSA_INVALID_EVENT)
+ return;
+
+ while (true) {
+ fetchConfigurations();
+
+ WSAQUERYSET qsRestrictions;
+
+ memset(&qsRestrictions, 0, sizeof(qsRestrictions));
+ qsRestrictions.dwSize = sizeof(qsRestrictions);
+ qsRestrictions.dwNameSpace = NS_NLA;
+
+ mutex.lock();
+ if (done) {
+ mutex.unlock();
+ break;
+ }
+ int result = WSALookupServiceBegin(&qsRestrictions, LUP_RETURN_ALL, &handle);
+ mutex.unlock();
+
+ if (result == SOCKET_ERROR)
+ break;
+
+ WSACOMPLETION completion;
+ WSAOVERLAPPED overlapped;
+
+ memset(&overlapped, 0, sizeof(overlapped));
+ overlapped.hEvent = changeEvent;
+
+ memset(&completion, 0, sizeof(completion));
+ completion.Type = NSP_NOTIFY_EVENT;
+ completion.Parameters.Event.lpOverlapped = &overlapped;
+
+ DWORD bytesReturned = 0;
+ result = WSANSPIoctl(handle, SIO_NSP_NOTIFY_CHANGE, 0, 0, 0, 0,
+ &bytesReturned, &completion);
+ if (result == SOCKET_ERROR) {
+ if (WSAGetLastError() != WSA_IO_PENDING)
+ break;
+ }
+
+#ifndef Q_OS_WINCE
+ // Not interested in unrelated IO completion events
+ // although we also don't want to block them
+ while (WaitForSingleObjectEx(changeEvent, WSA_INFINITE, true) != WAIT_IO_COMPLETION &&
+ handle)
+ {
+ }
+#else
+ WaitForSingleObject(changeEvent, WSA_INFINITE);
+#endif
+
+ mutex.lock();
+ if (handle) {
+ result = WSALookupServiceEnd(handle);
+ if (result == SOCKET_ERROR) {
+ mutex.unlock();
+ break;
+ }
+ handle = 0;
+ }
+ mutex.unlock();
+ }
+
+ WSACloseEvent(changeEvent);
+}
+
+void QNlaThread::updateConfigurations(QList<QNetworkConfigurationPrivate *> &configs)
+{
+ mutex.lock();
+
+ while (!fetchedConfigurations.isEmpty())
+ delete fetchedConfigurations.takeFirst();
+
+ fetchedConfigurations = configs;
+
+ mutex.unlock();
+
+ emit networksChanged();
+}
+
+DWORD QNlaThread::parseBlob(NLA_BLOB *blob, QNetworkConfigurationPrivate *cpPriv) const
+{
+#ifdef BEARER_MANAGEMENT_DEBUG
+ printBlob(blob);
+#endif
+
+ switch (blob->header.type) {
+ case NLA_RAW_DATA:
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("%s: unhandled header type NLA_RAW_DATA", __FUNCTION__);
+#endif
+ break;
+ case NLA_INTERFACE:
+ cpPriv->state = QNetworkConfiguration::Active;
+ if (QNlaEngine *engine = qobject_cast<QNlaEngine *>(parent())) {
+ engine->configurationInterface[cpPriv->id.toUInt()] =
+ QString::fromLatin1(blob->data.interfaceData.adapterName);
+ }
+ break;
+ case NLA_802_1X_LOCATION:
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("%s: unhandled header type NLA_802_1X_LOCATION", __FUNCTION__);
+#endif
+ break;
+ case NLA_CONNECTIVITY:
+ if (blob->data.connectivity.internet == NLA_INTERNET_YES)
+ cpPriv->internet = true;
+ else
+ cpPriv->internet = false;
+ break;
+ case NLA_ICS:
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("%s: unhandled header type NLA_ICS", __FUNCTION__);
+#endif
+ break;
+ default:
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("%s: unhandled header type %d", __FUNCTION__, blob->header.type);
+#endif
+ ;
+ }
+
+ return blob->header.nextOffset;
+}
+
+QNetworkConfigurationPrivate *QNlaThread::parseQuerySet(const WSAQUERYSET *querySet) const
+{
+ QNetworkConfigurationPrivate *cpPriv = new QNetworkConfigurationPrivate;
+
+ cpPriv->name = QString::fromWCharArray(querySet->lpszServiceInstanceName);
+ cpPriv->isValid = true;
+ cpPriv->id = QString::number(qHash(QLatin1String("NLA:") + cpPriv->name));
+ cpPriv->state = QNetworkConfiguration::Defined;
+ cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
+
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "size:" << querySet->dwSize;
+ qDebug() << "service instance name:" << QString::fromUtf16(querySet->lpszServiceInstanceName);
+ qDebug() << "service class id:" << querySet->lpServiceClassId;
+ qDebug() << "version:" << querySet->lpVersion;
+ qDebug() << "comment:" << QString::fromUtf16(querySet->lpszComment);
+ qDebug() << "namespace:" << querySet->dwNameSpace;
+ qDebug() << "namespace provider id:" << querySet->lpNSProviderId;
+ qDebug() << "context:" << QString::fromUtf16(querySet->lpszContext);
+ qDebug() << "number of protocols:" << querySet->dwNumberOfProtocols;
+ qDebug() << "protocols:" << querySet->lpafpProtocols;
+ qDebug() << "query string:" << QString::fromUtf16(querySet->lpszQueryString);
+ qDebug() << "number of cs addresses:" << querySet->dwNumberOfCsAddrs;
+ qDebug() << "cs addresses:" << querySet->lpcsaBuffer;
+ qDebug() << "output flags:" << querySet->dwOutputFlags;
+#endif
+
+ if (querySet->lpBlob) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug() << "blob size:" << querySet->lpBlob->cbSize;
+ qDebug() << "blob data:" << querySet->lpBlob->pBlobData;
+#endif
+
+ DWORD offset = 0;
+ do {
+ NLA_BLOB *blob = reinterpret_cast<NLA_BLOB *>(querySet->lpBlob->pBlobData + offset);
+ DWORD nextOffset = parseBlob(blob, cpPriv);
+ if (nextOffset == offset)
+ break;
+ else
+ offset = nextOffset;
+ } while (offset != 0 && offset < querySet->lpBlob->cbSize);
+ }
+
+ if (QNlaEngine *engine = qobject_cast<QNlaEngine *>(parent()))
+ cpPriv->bearer = engine->bearerName(cpPriv->id);
+
+ return cpPriv;
+}
+
+void QNlaThread::fetchConfigurations()
+{
+ QList<QNetworkConfigurationPrivate *> foundConfigurations;
+
+ WSAQUERYSET qsRestrictions;
+ HANDLE hLookup = 0;
+
+ memset(&qsRestrictions, 0, sizeof(qsRestrictions));
+ qsRestrictions.dwSize = sizeof(qsRestrictions);
+ qsRestrictions.dwNameSpace = NS_NLA;
+
+ int result = WSALookupServiceBegin(&qsRestrictions, LUP_RETURN_ALL | LUP_DEEP, &hLookup);
+ if (result == SOCKET_ERROR) {
+ mutex.lock();
+ fetchedConfigurations.clear();
+ mutex.unlock();
+ }
+
+ char buffer[0x10000];
+ while (result == 0) {
+ DWORD bufferLength = sizeof(buffer);
+ result = WSALookupServiceNext(hLookup, LUP_RETURN_ALL,
+ &bufferLength, reinterpret_cast<WSAQUERYSET *>(buffer));
+
+ if (result == SOCKET_ERROR)
+ break;
+
+ QNetworkConfigurationPrivate *cpPriv =
+ parseQuerySet(reinterpret_cast<WSAQUERYSET *>(buffer));
+
+ foundConfigurations.append(cpPriv);
+ }
+
+ if (hLookup) {
+ result = WSALookupServiceEnd(hLookup);
+ if (result == SOCKET_ERROR) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+ qDebug("WSALookupServiceEnd error %d", WSAGetLastError());
+#endif
+ }
+ }
+
+ updateConfigurations(foundConfigurations);
+}
+
+QNlaEngine::QNlaEngine(QObject *parent)
+: QBearerEngineImpl(parent), nlaThread(0)
+{
+ nlaThread = new QNlaThread(this);
+ connect(nlaThread, SIGNAL(networksChanged()),
+ this, SLOT(networksChanged()));
+ nlaThread->start();
+
+ qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
+}
+
+QNlaEngine::~QNlaEngine()
+{
+ delete nlaThread;
+}
+
+void QNlaEngine::networksChanged()
+{
+ QMutexLocker locker(&mutex);
+
+ QStringList previous = accessPointConfigurations.keys();
+
+ QList<QNetworkConfigurationPrivate *> foundConfigurations = nlaThread->getConfigurations();
+ while (!foundConfigurations.isEmpty()) {
+ QNetworkConfigurationPrivate *cpPriv = foundConfigurations.takeFirst();
+
+ previous.removeAll(cpPriv->id);
+
+ if (accessPointConfigurations.contains(cpPriv->id)) {
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(cpPriv->id);
+
+ bool changed = false;
+
+ if (ptr->isValid != cpPriv->isValid) {
+ ptr->isValid = cpPriv->isValid;
+ changed = true;
+ }
+
+ if (ptr->name != cpPriv->name) {
+ ptr->name = cpPriv->name;
+ changed = true;
+ }
+
+ if (ptr->state != cpPriv->state) {
+ ptr->state = cpPriv->state;
+ changed = true;
+ }
+
+ if (changed)
+ emit configurationChanged(ptr);
+
+ delete cpPriv;
+ } else {
+ QNetworkConfigurationPrivatePointer ptr(cpPriv);
+
+ accessPointConfigurations.insert(ptr->id, ptr);
+
+ emit configurationAdded(ptr);
+ }
+ }
+
+ while (!previous.isEmpty()) {
+ QNetworkConfigurationPrivatePointer ptr =
+ accessPointConfigurations.take(previous.takeFirst());
+
+ emit configurationRemoved(ptr);
+ }
+
+ emit updateCompleted();
+}
+
+QString QNlaEngine::getInterfaceFromId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ return configurationInterface.value(id.toUInt());
+}
+
+bool QNlaEngine::hasIdentifier(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ return configurationInterface.contains(id.toUInt());
+}
+
+QString QNlaEngine::bearerName(const QString &id)
+{
+ QString interface = getInterfaceFromId(id);
+
+ if (interface.isEmpty())
+ return QString();
+
+ return qGetInterfaceType(interface);
+}
+
+void QNlaEngine::connectToId(const QString &id)
+{
+ emit connectionError(id, OperationNotSupported);
+}
+
+void QNlaEngine::disconnectFromId(const QString &id)
+{
+ emit connectionError(id, OperationNotSupported);
+}
+
+void QNlaEngine::requestUpdate()
+{
+ QMutexLocker locker(&mutex);
+
+ nlaThread->forceUpdate();
+}
+
+QNetworkSession::State QNlaEngine::sessionStateForId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+
+ if (!ptr)
+ return QNetworkSession::Invalid;
+
+ if (!ptr->isValid) {
+ return QNetworkSession::Invalid;
+ } else if ((ptr->state & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
+ return QNetworkSession::Connected;
+ } else if ((ptr->state & QNetworkConfiguration::Discovered) ==
+ QNetworkConfiguration::Discovered) {
+ return QNetworkSession::Disconnected;
+ } else if ((ptr->state & QNetworkConfiguration::Defined) == QNetworkConfiguration::Defined) {
+ return QNetworkSession::NotAvailable;
+ } else if ((ptr->state & QNetworkConfiguration::Undefined) ==
+ QNetworkConfiguration::Undefined) {
+ return QNetworkSession::NotAvailable;
+ }
+
+ return QNetworkSession::Invalid;
+}
+
+QNetworkConfigurationManager::Capabilities QNlaEngine::capabilities() const
+{
+ return QNetworkConfigurationManager::ForcedRoaming;
+}
+
+QNetworkSessionPrivate *QNlaEngine::createSessionBackend()
+{
+ return new QNetworkSessionPrivateImpl;
+}
+
+QNetworkConfigurationPrivatePointer QNlaEngine::defaultConfiguration()
+{
+ return QNetworkConfigurationPrivatePointer();
+}
+
+#include "qnlaengine.moc"
+QT_END_NAMESPACE
+
diff --git a/src/plugins/bearer/nla/qnlaengine.h b/src/plugins/bearer/nla/qnlaengine.h
new file mode 100644
index 0000000000..14c5201de7
--- /dev/null
+++ b/src/plugins/bearer/nla/qnlaengine.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QNLAENGINE_P_H
+#define QNLAENGINE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "../qbearerengine_impl.h"
+
+#include <QtNetwork/private/qnativesocketengine_p.h>
+
+#include <QMap>
+
+QT_BEGIN_NAMESPACE
+
+class QNetworkConfigurationPrivate;
+class QNlaThread;
+
+class QWindowsSockInit2
+{
+public:
+ QWindowsSockInit2();
+ ~QWindowsSockInit2();
+ int version;
+};
+
+class QNlaEngine : public QBearerEngineImpl
+{
+ Q_OBJECT
+
+ friend class QNlaThread;
+
+public:
+ QNlaEngine(QObject *parent = 0);
+ ~QNlaEngine();
+
+ QString getInterfaceFromId(const QString &id);
+ bool hasIdentifier(const QString &id);
+
+ QString bearerName(const QString &id);
+
+ void connectToId(const QString &id);
+ void disconnectFromId(const QString &id);
+
+ void requestUpdate();
+
+ QNetworkSession::State sessionStateForId(const QString &id);
+
+ QNetworkConfigurationManager::Capabilities capabilities() const;
+
+ QNetworkSessionPrivate *createSessionBackend();
+
+ QNetworkConfigurationPrivatePointer defaultConfiguration();
+
+private Q_SLOTS:
+ void networksChanged();
+
+private:
+ QWindowsSockInit2 winSock;
+ QNlaThread *nlaThread;
+ QMap<uint, QString> configurationInterface;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/plugins/bearer/platformdefs_win.h b/src/plugins/bearer/platformdefs_win.h
new file mode 100644
index 0000000000..37d099cb76
--- /dev/null
+++ b/src/plugins/bearer/platformdefs_win.h
@@ -0,0 +1,134 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_WIN_H
+#define QPLATFORMDEFS_WIN_H
+
+#include <winsock2.h>
+#include <mswsock.h>
+#undef interface
+#include <winioctl.h>
+
+#ifndef NS_NLA
+
+#define NS_NLA 15
+
+enum NLA_BLOB_DATA_TYPE {
+ NLA_RAW_DATA = 0,
+ NLA_INTERFACE = 1,
+ NLA_802_1X_LOCATION = 2,
+ NLA_CONNECTIVITY = 3,
+ NLA_ICS = 4
+};
+
+enum NLA_CONNECTIVITY_TYPE {
+ NLA_NETWORK_AD_HOC = 0,
+ NLA_NETWORK_MANAGED = 1,
+ NLA_NETWORK_UNMANAGED = 2,
+ NLA_NETWORK_UNKNOWN = 3
+};
+
+enum NLA_INTERNET {
+ NLA_INTERNET_UNKNOWN = 0,
+ NLA_INTERNET_NO = 1,
+ NLA_INTERNET_YES = 2
+};
+
+struct NLA_BLOB {
+ struct {
+ NLA_BLOB_DATA_TYPE type;
+ DWORD dwSize;
+ DWORD nextOffset;
+ } header;
+
+ union {
+ // NLA_RAW_DATA
+ CHAR rawData[1];
+
+ // NLA_INTERFACE
+ struct {
+ DWORD dwType;
+ DWORD dwSpeed;
+ CHAR adapterName[1];
+ } interfaceData;
+
+ // NLA_802_1X_LOCATION
+ struct {
+ CHAR information[1];
+ } locationData;
+
+ // NLA_CONNECTIVITY
+ struct {
+ NLA_CONNECTIVITY_TYPE type;
+ NLA_INTERNET internet;
+ } connectivity;
+
+ // NLA_ICS
+ struct {
+ struct {
+ DWORD speed;
+ DWORD type;
+ DWORD state;
+ WCHAR machineName[256];
+ WCHAR sharedAdapterName[256];
+ } remote;
+ } ICS;
+ } data;
+};
+#endif
+
+enum NDIS_MEDIUM {
+ NdisMedium802_3 = 0,
+};
+
+enum NDIS_PHYSICAL_MEDIUM {
+ NdisPhysicalMediumWirelessLan = 1,
+ NdisPhysicalMediumBluetooth = 10,
+ NdisPhysicalMediumWiMax = 12,
+};
+
+#define OID_GEN_MEDIA_SUPPORTED 0x00010103
+#define OID_GEN_PHYSICAL_MEDIUM 0x00010202
+
+#define IOCTL_NDIS_QUERY_GLOBAL_STATS \
+ CTL_CODE(FILE_DEVICE_PHYSICAL_NETCARD, 0, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
+
+#endif
diff --git a/src/plugins/bearer/qbearerengine_impl.h b/src/plugins/bearer/qbearerengine_impl.h
new file mode 100644
index 0000000000..740def3dab
--- /dev/null
+++ b/src/plugins/bearer/qbearerengine_impl.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QBEARERENGINE_IMPL_H
+#define QBEARERENGINE_IMPL_H
+
+#include <QtNetwork/private/qbearerengine_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QBearerEngineImpl : public QBearerEngine
+{
+ Q_OBJECT
+
+public:
+ enum ConnectionError {
+ InterfaceLookupError = 0,
+ ConnectError,
+ OperationNotSupported,
+ DisconnectionError,
+ };
+
+ QBearerEngineImpl(QObject *parent = 0) : QBearerEngine(parent) { }
+ ~QBearerEngineImpl() { }
+
+ virtual void connectToId(const QString &id) = 0;
+ virtual void disconnectFromId(const QString &id) = 0;
+
+ virtual QString getInterfaceFromId(const QString &id) = 0;
+
+ virtual QNetworkSession::State sessionStateForId(const QString &id) = 0;
+
+ virtual quint64 bytesWritten(const QString &) { return Q_UINT64_C(0); }
+ virtual quint64 bytesReceived(const QString &) { return Q_UINT64_C(0); }
+ virtual quint64 startTime(const QString &) { return Q_UINT64_C(0); }
+
+Q_SIGNALS:
+ void connectionError(const QString &id, QBearerEngineImpl::ConnectionError error);
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/plugins/bearer/qnetworksession_impl.cpp b/src/plugins/bearer/qnetworksession_impl.cpp
new file mode 100644
index 0000000000..db1759c60c
--- /dev/null
+++ b/src/plugins/bearer/qnetworksession_impl.cpp
@@ -0,0 +1,441 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qnetworksession_impl.h"
+#include "qbearerengine_impl.h"
+
+#include <QtNetwork/qnetworksession.h>
+#include <QtNetwork/private/qnetworkconfigmanager_p.h>
+
+#include <QtCore/qstringlist.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qmutex.h>
+
+#include <QtNetwork/qnetworkinterface.h>
+
+QT_BEGIN_NAMESPACE
+
+static QBearerEngineImpl *getEngineFromId(const QString &id)
+{
+ QNetworkConfigurationManagerPrivate *priv = qNetworkConfigurationManagerPrivate();
+
+ foreach (QBearerEngine *engine, priv->engines()) {
+ QBearerEngineImpl *engineImpl = qobject_cast<QBearerEngineImpl *>(engine);
+ if (engineImpl && engineImpl->hasIdentifier(id))
+ return engineImpl;
+ }
+
+ return 0;
+}
+
+class QNetworkSessionManagerPrivate : public QObject
+{
+ Q_OBJECT
+
+public:
+ QNetworkSessionManagerPrivate(QObject *parent = 0);
+ ~QNetworkSessionManagerPrivate();
+
+ void forceSessionClose(const QNetworkConfiguration &config);
+
+Q_SIGNALS:
+ void forcedSessionClose(const QNetworkConfiguration &config);
+};
+
+#include "qnetworksession_impl.moc"
+
+Q_GLOBAL_STATIC(QNetworkSessionManagerPrivate, sessionManager);
+
+QNetworkSessionManagerPrivate::QNetworkSessionManagerPrivate(QObject *parent)
+: QObject(parent)
+{
+}
+
+QNetworkSessionManagerPrivate::~QNetworkSessionManagerPrivate()
+{
+}
+
+void QNetworkSessionManagerPrivate::forceSessionClose(const QNetworkConfiguration &config)
+{
+ emit forcedSessionClose(config);
+}
+
+void QNetworkSessionPrivateImpl::syncStateWithInterface()
+{
+ connect(sessionManager(), SIGNAL(forcedSessionClose(QNetworkConfiguration)),
+ this, SLOT(forcedSessionClose(QNetworkConfiguration)));
+
+ opened = false;
+ isOpen = false;
+ state = QNetworkSession::Invalid;
+ lastError = QNetworkSession::UnknownSessionError;
+
+ qRegisterMetaType<QBearerEngineImpl::ConnectionError>
+ ("QBearerEngineImpl::ConnectionError");
+
+ switch (publicConfig.type()) {
+ case QNetworkConfiguration::InternetAccessPoint:
+ activeConfig = publicConfig;
+ engine = getEngineFromId(activeConfig.identifier());
+ if (engine) {
+ qRegisterMetaType<QNetworkConfigurationPrivatePointer>("QNetworkConfigurationPrivatePointer");
+ connect(engine, SIGNAL(configurationChanged(QNetworkConfigurationPrivatePointer)),
+ this, SLOT(configurationChanged(QNetworkConfigurationPrivatePointer)),
+ Qt::QueuedConnection);
+ connect(engine, SIGNAL(connectionError(QString,QBearerEngineImpl::ConnectionError)),
+ this, SLOT(connectionError(QString,QBearerEngineImpl::ConnectionError)),
+ Qt::QueuedConnection);
+ }
+ break;
+ case QNetworkConfiguration::ServiceNetwork:
+ serviceConfig = publicConfig;
+ // Defer setting engine and signals until open().
+ // fall through
+ case QNetworkConfiguration::UserChoice:
+ // Defer setting serviceConfig and activeConfig until open().
+ // fall through
+ default:
+ engine = 0;
+ }
+
+ networkConfigurationsChanged();
+}
+
+void QNetworkSessionPrivateImpl::open()
+{
+ if (serviceConfig.isValid()) {
+ lastError = QNetworkSession::OperationNotSupportedError;
+ emit QNetworkSessionPrivate::error(lastError);
+ } else if (!isOpen) {
+ if ((activeConfig.state() & QNetworkConfiguration::Discovered) !=
+ QNetworkConfiguration::Discovered) {
+ lastError =QNetworkSession::InvalidConfigurationError;
+ state = QNetworkSession::Invalid;
+ emit stateChanged(state);
+ emit QNetworkSessionPrivate::error(lastError);
+ return;
+ }
+ opened = true;
+
+ if ((activeConfig.state() & QNetworkConfiguration::Active) != QNetworkConfiguration::Active &&
+ (activeConfig.state() & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered) {
+ state = QNetworkSession::Connecting;
+ emit stateChanged(state);
+
+ engine->connectToId(activeConfig.identifier());
+ }
+
+ isOpen = (activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active;
+ if (isOpen)
+ emit quitPendingWaitsForOpened();
+ }
+}
+
+void QNetworkSessionPrivateImpl::close()
+{
+ if (serviceConfig.isValid()) {
+ lastError = QNetworkSession::OperationNotSupportedError;
+ emit QNetworkSessionPrivate::error(lastError);
+ } else if (isOpen) {
+ opened = false;
+ isOpen = false;
+ emit closed();
+ }
+}
+
+void QNetworkSessionPrivateImpl::stop()
+{
+ if (serviceConfig.isValid()) {
+ lastError = QNetworkSession::OperationNotSupportedError;
+ emit QNetworkSessionPrivate::error(lastError);
+ } else {
+ if ((activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
+ state = QNetworkSession::Closing;
+ emit stateChanged(state);
+
+ engine->disconnectFromId(activeConfig.identifier());
+
+ sessionManager()->forceSessionClose(activeConfig);
+ }
+
+ opened = false;
+ isOpen = false;
+ emit closed();
+ }
+}
+
+void QNetworkSessionPrivateImpl::migrate()
+{
+}
+
+void QNetworkSessionPrivateImpl::accept()
+{
+}
+
+void QNetworkSessionPrivateImpl::ignore()
+{
+}
+
+void QNetworkSessionPrivateImpl::reject()
+{
+}
+
+QNetworkInterface QNetworkSessionPrivateImpl::currentInterface() const
+{
+ if (!publicConfig.isValid() || !engine || state != QNetworkSession::Connected)
+ return QNetworkInterface();
+
+ QString interface = engine->getInterfaceFromId(activeConfig.identifier());
+
+ if (interface.isEmpty())
+ return QNetworkInterface();
+ return QNetworkInterface::interfaceFromName(interface);
+}
+
+QVariant QNetworkSessionPrivateImpl::sessionProperty(const QString &key) const
+{
+ if (key == QLatin1String("AutoCloseSessionTimeout")) {
+ if (engine && engine->requiresPolling() &&
+ !(engine->capabilities() & QNetworkConfigurationManager::CanStartAndStopInterfaces)) {
+ if (sessionTimeout >= 0)
+ return sessionTimeout * 10000;
+ else
+ return -1;
+ }
+ }
+
+ return QVariant();
+}
+
+void QNetworkSessionPrivateImpl::setSessionProperty(const QString &key, const QVariant &value)
+{
+ if (key == QLatin1String("AutoCloseSessionTimeout")) {
+ if (engine && engine->requiresPolling() &&
+ !(engine->capabilities() & QNetworkConfigurationManager::CanStartAndStopInterfaces)) {
+ int timeout = value.toInt();
+ if (timeout >= 0) {
+ connect(engine, SIGNAL(updateCompleted()),
+ this, SLOT(decrementTimeout()), Qt::UniqueConnection);
+ sessionTimeout = timeout / 10000; // convert to poll intervals
+ } else {
+ disconnect(engine, SIGNAL(updateCompleted()), this, SLOT(decrementTimeout()));
+ sessionTimeout = -1;
+ }
+ }
+ }
+}
+
+QString QNetworkSessionPrivateImpl::errorString() const
+{
+ switch (lastError) {
+ case QNetworkSession::UnknownSessionError:
+ return tr("Unknown session error.");
+ case QNetworkSession::SessionAbortedError:
+ return tr("The session was aborted by the user or system.");
+ case QNetworkSession::OperationNotSupportedError:
+ return tr("The requested operation is not supported by the system.");
+ case QNetworkSession::InvalidConfigurationError:
+ return tr("The specified configuration cannot be used.");
+ case QNetworkSession::RoamingError:
+ return tr("Roaming was aborted or is not possible.");
+
+ }
+
+ return QString();
+}
+
+QNetworkSession::SessionError QNetworkSessionPrivateImpl::error() const
+{
+ return lastError;
+}
+
+quint64 QNetworkSessionPrivateImpl::bytesWritten() const
+{
+ if (engine && state == QNetworkSession::Connected)
+ return engine->bytesWritten(activeConfig.identifier());
+ else
+ return Q_UINT64_C(0);
+}
+
+quint64 QNetworkSessionPrivateImpl::bytesReceived() const
+{
+ if (engine && state == QNetworkSession::Connected)
+ return engine->bytesReceived(activeConfig.identifier());
+ else
+ return Q_UINT64_C(0);
+}
+
+quint64 QNetworkSessionPrivateImpl::activeTime() const
+{
+ if (state == QNetworkSession::Connected && startTime != Q_UINT64_C(0))
+ return QDateTime::currentDateTime().toTime_t() - startTime;
+ else
+ return Q_UINT64_C(0);
+}
+
+void QNetworkSessionPrivateImpl::updateStateFromServiceNetwork()
+{
+ QNetworkSession::State oldState = state;
+
+ foreach (const QNetworkConfiguration &config, serviceConfig.children()) {
+ if ((config.state() & QNetworkConfiguration::Active) != QNetworkConfiguration::Active)
+ continue;
+
+ if (activeConfig != config) {
+ if (engine) {
+ disconnect(engine,
+ SIGNAL(connectionError(QString,QBearerEngineImpl::ConnectionError)),
+ this,
+ SLOT(connectionError(QString,QBearerEngineImpl::ConnectionError)));
+ }
+
+ activeConfig = config;
+ engine = getEngineFromId(activeConfig.identifier());
+ if (engine) {
+ connect(engine,
+ SIGNAL(connectionError(QString,QBearerEngineImpl::ConnectionError)),
+ this, SLOT(connectionError(QString,QBearerEngineImpl::ConnectionError)),
+ Qt::QueuedConnection);
+ }
+ emit newConfigurationActivated();
+ }
+
+ state = QNetworkSession::Connected;
+ if (state != oldState)
+ emit stateChanged(state);
+
+ return;
+ }
+
+ if (serviceConfig.children().isEmpty())
+ state = QNetworkSession::NotAvailable;
+ else
+ state = QNetworkSession::Disconnected;
+
+ if (state != oldState)
+ emit stateChanged(state);
+}
+
+void QNetworkSessionPrivateImpl::updateStateFromActiveConfig()
+{
+ if (!engine)
+ return;
+
+ QNetworkSession::State oldState = state;
+
+ state = engine->sessionStateForId(activeConfig.identifier());
+
+ bool oldActive = isOpen;
+ isOpen = (state == QNetworkSession::Connected) ? opened : false;
+
+ if (!oldActive && isOpen)
+ emit quitPendingWaitsForOpened();
+ if (oldActive && !isOpen)
+ emit closed();
+
+ if (oldState != state)
+ emit stateChanged(state);
+}
+
+void QNetworkSessionPrivateImpl::networkConfigurationsChanged()
+{
+ if (serviceConfig.isValid())
+ updateStateFromServiceNetwork();
+ else
+ updateStateFromActiveConfig();
+
+ startTime = engine->startTime(activeConfig.identifier());
+}
+
+void QNetworkSessionPrivateImpl::configurationChanged(QNetworkConfigurationPrivatePointer config)
+{
+ if (serviceConfig.isValid() &&
+ (config->id == serviceConfig.identifier() || config->id == activeConfig.identifier())) {
+ updateStateFromServiceNetwork();
+ } else if (config->id == activeConfig.identifier()) {
+ updateStateFromActiveConfig();
+ }
+}
+
+void QNetworkSessionPrivateImpl::forcedSessionClose(const QNetworkConfiguration &config)
+{
+ if (activeConfig == config) {
+ opened = false;
+ isOpen = false;
+
+ emit closed();
+
+ lastError = QNetworkSession::SessionAbortedError;
+ emit QNetworkSessionPrivate::error(lastError);
+ }
+}
+
+void QNetworkSessionPrivateImpl::connectionError(const QString &id,
+ QBearerEngineImpl::ConnectionError error)
+{
+ if (activeConfig.identifier() == id) {
+ networkConfigurationsChanged();
+ switch (error) {
+ case QBearerEngineImpl::OperationNotSupported:
+ lastError = QNetworkSession::OperationNotSupportedError;
+ opened = false;
+ break;
+ case QBearerEngineImpl::InterfaceLookupError:
+ case QBearerEngineImpl::ConnectError:
+ case QBearerEngineImpl::DisconnectionError:
+ default:
+ lastError = QNetworkSession::UnknownSessionError;
+ }
+
+ emit QNetworkSessionPrivate::error(lastError);
+ }
+}
+
+void QNetworkSessionPrivateImpl::decrementTimeout()
+{
+ if (--sessionTimeout <= 0) {
+ disconnect(engine, SIGNAL(updateCompleted()), this, SLOT(decrementTimeout()));
+ sessionTimeout = -1;
+ close();
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/bearer/qnetworksession_impl.h b/src/plugins/bearer/qnetworksession_impl.h
new file mode 100644
index 0000000000..c64417486e
--- /dev/null
+++ b/src/plugins/bearer/qnetworksession_impl.h
@@ -0,0 +1,131 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QNETWORKSESSION_IMPL_H
+#define QNETWORKSESSION_IMPL_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qbearerengine_impl.h"
+
+#include <QtNetwork/private/qnetworkconfigmanager_p.h>
+#include <QtNetwork/private/qnetworksession_p.h>
+
+#include <QtCore/qdatetime.h>
+
+QT_BEGIN_NAMESPACE
+
+class QBearerEngineImpl;
+
+class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate
+{
+ Q_OBJECT
+public:
+ QNetworkSessionPrivateImpl()
+ : startTime(0), sessionTimeout(-1)
+ {
+ }
+
+ ~QNetworkSessionPrivateImpl()
+ {
+ }
+
+ //called by QNetworkSession constructor and ensures
+ //that the state is immediately updated (w/o actually opening
+ //a session). Also this function should take care of
+ //notification hooks to discover future state changes.
+ void syncStateWithInterface();
+
+ QNetworkInterface currentInterface() const;
+ QVariant sessionProperty(const QString& key) const;
+ void setSessionProperty(const QString& key, const QVariant& value);
+
+ void open();
+ void close();
+ void stop();
+ void migrate();
+ void accept();
+ void ignore();
+ void reject();
+
+ QString errorString() const; //must return translated string
+ QNetworkSession::SessionError error() const;
+
+ quint64 bytesWritten() const;
+ quint64 bytesReceived() const;
+ quint64 activeTime() const;
+
+private:
+ void updateStateFromServiceNetwork();
+ void updateStateFromActiveConfig();
+
+private Q_SLOTS:
+ void networkConfigurationsChanged();
+ void configurationChanged(QNetworkConfigurationPrivatePointer config);
+ void forcedSessionClose(const QNetworkConfiguration &config);
+ void connectionError(const QString &id, QBearerEngineImpl::ConnectionError error);
+ void decrementTimeout();
+
+private:
+ bool opened;
+
+ QBearerEngineImpl *engine;
+
+ QNetworkSession::SessionError lastError;
+
+ quint64 startTime;
+
+ int sessionTimeout;
+};
+
+QT_END_NAMESPACE
+
+#endif //QNETWORKSESSION_IMPL_H
+
diff --git a/src/plugins/bearer/symbian/main.cpp b/src/plugins/bearer/symbian/main.cpp
new file mode 100644
index 0000000000..0321451716
--- /dev/null
+++ b/src/plugins/bearer/symbian/main.cpp
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "symbianengine.h"
+
+#include <QtNetwork/private/qbearerplugin_p.h>
+
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+class QSymbianEnginePlugin : public QBearerEnginePlugin
+{
+public:
+ QSymbianEnginePlugin();
+ ~QSymbianEnginePlugin();
+
+ QStringList keys() const;
+ QBearerEngine *create(const QString &key) const;
+};
+
+QSymbianEnginePlugin::QSymbianEnginePlugin()
+{
+}
+
+QSymbianEnginePlugin::~QSymbianEnginePlugin()
+{
+}
+
+QStringList QSymbianEnginePlugin::keys() const
+{
+ return QStringList() << QLatin1String("symbian");
+}
+
+QBearerEngine *QSymbianEnginePlugin::create(const QString &key) const
+{
+ if (key == QLatin1String("symbian"))
+ return new SymbianEngine;
+ else
+ return 0;
+}
+
+Q_EXPORT_STATIC_PLUGIN(QSymbianEnginePlugin)
+Q_EXPORT_PLUGIN2(qsymbianbearer, QSymbianEnginePlugin)
+
+QT_END_NAMESPACE
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
new file mode 100644
index 0000000000..bec562dfd7
--- /dev/null
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -0,0 +1,1148 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qnetworksession_impl.h"
+#include "symbianengine.h"
+
+#include <es_enum.h>
+#include <es_sock.h>
+#include <in_sock.h>
+#include <stdapis/sys/socket.h>
+#include <stdapis/net/if.h>
+
+QT_BEGIN_NAMESPACE
+
+QNetworkSessionPrivateImpl::QNetworkSessionPrivateImpl(SymbianEngine *engine)
+ : CActive(CActive::EPriorityStandard), engine(engine), ipConnectionNotifier(0),
+ iError(QNetworkSession::UnknownSessionError),
+ iALREnabled(0)
+{
+ CActiveScheduler::Add(this);
+
+ // Try to load "Open C" dll dynamically and
+ // try to attach to setdefaultif function dynamically.
+ if (iOpenCLibrary.Load(_L("libc")) == KErrNone) {
+ iDynamicSetdefaultif = (TOpenCSetdefaultifFunction)iOpenCLibrary.Lookup(564);
+ }
+
+ TRAP_IGNORE(iConnectionMonitor.ConnectL());
+}
+
+QNetworkSessionPrivateImpl::~QNetworkSessionPrivateImpl()
+{
+ isOpen = false;
+
+ // Cancel Connection Progress Notifications first.
+ // Note: ConnectionNotifier must be destroyed before Canceling RConnection::Start()
+ // => deleting ipConnectionNotifier results RConnection::CancelProgressNotification()
+ delete ipConnectionNotifier;
+ ipConnectionNotifier = NULL;
+
+ // Cancel possible RConnection::Start()
+ Cancel();
+
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ if (iMobility) {
+ delete iMobility;
+ iMobility = NULL;
+ }
+#endif
+
+ iConnection.Close();
+ iSocketServ.Close();
+ if (iDynamicSetdefaultif) {
+ iDynamicSetdefaultif(0);
+ }
+
+ iConnectionMonitor.CancelNotifications();
+ iConnectionMonitor.Close();
+
+ iOpenCLibrary.Close();
+}
+
+void QNetworkSessionPrivateImpl::syncStateWithInterface()
+{
+ if (!privateConfiguration(publicConfig))
+ return;
+
+ // Start monitoring changes in IAP states
+ TRAP_IGNORE(iConnectionMonitor.NotifyEventL(*this));
+
+ // Check open connections to see if there is already
+ // an open connection to selected IAP or SNAP
+ TUint count;
+ TRequestStatus status;
+ iConnectionMonitor.GetConnectionCount(count, status);
+ User::WaitForRequest(status);
+ if (status.Int() != KErrNone) {
+ return;
+ }
+
+ TUint numSubConnections;
+ TUint connectionId;
+ for (TUint i = 1; i <= count; i++) {
+ TInt ret = iConnectionMonitor.GetConnectionInfo(i, connectionId, numSubConnections);
+ if (ret == KErrNone) {
+ TUint apId;
+ iConnectionMonitor.GetUintAttribute(connectionId, 0, KIAPId, apId, status);
+ User::WaitForRequest(status);
+ if (status.Int() == KErrNone) {
+ TInt connectionStatus;
+ iConnectionMonitor.GetIntAttribute(connectionId, 0, KConnectionStatus, connectionStatus, status);
+ User::WaitForRequest(status);
+ if (connectionStatus == KLinkLayerOpen) {
+ if (state != QNetworkSession::Closing) {
+ if (newState(QNetworkSession::Connected, apId)) {
+ return;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (state != QNetworkSession::Connected) {
+ // There were no open connections to used IAP or SNAP
+ if (iError == QNetworkSession::InvalidConfigurationError) {
+ newState(QNetworkSession::Invalid);
+ }
+ else if ((privateConfiguration(publicConfig)->state & QNetworkConfiguration::Discovered) ==
+ QNetworkConfiguration::Discovered) {
+ newState(QNetworkSession::Disconnected);
+ } else {
+ newState(QNetworkSession::NotAvailable);
+ }
+ }
+}
+
+QNetworkInterface QNetworkSessionPrivateImpl::interface(TUint iapId) const
+{
+ QString interfaceName;
+
+ TSoInetInterfaceInfo ifinfo;
+ TPckg<TSoInetInterfaceInfo> ifinfopkg(ifinfo);
+ TSoInetIfQuery ifquery;
+ TPckg<TSoInetIfQuery> ifquerypkg(ifquery);
+
+ // Open dummy socket for interface queries
+ RSocket socket;
+ TInt retVal = socket.Open(iSocketServ, _L("udp"));
+ if (retVal != KErrNone) {
+ return QNetworkInterface();
+ }
+
+ // Start enumerating interfaces
+ socket.SetOpt(KSoInetEnumInterfaces, KSolInetIfCtrl);
+ while(socket.GetOpt(KSoInetNextInterface, KSolInetIfCtrl, ifinfopkg) == KErrNone) {
+ ifquery.iName = ifinfo.iName;
+ TInt err = socket.GetOpt(KSoInetIfQueryByName, KSolInetIfQuery, ifquerypkg);
+ if(err == KErrNone && ifquery.iZone[1] == iapId) { // IAP ID is index 1 of iZone
+ if(ifinfo.iAddress.Address() > 0) {
+ interfaceName = QString::fromUtf16(ifinfo.iName.Ptr(),ifinfo.iName.Length());
+ break;
+ }
+ }
+ }
+
+ socket.Close();
+
+ if (interfaceName.isEmpty()) {
+ return QNetworkInterface();
+ }
+
+ return QNetworkInterface::interfaceFromName(interfaceName);
+}
+
+QNetworkInterface QNetworkSessionPrivateImpl::currentInterface() const
+{
+ if (!publicConfig.isValid() || state != QNetworkSession::Connected) {
+ return QNetworkInterface();
+ }
+
+ return activeInterface;
+}
+
+QVariant QNetworkSessionPrivateImpl::sessionProperty(const QString& /*key*/) const
+{
+ return QVariant();
+}
+
+void QNetworkSessionPrivateImpl::setSessionProperty(const QString& /*key*/, const QVariant& /*value*/)
+{
+}
+
+QString QNetworkSessionPrivateImpl::errorString() const
+{
+ switch (iError) {
+ case QNetworkSession::UnknownSessionError:
+ return tr("Unknown session error.");
+ case QNetworkSession::SessionAbortedError:
+ return tr("The session was aborted by the user or system.");
+ case QNetworkSession::OperationNotSupportedError:
+ return tr("The requested operation is not supported by the system.");
+ case QNetworkSession::InvalidConfigurationError:
+ return tr("The specified configuration cannot be used.");
+ case QNetworkSession::RoamingError:
+ return tr("Roaming was aborted or is not possible.");
+ }
+
+ return QString();
+}
+
+QNetworkSession::SessionError QNetworkSessionPrivateImpl::error() const
+{
+ return iError;
+}
+
+void QNetworkSessionPrivateImpl::open()
+{
+ if (isOpen || (state == QNetworkSession::Connecting)) {
+ return;
+ }
+
+ // Cancel notifications from RConnectionMonitor
+ // => RConnection::ProgressNotification will be used for IAP/SNAP monitoring
+ iConnectionMonitor.CancelNotifications();
+
+ // Configuration must be at least in Discovered - state for connecting purposes.
+ if ((publicConfig.state() & QNetworkConfiguration::Discovered) !=
+ QNetworkConfiguration::Discovered) {
+ newState(QNetworkSession::Invalid);
+ iError = QNetworkSession::InvalidConfigurationError;
+ emit QNetworkSessionPrivate::error(iError);
+ syncStateWithInterface();
+ return;
+ }
+
+ TInt error = iSocketServ.Connect();
+ if (error != KErrNone) {
+ // Could not open RSocketServ
+ newState(QNetworkSession::Invalid);
+ iError = QNetworkSession::UnknownSessionError;
+ emit QNetworkSessionPrivate::error(iError);
+ syncStateWithInterface();
+ return;
+ }
+
+ error = iConnection.Open(iSocketServ);
+ if (error != KErrNone) {
+ // Could not open RConnection
+ iSocketServ.Close();
+ newState(QNetworkSession::Invalid);
+ iError = QNetworkSession::UnknownSessionError;
+ emit QNetworkSessionPrivate::error(iError);
+ syncStateWithInterface();
+ return;
+ }
+
+ // Use RConnection::ProgressNotification for IAP/SNAP monitoring
+ // (<=> ConnectionProgressNotifier uses RConnection::ProgressNotification)
+ if (!ipConnectionNotifier) {
+ ipConnectionNotifier = new ConnectionProgressNotifier(*this,iConnection);
+ }
+ if (ipConnectionNotifier) {
+ ipConnectionNotifier->StartNotifications();
+ }
+
+ if (publicConfig.type() == QNetworkConfiguration::InternetAccessPoint) {
+ // Search through existing connections.
+ // If there is already connection which matches to given IAP
+ // try to attach to existing connection.
+ TBool connected(EFalse);
+ TConnectionInfoBuf connInfo;
+ TUint count;
+ if (iConnection.EnumerateConnections(count) == KErrNone) {
+ for (TUint i=1; i<=count; i++) {
+ // Note: GetConnectionInfo expects 1-based index.
+ if (iConnection.GetConnectionInfo(i, connInfo) == KErrNone) {
+ if (connInfo().iIapId == toSymbianConfig(privateConfiguration(publicConfig))->numericId) {
+ if (iConnection.Attach(connInfo, RConnection::EAttachTypeNormal) == KErrNone) {
+ activeConfig = publicConfig;
+ activeInterface = interface(toSymbianConfig(privateConfiguration(activeConfig))->numericId);
+ connected = ETrue;
+ startTime = QDateTime::currentDateTime();
+ if (iDynamicSetdefaultif) {
+ // Use name of the IAP to set default IAP
+ QByteArray nameAsByteArray = publicConfig.name().toUtf8();
+ ifreq ifr;
+ strcpy(ifr.ifr_name, nameAsByteArray.constData());
+
+ error = iDynamicSetdefaultif(&ifr);
+ }
+ isOpen = true;
+ // Make sure that state will be Connected
+ newState(QNetworkSession::Connected);
+ emit quitPendingWaitsForOpened();
+ break;
+ }
+ }
+ }
+ }
+ }
+ if (!connected) {
+ TCommDbConnPref pref;
+ pref.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
+ pref.SetIapId(toSymbianConfig(privateConfiguration(publicConfig))->numericId);
+ iConnection.Start(pref, iStatus);
+ if (!IsActive()) {
+ SetActive();
+ }
+ newState(QNetworkSession::Connecting);
+ }
+ } else if (publicConfig.type() == QNetworkConfiguration::ServiceNetwork) {
+ TConnSnapPref snapPref(toSymbianConfig(privateConfiguration(publicConfig))->numericId);
+ iConnection.Start(snapPref, iStatus);
+ if (!IsActive()) {
+ SetActive();
+ }
+ newState(QNetworkSession::Connecting);
+ } else if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
+ iKnownConfigsBeforeConnectionStart = engine->accessPointConfigurationIdentifiers();
+ iConnection.Start(iStatus);
+ if (!IsActive()) {
+ SetActive();
+ }
+ newState(QNetworkSession::Connecting);
+ }
+
+ if (error != KErrNone) {
+ isOpen = false;
+ iError = QNetworkSession::UnknownSessionError;
+ emit QNetworkSessionPrivate::error(iError);
+ if (ipConnectionNotifier) {
+ ipConnectionNotifier->StopNotifications();
+ }
+ syncStateWithInterface();
+ }
+}
+
+TUint QNetworkSessionPrivateImpl::iapClientCount(TUint aIAPId) const
+{
+ TRequestStatus status;
+ TUint connectionCount;
+ iConnectionMonitor.GetConnectionCount(connectionCount, status);
+ User::WaitForRequest(status);
+ if (status.Int() == KErrNone) {
+ for (TUint i = 1; i <= connectionCount; i++) {
+ TUint connectionId;
+ TUint subConnectionCount;
+ iConnectionMonitor.GetConnectionInfo(i, connectionId, subConnectionCount);
+ TUint apId;
+ iConnectionMonitor.GetUintAttribute(connectionId, subConnectionCount, KIAPId, apId, status);
+ User::WaitForRequest(status);
+ if (apId == aIAPId) {
+ TConnMonClientEnumBuf buf;
+ iConnectionMonitor.GetPckgAttribute(connectionId, 0, KClientInfo, buf, status);
+ User::WaitForRequest(status);
+ if (status.Int() == KErrNone) {
+ return buf().iCount;
+ }
+ }
+ }
+ }
+ return 0;
+}
+
+void QNetworkSessionPrivateImpl::close(bool allowSignals)
+{
+ if (!isOpen) {
+ return;
+ }
+
+ TUint activeIap = toSymbianConfig(privateConfiguration(activeConfig))->numericId;
+ isOpen = false;
+ activeConfig = QNetworkConfiguration();
+ serviceConfig = QNetworkConfiguration();
+
+ Cancel();
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ if (iMobility) {
+ delete iMobility;
+ iMobility = NULL;
+ }
+#endif
+
+ if (ipConnectionNotifier) {
+ ipConnectionNotifier->StopNotifications();
+ }
+
+ iConnection.Close();
+ iSocketServ.Close();
+ if (iDynamicSetdefaultif) {
+ iDynamicSetdefaultif(0);
+ }
+
+#ifdef Q_CC_NOKIAX86
+ if ((allowSignals && iapClientCount(activeIap) <= 0) ||
+#else
+ if ((allowSignals && iapClientCount(activeIap) <= 1) ||
+#endif
+ (publicConfig.type() == QNetworkConfiguration::UserChoice)) {
+ newState(QNetworkSession::Closing);
+ }
+
+ syncStateWithInterface();
+ if (allowSignals) {
+ if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
+ newState(QNetworkSession::Disconnected);
+ }
+ emit closed();
+ }
+}
+
+void QNetworkSessionPrivateImpl::stop()
+{
+ if (!isOpen) {
+ return;
+ }
+ isOpen = false;
+ newState(QNetworkSession::Closing);
+ iConnection.Stop(RConnection::EStopAuthoritative);
+ isOpen = true;
+ close(false);
+ emit closed();
+}
+
+void QNetworkSessionPrivateImpl::migrate()
+{
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ iMobility->MigrateToPreferredCarrier();
+#endif
+}
+
+void QNetworkSessionPrivateImpl::ignore()
+{
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ iMobility->IgnorePreferredCarrier();
+ if (!iALRUpgradingConnection) {
+ newState(QNetworkSession::Disconnected);
+ } else {
+ newState(QNetworkSession::Connected,iOldRoamingIap);
+ }
+#endif
+}
+
+void QNetworkSessionPrivateImpl::accept()
+{
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ iMobility->NewCarrierAccepted();
+ if (iDynamicSetdefaultif) {
+ // Use name of the IAP to set default IAP
+ QByteArray nameAsByteArray = activeConfig.name().toUtf8();
+ ifreq ifr;
+ strcpy(ifr.ifr_name, nameAsByteArray.constData());
+
+ iDynamicSetdefaultif(&ifr);
+ }
+ newState(QNetworkSession::Connected, iNewRoamingIap);
+#endif
+}
+
+void QNetworkSessionPrivateImpl::reject()
+{
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ iMobility->NewCarrierRejected();
+ if (!iALRUpgradingConnection) {
+ newState(QNetworkSession::Disconnected);
+ } else {
+ newState(QNetworkSession::Connected, iOldRoamingIap);
+ }
+#endif
+}
+
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+void QNetworkSessionPrivateImpl::PreferredCarrierAvailable(TAccessPointInfo aOldAPInfo,
+ TAccessPointInfo aNewAPInfo,
+ TBool aIsUpgrade,
+ TBool aIsSeamless)
+{
+ iOldRoamingIap = aOldAPInfo.AccessPoint();
+ iNewRoamingIap = aNewAPInfo.AccessPoint();
+ newState(QNetworkSession::Roaming);
+ if (iALREnabled > 0) {
+ iALRUpgradingConnection = aIsUpgrade;
+ QList<QNetworkConfiguration> configs = publicConfig.children();
+ for (int i=0; i < configs.count(); i++) {
+ if (toSymbianConfig(privateConfiguration(configs[i]))->numericId == aNewAPInfo.AccessPoint()) {
+ emit preferredConfigurationChanged(configs[i], aIsSeamless);
+ }
+ }
+ } else {
+ migrate();
+ }
+}
+
+void QNetworkSessionPrivateImpl::NewCarrierActive(TAccessPointInfo /*aNewAPInfo*/, TBool /*aIsSeamless*/)
+{
+ if (iALREnabled > 0) {
+ emit newConfigurationActivated();
+ } else {
+ accept();
+ }
+}
+
+void QNetworkSessionPrivateImpl::Error(TInt /*aError*/)
+{
+ if (isOpen) {
+ isOpen = false;
+ activeConfig = QNetworkConfiguration();
+ serviceConfig = QNetworkConfiguration();
+ iError = QNetworkSession::RoamingError;
+ emit QNetworkSessionPrivate::error(iError);
+ Cancel();
+ if (ipConnectionNotifier) {
+ ipConnectionNotifier->StopNotifications();
+ }
+ syncStateWithInterface();
+ // In some cases IAP is still in Connected state when
+ // syncStateWithInterface(); is called
+ // => Following call makes sure that Session state
+ // changes immediately to Disconnected.
+ newState(QNetworkSession::Disconnected);
+ emit closed();
+ }
+}
+#endif
+
+void QNetworkSessionPrivateImpl::setALREnabled(bool enabled)
+{
+ if (enabled) {
+ iALREnabled++;
+ } else {
+ iALREnabled--;
+ }
+}
+
+QNetworkConfiguration QNetworkSessionPrivateImpl::bestConfigFromSNAP(const QNetworkConfiguration& snapConfig) const
+{
+ QNetworkConfiguration config;
+ QList<QNetworkConfiguration> subConfigurations = snapConfig.children();
+ for (int i = 0; i < subConfigurations.count(); i++ ) {
+ if (subConfigurations[i].state() == QNetworkConfiguration::Active) {
+ config = subConfigurations[i];
+ break;
+ } else if (!config.isValid() && subConfigurations[i].state() == QNetworkConfiguration::Discovered) {
+ config = subConfigurations[i];
+ }
+ }
+ if (!config.isValid() && subConfigurations.count() > 0) {
+ config = subConfigurations[0];
+ }
+ return config;
+}
+
+quint64 QNetworkSessionPrivateImpl::bytesWritten() const
+{
+ return transferredData(KUplinkData);
+}
+
+quint64 QNetworkSessionPrivateImpl::bytesReceived() const
+{
+ return transferredData(KDownlinkData);
+}
+
+quint64 QNetworkSessionPrivateImpl::transferredData(TUint dataType) const
+{
+ if (!publicConfig.isValid()) {
+ return 0;
+ }
+
+ QNetworkConfiguration config;
+ if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
+ if (serviceConfig.isValid()) {
+ config = serviceConfig;
+ } else {
+ if (activeConfig.isValid()) {
+ config = activeConfig;
+ }
+ }
+ } else {
+ config = publicConfig;
+ }
+
+ if (!config.isValid()) {
+ return 0;
+ }
+
+ TUint count;
+ TRequestStatus status;
+ iConnectionMonitor.GetConnectionCount(count, status);
+ User::WaitForRequest(status);
+ if (status.Int() != KErrNone) {
+ return 0;
+ }
+
+ TUint transferredData = 0;
+ TUint numSubConnections;
+ TUint connectionId;
+ bool configFound;
+ for (TUint i = 1; i <= count; i++) {
+ TInt ret = iConnectionMonitor.GetConnectionInfo(i, connectionId, numSubConnections);
+ if (ret == KErrNone) {
+ TUint apId;
+ iConnectionMonitor.GetUintAttribute(connectionId, 0, KIAPId, apId, status);
+ User::WaitForRequest(status);
+ if (status.Int() == KErrNone) {
+ configFound = false;
+ if (config.type() == QNetworkConfiguration::ServiceNetwork) {
+ QList<QNetworkConfiguration> configs = config.children();
+ for (int i=0; i < configs.count(); i++) {
+ if (toSymbianConfig(privateConfiguration(configs[i]))->numericId == apId) {
+ configFound = true;
+ break;
+ }
+ }
+ } else if (toSymbianConfig(privateConfiguration(config))->numericId == apId) {
+ configFound = true;
+ }
+ if (configFound) {
+ TUint tData;
+ iConnectionMonitor.GetUintAttribute(connectionId, 0, dataType, tData, status );
+ User::WaitForRequest(status);
+ if (status.Int() == KErrNone) {
+ transferredData += tData;
+ }
+ }
+ }
+ }
+ }
+
+ return transferredData;
+}
+
+quint64 QNetworkSessionPrivateImpl::activeTime() const
+{
+ if (!isOpen || startTime.isNull()) {
+ return 0;
+ }
+ return startTime.secsTo(QDateTime::currentDateTime());
+}
+
+QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 iapId) const
+{
+ if (iapId == 0) {
+ _LIT(KSetting, "IAP\\Id");
+ iConnection.GetIntSetting(KSetting, iapId);
+ }
+
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ if (publicConfig.type() == QNetworkConfiguration::ServiceNetwork) {
+ // Try to search IAP from the used SNAP using IAP Id
+ QList<QNetworkConfiguration> children = publicConfig.children();
+ for (int i=0; i < children.count(); i++) {
+ if (toSymbianConfig(privateConfiguration(children[i]))->numericId == iapId) {
+ return children[i];
+ }
+ }
+
+ // Given IAP Id was not found from the used SNAP
+ // => Try to search matching IAP using mappingName
+ // mappingName contains:
+ // 1. "Access point name" for "Packet data" Bearer
+ // 2. "WLAN network name" (= SSID) for "Wireless LAN" Bearer
+ // 3. "Dial-up number" for "Data call Bearer" or "High Speed (GSM)" Bearer
+ // <=> Note: It's possible that in this case reported IAP is
+ // clone of the one of the IAPs of the used SNAP
+ // => If mappingName matches, clone has been found
+ QNetworkConfiguration pt = QNetworkConfigurationManager().configurationFromIdentifier(QString::number(qHash(iapId)));
+ if (privateConfiguration(pt)) {
+ for (int i=0; i < children.count(); i++) {
+ if (toSymbianConfig(privateConfiguration(children[i]))->mappingName == toSymbianConfig(privateConfiguration(pt))->mappingName) {
+ return children[i];
+ }
+ }
+ } else {
+ // Given IAP Id was not found from known IAPs array
+ return QNetworkConfiguration();
+ }
+
+ // Matching IAP was not found from used SNAP
+ // => IAP from another SNAP is returned
+ // (Note: Returned IAP matches to given IAP Id)
+ return pt;
+ }
+#endif
+
+ if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
+ if (engine) {
+ QNetworkConfiguration pt = QNetworkConfigurationManager().configurationFromIdentifier(QString::number(qHash(iapId)));
+ // Try to found User Selected IAP from known IAPs (accessPointConfigurations)
+ if (pt.isValid()) {
+ return pt;
+ } else {
+ // Check if new (WLAN) IAP was created in IAP/SNAP dialog
+ // 1. Sync internal configurations array to commsdb first
+ engine->updateConfigurations();
+ // 2. Check if new configuration was created during connection creation
+ QStringList knownConfigs = engine->accessPointConfigurationIdentifiers();
+ if (knownConfigs.count() > iKnownConfigsBeforeConnectionStart.count()) {
+ // Configuration count increased => new configuration was created
+ // => Search new, created configuration
+ QString newIapId;
+ for (int i=0; i < iKnownConfigsBeforeConnectionStart.count(); i++) {
+ if (knownConfigs[i] != iKnownConfigsBeforeConnectionStart[i]) {
+ newIapId = knownConfigs[i];
+ break;
+ }
+ }
+ if (newIapId.isEmpty()) {
+ newIapId = knownConfigs[knownConfigs.count()-1];
+ }
+ pt = QNetworkConfigurationManager().configurationFromIdentifier(newIapId);
+ if (pt.isValid())
+ return pt;
+ }
+ }
+ }
+ return QNetworkConfiguration();
+ }
+
+ return publicConfig;
+}
+
+void QNetworkSessionPrivateImpl::RunL()
+{
+ TInt statusCode = iStatus.Int();
+
+ switch (statusCode) {
+ case KErrNone: // Connection created succesfully
+ {
+ TInt error = KErrNone;
+ QNetworkConfiguration newActiveConfig = activeConfiguration();
+ if (!newActiveConfig.isValid()) {
+ error = KErrGeneral;
+ } else if (iDynamicSetdefaultif) {
+ // Use name of the IAP to set default IAP
+ QByteArray nameAsByteArray = newActiveConfig.name().toUtf8();
+ ifreq ifr;
+ strcpy(ifr.ifr_name, nameAsByteArray.constData());
+
+ error = iDynamicSetdefaultif(&ifr);
+ }
+
+ if (error != KErrNone) {
+ isOpen = false;
+ iError = QNetworkSession::UnknownSessionError;
+ emit QNetworkSessionPrivate::error(iError);
+ Cancel();
+ if (ipConnectionNotifier) {
+ ipConnectionNotifier->StopNotifications();
+ }
+ syncStateWithInterface();
+ return;
+ }
+
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ if (publicConfig.type() == QNetworkConfiguration::ServiceNetwork) {
+ // Activate ALR monitoring
+ iMobility = CActiveCommsMobilityApiExt::NewL(iConnection, *this);
+ }
+#endif
+ isOpen = true;
+ activeConfig = newActiveConfig;
+ activeInterface = interface(toSymbianConfig(privateConfiguration(activeConfig))->numericId);
+ if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
+ serviceConfig = QNetworkConfigurationManager().configurationFromIdentifier(toSymbianConfig(privateConfiguration(activeConfig))->serviceNetworkPtr->id);
+ }
+
+ startTime = QDateTime::currentDateTime();
+
+ newState(QNetworkSession::Connected);
+ emit quitPendingWaitsForOpened();
+ }
+ break;
+ case KErrNotFound: // Connection failed
+ isOpen = false;
+ activeConfig = QNetworkConfiguration();
+ serviceConfig = QNetworkConfiguration();
+ iError = QNetworkSession::InvalidConfigurationError;
+ emit QNetworkSessionPrivate::error(iError);
+ Cancel();
+ if (ipConnectionNotifier) {
+ ipConnectionNotifier->StopNotifications();
+ }
+ syncStateWithInterface();
+ break;
+ case KErrCancel: // Connection attempt cancelled
+ case KErrAlreadyExists: // Connection already exists
+ default:
+ isOpen = false;
+ activeConfig = QNetworkConfiguration();
+ serviceConfig = QNetworkConfiguration();
+ iError = QNetworkSession::UnknownSessionError;
+ emit QNetworkSessionPrivate::error(iError);
+ Cancel();
+ if (ipConnectionNotifier) {
+ ipConnectionNotifier->StopNotifications();
+ }
+ syncStateWithInterface();
+ break;
+ }
+}
+
+void QNetworkSessionPrivateImpl::DoCancel()
+{
+ iConnection.Close();
+}
+
+bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint accessPointId)
+{
+ // Make sure that activeConfig is always updated when SNAP is signaled to be
+ // connected.
+ if (isOpen && publicConfig.type() == QNetworkConfiguration::ServiceNetwork &&
+ newState == QNetworkSession::Connected) {
+ activeConfig = activeConfiguration(accessPointId);
+ activeInterface = interface(toSymbianConfig(privateConfiguration(activeConfig))->numericId);
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ if (iDynamicSetdefaultif) {
+ // Use name of the IAP to set default IAP
+ QByteArray nameAsByteArray = activeConfig.name().toUtf8();
+ ifreq ifr;
+ strcpy(ifr.ifr_name, nameAsByteArray.constData());
+
+ iDynamicSetdefaultif(&ifr);
+ }
+#endif
+ }
+
+ // Make sure that same state is not signaled twice in a row.
+ if (state == newState) {
+ return true;
+ }
+
+ // Make sure that Connecting state does not overwrite Roaming state
+ if (state == QNetworkSession::Roaming && newState == QNetworkSession::Connecting) {
+ return false;
+ }
+
+ bool emitSessionClosed = false;
+ if (isOpen && state == QNetworkSession::Connected && newState == QNetworkSession::Disconnected) {
+ // Active & Connected state should change directly to Disconnected state
+ // only when something forces connection to close (eg. when another
+ // application or session stops connection or when network drops
+ // unexpectedly).
+ isOpen = false;
+ activeConfig = QNetworkConfiguration();
+ serviceConfig = QNetworkConfiguration();
+ iError = QNetworkSession::SessionAbortedError;
+ emit QNetworkSessionPrivate::error(iError);
+ Cancel();
+ if (ipConnectionNotifier) {
+ ipConnectionNotifier->StopNotifications();
+ }
+ // Start monitoring changes in IAP states
+ TRAP_IGNORE(iConnectionMonitor.NotifyEventL(*this));
+ emitSessionClosed = true; // Emit SessionClosed after state change has been reported
+ }
+
+ bool retVal = false;
+ if (accessPointId == 0) {
+ state = newState;
+ emit stateChanged(state);
+ retVal = true;
+ } else {
+ if (publicConfig.type() == QNetworkConfiguration::InternetAccessPoint) {
+ if (toSymbianConfig(privateConfiguration(publicConfig))->numericId == accessPointId) {
+ state = newState;
+ emit stateChanged(state);
+ retVal = true;
+ }
+ } else if (publicConfig.type() == QNetworkConfiguration::UserChoice && isOpen) {
+ if (toSymbianConfig(privateConfiguration(activeConfig))->numericId == accessPointId) {
+ state = newState;
+ emit stateChanged(state);
+ retVal = true;
+ }
+ } else if (publicConfig.type() == QNetworkConfiguration::ServiceNetwork) {
+ QList<QNetworkConfiguration> subConfigurations = publicConfig.children();
+ for (int i = 0; i < subConfigurations.count(); i++) {
+ if (toSymbianConfig(privateConfiguration(subConfigurations[i]))->numericId == accessPointId) {
+ if (newState == QNetworkSession::Connected) {
+ // Make sure that when AccessPoint is reported to be Connected
+ // also state of the related configuration changes to Active.
+ privateConfiguration(subConfigurations[i])->state = QNetworkConfiguration::Active;
+
+ state = newState;
+ emit stateChanged(state);
+ retVal = true;
+ } else {
+ if (newState == QNetworkSession::Disconnected) {
+ // Make sure that when AccessPoint is reported to be disconnected
+ // also state of the related configuration changes from Active to Defined.
+ privateConfiguration(subConfigurations[i])->state = QNetworkConfiguration::Defined;
+ }
+ QNetworkConfiguration config = bestConfigFromSNAP(publicConfig);
+ if ((config.state() == QNetworkConfiguration::Defined) ||
+ (config.state() == QNetworkConfiguration::Discovered)) {
+ state = newState;
+ emit stateChanged(state);
+ retVal = true;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (emitSessionClosed) {
+ emit closed();
+ }
+
+ return retVal;
+}
+
+void QNetworkSessionPrivateImpl::handleSymbianConnectionStatusChange(TInt aConnectionStatus,
+ TInt aError,
+ TUint accessPointId)
+{
+ switch (aConnectionStatus)
+ {
+ // Connection unitialised
+ case KConnectionUninitialised:
+ break;
+
+ // Starting connetion selection
+ case KStartingSelection:
+ break;
+
+ // Selection finished
+ case KFinishedSelection:
+ if (aError == KErrNone)
+ {
+ // The user successfully selected an IAP to be used
+ break;
+ }
+ else
+ {
+ // The user pressed e.g. "Cancel" and did not select an IAP
+ newState(QNetworkSession::Disconnected,accessPointId);
+ }
+ break;
+
+ // Connection failure
+ case KConnectionFailure:
+ newState(QNetworkSession::NotAvailable);
+ break;
+
+ // Prepearing connection (e.g. dialing)
+ case KPsdStartingConfiguration:
+ case KPsdFinishedConfiguration:
+ case KCsdFinishedDialling:
+ case KCsdScanningScript:
+ case KCsdGettingLoginInfo:
+ case KCsdGotLoginInfo:
+ break;
+
+ // Creating connection (e.g. GPRS activation)
+ case KCsdStartingConnect:
+ case KCsdFinishedConnect:
+ newState(QNetworkSession::Connecting,accessPointId);
+ break;
+
+ // Starting log in
+ case KCsdStartingLogIn:
+ break;
+
+ // Finished login
+ case KCsdFinishedLogIn:
+ break;
+
+ // Connection open
+ case KConnectionOpen:
+ break;
+
+ case KLinkLayerOpen:
+ newState(QNetworkSession::Connected,accessPointId);
+ break;
+
+ // Connection blocked or suspended
+ case KDataTransferTemporarilyBlocked:
+ break;
+
+ // Hangup or GRPS deactivation
+ case KConnectionStartingClose:
+ newState(QNetworkSession::Closing,accessPointId);
+ break;
+
+ // Connection closed
+ case KConnectionClosed:
+ break;
+
+ case KLinkLayerClosed:
+ newState(QNetworkSession::Disconnected,accessPointId);
+ break;
+
+ // Unhandled state
+ default:
+ break;
+ }
+}
+
+void QNetworkSessionPrivateImpl::EventL(const CConnMonEventBase& aEvent)
+{
+ switch (aEvent.EventType())
+ {
+ case EConnMonConnectionStatusChange:
+ {
+ CConnMonConnectionStatusChange* realEvent;
+ realEvent = (CConnMonConnectionStatusChange*) &aEvent;
+
+ TUint connectionId = realEvent->ConnectionId();
+ TInt connectionStatus = realEvent->ConnectionStatus();
+
+ // Try to Find IAP Id using connection Id
+ TUint apId = 0;
+ if (publicConfig.type() == QNetworkConfiguration::ServiceNetwork) {
+ QList<QNetworkConfiguration> subConfigurations = publicConfig.children();
+ for (int i = 0; i < subConfigurations.count(); i++ ) {
+ if (toSymbianConfig(privateConfiguration(subConfigurations[i]))->connectionId == connectionId) {
+ apId = toSymbianConfig(privateConfiguration(subConfigurations[i]))->numericId;
+ break;
+ }
+ }
+ } else if (publicConfig.type() == QNetworkConfiguration::InternetAccessPoint) {
+ if (toSymbianConfig(privateConfiguration(publicConfig))->connectionId == connectionId) {
+ apId = toSymbianConfig(privateConfiguration(publicConfig))->numericId;
+ }
+ }
+
+ if (apId > 0) {
+ handleSymbianConnectionStatusChange(connectionStatus, KErrNone, apId);
+ }
+ }
+ break;
+
+ case EConnMonCreateConnection:
+ {
+ CConnMonCreateConnection* realEvent;
+ realEvent = (CConnMonCreateConnection*) &aEvent;
+ TUint apId;
+ TUint connectionId = realEvent->ConnectionId();
+ TRequestStatus status;
+ iConnectionMonitor.GetUintAttribute(connectionId, 0, KIAPId, apId, status);
+ User::WaitForRequest(status);
+ if (status.Int() == KErrNone) {
+ // Store connection id to related AccessPoint Configuration
+ if (publicConfig.type() == QNetworkConfiguration::ServiceNetwork) {
+ QList<QNetworkConfiguration> subConfigurations = publicConfig.children();
+ for (int i = 0; i < subConfigurations.count(); i++ ) {
+ if (toSymbianConfig(privateConfiguration(subConfigurations[i]))->numericId == apId) {
+ toSymbianConfig(privateConfiguration(subConfigurations[i]))->connectionId = connectionId;
+ break;
+ }
+ }
+ } else if (publicConfig.type() == QNetworkConfiguration::InternetAccessPoint) {
+ if (toSymbianConfig(privateConfiguration(publicConfig))->numericId == apId) {
+ toSymbianConfig(privateConfiguration(publicConfig))->connectionId = connectionId;
+ }
+ }
+ }
+ }
+ break;
+
+ case EConnMonDeleteConnection:
+ {
+ CConnMonDeleteConnection* realEvent;
+ realEvent = (CConnMonDeleteConnection*) &aEvent;
+ TUint connectionId = realEvent->ConnectionId();
+ // Remove connection id from related AccessPoint Configuration
+ if (publicConfig.type() == QNetworkConfiguration::ServiceNetwork) {
+ QList<QNetworkConfiguration> subConfigurations = publicConfig.children();
+ for (int i = 0; i < subConfigurations.count(); i++ ) {
+ if (toSymbianConfig(privateConfiguration(subConfigurations[i]))->connectionId == connectionId) {
+ toSymbianConfig(privateConfiguration(subConfigurations[i]))->connectionId = 0;
+ break;
+ }
+ }
+ } else if (publicConfig.type() == QNetworkConfiguration::InternetAccessPoint) {
+ if (toSymbianConfig(privateConfiguration(publicConfig))->connectionId == connectionId) {
+ toSymbianConfig(privateConfiguration(publicConfig))->connectionId = 0;
+ }
+ }
+ }
+ break;
+
+ default:
+ // For unrecognized events
+ break;
+ }
+}
+
+ConnectionProgressNotifier::ConnectionProgressNotifier(QNetworkSessionPrivateImpl &owner, RConnection &connection)
+ : CActive(CActive::EPriorityStandard), iOwner(owner), iConnection(connection)
+{
+ CActiveScheduler::Add(this);
+}
+
+ConnectionProgressNotifier::~ConnectionProgressNotifier()
+{
+ Cancel();
+}
+
+void ConnectionProgressNotifier::StartNotifications()
+{
+ if (!IsActive()) {
+ SetActive();
+ }
+ iConnection.ProgressNotification(iProgress, iStatus);
+}
+
+void ConnectionProgressNotifier::StopNotifications()
+{
+ Cancel();
+}
+
+void ConnectionProgressNotifier::DoCancel()
+{
+ iConnection.CancelProgressNotification();
+}
+
+void ConnectionProgressNotifier::RunL()
+{
+ if (iStatus == KErrNone) {
+ iOwner.handleSymbianConnectionStatusChange(iProgress().iStage, iProgress().iError);
+
+ SetActive();
+ iConnection.ProgressNotification(iProgress, iStatus);
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h
new file mode 100644
index 0000000000..30f51e1269
--- /dev/null
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.h
@@ -0,0 +1,196 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QNETWORKSESSION_IMPL_H
+#define QNETWORKSESSION_IMPL_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtNetwork/private/qnetworksession_p.h>
+
+#include <QDateTime>
+
+#include <e32base.h>
+#include <CommDbConnPref.h>
+#include <es_sock.h>
+#include <rconnmon.h>
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ #include <comms-infras/cs_mobility_apiext.h>
+#endif
+
+typedef int(*TOpenCSetdefaultifFunction)(const struct ifreq*);
+
+QT_BEGIN_NAMESPACE
+
+class ConnectionProgressNotifier;
+class SymbianEngine;
+
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate, public CActive, public MMobilityProtocolResp,
+ public MConnectionMonitorObserver
+#else
+class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate, public CActive, public MConnectionMonitorObserver
+#endif
+{
+ Q_OBJECT
+public:
+ QNetworkSessionPrivateImpl(SymbianEngine *engine);
+ ~QNetworkSessionPrivateImpl();
+
+ //called by QNetworkSession constructor and ensures
+ //that the state is immediately updated (w/o actually opening
+ //a session). Also this function should take care of
+ //notification hooks to discover future state changes.
+ void syncStateWithInterface();
+
+ QNetworkInterface currentInterface() const;
+ QVariant sessionProperty(const QString& key) const;
+ void setSessionProperty(const QString& key, const QVariant& value);
+
+ void setALREnabled(bool enabled);
+
+ void open();
+ inline void close() { close(true); }
+ void close(bool allowSignals);
+ void stop();
+ void migrate();
+ void accept();
+ void ignore();
+ void reject();
+
+ QString errorString() const; //must return translated string
+ QNetworkSession::SessionError error() const;
+
+ quint64 bytesWritten() const;
+ quint64 bytesReceived() const;
+ quint64 activeTime() const;
+
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+public: // From MMobilityProtocolResp
+ void PreferredCarrierAvailable(TAccessPointInfo aOldAPInfo,
+ TAccessPointInfo aNewAPInfo,
+ TBool aIsUpgrade,
+ TBool aIsSeamless);
+
+ void NewCarrierActive(TAccessPointInfo aNewAPInfo, TBool aIsSeamless);
+
+ void Error(TInt aError);
+#endif
+
+protected: // From CActive
+ void RunL();
+ void DoCancel();
+
+private: // MConnectionMonitorObserver
+ void EventL(const CConnMonEventBase& aEvent);
+
+private:
+ TUint iapClientCount(TUint aIAPId) const;
+ quint64 transferredData(TUint dataType) const;
+ bool newState(QNetworkSession::State newState, TUint accessPointId = 0);
+ void handleSymbianConnectionStatusChange(TInt aConnectionStatus, TInt aError, TUint accessPointId = 0);
+ QNetworkConfiguration bestConfigFromSNAP(const QNetworkConfiguration& snapConfig) const;
+ QNetworkConfiguration activeConfiguration(TUint32 iapId = 0) const;
+ QNetworkInterface interface(TUint iapId) const;
+
+private: // data
+ SymbianEngine *engine;
+
+ mutable QNetworkInterface activeInterface;
+
+ QDateTime startTime;
+
+ RLibrary iOpenCLibrary;
+ TOpenCSetdefaultifFunction iDynamicSetdefaultif;
+
+ mutable RSocketServ iSocketServ;
+ mutable RConnection iConnection;
+ mutable RConnectionMonitor iConnectionMonitor;
+ ConnectionProgressNotifier* ipConnectionNotifier;
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ CActiveCommsMobilityApiExt* iMobility;
+#endif
+
+ QNetworkSession::SessionError iError;
+ TInt iALREnabled;
+ TBool iALRUpgradingConnection;
+
+ QList<QString> iKnownConfigsBeforeConnectionStart;
+
+ TUint32 iOldRoamingIap;
+ TUint32 iNewRoamingIap;
+
+ friend class ConnectionProgressNotifier;
+};
+
+class ConnectionProgressNotifier : public CActive
+{
+public:
+ ConnectionProgressNotifier(QNetworkSessionPrivateImpl &owner, RConnection &connection);
+ ~ConnectionProgressNotifier();
+
+ void StartNotifications();
+ void StopNotifications();
+
+protected: // From CActive
+ void RunL();
+ void DoCancel();
+
+private: // Data
+ QNetworkSessionPrivateImpl &iOwner;
+ RConnection& iConnection;
+ TNifProgressBuf iProgress;
+
+};
+
+QT_END_NAMESPACE
+
+#endif //QNETWORKSESSION_IMPL_H
+
diff --git a/src/plugins/bearer/symbian/symbian.pro b/src/plugins/bearer/symbian/symbian.pro
new file mode 100644
index 0000000000..9613defd11
--- /dev/null
+++ b/src/plugins/bearer/symbian/symbian.pro
@@ -0,0 +1,38 @@
+TARGET = qsymbianbearer
+include(../../qpluginbase.pri)
+
+QT += network
+
+HEADERS += symbianengine.h \
+ qnetworksession_impl.h
+
+SOURCES += symbianengine.cpp \
+ qnetworksession_impl.cpp \
+ main.cpp
+
+exists($${EPOCROOT}epoc32/release/winscw/udeb/cmmanager.lib)| \
+exists($${EPOCROOT}epoc32/release/armv5/lib/cmmanager.lib) {
+ message("Building with SNAP support")
+ DEFINES += SNAP_FUNCTIONALITY_AVAILABLE
+ LIBS += -lcmmanager
+} else {
+ message("Building without SNAP support")
+ LIBS += -lapengine
+}
+
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+symbian-abld:INCLUDEPATH += $$QT_BUILD_TREE/include/QtNetwork/private
+
+LIBS += -lcommdb \
+ -lapsettingshandlerui \
+ -lconnmon \
+ -lcentralrepository \
+ -lesock \
+ -linsock \
+ -lecom \
+ -lefsrv \
+ -lnetmeta
+
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer
+target.path += $$[QT_INSTALL_PLUGINS]/bearer
+INSTALLS += target
diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp
new file mode 100644
index 0000000000..88a563c068
--- /dev/null
+++ b/src/plugins/bearer/symbian/symbianengine.cpp
@@ -0,0 +1,1028 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "symbianengine.h"
+#include "qnetworksession_impl.h"
+
+#include <commdb.h>
+#include <cdbcols.h>
+#include <d32dbms.h>
+
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ #include <cmdestination.h>
+ #include <cmconnectionmethod.h>
+ #include <cmconnectionmethoddef.h>
+ #include <cmpluginwlandef.h>
+ #include <cmpluginpacketdatadef.h>
+ #include <cmplugindialcommondefs.h>
+#else
+ #include <apaccesspointitem.h>
+ #include <apdatahandler.h>
+ #include <aputils.h>
+#endif
+
+QT_BEGIN_NAMESPACE
+
+static const int KValueThatWillBeAddedToSNAPId = 1000;
+static const int KUserChoiceIAPId = 0;
+
+SymbianNetworkConfigurationPrivate::SymbianNetworkConfigurationPrivate()
+: bearer(BearerUnknown), numericId(0), connectionId(0)
+{
+}
+
+SymbianNetworkConfigurationPrivate::~SymbianNetworkConfigurationPrivate()
+{
+}
+
+QString SymbianNetworkConfigurationPrivate::bearerName() const
+{
+ switch (bearer) {
+ case BearerEthernet:
+ return QLatin1String("Ethernet");
+ case BearerWLAN:
+ return QLatin1String("WLAN");
+ case Bearer2G:
+ return QLatin1String("2G");
+ case BearerCDMA2000:
+ return QLatin1String("CDMA2000");
+ case BearerWCDMA:
+ return QLatin1String("WCDMA");
+ case BearerHSPA:
+ return QLatin1String("HSPA");
+ case BearerBluetooth:
+ return QLatin1String("Bluetooth");
+ case BearerWiMAX:
+ return QLatin1String("WiMAX");
+ default:
+ return QString();
+ }
+}
+
+SymbianEngine::SymbianEngine(QObject *parent)
+: QBearerEngine(parent), CActive(CActive::EPriorityIdle), iFirstUpdate(true), iInitOk(true)
+{
+ CActiveScheduler::Add(this);
+
+ TRAPD(error, ipCommsDB = CCommsDatabase::NewL(EDatabaseTypeIAP));
+ if (error != KErrNone) {
+ iInitOk = false;
+ return;
+ }
+
+ TRAP_IGNORE(iConnectionMonitor.ConnectL());
+ TRAP_IGNORE(iConnectionMonitor.NotifyEventL(*this));
+
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ TRAP(error, iCmManager.OpenL());
+ if (error != KErrNone) {
+ iInitOk = false;
+ return;
+ }
+#endif
+
+ SymbianNetworkConfigurationPrivate *cpPriv = new SymbianNetworkConfigurationPrivate;
+ cpPriv->name = "UserChoice";
+ cpPriv->bearer = SymbianNetworkConfigurationPrivate::BearerUnknown;
+ cpPriv->state = QNetworkConfiguration::Discovered;
+ cpPriv->isValid = true;
+ cpPriv->id = QString::number(qHash(KUserChoiceIAPId));
+ cpPriv->numericId = KUserChoiceIAPId;
+ cpPriv->connectionId = 0;
+ cpPriv->type = QNetworkConfiguration::UserChoice;
+ cpPriv->purpose = QNetworkConfiguration::UnknownPurpose;
+ cpPriv->roamingSupported = false;
+
+ QNetworkConfigurationPrivatePointer ptr(cpPriv);
+ userChoiceConfigurations.insert(ptr->id, ptr);
+
+ updateConfigurations();
+ updateStatesToSnaps();
+
+ updateAvailableAccessPoints(); // On first time updates synchronously (without WLAN scans)
+
+ // Start monitoring IAP and/or SNAP changes in Symbian CommsDB
+ startCommsDatabaseNotifications();
+ iFirstUpdate = false;
+}
+
+SymbianEngine::~SymbianEngine()
+{
+ Cancel();
+
+ iConnectionMonitor.CancelNotifications();
+ iConnectionMonitor.Close();
+
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ iCmManager.Close();
+#endif
+
+ delete ipAccessPointsAvailabilityScanner;
+
+ // CCommsDatabase destructor uses cleanup stack. Since QNetworkConfigurationManager
+ // is a global static, but the time we are here, E32Main() has been exited already and
+ // the thread's default cleanup stack has been deleted. Without this line, a
+ // 'E32USER-CBase 69' -panic will occur.
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+ delete ipCommsDB;
+ delete cleanup;
+}
+
+bool SymbianEngine::hasIdentifier(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ return accessPointConfigurations.contains(id) ||
+ snapConfigurations.contains(id) ||
+ userChoiceConfigurations.contains(id);
+}
+
+QNetworkConfigurationManager::Capabilities SymbianEngine::capabilities() const
+{
+ QNetworkConfigurationManager::Capabilities capFlags;
+
+ capFlags = QNetworkConfigurationManager::CanStartAndStopInterfaces |
+ QNetworkConfigurationManager::DirectConnectionRouting |
+ QNetworkConfigurationManager::SystemSessionSupport |
+ QNetworkConfigurationManager::DataStatistics;
+
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ capFlags |= QNetworkConfigurationManager::ApplicationLevelRoaming |
+ QNetworkConfigurationManager::ForcedRoaming;
+#endif
+
+ return capFlags;
+}
+
+QNetworkSessionPrivate *SymbianEngine::createSessionBackend()
+{
+ return new QNetworkSessionPrivateImpl(this);
+}
+
+void SymbianEngine::requestUpdate()
+{
+ QMutexLocker locker(&mutex);
+
+ if (!iInitOk || iUpdateGoingOn) {
+ return;
+ }
+ iUpdateGoingOn = true;
+
+ stopCommsDatabaseNotifications();
+ updateConfigurations(); // Synchronous call
+ updateAvailableAccessPoints(); // Asynchronous call
+}
+
+void SymbianEngine::updateConfigurations()
+{
+ QMutexLocker locker(&mutex);
+
+ if (!iInitOk) {
+ return;
+ }
+
+ TRAP_IGNORE(updateConfigurationsL());
+}
+
+void SymbianEngine::updateConfigurationsL()
+{
+ QMutexLocker locker(&mutex);
+
+ QList<QString> knownConfigs = accessPointConfigurations.keys();
+ QList<QString> knownSnapConfigs = snapConfigurations.keys();
+
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ // S60 version is >= Series60 3rd Edition Feature Pack 2
+ TInt error = KErrNone;
+
+ // Loop through all IAPs
+ RArray<TUint32> connectionMethods; // IAPs
+ CleanupClosePushL(connectionMethods);
+ iCmManager.ConnectionMethodL(connectionMethods);
+ for(int i = 0; i < connectionMethods.Count(); i++) {
+ RCmConnectionMethod connectionMethod = iCmManager.ConnectionMethodL(connectionMethods[i]);
+ CleanupClosePushL(connectionMethod);
+ TUint32 iapId = connectionMethod.GetIntAttributeL(CMManager::ECmIapId);
+ QString ident = QString::number(qHash(iapId));
+ if (accessPointConfigurations.contains(ident)) {
+ knownConfigs.removeOne(ident);
+ } else {
+ SymbianNetworkConfigurationPrivate* cpPriv = NULL;
+ TRAP(error, cpPriv = configFromConnectionMethodL(connectionMethod));
+ if (error == KErrNone) {
+ QNetworkConfigurationPrivatePointer ptr(cpPriv);
+ accessPointConfigurations.insert(ptr->id, ptr);
+ emit configurationAdded(ptr);
+ }
+ }
+ CleanupStack::PopAndDestroy(&connectionMethod);
+ }
+ CleanupStack::PopAndDestroy(&connectionMethods);
+
+ // Loop through all SNAPs
+ RArray<TUint32> destinations;
+ CleanupClosePushL(destinations);
+ iCmManager.AllDestinationsL(destinations);
+ for(int i = 0; i < destinations.Count(); i++) {
+ RCmDestination destination;
+ destination = iCmManager.DestinationL(destinations[i]);
+ CleanupClosePushL(destination);
+ QString ident = QString::number(qHash(destination.Id()+KValueThatWillBeAddedToSNAPId)); //TODO: Check if it's ok to add 1000 SNAP Id to prevent SNAP ids overlapping IAP ids
+ if (snapConfigurations.contains(ident)) {
+ knownSnapConfigs.removeOne(ident);
+ } else {
+ SymbianNetworkConfigurationPrivate *cpPriv = new SymbianNetworkConfigurationPrivate;
+ CleanupStack::PushL(cpPriv);
+
+ HBufC *pName = destination.NameLC();
+ cpPriv->name = QString::fromUtf16(pName->Ptr(),pName->Length());
+ CleanupStack::PopAndDestroy(pName);
+ pName = NULL;
+
+ cpPriv->isValid = true;
+ cpPriv->id = ident;
+ cpPriv->numericId = destination.Id();
+ cpPriv->connectionId = 0;
+ cpPriv->state = QNetworkConfiguration::Defined;
+ cpPriv->type = QNetworkConfiguration::ServiceNetwork;
+ cpPriv->purpose = QNetworkConfiguration::UnknownPurpose;
+ cpPriv->roamingSupported = false;
+
+ QNetworkConfigurationPrivatePointer ptr(cpPriv);
+ snapConfigurations.insert(ident, ptr);
+ emit configurationAdded(ptr);
+
+ CleanupStack::Pop(cpPriv);
+ }
+ QNetworkConfigurationPrivatePointer privSNAP = snapConfigurations.value(ident);
+
+ for (int j=0; j < destination.ConnectionMethodCount(); j++) {
+ RCmConnectionMethod connectionMethod = destination.ConnectionMethodL(j);
+ CleanupClosePushL(connectionMethod);
+
+ TUint32 iapId = connectionMethod.GetIntAttributeL(CMManager::ECmIapId);
+ QString iface = QString::number(qHash(iapId));
+ // Check that IAP can be found from accessPointConfigurations list
+ QNetworkConfigurationPrivatePointer priv = accessPointConfigurations.value(iface);
+ if (!priv) {
+ SymbianNetworkConfigurationPrivate *cpPriv = NULL;
+ TRAP(error, cpPriv = configFromConnectionMethodL(connectionMethod));
+ if (error == KErrNone) {
+ QNetworkConfigurationPrivatePointer ptr(cpPriv);
+ toSymbianConfig(ptr)->serviceNetworkPtr = privSNAP;
+ accessPointConfigurations.insert(ptr->id, ptr);
+ emit configurationAdded(ptr);
+ privSNAP->serviceNetworkMembers.append(ptr);
+ }
+ } else {
+ knownConfigs.removeOne(iface);
+ // Check that IAP can be found from related SNAP's configuration list
+ bool iapFound = false;
+ for (int i = 0; i < privSNAP->serviceNetworkMembers.count(); i++) {
+ if (toSymbianConfig(privSNAP->serviceNetworkMembers[i])->numericId == iapId) {
+ iapFound = true;
+ break;
+ }
+ }
+ if (!iapFound) {
+ toSymbianConfig(priv)->serviceNetworkPtr = privSNAP;
+ privSNAP->serviceNetworkMembers.append(priv);
+ }
+ }
+
+ CleanupStack::PopAndDestroy(&connectionMethod);
+ }
+
+ if (privSNAP->serviceNetworkMembers.count() > 1) {
+ // Roaming is supported only if SNAP contains more than one IAP
+ privSNAP->roamingSupported = true;
+ }
+
+ CleanupStack::PopAndDestroy(&destination);
+ }
+ CleanupStack::PopAndDestroy(&destinations);
+
+#else
+ // S60 version is < Series60 3rd Edition Feature Pack 2
+ CCommsDbTableView* pDbTView = ipCommsDB->OpenTableLC(TPtrC(IAP));
+
+ // Loop through all IAPs
+ TUint32 apId = 0;
+ TInt retVal = pDbTView->GotoFirstRecord();
+ while (retVal == KErrNone) {
+ pDbTView->ReadUintL(TPtrC(COMMDB_ID), apId);
+ QString ident = QString::number(qHash(apId));
+ if (accessPointConfigurations.contains(ident)) {
+ knownConfigs.removeOne(ident);
+ } else {
+ SymbianNetworkConfigurationPrivate *cpPriv = new SymbianNetworkConfigurationPrivate;
+ if (readNetworkConfigurationValuesFromCommsDb(apId, cpPriv)) {
+ QNetworkConfigurationPrivatePointer ptr(cpPriv);
+ accessPointConfigurations.insert(ident, ptr);
+
+ emit configurationAdded(ptr);
+ } else {
+ delete cpPriv;
+ }
+ }
+ retVal = pDbTView->GotoNextRecord();
+ }
+ CleanupStack::PopAndDestroy(pDbTView);
+#endif
+ updateActiveAccessPoints();
+
+ foreach (const QString &oldIface, knownConfigs) {
+ //remove non existing IAP
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.take(oldIface);
+ emit configurationRemoved(ptr);
+
+ // Remove non existing IAP from SNAPs
+ foreach (const QString &iface, snapConfigurations.keys()) {
+ QNetworkConfigurationPrivatePointer ptr2 = snapConfigurations.value(iface);
+ // => Check if one of the IAPs of the SNAP is active
+ for (int i = 0; i < ptr2->serviceNetworkMembers.count(); ++i) {
+ if (toSymbianConfig(ptr2->serviceNetworkMembers[i])->numericId ==
+ toSymbianConfig(ptr)->numericId) {
+ ptr2->serviceNetworkMembers.removeAt(i);
+ break;
+ }
+ }
+ }
+ }
+
+ foreach (const QString &oldIface, knownSnapConfigs) {
+ //remove non existing SNAPs
+ QNetworkConfigurationPrivatePointer ptr = snapConfigurations.take(oldIface);
+ emit configurationRemoved(ptr);
+ }
+}
+
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+SymbianNetworkConfigurationPrivate *SymbianEngine::configFromConnectionMethodL(
+ RCmConnectionMethod& connectionMethod)
+{
+ QMutexLocker locker(&mutex);
+
+ SymbianNetworkConfigurationPrivate *cpPriv = new SymbianNetworkConfigurationPrivate;
+ CleanupStack::PushL(cpPriv);
+
+ TUint32 iapId = connectionMethod.GetIntAttributeL(CMManager::ECmIapId);
+ QString ident = QString::number(qHash(iapId));
+
+ HBufC *pName = connectionMethod.GetStringAttributeL(CMManager::ECmName);
+ CleanupStack::PushL(pName);
+ cpPriv->name = QString::fromUtf16(pName->Ptr(),pName->Length());
+ CleanupStack::PopAndDestroy(pName);
+ pName = NULL;
+
+ TUint32 bearerId = connectionMethod.GetIntAttributeL(CMManager::ECmCommsDBBearerType);
+ switch (bearerId) {
+ case KCommDbBearerCSD:
+ cpPriv->bearer = SymbianNetworkConfigurationPrivate::Bearer2G;
+ break;
+ case KCommDbBearerWcdma:
+ cpPriv->bearer = SymbianNetworkConfigurationPrivate::BearerWCDMA;
+ break;
+ case KCommDbBearerLAN:
+ cpPriv->bearer = SymbianNetworkConfigurationPrivate::BearerEthernet;
+ break;
+ case KCommDbBearerVirtual:
+ cpPriv->bearer = SymbianNetworkConfigurationPrivate::BearerUnknown;
+ break;
+ case KCommDbBearerPAN:
+ cpPriv->bearer = SymbianNetworkConfigurationPrivate::BearerUnknown;
+ break;
+ case KCommDbBearerWLAN:
+ cpPriv->bearer = SymbianNetworkConfigurationPrivate::BearerWLAN;
+ break;
+ default:
+ cpPriv->bearer = SymbianNetworkConfigurationPrivate::BearerUnknown;
+ break;
+ }
+
+ TInt error = KErrNone;
+ TUint32 bearerType = connectionMethod.GetIntAttributeL(CMManager::ECmBearerType);
+ switch (bearerType) {
+ case KUidPacketDataBearerType:
+ // "Packet data" Bearer => Mapping is done using "Access point name"
+ TRAP(error, pName = connectionMethod.GetStringAttributeL(CMManager::EPacketDataAPName));
+ break;
+ case KUidWlanBearerType:
+ // "Wireless LAN" Bearer => Mapping is done using "WLAN network name" = SSID
+ TRAP(error, pName = connectionMethod.GetStringAttributeL(CMManager::EWlanSSID));
+ break;
+ }
+ if (!pName) {
+ // "Data call" Bearer or "High Speed (GSM)" Bearer => Mapping is done using "Dial-up number"
+ TRAP(error, pName = connectionMethod.GetStringAttributeL(CMManager::EDialDefaultTelNum));
+ }
+
+ if (error == KErrNone && pName) {
+ CleanupStack::PushL(pName);
+ cpPriv->mappingName = QString::fromUtf16(pName->Ptr(),pName->Length());
+ CleanupStack::PopAndDestroy(pName);
+ pName = NULL;
+ }
+
+ cpPriv->state = QNetworkConfiguration::Defined;
+ TBool isConnected = connectionMethod.GetBoolAttributeL(CMManager::ECmConnected);
+ if (isConnected) {
+ cpPriv->state = QNetworkConfiguration::Active;
+ }
+
+ cpPriv->isValid = true;
+ cpPriv->id = ident;
+ cpPriv->numericId = iapId;
+ cpPriv->connectionId = 0;
+ cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
+ cpPriv->purpose = QNetworkConfiguration::UnknownPurpose;
+ cpPriv->roamingSupported = false;
+
+ CleanupStack::Pop(cpPriv);
+ return cpPriv;
+}
+#else
+bool SymbianEngine::readNetworkConfigurationValuesFromCommsDb(
+ TUint32 aApId, SymbianNetworkConfigurationPrivate *apNetworkConfiguration)
+{
+ QMutexLocker locker(&mutex);
+
+ TRAPD(error, readNetworkConfigurationValuesFromCommsDbL(aApId,apNetworkConfiguration));
+ if (error != KErrNone) {
+ return false;
+ }
+ return true;
+}
+
+void SymbianEngine::readNetworkConfigurationValuesFromCommsDbL(
+ TUint32 aApId, SymbianNetworkConfigurationPrivate *apNetworkConfiguration)
+{
+ QMutexLocker locker(&mutex);
+
+ CApDataHandler* pDataHandler = CApDataHandler::NewLC(*ipCommsDB);
+ CApAccessPointItem* pAPItem = CApAccessPointItem::NewLC();
+ TBuf<KCommsDbSvrMaxColumnNameLength> name;
+
+ CApUtils* pApUtils = CApUtils::NewLC(*ipCommsDB);
+ TUint32 apId = pApUtils->WapIdFromIapIdL(aApId);
+
+ pDataHandler->AccessPointDataL(apId,*pAPItem);
+ pAPItem->ReadTextL(EApIapName, name);
+ if (name.Compare(_L("Easy WLAN")) == 0) {
+ // "Easy WLAN" won't be accepted to the Configurations list
+ User::Leave(KErrNotFound);
+ }
+
+ QString ident = QString::number(qHash(aApId));
+
+ apNetworkConfiguration->name = QString::fromUtf16(name.Ptr(),name.Length());
+ apNetworkConfiguration->isValid = true;
+ apNetworkConfiguration->id = ident;
+ apNetworkConfiguration->numericId = aApId;
+ apNetworkConfiguration->connectionId = 0;
+ apNetworkConfiguration->state = (QNetworkConfiguration::Defined);
+ apNetworkConfiguration->type = QNetworkConfiguration::InternetAccessPoint;
+ apNetworkConfiguration->purpose = QNetworkConfiguration::UnknownPurpose;
+ apNetworkConfiguration->roamingSupported = false;
+ switch (pAPItem->BearerTypeL()) {
+ case EApBearerTypeCSD:
+ apNetworkConfiguration->bearer = SymbianNetworkConfigurationPrivate::Bearer2G;
+ break;
+ case EApBearerTypeGPRS:
+ apNetworkConfiguration->bearer = SymbianNetworkConfigurationPrivate::Bearer2G;
+ break;
+ case EApBearerTypeHSCSD:
+ apNetworkConfiguration->bearer = SymbianNetworkConfigurationPrivate::BearerHSPA;
+ break;
+ case EApBearerTypeCDMA:
+ apNetworkConfiguration->bearer = SymbianNetworkConfigurationPrivate::BearerCDMA2000;
+ break;
+ case EApBearerTypeWLAN:
+ apNetworkConfiguration->bearer = SymbianNetworkConfigurationPrivate::BearerWLAN;
+ break;
+ case EApBearerTypeLAN:
+ apNetworkConfiguration->bearer = SymbianNetworkConfigurationPrivate::BearerEthernet;
+ break;
+ case EApBearerTypeLANModem:
+ apNetworkConfiguration->bearer = SymbianNetworkConfigurationPrivate::BearerEthernet;
+ break;
+ default:
+ apNetworkConfiguration->bearer = SymbianNetworkConfigurationPrivate::BearerUnknown;
+ break;
+ }
+
+ CleanupStack::PopAndDestroy(pApUtils);
+ CleanupStack::PopAndDestroy(pAPItem);
+ CleanupStack::PopAndDestroy(pDataHandler);
+}
+#endif
+
+QNetworkConfigurationPrivatePointer SymbianEngine::defaultConfiguration()
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkConfigurationPrivatePointer ptr;
+
+ if (iInitOk) {
+ stopCommsDatabaseNotifications();
+ TRAP_IGNORE(ptr = defaultConfigurationL());
+ startCommsDatabaseNotifications();
+ }
+
+ return ptr;
+}
+
+QStringList SymbianEngine::accessPointConfigurationIdentifiers()
+{
+ QMutexLocker locker(&mutex);
+
+ return accessPointConfigurations.keys();
+}
+
+QNetworkConfigurationPrivatePointer SymbianEngine::defaultConfigurationL()
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkConfigurationPrivatePointer ptr;
+
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ // Check Default Connection (SNAP or IAP)
+ TCmDefConnValue defaultConnectionValue;
+ iCmManager.ReadDefConnL(defaultConnectionValue);
+ if (defaultConnectionValue.iType == ECmDefConnDestination) {
+ QString iface = QString::number(qHash(defaultConnectionValue.iId+KValueThatWillBeAddedToSNAPId));
+ ptr = snapConfigurations.value(iface);
+ } else if (defaultConnectionValue.iType == ECmDefConnConnectionMethod) {
+ QString iface = QString::number(qHash(defaultConnectionValue.iId));
+ ptr = accessPointConfigurations.value(iface);
+ }
+#endif
+
+ if (!ptr->isValid) {
+ QString iface = QString::number(qHash(KUserChoiceIAPId));
+ ptr = userChoiceConfigurations.value(iface);
+ }
+
+ return ptr;
+}
+
+void SymbianEngine::updateActiveAccessPoints()
+{
+ QMutexLocker locker(&mutex);
+
+ bool online = false;
+ QList<QString> inactiveConfigs = accessPointConfigurations.keys();
+
+ TRequestStatus status;
+ TUint connectionCount;
+ iConnectionMonitor.GetConnectionCount(connectionCount, status);
+ User::WaitForRequest(status);
+
+ // Go through all connections and set state of related IAPs to Active
+ TUint connectionId;
+ TUint subConnectionCount;
+ TUint apId;
+ if (status.Int() == KErrNone) {
+ for (TUint i = 1; i <= connectionCount; i++) {
+ iConnectionMonitor.GetConnectionInfo(i, connectionId, subConnectionCount);
+ iConnectionMonitor.GetUintAttribute(connectionId, subConnectionCount, KIAPId, apId, status);
+ User::WaitForRequest(status);
+ QString ident = QString::number(qHash(apId));
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
+ if (ptr) {
+ online = true;
+ inactiveConfigs.removeOne(ident);
+
+ toSymbianConfig(ptr)->connectionId = connectionId;
+
+ // Configuration is Active
+ changeConfigurationStateTo(ptr, QNetworkConfiguration::Active);
+ }
+ }
+ }
+
+ // Make sure that state of rest of the IAPs won't be Active
+ foreach (const QString &iface, inactiveConfigs) {
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(iface);
+ if (ptr) {
+ // Configuration is either Defined or Discovered
+ changeConfigurationStateAtMaxTo(ptr, QNetworkConfiguration::Discovered);
+ }
+ }
+
+ if (iOnline != online) {
+ iOnline = online;
+ emit this->onlineStateChanged(iOnline);
+ }
+}
+
+void SymbianEngine::updateAvailableAccessPoints()
+{
+ QMutexLocker locker(&mutex);
+
+ if (!ipAccessPointsAvailabilityScanner) {
+ ipAccessPointsAvailabilityScanner = new AccessPointsAvailabilityScanner(*this, iConnectionMonitor);
+ }
+ if (ipAccessPointsAvailabilityScanner) {
+ // Scanning may take a while because WLAN scanning will be done (if device supports WLAN).
+ ipAccessPointsAvailabilityScanner->StartScanning();
+ }
+}
+
+void SymbianEngine::accessPointScanningReady(TBool scanSuccessful, TConnMonIapInfo iapInfo)
+{
+ QMutexLocker locker(&mutex);
+
+ iUpdateGoingOn = false;
+ if (scanSuccessful) {
+ QList<QString> unavailableConfigs = accessPointConfigurations.keys();
+
+ // Set state of returned IAPs to Discovered
+ // if state is not already Active
+ for(TUint i=0; i<iapInfo.iCount; i++) {
+ QString ident = QString::number(qHash(iapInfo.iIap[i].iIapId));
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
+ if (ptr) {
+ unavailableConfigs.removeOne(ident);
+ if (ptr->state < QNetworkConfiguration::Active) {
+ // Configuration is either Discovered or Active
+ changeConfigurationStateAtMinTo(ptr, QNetworkConfiguration::Discovered);
+ }
+ }
+ }
+
+ // Make sure that state of rest of the IAPs won't be Discovered or Active
+ foreach (const QString &iface, unavailableConfigs) {
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(iface);
+ if (ptr) {
+ // Configuration is Defined
+ changeConfigurationStateAtMaxTo(ptr, QNetworkConfiguration::Defined);
+ }
+ }
+ }
+
+ updateStatesToSnaps();
+
+ if (!iFirstUpdate) {
+ startCommsDatabaseNotifications();
+ emit updateCompleted();
+ }
+}
+
+void SymbianEngine::updateStatesToSnaps()
+{
+ QMutexLocker locker(&mutex);
+
+ // Go through SNAPs and set correct state to SNAPs
+ QList<QString> snapConfigIdents = snapConfigurations.keys();
+ foreach (QString iface, snapConfigIdents) {
+ bool discovered = false;
+ bool active = false;
+ QNetworkConfigurationPrivatePointer ptr = snapConfigurations.value(iface);
+ // => Check if one of the IAPs of the SNAP is discovered or active
+ // => If one of IAPs is active, also SNAP is active
+ // => If one of IAPs is discovered but none of the IAPs is active, SNAP is discovered
+ for (int i=0; i<ptr->serviceNetworkMembers.count(); i++) {
+ if ((ptr->serviceNetworkMembers[i]->state & QNetworkConfiguration::Active)
+ == QNetworkConfiguration::Active) {
+ active = true;
+ break;
+ } else if ((ptr->serviceNetworkMembers[i]->state & QNetworkConfiguration::Discovered)
+ == QNetworkConfiguration::Discovered) {
+ discovered = true;
+ }
+ }
+ if (active) {
+ changeConfigurationStateTo(ptr, QNetworkConfiguration::Active);
+ } else if (discovered) {
+ changeConfigurationStateTo(ptr, QNetworkConfiguration::Discovered);
+ } else {
+ changeConfigurationStateTo(ptr, QNetworkConfiguration::Defined);
+ }
+ }
+}
+
+bool SymbianEngine::changeConfigurationStateTo(QNetworkConfigurationPrivatePointer ptr,
+ QNetworkConfiguration::StateFlags newState)
+{
+ QMutexLocker locker(&mutex);
+
+ if (newState != ptr->state) {
+ ptr->state = newState;
+ emit configurationChanged(ptr);
+ return true;
+ }
+ return false;
+}
+
+/* changeConfigurationStateAtMinTo function does not overwrite possible better
+ * state (e.g. Discovered state does not overwrite Active state) but
+ * makes sure that state is at minimum given state.
+*/
+bool SymbianEngine::changeConfigurationStateAtMinTo(QNetworkConfigurationPrivatePointer ptr,
+ QNetworkConfiguration::StateFlags newState)
+{
+ QMutexLocker locker(&mutex);
+
+ if ((newState | ptr->state) != ptr->state) {
+ ptr->state = (ptr->state | newState);
+ emit configurationChanged(ptr);
+ return true;
+ }
+ return false;
+}
+
+/* changeConfigurationStateAtMaxTo function overwrites possible better
+ * state (e.g. Discovered state overwrites Active state) and
+ * makes sure that state is at maximum given state (e.g. Discovered state
+ * does not overwrite Defined state).
+*/
+bool SymbianEngine::changeConfigurationStateAtMaxTo(QNetworkConfigurationPrivatePointer ptr,
+ QNetworkConfiguration::StateFlags newState)
+{
+ QMutexLocker locker(&mutex);
+
+ if ((newState & ptr->state) != ptr->state) {
+ ptr->state = (newState & ptr->state);
+ emit configurationChanged(ptr);
+ return true;
+ }
+ return false;
+}
+
+void SymbianEngine::startCommsDatabaseNotifications()
+{
+ QMutexLocker locker(&mutex);
+
+ if (!iWaitingCommsDatabaseNotifications) {
+ iWaitingCommsDatabaseNotifications = ETrue;
+ if (!IsActive()) {
+ SetActive();
+ // Start waiting for new notification
+ ipCommsDB->RequestNotification(iStatus);
+ }
+ }
+}
+
+void SymbianEngine::stopCommsDatabaseNotifications()
+{
+ QMutexLocker locker(&mutex);
+
+ if (iWaitingCommsDatabaseNotifications) {
+ iWaitingCommsDatabaseNotifications = EFalse;
+ if (!IsActive()) {
+ SetActive();
+ // Make sure that notifier recorded events will not be returned
+ // as soon as the client issues the next RequestNotification() request.
+ ipCommsDB->RequestNotification(iStatus);
+ ipCommsDB->CancelRequestNotification();
+ } else {
+ ipCommsDB->CancelRequestNotification();
+ }
+ }
+}
+
+void SymbianEngine::RunL()
+{
+ QMutexLocker locker(&mutex);
+
+ if (iStatus != KErrCancel) {
+ RDbNotifier::TEvent event = STATIC_CAST(RDbNotifier::TEvent, iStatus.Int());
+ switch (event) {
+ case RDbNotifier::EUnlock: /** All read locks have been removed. */
+ case RDbNotifier::ECommit: /** A transaction has been committed. */
+ case RDbNotifier::ERollback: /** A transaction has been rolled back */
+ case RDbNotifier::ERecover: /** The database has been recovered */
+ // Note that if further database events occur while a client is handling
+ // a request completion, the notifier records the most significant database
+ // event and this is signalled as soon as the client issues the next
+ // RequestNotification() request.
+ // => Stop recording notifications
+ stopCommsDatabaseNotifications();
+ TRAPD(error, updateConfigurationsL());
+ if (error == KErrNone) {
+ updateStatesToSnaps();
+ }
+ iWaitingCommsDatabaseNotifications = true;
+ break;
+ default:
+ // Do nothing
+ break;
+ }
+ }
+
+ if (iWaitingCommsDatabaseNotifications) {
+ if (!IsActive()) {
+ SetActive();
+ // Start waiting for new notification
+ ipCommsDB->RequestNotification(iStatus);
+ }
+ }
+}
+
+void SymbianEngine::DoCancel()
+{
+ QMutexLocker locker(&mutex);
+
+ ipCommsDB->CancelRequestNotification();
+}
+
+
+void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
+{
+ QMutexLocker locker(&mutex);
+
+ switch (aEvent.EventType()) {
+ case EConnMonCreateConnection:
+ {
+ CConnMonCreateConnection* realEvent;
+ realEvent = (CConnMonCreateConnection*) &aEvent;
+ TUint subConnectionCount = 0;
+ TUint apId;
+ TUint connectionId = realEvent->ConnectionId();
+ TRequestStatus status;
+ iConnectionMonitor.GetUintAttribute(connectionId, subConnectionCount, KIAPId, apId, status);
+ User::WaitForRequest(status);
+ QString ident = QString::number(qHash(apId));
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
+ if (ptr) {
+ toSymbianConfig(ptr)->connectionId = connectionId;
+ // Configuration is Active
+ if (changeConfigurationStateTo(ptr, QNetworkConfiguration::Active))
+ updateStatesToSnaps();
+
+ if (!iOnline) {
+ iOnline = true;
+ emit this->onlineStateChanged(iOnline);
+ }
+ }
+ }
+ break;
+
+ case EConnMonDeleteConnection:
+ {
+ CConnMonDeleteConnection* realEvent;
+ realEvent = (CConnMonDeleteConnection*) &aEvent;
+ TUint connectionId = realEvent->ConnectionId();
+
+ QNetworkConfigurationPrivatePointer ptr = dataByConnectionId(connectionId);
+ if (ptr) {
+ toSymbianConfig(ptr)->connectionId = 0;
+ // Configuration is either Defined or Discovered
+ if (changeConfigurationStateAtMaxTo(ptr, QNetworkConfiguration::Discovered))
+ updateStatesToSnaps();
+ }
+
+ bool online = false;
+ foreach (const QString &iface, accessPointConfigurations.keys()) {
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(iface);
+ if (ptr->state == QNetworkConfiguration::Active) {
+ online = true;
+ break;
+ }
+ }
+ if (iOnline != online) {
+ iOnline = online;
+ emit this->onlineStateChanged(iOnline);
+ }
+ }
+ break;
+
+ case EConnMonIapAvailabilityChange:
+ {
+ CConnMonIapAvailabilityChange* realEvent;
+ realEvent = (CConnMonIapAvailabilityChange*) &aEvent;
+ TConnMonIapInfo iaps = realEvent->IapAvailability();
+ QList<QString> unDiscoveredConfigs = accessPointConfigurations.keys();
+ for ( TUint i = 0; i < iaps.Count(); i++ ) {
+ QString ident = QString::number(qHash(iaps.iIap[i].iIapId));
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
+ if (ptr) {
+ // Configuration is either Discovered or Active
+ changeConfigurationStateAtMinTo(ptr, QNetworkConfiguration::Discovered);
+ unDiscoveredConfigs.removeOne(ident);
+ }
+ }
+ foreach (const QString &iface, unDiscoveredConfigs) {
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(iface);
+ if (ptr) {
+ // Configuration is Defined
+ changeConfigurationStateAtMaxTo(ptr, QNetworkConfiguration::Defined);
+ }
+ }
+ }
+ break;
+
+ default:
+ // For unrecognized events
+ break;
+ }
+}
+
+QNetworkConfigurationPrivatePointer SymbianEngine::dataByConnectionId(TUint aConnectionId)
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkConfiguration item;
+
+ QHash<QString, QNetworkConfigurationPrivatePointer>::const_iterator i =
+ accessPointConfigurations.constBegin();
+ while (i != accessPointConfigurations.constEnd()) {
+ QNetworkConfigurationPrivatePointer ptr = i.value();
+ if (toSymbianConfig(ptr)->connectionId == aConnectionId)
+ return ptr;
+
+ ++i;
+ }
+
+ return QNetworkConfigurationPrivatePointer();
+}
+
+AccessPointsAvailabilityScanner::AccessPointsAvailabilityScanner(SymbianEngine& owner,
+ RConnectionMonitor& connectionMonitor)
+ : CActive(CActive::EPriorityStandard), iOwner(owner), iConnectionMonitor(connectionMonitor)
+{
+ CActiveScheduler::Add(this);
+}
+
+AccessPointsAvailabilityScanner::~AccessPointsAvailabilityScanner()
+{
+ Cancel();
+}
+
+void AccessPointsAvailabilityScanner::DoCancel()
+{
+ iConnectionMonitor.CancelAsyncRequest(EConnMonGetPckgAttribute);
+}
+
+void AccessPointsAvailabilityScanner::StartScanning()
+{
+ if (iOwner.iFirstUpdate) {
+ // On first update (the mgr is being instantiated) update only those bearers who
+ // don't need time-consuming scans (WLAN).
+ // Note: EBearerIdWCDMA covers also GPRS bearer
+ iConnectionMonitor.GetPckgAttribute(EBearerIdWCDMA, 0, KIapAvailability, iIapBuf, iStatus);
+ User::WaitForRequest(iStatus);
+ if (iStatus.Int() == KErrNone) {
+ iOwner.accessPointScanningReady(true,iIapBuf());
+ }
+ } else {
+ iConnectionMonitor.GetPckgAttribute(EBearerIdAll, 0, KIapAvailability, iIapBuf, iStatus);
+ if (!IsActive()) {
+ SetActive();
+ }
+ }
+}
+
+void AccessPointsAvailabilityScanner::RunL()
+{
+ if (iStatus.Int() != KErrNone) {
+ iIapBuf().iCount = 0;
+ iOwner.accessPointScanningReady(false,iIapBuf());
+ } else {
+ iOwner.accessPointScanningReady(true,iIapBuf());
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/bearer/symbian/symbianengine.h b/src/plugins/bearer/symbian/symbianengine.h
new file mode 100644
index 0000000000..ee6d07006a
--- /dev/null
+++ b/src/plugins/bearer/symbian/symbianengine.h
@@ -0,0 +1,206 @@
+/****************************************************************************
+**
+** 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 plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SYMBIANENGINE_H
+#define SYMBIANENGINE_H
+
+#include <QtCore/qstringlist.h>
+#include <QtNetwork/private/qbearerengine_p.h>
+#include <QtNetwork/qnetworkconfigmanager.h>
+
+#include <QHash>
+#include <rconnmon.h>
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ #include <cmmanager.h>
+#endif
+
+class CCommsDatabase;
+
+QT_BEGIN_NAMESPACE
+class QTimer;
+QT_END_NAMESPACE
+
+QT_BEGIN_NAMESPACE
+
+class QNetworkSessionPrivate;
+class AccessPointsAvailabilityScanner;
+
+class SymbianNetworkConfigurationPrivate : public QNetworkConfigurationPrivate
+{
+public:
+ enum Bearer {
+ BearerEthernet,
+ BearerWLAN,
+ Bearer2G,
+ BearerCDMA2000,
+ BearerWCDMA,
+ BearerHSPA,
+ BearerBluetooth,
+ BearerWiMAX,
+ BearerUnknown = -1
+ };
+
+ SymbianNetworkConfigurationPrivate();
+ ~SymbianNetworkConfigurationPrivate();
+
+ QString bearerName() const;
+
+ Bearer bearer;
+
+ TUint32 numericId;
+ TUint connectionId;
+
+ QNetworkConfigurationPrivatePointer serviceNetworkPtr;
+
+ QString mappingName;
+};
+
+inline SymbianNetworkConfigurationPrivate *toSymbianConfig(QNetworkConfigurationPrivatePointer ptr)
+{
+ return static_cast<SymbianNetworkConfigurationPrivate *>(ptr.data());
+}
+
+class SymbianEngine : public QBearerEngine, public CActive,
+ public MConnectionMonitorObserver
+{
+ Q_OBJECT
+
+public:
+ SymbianEngine(QObject *parent = 0);
+ virtual ~SymbianEngine();
+
+ bool hasIdentifier(const QString &id);
+
+ void requestUpdate();
+
+ QNetworkConfigurationManager::Capabilities capabilities() const;
+
+ QNetworkSessionPrivate *createSessionBackend();
+
+ QNetworkConfigurationPrivatePointer defaultConfiguration();
+
+ QStringList accessPointConfigurationIdentifiers();
+
+Q_SIGNALS:
+ void onlineStateChanged(bool isOnline);
+
+public Q_SLOTS:
+ void updateConfigurations();
+
+private:
+ void updateStatesToSnaps();
+ bool changeConfigurationStateTo(QNetworkConfigurationPrivatePointer ptr,
+ QNetworkConfiguration::StateFlags newState);
+ bool changeConfigurationStateAtMinTo(QNetworkConfigurationPrivatePointer ptr,
+ QNetworkConfiguration::StateFlags newState);
+ bool changeConfigurationStateAtMaxTo(QNetworkConfigurationPrivatePointer ptr,
+ QNetworkConfiguration::StateFlags newState);
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ SymbianNetworkConfigurationPrivate *configFromConnectionMethodL(RCmConnectionMethod& connectionMethod);
+#else
+ bool readNetworkConfigurationValuesFromCommsDb(
+ TUint32 aApId, SymbianNetworkConfigurationPrivate *apNetworkConfiguration);
+ void readNetworkConfigurationValuesFromCommsDbL(
+ TUint32 aApId, SymbianNetworkConfigurationPrivate *apNetworkConfiguration);
+#endif
+
+ void updateConfigurationsL();
+ void updateActiveAccessPoints();
+ void updateAvailableAccessPoints();
+ void accessPointScanningReady(TBool scanSuccessful, TConnMonIapInfo iapInfo);
+ void startCommsDatabaseNotifications();
+ void stopCommsDatabaseNotifications();
+
+ QNetworkConfigurationPrivatePointer defaultConfigurationL();
+ TBool GetS60PlatformVersion(TUint& aMajor, TUint& aMinor) const;
+ void startMonitoringIAPData(TUint32 aIapId);
+ QNetworkConfigurationPrivatePointer dataByConnectionId(TUint aConnectionId);
+
+protected: // From CActive
+ void RunL();
+ void DoCancel();
+
+private: // MConnectionMonitorObserver
+ void EventL(const CConnMonEventBase& aEvent);
+
+private: // Data
+ bool iFirstUpdate;
+ CCommsDatabase* ipCommsDB;
+ RConnectionMonitor iConnectionMonitor;
+
+ TBool iWaitingCommsDatabaseNotifications;
+ TBool iOnline;
+ TBool iInitOk;
+ TBool iUpdateGoingOn;
+
+
+ AccessPointsAvailabilityScanner* ipAccessPointsAvailabilityScanner;
+
+ friend class QNetworkSessionPrivate;
+ friend class AccessPointsAvailabilityScanner;
+
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ RCmManager iCmManager;
+#endif
+};
+
+class AccessPointsAvailabilityScanner : public CActive
+{
+public:
+ AccessPointsAvailabilityScanner(SymbianEngine& owner,
+ RConnectionMonitor& connectionMonitor);
+ ~AccessPointsAvailabilityScanner();
+
+ void StartScanning();
+
+protected: // From CActive
+ void RunL();
+ void DoCancel();
+
+private: // Data
+ SymbianEngine& iOwner;
+ RConnectionMonitor& iConnectionMonitor;
+ TConnMonIapInfoBuf iIapBuf;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/plugins/codecs/cn/qgb18030codec.cpp b/src/plugins/codecs/cn/qgb18030codec.cpp
index 5537cf7eaf..3f2eec78c2 100644
--- a/src/plugins/codecs/cn/qgb18030codec.cpp
+++ b/src/plugins/codecs/cn/qgb18030codec.cpp
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
#define Is3rdByte(c) (InRange((c), 0x81, 0xFE))
#define Is4thByte(c) (InRange((c), 0x30, 0x39))
-#define QValidChar(u) ((u) ? QChar((ushort)(u)) : QChar(QChar::ReplacementCharacter))
+#define qValidChar(u) ((u) ? (u) : static_cast<ushort>(QChar::ReplacementCharacter))
/* User-defined areas: UDA 1: 0xAAA1 - 0xAFFE (564/0)
UDA 2: 0xF8A1 - 0xFEFE (658/0)
@@ -160,7 +160,7 @@ QString QGb18030Codec::convertToUnicode(const char* chars, int len, ConverterSta
{
uchar buf[4];
int nbuf = 0;
- QChar replacement = QChar::ReplacementCharacter;
+ ushort replacement = QChar::ReplacementCharacter;
if (state) {
if (state->flags & ConvertInvalidToNull)
replacement = QChar::Null;
@@ -173,6 +173,9 @@ QString QGb18030Codec::convertToUnicode(const char* chars, int len, ConverterSta
int invalid = 0;
QString result;
+ result.resize(len);
+ int unicodeLen = 0;
+ ushort *const resultData = reinterpret_cast<ushort*>(result.data());
//qDebug("QGb18030Decoder::toUnicode(const char* chars, int len = %d)", len);
for (int i = 0; i < len; i++) {
uchar ch = chars[i];
@@ -180,14 +183,16 @@ QString QGb18030Codec::convertToUnicode(const char* chars, int len, ConverterSta
case 0:
if (ch < 0x80) {
// ASCII
- result += QLatin1Char(ch);
+ resultData[unicodeLen] = ch;
+ ++unicodeLen;
} else if (Is1stByte(ch)) {
// GB18030?
buf[0] = ch;
nbuf = 1;
} else {
// Invalid
- result += replacement;
+ resultData[unicodeLen] = replacement;
+ ++unicodeLen;
++invalid;
}
break;
@@ -198,9 +203,11 @@ QString QGb18030Codec::convertToUnicode(const char* chars, int len, ConverterSta
int clen = 2;
uint u = qt_Gb18030ToUnicode(buf, clen);
if (clen == 2) {
- result += QValidChar(u);
+ resultData[unicodeLen] = qValidChar(static_cast<ushort>(u));
+ ++unicodeLen;
} else {
- result += replacement;
+ resultData[unicodeLen] = replacement;
+ ++unicodeLen;
++invalid;
}
nbuf = 0;
@@ -209,7 +216,8 @@ QString QGb18030Codec::convertToUnicode(const char* chars, int len, ConverterSta
nbuf = 2;
} else {
// Error
- result += replacement;
+ resultData[unicodeLen] = replacement;
+ ++unicodeLen;
++invalid;
nbuf = 0;
}
@@ -220,7 +228,8 @@ QString QGb18030Codec::convertToUnicode(const char* chars, int len, ConverterSta
buf[2] = ch;
nbuf = 3;
} else {
- result += replacement;
+ resultData[unicodeLen] = replacement;
+ ++unicodeLen;
++invalid;
nbuf = 0;
}
@@ -232,19 +241,24 @@ QString QGb18030Codec::convertToUnicode(const char* chars, int len, ConverterSta
int clen = 4;
uint u = qt_Gb18030ToUnicode(buf, clen);
if (clen == 4) {
- result += QValidChar(u);
+ resultData[unicodeLen] = qValidChar(u);
+ ++unicodeLen;
} else {
- result += replacement;
+ resultData[unicodeLen] = replacement;
+ ++unicodeLen;
++invalid;
}
} else {
- result += replacement;
+ resultData[unicodeLen] = replacement;
+ ++unicodeLen;
++invalid;
}
nbuf = 0;
break;
}
}
+ result.resize(unicodeLen);
+
if (state) {
state->remainingChars = nbuf;
state->state_data[0] = (buf[0] << 24) + (buf[1] << 16) + (buf[2] << 8) + buf[3];
@@ -342,7 +356,7 @@ QString QGbkCodec::convertToUnicode(const char* chars, int len, ConverterState *
int clen = 2;
uint u = qt_Gb18030ToUnicode(buf, clen);
if (clen == 2) {
- result += QValidChar(u);
+ result += qValidChar(u);
} else {
result += replacement;
++invalid;
@@ -445,7 +459,7 @@ QString QGb2312Codec::convertToUnicode(const char* chars, int len, ConverterStat
{
uchar buf[2];
int nbuf = 0;
- QChar replacement = QChar::ReplacementCharacter;
+ ushort replacement = QChar::ReplacementCharacter;
if (state) {
if (state->flags & ConvertInvalidToNull)
replacement = QChar::Null;
@@ -456,6 +470,9 @@ QString QGb2312Codec::convertToUnicode(const char* chars, int len, ConverterStat
int invalid = 0;
QString result;
+ result.resize(len);
+ int unicodeLen = 0;
+ ushort *const resultData = reinterpret_cast<ushort*>(result.data());
//qDebug("QGb2312Decoder::toUnicode(const char* chars, int len = %d)", len);
for (int i=0; i<len; i++) {
uchar ch = chars[i];
@@ -463,14 +480,16 @@ QString QGb2312Codec::convertToUnicode(const char* chars, int len, ConverterStat
case 0:
if (ch < 0x80) {
// ASCII
- result += QLatin1Char(ch);
+ resultData[unicodeLen] = ch;
+ ++unicodeLen;
} else if (IsByteInGb2312(ch)) {
// GB2312 1st byte?
buf[0] = ch;
nbuf = 1;
} else {
// Invalid
- result += replacement;
+ resultData[unicodeLen] = replacement;
+ ++unicodeLen;
++invalid;
}
break;
@@ -481,21 +500,25 @@ QString QGb2312Codec::convertToUnicode(const char* chars, int len, ConverterStat
int clen = 2;
uint u = qt_Gb18030ToUnicode(buf, clen);
if (clen == 2) {
- result += QValidChar(u);
+ resultData[unicodeLen] = qValidChar(static_cast<ushort>(u));
+ ++unicodeLen;
} else {
- result += replacement;
+ resultData[unicodeLen] = replacement;
+ ++unicodeLen;
++invalid;
}
nbuf = 0;
} else {
// Error
- result += replacement;
+ resultData[unicodeLen] = replacement;
+ ++unicodeLen;
++invalid;
nbuf = 0;
}
break;
}
}
+ result.resize(unicodeLen);
if (state) {
state->remainingChars = nbuf;
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index b76c6a76be..e4a0135ce1 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -175,7 +175,7 @@ enum PaintOperation {
DRAW_PATH = 0x0040, DRAW_POINTS = 0x0080, DRAW_ELLIPSE = 0x0100,
DRAW_POLYGON = 0x0200, DRAW_TEXT = 0x0400, FILL_PATH = 0x0800,
FILL_RECT = 0x1000, DRAW_COLORSPANS = 0x2000, DRAW_ROUNDED_RECT = 0x4000,
- ALL = 0xffff
+ DRAW_STATICTEXT = 0x8000, ALL = 0xffff
};
#ifdef QT_DEBUG
@@ -797,6 +797,14 @@ void QDirectFBPaintEngine::drawRoundedRect(const QRectF &rect, qreal xrad, qreal
QRasterPaintEngine::drawRoundedRect(rect, xrad, yrad, mode);
}
+void QDirectFBPaintEngine::drawStaticTextItem(QStaticTextItem *item)
+{
+ RASTERFALLBACK(DRAW_STATICTEXT, item, VOID_ARG(), VOID_ARG());
+ Q_D(QDirectFBPaintEngine);
+ d->lock();
+ QRasterPaintEngine::drawStaticTextItem(item);
+}
+
void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush)
{
Q_D(QDirectFBPaintEngine);
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h
index 64609d798c..19e8b84116 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h
@@ -109,6 +109,8 @@ public:
virtual void clip(const QRegion &region, Qt::ClipOperation op);
virtual void clip(const QRect &rect, Qt::ClipOperation op);
+ virtual void drawStaticTextItem(QStaticTextItem *item);
+
static void initImageCache(int size);
};
diff --git a/src/plugins/graphicssystems/opengl/main.cpp b/src/plugins/graphicssystems/opengl/main.cpp
index 19631b6085..abcfb7f7dd 100644
--- a/src/plugins/graphicssystems/opengl/main.cpp
+++ b/src/plugins/graphicssystems/opengl/main.cpp
@@ -56,7 +56,7 @@ QStringList QGLGraphicsSystemPlugin::keys() const
{
QStringList list;
list << QLatin1String("OpenGL") << QLatin1String("OpenGL1");
-#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
+#if !defined(QT_OPENGL_ES_1)
list << QLatin1String("OpenGL2");
#endif
return list;
@@ -69,7 +69,7 @@ QGraphicsSystem* QGLGraphicsSystemPlugin::create(const QString& system)
return new QGLGraphicsSystem;
}
-#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
+#if !defined(QT_OPENGL_ES_1)
if (system.toLower() == QLatin1String("opengl2")) {
QGL::setPreferredPaintEngine(QPaintEngine::OpenGL2);
return new QGLGraphicsSystem;
diff --git a/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp b/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp
index 13044f4942..6bf9d6b050 100644
--- a/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp
+++ b/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp
@@ -82,8 +82,13 @@ QTraceWindowSurface::~QTraceWindowSurface()
QFile outputFile(QString(QLatin1String("qtgraphics-%0.trace")).arg(winId));
if (outputFile.open(QIODevice::WriteOnly)) {
QDataStream out(&outputFile);
- out.writeBytes("qttrace", 7);
- out << *buffer << updates;
+ out.setFloatingPointPrecision(QDataStream::SinglePrecision);
+
+ out.writeBytes("qttraceV2", 9);
+
+ uint version = 1;
+
+ out << version << *buffer << updates;
}
delete buffer;
}
diff --git a/src/plugins/imageformats/ico/qicohandler.cpp b/src/plugins/imageformats/ico/qicohandler.cpp
index 4edb87a35d..032ff85474 100644
--- a/src/plugins/imageformats/ico/qicohandler.cpp
+++ b/src/plugins/imageformats/ico/qicohandler.cpp
@@ -54,6 +54,9 @@
#include <QtCore/QFile>
#include <QtCore/QBuffer>
#include <qvariant.h>
+
+QT_BEGIN_NAMESPACE
+
// These next two structs represent how the icon information is stored
// in an ICO file.
typedef struct
@@ -891,3 +894,4 @@ bool QtIcoHandler::jumpToNextImage()
return jumpToImage(m_currentIconIndex + 1);
}
+QT_END_NAMESPACE
diff --git a/src/plugins/imageformats/ico/qicohandler.h b/src/plugins/imageformats/ico/qicohandler.h
index 394a5eb8a9..4334ad9723 100644
--- a/src/plugins/imageformats/ico/qicohandler.h
+++ b/src/plugins/imageformats/ico/qicohandler.h
@@ -43,6 +43,8 @@
#include <QtGui/QImageIOHandler>
+QT_BEGIN_NAMESPACE
+
class ICOReader;
class QtIcoHandler: public QImageIOHandler
{
@@ -71,5 +73,7 @@ private:
};
+QT_END_NAMESPACE
+
#endif /* QTICOHANDLER_H */
diff --git a/src/plugins/imageformats/jpeg/jpeg.pro b/src/plugins/imageformats/jpeg/jpeg.pro
index ebc79cc0c7..5b45422f40 100644
--- a/src/plugins/imageformats/jpeg/jpeg.pro
+++ b/src/plugins/imageformats/jpeg/jpeg.pro
@@ -13,10 +13,12 @@ wince*: {
contains(CE_ARCH,x86):CONFIG += exceptions_off
}
+#Disable warnings in 3rdparty code due to unused arguments
symbian: {
- #Disable warnings in 3rdparty code due to unused arguments
QMAKE_CXXFLAGS.CW += -W nounusedarg
TARGET.UID3=0x2001E61B
+} else:contains(QMAKE_CC, gcc): {
+ QMAKE_CFLAGS_WARN_ON += -Wno-unused-parameter -Wno-main
}
contains(QT_CONFIG, system-jpeg) {
@@ -26,8 +28,10 @@ contains(QT_CONFIG, system-jpeg) {
!contains(QT_CONFIG, system-jpeg) {
INCLUDEPATH += ../../../3rdparty/libjpeg
SOURCES += \
+ ../../../3rdparty/libjpeg/jaricom.c \
../../../3rdparty/libjpeg/jcapimin.c \
../../../3rdparty/libjpeg/jcapistd.c \
+ ../../../3rdparty/libjpeg/jcarith.c \
../../../3rdparty/libjpeg/jccoefct.c \
../../../3rdparty/libjpeg/jccolor.c \
../../../3rdparty/libjpeg/jcdctmgr.c \
@@ -38,12 +42,12 @@ contains(QT_CONFIG, system-jpeg) {
../../../3rdparty/libjpeg/jcmaster.c \
../../../3rdparty/libjpeg/jcomapi.c \
../../../3rdparty/libjpeg/jcparam.c \
- ../../../3rdparty/libjpeg/jcphuff.c \
../../../3rdparty/libjpeg/jcprepct.c \
../../../3rdparty/libjpeg/jcsample.c \
../../../3rdparty/libjpeg/jctrans.c \
../../../3rdparty/libjpeg/jdapimin.c \
../../../3rdparty/libjpeg/jdapistd.c \
+ ../../../3rdparty/libjpeg/jdarith.c \
../../../3rdparty/libjpeg/jdatadst.c \
../../../3rdparty/libjpeg/jdatasrc.c \
../../../3rdparty/libjpeg/jdcoefct.c \
@@ -55,7 +59,6 @@ contains(QT_CONFIG, system-jpeg) {
../../../3rdparty/libjpeg/jdmarker.c \
../../../3rdparty/libjpeg/jdmaster.c \
../../../3rdparty/libjpeg/jdmerge.c \
- ../../../3rdparty/libjpeg/jdphuff.c \
../../../3rdparty/libjpeg/jdpostct.c \
../../../3rdparty/libjpeg/jdsample.c \
../../../3rdparty/libjpeg/jdtrans.c \
@@ -66,11 +69,10 @@ contains(QT_CONFIG, system-jpeg) {
../../../3rdparty/libjpeg/jidctflt.c \
../../../3rdparty/libjpeg/jidctfst.c \
../../../3rdparty/libjpeg/jidctint.c \
- ../../../3rdparty/libjpeg/jidctred.c \
- ../../../3rdparty/libjpeg/jmemmgr.c \
../../../3rdparty/libjpeg/jquant1.c \
../../../3rdparty/libjpeg/jquant2.c \
../../../3rdparty/libjpeg/jutils.c \
+ ../../../3rdparty/libjpeg/jmemmgr.c \
../../../3rdparty/libjpeg/jmemnobs.c
}
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
index 98bd88fac3..abe3ffec53 100644
--- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp
+++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
@@ -52,8 +52,6 @@
#undef FAR
#endif
-// hw: optimize smoothscaler for returning 24-bit images
-
// including jpeglib.h seems to be a little messy
extern "C" {
// mingw includes rpcndr.h but does not define boolean
@@ -76,433 +74,6 @@ extern "C" {
QT_BEGIN_NAMESPACE
-//#define QT_NO_IMAGE_SMOOTHSCALE
-#ifndef QT_NO_IMAGE_SMOOTHSCALE
-class QImageSmoothScalerPrivate;
-class QImageSmoothScaler
-{
-public:
- QImageSmoothScaler(const int w, const int h, const QImage &src);
- QImageSmoothScaler(const int srcWidth, const int srcHeight,
- const int dstWidth, const int dstHeight);
-
- virtual ~QImageSmoothScaler(void);
-
- QImage scale();
-
-private:
- QImageSmoothScalerPrivate *d;
- virtual QRgb *scanLine(const int line = 0, const QImage *src = 0);
-};
-
-class QImageSmoothScalerPrivate
-{
-public:
- int cols;
- int newcols;
- int rows;
- int newrows;
- bool hasAlpha;
-
- const QImage *src;
-
- void setup(const int srcWidth, const int srcHeight, const int dstWidth,
- const int dstHeight, bool hasAlphaChannel);
-};
-
-QImageSmoothScaler::QImageSmoothScaler(const int w, const int h,
- const QImage &src)
-{
- d = new QImageSmoothScalerPrivate;
-
- d->setup(src.width(), src.height(), w, h, src.hasAlphaChannel() );
- this->d->src = &src;
-}
-
-QImageSmoothScaler::QImageSmoothScaler(const int srcWidth, const int srcHeight,
- const int dstWidth, const int dstHeight)
-{
- d = new QImageSmoothScalerPrivate;
- d->setup(srcWidth, srcHeight, dstWidth, dstHeight, 0);
-}
-
-void QImageSmoothScalerPrivate::setup(const int srcWidth, const int srcHeight,
- const int dstWidth, const int dstHeight,
- bool hasAlphaChannel)
-{
- cols = srcWidth;
- rows = srcHeight;
- newcols = dstWidth;
- newrows = dstHeight;
- hasAlpha = hasAlphaChannel;
-}
-
-QImageSmoothScaler::~QImageSmoothScaler()
-{
- delete d;
-}
-
-inline QRgb *QImageSmoothScaler::scanLine(const int line, const QImage *src)
-{
- return (QRgb*)src->scanLine(line);
-}
-
-/*
- This function uses code based on pnmscale.c by Jef Poskanzer.
-
- pnmscale.c - read a portable anymap and scale it
-
- Copyright (C) 1989, 1991 by Jef Poskanzer.
-
- Permission to use, copy, modify, and distribute this software and its
- documentation for any purpose and without fee is hereby granted, provided
- that the above copyright notice appear in all copies and that both that
- copyright notice and this permission notice appear in supporting
- documentation. This software is provided "as is" without express or
- implied warranty.
-*/
-
-QImage QImageSmoothScaler::scale()
-{
- long SCALE;
- long HALFSCALE;
- QRgb *xelrow = 0;
- QRgb *tempxelrow = 0;
- QRgb *xP;
- QRgb *nxP;
- int row, rowsread;
- int col, needtoreadrow;
- uchar maxval = 255;
- qreal xscale, yscale;
- long sxscale, syscale;
- long fracrowtofill, fracrowleft;
- long *as;
- long *rs;
- long *gs;
- long *bs;
- int rowswritten = 0;
- QImage dst;
-
- if (d->cols > 4096) {
- SCALE = 4096;
- HALFSCALE = 2048;
- } else {
- int fac = 4096;
- while (d->cols * fac > 4096)
- fac /= 2;
-
- SCALE = fac * d->cols;
- HALFSCALE = fac * d->cols / 2;
- }
-
- xscale = (qreal)d->newcols / (qreal)d->cols;
- yscale = (qreal)d->newrows / (qreal)d->rows;
- sxscale = (long)(xscale * SCALE);
- syscale = (long)(yscale * SCALE);
-
- // shortcut Y scaling if possible
- if (d->newrows != d->rows)
- tempxelrow = new QRgb[d->cols];
-
- if (d->hasAlpha) {
- as = new long[d->cols];
- for (col = 0; col < d->cols; ++col)
- as[col] = HALFSCALE;
- } else {
- as = 0;
- }
- rs = new long[d->cols];
- gs = new long[d->cols];
- bs = new long[d->cols];
- rowsread = 0;
- fracrowleft = syscale;
- needtoreadrow = 1;
- for (col = 0; col < d->cols; ++col)
- rs[col] = gs[col] = bs[col] = HALFSCALE;
- fracrowtofill = SCALE;
-
- dst = QImage(d->newcols, d->newrows, d->hasAlpha ? QImage::Format_ARGB32 : QImage::Format_RGB32);
-
- for (row = 0; row < d->newrows; ++row) {
- // First scale Y from xelrow into tempxelrow.
- if (d->newrows == d->rows) {
- // shortcut Y scaling if possible
- tempxelrow = xelrow = scanLine(rowsread++, d->src);
- } else {
- while (fracrowleft < fracrowtofill) {
- if (needtoreadrow && rowsread < d->rows)
- xelrow = scanLine(rowsread++, d->src);
- for (col = 0, xP = xelrow; col < d->cols; ++col, ++xP) {
- if (as) {
- as[col] += fracrowleft * qAlpha(*xP);
- rs[col] += fracrowleft * qRed(*xP) * qAlpha(*xP) / 255;
- gs[col] += fracrowleft * qGreen(*xP) * qAlpha(*xP) / 255;
- bs[col] += fracrowleft * qBlue(*xP) * qAlpha(*xP) / 255;
- } else {
- rs[col] += fracrowleft * qRed(*xP);
- gs[col] += fracrowleft * qGreen(*xP);
- bs[col] += fracrowleft * qBlue(*xP);
- }
- }
- fracrowtofill -= fracrowleft;
- fracrowleft = syscale;
- needtoreadrow = 1;
- }
- // Now fracrowleft is >= fracrowtofill, so we can produce a row.
- if (needtoreadrow && rowsread < d->rows) {
- xelrow = scanLine(rowsread++, d->src);
- needtoreadrow = 0;
- }
- for (col = 0, xP = xelrow, nxP = tempxelrow; col < d->cols; ++col, ++xP, ++nxP) {
- register long a, r, g, b;
-
- if (as) {
- r = rs[col] + fracrowtofill * qRed(*xP) * qAlpha(*xP) / 255;
- g = gs[col] + fracrowtofill * qGreen(*xP) * qAlpha(*xP) / 255;
- b = bs[col] + fracrowtofill * qBlue(*xP) * qAlpha(*xP) / 255;
- a = as[col] + fracrowtofill * qAlpha(*xP);
- if (a) {
- r = r * 255 / a * SCALE;
- g = g * 255 / a * SCALE;
- b = b * 255 / a * SCALE;
- }
- } else {
- r = rs[col] + fracrowtofill * qRed(*xP);
- g = gs[col] + fracrowtofill * qGreen(*xP);
- b = bs[col] + fracrowtofill * qBlue(*xP);
- a = 0; // unwarn
- }
- r /= SCALE;
- if (r > maxval)
- r = maxval;
- g /= SCALE;
- if (g > maxval)
- g = maxval;
- b /= SCALE;
- if (b > maxval)
- b = maxval;
- if (as) {
- a /= SCALE;
- if (a > maxval)
- a = maxval;
- *nxP = qRgba((int)r, (int)g, (int)b, (int)a);
- as[col] = HALFSCALE;
- } else {
- *nxP = qRgb((int)r, (int)g, (int)b);
- }
- rs[col] = gs[col] = bs[col] = HALFSCALE;
- }
- fracrowleft -= fracrowtofill;
- if (fracrowleft == 0) {
- fracrowleft = syscale;
- needtoreadrow = 1;
- }
- fracrowtofill = SCALE;
- }
-
- // Now scale X from tempxelrow into dst and write it out.
- if (d->newcols == d->cols) {
- // shortcut X scaling if possible
- memcpy(dst.scanLine(rowswritten++), tempxelrow, d->newcols * 4);
- } else {
- register long a, r, g, b;
- register long fraccoltofill, fraccolleft = 0;
- register int needcol;
-
- nxP = (QRgb *)dst.scanLine(rowswritten++);
- QRgb *nxPEnd = nxP + d->newcols;
- fraccoltofill = SCALE;
- a = r = g = b = HALFSCALE;
- needcol = 0;
- for (col = 0, xP = tempxelrow; col < d->cols; ++col, ++xP) {
- fraccolleft = sxscale;
- while (fraccolleft >= fraccoltofill) {
- if (needcol) {
- ++nxP;
- a = r = g = b = HALFSCALE;
- }
- if (as) {
- r += fraccoltofill * qRed(*xP) * qAlpha(*xP) / 255;
- g += fraccoltofill * qGreen(*xP) * qAlpha(*xP) / 255;
- b += fraccoltofill * qBlue(*xP) * qAlpha(*xP) / 255;
- a += fraccoltofill * qAlpha(*xP);
- if (a) {
- r = r * 255 / a * SCALE;
- g = g * 255 / a * SCALE;
- b = b * 255 / a * SCALE;
- }
- } else {
- r += fraccoltofill * qRed(*xP);
- g += fraccoltofill * qGreen(*xP);
- b += fraccoltofill * qBlue(*xP);
- }
- r /= SCALE;
- if (r > maxval)
- r = maxval;
- g /= SCALE;
- if (g > maxval)
- g = maxval;
- b /= SCALE;
- if (b > maxval)
- b = maxval;
- if (as) {
- a /= SCALE;
- if (a > maxval)
- a = maxval;
- *nxP = qRgba((int)r, (int)g, (int)b, (int)a);
- } else {
- *nxP = qRgb((int)r, (int)g, (int)b);
- }
- fraccolleft -= fraccoltofill;
- fraccoltofill = SCALE;
- needcol = 1;
- }
- if (fraccolleft > 0) {
- if (needcol) {
- ++nxP;
- a = r = g = b = HALFSCALE;
- needcol = 0;
- }
- if (as) {
- a += fraccolleft * qAlpha(*xP);
- r += fraccolleft * qRed(*xP) * qAlpha(*xP) / 255;
- g += fraccolleft * qGreen(*xP) * qAlpha(*xP) / 255;
- b += fraccolleft * qBlue(*xP) * qAlpha(*xP) / 255;
- } else {
- r += fraccolleft * qRed(*xP);
- g += fraccolleft * qGreen(*xP);
- b += fraccolleft * qBlue(*xP);
- }
- fraccoltofill -= fraccolleft;
- }
- }
- if (fraccoltofill > 0) {
- --xP;
- if (as) {
- a += fraccolleft * qAlpha(*xP);
- r += fraccoltofill * qRed(*xP) * qAlpha(*xP) / 255;
- g += fraccoltofill * qGreen(*xP) * qAlpha(*xP) / 255;
- b += fraccoltofill * qBlue(*xP) * qAlpha(*xP) / 255;
- if (a) {
- r = r * 255 / a * SCALE;
- g = g * 255 / a * SCALE;
- b = b * 255 / a * SCALE;
- }
- } else {
- r += fraccoltofill * qRed(*xP);
- g += fraccoltofill * qGreen(*xP);
- b += fraccoltofill * qBlue(*xP);
- }
- }
- if (nxP < nxPEnd) {
- r /= SCALE;
- if (r > maxval)
- r = maxval;
- g /= SCALE;
- if (g > maxval)
- g = maxval;
- b /= SCALE;
- if (b > maxval)
- b = maxval;
- if (as) {
- a /= SCALE;
- if (a > maxval)
- a = maxval;
- *nxP = qRgba((int)r, (int)g, (int)b, (int)a);
- } else {
- *nxP = qRgb((int)r, (int)g, (int)b);
- }
- while (++nxP != nxPEnd)
- nxP[0] = nxP[-1];
- }
- }
- }
-
- if (d->newrows != d->rows && tempxelrow)// Robust, tempxelrow might be 0 1 day
- delete [] tempxelrow;
- if (as) // Avoid purify complaint
- delete [] as;
- if (rs) // Robust, rs might be 0 one day
- delete [] rs;
- if (gs) // Robust, gs might be 0 one day
- delete [] gs;
- if (bs) // Robust, bs might be 0 one day
- delete [] bs;
-
- return dst;
-}
-
-class jpegSmoothScaler : public QImageSmoothScaler
-{
-public:
- jpegSmoothScaler(struct jpeg_decompress_struct *info, const QSize& dstSize, const QRect& clipRect)
- : QImageSmoothScaler(clipRect.width(), clipRect.height(),
- dstSize.width(), dstSize.height())
- {
- cinfo = info;
- clip = clipRect;
- imageCache = QImage(info->output_width, 1, QImage::Format_RGB32);
- }
-
-private:
- QRect clip;
- QImage imageCache;
- struct jpeg_decompress_struct *cinfo;
-
- QRgb *scanLine(const int line = 0, const QImage *src = 0)
- {
- QRgb *out;
- uchar *in;
-
- Q_UNUSED(line);
- Q_UNUSED(src);
-
- uchar* data = imageCache.bits();
-
- // Read ahead if we haven't reached the first clipped scanline yet.
- while (int(cinfo->output_scanline) < clip.y() &&
- cinfo->output_scanline < cinfo->output_height)
- jpeg_read_scanlines(cinfo, &data, 1);
-
- // Read the next scanline. We assume that "line"
- // will never be >= clip.height().
- jpeg_read_scanlines(cinfo, &data, 1);
- if (cinfo->output_scanline == cinfo->output_height)
- jpeg_finish_decompress(cinfo);
-
- out = ((QRgb*)data) + clip.x();
-
- //
- // The smooth scale algorithm only works on 32-bit images;
- // convert from (8|24) bits to 32.
- //
- if (cinfo->output_components == 1) {
- in = data + clip.right();
- for (int i = clip.width(); i--; ) {
- out[i] = qRgb(*in, *in, *in);
- in--;
- }
- } else if (cinfo->out_color_space == JCS_CMYK) {
- in = data + clip.right() * 4;
- for (int i = clip.width(); i--; ) {
- int k = in[3];
- out[i] = qRgb(k * in[0] / 255, k * in[1] / 255, k * in[2] / 255);
- in -= 4;
- }
- } else {
- in = data + clip.right() * 3;
- for (int i = clip.width(); i--; ) {
- out[i] = qRgb(in[0], in[1], in[2]);
- in -= 3;
- }
- }
-
- return out;
- }
-
-};
-#endif
-
struct my_error_mgr : public jpeg_error_mgr {
jmp_buf setjmp_buffer;
};
@@ -832,7 +403,7 @@ static bool read_jpeg_image(QIODevice *device, QImage *outImage,
QRect clip;
if (clipRect.isEmpty()) {
clip = imageRect;
- } else if (cinfo.scale_denom == 1) {
+ } else if (cinfo.scale_denom == cinfo.scale_num) {
clip = clipRect.intersected(imageRect);
} else {
// The scale factor was corrected above to ensure that
@@ -844,93 +415,82 @@ static bool read_jpeg_image(QIODevice *device, QImage *outImage,
clip = clip.intersected(imageRect);
}
-#ifndef QT_NO_IMAGE_SMOOTHSCALE
- if (scaledSize.isValid() && scaledSize != clip.size()
- && quality >= HIGH_QUALITY_THRESHOLD) {
+ // Allocate memory for the clipped QImage.
+ if (!ensureValidImage(outImage, &cinfo, clip.size()))
+ longjmp(jerr.setjmp_buffer, 1);
+
+ // Avoid memcpy() overhead if grayscale with no clipping.
+ bool quickGray = (cinfo.output_components == 1 &&
+ clip == imageRect);
+ if (!quickGray) {
+ // Ask the jpeg library to allocate a temporary row.
+ // The library will automatically delete it for us later.
+ // The libjpeg docs say we should do this before calling
+ // jpeg_start_decompress(). We can't use "new" here
+ // because we are inside the setjmp() block and an error
+ // in the jpeg input stream would cause a memory leak.
+ JSAMPARRAY rows = (cinfo.mem->alloc_sarray)
+ ((j_common_ptr)&cinfo, JPOOL_IMAGE,
+ cinfo.output_width * cinfo.output_components, 1);
(void) jpeg_start_decompress(&cinfo);
- jpegSmoothScaler scaler(&cinfo, scaledSize, clip);
- *outImage = scaler.scale();
- } else
-#endif
- {
- // Allocate memory for the clipped QImage.
- if (!ensureValidImage(outImage, &cinfo, clip.size()))
- longjmp(jerr.setjmp_buffer, 1);
-
- // Avoid memcpy() overhead if grayscale with no clipping.
- bool quickGray = (cinfo.output_components == 1 &&
- clip == imageRect);
- if (!quickGray) {
- // Ask the jpeg library to allocate a temporary row.
- // The library will automatically delete it for us later.
- // The libjpeg docs say we should do this before calling
- // jpeg_start_decompress(). We can't use "new" here
- // because we are inside the setjmp() block and an error
- // in the jpeg input stream would cause a memory leak.
- JSAMPARRAY rows = (cinfo.mem->alloc_sarray)
- ((j_common_ptr)&cinfo, JPOOL_IMAGE,
- cinfo.output_width * cinfo.output_components, 1);
-
- (void) jpeg_start_decompress(&cinfo);
-
- while (cinfo.output_scanline < cinfo.output_height) {
- int y = int(cinfo.output_scanline) - clip.y();
- if (y >= clip.height())
- break; // We've read the entire clip region, so abort.
-
- (void) jpeg_read_scanlines(&cinfo, rows, 1);
-
- if (y < 0)
- continue; // Haven't reached the starting line yet.
-
- if (cinfo.output_components == 3) {
- // Expand 24->32 bpp.
- uchar *in = rows[0] + clip.x() * 3;
- QRgb *out = (QRgb*)outImage->scanLine(y);
- for (int i = 0; i < clip.width(); ++i) {
- *out++ = qRgb(in[0], in[1], in[2]);
- in += 3;
- }
- } else if (cinfo.out_color_space == JCS_CMYK) {
- // Convert CMYK->RGB.
- uchar *in = rows[0] + clip.x() * 4;
- QRgb *out = (QRgb*)outImage->scanLine(y);
- for (int i = 0; i < clip.width(); ++i) {
- int k = in[3];
- *out++ = qRgb(k * in[0] / 255, k * in[1] / 255,
- k * in[2] / 255);
- in += 4;
- }
- } else if (cinfo.output_components == 1) {
- // Grayscale.
- memcpy(outImage->scanLine(y),
- rows[0] + clip.x(), clip.width());
+ while (cinfo.output_scanline < cinfo.output_height) {
+ int y = int(cinfo.output_scanline) - clip.y();
+ if (y >= clip.height())
+ break; // We've read the entire clip region, so abort.
+
+ (void) jpeg_read_scanlines(&cinfo, rows, 1);
+
+ if (y < 0)
+ continue; // Haven't reached the starting line yet.
+
+ if (cinfo.output_components == 3) {
+ // Expand 24->32 bpp.
+ uchar *in = rows[0] + clip.x() * 3;
+ QRgb *out = (QRgb*)outImage->scanLine(y);
+ for (int i = 0; i < clip.width(); ++i) {
+ *out++ = qRgb(in[0], in[1], in[2]);
+ in += 3;
}
+ } else if (cinfo.out_color_space == JCS_CMYK) {
+ // Convert CMYK->RGB.
+ uchar *in = rows[0] + clip.x() * 4;
+ QRgb *out = (QRgb*)outImage->scanLine(y);
+ for (int i = 0; i < clip.width(); ++i) {
+ int k = in[3];
+ *out++ = qRgb(k * in[0] / 255, k * in[1] / 255,
+ k * in[2] / 255);
+ in += 4;
+ }
+ } else if (cinfo.output_components == 1) {
+ // Grayscale.
+ memcpy(outImage->scanLine(y),
+ rows[0] + clip.x(), clip.width());
}
- } else {
- // Load unclipped grayscale data directly into the QImage.
- (void) jpeg_start_decompress(&cinfo);
- while (cinfo.output_scanline < cinfo.output_height) {
- uchar *row = outImage->scanLine(cinfo.output_scanline);
- (void) jpeg_read_scanlines(&cinfo, &row, 1);
- }
}
+ } else {
+ // Load unclipped grayscale data directly into the QImage.
+ (void) jpeg_start_decompress(&cinfo);
+ while (cinfo.output_scanline < cinfo.output_height) {
+ uchar *row = outImage->scanLine(cinfo.output_scanline);
+ (void) jpeg_read_scanlines(&cinfo, &row, 1);
+ }
+ }
- if (cinfo.output_scanline == cinfo.output_height)
- (void) jpeg_finish_decompress(&cinfo);
+ if (cinfo.output_scanline == cinfo.output_height)
+ (void) jpeg_finish_decompress(&cinfo);
- if (cinfo.density_unit == 1) {
- outImage->setDotsPerMeterX(int(100. * cinfo.X_density / 2.54));
- outImage->setDotsPerMeterY(int(100. * cinfo.Y_density / 2.54));
- } else if (cinfo.density_unit == 2) {
- outImage->setDotsPerMeterX(int(100. * cinfo.X_density));
- outImage->setDotsPerMeterY(int(100. * cinfo.Y_density));
- }
+ if (cinfo.density_unit == 1) {
+ outImage->setDotsPerMeterX(int(100. * cinfo.X_density / 2.54));
+ outImage->setDotsPerMeterY(int(100. * cinfo.Y_density / 2.54));
+ } else if (cinfo.density_unit == 2) {
+ outImage->setDotsPerMeterX(int(100. * cinfo.X_density));
+ outImage->setDotsPerMeterY(int(100. * cinfo.Y_density));
+ }
- if (scaledSize.isValid() && scaledSize != clip.size())
- *outImage = outImage->scaled(scaledSize, Qt::IgnoreAspectRatio, Qt::FastTransformation);
+ if (scaledSize.isValid() && scaledSize != clip.size()) {
+ *outImage = outImage->scaled(scaledSize, Qt::IgnoreAspectRatio, quality >= HIGH_QUALITY_THRESHOLD ? Qt::SmoothTransformation : Qt::FastTransformation);
}
}
@@ -1002,11 +562,29 @@ inline my_jpeg_destination_mgr::my_jpeg_destination_mgr(QIODevice *device)
free_in_buffer = max_buf;
}
+static bool can_write_format(QImage::Format fmt)
+{
+ switch (fmt) {
+ case QImage::Format_Mono:
+ case QImage::Format_MonoLSB:
+ case QImage::Format_Indexed8:
+ case QImage::Format_RGB888:
+ case QImage::Format_RGB32:
+ case QImage::Format_ARGB32:
+ case QImage::Format_ARGB32_Premultiplied:
+ return true;
+ break;
+ default:
+ break;
+ }
+ return false;
+}
static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int sourceQuality)
{
bool success = false;
- const QImage image = sourceImage;
+ const QImage image = can_write_format(sourceImage.format()) ?
+ sourceImage : sourceImage.convertToFormat(QImage::Format_RGB888);
const QVector<QRgb> cmap = image.colorTable();
struct jpeg_compress_struct cinfo;
@@ -1219,15 +797,16 @@ bool QJpegHandler::supportsOption(ImageOption option) const
QVariant QJpegHandler::option(ImageOption option) const
{
- if (option == Quality) {
+ switch(option) {
+ case Quality:
return quality;
- } else if (option == ScaledSize) {
+ case ScaledSize:
return scaledSize;
- } else if (option == ScaledClipRect) {
+ case ScaledClipRect:
return scaledClipRect;
- } else if (option == ClipRect) {
+ case ClipRect:
return clipRect;
- } else if (option == Size) {
+ case Size:
if (canRead() && !device()->isSequential()) {
qint64 pos = device()->pos();
int width = 0;
@@ -1236,7 +815,8 @@ QVariant QJpegHandler::option(ImageOption option) const
device()->seek(pos);
return QSize(width, height);
}
- } else if (option == ImageFormat) {
+ return QVariant();
+ case ImageFormat:
if (canRead() && !device()->isSequential()) {
qint64 pos = device()->pos();
QImage::Format format = QImage::Format_Invalid;
@@ -1245,20 +825,29 @@ QVariant QJpegHandler::option(ImageOption option) const
return format;
}
return QImage::Format_Invalid;
+ default:
+ return QVariant();
}
- return QVariant();
}
void QJpegHandler::setOption(ImageOption option, const QVariant &value)
{
- if (option == Quality)
+ switch(option) {
+ case Quality:
quality = value.toInt();
- else if ( option == ScaledSize )
+ break;
+ case ScaledSize:
scaledSize = value.toSize();
- else if ( option == ScaledClipRect )
+ break;
+ case ScaledClipRect:
scaledClipRect = value.toRect();
- else if ( option == ClipRect )
+ break;
+ case ClipRect:
clipRect = value.toRect();
+ break;
+ default:
+ break;
+ }
}
QByteArray QJpegHandler::name() const
diff --git a/src/plugins/imageformats/tiff/tiff.pro b/src/plugins/imageformats/tiff/tiff.pro
index 312f99c4cc..85f618f010 100644
--- a/src/plugins/imageformats/tiff/tiff.pro
+++ b/src/plugins/imageformats/tiff/tiff.pro
@@ -47,14 +47,16 @@ contains(QT_CONFIG, system-tiff) {
../../../3rdparty/libtiff/libtiff/tif_warning.c \
../../../3rdparty/libtiff/libtiff/tif_write.c \
../../../3rdparty/libtiff/libtiff/tif_zip.c
- win32 {
+ win32:!wince*: {
SOURCES += ../../../3rdparty/libtiff/libtiff/tif_win32.c
}
unix: {
SOURCES += ../../../3rdparty/libtiff/libtiff/tif_unix.c
}
wince*: {
- SOURCES += ../../../corelib/kernel/qfunctions_wince.cpp
+ SOURCES += ../../../corelib/kernel/qfunctions_wince.cpp \
+ ../../../3rdparty/libtiff/libtiff/tif_wince.c \
+ ../../../3rdparty/libtiff/libtiff/tif_win32.c
}
symbian*: {
SOURCES += ../../../3rdparty/libtiff/port/lfind.c
diff --git a/src/plugins/mediaservices/directshow/directshow.pro b/src/plugins/mediaservices/directshow/directshow.pro
new file mode 100644
index 0000000000..ea133f9f74
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/directshow.pro
@@ -0,0 +1,14 @@
+TARGET = dsengine
+include(../../qpluginbase.pri)
+
+QT += multimedia
+
+HEADERS += dsserviceplugin.h
+SOURCES += dsserviceplugin.cpp
+
+include(mediaplayer/mediaplayer.pri)
+
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/mediaservices
+target.path = $$[QT_INSTALL_PLUGINS]/mediaservices
+INSTALLS += target
+
diff --git a/src/plugins/mediaservices/directshow/dsserviceplugin.cpp b/src/plugins/mediaservices/directshow/dsserviceplugin.cpp
new file mode 100644
index 0000000000..c482fd5e1e
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/dsserviceplugin.cpp
@@ -0,0 +1,188 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qstring.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/QFile>
+
+#include "dsserviceplugin.h"
+
+#ifdef QMEDIA_DIRECTSHOW_CAMERA
+#include "dscameraservice.h"
+#endif
+
+#ifdef QMEDIA_DIRECTSHOW_PLAYER
+#include "directshowplayerservice.h"
+#endif
+
+#include <qmediaserviceprovider.h>
+
+
+#ifdef QMEDIA_DIRECTSHOW_CAMERA
+#ifndef _STRSAFE_H_INCLUDED_
+#include <tchar.h>
+#endif
+#include <dshow.h>
+#include <objbase.h>
+#include <initguid.h>
+#pragma comment(lib, "strmiids.lib")
+#pragma comment(lib, "ole32.lib")
+#include <windows.h>
+#endif
+
+
+QT_BEGIN_NAMESPACE
+
+QStringList DSServicePlugin::keys() const
+{
+ return QStringList()
+#ifdef QMEDIA_DIRECTSHOW_CAMERA
+ << QLatin1String(Q_MEDIASERVICE_CAMERA)
+#endif
+#ifdef QMEDIA_DIRECTSHOW_PLAYER
+ << QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER)
+#endif
+ ;
+}
+
+QMediaService* DSServicePlugin::create(QString const& key)
+{
+#ifdef QMEDIA_DIRECTSHOW_CAMERA
+ if (key == QLatin1String(Q_MEDIASERVICE_CAMERA))
+ return new DSCameraService;
+#endif
+#ifdef QMEDIA_DIRECTSHOW_PLAYER
+ if (key == QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER))
+ return new DirectShowPlayerService;
+#endif
+
+ qWarning() << "DirectShow service plugin: unsupported service -" << key;
+ return 0;
+}
+
+void DSServicePlugin::release(QMediaService *service)
+{
+ delete service;
+}
+
+QList<QByteArray> DSServicePlugin::devices(const QByteArray &service) const
+{
+#ifdef QMEDIA_DIRECTSHOW_CAMERA
+ if (service == Q_MEDIASERVICE_CAMERA) {
+ if (m_cameraDevices.isEmpty())
+ updateDevices();
+
+ return m_cameraDevices;
+ }
+#endif
+
+ return QList<QByteArray>();
+}
+
+QString DSServicePlugin::deviceDescription(const QByteArray &service, const QByteArray &device)
+{
+#ifdef QMEDIA_DIRECTSHOW_CAMERA
+ if (service == Q_MEDIASERVICE_CAMERA) {
+ if (m_cameraDevices.isEmpty())
+ updateDevices();
+
+ for (int i=0; i<m_cameraDevices.count(); i++)
+ if (m_cameraDevices[i] == device)
+ return m_cameraDescriptions[i];
+ }
+#endif
+ return QString();
+}
+
+#ifdef QMEDIA_DIRECTSHOW_CAMERA
+void DSServicePlugin::updateDevices() const
+{
+ m_cameraDevices.clear();
+ m_cameraDescriptions.clear();
+
+ CoInitialize(NULL);
+ ICreateDevEnum* pDevEnum = NULL;
+ IEnumMoniker* pEnum = NULL;
+ // Create the System device enumerator
+ HRESULT hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL,
+ CLSCTX_INPROC_SERVER, IID_ICreateDevEnum,
+ reinterpret_cast<void**>(&pDevEnum));
+ if(SUCCEEDED(hr)) {
+ // Create the enumerator for the video capture category
+ hr = pDevEnum->CreateClassEnumerator(
+ CLSID_VideoInputDeviceCategory, &pEnum, 0);
+ pEnum->Reset();
+ // go through and find all video capture devices
+ IMoniker* pMoniker = NULL;
+ while(pEnum->Next(1, &pMoniker, NULL) == S_OK) {
+ IPropertyBag *pPropBag;
+ hr = pMoniker->BindToStorage(0,0,IID_IPropertyBag,
+ (void**)(&pPropBag));
+ if(FAILED(hr)) {
+ pMoniker->Release();
+ continue; // skip this one
+ }
+ // Find the description
+ WCHAR str[120];
+ VARIANT varName;
+ varName.vt = VT_BSTR;
+ hr = pPropBag->Read(L"FriendlyName", &varName, 0);
+ if(SUCCEEDED(hr)) {
+ StringCchCopyW(str,sizeof(str)/sizeof(str[0]),varName.bstrVal);
+ QString temp(QString::fromUtf16((unsigned short*)str));
+ m_cameraDevices.append(QString("ds:%1").arg(temp).toLocal8Bit().constData());
+ hr = pPropBag->Read(L"Description", &varName, 0);
+ StringCchCopyW(str,sizeof(str)/sizeof(str[0]),varName.bstrVal);
+ QString temp2(QString::fromUtf16((unsigned short*)str));
+ m_cameraDescriptions.append(temp2);
+ }
+ pPropBag->Release();
+ pMoniker->Release();
+ }
+ }
+ CoUninitialize();
+}
+#endif
+
+QT_END_NAMESPACE
+
+Q_EXPORT_PLUGIN2(dsengine, DSServicePlugin);
+
diff --git a/src/plugins/mediaservices/directshow/dsserviceplugin.h b/src/plugins/mediaservices/directshow/dsserviceplugin.h
new file mode 100644
index 0000000000..3c6f1b833c
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/dsserviceplugin.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DSSERVICEPLUGIN_H
+#define DSSERVICEPLUGIN_H
+
+#include <qmediaserviceproviderplugin.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+
+class DSServicePlugin : public QMediaServiceProviderPlugin, public QMediaServiceSupportedDevicesInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QMediaServiceSupportedDevicesInterface)
+public:
+ QStringList keys() const;
+ QMediaService* create(QString const& key);
+ void release(QMediaService *service);
+
+ QList<QByteArray> devices(const QByteArray &service) const;
+ QString deviceDescription(const QByteArray &service, const QByteArray &device);
+
+private:
+#ifdef QMEDIA_DIRECTSHOW_CAMERA
+ void updateDevices() const;
+
+ mutable QList<QByteArray> m_cameraDevices;
+ mutable QStringList m_cameraDescriptions;
+#endif
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // DSSERVICEPLUGIN_H
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowaudioendpointcontrol.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowaudioendpointcontrol.cpp
new file mode 100644
index 0000000000..5f72ca6ed5
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowaudioendpointcontrol.cpp
@@ -0,0 +1,166 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "directshowaudioendpointcontrol.h"
+
+#include "directshowglobal.h"
+#include "directshowplayerservice.h"
+
+
+QT_BEGIN_NAMESPACE
+
+DirectShowAudioEndpointControl::DirectShowAudioEndpointControl(
+ DirectShowPlayerService *service, QObject *parent)
+ : QMediaControl(parent)
+ , m_service(service)
+ , m_bindContext(0)
+ , m_deviceEnumerator(0)
+{
+ if (CreateBindCtx(0, &m_bindContext) == S_OK) {
+ m_deviceEnumerator = com_new<ICreateDevEnum>(CLSID_SystemDeviceEnum, IID_ICreateDevEnum);
+
+ updateEndpoints();
+
+ setActiveEndpoint(m_defaultEndpoint);
+ }
+}
+
+DirectShowAudioEndpointControl::~DirectShowAudioEndpointControl()
+{
+ foreach (IMoniker *moniker, m_devices)
+ moniker->Release();
+
+ if (m_bindContext)
+ m_bindContext->Release();
+
+ if (m_deviceEnumerator)
+ m_deviceEnumerator->Release();
+}
+
+QList<QString> DirectShowAudioEndpointControl::availableEndpoints() const
+{
+ return m_devices.keys();
+}
+
+QString DirectShowAudioEndpointControl::endpointDescription(const QString &name) const
+{
+#ifdef __IPropertyBag_INTERFACE_DEFINED__
+ QString description;
+
+ if (IMoniker *moniker = m_devices.value(name, 0)) {
+ IPropertyBag *propertyBag = 0;
+ if (SUCCEEDED(moniker->BindToStorage(
+ 0, 0, IID_IPropertyBag, reinterpret_cast<void **>(&propertyBag)))) {
+ VARIANT name;
+ VariantInit(&name);
+ if (SUCCEEDED(propertyBag->Read(L"FriendlyName", &name, 0)))
+ description = QString::fromWCharArray(name.bstrVal);
+ VariantClear(&name);
+ propertyBag->Release();
+ }
+ }
+
+ return description;
+#else
+ return name.section(QLatin1Char('\\'), -1);
+#endif
+}
+
+QString DirectShowAudioEndpointControl::defaultEndpoint() const
+{
+ return m_defaultEndpoint;
+}
+
+QString DirectShowAudioEndpointControl::activeEndpoint() const
+{
+ return m_activeEndpoint;
+}
+
+void DirectShowAudioEndpointControl::setActiveEndpoint(const QString &name)
+{
+ if (m_activeEndpoint == name)
+ return;
+
+ if (IMoniker *moniker = m_devices.value(name, 0)) {
+ IBaseFilter *filter = 0;
+
+ if (moniker->BindToObject(
+ m_bindContext,
+ 0,
+ IID_IBaseFilter,
+ reinterpret_cast<void **>(&filter)) == S_OK) {
+ m_service->setAudioOutput(filter);
+
+ filter->Release();
+ }
+ }
+}
+
+void DirectShowAudioEndpointControl::updateEndpoints()
+{
+ IMalloc *oleMalloc = 0;
+ if (m_deviceEnumerator && CoGetMalloc(1, &oleMalloc) == S_OK) {
+ IEnumMoniker *monikers = 0;
+
+ if (m_deviceEnumerator->CreateClassEnumerator(
+ CLSID_AudioRendererCategory, &monikers, 0) == S_OK) {
+ for (IMoniker *moniker = 0; monikers->Next(1, &moniker, 0) == S_OK; moniker->Release()) {
+ OLECHAR *string = 0;
+ if (moniker->GetDisplayName(m_bindContext, 0, &string) == S_OK) {
+ QString deviceId = QString::fromWCharArray(string);
+ oleMalloc->Free(string);
+
+ moniker->AddRef();
+ m_devices.insert(deviceId, moniker);
+
+ if (m_defaultEndpoint.isEmpty()
+ || deviceId.endsWith(QLatin1String("Default DirectSound Device"))) {
+ m_defaultEndpoint = deviceId;
+ }
+ }
+ }
+ monikers->Release();
+ }
+ oleMalloc->Release();
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowaudioendpointcontrol.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowaudioendpointcontrol.h
new file mode 100644
index 0000000000..2faac13296
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowaudioendpointcontrol.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIRECTSHOWAUDIOENDPOINTCONTROL_H
+#define DIRECTSHOWAUDIOENDPOINTCONTROL_H
+
+#include <QtMultimedia/qmediacontrol.h>
+
+#include <dshow.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class DirectShowPlayerService;
+
+class DirectShowAudioEndpointControl : public QMediaControl
+{
+ Q_OBJECT
+public:
+ DirectShowAudioEndpointControl(DirectShowPlayerService *service, QObject *parent = 0);
+ ~DirectShowAudioEndpointControl();
+
+ QList<QString> availableEndpoints() const;
+
+ QString endpointDescription(const QString &name) const;
+
+ QString defaultEndpoint() const;
+ QString activeEndpoint() const;
+
+ void setActiveEndpoint(const QString& name);
+
+private:
+ void updateEndpoints();
+
+ DirectShowPlayerService *m_service;
+ IBindCtx *m_bindContext;
+ ICreateDevEnum *m_deviceEnumerator;
+
+ QMap<QString, IMoniker *> m_devices;
+ QString m_defaultEndpoint;
+ QString m_activeEndpoint;
+};
+
+#define QAudioEndpointSelector_iid "com.nokia.Qt.QAudioEndpointSelector/1.0"
+
+class Duck
+{
+ uint quack;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
+
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.cpp
new file mode 100644
index 0000000000..07541c2931
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.cpp
@@ -0,0 +1,161 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <directshoweventloop.h>
+
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qcoreevent.h>
+
+
+QT_BEGIN_NAMESPACE
+
+
+class DirectShowPostedEvent
+{
+public:
+ DirectShowPostedEvent(QObject *receiver, QEvent *event)
+ : receiver(receiver)
+ , event(event)
+ , next(0)
+ {
+ }
+
+ ~DirectShowPostedEvent()
+ {
+ delete event;
+ }
+
+ QObject *receiver;
+ QEvent *event;
+ DirectShowPostedEvent *next;
+};
+
+DirectShowEventLoop::DirectShowEventLoop(QObject *parent)
+ : QWinEventNotifier(parent)
+ , m_postsHead(0)
+ , m_postsTail(0)
+ , m_eventHandle(::CreateEvent(0, 0, 0, 0))
+ , m_waitHandle(::CreateEvent(0, 0, 0, 0))
+{
+ setHandle(m_eventHandle);
+ setEnabled(true);
+}
+
+DirectShowEventLoop::~DirectShowEventLoop()
+{
+ setEnabled(false);
+
+ ::CloseHandle(m_eventHandle);
+ ::CloseHandle(m_waitHandle);
+
+ for (DirectShowPostedEvent *post = m_postsHead; post; post = m_postsHead) {
+ m_postsHead = m_postsHead->next;
+
+ delete post;
+ }
+}
+
+void DirectShowEventLoop::wait(QMutex *mutex)
+{
+ ::ResetEvent(m_waitHandle);
+
+ mutex->unlock();
+
+ HANDLE handles[] = { m_eventHandle, m_waitHandle };
+ while (::WaitForMultipleObjects(2, handles, false, INFINITE) == WAIT_OBJECT_0)
+ processEvents();
+
+ mutex->lock();
+}
+
+void DirectShowEventLoop::wake()
+{
+ ::SetEvent(m_waitHandle);
+}
+
+void DirectShowEventLoop::postEvent(QObject *receiver, QEvent *event)
+{
+ QMutexLocker locker(&m_mutex);
+
+ DirectShowPostedEvent *post = new DirectShowPostedEvent(receiver, event);
+
+ if (m_postsTail)
+ m_postsTail->next = post;
+ else
+ m_postsHead = post;
+
+ m_postsTail = post;
+
+ ::SetEvent(m_eventHandle);
+}
+
+bool DirectShowEventLoop::event(QEvent *event)
+{
+ if (event->type() == QEvent::WinEventAct) {
+ processEvents();
+
+ return true;
+ } else {
+ return QWinEventNotifier::event(event);
+ }
+}
+
+void DirectShowEventLoop::processEvents()
+{
+ QMutexLocker locker(&m_mutex);
+
+ while(m_postsHead) {
+ ::ResetEvent(m_eventHandle);
+
+ DirectShowPostedEvent *post = m_postsHead;
+ m_postsHead = m_postsHead->next;
+
+ if (!m_postsHead)
+ m_postsTail = 0;
+
+ locker.unlock();
+ QCoreApplication::sendEvent(post->receiver, post->event);
+ delete post;
+ locker.relock();
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.h b/src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.h
new file mode 100644
index 0000000000..f46e65af01
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIRECTSHOWEVENTLOOP_H
+#define DIRECTSHOWEVENTLOOP_H
+
+#include <QtCore/qmutex.h>
+#include <QtCore/private/qwineventnotifier_p.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class DirectShowPostedEvent;
+
+class DirectShowEventLoop : public QWinEventNotifier
+{
+ Q_OBJECT
+public:
+ DirectShowEventLoop(QObject *parent = 0);
+ ~DirectShowEventLoop();
+
+ void wait(QMutex *mutex);
+ void wake();
+
+ void postEvent(QObject *object, QEvent *event);
+
+ bool event(QEvent *event);
+
+private:
+ void processEvents();
+
+ DirectShowPostedEvent *m_postsHead;
+ DirectShowPostedEvent *m_postsTail;
+ HANDLE m_eventHandle;
+ HANDLE m_waitHandle;
+ QMutex m_mutex;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowglobal.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowglobal.h
new file mode 100644
index 0000000000..e43e2a727c
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowglobal.h
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIRECTSHOWGLOBAL_H
+#define DIRECTSHOWGLOBAL_H
+
+#include <QtCore/qglobal.h>
+
+#include <dshow.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+template <typename T> T *com_cast(IUnknown *unknown, const IID &iid)
+{
+ T *iface = 0;
+ return unknown && unknown->QueryInterface(iid, reinterpret_cast<void **>(&iface)) == S_OK
+ ? iface
+ : 0;
+}
+
+template <typename T> T *com_new(const IID &clsid, const IID &iid)
+{
+ T *object = 0;
+ return CoCreateInstance(
+ clsid,
+ NULL,
+ CLSCTX_INPROC_SERVER,
+ iid,
+ reinterpret_cast<void **>(&object)) == S_OK
+ ? object
+ : 0;
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#ifndef __IFilterGraph2_INTERFACE_DEFINED__
+#define __IFilterGraph2_INTERFACE_DEFINED__
+#define INTERFACE IFilterGraph2
+DECLARE_INTERFACE_(IFilterGraph2 ,IGraphBuilder)
+{
+ STDMETHOD(AddSourceFilterForMoniker)(THIS_ IMoniker *, IBindCtx *, LPCWSTR,IBaseFilter **) PURE;
+ STDMETHOD(ReconnectEx)(THIS_ IPin *, const AM_MEDIA_TYPE *) PURE;
+ STDMETHOD(RenderEx)(IPin *, DWORD, DWORD *) PURE;
+};
+#undef INTERFACE
+#endif
+
+#ifndef __IAMFilterMiscFlags_INTERFACE_DEFINED__
+#define __IAMFilterMiscFlags_INTERFACE_DEFINED__
+#define INTERFACE IAMFilterMiscFlags
+DECLARE_INTERFACE_(IAMFilterMiscFlags ,IUnknown)
+{
+ STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ STDMETHOD_(ULONG,GetMiscFlags)(THIS) PURE;
+};
+#undef INTERFACE
+#endif
+
+#ifndef __IFileSourceFilter_INTERFACE_DEFINED__
+#define __IFileSourceFilter_INTERFACE_DEFINED__
+#define INTERFACE IFileSourceFilter
+DECLARE_INTERFACE_(IFileSourceFilter ,IUnknown)
+{
+ STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ STDMETHOD(Load)(THIS_ LPCOLESTR, const AM_MEDIA_TYPE *) PURE;
+ STDMETHOD(GetCurFile)(THIS_ LPOLESTR *ppszFileName, AM_MEDIA_TYPE *) PURE;
+};
+#undef INTERFACE
+#endif
+
+#ifndef __IAMOpenProgress_INTERFACE_DEFINED__
+#define __IAMOpenProgress_INTERFACE_DEFINED__
+#define INTERFACE IAMOpenProgress
+DECLARE_INTERFACE_(IAMOpenProgress ,IUnknown)
+{
+ STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ STDMETHOD(QueryProgress)(THIS_ LONGLONG *, LONGLONG *) PURE;
+ STDMETHOD(AbortOperation)(THIS) PURE;
+};
+#undef INTERFACE
+#endif
+
+#ifndef __IFilterChain_INTERFACE_DEFINED__
+#define __IFilterChain_INTERFACE_DEFINED__
+#define INTERFACE IFilterChain
+DECLARE_INTERFACE_(IFilterChain ,IUnknown)
+{
+ STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ STDMETHOD(StartChain)(IBaseFilter *, IBaseFilter *) PURE;
+ STDMETHOD(PauseChain)(IBaseFilter *, IBaseFilter *) PURE;
+ STDMETHOD(StopChain)(IBaseFilter *, IBaseFilter *) PURE;
+ STDMETHOD(RemoveChain)(IBaseFilter *, IBaseFilter *) PURE;
+};
+#undef INTERFACE
+#endif
+
+#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.cpp
new file mode 100644
index 0000000000..7369099ac6
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.cpp
@@ -0,0 +1,501 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "directshowioreader.h"
+
+#include "directshoweventloop.h"
+#include "directshowglobal.h"
+#include "directshowiosource.h"
+
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qcoreevent.h>
+#include <QtCore/qiodevice.h>
+#include <QtCore/qthread.h>
+
+
+QT_BEGIN_NAMESPACE
+
+class DirectShowSampleRequest
+{
+public:
+ DirectShowSampleRequest(
+ IMediaSample *sample, DWORD_PTR userData, LONGLONG position, LONG length, BYTE *buffer)
+ : next(0)
+ , sample(sample)
+ , userData(userData)
+ , position(position)
+ , length(length)
+ , buffer(buffer)
+ , result(S_FALSE)
+ {
+ }
+
+ DirectShowSampleRequest *remove() { DirectShowSampleRequest *n = next; delete this; return n; }
+
+ DirectShowSampleRequest *next;
+ IMediaSample *sample;
+ DWORD_PTR userData;
+ LONGLONG position;
+ LONG length;
+ BYTE *buffer;
+ HRESULT result;
+};
+
+DirectShowIOReader::DirectShowIOReader(
+ QIODevice *device, DirectShowIOSource *source, DirectShowEventLoop *loop)
+ : m_source(source)
+ , m_device(device)
+ , m_loop(loop)
+ , m_pendingHead(0)
+ , m_pendingTail(0)
+ , m_readyHead(0)
+ , m_readyTail(0)
+ , m_synchronousPosition(0)
+ , m_synchronousLength(0)
+ , m_synchronousBytesRead(0)
+ , m_synchronousBuffer(0)
+ , m_synchronousResult(S_OK)
+ , m_totalLength(0)
+ , m_availableLength(0)
+ , m_flushing(false)
+{
+ moveToThread(device->thread());
+
+ connect(device, SIGNAL(readyRead()), this, SLOT(readyRead()));
+}
+
+DirectShowIOReader::~DirectShowIOReader()
+{
+ flushRequests();
+}
+
+HRESULT DirectShowIOReader::QueryInterface(REFIID riid, void **ppvObject)
+{
+ return m_source->QueryInterface(riid, ppvObject);
+}
+
+ULONG DirectShowIOReader::AddRef()
+{
+ return m_source->AddRef();
+}
+
+ULONG DirectShowIOReader::Release()
+{
+ return m_source->Release();
+}
+
+// IAsyncReader
+HRESULT DirectShowIOReader::RequestAllocator(
+ IMemAllocator *pPreferred, ALLOCATOR_PROPERTIES *pProps, IMemAllocator **ppActual)
+{
+ if (!ppActual || !pProps) {
+ return E_POINTER;
+ } else {
+ ALLOCATOR_PROPERTIES actualProperties;
+
+ if (pProps->cbAlign == 0)
+ pProps->cbAlign = 1;
+
+ if (pPreferred && pPreferred->SetProperties(pProps, &actualProperties) == S_OK) {
+ pPreferred->AddRef();
+
+ *ppActual = pPreferred;
+
+ m_source->setAllocator(*ppActual);
+
+ return S_OK;
+ } else {
+ *ppActual = com_new<IMemAllocator>(CLSID_MemoryAllocator, IID_IMemAllocator);
+
+ if (*ppActual) {
+ if ((*ppActual)->SetProperties(pProps, &actualProperties) != S_OK) {
+ (*ppActual)->Release();
+ } else {
+ m_source->setAllocator(*ppActual);
+
+ return S_OK;
+ }
+ }
+ }
+ ppActual = 0;
+
+ return E_FAIL;
+ }
+}
+
+HRESULT DirectShowIOReader::Request(IMediaSample *pSample, DWORD_PTR dwUser)
+{
+ QMutexLocker locker(&m_mutex);
+
+ if (!pSample) {
+ return E_POINTER;
+ } else if (m_flushing) {
+ return VFW_E_WRONG_STATE;
+ } else {
+ REFERENCE_TIME startTime = 0;
+ REFERENCE_TIME endTime = 0;
+ BYTE *buffer;
+
+ if (pSample->GetTime(&startTime, &endTime) != S_OK
+ || pSample->GetPointer(&buffer) != S_OK) {
+ return VFW_E_SAMPLE_TIME_NOT_SET;
+ } else {
+ LONGLONG position = startTime / 10000000;
+ LONG length = (endTime - startTime) / 10000000;
+
+ DirectShowSampleRequest *request = new DirectShowSampleRequest(
+ pSample, dwUser, position, length, buffer);
+
+ if (m_pendingTail) {
+ m_pendingTail->next = request;
+ } else {
+ m_pendingHead = request;
+
+ m_loop->postEvent(this, new QEvent(QEvent::User));
+ }
+ m_pendingTail = request;
+
+ return S_OK;
+ }
+ }
+}
+
+HRESULT DirectShowIOReader::WaitForNext(
+ DWORD dwTimeout, IMediaSample **ppSample, DWORD_PTR *pdwUser)
+{
+ if (!ppSample || !pdwUser)
+ return E_POINTER;
+
+ QMutexLocker locker(&m_mutex);
+
+ do {
+ if (m_readyHead) {
+ DirectShowSampleRequest *request = m_readyHead;
+
+ *ppSample = request->sample;
+ *pdwUser = request->userData;
+
+ HRESULT hr = request->result;
+
+ m_readyHead = request->next;
+
+ if (!m_readyHead)
+ m_readyTail = 0;
+
+ delete request;
+
+ return hr;
+ } else if (m_flushing) {
+ *ppSample = 0;
+ *pdwUser = 0;
+
+ return VFW_E_WRONG_STATE;
+ }
+ } while (m_wait.wait(&m_mutex, dwTimeout));
+
+ *ppSample = 0;
+ *pdwUser = 0;
+
+ return VFW_E_TIMEOUT;
+}
+
+HRESULT DirectShowIOReader::SyncReadAligned(IMediaSample *pSample)
+{
+ if (!pSample) {
+ return E_POINTER;
+ } else {
+ REFERENCE_TIME startTime = 0;
+ REFERENCE_TIME endTime = 0;
+ BYTE *buffer;
+
+ if (pSample->GetTime(&startTime, &endTime) != S_OK
+ || pSample->GetPointer(&buffer) != S_OK) {
+ return VFW_E_SAMPLE_TIME_NOT_SET;
+ } else {
+ LONGLONG position = startTime / 10000000;
+ LONG length = (endTime - startTime) / 10000000;
+
+ QMutexLocker locker(&m_mutex);
+
+ if (thread() == QThread::currentThread()) {
+ qint64 bytesRead = 0;
+
+ HRESULT hr = blockingRead(position, length, buffer, &bytesRead);
+
+ if (SUCCEEDED(hr))
+ pSample->SetActualDataLength(bytesRead);
+
+ return hr;
+ } else {
+ m_synchronousPosition = position;
+ m_synchronousLength = length;
+ m_synchronousBuffer = buffer;
+
+ m_loop->postEvent(this, new QEvent(QEvent::User));
+
+ m_wait.wait(&m_mutex);
+
+ m_synchronousBuffer = 0;
+
+ if (SUCCEEDED(m_synchronousResult))
+ pSample->SetActualDataLength(m_synchronousBytesRead);
+
+ return m_synchronousResult;
+ }
+ }
+ }
+}
+
+HRESULT DirectShowIOReader::SyncRead(LONGLONG llPosition, LONG lLength, BYTE *pBuffer)
+{
+ if (!pBuffer) {
+ return E_POINTER;
+ } else {
+ if (thread() == QThread::currentThread()) {
+ qint64 bytesRead;
+
+ return blockingRead(llPosition, lLength, pBuffer, &bytesRead);
+ } else {
+ QMutexLocker locker(&m_mutex);
+
+ m_synchronousPosition = llPosition;
+ m_synchronousLength = lLength;
+ m_synchronousBuffer = pBuffer;
+
+ m_loop->postEvent(this, new QEvent(QEvent::User));
+
+ m_wait.wait(&m_mutex);
+
+ m_synchronousBuffer = 0;
+
+ return m_synchronousResult;
+ }
+ }
+}
+
+HRESULT DirectShowIOReader::Length(LONGLONG *pTotal, LONGLONG *pAvailable)
+{
+ if (!pTotal || !pAvailable) {
+ return E_POINTER;
+ } else {
+ QMutexLocker locker(&m_mutex);
+
+ *pTotal = m_totalLength;
+ *pAvailable = m_availableLength;
+
+ return S_OK;
+ }
+}
+
+
+HRESULT DirectShowIOReader::BeginFlush()
+{
+ QMutexLocker locker(&m_mutex);
+
+ if (m_flushing)
+ return S_FALSE;
+
+ m_flushing = true;
+
+ flushRequests();
+
+ m_wait.wakeAll();
+
+ return S_OK;
+}
+
+HRESULT DirectShowIOReader::EndFlush()
+{
+ QMutexLocker locker(&m_mutex);
+
+ if (!m_flushing)
+ return S_FALSE;
+
+ m_flushing = false;
+
+ return S_OK;
+}
+
+void DirectShowIOReader::customEvent(QEvent *event)
+{
+ if (event->type() == QEvent::User) {
+ readyRead();
+ } else {
+ QObject::customEvent(event);
+ }
+}
+
+void DirectShowIOReader::readyRead()
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_availableLength = m_device->bytesAvailable() + m_device->pos();
+ m_totalLength = m_device->size();
+
+ if (m_synchronousBuffer) {
+ if (nonBlockingRead(
+ m_synchronousPosition,
+ m_synchronousLength,
+ m_synchronousBuffer,
+ &m_synchronousBytesRead,
+ &m_synchronousResult)) {
+ m_wait.wakeAll();
+ }
+ } else {
+ qint64 bytesRead = 0;
+
+ while (m_pendingHead && nonBlockingRead(
+ m_pendingHead->position,
+ m_pendingHead->length,
+ m_pendingHead->buffer,
+ &bytesRead,
+ &m_pendingHead->result)) {
+ m_pendingHead->sample->SetActualDataLength(bytesRead);
+
+ if (m_readyTail)
+ m_readyTail->next = m_pendingHead;
+ m_readyTail = m_pendingHead;
+
+ m_pendingHead = m_pendingHead->next;
+
+ m_readyTail->next = 0;
+
+ if (!m_pendingHead)
+ m_pendingTail = 0;
+
+ if (!m_readyHead)
+ m_readyHead = m_readyTail;
+
+ m_wait.wakeAll();
+ }
+ }
+}
+
+HRESULT DirectShowIOReader::blockingRead(
+ LONGLONG position, LONG length, BYTE *buffer, qint64 *bytesRead)
+{
+ *bytesRead = 0;
+
+ if (qint64(position) > m_device->size())
+ return S_FALSE;
+
+ const qint64 maxSize = qMin<qint64>(m_device->size(), position + length);
+
+ while (m_device->bytesAvailable() + m_device->pos() < maxSize) {
+ if (!m_device->waitForReadyRead(-1))
+ return S_FALSE;
+ }
+
+ if (m_device->pos() != position && !m_device->seek(position))
+ return S_FALSE;
+
+ const qint64 maxBytes = qMin<qint64>(length, m_device->bytesAvailable());
+
+ *bytesRead = m_device->read(reinterpret_cast<char *>(buffer), maxBytes);
+
+ if (*bytesRead != length) {
+ qMemSet(buffer + *bytesRead, 0, length - *bytesRead);
+
+ return S_FALSE;
+ } else {
+ return S_OK;
+ }
+}
+
+bool DirectShowIOReader::nonBlockingRead(
+ LONGLONG position, LONG length, BYTE *buffer, qint64 *bytesRead, HRESULT *result)
+{
+ const qint64 maxSize = qMin<qint64>(m_device->size(), position + length);
+
+ if (position > m_device->size()) {
+ *bytesRead = 0;
+ *result = S_FALSE;
+
+ return true;
+ } else if (m_device->bytesAvailable() + m_device->pos() >= maxSize) {
+ if (m_device->pos() != position && !m_device->seek(position)) {
+ *bytesRead = 0;
+ *result = S_FALSE;
+
+ return true;
+ } else {
+ const qint64 maxBytes = qMin<qint64>(length, m_device->bytesAvailable());
+
+ *bytesRead = m_device->read(reinterpret_cast<char *>(buffer), maxBytes);
+
+ if (*bytesRead != length) {
+ qMemSet(buffer + *bytesRead, 0, length - *bytesRead);
+
+ *result = S_FALSE;
+ } else {
+ *result = S_OK;
+ }
+
+ return true;
+ }
+ } else {
+ return false;
+ }
+}
+
+void DirectShowIOReader::flushRequests()
+{
+ while (m_pendingHead) {
+ m_pendingHead->result = VFW_E_WRONG_STATE;
+
+ if (m_readyTail)
+ m_readyTail->next = m_pendingHead;
+
+ m_readyTail = m_pendingHead;
+
+ m_pendingHead = m_pendingHead->next;
+
+ m_readyTail->next = 0;
+
+ if (!m_pendingHead)
+ m_pendingTail = 0;
+
+ if (!m_readyHead)
+ m_readyHead = m_readyTail;
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.h
new file mode 100644
index 0000000000..8cbc2f10b6
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.h
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIRECTSHOWIOREADER_H
+#define DIRECTSHOWIOREADER_H
+
+#include <QtCore/qmutex.h>
+#include <QtCore/qobject.h>
+#include <QtCore/qwaitcondition.h>
+
+#include <dshow.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QIODevice;
+
+class DirectShowEventLoop;
+class DirectShowIOSource;
+class DirectShowSampleRequest;
+
+class DirectShowIOReader : public QObject, public IAsyncReader
+{
+ Q_OBJECT
+public:
+ DirectShowIOReader(QIODevice *device, DirectShowIOSource *source, DirectShowEventLoop *loop);
+ ~DirectShowIOReader();
+
+ // IUnknown
+ HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
+ ULONG STDMETHODCALLTYPE AddRef();
+ ULONG STDMETHODCALLTYPE Release();
+
+ // IAsyncReader
+ HRESULT STDMETHODCALLTYPE RequestAllocator(
+ IMemAllocator *pPreferred, ALLOCATOR_PROPERTIES *pProps, IMemAllocator **ppActual);
+
+ HRESULT STDMETHODCALLTYPE Request(IMediaSample *pSample, DWORD_PTR dwUser);
+
+ HRESULT STDMETHODCALLTYPE WaitForNext(
+ DWORD dwTimeout, IMediaSample **ppSample, DWORD_PTR *pdwUser);
+
+ HRESULT STDMETHODCALLTYPE SyncReadAligned(IMediaSample *pSample);
+
+ HRESULT STDMETHODCALLTYPE SyncRead(LONGLONG llPosition, LONG lLength, BYTE *pBuffer);
+
+ HRESULT STDMETHODCALLTYPE Length(LONGLONG *pTotal, LONGLONG *pAvailable);
+
+ HRESULT STDMETHODCALLTYPE BeginFlush();
+ HRESULT STDMETHODCALLTYPE EndFlush();
+
+protected:
+ void customEvent(QEvent *event);
+
+private Q_SLOTS:
+ void readyRead();
+
+private:
+ HRESULT blockingRead(LONGLONG position, LONG length, BYTE *buffer, qint64 *bytesRead);
+ bool nonBlockingRead(
+ LONGLONG position, LONG length, BYTE *buffer, qint64 *bytesRead, HRESULT *result);
+ void flushRequests();
+
+ DirectShowIOSource *m_source;
+ QIODevice *m_device;
+ DirectShowEventLoop *m_loop;
+ DirectShowSampleRequest *m_pendingHead;
+ DirectShowSampleRequest *m_pendingTail;
+ DirectShowSampleRequest *m_readyHead;
+ DirectShowSampleRequest *m_readyTail;
+ LONGLONG m_synchronousPosition;
+ LONG m_synchronousLength;
+ qint64 m_synchronousBytesRead;
+ BYTE *m_synchronousBuffer;
+ HRESULT m_synchronousResult;
+ LONGLONG m_totalLength;
+ LONGLONG m_availableLength;
+ bool m_flushing;
+ QMutex m_mutex;
+ QWaitCondition m_wait;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.cpp
new file mode 100644
index 0000000000..7b66d56c24
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.cpp
@@ -0,0 +1,639 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "directshowiosource.h"
+
+#include "directshowglobal.h"
+#include "directshowmediatype.h"
+#include "directshowpinenum.h"
+
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qurl.h>
+
+QT_BEGIN_NAMESPACE
+
+static const GUID directshow_subtypes[] =
+{
+ MEDIASUBTYPE_Avi,
+ MEDIASUBTYPE_WAVE,
+ MEDIASUBTYPE_NULL
+};
+
+DirectShowIOSource::DirectShowIOSource(DirectShowEventLoop *loop)
+ : m_ref(1)
+ , m_state(State_Stopped)
+ , m_reader(0)
+ , m_loop(loop)
+ , m_graph(0)
+ , m_clock(0)
+ , m_allocator(0)
+ , m_peerPin(0)
+ , m_pinId(QLatin1String("Data"))
+{
+ QVector<AM_MEDIA_TYPE> mediaTypes;
+
+ AM_MEDIA_TYPE type =
+ {
+ MEDIATYPE_Stream, // majortype
+ MEDIASUBTYPE_NULL, // subtype
+ TRUE, // bFixedSizeSamples
+ FALSE, // bTemporalCompression
+ 1, // lSampleSize
+ GUID_NULL, // formattype
+ 0, // pUnk
+ 0, // cbFormat
+ 0, // pbFormat
+ };
+
+ static const int count = sizeof(directshow_subtypes) / sizeof(GUID);
+
+ for (int i = 0; i < count; ++i) {
+ type.subtype = directshow_subtypes[i];
+ mediaTypes.append(type);
+ }
+
+ setMediaTypes(mediaTypes);
+}
+
+DirectShowIOSource::~DirectShowIOSource()
+{
+ Q_ASSERT(m_ref == 0);
+
+ delete m_reader;
+}
+
+void DirectShowIOSource::setDevice(QIODevice *device)
+{
+ Q_ASSERT(!m_reader);
+
+ m_reader = new DirectShowIOReader(device, this, m_loop);
+}
+
+void DirectShowIOSource::setAllocator(IMemAllocator *allocator)
+{
+ if (m_allocator)
+ m_allocator->Release();
+
+ m_allocator = allocator;
+
+ if (m_allocator)
+ m_allocator->AddRef();
+}
+
+// IUnknown
+HRESULT DirectShowIOSource::QueryInterface(REFIID riid, void **ppvObject)
+{
+ // 2dd74950-a890-11d1-abe8-00a0c905f375
+ static const GUID iid_IAmFilterMiscFlags = {
+ 0x2dd74950, 0xa890, 0x11d1, {0xab, 0xe8, 0x00, 0xa0, 0xc9, 0x05, 0xf3, 0x75}};
+
+ if (!ppvObject) {
+ return E_POINTER;
+ } else if (riid == IID_IUnknown
+ || riid == IID_IPersist
+ || riid == IID_IMediaFilter
+ || riid == IID_IBaseFilter) {
+ *ppvObject = static_cast<IBaseFilter *>(this);
+ } else if (riid == iid_IAmFilterMiscFlags) {
+ *ppvObject = static_cast<IAMFilterMiscFlags *>(this);
+ } else if (riid == IID_IPin) {
+ *ppvObject = static_cast<IPin *>(this);
+ } else if (riid == IID_IAsyncReader) {
+ *ppvObject = static_cast<IAsyncReader *>(m_reader);
+ } else {
+ *ppvObject = 0;
+
+ return E_NOINTERFACE;
+ }
+
+ AddRef();
+
+ return S_OK;
+}
+
+ULONG DirectShowIOSource::AddRef()
+{
+ return InterlockedIncrement(&m_ref);
+}
+
+ULONG DirectShowIOSource::Release()
+{
+ ULONG ref = InterlockedDecrement(&m_ref);
+
+ if (ref == 0) {
+ delete this;
+ }
+
+ return ref;
+}
+
+// IPersist
+HRESULT DirectShowIOSource::GetClassID(CLSID *pClassID)
+{
+ *pClassID = CLSID_NULL;
+
+ return S_OK;
+}
+
+// IMediaFilter
+HRESULT DirectShowIOSource::Run(REFERENCE_TIME tStart)
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_state = State_Running;
+
+ return S_OK;
+}
+
+HRESULT DirectShowIOSource::Pause()
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_state = State_Paused;
+
+ return S_OK;
+}
+
+HRESULT DirectShowIOSource::Stop()
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_state = State_Stopped;
+
+ return S_OK;
+}
+
+HRESULT DirectShowIOSource::GetState(DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
+{
+ Q_UNUSED(dwMilliSecsTimeout);
+
+ if (!pState) {
+ return E_POINTER;
+ } else {
+ QMutexLocker locker(&m_mutex);
+
+ *pState = m_state;
+
+ return S_OK;
+ }
+}
+
+HRESULT DirectShowIOSource::SetSyncSource(IReferenceClock *pClock)
+{
+ QMutexLocker locker(&m_mutex);
+
+ if (m_clock)
+ m_clock->Release();
+
+ m_clock = pClock;
+
+ if (m_clock)
+ m_clock->AddRef();
+
+ return S_OK;
+}
+
+HRESULT DirectShowIOSource::GetSyncSource(IReferenceClock **ppClock)
+{
+ if (!ppClock) {
+ return E_POINTER;
+ } else {
+ if (!m_clock) {
+ *ppClock = 0;
+
+ return S_FALSE;
+ } else {
+ m_clock->AddRef();
+
+ *ppClock = m_clock;
+
+ return S_OK;
+ }
+ }
+}
+
+// IBaseFilter
+HRESULT DirectShowIOSource::EnumPins(IEnumPins **ppEnum)
+{
+ if (!ppEnum) {
+ return E_POINTER;
+ } else {
+ *ppEnum = new DirectShowPinEnum(QList<IPin *>() << this);
+
+ return S_OK;
+ }
+}
+
+HRESULT DirectShowIOSource::FindPin(LPCWSTR Id, IPin **ppPin)
+{
+ if (!ppPin || !Id) {
+ return E_POINTER;
+ } else {
+ QMutexLocker locker(&m_mutex);
+ if (QString::fromWCharArray(Id) == m_pinId) {
+ AddRef();
+
+ *ppPin = this;
+
+ return S_OK;
+ } else {
+ *ppPin = 0;
+
+ return VFW_E_NOT_FOUND;
+ }
+ }
+}
+
+HRESULT DirectShowIOSource::JoinFilterGraph(IFilterGraph *pGraph, LPCWSTR pName)
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_graph = pGraph;
+ m_filterName = QString::fromWCharArray(pName);
+
+ return S_OK;
+}
+
+HRESULT DirectShowIOSource::QueryFilterInfo(FILTER_INFO *pInfo)
+{
+ if (!pInfo) {
+ return E_POINTER;
+ } else {
+ QString name = m_filterName;
+
+ if (name.length() >= MAX_FILTER_NAME)
+ name.truncate(MAX_FILTER_NAME - 1);
+
+ int length = name.toWCharArray(pInfo->achName);
+ pInfo->achName[length] = '\0';
+
+ if (m_graph)
+ m_graph->AddRef();
+
+ pInfo->pGraph = m_graph;
+
+ return S_OK;
+ }
+}
+
+HRESULT DirectShowIOSource::QueryVendorInfo(LPWSTR *pVendorInfo)
+{
+ Q_UNUSED(pVendorInfo);
+
+ return E_NOTIMPL;
+}
+
+// IAMFilterMiscFlags
+ULONG DirectShowIOSource::GetMiscFlags()
+{
+ return AM_FILTER_MISC_FLAGS_IS_SOURCE;
+}
+
+// IPin
+HRESULT DirectShowIOSource::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
+{
+ QMutexLocker locker(&m_mutex);
+ if (!pReceivePin) {
+ return E_POINTER;
+ } else if (m_state != State_Stopped) {
+ return VFW_E_NOT_STOPPED;
+ } else if (m_peerPin) {
+ return VFW_E_ALREADY_CONNECTED;
+ } else {
+ HRESULT hr = VFW_E_TYPE_NOT_ACCEPTED;
+
+ m_peerPin = pReceivePin;
+ m_peerPin->AddRef();
+
+ if (!pmt) {
+ IEnumMediaTypes *mediaTypes = 0;
+ if (pReceivePin->EnumMediaTypes(&mediaTypes) == S_OK) {
+ for (AM_MEDIA_TYPE *type = 0;
+ mediaTypes->Next(1, &type, 0) == S_OK;
+ DirectShowMediaType::deleteType(type)) {
+ switch (tryConnect(pReceivePin, type)) {
+ case S_OK:
+ DirectShowMediaType::freeData(type);
+ mediaTypes->Release();
+ return S_OK;
+ case VFW_E_NO_TRANSPORT:
+ hr = VFW_E_NO_TRANSPORT;
+ break;
+ default:
+ break;
+ }
+ }
+ mediaTypes->Release();
+ }
+ AM_MEDIA_TYPE type =
+ {
+ MEDIATYPE_Stream, // majortype
+ MEDIASUBTYPE_NULL, // subtype
+ TRUE, // bFixedSizeSamples
+ FALSE, // bTemporalCompression
+ 1, // lSampleSize
+ GUID_NULL, // formattype
+ 0, // pUnk
+ 0, // cbFormat
+ 0, // pbFormat
+ };
+
+ static const int count = sizeof(directshow_subtypes) / sizeof(GUID);
+
+ for (int i = 0; i < count; ++i) {
+ type.subtype = directshow_subtypes[i];
+
+ switch (tryConnect(pReceivePin, &type)) {
+ case S_OK:
+ return S_OK;
+ case VFW_E_NO_TRANSPORT:
+ hr = VFW_E_NO_TRANSPORT;
+ break;
+ default:
+ break;
+ }
+ }
+ } else if (pmt->majortype == MEDIATYPE_Stream && (hr = tryConnect(pReceivePin, pmt))) {
+ return S_OK;
+ }
+
+ m_peerPin->Release();
+ m_peerPin = 0;
+
+ m_mediaType.clear();
+
+ return hr;
+ }
+}
+
+HRESULT DirectShowIOSource::tryConnect(IPin *pin, const AM_MEDIA_TYPE *type)
+{
+ m_mediaType = *type;
+
+ HRESULT hr = pin->ReceiveConnection(this, type);
+
+ if (!SUCCEEDED(hr)) {
+ if (m_allocator) {
+ m_allocator->Release();
+ m_allocator = 0;
+ }
+ } else if (!m_allocator) {
+ hr = VFW_E_NO_TRANSPORT;
+
+ if (IMemInputPin *memPin = com_cast<IMemInputPin>(pin, IID_IMemInputPin)) {
+ if ((m_allocator = com_new<IMemAllocator>(CLSID_MemoryAllocator, IID_IMemAllocator))) {
+ ALLOCATOR_PROPERTIES properties;
+ if (memPin->GetAllocatorRequirements(&properties) == S_OK
+ || m_allocator->GetProperties(&properties) == S_OK) {
+ if (properties.cbAlign == 0)
+ properties.cbAlign = 1;
+
+ ALLOCATOR_PROPERTIES actualProperties;
+ if (SUCCEEDED(hr = m_allocator->SetProperties(&properties, &actualProperties)))
+ hr = memPin->NotifyAllocator(m_allocator, TRUE);
+ }
+ if (!SUCCEEDED(hr)) {
+ m_allocator->Release();
+ m_allocator = 0;
+ }
+ }
+ memPin->Release();
+ }
+ if (!SUCCEEDED(hr))
+ pin->Disconnect();
+ }
+ return hr;
+}
+
+HRESULT DirectShowIOSource::ReceiveConnection(IPin *pConnector, const AM_MEDIA_TYPE *pmt)
+{
+ Q_UNUSED(pConnector);
+ Q_UNUSED(pmt);
+ // Output pin.
+ return E_NOTIMPL;
+}
+
+HRESULT DirectShowIOSource::Disconnect()
+{
+ if (!m_peerPin) {
+ return S_FALSE;
+ } else if (m_state != State_Stopped) {
+ return VFW_E_NOT_STOPPED;
+ } else {
+ HRESULT hr = m_peerPin->Disconnect();
+
+ if (!SUCCEEDED(hr))
+ return hr;
+
+ if (m_allocator) {
+ m_allocator->Release();
+ m_allocator = 0;
+ }
+
+ m_peerPin->Release();
+ m_peerPin = 0;
+
+ m_mediaType.clear();
+
+ return S_OK;
+ }
+}
+
+HRESULT DirectShowIOSource::ConnectedTo(IPin **ppPin)
+{
+ if (!ppPin) {
+ return E_POINTER;
+ } else {
+ QMutexLocker locker(&m_mutex);
+
+ if (!m_peerPin) {
+ *ppPin = 0;
+
+ return VFW_E_NOT_CONNECTED;
+ } else {
+ m_peerPin->AddRef();
+
+ *ppPin = m_peerPin;
+
+ return S_OK;
+ }
+ }
+}
+
+HRESULT DirectShowIOSource::ConnectionMediaType(AM_MEDIA_TYPE *pmt)
+{
+ if (!pmt) {
+ return E_POINTER;
+ } else {
+ QMutexLocker locker(&m_mutex);
+
+ if (!m_peerPin) {
+ pmt = 0;
+
+ return VFW_E_NOT_CONNECTED;
+ } else {
+ DirectShowMediaType::copy(pmt, m_mediaType);
+
+ return S_OK;
+ }
+ }
+}
+
+HRESULT DirectShowIOSource::QueryPinInfo(PIN_INFO *pInfo)
+{
+ if (!pInfo) {
+ return E_POINTER;
+ } else {
+ AddRef();
+
+ pInfo->pFilter = this;
+ pInfo->dir = PINDIR_OUTPUT;
+
+ const int bytes = qMin(MAX_FILTER_NAME, (m_pinId.length() + 1) * 2);
+
+ qMemCopy(pInfo->achName, m_pinId.utf16(), bytes);
+
+ return S_OK;
+ }
+}
+
+HRESULT DirectShowIOSource::QueryId(LPWSTR *Id)
+{
+ if (!Id) {
+ return E_POINTER;
+ } else {
+ const int bytes = (m_pinId.length() + 1) * 2;
+
+ *Id = static_cast<LPWSTR>(::CoTaskMemAlloc(bytes));
+
+ qMemCopy(*Id, m_pinId.utf16(), bytes);
+
+ return S_OK;
+ }
+}
+
+HRESULT DirectShowIOSource::QueryAccept(const AM_MEDIA_TYPE *pmt)
+{
+ if (!pmt) {
+ return E_POINTER;
+ } else if (pmt->majortype == MEDIATYPE_Stream) {
+ return S_OK;
+ } else {
+ return S_FALSE;
+ }
+}
+
+HRESULT DirectShowIOSource::EnumMediaTypes(IEnumMediaTypes **ppEnum)
+{
+ if (!ppEnum) {
+ return E_POINTER;
+ } else {
+ *ppEnum = createMediaTypeEnum();
+
+ return S_OK;
+ }
+}
+
+HRESULT DirectShowIOSource::QueryInternalConnections(IPin **apPin, ULONG *nPin)
+{
+ Q_UNUSED(apPin);
+ Q_UNUSED(nPin);
+
+ return E_NOTIMPL;
+}
+
+HRESULT DirectShowIOSource::EndOfStream()
+{
+ return S_OK;
+}
+
+HRESULT DirectShowIOSource::BeginFlush()
+{
+ return m_reader->BeginFlush();
+}
+
+HRESULT DirectShowIOSource::EndFlush()
+{
+ return m_reader->EndFlush();
+}
+
+HRESULT DirectShowIOSource::NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
+{
+ Q_UNUSED(tStart);
+ Q_UNUSED(tStop);
+ Q_UNUSED(dRate);
+
+ return S_OK;
+}
+
+HRESULT DirectShowIOSource::QueryDirection(PIN_DIRECTION *pPinDir)
+{
+ if (!pPinDir) {
+ return E_POINTER;
+ } else {
+ *pPinDir = PINDIR_OUTPUT;
+
+ return S_OK;
+ }
+}
+
+QT_END_NAMESPACE
+
+DirectShowRcSource::DirectShowRcSource(DirectShowEventLoop *loop)
+ : DirectShowIOSource(loop)
+{
+}
+
+bool DirectShowRcSource::open(const QUrl &url)
+{
+ m_file.moveToThread(QCoreApplication::instance()->thread());
+
+ m_file.setFileName(QLatin1Char(':') + url.path());
+
+ if (m_file.open(QIODevice::ReadOnly)) {
+
+ setDevice(&m_file);
+
+ return true;
+ } else {
+ return false;
+ }
+}
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.h
new file mode 100644
index 0000000000..1d917dfcba
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.h
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIRECTSHOWIOSOURCE_H
+#define DIRECTSHOWIOSOURCE_H
+
+#include "directshowglobal.h"
+#include "directshowioreader.h"
+#include "directshowmediatype.h"
+#include "directshowmediatypelist.h"
+
+#include <QtCore/qfile.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class DirectShowIOSource
+ : public DirectShowMediaTypeList
+ , public IBaseFilter
+ , public IAMFilterMiscFlags
+ , public IPin
+{
+public:
+ DirectShowIOSource(DirectShowEventLoop *loop);
+ ~DirectShowIOSource();
+
+ void setDevice(QIODevice *device);
+ void setAllocator(IMemAllocator *allocator);
+
+ // IUnknown
+ HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
+ ULONG STDMETHODCALLTYPE AddRef();
+ ULONG STDMETHODCALLTYPE Release();
+
+ // IPersist
+ HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID);
+
+ // IMediaFilter
+ HRESULT STDMETHODCALLTYPE Run(REFERENCE_TIME tStart);
+ HRESULT STDMETHODCALLTYPE Pause();
+ HRESULT STDMETHODCALLTYPE Stop();
+
+ HRESULT STDMETHODCALLTYPE GetState(DWORD dwMilliSecsTimeout, FILTER_STATE *pState);
+
+ HRESULT STDMETHODCALLTYPE SetSyncSource(IReferenceClock *pClock);
+ HRESULT STDMETHODCALLTYPE GetSyncSource(IReferenceClock **ppClock);
+
+ // IBaseFilter
+ HRESULT STDMETHODCALLTYPE EnumPins(IEnumPins **ppEnum);
+ HRESULT STDMETHODCALLTYPE FindPin(LPCWSTR Id, IPin **ppPin);
+
+ HRESULT STDMETHODCALLTYPE JoinFilterGraph(IFilterGraph *pGraph, LPCWSTR pName);
+
+ HRESULT STDMETHODCALLTYPE QueryFilterInfo(FILTER_INFO *pInfo);
+ HRESULT STDMETHODCALLTYPE QueryVendorInfo(LPWSTR *pVendorInfo);
+
+ // IAMFilterMiscFlags
+ ULONG STDMETHODCALLTYPE GetMiscFlags();
+
+ // IPin
+ HRESULT STDMETHODCALLTYPE Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt);
+ HRESULT STDMETHODCALLTYPE ReceiveConnection(IPin *pConnector, const AM_MEDIA_TYPE *pmt);
+ HRESULT STDMETHODCALLTYPE Disconnect();
+ HRESULT STDMETHODCALLTYPE ConnectedTo(IPin **ppPin);
+
+ HRESULT STDMETHODCALLTYPE ConnectionMediaType(AM_MEDIA_TYPE *pmt);
+
+ HRESULT STDMETHODCALLTYPE QueryPinInfo(PIN_INFO *pInfo);
+ HRESULT STDMETHODCALLTYPE QueryId(LPWSTR *Id);
+
+ HRESULT STDMETHODCALLTYPE QueryAccept(const AM_MEDIA_TYPE *pmt);
+
+ HRESULT STDMETHODCALLTYPE EnumMediaTypes(IEnumMediaTypes **ppEnum);
+
+ HRESULT STDMETHODCALLTYPE QueryInternalConnections(IPin **apPin, ULONG *nPin);
+
+ HRESULT STDMETHODCALLTYPE EndOfStream();
+
+ HRESULT STDMETHODCALLTYPE BeginFlush();
+ HRESULT STDMETHODCALLTYPE EndFlush();
+
+ HRESULT STDMETHODCALLTYPE NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
+
+ HRESULT STDMETHODCALLTYPE QueryDirection(PIN_DIRECTION *pPinDir);
+
+private:
+ HRESULT tryConnect(IPin *pin, const AM_MEDIA_TYPE *type);
+
+ volatile LONG m_ref;
+ FILTER_STATE m_state;
+ DirectShowIOReader *m_reader;
+ DirectShowEventLoop *m_loop;
+ IFilterGraph *m_graph;
+ IReferenceClock *m_clock;
+ IMemAllocator *m_allocator;
+ IPin *m_peerPin;
+ DirectShowMediaType m_mediaType;
+ QString m_filterName;
+ const QString m_pinId;
+ QMutex m_mutex;
+};
+
+class DirectShowRcSource : public DirectShowIOSource
+{
+public:
+ DirectShowRcSource(DirectShowEventLoop *loop);
+
+ bool open(const QUrl &url);
+
+private:
+ QFile m_file;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatype.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatype.cpp
new file mode 100644
index 0000000000..cf6d45bca7
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatype.cpp
@@ -0,0 +1,189 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "directshowmediatype.h"
+
+
+QT_BEGIN_NAMESPACE
+
+namespace
+{
+ struct TypeLookup
+ {
+ QVideoFrame::PixelFormat pixelFormat;
+ GUID mediaType;
+ };
+
+ static const TypeLookup qt_typeLookup[] =
+ {
+ { QVideoFrame::Format_RGB32, /*MEDIASUBTYPE_RGB32*/ {0xe436eb7e, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}} },
+ { QVideoFrame::Format_BGR24, /*MEDIASUBTYPE_RGB24*/ {0xe436eb7d, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}} },
+ { QVideoFrame::Format_RGB565, /*MEDIASUBTYPE_RGB565*/ {0xe436eb7b, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}} },
+ { QVideoFrame::Format_RGB555, /*MEDIASUBTYPE_RGB555*/ {0xe436eb7c, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}} },
+ { QVideoFrame::Format_AYUV444, /*MEDIASUBTYPE_AYUV*/ {0x56555941, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} },
+ { QVideoFrame::Format_YUYV, /*MEDIASUBTYPE_YUY2*/ {0x32595559, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} },
+ { QVideoFrame::Format_UYVY, /*MEDIASUBTYPE_UYVY*/ {0x59565955, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} },
+ { QVideoFrame::Format_IMC1, /*MEDIASUBTYPE_IMC1*/ {0x31434D49, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} },
+ { QVideoFrame::Format_IMC2, /*MEDIASUBTYPE_IMC2*/ {0x32434D49, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} },
+ { QVideoFrame::Format_IMC3, /*MEDIASUBTYPE_IMC3*/ {0x33434D49, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} },
+ { QVideoFrame::Format_IMC4, /*MEDIASUBTYPE_IMC4*/ {0x34434D49, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} },
+ { QVideoFrame::Format_YV12, /*MEDIASUBTYPE_YV12*/ {0x32315659, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} },
+ { QVideoFrame::Format_NV12, /*MEDIASUBTYPE_NV12*/ {0x3231564E, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} },
+ { QVideoFrame::Format_YUV420P, /*MEDIASUBTYPE_IYUV*/ {0x56555949, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} }
+ };
+}
+
+void DirectShowMediaType::copy(AM_MEDIA_TYPE *target, const AM_MEDIA_TYPE &source)
+{
+ *target = source;
+
+ if (source.cbFormat > 0) {
+ target->pbFormat = reinterpret_cast<PBYTE>(CoTaskMemAlloc(source.cbFormat));
+ memcpy(target->pbFormat, source.pbFormat, source.cbFormat);
+ }
+ if (target->pUnk)
+ target->pUnk->AddRef();
+}
+
+void DirectShowMediaType::deleteType(AM_MEDIA_TYPE *type)
+{
+ freeData(type);
+
+ CoTaskMemFree(type);
+}
+
+void DirectShowMediaType::freeData(AM_MEDIA_TYPE *type)
+{
+ if (type->cbFormat > 0)
+ CoTaskMemFree(type->pbFormat);
+
+ if (type->pUnk)
+ type->pUnk->Release();
+}
+
+
+GUID DirectShowMediaType::convertPixelFormat(QVideoFrame::PixelFormat format)
+{
+ // MEDIASUBTYPE_None;
+ static const GUID none = {
+ 0xe436eb8e, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70} };
+
+ const int count = sizeof(qt_typeLookup) / sizeof(TypeLookup);
+
+ for (int i = 0; i < count; ++i)
+ if (qt_typeLookup[i].pixelFormat == format)
+ return qt_typeLookup[i].mediaType;
+ return none;
+}
+
+QVideoSurfaceFormat DirectShowMediaType::formatFromType(const AM_MEDIA_TYPE &type)
+{
+ const int count = sizeof(qt_typeLookup) / sizeof(TypeLookup);
+
+ for (int i = 0; i < count; ++i) {
+ if (IsEqualGUID(qt_typeLookup[i].mediaType, type.subtype) && type.cbFormat > 0) {
+ if (IsEqualGUID(type.formattype, FORMAT_VideoInfo)) {
+ VIDEOINFOHEADER *header = reinterpret_cast<VIDEOINFOHEADER *>(type.pbFormat);
+
+ QVideoSurfaceFormat format(
+ QSize(header->bmiHeader.biWidth, qAbs(header->bmiHeader.biHeight)),
+ qt_typeLookup[i].pixelFormat);
+
+ if (header->AvgTimePerFrame > 0)
+ format.setFrameRate(10000 /header->AvgTimePerFrame);
+
+ format.setScanLineDirection(header->bmiHeader.biHeight < 0
+ ? QVideoSurfaceFormat::TopToBottom
+ : QVideoSurfaceFormat::BottomToTop);
+
+ return format;
+ } else if (IsEqualGUID(type.formattype, FORMAT_VideoInfo2)) {
+ VIDEOINFOHEADER2 *header = reinterpret_cast<VIDEOINFOHEADER2 *>(type.pbFormat);
+
+ QVideoSurfaceFormat format(
+ QSize(header->bmiHeader.biWidth, qAbs(header->bmiHeader.biHeight)),
+ qt_typeLookup[i].pixelFormat);
+
+ if (header->AvgTimePerFrame > 0)
+ format.setFrameRate(10000 / header->AvgTimePerFrame);
+
+ format.setScanLineDirection(header->bmiHeader.biHeight < 0
+ ? QVideoSurfaceFormat::TopToBottom
+ : QVideoSurfaceFormat::BottomToTop);
+
+ return format;
+ }
+ }
+ }
+ return QVideoSurfaceFormat();
+}
+
+int DirectShowMediaType::bytesPerLine(const QVideoSurfaceFormat &format)
+{
+ switch (format.pixelFormat()) {
+ // 32 bpp packed formats.
+ case QVideoFrame::Format_RGB32:
+ case QVideoFrame::Format_AYUV444:
+ return format.frameWidth() * 4;
+ // 24 bpp packed formats.
+ case QVideoFrame::Format_RGB24:
+ return format.frameWidth() * 3 + 3 - format.frameWidth() % 4;
+ // 16 bpp packed formats.
+ case QVideoFrame::Format_RGB565:
+ case QVideoFrame::Format_RGB555:
+ case QVideoFrame::Format_YUYV:
+ case QVideoFrame::Format_UYVY:
+ return format.frameWidth() * 2 + 3 - format.frameWidth() % 4;
+ // Planar formats.
+ case QVideoFrame::Format_IMC1:
+ case QVideoFrame::Format_IMC2:
+ case QVideoFrame::Format_IMC3:
+ case QVideoFrame::Format_IMC4:
+ case QVideoFrame::Format_YV12:
+ case QVideoFrame::Format_NV12:
+ case QVideoFrame::Format_YUV420P:
+ return format.frameWidth() + 3 - format.frameWidth() % 4;
+ default:
+ return 0;
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatype.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatype.h
new file mode 100644
index 0000000000..3cc730761b
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatype.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIRECTSHOWMEDIATYPE_H
+#define DIRECTSHOWMEDIATYPE_H
+
+#include <QtMultimedia/qvideosurfaceformat.h>
+
+#include <dshow.h>
+#include <dvdmedia.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+
+class DirectShowMediaType : public AM_MEDIA_TYPE
+{
+public:
+ DirectShowMediaType() { memset(this, 0, sizeof(DirectShowMediaType)); }
+ DirectShowMediaType(const AM_MEDIA_TYPE &type) { copy(this, type); }
+ DirectShowMediaType(const DirectShowMediaType &other) { copy(this, other); }
+ DirectShowMediaType &operator =(const AM_MEDIA_TYPE &type) {
+ freeData(this); copy(this, type); return *this; }
+ DirectShowMediaType &operator =(const DirectShowMediaType &other) {
+ freeData(this); copy(this, other); return *this; }
+ ~DirectShowMediaType() { freeData(this); }
+
+ void clear() { freeData(this); memset(this, 0, sizeof(DirectShowMediaType)); }
+
+ static void copy(AM_MEDIA_TYPE *target, const AM_MEDIA_TYPE &source);
+ static void freeData(AM_MEDIA_TYPE *type);
+ static void deleteType(AM_MEDIA_TYPE *type);
+
+ static GUID convertPixelFormat(QVideoFrame::PixelFormat format);
+ static QVideoSurfaceFormat formatFromType(const AM_MEDIA_TYPE &type);
+
+ static int bytesPerLine(const QVideoSurfaceFormat &format);
+};
+
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatypelist.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatypelist.cpp
new file mode 100644
index 0000000000..f67794a980
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatypelist.cpp
@@ -0,0 +1,229 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "directshowmediatypelist.h"
+
+#include "directshowmediatype.h"
+#include "videosurfacefilter.h"
+
+
+QT_BEGIN_NAMESPACE
+
+class DirectShowMediaTypeEnum : public IEnumMediaTypes
+{
+public:
+ DirectShowMediaTypeEnum(DirectShowMediaTypeList *list, int token, int index = 0);
+ ~DirectShowMediaTypeEnum();
+
+ // IUnknown
+ HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
+ ULONG STDMETHODCALLTYPE AddRef();
+ ULONG STDMETHODCALLTYPE Release();
+
+ // IEnumMediaTypes
+ HRESULT STDMETHODCALLTYPE Next(
+ ULONG cMediaTypes, AM_MEDIA_TYPE **ppMediaTypes, ULONG *pcFetched);
+ HRESULT STDMETHODCALLTYPE Skip(ULONG cMediaTypes);
+ HRESULT STDMETHODCALLTYPE Reset();
+
+ HRESULT STDMETHODCALLTYPE Clone(IEnumMediaTypes **ppEnum);
+
+private:
+ LONG m_ref;
+ DirectShowMediaTypeList *m_list;
+ int m_mediaTypeToken;
+ int m_index;
+};
+
+
+DirectShowMediaTypeEnum::DirectShowMediaTypeEnum(
+ DirectShowMediaTypeList *list, int token, int index)
+ : m_ref(1)
+ , m_list(list)
+ , m_mediaTypeToken(token)
+ , m_index(index)
+{
+ m_list->AddRef();
+}
+
+DirectShowMediaTypeEnum::~DirectShowMediaTypeEnum()
+{
+ m_list->Release();
+}
+
+HRESULT DirectShowMediaTypeEnum::QueryInterface(REFIID riid, void **ppvObject)
+{
+ if (!ppvObject) {
+ return E_POINTER;
+ } else if (riid == IID_IUnknown
+ || riid == IID_IEnumMediaTypes) {
+ *ppvObject = static_cast<IEnumMediaTypes *>(this);
+ } else {
+ *ppvObject = 0;
+
+ return E_NOINTERFACE;
+ }
+
+ AddRef();
+
+ return S_OK;
+}
+
+ULONG DirectShowMediaTypeEnum::AddRef()
+{
+ return InterlockedIncrement(&m_ref);
+}
+
+ULONG DirectShowMediaTypeEnum::Release()
+{
+ ULONG ref = InterlockedDecrement(&m_ref);
+
+ if (ref == 0) {
+ delete this;
+ }
+
+ return ref;
+}
+
+HRESULT DirectShowMediaTypeEnum::Next(
+ ULONG cMediaTypes, AM_MEDIA_TYPE **ppMediaTypes, ULONG *pcFetched)
+{
+ return m_list->nextMediaType(m_mediaTypeToken, &m_index, cMediaTypes, ppMediaTypes, pcFetched);
+}
+
+HRESULT DirectShowMediaTypeEnum::Skip(ULONG cMediaTypes)
+{
+ return m_list->skipMediaType(m_mediaTypeToken, &m_index, cMediaTypes);
+}
+
+HRESULT DirectShowMediaTypeEnum::Reset()
+{
+ m_mediaTypeToken = m_list->currentMediaTypeToken();
+ m_index = 0;
+
+ return S_OK;
+}
+
+HRESULT DirectShowMediaTypeEnum::Clone(IEnumMediaTypes **ppEnum)
+{
+ return m_list->cloneMediaType(m_mediaTypeToken, m_index, ppEnum);
+}
+
+
+DirectShowMediaTypeList::DirectShowMediaTypeList()
+ : m_mediaTypeToken(0)
+{
+}
+
+IEnumMediaTypes *DirectShowMediaTypeList::createMediaTypeEnum()
+{
+ return new DirectShowMediaTypeEnum(this, m_mediaTypeToken, 0);
+}
+
+
+void DirectShowMediaTypeList::setMediaTypes(const QVector<AM_MEDIA_TYPE> &types)
+{
+ ++m_mediaTypeToken;
+
+ m_mediaTypes = types;
+}
+
+
+int DirectShowMediaTypeList::currentMediaTypeToken()
+{
+ return m_mediaTypeToken;
+}
+
+HRESULT DirectShowMediaTypeList::nextMediaType(
+ int token, int *index, ULONG count, AM_MEDIA_TYPE **types, ULONG *fetchedCount)
+{
+ if (!types || (count != 1 && !fetchedCount)) {
+ return E_POINTER;
+ } else if (m_mediaTypeToken != token) {
+ return VFW_E_ENUM_OUT_OF_SYNC;
+ } else {
+ int boundedCount = qBound<int>(0, count, m_mediaTypes.count() - *index);
+
+ for (int i = 0; i < boundedCount; ++i, ++(*index)) {
+ types[i] = reinterpret_cast<AM_MEDIA_TYPE *>(CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE)));
+
+ if (types[i]) {
+ DirectShowMediaType::copy(types[i], m_mediaTypes.at(*index));
+ } else {
+ for (--i; i >= 0; --i)
+ CoTaskMemFree(types[i]);
+
+ if (fetchedCount)
+ *fetchedCount = 0;
+
+ return E_OUTOFMEMORY;
+ }
+ }
+ if (fetchedCount)
+ *fetchedCount = boundedCount;
+
+ return boundedCount == count ? S_OK : S_FALSE;
+ }
+}
+
+HRESULT DirectShowMediaTypeList::skipMediaType(int token, int *index, ULONG count)
+{
+ if (m_mediaTypeToken != token) {
+ return VFW_E_ENUM_OUT_OF_SYNC;
+ } else {
+ *index = qMin<int>(*index + count, m_mediaTypes.size());
+
+ return *index < m_mediaTypes.size() ? S_OK : S_FALSE;
+ }
+}
+
+HRESULT DirectShowMediaTypeList::cloneMediaType(int token, int index, IEnumMediaTypes **enumeration)
+{
+ if (m_mediaTypeToken != token) {
+ return VFW_E_ENUM_OUT_OF_SYNC;
+ } else {
+ *enumeration = new DirectShowMediaTypeEnum(this, token, index);
+
+ return S_OK;
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatypelist.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatypelist.h
new file mode 100644
index 0000000000..b49f24c426
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatypelist.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIRECTSHOWMEDIATYPELIST_H
+#define DIRECTSHOWMEDIATYPELIST_H
+
+#include <QtCore/qvector.h>
+
+#include <dshow.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class DirectShowMediaTypeList : public IUnknown
+{
+public:
+ DirectShowMediaTypeList();
+
+ IEnumMediaTypes *createMediaTypeEnum();
+
+ void setMediaTypes(const QVector<AM_MEDIA_TYPE> &types);
+
+ virtual int currentMediaTypeToken();
+ virtual HRESULT nextMediaType(
+ int token, int *index, ULONG count, AM_MEDIA_TYPE **types, ULONG *fetchedCount);
+ virtual HRESULT skipMediaType(int token, int *index, ULONG count);
+ virtual HRESULT cloneMediaType(int token, int index, IEnumMediaTypes **enumeration);
+
+private:
+ int m_mediaTypeToken;
+ QVector<AM_MEDIA_TYPE> m_mediaTypes;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowmetadatacontrol.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowmetadatacontrol.cpp
new file mode 100644
index 0000000000..89821c49b3
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowmetadatacontrol.cpp
@@ -0,0 +1,370 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <dshow.h>
+#include <initguid.h>
+#include <qnetwork.h>
+
+#include "directshowmetadatacontrol.h"
+
+#include "directshowplayerservice.h"
+
+#include <QtCore/qcoreapplication.h>
+
+
+QT_BEGIN_NAMESPACE
+
+#ifndef QT_NO_WMSDK
+namespace
+{
+ struct QWMMetaDataKeyLookup
+ {
+ QtMultimedia::MetaData key;
+ const wchar_t *token;
+ };
+}
+
+static const QWMMetaDataKeyLookup qt_wmMetaDataKeys[] =
+{
+ { QtMultimedia::Title, L"Title" },
+ { QtMultimedia::SubTitle, L"WM/SubTitle" },
+ { QtMultimedia::Author, L"Author" },
+ { QtMultimedia::Comment, L"Comment" },
+ { QtMultimedia::Description, L"Description" },
+ { QtMultimedia::Category, L"WM/Category" },
+ { QtMultimedia::Genre, L"WM/Genre" },
+ //{ QtMultimedia::Date, 0 },
+ { QtMultimedia::Year, L"WM/Year" },
+ { QtMultimedia::UserRating, L"UserRating" },
+ //{ QtMultimedia::MetaDatawords, 0 },
+ { QtMultimedia::Language, L"Language" },
+ { QtMultimedia::Publisher, L"WM/Publisher" },
+ { QtMultimedia::Copyright, L"Copyright" },
+ { QtMultimedia::ParentalRating, L"ParentalRating" },
+ { QtMultimedia::RatingOrganisation, L"RatingOrganisation" },
+
+ // Media
+ { QtMultimedia::Size, L"FileSize" },
+ { QtMultimedia::MediaType, L"MediaType" },
+ { QtMultimedia::Duration, L"Duration" },
+
+ // Audio
+ { QtMultimedia::AudioBitRate, L"AudioBitRate" },
+ { QtMultimedia::AudioCodec, L"AudioCodec" },
+ { QtMultimedia::ChannelCount, L"ChannelCount" },
+ { QtMultimedia::SampleRate, L"Frequency" },
+
+ // Music
+ { QtMultimedia::AlbumTitle, L"WM/AlbumTitle" },
+ { QtMultimedia::AlbumArtist, L"WM/AlbumArtist" },
+ { QtMultimedia::ContributingArtist, L"Author" },
+ { QtMultimedia::Composer, L"WM/Composer" },
+ { QtMultimedia::Conductor, L"WM/Conductor" },
+ { QtMultimedia::Lyrics, L"WM/Lyrics" },
+ { QtMultimedia::Mood, L"WM/Mood" },
+ { QtMultimedia::TrackNumber, L"WM/TrackNumber" },
+ //{ QtMultimedia::TrackCount, 0 },
+ //{ QtMultimedia::CoverArtUriSmall, 0 },
+ //{ QtMultimedia::CoverArtUriLarge, 0 },
+
+ // Image/Video
+ //{ QtMultimedia::Resolution, 0 },
+ //{ QtMultimedia::PixelAspectRatio, 0 },
+
+ // Video
+ //{ QtMultimedia::FrameRate, 0 },
+ { QtMultimedia::VideoBitRate, L"VideoBitRate" },
+ { QtMultimedia::VideoCodec, L"VideoCodec" },
+
+ //{ QtMultimedia::PosterUri, 0 },
+
+ // Movie
+ { QtMultimedia::ChapterNumber, L"ChapterNumber" },
+ { QtMultimedia::Director, L"WM/Director" },
+ { QtMultimedia::LeadPerformer, L"LeadPerformer" },
+ { QtMultimedia::Writer, L"WM/Writer" },
+
+ // Photos
+ { QtMultimedia::CameraManufacturer, L"CameraManufacturer" },
+ { QtMultimedia::CameraModel, L"CameraModel" },
+ { QtMultimedia::Event, L"Event" },
+ { QtMultimedia::Subject, L"Subject" }
+};
+
+static QVariant getValue(IWMHeaderInfo *header, const wchar_t *key)
+{
+ WORD streamNumber = 0;
+ WMT_ATTR_DATATYPE type = WMT_TYPE_DWORD;
+ WORD size = 0;
+
+ if (header->GetAttributeByName(&streamNumber, key, &type, 0, &size) == S_OK) {
+ switch (type) {
+ case WMT_TYPE_DWORD:
+ if (size == sizeof(DWORD)) {
+ DWORD word;
+ if (header->GetAttributeByName(
+ &streamNumber,
+ key,
+ &type,
+ reinterpret_cast<BYTE *>(&word),
+ &size) == S_OK) {
+ return int(word);
+ }
+ }
+ break;
+ case WMT_TYPE_STRING:
+ {
+ QString string;
+ string.resize(size / 2 - 1);
+
+ if (header->GetAttributeByName(
+ &streamNumber,
+ key,
+ &type,
+ reinterpret_cast<BYTE *>(const_cast<ushort *>(string.utf16())),
+ &size) == S_OK) {
+ return string;
+ }
+ }
+ break;
+ case WMT_TYPE_BINARY:
+ {
+ QByteArray bytes;
+ bytes.resize(size);
+ if (header->GetAttributeByName(
+ &streamNumber,
+ key,
+ &type,
+ reinterpret_cast<BYTE *>(bytes.data()),
+ &size) == S_OK) {
+ return bytes;
+ }
+ }
+ break;
+ case WMT_TYPE_BOOL:
+ if (size == sizeof(DWORD)) {
+ DWORD word;
+ if (header->GetAttributeByName(
+ &streamNumber,
+ key,
+ &type,
+ reinterpret_cast<BYTE *>(&word),
+ &size) == S_OK) {
+ return bool(word);
+ }
+ }
+ break;
+ case WMT_TYPE_QWORD:
+ if (size == sizeof(QWORD)) {
+ QWORD word;
+ if (header->GetAttributeByName(
+ &streamNumber,
+ key,
+ &type,
+ reinterpret_cast<BYTE *>(&word),
+ &size) == S_OK) {
+ return qint64(word);
+ }
+ }
+ break;
+ case WMT_TYPE_WORD:
+ if (size == sizeof(WORD)){
+ WORD word;
+ if (header->GetAttributeByName(
+ &streamNumber,
+ key,
+ &type,
+ reinterpret_cast<BYTE *>(&word),
+ &size) == S_OK) {
+ return short(word);
+ }
+ }
+ break;
+ case WMT_TYPE_GUID:
+ if (size == 16) {
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ return QVariant();
+}
+#endif
+
+DirectShowMetaDataControl::DirectShowMetaDataControl(QObject *parent)
+ : QMetaDataControl(parent)
+ , m_content(0)
+#ifndef QT_NO_WMSDK
+ , m_headerInfo(0)
+#endif
+{
+}
+
+DirectShowMetaDataControl::~DirectShowMetaDataControl()
+{
+}
+
+bool DirectShowMetaDataControl::isWritable() const
+{
+ return false;
+}
+
+bool DirectShowMetaDataControl::isMetaDataAvailable() const
+{
+#ifndef QT_NO_WMSDK
+ return m_content || m_headerInfo;
+#else
+ return m_content;
+#endif
+}
+
+QVariant DirectShowMetaDataControl::metaData(QtMultimedia::MetaData key) const
+{
+ QVariant value;
+
+#ifndef QT_NO_WMSDK
+ if (m_headerInfo) {
+ static const int count = sizeof(qt_wmMetaDataKeys) / sizeof(QWMMetaDataKeyLookup);
+ for (int i = 0; i < count; ++i) {
+ if (qt_wmMetaDataKeys[i].key == key) {
+ value = getValue(m_headerInfo, qt_wmMetaDataKeys[i].token);
+ break;
+ }
+ }
+ } else if (m_content) {
+#else
+ if (m_content) {
+#endif
+ BSTR string = 0;
+
+ switch (key) {
+ case QtMultimedia::Author:
+ m_content->get_AuthorName(&string);
+ break;
+ case QtMultimedia::Title:
+ m_content->get_Title(&string);
+ break;
+ case QtMultimedia::ParentalRating:
+ m_content->get_Rating(&string);
+ break;
+ case QtMultimedia::Description:
+ m_content->get_Description(&string);
+ break;
+ case QtMultimedia::Copyright:
+ m_content->get_Copyright(&string);
+ break;
+ default:
+ break;
+ }
+
+ if (string) {
+ value = QString::fromUtf16(reinterpret_cast<ushort *>(string), ::SysStringLen(string));
+
+ ::SysFreeString(string);
+ }
+ }
+ return value;
+}
+
+void DirectShowMetaDataControl::setMetaData(QtMultimedia::MetaData, const QVariant &)
+{
+}
+
+QList<QtMultimedia::MetaData> DirectShowMetaDataControl::availableMetaData() const
+{
+ return QList<QtMultimedia::MetaData>();
+}
+
+QVariant DirectShowMetaDataControl::extendedMetaData(const QString &) const
+{
+ return QVariant();
+}
+
+void DirectShowMetaDataControl::setExtendedMetaData(const QString &, const QVariant &)
+{
+}
+
+QStringList DirectShowMetaDataControl::availableExtendedMetaData() const
+{
+ return QStringList();
+}
+
+void DirectShowMetaDataControl::updateGraph(IFilterGraph2 *graph, IBaseFilter *source)
+{
+ if (m_content)
+ m_content->Release();
+
+ if (!graph || graph->QueryInterface(
+ IID_IAMMediaContent, reinterpret_cast<void **>(&m_content)) != S_OK) {
+ m_content = 0;
+ }
+
+#ifdef QT_NO_WMSDK
+ Q_UNUSED(source);
+#else
+ if (m_headerInfo)
+ m_headerInfo->Release();
+
+ m_headerInfo = com_cast<IWMHeaderInfo>(source, IID_IWMHeaderInfo);
+#endif
+ // DirectShowMediaPlayerService holds a lock at this point so defer emitting signals to a later
+ // time.
+ QCoreApplication::postEvent(this, new QEvent(QEvent::Type(MetaDataChanged)));
+}
+
+void DirectShowMetaDataControl::customEvent(QEvent *event)
+{
+ if (event->type() == QEvent::Type(MetaDataChanged)) {
+ event->accept();
+
+ emit metaDataChanged();
+#ifndef QT_NO_WMSDK
+ emit metaDataAvailableChanged(m_content || m_headerInfo);
+#else
+ emit metaDataAvailableChanged(m_content);
+#endif
+ } else {
+ QMetaDataControl::customEvent(event);
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowmetadatacontrol.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowmetadatacontrol.h
new file mode 100644
index 0000000000..9a81ba842a
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowmetadatacontrol.h
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIRECTSHOWMETADATACONTROL_H
+#define DIRECTSHOWMETADATACONTROL_H
+
+#include "directshowglobal.h"
+
+#include <QtMultimedia/qmetadatacontrol.h>
+
+#include <qnetwork.h>
+
+#ifndef QT_NO_WMSDK
+#include <wmsdk.h>
+#endif
+
+#include <QtCore/qcoreevent.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class DirectShowPlayerService;
+
+
+class DirectShowMetaDataControl : public QMetaDataControl
+{
+ Q_OBJECT
+public:
+ DirectShowMetaDataControl(QObject *parent = 0);
+ ~DirectShowMetaDataControl();
+
+ bool isWritable() const;
+ bool isMetaDataAvailable() const;
+
+ QVariant metaData(QtMultimedia::MetaData key) const;
+ void setMetaData(QtMultimedia::MetaData key, const QVariant &value);
+ QList<QtMultimedia::MetaData> availableMetaData() const;
+
+ QVariant extendedMetaData(const QString &key) const;
+ void setExtendedMetaData(const QString &key, const QVariant &value);
+ QStringList availableExtendedMetaData() const;
+
+ void updateGraph(IFilterGraph2 *graph, IBaseFilter *source);
+
+protected:
+ void customEvent(QEvent *event);
+
+private:
+ enum Event
+ {
+ MetaDataChanged = QEvent::User
+ };
+
+ IAMMediaContent *m_content;
+#ifndef QT_NO_WMSDK
+ IWMHeaderInfo *m_headerInfo;
+#endif
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowpinenum.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowpinenum.cpp
new file mode 100644
index 0000000000..19f65da1ce
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowpinenum.cpp
@@ -0,0 +1,140 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "directshowpinenum.h"
+
+#include <QtMultimedia>
+
+
+QT_BEGIN_NAMESPACE
+
+DirectShowPinEnum::DirectShowPinEnum(const QList<IPin *> &pins)
+ : m_ref(1)
+ , m_pins(pins)
+ , m_index(0)
+{
+ foreach (IPin *pin, m_pins)
+ pin->AddRef();
+}
+
+DirectShowPinEnum::~DirectShowPinEnum()
+{
+ foreach (IPin *pin, m_pins)
+ pin->Release();
+}
+
+HRESULT DirectShowPinEnum::QueryInterface(REFIID riid, void **ppvObject)
+{
+ if (riid == IID_IUnknown
+ || riid == IID_IEnumPins) {
+ AddRef();
+
+ *ppvObject = static_cast<IEnumPins *>(this);
+
+ return S_OK;
+ } else {
+ *ppvObject = 0;
+
+ return E_NOINTERFACE;
+ }
+}
+
+ULONG DirectShowPinEnum::AddRef()
+{
+ return InterlockedIncrement(&m_ref);
+}
+
+ULONG DirectShowPinEnum::Release()
+{
+ ULONG ref = InterlockedDecrement(&m_ref);
+
+ if (ref == 0) {
+ delete this;
+ }
+
+ return ref;
+}
+
+HRESULT DirectShowPinEnum::Next(ULONG cPins, IPin **ppPins, ULONG *pcFetched)
+{
+ if (ppPins && (pcFetched || cPins == 1)) {
+ ULONG count = qBound<ULONG>(0, cPins, m_pins.count() - m_index);
+
+ for (ULONG i = 0; i < count; ++i, ++m_index) {
+ ppPins[i] = m_pins.at(m_index);
+ ppPins[i]->AddRef();
+ }
+
+ if (pcFetched)
+ *pcFetched = count;
+
+ return count == cPins ? S_OK : S_FALSE;
+ } else {
+ return E_POINTER;
+ }
+}
+
+HRESULT DirectShowPinEnum::Skip(ULONG cPins)
+{
+ m_index = qMin(int(m_index + cPins), m_pins.count());
+
+ return m_index < m_pins.count() ? S_OK : S_FALSE;
+}
+
+HRESULT DirectShowPinEnum::Reset()
+{
+ m_index = 0;
+
+ return S_OK;
+}
+
+HRESULT DirectShowPinEnum::Clone(IEnumPins **ppEnum)
+{
+ if (ppEnum) {
+ *ppEnum = new DirectShowPinEnum(m_pins);
+
+ return S_OK;
+ } else {
+ return E_POINTER;
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowpinenum.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowpinenum.h
new file mode 100644
index 0000000000..40d99eaa21
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowpinenum.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIRECTSHOWPINENUM_H
+#define DIRECTSHOWPINENUM_H
+
+#include <QtCore/qlist.h>
+
+#include <dshow.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class DirectShowPinEnum : public IEnumPins
+{
+public:
+ DirectShowPinEnum(const QList<IPin *> &pins);
+ ~DirectShowPinEnum();
+
+ // IUnknown
+ HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
+ ULONG STDMETHODCALLTYPE AddRef();
+ ULONG STDMETHODCALLTYPE Release();
+
+ // IEnumPins
+ HRESULT STDMETHODCALLTYPE Next(ULONG cPins, IPin **ppPins, ULONG *pcFetched);
+ HRESULT STDMETHODCALLTYPE Skip(ULONG cPins);
+ HRESULT STDMETHODCALLTYPE Reset();
+ HRESULT STDMETHODCALLTYPE Clone(IEnumPins **ppEnum);
+
+private:
+ LONG m_ref;
+ QList<IPin *> m_pins;
+ int m_index;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowplayercontrol.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowplayercontrol.cpp
new file mode 100644
index 0000000000..bb7bac3429
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowplayercontrol.cpp
@@ -0,0 +1,395 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "directshowplayercontrol.h"
+
+#include "directshowplayerservice.h"
+
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qmath.h>
+
+
+QT_BEGIN_NAMESPACE
+
+static int volumeToDecibels(int volume)
+{
+ if (volume == 0) {
+ return -10000;
+ } else if (volume == 100) {
+ return 0;
+#ifdef QT_USE_MATH_H_FLOATS
+ } else if (sizeof(qreal) == sizeof(float)) {
+ return qRound(::log10f(float(volume) / 100) * 5000);
+#endif
+ } else {
+ return qRound(::log10(qreal(volume) / 100) * 5000);
+ }
+}
+
+static int decibelsToVolume(int dB)
+{
+ if (dB == -10000) {
+ return 0;
+ } else if (dB == 0) {
+ return 100;
+ } else {
+ return qRound(100 * qPow(10, qreal(dB) / 5000));
+ }
+}
+
+DirectShowPlayerControl::DirectShowPlayerControl(DirectShowPlayerService *service, QObject *parent)
+ : QMediaPlayerControl(parent)
+ , m_service(service)
+ , m_audio(0)
+ , m_updateProperties(0)
+ , m_state(QMediaPlayer::StoppedState)
+ , m_status(QMediaPlayer::UnknownMediaStatus)
+ , m_error(QMediaPlayer::NoError)
+ , m_streamTypes(0)
+ , m_muteVolume(-1)
+ , m_position(0)
+ , m_duration(0)
+ , m_playbackRate(0)
+ , m_seekable(false)
+{
+}
+
+DirectShowPlayerControl::~DirectShowPlayerControl()
+{
+ if (m_audio)
+ m_audio->Release();
+}
+
+QMediaPlayer::State DirectShowPlayerControl::state() const
+{
+ return m_state;
+}
+
+QMediaPlayer::MediaStatus DirectShowPlayerControl::mediaStatus() const
+{
+ return m_status;
+}
+
+qint64 DirectShowPlayerControl::duration() const
+{
+ return m_duration;
+}
+
+qint64 DirectShowPlayerControl::position() const
+{
+ return const_cast<qint64 &>(m_position) = m_service->position();
+}
+
+void DirectShowPlayerControl::setPosition(qint64 position)
+{
+ m_service->seek(position);
+}
+
+int DirectShowPlayerControl::volume() const
+{
+ if (m_muteVolume >= 0) {
+ return m_muteVolume;
+ } else if (m_audio) {
+ long dB = 0;
+
+ m_audio->get_Volume(&dB);
+
+ return decibelsToVolume(dB);
+ } else {
+ return 0;
+ }
+}
+
+void DirectShowPlayerControl::setVolume(int volume)
+{
+ int boundedVolume = qBound(0, volume, 100);
+
+ if (m_muteVolume >= 0) {
+ m_muteVolume = boundedVolume;
+
+ emit volumeChanged(m_muteVolume);
+ } else if (m_audio) {
+ m_audio->put_Volume(volumeToDecibels(volume));
+
+ emit volumeChanged(boundedVolume);
+ }
+}
+
+bool DirectShowPlayerControl::isMuted() const
+{
+ return m_muteVolume >= 0;
+}
+
+void DirectShowPlayerControl::setMuted(bool muted)
+{
+ if (muted && m_muteVolume < 0) {
+ if (m_audio) {
+ long dB = 0;
+
+ m_audio->get_Volume(&dB);
+
+ m_muteVolume = decibelsToVolume(dB);
+
+ m_audio->put_Volume(-10000);
+ } else {
+ m_muteVolume = 0;
+ }
+
+ emit mutedChanged(muted);
+ } else if (!muted && m_muteVolume >= 0) {
+ if (m_audio) {
+ m_audio->put_Volume(volumeToDecibels(m_muteVolume));
+ }
+ m_muteVolume = -1;
+
+ emit mutedChanged(muted);
+ }
+}
+
+int DirectShowPlayerControl::bufferStatus() const
+{
+ return m_service->bufferStatus();
+}
+
+bool DirectShowPlayerControl::isAudioAvailable() const
+{
+ return m_streamTypes & DirectShowPlayerService::AudioStream;
+}
+
+bool DirectShowPlayerControl::isVideoAvailable() const
+{
+ return m_streamTypes & DirectShowPlayerService::VideoStream;
+}
+
+bool DirectShowPlayerControl::isSeekable() const
+{
+ return m_seekable;
+}
+
+QMediaTimeRange DirectShowPlayerControl::availablePlaybackRanges() const
+{
+ return m_service->availablePlaybackRanges();
+}
+
+qreal DirectShowPlayerControl::playbackRate() const
+{
+ return m_playbackRate;
+}
+
+void DirectShowPlayerControl::setPlaybackRate(qreal rate)
+{
+ if (m_playbackRate != rate) {
+ m_service->setRate(rate);
+
+ emit playbackRateChanged(m_playbackRate = rate);
+ }
+}
+
+QMediaContent DirectShowPlayerControl::media() const
+{
+ return m_media;
+}
+
+const QIODevice *DirectShowPlayerControl::mediaStream() const
+{
+ return m_stream;
+}
+
+void DirectShowPlayerControl::setMedia(const QMediaContent &media, QIODevice *stream)
+{
+ m_media = media;
+ m_stream = stream;
+
+ m_updateProperties &= PlaybackRateProperty;
+
+ m_service->load(media, stream);
+
+ emitPropertyChanges();
+}
+
+void DirectShowPlayerControl::play()
+{
+ m_service->play();
+ emit stateChanged(m_state = QMediaPlayer::PlayingState);
+}
+
+void DirectShowPlayerControl::pause()
+{
+ m_service->pause();
+ emit stateChanged(m_state = QMediaPlayer::PausedState);
+}
+
+void DirectShowPlayerControl::stop()
+{
+ m_service->stop();
+ emit stateChanged(m_state = QMediaPlayer::StoppedState);
+}
+
+void DirectShowPlayerControl::customEvent(QEvent *event)
+{
+ if (event->type() == QEvent::Type(PropertiesChanged)) {
+ emitPropertyChanges();
+
+ event->accept();
+ } else {
+ QMediaPlayerControl::customEvent(event);
+ }
+}
+
+void DirectShowPlayerControl::emitPropertyChanges()
+{
+ int properties = m_updateProperties;
+ m_updateProperties = 0;
+
+ if ((properties & ErrorProperty) && m_error != QMediaPlayer::NoError)
+ emit error(m_error, m_errorString);
+
+ if (properties & PlaybackRateProperty)
+ emit playbackRateChanged(m_playbackRate);
+
+ if (properties & StreamTypesProperty) {
+ emit audioAvailableChanged(m_streamTypes & DirectShowPlayerService::AudioStream);
+ emit videoAvailableChanged(m_streamTypes & DirectShowPlayerService::VideoStream);
+ }
+
+ if (properties & PositionProperty)
+ emit positionChanged(m_position);
+
+ if (properties & DurationProperty)
+ emit durationChanged(m_duration);
+
+ if (properties & SeekableProperty)
+ emit seekableChanged(m_seekable);
+
+ if (properties & StatusProperty)
+ emit mediaStatusChanged(m_status);
+
+ if (properties & StateProperty)
+ emit stateChanged(m_state);
+}
+
+void DirectShowPlayerControl::scheduleUpdate(int properties)
+{
+ if (m_updateProperties == 0)
+ QCoreApplication::postEvent(this, new QEvent(QEvent::Type(PropertiesChanged)));
+
+ m_updateProperties |= properties;
+}
+
+void DirectShowPlayerControl::updateState(QMediaPlayer::State state)
+{
+ if (m_state != state) {
+ m_state = state;
+
+ scheduleUpdate(StateProperty);
+ }
+}
+
+void DirectShowPlayerControl::updateStatus(QMediaPlayer::MediaStatus status)
+{
+ if (m_status != status) {
+ m_status = status;
+
+ scheduleUpdate(StatusProperty);
+ }
+}
+
+void DirectShowPlayerControl::updateMediaInfo(qint64 duration, int streamTypes, bool seekable)
+{
+ int properties = 0;
+
+ if (m_duration != duration) {
+ m_duration = duration;
+
+ properties |= DurationProperty;
+ }
+ if (m_streamTypes != streamTypes) {
+ m_streamTypes = streamTypes;
+
+ properties |= StreamTypesProperty;
+ }
+
+ if (m_seekable != seekable) {
+ m_seekable = seekable;
+
+ properties |= SeekableProperty;
+ }
+
+ if (properties != 0)
+ scheduleUpdate(properties);
+}
+
+void DirectShowPlayerControl::updatePlaybackRate(qreal rate)
+{
+ if (m_playbackRate != rate) {
+ m_playbackRate = rate;
+
+ scheduleUpdate(PlaybackRateProperty);
+ }
+}
+
+void DirectShowPlayerControl::updateAudioOutput(IBaseFilter *filter)
+{
+ if (m_audio)
+ m_audio->Release();
+
+ m_audio = com_cast<IBasicAudio>(filter, IID_IBasicAudio);
+}
+
+void DirectShowPlayerControl::updateError(QMediaPlayer::Error error, const QString &errorString)
+{
+ m_error = error;
+ m_errorString = errorString;
+
+ if (m_error != QMediaPlayer::NoError)
+ scheduleUpdate(ErrorProperty);
+}
+
+void DirectShowPlayerControl::updatePosition(qint64 position)
+{
+ if (m_position != position) {
+ m_position = position;
+
+ scheduleUpdate(PositionProperty);
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowplayercontrol.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowplayercontrol.h
new file mode 100644
index 0000000000..dd25d3046e
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowplayercontrol.h
@@ -0,0 +1,153 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIRECTSHOWPLAYERCONTROL_H
+#define DIRECTSHOWPLAYERCONTROL_H
+
+#include <QtMultimedia/qmediacontent.h>
+#include <QtMultimedia/qmediaplayercontrol.h>
+
+#include <QtCore/qcoreevent.h>
+
+#include "directshowplayerservice.h"
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class DirectShowPlayerControl : public QMediaPlayerControl
+{
+ Q_OBJECT
+public:
+ DirectShowPlayerControl(DirectShowPlayerService *service, QObject *parent = 0);
+ ~DirectShowPlayerControl();
+
+ QMediaPlayer::State state() const;
+
+ QMediaPlayer::MediaStatus mediaStatus() const;
+
+ qint64 duration() const;
+
+ qint64 position() const;
+ void setPosition(qint64 position);
+
+ int volume() const;
+ void setVolume(int volume);
+
+ bool isMuted() const;
+ void setMuted(bool muted);
+
+ int bufferStatus() const;
+
+ bool isAudioAvailable() const;
+ bool isVideoAvailable() const;
+
+ bool isSeekable() const;
+
+ QMediaTimeRange availablePlaybackRanges() const;
+
+ qreal playbackRate() const;
+ void setPlaybackRate(qreal rate);
+
+ QMediaContent media() const;
+ const QIODevice *mediaStream() const;
+ void setMedia(const QMediaContent &media, QIODevice *stream);
+
+ void play();
+ void pause();
+ void stop();
+
+ void updateState(QMediaPlayer::State state);
+ void updateStatus(QMediaPlayer::MediaStatus status);
+ void updateMediaInfo(qint64 duration, int streamTypes, bool seekable);
+ void updatePlaybackRate(qreal rate);
+ void updateAudioOutput(IBaseFilter *filter);
+ void updateError(QMediaPlayer::Error error, const QString &errorString);
+ void updatePosition(qint64 position);
+
+protected:
+ void customEvent(QEvent *event);
+
+private:
+ enum Properties
+ {
+ StateProperty = 0x01,
+ StatusProperty = 0x02,
+ StreamTypesProperty = 0x04,
+ DurationProperty = 0x08,
+ PlaybackRateProperty = 0x10,
+ SeekableProperty = 0x20,
+ ErrorProperty = 0x40,
+ PositionProperty = 0x80
+ };
+
+ enum Event
+ {
+ PropertiesChanged = QEvent::User
+ };
+
+ void scheduleUpdate(int properties);
+ void emitPropertyChanges();
+
+ DirectShowPlayerService *m_service;
+ IBasicAudio *m_audio;
+ QIODevice *m_stream;
+ int m_updateProperties;
+ QMediaPlayer::State m_state;
+ QMediaPlayer::MediaStatus m_status;
+ QMediaPlayer::Error m_error;
+ int m_streamTypes;
+ int m_muteVolume;
+ qint64 m_position;
+ qint64 m_duration;
+ qreal m_playbackRate;
+ bool m_seekable;
+ QMediaContent m_media;
+ QString m_errorString;
+
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.cpp
new file mode 100644
index 0000000000..317fa5c439
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.cpp
@@ -0,0 +1,1372 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "directshowplayerservice.h"
+
+#include "directshowaudioendpointcontrol.h"
+#include "directshowiosource.h"
+#include "directshowmetadatacontrol.h"
+#include "directshowplayercontrol.h"
+#include "directshowvideooutputcontrol.h"
+#include "directshowvideorenderercontrol.h"
+#include "vmr9videowindowcontrol.h"
+
+#include <QtMultimedia/qmediacontent.h>
+
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qdatetime.h>
+#include <QtCore/qthread.h>
+#include <QtCore/qvarlengtharray.h>
+
+Q_GLOBAL_STATIC(DirectShowEventLoop, qt_directShowEventLoop)
+
+QT_BEGIN_NAMESPACE
+
+class DirectShowPlayerServiceThread : public QThread
+{
+public:
+ DirectShowPlayerServiceThread(DirectShowPlayerService *service)
+ : m_service(service)
+ {
+ }
+
+protected:
+ void run() { m_service->run(); }
+
+private:
+ DirectShowPlayerService *m_service;
+};
+
+DirectShowPlayerService::DirectShowPlayerService(QObject *parent)
+ : QMediaService(parent)
+ , m_playerControl(0)
+ , m_metaDataControl(0)
+ , m_videoOutputControl(0)
+ , m_videoRendererControl(0)
+ , m_videoWindowControl(0)
+ , m_audioEndpointControl(0)
+ , m_taskThread(0)
+ , m_loop(qt_directShowEventLoop())
+ , m_pendingTasks(0)
+ , m_executingTask(0)
+ , m_executedTasks(0)
+ , m_taskHandle(::CreateEvent(0, 0, 0, 0))
+ , m_eventHandle(0)
+ , m_graphStatus(NoMedia)
+ , m_stream(0)
+ , m_graph(0)
+ , m_source(0)
+ , m_audioOutput(0)
+ , m_videoOutput(0)
+ , m_rate(1.0)
+ , m_position(0)
+ , m_duration(0)
+ , m_buffering(false)
+ , m_seekable(false)
+ , m_atEnd(false)
+{
+ m_playerControl = new DirectShowPlayerControl(this);
+ m_metaDataControl = new DirectShowMetaDataControl(this);
+ m_videoOutputControl = new DirectShowVideoOutputControl;
+ m_audioEndpointControl = new DirectShowAudioEndpointControl(this);
+ m_videoRendererControl = new DirectShowVideoRendererControl(m_loop);
+ m_videoWindowControl = new Vmr9VideoWindowControl;
+
+ m_taskThread = new DirectShowPlayerServiceThread(this);
+ m_taskThread->start();
+
+ connect(m_videoOutputControl, SIGNAL(outputChanged()), this, SLOT(videoOutputChanged()));
+ connect(m_videoRendererControl, SIGNAL(filterChanged()), this, SLOT(videoOutputChanged()));
+}
+
+DirectShowPlayerService::~DirectShowPlayerService()
+{
+ {
+ QMutexLocker locker(&m_mutex);
+
+ releaseGraph();
+
+ m_pendingTasks = Shutdown;
+ ::SetEvent(m_taskHandle);
+ }
+
+ m_taskThread->wait();
+ delete m_taskThread;
+
+ if (m_audioOutput) {
+ m_audioOutput->Release();
+ m_audioOutput = 0;
+ }
+
+ if (m_videoOutput) {
+ m_videoOutput->Release();
+ m_videoOutput = 0;
+ }
+
+ delete m_playerControl;
+ delete m_audioEndpointControl;
+ delete m_metaDataControl;
+ delete m_videoOutputControl;
+ delete m_videoRendererControl;
+ delete m_videoWindowControl;
+
+ ::CloseHandle(m_taskHandle);
+}
+
+QMediaControl *DirectShowPlayerService::control(const char *name) const
+{
+ if (qstrcmp(name, QMediaPlayerControl_iid) == 0)
+ return m_playerControl;
+ else if (qstrcmp(name, QAudioEndpointSelector_iid) == 0)
+ return m_audioEndpointControl;
+ else if (qstrcmp(name, QMetaDataControl_iid) == 0)
+ return m_metaDataControl;
+ else if (qstrcmp(name, QVideoOutputControl_iid) == 0)
+ return m_videoOutputControl;
+ else if (qstrcmp(name, QVideoRendererControl_iid) == 0)
+ return m_videoRendererControl;
+ else if (qstrcmp(name, QVideoWindowControl_iid) == 0)
+ return m_videoWindowControl;
+ else
+ return 0;
+}
+
+void DirectShowPlayerService::load(const QMediaContent &media, QIODevice *stream)
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_pendingTasks = 0;
+
+ if (m_graph)
+ releaseGraph();
+
+ m_resources = media.resources();
+ m_stream = stream;
+ m_error = QMediaPlayer::NoError;
+ m_errorString = QString();
+ m_position = 0;
+ m_duration = 0;
+ m_streamTypes = 0;
+ m_executedTasks = 0;
+ m_buffering = false;
+ m_seekable = false;
+ m_atEnd = false;
+ m_metaDataControl->updateGraph(0, 0);
+
+ if (m_resources.isEmpty() && !stream) {
+ m_pendingTasks = 0;
+ m_graphStatus = NoMedia;
+
+ m_url.clear();
+ } else if (stream && (!stream->isReadable() || stream->isSequential())) {
+ m_pendingTasks = 0;
+ m_graphStatus = InvalidMedia;
+ m_error = QMediaPlayer::ResourceError;
+ } else {
+ // {36b73882-c2c8-11cf-8b46-00805f6cef60}
+ static const GUID iid_IFilterGraph2 = {
+ 0x36b73882, 0xc2c8, 0x11cf, {0x8b, 0x46, 0x00, 0x80, 0x5f, 0x6c, 0xef, 0x60} };
+ m_graphStatus = Loading;
+
+ m_graph = com_new<IFilterGraph2>(CLSID_FilterGraph, iid_IFilterGraph2);
+
+ if (stream)
+ m_pendingTasks = SetStreamSource;
+ else
+ m_pendingTasks = SetUrlSource;
+
+ ::SetEvent(m_taskHandle);
+ }
+
+ m_playerControl->updateError(m_error, m_errorString);
+ m_playerControl->updateMediaInfo(m_duration, m_streamTypes, m_seekable);
+ m_playerControl->updateState(QMediaPlayer::StoppedState);
+ m_playerControl->updatePosition(m_position);
+ updateStatus();
+}
+
+void DirectShowPlayerService::doSetUrlSource(QMutexLocker *locker)
+{
+ IBaseFilter *source = 0;
+
+ QMediaResource resource = m_resources.takeFirst();
+ QUrl url = resource.url();
+
+ HRESULT hr = E_FAIL;
+
+ if (url.scheme() == QLatin1String("http") || url.scheme() == QLatin1String("https")) {
+ static const GUID clsid_WMAsfReader = {
+ 0x187463a0, 0x5bb7, 0x11d3, {0xac, 0xbe, 0x00, 0x80, 0xc7, 0x5e, 0x24, 0x6e} };
+
+ // {56a868a6-0ad4-11ce-b03a-0020af0ba770}
+ static const GUID iid_IFileSourceFilter = {
+ 0x56a868a6, 0x0ad4, 0x11ce, {0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70} };
+
+ if (IFileSourceFilter *fileSource = com_new<IFileSourceFilter>(
+ clsid_WMAsfReader, iid_IFileSourceFilter)) {
+ locker->unlock();
+ hr = fileSource->Load(reinterpret_cast<const OLECHAR *>(url.toString().utf16()), 0);
+ locker->relock();
+
+ if (SUCCEEDED(hr)) {
+ source = com_cast<IBaseFilter>(fileSource, IID_IBaseFilter);
+
+ if (!SUCCEEDED(hr = m_graph->AddFilter(source, L"Source")) && source) {
+ source->Release();
+ source = 0;
+ }
+ }
+
+ fileSource->Release();
+ }
+ } else if (url.scheme() == QLatin1String("qrc")) {
+ DirectShowRcSource *rcSource = new DirectShowRcSource(m_loop);
+
+ if (rcSource->open(url) && SUCCEEDED(hr = m_graph->AddFilter(rcSource, L"Source")))
+ source = rcSource;
+ else
+ rcSource->Release();
+ }
+
+ if (!SUCCEEDED(hr)) {
+ locker->unlock();
+ hr = m_graph->AddSourceFilter(
+ reinterpret_cast<const OLECHAR *>(url.toString().utf16()), L"Source", &source);
+ locker->relock();
+ }
+
+ if (SUCCEEDED(hr)) {
+ m_executedTasks = SetSource;
+ m_pendingTasks |= Render;
+
+ if (m_audioOutput)
+ m_pendingTasks |= SetAudioOutput;
+ if (m_videoOutput)
+ m_pendingTasks |= SetVideoOutput;
+
+ if (m_rate != 1.0)
+ m_pendingTasks |= SetRate;
+
+ m_source = source;
+ } else if (!m_resources.isEmpty()) {
+ m_pendingTasks |= SetUrlSource;
+ } else {
+ m_pendingTasks = 0;
+ m_graphStatus = InvalidMedia;
+
+ switch (hr) {
+ case VFW_E_UNKNOWN_FILE_TYPE:
+ m_error = QMediaPlayer::FormatError;
+ m_errorString = QString();
+ break;
+ case E_OUTOFMEMORY:
+ case VFW_E_CANNOT_LOAD_SOURCE_FILTER:
+ case VFW_E_NOT_FOUND:
+ m_error = QMediaPlayer::ResourceError;
+ m_errorString = QString();
+ default:
+ m_error = QMediaPlayer::ResourceError;
+ m_errorString = QString();
+ qWarning("DirectShowPlayerService::doSetUrlSource: Unresolved error code %x", uint(hr));
+ break;
+ }
+
+ QCoreApplication::postEvent(this, new QEvent(QEvent::Type(Error)));
+ }
+}
+
+void DirectShowPlayerService::doSetStreamSource(QMutexLocker *locker)
+{
+ DirectShowIOSource *source = new DirectShowIOSource(m_loop);
+ source->setDevice(m_stream);
+
+ if (SUCCEEDED(m_graph->AddFilter(source, L"Source"))) {
+ m_executedTasks = SetSource;
+ m_pendingTasks |= Render;
+
+ if (m_audioOutput)
+ m_pendingTasks |= SetAudioOutput;
+ if (m_videoOutput)
+ m_pendingTasks |= SetVideoOutput;
+
+ if (m_rate != 1.0)
+ m_pendingTasks |= SetRate;
+
+ m_source = source;
+ } else {
+ source->Release();
+
+ m_pendingTasks = 0;
+ m_graphStatus = InvalidMedia;
+
+ m_error = QMediaPlayer::ResourceError;
+ m_errorString = QString();
+
+ QCoreApplication::postEvent(this, new QEvent(QEvent::Type(Error)));
+ }
+}
+
+void DirectShowPlayerService::doRender(QMutexLocker *locker)
+{
+ m_pendingTasks |= m_executedTasks & (Play | Pause);
+
+ if (IMediaControl *control = com_cast<IMediaControl>(m_graph, IID_IMediaControl)) {
+ control->Stop();
+ control->Release();
+ }
+
+ if (m_pendingTasks & SetAudioOutput) {
+ m_graph->AddFilter(m_audioOutput, L"AudioOutput");
+
+ m_pendingTasks ^= SetAudioOutput;
+ m_executedTasks |= SetAudioOutput;
+ }
+ if (m_pendingTasks & SetVideoOutput) {
+ m_graph->AddFilter(m_videoOutput, L"VideoOutput");
+
+ m_pendingTasks ^= SetVideoOutput;
+ m_executedTasks |= SetVideoOutput;
+ }
+
+ IFilterGraph2 *graph = m_graph;
+ graph->AddRef();
+
+ QVarLengthArray<IBaseFilter *, 16> filters;
+ m_source->AddRef();
+ filters.append(m_source);
+
+ bool rendered = false;
+
+ HRESULT renderHr = S_OK;
+
+ while (!filters.isEmpty()) {
+ IEnumPins *pins = 0;
+ IBaseFilter *filter = filters[filters.size() - 1];
+ filters.removeLast();
+
+ if (!(m_pendingTasks & ReleaseFilters) && SUCCEEDED(filter->EnumPins(&pins))) {
+ int outputs = 0;
+ for (IPin *pin = 0; pins->Next(1, &pin, 0) == S_OK; pin->Release()) {
+ PIN_DIRECTION direction;
+ if (pin->QueryDirection(&direction) == S_OK && direction == PINDIR_OUTPUT) {
+ ++outputs;
+
+ IPin *peer = 0;
+ if (pin->ConnectedTo(&peer) == S_OK) {
+ PIN_INFO peerInfo;
+ if (SUCCEEDED(peer->QueryPinInfo(&peerInfo)))
+ filters.append(peerInfo.pFilter);
+ peer->Release();
+ } else {
+ locker->unlock();
+ HRESULT hr;
+ if (SUCCEEDED(hr = graph->RenderEx(
+ pin, /*AM_RENDEREX_RENDERTOEXISTINGRENDERERS*/ 1, 0))) {
+ rendered = true;
+ } else if (renderHr == S_OK || renderHr == VFW_E_NO_DECOMPRESSOR){
+ renderHr = hr;
+ }
+ locker->relock();
+ }
+ }
+ }
+
+ pins->Release();
+
+ if (outputs == 0)
+ rendered = true;
+ }
+ filter->Release();
+ }
+
+ if (m_audioOutput && !isConnected(m_audioOutput, PINDIR_INPUT)) {
+ graph->RemoveFilter(m_audioOutput);
+
+ m_executedTasks &= ~SetAudioOutput;
+ }
+
+ if (m_videoOutput && !isConnected(m_videoOutput, PINDIR_INPUT)) {
+ graph->RemoveFilter(m_videoOutput);
+
+ m_executedTasks &= ~SetVideoOutput;
+ }
+
+ graph->Release();
+
+ if (!(m_pendingTasks & ReleaseFilters)) {
+ if (rendered) {
+ if (!(m_executedTasks & FinalizeLoad))
+ m_pendingTasks |= FinalizeLoad;
+ } else {
+ m_pendingTasks = 0;
+
+ m_graphStatus = InvalidMedia;
+
+ if (!m_audioOutput && !m_videoOutput) {
+ m_error = QMediaPlayer::ResourceError;
+ m_errorString = QString();
+ } else {
+ switch (renderHr) {
+ case VFW_E_UNSUPPORTED_AUDIO:
+ case VFW_E_UNSUPPORTED_VIDEO:
+ case VFW_E_UNSUPPORTED_STREAM:
+ m_error = QMediaPlayer::FormatError;
+ m_errorString = QString();
+ default:
+ m_error = QMediaPlayer::ResourceError;
+ m_errorString = QString();
+ qWarning("DirectShowPlayerService::doRender: Unresolved error code %x",
+ uint(renderHr));
+ }
+ }
+
+ QCoreApplication::postEvent(this, new QEvent(QEvent::Type(Error)));
+ }
+
+ m_executedTasks |= Render;
+ }
+}
+
+void DirectShowPlayerService::doFinalizeLoad(QMutexLocker *locker)
+{
+ if (m_graphStatus != Loaded) {
+ if (IMediaEvent *event = com_cast<IMediaEvent>(m_graph, IID_IMediaEvent)) {
+ event->GetEventHandle(reinterpret_cast<OAEVENT *>(&m_eventHandle));
+ event->Release();
+ }
+ if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
+ LONGLONG duration = 0;
+ seeking->GetDuration(&duration);
+ m_duration = duration / 10;
+
+ DWORD capabilities = 0;
+ seeking->GetCapabilities(&capabilities);
+ m_seekable = capabilities & AM_SEEKING_CanSeekAbsolute;
+
+ seeking->Release();
+ }
+ }
+
+ if ((m_executedTasks & SetOutputs) == SetOutputs) {
+ m_streamTypes = AudioStream | VideoStream;
+ } else {
+ m_streamTypes = findStreamTypes(m_source);
+ }
+
+ m_executedTasks |= FinalizeLoad;
+
+ m_graphStatus = Loaded;
+
+ QCoreApplication::postEvent(this, new QEvent(QEvent::Type(FinalizedLoad)));
+}
+
+void DirectShowPlayerService::releaseGraph()
+{
+ if (m_graph) {
+ if (m_executingTask != 0) {
+ // {8E1C39A1-DE53-11cf-AA63-0080C744528D}
+ static const GUID iid_IAMOpenProgress = {
+ 0x8E1C39A1, 0xDE53, 0x11cf, {0xAA, 0x63, 0x00, 0x80, 0xC7, 0x44, 0x52, 0x8D} };
+
+ if (IAMOpenProgress *progress = com_cast<IAMOpenProgress>(
+ m_graph, iid_IAMOpenProgress)) {
+ progress->AbortOperation();
+ progress->Release();
+ }
+ m_graph->Abort();
+ }
+
+ m_pendingTasks = ReleaseGraph;
+
+ ::SetEvent(m_taskHandle);
+
+ m_loop->wait(&m_mutex);
+ }
+}
+
+void DirectShowPlayerService::doReleaseGraph(QMutexLocker *locker)
+{
+ Q_UNUSED(locker);
+
+ if (IMediaControl *control = com_cast<IMediaControl>(m_graph, IID_IMediaControl)) {
+ control->Stop();
+ control->Release();
+ }
+
+ if (m_source) {
+ m_source->Release();
+ m_source = 0;
+ }
+
+ m_eventHandle = 0;
+
+ m_graph->Release();
+ m_graph = 0;
+
+ m_loop->wake();
+}
+
+int DirectShowPlayerService::findStreamTypes(IBaseFilter *source) const
+{
+ QVarLengthArray<IBaseFilter *, 16> filters;
+ source->AddRef();
+ filters.append(source);
+
+ int streamTypes = 0;
+
+ while (!filters.isEmpty()) {
+ IEnumPins *pins = 0;
+ IBaseFilter *filter = filters[filters.size() - 1];
+ filters.removeLast();
+
+ if (SUCCEEDED(filter->EnumPins(&pins))) {
+ for (IPin *pin = 0; pins->Next(1, &pin, 0) == S_OK; pin->Release()) {
+ PIN_DIRECTION direction;
+ if (pin->QueryDirection(&direction) == S_OK && direction == PINDIR_OUTPUT) {
+ AM_MEDIA_TYPE connectionType;
+ if (SUCCEEDED(pin->ConnectionMediaType(&connectionType))) {
+ IPin *peer = 0;
+
+ if (connectionType.majortype == MEDIATYPE_Audio) {
+ streamTypes |= AudioStream;
+ } else if (connectionType.majortype == MEDIATYPE_Video) {
+ streamTypes |= VideoStream;
+ } else if (SUCCEEDED(pin->ConnectedTo(&peer))) {
+ PIN_INFO peerInfo;
+ if (SUCCEEDED(peer->QueryPinInfo(&peerInfo)))
+ filters.append(peerInfo.pFilter);
+ peer->Release();
+ }
+ } else {
+ streamTypes |= findStreamType(pin);
+ }
+ }
+ }
+ }
+ filter->Release();
+ }
+ return streamTypes;
+}
+
+int DirectShowPlayerService::findStreamType(IPin *pin) const
+{
+ IEnumMediaTypes *types;
+
+ if (SUCCEEDED(pin->EnumMediaTypes(&types))) {
+ bool video = false;
+ bool audio = false;
+ bool other = false;
+
+ for (AM_MEDIA_TYPE *type = 0;
+ types->Next(1, &type, 0) == S_OK;
+ DirectShowMediaType::deleteType(type)) {
+ if (type->majortype == MEDIATYPE_Audio)
+ audio = true;
+ else if (type->majortype == MEDIATYPE_Video)
+ video = true;
+ else
+ other = true;
+ }
+ types->Release();
+
+ if (other)
+ return 0;
+ else if (audio && !video)
+ return AudioStream;
+ else if (!audio && video)
+ return VideoStream;
+ else
+ return 0;
+ } else {
+ return 0;
+ }
+}
+
+void DirectShowPlayerService::play()
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_pendingTasks &= ~Pause;
+ m_pendingTasks |= Play;
+
+ if (m_executedTasks & Render) {
+ if (m_executedTasks & Stop) {
+ m_atEnd = false;
+ m_position = 0;
+ m_pendingTasks |= Seek;
+ m_executedTasks ^= Stop;
+ }
+
+ ::SetEvent(m_taskHandle);
+ }
+}
+
+void DirectShowPlayerService::doPlay(QMutexLocker *locker)
+{
+ if (IMediaControl *control = com_cast<IMediaControl>(m_graph, IID_IMediaControl)) {
+ locker->unlock();
+ HRESULT hr = control->Run();
+ locker->relock();
+
+ control->Release();
+
+ if (SUCCEEDED(hr)) {
+ m_executedTasks |= Play;
+
+ QCoreApplication::postEvent(this, new QEvent(QEvent::Type(StatusChange)));
+ } else {
+ m_error = QMediaPlayer::ResourceError;
+ m_errorString = QString();
+ qWarning("DirectShowPlayerService::doPlay: Unresolved error code %x", uint(hr));
+
+ QCoreApplication::postEvent(this, new QEvent(QEvent::Type(Error)));
+ }
+ }
+}
+
+void DirectShowPlayerService::pause()
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_pendingTasks &= ~Play;
+ m_pendingTasks |= Pause;
+
+ if (m_executedTasks & Render) {
+ if (m_executedTasks & Stop) {
+ m_atEnd = false;
+ m_position = 0;
+ m_pendingTasks |= Seek;
+ m_executedTasks ^= Stop;
+ }
+
+ ::SetEvent(m_taskHandle);
+ }
+}
+
+void DirectShowPlayerService::doPause(QMutexLocker *locker)
+{
+ if (IMediaControl *control = com_cast<IMediaControl>(m_graph, IID_IMediaControl)) {
+ locker->unlock();
+ HRESULT hr = control->Pause();
+ locker->relock();
+
+ control->Release();
+
+ if (SUCCEEDED(hr)) {
+ if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
+ LONGLONG position = 0;
+
+ seeking->GetCurrentPosition(&position);
+ seeking->Release();
+
+ m_position = position / 10;
+ } else {
+ m_position = 0;
+ }
+
+ m_executedTasks |= Pause;
+
+ QCoreApplication::postEvent(this, new QEvent(QEvent::Type(StatusChange)));
+ } else {
+ m_error = QMediaPlayer::ResourceError;
+ m_errorString = QString();
+ qWarning("DirectShowPlayerService::doPause: Unresolved error code %x", uint(hr));
+
+ QCoreApplication::postEvent(this, new QEvent(QEvent::Type(Error)));
+ }
+ }
+}
+
+void DirectShowPlayerService::stop()
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_pendingTasks &= ~(Play | Pause | Seek);
+
+ if ((m_executingTask | m_executedTasks) & (Play | Pause | Seek)) {
+ m_pendingTasks |= Stop;
+
+ ::SetEvent(m_taskHandle);
+
+ m_loop->wait(&m_mutex);
+ }
+
+}
+
+void DirectShowPlayerService::doStop(QMutexLocker *locker)
+{
+ if (m_executedTasks & (Play | Pause)) {
+ if (IMediaControl *control = com_cast<IMediaControl>(m_graph, IID_IMediaControl)) {
+ control->Stop();
+ control->Release();
+ }
+
+ if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
+ LONGLONG position = 0;
+
+ seeking->GetCurrentPosition(&position);
+ seeking->Release();
+
+ m_position = position / 10;
+ } else {
+ m_position = 0;
+ }
+
+ m_executedTasks &= ~(Play | Pause);
+
+ QCoreApplication::postEvent(this, new QEvent(QEvent::Type(StatusChange)));
+ }
+
+ m_executedTasks |= Stop;
+
+ m_loop->wake();
+}
+
+void DirectShowPlayerService::setRate(qreal rate)
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_rate = rate;
+
+ m_pendingTasks |= SetRate;
+
+ if (m_executedTasks & FinalizeLoad)
+ ::SetEvent(m_taskHandle);
+}
+
+void DirectShowPlayerService::doSetRate(QMutexLocker *locker)
+{
+ if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
+ // Cache current values as we can't query IMediaSeeking during a seek due to the
+ // possibility of a deadlock when flushing the VideoSurfaceFilter.
+ LONGLONG currentPosition = 0;
+ seeking->GetCurrentPosition(&currentPosition);
+ m_position = currentPosition / 10;
+
+ LONGLONG minimum = 0;
+ LONGLONG maximum = 0;
+ m_playbackRange = SUCCEEDED(seeking->GetAvailable(&minimum, &maximum))
+ ? QMediaTimeRange(minimum / 10, maximum / 10)
+ : QMediaTimeRange();
+
+ locker->unlock();
+ HRESULT hr = seeking->SetRate(m_rate);
+ locker->relock();
+
+ if (!SUCCEEDED(hr)) {
+ double rate = 0.0;
+ m_rate = seeking->GetRate(&rate)
+ ? rate
+ : 1.0;
+ }
+
+ seeking->Release();
+ } else if (m_rate != 1.0) {
+ m_rate = 1.0;
+ }
+ QCoreApplication::postEvent(this, new QEvent(QEvent::Type(RateChange)));
+}
+
+qint64 DirectShowPlayerService::position() const
+{
+ QMutexLocker locker(const_cast<QMutex *>(&m_mutex));
+
+ if (m_graphStatus == Loaded) {
+ if (m_executingTask == Seek || m_executingTask == SetRate) {
+ return m_position;
+ } else if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
+ LONGLONG position = 0;
+
+ seeking->GetCurrentPosition(&position);
+ seeking->Release();
+
+ const_cast<qint64 &>(m_position) = position / 10;
+
+ return m_position;
+ }
+ }
+ return 0;
+}
+
+QMediaTimeRange DirectShowPlayerService::availablePlaybackRanges() const
+{
+ QMutexLocker locker(const_cast<QMutex *>(&m_mutex));
+
+ if (m_graphStatus == Loaded) {
+ if (m_executingTask == Seek || m_executingTask == SetRate) {
+ return m_playbackRange;
+ } else if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
+ LONGLONG minimum = 0;
+ LONGLONG maximum = 0;
+
+ HRESULT hr = seeking->GetAvailable(&minimum, &maximum);
+ seeking->Release();
+
+ if (SUCCEEDED(hr))
+ return QMediaTimeRange(minimum, maximum);
+ }
+ }
+ return QMediaTimeRange();
+}
+
+void DirectShowPlayerService::seek(qint64 position)
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_position = position;
+
+ m_pendingTasks |= Seek;
+
+ if (m_executedTasks & FinalizeLoad)
+ ::SetEvent(m_taskHandle);
+}
+
+void DirectShowPlayerService::doSeek(QMutexLocker *locker)
+{
+ if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
+ LONGLONG seekPosition = LONGLONG(m_position) * 10;
+
+ // Cache current values as we can't query IMediaSeeking during a seek due to the
+ // possibility of a deadlock when flushing the VideoSurfaceFilter.
+ LONGLONG currentPosition = 0;
+ seeking->GetCurrentPosition(&currentPosition);
+ m_position = currentPosition / 10;
+
+ LONGLONG minimum = 0;
+ LONGLONG maximum = 0;
+ m_playbackRange = SUCCEEDED(seeking->GetAvailable(&minimum, &maximum))
+ ? QMediaTimeRange(minimum / 10, maximum / 10)
+ : QMediaTimeRange();
+
+ locker->unlock();
+ seeking->SetPositions(
+ &seekPosition, AM_SEEKING_AbsolutePositioning, 0, AM_SEEKING_NoPositioning);
+ locker->relock();
+
+ seeking->GetCurrentPosition(&currentPosition);
+ m_position = currentPosition / 10;
+
+ seeking->Release();
+ } else {
+ m_position = 0;
+ }
+
+ QCoreApplication::postEvent(this, new QEvent(QEvent::Type(PositionChange)));
+}
+
+int DirectShowPlayerService::bufferStatus() const
+{
+#ifndef QT_NO_WMSDK
+ QMutexLocker locker(const_cast<QMutex *>(&m_mutex));
+
+ if (IWMReaderAdvanced2 *reader = com_cast<IWMReaderAdvanced2>(
+ m_source, IID_IWMReaderAdvanced2)) {
+ DWORD percentage = 0;
+
+ reader->GetBufferProgress(&percentage, 0);
+ reader->Release();
+
+ return percentage;
+ } else {
+ return 0;
+ }
+#else
+ return 0;
+#endif
+}
+
+void DirectShowPlayerService::setAudioOutput(IBaseFilter *filter)
+{
+ QMutexLocker locker(&m_mutex);
+
+ if (m_graph) {
+ if (m_audioOutput) {
+ if (m_executedTasks & SetAudioOutput) {
+ m_pendingTasks |= ReleaseAudioOutput;
+
+ ::SetEvent(m_taskHandle);
+
+ m_loop->wait(&m_mutex);
+ }
+ m_audioOutput->Release();
+ }
+
+ m_audioOutput = filter;
+
+ if (m_audioOutput) {
+ m_audioOutput->AddRef();
+
+ m_pendingTasks |= SetAudioOutput;
+
+ if (m_executedTasks & SetSource) {
+ m_pendingTasks |= Render;
+
+ ::SetEvent(m_taskHandle);
+ }
+ } else {
+ m_pendingTasks &= ~ SetAudioOutput;
+ }
+ } else {
+ if (m_audioOutput)
+ m_audioOutput->Release();
+
+ m_audioOutput = filter;
+
+ if (m_audioOutput)
+ m_audioOutput->AddRef();
+ }
+
+ m_playerControl->updateAudioOutput(m_audioOutput);
+}
+
+void DirectShowPlayerService::doReleaseAudioOutput(QMutexLocker *locker)
+{
+ m_pendingTasks |= m_executedTasks & (Play | Pause);
+
+ if (IMediaControl *control = com_cast<IMediaControl>(m_graph, IID_IMediaControl)) {
+ control->Stop();
+ control->Release();
+ }
+
+ IBaseFilter *decoder = getConnected(m_audioOutput, PINDIR_INPUT);
+ if (!decoder) {
+ decoder = m_audioOutput;
+ decoder->AddRef();
+ }
+
+ // {DCFBDCF6-0DC2-45f5-9AB2-7C330EA09C29}
+ static const GUID iid_IFilterChain = {
+ 0xDCFBDCF6, 0x0DC2, 0x45f5, {0x9A, 0xB2, 0x7C, 0x33, 0x0E, 0xA0, 0x9C, 0x29} };
+
+ if (IFilterChain *chain = com_cast<IFilterChain>(m_graph, iid_IFilterChain)) {
+ chain->RemoveChain(decoder, m_audioOutput);
+ chain->Release();
+ } else {
+ m_graph->RemoveFilter(m_audioOutput);
+ }
+
+ decoder->Release();
+
+ m_executedTasks &= ~SetAudioOutput;
+
+ m_loop->wake();
+}
+
+void DirectShowPlayerService::setVideoOutput(IBaseFilter *filter)
+{
+ QMutexLocker locker(&m_mutex);
+
+ if (m_graph) {
+ if (m_videoOutput) {
+ if (m_executedTasks & SetVideoOutput) {
+ m_pendingTasks |= ReleaseVideoOutput;
+
+ ::SetEvent(m_taskHandle);
+
+ m_loop->wait(&m_mutex);
+ }
+ m_videoOutput->Release();
+ }
+
+ m_videoOutput = filter;
+
+ if (m_videoOutput) {
+ m_videoOutput->AddRef();
+
+ m_pendingTasks |= SetVideoOutput;
+
+ if (m_executedTasks & SetSource) {
+ m_pendingTasks |= Render;
+
+ ::SetEvent(m_taskHandle);
+ }
+ }
+ } else {
+ if (m_videoOutput)
+ m_videoOutput->Release();
+
+ m_videoOutput = filter;
+
+ if (m_videoOutput)
+ m_videoOutput->AddRef();
+ }
+}
+
+void DirectShowPlayerService::doReleaseVideoOutput(QMutexLocker *locker)
+{
+ m_pendingTasks |= m_executedTasks & (Play | Pause);
+
+ if (IMediaControl *control = com_cast<IMediaControl>(m_graph, IID_IMediaControl)) {
+ control->Stop();
+ control->Release();
+ }
+
+ IBaseFilter *intermediate = 0;
+ if (!SUCCEEDED(m_graph->FindFilterByName(L"Color Space Converter", &intermediate))) {
+ intermediate = m_videoOutput;
+ intermediate->AddRef();
+ }
+
+ IBaseFilter *decoder = getConnected(intermediate, PINDIR_INPUT);
+ if (!decoder) {
+ decoder = intermediate;
+ decoder->AddRef();
+ }
+
+ // {DCFBDCF6-0DC2-45f5-9AB2-7C330EA09C29}
+ static const GUID iid_IFilterChain = {
+ 0xDCFBDCF6, 0x0DC2, 0x45f5, {0x9A, 0xB2, 0x7C, 0x33, 0x0E, 0xA0, 0x9C, 0x29} };
+
+ if (IFilterChain *chain = com_cast<IFilterChain>(m_graph, iid_IFilterChain)) {
+ chain->RemoveChain(decoder, m_videoOutput);
+ chain->Release();
+ } else {
+ m_graph->RemoveFilter(m_videoOutput);
+ }
+
+ intermediate->Release();
+ decoder->Release();
+
+ m_executedTasks &= ~SetVideoOutput;
+
+ m_loop->wake();
+}
+
+void DirectShowPlayerService::customEvent(QEvent *event)
+{
+ if (event->type() == QEvent::Type(FinalizedLoad)) {
+ QMutexLocker locker(&m_mutex);
+
+ m_playerControl->updateMediaInfo(m_duration, m_streamTypes, m_seekable);
+ m_metaDataControl->updateGraph(m_graph, m_source);
+
+ updateStatus();
+ } else if (event->type() == QEvent::Type(Error)) {
+ QMutexLocker locker(&m_mutex);
+
+ if (m_error != QMediaPlayer::NoError) {
+ m_playerControl->updateError(m_error, m_errorString);
+ m_playerControl->updateMediaInfo(m_duration, m_streamTypes, m_seekable);
+ m_playerControl->updateState(QMediaPlayer::StoppedState);
+ updateStatus();
+ }
+ } else if (event->type() == QEvent::Type(RateChange)) {
+ QMutexLocker locker(&m_mutex);
+
+ m_playerControl->updatePlaybackRate(m_rate);
+ } else if (event->type() == QEvent::Type(StatusChange)) {
+ QMutexLocker locker(&m_mutex);
+
+ updateStatus();
+ m_playerControl->updatePosition(m_position);
+ } else if (event->type() == QEvent::Type(DurationChange)) {
+ QMutexLocker locker(&m_mutex);
+
+ m_playerControl->updateMediaInfo(m_duration, m_streamTypes, m_seekable);
+ } else if (event->type() == QEvent::Type(EndOfMedia)) {
+ QMutexLocker locker(&m_mutex);
+
+ if (m_atEnd) {
+ m_playerControl->updateState(QMediaPlayer::StoppedState);
+ m_playerControl->updateStatus(QMediaPlayer::EndOfMedia);
+ m_playerControl->updatePosition(m_position);
+ }
+ } else if (event->type() == QEvent::Type(PositionChange)) {
+ QMutexLocker locker(&m_mutex);
+
+ m_playerControl->updatePosition(m_position);
+ } else {
+ QMediaService::customEvent(event);
+ }
+}
+
+void DirectShowPlayerService::videoOutputChanged()
+{
+ IBaseFilter *videoOutput = 0;
+
+ switch (m_videoOutputControl->output()) {
+ case QVideoOutputControl::RendererOutput:
+ videoOutput = m_videoRendererControl->filter();
+ break;
+ case QVideoOutputControl::WindowOutput:
+ videoOutput = m_videoWindowControl->filter();
+ break;
+ default:
+ break;
+ }
+
+ setVideoOutput(videoOutput);
+}
+
+void DirectShowPlayerService::graphEvent(QMutexLocker *locker)
+{
+ if (IMediaEvent *event = com_cast<IMediaEvent>(m_graph, IID_IMediaEvent)) {
+ long eventCode;
+ LONG_PTR param1;
+ LONG_PTR param2;
+
+ while (event->GetEvent(&eventCode, &param1, &param2, 0) == S_OK) {
+ switch (eventCode) {
+ case EC_BUFFERING_DATA:
+ m_buffering = param1;
+
+ QCoreApplication::postEvent(this, new QEvent(QEvent::Type(StatusChange)));
+ break;
+ case EC_COMPLETE:
+ m_executedTasks &= ~(Play | Pause);
+ m_executedTasks |= Stop;
+
+ m_buffering = false;
+ m_atEnd = true;
+
+ if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
+ LONGLONG position = 0;
+
+ seeking->GetCurrentPosition(&position);
+ seeking->Release();
+
+ m_position = position / 10;
+ }
+
+ QCoreApplication::postEvent(this, new QEvent(QEvent::Type(EndOfMedia)));
+ break;
+ case EC_LENGTH_CHANGED:
+ if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
+ LONGLONG duration = 0;
+ seeking->GetDuration(&duration);
+ m_duration = duration / 10;
+
+ DWORD capabilities = 0;
+ seeking->GetCapabilities(&capabilities);
+ m_seekable = capabilities & AM_SEEKING_CanSeekAbsolute;
+
+ seeking->Release();
+
+ QCoreApplication::postEvent(this, new QEvent(QEvent::Type(DurationChange)));
+ }
+ break;
+ default:
+ break;
+ }
+
+ event->FreeEventParams(eventCode, param1, param2);
+ }
+ event->Release();
+ }
+}
+
+void DirectShowPlayerService::updateStatus()
+{
+ switch (m_graphStatus) {
+ case NoMedia:
+ m_playerControl->updateStatus(QMediaPlayer::NoMedia);
+ break;
+ case Loading:
+ m_playerControl->updateStatus(QMediaPlayer::LoadingMedia);
+ break;
+ case Loaded:
+ if ((m_pendingTasks | m_executingTask | m_executedTasks) & (Play | Pause)) {
+ if (m_buffering)
+ m_playerControl->updateStatus(QMediaPlayer::BufferingMedia);
+ else
+ m_playerControl->updateStatus(QMediaPlayer::BufferedMedia);
+ } else {
+ m_playerControl->updateStatus(QMediaPlayer::LoadedMedia);
+ }
+ break;
+ case InvalidMedia:
+ m_playerControl->updateStatus(QMediaPlayer::InvalidMedia);
+ break;
+ default:
+ m_playerControl->updateStatus(QMediaPlayer::UnknownMediaStatus);
+ }
+}
+
+bool DirectShowPlayerService::isConnected(IBaseFilter *filter, PIN_DIRECTION direction) const
+{
+ bool connected = false;
+
+ IEnumPins *pins = 0;
+
+ if (SUCCEEDED(filter->EnumPins(&pins))) {
+ for (IPin *pin = 0; pins->Next(1, &pin, 0) == S_OK; pin->Release()) {
+ PIN_DIRECTION dir;
+ if (SUCCEEDED(pin->QueryDirection(&dir)) && dir == direction) {
+ IPin *peer = 0;
+ if (SUCCEEDED(pin->ConnectedTo(&peer))) {
+ connected = true;
+
+ peer->Release();
+ }
+ }
+ }
+ pins->Release();
+ }
+ return connected;
+}
+
+IBaseFilter *DirectShowPlayerService::getConnected(
+ IBaseFilter *filter, PIN_DIRECTION direction) const
+{
+ IBaseFilter *connected = 0;
+
+ IEnumPins *pins = 0;
+
+ if (SUCCEEDED(filter->EnumPins(&pins))) {
+ for (IPin *pin = 0; pins->Next(1, &pin, 0) == S_OK; pin->Release()) {
+ PIN_DIRECTION dir;
+ if (SUCCEEDED(pin->QueryDirection(&dir)) && dir == direction) {
+ IPin *peer = 0;
+ if (SUCCEEDED(pin->ConnectedTo(&peer))) {
+ PIN_INFO info;
+
+ if (SUCCEEDED(peer->QueryPinInfo(&info))) {
+ if (connected) {
+ qWarning("DirectShowPlayerService::getConnected: "
+ "Multiple connected filters");
+ connected->Release();
+ }
+ connected = info.pFilter;
+ }
+ peer->Release();
+ }
+ }
+ }
+ pins->Release();
+ }
+ return connected;
+}
+
+void DirectShowPlayerService::run()
+{
+ QMutexLocker locker(&m_mutex);
+
+ for (;;) {
+ ::ResetEvent(m_taskHandle);
+
+ while (m_pendingTasks == 0) {
+ DWORD result = 0;
+
+ locker.unlock();
+ if (m_eventHandle) {
+ HANDLE handles[] = { m_taskHandle, m_eventHandle };
+
+ result = ::WaitForMultipleObjects(2, handles, false, INFINITE);
+ } else {
+ result = ::WaitForSingleObject(m_taskHandle, INFINITE);
+ }
+ locker.relock();
+
+ if (result == WAIT_OBJECT_0 + 1) {
+ graphEvent(&locker);
+ }
+ }
+
+ if (m_pendingTasks & ReleaseGraph) {
+ m_pendingTasks ^= ReleaseGraph;
+ m_executingTask = ReleaseGraph;
+
+ doReleaseGraph(&locker);
+ } else if (m_pendingTasks & Shutdown) {
+ return;
+ } else if (m_pendingTasks & ReleaseAudioOutput) {
+ m_pendingTasks ^= ReleaseAudioOutput;
+ m_executingTask = ReleaseAudioOutput;
+
+ doReleaseAudioOutput(&locker);
+ } else if (m_pendingTasks & ReleaseVideoOutput) {
+ m_pendingTasks ^= ReleaseVideoOutput;
+ m_executingTask = ReleaseVideoOutput;
+
+ doReleaseVideoOutput(&locker);
+ } else if (m_pendingTasks & SetUrlSource) {
+ m_pendingTasks ^= SetUrlSource;
+ m_executingTask = SetUrlSource;
+
+ doSetUrlSource(&locker);
+ } else if (m_pendingTasks & SetStreamSource) {
+ m_pendingTasks ^= SetStreamSource;
+ m_executingTask = SetStreamSource;
+
+ doSetStreamSource(&locker);
+ } else if (m_pendingTasks & Render) {
+ m_pendingTasks ^= Render;
+ m_executingTask = Render;
+
+ doRender(&locker);
+ } else if (!(m_executedTasks & Render)) {
+ m_pendingTasks &= ~(FinalizeLoad | SetRate | Stop | Pause | Seek | Play);
+ } else if (m_pendingTasks & FinalizeLoad) {
+ m_pendingTasks ^= FinalizeLoad;
+ m_executingTask = FinalizeLoad;
+
+ doFinalizeLoad(&locker);
+ } else if (m_pendingTasks & Stop) {
+ m_pendingTasks ^= Stop;
+ m_executingTask = Stop;
+
+ doStop(&locker);
+ } else if (m_pendingTasks & SetRate) {
+ m_pendingTasks ^= SetRate;
+ m_executingTask = SetRate;
+
+ doSetRate(&locker);
+ } else if (m_pendingTasks & Pause) {
+ m_pendingTasks ^= Pause;
+ m_executingTask = Pause;
+
+ doPause(&locker);
+ } else if (m_pendingTasks & Seek) {
+ m_pendingTasks ^= Seek;
+ m_executingTask = Seek;
+
+ doSeek(&locker);
+ } else if (m_pendingTasks & Play) {
+ m_pendingTasks ^= Play;
+ m_executingTask = Play;
+
+ doPlay(&locker);
+ }
+ m_executingTask = 0;
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.h
new file mode 100644
index 0000000000..23515d0ede
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.h
@@ -0,0 +1,219 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIRECTSHOWPLAYERSERVICE_H
+#define DIRECTSHOWPLAYERSERVICE_H
+
+#include <QtMultimedia/qmediaplayer.h>
+#include <QtMultimedia/qmediaresource.h>
+#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/qmediatimerange.h>
+
+#include "directshoweventloop.h"
+#include "directshowglobal.h"
+
+#include <QtCore/qcoreevent.h>
+#include <QtCore/qmutex.h>
+#include <QtCore/qurl.h>
+#include <QtCore/qwaitcondition.h>
+
+#include <QtCore/private/qwineventnotifier_p.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class DirectShowAudioEndpointControl;
+class DirectShowMetaDataControl;
+class DirectShowPlayerControl;
+class DirectShowVideoOutputControl;
+class DirectShowVideoRendererControl;
+class Vmr9VideoWindowControl;
+
+class DirectShowPlayerService : public QMediaService
+{
+ Q_OBJECT
+public:
+ enum StreamType
+ {
+ AudioStream = 0x01,
+ VideoStream = 0x02
+ };
+
+ DirectShowPlayerService(QObject *parent = 0);
+ ~DirectShowPlayerService();
+
+ QMediaControl* control(const char *name) const;
+
+ void load(const QMediaContent &media, QIODevice *stream);
+ void play();
+ void pause();
+ void stop();
+
+ qint64 position() const;
+ QMediaTimeRange availablePlaybackRanges() const;
+
+ void seek(qint64 position);
+ void setRate(qreal rate);
+
+ int bufferStatus() const;
+
+ void setAudioOutput(IBaseFilter *filter);
+ void setVideoOutput(IBaseFilter *filter);
+
+protected:
+ void customEvent(QEvent *event);
+
+private Q_SLOTS:
+ void videoOutputChanged();
+
+private:
+ void releaseGraph();
+ void updateStatus();
+
+ int findStreamTypes(IBaseFilter *source) const;
+ int findStreamType(IPin *pin) const;
+
+ bool isConnected(IBaseFilter *filter, PIN_DIRECTION direction) const;
+ IBaseFilter *getConnected(IBaseFilter *filter, PIN_DIRECTION direction) const;
+
+ void run();
+
+ void doSetUrlSource(QMutexLocker *locker);
+ void doSetStreamSource(QMutexLocker *locker);
+ void doRender(QMutexLocker *locker);
+ void doFinalizeLoad(QMutexLocker *locker);
+ void doSetRate(QMutexLocker *locker);
+ void doSeek(QMutexLocker *locker);
+ void doPlay(QMutexLocker *locker);
+ void doPause(QMutexLocker *locker);
+ void doStop(QMutexLocker *locker);
+ void doReleaseAudioOutput(QMutexLocker *locker);
+ void doReleaseVideoOutput(QMutexLocker *locker);
+ void doReleaseGraph(QMutexLocker *locker);
+
+ void graphEvent(QMutexLocker *locker);
+
+ enum Task
+ {
+ Shutdown = 0x0001,
+ SetUrlSource = 0x0002,
+ SetStreamSource = 0x0004,
+ SetSource = SetUrlSource | SetStreamSource,
+ SetAudioOutput = 0x0008,
+ SetVideoOutput = 0x0010,
+ SetOutputs = SetAudioOutput | SetVideoOutput,
+ Render = 0x0020,
+ FinalizeLoad = 0x0040,
+ SetRate = 0x0080,
+ Seek = 0x0100,
+ Play = 0x0200,
+ Pause = 0x0400,
+ Stop = 0x0800,
+ ReleaseGraph = 0x1000,
+ ReleaseAudioOutput = 0x2000,
+ ReleaseVideoOutput = 0x4000,
+ ReleaseFilters = ReleaseGraph | ReleaseAudioOutput | ReleaseVideoOutput
+ };
+
+ enum Event
+ {
+ FinalizedLoad = QEvent::User,
+ Error,
+ RateChange,
+ Started,
+ Paused,
+ DurationChange,
+ StatusChange,
+ EndOfMedia,
+ PositionChange
+ };
+
+ enum GraphStatus
+ {
+ NoMedia,
+ Loading,
+ Loaded,
+ InvalidMedia
+ };
+
+ DirectShowPlayerControl *m_playerControl;
+ DirectShowMetaDataControl *m_metaDataControl;
+ DirectShowVideoOutputControl *m_videoOutputControl;
+ DirectShowVideoRendererControl *m_videoRendererControl;
+ Vmr9VideoWindowControl *m_videoWindowControl;
+ DirectShowAudioEndpointControl *m_audioEndpointControl;
+
+ QThread *m_taskThread;
+ DirectShowEventLoop *m_loop;
+ int m_pendingTasks;
+ int m_executingTask;
+ int m_executedTasks;
+ HANDLE m_taskHandle;
+ HANDLE m_eventHandle;
+ GraphStatus m_graphStatus;
+ QMediaPlayer::Error m_error;
+ QIODevice *m_stream;
+ IFilterGraph2 *m_graph;
+ IBaseFilter *m_source;
+ IBaseFilter *m_audioOutput;
+ IBaseFilter *m_videoOutput;
+ int m_streamTypes;
+ qreal m_rate;
+ qint64 m_position;
+ qint64 m_duration;
+ bool m_buffering;
+ bool m_seekable;
+ bool m_atEnd;
+ QMediaTimeRange m_playbackRange;
+ QUrl m_url;
+ QMediaResourceList m_resources;
+ QString m_errorString;
+ QMutex m_mutex;
+
+ friend class DirectShowPlayerServiceThread;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowsamplescheduler.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowsamplescheduler.cpp
new file mode 100644
index 0000000000..733080e109
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowsamplescheduler.cpp
@@ -0,0 +1,414 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "directshowsamplescheduler.h"
+
+#include <QtCore/qcoreevent.h>
+
+
+QT_BEGIN_NAMESPACE
+
+class DirectShowTimedSample
+{
+public:
+ DirectShowTimedSample(IMediaSample *sample)
+ : m_next(0)
+ , m_sample(sample)
+ , m_cookie(0)
+ , m_lastSample(false)
+ {
+ m_sample->AddRef();
+ }
+
+ ~DirectShowTimedSample()
+ {
+ m_sample->Release();
+ }
+
+ IMediaSample *sample() const { return m_sample; }
+
+ DirectShowTimedSample *nextSample() const { return m_next; }
+ void setNextSample(DirectShowTimedSample *sample) { Q_ASSERT(!m_next); m_next = sample; }
+
+ DirectShowTimedSample *remove() {
+ DirectShowTimedSample *next = m_next; delete this; return next; }
+
+ bool schedule(IReferenceClock *clock, REFERENCE_TIME startTime, HANDLE handle);
+ void unschedule(IReferenceClock *clock);
+
+ bool isReady(IReferenceClock *clock) const;
+
+ bool isLast() const { return m_lastSample; }
+ void setLast() { m_lastSample = true; }
+
+private:
+ DirectShowTimedSample *m_next;
+ IMediaSample *m_sample;
+ DWORD_PTR m_cookie;
+ bool m_lastSample;
+};
+
+bool DirectShowTimedSample::schedule(
+ IReferenceClock *clock, REFERENCE_TIME startTime, HANDLE handle)
+{
+ REFERENCE_TIME sampleStartTime;
+ REFERENCE_TIME sampleEndTime;
+ if (m_sample->GetTime(&sampleStartTime, &sampleEndTime) == S_OK) {
+ if (clock->AdviseTime(
+ startTime, sampleStartTime, reinterpret_cast<HEVENT>(handle), &m_cookie) == S_OK) {
+ return true;
+ }
+ }
+ return false;
+}
+
+void DirectShowTimedSample::unschedule(IReferenceClock *clock)
+{
+ clock->Unadvise(m_cookie);
+}
+
+bool DirectShowTimedSample::isReady(IReferenceClock *clock) const
+{
+ REFERENCE_TIME sampleStartTime;
+ REFERENCE_TIME sampleEndTime;
+ REFERENCE_TIME currentTime;
+ if (m_sample->GetTime(&sampleStartTime, &sampleEndTime) == S_OK) {
+ if (clock->GetTime(&currentTime) == S_OK)
+ return currentTime >= sampleStartTime;
+ }
+ return true;
+}
+
+DirectShowSampleScheduler::DirectShowSampleScheduler(IUnknown *pin, QObject *parent)
+ : QWinEventNotifier(parent)
+ , m_pin(pin)
+ , m_clock(0)
+ , m_allocator(0)
+ , m_head(0)
+ , m_tail(0)
+ , m_maximumSamples(2)
+ , m_state(Stopped)
+ , m_startTime(0)
+ , m_timeoutEvent(::CreateEvent(0, 0, 0, 0))
+{
+ m_semaphore.release(m_maximumSamples);
+
+ setHandle(m_timeoutEvent);
+ setEnabled(true);
+}
+
+DirectShowSampleScheduler::~DirectShowSampleScheduler()
+{
+ setEnabled(false);
+
+ ::CloseHandle(m_timeoutEvent);
+
+ Q_ASSERT(!m_clock);
+ Q_ASSERT(!m_allocator);
+}
+
+HRESULT DirectShowSampleScheduler::QueryInterface(REFIID riid, void **ppvObject)
+{
+ return m_pin->QueryInterface(riid, ppvObject);
+}
+
+ULONG DirectShowSampleScheduler::AddRef()
+{
+ return m_pin->AddRef();
+}
+
+ULONG DirectShowSampleScheduler::Release()
+{
+ return m_pin->Release();
+}
+
+// IMemInputPin
+HRESULT DirectShowSampleScheduler::GetAllocator(IMemAllocator **ppAllocator)
+{
+ if (!ppAllocator) {
+ return E_POINTER;
+ } else {
+ QMutexLocker locker(&m_mutex);
+
+ if (!m_allocator) {
+ return VFW_E_NO_ALLOCATOR;
+ } else {
+ *ppAllocator = m_allocator;
+
+ return S_OK;
+ }
+ }
+}
+
+HRESULT DirectShowSampleScheduler::NotifyAllocator(IMemAllocator *pAllocator, BOOL bReadOnly)
+{
+ Q_UNUSED(bReadOnly);
+
+ HRESULT hr;
+ ALLOCATOR_PROPERTIES properties;
+
+ if (!pAllocator) {
+ if (m_allocator)
+ m_allocator->Release();
+
+ m_allocator = 0;
+
+ return S_OK;
+ } else if ((hr = pAllocator->GetProperties(&properties)) != S_OK) {
+ return hr;
+ } else {
+ if (properties.cBuffers == 1) {
+ ALLOCATOR_PROPERTIES actual;
+
+ properties.cBuffers = 2;
+ if ((hr = pAllocator->SetProperties(&properties, &actual)) != S_OK)
+ return hr;
+ }
+
+ QMutexLocker locker(&m_mutex);
+
+ if (m_allocator)
+ m_allocator->Release();
+
+ m_allocator = pAllocator;
+ m_allocator->AddRef();
+
+ return S_OK;
+ }
+}
+
+HRESULT DirectShowSampleScheduler::GetAllocatorRequirements(ALLOCATOR_PROPERTIES *pProps)
+{
+ if (!pProps)
+ return E_POINTER;
+
+ pProps->cBuffers = 2;
+
+ return S_OK;
+}
+
+HRESULT DirectShowSampleScheduler::Receive(IMediaSample *pSample)
+{
+ if (!pSample)
+ return E_POINTER;
+
+ m_semaphore.acquire(1);
+
+ QMutexLocker locker(&m_mutex);
+
+ if (m_state & Flushing) {
+ m_semaphore.release(1);
+
+ return S_FALSE;
+ } else if (m_state == Stopped) {
+ m_semaphore.release();
+
+ return VFW_E_WRONG_STATE;
+ } else {
+ DirectShowTimedSample *timedSample = new DirectShowTimedSample(pSample);
+
+ if (m_tail)
+ m_tail->setNextSample(timedSample);
+ else
+ m_head = timedSample;
+
+ m_tail = timedSample;
+
+ if (m_state == Running) {
+ if (!timedSample->schedule(m_clock, m_startTime, m_timeoutEvent)) {
+ // Timing information is unavailable, so schedule frames immediately.
+ QMetaObject::invokeMethod(this, "timerActivated", Qt::QueuedConnection);
+ }
+ } else if (m_tail == m_head) {
+ // If this is the first frame make is available.
+ QMetaObject::invokeMethod(this, "timerActivated", Qt::QueuedConnection);
+ }
+
+ return S_OK;
+ }
+}
+
+HRESULT DirectShowSampleScheduler::ReceiveMultiple(
+ IMediaSample **pSamples, long nSamples, long *nSamplesProcessed)
+{
+ if (!pSamples || !nSamplesProcessed)
+ return E_POINTER;
+
+ for (*nSamplesProcessed = 0; *nSamplesProcessed < nSamples; ++(*nSamplesProcessed)) {
+ HRESULT hr = Receive(pSamples[*nSamplesProcessed]);
+
+ if (hr != S_OK)
+ return hr;
+ }
+ return S_OK;
+}
+
+HRESULT DirectShowSampleScheduler::ReceiveCanBlock()
+{
+ return S_OK;
+}
+
+void DirectShowSampleScheduler::run(REFERENCE_TIME startTime)
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_state = (m_state & Flushing) | Running;
+ m_startTime = startTime;
+
+ for (DirectShowTimedSample *sample = m_head; sample; sample = sample->nextSample()) {
+ sample->schedule(m_clock, m_startTime, m_timeoutEvent);
+ }
+}
+
+void DirectShowSampleScheduler::pause()
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_state = (m_state & Flushing) | Paused;
+
+ for (DirectShowTimedSample *sample = m_head; sample; sample = sample->nextSample())
+ sample->unschedule(m_clock);
+}
+
+void DirectShowSampleScheduler::stop()
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_state = m_state & Flushing;
+
+ for (DirectShowTimedSample *sample = m_head; sample; sample = sample->remove()) {
+ sample->unschedule(m_clock);
+
+ m_semaphore.release(1);
+ }
+
+ m_head = 0;
+ m_tail = 0;
+}
+
+void DirectShowSampleScheduler::setFlushing(bool flushing)
+{
+ QMutexLocker locker(&m_mutex);
+
+ const bool isFlushing = m_state & Flushing;
+
+ if (isFlushing != flushing) {
+ if (flushing) {
+ m_state |= Flushing;
+
+ for (DirectShowTimedSample *sample = m_head; sample; sample = sample->remove()) {
+ sample->unschedule(m_clock);
+
+ m_semaphore.release(1);
+ }
+ m_head = 0;
+ m_tail = 0;
+ } else {
+ m_state &= ~Flushing;
+ }
+ }
+}
+
+void DirectShowSampleScheduler::setClock(IReferenceClock *clock)
+{
+ QMutexLocker locker(&m_mutex);
+
+ if (m_clock)
+ m_clock->Release();
+
+ m_clock = clock;
+
+ if (m_clock)
+ m_clock->AddRef();
+}
+
+IMediaSample *DirectShowSampleScheduler::takeSample(bool *eos)
+{
+ QMutexLocker locker(&m_mutex);
+
+ if (m_head && m_head->isReady(m_clock)) {
+ IMediaSample *sample = m_head->sample();
+ sample->AddRef();
+
+ if (m_state == Running) {
+ *eos = m_head->isLast();
+
+ m_head = m_head->remove();
+
+ if (!m_head)
+ m_tail = 0;
+
+ m_semaphore.release(1);
+ }
+
+ return sample;
+ } else {
+ return 0;
+ }
+}
+
+bool DirectShowSampleScheduler::scheduleEndOfStream()
+{
+ QMutexLocker locker(&m_mutex);
+
+ if (m_tail) {
+ m_tail->setLast();
+
+ return true;
+ } else {
+ return false;
+ }
+}
+
+bool DirectShowSampleScheduler::event(QEvent *event)
+{
+ if (event->type() == QEvent::WinEventAct) {
+ QObject::event(event);
+
+ emit sampleReady();
+
+ return true;
+ } else {
+ return QWinEventNotifier::event(event);
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowsamplescheduler.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowsamplescheduler.h
new file mode 100644
index 0000000000..007fa99efa
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowsamplescheduler.h
@@ -0,0 +1,127 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIRECTSHOWSAMPLESCHEDULER_H
+#define DIRECTSHOWSAMPLESCHEDULER_H
+
+#include <QtCore/qmutex.h>
+#include <QtCore/qobject.h>
+#include <QtCore/qsemaphore.h>
+
+#include <QtCore/private/qwineventnotifier_p.h>
+
+#include <dshow.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class DirectShowTimedSample;
+
+class DirectShowSampleScheduler : public QWinEventNotifier, public IMemInputPin
+{
+ Q_OBJECT
+public:
+
+ enum State
+ {
+ Stopped = 0x00,
+ Running = 0x01,
+ Paused = 0x02,
+ RunMask = 0x03,
+ Flushing = 0x04
+ };
+
+ DirectShowSampleScheduler(IUnknown *pin, QObject *parent = 0);
+ ~DirectShowSampleScheduler();
+
+ // IUnknown
+ HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
+ ULONG STDMETHODCALLTYPE AddRef();
+ ULONG STDMETHODCALLTYPE Release();
+
+ // IMemInputPin
+ HRESULT STDMETHODCALLTYPE GetAllocator(IMemAllocator **ppAllocator);
+ HRESULT STDMETHODCALLTYPE NotifyAllocator(IMemAllocator *pAllocator, BOOL bReadOnly);
+ HRESULT STDMETHODCALLTYPE GetAllocatorRequirements(ALLOCATOR_PROPERTIES *pProps);
+
+ HRESULT STDMETHODCALLTYPE Receive(IMediaSample *pSample);
+ HRESULT STDMETHODCALLTYPE ReceiveMultiple(IMediaSample **pSamples, long nSamples, long *nSamplesProcessed);
+ HRESULT STDMETHODCALLTYPE ReceiveCanBlock();
+
+ void run(REFERENCE_TIME startTime);
+ void pause();
+ void stop();
+ void setFlushing(bool flushing);
+
+ IReferenceClock *clock() const { return m_clock; }
+ void setClock(IReferenceClock *clock);
+
+ bool schedule(IMediaSample *sample);
+ bool scheduleEndOfStream();
+
+ IMediaSample *takeSample(bool *eos);
+
+ bool event(QEvent *event);
+
+Q_SIGNALS:
+ void sampleReady();
+
+private:
+ IUnknown *m_pin;
+ IReferenceClock *m_clock;
+ IMemAllocator *m_allocator;
+ DirectShowTimedSample *m_head;
+ DirectShowTimedSample *m_tail;
+ int m_maximumSamples;
+ int m_state;
+ REFERENCE_TIME m_startTime;
+ HANDLE m_timeoutEvent;
+ QSemaphore m_semaphore;
+ QMutex m_mutex;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowvideooutputcontrol.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowvideooutputcontrol.cpp
new file mode 100644
index 0000000000..ee2bea84b3
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowvideooutputcontrol.cpp
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "directshowvideooutputcontrol.h"
+
+
+QT_BEGIN_NAMESPACE
+
+DirectShowVideoOutputControl::DirectShowVideoOutputControl(QObject *parent)
+ : QVideoOutputControl(parent)
+ , m_output(NoOutput)
+{
+
+}
+
+DirectShowVideoOutputControl::~DirectShowVideoOutputControl()
+{
+}
+
+QList<QVideoOutputControl::Output> DirectShowVideoOutputControl::availableOutputs() const
+{
+ return QList<Output>()
+ << RendererOutput
+ << WindowOutput;
+}
+
+
+QVideoOutputControl::Output DirectShowVideoOutputControl::output() const
+{
+ return m_output;
+}
+
+void DirectShowVideoOutputControl::setOutput(Output output)
+{
+ if (output != m_output) {
+ switch (output) {
+ case NoOutput:
+ case RendererOutput:
+ case WindowOutput:
+ m_output = output;
+ emit outputChanged();
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowvideooutputcontrol.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowvideooutputcontrol.h
new file mode 100644
index 0000000000..acb29370fd
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowvideooutputcontrol.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIRECTSHOWVIDEOUTPUTCONTROL_H
+#define DIRECTSHOWVIDEOOUPUTCONTROL_H
+
+#include <QtMultimedia/qvideooutputcontrol.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class DirectShowVideoOutputControl : public QVideoOutputControl
+{
+ Q_OBJECT
+public:
+ DirectShowVideoOutputControl(QObject *parent = 0);
+ ~DirectShowVideoOutputControl();
+
+ QList<Output> availableOutputs() const;
+
+ Output output() const;
+ void setOutput(Output output);
+
+Q_SIGNALS:
+ void outputChanged();
+
+private:
+ Output m_output;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowvideorenderercontrol.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowvideorenderercontrol.cpp
new file mode 100644
index 0000000000..f27cb103dc
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowvideorenderercontrol.cpp
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "directshowvideorenderercontrol.h"
+
+#include "videosurfacefilter.h"
+
+
+QT_BEGIN_NAMESPACE
+
+
+DirectShowVideoRendererControl::DirectShowVideoRendererControl(DirectShowEventLoop *loop, QObject *parent)
+ : QVideoRendererControl(parent)
+ , m_loop(loop)
+ , m_surface(0)
+ , m_filter(0)
+{
+}
+
+DirectShowVideoRendererControl::~DirectShowVideoRendererControl()
+{
+ delete m_filter;
+}
+
+QAbstractVideoSurface *DirectShowVideoRendererControl::surface() const
+{
+ return m_surface;
+}
+
+void DirectShowVideoRendererControl::setSurface(QAbstractVideoSurface *surface)
+{
+ if (surface != m_surface) {
+ m_surface = surface;
+
+ VideoSurfaceFilter *existingFilter = m_filter;
+
+ if (surface) {
+ m_filter = new VideoSurfaceFilter(surface, m_loop);
+ } else {
+ m_filter = 0;
+ }
+
+ emit filterChanged();
+
+ delete existingFilter;
+ }
+}
+
+IBaseFilter *DirectShowVideoRendererControl::filter()
+{
+ return m_filter;
+}
+
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowvideorenderercontrol.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowvideorenderercontrol.h
new file mode 100644
index 0000000000..6b4f4a2fd0
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowvideorenderercontrol.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIRECTSHOWVIDEORENDERERCONTROL_H
+#define DIRECTSHOWVIDEORENDERERCONTROL_H
+
+#include <QtMultimedia/qvideorenderercontrol.h>
+
+#include <dshow.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class DirectShowEventLoop;
+class VideoSurfaceFilter;
+
+class DirectShowVideoRendererControl : public QVideoRendererControl
+{
+ Q_OBJECT
+public:
+ DirectShowVideoRendererControl(DirectShowEventLoop *loop, QObject *parent = 0);
+ ~DirectShowVideoRendererControl();
+
+ QAbstractVideoSurface *surface() const;
+ void setSurface(QAbstractVideoSurface *surface);
+
+ IBaseFilter *filter();
+
+Q_SIGNALS:
+ void filterChanged();
+
+private:
+ DirectShowEventLoop *m_loop;
+ QAbstractVideoSurface *m_surface;
+ VideoSurfaceFilter *m_filter;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/mediaplayer.pri b/src/plugins/mediaservices/directshow/mediaplayer/mediaplayer.pri
new file mode 100644
index 0000000000..99a11919fb
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/mediaplayer.pri
@@ -0,0 +1,45 @@
+INCLUDEPATH += $$PWD
+
+DEFINES += QMEDIA_DIRECTSHOW_PLAYER
+
+!contains(QT_CONFIG, wmsdk): DEFINES += QT_NO_WMSDK
+
+HEADERS += \
+ $$PWD/directshowaudioendpointcontrol.h \
+ $$PWD/directshoweventloop.h \
+ $$PWD/directshowglobal.h \
+ $$PWD/directshowioreader.h \
+ $$PWD/directshowiosource.h \
+ $$PWD/directshowmediatype.h \
+ $$PWD/directshowmediatypelist.h \
+ $$PWD/directshowmetadatacontrol.h \
+ $$PWD/directshowpinenum.h \
+ $$PWD/directshowplayercontrol.h \
+ $$PWD/directshowplayerservice.h \
+ $$PWD/directshowsamplescheduler.h \
+ $$PWD/directshowvideooutputcontrol.h \
+ $$PWD/directshowvideorenderercontrol.h \
+ $$PWD/mediasamplevideobuffer.h \
+ $$PWD/videosurfacefilter.h \
+ $$PWD/vmr9videowindowcontrol.h
+
+SOURCES += \
+ $$PWD/directshowaudioendpointcontrol.cpp \
+ $$PWD/directshoweventloop.cpp \
+ $$PWD/directshowioreader.cpp \
+ $$PWD/directshowiosource.cpp \
+ $$PWD/directshowmediatype.cpp \
+ $$PWD/directshowmediatypelist.cpp \
+ $$PWD/directshowmetadatacontrol.cpp \
+ $$PWD/directshowpinenum.cpp \
+ $$PWD/directshowplayercontrol.cpp \
+ $$PWD/directshowplayerservice.cpp \
+ $$PWD/directshowsamplescheduler.cpp \
+ $$PWD/directshowvideooutputcontrol.cpp \
+ $$PWD/directshowvideorenderercontrol.cpp \
+ $$PWD/mediasamplevideobuffer.cpp \
+ $$PWD/videosurfacefilter.cpp \
+ $$PWD/vmr9videowindowcontrol.cpp
+
+LIBS += -lstrmiids -ldmoguids -luuid -lmsdmo -lole32 -loleaut32
+
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/mediasamplevideobuffer.cpp b/src/plugins/mediaservices/directshow/mediaplayer/mediasamplevideobuffer.cpp
new file mode 100644
index 0000000000..7eff22685a
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/mediasamplevideobuffer.cpp
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mediasamplevideobuffer.h"
+
+
+QT_BEGIN_NAMESPACE
+
+MediaSampleVideoBuffer::MediaSampleVideoBuffer(IMediaSample *sample, int bytesPerLine)
+ : QAbstractVideoBuffer(NoHandle)
+ , m_sample(sample)
+ , m_bytesPerLine(m_bytesPerLine)
+ , m_mapMode(NotMapped)
+{
+ m_sample->AddRef();
+}
+
+MediaSampleVideoBuffer::~MediaSampleVideoBuffer()
+{
+ m_sample->Release();
+}
+
+uchar *MediaSampleVideoBuffer::map(MapMode mode, int *numBytes, int *bytesPerLine)
+{
+ if (m_mapMode == NotMapped && mode != NotMapped) {
+ if (numBytes)
+ *numBytes = m_sample->GetActualDataLength();
+
+ if (bytesPerLine)
+ *bytesPerLine = m_bytesPerLine;
+
+ BYTE *bytes = 0;
+
+ if (m_sample->GetPointer(&bytes) == S_OK) {
+ m_mapMode = mode;
+
+ return reinterpret_cast<uchar *>(bytes);
+ }
+ }
+ return 0;
+}
+
+void MediaSampleVideoBuffer::unmap()
+{
+ m_mapMode = NotMapped;
+}
+
+QAbstractVideoBuffer::MapMode MediaSampleVideoBuffer::mapMode() const
+{
+ return m_mapMode;
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/mediasamplevideobuffer.h b/src/plugins/mediaservices/directshow/mediaplayer/mediasamplevideobuffer.h
new file mode 100644
index 0000000000..06dc31ce3e
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/mediasamplevideobuffer.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MEDIASAMPLEVIDEOBUFFER_H
+#define MEDIASAMPLEVIDEOBUFFER_H
+
+#include <QtMultimedia/qabstractvideobuffer.h>
+
+#include <dshow.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class MediaSampleVideoBuffer : public QAbstractVideoBuffer
+{
+public:
+ MediaSampleVideoBuffer(IMediaSample *sample, int bytesPerLine);
+ ~MediaSampleVideoBuffer();
+
+ IMediaSample *sample() { return m_sample; }
+
+ uchar *map(MapMode mode, int *numBytes, int *bytesPerLine);
+ void unmap();
+
+ MapMode mapMode() const;
+
+private:
+ IMediaSample *m_sample;
+ int m_bytesPerLine;
+ MapMode m_mapMode;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/videosurfacefilter.cpp b/src/plugins/mediaservices/directshow/mediaplayer/videosurfacefilter.cpp
new file mode 100644
index 0000000000..a471c6869a
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/videosurfacefilter.cpp
@@ -0,0 +1,633 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "videosurfacefilter.h"
+
+#include "directshoweventloop.h"
+#include "directshowglobal.h"
+#include "directshowpinenum.h"
+#include "mediasamplevideobuffer.h"
+
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qcoreevent.h>
+#include <QtCore/qthread.h>
+#include <QtMultimedia/qabstractvideosurface.h>
+
+#include <initguid.h>
+
+
+QT_BEGIN_NAMESPACE
+
+// { e23cad72-153d-406c-bf3f-4c4b523d96f2 }
+DEFINE_GUID(CLSID_VideoSurfaceFilter,
+0xe23cad72, 0x153d, 0x406c, 0xbf, 0x3f, 0x4c, 0x4b, 0x52, 0x3d, 0x96, 0xf2);
+
+VideoSurfaceFilter::VideoSurfaceFilter(
+ QAbstractVideoSurface *surface, DirectShowEventLoop *loop, QObject *parent)
+ : QObject(parent)
+ , m_ref(1)
+ , m_state(State_Stopped)
+ , m_surface(surface)
+ , m_loop(loop)
+ , m_graph(0)
+ , m_peerPin(0)
+ , m_bytesPerLine(0)
+ , m_startResult(S_OK)
+ , m_pinId(QString::fromLatin1("reference"))
+ , m_sampleScheduler(static_cast<IPin *>(this))
+{
+ connect(surface, SIGNAL(supportedFormatsChanged()), this, SLOT(supportedFormatsChanged()));
+ connect(&m_sampleScheduler, SIGNAL(sampleReady()), this, SLOT(sampleReady()));
+}
+
+VideoSurfaceFilter::~VideoSurfaceFilter()
+{
+ Q_ASSERT(m_ref == 1);
+}
+
+HRESULT VideoSurfaceFilter::QueryInterface(REFIID riid, void **ppvObject)
+{
+ // 2dd74950-a890-11d1-abe8-00a0c905f375
+ static const GUID iid_IAmFilterMiscFlags = {
+ 0x2dd74950, 0xa890, 0x11d1, {0xab, 0xe8, 0x00, 0xa0, 0xc9, 0x05, 0xf3, 0x75} };
+
+ if (!ppvObject) {
+ return E_POINTER;
+ } else if (riid == IID_IUnknown
+ || riid == IID_IPersist
+ || riid == IID_IMediaFilter
+ || riid == IID_IBaseFilter) {
+ *ppvObject = static_cast<IBaseFilter *>(this);
+ } else if (riid == iid_IAmFilterMiscFlags) {
+ *ppvObject = static_cast<IAMFilterMiscFlags *>(this);
+ } else if (riid == IID_IPin) {
+ *ppvObject = static_cast<IPin *>(this);
+ } else if (riid == IID_IMemInputPin) {
+ *ppvObject = static_cast<IMemInputPin *>(&m_sampleScheduler);
+ } else {
+ *ppvObject = 0;
+
+ return E_NOINTERFACE;
+ }
+
+ AddRef();
+
+ return S_OK;
+}
+
+ULONG VideoSurfaceFilter::AddRef()
+{
+ return InterlockedIncrement(&m_ref);
+}
+
+ULONG VideoSurfaceFilter::Release()
+{
+ ULONG ref = InterlockedDecrement(&m_ref);
+
+ Q_ASSERT(ref != 0);
+
+ return ref;
+}
+
+HRESULT VideoSurfaceFilter::GetClassID(CLSID *pClassID)
+{
+ *pClassID = CLSID_VideoSurfaceFilter;
+
+ return S_OK;
+}
+
+HRESULT VideoSurfaceFilter::Run(REFERENCE_TIME tStart)
+{
+ m_state = State_Running;
+
+ m_sampleScheduler.run(tStart);
+
+ return S_OK;
+}
+
+HRESULT VideoSurfaceFilter::Pause()
+{
+ m_state = State_Paused;
+
+ m_sampleScheduler.pause();
+
+ return S_OK;
+}
+
+HRESULT VideoSurfaceFilter::Stop()
+{
+ m_state = State_Stopped;
+
+ m_sampleScheduler.stop();
+
+ return S_OK;
+}
+
+HRESULT VideoSurfaceFilter::GetState(DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
+{
+ if (!pState)
+ return E_POINTER;
+
+ *pState = m_state;
+
+ return S_OK;
+}
+
+HRESULT VideoSurfaceFilter::SetSyncSource(IReferenceClock *pClock)
+{
+
+ m_sampleScheduler.setClock(pClock);
+
+ return S_OK;
+}
+
+HRESULT VideoSurfaceFilter::GetSyncSource(IReferenceClock **ppClock)
+{
+ if (!ppClock) {
+ return E_POINTER;
+ } else {
+ *ppClock = m_sampleScheduler.clock();
+
+ if (*ppClock) {
+ (*ppClock)->AddRef();
+
+ return S_OK;
+ } else {
+ return S_FALSE;
+ }
+ }
+}
+
+HRESULT VideoSurfaceFilter::EnumPins(IEnumPins **ppEnum)
+{
+ if (ppEnum) {
+ *ppEnum = new DirectShowPinEnum(QList<IPin *>() << this);
+
+ return S_OK;
+ } else {
+ return E_POINTER;
+ }
+}
+
+HRESULT VideoSurfaceFilter::FindPin(LPCWSTR pId, IPin **ppPin)
+{
+ if (!ppPin || !pId) {
+ return E_POINTER;
+ } else if (QString::fromWCharArray(pId) == m_pinId) {
+ AddRef();
+
+ *ppPin = this;
+
+ return S_OK;
+ } else {
+ return VFW_E_NOT_FOUND;
+ }
+}
+
+HRESULT VideoSurfaceFilter::JoinFilterGraph(IFilterGraph *pGraph, LPCWSTR pName)
+{
+ m_graph = pGraph;
+ m_name = QString::fromWCharArray(pName);
+
+ return S_OK;
+}
+
+HRESULT VideoSurfaceFilter::QueryFilterInfo(FILTER_INFO *pInfo)
+{
+ if (pInfo) {
+ QString name = m_name;
+
+ if (name.length() >= MAX_FILTER_NAME)
+ name.truncate(MAX_FILTER_NAME - 1);
+
+ int length = name.toWCharArray(pInfo->achName);
+ pInfo->achName[length] = '\0';
+
+ if (m_graph)
+ m_graph->AddRef();
+
+ pInfo->pGraph = m_graph;
+
+ return S_OK;
+ } else {
+ return E_POINTER;
+ }
+}
+
+HRESULT VideoSurfaceFilter::QueryVendorInfo(LPWSTR *pVendorInfo)
+{
+ Q_UNUSED(pVendorInfo);
+
+ return E_NOTIMPL;
+}
+
+ULONG VideoSurfaceFilter::GetMiscFlags()
+{
+ return AM_FILTER_MISC_FLAGS_IS_RENDERER;
+}
+
+
+HRESULT VideoSurfaceFilter::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
+{
+ // This is an input pin, you shouldn't be calling Connect on it.
+ return E_POINTER;
+}
+
+HRESULT VideoSurfaceFilter::ReceiveConnection(IPin *pConnector, const AM_MEDIA_TYPE *pmt)
+{
+ if (!pConnector) {
+ return E_POINTER;
+ } else if (!pmt) {
+ return E_POINTER;
+ } else {
+ HRESULT hr;
+ QMutexLocker locker(&m_mutex);
+
+ if (m_peerPin) {
+ hr = VFW_E_ALREADY_CONNECTED;
+ } else if (pmt->majortype != MEDIATYPE_Video) {
+ hr = VFW_E_TYPE_NOT_ACCEPTED;
+ } else {
+ m_surfaceFormat = DirectShowMediaType::formatFromType(*pmt);
+ m_bytesPerLine = DirectShowMediaType::bytesPerLine(m_surfaceFormat);
+
+ if (thread() == QThread::currentThread()) {
+ hr = start();
+ } else {
+ m_loop->postEvent(this, new QEvent(QEvent::Type(StartSurface)));
+
+ m_wait.wait(&m_mutex);
+
+ hr = m_startResult;
+ }
+ }
+ if (hr == S_OK) {
+ m_peerPin = pConnector;
+ m_peerPin->AddRef();
+
+ DirectShowMediaType::copy(&m_mediaType, *pmt);
+ }
+ return hr;
+ }
+}
+
+HRESULT VideoSurfaceFilter::start()
+{
+ if (!m_surface->start(m_surfaceFormat)) {
+ return VFW_E_TYPE_NOT_ACCEPTED;
+ } else {
+ return S_OK;
+ }
+}
+
+HRESULT VideoSurfaceFilter::Disconnect()
+{
+ QMutexLocker locker(&m_mutex);
+
+ if (!m_peerPin)
+ return S_FALSE;
+
+ if (thread() == QThread::currentThread()) {
+ stop();
+ } else {
+ m_loop->postEvent(this, new QEvent(QEvent::Type(StopSurface)));
+
+ m_wait.wait(&m_mutex);
+ }
+
+ m_mediaType.clear();
+
+ m_sampleScheduler.NotifyAllocator(0, FALSE);
+
+ m_peerPin->Release();
+ m_peerPin = 0;
+
+ return S_OK;
+}
+
+void VideoSurfaceFilter::stop()
+{
+ m_surface->stop();
+}
+
+HRESULT VideoSurfaceFilter::ConnectedTo(IPin **ppPin)
+{
+ if (!ppPin) {
+ return E_POINTER;
+ } else {
+ QMutexLocker locker(&m_mutex);
+
+ if (!m_peerPin) {
+ return VFW_E_NOT_CONNECTED;
+ } else {
+ m_peerPin->AddRef();
+
+ *ppPin = m_peerPin;
+
+ return S_OK;
+ }
+ }
+}
+
+HRESULT VideoSurfaceFilter::ConnectionMediaType(AM_MEDIA_TYPE *pmt)
+{
+ if (!pmt) {
+ return E_POINTER;
+ } else {
+ QMutexLocker locker(&m_mutex);
+
+ if (!m_peerPin) {
+ return VFW_E_NOT_CONNECTED;
+ } else {
+ DirectShowMediaType::copy(pmt, m_mediaType);
+
+ return S_OK;
+ }
+ }
+}
+
+HRESULT VideoSurfaceFilter::QueryPinInfo(PIN_INFO *pInfo)
+{
+ if (!pInfo) {
+ return E_POINTER;
+ } else {
+ AddRef();
+
+ pInfo->pFilter = this;
+ pInfo->dir = PINDIR_INPUT;
+
+ const int bytes = qMin(MAX_FILTER_NAME, (m_pinId.length() + 1) * 2);
+
+ qMemCopy(pInfo->achName, m_pinId.utf16(), bytes);
+
+ return S_OK;
+ }
+}
+
+HRESULT VideoSurfaceFilter::QueryId(LPWSTR *Id)
+{
+ if (!Id) {
+ return E_POINTER;
+ } else {
+ const int bytes = (m_pinId.length() + 1) * 2;
+
+ *Id = static_cast<LPWSTR>(::CoTaskMemAlloc(bytes));
+
+ qMemCopy(*Id, m_pinId.utf16(), bytes);
+
+ return S_OK;
+ }
+}
+
+HRESULT VideoSurfaceFilter::QueryAccept(const AM_MEDIA_TYPE *pmt)
+{
+ return !m_surface->isFormatSupported(DirectShowMediaType::formatFromType(*pmt))
+ ? S_OK
+ : S_FALSE;
+}
+
+HRESULT VideoSurfaceFilter::EnumMediaTypes(IEnumMediaTypes **ppEnum)
+{
+ if (!ppEnum) {
+ return E_POINTER;
+ } else {
+ QMutexLocker locker(&m_mutex);
+
+ *ppEnum = createMediaTypeEnum();
+
+ return S_OK;
+ }
+}
+
+HRESULT VideoSurfaceFilter::QueryInternalConnections(IPin **apPin, ULONG *nPin)
+{
+ Q_UNUSED(apPin);
+ Q_UNUSED(nPin);
+
+ return E_NOTIMPL;
+}
+
+HRESULT VideoSurfaceFilter::EndOfStream()
+{
+ QMutexLocker locker(&m_mutex);
+
+ if (!m_sampleScheduler.scheduleEndOfStream()) {
+ if (IMediaEventSink *sink = com_cast<IMediaEventSink>(m_graph, IID_IMediaEventSink)) {
+ sink->Notify(
+ EC_COMPLETE,
+ S_OK,
+ reinterpret_cast<LONG_PTR>(static_cast<IBaseFilter *>(this)));
+ sink->Release();
+ }
+ }
+
+ return S_OK;
+}
+
+HRESULT VideoSurfaceFilter::BeginFlush()
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_sampleScheduler.setFlushing(true);
+
+ if (thread() == QThread::currentThread()) {
+ flush();
+ } else {
+ m_loop->postEvent(this, new QEvent(QEvent::Type(FlushSurface)));
+
+ m_wait.wait(&m_mutex);
+ }
+
+ return S_OK;
+}
+
+HRESULT VideoSurfaceFilter::EndFlush()
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_sampleScheduler.setFlushing(false);
+
+ return S_OK;
+}
+
+void VideoSurfaceFilter::flush()
+{
+ m_surface->present(QVideoFrame());
+
+ m_wait.wakeAll();
+}
+
+HRESULT VideoSurfaceFilter::NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
+{
+ Q_UNUSED(tStart);
+ Q_UNUSED(tStop);
+ Q_UNUSED(dRate);
+
+ return S_OK;
+}
+
+HRESULT VideoSurfaceFilter::QueryDirection(PIN_DIRECTION *pPinDir)
+{
+ if (!pPinDir) {
+ return E_POINTER;
+ } else {
+ *pPinDir = PINDIR_INPUT;
+
+ return S_OK;
+ }
+}
+
+int VideoSurfaceFilter::currentMediaTypeToken()
+{
+ QMutexLocker locker(&m_mutex);
+
+ return DirectShowMediaTypeList::currentMediaTypeToken();
+}
+
+HRESULT VideoSurfaceFilter::nextMediaType(
+ int token, int *index, ULONG count, AM_MEDIA_TYPE **types, ULONG *fetchedCount)
+{
+ QMutexLocker locker(&m_mutex);
+
+ return DirectShowMediaTypeList::nextMediaType(token, index, count, types, fetchedCount);
+
+}
+
+HRESULT VideoSurfaceFilter::skipMediaType(int token, int *index, ULONG count)
+{
+ QMutexLocker locker(&m_mutex);
+
+ return DirectShowMediaTypeList::skipMediaType(token, index, count);
+}
+
+HRESULT VideoSurfaceFilter::cloneMediaType(int token, int index, IEnumMediaTypes **enumeration)
+{
+ QMutexLocker locker(&m_mutex);
+
+ return DirectShowMediaTypeList::cloneMediaType(token, index, enumeration);
+}
+
+void VideoSurfaceFilter::customEvent(QEvent *event)
+{
+ if (event->type() == StartSurface) {
+ QMutexLocker locker(&m_mutex);
+
+ m_startResult = start();
+
+ m_wait.wakeAll();
+ } else if (event->type() == StopSurface) {
+ QMutexLocker locker(&m_mutex);
+
+ stop();
+
+ m_wait.wakeAll();
+ } else if (event->type() == FlushSurface) {
+ QMutexLocker locker(&m_mutex);
+
+ flush();
+
+ m_wait.wakeAll();
+ } else {
+ QObject::customEvent(event);
+ }
+}
+
+void VideoSurfaceFilter::supportedFormatsChanged()
+{
+ QMutexLocker locker(&m_mutex);
+
+ // MEDIASUBTYPE_None;
+ static const GUID none = {
+ 0xe436eb8e, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70} };
+
+ QList<QVideoFrame::PixelFormat> formats = m_surface->supportedPixelFormats();
+
+ QVector<AM_MEDIA_TYPE> mediaTypes;
+ mediaTypes.reserve(formats.count());
+
+ AM_MEDIA_TYPE type;
+ type.majortype = MEDIATYPE_Video;
+ type.bFixedSizeSamples = TRUE;
+ type.bTemporalCompression = FALSE;
+ type.lSampleSize = 0;
+ type.formattype = GUID_NULL;
+ type.pUnk = 0;
+ type.cbFormat = 0;
+ type.pbFormat = 0;
+
+ foreach (QVideoFrame::PixelFormat format, formats) {
+ type.subtype = DirectShowMediaType::convertPixelFormat(format);
+
+ if (type.subtype != none)
+ mediaTypes.append(type);
+ }
+
+ setMediaTypes(mediaTypes);
+}
+
+void VideoSurfaceFilter::sampleReady()
+{
+ bool eos = false;
+
+ IMediaSample *sample = m_sampleScheduler.takeSample(&eos);
+
+ if (sample) {
+ m_surface->present(QVideoFrame(
+ new MediaSampleVideoBuffer(sample, m_bytesPerLine),
+ m_surfaceFormat.frameSize(),
+ m_surfaceFormat.pixelFormat()));
+
+ sample->Release();
+
+ if (eos) {
+ if (IMediaEventSink *sink = com_cast<IMediaEventSink>(m_graph, IID_IMediaEventSink)) {
+ sink->Notify(
+ EC_COMPLETE,
+ S_OK,
+ reinterpret_cast<LONG_PTR>(static_cast<IBaseFilter *>(this)));
+ sink->Release();
+ }
+ }
+ }
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/videosurfacefilter.h b/src/plugins/mediaservices/directshow/mediaplayer/videosurfacefilter.h
new file mode 100644
index 0000000000..0607fd398e
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/videosurfacefilter.h
@@ -0,0 +1,180 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef VIDEOSURFACEFILTER_H
+#define VIDEOSURFACEFILTER_H
+
+#include "directshowglobal.h"
+#include "directshowmediatypelist.h"
+#include "directshowsamplescheduler.h"
+#include "directshowmediatype.h"
+
+#include <QtCore/qbasictimer.h>
+#include <QtCore/qcoreevent.h>
+#include <QtCore/qmutex.h>
+#include <QtCore/qsemaphore.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qwaitcondition.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+
+class QAbstractVideoSurface;
+
+class DirectShowEventLoop;
+
+class VideoSurfaceFilter
+ : public QObject
+ , public DirectShowMediaTypeList
+ , public IBaseFilter
+ , public IAMFilterMiscFlags
+ , public IPin
+{
+ Q_OBJECT
+public:
+ VideoSurfaceFilter(
+ QAbstractVideoSurface *surface, DirectShowEventLoop *loop, QObject *parent = 0);
+ ~VideoSurfaceFilter();
+
+ // IUnknown
+ HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
+ ULONG STDMETHODCALLTYPE AddRef();
+ ULONG STDMETHODCALLTYPE Release();
+
+ // IPersist
+ HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID);
+
+ // IMediaFilter
+ HRESULT STDMETHODCALLTYPE Run(REFERENCE_TIME tStart);
+ HRESULT STDMETHODCALLTYPE Pause();
+ HRESULT STDMETHODCALLTYPE Stop();
+
+ HRESULT STDMETHODCALLTYPE GetState(DWORD dwMilliSecsTimeout, FILTER_STATE *pState);
+
+ HRESULT STDMETHODCALLTYPE SetSyncSource(IReferenceClock *pClock);
+ HRESULT STDMETHODCALLTYPE GetSyncSource(IReferenceClock **ppClock);
+
+ // IBaseFilter
+ HRESULT STDMETHODCALLTYPE EnumPins(IEnumPins **ppEnum);
+ HRESULT STDMETHODCALLTYPE FindPin(LPCWSTR Id, IPin **ppPin);
+
+ HRESULT STDMETHODCALLTYPE JoinFilterGraph(IFilterGraph *pGraph, LPCWSTR pName);
+
+ HRESULT STDMETHODCALLTYPE QueryFilterInfo(FILTER_INFO *pInfo);
+ HRESULT STDMETHODCALLTYPE QueryVendorInfo(LPWSTR *pVendorInfo);
+
+ // IAMFilterMiscFlags
+ ULONG STDMETHODCALLTYPE GetMiscFlags();
+
+ // IPin
+ HRESULT STDMETHODCALLTYPE Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt);
+ HRESULT STDMETHODCALLTYPE ReceiveConnection(IPin *pConnector, const AM_MEDIA_TYPE *pmt);
+ HRESULT STDMETHODCALLTYPE Disconnect();
+ HRESULT STDMETHODCALLTYPE ConnectedTo(IPin **ppPin);
+
+ HRESULT STDMETHODCALLTYPE ConnectionMediaType(AM_MEDIA_TYPE *pmt);
+
+ HRESULT STDMETHODCALLTYPE QueryPinInfo(PIN_INFO *pInfo);
+ HRESULT STDMETHODCALLTYPE QueryId(LPWSTR *Id);
+
+ HRESULT STDMETHODCALLTYPE QueryAccept(const AM_MEDIA_TYPE *pmt);
+
+ HRESULT STDMETHODCALLTYPE EnumMediaTypes(IEnumMediaTypes **ppEnum);
+
+ HRESULT STDMETHODCALLTYPE QueryInternalConnections(IPin **apPin, ULONG *nPin);
+
+ HRESULT STDMETHODCALLTYPE EndOfStream();
+
+ HRESULT STDMETHODCALLTYPE BeginFlush();
+ HRESULT STDMETHODCALLTYPE EndFlush();
+
+ HRESULT STDMETHODCALLTYPE NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
+
+ HRESULT STDMETHODCALLTYPE QueryDirection(PIN_DIRECTION *pPinDir);
+
+ int currentMediaTypeToken();
+ HRESULT nextMediaType(
+ int token, int *index, ULONG count, AM_MEDIA_TYPE **types, ULONG *fetchedCount);
+ HRESULT skipMediaType(int token, int *index, ULONG count);
+ HRESULT cloneMediaType(int token, int index, IEnumMediaTypes **enumeration);
+
+protected:
+ void customEvent(QEvent *event);
+
+private Q_SLOTS:
+ void supportedFormatsChanged();
+ void sampleReady();
+
+private:
+ HRESULT start();
+ void stop();
+ void flush();
+
+ enum
+ {
+ StartSurface = QEvent::User,
+ StopSurface,
+ FlushSurface
+ };
+
+ LONG m_ref;
+ FILTER_STATE m_state;
+ QAbstractVideoSurface *m_surface;
+ DirectShowEventLoop *m_loop;
+ IFilterGraph *m_graph;
+ IPin *m_peerPin;
+ int m_bytesPerLine;
+ HRESULT m_startResult;
+ QString m_name;
+ QString m_pinId;
+ DirectShowMediaType m_mediaType;
+ QVideoSurfaceFormat m_surfaceFormat;
+ QMutex m_mutex;
+ QWaitCondition m_wait;
+ DirectShowSampleScheduler m_sampleScheduler;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.cpp b/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.cpp
new file mode 100644
index 0000000000..b1ddd985c6
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.cpp
@@ -0,0 +1,315 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "vmr9videowindowcontrol.h"
+
+#include "directshowglobal.h"
+
+
+QT_BEGIN_NAMESPACE
+
+Vmr9VideoWindowControl::Vmr9VideoWindowControl(QObject *parent)
+ : QVideoWindowControl(parent)
+ , m_filter(com_new<IBaseFilter>(CLSID_VideoMixingRenderer9, IID_IBaseFilter))
+ , m_windowId(0)
+ , m_dirtyValues(0)
+ , m_brightness(0)
+ , m_contrast(0)
+ , m_hue(0)
+ , m_saturation(0)
+ , m_fullScreen(false)
+{
+ if (IVMRFilterConfig9 *config = com_cast<IVMRFilterConfig9>(m_filter, IID_IVMRFilterConfig9)) {
+ config->SetRenderingMode(VMR9Mode_Windowless);
+ config->SetNumberOfStreams(1);
+ config->Release();
+ }
+}
+
+Vmr9VideoWindowControl::~Vmr9VideoWindowControl()
+{
+ if (m_filter)
+ m_filter->Release();
+}
+
+
+WId Vmr9VideoWindowControl::winId() const
+{
+ return m_windowId;
+
+}
+
+void Vmr9VideoWindowControl::setWinId(WId id)
+{
+ m_windowId = id;
+
+ if (IVMRWindowlessControl9 *control = com_cast<IVMRWindowlessControl9>(
+ m_filter, IID_IVMRWindowlessControl9)) {
+ control->SetVideoClippingWindow(m_windowId);
+ control->Release();
+ }
+}
+
+QRect Vmr9VideoWindowControl::displayRect() const
+{
+ QRect rect;
+
+ if (IVMRWindowlessControl9 *control = com_cast<IVMRWindowlessControl9>(
+ m_filter, IID_IVMRWindowlessControl9)) {
+ RECT sourceRect;
+ RECT displayRect;
+
+ if (control->GetVideoPosition(&sourceRect, &displayRect) == S_OK) {
+ rect = QRect(
+ displayRect.left,
+ displayRect.bottom,
+ displayRect.right - displayRect.left,
+ displayRect.bottom - displayRect.top);
+ }
+ control->Release();
+ }
+ return rect;
+}
+
+void Vmr9VideoWindowControl::setDisplayRect(const QRect &rect)
+{
+ if (IVMRWindowlessControl9 *control = com_cast<IVMRWindowlessControl9>(
+ m_filter, IID_IVMRWindowlessControl9)) {
+ RECT sourceRect = { 0, 0, 0, 0 };
+ RECT displayRect = { rect.left(), rect.top(), rect.right(), rect.bottom() };
+
+ control->GetNativeVideoSize(&sourceRect.right, &sourceRect.bottom, 0, 0);
+ control->SetVideoPosition(&sourceRect, &displayRect);
+ control->Release();
+ }
+}
+
+bool Vmr9VideoWindowControl::isFullScreen() const
+{
+ return m_fullScreen;
+}
+
+void Vmr9VideoWindowControl::setFullScreen(bool fullScreen)
+{
+ emit fullScreenChanged(m_fullScreen = fullScreen);
+}
+
+void Vmr9VideoWindowControl::repaint()
+{
+
+ if (QWidget *widget = QWidget::find(m_windowId)) {
+ HDC dc = widget->getDC();
+ if (IVMRWindowlessControl9 *control = com_cast<IVMRWindowlessControl9>(
+ m_filter, IID_IVMRWindowlessControl9)) {
+ control->RepaintVideo(m_windowId, dc);
+ control->Release();
+ }
+ widget->releaseDC(dc);
+ }
+}
+
+QSize Vmr9VideoWindowControl::nativeSize() const
+{
+ QSize size;
+
+ if (IVMRWindowlessControl9 *control = com_cast<IVMRWindowlessControl9>(
+ m_filter, IID_IVMRWindowlessControl9)) {
+ LONG width;
+ LONG height;
+
+ if (control->GetNativeVideoSize(&width, &height, 0, 0) == S_OK)
+ size = QSize(width, height);
+ control->Release();
+ }
+ return size;
+}
+
+QVideoWidget::AspectRatioMode Vmr9VideoWindowControl::aspectRatioMode() const
+{
+ QVideoWidget::AspectRatioMode mode = QVideoWidget::KeepAspectRatio;
+
+ if (IVMRWindowlessControl9 *control = com_cast<IVMRWindowlessControl9>(
+ m_filter, IID_IVMRWindowlessControl9)) {
+ DWORD arMode;
+
+ if (control->GetAspectRatioMode(&arMode) == S_OK && arMode == VMR9ARMode_None)
+ mode = QVideoWidget::IgnoreAspectRatio;
+ control->Release();
+ }
+ return mode;
+}
+
+void Vmr9VideoWindowControl::setAspectRatioMode(QVideoWidget::AspectRatioMode mode)
+{
+ if (IVMRWindowlessControl9 *control = com_cast<IVMRWindowlessControl9>(
+ m_filter, IID_IVMRWindowlessControl9)) {
+ switch (mode) {
+ case QVideoWidget::IgnoreAspectRatio:
+ control->SetAspectRatioMode(VMR9ARMode_None);
+ break;
+ case QVideoWidget::KeepAspectRatio:
+ control->SetAspectRatioMode(VMR9ARMode_LetterBox);
+ break;
+ default:
+ break;
+ }
+ control->Release();
+ }
+}
+
+int Vmr9VideoWindowControl::brightness() const
+{
+ return m_brightness;
+}
+
+void Vmr9VideoWindowControl::setBrightness(int brightness)
+{
+ m_brightness = brightness;
+
+ m_dirtyValues |= ProcAmpControl9_Brightness;
+
+ setProcAmpValues();
+
+ emit brightnessChanged(brightness);
+}
+
+int Vmr9VideoWindowControl::contrast() const
+{
+ return m_contrast;
+}
+
+void Vmr9VideoWindowControl::setContrast(int contrast)
+{
+ m_contrast = contrast;
+
+ m_dirtyValues |= ProcAmpControl9_Contrast;
+
+ setProcAmpValues();
+
+ emit contrastChanged(contrast);
+}
+
+int Vmr9VideoWindowControl::hue() const
+{
+ return m_hue;
+}
+
+void Vmr9VideoWindowControl::setHue(int hue)
+{
+ m_hue = hue;
+
+ m_dirtyValues |= ProcAmpControl9_Hue;
+
+ setProcAmpValues();
+
+ emit hueChanged(hue);
+}
+
+int Vmr9VideoWindowControl::saturation() const
+{
+ return m_saturation;
+}
+
+void Vmr9VideoWindowControl::setSaturation(int saturation)
+{
+ m_saturation = saturation;
+
+ m_dirtyValues |= ProcAmpControl9_Saturation;
+
+ setProcAmpValues();
+
+ emit saturationChanged(saturation);
+}
+
+void Vmr9VideoWindowControl::setProcAmpValues()
+{
+ if (IVMRMixerControl9 *control = com_cast<IVMRMixerControl9>(m_filter, IID_IVMRMixerControl9)) {
+ VMR9ProcAmpControl procAmp;
+ procAmp.dwSize = sizeof(VMR9ProcAmpControl);
+ procAmp.dwFlags = m_dirtyValues;
+
+ if (m_dirtyValues & ProcAmpControl9_Brightness) {
+ procAmp.Brightness = scaleProcAmpValue(
+ control, ProcAmpControl9_Brightness, m_brightness);
+ }
+ if (m_dirtyValues & ProcAmpControl9_Contrast) {
+ procAmp.Contrast = scaleProcAmpValue(
+ control, ProcAmpControl9_Contrast, m_contrast);
+ }
+ if (m_dirtyValues & ProcAmpControl9_Hue) {
+ procAmp.Hue = scaleProcAmpValue(
+ control, ProcAmpControl9_Hue, m_hue);
+ }
+ if (m_dirtyValues & ProcAmpControl9_Saturation) {
+ procAmp.Saturation = scaleProcAmpValue(
+ control, ProcAmpControl9_Saturation, m_saturation);
+ }
+
+ if (SUCCEEDED(control->SetProcAmpControl(0, &procAmp))) {
+ m_dirtyValues = 0;
+ }
+
+ control->Release();
+ }
+}
+
+float Vmr9VideoWindowControl::scaleProcAmpValue(
+ IVMRMixerControl9 *control, VMR9ProcAmpControlFlags property, int value) const
+{
+ float scaledValue = 0.0;
+
+ VMR9ProcAmpControlRange range;
+ range.dwSize = sizeof(VMR9ProcAmpControlRange);
+ range.dwProperty = property;
+
+ if (SUCCEEDED(control->GetProcAmpControlRange(0, &range))) {
+ scaledValue = range.DefaultValue;
+ if (value > 0)
+ scaledValue += float(value) * (range.MaxValue - range.DefaultValue) / 100;
+ else if (value < 0)
+ scaledValue -= float(value) * (range.MinValue - range.DefaultValue) / 100;
+ }
+
+ return scaledValue;
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.h b/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.h
new file mode 100644
index 0000000000..a0aca9567e
--- /dev/null
+++ b/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.h
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef VMR9VIDEOWINDOWCONTROL_H
+#define VMR9VIDEOWINDOWCONTROL_H
+
+#include <QtMultimedia/qvideowindowcontrol.h>
+
+#include <dshow.h>
+#include <d3d9.h>
+#include <vmr9.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class Vmr9VideoWindowControl : public QVideoWindowControl
+{
+ Q_OBJECT
+public:
+ Vmr9VideoWindowControl(QObject *parent = 0);
+ ~Vmr9VideoWindowControl();
+
+ IBaseFilter *filter() const { return m_filter; }
+
+ WId winId() const;
+ void setWinId(WId id);
+
+ QRect displayRect() const;
+ void setDisplayRect(const QRect &rect);
+
+ bool isFullScreen() const;
+ void setFullScreen(bool fullScreen);
+
+ void repaint();
+
+ QSize nativeSize() const;
+
+ QVideoWidget::AspectRatioMode aspectRatioMode() const;
+ void setAspectRatioMode(QVideoWidget::AspectRatioMode mode);
+
+ int brightness() const;
+ void setBrightness(int brightness);
+
+ int contrast() const;
+ void setContrast(int contrast);
+
+ int hue() const;
+ void setHue(int hue);
+
+ int saturation() const;
+ void setSaturation(int saturation);
+
+private:
+ void setProcAmpValues();
+ float scaleProcAmpValue(
+ IVMRMixerControl9 *control, VMR9ProcAmpControlFlags property, int value) const;
+
+ IBaseFilter *m_filter;
+ WId m_windowId;
+ DWORD m_dirtyValues;
+ int m_brightness;
+ int m_contrast;
+ int m_hue;
+ int m_saturation;
+ bool m_fullScreen;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/gstreamer/gstreamer.pro b/src/plugins/mediaservices/gstreamer/gstreamer.pro
new file mode 100644
index 0000000000..d1bfe44d89
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/gstreamer.pro
@@ -0,0 +1,50 @@
+TARGET = gstengine
+include(../../qpluginbase.pri)
+
+QT += multimedia
+
+unix:contains(QT_CONFIG, alsa) {
+ DEFINES += HAVE_ALSA
+ LIBS += -lasound
+}
+
+QMAKE_CXXFLAGS += $$QT_CFLAGS_GSTREAMER
+LIBS += -lXv $$QT_LIBS_GSTREAMER -lgstinterfaces-0.10 -lgstvideo-0.10 -lgstbase-0.10 -lgstaudio-0.10
+
+# Input
+HEADERS += \
+ qgstreamermessage.h \
+ qgstreamerbushelper.h \
+ qgstreamervideooutputcontrol.h \
+ qgstreamervideorendererinterface.h \
+ qgstreamervideowidget.h \
+ qgstreamerserviceplugin.h \
+ qgstreamervideoinputdevicecontrol.h \
+ qgstreamervideooverlay.h \
+ qgstreamervideorenderer.h \
+ qgstvideobuffer.h \
+ qvideosurfacegstsink.h \
+ qx11videosurface.h \
+ qgstxvimagebuffer.h
+
+
+SOURCES += \
+ qgstreamermessage.cpp \
+ qgstreamerbushelper.cpp \
+ qgstreamervideooutputcontrol.cpp \
+ qgstreamervideorendererinterface.cpp \
+ qgstreamervideowidget.cpp \
+ qgstreamerserviceplugin.cpp \
+ qgstreamervideoinputdevicecontrol.cpp \
+ qgstreamervideooverlay.cpp \
+ qgstreamervideorenderer.cpp \
+ qgstvideobuffer.cpp \
+ qvideosurfacegstsink.cpp \
+ qx11videosurface.cpp \
+ qgstxvimagebuffer.cpp
+
+include(mediaplayer/mediaplayer.pri)
+
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/mediaservices
+target.path = $$[QT_INSTALL_PLUGINS]/mediaservices
+INSTALLS += target
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/mediaplayer.pri b/src/plugins/mediaservices/gstreamer/mediaplayer/mediaplayer.pri
new file mode 100644
index 0000000000..19ff034677
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/mediaplayer/mediaplayer.pri
@@ -0,0 +1,17 @@
+INCLUDEPATH += $$PWD
+
+DEFINES += QMEDIA_GSTREAMER_PLAYER
+
+HEADERS += \
+ $$PWD/qgstreamerplayercontrol.h \
+ $$PWD/qgstreamerplayerservice.h \
+ $$PWD/qgstreamerplayersession.h \
+ $$PWD/qgstreamermetadataprovider.h
+
+SOURCES += \
+ $$PWD/qgstreamerplayercontrol.cpp \
+ $$PWD/qgstreamerplayerservice.cpp \
+ $$PWD/qgstreamerplayersession.cpp \
+ $$PWD/qgstreamermetadataprovider.cpp
+
+
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp
new file mode 100644
index 0000000000..eff6ea42da
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp
@@ -0,0 +1,209 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qgstreamermetadataprovider.h"
+#include "qgstreamerplayersession.h"
+#include <QtCore/qdebug.h>
+
+#include <gst/gstversion.h>
+
+QT_BEGIN_NAMESPACE
+
+struct QGstreamerMetaDataKeyLookup
+{
+ QtMultimedia::MetaData key;
+ const char *token;
+};
+
+static const QGstreamerMetaDataKeyLookup qt_gstreamerMetaDataKeys[] =
+{
+ { QtMultimedia::Title, GST_TAG_TITLE },
+ //{ QtMultimedia::SubTitle, 0 },
+ //{ QtMultimedia::Author, 0 },
+ { QtMultimedia::Comment, GST_TAG_COMMENT },
+ { QtMultimedia::Description, GST_TAG_DESCRIPTION },
+ //{ QtMultimedia::Category, 0 },
+ { QtMultimedia::Genre, GST_TAG_GENRE },
+ { QtMultimedia::Year, "year" },
+ //{ QtMultimedia::UserRating, 0 },
+
+ { QtMultimedia::Language, GST_TAG_LANGUAGE_CODE },
+
+ { QtMultimedia::Publisher, GST_TAG_ORGANIZATION },
+ { QtMultimedia::Copyright, GST_TAG_COPYRIGHT },
+ //{ QtMultimedia::ParentalRating, 0 },
+ //{ QtMultimedia::RatingOrganisation, 0 },
+
+ // Media
+ //{ QtMultimedia::Size, 0 },
+ //{ QtMultimedia::MediaType, 0 },
+ { QtMultimedia::Duration, GST_TAG_DURATION },
+
+ // Audio
+ { QtMultimedia::AudioBitRate, GST_TAG_BITRATE },
+ { QtMultimedia::AudioCodec, GST_TAG_AUDIO_CODEC },
+ //{ QtMultimedia::ChannelCount, 0 },
+ //{ QtMultimedia::Frequency, 0 },
+
+ // Music
+ { QtMultimedia::AlbumTitle, GST_TAG_ALBUM },
+ { QtMultimedia::AlbumArtist, GST_TAG_ARTIST},
+ { QtMultimedia::ContributingArtist, GST_TAG_PERFORMER },
+#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19)
+ { QtMultimedia::Composer, GST_TAG_COMPOSER },
+#endif
+ //{ QtMultimedia::Conductor, 0 },
+ //{ QtMultimedia::Lyrics, 0 },
+ //{ QtMultimedia::Mood, 0 },
+ { QtMultimedia::TrackNumber, GST_TAG_TRACK_NUMBER },
+
+ //{ QtMultimedia::CoverArtUrlSmall, 0 },
+ //{ QtMultimedia::CoverArtUrlLarge, 0 },
+
+ // Image/Video
+ //{ QtMultimedia::Resolution, 0 },
+ //{ QtMultimedia::PixelAspectRatio, 0 },
+
+ // Video
+ //{ QtMultimedia::VideoFrameRate, 0 },
+ //{ QtMultimedia::VideoBitRate, 0 },
+ { QtMultimedia::VideoCodec, GST_TAG_VIDEO_CODEC },
+
+ //{ QtMultimedia::PosterUrl, 0 },
+
+ // Movie
+ //{ QtMultimedia::ChapterNumber, 0 },
+ //{ QtMultimedia::Director, 0 },
+ { QtMultimedia::LeadPerformer, GST_TAG_PERFORMER },
+ //{ QtMultimedia::Writer, 0 },
+
+ // Photos
+ //{ QtMultimedia::CameraManufacturer, 0 },
+ //{ QtMultimedia::CameraModel, 0 },
+ //{ QtMultimedia::Event, 0 },
+ //{ QtMultimedia::Subject, 0 }
+};
+
+QGstreamerMetaDataProvider::QGstreamerMetaDataProvider(QGstreamerPlayerSession *session, QObject *parent)
+ :QMetaDataControl(parent), m_session(session)
+{
+ connect(m_session, SIGNAL(tagsChanged()), SLOT(updateTags()));
+}
+
+QGstreamerMetaDataProvider::~QGstreamerMetaDataProvider()
+{
+}
+
+bool QGstreamerMetaDataProvider::isMetaDataAvailable() const
+{
+ return !m_session->tags().isEmpty();
+}
+
+bool QGstreamerMetaDataProvider::isWritable() const
+{
+ return false;
+}
+
+QVariant QGstreamerMetaDataProvider::metaData(QtMultimedia::MetaData key) const
+{
+ static const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
+
+ for (int i = 0; i < count; ++i) {
+ if (qt_gstreamerMetaDataKeys[i].key == key) {
+ return m_session->tags().value(QByteArray(qt_gstreamerMetaDataKeys[i].token));
+ }
+ }
+ return QVariant();
+}
+
+void QGstreamerMetaDataProvider::setMetaData(QtMultimedia::MetaData key, QVariant const &value)
+{
+ Q_UNUSED(key);
+ Q_UNUSED(value);
+}
+
+QList<QtMultimedia::MetaData> QGstreamerMetaDataProvider::availableMetaData() const
+{
+ static QMap<QByteArray, QtMultimedia::MetaData> keysMap;
+ if (keysMap.isEmpty()) {
+ const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
+ for (int i = 0; i < count; ++i) {
+ keysMap[QByteArray(qt_gstreamerMetaDataKeys[i].token)] = qt_gstreamerMetaDataKeys[i].key;
+ }
+ }
+
+ QList<QtMultimedia::MetaData> res;
+ foreach (const QByteArray &key, m_session->tags().keys()) {
+ QtMultimedia::MetaData tag = keysMap.value(key, QtMultimedia::MetaData(-1));
+ if (tag != -1)
+ res.append(tag);
+ }
+
+ return res;
+}
+
+QVariant QGstreamerMetaDataProvider::extendedMetaData(const QString &key) const
+{
+ return m_session->tags().value(key.toLatin1());
+}
+
+void QGstreamerMetaDataProvider::setExtendedMetaData(const QString &key, QVariant const &value)
+{
+ Q_UNUSED(key);
+ Q_UNUSED(value);
+}
+
+QStringList QGstreamerMetaDataProvider::availableExtendedMetaData() const
+{
+ QStringList res;
+ foreach (const QByteArray &key, m_session->tags().keys())
+ res.append(QString(key));
+
+ return res;
+}
+
+void QGstreamerMetaDataProvider::updateTags()
+{
+ emit metaDataChanged();
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamermetadataprovider.h b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamermetadataprovider.h
new file mode 100644
index 0000000000..267c2d7f7a
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamermetadataprovider.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGSTREAMERMETADATAPROVIDER_H
+#define QGSTREAMERMETADATAPROVIDER_H
+
+#include <QtMultimedia/qmetadatacontrol.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QGstreamerPlayerSession;
+
+class QGstreamerMetaDataProvider : public QMetaDataControl
+{
+ Q_OBJECT
+public:
+ QGstreamerMetaDataProvider( QGstreamerPlayerSession *session, QObject *parent );
+ virtual ~QGstreamerMetaDataProvider();
+
+ bool isMetaDataAvailable() const;
+ bool isWritable() const;
+
+ QVariant metaData(QtMultimedia::MetaData key) const;
+ void setMetaData(QtMultimedia::MetaData key, const QVariant &value);
+ QList<QtMultimedia::MetaData> availableMetaData() const;
+
+ QVariant extendedMetaData(const QString &key) const ;
+ void setExtendedMetaData(const QString &key, const QVariant &value);
+ QStringList availableExtendedMetaData() const;
+
+private slots:
+ void updateTags();
+
+private:
+ QGstreamerPlayerSession *m_session;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QGSTREAMERMETADATAPROVIDER_H
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
new file mode 100644
index 0000000000..e6466932da
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
@@ -0,0 +1,451 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qgstreamerplayercontrol.h"
+#include "qgstreamerplayersession.h"
+
+#include <qmediaplaylistnavigator.h>
+
+#include <QtCore/qdir.h>
+#include <QtCore/qsocketnotifier.h>
+#include <QtCore/qurl.h>
+#include <QtCore/qdebug.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+QT_BEGIN_NAMESPACE
+
+QGstreamerPlayerControl::QGstreamerPlayerControl(QGstreamerPlayerSession *session, QObject *parent)
+ : QMediaPlayerControl(parent)
+ , m_session(session)
+ , m_state(QMediaPlayer::StoppedState)
+ , m_mediaStatus(QMediaPlayer::NoMedia)
+ , m_bufferProgress(-1)
+ , m_stream(0)
+ , m_fifoNotifier(0)
+ , m_fifoCanWrite(false)
+ , m_bufferSize(0)
+ , m_bufferOffset(0)
+{
+ m_fifoFd[0] = -1;
+ m_fifoFd[1] = -1;
+
+ connect(m_session, SIGNAL(positionChanged(qint64)),
+ this, SIGNAL(positionChanged(qint64)));
+ connect(m_session, SIGNAL(durationChanged(qint64)),
+ this, SIGNAL(durationChanged(qint64)));
+ connect(m_session, SIGNAL(mutedStateChanged(bool)),
+ this, SIGNAL(mutedChanged(bool)));
+ connect(m_session, SIGNAL(volumeChanged(int)),
+ this, SIGNAL(volumeChanged(int)));
+ connect(m_session, SIGNAL(stateChanged(QMediaPlayer::State)),
+ this, SLOT(updateState(QMediaPlayer::State)));
+ connect(m_session,SIGNAL(bufferingProgressChanged(int)),
+ this, SLOT(setBufferProgress(int)));
+ connect(m_session, SIGNAL(playbackFinished()),
+ this, SLOT(processEOS()));
+ connect(m_session, SIGNAL(audioAvailableChanged(bool)),
+ this, SIGNAL(audioAvailableChanged(bool)));
+ connect(m_session, SIGNAL(videoAvailableChanged(bool)),
+ this, SIGNAL(videoAvailableChanged(bool)));
+ connect(m_session, SIGNAL(seekableChanged(bool)),
+ this, SIGNAL(seekableChanged(bool)));
+ connect(m_session, SIGNAL(error(int,QString)),
+ this, SIGNAL(error(int,QString)));
+}
+
+QGstreamerPlayerControl::~QGstreamerPlayerControl()
+{
+ if (m_fifoFd[0] >= 0) {
+ ::close(m_fifoFd[0]);
+ ::close(m_fifoFd[1]);
+ m_fifoFd[0] = -1;
+ m_fifoFd[1] = -1;
+ }
+}
+
+qint64 QGstreamerPlayerControl::position() const
+{
+ return m_session->position();
+}
+
+qint64 QGstreamerPlayerControl::duration() const
+{
+ return m_session->duration();
+}
+
+QMediaPlayer::State QGstreamerPlayerControl::state() const
+{
+ return m_state;
+}
+
+QMediaPlayer::MediaStatus QGstreamerPlayerControl::mediaStatus() const
+{
+ return m_mediaStatus;
+}
+
+int QGstreamerPlayerControl::bufferStatus() const
+{
+ if (m_bufferProgress == -1) {
+ return m_session->state() == QMediaPlayer::StoppedState ? 0 : 100;
+ } else
+ return m_bufferProgress;
+}
+
+int QGstreamerPlayerControl::volume() const
+{
+ return m_session->volume();
+}
+
+bool QGstreamerPlayerControl::isMuted() const
+{
+ return m_session->isMuted();
+}
+
+bool QGstreamerPlayerControl::isSeekable() const
+{
+ return m_session->isSeekable();
+}
+
+QMediaTimeRange QGstreamerPlayerControl::availablePlaybackRanges() const
+{
+ QMediaTimeRange ranges;
+
+ if (m_session->isSeekable())
+ ranges.addInterval(0, m_session->duration());
+
+ return ranges;
+}
+
+qreal QGstreamerPlayerControl::playbackRate() const
+{
+ return m_session->playbackRate();
+}
+
+void QGstreamerPlayerControl::setPlaybackRate(qreal rate)
+{
+ m_session->setPlaybackRate(rate);
+}
+
+void QGstreamerPlayerControl::setPosition(qint64 pos)
+{
+ m_session->seek(pos);
+}
+
+void QGstreamerPlayerControl::play()
+{
+ if (m_session->play()) {
+ if (m_state != QMediaPlayer::PlayingState)
+ emit stateChanged(m_state = QMediaPlayer::PlayingState);
+ }
+}
+
+void QGstreamerPlayerControl::pause()
+{
+ if (m_session->pause()) {
+ if (m_state != QMediaPlayer::PausedState)
+ emit stateChanged(m_state = QMediaPlayer::PausedState);
+ }
+}
+
+void QGstreamerPlayerControl::stop()
+{
+ if (m_state != QMediaPlayer::StoppedState) {
+ m_session->pause();
+ if (!m_session->seek(0)) {
+ m_bufferProgress = -1;
+ m_session->stop();
+ m_session->pause();
+ }
+ emit positionChanged(0);
+ if (m_state != QMediaPlayer::StoppedState)
+ emit stateChanged(m_state = QMediaPlayer::StoppedState);
+ }
+}
+
+void QGstreamerPlayerControl::setVolume(int volume)
+{
+ m_session->setVolume(volume);
+}
+
+void QGstreamerPlayerControl::setMuted(bool muted)
+{
+ m_session->setMuted(muted);
+}
+
+QMediaContent QGstreamerPlayerControl::media() const
+{
+ return m_currentResource;
+}
+
+const QIODevice *QGstreamerPlayerControl::mediaStream() const
+{
+ return m_stream;
+}
+
+void QGstreamerPlayerControl::setMedia(const QMediaContent &content, QIODevice *stream)
+{
+ QMediaPlayer::State oldState = m_state;
+ m_state = QMediaPlayer::StoppedState;
+ m_session->stop();
+
+ if (m_bufferProgress != -1) {
+ m_bufferProgress = -1;
+ emit bufferStatusChanged(0);
+ }
+
+ if (m_stream) {
+ closeFifo();
+
+ disconnect(m_stream, SIGNAL(readyRead()), this, SLOT(writeFifo()));
+ m_stream = 0;
+ }
+
+ m_currentResource = content;
+ m_stream = stream;
+
+ QUrl url;
+
+ if (m_stream) {
+ if (m_stream->isReadable() && openFifo()) {
+ url = QUrl(QString(QLatin1String("fd://%1")).arg(m_fifoFd[0]));
+ }
+ } else if (!content.isNull()) {
+ url = content.canonicalUrl();
+ }
+
+ m_session->load(url);
+
+ if (m_fifoFd[1] >= 0) {
+ m_fifoCanWrite = true;
+
+ writeFifo();
+ }
+
+ if (!url.isEmpty()) {
+ if (m_mediaStatus != QMediaPlayer::LoadingMedia)
+ emit mediaStatusChanged(m_mediaStatus = QMediaPlayer::LoadingMedia);
+ m_session->pause();
+ } else {
+ if (m_mediaStatus != QMediaPlayer::NoMedia)
+ emit mediaStatusChanged(m_mediaStatus = QMediaPlayer::NoMedia);
+ setBufferProgress(0);
+ }
+
+ emit mediaChanged(m_currentResource);
+ if (m_state != oldState)
+ emit stateChanged(m_state);
+}
+
+void QGstreamerPlayerControl::setVideoOutput(QObject *output)
+{
+ m_session->setVideoRenderer(output);
+}
+
+bool QGstreamerPlayerControl::isAudioAvailable() const
+{
+ return m_session->isAudioAvailable();
+}
+
+bool QGstreamerPlayerControl::isVideoAvailable() const
+{
+ return m_session->isVideoAvailable();
+}
+
+void QGstreamerPlayerControl::updateState(QMediaPlayer::State state)
+{
+ QMediaPlayer::MediaStatus oldStatus = m_mediaStatus;
+
+ switch (state) {
+ case QMediaPlayer::StoppedState:
+ if (m_state != QMediaPlayer::StoppedState)
+ emit stateChanged(m_state = QMediaPlayer::StoppedState);
+ break;
+
+ case QMediaPlayer::PlayingState:
+ case QMediaPlayer::PausedState:
+ if (m_state == QMediaPlayer::StoppedState)
+ m_mediaStatus = QMediaPlayer::LoadedMedia;
+ else {
+ if (m_bufferProgress == -1)
+ m_mediaStatus = QMediaPlayer::BufferedMedia;
+ }
+ break;
+ }
+
+ if (m_mediaStatus != oldStatus)
+ emit mediaStatusChanged(m_mediaStatus);
+}
+
+void QGstreamerPlayerControl::processEOS()
+{
+ m_mediaStatus = QMediaPlayer::EndOfMedia;
+ m_state = QMediaPlayer::StoppedState;
+
+ emit stateChanged(m_state);
+ emit mediaStatusChanged(m_mediaStatus);
+}
+
+void QGstreamerPlayerControl::setBufferProgress(int progress)
+{
+ if (m_bufferProgress == progress || m_mediaStatus == QMediaPlayer::NoMedia)
+ return;
+
+ QMediaPlayer::MediaStatus oldStatus = m_mediaStatus;
+
+ m_bufferProgress = progress;
+
+ if (m_state == QMediaPlayer::StoppedState) {
+ m_mediaStatus = QMediaPlayer::LoadedMedia;
+ } else {
+ if (m_bufferProgress < 100) {
+ m_mediaStatus = QMediaPlayer::StalledMedia;
+ m_session->pause();
+ } else {
+ m_mediaStatus = QMediaPlayer::BufferedMedia;
+ if (m_state == QMediaPlayer::PlayingState)
+ m_session->play();
+ }
+ }
+
+ if (m_mediaStatus != oldStatus)
+ emit mediaStatusChanged(m_mediaStatus);
+
+ emit bufferStatusChanged(m_bufferProgress);
+}
+
+void QGstreamerPlayerControl::writeFifo()
+{
+ if (m_fifoCanWrite) {
+ qint64 bytesToRead = qMin<qint64>(
+ m_stream->bytesAvailable(), PIPE_BUF - m_bufferSize);
+
+ if (bytesToRead > 0) {
+ int bytesRead = m_stream->read(&m_buffer[m_bufferOffset + m_bufferSize], bytesToRead);
+
+ if (bytesRead > 0)
+ m_bufferSize += bytesRead;
+ }
+
+ if (m_bufferSize > 0) {
+ int bytesWritten = ::write(m_fifoFd[1], &m_buffer[m_bufferOffset], size_t(m_bufferSize));
+
+ if (bytesWritten > 0) {
+ m_bufferOffset += bytesWritten;
+ m_bufferSize -= bytesWritten;
+
+ if (m_bufferSize == 0)
+ m_bufferOffset = 0;
+ } else if (errno == EAGAIN) {
+ m_fifoCanWrite = false;
+ } else {
+ closeFifo();
+ }
+ }
+ }
+
+ m_fifoNotifier->setEnabled(m_stream->bytesAvailable() > 0);
+}
+
+void QGstreamerPlayerControl::fifoReadyWrite(int socket)
+{
+ if (socket == m_fifoFd[1]) {
+ m_fifoCanWrite = true;
+
+ writeFifo();
+ }
+}
+
+bool QGstreamerPlayerControl::openFifo()
+{
+ Q_ASSERT(m_fifoFd[0] < 0);
+ Q_ASSERT(m_fifoFd[1] < 0);
+
+ if (::pipe(m_fifoFd) == 0) {
+ int flags = ::fcntl(m_fifoFd[1], F_GETFD);
+
+ if (::fcntl(m_fifoFd[1], F_SETFD, flags | O_NONBLOCK) >= 0) {
+ m_fifoNotifier = new QSocketNotifier(m_fifoFd[1], QSocketNotifier::Write);
+
+ connect(m_fifoNotifier, SIGNAL(activated(int)), this, SLOT(fifoReadyWrite(int)));
+
+ return true;
+ } else {
+ qWarning("Failed to make pipe non blocking %d", errno);
+
+ ::close(m_fifoFd[0]);
+ ::close(m_fifoFd[1]);
+
+ m_fifoFd[0] = -1;
+ m_fifoFd[1] = -1;
+
+ return false;
+ }
+ } else {
+ qWarning("Failed to create pipe %d", errno);
+
+ return false;
+ }
+}
+
+void QGstreamerPlayerControl::closeFifo()
+{
+ if (m_fifoFd[0] >= 0) {
+ delete m_fifoNotifier;
+ m_fifoNotifier = 0;
+
+ ::close(m_fifoFd[0]);
+ ::close(m_fifoFd[1]);
+ m_fifoFd[0] = -1;
+ m_fifoFd[1] = -1;
+
+ m_fifoCanWrite = false;
+
+ m_bufferSize = 0;
+ m_bufferOffset = 0;
+ }
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.h b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.h
new file mode 100644
index 0000000000..0c53945bf3
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.h
@@ -0,0 +1,136 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGSTREAMERPLAYERCONTROL_H
+#define QGSTREAMERPLAYERCONTROL_H
+
+#include <QtCore/qobject.h>
+
+#include <QtMultimedia/qmediaplayercontrol.h>
+#include <QtMultimedia/qmediaplayer.h>
+
+#include <limits.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QMediaPlaylist;
+class QGstreamerPlayerSession;
+class QGstreamerPlayerService;
+class QMediaPlaylistNavigator;
+class QSocketNotifier;
+
+class QGstreamerPlayerControl : public QMediaPlayerControl
+{
+ Q_OBJECT
+
+public:
+ QGstreamerPlayerControl(QGstreamerPlayerSession *session, QObject *parent = 0);
+ ~QGstreamerPlayerControl();
+
+ QMediaPlayer::State state() const;
+ QMediaPlayer::MediaStatus mediaStatus() const;
+
+ qint64 position() const;
+ qint64 duration() const;
+
+ int bufferStatus() const;
+
+ int volume() const;
+ bool isMuted() const;
+
+ bool isAudioAvailable() const;
+ bool isVideoAvailable() const;
+ void setVideoOutput(QObject *output);
+
+ bool isSeekable() const;
+ QMediaTimeRange availablePlaybackRanges() const;
+
+ qreal playbackRate() const;
+ void setPlaybackRate(qreal rate);
+
+ QMediaContent media() const;
+ const QIODevice *mediaStream() const;
+ void setMedia(const QMediaContent&, QIODevice *);
+
+public Q_SLOTS:
+ void setPosition(qint64 pos);
+
+ void play();
+ void pause();
+ void stop();
+
+ void setVolume(int volume);
+ void setMuted(bool muted);
+
+private Q_SLOTS:
+ void writeFifo();
+ void fifoReadyWrite(int socket);
+
+ void updateState(QMediaPlayer::State);
+ void processEOS();
+ void setBufferProgress(int progress);
+
+private:
+ bool openFifo();
+ void closeFifo();
+
+ QGstreamerPlayerSession *m_session;
+ QMediaPlayer::State m_state;
+ QMediaPlayer::MediaStatus m_mediaStatus;
+ int m_bufferProgress;
+ QMediaContent m_currentResource;
+ QIODevice *m_stream;
+ QSocketNotifier *m_fifoNotifier;
+ int m_fifoFd[2];
+ bool m_fifoCanWrite;
+ int m_bufferSize;
+ int m_bufferOffset;
+ char m_buffer[PIPE_BUF];
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.cpp b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.cpp
new file mode 100644
index 0000000000..d5d7bd08bf
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.cpp
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qvariant.h>
+#include <QtCore/qdebug.h>
+#include <QtGui/qwidget.h>
+
+#include "qgstreamerplayerservice.h"
+#include "qgstreamerplayercontrol.h"
+#include "qgstreamerplayersession.h"
+#include "qgstreamermetadataprovider.h"
+#include "qgstreamervideooutputcontrol.h"
+
+#include "qgstreamervideooverlay.h"
+#include "qgstreamervideorenderer.h"
+
+#include "qgstreamervideowidget.h"
+//#include "qgstreamerstreamscontrol.h"
+
+#include <qmediaplaylistnavigator.h>
+#include <qmediaplaylist.h>
+
+
+QT_BEGIN_NAMESPACE
+
+
+QGstreamerPlayerService::QGstreamerPlayerService(QObject *parent):
+ QMediaService(parent)
+{
+ m_session = new QGstreamerPlayerSession(this);
+ m_control = new QGstreamerPlayerControl(m_session, this);
+ m_metaData = new QGstreamerMetaDataProvider(m_session, this);
+ m_videoOutput = new QGstreamerVideoOutputControl(this);
+// m_streamsControl = new QGstreamerStreamsControl(m_session,this);
+
+ connect(m_videoOutput, SIGNAL(outputChanged(QVideoOutputControl::Output)),
+ this, SLOT(videoOutputChanged(QVideoOutputControl::Output)));
+ m_videoRenderer = new QGstreamerVideoRenderer(this);
+ m_videoWindow = new QGstreamerVideoOverlay(this);
+ m_videoWidget = new QGstreamerVideoWidgetControl(this);
+
+ m_videoOutput->setAvailableOutputs(QList<QVideoOutputControl::Output>()
+ << QVideoOutputControl::RendererOutput
+ << QVideoOutputControl::WindowOutput
+ << QVideoOutputControl::WidgetOutput);
+}
+
+QGstreamerPlayerService::~QGstreamerPlayerService()
+{
+}
+
+QMediaControl *QGstreamerPlayerService::control(const char *name) const
+{
+ if (qstrcmp(name,QMediaPlayerControl_iid) == 0)
+ return m_control;
+
+ if (qstrcmp(name,QMetaDataControl_iid) == 0)
+ return m_metaData;
+
+// if (qstrcmp(name,QMediaStreamsControl_iid) == 0)
+// return m_streamsControl;
+
+ if (qstrcmp(name, QVideoOutputControl_iid) == 0)
+ return m_videoOutput;
+
+ if (qstrcmp(name, QVideoWidgetControl_iid) == 0)
+ return m_videoWidget;
+
+ if (qstrcmp(name, QVideoRendererControl_iid) == 0)
+ return m_videoRenderer;
+
+ if (qstrcmp(name, QVideoWindowControl_iid) == 0)
+ return m_videoWindow;
+
+ return 0;
+}
+
+void QGstreamerPlayerService::videoOutputChanged(QVideoOutputControl::Output output)
+{
+ switch (output) {
+ case QVideoOutputControl::NoOutput:
+ m_control->setVideoOutput(0);
+ break;
+ case QVideoOutputControl::RendererOutput:
+ m_control->setVideoOutput(m_videoRenderer);
+ break;
+ case QVideoOutputControl::WindowOutput:
+ m_control->setVideoOutput(m_videoWindow);
+ break;
+ case QVideoOutputControl::WidgetOutput:
+ m_control->setVideoOutput(m_videoWidget);
+ break;
+ default:
+ qWarning("Invalid video output selection");
+ break;
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.h b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.h
new file mode 100644
index 0000000000..f60c72ee65
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.h
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGSTREAMERPLAYERSERVICE_H
+#define QGSTREAMERPLAYERSERVICE_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qiodevice.h>
+
+#include <QtMultimedia/qmediaservice.h>
+
+#include "qgstreamervideooutputcontrol.h"
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QMediaMetaData;
+class QMediaPlayerControl;
+class QMediaPlaylist;
+class QMediaPlaylistNavigator;
+class QGstreamerMetaData;
+class QGstreamerPlayerControl;
+class QGstreamerPlayerSession;
+class QGstreamerMetaDataProvider;
+class QGstreamerStreamsControl;
+class QGstreamerVideoRenderer;
+class QGstreamerVideoOverlay;
+class QGstreamerVideoWidgetControl;
+
+
+class QGstreamerPlayerService : public QMediaService
+{
+ Q_OBJECT
+public:
+ QGstreamerPlayerService(QObject *parent = 0);
+ ~QGstreamerPlayerService();
+
+ //void setVideoOutput(QObject *output);
+
+ QMediaControl *control(const char *name) const;
+
+private slots:
+ void videoOutputChanged(QVideoOutputControl::Output output);
+
+private:
+ QGstreamerPlayerControl *m_control;
+ QGstreamerPlayerSession *m_session;
+ QGstreamerMetaDataProvider *m_metaData;
+ QGstreamerVideoOutputControl *m_videoOutput;
+ QGstreamerStreamsControl *m_streamsControl;
+
+ QGstreamerVideoRenderer *m_videoRenderer;
+ QGstreamerVideoOverlay *m_videoWindow;
+ QGstreamerVideoWidgetControl *m_videoWidget;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp
new file mode 100644
index 0000000000..392a7a8b37
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp
@@ -0,0 +1,754 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qgstreamerplayersession.h"
+#include "qgstreamerbushelper.h"
+
+#include "qgstreamervideorendererinterface.h"
+
+#include <gst/gstvalue.h>
+
+#include <QtCore/qdatetime.h>
+#include <QtCore/qdebug.h>
+
+//#define USE_PLAYBIN2
+
+
+QT_BEGIN_NAMESPACE
+
+QGstreamerPlayerSession::QGstreamerPlayerSession(QObject *parent)
+ :QObject(parent),
+ m_state(QMediaPlayer::StoppedState),
+ m_busHelper(0),
+ m_playbin(0),
+ m_nullVideoOutput(0),
+ m_bus(0),
+ m_renderer(0),
+ m_volume(100),
+ m_playbackRate(1.0),
+ m_muted(false),
+ m_audioAvailable(false),
+ m_videoAvailable(false),
+ m_seekable(false),
+ m_lastPosition(0),
+ m_duration(-1)
+{
+ static bool initialized = false;
+ if (!initialized) {
+ initialized = true;
+ gst_init(NULL, NULL);
+ }
+
+#ifdef USE_PLAYBIN2
+ m_playbin = gst_element_factory_make("playbin2", NULL);
+#else
+ m_playbin = gst_element_factory_make("playbin", NULL);
+#endif
+
+ if (m_playbin != 0) {
+ // Sort out messages
+ m_bus = gst_element_get_bus(m_playbin);
+ m_busHelper = new QGstreamerBusHelper(m_bus, this);
+ connect(m_busHelper, SIGNAL(message(QGstreamerMessage)), SLOT(busMessage(QGstreamerMessage)));
+ m_busHelper->installSyncEventFilter(this);
+
+ m_nullVideoOutput = gst_element_factory_make("fakesink", NULL);
+ gst_object_ref(GST_OBJECT(m_nullVideoOutput));
+ g_object_set(G_OBJECT(m_playbin), "video-sink", m_nullVideoOutput, NULL);
+
+ // Initial volume
+ double volume = 1.0;
+ g_object_get(G_OBJECT(m_playbin), "volume", &volume, NULL);
+ m_volume = int(volume*100);
+ }
+}
+
+QGstreamerPlayerSession::~QGstreamerPlayerSession()
+{
+ if (m_playbin) {
+ stop();
+
+ delete m_busHelper;
+ gst_object_unref(GST_OBJECT(m_bus));
+ gst_object_unref(GST_OBJECT(m_playbin));
+ gst_object_unref(GST_OBJECT(m_nullVideoOutput));
+ }
+}
+
+void QGstreamerPlayerSession::load(const QUrl &url)
+{
+ m_url = url;
+
+ if (m_playbin) {
+ m_tags.clear();
+ emit tagsChanged();
+
+ g_object_set(G_OBJECT(m_playbin), "uri", m_url.toEncoded().constData(), NULL);
+
+// if (!m_streamTypes.isEmpty()) {
+// m_streamProperties.clear();
+// m_streamTypes.clear();
+//
+// emit streamsChanged();
+// }
+ }
+}
+
+qint64 QGstreamerPlayerSession::duration() const
+{
+ return m_duration;
+}
+
+qint64 QGstreamerPlayerSession::position() const
+{
+ GstFormat format = GST_FORMAT_TIME;
+ gint64 position = 0;
+
+ if ( m_playbin && gst_element_query_position(m_playbin, &format, &position))
+ return position / 1000000;
+ else
+ return 0;
+}
+
+qreal QGstreamerPlayerSession::playbackRate() const
+{
+ return m_playbackRate;
+}
+
+void QGstreamerPlayerSession::setPlaybackRate(qreal rate)
+{
+ if (!qFuzzyCompare(m_playbackRate, rate)) {
+ m_playbackRate = rate;
+ if (m_playbin) {
+ gst_element_seek(m_playbin, rate, GST_FORMAT_TIME,
+ GstSeekFlags(GST_SEEK_FLAG_ACCURATE | GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SEGMENT),
+ GST_SEEK_TYPE_NONE,0,
+ GST_SEEK_TYPE_NONE,0 );
+ }
+ }
+}
+
+
+//int QGstreamerPlayerSession::activeStream(QMediaStreamsControl::StreamType streamType) const
+//{
+// int streamNumber = -1;
+// if (m_playbin) {
+// switch (streamType) {
+// case QMediaStreamsControl::AudioStream:
+// g_object_set(G_OBJECT(m_playbin), "current-audio", streamNumber, NULL);
+// break;
+// case QMediaStreamsControl::VideoStream:
+// g_object_set(G_OBJECT(m_playbin), "current-video", streamNumber, NULL);
+// break;
+// case QMediaStreamsControl::SubPictureStream:
+// g_object_set(G_OBJECT(m_playbin), "current-text", streamNumber, NULL);
+// break;
+// default:
+// break;
+// }
+// }
+//
+//#ifdef USE_PLAYBIN2
+// streamNumber += m_playbin2StreamOffset.value(streamType,0);
+//#endif
+//
+// return streamNumber;
+//}
+
+//void QGstreamerPlayerSession::setActiveStream(QMediaStreamsControl::StreamType streamType, int streamNumber)
+//{
+//#ifdef USE_PLAYBIN2
+// streamNumber -= m_playbin2StreamOffset.value(streamType,0);
+//#endif
+//
+// if (m_playbin) {
+// switch (streamType) {
+// case QMediaStreamsControl::AudioStream:
+// g_object_get(G_OBJECT(m_playbin), "current-audio", &streamNumber, NULL);
+// break;
+// case QMediaStreamsControl::VideoStream:
+// g_object_get(G_OBJECT(m_playbin), "current-video", &streamNumber, NULL);
+// break;
+// case QMediaStreamsControl::SubPictureStream:
+// g_object_get(G_OBJECT(m_playbin), "current-text", &streamNumber, NULL);
+// break;
+// default:
+// break;
+// }
+// }
+//}
+
+
+bool QGstreamerPlayerSession::isBuffering() const
+{
+ return false;
+}
+
+int QGstreamerPlayerSession::bufferingProgress() const
+{
+ return 0;
+}
+
+int QGstreamerPlayerSession::volume() const
+{
+ return m_volume;
+}
+
+bool QGstreamerPlayerSession::isMuted() const
+{
+ return m_muted;
+}
+
+bool QGstreamerPlayerSession::isAudioAvailable() const
+{
+ return m_audioAvailable;
+}
+
+void QGstreamerPlayerSession::setVideoRenderer(QObject *videoOutput)
+{
+ m_renderer = qobject_cast<QGstreamerVideoRendererInterface*>(videoOutput);
+ if (m_renderer)
+ g_object_set(G_OBJECT(m_playbin), "video-sink", m_renderer->videoSink(), NULL);
+ else
+ g_object_set(G_OBJECT(m_playbin), "video-sink", m_nullVideoOutput, NULL);
+}
+
+bool QGstreamerPlayerSession::isVideoAvailable() const
+{
+ return m_videoAvailable;
+}
+
+bool QGstreamerPlayerSession::isSeekable() const
+{
+ return m_seekable;
+}
+
+bool QGstreamerPlayerSession::play()
+{
+ if (m_playbin) {
+ if (gst_element_set_state(m_playbin, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
+ qWarning() << "GStreamer; Unable to play -" << m_url.toString();
+ m_state = QMediaPlayer::StoppedState;
+
+ emit stateChanged(m_state);
+ emit error(int(QMediaPlayer::ResourceError), tr("Unable to play %1").arg(m_url.path()));
+ } else
+ return true;
+ }
+
+ return false;
+}
+
+bool QGstreamerPlayerSession::pause()
+{
+ if (m_playbin) {
+ if (gst_element_set_state(m_playbin, GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE) {
+ qWarning() << "GStreamer; Unable to play -" << m_url.toString();
+ m_state = QMediaPlayer::StoppedState;
+
+ emit stateChanged(m_state);
+ emit error(int(QMediaPlayer::ResourceError), tr("Unable to play %1").arg(m_url.path()));
+ } else
+ return true;
+ }
+
+ return false;
+}
+
+void QGstreamerPlayerSession::stop()
+{
+ if (m_playbin) {
+ gst_element_set_state(m_playbin, GST_STATE_NULL);
+
+ //we have to do it here, since gstreamer will not emit bus messages any more
+ if (m_state != QMediaPlayer::StoppedState)
+ emit stateChanged(m_state = QMediaPlayer::StoppedState);
+ }
+}
+
+bool QGstreamerPlayerSession::seek(qint64 ms)
+{
+ if (m_playbin && m_state != QMediaPlayer::StoppedState) {
+ gint64 position = (gint64)ms * 1000000;
+ return gst_element_seek_simple(m_playbin, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, position);
+ }
+
+ return false;
+}
+
+void QGstreamerPlayerSession::setVolume(int volume)
+{
+ if (m_volume != volume) {
+ m_volume = volume;
+
+ if (m_playbin) {
+#ifndef USE_PLAYBIN2
+ if(!m_muted)
+#endif
+ g_object_set(G_OBJECT(m_playbin), "volume", m_volume/100.0, NULL);
+ }
+
+ emit volumeChanged(m_volume);
+ }
+
+}
+
+void QGstreamerPlayerSession::setMuted(bool muted)
+{
+ if (m_muted != muted) {
+ m_muted = muted;
+
+#ifdef USE_PLAYBIN2
+ g_object_set(G_OBJECT(m_playbin), "mute", m_muted, NULL);
+#else
+ g_object_set(G_OBJECT(m_playbin), "volume", (m_muted ? 0 : m_volume/100.0), NULL);
+#endif
+ emit mutedStateChanged(m_muted);
+ }
+}
+
+static void addTagToMap(const GstTagList *list,
+ const gchar *tag,
+ gpointer user_data)
+{
+ QMap<QByteArray, QVariant> *map = reinterpret_cast<QMap<QByteArray, QVariant>* >(user_data);
+
+ GValue val;
+ val.g_type = 0;
+ gst_tag_list_copy_value(&val,list,tag);
+
+ switch( G_VALUE_TYPE(&val) ) {
+ case G_TYPE_STRING:
+ {
+ const gchar *str_value = g_value_get_string(&val);
+ map->insert(QByteArray(tag), QString::fromUtf8(str_value));
+ break;
+ }
+ case G_TYPE_INT:
+ map->insert(QByteArray(tag), g_value_get_int(&val));
+ break;
+ case G_TYPE_UINT:
+ map->insert(QByteArray(tag), g_value_get_uint(&val));
+ break;
+ case G_TYPE_LONG:
+ map->insert(QByteArray(tag), qint64(g_value_get_long(&val)));
+ break;
+ case G_TYPE_BOOLEAN:
+ map->insert(QByteArray(tag), g_value_get_boolean(&val));
+ break;
+ case G_TYPE_CHAR:
+ map->insert(QByteArray(tag), g_value_get_char(&val));
+ break;
+ case G_TYPE_DOUBLE:
+ map->insert(QByteArray(tag), g_value_get_double(&val));
+ break;
+ default:
+ // GST_TYPE_DATE is a function, not a constant, so pull it out of the switch
+ if (G_VALUE_TYPE(&val) == GST_TYPE_DATE) {
+ const GDate *date = gst_value_get_date(&val);
+ if (g_date_valid(date)) {
+ int year = g_date_get_year(date);
+ int month = g_date_get_month(date);
+ int day = g_date_get_day(date);
+ map->insert(QByteArray(tag), QDate(year,month,day));
+ if (!map->contains("year"))
+ map->insert("year", year);
+ }
+ } else if (G_VALUE_TYPE(&val) == GST_TYPE_FRACTION) {
+ int nom = gst_value_get_fraction_numerator(&val);
+ int denom = gst_value_get_fraction_denominator(&val);
+
+ if (denom > 0) {
+ map->insert(QByteArray(tag), double(nom)/denom);
+ }
+ }
+ break;
+ }
+
+ g_value_unset(&val);
+}
+
+void QGstreamerPlayerSession::setSeekable(bool seekable)
+{
+ if (seekable != m_seekable) {
+ m_seekable = seekable;
+ emit seekableChanged(m_seekable);
+ }
+}
+
+bool QGstreamerPlayerSession::processSyncMessage(const QGstreamerMessage &message)
+{
+ GstMessage* gm = message.rawMessage();
+
+ if (gm &&
+ GST_MESSAGE_TYPE(gm) == GST_MESSAGE_ELEMENT &&
+ gst_structure_has_name(gm->structure, "prepare-xwindow-id"))
+ {
+ if (m_renderer)
+ m_renderer->precessNewStream();
+ return true;
+ }
+
+ return false;
+}
+
+void QGstreamerPlayerSession::busMessage(const QGstreamerMessage &message)
+{
+ GstMessage* gm = message.rawMessage();
+
+ if (gm == 0) {
+ // Null message, query current position
+ quint32 newPos = position();
+
+ if (newPos/1000 != m_lastPosition) {
+ m_lastPosition = newPos/1000;
+ emit positionChanged(newPos);
+ }
+
+ } else {
+ //tag message comes from elements inside playbin, not from playbin itself
+ if (GST_MESSAGE_TYPE(gm) == GST_MESSAGE_TAG) {
+ //qDebug() << "tag message";
+ GstTagList *tag_list;
+ gst_message_parse_tag(gm, &tag_list);
+ gst_tag_list_foreach(tag_list, addTagToMap, &m_tags);
+
+ //qDebug() << m_tags;
+
+ emit tagsChanged();
+ }
+
+ if (GST_MESSAGE_SRC(gm) == GST_OBJECT_CAST(m_playbin)) {
+ switch (GST_MESSAGE_TYPE(gm)) {
+ case GST_MESSAGE_STATE_CHANGED:
+ {
+ GstState oldState;
+ GstState newState;
+ GstState pending;
+
+ gst_message_parse_state_changed(gm, &oldState, &newState, &pending);
+
+ /*QStringList states;
+ states << "GST_STATE_VOID_PENDING" << "GST_STATE_NULL" << "GST_STATE_READY" << "GST_STATE_PAUSED" << "GST_STATE_PLAYING";
+
+ qDebug() << QString("state changed: old: %1 new: %2 pending: %3") \
+ .arg(states[oldState]) \
+ .arg(states[newState]) \
+ .arg(states[pending]);*/
+
+ switch (newState) {
+ case GST_STATE_VOID_PENDING:
+ case GST_STATE_NULL:
+ setSeekable(false);
+ if (m_state != QMediaPlayer::StoppedState)
+ emit stateChanged(m_state = QMediaPlayer::StoppedState);
+ break;
+ case GST_STATE_READY:
+ setSeekable(false);
+ if (m_state != QMediaPlayer::StoppedState)
+ emit stateChanged(m_state = QMediaPlayer::StoppedState);
+ break;
+ case GST_STATE_PAUSED:
+ if (m_state != QMediaPlayer::PausedState)
+ emit stateChanged(m_state = QMediaPlayer::PausedState);
+
+ //check for seekable
+ if (oldState == GST_STATE_READY) {
+ /*
+ //gst_element_seek_simple doesn't work reliably here, have to find a better solution
+
+ GstFormat format = GST_FORMAT_TIME;
+ gint64 position = 0;
+ bool seekable = false;
+ if (gst_element_query_position(m_playbin, &format, &position)) {
+ seekable = gst_element_seek_simple(m_playbin, format, GST_SEEK_FLAG_NONE, position);
+ }
+
+ setSeekable(seekable);
+ */
+
+ setSeekable(true);
+
+ if (!qFuzzyCompare(m_playbackRate, qreal(1.0)))
+ setPlaybackRate(m_playbackRate);
+
+ if (m_renderer)
+ m_renderer->precessNewStream();
+
+ }
+
+
+ break;
+ case GST_STATE_PLAYING:
+ if (oldState == GST_STATE_PAUSED)
+ getStreamsInfo();
+
+ if (m_state != QMediaPlayer::PlayingState)
+ emit stateChanged(m_state = QMediaPlayer::PlayingState);
+
+ break;
+ }
+ }
+ break;
+
+ case GST_MESSAGE_EOS:
+ emit playbackFinished();
+ break;
+
+ case GST_MESSAGE_TAG:
+ case GST_MESSAGE_STREAM_STATUS:
+ case GST_MESSAGE_UNKNOWN:
+ break;
+ case GST_MESSAGE_ERROR:
+ {
+ GError *err;
+ gchar *debug;
+ gst_message_parse_error (gm, &err, &debug);
+ emit error(int(QMediaPlayer::ResourceError), QString::fromUtf8(err->message));
+ qWarning() << "Error:" << QString::fromUtf8(err->message);
+ g_error_free (err);
+ g_free (debug);
+ }
+ break;
+ case GST_MESSAGE_WARNING:
+ case GST_MESSAGE_INFO:
+ break;
+ case GST_MESSAGE_BUFFERING:
+ {
+ int progress = 0;
+ gst_message_parse_buffering(gm, &progress);
+ emit bufferingProgressChanged(progress);
+ }
+ break;
+ case GST_MESSAGE_STATE_DIRTY:
+ case GST_MESSAGE_STEP_DONE:
+ case GST_MESSAGE_CLOCK_PROVIDE:
+ case GST_MESSAGE_CLOCK_LOST:
+ case GST_MESSAGE_NEW_CLOCK:
+ case GST_MESSAGE_STRUCTURE_CHANGE:
+ case GST_MESSAGE_APPLICATION:
+ case GST_MESSAGE_ELEMENT:
+ break;
+ case GST_MESSAGE_SEGMENT_START:
+ {
+ const GstStructure *structure = gst_message_get_structure(gm);
+ qint64 position = g_value_get_int64(gst_structure_get_value(structure, "position"));
+ position /= 1000000;
+ m_lastPosition = position;
+ emit positionChanged(position);
+ }
+ break;
+ case GST_MESSAGE_SEGMENT_DONE:
+ break;
+ case GST_MESSAGE_DURATION:
+ {
+ GstFormat format = GST_FORMAT_TIME;
+ gint64 duration = 0;
+
+ if (gst_element_query_duration(m_playbin, &format, &duration)) {
+ int newDuration = duration / 1000000;
+ if (m_duration != newDuration) {
+ m_duration = newDuration;
+ emit durationChanged(m_duration);
+ }
+ }
+ }
+ break;
+ case GST_MESSAGE_LATENCY:
+#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 13)
+ case GST_MESSAGE_ASYNC_START:
+ case GST_MESSAGE_ASYNC_DONE:
+#if GST_VERSION_MICRO >= 23
+ case GST_MESSAGE_REQUEST_STATE:
+#endif
+#endif
+ case GST_MESSAGE_ANY:
+ break;
+ }
+ }
+ }
+}
+
+void QGstreamerPlayerSession::getStreamsInfo()
+{
+ GstFormat format = GST_FORMAT_TIME;
+ gint64 duration = 0;
+
+ if (gst_element_query_duration(m_playbin, &format, &duration)) {
+ int newDuration = duration / 1000000;
+ if (m_duration != newDuration) {
+ m_duration = newDuration;
+ emit durationChanged(m_duration);
+ }
+ }
+
+ //check if video is available:
+ bool haveAudio = false;
+ bool haveVideo = false;
+// m_streamProperties.clear();
+// m_streamTypes.clear();
+
+#ifdef USE_PLAYBIN2
+ gint audioStreamsCount = 0;
+ gint videoStreamsCount = 0;
+ gint textStreamsCount = 0;
+
+ g_object_get(G_OBJECT(m_playbin), "n-audio", &audioStreamsCount, NULL);
+ g_object_get(G_OBJECT(m_playbin), "n-video", &videoStreamsCount, NULL);
+ g_object_get(G_OBJECT(m_playbin), "n-text", &textStreamsCount, NULL);
+
+ haveAudio = audioStreamsCount > 0;
+ haveVideo = videoStreamsCount > 0;
+
+ /*m_playbin2StreamOffset[QMediaStreamsControl::AudioStream] = 0;
+ m_playbin2StreamOffset[QMediaStreamsControl::VideoStream] = audioStreamsCount;
+ m_playbin2StreamOffset[QMediaStreamsControl::SubPictureStream] = audioStreamsCount+videoStreamsCount;
+
+ for (int i=0; i<audioStreamsCount; i++)
+ m_streamTypes.append(QMediaStreamsControl::AudioStream);
+
+ for (int i=0; i<videoStreamsCount; i++)
+ m_streamTypes.append(QMediaStreamsControl::VideoStream);
+
+ for (int i=0; i<textStreamsCount; i++)
+ m_streamTypes.append(QMediaStreamsControl::SubPictureStream);
+
+ for (int i=0; i<m_streamTypes.count(); i++) {
+ QMediaStreamsControl::StreamType streamType = m_streamTypes[i];
+ QMap<QtMultimedia::MetaData, QVariant> streamProperties;
+
+ int streamIndex = i - m_playbin2StreamOffset[streamType];
+
+ GstTagList *tags = 0;
+ switch (streamType) {
+ case QMediaStreamsControl::AudioStream:
+ g_signal_emit_by_name(G_OBJECT(m_playbin), "get-audio-tags", streamIndex, &tags);
+ break;
+ case QMediaStreamsControl::VideoStream:
+ g_signal_emit_by_name(G_OBJECT(m_playbin), "get-video-tags", streamIndex, &tags);
+ break;
+ case QMediaStreamsControl::SubPictureStream:
+ g_signal_emit_by_name(G_OBJECT(m_playbin), "get-text-tags", streamIndex, &tags);
+ break;
+ default:
+ break;
+ }
+
+ if (tags && gst_is_tag_list(tags)) {
+ gchar *languageCode = 0;
+ if (gst_tag_list_get_string(tags, GST_TAG_LANGUAGE_CODE, &languageCode))
+ streamProperties[QtMultimedia::Language] = QString::fromUtf8(languageCode);
+
+ //qDebug() << "language for setream" << i << QString::fromUtf8(languageCode);
+ g_free (languageCode);
+ }
+
+ m_streamProperties.append(streamProperties);
+
+ }
+ */
+
+#else
+ enum {
+ GST_STREAM_TYPE_UNKNOWN,
+ GST_STREAM_TYPE_AUDIO,
+ GST_STREAM_TYPE_VIDEO,
+ GST_STREAM_TYPE_TEXT,
+ GST_STREAM_TYPE_SUBPICTURE,
+ GST_STREAM_TYPE_ELEMENT
+ };
+
+ GList* streamInfo;
+ g_object_get(G_OBJECT(m_playbin), "stream-info", &streamInfo, NULL);
+
+ for (; streamInfo != 0; streamInfo = g_list_next(streamInfo)) {
+ gint type;
+ gchar *languageCode = 0;
+
+ GObject* obj = G_OBJECT(streamInfo->data);
+
+ g_object_get(obj, "type", &type, NULL);
+ g_object_get(obj, "language-code", &languageCode, NULL);
+
+ if (type == GST_STREAM_TYPE_VIDEO)
+ haveVideo = true;
+ else if (type == GST_STREAM_TYPE_AUDIO)
+ haveAudio = true;
+
+// QMediaStreamsControl::StreamType streamType = QMediaStreamsControl::UnknownStream;
+//
+// switch (type) {
+// case GST_STREAM_TYPE_VIDEO:
+// streamType = QMediaStreamsControl::VideoStream;
+// break;
+// case GST_STREAM_TYPE_AUDIO:
+// streamType = QMediaStreamsControl::AudioStream;
+// break;
+// case GST_STREAM_TYPE_SUBPICTURE:
+// streamType = QMediaStreamsControl::SubPictureStream;
+// break;
+// default:
+// streamType = QMediaStreamsControl::UnknownStream;
+// break;
+// }
+//
+// QMap<QtMultimedia::MetaData, QVariant> streamProperties;
+// streamProperties[QtMultimedia::Language] = QString::fromUtf8(languageCode);
+//
+// m_streamProperties.append(streamProperties);
+// m_streamTypes.append(streamType);
+ }
+#endif
+
+ if (haveAudio != m_audioAvailable) {
+ m_audioAvailable = haveAudio;
+ emit audioAvailableChanged(m_audioAvailable);
+ }
+ if (haveVideo != m_videoAvailable) {
+ m_videoAvailable = haveVideo;
+ emit videoAvailableChanged(m_videoAvailable);
+ }
+
+ emit streamsChanged();
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.h b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.h
new file mode 100644
index 0000000000..edfec5b937
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.h
@@ -0,0 +1,167 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGSTREAMERPLAYERSESSION_H
+#define QGSTREAMERPLAYERSESSION_H
+
+#include <QObject>
+#include <QUrl>
+#include "qgstreamerplayercontrol.h"
+#include "qgstreamerbushelper.h"
+#include <QtMultimedia/qmediaplayer.h>
+//#include <qmediastreamscontrol.h>
+
+#include <gst/gst.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QGstreamerBusHelper;
+class QGstreamerMessage;
+class QGstreamerVideoRendererInterface;
+
+class QGstreamerPlayerSession : public QObject, public QGstreamerSyncEventFilter
+{
+Q_OBJECT
+
+public:
+ QGstreamerPlayerSession(QObject *parent);
+ virtual ~QGstreamerPlayerSession();
+
+ QUrl url() const;
+
+ QMediaPlayer::State state() const { return m_state; }
+
+ qint64 duration() const;
+ qint64 position() const;
+
+ bool isBuffering() const;
+
+ int bufferingProgress() const;
+
+ int volume() const;
+ bool isMuted() const;
+
+ void setVideoRenderer(QObject *renderer);
+ bool isAudioAvailable() const;
+ bool isVideoAvailable() const;
+
+ bool isSeekable() const;
+
+ qreal playbackRate() const;
+ void setPlaybackRate(qreal rate);
+
+ QMap<QByteArray ,QVariant> tags() const { return m_tags; }
+ QMap<QtMultimedia::MetaData,QVariant> streamProperties(int streamNumber) const { return m_streamProperties[streamNumber]; }
+// int streamCount() const { return m_streamProperties.count(); }
+// QMediaStreamsControl::StreamType streamType(int streamNumber) { return m_streamTypes.value(streamNumber, QMediaStreamsControl::UnknownStream); }
+//
+// int activeStream(QMediaStreamsControl::StreamType streamType) const;
+// void setActiveStream(QMediaStreamsControl::StreamType streamType, int streamNumber);
+
+ bool processSyncMessage(const QGstreamerMessage &message);
+
+public slots:
+ void load(const QUrl &url);
+
+ bool play();
+ bool pause();
+ void stop();
+
+ bool seek(qint64 pos);
+
+ void setVolume(int volume);
+ void setMuted(bool muted);
+
+signals:
+ void durationChanged(qint64 duration);
+ void positionChanged(qint64 position);
+ void stateChanged(QMediaPlayer::State state);
+ void volumeChanged(int volume);
+ void mutedStateChanged(bool muted);
+ void audioAvailableChanged(bool audioAvailable);
+ void videoAvailableChanged(bool videoAvailable);
+ void bufferingChanged(bool buffering);
+ void bufferingProgressChanged(int percentFilled);
+ void playbackFinished();
+ void tagsChanged();
+ void streamsChanged();
+ void seekableChanged(bool);
+ void error(int error, const QString &errorString);
+
+private slots:
+ void busMessage(const QGstreamerMessage &message);
+ void getStreamsInfo();
+ void setSeekable(bool);
+
+private:
+ QUrl m_url;
+ QMediaPlayer::State m_state;
+ QGstreamerBusHelper* m_busHelper;
+ GstElement* m_playbin;
+ GstElement* m_nullVideoOutput;
+ GstBus* m_bus;
+ QGstreamerVideoRendererInterface *m_renderer;
+
+ QMap<QByteArray, QVariant> m_tags;
+ QList< QMap<QtMultimedia::MetaData,QVariant> > m_streamProperties;
+// QList<QMediaStreamsControl::StreamType> m_streamTypes;
+// QMap<QMediaStreamsControl::StreamType, int> m_playbin2StreamOffset;
+
+
+ int m_volume;
+ qreal m_playbackRate;
+ bool m_muted;
+ bool m_audioAvailable;
+ bool m_videoAvailable;
+ bool m_seekable;
+
+ qint64 m_lastPosition;
+ qint64 m_duration;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QGSTREAMERPLAYERSESSION_H
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamerbushelper.cpp b/src/plugins/mediaservices/gstreamer/qgstreamerbushelper.cpp
new file mode 100644
index 0000000000..5049fa17dd
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstreamerbushelper.cpp
@@ -0,0 +1,206 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QMap>
+#include <QTimer>
+#include <QMutex>
+
+#include "qgstreamerbushelper.h"
+
+QT_BEGIN_NAMESPACE
+
+#ifndef QT_NO_GLIB
+class QGstreamerBusHelperPrivate : public QObject
+{
+ Q_OBJECT
+
+public:
+ void addWatch(GstBus* bus, QGstreamerBusHelper* helper)
+ {
+ setParent(helper);
+ m_tag = gst_bus_add_watch_full(bus, 0, busCallback, this, NULL);
+ m_helper = helper;
+ filter = 0;
+ }
+
+ void removeWatch(QGstreamerBusHelper* helper)
+ {
+ Q_UNUSED(helper);
+ g_source_remove(m_tag);
+ }
+
+ static QGstreamerBusHelperPrivate* instance()
+ {
+ return new QGstreamerBusHelperPrivate;
+ }
+
+private:
+ void processMessage(GstBus* bus, GstMessage* message)
+ {
+ Q_UNUSED(bus);
+ emit m_helper->message(message);
+ }
+
+ static gboolean busCallback(GstBus *bus, GstMessage *message, gpointer data)
+ {
+ reinterpret_cast<QGstreamerBusHelperPrivate*>(data)->processMessage(bus, message);
+ return TRUE;
+ }
+
+ guint m_tag;
+ QGstreamerBusHelper* m_helper;
+
+public:
+ GstBus* bus;
+ QGstreamerSyncEventFilter *filter;
+ QMutex filterMutex;
+};
+
+#else
+
+class QGstreamerBusHelperPrivate : public QObject
+{
+ Q_OBJECT
+ typedef QMap<QGstreamerBusHelper*, GstBus*> HelperMap;
+
+public:
+ void addWatch(GstBus* bus, QGstreamerBusHelper* helper)
+ {
+ m_helperMap.insert(helper, bus);
+
+ if (m_helperMap.size() == 1)
+ m_intervalTimer->start();
+ }
+
+ void removeWatch(QGstreamerBusHelper* helper)
+ {
+ m_helperMap.remove(helper);
+
+ if (m_helperMap.size() == 0)
+ m_intervalTimer->stop();
+ }
+
+ static QGstreamerBusHelperPrivate* instance()
+ {
+ static QGstreamerBusHelperPrivate self;
+
+ return &self;
+ }
+
+private slots:
+ void interval()
+ {
+ for (HelperMap::iterator it = m_helperMap.begin(); it != m_helperMap.end(); ++it) {
+ GstMessage* message;
+
+ while ((message = gst_bus_poll(it.value(), GST_MESSAGE_ANY, 0)) != 0) {
+ emit it.key()->message(message);
+ gst_message_unref(message);
+ }
+
+ emit it.key()->message(QGstreamerMessage());
+ }
+ }
+
+private:
+ QGstreamerBusHelperPrivate()
+ {
+ m_intervalTimer = new QTimer(this);
+ m_intervalTimer->setInterval(250);
+
+ connect(m_intervalTimer, SIGNAL(timeout()), SLOT(interval()));
+ }
+
+ HelperMap m_helperMap;
+ QTimer* m_intervalTimer;
+
+public:
+ GstBus* bus;
+ QGstreamerSyncEventFilter *filter;
+ QMutex filterMutex;
+};
+#endif
+
+
+static GstBusSyncReply syncGstBusFilter(GstBus* bus, GstMessage* message, QGstreamerBusHelperPrivate *d)
+{
+ Q_UNUSED(bus);
+ QMutexLocker lock(&d->filterMutex);
+
+ bool res = false;
+
+ if (d->filter)
+ res = d->filter->processSyncMessage(QGstreamerMessage(message));
+
+ return res ? GST_BUS_DROP : GST_BUS_PASS;
+}
+
+
+/*!
+ \class QGstreamerBusHelper
+ \internal
+*/
+
+QGstreamerBusHelper::QGstreamerBusHelper(GstBus* bus, QObject* parent):
+ QObject(parent),
+ d(QGstreamerBusHelperPrivate::instance())
+{
+ d->bus = bus;
+ d->addWatch(bus, this);
+
+ gst_bus_set_sync_handler(bus, (GstBusSyncHandler)syncGstBusFilter, d);
+}
+
+QGstreamerBusHelper::~QGstreamerBusHelper()
+{
+ d->removeWatch(this);
+ gst_bus_set_sync_handler(d->bus,0,0);
+}
+
+void QGstreamerBusHelper::installSyncEventFilter(QGstreamerSyncEventFilter *filter)
+{
+ QMutexLocker lock(&d->filterMutex);
+ d->filter = filter;
+}
+
+QT_END_NAMESPACE
+
+#include "qgstreamerbushelper.moc"
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamerbushelper.h b/src/plugins/mediaservices/gstreamer/qgstreamerbushelper.h
new file mode 100644
index 0000000000..8600015955
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstreamerbushelper.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGSTREAMERBUSHELPER_H
+#define QGSTREAMERBUSHELPER_H
+
+#include <QObject>
+
+#include <qgstreamermessage.h>
+#include <gst/gst.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QGstreamerSyncEventFilter {
+public:
+ //returns true if message was processed and should be dropped, false otherwise
+ virtual bool processSyncMessage(const QGstreamerMessage &message) = 0;
+};
+
+class QGstreamerBusHelperPrivate;
+
+class QGstreamerBusHelper : public QObject
+{
+ Q_OBJECT
+ friend class QGstreamerBusHelperPrivate;
+
+public:
+ QGstreamerBusHelper(GstBus* bus, QObject* parent = 0);
+ ~QGstreamerBusHelper();
+
+ void installSyncEventFilter(QGstreamerSyncEventFilter *filter);
+
+signals:
+ void message(QGstreamerMessage const& message);
+
+
+private:
+ QGstreamerBusHelperPrivate* d;
+};
+
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamermessage.cpp b/src/plugins/mediaservices/gstreamer/qgstreamermessage.cpp
new file mode 100644
index 0000000000..d52aa750a9
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstreamermessage.cpp
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <gst/gst.h>
+
+#include "qgstreamermessage.h"
+
+
+QT_BEGIN_NAMESPACE
+
+static int wuchi = qRegisterMetaType<QGstreamerMessage>();
+
+
+/*!
+ \class QGstreamerMessage
+ \internal
+*/
+
+QGstreamerMessage::QGstreamerMessage():
+ m_message(0)
+{
+}
+
+QGstreamerMessage::QGstreamerMessage(GstMessage* message):
+ m_message(message)
+{
+ gst_message_ref(m_message);
+}
+
+QGstreamerMessage::QGstreamerMessage(QGstreamerMessage const& m):
+ m_message(m.m_message)
+{
+ gst_message_ref(m_message);
+}
+
+
+QGstreamerMessage::~QGstreamerMessage()
+{
+ if (m_message != 0)
+ gst_message_unref(m_message);
+}
+
+GstMessage* QGstreamerMessage::rawMessage() const
+{
+ return m_message;
+}
+
+QGstreamerMessage& QGstreamerMessage::operator=(QGstreamerMessage const& rhs)
+{
+ if (m_message != 0)
+ gst_message_unref(m_message);
+
+ if ((m_message = rhs.m_message) != 0)
+ gst_message_ref(m_message);
+
+ return *this;
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamermessage.h b/src/plugins/mediaservices/gstreamer/qgstreamermessage.h
new file mode 100644
index 0000000000..4680903bc2
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstreamermessage.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGSTREAMERMESSAGE_H
+#define QGSTREAMERMESSAGE_H
+
+#include <QMetaType>
+
+#include <gst/gst.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QGstreamerMessage
+{
+public:
+ QGstreamerMessage();
+ QGstreamerMessage(GstMessage* message);
+ QGstreamerMessage(QGstreamerMessage const& m);
+ ~QGstreamerMessage();
+
+ GstMessage* rawMessage() const;
+
+ QGstreamerMessage& operator=(QGstreamerMessage const& rhs);
+
+private:
+ GstMessage* m_message;
+};
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QGstreamerMessage);
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.cpp b/src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.cpp
new file mode 100644
index 0000000000..589d2b54a9
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.cpp
@@ -0,0 +1,185 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qstring.h>
+#include <QtCore/qdebug.h>
+#include <QtGui/QIcon>
+#include <QtCore/QDir>
+
+#include "qgstreamerserviceplugin.h"
+
+#ifdef QMEDIA_GSTREAMER_PLAYER
+#include "qgstreamerplayerservice.h"
+#endif
+#ifdef QMEDIA_GSTREAMER_CAPTURE
+#include "qgstreamercaptureservice.h"
+#endif
+
+#include <QtMultimedia/qmediaserviceprovider.h>
+
+#include <linux/types.h>
+#include <sys/time.h>
+#include <sys/ioctl.h>
+#include <sys/poll.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/mman.h>
+#include <linux/videodev2.h>
+
+
+QT_BEGIN_NAMESPACE
+
+
+QStringList QGstreamerServicePlugin::keys() const
+{
+ return QStringList()
+#ifdef QMEDIA_GSTREAMER_PLAYER
+ << QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER)
+#endif
+#ifdef QMEDIA_GSTREAMER_CAPTURE
+ << QLatin1String(Q_MEDIASERVICE_AUDIOSOURCE)
+ << QLatin1String(Q_MEDIASERVICE_CAMERA)
+#endif
+ ;
+}
+
+QMediaService* QGstreamerServicePlugin::create(const QString &key)
+{
+#ifdef QMEDIA_GSTREAMER_PLAYER
+ if (key == QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER))
+ return new QGstreamerPlayerService;
+#endif
+#ifdef QMEDIA_GSTREAMER_CAPTURE
+ if (key == QLatin1String(Q_MEDIASERVICE_AUDIOSOURCE))
+ return new QGstreamerCaptureService(key);
+
+ if (key == QLatin1String(Q_MEDIASERVICE_CAMERA))
+ return new QGstreamerCaptureService(key);
+#endif
+
+ qWarning() << "GStreamer service plugin: unsupported service -" << key;
+ return 0;
+}
+
+void QGstreamerServicePlugin::release(QMediaService *service)
+{
+ delete service;
+}
+
+QList<QByteArray> QGstreamerServicePlugin::devices(const QByteArray &service) const
+{
+ if (service == Q_MEDIASERVICE_CAMERA) {
+ if (m_cameraDevices.isEmpty())
+ updateDevices();
+
+ return m_cameraDevices;
+ }
+
+ return QList<QByteArray>();
+}
+
+QString QGstreamerServicePlugin::deviceDescription(const QByteArray &service, const QByteArray &device)
+{
+ if (service == Q_MEDIASERVICE_CAMERA) {
+ if (m_cameraDevices.isEmpty())
+ updateDevices();
+
+ for (int i=0; i<m_cameraDevices.count(); i++)
+ if (m_cameraDevices[i] == device)
+ return m_cameraDescriptions[i];
+ }
+
+ return QString();
+}
+
+void QGstreamerServicePlugin::updateDevices() const
+{
+ m_cameraDevices.clear();
+ m_cameraDescriptions.clear();
+
+ QDir devDir("/dev");
+ devDir.setFilter(QDir::System);
+
+ QFileInfoList entries = devDir.entryInfoList(QStringList() << "video*");
+
+ foreach( const QFileInfo &entryInfo, entries ) {
+// qDebug() << "Try" << entryInfo.filePath();
+
+ int fd = ::open(entryInfo.filePath().toLatin1().constData(), O_RDWR );
+ if (fd == -1)
+ continue;
+
+ bool isCamera = false;
+
+ v4l2_input input;
+ memset(&input, 0, sizeof(input));
+ for (; ::ioctl(fd, VIDIOC_ENUMINPUT, &input) >= 0; ++input.index) {
+ if(input.type == V4L2_INPUT_TYPE_CAMERA || input.type == 0) {
+ isCamera = ::ioctl(fd, VIDIOC_S_INPUT, input.index) != 0;
+ break;
+ }
+ }
+
+ if (isCamera) {
+ // find out its driver "name"
+ QString name;
+ struct v4l2_capability vcap;
+ memset(&vcap, 0, sizeof(struct v4l2_capability));
+
+ if (ioctl(fd, VIDIOC_QUERYCAP, &vcap) != 0)
+ name = entryInfo.fileName();
+ else
+ name = QString((const char*)vcap.card);
+// qDebug() << "found camera: " << name;
+
+ m_cameraDevices.append(entryInfo.filePath().toLocal8Bit());
+ m_cameraDescriptions.append(name);
+ }
+ ::close(fd);
+ }
+}
+
+Q_EXPORT_PLUGIN2(gstengine, QGstreamerServicePlugin);
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.h b/src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.h
new file mode 100644
index 0000000000..d6d6899816
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#ifndef QGSTREAMERSERVICEPLUGIN_H
+#define QGSTREAMERSERVICEPLUGIN_H
+
+#include <QtMultimedia/qmediaserviceproviderplugin.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QGstreamerServicePlugin : public QMediaServiceProviderPlugin, public QMediaServiceSupportedDevicesInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QMediaServiceSupportedDevicesInterface)
+public:
+ QStringList keys() const;
+ QMediaService* create(QString const& key);
+ void release(QMediaService *service);
+
+ QList<QByteArray> devices(const QByteArray &service) const;
+ QString deviceDescription(const QByteArray &service, const QByteArray &device);
+
+private:
+ void updateDevices() const;
+
+ mutable QList<QByteArray> m_cameraDevices;
+ mutable QStringList m_cameraDescriptions;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QGSTREAMERSERVICEPLUGIN_H
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.cpp b/src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.cpp
new file mode 100644
index 0000000000..406cefe111
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.cpp
@@ -0,0 +1,163 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qgstreamervideoinputdevicecontrol.h"
+
+#include <QtGui/QIcon>
+#include <QtCore/QDir>
+#include <QtCore/QDebug>
+
+#include <linux/types.h>
+#include <sys/time.h>
+#include <sys/ioctl.h>
+#include <sys/poll.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/mman.h>
+#include <linux/videodev2.h>
+
+
+QT_BEGIN_NAMESPACE
+
+QGstreamerVideoInputDeviceControl::QGstreamerVideoInputDeviceControl(QObject *parent)
+ :QVideoDeviceControl(parent), m_selectedDevice(0)
+{
+ update();
+}
+
+QGstreamerVideoInputDeviceControl::~QGstreamerVideoInputDeviceControl()
+{
+}
+
+int QGstreamerVideoInputDeviceControl::deviceCount() const
+{
+ return m_names.size();
+}
+
+QString QGstreamerVideoInputDeviceControl::deviceName(int index) const
+{
+ return m_names[index];
+}
+
+QString QGstreamerVideoInputDeviceControl::deviceDescription(int index) const
+{
+ return m_descriptions[index];
+}
+
+QIcon QGstreamerVideoInputDeviceControl::deviceIcon(int index) const
+{
+ Q_UNUSED(index);
+ return QIcon();
+}
+
+int QGstreamerVideoInputDeviceControl::defaultDevice() const
+{
+ return 0;
+}
+
+int QGstreamerVideoInputDeviceControl::selectedDevice() const
+{
+ return m_selectedDevice;
+}
+
+
+void QGstreamerVideoInputDeviceControl::setSelectedDevice(int index)
+{
+ if (index != m_selectedDevice) {
+ m_selectedDevice = index;
+ emit selectedDeviceChanged(index);
+ emit selectedDeviceChanged(deviceName(index));
+ }
+}
+
+
+void QGstreamerVideoInputDeviceControl::update()
+{
+ m_names.clear();
+ m_descriptions.clear();
+
+ QDir devDir("/dev");
+ devDir.setFilter(QDir::System);
+
+ QFileInfoList entries = devDir.entryInfoList(QStringList() << "video*");
+
+ foreach( const QFileInfo &entryInfo, entries ) {
+// qDebug() << "Try" << entryInfo.filePath();
+
+ int fd = ::open(entryInfo.filePath().toLatin1().constData(), O_RDWR );
+ if (fd == -1)
+ continue;
+
+ bool isCamera = false;
+
+ v4l2_input input;
+ memset(&input, 0, sizeof(input));
+ for (; ::ioctl(fd, VIDIOC_ENUMINPUT, &input) >= 0; ++input.index) {
+ if(input.type == V4L2_INPUT_TYPE_CAMERA || input.type == 0) {
+ isCamera = ::ioctl(fd, VIDIOC_S_INPUT, input.index) != 0;
+ break;
+ }
+ }
+
+ if (isCamera) {
+ // find out its driver "name"
+ QString name;
+ struct v4l2_capability vcap;
+ memset(&vcap, 0, sizeof(struct v4l2_capability));
+
+ if (ioctl(fd, VIDIOC_QUERYCAP, &vcap) != 0)
+ name = entryInfo.fileName();
+ else
+ name = QString((const char*)vcap.card);
+// qDebug() << "found camera: " << name;
+
+ m_names.append(entryInfo.filePath());
+ m_descriptions.append(name);
+ }
+ ::close(fd);
+ }
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.h b/src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.h
new file mode 100644
index 0000000000..6762baba86
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGSTREAMERVIDEOINPUTDEVICECONTROL_H
+#define QGSTREAMERVIDEOINPUTDEVICECONTROL_H
+
+#include <QtMultimedia/qvideodevicecontrol.h>
+#include <QtCore/qstringlist.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+
+class QGstreamerVideoInputDeviceControl : public QVideoDeviceControl
+{
+Q_OBJECT
+public:
+ QGstreamerVideoInputDeviceControl(QObject *parent);
+ ~QGstreamerVideoInputDeviceControl();
+
+ int deviceCount() const;
+
+ QString deviceName(int index) const;
+ QString deviceDescription(int index) const;
+ QIcon deviceIcon(int index) const;
+
+ int defaultDevice() const;
+ int selectedDevice() const;
+
+public Q_SLOTS:
+ void setSelectedDevice(int index);
+
+private:
+ void update();
+
+ int m_selectedDevice;
+ QStringList m_names;
+ QStringList m_descriptions;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QGSTREAMERAUDIOINPUTDEVICECONTROL_H
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideooutputcontrol.cpp b/src/plugins/mediaservices/gstreamer/qgstreamervideooutputcontrol.cpp
new file mode 100644
index 0000000000..f406bff60c
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstreamervideooutputcontrol.cpp
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qgstreamervideooutputcontrol.h"
+
+QT_BEGIN_NAMESPACE
+
+QGstreamerVideoOutputControl::QGstreamerVideoOutputControl(QObject *parent)
+ : QVideoOutputControl(parent)
+ , m_output(NoOutput)
+{
+}
+
+QList<QVideoOutputControl::Output> QGstreamerVideoOutputControl::availableOutputs() const
+{
+ return m_outputs;
+}
+
+void QGstreamerVideoOutputControl::setAvailableOutputs(const QList<Output> &outputs)
+{
+ emit availableOutputsChanged(m_outputs = outputs);
+}
+
+QVideoOutputControl::Output QGstreamerVideoOutputControl::output() const
+{
+ return m_output;
+}
+
+void QGstreamerVideoOutputControl::setOutput(Output output)
+{
+ if (!m_outputs.contains(output))
+ output = NoOutput;
+
+ if (m_output != output)
+ emit outputChanged(m_output = output);
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideooutputcontrol.h b/src/plugins/mediaservices/gstreamer/qgstreamervideooutputcontrol.h
new file mode 100644
index 0000000000..7685239f20
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstreamervideooutputcontrol.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGSTREAMERVIDEOOUTPUTCONTROL_H
+#define QGSTREAMERVIDEOOUTPUTCONTROL_H
+
+#include <QtMultimedia/qvideooutputcontrol.h>
+
+#include <gst/gst.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QGstreamerVideoRendererInterface
+{
+public:
+ virtual ~QGstreamerVideoRendererInterface();
+ virtual GstElement *videoSink() = 0;
+ virtual void precessNewStream() {}
+};
+
+class QGstreamerVideoOutputControl : public QVideoOutputControl
+{
+ Q_OBJECT
+public:
+ QGstreamerVideoOutputControl(QObject *parent = 0);
+
+ QList<Output> availableOutputs() const;
+ void setAvailableOutputs(const QList<Output> &outputs);
+
+ Output output() const;
+ void setOutput(Output output);
+
+Q_SIGNALS:
+ void outputChanged(QVideoOutputControl::Output output);
+
+private:
+ QList<Output> m_outputs;
+ Output m_output;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.cpp b/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.cpp
new file mode 100644
index 0000000000..846a24abea
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.cpp
@@ -0,0 +1,215 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qgstreamervideooverlay.h"
+#include "qvideosurfacegstsink.h"
+
+#include <QtMultimedia/qvideosurfaceformat.h>
+
+#include "qx11videosurface.h"
+
+QT_BEGIN_NAMESPACE
+
+QGstreamerVideoOverlay::QGstreamerVideoOverlay(QObject *parent)
+ : QVideoWindowControl(parent)
+ , m_surface(new QX11VideoSurface)
+ , m_videoSink(reinterpret_cast<GstElement*>(QVideoSurfaceGstSink::createSink(m_surface)))
+ , m_aspectRatioMode(QVideoWidget::KeepAspectRatio)
+ , m_fullScreen(false)
+{
+ if (m_videoSink) {
+ gst_object_ref(GST_OBJECT(m_videoSink)); //Take ownership
+ gst_object_sink(GST_OBJECT(m_videoSink));
+ }
+
+ connect(m_surface, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat)),
+ this, SLOT(surfaceFormatChanged()));
+}
+
+QGstreamerVideoOverlay::~QGstreamerVideoOverlay()
+{
+ if (m_videoSink)
+ gst_object_unref(GST_OBJECT(m_videoSink));
+
+ delete m_surface;
+}
+
+WId QGstreamerVideoOverlay::winId() const
+{
+ return m_surface->winId();
+}
+
+void QGstreamerVideoOverlay::setWinId(WId id)
+{
+ m_surface->setWinId(id);
+}
+
+QRect QGstreamerVideoOverlay::displayRect() const
+{
+ return m_displayRect;
+}
+
+void QGstreamerVideoOverlay::setDisplayRect(const QRect &rect)
+{
+ m_displayRect = rect;
+
+ setScaledDisplayRect();
+}
+
+QVideoWidget::AspectRatioMode QGstreamerVideoOverlay::aspectRatioMode() const
+{
+ return m_aspectRatioMode;
+}
+
+void QGstreamerVideoOverlay::setAspectRatioMode(QVideoWidget::AspectRatioMode mode)
+{
+ m_aspectRatioMode = mode;
+
+ setScaledDisplayRect();
+}
+
+void QGstreamerVideoOverlay::repaint()
+{
+}
+
+int QGstreamerVideoOverlay::brightness() const
+{
+ return m_surface->brightness();
+}
+
+void QGstreamerVideoOverlay::setBrightness(int brightness)
+{
+ m_surface->setBrightness(brightness);
+
+ emit brightnessChanged(m_surface->brightness());
+}
+
+int QGstreamerVideoOverlay::contrast() const
+{
+ return m_surface->contrast();
+}
+
+void QGstreamerVideoOverlay::setContrast(int contrast)
+{
+ m_surface->setContrast(contrast);
+
+ emit contrastChanged(m_surface->contrast());
+}
+
+int QGstreamerVideoOverlay::hue() const
+{
+ return m_surface->hue();
+}
+
+void QGstreamerVideoOverlay::setHue(int hue)
+{
+ m_surface->setHue(hue);
+
+ emit hueChanged(m_surface->hue());
+}
+
+int QGstreamerVideoOverlay::saturation() const
+{
+ return m_surface->saturation();
+}
+
+void QGstreamerVideoOverlay::setSaturation(int saturation)
+{
+ m_surface->setSaturation(saturation);
+
+ emit saturationChanged(m_surface->saturation());
+}
+
+bool QGstreamerVideoOverlay::isFullScreen() const
+{
+ return m_fullScreen;
+}
+
+void QGstreamerVideoOverlay::setFullScreen(bool fullScreen)
+{
+ emit fullScreenChanged(m_fullScreen = fullScreen);
+}
+
+QSize QGstreamerVideoOverlay::nativeSize() const
+{
+ return m_surface->surfaceFormat().sizeHint();
+}
+
+QAbstractVideoSurface *QGstreamerVideoOverlay::surface() const
+{
+ return m_surface;
+}
+
+GstElement *QGstreamerVideoOverlay::videoSink()
+{
+ return m_videoSink;
+}
+
+void QGstreamerVideoOverlay::surfaceFormatChanged()
+{
+ setScaledDisplayRect();
+
+ emit nativeSizeChanged();
+}
+
+void QGstreamerVideoOverlay::setScaledDisplayRect()
+{
+ switch (m_aspectRatioMode) {
+ case QVideoWidget::KeepAspectRatio:
+ {
+ QSize size = m_surface->surfaceFormat().viewport().size();
+
+ size.scale(m_displayRect.size(), Qt::KeepAspectRatio);
+
+ QRect rect(QPoint(0, 0), size);
+ rect.moveCenter(m_displayRect.center());
+
+ m_surface->setDisplayRect(rect);
+ }
+ break;
+ case QVideoWidget::IgnoreAspectRatio:
+ m_surface->setDisplayRect(m_displayRect);
+ break;
+ };
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.h b/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.h
new file mode 100644
index 0000000000..9566949e4c
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGSTREAMERVIDEOOVERLAY_H
+#define QGSTREAMERVIDEOOVERLAY_H
+
+#include <QtMultimedia/qvideowindowcontrol.h>
+
+#include "qgstreamervideorendererinterface.h"
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QAbstractVideoSurface;
+class QX11VideoSurface;
+
+class QGstreamerVideoOverlay : public QVideoWindowControl, public QGstreamerVideoRendererInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QGstreamerVideoRendererInterface)
+public:
+ QGstreamerVideoOverlay(QObject *parent = 0);
+ ~QGstreamerVideoOverlay();
+
+ WId winId() const;
+ void setWinId(WId id);
+
+ QRect displayRect() const;
+ void setDisplayRect(const QRect &rect);
+
+ bool isFullScreen() const;
+ void setFullScreen(bool fullScreen);
+
+ QSize nativeSize() const;
+
+ QVideoWidget::AspectRatioMode aspectRatioMode() const;
+ void setAspectRatioMode(QVideoWidget::AspectRatioMode mode);
+
+ void repaint();
+
+ int brightness() const;
+ void setBrightness(int brightness);
+
+ int contrast() const;
+ void setContrast(int contrast);
+
+ int hue() const;
+ void setHue(int hue);
+
+ int saturation() const;
+ void setSaturation(int saturation);
+
+ QAbstractVideoSurface *surface() const;
+
+ GstElement *videoSink();
+
+private slots:
+ void surfaceFormatChanged();
+
+private:
+ void setScaledDisplayRect();
+
+ QX11VideoSurface *m_surface;
+ GstElement *m_videoSink;
+ QVideoWidget::AspectRatioMode m_aspectRatioMode;
+ QRect m_displayRect;
+ bool m_fullScreen;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideorenderer.cpp b/src/plugins/mediaservices/gstreamer/qgstreamervideorenderer.cpp
new file mode 100644
index 0000000000..1f0399025c
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstreamervideorenderer.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qgstreamervideorenderer.h"
+#include "qvideosurfacegstsink.h"
+
+#include <QEvent>
+#include <QApplication>
+
+#include <gst/gst.h>
+
+
+QT_BEGIN_NAMESPACE
+
+QGstreamerVideoRenderer::QGstreamerVideoRenderer(QObject *parent)
+ :QVideoRendererControl(parent),m_videoSink(0)
+{
+}
+
+QGstreamerVideoRenderer::~QGstreamerVideoRenderer()
+{
+ if (m_videoSink)
+ gst_object_unref(GST_OBJECT(m_videoSink));
+}
+
+GstElement *QGstreamerVideoRenderer::videoSink()
+{
+ if (!m_videoSink) {
+ m_videoSink = reinterpret_cast<GstElement*>(QVideoSurfaceGstSink::createSink(m_surface));
+ gst_object_ref(GST_OBJECT(m_videoSink)); //Take ownership
+ gst_object_sink(GST_OBJECT(m_videoSink));
+ }
+
+ return m_videoSink;
+}
+
+
+QAbstractVideoSurface *QGstreamerVideoRenderer::surface() const
+{
+ return m_surface;
+}
+
+void QGstreamerVideoRenderer::setSurface(QAbstractVideoSurface *surface)
+{
+ m_surface = surface;
+}
+
+QT_END_NAMESPACE
+
+
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideorenderer.h b/src/plugins/mediaservices/gstreamer/qgstreamervideorenderer.h
new file mode 100644
index 0000000000..ba3f8068ce
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstreamervideorenderer.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGSTREAMERVIDEORENDERER_H
+#define QGSTREAMERVIDEORENDERER_H
+
+#include <QtMultimedia/qvideorenderercontrol.h>
+#include "qvideosurfacegstsink.h"
+
+#include "qgstreamervideorendererinterface.h"
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QGstreamerVideoRenderer : public QVideoRendererControl, public QGstreamerVideoRendererInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QGstreamerVideoRendererInterface)
+public:
+ QGstreamerVideoRenderer(QObject *parent = 0);
+ virtual ~QGstreamerVideoRenderer();
+
+ QAbstractVideoSurface *surface() const;
+ void setSurface(QAbstractVideoSurface *surface);
+
+ GstElement *videoSink();
+ void precessNewStream() {}
+
+private:
+ GstElement *m_videoSink;
+ QAbstractVideoSurface *m_surface;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QGSTREAMERVIDEORENDRER_H
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideorendererinterface.cpp b/src/plugins/mediaservices/gstreamer/qgstreamervideorendererinterface.cpp
new file mode 100644
index 0000000000..886a0644ef
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstreamervideorendererinterface.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qgstreamervideorendererinterface.h"
+
+
+QT_BEGIN_NAMESPACE
+
+QGstreamerVideoRendererInterface::~QGstreamerVideoRendererInterface()
+{
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideorendererinterface.h b/src/plugins/mediaservices/gstreamer/qgstreamervideorendererinterface.h
new file mode 100644
index 0000000000..c63a75708b
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstreamervideorendererinterface.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGSTREAMERVIDEOOUTPUTCONTROL_H
+#define QGSTREAMERVIDEOOUTPUTCONTROL_H
+
+#include <gst/gst.h>
+
+#include <QtCore/qobject.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QGstreamerVideoRendererInterface
+{
+public:
+ virtual ~QGstreamerVideoRendererInterface();
+ virtual GstElement *videoSink() = 0;
+ virtual void precessNewStream() {}
+};
+
+#define QGstreamerVideoRendererInterface_iid "com.nokia.Qt.QGstreamerVideoRendererInterface/1.0"
+Q_DECLARE_INTERFACE(QGstreamerVideoRendererInterface, QGstreamerVideoRendererInterface_iid)
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.cpp b/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.cpp
new file mode 100644
index 0000000000..8307aa59fd
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.cpp
@@ -0,0 +1,340 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qgstreamervideowidget.h"
+
+#include <QtCore/qcoreevent.h>
+#include <QtCore/qdebug.h>
+#include <QtGui/qapplication.h>
+#include <QtGui/qpainter.h>
+
+#include <X11/Xlib.h>
+#include <gst/gst.h>
+#include <gst/interfaces/xoverlay.h>
+#include <gst/interfaces/propertyprobe.h>
+
+
+QT_BEGIN_NAMESPACE
+
+class QGstreamerVideoWidget : public QWidget
+{
+public:
+ QGstreamerVideoWidget(QWidget *parent = 0)
+ :QWidget(parent)
+ {
+ setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ QPalette palette;
+ palette.setColor(QPalette::Background, Qt::black);
+ setPalette(palette);
+ }
+
+ virtual ~QGstreamerVideoWidget() {}
+
+ QSize sizeHint() const
+ {
+ return m_nativeSize;
+ }
+
+ void setNativeSize( const QSize &size)
+ {
+ if (size != m_nativeSize) {
+ m_nativeSize = size;
+ if (size.isEmpty())
+ setMinimumSize(0,0);
+ else
+ setMinimumSize(160,120);
+
+ updateGeometry();
+ }
+ }
+
+protected:
+ void paintEvent(QPaintEvent *)
+ {
+ QPainter painter(this);
+ painter.fillRect(rect(), palette().background());
+ }
+
+ QSize m_nativeSize;
+};
+
+QGstreamerVideoWidgetControl::QGstreamerVideoWidgetControl(QObject *parent)
+ : QVideoWidgetControl(parent)
+ , m_videoSink(0)
+ , m_widget(0)
+ , m_fullScreen(false)
+{
+}
+
+QGstreamerVideoWidgetControl::~QGstreamerVideoWidgetControl()
+{
+ if (m_videoSink)
+ gst_object_unref(GST_OBJECT(m_videoSink));
+
+ delete m_widget;
+}
+
+void QGstreamerVideoWidgetControl::createVideoWidget()
+{
+ if (m_widget)
+ return;
+
+ m_widget = new QGstreamerVideoWidget;
+
+ m_widget->installEventFilter(this);
+ m_windowId = m_widget->winId();
+
+ m_videoSink = gst_element_factory_make ("xvimagesink", NULL);
+ if (m_videoSink) {
+ // Check if the xv sink is usable
+ if (gst_element_set_state(m_videoSink, GST_STATE_READY) != GST_STATE_CHANGE_SUCCESS) {
+ gst_object_unref(GST_OBJECT(m_videoSink));
+ m_videoSink = 0;
+ } else {
+ gst_element_set_state(m_videoSink, GST_STATE_NULL);
+
+ g_object_set(G_OBJECT(m_videoSink), "force-aspect-ratio", 1, (const char*)NULL);
+ }
+ }
+
+ if (!m_videoSink)
+ m_videoSink = gst_element_factory_make ("ximagesink", NULL);
+
+ gst_object_ref (GST_OBJECT (m_videoSink)); //Take ownership
+ gst_object_sink (GST_OBJECT (m_videoSink));
+}
+
+GstElement *QGstreamerVideoWidgetControl::videoSink()
+{
+ createVideoWidget();
+ return m_videoSink;
+}
+
+bool QGstreamerVideoWidgetControl::eventFilter(QObject *object, QEvent *e)
+{
+ if (m_widget && object == m_widget) {
+ if (e->type() == QEvent::ParentChange || e->type() == QEvent::Show) {
+ WId newWId = m_widget->winId();
+ if (newWId != m_windowId) {
+ m_windowId = newWId;
+ // Even if we have created a winId at this point, other X applications
+ // need to be aware of it.
+ QApplication::syncX();
+ setOverlay();
+ }
+ }
+
+ if (e->type() == QEvent::Show) {
+ // Setting these values ensures smooth resizing since it
+ // will prevent the system from clearing the background
+ m_widget->setAttribute(Qt::WA_NoSystemBackground, true);
+ m_widget->setAttribute(Qt::WA_PaintOnScreen, true);
+ } else if (e->type() == QEvent::Resize) {
+ // This is a workaround for missing background repaints
+ // when reducing window size
+ windowExposed();
+ }
+ }
+
+ return false;
+}
+
+void QGstreamerVideoWidgetControl::precessNewStream()
+{
+ setOverlay();
+ QMetaObject::invokeMethod(this, "updateNativeVideoSize", Qt::QueuedConnection);
+}
+
+void QGstreamerVideoWidgetControl::setOverlay()
+{
+ if (m_videoSink && GST_IS_X_OVERLAY(m_videoSink)) {
+ gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(m_videoSink), m_windowId);
+ }
+}
+
+void QGstreamerVideoWidgetControl::updateNativeVideoSize()
+{
+ if (m_videoSink) {
+ //find video native size to update video widget size hint
+ GstPad *pad = gst_element_get_static_pad(m_videoSink,"sink");
+ GstCaps *caps = gst_pad_get_negotiated_caps(pad);
+
+ if (caps) {
+ GstStructure *str;
+ gint width, height;
+
+ if ((str = gst_caps_get_structure (caps, 0))) {
+ if (gst_structure_get_int (str, "width", &width) && gst_structure_get_int (str, "height", &height)) {
+ gint aspectNum = 0;
+ gint aspectDenum = 0;
+ if (gst_structure_get_fraction(str, "pixel-aspect-ratio", &aspectNum, &aspectDenum)) {
+ if (aspectDenum > 0)
+ width = width*aspectNum/aspectDenum;
+ }
+ m_widget->setNativeSize(QSize(width, height));
+ }
+ }
+ gst_caps_unref(caps);
+ }
+ } else {
+ if (m_widget)
+ m_widget->setNativeSize(QSize());
+ }
+}
+
+
+void QGstreamerVideoWidgetControl::windowExposed()
+{
+ if (m_videoSink && GST_IS_X_OVERLAY(m_videoSink))
+ gst_x_overlay_expose(GST_X_OVERLAY(m_videoSink));
+}
+
+QWidget *QGstreamerVideoWidgetControl::videoWidget()
+{
+ createVideoWidget();
+ return m_widget;
+}
+
+QVideoWidget::AspectRatioMode QGstreamerVideoWidgetControl::aspectRatioMode() const
+{
+ return m_aspectRatioMode;
+}
+
+void QGstreamerVideoWidgetControl::setAspectRatioMode(QVideoWidget::AspectRatioMode mode)
+{
+ if (m_videoSink) {
+ g_object_set(G_OBJECT(m_videoSink),
+ "force-aspect-ratio",
+ (mode == QVideoWidget::KeepAspectRatio),
+ (const char*)NULL);
+ }
+
+ m_aspectRatioMode = mode;
+}
+
+bool QGstreamerVideoWidgetControl::isFullScreen() const
+{
+ return m_fullScreen;
+}
+
+void QGstreamerVideoWidgetControl::setFullScreen(bool fullScreen)
+{
+ emit fullScreenChanged(m_fullScreen = fullScreen);
+}
+
+int QGstreamerVideoWidgetControl::brightness() const
+{
+ int brightness = 0;
+
+ if (m_videoSink && g_object_class_find_property(G_OBJECT_GET_CLASS(m_videoSink), "brightness"))
+ g_object_get(G_OBJECT(m_videoSink), "brightness", &brightness, NULL);
+
+ return brightness / 10;
+}
+
+void QGstreamerVideoWidgetControl::setBrightness(int brightness)
+{
+ if (m_videoSink && g_object_class_find_property(G_OBJECT_GET_CLASS(m_videoSink), "brightness")) {
+ g_object_set(G_OBJECT(m_videoSink), "brightness", brightness * 10, NULL);
+
+ emit brightnessChanged(brightness);
+ }
+}
+
+int QGstreamerVideoWidgetControl::contrast() const
+{
+ int contrast = 0;
+
+ if (m_videoSink && g_object_class_find_property(G_OBJECT_GET_CLASS(m_videoSink), "contrast"))
+ g_object_get(G_OBJECT(m_videoSink), "contrast", &contrast, NULL);
+
+ return contrast / 10;
+}
+
+void QGstreamerVideoWidgetControl::setContrast(int contrast)
+{
+ if (m_videoSink && g_object_class_find_property(G_OBJECT_GET_CLASS(m_videoSink), "contrast")) {
+ g_object_set(G_OBJECT(m_videoSink), "contrast", contrast * 10, NULL);
+
+ emit contrastChanged(contrast);
+ }
+}
+
+int QGstreamerVideoWidgetControl::hue() const
+{
+ int hue = 0;
+
+ if (m_videoSink && g_object_class_find_property(G_OBJECT_GET_CLASS(m_videoSink), "hue"))
+ g_object_get(G_OBJECT(m_videoSink), "hue", &hue, NULL);
+
+ return hue / 10;
+}
+
+void QGstreamerVideoWidgetControl::setHue(int hue)
+{
+ if (m_videoSink && g_object_class_find_property(G_OBJECT_GET_CLASS(m_videoSink), "hue")) {
+ g_object_set(G_OBJECT(m_videoSink), "hue", hue * 10, NULL);
+
+ emit hueChanged(hue);
+ }
+}
+
+int QGstreamerVideoWidgetControl::saturation() const
+{
+ int saturation = 0;
+
+ if (m_videoSink && g_object_class_find_property(G_OBJECT_GET_CLASS(m_videoSink), "saturation"))
+ g_object_get(G_OBJECT(m_videoSink), "saturation", &saturation, NULL);
+
+ return saturation / 10;
+}
+
+void QGstreamerVideoWidgetControl::setSaturation(int saturation)
+{
+ if (m_videoSink && g_object_class_find_property(G_OBJECT_GET_CLASS(m_videoSink), "saturation")) {
+ g_object_set(G_OBJECT(m_videoSink), "saturation", saturation * 10, NULL);
+
+ emit saturationChanged(saturation);
+ }
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.h b/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.h
new file mode 100644
index 0000000000..6a4c0f310e
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.h
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGSTREAMERVIDEOWIDGET_H
+#define QGSTREAMERVIDEOWIDGET_H
+
+#include <QtMultimedia/qvideowidgetcontrol.h>
+
+#include "qgstreamervideorendererinterface.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QGstreamerVideoWidget;
+
+class QGstreamerVideoWidgetControl
+ : public QVideoWidgetControl
+ , public QGstreamerVideoRendererInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QGstreamerVideoRendererInterface)
+public:
+ QGstreamerVideoWidgetControl(QObject *parent = 0);
+ virtual ~QGstreamerVideoWidgetControl();
+
+ GstElement *videoSink();
+ void precessNewStream();
+
+ QWidget *videoWidget();
+
+ QVideoWidget::AspectRatioMode aspectRatioMode() const;
+ void setAspectRatioMode(QVideoWidget::AspectRatioMode mode);
+
+ bool isFullScreen() const;
+ void setFullScreen(bool fullScreen);
+
+ int brightness() const;
+ void setBrightness(int brightness);
+
+ int contrast() const;
+ void setContrast(int contrast);
+
+ int hue() const;
+ void setHue(int hue);
+
+ int saturation() const;
+ void setSaturation(int saturation);
+
+ void setOverlay();
+
+ bool eventFilter(QObject *object, QEvent *event);
+
+public slots:
+ void updateNativeVideoSize();
+
+private:
+ void createVideoWidget();
+ void windowExposed();
+
+ GstElement *m_videoSink;
+ QGstreamerVideoWidget *m_widget;
+ WId m_windowId;
+ QVideoWidget::AspectRatioMode m_aspectRatioMode;
+ bool m_fullScreen;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QGSTREAMERVIDEOWIDGET_H
diff --git a/src/plugins/mediaservices/gstreamer/qgstvideobuffer.cpp b/src/plugins/mediaservices/gstreamer/qgstvideobuffer.cpp
new file mode 100644
index 0000000000..76289bfc7c
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstvideobuffer.cpp
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qgstvideobuffer.h"
+
+
+QT_BEGIN_NAMESPACE
+
+QGstVideoBuffer::QGstVideoBuffer(GstBuffer *buffer, int bytesPerLine)
+ : QAbstractVideoBuffer(NoHandle)
+ , m_buffer(buffer)
+ , m_bytesPerLine(bytesPerLine)
+ , m_mode(NotMapped)
+{
+ gst_buffer_ref(m_buffer);
+}
+
+QGstVideoBuffer::QGstVideoBuffer(GstBuffer *buffer, int bytesPerLine,
+ QGstVideoBuffer::HandleType handleType,
+ const QVariant &handle)
+ : QAbstractVideoBuffer(handleType)
+ , m_buffer(buffer)
+ , m_bytesPerLine(bytesPerLine)
+ , m_mode(NotMapped)
+ , m_handle(handle)
+{
+ gst_buffer_ref(m_buffer);
+}
+
+QGstVideoBuffer::~QGstVideoBuffer()
+{
+ gst_buffer_unref(m_buffer);
+}
+
+
+QAbstractVideoBuffer::MapMode QGstVideoBuffer::mapMode() const
+{
+ return m_mode;
+}
+
+uchar *QGstVideoBuffer::map(MapMode mode, int *numBytes, int *bytesPerLine)
+{
+ if (mode != NotMapped && m_mode == NotMapped) {
+ if (numBytes)
+ *numBytes = m_buffer->size;
+
+ if (bytesPerLine)
+ *bytesPerLine = m_bytesPerLine;
+
+ m_mode = mode;
+
+ return m_buffer->data;
+ } else {
+ return 0;
+ }
+}
+void QGstVideoBuffer::unmap()
+{
+ m_mode = NotMapped;
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/plugins/mediaservices/gstreamer/qgstvideobuffer.h b/src/plugins/mediaservices/gstreamer/qgstvideobuffer.h
new file mode 100644
index 0000000000..5133e2e380
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstvideobuffer.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGSTVIDEOBUFFER_H
+#define QGSTVIDEOBUFFER_H
+
+#include <QtMultimedia/QAbstractVideoBuffer>
+#include <QtCore/qvariant.h>
+
+#include <gst/gst.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QGstVideoBuffer : public QAbstractVideoBuffer
+{
+public:
+ QGstVideoBuffer(GstBuffer *buffer, int bytesPerLine);
+ QGstVideoBuffer(GstBuffer *buffer, int bytesPerLine,
+ HandleType handleType, const QVariant &handle);
+ ~QGstVideoBuffer();
+
+ MapMode mapMode() const;
+
+ uchar *map(MapMode mode, int *numBytes, int *bytesPerLine);
+ void unmap();
+
+ QVariant handle() const { return m_handle; }
+private:
+ GstBuffer *m_buffer;
+ int m_bytesPerLine;
+ MapMode m_mode;
+ QVariant m_handle;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/gstreamer/qgstxvimagebuffer.cpp b/src/plugins/mediaservices/gstreamer/qgstxvimagebuffer.cpp
new file mode 100644
index 0000000000..b2e633d988
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstxvimagebuffer.cpp
@@ -0,0 +1,282 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qthread.h>
+#include <QtCore/qvariant.h>
+#include <QtGui/qx11info_x11.h>
+
+#include "qgstxvimagebuffer.h"
+#include "qvideosurfacegstsink.h"
+
+
+QT_BEGIN_NAMESPACE
+
+GstBufferClass *QGstXvImageBuffer::parent_class = NULL;
+
+GType QGstXvImageBuffer::get_type(void)
+{
+ static GType buffer_type = 0;
+
+ if (buffer_type == 0) {
+ static const GTypeInfo buffer_info = {
+ sizeof (GstBufferClass),
+ NULL,
+ NULL,
+ QGstXvImageBuffer::class_init,
+ NULL,
+ NULL,
+ sizeof(QGstXvImageBuffer),
+ 0,
+ (GInstanceInitFunc)QGstXvImageBuffer::buffer_init,
+ NULL
+ };
+ buffer_type = g_type_register_static(GST_TYPE_BUFFER,
+ "QGstXvImageBuffer", &buffer_info, GTypeFlags(0));
+ }
+ return buffer_type;
+}
+
+void QGstXvImageBuffer::class_init(gpointer g_class, gpointer class_data)
+{
+ Q_UNUSED(class_data);
+ GST_MINI_OBJECT_CLASS(g_class)->finalize =
+ (GstMiniObjectFinalizeFunction)buffer_finalize;
+ parent_class = (GstBufferClass*)g_type_class_peek_parent(g_class);
+}
+
+void QGstXvImageBuffer::buffer_init(QGstXvImageBuffer *xvImage, gpointer g_class)
+{
+ Q_UNUSED(g_class);
+ xvImage->pool = 0;
+ xvImage->shmInfo.shmaddr = ((char *) -1);
+ xvImage->shmInfo.shmid = -1;
+ xvImage->markedForDeletion = false;
+}
+
+void QGstXvImageBuffer::buffer_finalize(QGstXvImageBuffer * xvImage)
+{
+ if (xvImage->pool) {
+ if (xvImage->markedForDeletion)
+ xvImage->pool->destroyBuffer(xvImage);
+ else
+ xvImage->pool->recycleBuffer(xvImage);
+ }
+}
+
+
+QGstXvImageBufferPool::QGstXvImageBufferPool(QObject *parent)
+ :QObject(parent)
+{
+}
+
+QGstXvImageBufferPool::~QGstXvImageBufferPool()
+{
+}
+
+bool QGstXvImageBufferPool::isFormatSupported(const QVideoSurfaceFormat &surfaceFormat)
+{
+ bool ok = true;
+ surfaceFormat.property("portId").toULongLong(&ok);
+ if (!ok)
+ return false;
+
+ int xvFormatId = surfaceFormat.property("xvFormatId").toInt(&ok);
+ if (!ok || xvFormatId < 0)
+ return false;
+
+ int dataSize = surfaceFormat.property("dataSize").toInt(&ok);
+ if (!ok || dataSize<=0)
+ return false;
+
+ return true;
+}
+
+QGstXvImageBuffer *QGstXvImageBufferPool::takeBuffer(const QVideoSurfaceFormat &format, GstCaps *caps)
+{
+ m_poolMutex.lock();
+
+ m_caps = caps;
+ if (format != m_format) {
+ doClear();
+ m_format = format;
+ }
+
+
+ if (m_pool.isEmpty()) {
+ //qDebug() << "QGstXvImageBufferPool::takeBuffer: no buffer available, allocate the new one";
+ if (QThread::currentThread() == thread()) {
+ m_poolMutex.unlock();
+ queuedAlloc();
+ m_poolMutex.lock();
+ } else {
+ QMetaObject::invokeMethod(this, "queuedAlloc", Qt::QueuedConnection);
+ m_allocWaitCondition.wait(&m_poolMutex, 300);
+ }
+ }
+ QGstXvImageBuffer *res = 0;
+
+ if (!m_pool.isEmpty()) {
+ res = m_pool.takeLast();
+ }
+
+ m_poolMutex.unlock();
+
+ return res;
+}
+
+void QGstXvImageBufferPool::queuedAlloc()
+{
+ QMutexLocker lock(&m_poolMutex);
+
+ Q_ASSERT(QThread::currentThread() == thread());
+
+ QGstXvImageBuffer *xvBuffer = (QGstXvImageBuffer *)gst_mini_object_new(QGstXvImageBuffer::get_type());
+
+ quint64 portId = m_format.property("portId").toULongLong();
+ int xvFormatId = m_format.property("xvFormatId").toInt();
+
+ xvBuffer->xvImage = XvShmCreateImage(
+ QX11Info::display(),
+ portId,
+ xvFormatId,
+ 0,
+ m_format.frameWidth(),
+ m_format.frameHeight(),
+ &xvBuffer->shmInfo
+ );
+
+ if (!xvBuffer->xvImage) {
+// qDebug() << "QGstXvImageBufferPool: XvShmCreateImage failed";
+ m_allocWaitCondition.wakeOne();
+ return;
+ }
+
+ xvBuffer->shmInfo.shmid = shmget(IPC_PRIVATE, xvBuffer->xvImage->data_size, IPC_CREAT | 0777);
+ xvBuffer->shmInfo.shmaddr = xvBuffer->xvImage->data = (char*)shmat(xvBuffer->shmInfo.shmid, 0, 0);
+ xvBuffer->shmInfo.readOnly = False;
+
+ if (!XShmAttach(QX11Info::display(), &xvBuffer->shmInfo)) {
+// qDebug() << "QGstXvImageBufferPool: XShmAttach failed";
+ m_allocWaitCondition.wakeOne();
+ return;
+ }
+
+ shmctl (xvBuffer->shmInfo.shmid, IPC_RMID, NULL);
+
+ xvBuffer->pool = this;
+ GST_MINI_OBJECT_CAST(xvBuffer)->flags = 0;
+ gst_buffer_set_caps(GST_BUFFER_CAST(xvBuffer), m_caps);
+ GST_BUFFER_DATA(xvBuffer) = (uchar*)xvBuffer->xvImage->data;
+ GST_BUFFER_SIZE(xvBuffer) = xvBuffer->xvImage->data_size;
+
+ m_allBuffers.append(xvBuffer);
+ m_pool.append(xvBuffer);
+
+ m_allocWaitCondition.wakeOne();
+}
+
+
+void QGstXvImageBufferPool::clear()
+{
+ QMutexLocker lock(&m_poolMutex);
+ doClear();
+}
+
+void QGstXvImageBufferPool::doClear()
+{
+ foreach (QGstXvImageBuffer *xvBuffer, m_allBuffers) {
+ xvBuffer->markedForDeletion = true;
+ }
+ m_allBuffers.clear();
+
+ foreach (QGstXvImageBuffer *xvBuffer, m_pool) {
+ gst_buffer_unref(GST_BUFFER(xvBuffer));
+ }
+ m_pool.clear();
+
+ m_format = QVideoSurfaceFormat();
+}
+
+void QGstXvImageBufferPool::queuedDestroy()
+{
+ QMutexLocker lock(&m_destroyMutex);
+
+ foreach(XvShmImage xvImage, m_imagesToDestroy) {
+ if (xvImage.shmInfo.shmaddr != ((void *) -1)) {
+ XShmDetach(QX11Info::display(), &xvImage.shmInfo);
+ XSync(QX11Info::display(), false);
+
+ shmdt(xvImage.shmInfo.shmaddr);
+ }
+
+ if (xvImage.xvImage)
+ XFree(xvImage.xvImage);
+ }
+
+ m_imagesToDestroy.clear();
+
+ XSync(QX11Info::display(), false);
+}
+
+void QGstXvImageBufferPool::recycleBuffer(QGstXvImageBuffer *xvBuffer)
+{
+ QMutexLocker lock(&m_poolMutex);
+ gst_buffer_ref(GST_BUFFER_CAST(xvBuffer));
+ m_pool.append(xvBuffer);
+}
+
+void QGstXvImageBufferPool::destroyBuffer(QGstXvImageBuffer *xvBuffer)
+{
+ XvShmImage imageToDestroy;
+ imageToDestroy.xvImage = xvBuffer->xvImage;
+ imageToDestroy.shmInfo = xvBuffer->shmInfo;
+
+ m_destroyMutex.lock();
+ m_imagesToDestroy.append(imageToDestroy);
+ m_destroyMutex.unlock();
+
+ if (m_imagesToDestroy.size() == 1)
+ QMetaObject::invokeMethod(this, "queuedDestroy", Qt::QueuedConnection);
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/plugins/mediaservices/gstreamer/qgstxvimagebuffer.h b/src/plugins/mediaservices/gstreamer/qgstxvimagebuffer.h
new file mode 100644
index 0000000000..30f77d154b
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qgstxvimagebuffer.h
@@ -0,0 +1,131 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGSTXVIMAGEBUFFER_H
+#define QGSTXVIMAGEBUFFER_H
+
+#include <QtMultimedia/qabstractvideobuffer.h>
+#include <QtMultimedia/qvideosurfaceformat.h>
+#include <QtCore/qmutex.h>
+#include <QtCore/qwaitcondition.h>
+#include <QtCore/qqueue.h>
+
+#include <X11/Xlib.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <X11/extensions/XShm.h>
+#include <X11/Xlib.h>
+#include <X11/extensions/Xv.h>
+#include <X11/extensions/Xvlib.h>
+
+#include <gst/gst.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QGstXvImageBufferPool;
+
+struct QGstXvImageBuffer {
+ GstBuffer buffer;
+ QGstXvImageBufferPool *pool;
+ XvImage *xvImage;
+ XShmSegmentInfo shmInfo;
+ bool markedForDeletion;
+
+ static GType get_type(void);
+ static void class_init(gpointer g_class, gpointer class_data);
+ static void buffer_init(QGstXvImageBuffer *xvimage, gpointer g_class);
+ static void buffer_finalize(QGstXvImageBuffer * xvimage);
+ static GstBufferClass *parent_class;
+};
+
+const QAbstractVideoBuffer::HandleType XvHandleType = QAbstractVideoBuffer::HandleType(4);
+
+
+
+class QGstXvImageBufferPool : public QObject {
+Q_OBJECT
+friend class QGstXvImageBuffer;
+public:
+ QGstXvImageBufferPool(QObject *parent = 0);
+ virtual ~QGstXvImageBufferPool();
+
+ bool isFormatSupported(const QVideoSurfaceFormat &format);
+
+ QGstXvImageBuffer *takeBuffer(const QVideoSurfaceFormat &format, GstCaps *caps);
+ void clear();
+
+private slots:
+ void queuedAlloc();
+ void queuedDestroy();
+
+ void doClear();
+
+ void recycleBuffer(QGstXvImageBuffer *);
+ void destroyBuffer(QGstXvImageBuffer *);
+
+private:
+ struct XvShmImage {
+ XvImage *xvImage;
+ XShmSegmentInfo shmInfo;
+ };
+
+ QMutex m_poolMutex;
+ QMutex m_allocMutex;
+ QWaitCondition m_allocWaitCondition;
+ QMutex m_destroyMutex;
+ QVideoSurfaceFormat m_format;
+ GstCaps *m_caps;
+ QList<QGstXvImageBuffer*> m_pool;
+ QList<QGstXvImageBuffer*> m_allBuffers;
+ QList<XvShmImage> m_imagesToDestroy;
+};
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(::XvImage*)
+
+QT_END_HEADER
+
+
+#endif
diff --git a/src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.cpp b/src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.cpp
new file mode 100644
index 0000000000..76d87cedb7
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.cpp
@@ -0,0 +1,699 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtMultimedia/QAbstractVideoSurface>
+#include <QtMultimedia/QVideoFrame>
+#include <QtCore/qdebug.h>
+#include <QMap>
+#include <QThread>
+#include <QtGui/qx11info_x11.h>
+
+#include "qvideosurfacegstsink.h"
+
+#include "qgstvideobuffer.h"
+#include "qgstxvimagebuffer.h"
+
+
+
+Q_DECLARE_METATYPE(QVideoSurfaceFormat)
+
+QT_BEGIN_NAMESPACE
+
+QVideoSurfaceGstDelegate::QVideoSurfaceGstDelegate(QAbstractVideoSurface *surface)
+ : m_surface(surface)
+ , m_renderReturn(GST_FLOW_ERROR)
+ , m_bytesPerLine(0)
+{
+ m_supportedPixelFormats = m_surface->supportedPixelFormats();
+
+ connect(m_surface, SIGNAL(supportedFormatsChanged()), this, SLOT(supportedFormatsChanged()));
+}
+
+QList<QVideoFrame::PixelFormat> QVideoSurfaceGstDelegate::supportedPixelFormats(QAbstractVideoBuffer::HandleType handleType) const
+{
+ QMutexLocker locker(const_cast<QMutex *>(&m_mutex));
+
+ if (handleType == QAbstractVideoBuffer::NoHandle)
+ return m_supportedPixelFormats;
+ else
+ return m_surface->supportedPixelFormats(handleType);
+}
+
+QVideoSurfaceFormat QVideoSurfaceGstDelegate::surfaceFormat() const
+{
+ QMutexLocker locker(const_cast<QMutex *>(&m_mutex));
+ return m_format;
+}
+
+bool QVideoSurfaceGstDelegate::start(const QVideoSurfaceFormat &format, int bytesPerLine)
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_format = format;
+ m_bytesPerLine = bytesPerLine;
+
+ if (QThread::currentThread() == thread()) {
+ m_started = !m_surface.isNull() ? m_surface->start(m_format) : false;
+ } else {
+ QMetaObject::invokeMethod(this, "queuedStart", Qt::QueuedConnection);
+
+ m_setupCondition.wait(&m_mutex);
+ }
+
+ m_format = m_surface->surfaceFormat();
+
+ return m_started;
+}
+
+void QVideoSurfaceGstDelegate::stop()
+{
+ QMutexLocker locker(&m_mutex);
+
+ if (QThread::currentThread() == thread()) {
+ if (!m_surface.isNull())
+ m_surface->stop();
+ } else {
+ QMetaObject::invokeMethod(this, "queuedStop", Qt::QueuedConnection);
+
+ m_setupCondition.wait(&m_mutex);
+ }
+
+ m_started = false;
+}
+
+bool QVideoSurfaceGstDelegate::isActive()
+{
+ QMutexLocker locker(&m_mutex);
+ return m_surface->isActive();
+}
+
+GstFlowReturn QVideoSurfaceGstDelegate::render(GstBuffer *buffer)
+{
+ QMutexLocker locker(&m_mutex);
+
+ QGstVideoBuffer *videoBuffer = 0;
+
+ if (G_TYPE_CHECK_INSTANCE_TYPE(buffer, QGstXvImageBuffer::get_type())) {
+ QGstXvImageBuffer *xvBuffer = reinterpret_cast<QGstXvImageBuffer *>(buffer);
+ QVariant handle = QVariant::fromValue(xvBuffer->xvImage);
+ videoBuffer = new QGstVideoBuffer(buffer, m_bytesPerLine, XvHandleType, handle);
+ } else
+ videoBuffer = new QGstVideoBuffer(buffer, m_bytesPerLine);
+
+ m_frame = QVideoFrame(
+ videoBuffer,
+ m_format.frameSize(),
+ m_format.pixelFormat());
+
+ qint64 startTime = GST_BUFFER_TIMESTAMP(buffer);
+
+ if (startTime >= 0) {
+ m_frame.setStartTime(startTime/G_GINT64_CONSTANT (1000000));
+
+ qint64 duration = GST_BUFFER_DURATION(buffer);
+
+ if (duration >= 0)
+ m_frame.setEndTime((startTime + duration)/G_GINT64_CONSTANT (1000000));
+ }
+
+ QMetaObject::invokeMethod(this, "queuedRender", Qt::QueuedConnection);
+
+ if (!m_renderCondition.wait(&m_mutex, 300)) {
+ m_frame = QVideoFrame();
+
+ return GST_FLOW_OK;
+ } else {
+ return m_renderReturn;
+ }
+}
+
+void QVideoSurfaceGstDelegate::queuedStart()
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_started = m_surface->start(m_format);
+
+ m_setupCondition.wakeAll();
+}
+
+void QVideoSurfaceGstDelegate::queuedStop()
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_surface->stop();
+
+ m_setupCondition.wakeAll();
+}
+
+void QVideoSurfaceGstDelegate::queuedRender()
+{
+ QMutexLocker locker(&m_mutex);
+
+ if (m_surface.isNull()) {
+ m_renderReturn = GST_FLOW_ERROR;
+ } else if (m_surface->present(m_frame)) {
+ m_renderReturn = GST_FLOW_OK;
+ } else {
+ switch (m_surface->error()) {
+ case QAbstractVideoSurface::NoError:
+ m_renderReturn = GST_FLOW_OK;
+ break;
+ case QAbstractVideoSurface::StoppedError:
+ m_renderReturn = GST_FLOW_NOT_NEGOTIATED;
+ break;
+ default:
+ m_renderReturn = GST_FLOW_ERROR;
+ break;
+ }
+ }
+
+ m_renderCondition.wakeAll();
+}
+
+void QVideoSurfaceGstDelegate::supportedFormatsChanged()
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_supportedPixelFormats = m_surface->supportedPixelFormats();
+}
+
+struct YuvFormat
+{
+ QVideoFrame::PixelFormat pixelFormat;
+ guint32 fourcc;
+ int bitsPerPixel;
+};
+
+static const YuvFormat qt_yuvColorLookup[] =
+{
+ { QVideoFrame::Format_YUV420P, GST_MAKE_FOURCC('I','4','2','0'), 8 },
+ { QVideoFrame::Format_YV12, GST_MAKE_FOURCC('Y','V','1','2'), 8 },
+ { QVideoFrame::Format_UYVY, GST_MAKE_FOURCC('U','Y','V','Y'), 16 },
+ { QVideoFrame::Format_YUYV, GST_MAKE_FOURCC('Y','U','Y','2'), 16 },
+ { QVideoFrame::Format_NV12, GST_MAKE_FOURCC('N','V','1','2'), 8 },
+ { QVideoFrame::Format_NV21, GST_MAKE_FOURCC('N','V','2','1'), 8 },
+ { QVideoFrame::Format_AYUV444, GST_MAKE_FOURCC('A','Y','U','V'), 32 }
+};
+
+static int indexOfYuvColor(QVideoFrame::PixelFormat format)
+{
+ const int count = sizeof(qt_yuvColorLookup) / sizeof(YuvFormat);
+
+ for (int i = 0; i < count; ++i)
+ if (qt_yuvColorLookup[i].pixelFormat == format)
+ return i;
+
+ return -1;
+}
+
+static int indexOfYuvColor(guint32 fourcc)
+{
+ const int count = sizeof(qt_yuvColorLookup) / sizeof(YuvFormat);
+
+ for (int i = 0; i < count; ++i)
+ if (qt_yuvColorLookup[i].fourcc == fourcc)
+ return i;
+
+ return -1;
+}
+
+struct RgbFormat
+{
+ QVideoFrame::PixelFormat pixelFormat;
+ int bitsPerPixel;
+ int depth;
+ int endianness;
+ int red;
+ int green;
+ int blue;
+ int alpha;
+};
+
+static const RgbFormat qt_rgbColorLookup[] =
+{
+ { QVideoFrame::Format_RGB32 , 32, 24, 4321, 0x0000FF00, 0x00FF0000, 0xFF000000, 0x00000000 },
+ { QVideoFrame::Format_RGB32 , 32, 24, 1234, 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 },
+ { QVideoFrame::Format_BGR32 , 32, 24, 4321, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x00000000 },
+ { QVideoFrame::Format_BGR32 , 32, 24, 1234, 0x000000FF, 0x0000FF00, 0x00FF0000, 0x00000000 },
+ { QVideoFrame::Format_ARGB32, 32, 24, 4321, 0x0000FF00, 0x00FF0000, 0xFF000000, 0x000000FF },
+ { QVideoFrame::Format_ARGB32, 32, 24, 1234, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 },
+ { QVideoFrame::Format_RGB24 , 24, 24, 4321, 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 },
+ { QVideoFrame::Format_BGR24 , 24, 24, 4321, 0x000000FF, 0x0000FF00, 0x00FF0000, 0x00000000 },
+ { QVideoFrame::Format_RGB565, 16, 16, 1234, 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }
+};
+
+static int indexOfRgbColor(
+ int bits, int depth, int endianness, int red, int green, int blue, int alpha)
+{
+ const int count = sizeof(qt_rgbColorLookup) / sizeof(RgbFormat);
+
+ for (int i = 0; i < count; ++i) {
+ if (qt_rgbColorLookup[i].bitsPerPixel == bits
+ && qt_rgbColorLookup[i].depth == depth
+ && qt_rgbColorLookup[i].endianness == endianness
+ && qt_rgbColorLookup[i].red == red
+ && qt_rgbColorLookup[i].green == green
+ && qt_rgbColorLookup[i].blue == blue
+ && qt_rgbColorLookup[i].alpha == alpha) {
+ return i;
+ }
+ }
+ return -1;
+}
+
+static GstVideoSinkClass *sink_parent_class;
+
+#define VO_SINK(s) QVideoSurfaceGstSink *sink(reinterpret_cast<QVideoSurfaceGstSink *>(s))
+
+QVideoSurfaceGstSink *QVideoSurfaceGstSink::createSink(QAbstractVideoSurface *surface)
+{
+ QVideoSurfaceGstSink *sink = reinterpret_cast<QVideoSurfaceGstSink *>(
+ g_object_new(QVideoSurfaceGstSink::get_type(), 0));
+
+ sink->delegate = new QVideoSurfaceGstDelegate(surface);
+
+ return sink;
+}
+
+GType QVideoSurfaceGstSink::get_type()
+{
+ static GType type = 0;
+
+ if (type == 0) {
+ static const GTypeInfo info =
+ {
+ sizeof(QVideoSurfaceGstSinkClass), // class_size
+ base_init, // base_init
+ NULL, // base_finalize
+ class_init, // class_init
+ NULL, // class_finalize
+ NULL, // class_data
+ sizeof(QVideoSurfaceGstSink), // instance_size
+ 0, // n_preallocs
+ instance_init, // instance_init
+ 0 // value_table
+ };
+
+ type = g_type_register_static(
+ GST_TYPE_VIDEO_SINK, "QVideoSurfaceGstSink", &info, GTypeFlags(0));
+ }
+
+ return type;
+}
+
+void QVideoSurfaceGstSink::class_init(gpointer g_class, gpointer class_data)
+{
+ Q_UNUSED(class_data);
+
+ sink_parent_class = reinterpret_cast<GstVideoSinkClass *>(g_type_class_peek_parent(g_class));
+
+ GstBaseSinkClass *base_sink_class = reinterpret_cast<GstBaseSinkClass *>(g_class);
+ base_sink_class->get_caps = QVideoSurfaceGstSink::get_caps;
+ base_sink_class->set_caps = QVideoSurfaceGstSink::set_caps;
+ base_sink_class->buffer_alloc = QVideoSurfaceGstSink::buffer_alloc;
+ base_sink_class->start = QVideoSurfaceGstSink::start;
+ base_sink_class->stop = QVideoSurfaceGstSink::stop;
+ // base_sink_class->unlock = QVideoSurfaceGstSink::unlock; // Not implemented.
+ // base_sink_class->event = QVideoSurfaceGstSink::event; // Not implemented.
+ base_sink_class->preroll = QVideoSurfaceGstSink::preroll;
+ base_sink_class->render = QVideoSurfaceGstSink::render;
+
+ GstElementClass *element_class = reinterpret_cast<GstElementClass *>(g_class);
+ element_class->change_state = QVideoSurfaceGstSink::change_state;
+
+ GObjectClass *object_class = reinterpret_cast<GObjectClass *>(g_class);
+ object_class->finalize = QVideoSurfaceGstSink::finalize;
+}
+
+void QVideoSurfaceGstSink::base_init(gpointer g_class)
+{
+ static GstStaticPadTemplate sink_pad_template = GST_STATIC_PAD_TEMPLATE(
+ "sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS(
+ "video/x-raw-rgb, "
+ "framerate = (fraction) [ 0, MAX ], "
+ "width = (int) [ 1, MAX ], "
+ "height = (int) [ 1, MAX ]; "
+ "video/x-raw-yuv, "
+ "framerate = (fraction) [ 0, MAX ], "
+ "width = (int) [ 1, MAX ], "
+ "height = (int) [ 1, MAX ]"));
+
+ gst_element_class_add_pad_template(
+ GST_ELEMENT_CLASS(g_class), gst_static_pad_template_get(&sink_pad_template));
+}
+
+void QVideoSurfaceGstSink::instance_init(GTypeInstance *instance, gpointer g_class)
+{
+ VO_SINK(instance);
+
+ Q_UNUSED(g_class);
+
+ sink->delegate = 0;
+ sink->pool = new QGstXvImageBufferPool();
+ sink->lastRequestedCaps = 0;
+ sink->lastBufferCaps = 0;
+ sink->lastSurfaceFormat = new QVideoSurfaceFormat;
+}
+
+void QVideoSurfaceGstSink::finalize(GObject *object)
+{
+ VO_SINK(object);
+ delete sink->pool;
+ sink->pool = 0;
+ delete sink->lastSurfaceFormat;
+ sink->lastSurfaceFormat = 0;
+
+ if (sink->lastBufferCaps)
+ gst_caps_unref(sink->lastBufferCaps);
+ sink->lastBufferCaps = 0;
+
+ if (sink->lastRequestedCaps)
+ gst_caps_unref(sink->lastRequestedCaps);
+ sink->lastRequestedCaps = 0;
+}
+
+GstStateChangeReturn QVideoSurfaceGstSink::change_state(
+ GstElement *element, GstStateChange transition)
+{
+ Q_UNUSED(element);
+
+ return GST_ELEMENT_CLASS(sink_parent_class)->change_state(
+ element, transition);
+}
+
+GstCaps *QVideoSurfaceGstSink::get_caps(GstBaseSink *base)
+{
+ VO_SINK(base);
+
+ GstCaps *caps = gst_caps_new_empty();
+
+ foreach (QVideoFrame::PixelFormat format, sink->delegate->supportedPixelFormats()) {
+ int index = indexOfYuvColor(format);
+
+ if (index != -1) {
+ gst_caps_append_structure(caps, gst_structure_new(
+ "video/x-raw-yuv",
+ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, INT_MAX, 1,
+ "width" , GST_TYPE_INT_RANGE, 1, INT_MAX,
+ "height" , GST_TYPE_INT_RANGE, 1, INT_MAX,
+ "format" , GST_TYPE_FOURCC, qt_yuvColorLookup[index].fourcc,
+ NULL));
+ continue;
+ }
+
+ const int count = sizeof(qt_rgbColorLookup) / sizeof(RgbFormat);
+
+ for (int i = 0; i < count; ++i) {
+ if (qt_rgbColorLookup[i].pixelFormat == format) {
+ GstStructure *structure = gst_structure_new(
+ "video/x-raw-rgb",
+ "framerate" , GST_TYPE_FRACTION_RANGE, 0, 1, INT_MAX, 1,
+ "width" , GST_TYPE_INT_RANGE, 1, INT_MAX,
+ "height" , GST_TYPE_INT_RANGE, 1, INT_MAX,
+ "bpp" , G_TYPE_INT, qt_rgbColorLookup[i].bitsPerPixel,
+ "depth" , G_TYPE_INT, qt_rgbColorLookup[i].depth,
+ "endianness", G_TYPE_INT, qt_rgbColorLookup[i].endianness,
+ "red_mask" , G_TYPE_INT, qt_rgbColorLookup[i].red,
+ "green_mask", G_TYPE_INT, qt_rgbColorLookup[i].green,
+ "blue_mask" , G_TYPE_INT, qt_rgbColorLookup[i].blue,
+ NULL);
+
+ if (qt_rgbColorLookup[i].alpha != 0) {
+ gst_structure_set(
+ structure, "alpha_mask", G_TYPE_INT, qt_rgbColorLookup[i].alpha, NULL);
+ }
+ gst_caps_append_structure(caps, structure);
+ }
+ }
+ }
+
+ return caps;
+}
+
+gboolean QVideoSurfaceGstSink::set_caps(GstBaseSink *base, GstCaps *caps)
+{
+ VO_SINK(base);
+
+ //qDebug() << "set_caps";
+ //qDebug() << gst_caps_to_string(caps);
+
+ if (!caps) {
+ sink->delegate->stop();
+
+ return TRUE;
+ } else {
+ int bytesPerLine = 0;
+ QVideoSurfaceFormat format = formatForCaps(caps, &bytesPerLine);
+
+ if (sink->delegate->isActive()) {
+ QVideoSurfaceFormat surfaceFormst = sink->delegate->surfaceFormat();
+
+ if (format.pixelFormat() == surfaceFormst.pixelFormat() &&
+ format.frameSize() == surfaceFormst.frameSize())
+ return TRUE;
+ else
+ sink->delegate->stop();
+ }
+
+ if (sink->lastRequestedCaps)
+ gst_caps_unref(sink->lastRequestedCaps);
+ sink->lastRequestedCaps = 0;
+
+ //qDebug() << "Staring video surface:";
+ //qDebug() << format;
+ //qDebug() << bytesPerLine;
+
+ if (sink->delegate->start(format, bytesPerLine))
+ return TRUE;
+
+ }
+
+ return FALSE;
+}
+
+QVideoSurfaceFormat QVideoSurfaceGstSink::formatForCaps(GstCaps *caps, int *bytesPerLine)
+{
+ const GstStructure *structure = gst_caps_get_structure(caps, 0);
+
+ QVideoFrame::PixelFormat pixelFormat = QVideoFrame::Format_Invalid;
+ int bitsPerPixel = 0;
+
+ QSize size;
+ gst_structure_get_int(structure, "width", &size.rwidth());
+ gst_structure_get_int(structure, "height", &size.rheight());
+
+ if (qstrcmp(gst_structure_get_name(structure), "video/x-raw-yuv") == 0) {
+ guint32 fourcc = 0;
+ gst_structure_get_fourcc(structure, "format", &fourcc);
+
+ int index = indexOfYuvColor(fourcc);
+ if (index != -1) {
+ pixelFormat = qt_yuvColorLookup[index].pixelFormat;
+ bitsPerPixel = qt_yuvColorLookup[index].bitsPerPixel;
+ }
+ } else if (qstrcmp(gst_structure_get_name(structure), "video/x-raw-rgb") == 0) {
+ int depth = 0;
+ int endianness = 0;
+ int red = 0;
+ int green = 0;
+ int blue = 0;
+ int alpha = 0;
+
+ gst_structure_get_int(structure, "bpp", &bitsPerPixel);
+ gst_structure_get_int(structure, "depth", &depth);
+ gst_structure_get_int(structure, "endianness", &endianness);
+ gst_structure_get_int(structure, "red_mask", &red);
+ gst_structure_get_int(structure, "green_mask", &green);
+ gst_structure_get_int(structure, "blue_mask", &blue);
+ gst_structure_get_int(structure, "alpha_mask", &alpha);
+
+ int index = indexOfRgbColor(bitsPerPixel, depth, endianness, red, green, blue, alpha);
+
+ if (index != -1)
+ pixelFormat = qt_rgbColorLookup[index].pixelFormat;
+ }
+
+ if (pixelFormat != QVideoFrame::Format_Invalid) {
+ QVideoSurfaceFormat format(size, pixelFormat);
+
+ QPair<int, int> rate;
+ gst_structure_get_fraction(structure, "framerate", &rate.first, &rate.second);
+
+ if (rate.second)
+ format.setFrameRate(qreal(rate.first)/rate.second);
+
+ gint aspectNum = 0;
+ gint aspectDenum = 0;
+ if (gst_structure_get_fraction(
+ structure, "pixel-aspect-ratio", &aspectNum, &aspectDenum)) {
+ if (aspectDenum > 0)
+ format.setPixelAspectRatio(aspectNum, aspectDenum);
+ }
+
+ if (bytesPerLine)
+ *bytesPerLine = ((size.width() * bitsPerPixel / 8) + 3) & ~3;
+
+ return format;
+ }
+
+ return QVideoSurfaceFormat();
+}
+
+
+GstFlowReturn QVideoSurfaceGstSink::buffer_alloc(
+ GstBaseSink *base, guint64 offset, guint size, GstCaps *caps, GstBuffer **buffer)
+{
+ VO_SINK(base);
+
+ Q_UNUSED(offset);
+ Q_UNUSED(size);
+
+ *buffer = 0;
+
+ if (sink->lastRequestedCaps && gst_caps_is_equal(sink->lastRequestedCaps, caps)) {
+ //qDebug() << "reusing last caps";
+ *buffer = GST_BUFFER(sink->pool->takeBuffer(*sink->lastSurfaceFormat, sink->lastBufferCaps));
+ return GST_FLOW_OK;
+ }
+
+ if (sink->delegate->supportedPixelFormats(XvHandleType).isEmpty()) {
+ //qDebug() << "sink doesn't support Xv buffers, skip buffers allocation";
+ return GST_FLOW_OK;
+ }
+
+ GstCaps *intersection = gst_caps_intersect(get_caps(GST_BASE_SINK(sink)), caps);
+
+ if (gst_caps_is_empty (intersection)) {
+ gst_caps_unref(intersection);
+ return GST_FLOW_NOT_NEGOTIATED;
+ }
+
+ if (sink->delegate->isActive()) {
+ //if format was changed, restart the surface
+ QVideoSurfaceFormat format = formatForCaps(intersection);
+ QVideoSurfaceFormat surfaceFormat = sink->delegate->surfaceFormat();
+
+ if (format.pixelFormat() != surfaceFormat.pixelFormat() ||
+ format.frameSize() != surfaceFormat.frameSize()) {
+ //qDebug() << "new format requested, restart video surface";
+ sink->delegate->stop();
+ }
+ }
+
+ if (!sink->delegate->isActive()) {
+ int bytesPerLine = 0;
+ QVideoSurfaceFormat format = formatForCaps(intersection, &bytesPerLine);
+
+ if (!sink->delegate->start(format, bytesPerLine)) {
+ qDebug() << "failed to start video surface";
+ return GST_FLOW_NOT_NEGOTIATED;
+ }
+ }
+
+ QVideoSurfaceFormat surfaceFormat = sink->delegate->surfaceFormat();
+
+ if (!sink->pool->isFormatSupported(surfaceFormat)) {
+ //qDebug() << "sink doesn't provide Xv buffer details, skip buffers allocation";
+ return GST_FLOW_OK;
+ }
+
+ if (sink->lastRequestedCaps)
+ gst_caps_unref(sink->lastRequestedCaps);
+ sink->lastRequestedCaps = caps;
+ gst_caps_ref(sink->lastRequestedCaps);
+
+ if (sink->lastBufferCaps)
+ gst_caps_unref(sink->lastBufferCaps);
+ sink->lastBufferCaps = intersection;
+ gst_caps_ref(sink->lastBufferCaps);
+
+ *sink->lastSurfaceFormat = surfaceFormat;
+
+ *buffer = GST_BUFFER(sink->pool->takeBuffer(surfaceFormat, intersection));
+
+ return GST_FLOW_OK;
+}
+
+gboolean QVideoSurfaceGstSink::start(GstBaseSink *base)
+{
+ Q_UNUSED(base);
+
+ return TRUE;
+}
+
+gboolean QVideoSurfaceGstSink::stop(GstBaseSink *base)
+{
+ Q_UNUSED(base);
+
+ return TRUE;
+}
+
+gboolean QVideoSurfaceGstSink::unlock(GstBaseSink *base)
+{
+ Q_UNUSED(base);
+
+ return TRUE;
+}
+
+gboolean QVideoSurfaceGstSink::event(GstBaseSink *base, GstEvent *event)
+{
+ Q_UNUSED(base);
+ Q_UNUSED(event);
+
+ return TRUE;
+}
+
+GstFlowReturn QVideoSurfaceGstSink::preroll(GstBaseSink *base, GstBuffer *buffer)
+{
+ VO_SINK(base);
+
+ return sink->delegate->render(buffer);
+}
+
+GstFlowReturn QVideoSurfaceGstSink::render(GstBaseSink *base, GstBuffer *buffer)
+{
+ VO_SINK(base);
+ return sink->delegate->render(buffer);
+}
+
+QT_END_NAMESPACE
+
+
diff --git a/src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.h b/src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.h
new file mode 100644
index 0000000000..f59a43c2fd
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.h
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef VIDEOSURFACEGSTSINK_H
+#define VIDEOSURFACEGSTSINK_H
+
+#include <gst/video/gstvideosink.h>
+
+#include <QtCore/qlist.h>
+#include <QtCore/qmutex.h>
+#include <QtCore/qpointer.h>
+#include <QtCore/qwaitcondition.h>
+#include <QtMultimedia/qvideosurfaceformat.h>
+#include <QtMultimedia/qvideoframe.h>
+#include <QtMultimedia/qabstractvideobuffer.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QAbstractVideoSurface;
+
+class QGstXvImageBuffer;
+class QGstXvImageBufferPool;
+
+
+class QVideoSurfaceGstDelegate : public QObject
+{
+ Q_OBJECT
+public:
+ QVideoSurfaceGstDelegate(QAbstractVideoSurface *surface);
+
+ QList<QVideoFrame::PixelFormat> supportedPixelFormats(
+ QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const;
+
+ QVideoSurfaceFormat surfaceFormat() const;
+
+
+ bool start(const QVideoSurfaceFormat &format, int bytesPerLine);
+ void stop();
+
+ bool isActive();
+
+ GstFlowReturn render(GstBuffer *buffer);
+
+private slots:
+ void queuedStart();
+ void queuedStop();
+ void queuedRender();
+
+ void supportedFormatsChanged();
+
+private:
+ QPointer<QAbstractVideoSurface> m_surface;
+ QList<QVideoFrame::PixelFormat> m_supportedPixelFormats;
+ QMutex m_mutex;
+ QWaitCondition m_setupCondition;
+ QWaitCondition m_renderCondition;
+ QVideoSurfaceFormat m_format;
+ QVideoFrame m_frame;
+ GstFlowReturn m_renderReturn;
+ int m_bytesPerLine;
+ bool m_started;
+};
+
+class QVideoSurfaceGstSink
+{
+public:
+ GstVideoSink parent;
+
+ static QVideoSurfaceGstSink *createSink(QAbstractVideoSurface *surface);
+ static QVideoSurfaceFormat formatForCaps(GstCaps *caps, int *bytesPerLine = 0);
+
+private:
+ static GType get_type();
+ static void class_init(gpointer g_class, gpointer class_data);
+ static void base_init(gpointer g_class);
+ static void instance_init(GTypeInstance *instance, gpointer g_class);
+
+ static void finalize(GObject *object);
+
+ static GstStateChangeReturn change_state(GstElement *element, GstStateChange transition);
+
+ static GstCaps *get_caps(GstBaseSink *sink);
+ static gboolean set_caps(GstBaseSink *sink, GstCaps *caps);
+
+ static GstFlowReturn buffer_alloc(
+ GstBaseSink *sink, guint64 offset, guint size, GstCaps *caps, GstBuffer **buffer);
+
+ static gboolean start(GstBaseSink *sink);
+ static gboolean stop(GstBaseSink *sink);
+
+ static gboolean unlock(GstBaseSink *sink);
+
+ static gboolean event(GstBaseSink *sink, GstEvent *event);
+ static GstFlowReturn preroll(GstBaseSink *sink, GstBuffer *buffer);
+ static GstFlowReturn render(GstBaseSink *sink, GstBuffer *buffer);
+
+private:
+ QVideoSurfaceGstDelegate *delegate;
+ QGstXvImageBufferPool *pool;
+ GstCaps *lastRequestedCaps;
+ GstCaps *lastBufferCaps;
+ QVideoSurfaceFormat *lastSurfaceFormat;
+};
+
+
+class QVideoSurfaceGstSinkClass
+{
+public:
+ GstVideoSinkClass parent_class;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/gstreamer/qx11videosurface.cpp b/src/plugins/mediaservices/gstreamer/qx11videosurface.cpp
new file mode 100644
index 0000000000..cbd5a765a8
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qx11videosurface.cpp
@@ -0,0 +1,513 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qvariant.h>
+#include <QtCore/qdebug.h>
+#include <QtGui/qx11info_x11.h>
+#include <QtMultimedia/qvideosurfaceformat.h>
+
+#include "qx11videosurface.h"
+
+Q_DECLARE_METATYPE(::XvImage*);
+
+QT_BEGIN_NAMESPACE
+
+static QAbstractVideoBuffer::HandleType XvHandleType = QAbstractVideoBuffer::HandleType(4);
+
+struct XvFormatRgb
+{
+ QVideoFrame::PixelFormat pixelFormat;
+ int bits_per_pixel;
+ int format;
+ int num_planes;
+
+ int depth;
+ unsigned int red_mask;
+ unsigned int green_mask;
+ unsigned int blue_mask;
+
+};
+
+bool operator ==(const XvImageFormatValues &format, const XvFormatRgb &rgb)
+{
+ return format.type == XvRGB
+ && format.bits_per_pixel == rgb.bits_per_pixel
+ && format.format == rgb.format
+ && format.num_planes == rgb.num_planes
+ && format.depth == rgb.depth
+ && format.red_mask == rgb.red_mask
+ && format.blue_mask == rgb.blue_mask;
+}
+
+static const XvFormatRgb qt_xvRgbLookup[] =
+{
+ { QVideoFrame::Format_ARGB32, 32, XvPacked, 1, 32, 0x00FF0000, 0x0000FF00, 0x000000FF },
+ { QVideoFrame::Format_RGB32 , 32, XvPacked, 1, 24, 0x00FF0000, 0x0000FF00, 0x000000FF },
+ { QVideoFrame::Format_RGB24 , 24, XvPacked, 1, 24, 0x00FF0000, 0x0000FF00, 0x000000FF },
+ { QVideoFrame::Format_RGB565, 16, XvPacked, 1, 16, 0x0000F800, 0x000007E0, 0x0000001F },
+ { QVideoFrame::Format_BGRA32, 32, XvPacked, 1, 32, 0xFF000000, 0x00FF0000, 0x0000FF00 },
+ { QVideoFrame::Format_BGR32 , 32, XvPacked, 1, 24, 0x00FF0000, 0x0000FF00, 0x000000FF },
+ { QVideoFrame::Format_BGR24 , 24, XvPacked, 1, 24, 0x00FF0000, 0x0000FF00, 0x000000FF },
+ { QVideoFrame::Format_BGR565, 16, XvPacked, 1, 16, 0x0000F800, 0x000007E0, 0x0000001F }
+};
+
+struct XvFormatYuv
+{
+ QVideoFrame::PixelFormat pixelFormat;
+ int bits_per_pixel;
+ int format;
+ int num_planes;
+
+ unsigned int y_sample_bits;
+ unsigned int u_sample_bits;
+ unsigned int v_sample_bits;
+ unsigned int horz_y_period;
+ unsigned int horz_u_period;
+ unsigned int horz_v_period;
+ unsigned int vert_y_period;
+ unsigned int vert_u_period;
+ unsigned int vert_v_period;
+ char component_order[32];
+};
+
+bool operator ==(const XvImageFormatValues &format, const XvFormatYuv &yuv)
+{
+ return format.type == XvYUV
+ && format.bits_per_pixel == yuv.bits_per_pixel
+ && format.format == yuv.format
+ && format.num_planes == yuv.num_planes
+ && format.y_sample_bits == yuv.y_sample_bits
+ && format.u_sample_bits == yuv.u_sample_bits
+ && format.v_sample_bits == yuv.v_sample_bits
+ && format.horz_y_period == yuv.horz_y_period
+ && format.horz_u_period == yuv.horz_u_period
+ && format.horz_v_period == yuv.horz_v_period
+ && format.horz_y_period == yuv.vert_y_period
+ && format.vert_u_period == yuv.vert_u_period
+ && format.vert_v_period == yuv.vert_v_period
+ && qstrncmp(format.component_order, yuv.component_order, 32) == 0;
+}
+
+static const XvFormatYuv qt_xvYuvLookup[] =
+{
+ { QVideoFrame::Format_YUV444 , 24, XvPacked, 1, 8, 8, 8, 1, 1, 1, 1, 1, 1, "YUV" },
+ { QVideoFrame::Format_YUV420P, 12, XvPlanar, 3, 8, 8, 8, 1, 2, 2, 1, 2, 2, "YUV" },
+ { QVideoFrame::Format_YV12 , 12, XvPlanar, 3, 8, 8, 8, 1, 2, 2, 1, 2, 2, "YVU" },
+ { QVideoFrame::Format_UYVY , 16, XvPacked, 1, 8, 8, 8, 1, 2, 2, 1, 1, 1, "UYVY" },
+ { QVideoFrame::Format_YUYV , 16, XvPacked, 1, 8, 8, 8, 1, 2, 2, 1, 1, 1, "YUY2" },
+ { QVideoFrame::Format_YUYV , 16, XvPacked, 1, 8, 8, 8, 1, 2, 2, 1, 1, 1, "YUYV" },
+ { QVideoFrame::Format_NV12 , 12, XvPlanar, 2, 8, 8, 8, 1, 2, 2, 1, 2, 2, "YUV" },
+ { QVideoFrame::Format_NV12 , 12, XvPlanar, 2, 8, 8, 8, 1, 2, 2, 1, 2, 2, "YVU" },
+ { QVideoFrame::Format_Y8 , 8 , XvPlanar, 1, 8, 0, 0, 1, 0, 0, 1, 0, 0, "Y" }
+};
+
+QX11VideoSurface::QX11VideoSurface(QObject *parent)
+ : QAbstractVideoSurface(parent)
+ , m_winId(0)
+ , m_portId(0)
+ , m_gc(0)
+ , m_image(0)
+{
+}
+
+QX11VideoSurface::~QX11VideoSurface()
+{
+ if (m_gc)
+ XFreeGC(QX11Info::display(), m_gc);
+
+ if (m_portId != 0)
+ XvUngrabPort(QX11Info::display(), m_portId, 0);
+}
+
+WId QX11VideoSurface::winId() const
+{
+ return m_winId;
+}
+
+void QX11VideoSurface::setWinId(WId id)
+{
+ if (id == m_winId)
+ return;
+
+ if (m_image)
+ XFree(m_image);
+
+ if (m_gc) {
+ XFreeGC(QX11Info::display(), m_gc);
+ m_gc = 0;
+ }
+
+ if (m_portId != 0)
+ XvUngrabPort(QX11Info::display(), m_portId, 0);
+
+ m_supportedPixelFormats.clear();
+ m_formatIds.clear();
+
+ m_winId = id;
+
+ if (m_winId && findPort()) {
+ querySupportedFormats();
+
+ m_gc = XCreateGC(QX11Info::display(), m_winId, 0, 0);
+
+ if (m_image) {
+ m_image = 0;
+
+ if (!start(surfaceFormat()))
+ QAbstractVideoSurface::stop();
+ }
+ } else if (m_image) {
+ m_image = 0;
+
+ QAbstractVideoSurface::stop();
+ }
+
+ emit supportedFormatsChanged();
+}
+
+QRect QX11VideoSurface::displayRect() const
+{
+ return m_displayRect;
+}
+
+void QX11VideoSurface::setDisplayRect(const QRect &rect)
+{
+ m_displayRect = rect;
+}
+
+int QX11VideoSurface::brightness() const
+{
+ return getAttribute("XV_BRIGHTNESS", m_brightnessRange.first, m_brightnessRange.second);
+}
+
+void QX11VideoSurface::setBrightness(int brightness)
+{
+ setAttribute("XV_BRIGHTNESS", brightness, m_brightnessRange.first, m_brightnessRange.second);
+}
+
+int QX11VideoSurface::contrast() const
+{
+ return getAttribute("XV_CONTRAST", m_contrastRange.first, m_contrastRange.second);
+}
+
+void QX11VideoSurface::setContrast(int contrast)
+{
+ setAttribute("XV_CONTRAST", contrast, m_contrastRange.first, m_contrastRange.second);
+}
+
+int QX11VideoSurface::hue() const
+{
+ return getAttribute("XV_HUE", m_hueRange.first, m_hueRange.second);
+}
+
+void QX11VideoSurface::setHue(int hue)
+{
+ setAttribute("XV_HUE", hue, m_hueRange.first, m_hueRange.second);
+}
+
+int QX11VideoSurface::saturation() const
+{
+ return getAttribute("XV_SATURATION", m_saturationRange.first, m_saturationRange.second);
+}
+
+void QX11VideoSurface::setSaturation(int saturation)
+{
+ setAttribute("XV_SATURATION", saturation, m_saturationRange.first, m_saturationRange.second);
+}
+
+int QX11VideoSurface::getAttribute(const char *attribute, int minimum, int maximum) const
+{
+ if (m_portId != 0) {
+ Display *display = QX11Info::display();
+
+ Atom atom = XInternAtom(display, attribute, True);
+
+ int value = 0;
+
+ XvGetPortAttribute(display, m_portId, atom, &value);
+
+ return redistribute(value, minimum, maximum, -100, 100);
+ } else {
+ return 0;
+ }
+}
+
+void QX11VideoSurface::setAttribute(const char *attribute, int value, int minimum, int maximum)
+{
+ if (m_portId != 0) {
+ Display *display = QX11Info::display();
+
+ Atom atom = XInternAtom(display, attribute, True);
+
+ XvSetPortAttribute(
+ display, m_portId, atom, redistribute(value, -100, 100, minimum, maximum));
+ }
+}
+
+int QX11VideoSurface::redistribute(
+ int value, int fromLower, int fromUpper, int toLower, int toUpper)
+{
+ return fromUpper != fromLower
+ ? ((value - fromLower) * (toUpper - toLower) / (fromUpper - fromLower)) + toLower
+ : 0;
+}
+
+QList<QVideoFrame::PixelFormat> QX11VideoSurface::supportedPixelFormats(
+ QAbstractVideoBuffer::HandleType handleType) const
+{
+ return handleType == QAbstractVideoBuffer::NoHandle || handleType == XvHandleType
+ ? m_supportedPixelFormats
+ : QList<QVideoFrame::PixelFormat>();
+}
+
+bool QX11VideoSurface::start(const QVideoSurfaceFormat &format)
+{
+ if (m_image)
+ XFree(m_image);
+
+ int xvFormatId = 0;
+ for (int i = 0; i < m_supportedPixelFormats.count(); ++i) {
+ if (m_supportedPixelFormats.at(i) == format.pixelFormat()) {
+ xvFormatId = m_formatIds.at(i);
+ break;
+ }
+ }
+
+ if (xvFormatId == 0) {
+ setError(UnsupportedFormatError);
+ } else {
+ XvImage *image = XvCreateImage(
+ QX11Info::display(),
+ m_portId,
+ xvFormatId,
+ 0,
+ format.frameWidth(),
+ format.frameHeight());
+
+ if (!image) {
+ setError(ResourceError);
+ } else {
+ m_viewport = format.viewport();
+ m_image = image;
+
+ QVideoSurfaceFormat newFormat = format;
+ newFormat.setProperty("portId", QVariant(quint64(m_portId)));
+ newFormat.setProperty("xvFormatId", xvFormatId);
+ newFormat.setProperty("dataSize", image->data_size);
+
+ return QAbstractVideoSurface::start(newFormat);
+ }
+ }
+
+ if (m_image) {
+ m_image = 0;
+
+ QAbstractVideoSurface::stop();
+ }
+
+ return false;
+}
+
+void QX11VideoSurface::stop()
+{
+ if (m_image) {
+ XFree(m_image);
+ m_image = 0;
+
+ QAbstractVideoSurface::stop();
+ }
+}
+
+bool QX11VideoSurface::present(const QVideoFrame &frame)
+{
+ if (!m_image) {
+ setError(StoppedError);
+ return false;
+ } else if (m_image->width != frame.width() || m_image->height != frame.height()) {
+ setError(IncorrectFormatError);
+ return false;
+ } else {
+ QVideoFrame frameCopy(frame);
+
+ if (!frameCopy.map(QAbstractVideoBuffer::ReadOnly)) {
+ setError(IncorrectFormatError);
+ return false;
+ } else {
+ bool presented = false;
+
+ if (frame.handleType() != XvHandleType &&
+ m_image->data_size > frame.mappedBytes()) {
+ qWarning("Insufficient frame buffer size");
+ setError(IncorrectFormatError);
+ } else if (frame.handleType() != XvHandleType &&
+ m_image->num_planes > 0 &&
+ m_image->pitches[0] != frame.bytesPerLine()) {
+ qWarning("Incompatible frame pitches");
+ setError(IncorrectFormatError);
+ } else {
+ if (frame.handleType() != XvHandleType) {
+ m_image->data = reinterpret_cast<char *>(frameCopy.bits());
+
+ //qDebug() << "copy frame";
+ XvPutImage(
+ QX11Info::display(),
+ m_portId,
+ m_winId,
+ m_gc,
+ m_image,
+ m_viewport.x(),
+ m_viewport.y(),
+ m_viewport.width(),
+ m_viewport.height(),
+ m_displayRect.x(),
+ m_displayRect.y(),
+ m_displayRect.width(),
+ m_displayRect.height());
+
+ m_image->data = 0;
+ } else {
+ XvImage *img = frame.handle().value<XvImage*>();
+
+ //qDebug() << "render directly";
+ if (img)
+ XvShmPutImage(
+ QX11Info::display(),
+ m_portId,
+ m_winId,
+ m_gc,
+ img,
+ m_viewport.x(),
+ m_viewport.y(),
+ m_viewport.width(),
+ m_viewport.height(),
+ m_displayRect.x(),
+ m_displayRect.y(),
+ m_displayRect.width(),
+ m_displayRect.height(),
+ false);
+ }
+
+ presented = true;
+ }
+
+ frameCopy.unmap();
+
+ return presented;
+ }
+ }
+}
+
+bool QX11VideoSurface::findPort()
+{
+ unsigned int count = 0;
+ XvAdaptorInfo *adaptors = 0;
+ bool portFound = false;
+
+ if (XvQueryAdaptors(QX11Info::display(), m_winId, &count, &adaptors) == Success) {
+ for (unsigned int i = 0; i < count && !portFound; ++i) {
+ if (adaptors[i].type & XvImageMask) {
+ m_portId = adaptors[i].base_id;
+
+ for (unsigned int j = 0; j < adaptors[i].num_ports && !portFound; ++j, ++m_portId)
+ portFound = XvGrabPort(QX11Info::display(), m_portId, 0) == Success;
+ }
+ }
+ XvFreeAdaptorInfo(adaptors);
+ }
+
+ return portFound;
+}
+
+void QX11VideoSurface::querySupportedFormats()
+{
+ int count = 0;
+ if (XvImageFormatValues *imageFormats = XvListImageFormats(
+ QX11Info::display(), m_portId, &count)) {
+ const int rgbCount = sizeof(qt_xvRgbLookup) / sizeof(XvFormatRgb);
+ const int yuvCount = sizeof(qt_xvYuvLookup) / sizeof(XvFormatYuv);
+
+ for (int i = 0; i < count; ++i) {
+ switch (imageFormats[i].type) {
+ case XvRGB:
+ for (int j = 0; j < rgbCount; ++j) {
+ if (imageFormats[i] == qt_xvRgbLookup[j]) {
+ m_supportedPixelFormats.append(qt_xvRgbLookup[j].pixelFormat);
+ m_formatIds.append(imageFormats[i].id);
+ break;
+ }
+ }
+ break;
+ case XvYUV:
+ for (int j = 0; j < yuvCount; ++j) {
+ if (imageFormats[i] == qt_xvYuvLookup[j]) {
+ m_supportedPixelFormats.append(qt_xvYuvLookup[j].pixelFormat);
+ m_formatIds.append(imageFormats[i].id);
+ break;
+ }
+ }
+ break;
+ }
+ }
+ XFree(imageFormats);
+ }
+
+ m_brightnessRange = qMakePair(0, 0);
+ m_contrastRange = qMakePair(0, 0);
+ m_hueRange = qMakePair(0, 0);
+ m_saturationRange = qMakePair(0, 0);
+
+ if (XvAttribute *attributes = XvQueryPortAttributes(QX11Info::display(), m_portId, &count)) {
+ for (int i = 0; i < count; ++i) {
+ if (qstrcmp(attributes[i].name, "XV_BRIGHTNESS") == 0)
+ m_brightnessRange = qMakePair(attributes[i].min_value, attributes[i].max_value);
+ else if (qstrcmp(attributes[i].name, "XV_CONTRAST") == 0)
+ m_contrastRange = qMakePair(attributes[i].min_value, attributes[i].max_value);
+ else if (qstrcmp(attributes[i].name, "XV_HUE") == 0)
+ m_hueRange = qMakePair(attributes[i].min_value, attributes[i].max_value);
+ else if (qstrcmp(attributes[i].name, "XV_SATURATION") == 0)
+ m_saturationRange = qMakePair(attributes[i].min_value, attributes[i].max_value);
+ }
+
+ XFree(attributes);
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/gstreamer/qx11videosurface.h b/src/plugins/mediaservices/gstreamer/qx11videosurface.h
new file mode 100644
index 0000000000..1be963e8a3
--- /dev/null
+++ b/src/plugins/mediaservices/gstreamer/qx11videosurface.h
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QX11VIDEOSURFACE_H
+#define QX11VIDEOSURFACE_H
+
+#include <QtGui/qwidget.h>
+#include <QtMultimedia/qabstractvideosurface.h>
+
+#include <X11/Xlib.h>
+#include <X11/extensions/Xv.h>
+#include <X11/extensions/Xvlib.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QX11VideoSurface : public QAbstractVideoSurface
+{
+ Q_OBJECT
+public:
+ QX11VideoSurface(QObject *parent = 0);
+ ~QX11VideoSurface();
+
+ WId winId() const;
+ void setWinId(WId id);
+
+ QRect displayRect() const;
+ void setDisplayRect(const QRect &rect);
+
+ int brightness() const;
+ void setBrightness(int brightness);
+
+ int contrast() const;
+ void setContrast(int contrast);
+
+ int hue() const;
+ void setHue(int hue);
+
+ int saturation() const;
+ void setSaturation(int saturation);
+
+ QList<QVideoFrame::PixelFormat> supportedPixelFormats(
+ QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const;
+
+ bool start(const QVideoSurfaceFormat &format);
+ void stop();
+
+ bool present(const QVideoFrame &frame);
+
+private:
+ WId m_winId;
+ XvPortID m_portId;
+ GC m_gc;
+ XvImage *m_image;
+ QList<QVideoFrame::PixelFormat> m_supportedPixelFormats;
+ QVector<int> m_formatIds;
+ QRect m_viewport;
+ QRect m_displayRect;
+ QPair<int, int> m_brightnessRange;
+ QPair<int, int> m_contrastRange;
+ QPair<int, int> m_hueRange;
+ QPair<int, int> m_saturationRange;
+
+ bool findPort();
+ void querySupportedFormats();
+
+ int getAttribute(const char *attribute, int minimum, int maximum) const;
+ void setAttribute(const char *attribute, int value, int minimum, int maximum);
+
+ static int redistribute(int value, int fromLower, int fromUpper, int toLower, int toUpper);
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/mediaservices.pro b/src/plugins/mediaservices/mediaservices.pro
new file mode 100644
index 0000000000..19d678b8e1
--- /dev/null
+++ b/src/plugins/mediaservices/mediaservices.pro
@@ -0,0 +1,11 @@
+TEMPLATE = subdirs
+
+contains(QT_CONFIG, mediaservice) {
+ win32:!wince*: SUBDIRS += directshow
+
+ mac: SUBDIRS += qt7
+
+ unix:!mac:!symbian:contains(QT_CONFIG, xvideo):contains(QT_CONFIG, gstreamer) {
+ SUBDIRS += gstreamer
+ }
+}
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/mediaplayer.pri b/src/plugins/mediaservices/qt7/mediaplayer/mediaplayer.pri
new file mode 100644
index 0000000000..577209e1a7
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/mediaplayer/mediaplayer.pri
@@ -0,0 +1,18 @@
+INCLUDEPATH += $$PWD
+
+DEFINES += QMEDIA_QT7_PLAYER
+
+HEADERS += \
+ $$PWD/qt7playercontrol.h \
+ $$PWD/qt7playermetadata.h \
+ $$PWD/qt7playerservice.h \
+ $$PWD/qt7playersession.h
+
+OBJECTIVE_SOURCES += \
+ $$PWD/qt7playercontrol.mm \
+ $$PWD/qt7playermetadata.mm \
+ $$PWD/qt7playerservice.mm \
+ $$PWD/qt7playersession.mm
+
+
+
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playercontrol.h b/src/plugins/mediaservices/qt7/mediaplayer/qt7playercontrol.h
new file mode 100644
index 0000000000..907d13dd60
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/mediaplayer/qt7playercontrol.h
@@ -0,0 +1,128 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT7PLAYERCONTROL_H
+#define QT7PLAYERCONTROL_H
+
+#include <QtCore/qobject.h>
+#include <QtGui/qmacdefines_mac.h>
+
+#include <QtMultimedia/qmediaplayercontrol.h>
+#include <QtMultimedia/qmediaplayer.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QT7PlayerSession;
+class QT7PlayerService;
+class QMediaPlaylist;
+class QMediaPlaylistNavigator;
+
+class QT7PlayerControl : public QMediaPlayerControl
+{
+Q_OBJECT
+public:
+ QT7PlayerControl(QObject *parent = 0);
+ ~QT7PlayerControl();
+
+ void setSession(QT7PlayerSession *session);
+
+ QMediaPlayer::State state() const;
+ QMediaPlayer::MediaStatus mediaStatus() const;
+
+ QMediaContent media() const;
+ const QIODevice *mediaStream() const;
+ void setMedia(const QMediaContent &content, QIODevice *stream);
+
+ qint64 position() const;
+ qint64 duration() const;
+
+ int bufferStatus() const;
+
+ int volume() const;
+ bool isMuted() const;
+
+ bool isAudioAvailable() const;
+ bool isVideoAvailable() const;
+
+ bool isSeekable() const;
+
+ QMediaTimeRange availablePlaybackRanges() const;
+
+ qreal playbackRate() const;
+ void setPlaybackRate(qreal rate);
+
+public Q_SLOTS:
+ void setPosition(qint64 pos);
+
+ void play();
+ void pause();
+ void stop();
+
+ void setVolume(int volume);
+ void setMuted(bool muted);
+
+Q_SIGNALS:
+ void mediaChanged(const QMediaContent& content);
+ void durationChanged(qint64 duration);
+ void positionChanged(qint64 position);
+ void stateChanged(QMediaPlayer::State newState);
+ void mediaStatusChanged(QMediaPlayer::MediaStatus status);
+ void volumeChanged(int volume);
+ void mutedChanged(bool muted);
+ void videoAvailableChanged(bool videoAvailable);
+ void bufferStatusChanged(int percentFilled);
+ void seekableChanged(bool);
+ void seekRangeChanged(const QPair<qint64,qint64>&);
+ void playbackRateChanged(qreal rate);
+ void error(int error, const QString &errorString);
+
+private:
+ QT7PlayerSession *m_session;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playercontrol.mm b/src/plugins/mediaservices/qt7/mediaplayer/qt7playercontrol.mm
new file mode 100644
index 0000000000..0f4ac41f12
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/mediaplayer/qt7playercontrol.mm
@@ -0,0 +1,193 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qt7playercontrol.h"
+#include "qt7playersession.h"
+
+#include <QtMultimedia/qmediaplaylistnavigator.h>
+
+#include <QtCore/qurl.h>
+#include <QtCore/qdebug.h>
+
+
+QT_BEGIN_NAMESPACE
+
+QT7PlayerControl::QT7PlayerControl(QObject *parent)
+ : QMediaPlayerControl(parent)
+{
+}
+
+QT7PlayerControl::~QT7PlayerControl()
+{
+}
+
+void QT7PlayerControl::setSession(QT7PlayerSession *session)
+{
+ m_session = session;
+
+ connect(m_session, SIGNAL(positionChanged(qint64)), this, SIGNAL(positionChanged(qint64)));
+ connect(m_session, SIGNAL(durationChanged(qint64)), this, SIGNAL(durationChanged(qint64)));
+ connect(m_session, SIGNAL(stateChanged(QMediaPlayer::State)),
+ this, SIGNAL(stateChanged(QMediaPlayer::State)));
+ connect(m_session, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)),
+ this, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)));
+ connect(m_session, SIGNAL(volumeChanged(int)), this, SIGNAL(volumeChanged(int)));
+ connect(m_session, SIGNAL(mutedChanged(bool)), this, SIGNAL(mutedChanged(bool)));
+ connect(m_session, SIGNAL(audioAvailableChanged(bool)), this, SIGNAL(audioAvailableChanged(bool)));
+ connect(m_session, SIGNAL(videoAvailableChanged(bool)), this, SIGNAL(videoAvailableChanged(bool)));
+ connect(m_session, SIGNAL(error(int,QString)), this, SIGNAL(error(int,QString)));
+}
+
+qint64 QT7PlayerControl::position() const
+{
+ return m_session->position();
+}
+
+qint64 QT7PlayerControl::duration() const
+{
+ return m_session->duration();
+}
+
+QMediaPlayer::State QT7PlayerControl::state() const
+{
+ return m_session->state();
+}
+
+QMediaPlayer::MediaStatus QT7PlayerControl::mediaStatus() const
+{
+ return m_session->mediaStatus();
+}
+
+int QT7PlayerControl::bufferStatus() const
+{
+ return m_session->bufferStatus();
+}
+
+int QT7PlayerControl::volume() const
+{
+ return m_session->volume();
+}
+
+bool QT7PlayerControl::isMuted() const
+{
+ return m_session->isMuted();
+}
+
+bool QT7PlayerControl::isSeekable() const
+{
+ return m_session->isSeekable();
+}
+
+QMediaTimeRange QT7PlayerControl::availablePlaybackRanges() const
+{
+ return isSeekable() ? QMediaTimeRange(0, duration()) : QMediaTimeRange();
+}
+
+qreal QT7PlayerControl::playbackRate() const
+{
+ return m_session->playbackRate();
+}
+
+void QT7PlayerControl::setPlaybackRate(qreal rate)
+{
+ m_session->setPlaybackRate(rate);
+}
+
+void QT7PlayerControl::setPosition(qint64 pos)
+{
+ m_session->setPosition(pos);
+}
+
+void QT7PlayerControl::play()
+{
+ m_session->play();
+}
+
+void QT7PlayerControl::pause()
+{
+ m_session->pause();
+}
+
+void QT7PlayerControl::stop()
+{
+ m_session->stop();
+}
+
+void QT7PlayerControl::setVolume(int volume)
+{
+ m_session->setVolume(volume);
+}
+
+void QT7PlayerControl::setMuted(bool muted)
+{
+ m_session->setMuted(muted);
+}
+
+QMediaContent QT7PlayerControl::media() const
+{
+ return m_session->media();
+}
+
+const QIODevice *QT7PlayerControl::mediaStream() const
+{
+ return m_session->mediaStream();
+}
+
+void QT7PlayerControl::setMedia(const QMediaContent &content, QIODevice *stream)
+{
+ m_session->setMedia(content, stream);
+
+ emit mediaChanged(content);
+}
+
+bool QT7PlayerControl::isAudioAvailable() const
+{
+ return m_session->isAudioAvailable();
+}
+
+bool QT7PlayerControl::isVideoAvailable() const
+{
+ return m_session->isVideoAvailable();
+}
+
+#include "moc_qt7playercontrol.cpp"
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.h b/src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.h
new file mode 100644
index 0000000000..f16807a89d
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT7PLAYERMETADATACONTROL_H
+#define QT7PLAYERMETADATACONTROL_H
+
+#include <QtMultimedia/qmetadatacontrol.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QT7PlayerSession;
+
+class QT7PlayerMetaDataControl : public QMetaDataControl
+{
+ Q_OBJECT
+public:
+ QT7PlayerMetaDataControl(QT7PlayerSession *session, QObject *parent);
+ virtual ~QT7PlayerMetaDataControl();
+
+ bool isMetaDataAvailable() const;
+ bool isWritable() const;
+
+ QVariant metaData(QtMultimedia::MetaData key) const;
+ void setMetaData(QtMultimedia::MetaData key, const QVariant &value);
+ QList<QtMultimedia::MetaData> availableMetaData() const;
+
+ QVariant extendedMetaData(const QString &key) const ;
+ void setExtendedMetaData(const QString &key, const QVariant &value);
+ QStringList availableExtendedMetaData() const;
+
+private slots:
+ void updateTags();
+
+private:
+ QT7PlayerSession *m_session;
+ QMap<QtMultimedia::MetaData, QVariant> m_tags;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.mm b/src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.mm
new file mode 100644
index 0000000000..59d01a2673
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.mm
@@ -0,0 +1,274 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qt7backend.h"
+#include "qt7playermetadata.h"
+#include "qt7playersession.h"
+#include <QtCore/qvarlengtharray.h>
+
+#import <QTKit/QTMovie.h>
+
+#ifdef QUICKTIME_C_API_AVAILABLE
+ #include <QuickTime/QuickTime.h>
+ #undef check // avoid name clash;
+#endif
+
+QT_BEGIN_NAMESPACE
+
+QT7PlayerMetaDataControl::QT7PlayerMetaDataControl(QT7PlayerSession *session, QObject *parent)
+ :QMetaDataControl(parent), m_session(session)
+{
+}
+
+QT7PlayerMetaDataControl::~QT7PlayerMetaDataControl()
+{
+}
+
+bool QT7PlayerMetaDataControl::isMetaDataAvailable() const
+{
+ return !m_tags.isEmpty();
+}
+
+bool QT7PlayerMetaDataControl::isWritable() const
+{
+ return false;
+}
+
+QVariant QT7PlayerMetaDataControl::metaData(QtMultimedia::MetaData key) const
+{
+ return m_tags.value(key);
+}
+
+void QT7PlayerMetaDataControl::setMetaData(QtMultimedia::MetaData key, QVariant const &value)
+{
+ Q_UNUSED(key);
+ Q_UNUSED(value);
+}
+
+QList<QtMultimedia::MetaData> QT7PlayerMetaDataControl::availableMetaData() const
+{
+ return m_tags.keys();
+}
+
+QVariant QT7PlayerMetaDataControl::extendedMetaData(const QString &key) const
+{
+ Q_UNUSED(key);
+ return QVariant();
+}
+
+void QT7PlayerMetaDataControl::setExtendedMetaData(const QString &key, QVariant const &value)
+{
+ Q_UNUSED(key);
+ Q_UNUSED(value);
+}
+
+QStringList QT7PlayerMetaDataControl::availableExtendedMetaData() const
+{
+ return QStringList();
+}
+
+#ifdef QUICKTIME_C_API_AVAILABLE
+
+static QString stripCopyRightSymbol(const QString &key)
+{
+ return key.right(key.length()-1);
+}
+
+static QString convertQuickTimeKeyToUserKey(const QString &key)
+{
+ if (key == QLatin1String("com.apple.quicktime.displayname"))
+ return QLatin1String("nam");
+ else if (key == QLatin1String("com.apple.quicktime.album"))
+ return QLatin1String("alb");
+ else if (key == QLatin1String("com.apple.quicktime.artist"))
+ return QLatin1String("ART");
+ else
+ return QLatin1String("???");
+}
+
+static OSStatus readMetaValue(QTMetaDataRef metaDataRef, QTMetaDataItem item, QTPropertyClass propClass,
+ QTPropertyID id, QTPropertyValuePtr *value, ByteCount *size)
+{
+ QTPropertyValueType type;
+ ByteCount propSize;
+ UInt32 propFlags;
+ OSStatus err = QTMetaDataGetItemPropertyInfo(metaDataRef, item, propClass, id, &type, &propSize, &propFlags);
+
+ if (err == noErr) {
+ *value = malloc(propSize);
+ if (*value != 0) {
+ err = QTMetaDataGetItemProperty(metaDataRef, item, propClass, id, propSize, *value, size);
+
+ if (err == noErr && (type == 'code' || type == 'itsk' || type == 'itlk')) {
+ // convert from native endian to big endian
+ OSTypePtr pType = (OSTypePtr)*value;
+ *pType = EndianU32_NtoB(*pType);
+ }
+ }
+ else
+ return -1;
+ }
+
+ return err;
+}
+
+static UInt32 getMetaType(QTMetaDataRef metaDataRef, QTMetaDataItem item)
+{
+ QTPropertyValuePtr value = 0;
+ ByteCount ignore = 0;
+ OSStatus err = readMetaValue(
+ metaDataRef, item, kPropertyClass_MetaDataItem, kQTMetaDataItemPropertyID_DataType, &value, &ignore);
+
+ if (err == noErr) {
+ UInt32 type = *((UInt32 *) value);
+ if (value)
+ free(value);
+ return type;
+ }
+
+ return 0;
+}
+
+static QString cFStringToQString(CFStringRef str)
+{
+ if(!str)
+ return QString();
+ CFIndex length = CFStringGetLength(str);
+ const UniChar *chars = CFStringGetCharactersPtr(str);
+ if (chars)
+ return QString(reinterpret_cast<const QChar *>(chars), length);
+
+ QVarLengthArray<UniChar> buffer(length);
+ CFStringGetCharacters(str, CFRangeMake(0, length), buffer.data());
+ return QString(reinterpret_cast<const QChar *>(buffer.constData()), length);
+}
+
+
+static QString getMetaValue(QTMetaDataRef metaDataRef, QTMetaDataItem item, SInt32 id)
+{
+ QTPropertyValuePtr value = 0;
+ ByteCount size = 0;
+ OSStatus err = readMetaValue(metaDataRef, item, kPropertyClass_MetaDataItem, id, &value, &size);
+ QString string;
+
+ if (err == noErr) {
+ UInt32 dataType = getMetaType(metaDataRef, item);
+ switch (dataType){
+ case kQTMetaDataTypeUTF8:
+ case kQTMetaDataTypeMacEncodedText:
+ string = cFStringToQString(CFStringCreateWithBytes(0, (UInt8*)value, size, kCFStringEncodingUTF8, false));
+ break;
+ case kQTMetaDataTypeUTF16BE:
+ string = cFStringToQString(CFStringCreateWithBytes(0, (UInt8*)value, size, kCFStringEncodingUTF16BE, false));
+ break;
+ default:
+ break;
+ }
+
+ if (value)
+ free(value);
+ }
+
+ return string;
+}
+
+
+static void readFormattedData(QTMetaDataRef metaDataRef, OSType format, QMultiMap<QString, QString> &result)
+{
+ QTMetaDataItem item = kQTMetaDataItemUninitialized;
+ OSStatus err = QTMetaDataGetNextItem(metaDataRef, format, item, kQTMetaDataKeyFormatWildcard, 0, 0, &item);
+ while (err == noErr){
+ QString key = getMetaValue(metaDataRef, item, kQTMetaDataItemPropertyID_Key);
+ if (format == kQTMetaDataStorageFormatQuickTime)
+ key = convertQuickTimeKeyToUserKey(key);
+ else
+ key = stripCopyRightSymbol(key);
+
+ if (!result.contains(key)){
+ QString val = getMetaValue(metaDataRef, item, kQTMetaDataItemPropertyID_Value);
+ result.insert(key, val);
+ }
+ err = QTMetaDataGetNextItem(metaDataRef, format, item, kQTMetaDataKeyFormatWildcard, 0, 0, &item);
+ }
+}
+#endif
+
+
+void QT7PlayerMetaDataControl::updateTags()
+{
+ bool wasEmpty = m_tags.isEmpty();
+ m_tags.clear();
+
+ QTMovie *movie = (QTMovie*)m_session->movie();
+
+ if (movie) {
+ QMultiMap<QString, QString> metaMap;
+
+#ifdef QUICKTIME_C_API_AVAILABLE
+ QTMetaDataRef metaDataRef;
+ OSStatus err = QTCopyMovieMetaData([movie quickTimeMovie], &metaDataRef);
+ if (err == noErr) {
+ readFormattedData(metaDataRef, kQTMetaDataStorageFormatUserData, metaMap);
+ readFormattedData(metaDataRef, kQTMetaDataStorageFormatQuickTime, metaMap);
+ readFormattedData(metaDataRef, kQTMetaDataStorageFormatiTunes, metaMap);
+ }
+#else
+ AutoReleasePool pool;
+ NSString *name = [movie attributeForKey:@"QTMovieDisplayNameAttribute"];
+ metaMap.insert(QLatin1String("nam"), QString::fromUtf8([name UTF8String]));
+#endif // QUICKTIME_C_API_AVAILABLE
+
+ m_tags.insert(QtMultimedia::AlbumArtist, metaMap.value(QLatin1String("ART")));
+ m_tags.insert(QtMultimedia::AlbumTitle, metaMap.value(QLatin1String("alb")));
+ m_tags.insert(QtMultimedia::Title, metaMap.value(QLatin1String("nam")));
+ m_tags.insert(QtMultimedia::Date, metaMap.value(QLatin1String("day")));
+ m_tags.insert(QtMultimedia::Genre, metaMap.value(QLatin1String("gnre")));
+ m_tags.insert(QtMultimedia::TrackNumber, metaMap.value(QLatin1String("trk")));
+ m_tags.insert(QtMultimedia::Description, metaMap.value(QLatin1String("des")));
+ }
+
+ if (!wasEmpty || !m_tags.isEmpty())
+ emit metaDataChanged();
+}
+
+QT_END_NAMESPACE
+
+#include "moc_qt7playermetadata.cpp"
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playerservice.h b/src/plugins/mediaservices/qt7/mediaplayer/qt7playerservice.h
new file mode 100644
index 0000000000..d4b30b8fd6
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/mediaplayer/qt7playerservice.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT7PLAYERSERVICE_H
+#define QT7PLAYERSERVICE_H
+
+#include <QtCore/qobject.h>
+#include <QtMultimedia/qmediaservice.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QMediaMetaData;
+class QMediaPlayerControl;
+class QMediaPlaylist;
+class QMediaPlaylistNavigator;
+class QT7PlayerControl;
+class QT7PlayerMetaDataControl;
+class QT7VideoOutputControl;
+class QT7VideoWindowControl;
+class QT7VideoWidgetControl;
+class QT7VideoRendererControl;
+class QT7VideoOutput;
+class QT7PlayerSession;
+
+class QT7PlayerService : public QMediaService
+{
+Q_OBJECT
+public:
+ QT7PlayerService(QObject *parent = 0);
+ ~QT7PlayerService();
+
+ QMediaControl *control(const char *name) const;
+
+private slots:
+ void updateVideoOutput();
+
+private:
+ QT7PlayerSession *m_session;
+ QT7PlayerControl *m_control;
+ QT7VideoOutputControl *m_videoOutputControl;
+ QT7VideoWindowControl *m_videoWidnowControl;
+ QT7VideoWidgetControl *m_videoWidgetControl;
+ QT7VideoRendererControl *m_videoRendererControl;
+ QT7PlayerMetaDataControl *m_playerMetaDataControl;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playerservice.mm b/src/plugins/mediaservices/qt7/mediaplayer/qt7playerservice.mm
new file mode 100644
index 0000000000..205e862d09
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/mediaplayer/qt7playerservice.mm
@@ -0,0 +1,152 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qvariant.h>
+#include <QtCore/qdebug.h>
+#include <QtGui/qwidget.h>
+
+#include "qt7backend.h"
+#include "qt7playerservice.h"
+#include "qt7playercontrol.h"
+#include "qt7playersession.h"
+#include "qt7videooutputcontrol.h"
+#include "qt7movieviewoutput.h"
+#include "qt7movieviewrenderer.h"
+#include "qt7movierenderer.h"
+#include "qt7movievideowidget.h"
+#include "qt7playermetadata.h"
+
+#include <QtMultimedia/qmediaplaylistnavigator.h>
+#include <QtMultimedia/qmediaplaylist.h>
+
+QT_BEGIN_NAMESPACE
+
+QT7PlayerService::QT7PlayerService(QObject *parent):
+ QMediaService(parent)
+{
+ m_session = new QT7PlayerSession(this);
+
+ m_control = new QT7PlayerControl(this);
+ m_control->setSession(m_session);
+
+ m_playerMetaDataControl = new QT7PlayerMetaDataControl(m_session, this);
+ connect(m_control, SIGNAL(mediaChanged(QMediaContent)), m_playerMetaDataControl, SLOT(updateTags()));
+
+ m_videoOutputControl = new QT7VideoOutputControl(this);
+
+ m_videoWidnowControl = 0;
+ m_videoWidgetControl = 0;
+ m_videoRendererControl = 0;
+
+#if defined(QT_MAC_USE_COCOA)
+ m_videoWidnowControl = new QT7MovieViewOutput(this);
+ m_videoOutputControl->enableOutput(QVideoOutputControl::WindowOutput);
+// qDebug() << "Using cocoa";
+#endif
+
+#ifdef QUICKTIME_C_API_AVAILABLE
+ m_videoRendererControl = new QT7MovieRenderer(this);
+ m_videoOutputControl->enableOutput(QVideoOutputControl::RendererOutput);
+
+ m_videoWidgetControl = new QT7MovieVideoWidget(this);
+ m_videoOutputControl->enableOutput(QVideoOutputControl::WidgetOutput);
+// qDebug() << "QuickTime C API is available";
+#else
+ m_videoRendererControl = new QT7MovieViewRenderer(this);
+ m_videoOutputControl->enableOutput(QVideoOutputControl::RendererOutput);
+// qDebug() << "QuickTime C API is not available";
+#endif
+
+
+ connect(m_videoOutputControl, SIGNAL(videoOutputChanged(QVideoOutputControl::Output)),
+ this, SLOT(updateVideoOutput()));
+}
+
+QT7PlayerService::~QT7PlayerService()
+{
+ m_session->setVideoOutput(0);
+}
+
+QMediaControl *QT7PlayerService::control(const char *name) const
+{
+ if (qstrcmp(name, QMediaPlayerControl_iid) == 0)
+ return m_control;
+
+ if (qstrcmp(name, QVideoOutputControl_iid) == 0)
+ return m_videoOutputControl;
+
+ if (qstrcmp(name, QVideoWindowControl_iid) == 0)
+ return m_videoWidnowControl;
+
+ if (qstrcmp(name, QVideoRendererControl_iid) == 0)
+ return m_videoRendererControl;
+
+ if (qstrcmp(name, QVideoWidgetControl_iid) == 0)
+ return m_videoWidgetControl;
+
+ if (qstrcmp(name, QMetaDataControl_iid) == 0)
+ return m_playerMetaDataControl;
+
+ return 0;
+}
+
+void QT7PlayerService::updateVideoOutput()
+{
+// qDebug() << "QT7PlayerService::updateVideoOutput" << m_videoOutputControl->output();
+
+ switch (m_videoOutputControl->output()) {
+ case QVideoOutputControl::WindowOutput:
+ m_session->setVideoOutput(m_videoWidnowControl);
+ break;
+ case QVideoOutputControl::RendererOutput:
+ m_session->setVideoOutput(m_videoRendererControl);
+ break;
+ case QVideoOutputControl::WidgetOutput:
+ m_session->setVideoOutput(m_videoWidgetControl);
+ break;
+ default:
+ m_session->setVideoOutput(0);
+ }
+}
+
+QT_END_NAMESPACE
+
+#include "moc_qt7playerservice.cpp"
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.h b/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.h
new file mode 100644
index 0000000000..0ba3041005
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.h
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT7PLAYERSESSION_H
+#define QT7PLAYERSESSION_H
+
+#include <QtCore/qobject.h>
+#include <QtGui/qmacdefines_mac.h>
+
+#include <QtMultimedia/qmediaplayercontrol.h>
+#include <QtMultimedia/qmediaplayer.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QT7PlayerControl;
+class QMediaPlaylist;
+class QMediaPlaylistNavigator;
+class QT7VideoOutput;
+class QT7PlayerSession;
+class QT7PlayerService;
+
+class QT7PlayerSession : public QObject
+{
+Q_OBJECT
+public:
+ QT7PlayerSession(QObject *parent = 0);
+ ~QT7PlayerSession();
+
+ void *movie() const;
+
+ void setControl(QT7PlayerControl *control);
+ void setVideoOutput(QT7VideoOutput *output);
+
+ QMediaPlayer::State state() const;
+ QMediaPlayer::MediaStatus mediaStatus() const;
+
+ QMediaContent media() const;
+ const QIODevice *mediaStream() const;
+ void setMedia(const QMediaContent &content, QIODevice *stream);
+
+ qint64 position() const;
+ qint64 duration() const;
+
+ int bufferStatus() const;
+
+ int volume() const;
+ bool isMuted() const;
+
+ bool isAudioAvailable() const;
+ bool isVideoAvailable() const;
+
+ bool isSeekable() const;
+
+ qreal playbackRate() const;
+
+public slots:
+ void setPlaybackRate(qreal rate);
+
+ void setPosition(qint64 pos);
+
+ void play();
+ void pause();
+ void stop();
+
+ void setVolume(int volume);
+ void setMuted(bool muted);
+
+ void processEOS();
+ void processLoadStateChange();
+ void processVolumeChange();
+ void processNaturalSizeChange();
+
+signals:
+ void positionChanged(qint64 position);
+ void durationChanged(qint64 duration);
+ void stateChanged(QMediaPlayer::State newState);
+ void mediaStatusChanged(QMediaPlayer::MediaStatus status);
+ void volumeChanged(int volume);
+ void mutedChanged(bool muted);
+ void audioAvailableChanged(bool audioAvailable);
+ void videoAvailableChanged(bool videoAvailable);
+ void error(int error, const QString &errorString);
+
+private:
+ void *m_QTMovie;
+ void *m_movieObserver;
+
+ QMediaPlayer::State m_state;
+ QMediaPlayer::MediaStatus m_mediaStatus;
+ QIODevice *m_mediaStream;
+ QMediaContent m_resources;
+
+ QT7VideoOutput *m_videoOutput;
+
+ mutable qint64 m_currentTime;
+
+ bool m_muted;
+ int m_volume;
+ qreal m_rate;
+
+ qint64 m_duration;
+ bool m_videoAvailable;
+ bool m_audioAvailable;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm b/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm
new file mode 100644
index 0000000000..d83c0e3ff4
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm
@@ -0,0 +1,546 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#import <QTKit/QTDataReference.h>
+#import <QTKit/QTMovie.h>
+
+#include "qt7backend.h"
+
+#include "qt7playersession.h"
+#include "qt7playercontrol.h"
+#include "qt7videooutputcontrol.h"
+
+#include <QtNetwork/qnetworkcookie.h>
+#include <QtMultimedia/qmediaplaylistnavigator.h>
+
+#include <CoreFoundation/CoreFoundation.h>
+#include <Foundation/Foundation.h>
+
+#include <QtCore/qdatetime.h>
+#include <QtCore/qurl.h>
+#include <QtCore/qdebug.h>
+
+@interface QTMovieObserver : NSObject
+{
+@private
+ QT7PlayerSession *m_session;
+ QTMovie *m_movie;
+}
+
+- (QTMovieObserver *) initWithPlayerSession:(QT7PlayerSession*)session;
+- (void) setMovie:(QTMovie *)movie;
+- (void) processEOS:(NSNotification *)notification;
+- (void) processLoadStateChange:(NSNotification *)notification;
+- (void) processVolumeChange:(NSNotification *)notification;
+- (void) processNaturalSizeChange :(NSNotification *)notification;
+@end
+
+@implementation QTMovieObserver
+
+- (QTMovieObserver *) initWithPlayerSession:(QT7PlayerSession*)session
+{
+ if (!(self = [super init]))
+ return nil;
+
+ self->m_session = session;
+ return self;
+}
+
+- (void) setMovie:(QTMovie *)movie
+{
+ if (m_movie == movie)
+ return;
+
+ if (m_movie) {
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+ [m_movie release];
+ }
+
+ m_movie = movie;
+
+ if (movie) {
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(processEOS:)
+ name:QTMovieDidEndNotification
+ object:m_movie];
+
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(processLoadStateChange:)
+ name:QTMovieLoadStateDidChangeNotification
+ object:m_movie];
+
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(processVolumeChange:)
+ name:QTMovieVolumeDidChangeNotification
+ object:m_movie];
+
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(processNaturalSizeChange:)
+ name:
+#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6)
+ QTMovieNaturalSizeDidChangeNotification
+#else
+ QTMovieEditedNotification
+#endif
+ object:m_movie];
+ [movie retain];
+ }
+}
+
+- (void) processEOS:(NSNotification *)notification
+{
+ Q_UNUSED(notification);
+ m_session->processEOS();
+}
+
+- (void) processLoadStateChange:(NSNotification *)notification
+{
+ Q_UNUSED(notification);
+ m_session->processLoadStateChange();
+}
+
+- (void) processVolumeChange:(NSNotification *)notification
+{
+ Q_UNUSED(notification);
+ m_session->processVolumeChange();
+}
+
+- (void) processNaturalSizeChange :(NSNotification *)notification
+{
+ Q_UNUSED(notification);
+ m_session->processNaturalSizeChange();
+}
+
+@end
+
+QT_BEGIN_NAMESPACE
+
+static CFStringRef qString2CFStringRef(const QString &string)
+{
+ return CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar *>(string.unicode()),
+ string.length());
+}
+
+QT7PlayerSession::QT7PlayerSession(QObject *parent)
+ : QObject(parent)
+ , m_QTMovie(0)
+ , m_state(QMediaPlayer::StoppedState)
+ , m_mediaStatus(QMediaPlayer::NoMedia)
+ , m_mediaStream(0)
+ , m_videoOutput(0)
+ , m_muted(false)
+ , m_volume(100)
+ , m_rate(1.0)
+ , m_duration(0)
+ , m_videoAvailable(false)
+ , m_audioAvailable(false)
+{
+ m_movieObserver = [[QTMovieObserver alloc] initWithPlayerSession:this];
+}
+
+QT7PlayerSession::~QT7PlayerSession()
+{
+ [(QTMovieObserver*)m_movieObserver setMovie:nil];
+ [(QTMovieObserver*)m_movieObserver release];
+ [(QTMovie*)m_QTMovie release];
+}
+
+void *QT7PlayerSession::movie() const
+{
+ return m_QTMovie;
+}
+
+void QT7PlayerSession::setVideoOutput(QT7VideoOutput *output)
+{
+ if (m_videoOutput == output)
+ return;
+
+ if (m_videoOutput) {
+ m_videoOutput->setEnabled(false);
+ m_videoOutput->setMovie(0);
+ }
+
+ m_videoOutput = output;
+
+ if (m_videoOutput) {
+ m_videoOutput->setEnabled(m_QTMovie != 0);
+ m_videoOutput->setMovie(m_QTMovie);
+ }
+}
+
+
+qint64 QT7PlayerSession::position() const
+{
+ if (!m_QTMovie || m_state == QMediaPlayer::PausedState)
+ return m_currentTime;
+
+ AutoReleasePool pool;
+
+ QTTime qtTime = [(QTMovie*)m_QTMovie currentTime];
+ quint64 t = static_cast<quint64>(float(qtTime.timeValue) / float(qtTime.timeScale) * 1000.0f);
+ m_currentTime = t;
+
+ return m_currentTime;
+}
+
+qint64 QT7PlayerSession::duration() const
+{
+ if (!m_QTMovie)
+ return 0;
+
+ AutoReleasePool pool;
+
+ QTTime qtTime = [(QTMovie*)m_QTMovie duration];
+
+ return static_cast<quint64>(float(qtTime.timeValue) / float(qtTime.timeScale) * 1000.0f);
+}
+
+QMediaPlayer::State QT7PlayerSession::state() const
+{
+ return m_state;
+}
+
+QMediaPlayer::MediaStatus QT7PlayerSession::mediaStatus() const
+{
+ return m_mediaStatus;
+}
+
+int QT7PlayerSession::bufferStatus() const
+{
+ return 100;
+}
+
+int QT7PlayerSession::volume() const
+{
+ return m_volume;
+}
+
+bool QT7PlayerSession::isMuted() const
+{
+ return m_muted;
+}
+
+bool QT7PlayerSession::isSeekable() const
+{
+ return true;
+}
+
+qreal QT7PlayerSession::playbackRate() const
+{
+ return m_rate;
+}
+
+void QT7PlayerSession::setPlaybackRate(qreal rate)
+{
+ if (qFuzzyCompare(m_rate, rate))
+ return;
+
+ m_rate = rate;
+
+ if (m_QTMovie && m_state == QMediaPlayer::PlayingState) {
+ float preferredRate = [[(QTMovie*)m_QTMovie attributeForKey:@"QTMoviePreferredRateAttribute"] floatValue];
+ [(QTMovie*)m_QTMovie setRate:preferredRate*m_rate];
+ }
+}
+
+void QT7PlayerSession::setPosition(qint64 pos)
+{
+ if ( !isSeekable() || pos == position())
+ return;
+
+ AutoReleasePool pool;
+
+ pos = qMin(pos, duration());
+
+ QTTime newQTTime = [(QTMovie*)m_QTMovie currentTime];
+ newQTTime.timeValue = (pos / 1000.0f) * newQTTime.timeScale;
+ [(QTMovie*)m_QTMovie setCurrentTime:newQTTime];
+}
+
+void QT7PlayerSession::play()
+{
+ float preferredRate = [[(QTMovie*)m_QTMovie attributeForKey:@"QTMoviePreferredRateAttribute"] floatValue];
+ [(QTMovie*)m_QTMovie setRate:preferredRate*m_rate];
+
+ if (m_state != QMediaPlayer::PlayingState)
+ emit stateChanged(m_state = QMediaPlayer::PlayingState);
+}
+
+void QT7PlayerSession::pause()
+{
+ m_state = QMediaPlayer::PausedState;
+
+ [(QTMovie*)m_QTMovie setRate:0];
+
+ emit stateChanged(m_state);
+}
+
+void QT7PlayerSession::stop()
+{
+ m_state = QMediaPlayer::StoppedState;
+
+ [(QTMovie*)m_QTMovie setRate:0];
+ setPosition(0);
+
+ if (m_state == QMediaPlayer::StoppedState)
+ emit stateChanged(m_state);
+}
+
+void QT7PlayerSession::setVolume(int volume)
+{
+ if (m_QTMovie) {
+ m_volume = volume;
+ [(QTMovie*)m_QTMovie setVolume:(volume/100.0f)];
+ }
+}
+
+void QT7PlayerSession::setMuted(bool muted)
+{
+ if (m_muted != muted) {
+ m_muted = muted;
+
+ if (m_QTMovie)
+ [(QTMovie*)m_QTMovie setMuted:m_muted];
+
+ emit mutedChanged(muted);
+ }
+}
+
+QMediaContent QT7PlayerSession::media() const
+{
+ return m_resources;
+}
+
+const QIODevice *QT7PlayerSession::mediaStream() const
+{
+ return m_mediaStream;
+}
+
+void QT7PlayerSession::setMedia(const QMediaContent &content, QIODevice *stream)
+{
+ AutoReleasePool pool;
+
+ if (m_QTMovie) {
+ [(QTMovieObserver*)m_movieObserver setMovie:nil];
+
+ if (m_videoOutput) {
+ m_videoOutput->setEnabled(false);
+ m_videoOutput->setMovie(0);
+ }
+
+ [(QTMovie*)m_QTMovie release];
+ m_QTMovie = 0;
+ }
+
+ m_resources = content;
+ m_mediaStream = stream;
+ m_mediaStatus = QMediaPlayer::NoMedia;
+
+ QNetworkRequest request;
+
+ if (!content.isNull())
+ request = content.canonicalResource().request();
+ else
+ return;
+
+ QVariant cookies = request.header(QNetworkRequest::CookieHeader);
+ if (cookies.isValid()) {
+ NSHTTPCookieStorage *store = [NSHTTPCookieStorage sharedHTTPCookieStorage];
+ QList<QNetworkCookie> cookieList = cookies.value<QList<QNetworkCookie> >();
+
+ foreach (const QNetworkCookie &requestCookie, cookieList) {
+ NSMutableDictionary *p = [NSMutableDictionary dictionaryWithObjectsAndKeys:
+ (NSString*)qString2CFStringRef(requestCookie.name()), NSHTTPCookieName,
+ (NSString*)qString2CFStringRef(requestCookie.value()), NSHTTPCookieValue,
+ (NSString*)qString2CFStringRef(requestCookie.domain()), NSHTTPCookieDomain,
+ (NSString*)qString2CFStringRef(requestCookie.path()), NSHTTPCookiePath,
+ nil
+ ];
+ if (requestCookie.isSessionCookie())
+ [p setObject:[NSString stringWithUTF8String:"TRUE"] forKey:NSHTTPCookieDiscard];
+ else
+ [p setObject:[NSDate dateWithTimeIntervalSince1970:requestCookie.expirationDate().toTime_t()] forKey:NSHTTPCookieExpires];
+
+ [store setCookie:[NSHTTPCookie cookieWithProperties:p]];
+ }
+ }
+
+ NSError *err = 0;
+ NSString *urlString = (NSString *)qString2CFStringRef(request.url().toString());
+
+ NSDictionary *attr = [NSDictionary dictionaryWithObjectsAndKeys:
+ [NSURL URLWithString:urlString], QTMovieURLAttribute,
+ [NSNumber numberWithBool:YES], QTMovieOpenAsyncOKAttribute,
+ [NSNumber numberWithBool:YES], QTMovieIsActiveAttribute,
+ [NSNumber numberWithBool:YES], QTMovieResolveDataRefsAttribute,
+ [NSNumber numberWithBool:YES], QTMovieDontInteractWithUserAttribute,
+ nil];
+
+ m_QTMovie = [[QTMovie movieWithAttributes:attr error:&err] retain];
+
+ if (err) {
+ [(QTMovie*)m_QTMovie release];
+ m_QTMovie = 0;
+ QString description = QString::fromUtf8([[err localizedDescription] UTF8String]);
+
+ emit error(QMediaPlayer::FormatError, description );
+ } else {
+ [(QTMovieObserver*)m_movieObserver setMovie:(QTMovie*)m_QTMovie];
+
+ if (m_videoOutput) {
+ m_videoOutput->setMovie(m_QTMovie);
+ m_videoOutput->setEnabled(true);
+ }
+ processLoadStateChange();
+
+ [(QTMovie*)m_QTMovie setMuted:m_muted];
+ setVolume(m_volume);
+ }
+}
+
+bool QT7PlayerSession::isAudioAvailable() const
+{
+ if (!m_QTMovie)
+ return false;
+
+ AutoReleasePool pool;
+ return [[(QTMovie*)m_QTMovie attributeForKey:@"QTMovieHasAudioAttribute"] boolValue] == YES;
+}
+
+bool QT7PlayerSession::isVideoAvailable() const
+{
+ if (!m_QTMovie)
+ return false;
+
+ AutoReleasePool pool;
+ return [[(QTMovie*)m_QTMovie attributeForKey:@"QTMovieHasVideoAttribute"] boolValue] == YES;
+}
+
+void QT7PlayerSession::processEOS()
+{
+ m_mediaStatus = QMediaPlayer::EndOfMedia;
+ emit stateChanged(m_state = QMediaPlayer::StoppedState);
+ emit mediaStatusChanged(m_mediaStatus);
+}
+
+void QT7PlayerSession::processLoadStateChange()
+{
+ if (!m_QTMovie)
+ return;
+
+ signed long state = [[(QTMovie*)m_QTMovie attributeForKey:QTMovieLoadStateAttribute]
+ longValue];
+// qDebug() << "Moview load state changed:" << state;
+
+#ifndef QUICKTIME_C_API_AVAILABLE
+ enum {
+ kMovieLoadStateError = -1L,
+ kMovieLoadStateLoading = 1000,
+ kMovieLoadStateLoaded = 2000,
+ kMovieLoadStatePlayable = 10000,
+ kMovieLoadStatePlaythroughOK = 20000,
+ kMovieLoadStateComplete = 100000
+ };
+#endif
+
+ QMediaPlayer::MediaStatus newStatus = QMediaPlayer::NoMedia;
+ bool isPlaying = (m_state != QMediaPlayer::StoppedState);
+
+ if (state >= kMovieLoadStateComplete) {
+ newStatus = isPlaying ? QMediaPlayer::BufferedMedia : QMediaPlayer::LoadedMedia;
+ } else if (state >= kMovieLoadStatePlayable)
+ newStatus = isPlaying ? QMediaPlayer::BufferingMedia : QMediaPlayer::LoadingMedia;
+ else if (state >= kMovieLoadStateLoading)
+ newStatus = isPlaying ? QMediaPlayer::StalledMedia : QMediaPlayer::LoadingMedia;
+
+ if (state == kMovieLoadStateError) {
+ newStatus = QMediaPlayer::InvalidMedia;
+ emit error(QMediaPlayer::FormatError, tr("Failed to load media"));
+ emit stateChanged(m_state = QMediaPlayer::StoppedState);
+ }
+
+ if (state >= kMovieLoadStatePlayable &&
+ m_state == QMediaPlayer::PlayingState &&
+ [(QTMovie*)m_QTMovie rate] == 0) {
+ QMetaObject::invokeMethod(this, "play", Qt::QueuedConnection);
+ }
+
+ if (state >= kMovieLoadStateLoaded) {
+ qint64 currentDuration = duration();
+ if (m_duration != currentDuration)
+ emit durationChanged(m_duration = currentDuration);
+
+ if (m_audioAvailable != isAudioAvailable())
+ emit audioAvailableChanged(m_audioAvailable = !m_audioAvailable);
+
+ if (m_videoAvailable != isVideoAvailable())
+ emit videoAvailableChanged(m_videoAvailable = !m_videoAvailable);
+ }
+
+ if (newStatus != m_mediaStatus)
+ emit mediaStatusChanged(m_mediaStatus = newStatus);
+}
+
+void QT7PlayerSession::processVolumeChange()
+{
+ if (!m_QTMovie)
+ return;
+
+ int newVolume = qRound(100.0f*[((QTMovie*)m_QTMovie) volume]);
+
+ if (newVolume != m_volume) {
+ emit volumeChanged(m_volume = newVolume);
+ }
+}
+
+void QT7PlayerSession::processNaturalSizeChange()
+{
+ if (m_videoOutput) {
+ NSSize size = [[(QTMovie*)m_QTMovie attributeForKey:@"QTMovieNaturalSizeAttribute"] sizeValue];
+// qDebug() << "Native size changed:" << QSize(size.width, size.height);
+ m_videoOutput->updateNaturalSize(QSize(size.width, size.height));
+ }
+}
+
+#include "moc_qt7playersession.cpp"
+
+QT_END_NAMESPACE
+
diff --git a/src/plugins/mediaservices/qt7/qcvdisplaylink.h b/src/plugins/mediaservices/qt7/qcvdisplaylink.h
new file mode 100644
index 0000000000..5cd8f73336
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/qcvdisplaylink.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QCVDISPLAYLINK_H
+#define QCVDISPLAYLINK_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qmutex.h>
+
+#include <CoreVideo/CVDisplayLink.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QCvDisplayLink : public QObject
+{
+Q_OBJECT
+public:
+ QCvDisplayLink(QObject *parent = 0);
+ virtual ~QCvDisplayLink();
+
+ bool isValid();
+ bool isActive() const;
+
+public slots:
+ void start();
+ void stop();
+
+signals:
+ void tick(const CVTimeStamp &ts);
+
+public:
+ void displayLinkEvent(const CVTimeStamp *);
+
+protected:
+ virtual bool event(QEvent *);
+
+private:
+ CVDisplayLinkRef m_displayLink;
+ QMutex m_displayLinkMutex;
+ bool m_pendingDisplayLinkEvent;
+ bool m_isActive;
+ CVTimeStamp m_frameTimeStamp;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
+
diff --git a/src/plugins/mediaservices/qt7/qcvdisplaylink.mm b/src/plugins/mediaservices/qt7/qcvdisplaylink.mm
new file mode 100644
index 0000000000..00b4dc567f
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/qcvdisplaylink.mm
@@ -0,0 +1,158 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qcvdisplaylink.h"
+
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+static CVReturn CVDisplayLinkCallback(CVDisplayLinkRef displayLink,
+ const CVTimeStamp *inNow,
+ const CVTimeStamp *inOutputTime,
+ CVOptionFlags flagsIn,
+ CVOptionFlags *flagsOut,
+ void *displayLinkContext)
+{
+ Q_UNUSED(displayLink);
+ Q_UNUSED(inNow);
+ Q_UNUSED(flagsIn);
+ Q_UNUSED(flagsOut);
+
+ QCvDisplayLink *link = (QCvDisplayLink *)displayLinkContext;
+
+ link->displayLinkEvent(inOutputTime);
+ return kCVReturnSuccess;
+}
+
+
+QCvDisplayLink::QCvDisplayLink(QObject *parent)
+ :QObject(parent),
+ m_pendingDisplayLinkEvent(false),
+ m_isActive(false)
+{
+ // create display link for the main display
+ CVDisplayLinkCreateWithCGDisplay(kCGDirectMainDisplay, &m_displayLink);
+ if (m_displayLink) {
+ // set the current display of a display link.
+ CVDisplayLinkSetCurrentCGDisplay(m_displayLink, kCGDirectMainDisplay);
+
+ // set the renderer output callback function
+ CVDisplayLinkSetOutputCallback(m_displayLink, &CVDisplayLinkCallback, this);
+ }
+}
+
+QCvDisplayLink::~QCvDisplayLink()
+{
+ if (m_displayLink) {
+ CVDisplayLinkStop(m_displayLink);
+ CVDisplayLinkRelease(m_displayLink);
+ m_displayLink = NULL;
+ }
+}
+
+bool QCvDisplayLink::isValid()
+{
+ return m_displayLink != 0;
+}
+
+bool QCvDisplayLink::isActive() const
+{
+ return m_isActive;
+}
+
+void QCvDisplayLink::start()
+{
+ if (m_displayLink && !m_isActive) {
+ CVDisplayLinkStart(m_displayLink);
+ m_isActive = true;
+ }
+}
+
+void QCvDisplayLink::stop()
+{
+ if (m_displayLink && m_isActive) {
+ CVDisplayLinkStop(m_displayLink);
+ m_isActive = false;
+ }
+}
+
+void QCvDisplayLink::displayLinkEvent(const CVTimeStamp *ts)
+{
+ // This function is called from a
+ // thread != gui thread. So we post the event.
+ // But we need to make sure that we don't post faster
+ // than the event loop can eat:
+ m_displayLinkMutex.lock();
+ bool pending = m_pendingDisplayLinkEvent;
+ m_pendingDisplayLinkEvent = true;
+ m_frameTimeStamp = *ts;
+ m_displayLinkMutex.unlock();
+
+ if (!pending)
+ qApp->postEvent(this, new QEvent(QEvent::User), Qt::HighEventPriority);
+}
+
+bool QCvDisplayLink::event(QEvent *event)
+{
+ switch (event->type()){
+ case QEvent::User: {
+ m_displayLinkMutex.lock();
+ m_pendingDisplayLinkEvent = false;
+ CVTimeStamp ts = m_frameTimeStamp;
+ m_displayLinkMutex.unlock();
+
+ emit tick(ts);
+
+ return false;
+ }
+ break;
+ default:
+ break;
+ }
+ return QObject::event(event);
+}
+
+QT_END_NAMESPACE
+
+#include "moc_qcvdisplaylink.cpp"
+
diff --git a/src/plugins/mediaservices/qt7/qt7.pro b/src/plugins/mediaservices/qt7/qt7.pro
new file mode 100644
index 0000000000..6624d13d34
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/qt7.pro
@@ -0,0 +1,45 @@
+TARGET = qt7
+include(../../qpluginbase.pri)
+
+QT += opengl multimedia
+
+LIBS += -framework AppKit -framework AudioUnit \
+ -framework AudioToolbox -framework CoreAudio \
+ -framework QuartzCore -framework QTKit
+
+# The Quicktime framework is only awailable for 32-bit builds, so we
+# need to check for this before linking against it.
+# QMAKE_MAC_XARCH is not awailable on Tiger, but at the same time,
+# we never build for 64-bit architechtures on Tiger either:
+contains(QMAKE_MAC_XARCH, no) {
+ LIBS += -framework QuickTime
+} else {
+ LIBS += -Xarch_i386 -framework QuickTime -Xarch_ppc -framework QuickTime
+}
+
+HEADERS += \
+ qt7backend.h \
+ qt7videooutputcontrol.h \
+ qt7movieviewoutput.h \
+ qt7movievideowidget.h \
+ qt7movieviewrenderer.h \
+ qt7serviceplugin.h \
+ qt7movierenderer.h \
+ qcvdisplaylink.h
+
+OBJECTIVE_SOURCES += \
+ qt7backend.mm \
+ qt7serviceplugin.mm \
+ qt7movieviewoutput.mm \
+ qt7movievideowidget.mm \
+ qt7movieviewrenderer.mm \
+ qt7movierenderer.mm \
+ qt7videooutputcontrol.mm \
+ qcvdisplaylink.mm
+
+include(mediaplayer/mediaplayer.pri)
+
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/mediaservices
+target.path = $$[QT_INSTALL_PLUGINS]/mediaservices
+INSTALLS += target
+
diff --git a/src/plugins/mediaservices/qt7/qt7backend.h b/src/plugins/mediaservices/qt7/qt7backend.h
new file mode 100644
index 0000000000..56689653de
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/qt7backend.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT7BACKEND_H
+#define QT7BACKEND_H
+
+#include <QtCore/qstring.h>
+
+#ifndef Q_WS_MAC64
+#define QUICKTIME_C_API_AVAILABLE
+#endif
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class AutoReleasePool
+{
+private:
+ void *pool;
+public:
+ AutoReleasePool();
+ ~AutoReleasePool();
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/qt7/qt7backend.mm b/src/plugins/mediaservices/qt7/qt7backend.mm
new file mode 100644
index 0000000000..478589b7aa
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/qt7backend.mm
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qt7backend.h"
+
+#import <Foundation/NSAutoreleasePool.h>
+#include <CoreFoundation/CFBase.h>
+
+
+QT_BEGIN_NAMESPACE
+
+AutoReleasePool::AutoReleasePool()
+{
+ pool = (void*)[[NSAutoreleasePool alloc] init];
+}
+
+AutoReleasePool::~AutoReleasePool()
+{
+ [(NSAutoreleasePool*)pool release];
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/qt7/qt7movierenderer.h b/src/plugins/mediaservices/qt7/qt7movierenderer.h
new file mode 100644
index 0000000000..a547329c81
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/qt7movierenderer.h
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT7MOVIERENDERER_H
+#define QT7MOVIERENDERER_H
+
+#include "qt7backend.h"
+
+#include <QtCore/qobject.h>
+#include <QtCore/qmutex.h>
+
+#include <qvideorenderercontrol.h>
+#include <qmediaplayer.h>
+
+#include <QtGui/qmacdefines_mac.h>
+#include "qt7videooutputcontrol.h"
+
+#include <CoreVideo/CVOpenGLTexture.h>
+#include <QuickTime/QuickTime.h>
+
+
+QT_BEGIN_HEADER
+
+class QGLContext;
+
+QT_BEGIN_NAMESPACE
+
+class QCvDisplayLink;
+class QT7PlayerSession;
+class QT7PlayerService;
+
+class QT7MovieRenderer : public QT7VideoRendererControl
+{
+Q_OBJECT
+public:
+ QT7MovieRenderer(QObject *parent = 0);
+ virtual ~QT7MovieRenderer();
+
+ void setEnabled(bool);
+ void setMovie(void *movie);
+ void updateNaturalSize(const QSize &newSize);
+
+ QAbstractVideoSurface *surface() const;
+ void setSurface(QAbstractVideoSurface *surface);
+
+ QSize nativeSize() const;
+
+private slots:
+ void updateVideoFrame(const CVTimeStamp &ts);
+
+private:
+ void setupVideoOutput();
+ bool createPixelBufferVisualContext();
+ bool createGLVisualContext();
+
+ void *m_movie;
+
+ QMutex m_mutex;
+
+ QCvDisplayLink *m_displayLink;
+#ifdef QUICKTIME_C_API_AVAILABLE
+ QTVisualContextRef m_visualContext;
+ bool m_usingGLContext;
+ const QGLContext *m_currentGLContext;
+ QSize m_pixelBufferContextGeometry;
+#endif
+ QAbstractVideoSurface *m_surface;
+ QSize m_nativeSize;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/qt7/qt7movierenderer.mm b/src/plugins/mediaservices/qt7/qt7movierenderer.mm
new file mode 100644
index 0000000000..1c1f5e4e8b
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/qt7movierenderer.mm
@@ -0,0 +1,474 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#import <QTKit/QTKit.h>
+
+#include "qt7backend.h"
+
+#include "qt7playercontrol.h"
+#include "qt7movierenderer.h"
+#include "qt7playersession.h"
+#include "qcvdisplaylink.h"
+#include <QtCore/qdebug.h>
+#include <QtCore/qcoreapplication.h>
+
+#include <QGLWidget>
+
+#include <QtMultimedia/qabstractvideobuffer.h>
+#include <QtMultimedia/qabstractvideosurface.h>
+#include <QtMultimedia/qvideosurfaceformat.h>
+
+QT_BEGIN_NAMESPACE
+
+//#define USE_MAIN_MONITOR_COLOR_SPACE 1
+
+class CVGLTextureVideoBuffer : public QAbstractVideoBuffer
+{
+public:
+ CVGLTextureVideoBuffer(CVOpenGLTextureRef buffer)
+ : QAbstractVideoBuffer(NoHandle)
+ , m_buffer(buffer)
+ , m_mode(NotMapped)
+ {
+ CVOpenGLTextureRetain(m_buffer);
+ }
+
+ virtual ~CVGLTextureVideoBuffer()
+ {
+ CVOpenGLTextureRelease(m_buffer);
+ }
+
+ QVariant handle() const
+ {
+ GLuint id = CVOpenGLTextureGetName(m_buffer);
+ return QVariant(int(id));
+ }
+
+ HandleType handleType() const
+ {
+ return GLTextureHandle;
+ }
+
+ MapMode mapMode() const { return m_mode; }
+
+ uchar *map(MapMode mode, int *numBytes, int *bytesPerLine)
+ {
+ if (numBytes)
+ *numBytes = 0;
+
+ if (bytesPerLine)
+ *bytesPerLine = 0;
+
+ m_mode = mode;
+ return 0;
+ }
+
+ void unmap() { m_mode = NotMapped; }
+
+private:
+ CVOpenGLTextureRef m_buffer;
+ MapMode m_mode;
+};
+
+
+class CVPixelBufferVideoBuffer : public QAbstractVideoBuffer
+{
+public:
+ CVPixelBufferVideoBuffer(CVPixelBufferRef buffer)
+ : QAbstractVideoBuffer(NoHandle)
+ , m_buffer(buffer)
+ , m_mode(NotMapped)
+ {
+ CVPixelBufferRetain(m_buffer);
+ }
+
+ virtual ~CVPixelBufferVideoBuffer()
+ {
+ CVPixelBufferRelease(m_buffer);
+ }
+
+ MapMode mapMode() const { return m_mode; }
+
+ uchar *map(MapMode mode, int *numBytes, int *bytesPerLine)
+ {
+ if (mode != NotMapped && m_mode == NotMapped) {
+ CVPixelBufferLockBaseAddress(m_buffer, 0);
+
+ if (numBytes)
+ *numBytes = CVPixelBufferGetDataSize(m_buffer);
+
+ if (bytesPerLine)
+ *bytesPerLine = CVPixelBufferGetBytesPerRow(m_buffer);
+
+ m_mode = mode;
+
+ return (uchar*)CVPixelBufferGetBaseAddress(m_buffer);
+ } else {
+ return 0;
+ }
+ }
+
+ void unmap()
+ {
+ if (m_mode != NotMapped) {
+ m_mode = NotMapped;
+ CVPixelBufferUnlockBaseAddress(m_buffer, 0);
+ }
+ }
+
+private:
+ CVPixelBufferRef m_buffer;
+ MapMode m_mode;
+};
+
+
+
+QT7MovieRenderer::QT7MovieRenderer(QObject *parent)
+ :QT7VideoRendererControl(parent),
+ m_movie(0),
+#ifdef QUICKTIME_C_API_AVAILABLE
+ m_visualContext(0),
+ m_usingGLContext(false),
+ m_currentGLContext(0),
+#endif
+ m_surface(0)
+{
+// qDebug() << "QT7MovieRenderer";
+
+ m_displayLink = new QCvDisplayLink(this);
+ connect(m_displayLink, SIGNAL(tick(CVTimeStamp)), SLOT(updateVideoFrame(CVTimeStamp)));
+}
+
+
+bool QT7MovieRenderer::createGLVisualContext()
+{
+#ifdef QUICKTIME_C_API_AVAILABLE
+ AutoReleasePool pool;
+ CGLContextObj cglContext = CGLGetCurrentContext();
+ NSOpenGLPixelFormat *nsglPixelFormat = [NSOpenGLView defaultPixelFormat];
+ CGLPixelFormatObj cglPixelFormat = static_cast<CGLPixelFormatObj>([nsglPixelFormat CGLPixelFormatObj]);
+
+ OSStatus err = QTOpenGLTextureContextCreate(kCFAllocatorDefault, cglContext,
+ cglPixelFormat, NULL, &m_visualContext);
+ if (err != noErr)
+ qWarning() << "Could not create visual context (OpenGL)";
+
+ return (err == noErr);
+#endif // QUICKTIME_C_API_AVAILABLE
+
+ return false;
+}
+
+#ifdef QUICKTIME_C_API_AVAILABLE
+static bool DictionarySetValue(CFMutableDictionaryRef dict, CFStringRef key, SInt32 value)
+{
+ CFNumberRef number = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &value);
+
+ if (number) {
+ CFDictionarySetValue( dict, key, number );
+ CFRelease( number );
+ return true;
+ }
+ return false;
+}
+#endif // QUICKTIME_C_API_AVAILABLE
+
+bool QT7MovieRenderer::createPixelBufferVisualContext()
+{
+#ifdef QUICKTIME_C_API_AVAILABLE
+ if (m_visualContext) {
+ QTVisualContextRelease(m_visualContext);
+ m_visualContext = 0;
+ }
+
+ m_pixelBufferContextGeometry = m_nativeSize;
+
+ CFMutableDictionaryRef pixelBufferOptions = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
+ &kCFTypeDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks);
+ //DictionarySetValue(pixelBufferOptions, kCVPixelBufferPixelFormatTypeKey, k32ARGBPixelFormat );
+ DictionarySetValue(pixelBufferOptions, kCVPixelBufferPixelFormatTypeKey, k32BGRAPixelFormat );
+ DictionarySetValue(pixelBufferOptions, kCVPixelBufferWidthKey, m_nativeSize.width() );
+ DictionarySetValue(pixelBufferOptions, kCVPixelBufferHeightKey, m_nativeSize.height() );
+ DictionarySetValue(pixelBufferOptions, kCVPixelBufferBytesPerRowAlignmentKey, 16);
+ //CFDictionarySetValue(pixelBufferOptions, kCVPixelBufferOpenGLCompatibilityKey, kCFBooleanTrue);
+
+ CFMutableDictionaryRef visualContextOptions = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
+ &kCFTypeDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks);
+ CFDictionarySetValue(visualContextOptions, kQTVisualContextPixelBufferAttributesKey, pixelBufferOptions);
+
+ CGColorSpaceRef colorSpace = NULL;
+
+#if USE_MAIN_MONITOR_COLOR_SPACE
+ CMProfileRef sysprof = NULL;
+
+ // Get the Systems Profile for the main display
+ if (CMGetSystemProfile(&sysprof) == noErr) {
+ // Create a colorspace with the systems profile
+ colorSpace = CGColorSpaceCreateWithPlatformColorSpace(sysprof);
+ CMCloseProfile(sysprof);
+ }
+#endif
+
+ if (!colorSpace)
+ colorSpace = CGColorSpaceCreateDeviceRGB();
+
+ CFDictionarySetValue(visualContextOptions, kQTVisualContextOutputColorSpaceKey, colorSpace);
+
+ OSStatus err = QTPixelBufferContextCreate(kCFAllocatorDefault,
+ visualContextOptions,
+ &m_visualContext);
+ CFRelease(pixelBufferOptions);
+ CFRelease(visualContextOptions);
+
+ if (err != noErr) {
+ qWarning() << "Could not create visual context (PixelBuffer)";
+ return false;
+ }
+
+ return true;
+#endif // QUICKTIME_C_API_AVAILABLE
+
+ return false;
+}
+
+
+QT7MovieRenderer::~QT7MovieRenderer()
+{
+ m_displayLink->stop();
+}
+
+void QT7MovieRenderer::setupVideoOutput()
+{
+ AutoReleasePool pool;
+
+// qDebug() << "QT7MovieRenderer::setupVideoOutput" << m_movie;
+
+ if (m_movie == 0 || m_surface == 0) {
+ m_displayLink->stop();
+ return;
+ }
+
+ NSSize size = [[(QTMovie*)m_movie attributeForKey:@"QTMovieNaturalSizeAttribute"] sizeValue];
+ m_nativeSize = QSize(size.width, size.height);
+
+#ifdef QUICKTIME_C_API_AVAILABLE
+ bool usedGLContext = m_usingGLContext;
+
+ if (!m_nativeSize.isEmpty()) {
+
+ bool glSupported = !m_surface->supportedPixelFormats(QAbstractVideoBuffer::GLTextureHandle).isEmpty();
+
+ //Try rendering using opengl textures first:
+ if (glSupported) {
+ QVideoSurfaceFormat format(m_nativeSize, QVideoFrame::Format_RGB32, QAbstractVideoBuffer::GLTextureHandle);
+
+ if (m_surface->isActive())
+ m_surface->stop();
+
+// qDebug() << "Starting the surface with format" << format;
+ if (!m_surface->start(format)) {
+// qDebug() << "failed to start video surface" << m_surface->error();
+ glSupported = false;
+ } else {
+ m_usingGLContext = true;
+ }
+
+ }
+
+ if (!glSupported) {
+ m_usingGLContext = false;
+ QVideoSurfaceFormat format(m_nativeSize, QVideoFrame::Format_RGB32);
+
+ if (m_surface->isActive() && m_surface->surfaceFormat() != format) {
+// qDebug() << "Surface format was changed, stop the surface.";
+ m_surface->stop();
+ }
+
+ if (!m_surface->isActive()) {
+// qDebug() << "Starting the surface with format" << format;
+ m_surface->start(format);
+// if (!m_surface->start(format))
+// qDebug() << "failed to start video surface" << m_surface->error();
+ }
+ }
+ }
+
+
+ if (m_visualContext) {
+ //check if the visual context still can be reused
+ if (usedGLContext != m_usingGLContext ||
+ (m_usingGLContext && (m_currentGLContext != QGLContext::currentContext())) ||
+ (!m_usingGLContext && (m_pixelBufferContextGeometry != m_nativeSize))) {
+ QTVisualContextRelease(m_visualContext);
+ m_pixelBufferContextGeometry = QSize();
+ m_visualContext = 0;
+ }
+ }
+
+ if (!m_nativeSize.isEmpty()) {
+ if (!m_visualContext) {
+ if (m_usingGLContext) {
+// qDebug() << "Building OpenGL visual context" << m_nativeSize;
+ m_currentGLContext = QGLContext::currentContext();
+ if (!createGLVisualContext()) {
+ qWarning() << "QT7MovieRenderer: failed to create visual context";
+ return;
+ }
+ } else {
+// qDebug() << "Building Pixel Buffer visual context" << m_nativeSize;
+ if (!createPixelBufferVisualContext()) {
+ qWarning() << "QT7MovieRenderer: failed to create visual context";
+ return;
+ }
+ }
+ }
+
+ // targets a Movie to render into a visual context
+ SetMovieVisualContext([(QTMovie*)m_movie quickTimeMovie], m_visualContext);
+
+ m_displayLink->start();
+ }
+#endif
+
+}
+
+void QT7MovieRenderer::setEnabled(bool)
+{
+}
+
+void QT7MovieRenderer::setMovie(void *movie)
+{
+// qDebug() << "QT7MovieRenderer::setMovie" << movie;
+
+#ifdef QUICKTIME_C_API_AVAILABLE
+ QMutexLocker locker(&m_mutex);
+
+ if (m_movie != movie) {
+ if (m_movie) {
+ //ensure the old movie doesn't hold the visual context, otherwise it can't be reused
+ SetMovieVisualContext([(QTMovie*)m_movie quickTimeMovie], nil);
+ [(QTMovie*)m_movie release];
+ }
+
+ m_movie = movie;
+ [(QTMovie*)m_movie retain];
+
+ setupVideoOutput();
+ }
+#endif
+}
+
+void QT7MovieRenderer::updateNaturalSize(const QSize &newSize)
+{
+ if (m_nativeSize != newSize) {
+ m_nativeSize = newSize;
+ setupVideoOutput();
+ }
+}
+
+QAbstractVideoSurface *QT7MovieRenderer::surface() const
+{
+ return m_surface;
+}
+
+void QT7MovieRenderer::setSurface(QAbstractVideoSurface *surface)
+{
+// qDebug() << "Set video surface" << surface;
+
+ if (surface == m_surface)
+ return;
+
+ QMutexLocker locker(&m_mutex);
+
+ if (m_surface && m_surface->isActive())
+ m_surface->stop();
+
+ m_surface = surface;
+ setupVideoOutput();
+}
+
+
+QSize QT7MovieRenderer::nativeSize() const
+{
+ return m_nativeSize;
+}
+
+void QT7MovieRenderer::updateVideoFrame(const CVTimeStamp &ts)
+{
+#ifdef QUICKTIME_C_API_AVAILABLE
+
+ QMutexLocker locker(&m_mutex);
+
+ if (m_surface && m_surface->isActive() &&
+ m_visualContext && QTVisualContextIsNewImageAvailable(m_visualContext, &ts)) {
+
+ CVImageBufferRef imageBuffer = NULL;
+
+ OSStatus status = QTVisualContextCopyImageForTime(m_visualContext, NULL, &ts, &imageBuffer);
+
+ if (status == noErr && imageBuffer) {
+ //qDebug() << "render video frame";
+ QAbstractVideoBuffer *buffer = 0;
+
+ if (m_usingGLContext) {
+ buffer = new CVGLTextureVideoBuffer((CVOpenGLTextureRef)imageBuffer);
+ CVOpenGLTextureRelease((CVOpenGLTextureRef)imageBuffer);
+ //qDebug() << "render GL video frame" << buffer->handle();
+ } else {
+ buffer = new CVPixelBufferVideoBuffer((CVPixelBufferRef)imageBuffer);
+ CVPixelBufferRelease((CVPixelBufferRef)imageBuffer);
+ }
+
+ QVideoFrame frame(buffer, m_nativeSize, QVideoFrame::Format_RGB32);
+ m_surface->present(frame);
+ QTVisualContextTask(m_visualContext);
+ }
+ }
+#else
+ Q_UNUSED(ts);
+#endif
+}
+
+#include "moc_qt7movierenderer.cpp"
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/qt7/qt7movievideowidget.h b/src/plugins/mediaservices/qt7/qt7movievideowidget.h
new file mode 100644
index 0000000000..558c3d76b6
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/qt7movievideowidget.h
@@ -0,0 +1,132 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT7MOVIEVIDEOWIDGET_H
+#define QT7MOVIEVIDEOWIDGET_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qmutex.h>
+
+#include <qvideowindowcontrol.h>
+#include <qmediaplayer.h>
+
+#include <QtGui/qmacdefines_mac.h>
+#include "qt7videooutputcontrol.h"
+
+#include <CoreVideo/CVOpenGLTexture.h>
+#include <QuickTime/QuickTime.h>
+
+
+QT_BEGIN_HEADER
+
+
+QT_BEGIN_NAMESPACE
+
+class GLVideoWidget;
+class QCvDisplayLink;
+class QT7PlayerSession;
+class QT7PlayerService;
+
+class QT7MovieVideoWidget : public QT7VideoWidgetControl
+{
+Q_OBJECT
+public:
+ QT7MovieVideoWidget(QObject *parent = 0);
+ virtual ~QT7MovieVideoWidget();
+
+ void setEnabled(bool);
+ void setMovie(void *movie);
+ void updateNaturalSize(const QSize &newSize);
+
+ QWidget *videoWidget();
+
+ bool isFullScreen() const;
+ void setFullScreen(bool fullScreen);
+
+ QSize nativeSize() const;
+
+ QVideoWidget::AspectRatioMode aspectRatioMode() const;
+ void setAspectRatioMode(QVideoWidget::AspectRatioMode mode);
+
+ int brightness() const;
+ void setBrightness(int brightness);
+
+ int contrast() const;
+ void setContrast(int contrast);
+
+ int hue() const;
+ void setHue(int hue);
+
+ int saturation() const;
+ void setSaturation(int saturation);
+
+private slots:
+ void updateVideoFrame(const CVTimeStamp &ts);
+
+private:
+ void setupVideoOutput();
+ bool createVisualContext();
+
+ void updateColors();
+
+ void *m_movie;
+ GLVideoWidget *m_videoWidget;
+
+ QCvDisplayLink *m_displayLink;
+
+#ifdef QUICKTIME_C_API_AVAILABLE
+ QTVisualContextRef m_visualContext;
+#endif
+
+ bool m_fullscreen;
+ QSize m_nativeSize;
+ QVideoWidget::AspectRatioMode m_aspectRatioMode;
+ int m_brightness;
+ int m_contrast;
+ int m_hue;
+ int m_saturation;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/qt7/qt7movievideowidget.mm b/src/plugins/mediaservices/qt7/qt7movievideowidget.mm
new file mode 100644
index 0000000000..00ceffcbac
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/qt7movievideowidget.mm
@@ -0,0 +1,428 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#import <QTKit/QTKit.h>
+
+#include "qt7backend.h"
+
+#include "qt7playercontrol.h"
+#include "qt7movievideowidget.h"
+#include "qt7playersession.h"
+#include "qcvdisplaylink.h"
+#include <QtCore/qdebug.h>
+#include <QtCore/qcoreapplication.h>
+
+#include <QGLWidget>
+
+#import <QuartzCore/QuartzCore.h>
+
+#include "math.h"
+
+QT_BEGIN_NAMESPACE
+
+class GLVideoWidget : public QGLWidget
+{
+public:
+
+ GLVideoWidget(QWidget *parent, const QGLFormat &format)
+ : QGLWidget(format, parent),
+ m_texRef(0),
+ m_nativeSize(640,480),
+ m_aspectRatioMode(QVideoWidget::KeepAspectRatio)
+ {
+ setAutoFillBackground(false);
+ }
+
+ void initializeGL()
+ {
+ glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
+ }
+
+ void resizeGL(int w, int h)
+ {
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glViewport(0, 0, GLsizei(w), GLsizei(h));
+ gluOrtho2D(0, GLsizei(w), 0, GLsizei(h));
+ updateGL();
+ }
+
+ void paintGL()
+ {
+ glClear(GL_COLOR_BUFFER_BIT);
+ if (!m_texRef)
+ return;
+
+ glPushMatrix();
+ glDisable(GL_CULL_FACE);
+ GLenum target = CVOpenGLTextureGetTarget(m_texRef);
+ glEnable(target);
+
+ glBindTexture(target, CVOpenGLTextureGetName(m_texRef));
+ glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameterf(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ GLfloat lowerLeft[2], lowerRight[2], upperRight[2], upperLeft[2];
+ CVOpenGLTextureGetCleanTexCoords(m_texRef, lowerLeft, lowerRight, upperRight, upperLeft);
+
+ glBegin(GL_QUADS);
+ QRect rect = displayRect();
+ glTexCoord2f(lowerLeft[0], lowerLeft[1]);
+ glVertex2i(rect.topLeft().x(), rect.topLeft().y());
+ glTexCoord2f(lowerRight[0], lowerRight[1]);
+ glVertex2i(rect.topRight().x() + 1, rect.topRight().y());
+ glTexCoord2f(upperRight[0], upperRight[1]);
+ glVertex2i(rect.bottomRight().x() + 1, rect.bottomRight().y() + 1);
+ glTexCoord2f(upperLeft[0], upperLeft[1]);
+ glVertex2i(rect.bottomLeft().x(), rect.bottomLeft().y() + 1);
+ glEnd();
+ glPopMatrix();
+ }
+
+ void setCVTexture(CVOpenGLTextureRef texRef)
+ {
+ if (m_texRef)
+ CVOpenGLTextureRelease(m_texRef);
+
+ m_texRef = texRef;
+
+ if (m_texRef)
+ CVOpenGLTextureRetain(m_texRef);
+
+ if (isVisible()) {
+ makeCurrent();
+ paintGL();
+ swapBuffers();
+ }
+ }
+
+ QSize sizeHint() const
+ {
+ return m_nativeSize;
+ }
+
+ void setNativeSize(const QSize &size)
+ {
+ m_nativeSize = size;
+ }
+
+ void setAspectRatioMode(QVideoWidget::AspectRatioMode mode)
+ {
+ if (m_aspectRatioMode != mode) {
+ m_aspectRatioMode = mode;
+ update();
+ }
+ }
+
+private:
+ QRect displayRect() const
+ {
+ QRect displayRect = rect();
+
+ if (m_aspectRatioMode == QVideoWidget::KeepAspectRatio) {
+ QSize size = m_nativeSize;
+ size.scale(displayRect.size(), Qt::KeepAspectRatio);
+
+ displayRect = QRect(QPoint(0, 0), size);
+ displayRect.moveCenter(rect().center());
+ }
+ return displayRect;
+ }
+
+ CVOpenGLTextureRef m_texRef;
+ QSize m_nativeSize;
+ QVideoWidget::AspectRatioMode m_aspectRatioMode;
+};
+
+QT7MovieVideoWidget::QT7MovieVideoWidget(QObject *parent)
+ :QT7VideoWidgetControl(parent),
+ m_movie(0),
+ m_videoWidget(0),
+ m_fullscreen(false),
+ m_aspectRatioMode(QVideoWidget::KeepAspectRatio),
+ m_brightness(0),
+ m_contrast(0),
+ m_hue(0),
+ m_saturation(0)
+{
+// qDebug() << "QT7MovieVideoWidget";
+
+ QGLFormat format = QGLFormat::defaultFormat();
+ format.setSwapInterval(1); // Vertical sync (avoid tearing)
+ m_videoWidget = new GLVideoWidget(0, format);
+
+ m_displayLink = new QCvDisplayLink(this);
+
+ connect(m_displayLink, SIGNAL(tick(CVTimeStamp)), SLOT(updateVideoFrame(CVTimeStamp)));
+
+ if (!createVisualContext()) {
+ qWarning() << "QT7MovieVideoWidget: failed to create visual context";
+ }
+}
+
+bool QT7MovieVideoWidget::createVisualContext()
+{
+#ifdef QUICKTIME_C_API_AVAILABLE
+ m_videoWidget->makeCurrent();
+
+ AutoReleasePool pool;
+ CGLContextObj cglContext = CGLGetCurrentContext();
+ NSOpenGLPixelFormat *nsglPixelFormat = [NSOpenGLView defaultPixelFormat];
+ CGLPixelFormatObj cglPixelFormat = static_cast<CGLPixelFormatObj>([nsglPixelFormat CGLPixelFormatObj]);
+
+ CFTypeRef keys[] = { kQTVisualContextOutputColorSpaceKey };
+ CGColorSpaceRef colorSpace = NULL;
+ CMProfileRef sysprof = NULL;
+
+ // Get the Systems Profile for the main display
+ if (CMGetSystemProfile(&sysprof) == noErr) {
+ // Create a colorspace with the systems profile
+ colorSpace = CGColorSpaceCreateWithPlatformColorSpace(sysprof);
+ CMCloseProfile(sysprof);
+ }
+
+ if (!colorSpace)
+ colorSpace = CGColorSpaceCreateDeviceRGB();
+
+ CFDictionaryRef textureContextAttributes = CFDictionaryCreate(kCFAllocatorDefault,
+ (const void **)keys,
+ (const void **)&colorSpace, 1,
+ &kCFTypeDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks);
+
+ OSStatus err = QTOpenGLTextureContextCreate(kCFAllocatorDefault,
+ cglContext,
+ cglPixelFormat,
+ textureContextAttributes,
+ &m_visualContext);
+ if (err != noErr)
+ qWarning() << "Could not create visual context (OpenGL)";
+
+
+ return (err == noErr);
+#endif // QUICKTIME_C_API_AVAILABLE
+
+ return false;
+}
+
+QT7MovieVideoWidget::~QT7MovieVideoWidget()
+{
+ m_displayLink->stop();
+ [(QTMovie*)m_movie release];
+ delete m_videoWidget;
+}
+
+QWidget *QT7MovieVideoWidget::videoWidget()
+{
+ return m_videoWidget;
+}
+
+void QT7MovieVideoWidget::setupVideoOutput()
+{
+ AutoReleasePool pool;
+
+// qDebug() << "QT7MovieVideoWidget::setupVideoOutput" << m_movie;
+
+ if (m_movie == 0) {
+ m_displayLink->stop();
+ return;
+ }
+
+ NSSize size = [[(QTMovie*)m_movie attributeForKey:@"QTMovieNaturalSizeAttribute"] sizeValue];
+ m_nativeSize = QSize(size.width, size.height);
+ m_videoWidget->setNativeSize(m_nativeSize);
+
+#ifdef QUICKTIME_C_API_AVAILABLE
+ // targets a Movie to render into a visual context
+ SetMovieVisualContext([(QTMovie*)m_movie quickTimeMovie], m_visualContext);
+#endif
+
+ m_displayLink->start();
+}
+
+void QT7MovieVideoWidget::setEnabled(bool)
+{
+}
+
+void QT7MovieVideoWidget::setMovie(void *movie)
+{
+ if (m_movie == movie)
+ return;
+
+ if (m_movie) {
+#ifdef QUICKTIME_C_API_AVAILABLE
+ SetMovieVisualContext([(QTMovie*)m_movie quickTimeMovie], nil);
+#endif
+ [(QTMovie*)m_movie release];
+ }
+
+ m_movie = movie;
+ [(QTMovie*)m_movie retain];
+
+ setupVideoOutput();
+}
+
+void QT7MovieVideoWidget::updateNaturalSize(const QSize &newSize)
+{
+ if (m_nativeSize != newSize) {
+ m_nativeSize = newSize;
+ setupVideoOutput();
+ }
+}
+
+bool QT7MovieVideoWidget::isFullScreen() const
+{
+ return m_fullscreen;
+}
+
+void QT7MovieVideoWidget::setFullScreen(bool fullScreen)
+{
+ m_fullscreen = fullScreen;
+}
+
+QSize QT7MovieVideoWidget::nativeSize() const
+{
+ return m_nativeSize;
+}
+
+QVideoWidget::AspectRatioMode QT7MovieVideoWidget::aspectRatioMode() const
+{
+ return m_aspectRatioMode;
+}
+
+void QT7MovieVideoWidget::setAspectRatioMode(QVideoWidget::AspectRatioMode mode)
+{
+ m_aspectRatioMode = mode;
+ m_videoWidget->setAspectRatioMode(mode);
+}
+
+int QT7MovieVideoWidget::brightness() const
+{
+ return m_brightness;
+}
+
+void QT7MovieVideoWidget::setBrightness(int brightness)
+{
+ m_brightness = brightness;
+ updateColors();
+}
+
+int QT7MovieVideoWidget::contrast() const
+{
+ return m_contrast;
+}
+
+void QT7MovieVideoWidget::setContrast(int contrast)
+{
+ m_contrast = contrast;
+ updateColors();
+}
+
+int QT7MovieVideoWidget::hue() const
+{
+ return m_hue;
+}
+
+void QT7MovieVideoWidget::setHue(int hue)
+{
+ m_hue = hue;
+ updateColors();
+}
+
+int QT7MovieVideoWidget::saturation() const
+{
+ return m_saturation;
+}
+
+void QT7MovieVideoWidget::setSaturation(int saturation)
+{
+ m_saturation = saturation;
+ updateColors();
+}
+
+void QT7MovieVideoWidget::updateColors()
+{
+#ifdef QUICKTIME_C_API_AVAILABLE
+ if (m_movie) {
+ QTMovie *movie = (QTMovie*)m_movie;
+
+ Float32 value;
+ value = m_brightness/100.0;
+ SetMovieVisualBrightness([movie quickTimeMovie], value, 0);
+ value = pow(2, m_contrast/50.0);
+ SetMovieVisualContrast([movie quickTimeMovie], value, 0);
+ value = m_hue/100.0;
+ SetMovieVisualHue([movie quickTimeMovie], value, 0);
+ value = 1.0+m_saturation/100.0;
+ SetMovieVisualSaturation([movie quickTimeMovie], value, 0);
+ }
+#endif
+}
+
+void QT7MovieVideoWidget::updateVideoFrame(const CVTimeStamp &ts)
+{
+#ifdef QUICKTIME_C_API_AVAILABLE
+ AutoReleasePool pool;
+ // check for new frame
+ if (m_visualContext && QTVisualContextIsNewImageAvailable(m_visualContext, &ts)) {
+ CVOpenGLTextureRef currentFrame = NULL;
+
+ // get a "frame" (image buffer) from the Visual Context, indexed by the provided time
+ OSStatus status = QTVisualContextCopyImageForTime(m_visualContext, NULL, &ts, &currentFrame);
+
+ // the above call may produce a null frame so check for this first
+ // if we have a frame, then draw it
+ if (status == noErr && currentFrame) {
+ //qDebug() << "render video frame";
+ m_videoWidget->setCVTexture(currentFrame);
+ CVOpenGLTextureRelease(currentFrame);
+ }
+ QTVisualContextTask(m_visualContext);
+ }
+#else
+ Q_UNUSED(ts);
+#endif
+}
+
+#include "moc_qt7movievideowidget.cpp"
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/qt7/qt7movieviewoutput.h b/src/plugins/mediaservices/qt7/qt7movieviewoutput.h
new file mode 100644
index 0000000000..30eefa760c
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/qt7movieviewoutput.h
@@ -0,0 +1,119 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT7MOVIEVIEWOUTPUT_H
+#define QT7MOVIEVIEWOUTPUT_H
+
+#include <QtCore/qobject.h>
+
+#include <QtMultimedia/qvideowindowcontrol.h>
+#include <QtMultimedia/qmediaplayer.h>
+
+#include <QtGui/qmacdefines_mac.h>
+#include "qt7videooutputcontrol.h"
+
+
+QT_BEGIN_HEADER
+QT_BEGIN_NAMESPACE
+
+class QT7PlayerSession;
+class QT7PlayerService;
+
+class QT7MovieViewOutput : public QT7VideoWindowControl
+{
+public:
+ QT7MovieViewOutput(QObject *parent = 0);
+ ~QT7MovieViewOutput();
+
+ void setEnabled(bool);
+ void setMovie(void *movie);
+ void updateNaturalSize(const QSize &newSize);
+
+ WId winId() const;
+ void setWinId(WId id);
+
+ QRect displayRect() const;
+ void setDisplayRect(const QRect &rect);
+
+ bool isFullScreen() const;
+ void setFullScreen(bool fullScreen);
+
+ void repaint();
+
+ QSize nativeSize() const;
+
+ QVideoWidget::AspectRatioMode aspectRatioMode() const;
+ void setAspectRatioMode(QVideoWidget::AspectRatioMode mode);
+
+ int brightness() const;
+ void setBrightness(int brightness);
+
+ int contrast() const;
+ void setContrast(int contrast);
+
+ int hue() const;
+ void setHue(int hue);
+
+ int saturation() const;
+ void setSaturation(int saturation);
+
+private:
+ void setupVideoOutput();
+
+ void *m_movie;
+ void *m_movieView;
+
+ WId m_winId;
+ QRect m_displayRect;
+ bool m_fullscreen;
+ QSize m_nativeSize;
+ QVideoWidget::AspectRatioMode m_aspectRatioMode;
+ int m_brightness;
+ int m_contrast;
+ int m_hue;
+ int m_saturation;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm b/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm
new file mode 100644
index 0000000000..254af461d0
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm
@@ -0,0 +1,312 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#import <QTKit/QTKit.h>
+
+#include "qt7backend.h"
+
+#include "qt7playercontrol.h"
+#include "qt7movieviewoutput.h"
+#include "qt7playersession.h"
+#include <QtCore/qdebug.h>
+
+
+#define VIDEO_TRANSPARENT(m) -(void)m:(NSEvent *)e{[[self superview] m:e];}
+
+@interface TransparentQTMovieView : QTMovieView
+{
+@private
+ QRect *m_drawRect;
+ qreal m_brightness, m_contrast, m_saturation, m_hue;
+}
+
+- (TransparentQTMovieView *) init;
+- (void) setDrawRect:(QRect &)rect;
+- (CIImage *) view:(QTMovieView *)view willDisplayImage:(CIImage *)img;
+- (void) setContrast:(qreal) contrast;
+@end
+
+@implementation TransparentQTMovieView
+
+- (TransparentQTMovieView *) init
+{
+ self = [super initWithFrame:NSZeroRect];
+ if (self) {
+ [self setControllerVisible:NO];
+ [self setContrast:1.0];
+ [self setDelegate:self];
+ }
+ return self;
+}
+
+- (void) dealloc
+{
+ [super dealloc];
+}
+
+- (void) setContrast:(qreal) contrast
+{
+ m_hue = 0.0;
+ m_brightness = 0.0;
+ m_contrast = contrast;
+ m_saturation = 1.0;
+}
+
+
+- (void) setDrawRect:(QRect &)rect
+{
+ *m_drawRect = rect;
+
+ NSRect nsrect;
+ nsrect.origin.x = m_drawRect->x();
+ nsrect.origin.y = m_drawRect->y();
+ nsrect.size.width = m_drawRect->width();
+ nsrect.size.height = m_drawRect->height();
+ [self setFrame:nsrect];
+}
+
+- (CIImage *) view:(QTMovieView *)view willDisplayImage:(CIImage *)img
+{
+ // This method is called from QTMovieView just
+ // before the image will be drawn.
+ Q_UNUSED(view);
+
+ if ( !qFuzzyCompare(m_brightness, 0.0) ||
+ !qFuzzyCompare(m_contrast, 1.0) ||
+ !qFuzzyCompare(m_saturation, 1.0)){
+ CIFilter *colorFilter = [CIFilter filterWithName:@"CIColorControls"];
+ [colorFilter setValue:[NSNumber numberWithFloat:m_brightness] forKey:@"inputBrightness"];
+ [colorFilter setValue:[NSNumber numberWithFloat:(m_contrast < 1) ? m_contrast : 1 + ((m_contrast-1)*3)] forKey:@"inputContrast"];
+ [colorFilter setValue:[NSNumber numberWithFloat:m_saturation] forKey:@"inputSaturation"];
+ [colorFilter setValue:img forKey:@"inputImage"];
+ img = [colorFilter valueForKey:@"outputImage"];
+ }
+
+ /*if (m_hue){
+ CIFilter *colorFilter = [CIFilter filterWithName:@"CIHueAdjust"];
+ [colorFilter setValue:[NSNumber numberWithFloat:(m_hue * 3.14)] forKey:@"inputAngle"];
+ [colorFilter setValue:img forKey:@"inputImage"];
+ img = [colorFilter valueForKey:@"outputImage"];
+ }*/
+
+ return img;
+}
+
+
+VIDEO_TRANSPARENT(mouseDown);
+VIDEO_TRANSPARENT(mouseDragged);
+VIDEO_TRANSPARENT(mouseUp);
+VIDEO_TRANSPARENT(mouseMoved);
+VIDEO_TRANSPARENT(mouseEntered);
+VIDEO_TRANSPARENT(mouseExited);
+VIDEO_TRANSPARENT(rightMouseDown);
+VIDEO_TRANSPARENT(rightMouseDragged);
+VIDEO_TRANSPARENT(rightMouseUp);
+VIDEO_TRANSPARENT(otherMouseDown);
+VIDEO_TRANSPARENT(otherMouseDragged);
+VIDEO_TRANSPARENT(otherMouseUp);
+VIDEO_TRANSPARENT(keyDown);
+VIDEO_TRANSPARENT(keyUp);
+VIDEO_TRANSPARENT(scrollWheel)
+
+@end
+
+
+QT7MovieViewOutput::QT7MovieViewOutput(QObject *parent)
+ :QT7VideoWindowControl(parent),
+ m_movie(0),
+ m_movieView(0),
+ m_winId(0),
+ m_fullscreen(false),
+ m_aspectRatioMode(QVideoWidget::KeepAspectRatio),
+ m_brightness(0),
+ m_contrast(0),
+ m_hue(0),
+ m_saturation(0)
+{
+}
+
+QT7MovieViewOutput::~QT7MovieViewOutput()
+{
+}
+
+void QT7MovieViewOutput::setupVideoOutput()
+{
+ AutoReleasePool pool;
+
+ //qDebug() << "QT7MovieViewOutput::setupVideoOutput" << m_movie << m_winId;
+ if (m_movie == 0 || m_winId <= 0)
+ return;
+
+ NSSize size = [[(QTMovie*)m_movie attributeForKey:@"QTMovieNaturalSizeAttribute"] sizeValue];
+ m_nativeSize = QSize(size.width, size.height);
+
+ if (!m_movieView)
+ m_movieView = [[TransparentQTMovieView alloc] init];
+
+ [(QTMovieView*)m_movieView setControllerVisible:NO];
+ [(QTMovieView*)m_movieView setMovie:(QTMovie*)m_movie];
+
+ [(NSView *)m_winId addSubview:(QTMovieView*)m_movieView];
+
+ setDisplayRect(m_displayRect);
+}
+
+void QT7MovieViewOutput::setEnabled(bool)
+{
+}
+
+void QT7MovieViewOutput::setMovie(void *movie)
+{
+ m_movie = movie;
+ setupVideoOutput();
+}
+
+void QT7MovieViewOutput::updateNaturalSize(const QSize &newSize)
+{
+ if (m_nativeSize != newSize) {
+ m_nativeSize = newSize;
+ emit nativeSizeChanged();
+ }
+}
+
+WId QT7MovieViewOutput::winId() const
+{
+ return m_winId;
+}
+
+void QT7MovieViewOutput::setWinId(WId id)
+{
+ m_winId = id;
+ setupVideoOutput();
+}
+
+QRect QT7MovieViewOutput::displayRect() const
+{
+ return m_displayRect;
+}
+
+void QT7MovieViewOutput::setDisplayRect(const QRect &rect)
+{
+ m_displayRect = rect;
+
+ if (m_movieView) {
+ AutoReleasePool pool;
+ [(QTMovieView*)m_movieView setPreservesAspectRatio:(m_aspectRatioMode == QVideoWidget::KeepAspectRatio ? YES : NO)];
+ [(QTMovieView*)m_movieView setFrame:NSMakeRect(m_displayRect.x(),
+ m_displayRect.y(),
+ m_displayRect.width(),
+ m_displayRect.height())];
+ }
+
+}
+
+bool QT7MovieViewOutput::isFullScreen() const
+{
+ return m_fullscreen;
+}
+
+void QT7MovieViewOutput::setFullScreen(bool fullScreen)
+{
+ m_fullscreen = fullScreen;
+ setDisplayRect(m_displayRect);
+}
+
+void QT7MovieViewOutput::repaint()
+{
+}
+
+QSize QT7MovieViewOutput::nativeSize() const
+{
+ return m_nativeSize;
+}
+
+QVideoWidget::AspectRatioMode QT7MovieViewOutput::aspectRatioMode() const
+{
+ return m_aspectRatioMode;
+}
+
+void QT7MovieViewOutput::setAspectRatioMode(QVideoWidget::AspectRatioMode mode)
+{
+ m_aspectRatioMode = mode;
+ setDisplayRect(m_displayRect);
+}
+
+int QT7MovieViewOutput::brightness() const
+{
+ return m_brightness;
+}
+
+void QT7MovieViewOutput::setBrightness(int brightness)
+{
+ m_brightness = brightness;
+}
+
+int QT7MovieViewOutput::contrast() const
+{
+ return m_contrast;
+}
+
+void QT7MovieViewOutput::setContrast(int contrast)
+{
+ m_contrast = contrast;
+ [(TransparentQTMovieView*)m_movieView setContrast:(contrast/100.0+1.0)];
+}
+
+int QT7MovieViewOutput::hue() const
+{
+ return m_hue;
+}
+
+void QT7MovieViewOutput::setHue(int hue)
+{
+ m_hue = hue;
+}
+
+int QT7MovieViewOutput::saturation() const
+{
+ return m_saturation;
+}
+
+void QT7MovieViewOutput::setSaturation(int saturation)
+{
+ m_saturation = saturation;
+}
diff --git a/src/plugins/mediaservices/qt7/qt7movieviewrenderer.h b/src/plugins/mediaservices/qt7/qt7movieviewrenderer.h
new file mode 100644
index 0000000000..336006cb1a
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/qt7movieviewrenderer.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT7MOVIEVIEWRENDERER_H
+#define QT7MOVIEVIEWRENDERER_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qmutex.h>
+
+#include <QtMultimedia/qvideowindowcontrol.h>
+#include <QtMultimedia/qmediaplayer.h>
+
+#include <QtGui/qmacdefines_mac.h>
+#include "qt7videooutputcontrol.h"
+#include <QtMultimedia/qvideoframe.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+
+class QVideoFrame;
+class QT7PlayerSession;
+class QT7PlayerService;
+
+class QT7MovieViewRenderer : public QT7VideoRendererControl
+{
+public:
+ QT7MovieViewRenderer(QObject *parent = 0);
+ ~QT7MovieViewRenderer();
+
+ void setEnabled(bool);
+ void setMovie(void *movie);
+ void updateNaturalSize(const QSize &newSize);
+
+ QAbstractVideoSurface *surface() const;
+ void setSurface(QAbstractVideoSurface *surface);
+
+ void renderFrame(const QVideoFrame &);
+
+protected:
+ bool event(QEvent *event);
+
+private:
+ void setupVideoOutput();
+
+ void *m_movie;
+ void *m_movieView;
+ QSize m_nativeSize;
+ QAbstractVideoSurface *m_surface;
+ QVideoFrame m_currentFrame;
+ QMutex m_mutex;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm b/src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm
new file mode 100644
index 0000000000..50478535f0
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm
@@ -0,0 +1,352 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#import <QTKit/QTKit.h>
+
+#include "qt7backend.h"
+
+#include "qt7playercontrol.h"
+#include "qt7movieviewrenderer.h"
+#include "qt7playersession.h"
+#include <QtCore/qdebug.h>
+#include <QtCore/qcoreevent.h>
+#include <QtCore/qcoreapplication.h>
+
+#include <QtMultimedia/qabstractvideobuffer.h>
+#include <QtMultimedia/qabstractvideosurface.h>
+#include <QtMultimedia/qvideosurfaceformat.h>
+
+
+QT_BEGIN_NAMESPACE
+
+class NSBitmapVideoBuffer : public QAbstractVideoBuffer
+{
+public:
+ NSBitmapVideoBuffer(NSBitmapImageRep *buffer)
+ : QAbstractVideoBuffer(NoHandle)
+ , m_buffer(buffer)
+ , m_mode(NotMapped)
+ {
+ [m_buffer retain];
+ }
+
+ virtual ~NSBitmapVideoBuffer()
+ {
+ [m_buffer release];
+ }
+
+ MapMode mapMode() const { return m_mode; }
+
+ uchar *map(MapMode mode, int *numBytes, int *bytesPerLine)
+ {
+ if (mode != NotMapped && m_mode == NotMapped) {
+ if (numBytes)
+ *numBytes = [m_buffer bytesPerPlane];
+
+ if (bytesPerLine)
+ *bytesPerLine = [m_buffer bytesPerRow];
+
+ m_mode = mode;
+
+ return [m_buffer bitmapData];
+ } else {
+ return 0;
+ }
+ }
+
+ void unmap() { m_mode = NotMapped; }
+
+private:
+ NSBitmapImageRep *m_buffer;
+ MapMode m_mode;
+};
+
+QT_END_NAMESPACE
+
+#define VIDEO_TRANSPARENT(m) -(void)m:(NSEvent *)e{[[self superview] m:e];}
+
+@interface HiddenQTMovieView : QTMovieView
+{
+@private
+ QWidget *m_window;
+ QT7MovieViewRenderer *m_renderer;
+}
+
+- (HiddenQTMovieView *) initWithRenderer:(QT7MovieViewRenderer *)renderer;
+- (void) setRenderer:(QT7MovieViewRenderer *)renderer;
+- (void) setDrawRect:(const QRect &)rect;
+@end
+
+@implementation HiddenQTMovieView
+
+- (HiddenQTMovieView *) initWithRenderer:(QT7MovieViewRenderer *)renderer
+{
+ self = [super initWithFrame:NSZeroRect];
+ if (self) {
+ [self setControllerVisible:NO];
+ [self setDelegate:self];
+
+ self->m_renderer = renderer;
+
+ self->m_window = new QWidget;
+ self->m_window->setWindowOpacity(0.0);
+ self->m_window->show();
+ self->m_window->hide();
+
+ [(NSView *)(self->m_window->winId()) addSubview:self];
+ [self setDrawRect:QRect(0,0,1,1)];
+ }
+ return self;
+}
+
+- (void) dealloc
+{
+ [super dealloc];
+}
+
+- (void) setRenderer:(QT7MovieViewRenderer *)renderer
+{
+ m_renderer = renderer;
+}
+
+- (void) setDrawRect:(const QRect &)rect
+{
+ NSRect nsrect;
+ nsrect.origin.x = rect.x();
+ nsrect.origin.y = rect.y();
+ nsrect.size.width = rect.width();
+ nsrect.size.height = rect.height();
+ [self setFrame:nsrect];
+}
+
+- (CIImage *) view:(QTMovieView *)view willDisplayImage:(CIImage *)img
+{
+ // This method is called from QTMovieView just
+ // before the image will be drawn.
+ Q_UNUSED(view);
+ if (m_renderer) {
+ NSBitmapImageRep *bitmap = [[NSBitmapImageRep alloc] initWithCIImage:img];
+ CGRect bounds = [img extent];
+ int w = bounds.size.width;
+ int h = bounds.size.height;
+
+ // Swap red and blue (same as QImage::rgbSwapped, but without copy)
+ uchar *data = [bitmap bitmapData];
+ //qDebug() << data << w << h;
+ int bytesPerLine = [bitmap bytesPerRow];
+ for (int i=0; i<h; ++i) {
+ quint32 *p = (quint32*)data;
+ data += bytesPerLine;
+ quint32 *end = p + w;
+ while (p < end) {
+ *p = ((*p << 16) & 0xff0000) | ((*p >> 16) & 0xff) | (*p & 0xff00ff00);
+ p++;
+ }
+ }
+
+ QVideoFrame frame( new NSBitmapVideoBuffer(bitmap), QSize(w,h), QVideoFrame::Format_RGB32 );
+
+ //static int i=0;
+ //i++;
+ //QImage img([bitmap bitmapData], w, h, QImage::Format_RGB32);
+ //img.save(QString("img%1.jpg").arg(i));
+
+ [bitmap release];
+
+ if (m_renderer)
+ m_renderer->renderFrame(frame);
+ }
+
+ return img;
+}
+
+// Override this method so that the movie doesn't stop if
+// the window becomes invisible
+- (void)viewWillMoveToWindow:(NSWindow *)newWindow
+{
+ Q_UNUSED(newWindow);
+}
+
+
+VIDEO_TRANSPARENT(mouseDown);
+VIDEO_TRANSPARENT(mouseDragged);
+VIDEO_TRANSPARENT(mouseUp);
+VIDEO_TRANSPARENT(mouseMoved);
+VIDEO_TRANSPARENT(mouseEntered);
+VIDEO_TRANSPARENT(mouseExited);
+VIDEO_TRANSPARENT(rightMouseDown);
+VIDEO_TRANSPARENT(rightMouseDragged);
+VIDEO_TRANSPARENT(rightMouseUp);
+VIDEO_TRANSPARENT(otherMouseDown);
+VIDEO_TRANSPARENT(otherMouseDragged);
+VIDEO_TRANSPARENT(otherMouseUp);
+VIDEO_TRANSPARENT(keyDown);
+VIDEO_TRANSPARENT(keyUp);
+VIDEO_TRANSPARENT(scrollWheel)
+
+@end
+
+QT_BEGIN_NAMESPACE
+
+QT7MovieViewRenderer::QT7MovieViewRenderer(QObject *parent)
+ :QT7VideoRendererControl(parent),
+ m_movie(0),
+ m_movieView(0),
+ m_surface(0)
+{
+}
+
+QT7MovieViewRenderer::~QT7MovieViewRenderer()
+{
+ [(HiddenQTMovieView*)m_movieView setRenderer:0];
+
+ QMutexLocker locker(&m_mutex);
+ m_currentFrame = QVideoFrame();
+ [(HiddenQTMovieView*)m_movieView release];
+}
+
+void QT7MovieViewRenderer::setupVideoOutput()
+{
+ AutoReleasePool pool;
+
+// qDebug() << "QT7MovieViewRenderer::setupVideoOutput" << m_movie << m_surface;
+
+ HiddenQTMovieView *movieView = (HiddenQTMovieView*)m_movieView;
+
+ if (movieView && !m_movie) {
+ [movieView setMovie:nil];
+ }
+
+ if (m_movie) {
+ NSSize size = [[(QTMovie*)m_movie attributeForKey:@"QTMovieNaturalSizeAttribute"] sizeValue];
+
+ m_nativeSize = QSize(size.width, size.height);
+
+ if (!movieView) {
+ movieView = [[HiddenQTMovieView alloc] initWithRenderer:this];
+ m_movieView = movieView;
+ [movieView setControllerVisible:NO];
+ }
+
+ [movieView setMovie:(QTMovie*)m_movie];
+ //[movieView setDrawRect:QRect(QPoint(0,0), m_nativeSize)];
+ }
+
+ if (m_surface && !m_nativeSize.isEmpty()) {
+ QVideoSurfaceFormat format(m_nativeSize, QVideoFrame::Format_RGB32);
+
+ if (m_surface->isActive() && m_surface->surfaceFormat() != format) {
+// qDebug() << "Surface format was changed, stop the surface.";
+ m_surface->stop();
+ }
+
+ if (!m_surface->isActive()) {
+// qDebug() << "Starting the surface with format" << format;
+ m_surface->start(format);
+// if (!m_surface->start(format))
+// qDebug() << "failed to start video surface" << m_surface->error();
+ }
+ }
+}
+
+void QT7MovieViewRenderer::setEnabled(bool)
+{
+}
+
+void QT7MovieViewRenderer::setMovie(void *movie)
+{
+ if (movie == m_movie)
+ return;
+
+ QMutexLocker locker(&m_mutex);
+ m_movie = movie;
+ setupVideoOutput();
+}
+
+void QT7MovieViewRenderer::updateNaturalSize(const QSize &newSize)
+{
+ if (m_nativeSize != newSize) {
+ m_nativeSize = newSize;
+ setupVideoOutput();
+ }
+}
+
+QAbstractVideoSurface *QT7MovieViewRenderer::surface() const
+{
+ return m_surface;
+}
+
+void QT7MovieViewRenderer::setSurface(QAbstractVideoSurface *surface)
+{
+ if (surface == m_surface)
+ return;
+
+ QMutexLocker locker(&m_mutex);
+
+ if (m_surface && m_surface->isActive())
+ m_surface->stop();
+
+ m_surface = surface;
+ setupVideoOutput();
+}
+
+void QT7MovieViewRenderer::renderFrame(const QVideoFrame &frame)
+{
+ {
+ QMutexLocker locker(&m_mutex);
+ m_currentFrame = frame;
+ }
+
+ qApp->postEvent(this, new QEvent(QEvent::User), Qt::HighEventPriority);
+}
+
+bool QT7MovieViewRenderer::event(QEvent *event)
+{
+ if (event->type() == QEvent::User) {
+ QMutexLocker locker(&m_mutex);
+ if (m_surface->isActive())
+ m_surface->present(m_currentFrame);
+ }
+
+ return QT7VideoRendererControl::event(event);
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/qt7/qt7serviceplugin.h b/src/plugins/mediaservices/qt7/qt7serviceplugin.h
new file mode 100644
index 0000000000..c5afda114d
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/qt7serviceplugin.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#ifndef QT7SERVICEPLUGIN_H
+#define QT7SERVICEPLUGIN_H
+
+#include <QtMultimedia/qmediaserviceproviderplugin.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QT7ServicePlugin : public QMediaServiceProviderPlugin
+{
+public:
+ QStringList keys() const;
+ QMediaService* create(QString const& key);
+ void release(QMediaService *service);
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QGSTREAMERSERVICEPLUGIN_H
diff --git a/src/plugins/mediaservices/qt7/qt7serviceplugin.mm b/src/plugins/mediaservices/qt7/qt7serviceplugin.mm
new file mode 100644
index 0000000000..c59a453d0b
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/qt7serviceplugin.mm
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qstring.h>
+#include <QtCore/qdebug.h>
+
+#include "qt7serviceplugin.h"
+#include "qt7playerservice.h"
+
+#include <QtMultimedia/qmediaserviceprovider.h>
+
+QT_BEGIN_NAMESPACE
+
+QStringList QT7ServicePlugin::keys() const
+{
+ return QStringList()
+#ifdef QMEDIA_QT7_PLAYER
+ << QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER);
+#endif
+}
+
+QMediaService* QT7ServicePlugin::create(QString const& key)
+{
+#ifdef QMEDIA_QT7_PLAYER
+ if (key == QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER))
+ return new QT7PlayerService;
+#endif
+
+ qWarning() << "Attempt to create unknown service with key" << key;
+ return 0;
+}
+
+void QT7ServicePlugin::release(QMediaService *service)
+{
+ delete service;
+}
+
+Q_EXPORT_PLUGIN2(qt7_serviceplugin, QT7ServicePlugin);
+
+QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/qt7/qt7videooutputcontrol.h b/src/plugins/mediaservices/qt7/qt7videooutputcontrol.h
new file mode 100644
index 0000000000..2c6091976f
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/qt7videooutputcontrol.h
@@ -0,0 +1,136 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT7VIDEOOUTPUTCONTROL_H
+#define QT7VIDEOOUTPUTCONTROL_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qsize.h>
+
+#include <QtMultimedia/qvideooutputcontrol.h>
+#include <QtMultimedia/qvideowindowcontrol.h>
+#include <QtMultimedia/qvideowidgetcontrol.h>
+#include <QtMultimedia/qvideorenderercontrol.h>
+#include <QtMultimedia/qmediaplayer.h>
+
+#include <QtGui/qmacdefines_mac.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QMediaPlaylist;
+class QMediaPlaylistNavigator;
+class QT7PlayerSession;
+class QT7PlayerService;
+
+
+class QT7VideoOutput {
+public:
+ virtual ~QT7VideoOutput() {}
+ virtual void setEnabled(bool enabled) = 0;
+ virtual void setMovie(void *movie) = 0;
+ virtual void updateNaturalSize(const QSize &newSize) = 0;
+};
+
+class QT7VideoWindowControl : public QVideoWindowControl, public QT7VideoOutput
+{
+public:
+ virtual ~QT7VideoWindowControl() {}
+
+protected:
+ QT7VideoWindowControl(QObject *parent)
+ :QVideoWindowControl(parent)
+ {}
+};
+
+class QT7VideoRendererControl : public QVideoRendererControl, public QT7VideoOutput
+{
+public:
+ virtual ~QT7VideoRendererControl() {}
+
+protected:
+ QT7VideoRendererControl(QObject *parent)
+ :QVideoRendererControl(parent)
+ {}
+};
+
+class QT7VideoWidgetControl : public QVideoWidgetControl, public QT7VideoOutput
+{
+public:
+ virtual ~QT7VideoWidgetControl() {}
+
+protected:
+ QT7VideoWidgetControl(QObject *parent)
+ :QVideoWidgetControl(parent)
+ {}
+};
+
+class QT7VideoOutputControl : public QVideoOutputControl
+{
+Q_OBJECT
+public:
+ QT7VideoOutputControl(QObject *parent = 0);
+ ~QT7VideoOutputControl();
+
+ void setSession(QT7PlayerSession *session);
+
+ QList<Output> availableOutputs() const;
+ void enableOutput(Output);
+
+ Output output() const;
+ void setOutput(Output output);
+
+signals:
+ void videoOutputChanged(QVideoOutputControl::Output);
+
+private:
+ QT7PlayerSession *m_session;
+ Output m_output;
+ QList<Output> m_outputs;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/plugins/mediaservices/qt7/qt7videooutputcontrol.mm b/src/plugins/mediaservices/qt7/qt7videooutputcontrol.mm
new file mode 100644
index 0000000000..a4684312d2
--- /dev/null
+++ b/src/plugins/mediaservices/qt7/qt7videooutputcontrol.mm
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qt7playercontrol.h"
+#include "qt7videooutputcontrol.h"
+#include "qt7playersession.h"
+#include <QtCore/qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+QT7VideoOutputControl::QT7VideoOutputControl(QObject *parent)
+ :QVideoOutputControl(parent),
+ m_session(0),
+ m_output(QVideoOutputControl::NoOutput)
+{
+}
+
+QT7VideoOutputControl::~QT7VideoOutputControl()
+{
+}
+
+void QT7VideoOutputControl::setSession(QT7PlayerSession *session)
+{
+ m_session = session;
+}
+
+QList<QVideoOutputControl::Output> QT7VideoOutputControl::availableOutputs() const
+{
+ return m_outputs;
+}
+
+void QT7VideoOutputControl::enableOutput(QVideoOutputControl::Output output)
+{
+ if (!m_outputs.contains(output))
+ m_outputs.append(output);
+}
+
+QVideoOutputControl::Output QT7VideoOutputControl::output() const
+{
+ return m_output;
+}
+
+void QT7VideoOutputControl::setOutput(Output output)
+{
+ if (m_output != output) {
+ m_output = output;
+ emit videoOutputChanged(m_output);
+ }
+
+}
+
+QT_END_NAMESPACE
+
+#include "moc_qt7videooutputcontrol.cpp"
+
diff --git a/src/plugins/phonon/ds9/ds9.pro b/src/plugins/phonon/ds9/ds9.pro
index 786338aab7..301808e508 100644
--- a/src/plugins/phonon/ds9/ds9.pro
+++ b/src/plugins/phonon/ds9/ds9.pro
@@ -22,7 +22,6 @@ HEADERS += \
$$PHONON_DS9_DIR/mediaobject.h \
$$PHONON_DS9_DIR/videowidget.h \
$$PHONON_DS9_DIR/videorenderer_soft.h \
- $$PHONON_DS9_DIR/videorenderer_vmr9.h \
$$PHONON_DS9_DIR/volumeeffect.h \
$$PHONON_DS9_DIR/qbasefilter.h \
$$PHONON_DS9_DIR/qpin.h \
@@ -45,7 +44,6 @@ SOURCES += \
$$PHONON_DS9_DIR/mediaobject.cpp \
$$PHONON_DS9_DIR/videowidget.cpp \
$$PHONON_DS9_DIR/videorenderer_soft.cpp \
- $$PHONON_DS9_DIR/videorenderer_vmr9.cpp \
$$PHONON_DS9_DIR/volumeeffect.cpp \
$$PHONON_DS9_DIR/qbasefilter.cpp \
$$PHONON_DS9_DIR/qpin.cpp \
@@ -53,6 +51,14 @@ SOURCES += \
$$PHONON_DS9_DIR/qaudiocdreader.cpp \
$$PHONON_DS9_DIR/qmeminputpin.cpp
+#the EVR renderer (only available on desktop)
+!wince*:SOURCES += $$PHONON_DS9_DIR/videorenderer_evr.cpp \
+ $$PHONON_DS9_DIR/videorenderer_vmr9.cpp
+!wince*:HEADERS += $$PHONON_DS9_DIR/qevr9.h \
+ $$PHONON_DS9_DIR/videorenderer_evr.h \
+ $$PHONON_DS9_DIR/videorenderer_vmr9.h
+wince*:SOURCES += $$PHONON_DS9_DIR/videorenderer_default.cpp
+wince*:HEADERS += $$PHONON_DS9_DIR/videorenderer_default.h
target.path = $$[QT_INSTALL_PLUGINS]/phonon_backend
INSTALLS += target
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index 004b816381..730fdc5332 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -1,6 +1,6 @@
TEMPLATE = subdirs
-SUBDIRS *= accessible imageformats sqldrivers iconengines script
+SUBDIRS *= accessible imageformats sqldrivers iconengines script bearer
unix:!symbian {
contains(QT_CONFIG,iconv)|contains(QT_CONFIG,gnu-libiconv):SUBDIRS *= codecs
} else {
@@ -11,4 +11,6 @@ embedded:SUBDIRS *= gfxdrivers decorations mousedrivers kbddrivers
!win32:!embedded:!mac:!symbian:SUBDIRS *= inputmethods
symbian:SUBDIRS += s60
contains(QT_CONFIG, phonon): SUBDIRS *= phonon
-contains(QT_CONFIG, multimedia): SUBDIRS *= audio
+contains(QT_CONFIG, multimedia): SUBDIRS *= audio mediaservices
+
+
diff --git a/src/plugins/qpluginbase.pri b/src/plugins/qpluginbase.pri
index 3fd36579c7..3dd3d2e0f4 100644
--- a/src/plugins/qpluginbase.pri
+++ b/src/plugins/qpluginbase.pri
@@ -1,6 +1,6 @@
TEMPLATE = lib
isEmpty(QT_MAJOR_VERSION) {
- VERSION=4.6.3
+ VERSION=4.7.0
} else {
VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
}
diff --git a/src/plugins/sqldrivers/psql/psql.pro b/src/plugins/sqldrivers/psql/psql.pro
index 29fbadab88..0a38ee4902 100644
--- a/src/plugins/sqldrivers/psql/psql.pro
+++ b/src/plugins/sqldrivers/psql/psql.pro
@@ -4,18 +4,15 @@ HEADERS = ../../../sql/drivers/psql/qsql_psql.h
SOURCES = main.cpp \
../../../sql/drivers/psql/qsql_psql.cpp
-unix: {
+unix|win32-g++: {
!isEmpty(QT_LFLAGS_PSQL) {
- LIBS *= $$QT_LFLAGS_PSQL
+ !contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz
+ !static:LIBS *= $$QT_LFLAGS_PSQL
QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL
}
!contains(LIBS, .*pq.*):LIBS *= -lpq
}
-win32:!contains(LIBS, .*pq.* ) {
- !win32-g++:LIBS *= -llibpq
- win32-g++:LIBS *= -lpq
- LIBS *= -lws2_32 -ladvapi32
-}
+win32:!win32-g++:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32
include(../qsqldriverbase.pri)
diff --git a/src/qbase.pri b/src/qbase.pri
index 6f2dfa4529..835ed0e679 100644
--- a/src/qbase.pri
+++ b/src/qbase.pri
@@ -4,7 +4,7 @@ INCLUDEPATH *= $$QMAKE_INCDIR_QT/$$TARGET #just for today to have some compat
isEmpty(QT_ARCH):!isEmpty(ARCH):QT_ARCH=$$ARCH #another compat that will rot for change #215700
TEMPLATE = lib
isEmpty(QT_MAJOR_VERSION) {
- VERSION=4.6.3
+ VERSION=4.7.0
} else {
VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
}
@@ -157,6 +157,7 @@ contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE
DEFINES *= QT_NO_CAST_TO_ASCII QT_ASCII_CAST_WARNINGS
contains(QT_CONFIG, qt3support):DEFINES *= QT3_SUPPORT
DEFINES *= QT_MOC_COMPAT #we don't need warnings from calling moc code in our generated code
+DEFINES *= QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION
TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end
diff --git a/src/qt3support/itemviews/q3listview.cpp b/src/qt3support/itemviews/q3listview.cpp
index 12dad84148..4900827637 100644
--- a/src/qt3support/itemviews/q3listview.cpp
+++ b/src/qt3support/itemviews/q3listview.cpp
@@ -1324,8 +1324,15 @@ void Q3ListViewItem::sortChildItems(int column, bool ascending)
const int nColumns = (listView() ? listView()->columns() : 0);
// and don't sort if we already have the right sorting order
- if (column > nColumns || childItem == 0 || childItem->siblingItem == 0)
+ if (column > nColumns || childItem == 0)
return;
+
+ // If there is just one child, just sort its children
+ if (childItem->siblingItem == 0) {
+ if (childItem->isOpen())
+ childItem->sortChildItems(column, ascending);
+ return;
+ }
// make an array for qHeapSort()
Q3ListViewPrivate::SortableItem * siblings
diff --git a/src/qt3support/other/q3process_win.cpp b/src/qt3support/other/q3process_win.cpp
index da39bdc561..9b6952034a 100644
--- a/src/qt3support/other/q3process_win.cpp
+++ b/src/qt3support/other/q3process_win.cpp
@@ -384,7 +384,7 @@ bool Q3Process::start( QStringList *env )
return true;
}
-static BOOL CALLBACK qt_terminateApp( HWND hwnd, LPARAM procId )
+static BOOL QT_WIN_CALLBACK qt_terminateApp( HWND hwnd, LPARAM procId )
{
DWORD procId_win;
GetWindowThreadProcessId( hwnd, &procId_win );
diff --git a/src/qt3support/text/q3richtext.cpp b/src/qt3support/text/q3richtext.cpp
index 21383bd105..86140769b8 100644
--- a/src/qt3support/text/q3richtext.cpp
+++ b/src/qt3support/text/q3richtext.cpp
@@ -6667,7 +6667,7 @@ Q3TextImage::Q3TextImage(Q3TextDocument *p, const QMap<QString, QString> &attr,
imageName = attr[QLatin1String("source")];
if (!imageName.isEmpty()) {
- imgId = QString::fromLatin1("%1,%2,%3,%4").arg(imageName).arg(width).arg(height).arg((ulong)&factory);
+ imgId = QString::fromLatin1("%1,%2,%3,%4").arg(imageName).arg(width).arg(height).arg((quintptr)&factory);
if (!pixmap_map)
pixmap_map = new QMap<QString, QPixmapInt>;
if (pixmap_map->contains(imgId)) {
diff --git a/src/qt3support/text/q3textedit.cpp b/src/qt3support/text/q3textedit.cpp
index 7f51bea2a7..d4f75ed697 100644
--- a/src/qt3support/text/q3textedit.cpp
+++ b/src/qt3support/text/q3textedit.cpp
@@ -6238,7 +6238,7 @@ void Q3TextEdit::optimParseTags(QString * line, int lineNo, int indexOffset)
} else {
tmp = tagStack.isEmpty() ? 0 : tagStack.pop();
if (!tmp) {
- if (((QLatin1Char('/') + cur->tag) == tag->tag) ||
+ if ((QString(QLatin1Char('/') + cur->tag) == tag->tag) ||
(tag->tag == QLatin1String("/font") && cur->tag.left(4) == QLatin1String("font"))) {
// set up the left and parent of this tag
tag->leftTag = cur;
diff --git a/src/qt3support/text/q3textstream.cpp b/src/qt3support/text/q3textstream.cpp
index 41aab4d2c3..8c86c7cb9b 100644
--- a/src/qt3support/text/q3textstream.cpp
+++ b/src/qt3support/text/q3textstream.cpp
@@ -2084,7 +2084,7 @@ Q3TextStream &Q3TextStream::operator<<( void *ptr )
setf( hex, basefield );
setf( showbase );
unsetf( uppercase );
- output_int( I_LONG | I_UNSIGNED, (ulong)ptr, FALSE );
+ output_int( I_LONG | I_UNSIGNED, (quintptr)ptr, FALSE );
flags( f );
return *this;
}
diff --git a/src/qt3support/tools/q3gcache.cpp b/src/qt3support/tools/q3gcache.cpp
index a31f827545..ada8330c1f 100644
--- a/src/qt3support/tools/q3gcache.cpp
+++ b/src/qt3support/tools/q3gcache.cpp
@@ -226,7 +226,7 @@ public:
bool remove_ascii(Q3CacheItem *item)
{ return Q3GDict::remove_ascii((const char *)item->key,item); }
bool remove_int(Q3CacheItem *item)
- { return Q3GDict::remove_int((long)item->key,item);}
+ { return Q3GDict::remove_int((quintptr)item->key,item);}
void statistics() { Q3GDict::statistics(); }
@@ -426,7 +426,7 @@ bool Q3GCache::insert_other(const char *key, Q3PtrCollection::Item data,
if (keytype == AsciiKey)
dict->insert_ascii(key, ci);
else
- dict->insert_int((long)key, ci);
+ dict->insert_int((quintptr)key, ci);
tCost += cost;
return true;
}
@@ -486,7 +486,7 @@ Q3PtrCollection::Item Q3GCache::take_other(const char *key)
if (keytype == AsciiKey)
ci = dict->take_ascii(key);
else
- ci = dict->take_int((long)key);
+ ci = dict->take_int((quintptr)key);
Item d;
if (ci) {
d = ci->data;
@@ -563,7 +563,7 @@ Q3PtrCollection::Item Q3GCache::find_string(const QString &key, bool ref) const
Q3PtrCollection::Item Q3GCache::find_other(const char *key, bool ref) const
{
Q3CacheItem *ci = keytype == AsciiKey ? dict->find_ascii(key)
- : dict->find_int((long)key);
+ : dict->find_int((quintptr)key);
#if defined(QT_DEBUG)
lruList->finds++;
#endif
@@ -811,7 +811,7 @@ const char *Q3GCacheIterator::getKeyAscii() const
long Q3GCacheIterator::getKeyInt() const
{
Q3CacheItem *item = it->current();
- return item ? (long)item->key : 0;
+ return item ? (quintptr)item->key : 0;
}
/*!
diff --git a/src/qt3support/tools/q3gdict.cpp b/src/qt3support/tools/q3gdict.cpp
index a968407950..e8144feb79 100644
--- a/src/qt3support/tools/q3gdict.cpp
+++ b/src/qt3support/tools/q3gdict.cpp
@@ -437,7 +437,7 @@ Q3PtrCollection::Item Q3GDict::look_int(long key, Q3PtrCollection::Item d, int o
Q3PtrCollection::Item Q3GDict::look_ptr(void *key, Q3PtrCollection::Item d, int op)
{
Q3PtrBucket *n;
- int index = (int)((ulong)key % vlen); // simple hash
+ int index = (int)((quintptr)key % vlen); // simple hash
if (op == op_find) { // find
for (n=(Q3PtrBucket*)vec[index]; n;
n=(Q3PtrBucket*)n->getNext()) {
@@ -650,7 +650,7 @@ Q3PtrBucket *Q3GDict::unlink_ptr(void *key, Q3PtrCollection::Item d)
return 0;
Q3PtrBucket *n;
Q3PtrBucket *prev = 0;
- int index = (int)((ulong)key % vlen);
+ int index = (int)((quintptr)key % vlen);
for (n=(Q3PtrBucket *)vec[index]; n; n=(Q3PtrBucket *)n->getNext()) {
bool found = (n->getKey() == key);
if (found && d)
diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def
index e7e890c45a..56f061063e 100644
--- a/src/s60installs/bwins/QtCoreu.def
+++ b/src/s60installs/bwins/QtCoreu.def
@@ -4399,4 +4399,22 @@ EXPORTS
?sender@SignalEvent@QStateMachine@@QBEPAVQObject@@XZ @ 4398 NONAME ; class QObject * QStateMachine::SignalEvent::sender(void) const
?signalIndex@SignalEvent@QStateMachine@@QBEHXZ @ 4399 NONAME ; int QStateMachine::SignalEvent::signalIndex(void) const
?disconnectOne@QMetaObject@@SA_NPBVQObject@@H0H@Z @ 4400 NONAME ; bool QMetaObject::disconnectOne(class QObject const *, int, class QObject const *, int)
+ ??0QString@@QAE@PBVQChar@@@Z @ 4401 NONAME ; QString::QString(class QChar const *)
+ ??0QTextDecoder@@QAE@PBVQTextCodec@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4402 NONAME ; QTextDecoder::QTextDecoder(class QTextCodec const *, class QFlags<enum QTextCodec::ConversionFlag>)
+ ??0QTextEncoder@@QAE@PBVQTextCodec@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4403 NONAME ; QTextEncoder::QTextEncoder(class QTextCodec const *, class QFlags<enum QTextCodec::ConversionFlag>)
+ ??0QVariant@@QAE@ABVQEasingCurve@@@Z @ 4404 NONAME ; QVariant::QVariant(class QEasingCurve const &)
+ ??5@YAAAVQDataStream@@AAV0@AAVQEasingCurve@@@Z @ 4405 NONAME ; class QDataStream & operator>>(class QDataStream &, class QEasingCurve &)
+ ??6@YAAAVQDataStream@@AAV0@ABVQEasingCurve@@@Z @ 4406 NONAME ; class QDataStream & operator<<(class QDataStream &, class QEasingCurve const &)
+ ?append@QListData@@QAEPAPAXH@Z @ 4407 NONAME ; void * * QListData::append(int)
+ ?detach@QListData@@QAEPAUData@1@H@Z @ 4408 NONAME ; struct QListData::Data * QListData::detach(int)
+ ?detach_grow@QListData@@QAEPAUData@1@PAHH@Z @ 4409 NONAME ; struct QListData::Data * QListData::detach_grow(int *, int)
+ ?isSharedWith@QByteArray@@QBE_NABV1@@Z @ 4410 NONAME ; bool QByteArray::isSharedWith(class QByteArray const &) const
+ ?isSharedWith@QString@@QBE_NABV1@@Z @ 4411 NONAME ; bool QString::isSharedWith(class QString const &) const
+ ?makeDecoder@QTextCodec@@QBEPAVQTextDecoder@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4412 NONAME ; class QTextDecoder * QTextCodec::makeDecoder(class QFlags<enum QTextCodec::ConversionFlag>) const
+ ?makeEncoder@QTextCodec@@QBEPAVQTextEncoder@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4413 NONAME ; class QTextEncoder * QTextCodec::makeEncoder(class QFlags<enum QTextCodec::ConversionFlag>) const
+ ?qDecodeDataUrl@@YA?AU?$QPair@VQString@@VQByteArray@@@@ABVQUrl@@@Z @ 4414 NONAME ; struct QPair<class QString, class QByteArray> qDecodeDataUrl(class QUrl const &)
+ ?qDetectCPUFeatures@@YAIXZ @ 4415 NONAME ; unsigned int qDetectCPUFeatures(void)
+ ?registerStreamOperators@QMetaType@@SAXHP6AXAAVQDataStream@@PBX@ZP6AX0PAX@Z@Z @ 4416 NONAME ; void QMetaType::registerStreamOperators(int, void (*)(class QDataStream &, void const *), void (*)(class QDataStream &, void *))
+ ?replace@QByteArray@@QAEAAV1@HHPBDH@Z @ 4417 NONAME ; class QByteArray & QByteArray::replace(int, int, char const *, int)
+ ?toEasingCurve@QVariant@@QBE?AVQEasingCurve@@XZ @ 4418 NONAME ; class QEasingCurve QVariant::toEasingCurve(void) const
diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def
new file mode 100644
index 0000000000..ba8d183072
--- /dev/null
+++ b/src/s60installs/bwins/QtDeclarativeu.def
@@ -0,0 +1,3499 @@
+EXPORTS
+ ??0QDeclarativeAction@@QAE@ABV0@@Z @ 1 NONAME ; QDeclarativeAction::QDeclarativeAction(class QDeclarativeAction const &)
+ ??0QDeclarativeAction@@QAE@PAVQObject@@ABVQString@@ABVQVariant@@@Z @ 2 NONAME ; QDeclarativeAction::QDeclarativeAction(class QObject *, class QString const &, class QVariant const &)
+ ??0QDeclarativeAction@@QAE@XZ @ 3 NONAME ; QDeclarativeAction::QDeclarativeAction(void)
+ ??0QDeclarativeAnchorChanges@@QAE@PAVQObject@@@Z @ 4 NONAME ; QDeclarativeAnchorChanges::QDeclarativeAnchorChanges(class QObject *)
+ ??0QDeclarativeAnchors@@QAE@PAVQDeclarativeItem@@PAVQObject@@@Z @ 5 NONAME ; QDeclarativeAnchors::QDeclarativeAnchors(class QDeclarativeItem *, class QObject *)
+ ??0QDeclarativeAnchors@@QAE@PAVQObject@@@Z @ 6 NONAME ; QDeclarativeAnchors::QDeclarativeAnchors(class QObject *)
+ ??0QDeclarativeAnimatedImage@@QAE@PAVQDeclarativeItem@@@Z @ 7 NONAME ; QDeclarativeAnimatedImage::QDeclarativeAnimatedImage(class QDeclarativeItem *)
+ ??0QDeclarativeBasePositioner@@IAE@AAVQDeclarativeBasePositionerPrivate@@W4PositionerType@0@PAVQDeclarativeItem@@@Z @ 8 NONAME ; QDeclarativeBasePositioner::QDeclarativeBasePositioner(class QDeclarativeBasePositionerPrivate &, enum QDeclarativeBasePositioner::PositionerType, class QDeclarativeItem *)
+ ??0QDeclarativeBasePositioner@@QAE@W4PositionerType@0@PAVQDeclarativeItem@@@Z @ 9 NONAME ; QDeclarativeBasePositioner::QDeclarativeBasePositioner(enum QDeclarativeBasePositioner::PositionerType, class QDeclarativeItem *)
+ ??0QDeclarativeBehavior@@QAE@PAVQObject@@@Z @ 10 NONAME ; QDeclarativeBehavior::QDeclarativeBehavior(class QObject *)
+ ??0QDeclarativeBind@@QAE@PAVQObject@@@Z @ 11 NONAME ; QDeclarativeBind::QDeclarativeBind(class QObject *)
+ ??0QDeclarativeBorderImage@@QAE@PAVQDeclarativeItem@@@Z @ 12 NONAME ; QDeclarativeBorderImage::QDeclarativeBorderImage(class QDeclarativeItem *)
+ ??0QDeclarativeColumn@@QAE@PAVQDeclarativeItem@@@Z @ 13 NONAME ; QDeclarativeColumn::QDeclarativeColumn(class QDeclarativeItem *)
+ ??0QDeclarativeCompiler@@QAE@XZ @ 14 NONAME ; QDeclarativeCompiler::QDeclarativeCompiler(void)
+ ??0QDeclarativeComponent@@AAE@PAVQDeclarativeEngine@@PAVQDeclarativeCompiledData@@HHPAVQObject@@@Z @ 15 NONAME ; QDeclarativeComponent::QDeclarativeComponent(class QDeclarativeEngine *, class QDeclarativeCompiledData *, int, int, class QObject *)
+ ??0QDeclarativeComponent@@IAE@AAVQDeclarativeComponentPrivate@@PAVQObject@@@Z @ 16 NONAME ; QDeclarativeComponent::QDeclarativeComponent(class QDeclarativeComponentPrivate &, class QObject *)
+ ??0QDeclarativeComponent@@QAE@PAVQDeclarativeEngine@@ABVQString@@PAVQObject@@@Z @ 17 NONAME ; QDeclarativeComponent::QDeclarativeComponent(class QDeclarativeEngine *, class QString const &, class QObject *)
+ ??0QDeclarativeComponent@@QAE@PAVQDeclarativeEngine@@ABVQUrl@@PAVQObject@@@Z @ 18 NONAME ; QDeclarativeComponent::QDeclarativeComponent(class QDeclarativeEngine *, class QUrl const &, class QObject *)
+ ??0QDeclarativeComponent@@QAE@PAVQDeclarativeEngine@@PAVQObject@@@Z @ 19 NONAME ; QDeclarativeComponent::QDeclarativeComponent(class QDeclarativeEngine *, class QObject *)
+ ??0QDeclarativeComponent@@QAE@PAVQObject@@@Z @ 20 NONAME ; QDeclarativeComponent::QDeclarativeComponent(class QObject *)
+ ??0QDeclarativeConnections@@QAE@PAVQObject@@@Z @ 21 NONAME ; QDeclarativeConnections::QDeclarativeConnections(class QObject *)
+ ??0QDeclarativeContext@@AAE@PAV0@PAVQObject@@_N@Z @ 22 NONAME ; QDeclarativeContext::QDeclarativeContext(class QDeclarativeContext *, class QObject *, bool)
+ ??0QDeclarativeContext@@AAE@PAVQDeclarativeEngine@@_N@Z @ 23 NONAME ; QDeclarativeContext::QDeclarativeContext(class QDeclarativeEngine *, bool)
+ ??0QDeclarativeContext@@QAE@PAV0@PAVQObject@@@Z @ 24 NONAME ; QDeclarativeContext::QDeclarativeContext(class QDeclarativeContext *, class QObject *)
+ ??0QDeclarativeContext@@QAE@PAVQDeclarativeEngine@@PAVQObject@@@Z @ 25 NONAME ; QDeclarativeContext::QDeclarativeContext(class QDeclarativeEngine *, class QObject *)
+ ??0QDeclarativeContextPrivate@@QAE@XZ @ 26 NONAME ; QDeclarativeContextPrivate::QDeclarativeContextPrivate(void)
+ ??0QDeclarativeCurve@@QAE@PAVQObject@@@Z @ 27 NONAME ; QDeclarativeCurve::QDeclarativeCurve(class QObject *)
+ ??0QDeclarativeCustomParserNode@@QAE@ABV0@@Z @ 28 NONAME ; QDeclarativeCustomParserNode::QDeclarativeCustomParserNode(class QDeclarativeCustomParserNode const &)
+ ??0QDeclarativeCustomParserNode@@QAE@XZ @ 29 NONAME ; QDeclarativeCustomParserNode::QDeclarativeCustomParserNode(void)
+ ??0QDeclarativeCustomParserProperty@@QAE@ABV0@@Z @ 30 NONAME ; QDeclarativeCustomParserProperty::QDeclarativeCustomParserProperty(class QDeclarativeCustomParserProperty const &)
+ ??0QDeclarativeCustomParserProperty@@QAE@XZ @ 31 NONAME ; QDeclarativeCustomParserProperty::QDeclarativeCustomParserProperty(void)
+ ??0QDeclarativeDateTimeFormatter@@QAE@PAVQObject@@@Z @ 32 NONAME ; QDeclarativeDateTimeFormatter::QDeclarativeDateTimeFormatter(class QObject *)
+ ??0QDeclarativeDebugClient@@QAE@ABVQString@@PAVQDeclarativeDebugConnection@@@Z @ 33 NONAME ; QDeclarativeDebugClient::QDeclarativeDebugClient(class QString const &, class QDeclarativeDebugConnection *)
+ ??0QDeclarativeDebugConnection@@QAE@PAVQObject@@@Z @ 34 NONAME ; QDeclarativeDebugConnection::QDeclarativeDebugConnection(class QObject *)
+ ??0QDeclarativeDebugContextReference@@QAE@ABV0@@Z @ 35 NONAME ; QDeclarativeDebugContextReference::QDeclarativeDebugContextReference(class QDeclarativeDebugContextReference const &)
+ ??0QDeclarativeDebugContextReference@@QAE@XZ @ 36 NONAME ; QDeclarativeDebugContextReference::QDeclarativeDebugContextReference(void)
+ ??0QDeclarativeDebugEngineReference@@QAE@ABV0@@Z @ 37 NONAME ; QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference(class QDeclarativeDebugEngineReference const &)
+ ??0QDeclarativeDebugEngineReference@@QAE@H@Z @ 38 NONAME ; QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference(int)
+ ??0QDeclarativeDebugEngineReference@@QAE@XZ @ 39 NONAME ; QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference(void)
+ ??0QDeclarativeDebugEnginesQuery@@AAE@PAVQObject@@@Z @ 40 NONAME ; QDeclarativeDebugEnginesQuery::QDeclarativeDebugEnginesQuery(class QObject *)
+ ??0QDeclarativeDebugExpressionQuery@@AAE@PAVQObject@@@Z @ 41 NONAME ; QDeclarativeDebugExpressionQuery::QDeclarativeDebugExpressionQuery(class QObject *)
+ ??0QDeclarativeDebugFileReference@@QAE@ABV0@@Z @ 42 NONAME ; QDeclarativeDebugFileReference::QDeclarativeDebugFileReference(class QDeclarativeDebugFileReference const &)
+ ??0QDeclarativeDebugFileReference@@QAE@XZ @ 43 NONAME ; QDeclarativeDebugFileReference::QDeclarativeDebugFileReference(void)
+ ??0QDeclarativeDebugObjectExpressionWatch@@QAE@PAVQObject@@@Z @ 44 NONAME ; QDeclarativeDebugObjectExpressionWatch::QDeclarativeDebugObjectExpressionWatch(class QObject *)
+ ??0QDeclarativeDebugObjectQuery@@AAE@PAVQObject@@@Z @ 45 NONAME ; QDeclarativeDebugObjectQuery::QDeclarativeDebugObjectQuery(class QObject *)
+ ??0QDeclarativeDebugObjectReference@@QAE@ABV0@@Z @ 46 NONAME ; QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference(class QDeclarativeDebugObjectReference const &)
+ ??0QDeclarativeDebugObjectReference@@QAE@H@Z @ 47 NONAME ; QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference(int)
+ ??0QDeclarativeDebugObjectReference@@QAE@XZ @ 48 NONAME ; QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference(void)
+ ??0QDeclarativeDebugPropertyReference@@QAE@ABV0@@Z @ 49 NONAME ; QDeclarativeDebugPropertyReference::QDeclarativeDebugPropertyReference(class QDeclarativeDebugPropertyReference const &)
+ ??0QDeclarativeDebugPropertyReference@@QAE@XZ @ 50 NONAME ; QDeclarativeDebugPropertyReference::QDeclarativeDebugPropertyReference(void)
+ ??0QDeclarativeDebugPropertyWatch@@QAE@PAVQObject@@@Z @ 51 NONAME ; QDeclarativeDebugPropertyWatch::QDeclarativeDebugPropertyWatch(class QObject *)
+ ??0QDeclarativeDebugQuery@@IAE@PAVQObject@@@Z @ 52 NONAME ; QDeclarativeDebugQuery::QDeclarativeDebugQuery(class QObject *)
+ ??0QDeclarativeDebugRootContextQuery@@AAE@PAVQObject@@@Z @ 53 NONAME ; QDeclarativeDebugRootContextQuery::QDeclarativeDebugRootContextQuery(class QObject *)
+ ??0QDeclarativeDebugService@@QAE@ABVQString@@PAVQObject@@@Z @ 54 NONAME ; QDeclarativeDebugService::QDeclarativeDebugService(class QString const &, class QObject *)
+ ??0QDeclarativeDebugWatch@@QAE@PAVQObject@@@Z @ 55 NONAME ; QDeclarativeDebugWatch::QDeclarativeDebugWatch(class QObject *)
+ ??0QDeclarativeDomComponent@@QAE@ABV0@@Z @ 56 NONAME ; QDeclarativeDomComponent::QDeclarativeDomComponent(class QDeclarativeDomComponent const &)
+ ??0QDeclarativeDomComponent@@QAE@XZ @ 57 NONAME ; QDeclarativeDomComponent::QDeclarativeDomComponent(void)
+ ??0QDeclarativeDomDocument@@QAE@ABV0@@Z @ 58 NONAME ; QDeclarativeDomDocument::QDeclarativeDomDocument(class QDeclarativeDomDocument const &)
+ ??0QDeclarativeDomDocument@@QAE@XZ @ 59 NONAME ; QDeclarativeDomDocument::QDeclarativeDomDocument(void)
+ ??0QDeclarativeDomDynamicProperty@@QAE@ABV0@@Z @ 60 NONAME ; QDeclarativeDomDynamicProperty::QDeclarativeDomDynamicProperty(class QDeclarativeDomDynamicProperty const &)
+ ??0QDeclarativeDomDynamicProperty@@QAE@XZ @ 61 NONAME ; QDeclarativeDomDynamicProperty::QDeclarativeDomDynamicProperty(void)
+ ??0QDeclarativeDomImport@@QAE@ABV0@@Z @ 62 NONAME ; QDeclarativeDomImport::QDeclarativeDomImport(class QDeclarativeDomImport const &)
+ ??0QDeclarativeDomImport@@QAE@XZ @ 63 NONAME ; QDeclarativeDomImport::QDeclarativeDomImport(void)
+ ??0QDeclarativeDomList@@QAE@ABV0@@Z @ 64 NONAME ; QDeclarativeDomList::QDeclarativeDomList(class QDeclarativeDomList const &)
+ ??0QDeclarativeDomList@@QAE@XZ @ 65 NONAME ; QDeclarativeDomList::QDeclarativeDomList(void)
+ ??0QDeclarativeDomObject@@QAE@ABV0@@Z @ 66 NONAME ; QDeclarativeDomObject::QDeclarativeDomObject(class QDeclarativeDomObject const &)
+ ??0QDeclarativeDomObject@@QAE@XZ @ 67 NONAME ; QDeclarativeDomObject::QDeclarativeDomObject(void)
+ ??0QDeclarativeDomProperty@@QAE@ABV0@@Z @ 68 NONAME ; QDeclarativeDomProperty::QDeclarativeDomProperty(class QDeclarativeDomProperty const &)
+ ??0QDeclarativeDomProperty@@QAE@XZ @ 69 NONAME ; QDeclarativeDomProperty::QDeclarativeDomProperty(void)
+ ??0QDeclarativeDomValue@@QAE@ABV0@@Z @ 70 NONAME ; QDeclarativeDomValue::QDeclarativeDomValue(class QDeclarativeDomValue const &)
+ ??0QDeclarativeDomValue@@QAE@XZ @ 71 NONAME ; QDeclarativeDomValue::QDeclarativeDomValue(void)
+ ??0QDeclarativeDomValueBinding@@QAE@ABV0@@Z @ 72 NONAME ; QDeclarativeDomValueBinding::QDeclarativeDomValueBinding(class QDeclarativeDomValueBinding const &)
+ ??0QDeclarativeDomValueBinding@@QAE@XZ @ 73 NONAME ; QDeclarativeDomValueBinding::QDeclarativeDomValueBinding(void)
+ ??0QDeclarativeDomValueLiteral@@QAE@ABV0@@Z @ 74 NONAME ; QDeclarativeDomValueLiteral::QDeclarativeDomValueLiteral(class QDeclarativeDomValueLiteral const &)
+ ??0QDeclarativeDomValueLiteral@@QAE@XZ @ 75 NONAME ; QDeclarativeDomValueLiteral::QDeclarativeDomValueLiteral(void)
+ ??0QDeclarativeDomValueValueInterceptor@@QAE@ABV0@@Z @ 76 NONAME ; QDeclarativeDomValueValueInterceptor::QDeclarativeDomValueValueInterceptor(class QDeclarativeDomValueValueInterceptor const &)
+ ??0QDeclarativeDomValueValueInterceptor@@QAE@XZ @ 77 NONAME ; QDeclarativeDomValueValueInterceptor::QDeclarativeDomValueValueInterceptor(void)
+ ??0QDeclarativeDomValueValueSource@@QAE@ABV0@@Z @ 78 NONAME ; QDeclarativeDomValueValueSource::QDeclarativeDomValueValueSource(class QDeclarativeDomValueValueSource const &)
+ ??0QDeclarativeDomValueValueSource@@QAE@XZ @ 79 NONAME ; QDeclarativeDomValueValueSource::QDeclarativeDomValueValueSource(void)
+ ??0QDeclarativeDrag@@QAE@PAVQObject@@@Z @ 80 NONAME ; QDeclarativeDrag::QDeclarativeDrag(class QObject *)
+ ??0QDeclarativeEaseFollow@@QAE@PAVQObject@@@Z @ 81 NONAME ; QDeclarativeEaseFollow::QDeclarativeEaseFollow(class QObject *)
+ ??0QDeclarativeEngine@@QAE@PAVQObject@@@Z @ 82 NONAME ; QDeclarativeEngine::QDeclarativeEngine(class QObject *)
+ ??0QDeclarativeEngineDebug@@QAE@PAVQDeclarativeDebugConnection@@PAVQObject@@@Z @ 83 NONAME ; QDeclarativeEngineDebug::QDeclarativeEngineDebug(class QDeclarativeDebugConnection *, class QObject *)
+ ??0QDeclarativeError@@QAE@ABV0@@Z @ 84 NONAME ; QDeclarativeError::QDeclarativeError(class QDeclarativeError const &)
+ ??0QDeclarativeError@@QAE@XZ @ 85 NONAME ; QDeclarativeError::QDeclarativeError(void)
+ ??0QDeclarativeExpression@@IAE@PAVQDeclarativeContext@@ABVQString@@PAVQObject@@AAVQDeclarativeExpressionPrivate@@@Z @ 86 NONAME ; QDeclarativeExpression::QDeclarativeExpression(class QDeclarativeContext *, class QString const &, class QObject *, class QDeclarativeExpressionPrivate &)
+ ??0QDeclarativeExpression@@IAE@PAVQDeclarativeContext@@PAXPAVQDeclarativeRefCount@@PAVQObject@@ABVQString@@HAAVQDeclarativeExpressionPrivate@@@Z @ 87 NONAME ; QDeclarativeExpression::QDeclarativeExpression(class QDeclarativeContext *, void *, class QDeclarativeRefCount *, class QObject *, class QString const &, int, class QDeclarativeExpressionPrivate &)
+ ??0QDeclarativeExpression@@QAE@PAVQDeclarativeContext@@ABVQString@@PAVQObject@@@Z @ 88 NONAME ; QDeclarativeExpression::QDeclarativeExpression(class QDeclarativeContext *, class QString const &, class QObject *)
+ ??0QDeclarativeExpression@@QAE@XZ @ 89 NONAME ; QDeclarativeExpression::QDeclarativeExpression(void)
+ ??0QDeclarativeExtensionPlugin@@QAE@PAVQObject@@@Z @ 90 NONAME ; QDeclarativeExtensionPlugin::QDeclarativeExtensionPlugin(class QObject *)
+ ??0QDeclarativeFlickable@@IAE@AAVQDeclarativeFlickablePrivate@@PAVQDeclarativeItem@@@Z @ 91 NONAME ; QDeclarativeFlickable::QDeclarativeFlickable(class QDeclarativeFlickablePrivate &, class QDeclarativeItem *)
+ ??0QDeclarativeFlickable@@QAE@PAVQDeclarativeItem@@@Z @ 92 NONAME ; QDeclarativeFlickable::QDeclarativeFlickable(class QDeclarativeItem *)
+ ??0QDeclarativeFlipable@@QAE@PAVQDeclarativeItem@@@Z @ 93 NONAME ; QDeclarativeFlipable::QDeclarativeFlipable(class QDeclarativeItem *)
+ ??0QDeclarativeFlow@@QAE@PAVQDeclarativeItem@@@Z @ 94 NONAME ; QDeclarativeFlow::QDeclarativeFlow(class QDeclarativeItem *)
+ ??0QDeclarativeFocusPanel@@QAE@PAVQDeclarativeItem@@@Z @ 95 NONAME ; QDeclarativeFocusPanel::QDeclarativeFocusPanel(class QDeclarativeItem *)
+ ??0QDeclarativeFocusScope@@QAE@PAVQDeclarativeItem@@@Z @ 96 NONAME ; QDeclarativeFocusScope::QDeclarativeFocusScope(class QDeclarativeItem *)
+ ??0QDeclarativeFontLoader@@QAE@PAVQObject@@@Z @ 97 NONAME ; QDeclarativeFontLoader::QDeclarativeFontLoader(class QObject *)
+ ??0QDeclarativeGradient@@QAE@PAVQObject@@@Z @ 98 NONAME ; QDeclarativeGradient::QDeclarativeGradient(class QObject *)
+ ??0QDeclarativeGradientStop@@QAE@PAVQObject@@@Z @ 99 NONAME ; QDeclarativeGradientStop::QDeclarativeGradientStop(class QObject *)
+ ??0QDeclarativeGraphicsObjectContainer@@QAE@PAVQDeclarativeItem@@@Z @ 100 NONAME ; QDeclarativeGraphicsObjectContainer::QDeclarativeGraphicsObjectContainer(class QDeclarativeItem *)
+ ??0QDeclarativeGrid@@QAE@PAVQDeclarativeItem@@@Z @ 101 NONAME ; QDeclarativeGrid::QDeclarativeGrid(class QDeclarativeItem *)
+ ??0QDeclarativeGridScaledImage@@QAE@ABV0@@Z @ 102 NONAME ; QDeclarativeGridScaledImage::QDeclarativeGridScaledImage(class QDeclarativeGridScaledImage const &)
+ ??0QDeclarativeGridScaledImage@@QAE@PAVQIODevice@@@Z @ 103 NONAME ; QDeclarativeGridScaledImage::QDeclarativeGridScaledImage(class QIODevice *)
+ ??0QDeclarativeGridScaledImage@@QAE@XZ @ 104 NONAME ; QDeclarativeGridScaledImage::QDeclarativeGridScaledImage(void)
+ ??0QDeclarativeGridView@@QAE@PAVQDeclarativeItem@@@Z @ 105 NONAME ; QDeclarativeGridView::QDeclarativeGridView(class QDeclarativeItem *)
+ ??0QDeclarativeImage@@IAE@AAVQDeclarativeImagePrivate@@PAVQDeclarativeItem@@@Z @ 106 NONAME ; QDeclarativeImage::QDeclarativeImage(class QDeclarativeImagePrivate &, class QDeclarativeItem *)
+ ??0QDeclarativeImage@@QAE@PAVQDeclarativeItem@@@Z @ 107 NONAME ; QDeclarativeImage::QDeclarativeImage(class QDeclarativeItem *)
+ ??0QDeclarativeImageBase@@IAE@AAVQDeclarativeImageBasePrivate@@PAVQDeclarativeItem@@@Z @ 108 NONAME ; QDeclarativeImageBase::QDeclarativeImageBase(class QDeclarativeImageBasePrivate &, class QDeclarativeItem *)
+ ??0QDeclarativeInfo@@QAE@PBVQObject@@@Z @ 109 NONAME ; QDeclarativeInfo::QDeclarativeInfo(class QObject const *)
+ ??0QDeclarativeInstruction@@QAE@XZ @ 110 NONAME ; QDeclarativeInstruction::QDeclarativeInstruction(void)
+ ??0QDeclarativeItem@@IAE@AAVQDeclarativeItemPrivate@@PAV0@@Z @ 111 NONAME ; QDeclarativeItem::QDeclarativeItem(class QDeclarativeItemPrivate &, class QDeclarativeItem *)
+ ??0QDeclarativeItem@@QAE@PAV0@@Z @ 112 NONAME ; QDeclarativeItem::QDeclarativeItem(class QDeclarativeItem *)
+ ??0QDeclarativeListAccessor@@QAE@XZ @ 113 NONAME ; QDeclarativeListAccessor::QDeclarativeListAccessor(void)
+ ??0QDeclarativeListModel@@QAE@PAVQObject@@@Z @ 114 NONAME ; QDeclarativeListModel::QDeclarativeListModel(class QObject *)
+ ??0QDeclarativeListReference@@QAE@ABV0@@Z @ 115 NONAME ; QDeclarativeListReference::QDeclarativeListReference(class QDeclarativeListReference const &)
+ ??0QDeclarativeListReference@@QAE@PAVQObject@@PBDPAVQDeclarativeEngine@@@Z @ 116 NONAME ; QDeclarativeListReference::QDeclarativeListReference(class QObject *, char const *, class QDeclarativeEngine *)
+ ??0QDeclarativeListReference@@QAE@XZ @ 117 NONAME ; QDeclarativeListReference::QDeclarativeListReference(void)
+ ??0QDeclarativeListView@@QAE@PAVQDeclarativeItem@@@Z @ 118 NONAME ; QDeclarativeListView::QDeclarativeListView(class QDeclarativeItem *)
+ ??0QDeclarativeLoader@@QAE@PAVQDeclarativeItem@@@Z @ 119 NONAME ; QDeclarativeLoader::QDeclarativeLoader(class QDeclarativeItem *)
+ ??0QDeclarativeMouseArea@@QAE@PAVQDeclarativeItem@@@Z @ 120 NONAME ; QDeclarativeMouseArea::QDeclarativeMouseArea(class QDeclarativeItem *)
+ ??0QDeclarativeNumberFormatter@@QAE@PAVQObject@@@Z @ 121 NONAME ; QDeclarativeNumberFormatter::QDeclarativeNumberFormatter(class QObject *)
+ ??0QDeclarativeOpenMetaObject@@QAE@PAVQObject@@PAVQDeclarativeOpenMetaObjectType@@_N@Z @ 122 NONAME ; QDeclarativeOpenMetaObject::QDeclarativeOpenMetaObject(class QObject *, class QDeclarativeOpenMetaObjectType *, bool)
+ ??0QDeclarativeOpenMetaObject@@QAE@PAVQObject@@_N@Z @ 123 NONAME ; QDeclarativeOpenMetaObject::QDeclarativeOpenMetaObject(class QObject *, bool)
+ ??0QDeclarativeOpenMetaObjectType@@QAE@PBUQMetaObject@@PAVQDeclarativeEngine@@@Z @ 124 NONAME ; QDeclarativeOpenMetaObjectType::QDeclarativeOpenMetaObjectType(struct QMetaObject const *, class QDeclarativeEngine *)
+ ??0QDeclarativePaintedItem@@IAE@AAVQDeclarativePaintedItemPrivate@@PAVQDeclarativeItem@@@Z @ 125 NONAME ; QDeclarativePaintedItem::QDeclarativePaintedItem(class QDeclarativePaintedItemPrivate &, class QDeclarativeItem *)
+ ??0QDeclarativePaintedItem@@QAE@PAVQDeclarativeItem@@@Z @ 126 NONAME ; QDeclarativePaintedItem::QDeclarativePaintedItem(class QDeclarativeItem *)
+ ??0QDeclarativeParentChange@@QAE@PAVQObject@@@Z @ 127 NONAME ; QDeclarativeParentChange::QDeclarativeParentChange(class QObject *)
+ ??0QDeclarativeParserStatus@@QAE@XZ @ 128 NONAME ; QDeclarativeParserStatus::QDeclarativeParserStatus(void)
+ ??0QDeclarativeParticleMotion@@QAE@PAVQObject@@@Z @ 129 NONAME ; QDeclarativeParticleMotion::QDeclarativeParticleMotion(class QObject *)
+ ??0QDeclarativeParticleMotionGravity@@QAE@PAVQObject@@@Z @ 130 NONAME ; QDeclarativeParticleMotionGravity::QDeclarativeParticleMotionGravity(class QObject *)
+ ??0QDeclarativeParticleMotionLinear@@QAE@PAVQObject@@@Z @ 131 NONAME ; QDeclarativeParticleMotionLinear::QDeclarativeParticleMotionLinear(class QObject *)
+ ??0QDeclarativeParticleMotionWander@@QAE@XZ @ 132 NONAME ; QDeclarativeParticleMotionWander::QDeclarativeParticleMotionWander(void)
+ ??0QDeclarativeParticles@@QAE@PAVQDeclarativeItem@@@Z @ 133 NONAME ; QDeclarativeParticles::QDeclarativeParticles(class QDeclarativeItem *)
+ ??0QDeclarativePath@@QAE@PAVQObject@@@Z @ 134 NONAME ; QDeclarativePath::QDeclarativePath(class QObject *)
+ ??0QDeclarativePathAttribute@@QAE@PAVQObject@@@Z @ 135 NONAME ; QDeclarativePathAttribute::QDeclarativePathAttribute(class QObject *)
+ ??0QDeclarativePathCubic@@QAE@PAVQObject@@@Z @ 136 NONAME ; QDeclarativePathCubic::QDeclarativePathCubic(class QObject *)
+ ??0QDeclarativePathElement@@QAE@PAVQObject@@@Z @ 137 NONAME ; QDeclarativePathElement::QDeclarativePathElement(class QObject *)
+ ??0QDeclarativePathLine@@QAE@PAVQObject@@@Z @ 138 NONAME ; QDeclarativePathLine::QDeclarativePathLine(class QObject *)
+ ??0QDeclarativePathPercent@@QAE@PAVQObject@@@Z @ 139 NONAME ; QDeclarativePathPercent::QDeclarativePathPercent(class QObject *)
+ ??0QDeclarativePathQuad@@QAE@PAVQObject@@@Z @ 140 NONAME ; QDeclarativePathQuad::QDeclarativePathQuad(class QObject *)
+ ??0QDeclarativePathView@@QAE@PAVQDeclarativeItem@@@Z @ 141 NONAME ; QDeclarativePathView::QDeclarativePathView(class QDeclarativeItem *)
+ ??0QDeclarativePen@@QAE@PAVQObject@@@Z @ 142 NONAME ; QDeclarativePen::QDeclarativePen(class QObject *)
+ ??0QDeclarativePixmapReply@@AAE@PAVQDeclarativeImageReader@@ABVQUrl@@@Z @ 143 NONAME ; QDeclarativePixmapReply::QDeclarativePixmapReply(class QDeclarativeImageReader *, class QUrl const &)
+ ??0QDeclarativeProperty@@QAE@ABV0@@Z @ 144 NONAME ; QDeclarativeProperty::QDeclarativeProperty(class QDeclarativeProperty const &)
+ ??0QDeclarativeProperty@@QAE@PAVQObject@@@Z @ 145 NONAME ; QDeclarativeProperty::QDeclarativeProperty(class QObject *)
+ ??0QDeclarativeProperty@@QAE@PAVQObject@@ABVQString@@@Z @ 146 NONAME ; QDeclarativeProperty::QDeclarativeProperty(class QObject *, class QString const &)
+ ??0QDeclarativeProperty@@QAE@PAVQObject@@ABVQString@@PAVQDeclarativeContext@@@Z @ 147 NONAME ; QDeclarativeProperty::QDeclarativeProperty(class QObject *, class QString const &, class QDeclarativeContext *)
+ ??0QDeclarativeProperty@@QAE@PAVQObject@@ABVQString@@PAVQDeclarativeEngine@@@Z @ 148 NONAME ; QDeclarativeProperty::QDeclarativeProperty(class QObject *, class QString const &, class QDeclarativeEngine *)
+ ??0QDeclarativeProperty@@QAE@PAVQObject@@PAVQDeclarativeContext@@@Z @ 149 NONAME ; QDeclarativeProperty::QDeclarativeProperty(class QObject *, class QDeclarativeContext *)
+ ??0QDeclarativeProperty@@QAE@PAVQObject@@PAVQDeclarativeEngine@@@Z @ 150 NONAME ; QDeclarativeProperty::QDeclarativeProperty(class QObject *, class QDeclarativeEngine *)
+ ??0QDeclarativeProperty@@QAE@XZ @ 151 NONAME ; QDeclarativeProperty::QDeclarativeProperty(void)
+ ??0QDeclarativePropertyChanges@@QAE@XZ @ 152 NONAME ; QDeclarativePropertyChanges::QDeclarativePropertyChanges(void)
+ ??0QDeclarativePropertyMap@@QAE@PAVQObject@@@Z @ 153 NONAME ; QDeclarativePropertyMap::QDeclarativePropertyMap(class QObject *)
+ ??0QDeclarativePropertyValueInterceptor@@QAE@XZ @ 154 NONAME ; QDeclarativePropertyValueInterceptor::QDeclarativePropertyValueInterceptor(void)
+ ??0QDeclarativePropertyValueSource@@QAE@XZ @ 155 NONAME ; QDeclarativePropertyValueSource::QDeclarativePropertyValueSource(void)
+ ??0QDeclarativeRectangle@@QAE@PAVQDeclarativeItem@@@Z @ 156 NONAME ; QDeclarativeRectangle::QDeclarativeRectangle(class QDeclarativeItem *)
+ ??0QDeclarativeRepeater@@QAE@PAVQDeclarativeItem@@@Z @ 157 NONAME ; QDeclarativeRepeater::QDeclarativeRepeater(class QDeclarativeItem *)
+ ??0QDeclarativeRow@@QAE@PAVQDeclarativeItem@@@Z @ 158 NONAME ; QDeclarativeRow::QDeclarativeRow(class QDeclarativeItem *)
+ ??0QDeclarativeScaleGrid@@QAE@PAVQObject@@@Z @ 159 NONAME ; QDeclarativeScaleGrid::QDeclarativeScaleGrid(class QObject *)
+ ??0QDeclarativeScriptString@@QAE@ABV0@@Z @ 160 NONAME ; QDeclarativeScriptString::QDeclarativeScriptString(class QDeclarativeScriptString const &)
+ ??0QDeclarativeScriptString@@QAE@XZ @ 161 NONAME ; QDeclarativeScriptString::QDeclarativeScriptString(void)
+ ??0QDeclarativeSpringFollow@@QAE@PAVQObject@@@Z @ 162 NONAME ; QDeclarativeSpringFollow::QDeclarativeSpringFollow(class QObject *)
+ ??0QDeclarativeState@@QAE@PAVQObject@@@Z @ 163 NONAME ; QDeclarativeState::QDeclarativeState(class QObject *)
+ ??0QDeclarativeStateChangeScript@@QAE@PAVQObject@@@Z @ 164 NONAME ; QDeclarativeStateChangeScript::QDeclarativeStateChangeScript(class QObject *)
+ ??0QDeclarativeStateGroup@@QAE@PAVQObject@@@Z @ 165 NONAME ; QDeclarativeStateGroup::QDeclarativeStateGroup(class QObject *)
+ ??0QDeclarativeStateOperation@@IAE@AAVQObjectPrivate@@PAVQObject@@@Z @ 166 NONAME ; QDeclarativeStateOperation::QDeclarativeStateOperation(class QObjectPrivate &, class QObject *)
+ ??0QDeclarativeStateOperation@@QAE@PAVQObject@@@Z @ 167 NONAME ; QDeclarativeStateOperation::QDeclarativeStateOperation(class QObject *)
+ ??0QDeclarativeStyledText@@AAE@ABVQString@@AAVQTextLayout@@@Z @ 168 NONAME ; QDeclarativeStyledText::QDeclarativeStyledText(class QString const &, class QTextLayout &)
+ ??0QDeclarativeSystemPalette@@QAE@PAVQObject@@@Z @ 169 NONAME ; QDeclarativeSystemPalette::QDeclarativeSystemPalette(class QObject *)
+ ??0QDeclarativeText@@QAE@PAVQDeclarativeItem@@@Z @ 170 NONAME ; QDeclarativeText::QDeclarativeText(class QDeclarativeItem *)
+ ??0QDeclarativeTextEdit@@QAE@PAVQDeclarativeItem@@@Z @ 171 NONAME ; QDeclarativeTextEdit::QDeclarativeTextEdit(class QDeclarativeItem *)
+ ??0QDeclarativeTextInput@@QAE@PAVQDeclarativeItem@@@Z @ 172 NONAME ; QDeclarativeTextInput::QDeclarativeTextInput(class QDeclarativeItem *)
+ ??0QDeclarativeTimer@@QAE@PAVQObject@@@Z @ 173 NONAME ; QDeclarativeTimer::QDeclarativeTimer(class QObject *)
+ ??0QDeclarativeTransition@@QAE@PAVQObject@@@Z @ 174 NONAME ; QDeclarativeTransition::QDeclarativeTransition(class QObject *)
+ ??0QDeclarativeType@@AAE@HABURegisterInterface@QDeclarativePrivate@@@Z @ 175 NONAME ; QDeclarativeType::QDeclarativeType(int, struct QDeclarativePrivate::RegisterInterface const &)
+ ??0QDeclarativeType@@AAE@HABURegisterType@QDeclarativePrivate@@@Z @ 176 NONAME ; QDeclarativeType::QDeclarativeType(int, struct QDeclarativePrivate::RegisterType const &)
+ ??0QDeclarativeValueType@@QAE@PAVQObject@@@Z @ 177 NONAME ; QDeclarativeValueType::QDeclarativeValueType(class QObject *)
+ ??0QDeclarativeValueTypeFactory@@QAE@XZ @ 178 NONAME ; QDeclarativeValueTypeFactory::QDeclarativeValueTypeFactory(void)
+ ??0QDeclarativeView@@QAE@ABVQUrl@@PAVQWidget@@@Z @ 179 NONAME ; QDeclarativeView::QDeclarativeView(class QUrl const &, class QWidget *)
+ ??0QDeclarativeView@@QAE@PAVQWidget@@@Z @ 180 NONAME ; QDeclarativeView::QDeclarativeView(class QWidget *)
+ ??0QDeclarativeViewSection@@QAE@PAVQObject@@@Z @ 181 NONAME ; QDeclarativeViewSection::QDeclarativeViewSection(class QObject *)
+ ??0QDeclarativeVisualDataModel@@QAE@PAVQDeclarativeContext@@@Z @ 182 NONAME ; QDeclarativeVisualDataModel::QDeclarativeVisualDataModel(class QDeclarativeContext *)
+ ??0QDeclarativeVisualDataModel@@QAE@XZ @ 183 NONAME ; QDeclarativeVisualDataModel::QDeclarativeVisualDataModel(void)
+ ??0QDeclarativeVisualItemModel@@QAE@XZ @ 184 NONAME ; QDeclarativeVisualItemModel::QDeclarativeVisualItemModel(void)
+ ??0QDeclarativeVisualModel@@IAE@AAVQObjectPrivate@@PAVQObject@@@Z @ 185 NONAME ; QDeclarativeVisualModel::QDeclarativeVisualModel(class QObjectPrivate &, class QObject *)
+ ??0QDeclarativeVisualModel@@QAE@XZ @ 186 NONAME ; QDeclarativeVisualModel::QDeclarativeVisualModel(void)
+ ??0QDeclarativeWebPage@@QAE@PAVQDeclarativeWebView@@@Z @ 187 NONAME ; QDeclarativeWebPage::QDeclarativeWebPage(class QDeclarativeWebView *)
+ ??0QDeclarativeWebView@@QAE@PAVQDeclarativeItem@@@Z @ 188 NONAME ; QDeclarativeWebView::QDeclarativeWebView(class QDeclarativeItem *)
+ ??0QDeclarativeXmlListModel@@QAE@PAVQObject@@@Z @ 189 NONAME ; QDeclarativeXmlListModel::QDeclarativeXmlListModel(class QObject *)
+ ??0QDeclarativeXmlListModelRole@@QAE@XZ @ 190 NONAME ; QDeclarativeXmlListModelRole::QDeclarativeXmlListModelRole(void)
+ ??0QListModelInterface@@IAE@AAVQObjectPrivate@@PAVQObject@@@Z @ 191 NONAME ; QListModelInterface::QListModelInterface(class QObjectPrivate &, class QObject *)
+ ??0QListModelInterface@@QAE@PAVQObject@@@Z @ 192 NONAME ; QListModelInterface::QListModelInterface(class QObject *)
+ ??0QMetaEnumBuilder@@AAE@PBVQMetaObjectBuilder@@H@Z @ 193 NONAME ; QMetaEnumBuilder::QMetaEnumBuilder(class QMetaObjectBuilder const *, int)
+ ??0QMetaEnumBuilder@@QAE@XZ @ 194 NONAME ; QMetaEnumBuilder::QMetaEnumBuilder(void)
+ ??0QMetaMethodBuilder@@AAE@PBVQMetaObjectBuilder@@H@Z @ 195 NONAME ; QMetaMethodBuilder::QMetaMethodBuilder(class QMetaObjectBuilder const *, int)
+ ??0QMetaMethodBuilder@@QAE@XZ @ 196 NONAME ; QMetaMethodBuilder::QMetaMethodBuilder(void)
+ ??0QMetaObjectBuilder@@QAE@PBUQMetaObject@@V?$QFlags@W4AddMember@QMetaObjectBuilder@@@@@Z @ 197 NONAME ; QMetaObjectBuilder::QMetaObjectBuilder(struct QMetaObject const *, class QFlags<enum QMetaObjectBuilder::AddMember>)
+ ??0QMetaObjectBuilder@@QAE@XZ @ 198 NONAME ; QMetaObjectBuilder::QMetaObjectBuilder(void)
+ ??0QMetaPropertyBuilder@@AAE@PBVQMetaObjectBuilder@@H@Z @ 199 NONAME ; QMetaPropertyBuilder::QMetaPropertyBuilder(class QMetaObjectBuilder const *, int)
+ ??0QMetaPropertyBuilder@@QAE@XZ @ 200 NONAME ; QMetaPropertyBuilder::QMetaPropertyBuilder(void)
+ ??0QPacket@@IAE@ABVQByteArray@@@Z @ 201 NONAME ; QPacket::QPacket(class QByteArray const &)
+ ??0QPacket@@QAE@ABV0@@Z @ 202 NONAME ; QPacket::QPacket(class QPacket const &)
+ ??0QPacket@@QAE@XZ @ 203 NONAME ; QPacket::QPacket(void)
+ ??0QPacketAutoSend@@AAE@PAVQPacketProtocol@@@Z @ 204 NONAME ; QPacketAutoSend::QPacketAutoSend(class QPacketProtocol *)
+ ??0QPacketProtocol@@QAE@PAVQIODevice@@PAVQObject@@@Z @ 205 NONAME ; QPacketProtocol::QPacketProtocol(class QIODevice *, class QObject *)
+ ??1QDeclarativeAction@@QAE@XZ @ 206 NONAME ; QDeclarativeAction::~QDeclarativeAction(void)
+ ??1QDeclarativeAnchorChanges@@UAE@XZ @ 207 NONAME ; QDeclarativeAnchorChanges::~QDeclarativeAnchorChanges(void)
+ ??1QDeclarativeAnchors@@UAE@XZ @ 208 NONAME ; QDeclarativeAnchors::~QDeclarativeAnchors(void)
+ ??1QDeclarativeAnimatedImage@@UAE@XZ @ 209 NONAME ; QDeclarativeAnimatedImage::~QDeclarativeAnimatedImage(void)
+ ??1QDeclarativeBasePositioner@@UAE@XZ @ 210 NONAME ; QDeclarativeBasePositioner::~QDeclarativeBasePositioner(void)
+ ??1QDeclarativeBehavior@@UAE@XZ @ 211 NONAME ; QDeclarativeBehavior::~QDeclarativeBehavior(void)
+ ??1QDeclarativeBind@@UAE@XZ @ 212 NONAME ; QDeclarativeBind::~QDeclarativeBind(void)
+ ??1QDeclarativeBorderImage@@UAE@XZ @ 213 NONAME ; QDeclarativeBorderImage::~QDeclarativeBorderImage(void)
+ ??1QDeclarativeColumn@@UAE@XZ @ 214 NONAME ; QDeclarativeColumn::~QDeclarativeColumn(void)
+ ??1QDeclarativeCompiler@@QAE@XZ @ 215 NONAME ; QDeclarativeCompiler::~QDeclarativeCompiler(void)
+ ??1QDeclarativeComponent@@UAE@XZ @ 216 NONAME ; QDeclarativeComponent::~QDeclarativeComponent(void)
+ ??1QDeclarativeConnections@@UAE@XZ @ 217 NONAME ; QDeclarativeConnections::~QDeclarativeConnections(void)
+ ??1QDeclarativeContext@@UAE@XZ @ 218 NONAME ; QDeclarativeContext::~QDeclarativeContext(void)
+ ??1QDeclarativeContextPrivate@@UAE@XZ @ 219 NONAME ; QDeclarativeContextPrivate::~QDeclarativeContextPrivate(void)
+ ??1QDeclarativeCurve@@UAE@XZ @ 220 NONAME ; QDeclarativeCurve::~QDeclarativeCurve(void)
+ ??1QDeclarativeCustomParser@@UAE@XZ @ 221 NONAME ; QDeclarativeCustomParser::~QDeclarativeCustomParser(void)
+ ??1QDeclarativeCustomParserNode@@QAE@XZ @ 222 NONAME ; QDeclarativeCustomParserNode::~QDeclarativeCustomParserNode(void)
+ ??1QDeclarativeCustomParserProperty@@QAE@XZ @ 223 NONAME ; QDeclarativeCustomParserProperty::~QDeclarativeCustomParserProperty(void)
+ ??1QDeclarativeDateTimeFormatter@@UAE@XZ @ 224 NONAME ; QDeclarativeDateTimeFormatter::~QDeclarativeDateTimeFormatter(void)
+ ??1QDeclarativeDebugClient@@UAE@XZ @ 225 NONAME ; QDeclarativeDebugClient::~QDeclarativeDebugClient(void)
+ ??1QDeclarativeDebugConnection@@UAE@XZ @ 226 NONAME ; QDeclarativeDebugConnection::~QDeclarativeDebugConnection(void)
+ ??1QDeclarativeDebugContextReference@@QAE@XZ @ 227 NONAME ; QDeclarativeDebugContextReference::~QDeclarativeDebugContextReference(void)
+ ??1QDeclarativeDebugEngineReference@@QAE@XZ @ 228 NONAME ; QDeclarativeDebugEngineReference::~QDeclarativeDebugEngineReference(void)
+ ??1QDeclarativeDebugEnginesQuery@@UAE@XZ @ 229 NONAME ; QDeclarativeDebugEnginesQuery::~QDeclarativeDebugEnginesQuery(void)
+ ??1QDeclarativeDebugExpressionQuery@@UAE@XZ @ 230 NONAME ; QDeclarativeDebugExpressionQuery::~QDeclarativeDebugExpressionQuery(void)
+ ??1QDeclarativeDebugFileReference@@QAE@XZ @ 231 NONAME ; QDeclarativeDebugFileReference::~QDeclarativeDebugFileReference(void)
+ ??1QDeclarativeDebugObjectExpressionWatch@@UAE@XZ @ 232 NONAME ; QDeclarativeDebugObjectExpressionWatch::~QDeclarativeDebugObjectExpressionWatch(void)
+ ??1QDeclarativeDebugObjectQuery@@UAE@XZ @ 233 NONAME ; QDeclarativeDebugObjectQuery::~QDeclarativeDebugObjectQuery(void)
+ ??1QDeclarativeDebugObjectReference@@QAE@XZ @ 234 NONAME ; QDeclarativeDebugObjectReference::~QDeclarativeDebugObjectReference(void)
+ ??1QDeclarativeDebugPropertyReference@@QAE@XZ @ 235 NONAME ; QDeclarativeDebugPropertyReference::~QDeclarativeDebugPropertyReference(void)
+ ??1QDeclarativeDebugPropertyWatch@@UAE@XZ @ 236 NONAME ; QDeclarativeDebugPropertyWatch::~QDeclarativeDebugPropertyWatch(void)
+ ??1QDeclarativeDebugQuery@@UAE@XZ @ 237 NONAME ; QDeclarativeDebugQuery::~QDeclarativeDebugQuery(void)
+ ??1QDeclarativeDebugRootContextQuery@@UAE@XZ @ 238 NONAME ; QDeclarativeDebugRootContextQuery::~QDeclarativeDebugRootContextQuery(void)
+ ??1QDeclarativeDebugService@@UAE@XZ @ 239 NONAME ; QDeclarativeDebugService::~QDeclarativeDebugService(void)
+ ??1QDeclarativeDebugWatch@@UAE@XZ @ 240 NONAME ; QDeclarativeDebugWatch::~QDeclarativeDebugWatch(void)
+ ??1QDeclarativeDebuggerStatus@@UAE@XZ @ 241 NONAME ; QDeclarativeDebuggerStatus::~QDeclarativeDebuggerStatus(void)
+ ??1QDeclarativeDomComponent@@QAE@XZ @ 242 NONAME ; QDeclarativeDomComponent::~QDeclarativeDomComponent(void)
+ ??1QDeclarativeDomDocument@@QAE@XZ @ 243 NONAME ; QDeclarativeDomDocument::~QDeclarativeDomDocument(void)
+ ??1QDeclarativeDomDynamicProperty@@QAE@XZ @ 244 NONAME ; QDeclarativeDomDynamicProperty::~QDeclarativeDomDynamicProperty(void)
+ ??1QDeclarativeDomImport@@QAE@XZ @ 245 NONAME ; QDeclarativeDomImport::~QDeclarativeDomImport(void)
+ ??1QDeclarativeDomList@@QAE@XZ @ 246 NONAME ; QDeclarativeDomList::~QDeclarativeDomList(void)
+ ??1QDeclarativeDomObject@@QAE@XZ @ 247 NONAME ; QDeclarativeDomObject::~QDeclarativeDomObject(void)
+ ??1QDeclarativeDomProperty@@QAE@XZ @ 248 NONAME ; QDeclarativeDomProperty::~QDeclarativeDomProperty(void)
+ ??1QDeclarativeDomValue@@QAE@XZ @ 249 NONAME ; QDeclarativeDomValue::~QDeclarativeDomValue(void)
+ ??1QDeclarativeDomValueBinding@@QAE@XZ @ 250 NONAME ; QDeclarativeDomValueBinding::~QDeclarativeDomValueBinding(void)
+ ??1QDeclarativeDomValueLiteral@@QAE@XZ @ 251 NONAME ; QDeclarativeDomValueLiteral::~QDeclarativeDomValueLiteral(void)
+ ??1QDeclarativeDomValueValueInterceptor@@QAE@XZ @ 252 NONAME ; QDeclarativeDomValueValueInterceptor::~QDeclarativeDomValueValueInterceptor(void)
+ ??1QDeclarativeDomValueValueSource@@QAE@XZ @ 253 NONAME ; QDeclarativeDomValueValueSource::~QDeclarativeDomValueValueSource(void)
+ ??1QDeclarativeDrag@@UAE@XZ @ 254 NONAME ; QDeclarativeDrag::~QDeclarativeDrag(void)
+ ??1QDeclarativeEaseFollow@@UAE@XZ @ 255 NONAME ; QDeclarativeEaseFollow::~QDeclarativeEaseFollow(void)
+ ??1QDeclarativeEngine@@UAE@XZ @ 256 NONAME ; QDeclarativeEngine::~QDeclarativeEngine(void)
+ ??1QDeclarativeEngineDebug@@UAE@XZ @ 257 NONAME ; QDeclarativeEngineDebug::~QDeclarativeEngineDebug(void)
+ ??1QDeclarativeError@@QAE@XZ @ 258 NONAME ; QDeclarativeError::~QDeclarativeError(void)
+ ??1QDeclarativeExpression@@UAE@XZ @ 259 NONAME ; QDeclarativeExpression::~QDeclarativeExpression(void)
+ ??1QDeclarativeExtensionInterface@@UAE@XZ @ 260 NONAME ; QDeclarativeExtensionInterface::~QDeclarativeExtensionInterface(void)
+ ??1QDeclarativeExtensionPlugin@@UAE@XZ @ 261 NONAME ; QDeclarativeExtensionPlugin::~QDeclarativeExtensionPlugin(void)
+ ??1QDeclarativeFlickable@@UAE@XZ @ 262 NONAME ; QDeclarativeFlickable::~QDeclarativeFlickable(void)
+ ??1QDeclarativeFlipable@@UAE@XZ @ 263 NONAME ; QDeclarativeFlipable::~QDeclarativeFlipable(void)
+ ??1QDeclarativeFlow@@UAE@XZ @ 264 NONAME ; QDeclarativeFlow::~QDeclarativeFlow(void)
+ ??1QDeclarativeFocusPanel@@UAE@XZ @ 265 NONAME ; QDeclarativeFocusPanel::~QDeclarativeFocusPanel(void)
+ ??1QDeclarativeFocusScope@@UAE@XZ @ 266 NONAME ; QDeclarativeFocusScope::~QDeclarativeFocusScope(void)
+ ??1QDeclarativeFontLoader@@UAE@XZ @ 267 NONAME ; QDeclarativeFontLoader::~QDeclarativeFontLoader(void)
+ ??1QDeclarativeGradient@@UAE@XZ @ 268 NONAME ; QDeclarativeGradient::~QDeclarativeGradient(void)
+ ??1QDeclarativeGradientStop@@UAE@XZ @ 269 NONAME ; QDeclarativeGradientStop::~QDeclarativeGradientStop(void)
+ ??1QDeclarativeGraphicsObjectContainer@@UAE@XZ @ 270 NONAME ; QDeclarativeGraphicsObjectContainer::~QDeclarativeGraphicsObjectContainer(void)
+ ??1QDeclarativeGrid@@UAE@XZ @ 271 NONAME ; QDeclarativeGrid::~QDeclarativeGrid(void)
+ ??1QDeclarativeGridScaledImage@@QAE@XZ @ 272 NONAME ; QDeclarativeGridScaledImage::~QDeclarativeGridScaledImage(void)
+ ??1QDeclarativeGridView@@UAE@XZ @ 273 NONAME ; QDeclarativeGridView::~QDeclarativeGridView(void)
+ ??1QDeclarativeImage@@UAE@XZ @ 274 NONAME ; QDeclarativeImage::~QDeclarativeImage(void)
+ ??1QDeclarativeImageBase@@UAE@XZ @ 275 NONAME ; QDeclarativeImageBase::~QDeclarativeImageBase(void)
+ ??1QDeclarativeImageProvider@@UAE@XZ @ 276 NONAME ; QDeclarativeImageProvider::~QDeclarativeImageProvider(void)
+ ??1QDeclarativeInfo@@QAE@XZ @ 277 NONAME ; QDeclarativeInfo::~QDeclarativeInfo(void)
+ ??1QDeclarativeItem@@UAE@XZ @ 278 NONAME ; QDeclarativeItem::~QDeclarativeItem(void)
+ ??1QDeclarativeListAccessor@@QAE@XZ @ 279 NONAME ; QDeclarativeListAccessor::~QDeclarativeListAccessor(void)
+ ??1QDeclarativeListModel@@UAE@XZ @ 280 NONAME ; QDeclarativeListModel::~QDeclarativeListModel(void)
+ ??1QDeclarativeListReference@@QAE@XZ @ 281 NONAME ; QDeclarativeListReference::~QDeclarativeListReference(void)
+ ??1QDeclarativeListView@@UAE@XZ @ 282 NONAME ; QDeclarativeListView::~QDeclarativeListView(void)
+ ??1QDeclarativeLoader@@UAE@XZ @ 283 NONAME ; QDeclarativeLoader::~QDeclarativeLoader(void)
+ ??1QDeclarativeMouseArea@@UAE@XZ @ 284 NONAME ; QDeclarativeMouseArea::~QDeclarativeMouseArea(void)
+ ??1QDeclarativeNetworkAccessManagerFactory@@UAE@XZ @ 285 NONAME ; QDeclarativeNetworkAccessManagerFactory::~QDeclarativeNetworkAccessManagerFactory(void)
+ ??1QDeclarativeNumberFormatter@@UAE@XZ @ 286 NONAME ; QDeclarativeNumberFormatter::~QDeclarativeNumberFormatter(void)
+ ??1QDeclarativeOpenMetaObject@@UAE@XZ @ 287 NONAME ; QDeclarativeOpenMetaObject::~QDeclarativeOpenMetaObject(void)
+ ??1QDeclarativeOpenMetaObjectType@@UAE@XZ @ 288 NONAME ; QDeclarativeOpenMetaObjectType::~QDeclarativeOpenMetaObjectType(void)
+ ??1QDeclarativePaintedItem@@UAE@XZ @ 289 NONAME ; QDeclarativePaintedItem::~QDeclarativePaintedItem(void)
+ ??1QDeclarativeParentChange@@UAE@XZ @ 290 NONAME ; QDeclarativeParentChange::~QDeclarativeParentChange(void)
+ ??1QDeclarativeParserStatus@@UAE@XZ @ 291 NONAME ; QDeclarativeParserStatus::~QDeclarativeParserStatus(void)
+ ??1QDeclarativeParticleMotion@@UAE@XZ @ 292 NONAME ; QDeclarativeParticleMotion::~QDeclarativeParticleMotion(void)
+ ??1QDeclarativeParticleMotionGravity@@UAE@XZ @ 293 NONAME ; QDeclarativeParticleMotionGravity::~QDeclarativeParticleMotionGravity(void)
+ ??1QDeclarativeParticleMotionLinear@@UAE@XZ @ 294 NONAME ; QDeclarativeParticleMotionLinear::~QDeclarativeParticleMotionLinear(void)
+ ??1QDeclarativeParticleMotionWander@@UAE@XZ @ 295 NONAME ; QDeclarativeParticleMotionWander::~QDeclarativeParticleMotionWander(void)
+ ??1QDeclarativeParticles@@UAE@XZ @ 296 NONAME ; QDeclarativeParticles::~QDeclarativeParticles(void)
+ ??1QDeclarativePath@@UAE@XZ @ 297 NONAME ; QDeclarativePath::~QDeclarativePath(void)
+ ??1QDeclarativePathAttribute@@UAE@XZ @ 298 NONAME ; QDeclarativePathAttribute::~QDeclarativePathAttribute(void)
+ ??1QDeclarativePathCubic@@UAE@XZ @ 299 NONAME ; QDeclarativePathCubic::~QDeclarativePathCubic(void)
+ ??1QDeclarativePathElement@@UAE@XZ @ 300 NONAME ; QDeclarativePathElement::~QDeclarativePathElement(void)
+ ??1QDeclarativePathLine@@UAE@XZ @ 301 NONAME ; QDeclarativePathLine::~QDeclarativePathLine(void)
+ ??1QDeclarativePathPercent@@UAE@XZ @ 302 NONAME ; QDeclarativePathPercent::~QDeclarativePathPercent(void)
+ ??1QDeclarativePathQuad@@UAE@XZ @ 303 NONAME ; QDeclarativePathQuad::~QDeclarativePathQuad(void)
+ ??1QDeclarativePathView@@UAE@XZ @ 304 NONAME ; QDeclarativePathView::~QDeclarativePathView(void)
+ ??1QDeclarativePen@@UAE@XZ @ 305 NONAME ; QDeclarativePen::~QDeclarativePen(void)
+ ??1QDeclarativePixmapReply@@UAE@XZ @ 306 NONAME ; QDeclarativePixmapReply::~QDeclarativePixmapReply(void)
+ ??1QDeclarativeProperty@@QAE@XZ @ 307 NONAME ; QDeclarativeProperty::~QDeclarativeProperty(void)
+ ??1QDeclarativePropertyChanges@@UAE@XZ @ 308 NONAME ; QDeclarativePropertyChanges::~QDeclarativePropertyChanges(void)
+ ??1QDeclarativePropertyMap@@UAE@XZ @ 309 NONAME ; QDeclarativePropertyMap::~QDeclarativePropertyMap(void)
+ ??1QDeclarativePropertyValueInterceptor@@UAE@XZ @ 310 NONAME ; QDeclarativePropertyValueInterceptor::~QDeclarativePropertyValueInterceptor(void)
+ ??1QDeclarativePropertyValueSource@@UAE@XZ @ 311 NONAME ; QDeclarativePropertyValueSource::~QDeclarativePropertyValueSource(void)
+ ??1QDeclarativeRectangle@@UAE@XZ @ 312 NONAME ; QDeclarativeRectangle::~QDeclarativeRectangle(void)
+ ??1QDeclarativeRepeater@@UAE@XZ @ 313 NONAME ; QDeclarativeRepeater::~QDeclarativeRepeater(void)
+ ??1QDeclarativeRow@@UAE@XZ @ 314 NONAME ; QDeclarativeRow::~QDeclarativeRow(void)
+ ??1QDeclarativeScaleGrid@@UAE@XZ @ 315 NONAME ; QDeclarativeScaleGrid::~QDeclarativeScaleGrid(void)
+ ??1QDeclarativeScriptString@@QAE@XZ @ 316 NONAME ; QDeclarativeScriptString::~QDeclarativeScriptString(void)
+ ??1QDeclarativeSpringFollow@@UAE@XZ @ 317 NONAME ; QDeclarativeSpringFollow::~QDeclarativeSpringFollow(void)
+ ??1QDeclarativeState@@UAE@XZ @ 318 NONAME ; QDeclarativeState::~QDeclarativeState(void)
+ ??1QDeclarativeStateChangeScript@@UAE@XZ @ 319 NONAME ; QDeclarativeStateChangeScript::~QDeclarativeStateChangeScript(void)
+ ??1QDeclarativeStateGroup@@UAE@XZ @ 320 NONAME ; QDeclarativeStateGroup::~QDeclarativeStateGroup(void)
+ ??1QDeclarativeStateOperation@@UAE@XZ @ 321 NONAME ; QDeclarativeStateOperation::~QDeclarativeStateOperation(void)
+ ??1QDeclarativeStyledText@@AAE@XZ @ 322 NONAME ; QDeclarativeStyledText::~QDeclarativeStyledText(void)
+ ??1QDeclarativeSystemPalette@@UAE@XZ @ 323 NONAME ; QDeclarativeSystemPalette::~QDeclarativeSystemPalette(void)
+ ??1QDeclarativeText@@UAE@XZ @ 324 NONAME ; QDeclarativeText::~QDeclarativeText(void)
+ ??1QDeclarativeTextEdit@@UAE@XZ @ 325 NONAME ; QDeclarativeTextEdit::~QDeclarativeTextEdit(void)
+ ??1QDeclarativeTextInput@@UAE@XZ @ 326 NONAME ; QDeclarativeTextInput::~QDeclarativeTextInput(void)
+ ??1QDeclarativeTimer@@UAE@XZ @ 327 NONAME ; QDeclarativeTimer::~QDeclarativeTimer(void)
+ ??1QDeclarativeTransition@@UAE@XZ @ 328 NONAME ; QDeclarativeTransition::~QDeclarativeTransition(void)
+ ??1QDeclarativeType@@AAE@XZ @ 329 NONAME ; QDeclarativeType::~QDeclarativeType(void)
+ ??1QDeclarativeValueType@@UAE@XZ @ 330 NONAME ; QDeclarativeValueType::~QDeclarativeValueType(void)
+ ??1QDeclarativeValueTypeFactory@@QAE@XZ @ 331 NONAME ; QDeclarativeValueTypeFactory::~QDeclarativeValueTypeFactory(void)
+ ??1QDeclarativeView@@UAE@XZ @ 332 NONAME ; QDeclarativeView::~QDeclarativeView(void)
+ ??1QDeclarativeViewSection@@UAE@XZ @ 333 NONAME ; QDeclarativeViewSection::~QDeclarativeViewSection(void)
+ ??1QDeclarativeVisualDataModel@@UAE@XZ @ 334 NONAME ; QDeclarativeVisualDataModel::~QDeclarativeVisualDataModel(void)
+ ??1QDeclarativeVisualItemModel@@UAE@XZ @ 335 NONAME ; QDeclarativeVisualItemModel::~QDeclarativeVisualItemModel(void)
+ ??1QDeclarativeVisualModel@@UAE@XZ @ 336 NONAME ; QDeclarativeVisualModel::~QDeclarativeVisualModel(void)
+ ??1QDeclarativeWebPage@@UAE@XZ @ 337 NONAME ; QDeclarativeWebPage::~QDeclarativeWebPage(void)
+ ??1QDeclarativeWebView@@UAE@XZ @ 338 NONAME ; QDeclarativeWebView::~QDeclarativeWebView(void)
+ ??1QDeclarativeXmlListModel@@UAE@XZ @ 339 NONAME ; QDeclarativeXmlListModel::~QDeclarativeXmlListModel(void)
+ ??1QDeclarativeXmlListModelRole@@UAE@XZ @ 340 NONAME ; QDeclarativeXmlListModelRole::~QDeclarativeXmlListModelRole(void)
+ ??1QListModelInterface@@UAE@XZ @ 341 NONAME ; QListModelInterface::~QListModelInterface(void)
+ ??1QMetaObjectBuilder@@UAE@XZ @ 342 NONAME ; QMetaObjectBuilder::~QMetaObjectBuilder(void)
+ ??1QPacket@@UAE@XZ @ 343 NONAME ; QPacket::~QPacket(void)
+ ??1QPacketAutoSend@@UAE@XZ @ 344 NONAME ; QPacketAutoSend::~QPacketAutoSend(void)
+ ??1QPacketProtocol@@UAE@XZ @ 345 NONAME ; QPacketProtocol::~QPacketProtocol(void)
+ ??4QDeclarativeCustomParserNode@@QAEAAV0@ABV0@@Z @ 346 NONAME ; class QDeclarativeCustomParserNode & QDeclarativeCustomParserNode::operator=(class QDeclarativeCustomParserNode const &)
+ ??4QDeclarativeCustomParserProperty@@QAEAAV0@ABV0@@Z @ 347 NONAME ; class QDeclarativeCustomParserProperty & QDeclarativeCustomParserProperty::operator=(class QDeclarativeCustomParserProperty const &)
+ ??4QDeclarativeDebugContextReference@@QAEAAV0@ABV0@@Z @ 348 NONAME ; class QDeclarativeDebugContextReference & QDeclarativeDebugContextReference::operator=(class QDeclarativeDebugContextReference const &)
+ ??4QDeclarativeDebugEngineReference@@QAEAAV0@ABV0@@Z @ 349 NONAME ; class QDeclarativeDebugEngineReference & QDeclarativeDebugEngineReference::operator=(class QDeclarativeDebugEngineReference const &)
+ ??4QDeclarativeDebugFileReference@@QAEAAV0@ABV0@@Z @ 350 NONAME ; class QDeclarativeDebugFileReference & QDeclarativeDebugFileReference::operator=(class QDeclarativeDebugFileReference const &)
+ ??4QDeclarativeDebugObjectReference@@QAEAAV0@ABV0@@Z @ 351 NONAME ; class QDeclarativeDebugObjectReference & QDeclarativeDebugObjectReference::operator=(class QDeclarativeDebugObjectReference const &)
+ ??4QDeclarativeDebugPropertyReference@@QAEAAV0@ABV0@@Z @ 352 NONAME ; class QDeclarativeDebugPropertyReference & QDeclarativeDebugPropertyReference::operator=(class QDeclarativeDebugPropertyReference const &)
+ ??4QDeclarativeDomComponent@@QAEAAV0@ABV0@@Z @ 353 NONAME ; class QDeclarativeDomComponent & QDeclarativeDomComponent::operator=(class QDeclarativeDomComponent const &)
+ ??4QDeclarativeDomDocument@@QAEAAV0@ABV0@@Z @ 354 NONAME ; class QDeclarativeDomDocument & QDeclarativeDomDocument::operator=(class QDeclarativeDomDocument const &)
+ ??4QDeclarativeDomDynamicProperty@@QAEAAV0@ABV0@@Z @ 355 NONAME ; class QDeclarativeDomDynamicProperty & QDeclarativeDomDynamicProperty::operator=(class QDeclarativeDomDynamicProperty const &)
+ ??4QDeclarativeDomImport@@QAEAAV0@ABV0@@Z @ 356 NONAME ; class QDeclarativeDomImport & QDeclarativeDomImport::operator=(class QDeclarativeDomImport const &)
+ ??4QDeclarativeDomList@@QAEAAV0@ABV0@@Z @ 357 NONAME ; class QDeclarativeDomList & QDeclarativeDomList::operator=(class QDeclarativeDomList const &)
+ ??4QDeclarativeDomObject@@QAEAAV0@ABV0@@Z @ 358 NONAME ; class QDeclarativeDomObject & QDeclarativeDomObject::operator=(class QDeclarativeDomObject const &)
+ ??4QDeclarativeDomProperty@@QAEAAV0@ABV0@@Z @ 359 NONAME ; class QDeclarativeDomProperty & QDeclarativeDomProperty::operator=(class QDeclarativeDomProperty const &)
+ ??4QDeclarativeDomValue@@QAEAAV0@ABV0@@Z @ 360 NONAME ; class QDeclarativeDomValue & QDeclarativeDomValue::operator=(class QDeclarativeDomValue const &)
+ ??4QDeclarativeDomValueBinding@@QAEAAV0@ABV0@@Z @ 361 NONAME ; class QDeclarativeDomValueBinding & QDeclarativeDomValueBinding::operator=(class QDeclarativeDomValueBinding const &)
+ ??4QDeclarativeDomValueLiteral@@QAEAAV0@ABV0@@Z @ 362 NONAME ; class QDeclarativeDomValueLiteral & QDeclarativeDomValueLiteral::operator=(class QDeclarativeDomValueLiteral const &)
+ ??4QDeclarativeDomValueValueInterceptor@@QAEAAV0@ABV0@@Z @ 363 NONAME ; class QDeclarativeDomValueValueInterceptor & QDeclarativeDomValueValueInterceptor::operator=(class QDeclarativeDomValueValueInterceptor const &)
+ ??4QDeclarativeDomValueValueSource@@QAEAAV0@ABV0@@Z @ 364 NONAME ; class QDeclarativeDomValueValueSource & QDeclarativeDomValueValueSource::operator=(class QDeclarativeDomValueValueSource const &)
+ ??4QDeclarativeError@@QAEAAV0@ABV0@@Z @ 365 NONAME ; class QDeclarativeError & QDeclarativeError::operator=(class QDeclarativeError const &)
+ ??4QDeclarativeGridScaledImage@@QAEAAV0@ABV0@@Z @ 366 NONAME ; class QDeclarativeGridScaledImage & QDeclarativeGridScaledImage::operator=(class QDeclarativeGridScaledImage const &)
+ ??4QDeclarativeListReference@@QAEAAV0@ABV0@@Z @ 367 NONAME ; class QDeclarativeListReference & QDeclarativeListReference::operator=(class QDeclarativeListReference const &)
+ ??4QDeclarativeProperty@@QAEAAV0@ABV0@@Z @ 368 NONAME ; class QDeclarativeProperty & QDeclarativeProperty::operator=(class QDeclarativeProperty const &)
+ ??4QDeclarativeScriptString@@QAEAAV0@ABV0@@Z @ 369 NONAME ; class QDeclarativeScriptString & QDeclarativeScriptString::operator=(class QDeclarativeScriptString const &)
+ ??5@YAAAVQDataStream@@AAV0@AAUQDeclarativeObjectData@QDeclarativeEngineDebugServer@@@Z @ 370 NONAME ; class QDataStream & operator>>(class QDataStream &, struct QDeclarativeEngineDebugServer::QDeclarativeObjectData &)
+ ??5@YAAAVQDataStream@@AAV0@AAUQDeclarativeObjectProperty@QDeclarativeEngineDebugServer@@@Z @ 371 NONAME ; class QDataStream & operator>>(class QDataStream &, struct QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &)
+ ??6@YA?AVQDebug@@V0@ABVQDeclarativeError@@@Z @ 372 NONAME ; class QDebug operator<<(class QDebug, class QDeclarativeError const &)
+ ??6@YA?AVQDebug@@V0@PAVQDeclarativeItem@@@Z @ 373 NONAME ; class QDebug operator<<(class QDebug, class QDeclarativeItem *)
+ ??6@YAAAVQDataStream@@AAV0@ABUQDeclarativeObjectData@QDeclarativeEngineDebugServer@@@Z @ 374 NONAME ; class QDataStream & operator<<(class QDataStream &, struct QDeclarativeEngineDebugServer::QDeclarativeObjectData const &)
+ ??6@YAAAVQDataStream@@AAV0@ABUQDeclarativeObjectProperty@QDeclarativeEngineDebugServer@@@Z @ 375 NONAME ; class QDataStream & operator<<(class QDataStream &, struct QDeclarativeEngineDebugServer::QDeclarativeObjectProperty const &)
+ ??6QDeclarativeInfo@@QAEAAV0@ABVQByteArray@@@Z @ 376 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(class QByteArray const &)
+ ??6QDeclarativeInfo@@QAEAAV0@ABVQLatin1String@@@Z @ 377 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(class QLatin1String const &)
+ ??6QDeclarativeInfo@@QAEAAV0@ABVQString@@@Z @ 378 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(class QString const &)
+ ??6QDeclarativeInfo@@QAEAAV0@ABVQStringRef@@@Z @ 379 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(class QStringRef const &)
+ ??6QDeclarativeInfo@@QAEAAV0@D@Z @ 380 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(char)
+ ??6QDeclarativeInfo@@QAEAAV0@F@Z @ 381 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(short)
+ ??6QDeclarativeInfo@@QAEAAV0@G@Z @ 382 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(unsigned short)
+ ??6QDeclarativeInfo@@QAEAAV0@H@Z @ 383 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(int)
+ ??6QDeclarativeInfo@@QAEAAV0@I@Z @ 384 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(unsigned int)
+ ??6QDeclarativeInfo@@QAEAAV0@J@Z @ 385 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(long)
+ ??6QDeclarativeInfo@@QAEAAV0@K@Z @ 386 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(unsigned long)
+ ??6QDeclarativeInfo@@QAEAAV0@M@Z @ 387 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(float)
+ ??6QDeclarativeInfo@@QAEAAV0@N@Z @ 388 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(double)
+ ??6QDeclarativeInfo@@QAEAAV0@P6AAAVQTextStream@@AAV1@@Z@Z @ 389 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(class QTextStream & (*)(class QTextStream &))
+ ??6QDeclarativeInfo@@QAEAAV0@PBD@Z @ 390 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(char const *)
+ ??6QDeclarativeInfo@@QAEAAV0@PBX@Z @ 391 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(void const *)
+ ??6QDeclarativeInfo@@QAEAAV0@VQBool@@@Z @ 392 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(class QBool)
+ ??6QDeclarativeInfo@@QAEAAV0@VQChar@@@Z @ 393 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(class QChar)
+ ??6QDeclarativeInfo@@QAEAAV0@VQTextStreamManipulator@@@Z @ 394 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(class QTextStreamManipulator)
+ ??6QDeclarativeInfo@@QAEAAV0@_J@Z @ 395 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(long long)
+ ??6QDeclarativeInfo@@QAEAAV0@_K@Z @ 396 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(unsigned long long)
+ ??6QDeclarativeInfo@@QAEAAV0@_N@Z @ 397 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(bool)
+ ??6QDeclarativeState@@QAEAAV0@PAVQDeclarativeStateOperation@@@Z @ 398 NONAME ; class QDeclarativeState & QDeclarativeState::operator<<(class QDeclarativeStateOperation *)
+ ??8QDeclarativeProperty@@QBE_NABV0@@Z @ 399 NONAME ; bool QDeclarativeProperty::operator==(class QDeclarativeProperty const &) const
+ ??AQDeclarativeOpenMetaObject@@QAEAAVQVariant@@ABVQByteArray@@@Z @ 400 NONAME ; class QVariant & QDeclarativeOpenMetaObject::operator[](class QByteArray const &)
+ ??AQDeclarativePropertyMap@@QAEAAVQVariant@@ABVQString@@@Z @ 401 NONAME ; class QVariant & QDeclarativePropertyMap::operator[](class QString const &)
+ ??AQDeclarativePropertyMap@@QBE?BVQVariant@@ABVQString@@@Z @ 402 NONAME ; class QVariant const QDeclarativePropertyMap::operator[](class QString const &) const
+ ??AQDeclarativeValueTypeFactory@@QBEPAVQDeclarativeValueType@@H@Z @ 403 NONAME ; class QDeclarativeValueType * QDeclarativeValueTypeFactory::operator[](int) const
+ ??_EQDeclarativeAction@@QAE@I@Z @ 404 NONAME ; QDeclarativeAction::~QDeclarativeAction(unsigned int)
+ ??_EQDeclarativeAnchorChanges@@UAE@I@Z @ 405 NONAME ; QDeclarativeAnchorChanges::~QDeclarativeAnchorChanges(unsigned int)
+ ??_EQDeclarativeAnchors@@UAE@I@Z @ 406 NONAME ; QDeclarativeAnchors::~QDeclarativeAnchors(unsigned int)
+ ??_EQDeclarativeAnimatedImage@@UAE@I@Z @ 407 NONAME ; QDeclarativeAnimatedImage::~QDeclarativeAnimatedImage(unsigned int)
+ ??_EQDeclarativeBasePositioner@@UAE@I@Z @ 408 NONAME ; QDeclarativeBasePositioner::~QDeclarativeBasePositioner(unsigned int)
+ ??_EQDeclarativeBehavior@@UAE@I@Z @ 409 NONAME ; QDeclarativeBehavior::~QDeclarativeBehavior(unsigned int)
+ ??_EQDeclarativeBind@@UAE@I@Z @ 410 NONAME ; QDeclarativeBind::~QDeclarativeBind(unsigned int)
+ ??_EQDeclarativeBorderImage@@UAE@I@Z @ 411 NONAME ; QDeclarativeBorderImage::~QDeclarativeBorderImage(unsigned int)
+ ??_EQDeclarativeColumn@@UAE@I@Z @ 412 NONAME ; QDeclarativeColumn::~QDeclarativeColumn(unsigned int)
+ ??_EQDeclarativeComponent@@UAE@I@Z @ 413 NONAME ; QDeclarativeComponent::~QDeclarativeComponent(unsigned int)
+ ??_EQDeclarativeConnections@@UAE@I@Z @ 414 NONAME ; QDeclarativeConnections::~QDeclarativeConnections(unsigned int)
+ ??_EQDeclarativeContext@@UAE@I@Z @ 415 NONAME ; QDeclarativeContext::~QDeclarativeContext(unsigned int)
+ ??_EQDeclarativeContextPrivate@@UAE@I@Z @ 416 NONAME ; QDeclarativeContextPrivate::~QDeclarativeContextPrivate(unsigned int)
+ ??_EQDeclarativeCurve@@UAE@I@Z @ 417 NONAME ; QDeclarativeCurve::~QDeclarativeCurve(unsigned int)
+ ??_EQDeclarativeCustomParser@@UAE@I@Z @ 418 NONAME ; QDeclarativeCustomParser::~QDeclarativeCustomParser(unsigned int)
+ ??_EQDeclarativeDateTimeFormatter@@UAE@I@Z @ 419 NONAME ; QDeclarativeDateTimeFormatter::~QDeclarativeDateTimeFormatter(unsigned int)
+ ??_EQDeclarativeDebugClient@@UAE@I@Z @ 420 NONAME ; QDeclarativeDebugClient::~QDeclarativeDebugClient(unsigned int)
+ ??_EQDeclarativeDebugConnection@@UAE@I@Z @ 421 NONAME ; QDeclarativeDebugConnection::~QDeclarativeDebugConnection(unsigned int)
+ ??_EQDeclarativeDebugContextReference@@QAE@I@Z @ 422 NONAME ; QDeclarativeDebugContextReference::~QDeclarativeDebugContextReference(unsigned int)
+ ??_EQDeclarativeDebugEngineReference@@QAE@I@Z @ 423 NONAME ; QDeclarativeDebugEngineReference::~QDeclarativeDebugEngineReference(unsigned int)
+ ??_EQDeclarativeDebugEnginesQuery@@UAE@I@Z @ 424 NONAME ; QDeclarativeDebugEnginesQuery::~QDeclarativeDebugEnginesQuery(unsigned int)
+ ??_EQDeclarativeDebugExpressionQuery@@UAE@I@Z @ 425 NONAME ; QDeclarativeDebugExpressionQuery::~QDeclarativeDebugExpressionQuery(unsigned int)
+ ??_EQDeclarativeDebugObjectExpressionWatch@@UAE@I@Z @ 426 NONAME ; QDeclarativeDebugObjectExpressionWatch::~QDeclarativeDebugObjectExpressionWatch(unsigned int)
+ ??_EQDeclarativeDebugObjectQuery@@UAE@I@Z @ 427 NONAME ; QDeclarativeDebugObjectQuery::~QDeclarativeDebugObjectQuery(unsigned int)
+ ??_EQDeclarativeDebugObjectReference@@QAE@I@Z @ 428 NONAME ; QDeclarativeDebugObjectReference::~QDeclarativeDebugObjectReference(unsigned int)
+ ??_EQDeclarativeDebugPropertyReference@@QAE@I@Z @ 429 NONAME ; QDeclarativeDebugPropertyReference::~QDeclarativeDebugPropertyReference(unsigned int)
+ ??_EQDeclarativeDebugPropertyWatch@@UAE@I@Z @ 430 NONAME ; QDeclarativeDebugPropertyWatch::~QDeclarativeDebugPropertyWatch(unsigned int)
+ ??_EQDeclarativeDebugQuery@@UAE@I@Z @ 431 NONAME ; QDeclarativeDebugQuery::~QDeclarativeDebugQuery(unsigned int)
+ ??_EQDeclarativeDebugRootContextQuery@@UAE@I@Z @ 432 NONAME ; QDeclarativeDebugRootContextQuery::~QDeclarativeDebugRootContextQuery(unsigned int)
+ ??_EQDeclarativeDebugService@@UAE@I@Z @ 433 NONAME ; QDeclarativeDebugService::~QDeclarativeDebugService(unsigned int)
+ ??_EQDeclarativeDebugWatch@@UAE@I@Z @ 434 NONAME ; QDeclarativeDebugWatch::~QDeclarativeDebugWatch(unsigned int)
+ ??_EQDeclarativeDebuggerStatus@@UAE@I@Z @ 435 NONAME ; QDeclarativeDebuggerStatus::~QDeclarativeDebuggerStatus(unsigned int)
+ ??_EQDeclarativeDrag@@UAE@I@Z @ 436 NONAME ; QDeclarativeDrag::~QDeclarativeDrag(unsigned int)
+ ??_EQDeclarativeEaseFollow@@UAE@I@Z @ 437 NONAME ; QDeclarativeEaseFollow::~QDeclarativeEaseFollow(unsigned int)
+ ??_EQDeclarativeEngine@@UAE@I@Z @ 438 NONAME ; QDeclarativeEngine::~QDeclarativeEngine(unsigned int)
+ ??_EQDeclarativeEngineDebug@@UAE@I@Z @ 439 NONAME ; QDeclarativeEngineDebug::~QDeclarativeEngineDebug(unsigned int)
+ ??_EQDeclarativeExpression@@UAE@I@Z @ 440 NONAME ; QDeclarativeExpression::~QDeclarativeExpression(unsigned int)
+ ??_EQDeclarativeExtensionInterface@@UAE@I@Z @ 441 NONAME ; QDeclarativeExtensionInterface::~QDeclarativeExtensionInterface(unsigned int)
+ ??_EQDeclarativeExtensionPlugin@@UAE@I@Z @ 442 NONAME ; QDeclarativeExtensionPlugin::~QDeclarativeExtensionPlugin(unsigned int)
+ ??_EQDeclarativeFlickable@@UAE@I@Z @ 443 NONAME ; QDeclarativeFlickable::~QDeclarativeFlickable(unsigned int)
+ ??_EQDeclarativeFlipable@@UAE@I@Z @ 444 NONAME ; QDeclarativeFlipable::~QDeclarativeFlipable(unsigned int)
+ ??_EQDeclarativeFlow@@UAE@I@Z @ 445 NONAME ; QDeclarativeFlow::~QDeclarativeFlow(unsigned int)
+ ??_EQDeclarativeFocusPanel@@UAE@I@Z @ 446 NONAME ; QDeclarativeFocusPanel::~QDeclarativeFocusPanel(unsigned int)
+ ??_EQDeclarativeFocusScope@@UAE@I@Z @ 447 NONAME ; QDeclarativeFocusScope::~QDeclarativeFocusScope(unsigned int)
+ ??_EQDeclarativeFontLoader@@UAE@I@Z @ 448 NONAME ; QDeclarativeFontLoader::~QDeclarativeFontLoader(unsigned int)
+ ??_EQDeclarativeGradient@@UAE@I@Z @ 449 NONAME ; QDeclarativeGradient::~QDeclarativeGradient(unsigned int)
+ ??_EQDeclarativeGradientStop@@UAE@I@Z @ 450 NONAME ; QDeclarativeGradientStop::~QDeclarativeGradientStop(unsigned int)
+ ??_EQDeclarativeGraphicsObjectContainer@@UAE@I@Z @ 451 NONAME ; QDeclarativeGraphicsObjectContainer::~QDeclarativeGraphicsObjectContainer(unsigned int)
+ ??_EQDeclarativeGrid@@UAE@I@Z @ 452 NONAME ; QDeclarativeGrid::~QDeclarativeGrid(unsigned int)
+ ??_EQDeclarativeGridView@@UAE@I@Z @ 453 NONAME ; QDeclarativeGridView::~QDeclarativeGridView(unsigned int)
+ ??_EQDeclarativeImage@@UAE@I@Z @ 454 NONAME ; QDeclarativeImage::~QDeclarativeImage(unsigned int)
+ ??_EQDeclarativeImageBase@@UAE@I@Z @ 455 NONAME ; QDeclarativeImageBase::~QDeclarativeImageBase(unsigned int)
+ ??_EQDeclarativeImageProvider@@UAE@I@Z @ 456 NONAME ; QDeclarativeImageProvider::~QDeclarativeImageProvider(unsigned int)
+ ??_EQDeclarativeItem@@UAE@I@Z @ 457 NONAME ; QDeclarativeItem::~QDeclarativeItem(unsigned int)
+ ??_EQDeclarativeListModel@@UAE@I@Z @ 458 NONAME ; QDeclarativeListModel::~QDeclarativeListModel(unsigned int)
+ ??_EQDeclarativeListView@@UAE@I@Z @ 459 NONAME ; QDeclarativeListView::~QDeclarativeListView(unsigned int)
+ ??_EQDeclarativeLoader@@UAE@I@Z @ 460 NONAME ; QDeclarativeLoader::~QDeclarativeLoader(unsigned int)
+ ??_EQDeclarativeMouseArea@@UAE@I@Z @ 461 NONAME ; QDeclarativeMouseArea::~QDeclarativeMouseArea(unsigned int)
+ ??_EQDeclarativeNetworkAccessManagerFactory@@UAE@I@Z @ 462 NONAME ; QDeclarativeNetworkAccessManagerFactory::~QDeclarativeNetworkAccessManagerFactory(unsigned int)
+ ??_EQDeclarativeNumberFormatter@@UAE@I@Z @ 463 NONAME ; QDeclarativeNumberFormatter::~QDeclarativeNumberFormatter(unsigned int)
+ ??_EQDeclarativeOpenMetaObject@@UAE@I@Z @ 464 NONAME ; QDeclarativeOpenMetaObject::~QDeclarativeOpenMetaObject(unsigned int)
+ ??_EQDeclarativeOpenMetaObjectType@@UAE@I@Z @ 465 NONAME ; QDeclarativeOpenMetaObjectType::~QDeclarativeOpenMetaObjectType(unsigned int)
+ ??_EQDeclarativePaintedItem@@UAE@I@Z @ 466 NONAME ; QDeclarativePaintedItem::~QDeclarativePaintedItem(unsigned int)
+ ??_EQDeclarativeParentChange@@UAE@I@Z @ 467 NONAME ; QDeclarativeParentChange::~QDeclarativeParentChange(unsigned int)
+ ??_EQDeclarativeParserStatus@@UAE@I@Z @ 468 NONAME ; QDeclarativeParserStatus::~QDeclarativeParserStatus(unsigned int)
+ ??_EQDeclarativeParticleMotion@@UAE@I@Z @ 469 NONAME ; QDeclarativeParticleMotion::~QDeclarativeParticleMotion(unsigned int)
+ ??_EQDeclarativeParticleMotionGravity@@UAE@I@Z @ 470 NONAME ; QDeclarativeParticleMotionGravity::~QDeclarativeParticleMotionGravity(unsigned int)
+ ??_EQDeclarativeParticleMotionLinear@@UAE@I@Z @ 471 NONAME ; QDeclarativeParticleMotionLinear::~QDeclarativeParticleMotionLinear(unsigned int)
+ ??_EQDeclarativeParticleMotionWander@@UAE@I@Z @ 472 NONAME ; QDeclarativeParticleMotionWander::~QDeclarativeParticleMotionWander(unsigned int)
+ ??_EQDeclarativeParticles@@UAE@I@Z @ 473 NONAME ; QDeclarativeParticles::~QDeclarativeParticles(unsigned int)
+ ??_EQDeclarativePath@@UAE@I@Z @ 474 NONAME ; QDeclarativePath::~QDeclarativePath(unsigned int)
+ ??_EQDeclarativePathAttribute@@UAE@I@Z @ 475 NONAME ; QDeclarativePathAttribute::~QDeclarativePathAttribute(unsigned int)
+ ??_EQDeclarativePathCubic@@UAE@I@Z @ 476 NONAME ; QDeclarativePathCubic::~QDeclarativePathCubic(unsigned int)
+ ??_EQDeclarativePathElement@@UAE@I@Z @ 477 NONAME ; QDeclarativePathElement::~QDeclarativePathElement(unsigned int)
+ ??_EQDeclarativePathLine@@UAE@I@Z @ 478 NONAME ; QDeclarativePathLine::~QDeclarativePathLine(unsigned int)
+ ??_EQDeclarativePathPercent@@UAE@I@Z @ 479 NONAME ; QDeclarativePathPercent::~QDeclarativePathPercent(unsigned int)
+ ??_EQDeclarativePathQuad@@UAE@I@Z @ 480 NONAME ; QDeclarativePathQuad::~QDeclarativePathQuad(unsigned int)
+ ??_EQDeclarativePathView@@UAE@I@Z @ 481 NONAME ; QDeclarativePathView::~QDeclarativePathView(unsigned int)
+ ??_EQDeclarativePen@@UAE@I@Z @ 482 NONAME ; QDeclarativePen::~QDeclarativePen(unsigned int)
+ ??_EQDeclarativePixmapReply@@UAE@I@Z @ 483 NONAME ; QDeclarativePixmapReply::~QDeclarativePixmapReply(unsigned int)
+ ??_EQDeclarativePropertyChanges@@UAE@I@Z @ 484 NONAME ; QDeclarativePropertyChanges::~QDeclarativePropertyChanges(unsigned int)
+ ??_EQDeclarativePropertyMap@@UAE@I@Z @ 485 NONAME ; QDeclarativePropertyMap::~QDeclarativePropertyMap(unsigned int)
+ ??_EQDeclarativePropertyValueInterceptor@@UAE@I@Z @ 486 NONAME ; QDeclarativePropertyValueInterceptor::~QDeclarativePropertyValueInterceptor(unsigned int)
+ ??_EQDeclarativePropertyValueSource@@UAE@I@Z @ 487 NONAME ; QDeclarativePropertyValueSource::~QDeclarativePropertyValueSource(unsigned int)
+ ??_EQDeclarativeRectangle@@UAE@I@Z @ 488 NONAME ; QDeclarativeRectangle::~QDeclarativeRectangle(unsigned int)
+ ??_EQDeclarativeRepeater@@UAE@I@Z @ 489 NONAME ; QDeclarativeRepeater::~QDeclarativeRepeater(unsigned int)
+ ??_EQDeclarativeRow@@UAE@I@Z @ 490 NONAME ; QDeclarativeRow::~QDeclarativeRow(unsigned int)
+ ??_EQDeclarativeScaleGrid@@UAE@I@Z @ 491 NONAME ; QDeclarativeScaleGrid::~QDeclarativeScaleGrid(unsigned int)
+ ??_EQDeclarativeSpringFollow@@UAE@I@Z @ 492 NONAME ; QDeclarativeSpringFollow::~QDeclarativeSpringFollow(unsigned int)
+ ??_EQDeclarativeState@@UAE@I@Z @ 493 NONAME ; QDeclarativeState::~QDeclarativeState(unsigned int)
+ ??_EQDeclarativeStateChangeScript@@UAE@I@Z @ 494 NONAME ; QDeclarativeStateChangeScript::~QDeclarativeStateChangeScript(unsigned int)
+ ??_EQDeclarativeStateGroup@@UAE@I@Z @ 495 NONAME ; QDeclarativeStateGroup::~QDeclarativeStateGroup(unsigned int)
+ ??_EQDeclarativeStateOperation@@UAE@I@Z @ 496 NONAME ; QDeclarativeStateOperation::~QDeclarativeStateOperation(unsigned int)
+ ??_EQDeclarativeSystemPalette@@UAE@I@Z @ 497 NONAME ; QDeclarativeSystemPalette::~QDeclarativeSystemPalette(unsigned int)
+ ??_EQDeclarativeText@@UAE@I@Z @ 498 NONAME ; QDeclarativeText::~QDeclarativeText(unsigned int)
+ ??_EQDeclarativeTextEdit@@UAE@I@Z @ 499 NONAME ; QDeclarativeTextEdit::~QDeclarativeTextEdit(unsigned int)
+ ??_EQDeclarativeTextInput@@UAE@I@Z @ 500 NONAME ; QDeclarativeTextInput::~QDeclarativeTextInput(unsigned int)
+ ??_EQDeclarativeTimer@@UAE@I@Z @ 501 NONAME ; QDeclarativeTimer::~QDeclarativeTimer(unsigned int)
+ ??_EQDeclarativeTransition@@UAE@I@Z @ 502 NONAME ; QDeclarativeTransition::~QDeclarativeTransition(unsigned int)
+ ??_EQDeclarativeValueType@@UAE@I@Z @ 503 NONAME ; QDeclarativeValueType::~QDeclarativeValueType(unsigned int)
+ ??_EQDeclarativeView@@UAE@I@Z @ 504 NONAME ; QDeclarativeView::~QDeclarativeView(unsigned int)
+ ??_EQDeclarativeViewSection@@UAE@I@Z @ 505 NONAME ; QDeclarativeViewSection::~QDeclarativeViewSection(unsigned int)
+ ??_EQDeclarativeVisualDataModel@@UAE@I@Z @ 506 NONAME ; QDeclarativeVisualDataModel::~QDeclarativeVisualDataModel(unsigned int)
+ ??_EQDeclarativeVisualItemModel@@UAE@I@Z @ 507 NONAME ; QDeclarativeVisualItemModel::~QDeclarativeVisualItemModel(unsigned int)
+ ??_EQDeclarativeVisualModel@@UAE@I@Z @ 508 NONAME ; QDeclarativeVisualModel::~QDeclarativeVisualModel(unsigned int)
+ ??_EQDeclarativeWebPage@@UAE@I@Z @ 509 NONAME ; QDeclarativeWebPage::~QDeclarativeWebPage(unsigned int)
+ ??_EQDeclarativeWebView@@UAE@I@Z @ 510 NONAME ; QDeclarativeWebView::~QDeclarativeWebView(unsigned int)
+ ??_EQDeclarativeXmlListModel@@UAE@I@Z @ 511 NONAME ; QDeclarativeXmlListModel::~QDeclarativeXmlListModel(unsigned int)
+ ??_EQDeclarativeXmlListModelRole@@UAE@I@Z @ 512 NONAME ; QDeclarativeXmlListModelRole::~QDeclarativeXmlListModelRole(unsigned int)
+ ??_EQListModelInterface@@UAE@I@Z @ 513 NONAME ; QListModelInterface::~QListModelInterface(unsigned int)
+ ??_EQMetaObjectBuilder@@UAE@I@Z @ 514 NONAME ; QMetaObjectBuilder::~QMetaObjectBuilder(unsigned int)
+ ??_EQPacket@@UAE@I@Z @ 515 NONAME ; QPacket::~QPacket(unsigned int)
+ ??_EQPacketAutoSend@@UAE@I@Z @ 516 NONAME ; QPacketAutoSend::~QPacketAutoSend(unsigned int)
+ ??_EQPacketProtocol@@UAE@I@Z @ 517 NONAME ; QPacketProtocol::~QPacketProtocol(unsigned int)
+ ?__q_notify@QDeclarativeExpression@@AAEXXZ @ 518 NONAME ; void QDeclarativeExpression::__q_notify(void)
+ ?_q_createdPackage@QDeclarativeVisualDataModel@@AAEXHPAVQDeclarativePackage@@@Z @ 519 NONAME ; void QDeclarativeVisualDataModel::_q_createdPackage(int, class QDeclarativePackage *)
+ ?_q_dataChanged@QDeclarativeVisualDataModel@@AAEXABVQModelIndex@@0@Z @ 520 NONAME ; void QDeclarativeVisualDataModel::_q_dataChanged(class QModelIndex const &, class QModelIndex const &)
+ ?_q_destroyingPackage@QDeclarativeVisualDataModel@@AAEXPAVQDeclarativePackage@@@Z @ 521 NONAME ; void QDeclarativeVisualDataModel::_q_destroyingPackage(class QDeclarativePackage *)
+ ?_q_itemsChanged@QDeclarativeVisualDataModel@@AAEXHHABV?$QList@H@@@Z @ 522 NONAME ; void QDeclarativeVisualDataModel::_q_itemsChanged(int, int, class QList<int> const &)
+ ?_q_itemsInserted@QDeclarativeVisualDataModel@@AAEXHH@Z @ 523 NONAME ; void QDeclarativeVisualDataModel::_q_itemsInserted(int, int)
+ ?_q_itemsMoved@QDeclarativeVisualDataModel@@AAEXHHH@Z @ 524 NONAME ; void QDeclarativeVisualDataModel::_q_itemsMoved(int, int, int)
+ ?_q_itemsRemoved@QDeclarativeVisualDataModel@@AAEXHH@Z @ 525 NONAME ; void QDeclarativeVisualDataModel::_q_itemsRemoved(int, int)
+ ?_q_modelReset@QDeclarativeVisualDataModel@@AAEXXZ @ 526 NONAME ; void QDeclarativeVisualDataModel::_q_modelReset(void)
+ ?_q_rowsInserted@QDeclarativeVisualDataModel@@AAEXABVQModelIndex@@HH@Z @ 527 NONAME ; void QDeclarativeVisualDataModel::_q_rowsInserted(class QModelIndex const &, int, int)
+ ?_q_rowsMoved@QDeclarativeVisualDataModel@@AAEXABVQModelIndex@@HH0H@Z @ 528 NONAME ; void QDeclarativeVisualDataModel::_q_rowsMoved(class QModelIndex const &, int, int, class QModelIndex const &, int)
+ ?_q_rowsRemoved@QDeclarativeVisualDataModel@@AAEXABVQModelIndex@@HH@Z @ 529 NONAME ; void QDeclarativeVisualDataModel::_q_rowsRemoved(class QModelIndex const &, int, int)
+ ?acceleration@QDeclarativeParticleMotionGravity@@QBEMXZ @ 530 NONAME ; float QDeclarativeParticleMotionGravity::acceleration(void) const
+ ?accelerationChanged@QDeclarativeParticleMotionGravity@@IAEXXZ @ 531 NONAME ; void QDeclarativeParticleMotionGravity::accelerationChanged(void)
+ ?acceptableInputChanged@QDeclarativeTextInput@@IAEXXZ @ 532 NONAME ; void QDeclarativeTextInput::acceptableInputChanged(void)
+ ?accepted@QDeclarativeTextInput@@IAEXXZ @ 533 NONAME ; void QDeclarativeTextInput::accepted(void)
+ ?acceptedButtons@QDeclarativeMouseArea@@QBE?AV?$QFlags@W4MouseButton@Qt@@@@XZ @ 534 NONAME ; class QFlags<enum Qt::MouseButton> QDeclarativeMouseArea::acceptedButtons(void) const
+ ?acceptedButtonsChanged@QDeclarativeMouseArea@@IAEXXZ @ 535 NONAME ; void QDeclarativeMouseArea::acceptedButtonsChanged(void)
+ ?access@QMetaMethodBuilder@@QBE?AW4Access@QMetaMethod@@XZ @ 536 NONAME ; enum QMetaMethod::Access QMetaMethodBuilder::access(void) const
+ ?actions@QDeclarativeAnchorChanges@@UAE?AV?$QList@VQDeclarativeAction@@@@XZ @ 537 NONAME ; class QList<class QDeclarativeAction> QDeclarativeAnchorChanges::actions(void)
+ ?actions@QDeclarativeParentChange@@UAE?AV?$QList@VQDeclarativeAction@@@@XZ @ 538 NONAME ; class QList<class QDeclarativeAction> QDeclarativeParentChange::actions(void)
+ ?actions@QDeclarativePropertyChanges@@UAE?AV?$QList@VQDeclarativeAction@@@@XZ @ 539 NONAME ; class QList<class QDeclarativeAction> QDeclarativePropertyChanges::actions(void)
+ ?actions@QDeclarativeStateChangeScript@@UAE?AV?$QList@VQDeclarativeAction@@@@XZ @ 540 NONAME ; class QList<class QDeclarativeAction> QDeclarativeStateChangeScript::actions(void)
+ ?actions@QDeclarativeStateOperation@@UAE?AV?$QList@VQDeclarativeAction@@@@XZ @ 541 NONAME ; class QList<class QDeclarativeAction> QDeclarativeStateOperation::actions(void)
+ ?activeChanged@QDeclarativeFocusPanel@@IAEXXZ @ 542 NONAME ; void QDeclarativeFocusPanel::activeChanged(void)
+ ?add@QDeclarativeBasePositioner@@QBEPAVQDeclarativeTransition@@XZ @ 543 NONAME ; class QDeclarativeTransition * QDeclarativeBasePositioner::add(void) const
+ ?addBindingReference@QDeclarativeCompiler@@AAEXABUBindingReference@1@@Z @ 544 NONAME ; void QDeclarativeCompiler::addBindingReference(struct QDeclarativeCompiler::BindingReference const &)
+ ?addChanged@QDeclarativeBasePositioner@@IAEXXZ @ 545 NONAME ; void QDeclarativeBasePositioner::addChanged(void)
+ ?addClassInfo@QMetaObjectBuilder@@QAEHABVQByteArray@@0@Z @ 546 NONAME ; int QMetaObjectBuilder::addClassInfo(class QByteArray const &, class QByteArray const &)
+ ?addConstructor@QMetaObjectBuilder@@QAE?AVQMetaMethodBuilder@@ABVQByteArray@@@Z @ 547 NONAME ; class QMetaMethodBuilder QMetaObjectBuilder::addConstructor(class QByteArray const &)
+ ?addConstructor@QMetaObjectBuilder@@QAE?AVQMetaMethodBuilder@@ABVQMetaMethod@@@Z @ 548 NONAME ; class QMetaMethodBuilder QMetaObjectBuilder::addConstructor(class QMetaMethod const &)
+ ?addDefaultObject@QDeclarativeContext@@QAEXPAVQObject@@@Z @ 549 NONAME ; void QDeclarativeContext::addDefaultObject(class QObject *)
+ ?addEnumerator@QMetaObjectBuilder@@QAE?AVQMetaEnumBuilder@@ABVQByteArray@@@Z @ 550 NONAME ; class QMetaEnumBuilder QMetaObjectBuilder::addEnumerator(class QByteArray const &)
+ ?addEnumerator@QMetaObjectBuilder@@QAE?AVQMetaEnumBuilder@@ABVQMetaEnum@@@Z @ 551 NONAME ; class QMetaEnumBuilder QMetaObjectBuilder::addEnumerator(class QMetaEnum const &)
+ ?addId@QDeclarativeCompiler@@AAEXABVQString@@PAVObject@QDeclarativeParser@@@Z @ 552 NONAME ; void QDeclarativeCompiler::addId(class QString const &, class QDeclarativeParser::Object *)
+ ?addImageProvider@QDeclarativeEngine@@QAEXABVQString@@PAVQDeclarativeImageProvider@@@Z @ 553 NONAME ; void QDeclarativeEngine::addImageProvider(class QString const &, class QDeclarativeImageProvider *)
+ ?addImportPath@QDeclarativeEngine@@QAEXABVQString@@@Z @ 554 NONAME ; void QDeclarativeEngine::addImportPath(class QString const &)
+ ?addKey@QMetaEnumBuilder@@QAEHABVQByteArray@@H@Z @ 555 NONAME ; int QMetaEnumBuilder::addKey(class QByteArray const &, int)
+ ?addMetaObject@QMetaObjectBuilder@@QAEXPBUQMetaObject@@V?$QFlags@W4AddMember@QMetaObjectBuilder@@@@@Z @ 556 NONAME ; void QMetaObjectBuilder::addMetaObject(struct QMetaObject const *, class QFlags<enum QMetaObjectBuilder::AddMember>)
+ ?addMethod@QMetaObjectBuilder@@QAE?AVQMetaMethodBuilder@@ABVQByteArray@@0@Z @ 557 NONAME ; class QMetaMethodBuilder QMetaObjectBuilder::addMethod(class QByteArray const &, class QByteArray const &)
+ ?addMethod@QMetaObjectBuilder@@QAE?AVQMetaMethodBuilder@@ABVQByteArray@@@Z @ 558 NONAME ; class QMetaMethodBuilder QMetaObjectBuilder::addMethod(class QByteArray const &)
+ ?addMethod@QMetaObjectBuilder@@QAE?AVQMetaMethodBuilder@@ABVQMetaMethod@@@Z @ 559 NONAME ; class QMetaMethodBuilder QMetaObjectBuilder::addMethod(class QMetaMethod const &)
+ ?addProperty@QMetaObjectBuilder@@QAE?AVQMetaPropertyBuilder@@ABVQByteArray@@0H@Z @ 560 NONAME ; class QMetaPropertyBuilder QMetaObjectBuilder::addProperty(class QByteArray const &, class QByteArray const &, int)
+ ?addProperty@QMetaObjectBuilder@@QAE?AVQMetaPropertyBuilder@@ABVQMetaProperty@@@Z @ 561 NONAME ; class QMetaPropertyBuilder QMetaObjectBuilder::addProperty(class QMetaProperty const &)
+ ?addRef@QDeclarativePixmapReply@@AAEXXZ @ 562 NONAME ; void QDeclarativePixmapReply::addRef(void)
+ ?addRelatedMetaObject@QMetaObjectBuilder@@QAEHABQ6AABUQMetaObject@@XZ@Z @ 563 NONAME ; int QMetaObjectBuilder::addRelatedMetaObject(struct QMetaObject const & (* const)(void) const &)
+ ?addRole@QDeclarativeListModel@@ABEXABVQString@@@Z @ 564 NONAME ; void QDeclarativeListModel::addRole(class QString const &) const
+ ?addScript@QDeclarativeContextPrivate@@QAEXABUScriptBlock@Object@QDeclarativeParser@@PAVQObject@@@Z @ 565 NONAME ; void QDeclarativeContextPrivate::addScript(struct QDeclarativeParser::Object::ScriptBlock const &, class QObject *)
+ ?addSignal@QMetaObjectBuilder@@QAE?AVQMetaMethodBuilder@@ABVQByteArray@@@Z @ 566 NONAME ; class QMetaMethodBuilder QMetaObjectBuilder::addSignal(class QByteArray const &)
+ ?addSlot@QMetaObjectBuilder@@QAE?AVQMetaMethodBuilder@@ABVQByteArray@@@Z @ 567 NONAME ; class QMetaMethodBuilder QMetaObjectBuilder::addSlot(class QByteArray const &)
+ ?addToPath@QDeclarativeCurve@@UAEXAAVQPainterPath@@@Z @ 568 NONAME ; void QDeclarativeCurve::addToPath(class QPainterPath &)
+ ?addToPath@QDeclarativePathCubic@@UAEXAAVQPainterPath@@@Z @ 569 NONAME ; void QDeclarativePathCubic::addToPath(class QPainterPath &)
+ ?addToPath@QDeclarativePathLine@@UAEXAAVQPainterPath@@@Z @ 570 NONAME ; void QDeclarativePathLine::addToPath(class QPainterPath &)
+ ?addToPath@QDeclarativePathQuad@@UAEXAAVQPainterPath@@@Z @ 571 NONAME ; void QDeclarativePathQuad::addToPath(class QPainterPath &)
+ ?addWatch@QDeclarativeEngineDebug@@QAEPAVQDeclarativeDebugObjectExpressionWatch@@ABVQDeclarativeDebugObjectReference@@ABVQString@@PAVQObject@@@Z @ 572 NONAME ; class QDeclarativeDebugObjectExpressionWatch * QDeclarativeEngineDebug::addWatch(class QDeclarativeDebugObjectReference const &, class QString const &, class QObject *)
+ ?addWatch@QDeclarativeEngineDebug@@QAEPAVQDeclarativeDebugPropertyWatch@@ABVQDeclarativeDebugPropertyReference@@PAVQObject@@@Z @ 573 NONAME ; class QDeclarativeDebugPropertyWatch * QDeclarativeEngineDebug::addWatch(class QDeclarativeDebugPropertyReference const &, class QObject *)
+ ?addWatch@QDeclarativeEngineDebug@@QAEPAVQDeclarativeDebugWatch@@ABVQDeclarativeDebugContextReference@@ABVQString@@PAVQObject@@@Z @ 574 NONAME ; class QDeclarativeDebugWatch * QDeclarativeEngineDebug::addWatch(class QDeclarativeDebugContextReference const &, class QString const &, class QObject *)
+ ?addWatch@QDeclarativeEngineDebug@@QAEPAVQDeclarativeDebugWatch@@ABVQDeclarativeDebugFileReference@@PAVQObject@@@Z @ 575 NONAME ; class QDeclarativeDebugWatch * QDeclarativeEngineDebug::addWatch(class QDeclarativeDebugFileReference const &, class QObject *)
+ ?addWatch@QDeclarativeEngineDebug@@QAEPAVQDeclarativeDebugWatch@@ABVQDeclarativeDebugObjectReference@@PAVQObject@@@Z @ 576 NONAME ; class QDeclarativeDebugWatch * QDeclarativeEngineDebug::addWatch(class QDeclarativeDebugObjectReference const &, class QObject *)
+ ?advance@QDeclarativeParticleMotion@@UAEXAAVQDeclarativeParticle@@H@Z @ 577 NONAME ; void QDeclarativeParticleMotion::advance(class QDeclarativeParticle &, int)
+ ?advance@QDeclarativeParticleMotionGravity@@UAEXAAVQDeclarativeParticle@@H@Z @ 578 NONAME ; void QDeclarativeParticleMotionGravity::advance(class QDeclarativeParticle &, int)
+ ?advance@QDeclarativeParticleMotionLinear@@UAEXAAVQDeclarativeParticle@@H@Z @ 579 NONAME ; void QDeclarativeParticleMotionLinear::advance(class QDeclarativeParticle &, int)
+ ?advance@QDeclarativeParticleMotionWander@@UAEXAAVQDeclarativeParticle@@H@Z @ 580 NONAME ; void QDeclarativeParticleMotionWander::advance(class QDeclarativeParticle &, int)
+ ?alert@QDeclarativeWebView@@IAEXABVQString@@@Z @ 581 NONAME ; void QDeclarativeWebView::alert(class QString const &)
+ ?alternateBase@QDeclarativeSystemPalette@@QBE?AVQColor@@XZ @ 582 NONAME ; class QColor QDeclarativeSystemPalette::alternateBase(void) const
+ ?anchors@QDeclarativeItem@@QAEPAVQDeclarativeAnchors@@XZ @ 583 NONAME ; class QDeclarativeAnchors * QDeclarativeItem::anchors(void)
+ ?angle@QDeclarativeParticles@@QBEMXZ @ 584 NONAME ; float QDeclarativeParticles::angle(void) const
+ ?angleChanged@QDeclarativeParticles@@IAEXXZ @ 585 NONAME ; void QDeclarativeParticles::angleChanged(void)
+ ?angleDeviation@QDeclarativeParticles@@QBEMXZ @ 586 NONAME ; float QDeclarativeParticles::angleDeviation(void) const
+ ?angleDeviationChanged@QDeclarativeParticles@@IAEXXZ @ 587 NONAME ; void QDeclarativeParticles::angleDeviationChanged(void)
+ ?animStopped@QDeclarativeListView@@AAEXXZ @ 588 NONAME ; void QDeclarativeListView::animStopped(void)
+ ?animation@QDeclarativeBehavior@@QAEPAVQDeclarativeAbstractAnimation@@XZ @ 589 NONAME ; class QDeclarativeAbstractAnimation * QDeclarativeBehavior::animation(void)
+ ?animations@QDeclarativeTransition@@QAE?AU?$QDeclarativeListProperty@VQDeclarativeAbstractAnimation@@@@XZ @ 590 NONAME ; struct QDeclarativeListProperty<class QDeclarativeAbstractAnimation> QDeclarativeTransition::animations(void)
+ ?append@QDeclarativeListModel@@QAEXABVQScriptValue@@@Z @ 591 NONAME ; void QDeclarativeListModel::append(class QScriptValue const &)
+ ?append@QDeclarativeListReference@@QBE_NPAVQObject@@@Z @ 592 NONAME ; bool QDeclarativeListReference::append(class QObject *) const
+ ?apply@QDeclarativeState@@QAEXPAVQDeclarativeStateGroup@@PAVQDeclarativeTransition@@PAV1@@Z @ 593 NONAME ; void QDeclarativeState::apply(class QDeclarativeStateGroup *, class QDeclarativeTransition *, class QDeclarativeState *)
+ ?assignedValues@QDeclarativeCustomParserProperty@@QBE?AV?$QList@VQVariant@@@@XZ @ 594 NONAME ; class QList<class QVariant> QDeclarativeCustomParserProperty::assignedValues(void) const
+ ?asynchronous@QDeclarativeImageBase@@QBE_NXZ @ 595 NONAME ; bool QDeclarativeImageBase::asynchronous(void) const
+ ?asynchronousChanged@QDeclarativeImageBase@@IAEXXZ @ 596 NONAME ; void QDeclarativeImageBase::asynchronousChanged(void)
+ ?at@QDeclarativeListAccessor@@QBE?AVQVariant@@H@Z @ 597 NONAME ; class QVariant QDeclarativeListAccessor::at(int) const
+ ?at@QDeclarativeListReference@@QBEPAVQObject@@H@Z @ 598 NONAME ; class QObject * QDeclarativeListReference::at(int) const
+ ?attachedPropertiesFuncById@QDeclarativeMetaType@@SAP6APAVQObject@@PAV2@@ZH@Z @ 599 NONAME ; class QObject * (*)(class QObject *) QDeclarativeMetaType::attachedPropertiesFuncById(int)
+ ?attachedPropertiesFuncId@QDeclarativeMetaType@@SAHPBUQMetaObject@@@Z @ 600 NONAME ; int QDeclarativeMetaType::attachedPropertiesFuncId(struct QMetaObject const *)
+ ?attachedPropertiesFunction@QDeclarativeType@@QBEP6APAVQObject@@PAV2@@ZXZ @ 601 NONAME ; class QObject * (*)(class QObject *) QDeclarativeType::attachedPropertiesFunction(void) const
+ ?attachedPropertiesType@QDeclarativeType@@QBEPBUQMetaObject@@XZ @ 602 NONAME ; struct QMetaObject const * QDeclarativeType::attachedPropertiesType(void) const
+ ?attributeAt@QDeclarativePath@@QBEMABVQString@@M@Z @ 603 NONAME ; float QDeclarativePath::attributeAt(class QString const &, float) const
+ ?attributes@QDeclarativePath@@QBE?AVQStringList@@XZ @ 604 NONAME ; class QStringList QDeclarativePath::attributes(void) const
+ ?attributes@QMetaMethodBuilder@@QBEHXZ @ 605 NONAME ; int QMetaMethodBuilder::attributes(void) const
+ ?availableInVersion@QDeclarativeType@@QBE_NHH@Z @ 606 NONAME ; bool QDeclarativeType::availableInVersion(int, int) const
+ ?axis@QDeclarativeDrag@@QBE?AW4Axis@1@XZ @ 607 NONAME ; enum QDeclarativeDrag::Axis QDeclarativeDrag::axis(void) const
+ ?axisChanged@QDeclarativeDrag@@IAEXXZ @ 608 NONAME ; void QDeclarativeDrag::axisChanged(void)
+ ?back@QDeclarativeFlipable@@QAEPAVQDeclarativeItem@@XZ @ 609 NONAME ; class QDeclarativeItem * QDeclarativeFlipable::back(void)
+ ?backAction@QDeclarativeWebView@@QBEPAVQAction@@XZ @ 610 NONAME ; class QAction * QDeclarativeWebView::backAction(void) const
+ ?base@QDeclarativeSystemPalette@@QBE?AVQColor@@XZ @ 611 NONAME ; class QColor QDeclarativeSystemPalette::base(void) const
+ ?baseMetaObject@QDeclarativeType@@QBEPBUQMetaObject@@XZ @ 612 NONAME ; struct QMetaObject const * QDeclarativeType::baseMetaObject(void) const
+ ?baseUrl@QDeclarativeContext@@QBE?AVQUrl@@XZ @ 613 NONAME ; class QUrl QDeclarativeContext::baseUrl(void) const
+ ?baseUrl@QDeclarativeEngine@@QBE?AVQUrl@@XZ @ 614 NONAME ; class QUrl QDeclarativeEngine::baseUrl(void) const
+ ?baseline@QDeclarativeAnchorChanges@@QBE?AVQDeclarativeAnchorLine@@XZ @ 615 NONAME ; class QDeclarativeAnchorLine QDeclarativeAnchorChanges::baseline(void) const
+ ?baseline@QDeclarativeAnchors@@QBE?AVQDeclarativeAnchorLine@@XZ @ 616 NONAME ; class QDeclarativeAnchorLine QDeclarativeAnchors::baseline(void) const
+ ?baseline@QDeclarativeItem@@QBE?AVQDeclarativeAnchorLine@@XZ @ 617 NONAME ; class QDeclarativeAnchorLine QDeclarativeItem::baseline(void) const
+ ?baselineChanged@QDeclarativeAnchors@@IAEXXZ @ 618 NONAME ; void QDeclarativeAnchors::baselineChanged(void)
+ ?baselineOffset@QDeclarativeAnchors@@QBEMXZ @ 619 NONAME ; float QDeclarativeAnchors::baselineOffset(void) const
+ ?baselineOffset@QDeclarativeItem@@QBEMXZ @ 620 NONAME ; float QDeclarativeItem::baselineOffset(void) const
+ ?baselineOffsetChanged@QDeclarativeAnchors@@IAEXXZ @ 621 NONAME ; void QDeclarativeAnchors::baselineOffsetChanged(void)
+ ?baselineOffsetChanged@QDeclarativeItem@@IAEXXZ @ 622 NONAME ; void QDeclarativeItem::baselineOffsetChanged(void)
+ ?beginCreate@QDeclarativeComponent@@UAEPAVQObject@@PAVQDeclarativeContext@@@Z @ 623 NONAME ; class QObject * QDeclarativeComponent::beginCreate(class QDeclarativeContext *)
+ ?binding@QDeclarativeDebugPropertyReference@@QBE?AVQString@@XZ @ 624 NONAME ; class QString QDeclarativeDebugPropertyReference::binding(void) const
+ ?binding@QDeclarativeDomValueBinding@@QBE?AVQString@@XZ @ 625 NONAME ; class QString QDeclarativeDomValueBinding::binding(void) const
+ ?border@QDeclarativeBorderImage@@QAEPAVQDeclarativeScaleGrid@@XZ @ 626 NONAME ; class QDeclarativeScaleGrid * QDeclarativeBorderImage::border(void)
+ ?border@QDeclarativeRectangle@@QAEPAVQDeclarativePen@@XZ @ 627 NONAME ; class QDeclarativePen * QDeclarativeRectangle::border(void)
+ ?borderChanged@QDeclarativeScaleGrid@@IAEXXZ @ 628 NONAME ; void QDeclarativeScaleGrid::borderChanged(void)
+ ?bottom@QDeclarativeAnchorChanges@@QBE?AVQDeclarativeAnchorLine@@XZ @ 629 NONAME ; class QDeclarativeAnchorLine QDeclarativeAnchorChanges::bottom(void) const
+ ?bottom@QDeclarativeAnchors@@QBE?AVQDeclarativeAnchorLine@@XZ @ 630 NONAME ; class QDeclarativeAnchorLine QDeclarativeAnchors::bottom(void) const
+ ?bottom@QDeclarativeItem@@QBE?AVQDeclarativeAnchorLine@@XZ @ 631 NONAME ; class QDeclarativeAnchorLine QDeclarativeItem::bottom(void) const
+ ?bottom@QDeclarativeScaleGrid@@QBEHXZ @ 632 NONAME ; int QDeclarativeScaleGrid::bottom(void) const
+ ?bottomChanged@QDeclarativeAnchors@@IAEXXZ @ 633 NONAME ; void QDeclarativeAnchors::bottomChanged(void)
+ ?bottomMargin@QDeclarativeAnchors@@QBEMXZ @ 634 NONAME ; float QDeclarativeAnchors::bottomMargin(void) const
+ ?bottomMarginChanged@QDeclarativeAnchors@@IAEXXZ @ 635 NONAME ; void QDeclarativeAnchors::bottomMarginChanged(void)
+ ?boundingRect@QDeclarativeItem@@UBE?AVQRectF@@XZ @ 636 NONAME ; class QRectF QDeclarativeItem::boundingRect(void) const
+ ?boundingRect@QDeclarativeRectangle@@UBE?AVQRectF@@XZ @ 637 NONAME ; class QRectF QDeclarativeRectangle::boundingRect(void) const
+ ?buildAttachedProperty@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@ABUBindingContext@1@@Z @ 638 NONAME ; bool QDeclarativeCompiler::buildAttachedProperty(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
+ ?buildBinding@QDeclarativeCompiler@@AAE_NPAVValue@QDeclarativeParser@@PAVProperty@3@ABUBindingContext@1@@Z @ 639 NONAME ; bool QDeclarativeCompiler::buildBinding(class QDeclarativeParser::Value *, class QDeclarativeParser::Property *, struct QDeclarativeCompiler::BindingContext const &)
+ ?buildComponent@QDeclarativeCompiler@@AAE_NPAVObject@QDeclarativeParser@@ABUBindingContext@1@@Z @ 640 NONAME ; bool QDeclarativeCompiler::buildComponent(class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
+ ?buildComponentFromRoot@QDeclarativeCompiler@@AAE_NPAVObject@QDeclarativeParser@@ABUBindingContext@1@@Z @ 641 NONAME ; bool QDeclarativeCompiler::buildComponentFromRoot(class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
+ ?buildDynamicMeta@QDeclarativeCompiler@@AAE_NPAVObject@QDeclarativeParser@@W4DynamicMetaMode@1@@Z @ 642 NONAME ; bool QDeclarativeCompiler::buildDynamicMeta(class QDeclarativeParser::Object *, enum QDeclarativeCompiler::DynamicMetaMode)
+ ?buildGroupedProperty@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@ABUBindingContext@1@@Z @ 643 NONAME ; bool QDeclarativeCompiler::buildGroupedProperty(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
+ ?buildIdProperty@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@@Z @ 644 NONAME ; bool QDeclarativeCompiler::buildIdProperty(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *)
+ ?buildListProperty@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@ABUBindingContext@1@@Z @ 645 NONAME ; bool QDeclarativeCompiler::buildListProperty(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
+ ?buildObject@QDeclarativeCompiler@@AAE_NPAVObject@QDeclarativeParser@@ABUBindingContext@1@@Z @ 646 NONAME ; bool QDeclarativeCompiler::buildObject(class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
+ ?buildProperty@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@ABUBindingContext@1@@Z @ 647 NONAME ; bool QDeclarativeCompiler::buildProperty(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
+ ?buildPropertyAssignment@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@ABUBindingContext@1@@Z @ 648 NONAME ; bool QDeclarativeCompiler::buildPropertyAssignment(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
+ ?buildPropertyInNamespace@QDeclarativeCompiler@@AAE_NPAUImportedNamespace@QDeclarativeEnginePrivate@@PAVProperty@QDeclarativeParser@@PAVObject@5@ABUBindingContext@1@@Z @ 649 NONAME ; bool QDeclarativeCompiler::buildPropertyInNamespace(struct QDeclarativeEnginePrivate::ImportedNamespace *, class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
+ ?buildPropertyLiteralAssignment@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@PAVValue@3@ABUBindingContext@1@@Z @ 650 NONAME ; bool QDeclarativeCompiler::buildPropertyLiteralAssignment(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, class QDeclarativeParser::Value *, struct QDeclarativeCompiler::BindingContext const &)
+ ?buildPropertyObjectAssignment@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@PAVValue@3@ABUBindingContext@1@@Z @ 651 NONAME ; bool QDeclarativeCompiler::buildPropertyObjectAssignment(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, class QDeclarativeParser::Value *, struct QDeclarativeCompiler::BindingContext const &)
+ ?buildScript@QDeclarativeCompiler@@AAE_NPAVObject@QDeclarativeParser@@0@Z @ 652 NONAME ; bool QDeclarativeCompiler::buildScript(class QDeclarativeParser::Object *, class QDeclarativeParser::Object *)
+ ?buildScriptStringProperty@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@ABUBindingContext@1@@Z @ 653 NONAME ; bool QDeclarativeCompiler::buildScriptStringProperty(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
+ ?buildSignal@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@ABUBindingContext@1@@Z @ 654 NONAME ; bool QDeclarativeCompiler::buildSignal(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
+ ?buildSubObject@QDeclarativeCompiler@@AAE_NPAVObject@QDeclarativeParser@@ABUBindingContext@1@@Z @ 655 NONAME ; bool QDeclarativeCompiler::buildSubObject(class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
+ ?buildValueTypeProperty@QDeclarativeCompiler@@AAE_NPAVQObject@@PAVObject@QDeclarativeParser@@1ABUBindingContext@1@@Z @ 656 NONAME ; bool QDeclarativeCompiler::buildValueTypeProperty(class QObject *, class QDeclarativeParser::Object *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
+ ?burst@QDeclarativeParticles@@QAEXHH@Z @ 657 NONAME ; void QDeclarativeParticles::burst(int, int)
+ ?button@QDeclarativeSystemPalette@@QBE?AVQColor@@XZ @ 658 NONAME ; class QColor QDeclarativeSystemPalette::button(void) const
+ ?buttonText@QDeclarativeSystemPalette@@QBE?AVQColor@@XZ @ 659 NONAME ; class QColor QDeclarativeSystemPalette::buttonText(void) const
+ ?cacheBuffer@QDeclarativeGridView@@QBEHXZ @ 660 NONAME ; int QDeclarativeGridView::cacheBuffer(void) const
+ ?cacheBuffer@QDeclarativeListView@@QBEHXZ @ 661 NONAME ; int QDeclarativeListView::cacheBuffer(void) const
+ ?canAppend@QDeclarativeListReference@@QBE_NXZ @ 662 NONAME ; bool QDeclarativeListReference::canAppend(void) const
+ ?canAt@QDeclarativeListReference@@QBE_NXZ @ 663 NONAME ; bool QDeclarativeListReference::canAt(void) const
+ ?canClear@QDeclarativeListReference@@QBE_NXZ @ 664 NONAME ; bool QDeclarativeListReference::canClear(void) const
+ ?canCoerce@QDeclarativeCompiler@@AAE_NHH@Z @ 665 NONAME ; bool QDeclarativeCompiler::canCoerce(int, int)
+ ?canCoerce@QDeclarativeCompiler@@AAE_NHPAVObject@QDeclarativeParser@@@Z @ 666 NONAME ; bool QDeclarativeCompiler::canCoerce(int, class QDeclarativeParser::Object *)
+ ?canCount@QDeclarativeListReference@@QBE_NXZ @ 667 NONAME ; bool QDeclarativeListReference::canCount(void) const
+ ?cancel@QDeclarativePixmapCache@@SAXABVQUrl@@PAVQObject@@@Z @ 668 NONAME ; void QDeclarativePixmapCache::cancel(class QUrl const &, class QObject *)
+ ?cancel@QDeclarativeState@@QAEXXZ @ 669 NONAME ; void QDeclarativeState::cancel(void)
+ ?cancelFlick@QDeclarativeFlickable@@IAEXXZ @ 670 NONAME ; void QDeclarativeFlickable::cancelFlick(void)
+ ?cellHeight@QDeclarativeGridView@@QBEHXZ @ 671 NONAME ; int QDeclarativeGridView::cellHeight(void) const
+ ?cellHeightChanged@QDeclarativeGridView@@IAEXXZ @ 672 NONAME ; void QDeclarativeGridView::cellHeightChanged(void)
+ ?cellWidth@QDeclarativeGridView@@QBEHXZ @ 673 NONAME ; int QDeclarativeGridView::cellWidth(void) const
+ ?cellWidthChanged@QDeclarativeGridView@@IAEXXZ @ 674 NONAME ; void QDeclarativeGridView::cellWidthChanged(void)
+ ?centerIn@QDeclarativeAnchors@@QBEPAVQDeclarativeItem@@XZ @ 675 NONAME ; class QDeclarativeItem * QDeclarativeAnchors::centerIn(void) const
+ ?centerInChanged@QDeclarativeAnchors@@IAEXXZ @ 676 NONAME ; void QDeclarativeAnchors::centerInChanged(void)
+ ?changed@QDeclarativePath@@IAEXXZ @ 677 NONAME ; void QDeclarativePath::changed(void)
+ ?changed@QDeclarativePathElement@@IAEXXZ @ 678 NONAME ; void QDeclarativePathElement::changed(void)
+ ?changed@QDeclarativeViewSection@@IAEXXZ @ 679 NONAME ; void QDeclarativeViewSection::changed(void)
+ ?changes@QDeclarativeState@@QAE?AU?$QDeclarativeListProperty@VQDeclarativeStateOperation@@@@XZ @ 680 NONAME ; struct QDeclarativeListProperty<class QDeclarativeStateOperation> QDeclarativeState::changes(void)
+ ?changesBindings@QDeclarativeAnchorChanges@@UAE_NXZ @ 681 NONAME ; bool QDeclarativeAnchorChanges::changesBindings(void)
+ ?checkDynamicMeta@QDeclarativeCompiler@@AAE_NPAVObject@QDeclarativeParser@@@Z @ 682 NONAME ; bool QDeclarativeCompiler::checkDynamicMeta(class QDeclarativeParser::Object *)
+ ?checkRoles@QDeclarativeListModel@@ABEXXZ @ 683 NONAME ; void QDeclarativeListModel::checkRoles(void) const
+ ?children@QDeclarativeDebugObjectReference@@QBE?AV?$QList@VQDeclarativeDebugObjectReference@@@@XZ @ 684 NONAME ; class QList<class QDeclarativeDebugObjectReference> QDeclarativeDebugObjectReference::children(void) const
+ ?children@QDeclarativeVisualItemModel@@QAE?AU?$QDeclarativeListProperty@VQDeclarativeItem@@@@XZ @ 685 NONAME ; struct QDeclarativeListProperty<class QDeclarativeItem> QDeclarativeVisualItemModel::children(void)
+ ?childrenChanged@QDeclarativeItem@@IAEXXZ @ 686 NONAME ; void QDeclarativeItem::childrenChanged(void)
+ ?childrenChanged@QDeclarativeVisualItemModel@@IAEXXZ @ 687 NONAME ; void QDeclarativeVisualItemModel::childrenChanged(void)
+ ?childrenRect@QDeclarativeItem@@QAE?AVQRectF@@XZ @ 688 NONAME ; class QRectF QDeclarativeItem::childrenRect(void)
+ ?childrenRectChanged@QDeclarativeItem@@IAEXXZ @ 689 NONAME ; void QDeclarativeItem::childrenRectChanged(void)
+ ?chooseFile@QDeclarativeWebPage@@MAE?AVQString@@PAVQWebFrame@@ABV2@@Z @ 690 NONAME ; class QString QDeclarativeWebPage::chooseFile(class QWebFrame *, class QString const &)
+ ?classBegin@QDeclarativeAnchors@@QAEXXZ @ 691 NONAME ; void QDeclarativeAnchors::classBegin(void)
+ ?classBegin@QDeclarativeDateTimeFormatter@@UAEXXZ @ 692 NONAME ; void QDeclarativeDateTimeFormatter::classBegin(void)
+ ?classBegin@QDeclarativeItem@@MAEXXZ @ 693 NONAME ; void QDeclarativeItem::classBegin(void)
+ ?classBegin@QDeclarativeNumberFormatter@@UAEXXZ @ 694 NONAME ; void QDeclarativeNumberFormatter::classBegin(void)
+ ?classBegin@QDeclarativeParserStatus@@UAEXXZ @ 695 NONAME ; void QDeclarativeParserStatus::classBegin(void)
+ ?classBegin@QDeclarativeStateGroup@@UAEXXZ @ 696 NONAME ; void QDeclarativeStateGroup::classBegin(void)
+ ?classBegin@QDeclarativeTimer@@MAEXXZ @ 697 NONAME ; void QDeclarativeTimer::classBegin(void)
+ ?classBegin@QDeclarativeXmlListModel@@UAEXXZ @ 698 NONAME ; void QDeclarativeXmlListModel::classBegin(void)
+ ?classInfoCount@QMetaObjectBuilder@@QBEHXZ @ 699 NONAME ; int QMetaObjectBuilder::classInfoCount(void) const
+ ?classInfoName@QMetaObjectBuilder@@QBE?AVQByteArray@@H@Z @ 700 NONAME ; class QByteArray QMetaObjectBuilder::classInfoName(int) const
+ ?classInfoValue@QMetaObjectBuilder@@QBE?AVQByteArray@@H@Z @ 701 NONAME ; class QByteArray QMetaObjectBuilder::classInfoValue(int) const
+ ?className@QDeclarativeDebugObjectReference@@QBE?AVQString@@XZ @ 702 NONAME ; class QString QDeclarativeDebugObjectReference::className(void) const
+ ?className@QMetaObjectBuilder@@QBE?AVQByteArray@@XZ @ 703 NONAME ; class QByteArray QMetaObjectBuilder::className(void) const
+ ?clear@QDeclarativeListModel@@QAEXXZ @ 704 NONAME ; void QDeclarativeListModel::clear(void)
+ ?clear@QDeclarativeListReference@@QBE_NXZ @ 705 NONAME ; bool QDeclarativeListReference::clear(void) const
+ ?clear@QDeclarativePropertyMap@@QAEXABVQString@@@Z @ 706 NONAME ; void QDeclarativePropertyMap::clear(class QString const &)
+ ?clear@QDeclarativeRepeater@@AAEXXZ @ 707 NONAME ; void QDeclarativeRepeater::clear(void)
+ ?clear@QPacket@@QAEXXZ @ 708 NONAME ; void QPacket::clear(void)
+ ?clear@QPacketProtocol@@QAEXXZ @ 709 NONAME ; void QPacketProtocol::clear(void)
+ ?clear@QPerformanceLog@@YAXXZ @ 710 NONAME ; void QPerformanceLog::clear(void)
+ ?clearCache@QDeclarativePaintedItem@@IAEXXZ @ 711 NONAME ; void QDeclarativePaintedItem::clearCache(void)
+ ?clearComponentCache@QDeclarativeEngine@@QAEXXZ @ 712 NONAME ; void QDeclarativeEngine::clearComponentCache(void)
+ ?clearError@QDeclarativeExpression@@QAEXXZ @ 713 NONAME ; void QDeclarativeExpression::clearError(void)
+ ?clearErrors@QDeclarativeCustomParser@@QAEXXZ @ 714 NONAME ; void QDeclarativeCustomParser::clearErrors(void)
+ ?clearForwardBindings@QDeclarativeAnchorChanges@@UAEXXZ @ 715 NONAME ; void QDeclarativeAnchorChanges::clearForwardBindings(void)
+ ?clearReverseBindings@QDeclarativeAnchorChanges@@UAEXXZ @ 716 NONAME ; void QDeclarativeAnchorChanges::clearReverseBindings(void)
+ ?clicked@QDeclarativeMouseArea@@IAEXPAVQDeclarativeMouseEvent@@@Z @ 717 NONAME ; void QDeclarativeMouseArea::clicked(class QDeclarativeMouseEvent *)
+ ?clip@QDeclarativeItem@@QBE_NXZ @ 718 NONAME ; bool QDeclarativeItem::clip(void) const
+ ?clipChanged@QDeclarativeItem@@IAEXXZ @ 719 NONAME ; void QDeclarativeItem::clipChanged(void)
+ ?color@QDeclarativeGradientStop@@QBE?AVQColor@@XZ @ 720 NONAME ; class QColor QDeclarativeGradientStop::color(void) const
+ ?color@QDeclarativePen@@QBE?AVQColor@@XZ @ 721 NONAME ; class QColor QDeclarativePen::color(void) const
+ ?color@QDeclarativeRectangle@@QBE?AVQColor@@XZ @ 722 NONAME ; class QColor QDeclarativeRectangle::color(void) const
+ ?color@QDeclarativeText@@QBE?AVQColor@@XZ @ 723 NONAME ; class QColor QDeclarativeText::color(void) const
+ ?color@QDeclarativeTextEdit@@QBE?AVQColor@@XZ @ 724 NONAME ; class QColor QDeclarativeTextEdit::color(void) const
+ ?color@QDeclarativeTextInput@@QBE?AVQColor@@XZ @ 725 NONAME ; class QColor QDeclarativeTextInput::color(void) const
+ ?colorChanged@QDeclarativeRectangle@@IAEXXZ @ 726 NONAME ; void QDeclarativeRectangle::colorChanged(void)
+ ?colorChanged@QDeclarativeText@@IAEXABVQColor@@@Z @ 727 NONAME ; void QDeclarativeText::colorChanged(class QColor const &)
+ ?colorChanged@QDeclarativeTextEdit@@IAEXABVQColor@@@Z @ 728 NONAME ; void QDeclarativeTextEdit::colorChanged(class QColor const &)
+ ?colorChanged@QDeclarativeTextInput@@IAEXABVQColor@@@Z @ 729 NONAME ; void QDeclarativeTextInput::colorChanged(class QColor const &)
+ ?colorFromString@QDeclarativeStringConverters@@YA?AVQColor@@ABVQString@@PA_N@Z @ 730 NONAME ; class QColor QDeclarativeStringConverters::colorFromString(class QString const &, bool *)
+ ?colorGroup@QDeclarativeSystemPalette@@QBE?AW4ColorGroup@1@XZ @ 731 NONAME ; enum QDeclarativeSystemPalette::ColorGroup QDeclarativeSystemPalette::colorGroup(void) const
+ ?column@QDeclarativeError@@QBEHXZ @ 732 NONAME ; int QDeclarativeError::column(void) const
+ ?columnNumber@QDeclarativeDebugFileReference@@QBEHXZ @ 733 NONAME ; int QDeclarativeDebugFileReference::columnNumber(void) const
+ ?columns@QDeclarativeGrid@@QBEHXZ @ 734 NONAME ; int QDeclarativeGrid::columns(void) const
+ ?columnsChanged@QDeclarativeGrid@@IAEXXZ @ 735 NONAME ; void QDeclarativeGrid::columnsChanged(void)
+ ?commaPositions@QDeclarativeDomList@@QBE?AV?$QList@H@@XZ @ 736 NONAME ; class QList<int> QDeclarativeDomList::commaPositions(void) const
+ ?compile@QDeclarativeCompiler@@QAE_NPAVQDeclarativeEngine@@PAVQDeclarativeCompositeTypeData@@PAVQDeclarativeCompiledData@@@Z @ 737 NONAME ; bool QDeclarativeCompiler::compile(class QDeclarativeEngine *, class QDeclarativeCompositeTypeData *, class QDeclarativeCompiledData *)
+ ?compileAlias@QDeclarativeCompiler@@AAE_NAAVQMetaObjectBuilder@@AAVQByteArray@@PAVObject@QDeclarativeParser@@ABUDynamicProperty@45@@Z @ 738 NONAME ; bool QDeclarativeCompiler::compileAlias(class QMetaObjectBuilder &, class QByteArray &, class QDeclarativeParser::Object *, struct QDeclarativeParser::Object::DynamicProperty const &)
+ ?compileTree@QDeclarativeCompiler@@AAEXPAVObject@QDeclarativeParser@@@Z @ 739 NONAME ; void QDeclarativeCompiler::compileTree(class QDeclarativeParser::Object *)
+ ?completeComponentBuild@QDeclarativeCompiler@@AAE_NXZ @ 740 NONAME ; bool QDeclarativeCompiler::completeComponentBuild(void)
+ ?completeCreate@QDeclarativeComponent@@UAEXXZ @ 741 NONAME ; void QDeclarativeComponent::completeCreate(void)
+ ?completeItem@QDeclarativeVisualDataModel@@UAEXXZ @ 742 NONAME ; void QDeclarativeVisualDataModel::completeItem(void)
+ ?completeItem@QDeclarativeVisualItemModel@@UAEXXZ @ 743 NONAME ; void QDeclarativeVisualItemModel::completeItem(void)
+ ?completed@QDeclarativeState@@IAEXXZ @ 744 NONAME ; void QDeclarativeState::completed(void)
+ ?componentComplete@QDeclarativeAnchors@@QAEXXZ @ 745 NONAME ; void QDeclarativeAnchors::componentComplete(void)
+ ?componentComplete@QDeclarativeAnimatedImage@@MAEXXZ @ 746 NONAME ; void QDeclarativeAnimatedImage::componentComplete(void)
+ ?componentComplete@QDeclarativeBasePositioner@@MAEXXZ @ 747 NONAME ; void QDeclarativeBasePositioner::componentComplete(void)
+ ?componentComplete@QDeclarativeBind@@MAEXXZ @ 748 NONAME ; void QDeclarativeBind::componentComplete(void)
+ ?componentComplete@QDeclarativeConnections@@EAEXXZ @ 749 NONAME ; void QDeclarativeConnections::componentComplete(void)
+ ?componentComplete@QDeclarativeDateTimeFormatter@@UAEXXZ @ 750 NONAME ; void QDeclarativeDateTimeFormatter::componentComplete(void)
+ ?componentComplete@QDeclarativeGridView@@MAEXXZ @ 751 NONAME ; void QDeclarativeGridView::componentComplete(void)
+ ?componentComplete@QDeclarativeImageBase@@MAEXXZ @ 752 NONAME ; void QDeclarativeImageBase::componentComplete(void)
+ ?componentComplete@QDeclarativeItem@@MAEXXZ @ 753 NONAME ; void QDeclarativeItem::componentComplete(void)
+ ?componentComplete@QDeclarativeListView@@MAEXXZ @ 754 NONAME ; void QDeclarativeListView::componentComplete(void)
+ ?componentComplete@QDeclarativeNumberFormatter@@UAEXXZ @ 755 NONAME ; void QDeclarativeNumberFormatter::componentComplete(void)
+ ?componentComplete@QDeclarativeParserStatus@@UAEXXZ @ 756 NONAME ; void QDeclarativeParserStatus::componentComplete(void)
+ ?componentComplete@QDeclarativeParticles@@MAEXXZ @ 757 NONAME ; void QDeclarativeParticles::componentComplete(void)
+ ?componentComplete@QDeclarativePath@@MAEXXZ @ 758 NONAME ; void QDeclarativePath::componentComplete(void)
+ ?componentComplete@QDeclarativePathView@@MAEXXZ @ 759 NONAME ; void QDeclarativePathView::componentComplete(void)
+ ?componentComplete@QDeclarativeRepeater@@MAEXXZ @ 760 NONAME ; void QDeclarativeRepeater::componentComplete(void)
+ ?componentComplete@QDeclarativeStateGroup@@UAEXXZ @ 761 NONAME ; void QDeclarativeStateGroup::componentComplete(void)
+ ?componentComplete@QDeclarativeText@@UAEXXZ @ 762 NONAME ; void QDeclarativeText::componentComplete(void)
+ ?componentComplete@QDeclarativeTextEdit@@UAEXXZ @ 763 NONAME ; void QDeclarativeTextEdit::componentComplete(void)
+ ?componentComplete@QDeclarativeTimer@@MAEXXZ @ 764 NONAME ; void QDeclarativeTimer::componentComplete(void)
+ ?componentComplete@QDeclarativeWebView@@EAEXXZ @ 765 NONAME ; void QDeclarativeWebView::componentComplete(void)
+ ?componentComplete@QDeclarativeXmlListModel@@UAEXXZ @ 766 NONAME ; void QDeclarativeXmlListModel::componentComplete(void)
+ ?componentRoot@QDeclarativeDomComponent@@QBE?AVQDeclarativeDomObject@@XZ @ 767 NONAME ; class QDeclarativeDomObject QDeclarativeDomComponent::componentRoot(void) const
+ ?componentState@QDeclarativeCompiler@@AAE?AUComponentCompileState@1@PAVObject@QDeclarativeParser@@@Z @ 768 NONAME ; struct QDeclarativeCompiler::ComponentCompileState QDeclarativeCompiler::componentState(class QDeclarativeParser::Object *)
+ ?componentTypeRef@QDeclarativeCompiler@@AAEHXZ @ 769 NONAME ; int QDeclarativeCompiler::componentTypeRef(void)
+ ?connectNotifySignal@QDeclarativeProperty@@QBE_NPAVQObject@@H@Z @ 770 NONAME ; bool QDeclarativeProperty::connectNotifySignal(class QObject *, int) const
+ ?connectNotifySignal@QDeclarativeProperty@@QBE_NPAVQObject@@PBD@Z @ 771 NONAME ; bool QDeclarativeProperty::connectNotifySignal(class QObject *, char const *) const
+ ?connectSignals@QDeclarativeConnections@@AAEXXZ @ 772 NONAME ; void QDeclarativeConnections::connectSignals(void)
+ ?constructor@QMetaObjectBuilder@@QBE?AVQMetaMethodBuilder@@H@Z @ 773 NONAME ; class QMetaMethodBuilder QMetaObjectBuilder::constructor(int) const
+ ?constructorCount@QMetaObjectBuilder@@QBEHXZ @ 774 NONAME ; int QMetaObjectBuilder::constructorCount(void) const
+ ?contains@QDeclarativePropertyMap@@QBE_NABVQString@@@Z @ 775 NONAME ; bool QDeclarativePropertyMap::contains(class QString const &) const
+ ?contentHeight@QDeclarativeFlickable@@QBEMXZ @ 776 NONAME ; float QDeclarativeFlickable::contentHeight(void) const
+ ?contentHeightChanged@QDeclarativeFlickable@@IAEXXZ @ 777 NONAME ; void QDeclarativeFlickable::contentHeightChanged(void)
+ ?contentWidth@QDeclarativeFlickable@@QBEMXZ @ 778 NONAME ; float QDeclarativeFlickable::contentWidth(void) const
+ ?contentWidthChanged@QDeclarativeFlickable@@IAEXXZ @ 779 NONAME ; void QDeclarativeFlickable::contentWidthChanged(void)
+ ?contentX@QDeclarativeFlickable@@QBEMXZ @ 780 NONAME ; float QDeclarativeFlickable::contentX(void) const
+ ?contentXChanged@QDeclarativeFlickable@@IAEXXZ @ 781 NONAME ; void QDeclarativeFlickable::contentXChanged(void)
+ ?contentY@QDeclarativeFlickable@@QBEMXZ @ 782 NONAME ; float QDeclarativeFlickable::contentY(void) const
+ ?contentYChanged@QDeclarativeFlickable@@IAEXXZ @ 783 NONAME ; void QDeclarativeFlickable::contentYChanged(void)
+ ?contentsScale@QDeclarativePaintedItem@@QBEMXZ @ 784 NONAME ; float QDeclarativePaintedItem::contentsScale(void) const
+ ?contentsScaleChanged@QDeclarativePaintedItem@@IAEXXZ @ 785 NONAME ; void QDeclarativePaintedItem::contentsScaleChanged(void)
+ ?contentsSize@QDeclarativePaintedItem@@QBE?AVQSize@@XZ @ 786 NONAME ; class QSize QDeclarativePaintedItem::contentsSize(void) const
+ ?contentsSizeChanged@QDeclarativePaintedItem@@IAEXXZ @ 787 NONAME ; void QDeclarativePaintedItem::contentsSizeChanged(void)
+ ?context@QDeclarativeExpression@@QBEPAVQDeclarativeContext@@XZ @ 788 NONAME ; class QDeclarativeContext * QDeclarativeExpression::context(void) const
+ ?context@QDeclarativeScriptString@@QBEPAVQDeclarativeContext@@XZ @ 789 NONAME ; class QDeclarativeContext * QDeclarativeScriptString::context(void) const
+ ?contextDebugId@QDeclarativeDebugObjectReference@@QBEHXZ @ 790 NONAME ; int QDeclarativeDebugObjectReference::contextDebugId(void) const
+ ?contextForObject@QDeclarativeEngine@@SAPAVQDeclarativeContext@@PBVQObject@@@Z @ 791 NONAME ; class QDeclarativeContext * QDeclarativeEngine::contextForObject(class QObject const *)
+ ?contextProperty@QDeclarativeContext@@QBE?AVQVariant@@ABVQString@@@Z @ 792 NONAME ; class QVariant QDeclarativeContext::contextProperty(class QString const &) const
+ ?context_at@QDeclarativeContextPrivate@@SAPAVQObject@@PAU?$QDeclarativeListProperty@VQObject@@@@H@Z @ 793 NONAME ; class QObject * QDeclarativeContextPrivate::context_at(struct QDeclarativeListProperty<class QObject> *, int)
+ ?context_count@QDeclarativeContextPrivate@@SAHPAU?$QDeclarativeListProperty@VQObject@@@@@Z @ 794 NONAME ; int QDeclarativeContextPrivate::context_count(struct QDeclarativeListProperty<class QObject> *)
+ ?contexts@QDeclarativeDebugContextReference@@QBE?AV?$QList@VQDeclarativeDebugContextReference@@@@XZ @ 795 NONAME ; class QList<class QDeclarativeDebugContextReference> QDeclarativeDebugContextReference::contexts(void) const
+ ?continueExecute@QDeclarativeView@@AAEXXZ @ 796 NONAME ; void QDeclarativeView::continueExecute(void)
+ ?control1X@QDeclarativePathCubic@@QBEMXZ @ 797 NONAME ; float QDeclarativePathCubic::control1X(void) const
+ ?control1Y@QDeclarativePathCubic@@QBEMXZ @ 798 NONAME ; float QDeclarativePathCubic::control1Y(void) const
+ ?control2X@QDeclarativePathCubic@@QBEMXZ @ 799 NONAME ; float QDeclarativePathCubic::control2X(void) const
+ ?control2Y@QDeclarativePathCubic@@QBEMXZ @ 800 NONAME ; float QDeclarativePathCubic::control2Y(void) const
+ ?controlX@QDeclarativePathQuad@@QBEMXZ @ 801 NONAME ; float QDeclarativePathQuad::controlX(void) const
+ ?controlY@QDeclarativePathQuad@@QBEMXZ @ 802 NONAME ; float QDeclarativePathQuad::controlY(void) const
+ ?copy@QDeclarativeMetaType@@SA_NHPAXPBX@Z @ 803 NONAME ; bool QDeclarativeMetaType::copy(int, void *, void const *)
+ ?count@QDeclarativeGridView@@QBEHXZ @ 804 NONAME ; int QDeclarativeGridView::count(void) const
+ ?count@QDeclarativeListAccessor@@QBEHXZ @ 805 NONAME ; int QDeclarativeListAccessor::count(void) const
+ ?count@QDeclarativeListModel@@UBEHXZ @ 806 NONAME ; int QDeclarativeListModel::count(void) const
+ ?count@QDeclarativeListReference@@QBEHXZ @ 807 NONAME ; int QDeclarativeListReference::count(void) const
+ ?count@QDeclarativeListView@@QBEHXZ @ 808 NONAME ; int QDeclarativeListView::count(void) const
+ ?count@QDeclarativeOpenMetaObject@@QBEHXZ @ 809 NONAME ; int QDeclarativeOpenMetaObject::count(void) const
+ ?count@QDeclarativeParticles@@QBEHXZ @ 810 NONAME ; int QDeclarativeParticles::count(void) const
+ ?count@QDeclarativePathView@@QBEHXZ @ 811 NONAME ; int QDeclarativePathView::count(void) const
+ ?count@QDeclarativePropertyMap@@QBEHXZ @ 812 NONAME ; int QDeclarativePropertyMap::count(void) const
+ ?count@QDeclarativeRepeater@@QBEHXZ @ 813 NONAME ; int QDeclarativeRepeater::count(void) const
+ ?count@QDeclarativeVisualDataModel@@UBEHXZ @ 814 NONAME ; int QDeclarativeVisualDataModel::count(void) const
+ ?count@QDeclarativeVisualItemModel@@UBEHXZ @ 815 NONAME ; int QDeclarativeVisualItemModel::count(void) const
+ ?count@QDeclarativeXmlListModel@@UBEHXZ @ 816 NONAME ; int QDeclarativeXmlListModel::count(void) const
+ ?countChanged@QDeclarativeGridView@@IAEXXZ @ 817 NONAME ; void QDeclarativeGridView::countChanged(void)
+ ?countChanged@QDeclarativeListModel@@IAEXH@Z @ 818 NONAME ; void QDeclarativeListModel::countChanged(int)
+ ?countChanged@QDeclarativeListView@@IAEXXZ @ 819 NONAME ; void QDeclarativeListView::countChanged(void)
+ ?countChanged@QDeclarativeParticles@@IAEXXZ @ 820 NONAME ; void QDeclarativeParticles::countChanged(void)
+ ?countChanged@QDeclarativeRepeater@@IAEXXZ @ 821 NONAME ; void QDeclarativeRepeater::countChanged(void)
+ ?countChanged@QDeclarativeVisualModel@@IAEXXZ @ 822 NONAME ; void QDeclarativeVisualModel::countChanged(void)
+ ?countChanged@QDeclarativeXmlListModel@@IAEXXZ @ 823 NONAME ; void QDeclarativeXmlListModel::countChanged(void)
+ ?create@QDeclarativeComponent@@UAEPAVQObject@@PAVQDeclarativeContext@@@Z @ 824 NONAME ; class QObject * QDeclarativeComponent::create(class QDeclarativeContext *)
+ ?create@QDeclarativeType@@QBEPAVQObject@@XZ @ 825 NONAME ; class QObject * QDeclarativeType::create(void) const
+ ?createCursor@QDeclarativeTextInput@@AAEXXZ @ 826 NONAME ; void QDeclarativeTextInput::createCursor(void)
+ ?createObject@QDeclarativeComponent@@QAE?AVQScriptValue@@XZ @ 827 NONAME ; class QScriptValue QDeclarativeComponent::createObject(void)
+ ?createPlugin@QDeclarativeWebPage@@MAEPAVQObject@@ABVQString@@ABVQUrl@@ABVQStringList@@2@Z @ 828 NONAME ; class QObject * QDeclarativeWebPage::createPlugin(class QString const &, class QUrl const &, class QStringList const &, class QStringList const &)
+ ?createPointCache@QDeclarativePath@@ABEXXZ @ 829 NONAME ; void QDeclarativePath::createPointCache(void) const
+ ?createProperty@QDeclarativeOpenMetaObject@@MAEHPBD0@Z @ 830 NONAME ; int QDeclarativeOpenMetaObject::createProperty(char const *, char const *)
+ ?createProperty@QDeclarativeOpenMetaObjectType@@QAEHABVQByteArray@@@Z @ 831 NONAME ; int QDeclarativeOpenMetaObjectType::createProperty(class QByteArray const &)
+ ?createWindow@QDeclarativeWebPage@@MAEPAVQWebPage@@W4WebWindowType@2@@Z @ 832 NONAME ; class QWebPage * QDeclarativeWebPage::createWindow(enum QWebPage::WebWindowType)
+ ?createWindow@QDeclarativeWebView@@IAEPAV1@W4WebWindowType@QWebPage@@@Z @ 833 NONAME ; class QDeclarativeWebView * QDeclarativeWebView::createWindow(enum QWebPage::WebWindowType)
+ ?created@QDeclarativeParticleMotion@@UAEXAAVQDeclarativeParticle@@@Z @ 834 NONAME ; void QDeclarativeParticleMotion::created(class QDeclarativeParticle &)
+ ?created@QDeclarativeParticleMotionWander@@UAEXAAVQDeclarativeParticle@@@Z @ 835 NONAME ; void QDeclarativeParticleMotionWander::created(class QDeclarativeParticle &)
+ ?createdItem@QDeclarativeGridView@@AAEXHPAVQDeclarativeItem@@@Z @ 836 NONAME ; void QDeclarativeGridView::createdItem(int, class QDeclarativeItem *)
+ ?createdItem@QDeclarativeListView@@AAEXHPAVQDeclarativeItem@@@Z @ 837 NONAME ; void QDeclarativeListView::createdItem(int, class QDeclarativeItem *)
+ ?createdItem@QDeclarativePathView@@AAEXHPAVQDeclarativeItem@@@Z @ 838 NONAME ; void QDeclarativePathView::createdItem(int, class QDeclarativeItem *)
+ ?createdItem@QDeclarativeVisualModel@@IAEXHPAVQDeclarativeItem@@@Z @ 839 NONAME ; void QDeclarativeVisualModel::createdItem(int, class QDeclarativeItem *)
+ ?createdPackage@QDeclarativeVisualDataModel@@IAEXHPAVQDeclarativePackage@@@Z @ 840 NONAME ; void QDeclarativeVisualDataModel::createdPackage(int, class QDeclarativePackage *)
+ ?creationContext@QDeclarativeComponent@@QBEPAVQDeclarativeContext@@XZ @ 841 NONAME ; class QDeclarativeContext * QDeclarativeComponent::creationContext(void) const
+ ?criteria@QDeclarativeViewSection@@QBE?AW4SectionCriteria@1@XZ @ 842 NONAME ; enum QDeclarativeViewSection::SectionCriteria QDeclarativeViewSection::criteria(void) const
+ ?currentFrame@QDeclarativeAnimatedImage@@QBEHXZ @ 843 NONAME ; int QDeclarativeAnimatedImage::currentFrame(void) const
+ ?currentIndex@QDeclarativeGridView@@QBEHXZ @ 844 NONAME ; int QDeclarativeGridView::currentIndex(void) const
+ ?currentIndex@QDeclarativeListView@@QBEHXZ @ 845 NONAME ; int QDeclarativeListView::currentIndex(void) const
+ ?currentIndex@QDeclarativePathView@@QBEHXZ @ 846 NONAME ; int QDeclarativePathView::currentIndex(void) const
+ ?currentIndexChanged@QDeclarativeGridView@@IAEXXZ @ 847 NONAME ; void QDeclarativeGridView::currentIndexChanged(void)
+ ?currentIndexChanged@QDeclarativeListView@@IAEXXZ @ 848 NONAME ; void QDeclarativeListView::currentIndexChanged(void)
+ ?currentIndexChanged@QDeclarativePathView@@IAEXXZ @ 849 NONAME ; void QDeclarativePathView::currentIndexChanged(void)
+ ?currentItem@QDeclarativeGridView@@QAEPAVQDeclarativeItem@@XZ @ 850 NONAME ; class QDeclarativeItem * QDeclarativeGridView::currentItem(void)
+ ?currentItem@QDeclarativeListView@@QAEPAVQDeclarativeItem@@XZ @ 851 NONAME ; class QDeclarativeItem * QDeclarativeListView::currentItem(void)
+ ?currentSection@QDeclarativeListView@@QBE?AVQString@@XZ @ 852 NONAME ; class QString QDeclarativeListView::currentSection(void) const
+ ?currentSectionChanged@QDeclarativeListView@@IAEXXZ @ 853 NONAME ; void QDeclarativeListView::currentSectionChanged(void)
+ ?cursorDelegate@QDeclarativeTextEdit@@QBEPAVQDeclarativeComponent@@XZ @ 854 NONAME ; class QDeclarativeComponent * QDeclarativeTextEdit::cursorDelegate(void) const
+ ?cursorDelegate@QDeclarativeTextInput@@QBEPAVQDeclarativeComponent@@XZ @ 855 NONAME ; class QDeclarativeComponent * QDeclarativeTextInput::cursorDelegate(void) const
+ ?cursorDelegateChanged@QDeclarativeTextEdit@@IAEXXZ @ 856 NONAME ; void QDeclarativeTextEdit::cursorDelegateChanged(void)
+ ?cursorDelegateChanged@QDeclarativeTextInput@@IAEXXZ @ 857 NONAME ; void QDeclarativeTextInput::cursorDelegateChanged(void)
+ ?cursorPosChanged@QDeclarativeTextInput@@AAEXXZ @ 858 NONAME ; void QDeclarativeTextInput::cursorPosChanged(void)
+ ?cursorPosition@QDeclarativeTextEdit@@QBEHXZ @ 859 NONAME ; int QDeclarativeTextEdit::cursorPosition(void) const
+ ?cursorPosition@QDeclarativeTextInput@@QBEHXZ @ 860 NONAME ; int QDeclarativeTextInput::cursorPosition(void) const
+ ?cursorPositionChanged@QDeclarativeTextEdit@@IAEXXZ @ 861 NONAME ; void QDeclarativeTextEdit::cursorPositionChanged(void)
+ ?cursorPositionChanged@QDeclarativeTextInput@@IAEXXZ @ 862 NONAME ; void QDeclarativeTextInput::cursorPositionChanged(void)
+ ?cursorRect@QDeclarativeTextEdit@@QBE?AVQRect@@XZ @ 863 NONAME ; class QRect QDeclarativeTextEdit::cursorRect(void) const
+ ?cursorRect@QDeclarativeTextInput@@QBE?AVQRect@@XZ @ 864 NONAME ; class QRect QDeclarativeTextInput::cursorRect(void) const
+ ?cursorVisibleChanged@QDeclarativeTextEdit@@IAEX_N@Z @ 865 NONAME ; void QDeclarativeTextEdit::cursorVisibleChanged(bool)
+ ?cursorVisibleChanged@QDeclarativeTextInput@@IAEX_N@Z @ 866 NONAME ; void QDeclarativeTextInput::cursorVisibleChanged(bool)
+ ?customParser@QDeclarativeType@@QBEPAVQDeclarativeCustomParser@@XZ @ 867 NONAME ; class QDeclarativeCustomParser * QDeclarativeType::customParser(void) const
+ ?customStringConverter@QDeclarativeMetaType@@SAP6A?AVQVariant@@ABVQString@@@ZH@Z @ 868 NONAME ; class QVariant (*)(class QString const &) QDeclarativeMetaType::customStringConverter(int)
+ ?customTypeData@QDeclarativeDomObject@@QBE?AVQByteArray@@XZ @ 869 NONAME ; class QByteArray QDeclarativeDomObject::customTypeData(void) const
+ ?d_func@QDeclarativeAnchorChanges@@AAEPAVQDeclarativeAnchorChangesPrivate@@XZ @ 870 NONAME ; class QDeclarativeAnchorChangesPrivate * QDeclarativeAnchorChanges::d_func(void)
+ ?d_func@QDeclarativeAnchorChanges@@ABEPBVQDeclarativeAnchorChangesPrivate@@XZ @ 871 NONAME ; class QDeclarativeAnchorChangesPrivate const * QDeclarativeAnchorChanges::d_func(void) const
+ ?d_func@QDeclarativeAnchors@@AAEPAVQDeclarativeAnchorsPrivate@@XZ @ 872 NONAME ; class QDeclarativeAnchorsPrivate * QDeclarativeAnchors::d_func(void)
+ ?d_func@QDeclarativeAnchors@@ABEPBVQDeclarativeAnchorsPrivate@@XZ @ 873 NONAME ; class QDeclarativeAnchorsPrivate const * QDeclarativeAnchors::d_func(void) const
+ ?d_func@QDeclarativeAnimatedImage@@AAEPAVQDeclarativeAnimatedImagePrivate@@XZ @ 874 NONAME ; class QDeclarativeAnimatedImagePrivate * QDeclarativeAnimatedImage::d_func(void)
+ ?d_func@QDeclarativeAnimatedImage@@ABEPBVQDeclarativeAnimatedImagePrivate@@XZ @ 875 NONAME ; class QDeclarativeAnimatedImagePrivate const * QDeclarativeAnimatedImage::d_func(void) const
+ ?d_func@QDeclarativeBasePositioner@@AAEPAVQDeclarativeBasePositionerPrivate@@XZ @ 876 NONAME ; class QDeclarativeBasePositionerPrivate * QDeclarativeBasePositioner::d_func(void)
+ ?d_func@QDeclarativeBasePositioner@@ABEPBVQDeclarativeBasePositionerPrivate@@XZ @ 877 NONAME ; class QDeclarativeBasePositionerPrivate const * QDeclarativeBasePositioner::d_func(void) const
+ ?d_func@QDeclarativeBehavior@@AAEPAVQDeclarativeBehaviorPrivate@@XZ @ 878 NONAME ; class QDeclarativeBehaviorPrivate * QDeclarativeBehavior::d_func(void)
+ ?d_func@QDeclarativeBehavior@@ABEPBVQDeclarativeBehaviorPrivate@@XZ @ 879 NONAME ; class QDeclarativeBehaviorPrivate const * QDeclarativeBehavior::d_func(void) const
+ ?d_func@QDeclarativeBind@@AAEPAVQDeclarativeBindPrivate@@XZ @ 880 NONAME ; class QDeclarativeBindPrivate * QDeclarativeBind::d_func(void)
+ ?d_func@QDeclarativeBind@@ABEPBVQDeclarativeBindPrivate@@XZ @ 881 NONAME ; class QDeclarativeBindPrivate const * QDeclarativeBind::d_func(void) const
+ ?d_func@QDeclarativeBorderImage@@AAEPAVQDeclarativeBorderImagePrivate@@XZ @ 882 NONAME ; class QDeclarativeBorderImagePrivate * QDeclarativeBorderImage::d_func(void)
+ ?d_func@QDeclarativeBorderImage@@ABEPBVQDeclarativeBorderImagePrivate@@XZ @ 883 NONAME ; class QDeclarativeBorderImagePrivate const * QDeclarativeBorderImage::d_func(void) const
+ ?d_func@QDeclarativeComponent@@AAEPAVQDeclarativeComponentPrivate@@XZ @ 884 NONAME ; class QDeclarativeComponentPrivate * QDeclarativeComponent::d_func(void)
+ ?d_func@QDeclarativeComponent@@ABEPBVQDeclarativeComponentPrivate@@XZ @ 885 NONAME ; class QDeclarativeComponentPrivate const * QDeclarativeComponent::d_func(void) const
+ ?d_func@QDeclarativeConnections@@AAEPAVQDeclarativeConnectionsPrivate@@XZ @ 886 NONAME ; class QDeclarativeConnectionsPrivate * QDeclarativeConnections::d_func(void)
+ ?d_func@QDeclarativeConnections@@ABEPBVQDeclarativeConnectionsPrivate@@XZ @ 887 NONAME ; class QDeclarativeConnectionsPrivate const * QDeclarativeConnections::d_func(void) const
+ ?d_func@QDeclarativeContext@@AAEPAVQDeclarativeContextPrivate@@XZ @ 888 NONAME ; class QDeclarativeContextPrivate * QDeclarativeContext::d_func(void)
+ ?d_func@QDeclarativeContext@@ABEPBVQDeclarativeContextPrivate@@XZ @ 889 NONAME ; class QDeclarativeContextPrivate const * QDeclarativeContext::d_func(void) const
+ ?d_func@QDeclarativeDateTimeFormatter@@AAEPAVQDeclarativeDateTimeFormatterPrivate@@XZ @ 890 NONAME ; class QDeclarativeDateTimeFormatterPrivate * QDeclarativeDateTimeFormatter::d_func(void)
+ ?d_func@QDeclarativeDateTimeFormatter@@ABEPBVQDeclarativeDateTimeFormatterPrivate@@XZ @ 891 NONAME ; class QDeclarativeDateTimeFormatterPrivate const * QDeclarativeDateTimeFormatter::d_func(void) const
+ ?d_func@QDeclarativeDebugClient@@AAEPAVQDeclarativeDebugClientPrivate@@XZ @ 892 NONAME ; class QDeclarativeDebugClientPrivate * QDeclarativeDebugClient::d_func(void)
+ ?d_func@QDeclarativeDebugClient@@ABEPBVQDeclarativeDebugClientPrivate@@XZ @ 893 NONAME ; class QDeclarativeDebugClientPrivate const * QDeclarativeDebugClient::d_func(void) const
+ ?d_func@QDeclarativeDebugService@@AAEPAVQDeclarativeDebugServicePrivate@@XZ @ 894 NONAME ; class QDeclarativeDebugServicePrivate * QDeclarativeDebugService::d_func(void)
+ ?d_func@QDeclarativeDebugService@@ABEPBVQDeclarativeDebugServicePrivate@@XZ @ 895 NONAME ; class QDeclarativeDebugServicePrivate const * QDeclarativeDebugService::d_func(void) const
+ ?d_func@QDeclarativeEaseFollow@@AAEPAVQDeclarativeEaseFollowPrivate@@XZ @ 896 NONAME ; class QDeclarativeEaseFollowPrivate * QDeclarativeEaseFollow::d_func(void)
+ ?d_func@QDeclarativeEaseFollow@@ABEPBVQDeclarativeEaseFollowPrivate@@XZ @ 897 NONAME ; class QDeclarativeEaseFollowPrivate const * QDeclarativeEaseFollow::d_func(void) const
+ ?d_func@QDeclarativeEngine@@AAEPAVQDeclarativeEnginePrivate@@XZ @ 898 NONAME ; class QDeclarativeEnginePrivate * QDeclarativeEngine::d_func(void)
+ ?d_func@QDeclarativeEngine@@ABEPBVQDeclarativeEnginePrivate@@XZ @ 899 NONAME ; class QDeclarativeEnginePrivate const * QDeclarativeEngine::d_func(void) const
+ ?d_func@QDeclarativeEngineDebug@@AAEPAVQDeclarativeEngineDebugPrivate@@XZ @ 900 NONAME ; class QDeclarativeEngineDebugPrivate * QDeclarativeEngineDebug::d_func(void)
+ ?d_func@QDeclarativeEngineDebug@@ABEPBVQDeclarativeEngineDebugPrivate@@XZ @ 901 NONAME ; class QDeclarativeEngineDebugPrivate const * QDeclarativeEngineDebug::d_func(void) const
+ ?d_func@QDeclarativeExpression@@AAEPAVQDeclarativeExpressionPrivate@@XZ @ 902 NONAME ; class QDeclarativeExpressionPrivate * QDeclarativeExpression::d_func(void)
+ ?d_func@QDeclarativeExpression@@ABEPBVQDeclarativeExpressionPrivate@@XZ @ 903 NONAME ; class QDeclarativeExpressionPrivate const * QDeclarativeExpression::d_func(void) const
+ ?d_func@QDeclarativeFlickable@@AAEPAVQDeclarativeFlickablePrivate@@XZ @ 904 NONAME ; class QDeclarativeFlickablePrivate * QDeclarativeFlickable::d_func(void)
+ ?d_func@QDeclarativeFlickable@@ABEPBVQDeclarativeFlickablePrivate@@XZ @ 905 NONAME ; class QDeclarativeFlickablePrivate const * QDeclarativeFlickable::d_func(void) const
+ ?d_func@QDeclarativeFlipable@@AAEPAVQDeclarativeFlipablePrivate@@XZ @ 906 NONAME ; class QDeclarativeFlipablePrivate * QDeclarativeFlipable::d_func(void)
+ ?d_func@QDeclarativeFlipable@@ABEPBVQDeclarativeFlipablePrivate@@XZ @ 907 NONAME ; class QDeclarativeFlipablePrivate const * QDeclarativeFlipable::d_func(void) const
+ ?d_func@QDeclarativeFlow@@AAEPAVQDeclarativeFlowPrivate@@XZ @ 908 NONAME ; class QDeclarativeFlowPrivate * QDeclarativeFlow::d_func(void)
+ ?d_func@QDeclarativeFlow@@ABEPBVQDeclarativeFlowPrivate@@XZ @ 909 NONAME ; class QDeclarativeFlowPrivate const * QDeclarativeFlow::d_func(void) const
+ ?d_func@QDeclarativeFontLoader@@AAEPAVQDeclarativeFontLoaderPrivate@@XZ @ 910 NONAME ; class QDeclarativeFontLoaderPrivate * QDeclarativeFontLoader::d_func(void)
+ ?d_func@QDeclarativeFontLoader@@ABEPBVQDeclarativeFontLoaderPrivate@@XZ @ 911 NONAME ; class QDeclarativeFontLoaderPrivate const * QDeclarativeFontLoader::d_func(void) const
+ ?d_func@QDeclarativeGraphicsObjectContainer@@AAEPAVQDeclarativeGraphicsObjectContainerPrivate@@XZ @ 912 NONAME ; class QDeclarativeGraphicsObjectContainerPrivate * QDeclarativeGraphicsObjectContainer::d_func(void)
+ ?d_func@QDeclarativeGraphicsObjectContainer@@ABEPBVQDeclarativeGraphicsObjectContainerPrivate@@XZ @ 913 NONAME ; class QDeclarativeGraphicsObjectContainerPrivate const * QDeclarativeGraphicsObjectContainer::d_func(void) const
+ ?d_func@QDeclarativeGridView@@AAEPAVQDeclarativeGridViewPrivate@@XZ @ 914 NONAME ; class QDeclarativeGridViewPrivate * QDeclarativeGridView::d_func(void)
+ ?d_func@QDeclarativeGridView@@ABEPBVQDeclarativeGridViewPrivate@@XZ @ 915 NONAME ; class QDeclarativeGridViewPrivate const * QDeclarativeGridView::d_func(void) const
+ ?d_func@QDeclarativeImage@@AAEPAVQDeclarativeImagePrivate@@XZ @ 916 NONAME ; class QDeclarativeImagePrivate * QDeclarativeImage::d_func(void)
+ ?d_func@QDeclarativeImage@@ABEPBVQDeclarativeImagePrivate@@XZ @ 917 NONAME ; class QDeclarativeImagePrivate const * QDeclarativeImage::d_func(void) const
+ ?d_func@QDeclarativeImageBase@@AAEPAVQDeclarativeImageBasePrivate@@XZ @ 918 NONAME ; class QDeclarativeImageBasePrivate * QDeclarativeImageBase::d_func(void)
+ ?d_func@QDeclarativeImageBase@@ABEPBVQDeclarativeImageBasePrivate@@XZ @ 919 NONAME ; class QDeclarativeImageBasePrivate const * QDeclarativeImageBase::d_func(void) const
+ ?d_func@QDeclarativeItem@@AAEPAVQDeclarativeItemPrivate@@XZ @ 920 NONAME ; class QDeclarativeItemPrivate * QDeclarativeItem::d_func(void)
+ ?d_func@QDeclarativeItem@@ABEPBVQDeclarativeItemPrivate@@XZ @ 921 NONAME ; class QDeclarativeItemPrivate const * QDeclarativeItem::d_func(void) const
+ ?d_func@QDeclarativeListView@@AAEPAVQDeclarativeListViewPrivate@@XZ @ 922 NONAME ; class QDeclarativeListViewPrivate * QDeclarativeListView::d_func(void)
+ ?d_func@QDeclarativeListView@@ABEPBVQDeclarativeListViewPrivate@@XZ @ 923 NONAME ; class QDeclarativeListViewPrivate const * QDeclarativeListView::d_func(void) const
+ ?d_func@QDeclarativeLoader@@AAEPAVQDeclarativeLoaderPrivate@@XZ @ 924 NONAME ; class QDeclarativeLoaderPrivate * QDeclarativeLoader::d_func(void)
+ ?d_func@QDeclarativeLoader@@ABEPBVQDeclarativeLoaderPrivate@@XZ @ 925 NONAME ; class QDeclarativeLoaderPrivate const * QDeclarativeLoader::d_func(void) const
+ ?d_func@QDeclarativeMouseArea@@AAEPAVQDeclarativeMouseAreaPrivate@@XZ @ 926 NONAME ; class QDeclarativeMouseAreaPrivate * QDeclarativeMouseArea::d_func(void)
+ ?d_func@QDeclarativeMouseArea@@ABEPBVQDeclarativeMouseAreaPrivate@@XZ @ 927 NONAME ; class QDeclarativeMouseAreaPrivate const * QDeclarativeMouseArea::d_func(void) const
+ ?d_func@QDeclarativeNumberFormatter@@AAEPAVQDeclarativeNumberFormatterPrivate@@XZ @ 928 NONAME ; class QDeclarativeNumberFormatterPrivate * QDeclarativeNumberFormatter::d_func(void)
+ ?d_func@QDeclarativeNumberFormatter@@ABEPBVQDeclarativeNumberFormatterPrivate@@XZ @ 929 NONAME ; class QDeclarativeNumberFormatterPrivate const * QDeclarativeNumberFormatter::d_func(void) const
+ ?d_func@QDeclarativePaintedItem@@AAEPAVQDeclarativePaintedItemPrivate@@XZ @ 930 NONAME ; class QDeclarativePaintedItemPrivate * QDeclarativePaintedItem::d_func(void)
+ ?d_func@QDeclarativePaintedItem@@ABEPBVQDeclarativePaintedItemPrivate@@XZ @ 931 NONAME ; class QDeclarativePaintedItemPrivate const * QDeclarativePaintedItem::d_func(void) const
+ ?d_func@QDeclarativeParentChange@@AAEPAVQDeclarativeParentChangePrivate@@XZ @ 932 NONAME ; class QDeclarativeParentChangePrivate * QDeclarativeParentChange::d_func(void)
+ ?d_func@QDeclarativeParentChange@@ABEPBVQDeclarativeParentChangePrivate@@XZ @ 933 NONAME ; class QDeclarativeParentChangePrivate const * QDeclarativeParentChange::d_func(void) const
+ ?d_func@QDeclarativeParticles@@AAEPAVQDeclarativeParticlesPrivate@@XZ @ 934 NONAME ; class QDeclarativeParticlesPrivate * QDeclarativeParticles::d_func(void)
+ ?d_func@QDeclarativeParticles@@ABEPBVQDeclarativeParticlesPrivate@@XZ @ 935 NONAME ; class QDeclarativeParticlesPrivate const * QDeclarativeParticles::d_func(void) const
+ ?d_func@QDeclarativePath@@AAEPAVQDeclarativePathPrivate@@XZ @ 936 NONAME ; class QDeclarativePathPrivate * QDeclarativePath::d_func(void)
+ ?d_func@QDeclarativePath@@ABEPBVQDeclarativePathPrivate@@XZ @ 937 NONAME ; class QDeclarativePathPrivate const * QDeclarativePath::d_func(void) const
+ ?d_func@QDeclarativePathView@@AAEPAVQDeclarativePathViewPrivate@@XZ @ 938 NONAME ; class QDeclarativePathViewPrivate * QDeclarativePathView::d_func(void)
+ ?d_func@QDeclarativePathView@@ABEPBVQDeclarativePathViewPrivate@@XZ @ 939 NONAME ; class QDeclarativePathViewPrivate const * QDeclarativePathView::d_func(void) const
+ ?d_func@QDeclarativePixmapReply@@AAEPAVQDeclarativePixmapReplyPrivate@@XZ @ 940 NONAME ; class QDeclarativePixmapReplyPrivate * QDeclarativePixmapReply::d_func(void)
+ ?d_func@QDeclarativePixmapReply@@ABEPBVQDeclarativePixmapReplyPrivate@@XZ @ 941 NONAME ; class QDeclarativePixmapReplyPrivate const * QDeclarativePixmapReply::d_func(void) const
+ ?d_func@QDeclarativePropertyChanges@@AAEPAVQDeclarativePropertyChangesPrivate@@XZ @ 942 NONAME ; class QDeclarativePropertyChangesPrivate * QDeclarativePropertyChanges::d_func(void)
+ ?d_func@QDeclarativePropertyChanges@@ABEPBVQDeclarativePropertyChangesPrivate@@XZ @ 943 NONAME ; class QDeclarativePropertyChangesPrivate const * QDeclarativePropertyChanges::d_func(void) const
+ ?d_func@QDeclarativePropertyMap@@AAEPAVQDeclarativePropertyMapPrivate@@XZ @ 944 NONAME ; class QDeclarativePropertyMapPrivate * QDeclarativePropertyMap::d_func(void)
+ ?d_func@QDeclarativePropertyMap@@ABEPBVQDeclarativePropertyMapPrivate@@XZ @ 945 NONAME ; class QDeclarativePropertyMapPrivate const * QDeclarativePropertyMap::d_func(void) const
+ ?d_func@QDeclarativeRectangle@@AAEPAVQDeclarativeRectanglePrivate@@XZ @ 946 NONAME ; class QDeclarativeRectanglePrivate * QDeclarativeRectangle::d_func(void)
+ ?d_func@QDeclarativeRectangle@@ABEPBVQDeclarativeRectanglePrivate@@XZ @ 947 NONAME ; class QDeclarativeRectanglePrivate const * QDeclarativeRectangle::d_func(void) const
+ ?d_func@QDeclarativeRepeater@@AAEPAVQDeclarativeRepeaterPrivate@@XZ @ 948 NONAME ; class QDeclarativeRepeaterPrivate * QDeclarativeRepeater::d_func(void)
+ ?d_func@QDeclarativeRepeater@@ABEPBVQDeclarativeRepeaterPrivate@@XZ @ 949 NONAME ; class QDeclarativeRepeaterPrivate const * QDeclarativeRepeater::d_func(void) const
+ ?d_func@QDeclarativeSpringFollow@@AAEPAVQDeclarativeSpringFollowPrivate@@XZ @ 950 NONAME ; class QDeclarativeSpringFollowPrivate * QDeclarativeSpringFollow::d_func(void)
+ ?d_func@QDeclarativeSpringFollow@@ABEPBVQDeclarativeSpringFollowPrivate@@XZ @ 951 NONAME ; class QDeclarativeSpringFollowPrivate const * QDeclarativeSpringFollow::d_func(void) const
+ ?d_func@QDeclarativeState@@AAEPAVQDeclarativeStatePrivate@@XZ @ 952 NONAME ; class QDeclarativeStatePrivate * QDeclarativeState::d_func(void)
+ ?d_func@QDeclarativeState@@ABEPBVQDeclarativeStatePrivate@@XZ @ 953 NONAME ; class QDeclarativeStatePrivate const * QDeclarativeState::d_func(void) const
+ ?d_func@QDeclarativeStateChangeScript@@AAEPAVQDeclarativeStateChangeScriptPrivate@@XZ @ 954 NONAME ; class QDeclarativeStateChangeScriptPrivate * QDeclarativeStateChangeScript::d_func(void)
+ ?d_func@QDeclarativeStateChangeScript@@ABEPBVQDeclarativeStateChangeScriptPrivate@@XZ @ 955 NONAME ; class QDeclarativeStateChangeScriptPrivate const * QDeclarativeStateChangeScript::d_func(void) const
+ ?d_func@QDeclarativeStateGroup@@AAEPAVQDeclarativeStateGroupPrivate@@XZ @ 956 NONAME ; class QDeclarativeStateGroupPrivate * QDeclarativeStateGroup::d_func(void)
+ ?d_func@QDeclarativeStateGroup@@ABEPBVQDeclarativeStateGroupPrivate@@XZ @ 957 NONAME ; class QDeclarativeStateGroupPrivate const * QDeclarativeStateGroup::d_func(void) const
+ ?d_func@QDeclarativeSystemPalette@@AAEPAVQDeclarativeSystemPalettePrivate@@XZ @ 958 NONAME ; class QDeclarativeSystemPalettePrivate * QDeclarativeSystemPalette::d_func(void)
+ ?d_func@QDeclarativeSystemPalette@@ABEPBVQDeclarativeSystemPalettePrivate@@XZ @ 959 NONAME ; class QDeclarativeSystemPalettePrivate const * QDeclarativeSystemPalette::d_func(void) const
+ ?d_func@QDeclarativeText@@AAEPAVQDeclarativeTextPrivate@@XZ @ 960 NONAME ; class QDeclarativeTextPrivate * QDeclarativeText::d_func(void)
+ ?d_func@QDeclarativeText@@ABEPBVQDeclarativeTextPrivate@@XZ @ 961 NONAME ; class QDeclarativeTextPrivate const * QDeclarativeText::d_func(void) const
+ ?d_func@QDeclarativeTextEdit@@AAEPAVQDeclarativeTextEditPrivate@@XZ @ 962 NONAME ; class QDeclarativeTextEditPrivate * QDeclarativeTextEdit::d_func(void)
+ ?d_func@QDeclarativeTextEdit@@ABEPBVQDeclarativeTextEditPrivate@@XZ @ 963 NONAME ; class QDeclarativeTextEditPrivate const * QDeclarativeTextEdit::d_func(void) const
+ ?d_func@QDeclarativeTextInput@@AAEPAVQDeclarativeTextInputPrivate@@XZ @ 964 NONAME ; class QDeclarativeTextInputPrivate * QDeclarativeTextInput::d_func(void)
+ ?d_func@QDeclarativeTextInput@@ABEPBVQDeclarativeTextInputPrivate@@XZ @ 965 NONAME ; class QDeclarativeTextInputPrivate const * QDeclarativeTextInput::d_func(void) const
+ ?d_func@QDeclarativeTimer@@AAEPAVQDeclarativeTimerPrivate@@XZ @ 966 NONAME ; class QDeclarativeTimerPrivate * QDeclarativeTimer::d_func(void)
+ ?d_func@QDeclarativeTimer@@ABEPBVQDeclarativeTimerPrivate@@XZ @ 967 NONAME ; class QDeclarativeTimerPrivate const * QDeclarativeTimer::d_func(void) const
+ ?d_func@QDeclarativeTransition@@AAEPAVQDeclarativeTransitionPrivate@@XZ @ 968 NONAME ; class QDeclarativeTransitionPrivate * QDeclarativeTransition::d_func(void)
+ ?d_func@QDeclarativeTransition@@ABEPBVQDeclarativeTransitionPrivate@@XZ @ 969 NONAME ; class QDeclarativeTransitionPrivate const * QDeclarativeTransition::d_func(void) const
+ ?d_func@QDeclarativeVisualDataModel@@AAEPAVQDeclarativeVisualDataModelPrivate@@XZ @ 970 NONAME ; class QDeclarativeVisualDataModelPrivate * QDeclarativeVisualDataModel::d_func(void)
+ ?d_func@QDeclarativeVisualDataModel@@ABEPBVQDeclarativeVisualDataModelPrivate@@XZ @ 971 NONAME ; class QDeclarativeVisualDataModelPrivate const * QDeclarativeVisualDataModel::d_func(void) const
+ ?d_func@QDeclarativeVisualItemModel@@AAEPAVQDeclarativeVisualItemModelPrivate@@XZ @ 972 NONAME ; class QDeclarativeVisualItemModelPrivate * QDeclarativeVisualItemModel::d_func(void)
+ ?d_func@QDeclarativeVisualItemModel@@ABEPBVQDeclarativeVisualItemModelPrivate@@XZ @ 973 NONAME ; class QDeclarativeVisualItemModelPrivate const * QDeclarativeVisualItemModel::d_func(void) const
+ ?d_func@QDeclarativeWebView@@AAEPAVQDeclarativeWebViewPrivate@@XZ @ 974 NONAME ; class QDeclarativeWebViewPrivate * QDeclarativeWebView::d_func(void)
+ ?d_func@QDeclarativeWebView@@ABEPBVQDeclarativeWebViewPrivate@@XZ @ 975 NONAME ; class QDeclarativeWebViewPrivate const * QDeclarativeWebView::d_func(void) const
+ ?d_func@QDeclarativeXmlListModel@@AAEPAVQDeclarativeXmlListModelPrivate@@XZ @ 976 NONAME ; class QDeclarativeXmlListModelPrivate * QDeclarativeXmlListModel::d_func(void)
+ ?d_func@QDeclarativeXmlListModel@@ABEPBVQDeclarativeXmlListModelPrivate@@XZ @ 977 NONAME ; class QDeclarativeXmlListModelPrivate const * QDeclarativeXmlListModel::d_func(void) const
+ ?d_func@QMetaEnumBuilder@@ABEPAVQMetaEnumBuilderPrivate@@XZ @ 978 NONAME ; class QMetaEnumBuilderPrivate * QMetaEnumBuilder::d_func(void) const
+ ?d_func@QMetaMethodBuilder@@ABEPAVQMetaMethodBuilderPrivate@@XZ @ 979 NONAME ; class QMetaMethodBuilderPrivate * QMetaMethodBuilder::d_func(void) const
+ ?d_func@QMetaPropertyBuilder@@ABEPAVQMetaPropertyBuilderPrivate@@XZ @ 980 NONAME ; class QMetaPropertyBuilderPrivate * QMetaPropertyBuilder::d_func(void) const
+ ?damping@QDeclarativeSpringFollow@@QBEMXZ @ 981 NONAME ; float QDeclarativeSpringFollow::damping(void) const
+ ?dark@QDeclarativeSystemPalette@@QBE?AVQColor@@XZ @ 982 NONAME ; class QColor QDeclarativeSystemPalette::dark(void) const
+ ?data@QDeclarativeItem@@QAE?AU?$QDeclarativeListProperty@VQObject@@@@XZ @ 983 NONAME ; struct QDeclarativeListProperty<class QObject> QDeclarativeItem::data(void)
+ ?data@QDeclarativeListModel@@UBE?AV?$QHash@HVQVariant@@@@HABV?$QList@H@@@Z @ 984 NONAME ; class QHash<int, class QVariant> QDeclarativeListModel::data(int, class QList<int> const &) const
+ ?data@QDeclarativeListModel@@UBE?AVQVariant@@HH@Z @ 985 NONAME ; class QVariant QDeclarativeListModel::data(int, int) const
+ ?data@QDeclarativeXmlListModel@@UBE?AV?$QHash@HVQVariant@@@@HABV?$QList@H@@@Z @ 986 NONAME ; class QHash<int, class QVariant> QDeclarativeXmlListModel::data(int, class QList<int> const &) const
+ ?data@QDeclarativeXmlListModel@@UBE?AVQVariant@@HH@Z @ 987 NONAME ; class QVariant QDeclarativeXmlListModel::data(int, int) const
+ ?date@QDeclarativeDateTimeFormatter@@QBE?AVQDate@@XZ @ 988 NONAME ; class QDate QDeclarativeDateTimeFormatter::date(void) const
+ ?dateFormat@QDeclarativeDateTimeFormatter@@QBE?AVQString@@XZ @ 989 NONAME ; class QString QDeclarativeDateTimeFormatter::dateFormat(void) const
+ ?dateFromString@QDeclarativeStringConverters@@YA?AVQDate@@ABVQString@@PA_N@Z @ 990 NONAME ; class QDate QDeclarativeStringConverters::dateFromString(class QString const &, bool *)
+ ?dateText@QDeclarativeDateTimeFormatter@@QBE?AVQString@@XZ @ 991 NONAME ; class QString QDeclarativeDateTimeFormatter::dateText(void) const
+ ?dateTime@QDeclarativeDateTimeFormatter@@QBE?AVQDateTime@@XZ @ 992 NONAME ; class QDateTime QDeclarativeDateTimeFormatter::dateTime(void) const
+ ?dateTimeFormat@QDeclarativeDateTimeFormatter@@QBE?AVQString@@XZ @ 993 NONAME ; class QString QDeclarativeDateTimeFormatter::dateTimeFormat(void) const
+ ?dateTimeFromString@QDeclarativeStringConverters@@YA?AVQDateTime@@ABVQString@@PA_N@Z @ 994 NONAME ; class QDateTime QDeclarativeStringConverters::dateTimeFromString(class QString const &, bool *)
+ ?dateTimeText@QDeclarativeDateTimeFormatter@@QBE?AVQString@@XZ @ 995 NONAME ; class QString QDeclarativeDateTimeFormatter::dateTimeText(void) const
+ ?debugId@QDeclarativeDebugContextReference@@QBEHXZ @ 996 NONAME ; int QDeclarativeDebugContextReference::debugId(void) const
+ ?debugId@QDeclarativeDebugEngineReference@@QBEHXZ @ 997 NONAME ; int QDeclarativeDebugEngineReference::debugId(void) const
+ ?debugId@QDeclarativeDebugObjectReference@@QBEHXZ @ 998 NONAME ; int QDeclarativeDebugObjectReference::debugId(void) const
+ ?decrementCurrentIndex@QDeclarativeListView@@QAEXXZ @ 999 NONAME ; void QDeclarativeListView::decrementCurrentIndex(void)
+ ?defaultMethod@QDeclarativeMetaType@@SA?AVQMetaMethod@@PAVQObject@@@Z @ 1000 NONAME ; class QMetaMethod QDeclarativeMetaType::defaultMethod(class QObject *)
+ ?defaultMethod@QDeclarativeMetaType@@SA?AVQMetaMethod@@PBUQMetaObject@@@Z @ 1001 NONAME ; class QMetaMethod QDeclarativeMetaType::defaultMethod(struct QMetaObject const *)
+ ?defaultProperty@QDeclarativeMetaType@@SA?AVQMetaProperty@@PAVQObject@@@Z @ 1002 NONAME ; class QMetaProperty QDeclarativeMetaType::defaultProperty(class QObject *)
+ ?defaultProperty@QDeclarativeMetaType@@SA?AVQMetaProperty@@PBUQMetaObject@@@Z @ 1003 NONAME ; class QMetaProperty QDeclarativeMetaType::defaultProperty(struct QMetaObject const *)
+ ?defaultValue@QDeclarativeDomDynamicProperty@@QBE?AVQDeclarativeDomProperty@@XZ @ 1004 NONAME ; class QDeclarativeDomProperty QDeclarativeDomDynamicProperty::defaultValue(void) const
+ ?deferredProperties@QDeclarativeCompiler@@AAE?AVQStringList@@PAVObject@QDeclarativeParser@@@Z @ 1005 NONAME ; class QStringList QDeclarativeCompiler::deferredProperties(class QDeclarativeParser::Object *)
+ ?delegate@QDeclarativeGridView@@QBEPAVQDeclarativeComponent@@XZ @ 1006 NONAME ; class QDeclarativeComponent * QDeclarativeGridView::delegate(void) const
+ ?delegate@QDeclarativeListView@@QBEPAVQDeclarativeComponent@@XZ @ 1007 NONAME ; class QDeclarativeComponent * QDeclarativeListView::delegate(void) const
+ ?delegate@QDeclarativePathView@@QBEPAVQDeclarativeComponent@@XZ @ 1008 NONAME ; class QDeclarativeComponent * QDeclarativePathView::delegate(void) const
+ ?delegate@QDeclarativeRepeater@@QBEPAVQDeclarativeComponent@@XZ @ 1009 NONAME ; class QDeclarativeComponent * QDeclarativeRepeater::delegate(void) const
+ ?delegate@QDeclarativeViewSection@@QBEPAVQDeclarativeComponent@@XZ @ 1010 NONAME ; class QDeclarativeComponent * QDeclarativeViewSection::delegate(void) const
+ ?delegate@QDeclarativeVisualDataModel@@QBEPAVQDeclarativeComponent@@XZ @ 1011 NONAME ; class QDeclarativeComponent * QDeclarativeVisualDataModel::delegate(void) const
+ ?delegateChanged@QDeclarativeRepeater@@IAEXXZ @ 1012 NONAME ; void QDeclarativeRepeater::delegateChanged(void)
+ ?delegateChanged@QDeclarativeViewSection@@IAEXXZ @ 1013 NONAME ; void QDeclarativeViewSection::delegateChanged(void)
+ ?deleteFromBinding@QDeclarativeAction@@QAEXXZ @ 1014 NONAME ; void QDeclarativeAction::deleteFromBinding(void)
+ ?description@QDeclarativeError@@QBE?AVQString@@XZ @ 1015 NONAME ; class QString QDeclarativeError::description(void) const
+ ?deserialize@QMetaObjectBuilder@@QAEXAAVQDataStream@@ABV?$QMap@VQByteArray@@PB$$CBUQMetaObject@@@@@Z @ 1016 NONAME ; void QMetaObjectBuilder::deserialize(class QDataStream &, class QMap<class QByteArray, struct QMetaObject const *> const &)
+ ?destroy@QDeclarativeParticleMotion@@UAEXAAVQDeclarativeParticle@@@Z @ 1017 NONAME ; void QDeclarativeParticleMotion::destroy(class QDeclarativeParticle &)
+ ?destroy@QDeclarativeParticleMotionWander@@UAEXAAVQDeclarativeParticle@@@Z @ 1018 NONAME ; void QDeclarativeParticleMotionWander::destroy(class QDeclarativeParticle &)
+ ?destroyRemoved@QDeclarativeGridView@@AAEXXZ @ 1019 NONAME ; void QDeclarativeGridView::destroyRemoved(void)
+ ?destroyRemoved@QDeclarativeListView@@AAEXXZ @ 1020 NONAME ; void QDeclarativeListView::destroyRemoved(void)
+ ?destroyed@QDeclarativeContextPrivate@@QAEXPAUContextGuard@1@@Z @ 1021 NONAME ; void QDeclarativeContextPrivate::destroyed(struct QDeclarativeContextPrivate::ContextGuard *)
+ ?destroyingItem@QDeclarativeGridView@@AAEXPAVQDeclarativeItem@@@Z @ 1022 NONAME ; void QDeclarativeGridView::destroyingItem(class QDeclarativeItem *)
+ ?destroyingItem@QDeclarativeListView@@AAEXPAVQDeclarativeItem@@@Z @ 1023 NONAME ; void QDeclarativeListView::destroyingItem(class QDeclarativeItem *)
+ ?destroyingItem@QDeclarativePathView@@AAEXPAVQDeclarativeItem@@@Z @ 1024 NONAME ; void QDeclarativePathView::destroyingItem(class QDeclarativeItem *)
+ ?destroyingItem@QDeclarativeVisualModel@@IAEXPAVQDeclarativeItem@@@Z @ 1025 NONAME ; void QDeclarativeVisualModel::destroyingItem(class QDeclarativeItem *)
+ ?destroyingPackage@QDeclarativeVisualDataModel@@IAEXPAVQDeclarativePackage@@@Z @ 1026 NONAME ; void QDeclarativeVisualDataModel::destroyingPackage(class QDeclarativePackage *)
+ ?device@QPacketProtocol@@QAEPAVQIODevice@@XZ @ 1027 NONAME ; class QIODevice * QPacketProtocol::device(void)
+ ?dirtyCache@QDeclarativePaintedItem@@IAEXABVQRect@@@Z @ 1028 NONAME ; void QDeclarativePaintedItem::dirtyCache(class QRect const &)
+ ?displayData@QPerformanceLog@@YAXXZ @ 1029 NONAME ; void QPerformanceLog::displayData(void)
+ ?doLoadFinished@QDeclarativeWebView@@AAEX_N@Z @ 1030 NONAME ; void QDeclarativeWebView::doLoadFinished(bool)
+ ?doLoadProgress@QDeclarativeWebView@@AAEXH@Z @ 1031 NONAME ; void QDeclarativeWebView::doLoadProgress(int)
+ ?doLoadStarted@QDeclarativeWebView@@AAEXXZ @ 1032 NONAME ; void QDeclarativeWebView::doLoadStarted(void)
+ ?doPositioning@QDeclarativeColumn@@MAEXXZ @ 1033 NONAME ; void QDeclarativeColumn::doPositioning(void)
+ ?doPositioning@QDeclarativeFlow@@MAEXXZ @ 1034 NONAME ; void QDeclarativeFlow::doPositioning(void)
+ ?doPositioning@QDeclarativeGrid@@MAEXXZ @ 1035 NONAME ; void QDeclarativeGrid::doPositioning(void)
+ ?doPositioning@QDeclarativeRow@@MAEXXZ @ 1036 NONAME ; void QDeclarativeRow::doPositioning(void)
+ ?doUpdate@QDeclarativeGradient@@AAEXXZ @ 1037 NONAME ; void QDeclarativeGradient::doUpdate(void)
+ ?doUpdate@QDeclarativeRectangle@@AAEXXZ @ 1038 NONAME ; void QDeclarativeRectangle::doUpdate(void)
+ ?doesPropertyExist@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@@Z @ 1039 NONAME ; bool QDeclarativeCompiler::doesPropertyExist(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *)
+ ?doubleClick@QDeclarativeWebView@@IAEXHH@Z @ 1040 NONAME ; void QDeclarativeWebView::doubleClick(int, int)
+ ?doubleClicked@QDeclarativeMouseArea@@IAEXPAVQDeclarativeMouseEvent@@@Z @ 1041 NONAME ; void QDeclarativeMouseArea::doubleClicked(class QDeclarativeMouseEvent *)
+ ?downloadProgress@QDeclarativePixmapReply@@IAEX_J0@Z @ 1042 NONAME ; void QDeclarativePixmapReply::downloadProgress(long long, long long)
+ ?drag@QDeclarativeMouseArea@@QAEPAVQDeclarativeDrag@@XZ @ 1043 NONAME ; class QDeclarativeDrag * QDeclarativeMouseArea::drag(void)
+ ?dragMargin@QDeclarativePathView@@QBEMXZ @ 1044 NONAME ; float QDeclarativePathView::dragMargin(void) const
+ ?drawContents@QDeclarativeTextEdit@@MAEXPAVQPainter@@ABVQRect@@@Z @ 1045 NONAME ; void QDeclarativeTextEdit::drawContents(class QPainter *, class QRect const &)
+ ?drawContents@QDeclarativeTextInput@@UAEXPAVQPainter@@ABVQRect@@@Z @ 1046 NONAME ; void QDeclarativeTextInput::drawContents(class QPainter *, class QRect const &)
+ ?drawContents@QDeclarativeWebView@@MAEXPAVQPainter@@ABVQRect@@@Z @ 1047 NONAME ; void QDeclarativeWebView::drawContents(class QPainter *, class QRect const &)
+ ?drawRect@QDeclarativeRectangle@@AAEXAAVQPainter@@@Z @ 1048 NONAME ; void QDeclarativeRectangle::drawRect(class QPainter &)
+ ?dumpStats@QDeclarativeCompiler@@AAEXXZ @ 1049 NONAME ; void QDeclarativeCompiler::dumpStats(void)
+ ?duration@QDeclarativeEaseFollow@@QBEMXZ @ 1050 NONAME ; float QDeclarativeEaseFollow::duration(void) const
+ ?durationChanged@QDeclarativeEaseFollow@@IAEXXZ @ 1051 NONAME ; void QDeclarativeEaseFollow::durationChanged(void)
+ ?dynamicProperties@QDeclarativeDomObject@@QBE?AV?$QList@VQDeclarativeDomDynamicProperty@@@@XZ @ 1052 NONAME ; class QList<class QDeclarativeDomDynamicProperty> QDeclarativeDomObject::dynamicProperties(void) const
+ ?dynamicProperty@QDeclarativeDomObject@@QBE?AVQDeclarativeDomDynamicProperty@@ABVQByteArray@@@Z @ 1053 NONAME ; class QDeclarativeDomDynamicProperty QDeclarativeDomObject::dynamicProperty(class QByteArray const &) const
+ ?echoMode@QDeclarativeTextInput@@QBE?AW4EchoMode@1@XZ @ 1054 NONAME ; enum QDeclarativeTextInput::EchoMode QDeclarativeTextInput::echoMode(void) const
+ ?echoModeChanged@QDeclarativeTextInput@@IAEXW4EchoMode@1@@Z @ 1055 NONAME ; void QDeclarativeTextInput::echoModeChanged(enum QDeclarativeTextInput::EchoMode)
+ ?elementAreaAt@QDeclarativeWebView@@QBE?AVQRect@@HHHH@Z @ 1056 NONAME ; class QRect QDeclarativeWebView::elementAreaAt(int, int, int, int) const
+ ?elideMode@QDeclarativeText@@QBE?AW4TextElideMode@1@XZ @ 1057 NONAME ; enum QDeclarativeText::TextElideMode QDeclarativeText::elideMode(void) const
+ ?elideModeChanged@QDeclarativeText@@IAEXW4TextElideMode@1@@Z @ 1058 NONAME ; void QDeclarativeText::elideModeChanged(enum QDeclarativeText::TextElideMode)
+ ?emissionRate@QDeclarativeParticles@@QBEHXZ @ 1059 NONAME ; int QDeclarativeParticles::emissionRate(void) const
+ ?emissionRateChanged@QDeclarativeParticles@@IAEXXZ @ 1060 NONAME ; void QDeclarativeParticles::emissionRateChanged(void)
+ ?emissionVariance@QDeclarativeParticles@@QBEMXZ @ 1061 NONAME ; float QDeclarativeParticles::emissionVariance(void) const
+ ?emissionVarianceChanged@QDeclarativeParticles@@IAEXXZ @ 1062 NONAME ; void QDeclarativeParticles::emissionVarianceChanged(void)
+ ?emittingChanged@QDeclarativeParticles@@IAEXXZ @ 1063 NONAME ; void QDeclarativeParticles::emittingChanged(void)
+ ?enabled@QDeclarativeBehavior@@QBE_NXZ @ 1064 NONAME ; bool QDeclarativeBehavior::enabled(void) const
+ ?enabled@QDeclarativeEaseFollow@@QBE_NXZ @ 1065 NONAME ; bool QDeclarativeEaseFollow::enabled(void) const
+ ?enabled@QDeclarativeSpringFollow@@QBE_NXZ @ 1066 NONAME ; bool QDeclarativeSpringFollow::enabled(void) const
+ ?enabledChanged@QDeclarativeBehavior@@IAEXXZ @ 1067 NONAME ; void QDeclarativeBehavior::enabledChanged(void)
+ ?enabledChanged@QDeclarativeDebugService@@MAEX_N@Z @ 1068 NONAME ; void QDeclarativeDebugService::enabledChanged(bool)
+ ?enabledChanged@QDeclarativeEaseFollow@@IAEXXZ @ 1069 NONAME ; void QDeclarativeEaseFollow::enabledChanged(void)
+ ?enabledChanged@QDeclarativeMouseArea@@IAEXXZ @ 1070 NONAME ; void QDeclarativeMouseArea::enabledChanged(void)
+ ?endpoint@QDeclarativePath@@AAEXABVQString@@@Z @ 1071 NONAME ; void QDeclarativePath::endpoint(class QString const &)
+ ?engine@QDeclarativeContext@@QBEPAVQDeclarativeEngine@@XZ @ 1072 NONAME ; class QDeclarativeEngine * QDeclarativeContext::engine(void) const
+ ?engine@QDeclarativeExpression@@QBEPAVQDeclarativeEngine@@XZ @ 1073 NONAME ; class QDeclarativeEngine * QDeclarativeExpression::engine(void) const
+ ?engine@QDeclarativeView@@QAEPAVQDeclarativeEngine@@XZ @ 1074 NONAME ; class QDeclarativeEngine * QDeclarativeView::engine(void)
+ ?engines@QDeclarativeDebugEnginesQuery@@QBE?AV?$QList@VQDeclarativeDebugEngineReference@@@@XZ @ 1075 NONAME ; class QList<class QDeclarativeDebugEngineReference> QDeclarativeDebugEnginesQuery::engines(void) const
+ ?entered@QDeclarativeMouseArea@@IAEXXZ @ 1076 NONAME ; void QDeclarativeMouseArea::entered(void)
+ ?enumerator@QMetaObjectBuilder@@QBE?AVQMetaEnumBuilder@@H@Z @ 1077 NONAME ; class QMetaEnumBuilder QMetaObjectBuilder::enumerator(int) const
+ ?enumeratorCount@QMetaObjectBuilder@@QBEHXZ @ 1078 NONAME ; int QMetaObjectBuilder::enumeratorCount(void) const
+ ?epsilon@QDeclarativeSpringFollow@@QBEMXZ @ 1079 NONAME ; float QDeclarativeSpringFollow::epsilon(void) const
+ ?error@QDeclarativeCustomParser@@IAEXABVQDeclarativeCustomParserNode@@ABVQString@@@Z @ 1080 NONAME ; void QDeclarativeCustomParser::error(class QDeclarativeCustomParserNode const &, class QString const &)
+ ?error@QDeclarativeCustomParser@@IAEXABVQDeclarativeCustomParserProperty@@ABVQString@@@Z @ 1081 NONAME ; void QDeclarativeCustomParser::error(class QDeclarativeCustomParserProperty const &, class QString const &)
+ ?error@QDeclarativeExpression@@QBE?AVQDeclarativeError@@XZ @ 1082 NONAME ; class QDeclarativeError QDeclarativeExpression::error(void) const
+ ?errors@QDeclarativeCompiler@@QBE?AV?$QList@VQDeclarativeError@@@@XZ @ 1083 NONAME ; class QList<class QDeclarativeError> QDeclarativeCompiler::errors(void) const
+ ?errors@QDeclarativeComponent@@QBE?AV?$QList@VQDeclarativeError@@@@XZ @ 1084 NONAME ; class QList<class QDeclarativeError> QDeclarativeComponent::errors(void) const
+ ?errors@QDeclarativeCustomParser@@QBE?AV?$QList@VQDeclarativeError@@@@XZ @ 1085 NONAME ; class QList<class QDeclarativeError> QDeclarativeCustomParser::errors(void) const
+ ?errors@QDeclarativeDomDocument@@QBE?AV?$QList@VQDeclarativeError@@@@XZ @ 1086 NONAME ; class QList<class QDeclarativeError> QDeclarativeDomDocument::errors(void) const
+ ?errors@QDeclarativeView@@QBE?AV?$QList@VQDeclarativeError@@@@XZ @ 1087 NONAME ; class QList<class QDeclarativeError> QDeclarativeView::errors(void) const
+ ?errorsString@QDeclarativeComponent@@QBE?AVQString@@XZ @ 1088 NONAME ; class QString QDeclarativeComponent::errorsString(void) const
+ ?eval@QDeclarativeBind@@AAEXXZ @ 1089 NONAME ; void QDeclarativeBind::eval(void)
+ ?evaluate@QDeclarativeVisualDataModel@@UAE?AVQVariant@@HABVQString@@PAVQObject@@@Z @ 1090 NONAME ; class QVariant QDeclarativeVisualDataModel::evaluate(int, class QString const &, class QObject *)
+ ?evaluate@QDeclarativeVisualItemModel@@UAE?AVQVariant@@HABVQString@@PAVQObject@@@Z @ 1091 NONAME ; class QVariant QDeclarativeVisualItemModel::evaluate(int, class QString const &, class QObject *)
+ ?evaluateJavaScript@QDeclarativeWebView@@QAE?AVQVariant@@ABVQString@@@Z @ 1092 NONAME ; class QVariant QDeclarativeWebView::evaluateJavaScript(class QString const &)
+ ?event@QDeclarativeItem@@MAE_NPAVQEvent@@@Z @ 1093 NONAME ; bool QDeclarativeItem::event(class QEvent *)
+ ?event@QDeclarativePixmapReply@@MAE_NPAVQEvent@@@Z @ 1094 NONAME ; bool QDeclarativePixmapReply::event(class QEvent *)
+ ?event@QDeclarativeSystemPalette@@EAE_NPAVQEvent@@@Z @ 1095 NONAME ; bool QDeclarativeSystemPalette::event(class QEvent *)
+ ?event@QDeclarativeTextEdit@@MAE_NPAVQEvent@@@Z @ 1096 NONAME ; bool QDeclarativeTextEdit::event(class QEvent *)
+ ?event@QDeclarativeTextInput@@MAE_NPAVQEvent@@@Z @ 1097 NONAME ; bool QDeclarativeTextInput::event(class QEvent *)
+ ?eventFilter@QDeclarativeGraphicsObjectContainer@@MAE_NPAVQObject@@PAVQEvent@@@Z @ 1098 NONAME ; bool QDeclarativeGraphicsObjectContainer::eventFilter(class QObject *, class QEvent *)
+ ?eventFilter@QDeclarativeLoader@@MAE_NPAVQObject@@PAVQEvent@@@Z @ 1099 NONAME ; bool QDeclarativeLoader::eventFilter(class QObject *, class QEvent *)
+ ?eventFilter@QDeclarativeSystemPalette@@EAE_NPAVQObject@@PAVQEvent@@@Z @ 1100 NONAME ; bool QDeclarativeSystemPalette::eventFilter(class QObject *, class QEvent *)
+ ?execute@QDeclarativeAnchorChanges@@UAEXXZ @ 1101 NONAME ; void QDeclarativeAnchorChanges::execute(void)
+ ?execute@QDeclarativeParentChange@@UAEXXZ @ 1102 NONAME ; void QDeclarativeParentChange::execute(void)
+ ?execute@QDeclarativeStateChangeScript@@UAEXXZ @ 1103 NONAME ; void QDeclarativeStateChangeScript::execute(void)
+ ?exited@QDeclarativeMouseArea@@IAEXXZ @ 1104 NONAME ; void QDeclarativeMouseArea::exited(void)
+ ?expandToWebPage@QDeclarativeWebView@@AAEXXZ @ 1105 NONAME ; void QDeclarativeWebView::expandToWebPage(void)
+ ?expression@QDeclarativeDebugExpressionQuery@@QBE?AVQString@@XZ @ 1106 NONAME ; class QString QDeclarativeDebugExpressionQuery::expression(void) const
+ ?expression@QDeclarativeDebugObjectExpressionWatch@@QBE?AVQString@@XZ @ 1107 NONAME ; class QString QDeclarativeDebugObjectExpressionWatch::expression(void) const
+ ?expression@QDeclarativeExpression@@QBE?AVQString@@XZ @ 1108 NONAME ; class QString QDeclarativeExpression::expression(void) const
+ ?extends@QDeclarativeState@@QBE?AVQString@@XZ @ 1109 NONAME ; class QString QDeclarativeState::extends(void) const
+ ?extraActions@QDeclarativeAnchorChanges@@UAE?AV?$QList@VQDeclarativeAction@@@@XZ @ 1110 NONAME ; class QList<class QDeclarativeAction> QDeclarativeAnchorChanges::extraActions(void)
+ ?fadeInDuration@QDeclarativeParticles@@QBEHXZ @ 1111 NONAME ; int QDeclarativeParticles::fadeInDuration(void) const
+ ?fadeInDurationChanged@QDeclarativeParticles@@IAEXXZ @ 1112 NONAME ; void QDeclarativeParticles::fadeInDurationChanged(void)
+ ?fadeOutDuration@QDeclarativeParticles@@QBEHXZ @ 1113 NONAME ; int QDeclarativeParticles::fadeOutDuration(void) const
+ ?fadeOutDurationChanged@QDeclarativeParticles@@IAEXXZ @ 1114 NONAME ; void QDeclarativeParticles::fadeOutDurationChanged(void)
+ ?fill@QDeclarativeAnchors@@QBEPAVQDeclarativeItem@@XZ @ 1115 NONAME ; class QDeclarativeItem * QDeclarativeAnchors::fill(void) const
+ ?fillChanged@QDeclarativeAnchors@@IAEXXZ @ 1116 NONAME ; void QDeclarativeAnchors::fillChanged(void)
+ ?fillColor@QDeclarativePaintedItem@@QBE?AVQColor@@XZ @ 1117 NONAME ; class QColor QDeclarativePaintedItem::fillColor(void) const
+ ?fillColorChanged@QDeclarativePaintedItem@@IAEXXZ @ 1118 NONAME ; void QDeclarativePaintedItem::fillColorChanged(void)
+ ?fillMode@QDeclarativeImage@@QBE?AW4FillMode@1@XZ @ 1119 NONAME ; enum QDeclarativeImage::FillMode QDeclarativeImage::fillMode(void) const
+ ?fillModeChanged@QDeclarativeImage@@IAEXXZ @ 1120 NONAME ; void QDeclarativeImage::fillModeChanged(void)
+ ?findSignalByName@QDeclarativeCompiler@@SA?AVQMetaMethod@@PBUQMetaObject@@ABVQByteArray@@@Z @ 1121 NONAME ; class QMetaMethod QDeclarativeCompiler::findSignalByName(struct QMetaObject const *, class QByteArray const &)
+ ?findState@QDeclarativeStateGroup@@QBEPAVQDeclarativeState@@ABVQString@@@Z @ 1122 NONAME ; class QDeclarativeState * QDeclarativeStateGroup::findState(class QString const &) const
+ ?finishApplyTransitions@QDeclarativeBasePositioner@@IAEXXZ @ 1123 NONAME ; void QDeclarativeBasePositioner::finishApplyTransitions(void)
+ ?finished@QDeclarativePixmapReply@@IAEXXZ @ 1124 NONAME ; void QDeclarativePixmapReply::finished(void)
+ ?finished@QDeclarativeTimer@@AAEXXZ @ 1125 NONAME ; void QDeclarativeTimer::finished(void)
+ ?flags@QMetaObjectBuilder@@QBE?AV?$QFlags@W4MetaObjectFlag@QMetaObjectBuilder@@@@XZ @ 1126 NONAME ; class QFlags<enum QMetaObjectBuilder::MetaObjectFlag> QMetaObjectBuilder::flags(void) const
+ ?flickDeceleration@QDeclarativeFlickable@@QBEMXZ @ 1127 NONAME ; float QDeclarativeFlickable::flickDeceleration(void) const
+ ?flickDecelerationChanged@QDeclarativeFlickable@@IAEXXZ @ 1128 NONAME ; void QDeclarativeFlickable::flickDecelerationChanged(void)
+ ?flickDirection@QDeclarativeFlickable@@QBE?AW4FlickDirection@1@XZ @ 1129 NONAME ; enum QDeclarativeFlickable::FlickDirection QDeclarativeFlickable::flickDirection(void) const
+ ?flickDirectionChanged@QDeclarativeFlickable@@IAEXXZ @ 1130 NONAME ; void QDeclarativeFlickable::flickDirectionChanged(void)
+ ?flickEnded@QDeclarativeFlickable@@IAEXXZ @ 1131 NONAME ; void QDeclarativeFlickable::flickEnded(void)
+ ?flickStarted@QDeclarativeFlickable@@IAEXXZ @ 1132 NONAME ; void QDeclarativeFlickable::flickStarted(void)
+ ?flickableChildren@QDeclarativeFlickable@@QAE?AU?$QDeclarativeListProperty@VQDeclarativeItem@@@@XZ @ 1133 NONAME ; struct QDeclarativeListProperty<class QDeclarativeItem> QDeclarativeFlickable::flickableChildren(void)
+ ?flickableData@QDeclarativeFlickable@@QAE?AU?$QDeclarativeListProperty@VQObject@@@@XZ @ 1134 NONAME ; struct QDeclarativeListProperty<class QObject> QDeclarativeFlickable::flickableData(void)
+ ?flickingChanged@QDeclarativeFlickable@@IAEXXZ @ 1135 NONAME ; void QDeclarativeFlickable::flickingChanged(void)
+ ?flow@QDeclarativeFlow@@QBE?AW4Flow@1@XZ @ 1136 NONAME ; enum QDeclarativeFlow::Flow QDeclarativeFlow::flow(void) const
+ ?flow@QDeclarativeGridView@@QBE?AW4Flow@1@XZ @ 1137 NONAME ; enum QDeclarativeGridView::Flow QDeclarativeGridView::flow(void) const
+ ?flowChanged@QDeclarativeFlow@@IAEXXZ @ 1138 NONAME ; void QDeclarativeFlow::flowChanged(void)
+ ?focusChanged@QDeclarativeItem@@IAEXXZ @ 1139 NONAME ; void QDeclarativeItem::focusChanged(void)
+ ?focusChanged@QDeclarativeItem@@MAEX_N@Z @ 1140 NONAME ; void QDeclarativeItem::focusChanged(bool)
+ ?focusChanged@QDeclarativeTextEdit@@MAEX_N@Z @ 1141 NONAME ; void QDeclarativeTextEdit::focusChanged(bool)
+ ?focusChanged@QDeclarativeTextInput@@MAEX_N@Z @ 1142 NONAME ; void QDeclarativeTextInput::focusChanged(bool)
+ ?focusChanged@QDeclarativeWebView@@MAEX_N@Z @ 1143 NONAME ; void QDeclarativeWebView::focusChanged(bool)
+ ?focusOnPress@QDeclarativeTextEdit@@QBE_NXZ @ 1144 NONAME ; bool QDeclarativeTextEdit::focusOnPress(void) const
+ ?focusOnPress@QDeclarativeTextInput@@QBE_NXZ @ 1145 NONAME ; bool QDeclarativeTextInput::focusOnPress(void) const
+ ?focusOnPressChanged@QDeclarativeTextEdit@@IAEX_N@Z @ 1146 NONAME ; void QDeclarativeTextEdit::focusOnPressChanged(bool)
+ ?focusOnPressChanged@QDeclarativeTextInput@@IAEX_N@Z @ 1147 NONAME ; void QDeclarativeTextInput::focusOnPressChanged(bool)
+ ?font@QDeclarativeText@@QBE?AVQFont@@XZ @ 1148 NONAME ; class QFont QDeclarativeText::font(void) const
+ ?font@QDeclarativeTextEdit@@QBE?AVQFont@@XZ @ 1149 NONAME ; class QFont QDeclarativeTextEdit::font(void) const
+ ?font@QDeclarativeTextInput@@QBE?AVQFont@@XZ @ 1150 NONAME ; class QFont QDeclarativeTextInput::font(void) const
+ ?fontChanged@QDeclarativeText@@IAEXABVQFont@@@Z @ 1151 NONAME ; void QDeclarativeText::fontChanged(class QFont const &)
+ ?fontChanged@QDeclarativeTextEdit@@IAEXABVQFont@@@Z @ 1152 NONAME ; void QDeclarativeTextEdit::fontChanged(class QFont const &)
+ ?fontChanged@QDeclarativeTextInput@@IAEXABVQFont@@@Z @ 1153 NONAME ; void QDeclarativeTextInput::fontChanged(class QFont const &)
+ ?footer@QDeclarativeListView@@QBEPAVQDeclarativeComponent@@XZ @ 1154 NONAME ; class QDeclarativeComponent * QDeclarativeListView::footer(void) const
+ ?format@QDeclarativeNumberFormatter@@QBE?AVQString@@XZ @ 1155 NONAME ; class QString QDeclarativeNumberFormatter::format(void) const
+ ?forwardAction@QDeclarativeWebView@@QBEPAVQAction@@XZ @ 1156 NONAME ; class QAction * QDeclarativeWebView::forwardAction(void) const
+ ?frameChanged@QDeclarativeAnimatedImage@@IAEXXZ @ 1157 NONAME ; void QDeclarativeAnimatedImage::frameChanged(void)
+ ?frameCount@QDeclarativeAnimatedImage@@QBEHXZ @ 1158 NONAME ; int QDeclarativeAnimatedImage::frameCount(void) const
+ ?fromRelocatableData@QMetaObjectBuilder@@SAXPAUQMetaObject@@PBU2@ABVQByteArray@@@Z @ 1159 NONAME ; void QMetaObjectBuilder::fromRelocatableData(struct QMetaObject *, struct QMetaObject const *, class QByteArray const &)
+ ?fromState@QDeclarativeTransition@@QBE?AVQString@@XZ @ 1160 NONAME ; class QString QDeclarativeTransition::fromState(void) const
+ ?front@QDeclarativeFlipable@@QAEPAVQDeclarativeItem@@XZ @ 1161 NONAME ; class QDeclarativeItem * QDeclarativeFlipable::front(void)
+ ?fxChildren@QDeclarativeItem@@QAE?AU?$QDeclarativeListProperty@VQDeclarativeItem@@@@XZ @ 1162 NONAME ; struct QDeclarativeListProperty<class QDeclarativeItem> QDeclarativeItem::fxChildren(void)
+ ?genBindingAssignment@QDeclarativeCompiler@@AAEXPAVValue@QDeclarativeParser@@PAVProperty@3@PAVObject@3@1@Z @ 1163 NONAME ; void QDeclarativeCompiler::genBindingAssignment(class QDeclarativeParser::Value *, class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, class QDeclarativeParser::Property *)
+ ?genComponent@QDeclarativeCompiler@@AAEXPAVObject@QDeclarativeParser@@@Z @ 1164 NONAME ; void QDeclarativeCompiler::genComponent(class QDeclarativeParser::Object *)
+ ?genContextCache@QDeclarativeCompiler@@AAEHXZ @ 1165 NONAME ; int QDeclarativeCompiler::genContextCache(void)
+ ?genListProperty@QDeclarativeCompiler@@AAEXPAVProperty@QDeclarativeParser@@PAVObject@3@@Z @ 1166 NONAME ; void QDeclarativeCompiler::genListProperty(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *)
+ ?genLiteralAssignment@QDeclarativeCompiler@@AAEXABVQMetaProperty@@PAVValue@QDeclarativeParser@@@Z @ 1167 NONAME ; void QDeclarativeCompiler::genLiteralAssignment(class QMetaProperty const &, class QDeclarativeParser::Value *)
+ ?genObject@QDeclarativeCompiler@@AAEXPAVObject@QDeclarativeParser@@@Z @ 1168 NONAME ; void QDeclarativeCompiler::genObject(class QDeclarativeParser::Object *)
+ ?genObjectBody@QDeclarativeCompiler@@AAEXPAVObject@QDeclarativeParser@@@Z @ 1169 NONAME ; void QDeclarativeCompiler::genObjectBody(class QDeclarativeParser::Object *)
+ ?genPropertyAssignment@QDeclarativeCompiler@@AAEXPAVProperty@QDeclarativeParser@@PAVObject@3@0@Z @ 1170 NONAME ; void QDeclarativeCompiler::genPropertyAssignment(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, class QDeclarativeParser::Property *)
+ ?genPropertyData@QDeclarativeCompiler@@AAEHPAVProperty@QDeclarativeParser@@@Z @ 1171 NONAME ; int QDeclarativeCompiler::genPropertyData(class QDeclarativeParser::Property *)
+ ?genValueProperty@QDeclarativeCompiler@@AAEXPAVProperty@QDeclarativeParser@@PAVObject@3@@Z @ 1172 NONAME ; void QDeclarativeCompiler::genValueProperty(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *)
+ ?genValueTypeData@QDeclarativeCompiler@@AAEHPAVProperty@QDeclarativeParser@@0@Z @ 1173 NONAME ; int QDeclarativeCompiler::genValueTypeData(class QDeclarativeParser::Property *, class QDeclarativeParser::Property *)
+ ?generateBorderedRect@QDeclarativeRectangle@@AAEXXZ @ 1174 NONAME ; void QDeclarativeRectangle::generateBorderedRect(void)
+ ?generateRoundedRect@QDeclarativeRectangle@@AAEXXZ @ 1175 NONAME ; void QDeclarativeRectangle::generateRoundedRect(void)
+ ?geometryChanged@QDeclarativeImage@@MAEXABVQRectF@@0@Z @ 1176 NONAME ; void QDeclarativeImage::geometryChanged(class QRectF const &, class QRectF const &)
+ ?geometryChanged@QDeclarativeItem@@MAEXABVQRectF@@0@Z @ 1177 NONAME ; void QDeclarativeItem::geometryChanged(class QRectF const &, class QRectF const &)
+ ?geometryChanged@QDeclarativeLoader@@MAEXABVQRectF@@0@Z @ 1178 NONAME ; void QDeclarativeLoader::geometryChanged(class QRectF const &, class QRectF const &)
+ ?geometryChanged@QDeclarativeText@@MAEXABVQRectF@@0@Z @ 1179 NONAME ; void QDeclarativeText::geometryChanged(class QRectF const &, class QRectF const &)
+ ?geometryChanged@QDeclarativeTextEdit@@MAEXABVQRectF@@0@Z @ 1180 NONAME ; void QDeclarativeTextEdit::geometryChanged(class QRectF const &, class QRectF const &)
+ ?geometryChanged@QDeclarativeTextInput@@MAEXABVQRectF@@0@Z @ 1181 NONAME ; void QDeclarativeTextInput::geometryChanged(class QRectF const &, class QRectF const &)
+ ?geometryChanged@QDeclarativeWebView@@MAEXABVQRectF@@0@Z @ 1182 NONAME ; void QDeclarativeWebView::geometryChanged(class QRectF const &, class QRectF const &)
+ ?get@QDeclarativeContextPrivate@@SAPAV1@PAVQDeclarativeContext@@@Z @ 1183 NONAME ; class QDeclarativeContextPrivate * QDeclarativeContextPrivate::get(class QDeclarativeContext *)
+ ?get@QDeclarativeContextPrivate@@SAPAVQDeclarativeContext@@PAV1@@Z @ 1184 NONAME ; class QDeclarativeContext * QDeclarativeContextPrivate::get(class QDeclarativeContextPrivate *)
+ ?get@QDeclarativeListModel@@QBE?AVQScriptValue@@H@Z @ 1185 NONAME ; class QScriptValue QDeclarativeListModel::get(int) const
+ ?get@QDeclarativePixmapCache@@SA?AW4Status@QDeclarativePixmapReply@@ABVQUrl@@PAVQPixmap@@_N@Z @ 1186 NONAME ; enum QDeclarativePixmapReply::Status QDeclarativePixmapCache::get(class QUrl const &, class QPixmap *, bool)
+ ?getStaticMetaObject@QDeclarativeAnchorChanges@@SAABUQMetaObject@@XZ @ 1187 NONAME ; struct QMetaObject const & QDeclarativeAnchorChanges::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeAnchors@@SAABUQMetaObject@@XZ @ 1188 NONAME ; struct QMetaObject const & QDeclarativeAnchors::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeAnimatedImage@@SAABUQMetaObject@@XZ @ 1189 NONAME ; struct QMetaObject const & QDeclarativeAnimatedImage::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeBasePositioner@@SAABUQMetaObject@@XZ @ 1190 NONAME ; struct QMetaObject const & QDeclarativeBasePositioner::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeBehavior@@SAABUQMetaObject@@XZ @ 1191 NONAME ; struct QMetaObject const & QDeclarativeBehavior::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeBind@@SAABUQMetaObject@@XZ @ 1192 NONAME ; struct QMetaObject const & QDeclarativeBind::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeBorderImage@@SAABUQMetaObject@@XZ @ 1193 NONAME ; struct QMetaObject const & QDeclarativeBorderImage::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeColumn@@SAABUQMetaObject@@XZ @ 1194 NONAME ; struct QMetaObject const & QDeclarativeColumn::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeComponent@@SAABUQMetaObject@@XZ @ 1195 NONAME ; struct QMetaObject const & QDeclarativeComponent::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeConnections@@SAABUQMetaObject@@XZ @ 1196 NONAME ; struct QMetaObject const & QDeclarativeConnections::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeContext@@SAABUQMetaObject@@XZ @ 1197 NONAME ; struct QMetaObject const & QDeclarativeContext::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeCurve@@SAABUQMetaObject@@XZ @ 1198 NONAME ; struct QMetaObject const & QDeclarativeCurve::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeDateTimeFormatter@@SAABUQMetaObject@@XZ @ 1199 NONAME ; struct QMetaObject const & QDeclarativeDateTimeFormatter::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeDebugClient@@SAABUQMetaObject@@XZ @ 1200 NONAME ; struct QMetaObject const & QDeclarativeDebugClient::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeDebugConnection@@SAABUQMetaObject@@XZ @ 1201 NONAME ; struct QMetaObject const & QDeclarativeDebugConnection::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeDebugEnginesQuery@@SAABUQMetaObject@@XZ @ 1202 NONAME ; struct QMetaObject const & QDeclarativeDebugEnginesQuery::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeDebugExpressionQuery@@SAABUQMetaObject@@XZ @ 1203 NONAME ; struct QMetaObject const & QDeclarativeDebugExpressionQuery::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeDebugObjectExpressionWatch@@SAABUQMetaObject@@XZ @ 1204 NONAME ; struct QMetaObject const & QDeclarativeDebugObjectExpressionWatch::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeDebugObjectQuery@@SAABUQMetaObject@@XZ @ 1205 NONAME ; struct QMetaObject const & QDeclarativeDebugObjectQuery::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeDebugPropertyWatch@@SAABUQMetaObject@@XZ @ 1206 NONAME ; struct QMetaObject const & QDeclarativeDebugPropertyWatch::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeDebugQuery@@SAABUQMetaObject@@XZ @ 1207 NONAME ; struct QMetaObject const & QDeclarativeDebugQuery::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeDebugRootContextQuery@@SAABUQMetaObject@@XZ @ 1208 NONAME ; struct QMetaObject const & QDeclarativeDebugRootContextQuery::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeDebugService@@SAABUQMetaObject@@XZ @ 1209 NONAME ; struct QMetaObject const & QDeclarativeDebugService::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeDebugWatch@@SAABUQMetaObject@@XZ @ 1210 NONAME ; struct QMetaObject const & QDeclarativeDebugWatch::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeDrag@@SAABUQMetaObject@@XZ @ 1211 NONAME ; struct QMetaObject const & QDeclarativeDrag::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeEaseFollow@@SAABUQMetaObject@@XZ @ 1212 NONAME ; struct QMetaObject const & QDeclarativeEaseFollow::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeEngine@@SAABUQMetaObject@@XZ @ 1213 NONAME ; struct QMetaObject const & QDeclarativeEngine::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeEngineDebug@@SAABUQMetaObject@@XZ @ 1214 NONAME ; struct QMetaObject const & QDeclarativeEngineDebug::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeExpression@@SAABUQMetaObject@@XZ @ 1215 NONAME ; struct QMetaObject const & QDeclarativeExpression::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeExtensionPlugin@@SAABUQMetaObject@@XZ @ 1216 NONAME ; struct QMetaObject const & QDeclarativeExtensionPlugin::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeFlickable@@SAABUQMetaObject@@XZ @ 1217 NONAME ; struct QMetaObject const & QDeclarativeFlickable::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeFlipable@@SAABUQMetaObject@@XZ @ 1218 NONAME ; struct QMetaObject const & QDeclarativeFlipable::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeFlow@@SAABUQMetaObject@@XZ @ 1219 NONAME ; struct QMetaObject const & QDeclarativeFlow::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeFocusPanel@@SAABUQMetaObject@@XZ @ 1220 NONAME ; struct QMetaObject const & QDeclarativeFocusPanel::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeFocusScope@@SAABUQMetaObject@@XZ @ 1221 NONAME ; struct QMetaObject const & QDeclarativeFocusScope::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeFontLoader@@SAABUQMetaObject@@XZ @ 1222 NONAME ; struct QMetaObject const & QDeclarativeFontLoader::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeGradient@@SAABUQMetaObject@@XZ @ 1223 NONAME ; struct QMetaObject const & QDeclarativeGradient::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeGradientStop@@SAABUQMetaObject@@XZ @ 1224 NONAME ; struct QMetaObject const & QDeclarativeGradientStop::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeGraphicsObjectContainer@@SAABUQMetaObject@@XZ @ 1225 NONAME ; struct QMetaObject const & QDeclarativeGraphicsObjectContainer::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeGrid@@SAABUQMetaObject@@XZ @ 1226 NONAME ; struct QMetaObject const & QDeclarativeGrid::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeGridView@@SAABUQMetaObject@@XZ @ 1227 NONAME ; struct QMetaObject const & QDeclarativeGridView::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeImage@@SAABUQMetaObject@@XZ @ 1228 NONAME ; struct QMetaObject const & QDeclarativeImage::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeImageBase@@SAABUQMetaObject@@XZ @ 1229 NONAME ; struct QMetaObject const & QDeclarativeImageBase::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeItem@@SAABUQMetaObject@@XZ @ 1230 NONAME ; struct QMetaObject const & QDeclarativeItem::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeListModel@@SAABUQMetaObject@@XZ @ 1231 NONAME ; struct QMetaObject const & QDeclarativeListModel::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeListView@@SAABUQMetaObject@@XZ @ 1232 NONAME ; struct QMetaObject const & QDeclarativeListView::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeLoader@@SAABUQMetaObject@@XZ @ 1233 NONAME ; struct QMetaObject const & QDeclarativeLoader::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeMouseArea@@SAABUQMetaObject@@XZ @ 1234 NONAME ; struct QMetaObject const & QDeclarativeMouseArea::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeNumberFormatter@@SAABUQMetaObject@@XZ @ 1235 NONAME ; struct QMetaObject const & QDeclarativeNumberFormatter::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativePaintedItem@@SAABUQMetaObject@@XZ @ 1236 NONAME ; struct QMetaObject const & QDeclarativePaintedItem::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeParentChange@@SAABUQMetaObject@@XZ @ 1237 NONAME ; struct QMetaObject const & QDeclarativeParentChange::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeParticleMotion@@SAABUQMetaObject@@XZ @ 1238 NONAME ; struct QMetaObject const & QDeclarativeParticleMotion::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeParticleMotionGravity@@SAABUQMetaObject@@XZ @ 1239 NONAME ; struct QMetaObject const & QDeclarativeParticleMotionGravity::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeParticleMotionLinear@@SAABUQMetaObject@@XZ @ 1240 NONAME ; struct QMetaObject const & QDeclarativeParticleMotionLinear::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeParticleMotionWander@@SAABUQMetaObject@@XZ @ 1241 NONAME ; struct QMetaObject const & QDeclarativeParticleMotionWander::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeParticles@@SAABUQMetaObject@@XZ @ 1242 NONAME ; struct QMetaObject const & QDeclarativeParticles::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativePath@@SAABUQMetaObject@@XZ @ 1243 NONAME ; struct QMetaObject const & QDeclarativePath::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativePathAttribute@@SAABUQMetaObject@@XZ @ 1244 NONAME ; struct QMetaObject const & QDeclarativePathAttribute::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativePathCubic@@SAABUQMetaObject@@XZ @ 1245 NONAME ; struct QMetaObject const & QDeclarativePathCubic::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativePathElement@@SAABUQMetaObject@@XZ @ 1246 NONAME ; struct QMetaObject const & QDeclarativePathElement::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativePathLine@@SAABUQMetaObject@@XZ @ 1247 NONAME ; struct QMetaObject const & QDeclarativePathLine::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativePathPercent@@SAABUQMetaObject@@XZ @ 1248 NONAME ; struct QMetaObject const & QDeclarativePathPercent::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativePathQuad@@SAABUQMetaObject@@XZ @ 1249 NONAME ; struct QMetaObject const & QDeclarativePathQuad::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativePathView@@SAABUQMetaObject@@XZ @ 1250 NONAME ; struct QMetaObject const & QDeclarativePathView::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativePen@@SAABUQMetaObject@@XZ @ 1251 NONAME ; struct QMetaObject const & QDeclarativePen::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativePixmapReply@@SAABUQMetaObject@@XZ @ 1252 NONAME ; struct QMetaObject const & QDeclarativePixmapReply::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativePropertyChanges@@SAABUQMetaObject@@XZ @ 1253 NONAME ; struct QMetaObject const & QDeclarativePropertyChanges::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativePropertyMap@@SAABUQMetaObject@@XZ @ 1254 NONAME ; struct QMetaObject const & QDeclarativePropertyMap::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeRectangle@@SAABUQMetaObject@@XZ @ 1255 NONAME ; struct QMetaObject const & QDeclarativeRectangle::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeRepeater@@SAABUQMetaObject@@XZ @ 1256 NONAME ; struct QMetaObject const & QDeclarativeRepeater::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeRow@@SAABUQMetaObject@@XZ @ 1257 NONAME ; struct QMetaObject const & QDeclarativeRow::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeScaleGrid@@SAABUQMetaObject@@XZ @ 1258 NONAME ; struct QMetaObject const & QDeclarativeScaleGrid::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeSpringFollow@@SAABUQMetaObject@@XZ @ 1259 NONAME ; struct QMetaObject const & QDeclarativeSpringFollow::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeState@@SAABUQMetaObject@@XZ @ 1260 NONAME ; struct QMetaObject const & QDeclarativeState::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeStateChangeScript@@SAABUQMetaObject@@XZ @ 1261 NONAME ; struct QMetaObject const & QDeclarativeStateChangeScript::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeStateGroup@@SAABUQMetaObject@@XZ @ 1262 NONAME ; struct QMetaObject const & QDeclarativeStateGroup::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeStateOperation@@SAABUQMetaObject@@XZ @ 1263 NONAME ; struct QMetaObject const & QDeclarativeStateOperation::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeSystemPalette@@SAABUQMetaObject@@XZ @ 1264 NONAME ; struct QMetaObject const & QDeclarativeSystemPalette::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeText@@SAABUQMetaObject@@XZ @ 1265 NONAME ; struct QMetaObject const & QDeclarativeText::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeTextEdit@@SAABUQMetaObject@@XZ @ 1266 NONAME ; struct QMetaObject const & QDeclarativeTextEdit::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeTextInput@@SAABUQMetaObject@@XZ @ 1267 NONAME ; struct QMetaObject const & QDeclarativeTextInput::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeTimer@@SAABUQMetaObject@@XZ @ 1268 NONAME ; struct QMetaObject const & QDeclarativeTimer::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeTransition@@SAABUQMetaObject@@XZ @ 1269 NONAME ; struct QMetaObject const & QDeclarativeTransition::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeValueType@@SAABUQMetaObject@@XZ @ 1270 NONAME ; struct QMetaObject const & QDeclarativeValueType::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeView@@SAABUQMetaObject@@XZ @ 1271 NONAME ; struct QMetaObject const & QDeclarativeView::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeViewSection@@SAABUQMetaObject@@XZ @ 1272 NONAME ; struct QMetaObject const & QDeclarativeViewSection::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeVisualDataModel@@SAABUQMetaObject@@XZ @ 1273 NONAME ; struct QMetaObject const & QDeclarativeVisualDataModel::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeVisualItemModel@@SAABUQMetaObject@@XZ @ 1274 NONAME ; struct QMetaObject const & QDeclarativeVisualItemModel::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeVisualModel@@SAABUQMetaObject@@XZ @ 1275 NONAME ; struct QMetaObject const & QDeclarativeVisualModel::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeWebPage@@SAABUQMetaObject@@XZ @ 1276 NONAME ; struct QMetaObject const & QDeclarativeWebPage::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeWebView@@SAABUQMetaObject@@XZ @ 1277 NONAME ; struct QMetaObject const & QDeclarativeWebView::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeXmlListModel@@SAABUQMetaObject@@XZ @ 1278 NONAME ; struct QMetaObject const & QDeclarativeXmlListModel::getStaticMetaObject(void)
+ ?getStaticMetaObject@QDeclarativeXmlListModelRole@@SAABUQMetaObject@@XZ @ 1279 NONAME ; struct QMetaObject const & QDeclarativeXmlListModelRole::getStaticMetaObject(void)
+ ?getStaticMetaObject@QListModelInterface@@SAABUQMetaObject@@XZ @ 1280 NONAME ; struct QMetaObject const & QListModelInterface::getStaticMetaObject(void)
+ ?getStaticMetaObject@QPacketProtocol@@SAABUQMetaObject@@XZ @ 1281 NONAME ; struct QMetaObject const & QPacketProtocol::getStaticMetaObject(void)
+ ?gradient@QDeclarativeGradient@@QBEPBVQGradient@@XZ @ 1282 NONAME ; class QGradient const * QDeclarativeGradient::gradient(void) const
+ ?gradient@QDeclarativeRectangle@@QBEPAVQDeclarativeGradient@@XZ @ 1283 NONAME ; class QDeclarativeGradient * QDeclarativeRectangle::gradient(void) const
+ ?graphicsObject@QDeclarativeGraphicsObjectContainer@@QBEPAVQGraphicsObject@@XZ @ 1284 NONAME ; class QGraphicsObject * QDeclarativeGraphicsObjectContainer::graphicsObject(void) const
+ ?gridBottom@QDeclarativeGridScaledImage@@QBEHXZ @ 1285 NONAME ; int QDeclarativeGridScaledImage::gridBottom(void) const
+ ?gridLeft@QDeclarativeGridScaledImage@@QBEHXZ @ 1286 NONAME ; int QDeclarativeGridScaledImage::gridLeft(void) const
+ ?gridRight@QDeclarativeGridScaledImage@@QBEHXZ @ 1287 NONAME ; int QDeclarativeGridScaledImage::gridRight(void) const
+ ?gridTop@QDeclarativeGridScaledImage@@QBEHXZ @ 1288 NONAME ; int QDeclarativeGridScaledImage::gridTop(void) const
+ ?hAlign@QDeclarativeText@@QBE?AW4HAlignment@1@XZ @ 1289 NONAME ; enum QDeclarativeText::HAlignment QDeclarativeText::hAlign(void) const
+ ?hAlign@QDeclarativeTextEdit@@QBE?AW4HAlignment@1@XZ @ 1290 NONAME ; enum QDeclarativeTextEdit::HAlignment QDeclarativeTextEdit::hAlign(void) const
+ ?hAlign@QDeclarativeTextInput@@QBE?AW4HAlignment@1@XZ @ 1291 NONAME ; enum QDeclarativeTextInput::HAlignment QDeclarativeTextInput::hAlign(void) const
+ ?hasAcceptableInput@QDeclarativeTextInput@@QBE_NXZ @ 1292 NONAME ; bool QDeclarativeTextInput::hasAcceptableInput(void) const
+ ?hasError@QDeclarativeExpression@@QBE_NXZ @ 1293 NONAME ; bool QDeclarativeExpression::hasError(void) const
+ ?hasFocus@QDeclarativeItem@@QBE_NXZ @ 1294 NONAME ; bool QDeclarativeItem::hasFocus(void) const
+ ?hasNotifySignal@QDeclarativeDebugPropertyReference@@QBE_NXZ @ 1295 NONAME ; bool QDeclarativeDebugPropertyReference::hasNotifySignal(void) const
+ ?hasNotifySignal@QDeclarativeProperty@@QBE_NXZ @ 1296 NONAME ; bool QDeclarativeProperty::hasNotifySignal(void) const
+ ?hasNotifySignal@QMetaPropertyBuilder@@QBE_NXZ @ 1297 NONAME ; bool QMetaPropertyBuilder::hasNotifySignal(void) const
+ ?hasStdCppSet@QMetaPropertyBuilder@@QBE_NXZ @ 1298 NONAME ; bool QMetaPropertyBuilder::hasStdCppSet(void) const
+ ?header@QDeclarativeListView@@QBEPAVQDeclarativeComponent@@XZ @ 1299 NONAME ; class QDeclarativeComponent * QDeclarativeListView::header(void) const
+ ?height@QDeclarativeItem@@QBEMXZ @ 1300 NONAME ; float QDeclarativeItem::height(void) const
+ ?height@QDeclarativeParentChange@@QBEMXZ @ 1301 NONAME ; float QDeclarativeParentChange::height(void) const
+ ?heightChange@QDeclarativeFlickable@@IAEXXZ @ 1302 NONAME ; void QDeclarativeFlickable::heightChange(void)
+ ?heightChanged@QDeclarativeItem@@IAEXXZ @ 1303 NONAME ; void QDeclarativeItem::heightChanged(void)
+ ?heightIsSet@QDeclarativeParentChange@@QBE_NXZ @ 1304 NONAME ; bool QDeclarativeParentChange::heightIsSet(void) const
+ ?heightValid@QDeclarativeItem@@IBE_NXZ @ 1305 NONAME ; bool QDeclarativeItem::heightValid(void) const
+ ?heuristicZoom@QDeclarativeWebView@@QAE_NHHM@Z @ 1306 NONAME ; bool QDeclarativeWebView::heuristicZoom(int, int, float)
+ ?highlight@QDeclarativeGridView@@QBEPAVQDeclarativeComponent@@XZ @ 1307 NONAME ; class QDeclarativeComponent * QDeclarativeGridView::highlight(void) const
+ ?highlight@QDeclarativeListView@@QBEPAVQDeclarativeComponent@@XZ @ 1308 NONAME ; class QDeclarativeComponent * QDeclarativeListView::highlight(void) const
+ ?highlight@QDeclarativeSystemPalette@@QBE?AVQColor@@XZ @ 1309 NONAME ; class QColor QDeclarativeSystemPalette::highlight(void) const
+ ?highlightChanged@QDeclarativeGridView@@IAEXXZ @ 1310 NONAME ; void QDeclarativeGridView::highlightChanged(void)
+ ?highlightChanged@QDeclarativeListView@@IAEXXZ @ 1311 NONAME ; void QDeclarativeListView::highlightChanged(void)
+ ?highlightFollowsCurrentItem@QDeclarativeGridView@@QBE_NXZ @ 1312 NONAME ; bool QDeclarativeGridView::highlightFollowsCurrentItem(void) const
+ ?highlightFollowsCurrentItem@QDeclarativeListView@@QBE_NXZ @ 1313 NONAME ; bool QDeclarativeListView::highlightFollowsCurrentItem(void) const
+ ?highlightItem@QDeclarativeGridView@@QAEPAVQDeclarativeItem@@XZ @ 1314 NONAME ; class QDeclarativeItem * QDeclarativeGridView::highlightItem(void)
+ ?highlightItem@QDeclarativeListView@@QAEPAVQDeclarativeItem@@XZ @ 1315 NONAME ; class QDeclarativeItem * QDeclarativeListView::highlightItem(void)
+ ?highlightMoveSpeed@QDeclarativeListView@@QBEMXZ @ 1316 NONAME ; float QDeclarativeListView::highlightMoveSpeed(void) const
+ ?highlightMoveSpeedChanged@QDeclarativeListView@@IAEXXZ @ 1317 NONAME ; void QDeclarativeListView::highlightMoveSpeedChanged(void)
+ ?highlightRangeMode@QDeclarativeListView@@QBE?AW4HighlightRangeMode@1@XZ @ 1318 NONAME ; enum QDeclarativeListView::HighlightRangeMode QDeclarativeListView::highlightRangeMode(void) const
+ ?highlightResizeSpeed@QDeclarativeListView@@QBEMXZ @ 1319 NONAME ; float QDeclarativeListView::highlightResizeSpeed(void) const
+ ?highlightResizeSpeedChanged@QDeclarativeListView@@IAEXXZ @ 1320 NONAME ; void QDeclarativeListView::highlightResizeSpeedChanged(void)
+ ?highlightedText@QDeclarativeSystemPalette@@QBE?AVQColor@@XZ @ 1321 NONAME ; class QColor QDeclarativeSystemPalette::highlightedText(void) const
+ ?history@QDeclarativeWebView@@QBEPAVQWebHistory@@XZ @ 1322 NONAME ; class QWebHistory * QDeclarativeWebView::history(void) const
+ ?horizontalAlignmentChanged@QDeclarativeText@@IAEXW4HAlignment@1@@Z @ 1323 NONAME ; void QDeclarativeText::horizontalAlignmentChanged(enum QDeclarativeText::HAlignment)
+ ?horizontalAlignmentChanged@QDeclarativeTextEdit@@IAEXW4HAlignment@1@@Z @ 1324 NONAME ; void QDeclarativeTextEdit::horizontalAlignmentChanged(enum QDeclarativeTextEdit::HAlignment)
+ ?horizontalAlignmentChanged@QDeclarativeTextInput@@IAEXW4HAlignment@1@@Z @ 1325 NONAME ; void QDeclarativeTextInput::horizontalAlignmentChanged(enum QDeclarativeTextInput::HAlignment)
+ ?horizontalCenter@QDeclarativeAnchorChanges@@QBE?AVQDeclarativeAnchorLine@@XZ @ 1326 NONAME ; class QDeclarativeAnchorLine QDeclarativeAnchorChanges::horizontalCenter(void) const
+ ?horizontalCenter@QDeclarativeAnchors@@QBE?AVQDeclarativeAnchorLine@@XZ @ 1327 NONAME ; class QDeclarativeAnchorLine QDeclarativeAnchors::horizontalCenter(void) const
+ ?horizontalCenter@QDeclarativeItem@@QBE?AVQDeclarativeAnchorLine@@XZ @ 1328 NONAME ; class QDeclarativeAnchorLine QDeclarativeItem::horizontalCenter(void) const
+ ?horizontalCenterChanged@QDeclarativeAnchors@@IAEXXZ @ 1329 NONAME ; void QDeclarativeAnchors::horizontalCenterChanged(void)
+ ?horizontalCenterOffset@QDeclarativeAnchors@@QBEMXZ @ 1330 NONAME ; float QDeclarativeAnchors::horizontalCenterOffset(void) const
+ ?horizontalCenterOffsetChanged@QDeclarativeAnchors@@IAEXXZ @ 1331 NONAME ; void QDeclarativeAnchors::horizontalCenterOffsetChanged(void)
+ ?horizontalTileMode@QDeclarativeBorderImage@@QBE?AW4TileMode@1@XZ @ 1332 NONAME ; enum QDeclarativeBorderImage::TileMode QDeclarativeBorderImage::horizontalTileMode(void) const
+ ?horizontalTileModeChanged@QDeclarativeBorderImage@@IAEXXZ @ 1333 NONAME ; void QDeclarativeBorderImage::horizontalTileModeChanged(void)
+ ?horizontalTileRule@QDeclarativeGridScaledImage@@QBE?AW4TileMode@QDeclarativeBorderImage@@XZ @ 1334 NONAME ; enum QDeclarativeBorderImage::TileMode QDeclarativeGridScaledImage::horizontalTileRule(void) const
+ ?horizontalVelocity@QDeclarativeFlickable@@QBEMXZ @ 1335 NONAME ; float QDeclarativeFlickable::horizontalVelocity(void) const
+ ?horizontalVelocityChanged@QDeclarativeFlickable@@IAEXXZ @ 1336 NONAME ; void QDeclarativeFlickable::horizontalVelocityChanged(void)
+ ?hoverEnterEvent@QDeclarativeMouseArea@@MAEXPAVQGraphicsSceneHoverEvent@@@Z @ 1337 NONAME ; void QDeclarativeMouseArea::hoverEnterEvent(class QGraphicsSceneHoverEvent *)
+ ?hoverLeaveEvent@QDeclarativeMouseArea@@MAEXPAVQGraphicsSceneHoverEvent@@@Z @ 1338 NONAME ; void QDeclarativeMouseArea::hoverLeaveEvent(class QGraphicsSceneHoverEvent *)
+ ?hoverMoveEvent@QDeclarativeMouseArea@@MAEXPAVQGraphicsSceneHoverEvent@@@Z @ 1339 NONAME ; void QDeclarativeMouseArea::hoverMoveEvent(class QGraphicsSceneHoverEvent *)
+ ?hoverMoveEvent@QDeclarativeWebView@@MAEXPAVQGraphicsSceneHoverEvent@@@Z @ 1340 NONAME ; void QDeclarativeWebView::hoverMoveEvent(class QGraphicsSceneHoverEvent *)
+ ?hovered@QDeclarativeMouseArea@@QBE_NXZ @ 1341 NONAME ; bool QDeclarativeMouseArea::hovered(void) const
+ ?hoveredChanged@QDeclarativeMouseArea@@IAEXXZ @ 1342 NONAME ; void QDeclarativeMouseArea::hoveredChanged(void)
+ ?html@QDeclarativeWebView@@QBE?AVQString@@XZ @ 1343 NONAME ; class QString QDeclarativeWebView::html(void) const
+ ?htmlChanged@QDeclarativeWebView@@IAEXXZ @ 1344 NONAME ; void QDeclarativeWebView::htmlChanged(void)
+ ?icon@QDeclarativeWebView@@QBE?AVQPixmap@@XZ @ 1345 NONAME ; class QPixmap QDeclarativeWebView::icon(void) const
+ ?iconChanged@QDeclarativeWebView@@IAEXXZ @ 1346 NONAME ; void QDeclarativeWebView::iconChanged(void)
+ ?idForObject@QDeclarativeDebugService@@SAHPAVQObject@@@Z @ 1347 NONAME ; int QDeclarativeDebugService::idForObject(class QObject *)
+ ?imageLoaded@QDeclarativeParticles@@AAEXXZ @ 1348 NONAME ; void QDeclarativeParticles::imageLoaded(void)
+ ?imageProvider@QDeclarativeEngine@@QBEPAVQDeclarativeImageProvider@@ABVQString@@@Z @ 1349 NONAME ; class QDeclarativeImageProvider * QDeclarativeEngine::imageProvider(class QString const &) const
+ ?implicitHeight@QDeclarativeItem@@QBEMXZ @ 1350 NONAME ; float QDeclarativeItem::implicitHeight(void) const
+ ?implicitWidth@QDeclarativeItem@@QBEMXZ @ 1351 NONAME ; float QDeclarativeItem::implicitWidth(void) const
+ ?importExtension@QDeclarativeEngine@@QAE_NABVQString@@0@Z @ 1352 NONAME ; bool QDeclarativeEngine::importExtension(class QString const &, class QString const &)
+ ?imports@QDeclarativeDomDocument@@QBE?AV?$QList@VQDeclarativeDomImport@@@@XZ @ 1353 NONAME ; class QList<class QDeclarativeDomImport> QDeclarativeDomDocument::imports(void) const
+ ?inSync@QDeclarativeSpringFollow@@QBE_NXZ @ 1354 NONAME ; bool QDeclarativeSpringFollow::inSync(void) const
+ ?incrementCurrentIndex@QDeclarativeListView@@QAEXXZ @ 1355 NONAME ; void QDeclarativeListView::incrementCurrentIndex(void)
+ ?index@QDeclarativeProperty@@QBEHXZ @ 1356 NONAME ; int QDeclarativeProperty::index(void) const
+ ?index@QDeclarativeType@@QBEHXZ @ 1357 NONAME ; int QDeclarativeType::index(void) const
+ ?index@QMetaEnumBuilder@@QBEHXZ @ 1358 NONAME ; int QMetaEnumBuilder::index(void) const
+ ?index@QMetaMethodBuilder@@QBEHXZ @ 1359 NONAME ; int QMetaMethodBuilder::index(void) const
+ ?index@QMetaPropertyBuilder@@QBEHXZ @ 1360 NONAME ; int QMetaPropertyBuilder::index(void) const
+ ?indexOf@QDeclarativeVisualDataModel@@UBEHPAVQDeclarativeItem@@PAVQObject@@@Z @ 1361 NONAME ; int QDeclarativeVisualDataModel::indexOf(class QDeclarativeItem *, class QObject *) const
+ ?indexOf@QDeclarativeVisualItemModel@@UBEHPAVQDeclarativeItem@@PAVQObject@@@Z @ 1362 NONAME ; int QDeclarativeVisualItemModel::indexOf(class QDeclarativeItem *, class QObject *) const
+ ?indexOfClassInfo@QMetaObjectBuilder@@QAEHABVQByteArray@@@Z @ 1363 NONAME ; int QMetaObjectBuilder::indexOfClassInfo(class QByteArray const &)
+ ?indexOfConstructor@QMetaObjectBuilder@@QAEHABVQByteArray@@@Z @ 1364 NONAME ; int QMetaObjectBuilder::indexOfConstructor(class QByteArray const &)
+ ?indexOfEnumerator@QMetaObjectBuilder@@QAEHABVQByteArray@@@Z @ 1365 NONAME ; int QMetaObjectBuilder::indexOfEnumerator(class QByteArray const &)
+ ?indexOfMethod@QMetaObjectBuilder@@QAEHABVQByteArray@@@Z @ 1366 NONAME ; int QMetaObjectBuilder::indexOfMethod(class QByteArray const &)
+ ?indexOfProperty@QMetaObjectBuilder@@QAEHABVQByteArray@@@Z @ 1367 NONAME ; int QMetaObjectBuilder::indexOfProperty(class QByteArray const &)
+ ?indexOfSignal@QMetaObjectBuilder@@QAEHABVQByteArray@@@Z @ 1368 NONAME ; int QMetaObjectBuilder::indexOfSignal(class QByteArray const &)
+ ?indexOfSlot@QMetaObjectBuilder@@QAEHABVQByteArray@@@Z @ 1369 NONAME ; int QMetaObjectBuilder::indexOfSlot(class QByteArray const &)
+ ?init@QDeclarativeContextPrivate@@QAEXXZ @ 1370 NONAME ; void QDeclarativeContextPrivate::init(void)
+ ?init@QDeclarativePaintedItem@@AAEXXZ @ 1371 NONAME ; void QDeclarativePaintedItem::init(void)
+ ?init@QDeclarativeWebView@@AAEXXZ @ 1372 NONAME ; void QDeclarativeWebView::init(void)
+ ?initialLayout@QDeclarativeWebView@@AAEXXZ @ 1373 NONAME ; void QDeclarativeWebView::initialLayout(void)
+ ?initialValue@QDeclarativeOpenMetaObject@@UAE?AVQVariant@@H@Z @ 1374 NONAME ; class QVariant QDeclarativeOpenMetaObject::initialValue(int)
+ ?initializeEngine@QDeclarativeExtensionPlugin@@UAEXPAVQDeclarativeEngine@@PBD@Z @ 1375 NONAME ; void QDeclarativeExtensionPlugin::initializeEngine(class QDeclarativeEngine *, char const *)
+ ?inputMask@QDeclarativeTextInput@@QBE?AVQString@@XZ @ 1376 NONAME ; class QString QDeclarativeTextInput::inputMask(void) const
+ ?inputMaskChanged@QDeclarativeTextInput@@IAEXABVQString@@@Z @ 1377 NONAME ; void QDeclarativeTextInput::inputMaskChanged(class QString const &)
+ ?inputMethodEvent@QDeclarativeItem@@MAEXPAVQInputMethodEvent@@@Z @ 1378 NONAME ; void QDeclarativeItem::inputMethodEvent(class QInputMethodEvent *)
+ ?inputMethodEvent@QDeclarativeTextEdit@@MAEXPAVQInputMethodEvent@@@Z @ 1379 NONAME ; void QDeclarativeTextEdit::inputMethodEvent(class QInputMethodEvent *)
+ ?inputMethodQuery@QDeclarativeItem@@MBE?AVQVariant@@W4InputMethodQuery@Qt@@@Z @ 1380 NONAME ; class QVariant QDeclarativeItem::inputMethodQuery(enum Qt::InputMethodQuery) const
+ ?inputMethodQuery@QDeclarativeTextEdit@@UBE?AVQVariant@@W4InputMethodQuery@Qt@@@Z @ 1381 NONAME ; class QVariant QDeclarativeTextEdit::inputMethodQuery(enum Qt::InputMethodQuery) const
+ ?inputMethodQuery@QDeclarativeTextInput@@UBE?AVQVariant@@W4InputMethodQuery@Qt@@@Z @ 1382 NONAME ; class QVariant QDeclarativeTextInput::inputMethodQuery(enum Qt::InputMethodQuery) const
+ ?insert@QDeclarativeListModel@@QAEXHABVQScriptValue@@@Z @ 1383 NONAME ; void QDeclarativeListModel::insert(int, class QScriptValue const &)
+ ?insert@QDeclarativePropertyMap@@QAEXABVQString@@ABVQVariant@@@Z @ 1384 NONAME ; void QDeclarativePropertyMap::insert(class QString const &, class QVariant const &)
+ ?interactiveChanged@QDeclarativeFlickable@@IAEXXZ @ 1385 NONAME ; void QDeclarativeFlickable::interactiveChanged(void)
+ ?interfaceIId@QDeclarativeMetaType@@SAPBDH@Z @ 1386 NONAME ; char const * QDeclarativeMetaType::interfaceIId(int)
+ ?interfaceIId@QDeclarativeType@@QBEPBDXZ @ 1387 NONAME ; char const * QDeclarativeType::interfaceIId(void) const
+ ?interpolate@QDeclarativePath@@AAEXHABVQString@@M@Z @ 1388 NONAME ; void QDeclarativePath::interpolate(int, class QString const &, float)
+ ?interval@QDeclarativeTimer@@QBEHXZ @ 1389 NONAME ; int QDeclarativeTimer::interval(void) const
+ ?invalidPacket@QPacketProtocol@@IAEXXZ @ 1390 NONAME ; void QPacketProtocol::invalidPacket(void)
+ ?invalidateEngines@QDeclarativeContextPrivate@@QAEXXZ @ 1391 NONAME ; void QDeclarativeContextPrivate::invalidateEngines(void)
+ ?isAlias@QDeclarativeDomDynamicProperty@@QBE_NXZ @ 1392 NONAME ; bool QDeclarativeDomDynamicProperty::isAlias(void) const
+ ?isAtBoundaryChanged@QDeclarativeFlickable@@IAEXXZ @ 1393 NONAME ; void QDeclarativeFlickable::isAtBoundaryChanged(void)
+ ?isAtXBeginning@QDeclarativeFlickable@@QBE_NXZ @ 1394 NONAME ; bool QDeclarativeFlickable::isAtXBeginning(void) const
+ ?isAtXEnd@QDeclarativeFlickable@@QBE_NXZ @ 1395 NONAME ; bool QDeclarativeFlickable::isAtXEnd(void) const
+ ?isAtYBeginning@QDeclarativeFlickable@@QBE_NXZ @ 1396 NONAME ; bool QDeclarativeFlickable::isAtYBeginning(void) const
+ ?isAtYEnd@QDeclarativeFlickable@@QBE_NXZ @ 1397 NONAME ; bool QDeclarativeFlickable::isAtYEnd(void) const
+ ?isAttachedPropertyName@QDeclarativeCompiler@@SA_NABVQByteArray@@@Z @ 1398 NONAME ; bool QDeclarativeCompiler::isAttachedPropertyName(class QByteArray const &)
+ ?isBinding@QDeclarativeDomValue@@QBE_NXZ @ 1399 NONAME ; bool QDeclarativeDomValue::isBinding(void) const
+ ?isClosed@QDeclarativePath@@QBE_NXZ @ 1400 NONAME ; bool QDeclarativePath::isClosed(void) const
+ ?isComponent@QDeclarativeDomObject@@QBE_NXZ @ 1401 NONAME ; bool QDeclarativeDomObject::isComponent(void) const
+ ?isComponentComplete@QDeclarativeItem@@IBE_NXZ @ 1402 NONAME ; bool QDeclarativeItem::isComponentComplete(void) const
+ ?isConnected@QDeclarativeDebugClient@@QBE_NXZ @ 1403 NONAME ; bool QDeclarativeDebugClient::isConnected(void) const
+ ?isConnected@QDeclarativeDebugConnection@@QBE_NXZ @ 1404 NONAME ; bool QDeclarativeDebugConnection::isConnected(void) const
+ ?isCursorVisible@QDeclarativeTextEdit@@QBE_NXZ @ 1405 NONAME ; bool QDeclarativeTextEdit::isCursorVisible(void) const
+ ?isCursorVisible@QDeclarativeTextInput@@QBE_NXZ @ 1406 NONAME ; bool QDeclarativeTextInput::isCursorVisible(void) const
+ ?isCustomType@QDeclarativeDomObject@@QBE_NXZ @ 1407 NONAME ; bool QDeclarativeDomObject::isCustomType(void) const
+ ?isDebuggingEnabled@QDeclarativeDebugService@@SA_NXZ @ 1408 NONAME ; bool QDeclarativeDebugService::isDebuggingEnabled(void)
+ ?isDefaultProperty@QDeclarativeDomDynamicProperty@@QBE_NXZ @ 1409 NONAME ; bool QDeclarativeDomDynamicProperty::isDefaultProperty(void) const
+ ?isDefaultProperty@QDeclarativeDomProperty@@QBE_NXZ @ 1410 NONAME ; bool QDeclarativeDomProperty::isDefaultProperty(void) const
+ ?isDesignable@QDeclarativeProperty@@QBE_NXZ @ 1411 NONAME ; bool QDeclarativeProperty::isDesignable(void) const
+ ?isDesignable@QMetaPropertyBuilder@@QBE_NXZ @ 1412 NONAME ; bool QMetaPropertyBuilder::isDesignable(void) const
+ ?isDynamic@QMetaPropertyBuilder@@QBE_NXZ @ 1413 NONAME ; bool QMetaPropertyBuilder::isDynamic(void) const
+ ?isEditable@QMetaPropertyBuilder@@QBE_NXZ @ 1414 NONAME ; bool QMetaPropertyBuilder::isEditable(void) const
+ ?isEmpty@QDeclarativePropertyMap@@QBE_NXZ @ 1415 NONAME ; bool QDeclarativePropertyMap::isEmpty(void) const
+ ?isEmpty@QPacket@@QBE_NXZ @ 1416 NONAME ; bool QPacket::isEmpty(void) const
+ ?isEnabled@QDeclarativeDebugClient@@QBE_NXZ @ 1417 NONAME ; bool QDeclarativeDebugClient::isEnabled(void) const
+ ?isEnabled@QDeclarativeDebugService@@QBE_NXZ @ 1418 NONAME ; bool QDeclarativeDebugService::isEnabled(void) const
+ ?isEnabled@QDeclarativeMouseArea@@QBE_NXZ @ 1419 NONAME ; bool QDeclarativeMouseArea::isEnabled(void) const
+ ?isEnumOrFlag@QMetaPropertyBuilder@@QBE_NXZ @ 1420 NONAME ; bool QMetaPropertyBuilder::isEnumOrFlag(void) const
+ ?isError@QDeclarativeCompiler@@QBE_NXZ @ 1421 NONAME ; bool QDeclarativeCompiler::isError(void) const
+ ?isError@QDeclarativeComponent@@QBE_NXZ @ 1422 NONAME ; bool QDeclarativeComponent::isError(void) const
+ ?isExplicit@QDeclarativePropertyChanges@@QBE_NXZ @ 1423 NONAME ; bool QDeclarativePropertyChanges::isExplicit(void) const
+ ?isFlag@QMetaEnumBuilder@@QBE_NXZ @ 1424 NONAME ; bool QMetaEnumBuilder::isFlag(void) const
+ ?isFlicking@QDeclarativeFlickable@@QBE_NXZ @ 1425 NONAME ; bool QDeclarativeFlickable::isFlicking(void) const
+ ?isInteractive@QDeclarativeFlickable@@QBE_NXZ @ 1426 NONAME ; bool QDeclarativeFlickable::isInteractive(void) const
+ ?isInterface@QDeclarativeMetaType@@SA_NH@Z @ 1427 NONAME ; bool QDeclarativeMetaType::isInterface(int)
+ ?isInterface@QDeclarativeType@@QBE_NXZ @ 1428 NONAME ; bool QDeclarativeType::isInterface(void) const
+ ?isInvalid@QDeclarativeDomValue@@QBE_NXZ @ 1429 NONAME ; bool QDeclarativeDomValue::isInvalid(void) const
+ ?isKey@QDeclarativeXmlListModelRole@@QBE_NXZ @ 1430 NONAME ; bool QDeclarativeXmlListModelRole::isKey(void) const
+ ?isList@QDeclarativeCustomParserProperty@@QBE_NXZ @ 1431 NONAME ; bool QDeclarativeCustomParserProperty::isList(void) const
+ ?isList@QDeclarativeDomValue@@QBE_NXZ @ 1432 NONAME ; bool QDeclarativeDomValue::isList(void) const
+ ?isList@QDeclarativeMetaType@@SA_NH@Z @ 1433 NONAME ; bool QDeclarativeMetaType::isList(int)
+ ?isLiteral@QDeclarativeDomValue@@QBE_NXZ @ 1434 NONAME ; bool QDeclarativeDomValue::isLiteral(void) const
+ ?isLoading@QDeclarativeComponent@@QBE_NXZ @ 1435 NONAME ; bool QDeclarativeComponent::isLoading(void) const
+ ?isLoading@QDeclarativePixmapReply@@ABE_NXZ @ 1436 NONAME ; bool QDeclarativePixmapReply::isLoading(void) const
+ ?isMoving@QDeclarativeFlickable@@QBE_NXZ @ 1437 NONAME ; bool QDeclarativeFlickable::isMoving(void) const
+ ?isNull@QDeclarativeComponent@@QBE_NXZ @ 1438 NONAME ; bool QDeclarativeComponent::isNull(void) const
+ ?isNull@QDeclarativeScaleGrid@@QBE_NXZ @ 1439 NONAME ; bool QDeclarativeScaleGrid::isNull(void) const
+ ?isObject@QDeclarativeDomValue@@QBE_NXZ @ 1440 NONAME ; bool QDeclarativeDomValue::isObject(void) const
+ ?isPaused@QDeclarativeAnimatedImage@@QBE_NXZ @ 1441 NONAME ; bool QDeclarativeAnimatedImage::isPaused(void) const
+ ?isPlaying@QDeclarativeAnimatedImage@@QBE_NXZ @ 1442 NONAME ; bool QDeclarativeAnimatedImage::isPlaying(void) const
+ ?isProperty@QDeclarativeProperty@@QBE_NXZ @ 1443 NONAME ; bool QDeclarativeProperty::isProperty(void) const
+ ?isQObject@QDeclarativeMetaType@@SA_NH@Z @ 1444 NONAME ; bool QDeclarativeMetaType::isQObject(int)
+ ?isReadOnly@QDeclarativeTextEdit@@QBE_NXZ @ 1445 NONAME ; bool QDeclarativeTextEdit::isReadOnly(void) const
+ ?isReadOnly@QDeclarativeTextInput@@QBE_NXZ @ 1446 NONAME ; bool QDeclarativeTextInput::isReadOnly(void) const
+ ?isReadable@QMetaPropertyBuilder@@QBE_NXZ @ 1447 NONAME ; bool QMetaPropertyBuilder::isReadable(void) const
+ ?isReady@QDeclarativeComponent@@QBE_NXZ @ 1448 NONAME ; bool QDeclarativeComponent::isReady(void) const
+ ?isRepeating@QDeclarativeTimer@@QBE_NXZ @ 1449 NONAME ; bool QDeclarativeTimer::isRepeating(void) const
+ ?isResettable@QDeclarativeProperty@@QBE_NXZ @ 1450 NONAME ; bool QDeclarativeProperty::isResettable(void) const
+ ?isResettable@QMetaPropertyBuilder@@QBE_NXZ @ 1451 NONAME ; bool QMetaPropertyBuilder::isResettable(void) const
+ ?isReversable@QDeclarativeAnchorChanges@@UAE_NXZ @ 1452 NONAME ; bool QDeclarativeAnchorChanges::isReversable(void)
+ ?isReversable@QDeclarativeParentChange@@UAE_NXZ @ 1453 NONAME ; bool QDeclarativeParentChange::isReversable(void)
+ ?isRunning@QDeclarativeTimer@@QBE_NXZ @ 1454 NONAME ; bool QDeclarativeTimer::isRunning(void) const
+ ?isScriptable@QMetaPropertyBuilder@@QBE_NXZ @ 1455 NONAME ; bool QMetaPropertyBuilder::isScriptable(void) const
+ ?isSignalProperty@QDeclarativeProperty@@QBE_NXZ @ 1456 NONAME ; bool QDeclarativeProperty::isSignalProperty(void) const
+ ?isSignalPropertyName@QDeclarativeCompiler@@SA_NABVQByteArray@@@Z @ 1457 NONAME ; bool QDeclarativeCompiler::isSignalPropertyName(class QByteArray const &)
+ ?isStored@QMetaPropertyBuilder@@QBE_NXZ @ 1458 NONAME ; bool QMetaPropertyBuilder::isStored(void) const
+ ?isUser@QMetaPropertyBuilder@@QBE_NXZ @ 1459 NONAME ; bool QMetaPropertyBuilder::isUser(void) const
+ ?isValid@QDeclarativeDomDynamicProperty@@QBE_NXZ @ 1460 NONAME ; bool QDeclarativeDomDynamicProperty::isValid(void) const
+ ?isValid@QDeclarativeDomObject@@QBE_NXZ @ 1461 NONAME ; bool QDeclarativeDomObject::isValid(void) const
+ ?isValid@QDeclarativeDomProperty@@QBE_NXZ @ 1462 NONAME ; bool QDeclarativeDomProperty::isValid(void) const
+ ?isValid@QDeclarativeError@@QBE_NXZ @ 1463 NONAME ; bool QDeclarativeError::isValid(void) const
+ ?isValid@QDeclarativeGridScaledImage@@QBE_NXZ @ 1464 NONAME ; bool QDeclarativeGridScaledImage::isValid(void) const
+ ?isValid@QDeclarativeListAccessor@@QBE_NXZ @ 1465 NONAME ; bool QDeclarativeListAccessor::isValid(void) const
+ ?isValid@QDeclarativeListReference@@QBE_NXZ @ 1466 NONAME ; bool QDeclarativeListReference::isValid(void) const
+ ?isValid@QDeclarativePen@@QAE_NXZ @ 1467 NONAME ; bool QDeclarativePen::isValid(void)
+ ?isValid@QDeclarativeProperty@@QBE_NXZ @ 1468 NONAME ; bool QDeclarativeProperty::isValid(void) const
+ ?isValid@QDeclarativeVisualDataModel@@UBE_NXZ @ 1469 NONAME ; bool QDeclarativeVisualDataModel::isValid(void) const
+ ?isValid@QDeclarativeVisualItemModel@@UBE_NXZ @ 1470 NONAME ; bool QDeclarativeVisualItemModel::isValid(void) const
+ ?isValid@QDeclarativeXmlListModelRole@@QAE_NXZ @ 1471 NONAME ; bool QDeclarativeXmlListModelRole::isValid(void)
+ ?isValidId@QDeclarativeCompiler@@SA_NABVQString@@@Z @ 1472 NONAME ; bool QDeclarativeCompiler::isValidId(class QString const &)
+ ?isValueInterceptor@QDeclarativeDomValue@@QBE_NXZ @ 1473 NONAME ; bool QDeclarativeDomValue::isValueInterceptor(void) const
+ ?isValueSource@QDeclarativeDomValue@@QBE_NXZ @ 1474 NONAME ; bool QDeclarativeDomValue::isValueSource(void) const
+ ?isWaiting@QDeclarativeDebugQuery@@QBE_NXZ @ 1475 NONAME ; bool QDeclarativeDebugQuery::isWaiting(void) const
+ ?isWhenKnown@QDeclarativeState@@QBE_NXZ @ 1476 NONAME ; bool QDeclarativeState::isWhenKnown(void) const
+ ?isWrapEnabled@QDeclarativeGridView@@QBE_NXZ @ 1477 NONAME ; bool QDeclarativeGridView::isWrapEnabled(void) const
+ ?isWrapEnabled@QDeclarativeListView@@QBE_NXZ @ 1478 NONAME ; bool QDeclarativeListView::isWrapEnabled(void) const
+ ?isWritable@QDeclarativeProperty@@QBE_NXZ @ 1479 NONAME ; bool QDeclarativeProperty::isWritable(void) const
+ ?isWritable@QMetaPropertyBuilder@@QBE_NXZ @ 1480 NONAME ; bool QMetaPropertyBuilder::isWritable(void) const
+ ?item@QDeclarativeLoader@@QBEPAVQGraphicsObject@@XZ @ 1481 NONAME ; class QGraphicsObject * QDeclarativeLoader::item(void) const
+ ?item@QDeclarativeVisualDataModel@@QAEPAVQDeclarativeItem@@HABVQByteArray@@_N@Z @ 1482 NONAME ; class QDeclarativeItem * QDeclarativeVisualDataModel::item(int, class QByteArray const &, bool)
+ ?item@QDeclarativeVisualDataModel@@UAEPAVQDeclarativeItem@@H_N@Z @ 1483 NONAME ; class QDeclarativeItem * QDeclarativeVisualDataModel::item(int, bool)
+ ?item@QDeclarativeVisualItemModel@@UAEPAVQDeclarativeItem@@H_N@Z @ 1484 NONAME ; class QDeclarativeItem * QDeclarativeVisualItemModel::item(int, bool)
+ ?itemChange@QDeclarativeBasePositioner@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 1485 NONAME ; class QVariant QDeclarativeBasePositioner::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &)
+ ?itemChange@QDeclarativeGraphicsObjectContainer@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 1486 NONAME ; class QVariant QDeclarativeGraphicsObjectContainer::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &)
+ ?itemChange@QDeclarativeItem@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 1487 NONAME ; class QVariant QDeclarativeItem::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &)
+ ?itemChange@QDeclarativeLoader@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 1488 NONAME ; class QVariant QDeclarativeLoader::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &)
+ ?itemChange@QDeclarativeRepeater@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 1489 NONAME ; class QVariant QDeclarativeRepeater::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &)
+ ?itemChanged@QDeclarativeLoader@@IAEXXZ @ 1490 NONAME ; void QDeclarativeLoader::itemChanged(void)
+ ?itemsChanged@QListModelInterface@@IAEXHHABV?$QList@H@@@Z @ 1491 NONAME ; void QListModelInterface::itemsChanged(int, int, class QList<int> const &)
+ ?itemsInserted@QDeclarativeGridView@@AAEXHH@Z @ 1492 NONAME ; void QDeclarativeGridView::itemsInserted(int, int)
+ ?itemsInserted@QDeclarativeListView@@AAEXHH@Z @ 1493 NONAME ; void QDeclarativeListView::itemsInserted(int, int)
+ ?itemsInserted@QDeclarativePathView@@AAEXHH@Z @ 1494 NONAME ; void QDeclarativePathView::itemsInserted(int, int)
+ ?itemsInserted@QDeclarativeRepeater@@AAEXHH@Z @ 1495 NONAME ; void QDeclarativeRepeater::itemsInserted(int, int)
+ ?itemsInserted@QDeclarativeVisualModel@@IAEXHH@Z @ 1496 NONAME ; void QDeclarativeVisualModel::itemsInserted(int, int)
+ ?itemsInserted@QListModelInterface@@IAEXHH@Z @ 1497 NONAME ; void QListModelInterface::itemsInserted(int, int)
+ ?itemsMoved@QDeclarativeGridView@@AAEXHHH@Z @ 1498 NONAME ; void QDeclarativeGridView::itemsMoved(int, int, int)
+ ?itemsMoved@QDeclarativeListView@@AAEXHHH@Z @ 1499 NONAME ; void QDeclarativeListView::itemsMoved(int, int, int)
+ ?itemsMoved@QDeclarativeRepeater@@AAEXHHH@Z @ 1500 NONAME ; void QDeclarativeRepeater::itemsMoved(int, int, int)
+ ?itemsMoved@QDeclarativeVisualModel@@IAEXHHH@Z @ 1501 NONAME ; void QDeclarativeVisualModel::itemsMoved(int, int, int)
+ ?itemsMoved@QListModelInterface@@IAEXHHH@Z @ 1502 NONAME ; void QListModelInterface::itemsMoved(int, int, int)
+ ?itemsRemoved@QDeclarativeGridView@@AAEXHH@Z @ 1503 NONAME ; void QDeclarativeGridView::itemsRemoved(int, int)
+ ?itemsRemoved@QDeclarativeListView@@AAEXHH@Z @ 1504 NONAME ; void QDeclarativeListView::itemsRemoved(int, int)
+ ?itemsRemoved@QDeclarativePathView@@AAEXHH@Z @ 1505 NONAME ; void QDeclarativePathView::itemsRemoved(int, int)
+ ?itemsRemoved@QDeclarativeRepeater@@AAEXHH@Z @ 1506 NONAME ; void QDeclarativeRepeater::itemsRemoved(int, int)
+ ?itemsRemoved@QDeclarativeVisualModel@@IAEXHH@Z @ 1507 NONAME ; void QDeclarativeVisualModel::itemsRemoved(int, int)
+ ?itemsRemoved@QListModelInterface@@IAEXHH@Z @ 1508 NONAME ; void QListModelInterface::itemsRemoved(int, int)
+ ?javaScriptAlert@QDeclarativeWebPage@@MAEXPAVQWebFrame@@ABVQString@@@Z @ 1509 NONAME ; void QDeclarativeWebPage::javaScriptAlert(class QWebFrame *, class QString const &)
+ ?javaScriptConfirm@QDeclarativeWebPage@@MAE_NPAVQWebFrame@@ABVQString@@@Z @ 1510 NONAME ; bool QDeclarativeWebPage::javaScriptConfirm(class QWebFrame *, class QString const &)
+ ?javaScriptConsoleMessage@QDeclarativeWebPage@@MAEXABVQString@@H0@Z @ 1511 NONAME ; void QDeclarativeWebPage::javaScriptConsoleMessage(class QString const &, int, class QString const &)
+ ?javaScriptPrompt@QDeclarativeWebPage@@MAE_NPAVQWebFrame@@ABVQString@@1PAV3@@Z @ 1512 NONAME ; bool QDeclarativeWebPage::javaScriptPrompt(class QWebFrame *, class QString const &, class QString const &, class QString *)
+ ?javaScriptWindowObjects@QDeclarativeWebView@@QAE?AU?$QDeclarativeListProperty@VQObject@@@@XZ @ 1513 NONAME ; struct QDeclarativeListProperty<class QObject> QDeclarativeWebView::javaScriptWindowObjects(void)
+ ?keepMouseGrab@QDeclarativeItem@@QBE_NXZ @ 1514 NONAME ; bool QDeclarativeItem::keepMouseGrab(void) const
+ ?key@QMetaEnumBuilder@@QBE?AVQByteArray@@H@Z @ 1515 NONAME ; class QByteArray QMetaEnumBuilder::key(int) const
+ ?keyCount@QMetaEnumBuilder@@QBEHXZ @ 1516 NONAME ; int QMetaEnumBuilder::keyCount(void) const
+ ?keyPressEvent@QDeclarativeGridView@@MAEXPAVQKeyEvent@@@Z @ 1517 NONAME ; void QDeclarativeGridView::keyPressEvent(class QKeyEvent *)
+ ?keyPressEvent@QDeclarativeItem@@MAEXPAVQKeyEvent@@@Z @ 1518 NONAME ; void QDeclarativeItem::keyPressEvent(class QKeyEvent *)
+ ?keyPressEvent@QDeclarativeListView@@MAEXPAVQKeyEvent@@@Z @ 1519 NONAME ; void QDeclarativeListView::keyPressEvent(class QKeyEvent *)
+ ?keyPressEvent@QDeclarativeTextEdit@@MAEXPAVQKeyEvent@@@Z @ 1520 NONAME ; void QDeclarativeTextEdit::keyPressEvent(class QKeyEvent *)
+ ?keyPressEvent@QDeclarativeTextInput@@MAEXPAVQKeyEvent@@@Z @ 1521 NONAME ; void QDeclarativeTextInput::keyPressEvent(class QKeyEvent *)
+ ?keyPressEvent@QDeclarativeWebView@@MAEXPAVQKeyEvent@@@Z @ 1522 NONAME ; void QDeclarativeWebView::keyPressEvent(class QKeyEvent *)
+ ?keyReleaseEvent@QDeclarativeItem@@MAEXPAVQKeyEvent@@@Z @ 1523 NONAME ; void QDeclarativeItem::keyReleaseEvent(class QKeyEvent *)
+ ?keyReleaseEvent@QDeclarativeTextEdit@@MAEXPAVQKeyEvent@@@Z @ 1524 NONAME ; void QDeclarativeTextEdit::keyReleaseEvent(class QKeyEvent *)
+ ?keyReleaseEvent@QDeclarativeWebView@@MAEXPAVQKeyEvent@@@Z @ 1525 NONAME ; void QDeclarativeWebView::keyReleaseEvent(class QKeyEvent *)
+ ?keys@QDeclarativePropertyMap@@QBE?AVQStringList@@XZ @ 1526 NONAME ; class QStringList QDeclarativePropertyMap::keys(void) const
+ ?layout@QDeclarativeGridView@@AAEXXZ @ 1527 NONAME ; void QDeclarativeGridView::layout(void)
+ ?left@QDeclarativeAnchorChanges@@QBE?AVQDeclarativeAnchorLine@@XZ @ 1528 NONAME ; class QDeclarativeAnchorLine QDeclarativeAnchorChanges::left(void) const
+ ?left@QDeclarativeAnchors@@QBE?AVQDeclarativeAnchorLine@@XZ @ 1529 NONAME ; class QDeclarativeAnchorLine QDeclarativeAnchors::left(void) const
+ ?left@QDeclarativeItem@@QBE?AVQDeclarativeAnchorLine@@XZ @ 1530 NONAME ; class QDeclarativeAnchorLine QDeclarativeItem::left(void) const
+ ?left@QDeclarativeScaleGrid@@QBEHXZ @ 1531 NONAME ; int QDeclarativeScaleGrid::left(void) const
+ ?leftChanged@QDeclarativeAnchors@@IAEXXZ @ 1532 NONAME ; void QDeclarativeAnchors::leftChanged(void)
+ ?leftMargin@QDeclarativeAnchors@@QBEMXZ @ 1533 NONAME ; float QDeclarativeAnchors::leftMargin(void) const
+ ?leftMarginChanged@QDeclarativeAnchors@@IAEXXZ @ 1534 NONAME ; void QDeclarativeAnchors::leftMarginChanged(void)
+ ?length@QDeclarativeDomDynamicProperty@@QBEHXZ @ 1535 NONAME ; int QDeclarativeDomDynamicProperty::length(void) const
+ ?length@QDeclarativeDomList@@QBEHXZ @ 1536 NONAME ; int QDeclarativeDomList::length(void) const
+ ?length@QDeclarativeDomObject@@QBEHXZ @ 1537 NONAME ; int QDeclarativeDomObject::length(void) const
+ ?length@QDeclarativeDomProperty@@QBEHXZ @ 1538 NONAME ; int QDeclarativeDomProperty::length(void) const
+ ?length@QDeclarativeDomValue@@QBEHXZ @ 1539 NONAME ; int QDeclarativeDomValue::length(void) const
+ ?lifeSpan@QDeclarativeParticles@@QBEHXZ @ 1540 NONAME ; int QDeclarativeParticles::lifeSpan(void) const
+ ?lifeSpanChanged@QDeclarativeParticles@@IAEXXZ @ 1541 NONAME ; void QDeclarativeParticles::lifeSpanChanged(void)
+ ?lifeSpanDeviation@QDeclarativeParticles@@QBEHXZ @ 1542 NONAME ; int QDeclarativeParticles::lifeSpanDeviation(void) const
+ ?lifeSpanDeviationChanged@QDeclarativeParticles@@IAEXXZ @ 1543 NONAME ; void QDeclarativeParticles::lifeSpanDeviationChanged(void)
+ ?light@QDeclarativeSystemPalette@@QBE?AVQColor@@XZ @ 1544 NONAME ; class QColor QDeclarativeSystemPalette::light(void) const
+ ?line@QDeclarativeError@@QBEHXZ @ 1545 NONAME ; int QDeclarativeError::line(void) const
+ ?lineNumber@QDeclarativeDebugFileReference@@QBEHXZ @ 1546 NONAME ; int QDeclarativeDebugFileReference::lineNumber(void) const
+ ?lineNumber@QDeclarativeExpression@@QBEHXZ @ 1547 NONAME ; int QDeclarativeExpression::lineNumber(void) const
+ ?linkActivated@QDeclarativeText@@IAEXABVQString@@@Z @ 1548 NONAME ; void QDeclarativeText::linkActivated(class QString const &)
+ ?list@QDeclarativeListAccessor@@QBE?AVQVariant@@XZ @ 1549 NONAME ; class QVariant QDeclarativeListAccessor::list(void) const
+ ?listElementType@QDeclarativeListReference@@QBEPBUQMetaObject@@XZ @ 1550 NONAME ; struct QMetaObject const * QDeclarativeListReference::listElementType(void) const
+ ?listType@QDeclarativeMetaType@@SAHH@Z @ 1551 NONAME ; int QDeclarativeMetaType::listType(int)
+ ?literal@QDeclarativeDomValueLiteral@@QBE?AVQString@@XZ @ 1552 NONAME ; class QString QDeclarativeDomValueLiteral::literal(void) const
+ ?load@QDeclarativeBorderImage@@MAEXXZ @ 1553 NONAME ; void QDeclarativeBorderImage::load(void)
+ ?load@QDeclarativeDomDocument@@QAE_NPAVQDeclarativeEngine@@ABVQByteArray@@ABVQUrl@@@Z @ 1554 NONAME ; bool QDeclarativeDomDocument::load(class QDeclarativeEngine *, class QByteArray const &, class QUrl const &)
+ ?load@QDeclarativeImageBase@@MAEXXZ @ 1555 NONAME ; void QDeclarativeImageBase::load(void)
+ ?load@QDeclarativeWebView@@QAEXABVQNetworkRequest@@W4Operation@QNetworkAccessManager@@ABVQByteArray@@@Z @ 1556 NONAME ; void QDeclarativeWebView::load(class QNetworkRequest const &, enum QNetworkAccessManager::Operation, class QByteArray const &)
+ ?loadCursorDelegate@QDeclarativeTextEdit@@AAEXXZ @ 1557 NONAME ; void QDeclarativeTextEdit::loadCursorDelegate(void)
+ ?loadFailed@QDeclarativeWebView@@IAEXXZ @ 1558 NONAME ; void QDeclarativeWebView::loadFailed(void)
+ ?loadFinished@QDeclarativeWebView@@IAEXXZ @ 1559 NONAME ; void QDeclarativeWebView::loadFinished(void)
+ ?loadStarted@QDeclarativeWebView@@IAEXXZ @ 1560 NONAME ; void QDeclarativeWebView::loadStarted(void)
+ ?loadUrl@QDeclarativeComponent@@QAEXABVQUrl@@@Z @ 1561 NONAME ; void QDeclarativeComponent::loadUrl(class QUrl const &)
+ ?location@QDeclarativeCustomParserNode@@QBE?AULocation@QDeclarativeParser@@XZ @ 1562 NONAME ; struct QDeclarativeParser::Location QDeclarativeCustomParserNode::location(void) const
+ ?location@QDeclarativeCustomParserProperty@@QBE?AULocation@QDeclarativeParser@@XZ @ 1563 NONAME ; struct QDeclarativeParser::Location QDeclarativeCustomParserProperty::location(void) const
+ ?longStyle@QDeclarativeDateTimeFormatter@@QBE_NXZ @ 1564 NONAME ; bool QDeclarativeDateTimeFormatter::longStyle(void) const
+ ?majorVersion@QDeclarativeType@@QBEHXZ @ 1565 NONAME ; int QDeclarativeType::majorVersion(void) const
+ ?margins@QDeclarativeAnchors@@QBEMXZ @ 1566 NONAME ; float QDeclarativeAnchors::margins(void) const
+ ?marginsChanged@QDeclarativeAnchors@@IAEXXZ @ 1567 NONAME ; void QDeclarativeAnchors::marginsChanged(void)
+ ?mass@QDeclarativeSpringFollow@@QBEMXZ @ 1568 NONAME ; float QDeclarativeSpringFollow::mass(void) const
+ ?massChanged@QDeclarativeSpringFollow@@IAEXXZ @ 1569 NONAME ; void QDeclarativeSpringFollow::massChanged(void)
+ ?maxLength@QDeclarativeTextInput@@QBEHXZ @ 1570 NONAME ; int QDeclarativeTextInput::maxLength(void) const
+ ?maxXExtent@QDeclarativeFlickable@@MBEMXZ @ 1571 NONAME ; float QDeclarativeFlickable::maxXExtent(void) const
+ ?maxXExtent@QDeclarativeGridView@@MBEMXZ @ 1572 NONAME ; float QDeclarativeGridView::maxXExtent(void) const
+ ?maxXExtent@QDeclarativeListView@@MBEMXZ @ 1573 NONAME ; float QDeclarativeListView::maxXExtent(void) const
+ ?maxYExtent@QDeclarativeFlickable@@MBEMXZ @ 1574 NONAME ; float QDeclarativeFlickable::maxYExtent(void) const
+ ?maxYExtent@QDeclarativeGridView@@MBEMXZ @ 1575 NONAME ; float QDeclarativeGridView::maxYExtent(void) const
+ ?maxYExtent@QDeclarativeListView@@MBEMXZ @ 1576 NONAME ; float QDeclarativeListView::maxYExtent(void) const
+ ?maximumEasingTime@QDeclarativeEaseFollow@@QBEMXZ @ 1577 NONAME ; float QDeclarativeEaseFollow::maximumEasingTime(void) const
+ ?maximumEasingTimeChanged@QDeclarativeEaseFollow@@IAEXXZ @ 1578 NONAME ; void QDeclarativeEaseFollow::maximumEasingTimeChanged(void)
+ ?maximumFlickVelocity@QDeclarativeFlickable@@QBEMXZ @ 1579 NONAME ; float QDeclarativeFlickable::maximumFlickVelocity(void) const
+ ?maximumFlickVelocityChanged@QDeclarativeFlickable@@IAEXXZ @ 1580 NONAME ; void QDeclarativeFlickable::maximumFlickVelocityChanged(void)
+ ?maximumLengthChanged@QDeclarativeTextInput@@IAEXH@Z @ 1581 NONAME ; void QDeclarativeTextInput::maximumLengthChanged(int)
+ ?maximumPacketSize@QPacketProtocol@@QBEHXZ @ 1582 NONAME ; int QPacketProtocol::maximumPacketSize(void) const
+ ?maximumXChanged@QDeclarativeDrag@@IAEXXZ @ 1583 NONAME ; void QDeclarativeDrag::maximumXChanged(void)
+ ?maximumYChanged@QDeclarativeDrag@@IAEXXZ @ 1584 NONAME ; void QDeclarativeDrag::maximumYChanged(void)
+ ?mergeDynamicMetaProperties@QDeclarativeCompiler@@AAE_NPAVObject@QDeclarativeParser@@@Z @ 1585 NONAME ; bool QDeclarativeCompiler::mergeDynamicMetaProperties(class QDeclarativeParser::Object *)
+ ?messageReceived@QDeclarativeDebugClient@@MAEXABVQByteArray@@@Z @ 1586 NONAME ; void QDeclarativeDebugClient::messageReceived(class QByteArray const &)
+ ?messageReceived@QDeclarativeDebugService@@MAEXABVQByteArray@@@Z @ 1587 NONAME ; void QDeclarativeDebugService::messageReceived(class QByteArray const &)
+ ?metaCall@QDeclarativeOpenMetaObject@@MAEHW4Call@QMetaObject@@HPAPAX@Z @ 1588 NONAME ; int QDeclarativeOpenMetaObject::metaCall(enum QMetaObject::Call, int, void * *)
+ ?metaObject@QDeclarativeAnchorChanges@@UBEPBUQMetaObject@@XZ @ 1589 NONAME ; struct QMetaObject const * QDeclarativeAnchorChanges::metaObject(void) const
+ ?metaObject@QDeclarativeAnchors@@UBEPBUQMetaObject@@XZ @ 1590 NONAME ; struct QMetaObject const * QDeclarativeAnchors::metaObject(void) const
+ ?metaObject@QDeclarativeAnimatedImage@@UBEPBUQMetaObject@@XZ @ 1591 NONAME ; struct QMetaObject const * QDeclarativeAnimatedImage::metaObject(void) const
+ ?metaObject@QDeclarativeBasePositioner@@UBEPBUQMetaObject@@XZ @ 1592 NONAME ; struct QMetaObject const * QDeclarativeBasePositioner::metaObject(void) const
+ ?metaObject@QDeclarativeBehavior@@UBEPBUQMetaObject@@XZ @ 1593 NONAME ; struct QMetaObject const * QDeclarativeBehavior::metaObject(void) const
+ ?metaObject@QDeclarativeBind@@UBEPBUQMetaObject@@XZ @ 1594 NONAME ; struct QMetaObject const * QDeclarativeBind::metaObject(void) const
+ ?metaObject@QDeclarativeBorderImage@@UBEPBUQMetaObject@@XZ @ 1595 NONAME ; struct QMetaObject const * QDeclarativeBorderImage::metaObject(void) const
+ ?metaObject@QDeclarativeColumn@@UBEPBUQMetaObject@@XZ @ 1596 NONAME ; struct QMetaObject const * QDeclarativeColumn::metaObject(void) const
+ ?metaObject@QDeclarativeComponent@@UBEPBUQMetaObject@@XZ @ 1597 NONAME ; struct QMetaObject const * QDeclarativeComponent::metaObject(void) const
+ ?metaObject@QDeclarativeConnections@@UBEPBUQMetaObject@@XZ @ 1598 NONAME ; struct QMetaObject const * QDeclarativeConnections::metaObject(void) const
+ ?metaObject@QDeclarativeContext@@UBEPBUQMetaObject@@XZ @ 1599 NONAME ; struct QMetaObject const * QDeclarativeContext::metaObject(void) const
+ ?metaObject@QDeclarativeCurve@@UBEPBUQMetaObject@@XZ @ 1600 NONAME ; struct QMetaObject const * QDeclarativeCurve::metaObject(void) const
+ ?metaObject@QDeclarativeDateTimeFormatter@@UBEPBUQMetaObject@@XZ @ 1601 NONAME ; struct QMetaObject const * QDeclarativeDateTimeFormatter::metaObject(void) const
+ ?metaObject@QDeclarativeDebugClient@@UBEPBUQMetaObject@@XZ @ 1602 NONAME ; struct QMetaObject const * QDeclarativeDebugClient::metaObject(void) const
+ ?metaObject@QDeclarativeDebugConnection@@UBEPBUQMetaObject@@XZ @ 1603 NONAME ; struct QMetaObject const * QDeclarativeDebugConnection::metaObject(void) const
+ ?metaObject@QDeclarativeDebugEnginesQuery@@UBEPBUQMetaObject@@XZ @ 1604 NONAME ; struct QMetaObject const * QDeclarativeDebugEnginesQuery::metaObject(void) const
+ ?metaObject@QDeclarativeDebugExpressionQuery@@UBEPBUQMetaObject@@XZ @ 1605 NONAME ; struct QMetaObject const * QDeclarativeDebugExpressionQuery::metaObject(void) const
+ ?metaObject@QDeclarativeDebugObjectExpressionWatch@@UBEPBUQMetaObject@@XZ @ 1606 NONAME ; struct QMetaObject const * QDeclarativeDebugObjectExpressionWatch::metaObject(void) const
+ ?metaObject@QDeclarativeDebugObjectQuery@@UBEPBUQMetaObject@@XZ @ 1607 NONAME ; struct QMetaObject const * QDeclarativeDebugObjectQuery::metaObject(void) const
+ ?metaObject@QDeclarativeDebugPropertyWatch@@UBEPBUQMetaObject@@XZ @ 1608 NONAME ; struct QMetaObject const * QDeclarativeDebugPropertyWatch::metaObject(void) const
+ ?metaObject@QDeclarativeDebugQuery@@UBEPBUQMetaObject@@XZ @ 1609 NONAME ; struct QMetaObject const * QDeclarativeDebugQuery::metaObject(void) const
+ ?metaObject@QDeclarativeDebugRootContextQuery@@UBEPBUQMetaObject@@XZ @ 1610 NONAME ; struct QMetaObject const * QDeclarativeDebugRootContextQuery::metaObject(void) const
+ ?metaObject@QDeclarativeDebugService@@UBEPBUQMetaObject@@XZ @ 1611 NONAME ; struct QMetaObject const * QDeclarativeDebugService::metaObject(void) const
+ ?metaObject@QDeclarativeDebugWatch@@UBEPBUQMetaObject@@XZ @ 1612 NONAME ; struct QMetaObject const * QDeclarativeDebugWatch::metaObject(void) const
+ ?metaObject@QDeclarativeDrag@@UBEPBUQMetaObject@@XZ @ 1613 NONAME ; struct QMetaObject const * QDeclarativeDrag::metaObject(void) const
+ ?metaObject@QDeclarativeEaseFollow@@UBEPBUQMetaObject@@XZ @ 1614 NONAME ; struct QMetaObject const * QDeclarativeEaseFollow::metaObject(void) const
+ ?metaObject@QDeclarativeEngine@@UBEPBUQMetaObject@@XZ @ 1615 NONAME ; struct QMetaObject const * QDeclarativeEngine::metaObject(void) const
+ ?metaObject@QDeclarativeEngineDebug@@UBEPBUQMetaObject@@XZ @ 1616 NONAME ; struct QMetaObject const * QDeclarativeEngineDebug::metaObject(void) const
+ ?metaObject@QDeclarativeExpression@@UBEPBUQMetaObject@@XZ @ 1617 NONAME ; struct QMetaObject const * QDeclarativeExpression::metaObject(void) const
+ ?metaObject@QDeclarativeExtensionPlugin@@UBEPBUQMetaObject@@XZ @ 1618 NONAME ; struct QMetaObject const * QDeclarativeExtensionPlugin::metaObject(void) const
+ ?metaObject@QDeclarativeFlickable@@UBEPBUQMetaObject@@XZ @ 1619 NONAME ; struct QMetaObject const * QDeclarativeFlickable::metaObject(void) const
+ ?metaObject@QDeclarativeFlipable@@UBEPBUQMetaObject@@XZ @ 1620 NONAME ; struct QMetaObject const * QDeclarativeFlipable::metaObject(void) const
+ ?metaObject@QDeclarativeFlow@@UBEPBUQMetaObject@@XZ @ 1621 NONAME ; struct QMetaObject const * QDeclarativeFlow::metaObject(void) const
+ ?metaObject@QDeclarativeFocusPanel@@UBEPBUQMetaObject@@XZ @ 1622 NONAME ; struct QMetaObject const * QDeclarativeFocusPanel::metaObject(void) const
+ ?metaObject@QDeclarativeFocusScope@@UBEPBUQMetaObject@@XZ @ 1623 NONAME ; struct QMetaObject const * QDeclarativeFocusScope::metaObject(void) const
+ ?metaObject@QDeclarativeFontLoader@@UBEPBUQMetaObject@@XZ @ 1624 NONAME ; struct QMetaObject const * QDeclarativeFontLoader::metaObject(void) const
+ ?metaObject@QDeclarativeGradient@@UBEPBUQMetaObject@@XZ @ 1625 NONAME ; struct QMetaObject const * QDeclarativeGradient::metaObject(void) const
+ ?metaObject@QDeclarativeGradientStop@@UBEPBUQMetaObject@@XZ @ 1626 NONAME ; struct QMetaObject const * QDeclarativeGradientStop::metaObject(void) const
+ ?metaObject@QDeclarativeGraphicsObjectContainer@@UBEPBUQMetaObject@@XZ @ 1627 NONAME ; struct QMetaObject const * QDeclarativeGraphicsObjectContainer::metaObject(void) const
+ ?metaObject@QDeclarativeGrid@@UBEPBUQMetaObject@@XZ @ 1628 NONAME ; struct QMetaObject const * QDeclarativeGrid::metaObject(void) const
+ ?metaObject@QDeclarativeGridView@@UBEPBUQMetaObject@@XZ @ 1629 NONAME ; struct QMetaObject const * QDeclarativeGridView::metaObject(void) const
+ ?metaObject@QDeclarativeImage@@UBEPBUQMetaObject@@XZ @ 1630 NONAME ; struct QMetaObject const * QDeclarativeImage::metaObject(void) const
+ ?metaObject@QDeclarativeImageBase@@UBEPBUQMetaObject@@XZ @ 1631 NONAME ; struct QMetaObject const * QDeclarativeImageBase::metaObject(void) const
+ ?metaObject@QDeclarativeItem@@UBEPBUQMetaObject@@XZ @ 1632 NONAME ; struct QMetaObject const * QDeclarativeItem::metaObject(void) const
+ ?metaObject@QDeclarativeListModel@@UBEPBUQMetaObject@@XZ @ 1633 NONAME ; struct QMetaObject const * QDeclarativeListModel::metaObject(void) const
+ ?metaObject@QDeclarativeListView@@UBEPBUQMetaObject@@XZ @ 1634 NONAME ; struct QMetaObject const * QDeclarativeListView::metaObject(void) const
+ ?metaObject@QDeclarativeLoader@@UBEPBUQMetaObject@@XZ @ 1635 NONAME ; struct QMetaObject const * QDeclarativeLoader::metaObject(void) const
+ ?metaObject@QDeclarativeMouseArea@@UBEPBUQMetaObject@@XZ @ 1636 NONAME ; struct QMetaObject const * QDeclarativeMouseArea::metaObject(void) const
+ ?metaObject@QDeclarativeNumberFormatter@@UBEPBUQMetaObject@@XZ @ 1637 NONAME ; struct QMetaObject const * QDeclarativeNumberFormatter::metaObject(void) const
+ ?metaObject@QDeclarativePaintedItem@@UBEPBUQMetaObject@@XZ @ 1638 NONAME ; struct QMetaObject const * QDeclarativePaintedItem::metaObject(void) const
+ ?metaObject@QDeclarativeParentChange@@UBEPBUQMetaObject@@XZ @ 1639 NONAME ; struct QMetaObject const * QDeclarativeParentChange::metaObject(void) const
+ ?metaObject@QDeclarativeParticleMotion@@UBEPBUQMetaObject@@XZ @ 1640 NONAME ; struct QMetaObject const * QDeclarativeParticleMotion::metaObject(void) const
+ ?metaObject@QDeclarativeParticleMotionGravity@@UBEPBUQMetaObject@@XZ @ 1641 NONAME ; struct QMetaObject const * QDeclarativeParticleMotionGravity::metaObject(void) const
+ ?metaObject@QDeclarativeParticleMotionLinear@@UBEPBUQMetaObject@@XZ @ 1642 NONAME ; struct QMetaObject const * QDeclarativeParticleMotionLinear::metaObject(void) const
+ ?metaObject@QDeclarativeParticleMotionWander@@UBEPBUQMetaObject@@XZ @ 1643 NONAME ; struct QMetaObject const * QDeclarativeParticleMotionWander::metaObject(void) const
+ ?metaObject@QDeclarativeParticles@@UBEPBUQMetaObject@@XZ @ 1644 NONAME ; struct QMetaObject const * QDeclarativeParticles::metaObject(void) const
+ ?metaObject@QDeclarativePath@@UBEPBUQMetaObject@@XZ @ 1645 NONAME ; struct QMetaObject const * QDeclarativePath::metaObject(void) const
+ ?metaObject@QDeclarativePathAttribute@@UBEPBUQMetaObject@@XZ @ 1646 NONAME ; struct QMetaObject const * QDeclarativePathAttribute::metaObject(void) const
+ ?metaObject@QDeclarativePathCubic@@UBEPBUQMetaObject@@XZ @ 1647 NONAME ; struct QMetaObject const * QDeclarativePathCubic::metaObject(void) const
+ ?metaObject@QDeclarativePathElement@@UBEPBUQMetaObject@@XZ @ 1648 NONAME ; struct QMetaObject const * QDeclarativePathElement::metaObject(void) const
+ ?metaObject@QDeclarativePathLine@@UBEPBUQMetaObject@@XZ @ 1649 NONAME ; struct QMetaObject const * QDeclarativePathLine::metaObject(void) const
+ ?metaObject@QDeclarativePathPercent@@UBEPBUQMetaObject@@XZ @ 1650 NONAME ; struct QMetaObject const * QDeclarativePathPercent::metaObject(void) const
+ ?metaObject@QDeclarativePathQuad@@UBEPBUQMetaObject@@XZ @ 1651 NONAME ; struct QMetaObject const * QDeclarativePathQuad::metaObject(void) const
+ ?metaObject@QDeclarativePathView@@UBEPBUQMetaObject@@XZ @ 1652 NONAME ; struct QMetaObject const * QDeclarativePathView::metaObject(void) const
+ ?metaObject@QDeclarativePen@@UBEPBUQMetaObject@@XZ @ 1653 NONAME ; struct QMetaObject const * QDeclarativePen::metaObject(void) const
+ ?metaObject@QDeclarativePixmapReply@@UBEPBUQMetaObject@@XZ @ 1654 NONAME ; struct QMetaObject const * QDeclarativePixmapReply::metaObject(void) const
+ ?metaObject@QDeclarativePropertyChanges@@UBEPBUQMetaObject@@XZ @ 1655 NONAME ; struct QMetaObject const * QDeclarativePropertyChanges::metaObject(void) const
+ ?metaObject@QDeclarativePropertyMap@@UBEPBUQMetaObject@@XZ @ 1656 NONAME ; struct QMetaObject const * QDeclarativePropertyMap::metaObject(void) const
+ ?metaObject@QDeclarativeRectangle@@UBEPBUQMetaObject@@XZ @ 1657 NONAME ; struct QMetaObject const * QDeclarativeRectangle::metaObject(void) const
+ ?metaObject@QDeclarativeRepeater@@UBEPBUQMetaObject@@XZ @ 1658 NONAME ; struct QMetaObject const * QDeclarativeRepeater::metaObject(void) const
+ ?metaObject@QDeclarativeRow@@UBEPBUQMetaObject@@XZ @ 1659 NONAME ; struct QMetaObject const * QDeclarativeRow::metaObject(void) const
+ ?metaObject@QDeclarativeScaleGrid@@UBEPBUQMetaObject@@XZ @ 1660 NONAME ; struct QMetaObject const * QDeclarativeScaleGrid::metaObject(void) const
+ ?metaObject@QDeclarativeSpringFollow@@UBEPBUQMetaObject@@XZ @ 1661 NONAME ; struct QMetaObject const * QDeclarativeSpringFollow::metaObject(void) const
+ ?metaObject@QDeclarativeState@@UBEPBUQMetaObject@@XZ @ 1662 NONAME ; struct QMetaObject const * QDeclarativeState::metaObject(void) const
+ ?metaObject@QDeclarativeStateChangeScript@@UBEPBUQMetaObject@@XZ @ 1663 NONAME ; struct QMetaObject const * QDeclarativeStateChangeScript::metaObject(void) const
+ ?metaObject@QDeclarativeStateGroup@@UBEPBUQMetaObject@@XZ @ 1664 NONAME ; struct QMetaObject const * QDeclarativeStateGroup::metaObject(void) const
+ ?metaObject@QDeclarativeStateOperation@@UBEPBUQMetaObject@@XZ @ 1665 NONAME ; struct QMetaObject const * QDeclarativeStateOperation::metaObject(void) const
+ ?metaObject@QDeclarativeSystemPalette@@UBEPBUQMetaObject@@XZ @ 1666 NONAME ; struct QMetaObject const * QDeclarativeSystemPalette::metaObject(void) const
+ ?metaObject@QDeclarativeText@@UBEPBUQMetaObject@@XZ @ 1667 NONAME ; struct QMetaObject const * QDeclarativeText::metaObject(void) const
+ ?metaObject@QDeclarativeTextEdit@@UBEPBUQMetaObject@@XZ @ 1668 NONAME ; struct QMetaObject const * QDeclarativeTextEdit::metaObject(void) const
+ ?metaObject@QDeclarativeTextInput@@UBEPBUQMetaObject@@XZ @ 1669 NONAME ; struct QMetaObject const * QDeclarativeTextInput::metaObject(void) const
+ ?metaObject@QDeclarativeTimer@@UBEPBUQMetaObject@@XZ @ 1670 NONAME ; struct QMetaObject const * QDeclarativeTimer::metaObject(void) const
+ ?metaObject@QDeclarativeTransition@@UBEPBUQMetaObject@@XZ @ 1671 NONAME ; struct QMetaObject const * QDeclarativeTransition::metaObject(void) const
+ ?metaObject@QDeclarativeType@@QBEPBUQMetaObject@@XZ @ 1672 NONAME ; struct QMetaObject const * QDeclarativeType::metaObject(void) const
+ ?metaObject@QDeclarativeValueType@@UBEPBUQMetaObject@@XZ @ 1673 NONAME ; struct QMetaObject const * QDeclarativeValueType::metaObject(void) const
+ ?metaObject@QDeclarativeView@@UBEPBUQMetaObject@@XZ @ 1674 NONAME ; struct QMetaObject const * QDeclarativeView::metaObject(void) const
+ ?metaObject@QDeclarativeViewSection@@UBEPBUQMetaObject@@XZ @ 1675 NONAME ; struct QMetaObject const * QDeclarativeViewSection::metaObject(void) const
+ ?metaObject@QDeclarativeVisualDataModel@@UBEPBUQMetaObject@@XZ @ 1676 NONAME ; struct QMetaObject const * QDeclarativeVisualDataModel::metaObject(void) const
+ ?metaObject@QDeclarativeVisualItemModel@@UBEPBUQMetaObject@@XZ @ 1677 NONAME ; struct QMetaObject const * QDeclarativeVisualItemModel::metaObject(void) const
+ ?metaObject@QDeclarativeVisualModel@@UBEPBUQMetaObject@@XZ @ 1678 NONAME ; struct QMetaObject const * QDeclarativeVisualModel::metaObject(void) const
+ ?metaObject@QDeclarativeWebPage@@UBEPBUQMetaObject@@XZ @ 1679 NONAME ; struct QMetaObject const * QDeclarativeWebPage::metaObject(void) const
+ ?metaObject@QDeclarativeWebView@@UBEPBUQMetaObject@@XZ @ 1680 NONAME ; struct QMetaObject const * QDeclarativeWebView::metaObject(void) const
+ ?metaObject@QDeclarativeXmlListModel@@UBEPBUQMetaObject@@XZ @ 1681 NONAME ; struct QMetaObject const * QDeclarativeXmlListModel::metaObject(void) const
+ ?metaObject@QDeclarativeXmlListModelRole@@UBEPBUQMetaObject@@XZ @ 1682 NONAME ; struct QMetaObject const * QDeclarativeXmlListModelRole::metaObject(void) const
+ ?metaObject@QListModelInterface@@UBEPBUQMetaObject@@XZ @ 1683 NONAME ; struct QMetaObject const * QListModelInterface::metaObject(void) const
+ ?metaObject@QPacketProtocol@@UBEPBUQMetaObject@@XZ @ 1684 NONAME ; struct QMetaObject const * QPacketProtocol::metaObject(void) const
+ ?method@QDeclarativeProperty@@QBE?AVQMetaMethod@@XZ @ 1685 NONAME ; class QMetaMethod QDeclarativeProperty::method(void) const
+ ?method@QMetaObjectBuilder@@QBE?AVQMetaMethodBuilder@@H@Z @ 1686 NONAME ; class QMetaMethodBuilder QMetaObjectBuilder::method(int) const
+ ?methodCount@QMetaObjectBuilder@@QBEHXZ @ 1687 NONAME ; int QMetaObjectBuilder::methodCount(void) const
+ ?methodType@QMetaMethodBuilder@@QBE?AW4MethodType@QMetaMethod@@XZ @ 1688 NONAME ; enum QMetaMethod::MethodType QMetaMethodBuilder::methodType(void) const
+ ?mid@QDeclarativeSystemPalette@@QBE?AVQColor@@XZ @ 1689 NONAME ; class QColor QDeclarativeSystemPalette::mid(void) const
+ ?midlight@QDeclarativeSystemPalette@@QBE?AVQColor@@XZ @ 1690 NONAME ; class QColor QDeclarativeSystemPalette::midlight(void) const
+ ?minXExtent@QDeclarativeFlickable@@MBEMXZ @ 1691 NONAME ; float QDeclarativeFlickable::minXExtent(void) const
+ ?minXExtent@QDeclarativeGridView@@MBEMXZ @ 1692 NONAME ; float QDeclarativeGridView::minXExtent(void) const
+ ?minXExtent@QDeclarativeListView@@MBEMXZ @ 1693 NONAME ; float QDeclarativeListView::minXExtent(void) const
+ ?minYExtent@QDeclarativeFlickable@@MBEMXZ @ 1694 NONAME ; float QDeclarativeFlickable::minYExtent(void) const
+ ?minYExtent@QDeclarativeGridView@@MBEMXZ @ 1695 NONAME ; float QDeclarativeGridView::minYExtent(void) const
+ ?minYExtent@QDeclarativeListView@@MBEMXZ @ 1696 NONAME ; float QDeclarativeListView::minYExtent(void) const
+ ?minimumXChanged@QDeclarativeDrag@@IAEXXZ @ 1697 NONAME ; void QDeclarativeDrag::minimumXChanged(void)
+ ?minimumYChanged@QDeclarativeDrag@@IAEXXZ @ 1698 NONAME ; void QDeclarativeDrag::minimumYChanged(void)
+ ?minorVersion@QDeclarativeType@@QBEHXZ @ 1699 NONAME ; int QDeclarativeType::minorVersion(void) const
+ ?model@QDeclarativeGridView@@QBE?AVQVariant@@XZ @ 1700 NONAME ; class QVariant QDeclarativeGridView::model(void) const
+ ?model@QDeclarativeListView@@QBE?AVQVariant@@XZ @ 1701 NONAME ; class QVariant QDeclarativeListView::model(void) const
+ ?model@QDeclarativePathView@@QBE?AVQVariant@@XZ @ 1702 NONAME ; class QVariant QDeclarativePathView::model(void) const
+ ?model@QDeclarativeRepeater@@QBE?AVQVariant@@XZ @ 1703 NONAME ; class QVariant QDeclarativeRepeater::model(void) const
+ ?model@QDeclarativeVisualDataModel@@QBE?AVQVariant@@XZ @ 1704 NONAME ; class QVariant QDeclarativeVisualDataModel::model(void) const
+ ?modelChanged@QDeclarativeRepeater@@IAEXXZ @ 1705 NONAME ; void QDeclarativeRepeater::modelChanged(void)
+ ?modelReset@QDeclarativeGridView@@AAEXXZ @ 1706 NONAME ; void QDeclarativeGridView::modelReset(void)
+ ?modelReset@QDeclarativeListView@@AAEXXZ @ 1707 NONAME ; void QDeclarativeListView::modelReset(void)
+ ?modelReset@QDeclarativePathView@@AAEXXZ @ 1708 NONAME ; void QDeclarativePathView::modelReset(void)
+ ?modelReset@QDeclarativeRepeater@@AAEXXZ @ 1709 NONAME ; void QDeclarativeRepeater::modelReset(void)
+ ?modelReset@QDeclarativeVisualModel@@IAEXXZ @ 1710 NONAME ; void QDeclarativeVisualModel::modelReset(void)
+ ?modulus@QDeclarativeSpringFollow@@QBEMXZ @ 1711 NONAME ; float QDeclarativeSpringFollow::modulus(void) const
+ ?modulusChanged@QDeclarativeSpringFollow@@IAEXXZ @ 1712 NONAME ; void QDeclarativeSpringFollow::modulusChanged(void)
+ ?motion@QDeclarativeParticles@@QBEPAVQDeclarativeParticleMotion@@XZ @ 1713 NONAME ; class QDeclarativeParticleMotion * QDeclarativeParticles::motion(void) const
+ ?motionChanged@QDeclarativeParticles@@IAEXXZ @ 1714 NONAME ; void QDeclarativeParticles::motionChanged(void)
+ ?mouseDoubleClickEvent@QDeclarativeMouseArea@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1715 NONAME ; void QDeclarativeMouseArea::mouseDoubleClickEvent(class QGraphicsSceneMouseEvent *)
+ ?mouseDoubleClickEvent@QDeclarativeTextEdit@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1716 NONAME ; void QDeclarativeTextEdit::mouseDoubleClickEvent(class QGraphicsSceneMouseEvent *)
+ ?mouseDoubleClickEvent@QDeclarativeWebView@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1717 NONAME ; void QDeclarativeWebView::mouseDoubleClickEvent(class QGraphicsSceneMouseEvent *)
+ ?mouseMoveEvent@QDeclarativeFlickable@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1718 NONAME ; void QDeclarativeFlickable::mouseMoveEvent(class QGraphicsSceneMouseEvent *)
+ ?mouseMoveEvent@QDeclarativeMouseArea@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1719 NONAME ; void QDeclarativeMouseArea::mouseMoveEvent(class QGraphicsSceneMouseEvent *)
+ ?mouseMoveEvent@QDeclarativePathView@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1720 NONAME ; void QDeclarativePathView::mouseMoveEvent(class QGraphicsSceneMouseEvent *)
+ ?mouseMoveEvent@QDeclarativeTextEdit@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1721 NONAME ; void QDeclarativeTextEdit::mouseMoveEvent(class QGraphicsSceneMouseEvent *)
+ ?mouseMoveEvent@QDeclarativeWebView@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1722 NONAME ; void QDeclarativeWebView::mouseMoveEvent(class QGraphicsSceneMouseEvent *)
+ ?mousePressEvent@QDeclarativeFlickable@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1723 NONAME ; void QDeclarativeFlickable::mousePressEvent(class QGraphicsSceneMouseEvent *)
+ ?mousePressEvent@QDeclarativeMouseArea@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1724 NONAME ; void QDeclarativeMouseArea::mousePressEvent(class QGraphicsSceneMouseEvent *)
+ ?mousePressEvent@QDeclarativePathView@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1725 NONAME ; void QDeclarativePathView::mousePressEvent(class QGraphicsSceneMouseEvent *)
+ ?mousePressEvent@QDeclarativeText@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1726 NONAME ; void QDeclarativeText::mousePressEvent(class QGraphicsSceneMouseEvent *)
+ ?mousePressEvent@QDeclarativeTextEdit@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1727 NONAME ; void QDeclarativeTextEdit::mousePressEvent(class QGraphicsSceneMouseEvent *)
+ ?mousePressEvent@QDeclarativeTextInput@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1728 NONAME ; void QDeclarativeTextInput::mousePressEvent(class QGraphicsSceneMouseEvent *)
+ ?mousePressEvent@QDeclarativeWebView@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1729 NONAME ; void QDeclarativeWebView::mousePressEvent(class QGraphicsSceneMouseEvent *)
+ ?mouseReleaseEvent@QDeclarativeFlickable@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1730 NONAME ; void QDeclarativeFlickable::mouseReleaseEvent(class QGraphicsSceneMouseEvent *)
+ ?mouseReleaseEvent@QDeclarativeMouseArea@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1731 NONAME ; void QDeclarativeMouseArea::mouseReleaseEvent(class QGraphicsSceneMouseEvent *)
+ ?mouseReleaseEvent@QDeclarativePathView@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1732 NONAME ; void QDeclarativePathView::mouseReleaseEvent(class QGraphicsSceneMouseEvent *)
+ ?mouseReleaseEvent@QDeclarativeText@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1733 NONAME ; void QDeclarativeText::mouseReleaseEvent(class QGraphicsSceneMouseEvent *)
+ ?mouseReleaseEvent@QDeclarativeTextEdit@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1734 NONAME ; void QDeclarativeTextEdit::mouseReleaseEvent(class QGraphicsSceneMouseEvent *)
+ ?mouseReleaseEvent@QDeclarativeTextInput@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1735 NONAME ; void QDeclarativeTextInput::mouseReleaseEvent(class QGraphicsSceneMouseEvent *)
+ ?mouseReleaseEvent@QDeclarativeWebView@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 1736 NONAME ; void QDeclarativeWebView::mouseReleaseEvent(class QGraphicsSceneMouseEvent *)
+ ?mouseX@QDeclarativeMouseArea@@QBEMXZ @ 1737 NONAME ; float QDeclarativeMouseArea::mouseX(void) const
+ ?mouseY@QDeclarativeMouseArea@@QBEMXZ @ 1738 NONAME ; float QDeclarativeMouseArea::mouseY(void) const
+ ?move@QDeclarativeBasePositioner@@QBEPAVQDeclarativeTransition@@XZ @ 1739 NONAME ; class QDeclarativeTransition * QDeclarativeBasePositioner::move(void) const
+ ?move@QDeclarativeListModel@@QAEXHHH@Z @ 1740 NONAME ; void QDeclarativeListModel::move(int, int, int)
+ ?moveChanged@QDeclarativeBasePositioner@@IAEXXZ @ 1741 NONAME ; void QDeclarativeBasePositioner::moveChanged(void)
+ ?moveCurrentIndexDown@QDeclarativeGridView@@QAEXXZ @ 1742 NONAME ; void QDeclarativeGridView::moveCurrentIndexDown(void)
+ ?moveCurrentIndexLeft@QDeclarativeGridView@@QAEXXZ @ 1743 NONAME ; void QDeclarativeGridView::moveCurrentIndexLeft(void)
+ ?moveCurrentIndexRight@QDeclarativeGridView@@QAEXXZ @ 1744 NONAME ; void QDeclarativeGridView::moveCurrentIndexRight(void)
+ ?moveCurrentIndexUp@QDeclarativeGridView@@QAEXXZ @ 1745 NONAME ; void QDeclarativeGridView::moveCurrentIndexUp(void)
+ ?moveCursor@QDeclarativeTextInput@@AAEXXZ @ 1746 NONAME ; void QDeclarativeTextInput::moveCursor(void)
+ ?moveCursorDelegate@QDeclarativeTextEdit@@AAEXXZ @ 1747 NONAME ; void QDeclarativeTextEdit::moveCursorDelegate(void)
+ ?movementEnded@QDeclarativeFlickable@@IAEXXZ @ 1748 NONAME ; void QDeclarativeFlickable::movementEnded(void)
+ ?movementEnding@QDeclarativeFlickable@@IAEXXZ @ 1749 NONAME ; void QDeclarativeFlickable::movementEnding(void)
+ ?movementStarted@QDeclarativeFlickable@@IAEXXZ @ 1750 NONAME ; void QDeclarativeFlickable::movementStarted(void)
+ ?movementStarting@QDeclarativeFlickable@@IAEXXZ @ 1751 NONAME ; void QDeclarativeFlickable::movementStarting(void)
+ ?movieRequestFinished@QDeclarativeAnimatedImage@@AAEXXZ @ 1752 NONAME ; void QDeclarativeAnimatedImage::movieRequestFinished(void)
+ ?movieUpdate@QDeclarativeAnimatedImage@@AAEXXZ @ 1753 NONAME ; void QDeclarativeAnimatedImage::movieUpdate(void)
+ ?movingChanged@QDeclarativeFlickable@@IAEXXZ @ 1754 NONAME ; void QDeclarativeFlickable::movingChanged(void)
+ ?name@QDeclarativeCustomParserNode@@QBE?AVQByteArray@@XZ @ 1755 NONAME ; class QByteArray QDeclarativeCustomParserNode::name(void) const
+ ?name@QDeclarativeCustomParserProperty@@QBE?AVQByteArray@@XZ @ 1756 NONAME ; class QByteArray QDeclarativeCustomParserProperty::name(void) const
+ ?name@QDeclarativeDebugClient@@QBE?AVQString@@XZ @ 1757 NONAME ; class QString QDeclarativeDebugClient::name(void) const
+ ?name@QDeclarativeDebugContextReference@@QBE?AVQString@@XZ @ 1758 NONAME ; class QString QDeclarativeDebugContextReference::name(void) const
+ ?name@QDeclarativeDebugEngineReference@@QBE?AVQString@@XZ @ 1759 NONAME ; class QString QDeclarativeDebugEngineReference::name(void) const
+ ?name@QDeclarativeDebugObjectReference@@QBE?AVQString@@XZ @ 1760 NONAME ; class QString QDeclarativeDebugObjectReference::name(void) const
+ ?name@QDeclarativeDebugPropertyReference@@QBE?AVQString@@XZ @ 1761 NONAME ; class QString QDeclarativeDebugPropertyReference::name(void) const
+ ?name@QDeclarativeDebugPropertyWatch@@QBE?AVQString@@XZ @ 1762 NONAME ; class QString QDeclarativeDebugPropertyWatch::name(void) const
+ ?name@QDeclarativeDebugService@@QBE?AVQString@@XZ @ 1763 NONAME ; class QString QDeclarativeDebugService::name(void) const
+ ?name@QDeclarativeFontLoader@@QBE?AVQString@@XZ @ 1764 NONAME ; class QString QDeclarativeFontLoader::name(void) const
+ ?name@QDeclarativeOpenMetaObject@@QBE?AVQByteArray@@H@Z @ 1765 NONAME ; class QByteArray QDeclarativeOpenMetaObject::name(int) const
+ ?name@QDeclarativePathAttribute@@QBE?AVQString@@XZ @ 1766 NONAME ; class QString QDeclarativePathAttribute::name(void) const
+ ?name@QDeclarativeProperty@@QBE?AVQString@@XZ @ 1767 NONAME ; class QString QDeclarativeProperty::name(void) const
+ ?name@QDeclarativeState@@QBE?AVQString@@XZ @ 1768 NONAME ; class QString QDeclarativeState::name(void) const
+ ?name@QDeclarativeStateChangeScript@@QBE?AVQString@@XZ @ 1769 NONAME ; class QString QDeclarativeStateChangeScript::name(void) const
+ ?name@QDeclarativeXmlListModelRole@@QBE?AVQString@@XZ @ 1770 NONAME ; class QString QDeclarativeXmlListModelRole::name(void) const
+ ?name@QMetaEnumBuilder@@QBE?AVQByteArray@@XZ @ 1771 NONAME ; class QByteArray QMetaEnumBuilder::name(void) const
+ ?name@QMetaPropertyBuilder@@QBE?AVQByteArray@@XZ @ 1772 NONAME ; class QByteArray QMetaPropertyBuilder::name(void) const
+ ?nameChanged@QDeclarativeFontLoader@@IAEXXZ @ 1773 NONAME ; void QDeclarativeFontLoader::nameChanged(void)
+ ?namespaceDeclarations@QDeclarativeXmlListModel@@QBE?AVQString@@XZ @ 1774 NONAME ; class QString QDeclarativeXmlListModel::namespaceDeclarations(void) const
+ ?needsNotifySignal@QDeclarativeProperty@@QBE_NXZ @ 1775 NONAME ; bool QDeclarativeProperty::needsNotifySignal(void) const
+ ?networkAccessManager@QDeclarativeEngine@@QBEPAVQNetworkAccessManager@@XZ @ 1776 NONAME ; class QNetworkAccessManager * QDeclarativeEngine::networkAccessManager(void) const
+ ?networkAccessManagerFactory@QDeclarativeEngine@@QBEPAVQDeclarativeNetworkAccessManagerFactory@@XZ @ 1777 NONAME ; class QDeclarativeNetworkAccessManagerFactory * QDeclarativeEngine::networkAccessManagerFactory(void) const
+ ?newWindowComponent@QDeclarativeWebView@@QBEPAVQDeclarativeComponent@@XZ @ 1778 NONAME ; class QDeclarativeComponent * QDeclarativeWebView::newWindowComponent(void) const
+ ?newWindowComponentChanged@QDeclarativeWebView@@IAEXXZ @ 1779 NONAME ; void QDeclarativeWebView::newWindowComponentChanged(void)
+ ?newWindowParent@QDeclarativeWebView@@QBEPAVQDeclarativeItem@@XZ @ 1780 NONAME ; class QDeclarativeItem * QDeclarativeWebView::newWindowParent(void) const
+ ?newWindowParentChanged@QDeclarativeWebView@@IAEXXZ @ 1781 NONAME ; void QDeclarativeWebView::newWindowParentChanged(void)
+ ?noteContentsSizeChanged@QDeclarativeWebView@@AAEXABVQSize@@@Z @ 1782 NONAME ; void QDeclarativeWebView::noteContentsSizeChanged(class QSize const &)
+ ?notifyOnServerStart@QDeclarativeDebugService@@SAXPAVQObject@@PBD@Z @ 1783 NONAME ; void QDeclarativeDebugService::notifyOnServerStart(class QObject *, char const *)
+ ?notifyOnValueChanged@QDeclarativeExpression@@QBE_NXZ @ 1784 NONAME ; bool QDeclarativeExpression::notifyOnValueChanged(void) const
+ ?notifySignal@QMetaPropertyBuilder@@QBE?AVQMetaMethodBuilder@@XZ @ 1785 NONAME ; class QMetaMethodBuilder QMetaPropertyBuilder::notifySignal(void) const
+ ?number@QDeclarativeNumberFormatter@@QBEMXZ @ 1786 NONAME ; float QDeclarativeNumberFormatter::number(void) const
+ ?object@QDeclarativeAnchorChanges@@QBEPAVQDeclarativeItem@@XZ @ 1787 NONAME ; class QDeclarativeItem * QDeclarativeAnchorChanges::object(void) const
+ ?object@QDeclarativeBind@@QAEPAVQObject@@XZ @ 1788 NONAME ; class QObject * QDeclarativeBind::object(void)
+ ?object@QDeclarativeDebugObjectQuery@@QBE?AVQDeclarativeDebugObjectReference@@XZ @ 1789 NONAME ; class QDeclarativeDebugObjectReference QDeclarativeDebugObjectQuery::object(void) const
+ ?object@QDeclarativeDomValueValueInterceptor@@QBE?AVQDeclarativeDomObject@@XZ @ 1790 NONAME ; class QDeclarativeDomObject QDeclarativeDomValueValueInterceptor::object(void) const
+ ?object@QDeclarativeDomValueValueSource@@QBE?AVQDeclarativeDomObject@@XZ @ 1791 NONAME ; class QDeclarativeDomObject QDeclarativeDomValueValueSource::object(void) const
+ ?object@QDeclarativeListReference@@QBEPAVQObject@@XZ @ 1792 NONAME ; class QObject * QDeclarativeListReference::object(void) const
+ ?object@QDeclarativeOpenMetaObject@@QBEPAVQObject@@XZ @ 1793 NONAME ; class QObject * QDeclarativeOpenMetaObject::object(void) const
+ ?object@QDeclarativeParentChange@@QBEPAVQDeclarativeItem@@XZ @ 1794 NONAME ; class QDeclarativeItem * QDeclarativeParentChange::object(void) const
+ ?object@QDeclarativeProperty@@QBEPAVQObject@@XZ @ 1795 NONAME ; class QObject * QDeclarativeProperty::object(void) const
+ ?object@QDeclarativePropertyChanges@@QBEPAVQObject@@XZ @ 1796 NONAME ; class QObject * QDeclarativePropertyChanges::object(void) const
+ ?objectClassName@QDeclarativeDomObject@@QBE?AVQByteArray@@XZ @ 1797 NONAME ; class QByteArray QDeclarativeDomObject::objectClassName(void) const
+ ?objectDebugId@QDeclarativeDebugPropertyReference@@QBEHXZ @ 1798 NONAME ; int QDeclarativeDebugPropertyReference::objectDebugId(void) const
+ ?objectDebugId@QDeclarativeDebugWatch@@QBEHXZ @ 1799 NONAME ; int QDeclarativeDebugWatch::objectDebugId(void) const
+ ?objectForId@QDeclarativeDebugService@@SAPAVQObject@@H@Z @ 1800 NONAME ; class QObject * QDeclarativeDebugService::objectForId(int)
+ ?objectId@QDeclarativeDomObject@@QBE?AVQString@@XZ @ 1801 NONAME ; class QString QDeclarativeDomObject::objectId(void) const
+ ?objectToString@QDeclarativeDebugService@@SA?AVQString@@PAVQObject@@@Z @ 1802 NONAME ; class QString QDeclarativeDebugService::objectToString(class QObject *)
+ ?objectType@QDeclarativeDomObject@@QBE?AVQByteArray@@XZ @ 1803 NONAME ; class QByteArray QDeclarativeDomObject::objectType(void) const
+ ?objectTypeMajorVersion@QDeclarativeDomObject@@QBEHXZ @ 1804 NONAME ; int QDeclarativeDomObject::objectTypeMajorVersion(void) const
+ ?objectTypeMinorVersion@QDeclarativeDomObject@@QBEHXZ @ 1805 NONAME ; int QDeclarativeDomObject::objectTypeMinorVersion(void) const
+ ?objects@QDeclarativeDebugContextReference@@QBE?AV?$QList@VQDeclarativeDebugObjectReference@@@@XZ @ 1806 NONAME ; class QList<class QDeclarativeDebugObjectReference> QDeclarativeDebugContextReference::objects(void) const
+ ?offlineStoragePath@QDeclarativeEngine@@QBE?AVQString@@XZ @ 1807 NONAME ; class QString QDeclarativeEngine::offlineStoragePath(void) const
+ ?offset@QDeclarativePathView@@QBEMXZ @ 1808 NONAME ; float QDeclarativePathView::offset(void) const
+ ?offsetChanged@QDeclarativePathView@@IAEXXZ @ 1809 NONAME ; void QDeclarativePathView::offsetChanged(void)
+ ?operationAt@QDeclarativeState@@QBEPAVQDeclarativeStateOperation@@H@Z @ 1810 NONAME ; class QDeclarativeStateOperation * QDeclarativeState::operationAt(int) const
+ ?operationCount@QDeclarativeState@@QBEHXZ @ 1811 NONAME ; int QDeclarativeState::operationCount(void) const
+ ?orientation@QDeclarativeListView@@QBE?AW4Orientation@1@XZ @ 1812 NONAME ; enum QDeclarativeListView::Orientation QDeclarativeListView::orientation(void) const
+ ?orientationChanged@QDeclarativeListView@@IAEXXZ @ 1813 NONAME ; void QDeclarativeListView::orientationChanged(void)
+ ?originalParent@QDeclarativeParentChange@@QBEPAVQDeclarativeItem@@XZ @ 1814 NONAME ; class QDeclarativeItem * QDeclarativeParentChange::originalParent(void) const
+ ?overShoot@QDeclarativeFlickable@@QBE_NXZ @ 1815 NONAME ; bool QDeclarativeFlickable::overShoot(void) const
+ ?overShootChanged@QDeclarativeFlickable@@IAEXXZ @ 1816 NONAME ; void QDeclarativeFlickable::overShootChanged(void)
+ ?override@QDeclarativeAnchorChanges@@UAE_NPAVQDeclarativeActionEvent@@@Z @ 1817 NONAME ; bool QDeclarativeAnchorChanges::override(class QDeclarativeActionEvent *)
+ ?override@QDeclarativeParentChange@@UAE_NPAVQDeclarativeActionEvent@@@Z @ 1818 NONAME ; bool QDeclarativeParentChange::override(class QDeclarativeActionEvent *)
+ ?pace@QDeclarativeParticleMotionWander@@QBEMXZ @ 1819 NONAME ; float QDeclarativeParticleMotionWander::pace(void) const
+ ?paceChanged@QDeclarativeParticleMotionWander@@IAEXXZ @ 1820 NONAME ; void QDeclarativeParticleMotionWander::paceChanged(void)
+ ?packetWritten@QPacketProtocol@@IAEXXZ @ 1821 NONAME ; void QPacketProtocol::packetWritten(void)
+ ?packetsAvailable@QPacketProtocol@@QBE_JXZ @ 1822 NONAME ; long long QPacketProtocol::packetsAvailable(void) const
+ ?page@QDeclarativeWebView@@QBEPAVQWebPage@@XZ @ 1823 NONAME ; class QWebPage * QDeclarativeWebView::page(void) const
+ ?pageChanged@QDeclarativeFlickable@@IAEXXZ @ 1824 NONAME ; void QDeclarativeFlickable::pageChanged(void)
+ ?pageUrlChanged@QDeclarativeWebView@@AAEXXZ @ 1825 NONAME ; void QDeclarativeWebView::pageUrlChanged(void)
+ ?paint@QDeclarativeBorderImage@@UAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 1826 NONAME ; void QDeclarativeBorderImage::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
+ ?paint@QDeclarativeImage@@UAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 1827 NONAME ; void QDeclarativeImage::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
+ ?paint@QDeclarativeItem@@UAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 1828 NONAME ; void QDeclarativeItem::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
+ ?paint@QDeclarativePaintedItem@@UAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 1829 NONAME ; void QDeclarativePaintedItem::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
+ ?paint@QDeclarativeParticles@@UAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 1830 NONAME ; void QDeclarativeParticles::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
+ ?paint@QDeclarativeRectangle@@UAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 1831 NONAME ; void QDeclarativeRectangle::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
+ ?paint@QDeclarativeText@@UAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 1832 NONAME ; void QDeclarativeText::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
+ ?paintEvent@QDeclarativeView@@MAEXPAVQPaintEvent@@@Z @ 1833 NONAME ; void QDeclarativeView::paintEvent(class QPaintEvent *)
+ ?paintPage@QDeclarativeWebView@@AAEXABVQRect@@@Z @ 1834 NONAME ; void QDeclarativeWebView::paintPage(class QRect const &)
+ ?paintedGeometryChanged@QDeclarativeImage@@IAEXXZ @ 1835 NONAME ; void QDeclarativeImage::paintedGeometryChanged(void)
+ ?paintedHeight@QDeclarativeImage@@QBEMXZ @ 1836 NONAME ; float QDeclarativeImage::paintedHeight(void) const
+ ?paintedWidth@QDeclarativeImage@@QBEMXZ @ 1837 NONAME ; float QDeclarativeImage::paintedWidth(void) const
+ ?paletteChanged@QDeclarativeSystemPalette@@IAEXXZ @ 1838 NONAME ; void QDeclarativeSystemPalette::paletteChanged(void)
+ ?parameterNames@QMetaMethodBuilder@@QBE?AV?$QList@VQByteArray@@@@XZ @ 1839 NONAME ; class QList<class QByteArray> QMetaMethodBuilder::parameterNames(void) const
+ ?parent@QDeclarativeOpenMetaObject@@IBEPAUQAbstractDynamicMetaObject@@XZ @ 1840 NONAME ; struct QAbstractDynamicMetaObject * QDeclarativeOpenMetaObject::parent(void) const
+ ?parent@QDeclarativeParentChange@@QBEPAVQDeclarativeItem@@XZ @ 1841 NONAME ; class QDeclarativeItem * QDeclarativeParentChange::parent(void) const
+ ?parentChanged@QDeclarativeItem@@IAEXXZ @ 1842 NONAME ; void QDeclarativeItem::parentChanged(void)
+ ?parentContext@QDeclarativeContext@@QBEPAV1@XZ @ 1843 NONAME ; class QDeclarativeContext * QDeclarativeContext::parentContext(void) const
+ ?parentItem@QDeclarativeItem@@QBEPAV1@XZ @ 1844 NONAME ; class QDeclarativeItem * QDeclarativeItem::parentItem(void) const
+ ?parse@QDeclarativeStyledText@@SAXABVQString@@AAVQTextLayout@@@Z @ 1845 NONAME ; void QDeclarativeStyledText::parse(class QString const &, class QTextLayout &)
+ ?parserStatusCast@QDeclarativeType@@QBEHXZ @ 1846 NONAME ; int QDeclarativeType::parserStatusCast(void) const
+ ?part@QDeclarativeVisualDataModel@@QBE?AVQString@@XZ @ 1847 NONAME ; class QString QDeclarativeVisualDataModel::part(void) const
+ ?parts@QDeclarativeVisualDataModel@@QAEPAVQObject@@XZ @ 1848 NONAME ; class QObject * QDeclarativeVisualDataModel::parts(void)
+ ?path@QDeclarativePath@@QBE?AVQPainterPath@@XZ @ 1849 NONAME ; class QPainterPath QDeclarativePath::path(void) const
+ ?path@QDeclarativePathView@@QBEPAVQDeclarativePath@@XZ @ 1850 NONAME ; class QDeclarativePath * QDeclarativePathView::path(void) const
+ ?pathElements@QDeclarativePath@@QAE?AU?$QDeclarativeListProperty@VQDeclarativePathElement@@@@XZ @ 1851 NONAME ; struct QDeclarativeListProperty<class QDeclarativePathElement> QDeclarativePath::pathElements(void)
+ ?pathItemCount@QDeclarativePathView@@QBEHXZ @ 1852 NONAME ; int QDeclarativePathView::pathItemCount(void) const
+ ?pausedChanged@QDeclarativeAnimatedImage@@IAEXXZ @ 1853 NONAME ; void QDeclarativeAnimatedImage::pausedChanged(void)
+ ?penChanged@QDeclarativePen@@IAEXXZ @ 1854 NONAME ; void QDeclarativePen::penChanged(void)
+ ?pendingRequests@QDeclarativePixmapCache@@SAHXZ @ 1855 NONAME ; int QDeclarativePixmapCache::pendingRequests(void)
+ ?persistentSelection@QDeclarativeTextEdit@@QBE_NXZ @ 1856 NONAME ; bool QDeclarativeTextEdit::persistentSelection(void) const
+ ?persistentSelectionChanged@QDeclarativeTextEdit@@IAEX_N@Z @ 1857 NONAME ; void QDeclarativeTextEdit::persistentSelectionChanged(bool)
+ ?pixelCacheSize@QDeclarativePaintedItem@@QBEHXZ @ 1858 NONAME ; int QDeclarativePaintedItem::pixelCacheSize(void) const
+ ?pixmap@QDeclarativeImage@@QBE?AVQPixmap@@XZ @ 1859 NONAME ; class QPixmap QDeclarativeImage::pixmap(void) const
+ ?pixmapChanged@QDeclarativeImageBase@@IAEXXZ @ 1860 NONAME ; void QDeclarativeImageBase::pixmapChanged(void)
+ ?pixmapUrl@QDeclarativeGridScaledImage@@QBE?AVQString@@XZ @ 1861 NONAME ; class QString QDeclarativeGridScaledImage::pixmapUrl(void) const
+ ?playingChanged@QDeclarativeAnimatedImage@@IAEXXZ @ 1862 NONAME ; void QDeclarativeAnimatedImage::playingChanged(void)
+ ?playingStatusChanged@QDeclarativeAnimatedImage@@AAEXXZ @ 1863 NONAME ; void QDeclarativeAnimatedImage::playingStatusChanged(void)
+ ?pointAt@QDeclarativePath@@QBE?AVQPointF@@M@Z @ 1864 NONAME ; class QPointF QDeclarativePath::pointAt(float) const
+ ?pointFFromString@QDeclarativeStringConverters@@YA?AVQPointF@@ABVQString@@PA_N@Z @ 1865 NONAME ; class QPointF QDeclarativeStringConverters::pointFFromString(class QString const &, bool *)
+ ?position@QDeclarativeDomDynamicProperty@@QBEHXZ @ 1866 NONAME ; int QDeclarativeDomDynamicProperty::position(void) const
+ ?position@QDeclarativeDomList@@QBEHXZ @ 1867 NONAME ; int QDeclarativeDomList::position(void) const
+ ?position@QDeclarativeDomObject@@QBEHXZ @ 1868 NONAME ; int QDeclarativeDomObject::position(void) const
+ ?position@QDeclarativeDomProperty@@QBEHXZ @ 1869 NONAME ; int QDeclarativeDomProperty::position(void) const
+ ?position@QDeclarativeDomValue@@QBEHXZ @ 1870 NONAME ; int QDeclarativeDomValue::position(void) const
+ ?position@QDeclarativeGradientStop@@QBEMXZ @ 1871 NONAME ; float QDeclarativeGradientStop::position(void) const
+ ?positionChanged@QDeclarativeMouseArea@@IAEXPAVQDeclarativeMouseEvent@@@Z @ 1872 NONAME ; void QDeclarativeMouseArea::positionChanged(class QDeclarativeMouseEvent *)
+ ?positionViewAtIndex@QDeclarativeGridView@@QAEXH@Z @ 1873 NONAME ; void QDeclarativeGridView::positionViewAtIndex(int)
+ ?positionViewAtIndex@QDeclarativeListView@@QAEXH@Z @ 1874 NONAME ; void QDeclarativeListView::positionViewAtIndex(int)
+ ?positionX@QDeclarativeBasePositioner@@IAEXHABUPositionedItem@1@@Z @ 1875 NONAME ; void QDeclarativeBasePositioner::positionX(int, struct QDeclarativeBasePositioner::PositionedItem const &)
+ ?positionY@QDeclarativeBasePositioner@@IAEXHABUPositionedItem@1@@Z @ 1876 NONAME ; void QDeclarativeBasePositioner::positionY(int, struct QDeclarativeBasePositioner::PositionedItem const &)
+ ?prePositioning@QDeclarativeBasePositioner@@IAEXXZ @ 1877 NONAME ; void QDeclarativeBasePositioner::prePositioning(void)
+ ?preferredHeight@QDeclarativeWebView@@QBEHXZ @ 1878 NONAME ; int QDeclarativeWebView::preferredHeight(void) const
+ ?preferredHeightChanged@QDeclarativeWebView@@IAEXXZ @ 1879 NONAME ; void QDeclarativeWebView::preferredHeightChanged(void)
+ ?preferredHighlightBegin@QDeclarativeListView@@QBEMXZ @ 1880 NONAME ; float QDeclarativeListView::preferredHighlightBegin(void) const
+ ?preferredHighlightEnd@QDeclarativeListView@@QBEMXZ @ 1881 NONAME ; float QDeclarativeListView::preferredHighlightEnd(void) const
+ ?preferredWidth@QDeclarativeWebView@@QBEHXZ @ 1882 NONAME ; int QDeclarativeWebView::preferredWidth(void) const
+ ?preferredWidthChanged@QDeclarativeWebView@@IAEXXZ @ 1883 NONAME ; void QDeclarativeWebView::preferredWidthChanged(void)
+ ?prepare@QDeclarativeTransition@@QAEXAAV?$QList@VQDeclarativeAction@@@@AAV?$QList@VQDeclarativeProperty@@@@PAVQDeclarativeTransitionManager@@@Z @ 1884 NONAME ; void QDeclarativeTransition::prepare(class QList<class QDeclarativeAction> &, class QList<class QDeclarativeProperty> &, class QDeclarativeTransitionManager *)
+ ?pressAndHold@QDeclarativeMouseArea@@IAEXPAVQDeclarativeMouseEvent@@@Z @ 1885 NONAME ; void QDeclarativeMouseArea::pressAndHold(class QDeclarativeMouseEvent *)
+ ?pressDelay@QDeclarativeFlickable@@QBEHXZ @ 1886 NONAME ; int QDeclarativeFlickable::pressDelay(void) const
+ ?pressDelayChanged@QDeclarativeFlickable@@IAEXXZ @ 1887 NONAME ; void QDeclarativeFlickable::pressDelayChanged(void)
+ ?pressGrabTime@QDeclarativeWebView@@QBEHXZ @ 1888 NONAME ; int QDeclarativeWebView::pressGrabTime(void) const
+ ?pressGrabTimeChanged@QDeclarativeWebView@@IAEXXZ @ 1889 NONAME ; void QDeclarativeWebView::pressGrabTimeChanged(void)
+ ?pressed@QDeclarativeMouseArea@@IAEXPAVQDeclarativeMouseEvent@@@Z @ 1890 NONAME ; void QDeclarativeMouseArea::pressed(class QDeclarativeMouseEvent *)
+ ?pressed@QDeclarativeMouseArea@@QBE_NXZ @ 1891 NONAME ; bool QDeclarativeMouseArea::pressed(void) const
+ ?pressedButtons@QDeclarativeMouseArea@@QBE?AV?$QFlags@W4MouseButton@Qt@@@@XZ @ 1892 NONAME ; class QFlags<enum Qt::MouseButton> QDeclarativeMouseArea::pressedButtons(void) const
+ ?pressedChanged@QDeclarativeMouseArea@@IAEXXZ @ 1893 NONAME ; void QDeclarativeMouseArea::pressedChanged(void)
+ ?processPath@QDeclarativePath@@AAEXXZ @ 1894 NONAME ; void QDeclarativePath::processPath(void)
+ ?progress@QDeclarativeComponent@@QBEMXZ @ 1895 NONAME ; float QDeclarativeComponent::progress(void) const
+ ?progress@QDeclarativeImageBase@@QBEMXZ @ 1896 NONAME ; float QDeclarativeImageBase::progress(void) const
+ ?progress@QDeclarativeLoader@@QBEMXZ @ 1897 NONAME ; float QDeclarativeLoader::progress(void) const
+ ?progress@QDeclarativeWebView@@QBEMXZ @ 1898 NONAME ; float QDeclarativeWebView::progress(void) const
+ ?progress@QDeclarativeXmlListModel@@QBEMXZ @ 1899 NONAME ; float QDeclarativeXmlListModel::progress(void) const
+ ?progressChanged@QDeclarativeComponent@@IAEXM@Z @ 1900 NONAME ; void QDeclarativeComponent::progressChanged(float)
+ ?progressChanged@QDeclarativeImageBase@@IAEXM@Z @ 1901 NONAME ; void QDeclarativeImageBase::progressChanged(float)
+ ?progressChanged@QDeclarativeLoader@@IAEXXZ @ 1902 NONAME ; void QDeclarativeLoader::progressChanged(void)
+ ?progressChanged@QDeclarativeWebView@@IAEXXZ @ 1903 NONAME ; void QDeclarativeWebView::progressChanged(void)
+ ?progressChanged@QDeclarativeXmlListModel@@IAEXM@Z @ 1904 NONAME ; void QDeclarativeXmlListModel::progressChanged(float)
+ ?properties@QDeclarativeCustomParserNode@@QBE?AV?$QList@VQDeclarativeCustomParserProperty@@@@XZ @ 1905 NONAME ; class QList<class QDeclarativeCustomParserProperty> QDeclarativeCustomParserNode::properties(void) const
+ ?properties@QDeclarativeDebugObjectReference@@QBE?AV?$QList@VQDeclarativeDebugPropertyReference@@@@XZ @ 1906 NONAME ; class QList<class QDeclarativeDebugPropertyReference> QDeclarativeDebugObjectReference::properties(void) const
+ ?properties@QDeclarativeDomObject@@QBE?AV?$QList@VQDeclarativeDomProperty@@@@XZ @ 1907 NONAME ; class QList<class QDeclarativeDomProperty> QDeclarativeDomObject::properties(void) const
+ ?property@QDeclarativeBind@@QBE?AVQString@@XZ @ 1908 NONAME ; class QString QDeclarativeBind::property(void) const
+ ?property@QDeclarativeDomObject@@QBE?AVQDeclarativeDomProperty@@ABVQByteArray@@@Z @ 1909 NONAME ; class QDeclarativeDomProperty QDeclarativeDomObject::property(class QByteArray const &) const
+ ?property@QDeclarativeProperty@@QBE?AVQMetaProperty@@XZ @ 1910 NONAME ; class QMetaProperty QDeclarativeProperty::property(void) const
+ ?property@QDeclarativeViewSection@@QBE?AVQString@@XZ @ 1911 NONAME ; class QString QDeclarativeViewSection::property(void) const
+ ?property@QMetaObjectBuilder@@QBE?AVQMetaPropertyBuilder@@H@Z @ 1912 NONAME ; class QMetaPropertyBuilder QMetaObjectBuilder::property(int) const
+ ?propertyCount@QMetaObjectBuilder@@QBEHXZ @ 1913 NONAME ; int QMetaObjectBuilder::propertyCount(void) const
+ ?propertyCreated@QDeclarativeOpenMetaObject@@MAEXHAAVQMetaPropertyBuilder@@@Z @ 1914 NONAME ; void QDeclarativeOpenMetaObject::propertyCreated(int, class QMetaPropertyBuilder &)
+ ?propertyCreated@QDeclarativeOpenMetaObjectType@@MAEXHAAVQMetaPropertyBuilder@@@Z @ 1915 NONAME ; void QDeclarativeOpenMetaObjectType::propertyCreated(int, class QMetaPropertyBuilder &)
+ ?propertyName@QDeclarativeDomDynamicProperty@@QBE?AVQByteArray@@XZ @ 1916 NONAME ; class QByteArray QDeclarativeDomDynamicProperty::propertyName(void) const
+ ?propertyName@QDeclarativeDomProperty@@QBE?AVQByteArray@@XZ @ 1917 NONAME ; class QByteArray QDeclarativeDomProperty::propertyName(void) const
+ ?propertyNameParts@QDeclarativeDomProperty@@QBE?AV?$QList@VQByteArray@@@@XZ @ 1918 NONAME ; class QList<class QByteArray> QDeclarativeDomProperty::propertyNameParts(void) const
+ ?propertyOffset@QDeclarativeOpenMetaObjectType@@QBEHXZ @ 1919 NONAME ; int QDeclarativeOpenMetaObjectType::propertyOffset(void) const
+ ?propertyRead@QDeclarativeOpenMetaObject@@MAEXH@Z @ 1920 NONAME ; void QDeclarativeOpenMetaObject::propertyRead(int)
+ ?propertyType@QDeclarativeDomDynamicProperty@@QBEHXZ @ 1921 NONAME ; int QDeclarativeDomDynamicProperty::propertyType(void) const
+ ?propertyType@QDeclarativeProperty@@QBEHXZ @ 1922 NONAME ; int QDeclarativeProperty::propertyType(void) const
+ ?propertyTypeCategory@QDeclarativeProperty@@QBE?AW4PropertyTypeCategory@1@XZ @ 1923 NONAME ; enum QDeclarativeProperty::PropertyTypeCategory QDeclarativeProperty::propertyTypeCategory(void) const
+ ?propertyTypeName@QDeclarativeDomDynamicProperty@@QBE?AVQByteArray@@XZ @ 1924 NONAME ; class QByteArray QDeclarativeDomDynamicProperty::propertyTypeName(void) const
+ ?propertyTypeName@QDeclarativeProperty@@QBEPBDXZ @ 1925 NONAME ; char const * QDeclarativeProperty::propertyTypeName(void) const
+ ?propertyValueInterceptorCast@QDeclarativeType@@QBEHXZ @ 1926 NONAME ; int QDeclarativeType::propertyValueInterceptorCast(void) const
+ ?propertyValueSourceCast@QDeclarativeType@@QBEHXZ @ 1927 NONAME ; int QDeclarativeType::propertyValueSourceCast(void) const
+ ?propertyWrite@QDeclarativeOpenMetaObject@@MAEXH@Z @ 1928 NONAME ; void QDeclarativeOpenMetaObject::propertyWrite(int)
+ ?qListTypeId@QDeclarativeType@@QBEHXZ @ 1929 NONAME ; int QDeclarativeType::qListTypeId(void) const
+ ?q_func@QDeclarativeContextPrivate@@AAEPAVQDeclarativeContext@@XZ @ 1930 NONAME ; class QDeclarativeContext * QDeclarativeContextPrivate::q_func(void)
+ ?q_func@QDeclarativeContextPrivate@@ABEPBVQDeclarativeContext@@XZ @ 1931 NONAME ; class QDeclarativeContext const * QDeclarativeContextPrivate::q_func(void) const
+ ?q_textChanged@QDeclarativeTextEdit@@AAEXXZ @ 1932 NONAME ; void QDeclarativeTextEdit::q_textChanged(void)
+ ?q_textChanged@QDeclarativeTextInput@@AAEXXZ @ 1933 NONAME ; void QDeclarativeTextInput::q_textChanged(void)
+ ?qmlAttachedProperties@QDeclarativeComponent@@SAPAVQDeclarativeComponentAttached@@PAVQObject@@@Z @ 1934 NONAME ; class QDeclarativeComponentAttached * QDeclarativeComponent::qmlAttachedProperties(class QObject *)
+ ?qmlAttachedProperties@QDeclarativeGridView@@SAPAVQDeclarativeGridViewAttached@@PAVQObject@@@Z @ 1935 NONAME ; class QDeclarativeGridViewAttached * QDeclarativeGridView::qmlAttachedProperties(class QObject *)
+ ?qmlAttachedProperties@QDeclarativeListView@@SAPAVQDeclarativeListViewAttached@@PAVQObject@@@Z @ 1936 NONAME ; class QDeclarativeListViewAttached * QDeclarativeListView::qmlAttachedProperties(class QObject *)
+ ?qmlAttachedProperties@QDeclarativePathView@@SAPAVQObject@@PAV2@@Z @ 1937 NONAME ; class QObject * QDeclarativePathView::qmlAttachedProperties(class QObject *)
+ ?qmlAttachedProperties@QDeclarativeVisualItemModel@@SAPAVQDeclarativeVisualItemModelAttached@@PAVQObject@@@Z @ 1938 NONAME ; class QDeclarativeVisualItemModelAttached * QDeclarativeVisualItemModel::qmlAttachedProperties(class QObject *)
+ ?qmlAttachedProperties@QDeclarativeWebView@@SAPAVQDeclarativeWebViewAttached@@PAVQObject@@@Z @ 1939 NONAME ; class QDeclarativeWebViewAttached * QDeclarativeWebView::qmlAttachedProperties(class QObject *)
+ ?qmlAttachedPropertiesObject@@YAPAVQObject@@PAHPBV1@PBUQMetaObject@@_N@Z @ 1940 NONAME ; class QObject * qmlAttachedPropertiesObject(int *, class QObject const *, struct QMetaObject const *, bool)
+ ?qmlAttachedPropertiesObjectById@@YAPAVQObject@@HPBV1@_N@Z @ 1941 NONAME ; class QObject * qmlAttachedPropertiesObjectById(int, class QObject const *, bool)
+ ?qmlContext@@YAPAVQDeclarativeContext@@PBVQObject@@@Z @ 1942 NONAME ; class QDeclarativeContext * qmlContext(class QObject const *)
+ ?qmlEngine@@YAPAVQDeclarativeEngine@@PBVQObject@@@Z @ 1943 NONAME ; class QDeclarativeEngine * qmlEngine(class QObject const *)
+ ?qmlExecuteDeferred@@YAXPAVQObject@@@Z @ 1944 NONAME ; void qmlExecuteDeferred(class QObject *)
+ ?qmlInfo@@YA?AVQDeclarativeInfo@@PBVQObject@@@Z @ 1945 NONAME ; class QDeclarativeInfo qmlInfo(class QObject const *)
+ ?qmlType@QDeclarativeMetaType@@SAPAVQDeclarativeType@@ABVQByteArray@@HH@Z @ 1946 NONAME ; class QDeclarativeType * QDeclarativeMetaType::qmlType(class QByteArray const &, int, int)
+ ?qmlType@QDeclarativeMetaType@@SAPAVQDeclarativeType@@H@Z @ 1947 NONAME ; class QDeclarativeType * QDeclarativeMetaType::qmlType(int)
+ ?qmlType@QDeclarativeMetaType@@SAPAVQDeclarativeType@@PBUQMetaObject@@@Z @ 1948 NONAME ; class QDeclarativeType * QDeclarativeMetaType::qmlType(struct QMetaObject const *)
+ ?qmlTypeName@QDeclarativeType@@QBE?AVQByteArray@@XZ @ 1949 NONAME ; class QByteArray QDeclarativeType::qmlTypeName(void) const
+ ?qmlTypeNames@QDeclarativeMetaType@@SA?AV?$QList@VQByteArray@@@@XZ @ 1950 NONAME ; class QList<class QByteArray> QDeclarativeMetaType::qmlTypeNames(void)
+ ?qmlTypes@QDeclarativeMetaType@@SA?AV?$QList@PAVQDeclarativeType@@@@XZ @ 1951 NONAME ; class QList<class QDeclarativeType *> QDeclarativeMetaType::qmlTypes(void)
+ ?qt_metacall@QDeclarativeAnchorChanges@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1952 NONAME ; int QDeclarativeAnchorChanges::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeAnchors@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1953 NONAME ; int QDeclarativeAnchors::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeAnimatedImage@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1954 NONAME ; int QDeclarativeAnimatedImage::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeBasePositioner@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1955 NONAME ; int QDeclarativeBasePositioner::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeBehavior@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1956 NONAME ; int QDeclarativeBehavior::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeBind@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1957 NONAME ; int QDeclarativeBind::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeBorderImage@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1958 NONAME ; int QDeclarativeBorderImage::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeColumn@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1959 NONAME ; int QDeclarativeColumn::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeComponent@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1960 NONAME ; int QDeclarativeComponent::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeConnections@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1961 NONAME ; int QDeclarativeConnections::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeContext@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1962 NONAME ; int QDeclarativeContext::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeCurve@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1963 NONAME ; int QDeclarativeCurve::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeDateTimeFormatter@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1964 NONAME ; int QDeclarativeDateTimeFormatter::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeDebugClient@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1965 NONAME ; int QDeclarativeDebugClient::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeDebugConnection@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1966 NONAME ; int QDeclarativeDebugConnection::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeDebugEnginesQuery@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1967 NONAME ; int QDeclarativeDebugEnginesQuery::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeDebugExpressionQuery@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1968 NONAME ; int QDeclarativeDebugExpressionQuery::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeDebugObjectExpressionWatch@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1969 NONAME ; int QDeclarativeDebugObjectExpressionWatch::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeDebugObjectQuery@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1970 NONAME ; int QDeclarativeDebugObjectQuery::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeDebugPropertyWatch@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1971 NONAME ; int QDeclarativeDebugPropertyWatch::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeDebugQuery@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1972 NONAME ; int QDeclarativeDebugQuery::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeDebugRootContextQuery@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1973 NONAME ; int QDeclarativeDebugRootContextQuery::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeDebugService@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1974 NONAME ; int QDeclarativeDebugService::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeDebugWatch@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1975 NONAME ; int QDeclarativeDebugWatch::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeDrag@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1976 NONAME ; int QDeclarativeDrag::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeEaseFollow@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1977 NONAME ; int QDeclarativeEaseFollow::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeEngine@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1978 NONAME ; int QDeclarativeEngine::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeEngineDebug@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1979 NONAME ; int QDeclarativeEngineDebug::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeExpression@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1980 NONAME ; int QDeclarativeExpression::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeExtensionPlugin@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1981 NONAME ; int QDeclarativeExtensionPlugin::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeFlickable@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1982 NONAME ; int QDeclarativeFlickable::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeFlipable@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1983 NONAME ; int QDeclarativeFlipable::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeFlow@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1984 NONAME ; int QDeclarativeFlow::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeFocusPanel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1985 NONAME ; int QDeclarativeFocusPanel::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeFocusScope@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1986 NONAME ; int QDeclarativeFocusScope::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeFontLoader@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1987 NONAME ; int QDeclarativeFontLoader::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeGradient@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1988 NONAME ; int QDeclarativeGradient::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeGradientStop@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1989 NONAME ; int QDeclarativeGradientStop::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeGraphicsObjectContainer@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1990 NONAME ; int QDeclarativeGraphicsObjectContainer::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeGrid@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1991 NONAME ; int QDeclarativeGrid::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeGridView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1992 NONAME ; int QDeclarativeGridView::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeImage@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1993 NONAME ; int QDeclarativeImage::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeImageBase@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1994 NONAME ; int QDeclarativeImageBase::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeItem@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1995 NONAME ; int QDeclarativeItem::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeListModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1996 NONAME ; int QDeclarativeListModel::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeListView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1997 NONAME ; int QDeclarativeListView::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeLoader@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1998 NONAME ; int QDeclarativeLoader::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeMouseArea@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1999 NONAME ; int QDeclarativeMouseArea::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeNumberFormatter@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2000 NONAME ; int QDeclarativeNumberFormatter::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativePaintedItem@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2001 NONAME ; int QDeclarativePaintedItem::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeParentChange@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2002 NONAME ; int QDeclarativeParentChange::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeParticleMotion@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2003 NONAME ; int QDeclarativeParticleMotion::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeParticleMotionGravity@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2004 NONAME ; int QDeclarativeParticleMotionGravity::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeParticleMotionLinear@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2005 NONAME ; int QDeclarativeParticleMotionLinear::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeParticleMotionWander@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2006 NONAME ; int QDeclarativeParticleMotionWander::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeParticles@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2007 NONAME ; int QDeclarativeParticles::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativePath@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2008 NONAME ; int QDeclarativePath::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativePathAttribute@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2009 NONAME ; int QDeclarativePathAttribute::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativePathCubic@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2010 NONAME ; int QDeclarativePathCubic::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativePathElement@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2011 NONAME ; int QDeclarativePathElement::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativePathLine@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2012 NONAME ; int QDeclarativePathLine::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativePathPercent@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2013 NONAME ; int QDeclarativePathPercent::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativePathQuad@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2014 NONAME ; int QDeclarativePathQuad::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativePathView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2015 NONAME ; int QDeclarativePathView::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativePen@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2016 NONAME ; int QDeclarativePen::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativePixmapReply@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2017 NONAME ; int QDeclarativePixmapReply::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativePropertyChanges@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2018 NONAME ; int QDeclarativePropertyChanges::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativePropertyMap@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2019 NONAME ; int QDeclarativePropertyMap::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeRectangle@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2020 NONAME ; int QDeclarativeRectangle::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeRepeater@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2021 NONAME ; int QDeclarativeRepeater::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeRow@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2022 NONAME ; int QDeclarativeRow::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeScaleGrid@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2023 NONAME ; int QDeclarativeScaleGrid::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeSpringFollow@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2024 NONAME ; int QDeclarativeSpringFollow::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeState@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2025 NONAME ; int QDeclarativeState::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeStateChangeScript@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2026 NONAME ; int QDeclarativeStateChangeScript::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeStateGroup@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2027 NONAME ; int QDeclarativeStateGroup::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeStateOperation@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2028 NONAME ; int QDeclarativeStateOperation::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeSystemPalette@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2029 NONAME ; int QDeclarativeSystemPalette::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeText@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2030 NONAME ; int QDeclarativeText::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeTextEdit@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2031 NONAME ; int QDeclarativeTextEdit::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeTextInput@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2032 NONAME ; int QDeclarativeTextInput::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeTimer@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2033 NONAME ; int QDeclarativeTimer::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeTransition@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2034 NONAME ; int QDeclarativeTransition::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeValueType@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2035 NONAME ; int QDeclarativeValueType::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2036 NONAME ; int QDeclarativeView::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeViewSection@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2037 NONAME ; int QDeclarativeViewSection::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeVisualDataModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2038 NONAME ; int QDeclarativeVisualDataModel::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeVisualItemModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2039 NONAME ; int QDeclarativeVisualItemModel::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeVisualModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2040 NONAME ; int QDeclarativeVisualModel::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeWebPage@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2041 NONAME ; int QDeclarativeWebPage::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeWebView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2042 NONAME ; int QDeclarativeWebView::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeXmlListModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2043 NONAME ; int QDeclarativeXmlListModel::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QDeclarativeXmlListModelRole@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2044 NONAME ; int QDeclarativeXmlListModelRole::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QListModelInterface@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2045 NONAME ; int QListModelInterface::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QPacketProtocol@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 2046 NONAME ; int QPacketProtocol::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacast@QDeclarativeAnchorChanges@@UAEPAXPBD@Z @ 2047 NONAME ; void * QDeclarativeAnchorChanges::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeAnchors@@UAEPAXPBD@Z @ 2048 NONAME ; void * QDeclarativeAnchors::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeAnimatedImage@@UAEPAXPBD@Z @ 2049 NONAME ; void * QDeclarativeAnimatedImage::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeBasePositioner@@UAEPAXPBD@Z @ 2050 NONAME ; void * QDeclarativeBasePositioner::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeBehavior@@UAEPAXPBD@Z @ 2051 NONAME ; void * QDeclarativeBehavior::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeBind@@UAEPAXPBD@Z @ 2052 NONAME ; void * QDeclarativeBind::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeBorderImage@@UAEPAXPBD@Z @ 2053 NONAME ; void * QDeclarativeBorderImage::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeColumn@@UAEPAXPBD@Z @ 2054 NONAME ; void * QDeclarativeColumn::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeComponent@@UAEPAXPBD@Z @ 2055 NONAME ; void * QDeclarativeComponent::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeConnections@@UAEPAXPBD@Z @ 2056 NONAME ; void * QDeclarativeConnections::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeContext@@UAEPAXPBD@Z @ 2057 NONAME ; void * QDeclarativeContext::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeCurve@@UAEPAXPBD@Z @ 2058 NONAME ; void * QDeclarativeCurve::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeDateTimeFormatter@@UAEPAXPBD@Z @ 2059 NONAME ; void * QDeclarativeDateTimeFormatter::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeDebugClient@@UAEPAXPBD@Z @ 2060 NONAME ; void * QDeclarativeDebugClient::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeDebugConnection@@UAEPAXPBD@Z @ 2061 NONAME ; void * QDeclarativeDebugConnection::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeDebugEnginesQuery@@UAEPAXPBD@Z @ 2062 NONAME ; void * QDeclarativeDebugEnginesQuery::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeDebugExpressionQuery@@UAEPAXPBD@Z @ 2063 NONAME ; void * QDeclarativeDebugExpressionQuery::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeDebugObjectExpressionWatch@@UAEPAXPBD@Z @ 2064 NONAME ; void * QDeclarativeDebugObjectExpressionWatch::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeDebugObjectQuery@@UAEPAXPBD@Z @ 2065 NONAME ; void * QDeclarativeDebugObjectQuery::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeDebugPropertyWatch@@UAEPAXPBD@Z @ 2066 NONAME ; void * QDeclarativeDebugPropertyWatch::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeDebugQuery@@UAEPAXPBD@Z @ 2067 NONAME ; void * QDeclarativeDebugQuery::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeDebugRootContextQuery@@UAEPAXPBD@Z @ 2068 NONAME ; void * QDeclarativeDebugRootContextQuery::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeDebugService@@UAEPAXPBD@Z @ 2069 NONAME ; void * QDeclarativeDebugService::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeDebugWatch@@UAEPAXPBD@Z @ 2070 NONAME ; void * QDeclarativeDebugWatch::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeDrag@@UAEPAXPBD@Z @ 2071 NONAME ; void * QDeclarativeDrag::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeEaseFollow@@UAEPAXPBD@Z @ 2072 NONAME ; void * QDeclarativeEaseFollow::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeEngine@@UAEPAXPBD@Z @ 2073 NONAME ; void * QDeclarativeEngine::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeEngineDebug@@UAEPAXPBD@Z @ 2074 NONAME ; void * QDeclarativeEngineDebug::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeExpression@@UAEPAXPBD@Z @ 2075 NONAME ; void * QDeclarativeExpression::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeExtensionPlugin@@UAEPAXPBD@Z @ 2076 NONAME ; void * QDeclarativeExtensionPlugin::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeFlickable@@UAEPAXPBD@Z @ 2077 NONAME ; void * QDeclarativeFlickable::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeFlipable@@UAEPAXPBD@Z @ 2078 NONAME ; void * QDeclarativeFlipable::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeFlow@@UAEPAXPBD@Z @ 2079 NONAME ; void * QDeclarativeFlow::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeFocusPanel@@UAEPAXPBD@Z @ 2080 NONAME ; void * QDeclarativeFocusPanel::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeFocusScope@@UAEPAXPBD@Z @ 2081 NONAME ; void * QDeclarativeFocusScope::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeFontLoader@@UAEPAXPBD@Z @ 2082 NONAME ; void * QDeclarativeFontLoader::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeGradient@@UAEPAXPBD@Z @ 2083 NONAME ; void * QDeclarativeGradient::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeGradientStop@@UAEPAXPBD@Z @ 2084 NONAME ; void * QDeclarativeGradientStop::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeGraphicsObjectContainer@@UAEPAXPBD@Z @ 2085 NONAME ; void * QDeclarativeGraphicsObjectContainer::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeGrid@@UAEPAXPBD@Z @ 2086 NONAME ; void * QDeclarativeGrid::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeGridView@@UAEPAXPBD@Z @ 2087 NONAME ; void * QDeclarativeGridView::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeImage@@UAEPAXPBD@Z @ 2088 NONAME ; void * QDeclarativeImage::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeImageBase@@UAEPAXPBD@Z @ 2089 NONAME ; void * QDeclarativeImageBase::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeItem@@UAEPAXPBD@Z @ 2090 NONAME ; void * QDeclarativeItem::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeListModel@@UAEPAXPBD@Z @ 2091 NONAME ; void * QDeclarativeListModel::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeListView@@UAEPAXPBD@Z @ 2092 NONAME ; void * QDeclarativeListView::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeLoader@@UAEPAXPBD@Z @ 2093 NONAME ; void * QDeclarativeLoader::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeMouseArea@@UAEPAXPBD@Z @ 2094 NONAME ; void * QDeclarativeMouseArea::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeNumberFormatter@@UAEPAXPBD@Z @ 2095 NONAME ; void * QDeclarativeNumberFormatter::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativePaintedItem@@UAEPAXPBD@Z @ 2096 NONAME ; void * QDeclarativePaintedItem::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeParentChange@@UAEPAXPBD@Z @ 2097 NONAME ; void * QDeclarativeParentChange::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeParticleMotion@@UAEPAXPBD@Z @ 2098 NONAME ; void * QDeclarativeParticleMotion::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeParticleMotionGravity@@UAEPAXPBD@Z @ 2099 NONAME ; void * QDeclarativeParticleMotionGravity::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeParticleMotionLinear@@UAEPAXPBD@Z @ 2100 NONAME ; void * QDeclarativeParticleMotionLinear::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeParticleMotionWander@@UAEPAXPBD@Z @ 2101 NONAME ; void * QDeclarativeParticleMotionWander::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeParticles@@UAEPAXPBD@Z @ 2102 NONAME ; void * QDeclarativeParticles::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativePath@@UAEPAXPBD@Z @ 2103 NONAME ; void * QDeclarativePath::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativePathAttribute@@UAEPAXPBD@Z @ 2104 NONAME ; void * QDeclarativePathAttribute::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativePathCubic@@UAEPAXPBD@Z @ 2105 NONAME ; void * QDeclarativePathCubic::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativePathElement@@UAEPAXPBD@Z @ 2106 NONAME ; void * QDeclarativePathElement::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativePathLine@@UAEPAXPBD@Z @ 2107 NONAME ; void * QDeclarativePathLine::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativePathPercent@@UAEPAXPBD@Z @ 2108 NONAME ; void * QDeclarativePathPercent::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativePathQuad@@UAEPAXPBD@Z @ 2109 NONAME ; void * QDeclarativePathQuad::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativePathView@@UAEPAXPBD@Z @ 2110 NONAME ; void * QDeclarativePathView::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativePen@@UAEPAXPBD@Z @ 2111 NONAME ; void * QDeclarativePen::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativePixmapReply@@UAEPAXPBD@Z @ 2112 NONAME ; void * QDeclarativePixmapReply::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativePropertyChanges@@UAEPAXPBD@Z @ 2113 NONAME ; void * QDeclarativePropertyChanges::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativePropertyMap@@UAEPAXPBD@Z @ 2114 NONAME ; void * QDeclarativePropertyMap::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeRectangle@@UAEPAXPBD@Z @ 2115 NONAME ; void * QDeclarativeRectangle::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeRepeater@@UAEPAXPBD@Z @ 2116 NONAME ; void * QDeclarativeRepeater::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeRow@@UAEPAXPBD@Z @ 2117 NONAME ; void * QDeclarativeRow::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeScaleGrid@@UAEPAXPBD@Z @ 2118 NONAME ; void * QDeclarativeScaleGrid::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeSpringFollow@@UAEPAXPBD@Z @ 2119 NONAME ; void * QDeclarativeSpringFollow::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeState@@UAEPAXPBD@Z @ 2120 NONAME ; void * QDeclarativeState::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeStateChangeScript@@UAEPAXPBD@Z @ 2121 NONAME ; void * QDeclarativeStateChangeScript::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeStateGroup@@UAEPAXPBD@Z @ 2122 NONAME ; void * QDeclarativeStateGroup::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeStateOperation@@UAEPAXPBD@Z @ 2123 NONAME ; void * QDeclarativeStateOperation::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeSystemPalette@@UAEPAXPBD@Z @ 2124 NONAME ; void * QDeclarativeSystemPalette::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeText@@UAEPAXPBD@Z @ 2125 NONAME ; void * QDeclarativeText::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeTextEdit@@UAEPAXPBD@Z @ 2126 NONAME ; void * QDeclarativeTextEdit::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeTextInput@@UAEPAXPBD@Z @ 2127 NONAME ; void * QDeclarativeTextInput::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeTimer@@UAEPAXPBD@Z @ 2128 NONAME ; void * QDeclarativeTimer::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeTransition@@UAEPAXPBD@Z @ 2129 NONAME ; void * QDeclarativeTransition::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeValueType@@UAEPAXPBD@Z @ 2130 NONAME ; void * QDeclarativeValueType::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeView@@UAEPAXPBD@Z @ 2131 NONAME ; void * QDeclarativeView::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeViewSection@@UAEPAXPBD@Z @ 2132 NONAME ; void * QDeclarativeViewSection::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeVisualDataModel@@UAEPAXPBD@Z @ 2133 NONAME ; void * QDeclarativeVisualDataModel::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeVisualItemModel@@UAEPAXPBD@Z @ 2134 NONAME ; void * QDeclarativeVisualItemModel::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeVisualModel@@UAEPAXPBD@Z @ 2135 NONAME ; void * QDeclarativeVisualModel::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeWebPage@@UAEPAXPBD@Z @ 2136 NONAME ; void * QDeclarativeWebPage::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeWebView@@UAEPAXPBD@Z @ 2137 NONAME ; void * QDeclarativeWebView::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeXmlListModel@@UAEPAXPBD@Z @ 2138 NONAME ; void * QDeclarativeXmlListModel::qt_metacast(char const *)
+ ?qt_metacast@QDeclarativeXmlListModelRole@@UAEPAXPBD@Z @ 2139 NONAME ; void * QDeclarativeXmlListModelRole::qt_metacast(char const *)
+ ?qt_metacast@QListModelInterface@@UAEPAXPBD@Z @ 2140 NONAME ; void * QListModelInterface::qt_metacast(char const *)
+ ?qt_metacast@QPacketProtocol@@UAEPAXPBD@Z @ 2141 NONAME ; void * QPacketProtocol::qt_metacast(char const *)
+ ?qualifier@QDeclarativeDomImport@@QBE?AVQString@@XZ @ 2142 NONAME ; class QString QDeclarativeDomImport::qualifier(void) const
+ ?query@QDeclarativeXmlListModel@@QBE?AVQString@@XZ @ 2143 NONAME ; class QString QDeclarativeXmlListModel::query(void) const
+ ?query@QDeclarativeXmlListModelRole@@QBE?AVQString@@XZ @ 2144 NONAME ; class QString QDeclarativeXmlListModelRole::query(void) const
+ ?queryAvailableEngines@QDeclarativeEngineDebug@@QAEPAVQDeclarativeDebugEnginesQuery@@PAVQObject@@@Z @ 2145 NONAME ; class QDeclarativeDebugEnginesQuery * QDeclarativeEngineDebug::queryAvailableEngines(class QObject *)
+ ?queryCompleted@QDeclarativeXmlListModel@@AAEXHH@Z @ 2146 NONAME ; void QDeclarativeXmlListModel::queryCompleted(int, int)
+ ?queryExpressionResult@QDeclarativeEngineDebug@@QAEPAVQDeclarativeDebugExpressionQuery@@HABVQString@@PAVQObject@@@Z @ 2147 NONAME ; class QDeclarativeDebugExpressionQuery * QDeclarativeEngineDebug::queryExpressionResult(int, class QString const &, class QObject *)
+ ?queryId@QDeclarativeDebugWatch@@QBEHXZ @ 2148 NONAME ; int QDeclarativeDebugWatch::queryId(void) const
+ ?queryObject@QDeclarativeEngineDebug@@QAEPAVQDeclarativeDebugObjectQuery@@ABVQDeclarativeDebugObjectReference@@PAVQObject@@@Z @ 2149 NONAME ; class QDeclarativeDebugObjectQuery * QDeclarativeEngineDebug::queryObject(class QDeclarativeDebugObjectReference const &, class QObject *)
+ ?queryObjectRecursive@QDeclarativeEngineDebug@@QAEPAVQDeclarativeDebugObjectQuery@@ABVQDeclarativeDebugObjectReference@@PAVQObject@@@Z @ 2150 NONAME ; class QDeclarativeDebugObjectQuery * QDeclarativeEngineDebug::queryObjectRecursive(class QDeclarativeDebugObjectReference const &, class QObject *)
+ ?queryRootContexts@QDeclarativeEngineDebug@@QAEPAVQDeclarativeDebugRootContextQuery@@ABVQDeclarativeDebugEngineReference@@PAVQObject@@@Z @ 2151 NONAME ; class QDeclarativeDebugRootContextQuery * QDeclarativeEngineDebug::queryRootContexts(class QDeclarativeDebugEngineReference const &, class QObject *)
+ ?quit@QDeclarativeEngine@@IAEXXZ @ 2152 NONAME ; void QDeclarativeEngine::quit(void)
+ ?radius@QDeclarativeRectangle@@QBEMXZ @ 2153 NONAME ; float QDeclarativeRectangle::radius(void) const
+ ?radiusChanged@QDeclarativeRectangle@@IAEXXZ @ 2154 NONAME ; void QDeclarativeRectangle::radiusChanged(void)
+ ?read@QDeclarativeProperty@@QBE?AVQVariant@@XZ @ 2155 NONAME ; class QVariant QDeclarativeProperty::read(void) const
+ ?read@QDeclarativeProperty@@SA?AVQVariant@@PAVQObject@@ABVQString@@@Z @ 2156 NONAME ; class QVariant QDeclarativeProperty::read(class QObject *, class QString const &)
+ ?read@QDeclarativeProperty@@SA?AVQVariant@@PAVQObject@@ABVQString@@PAVQDeclarativeContext@@@Z @ 2157 NONAME ; class QVariant QDeclarativeProperty::read(class QObject *, class QString const &, class QDeclarativeContext *)
+ ?read@QDeclarativeProperty@@SA?AVQVariant@@PAVQObject@@ABVQString@@PAVQDeclarativeEngine@@@Z @ 2158 NONAME ; class QVariant QDeclarativeProperty::read(class QObject *, class QString const &, class QDeclarativeEngine *)
+ ?read@QPacketProtocol@@QAE?AVQPacket@@XZ @ 2159 NONAME ; class QPacket QPacketProtocol::read(void)
+ ?readOnlyChanged@QDeclarativeTextEdit@@IAEX_N@Z @ 2160 NONAME ; void QDeclarativeTextEdit::readOnlyChanged(bool)
+ ?readOnlyChanged@QDeclarativeTextInput@@IAEX_N@Z @ 2161 NONAME ; void QDeclarativeTextInput::readOnlyChanged(bool)
+ ?readyRead@QPacketProtocol@@IAEXXZ @ 2162 NONAME ; void QPacketProtocol::readyRead(void)
+ ?rectFFromString@QDeclarativeStringConverters@@YA?AVQRectF@@ABVQString@@PA_N@Z @ 2163 NONAME ; class QRectF QDeclarativeStringConverters::rectFFromString(class QString const &, bool *)
+ ?refill@QDeclarativeGridView@@AAEXXZ @ 2164 NONAME ; void QDeclarativeGridView::refill(void)
+ ?refill@QDeclarativeListView@@AAEXXZ @ 2165 NONAME ; void QDeclarativeListView::refill(void)
+ ?refill@QDeclarativePathView@@AAEXXZ @ 2166 NONAME ; void QDeclarativePathView::refill(void)
+ ?refreshExpressions@QDeclarativeContextPrivate@@QAEXXZ @ 2167 NONAME ; void QDeclarativeContextPrivate::refreshExpressions(void)
+ ?regenerate@QDeclarativeRepeater@@AAEXXZ @ 2168 NONAME ; void QDeclarativeRepeater::regenerate(void)
+ ?registerCustomStringConverter@QDeclarativeMetaType@@SAXHP6A?AVQVariant@@ABVQString@@@Z@Z @ 2169 NONAME ; void QDeclarativeMetaType::registerCustomStringConverter(int, class QVariant (*)(class QString const &))
+ ?registerType@QDeclarativePrivate@@YAHABURegisterInterface@1@@Z @ 2170 NONAME ; int QDeclarativePrivate::registerType(struct QDeclarativePrivate::RegisterInterface const &)
+ ?registerType@QDeclarativePrivate@@YAHABURegisterType@1@@Z @ 2171 NONAME ; int QDeclarativePrivate::registerType(struct QDeclarativePrivate::RegisterType const &)
+ ?relatedMetaObject@QMetaObjectBuilder@@QBEPBUQMetaObject@@H@Z @ 2172 NONAME ; struct QMetaObject const * QMetaObjectBuilder::relatedMetaObject(int) const
+ ?relatedMetaObjectCount@QMetaObjectBuilder@@QBEHXZ @ 2173 NONAME ; int QMetaObjectBuilder::relatedMetaObjectCount(void) const
+ ?release@QDeclarativePixmapReply@@AAE_N_N@Z @ 2174 NONAME ; bool QDeclarativePixmapReply::release(bool)
+ ?release@QDeclarativeVisualDataModel@@UAE?AV?$QFlags@W4ReleaseFlag@QDeclarativeVisualModel@@@@PAVQDeclarativeItem@@@Z @ 2175 NONAME ; class QFlags<enum QDeclarativeVisualModel::ReleaseFlag> QDeclarativeVisualDataModel::release(class QDeclarativeItem *)
+ ?release@QDeclarativeVisualItemModel@@UAE?AV?$QFlags@W4ReleaseFlag@QDeclarativeVisualModel@@@@PAVQDeclarativeItem@@@Z @ 2176 NONAME ; class QFlags<enum QDeclarativeVisualModel::ReleaseFlag> QDeclarativeVisualItemModel::release(class QDeclarativeItem *)
+ ?released@QDeclarativeMouseArea@@IAEXPAVQDeclarativeMouseEvent@@@Z @ 2177 NONAME ; void QDeclarativeMouseArea::released(class QDeclarativeMouseEvent *)
+ ?reload@QDeclarativeXmlListModel@@QAEXXZ @ 2178 NONAME ; void QDeclarativeXmlListModel::reload(void)
+ ?reloadAction@QDeclarativeWebView@@QBEPAVQAction@@XZ @ 2179 NONAME ; class QAction * QDeclarativeWebView::reloadAction(void) const
+ ?remove@QDeclarativeListModel@@QAEXH@Z @ 2180 NONAME ; void QDeclarativeListModel::remove(int)
+ ?removeClassInfo@QMetaObjectBuilder@@QAEXH@Z @ 2181 NONAME ; void QMetaObjectBuilder::removeClassInfo(int)
+ ?removeConstructor@QMetaObjectBuilder@@QAEXH@Z @ 2182 NONAME ; void QMetaObjectBuilder::removeConstructor(int)
+ ?removeEnumerator@QMetaObjectBuilder@@QAEXH@Z @ 2183 NONAME ; void QMetaObjectBuilder::removeEnumerator(int)
+ ?removeImageProvider@QDeclarativeEngine@@QAEXABVQString@@@Z @ 2184 NONAME ; void QDeclarativeEngine::removeImageProvider(class QString const &)
+ ?removeKey@QMetaEnumBuilder@@QAEXH@Z @ 2185 NONAME ; void QMetaEnumBuilder::removeKey(int)
+ ?removeMethod@QMetaObjectBuilder@@QAEXH@Z @ 2186 NONAME ; void QMetaObjectBuilder::removeMethod(int)
+ ?removeNotifySignal@QMetaPropertyBuilder@@QAEXXZ @ 2187 NONAME ; void QMetaPropertyBuilder::removeNotifySignal(void)
+ ?removeProperty@QMetaObjectBuilder@@QAEXH@Z @ 2188 NONAME ; void QMetaObjectBuilder::removeProperty(int)
+ ?removeRelatedMetaObject@QMetaObjectBuilder@@QAEXH@Z @ 2189 NONAME ; void QMetaObjectBuilder::removeRelatedMetaObject(int)
+ ?removeState@QDeclarativeStateGroup@@AAEXPAVQDeclarativeState@@@Z @ 2190 NONAME ; void QDeclarativeStateGroup::removeState(class QDeclarativeState *)
+ ?removeWatch@QDeclarativeEngineDebug@@QAEXPAVQDeclarativeDebugWatch@@@Z @ 2191 NONAME ; void QDeclarativeEngineDebug::removeWatch(class QDeclarativeDebugWatch *)
+ ?renderingEnabled@QDeclarativeWebView@@QBE_NXZ @ 2192 NONAME ; bool QDeclarativeWebView::renderingEnabled(void) const
+ ?renderingEnabledChanged@QDeclarativeWebView@@IAEXXZ @ 2193 NONAME ; void QDeclarativeWebView::renderingEnabledChanged(void)
+ ?replyFinished@QDeclarativeFontLoader@@AAEXXZ @ 2194 NONAME ; void QDeclarativeFontLoader::replyFinished(void)
+ ?request@QDeclarativePixmapCache@@SAPAVQDeclarativePixmapReply@@PAVQDeclarativeEngine@@ABVQUrl@@@Z @ 2195 NONAME ; class QDeclarativePixmapReply * QDeclarativePixmapCache::request(class QDeclarativeEngine *, class QUrl const &)
+ ?requestFinished@QDeclarativeBorderImage@@EAEXXZ @ 2196 NONAME ; void QDeclarativeBorderImage::requestFinished(void)
+ ?requestFinished@QDeclarativeImageBase@@EAEXXZ @ 2197 NONAME ; void QDeclarativeImageBase::requestFinished(void)
+ ?requestFinished@QDeclarativeXmlListModel@@AAEXXZ @ 2198 NONAME ; void QDeclarativeXmlListModel::requestFinished(void)
+ ?requestProgress@QDeclarativeImageBase@@AAEX_J0@Z @ 2199 NONAME ; void QDeclarativeImageBase::requestProgress(long long, long long)
+ ?requestProgress@QDeclarativeXmlListModel@@AAEX_J0@Z @ 2200 NONAME ; void QDeclarativeXmlListModel::requestProgress(long long, long long)
+ ?reset@QDeclarativeAnchorChanges@@QBE?AVQString@@XZ @ 2201 NONAME ; class QString QDeclarativeAnchorChanges::reset(void) const
+ ?reset@QDeclarativeCompiler@@CAXPAVQDeclarativeCompiledData@@@Z @ 2202 NONAME ; void QDeclarativeCompiler::reset(class QDeclarativeCompiledData *)
+ ?reset@QDeclarativeProperty@@QBE_NXZ @ 2203 NONAME ; bool QDeclarativeProperty::reset(void) const
+ ?resetBaseline@QDeclarativeAnchors@@QAEXXZ @ 2204 NONAME ; void QDeclarativeAnchors::resetBaseline(void)
+ ?resetBottom@QDeclarativeAnchors@@QAEXXZ @ 2205 NONAME ; void QDeclarativeAnchors::resetBottom(void)
+ ?resetCenterIn@QDeclarativeAnchors@@QAEXXZ @ 2206 NONAME ; void QDeclarativeAnchors::resetCenterIn(void)
+ ?resetFill@QDeclarativeAnchors@@QAEXXZ @ 2207 NONAME ; void QDeclarativeAnchors::resetFill(void)
+ ?resetHeight@QDeclarativeItem@@QAEXXZ @ 2208 NONAME ; void QDeclarativeItem::resetHeight(void)
+ ?resetHorizontalCenter@QDeclarativeAnchors@@QAEXXZ @ 2209 NONAME ; void QDeclarativeAnchors::resetHorizontalCenter(void)
+ ?resetLeft@QDeclarativeAnchors@@QAEXXZ @ 2210 NONAME ; void QDeclarativeAnchors::resetLeft(void)
+ ?resetRight@QDeclarativeAnchors@@QAEXXZ @ 2211 NONAME ; void QDeclarativeAnchors::resetRight(void)
+ ?resetTop@QDeclarativeAnchors@@QAEXXZ @ 2212 NONAME ; void QDeclarativeAnchors::resetTop(void)
+ ?resetVerticalCenter@QDeclarativeAnchors@@QAEXXZ @ 2213 NONAME ; void QDeclarativeAnchors::resetVerticalCenter(void)
+ ?resetWidth@QDeclarativeItem@@QAEXXZ @ 2214 NONAME ; void QDeclarativeItem::resetWidth(void)
+ ?resizeEvent@QDeclarativeView@@MAEXPAVQResizeEvent@@@Z @ 2215 NONAME ; void QDeclarativeView::resizeEvent(class QResizeEvent *)
+ ?resizeMode@QDeclarativeLoader@@QBE?AW4ResizeMode@1@XZ @ 2216 NONAME ; enum QDeclarativeLoader::ResizeMode QDeclarativeLoader::resizeMode(void) const
+ ?resizeMode@QDeclarativeView@@QBE?AW4ResizeMode@1@XZ @ 2217 NONAME ; enum QDeclarativeView::ResizeMode QDeclarativeView::resizeMode(void) const
+ ?resizeModeChanged@QDeclarativeLoader@@IAEXXZ @ 2218 NONAME ; void QDeclarativeLoader::resizeModeChanged(void)
+ ?resolvedUrl@QDeclarativeContext@@QAE?AVQUrl@@ABV2@@Z @ 2219 NONAME ; class QUrl QDeclarativeContext::resolvedUrl(class QUrl const &)
+ ?resources@QDeclarativeItem@@QAE?AU?$QDeclarativeListProperty@VQObject@@@@XZ @ 2220 NONAME ; struct QDeclarativeListProperty<class QObject> QDeclarativeItem::resources(void)
+ ?restart@QDeclarativeTimer@@QAEXXZ @ 2221 NONAME ; void QDeclarativeTimer::restart(void)
+ ?restoreEntryValues@QDeclarativePropertyChanges@@QBE_NXZ @ 2222 NONAME ; bool QDeclarativePropertyChanges::restoreEntryValues(void) const
+ ?result@QDeclarativeDebugExpressionQuery@@QBE?AVQVariant@@XZ @ 2223 NONAME ; class QVariant QDeclarativeDebugExpressionQuery::result(void) const
+ ?returnType@QMetaMethodBuilder@@QBE?AVQByteArray@@XZ @ 2224 NONAME ; class QByteArray QMetaMethodBuilder::returnType(void) const
+ ?reverse@QDeclarativeAnchorChanges@@UAEXXZ @ 2225 NONAME ; void QDeclarativeAnchorChanges::reverse(void)
+ ?reverse@QDeclarativeParentChange@@UAEXXZ @ 2226 NONAME ; void QDeclarativeParentChange::reverse(void)
+ ?reversible@QDeclarativeTransition@@QBE_NXZ @ 2227 NONAME ; bool QDeclarativeTransition::reversible(void) const
+ ?reversingMode@QDeclarativeEaseFollow@@QBE?AW4ReversingMode@1@XZ @ 2228 NONAME ; enum QDeclarativeEaseFollow::ReversingMode QDeclarativeEaseFollow::reversingMode(void) const
+ ?reversingModeChanged@QDeclarativeEaseFollow@@IAEXXZ @ 2229 NONAME ; void QDeclarativeEaseFollow::reversingModeChanged(void)
+ ?rewind@QDeclarativeAnchorChanges@@UAEXXZ @ 2230 NONAME ; void QDeclarativeAnchorChanges::rewind(void)
+ ?rewind@QDeclarativeParentChange@@UAEXXZ @ 2231 NONAME ; void QDeclarativeParentChange::rewind(void)
+ ?right@QDeclarativeAnchorChanges@@QBE?AVQDeclarativeAnchorLine@@XZ @ 2232 NONAME ; class QDeclarativeAnchorLine QDeclarativeAnchorChanges::right(void) const
+ ?right@QDeclarativeAnchors@@QBE?AVQDeclarativeAnchorLine@@XZ @ 2233 NONAME ; class QDeclarativeAnchorLine QDeclarativeAnchors::right(void) const
+ ?right@QDeclarativeItem@@QBE?AVQDeclarativeAnchorLine@@XZ @ 2234 NONAME ; class QDeclarativeAnchorLine QDeclarativeItem::right(void) const
+ ?right@QDeclarativeScaleGrid@@QBEHXZ @ 2235 NONAME ; int QDeclarativeScaleGrid::right(void) const
+ ?rightChanged@QDeclarativeAnchors@@IAEXXZ @ 2236 NONAME ; void QDeclarativeAnchors::rightChanged(void)
+ ?rightMargin@QDeclarativeAnchors@@QBEMXZ @ 2237 NONAME ; float QDeclarativeAnchors::rightMargin(void) const
+ ?rightMarginChanged@QDeclarativeAnchors@@IAEXXZ @ 2238 NONAME ; void QDeclarativeAnchors::rightMarginChanged(void)
+ ?roleObjects@QDeclarativeXmlListModel@@QAE?AU?$QDeclarativeListProperty@VQDeclarativeXmlListModelRole@@@@XZ @ 2239 NONAME ; struct QDeclarativeListProperty<class QDeclarativeXmlListModelRole> QDeclarativeXmlListModel::roleObjects(void)
+ ?roles@QDeclarativeListModel@@UBE?AV?$QList@H@@XZ @ 2240 NONAME ; class QList<int> QDeclarativeListModel::roles(void) const
+ ?roles@QDeclarativeXmlListModel@@UBE?AV?$QList@H@@XZ @ 2241 NONAME ; class QList<int> QDeclarativeXmlListModel::roles(void) const
+ ?rootContext@QDeclarativeDebugRootContextQuery@@QBE?AVQDeclarativeDebugContextReference@@XZ @ 2242 NONAME ; class QDeclarativeDebugContextReference QDeclarativeDebugRootContextQuery::rootContext(void) const
+ ?rootContext@QDeclarativeEngine@@QAEPAVQDeclarativeContext@@XZ @ 2243 NONAME ; class QDeclarativeContext * QDeclarativeEngine::rootContext(void)
+ ?rootContext@QDeclarativeView@@QAEPAVQDeclarativeContext@@XZ @ 2244 NONAME ; class QDeclarativeContext * QDeclarativeView::rootContext(void)
+ ?rootIndex@QDeclarativeVisualDataModel@@QBE?AVQModelIndex@@XZ @ 2245 NONAME ; class QModelIndex QDeclarativeVisualDataModel::rootIndex(void) const
+ ?rootIndexChanged@QDeclarativeVisualDataModel@@IAEXXZ @ 2246 NONAME ; void QDeclarativeVisualDataModel::rootIndexChanged(void)
+ ?rootObject@QDeclarativeDomDocument@@QBE?AVQDeclarativeDomObject@@XZ @ 2247 NONAME ; class QDeclarativeDomObject QDeclarativeDomDocument::rootObject(void) const
+ ?rootObject@QDeclarativeView@@QBEPAVQGraphicsObject@@XZ @ 2248 NONAME ; class QGraphicsObject * QDeclarativeView::rootObject(void) const
+ ?rotation@QDeclarativeParentChange@@QBEMXZ @ 2249 NONAME ; float QDeclarativeParentChange::rotation(void) const
+ ?rotationIsSet@QDeclarativeParentChange@@QBE_NXZ @ 2250 NONAME ; bool QDeclarativeParentChange::rotationIsSet(void) const
+ ?rows@QDeclarativeGrid@@QBEHXZ @ 2251 NONAME ; int QDeclarativeGrid::rows(void) const
+ ?rowsChanged@QDeclarativeGrid@@IAEXXZ @ 2252 NONAME ; void QDeclarativeGrid::rowsChanged(void)
+ ?runningChanged@QDeclarativeTimer@@IAEXXZ @ 2253 NONAME ; void QDeclarativeTimer::runningChanged(void)
+ ?saveComponentState@QDeclarativeCompiler@@AAEXXZ @ 2254 NONAME ; void QDeclarativeCompiler::saveComponentState(void)
+ ?saveCurrentValues@QDeclarativeAnchorChanges@@UAEXXZ @ 2255 NONAME ; void QDeclarativeAnchorChanges::saveCurrentValues(void)
+ ?saveCurrentValues@QDeclarativeParentChange@@UAEXXZ @ 2256 NONAME ; void QDeclarativeParentChange::saveCurrentValues(void)
+ ?saveOriginals@QDeclarativeAnchorChanges@@UAEXXZ @ 2257 NONAME ; void QDeclarativeAnchorChanges::saveOriginals(void)
+ ?saveOriginals@QDeclarativeParentChange@@UAEXXZ @ 2258 NONAME ; void QDeclarativeParentChange::saveOriginals(void)
+ ?scale@QDeclarativeParentChange@@QBEMXZ @ 2259 NONAME ; float QDeclarativeParentChange::scale(void) const
+ ?scaleIsSet@QDeclarativeParentChange@@QBE_NXZ @ 2260 NONAME ; bool QDeclarativeParentChange::scaleIsSet(void) const
+ ?sceneEvent@QDeclarativeFocusPanel@@MAE_NPAVQEvent@@@Z @ 2261 NONAME ; bool QDeclarativeFocusPanel::sceneEvent(class QEvent *)
+ ?sceneEvent@QDeclarativeItem@@MAE_NPAVQEvent@@@Z @ 2262 NONAME ; bool QDeclarativeItem::sceneEvent(class QEvent *)
+ ?sceneEvent@QDeclarativeMouseArea@@MAE_NPAVQEvent@@@Z @ 2263 NONAME ; bool QDeclarativeMouseArea::sceneEvent(class QEvent *)
+ ?sceneEvent@QDeclarativeWebView@@MAE_NPAVQEvent@@@Z @ 2264 NONAME ; bool QDeclarativeWebView::sceneEvent(class QEvent *)
+ ?sceneEventFilter@QDeclarativeFlickable@@MAE_NPAVQGraphicsItem@@PAVQEvent@@@Z @ 2265 NONAME ; bool QDeclarativeFlickable::sceneEventFilter(class QGraphicsItem *, class QEvent *)
+ ?sceneEventFilter@QDeclarativePathView@@MAE_NPAVQGraphicsItem@@PAVQEvent@@@Z @ 2266 NONAME ; bool QDeclarativePathView::sceneEventFilter(class QGraphicsItem *, class QEvent *)
+ ?sceneHoverMoveEventToMouseEvent@QDeclarativeWebView@@AAEPAVQMouseEvent@@PAVQGraphicsSceneHoverEvent@@@Z @ 2267 NONAME ; class QMouseEvent * QDeclarativeWebView::sceneHoverMoveEventToMouseEvent(class QGraphicsSceneHoverEvent *)
+ ?sceneMouseEventToMouseEvent@QDeclarativeWebView@@AAEPAVQMouseEvent@@PAVQGraphicsSceneMouseEvent@@@Z @ 2268 NONAME ; class QMouseEvent * QDeclarativeWebView::sceneMouseEventToMouseEvent(class QGraphicsSceneMouseEvent *)
+ ?sceneResized@QDeclarativeView@@IAEXVQSize@@@Z @ 2269 NONAME ; void QDeclarativeView::sceneResized(class QSize)
+ ?sciRequestFinished@QDeclarativeBorderImage@@AAEXXZ @ 2270 NONAME ; void QDeclarativeBorderImage::sciRequestFinished(void)
+ ?scopeObject@QDeclarativeExpression@@QBEPAVQObject@@XZ @ 2271 NONAME ; class QObject * QDeclarativeExpression::scopeObject(void) const
+ ?scopeObject@QDeclarativeScriptString@@QBEPAVQObject@@XZ @ 2272 NONAME ; class QObject * QDeclarativeScriptString::scopeObject(void) const
+ ?script@QDeclarativeScriptString@@QBE?AVQString@@XZ @ 2273 NONAME ; class QString QDeclarativeScriptString::script(void) const
+ ?script@QDeclarativeStateChangeScript@@QBE?AVQDeclarativeScriptString@@XZ @ 2274 NONAME ; class QDeclarativeScriptString QDeclarativeStateChangeScript::script(void) const
+ ?sectionCriteria@QDeclarativeListView@@QAEPAVQDeclarativeViewSection@@XZ @ 2275 NONAME ; class QDeclarativeViewSection * QDeclarativeListView::sectionCriteria(void)
+ ?sectionString@QDeclarativeViewSection@@QAE?AVQString@@ABV2@@Z @ 2276 NONAME ; class QString QDeclarativeViewSection::sectionString(class QString const &)
+ ?selectAll@QDeclarativeTextEdit@@QAEXXZ @ 2277 NONAME ; void QDeclarativeTextEdit::selectAll(void)
+ ?selectAll@QDeclarativeTextInput@@QAEXXZ @ 2278 NONAME ; void QDeclarativeTextInput::selectAll(void)
+ ?selectedText@QDeclarativeTextEdit@@QBE?AVQString@@XZ @ 2279 NONAME ; class QString QDeclarativeTextEdit::selectedText(void) const
+ ?selectedText@QDeclarativeTextInput@@QBE?AVQString@@XZ @ 2280 NONAME ; class QString QDeclarativeTextInput::selectedText(void) const
+ ?selectedTextChanged@QDeclarativeTextInput@@IAEXXZ @ 2281 NONAME ; void QDeclarativeTextInput::selectedTextChanged(void)
+ ?selectedTextColor@QDeclarativeTextEdit@@QBE?AVQColor@@XZ @ 2282 NONAME ; class QColor QDeclarativeTextEdit::selectedTextColor(void) const
+ ?selectedTextColor@QDeclarativeTextInput@@QBE?AVQColor@@XZ @ 2283 NONAME ; class QColor QDeclarativeTextInput::selectedTextColor(void) const
+ ?selectedTextColorChanged@QDeclarativeTextEdit@@IAEXABVQColor@@@Z @ 2284 NONAME ; void QDeclarativeTextEdit::selectedTextColorChanged(class QColor const &)
+ ?selectedTextColorChanged@QDeclarativeTextInput@@IAEXABVQColor@@@Z @ 2285 NONAME ; void QDeclarativeTextInput::selectedTextColorChanged(class QColor const &)
+ ?selectionChanged@QDeclarativeTextEdit@@IAEXXZ @ 2286 NONAME ; void QDeclarativeTextEdit::selectionChanged(void)
+ ?selectionChanged@QDeclarativeTextInput@@AAEXXZ @ 2287 NONAME ; void QDeclarativeTextInput::selectionChanged(void)
+ ?selectionColor@QDeclarativeTextEdit@@QBE?AVQColor@@XZ @ 2288 NONAME ; class QColor QDeclarativeTextEdit::selectionColor(void) const
+ ?selectionColor@QDeclarativeTextInput@@QBE?AVQColor@@XZ @ 2289 NONAME ; class QColor QDeclarativeTextInput::selectionColor(void) const
+ ?selectionColorChanged@QDeclarativeTextEdit@@IAEXABVQColor@@@Z @ 2290 NONAME ; void QDeclarativeTextEdit::selectionColorChanged(class QColor const &)
+ ?selectionColorChanged@QDeclarativeTextInput@@IAEXABVQColor@@@Z @ 2291 NONAME ; void QDeclarativeTextInput::selectionColorChanged(class QColor const &)
+ ?selectionEnd@QDeclarativeTextEdit@@QBEHXZ @ 2292 NONAME ; int QDeclarativeTextEdit::selectionEnd(void) const
+ ?selectionEnd@QDeclarativeTextInput@@QBEHXZ @ 2293 NONAME ; int QDeclarativeTextInput::selectionEnd(void) const
+ ?selectionEndChanged@QDeclarativeTextEdit@@IAEXXZ @ 2294 NONAME ; void QDeclarativeTextEdit::selectionEndChanged(void)
+ ?selectionEndChanged@QDeclarativeTextInput@@IAEXXZ @ 2295 NONAME ; void QDeclarativeTextInput::selectionEndChanged(void)
+ ?selectionStart@QDeclarativeTextEdit@@QBEHXZ @ 2296 NONAME ; int QDeclarativeTextEdit::selectionStart(void) const
+ ?selectionStart@QDeclarativeTextInput@@QBEHXZ @ 2297 NONAME ; int QDeclarativeTextInput::selectionStart(void) const
+ ?selectionStartChanged@QDeclarativeTextEdit@@IAEXXZ @ 2298 NONAME ; void QDeclarativeTextEdit::selectionStartChanged(void)
+ ?selectionStartChanged@QDeclarativeTextInput@@IAEXXZ @ 2299 NONAME ; void QDeclarativeTextInput::selectionStartChanged(void)
+ ?send@QPacketProtocol@@QAE?AVQPacketAutoSend@@XZ @ 2300 NONAME ; class QPacketAutoSend QPacketProtocol::send(void)
+ ?send@QPacketProtocol@@QAEXABVQPacket@@@Z @ 2301 NONAME ; void QPacketProtocol::send(class QPacket const &)
+ ?sendMessage@QDeclarativeDebugClient@@QAEXABVQByteArray@@@Z @ 2302 NONAME ; void QDeclarativeDebugClient::sendMessage(class QByteArray const &)
+ ?sendMessage@QDeclarativeDebugService@@QAEXABVQByteArray@@@Z @ 2303 NONAME ; void QDeclarativeDebugService::sendMessage(class QByteArray const &)
+ ?sendMouseEvent@QDeclarativeFlickable@@IAE_NPAVQGraphicsSceneMouseEvent@@@Z @ 2304 NONAME ; bool QDeclarativeFlickable::sendMouseEvent(class QGraphicsSceneMouseEvent *)
+ ?sendMouseEvent@QDeclarativePathView@@IAE_NPAVQGraphicsSceneMouseEvent@@@Z @ 2305 NONAME ; bool QDeclarativePathView::sendMouseEvent(class QGraphicsSceneMouseEvent *)
+ ?serialize@QMetaObjectBuilder@@QBEXAAVQDataStream@@@Z @ 2306 NONAME ; void QMetaObjectBuilder::serialize(class QDataStream &) const
+ ?set@QDeclarativeListModel@@QAEXHABVQScriptValue@@@Z @ 2307 NONAME ; void QDeclarativeListModel::set(int, class QScriptValue const &)
+ ?setAcceleration@QDeclarativeParticleMotionGravity@@QAEXM@Z @ 2308 NONAME ; void QDeclarativeParticleMotionGravity::setAcceleration(float)
+ ?setAcceptedButtons@QDeclarativeMouseArea@@QAEXV?$QFlags@W4MouseButton@Qt@@@@@Z @ 2309 NONAME ; void QDeclarativeMouseArea::setAcceptedButtons(class QFlags<enum Qt::MouseButton>)
+ ?setAccess@QMetaMethodBuilder@@QAEXW4Access@QMetaMethod@@@Z @ 2310 NONAME ; void QMetaMethodBuilder::setAccess(enum QMetaMethod::Access)
+ ?setAdd@QDeclarativeBasePositioner@@QAEXPAVQDeclarativeTransition@@@Z @ 2311 NONAME ; void QDeclarativeBasePositioner::setAdd(class QDeclarativeTransition *)
+ ?setAngle@QDeclarativeParticles@@QAEXM@Z @ 2312 NONAME ; void QDeclarativeParticles::setAngle(float)
+ ?setAngleDeviation@QDeclarativeParticles@@QAEXM@Z @ 2313 NONAME ; void QDeclarativeParticles::setAngleDeviation(float)
+ ?setAnimation@QDeclarativeBehavior@@QAEXPAVQDeclarativeAbstractAnimation@@@Z @ 2314 NONAME ; void QDeclarativeBehavior::setAnimation(class QDeclarativeAbstractAnimation *)
+ ?setAsynchronous@QDeclarativeImageBase@@QAEX_N@Z @ 2315 NONAME ; void QDeclarativeImageBase::setAsynchronous(bool)
+ ?setAttributes@QMetaMethodBuilder@@QAEXH@Z @ 2316 NONAME ; void QMetaMethodBuilder::setAttributes(int)
+ ?setAxis@QDeclarativeDrag@@QAEXW4Axis@1@@Z @ 2317 NONAME ; void QDeclarativeDrag::setAxis(enum QDeclarativeDrag::Axis)
+ ?setBack@QDeclarativeFlipable@@QAEXPAVQDeclarativeItem@@@Z @ 2318 NONAME ; void QDeclarativeFlipable::setBack(class QDeclarativeItem *)
+ ?setBaseUrl@QDeclarativeContext@@QAEXABVQUrl@@@Z @ 2319 NONAME ; void QDeclarativeContext::setBaseUrl(class QUrl const &)
+ ?setBaseUrl@QDeclarativeEngine@@QAEXABVQUrl@@@Z @ 2320 NONAME ; void QDeclarativeEngine::setBaseUrl(class QUrl const &)
+ ?setBaseline@QDeclarativeAnchorChanges@@QAEXABVQDeclarativeAnchorLine@@@Z @ 2321 NONAME ; void QDeclarativeAnchorChanges::setBaseline(class QDeclarativeAnchorLine const &)
+ ?setBaseline@QDeclarativeAnchors@@QAEXABVQDeclarativeAnchorLine@@@Z @ 2322 NONAME ; void QDeclarativeAnchors::setBaseline(class QDeclarativeAnchorLine const &)
+ ?setBaselineOffset@QDeclarativeAnchors@@QAEXM@Z @ 2323 NONAME ; void QDeclarativeAnchors::setBaselineOffset(float)
+ ?setBaselineOffset@QDeclarativeItem@@QAEXM@Z @ 2324 NONAME ; void QDeclarativeItem::setBaselineOffset(float)
+ ?setBottom@QDeclarativeAnchorChanges@@QAEXABVQDeclarativeAnchorLine@@@Z @ 2325 NONAME ; void QDeclarativeAnchorChanges::setBottom(class QDeclarativeAnchorLine const &)
+ ?setBottom@QDeclarativeAnchors@@QAEXABVQDeclarativeAnchorLine@@@Z @ 2326 NONAME ; void QDeclarativeAnchors::setBottom(class QDeclarativeAnchorLine const &)
+ ?setBottom@QDeclarativeScaleGrid@@QAEXH@Z @ 2327 NONAME ; void QDeclarativeScaleGrid::setBottom(int)
+ ?setBottomMargin@QDeclarativeAnchors@@QAEXM@Z @ 2328 NONAME ; void QDeclarativeAnchors::setBottomMargin(float)
+ ?setCacheBuffer@QDeclarativeGridView@@QAEXH@Z @ 2329 NONAME ; void QDeclarativeGridView::setCacheBuffer(int)
+ ?setCacheBuffer@QDeclarativeListView@@QAEXH@Z @ 2330 NONAME ; void QDeclarativeListView::setCacheBuffer(int)
+ ?setCacheFrozen@QDeclarativePaintedItem@@IAEX_N@Z @ 2331 NONAME ; void QDeclarativePaintedItem::setCacheFrozen(bool)
+ ?setCached@QDeclarativeOpenMetaObject@@QAEX_N@Z @ 2332 NONAME ; void QDeclarativeOpenMetaObject::setCached(bool)
+ ?setCellHeight@QDeclarativeGridView@@QAEXH@Z @ 2333 NONAME ; void QDeclarativeGridView::setCellHeight(int)
+ ?setCellWidth@QDeclarativeGridView@@QAEXH@Z @ 2334 NONAME ; void QDeclarativeGridView::setCellWidth(int)
+ ?setCenterIn@QDeclarativeAnchors@@QAEXPAVQDeclarativeItem@@@Z @ 2335 NONAME ; void QDeclarativeAnchors::setCenterIn(class QDeclarativeItem *)
+ ?setClassName@QMetaObjectBuilder@@QAEXABVQByteArray@@@Z @ 2336 NONAME ; void QMetaObjectBuilder::setClassName(class QByteArray const &)
+ ?setClip@QDeclarativeItem@@QAEX_N@Z @ 2337 NONAME ; void QDeclarativeItem::setClip(bool)
+ ?setColor@QDeclarativeGradientStop@@QAEXABVQColor@@@Z @ 2338 NONAME ; void QDeclarativeGradientStop::setColor(class QColor const &)
+ ?setColor@QDeclarativePen@@QAEXABVQColor@@@Z @ 2339 NONAME ; void QDeclarativePen::setColor(class QColor const &)
+ ?setColor@QDeclarativeRectangle@@QAEXABVQColor@@@Z @ 2340 NONAME ; void QDeclarativeRectangle::setColor(class QColor const &)
+ ?setColor@QDeclarativeText@@QAEXABVQColor@@@Z @ 2341 NONAME ; void QDeclarativeText::setColor(class QColor const &)
+ ?setColor@QDeclarativeTextEdit@@QAEXABVQColor@@@Z @ 2342 NONAME ; void QDeclarativeTextEdit::setColor(class QColor const &)
+ ?setColor@QDeclarativeTextInput@@QAEXABVQColor@@@Z @ 2343 NONAME ; void QDeclarativeTextInput::setColor(class QColor const &)
+ ?setColorGroup@QDeclarativeSystemPalette@@QAEXW4ColorGroup@1@@Z @ 2344 NONAME ; void QDeclarativeSystemPalette::setColorGroup(enum QDeclarativeSystemPalette::ColorGroup)
+ ?setColumn@QDeclarativeError@@QAEXH@Z @ 2345 NONAME ; void QDeclarativeError::setColumn(int)
+ ?setColumnNumber@QDeclarativeDebugFileReference@@QAEXH@Z @ 2346 NONAME ; void QDeclarativeDebugFileReference::setColumnNumber(int)
+ ?setColumns@QDeclarativeGrid@@QAEXH@Z @ 2347 NONAME ; void QDeclarativeGrid::setColumns(int)
+ ?setConsistentTime@QDeclarativeItemPrivate@@SAXH@Z @ 2348 NONAME ; void QDeclarativeItemPrivate::setConsistentTime(int)
+ ?setContent@QDeclarativeWebView@@QAEXABVQByteArray@@ABVQString@@ABVQUrl@@@Z @ 2349 NONAME ; void QDeclarativeWebView::setContent(class QByteArray const &, class QString const &, class QUrl const &)
+ ?setContentHeight@QDeclarativeFlickable@@QAEXM@Z @ 2350 NONAME ; void QDeclarativeFlickable::setContentHeight(float)
+ ?setContentWidth@QDeclarativeFlickable@@QAEXM@Z @ 2351 NONAME ; void QDeclarativeFlickable::setContentWidth(float)
+ ?setContentX@QDeclarativeFlickable@@QAEXM@Z @ 2352 NONAME ; void QDeclarativeFlickable::setContentX(float)
+ ?setContentY@QDeclarativeFlickable@@QAEXM@Z @ 2353 NONAME ; void QDeclarativeFlickable::setContentY(float)
+ ?setContentsScale@QDeclarativePaintedItem@@QAEXM@Z @ 2354 NONAME ; void QDeclarativePaintedItem::setContentsScale(float)
+ ?setContentsSize@QDeclarativePaintedItem@@QAEXABVQSize@@@Z @ 2355 NONAME ; void QDeclarativePaintedItem::setContentsSize(class QSize const &)
+ ?setContext@QDeclarativeScriptString@@QAEXPAVQDeclarativeContext@@@Z @ 2356 NONAME ; void QDeclarativeScriptString::setContext(class QDeclarativeContext *)
+ ?setContextForObject@QDeclarativeEngine@@SAXPAVQObject@@PAVQDeclarativeContext@@@Z @ 2357 NONAME ; void QDeclarativeEngine::setContextForObject(class QObject *, class QDeclarativeContext *)
+ ?setContextProperty@QDeclarativeContext@@QAEXABVQString@@ABVQVariant@@@Z @ 2358 NONAME ; void QDeclarativeContext::setContextProperty(class QString const &, class QVariant const &)
+ ?setContextProperty@QDeclarativeContext@@QAEXABVQString@@PAVQObject@@@Z @ 2359 NONAME ; void QDeclarativeContext::setContextProperty(class QString const &, class QObject *)
+ ?setControl1X@QDeclarativePathCubic@@QAEXM@Z @ 2360 NONAME ; void QDeclarativePathCubic::setControl1X(float)
+ ?setControl1Y@QDeclarativePathCubic@@QAEXM@Z @ 2361 NONAME ; void QDeclarativePathCubic::setControl1Y(float)
+ ?setControl2X@QDeclarativePathCubic@@QAEXM@Z @ 2362 NONAME ; void QDeclarativePathCubic::setControl2X(float)
+ ?setControl2Y@QDeclarativePathCubic@@QAEXM@Z @ 2363 NONAME ; void QDeclarativePathCubic::setControl2Y(float)
+ ?setControlX@QDeclarativePathQuad@@QAEXM@Z @ 2364 NONAME ; void QDeclarativePathQuad::setControlX(float)
+ ?setControlY@QDeclarativePathQuad@@QAEXM@Z @ 2365 NONAME ; void QDeclarativePathQuad::setControlY(float)
+ ?setCount@QDeclarativeParticles@@QAEXH@Z @ 2366 NONAME ; void QDeclarativeParticles::setCount(int)
+ ?setCreationContext@QDeclarativeComponent@@QAEXPAVQDeclarativeContext@@@Z @ 2367 NONAME ; void QDeclarativeComponent::setCreationContext(class QDeclarativeContext *)
+ ?setCriteria@QDeclarativeViewSection@@QAEXW4SectionCriteria@1@@Z @ 2368 NONAME ; void QDeclarativeViewSection::setCriteria(enum QDeclarativeViewSection::SectionCriteria)
+ ?setCurrentFrame@QDeclarativeAnimatedImage@@QAEXH@Z @ 2369 NONAME ; void QDeclarativeAnimatedImage::setCurrentFrame(int)
+ ?setCurrentIndex@QDeclarativeGridView@@QAEXH@Z @ 2370 NONAME ; void QDeclarativeGridView::setCurrentIndex(int)
+ ?setCurrentIndex@QDeclarativeListView@@QAEXH@Z @ 2371 NONAME ; void QDeclarativeListView::setCurrentIndex(int)
+ ?setCurrentIndex@QDeclarativePathView@@QAEXH@Z @ 2372 NONAME ; void QDeclarativePathView::setCurrentIndex(int)
+ ?setCursorDelegate@QDeclarativeTextEdit@@QAEXPAVQDeclarativeComponent@@@Z @ 2373 NONAME ; void QDeclarativeTextEdit::setCursorDelegate(class QDeclarativeComponent *)
+ ?setCursorDelegate@QDeclarativeTextInput@@QAEXPAVQDeclarativeComponent@@@Z @ 2374 NONAME ; void QDeclarativeTextInput::setCursorDelegate(class QDeclarativeComponent *)
+ ?setCursorPosition@QDeclarativeTextEdit@@QAEXH@Z @ 2375 NONAME ; void QDeclarativeTextEdit::setCursorPosition(int)
+ ?setCursorPosition@QDeclarativeTextInput@@QAEXH@Z @ 2376 NONAME ; void QDeclarativeTextInput::setCursorPosition(int)
+ ?setCursorVisible@QDeclarativeTextEdit@@QAEX_N@Z @ 2377 NONAME ; void QDeclarativeTextEdit::setCursorVisible(bool)
+ ?setCursorVisible@QDeclarativeTextInput@@QAEX_N@Z @ 2378 NONAME ; void QDeclarativeTextInput::setCursorVisible(bool)
+ ?setDamping@QDeclarativeSpringFollow@@QAEXM@Z @ 2379 NONAME ; void QDeclarativeSpringFollow::setDamping(float)
+ ?setData@QDeclarativeComponent@@QAEXABVQByteArray@@ABVQUrl@@@Z @ 2380 NONAME ; void QDeclarativeComponent::setData(class QByteArray const &, class QUrl const &)
+ ?setData@QListModelInterface@@UAE_NHABV?$QHash@HVQVariant@@@@@Z @ 2381 NONAME ; bool QListModelInterface::setData(int, class QHash<int, class QVariant> const &)
+ ?setDate@QDeclarativeDateTimeFormatter@@QAEXABVQDate@@@Z @ 2382 NONAME ; void QDeclarativeDateTimeFormatter::setDate(class QDate const &)
+ ?setDateFormat@QDeclarativeDateTimeFormatter@@QAEXABVQString@@@Z @ 2383 NONAME ; void QDeclarativeDateTimeFormatter::setDateFormat(class QString const &)
+ ?setDateTime@QDeclarativeDateTimeFormatter@@QAEXABVQDateTime@@@Z @ 2384 NONAME ; void QDeclarativeDateTimeFormatter::setDateTime(class QDateTime const &)
+ ?setDateTimeFormat@QDeclarativeDateTimeFormatter@@QAEXABVQString@@@Z @ 2385 NONAME ; void QDeclarativeDateTimeFormatter::setDateTimeFormat(class QString const &)
+ ?setDelegate@QDeclarativeGridView@@QAEXPAVQDeclarativeComponent@@@Z @ 2386 NONAME ; void QDeclarativeGridView::setDelegate(class QDeclarativeComponent *)
+ ?setDelegate@QDeclarativeListView@@QAEXPAVQDeclarativeComponent@@@Z @ 2387 NONAME ; void QDeclarativeListView::setDelegate(class QDeclarativeComponent *)
+ ?setDelegate@QDeclarativePathView@@QAEXPAVQDeclarativeComponent@@@Z @ 2388 NONAME ; void QDeclarativePathView::setDelegate(class QDeclarativeComponent *)
+ ?setDelegate@QDeclarativeRepeater@@QAEXPAVQDeclarativeComponent@@@Z @ 2389 NONAME ; void QDeclarativeRepeater::setDelegate(class QDeclarativeComponent *)
+ ?setDelegate@QDeclarativeViewSection@@QAEXPAVQDeclarativeComponent@@@Z @ 2390 NONAME ; void QDeclarativeViewSection::setDelegate(class QDeclarativeComponent *)
+ ?setDelegate@QDeclarativeVisualDataModel@@QAEXPAVQDeclarativeComponent@@@Z @ 2391 NONAME ; void QDeclarativeVisualDataModel::setDelegate(class QDeclarativeComponent *)
+ ?setDescription@QDeclarativeError@@QAEXABVQString@@@Z @ 2392 NONAME ; void QDeclarativeError::setDescription(class QString const &)
+ ?setDesignable@QMetaPropertyBuilder@@QAEX_N@Z @ 2393 NONAME ; void QMetaPropertyBuilder::setDesignable(bool)
+ ?setDragMargin@QDeclarativePathView@@QAEXM@Z @ 2394 NONAME ; void QDeclarativePathView::setDragMargin(float)
+ ?setDuration@QDeclarativeEaseFollow@@QAEXM@Z @ 2395 NONAME ; void QDeclarativeEaseFollow::setDuration(float)
+ ?setDynamic@QMetaPropertyBuilder@@QAEX_N@Z @ 2396 NONAME ; void QMetaPropertyBuilder::setDynamic(bool)
+ ?setEchoMode@QDeclarativeTextInput@@QAEXW4EchoMode@1@@Z @ 2397 NONAME ; void QDeclarativeTextInput::setEchoMode(enum QDeclarativeTextInput::EchoMode)
+ ?setEditable@QMetaPropertyBuilder@@QAEX_N@Z @ 2398 NONAME ; void QMetaPropertyBuilder::setEditable(bool)
+ ?setElideMode@QDeclarativeText@@QAEXW4TextElideMode@1@@Z @ 2399 NONAME ; void QDeclarativeText::setElideMode(enum QDeclarativeText::TextElideMode)
+ ?setEmissionRate@QDeclarativeParticles@@QAEXH@Z @ 2400 NONAME ; void QDeclarativeParticles::setEmissionRate(int)
+ ?setEmissionVariance@QDeclarativeParticles@@QAEXM@Z @ 2401 NONAME ; void QDeclarativeParticles::setEmissionVariance(float)
+ ?setEnabled@QDeclarativeBehavior@@QAEX_N@Z @ 2402 NONAME ; void QDeclarativeBehavior::setEnabled(bool)
+ ?setEnabled@QDeclarativeDebugClient@@QAEX_N@Z @ 2403 NONAME ; void QDeclarativeDebugClient::setEnabled(bool)
+ ?setEnabled@QDeclarativeEaseFollow@@QAEX_N@Z @ 2404 NONAME ; void QDeclarativeEaseFollow::setEnabled(bool)
+ ?setEnabled@QDeclarativeMouseArea@@QAEX_N@Z @ 2405 NONAME ; void QDeclarativeMouseArea::setEnabled(bool)
+ ?setEnabled@QDeclarativeSpringFollow@@QAEX_N@Z @ 2406 NONAME ; void QDeclarativeSpringFollow::setEnabled(bool)
+ ?setEnumOrFlag@QMetaPropertyBuilder@@QAEX_N@Z @ 2407 NONAME ; void QMetaPropertyBuilder::setEnumOrFlag(bool)
+ ?setEpsilon@QDeclarativeSpringFollow@@QAEXM@Z @ 2408 NONAME ; void QDeclarativeSpringFollow::setEpsilon(float)
+ ?setExpression@QDeclarativeExpression@@QAEXABVQString@@@Z @ 2409 NONAME ; void QDeclarativeExpression::setExpression(class QString const &)
+ ?setExtends@QDeclarativeState@@QAEXABVQString@@@Z @ 2410 NONAME ; void QDeclarativeState::setExtends(class QString const &)
+ ?setFadeInDuration@QDeclarativeParticles@@QAEXH@Z @ 2411 NONAME ; void QDeclarativeParticles::setFadeInDuration(int)
+ ?setFadeOutDuration@QDeclarativeParticles@@QAEXH@Z @ 2412 NONAME ; void QDeclarativeParticles::setFadeOutDuration(int)
+ ?setFill@QDeclarativeAnchors@@QAEXPAVQDeclarativeItem@@@Z @ 2413 NONAME ; void QDeclarativeAnchors::setFill(class QDeclarativeItem *)
+ ?setFillColor@QDeclarativePaintedItem@@QAEXABVQColor@@@Z @ 2414 NONAME ; void QDeclarativePaintedItem::setFillColor(class QColor const &)
+ ?setFillMode@QDeclarativeImage@@QAEXW4FillMode@1@@Z @ 2415 NONAME ; void QDeclarativeImage::setFillMode(enum QDeclarativeImage::FillMode)
+ ?setFlags@QMetaObjectBuilder@@QAEXV?$QFlags@W4MetaObjectFlag@QMetaObjectBuilder@@@@@Z @ 2416 NONAME ; void QMetaObjectBuilder::setFlags(class QFlags<enum QMetaObjectBuilder::MetaObjectFlag>)
+ ?setFlickDeceleration@QDeclarativeFlickable@@QAEXM@Z @ 2417 NONAME ; void QDeclarativeFlickable::setFlickDeceleration(float)
+ ?setFlickDirection@QDeclarativeFlickable@@QAEXW4FlickDirection@1@@Z @ 2418 NONAME ; void QDeclarativeFlickable::setFlickDirection(enum QDeclarativeFlickable::FlickDirection)
+ ?setFlow@QDeclarativeFlow@@QAEXW4Flow@1@@Z @ 2419 NONAME ; void QDeclarativeFlow::setFlow(enum QDeclarativeFlow::Flow)
+ ?setFlow@QDeclarativeGridView@@QAEXW4Flow@1@@Z @ 2420 NONAME ; void QDeclarativeGridView::setFlow(enum QDeclarativeGridView::Flow)
+ ?setFocus@QDeclarativeItem@@QAEX_N@Z @ 2421 NONAME ; void QDeclarativeItem::setFocus(bool)
+ ?setFocusOnPress@QDeclarativeTextEdit@@QAEX_N@Z @ 2422 NONAME ; void QDeclarativeTextEdit::setFocusOnPress(bool)
+ ?setFocusOnPress@QDeclarativeTextInput@@QAEX_N@Z @ 2423 NONAME ; void QDeclarativeTextInput::setFocusOnPress(bool)
+ ?setFont@QDeclarativeText@@QAEXABVQFont@@@Z @ 2424 NONAME ; void QDeclarativeText::setFont(class QFont const &)
+ ?setFont@QDeclarativeTextEdit@@QAEXABVQFont@@@Z @ 2425 NONAME ; void QDeclarativeTextEdit::setFont(class QFont const &)
+ ?setFont@QDeclarativeTextInput@@QAEXABVQFont@@@Z @ 2426 NONAME ; void QDeclarativeTextInput::setFont(class QFont const &)
+ ?setFooter@QDeclarativeListView@@QAEXPAVQDeclarativeComponent@@@Z @ 2427 NONAME ; void QDeclarativeListView::setFooter(class QDeclarativeComponent *)
+ ?setFormat@QDeclarativeNumberFormatter@@QAEXABVQString@@@Z @ 2428 NONAME ; void QDeclarativeNumberFormatter::setFormat(class QString const &)
+ ?setFromState@QDeclarativeTransition@@QAEXABVQString@@@Z @ 2429 NONAME ; void QDeclarativeTransition::setFromState(class QString const &)
+ ?setFront@QDeclarativeFlipable@@QAEXPAVQDeclarativeItem@@@Z @ 2430 NONAME ; void QDeclarativeFlipable::setFront(class QDeclarativeItem *)
+ ?setGradient@QDeclarativeRectangle@@QAEXPAVQDeclarativeGradient@@@Z @ 2431 NONAME ; void QDeclarativeRectangle::setGradient(class QDeclarativeGradient *)
+ ?setGraphicsObject@QDeclarativeGraphicsObjectContainer@@QAEXPAVQGraphicsObject@@@Z @ 2432 NONAME ; void QDeclarativeGraphicsObjectContainer::setGraphicsObject(class QGraphicsObject *)
+ ?setGridScaledImage@QDeclarativeBorderImage@@AAEXABVQDeclarativeGridScaledImage@@@Z @ 2433 NONAME ; void QDeclarativeBorderImage::setGridScaledImage(class QDeclarativeGridScaledImage const &)
+ ?setHAlign@QDeclarativeText@@QAEXW4HAlignment@1@@Z @ 2434 NONAME ; void QDeclarativeText::setHAlign(enum QDeclarativeText::HAlignment)
+ ?setHAlign@QDeclarativeTextEdit@@QAEXW4HAlignment@1@@Z @ 2435 NONAME ; void QDeclarativeTextEdit::setHAlign(enum QDeclarativeTextEdit::HAlignment)
+ ?setHAlign@QDeclarativeTextInput@@QAEXW4HAlignment@1@@Z @ 2436 NONAME ; void QDeclarativeTextInput::setHAlign(enum QDeclarativeTextInput::HAlignment)
+ ?setHeader@QDeclarativeListView@@QAEXPAVQDeclarativeComponent@@@Z @ 2437 NONAME ; void QDeclarativeListView::setHeader(class QDeclarativeComponent *)
+ ?setHeight@QDeclarativeItem@@QAEXM@Z @ 2438 NONAME ; void QDeclarativeItem::setHeight(float)
+ ?setHeight@QDeclarativeParentChange@@QAEXM@Z @ 2439 NONAME ; void QDeclarativeParentChange::setHeight(float)
+ ?setHighlight@QDeclarativeGridView@@QAEXPAVQDeclarativeComponent@@@Z @ 2440 NONAME ; void QDeclarativeGridView::setHighlight(class QDeclarativeComponent *)
+ ?setHighlight@QDeclarativeListView@@QAEXPAVQDeclarativeComponent@@@Z @ 2441 NONAME ; void QDeclarativeListView::setHighlight(class QDeclarativeComponent *)
+ ?setHighlightFollowsCurrentItem@QDeclarativeGridView@@QAEX_N@Z @ 2442 NONAME ; void QDeclarativeGridView::setHighlightFollowsCurrentItem(bool)
+ ?setHighlightFollowsCurrentItem@QDeclarativeListView@@QAEX_N@Z @ 2443 NONAME ; void QDeclarativeListView::setHighlightFollowsCurrentItem(bool)
+ ?setHighlightMoveSpeed@QDeclarativeListView@@QAEXM@Z @ 2444 NONAME ; void QDeclarativeListView::setHighlightMoveSpeed(float)
+ ?setHighlightRangeMode@QDeclarativeListView@@QAEXW4HighlightRangeMode@1@@Z @ 2445 NONAME ; void QDeclarativeListView::setHighlightRangeMode(enum QDeclarativeListView::HighlightRangeMode)
+ ?setHighlightResizeSpeed@QDeclarativeListView@@QAEXM@Z @ 2446 NONAME ; void QDeclarativeListView::setHighlightResizeSpeed(float)
+ ?setHorizontalCenter@QDeclarativeAnchorChanges@@QAEXABVQDeclarativeAnchorLine@@@Z @ 2447 NONAME ; void QDeclarativeAnchorChanges::setHorizontalCenter(class QDeclarativeAnchorLine const &)
+ ?setHorizontalCenter@QDeclarativeAnchors@@QAEXABVQDeclarativeAnchorLine@@@Z @ 2448 NONAME ; void QDeclarativeAnchors::setHorizontalCenter(class QDeclarativeAnchorLine const &)
+ ?setHorizontalCenterOffset@QDeclarativeAnchors@@QAEXM@Z @ 2449 NONAME ; void QDeclarativeAnchors::setHorizontalCenterOffset(float)
+ ?setHorizontalTileMode@QDeclarativeBorderImage@@QAEXW4TileMode@1@@Z @ 2450 NONAME ; void QDeclarativeBorderImage::setHorizontalTileMode(enum QDeclarativeBorderImage::TileMode)
+ ?setHovered@QDeclarativeMouseArea@@IAEX_N@Z @ 2451 NONAME ; void QDeclarativeMouseArea::setHovered(bool)
+ ?setHtml@QDeclarativeWebView@@QAEXABVQString@@ABVQUrl@@@Z @ 2452 NONAME ; void QDeclarativeWebView::setHtml(class QString const &, class QUrl const &)
+ ?setIdProperty@QDeclarativeContextPrivate@@QAEXHPAVQObject@@@Z @ 2453 NONAME ; void QDeclarativeContextPrivate::setIdProperty(int, class QObject *)
+ ?setIdPropertyData@QDeclarativeContextPrivate@@QAEXPAVQDeclarativeIntegerCache@@@Z @ 2454 NONAME ; void QDeclarativeContextPrivate::setIdPropertyData(class QDeclarativeIntegerCache *)
+ ?setImplicitHeight@QDeclarativeItem@@IAEXM@Z @ 2455 NONAME ; void QDeclarativeItem::setImplicitHeight(float)
+ ?setImplicitWidth@QDeclarativeItem@@IAEXM@Z @ 2456 NONAME ; void QDeclarativeItem::setImplicitWidth(float)
+ ?setInputMask@QDeclarativeTextInput@@QAEXABVQString@@@Z @ 2457 NONAME ; void QDeclarativeTextInput::setInputMask(class QString const &)
+ ?setInteractive@QDeclarativeFlickable@@QAEX_N@Z @ 2458 NONAME ; void QDeclarativeFlickable::setInteractive(bool)
+ ?setInterval@QDeclarativeTimer@@QAEXH@Z @ 2459 NONAME ; void QDeclarativeTimer::setInterval(int)
+ ?setIsExplicit@QDeclarativePropertyChanges@@QAEX_N@Z @ 2460 NONAME ; void QDeclarativePropertyChanges::setIsExplicit(bool)
+ ?setIsFlag@QMetaEnumBuilder@@QAEX_N@Z @ 2461 NONAME ; void QMetaEnumBuilder::setIsFlag(bool)
+ ?setIsKey@QDeclarativeXmlListModelRole@@QAEX_N@Z @ 2462 NONAME ; void QDeclarativeXmlListModelRole::setIsKey(bool)
+ ?setKeepMouseGrab@QDeclarativeItem@@QAEX_N@Z @ 2463 NONAME ; void QDeclarativeItem::setKeepMouseGrab(bool)
+ ?setLeft@QDeclarativeAnchorChanges@@QAEXABVQDeclarativeAnchorLine@@@Z @ 2464 NONAME ; void QDeclarativeAnchorChanges::setLeft(class QDeclarativeAnchorLine const &)
+ ?setLeft@QDeclarativeAnchors@@QAEXABVQDeclarativeAnchorLine@@@Z @ 2465 NONAME ; void QDeclarativeAnchors::setLeft(class QDeclarativeAnchorLine const &)
+ ?setLeft@QDeclarativeScaleGrid@@QAEXH@Z @ 2466 NONAME ; void QDeclarativeScaleGrid::setLeft(int)
+ ?setLeftMargin@QDeclarativeAnchors@@QAEXM@Z @ 2467 NONAME ; void QDeclarativeAnchors::setLeftMargin(float)
+ ?setLifeSpan@QDeclarativeParticles@@QAEXH@Z @ 2468 NONAME ; void QDeclarativeParticles::setLifeSpan(int)
+ ?setLifeSpanDeviation@QDeclarativeParticles@@QAEXH@Z @ 2469 NONAME ; void QDeclarativeParticles::setLifeSpanDeviation(int)
+ ?setLine@QDeclarativeError@@QAEXH@Z @ 2470 NONAME ; void QDeclarativeError::setLine(int)
+ ?setLineNumber@QDeclarativeDebugFileReference@@QAEXH@Z @ 2471 NONAME ; void QDeclarativeDebugFileReference::setLineNumber(int)
+ ?setList@QDeclarativeListAccessor@@QAEXABVQVariant@@PAVQDeclarativeEngine@@@Z @ 2472 NONAME ; void QDeclarativeListAccessor::setList(class QVariant const &, class QDeclarativeEngine *)
+ ?setLoading@QDeclarativePixmapReply@@AAEXXZ @ 2473 NONAME ; void QDeclarativePixmapReply::setLoading(void)
+ ?setLongStyle@QDeclarativeDateTimeFormatter@@QAEX_N@Z @ 2474 NONAME ; void QDeclarativeDateTimeFormatter::setLongStyle(bool)
+ ?setMargins@QDeclarativeAnchors@@QAEXM@Z @ 2475 NONAME ; void QDeclarativeAnchors::setMargins(float)
+ ?setMass@QDeclarativeSpringFollow@@QAEXM@Z @ 2476 NONAME ; void QDeclarativeSpringFollow::setMass(float)
+ ?setMaxLength@QDeclarativeTextInput@@QAEXH@Z @ 2477 NONAME ; void QDeclarativeTextInput::setMaxLength(int)
+ ?setMaximumEasingTime@QDeclarativeEaseFollow@@QAEXM@Z @ 2478 NONAME ; void QDeclarativeEaseFollow::setMaximumEasingTime(float)
+ ?setMaximumFlickVelocity@QDeclarativeFlickable@@QAEXM@Z @ 2479 NONAME ; void QDeclarativeFlickable::setMaximumFlickVelocity(float)
+ ?setMaximumPacketSize@QPacketProtocol@@QAEHH@Z @ 2480 NONAME ; int QPacketProtocol::setMaximumPacketSize(int)
+ ?setModel@QDeclarativeGridView@@QAEXABVQVariant@@@Z @ 2481 NONAME ; void QDeclarativeGridView::setModel(class QVariant const &)
+ ?setModel@QDeclarativeListView@@QAEXABVQVariant@@@Z @ 2482 NONAME ; void QDeclarativeListView::setModel(class QVariant const &)
+ ?setModel@QDeclarativePathView@@QAEXABVQVariant@@@Z @ 2483 NONAME ; void QDeclarativePathView::setModel(class QVariant const &)
+ ?setModel@QDeclarativeRepeater@@QAEXABVQVariant@@@Z @ 2484 NONAME ; void QDeclarativeRepeater::setModel(class QVariant const &)
+ ?setModel@QDeclarativeVisualDataModel@@QAEXABVQVariant@@@Z @ 2485 NONAME ; void QDeclarativeVisualDataModel::setModel(class QVariant const &)
+ ?setModulus@QDeclarativeSpringFollow@@QAEXM@Z @ 2486 NONAME ; void QDeclarativeSpringFollow::setModulus(float)
+ ?setMotion@QDeclarativeParticles@@QAEXPAVQDeclarativeParticleMotion@@@Z @ 2487 NONAME ; void QDeclarativeParticles::setMotion(class QDeclarativeParticleMotion *)
+ ?setMove@QDeclarativeBasePositioner@@QAEXPAVQDeclarativeTransition@@@Z @ 2488 NONAME ; void QDeclarativeBasePositioner::setMove(class QDeclarativeTransition *)
+ ?setName@QDeclarativeFontLoader@@QAEXABVQString@@@Z @ 2489 NONAME ; void QDeclarativeFontLoader::setName(class QString const &)
+ ?setName@QDeclarativePathAttribute@@QAEXABVQString@@@Z @ 2490 NONAME ; void QDeclarativePathAttribute::setName(class QString const &)
+ ?setName@QDeclarativeState@@QAEXABVQString@@@Z @ 2491 NONAME ; void QDeclarativeState::setName(class QString const &)
+ ?setName@QDeclarativeStateChangeScript@@QAEXABVQString@@@Z @ 2492 NONAME ; void QDeclarativeStateChangeScript::setName(class QString const &)
+ ?setName@QDeclarativeXmlListModelRole@@QAEXABVQString@@@Z @ 2493 NONAME ; void QDeclarativeXmlListModelRole::setName(class QString const &)
+ ?setNamespaceDeclarations@QDeclarativeXmlListModel@@QAEXABVQString@@@Z @ 2494 NONAME ; void QDeclarativeXmlListModel::setNamespaceDeclarations(class QString const &)
+ ?setNetworkAccessManagerFactory@QDeclarativeEngine@@QAEXPAVQDeclarativeNetworkAccessManagerFactory@@@Z @ 2495 NONAME ; void QDeclarativeEngine::setNetworkAccessManagerFactory(class QDeclarativeNetworkAccessManagerFactory *)
+ ?setNewWindowComponent@QDeclarativeWebView@@QAEXPAVQDeclarativeComponent@@@Z @ 2496 NONAME ; void QDeclarativeWebView::setNewWindowComponent(class QDeclarativeComponent *)
+ ?setNewWindowParent@QDeclarativeWebView@@QAEXPAVQDeclarativeItem@@@Z @ 2497 NONAME ; void QDeclarativeWebView::setNewWindowParent(class QDeclarativeItem *)
+ ?setNotifyOnValueChanged@QDeclarativeExpression@@QAEX_N@Z @ 2498 NONAME ; void QDeclarativeExpression::setNotifyOnValueChanged(bool)
+ ?setNotifySignal@QMetaPropertyBuilder@@QAEXABVQMetaMethodBuilder@@@Z @ 2499 NONAME ; void QMetaPropertyBuilder::setNotifySignal(class QMetaMethodBuilder const &)
+ ?setNumber@QDeclarativeNumberFormatter@@QAEXABM@Z @ 2500 NONAME ; void QDeclarativeNumberFormatter::setNumber(float const &)
+ ?setObject@QDeclarativeAnchorChanges@@QAEXPAVQDeclarativeItem@@@Z @ 2501 NONAME ; void QDeclarativeAnchorChanges::setObject(class QDeclarativeItem *)
+ ?setObject@QDeclarativeBind@@QAEXPAVQObject@@@Z @ 2502 NONAME ; void QDeclarativeBind::setObject(class QObject *)
+ ?setObject@QDeclarativeParentChange@@QAEXPAVQDeclarativeItem@@@Z @ 2503 NONAME ; void QDeclarativeParentChange::setObject(class QDeclarativeItem *)
+ ?setObject@QDeclarativePropertyChanges@@QAEXPAVQObject@@@Z @ 2504 NONAME ; void QDeclarativePropertyChanges::setObject(class QObject *)
+ ?setOfflineStoragePath@QDeclarativeEngine@@QAEXABVQString@@@Z @ 2505 NONAME ; void QDeclarativeEngine::setOfflineStoragePath(class QString const &)
+ ?setOffset@QDeclarativePathView@@QAEXM@Z @ 2506 NONAME ; void QDeclarativePathView::setOffset(float)
+ ?setOrientation@QDeclarativeListView@@QAEXW4Orientation@1@@Z @ 2507 NONAME ; void QDeclarativeListView::setOrientation(enum QDeclarativeListView::Orientation)
+ ?setOverShoot@QDeclarativeFlickable@@QAEX_N@Z @ 2508 NONAME ; void QDeclarativeFlickable::setOverShoot(bool)
+ ?setPace@QDeclarativeParticleMotionWander@@QAEXM@Z @ 2509 NONAME ; void QDeclarativeParticleMotionWander::setPace(float)
+ ?setPage@QDeclarativeWebView@@QAEXPAVQWebPage@@@Z @ 2510 NONAME ; void QDeclarativeWebView::setPage(class QWebPage *)
+ ?setParameterNames@QMetaMethodBuilder@@QAEXABV?$QList@VQByteArray@@@@@Z @ 2511 NONAME ; void QMetaMethodBuilder::setParameterNames(class QList<class QByteArray> const &)
+ ?setParent@QDeclarativeItem@@QAEXPAV1@@Z @ 2512 NONAME ; void QDeclarativeItem::setParent(class QDeclarativeItem *)
+ ?setParent@QDeclarativeParentChange@@QAEXPAVQDeclarativeItem@@@Z @ 2513 NONAME ; void QDeclarativeParentChange::setParent(class QDeclarativeItem *)
+ ?setParentItem@QDeclarativeItem@@QAEXPAV1@@Z @ 2514 NONAME ; void QDeclarativeItem::setParentItem(class QDeclarativeItem *)
+ ?setPart@QDeclarativeVisualDataModel@@QAEXABVQString@@@Z @ 2515 NONAME ; void QDeclarativeVisualDataModel::setPart(class QString const &)
+ ?setPath@QDeclarativePathView@@QAEXPAVQDeclarativePath@@@Z @ 2516 NONAME ; void QDeclarativePathView::setPath(class QDeclarativePath *)
+ ?setPathItemCount@QDeclarativePathView@@QAEXH@Z @ 2517 NONAME ; void QDeclarativePathView::setPathItemCount(int)
+ ?setPaused@QDeclarativeAnimatedImage@@QAEX_N@Z @ 2518 NONAME ; void QDeclarativeAnimatedImage::setPaused(bool)
+ ?setPersistentSelection@QDeclarativeTextEdit@@QAEX_N@Z @ 2519 NONAME ; void QDeclarativeTextEdit::setPersistentSelection(bool)
+ ?setPixelCacheSize@QDeclarativePaintedItem@@QAEXH@Z @ 2520 NONAME ; void QDeclarativePaintedItem::setPixelCacheSize(int)
+ ?setPixmap@QDeclarativeImage@@QAEXABVQPixmap@@@Z @ 2521 NONAME ; void QDeclarativeImage::setPixmap(class QPixmap const &)
+ ?setPlaying@QDeclarativeAnimatedImage@@QAEX_N@Z @ 2522 NONAME ; void QDeclarativeAnimatedImage::setPlaying(bool)
+ ?setPosition@QDeclarativeGradientStop@@QAEXM@Z @ 2523 NONAME ; void QDeclarativeGradientStop::setPosition(float)
+ ?setPreferredHeight@QDeclarativeWebView@@QAEXH@Z @ 2524 NONAME ; void QDeclarativeWebView::setPreferredHeight(int)
+ ?setPreferredHighlightBegin@QDeclarativeListView@@QAEXM@Z @ 2525 NONAME ; void QDeclarativeListView::setPreferredHighlightBegin(float)
+ ?setPreferredHighlightEnd@QDeclarativeListView@@QAEXM@Z @ 2526 NONAME ; void QDeclarativeListView::setPreferredHighlightEnd(float)
+ ?setPreferredWidth@QDeclarativeWebView@@QAEXH@Z @ 2527 NONAME ; void QDeclarativeWebView::setPreferredWidth(int)
+ ?setPressDelay@QDeclarativeFlickable@@QAEXH@Z @ 2528 NONAME ; void QDeclarativeFlickable::setPressDelay(int)
+ ?setPressGrabTime@QDeclarativeWebView@@QAEXH@Z @ 2529 NONAME ; void QDeclarativeWebView::setPressGrabTime(int)
+ ?setPressed@QDeclarativeMouseArea@@IAE_N_N@Z @ 2530 NONAME ; bool QDeclarativeMouseArea::setPressed(bool)
+ ?setProperty@QDeclarativeBind@@QAEXABVQString@@@Z @ 2531 NONAME ; void QDeclarativeBind::setProperty(class QString const &)
+ ?setProperty@QDeclarativeListModel@@QAEXHABVQString@@ABVQVariant@@@Z @ 2532 NONAME ; void QDeclarativeListModel::setProperty(int, class QString const &, class QVariant const &)
+ ?setProperty@QDeclarativeViewSection@@QAEXABVQString@@@Z @ 2533 NONAME ; void QDeclarativeViewSection::setProperty(class QString const &)
+ ?setQuery@QDeclarativeXmlListModel@@QAEXABVQString@@@Z @ 2534 NONAME ; void QDeclarativeXmlListModel::setQuery(class QString const &)
+ ?setQuery@QDeclarativeXmlListModelRole@@QAEXABVQString@@@Z @ 2535 NONAME ; void QDeclarativeXmlListModelRole::setQuery(class QString const &)
+ ?setRadius@QDeclarativeRectangle@@QAEXM@Z @ 2536 NONAME ; void QDeclarativeRectangle::setRadius(float)
+ ?setReadOnly@QDeclarativeTextEdit@@QAEX_N@Z @ 2537 NONAME ; void QDeclarativeTextEdit::setReadOnly(bool)
+ ?setReadOnly@QDeclarativeTextInput@@QAEX_N@Z @ 2538 NONAME ; void QDeclarativeTextInput::setReadOnly(bool)
+ ?setReadable@QMetaPropertyBuilder@@QAEX_N@Z @ 2539 NONAME ; void QMetaPropertyBuilder::setReadable(bool)
+ ?setRenderingEnabled@QDeclarativeWebView@@QAEX_N@Z @ 2540 NONAME ; void QDeclarativeWebView::setRenderingEnabled(bool)
+ ?setRepeating@QDeclarativeTimer@@QAEX_N@Z @ 2541 NONAME ; void QDeclarativeTimer::setRepeating(bool)
+ ?setReset@QDeclarativeAnchorChanges@@QAEXABVQString@@@Z @ 2542 NONAME ; void QDeclarativeAnchorChanges::setReset(class QString const &)
+ ?setResettable@QMetaPropertyBuilder@@QAEX_N@Z @ 2543 NONAME ; void QMetaPropertyBuilder::setResettable(bool)
+ ?setResizeMode@QDeclarativeLoader@@QAEXW4ResizeMode@1@@Z @ 2544 NONAME ; void QDeclarativeLoader::setResizeMode(enum QDeclarativeLoader::ResizeMode)
+ ?setResizeMode@QDeclarativeView@@QAEXW4ResizeMode@1@@Z @ 2545 NONAME ; void QDeclarativeView::setResizeMode(enum QDeclarativeView::ResizeMode)
+ ?setRestoreEntryValues@QDeclarativePropertyChanges@@QAEX_N@Z @ 2546 NONAME ; void QDeclarativePropertyChanges::setRestoreEntryValues(bool)
+ ?setReturnType@QMetaMethodBuilder@@QAEXABVQByteArray@@@Z @ 2547 NONAME ; void QMetaMethodBuilder::setReturnType(class QByteArray const &)
+ ?setReversed@QDeclarativeTransition@@QAEX_N@Z @ 2548 NONAME ; void QDeclarativeTransition::setReversed(bool)
+ ?setReversible@QDeclarativeTransition@@QAEX_N@Z @ 2549 NONAME ; void QDeclarativeTransition::setReversible(bool)
+ ?setReversingMode@QDeclarativeEaseFollow@@QAEXW4ReversingMode@1@@Z @ 2550 NONAME ; void QDeclarativeEaseFollow::setReversingMode(enum QDeclarativeEaseFollow::ReversingMode)
+ ?setRight@QDeclarativeAnchorChanges@@QAEXABVQDeclarativeAnchorLine@@@Z @ 2551 NONAME ; void QDeclarativeAnchorChanges::setRight(class QDeclarativeAnchorLine const &)
+ ?setRight@QDeclarativeAnchors@@QAEXABVQDeclarativeAnchorLine@@@Z @ 2552 NONAME ; void QDeclarativeAnchors::setRight(class QDeclarativeAnchorLine const &)
+ ?setRight@QDeclarativeScaleGrid@@QAEXH@Z @ 2553 NONAME ; void QDeclarativeScaleGrid::setRight(int)
+ ?setRightMargin@QDeclarativeAnchors@@QAEXM@Z @ 2554 NONAME ; void QDeclarativeAnchors::setRightMargin(float)
+ ?setRootIndex@QDeclarativeVisualDataModel@@QAEXABVQModelIndex@@@Z @ 2555 NONAME ; void QDeclarativeVisualDataModel::setRootIndex(class QModelIndex const &)
+ ?setRootObject@QDeclarativeView@@MAEXPAVQObject@@@Z @ 2556 NONAME ; void QDeclarativeView::setRootObject(class QObject *)
+ ?setRotation@QDeclarativeParentChange@@QAEXM@Z @ 2557 NONAME ; void QDeclarativeParentChange::setRotation(float)
+ ?setRows@QDeclarativeGrid@@QAEXH@Z @ 2558 NONAME ; void QDeclarativeGrid::setRows(int)
+ ?setRunning@QDeclarativeTimer@@QAEX_N@Z @ 2559 NONAME ; void QDeclarativeTimer::setRunning(bool)
+ ?setScale@QDeclarativeParentChange@@QAEXM@Z @ 2560 NONAME ; void QDeclarativeParentChange::setScale(float)
+ ?setScopeObject@QDeclarativeScriptString@@QAEXPAVQObject@@@Z @ 2561 NONAME ; void QDeclarativeScriptString::setScopeObject(class QObject *)
+ ?setScript@QDeclarativeScriptString@@QAEXABVQString@@@Z @ 2562 NONAME ; void QDeclarativeScriptString::setScript(class QString const &)
+ ?setScript@QDeclarativeStateChangeScript@@QAEXABVQDeclarativeScriptString@@@Z @ 2563 NONAME ; void QDeclarativeStateChangeScript::setScript(class QDeclarativeScriptString const &)
+ ?setScriptable@QMetaPropertyBuilder@@QAEX_N@Z @ 2564 NONAME ; void QMetaPropertyBuilder::setScriptable(bool)
+ ?setSelectedState@QDeclarativeDebuggerStatus@@UAEX_N@Z @ 2565 NONAME ; void QDeclarativeDebuggerStatus::setSelectedState(bool)
+ ?setSelectedTextColor@QDeclarativeTextEdit@@QAEXABVQColor@@@Z @ 2566 NONAME ; void QDeclarativeTextEdit::setSelectedTextColor(class QColor const &)
+ ?setSelectedTextColor@QDeclarativeTextInput@@QAEXABVQColor@@@Z @ 2567 NONAME ; void QDeclarativeTextInput::setSelectedTextColor(class QColor const &)
+ ?setSelectionColor@QDeclarativeTextEdit@@QAEXABVQColor@@@Z @ 2568 NONAME ; void QDeclarativeTextEdit::setSelectionColor(class QColor const &)
+ ?setSelectionColor@QDeclarativeTextInput@@QAEXABVQColor@@@Z @ 2569 NONAME ; void QDeclarativeTextInput::setSelectionColor(class QColor const &)
+ ?setSelectionEnd@QDeclarativeTextEdit@@QAEXH@Z @ 2570 NONAME ; void QDeclarativeTextEdit::setSelectionEnd(int)
+ ?setSelectionEnd@QDeclarativeTextInput@@QAEXH@Z @ 2571 NONAME ; void QDeclarativeTextInput::setSelectionEnd(int)
+ ?setSelectionStart@QDeclarativeTextEdit@@QAEXH@Z @ 2572 NONAME ; void QDeclarativeTextEdit::setSelectionStart(int)
+ ?setSelectionStart@QDeclarativeTextInput@@QAEXH@Z @ 2573 NONAME ; void QDeclarativeTextInput::setSelectionStart(int)
+ ?setSmooth@QDeclarativeItem@@QAEX_N@Z @ 2574 NONAME ; void QDeclarativeItem::setSmooth(bool)
+ ?setSmoothCache@QDeclarativePaintedItem@@QAEX_N@Z @ 2575 NONAME ; void QDeclarativePaintedItem::setSmoothCache(bool)
+ ?setSnapMode@QDeclarativeListView@@QAEXW4SnapMode@1@@Z @ 2576 NONAME ; void QDeclarativeListView::setSnapMode(enum QDeclarativeListView::SnapMode)
+ ?setSnapPosition@QDeclarativePathView@@QAEXM@Z @ 2577 NONAME ; void QDeclarativePathView::setSnapPosition(float)
+ ?setSource@QDeclarativeAnimatedImage@@UAEXABVQUrl@@@Z @ 2578 NONAME ; void QDeclarativeAnimatedImage::setSource(class QUrl const &)
+ ?setSource@QDeclarativeBorderImage@@UAEXABVQUrl@@@Z @ 2579 NONAME ; void QDeclarativeBorderImage::setSource(class QUrl const &)
+ ?setSource@QDeclarativeFontLoader@@QAEXABVQUrl@@@Z @ 2580 NONAME ; void QDeclarativeFontLoader::setSource(class QUrl const &)
+ ?setSource@QDeclarativeImageBase@@UAEXABVQUrl@@@Z @ 2581 NONAME ; void QDeclarativeImageBase::setSource(class QUrl const &)
+ ?setSource@QDeclarativeLoader@@QAEXABVQUrl@@@Z @ 2582 NONAME ; void QDeclarativeLoader::setSource(class QUrl const &)
+ ?setSource@QDeclarativeParticles@@QAEXABVQUrl@@@Z @ 2583 NONAME ; void QDeclarativeParticles::setSource(class QUrl const &)
+ ?setSource@QDeclarativeView@@QAEXABVQUrl@@@Z @ 2584 NONAME ; void QDeclarativeView::setSource(class QUrl const &)
+ ?setSource@QDeclarativeXmlListModel@@QAEXABVQUrl@@@Z @ 2585 NONAME ; void QDeclarativeXmlListModel::setSource(class QUrl const &)
+ ?setSourceComponent@QDeclarativeLoader@@QAEXPAVQDeclarativeComponent@@@Z @ 2586 NONAME ; void QDeclarativeLoader::setSourceComponent(class QDeclarativeComponent *)
+ ?setSourceLocation@QDeclarativeExpression@@QAEXABVQString@@H@Z @ 2587 NONAME ; void QDeclarativeExpression::setSourceLocation(class QString const &, int)
+ ?setSourceValue@QDeclarativeEaseFollow@@QAEXM@Z @ 2588 NONAME ; void QDeclarativeEaseFollow::setSourceValue(float)
+ ?setSourceValue@QDeclarativeSpringFollow@@QAEXM@Z @ 2589 NONAME ; void QDeclarativeSpringFollow::setSourceValue(float)
+ ?setSpacing@QDeclarativeBasePositioner@@QAEXH@Z @ 2590 NONAME ; void QDeclarativeBasePositioner::setSpacing(int)
+ ?setSpacing@QDeclarativeListView@@QAEXM@Z @ 2591 NONAME ; void QDeclarativeListView::setSpacing(float)
+ ?setSpring@QDeclarativeSpringFollow@@QAEXM@Z @ 2592 NONAME ; void QDeclarativeSpringFollow::setSpring(float)
+ ?setStartX@QDeclarativePath@@QAEXM@Z @ 2593 NONAME ; void QDeclarativePath::setStartX(float)
+ ?setStartY@QDeclarativePath@@QAEXM@Z @ 2594 NONAME ; void QDeclarativePath::setStartY(float)
+ ?setState@QDeclarativeDebugQuery@@AAEXW4State@1@@Z @ 2595 NONAME ; void QDeclarativeDebugQuery::setState(enum QDeclarativeDebugQuery::State)
+ ?setState@QDeclarativeDebugWatch@@AAEXW4State@1@@Z @ 2596 NONAME ; void QDeclarativeDebugWatch::setState(enum QDeclarativeDebugWatch::State)
+ ?setState@QDeclarativeItem@@QAEXABVQString@@@Z @ 2597 NONAME ; void QDeclarativeItem::setState(class QString const &)
+ ?setState@QDeclarativeStateGroup@@QAEXABVQString@@@Z @ 2598 NONAME ; void QDeclarativeStateGroup::setState(class QString const &)
+ ?setStateGroup@QDeclarativeState@@QAEXPAVQDeclarativeStateGroup@@@Z @ 2599 NONAME ; void QDeclarativeState::setStateGroup(class QDeclarativeStateGroup *)
+ ?setStaticMetacallFunction@QMetaObjectBuilder@@QAEXP6AHW4Call@QMetaObject@@HPAPAX@Z@Z @ 2600 NONAME ; void QMetaObjectBuilder::setStaticMetacallFunction(int (*)(enum QMetaObject::Call, int, void * *))
+ ?setStatusText@QDeclarativeWebView@@AAEXABVQString@@@Z @ 2601 NONAME ; void QDeclarativeWebView::setStatusText(class QString const &)
+ ?setStdCppSet@QMetaPropertyBuilder@@QAEX_N@Z @ 2602 NONAME ; void QMetaPropertyBuilder::setStdCppSet(bool)
+ ?setStored@QMetaPropertyBuilder@@QAEX_N@Z @ 2603 NONAME ; void QMetaPropertyBuilder::setStored(bool)
+ ?setStyle@QDeclarativeText@@QAEXW4TextStyle@1@@Z @ 2604 NONAME ; void QDeclarativeText::setStyle(enum QDeclarativeText::TextStyle)
+ ?setStyleColor@QDeclarativeText@@QAEXABVQColor@@@Z @ 2605 NONAME ; void QDeclarativeText::setStyleColor(class QColor const &)
+ ?setSuperClass@QMetaObjectBuilder@@QAEXPBUQMetaObject@@@Z @ 2606 NONAME ; void QMetaObjectBuilder::setSuperClass(struct QMetaObject const *)
+ ?setSynchronizedResizing@QDeclarativeGraphicsObjectContainer@@QAEX_N@Z @ 2607 NONAME ; void QDeclarativeGraphicsObjectContainer::setSynchronizedResizing(bool)
+ ?setTag@QMetaMethodBuilder@@QAEXABVQByteArray@@@Z @ 2608 NONAME ; void QMetaMethodBuilder::setTag(class QByteArray const &)
+ ?setTarget@QDeclarativeBehavior@@UAEXABVQDeclarativeProperty@@@Z @ 2609 NONAME ; void QDeclarativeBehavior::setTarget(class QDeclarativeProperty const &)
+ ?setTarget@QDeclarativeConnections@@QAEXPAVQObject@@@Z @ 2610 NONAME ; void QDeclarativeConnections::setTarget(class QObject *)
+ ?setTarget@QDeclarativeDrag@@QAEXPAVQDeclarativeItem@@@Z @ 2611 NONAME ; void QDeclarativeDrag::setTarget(class QDeclarativeItem *)
+ ?setTarget@QDeclarativeEaseFollow@@UAEXABVQDeclarativeProperty@@@Z @ 2612 NONAME ; void QDeclarativeEaseFollow::setTarget(class QDeclarativeProperty const &)
+ ?setTarget@QDeclarativeSpringFollow@@UAEXABVQDeclarativeProperty@@@Z @ 2613 NONAME ; void QDeclarativeSpringFollow::setTarget(class QDeclarativeProperty const &)
+ ?setText@QDeclarativeText@@QAEXABVQString@@@Z @ 2614 NONAME ; void QDeclarativeText::setText(class QString const &)
+ ?setText@QDeclarativeTextEdit@@QAEXABVQString@@@Z @ 2615 NONAME ; void QDeclarativeTextEdit::setText(class QString const &)
+ ?setText@QDeclarativeTextInput@@QAEXABVQString@@@Z @ 2616 NONAME ; void QDeclarativeTextInput::setText(class QString const &)
+ ?setTextFormat@QDeclarativeText@@QAEXW4TextFormat@1@@Z @ 2617 NONAME ; void QDeclarativeText::setTextFormat(enum QDeclarativeText::TextFormat)
+ ?setTextFormat@QDeclarativeTextEdit@@QAEXW4TextFormat@1@@Z @ 2618 NONAME ; void QDeclarativeTextEdit::setTextFormat(enum QDeclarativeTextEdit::TextFormat)
+ ?setTextInteractionFlags@QDeclarativeTextEdit@@QAEXV?$QFlags@W4TextInteractionFlag@Qt@@@@@Z @ 2619 NONAME ; void QDeclarativeTextEdit::setTextInteractionFlags(class QFlags<enum Qt::TextInteractionFlag>)
+ ?setTextMargin@QDeclarativeTextEdit@@QAEXM@Z @ 2620 NONAME ; void QDeclarativeTextEdit::setTextMargin(float)
+ ?setTime@QDeclarativeDateTimeFormatter@@QAEXABVQTime@@@Z @ 2621 NONAME ; void QDeclarativeDateTimeFormatter::setTime(class QTime const &)
+ ?setTimeFormat@QDeclarativeDateTimeFormatter@@QAEXABVQString@@@Z @ 2622 NONAME ; void QDeclarativeDateTimeFormatter::setTimeFormat(class QString const &)
+ ?setToState@QDeclarativeTransition@@QAEXABVQString@@@Z @ 2623 NONAME ; void QDeclarativeTransition::setToState(class QString const &)
+ ?setTop@QDeclarativeAnchorChanges@@QAEXABVQDeclarativeAnchorLine@@@Z @ 2624 NONAME ; void QDeclarativeAnchorChanges::setTop(class QDeclarativeAnchorLine const &)
+ ?setTop@QDeclarativeAnchors@@QAEXABVQDeclarativeAnchorLine@@@Z @ 2625 NONAME ; void QDeclarativeAnchors::setTop(class QDeclarativeAnchorLine const &)
+ ?setTop@QDeclarativeScaleGrid@@QAEXH@Z @ 2626 NONAME ; void QDeclarativeScaleGrid::setTop(int)
+ ?setTopMargin@QDeclarativeAnchors@@QAEXM@Z @ 2627 NONAME ; void QDeclarativeAnchors::setTopMargin(float)
+ ?setTransformOrigin@QDeclarativeItem@@QAEXW4TransformOrigin@1@@Z @ 2628 NONAME ; void QDeclarativeItem::setTransformOrigin(enum QDeclarativeItem::TransformOrigin)
+ ?setTriggeredOnStart@QDeclarativeTimer@@QAEX_N@Z @ 2629 NONAME ; void QDeclarativeTimer::setTriggeredOnStart(bool)
+ ?setUrl@QDeclarativeDebugFileReference@@QAEXABVQUrl@@@Z @ 2630 NONAME ; void QDeclarativeDebugFileReference::setUrl(class QUrl const &)
+ ?setUrl@QDeclarativeError@@QAEXABVQUrl@@@Z @ 2631 NONAME ; void QDeclarativeError::setUrl(class QUrl const &)
+ ?setUrl@QDeclarativeWebView@@QAEXABVQUrl@@@Z @ 2632 NONAME ; void QDeclarativeWebView::setUrl(class QUrl const &)
+ ?setUser@QMetaPropertyBuilder@@QAEX_N@Z @ 2633 NONAME ; void QMetaPropertyBuilder::setUser(bool)
+ ?setVAlign@QDeclarativeText@@QAEXW4VAlignment@1@@Z @ 2634 NONAME ; void QDeclarativeText::setVAlign(enum QDeclarativeText::VAlignment)
+ ?setVAlign@QDeclarativeTextEdit@@QAEXW4VAlignment@1@@Z @ 2635 NONAME ; void QDeclarativeTextEdit::setVAlign(enum QDeclarativeTextEdit::VAlignment)
+ ?setValidator@QDeclarativeTextInput@@QAEXPAVQValidator@@@Z @ 2636 NONAME ; void QDeclarativeTextInput::setValidator(class QValidator *)
+ ?setValue@QDeclarativeBind@@QAEXABVQVariant@@@Z @ 2637 NONAME ; void QDeclarativeBind::setValue(class QVariant const &)
+ ?setValue@QDeclarativeOpenMetaObject@@QAEXABVQByteArray@@ABVQVariant@@@Z @ 2638 NONAME ; void QDeclarativeOpenMetaObject::setValue(class QByteArray const &, class QVariant const &)
+ ?setValue@QDeclarativeOpenMetaObject@@QAEXHABVQVariant@@@Z @ 2639 NONAME ; void QDeclarativeOpenMetaObject::setValue(int, class QVariant const &)
+ ?setValue@QDeclarativePathAttribute@@QAEXM@Z @ 2640 NONAME ; void QDeclarativePathAttribute::setValue(float)
+ ?setValue@QDeclarativePathPercent@@QAEXM@Z @ 2641 NONAME ; void QDeclarativePathPercent::setValue(float)
+ ?setVelocity@QDeclarativeEaseFollow@@QAEXM@Z @ 2642 NONAME ; void QDeclarativeEaseFollow::setVelocity(float)
+ ?setVelocity@QDeclarativeParticles@@QAEXM@Z @ 2643 NONAME ; void QDeclarativeParticles::setVelocity(float)
+ ?setVelocity@QDeclarativeSpringFollow@@QAEXM@Z @ 2644 NONAME ; void QDeclarativeSpringFollow::setVelocity(float)
+ ?setVelocityDeviation@QDeclarativeParticles@@QAEXM@Z @ 2645 NONAME ; void QDeclarativeParticles::setVelocityDeviation(float)
+ ?setVerticalCenter@QDeclarativeAnchorChanges@@QAEXABVQDeclarativeAnchorLine@@@Z @ 2646 NONAME ; void QDeclarativeAnchorChanges::setVerticalCenter(class QDeclarativeAnchorLine const &)
+ ?setVerticalCenter@QDeclarativeAnchors@@QAEXABVQDeclarativeAnchorLine@@@Z @ 2647 NONAME ; void QDeclarativeAnchors::setVerticalCenter(class QDeclarativeAnchorLine const &)
+ ?setVerticalCenterOffset@QDeclarativeAnchors@@QAEXM@Z @ 2648 NONAME ; void QDeclarativeAnchors::setVerticalCenterOffset(float)
+ ?setVerticalTileMode@QDeclarativeBorderImage@@QAEXW4TileMode@1@@Z @ 2649 NONAME ; void QDeclarativeBorderImage::setVerticalTileMode(enum QDeclarativeBorderImage::TileMode)
+ ?setWhen@QDeclarativeBind@@QAEX_N@Z @ 2650 NONAME ; void QDeclarativeBind::setWhen(bool)
+ ?setWhen@QDeclarativeState@@QAEXPAVQDeclarativeBinding@@@Z @ 2651 NONAME ; void QDeclarativeState::setWhen(class QDeclarativeBinding *)
+ ?setWidth@QDeclarativeItem@@QAEXM@Z @ 2652 NONAME ; void QDeclarativeItem::setWidth(float)
+ ?setWidth@QDeclarativeParentChange@@QAEXM@Z @ 2653 NONAME ; void QDeclarativeParentChange::setWidth(float)
+ ?setWidth@QDeclarativePen@@QAEXH@Z @ 2654 NONAME ; void QDeclarativePen::setWidth(int)
+ ?setWrap@QDeclarativeText@@QAEX_N@Z @ 2655 NONAME ; void QDeclarativeText::setWrap(bool)
+ ?setWrap@QDeclarativeTextEdit@@QAEX_N@Z @ 2656 NONAME ; void QDeclarativeTextEdit::setWrap(bool)
+ ?setWrapEnabled@QDeclarativeGridView@@QAEX_N@Z @ 2657 NONAME ; void QDeclarativeGridView::setWrapEnabled(bool)
+ ?setWrapEnabled@QDeclarativeListView@@QAEX_N@Z @ 2658 NONAME ; void QDeclarativeListView::setWrapEnabled(bool)
+ ?setWritable@QMetaPropertyBuilder@@QAEX_N@Z @ 2659 NONAME ; void QMetaPropertyBuilder::setWritable(bool)
+ ?setX@QDeclarativeCurve@@QAEXM@Z @ 2660 NONAME ; void QDeclarativeCurve::setX(float)
+ ?setX@QDeclarativeParentChange@@QAEXM@Z @ 2661 NONAME ; void QDeclarativeParentChange::setX(float)
+ ?setXAttractor@QDeclarativeParticleMotionGravity@@QAEXM@Z @ 2662 NONAME ; void QDeclarativeParticleMotionGravity::setXAttractor(float)
+ ?setXVariance@QDeclarativeParticleMotionWander@@QAEXM@Z @ 2663 NONAME ; void QDeclarativeParticleMotionWander::setXVariance(float)
+ ?setXmax@QDeclarativeDrag@@QAEXM@Z @ 2664 NONAME ; void QDeclarativeDrag::setXmax(float)
+ ?setXmin@QDeclarativeDrag@@QAEXM@Z @ 2665 NONAME ; void QDeclarativeDrag::setXmin(float)
+ ?setXml@QDeclarativeXmlListModel@@QAEXABVQString@@@Z @ 2666 NONAME ; void QDeclarativeXmlListModel::setXml(class QString const &)
+ ?setY@QDeclarativeCurve@@QAEXM@Z @ 2667 NONAME ; void QDeclarativeCurve::setY(float)
+ ?setY@QDeclarativeParentChange@@QAEXM@Z @ 2668 NONAME ; void QDeclarativeParentChange::setY(float)
+ ?setYAttractor@QDeclarativeParticleMotionGravity@@QAEXM@Z @ 2669 NONAME ; void QDeclarativeParticleMotionGravity::setYAttractor(float)
+ ?setYVariance@QDeclarativeParticleMotionWander@@QAEXM@Z @ 2670 NONAME ; void QDeclarativeParticleMotionWander::setYVariance(float)
+ ?setYmax@QDeclarativeDrag@@QAEXM@Z @ 2671 NONAME ; void QDeclarativeDrag::setYmax(float)
+ ?setYmin@QDeclarativeDrag@@QAEXM@Z @ 2672 NONAME ; void QDeclarativeDrag::setYmin(float)
+ ?setZoomFactor@QDeclarativeWebView@@QAEXM@Z @ 2673 NONAME ; void QDeclarativeWebView::setZoomFactor(float)
+ ?settings@QDeclarativeWebView@@QBEPAVQWebSettings@@XZ @ 2674 NONAME ; class QWebSettings * QDeclarativeWebView::settings(void) const
+ ?settingsObject@QDeclarativeWebView@@QBEPAVQDeclarativeWebSettings@@XZ @ 2675 NONAME ; class QDeclarativeWebSettings * QDeclarativeWebView::settingsObject(void) const
+ ?shadow@QDeclarativeSystemPalette@@QBE?AVQColor@@XZ @ 2676 NONAME ; class QColor QDeclarativeSystemPalette::shadow(void) const
+ ?side@QDeclarativeFlipable@@QBE?AW4Side@1@XZ @ 2677 NONAME ; enum QDeclarativeFlipable::Side QDeclarativeFlipable::side(void) const
+ ?sideChanged@QDeclarativeFlipable@@IAEXXZ @ 2678 NONAME ; void QDeclarativeFlipable::sideChanged(void)
+ ?signalOffset@QDeclarativeOpenMetaObjectType@@QBEHXZ @ 2679 NONAME ; int QDeclarativeOpenMetaObjectType::signalOffset(void) const
+ ?signature@QMetaMethodBuilder@@QBE?AVQByteArray@@XZ @ 2680 NONAME ; class QByteArray QMetaMethodBuilder::signature(void) const
+ ?size@QDeclarativePropertyMap@@QBEHXZ @ 2681 NONAME ; int QDeclarativePropertyMap::size(void) const
+ ?sizeChange@QDeclarativeGridView@@AAEXXZ @ 2682 NONAME ; void QDeclarativeGridView::sizeChange(void)
+ ?sizeChanged@QDeclarativeView@@AAEXXZ @ 2683 NONAME ; void QDeclarativeView::sizeChanged(void)
+ ?sizeFFromString@QDeclarativeStringConverters@@YA?AVQSizeF@@ABVQString@@PA_N@Z @ 2684 NONAME ; class QSizeF QDeclarativeStringConverters::sizeFFromString(class QString const &, bool *)
+ ?sizeHint@QDeclarativeView@@UBE?AVQSize@@XZ @ 2685 NONAME ; class QSize QDeclarativeView::sizeHint(void) const
+ ?smooth@QDeclarativeItem@@QBE_NXZ @ 2686 NONAME ; bool QDeclarativeItem::smooth(void) const
+ ?smoothCache@QDeclarativePaintedItem@@QBE_NXZ @ 2687 NONAME ; bool QDeclarativePaintedItem::smoothCache(void) const
+ ?smoothChanged@QDeclarativeItem@@IAEXXZ @ 2688 NONAME ; void QDeclarativeItem::smoothChanged(void)
+ ?snapMode@QDeclarativeListView@@QBE?AW4SnapMode@1@XZ @ 2689 NONAME ; enum QDeclarativeListView::SnapMode QDeclarativeListView::snapMode(void) const
+ ?snapPosition@QDeclarativePathView@@QBEMXZ @ 2690 NONAME ; float QDeclarativePathView::snapPosition(void) const
+ ?source@QDeclarativeDebugObjectReference@@QBE?AVQDeclarativeDebugFileReference@@XZ @ 2691 NONAME ; class QDeclarativeDebugFileReference QDeclarativeDebugObjectReference::source(void) const
+ ?source@QDeclarativeFontLoader@@QBE?AVQUrl@@XZ @ 2692 NONAME ; class QUrl QDeclarativeFontLoader::source(void) const
+ ?source@QDeclarativeImageBase@@QBE?AVQUrl@@XZ @ 2693 NONAME ; class QUrl QDeclarativeImageBase::source(void) const
+ ?source@QDeclarativeLoader@@QBE?AVQUrl@@XZ @ 2694 NONAME ; class QUrl QDeclarativeLoader::source(void) const
+ ?source@QDeclarativeParticles@@QBE?AVQUrl@@XZ @ 2695 NONAME ; class QUrl QDeclarativeParticles::source(void) const
+ ?source@QDeclarativeView@@QBE?AVQUrl@@XZ @ 2696 NONAME ; class QUrl QDeclarativeView::source(void) const
+ ?source@QDeclarativeXmlListModel@@QBE?AVQUrl@@XZ @ 2697 NONAME ; class QUrl QDeclarativeXmlListModel::source(void) const
+ ?sourceChanged@QDeclarativeEaseFollow@@IAEXXZ @ 2698 NONAME ; void QDeclarativeEaseFollow::sourceChanged(void)
+ ?sourceChanged@QDeclarativeImageBase@@IAEXABVQUrl@@@Z @ 2699 NONAME ; void QDeclarativeImageBase::sourceChanged(class QUrl const &)
+ ?sourceChanged@QDeclarativeLoader@@IAEXXZ @ 2700 NONAME ; void QDeclarativeLoader::sourceChanged(void)
+ ?sourceChanged@QDeclarativeParticles@@IAEXXZ @ 2701 NONAME ; void QDeclarativeParticles::sourceChanged(void)
+ ?sourceComponent@QDeclarativeLoader@@QBEPAVQDeclarativeComponent@@XZ @ 2702 NONAME ; class QDeclarativeComponent * QDeclarativeLoader::sourceComponent(void) const
+ ?sourceFile@QDeclarativeExpression@@QBE?AVQString@@XZ @ 2703 NONAME ; class QString QDeclarativeExpression::sourceFile(void) const
+ ?sourceValue@QDeclarativeEaseFollow@@QBEMXZ @ 2704 NONAME ; float QDeclarativeEaseFollow::sourceValue(void) const
+ ?sourceValue@QDeclarativeSpringFollow@@QBEMXZ @ 2705 NONAME ; float QDeclarativeSpringFollow::sourceValue(void) const
+ ?spacing@QDeclarativeBasePositioner@@QBEHXZ @ 2706 NONAME ; int QDeclarativeBasePositioner::spacing(void) const
+ ?spacing@QDeclarativeListView@@QBEMXZ @ 2707 NONAME ; float QDeclarativeListView::spacing(void) const
+ ?spacingChanged@QDeclarativeBasePositioner@@IAEXXZ @ 2708 NONAME ; void QDeclarativeBasePositioner::spacingChanged(void)
+ ?spacingChanged@QDeclarativeListView@@IAEXXZ @ 2709 NONAME ; void QDeclarativeListView::spacingChanged(void)
+ ?spring@QDeclarativeSpringFollow@@QBEMXZ @ 2710 NONAME ; float QDeclarativeSpringFollow::spring(void) const
+ ?start@QDeclarativeTimer@@QAEXXZ @ 2711 NONAME ; void QDeclarativeTimer::start(void)
+ ?startX@QDeclarativePath@@QBEMXZ @ 2712 NONAME ; float QDeclarativePath::startX(void) const
+ ?startY@QDeclarativePath@@QBEMXZ @ 2713 NONAME ; float QDeclarativePath::startY(void) const
+ ?state@QDeclarativeDebugQuery@@QBE?AW4State@1@XZ @ 2714 NONAME ; enum QDeclarativeDebugQuery::State QDeclarativeDebugQuery::state(void) const
+ ?state@QDeclarativeDebugWatch@@QBE?AW4State@1@XZ @ 2715 NONAME ; enum QDeclarativeDebugWatch::State QDeclarativeDebugWatch::state(void) const
+ ?state@QDeclarativeItem@@QBE?AVQString@@XZ @ 2716 NONAME ; class QString QDeclarativeItem::state(void) const
+ ?state@QDeclarativeStateGroup@@QBE?AVQString@@XZ @ 2717 NONAME ; class QString QDeclarativeStateGroup::state(void) const
+ ?stateChanged@QDeclarativeDebugQuery@@IAEXW4State@1@@Z @ 2718 NONAME ; void QDeclarativeDebugQuery::stateChanged(enum QDeclarativeDebugQuery::State)
+ ?stateChanged@QDeclarativeDebugWatch@@IAEXW4State@1@@Z @ 2719 NONAME ; void QDeclarativeDebugWatch::stateChanged(enum QDeclarativeDebugWatch::State)
+ ?stateChanged@QDeclarativeItem@@IAEXABVQString@@@Z @ 2720 NONAME ; void QDeclarativeItem::stateChanged(class QString const &)
+ ?stateChanged@QDeclarativeStateGroup@@IAEXABVQString@@@Z @ 2721 NONAME ; void QDeclarativeStateGroup::stateChanged(class QString const &)
+ ?stateGroup@QDeclarativeState@@QBEPAVQDeclarativeStateGroup@@XZ @ 2722 NONAME ; class QDeclarativeStateGroup * QDeclarativeState::stateGroup(void) const
+ ?states@QDeclarativeItem@@QAE?AU?$QDeclarativeListProperty@VQDeclarativeState@@@@XZ @ 2723 NONAME ; struct QDeclarativeListProperty<class QDeclarativeState> QDeclarativeItem::states(void)
+ ?states@QDeclarativeStateGroup@@QBE?AV?$QList@PAVQDeclarativeState@@@@XZ @ 2724 NONAME ; class QList<class QDeclarativeState *> QDeclarativeStateGroup::states(void) const
+ ?statesProperty@QDeclarativeStateGroup@@QAE?AU?$QDeclarativeListProperty@VQDeclarativeState@@@@XZ @ 2725 NONAME ; struct QDeclarativeListProperty<class QDeclarativeState> QDeclarativeStateGroup::statesProperty(void)
+ ?staticMetacallFunction@QMetaObjectBuilder@@QBEP6AHW4Call@QMetaObject@@HPAPAX@ZXZ @ 2726 NONAME ; int (*)(enum QMetaObject::Call, int, void * *) QMetaObjectBuilder::staticMetacallFunction(void) const
+ ?status@QDeclarativeComponent@@QBE?AW4Status@1@XZ @ 2727 NONAME ; enum QDeclarativeComponent::Status QDeclarativeComponent::status(void) const
+ ?status@QDeclarativeFontLoader@@QBE?AW4Status@1@XZ @ 2728 NONAME ; enum QDeclarativeFontLoader::Status QDeclarativeFontLoader::status(void) const
+ ?status@QDeclarativeImageBase@@QBE?AW4Status@1@XZ @ 2729 NONAME ; enum QDeclarativeImageBase::Status QDeclarativeImageBase::status(void) const
+ ?status@QDeclarativeLoader@@QBE?AW4Status@1@XZ @ 2730 NONAME ; enum QDeclarativeLoader::Status QDeclarativeLoader::status(void) const
+ ?status@QDeclarativePixmapReply@@QBE?AW4Status@1@XZ @ 2731 NONAME ; enum QDeclarativePixmapReply::Status QDeclarativePixmapReply::status(void) const
+ ?status@QDeclarativeView@@QBE?AW4Status@1@XZ @ 2732 NONAME ; enum QDeclarativeView::Status QDeclarativeView::status(void) const
+ ?status@QDeclarativeWebView@@QBE?AW4Status@1@XZ @ 2733 NONAME ; enum QDeclarativeWebView::Status QDeclarativeWebView::status(void) const
+ ?status@QDeclarativeXmlListModel@@QBE?AW4Status@1@XZ @ 2734 NONAME ; enum QDeclarativeXmlListModel::Status QDeclarativeXmlListModel::status(void) const
+ ?statusChanged@QDeclarativeComponent@@IAEXW4Status@1@@Z @ 2735 NONAME ; void QDeclarativeComponent::statusChanged(enum QDeclarativeComponent::Status)
+ ?statusChanged@QDeclarativeFontLoader@@IAEXXZ @ 2736 NONAME ; void QDeclarativeFontLoader::statusChanged(void)
+ ?statusChanged@QDeclarativeImageBase@@IAEXW4Status@1@@Z @ 2737 NONAME ; void QDeclarativeImageBase::statusChanged(enum QDeclarativeImageBase::Status)
+ ?statusChanged@QDeclarativeLoader@@IAEXXZ @ 2738 NONAME ; void QDeclarativeLoader::statusChanged(void)
+ ?statusChanged@QDeclarativeView@@IAEXW4Status@1@@Z @ 2739 NONAME ; void QDeclarativeView::statusChanged(enum QDeclarativeView::Status)
+ ?statusChanged@QDeclarativeWebView@@IAEXW4Status@1@@Z @ 2740 NONAME ; void QDeclarativeWebView::statusChanged(enum QDeclarativeWebView::Status)
+ ?statusChanged@QDeclarativeXmlListModel@@IAEXW4Status@1@@Z @ 2741 NONAME ; void QDeclarativeXmlListModel::statusChanged(enum QDeclarativeXmlListModel::Status)
+ ?statusText@QDeclarativeWebView@@QBE?AVQString@@XZ @ 2742 NONAME ; class QString QDeclarativeWebView::statusText(void) const
+ ?statusTextChanged@QDeclarativeWebView@@IAEXXZ @ 2743 NONAME ; void QDeclarativeWebView::statusTextChanged(void)
+ ?stop@QDeclarativeTimer@@QAEXXZ @ 2744 NONAME ; void QDeclarativeTimer::stop(void)
+ ?stop@QDeclarativeTransition@@QAEXXZ @ 2745 NONAME ; void QDeclarativeTransition::stop(void)
+ ?stopAction@QDeclarativeWebView@@QBEPAVQAction@@XZ @ 2746 NONAME ; class QAction * QDeclarativeWebView::stopAction(void) const
+ ?stops@QDeclarativeGradient@@QAE?AU?$QDeclarativeListProperty@VQDeclarativeGradientStop@@@@XZ @ 2747 NONAME ; struct QDeclarativeListProperty<class QDeclarativeGradientStop> QDeclarativeGradient::stops(void)
+ ?stringToRule@QDeclarativeGridScaledImage@@CA?AW4TileMode@QDeclarativeBorderImage@@ABVQString@@@Z @ 2748 NONAME ; enum QDeclarativeBorderImage::TileMode QDeclarativeGridScaledImage::stringToRule(class QString const &)
+ ?stringValue@QDeclarativeVisualDataModel@@UAE?AVQString@@HABV2@@Z @ 2749 NONAME ; class QString QDeclarativeVisualDataModel::stringValue(int, class QString const &)
+ ?stringValue@QDeclarativeVisualItemModel@@UAE?AVQString@@HABV2@@Z @ 2750 NONAME ; class QString QDeclarativeVisualItemModel::stringValue(int, class QString const &)
+ ?stringValue@QDeclarativeVisualModel@@UAE?AVQString@@HABV2@@Z @ 2751 NONAME ; class QString QDeclarativeVisualModel::stringValue(int, class QString const &)
+ ?style@QDeclarativeText@@QBE?AW4TextStyle@1@XZ @ 2752 NONAME ; enum QDeclarativeText::TextStyle QDeclarativeText::style(void) const
+ ?styleChanged@QDeclarativeText@@IAEXW4TextStyle@1@@Z @ 2753 NONAME ; void QDeclarativeText::styleChanged(enum QDeclarativeText::TextStyle)
+ ?styleColor@QDeclarativeText@@QBE?AVQColor@@XZ @ 2754 NONAME ; class QColor QDeclarativeText::styleColor(void) const
+ ?styleColorChanged@QDeclarativeText@@IAEXABVQColor@@@Z @ 2755 NONAME ; void QDeclarativeText::styleColorChanged(class QColor const &)
+ ?superClass@QMetaObjectBuilder@@QBEPBUQMetaObject@@XZ @ 2756 NONAME ; struct QMetaObject const * QMetaObjectBuilder::superClass(void) const
+ ?syncChanged@QDeclarativeSpringFollow@@IAEXXZ @ 2757 NONAME ; void QDeclarativeSpringFollow::syncChanged(void)
+ ?synchronizedResizing@QDeclarativeGraphicsObjectContainer@@QBE_NXZ @ 2758 NONAME ; bool QDeclarativeGraphicsObjectContainer::synchronizedResizing(void) const
+ ?tag@QMetaMethodBuilder@@QBE?AVQByteArray@@XZ @ 2759 NONAME ; class QByteArray QMetaMethodBuilder::tag(void) const
+ ?target@QDeclarativeConnections@@QBEPAVQObject@@XZ @ 2760 NONAME ; class QObject * QDeclarativeConnections::target(void) const
+ ?target@QDeclarativeDrag@@QBEPAVQDeclarativeItem@@XZ @ 2761 NONAME ; class QDeclarativeItem * QDeclarativeDrag::target(void) const
+ ?targetChanged@QDeclarativeConnections@@IAEXXZ @ 2762 NONAME ; void QDeclarativeConnections::targetChanged(void)
+ ?targetChanged@QDeclarativeDrag@@IAEXXZ @ 2763 NONAME ; void QDeclarativeDrag::targetChanged(void)
+ ?testLiteralAssignment@QDeclarativeCompiler@@AAE_NABVQMetaProperty@@PAVValue@QDeclarativeParser@@@Z @ 2764 NONAME ; bool QDeclarativeCompiler::testLiteralAssignment(class QMetaProperty const &, class QDeclarativeParser::Value *)
+ ?testQualifiedEnumAssignment@QDeclarativeCompiler@@AAE_NABVQMetaProperty@@PAVObject@QDeclarativeParser@@PAVValue@4@PA_N@Z @ 2765 NONAME ; bool QDeclarativeCompiler::testQualifiedEnumAssignment(class QMetaProperty const &, class QDeclarativeParser::Object *, class QDeclarativeParser::Value *, bool *)
+ ?text@QDeclarativeNumberFormatter@@QBE?AVQString@@XZ @ 2766 NONAME ; class QString QDeclarativeNumberFormatter::text(void) const
+ ?text@QDeclarativeSystemPalette@@QBE?AVQColor@@XZ @ 2767 NONAME ; class QColor QDeclarativeSystemPalette::text(void) const
+ ?text@QDeclarativeText@@QBE?AVQString@@XZ @ 2768 NONAME ; class QString QDeclarativeText::text(void) const
+ ?text@QDeclarativeTextEdit@@QBE?AVQString@@XZ @ 2769 NONAME ; class QString QDeclarativeTextEdit::text(void) const
+ ?text@QDeclarativeTextInput@@QBE?AVQString@@XZ @ 2770 NONAME ; class QString QDeclarativeTextInput::text(void) const
+ ?textChanged@QDeclarativeDateTimeFormatter@@IAEXXZ @ 2771 NONAME ; void QDeclarativeDateTimeFormatter::textChanged(void)
+ ?textChanged@QDeclarativeNumberFormatter@@IAEXXZ @ 2772 NONAME ; void QDeclarativeNumberFormatter::textChanged(void)
+ ?textChanged@QDeclarativeText@@IAEXABVQString@@@Z @ 2773 NONAME ; void QDeclarativeText::textChanged(class QString const &)
+ ?textChanged@QDeclarativeTextEdit@@IAEXABVQString@@@Z @ 2774 NONAME ; void QDeclarativeTextEdit::textChanged(class QString const &)
+ ?textChanged@QDeclarativeTextInput@@IAEXXZ @ 2775 NONAME ; void QDeclarativeTextInput::textChanged(void)
+ ?textFormat@QDeclarativeText@@QBE?AW4TextFormat@1@XZ @ 2776 NONAME ; enum QDeclarativeText::TextFormat QDeclarativeText::textFormat(void) const
+ ?textFormat@QDeclarativeTextEdit@@QBE?AW4TextFormat@1@XZ @ 2777 NONAME ; enum QDeclarativeTextEdit::TextFormat QDeclarativeTextEdit::textFormat(void) const
+ ?textFormatChanged@QDeclarativeText@@IAEXW4TextFormat@1@@Z @ 2778 NONAME ; void QDeclarativeText::textFormatChanged(enum QDeclarativeText::TextFormat)
+ ?textFormatChanged@QDeclarativeTextEdit@@IAEXW4TextFormat@1@@Z @ 2779 NONAME ; void QDeclarativeTextEdit::textFormatChanged(enum QDeclarativeTextEdit::TextFormat)
+ ?textInteractionFlags@QDeclarativeTextEdit@@QBE?AV?$QFlags@W4TextInteractionFlag@Qt@@@@XZ @ 2780 NONAME ; class QFlags<enum Qt::TextInteractionFlag> QDeclarativeTextEdit::textInteractionFlags(void) const
+ ?textMargin@QDeclarativeTextEdit@@QBEMXZ @ 2781 NONAME ; float QDeclarativeTextEdit::textMargin(void) const
+ ?textMarginChanged@QDeclarativeTextEdit@@IAEXM@Z @ 2782 NONAME ; void QDeclarativeTextEdit::textMarginChanged(float)
+ ?ticked@QDeclarativeFlickable@@MAEXXZ @ 2783 NONAME ; void QDeclarativeFlickable::ticked(void)
+ ?ticked@QDeclarativePathView@@AAEXXZ @ 2784 NONAME ; void QDeclarativePathView::ticked(void)
+ ?ticked@QDeclarativeTimer@@AAEXXZ @ 2785 NONAME ; void QDeclarativeTimer::ticked(void)
+ ?time@QDeclarativeDateTimeFormatter@@QBE?AVQTime@@XZ @ 2786 NONAME ; class QTime QDeclarativeDateTimeFormatter::time(void) const
+ ?timeFormat@QDeclarativeDateTimeFormatter@@QBE?AVQString@@XZ @ 2787 NONAME ; class QString QDeclarativeDateTimeFormatter::timeFormat(void) const
+ ?timeFromString@QDeclarativeStringConverters@@YA?AVQTime@@ABVQString@@PA_N@Z @ 2788 NONAME ; class QTime QDeclarativeStringConverters::timeFromString(class QString const &, bool *)
+ ?timeText@QDeclarativeDateTimeFormatter@@QBE?AVQString@@XZ @ 2789 NONAME ; class QString QDeclarativeDateTimeFormatter::timeText(void) const
+ ?timerEvent@QDeclarativeFlickable@@MAEXPAVQTimerEvent@@@Z @ 2790 NONAME ; void QDeclarativeFlickable::timerEvent(class QTimerEvent *)
+ ?timerEvent@QDeclarativeMouseArea@@MAEXPAVQTimerEvent@@@Z @ 2791 NONAME ; void QDeclarativeMouseArea::timerEvent(class QTimerEvent *)
+ ?timerEvent@QDeclarativeView@@MAEXPAVQTimerEvent@@@Z @ 2792 NONAME ; void QDeclarativeView::timerEvent(class QTimerEvent *)
+ ?timerEvent@QDeclarativeWebView@@MAEXPAVQTimerEvent@@@Z @ 2793 NONAME ; void QDeclarativeWebView::timerEvent(class QTimerEvent *)
+ ?title@QDeclarativeWebView@@QBE?AVQString@@XZ @ 2794 NONAME ; class QString QDeclarativeWebView::title(void) const
+ ?titleChanged@QDeclarativeWebView@@IAEXABVQString@@@Z @ 2795 NONAME ; void QDeclarativeWebView::titleChanged(class QString const &)
+ ?toBinding@QDeclarativeDomValue@@QBE?AVQDeclarativeDomValueBinding@@XZ @ 2796 NONAME ; class QDeclarativeDomValueBinding QDeclarativeDomValue::toBinding(void) const
+ ?toComponent@QDeclarativeDomObject@@QBE?AVQDeclarativeDomComponent@@XZ @ 2797 NONAME ; class QDeclarativeDomComponent QDeclarativeDomObject::toComponent(void) const
+ ?toList@QDeclarativeDomValue@@QBE?AVQDeclarativeDomList@@XZ @ 2798 NONAME ; class QDeclarativeDomList QDeclarativeDomValue::toList(void) const
+ ?toLiteral@QDeclarativeDomValue@@QBE?AVQDeclarativeDomValueLiteral@@XZ @ 2799 NONAME ; class QDeclarativeDomValueLiteral QDeclarativeDomValue::toLiteral(void) const
+ ?toMetaObject@QMetaObjectBuilder@@QBEPAUQMetaObject@@XZ @ 2800 NONAME ; struct QMetaObject * QMetaObjectBuilder::toMetaObject(void) const
+ ?toObject@QDeclarativeDomValue@@QBE?AVQDeclarativeDomObject@@XZ @ 2801 NONAME ; class QDeclarativeDomObject QDeclarativeDomValue::toObject(void) const
+ ?toQObject@QDeclarativeMetaType@@SAPAVQObject@@ABVQVariant@@PA_N@Z @ 2802 NONAME ; class QObject * QDeclarativeMetaType::toQObject(class QVariant const &, bool *)
+ ?toQmlType@QDeclarativeCompiler@@CAPAVQDeclarativeType@@PAVObject@QDeclarativeParser@@@Z @ 2803 NONAME ; class QDeclarativeType * QDeclarativeCompiler::toQmlType(class QDeclarativeParser::Object *)
+ ?toRelocatableData@QMetaObjectBuilder@@QBE?AVQByteArray@@PA_N@Z @ 2804 NONAME ; class QByteArray QMetaObjectBuilder::toRelocatableData(bool *) const
+ ?toState@QDeclarativeTransition@@QBE?AVQString@@XZ @ 2805 NONAME ; class QString QDeclarativeTransition::toState(void) const
+ ?toString@QDeclarativeError@@QBE?AVQString@@XZ @ 2806 NONAME ; class QString QDeclarativeError::toString(void) const
+ ?toString@QDeclarativeListModel@@UBE?AVQString@@H@Z @ 2807 NONAME ; class QString QDeclarativeListModel::toString(int) const
+ ?toString@QDeclarativeXmlListModel@@UBE?AVQString@@H@Z @ 2808 NONAME ; class QString QDeclarativeXmlListModel::toString(int) const
+ ?toValueInterceptor@QDeclarativeDomValue@@QBE?AVQDeclarativeDomValueValueInterceptor@@XZ @ 2809 NONAME ; class QDeclarativeDomValueValueInterceptor QDeclarativeDomValue::toValueInterceptor(void) const
+ ?toValueSource@QDeclarativeDomValue@@QBE?AVQDeclarativeDomValueValueSource@@XZ @ 2810 NONAME ; class QDeclarativeDomValueValueSource QDeclarativeDomValue::toValueSource(void) const
+ ?top@QDeclarativeAnchorChanges@@QBE?AVQDeclarativeAnchorLine@@XZ @ 2811 NONAME ; class QDeclarativeAnchorLine QDeclarativeAnchorChanges::top(void) const
+ ?top@QDeclarativeAnchors@@QBE?AVQDeclarativeAnchorLine@@XZ @ 2812 NONAME ; class QDeclarativeAnchorLine QDeclarativeAnchors::top(void) const
+ ?top@QDeclarativeItem@@QBE?AVQDeclarativeAnchorLine@@XZ @ 2813 NONAME ; class QDeclarativeAnchorLine QDeclarativeItem::top(void) const
+ ?top@QDeclarativeScaleGrid@@QBEHXZ @ 2814 NONAME ; int QDeclarativeScaleGrid::top(void) const
+ ?topChanged@QDeclarativeAnchors@@IAEXXZ @ 2815 NONAME ; void QDeclarativeAnchors::topChanged(void)
+ ?topMargin@QDeclarativeAnchors@@QBEMXZ @ 2816 NONAME ; float QDeclarativeAnchors::topMargin(void) const
+ ?topMarginChanged@QDeclarativeAnchors@@IAEXXZ @ 2817 NONAME ; void QDeclarativeAnchors::topMarginChanged(void)
+ ?tr@QDeclarativeAnchorChanges@@SA?AVQString@@PBD0@Z @ 2818 NONAME ; class QString QDeclarativeAnchorChanges::tr(char const *, char const *)
+ ?tr@QDeclarativeAnchorChanges@@SA?AVQString@@PBD0H@Z @ 2819 NONAME ; class QString QDeclarativeAnchorChanges::tr(char const *, char const *, int)
+ ?tr@QDeclarativeAnchors@@SA?AVQString@@PBD0@Z @ 2820 NONAME ; class QString QDeclarativeAnchors::tr(char const *, char const *)
+ ?tr@QDeclarativeAnchors@@SA?AVQString@@PBD0H@Z @ 2821 NONAME ; class QString QDeclarativeAnchors::tr(char const *, char const *, int)
+ ?tr@QDeclarativeAnimatedImage@@SA?AVQString@@PBD0@Z @ 2822 NONAME ; class QString QDeclarativeAnimatedImage::tr(char const *, char const *)
+ ?tr@QDeclarativeAnimatedImage@@SA?AVQString@@PBD0H@Z @ 2823 NONAME ; class QString QDeclarativeAnimatedImage::tr(char const *, char const *, int)
+ ?tr@QDeclarativeBasePositioner@@SA?AVQString@@PBD0@Z @ 2824 NONAME ; class QString QDeclarativeBasePositioner::tr(char const *, char const *)
+ ?tr@QDeclarativeBasePositioner@@SA?AVQString@@PBD0H@Z @ 2825 NONAME ; class QString QDeclarativeBasePositioner::tr(char const *, char const *, int)
+ ?tr@QDeclarativeBehavior@@SA?AVQString@@PBD0@Z @ 2826 NONAME ; class QString QDeclarativeBehavior::tr(char const *, char const *)
+ ?tr@QDeclarativeBehavior@@SA?AVQString@@PBD0H@Z @ 2827 NONAME ; class QString QDeclarativeBehavior::tr(char const *, char const *, int)
+ ?tr@QDeclarativeBind@@SA?AVQString@@PBD0@Z @ 2828 NONAME ; class QString QDeclarativeBind::tr(char const *, char const *)
+ ?tr@QDeclarativeBind@@SA?AVQString@@PBD0H@Z @ 2829 NONAME ; class QString QDeclarativeBind::tr(char const *, char const *, int)
+ ?tr@QDeclarativeBorderImage@@SA?AVQString@@PBD0@Z @ 2830 NONAME ; class QString QDeclarativeBorderImage::tr(char const *, char const *)
+ ?tr@QDeclarativeBorderImage@@SA?AVQString@@PBD0H@Z @ 2831 NONAME ; class QString QDeclarativeBorderImage::tr(char const *, char const *, int)
+ ?tr@QDeclarativeColumn@@SA?AVQString@@PBD0@Z @ 2832 NONAME ; class QString QDeclarativeColumn::tr(char const *, char const *)
+ ?tr@QDeclarativeColumn@@SA?AVQString@@PBD0H@Z @ 2833 NONAME ; class QString QDeclarativeColumn::tr(char const *, char const *, int)
+ ?tr@QDeclarativeComponent@@SA?AVQString@@PBD0@Z @ 2834 NONAME ; class QString QDeclarativeComponent::tr(char const *, char const *)
+ ?tr@QDeclarativeComponent@@SA?AVQString@@PBD0H@Z @ 2835 NONAME ; class QString QDeclarativeComponent::tr(char const *, char const *, int)
+ ?tr@QDeclarativeConnections@@SA?AVQString@@PBD0@Z @ 2836 NONAME ; class QString QDeclarativeConnections::tr(char const *, char const *)
+ ?tr@QDeclarativeConnections@@SA?AVQString@@PBD0H@Z @ 2837 NONAME ; class QString QDeclarativeConnections::tr(char const *, char const *, int)
+ ?tr@QDeclarativeContext@@SA?AVQString@@PBD0@Z @ 2838 NONAME ; class QString QDeclarativeContext::tr(char const *, char const *)
+ ?tr@QDeclarativeContext@@SA?AVQString@@PBD0H@Z @ 2839 NONAME ; class QString QDeclarativeContext::tr(char const *, char const *, int)
+ ?tr@QDeclarativeCurve@@SA?AVQString@@PBD0@Z @ 2840 NONAME ; class QString QDeclarativeCurve::tr(char const *, char const *)
+ ?tr@QDeclarativeCurve@@SA?AVQString@@PBD0H@Z @ 2841 NONAME ; class QString QDeclarativeCurve::tr(char const *, char const *, int)
+ ?tr@QDeclarativeDateTimeFormatter@@SA?AVQString@@PBD0@Z @ 2842 NONAME ; class QString QDeclarativeDateTimeFormatter::tr(char const *, char const *)
+ ?tr@QDeclarativeDateTimeFormatter@@SA?AVQString@@PBD0H@Z @ 2843 NONAME ; class QString QDeclarativeDateTimeFormatter::tr(char const *, char const *, int)
+ ?tr@QDeclarativeDebugClient@@SA?AVQString@@PBD0@Z @ 2844 NONAME ; class QString QDeclarativeDebugClient::tr(char const *, char const *)
+ ?tr@QDeclarativeDebugClient@@SA?AVQString@@PBD0H@Z @ 2845 NONAME ; class QString QDeclarativeDebugClient::tr(char const *, char const *, int)
+ ?tr@QDeclarativeDebugConnection@@SA?AVQString@@PBD0@Z @ 2846 NONAME ; class QString QDeclarativeDebugConnection::tr(char const *, char const *)
+ ?tr@QDeclarativeDebugConnection@@SA?AVQString@@PBD0H@Z @ 2847 NONAME ; class QString QDeclarativeDebugConnection::tr(char const *, char const *, int)
+ ?tr@QDeclarativeDebugEnginesQuery@@SA?AVQString@@PBD0@Z @ 2848 NONAME ; class QString QDeclarativeDebugEnginesQuery::tr(char const *, char const *)
+ ?tr@QDeclarativeDebugEnginesQuery@@SA?AVQString@@PBD0H@Z @ 2849 NONAME ; class QString QDeclarativeDebugEnginesQuery::tr(char const *, char const *, int)
+ ?tr@QDeclarativeDebugExpressionQuery@@SA?AVQString@@PBD0@Z @ 2850 NONAME ; class QString QDeclarativeDebugExpressionQuery::tr(char const *, char const *)
+ ?tr@QDeclarativeDebugExpressionQuery@@SA?AVQString@@PBD0H@Z @ 2851 NONAME ; class QString QDeclarativeDebugExpressionQuery::tr(char const *, char const *, int)
+ ?tr@QDeclarativeDebugObjectExpressionWatch@@SA?AVQString@@PBD0@Z @ 2852 NONAME ; class QString QDeclarativeDebugObjectExpressionWatch::tr(char const *, char const *)
+ ?tr@QDeclarativeDebugObjectExpressionWatch@@SA?AVQString@@PBD0H@Z @ 2853 NONAME ; class QString QDeclarativeDebugObjectExpressionWatch::tr(char const *, char const *, int)
+ ?tr@QDeclarativeDebugObjectQuery@@SA?AVQString@@PBD0@Z @ 2854 NONAME ; class QString QDeclarativeDebugObjectQuery::tr(char const *, char const *)
+ ?tr@QDeclarativeDebugObjectQuery@@SA?AVQString@@PBD0H@Z @ 2855 NONAME ; class QString QDeclarativeDebugObjectQuery::tr(char const *, char const *, int)
+ ?tr@QDeclarativeDebugPropertyWatch@@SA?AVQString@@PBD0@Z @ 2856 NONAME ; class QString QDeclarativeDebugPropertyWatch::tr(char const *, char const *)
+ ?tr@QDeclarativeDebugPropertyWatch@@SA?AVQString@@PBD0H@Z @ 2857 NONAME ; class QString QDeclarativeDebugPropertyWatch::tr(char const *, char const *, int)
+ ?tr@QDeclarativeDebugQuery@@SA?AVQString@@PBD0@Z @ 2858 NONAME ; class QString QDeclarativeDebugQuery::tr(char const *, char const *)
+ ?tr@QDeclarativeDebugQuery@@SA?AVQString@@PBD0H@Z @ 2859 NONAME ; class QString QDeclarativeDebugQuery::tr(char const *, char const *, int)
+ ?tr@QDeclarativeDebugRootContextQuery@@SA?AVQString@@PBD0@Z @ 2860 NONAME ; class QString QDeclarativeDebugRootContextQuery::tr(char const *, char const *)
+ ?tr@QDeclarativeDebugRootContextQuery@@SA?AVQString@@PBD0H@Z @ 2861 NONAME ; class QString QDeclarativeDebugRootContextQuery::tr(char const *, char const *, int)
+ ?tr@QDeclarativeDebugService@@SA?AVQString@@PBD0@Z @ 2862 NONAME ; class QString QDeclarativeDebugService::tr(char const *, char const *)
+ ?tr@QDeclarativeDebugService@@SA?AVQString@@PBD0H@Z @ 2863 NONAME ; class QString QDeclarativeDebugService::tr(char const *, char const *, int)
+ ?tr@QDeclarativeDebugWatch@@SA?AVQString@@PBD0@Z @ 2864 NONAME ; class QString QDeclarativeDebugWatch::tr(char const *, char const *)
+ ?tr@QDeclarativeDebugWatch@@SA?AVQString@@PBD0H@Z @ 2865 NONAME ; class QString QDeclarativeDebugWatch::tr(char const *, char const *, int)
+ ?tr@QDeclarativeDrag@@SA?AVQString@@PBD0@Z @ 2866 NONAME ; class QString QDeclarativeDrag::tr(char const *, char const *)
+ ?tr@QDeclarativeDrag@@SA?AVQString@@PBD0H@Z @ 2867 NONAME ; class QString QDeclarativeDrag::tr(char const *, char const *, int)
+ ?tr@QDeclarativeEaseFollow@@SA?AVQString@@PBD0@Z @ 2868 NONAME ; class QString QDeclarativeEaseFollow::tr(char const *, char const *)
+ ?tr@QDeclarativeEaseFollow@@SA?AVQString@@PBD0H@Z @ 2869 NONAME ; class QString QDeclarativeEaseFollow::tr(char const *, char const *, int)
+ ?tr@QDeclarativeEngine@@SA?AVQString@@PBD0@Z @ 2870 NONAME ; class QString QDeclarativeEngine::tr(char const *, char const *)
+ ?tr@QDeclarativeEngine@@SA?AVQString@@PBD0H@Z @ 2871 NONAME ; class QString QDeclarativeEngine::tr(char const *, char const *, int)
+ ?tr@QDeclarativeEngineDebug@@SA?AVQString@@PBD0@Z @ 2872 NONAME ; class QString QDeclarativeEngineDebug::tr(char const *, char const *)
+ ?tr@QDeclarativeEngineDebug@@SA?AVQString@@PBD0H@Z @ 2873 NONAME ; class QString QDeclarativeEngineDebug::tr(char const *, char const *, int)
+ ?tr@QDeclarativeExpression@@SA?AVQString@@PBD0@Z @ 2874 NONAME ; class QString QDeclarativeExpression::tr(char const *, char const *)
+ ?tr@QDeclarativeExpression@@SA?AVQString@@PBD0H@Z @ 2875 NONAME ; class QString QDeclarativeExpression::tr(char const *, char const *, int)
+ ?tr@QDeclarativeExtensionPlugin@@SA?AVQString@@PBD0@Z @ 2876 NONAME ; class QString QDeclarativeExtensionPlugin::tr(char const *, char const *)
+ ?tr@QDeclarativeExtensionPlugin@@SA?AVQString@@PBD0H@Z @ 2877 NONAME ; class QString QDeclarativeExtensionPlugin::tr(char const *, char const *, int)
+ ?tr@QDeclarativeFlickable@@SA?AVQString@@PBD0@Z @ 2878 NONAME ; class QString QDeclarativeFlickable::tr(char const *, char const *)
+ ?tr@QDeclarativeFlickable@@SA?AVQString@@PBD0H@Z @ 2879 NONAME ; class QString QDeclarativeFlickable::tr(char const *, char const *, int)
+ ?tr@QDeclarativeFlipable@@SA?AVQString@@PBD0@Z @ 2880 NONAME ; class QString QDeclarativeFlipable::tr(char const *, char const *)
+ ?tr@QDeclarativeFlipable@@SA?AVQString@@PBD0H@Z @ 2881 NONAME ; class QString QDeclarativeFlipable::tr(char const *, char const *, int)
+ ?tr@QDeclarativeFlow@@SA?AVQString@@PBD0@Z @ 2882 NONAME ; class QString QDeclarativeFlow::tr(char const *, char const *)
+ ?tr@QDeclarativeFlow@@SA?AVQString@@PBD0H@Z @ 2883 NONAME ; class QString QDeclarativeFlow::tr(char const *, char const *, int)
+ ?tr@QDeclarativeFocusPanel@@SA?AVQString@@PBD0@Z @ 2884 NONAME ; class QString QDeclarativeFocusPanel::tr(char const *, char const *)
+ ?tr@QDeclarativeFocusPanel@@SA?AVQString@@PBD0H@Z @ 2885 NONAME ; class QString QDeclarativeFocusPanel::tr(char const *, char const *, int)
+ ?tr@QDeclarativeFocusScope@@SA?AVQString@@PBD0@Z @ 2886 NONAME ; class QString QDeclarativeFocusScope::tr(char const *, char const *)
+ ?tr@QDeclarativeFocusScope@@SA?AVQString@@PBD0H@Z @ 2887 NONAME ; class QString QDeclarativeFocusScope::tr(char const *, char const *, int)
+ ?tr@QDeclarativeFontLoader@@SA?AVQString@@PBD0@Z @ 2888 NONAME ; class QString QDeclarativeFontLoader::tr(char const *, char const *)
+ ?tr@QDeclarativeFontLoader@@SA?AVQString@@PBD0H@Z @ 2889 NONAME ; class QString QDeclarativeFontLoader::tr(char const *, char const *, int)
+ ?tr@QDeclarativeGradient@@SA?AVQString@@PBD0@Z @ 2890 NONAME ; class QString QDeclarativeGradient::tr(char const *, char const *)
+ ?tr@QDeclarativeGradient@@SA?AVQString@@PBD0H@Z @ 2891 NONAME ; class QString QDeclarativeGradient::tr(char const *, char const *, int)
+ ?tr@QDeclarativeGradientStop@@SA?AVQString@@PBD0@Z @ 2892 NONAME ; class QString QDeclarativeGradientStop::tr(char const *, char const *)
+ ?tr@QDeclarativeGradientStop@@SA?AVQString@@PBD0H@Z @ 2893 NONAME ; class QString QDeclarativeGradientStop::tr(char const *, char const *, int)
+ ?tr@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0@Z @ 2894 NONAME ; class QString QDeclarativeGraphicsObjectContainer::tr(char const *, char const *)
+ ?tr@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0H@Z @ 2895 NONAME ; class QString QDeclarativeGraphicsObjectContainer::tr(char const *, char const *, int)
+ ?tr@QDeclarativeGrid@@SA?AVQString@@PBD0@Z @ 2896 NONAME ; class QString QDeclarativeGrid::tr(char const *, char const *)
+ ?tr@QDeclarativeGrid@@SA?AVQString@@PBD0H@Z @ 2897 NONAME ; class QString QDeclarativeGrid::tr(char const *, char const *, int)
+ ?tr@QDeclarativeGridView@@SA?AVQString@@PBD0@Z @ 2898 NONAME ; class QString QDeclarativeGridView::tr(char const *, char const *)
+ ?tr@QDeclarativeGridView@@SA?AVQString@@PBD0H@Z @ 2899 NONAME ; class QString QDeclarativeGridView::tr(char const *, char const *, int)
+ ?tr@QDeclarativeImage@@SA?AVQString@@PBD0@Z @ 2900 NONAME ; class QString QDeclarativeImage::tr(char const *, char const *)
+ ?tr@QDeclarativeImage@@SA?AVQString@@PBD0H@Z @ 2901 NONAME ; class QString QDeclarativeImage::tr(char const *, char const *, int)
+ ?tr@QDeclarativeImageBase@@SA?AVQString@@PBD0@Z @ 2902 NONAME ; class QString QDeclarativeImageBase::tr(char const *, char const *)
+ ?tr@QDeclarativeImageBase@@SA?AVQString@@PBD0H@Z @ 2903 NONAME ; class QString QDeclarativeImageBase::tr(char const *, char const *, int)
+ ?tr@QDeclarativeItem@@SA?AVQString@@PBD0@Z @ 2904 NONAME ; class QString QDeclarativeItem::tr(char const *, char const *)
+ ?tr@QDeclarativeItem@@SA?AVQString@@PBD0H@Z @ 2905 NONAME ; class QString QDeclarativeItem::tr(char const *, char const *, int)
+ ?tr@QDeclarativeListModel@@SA?AVQString@@PBD0@Z @ 2906 NONAME ; class QString QDeclarativeListModel::tr(char const *, char const *)
+ ?tr@QDeclarativeListModel@@SA?AVQString@@PBD0H@Z @ 2907 NONAME ; class QString QDeclarativeListModel::tr(char const *, char const *, int)
+ ?tr@QDeclarativeListView@@SA?AVQString@@PBD0@Z @ 2908 NONAME ; class QString QDeclarativeListView::tr(char const *, char const *)
+ ?tr@QDeclarativeListView@@SA?AVQString@@PBD0H@Z @ 2909 NONAME ; class QString QDeclarativeListView::tr(char const *, char const *, int)
+ ?tr@QDeclarativeLoader@@SA?AVQString@@PBD0@Z @ 2910 NONAME ; class QString QDeclarativeLoader::tr(char const *, char const *)
+ ?tr@QDeclarativeLoader@@SA?AVQString@@PBD0H@Z @ 2911 NONAME ; class QString QDeclarativeLoader::tr(char const *, char const *, int)
+ ?tr@QDeclarativeMouseArea@@SA?AVQString@@PBD0@Z @ 2912 NONAME ; class QString QDeclarativeMouseArea::tr(char const *, char const *)
+ ?tr@QDeclarativeMouseArea@@SA?AVQString@@PBD0H@Z @ 2913 NONAME ; class QString QDeclarativeMouseArea::tr(char const *, char const *, int)
+ ?tr@QDeclarativeNumberFormatter@@SA?AVQString@@PBD0@Z @ 2914 NONAME ; class QString QDeclarativeNumberFormatter::tr(char const *, char const *)
+ ?tr@QDeclarativeNumberFormatter@@SA?AVQString@@PBD0H@Z @ 2915 NONAME ; class QString QDeclarativeNumberFormatter::tr(char const *, char const *, int)
+ ?tr@QDeclarativePaintedItem@@SA?AVQString@@PBD0@Z @ 2916 NONAME ; class QString QDeclarativePaintedItem::tr(char const *, char const *)
+ ?tr@QDeclarativePaintedItem@@SA?AVQString@@PBD0H@Z @ 2917 NONAME ; class QString QDeclarativePaintedItem::tr(char const *, char const *, int)
+ ?tr@QDeclarativeParentChange@@SA?AVQString@@PBD0@Z @ 2918 NONAME ; class QString QDeclarativeParentChange::tr(char const *, char const *)
+ ?tr@QDeclarativeParentChange@@SA?AVQString@@PBD0H@Z @ 2919 NONAME ; class QString QDeclarativeParentChange::tr(char const *, char const *, int)
+ ?tr@QDeclarativeParticleMotion@@SA?AVQString@@PBD0@Z @ 2920 NONAME ; class QString QDeclarativeParticleMotion::tr(char const *, char const *)
+ ?tr@QDeclarativeParticleMotion@@SA?AVQString@@PBD0H@Z @ 2921 NONAME ; class QString QDeclarativeParticleMotion::tr(char const *, char const *, int)
+ ?tr@QDeclarativeParticleMotionGravity@@SA?AVQString@@PBD0@Z @ 2922 NONAME ; class QString QDeclarativeParticleMotionGravity::tr(char const *, char const *)
+ ?tr@QDeclarativeParticleMotionGravity@@SA?AVQString@@PBD0H@Z @ 2923 NONAME ; class QString QDeclarativeParticleMotionGravity::tr(char const *, char const *, int)
+ ?tr@QDeclarativeParticleMotionLinear@@SA?AVQString@@PBD0@Z @ 2924 NONAME ; class QString QDeclarativeParticleMotionLinear::tr(char const *, char const *)
+ ?tr@QDeclarativeParticleMotionLinear@@SA?AVQString@@PBD0H@Z @ 2925 NONAME ; class QString QDeclarativeParticleMotionLinear::tr(char const *, char const *, int)
+ ?tr@QDeclarativeParticleMotionWander@@SA?AVQString@@PBD0@Z @ 2926 NONAME ; class QString QDeclarativeParticleMotionWander::tr(char const *, char const *)
+ ?tr@QDeclarativeParticleMotionWander@@SA?AVQString@@PBD0H@Z @ 2927 NONAME ; class QString QDeclarativeParticleMotionWander::tr(char const *, char const *, int)
+ ?tr@QDeclarativeParticles@@SA?AVQString@@PBD0@Z @ 2928 NONAME ; class QString QDeclarativeParticles::tr(char const *, char const *)
+ ?tr@QDeclarativeParticles@@SA?AVQString@@PBD0H@Z @ 2929 NONAME ; class QString QDeclarativeParticles::tr(char const *, char const *, int)
+ ?tr@QDeclarativePath@@SA?AVQString@@PBD0@Z @ 2930 NONAME ; class QString QDeclarativePath::tr(char const *, char const *)
+ ?tr@QDeclarativePath@@SA?AVQString@@PBD0H@Z @ 2931 NONAME ; class QString QDeclarativePath::tr(char const *, char const *, int)
+ ?tr@QDeclarativePathAttribute@@SA?AVQString@@PBD0@Z @ 2932 NONAME ; class QString QDeclarativePathAttribute::tr(char const *, char const *)
+ ?tr@QDeclarativePathAttribute@@SA?AVQString@@PBD0H@Z @ 2933 NONAME ; class QString QDeclarativePathAttribute::tr(char const *, char const *, int)
+ ?tr@QDeclarativePathCubic@@SA?AVQString@@PBD0@Z @ 2934 NONAME ; class QString QDeclarativePathCubic::tr(char const *, char const *)
+ ?tr@QDeclarativePathCubic@@SA?AVQString@@PBD0H@Z @ 2935 NONAME ; class QString QDeclarativePathCubic::tr(char const *, char const *, int)
+ ?tr@QDeclarativePathElement@@SA?AVQString@@PBD0@Z @ 2936 NONAME ; class QString QDeclarativePathElement::tr(char const *, char const *)
+ ?tr@QDeclarativePathElement@@SA?AVQString@@PBD0H@Z @ 2937 NONAME ; class QString QDeclarativePathElement::tr(char const *, char const *, int)
+ ?tr@QDeclarativePathLine@@SA?AVQString@@PBD0@Z @ 2938 NONAME ; class QString QDeclarativePathLine::tr(char const *, char const *)
+ ?tr@QDeclarativePathLine@@SA?AVQString@@PBD0H@Z @ 2939 NONAME ; class QString QDeclarativePathLine::tr(char const *, char const *, int)
+ ?tr@QDeclarativePathPercent@@SA?AVQString@@PBD0@Z @ 2940 NONAME ; class QString QDeclarativePathPercent::tr(char const *, char const *)
+ ?tr@QDeclarativePathPercent@@SA?AVQString@@PBD0H@Z @ 2941 NONAME ; class QString QDeclarativePathPercent::tr(char const *, char const *, int)
+ ?tr@QDeclarativePathQuad@@SA?AVQString@@PBD0@Z @ 2942 NONAME ; class QString QDeclarativePathQuad::tr(char const *, char const *)
+ ?tr@QDeclarativePathQuad@@SA?AVQString@@PBD0H@Z @ 2943 NONAME ; class QString QDeclarativePathQuad::tr(char const *, char const *, int)
+ ?tr@QDeclarativePathView@@SA?AVQString@@PBD0@Z @ 2944 NONAME ; class QString QDeclarativePathView::tr(char const *, char const *)
+ ?tr@QDeclarativePathView@@SA?AVQString@@PBD0H@Z @ 2945 NONAME ; class QString QDeclarativePathView::tr(char const *, char const *, int)
+ ?tr@QDeclarativePen@@SA?AVQString@@PBD0@Z @ 2946 NONAME ; class QString QDeclarativePen::tr(char const *, char const *)
+ ?tr@QDeclarativePen@@SA?AVQString@@PBD0H@Z @ 2947 NONAME ; class QString QDeclarativePen::tr(char const *, char const *, int)
+ ?tr@QDeclarativePixmapReply@@SA?AVQString@@PBD0@Z @ 2948 NONAME ; class QString QDeclarativePixmapReply::tr(char const *, char const *)
+ ?tr@QDeclarativePixmapReply@@SA?AVQString@@PBD0H@Z @ 2949 NONAME ; class QString QDeclarativePixmapReply::tr(char const *, char const *, int)
+ ?tr@QDeclarativePropertyChanges@@SA?AVQString@@PBD0@Z @ 2950 NONAME ; class QString QDeclarativePropertyChanges::tr(char const *, char const *)
+ ?tr@QDeclarativePropertyChanges@@SA?AVQString@@PBD0H@Z @ 2951 NONAME ; class QString QDeclarativePropertyChanges::tr(char const *, char const *, int)
+ ?tr@QDeclarativePropertyMap@@SA?AVQString@@PBD0@Z @ 2952 NONAME ; class QString QDeclarativePropertyMap::tr(char const *, char const *)
+ ?tr@QDeclarativePropertyMap@@SA?AVQString@@PBD0H@Z @ 2953 NONAME ; class QString QDeclarativePropertyMap::tr(char const *, char const *, int)
+ ?tr@QDeclarativeRectangle@@SA?AVQString@@PBD0@Z @ 2954 NONAME ; class QString QDeclarativeRectangle::tr(char const *, char const *)
+ ?tr@QDeclarativeRectangle@@SA?AVQString@@PBD0H@Z @ 2955 NONAME ; class QString QDeclarativeRectangle::tr(char const *, char const *, int)
+ ?tr@QDeclarativeRepeater@@SA?AVQString@@PBD0@Z @ 2956 NONAME ; class QString QDeclarativeRepeater::tr(char const *, char const *)
+ ?tr@QDeclarativeRepeater@@SA?AVQString@@PBD0H@Z @ 2957 NONAME ; class QString QDeclarativeRepeater::tr(char const *, char const *, int)
+ ?tr@QDeclarativeRow@@SA?AVQString@@PBD0@Z @ 2958 NONAME ; class QString QDeclarativeRow::tr(char const *, char const *)
+ ?tr@QDeclarativeRow@@SA?AVQString@@PBD0H@Z @ 2959 NONAME ; class QString QDeclarativeRow::tr(char const *, char const *, int)
+ ?tr@QDeclarativeScaleGrid@@SA?AVQString@@PBD0@Z @ 2960 NONAME ; class QString QDeclarativeScaleGrid::tr(char const *, char const *)
+ ?tr@QDeclarativeScaleGrid@@SA?AVQString@@PBD0H@Z @ 2961 NONAME ; class QString QDeclarativeScaleGrid::tr(char const *, char const *, int)
+ ?tr@QDeclarativeSpringFollow@@SA?AVQString@@PBD0@Z @ 2962 NONAME ; class QString QDeclarativeSpringFollow::tr(char const *, char const *)
+ ?tr@QDeclarativeSpringFollow@@SA?AVQString@@PBD0H@Z @ 2963 NONAME ; class QString QDeclarativeSpringFollow::tr(char const *, char const *, int)
+ ?tr@QDeclarativeState@@SA?AVQString@@PBD0@Z @ 2964 NONAME ; class QString QDeclarativeState::tr(char const *, char const *)
+ ?tr@QDeclarativeState@@SA?AVQString@@PBD0H@Z @ 2965 NONAME ; class QString QDeclarativeState::tr(char const *, char const *, int)
+ ?tr@QDeclarativeStateChangeScript@@SA?AVQString@@PBD0@Z @ 2966 NONAME ; class QString QDeclarativeStateChangeScript::tr(char const *, char const *)
+ ?tr@QDeclarativeStateChangeScript@@SA?AVQString@@PBD0H@Z @ 2967 NONAME ; class QString QDeclarativeStateChangeScript::tr(char const *, char const *, int)
+ ?tr@QDeclarativeStateGroup@@SA?AVQString@@PBD0@Z @ 2968 NONAME ; class QString QDeclarativeStateGroup::tr(char const *, char const *)
+ ?tr@QDeclarativeStateGroup@@SA?AVQString@@PBD0H@Z @ 2969 NONAME ; class QString QDeclarativeStateGroup::tr(char const *, char const *, int)
+ ?tr@QDeclarativeStateOperation@@SA?AVQString@@PBD0@Z @ 2970 NONAME ; class QString QDeclarativeStateOperation::tr(char const *, char const *)
+ ?tr@QDeclarativeStateOperation@@SA?AVQString@@PBD0H@Z @ 2971 NONAME ; class QString QDeclarativeStateOperation::tr(char const *, char const *, int)
+ ?tr@QDeclarativeSystemPalette@@SA?AVQString@@PBD0@Z @ 2972 NONAME ; class QString QDeclarativeSystemPalette::tr(char const *, char const *)
+ ?tr@QDeclarativeSystemPalette@@SA?AVQString@@PBD0H@Z @ 2973 NONAME ; class QString QDeclarativeSystemPalette::tr(char const *, char const *, int)
+ ?tr@QDeclarativeText@@SA?AVQString@@PBD0@Z @ 2974 NONAME ; class QString QDeclarativeText::tr(char const *, char const *)
+ ?tr@QDeclarativeText@@SA?AVQString@@PBD0H@Z @ 2975 NONAME ; class QString QDeclarativeText::tr(char const *, char const *, int)
+ ?tr@QDeclarativeTextEdit@@SA?AVQString@@PBD0@Z @ 2976 NONAME ; class QString QDeclarativeTextEdit::tr(char const *, char const *)
+ ?tr@QDeclarativeTextEdit@@SA?AVQString@@PBD0H@Z @ 2977 NONAME ; class QString QDeclarativeTextEdit::tr(char const *, char const *, int)
+ ?tr@QDeclarativeTextInput@@SA?AVQString@@PBD0@Z @ 2978 NONAME ; class QString QDeclarativeTextInput::tr(char const *, char const *)
+ ?tr@QDeclarativeTextInput@@SA?AVQString@@PBD0H@Z @ 2979 NONAME ; class QString QDeclarativeTextInput::tr(char const *, char const *, int)
+ ?tr@QDeclarativeTimer@@SA?AVQString@@PBD0@Z @ 2980 NONAME ; class QString QDeclarativeTimer::tr(char const *, char const *)
+ ?tr@QDeclarativeTimer@@SA?AVQString@@PBD0H@Z @ 2981 NONAME ; class QString QDeclarativeTimer::tr(char const *, char const *, int)
+ ?tr@QDeclarativeTransition@@SA?AVQString@@PBD0@Z @ 2982 NONAME ; class QString QDeclarativeTransition::tr(char const *, char const *)
+ ?tr@QDeclarativeTransition@@SA?AVQString@@PBD0H@Z @ 2983 NONAME ; class QString QDeclarativeTransition::tr(char const *, char const *, int)
+ ?tr@QDeclarativeValueType@@SA?AVQString@@PBD0@Z @ 2984 NONAME ; class QString QDeclarativeValueType::tr(char const *, char const *)
+ ?tr@QDeclarativeValueType@@SA?AVQString@@PBD0H@Z @ 2985 NONAME ; class QString QDeclarativeValueType::tr(char const *, char const *, int)
+ ?tr@QDeclarativeView@@SA?AVQString@@PBD0@Z @ 2986 NONAME ; class QString QDeclarativeView::tr(char const *, char const *)
+ ?tr@QDeclarativeView@@SA?AVQString@@PBD0H@Z @ 2987 NONAME ; class QString QDeclarativeView::tr(char const *, char const *, int)
+ ?tr@QDeclarativeViewSection@@SA?AVQString@@PBD0@Z @ 2988 NONAME ; class QString QDeclarativeViewSection::tr(char const *, char const *)
+ ?tr@QDeclarativeViewSection@@SA?AVQString@@PBD0H@Z @ 2989 NONAME ; class QString QDeclarativeViewSection::tr(char const *, char const *, int)
+ ?tr@QDeclarativeVisualDataModel@@SA?AVQString@@PBD0@Z @ 2990 NONAME ; class QString QDeclarativeVisualDataModel::tr(char const *, char const *)
+ ?tr@QDeclarativeVisualDataModel@@SA?AVQString@@PBD0H@Z @ 2991 NONAME ; class QString QDeclarativeVisualDataModel::tr(char const *, char const *, int)
+ ?tr@QDeclarativeVisualItemModel@@SA?AVQString@@PBD0@Z @ 2992 NONAME ; class QString QDeclarativeVisualItemModel::tr(char const *, char const *)
+ ?tr@QDeclarativeVisualItemModel@@SA?AVQString@@PBD0H@Z @ 2993 NONAME ; class QString QDeclarativeVisualItemModel::tr(char const *, char const *, int)
+ ?tr@QDeclarativeVisualModel@@SA?AVQString@@PBD0@Z @ 2994 NONAME ; class QString QDeclarativeVisualModel::tr(char const *, char const *)
+ ?tr@QDeclarativeVisualModel@@SA?AVQString@@PBD0H@Z @ 2995 NONAME ; class QString QDeclarativeVisualModel::tr(char const *, char const *, int)
+ ?tr@QDeclarativeWebPage@@SA?AVQString@@PBD0@Z @ 2996 NONAME ; class QString QDeclarativeWebPage::tr(char const *, char const *)
+ ?tr@QDeclarativeWebPage@@SA?AVQString@@PBD0H@Z @ 2997 NONAME ; class QString QDeclarativeWebPage::tr(char const *, char const *, int)
+ ?tr@QDeclarativeWebView@@SA?AVQString@@PBD0@Z @ 2998 NONAME ; class QString QDeclarativeWebView::tr(char const *, char const *)
+ ?tr@QDeclarativeWebView@@SA?AVQString@@PBD0H@Z @ 2999 NONAME ; class QString QDeclarativeWebView::tr(char const *, char const *, int)
+ ?tr@QDeclarativeXmlListModel@@SA?AVQString@@PBD0@Z @ 3000 NONAME ; class QString QDeclarativeXmlListModel::tr(char const *, char const *)
+ ?tr@QDeclarativeXmlListModel@@SA?AVQString@@PBD0H@Z @ 3001 NONAME ; class QString QDeclarativeXmlListModel::tr(char const *, char const *, int)
+ ?tr@QDeclarativeXmlListModelRole@@SA?AVQString@@PBD0@Z @ 3002 NONAME ; class QString QDeclarativeXmlListModelRole::tr(char const *, char const *)
+ ?tr@QDeclarativeXmlListModelRole@@SA?AVQString@@PBD0H@Z @ 3003 NONAME ; class QString QDeclarativeXmlListModelRole::tr(char const *, char const *, int)
+ ?tr@QListModelInterface@@SA?AVQString@@PBD0@Z @ 3004 NONAME ; class QString QListModelInterface::tr(char const *, char const *)
+ ?tr@QListModelInterface@@SA?AVQString@@PBD0H@Z @ 3005 NONAME ; class QString QListModelInterface::tr(char const *, char const *, int)
+ ?tr@QPacketProtocol@@SA?AVQString@@PBD0@Z @ 3006 NONAME ; class QString QPacketProtocol::tr(char const *, char const *)
+ ?tr@QPacketProtocol@@SA?AVQString@@PBD0H@Z @ 3007 NONAME ; class QString QPacketProtocol::tr(char const *, char const *, int)
+ ?trUtf8@QDeclarativeAnchorChanges@@SA?AVQString@@PBD0@Z @ 3008 NONAME ; class QString QDeclarativeAnchorChanges::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeAnchorChanges@@SA?AVQString@@PBD0H@Z @ 3009 NONAME ; class QString QDeclarativeAnchorChanges::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeAnchors@@SA?AVQString@@PBD0@Z @ 3010 NONAME ; class QString QDeclarativeAnchors::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeAnchors@@SA?AVQString@@PBD0H@Z @ 3011 NONAME ; class QString QDeclarativeAnchors::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeAnimatedImage@@SA?AVQString@@PBD0@Z @ 3012 NONAME ; class QString QDeclarativeAnimatedImage::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeAnimatedImage@@SA?AVQString@@PBD0H@Z @ 3013 NONAME ; class QString QDeclarativeAnimatedImage::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeBasePositioner@@SA?AVQString@@PBD0@Z @ 3014 NONAME ; class QString QDeclarativeBasePositioner::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeBasePositioner@@SA?AVQString@@PBD0H@Z @ 3015 NONAME ; class QString QDeclarativeBasePositioner::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeBehavior@@SA?AVQString@@PBD0@Z @ 3016 NONAME ; class QString QDeclarativeBehavior::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeBehavior@@SA?AVQString@@PBD0H@Z @ 3017 NONAME ; class QString QDeclarativeBehavior::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeBind@@SA?AVQString@@PBD0@Z @ 3018 NONAME ; class QString QDeclarativeBind::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeBind@@SA?AVQString@@PBD0H@Z @ 3019 NONAME ; class QString QDeclarativeBind::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeBorderImage@@SA?AVQString@@PBD0@Z @ 3020 NONAME ; class QString QDeclarativeBorderImage::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeBorderImage@@SA?AVQString@@PBD0H@Z @ 3021 NONAME ; class QString QDeclarativeBorderImage::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeColumn@@SA?AVQString@@PBD0@Z @ 3022 NONAME ; class QString QDeclarativeColumn::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeColumn@@SA?AVQString@@PBD0H@Z @ 3023 NONAME ; class QString QDeclarativeColumn::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeComponent@@SA?AVQString@@PBD0@Z @ 3024 NONAME ; class QString QDeclarativeComponent::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeComponent@@SA?AVQString@@PBD0H@Z @ 3025 NONAME ; class QString QDeclarativeComponent::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeConnections@@SA?AVQString@@PBD0@Z @ 3026 NONAME ; class QString QDeclarativeConnections::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeConnections@@SA?AVQString@@PBD0H@Z @ 3027 NONAME ; class QString QDeclarativeConnections::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeContext@@SA?AVQString@@PBD0@Z @ 3028 NONAME ; class QString QDeclarativeContext::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeContext@@SA?AVQString@@PBD0H@Z @ 3029 NONAME ; class QString QDeclarativeContext::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeCurve@@SA?AVQString@@PBD0@Z @ 3030 NONAME ; class QString QDeclarativeCurve::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeCurve@@SA?AVQString@@PBD0H@Z @ 3031 NONAME ; class QString QDeclarativeCurve::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeDateTimeFormatter@@SA?AVQString@@PBD0@Z @ 3032 NONAME ; class QString QDeclarativeDateTimeFormatter::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeDateTimeFormatter@@SA?AVQString@@PBD0H@Z @ 3033 NONAME ; class QString QDeclarativeDateTimeFormatter::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeDebugClient@@SA?AVQString@@PBD0@Z @ 3034 NONAME ; class QString QDeclarativeDebugClient::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeDebugClient@@SA?AVQString@@PBD0H@Z @ 3035 NONAME ; class QString QDeclarativeDebugClient::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeDebugConnection@@SA?AVQString@@PBD0@Z @ 3036 NONAME ; class QString QDeclarativeDebugConnection::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeDebugConnection@@SA?AVQString@@PBD0H@Z @ 3037 NONAME ; class QString QDeclarativeDebugConnection::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeDebugEnginesQuery@@SA?AVQString@@PBD0@Z @ 3038 NONAME ; class QString QDeclarativeDebugEnginesQuery::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeDebugEnginesQuery@@SA?AVQString@@PBD0H@Z @ 3039 NONAME ; class QString QDeclarativeDebugEnginesQuery::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeDebugExpressionQuery@@SA?AVQString@@PBD0@Z @ 3040 NONAME ; class QString QDeclarativeDebugExpressionQuery::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeDebugExpressionQuery@@SA?AVQString@@PBD0H@Z @ 3041 NONAME ; class QString QDeclarativeDebugExpressionQuery::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeDebugObjectExpressionWatch@@SA?AVQString@@PBD0@Z @ 3042 NONAME ; class QString QDeclarativeDebugObjectExpressionWatch::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeDebugObjectExpressionWatch@@SA?AVQString@@PBD0H@Z @ 3043 NONAME ; class QString QDeclarativeDebugObjectExpressionWatch::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeDebugObjectQuery@@SA?AVQString@@PBD0@Z @ 3044 NONAME ; class QString QDeclarativeDebugObjectQuery::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeDebugObjectQuery@@SA?AVQString@@PBD0H@Z @ 3045 NONAME ; class QString QDeclarativeDebugObjectQuery::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeDebugPropertyWatch@@SA?AVQString@@PBD0@Z @ 3046 NONAME ; class QString QDeclarativeDebugPropertyWatch::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeDebugPropertyWatch@@SA?AVQString@@PBD0H@Z @ 3047 NONAME ; class QString QDeclarativeDebugPropertyWatch::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeDebugQuery@@SA?AVQString@@PBD0@Z @ 3048 NONAME ; class QString QDeclarativeDebugQuery::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeDebugQuery@@SA?AVQString@@PBD0H@Z @ 3049 NONAME ; class QString QDeclarativeDebugQuery::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeDebugRootContextQuery@@SA?AVQString@@PBD0@Z @ 3050 NONAME ; class QString QDeclarativeDebugRootContextQuery::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeDebugRootContextQuery@@SA?AVQString@@PBD0H@Z @ 3051 NONAME ; class QString QDeclarativeDebugRootContextQuery::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeDebugService@@SA?AVQString@@PBD0@Z @ 3052 NONAME ; class QString QDeclarativeDebugService::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeDebugService@@SA?AVQString@@PBD0H@Z @ 3053 NONAME ; class QString QDeclarativeDebugService::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeDebugWatch@@SA?AVQString@@PBD0@Z @ 3054 NONAME ; class QString QDeclarativeDebugWatch::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeDebugWatch@@SA?AVQString@@PBD0H@Z @ 3055 NONAME ; class QString QDeclarativeDebugWatch::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeDrag@@SA?AVQString@@PBD0@Z @ 3056 NONAME ; class QString QDeclarativeDrag::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeDrag@@SA?AVQString@@PBD0H@Z @ 3057 NONAME ; class QString QDeclarativeDrag::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeEaseFollow@@SA?AVQString@@PBD0@Z @ 3058 NONAME ; class QString QDeclarativeEaseFollow::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeEaseFollow@@SA?AVQString@@PBD0H@Z @ 3059 NONAME ; class QString QDeclarativeEaseFollow::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeEngine@@SA?AVQString@@PBD0@Z @ 3060 NONAME ; class QString QDeclarativeEngine::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeEngine@@SA?AVQString@@PBD0H@Z @ 3061 NONAME ; class QString QDeclarativeEngine::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeEngineDebug@@SA?AVQString@@PBD0@Z @ 3062 NONAME ; class QString QDeclarativeEngineDebug::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeEngineDebug@@SA?AVQString@@PBD0H@Z @ 3063 NONAME ; class QString QDeclarativeEngineDebug::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeExpression@@SA?AVQString@@PBD0@Z @ 3064 NONAME ; class QString QDeclarativeExpression::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeExpression@@SA?AVQString@@PBD0H@Z @ 3065 NONAME ; class QString QDeclarativeExpression::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeExtensionPlugin@@SA?AVQString@@PBD0@Z @ 3066 NONAME ; class QString QDeclarativeExtensionPlugin::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeExtensionPlugin@@SA?AVQString@@PBD0H@Z @ 3067 NONAME ; class QString QDeclarativeExtensionPlugin::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeFlickable@@SA?AVQString@@PBD0@Z @ 3068 NONAME ; class QString QDeclarativeFlickable::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeFlickable@@SA?AVQString@@PBD0H@Z @ 3069 NONAME ; class QString QDeclarativeFlickable::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeFlipable@@SA?AVQString@@PBD0@Z @ 3070 NONAME ; class QString QDeclarativeFlipable::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeFlipable@@SA?AVQString@@PBD0H@Z @ 3071 NONAME ; class QString QDeclarativeFlipable::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeFlow@@SA?AVQString@@PBD0@Z @ 3072 NONAME ; class QString QDeclarativeFlow::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeFlow@@SA?AVQString@@PBD0H@Z @ 3073 NONAME ; class QString QDeclarativeFlow::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeFocusPanel@@SA?AVQString@@PBD0@Z @ 3074 NONAME ; class QString QDeclarativeFocusPanel::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeFocusPanel@@SA?AVQString@@PBD0H@Z @ 3075 NONAME ; class QString QDeclarativeFocusPanel::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeFocusScope@@SA?AVQString@@PBD0@Z @ 3076 NONAME ; class QString QDeclarativeFocusScope::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeFocusScope@@SA?AVQString@@PBD0H@Z @ 3077 NONAME ; class QString QDeclarativeFocusScope::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeFontLoader@@SA?AVQString@@PBD0@Z @ 3078 NONAME ; class QString QDeclarativeFontLoader::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeFontLoader@@SA?AVQString@@PBD0H@Z @ 3079 NONAME ; class QString QDeclarativeFontLoader::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeGradient@@SA?AVQString@@PBD0@Z @ 3080 NONAME ; class QString QDeclarativeGradient::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeGradient@@SA?AVQString@@PBD0H@Z @ 3081 NONAME ; class QString QDeclarativeGradient::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeGradientStop@@SA?AVQString@@PBD0@Z @ 3082 NONAME ; class QString QDeclarativeGradientStop::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeGradientStop@@SA?AVQString@@PBD0H@Z @ 3083 NONAME ; class QString QDeclarativeGradientStop::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0@Z @ 3084 NONAME ; class QString QDeclarativeGraphicsObjectContainer::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0H@Z @ 3085 NONAME ; class QString QDeclarativeGraphicsObjectContainer::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeGrid@@SA?AVQString@@PBD0@Z @ 3086 NONAME ; class QString QDeclarativeGrid::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeGrid@@SA?AVQString@@PBD0H@Z @ 3087 NONAME ; class QString QDeclarativeGrid::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeGridView@@SA?AVQString@@PBD0@Z @ 3088 NONAME ; class QString QDeclarativeGridView::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeGridView@@SA?AVQString@@PBD0H@Z @ 3089 NONAME ; class QString QDeclarativeGridView::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeImage@@SA?AVQString@@PBD0@Z @ 3090 NONAME ; class QString QDeclarativeImage::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeImage@@SA?AVQString@@PBD0H@Z @ 3091 NONAME ; class QString QDeclarativeImage::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeImageBase@@SA?AVQString@@PBD0@Z @ 3092 NONAME ; class QString QDeclarativeImageBase::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeImageBase@@SA?AVQString@@PBD0H@Z @ 3093 NONAME ; class QString QDeclarativeImageBase::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeItem@@SA?AVQString@@PBD0@Z @ 3094 NONAME ; class QString QDeclarativeItem::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeItem@@SA?AVQString@@PBD0H@Z @ 3095 NONAME ; class QString QDeclarativeItem::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeListModel@@SA?AVQString@@PBD0@Z @ 3096 NONAME ; class QString QDeclarativeListModel::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeListModel@@SA?AVQString@@PBD0H@Z @ 3097 NONAME ; class QString QDeclarativeListModel::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeListView@@SA?AVQString@@PBD0@Z @ 3098 NONAME ; class QString QDeclarativeListView::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeListView@@SA?AVQString@@PBD0H@Z @ 3099 NONAME ; class QString QDeclarativeListView::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeLoader@@SA?AVQString@@PBD0@Z @ 3100 NONAME ; class QString QDeclarativeLoader::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeLoader@@SA?AVQString@@PBD0H@Z @ 3101 NONAME ; class QString QDeclarativeLoader::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeMouseArea@@SA?AVQString@@PBD0@Z @ 3102 NONAME ; class QString QDeclarativeMouseArea::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeMouseArea@@SA?AVQString@@PBD0H@Z @ 3103 NONAME ; class QString QDeclarativeMouseArea::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeNumberFormatter@@SA?AVQString@@PBD0@Z @ 3104 NONAME ; class QString QDeclarativeNumberFormatter::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeNumberFormatter@@SA?AVQString@@PBD0H@Z @ 3105 NONAME ; class QString QDeclarativeNumberFormatter::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativePaintedItem@@SA?AVQString@@PBD0@Z @ 3106 NONAME ; class QString QDeclarativePaintedItem::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativePaintedItem@@SA?AVQString@@PBD0H@Z @ 3107 NONAME ; class QString QDeclarativePaintedItem::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeParentChange@@SA?AVQString@@PBD0@Z @ 3108 NONAME ; class QString QDeclarativeParentChange::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeParentChange@@SA?AVQString@@PBD0H@Z @ 3109 NONAME ; class QString QDeclarativeParentChange::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeParticleMotion@@SA?AVQString@@PBD0@Z @ 3110 NONAME ; class QString QDeclarativeParticleMotion::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeParticleMotion@@SA?AVQString@@PBD0H@Z @ 3111 NONAME ; class QString QDeclarativeParticleMotion::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeParticleMotionGravity@@SA?AVQString@@PBD0@Z @ 3112 NONAME ; class QString QDeclarativeParticleMotionGravity::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeParticleMotionGravity@@SA?AVQString@@PBD0H@Z @ 3113 NONAME ; class QString QDeclarativeParticleMotionGravity::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeParticleMotionLinear@@SA?AVQString@@PBD0@Z @ 3114 NONAME ; class QString QDeclarativeParticleMotionLinear::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeParticleMotionLinear@@SA?AVQString@@PBD0H@Z @ 3115 NONAME ; class QString QDeclarativeParticleMotionLinear::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeParticleMotionWander@@SA?AVQString@@PBD0@Z @ 3116 NONAME ; class QString QDeclarativeParticleMotionWander::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeParticleMotionWander@@SA?AVQString@@PBD0H@Z @ 3117 NONAME ; class QString QDeclarativeParticleMotionWander::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeParticles@@SA?AVQString@@PBD0@Z @ 3118 NONAME ; class QString QDeclarativeParticles::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeParticles@@SA?AVQString@@PBD0H@Z @ 3119 NONAME ; class QString QDeclarativeParticles::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativePath@@SA?AVQString@@PBD0@Z @ 3120 NONAME ; class QString QDeclarativePath::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativePath@@SA?AVQString@@PBD0H@Z @ 3121 NONAME ; class QString QDeclarativePath::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativePathAttribute@@SA?AVQString@@PBD0@Z @ 3122 NONAME ; class QString QDeclarativePathAttribute::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativePathAttribute@@SA?AVQString@@PBD0H@Z @ 3123 NONAME ; class QString QDeclarativePathAttribute::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativePathCubic@@SA?AVQString@@PBD0@Z @ 3124 NONAME ; class QString QDeclarativePathCubic::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativePathCubic@@SA?AVQString@@PBD0H@Z @ 3125 NONAME ; class QString QDeclarativePathCubic::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativePathElement@@SA?AVQString@@PBD0@Z @ 3126 NONAME ; class QString QDeclarativePathElement::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativePathElement@@SA?AVQString@@PBD0H@Z @ 3127 NONAME ; class QString QDeclarativePathElement::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativePathLine@@SA?AVQString@@PBD0@Z @ 3128 NONAME ; class QString QDeclarativePathLine::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativePathLine@@SA?AVQString@@PBD0H@Z @ 3129 NONAME ; class QString QDeclarativePathLine::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativePathPercent@@SA?AVQString@@PBD0@Z @ 3130 NONAME ; class QString QDeclarativePathPercent::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativePathPercent@@SA?AVQString@@PBD0H@Z @ 3131 NONAME ; class QString QDeclarativePathPercent::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativePathQuad@@SA?AVQString@@PBD0@Z @ 3132 NONAME ; class QString QDeclarativePathQuad::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativePathQuad@@SA?AVQString@@PBD0H@Z @ 3133 NONAME ; class QString QDeclarativePathQuad::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativePathView@@SA?AVQString@@PBD0@Z @ 3134 NONAME ; class QString QDeclarativePathView::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativePathView@@SA?AVQString@@PBD0H@Z @ 3135 NONAME ; class QString QDeclarativePathView::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativePen@@SA?AVQString@@PBD0@Z @ 3136 NONAME ; class QString QDeclarativePen::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativePen@@SA?AVQString@@PBD0H@Z @ 3137 NONAME ; class QString QDeclarativePen::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativePixmapReply@@SA?AVQString@@PBD0@Z @ 3138 NONAME ; class QString QDeclarativePixmapReply::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativePixmapReply@@SA?AVQString@@PBD0H@Z @ 3139 NONAME ; class QString QDeclarativePixmapReply::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativePropertyChanges@@SA?AVQString@@PBD0@Z @ 3140 NONAME ; class QString QDeclarativePropertyChanges::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativePropertyChanges@@SA?AVQString@@PBD0H@Z @ 3141 NONAME ; class QString QDeclarativePropertyChanges::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativePropertyMap@@SA?AVQString@@PBD0@Z @ 3142 NONAME ; class QString QDeclarativePropertyMap::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativePropertyMap@@SA?AVQString@@PBD0H@Z @ 3143 NONAME ; class QString QDeclarativePropertyMap::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeRectangle@@SA?AVQString@@PBD0@Z @ 3144 NONAME ; class QString QDeclarativeRectangle::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeRectangle@@SA?AVQString@@PBD0H@Z @ 3145 NONAME ; class QString QDeclarativeRectangle::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeRepeater@@SA?AVQString@@PBD0@Z @ 3146 NONAME ; class QString QDeclarativeRepeater::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeRepeater@@SA?AVQString@@PBD0H@Z @ 3147 NONAME ; class QString QDeclarativeRepeater::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeRow@@SA?AVQString@@PBD0@Z @ 3148 NONAME ; class QString QDeclarativeRow::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeRow@@SA?AVQString@@PBD0H@Z @ 3149 NONAME ; class QString QDeclarativeRow::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeScaleGrid@@SA?AVQString@@PBD0@Z @ 3150 NONAME ; class QString QDeclarativeScaleGrid::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeScaleGrid@@SA?AVQString@@PBD0H@Z @ 3151 NONAME ; class QString QDeclarativeScaleGrid::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeSpringFollow@@SA?AVQString@@PBD0@Z @ 3152 NONAME ; class QString QDeclarativeSpringFollow::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeSpringFollow@@SA?AVQString@@PBD0H@Z @ 3153 NONAME ; class QString QDeclarativeSpringFollow::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeState@@SA?AVQString@@PBD0@Z @ 3154 NONAME ; class QString QDeclarativeState::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeState@@SA?AVQString@@PBD0H@Z @ 3155 NONAME ; class QString QDeclarativeState::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeStateChangeScript@@SA?AVQString@@PBD0@Z @ 3156 NONAME ; class QString QDeclarativeStateChangeScript::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeStateChangeScript@@SA?AVQString@@PBD0H@Z @ 3157 NONAME ; class QString QDeclarativeStateChangeScript::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeStateGroup@@SA?AVQString@@PBD0@Z @ 3158 NONAME ; class QString QDeclarativeStateGroup::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeStateGroup@@SA?AVQString@@PBD0H@Z @ 3159 NONAME ; class QString QDeclarativeStateGroup::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeStateOperation@@SA?AVQString@@PBD0@Z @ 3160 NONAME ; class QString QDeclarativeStateOperation::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeStateOperation@@SA?AVQString@@PBD0H@Z @ 3161 NONAME ; class QString QDeclarativeStateOperation::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeSystemPalette@@SA?AVQString@@PBD0@Z @ 3162 NONAME ; class QString QDeclarativeSystemPalette::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeSystemPalette@@SA?AVQString@@PBD0H@Z @ 3163 NONAME ; class QString QDeclarativeSystemPalette::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeText@@SA?AVQString@@PBD0@Z @ 3164 NONAME ; class QString QDeclarativeText::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeText@@SA?AVQString@@PBD0H@Z @ 3165 NONAME ; class QString QDeclarativeText::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeTextEdit@@SA?AVQString@@PBD0@Z @ 3166 NONAME ; class QString QDeclarativeTextEdit::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeTextEdit@@SA?AVQString@@PBD0H@Z @ 3167 NONAME ; class QString QDeclarativeTextEdit::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeTextInput@@SA?AVQString@@PBD0@Z @ 3168 NONAME ; class QString QDeclarativeTextInput::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeTextInput@@SA?AVQString@@PBD0H@Z @ 3169 NONAME ; class QString QDeclarativeTextInput::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeTimer@@SA?AVQString@@PBD0@Z @ 3170 NONAME ; class QString QDeclarativeTimer::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeTimer@@SA?AVQString@@PBD0H@Z @ 3171 NONAME ; class QString QDeclarativeTimer::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeTransition@@SA?AVQString@@PBD0@Z @ 3172 NONAME ; class QString QDeclarativeTransition::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeTransition@@SA?AVQString@@PBD0H@Z @ 3173 NONAME ; class QString QDeclarativeTransition::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeValueType@@SA?AVQString@@PBD0@Z @ 3174 NONAME ; class QString QDeclarativeValueType::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeValueType@@SA?AVQString@@PBD0H@Z @ 3175 NONAME ; class QString QDeclarativeValueType::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeView@@SA?AVQString@@PBD0@Z @ 3176 NONAME ; class QString QDeclarativeView::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeView@@SA?AVQString@@PBD0H@Z @ 3177 NONAME ; class QString QDeclarativeView::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeViewSection@@SA?AVQString@@PBD0@Z @ 3178 NONAME ; class QString QDeclarativeViewSection::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeViewSection@@SA?AVQString@@PBD0H@Z @ 3179 NONAME ; class QString QDeclarativeViewSection::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeVisualDataModel@@SA?AVQString@@PBD0@Z @ 3180 NONAME ; class QString QDeclarativeVisualDataModel::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeVisualDataModel@@SA?AVQString@@PBD0H@Z @ 3181 NONAME ; class QString QDeclarativeVisualDataModel::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeVisualItemModel@@SA?AVQString@@PBD0@Z @ 3182 NONAME ; class QString QDeclarativeVisualItemModel::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeVisualItemModel@@SA?AVQString@@PBD0H@Z @ 3183 NONAME ; class QString QDeclarativeVisualItemModel::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeVisualModel@@SA?AVQString@@PBD0@Z @ 3184 NONAME ; class QString QDeclarativeVisualModel::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeVisualModel@@SA?AVQString@@PBD0H@Z @ 3185 NONAME ; class QString QDeclarativeVisualModel::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeWebPage@@SA?AVQString@@PBD0@Z @ 3186 NONAME ; class QString QDeclarativeWebPage::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeWebPage@@SA?AVQString@@PBD0H@Z @ 3187 NONAME ; class QString QDeclarativeWebPage::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeWebView@@SA?AVQString@@PBD0@Z @ 3188 NONAME ; class QString QDeclarativeWebView::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeWebView@@SA?AVQString@@PBD0H@Z @ 3189 NONAME ; class QString QDeclarativeWebView::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeXmlListModel@@SA?AVQString@@PBD0@Z @ 3190 NONAME ; class QString QDeclarativeXmlListModel::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeXmlListModel@@SA?AVQString@@PBD0H@Z @ 3191 NONAME ; class QString QDeclarativeXmlListModel::trUtf8(char const *, char const *, int)
+ ?trUtf8@QDeclarativeXmlListModelRole@@SA?AVQString@@PBD0@Z @ 3192 NONAME ; class QString QDeclarativeXmlListModelRole::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeXmlListModelRole@@SA?AVQString@@PBD0H@Z @ 3193 NONAME ; class QString QDeclarativeXmlListModelRole::trUtf8(char const *, char const *, int)
+ ?trUtf8@QListModelInterface@@SA?AVQString@@PBD0@Z @ 3194 NONAME ; class QString QListModelInterface::trUtf8(char const *, char const *)
+ ?trUtf8@QListModelInterface@@SA?AVQString@@PBD0H@Z @ 3195 NONAME ; class QString QListModelInterface::trUtf8(char const *, char const *, int)
+ ?trUtf8@QPacketProtocol@@SA?AVQString@@PBD0@Z @ 3196 NONAME ; class QString QPacketProtocol::trUtf8(char const *, char const *)
+ ?trUtf8@QPacketProtocol@@SA?AVQString@@PBD0H@Z @ 3197 NONAME ; class QString QPacketProtocol::trUtf8(char const *, char const *, int)
+ ?trackedPositionChanged@QDeclarativeGridView@@AAEXXZ @ 3198 NONAME ; void QDeclarativeGridView::trackedPositionChanged(void)
+ ?trackedPositionChanged@QDeclarativeListView@@AAEXXZ @ 3199 NONAME ; void QDeclarativeListView::trackedPositionChanged(void)
+ ?transform@QDeclarativeItem@@QAE?AU?$QDeclarativeListProperty@VQGraphicsTransform@@@@XZ @ 3200 NONAME ; struct QDeclarativeListProperty<class QGraphicsTransform> QDeclarativeItem::transform(void)
+ ?transformOrigin@QDeclarativeItem@@QBE?AW4TransformOrigin@1@XZ @ 3201 NONAME ; enum QDeclarativeItem::TransformOrigin QDeclarativeItem::transformOrigin(void) const
+ ?transformOriginChanged@QDeclarativeItem@@IAEXW4TransformOrigin@1@@Z @ 3202 NONAME ; void QDeclarativeItem::transformOriginChanged(enum QDeclarativeItem::TransformOrigin)
+ ?transitions@QDeclarativeItem@@QAE?AU?$QDeclarativeListProperty@VQDeclarativeTransition@@@@XZ @ 3203 NONAME ; struct QDeclarativeListProperty<class QDeclarativeTransition> QDeclarativeItem::transitions(void)
+ ?transitionsProperty@QDeclarativeStateGroup@@QAE?AU?$QDeclarativeListProperty@VQDeclarativeTransition@@@@XZ @ 3204 NONAME ; struct QDeclarativeListProperty<class QDeclarativeTransition> QDeclarativeStateGroup::transitionsProperty(void)
+ ?triggered@QDeclarativeTimer@@IAEXXZ @ 3205 NONAME ; void QDeclarativeTimer::triggered(void)
+ ?triggeredOnStart@QDeclarativeTimer@@QBE_NXZ @ 3206 NONAME ; bool QDeclarativeTimer::triggeredOnStart(void) const
+ ?type@QDeclarativeDomImport@@QBE?AW4Type@1@XZ @ 3207 NONAME ; enum QDeclarativeDomImport::Type QDeclarativeDomImport::type(void) const
+ ?type@QDeclarativeDomValue@@QBE?AW4Type@1@XZ @ 3208 NONAME ; enum QDeclarativeDomValue::Type QDeclarativeDomValue::type(void) const
+ ?type@QDeclarativeListAccessor@@QBE?AW4Type@1@XZ @ 3209 NONAME ; enum QDeclarativeListAccessor::Type QDeclarativeListAccessor::type(void) const
+ ?type@QDeclarativeOpenMetaObject@@QBEPAVQDeclarativeOpenMetaObjectType@@XZ @ 3210 NONAME ; class QDeclarativeOpenMetaObjectType * QDeclarativeOpenMetaObject::type(void) const
+ ?type@QDeclarativeProperty@@QBE?AW4Type@1@XZ @ 3211 NONAME ; enum QDeclarativeProperty::Type QDeclarativeProperty::type(void) const
+ ?type@QMetaPropertyBuilder@@QBE?AVQByteArray@@XZ @ 3212 NONAME ; class QByteArray QMetaPropertyBuilder::type(void) const
+ ?typeCategory@QDeclarativeMetaType@@SA?AW4TypeCategory@1@H@Z @ 3213 NONAME ; enum QDeclarativeMetaType::TypeCategory QDeclarativeMetaType::typeCategory(int)
+ ?typeId@QDeclarativeType@@QBEHXZ @ 3214 NONAME ; int QDeclarativeType::typeId(void) const
+ ?typeName@QDeclarativeAnchorChanges@@UBE?AVQString@@XZ @ 3215 NONAME ; class QString QDeclarativeAnchorChanges::typeName(void) const
+ ?typeName@QDeclarativeParentChange@@UBE?AVQString@@XZ @ 3216 NONAME ; class QString QDeclarativeParentChange::typeName(void) const
+ ?typeName@QDeclarativeStateChangeScript@@UBE?AVQString@@XZ @ 3217 NONAME ; class QString QDeclarativeStateChangeScript::typeName(void) const
+ ?typeName@QDeclarativeType@@QBE?AVQByteArray@@XZ @ 3218 NONAME ; class QByteArray QDeclarativeType::typeName(void) const
+ ?update@QDeclarativeTimer@@AAEXXZ @ 3219 NONAME ; void QDeclarativeTimer::update(void)
+ ?updateAutoState@QDeclarativeStateGroup@@AAE_NXZ @ 3220 NONAME ; bool QDeclarativeStateGroup::updateAutoState(void)
+ ?updateGradient@QDeclarativeGradientStop@@AAEXXZ @ 3221 NONAME ; void QDeclarativeGradientStop::updateGradient(void)
+ ?updateImgCache@QDeclarativeTextEdit@@AAEXABVQRectF@@@Z @ 3222 NONAME ; void QDeclarativeTextEdit::updateImgCache(class QRectF const &)
+ ?updatePaintedGeometry@QDeclarativeImage@@IAEXXZ @ 3223 NONAME ; void QDeclarativeImage::updatePaintedGeometry(void)
+ ?updateRect@QDeclarativeTextInput@@AAEXABVQRect@@@Z @ 3224 NONAME ; void QDeclarativeTextInput::updateRect(class QRect const &)
+ ?updateSelectionMarkers@QDeclarativeTextEdit@@AAEXXZ @ 3225 NONAME ; void QDeclarativeTextEdit::updateSelectionMarkers(void)
+ ?updateSize@QDeclarativeTextEdit@@AAEXXZ @ 3226 NONAME ; void QDeclarativeTextEdit::updateSize(void)
+ ?updateSize@QDeclarativeTextInput@@AAEX_N@Z @ 3227 NONAME ; void QDeclarativeTextInput::updateSize(bool)
+ ?updated@QDeclarativeGradient@@IAEXXZ @ 3228 NONAME ; void QDeclarativeGradient::updated(void)
+ ?uri@QDeclarativeDomImport@@QBE?AVQString@@XZ @ 3229 NONAME ; class QString QDeclarativeDomImport::uri(void) const
+ ?url@QDeclarativeComponent@@QBE?AVQUrl@@XZ @ 3230 NONAME ; class QUrl QDeclarativeComponent::url(void) const
+ ?url@QDeclarativeDebugFileReference@@QBE?AVQUrl@@XZ @ 3231 NONAME ; class QUrl QDeclarativeDebugFileReference::url(void) const
+ ?url@QDeclarativeDomObject@@QBE?AVQUrl@@XZ @ 3232 NONAME ; class QUrl QDeclarativeDomObject::url(void) const
+ ?url@QDeclarativeError@@QBE?AVQUrl@@XZ @ 3233 NONAME ; class QUrl QDeclarativeError::url(void) const
+ ?url@QDeclarativePixmapReply@@QBEABVQUrl@@XZ @ 3234 NONAME ; class QUrl const & QDeclarativePixmapReply::url(void) const
+ ?url@QDeclarativeWebView@@QBE?AVQUrl@@XZ @ 3235 NONAME ; class QUrl QDeclarativeWebView::url(void) const
+ ?urlChanged@QDeclarativeWebView@@IAEXXZ @ 3236 NONAME ; void QDeclarativeWebView::urlChanged(void)
+ ?usedAnchors@QDeclarativeAnchors@@QBE?AV?$QFlags@W4UsedAnchor@QDeclarativeAnchors@@@@XZ @ 3237 NONAME ; class QFlags<enum QDeclarativeAnchors::UsedAnchor> QDeclarativeAnchors::usedAnchors(void) const
+ ?vAlign@QDeclarativeText@@QBE?AW4VAlignment@1@XZ @ 3238 NONAME ; enum QDeclarativeText::VAlignment QDeclarativeText::vAlign(void) const
+ ?vAlign@QDeclarativeTextEdit@@QBE?AW4VAlignment@1@XZ @ 3239 NONAME ; enum QDeclarativeTextEdit::VAlignment QDeclarativeTextEdit::vAlign(void) const
+ ?vHeight@QDeclarativeFlickable@@IBEMXZ @ 3240 NONAME ; float QDeclarativeFlickable::vHeight(void) const
+ ?vWidth@QDeclarativeFlickable@@IBEMXZ @ 3241 NONAME ; float QDeclarativeFlickable::vWidth(void) const
+ ?validator@QDeclarativeTextInput@@QBEPAVQValidator@@XZ @ 3242 NONAME ; class QValidator * QDeclarativeTextInput::validator(void) const
+ ?validatorChanged@QDeclarativeTextInput@@IAEXXZ @ 3243 NONAME ; void QDeclarativeTextInput::validatorChanged(void)
+ ?value@QDeclarativeBind@@QBE?AVQVariant@@XZ @ 3244 NONAME ; class QVariant QDeclarativeBind::value(void) const
+ ?value@QDeclarativeDebugPropertyReference@@QBE?AVQVariant@@XZ @ 3245 NONAME ; class QVariant QDeclarativeDebugPropertyReference::value(void) const
+ ?value@QDeclarativeDomProperty@@QBE?AVQDeclarativeDomValue@@XZ @ 3246 NONAME ; class QDeclarativeDomValue QDeclarativeDomProperty::value(void) const
+ ?value@QDeclarativeExpression@@QAE?AVQVariant@@PA_N@Z @ 3247 NONAME ; class QVariant QDeclarativeExpression::value(bool *)
+ ?value@QDeclarativeOpenMetaObject@@QBE?AVQVariant@@ABVQByteArray@@@Z @ 3248 NONAME ; class QVariant QDeclarativeOpenMetaObject::value(class QByteArray const &) const
+ ?value@QDeclarativeOpenMetaObject@@QBE?AVQVariant@@H@Z @ 3249 NONAME ; class QVariant QDeclarativeOpenMetaObject::value(int) const
+ ?value@QDeclarativePathAttribute@@QBEMXZ @ 3250 NONAME ; float QDeclarativePathAttribute::value(void) const
+ ?value@QDeclarativePathPercent@@QBEMXZ @ 3251 NONAME ; float QDeclarativePathPercent::value(void) const
+ ?value@QDeclarativePropertyMap@@QBE?AVQVariant@@ABVQString@@@Z @ 3252 NONAME ; class QVariant QDeclarativePropertyMap::value(class QString const &) const
+ ?value@QDeclarativeSpringFollow@@QBEMXZ @ 3253 NONAME ; float QDeclarativeSpringFollow::value(void) const
+ ?value@QMetaEnumBuilder@@QBEHH@Z @ 3254 NONAME ; int QMetaEnumBuilder::value(int) const
+ ?valueChanged@QDeclarativeDebugWatch@@IAEXABVQByteArray@@ABVQVariant@@@Z @ 3255 NONAME ; void QDeclarativeDebugWatch::valueChanged(class QByteArray const &, class QVariant const &)
+ ?valueChanged@QDeclarativeExpression@@IAEXXZ @ 3256 NONAME ; void QDeclarativeExpression::valueChanged(void)
+ ?valueChanged@QDeclarativePropertyMap@@IAEXABVQString@@@Z @ 3257 NONAME ; void QDeclarativePropertyMap::valueChanged(class QString const &)
+ ?valueChanged@QDeclarativeSpringFollow@@IAEXM@Z @ 3258 NONAME ; void QDeclarativeSpringFollow::valueChanged(float)
+ ?valueForNode@QDeclarativeListModel@@ABE?AVQVariant@@PAUModelNode@@@Z @ 3259 NONAME ; class QVariant QDeclarativeListModel::valueForNode(struct ModelNode *) const
+ ?valueType@QDeclarativeValueTypeFactory@@SAPAVQDeclarativeValueType@@H@Z @ 3260 NONAME ; class QDeclarativeValueType * QDeclarativeValueTypeFactory::valueType(int)
+ ?valueTypeName@QDeclarativeDebugPropertyReference@@QBE?AVQString@@XZ @ 3261 NONAME ; class QString QDeclarativeDebugPropertyReference::valueTypeName(void) const
+ ?values@QDeclarativeDomList@@QBE?AV?$QList@VQDeclarativeDomValue@@@@XZ @ 3262 NONAME ; class QList<class QDeclarativeDomValue> QDeclarativeDomList::values(void) const
+ ?variantFromString@QDeclarativeStringConverters@@YA?AVQVariant@@ABVQString@@@Z @ 3263 NONAME ; class QVariant QDeclarativeStringConverters::variantFromString(class QString const &)
+ ?variantFromString@QDeclarativeStringConverters@@YA?AVQVariant@@ABVQString@@HPA_N@Z @ 3264 NONAME ; class QVariant QDeclarativeStringConverters::variantFromString(class QString const &, int, bool *)
+ ?vector3DFromString@QDeclarativeStringConverters@@YA?AVQVector3D@@ABVQString@@PA_N@Z @ 3265 NONAME ; class QVector3D QDeclarativeStringConverters::vector3DFromString(class QString const &, bool *)
+ ?velocity@QDeclarativeEaseFollow@@QBEMXZ @ 3266 NONAME ; float QDeclarativeEaseFollow::velocity(void) const
+ ?velocity@QDeclarativeParticles@@QBEMXZ @ 3267 NONAME ; float QDeclarativeParticles::velocity(void) const
+ ?velocity@QDeclarativeSpringFollow@@QBEMXZ @ 3268 NONAME ; float QDeclarativeSpringFollow::velocity(void) const
+ ?velocityChanged@QDeclarativeEaseFollow@@IAEXXZ @ 3269 NONAME ; void QDeclarativeEaseFollow::velocityChanged(void)
+ ?velocityChanged@QDeclarativeParticles@@IAEXXZ @ 3270 NONAME ; void QDeclarativeParticles::velocityChanged(void)
+ ?velocityDeviation@QDeclarativeParticles@@QBEMXZ @ 3271 NONAME ; float QDeclarativeParticles::velocityDeviation(void) const
+ ?velocityDeviationChanged@QDeclarativeParticles@@IAEXXZ @ 3272 NONAME ; void QDeclarativeParticles::velocityDeviationChanged(void)
+ ?version@QDeclarativeDomImport@@QBE?AVQString@@XZ @ 3273 NONAME ; class QString QDeclarativeDomImport::version(void) const
+ ?verticalAlignmentChanged@QDeclarativeText@@IAEXW4VAlignment@1@@Z @ 3274 NONAME ; void QDeclarativeText::verticalAlignmentChanged(enum QDeclarativeText::VAlignment)
+ ?verticalAlignmentChanged@QDeclarativeTextEdit@@IAEXW4VAlignment@1@@Z @ 3275 NONAME ; void QDeclarativeTextEdit::verticalAlignmentChanged(enum QDeclarativeTextEdit::VAlignment)
+ ?verticalCenter@QDeclarativeAnchorChanges@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3276 NONAME ; class QDeclarativeAnchorLine QDeclarativeAnchorChanges::verticalCenter(void) const
+ ?verticalCenter@QDeclarativeAnchors@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3277 NONAME ; class QDeclarativeAnchorLine QDeclarativeAnchors::verticalCenter(void) const
+ ?verticalCenter@QDeclarativeItem@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3278 NONAME ; class QDeclarativeAnchorLine QDeclarativeItem::verticalCenter(void) const
+ ?verticalCenterChanged@QDeclarativeAnchors@@IAEXXZ @ 3279 NONAME ; void QDeclarativeAnchors::verticalCenterChanged(void)
+ ?verticalCenterOffset@QDeclarativeAnchors@@QBEMXZ @ 3280 NONAME ; float QDeclarativeAnchors::verticalCenterOffset(void) const
+ ?verticalCenterOffsetChanged@QDeclarativeAnchors@@IAEXXZ @ 3281 NONAME ; void QDeclarativeAnchors::verticalCenterOffsetChanged(void)
+ ?verticalTileMode@QDeclarativeBorderImage@@QBE?AW4TileMode@1@XZ @ 3282 NONAME ; enum QDeclarativeBorderImage::TileMode QDeclarativeBorderImage::verticalTileMode(void) const
+ ?verticalTileModeChanged@QDeclarativeBorderImage@@IAEXXZ @ 3283 NONAME ; void QDeclarativeBorderImage::verticalTileModeChanged(void)
+ ?verticalTileRule@QDeclarativeGridScaledImage@@QBE?AW4TileMode@QDeclarativeBorderImage@@XZ @ 3284 NONAME ; enum QDeclarativeBorderImage::TileMode QDeclarativeGridScaledImage::verticalTileRule(void) const
+ ?verticalVelocity@QDeclarativeFlickable@@QBEMXZ @ 3285 NONAME ; float QDeclarativeFlickable::verticalVelocity(void) const
+ ?verticalVelocityChanged@QDeclarativeFlickable@@IAEXXZ @ 3286 NONAME ; void QDeclarativeFlickable::verticalVelocityChanged(void)
+ ?viewItem@QDeclarativeWebPage@@AAEPAVQDeclarativeWebView@@XZ @ 3287 NONAME ; class QDeclarativeWebView * QDeclarativeWebPage::viewItem(void)
+ ?viewport@QDeclarativeFlickable@@QAEPAVQDeclarativeItem@@XZ @ 3288 NONAME ; class QDeclarativeItem * QDeclarativeFlickable::viewport(void)
+ ?viewportMoved@QDeclarativeFlickable@@MAEXXZ @ 3289 NONAME ; void QDeclarativeFlickable::viewportMoved(void)
+ ?viewportMoved@QDeclarativeGridView@@MAEXXZ @ 3290 NONAME ; void QDeclarativeGridView::viewportMoved(void)
+ ?viewportMoved@QDeclarativeListView@@MAEXXZ @ 3291 NONAME ; void QDeclarativeListView::viewportMoved(void)
+ ?visibleArea@QDeclarativeFlickable@@IAEPAVQDeclarativeFlickableVisibleArea@@XZ @ 3292 NONAME ; class QDeclarativeFlickableVisibleArea * QDeclarativeFlickable::visibleArea(void)
+ ?waitForClients@QDeclarativeDebugService@@SAXXZ @ 3293 NONAME ; void QDeclarativeDebugService::waitForClients(void)
+ ?wantsFocus@QDeclarativeItem@@QBE_NXZ @ 3294 NONAME ; bool QDeclarativeItem::wantsFocus(void) const
+ ?wantsFocusChanged@QDeclarativeItem@@IAEXXZ @ 3295 NONAME ; void QDeclarativeItem::wantsFocusChanged(void)
+ ?wheelEvent@QDeclarativeFlickable@@MAEXPAVQGraphicsSceneWheelEvent@@@Z @ 3296 NONAME ; void QDeclarativeFlickable::wheelEvent(class QGraphicsSceneWheelEvent *)
+ ?when@QDeclarativeBind@@QBE_NXZ @ 3297 NONAME ; bool QDeclarativeBind::when(void) const
+ ?when@QDeclarativeState@@QBEPAVQDeclarativeBinding@@XZ @ 3298 NONAME ; class QDeclarativeBinding * QDeclarativeState::when(void) const
+ ?width@QDeclarativeItem@@QBEMXZ @ 3299 NONAME ; float QDeclarativeItem::width(void) const
+ ?width@QDeclarativeParentChange@@QBEMXZ @ 3300 NONAME ; float QDeclarativeParentChange::width(void) const
+ ?width@QDeclarativePen@@QBEHXZ @ 3301 NONAME ; int QDeclarativePen::width(void) const
+ ?widthChange@QDeclarativeFlickable@@IAEXXZ @ 3302 NONAME ; void QDeclarativeFlickable::widthChange(void)
+ ?widthChanged@QDeclarativeItem@@IAEXXZ @ 3303 NONAME ; void QDeclarativeItem::widthChanged(void)
+ ?widthIsSet@QDeclarativeParentChange@@QBE_NXZ @ 3304 NONAME ; bool QDeclarativeParentChange::widthIsSet(void) const
+ ?widthValid@QDeclarativeItem@@IBE_NXZ @ 3305 NONAME ; bool QDeclarativeItem::widthValid(void) const
+ ?window@QDeclarativeSystemPalette@@QBE?AVQColor@@XZ @ 3306 NONAME ; class QColor QDeclarativeSystemPalette::window(void) const
+ ?windowObjectCleared@QDeclarativeWebView@@AAEXXZ @ 3307 NONAME ; void QDeclarativeWebView::windowObjectCleared(void)
+ ?windowText@QDeclarativeSystemPalette@@QBE?AVQColor@@XZ @ 3308 NONAME ; class QColor QDeclarativeSystemPalette::windowText(void) const
+ ?wrap@QDeclarativeText@@QBE_NXZ @ 3309 NONAME ; bool QDeclarativeText::wrap(void) const
+ ?wrap@QDeclarativeTextEdit@@QBE_NXZ @ 3310 NONAME ; bool QDeclarativeTextEdit::wrap(void) const
+ ?wrapChanged@QDeclarativeText@@IAEX_N@Z @ 3311 NONAME ; void QDeclarativeText::wrapChanged(bool)
+ ?wrapChanged@QDeclarativeTextEdit@@IAEX_N@Z @ 3312 NONAME ; void QDeclarativeTextEdit::wrapChanged(bool)
+ ?write@QDeclarativeBehavior@@UAEXABVQVariant@@@Z @ 3313 NONAME ; void QDeclarativeBehavior::write(class QVariant const &)
+ ?write@QDeclarativeProperty@@QBE_NABVQVariant@@@Z @ 3314 NONAME ; bool QDeclarativeProperty::write(class QVariant const &) const
+ ?write@QDeclarativeProperty@@SA_NPAVQObject@@ABVQString@@ABVQVariant@@@Z @ 3315 NONAME ; bool QDeclarativeProperty::write(class QObject *, class QString const &, class QVariant const &)
+ ?write@QDeclarativeProperty@@SA_NPAVQObject@@ABVQString@@ABVQVariant@@PAVQDeclarativeContext@@@Z @ 3316 NONAME ; bool QDeclarativeProperty::write(class QObject *, class QString const &, class QVariant const &, class QDeclarativeContext *)
+ ?write@QDeclarativeProperty@@SA_NPAVQObject@@ABVQString@@ABVQVariant@@PAVQDeclarativeEngine@@@Z @ 3317 NONAME ; bool QDeclarativeProperty::write(class QObject *, class QString const &, class QVariant const &, class QDeclarativeEngine *)
+ ?x@QDeclarativeCurve@@QBEMXZ @ 3318 NONAME ; float QDeclarativeCurve::x(void) const
+ ?x@QDeclarativeParentChange@@QBEMXZ @ 3319 NONAME ; float QDeclarativeParentChange::x(void) const
+ ?xAttractor@QDeclarativeParticleMotionGravity@@QBEMXZ @ 3320 NONAME ; float QDeclarativeParticleMotionGravity::xAttractor(void) const
+ ?xIsSet@QDeclarativeParentChange@@QBE_NXZ @ 3321 NONAME ; bool QDeclarativeParentChange::xIsSet(void) const
+ ?xToPos@QDeclarativeTextInput@@QAEHH@Z @ 3322 NONAME ; int QDeclarativeTextInput::xToPos(int)
+ ?xVariance@QDeclarativeParticleMotionWander@@QBEMXZ @ 3323 NONAME ; float QDeclarativeParticleMotionWander::xVariance(void) const
+ ?xattractorChanged@QDeclarativeParticleMotionGravity@@IAEXXZ @ 3324 NONAME ; void QDeclarativeParticleMotionGravity::xattractorChanged(void)
+ ?xflick@QDeclarativeFlickable@@IBE_NXZ @ 3325 NONAME ; bool QDeclarativeFlickable::xflick(void) const
+ ?xmax@QDeclarativeDrag@@QBEMXZ @ 3326 NONAME ; float QDeclarativeDrag::xmax(void) const
+ ?xmin@QDeclarativeDrag@@QBEMXZ @ 3327 NONAME ; float QDeclarativeDrag::xmin(void) const
+ ?xml@QDeclarativeXmlListModel@@QBE?AVQString@@XZ @ 3328 NONAME ; class QString QDeclarativeXmlListModel::xml(void) const
+ ?xvarianceChanged@QDeclarativeParticleMotionWander@@IAEXXZ @ 3329 NONAME ; void QDeclarativeParticleMotionWander::xvarianceChanged(void)
+ ?y@QDeclarativeCurve@@QBEMXZ @ 3330 NONAME ; float QDeclarativeCurve::y(void) const
+ ?y@QDeclarativeParentChange@@QBEMXZ @ 3331 NONAME ; float QDeclarativeParentChange::y(void) const
+ ?yAttractor@QDeclarativeParticleMotionGravity@@QBEMXZ @ 3332 NONAME ; float QDeclarativeParticleMotionGravity::yAttractor(void) const
+ ?yIsSet@QDeclarativeParentChange@@QBE_NXZ @ 3333 NONAME ; bool QDeclarativeParentChange::yIsSet(void) const
+ ?yVariance@QDeclarativeParticleMotionWander@@QBEMXZ @ 3334 NONAME ; float QDeclarativeParticleMotionWander::yVariance(void) const
+ ?yattractorChanged@QDeclarativeParticleMotionGravity@@IAEXXZ @ 3335 NONAME ; void QDeclarativeParticleMotionGravity::yattractorChanged(void)
+ ?yflick@QDeclarativeFlickable@@IBE_NXZ @ 3336 NONAME ; bool QDeclarativeFlickable::yflick(void) const
+ ?ymax@QDeclarativeDrag@@QBEMXZ @ 3337 NONAME ; float QDeclarativeDrag::ymax(void) const
+ ?ymin@QDeclarativeDrag@@QBEMXZ @ 3338 NONAME ; float QDeclarativeDrag::ymin(void) const
+ ?yvarianceChanged@QDeclarativeParticleMotionWander@@IAEXXZ @ 3339 NONAME ; void QDeclarativeParticleMotionWander::yvarianceChanged(void)
+ ?zoomFactor@QDeclarativeWebView@@QBEMXZ @ 3340 NONAME ; float QDeclarativeWebView::zoomFactor(void) const
+ ?zoomFactorChanged@QDeclarativeWebView@@IAEXXZ @ 3341 NONAME ; void QDeclarativeWebView::zoomFactorChanged(void)
+ ?zoomTo@QDeclarativeWebView@@IAEXMHH@Z @ 3342 NONAME ; void QDeclarativeWebView::zoomTo(float, int, int)
+ ?staticMetaObject@QDeclarativePathElement@@2UQMetaObject@@B @ 3343 NONAME ; struct QMetaObject const QDeclarativePathElement::staticMetaObject
+ ?staticMetaObject@QDeclarativeDebugObjectQuery@@2UQMetaObject@@B @ 3344 NONAME ; struct QMetaObject const QDeclarativeDebugObjectQuery::staticMetaObject
+ ?staticMetaObject@QDeclarativeTextInput@@2UQMetaObject@@B @ 3345 NONAME ; struct QMetaObject const QDeclarativeTextInput::staticMetaObject
+ ?staticMetaObject@QDeclarativeListModel@@2UQMetaObject@@B @ 3346 NONAME ; struct QMetaObject const QDeclarativeListModel::staticMetaObject
+ ?staticMetaObject@QDeclarativeSpringFollow@@2UQMetaObject@@B @ 3347 NONAME ; struct QMetaObject const QDeclarativeSpringFollow::staticMetaObject
+ ?staticMetaObject@QDeclarativePen@@2UQMetaObject@@B @ 3348 NONAME ; struct QMetaObject const QDeclarativePen::staticMetaObject
+ ?staticMetaObject@QDeclarativeScaleGrid@@2UQMetaObject@@B @ 3349 NONAME ; struct QMetaObject const QDeclarativeScaleGrid::staticMetaObject
+ ?staticMetaObject@QDeclarativeItem@@2UQMetaObject@@B @ 3350 NONAME ; struct QMetaObject const QDeclarativeItem::staticMetaObject
+ ?staticMetaObject@QDeclarativeColumn@@2UQMetaObject@@B @ 3351 NONAME ; struct QMetaObject const QDeclarativeColumn::staticMetaObject
+ ?staticMetaObject@QDeclarativeGradient@@2UQMetaObject@@B @ 3352 NONAME ; struct QMetaObject const QDeclarativeGradient::staticMetaObject
+ ?staticMetaObject@QDeclarativeGraphicsObjectContainer@@2UQMetaObject@@B @ 3353 NONAME ; struct QMetaObject const QDeclarativeGraphicsObjectContainer::staticMetaObject
+ ?staticMetaObject@QDeclarativeDebugWatch@@2UQMetaObject@@B @ 3354 NONAME ; struct QMetaObject const QDeclarativeDebugWatch::staticMetaObject
+ ?staticMetaObject@QDeclarativeStateGroup@@2UQMetaObject@@B @ 3355 NONAME ; struct QMetaObject const QDeclarativeStateGroup::staticMetaObject
+ ?staticMetaObject@QPacketProtocol@@2UQMetaObject@@B @ 3356 NONAME ; struct QMetaObject const QPacketProtocol::staticMetaObject
+ ?staticMetaObject@QDeclarativeListView@@2UQMetaObject@@B @ 3357 NONAME ; struct QMetaObject const QDeclarativeListView::staticMetaObject
+ ?staticMetaObject@QDeclarativeLoader@@2UQMetaObject@@B @ 3358 NONAME ; struct QMetaObject const QDeclarativeLoader::staticMetaObject
+ ?staticMetaObject@QDeclarativeTransition@@2UQMetaObject@@B @ 3359 NONAME ; struct QMetaObject const QDeclarativeTransition::staticMetaObject
+ ?staticMetaObject@QDeclarativeStateChangeScript@@2UQMetaObject@@B @ 3360 NONAME ; struct QMetaObject const QDeclarativeStateChangeScript::staticMetaObject
+ ?staticMetaObject@QDeclarativeGridView@@2UQMetaObject@@B @ 3361 NONAME ; struct QMetaObject const QDeclarativeGridView::staticMetaObject
+ ?staticMetaObject@QDeclarativeFlow@@2UQMetaObject@@B @ 3362 NONAME ; struct QMetaObject const QDeclarativeFlow::staticMetaObject
+ ?staticMetaObject@QDeclarativeParentChange@@2UQMetaObject@@B @ 3363 NONAME ; struct QMetaObject const QDeclarativeParentChange::staticMetaObject
+ ?staticMetaObject@QDeclarativeCurve@@2UQMetaObject@@B @ 3364 NONAME ; struct QMetaObject const QDeclarativeCurve::staticMetaObject
+ ?staticMetaObject@QDeclarativeImage@@2UQMetaObject@@B @ 3365 NONAME ; struct QMetaObject const QDeclarativeImage::staticMetaObject
+ ?staticMetaObject@QDeclarativeEaseFollow@@2UQMetaObject@@B @ 3366 NONAME ; struct QMetaObject const QDeclarativeEaseFollow::staticMetaObject
+ ?staticMetaObject@QDeclarativePixmapReply@@2UQMetaObject@@B @ 3367 NONAME ; struct QMetaObject const QDeclarativePixmapReply::staticMetaObject
+ ?staticMetaObject@QDeclarativeDateTimeFormatter@@2UQMetaObject@@B @ 3368 NONAME ; struct QMetaObject const QDeclarativeDateTimeFormatter::staticMetaObject
+ ?staticMetaObject@QDeclarativePathQuad@@2UQMetaObject@@B @ 3369 NONAME ; struct QMetaObject const QDeclarativePathQuad::staticMetaObject
+ ?staticMetaObject@QDeclarativeContext@@2UQMetaObject@@B @ 3370 NONAME ; struct QMetaObject const QDeclarativeContext::staticMetaObject
+ ?staticMetaObject@QDeclarativeWebPage@@2UQMetaObject@@B @ 3371 NONAME ; struct QMetaObject const QDeclarativeWebPage::staticMetaObject
+ ?staticMetaObject@QDeclarativeAnchorChanges@@2UQMetaObject@@B @ 3372 NONAME ; struct QMetaObject const QDeclarativeAnchorChanges::staticMetaObject
+ ?staticMetaObject@QDeclarativeDebugService@@2UQMetaObject@@B @ 3373 NONAME ; struct QMetaObject const QDeclarativeDebugService::staticMetaObject
+ ?staticMetaObject@QDeclarativeEngine@@2UQMetaObject@@B @ 3374 NONAME ; struct QMetaObject const QDeclarativeEngine::staticMetaObject
+ ?staticMetaObject@QDeclarativeFlickable@@2UQMetaObject@@B @ 3375 NONAME ; struct QMetaObject const QDeclarativeFlickable::staticMetaObject
+ ?staticMetaObject@QDeclarativeParticleMotionGravity@@2UQMetaObject@@B @ 3376 NONAME ; struct QMetaObject const QDeclarativeParticleMotionGravity::staticMetaObject
+ ?staticMetaObject@QDeclarativePathCubic@@2UQMetaObject@@B @ 3377 NONAME ; struct QMetaObject const QDeclarativePathCubic::staticMetaObject
+ ?staticMetaObject@QDeclarativeBehavior@@2UQMetaObject@@B @ 3378 NONAME ; struct QMetaObject const QDeclarativeBehavior::staticMetaObject
+ ?staticMetaObject@QDeclarativeRepeater@@2UQMetaObject@@B @ 3379 NONAME ; struct QMetaObject const QDeclarativeRepeater::staticMetaObject
+ ?staticMetaObject@QDeclarativeVisualModel@@2UQMetaObject@@B @ 3380 NONAME ; struct QMetaObject const QDeclarativeVisualModel::staticMetaObject
+ ?staticMetaObject@QDeclarativeText@@2UQMetaObject@@B @ 3381 NONAME ; struct QMetaObject const QDeclarativeText::staticMetaObject
+ ?staticMetaObject@QDeclarativeExtensionPlugin@@2UQMetaObject@@B @ 3382 NONAME ; struct QMetaObject const QDeclarativeExtensionPlugin::staticMetaObject
+ ?staticMetaObject@QDeclarativeValueType@@2UQMetaObject@@B @ 3383 NONAME ; struct QMetaObject const QDeclarativeValueType::staticMetaObject
+ ?staticMetaObject@QDeclarativeRectangle@@2UQMetaObject@@B @ 3384 NONAME ; struct QMetaObject const QDeclarativeRectangle::staticMetaObject
+ ?staticMetaObject@QDeclarativeWebView@@2UQMetaObject@@B @ 3385 NONAME ; struct QMetaObject const QDeclarativeWebView::staticMetaObject
+ ?staticMetaObject@QDeclarativeRow@@2UQMetaObject@@B @ 3386 NONAME ; struct QMetaObject const QDeclarativeRow::staticMetaObject
+ ?staticMetaObject@QDeclarativeGrid@@2UQMetaObject@@B @ 3387 NONAME ; struct QMetaObject const QDeclarativeGrid::staticMetaObject
+ ?staticMetaObject@QDeclarativeEngineDebug@@2UQMetaObject@@B @ 3388 NONAME ; struct QMetaObject const QDeclarativeEngineDebug::staticMetaObject
+ ?staticMetaObject@QDeclarativeConnections@@2UQMetaObject@@B @ 3389 NONAME ; struct QMetaObject const QDeclarativeConnections::staticMetaObject
+ ?staticMetaObject@QDeclarativePathLine@@2UQMetaObject@@B @ 3390 NONAME ; struct QMetaObject const QDeclarativePathLine::staticMetaObject
+ ?staticMetaObject@QDeclarativePaintedItem@@2UQMetaObject@@B @ 3391 NONAME ; struct QMetaObject const QDeclarativePaintedItem::staticMetaObject
+ ?staticMetaObject@QDeclarativePropertyChanges@@2UQMetaObject@@B @ 3392 NONAME ; struct QMetaObject const QDeclarativePropertyChanges::staticMetaObject
+ ?staticMetaObject@QDeclarativeGradientStop@@2UQMetaObject@@B @ 3393 NONAME ; struct QMetaObject const QDeclarativeGradientStop::staticMetaObject
+ ?staticMetaObject@QDeclarativeImageBase@@2UQMetaObject@@B @ 3394 NONAME ; struct QMetaObject const QDeclarativeImageBase::staticMetaObject
+ ?staticMetaObject@QDeclarativeTimer@@2UQMetaObject@@B @ 3395 NONAME ; struct QMetaObject const QDeclarativeTimer::staticMetaObject
+ ?staticMetaObject@QDeclarativeDebugPropertyWatch@@2UQMetaObject@@B @ 3396 NONAME ; struct QMetaObject const QDeclarativeDebugPropertyWatch::staticMetaObject
+ ?staticMetaObject@QDeclarativeMouseArea@@2UQMetaObject@@B @ 3397 NONAME ; struct QMetaObject const QDeclarativeMouseArea::staticMetaObject
+ ?staticMetaObject@QDeclarativeAnchors@@2UQMetaObject@@B @ 3398 NONAME ; struct QMetaObject const QDeclarativeAnchors::staticMetaObject
+ ?staticMetaObject@QDeclarativePropertyMap@@2UQMetaObject@@B @ 3399 NONAME ; struct QMetaObject const QDeclarativePropertyMap::staticMetaObject
+ ?staticMetaObject@QListModelInterface@@2UQMetaObject@@B @ 3400 NONAME ; struct QMetaObject const QListModelInterface::staticMetaObject
+ ?staticMetaObject@QDeclarativePathAttribute@@2UQMetaObject@@B @ 3401 NONAME ; struct QMetaObject const QDeclarativePathAttribute::staticMetaObject
+ ?staticMetaObject@QDeclarativeVisualItemModel@@2UQMetaObject@@B @ 3402 NONAME ; struct QMetaObject const QDeclarativeVisualItemModel::staticMetaObject
+ ?staticMetaObject@QDeclarativeBind@@2UQMetaObject@@B @ 3403 NONAME ; struct QMetaObject const QDeclarativeBind::staticMetaObject
+ ?staticMetaObject@QDeclarativeAnimatedImage@@2UQMetaObject@@B @ 3404 NONAME ; struct QMetaObject const QDeclarativeAnimatedImage::staticMetaObject
+ ?staticMetaObject@QDeclarativeDebugRootContextQuery@@2UQMetaObject@@B @ 3405 NONAME ; struct QMetaObject const QDeclarativeDebugRootContextQuery::staticMetaObject
+ ?attachedProperties@QDeclarativePathView@@0V?$QHash@PAVQObject@@PAV1@@@A @ 3406 NONAME ; class QHash<class QObject *, class QObject *> QDeclarativePathView::attachedProperties
+ ?staticMetaObject@QDeclarativeParticles@@2UQMetaObject@@B @ 3407 NONAME ; struct QMetaObject const QDeclarativeParticles::staticMetaObject
+ ?staticMetaObject@QDeclarativePath@@2UQMetaObject@@B @ 3408 NONAME ; struct QMetaObject const QDeclarativePath::staticMetaObject
+ ?staticMetaObject@QDeclarativeTextEdit@@2UQMetaObject@@B @ 3409 NONAME ; struct QMetaObject const QDeclarativeTextEdit::staticMetaObject
+ ?staticMetaObject@QDeclarativePathPercent@@2UQMetaObject@@B @ 3410 NONAME ; struct QMetaObject const QDeclarativePathPercent::staticMetaObject
+ ?staticMetaObject@QDeclarativeDebugObjectExpressionWatch@@2UQMetaObject@@B @ 3411 NONAME ; struct QMetaObject const QDeclarativeDebugObjectExpressionWatch::staticMetaObject
+ ?staticMetaObject@QDeclarativeDebugExpressionQuery@@2UQMetaObject@@B @ 3412 NONAME ; struct QMetaObject const QDeclarativeDebugExpressionQuery::staticMetaObject
+ ?staticMetaObject@QDeclarativeFlipable@@2UQMetaObject@@B @ 3413 NONAME ; struct QMetaObject const QDeclarativeFlipable::staticMetaObject
+ ?staticMetaObject@QDeclarativeBasePositioner@@2UQMetaObject@@B @ 3414 NONAME ; struct QMetaObject const QDeclarativeBasePositioner::staticMetaObject
+ ?staticMetaObject@QDeclarativeState@@2UQMetaObject@@B @ 3415 NONAME ; struct QMetaObject const QDeclarativeState::staticMetaObject
+ ?staticMetaObject@QDeclarativeParticleMotionWander@@2UQMetaObject@@B @ 3416 NONAME ; struct QMetaObject const QDeclarativeParticleMotionWander::staticMetaObject
+ ?staticMetaObject@QDeclarativePathView@@2UQMetaObject@@B @ 3417 NONAME ; struct QMetaObject const QDeclarativePathView::staticMetaObject
+ ?staticMetaObject@QDeclarativeExpression@@2UQMetaObject@@B @ 3418 NONAME ; struct QMetaObject const QDeclarativeExpression::staticMetaObject
+ ?staticMetaObject@QDeclarativeView@@2UQMetaObject@@B @ 3419 NONAME ; struct QMetaObject const QDeclarativeView::staticMetaObject
+ ?staticMetaObject@QDeclarativeDebugConnection@@2UQMetaObject@@B @ 3420 NONAME ; struct QMetaObject const QDeclarativeDebugConnection::staticMetaObject
+ ?staticMetaObject@QDeclarativeDebugEnginesQuery@@2UQMetaObject@@B @ 3421 NONAME ; struct QMetaObject const QDeclarativeDebugEnginesQuery::staticMetaObject
+ ?staticMetaObject@QDeclarativeStateOperation@@2UQMetaObject@@B @ 3422 NONAME ; struct QMetaObject const QDeclarativeStateOperation::staticMetaObject
+ ?staticMetaObject@QDeclarativeVisualDataModel@@2UQMetaObject@@B @ 3423 NONAME ; struct QMetaObject const QDeclarativeVisualDataModel::staticMetaObject
+ ?staticMetaObject@QDeclarativeNumberFormatter@@2UQMetaObject@@B @ 3424 NONAME ; struct QMetaObject const QDeclarativeNumberFormatter::staticMetaObject
+ ?staticMetaObject@QDeclarativeParticleMotionLinear@@2UQMetaObject@@B @ 3425 NONAME ; struct QMetaObject const QDeclarativeParticleMotionLinear::staticMetaObject
+ ?staticMetaObject@QDeclarativeFontLoader@@2UQMetaObject@@B @ 3426 NONAME ; struct QMetaObject const QDeclarativeFontLoader::staticMetaObject
+ ?staticMetaObject@QDeclarativeSystemPalette@@2UQMetaObject@@B @ 3427 NONAME ; struct QMetaObject const QDeclarativeSystemPalette::staticMetaObject
+ ?staticMetaObject@QDeclarativeParticleMotion@@2UQMetaObject@@B @ 3428 NONAME ; struct QMetaObject const QDeclarativeParticleMotion::staticMetaObject
+ ?staticMetaObject@QDeclarativeViewSection@@2UQMetaObject@@B @ 3429 NONAME ; struct QMetaObject const QDeclarativeViewSection::staticMetaObject
+ ?staticMetaObject@QDeclarativeXmlListModelRole@@2UQMetaObject@@B @ 3430 NONAME ; struct QMetaObject const QDeclarativeXmlListModelRole::staticMetaObject
+ ?staticMetaObject@QDeclarativeXmlListModel@@2UQMetaObject@@B @ 3431 NONAME ; struct QMetaObject const QDeclarativeXmlListModel::staticMetaObject
+ ?staticMetaObject@QDeclarativeBorderImage@@2UQMetaObject@@B @ 3432 NONAME ; struct QMetaObject const QDeclarativeBorderImage::staticMetaObject
+ ?staticMetaObject@QDeclarativeFocusPanel@@2UQMetaObject@@B @ 3433 NONAME ; struct QMetaObject const QDeclarativeFocusPanel::staticMetaObject
+ ?staticMetaObject@QDeclarativeFocusScope@@2UQMetaObject@@B @ 3434 NONAME ; struct QMetaObject const QDeclarativeFocusScope::staticMetaObject
+ ?staticMetaObject@QDeclarativeDebugQuery@@2UQMetaObject@@B @ 3435 NONAME ; struct QMetaObject const QDeclarativeDebugQuery::staticMetaObject
+ ?staticMetaObject@QDeclarativeDrag@@2UQMetaObject@@B @ 3436 NONAME ; struct QMetaObject const QDeclarativeDrag::staticMetaObject
+ ?staticMetaObject@QDeclarativeDebugClient@@2UQMetaObject@@B @ 3437 NONAME ; struct QMetaObject const QDeclarativeDebugClient::staticMetaObject
+ ?staticMetaObject@QDeclarativeComponent@@2UQMetaObject@@B @ 3438 NONAME ; struct QMetaObject const QDeclarativeComponent::staticMetaObject
+ ??0QDeclarativeAbstractBinding@@QAE@XZ @ 3439 NONAME ; QDeclarativeAbstractBinding::QDeclarativeAbstractBinding(void)
+ ??0QDeclarativeBinding@@QAE@ABVQString@@PAVQObject@@PAVQDeclarativeContext@@1@Z @ 3440 NONAME ; QDeclarativeBinding::QDeclarativeBinding(class QString const &, class QObject *, class QDeclarativeContext *, class QObject *)
+ ??0QDeclarativeBinding@@QAE@PAXPAVQDeclarativeRefCount@@PAVQObject@@PAVQDeclarativeContext@@ABVQString@@H2@Z @ 3441 NONAME ; QDeclarativeBinding::QDeclarativeBinding(void *, class QDeclarativeRefCount *, class QObject *, class QDeclarativeContext *, class QString const &, int, class QObject *)
+ ??0QDeclarativePropertyPrivate@@QAE@ABV0@@Z @ 3442 NONAME ; QDeclarativePropertyPrivate::QDeclarativePropertyPrivate(class QDeclarativePropertyPrivate const &)
+ ??0QDeclarativePropertyPrivate@@QAE@XZ @ 3443 NONAME ; QDeclarativePropertyPrivate::QDeclarativePropertyPrivate(void)
+ ??1QDeclarativeAbstractBinding@@UAE@XZ @ 3444 NONAME ; QDeclarativeAbstractBinding::~QDeclarativeAbstractBinding(void)
+ ??1QDeclarativeBinding@@UAE@XZ @ 3445 NONAME ; QDeclarativeBinding::~QDeclarativeBinding(void)
+ ??1QDeclarativePropertyPrivate@@QAE@XZ @ 3446 NONAME ; QDeclarativePropertyPrivate::~QDeclarativePropertyPrivate(void)
+ ??_EQDeclarativeAbstractBinding@@UAE@I@Z @ 3447 NONAME ; QDeclarativeAbstractBinding::~QDeclarativeAbstractBinding(unsigned int)
+ ??_EQDeclarativeBinding@@UAE@I@Z @ 3448 NONAME ; QDeclarativeBinding::~QDeclarativeBinding(unsigned int)
+ ?addToObject@QDeclarativeAbstractBinding@@QAEXPAVQObject@@@Z @ 3449 NONAME ; void QDeclarativeAbstractBinding::addToObject(class QObject *)
+ ?binding@QDeclarativePropertyPrivate@@SAPAVQDeclarativeAbstractBinding@@ABVQDeclarativeProperty@@@Z @ 3450 NONAME ; class QDeclarativeAbstractBinding * QDeclarativePropertyPrivate::binding(class QDeclarativeProperty const &)
+ ?canConvert@QDeclarativePropertyPrivate@@SA_NPBUQMetaObject@@0@Z @ 3451 NONAME ; bool QDeclarativePropertyPrivate::canConvert(struct QMetaObject const *, struct QMetaObject const *)
+ ?clear@QDeclarativeAbstractBinding@@IAEXXZ @ 3452 NONAME ; void QDeclarativeAbstractBinding::clear(void)
+ ?d_func@QDeclarativeBinding@@AAEPAVQDeclarativeBindingPrivate@@XZ @ 3453 NONAME ; class QDeclarativeBindingPrivate * QDeclarativeBinding::d_func(void)
+ ?d_func@QDeclarativeBinding@@ABEPBVQDeclarativeBindingPrivate@@XZ @ 3454 NONAME ; class QDeclarativeBindingPrivate const * QDeclarativeBinding::d_func(void) const
+ ?destroy@QDeclarativeAbstractBinding@@UAEXXZ @ 3455 NONAME ; void QDeclarativeAbstractBinding::destroy(void)
+ ?enabled@QDeclarativeBinding@@QBE_NXZ @ 3456 NONAME ; bool QDeclarativeBinding::enabled(void) const
+ ?equal@QDeclarativePropertyPrivate@@SA_NPBUQMetaObject@@0@Z @ 3457 NONAME ; bool QDeclarativePropertyPrivate::equal(struct QMetaObject const *, struct QMetaObject const *)
+ ?expression@QDeclarativeAbstractBinding@@UBE?AVQString@@XZ @ 3458 NONAME ; class QString QDeclarativeAbstractBinding::expression(void) const
+ ?expression@QDeclarativeBinding@@UBE?AVQString@@XZ @ 3459 NONAME ; class QString QDeclarativeBinding::expression(void) const
+ ?getStaticMetaObject@QDeclarativeBinding@@SAABUQMetaObject@@XZ @ 3460 NONAME ; struct QMetaObject const & QDeclarativeBinding::getStaticMetaObject(void)
+ ?initDefault@QDeclarativePropertyPrivate@@QAEXPAVQObject@@@Z @ 3461 NONAME ; void QDeclarativePropertyPrivate::initDefault(class QObject *)
+ ?initProperty@QDeclarativePropertyPrivate@@QAEXPAVQObject@@ABVQString@@@Z @ 3462 NONAME ; void QDeclarativePropertyPrivate::initProperty(class QObject *, class QString const &)
+ ?isValueType@QDeclarativePropertyPrivate@@QBE_NXZ @ 3463 NONAME ; bool QDeclarativePropertyPrivate::isValueType(void) const
+ ?metaObject@QDeclarativeBinding@@UBEPBUQMetaObject@@XZ @ 3464 NONAME ; struct QMetaObject const * QDeclarativeBinding::metaObject(void) const
+ ?property@QDeclarativeBinding@@QBE?AVQDeclarativeProperty@@XZ @ 3465 NONAME ; class QDeclarativeProperty QDeclarativeBinding::property(void) const
+ ?propertyIndex@QDeclarativeBinding@@UAEHXZ @ 3466 NONAME ; int QDeclarativeBinding::propertyIndex(void)
+ ?propertyType@QDeclarativePropertyPrivate@@QBEHXZ @ 3467 NONAME ; int QDeclarativePropertyPrivate::propertyType(void) const
+ ?propertyTypeCategory@QDeclarativePropertyPrivate@@QBE?AW4PropertyTypeCategory@QDeclarativeProperty@@XZ @ 3468 NONAME ; enum QDeclarativeProperty::PropertyTypeCategory QDeclarativePropertyPrivate::propertyTypeCategory(void) const
+ ?qt_metacall@QDeclarativeBinding@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 3469 NONAME ; int QDeclarativeBinding::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacast@QDeclarativeBinding@@UAEPAXPBD@Z @ 3470 NONAME ; void * QDeclarativeBinding::qt_metacast(char const *)
+ ?rawMetaObjectForType@QDeclarativePropertyPrivate@@SAPBUQMetaObject@@PAVQDeclarativeEnginePrivate@@H@Z @ 3471 NONAME ; struct QMetaObject const * QDeclarativePropertyPrivate::rawMetaObjectForType(class QDeclarativeEnginePrivate *, int)
+ ?readValueProperty@QDeclarativePropertyPrivate@@QAE?AVQVariant@@XZ @ 3472 NONAME ; class QVariant QDeclarativePropertyPrivate::readValueProperty(void)
+ ?removeFromObject@QDeclarativeAbstractBinding@@QAEXXZ @ 3473 NONAME ; void QDeclarativeAbstractBinding::removeFromObject(void)
+ ?restore@QDeclarativePropertyPrivate@@SA?AVQDeclarativeProperty@@ABVQByteArray@@PAVQObject@@PAVQDeclarativeContext@@@Z @ 3474 NONAME ; class QDeclarativeProperty QDeclarativePropertyPrivate::restore(class QByteArray const &, class QObject *, class QDeclarativeContext *)
+ ?saveProperty@QDeclarativePropertyPrivate@@SA?AVQByteArray@@PBUQMetaObject@@H@Z @ 3475 NONAME ; class QByteArray QDeclarativePropertyPrivate::saveProperty(struct QMetaObject const *, int)
+ ?saveValueType@QDeclarativePropertyPrivate@@SA?AVQByteArray@@PBUQMetaObject@@H0H@Z @ 3476 NONAME ; class QByteArray QDeclarativePropertyPrivate::saveValueType(struct QMetaObject const *, int, struct QMetaObject const *, int)
+ ?setBinding@QDeclarativePropertyPrivate@@SAPAVQDeclarativeAbstractBinding@@ABVQDeclarativeProperty@@PAV2@V?$QFlags@W4WriteFlag@QDeclarativePropertyPrivate@@@@@Z @ 3477 NONAME ; class QDeclarativeAbstractBinding * QDeclarativePropertyPrivate::setBinding(class QDeclarativeProperty const &, class QDeclarativeAbstractBinding *, class QFlags<enum QDeclarativePropertyPrivate::WriteFlag>)
+ ?setBinding@QDeclarativePropertyPrivate@@SAPAVQDeclarativeAbstractBinding@@PAVQObject@@ABUData@QDeclarativePropertyCache@@PAV2@V?$QFlags@W4WriteFlag@QDeclarativePropertyPrivate@@@@@Z @ 3478 NONAME ; class QDeclarativeAbstractBinding * QDeclarativePropertyPrivate::setBinding(class QObject *, struct QDeclarativePropertyCache::Data const &, class QDeclarativeAbstractBinding *, class QFlags<enum QDeclarativePropertyPrivate::WriteFlag>)
+ ?setEnabled@QDeclarativeAbstractBinding@@QAEX_N@Z @ 3479 NONAME ; void QDeclarativeAbstractBinding::setEnabled(bool)
+ ?setEnabled@QDeclarativeAbstractBinding@@UAEX_NV?$QFlags@W4WriteFlag@QDeclarativePropertyPrivate@@@@@Z @ 3480 NONAME ; void QDeclarativeAbstractBinding::setEnabled(bool, class QFlags<enum QDeclarativePropertyPrivate::WriteFlag>)
+ ?setEnabled@QDeclarativeBinding@@UAEX_NV?$QFlags@W4WriteFlag@QDeclarativePropertyPrivate@@@@@Z @ 3481 NONAME ; void QDeclarativeBinding::setEnabled(bool, class QFlags<enum QDeclarativePropertyPrivate::WriteFlag>)
+ ?setSignalExpression@QDeclarativePropertyPrivate@@SAPAVQDeclarativeExpression@@ABVQDeclarativeProperty@@PAV2@@Z @ 3482 NONAME ; class QDeclarativeExpression * QDeclarativePropertyPrivate::setSignalExpression(class QDeclarativeProperty const &, class QDeclarativeExpression *)
+ ?setTarget@QDeclarativeBinding@@QAEXABVQDeclarativeProperty@@@Z @ 3483 NONAME ; void QDeclarativeBinding::setTarget(class QDeclarativeProperty const &)
+ ?signalExpression@QDeclarativePropertyPrivate@@SAPAVQDeclarativeExpression@@ABVQDeclarativeProperty@@@Z @ 3484 NONAME ; class QDeclarativeExpression * QDeclarativePropertyPrivate::signalExpression(class QDeclarativeProperty const &)
+ ?tr@QDeclarativeBinding@@SA?AVQString@@PBD0@Z @ 3485 NONAME ; class QString QDeclarativeBinding::tr(char const *, char const *)
+ ?tr@QDeclarativeBinding@@SA?AVQString@@PBD0H@Z @ 3486 NONAME ; class QString QDeclarativeBinding::tr(char const *, char const *, int)
+ ?trUtf8@QDeclarativeBinding@@SA?AVQString@@PBD0@Z @ 3487 NONAME ; class QString QDeclarativeBinding::trUtf8(char const *, char const *)
+ ?trUtf8@QDeclarativeBinding@@SA?AVQString@@PBD0H@Z @ 3488 NONAME ; class QString QDeclarativeBinding::trUtf8(char const *, char const *, int)
+ ?update@QDeclarativeAbstractBinding@@QAEXXZ @ 3489 NONAME ; void QDeclarativeAbstractBinding::update(void)
+ ?update@QDeclarativeBinding@@QAEXXZ @ 3490 NONAME ; void QDeclarativeBinding::update(void)
+ ?update@QDeclarativeBinding@@UAEXV?$QFlags@W4WriteFlag@QDeclarativePropertyPrivate@@@@@Z @ 3491 NONAME ; void QDeclarativeBinding::update(class QFlags<enum QDeclarativePropertyPrivate::WriteFlag>)
+ ?valueTypeCoreIndex@QDeclarativePropertyPrivate@@SAHABVQDeclarativeProperty@@@Z @ 3492 NONAME ; int QDeclarativePropertyPrivate::valueTypeCoreIndex(class QDeclarativeProperty const &)
+ ?write@QDeclarativePropertyPrivate@@SA_NABVQDeclarativeProperty@@ABVQVariant@@V?$QFlags@W4WriteFlag@QDeclarativePropertyPrivate@@@@@Z @ 3493 NONAME ; bool QDeclarativePropertyPrivate::write(class QDeclarativeProperty const &, class QVariant const &, class QFlags<enum QDeclarativePropertyPrivate::WriteFlag>)
+ ?write@QDeclarativePropertyPrivate@@SA_NPAVQObject@@ABUData@QDeclarativePropertyCache@@ABVQVariant@@PAVQDeclarativeContext@@V?$QFlags@W4WriteFlag@QDeclarativePropertyPrivate@@@@@Z @ 3494 NONAME ; bool QDeclarativePropertyPrivate::write(class QObject *, struct QDeclarativePropertyCache::Data const &, class QVariant const &, class QDeclarativeContext *, class QFlags<enum QDeclarativePropertyPrivate::WriteFlag>)
+ ?writeEnumProperty@QDeclarativePropertyPrivate@@SA_NABVQMetaProperty@@HPAVQObject@@ABVQVariant@@H@Z @ 3495 NONAME ; bool QDeclarativePropertyPrivate::writeEnumProperty(class QMetaProperty const &, int, class QObject *, class QVariant const &, int)
+ ?writeValueProperty@QDeclarativePropertyPrivate@@QAE_NABVQVariant@@V?$QFlags@W4WriteFlag@QDeclarativePropertyPrivate@@@@@Z @ 3496 NONAME ; bool QDeclarativePropertyPrivate::writeValueProperty(class QVariant const &, class QFlags<enum QDeclarativePropertyPrivate::WriteFlag>)
+ ?staticMetaObject@QDeclarativeBinding@@2UQMetaObject@@B @ 3497 NONAME ; struct QMetaObject const QDeclarativeBinding::staticMetaObject
+
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index 8e758d0ad3..2feaffd427 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -3961,7 +3961,7 @@ EXPORTS
?drawPixmap@QPainter@@QAEXHHABVQPixmap@@HHHH@Z @ 3960 NONAME ; void QPainter::drawPixmap(int, int, class QPixmap const &, int, int, int, int)
?drawPixmap@QPainter@@QAEXHHHHABVQPixmap@@@Z @ 3961 NONAME ; void QPainter::drawPixmap(int, int, int, int, class QPixmap const &)
?drawPixmap@QPainter@@QAEXHHHHABVQPixmap@@HHHH@Z @ 3962 NONAME ; void QPainter::drawPixmap(int, int, int, int, class QPixmap const &, int, int, int, int)
- ?drawPixmaps@QPaintEngineEx@@UAEXPBUData@QDrawPixmaps@@HABVQPixmap@@V?$QFlags@W4DrawingHint@QDrawPixmaps@@@@@Z @ 3963 NONAME ; void QPaintEngineEx::drawPixmaps(struct QDrawPixmaps::Data const *, int, class QPixmap const &, class QFlags<enum QDrawPixmaps::DrawingHint>)
+ ?drawPixmaps@QPaintEngineEx@@UAEXPBUData@QDrawPixmaps@@HABVQPixmap@@V?$QFlags@W4DrawingHint@QDrawPixmaps@@@@@Z @ 3963 NONAME ABSENT ; void QPaintEngineEx::drawPixmaps(struct QDrawPixmaps::Data const *, int, class QPixmap const &, class QFlags<enum QDrawPixmaps::DrawingHint>)
?drawPoint@QPainter@@QAEXABVQPoint@@@Z @ 3964 NONAME ; void QPainter::drawPoint(class QPoint const &)
?drawPoint@QPainter@@QAEXABVQPointF@@@Z @ 3965 NONAME ; void QPainter::drawPoint(class QPointF const &)
?drawPoint@QPainter@@QAEXHH@Z @ 3966 NONAME ; void QPainter::drawPoint(int, int)
@@ -7291,7 +7291,7 @@ EXPORTS
?polishEvent@QGraphicsWidget@@MAEXXZ @ 7290 NONAME ; void QGraphicsWidget::polishEvent(void)
?polygon@QGraphicsPolygonItem@@QBE?AVQPolygonF@@XZ @ 7291 NONAME ; class QPolygonF QGraphicsPolygonItem::polygon(void) const
?polygonFlags@QVectorPath@@SAIW4PolygonDrawMode@QPaintEngine@@@Z @ 7292 NONAME ; unsigned int QVectorPath::polygonFlags(enum QPaintEngine::PolygonDrawMode)
- ?populate@QTextureGlyphCache@@QAEXABVQTextItemInt@@ABV?$QVarLengthArray@I$0BAA@@@ABV?$QVarLengthArray@UQFixedPoint@@$0BAA@@@@Z @ 7293 NONAME ; void QTextureGlyphCache::populate(class QTextItemInt const &, class QVarLengthArray<unsigned int, 256> const &, class QVarLengthArray<struct QFixedPoint, 256> const &)
+ ?populate@QTextureGlyphCache@@QAEXABVQTextItemInt@@ABV?$QVarLengthArray@I$0BAA@@@ABV?$QVarLengthArray@UQFixedPoint@@$0BAA@@@@Z @ 7293 NONAME ABSENT ; void QTextureGlyphCache::populate(class QTextItemInt const &, class QVarLengthArray<unsigned int, 256> const &, class QVarLengthArray<struct QFixedPoint, 256> const &)
?popup@QCompleter@@QBEPAVQAbstractItemView@@XZ @ 7294 NONAME ; class QAbstractItemView * QCompleter::popup(void) const
?popup@QMenu@@QAEXABVQPoint@@PAVQAction@@@Z @ 7295 NONAME ; void QMenu::popup(class QPoint const &, class QAction *)
?popupMode@QToolButton@@QBE?AW4ToolButtonPopupMode@1@XZ @ 7296 NONAME ; enum QToolButton::ToolButtonPopupMode QToolButton::popupMode(void) const
@@ -7389,7 +7389,7 @@ EXPORTS
?qAlpha@@YAHI@Z @ 7388 NONAME ; int qAlpha(unsigned int)
?qBlue@@YAHI@Z @ 7389 NONAME ; int qBlue(unsigned int)
?qDrawBorderPixmap@@YAXPAVQPainter@@ABVQRect@@ABVQMargins@@ABVQPixmap@@12ABUQTileRules@@V?$QFlags@W4DrawingHint@QDrawBorderPixmap@@@@@Z @ 7390 NONAME ; void qDrawBorderPixmap(class QPainter *, class QRect const &, class QMargins const &, class QPixmap const &, class QRect const &, class QMargins const &, struct QTileRules const &, class QFlags<enum QDrawBorderPixmap::DrawingHint>)
- ?qDrawPixmaps@@YAXPAVQPainter@@PBUData@QDrawPixmaps@@HABVQPixmap@@V?$QFlags@W4DrawingHint@QDrawPixmaps@@@@@Z @ 7391 NONAME ; void qDrawPixmaps(class QPainter *, struct QDrawPixmaps::Data const *, int, class QPixmap const &, class QFlags<enum QDrawPixmaps::DrawingHint>)
+ ?qDrawPixmaps@@YAXPAVQPainter@@PBUData@QDrawPixmaps@@HABVQPixmap@@V?$QFlags@W4DrawingHint@QDrawPixmaps@@@@@Z @ 7391 NONAME ABSENT ; void qDrawPixmaps(class QPainter *, struct QDrawPixmaps::Data const *, int, class QPixmap const &, class QFlags<enum QDrawPixmaps::DrawingHint>)
?qDrawPlainRect@@YAXPAVQPainter@@ABVQRect@@ABVQColor@@HPBVQBrush@@@Z @ 7392 NONAME ; void qDrawPlainRect(class QPainter *, class QRect const &, class QColor const &, int, class QBrush const *)
?qDrawPlainRect@@YAXPAVQPainter@@HHHHABVQColor@@HPBVQBrush@@@Z @ 7393 NONAME ; void qDrawPlainRect(class QPainter *, int, int, int, int, class QColor const &, int, class QBrush const *)
?qDrawShadeLine@@YAXPAVQPainter@@ABVQPoint@@1ABVQPalette@@_NHH@Z @ 7394 NONAME ; void qDrawShadeLine(class QPainter *, class QPoint const &, class QPoint const &, class QPalette const &, bool, int, int)
@@ -12601,4 +12601,125 @@ EXPORTS
?setPixelFormat@QEglProperties@@QAEXW4Format@QImage@@@Z @ 12600 NONAME ABSENT ; void QEglProperties::setPixelFormat(enum QImage::Format)
?currentContext@QEglContext@@CAPAV1@W4API@QEgl@@@Z @ 12601 NONAME ABSENT ; class QEglContext * QEglContext::currentContext(enum QEgl::API)
?errorString@QEglContext@@SA?AVQString@@H@Z @ 12602 NONAME ABSENT ; class QString QEglContext::errorString(int)
+ ??0FileInfo@QZipReader@@QAE@ABU01@@Z @ 12603 NONAME ; QZipReader::FileInfo::FileInfo(struct QZipReader::FileInfo const &)
+ ??0FileInfo@QZipReader@@QAE@XZ @ 12604 NONAME ; QZipReader::FileInfo::FileInfo(void)
+ ??0QAbstractScrollAreaPrivate@@QAE@XZ @ 12605 NONAME ; QAbstractScrollAreaPrivate::QAbstractScrollAreaPrivate(void)
+ ??0QGraphicsViewPrivate@@QAE@XZ @ 12606 NONAME ; QGraphicsViewPrivate::QGraphicsViewPrivate(void)
+ ??0QKeySequence@@QAE@ABVQString@@W4SequenceFormat@0@@Z @ 12607 NONAME ; QKeySequence::QKeySequence(class QString const &, enum QKeySequence::SequenceFormat)
+ ??0QStaticText@@QAE@ABV0@@Z @ 12608 NONAME ; QStaticText::QStaticText(class QStaticText const &)
+ ??0QStaticText@@QAE@ABVQString@@ABVQSizeF@@@Z @ 12609 NONAME ; QStaticText::QStaticText(class QString const &, class QSizeF const &)
+ ??0QStaticText@@QAE@XZ @ 12610 NONAME ; QStaticText::QStaticText(void)
+ ??0QStaticTextItem@@QAE@XZ @ 12611 NONAME ; QStaticTextItem::QStaticTextItem(void)
+ ??0QZipReader@@QAE@ABVQString@@V?$QFlags@W4OpenModeFlag@QIODevice@@@@@Z @ 12612 NONAME ; QZipReader::QZipReader(class QString const &, class QFlags<enum QIODevice::OpenModeFlag>)
+ ??0QZipReader@@QAE@PAVQIODevice@@@Z @ 12613 NONAME ; QZipReader::QZipReader(class QIODevice *)
+ ??1FileInfo@QZipReader@@QAE@XZ @ 12614 NONAME ; QZipReader::FileInfo::~FileInfo(void)
+ ??1QAbstractScrollAreaPrivate@@UAE@XZ @ 12615 NONAME ; QAbstractScrollAreaPrivate::~QAbstractScrollAreaPrivate(void)
+ ??1QGraphicsViewPrivate@@UAE@XZ @ 12616 NONAME ; QGraphicsViewPrivate::~QGraphicsViewPrivate(void)
+ ??1QStaticText@@QAE@XZ @ 12617 NONAME ; QStaticText::~QStaticText(void)
+ ??1QStaticTextItem@@QAE@XZ @ 12618 NONAME ; QStaticTextItem::~QStaticTextItem(void)
+ ??1QZipReader@@QAE@XZ @ 12619 NONAME ; QZipReader::~QZipReader(void)
+ ??4FileInfo@QZipReader@@QAEAAU01@ABU01@@Z @ 12620 NONAME ; struct QZipReader::FileInfo & QZipReader::FileInfo::operator=(struct QZipReader::FileInfo const &)
+ ??4QStaticText@@QAEAAV0@ABV0@@Z @ 12621 NONAME ; class QStaticText & QStaticText::operator=(class QStaticText const &)
+ ??8QStaticText@@QBE_NABV0@@Z @ 12622 NONAME ; bool QStaticText::operator==(class QStaticText const &) const
+ ??9QStaticText@@QBE_NABV0@@Z @ 12623 NONAME ; bool QStaticText::operator!=(class QStaticText const &) const
+ ??_EQAbstractScrollAreaPrivate@@UAE@I@Z @ 12624 NONAME ; QAbstractScrollAreaPrivate::~QAbstractScrollAreaPrivate(unsigned int)
+ ??_EQGraphicsViewPrivate@@UAE@I@Z @ 12625 NONAME ; QGraphicsViewPrivate::~QGraphicsViewPrivate(unsigned int)
+ ?_q_hslide@QAbstractScrollAreaPrivate@@QAEXH@Z @ 12626 NONAME ; void QAbstractScrollAreaPrivate::_q_hslide(int)
+ ?_q_setViewportCursor@QGraphicsViewPrivate@@QAEXABVQCursor@@@Z @ 12627 NONAME ; void QGraphicsViewPrivate::_q_setViewportCursor(class QCursor const &)
+ ?_q_showOrHideScrollBars@QAbstractScrollAreaPrivate@@QAEXXZ @ 12628 NONAME ; void QAbstractScrollAreaPrivate::_q_showOrHideScrollBars(void)
+ ?_q_unsetViewportCursor@QGraphicsViewPrivate@@QAEXXZ @ 12629 NONAME ; void QGraphicsViewPrivate::_q_unsetViewportCursor(void)
+ ?_q_vslide@QAbstractScrollAreaPrivate@@QAEXH@Z @ 12630 NONAME ; void QAbstractScrollAreaPrivate::_q_vslide(int)
+ ?allocStyleOptionsArray@QGraphicsViewPrivate@@QAEPAVQStyleOptionGraphicsItem@@H@Z @ 12631 NONAME ; class QStyleOptionGraphicsItem * QGraphicsViewPrivate::allocStyleOptionsArray(int)
+ ?anchorAt@QPlainTextEdit@@QBE?AVQString@@ABVQPoint@@@Z @ 12632 NONAME ; class QString QPlainTextEdit::anchorAt(class QPoint const &) const
+ ?assign@QKeySequence@@AAEHABVQString@@W4SequenceFormat@1@@Z @ 12633 NONAME ; int QKeySequence::assign(class QString const &, enum QKeySequence::SequenceFormat)
+ ?autoFillBackground@QGraphicsWidget@@QBE_NXZ @ 12634 NONAME ; bool QGraphicsWidget::autoFillBackground(void) const
+ ?canKeypadNavigate@QWidgetPrivate@@SA_NW4Orientation@Qt@@@Z @ 12635 NONAME ; bool QWidgetPrivate::canKeypadNavigate(enum Qt::Orientation)
+ ?centerView@QGraphicsViewPrivate@@QAEXW4ViewportAnchor@QGraphicsView@@@Z @ 12636 NONAME ; void QGraphicsViewPrivate::centerView(enum QGraphicsView::ViewportAnchor)
+ ?clearUndoRedoStacks@QTextDocument@@QAEXW4Stacks@1@@Z @ 12637 NONAME ; void QTextDocument::clearUndoRedoStacks(enum QTextDocument::Stacks)
+ ?close@QZipReader@@QAEXXZ @ 12638 NONAME ; void QZipReader::close(void)
+ ?constBits@QImage@@QBEPBEXZ @ 12639 NONAME ; unsigned char const * QImage::constBits(void) const
+ ?constScanLine@QImage@@QBEPBEH@Z @ 12640 NONAME ; unsigned char const * QImage::constScanLine(int) const
+ ?contentsOffset@QAbstractScrollAreaPrivate@@UBE?AVQPoint@@XZ @ 12641 NONAME ; class QPoint QAbstractScrollAreaPrivate::contentsOffset(void) const
+ ?convertFromImage@QPixmap@@QAE_NABVQImage@@V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 12642 NONAME ; bool QPixmap::convertFromImage(class QImage const &, class QFlags<enum Qt::ImageConversionFlag>)
+ ?count@QZipReader@@QBEHXZ @ 12643 NONAME ; int QZipReader::count(void) const
+ ?create@Fragment@QPainter@@SA?AV12@ABVQPointF@@ABVQRectF@@MMMM@Z @ 12644 NONAME ; class QPainter::Fragment QPainter::Fragment::create(class QPointF const &, class QRectF const &, float, float, float, float)
+ ?detach@QStaticText@@AAEXXZ @ 12645 NONAME ; void QStaticText::detach(void)
+ ?directoryLoaded@QFileSystemModel@@IAEXABVQString@@@Z @ 12646 NONAME ; void QFileSystemModel::directoryLoaded(class QString const &)
+ ?dispatchPendingUpdateRequests@QGraphicsViewPrivate@@QAEXXZ @ 12647 NONAME ; void QGraphicsViewPrivate::dispatchPendingUpdateRequests(void)
+ ?drawPixmapFragments@QPaintEngineEx@@UAEXPBVFragment@QPainter@@HABVQPixmap@@V?$QFlags@W4FragmentHint@QPainter@@@@@Z @ 12648 NONAME ; void QPaintEngineEx::drawPixmapFragments(class QPainter::Fragment const *, int, class QPixmap const &, class QFlags<enum QPainter::FragmentHint>)
+ ?drawPixmapFragments@QPainter@@QAEXPBVFragment@1@HABVQPixmap@@V?$QFlags@W4FragmentHint@QPainter@@@@@Z @ 12649 NONAME ; void QPainter::drawPixmapFragments(class QPainter::Fragment const *, int, class QPixmap const &, class QFlags<enum QPainter::FragmentHint>)
+ ?drawStaticText@QPainter@@QAEXABVQPoint@@ABVQStaticText@@@Z @ 12650 NONAME ; void QPainter::drawStaticText(class QPoint const &, class QStaticText const &)
+ ?drawStaticText@QPainter@@QAEXABVQPointF@@ABVQStaticText@@@Z @ 12651 NONAME ; void QPainter::drawStaticText(class QPointF const &, class QStaticText const &)
+ ?drawStaticText@QPainter@@QAEXHHABVQStaticText@@@Z @ 12652 NONAME ; void QPainter::drawStaticText(int, int, class QStaticText const &)
+ ?entryInfoAt@QZipReader@@QBE?AUFileInfo@1@H@Z @ 12653 NONAME ; struct QZipReader::FileInfo QZipReader::entryInfoAt(int) const
+ ?exists@QZipReader@@QBE_NXZ @ 12654 NONAME ; bool QZipReader::exists(void) const
+ ?extractAll@QZipReader@@QBE_NABVQString@@@Z @ 12655 NONAME ; bool QZipReader::extractAll(class QString const &) const
+ ?fileData@QZipReader@@QBE?AVQByteArray@@ABVQString@@@Z @ 12656 NONAME ; class QByteArray QZipReader::fileData(class QString const &) const
+ ?fileInfoList@QZipReader@@QBE?AV?$QList@UFileInfo@QZipReader@@@@XZ @ 12657 NONAME ; class QList<struct QZipReader::FileInfo> QZipReader::fileInfoList(void) const
+ ?findItems@QGraphicsViewPrivate@@QBE?AV?$QList@PAVQGraphicsItem@@@@ABVQRegion@@PA_NABVQTransform@@@Z @ 12658 NONAME ; class QList<class QGraphicsItem *> QGraphicsViewPrivate::findItems(class QRegion const &, bool *, class QTransform const &) const
+ ?fixup@QIntValidator@@UBEXAAVQString@@@Z @ 12659 NONAME ; void QIntValidator::fixup(class QString &) const
+ ?freeStyleOptionsArray@QGraphicsViewPrivate@@QAEXPAVQStyleOptionGraphicsItem@@@Z @ 12660 NONAME ; void QGraphicsViewPrivate::freeStyleOptionsArray(class QStyleOptionGraphicsItem *)
+ ?getPixmapCursor@QApplicationPrivate@@QAE?AVQPixmap@@W4CursorShape@Qt@@@Z @ 12661 NONAME ; class QPixmap QApplicationPrivate::getPixmapCursor(enum Qt::CursorShape)
+ ?getSubRange@QBezier@@QBE?AV1@MM@Z @ 12662 NONAME ; class QBezier QBezier::getSubRange(float, float) const
+ ?hasSelectedText@QLabel@@QBE_NXZ @ 12663 NONAME ; bool QLabel::hasSelectedText(void) const
+ ?horizontalScroll@QGraphicsViewPrivate@@QBE_JXZ @ 12664 NONAME ; long long QGraphicsViewPrivate::horizontalScroll(void) const
+ ?inTabWidget@QWidgetPrivate@@SA_NPAVQWidget@@@Z @ 12665 NONAME ; bool QWidgetPrivate::inTabWidget(class QWidget *)
+ ?init@QAbstractScrollAreaPrivate@@QAEXXZ @ 12666 NONAME ; void QAbstractScrollAreaPrivate::init(void)
+ ?isImageCached@QImagePixmapCleanupHooks@@SA_NABVQImage@@@Z @ 12667 NONAME ; bool QImagePixmapCleanupHooks::isImageCached(class QImage const &)
+ ?isPixmapCached@QImagePixmapCleanupHooks@@SA_NABVQPixmap@@@Z @ 12668 NONAME ; bool QImagePixmapCleanupHooks::isPixmapCached(class QPixmap const &)
+ ?isReadable@QZipReader@@QBE_NXZ @ 12669 NONAME ; bool QZipReader::isReadable(void) const
+ ?isValidColor@QColor@@SA_NABVQString@@@Z @ 12670 NONAME ; bool QColor::isValidColor(class QString const &)
+ ?layoutChildren@QAbstractScrollAreaPrivate@@QAEXXZ @ 12671 NONAME ; void QAbstractScrollAreaPrivate::layoutChildren(void)
+ ?mapBy@QBezier@@QBE?AV1@ABVQTransform@@@Z @ 12672 NONAME ; class QBezier QBezier::mapBy(class QTransform const &) const
+ ?mapRectFromScene@QGraphicsViewPrivate@@QBE?AVQRectF@@ABV2@@Z @ 12673 NONAME ; class QRectF QGraphicsViewPrivate::mapRectFromScene(class QRectF const &) const
+ ?mapRectToScene@QGraphicsViewPrivate@@QBE?AVQRectF@@ABVQRect@@@Z @ 12674 NONAME ; class QRectF QGraphicsViewPrivate::mapRectToScene(class QRect const &) const
+ ?mapToScene@QGraphicsViewPrivate@@QBE?AVQPointF@@ABV2@@Z @ 12675 NONAME ; class QPointF QGraphicsViewPrivate::mapToScene(class QPointF const &) const
+ ?mapToScene@QGraphicsViewPrivate@@QBE?AVQRectF@@ABV2@@Z @ 12676 NONAME ; class QRectF QGraphicsViewPrivate::mapToScene(class QRectF const &) const
+ ?mapToViewRect@QGraphicsViewPrivate@@QBE?AVQRect@@PBVQGraphicsItem@@ABVQRectF@@@Z @ 12677 NONAME ; class QRect QGraphicsViewPrivate::mapToViewRect(class QGraphicsItem const *, class QRectF const &) const
+ ?mapToViewRegion@QGraphicsViewPrivate@@QBE?AVQRegion@@PBVQGraphicsItem@@ABVQRectF@@@Z @ 12678 NONAME ; class QRegion QGraphicsViewPrivate::mapToViewRegion(class QGraphicsItem const *, class QRectF const &) const
+ ?maximumSize@QStaticText@@QBE?AVQSizeF@@XZ @ 12679 NONAME ; class QSizeF QStaticText::maximumSize(void) const
+ ?mouseMoveEventHandler@QGraphicsViewPrivate@@QAEXPAVQMouseEvent@@@Z @ 12680 NONAME ; void QGraphicsViewPrivate::mouseMoveEventHandler(class QMouseEvent *)
+ ?performanceHint@QStaticText@@QBE?AW4PerformanceHint@1@XZ @ 12681 NONAME ; enum QStaticText::PerformanceHint QStaticText::performanceHint(void) const
+ ?populate@QTextureGlyphCache@@QAEXPAVQFontEngine@@HPBIPBUQFixedPoint@@@Z @ 12682 NONAME ; void QTextureGlyphCache::populate(class QFontEngine *, int, unsigned int const *, struct QFixedPoint const *)
+ ?populateSceneDragDropEvent@QGraphicsViewPrivate@@QAEXPAVQGraphicsSceneDragDropEvent@@PAVQDropEvent@@@Z @ 12683 NONAME ; void QGraphicsViewPrivate::populateSceneDragDropEvent(class QGraphicsSceneDragDropEvent *, class QDropEvent *)
+ ?positionInBlock@QTextCursor@@QBEHXZ @ 12684 NONAME ; int QTextCursor::positionInBlock(void) const
+ ?prepare@QStaticText@@QAEXABVQTransform@@ABVQFont@@@Z @ 12685 NONAME ; void QStaticText::prepare(class QTransform const &, class QFont const &)
+ ?processPendingUpdates@QGraphicsViewPrivate@@QAEXXZ @ 12686 NONAME ; void QGraphicsViewPrivate::processPendingUpdates(void)
+ ?q_func@QAbstractScrollAreaPrivate@@AAEPAVQAbstractScrollArea@@XZ @ 12687 NONAME ; class QAbstractScrollArea * QAbstractScrollAreaPrivate::q_func(void)
+ ?q_func@QAbstractScrollAreaPrivate@@ABEPBVQAbstractScrollArea@@XZ @ 12688 NONAME ; class QAbstractScrollArea const * QAbstractScrollAreaPrivate::q_func(void) const
+ ?q_func@QGraphicsViewPrivate@@AAEPAVQGraphicsView@@XZ @ 12689 NONAME ; class QGraphicsView * QGraphicsViewPrivate::q_func(void)
+ ?q_func@QGraphicsViewPrivate@@ABEPBVQGraphicsView@@XZ @ 12690 NONAME ; class QGraphicsView const * QGraphicsViewPrivate::q_func(void) const
+ ?qt_draw_glyphs@@YAXPAVQPainter@@PBIPBVQPointF@@H@Z @ 12691 NONAME ; void qt_draw_glyphs(class QPainter *, unsigned int const *, class QPointF const *, int)
+ ?recalculateContentSize@QGraphicsViewPrivate@@QAEXXZ @ 12692 NONAME ; void QGraphicsViewPrivate::recalculateContentSize(void)
+ ?render@QWidgetPrivate@@QAEXPAVQPaintDevice@@ABVQPoint@@ABVQRegion@@V?$QFlags@W4RenderFlag@QWidget@@@@_N@Z @ 12693 NONAME ; void QWidgetPrivate::render(class QPaintDevice *, class QPoint const &, class QRegion const &, class QFlags<enum QWidget::RenderFlag>, bool)
+ ?replaceScrollBar@QAbstractScrollAreaPrivate@@QAEXPAVQScrollBar@@W4Orientation@Qt@@@Z @ 12694 NONAME ; void QAbstractScrollAreaPrivate::replaceScrollBar(class QScrollBar *, enum Qt::Orientation)
+ ?replayLastMouseEvent@QGraphicsViewPrivate@@QAEXXZ @ 12695 NONAME ; void QGraphicsViewPrivate::replayLastMouseEvent(void)
+ ?rubberBandRegion@QGraphicsViewPrivate@@QBE?AVQRegion@@PBVQWidget@@ABVQRect@@@Z @ 12696 NONAME ; class QRegion QGraphicsViewPrivate::rubberBandRegion(class QWidget const *, class QRect const &) const
+ ?scrollBarPolicyChanged@QAbstractScrollAreaPrivate@@UAEXW4Orientation@Qt@@W4ScrollBarPolicy@3@@Z @ 12697 NONAME ; void QAbstractScrollAreaPrivate::scrollBarPolicyChanged(enum Qt::Orientation, enum Qt::ScrollBarPolicy)
+ ?selectedText@QLabel@@QBE?AVQString@@XZ @ 12698 NONAME ; class QString QLabel::selectedText(void) const
+ ?selectionStart@QLabel@@QBEHXZ @ 12699 NONAME ; int QLabel::selectionStart(void) const
+ ?setAutoFillBackground@QGraphicsWidget@@QAEX_N@Z @ 12700 NONAME ; void QGraphicsWidget::setAutoFillBackground(bool)
+ ?setColorFromString@QColor@@AAE_NABVQString@@@Z @ 12701 NONAME ; bool QColor::setColorFromString(class QString const &)
+ ?setMaximumSize@QStaticText@@QAEXABVQSizeF@@@Z @ 12702 NONAME ; void QStaticText::setMaximumSize(class QSizeF const &)
+ ?setPerformanceHint@QStaticText@@QAEXW4PerformanceHint@1@@Z @ 12703 NONAME ; void QStaticText::setPerformanceHint(enum QStaticText::PerformanceHint)
+ ?setSelection@QLabel@@QAEXHH@Z @ 12704 NONAME ; void QLabel::setSelection(int, int)
+ ?setText@QStaticText@@QAEXABVQString@@@Z @ 12705 NONAME ; void QStaticText::setText(class QString const &)
+ ?setTextFormat@QStaticText@@QAEXW4TextFormat@Qt@@@Z @ 12706 NONAME ; void QStaticText::setTextFormat(enum Qt::TextFormat)
+ ?setUserData@QStaticTextItem@@QAEXPAVQStaticTextUserData@@@Z @ 12707 NONAME ; void QStaticTextItem::setUserData(class QStaticTextUserData *)
+ ?size@QStaticText@@QBE?AVQSizeF@@XZ @ 12708 NONAME ; class QSizeF QStaticText::size(void) const
+ ?status@QZipReader@@QBE?AW4Status@1@XZ @ 12709 NONAME ; enum QZipReader::Status QZipReader::status(void) const
+ ?storeDragDropEvent@QGraphicsViewPrivate@@QAEXPBVQGraphicsSceneDragDropEvent@@@Z @ 12710 NONAME ; void QGraphicsViewPrivate::storeDragDropEvent(class QGraphicsSceneDragDropEvent const *)
+ ?storeMouseEvent@QGraphicsViewPrivate@@QAEXPAVQMouseEvent@@@Z @ 12711 NONAME ; void QGraphicsViewPrivate::storeMouseEvent(class QMouseEvent *)
+ ?text@QStaticText@@QBE?AVQString@@XZ @ 12712 NONAME ; class QString QStaticText::text(void) const
+ ?textFormat@QStaticText@@QBE?AW4TextFormat@Qt@@XZ @ 12713 NONAME ; enum Qt::TextFormat QStaticText::textFormat(void) const
+ ?translateTouchEvent@QGraphicsViewPrivate@@SAXPAV1@PAVQTouchEvent@@@Z @ 12714 NONAME ; void QGraphicsViewPrivate::translateTouchEvent(class QGraphicsViewPrivate *, class QTouchEvent *)
+ ?updateAll@QGraphicsViewPrivate@@QAEXXZ @ 12715 NONAME ; void QGraphicsViewPrivate::updateAll(void)
+ ?updateInputMethodSensitivity@QGraphicsViewPrivate@@QAEXXZ @ 12716 NONAME ; void QGraphicsViewPrivate::updateInputMethodSensitivity(void)
+ ?updateLastCenterPoint@QGraphicsViewPrivate@@QAEXXZ @ 12717 NONAME ; void QGraphicsViewPrivate::updateLastCenterPoint(void)
+ ?updateRect@QGraphicsViewPrivate@@QAE_NABVQRect@@@Z @ 12718 NONAME ; bool QGraphicsViewPrivate::updateRect(class QRect const &)
+ ?updateRegion@QGraphicsViewPrivate@@QAE_NABVQRegion@@@Z @ 12719 NONAME ; bool QGraphicsViewPrivate::updateRegion(class QRegion const &)
+ ?updateScroll@QGraphicsViewPrivate@@QAEXXZ @ 12720 NONAME ; void QGraphicsViewPrivate::updateScroll(void)
+ ?verticalScroll@QGraphicsViewPrivate@@QBE_JXZ @ 12721 NONAME ; long long QGraphicsViewPrivate::verticalScroll(void) const
+ ?viewportEvent@QAbstractScrollAreaPrivate@@QAE_NPAVQEvent@@@Z @ 12722 NONAME ; bool QAbstractScrollAreaPrivate::viewportEvent(class QEvent *)
+ ?visibilityChanged@QToolBar@@IAEX_N@Z @ 12723 NONAME ; void QToolBar::visibilityChanged(bool)
diff --git a/src/s60installs/bwins/QtMultimediau.def b/src/s60installs/bwins/QtMultimediau.def
index 58532ce6bd..629db3304e 100644
--- a/src/s60installs/bwins/QtMultimediau.def
+++ b/src/s60installs/bwins/QtMultimediau.def
@@ -268,4 +268,655 @@ EXPORTS
?staticMetaObject@QAbstractAudioOutput@@2UQMetaObject@@B @ 267 NONAME ; struct QMetaObject const QAbstractAudioOutput::staticMetaObject
?staticMetaObject@QAudioOutput@@2UQMetaObject@@B @ 268 NONAME ; struct QMetaObject const QAudioOutput::staticMetaObject
?staticMetaObject@QAbstractAudioInput@@2UQMetaObject@@B @ 269 NONAME ; struct QMetaObject const QAbstractAudioInput::staticMetaObject
+ ??0QGraphicsVideoItem@@QAE@PAVQGraphicsItem@@@Z @ 270 NONAME ; QGraphicsVideoItem::QGraphicsVideoItem(class QGraphicsItem *)
+ ??0QLocalMediaPlaylistProvider@@QAE@PAVQObject@@@Z @ 271 NONAME ; QLocalMediaPlaylistProvider::QLocalMediaPlaylistProvider(class QObject *)
+ ??0QMediaContent@@QAE@ABV0@@Z @ 272 NONAME ; QMediaContent::QMediaContent(class QMediaContent const &)
+ ??0QMediaContent@@QAE@ABV?$QList@VQMediaResource@@@@@Z @ 273 NONAME ; QMediaContent::QMediaContent(class QList<class QMediaResource> const &)
+ ??0QMediaContent@@QAE@ABVQMediaResource@@@Z @ 274 NONAME ; QMediaContent::QMediaContent(class QMediaResource const &)
+ ??0QMediaContent@@QAE@ABVQNetworkRequest@@@Z @ 275 NONAME ; QMediaContent::QMediaContent(class QNetworkRequest const &)
+ ??0QMediaContent@@QAE@ABVQUrl@@@Z @ 276 NONAME ; QMediaContent::QMediaContent(class QUrl const &)
+ ??0QMediaContent@@QAE@XZ @ 277 NONAME ; QMediaContent::QMediaContent(void)
+ ??0QMediaControl@@IAE@AAVQMediaControlPrivate@@PAVQObject@@@Z @ 278 NONAME ; QMediaControl::QMediaControl(class QMediaControlPrivate &, class QObject *)
+ ??0QMediaControl@@IAE@PAVQObject@@@Z @ 279 NONAME ; QMediaControl::QMediaControl(class QObject *)
+ ??0QMediaObject@@IAE@AAVQMediaObjectPrivate@@PAVQObject@@PAVQMediaService@@@Z @ 280 NONAME ; QMediaObject::QMediaObject(class QMediaObjectPrivate &, class QObject *, class QMediaService *)
+ ??0QMediaObject@@IAE@PAVQObject@@PAVQMediaService@@@Z @ 281 NONAME ; QMediaObject::QMediaObject(class QObject *, class QMediaService *)
+ ??0QMediaPlayer@@QAE@PAVQObject@@V?$QFlags@W4Flag@QMediaPlayer@@@@PAVQMediaServiceProvider@@@Z @ 282 NONAME ; QMediaPlayer::QMediaPlayer(class QObject *, class QFlags<enum QMediaPlayer::Flag>, class QMediaServiceProvider *)
+ ??0QMediaPlayerControl@@IAE@PAVQObject@@@Z @ 283 NONAME ; QMediaPlayerControl::QMediaPlayerControl(class QObject *)
+ ??0QMediaPlaylist@@QAE@PAVQObject@@@Z @ 284 NONAME ; QMediaPlaylist::QMediaPlaylist(class QObject *)
+ ??0QMediaPlaylistControl@@IAE@PAVQObject@@@Z @ 285 NONAME ; QMediaPlaylistControl::QMediaPlaylistControl(class QObject *)
+ ??0QMediaPlaylistIOPlugin@@QAE@PAVQObject@@@Z @ 286 NONAME ; QMediaPlaylistIOPlugin::QMediaPlaylistIOPlugin(class QObject *)
+ ??0QMediaPlaylistNavigator@@QAE@PAVQMediaPlaylistProvider@@PAVQObject@@@Z @ 287 NONAME ; QMediaPlaylistNavigator::QMediaPlaylistNavigator(class QMediaPlaylistProvider *, class QObject *)
+ ??0QMediaPlaylistProvider@@IAE@AAVQMediaPlaylistProviderPrivate@@PAVQObject@@@Z @ 288 NONAME ; QMediaPlaylistProvider::QMediaPlaylistProvider(class QMediaPlaylistProviderPrivate &, class QObject *)
+ ??0QMediaPlaylistProvider@@QAE@PAVQObject@@@Z @ 289 NONAME ; QMediaPlaylistProvider::QMediaPlaylistProvider(class QObject *)
+ ??0QMediaResource@@QAE@ABV0@@Z @ 290 NONAME ; QMediaResource::QMediaResource(class QMediaResource const &)
+ ??0QMediaResource@@QAE@ABVQNetworkRequest@@ABVQString@@@Z @ 291 NONAME ; QMediaResource::QMediaResource(class QNetworkRequest const &, class QString const &)
+ ??0QMediaResource@@QAE@ABVQUrl@@ABVQString@@@Z @ 292 NONAME ; QMediaResource::QMediaResource(class QUrl const &, class QString const &)
+ ??0QMediaResource@@QAE@XZ @ 293 NONAME ; QMediaResource::QMediaResource(void)
+ ??0QMediaService@@IAE@AAVQMediaServicePrivate@@PAVQObject@@@Z @ 294 NONAME ; QMediaService::QMediaService(class QMediaServicePrivate &, class QObject *)
+ ??0QMediaService@@IAE@PAVQObject@@@Z @ 295 NONAME ; QMediaService::QMediaService(class QObject *)
+ ??0QMediaServiceProviderHint@@QAE@ABV0@@Z @ 296 NONAME ; QMediaServiceProviderHint::QMediaServiceProviderHint(class QMediaServiceProviderHint const &)
+ ??0QMediaServiceProviderHint@@QAE@ABVQByteArray@@@Z @ 297 NONAME ; QMediaServiceProviderHint::QMediaServiceProviderHint(class QByteArray const &)
+ ??0QMediaServiceProviderHint@@QAE@ABVQString@@ABVQStringList@@@Z @ 298 NONAME ; QMediaServiceProviderHint::QMediaServiceProviderHint(class QString const &, class QStringList const &)
+ ??0QMediaServiceProviderHint@@QAE@V?$QFlags@W4Feature@QMediaServiceProviderHint@@@@@Z @ 299 NONAME ; QMediaServiceProviderHint::QMediaServiceProviderHint(class QFlags<enum QMediaServiceProviderHint::Feature>)
+ ??0QMediaServiceProviderHint@@QAE@XZ @ 300 NONAME ; QMediaServiceProviderHint::QMediaServiceProviderHint(void)
+ ??0QMediaTimeInterval@@QAE@ABV0@@Z @ 301 NONAME ; QMediaTimeInterval::QMediaTimeInterval(class QMediaTimeInterval const &)
+ ??0QMediaTimeInterval@@QAE@XZ @ 302 NONAME ; QMediaTimeInterval::QMediaTimeInterval(void)
+ ??0QMediaTimeInterval@@QAE@_J0@Z @ 303 NONAME ; QMediaTimeInterval::QMediaTimeInterval(long long, long long)
+ ??0QMediaTimeRange@@QAE@ABV0@@Z @ 304 NONAME ; QMediaTimeRange::QMediaTimeRange(class QMediaTimeRange const &)
+ ??0QMediaTimeRange@@QAE@ABVQMediaTimeInterval@@@Z @ 305 NONAME ; QMediaTimeRange::QMediaTimeRange(class QMediaTimeInterval const &)
+ ??0QMediaTimeRange@@QAE@XZ @ 306 NONAME ; QMediaTimeRange::QMediaTimeRange(void)
+ ??0QMediaTimeRange@@QAE@_J0@Z @ 307 NONAME ; QMediaTimeRange::QMediaTimeRange(long long, long long)
+ ??0QMetaDataControl@@IAE@PAVQObject@@@Z @ 308 NONAME ; QMetaDataControl::QMetaDataControl(class QObject *)
+ ??0QPainterVideoSurface@@QAE@PAVQObject@@@Z @ 309 NONAME ; QPainterVideoSurface::QPainterVideoSurface(class QObject *)
+ ??0QVideoDeviceControl@@IAE@PAVQObject@@@Z @ 310 NONAME ; QVideoDeviceControl::QVideoDeviceControl(class QObject *)
+ ??0QVideoOutputControl@@IAE@PAVQObject@@@Z @ 311 NONAME ; QVideoOutputControl::QVideoOutputControl(class QObject *)
+ ??0QVideoRendererControl@@IAE@PAVQObject@@@Z @ 312 NONAME ; QVideoRendererControl::QVideoRendererControl(class QObject *)
+ ??0QVideoWidget@@QAE@PAVQWidget@@@Z @ 313 NONAME ; QVideoWidget::QVideoWidget(class QWidget *)
+ ??0QVideoWidgetControl@@IAE@PAVQObject@@@Z @ 314 NONAME ; QVideoWidgetControl::QVideoWidgetControl(class QObject *)
+ ??0QVideoWindowControl@@IAE@PAVQObject@@@Z @ 315 NONAME ; QVideoWindowControl::QVideoWindowControl(class QObject *)
+ ??1QGraphicsVideoItem@@UAE@XZ @ 316 NONAME ; QGraphicsVideoItem::~QGraphicsVideoItem(void)
+ ??1QLocalMediaPlaylistProvider@@UAE@XZ @ 317 NONAME ; QLocalMediaPlaylistProvider::~QLocalMediaPlaylistProvider(void)
+ ??1QMediaContent@@QAE@XZ @ 318 NONAME ; QMediaContent::~QMediaContent(void)
+ ??1QMediaControl@@UAE@XZ @ 319 NONAME ; QMediaControl::~QMediaControl(void)
+ ??1QMediaObject@@UAE@XZ @ 320 NONAME ; QMediaObject::~QMediaObject(void)
+ ??1QMediaPlayer@@UAE@XZ @ 321 NONAME ; QMediaPlayer::~QMediaPlayer(void)
+ ??1QMediaPlayerControl@@UAE@XZ @ 322 NONAME ; QMediaPlayerControl::~QMediaPlayerControl(void)
+ ??1QMediaPlaylist@@UAE@XZ @ 323 NONAME ; QMediaPlaylist::~QMediaPlaylist(void)
+ ??1QMediaPlaylistControl@@UAE@XZ @ 324 NONAME ; QMediaPlaylistControl::~QMediaPlaylistControl(void)
+ ??1QMediaPlaylistIOInterface@@UAE@XZ @ 325 NONAME ; QMediaPlaylistIOInterface::~QMediaPlaylistIOInterface(void)
+ ??1QMediaPlaylistIOPlugin@@UAE@XZ @ 326 NONAME ; QMediaPlaylistIOPlugin::~QMediaPlaylistIOPlugin(void)
+ ??1QMediaPlaylistNavigator@@UAE@XZ @ 327 NONAME ; QMediaPlaylistNavigator::~QMediaPlaylistNavigator(void)
+ ??1QMediaPlaylistProvider@@UAE@XZ @ 328 NONAME ; QMediaPlaylistProvider::~QMediaPlaylistProvider(void)
+ ??1QMediaPlaylistReader@@UAE@XZ @ 329 NONAME ; QMediaPlaylistReader::~QMediaPlaylistReader(void)
+ ??1QMediaPlaylistWriter@@UAE@XZ @ 330 NONAME ; QMediaPlaylistWriter::~QMediaPlaylistWriter(void)
+ ??1QMediaResource@@QAE@XZ @ 331 NONAME ; QMediaResource::~QMediaResource(void)
+ ??1QMediaService@@UAE@XZ @ 332 NONAME ; QMediaService::~QMediaService(void)
+ ??1QMediaServiceFeaturesInterface@@UAE@XZ @ 333 NONAME ; QMediaServiceFeaturesInterface::~QMediaServiceFeaturesInterface(void)
+ ??1QMediaServiceProvider@@UAE@XZ @ 334 NONAME ; QMediaServiceProvider::~QMediaServiceProvider(void)
+ ??1QMediaServiceProviderHint@@QAE@XZ @ 335 NONAME ; QMediaServiceProviderHint::~QMediaServiceProviderHint(void)
+ ??1QMediaServiceSupportedDevicesInterface@@UAE@XZ @ 336 NONAME ; QMediaServiceSupportedDevicesInterface::~QMediaServiceSupportedDevicesInterface(void)
+ ??1QMediaServiceSupportedFormatsInterface@@UAE@XZ @ 337 NONAME ; QMediaServiceSupportedFormatsInterface::~QMediaServiceSupportedFormatsInterface(void)
+ ??1QMediaTimeRange@@QAE@XZ @ 338 NONAME ; QMediaTimeRange::~QMediaTimeRange(void)
+ ??1QMetaDataControl@@UAE@XZ @ 339 NONAME ; QMetaDataControl::~QMetaDataControl(void)
+ ??1QPainterVideoSurface@@UAE@XZ @ 340 NONAME ; QPainterVideoSurface::~QPainterVideoSurface(void)
+ ??1QVideoDeviceControl@@UAE@XZ @ 341 NONAME ; QVideoDeviceControl::~QVideoDeviceControl(void)
+ ??1QVideoOutputControl@@UAE@XZ @ 342 NONAME ; QVideoOutputControl::~QVideoOutputControl(void)
+ ??1QVideoRendererControl@@UAE@XZ @ 343 NONAME ; QVideoRendererControl::~QVideoRendererControl(void)
+ ??1QVideoWidget@@UAE@XZ @ 344 NONAME ; QVideoWidget::~QVideoWidget(void)
+ ??1QVideoWidgetControl@@UAE@XZ @ 345 NONAME ; QVideoWidgetControl::~QVideoWidgetControl(void)
+ ??1QVideoWindowControl@@UAE@XZ @ 346 NONAME ; QVideoWindowControl::~QVideoWindowControl(void)
+ ??4QMediaContent@@QAEAAV0@ABV0@@Z @ 347 NONAME ; class QMediaContent & QMediaContent::operator=(class QMediaContent const &)
+ ??4QMediaResource@@QAEAAV0@ABV0@@Z @ 348 NONAME ; class QMediaResource & QMediaResource::operator=(class QMediaResource const &)
+ ??4QMediaServiceProviderHint@@QAEAAV0@ABV0@@Z @ 349 NONAME ; class QMediaServiceProviderHint & QMediaServiceProviderHint::operator=(class QMediaServiceProviderHint const &)
+ ??4QMediaTimeRange@@QAEAAV0@ABV0@@Z @ 350 NONAME ; class QMediaTimeRange & QMediaTimeRange::operator=(class QMediaTimeRange const &)
+ ??4QMediaTimeRange@@QAEAAV0@ABVQMediaTimeInterval@@@Z @ 351 NONAME ; class QMediaTimeRange & QMediaTimeRange::operator=(class QMediaTimeInterval const &)
+ ??8@YA_NABVQMediaTimeInterval@@0@Z @ 352 NONAME ; bool operator==(class QMediaTimeInterval const &, class QMediaTimeInterval const &)
+ ??8@YA_NABVQMediaTimeRange@@0@Z @ 353 NONAME ; bool operator==(class QMediaTimeRange const &, class QMediaTimeRange const &)
+ ??8QMediaContent@@QBE_NABV0@@Z @ 354 NONAME ; bool QMediaContent::operator==(class QMediaContent const &) const
+ ??8QMediaResource@@QBE_NABV0@@Z @ 355 NONAME ; bool QMediaResource::operator==(class QMediaResource const &) const
+ ??8QMediaServiceProviderHint@@QBE_NABV0@@Z @ 356 NONAME ; bool QMediaServiceProviderHint::operator==(class QMediaServiceProviderHint const &) const
+ ??9@YA_NABVQMediaTimeInterval@@0@Z @ 357 NONAME ; bool operator!=(class QMediaTimeInterval const &, class QMediaTimeInterval const &)
+ ??9@YA_NABVQMediaTimeRange@@0@Z @ 358 NONAME ; bool operator!=(class QMediaTimeRange const &, class QMediaTimeRange const &)
+ ??9QMediaContent@@QBE_NABV0@@Z @ 359 NONAME ; bool QMediaContent::operator!=(class QMediaContent const &) const
+ ??9QMediaResource@@QBE_NABV0@@Z @ 360 NONAME ; bool QMediaResource::operator!=(class QMediaResource const &) const
+ ??9QMediaServiceProviderHint@@QBE_NABV0@@Z @ 361 NONAME ; bool QMediaServiceProviderHint::operator!=(class QMediaServiceProviderHint const &) const
+ ??G@YA?AVQMediaTimeRange@@ABV0@0@Z @ 362 NONAME ; class QMediaTimeRange operator-(class QMediaTimeRange const &, class QMediaTimeRange const &)
+ ??H@YA?AVQMediaTimeRange@@ABV0@0@Z @ 363 NONAME ; class QMediaTimeRange operator+(class QMediaTimeRange const &, class QMediaTimeRange const &)
+ ??YQMediaTimeRange@@QAEAAV0@ABV0@@Z @ 364 NONAME ; class QMediaTimeRange & QMediaTimeRange::operator+=(class QMediaTimeRange const &)
+ ??YQMediaTimeRange@@QAEAAV0@ABVQMediaTimeInterval@@@Z @ 365 NONAME ; class QMediaTimeRange & QMediaTimeRange::operator+=(class QMediaTimeInterval const &)
+ ??ZQMediaTimeRange@@QAEAAV0@ABV0@@Z @ 366 NONAME ; class QMediaTimeRange & QMediaTimeRange::operator-=(class QMediaTimeRange const &)
+ ??ZQMediaTimeRange@@QAEAAV0@ABVQMediaTimeInterval@@@Z @ 367 NONAME ; class QMediaTimeRange & QMediaTimeRange::operator-=(class QMediaTimeInterval const &)
+ ??_EQGraphicsVideoItem@@UAE@I@Z @ 368 NONAME ; QGraphicsVideoItem::~QGraphicsVideoItem(unsigned int)
+ ??_EQLocalMediaPlaylistProvider@@UAE@I@Z @ 369 NONAME ; QLocalMediaPlaylistProvider::~QLocalMediaPlaylistProvider(unsigned int)
+ ??_EQMediaControl@@UAE@I@Z @ 370 NONAME ; QMediaControl::~QMediaControl(unsigned int)
+ ??_EQMediaObject@@UAE@I@Z @ 371 NONAME ; QMediaObject::~QMediaObject(unsigned int)
+ ??_EQMediaPlayer@@UAE@I@Z @ 372 NONAME ; QMediaPlayer::~QMediaPlayer(unsigned int)
+ ??_EQMediaPlayerControl@@UAE@I@Z @ 373 NONAME ; QMediaPlayerControl::~QMediaPlayerControl(unsigned int)
+ ??_EQMediaPlaylist@@UAE@I@Z @ 374 NONAME ; QMediaPlaylist::~QMediaPlaylist(unsigned int)
+ ??_EQMediaPlaylistControl@@UAE@I@Z @ 375 NONAME ; QMediaPlaylistControl::~QMediaPlaylistControl(unsigned int)
+ ??_EQMediaPlaylistIOInterface@@UAE@I@Z @ 376 NONAME ; QMediaPlaylistIOInterface::~QMediaPlaylistIOInterface(unsigned int)
+ ??_EQMediaPlaylistIOPlugin@@UAE@I@Z @ 377 NONAME ; QMediaPlaylistIOPlugin::~QMediaPlaylistIOPlugin(unsigned int)
+ ??_EQMediaPlaylistNavigator@@UAE@I@Z @ 378 NONAME ; QMediaPlaylistNavigator::~QMediaPlaylistNavigator(unsigned int)
+ ??_EQMediaPlaylistProvider@@UAE@I@Z @ 379 NONAME ; QMediaPlaylistProvider::~QMediaPlaylistProvider(unsigned int)
+ ??_EQMediaPlaylistReader@@UAE@I@Z @ 380 NONAME ; QMediaPlaylistReader::~QMediaPlaylistReader(unsigned int)
+ ??_EQMediaPlaylistWriter@@UAE@I@Z @ 381 NONAME ; QMediaPlaylistWriter::~QMediaPlaylistWriter(unsigned int)
+ ??_EQMediaService@@UAE@I@Z @ 382 NONAME ; QMediaService::~QMediaService(unsigned int)
+ ??_EQMediaServiceFeaturesInterface@@UAE@I@Z @ 383 NONAME ; QMediaServiceFeaturesInterface::~QMediaServiceFeaturesInterface(unsigned int)
+ ??_EQMediaServiceProvider@@UAE@I@Z @ 384 NONAME ; QMediaServiceProvider::~QMediaServiceProvider(unsigned int)
+ ??_EQMediaServiceSupportedDevicesInterface@@UAE@I@Z @ 385 NONAME ; QMediaServiceSupportedDevicesInterface::~QMediaServiceSupportedDevicesInterface(unsigned int)
+ ??_EQMediaServiceSupportedFormatsInterface@@UAE@I@Z @ 386 NONAME ; QMediaServiceSupportedFormatsInterface::~QMediaServiceSupportedFormatsInterface(unsigned int)
+ ??_EQMetaDataControl@@UAE@I@Z @ 387 NONAME ; QMetaDataControl::~QMetaDataControl(unsigned int)
+ ??_EQPainterVideoSurface@@UAE@I@Z @ 388 NONAME ; QPainterVideoSurface::~QPainterVideoSurface(unsigned int)
+ ??_EQVideoDeviceControl@@UAE@I@Z @ 389 NONAME ; QVideoDeviceControl::~QVideoDeviceControl(unsigned int)
+ ??_EQVideoOutputControl@@UAE@I@Z @ 390 NONAME ; QVideoOutputControl::~QVideoOutputControl(unsigned int)
+ ??_EQVideoRendererControl@@UAE@I@Z @ 391 NONAME ; QVideoRendererControl::~QVideoRendererControl(unsigned int)
+ ??_EQVideoWidget@@UAE@I@Z @ 392 NONAME ; QVideoWidget::~QVideoWidget(unsigned int)
+ ??_EQVideoWidgetControl@@UAE@I@Z @ 393 NONAME ; QVideoWidgetControl::~QVideoWidgetControl(unsigned int)
+ ??_EQVideoWindowControl@@UAE@I@Z @ 394 NONAME ; QVideoWindowControl::~QVideoWindowControl(unsigned int)
+ ?activated@QMediaPlaylistNavigator@@IAEXABVQMediaContent@@@Z @ 395 NONAME ; void QMediaPlaylistNavigator::activated(class QMediaContent const &)
+ ?addInterval@QMediaTimeRange@@QAEXABVQMediaTimeInterval@@@Z @ 396 NONAME ; void QMediaTimeRange::addInterval(class QMediaTimeInterval const &)
+ ?addInterval@QMediaTimeRange@@QAEX_J0@Z @ 397 NONAME ; void QMediaTimeRange::addInterval(long long, long long)
+ ?addMedia@QLocalMediaPlaylistProvider@@UAE_NABV?$QList@VQMediaContent@@@@@Z @ 398 NONAME ; bool QLocalMediaPlaylistProvider::addMedia(class QList<class QMediaContent> const &)
+ ?addMedia@QLocalMediaPlaylistProvider@@UAE_NABVQMediaContent@@@Z @ 399 NONAME ; bool QLocalMediaPlaylistProvider::addMedia(class QMediaContent const &)
+ ?addMedia@QMediaPlaylist@@QAE_NABV?$QList@VQMediaContent@@@@@Z @ 400 NONAME ; bool QMediaPlaylist::addMedia(class QList<class QMediaContent> const &)
+ ?addMedia@QMediaPlaylist@@QAE_NABVQMediaContent@@@Z @ 401 NONAME ; bool QMediaPlaylist::addMedia(class QMediaContent const &)
+ ?addMedia@QMediaPlaylistProvider@@UAE_NABV?$QList@VQMediaContent@@@@@Z @ 402 NONAME ; bool QMediaPlaylistProvider::addMedia(class QList<class QMediaContent> const &)
+ ?addMedia@QMediaPlaylistProvider@@UAE_NABVQMediaContent@@@Z @ 403 NONAME ; bool QMediaPlaylistProvider::addMedia(class QMediaContent const &)
+ ?addPropertyWatch@QMediaObject@@IAEXABVQByteArray@@@Z @ 404 NONAME ; void QMediaObject::addPropertyWatch(class QByteArray const &)
+ ?addTimeRange@QMediaTimeRange@@QAEXABV1@@Z @ 405 NONAME ; void QMediaTimeRange::addTimeRange(class QMediaTimeRange const &)
+ ?aspectRatioMode@QGraphicsVideoItem@@QBE?AW4AspectRatioMode@Qt@@XZ @ 406 NONAME ; enum Qt::AspectRatioMode QGraphicsVideoItem::aspectRatioMode(void) const
+ ?aspectRatioMode@QVideoWidget@@QBE?AW4AspectRatioMode@1@XZ @ 407 NONAME ; enum QVideoWidget::AspectRatioMode QVideoWidget::aspectRatioMode(void) const
+ ?audioAvailableChanged@QMediaPlayer@@IAEX_N@Z @ 408 NONAME ; void QMediaPlayer::audioAvailableChanged(bool)
+ ?audioAvailableChanged@QMediaPlayerControl@@IAEX_N@Z @ 409 NONAME ; void QMediaPlayerControl::audioAvailableChanged(bool)
+ ?audioBitRate@QMediaResource@@QBEHXZ @ 410 NONAME ; int QMediaResource::audioBitRate(void) const
+ ?audioCodec@QMediaResource@@QBE?AVQString@@XZ @ 411 NONAME ; class QString QMediaResource::audioCodec(void) const
+ ?availabilityChanged@QMediaObject@@IAEX_N@Z @ 412 NONAME ; void QMediaObject::availabilityChanged(bool)
+ ?availabilityError@QMediaObject@@UBE?AW4AvailabilityError@QtMultimedia@@XZ @ 413 NONAME ; enum QtMultimedia::AvailabilityError QMediaObject::availabilityError(void) const
+ ?availableExtendedMetaData@QMediaObject@@QBE?AVQStringList@@XZ @ 414 NONAME ; class QStringList QMediaObject::availableExtendedMetaData(void) const
+ ?availableMetaData@QMediaObject@@QBE?AV?$QList@W4MetaData@QtMultimedia@@@@XZ @ 415 NONAME ; class QList<enum QtMultimedia::MetaData> QMediaObject::availableMetaData(void) const
+ ?availableOutputsChanged@QVideoOutputControl@@IAEXABV?$QList@W4Output@QVideoOutputControl@@@@@Z @ 416 NONAME ; void QVideoOutputControl::availableOutputsChanged(class QList<enum QVideoOutputControl::Output> const &)
+ ?availablePlaybackRangesChanged@QMediaPlayerControl@@IAEXABVQMediaTimeRange@@@Z @ 417 NONAME ; void QMediaPlayerControl::availablePlaybackRangesChanged(class QMediaTimeRange const &)
+ ?bind@QMediaObject@@UAEXPAVQObject@@@Z @ 418 NONAME ; void QMediaObject::bind(class QObject *)
+ ?bind@QMediaPlayer@@UAEXPAVQObject@@@Z @ 419 NONAME ; void QMediaPlayer::bind(class QObject *)
+ ?boundingRect@QGraphicsVideoItem@@UBE?AVQRectF@@XZ @ 420 NONAME ; class QRectF QGraphicsVideoItem::boundingRect(void) const
+ ?brightness@QPainterVideoSurface@@QBEHXZ @ 421 NONAME ; int QPainterVideoSurface::brightness(void) const
+ ?brightness@QVideoWidget@@QBEHXZ @ 422 NONAME ; int QVideoWidget::brightness(void) const
+ ?brightnessChanged@QVideoWidget@@IAEXH@Z @ 423 NONAME ; void QVideoWidget::brightnessChanged(int)
+ ?brightnessChanged@QVideoWidgetControl@@IAEXH@Z @ 424 NONAME ; void QVideoWidgetControl::brightnessChanged(int)
+ ?brightnessChanged@QVideoWindowControl@@IAEXH@Z @ 425 NONAME ; void QVideoWindowControl::brightnessChanged(int)
+ ?bufferStatus@QMediaPlayer@@QBEHXZ @ 426 NONAME ; int QMediaPlayer::bufferStatus(void) const
+ ?bufferStatusChanged@QMediaPlayer@@IAEXH@Z @ 427 NONAME ; void QMediaPlayer::bufferStatusChanged(int)
+ ?bufferStatusChanged@QMediaPlayerControl@@IAEXH@Z @ 428 NONAME ; void QMediaPlayerControl::bufferStatusChanged(int)
+ ?canonicalRequest@QMediaContent@@QBE?AVQNetworkRequest@@XZ @ 429 NONAME ; class QNetworkRequest QMediaContent::canonicalRequest(void) const
+ ?canonicalResource@QMediaContent@@QBE?AVQMediaResource@@XZ @ 430 NONAME ; class QMediaResource QMediaContent::canonicalResource(void) const
+ ?canonicalUrl@QMediaContent@@QBE?AVQUrl@@XZ @ 431 NONAME ; class QUrl QMediaContent::canonicalUrl(void) const
+ ?channelCount@QAudioFormat@@QBEHXZ @ 432 NONAME ; int QAudioFormat::channelCount(void) const
+ ?channelCount@QMediaResource@@QBEHXZ @ 433 NONAME ; int QMediaResource::channelCount(void) const
+ ?clear@QLocalMediaPlaylistProvider@@UAE_NXZ @ 434 NONAME ; bool QLocalMediaPlaylistProvider::clear(void)
+ ?clear@QMediaPlaylist@@QAE_NXZ @ 435 NONAME ; bool QMediaPlaylist::clear(void)
+ ?clear@QMediaPlaylistProvider@@UAE_NXZ @ 436 NONAME ; bool QMediaPlaylistProvider::clear(void)
+ ?clear@QMediaTimeRange@@QAEXXZ @ 437 NONAME ; void QMediaTimeRange::clear(void)
+ ?codecs@QMediaServiceProviderHint@@QBE?AVQStringList@@XZ @ 438 NONAME ; class QStringList QMediaServiceProviderHint::codecs(void) const
+ ?contains@QMediaTimeInterval@@QBE_N_J@Z @ 439 NONAME ; bool QMediaTimeInterval::contains(long long) const
+ ?contains@QMediaTimeRange@@QBE_N_J@Z @ 440 NONAME ; bool QMediaTimeRange::contains(long long) const
+ ?contrast@QPainterVideoSurface@@QBEHXZ @ 441 NONAME ; int QPainterVideoSurface::contrast(void) const
+ ?contrast@QVideoWidget@@QBEHXZ @ 442 NONAME ; int QVideoWidget::contrast(void) const
+ ?contrastChanged@QVideoWidget@@IAEXH@Z @ 443 NONAME ; void QVideoWidget::contrastChanged(int)
+ ?contrastChanged@QVideoWidgetControl@@IAEXH@Z @ 444 NONAME ; void QVideoWidgetControl::contrastChanged(int)
+ ?contrastChanged@QVideoWindowControl@@IAEXH@Z @ 445 NONAME ; void QVideoWindowControl::contrastChanged(int)
+ ?createPainter@QPainterVideoSurface@@AAEXXZ @ 446 NONAME ; void QPainterVideoSurface::createPainter(void)
+ ?currentIndex@QMediaPlaylist@@QBEHXZ @ 447 NONAME ; int QMediaPlaylist::currentIndex(void) const
+ ?currentIndex@QMediaPlaylistNavigator@@QBEHXZ @ 448 NONAME ; int QMediaPlaylistNavigator::currentIndex(void) const
+ ?currentIndexChanged@QMediaPlaylist@@IAEXH@Z @ 449 NONAME ; void QMediaPlaylist::currentIndexChanged(int)
+ ?currentIndexChanged@QMediaPlaylistControl@@IAEXH@Z @ 450 NONAME ; void QMediaPlaylistControl::currentIndexChanged(int)
+ ?currentIndexChanged@QMediaPlaylistNavigator@@IAEXH@Z @ 451 NONAME ; void QMediaPlaylistNavigator::currentIndexChanged(int)
+ ?currentItem@QMediaPlaylistNavigator@@QBE?AVQMediaContent@@XZ @ 452 NONAME ; class QMediaContent QMediaPlaylistNavigator::currentItem(void) const
+ ?currentMedia@QMediaPlaylist@@QBE?AVQMediaContent@@XZ @ 453 NONAME ; class QMediaContent QMediaPlaylist::currentMedia(void) const
+ ?currentMediaChanged@QMediaPlaylist@@IAEXABVQMediaContent@@@Z @ 454 NONAME ; void QMediaPlaylist::currentMediaChanged(class QMediaContent const &)
+ ?currentMediaChanged@QMediaPlaylistControl@@IAEXABVQMediaContent@@@Z @ 455 NONAME ; void QMediaPlaylistControl::currentMediaChanged(class QMediaContent const &)
+ ?d_func@QGraphicsVideoItem@@AAEPAVQGraphicsVideoItemPrivate@@XZ @ 456 NONAME ; class QGraphicsVideoItemPrivate * QGraphicsVideoItem::d_func(void)
+ ?d_func@QGraphicsVideoItem@@ABEPBVQGraphicsVideoItemPrivate@@XZ @ 457 NONAME ; class QGraphicsVideoItemPrivate const * QGraphicsVideoItem::d_func(void) const
+ ?d_func@QLocalMediaPlaylistProvider@@AAEPAVQLocalMediaPlaylistProviderPrivate@@XZ @ 458 NONAME ; class QLocalMediaPlaylistProviderPrivate * QLocalMediaPlaylistProvider::d_func(void)
+ ?d_func@QLocalMediaPlaylistProvider@@ABEPBVQLocalMediaPlaylistProviderPrivate@@XZ @ 459 NONAME ; class QLocalMediaPlaylistProviderPrivate const * QLocalMediaPlaylistProvider::d_func(void) const
+ ?d_func@QMediaControl@@AAEPAVQMediaControlPrivate@@XZ @ 460 NONAME ; class QMediaControlPrivate * QMediaControl::d_func(void)
+ ?d_func@QMediaControl@@ABEPBVQMediaControlPrivate@@XZ @ 461 NONAME ; class QMediaControlPrivate const * QMediaControl::d_func(void) const
+ ?d_func@QMediaObject@@AAEPAVQMediaObjectPrivate@@XZ @ 462 NONAME ; class QMediaObjectPrivate * QMediaObject::d_func(void)
+ ?d_func@QMediaObject@@ABEPBVQMediaObjectPrivate@@XZ @ 463 NONAME ; class QMediaObjectPrivate const * QMediaObject::d_func(void) const
+ ?d_func@QMediaPlayer@@AAEPAVQMediaPlayerPrivate@@XZ @ 464 NONAME ; class QMediaPlayerPrivate * QMediaPlayer::d_func(void)
+ ?d_func@QMediaPlayer@@ABEPBVQMediaPlayerPrivate@@XZ @ 465 NONAME ; class QMediaPlayerPrivate const * QMediaPlayer::d_func(void) const
+ ?d_func@QMediaPlaylist@@AAEPAVQMediaPlaylistPrivate@@XZ @ 466 NONAME ; class QMediaPlaylistPrivate * QMediaPlaylist::d_func(void)
+ ?d_func@QMediaPlaylist@@ABEPBVQMediaPlaylistPrivate@@XZ @ 467 NONAME ; class QMediaPlaylistPrivate const * QMediaPlaylist::d_func(void) const
+ ?d_func@QMediaPlaylistNavigator@@AAEPAVQMediaPlaylistNavigatorPrivate@@XZ @ 468 NONAME ; class QMediaPlaylistNavigatorPrivate * QMediaPlaylistNavigator::d_func(void)
+ ?d_func@QMediaPlaylistNavigator@@ABEPBVQMediaPlaylistNavigatorPrivate@@XZ @ 469 NONAME ; class QMediaPlaylistNavigatorPrivate const * QMediaPlaylistNavigator::d_func(void) const
+ ?d_func@QMediaPlaylistProvider@@AAEPAVQMediaPlaylistProviderPrivate@@XZ @ 470 NONAME ; class QMediaPlaylistProviderPrivate * QMediaPlaylistProvider::d_func(void)
+ ?d_func@QMediaPlaylistProvider@@ABEPBVQMediaPlaylistProviderPrivate@@XZ @ 471 NONAME ; class QMediaPlaylistProviderPrivate const * QMediaPlaylistProvider::d_func(void) const
+ ?d_func@QMediaService@@AAEPAVQMediaServicePrivate@@XZ @ 472 NONAME ; class QMediaServicePrivate * QMediaService::d_func(void)
+ ?d_func@QMediaService@@ABEPBVQMediaServicePrivate@@XZ @ 473 NONAME ; class QMediaServicePrivate const * QMediaService::d_func(void) const
+ ?d_func@QVideoWidget@@AAEPAVQVideoWidgetPrivate@@XZ @ 474 NONAME ; class QVideoWidgetPrivate * QVideoWidget::d_func(void)
+ ?d_func@QVideoWidget@@ABEPBVQVideoWidgetPrivate@@XZ @ 475 NONAME ; class QVideoWidgetPrivate const * QVideoWidget::d_func(void) const
+ ?dataSize@QMediaResource@@QBE_JXZ @ 476 NONAME ; long long QMediaResource::dataSize(void) const
+ ?defaultServiceProvider@QMediaServiceProvider@@SAPAV1@XZ @ 477 NONAME ; class QMediaServiceProvider * QMediaServiceProvider::defaultServiceProvider(void)
+ ?device@QMediaServiceProviderHint@@QBE?AVQByteArray@@XZ @ 478 NONAME ; class QByteArray QMediaServiceProviderHint::device(void) const
+ ?deviceDescription@QMediaServiceProvider@@UAE?AVQString@@ABVQByteArray@@0@Z @ 479 NONAME ; class QString QMediaServiceProvider::deviceDescription(class QByteArray const &, class QByteArray const &)
+ ?devices@QMediaServiceProvider@@UBE?AV?$QList@VQByteArray@@@@ABVQByteArray@@@Z @ 480 NONAME ; class QList<class QByteArray> QMediaServiceProvider::devices(class QByteArray const &) const
+ ?devicesChanged@QVideoDeviceControl@@IAEXXZ @ 481 NONAME ; void QVideoDeviceControl::devicesChanged(void)
+ ?duration@QMediaPlayer@@QBE_JXZ @ 482 NONAME ; long long QMediaPlayer::duration(void) const
+ ?durationChanged@QMediaPlayer@@IAEX_J@Z @ 483 NONAME ; void QMediaPlayer::durationChanged(long long)
+ ?durationChanged@QMediaPlayerControl@@IAEX_J@Z @ 484 NONAME ; void QMediaPlayerControl::durationChanged(long long)
+ ?earliestTime@QMediaTimeRange@@QBE_JXZ @ 485 NONAME ; long long QMediaTimeRange::earliestTime(void) const
+ ?end@QMediaTimeInterval@@QBE_JXZ @ 486 NONAME ; long long QMediaTimeInterval::end(void) const
+ ?error@QMediaPlayer@@IAEXW4Error@1@@Z @ 487 NONAME ; void QMediaPlayer::error(enum QMediaPlayer::Error)
+ ?error@QMediaPlayer@@QBE?AW4Error@1@XZ @ 488 NONAME ; enum QMediaPlayer::Error QMediaPlayer::error(void) const
+ ?error@QMediaPlayerControl@@IAEXHABVQString@@@Z @ 489 NONAME ; void QMediaPlayerControl::error(int, class QString const &)
+ ?error@QMediaPlaylist@@QBE?AW4Error@1@XZ @ 490 NONAME ; enum QMediaPlaylist::Error QMediaPlaylist::error(void) const
+ ?errorString@QMediaPlayer@@QBE?AVQString@@XZ @ 491 NONAME ; class QString QMediaPlayer::errorString(void) const
+ ?errorString@QMediaPlaylist@@QBE?AVQString@@XZ @ 492 NONAME ; class QString QMediaPlaylist::errorString(void) const
+ ?event@QVideoWidget@@MAE_NPAVQEvent@@@Z @ 493 NONAME ; bool QVideoWidget::event(class QEvent *)
+ ?extendedMetaData@QMediaObject@@QBE?AVQVariant@@ABVQString@@@Z @ 494 NONAME ; class QVariant QMediaObject::extendedMetaData(class QString const &) const
+ ?features@QMediaServiceProviderHint@@QBE?AV?$QFlags@W4Feature@QMediaServiceProviderHint@@@@XZ @ 495 NONAME ; class QFlags<enum QMediaServiceProviderHint::Feature> QMediaServiceProviderHint::features(void) const
+ ?frameChanged@QPainterVideoSurface@@IAEXXZ @ 496 NONAME ; void QPainterVideoSurface::frameChanged(void)
+ ?fullScreenChanged@QVideoWidget@@IAEX_N@Z @ 497 NONAME ; void QVideoWidget::fullScreenChanged(bool)
+ ?fullScreenChanged@QVideoWidgetControl@@IAEX_N@Z @ 498 NONAME ; void QVideoWidgetControl::fullScreenChanged(bool)
+ ?fullScreenChanged@QVideoWindowControl@@IAEX_N@Z @ 499 NONAME ; void QVideoWindowControl::fullScreenChanged(bool)
+ ?getStaticMetaObject@QGraphicsVideoItem@@SAABUQMetaObject@@XZ @ 500 NONAME ; struct QMetaObject const & QGraphicsVideoItem::getStaticMetaObject(void)
+ ?getStaticMetaObject@QLocalMediaPlaylistProvider@@SAABUQMetaObject@@XZ @ 501 NONAME ; struct QMetaObject const & QLocalMediaPlaylistProvider::getStaticMetaObject(void)
+ ?getStaticMetaObject@QMediaControl@@SAABUQMetaObject@@XZ @ 502 NONAME ; struct QMetaObject const & QMediaControl::getStaticMetaObject(void)
+ ?getStaticMetaObject@QMediaObject@@SAABUQMetaObject@@XZ @ 503 NONAME ; struct QMetaObject const & QMediaObject::getStaticMetaObject(void)
+ ?getStaticMetaObject@QMediaPlayer@@SAABUQMetaObject@@XZ @ 504 NONAME ; struct QMetaObject const & QMediaPlayer::getStaticMetaObject(void)
+ ?getStaticMetaObject@QMediaPlayerControl@@SAABUQMetaObject@@XZ @ 505 NONAME ; struct QMetaObject const & QMediaPlayerControl::getStaticMetaObject(void)
+ ?getStaticMetaObject@QMediaPlaylist@@SAABUQMetaObject@@XZ @ 506 NONAME ; struct QMetaObject const & QMediaPlaylist::getStaticMetaObject(void)
+ ?getStaticMetaObject@QMediaPlaylistControl@@SAABUQMetaObject@@XZ @ 507 NONAME ; struct QMetaObject const & QMediaPlaylistControl::getStaticMetaObject(void)
+ ?getStaticMetaObject@QMediaPlaylistIOPlugin@@SAABUQMetaObject@@XZ @ 508 NONAME ; struct QMetaObject const & QMediaPlaylistIOPlugin::getStaticMetaObject(void)
+ ?getStaticMetaObject@QMediaPlaylistNavigator@@SAABUQMetaObject@@XZ @ 509 NONAME ; struct QMetaObject const & QMediaPlaylistNavigator::getStaticMetaObject(void)
+ ?getStaticMetaObject@QMediaPlaylistProvider@@SAABUQMetaObject@@XZ @ 510 NONAME ; struct QMetaObject const & QMediaPlaylistProvider::getStaticMetaObject(void)
+ ?getStaticMetaObject@QMediaService@@SAABUQMetaObject@@XZ @ 511 NONAME ; struct QMetaObject const & QMediaService::getStaticMetaObject(void)
+ ?getStaticMetaObject@QMediaServiceProvider@@SAABUQMetaObject@@XZ @ 512 NONAME ; struct QMetaObject const & QMediaServiceProvider::getStaticMetaObject(void)
+ ?getStaticMetaObject@QMediaServiceProviderPlugin@@SAABUQMetaObject@@XZ @ 513 NONAME ; struct QMetaObject const & QMediaServiceProviderPlugin::getStaticMetaObject(void)
+ ?getStaticMetaObject@QMetaDataControl@@SAABUQMetaObject@@XZ @ 514 NONAME ; struct QMetaObject const & QMetaDataControl::getStaticMetaObject(void)
+ ?getStaticMetaObject@QPainterVideoSurface@@SAABUQMetaObject@@XZ @ 515 NONAME ; struct QMetaObject const & QPainterVideoSurface::getStaticMetaObject(void)
+ ?getStaticMetaObject@QVideoDeviceControl@@SAABUQMetaObject@@XZ @ 516 NONAME ; struct QMetaObject const & QVideoDeviceControl::getStaticMetaObject(void)
+ ?getStaticMetaObject@QVideoOutputControl@@SAABUQMetaObject@@XZ @ 517 NONAME ; struct QMetaObject const & QVideoOutputControl::getStaticMetaObject(void)
+ ?getStaticMetaObject@QVideoRendererControl@@SAABUQMetaObject@@XZ @ 518 NONAME ; struct QMetaObject const & QVideoRendererControl::getStaticMetaObject(void)
+ ?getStaticMetaObject@QVideoWidget@@SAABUQMetaObject@@XZ @ 519 NONAME ; struct QMetaObject const & QVideoWidget::getStaticMetaObject(void)
+ ?getStaticMetaObject@QVideoWidgetControl@@SAABUQMetaObject@@XZ @ 520 NONAME ; struct QMetaObject const & QVideoWidgetControl::getStaticMetaObject(void)
+ ?getStaticMetaObject@QVideoWindowControl@@SAABUQMetaObject@@XZ @ 521 NONAME ; struct QMetaObject const & QVideoWindowControl::getStaticMetaObject(void)
+ ?hasSupport@QMediaPlayer@@SA?AW4SupportEstimate@QtMultimedia@@ABVQString@@ABVQStringList@@V?$QFlags@W4Flag@QMediaPlayer@@@@@Z @ 522 NONAME ; enum QtMultimedia::SupportEstimate QMediaPlayer::hasSupport(class QString const &, class QStringList const &, class QFlags<enum QMediaPlayer::Flag>)
+ ?hasSupport@QMediaServiceProvider@@UBE?AW4SupportEstimate@QtMultimedia@@ABVQByteArray@@ABVQString@@ABVQStringList@@H@Z @ 523 NONAME ; enum QtMultimedia::SupportEstimate QMediaServiceProvider::hasSupport(class QByteArray const &, class QString const &, class QStringList const &, int) const
+ ?hideEvent@QVideoWidget@@MAEXPAVQHideEvent@@@Z @ 524 NONAME ; void QVideoWidget::hideEvent(class QHideEvent *)
+ ?hue@QPainterVideoSurface@@QBEHXZ @ 525 NONAME ; int QPainterVideoSurface::hue(void) const
+ ?hue@QVideoWidget@@QBEHXZ @ 526 NONAME ; int QVideoWidget::hue(void) const
+ ?hueChanged@QVideoWidget@@IAEXH@Z @ 527 NONAME ; void QVideoWidget::hueChanged(int)
+ ?hueChanged@QVideoWidgetControl@@IAEXH@Z @ 528 NONAME ; void QVideoWidgetControl::hueChanged(int)
+ ?hueChanged@QVideoWindowControl@@IAEXH@Z @ 529 NONAME ; void QVideoWindowControl::hueChanged(int)
+ ?insertMedia@QLocalMediaPlaylistProvider@@UAE_NHABV?$QList@VQMediaContent@@@@@Z @ 530 NONAME ; bool QLocalMediaPlaylistProvider::insertMedia(int, class QList<class QMediaContent> const &)
+ ?insertMedia@QLocalMediaPlaylistProvider@@UAE_NHABVQMediaContent@@@Z @ 531 NONAME ; bool QLocalMediaPlaylistProvider::insertMedia(int, class QMediaContent const &)
+ ?insertMedia@QMediaPlaylist@@QAE_NHABV?$QList@VQMediaContent@@@@@Z @ 532 NONAME ; bool QMediaPlaylist::insertMedia(int, class QList<class QMediaContent> const &)
+ ?insertMedia@QMediaPlaylist@@QAE_NHABVQMediaContent@@@Z @ 533 NONAME ; bool QMediaPlaylist::insertMedia(int, class QMediaContent const &)
+ ?insertMedia@QMediaPlaylistProvider@@UAE_NHABV?$QList@VQMediaContent@@@@@Z @ 534 NONAME ; bool QMediaPlaylistProvider::insertMedia(int, class QList<class QMediaContent> const &)
+ ?insertMedia@QMediaPlaylistProvider@@UAE_NHABVQMediaContent@@@Z @ 535 NONAME ; bool QMediaPlaylistProvider::insertMedia(int, class QMediaContent const &)
+ ?intervals@QMediaTimeRange@@QBE?AV?$QList@VQMediaTimeInterval@@@@XZ @ 536 NONAME ; class QList<class QMediaTimeInterval> QMediaTimeRange::intervals(void) const
+ ?isAudioAvailable@QMediaPlayer@@QBE_NXZ @ 537 NONAME ; bool QMediaPlayer::isAudioAvailable(void) const
+ ?isAvailable@QMediaObject@@UBE_NXZ @ 538 NONAME ; bool QMediaObject::isAvailable(void) const
+ ?isContinuous@QMediaTimeRange@@QBE_NXZ @ 539 NONAME ; bool QMediaTimeRange::isContinuous(void) const
+ ?isEmpty@QMediaPlaylist@@QBE_NXZ @ 540 NONAME ; bool QMediaPlaylist::isEmpty(void) const
+ ?isEmpty@QMediaTimeRange@@QBE_NXZ @ 541 NONAME ; bool QMediaTimeRange::isEmpty(void) const
+ ?isFormatSupported@QPainterVideoSurface@@QBE_NABVQVideoSurfaceFormat@@PAV2@@Z @ 542 NONAME ; bool QPainterVideoSurface::isFormatSupported(class QVideoSurfaceFormat const &, class QVideoSurfaceFormat *) const
+ ?isMetaDataAvailable@QMediaObject@@QBE_NXZ @ 543 NONAME ; bool QMediaObject::isMetaDataAvailable(void) const
+ ?isMetaDataWritable@QMediaObject@@QBE_NXZ @ 544 NONAME ; bool QMediaObject::isMetaDataWritable(void) const
+ ?isMuted@QMediaPlayer@@QBE_NXZ @ 545 NONAME ; bool QMediaPlayer::isMuted(void) const
+ ?isNormal@QMediaTimeInterval@@QBE_NXZ @ 546 NONAME ; bool QMediaTimeInterval::isNormal(void) const
+ ?isNull@QMediaContent@@QBE_NXZ @ 547 NONAME ; bool QMediaContent::isNull(void) const
+ ?isNull@QMediaResource@@QBE_NXZ @ 548 NONAME ; bool QMediaResource::isNull(void) const
+ ?isNull@QMediaServiceProviderHint@@QBE_NXZ @ 549 NONAME ; bool QMediaServiceProviderHint::isNull(void) const
+ ?isReadOnly@QLocalMediaPlaylistProvider@@UBE_NXZ @ 550 NONAME ; bool QLocalMediaPlaylistProvider::isReadOnly(void) const
+ ?isReadOnly@QMediaPlaylist@@QBE_NXZ @ 551 NONAME ; bool QMediaPlaylist::isReadOnly(void) const
+ ?isReadOnly@QMediaPlaylistProvider@@UBE_NXZ @ 552 NONAME ; bool QMediaPlaylistProvider::isReadOnly(void) const
+ ?isReady@QPainterVideoSurface@@QBE_NXZ @ 553 NONAME ; bool QPainterVideoSurface::isReady(void) const
+ ?isSeekable@QMediaPlayer@@QBE_NXZ @ 554 NONAME ; bool QMediaPlayer::isSeekable(void) const
+ ?isVideoAvailable@QMediaPlayer@@QBE_NXZ @ 555 NONAME ; bool QMediaPlayer::isVideoAvailable(void) const
+ ?itemAt@QMediaPlaylistNavigator@@QBE?AVQMediaContent@@H@Z @ 556 NONAME ; class QMediaContent QMediaPlaylistNavigator::itemAt(int) const
+ ?itemChange@QGraphicsVideoItem@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 557 NONAME ; class QVariant QGraphicsVideoItem::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &)
+ ?jump@QMediaPlaylistNavigator@@QAEXH@Z @ 558 NONAME ; void QMediaPlaylistNavigator::jump(int)
+ ?language@QMediaResource@@QBE?AVQString@@XZ @ 559 NONAME ; class QString QMediaResource::language(void) const
+ ?latestTime@QMediaTimeRange@@QBE_JXZ @ 560 NONAME ; long long QMediaTimeRange::latestTime(void) const
+ ?load@QMediaPlaylist@@QAEXABVQUrl@@PBD@Z @ 561 NONAME ; void QMediaPlaylist::load(class QUrl const &, char const *)
+ ?load@QMediaPlaylist@@QAEXPAVQIODevice@@PBD@Z @ 562 NONAME ; void QMediaPlaylist::load(class QIODevice *, char const *)
+ ?load@QMediaPlaylistProvider@@UAE_NABVQUrl@@PBD@Z @ 563 NONAME ; bool QMediaPlaylistProvider::load(class QUrl const &, char const *)
+ ?load@QMediaPlaylistProvider@@UAE_NPAVQIODevice@@PBD@Z @ 564 NONAME ; bool QMediaPlaylistProvider::load(class QIODevice *, char const *)
+ ?loadFailed@QMediaPlaylist@@IAEXXZ @ 565 NONAME ; void QMediaPlaylist::loadFailed(void)
+ ?loadFailed@QMediaPlaylistProvider@@IAEXW4Error@QMediaPlaylist@@ABVQString@@@Z @ 566 NONAME ; void QMediaPlaylistProvider::loadFailed(enum QMediaPlaylist::Error, class QString const &)
+ ?loaded@QMediaPlaylist@@IAEXXZ @ 567 NONAME ; void QMediaPlaylist::loaded(void)
+ ?loaded@QMediaPlaylistProvider@@IAEXXZ @ 568 NONAME ; void QMediaPlaylistProvider::loaded(void)
+ ?media@QLocalMediaPlaylistProvider@@UBE?AVQMediaContent@@H@Z @ 569 NONAME ; class QMediaContent QLocalMediaPlaylistProvider::media(int) const
+ ?media@QMediaPlayer@@QBE?AVQMediaContent@@XZ @ 570 NONAME ; class QMediaContent QMediaPlayer::media(void) const
+ ?media@QMediaPlaylist@@QBE?AVQMediaContent@@H@Z @ 571 NONAME ; class QMediaContent QMediaPlaylist::media(int) const
+ ?mediaAboutToBeInserted@QMediaPlaylist@@IAEXHH@Z @ 572 NONAME ; void QMediaPlaylist::mediaAboutToBeInserted(int, int)
+ ?mediaAboutToBeInserted@QMediaPlaylistProvider@@IAEXHH@Z @ 573 NONAME ; void QMediaPlaylistProvider::mediaAboutToBeInserted(int, int)
+ ?mediaAboutToBeRemoved@QMediaPlaylist@@IAEXHH@Z @ 574 NONAME ; void QMediaPlaylist::mediaAboutToBeRemoved(int, int)
+ ?mediaAboutToBeRemoved@QMediaPlaylistProvider@@IAEXHH@Z @ 575 NONAME ; void QMediaPlaylistProvider::mediaAboutToBeRemoved(int, int)
+ ?mediaChanged@QMediaPlayer@@IAEXABVQMediaContent@@@Z @ 576 NONAME ; void QMediaPlayer::mediaChanged(class QMediaContent const &)
+ ?mediaChanged@QMediaPlayerControl@@IAEXABVQMediaContent@@@Z @ 577 NONAME ; void QMediaPlayerControl::mediaChanged(class QMediaContent const &)
+ ?mediaChanged@QMediaPlaylist@@IAEXHH@Z @ 578 NONAME ; void QMediaPlaylist::mediaChanged(int, int)
+ ?mediaChanged@QMediaPlaylistProvider@@IAEXHH@Z @ 579 NONAME ; void QMediaPlaylistProvider::mediaChanged(int, int)
+ ?mediaCount@QLocalMediaPlaylistProvider@@UBEHXZ @ 580 NONAME ; int QLocalMediaPlaylistProvider::mediaCount(void) const
+ ?mediaCount@QMediaPlaylist@@QBEHXZ @ 581 NONAME ; int QMediaPlaylist::mediaCount(void) const
+ ?mediaInserted@QMediaPlaylist@@IAEXHH@Z @ 582 NONAME ; void QMediaPlaylist::mediaInserted(int, int)
+ ?mediaInserted@QMediaPlaylistProvider@@IAEXHH@Z @ 583 NONAME ; void QMediaPlaylistProvider::mediaInserted(int, int)
+ ?mediaObject@QGraphicsVideoItem@@QBEPAVQMediaObject@@XZ @ 584 NONAME ; class QMediaObject * QGraphicsVideoItem::mediaObject(void) const
+ ?mediaObject@QMediaPlaylist@@QBEPAVQMediaObject@@XZ @ 585 NONAME ; class QMediaObject * QMediaPlaylist::mediaObject(void) const
+ ?mediaObject@QVideoWidget@@QBEPAVQMediaObject@@XZ @ 586 NONAME ; class QMediaObject * QVideoWidget::mediaObject(void) const
+ ?mediaRemoved@QMediaPlaylist@@IAEXHH@Z @ 587 NONAME ; void QMediaPlaylist::mediaRemoved(int, int)
+ ?mediaRemoved@QMediaPlaylistProvider@@IAEXHH@Z @ 588 NONAME ; void QMediaPlaylistProvider::mediaRemoved(int, int)
+ ?mediaStatus@QMediaPlayer@@QBE?AW4MediaStatus@1@XZ @ 589 NONAME ; enum QMediaPlayer::MediaStatus QMediaPlayer::mediaStatus(void) const
+ ?mediaStatusChanged@QMediaPlayer@@IAEXW4MediaStatus@1@@Z @ 590 NONAME ; void QMediaPlayer::mediaStatusChanged(enum QMediaPlayer::MediaStatus)
+ ?mediaStatusChanged@QMediaPlayerControl@@IAEXW4MediaStatus@QMediaPlayer@@@Z @ 591 NONAME ; void QMediaPlayerControl::mediaStatusChanged(enum QMediaPlayer::MediaStatus)
+ ?mediaStream@QMediaPlayer@@QBEPBVQIODevice@@XZ @ 592 NONAME ; class QIODevice const * QMediaPlayer::mediaStream(void) const
+ ?metaData@QMediaObject@@QBE?AVQVariant@@W4MetaData@QtMultimedia@@@Z @ 593 NONAME ; class QVariant QMediaObject::metaData(enum QtMultimedia::MetaData) const
+ ?metaDataAvailableChanged@QMediaObject@@IAEX_N@Z @ 594 NONAME ; void QMediaObject::metaDataAvailableChanged(bool)
+ ?metaDataAvailableChanged@QMetaDataControl@@IAEX_N@Z @ 595 NONAME ; void QMetaDataControl::metaDataAvailableChanged(bool)
+ ?metaDataChanged@QMediaObject@@IAEXXZ @ 596 NONAME ; void QMediaObject::metaDataChanged(void)
+ ?metaDataChanged@QMetaDataControl@@IAEXXZ @ 597 NONAME ; void QMetaDataControl::metaDataChanged(void)
+ ?metaDataWritableChanged@QMediaObject@@IAEX_N@Z @ 598 NONAME ; void QMediaObject::metaDataWritableChanged(bool)
+ ?metaObject@QGraphicsVideoItem@@UBEPBUQMetaObject@@XZ @ 599 NONAME ; struct QMetaObject const * QGraphicsVideoItem::metaObject(void) const
+ ?metaObject@QLocalMediaPlaylistProvider@@UBEPBUQMetaObject@@XZ @ 600 NONAME ; struct QMetaObject const * QLocalMediaPlaylistProvider::metaObject(void) const
+ ?metaObject@QMediaControl@@UBEPBUQMetaObject@@XZ @ 601 NONAME ; struct QMetaObject const * QMediaControl::metaObject(void) const
+ ?metaObject@QMediaObject@@UBEPBUQMetaObject@@XZ @ 602 NONAME ; struct QMetaObject const * QMediaObject::metaObject(void) const
+ ?metaObject@QMediaPlayer@@UBEPBUQMetaObject@@XZ @ 603 NONAME ; struct QMetaObject const * QMediaPlayer::metaObject(void) const
+ ?metaObject@QMediaPlayerControl@@UBEPBUQMetaObject@@XZ @ 604 NONAME ; struct QMetaObject const * QMediaPlayerControl::metaObject(void) const
+ ?metaObject@QMediaPlaylist@@UBEPBUQMetaObject@@XZ @ 605 NONAME ; struct QMetaObject const * QMediaPlaylist::metaObject(void) const
+ ?metaObject@QMediaPlaylistControl@@UBEPBUQMetaObject@@XZ @ 606 NONAME ; struct QMetaObject const * QMediaPlaylistControl::metaObject(void) const
+ ?metaObject@QMediaPlaylistIOPlugin@@UBEPBUQMetaObject@@XZ @ 607 NONAME ; struct QMetaObject const * QMediaPlaylistIOPlugin::metaObject(void) const
+ ?metaObject@QMediaPlaylistNavigator@@UBEPBUQMetaObject@@XZ @ 608 NONAME ; struct QMetaObject const * QMediaPlaylistNavigator::metaObject(void) const
+ ?metaObject@QMediaPlaylistProvider@@UBEPBUQMetaObject@@XZ @ 609 NONAME ; struct QMetaObject const * QMediaPlaylistProvider::metaObject(void) const
+ ?metaObject@QMediaService@@UBEPBUQMetaObject@@XZ @ 610 NONAME ; struct QMetaObject const * QMediaService::metaObject(void) const
+ ?metaObject@QMediaServiceProvider@@UBEPBUQMetaObject@@XZ @ 611 NONAME ; struct QMetaObject const * QMediaServiceProvider::metaObject(void) const
+ ?metaObject@QMediaServiceProviderPlugin@@UBEPBUQMetaObject@@XZ @ 612 NONAME ; struct QMetaObject const * QMediaServiceProviderPlugin::metaObject(void) const
+ ?metaObject@QMetaDataControl@@UBEPBUQMetaObject@@XZ @ 613 NONAME ; struct QMetaObject const * QMetaDataControl::metaObject(void) const
+ ?metaObject@QPainterVideoSurface@@UBEPBUQMetaObject@@XZ @ 614 NONAME ; struct QMetaObject const * QPainterVideoSurface::metaObject(void) const
+ ?metaObject@QVideoDeviceControl@@UBEPBUQMetaObject@@XZ @ 615 NONAME ; struct QMetaObject const * QVideoDeviceControl::metaObject(void) const
+ ?metaObject@QVideoOutputControl@@UBEPBUQMetaObject@@XZ @ 616 NONAME ; struct QMetaObject const * QVideoOutputControl::metaObject(void) const
+ ?metaObject@QVideoRendererControl@@UBEPBUQMetaObject@@XZ @ 617 NONAME ; struct QMetaObject const * QVideoRendererControl::metaObject(void) const
+ ?metaObject@QVideoWidget@@UBEPBUQMetaObject@@XZ @ 618 NONAME ; struct QMetaObject const * QVideoWidget::metaObject(void) const
+ ?metaObject@QVideoWidgetControl@@UBEPBUQMetaObject@@XZ @ 619 NONAME ; struct QMetaObject const * QVideoWidgetControl::metaObject(void) const
+ ?metaObject@QVideoWindowControl@@UBEPBUQMetaObject@@XZ @ 620 NONAME ; struct QMetaObject const * QVideoWindowControl::metaObject(void) const
+ ?mimeType@QMediaResource@@QBE?AVQString@@XZ @ 621 NONAME ; class QString QMediaResource::mimeType(void) const
+ ?mimeType@QMediaServiceProviderHint@@QBE?AVQString@@XZ @ 622 NONAME ; class QString QMediaServiceProviderHint::mimeType(void) const
+ ?moveEvent@QVideoWidget@@MAEXPAVQMoveEvent@@@Z @ 623 NONAME ; void QVideoWidget::moveEvent(class QMoveEvent *)
+ ?mutedChanged@QMediaPlayer@@IAEX_N@Z @ 624 NONAME ; void QMediaPlayer::mutedChanged(bool)
+ ?mutedChanged@QMediaPlayerControl@@IAEX_N@Z @ 625 NONAME ; void QMediaPlayerControl::mutedChanged(bool)
+ ?nativeSize@QGraphicsVideoItem@@QBE?AVQSizeF@@XZ @ 626 NONAME ; class QSizeF QGraphicsVideoItem::nativeSize(void) const
+ ?nativeSizeChanged@QGraphicsVideoItem@@IAEXABVQSizeF@@@Z @ 627 NONAME ; void QGraphicsVideoItem::nativeSizeChanged(class QSizeF const &)
+ ?nativeSizeChanged@QVideoWindowControl@@IAEXXZ @ 628 NONAME ; void QVideoWindowControl::nativeSizeChanged(void)
+ ?next@QMediaPlaylist@@QAEXXZ @ 629 NONAME ; void QMediaPlaylist::next(void)
+ ?next@QMediaPlaylistNavigator@@QAEXXZ @ 630 NONAME ; void QMediaPlaylistNavigator::next(void)
+ ?nextIndex@QMediaPlaylist@@QBEHH@Z @ 631 NONAME ; int QMediaPlaylist::nextIndex(int) const
+ ?nextIndex@QMediaPlaylistNavigator@@QBEHH@Z @ 632 NONAME ; int QMediaPlaylistNavigator::nextIndex(int) const
+ ?nextItem@QMediaPlaylistNavigator@@QBE?AVQMediaContent@@H@Z @ 633 NONAME ; class QMediaContent QMediaPlaylistNavigator::nextItem(int) const
+ ?normalized@QMediaTimeInterval@@QBE?AV1@XZ @ 634 NONAME ; class QMediaTimeInterval QMediaTimeInterval::normalized(void) const
+ ?notifyInterval@QMediaObject@@QBEHXZ @ 635 NONAME ; int QMediaObject::notifyInterval(void) const
+ ?notifyIntervalChanged@QMediaObject@@IAEXH@Z @ 636 NONAME ; void QMediaObject::notifyIntervalChanged(int)
+ ?offset@QGraphicsVideoItem@@QBE?AVQPointF@@XZ @ 637 NONAME ; class QPointF QGraphicsVideoItem::offset(void) const
+ ?paint@QGraphicsVideoItem@@UAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 638 NONAME ; void QGraphicsVideoItem::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
+ ?paint@QPainterVideoSurface@@QAEXPAVQPainter@@ABVQRectF@@1@Z @ 639 NONAME ; void QPainterVideoSurface::paint(class QPainter *, class QRectF const &, class QRectF const &)
+ ?paintEvent@QVideoWidget@@MAEXPAVQPaintEvent@@@Z @ 640 NONAME ; void QVideoWidget::paintEvent(class QPaintEvent *)
+ ?pause@QMediaPlayer@@QAEXXZ @ 641 NONAME ; void QMediaPlayer::pause(void)
+ ?play@QMediaPlayer@@QAEXXZ @ 642 NONAME ; void QMediaPlayer::play(void)
+ ?playbackMode@QMediaPlaylist@@QBE?AW4PlaybackMode@1@XZ @ 643 NONAME ; enum QMediaPlaylist::PlaybackMode QMediaPlaylist::playbackMode(void) const
+ ?playbackMode@QMediaPlaylistNavigator@@QBE?AW4PlaybackMode@QMediaPlaylist@@XZ @ 644 NONAME ; enum QMediaPlaylist::PlaybackMode QMediaPlaylistNavigator::playbackMode(void) const
+ ?playbackModeChanged@QMediaPlaylist@@IAEXW4PlaybackMode@1@@Z @ 645 NONAME ; void QMediaPlaylist::playbackModeChanged(enum QMediaPlaylist::PlaybackMode)
+ ?playbackModeChanged@QMediaPlaylistControl@@IAEXW4PlaybackMode@QMediaPlaylist@@@Z @ 646 NONAME ; void QMediaPlaylistControl::playbackModeChanged(enum QMediaPlaylist::PlaybackMode)
+ ?playbackModeChanged@QMediaPlaylistNavigator@@IAEXW4PlaybackMode@QMediaPlaylist@@@Z @ 647 NONAME ; void QMediaPlaylistNavigator::playbackModeChanged(enum QMediaPlaylist::PlaybackMode)
+ ?playbackRate@QMediaPlayer@@QBEMXZ @ 648 NONAME ; float QMediaPlayer::playbackRate(void) const
+ ?playbackRateChanged@QMediaPlayer@@IAEXM@Z @ 649 NONAME ; void QMediaPlayer::playbackRateChanged(float)
+ ?playbackRateChanged@QMediaPlayerControl@@IAEXM@Z @ 650 NONAME ; void QMediaPlayerControl::playbackRateChanged(float)
+ ?playlist@QMediaPlaylistNavigator@@QBEPAVQMediaPlaylistProvider@@XZ @ 651 NONAME ; class QMediaPlaylistProvider * QMediaPlaylistNavigator::playlist(void) const
+ ?playlistProviderChanged@QMediaPlaylistControl@@IAEXXZ @ 652 NONAME ; void QMediaPlaylistControl::playlistProviderChanged(void)
+ ?position@QMediaPlayer@@QBE_JXZ @ 653 NONAME ; long long QMediaPlayer::position(void) const
+ ?positionChanged@QMediaPlayer@@IAEX_J@Z @ 654 NONAME ; void QMediaPlayer::positionChanged(long long)
+ ?positionChanged@QMediaPlayerControl@@IAEX_J@Z @ 655 NONAME ; void QMediaPlayerControl::positionChanged(long long)
+ ?present@QPainterVideoSurface@@UAE_NABVQVideoFrame@@@Z @ 656 NONAME ; bool QPainterVideoSurface::present(class QVideoFrame const &)
+ ?previous@QMediaPlaylist@@QAEXXZ @ 657 NONAME ; void QMediaPlaylist::previous(void)
+ ?previous@QMediaPlaylistNavigator@@QAEXXZ @ 658 NONAME ; void QMediaPlaylistNavigator::previous(void)
+ ?previousIndex@QMediaPlaylist@@QBEHH@Z @ 659 NONAME ; int QMediaPlaylist::previousIndex(int) const
+ ?previousIndex@QMediaPlaylistNavigator@@QBEHH@Z @ 660 NONAME ; int QMediaPlaylistNavigator::previousIndex(int) const
+ ?previousItem@QMediaPlaylistNavigator@@QBE?AVQMediaContent@@H@Z @ 661 NONAME ; class QMediaContent QMediaPlaylistNavigator::previousItem(int) const
+ ?qRegisterDeclarativeElements@QtMultimedia@@YAXPBD@Z @ 662 NONAME ; void QtMultimedia::qRegisterDeclarativeElements(char const *)
+ ?qt_metacall@QGraphicsVideoItem@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 663 NONAME ; int QGraphicsVideoItem::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QLocalMediaPlaylistProvider@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 664 NONAME ; int QLocalMediaPlaylistProvider::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QMediaControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 665 NONAME ; int QMediaControl::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QMediaObject@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 666 NONAME ; int QMediaObject::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QMediaPlayer@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 667 NONAME ; int QMediaPlayer::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QMediaPlayerControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 668 NONAME ; int QMediaPlayerControl::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QMediaPlaylist@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 669 NONAME ; int QMediaPlaylist::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QMediaPlaylistControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 670 NONAME ; int QMediaPlaylistControl::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QMediaPlaylistIOPlugin@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 671 NONAME ; int QMediaPlaylistIOPlugin::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QMediaPlaylistNavigator@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 672 NONAME ; int QMediaPlaylistNavigator::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QMediaPlaylistProvider@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 673 NONAME ; int QMediaPlaylistProvider::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QMediaService@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 674 NONAME ; int QMediaService::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QMediaServiceProvider@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 675 NONAME ; int QMediaServiceProvider::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QMediaServiceProviderPlugin@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 676 NONAME ; int QMediaServiceProviderPlugin::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QMetaDataControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 677 NONAME ; int QMetaDataControl::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QPainterVideoSurface@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 678 NONAME ; int QPainterVideoSurface::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QVideoDeviceControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 679 NONAME ; int QVideoDeviceControl::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QVideoOutputControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 680 NONAME ; int QVideoOutputControl::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QVideoRendererControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 681 NONAME ; int QVideoRendererControl::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QVideoWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 682 NONAME ; int QVideoWidget::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QVideoWidgetControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 683 NONAME ; int QVideoWidgetControl::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QVideoWindowControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 684 NONAME ; int QVideoWindowControl::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacast@QGraphicsVideoItem@@UAEPAXPBD@Z @ 685 NONAME ; void * QGraphicsVideoItem::qt_metacast(char const *)
+ ?qt_metacast@QLocalMediaPlaylistProvider@@UAEPAXPBD@Z @ 686 NONAME ; void * QLocalMediaPlaylistProvider::qt_metacast(char const *)
+ ?qt_metacast@QMediaControl@@UAEPAXPBD@Z @ 687 NONAME ; void * QMediaControl::qt_metacast(char const *)
+ ?qt_metacast@QMediaObject@@UAEPAXPBD@Z @ 688 NONAME ; void * QMediaObject::qt_metacast(char const *)
+ ?qt_metacast@QMediaPlayer@@UAEPAXPBD@Z @ 689 NONAME ; void * QMediaPlayer::qt_metacast(char const *)
+ ?qt_metacast@QMediaPlayerControl@@UAEPAXPBD@Z @ 690 NONAME ; void * QMediaPlayerControl::qt_metacast(char const *)
+ ?qt_metacast@QMediaPlaylist@@UAEPAXPBD@Z @ 691 NONAME ; void * QMediaPlaylist::qt_metacast(char const *)
+ ?qt_metacast@QMediaPlaylistControl@@UAEPAXPBD@Z @ 692 NONAME ; void * QMediaPlaylistControl::qt_metacast(char const *)
+ ?qt_metacast@QMediaPlaylistIOPlugin@@UAEPAXPBD@Z @ 693 NONAME ; void * QMediaPlaylistIOPlugin::qt_metacast(char const *)
+ ?qt_metacast@QMediaPlaylistNavigator@@UAEPAXPBD@Z @ 694 NONAME ; void * QMediaPlaylistNavigator::qt_metacast(char const *)
+ ?qt_metacast@QMediaPlaylistProvider@@UAEPAXPBD@Z @ 695 NONAME ; void * QMediaPlaylistProvider::qt_metacast(char const *)
+ ?qt_metacast@QMediaService@@UAEPAXPBD@Z @ 696 NONAME ; void * QMediaService::qt_metacast(char const *)
+ ?qt_metacast@QMediaServiceProvider@@UAEPAXPBD@Z @ 697 NONAME ; void * QMediaServiceProvider::qt_metacast(char const *)
+ ?qt_metacast@QMediaServiceProviderPlugin@@UAEPAXPBD@Z @ 698 NONAME ; void * QMediaServiceProviderPlugin::qt_metacast(char const *)
+ ?qt_metacast@QMetaDataControl@@UAEPAXPBD@Z @ 699 NONAME ; void * QMetaDataControl::qt_metacast(char const *)
+ ?qt_metacast@QPainterVideoSurface@@UAEPAXPBD@Z @ 700 NONAME ; void * QPainterVideoSurface::qt_metacast(char const *)
+ ?qt_metacast@QVideoDeviceControl@@UAEPAXPBD@Z @ 701 NONAME ; void * QVideoDeviceControl::qt_metacast(char const *)
+ ?qt_metacast@QVideoOutputControl@@UAEPAXPBD@Z @ 702 NONAME ; void * QVideoOutputControl::qt_metacast(char const *)
+ ?qt_metacast@QVideoRendererControl@@UAEPAXPBD@Z @ 703 NONAME ; void * QVideoRendererControl::qt_metacast(char const *)
+ ?qt_metacast@QVideoWidget@@UAEPAXPBD@Z @ 704 NONAME ; void * QVideoWidget::qt_metacast(char const *)
+ ?qt_metacast@QVideoWidgetControl@@UAEPAXPBD@Z @ 705 NONAME ; void * QVideoWidgetControl::qt_metacast(char const *)
+ ?qt_metacast@QVideoWindowControl@@UAEPAXPBD@Z @ 706 NONAME ; void * QVideoWindowControl::qt_metacast(char const *)
+ ?removeInterval@QMediaTimeRange@@QAEXABVQMediaTimeInterval@@@Z @ 707 NONAME ; void QMediaTimeRange::removeInterval(class QMediaTimeInterval const &)
+ ?removeInterval@QMediaTimeRange@@QAEX_J0@Z @ 708 NONAME ; void QMediaTimeRange::removeInterval(long long, long long)
+ ?removeMedia@QLocalMediaPlaylistProvider@@UAE_NH@Z @ 709 NONAME ; bool QLocalMediaPlaylistProvider::removeMedia(int)
+ ?removeMedia@QLocalMediaPlaylistProvider@@UAE_NHH@Z @ 710 NONAME ; bool QLocalMediaPlaylistProvider::removeMedia(int, int)
+ ?removeMedia@QMediaPlaylist@@QAE_NH@Z @ 711 NONAME ; bool QMediaPlaylist::removeMedia(int)
+ ?removeMedia@QMediaPlaylist@@QAE_NHH@Z @ 712 NONAME ; bool QMediaPlaylist::removeMedia(int, int)
+ ?removeMedia@QMediaPlaylistProvider@@UAE_NH@Z @ 713 NONAME ; bool QMediaPlaylistProvider::removeMedia(int)
+ ?removeMedia@QMediaPlaylistProvider@@UAE_NHH@Z @ 714 NONAME ; bool QMediaPlaylistProvider::removeMedia(int, int)
+ ?removePropertyWatch@QMediaObject@@IAEXABVQByteArray@@@Z @ 715 NONAME ; void QMediaObject::removePropertyWatch(class QByteArray const &)
+ ?removeTimeRange@QMediaTimeRange@@QAEXABV1@@Z @ 716 NONAME ; void QMediaTimeRange::removeTimeRange(class QMediaTimeRange const &)
+ ?request@QMediaResource@@QBE?AVQNetworkRequest@@XZ @ 717 NONAME ; class QNetworkRequest QMediaResource::request(void) const
+ ?resizeEvent@QVideoWidget@@MAEXPAVQResizeEvent@@@Z @ 718 NONAME ; void QVideoWidget::resizeEvent(class QResizeEvent *)
+ ?resolution@QMediaResource@@QBE?AVQSize@@XZ @ 719 NONAME ; class QSize QMediaResource::resolution(void) const
+ ?resources@QMediaContent@@QBE?AV?$QList@VQMediaResource@@@@XZ @ 720 NONAME ; class QList<class QMediaResource> QMediaContent::resources(void) const
+ ?sampleRate@QAudioFormat@@QBEHXZ @ 721 NONAME ; int QAudioFormat::sampleRate(void) const
+ ?sampleRate@QMediaResource@@QBEHXZ @ 722 NONAME ; int QMediaResource::sampleRate(void) const
+ ?saturation@QPainterVideoSurface@@QBEHXZ @ 723 NONAME ; int QPainterVideoSurface::saturation(void) const
+ ?saturation@QVideoWidget@@QBEHXZ @ 724 NONAME ; int QVideoWidget::saturation(void) const
+ ?saturationChanged@QVideoWidget@@IAEXH@Z @ 725 NONAME ; void QVideoWidget::saturationChanged(int)
+ ?saturationChanged@QVideoWidgetControl@@IAEXH@Z @ 726 NONAME ; void QVideoWidgetControl::saturationChanged(int)
+ ?saturationChanged@QVideoWindowControl@@IAEXH@Z @ 727 NONAME ; void QVideoWindowControl::saturationChanged(int)
+ ?save@QMediaPlaylist@@QAE_NABVQUrl@@PBD@Z @ 728 NONAME ; bool QMediaPlaylist::save(class QUrl const &, char const *)
+ ?save@QMediaPlaylist@@QAE_NPAVQIODevice@@PBD@Z @ 729 NONAME ; bool QMediaPlaylist::save(class QIODevice *, char const *)
+ ?save@QMediaPlaylistProvider@@UAE_NABVQUrl@@PBD@Z @ 730 NONAME ; bool QMediaPlaylistProvider::save(class QUrl const &, char const *)
+ ?save@QMediaPlaylistProvider@@UAE_NPAVQIODevice@@PBD@Z @ 731 NONAME ; bool QMediaPlaylistProvider::save(class QIODevice *, char const *)
+ ?seekableChanged@QMediaPlayer@@IAEX_N@Z @ 732 NONAME ; void QMediaPlayer::seekableChanged(bool)
+ ?seekableChanged@QMediaPlayerControl@@IAEX_N@Z @ 733 NONAME ; void QMediaPlayerControl::seekableChanged(bool)
+ ?selectedDeviceChanged@QVideoDeviceControl@@IAEXABVQString@@@Z @ 734 NONAME ; void QVideoDeviceControl::selectedDeviceChanged(class QString const &)
+ ?selectedDeviceChanged@QVideoDeviceControl@@IAEXH@Z @ 735 NONAME ; void QVideoDeviceControl::selectedDeviceChanged(int)
+ ?service@QMediaObject@@UBEPAVQMediaService@@XZ @ 736 NONAME ; class QMediaService * QMediaObject::service(void) const
+ ?setAspectRatioMode@QGraphicsVideoItem@@QAEXW4AspectRatioMode@Qt@@@Z @ 737 NONAME ; void QGraphicsVideoItem::setAspectRatioMode(enum Qt::AspectRatioMode)
+ ?setAspectRatioMode@QVideoWidget@@QAEXW4AspectRatioMode@1@@Z @ 738 NONAME ; void QVideoWidget::setAspectRatioMode(enum QVideoWidget::AspectRatioMode)
+ ?setAudioBitRate@QMediaResource@@QAEXH@Z @ 739 NONAME ; void QMediaResource::setAudioBitRate(int)
+ ?setAudioCodec@QMediaResource@@QAEXABVQString@@@Z @ 740 NONAME ; void QMediaResource::setAudioCodec(class QString const &)
+ ?setBrightness@QPainterVideoSurface@@QAEXH@Z @ 741 NONAME ; void QPainterVideoSurface::setBrightness(int)
+ ?setBrightness@QVideoWidget@@QAEXH@Z @ 742 NONAME ; void QVideoWidget::setBrightness(int)
+ ?setChannelCount@QAudioFormat@@QAEXH@Z @ 743 NONAME ; void QAudioFormat::setChannelCount(int)
+ ?setChannelCount@QMediaResource@@QAEXH@Z @ 744 NONAME ; void QMediaResource::setChannelCount(int)
+ ?setContrast@QPainterVideoSurface@@QAEXH@Z @ 745 NONAME ; void QPainterVideoSurface::setContrast(int)
+ ?setContrast@QVideoWidget@@QAEXH@Z @ 746 NONAME ; void QVideoWidget::setContrast(int)
+ ?setCurrentIndex@QMediaPlaylist@@QAEXH@Z @ 747 NONAME ; void QMediaPlaylist::setCurrentIndex(int)
+ ?setDataSize@QMediaResource@@QAEX_J@Z @ 748 NONAME ; void QMediaResource::setDataSize(long long)
+ ?setExtendedMetaData@QMediaObject@@QAEXABVQString@@ABVQVariant@@@Z @ 749 NONAME ; void QMediaObject::setExtendedMetaData(class QString const &, class QVariant const &)
+ ?setFullScreen@QVideoWidget@@QAEX_N@Z @ 750 NONAME ; void QVideoWidget::setFullScreen(bool)
+ ?setHue@QPainterVideoSurface@@QAEXH@Z @ 751 NONAME ; void QPainterVideoSurface::setHue(int)
+ ?setHue@QVideoWidget@@QAEXH@Z @ 752 NONAME ; void QVideoWidget::setHue(int)
+ ?setLanguage@QMediaResource@@QAEXABVQString@@@Z @ 753 NONAME ; void QMediaResource::setLanguage(class QString const &)
+ ?setMedia@QMediaPlayer@@QAEXABVQMediaContent@@PAVQIODevice@@@Z @ 754 NONAME ; void QMediaPlayer::setMedia(class QMediaContent const &, class QIODevice *)
+ ?setMediaObject@QGraphicsVideoItem@@QAEXPAVQMediaObject@@@Z @ 755 NONAME ; void QGraphicsVideoItem::setMediaObject(class QMediaObject *)
+ ?setMediaObject@QMediaPlaylist@@QAEXPAVQMediaObject@@@Z @ 756 NONAME ; void QMediaPlaylist::setMediaObject(class QMediaObject *)
+ ?setMediaObject@QVideoWidget@@QAEXPAVQMediaObject@@@Z @ 757 NONAME ; void QVideoWidget::setMediaObject(class QMediaObject *)
+ ?setMetaData@QMediaObject@@QAEXW4MetaData@QtMultimedia@@ABVQVariant@@@Z @ 758 NONAME ; void QMediaObject::setMetaData(enum QtMultimedia::MetaData, class QVariant const &)
+ ?setMuted@QMediaPlayer@@QAEX_N@Z @ 759 NONAME ; void QMediaPlayer::setMuted(bool)
+ ?setNotifyInterval@QMediaObject@@QAEXH@Z @ 760 NONAME ; void QMediaObject::setNotifyInterval(int)
+ ?setOffset@QGraphicsVideoItem@@QAEXABVQPointF@@@Z @ 761 NONAME ; void QGraphicsVideoItem::setOffset(class QPointF const &)
+ ?setPlaybackMode@QMediaPlaylist@@QAEXW4PlaybackMode@1@@Z @ 762 NONAME ; void QMediaPlaylist::setPlaybackMode(enum QMediaPlaylist::PlaybackMode)
+ ?setPlaybackMode@QMediaPlaylistNavigator@@QAEXW4PlaybackMode@QMediaPlaylist@@@Z @ 763 NONAME ; void QMediaPlaylistNavigator::setPlaybackMode(enum QMediaPlaylist::PlaybackMode)
+ ?setPlaybackRate@QMediaPlayer@@QAEXM@Z @ 764 NONAME ; void QMediaPlayer::setPlaybackRate(float)
+ ?setPlaylist@QMediaPlaylistNavigator@@QAEXPAVQMediaPlaylistProvider@@@Z @ 765 NONAME ; void QMediaPlaylistNavigator::setPlaylist(class QMediaPlaylistProvider *)
+ ?setPosition@QMediaPlayer@@QAEX_J@Z @ 766 NONAME ; void QMediaPlayer::setPosition(long long)
+ ?setReady@QPainterVideoSurface@@QAEX_N@Z @ 767 NONAME ; void QPainterVideoSurface::setReady(bool)
+ ?setResolution@QMediaResource@@QAEXABVQSize@@@Z @ 768 NONAME ; void QMediaResource::setResolution(class QSize const &)
+ ?setResolution@QMediaResource@@QAEXHH@Z @ 769 NONAME ; void QMediaResource::setResolution(int, int)
+ ?setSampleRate@QAudioFormat@@QAEXH@Z @ 770 NONAME ; void QAudioFormat::setSampleRate(int)
+ ?setSampleRate@QMediaResource@@QAEXH@Z @ 771 NONAME ; void QMediaResource::setSampleRate(int)
+ ?setSaturation@QPainterVideoSurface@@QAEXH@Z @ 772 NONAME ; void QPainterVideoSurface::setSaturation(int)
+ ?setSaturation@QVideoWidget@@QAEXH@Z @ 773 NONAME ; void QVideoWidget::setSaturation(int)
+ ?setSize@QGraphicsVideoItem@@QAEXABVQSizeF@@@Z @ 774 NONAME ; void QGraphicsVideoItem::setSize(class QSizeF const &)
+ ?setVideoBitRate@QMediaResource@@QAEXH@Z @ 775 NONAME ; void QMediaResource::setVideoBitRate(int)
+ ?setVideoCodec@QMediaResource@@QAEXABVQString@@@Z @ 776 NONAME ; void QMediaResource::setVideoCodec(class QString const &)
+ ?setVolume@QMediaPlayer@@QAEXH@Z @ 777 NONAME ; void QMediaPlayer::setVolume(int)
+ ?setupMetaData@QMediaObject@@AAEXXZ @ 778 NONAME ; void QMediaObject::setupMetaData(void)
+ ?showEvent@QVideoWidget@@MAEXPAVQShowEvent@@@Z @ 779 NONAME ; void QVideoWidget::showEvent(class QShowEvent *)
+ ?shuffle@QLocalMediaPlaylistProvider@@UAEXXZ @ 780 NONAME ; void QLocalMediaPlaylistProvider::shuffle(void)
+ ?shuffle@QMediaPlaylist@@QAEXXZ @ 781 NONAME ; void QMediaPlaylist::shuffle(void)
+ ?shuffle@QMediaPlaylistProvider@@UAEXXZ @ 782 NONAME ; void QMediaPlaylistProvider::shuffle(void)
+ ?size@QGraphicsVideoItem@@QBE?AVQSizeF@@XZ @ 783 NONAME ; class QSizeF QGraphicsVideoItem::size(void) const
+ ?sizeHint@QVideoWidget@@UBE?AVQSize@@XZ @ 784 NONAME ; class QSize QVideoWidget::sizeHint(void) const
+ ?start@QMediaTimeInterval@@QBE_JXZ @ 785 NONAME ; long long QMediaTimeInterval::start(void) const
+ ?start@QPainterVideoSurface@@UAE_NABVQVideoSurfaceFormat@@@Z @ 786 NONAME ; bool QPainterVideoSurface::start(class QVideoSurfaceFormat const &)
+ ?state@QMediaPlayer@@QBE?AW4State@1@XZ @ 787 NONAME ; enum QMediaPlayer::State QMediaPlayer::state(void) const
+ ?stateChanged@QMediaPlayer@@IAEXW4State@1@@Z @ 788 NONAME ; void QMediaPlayer::stateChanged(enum QMediaPlayer::State)
+ ?stateChanged@QMediaPlayerControl@@IAEXW4State@QMediaPlayer@@@Z @ 789 NONAME ; void QMediaPlayerControl::stateChanged(enum QMediaPlayer::State)
+ ?stop@QMediaPlayer@@QAEXXZ @ 790 NONAME ; void QMediaPlayer::stop(void)
+ ?stop@QPainterVideoSurface@@UAEXXZ @ 791 NONAME ; void QPainterVideoSurface::stop(void)
+ ?supportedChannelCounts@QAudioDeviceInfo@@QBE?AV?$QList@H@@XZ @ 792 NONAME ; class QList<int> QAudioDeviceInfo::supportedChannelCounts(void) const
+ ?supportedMimeTypes@QMediaPlayer@@SA?AVQStringList@@V?$QFlags@W4Flag@QMediaPlayer@@@@@Z @ 793 NONAME ; class QStringList QMediaPlayer::supportedMimeTypes(class QFlags<enum QMediaPlayer::Flag>)
+ ?supportedMimeTypes@QMediaServiceProvider@@UBE?AVQStringList@@ABVQByteArray@@H@Z @ 794 NONAME ; class QStringList QMediaServiceProvider::supportedMimeTypes(class QByteArray const &, int) const
+ ?supportedPixelFormats@QPainterVideoSurface@@UBE?AV?$QList@W4PixelFormat@QVideoFrame@@@@W4HandleType@QAbstractVideoBuffer@@@Z @ 795 NONAME ; class QList<enum QVideoFrame::PixelFormat> QPainterVideoSurface::supportedPixelFormats(enum QAbstractVideoBuffer::HandleType) const
+ ?supportedSampleRates@QAudioDeviceInfo@@QBE?AV?$QList@H@@XZ @ 796 NONAME ; class QList<int> QAudioDeviceInfo::supportedSampleRates(void) const
+ ?surroundingItemsChanged@QMediaPlaylistNavigator@@IAEXXZ @ 797 NONAME ; void QMediaPlaylistNavigator::surroundingItemsChanged(void)
+ ?tr@QGraphicsVideoItem@@SA?AVQString@@PBD0@Z @ 798 NONAME ; class QString QGraphicsVideoItem::tr(char const *, char const *)
+ ?tr@QGraphicsVideoItem@@SA?AVQString@@PBD0H@Z @ 799 NONAME ; class QString QGraphicsVideoItem::tr(char const *, char const *, int)
+ ?tr@QLocalMediaPlaylistProvider@@SA?AVQString@@PBD0@Z @ 800 NONAME ; class QString QLocalMediaPlaylistProvider::tr(char const *, char const *)
+ ?tr@QLocalMediaPlaylistProvider@@SA?AVQString@@PBD0H@Z @ 801 NONAME ; class QString QLocalMediaPlaylistProvider::tr(char const *, char const *, int)
+ ?tr@QMediaControl@@SA?AVQString@@PBD0@Z @ 802 NONAME ; class QString QMediaControl::tr(char const *, char const *)
+ ?tr@QMediaControl@@SA?AVQString@@PBD0H@Z @ 803 NONAME ; class QString QMediaControl::tr(char const *, char const *, int)
+ ?tr@QMediaObject@@SA?AVQString@@PBD0@Z @ 804 NONAME ; class QString QMediaObject::tr(char const *, char const *)
+ ?tr@QMediaObject@@SA?AVQString@@PBD0H@Z @ 805 NONAME ; class QString QMediaObject::tr(char const *, char const *, int)
+ ?tr@QMediaPlayer@@SA?AVQString@@PBD0@Z @ 806 NONAME ; class QString QMediaPlayer::tr(char const *, char const *)
+ ?tr@QMediaPlayer@@SA?AVQString@@PBD0H@Z @ 807 NONAME ; class QString QMediaPlayer::tr(char const *, char const *, int)
+ ?tr@QMediaPlayerControl@@SA?AVQString@@PBD0@Z @ 808 NONAME ; class QString QMediaPlayerControl::tr(char const *, char const *)
+ ?tr@QMediaPlayerControl@@SA?AVQString@@PBD0H@Z @ 809 NONAME ; class QString QMediaPlayerControl::tr(char const *, char const *, int)
+ ?tr@QMediaPlaylist@@SA?AVQString@@PBD0@Z @ 810 NONAME ; class QString QMediaPlaylist::tr(char const *, char const *)
+ ?tr@QMediaPlaylist@@SA?AVQString@@PBD0H@Z @ 811 NONAME ; class QString QMediaPlaylist::tr(char const *, char const *, int)
+ ?tr@QMediaPlaylistControl@@SA?AVQString@@PBD0@Z @ 812 NONAME ; class QString QMediaPlaylistControl::tr(char const *, char const *)
+ ?tr@QMediaPlaylistControl@@SA?AVQString@@PBD0H@Z @ 813 NONAME ; class QString QMediaPlaylistControl::tr(char const *, char const *, int)
+ ?tr@QMediaPlaylistIOPlugin@@SA?AVQString@@PBD0@Z @ 814 NONAME ; class QString QMediaPlaylistIOPlugin::tr(char const *, char const *)
+ ?tr@QMediaPlaylistIOPlugin@@SA?AVQString@@PBD0H@Z @ 815 NONAME ; class QString QMediaPlaylistIOPlugin::tr(char const *, char const *, int)
+ ?tr@QMediaPlaylistNavigator@@SA?AVQString@@PBD0@Z @ 816 NONAME ; class QString QMediaPlaylistNavigator::tr(char const *, char const *)
+ ?tr@QMediaPlaylistNavigator@@SA?AVQString@@PBD0H@Z @ 817 NONAME ; class QString QMediaPlaylistNavigator::tr(char const *, char const *, int)
+ ?tr@QMediaPlaylistProvider@@SA?AVQString@@PBD0@Z @ 818 NONAME ; class QString QMediaPlaylistProvider::tr(char const *, char const *)
+ ?tr@QMediaPlaylistProvider@@SA?AVQString@@PBD0H@Z @ 819 NONAME ; class QString QMediaPlaylistProvider::tr(char const *, char const *, int)
+ ?tr@QMediaService@@SA?AVQString@@PBD0@Z @ 820 NONAME ; class QString QMediaService::tr(char const *, char const *)
+ ?tr@QMediaService@@SA?AVQString@@PBD0H@Z @ 821 NONAME ; class QString QMediaService::tr(char const *, char const *, int)
+ ?tr@QMediaServiceProvider@@SA?AVQString@@PBD0@Z @ 822 NONAME ; class QString QMediaServiceProvider::tr(char const *, char const *)
+ ?tr@QMediaServiceProvider@@SA?AVQString@@PBD0H@Z @ 823 NONAME ; class QString QMediaServiceProvider::tr(char const *, char const *, int)
+ ?tr@QMediaServiceProviderPlugin@@SA?AVQString@@PBD0@Z @ 824 NONAME ; class QString QMediaServiceProviderPlugin::tr(char const *, char const *)
+ ?tr@QMediaServiceProviderPlugin@@SA?AVQString@@PBD0H@Z @ 825 NONAME ; class QString QMediaServiceProviderPlugin::tr(char const *, char const *, int)
+ ?tr@QMetaDataControl@@SA?AVQString@@PBD0@Z @ 826 NONAME ; class QString QMetaDataControl::tr(char const *, char const *)
+ ?tr@QMetaDataControl@@SA?AVQString@@PBD0H@Z @ 827 NONAME ; class QString QMetaDataControl::tr(char const *, char const *, int)
+ ?tr@QPainterVideoSurface@@SA?AVQString@@PBD0@Z @ 828 NONAME ; class QString QPainterVideoSurface::tr(char const *, char const *)
+ ?tr@QPainterVideoSurface@@SA?AVQString@@PBD0H@Z @ 829 NONAME ; class QString QPainterVideoSurface::tr(char const *, char const *, int)
+ ?tr@QVideoDeviceControl@@SA?AVQString@@PBD0@Z @ 830 NONAME ; class QString QVideoDeviceControl::tr(char const *, char const *)
+ ?tr@QVideoDeviceControl@@SA?AVQString@@PBD0H@Z @ 831 NONAME ; class QString QVideoDeviceControl::tr(char const *, char const *, int)
+ ?tr@QVideoOutputControl@@SA?AVQString@@PBD0@Z @ 832 NONAME ; class QString QVideoOutputControl::tr(char const *, char const *)
+ ?tr@QVideoOutputControl@@SA?AVQString@@PBD0H@Z @ 833 NONAME ; class QString QVideoOutputControl::tr(char const *, char const *, int)
+ ?tr@QVideoRendererControl@@SA?AVQString@@PBD0@Z @ 834 NONAME ; class QString QVideoRendererControl::tr(char const *, char const *)
+ ?tr@QVideoRendererControl@@SA?AVQString@@PBD0H@Z @ 835 NONAME ; class QString QVideoRendererControl::tr(char const *, char const *, int)
+ ?tr@QVideoWidget@@SA?AVQString@@PBD0@Z @ 836 NONAME ; class QString QVideoWidget::tr(char const *, char const *)
+ ?tr@QVideoWidget@@SA?AVQString@@PBD0H@Z @ 837 NONAME ; class QString QVideoWidget::tr(char const *, char const *, int)
+ ?tr@QVideoWidgetControl@@SA?AVQString@@PBD0@Z @ 838 NONAME ; class QString QVideoWidgetControl::tr(char const *, char const *)
+ ?tr@QVideoWidgetControl@@SA?AVQString@@PBD0H@Z @ 839 NONAME ; class QString QVideoWidgetControl::tr(char const *, char const *, int)
+ ?tr@QVideoWindowControl@@SA?AVQString@@PBD0@Z @ 840 NONAME ; class QString QVideoWindowControl::tr(char const *, char const *)
+ ?tr@QVideoWindowControl@@SA?AVQString@@PBD0H@Z @ 841 NONAME ; class QString QVideoWindowControl::tr(char const *, char const *, int)
+ ?trUtf8@QGraphicsVideoItem@@SA?AVQString@@PBD0@Z @ 842 NONAME ; class QString QGraphicsVideoItem::trUtf8(char const *, char const *)
+ ?trUtf8@QGraphicsVideoItem@@SA?AVQString@@PBD0H@Z @ 843 NONAME ; class QString QGraphicsVideoItem::trUtf8(char const *, char const *, int)
+ ?trUtf8@QLocalMediaPlaylistProvider@@SA?AVQString@@PBD0@Z @ 844 NONAME ; class QString QLocalMediaPlaylistProvider::trUtf8(char const *, char const *)
+ ?trUtf8@QLocalMediaPlaylistProvider@@SA?AVQString@@PBD0H@Z @ 845 NONAME ; class QString QLocalMediaPlaylistProvider::trUtf8(char const *, char const *, int)
+ ?trUtf8@QMediaControl@@SA?AVQString@@PBD0@Z @ 846 NONAME ; class QString QMediaControl::trUtf8(char const *, char const *)
+ ?trUtf8@QMediaControl@@SA?AVQString@@PBD0H@Z @ 847 NONAME ; class QString QMediaControl::trUtf8(char const *, char const *, int)
+ ?trUtf8@QMediaObject@@SA?AVQString@@PBD0@Z @ 848 NONAME ; class QString QMediaObject::trUtf8(char const *, char const *)
+ ?trUtf8@QMediaObject@@SA?AVQString@@PBD0H@Z @ 849 NONAME ; class QString QMediaObject::trUtf8(char const *, char const *, int)
+ ?trUtf8@QMediaPlayer@@SA?AVQString@@PBD0@Z @ 850 NONAME ; class QString QMediaPlayer::trUtf8(char const *, char const *)
+ ?trUtf8@QMediaPlayer@@SA?AVQString@@PBD0H@Z @ 851 NONAME ; class QString QMediaPlayer::trUtf8(char const *, char const *, int)
+ ?trUtf8@QMediaPlayerControl@@SA?AVQString@@PBD0@Z @ 852 NONAME ; class QString QMediaPlayerControl::trUtf8(char const *, char const *)
+ ?trUtf8@QMediaPlayerControl@@SA?AVQString@@PBD0H@Z @ 853 NONAME ; class QString QMediaPlayerControl::trUtf8(char const *, char const *, int)
+ ?trUtf8@QMediaPlaylist@@SA?AVQString@@PBD0@Z @ 854 NONAME ; class QString QMediaPlaylist::trUtf8(char const *, char const *)
+ ?trUtf8@QMediaPlaylist@@SA?AVQString@@PBD0H@Z @ 855 NONAME ; class QString QMediaPlaylist::trUtf8(char const *, char const *, int)
+ ?trUtf8@QMediaPlaylistControl@@SA?AVQString@@PBD0@Z @ 856 NONAME ; class QString QMediaPlaylistControl::trUtf8(char const *, char const *)
+ ?trUtf8@QMediaPlaylistControl@@SA?AVQString@@PBD0H@Z @ 857 NONAME ; class QString QMediaPlaylistControl::trUtf8(char const *, char const *, int)
+ ?trUtf8@QMediaPlaylistIOPlugin@@SA?AVQString@@PBD0@Z @ 858 NONAME ; class QString QMediaPlaylistIOPlugin::trUtf8(char const *, char const *)
+ ?trUtf8@QMediaPlaylistIOPlugin@@SA?AVQString@@PBD0H@Z @ 859 NONAME ; class QString QMediaPlaylistIOPlugin::trUtf8(char const *, char const *, int)
+ ?trUtf8@QMediaPlaylistNavigator@@SA?AVQString@@PBD0@Z @ 860 NONAME ; class QString QMediaPlaylistNavigator::trUtf8(char const *, char const *)
+ ?trUtf8@QMediaPlaylistNavigator@@SA?AVQString@@PBD0H@Z @ 861 NONAME ; class QString QMediaPlaylistNavigator::trUtf8(char const *, char const *, int)
+ ?trUtf8@QMediaPlaylistProvider@@SA?AVQString@@PBD0@Z @ 862 NONAME ; class QString QMediaPlaylistProvider::trUtf8(char const *, char const *)
+ ?trUtf8@QMediaPlaylistProvider@@SA?AVQString@@PBD0H@Z @ 863 NONAME ; class QString QMediaPlaylistProvider::trUtf8(char const *, char const *, int)
+ ?trUtf8@QMediaService@@SA?AVQString@@PBD0@Z @ 864 NONAME ; class QString QMediaService::trUtf8(char const *, char const *)
+ ?trUtf8@QMediaService@@SA?AVQString@@PBD0H@Z @ 865 NONAME ; class QString QMediaService::trUtf8(char const *, char const *, int)
+ ?trUtf8@QMediaServiceProvider@@SA?AVQString@@PBD0@Z @ 866 NONAME ; class QString QMediaServiceProvider::trUtf8(char const *, char const *)
+ ?trUtf8@QMediaServiceProvider@@SA?AVQString@@PBD0H@Z @ 867 NONAME ; class QString QMediaServiceProvider::trUtf8(char const *, char const *, int)
+ ?trUtf8@QMediaServiceProviderPlugin@@SA?AVQString@@PBD0@Z @ 868 NONAME ; class QString QMediaServiceProviderPlugin::trUtf8(char const *, char const *)
+ ?trUtf8@QMediaServiceProviderPlugin@@SA?AVQString@@PBD0H@Z @ 869 NONAME ; class QString QMediaServiceProviderPlugin::trUtf8(char const *, char const *, int)
+ ?trUtf8@QMetaDataControl@@SA?AVQString@@PBD0@Z @ 870 NONAME ; class QString QMetaDataControl::trUtf8(char const *, char const *)
+ ?trUtf8@QMetaDataControl@@SA?AVQString@@PBD0H@Z @ 871 NONAME ; class QString QMetaDataControl::trUtf8(char const *, char const *, int)
+ ?trUtf8@QPainterVideoSurface@@SA?AVQString@@PBD0@Z @ 872 NONAME ; class QString QPainterVideoSurface::trUtf8(char const *, char const *)
+ ?trUtf8@QPainterVideoSurface@@SA?AVQString@@PBD0H@Z @ 873 NONAME ; class QString QPainterVideoSurface::trUtf8(char const *, char const *, int)
+ ?trUtf8@QVideoDeviceControl@@SA?AVQString@@PBD0@Z @ 874 NONAME ; class QString QVideoDeviceControl::trUtf8(char const *, char const *)
+ ?trUtf8@QVideoDeviceControl@@SA?AVQString@@PBD0H@Z @ 875 NONAME ; class QString QVideoDeviceControl::trUtf8(char const *, char const *, int)
+ ?trUtf8@QVideoOutputControl@@SA?AVQString@@PBD0@Z @ 876 NONAME ; class QString QVideoOutputControl::trUtf8(char const *, char const *)
+ ?trUtf8@QVideoOutputControl@@SA?AVQString@@PBD0H@Z @ 877 NONAME ; class QString QVideoOutputControl::trUtf8(char const *, char const *, int)
+ ?trUtf8@QVideoRendererControl@@SA?AVQString@@PBD0@Z @ 878 NONAME ; class QString QVideoRendererControl::trUtf8(char const *, char const *)
+ ?trUtf8@QVideoRendererControl@@SA?AVQString@@PBD0H@Z @ 879 NONAME ; class QString QVideoRendererControl::trUtf8(char const *, char const *, int)
+ ?trUtf8@QVideoWidget@@SA?AVQString@@PBD0@Z @ 880 NONAME ; class QString QVideoWidget::trUtf8(char const *, char const *)
+ ?trUtf8@QVideoWidget@@SA?AVQString@@PBD0H@Z @ 881 NONAME ; class QString QVideoWidget::trUtf8(char const *, char const *, int)
+ ?trUtf8@QVideoWidgetControl@@SA?AVQString@@PBD0@Z @ 882 NONAME ; class QString QVideoWidgetControl::trUtf8(char const *, char const *)
+ ?trUtf8@QVideoWidgetControl@@SA?AVQString@@PBD0H@Z @ 883 NONAME ; class QString QVideoWidgetControl::trUtf8(char const *, char const *, int)
+ ?trUtf8@QVideoWindowControl@@SA?AVQString@@PBD0@Z @ 884 NONAME ; class QString QVideoWindowControl::trUtf8(char const *, char const *)
+ ?trUtf8@QVideoWindowControl@@SA?AVQString@@PBD0H@Z @ 885 NONAME ; class QString QVideoWindowControl::trUtf8(char const *, char const *, int)
+ ?translated@QMediaTimeInterval@@QBE?AV1@_J@Z @ 886 NONAME ; class QMediaTimeInterval QMediaTimeInterval::translated(long long) const
+ ?type@QMediaServiceProviderHint@@QBE?AW4Type@1@XZ @ 887 NONAME ; enum QMediaServiceProviderHint::Type QMediaServiceProviderHint::type(void) const
+ ?unbind@QMediaObject@@UAEXPAVQObject@@@Z @ 888 NONAME ; void QMediaObject::unbind(class QObject *)
+ ?unbind@QMediaPlayer@@UAEXPAVQObject@@@Z @ 889 NONAME ; void QMediaPlayer::unbind(class QObject *)
+ ?url@QMediaResource@@QBE?AVQUrl@@XZ @ 890 NONAME ; class QUrl QMediaResource::url(void) const
+ ?videoAvailableChanged@QMediaPlayer@@IAEX_N@Z @ 891 NONAME ; void QMediaPlayer::videoAvailableChanged(bool)
+ ?videoAvailableChanged@QMediaPlayerControl@@IAEX_N@Z @ 892 NONAME ; void QMediaPlayerControl::videoAvailableChanged(bool)
+ ?videoBitRate@QMediaResource@@QBEHXZ @ 893 NONAME ; int QMediaResource::videoBitRate(void) const
+ ?videoCodec@QMediaResource@@QBE?AVQString@@XZ @ 894 NONAME ; class QString QMediaResource::videoCodec(void) const
+ ?volume@QMediaPlayer@@QBEHXZ @ 895 NONAME ; int QMediaPlayer::volume(void) const
+ ?volumeChanged@QMediaPlayer@@IAEXH@Z @ 896 NONAME ; void QMediaPlayer::volumeChanged(int)
+ ?volumeChanged@QMediaPlayerControl@@IAEXH@Z @ 897 NONAME ; void QMediaPlayerControl::volumeChanged(int)
+ ?writableChanged@QMetaDataControl@@IAEX_N@Z @ 898 NONAME ; void QMetaDataControl::writableChanged(bool)
+ ?staticMetaObject@QMediaPlaylistProvider@@2UQMetaObject@@B @ 899 NONAME ; struct QMetaObject const QMediaPlaylistProvider::staticMetaObject
+ ?staticMetaObject@QVideoWidget@@2UQMetaObject@@B @ 900 NONAME ; struct QMetaObject const QVideoWidget::staticMetaObject
+ ?staticMetaObject@QMediaPlaylistControl@@2UQMetaObject@@B @ 901 NONAME ; struct QMetaObject const QMediaPlaylistControl::staticMetaObject
+ ?staticMetaObject@QMediaControl@@2UQMetaObject@@B @ 902 NONAME ; struct QMetaObject const QMediaControl::staticMetaObject
+ ?staticMetaObject@QLocalMediaPlaylistProvider@@2UQMetaObject@@B @ 903 NONAME ; struct QMetaObject const QLocalMediaPlaylistProvider::staticMetaObject
+ ?staticMetaObject@QMediaServiceProviderPlugin@@2UQMetaObject@@B @ 904 NONAME ; struct QMetaObject const QMediaServiceProviderPlugin::staticMetaObject
+ ?staticMetaObject@QVideoOutputControl@@2UQMetaObject@@B @ 905 NONAME ; struct QMetaObject const QVideoOutputControl::staticMetaObject
+ ?staticMetaObject@QMetaDataControl@@2UQMetaObject@@B @ 906 NONAME ; struct QMetaObject const QMetaDataControl::staticMetaObject
+ ?staticMetaObject@QMediaPlayer@@2UQMetaObject@@B @ 907 NONAME ; struct QMetaObject const QMediaPlayer::staticMetaObject
+ ?staticMetaObject@QMediaService@@2UQMetaObject@@B @ 908 NONAME ; struct QMetaObject const QMediaService::staticMetaObject
+ ?staticMetaObject@QMediaObject@@2UQMetaObject@@B @ 909 NONAME ; struct QMetaObject const QMediaObject::staticMetaObject
+ ?staticMetaObject@QMediaPlaylist@@2UQMetaObject@@B @ 910 NONAME ; struct QMetaObject const QMediaPlaylist::staticMetaObject
+ ?staticMetaObject@QMediaServiceProvider@@2UQMetaObject@@B @ 911 NONAME ; struct QMetaObject const QMediaServiceProvider::staticMetaObject
+ ?staticMetaObject@QMediaPlayerControl@@2UQMetaObject@@B @ 912 NONAME ; struct QMetaObject const QMediaPlayerControl::staticMetaObject
+ ?staticMetaObject@QMediaPlaylistNavigator@@2UQMetaObject@@B @ 913 NONAME ; struct QMetaObject const QMediaPlaylistNavigator::staticMetaObject
+ ?staticMetaObject@QVideoWidgetControl@@2UQMetaObject@@B @ 914 NONAME ; struct QMetaObject const QVideoWidgetControl::staticMetaObject
+ ?staticMetaObject@QVideoWindowControl@@2UQMetaObject@@B @ 915 NONAME ; struct QMetaObject const QVideoWindowControl::staticMetaObject
+ ?staticMetaObject@QVideoDeviceControl@@2UQMetaObject@@B @ 916 NONAME ; struct QMetaObject const QVideoDeviceControl::staticMetaObject
+ ?staticMetaObject@QVideoRendererControl@@2UQMetaObject@@B @ 917 NONAME ; struct QMetaObject const QVideoRendererControl::staticMetaObject
+ ?staticMetaObject@QPainterVideoSurface@@2UQMetaObject@@B @ 918 NONAME ; struct QMetaObject const QPainterVideoSurface::staticMetaObject
+ ?staticMetaObject@QMediaPlaylistIOPlugin@@2UQMetaObject@@B @ 919 NONAME ; struct QMetaObject const QMediaPlaylistIOPlugin::staticMetaObject
+ ?staticMetaObject@QGraphicsVideoItem@@2UQMetaObject@@B @ 920 NONAME ; struct QMetaObject const QGraphicsVideoItem::staticMetaObject
diff --git a/src/s60installs/bwins/QtNetworku.def b/src/s60installs/bwins/QtNetworku.def
index 3d604fc1a2..a24e0f5d6e 100644
--- a/src/s60installs/bwins/QtNetworku.def
+++ b/src/s60installs/bwins/QtNetworku.def
@@ -962,4 +962,168 @@ EXPORTS
?staticMetaObject@QTcpServer@@2UQMetaObject@@B @ 961 NONAME ; struct QMetaObject const QTcpServer::staticMetaObject
?staticMetaObject@QUdpSocket@@2UQMetaObject@@B @ 962 NONAME ; struct QMetaObject const QUdpSocket::staticMetaObject
?staticMetaObject@QAbstractSocket@@2UQMetaObject@@B @ 963 NONAME ; struct QMetaObject const QAbstractSocket::staticMetaObject
+ ??0QBearerEngine@@QAE@PAVQObject@@@Z @ 964 NONAME ; QBearerEngine::QBearerEngine(class QObject *)
+ ??0QBearerEnginePlugin@@QAE@PAVQObject@@@Z @ 965 NONAME ; QBearerEnginePlugin::QBearerEnginePlugin(class QObject *)
+ ??0QNetworkConfiguration@@QAE@ABV0@@Z @ 966 NONAME ; QNetworkConfiguration::QNetworkConfiguration(class QNetworkConfiguration const &)
+ ??0QNetworkConfiguration@@QAE@XZ @ 967 NONAME ; QNetworkConfiguration::QNetworkConfiguration(void)
+ ??0QNetworkConfigurationManager@@QAE@PAVQObject@@@Z @ 968 NONAME ; QNetworkConfigurationManager::QNetworkConfigurationManager(class QObject *)
+ ??0QNetworkConfigurationManagerPrivate@@QAE@XZ @ 969 NONAME ; QNetworkConfigurationManagerPrivate::QNetworkConfigurationManagerPrivate(void)
+ ??0QNetworkSession@@QAE@ABVQNetworkConfiguration@@PAVQObject@@@Z @ 970 NONAME ; QNetworkSession::QNetworkSession(class QNetworkConfiguration const &, class QObject *)
+ ??0QNetworkSessionPrivate@@QAE@XZ @ 971 NONAME ; QNetworkSessionPrivate::QNetworkSessionPrivate(void)
+ ??1QBearerEngine@@UAE@XZ @ 972 NONAME ; QBearerEngine::~QBearerEngine(void)
+ ??1QBearerEngineFactoryInterface@@UAE@XZ @ 973 NONAME ; QBearerEngineFactoryInterface::~QBearerEngineFactoryInterface(void)
+ ??1QBearerEnginePlugin@@UAE@XZ @ 974 NONAME ; QBearerEnginePlugin::~QBearerEnginePlugin(void)
+ ??1QNetworkConfiguration@@QAE@XZ @ 975 NONAME ; QNetworkConfiguration::~QNetworkConfiguration(void)
+ ??1QNetworkConfigurationManager@@UAE@XZ @ 976 NONAME ; QNetworkConfigurationManager::~QNetworkConfigurationManager(void)
+ ??1QNetworkConfigurationManagerPrivate@@UAE@XZ @ 977 NONAME ; QNetworkConfigurationManagerPrivate::~QNetworkConfigurationManagerPrivate(void)
+ ??1QNetworkSession@@UAE@XZ @ 978 NONAME ; QNetworkSession::~QNetworkSession(void)
+ ??1QNetworkSessionPrivate@@UAE@XZ @ 979 NONAME ; QNetworkSessionPrivate::~QNetworkSessionPrivate(void)
+ ??4QNetworkConfiguration@@QAEAAV0@ABV0@@Z @ 980 NONAME ; class QNetworkConfiguration & QNetworkConfiguration::operator=(class QNetworkConfiguration const &)
+ ??8QNetworkConfiguration@@QBE_NABV0@@Z @ 981 NONAME ; bool QNetworkConfiguration::operator==(class QNetworkConfiguration const &) const
+ ??9QNetworkConfiguration@@QBE_NABV0@@Z @ 982 NONAME ; bool QNetworkConfiguration::operator!=(class QNetworkConfiguration const &) const
+ ??_EQBearerEngine@@UAE@I@Z @ 983 NONAME ; QBearerEngine::~QBearerEngine(unsigned int)
+ ??_EQBearerEngineFactoryInterface@@UAE@I@Z @ 984 NONAME ; QBearerEngineFactoryInterface::~QBearerEngineFactoryInterface(unsigned int)
+ ??_EQBearerEnginePlugin@@UAE@I@Z @ 985 NONAME ; QBearerEnginePlugin::~QBearerEnginePlugin(unsigned int)
+ ??_EQNetworkConfigurationManager@@UAE@I@Z @ 986 NONAME ; QNetworkConfigurationManager::~QNetworkConfigurationManager(unsigned int)
+ ??_EQNetworkConfigurationManagerPrivate@@UAE@I@Z @ 987 NONAME ; QNetworkConfigurationManagerPrivate::~QNetworkConfigurationManagerPrivate(unsigned int)
+ ??_EQNetworkSession@@UAE@I@Z @ 988 NONAME ; QNetworkSession::~QNetworkSession(unsigned int)
+ ??_EQNetworkSessionPrivate@@UAE@I@Z @ 989 NONAME ; QNetworkSessionPrivate::~QNetworkSessionPrivate(unsigned int)
+ ?abort@QNetworkConfigurationManagerPrivate@@IAEXXZ @ 990 NONAME ; void QNetworkConfigurationManagerPrivate::abort(void)
+ ?accept@QNetworkSession@@QAEXXZ @ 991 NONAME ; void QNetworkSession::accept(void)
+ ?activeConfiguration@QNetworkAccessManager@@QBE?AVQNetworkConfiguration@@XZ @ 992 NONAME ; class QNetworkConfiguration QNetworkAccessManager::activeConfiguration(void) const
+ ?activeTime@QNetworkSession@@QBE_KXZ @ 993 NONAME ; unsigned long long QNetworkSession::activeTime(void) const
+ ?allConfigurations@QNetworkConfigurationManager@@QBE?AV?$QList@VQNetworkConfiguration@@@@V?$QFlags@W4StateFlag@QNetworkConfiguration@@@@@Z @ 994 NONAME ; class QList<class QNetworkConfiguration> QNetworkConfigurationManager::allConfigurations(class QFlags<enum QNetworkConfiguration::StateFlag>) const
+ ?bearerName@QNetworkConfiguration@@QBE?AVQString@@XZ @ 995 NONAME ; class QString QNetworkConfiguration::bearerName(void) const
+ ?bytesReceived@QNetworkSession@@QBE_KXZ @ 996 NONAME ; unsigned long long QNetworkSession::bytesReceived(void) const
+ ?bytesWritten@QNetworkSession@@QBE_KXZ @ 997 NONAME ; unsigned long long QNetworkSession::bytesWritten(void) const
+ ?capabilities@QNetworkConfigurationManager@@QBE?AV?$QFlags@W4Capability@QNetworkConfigurationManager@@@@XZ @ 998 NONAME ; class QFlags<enum QNetworkConfigurationManager::Capability> QNetworkConfigurationManager::capabilities(void) const
+ ?children@QNetworkConfiguration@@QBE?AV?$QList@VQNetworkConfiguration@@@@XZ @ 999 NONAME ; class QList<class QNetworkConfiguration> QNetworkConfiguration::children(void) const
+ ?close@QNetworkSession@@QAEXXZ @ 1000 NONAME ; void QNetworkSession::close(void)
+ ?closed@QNetworkSession@@IAEXXZ @ 1001 NONAME ; void QNetworkSession::closed(void)
+ ?closed@QNetworkSessionPrivate@@IAEXXZ @ 1002 NONAME ; void QNetworkSessionPrivate::closed(void)
+ ?configuration@QNetworkAccessManager@@QBE?AVQNetworkConfiguration@@XZ @ 1003 NONAME ; class QNetworkConfiguration QNetworkAccessManager::configuration(void) const
+ ?configuration@QNetworkSession@@QBE?AVQNetworkConfiguration@@XZ @ 1004 NONAME ; class QNetworkConfiguration QNetworkSession::configuration(void) const
+ ?configurationAdded@QBearerEngine@@IAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1005 NONAME ; void QBearerEngine::configurationAdded(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
+ ?configurationAdded@QNetworkConfigurationManager@@IAEXABVQNetworkConfiguration@@@Z @ 1006 NONAME ; void QNetworkConfigurationManager::configurationAdded(class QNetworkConfiguration const &)
+ ?configurationAdded@QNetworkConfigurationManagerPrivate@@AAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1007 NONAME ; void QNetworkConfigurationManagerPrivate::configurationAdded(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
+ ?configurationAdded@QNetworkConfigurationManagerPrivate@@IAEXABVQNetworkConfiguration@@@Z @ 1008 NONAME ; void QNetworkConfigurationManagerPrivate::configurationAdded(class QNetworkConfiguration const &)
+ ?configurationChanged@QBearerEngine@@IAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1009 NONAME ; void QBearerEngine::configurationChanged(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
+ ?configurationChanged@QNetworkConfigurationManager@@IAEXABVQNetworkConfiguration@@@Z @ 1010 NONAME ; void QNetworkConfigurationManager::configurationChanged(class QNetworkConfiguration const &)
+ ?configurationChanged@QNetworkConfigurationManagerPrivate@@AAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1011 NONAME ; void QNetworkConfigurationManagerPrivate::configurationChanged(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
+ ?configurationChanged@QNetworkConfigurationManagerPrivate@@IAEXABVQNetworkConfiguration@@@Z @ 1012 NONAME ; void QNetworkConfigurationManagerPrivate::configurationChanged(class QNetworkConfiguration const &)
+ ?configurationFromIdentifier@QNetworkConfigurationManager@@QBE?AVQNetworkConfiguration@@ABVQString@@@Z @ 1013 NONAME ; class QNetworkConfiguration QNetworkConfigurationManager::configurationFromIdentifier(class QString const &) const
+ ?configurationRemoved@QBearerEngine@@IAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1014 NONAME ; void QBearerEngine::configurationRemoved(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
+ ?configurationRemoved@QNetworkConfigurationManager@@IAEXABVQNetworkConfiguration@@@Z @ 1015 NONAME ; void QNetworkConfigurationManager::configurationRemoved(class QNetworkConfiguration const &)
+ ?configurationRemoved@QNetworkConfigurationManagerPrivate@@AAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1016 NONAME ; void QNetworkConfigurationManagerPrivate::configurationRemoved(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
+ ?configurationRemoved@QNetworkConfigurationManagerPrivate@@IAEXABVQNetworkConfiguration@@@Z @ 1017 NONAME ; void QNetworkConfigurationManagerPrivate::configurationRemoved(class QNetworkConfiguration const &)
+ ?configurationUpdateComplete@QNetworkConfigurationManagerPrivate@@IAEXXZ @ 1018 NONAME ; void QNetworkConfigurationManagerPrivate::configurationUpdateComplete(void)
+ ?connectNotify@QNetworkSession@@MAEXPBD@Z @ 1019 NONAME ; void QNetworkSession::connectNotify(char const *)
+ ?defaultConfiguration@QNetworkConfigurationManager@@QBE?AVQNetworkConfiguration@@XZ @ 1020 NONAME ; class QNetworkConfiguration QNetworkConfigurationManager::defaultConfiguration(void) const
+ ?disconnectNotify@QNetworkSession@@MAEXPBD@Z @ 1021 NONAME ; void QNetworkSession::disconnectNotify(char const *)
+ ?engines@QNetworkConfigurationManagerPrivate@@QAE?AV?$QList@PAVQBearerEngine@@@@XZ @ 1022 NONAME ; class QList<class QBearerEngine *> QNetworkConfigurationManagerPrivate::engines(void)
+ ?error@QNetworkSession@@IAEXW4SessionError@1@@Z @ 1023 NONAME ; void QNetworkSession::error(enum QNetworkSession::SessionError)
+ ?error@QNetworkSession@@QBE?AW4SessionError@1@XZ @ 1024 NONAME ; enum QNetworkSession::SessionError QNetworkSession::error(void) const
+ ?error@QNetworkSessionPrivate@@IAEXW4SessionError@QNetworkSession@@@Z @ 1025 NONAME ; void QNetworkSessionPrivate::error(enum QNetworkSession::SessionError)
+ ?errorString@QNetworkSession@@QBE?AVQString@@XZ @ 1026 NONAME ; class QString QNetworkSession::errorString(void) const
+ ?getStaticMetaObject@QBearerEngine@@SAABUQMetaObject@@XZ @ 1027 NONAME ; struct QMetaObject const & QBearerEngine::getStaticMetaObject(void)
+ ?getStaticMetaObject@QBearerEnginePlugin@@SAABUQMetaObject@@XZ @ 1028 NONAME ; struct QMetaObject const & QBearerEnginePlugin::getStaticMetaObject(void)
+ ?getStaticMetaObject@QNetworkConfigurationManager@@SAABUQMetaObject@@XZ @ 1029 NONAME ; struct QMetaObject const & QNetworkConfigurationManager::getStaticMetaObject(void)
+ ?getStaticMetaObject@QNetworkConfigurationManagerPrivate@@SAABUQMetaObject@@XZ @ 1030 NONAME ; struct QMetaObject const & QNetworkConfigurationManagerPrivate::getStaticMetaObject(void)
+ ?getStaticMetaObject@QNetworkSession@@SAABUQMetaObject@@XZ @ 1031 NONAME ; struct QMetaObject const & QNetworkSession::getStaticMetaObject(void)
+ ?getStaticMetaObject@QNetworkSessionPrivate@@SAABUQMetaObject@@XZ @ 1032 NONAME ; struct QMetaObject const & QNetworkSessionPrivate::getStaticMetaObject(void)
+ ?identifier@QNetworkConfiguration@@QBE?AVQString@@XZ @ 1033 NONAME ; class QString QNetworkConfiguration::identifier(void) const
+ ?ignore@QNetworkSession@@QAEXXZ @ 1034 NONAME ; void QNetworkSession::ignore(void)
+ ?interface@QNetworkSession@@QBE?AVQNetworkInterface@@XZ @ 1035 NONAME ; class QNetworkInterface QNetworkSession::interface(void) const
+ ?isOnline@QNetworkConfigurationManager@@QBE_NXZ @ 1036 NONAME ; bool QNetworkConfigurationManager::isOnline(void) const
+ ?isOpen@QNetworkSession@@QBE_NXZ @ 1037 NONAME ; bool QNetworkSession::isOpen(void) const
+ ?isRoamingAvailable@QNetworkConfiguration@@QBE_NXZ @ 1038 NONAME ; bool QNetworkConfiguration::isRoamingAvailable(void) const
+ ?isValid@QNetworkConfiguration@@QBE_NXZ @ 1039 NONAME ; bool QNetworkConfiguration::isValid(void) const
+ ?metaObject@QBearerEngine@@UBEPBUQMetaObject@@XZ @ 1040 NONAME ; struct QMetaObject const * QBearerEngine::metaObject(void) const
+ ?metaObject@QBearerEnginePlugin@@UBEPBUQMetaObject@@XZ @ 1041 NONAME ; struct QMetaObject const * QBearerEnginePlugin::metaObject(void) const
+ ?metaObject@QNetworkConfigurationManager@@UBEPBUQMetaObject@@XZ @ 1042 NONAME ; struct QMetaObject const * QNetworkConfigurationManager::metaObject(void) const
+ ?metaObject@QNetworkConfigurationManagerPrivate@@UBEPBUQMetaObject@@XZ @ 1043 NONAME ; struct QMetaObject const * QNetworkConfigurationManagerPrivate::metaObject(void) const
+ ?metaObject@QNetworkSession@@UBEPBUQMetaObject@@XZ @ 1044 NONAME ; struct QMetaObject const * QNetworkSession::metaObject(void) const
+ ?metaObject@QNetworkSessionPrivate@@UBEPBUQMetaObject@@XZ @ 1045 NONAME ; struct QMetaObject const * QNetworkSessionPrivate::metaObject(void) const
+ ?migrate@QNetworkSession@@QAEXXZ @ 1046 NONAME ; void QNetworkSession::migrate(void)
+ ?name@QNetworkConfiguration@@QBE?AVQString@@XZ @ 1047 NONAME ; class QString QNetworkConfiguration::name(void) const
+ ?networkAccessChanged@QNetworkAccessManager@@IAEX_N@Z @ 1048 NONAME ; void QNetworkAccessManager::networkAccessChanged(bool)
+ ?networkAccessEnabled@QNetworkAccessManager@@QBE_NXZ @ 1049 NONAME ; bool QNetworkAccessManager::networkAccessEnabled(void) const
+ ?networkSessionOnline@QNetworkAccessManager@@IAEXXZ @ 1050 NONAME ; void QNetworkAccessManager::networkSessionOnline(void)
+ ?newConfigurationActivated@QNetworkSession@@IAEXXZ @ 1051 NONAME ; void QNetworkSession::newConfigurationActivated(void)
+ ?newConfigurationActivated@QNetworkSessionPrivate@@IAEXXZ @ 1052 NONAME ; void QNetworkSessionPrivate::newConfigurationActivated(void)
+ ?onlineStateChanged@QNetworkConfigurationManager@@IAEX_N@Z @ 1053 NONAME ; void QNetworkConfigurationManager::onlineStateChanged(bool)
+ ?onlineStateChanged@QNetworkConfigurationManagerPrivate@@IAEX_N@Z @ 1054 NONAME ; void QNetworkConfigurationManagerPrivate::onlineStateChanged(bool)
+ ?open@QNetworkSession@@QAEXXZ @ 1055 NONAME ; void QNetworkSession::open(void)
+ ?opened@QNetworkSession@@IAEXXZ @ 1056 NONAME ; void QNetworkSession::opened(void)
+ ?performAsyncConfigurationUpdate@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1057 NONAME ; void QNetworkConfigurationManagerPrivate::performAsyncConfigurationUpdate(void)
+ ?preferredConfigurationChanged@QNetworkSession@@IAEXABVQNetworkConfiguration@@_N@Z @ 1058 NONAME ; void QNetworkSession::preferredConfigurationChanged(class QNetworkConfiguration const &, bool)
+ ?preferredConfigurationChanged@QNetworkSessionPrivate@@IAEXABVQNetworkConfiguration@@_N@Z @ 1059 NONAME ; void QNetworkSessionPrivate::preferredConfigurationChanged(class QNetworkConfiguration const &, bool)
+ ?priority@QNetworkRequest@@QBE?AW4Priority@1@XZ @ 1060 NONAME ; enum QNetworkRequest::Priority QNetworkRequest::priority(void) const
+ ?privateConfiguration@QNetworkSessionPrivate@@IBE?AV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@ABVQNetworkConfiguration@@@Z @ 1061 NONAME ; class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate> QNetworkSessionPrivate::privateConfiguration(class QNetworkConfiguration const &) const
+ ?purpose@QNetworkConfiguration@@QBE?AW4Purpose@1@XZ @ 1062 NONAME ; enum QNetworkConfiguration::Purpose QNetworkConfiguration::purpose(void) const
+ ?qNetworkConfigurationManagerPrivate@@YAPAVQNetworkConfigurationManagerPrivate@@XZ @ 1063 NONAME ; class QNetworkConfigurationManagerPrivate * qNetworkConfigurationManagerPrivate(void)
+ ?qt_metacall@QBearerEngine@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1064 NONAME ; int QBearerEngine::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QBearerEnginePlugin@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1065 NONAME ; int QBearerEnginePlugin::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QNetworkConfigurationManager@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1066 NONAME ; int QNetworkConfigurationManager::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QNetworkConfigurationManagerPrivate@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1067 NONAME ; int QNetworkConfigurationManagerPrivate::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QNetworkSession@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1068 NONAME ; int QNetworkSession::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@QNetworkSessionPrivate@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1069 NONAME ; int QNetworkSessionPrivate::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacast@QBearerEngine@@UAEPAXPBD@Z @ 1070 NONAME ; void * QBearerEngine::qt_metacast(char const *)
+ ?qt_metacast@QBearerEnginePlugin@@UAEPAXPBD@Z @ 1071 NONAME ; void * QBearerEnginePlugin::qt_metacast(char const *)
+ ?qt_metacast@QNetworkConfigurationManager@@UAEPAXPBD@Z @ 1072 NONAME ; void * QNetworkConfigurationManager::qt_metacast(char const *)
+ ?qt_metacast@QNetworkConfigurationManagerPrivate@@UAEPAXPBD@Z @ 1073 NONAME ; void * QNetworkConfigurationManagerPrivate::qt_metacast(char const *)
+ ?qt_metacast@QNetworkSession@@UAEPAXPBD@Z @ 1074 NONAME ; void * QNetworkSession::qt_metacast(char const *)
+ ?qt_metacast@QNetworkSessionPrivate@@UAEPAXPBD@Z @ 1075 NONAME ; void * QNetworkSessionPrivate::qt_metacast(char const *)
+ ?quitPendingWaitsForOpened@QNetworkSessionPrivate@@IAEXXZ @ 1076 NONAME ; void QNetworkSessionPrivate::quitPendingWaitsForOpened(void)
+ ?rawHeaderPairs@QNetworkReply@@QBEABV?$QList@U?$QPair@VQByteArray@@V1@@@@@XZ @ 1077 NONAME ; class QList<struct QPair<class QByteArray, class QByteArray> > const & QNetworkReply::rawHeaderPairs(void) const
+ ?reject@QNetworkSession@@QAEXXZ @ 1078 NONAME ; void QNetworkSession::reject(void)
+ ?sendCustomRequest@QNetworkAccessManager@@QAEPAVQNetworkReply@@ABVQNetworkRequest@@ABVQByteArray@@PAVQIODevice@@@Z @ 1079 NONAME ; class QNetworkReply * QNetworkAccessManager::sendCustomRequest(class QNetworkRequest const &, class QByteArray const &, class QIODevice *)
+ ?sessionProperty@QNetworkSession@@QBE?AVQVariant@@ABVQString@@@Z @ 1080 NONAME ; class QVariant QNetworkSession::sessionProperty(class QString const &) const
+ ?setALREnabled@QNetworkSessionPrivate@@UAEX_N@Z @ 1081 NONAME ; void QNetworkSessionPrivate::setALREnabled(bool)
+ ?setConfiguration@QNetworkAccessManager@@QAEXABVQNetworkConfiguration@@@Z @ 1082 NONAME ; void QNetworkAccessManager::setConfiguration(class QNetworkConfiguration const &)
+ ?setNetworkAccessEnabled@QNetworkAccessManager@@QAEX_N@Z @ 1083 NONAME ; void QNetworkAccessManager::setNetworkAccessEnabled(bool)
+ ?setPriority@QNetworkRequest@@QAEXW4Priority@1@@Z @ 1084 NONAME ; void QNetworkRequest::setPriority(enum QNetworkRequest::Priority)
+ ?setPrivateConfiguration@QNetworkSessionPrivate@@IBEXAAVQNetworkConfiguration@@V?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1085 NONAME ; void QNetworkSessionPrivate::setPrivateConfiguration(class QNetworkConfiguration &, class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>) const
+ ?setSessionProperty@QNetworkSession@@QAEXABVQString@@ABVQVariant@@@Z @ 1086 NONAME ; void QNetworkSession::setSessionProperty(class QString const &, class QVariant const &)
+ ?state@QNetworkConfiguration@@QBE?AV?$QFlags@W4StateFlag@QNetworkConfiguration@@@@XZ @ 1087 NONAME ; class QFlags<enum QNetworkConfiguration::StateFlag> QNetworkConfiguration::state(void) const
+ ?state@QNetworkSession@@QBE?AW4State@1@XZ @ 1088 NONAME ; enum QNetworkSession::State QNetworkSession::state(void) const
+ ?stateChanged@QNetworkSession@@IAEXW4State@1@@Z @ 1089 NONAME ; void QNetworkSession::stateChanged(enum QNetworkSession::State)
+ ?stateChanged@QNetworkSessionPrivate@@IAEXW4State@QNetworkSession@@@Z @ 1090 NONAME ; void QNetworkSessionPrivate::stateChanged(enum QNetworkSession::State)
+ ?stop@QNetworkSession@@QAEXXZ @ 1091 NONAME ; void QNetworkSession::stop(void)
+ ?tr@QBearerEngine@@SA?AVQString@@PBD0@Z @ 1092 NONAME ; class QString QBearerEngine::tr(char const *, char const *)
+ ?tr@QBearerEngine@@SA?AVQString@@PBD0H@Z @ 1093 NONAME ; class QString QBearerEngine::tr(char const *, char const *, int)
+ ?tr@QBearerEnginePlugin@@SA?AVQString@@PBD0@Z @ 1094 NONAME ; class QString QBearerEnginePlugin::tr(char const *, char const *)
+ ?tr@QBearerEnginePlugin@@SA?AVQString@@PBD0H@Z @ 1095 NONAME ; class QString QBearerEnginePlugin::tr(char const *, char const *, int)
+ ?tr@QNetworkConfigurationManager@@SA?AVQString@@PBD0@Z @ 1096 NONAME ; class QString QNetworkConfigurationManager::tr(char const *, char const *)
+ ?tr@QNetworkConfigurationManager@@SA?AVQString@@PBD0H@Z @ 1097 NONAME ; class QString QNetworkConfigurationManager::tr(char const *, char const *, int)
+ ?tr@QNetworkConfigurationManagerPrivate@@SA?AVQString@@PBD0@Z @ 1098 NONAME ; class QString QNetworkConfigurationManagerPrivate::tr(char const *, char const *)
+ ?tr@QNetworkConfigurationManagerPrivate@@SA?AVQString@@PBD0H@Z @ 1099 NONAME ; class QString QNetworkConfigurationManagerPrivate::tr(char const *, char const *, int)
+ ?tr@QNetworkSession@@SA?AVQString@@PBD0@Z @ 1100 NONAME ; class QString QNetworkSession::tr(char const *, char const *)
+ ?tr@QNetworkSession@@SA?AVQString@@PBD0H@Z @ 1101 NONAME ; class QString QNetworkSession::tr(char const *, char const *, int)
+ ?tr@QNetworkSessionPrivate@@SA?AVQString@@PBD0@Z @ 1102 NONAME ; class QString QNetworkSessionPrivate::tr(char const *, char const *)
+ ?tr@QNetworkSessionPrivate@@SA?AVQString@@PBD0H@Z @ 1103 NONAME ; class QString QNetworkSessionPrivate::tr(char const *, char const *, int)
+ ?trUtf8@QBearerEngine@@SA?AVQString@@PBD0@Z @ 1104 NONAME ; class QString QBearerEngine::trUtf8(char const *, char const *)
+ ?trUtf8@QBearerEngine@@SA?AVQString@@PBD0H@Z @ 1105 NONAME ; class QString QBearerEngine::trUtf8(char const *, char const *, int)
+ ?trUtf8@QBearerEnginePlugin@@SA?AVQString@@PBD0@Z @ 1106 NONAME ; class QString QBearerEnginePlugin::trUtf8(char const *, char const *)
+ ?trUtf8@QBearerEnginePlugin@@SA?AVQString@@PBD0H@Z @ 1107 NONAME ; class QString QBearerEnginePlugin::trUtf8(char const *, char const *, int)
+ ?trUtf8@QNetworkConfigurationManager@@SA?AVQString@@PBD0@Z @ 1108 NONAME ; class QString QNetworkConfigurationManager::trUtf8(char const *, char const *)
+ ?trUtf8@QNetworkConfigurationManager@@SA?AVQString@@PBD0H@Z @ 1109 NONAME ; class QString QNetworkConfigurationManager::trUtf8(char const *, char const *, int)
+ ?trUtf8@QNetworkConfigurationManagerPrivate@@SA?AVQString@@PBD0@Z @ 1110 NONAME ; class QString QNetworkConfigurationManagerPrivate::trUtf8(char const *, char const *)
+ ?trUtf8@QNetworkConfigurationManagerPrivate@@SA?AVQString@@PBD0H@Z @ 1111 NONAME ; class QString QNetworkConfigurationManagerPrivate::trUtf8(char const *, char const *, int)
+ ?trUtf8@QNetworkSession@@SA?AVQString@@PBD0@Z @ 1112 NONAME ; class QString QNetworkSession::trUtf8(char const *, char const *)
+ ?trUtf8@QNetworkSession@@SA?AVQString@@PBD0H@Z @ 1113 NONAME ; class QString QNetworkSession::trUtf8(char const *, char const *, int)
+ ?trUtf8@QNetworkSessionPrivate@@SA?AVQString@@PBD0@Z @ 1114 NONAME ; class QString QNetworkSessionPrivate::trUtf8(char const *, char const *)
+ ?trUtf8@QNetworkSessionPrivate@@SA?AVQString@@PBD0H@Z @ 1115 NONAME ; class QString QNetworkSessionPrivate::trUtf8(char const *, char const *, int)
+ ?type@QNetworkConfiguration@@QBE?AW4Type@1@XZ @ 1116 NONAME ; enum QNetworkConfiguration::Type QNetworkConfiguration::type(void) const
+ ?updateCompleted@QBearerEngine@@IAEXXZ @ 1117 NONAME ; void QBearerEngine::updateCompleted(void)
+ ?updateCompleted@QNetworkConfigurationManager@@IAEXXZ @ 1118 NONAME ; void QNetworkConfigurationManager::updateCompleted(void)
+ ?updateConfigurations@QNetworkConfigurationManager@@QAEXXZ @ 1119 NONAME ; void QNetworkConfigurationManager::updateConfigurations(void)
+ ?updateConfigurations@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1120 NONAME ; void QNetworkConfigurationManagerPrivate::updateConfigurations(void)
+ ?waitForOpened@QNetworkSession@@QAE_NH@Z @ 1121 NONAME ; bool QNetworkSession::waitForOpened(int)
+ ?staticMetaObject@QNetworkSessionPrivate@@2UQMetaObject@@B @ 1122 NONAME ; struct QMetaObject const QNetworkSessionPrivate::staticMetaObject
+ ?staticMetaObject@QBearerEngine@@2UQMetaObject@@B @ 1123 NONAME ; struct QMetaObject const QBearerEngine::staticMetaObject
+ ?staticMetaObject@QNetworkSession@@2UQMetaObject@@B @ 1124 NONAME ; struct QMetaObject const QNetworkSession::staticMetaObject
+ ?staticMetaObject@QNetworkConfigurationManager@@2UQMetaObject@@B @ 1125 NONAME ; struct QMetaObject const QNetworkConfigurationManager::staticMetaObject
+ ?staticMetaObject@QBearerEnginePlugin@@2UQMetaObject@@B @ 1126 NONAME ; struct QMetaObject const QBearerEnginePlugin::staticMetaObject
+ ?staticMetaObject@QNetworkConfigurationManagerPrivate@@2UQMetaObject@@B @ 1127 NONAME ; struct QMetaObject const QNetworkConfigurationManagerPrivate::staticMetaObject
diff --git a/src/s60installs/bwins/QtScriptu.def b/src/s60installs/bwins/QtScriptu.def
index 19f70373e8..dd467edfea 100644
--- a/src/s60installs/bwins/QtScriptu.def
+++ b/src/s60installs/bwins/QtScriptu.def
@@ -257,7 +257,7 @@ EXPORTS
?processEventsInterval@QScriptEngine@@QBEHXZ @ 256 NONAME ; int QScriptEngine::processEventsInterval(void) const
?property@QScriptClass@@UAE?AVQScriptValue@@ABV2@ABVQScriptString@@I@Z @ 257 NONAME ; class QScriptValue QScriptClass::property(class QScriptValue const &, class QScriptString const &, unsigned int)
?property@QScriptDeclarativeClass@@SA?AVQScriptValue@@ABV2@ABQAX@Z @ 258 NONAME ; class QScriptValue QScriptDeclarativeClass::property(class QScriptValue const &, void * const const &)
- ?property@QScriptDeclarativeClass@@UAE?AVQScriptValue@@PAUObject@1@ABQAX@Z @ 259 NONAME ; class QScriptValue QScriptDeclarativeClass::property(struct QScriptDeclarativeClass::Object *, void * const const &)
+ ?property@QScriptDeclarativeClass@@UAE?AVQScriptValue@@PAUObject@1@ABQAX@Z @ 259 NONAME ABSENT ; class QScriptValue QScriptDeclarativeClass::property(struct QScriptDeclarativeClass::Object *, void * const const &)
?property@QScriptValue@@QBE?AV1@ABVQScriptString@@ABV?$QFlags@W4ResolveFlag@QScriptValue@@@@@Z @ 260 NONAME ; class QScriptValue QScriptValue::property(class QScriptString const &, class QFlags<enum QScriptValue::ResolveFlag> const &) const
?property@QScriptValue@@QBE?AV1@ABVQString@@ABV?$QFlags@W4ResolveFlag@QScriptValue@@@@@Z @ 261 NONAME ; class QScriptValue QScriptValue::property(class QString const &, class QFlags<enum QScriptValue::ResolveFlag> const &) const
?property@QScriptValue@@QBE?AV1@IABV?$QFlags@W4ResolveFlag@QScriptValue@@@@@Z @ 262 NONAME ; class QScriptValue QScriptValue::property(unsigned int, class QFlags<enum QScriptValue::ResolveFlag> const &) const
@@ -370,4 +370,29 @@ EXPORTS
?staticMetaObject@QScriptExtensionPlugin@@2UQMetaObject@@B @ 369 NONAME ; struct QMetaObject const QScriptExtensionPlugin::staticMetaObject
?staticMetaObject@QScriptEngine@@2UQMetaObject@@B @ 370 NONAME ; struct QMetaObject const QScriptEngine::staticMetaObject
?isQObject@QScriptDeclarativeClass@@UBE_NXZ @ 371 NONAME ; bool QScriptDeclarativeClass::isQObject(void) const
+ ??0Value@QScriptDeclarativeClass@@QAE@ABV01@@Z @ 372 NONAME ; QScriptDeclarativeClass::Value::Value(class QScriptDeclarativeClass::Value const &)
+ ??0Value@QScriptDeclarativeClass@@QAE@PAVQScriptContext@@ABVQScriptValue@@@Z @ 373 NONAME ; QScriptDeclarativeClass::Value::Value(class QScriptContext *, class QScriptValue const &)
+ ??0Value@QScriptDeclarativeClass@@QAE@PAVQScriptContext@@ABVQString@@@Z @ 374 NONAME ; QScriptDeclarativeClass::Value::Value(class QScriptContext *, class QString const &)
+ ??0Value@QScriptDeclarativeClass@@QAE@PAVQScriptContext@@H@Z @ 375 NONAME ; QScriptDeclarativeClass::Value::Value(class QScriptContext *, int)
+ ??0Value@QScriptDeclarativeClass@@QAE@PAVQScriptContext@@I@Z @ 376 NONAME ; QScriptDeclarativeClass::Value::Value(class QScriptContext *, unsigned int)
+ ??0Value@QScriptDeclarativeClass@@QAE@PAVQScriptContext@@M@Z @ 377 NONAME ; QScriptDeclarativeClass::Value::Value(class QScriptContext *, float)
+ ??0Value@QScriptDeclarativeClass@@QAE@PAVQScriptContext@@N@Z @ 378 NONAME ; QScriptDeclarativeClass::Value::Value(class QScriptContext *, double)
+ ??0Value@QScriptDeclarativeClass@@QAE@PAVQScriptContext@@_N@Z @ 379 NONAME ; QScriptDeclarativeClass::Value::Value(class QScriptContext *, bool)
+ ??0Value@QScriptDeclarativeClass@@QAE@PAVQScriptEngine@@ABVQScriptValue@@@Z @ 380 NONAME ; QScriptDeclarativeClass::Value::Value(class QScriptEngine *, class QScriptValue const &)
+ ??0Value@QScriptDeclarativeClass@@QAE@PAVQScriptEngine@@ABVQString@@@Z @ 381 NONAME ; QScriptDeclarativeClass::Value::Value(class QScriptEngine *, class QString const &)
+ ??0Value@QScriptDeclarativeClass@@QAE@PAVQScriptEngine@@H@Z @ 382 NONAME ; QScriptDeclarativeClass::Value::Value(class QScriptEngine *, int)
+ ??0Value@QScriptDeclarativeClass@@QAE@PAVQScriptEngine@@I@Z @ 383 NONAME ; QScriptDeclarativeClass::Value::Value(class QScriptEngine *, unsigned int)
+ ??0Value@QScriptDeclarativeClass@@QAE@PAVQScriptEngine@@M@Z @ 384 NONAME ; QScriptDeclarativeClass::Value::Value(class QScriptEngine *, float)
+ ??0Value@QScriptDeclarativeClass@@QAE@PAVQScriptEngine@@N@Z @ 385 NONAME ; QScriptDeclarativeClass::Value::Value(class QScriptEngine *, double)
+ ??0Value@QScriptDeclarativeClass@@QAE@PAVQScriptEngine@@_N@Z @ 386 NONAME ; QScriptDeclarativeClass::Value::Value(class QScriptEngine *, bool)
+ ??0Value@QScriptDeclarativeClass@@QAE@XZ @ 387 NONAME ; QScriptDeclarativeClass::Value::Value(void)
+ ??1Value@QScriptDeclarativeClass@@QAE@XZ @ 388 NONAME ; QScriptDeclarativeClass::Value::~Value(void)
+ ?call@QScriptDeclarativeClass@@UAE?AVValue@1@PAUObject@1@PAVQScriptContext@@@Z @ 389 NONAME ; class QScriptDeclarativeClass::Value QScriptDeclarativeClass::call(struct QScriptDeclarativeClass::Object *, class QScriptContext *)
+ ?functionValue@QScriptDeclarativeClass@@SA?AVValue@1@ABVQScriptValue@@ABQAX@Z @ 390 NONAME ; class QScriptDeclarativeClass::Value QScriptDeclarativeClass::functionValue(class QScriptValue const &, void * const const &)
+ ?newObjectValue@QScriptDeclarativeClass@@SA?AVValue@1@PAVQScriptEngine@@PAV1@PAUObject@1@@Z @ 391 NONAME ; class QScriptDeclarativeClass::Value QScriptDeclarativeClass::newObjectValue(class QScriptEngine *, class QScriptDeclarativeClass *, struct QScriptDeclarativeClass::Object *)
+ ?property@QScriptDeclarativeClass@@UAE?AVValue@1@PAUObject@1@ABQAX@Z @ 392 NONAME ; class QScriptDeclarativeClass::Value QScriptDeclarativeClass::property(struct QScriptDeclarativeClass::Object *, void * const const &)
+ ?propertyValue@QScriptDeclarativeClass@@SA?AVValue@1@ABVQScriptValue@@ABQAX@Z @ 393 NONAME ; class QScriptDeclarativeClass::Value QScriptDeclarativeClass::propertyValue(class QScriptValue const &, void * const const &)
+ ?setSupportsCall@QScriptDeclarativeClass@@QAEX_N@Z @ 394 NONAME ; void QScriptDeclarativeClass::setSupportsCall(bool)
+ ?supportsCall@QScriptDeclarativeClass@@QBE_NXZ @ 395 NONAME ; bool QScriptDeclarativeClass::supportsCall(void) const
+ ?toScriptValue@Value@QScriptDeclarativeClass@@QBE?AVQScriptValue@@PAVQScriptEngine@@@Z @ 396 NONAME ; class QScriptValue QScriptDeclarativeClass::Value::toScriptValue(class QScriptEngine *) const
diff --git a/src/s60installs/bwins/QtTestu.def b/src/s60installs/bwins/QtTestu.def
index 1da9c13014..47198e275a 100644
--- a/src/s60installs/bwins/QtTestu.def
+++ b/src/s60installs/bwins/QtTestu.def
@@ -24,7 +24,7 @@ EXPORTS
?defaultKeyDelay@QTest@@YAHXZ @ 23 NONAME ; int QTest::defaultKeyDelay(void)
?defaultKeyVerbose@QTest@@YA_NXZ @ 24 NONAME ; bool QTest::defaultKeyVerbose(void)
?defaultMouseDelay@QTest@@YAHXZ @ 25 NONAME ; int QTest::defaultMouseDelay(void)
- ?endBenchmarkMeasurement@QTest@@YA_JXZ @ 26 NONAME ; long long QTest::endBenchmarkMeasurement(void)
+ ?endBenchmarkMeasurement@QTest@@YA_JXZ @ 26 NONAME ABSENT ; long long QTest::endBenchmarkMeasurement(void)
?enterLoop@QTestEventLoop@@QAEXH@Z @ 27 NONAME ; void QTestEventLoop::enterLoop(int)
?exitLoop@QTestEventLoop@@QAEXXZ @ 28 NONAME ; void QTestEventLoop::exitLoop(void)
?getStaticMetaObject@QTestEventLoop@@SAABUQMetaObject@@XZ @ 29 NONAME ; struct QMetaObject const & QTestEventLoop::getStaticMetaObject(void)
@@ -75,4 +75,6 @@ EXPORTS
?trUtf8@QTestEventLoop@@SA?AVQString@@PBD0@Z @ 74 NONAME ; class QString QTestEventLoop::trUtf8(char const *, char const *)
?trUtf8@QTestEventLoop@@SA?AVQString@@PBD0H@Z @ 75 NONAME ; class QString QTestEventLoop::trUtf8(char const *, char const *, int)
?staticMetaObject@QTestEventLoop@@2UQMetaObject@@B @ 76 NONAME ; struct QMetaObject const QTestEventLoop::staticMetaObject
+ ?endBenchmarkMeasurement@QTest@@YA_KXZ @ 77 NONAME ; unsigned long long QTest::endBenchmarkMeasurement(void)
+ ?setBenchmarkResult@QTest@@YAXMW4QBenchmarkMetric@1@@Z @ 78 NONAME ; void QTest::setBenchmarkResult(float, enum QTest::QBenchmarkMetric)
diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def
index a427ff9c6a..c86eb8cbb6 100644
--- a/src/s60installs/eabi/QtCoreu.def
+++ b/src/s60installs/eabi/QtCoreu.def
@@ -3634,4 +3634,24 @@ EXPORTS
_ZTVN13QStateMachine11SignalEventE @ 3633 NONAME
_ZTVN13QStateMachine12WrappedEventE @ 3634 NONAME
_ZN11QMetaObject13disconnectOneEPK7QObjectiS2_i @ 3635 NONAME
+ _Z14qDecodeDataUrlRK4QUrl @ 3636 NONAME
+ _Z18qDetectCPUFeaturesv @ 3637 NONAME
+ _ZN10QByteArray7replaceEiiPKci @ 3638 NONAME
+ _ZN12QTextDecoderC1EPK10QTextCodec6QFlagsINS0_14ConversionFlagEE @ 3639 NONAME
+ _ZN12QTextDecoderC2EPK10QTextCodec6QFlagsINS0_14ConversionFlagEE @ 3640 NONAME
+ _ZN12QTextEncoderC1EPK10QTextCodec6QFlagsINS0_14ConversionFlagEE @ 3641 NONAME
+ _ZN12QTextEncoderC2EPK10QTextCodec6QFlagsINS0_14ConversionFlagEE @ 3642 NONAME
+ _ZN7QStringC1EPK5QChar @ 3643 NONAME
+ _ZN7QStringC2EPK5QChar @ 3644 NONAME
+ _ZN8QVariantC1ERK12QEasingCurve @ 3645 NONAME
+ _ZN8QVariantC2ERK12QEasingCurve @ 3646 NONAME
+ _ZN9QListData11detach_growEPii @ 3647 NONAME
+ _ZN9QListData6appendEi @ 3648 NONAME
+ _ZN9QListData6detachEi @ 3649 NONAME
+ _ZN9QMetaType23registerStreamOperatorsEiPFvR11QDataStreamPKvEPFvS1_PvE @ 3650 NONAME
+ _ZNK10QTextCodec11makeDecoderE6QFlagsINS_14ConversionFlagEE @ 3651 NONAME
+ _ZNK10QTextCodec11makeEncoderE6QFlagsINS_14ConversionFlagEE @ 3652 NONAME
+ _ZNK8QVariant13toEasingCurveEv @ 3653 NONAME
+ _ZlsR11QDataStreamRK12QEasingCurve @ 3654 NONAME
+ _ZrsR11QDataStreamR12QEasingCurve @ 3655 NONAME
diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def
new file mode 100644
index 0000000000..e4fc7a3d8b
--- /dev/null
+++ b/src/s60installs/eabi/QtDeclarativeu.def
@@ -0,0 +1,3540 @@
+EXPORTS
+ _Z10qmlContextPK7QObject @ 1 NONAME
+ _Z18qmlExecuteDeferredP7QObject @ 2 NONAME
+ _Z27qmlAttachedPropertiesObjectPiPK7QObjectPK11QMetaObjectb @ 3 NONAME
+ _Z31qmlAttachedPropertiesObjectByIdiPK7QObjectb @ 4 NONAME
+ _Z7qmlInfoPK7QObject @ 5 NONAME
+ _Z9qmlEnginePK7QObject @ 6 NONAME
+ _ZN15QDeclarativePen10penChangedEv @ 7 NONAME
+ _ZN15QDeclarativePen11qt_metacallEN11QMetaObject4CallEiPPv @ 8 NONAME
+ _ZN15QDeclarativePen11qt_metacastEPKc @ 9 NONAME
+ _ZN15QDeclarativePen16staticMetaObjectE @ 10 NONAME DATA 16
+ _ZN15QDeclarativePen19getStaticMetaObjectEv @ 11 NONAME
+ _ZN15QDeclarativePen8setColorERK6QColor @ 12 NONAME
+ _ZN15QDeclarativePen8setWidthEi @ 13 NONAME
+ _ZN15QDeclarativeRow11qt_metacallEN11QMetaObject4CallEiPPv @ 14 NONAME
+ _ZN15QDeclarativeRow11qt_metacastEPKc @ 15 NONAME
+ _ZN15QDeclarativeRow13doPositioningEv @ 16 NONAME
+ _ZN15QDeclarativeRow16staticMetaObjectE @ 17 NONAME DATA 16
+ _ZN15QDeclarativeRow19getStaticMetaObjectEv @ 18 NONAME
+ _ZN15QDeclarativeRowC1EP16QDeclarativeItem @ 19 NONAME
+ _ZN15QDeclarativeRowC2EP16QDeclarativeItem @ 20 NONAME
+ _ZN15QPacketAutoSendC1EP15QPacketProtocol @ 21 NONAME
+ _ZN15QPacketAutoSendC2EP15QPacketProtocol @ 22 NONAME
+ _ZN15QPacketAutoSendD0Ev @ 23 NONAME
+ _ZN15QPacketAutoSendD1Ev @ 24 NONAME
+ _ZN15QPacketAutoSendD2Ev @ 25 NONAME
+ _ZN15QPacketProtocol11qt_metacallEN11QMetaObject4CallEiPPv @ 26 NONAME
+ _ZN15QPacketProtocol11qt_metacastEPKc @ 27 NONAME
+ _ZN15QPacketProtocol13invalidPacketEv @ 28 NONAME
+ _ZN15QPacketProtocol13packetWrittenEv @ 29 NONAME
+ _ZN15QPacketProtocol16staticMetaObjectE @ 30 NONAME DATA 16
+ _ZN15QPacketProtocol19getStaticMetaObjectEv @ 31 NONAME
+ _ZN15QPacketProtocol20setMaximumPacketSizeEi @ 32 NONAME
+ _ZN15QPacketProtocol4readEv @ 33 NONAME
+ _ZN15QPacketProtocol4sendERK7QPacket @ 34 NONAME
+ _ZN15QPacketProtocol4sendEv @ 35 NONAME
+ _ZN15QPacketProtocol5clearEv @ 36 NONAME
+ _ZN15QPacketProtocol6deviceEv @ 37 NONAME
+ _ZN15QPacketProtocol9readyReadEv @ 38 NONAME
+ _ZN15QPacketProtocolC1EP9QIODeviceP7QObject @ 39 NONAME
+ _ZN15QPacketProtocolC2EP9QIODeviceP7QObject @ 40 NONAME
+ _ZN15QPacketProtocolD0Ev @ 41 NONAME
+ _ZN15QPacketProtocolD1Ev @ 42 NONAME
+ _ZN15QPacketProtocolD2Ev @ 43 NONAME
+ _ZN15QPerformanceLog11displayDataEv @ 44 NONAME
+ _ZN15QPerformanceLog5clearEv @ 45 NONAME
+ _ZN16QDeclarativeBind11qt_metacallEN11QMetaObject4CallEiPPv @ 46 NONAME
+ _ZN16QDeclarativeBind11qt_metacastEPKc @ 47 NONAME
+ _ZN16QDeclarativeBind11setPropertyERK7QString @ 48 NONAME
+ _ZN16QDeclarativeBind16staticMetaObjectE @ 49 NONAME DATA 16
+ _ZN16QDeclarativeBind17componentCompleteEv @ 50 NONAME
+ _ZN16QDeclarativeBind19getStaticMetaObjectEv @ 51 NONAME
+ _ZN16QDeclarativeBind4evalEv @ 52 NONAME
+ _ZN16QDeclarativeBind6objectEv @ 53 NONAME
+ _ZN16QDeclarativeBind7setWhenEb @ 54 NONAME
+ _ZN16QDeclarativeBind8setValueERK8QVariant @ 55 NONAME
+ _ZN16QDeclarativeBind9setObjectEP7QObject @ 56 NONAME
+ _ZN16QDeclarativeBindC1EP7QObject @ 57 NONAME
+ _ZN16QDeclarativeBindC2EP7QObject @ 58 NONAME
+ _ZN16QDeclarativeBindD0Ev @ 59 NONAME
+ _ZN16QDeclarativeBindD1Ev @ 60 NONAME
+ _ZN16QDeclarativeBindD2Ev @ 61 NONAME
+ _ZN16QDeclarativeDrag11axisChangedEv @ 62 NONAME
+ _ZN16QDeclarativeDrag11qt_metacallEN11QMetaObject4CallEiPPv @ 63 NONAME
+ _ZN16QDeclarativeDrag11qt_metacastEPKc @ 64 NONAME
+ _ZN16QDeclarativeDrag13targetChangedEv @ 65 NONAME
+ _ZN16QDeclarativeDrag15maximumXChangedEv @ 66 NONAME
+ _ZN16QDeclarativeDrag15maximumYChangedEv @ 67 NONAME
+ _ZN16QDeclarativeDrag15minimumXChangedEv @ 68 NONAME
+ _ZN16QDeclarativeDrag15minimumYChangedEv @ 69 NONAME
+ _ZN16QDeclarativeDrag16staticMetaObjectE @ 70 NONAME DATA 16
+ _ZN16QDeclarativeDrag19getStaticMetaObjectEv @ 71 NONAME
+ _ZN16QDeclarativeDrag7setAxisENS_4AxisE @ 72 NONAME
+ _ZN16QDeclarativeDrag7setXmaxEf @ 73 NONAME
+ _ZN16QDeclarativeDrag7setXminEf @ 74 NONAME
+ _ZN16QDeclarativeDrag7setYmaxEf @ 75 NONAME
+ _ZN16QDeclarativeDrag7setYminEf @ 76 NONAME
+ _ZN16QDeclarativeDrag9setTargetEP16QDeclarativeItem @ 77 NONAME
+ _ZN16QDeclarativeDragC1EP7QObject @ 78 NONAME
+ _ZN16QDeclarativeDragC2EP7QObject @ 79 NONAME
+ _ZN16QDeclarativeDragD0Ev @ 80 NONAME
+ _ZN16QDeclarativeDragD1Ev @ 81 NONAME
+ _ZN16QDeclarativeDragD2Ev @ 82 NONAME
+ _ZN16QDeclarativeFlow11flowChangedEv @ 83 NONAME
+ _ZN16QDeclarativeFlow11qt_metacallEN11QMetaObject4CallEiPPv @ 84 NONAME
+ _ZN16QDeclarativeFlow11qt_metacastEPKc @ 85 NONAME
+ _ZN16QDeclarativeFlow13doPositioningEv @ 86 NONAME
+ _ZN16QDeclarativeFlow16staticMetaObjectE @ 87 NONAME DATA 16
+ _ZN16QDeclarativeFlow19getStaticMetaObjectEv @ 88 NONAME
+ _ZN16QDeclarativeFlow7setFlowENS_4FlowE @ 89 NONAME
+ _ZN16QDeclarativeFlowC1EP16QDeclarativeItem @ 90 NONAME
+ _ZN16QDeclarativeFlowC2EP16QDeclarativeItem @ 91 NONAME
+ _ZN16QDeclarativeGrid10setColumnsEi @ 92 NONAME
+ _ZN16QDeclarativeGrid11qt_metacallEN11QMetaObject4CallEiPPv @ 93 NONAME
+ _ZN16QDeclarativeGrid11qt_metacastEPKc @ 94 NONAME
+ _ZN16QDeclarativeGrid11rowsChangedEv @ 95 NONAME
+ _ZN16QDeclarativeGrid13doPositioningEv @ 96 NONAME
+ _ZN16QDeclarativeGrid14columnsChangedEv @ 97 NONAME
+ _ZN16QDeclarativeGrid16staticMetaObjectE @ 98 NONAME DATA 16
+ _ZN16QDeclarativeGrid19getStaticMetaObjectEv @ 99 NONAME
+ _ZN16QDeclarativeGrid7setRowsEi @ 100 NONAME
+ _ZN16QDeclarativeGridC1EP16QDeclarativeItem @ 101 NONAME
+ _ZN16QDeclarativeGridC2EP16QDeclarativeItem @ 102 NONAME
+ _ZN16QDeclarativeInfoC1EPK7QObject @ 103 NONAME
+ _ZN16QDeclarativeInfoC2EPK7QObject @ 104 NONAME
+ _ZN16QDeclarativeInfoD1Ev @ 105 NONAME
+ _ZN16QDeclarativeInfoD2Ev @ 106 NONAME
+ _ZN16QDeclarativeItem10classBeginEv @ 107 NONAME
+ _ZN16QDeclarativeItem10fxChildrenEv @ 108 NONAME
+ _ZN16QDeclarativeItem10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 109 NONAME
+ _ZN16QDeclarativeItem10resetWidthEv @ 110 NONAME
+ _ZN16QDeclarativeItem10sceneEventEP6QEvent @ 111 NONAME
+ _ZN16QDeclarativeItem11clipChangedEv @ 112 NONAME
+ _ZN16QDeclarativeItem11qt_metacallEN11QMetaObject4CallEiPPv @ 113 NONAME
+ _ZN16QDeclarativeItem11qt_metacastEPKc @ 114 NONAME
+ _ZN16QDeclarativeItem11resetHeightEv @ 115 NONAME
+ _ZN16QDeclarativeItem11transitionsEv @ 116 NONAME
+ _ZN16QDeclarativeItem12childrenRectEv @ 117 NONAME
+ _ZN16QDeclarativeItem12focusChangedEb @ 118 NONAME
+ _ZN16QDeclarativeItem12focusChangedEv @ 119 NONAME
+ _ZN16QDeclarativeItem12stateChangedERK7QString @ 120 NONAME
+ _ZN16QDeclarativeItem12widthChangedEv @ 121 NONAME
+ _ZN16QDeclarativeItem13heightChangedEv @ 122 NONAME
+ _ZN16QDeclarativeItem13keyPressEventEP9QKeyEvent @ 123 NONAME
+ _ZN16QDeclarativeItem13parentChangedEv @ 124 NONAME
+ _ZN16QDeclarativeItem13setParentItemEPS_ @ 125 NONAME
+ _ZN16QDeclarativeItem13smoothChangedEv @ 126 NONAME
+ _ZN16QDeclarativeItem15childrenChangedEv @ 127 NONAME
+ _ZN16QDeclarativeItem15geometryChangedERK6QRectFS2_ @ 128 NONAME
+ _ZN16QDeclarativeItem15keyReleaseEventEP9QKeyEvent @ 129 NONAME
+ _ZN16QDeclarativeItem16inputMethodEventEP17QInputMethodEvent @ 130 NONAME
+ _ZN16QDeclarativeItem16setImplicitWidthEf @ 131 NONAME
+ _ZN16QDeclarativeItem16setKeepMouseGrabEb @ 132 NONAME
+ _ZN16QDeclarativeItem16staticMetaObjectE @ 133 NONAME DATA 16
+ _ZN16QDeclarativeItem17componentCompleteEv @ 134 NONAME
+ _ZN16QDeclarativeItem17setBaselineOffsetEf @ 135 NONAME
+ _ZN16QDeclarativeItem17setImplicitHeightEf @ 136 NONAME
+ _ZN16QDeclarativeItem17wantsFocusChangedEv @ 137 NONAME
+ _ZN16QDeclarativeItem18setTransformOriginENS_15TransformOriginE @ 138 NONAME
+ _ZN16QDeclarativeItem19childrenRectChangedEv @ 139 NONAME
+ _ZN16QDeclarativeItem19getStaticMetaObjectEv @ 140 NONAME
+ _ZN16QDeclarativeItem21baselineOffsetChangedEv @ 141 NONAME
+ _ZN16QDeclarativeItem22transformOriginChangedENS_15TransformOriginE @ 142 NONAME
+ _ZN16QDeclarativeItem4dataEv @ 143 NONAME
+ _ZN16QDeclarativeItem5eventEP6QEvent @ 144 NONAME
+ _ZN16QDeclarativeItem5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 145 NONAME
+ _ZN16QDeclarativeItem6statesEv @ 146 NONAME
+ _ZN16QDeclarativeItem7anchorsEv @ 147 NONAME
+ _ZN16QDeclarativeItem7setClipEb @ 148 NONAME
+ _ZN16QDeclarativeItem8setFocusEb @ 149 NONAME
+ _ZN16QDeclarativeItem8setStateERK7QString @ 150 NONAME
+ _ZN16QDeclarativeItem8setWidthEf @ 151 NONAME
+ _ZN16QDeclarativeItem9resourcesEv @ 152 NONAME
+ _ZN16QDeclarativeItem9setHeightEf @ 153 NONAME
+ _ZN16QDeclarativeItem9setSmoothEb @ 154 NONAME
+ _ZN16QDeclarativeItem9transformEv @ 155 NONAME
+ _ZN16QDeclarativeItemC1EPS_ @ 156 NONAME
+ _ZN16QDeclarativeItemC1ER23QDeclarativeItemPrivatePS_ @ 157 NONAME
+ _ZN16QDeclarativeItemC2EPS_ @ 158 NONAME
+ _ZN16QDeclarativeItemC2ER23QDeclarativeItemPrivatePS_ @ 159 NONAME
+ _ZN16QDeclarativeItemD0Ev @ 160 NONAME
+ _ZN16QDeclarativeItemD1Ev @ 161 NONAME
+ _ZN16QDeclarativeItemD2Ev @ 162 NONAME
+ _ZN16QDeclarativePath11interpolateEiRK7QStringf @ 163 NONAME
+ _ZN16QDeclarativePath11processPathEv @ 164 NONAME
+ _ZN16QDeclarativePath11qt_metacallEN11QMetaObject4CallEiPPv @ 165 NONAME
+ _ZN16QDeclarativePath11qt_metacastEPKc @ 166 NONAME
+ _ZN16QDeclarativePath12pathElementsEv @ 167 NONAME
+ _ZN16QDeclarativePath16staticMetaObjectE @ 168 NONAME DATA 16
+ _ZN16QDeclarativePath17componentCompleteEv @ 169 NONAME
+ _ZN16QDeclarativePath19getStaticMetaObjectEv @ 170 NONAME
+ _ZN16QDeclarativePath7changedEv @ 171 NONAME
+ _ZN16QDeclarativePath8endpointERK7QString @ 172 NONAME
+ _ZN16QDeclarativePath9setStartXEf @ 173 NONAME
+ _ZN16QDeclarativePath9setStartYEf @ 174 NONAME
+ _ZN16QDeclarativePathC1EP7QObject @ 175 NONAME
+ _ZN16QDeclarativePathC2EP7QObject @ 176 NONAME
+ _ZN16QDeclarativePathD0Ev @ 177 NONAME
+ _ZN16QDeclarativePathD1Ev @ 178 NONAME
+ _ZN16QDeclarativePathD2Ev @ 179 NONAME
+ _ZN16QDeclarativeText11fontChangedERK5QFont @ 180 NONAME
+ _ZN16QDeclarativeText11qt_metacallEN11QMetaObject4CallEiPPv @ 181 NONAME
+ _ZN16QDeclarativeText11qt_metacastEPKc @ 182 NONAME
+ _ZN16QDeclarativeText11textChangedERK7QString @ 183 NONAME
+ _ZN16QDeclarativeText11wrapChangedEb @ 184 NONAME
+ _ZN16QDeclarativeText12colorChangedERK6QColor @ 185 NONAME
+ _ZN16QDeclarativeText12setElideModeENS_13TextElideModeE @ 186 NONAME
+ _ZN16QDeclarativeText12styleChangedENS_9TextStyleE @ 187 NONAME
+ _ZN16QDeclarativeText13linkActivatedERK7QString @ 188 NONAME
+ _ZN16QDeclarativeText13setStyleColorERK6QColor @ 189 NONAME
+ _ZN16QDeclarativeText13setTextFormatENS_10TextFormatE @ 190 NONAME
+ _ZN16QDeclarativeText15geometryChangedERK6QRectFS2_ @ 191 NONAME
+ _ZN16QDeclarativeText15mousePressEventEP24QGraphicsSceneMouseEvent @ 192 NONAME
+ _ZN16QDeclarativeText16elideModeChangedENS_13TextElideModeE @ 193 NONAME
+ _ZN16QDeclarativeText16staticMetaObjectE @ 194 NONAME DATA 16
+ _ZN16QDeclarativeText17componentCompleteEv @ 195 NONAME
+ _ZN16QDeclarativeText17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 196 NONAME
+ _ZN16QDeclarativeText17styleColorChangedERK6QColor @ 197 NONAME
+ _ZN16QDeclarativeText17textFormatChangedENS_10TextFormatE @ 198 NONAME
+ _ZN16QDeclarativeText19getStaticMetaObjectEv @ 199 NONAME
+ _ZN16QDeclarativeText24verticalAlignmentChangedENS_10VAlignmentE @ 200 NONAME
+ _ZN16QDeclarativeText26horizontalAlignmentChangedENS_10HAlignmentE @ 201 NONAME
+ _ZN16QDeclarativeText5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 202 NONAME
+ _ZN16QDeclarativeText7setFontERK5QFont @ 203 NONAME
+ _ZN16QDeclarativeText7setTextERK7QString @ 204 NONAME
+ _ZN16QDeclarativeText7setWrapEb @ 205 NONAME
+ _ZN16QDeclarativeText8setColorERK6QColor @ 206 NONAME
+ _ZN16QDeclarativeText8setStyleENS_9TextStyleE @ 207 NONAME
+ _ZN16QDeclarativeText9setHAlignENS_10HAlignmentE @ 208 NONAME
+ _ZN16QDeclarativeText9setVAlignENS_10VAlignmentE @ 209 NONAME
+ _ZN16QDeclarativeTextC1EP16QDeclarativeItem @ 210 NONAME
+ _ZN16QDeclarativeTextC2EP16QDeclarativeItem @ 211 NONAME
+ _ZN16QDeclarativeTextD0Ev @ 212 NONAME
+ _ZN16QDeclarativeTextD1Ev @ 213 NONAME
+ _ZN16QDeclarativeTextD2Ev @ 214 NONAME
+ _ZN16QDeclarativeTypeC1EiRKN19QDeclarativePrivate12RegisterTypeE @ 215 NONAME
+ _ZN16QDeclarativeTypeC1EiRKN19QDeclarativePrivate17RegisterInterfaceE @ 216 NONAME
+ _ZN16QDeclarativeTypeC2EiRKN19QDeclarativePrivate12RegisterTypeE @ 217 NONAME
+ _ZN16QDeclarativeTypeC2EiRKN19QDeclarativePrivate17RegisterInterfaceE @ 218 NONAME
+ _ZN16QDeclarativeTypeD1Ev @ 219 NONAME
+ _ZN16QDeclarativeTypeD2Ev @ 220 NONAME
+ _ZN16QDeclarativeView10paintEventEP11QPaintEvent @ 221 NONAME
+ _ZN16QDeclarativeView10timerEventEP11QTimerEvent @ 222 NONAME
+ _ZN16QDeclarativeView11qt_metacallEN11QMetaObject4CallEiPPv @ 223 NONAME
+ _ZN16QDeclarativeView11qt_metacastEPKc @ 224 NONAME
+ _ZN16QDeclarativeView11resizeEventEP12QResizeEvent @ 225 NONAME
+ _ZN16QDeclarativeView11rootContextEv @ 226 NONAME
+ _ZN16QDeclarativeView11sizeChangedEv @ 227 NONAME
+ _ZN16QDeclarativeView12sceneResizedE5QSize @ 228 NONAME
+ _ZN16QDeclarativeView13setResizeModeENS_10ResizeModeE @ 229 NONAME
+ _ZN16QDeclarativeView13setRootObjectEP7QObject @ 230 NONAME
+ _ZN16QDeclarativeView13statusChangedENS_6StatusE @ 231 NONAME
+ _ZN16QDeclarativeView15continueExecuteEv @ 232 NONAME
+ _ZN16QDeclarativeView16staticMetaObjectE @ 233 NONAME DATA 16
+ _ZN16QDeclarativeView19getStaticMetaObjectEv @ 234 NONAME
+ _ZN16QDeclarativeView6engineEv @ 235 NONAME
+ _ZN16QDeclarativeView9setSourceERK4QUrl @ 236 NONAME
+ _ZN16QDeclarativeViewC1EP7QWidget @ 237 NONAME
+ _ZN16QDeclarativeViewC1ERK4QUrlP7QWidget @ 238 NONAME
+ _ZN16QDeclarativeViewC2EP7QWidget @ 239 NONAME
+ _ZN16QDeclarativeViewC2ERK4QUrlP7QWidget @ 240 NONAME
+ _ZN16QDeclarativeViewD0Ev @ 241 NONAME
+ _ZN16QDeclarativeViewD1Ev @ 242 NONAME
+ _ZN16QDeclarativeViewD2Ev @ 243 NONAME
+ _ZN16QMetaEnumBuilder6addKeyERK10QByteArrayi @ 244 NONAME
+ _ZN16QMetaEnumBuilder9removeKeyEi @ 245 NONAME
+ _ZN16QMetaEnumBuilder9setIsFlagEb @ 246 NONAME
+ _ZN17QDeclarativeCurve11qt_metacallEN11QMetaObject4CallEiPPv @ 247 NONAME
+ _ZN17QDeclarativeCurve11qt_metacastEPKc @ 248 NONAME
+ _ZN17QDeclarativeCurve16staticMetaObjectE @ 249 NONAME DATA 16
+ _ZN17QDeclarativeCurve19getStaticMetaObjectEv @ 250 NONAME
+ _ZN17QDeclarativeCurve4setXEf @ 251 NONAME
+ _ZN17QDeclarativeCurve4setYEf @ 252 NONAME
+ _ZN17QDeclarativeError14setDescriptionERK7QString @ 253 NONAME
+ _ZN17QDeclarativeError6setUrlERK4QUrl @ 254 NONAME
+ _ZN17QDeclarativeError7setLineEi @ 255 NONAME
+ _ZN17QDeclarativeError9setColumnEi @ 256 NONAME
+ _ZN17QDeclarativeErrorC1ERKS_ @ 257 NONAME
+ _ZN17QDeclarativeErrorC1Ev @ 258 NONAME
+ _ZN17QDeclarativeErrorC2ERKS_ @ 259 NONAME
+ _ZN17QDeclarativeErrorC2Ev @ 260 NONAME
+ _ZN17QDeclarativeErrorD1Ev @ 261 NONAME
+ _ZN17QDeclarativeErrorD2Ev @ 262 NONAME
+ _ZN17QDeclarativeErroraSERKS_ @ 263 NONAME
+ _ZN17QDeclarativeImage11qt_metacallEN11QMetaObject4CallEiPPv @ 264 NONAME
+ _ZN17QDeclarativeImage11qt_metacastEPKc @ 265 NONAME
+ _ZN17QDeclarativeImage11setFillModeENS_8FillModeE @ 266 NONAME
+ _ZN17QDeclarativeImage15fillModeChangedEv @ 267 NONAME
+ _ZN17QDeclarativeImage15geometryChangedERK6QRectFS2_ @ 268 NONAME
+ _ZN17QDeclarativeImage16staticMetaObjectE @ 269 NONAME DATA 16
+ _ZN17QDeclarativeImage19getStaticMetaObjectEv @ 270 NONAME
+ _ZN17QDeclarativeImage21updatePaintedGeometryEv @ 271 NONAME
+ _ZN17QDeclarativeImage22paintedGeometryChangedEv @ 272 NONAME
+ _ZN17QDeclarativeImage5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 273 NONAME
+ _ZN17QDeclarativeImage9setPixmapERK7QPixmap @ 274 NONAME
+ _ZN17QDeclarativeImageC1EP16QDeclarativeItem @ 275 NONAME
+ _ZN17QDeclarativeImageC1ER24QDeclarativeImagePrivateP16QDeclarativeItem @ 276 NONAME
+ _ZN17QDeclarativeImageC2EP16QDeclarativeItem @ 277 NONAME
+ _ZN17QDeclarativeImageC2ER24QDeclarativeImagePrivateP16QDeclarativeItem @ 278 NONAME
+ _ZN17QDeclarativeImageD0Ev @ 279 NONAME
+ _ZN17QDeclarativeImageD1Ev @ 280 NONAME
+ _ZN17QDeclarativeImageD2Ev @ 281 NONAME
+ _ZN17QDeclarativeState10setExtendsERK7QString @ 282 NONAME
+ _ZN17QDeclarativeState11qt_metacallEN11QMetaObject4CallEiPPv @ 283 NONAME
+ _ZN17QDeclarativeState11qt_metacastEPKc @ 284 NONAME
+ _ZN17QDeclarativeState13setStateGroupEP22QDeclarativeStateGroup @ 285 NONAME
+ _ZN17QDeclarativeState16staticMetaObjectE @ 286 NONAME DATA 16
+ _ZN17QDeclarativeState19getStaticMetaObjectEv @ 287 NONAME
+ _ZN17QDeclarativeState5applyEP22QDeclarativeStateGroupP22QDeclarativeTransitionPS_ @ 288 NONAME
+ _ZN17QDeclarativeState6cancelEv @ 289 NONAME
+ _ZN17QDeclarativeState7changesEv @ 290 NONAME
+ _ZN17QDeclarativeState7setNameERK7QString @ 291 NONAME
+ _ZN17QDeclarativeState7setWhenEP19QDeclarativeBinding @ 292 NONAME
+ _ZN17QDeclarativeState9completedEv @ 293 NONAME
+ _ZN17QDeclarativeStateC1EP7QObject @ 294 NONAME
+ _ZN17QDeclarativeStateC2EP7QObject @ 295 NONAME
+ _ZN17QDeclarativeStateD0Ev @ 296 NONAME
+ _ZN17QDeclarativeStateD1Ev @ 297 NONAME
+ _ZN17QDeclarativeStateD2Ev @ 298 NONAME
+ _ZN17QDeclarativeStatelsEP26QDeclarativeStateOperation @ 299 NONAME
+ _ZN17QDeclarativeTimer10classBeginEv @ 300 NONAME
+ _ZN17QDeclarativeTimer10setRunningEb @ 301 NONAME
+ _ZN17QDeclarativeTimer11qt_metacallEN11QMetaObject4CallEiPPv @ 302 NONAME
+ _ZN17QDeclarativeTimer11qt_metacastEPKc @ 303 NONAME
+ _ZN17QDeclarativeTimer11setIntervalEi @ 304 NONAME
+ _ZN17QDeclarativeTimer12setRepeatingEb @ 305 NONAME
+ _ZN17QDeclarativeTimer14runningChangedEv @ 306 NONAME
+ _ZN17QDeclarativeTimer16staticMetaObjectE @ 307 NONAME DATA 16
+ _ZN17QDeclarativeTimer17componentCompleteEv @ 308 NONAME
+ _ZN17QDeclarativeTimer19getStaticMetaObjectEv @ 309 NONAME
+ _ZN17QDeclarativeTimer19setTriggeredOnStartEb @ 310 NONAME
+ _ZN17QDeclarativeTimer4stopEv @ 311 NONAME
+ _ZN17QDeclarativeTimer5startEv @ 312 NONAME
+ _ZN17QDeclarativeTimer6tickedEv @ 313 NONAME
+ _ZN17QDeclarativeTimer6updateEv @ 314 NONAME
+ _ZN17QDeclarativeTimer7restartEv @ 315 NONAME
+ _ZN17QDeclarativeTimer8finishedEv @ 316 NONAME
+ _ZN17QDeclarativeTimer9triggeredEv @ 317 NONAME
+ _ZN17QDeclarativeTimerC1EP7QObject @ 318 NONAME
+ _ZN17QDeclarativeTimerC2EP7QObject @ 319 NONAME
+ _ZN18QDeclarativeAction17deleteFromBindingEv @ 320 NONAME
+ _ZN18QDeclarativeActionC1EP7QObjectRK7QStringRK8QVariant @ 321 NONAME
+ _ZN18QDeclarativeActionC1Ev @ 322 NONAME
+ _ZN18QDeclarativeActionC2EP7QObjectRK7QStringRK8QVariant @ 323 NONAME
+ _ZN18QDeclarativeActionC2Ev @ 324 NONAME
+ _ZN18QDeclarativeColumn11qt_metacallEN11QMetaObject4CallEiPPv @ 325 NONAME
+ _ZN18QDeclarativeColumn11qt_metacastEPKc @ 326 NONAME
+ _ZN18QDeclarativeColumn13doPositioningEv @ 327 NONAME
+ _ZN18QDeclarativeColumn16staticMetaObjectE @ 328 NONAME DATA 16
+ _ZN18QDeclarativeColumn19getStaticMetaObjectEv @ 329 NONAME
+ _ZN18QDeclarativeColumnC1EP16QDeclarativeItem @ 330 NONAME
+ _ZN18QDeclarativeColumnC2EP16QDeclarativeItem @ 331 NONAME
+ _ZN18QDeclarativeEngine10setBaseUrlERK4QUrl @ 332 NONAME
+ _ZN18QDeclarativeEngine11qt_metacallEN11QMetaObject4CallEiPPv @ 333 NONAME
+ _ZN18QDeclarativeEngine11qt_metacastEPKc @ 334 NONAME
+ _ZN18QDeclarativeEngine11rootContextEv @ 335 NONAME
+ _ZN18QDeclarativeEngine13addImportPathERK7QString @ 336 NONAME
+ _ZN18QDeclarativeEngine15importExtensionERK7QStringS2_ @ 337 NONAME
+ _ZN18QDeclarativeEngine16addImageProviderERK7QStringP25QDeclarativeImageProvider @ 338 NONAME
+ _ZN18QDeclarativeEngine16contextForObjectEPK7QObject @ 339 NONAME
+ _ZN18QDeclarativeEngine16staticMetaObjectE @ 340 NONAME DATA 16
+ _ZN18QDeclarativeEngine19clearComponentCacheEv @ 341 NONAME
+ _ZN18QDeclarativeEngine19getStaticMetaObjectEv @ 342 NONAME
+ _ZN18QDeclarativeEngine19removeImageProviderERK7QString @ 343 NONAME
+ _ZN18QDeclarativeEngine19setContextForObjectEP7QObjectP19QDeclarativeContext @ 344 NONAME
+ _ZN18QDeclarativeEngine21setOfflineStoragePathERK7QString @ 345 NONAME
+ _ZN18QDeclarativeEngine30setNetworkAccessManagerFactoryEP39QDeclarativeNetworkAccessManagerFactory @ 346 NONAME
+ _ZN18QDeclarativeEngine4quitEv @ 347 NONAME
+ _ZN18QDeclarativeEngineC1EP7QObject @ 348 NONAME
+ _ZN18QDeclarativeEngineC2EP7QObject @ 349 NONAME
+ _ZN18QDeclarativeEngineD0Ev @ 350 NONAME
+ _ZN18QDeclarativeEngineD1Ev @ 351 NONAME
+ _ZN18QDeclarativeEngineD2Ev @ 352 NONAME
+ _ZN18QDeclarativeLoader10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 353 NONAME
+ _ZN18QDeclarativeLoader11eventFilterEP7QObjectP6QEvent @ 354 NONAME
+ _ZN18QDeclarativeLoader11itemChangedEv @ 355 NONAME
+ _ZN18QDeclarativeLoader11qt_metacallEN11QMetaObject4CallEiPPv @ 356 NONAME
+ _ZN18QDeclarativeLoader11qt_metacastEPKc @ 357 NONAME
+ _ZN18QDeclarativeLoader13setResizeModeENS_10ResizeModeE @ 358 NONAME
+ _ZN18QDeclarativeLoader13sourceChangedEv @ 359 NONAME
+ _ZN18QDeclarativeLoader13statusChangedEv @ 360 NONAME
+ _ZN18QDeclarativeLoader15geometryChangedERK6QRectFS2_ @ 361 NONAME
+ _ZN18QDeclarativeLoader15progressChangedEv @ 362 NONAME
+ _ZN18QDeclarativeLoader16staticMetaObjectE @ 363 NONAME DATA 16
+ _ZN18QDeclarativeLoader17resizeModeChangedEv @ 364 NONAME
+ _ZN18QDeclarativeLoader18setSourceComponentEP21QDeclarativeComponent @ 365 NONAME
+ _ZN18QDeclarativeLoader19getStaticMetaObjectEv @ 366 NONAME
+ _ZN18QDeclarativeLoader9setSourceERK4QUrl @ 367 NONAME
+ _ZN18QDeclarativeLoaderC1EP16QDeclarativeItem @ 368 NONAME
+ _ZN18QDeclarativeLoaderC2EP16QDeclarativeItem @ 369 NONAME
+ _ZN18QDeclarativeLoaderD0Ev @ 370 NONAME
+ _ZN18QDeclarativeLoaderD1Ev @ 371 NONAME
+ _ZN18QDeclarativeLoaderD2Ev @ 372 NONAME
+ _ZN18QMetaMethodBuilder13setAttributesEi @ 373 NONAME
+ _ZN18QMetaMethodBuilder13setReturnTypeERK10QByteArray @ 374 NONAME
+ _ZN18QMetaMethodBuilder17setParameterNamesERK5QListI10QByteArrayE @ 375 NONAME
+ _ZN18QMetaMethodBuilder6setTagERK10QByteArray @ 376 NONAME
+ _ZN18QMetaMethodBuilder9setAccessEN11QMetaMethod6AccessE @ 377 NONAME
+ _ZN18QMetaObjectBuilder11addPropertyERK10QByteArrayS2_i @ 378 NONAME
+ _ZN18QMetaObjectBuilder11addPropertyERK13QMetaProperty @ 379 NONAME
+ _ZN18QMetaObjectBuilder11deserializeER11QDataStreamRK4QMapI10QByteArrayPK11QMetaObjectE @ 380 NONAME
+ _ZN18QMetaObjectBuilder11indexOfSlotERK10QByteArray @ 381 NONAME
+ _ZN18QMetaObjectBuilder12addClassInfoERK10QByteArrayS2_ @ 382 NONAME
+ _ZN18QMetaObjectBuilder12removeMethodEi @ 383 NONAME
+ _ZN18QMetaObjectBuilder12setClassNameERK10QByteArray @ 384 NONAME
+ _ZN18QMetaObjectBuilder13addEnumeratorERK10QByteArray @ 385 NONAME
+ _ZN18QMetaObjectBuilder13addEnumeratorERK9QMetaEnum @ 386 NONAME
+ _ZN18QMetaObjectBuilder13addMetaObjectEPK11QMetaObject6QFlagsINS_9AddMemberEE @ 387 NONAME
+ _ZN18QMetaObjectBuilder13indexOfMethodERK10QByteArray @ 388 NONAME
+ _ZN18QMetaObjectBuilder13indexOfSignalERK10QByteArray @ 389 NONAME
+ _ZN18QMetaObjectBuilder13setSuperClassEPK11QMetaObject @ 390 NONAME
+ _ZN18QMetaObjectBuilder14addConstructorERK10QByteArray @ 391 NONAME
+ _ZN18QMetaObjectBuilder14addConstructorERK11QMetaMethod @ 392 NONAME
+ _ZN18QMetaObjectBuilder14removePropertyEi @ 393 NONAME
+ _ZN18QMetaObjectBuilder15indexOfPropertyERK10QByteArray @ 394 NONAME
+ _ZN18QMetaObjectBuilder15removeClassInfoEi @ 395 NONAME
+ _ZN18QMetaObjectBuilder16indexOfClassInfoERK10QByteArray @ 396 NONAME
+ _ZN18QMetaObjectBuilder16removeEnumeratorEi @ 397 NONAME
+ _ZN18QMetaObjectBuilder17indexOfEnumeratorERK10QByteArray @ 398 NONAME
+ _ZN18QMetaObjectBuilder17removeConstructorEi @ 399 NONAME
+ _ZN18QMetaObjectBuilder18indexOfConstructorERK10QByteArray @ 400 NONAME
+ _ZN18QMetaObjectBuilder19fromRelocatableDataEP11QMetaObjectPKS0_RK10QByteArray @ 401 NONAME
+ _ZN18QMetaObjectBuilder20addRelatedMetaObjectERKPFRK11QMetaObjectvE @ 402 NONAME
+ _ZN18QMetaObjectBuilder23removeRelatedMetaObjectEi @ 403 NONAME
+ _ZN18QMetaObjectBuilder25setStaticMetacallFunctionEPFiN11QMetaObject4CallEiPPvE @ 404 NONAME
+ _ZN18QMetaObjectBuilder7addSlotERK10QByteArray @ 405 NONAME
+ _ZN18QMetaObjectBuilder8setFlagsE6QFlagsINS_14MetaObjectFlagEE @ 406 NONAME
+ _ZN18QMetaObjectBuilder9addMethodERK10QByteArray @ 407 NONAME
+ _ZN18QMetaObjectBuilder9addMethodERK10QByteArrayS2_ @ 408 NONAME
+ _ZN18QMetaObjectBuilder9addMethodERK11QMetaMethod @ 409 NONAME
+ _ZN18QMetaObjectBuilder9addSignalERK10QByteArray @ 410 NONAME
+ _ZN18QMetaObjectBuilderC1EPK11QMetaObject6QFlagsINS_9AddMemberEE @ 411 NONAME
+ _ZN18QMetaObjectBuilderC1Ev @ 412 NONAME
+ _ZN18QMetaObjectBuilderC2EPK11QMetaObject6QFlagsINS_9AddMemberEE @ 413 NONAME
+ _ZN18QMetaObjectBuilderC2Ev @ 414 NONAME
+ _ZN18QMetaObjectBuilderD0Ev @ 415 NONAME
+ _ZN18QMetaObjectBuilderD1Ev @ 416 NONAME
+ _ZN18QMetaObjectBuilderD2Ev @ 417 NONAME
+ _ZN19QDeclarativeAnchors10classBeginEv @ 418 NONAME
+ _ZN19QDeclarativeAnchors10resetRightEv @ 419 NONAME
+ _ZN19QDeclarativeAnchors10setMarginsEf @ 420 NONAME
+ _ZN19QDeclarativeAnchors10topChangedEv @ 421 NONAME
+ _ZN19QDeclarativeAnchors11fillChangedEv @ 422 NONAME
+ _ZN19QDeclarativeAnchors11leftChangedEv @ 423 NONAME
+ _ZN19QDeclarativeAnchors11qt_metacallEN11QMetaObject4CallEiPPv @ 424 NONAME
+ _ZN19QDeclarativeAnchors11qt_metacastEPKc @ 425 NONAME
+ _ZN19QDeclarativeAnchors11resetBottomEv @ 426 NONAME
+ _ZN19QDeclarativeAnchors11setBaselineERK22QDeclarativeAnchorLine @ 427 NONAME
+ _ZN19QDeclarativeAnchors11setCenterInEP16QDeclarativeItem @ 428 NONAME
+ _ZN19QDeclarativeAnchors12rightChangedEv @ 429 NONAME
+ _ZN19QDeclarativeAnchors12setTopMarginEf @ 430 NONAME
+ _ZN19QDeclarativeAnchors13bottomChangedEv @ 431 NONAME
+ _ZN19QDeclarativeAnchors13resetBaselineEv @ 432 NONAME
+ _ZN19QDeclarativeAnchors13resetCenterInEv @ 433 NONAME
+ _ZN19QDeclarativeAnchors13setLeftMarginEf @ 434 NONAME
+ _ZN19QDeclarativeAnchors14marginsChangedEv @ 435 NONAME
+ _ZN19QDeclarativeAnchors14setRightMarginEf @ 436 NONAME
+ _ZN19QDeclarativeAnchors15baselineChangedEv @ 437 NONAME
+ _ZN19QDeclarativeAnchors15centerInChangedEv @ 438 NONAME
+ _ZN19QDeclarativeAnchors15setBottomMarginEf @ 439 NONAME
+ _ZN19QDeclarativeAnchors16staticMetaObjectE @ 440 NONAME DATA 16
+ _ZN19QDeclarativeAnchors16topMarginChangedEv @ 441 NONAME
+ _ZN19QDeclarativeAnchors17componentCompleteEv @ 442 NONAME
+ _ZN19QDeclarativeAnchors17leftMarginChangedEv @ 443 NONAME
+ _ZN19QDeclarativeAnchors17setBaselineOffsetEf @ 444 NONAME
+ _ZN19QDeclarativeAnchors17setVerticalCenterERK22QDeclarativeAnchorLine @ 445 NONAME
+ _ZN19QDeclarativeAnchors18rightMarginChangedEv @ 446 NONAME
+ _ZN19QDeclarativeAnchors19bottomMarginChangedEv @ 447 NONAME
+ _ZN19QDeclarativeAnchors19getStaticMetaObjectEv @ 448 NONAME
+ _ZN19QDeclarativeAnchors19resetVerticalCenterEv @ 449 NONAME
+ _ZN19QDeclarativeAnchors19setHorizontalCenterERK22QDeclarativeAnchorLine @ 450 NONAME
+ _ZN19QDeclarativeAnchors21baselineOffsetChangedEv @ 451 NONAME
+ _ZN19QDeclarativeAnchors21resetHorizontalCenterEv @ 452 NONAME
+ _ZN19QDeclarativeAnchors21verticalCenterChangedEv @ 453 NONAME
+ _ZN19QDeclarativeAnchors23horizontalCenterChangedEv @ 454 NONAME
+ _ZN19QDeclarativeAnchors23setVerticalCenterOffsetEf @ 455 NONAME
+ _ZN19QDeclarativeAnchors25setHorizontalCenterOffsetEf @ 456 NONAME
+ _ZN19QDeclarativeAnchors27verticalCenterOffsetChangedEv @ 457 NONAME
+ _ZN19QDeclarativeAnchors29horizontalCenterOffsetChangedEv @ 458 NONAME
+ _ZN19QDeclarativeAnchors6setTopERK22QDeclarativeAnchorLine @ 459 NONAME
+ _ZN19QDeclarativeAnchors7setFillEP16QDeclarativeItem @ 460 NONAME
+ _ZN19QDeclarativeAnchors7setLeftERK22QDeclarativeAnchorLine @ 461 NONAME
+ _ZN19QDeclarativeAnchors8resetTopEv @ 462 NONAME
+ _ZN19QDeclarativeAnchors8setRightERK22QDeclarativeAnchorLine @ 463 NONAME
+ _ZN19QDeclarativeAnchors9resetFillEv @ 464 NONAME
+ _ZN19QDeclarativeAnchors9resetLeftEv @ 465 NONAME
+ _ZN19QDeclarativeAnchors9setBottomERK22QDeclarativeAnchorLine @ 466 NONAME
+ _ZN19QDeclarativeAnchorsC1EP16QDeclarativeItemP7QObject @ 467 NONAME
+ _ZN19QDeclarativeAnchorsC1EP7QObject @ 468 NONAME
+ _ZN19QDeclarativeAnchorsC2EP16QDeclarativeItemP7QObject @ 469 NONAME
+ _ZN19QDeclarativeAnchorsC2EP7QObject @ 470 NONAME
+ _ZN19QDeclarativeAnchorsD0Ev @ 471 NONAME
+ _ZN19QDeclarativeAnchorsD1Ev @ 472 NONAME
+ _ZN19QDeclarativeAnchorsD2Ev @ 473 NONAME
+ _ZN19QDeclarativeContext10setBaseUrlERK4QUrl @ 474 NONAME
+ _ZN19QDeclarativeContext11qt_metacallEN11QMetaObject4CallEiPPv @ 475 NONAME
+ _ZN19QDeclarativeContext11qt_metacastEPKc @ 476 NONAME
+ _ZN19QDeclarativeContext11resolvedUrlERK4QUrl @ 477 NONAME
+ _ZN19QDeclarativeContext16addDefaultObjectEP7QObject @ 478 NONAME
+ _ZN19QDeclarativeContext16staticMetaObjectE @ 479 NONAME DATA 16
+ _ZN19QDeclarativeContext18setContextPropertyERK7QStringP7QObject @ 480 NONAME
+ _ZN19QDeclarativeContext18setContextPropertyERK7QStringRK8QVariant @ 481 NONAME
+ _ZN19QDeclarativeContext19getStaticMetaObjectEv @ 482 NONAME
+ _ZN19QDeclarativeContextC1EP18QDeclarativeEngineP7QObject @ 483 NONAME
+ _ZN19QDeclarativeContextC1EP18QDeclarativeEngineb @ 484 NONAME
+ _ZN19QDeclarativeContextC1EPS_P7QObject @ 485 NONAME
+ _ZN19QDeclarativeContextC1EPS_P7QObjectb @ 486 NONAME
+ _ZN19QDeclarativeContextC2EP18QDeclarativeEngineP7QObject @ 487 NONAME
+ _ZN19QDeclarativeContextC2EP18QDeclarativeEngineb @ 488 NONAME
+ _ZN19QDeclarativeContextC2EPS_P7QObject @ 489 NONAME
+ _ZN19QDeclarativeContextC2EPS_P7QObjectb @ 490 NONAME
+ _ZN19QDeclarativeContextD0Ev @ 491 NONAME
+ _ZN19QDeclarativeContextD1Ev @ 492 NONAME
+ _ZN19QDeclarativeContextD2Ev @ 493 NONAME
+ _ZN19QDeclarativeDomListC1ERKS_ @ 494 NONAME
+ _ZN19QDeclarativeDomListC1Ev @ 495 NONAME
+ _ZN19QDeclarativeDomListC2ERKS_ @ 496 NONAME
+ _ZN19QDeclarativeDomListC2Ev @ 497 NONAME
+ _ZN19QDeclarativeDomListD1Ev @ 498 NONAME
+ _ZN19QDeclarativeDomListD2Ev @ 499 NONAME
+ _ZN19QDeclarativeDomListaSERKS_ @ 500 NONAME
+ _ZN19QDeclarativePrivate12registerTypeERKNS_12RegisterTypeE @ 501 NONAME
+ _ZN19QDeclarativePrivate12registerTypeERKNS_17RegisterInterfaceE @ 502 NONAME
+ _ZN19QDeclarativeWebPage10chooseFileEP9QWebFrameRK7QString @ 503 NONAME
+ _ZN19QDeclarativeWebPage11qt_metacallEN11QMetaObject4CallEiPPv @ 504 NONAME
+ _ZN19QDeclarativeWebPage11qt_metacastEPKc @ 505 NONAME
+ _ZN19QDeclarativeWebPage12createPluginERK7QStringRK4QUrlRK11QStringListS8_ @ 506 NONAME
+ _ZN19QDeclarativeWebPage12createWindowEN8QWebPage13WebWindowTypeE @ 507 NONAME
+ _ZN19QDeclarativeWebPage15javaScriptAlertEP9QWebFrameRK7QString @ 508 NONAME
+ _ZN19QDeclarativeWebPage16javaScriptPromptEP9QWebFrameRK7QStringS4_PS2_ @ 509 NONAME
+ _ZN19QDeclarativeWebPage16staticMetaObjectE @ 510 NONAME DATA 16
+ _ZN19QDeclarativeWebPage17javaScriptConfirmEP9QWebFrameRK7QString @ 511 NONAME
+ _ZN19QDeclarativeWebPage19getStaticMetaObjectEv @ 512 NONAME
+ _ZN19QDeclarativeWebPage24javaScriptConsoleMessageERK7QStringiS2_ @ 513 NONAME
+ _ZN19QDeclarativeWebPage8viewItemEv @ 514 NONAME
+ _ZN19QDeclarativeWebPageC1EP19QDeclarativeWebView @ 515 NONAME
+ _ZN19QDeclarativeWebPageC2EP19QDeclarativeWebView @ 516 NONAME
+ _ZN19QDeclarativeWebPageD0Ev @ 517 NONAME
+ _ZN19QDeclarativeWebPageD1Ev @ 518 NONAME
+ _ZN19QDeclarativeWebPageD2Ev @ 519 NONAME
+ _ZN19QDeclarativeWebView10loadFailedEv @ 520 NONAME
+ _ZN19QDeclarativeWebView10sceneEventEP6QEvent @ 521 NONAME
+ _ZN19QDeclarativeWebView10setContentERK10QByteArrayRK7QStringRK4QUrl @ 522 NONAME
+ _ZN19QDeclarativeWebView10timerEventEP11QTimerEvent @ 523 NONAME
+ _ZN19QDeclarativeWebView10urlChangedEv @ 524 NONAME
+ _ZN19QDeclarativeWebView11doubleClickEii @ 525 NONAME
+ _ZN19QDeclarativeWebView11htmlChangedEv @ 526 NONAME
+ _ZN19QDeclarativeWebView11iconChangedEv @ 527 NONAME
+ _ZN19QDeclarativeWebView11loadStartedEv @ 528 NONAME
+ _ZN19QDeclarativeWebView11qt_metacallEN11QMetaObject4CallEiPPv @ 529 NONAME
+ _ZN19QDeclarativeWebView11qt_metacastEPKc @ 530 NONAME
+ _ZN19QDeclarativeWebView12createWindowEN8QWebPage13WebWindowTypeE @ 531 NONAME
+ _ZN19QDeclarativeWebView12drawContentsEP8QPainterRK5QRect @ 532 NONAME
+ _ZN19QDeclarativeWebView12focusChangedEb @ 533 NONAME
+ _ZN19QDeclarativeWebView12loadFinishedEv @ 534 NONAME
+ _ZN19QDeclarativeWebView12titleChangedERK7QString @ 535 NONAME
+ _ZN19QDeclarativeWebView13doLoadStartedEv @ 536 NONAME
+ _ZN19QDeclarativeWebView13heuristicZoomEiif @ 537 NONAME
+ _ZN19QDeclarativeWebView13initialLayoutEv @ 538 NONAME
+ _ZN19QDeclarativeWebView13keyPressEventEP9QKeyEvent @ 539 NONAME
+ _ZN19QDeclarativeWebView13setStatusTextERK7QString @ 540 NONAME
+ _ZN19QDeclarativeWebView13setZoomFactorEf @ 541 NONAME
+ _ZN19QDeclarativeWebView13statusChangedENS_6StatusE @ 542 NONAME
+ _ZN19QDeclarativeWebView14doLoadFinishedEb @ 543 NONAME
+ _ZN19QDeclarativeWebView14doLoadProgressEi @ 544 NONAME
+ _ZN19QDeclarativeWebView14hoverMoveEventEP24QGraphicsSceneHoverEvent @ 545 NONAME
+ _ZN19QDeclarativeWebView14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 546 NONAME
+ _ZN19QDeclarativeWebView14pageUrlChangedEv @ 547 NONAME
+ _ZN19QDeclarativeWebView15expandToWebPageEv @ 548 NONAME
+ _ZN19QDeclarativeWebView15geometryChangedERK6QRectFS2_ @ 549 NONAME
+ _ZN19QDeclarativeWebView15keyReleaseEventEP9QKeyEvent @ 550 NONAME
+ _ZN19QDeclarativeWebView15mousePressEventEP24QGraphicsSceneMouseEvent @ 551 NONAME
+ _ZN19QDeclarativeWebView15progressChangedEv @ 552 NONAME
+ _ZN19QDeclarativeWebView16setPressGrabTimeEi @ 553 NONAME
+ _ZN19QDeclarativeWebView16staticMetaObjectE @ 554 NONAME DATA 16
+ _ZN19QDeclarativeWebView17componentCompleteEv @ 555 NONAME
+ _ZN19QDeclarativeWebView17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 556 NONAME
+ _ZN19QDeclarativeWebView17setPreferredWidthEi @ 557 NONAME
+ _ZN19QDeclarativeWebView17statusTextChangedEv @ 558 NONAME
+ _ZN19QDeclarativeWebView17zoomFactorChangedEv @ 559 NONAME
+ _ZN19QDeclarativeWebView18evaluateJavaScriptERK7QString @ 560 NONAME
+ _ZN19QDeclarativeWebView18setNewWindowParentEP16QDeclarativeItem @ 561 NONAME
+ _ZN19QDeclarativeWebView18setPreferredHeightEi @ 562 NONAME
+ _ZN19QDeclarativeWebView19getStaticMetaObjectEv @ 563 NONAME
+ _ZN19QDeclarativeWebView19setRenderingEnabledEb @ 564 NONAME
+ _ZN19QDeclarativeWebView19windowObjectClearedEv @ 565 NONAME
+ _ZN19QDeclarativeWebView20pressGrabTimeChangedEv @ 566 NONAME
+ _ZN19QDeclarativeWebView21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 567 NONAME
+ _ZN19QDeclarativeWebView21preferredWidthChangedEv @ 568 NONAME
+ _ZN19QDeclarativeWebView21qmlAttachedPropertiesEP7QObject @ 569 NONAME
+ _ZN19QDeclarativeWebView21setNewWindowComponentEP21QDeclarativeComponent @ 570 NONAME
+ _ZN19QDeclarativeWebView22newWindowParentChangedEv @ 571 NONAME
+ _ZN19QDeclarativeWebView22preferredHeightChangedEv @ 572 NONAME
+ _ZN19QDeclarativeWebView23javaScriptWindowObjectsEv @ 573 NONAME
+ _ZN19QDeclarativeWebView23noteContentsSizeChangedERK5QSize @ 574 NONAME
+ _ZN19QDeclarativeWebView23renderingEnabledChangedEv @ 575 NONAME
+ _ZN19QDeclarativeWebView25newWindowComponentChangedEv @ 576 NONAME
+ _ZN19QDeclarativeWebView27sceneMouseEventToMouseEventEP24QGraphicsSceneMouseEvent @ 577 NONAME
+ _ZN19QDeclarativeWebView31sceneHoverMoveEventToMouseEventEP24QGraphicsSceneHoverEvent @ 578 NONAME
+ _ZN19QDeclarativeWebView4initEv @ 579 NONAME
+ _ZN19QDeclarativeWebView4loadERK15QNetworkRequestN21QNetworkAccessManager9OperationERK10QByteArray @ 580 NONAME
+ _ZN19QDeclarativeWebView5alertERK7QString @ 581 NONAME
+ _ZN19QDeclarativeWebView6setUrlERK4QUrl @ 582 NONAME
+ _ZN19QDeclarativeWebView6zoomToEfii @ 583 NONAME
+ _ZN19QDeclarativeWebView7setHtmlERK7QStringRK4QUrl @ 584 NONAME
+ _ZN19QDeclarativeWebView7setPageEP8QWebPage @ 585 NONAME
+ _ZN19QDeclarativeWebView9paintPageERK5QRect @ 586 NONAME
+ _ZN19QDeclarativeWebViewC1EP16QDeclarativeItem @ 587 NONAME
+ _ZN19QDeclarativeWebViewC2EP16QDeclarativeItem @ 588 NONAME
+ _ZN19QDeclarativeWebViewD0Ev @ 589 NONAME
+ _ZN19QDeclarativeWebViewD1Ev @ 590 NONAME
+ _ZN19QDeclarativeWebViewD2Ev @ 591 NONAME
+ _ZN19QListModelInterface10itemsMovedEiii @ 592 NONAME
+ _ZN19QListModelInterface11qt_metacallEN11QMetaObject4CallEiPPv @ 593 NONAME
+ _ZN19QListModelInterface11qt_metacastEPKc @ 594 NONAME
+ _ZN19QListModelInterface12itemsChangedEiiRK5QListIiE @ 595 NONAME
+ _ZN19QListModelInterface12itemsRemovedEii @ 596 NONAME
+ _ZN19QListModelInterface13itemsInsertedEii @ 597 NONAME
+ _ZN19QListModelInterface16staticMetaObjectE @ 598 NONAME DATA 16
+ _ZN19QListModelInterface19getStaticMetaObjectEv @ 599 NONAME
+ _ZN20QDeclarativeBehavior10setEnabledEb @ 600 NONAME
+ _ZN20QDeclarativeBehavior11qt_metacallEN11QMetaObject4CallEiPPv @ 601 NONAME
+ _ZN20QDeclarativeBehavior11qt_metacastEPKc @ 602 NONAME
+ _ZN20QDeclarativeBehavior12setAnimationEP29QDeclarativeAbstractAnimation @ 603 NONAME
+ _ZN20QDeclarativeBehavior14enabledChangedEv @ 604 NONAME
+ _ZN20QDeclarativeBehavior16staticMetaObjectE @ 605 NONAME DATA 16
+ _ZN20QDeclarativeBehavior19getStaticMetaObjectEv @ 606 NONAME
+ _ZN20QDeclarativeBehavior5writeERK8QVariant @ 607 NONAME
+ _ZN20QDeclarativeBehavior9animationEv @ 608 NONAME
+ _ZN20QDeclarativeBehavior9setTargetERK20QDeclarativeProperty @ 609 NONAME
+ _ZN20QDeclarativeBehaviorC1EP7QObject @ 610 NONAME
+ _ZN20QDeclarativeBehaviorC2EP7QObject @ 611 NONAME
+ _ZN20QDeclarativeBehaviorD0Ev @ 612 NONAME
+ _ZN20QDeclarativeBehaviorD1Ev @ 613 NONAME
+ _ZN20QDeclarativeBehaviorD2Ev @ 614 NONAME
+ _ZN20QDeclarativeCompiler11buildObjectEPN18QDeclarativeParser6ObjectERKNS_14BindingContextE @ 615 NONAME
+ _ZN20QDeclarativeCompiler11buildScriptEPN18QDeclarativeParser6ObjectES2_ @ 616 NONAME
+ _ZN20QDeclarativeCompiler11buildSignalEPN18QDeclarativeParser8PropertyEPNS0_6ObjectERKNS_14BindingContextE @ 617 NONAME
+ _ZN20QDeclarativeCompiler11compileTreeEPN18QDeclarativeParser6ObjectE @ 618 NONAME
+ _ZN20QDeclarativeCompiler12buildBindingEPN18QDeclarativeParser5ValueEPNS0_8PropertyERKNS_14BindingContextE @ 619 NONAME
+ _ZN20QDeclarativeCompiler12compileAliasER18QMetaObjectBuilderR10QByteArrayPN18QDeclarativeParser6ObjectERKNS5_15DynamicPropertyE @ 620 NONAME
+ _ZN20QDeclarativeCompiler12genComponentEPN18QDeclarativeParser6ObjectE @ 621 NONAME
+ _ZN20QDeclarativeCompiler13buildPropertyEPN18QDeclarativeParser8PropertyEPNS0_6ObjectERKNS_14BindingContextE @ 622 NONAME
+ _ZN20QDeclarativeCompiler13genObjectBodyEPN18QDeclarativeParser6ObjectE @ 623 NONAME
+ _ZN20QDeclarativeCompiler14buildComponentEPN18QDeclarativeParser6ObjectERKNS_14BindingContextE @ 624 NONAME
+ _ZN20QDeclarativeCompiler14buildSubObjectEPN18QDeclarativeParser6ObjectERKNS_14BindingContextE @ 625 NONAME
+ _ZN20QDeclarativeCompiler14componentStateEPN18QDeclarativeParser6ObjectE @ 626 NONAME
+ _ZN20QDeclarativeCompiler15buildIdPropertyEPN18QDeclarativeParser8PropertyEPNS0_6ObjectE @ 627 NONAME
+ _ZN20QDeclarativeCompiler15genContextCacheEv @ 628 NONAME
+ _ZN20QDeclarativeCompiler15genListPropertyEPN18QDeclarativeParser8PropertyEPNS0_6ObjectE @ 629 NONAME
+ _ZN20QDeclarativeCompiler15genPropertyDataEPN18QDeclarativeParser8PropertyE @ 630 NONAME
+ _ZN20QDeclarativeCompiler16buildDynamicMetaEPN18QDeclarativeParser6ObjectENS_15DynamicMetaModeE @ 631 NONAME
+ _ZN20QDeclarativeCompiler16checkDynamicMetaEPN18QDeclarativeParser6ObjectE @ 632 NONAME
+ _ZN20QDeclarativeCompiler16componentTypeRefEv @ 633 NONAME
+ _ZN20QDeclarativeCompiler16findSignalByNameEPK11QMetaObjectRK10QByteArray @ 634 NONAME
+ _ZN20QDeclarativeCompiler16genValuePropertyEPN18QDeclarativeParser8PropertyEPNS0_6ObjectE @ 635 NONAME
+ _ZN20QDeclarativeCompiler16genValueTypeDataEPN18QDeclarativeParser8PropertyES2_ @ 636 NONAME
+ _ZN20QDeclarativeCompiler17buildListPropertyEPN18QDeclarativeParser8PropertyEPNS0_6ObjectERKNS_14BindingContextE @ 637 NONAME
+ _ZN20QDeclarativeCompiler17doesPropertyExistEPN18QDeclarativeParser8PropertyEPNS0_6ObjectE @ 638 NONAME
+ _ZN20QDeclarativeCompiler18deferredPropertiesEPN18QDeclarativeParser6ObjectE @ 639 NONAME
+ _ZN20QDeclarativeCompiler18saveComponentStateEv @ 640 NONAME
+ _ZN20QDeclarativeCompiler19addBindingReferenceERKNS_16BindingReferenceE @ 641 NONAME
+ _ZN20QDeclarativeCompiler20buildGroupedPropertyEPN18QDeclarativeParser8PropertyEPNS0_6ObjectERKNS_14BindingContextE @ 642 NONAME
+ _ZN20QDeclarativeCompiler20genBindingAssignmentEPN18QDeclarativeParser5ValueEPNS0_8PropertyEPNS0_6ObjectES4_ @ 643 NONAME
+ _ZN20QDeclarativeCompiler20genLiteralAssignmentERK13QMetaPropertyPN18QDeclarativeParser5ValueE @ 644 NONAME
+ _ZN20QDeclarativeCompiler20isSignalPropertyNameERK10QByteArray @ 645 NONAME
+ _ZN20QDeclarativeCompiler21buildAttachedPropertyEPN18QDeclarativeParser8PropertyEPNS0_6ObjectERKNS_14BindingContextE @ 646 NONAME
+ _ZN20QDeclarativeCompiler21genPropertyAssignmentEPN18QDeclarativeParser8PropertyEPNS0_6ObjectES2_ @ 647 NONAME
+ _ZN20QDeclarativeCompiler21testLiteralAssignmentERK13QMetaPropertyPN18QDeclarativeParser5ValueE @ 648 NONAME
+ _ZN20QDeclarativeCompiler22buildComponentFromRootEPN18QDeclarativeParser6ObjectERKNS_14BindingContextE @ 649 NONAME
+ _ZN20QDeclarativeCompiler22buildValueTypePropertyEP7QObjectPN18QDeclarativeParser6ObjectES4_RKNS_14BindingContextE @ 650 NONAME
+ _ZN20QDeclarativeCompiler22completeComponentBuildEv @ 651 NONAME
+ _ZN20QDeclarativeCompiler22isAttachedPropertyNameERK10QByteArray @ 652 NONAME
+ _ZN20QDeclarativeCompiler23buildPropertyAssignmentEPN18QDeclarativeParser8PropertyEPNS0_6ObjectERKNS_14BindingContextE @ 653 NONAME
+ _ZN20QDeclarativeCompiler24buildPropertyInNamespaceEPN25QDeclarativeEnginePrivate17ImportedNamespaceEPN18QDeclarativeParser8PropertyEPNS3_6ObjectERKNS_14BindingContextE @ 654 NONAME
+ _ZN20QDeclarativeCompiler25buildScriptStringPropertyEPN18QDeclarativeParser8PropertyEPNS0_6ObjectERKNS_14BindingContextE @ 655 NONAME
+ _ZN20QDeclarativeCompiler26mergeDynamicMetaPropertiesEPN18QDeclarativeParser6ObjectE @ 656 NONAME
+ _ZN20QDeclarativeCompiler27testQualifiedEnumAssignmentERK13QMetaPropertyPN18QDeclarativeParser6ObjectEPNS3_5ValueEPb @ 657 NONAME
+ _ZN20QDeclarativeCompiler29buildPropertyObjectAssignmentEPN18QDeclarativeParser8PropertyEPNS0_6ObjectEPNS0_5ValueERKNS_14BindingContextE @ 658 NONAME
+ _ZN20QDeclarativeCompiler30buildPropertyLiteralAssignmentEPN18QDeclarativeParser8PropertyEPNS0_6ObjectEPNS0_5ValueERKNS_14BindingContextE @ 659 NONAME
+ _ZN20QDeclarativeCompiler5addIdERK7QStringPN18QDeclarativeParser6ObjectE @ 660 NONAME
+ _ZN20QDeclarativeCompiler5resetEP24QDeclarativeCompiledData @ 661 NONAME
+ _ZN20QDeclarativeCompiler7compileEP18QDeclarativeEngineP29QDeclarativeCompositeTypeDataP24QDeclarativeCompiledData @ 662 NONAME
+ _ZN20QDeclarativeCompiler9canCoerceEiPN18QDeclarativeParser6ObjectE @ 663 NONAME
+ _ZN20QDeclarativeCompiler9canCoerceEii @ 664 NONAME
+ _ZN20QDeclarativeCompiler9dumpStatsEv @ 665 NONAME
+ _ZN20QDeclarativeCompiler9genObjectEPN18QDeclarativeParser6ObjectE @ 666 NONAME
+ _ZN20QDeclarativeCompiler9isValidIdERK7QString @ 667 NONAME
+ _ZN20QDeclarativeCompiler9toQmlTypeEPN18QDeclarativeParser6ObjectE @ 668 NONAME
+ _ZN20QDeclarativeCompilerC1Ev @ 669 NONAME
+ _ZN20QDeclarativeCompilerC2Ev @ 670 NONAME
+ _ZN20QDeclarativeDomValueC1ERKS_ @ 671 NONAME
+ _ZN20QDeclarativeDomValueC1Ev @ 672 NONAME
+ _ZN20QDeclarativeDomValueC2ERKS_ @ 673 NONAME
+ _ZN20QDeclarativeDomValueC2Ev @ 674 NONAME
+ _ZN20QDeclarativeDomValueD1Ev @ 675 NONAME
+ _ZN20QDeclarativeDomValueD2Ev @ 676 NONAME
+ _ZN20QDeclarativeDomValueaSERKS_ @ 677 NONAME
+ _ZN20QDeclarativeFlipable11qt_metacallEN11QMetaObject4CallEiPPv @ 678 NONAME
+ _ZN20QDeclarativeFlipable11qt_metacastEPKc @ 679 NONAME
+ _ZN20QDeclarativeFlipable11sideChangedEv @ 680 NONAME
+ _ZN20QDeclarativeFlipable16staticMetaObjectE @ 681 NONAME DATA 16
+ _ZN20QDeclarativeFlipable19getStaticMetaObjectEv @ 682 NONAME
+ _ZN20QDeclarativeFlipable4backEv @ 683 NONAME
+ _ZN20QDeclarativeFlipable5frontEv @ 684 NONAME
+ _ZN20QDeclarativeFlipable7setBackEP16QDeclarativeItem @ 685 NONAME
+ _ZN20QDeclarativeFlipable8setFrontEP16QDeclarativeItem @ 686 NONAME
+ _ZN20QDeclarativeFlipableC1EP16QDeclarativeItem @ 687 NONAME
+ _ZN20QDeclarativeFlipableC2EP16QDeclarativeItem @ 688 NONAME
+ _ZN20QDeclarativeFlipableD0Ev @ 689 NONAME
+ _ZN20QDeclarativeFlipableD1Ev @ 690 NONAME
+ _ZN20QDeclarativeFlipableD2Ev @ 691 NONAME
+ _ZN20QDeclarativeGradient11qt_metacallEN11QMetaObject4CallEiPPv @ 692 NONAME
+ _ZN20QDeclarativeGradient11qt_metacastEPKc @ 693 NONAME
+ _ZN20QDeclarativeGradient16staticMetaObjectE @ 694 NONAME DATA 16
+ _ZN20QDeclarativeGradient19getStaticMetaObjectEv @ 695 NONAME
+ _ZN20QDeclarativeGradient7updatedEv @ 696 NONAME
+ _ZN20QDeclarativeGradient8doUpdateEv @ 697 NONAME
+ _ZN20QDeclarativeGridView10itemsMovedEiii @ 698 NONAME
+ _ZN20QDeclarativeGridView10modelResetEv @ 699 NONAME
+ _ZN20QDeclarativeGridView10sizeChangeEv @ 700 NONAME
+ _ZN20QDeclarativeGridView11createdItemEiP16QDeclarativeItem @ 701 NONAME
+ _ZN20QDeclarativeGridView11currentItemEv @ 702 NONAME
+ _ZN20QDeclarativeGridView11qt_metacallEN11QMetaObject4CallEiPPv @ 703 NONAME
+ _ZN20QDeclarativeGridView11qt_metacastEPKc @ 704 NONAME
+ _ZN20QDeclarativeGridView11setDelegateEP21QDeclarativeComponent @ 705 NONAME
+ _ZN20QDeclarativeGridView12countChangedEv @ 706 NONAME
+ _ZN20QDeclarativeGridView12itemsRemovedEii @ 707 NONAME
+ _ZN20QDeclarativeGridView12setCellWidthEi @ 708 NONAME
+ _ZN20QDeclarativeGridView12setHighlightEP21QDeclarativeComponent @ 709 NONAME
+ _ZN20QDeclarativeGridView13highlightItemEv @ 710 NONAME
+ _ZN20QDeclarativeGridView13itemsInsertedEii @ 711 NONAME
+ _ZN20QDeclarativeGridView13keyPressEventEP9QKeyEvent @ 712 NONAME
+ _ZN20QDeclarativeGridView13setCellHeightEi @ 713 NONAME
+ _ZN20QDeclarativeGridView13viewportMovedEv @ 714 NONAME
+ _ZN20QDeclarativeGridView14destroyRemovedEv @ 715 NONAME
+ _ZN20QDeclarativeGridView14destroyingItemEP16QDeclarativeItem @ 716 NONAME
+ _ZN20QDeclarativeGridView14setCacheBufferEi @ 717 NONAME
+ _ZN20QDeclarativeGridView14setWrapEnabledEb @ 718 NONAME
+ _ZN20QDeclarativeGridView15setCurrentIndexEi @ 719 NONAME
+ _ZN20QDeclarativeGridView16cellWidthChangedEv @ 720 NONAME
+ _ZN20QDeclarativeGridView16highlightChangedEv @ 721 NONAME
+ _ZN20QDeclarativeGridView16staticMetaObjectE @ 722 NONAME DATA 16
+ _ZN20QDeclarativeGridView17cellHeightChangedEv @ 723 NONAME
+ _ZN20QDeclarativeGridView17componentCompleteEv @ 724 NONAME
+ _ZN20QDeclarativeGridView18moveCurrentIndexUpEv @ 725 NONAME
+ _ZN20QDeclarativeGridView19currentIndexChangedEv @ 726 NONAME
+ _ZN20QDeclarativeGridView19getStaticMetaObjectEv @ 727 NONAME
+ _ZN20QDeclarativeGridView19positionViewAtIndexEi @ 728 NONAME
+ _ZN20QDeclarativeGridView20moveCurrentIndexDownEv @ 729 NONAME
+ _ZN20QDeclarativeGridView20moveCurrentIndexLeftEv @ 730 NONAME
+ _ZN20QDeclarativeGridView21moveCurrentIndexRightEv @ 731 NONAME
+ _ZN20QDeclarativeGridView21qmlAttachedPropertiesEP7QObject @ 732 NONAME
+ _ZN20QDeclarativeGridView22trackedPositionChangedEv @ 733 NONAME
+ _ZN20QDeclarativeGridView30setHighlightFollowsCurrentItemEb @ 734 NONAME
+ _ZN20QDeclarativeGridView6layoutEv @ 735 NONAME
+ _ZN20QDeclarativeGridView6refillEv @ 736 NONAME
+ _ZN20QDeclarativeGridView7setFlowENS_4FlowE @ 737 NONAME
+ _ZN20QDeclarativeGridView8setModelERK8QVariant @ 738 NONAME
+ _ZN20QDeclarativeGridViewC1EP16QDeclarativeItem @ 739 NONAME
+ _ZN20QDeclarativeGridViewC2EP16QDeclarativeItem @ 740 NONAME
+ _ZN20QDeclarativeGridViewD0Ev @ 741 NONAME
+ _ZN20QDeclarativeGridViewD1Ev @ 742 NONAME
+ _ZN20QDeclarativeGridViewD2Ev @ 743 NONAME
+ _ZN20QDeclarativeListView10itemsMovedEiii @ 744 NONAME
+ _ZN20QDeclarativeListView10modelResetEv @ 745 NONAME
+ _ZN20QDeclarativeListView10setSpacingEf @ 746 NONAME
+ _ZN20QDeclarativeListView11animStoppedEv @ 747 NONAME
+ _ZN20QDeclarativeListView11createdItemEiP16QDeclarativeItem @ 748 NONAME
+ _ZN20QDeclarativeListView11currentItemEv @ 749 NONAME
+ _ZN20QDeclarativeListView11qt_metacallEN11QMetaObject4CallEiPPv @ 750 NONAME
+ _ZN20QDeclarativeListView11qt_metacastEPKc @ 751 NONAME
+ _ZN20QDeclarativeListView11setDelegateEP21QDeclarativeComponent @ 752 NONAME
+ _ZN20QDeclarativeListView11setSnapModeENS_8SnapModeE @ 753 NONAME
+ _ZN20QDeclarativeListView12countChangedEv @ 754 NONAME
+ _ZN20QDeclarativeListView12itemsRemovedEii @ 755 NONAME
+ _ZN20QDeclarativeListView12setHighlightEP21QDeclarativeComponent @ 756 NONAME
+ _ZN20QDeclarativeListView13highlightItemEv @ 757 NONAME
+ _ZN20QDeclarativeListView13itemsInsertedEii @ 758 NONAME
+ _ZN20QDeclarativeListView13keyPressEventEP9QKeyEvent @ 759 NONAME
+ _ZN20QDeclarativeListView13viewportMovedEv @ 760 NONAME
+ _ZN20QDeclarativeListView14destroyRemovedEv @ 761 NONAME
+ _ZN20QDeclarativeListView14destroyingItemEP16QDeclarativeItem @ 762 NONAME
+ _ZN20QDeclarativeListView14setCacheBufferEi @ 763 NONAME
+ _ZN20QDeclarativeListView14setOrientationENS_11OrientationE @ 764 NONAME
+ _ZN20QDeclarativeListView14setWrapEnabledEb @ 765 NONAME
+ _ZN20QDeclarativeListView14spacingChangedEv @ 766 NONAME
+ _ZN20QDeclarativeListView15sectionCriteriaEv @ 767 NONAME
+ _ZN20QDeclarativeListView15setCurrentIndexEi @ 768 NONAME
+ _ZN20QDeclarativeListView16highlightChangedEv @ 769 NONAME
+ _ZN20QDeclarativeListView16staticMetaObjectE @ 770 NONAME DATA 16
+ _ZN20QDeclarativeListView17componentCompleteEv @ 771 NONAME
+ _ZN20QDeclarativeListView18orientationChangedEv @ 772 NONAME
+ _ZN20QDeclarativeListView19currentIndexChangedEv @ 773 NONAME
+ _ZN20QDeclarativeListView19getStaticMetaObjectEv @ 774 NONAME
+ _ZN20QDeclarativeListView19positionViewAtIndexEi @ 775 NONAME
+ _ZN20QDeclarativeListView21currentSectionChangedEv @ 776 NONAME
+ _ZN20QDeclarativeListView21decrementCurrentIndexEv @ 777 NONAME
+ _ZN20QDeclarativeListView21incrementCurrentIndexEv @ 778 NONAME
+ _ZN20QDeclarativeListView21qmlAttachedPropertiesEP7QObject @ 779 NONAME
+ _ZN20QDeclarativeListView21setHighlightMoveSpeedEf @ 780 NONAME
+ _ZN20QDeclarativeListView21setHighlightRangeModeENS_18HighlightRangeModeE @ 781 NONAME
+ _ZN20QDeclarativeListView22trackedPositionChangedEv @ 782 NONAME
+ _ZN20QDeclarativeListView23setHighlightResizeSpeedEf @ 783 NONAME
+ _ZN20QDeclarativeListView24setPreferredHighlightEndEf @ 784 NONAME
+ _ZN20QDeclarativeListView25highlightMoveSpeedChangedEv @ 785 NONAME
+ _ZN20QDeclarativeListView26setPreferredHighlightBeginEf @ 786 NONAME
+ _ZN20QDeclarativeListView27highlightResizeSpeedChangedEv @ 787 NONAME
+ _ZN20QDeclarativeListView30setHighlightFollowsCurrentItemEb @ 788 NONAME
+ _ZN20QDeclarativeListView6refillEv @ 789 NONAME
+ _ZN20QDeclarativeListView8setModelERK8QVariant @ 790 NONAME
+ _ZN20QDeclarativeListView9setFooterEP21QDeclarativeComponent @ 791 NONAME
+ _ZN20QDeclarativeListView9setHeaderEP21QDeclarativeComponent @ 792 NONAME
+ _ZN20QDeclarativeListViewC1EP16QDeclarativeItem @ 793 NONAME
+ _ZN20QDeclarativeListViewC2EP16QDeclarativeItem @ 794 NONAME
+ _ZN20QDeclarativeListViewD0Ev @ 795 NONAME
+ _ZN20QDeclarativeListViewD1Ev @ 796 NONAME
+ _ZN20QDeclarativeListViewD2Ev @ 797 NONAME
+ _ZN20QDeclarativeMetaType11isInterfaceEi @ 798 NONAME
+ _ZN20QDeclarativeMetaType12interfaceIIdEi @ 799 NONAME
+ _ZN20QDeclarativeMetaType12qmlTypeNamesEv @ 800 NONAME
+ _ZN20QDeclarativeMetaType12typeCategoryEi @ 801 NONAME
+ _ZN20QDeclarativeMetaType13defaultMethodEP7QObject @ 802 NONAME
+ _ZN20QDeclarativeMetaType13defaultMethodEPK11QMetaObject @ 803 NONAME
+ _ZN20QDeclarativeMetaType15defaultPropertyEP7QObject @ 804 NONAME
+ _ZN20QDeclarativeMetaType15defaultPropertyEPK11QMetaObject @ 805 NONAME
+ _ZN20QDeclarativeMetaType21customStringConverterEi @ 806 NONAME
+ _ZN20QDeclarativeMetaType24attachedPropertiesFuncIdEPK11QMetaObject @ 807 NONAME
+ _ZN20QDeclarativeMetaType26attachedPropertiesFuncByIdEi @ 808 NONAME
+ _ZN20QDeclarativeMetaType29registerCustomStringConverterEiPF8QVariantRK7QStringE @ 809 NONAME
+ _ZN20QDeclarativeMetaType4copyEiPvPKv @ 810 NONAME
+ _ZN20QDeclarativeMetaType6isListEi @ 811 NONAME
+ _ZN20QDeclarativeMetaType7qmlTypeEPK11QMetaObject @ 812 NONAME
+ _ZN20QDeclarativeMetaType7qmlTypeERK10QByteArrayii @ 813 NONAME
+ _ZN20QDeclarativeMetaType7qmlTypeEi @ 814 NONAME
+ _ZN20QDeclarativeMetaType8listTypeEi @ 815 NONAME
+ _ZN20QDeclarativeMetaType8qmlTypesEv @ 816 NONAME
+ _ZN20QDeclarativeMetaType9isQObjectEi @ 817 NONAME
+ _ZN20QDeclarativeMetaType9toQObjectERK8QVariantPb @ 818 NONAME
+ _ZN20QDeclarativePathLine11qt_metacallEN11QMetaObject4CallEiPPv @ 819 NONAME
+ _ZN20QDeclarativePathLine11qt_metacastEPKc @ 820 NONAME
+ _ZN20QDeclarativePathLine16staticMetaObjectE @ 821 NONAME DATA 16
+ _ZN20QDeclarativePathLine19getStaticMetaObjectEv @ 822 NONAME
+ _ZN20QDeclarativePathLine9addToPathER12QPainterPath @ 823 NONAME
+ _ZN20QDeclarativePathQuad11qt_metacallEN11QMetaObject4CallEiPPv @ 824 NONAME
+ _ZN20QDeclarativePathQuad11qt_metacastEPKc @ 825 NONAME
+ _ZN20QDeclarativePathQuad11setControlXEf @ 826 NONAME
+ _ZN20QDeclarativePathQuad11setControlYEf @ 827 NONAME
+ _ZN20QDeclarativePathQuad16staticMetaObjectE @ 828 NONAME DATA 16
+ _ZN20QDeclarativePathQuad19getStaticMetaObjectEv @ 829 NONAME
+ _ZN20QDeclarativePathQuad9addToPathER12QPainterPath @ 830 NONAME
+ _ZN20QDeclarativePathView10modelResetEv @ 831 NONAME
+ _ZN20QDeclarativePathView11createdItemEiP16QDeclarativeItem @ 832 NONAME
+ _ZN20QDeclarativePathView11qt_metacallEN11QMetaObject4CallEiPPv @ 833 NONAME
+ _ZN20QDeclarativePathView11qt_metacastEPKc @ 834 NONAME
+ _ZN20QDeclarativePathView11setDelegateEP21QDeclarativeComponent @ 835 NONAME
+ _ZN20QDeclarativePathView12itemsRemovedEii @ 836 NONAME
+ _ZN20QDeclarativePathView13itemsInsertedEii @ 837 NONAME
+ _ZN20QDeclarativePathView13offsetChangedEv @ 838 NONAME
+ _ZN20QDeclarativePathView13setDragMarginEf @ 839 NONAME
+ _ZN20QDeclarativePathView14destroyingItemEP16QDeclarativeItem @ 840 NONAME
+ _ZN20QDeclarativePathView14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 841 NONAME
+ _ZN20QDeclarativePathView14sendMouseEventEP24QGraphicsSceneMouseEvent @ 842 NONAME
+ _ZN20QDeclarativePathView15mousePressEventEP24QGraphicsSceneMouseEvent @ 843 NONAME
+ _ZN20QDeclarativePathView15setCurrentIndexEi @ 844 NONAME
+ _ZN20QDeclarativePathView15setSnapPositionEf @ 845 NONAME
+ _ZN20QDeclarativePathView16sceneEventFilterEP13QGraphicsItemP6QEvent @ 846 NONAME
+ _ZN20QDeclarativePathView16setPathItemCountEi @ 847 NONAME
+ _ZN20QDeclarativePathView16staticMetaObjectE @ 848 NONAME DATA 16
+ _ZN20QDeclarativePathView17componentCompleteEv @ 849 NONAME
+ _ZN20QDeclarativePathView17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 850 NONAME
+ _ZN20QDeclarativePathView18attachedPropertiesE @ 851 NONAME DATA 4
+ _ZN20QDeclarativePathView19currentIndexChangedEv @ 852 NONAME
+ _ZN20QDeclarativePathView19getStaticMetaObjectEv @ 853 NONAME
+ _ZN20QDeclarativePathView21qmlAttachedPropertiesEP7QObject @ 854 NONAME
+ _ZN20QDeclarativePathView6refillEv @ 855 NONAME
+ _ZN20QDeclarativePathView6tickedEv @ 856 NONAME
+ _ZN20QDeclarativePathView7setPathEP16QDeclarativePath @ 857 NONAME
+ _ZN20QDeclarativePathView8setModelERK8QVariant @ 858 NONAME
+ _ZN20QDeclarativePathView9setOffsetEf @ 859 NONAME
+ _ZN20QDeclarativePathViewC1EP16QDeclarativeItem @ 860 NONAME
+ _ZN20QDeclarativePathViewC2EP16QDeclarativeItem @ 861 NONAME
+ _ZN20QDeclarativePathViewD0Ev @ 862 NONAME
+ _ZN20QDeclarativePathViewD1Ev @ 863 NONAME
+ _ZN20QDeclarativePathViewD2Ev @ 864 NONAME
+ _ZN20QDeclarativeProperty4readEP7QObjectRK7QString @ 865 NONAME
+ _ZN20QDeclarativeProperty4readEP7QObjectRK7QStringP18QDeclarativeEngine @ 866 NONAME
+ _ZN20QDeclarativeProperty4readEP7QObjectRK7QStringP19QDeclarativeContext @ 867 NONAME
+ _ZN20QDeclarativeProperty5writeEP7QObjectRK7QStringRK8QVariant @ 868 NONAME
+ _ZN20QDeclarativeProperty5writeEP7QObjectRK7QStringRK8QVariantP18QDeclarativeEngine @ 869 NONAME
+ _ZN20QDeclarativeProperty5writeEP7QObjectRK7QStringRK8QVariantP19QDeclarativeContext @ 870 NONAME
+ _ZN20QDeclarativePropertyC1EP7QObject @ 871 NONAME
+ _ZN20QDeclarativePropertyC1EP7QObjectP18QDeclarativeEngine @ 872 NONAME
+ _ZN20QDeclarativePropertyC1EP7QObjectP19QDeclarativeContext @ 873 NONAME
+ _ZN20QDeclarativePropertyC1EP7QObjectRK7QString @ 874 NONAME
+ _ZN20QDeclarativePropertyC1EP7QObjectRK7QStringP18QDeclarativeEngine @ 875 NONAME
+ _ZN20QDeclarativePropertyC1EP7QObjectRK7QStringP19QDeclarativeContext @ 876 NONAME
+ _ZN20QDeclarativePropertyC1ERKS_ @ 877 NONAME
+ _ZN20QDeclarativePropertyC1Ev @ 878 NONAME
+ _ZN20QDeclarativePropertyC2EP7QObject @ 879 NONAME
+ _ZN20QDeclarativePropertyC2EP7QObjectP18QDeclarativeEngine @ 880 NONAME
+ _ZN20QDeclarativePropertyC2EP7QObjectP19QDeclarativeContext @ 881 NONAME
+ _ZN20QDeclarativePropertyC2EP7QObjectRK7QString @ 882 NONAME
+ _ZN20QDeclarativePropertyC2EP7QObjectRK7QStringP18QDeclarativeEngine @ 883 NONAME
+ _ZN20QDeclarativePropertyC2EP7QObjectRK7QStringP19QDeclarativeContext @ 884 NONAME
+ _ZN20QDeclarativePropertyC2ERKS_ @ 885 NONAME
+ _ZN20QDeclarativePropertyC2Ev @ 886 NONAME
+ _ZN20QDeclarativePropertyD1Ev @ 887 NONAME
+ _ZN20QDeclarativePropertyD2Ev @ 888 NONAME
+ _ZN20QDeclarativePropertyaSERKS_ @ 889 NONAME
+ _ZN20QDeclarativeRepeater10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 890 NONAME
+ _ZN20QDeclarativeRepeater10itemsMovedEiii @ 891 NONAME
+ _ZN20QDeclarativeRepeater10modelResetEv @ 892 NONAME
+ _ZN20QDeclarativeRepeater10regenerateEv @ 893 NONAME
+ _ZN20QDeclarativeRepeater11qt_metacallEN11QMetaObject4CallEiPPv @ 894 NONAME
+ _ZN20QDeclarativeRepeater11qt_metacastEPKc @ 895 NONAME
+ _ZN20QDeclarativeRepeater11setDelegateEP21QDeclarativeComponent @ 896 NONAME
+ _ZN20QDeclarativeRepeater12countChangedEv @ 897 NONAME
+ _ZN20QDeclarativeRepeater12itemsRemovedEii @ 898 NONAME
+ _ZN20QDeclarativeRepeater12modelChangedEv @ 899 NONAME
+ _ZN20QDeclarativeRepeater13itemsInsertedEii @ 900 NONAME
+ _ZN20QDeclarativeRepeater15delegateChangedEv @ 901 NONAME
+ _ZN20QDeclarativeRepeater16staticMetaObjectE @ 902 NONAME DATA 16
+ _ZN20QDeclarativeRepeater17componentCompleteEv @ 903 NONAME
+ _ZN20QDeclarativeRepeater19getStaticMetaObjectEv @ 904 NONAME
+ _ZN20QDeclarativeRepeater5clearEv @ 905 NONAME
+ _ZN20QDeclarativeRepeater8setModelERK8QVariant @ 906 NONAME
+ _ZN20QDeclarativeRepeaterC1EP16QDeclarativeItem @ 907 NONAME
+ _ZN20QDeclarativeRepeaterC2EP16QDeclarativeItem @ 908 NONAME
+ _ZN20QDeclarativeRepeaterD0Ev @ 909 NONAME
+ _ZN20QDeclarativeRepeaterD1Ev @ 910 NONAME
+ _ZN20QDeclarativeRepeaterD2Ev @ 911 NONAME
+ _ZN20QDeclarativeTextEdit10updateSizeEv @ 912 NONAME
+ _ZN20QDeclarativeTextEdit11fontChangedERK5QFont @ 913 NONAME
+ _ZN20QDeclarativeTextEdit11qt_metacallEN11QMetaObject4CallEiPPv @ 914 NONAME
+ _ZN20QDeclarativeTextEdit11qt_metacastEPKc @ 915 NONAME
+ _ZN20QDeclarativeTextEdit11setReadOnlyEb @ 916 NONAME
+ _ZN20QDeclarativeTextEdit11textChangedERK7QString @ 917 NONAME
+ _ZN20QDeclarativeTextEdit11wrapChangedEb @ 918 NONAME
+ _ZN20QDeclarativeTextEdit12colorChangedERK6QColor @ 919 NONAME
+ _ZN20QDeclarativeTextEdit12drawContentsEP8QPainterRK5QRect @ 920 NONAME
+ _ZN20QDeclarativeTextEdit12focusChangedEb @ 921 NONAME
+ _ZN20QDeclarativeTextEdit13keyPressEventEP9QKeyEvent @ 922 NONAME
+ _ZN20QDeclarativeTextEdit13q_textChangedEv @ 923 NONAME
+ _ZN20QDeclarativeTextEdit13setTextFormatENS_10TextFormatE @ 924 NONAME
+ _ZN20QDeclarativeTextEdit13setTextMarginEf @ 925 NONAME
+ _ZN20QDeclarativeTextEdit14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 926 NONAME
+ _ZN20QDeclarativeTextEdit14updateImgCacheERK6QRectF @ 927 NONAME
+ _ZN20QDeclarativeTextEdit15geometryChangedERK6QRectFS2_ @ 928 NONAME
+ _ZN20QDeclarativeTextEdit15keyReleaseEventEP9QKeyEvent @ 929 NONAME
+ _ZN20QDeclarativeTextEdit15mousePressEventEP24QGraphicsSceneMouseEvent @ 930 NONAME
+ _ZN20QDeclarativeTextEdit15readOnlyChangedEb @ 931 NONAME
+ _ZN20QDeclarativeTextEdit15setFocusOnPressEb @ 932 NONAME
+ _ZN20QDeclarativeTextEdit15setSelectionEndEi @ 933 NONAME
+ _ZN20QDeclarativeTextEdit16inputMethodEventEP17QInputMethodEvent @ 934 NONAME
+ _ZN20QDeclarativeTextEdit16selectionChangedEv @ 935 NONAME
+ _ZN20QDeclarativeTextEdit16setCursorVisibleEb @ 936 NONAME
+ _ZN20QDeclarativeTextEdit16staticMetaObjectE @ 937 NONAME DATA 16
+ _ZN20QDeclarativeTextEdit17componentCompleteEv @ 938 NONAME
+ _ZN20QDeclarativeTextEdit17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 939 NONAME
+ _ZN20QDeclarativeTextEdit17setCursorDelegateEP21QDeclarativeComponent @ 940 NONAME
+ _ZN20QDeclarativeTextEdit17setCursorPositionEi @ 941 NONAME
+ _ZN20QDeclarativeTextEdit17setSelectionColorERK6QColor @ 942 NONAME
+ _ZN20QDeclarativeTextEdit17setSelectionStartEi @ 943 NONAME
+ _ZN20QDeclarativeTextEdit17textFormatChangedENS_10TextFormatE @ 944 NONAME
+ _ZN20QDeclarativeTextEdit17textMarginChangedEf @ 945 NONAME
+ _ZN20QDeclarativeTextEdit18loadCursorDelegateEv @ 946 NONAME
+ _ZN20QDeclarativeTextEdit18moveCursorDelegateEv @ 947 NONAME
+ _ZN20QDeclarativeTextEdit19focusOnPressChangedEb @ 948 NONAME
+ _ZN20QDeclarativeTextEdit19getStaticMetaObjectEv @ 949 NONAME
+ _ZN20QDeclarativeTextEdit19selectionEndChangedEv @ 950 NONAME
+ _ZN20QDeclarativeTextEdit20cursorVisibleChangedEb @ 951 NONAME
+ _ZN20QDeclarativeTextEdit20setSelectedTextColorERK6QColor @ 952 NONAME
+ _ZN20QDeclarativeTextEdit21cursorDelegateChangedEv @ 953 NONAME
+ _ZN20QDeclarativeTextEdit21cursorPositionChangedEv @ 954 NONAME
+ _ZN20QDeclarativeTextEdit21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 955 NONAME
+ _ZN20QDeclarativeTextEdit21selectionColorChangedERK6QColor @ 956 NONAME
+ _ZN20QDeclarativeTextEdit21selectionStartChangedEv @ 957 NONAME
+ _ZN20QDeclarativeTextEdit22setPersistentSelectionEb @ 958 NONAME
+ _ZN20QDeclarativeTextEdit22updateSelectionMarkersEv @ 959 NONAME
+ _ZN20QDeclarativeTextEdit23setTextInteractionFlagsE6QFlagsIN2Qt19TextInteractionFlagEE @ 960 NONAME
+ _ZN20QDeclarativeTextEdit24selectedTextColorChangedERK6QColor @ 961 NONAME
+ _ZN20QDeclarativeTextEdit24verticalAlignmentChangedENS_10VAlignmentE @ 962 NONAME
+ _ZN20QDeclarativeTextEdit26horizontalAlignmentChangedENS_10HAlignmentE @ 963 NONAME
+ _ZN20QDeclarativeTextEdit26persistentSelectionChangedEb @ 964 NONAME
+ _ZN20QDeclarativeTextEdit5eventEP6QEvent @ 965 NONAME
+ _ZN20QDeclarativeTextEdit7setFontERK5QFont @ 966 NONAME
+ _ZN20QDeclarativeTextEdit7setTextERK7QString @ 967 NONAME
+ _ZN20QDeclarativeTextEdit7setWrapEb @ 968 NONAME
+ _ZN20QDeclarativeTextEdit8setColorERK6QColor @ 969 NONAME
+ _ZN20QDeclarativeTextEdit9selectAllEv @ 970 NONAME
+ _ZN20QDeclarativeTextEdit9setHAlignENS_10HAlignmentE @ 971 NONAME
+ _ZN20QDeclarativeTextEdit9setVAlignENS_10VAlignmentE @ 972 NONAME
+ _ZN20QDeclarativeTextEditC1EP16QDeclarativeItem @ 973 NONAME
+ _ZN20QDeclarativeTextEditC2EP16QDeclarativeItem @ 974 NONAME
+ _ZN20QMetaPropertyBuilder10setDynamicEb @ 975 NONAME
+ _ZN20QMetaPropertyBuilder11setEditableEb @ 976 NONAME
+ _ZN20QMetaPropertyBuilder11setReadableEb @ 977 NONAME
+ _ZN20QMetaPropertyBuilder11setWritableEb @ 978 NONAME
+ _ZN20QMetaPropertyBuilder12setStdCppSetEb @ 979 NONAME
+ _ZN20QMetaPropertyBuilder13setDesignableEb @ 980 NONAME
+ _ZN20QMetaPropertyBuilder13setEnumOrFlagEb @ 981 NONAME
+ _ZN20QMetaPropertyBuilder13setResettableEb @ 982 NONAME
+ _ZN20QMetaPropertyBuilder13setScriptableEb @ 983 NONAME
+ _ZN20QMetaPropertyBuilder15setNotifySignalERK18QMetaMethodBuilder @ 984 NONAME
+ _ZN20QMetaPropertyBuilder18removeNotifySignalEv @ 985 NONAME
+ _ZN20QMetaPropertyBuilder7setUserEb @ 986 NONAME
+ _ZN20QMetaPropertyBuilder9setStoredEb @ 987 NONAME
+ _ZN21QDeclarativeComponent11beginCreateEP19QDeclarativeContext @ 988 NONAME
+ _ZN21QDeclarativeComponent11qt_metacallEN11QMetaObject4CallEiPPv @ 989 NONAME
+ _ZN21QDeclarativeComponent11qt_metacastEPKc @ 990 NONAME
+ _ZN21QDeclarativeComponent12createObjectEv @ 991 NONAME
+ _ZN21QDeclarativeComponent13statusChangedENS_6StatusE @ 992 NONAME
+ _ZN21QDeclarativeComponent14completeCreateEv @ 993 NONAME
+ _ZN21QDeclarativeComponent15progressChangedEf @ 994 NONAME
+ _ZN21QDeclarativeComponent16staticMetaObjectE @ 995 NONAME DATA 16
+ _ZN21QDeclarativeComponent18setCreationContextEP19QDeclarativeContext @ 996 NONAME
+ _ZN21QDeclarativeComponent19getStaticMetaObjectEv @ 997 NONAME
+ _ZN21QDeclarativeComponent21qmlAttachedPropertiesEP7QObject @ 998 NONAME
+ _ZN21QDeclarativeComponent6createEP19QDeclarativeContext @ 999 NONAME
+ _ZN21QDeclarativeComponent7loadUrlERK4QUrl @ 1000 NONAME
+ _ZN21QDeclarativeComponent7setDataERK10QByteArrayRK4QUrl @ 1001 NONAME
+ _ZN21QDeclarativeComponentC1EP18QDeclarativeEngineP24QDeclarativeCompiledDataiiP7QObject @ 1002 NONAME
+ _ZN21QDeclarativeComponentC1EP18QDeclarativeEngineP7QObject @ 1003 NONAME
+ _ZN21QDeclarativeComponentC1EP18QDeclarativeEngineRK4QUrlP7QObject @ 1004 NONAME
+ _ZN21QDeclarativeComponentC1EP18QDeclarativeEngineRK7QStringP7QObject @ 1005 NONAME
+ _ZN21QDeclarativeComponentC1EP7QObject @ 1006 NONAME
+ _ZN21QDeclarativeComponentC1ER28QDeclarativeComponentPrivateP7QObject @ 1007 NONAME
+ _ZN21QDeclarativeComponentC2EP18QDeclarativeEngineP24QDeclarativeCompiledDataiiP7QObject @ 1008 NONAME
+ _ZN21QDeclarativeComponentC2EP18QDeclarativeEngineP7QObject @ 1009 NONAME
+ _ZN21QDeclarativeComponentC2EP18QDeclarativeEngineRK4QUrlP7QObject @ 1010 NONAME
+ _ZN21QDeclarativeComponentC2EP18QDeclarativeEngineRK7QStringP7QObject @ 1011 NONAME
+ _ZN21QDeclarativeComponentC2EP7QObject @ 1012 NONAME
+ _ZN21QDeclarativeComponentC2ER28QDeclarativeComponentPrivateP7QObject @ 1013 NONAME
+ _ZN21QDeclarativeComponentD0Ev @ 1014 NONAME
+ _ZN21QDeclarativeComponentD1Ev @ 1015 NONAME
+ _ZN21QDeclarativeComponentD2Ev @ 1016 NONAME
+ _ZN21QDeclarativeDomImportC1ERKS_ @ 1017 NONAME
+ _ZN21QDeclarativeDomImportC1Ev @ 1018 NONAME
+ _ZN21QDeclarativeDomImportC2ERKS_ @ 1019 NONAME
+ _ZN21QDeclarativeDomImportC2Ev @ 1020 NONAME
+ _ZN21QDeclarativeDomImportD1Ev @ 1021 NONAME
+ _ZN21QDeclarativeDomImportD2Ev @ 1022 NONAME
+ _ZN21QDeclarativeDomImportaSERKS_ @ 1023 NONAME
+ _ZN21QDeclarativeDomObjectC1ERKS_ @ 1024 NONAME
+ _ZN21QDeclarativeDomObjectC1Ev @ 1025 NONAME
+ _ZN21QDeclarativeDomObjectC2ERKS_ @ 1026 NONAME
+ _ZN21QDeclarativeDomObjectC2Ev @ 1027 NONAME
+ _ZN21QDeclarativeDomObjectD1Ev @ 1028 NONAME
+ _ZN21QDeclarativeDomObjectD2Ev @ 1029 NONAME
+ _ZN21QDeclarativeDomObjectaSERKS_ @ 1030 NONAME
+ _ZN21QDeclarativeFlickable10flickEndedEv @ 1031 NONAME
+ _ZN21QDeclarativeFlickable10timerEventEP11QTimerEvent @ 1032 NONAME
+ _ZN21QDeclarativeFlickable10wheelEventEP24QGraphicsSceneWheelEvent @ 1033 NONAME
+ _ZN21QDeclarativeFlickable11cancelFlickEv @ 1034 NONAME
+ _ZN21QDeclarativeFlickable11pageChangedEv @ 1035 NONAME
+ _ZN21QDeclarativeFlickable11qt_metacallEN11QMetaObject4CallEiPPv @ 1036 NONAME
+ _ZN21QDeclarativeFlickable11qt_metacastEPKc @ 1037 NONAME
+ _ZN21QDeclarativeFlickable11setContentXEf @ 1038 NONAME
+ _ZN21QDeclarativeFlickable11setContentYEf @ 1039 NONAME
+ _ZN21QDeclarativeFlickable11visibleAreaEv @ 1040 NONAME
+ _ZN21QDeclarativeFlickable11widthChangeEv @ 1041 NONAME
+ _ZN21QDeclarativeFlickable12flickStartedEv @ 1042 NONAME
+ _ZN21QDeclarativeFlickable12heightChangeEv @ 1043 NONAME
+ _ZN21QDeclarativeFlickable12setOverShootEb @ 1044 NONAME
+ _ZN21QDeclarativeFlickable13flickableDataEv @ 1045 NONAME
+ _ZN21QDeclarativeFlickable13movementEndedEv @ 1046 NONAME
+ _ZN21QDeclarativeFlickable13movingChangedEv @ 1047 NONAME
+ _ZN21QDeclarativeFlickable13setPressDelayEi @ 1048 NONAME
+ _ZN21QDeclarativeFlickable13viewportMovedEv @ 1049 NONAME
+ _ZN21QDeclarativeFlickable14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 1050 NONAME
+ _ZN21QDeclarativeFlickable14movementEndingEv @ 1051 NONAME
+ _ZN21QDeclarativeFlickable14sendMouseEventEP24QGraphicsSceneMouseEvent @ 1052 NONAME
+ _ZN21QDeclarativeFlickable14setInteractiveEb @ 1053 NONAME
+ _ZN21QDeclarativeFlickable15contentXChangedEv @ 1054 NONAME
+ _ZN21QDeclarativeFlickable15contentYChangedEv @ 1055 NONAME
+ _ZN21QDeclarativeFlickable15flickingChangedEv @ 1056 NONAME
+ _ZN21QDeclarativeFlickable15mousePressEventEP24QGraphicsSceneMouseEvent @ 1057 NONAME
+ _ZN21QDeclarativeFlickable15movementStartedEv @ 1058 NONAME
+ _ZN21QDeclarativeFlickable15setContentWidthEf @ 1059 NONAME
+ _ZN21QDeclarativeFlickable16movementStartingEv @ 1060 NONAME
+ _ZN21QDeclarativeFlickable16overShootChangedEv @ 1061 NONAME
+ _ZN21QDeclarativeFlickable16sceneEventFilterEP13QGraphicsItemP6QEvent @ 1062 NONAME
+ _ZN21QDeclarativeFlickable16setContentHeightEf @ 1063 NONAME
+ _ZN21QDeclarativeFlickable16staticMetaObjectE @ 1064 NONAME DATA 16
+ _ZN21QDeclarativeFlickable17flickableChildrenEv @ 1065 NONAME
+ _ZN21QDeclarativeFlickable17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 1066 NONAME
+ _ZN21QDeclarativeFlickable17pressDelayChangedEv @ 1067 NONAME
+ _ZN21QDeclarativeFlickable17setFlickDirectionENS_14FlickDirectionE @ 1068 NONAME
+ _ZN21QDeclarativeFlickable18interactiveChangedEv @ 1069 NONAME
+ _ZN21QDeclarativeFlickable19contentWidthChangedEv @ 1070 NONAME
+ _ZN21QDeclarativeFlickable19getStaticMetaObjectEv @ 1071 NONAME
+ _ZN21QDeclarativeFlickable19isAtBoundaryChangedEv @ 1072 NONAME
+ _ZN21QDeclarativeFlickable20contentHeightChangedEv @ 1073 NONAME
+ _ZN21QDeclarativeFlickable20setFlickDecelerationEf @ 1074 NONAME
+ _ZN21QDeclarativeFlickable21flickDirectionChangedEv @ 1075 NONAME
+ _ZN21QDeclarativeFlickable23setMaximumFlickVelocityEf @ 1076 NONAME
+ _ZN21QDeclarativeFlickable23verticalVelocityChangedEv @ 1077 NONAME
+ _ZN21QDeclarativeFlickable24flickDecelerationChangedEv @ 1078 NONAME
+ _ZN21QDeclarativeFlickable25horizontalVelocityChangedEv @ 1079 NONAME
+ _ZN21QDeclarativeFlickable27maximumFlickVelocityChangedEv @ 1080 NONAME
+ _ZN21QDeclarativeFlickable6tickedEv @ 1081 NONAME
+ _ZN21QDeclarativeFlickable8viewportEv @ 1082 NONAME
+ _ZN21QDeclarativeFlickableC1EP16QDeclarativeItem @ 1083 NONAME
+ _ZN21QDeclarativeFlickableC1ER28QDeclarativeFlickablePrivateP16QDeclarativeItem @ 1084 NONAME
+ _ZN21QDeclarativeFlickableC2EP16QDeclarativeItem @ 1085 NONAME
+ _ZN21QDeclarativeFlickableC2ER28QDeclarativeFlickablePrivateP16QDeclarativeItem @ 1086 NONAME
+ _ZN21QDeclarativeFlickableD0Ev @ 1087 NONAME
+ _ZN21QDeclarativeFlickableD1Ev @ 1088 NONAME
+ _ZN21QDeclarativeFlickableD2Ev @ 1089 NONAME
+ _ZN21QDeclarativeImageBase11qt_metacallEN11QMetaObject4CallEiPPv @ 1090 NONAME
+ _ZN21QDeclarativeImageBase11qt_metacastEPKc @ 1091 NONAME
+ _ZN21QDeclarativeImageBase13pixmapChangedEv @ 1092 NONAME
+ _ZN21QDeclarativeImageBase13sourceChangedERK4QUrl @ 1093 NONAME
+ _ZN21QDeclarativeImageBase13statusChangedENS_6StatusE @ 1094 NONAME
+ _ZN21QDeclarativeImageBase15progressChangedEf @ 1095 NONAME
+ _ZN21QDeclarativeImageBase15requestFinishedEv @ 1096 NONAME
+ _ZN21QDeclarativeImageBase15requestProgressExx @ 1097 NONAME
+ _ZN21QDeclarativeImageBase15setAsynchronousEb @ 1098 NONAME
+ _ZN21QDeclarativeImageBase16staticMetaObjectE @ 1099 NONAME DATA 16
+ _ZN21QDeclarativeImageBase17componentCompleteEv @ 1100 NONAME
+ _ZN21QDeclarativeImageBase19asynchronousChangedEv @ 1101 NONAME
+ _ZN21QDeclarativeImageBase19getStaticMetaObjectEv @ 1102 NONAME
+ _ZN21QDeclarativeImageBase4loadEv @ 1103 NONAME
+ _ZN21QDeclarativeImageBase9setSourceERK4QUrl @ 1104 NONAME
+ _ZN21QDeclarativeImageBaseC1ER28QDeclarativeImageBasePrivateP16QDeclarativeItem @ 1105 NONAME
+ _ZN21QDeclarativeImageBaseC2ER28QDeclarativeImageBasePrivateP16QDeclarativeItem @ 1106 NONAME
+ _ZN21QDeclarativeImageBaseD0Ev @ 1107 NONAME
+ _ZN21QDeclarativeImageBaseD1Ev @ 1108 NONAME
+ _ZN21QDeclarativeImageBaseD2Ev @ 1109 NONAME
+ _ZN21QDeclarativeListModel11qt_metacallEN11QMetaObject4CallEiPPv @ 1110 NONAME
+ _ZN21QDeclarativeListModel11qt_metacastEPKc @ 1111 NONAME
+ _ZN21QDeclarativeListModel11setPropertyEiRK7QStringRK8QVariant @ 1112 NONAME
+ _ZN21QDeclarativeListModel12countChangedEi @ 1113 NONAME
+ _ZN21QDeclarativeListModel16staticMetaObjectE @ 1114 NONAME DATA 16
+ _ZN21QDeclarativeListModel19getStaticMetaObjectEv @ 1115 NONAME
+ _ZN21QDeclarativeListModel3setEiRK12QScriptValue @ 1116 NONAME
+ _ZN21QDeclarativeListModel4moveEiii @ 1117 NONAME
+ _ZN21QDeclarativeListModel5clearEv @ 1118 NONAME
+ _ZN21QDeclarativeListModel6appendERK12QScriptValue @ 1119 NONAME
+ _ZN21QDeclarativeListModel6insertEiRK12QScriptValue @ 1120 NONAME
+ _ZN21QDeclarativeListModel6removeEi @ 1121 NONAME
+ _ZN21QDeclarativeListModelC1EP7QObject @ 1122 NONAME
+ _ZN21QDeclarativeListModelC2EP7QObject @ 1123 NONAME
+ _ZN21QDeclarativeListModelD0Ev @ 1124 NONAME
+ _ZN21QDeclarativeListModelD1Ev @ 1125 NONAME
+ _ZN21QDeclarativeListModelD2Ev @ 1126 NONAME
+ _ZN21QDeclarativeMouseArea10sceneEventEP6QEvent @ 1127 NONAME
+ _ZN21QDeclarativeMouseArea10setEnabledEb @ 1128 NONAME
+ _ZN21QDeclarativeMouseArea10setHoveredEb @ 1129 NONAME
+ _ZN21QDeclarativeMouseArea10setPressedEb @ 1130 NONAME
+ _ZN21QDeclarativeMouseArea10timerEventEP11QTimerEvent @ 1131 NONAME
+ _ZN21QDeclarativeMouseArea11qt_metacallEN11QMetaObject4CallEiPPv @ 1132 NONAME
+ _ZN21QDeclarativeMouseArea11qt_metacastEPKc @ 1133 NONAME
+ _ZN21QDeclarativeMouseArea12pressAndHoldEP22QDeclarativeMouseEvent @ 1134 NONAME
+ _ZN21QDeclarativeMouseArea13doubleClickedEP22QDeclarativeMouseEvent @ 1135 NONAME
+ _ZN21QDeclarativeMouseArea14enabledChangedEv @ 1136 NONAME
+ _ZN21QDeclarativeMouseArea14hoverMoveEventEP24QGraphicsSceneHoverEvent @ 1137 NONAME
+ _ZN21QDeclarativeMouseArea14hoveredChangedEv @ 1138 NONAME
+ _ZN21QDeclarativeMouseArea14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 1139 NONAME
+ _ZN21QDeclarativeMouseArea14pressedChangedEv @ 1140 NONAME
+ _ZN21QDeclarativeMouseArea15hoverEnterEventEP24QGraphicsSceneHoverEvent @ 1141 NONAME
+ _ZN21QDeclarativeMouseArea15hoverLeaveEventEP24QGraphicsSceneHoverEvent @ 1142 NONAME
+ _ZN21QDeclarativeMouseArea15mousePressEventEP24QGraphicsSceneMouseEvent @ 1143 NONAME
+ _ZN21QDeclarativeMouseArea15positionChangedEP22QDeclarativeMouseEvent @ 1144 NONAME
+ _ZN21QDeclarativeMouseArea16staticMetaObjectE @ 1145 NONAME DATA 16
+ _ZN21QDeclarativeMouseArea17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 1146 NONAME
+ _ZN21QDeclarativeMouseArea18setAcceptedButtonsE6QFlagsIN2Qt11MouseButtonEE @ 1147 NONAME
+ _ZN21QDeclarativeMouseArea19getStaticMetaObjectEv @ 1148 NONAME
+ _ZN21QDeclarativeMouseArea21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 1149 NONAME
+ _ZN21QDeclarativeMouseArea22acceptedButtonsChangedEv @ 1150 NONAME
+ _ZN21QDeclarativeMouseArea4dragEv @ 1151 NONAME
+ _ZN21QDeclarativeMouseArea6exitedEv @ 1152 NONAME
+ _ZN21QDeclarativeMouseArea7clickedEP22QDeclarativeMouseEvent @ 1153 NONAME
+ _ZN21QDeclarativeMouseArea7enteredEv @ 1154 NONAME
+ _ZN21QDeclarativeMouseArea7pressedEP22QDeclarativeMouseEvent @ 1155 NONAME
+ _ZN21QDeclarativeMouseArea8releasedEP22QDeclarativeMouseEvent @ 1156 NONAME
+ _ZN21QDeclarativeMouseAreaC1EP16QDeclarativeItem @ 1157 NONAME
+ _ZN21QDeclarativeMouseAreaC2EP16QDeclarativeItem @ 1158 NONAME
+ _ZN21QDeclarativeMouseAreaD0Ev @ 1159 NONAME
+ _ZN21QDeclarativeMouseAreaD1Ev @ 1160 NONAME
+ _ZN21QDeclarativeMouseAreaD2Ev @ 1161 NONAME
+ _ZN21QDeclarativeParticles11imageLoadedEv @ 1162 NONAME
+ _ZN21QDeclarativeParticles11qt_metacallEN11QMetaObject4CallEiPPv @ 1163 NONAME
+ _ZN21QDeclarativeParticles11qt_metacastEPKc @ 1164 NONAME
+ _ZN21QDeclarativeParticles11setLifeSpanEi @ 1165 NONAME
+ _ZN21QDeclarativeParticles11setVelocityEf @ 1166 NONAME
+ _ZN21QDeclarativeParticles12angleChangedEv @ 1167 NONAME
+ _ZN21QDeclarativeParticles12countChangedEv @ 1168 NONAME
+ _ZN21QDeclarativeParticles13motionChangedEv @ 1169 NONAME
+ _ZN21QDeclarativeParticles13sourceChangedEv @ 1170 NONAME
+ _ZN21QDeclarativeParticles15emittingChangedEv @ 1171 NONAME
+ _ZN21QDeclarativeParticles15lifeSpanChangedEv @ 1172 NONAME
+ _ZN21QDeclarativeParticles15setEmissionRateEi @ 1173 NONAME
+ _ZN21QDeclarativeParticles15velocityChangedEv @ 1174 NONAME
+ _ZN21QDeclarativeParticles16staticMetaObjectE @ 1175 NONAME DATA 16
+ _ZN21QDeclarativeParticles17componentCompleteEv @ 1176 NONAME
+ _ZN21QDeclarativeParticles17setAngleDeviationEf @ 1177 NONAME
+ _ZN21QDeclarativeParticles17setFadeInDurationEi @ 1178 NONAME
+ _ZN21QDeclarativeParticles18setFadeOutDurationEi @ 1179 NONAME
+ _ZN21QDeclarativeParticles19emissionRateChangedEv @ 1180 NONAME
+ _ZN21QDeclarativeParticles19getStaticMetaObjectEv @ 1181 NONAME
+ _ZN21QDeclarativeParticles19setEmissionVarianceEf @ 1182 NONAME
+ _ZN21QDeclarativeParticles20setLifeSpanDeviationEi @ 1183 NONAME
+ _ZN21QDeclarativeParticles20setVelocityDeviationEf @ 1184 NONAME
+ _ZN21QDeclarativeParticles21angleDeviationChangedEv @ 1185 NONAME
+ _ZN21QDeclarativeParticles21fadeInDurationChangedEv @ 1186 NONAME
+ _ZN21QDeclarativeParticles22fadeOutDurationChangedEv @ 1187 NONAME
+ _ZN21QDeclarativeParticles23emissionVarianceChangedEv @ 1188 NONAME
+ _ZN21QDeclarativeParticles24lifeSpanDeviationChangedEv @ 1189 NONAME
+ _ZN21QDeclarativeParticles24velocityDeviationChangedEv @ 1190 NONAME
+ _ZN21QDeclarativeParticles5burstEii @ 1191 NONAME
+ _ZN21QDeclarativeParticles5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 1192 NONAME
+ _ZN21QDeclarativeParticles8setAngleEf @ 1193 NONAME
+ _ZN21QDeclarativeParticles8setCountEi @ 1194 NONAME
+ _ZN21QDeclarativeParticles9setMotionEP26QDeclarativeParticleMotion @ 1195 NONAME
+ _ZN21QDeclarativeParticles9setSourceERK4QUrl @ 1196 NONAME
+ _ZN21QDeclarativeParticlesC1EP16QDeclarativeItem @ 1197 NONAME
+ _ZN21QDeclarativeParticlesC2EP16QDeclarativeItem @ 1198 NONAME
+ _ZN21QDeclarativeParticlesD0Ev @ 1199 NONAME
+ _ZN21QDeclarativeParticlesD1Ev @ 1200 NONAME
+ _ZN21QDeclarativeParticlesD2Ev @ 1201 NONAME
+ _ZN21QDeclarativePathCubic11qt_metacallEN11QMetaObject4CallEiPPv @ 1202 NONAME
+ _ZN21QDeclarativePathCubic11qt_metacastEPKc @ 1203 NONAME
+ _ZN21QDeclarativePathCubic12setControl1XEf @ 1204 NONAME
+ _ZN21QDeclarativePathCubic12setControl1YEf @ 1205 NONAME
+ _ZN21QDeclarativePathCubic12setControl2XEf @ 1206 NONAME
+ _ZN21QDeclarativePathCubic12setControl2YEf @ 1207 NONAME
+ _ZN21QDeclarativePathCubic16staticMetaObjectE @ 1208 NONAME DATA 16
+ _ZN21QDeclarativePathCubic19getStaticMetaObjectEv @ 1209 NONAME
+ _ZN21QDeclarativePathCubic9addToPathER12QPainterPath @ 1210 NONAME
+ _ZN21QDeclarativeRectangle11qt_metacallEN11QMetaObject4CallEiPPv @ 1211 NONAME
+ _ZN21QDeclarativeRectangle11qt_metacastEPKc @ 1212 NONAME
+ _ZN21QDeclarativeRectangle11setGradientEP20QDeclarativeGradient @ 1213 NONAME
+ _ZN21QDeclarativeRectangle12colorChangedEv @ 1214 NONAME
+ _ZN21QDeclarativeRectangle13radiusChangedEv @ 1215 NONAME
+ _ZN21QDeclarativeRectangle16staticMetaObjectE @ 1216 NONAME DATA 16
+ _ZN21QDeclarativeRectangle19generateRoundedRectEv @ 1217 NONAME
+ _ZN21QDeclarativeRectangle19getStaticMetaObjectEv @ 1218 NONAME
+ _ZN21QDeclarativeRectangle20generateBorderedRectEv @ 1219 NONAME
+ _ZN21QDeclarativeRectangle5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 1220 NONAME
+ _ZN21QDeclarativeRectangle6borderEv @ 1221 NONAME
+ _ZN21QDeclarativeRectangle8doUpdateEv @ 1222 NONAME
+ _ZN21QDeclarativeRectangle8drawRectER8QPainter @ 1223 NONAME
+ _ZN21QDeclarativeRectangle8setColorERK6QColor @ 1224 NONAME
+ _ZN21QDeclarativeRectangle9setRadiusEf @ 1225 NONAME
+ _ZN21QDeclarativeRectangleC1EP16QDeclarativeItem @ 1226 NONAME
+ _ZN21QDeclarativeRectangleC2EP16QDeclarativeItem @ 1227 NONAME
+ _ZN21QDeclarativeScaleGrid11qt_metacallEN11QMetaObject4CallEiPPv @ 1228 NONAME
+ _ZN21QDeclarativeScaleGrid11qt_metacastEPKc @ 1229 NONAME
+ _ZN21QDeclarativeScaleGrid13borderChangedEv @ 1230 NONAME
+ _ZN21QDeclarativeScaleGrid16staticMetaObjectE @ 1231 NONAME DATA 16
+ _ZN21QDeclarativeScaleGrid19getStaticMetaObjectEv @ 1232 NONAME
+ _ZN21QDeclarativeScaleGrid6setTopEi @ 1233 NONAME
+ _ZN21QDeclarativeScaleGrid7setLeftEi @ 1234 NONAME
+ _ZN21QDeclarativeScaleGrid8setRightEi @ 1235 NONAME
+ _ZN21QDeclarativeScaleGrid9setBottomEi @ 1236 NONAME
+ _ZN21QDeclarativeScaleGridC1EP7QObject @ 1237 NONAME
+ _ZN21QDeclarativeScaleGridC2EP7QObject @ 1238 NONAME
+ _ZN21QDeclarativeScaleGridD0Ev @ 1239 NONAME
+ _ZN21QDeclarativeScaleGridD1Ev @ 1240 NONAME
+ _ZN21QDeclarativeScaleGridD2Ev @ 1241 NONAME
+ _ZN21QDeclarativeTextInput10moveCursorEv @ 1242 NONAME
+ _ZN21QDeclarativeTextInput10updateRectERK5QRect @ 1243 NONAME
+ _ZN21QDeclarativeTextInput10updateSizeEb @ 1244 NONAME
+ _ZN21QDeclarativeTextInput11fontChangedERK5QFont @ 1245 NONAME
+ _ZN21QDeclarativeTextInput11qt_metacallEN11QMetaObject4CallEiPPv @ 1246 NONAME
+ _ZN21QDeclarativeTextInput11qt_metacastEPKc @ 1247 NONAME
+ _ZN21QDeclarativeTextInput11setEchoModeENS_8EchoModeE @ 1248 NONAME
+ _ZN21QDeclarativeTextInput11setReadOnlyEb @ 1249 NONAME
+ _ZN21QDeclarativeTextInput11textChangedEv @ 1250 NONAME
+ _ZN21QDeclarativeTextInput12colorChangedERK6QColor @ 1251 NONAME
+ _ZN21QDeclarativeTextInput12createCursorEv @ 1252 NONAME
+ _ZN21QDeclarativeTextInput12drawContentsEP8QPainterRK5QRect @ 1253 NONAME
+ _ZN21QDeclarativeTextInput12focusChangedEb @ 1254 NONAME
+ _ZN21QDeclarativeTextInput12setInputMaskERK7QString @ 1255 NONAME
+ _ZN21QDeclarativeTextInput12setMaxLengthEi @ 1256 NONAME
+ _ZN21QDeclarativeTextInput12setValidatorEP10QValidator @ 1257 NONAME
+ _ZN21QDeclarativeTextInput13keyPressEventEP9QKeyEvent @ 1258 NONAME
+ _ZN21QDeclarativeTextInput13q_textChangedEv @ 1259 NONAME
+ _ZN21QDeclarativeTextInput15echoModeChangedENS_8EchoModeE @ 1260 NONAME
+ _ZN21QDeclarativeTextInput15geometryChangedERK6QRectFS2_ @ 1261 NONAME
+ _ZN21QDeclarativeTextInput15mousePressEventEP24QGraphicsSceneMouseEvent @ 1262 NONAME
+ _ZN21QDeclarativeTextInput15readOnlyChangedEb @ 1263 NONAME
+ _ZN21QDeclarativeTextInput15setFocusOnPressEb @ 1264 NONAME
+ _ZN21QDeclarativeTextInput15setSelectionEndEi @ 1265 NONAME
+ _ZN21QDeclarativeTextInput16cursorPosChangedEv @ 1266 NONAME
+ _ZN21QDeclarativeTextInput16inputMaskChangedERK7QString @ 1267 NONAME
+ _ZN21QDeclarativeTextInput16selectionChangedEv @ 1268 NONAME
+ _ZN21QDeclarativeTextInput16setCursorVisibleEb @ 1269 NONAME
+ _ZN21QDeclarativeTextInput16staticMetaObjectE @ 1270 NONAME DATA 16
+ _ZN21QDeclarativeTextInput16validatorChangedEv @ 1271 NONAME
+ _ZN21QDeclarativeTextInput17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 1272 NONAME
+ _ZN21QDeclarativeTextInput17setCursorDelegateEP21QDeclarativeComponent @ 1273 NONAME
+ _ZN21QDeclarativeTextInput17setCursorPositionEi @ 1274 NONAME
+ _ZN21QDeclarativeTextInput17setSelectionColorERK6QColor @ 1275 NONAME
+ _ZN21QDeclarativeTextInput17setSelectionStartEi @ 1276 NONAME
+ _ZN21QDeclarativeTextInput19focusOnPressChangedEb @ 1277 NONAME
+ _ZN21QDeclarativeTextInput19getStaticMetaObjectEv @ 1278 NONAME
+ _ZN21QDeclarativeTextInput19selectedTextChangedEv @ 1279 NONAME
+ _ZN21QDeclarativeTextInput19selectionEndChangedEv @ 1280 NONAME
+ _ZN21QDeclarativeTextInput20cursorVisibleChangedEb @ 1281 NONAME
+ _ZN21QDeclarativeTextInput20maximumLengthChangedEi @ 1282 NONAME
+ _ZN21QDeclarativeTextInput20setSelectedTextColorERK6QColor @ 1283 NONAME
+ _ZN21QDeclarativeTextInput21cursorDelegateChangedEv @ 1284 NONAME
+ _ZN21QDeclarativeTextInput21cursorPositionChangedEv @ 1285 NONAME
+ _ZN21QDeclarativeTextInput21selectionColorChangedERK6QColor @ 1286 NONAME
+ _ZN21QDeclarativeTextInput21selectionStartChangedEv @ 1287 NONAME
+ _ZN21QDeclarativeTextInput22acceptableInputChangedEv @ 1288 NONAME
+ _ZN21QDeclarativeTextInput24selectedTextColorChangedERK6QColor @ 1289 NONAME
+ _ZN21QDeclarativeTextInput26horizontalAlignmentChangedENS_10HAlignmentE @ 1290 NONAME
+ _ZN21QDeclarativeTextInput5eventEP6QEvent @ 1291 NONAME
+ _ZN21QDeclarativeTextInput6xToPosEi @ 1292 NONAME
+ _ZN21QDeclarativeTextInput7setFontERK5QFont @ 1293 NONAME
+ _ZN21QDeclarativeTextInput7setTextERK7QString @ 1294 NONAME
+ _ZN21QDeclarativeTextInput8acceptedEv @ 1295 NONAME
+ _ZN21QDeclarativeTextInput8setColorERK6QColor @ 1296 NONAME
+ _ZN21QDeclarativeTextInput9selectAllEv @ 1297 NONAME
+ _ZN21QDeclarativeTextInput9setHAlignENS_10HAlignmentE @ 1298 NONAME
+ _ZN21QDeclarativeTextInputC1EP16QDeclarativeItem @ 1299 NONAME
+ _ZN21QDeclarativeTextInputC2EP16QDeclarativeItem @ 1300 NONAME
+ _ZN21QDeclarativeTextInputD0Ev @ 1301 NONAME
+ _ZN21QDeclarativeTextInputD1Ev @ 1302 NONAME
+ _ZN21QDeclarativeTextInputD2Ev @ 1303 NONAME
+ _ZN21QDeclarativeValueType11qt_metacallEN11QMetaObject4CallEiPPv @ 1304 NONAME
+ _ZN21QDeclarativeValueType11qt_metacastEPKc @ 1305 NONAME
+ _ZN21QDeclarativeValueType16staticMetaObjectE @ 1306 NONAME DATA 16
+ _ZN21QDeclarativeValueType19getStaticMetaObjectEv @ 1307 NONAME
+ _ZN21QDeclarativeValueTypeC2EP7QObject @ 1308 NONAME
+ _ZN22QDeclarativeDebugQuery11qt_metacallEN11QMetaObject4CallEiPPv @ 1309 NONAME
+ _ZN22QDeclarativeDebugQuery11qt_metacastEPKc @ 1310 NONAME
+ _ZN22QDeclarativeDebugQuery12stateChangedENS_5StateE @ 1311 NONAME
+ _ZN22QDeclarativeDebugQuery16staticMetaObjectE @ 1312 NONAME DATA 16
+ _ZN22QDeclarativeDebugQuery19getStaticMetaObjectEv @ 1313 NONAME
+ _ZN22QDeclarativeDebugQuery8setStateENS_5StateE @ 1314 NONAME
+ _ZN22QDeclarativeDebugQueryC1EP7QObject @ 1315 NONAME
+ _ZN22QDeclarativeDebugQueryC2EP7QObject @ 1316 NONAME
+ _ZN22QDeclarativeDebugWatch11qt_metacallEN11QMetaObject4CallEiPPv @ 1317 NONAME
+ _ZN22QDeclarativeDebugWatch11qt_metacastEPKc @ 1318 NONAME
+ _ZN22QDeclarativeDebugWatch12stateChangedENS_5StateE @ 1319 NONAME
+ _ZN22QDeclarativeDebugWatch12valueChangedERK10QByteArrayRK8QVariant @ 1320 NONAME
+ _ZN22QDeclarativeDebugWatch16staticMetaObjectE @ 1321 NONAME DATA 16
+ _ZN22QDeclarativeDebugWatch19getStaticMetaObjectEv @ 1322 NONAME
+ _ZN22QDeclarativeDebugWatch8setStateENS_5StateE @ 1323 NONAME
+ _ZN22QDeclarativeDebugWatchC1EP7QObject @ 1324 NONAME
+ _ZN22QDeclarativeDebugWatchC2EP7QObject @ 1325 NONAME
+ _ZN22QDeclarativeDebugWatchD0Ev @ 1326 NONAME
+ _ZN22QDeclarativeDebugWatchD1Ev @ 1327 NONAME
+ _ZN22QDeclarativeDebugWatchD2Ev @ 1328 NONAME
+ _ZN22QDeclarativeEaseFollow10setEnabledEb @ 1329 NONAME
+ _ZN22QDeclarativeEaseFollow11qt_metacallEN11QMetaObject4CallEiPPv @ 1330 NONAME
+ _ZN22QDeclarativeEaseFollow11qt_metacastEPKc @ 1331 NONAME
+ _ZN22QDeclarativeEaseFollow11setDurationEf @ 1332 NONAME
+ _ZN22QDeclarativeEaseFollow11setVelocityEf @ 1333 NONAME
+ _ZN22QDeclarativeEaseFollow13sourceChangedEv @ 1334 NONAME
+ _ZN22QDeclarativeEaseFollow14enabledChangedEv @ 1335 NONAME
+ _ZN22QDeclarativeEaseFollow14setSourceValueEf @ 1336 NONAME
+ _ZN22QDeclarativeEaseFollow15durationChangedEv @ 1337 NONAME
+ _ZN22QDeclarativeEaseFollow15velocityChangedEv @ 1338 NONAME
+ _ZN22QDeclarativeEaseFollow16setReversingModeENS_13ReversingModeE @ 1339 NONAME
+ _ZN22QDeclarativeEaseFollow16staticMetaObjectE @ 1340 NONAME DATA 16
+ _ZN22QDeclarativeEaseFollow19getStaticMetaObjectEv @ 1341 NONAME
+ _ZN22QDeclarativeEaseFollow20reversingModeChangedEv @ 1342 NONAME
+ _ZN22QDeclarativeEaseFollow20setMaximumEasingTimeEf @ 1343 NONAME
+ _ZN22QDeclarativeEaseFollow24maximumEasingTimeChangedEv @ 1344 NONAME
+ _ZN22QDeclarativeEaseFollow9setTargetERK20QDeclarativeProperty @ 1345 NONAME
+ _ZN22QDeclarativeEaseFollowC1EP7QObject @ 1346 NONAME
+ _ZN22QDeclarativeEaseFollowC2EP7QObject @ 1347 NONAME
+ _ZN22QDeclarativeEaseFollowD0Ev @ 1348 NONAME
+ _ZN22QDeclarativeEaseFollowD1Ev @ 1349 NONAME
+ _ZN22QDeclarativeEaseFollowD2Ev @ 1350 NONAME
+ _ZN22QDeclarativeExpression10__q_notifyEv @ 1351 NONAME
+ _ZN22QDeclarativeExpression10clearErrorEv @ 1352 NONAME
+ _ZN22QDeclarativeExpression11qt_metacallEN11QMetaObject4CallEiPPv @ 1353 NONAME
+ _ZN22QDeclarativeExpression11qt_metacastEPKc @ 1354 NONAME
+ _ZN22QDeclarativeExpression12valueChangedEv @ 1355 NONAME
+ _ZN22QDeclarativeExpression13setExpressionERK7QString @ 1356 NONAME
+ _ZN22QDeclarativeExpression16staticMetaObjectE @ 1357 NONAME DATA 16
+ _ZN22QDeclarativeExpression17setSourceLocationERK7QStringi @ 1358 NONAME
+ _ZN22QDeclarativeExpression19getStaticMetaObjectEv @ 1359 NONAME
+ _ZN22QDeclarativeExpression23setNotifyOnValueChangedEb @ 1360 NONAME
+ _ZN22QDeclarativeExpression5valueEPb @ 1361 NONAME
+ _ZN22QDeclarativeExpressionC1EP19QDeclarativeContextPvP20QDeclarativeRefCountP7QObjectRK7QStringiR29QDeclarativeExpressionPrivate @ 1362 NONAME
+ _ZN22QDeclarativeExpressionC1EP19QDeclarativeContextRK7QStringP7QObject @ 1363 NONAME
+ _ZN22QDeclarativeExpressionC1EP19QDeclarativeContextRK7QStringP7QObjectR29QDeclarativeExpressionPrivate @ 1364 NONAME
+ _ZN22QDeclarativeExpressionC1Ev @ 1365 NONAME
+ _ZN22QDeclarativeExpressionC2EP19QDeclarativeContextPvP20QDeclarativeRefCountP7QObjectRK7QStringiR29QDeclarativeExpressionPrivate @ 1366 NONAME
+ _ZN22QDeclarativeExpressionC2EP19QDeclarativeContextRK7QStringP7QObject @ 1367 NONAME
+ _ZN22QDeclarativeExpressionC2EP19QDeclarativeContextRK7QStringP7QObjectR29QDeclarativeExpressionPrivate @ 1368 NONAME
+ _ZN22QDeclarativeExpressionC2Ev @ 1369 NONAME
+ _ZN22QDeclarativeExpressionD0Ev @ 1370 NONAME
+ _ZN22QDeclarativeExpressionD1Ev @ 1371 NONAME
+ _ZN22QDeclarativeExpressionD2Ev @ 1372 NONAME
+ _ZN22QDeclarativeFocusPanel10sceneEventEP6QEvent @ 1373 NONAME
+ _ZN22QDeclarativeFocusPanel11qt_metacallEN11QMetaObject4CallEiPPv @ 1374 NONAME
+ _ZN22QDeclarativeFocusPanel11qt_metacastEPKc @ 1375 NONAME
+ _ZN22QDeclarativeFocusPanel13activeChangedEv @ 1376 NONAME
+ _ZN22QDeclarativeFocusPanel16staticMetaObjectE @ 1377 NONAME DATA 16
+ _ZN22QDeclarativeFocusPanel19getStaticMetaObjectEv @ 1378 NONAME
+ _ZN22QDeclarativeFocusPanelC1EP16QDeclarativeItem @ 1379 NONAME
+ _ZN22QDeclarativeFocusPanelC2EP16QDeclarativeItem @ 1380 NONAME
+ _ZN22QDeclarativeFocusPanelD0Ev @ 1381 NONAME
+ _ZN22QDeclarativeFocusPanelD1Ev @ 1382 NONAME
+ _ZN22QDeclarativeFocusPanelD2Ev @ 1383 NONAME
+ _ZN22QDeclarativeFocusScope11qt_metacallEN11QMetaObject4CallEiPPv @ 1384 NONAME
+ _ZN22QDeclarativeFocusScope11qt_metacastEPKc @ 1385 NONAME
+ _ZN22QDeclarativeFocusScope16staticMetaObjectE @ 1386 NONAME DATA 16
+ _ZN22QDeclarativeFocusScope19getStaticMetaObjectEv @ 1387 NONAME
+ _ZN22QDeclarativeFocusScopeC1EP16QDeclarativeItem @ 1388 NONAME
+ _ZN22QDeclarativeFocusScopeC2EP16QDeclarativeItem @ 1389 NONAME
+ _ZN22QDeclarativeFocusScopeD0Ev @ 1390 NONAME
+ _ZN22QDeclarativeFocusScopeD1Ev @ 1391 NONAME
+ _ZN22QDeclarativeFocusScopeD2Ev @ 1392 NONAME
+ _ZN22QDeclarativeFontLoader11nameChangedEv @ 1393 NONAME
+ _ZN22QDeclarativeFontLoader11qt_metacallEN11QMetaObject4CallEiPPv @ 1394 NONAME
+ _ZN22QDeclarativeFontLoader11qt_metacastEPKc @ 1395 NONAME
+ _ZN22QDeclarativeFontLoader13replyFinishedEv @ 1396 NONAME
+ _ZN22QDeclarativeFontLoader13statusChangedEv @ 1397 NONAME
+ _ZN22QDeclarativeFontLoader16staticMetaObjectE @ 1398 NONAME DATA 16
+ _ZN22QDeclarativeFontLoader19getStaticMetaObjectEv @ 1399 NONAME
+ _ZN22QDeclarativeFontLoader7setNameERK7QString @ 1400 NONAME
+ _ZN22QDeclarativeFontLoader9setSourceERK4QUrl @ 1401 NONAME
+ _ZN22QDeclarativeFontLoaderC1EP7QObject @ 1402 NONAME
+ _ZN22QDeclarativeFontLoaderC2EP7QObject @ 1403 NONAME
+ _ZN22QDeclarativeFontLoaderD0Ev @ 1404 NONAME
+ _ZN22QDeclarativeFontLoaderD1Ev @ 1405 NONAME
+ _ZN22QDeclarativeFontLoaderD2Ev @ 1406 NONAME
+ _ZN22QDeclarativeStateGroup10classBeginEv @ 1407 NONAME
+ _ZN22QDeclarativeStateGroup11qt_metacallEN11QMetaObject4CallEiPPv @ 1408 NONAME
+ _ZN22QDeclarativeStateGroup11qt_metacastEPKc @ 1409 NONAME
+ _ZN22QDeclarativeStateGroup11removeStateEP17QDeclarativeState @ 1410 NONAME
+ _ZN22QDeclarativeStateGroup12stateChangedERK7QString @ 1411 NONAME
+ _ZN22QDeclarativeStateGroup14statesPropertyEv @ 1412 NONAME
+ _ZN22QDeclarativeStateGroup15updateAutoStateEv @ 1413 NONAME
+ _ZN22QDeclarativeStateGroup16staticMetaObjectE @ 1414 NONAME DATA 16
+ _ZN22QDeclarativeStateGroup17componentCompleteEv @ 1415 NONAME
+ _ZN22QDeclarativeStateGroup19getStaticMetaObjectEv @ 1416 NONAME
+ _ZN22QDeclarativeStateGroup19transitionsPropertyEv @ 1417 NONAME
+ _ZN22QDeclarativeStateGroup8setStateERK7QString @ 1418 NONAME
+ _ZN22QDeclarativeStateGroupC1EP7QObject @ 1419 NONAME
+ _ZN22QDeclarativeStateGroupC2EP7QObject @ 1420 NONAME
+ _ZN22QDeclarativeStateGroupD0Ev @ 1421 NONAME
+ _ZN22QDeclarativeStateGroupD1Ev @ 1422 NONAME
+ _ZN22QDeclarativeStateGroupD2Ev @ 1423 NONAME
+ _ZN22QDeclarativeStyledText5parseERK7QStringR11QTextLayout @ 1424 NONAME
+ _ZN22QDeclarativeStyledTextC1ERK7QStringR11QTextLayout @ 1425 NONAME
+ _ZN22QDeclarativeStyledTextC2ERK7QStringR11QTextLayout @ 1426 NONAME
+ _ZN22QDeclarativeStyledTextD1Ev @ 1427 NONAME
+ _ZN22QDeclarativeStyledTextD2Ev @ 1428 NONAME
+ _ZN22QDeclarativeTransition10animationsEv @ 1429 NONAME
+ _ZN22QDeclarativeTransition10setToStateERK7QString @ 1430 NONAME
+ _ZN22QDeclarativeTransition11qt_metacallEN11QMetaObject4CallEiPPv @ 1431 NONAME
+ _ZN22QDeclarativeTransition11qt_metacastEPKc @ 1432 NONAME
+ _ZN22QDeclarativeTransition11setReversedEb @ 1433 NONAME
+ _ZN22QDeclarativeTransition12setFromStateERK7QString @ 1434 NONAME
+ _ZN22QDeclarativeTransition13setReversibleEb @ 1435 NONAME
+ _ZN22QDeclarativeTransition16staticMetaObjectE @ 1436 NONAME DATA 16
+ _ZN22QDeclarativeTransition19getStaticMetaObjectEv @ 1437 NONAME
+ _ZN22QDeclarativeTransition4stopEv @ 1438 NONAME
+ _ZN22QDeclarativeTransition7prepareER5QListI18QDeclarativeActionERS0_I20QDeclarativePropertyEP29QDeclarativeTransitionManager @ 1439 NONAME
+ _ZN22QDeclarativeTransitionC1EP7QObject @ 1440 NONAME
+ _ZN22QDeclarativeTransitionC2EP7QObject @ 1441 NONAME
+ _ZN22QDeclarativeTransitionD0Ev @ 1442 NONAME
+ _ZN22QDeclarativeTransitionD1Ev @ 1443 NONAME
+ _ZN22QDeclarativeTransitionD2Ev @ 1444 NONAME
+ _ZN23QDeclarativeBorderImage11qt_metacallEN11QMetaObject4CallEiPPv @ 1445 NONAME
+ _ZN23QDeclarativeBorderImage11qt_metacastEPKc @ 1446 NONAME
+ _ZN23QDeclarativeBorderImage15requestFinishedEv @ 1447 NONAME
+ _ZN23QDeclarativeBorderImage16staticMetaObjectE @ 1448 NONAME DATA 16
+ _ZN23QDeclarativeBorderImage18sciRequestFinishedEv @ 1449 NONAME
+ _ZN23QDeclarativeBorderImage18setGridScaledImageERK27QDeclarativeGridScaledImage @ 1450 NONAME
+ _ZN23QDeclarativeBorderImage19getStaticMetaObjectEv @ 1451 NONAME
+ _ZN23QDeclarativeBorderImage19setVerticalTileModeENS_8TileModeE @ 1452 NONAME
+ _ZN23QDeclarativeBorderImage21setHorizontalTileModeENS_8TileModeE @ 1453 NONAME
+ _ZN23QDeclarativeBorderImage23verticalTileModeChangedEv @ 1454 NONAME
+ _ZN23QDeclarativeBorderImage25horizontalTileModeChangedEv @ 1455 NONAME
+ _ZN23QDeclarativeBorderImage4loadEv @ 1456 NONAME
+ _ZN23QDeclarativeBorderImage5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 1457 NONAME
+ _ZN23QDeclarativeBorderImage6borderEv @ 1458 NONAME
+ _ZN23QDeclarativeBorderImage9setSourceERK4QUrl @ 1459 NONAME
+ _ZN23QDeclarativeBorderImageC1EP16QDeclarativeItem @ 1460 NONAME
+ _ZN23QDeclarativeBorderImageC2EP16QDeclarativeItem @ 1461 NONAME
+ _ZN23QDeclarativeBorderImageD0Ev @ 1462 NONAME
+ _ZN23QDeclarativeBorderImageD1Ev @ 1463 NONAME
+ _ZN23QDeclarativeBorderImageD2Ev @ 1464 NONAME
+ _ZN23QDeclarativeConnections11qt_metacallEN11QMetaObject4CallEiPPv @ 1465 NONAME
+ _ZN23QDeclarativeConnections11qt_metacastEPKc @ 1466 NONAME
+ _ZN23QDeclarativeConnections13targetChangedEv @ 1467 NONAME
+ _ZN23QDeclarativeConnections14connectSignalsEv @ 1468 NONAME
+ _ZN23QDeclarativeConnections16staticMetaObjectE @ 1469 NONAME DATA 16
+ _ZN23QDeclarativeConnections17componentCompleteEv @ 1470 NONAME
+ _ZN23QDeclarativeConnections19getStaticMetaObjectEv @ 1471 NONAME
+ _ZN23QDeclarativeConnections9setTargetEP7QObject @ 1472 NONAME
+ _ZN23QDeclarativeConnectionsC1EP7QObject @ 1473 NONAME
+ _ZN23QDeclarativeConnectionsC2EP7QObject @ 1474 NONAME
+ _ZN23QDeclarativeConnectionsD0Ev @ 1475 NONAME
+ _ZN23QDeclarativeConnectionsD1Ev @ 1476 NONAME
+ _ZN23QDeclarativeConnectionsD2Ev @ 1477 NONAME
+ _ZN23QDeclarativeDebugClient10setEnabledEb @ 1478 NONAME
+ _ZN23QDeclarativeDebugClient11qt_metacallEN11QMetaObject4CallEiPPv @ 1479 NONAME
+ _ZN23QDeclarativeDebugClient11qt_metacastEPKc @ 1480 NONAME
+ _ZN23QDeclarativeDebugClient11sendMessageERK10QByteArray @ 1481 NONAME
+ _ZN23QDeclarativeDebugClient15messageReceivedERK10QByteArray @ 1482 NONAME
+ _ZN23QDeclarativeDebugClient16staticMetaObjectE @ 1483 NONAME DATA 16
+ _ZN23QDeclarativeDebugClient19getStaticMetaObjectEv @ 1484 NONAME
+ _ZN23QDeclarativeDebugClientC1ERK7QStringP27QDeclarativeDebugConnection @ 1485 NONAME
+ _ZN23QDeclarativeDebugClientC2ERK7QStringP27QDeclarativeDebugConnection @ 1486 NONAME
+ _ZN23QDeclarativeDomDocument4loadEP18QDeclarativeEngineRK10QByteArrayRK4QUrl @ 1487 NONAME
+ _ZN23QDeclarativeDomDocumentC1ERKS_ @ 1488 NONAME
+ _ZN23QDeclarativeDomDocumentC1Ev @ 1489 NONAME
+ _ZN23QDeclarativeDomDocumentC2ERKS_ @ 1490 NONAME
+ _ZN23QDeclarativeDomDocumentC2Ev @ 1491 NONAME
+ _ZN23QDeclarativeDomDocumentD1Ev @ 1492 NONAME
+ _ZN23QDeclarativeDomDocumentD2Ev @ 1493 NONAME
+ _ZN23QDeclarativeDomDocumentaSERKS_ @ 1494 NONAME
+ _ZN23QDeclarativeDomPropertyC1ERKS_ @ 1495 NONAME
+ _ZN23QDeclarativeDomPropertyC1Ev @ 1496 NONAME
+ _ZN23QDeclarativeDomPropertyC2ERKS_ @ 1497 NONAME
+ _ZN23QDeclarativeDomPropertyC2Ev @ 1498 NONAME
+ _ZN23QDeclarativeDomPropertyD1Ev @ 1499 NONAME
+ _ZN23QDeclarativeDomPropertyD2Ev @ 1500 NONAME
+ _ZN23QDeclarativeDomPropertyaSERKS_ @ 1501 NONAME
+ _ZN23QDeclarativeEngineDebug11qt_metacallEN11QMetaObject4CallEiPPv @ 1502 NONAME
+ _ZN23QDeclarativeEngineDebug11qt_metacastEPKc @ 1503 NONAME
+ _ZN23QDeclarativeEngineDebug11queryObjectERK32QDeclarativeDebugObjectReferenceP7QObject @ 1504 NONAME
+ _ZN23QDeclarativeEngineDebug11removeWatchEP22QDeclarativeDebugWatch @ 1505 NONAME
+ _ZN23QDeclarativeEngineDebug16staticMetaObjectE @ 1506 NONAME DATA 16
+ _ZN23QDeclarativeEngineDebug17queryRootContextsERK32QDeclarativeDebugEngineReferenceP7QObject @ 1507 NONAME
+ _ZN23QDeclarativeEngineDebug19getStaticMetaObjectEv @ 1508 NONAME
+ _ZN23QDeclarativeEngineDebug20queryObjectRecursiveERK32QDeclarativeDebugObjectReferenceP7QObject @ 1509 NONAME
+ _ZN23QDeclarativeEngineDebug21queryAvailableEnginesEP7QObject @ 1510 NONAME
+ _ZN23QDeclarativeEngineDebug21queryExpressionResultEiRK7QStringP7QObject @ 1511 NONAME
+ _ZN23QDeclarativeEngineDebug8addWatchERK30QDeclarativeDebugFileReferenceP7QObject @ 1512 NONAME
+ _ZN23QDeclarativeEngineDebug8addWatchERK32QDeclarativeDebugObjectReferenceP7QObject @ 1513 NONAME
+ _ZN23QDeclarativeEngineDebug8addWatchERK32QDeclarativeDebugObjectReferenceRK7QStringP7QObject @ 1514 NONAME
+ _ZN23QDeclarativeEngineDebug8addWatchERK33QDeclarativeDebugContextReferenceRK7QStringP7QObject @ 1515 NONAME
+ _ZN23QDeclarativeEngineDebug8addWatchERK34QDeclarativeDebugPropertyReferenceP7QObject @ 1516 NONAME
+ _ZN23QDeclarativeEngineDebugC1EP27QDeclarativeDebugConnectionP7QObject @ 1517 NONAME
+ _ZN23QDeclarativeEngineDebugC2EP27QDeclarativeDebugConnectionP7QObject @ 1518 NONAME
+ _ZN23QDeclarativeItemPrivate17setConsistentTimeEi @ 1519 NONAME
+ _ZN23QDeclarativePaintedItem10clearCacheEv @ 1520 NONAME
+ _ZN23QDeclarativePaintedItem10dirtyCacheERK5QRect @ 1521 NONAME
+ _ZN23QDeclarativePaintedItem11qt_metacallEN11QMetaObject4CallEiPPv @ 1522 NONAME
+ _ZN23QDeclarativePaintedItem11qt_metacastEPKc @ 1523 NONAME
+ _ZN23QDeclarativePaintedItem12setFillColorERK6QColor @ 1524 NONAME
+ _ZN23QDeclarativePaintedItem14setCacheFrozenEb @ 1525 NONAME
+ _ZN23QDeclarativePaintedItem14setSmoothCacheEb @ 1526 NONAME
+ _ZN23QDeclarativePaintedItem15setContentsSizeERK5QSize @ 1527 NONAME
+ _ZN23QDeclarativePaintedItem16fillColorChangedEv @ 1528 NONAME
+ _ZN23QDeclarativePaintedItem16setContentsScaleEf @ 1529 NONAME
+ _ZN23QDeclarativePaintedItem16staticMetaObjectE @ 1530 NONAME DATA 16
+ _ZN23QDeclarativePaintedItem17setPixelCacheSizeEi @ 1531 NONAME
+ _ZN23QDeclarativePaintedItem19contentsSizeChangedEv @ 1532 NONAME
+ _ZN23QDeclarativePaintedItem19getStaticMetaObjectEv @ 1533 NONAME
+ _ZN23QDeclarativePaintedItem20contentsScaleChangedEv @ 1534 NONAME
+ _ZN23QDeclarativePaintedItem4initEv @ 1535 NONAME
+ _ZN23QDeclarativePaintedItem5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 1536 NONAME
+ _ZN23QDeclarativePaintedItemC2EP16QDeclarativeItem @ 1537 NONAME
+ _ZN23QDeclarativePaintedItemC2ER30QDeclarativePaintedItemPrivateP16QDeclarativeItem @ 1538 NONAME
+ _ZN23QDeclarativePaintedItemD0Ev @ 1539 NONAME
+ _ZN23QDeclarativePaintedItemD1Ev @ 1540 NONAME
+ _ZN23QDeclarativePaintedItemD2Ev @ 1541 NONAME
+ _ZN23QDeclarativePathElement11qt_metacallEN11QMetaObject4CallEiPPv @ 1542 NONAME
+ _ZN23QDeclarativePathElement11qt_metacastEPKc @ 1543 NONAME
+ _ZN23QDeclarativePathElement16staticMetaObjectE @ 1544 NONAME DATA 16
+ _ZN23QDeclarativePathElement19getStaticMetaObjectEv @ 1545 NONAME
+ _ZN23QDeclarativePathElement7changedEv @ 1546 NONAME
+ _ZN23QDeclarativePathPercent11qt_metacallEN11QMetaObject4CallEiPPv @ 1547 NONAME
+ _ZN23QDeclarativePathPercent11qt_metacastEPKc @ 1548 NONAME
+ _ZN23QDeclarativePathPercent16staticMetaObjectE @ 1549 NONAME DATA 16
+ _ZN23QDeclarativePathPercent19getStaticMetaObjectEv @ 1550 NONAME
+ _ZN23QDeclarativePathPercent8setValueEf @ 1551 NONAME
+ _ZN23QDeclarativePixmapCache15pendingRequestsEv @ 1552 NONAME
+ _ZN23QDeclarativePixmapCache3getERK4QUrlP7QPixmapb @ 1553 NONAME
+ _ZN23QDeclarativePixmapCache6cancelERK4QUrlP7QObject @ 1554 NONAME
+ _ZN23QDeclarativePixmapCache7requestEP18QDeclarativeEngineRK4QUrl @ 1555 NONAME
+ _ZN23QDeclarativePixmapReply10setLoadingEv @ 1556 NONAME
+ _ZN23QDeclarativePixmapReply11qt_metacallEN11QMetaObject4CallEiPPv @ 1557 NONAME
+ _ZN23QDeclarativePixmapReply11qt_metacastEPKc @ 1558 NONAME
+ _ZN23QDeclarativePixmapReply16downloadProgressExx @ 1559 NONAME
+ _ZN23QDeclarativePixmapReply16staticMetaObjectE @ 1560 NONAME DATA 16
+ _ZN23QDeclarativePixmapReply19getStaticMetaObjectEv @ 1561 NONAME
+ _ZN23QDeclarativePixmapReply5eventEP6QEvent @ 1562 NONAME
+ _ZN23QDeclarativePixmapReply6addRefEv @ 1563 NONAME
+ _ZN23QDeclarativePixmapReply7releaseEb @ 1564 NONAME
+ _ZN23QDeclarativePixmapReply8finishedEv @ 1565 NONAME
+ _ZN23QDeclarativePixmapReplyC1EP23QDeclarativeImageReaderRK4QUrl @ 1566 NONAME
+ _ZN23QDeclarativePixmapReplyC2EP23QDeclarativeImageReaderRK4QUrl @ 1567 NONAME
+ _ZN23QDeclarativePixmapReplyD0Ev @ 1568 NONAME
+ _ZN23QDeclarativePixmapReplyD1Ev @ 1569 NONAME
+ _ZN23QDeclarativePixmapReplyD2Ev @ 1570 NONAME
+ _ZN23QDeclarativePropertyMap11qt_metacallEN11QMetaObject4CallEiPPv @ 1571 NONAME
+ _ZN23QDeclarativePropertyMap11qt_metacastEPKc @ 1572 NONAME
+ _ZN23QDeclarativePropertyMap12valueChangedERK7QString @ 1573 NONAME
+ _ZN23QDeclarativePropertyMap16staticMetaObjectE @ 1574 NONAME DATA 16
+ _ZN23QDeclarativePropertyMap19getStaticMetaObjectEv @ 1575 NONAME
+ _ZN23QDeclarativePropertyMap5clearERK7QString @ 1576 NONAME
+ _ZN23QDeclarativePropertyMap6insertERK7QStringRK8QVariant @ 1577 NONAME
+ _ZN23QDeclarativePropertyMapC1EP7QObject @ 1578 NONAME
+ _ZN23QDeclarativePropertyMapC2EP7QObject @ 1579 NONAME
+ _ZN23QDeclarativePropertyMapD0Ev @ 1580 NONAME
+ _ZN23QDeclarativePropertyMapD1Ev @ 1581 NONAME
+ _ZN23QDeclarativePropertyMapD2Ev @ 1582 NONAME
+ _ZN23QDeclarativePropertyMapixERK7QString @ 1583 NONAME
+ _ZN23QDeclarativeViewSection11qt_metacallEN11QMetaObject4CallEiPPv @ 1584 NONAME
+ _ZN23QDeclarativeViewSection11qt_metacastEPKc @ 1585 NONAME
+ _ZN23QDeclarativeViewSection11setCriteriaENS_15SectionCriteriaE @ 1586 NONAME
+ _ZN23QDeclarativeViewSection11setDelegateEP21QDeclarativeComponent @ 1587 NONAME
+ _ZN23QDeclarativeViewSection11setPropertyERK7QString @ 1588 NONAME
+ _ZN23QDeclarativeViewSection13sectionStringERK7QString @ 1589 NONAME
+ _ZN23QDeclarativeViewSection15delegateChangedEv @ 1590 NONAME
+ _ZN23QDeclarativeViewSection16staticMetaObjectE @ 1591 NONAME DATA 16
+ _ZN23QDeclarativeViewSection19getStaticMetaObjectEv @ 1592 NONAME
+ _ZN23QDeclarativeViewSection7changedEv @ 1593 NONAME
+ _ZN23QDeclarativeVisualModel10itemsMovedEiii @ 1594 NONAME
+ _ZN23QDeclarativeVisualModel10modelResetEv @ 1595 NONAME
+ _ZN23QDeclarativeVisualModel11createdItemEiP16QDeclarativeItem @ 1596 NONAME
+ _ZN23QDeclarativeVisualModel11qt_metacallEN11QMetaObject4CallEiPPv @ 1597 NONAME
+ _ZN23QDeclarativeVisualModel11qt_metacastEPKc @ 1598 NONAME
+ _ZN23QDeclarativeVisualModel12countChangedEv @ 1599 NONAME
+ _ZN23QDeclarativeVisualModel12itemsRemovedEii @ 1600 NONAME
+ _ZN23QDeclarativeVisualModel13itemsInsertedEii @ 1601 NONAME
+ _ZN23QDeclarativeVisualModel14destroyingItemEP16QDeclarativeItem @ 1602 NONAME
+ _ZN23QDeclarativeVisualModel16staticMetaObjectE @ 1603 NONAME DATA 16
+ _ZN23QDeclarativeVisualModel19getStaticMetaObjectEv @ 1604 NONAME
+ _ZN24QDeclarativeCustomParser11clearErrorsEv @ 1605 NONAME
+ _ZN24QDeclarativeCustomParser5errorERK28QDeclarativeCustomParserNodeRK7QString @ 1606 NONAME
+ _ZN24QDeclarativeCustomParser5errorERK32QDeclarativeCustomParserPropertyRK7QString @ 1607 NONAME
+ _ZN24QDeclarativeDebugService11idForObjectEP7QObject @ 1608 NONAME
+ _ZN24QDeclarativeDebugService11objectForIdEi @ 1609 NONAME
+ _ZN24QDeclarativeDebugService11qt_metacallEN11QMetaObject4CallEiPPv @ 1610 NONAME
+ _ZN24QDeclarativeDebugService11qt_metacastEPKc @ 1611 NONAME
+ _ZN24QDeclarativeDebugService11sendMessageERK10QByteArray @ 1612 NONAME
+ _ZN24QDeclarativeDebugService14enabledChangedEb @ 1613 NONAME
+ _ZN24QDeclarativeDebugService14objectToStringEP7QObject @ 1614 NONAME
+ _ZN24QDeclarativeDebugService14waitForClientsEv @ 1615 NONAME
+ _ZN24QDeclarativeDebugService15messageReceivedERK10QByteArray @ 1616 NONAME
+ _ZN24QDeclarativeDebugService16staticMetaObjectE @ 1617 NONAME DATA 16
+ _ZN24QDeclarativeDebugService18isDebuggingEnabledEv @ 1618 NONAME
+ _ZN24QDeclarativeDebugService19getStaticMetaObjectEv @ 1619 NONAME
+ _ZN24QDeclarativeDebugService19notifyOnServerStartEP7QObjectPKc @ 1620 NONAME
+ _ZN24QDeclarativeDebugServiceC1ERK7QStringP7QObject @ 1621 NONAME
+ _ZN24QDeclarativeDebugServiceC2ERK7QStringP7QObject @ 1622 NONAME
+ _ZN24QDeclarativeDomComponentC1ERKS_ @ 1623 NONAME
+ _ZN24QDeclarativeDomComponentC1Ev @ 1624 NONAME
+ _ZN24QDeclarativeDomComponentC2ERKS_ @ 1625 NONAME
+ _ZN24QDeclarativeDomComponentC2Ev @ 1626 NONAME
+ _ZN24QDeclarativeDomComponentD1Ev @ 1627 NONAME
+ _ZN24QDeclarativeDomComponentD2Ev @ 1628 NONAME
+ _ZN24QDeclarativeDomComponentaSERKS_ @ 1629 NONAME
+ _ZN24QDeclarativeGradientStop11qt_metacallEN11QMetaObject4CallEiPPv @ 1630 NONAME
+ _ZN24QDeclarativeGradientStop11qt_metacastEPKc @ 1631 NONAME
+ _ZN24QDeclarativeGradientStop14updateGradientEv @ 1632 NONAME
+ _ZN24QDeclarativeGradientStop16staticMetaObjectE @ 1633 NONAME DATA 16
+ _ZN24QDeclarativeGradientStop19getStaticMetaObjectEv @ 1634 NONAME
+ _ZN24QDeclarativeListAccessor7setListERK8QVariantP18QDeclarativeEngine @ 1635 NONAME
+ _ZN24QDeclarativeListAccessorC1Ev @ 1636 NONAME
+ _ZN24QDeclarativeListAccessorC2Ev @ 1637 NONAME
+ _ZN24QDeclarativeListAccessorD1Ev @ 1638 NONAME
+ _ZN24QDeclarativeListAccessorD2Ev @ 1639 NONAME
+ _ZN24QDeclarativeParentChange11qt_metacallEN11QMetaObject4CallEiPPv @ 1640 NONAME
+ _ZN24QDeclarativeParentChange11qt_metacastEPKc @ 1641 NONAME
+ _ZN24QDeclarativeParentChange11setRotationEf @ 1642 NONAME
+ _ZN24QDeclarativeParentChange12isReversableEv @ 1643 NONAME
+ _ZN24QDeclarativeParentChange13saveOriginalsEv @ 1644 NONAME
+ _ZN24QDeclarativeParentChange16staticMetaObjectE @ 1645 NONAME DATA 16
+ _ZN24QDeclarativeParentChange17saveCurrentValuesEv @ 1646 NONAME
+ _ZN24QDeclarativeParentChange19getStaticMetaObjectEv @ 1647 NONAME
+ _ZN24QDeclarativeParentChange4setXEf @ 1648 NONAME
+ _ZN24QDeclarativeParentChange4setYEf @ 1649 NONAME
+ _ZN24QDeclarativeParentChange6rewindEv @ 1650 NONAME
+ _ZN24QDeclarativeParentChange7actionsEv @ 1651 NONAME
+ _ZN24QDeclarativeParentChange7executeEv @ 1652 NONAME
+ _ZN24QDeclarativeParentChange7reverseEv @ 1653 NONAME
+ _ZN24QDeclarativeParentChange8overrideEP23QDeclarativeActionEvent @ 1654 NONAME
+ _ZN24QDeclarativeParentChange8setScaleEf @ 1655 NONAME
+ _ZN24QDeclarativeParentChange8setWidthEf @ 1656 NONAME
+ _ZN24QDeclarativeParentChange9setHeightEf @ 1657 NONAME
+ _ZN24QDeclarativeParentChange9setObjectEP16QDeclarativeItem @ 1658 NONAME
+ _ZN24QDeclarativeParentChange9setParentEP16QDeclarativeItem @ 1659 NONAME
+ _ZN24QDeclarativeParentChangeC1EP7QObject @ 1660 NONAME
+ _ZN24QDeclarativeParentChangeC2EP7QObject @ 1661 NONAME
+ _ZN24QDeclarativeParentChangeD0Ev @ 1662 NONAME
+ _ZN24QDeclarativeParentChangeD1Ev @ 1663 NONAME
+ _ZN24QDeclarativeParentChangeD2Ev @ 1664 NONAME
+ _ZN24QDeclarativeParserStatus10classBeginEv @ 1665 NONAME
+ _ZN24QDeclarativeParserStatus17componentCompleteEv @ 1666 NONAME
+ _ZN24QDeclarativeParserStatusC1Ev @ 1667 NONAME
+ _ZN24QDeclarativeParserStatusC2Ev @ 1668 NONAME
+ _ZN24QDeclarativeParserStatusD0Ev @ 1669 NONAME
+ _ZN24QDeclarativeParserStatusD1Ev @ 1670 NONAME
+ _ZN24QDeclarativeParserStatusD2Ev @ 1671 NONAME
+ _ZN24QDeclarativeScriptString10setContextEP19QDeclarativeContext @ 1672 NONAME
+ _ZN24QDeclarativeScriptString14setScopeObjectEP7QObject @ 1673 NONAME
+ _ZN24QDeclarativeScriptString9setScriptERK7QString @ 1674 NONAME
+ _ZN24QDeclarativeScriptStringC1ERKS_ @ 1675 NONAME
+ _ZN24QDeclarativeScriptStringC1Ev @ 1676 NONAME
+ _ZN24QDeclarativeScriptStringC2ERKS_ @ 1677 NONAME
+ _ZN24QDeclarativeScriptStringC2Ev @ 1678 NONAME
+ _ZN24QDeclarativeScriptStringD1Ev @ 1679 NONAME
+ _ZN24QDeclarativeScriptStringD2Ev @ 1680 NONAME
+ _ZN24QDeclarativeScriptStringaSERKS_ @ 1681 NONAME
+ _ZN24QDeclarativeSpringFollow10setDampingEf @ 1682 NONAME
+ _ZN24QDeclarativeSpringFollow10setEnabledEb @ 1683 NONAME
+ _ZN24QDeclarativeSpringFollow10setEpsilonEf @ 1684 NONAME
+ _ZN24QDeclarativeSpringFollow10setModulusEf @ 1685 NONAME
+ _ZN24QDeclarativeSpringFollow11massChangedEv @ 1686 NONAME
+ _ZN24QDeclarativeSpringFollow11qt_metacallEN11QMetaObject4CallEiPPv @ 1687 NONAME
+ _ZN24QDeclarativeSpringFollow11qt_metacastEPKc @ 1688 NONAME
+ _ZN24QDeclarativeSpringFollow11setVelocityEf @ 1689 NONAME
+ _ZN24QDeclarativeSpringFollow11syncChangedEv @ 1690 NONAME
+ _ZN24QDeclarativeSpringFollow12valueChangedEf @ 1691 NONAME
+ _ZN24QDeclarativeSpringFollow14modulusChangedEv @ 1692 NONAME
+ _ZN24QDeclarativeSpringFollow14setSourceValueEf @ 1693 NONAME
+ _ZN24QDeclarativeSpringFollow16staticMetaObjectE @ 1694 NONAME DATA 16
+ _ZN24QDeclarativeSpringFollow19getStaticMetaObjectEv @ 1695 NONAME
+ _ZN24QDeclarativeSpringFollow7setMassEf @ 1696 NONAME
+ _ZN24QDeclarativeSpringFollow9setSpringEf @ 1697 NONAME
+ _ZN24QDeclarativeSpringFollow9setTargetERK20QDeclarativeProperty @ 1698 NONAME
+ _ZN24QDeclarativeSpringFollowC1EP7QObject @ 1699 NONAME
+ _ZN24QDeclarativeSpringFollowC2EP7QObject @ 1700 NONAME
+ _ZN24QDeclarativeSpringFollowD0Ev @ 1701 NONAME
+ _ZN24QDeclarativeSpringFollowD1Ev @ 1702 NONAME
+ _ZN24QDeclarativeSpringFollowD2Ev @ 1703 NONAME
+ _ZN24QDeclarativeXmlListModel10classBeginEv @ 1704 NONAME
+ _ZN24QDeclarativeXmlListModel11qt_metacallEN11QMetaObject4CallEiPPv @ 1705 NONAME
+ _ZN24QDeclarativeXmlListModel11qt_metacastEPKc @ 1706 NONAME
+ _ZN24QDeclarativeXmlListModel11roleObjectsEv @ 1707 NONAME
+ _ZN24QDeclarativeXmlListModel12countChangedEv @ 1708 NONAME
+ _ZN24QDeclarativeXmlListModel13statusChangedENS_6StatusE @ 1709 NONAME
+ _ZN24QDeclarativeXmlListModel14queryCompletedEii @ 1710 NONAME
+ _ZN24QDeclarativeXmlListModel15progressChangedEf @ 1711 NONAME
+ _ZN24QDeclarativeXmlListModel15requestFinishedEv @ 1712 NONAME
+ _ZN24QDeclarativeXmlListModel15requestProgressExx @ 1713 NONAME
+ _ZN24QDeclarativeXmlListModel16staticMetaObjectE @ 1714 NONAME DATA 16
+ _ZN24QDeclarativeXmlListModel17componentCompleteEv @ 1715 NONAME
+ _ZN24QDeclarativeXmlListModel19getStaticMetaObjectEv @ 1716 NONAME
+ _ZN24QDeclarativeXmlListModel24setNamespaceDeclarationsERK7QString @ 1717 NONAME
+ _ZN24QDeclarativeXmlListModel6reloadEv @ 1718 NONAME
+ _ZN24QDeclarativeXmlListModel6setXmlERK7QString @ 1719 NONAME
+ _ZN24QDeclarativeXmlListModel8setQueryERK7QString @ 1720 NONAME
+ _ZN24QDeclarativeXmlListModel9setSourceERK4QUrl @ 1721 NONAME
+ _ZN24QDeclarativeXmlListModelC1EP7QObject @ 1722 NONAME
+ _ZN24QDeclarativeXmlListModelC2EP7QObject @ 1723 NONAME
+ _ZN24QDeclarativeXmlListModelD0Ev @ 1724 NONAME
+ _ZN24QDeclarativeXmlListModelD1Ev @ 1725 NONAME
+ _ZN24QDeclarativeXmlListModelD2Ev @ 1726 NONAME
+ _ZN25QDeclarativeAnchorChanges11qt_metacallEN11QMetaObject4CallEiPPv @ 1727 NONAME
+ _ZN25QDeclarativeAnchorChanges11qt_metacastEPKc @ 1728 NONAME
+ _ZN25QDeclarativeAnchorChanges11setBaselineERK22QDeclarativeAnchorLine @ 1729 NONAME
+ _ZN25QDeclarativeAnchorChanges12extraActionsEv @ 1730 NONAME
+ _ZN25QDeclarativeAnchorChanges12isReversableEv @ 1731 NONAME
+ _ZN25QDeclarativeAnchorChanges13saveOriginalsEv @ 1732 NONAME
+ _ZN25QDeclarativeAnchorChanges15changesBindingsEv @ 1733 NONAME
+ _ZN25QDeclarativeAnchorChanges16staticMetaObjectE @ 1734 NONAME DATA 16
+ _ZN25QDeclarativeAnchorChanges17saveCurrentValuesEv @ 1735 NONAME
+ _ZN25QDeclarativeAnchorChanges17setVerticalCenterERK22QDeclarativeAnchorLine @ 1736 NONAME
+ _ZN25QDeclarativeAnchorChanges19getStaticMetaObjectEv @ 1737 NONAME
+ _ZN25QDeclarativeAnchorChanges19setHorizontalCenterERK22QDeclarativeAnchorLine @ 1738 NONAME
+ _ZN25QDeclarativeAnchorChanges20clearForwardBindingsEv @ 1739 NONAME
+ _ZN25QDeclarativeAnchorChanges20clearReverseBindingsEv @ 1740 NONAME
+ _ZN25QDeclarativeAnchorChanges6rewindEv @ 1741 NONAME
+ _ZN25QDeclarativeAnchorChanges6setTopERK22QDeclarativeAnchorLine @ 1742 NONAME
+ _ZN25QDeclarativeAnchorChanges7actionsEv @ 1743 NONAME
+ _ZN25QDeclarativeAnchorChanges7executeEv @ 1744 NONAME
+ _ZN25QDeclarativeAnchorChanges7reverseEv @ 1745 NONAME
+ _ZN25QDeclarativeAnchorChanges7setLeftERK22QDeclarativeAnchorLine @ 1746 NONAME
+ _ZN25QDeclarativeAnchorChanges8overrideEP23QDeclarativeActionEvent @ 1747 NONAME
+ _ZN25QDeclarativeAnchorChanges8setResetERK7QString @ 1748 NONAME
+ _ZN25QDeclarativeAnchorChanges8setRightERK22QDeclarativeAnchorLine @ 1749 NONAME
+ _ZN25QDeclarativeAnchorChanges9setBottomERK22QDeclarativeAnchorLine @ 1750 NONAME
+ _ZN25QDeclarativeAnchorChanges9setObjectEP16QDeclarativeItem @ 1751 NONAME
+ _ZN25QDeclarativeAnchorChangesC1EP7QObject @ 1752 NONAME
+ _ZN25QDeclarativeAnchorChangesC2EP7QObject @ 1753 NONAME
+ _ZN25QDeclarativeAnchorChangesD0Ev @ 1754 NONAME
+ _ZN25QDeclarativeAnchorChangesD1Ev @ 1755 NONAME
+ _ZN25QDeclarativeAnchorChangesD2Ev @ 1756 NONAME
+ _ZN25QDeclarativeAnimatedImage10setPlayingEb @ 1757 NONAME
+ _ZN25QDeclarativeAnimatedImage11movieUpdateEv @ 1758 NONAME
+ _ZN25QDeclarativeAnimatedImage11qt_metacallEN11QMetaObject4CallEiPPv @ 1759 NONAME
+ _ZN25QDeclarativeAnimatedImage11qt_metacastEPKc @ 1760 NONAME
+ _ZN25QDeclarativeAnimatedImage12frameChangedEv @ 1761 NONAME
+ _ZN25QDeclarativeAnimatedImage13pausedChangedEv @ 1762 NONAME
+ _ZN25QDeclarativeAnimatedImage14playingChangedEv @ 1763 NONAME
+ _ZN25QDeclarativeAnimatedImage15setCurrentFrameEi @ 1764 NONAME
+ _ZN25QDeclarativeAnimatedImage16staticMetaObjectE @ 1765 NONAME DATA 16
+ _ZN25QDeclarativeAnimatedImage17componentCompleteEv @ 1766 NONAME
+ _ZN25QDeclarativeAnimatedImage19getStaticMetaObjectEv @ 1767 NONAME
+ _ZN25QDeclarativeAnimatedImage20movieRequestFinishedEv @ 1768 NONAME
+ _ZN25QDeclarativeAnimatedImage20playingStatusChangedEv @ 1769 NONAME
+ _ZN25QDeclarativeAnimatedImage9setPausedEb @ 1770 NONAME
+ _ZN25QDeclarativeAnimatedImage9setSourceERK4QUrl @ 1771 NONAME
+ _ZN25QDeclarativeAnimatedImageC1EP16QDeclarativeItem @ 1772 NONAME
+ _ZN25QDeclarativeAnimatedImageC2EP16QDeclarativeItem @ 1773 NONAME
+ _ZN25QDeclarativeAnimatedImageD0Ev @ 1774 NONAME
+ _ZN25QDeclarativeAnimatedImageD1Ev @ 1775 NONAME
+ _ZN25QDeclarativeAnimatedImageD2Ev @ 1776 NONAME
+ _ZN25QDeclarativeImageProviderD0Ev @ 1777 NONAME
+ _ZN25QDeclarativeImageProviderD1Ev @ 1778 NONAME
+ _ZN25QDeclarativeImageProviderD2Ev @ 1779 NONAME
+ _ZN25QDeclarativeListReferenceC1EP7QObjectPKcP18QDeclarativeEngine @ 1780 NONAME
+ _ZN25QDeclarativeListReferenceC1ERKS_ @ 1781 NONAME
+ _ZN25QDeclarativeListReferenceC1Ev @ 1782 NONAME
+ _ZN25QDeclarativeListReferenceC2EP7QObjectPKcP18QDeclarativeEngine @ 1783 NONAME
+ _ZN25QDeclarativeListReferenceC2ERKS_ @ 1784 NONAME
+ _ZN25QDeclarativeListReferenceC2Ev @ 1785 NONAME
+ _ZN25QDeclarativeListReferenceD1Ev @ 1786 NONAME
+ _ZN25QDeclarativeListReferenceD2Ev @ 1787 NONAME
+ _ZN25QDeclarativeListReferenceaSERKS_ @ 1788 NONAME
+ _ZN25QDeclarativePathAttribute11qt_metacallEN11QMetaObject4CallEiPPv @ 1789 NONAME
+ _ZN25QDeclarativePathAttribute11qt_metacastEPKc @ 1790 NONAME
+ _ZN25QDeclarativePathAttribute16staticMetaObjectE @ 1791 NONAME DATA 16
+ _ZN25QDeclarativePathAttribute19getStaticMetaObjectEv @ 1792 NONAME
+ _ZN25QDeclarativePathAttribute7setNameERK7QString @ 1793 NONAME
+ _ZN25QDeclarativePathAttribute8setValueEf @ 1794 NONAME
+ _ZN25QDeclarativeSystemPalette11eventFilterEP7QObjectP6QEvent @ 1795 NONAME
+ _ZN25QDeclarativeSystemPalette11qt_metacallEN11QMetaObject4CallEiPPv @ 1796 NONAME
+ _ZN25QDeclarativeSystemPalette11qt_metacastEPKc @ 1797 NONAME
+ _ZN25QDeclarativeSystemPalette13setColorGroupENS_10ColorGroupE @ 1798 NONAME
+ _ZN25QDeclarativeSystemPalette14paletteChangedEv @ 1799 NONAME
+ _ZN25QDeclarativeSystemPalette16staticMetaObjectE @ 1800 NONAME DATA 16
+ _ZN25QDeclarativeSystemPalette19getStaticMetaObjectEv @ 1801 NONAME
+ _ZN25QDeclarativeSystemPalette5eventEP6QEvent @ 1802 NONAME
+ _ZN25QDeclarativeSystemPaletteC1EP7QObject @ 1803 NONAME
+ _ZN25QDeclarativeSystemPaletteC2EP7QObject @ 1804 NONAME
+ _ZN25QDeclarativeSystemPaletteD0Ev @ 1805 NONAME
+ _ZN25QDeclarativeSystemPaletteD1Ev @ 1806 NONAME
+ _ZN25QDeclarativeSystemPaletteD2Ev @ 1807 NONAME
+ _ZN26QDeclarativeBasePositioner10addChangedEv @ 1808 NONAME
+ _ZN26QDeclarativeBasePositioner10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 1809 NONAME
+ _ZN26QDeclarativeBasePositioner10setSpacingEi @ 1810 NONAME
+ _ZN26QDeclarativeBasePositioner11moveChangedEv @ 1811 NONAME
+ _ZN26QDeclarativeBasePositioner11qt_metacallEN11QMetaObject4CallEiPPv @ 1812 NONAME
+ _ZN26QDeclarativeBasePositioner11qt_metacastEPKc @ 1813 NONAME
+ _ZN26QDeclarativeBasePositioner14prePositioningEv @ 1814 NONAME
+ _ZN26QDeclarativeBasePositioner14spacingChangedEv @ 1815 NONAME
+ _ZN26QDeclarativeBasePositioner16staticMetaObjectE @ 1816 NONAME DATA 16
+ _ZN26QDeclarativeBasePositioner17componentCompleteEv @ 1817 NONAME
+ _ZN26QDeclarativeBasePositioner19getStaticMetaObjectEv @ 1818 NONAME
+ _ZN26QDeclarativeBasePositioner22finishApplyTransitionsEv @ 1819 NONAME
+ _ZN26QDeclarativeBasePositioner6setAddEP22QDeclarativeTransition @ 1820 NONAME
+ _ZN26QDeclarativeBasePositioner7setMoveEP22QDeclarativeTransition @ 1821 NONAME
+ _ZN26QDeclarativeBasePositioner9positionXEiRKNS_14PositionedItemE @ 1822 NONAME
+ _ZN26QDeclarativeBasePositioner9positionYEiRKNS_14PositionedItemE @ 1823 NONAME
+ _ZN26QDeclarativeBasePositionerC2ENS_14PositionerTypeEP16QDeclarativeItem @ 1824 NONAME
+ _ZN26QDeclarativeBasePositionerC2ER33QDeclarativeBasePositionerPrivateNS_14PositionerTypeEP16QDeclarativeItem @ 1825 NONAME
+ _ZN26QDeclarativeBasePositionerD0Ev @ 1826 NONAME
+ _ZN26QDeclarativeBasePositionerD1Ev @ 1827 NONAME
+ _ZN26QDeclarativeBasePositionerD2Ev @ 1828 NONAME
+ _ZN26QDeclarativeContextPrivate10context_atEP24QDeclarativeListPropertyI7QObjectEi @ 1829 NONAME
+ _ZN26QDeclarativeContextPrivate13context_countEP24QDeclarativeListPropertyI7QObjectE @ 1830 NONAME
+ _ZN26QDeclarativeContextPrivate13setIdPropertyEiP7QObject @ 1831 NONAME
+ _ZN26QDeclarativeContextPrivate17invalidateEnginesEv @ 1832 NONAME
+ _ZN26QDeclarativeContextPrivate17setIdPropertyDataEP24QDeclarativeIntegerCache @ 1833 NONAME
+ _ZN26QDeclarativeContextPrivate18refreshExpressionsEv @ 1834 NONAME
+ _ZN26QDeclarativeContextPrivate4initEv @ 1835 NONAME
+ _ZN26QDeclarativeContextPrivate9addScriptERKN18QDeclarativeParser6Object11ScriptBlockEP7QObject @ 1836 NONAME
+ _ZN26QDeclarativeContextPrivate9destroyedEPNS_12ContextGuardE @ 1837 NONAME
+ _ZN26QDeclarativeContextPrivateC1Ev @ 1838 NONAME
+ _ZN26QDeclarativeContextPrivateC2Ev @ 1839 NONAME
+ _ZN26QDeclarativeDebuggerStatus16setSelectedStateEb @ 1840 NONAME
+ _ZN26QDeclarativeDebuggerStatusD0Ev @ 1841 NONAME
+ _ZN26QDeclarativeDebuggerStatusD1Ev @ 1842 NONAME
+ _ZN26QDeclarativeDebuggerStatusD2Ev @ 1843 NONAME
+ _ZN26QDeclarativeOpenMetaObject12initialValueEi @ 1844 NONAME
+ _ZN26QDeclarativeOpenMetaObject12propertyReadEi @ 1845 NONAME
+ _ZN26QDeclarativeOpenMetaObject13propertyWriteEi @ 1846 NONAME
+ _ZN26QDeclarativeOpenMetaObject14createPropertyEPKcS1_ @ 1847 NONAME
+ _ZN26QDeclarativeOpenMetaObject15propertyCreatedEiR20QMetaPropertyBuilder @ 1848 NONAME
+ _ZN26QDeclarativeOpenMetaObject8metaCallEN11QMetaObject4CallEiPPv @ 1849 NONAME
+ _ZN26QDeclarativeOpenMetaObject8setValueERK10QByteArrayRK8QVariant @ 1850 NONAME
+ _ZN26QDeclarativeOpenMetaObject8setValueEiRK8QVariant @ 1851 NONAME
+ _ZN26QDeclarativeOpenMetaObject9setCachedEb @ 1852 NONAME
+ _ZN26QDeclarativeOpenMetaObjectC1EP7QObjectP30QDeclarativeOpenMetaObjectTypeb @ 1853 NONAME
+ _ZN26QDeclarativeOpenMetaObjectC1EP7QObjectb @ 1854 NONAME
+ _ZN26QDeclarativeOpenMetaObjectC2EP7QObjectP30QDeclarativeOpenMetaObjectTypeb @ 1855 NONAME
+ _ZN26QDeclarativeOpenMetaObjectC2EP7QObjectb @ 1856 NONAME
+ _ZN26QDeclarativeOpenMetaObjectD0Ev @ 1857 NONAME
+ _ZN26QDeclarativeOpenMetaObjectD1Ev @ 1858 NONAME
+ _ZN26QDeclarativeOpenMetaObjectD2Ev @ 1859 NONAME
+ _ZN26QDeclarativeOpenMetaObjectixERK10QByteArray @ 1860 NONAME
+ _ZN26QDeclarativeParticleMotion11qt_metacallEN11QMetaObject4CallEiPPv @ 1861 NONAME
+ _ZN26QDeclarativeParticleMotion11qt_metacastEPKc @ 1862 NONAME
+ _ZN26QDeclarativeParticleMotion16staticMetaObjectE @ 1863 NONAME DATA 16
+ _ZN26QDeclarativeParticleMotion19getStaticMetaObjectEv @ 1864 NONAME
+ _ZN26QDeclarativeParticleMotion7advanceER20QDeclarativeParticlei @ 1865 NONAME
+ _ZN26QDeclarativeParticleMotion7createdER20QDeclarativeParticle @ 1866 NONAME
+ _ZN26QDeclarativeParticleMotion7destroyER20QDeclarativeParticle @ 1867 NONAME
+ _ZN26QDeclarativeParticleMotionC1EP7QObject @ 1868 NONAME
+ _ZN26QDeclarativeParticleMotionC2EP7QObject @ 1869 NONAME
+ _ZN26QDeclarativeStateOperation11qt_metacallEN11QMetaObject4CallEiPPv @ 1870 NONAME
+ _ZN26QDeclarativeStateOperation11qt_metacastEPKc @ 1871 NONAME
+ _ZN26QDeclarativeStateOperation16staticMetaObjectE @ 1872 NONAME DATA 16
+ _ZN26QDeclarativeStateOperation19getStaticMetaObjectEv @ 1873 NONAME
+ _ZN26QDeclarativeStateOperation7actionsEv @ 1874 NONAME
+ _ZN26QDeclarativeStateOperationC1ER14QObjectPrivateP7QObject @ 1875 NONAME
+ _ZN26QDeclarativeStateOperationC2ER14QObjectPrivateP7QObject @ 1876 NONAME
+ _ZN27QDeclarativeDebugConnection11qt_metacallEN11QMetaObject4CallEiPPv @ 1877 NONAME
+ _ZN27QDeclarativeDebugConnection11qt_metacastEPKc @ 1878 NONAME
+ _ZN27QDeclarativeDebugConnection16staticMetaObjectE @ 1879 NONAME DATA 16
+ _ZN27QDeclarativeDebugConnection19getStaticMetaObjectEv @ 1880 NONAME
+ _ZN27QDeclarativeDebugConnectionC1EP7QObject @ 1881 NONAME
+ _ZN27QDeclarativeDebugConnectionC2EP7QObject @ 1882 NONAME
+ _ZN27QDeclarativeDomValueBindingC1ERKS_ @ 1883 NONAME
+ _ZN27QDeclarativeDomValueBindingC1Ev @ 1884 NONAME
+ _ZN27QDeclarativeDomValueBindingC2ERKS_ @ 1885 NONAME
+ _ZN27QDeclarativeDomValueBindingC2Ev @ 1886 NONAME
+ _ZN27QDeclarativeDomValueBindingD1Ev @ 1887 NONAME
+ _ZN27QDeclarativeDomValueBindingD2Ev @ 1888 NONAME
+ _ZN27QDeclarativeDomValueBindingaSERKS_ @ 1889 NONAME
+ _ZN27QDeclarativeDomValueLiteralC1ERKS_ @ 1890 NONAME
+ _ZN27QDeclarativeDomValueLiteralC1Ev @ 1891 NONAME
+ _ZN27QDeclarativeDomValueLiteralC2ERKS_ @ 1892 NONAME
+ _ZN27QDeclarativeDomValueLiteralC2Ev @ 1893 NONAME
+ _ZN27QDeclarativeDomValueLiteralD1Ev @ 1894 NONAME
+ _ZN27QDeclarativeDomValueLiteralD2Ev @ 1895 NONAME
+ _ZN27QDeclarativeDomValueLiteralaSERKS_ @ 1896 NONAME
+ _ZN27QDeclarativeExtensionPlugin11qt_metacallEN11QMetaObject4CallEiPPv @ 1897 NONAME
+ _ZN27QDeclarativeExtensionPlugin11qt_metacastEPKc @ 1898 NONAME
+ _ZN27QDeclarativeExtensionPlugin16initializeEngineEP18QDeclarativeEnginePKc @ 1899 NONAME
+ _ZN27QDeclarativeExtensionPlugin16staticMetaObjectE @ 1900 NONAME DATA 16
+ _ZN27QDeclarativeExtensionPlugin19getStaticMetaObjectEv @ 1901 NONAME
+ _ZN27QDeclarativeExtensionPluginC2EP7QObject @ 1902 NONAME
+ _ZN27QDeclarativeExtensionPluginD0Ev @ 1903 NONAME
+ _ZN27QDeclarativeExtensionPluginD1Ev @ 1904 NONAME
+ _ZN27QDeclarativeExtensionPluginD2Ev @ 1905 NONAME
+ _ZN27QDeclarativeGridScaledImage12stringToRuleERK7QString @ 1906 NONAME
+ _ZN27QDeclarativeGridScaledImageC1EP9QIODevice @ 1907 NONAME
+ _ZN27QDeclarativeGridScaledImageC1ERKS_ @ 1908 NONAME
+ _ZN27QDeclarativeGridScaledImageC1Ev @ 1909 NONAME
+ _ZN27QDeclarativeGridScaledImageC2EP9QIODevice @ 1910 NONAME
+ _ZN27QDeclarativeGridScaledImageC2ERKS_ @ 1911 NONAME
+ _ZN27QDeclarativeGridScaledImageC2Ev @ 1912 NONAME
+ _ZN27QDeclarativeGridScaledImageaSERKS_ @ 1913 NONAME
+ _ZN27QDeclarativeNumberFormatter10classBeginEv @ 1914 NONAME
+ _ZN27QDeclarativeNumberFormatter11qt_metacallEN11QMetaObject4CallEiPPv @ 1915 NONAME
+ _ZN27QDeclarativeNumberFormatter11qt_metacastEPKc @ 1916 NONAME
+ _ZN27QDeclarativeNumberFormatter11textChangedEv @ 1917 NONAME
+ _ZN27QDeclarativeNumberFormatter16staticMetaObjectE @ 1918 NONAME DATA 16
+ _ZN27QDeclarativeNumberFormatter17componentCompleteEv @ 1919 NONAME
+ _ZN27QDeclarativeNumberFormatter19getStaticMetaObjectEv @ 1920 NONAME
+ _ZN27QDeclarativeNumberFormatter9setFormatERK7QString @ 1921 NONAME
+ _ZN27QDeclarativeNumberFormatter9setNumberERKf @ 1922 NONAME
+ _ZN27QDeclarativeNumberFormatterC1EP7QObject @ 1923 NONAME
+ _ZN27QDeclarativeNumberFormatterC2EP7QObject @ 1924 NONAME
+ _ZN27QDeclarativeNumberFormatterD0Ev @ 1925 NONAME
+ _ZN27QDeclarativeNumberFormatterD1Ev @ 1926 NONAME
+ _ZN27QDeclarativeNumberFormatterD2Ev @ 1927 NONAME
+ _ZN27QDeclarativePropertyChanges11qt_metacallEN11QMetaObject4CallEiPPv @ 1928 NONAME
+ _ZN27QDeclarativePropertyChanges11qt_metacastEPKc @ 1929 NONAME
+ _ZN27QDeclarativePropertyChanges13setIsExplicitEb @ 1930 NONAME
+ _ZN27QDeclarativePropertyChanges16staticMetaObjectE @ 1931 NONAME DATA 16
+ _ZN27QDeclarativePropertyChanges19getStaticMetaObjectEv @ 1932 NONAME
+ _ZN27QDeclarativePropertyChanges21setRestoreEntryValuesEb @ 1933 NONAME
+ _ZN27QDeclarativePropertyChanges7actionsEv @ 1934 NONAME
+ _ZN27QDeclarativePropertyChanges9setObjectEP7QObject @ 1935 NONAME
+ _ZN27QDeclarativePropertyChangesC1Ev @ 1936 NONAME
+ _ZN27QDeclarativePropertyChangesC2Ev @ 1937 NONAME
+ _ZN27QDeclarativePropertyChangesD0Ev @ 1938 NONAME
+ _ZN27QDeclarativePropertyChangesD1Ev @ 1939 NONAME
+ _ZN27QDeclarativePropertyChangesD2Ev @ 1940 NONAME
+ _ZN27QDeclarativeVisualDataModel11qt_metacallEN11QMetaObject4CallEiPPv @ 1941 NONAME
+ _ZN27QDeclarativeVisualDataModel11qt_metacastEPKc @ 1942 NONAME
+ _ZN27QDeclarativeVisualDataModel11setDelegateEP21QDeclarativeComponent @ 1943 NONAME
+ _ZN27QDeclarativeVisualDataModel11stringValueEiRK7QString @ 1944 NONAME
+ _ZN27QDeclarativeVisualDataModel12_q_rowsMovedERK11QModelIndexiiS2_i @ 1945 NONAME
+ _ZN27QDeclarativeVisualDataModel12completeItemEv @ 1946 NONAME
+ _ZN27QDeclarativeVisualDataModel12setRootIndexERK11QModelIndex @ 1947 NONAME
+ _ZN27QDeclarativeVisualDataModel13_q_itemsMovedEiii @ 1948 NONAME
+ _ZN27QDeclarativeVisualDataModel13_q_modelResetEv @ 1949 NONAME
+ _ZN27QDeclarativeVisualDataModel14_q_dataChangedERK11QModelIndexS2_ @ 1950 NONAME
+ _ZN27QDeclarativeVisualDataModel14_q_rowsRemovedERK11QModelIndexii @ 1951 NONAME
+ _ZN27QDeclarativeVisualDataModel14createdPackageEiP19QDeclarativePackage @ 1952 NONAME
+ _ZN27QDeclarativeVisualDataModel15_q_itemsChangedEiiRK5QListIiE @ 1953 NONAME
+ _ZN27QDeclarativeVisualDataModel15_q_itemsRemovedEii @ 1954 NONAME
+ _ZN27QDeclarativeVisualDataModel15_q_rowsInsertedERK11QModelIndexii @ 1955 NONAME
+ _ZN27QDeclarativeVisualDataModel16_q_itemsInsertedEii @ 1956 NONAME
+ _ZN27QDeclarativeVisualDataModel16rootIndexChangedEv @ 1957 NONAME
+ _ZN27QDeclarativeVisualDataModel16staticMetaObjectE @ 1958 NONAME DATA 16
+ _ZN27QDeclarativeVisualDataModel17_q_createdPackageEiP19QDeclarativePackage @ 1959 NONAME
+ _ZN27QDeclarativeVisualDataModel17destroyingPackageEP19QDeclarativePackage @ 1960 NONAME
+ _ZN27QDeclarativeVisualDataModel19getStaticMetaObjectEv @ 1961 NONAME
+ _ZN27QDeclarativeVisualDataModel20_q_destroyingPackageEP19QDeclarativePackage @ 1962 NONAME
+ _ZN27QDeclarativeVisualDataModel4itemEiRK10QByteArrayb @ 1963 NONAME
+ _ZN27QDeclarativeVisualDataModel4itemEib @ 1964 NONAME
+ _ZN27QDeclarativeVisualDataModel5partsEv @ 1965 NONAME
+ _ZN27QDeclarativeVisualDataModel7releaseEP16QDeclarativeItem @ 1966 NONAME
+ _ZN27QDeclarativeVisualDataModel7setPartERK7QString @ 1967 NONAME
+ _ZN27QDeclarativeVisualDataModel8evaluateEiRK7QStringP7QObject @ 1968 NONAME
+ _ZN27QDeclarativeVisualDataModel8setModelERK8QVariant @ 1969 NONAME
+ _ZN27QDeclarativeVisualDataModelC1EP19QDeclarativeContext @ 1970 NONAME
+ _ZN27QDeclarativeVisualDataModelC1Ev @ 1971 NONAME
+ _ZN27QDeclarativeVisualDataModelC2EP19QDeclarativeContext @ 1972 NONAME
+ _ZN27QDeclarativeVisualDataModelC2Ev @ 1973 NONAME
+ _ZN27QDeclarativeVisualDataModelD0Ev @ 1974 NONAME
+ _ZN27QDeclarativeVisualDataModelD1Ev @ 1975 NONAME
+ _ZN27QDeclarativeVisualDataModelD2Ev @ 1976 NONAME
+ _ZN27QDeclarativeVisualItemModel11qt_metacallEN11QMetaObject4CallEiPPv @ 1977 NONAME
+ _ZN27QDeclarativeVisualItemModel11qt_metacastEPKc @ 1978 NONAME
+ _ZN27QDeclarativeVisualItemModel11stringValueEiRK7QString @ 1979 NONAME
+ _ZN27QDeclarativeVisualItemModel12completeItemEv @ 1980 NONAME
+ _ZN27QDeclarativeVisualItemModel15childrenChangedEv @ 1981 NONAME
+ _ZN27QDeclarativeVisualItemModel16staticMetaObjectE @ 1982 NONAME DATA 16
+ _ZN27QDeclarativeVisualItemModel19getStaticMetaObjectEv @ 1983 NONAME
+ _ZN27QDeclarativeVisualItemModel21qmlAttachedPropertiesEP7QObject @ 1984 NONAME
+ _ZN27QDeclarativeVisualItemModel4itemEib @ 1985 NONAME
+ _ZN27QDeclarativeVisualItemModel7releaseEP16QDeclarativeItem @ 1986 NONAME
+ _ZN27QDeclarativeVisualItemModel8childrenEv @ 1987 NONAME
+ _ZN27QDeclarativeVisualItemModel8evaluateEiRK7QStringP7QObject @ 1988 NONAME
+ _ZN27QDeclarativeVisualItemModelC1Ev @ 1989 NONAME
+ _ZN27QDeclarativeVisualItemModelC2Ev @ 1990 NONAME
+ _ZN28QDeclarativeCustomParserNodeC1ERKS_ @ 1991 NONAME
+ _ZN28QDeclarativeCustomParserNodeC1Ev @ 1992 NONAME
+ _ZN28QDeclarativeCustomParserNodeC2ERKS_ @ 1993 NONAME
+ _ZN28QDeclarativeCustomParserNodeC2Ev @ 1994 NONAME
+ _ZN28QDeclarativeCustomParserNodeD1Ev @ 1995 NONAME
+ _ZN28QDeclarativeCustomParserNodeD2Ev @ 1996 NONAME
+ _ZN28QDeclarativeCustomParserNodeaSERKS_ @ 1997 NONAME
+ _ZN28QDeclarativeDebugObjectQuery11qt_metacallEN11QMetaObject4CallEiPPv @ 1998 NONAME
+ _ZN28QDeclarativeDebugObjectQuery11qt_metacastEPKc @ 1999 NONAME
+ _ZN28QDeclarativeDebugObjectQuery16staticMetaObjectE @ 2000 NONAME DATA 16
+ _ZN28QDeclarativeDebugObjectQuery19getStaticMetaObjectEv @ 2001 NONAME
+ _ZN28QDeclarativeDebugObjectQueryC1EP7QObject @ 2002 NONAME
+ _ZN28QDeclarativeDebugObjectQueryC2EP7QObject @ 2003 NONAME
+ _ZN28QDeclarativeDebugObjectQueryD0Ev @ 2004 NONAME
+ _ZN28QDeclarativeDebugObjectQueryD1Ev @ 2005 NONAME
+ _ZN28QDeclarativeDebugObjectQueryD2Ev @ 2006 NONAME
+ _ZN28QDeclarativeStringConverters14dateFromStringERK7QStringPb @ 2007 NONAME
+ _ZN28QDeclarativeStringConverters14timeFromStringERK7QStringPb @ 2008 NONAME
+ _ZN28QDeclarativeStringConverters15colorFromStringERK7QStringPb @ 2009 NONAME
+ _ZN28QDeclarativeStringConverters15rectFFromStringERK7QStringPb @ 2010 NONAME
+ _ZN28QDeclarativeStringConverters15sizeFFromStringERK7QStringPb @ 2011 NONAME
+ _ZN28QDeclarativeStringConverters16pointFFromStringERK7QStringPb @ 2012 NONAME
+ _ZN28QDeclarativeStringConverters17variantFromStringERK7QString @ 2013 NONAME
+ _ZN28QDeclarativeStringConverters17variantFromStringERK7QStringiPb @ 2014 NONAME
+ _ZN28QDeclarativeStringConverters18dateTimeFromStringERK7QStringPb @ 2015 NONAME
+ _ZN28QDeclarativeStringConverters18vector3DFromStringERK7QStringPb @ 2016 NONAME
+ _ZN28QDeclarativeValueTypeFactory9valueTypeEi @ 2017 NONAME
+ _ZN28QDeclarativeValueTypeFactoryC1Ev @ 2018 NONAME
+ _ZN28QDeclarativeValueTypeFactoryC2Ev @ 2019 NONAME
+ _ZN28QDeclarativeValueTypeFactoryD1Ev @ 2020 NONAME
+ _ZN28QDeclarativeValueTypeFactoryD2Ev @ 2021 NONAME
+ _ZN28QDeclarativeXmlListModelRole11qt_metacallEN11QMetaObject4CallEiPPv @ 2022 NONAME
+ _ZN28QDeclarativeXmlListModelRole11qt_metacastEPKc @ 2023 NONAME
+ _ZN28QDeclarativeXmlListModelRole16staticMetaObjectE @ 2024 NONAME DATA 16
+ _ZN28QDeclarativeXmlListModelRole19getStaticMetaObjectEv @ 2025 NONAME
+ _ZN29QDeclarativeDateTimeFormatter10classBeginEv @ 2026 NONAME
+ _ZN29QDeclarativeDateTimeFormatter11qt_metacallEN11QMetaObject4CallEiPPv @ 2027 NONAME
+ _ZN29QDeclarativeDateTimeFormatter11qt_metacastEPKc @ 2028 NONAME
+ _ZN29QDeclarativeDateTimeFormatter11setDateTimeERK9QDateTime @ 2029 NONAME
+ _ZN29QDeclarativeDateTimeFormatter11textChangedEv @ 2030 NONAME
+ _ZN29QDeclarativeDateTimeFormatter12setLongStyleEb @ 2031 NONAME
+ _ZN29QDeclarativeDateTimeFormatter13setDateFormatERK7QString @ 2032 NONAME
+ _ZN29QDeclarativeDateTimeFormatter13setTimeFormatERK7QString @ 2033 NONAME
+ _ZN29QDeclarativeDateTimeFormatter16staticMetaObjectE @ 2034 NONAME DATA 16
+ _ZN29QDeclarativeDateTimeFormatter17componentCompleteEv @ 2035 NONAME
+ _ZN29QDeclarativeDateTimeFormatter17setDateTimeFormatERK7QString @ 2036 NONAME
+ _ZN29QDeclarativeDateTimeFormatter19getStaticMetaObjectEv @ 2037 NONAME
+ _ZN29QDeclarativeDateTimeFormatter7setDateERK5QDate @ 2038 NONAME
+ _ZN29QDeclarativeDateTimeFormatter7setTimeERK5QTime @ 2039 NONAME
+ _ZN29QDeclarativeDateTimeFormatterC1EP7QObject @ 2040 NONAME
+ _ZN29QDeclarativeDateTimeFormatterC2EP7QObject @ 2041 NONAME
+ _ZN29QDeclarativeDateTimeFormatterD0Ev @ 2042 NONAME
+ _ZN29QDeclarativeDateTimeFormatterD1Ev @ 2043 NONAME
+ _ZN29QDeclarativeDateTimeFormatterD2Ev @ 2044 NONAME
+ _ZN29QDeclarativeDebugEnginesQuery11qt_metacallEN11QMetaObject4CallEiPPv @ 2045 NONAME
+ _ZN29QDeclarativeDebugEnginesQuery11qt_metacastEPKc @ 2046 NONAME
+ _ZN29QDeclarativeDebugEnginesQuery16staticMetaObjectE @ 2047 NONAME DATA 16
+ _ZN29QDeclarativeDebugEnginesQuery19getStaticMetaObjectEv @ 2048 NONAME
+ _ZN29QDeclarativeDebugEnginesQueryC1EP7QObject @ 2049 NONAME
+ _ZN29QDeclarativeDebugEnginesQueryC2EP7QObject @ 2050 NONAME
+ _ZN29QDeclarativeDebugEnginesQueryD0Ev @ 2051 NONAME
+ _ZN29QDeclarativeDebugEnginesQueryD1Ev @ 2052 NONAME
+ _ZN29QDeclarativeDebugEnginesQueryD2Ev @ 2053 NONAME
+ _ZN29QDeclarativeStateChangeScript11qt_metacallEN11QMetaObject4CallEiPPv @ 2054 NONAME
+ _ZN29QDeclarativeStateChangeScript11qt_metacastEPKc @ 2055 NONAME
+ _ZN29QDeclarativeStateChangeScript16staticMetaObjectE @ 2056 NONAME DATA 16
+ _ZN29QDeclarativeStateChangeScript19getStaticMetaObjectEv @ 2057 NONAME
+ _ZN29QDeclarativeStateChangeScript7actionsEv @ 2058 NONAME
+ _ZN29QDeclarativeStateChangeScript7executeEv @ 2059 NONAME
+ _ZN29QDeclarativeStateChangeScript7setNameERK7QString @ 2060 NONAME
+ _ZN29QDeclarativeStateChangeScript9setScriptERK24QDeclarativeScriptString @ 2061 NONAME
+ _ZN29QDeclarativeStateChangeScriptC1EP7QObject @ 2062 NONAME
+ _ZN29QDeclarativeStateChangeScriptC2EP7QObject @ 2063 NONAME
+ _ZN29QDeclarativeStateChangeScriptD0Ev @ 2064 NONAME
+ _ZN29QDeclarativeStateChangeScriptD1Ev @ 2065 NONAME
+ _ZN29QDeclarativeStateChangeScriptD2Ev @ 2066 NONAME
+ _ZN30QDeclarativeDebugFileReference13setLineNumberEi @ 2067 NONAME
+ _ZN30QDeclarativeDebugFileReference15setColumnNumberEi @ 2068 NONAME
+ _ZN30QDeclarativeDebugFileReference6setUrlERK4QUrl @ 2069 NONAME
+ _ZN30QDeclarativeDebugFileReferenceC1ERKS_ @ 2070 NONAME
+ _ZN30QDeclarativeDebugFileReferenceC1Ev @ 2071 NONAME
+ _ZN30QDeclarativeDebugFileReferenceC2ERKS_ @ 2072 NONAME
+ _ZN30QDeclarativeDebugFileReferenceC2Ev @ 2073 NONAME
+ _ZN30QDeclarativeDebugFileReferenceaSERKS_ @ 2074 NONAME
+ _ZN30QDeclarativeDebugPropertyWatch11qt_metacallEN11QMetaObject4CallEiPPv @ 2075 NONAME
+ _ZN30QDeclarativeDebugPropertyWatch11qt_metacastEPKc @ 2076 NONAME
+ _ZN30QDeclarativeDebugPropertyWatch16staticMetaObjectE @ 2077 NONAME DATA 16
+ _ZN30QDeclarativeDebugPropertyWatch19getStaticMetaObjectEv @ 2078 NONAME
+ _ZN30QDeclarativeDebugPropertyWatchC1EP7QObject @ 2079 NONAME
+ _ZN30QDeclarativeDebugPropertyWatchC2EP7QObject @ 2080 NONAME
+ _ZN30QDeclarativeDomDynamicPropertyC1ERKS_ @ 2081 NONAME
+ _ZN30QDeclarativeDomDynamicPropertyC1Ev @ 2082 NONAME
+ _ZN30QDeclarativeDomDynamicPropertyC2ERKS_ @ 2083 NONAME
+ _ZN30QDeclarativeDomDynamicPropertyC2Ev @ 2084 NONAME
+ _ZN30QDeclarativeDomDynamicPropertyD1Ev @ 2085 NONAME
+ _ZN30QDeclarativeDomDynamicPropertyD2Ev @ 2086 NONAME
+ _ZN30QDeclarativeDomDynamicPropertyaSERKS_ @ 2087 NONAME
+ _ZN30QDeclarativeOpenMetaObjectType14createPropertyERK10QByteArray @ 2088 NONAME
+ _ZN30QDeclarativeOpenMetaObjectType15propertyCreatedEiR20QMetaPropertyBuilder @ 2089 NONAME
+ _ZN30QDeclarativeOpenMetaObjectTypeC1EPK11QMetaObjectP18QDeclarativeEngine @ 2090 NONAME
+ _ZN30QDeclarativeOpenMetaObjectTypeC2EPK11QMetaObjectP18QDeclarativeEngine @ 2091 NONAME
+ _ZN30QDeclarativeOpenMetaObjectTypeD0Ev @ 2092 NONAME
+ _ZN30QDeclarativeOpenMetaObjectTypeD1Ev @ 2093 NONAME
+ _ZN30QDeclarativeOpenMetaObjectTypeD2Ev @ 2094 NONAME
+ _ZN31QDeclarativeDomValueValueSourceC1ERKS_ @ 2095 NONAME
+ _ZN31QDeclarativeDomValueValueSourceC1Ev @ 2096 NONAME
+ _ZN31QDeclarativeDomValueValueSourceC2ERKS_ @ 2097 NONAME
+ _ZN31QDeclarativeDomValueValueSourceC2Ev @ 2098 NONAME
+ _ZN31QDeclarativeDomValueValueSourceD1Ev @ 2099 NONAME
+ _ZN31QDeclarativeDomValueValueSourceD2Ev @ 2100 NONAME
+ _ZN31QDeclarativeDomValueValueSourceaSERKS_ @ 2101 NONAME
+ _ZN31QDeclarativePropertyValueSourceC2Ev @ 2102 NONAME
+ _ZN31QDeclarativePropertyValueSourceD0Ev @ 2103 NONAME
+ _ZN31QDeclarativePropertyValueSourceD1Ev @ 2104 NONAME
+ _ZN31QDeclarativePropertyValueSourceD2Ev @ 2105 NONAME
+ _ZN32QDeclarativeCustomParserPropertyC1ERKS_ @ 2106 NONAME
+ _ZN32QDeclarativeCustomParserPropertyC1Ev @ 2107 NONAME
+ _ZN32QDeclarativeCustomParserPropertyC2ERKS_ @ 2108 NONAME
+ _ZN32QDeclarativeCustomParserPropertyC2Ev @ 2109 NONAME
+ _ZN32QDeclarativeCustomParserPropertyD1Ev @ 2110 NONAME
+ _ZN32QDeclarativeCustomParserPropertyD2Ev @ 2111 NONAME
+ _ZN32QDeclarativeCustomParserPropertyaSERKS_ @ 2112 NONAME
+ _ZN32QDeclarativeDebugEngineReferenceC1ERKS_ @ 2113 NONAME
+ _ZN32QDeclarativeDebugEngineReferenceC1Ei @ 2114 NONAME
+ _ZN32QDeclarativeDebugEngineReferenceC1Ev @ 2115 NONAME
+ _ZN32QDeclarativeDebugEngineReferenceC2ERKS_ @ 2116 NONAME
+ _ZN32QDeclarativeDebugEngineReferenceC2Ei @ 2117 NONAME
+ _ZN32QDeclarativeDebugEngineReferenceC2Ev @ 2118 NONAME
+ _ZN32QDeclarativeDebugEngineReferenceaSERKS_ @ 2119 NONAME
+ _ZN32QDeclarativeDebugExpressionQuery11qt_metacallEN11QMetaObject4CallEiPPv @ 2120 NONAME
+ _ZN32QDeclarativeDebugExpressionQuery11qt_metacastEPKc @ 2121 NONAME
+ _ZN32QDeclarativeDebugExpressionQuery16staticMetaObjectE @ 2122 NONAME DATA 16
+ _ZN32QDeclarativeDebugExpressionQuery19getStaticMetaObjectEv @ 2123 NONAME
+ _ZN32QDeclarativeDebugExpressionQueryC1EP7QObject @ 2124 NONAME
+ _ZN32QDeclarativeDebugExpressionQueryC2EP7QObject @ 2125 NONAME
+ _ZN32QDeclarativeDebugExpressionQueryD0Ev @ 2126 NONAME
+ _ZN32QDeclarativeDebugExpressionQueryD1Ev @ 2127 NONAME
+ _ZN32QDeclarativeDebugExpressionQueryD2Ev @ 2128 NONAME
+ _ZN32QDeclarativeDebugObjectReferenceC1ERKS_ @ 2129 NONAME
+ _ZN32QDeclarativeDebugObjectReferenceC1Ei @ 2130 NONAME
+ _ZN32QDeclarativeDebugObjectReferenceC1Ev @ 2131 NONAME
+ _ZN32QDeclarativeDebugObjectReferenceC2ERKS_ @ 2132 NONAME
+ _ZN32QDeclarativeDebugObjectReferenceC2Ei @ 2133 NONAME
+ _ZN32QDeclarativeDebugObjectReferenceC2Ev @ 2134 NONAME
+ _ZN32QDeclarativeDebugObjectReferenceaSERKS_ @ 2135 NONAME
+ _ZN32QDeclarativeParticleMotionLinear11qt_metacallEN11QMetaObject4CallEiPPv @ 2136 NONAME
+ _ZN32QDeclarativeParticleMotionLinear11qt_metacastEPKc @ 2137 NONAME
+ _ZN32QDeclarativeParticleMotionLinear16staticMetaObjectE @ 2138 NONAME DATA 16
+ _ZN32QDeclarativeParticleMotionLinear19getStaticMetaObjectEv @ 2139 NONAME
+ _ZN32QDeclarativeParticleMotionLinear7advanceER20QDeclarativeParticlei @ 2140 NONAME
+ _ZN32QDeclarativeParticleMotionWander11paceChangedEv @ 2141 NONAME
+ _ZN32QDeclarativeParticleMotionWander11qt_metacallEN11QMetaObject4CallEiPPv @ 2142 NONAME
+ _ZN32QDeclarativeParticleMotionWander11qt_metacastEPKc @ 2143 NONAME
+ _ZN32QDeclarativeParticleMotionWander12setXVarianceEf @ 2144 NONAME
+ _ZN32QDeclarativeParticleMotionWander12setYVarianceEf @ 2145 NONAME
+ _ZN32QDeclarativeParticleMotionWander16staticMetaObjectE @ 2146 NONAME DATA 16
+ _ZN32QDeclarativeParticleMotionWander16xvarianceChangedEv @ 2147 NONAME
+ _ZN32QDeclarativeParticleMotionWander16yvarianceChangedEv @ 2148 NONAME
+ _ZN32QDeclarativeParticleMotionWander19getStaticMetaObjectEv @ 2149 NONAME
+ _ZN32QDeclarativeParticleMotionWander7advanceER20QDeclarativeParticlei @ 2150 NONAME
+ _ZN32QDeclarativeParticleMotionWander7createdER20QDeclarativeParticle @ 2151 NONAME
+ _ZN32QDeclarativeParticleMotionWander7destroyER20QDeclarativeParticle @ 2152 NONAME
+ _ZN32QDeclarativeParticleMotionWander7setPaceEf @ 2153 NONAME
+ _ZN33QDeclarativeDebugContextReferenceC1ERKS_ @ 2154 NONAME
+ _ZN33QDeclarativeDebugContextReferenceC1Ev @ 2155 NONAME
+ _ZN33QDeclarativeDebugContextReferenceC2ERKS_ @ 2156 NONAME
+ _ZN33QDeclarativeDebugContextReferenceC2Ev @ 2157 NONAME
+ _ZN33QDeclarativeDebugContextReferenceaSERKS_ @ 2158 NONAME
+ _ZN33QDeclarativeDebugRootContextQuery11qt_metacallEN11QMetaObject4CallEiPPv @ 2159 NONAME
+ _ZN33QDeclarativeDebugRootContextQuery11qt_metacastEPKc @ 2160 NONAME
+ _ZN33QDeclarativeDebugRootContextQuery16staticMetaObjectE @ 2161 NONAME DATA 16
+ _ZN33QDeclarativeDebugRootContextQuery19getStaticMetaObjectEv @ 2162 NONAME
+ _ZN33QDeclarativeDebugRootContextQueryC1EP7QObject @ 2163 NONAME
+ _ZN33QDeclarativeDebugRootContextQueryC2EP7QObject @ 2164 NONAME
+ _ZN33QDeclarativeDebugRootContextQueryD0Ev @ 2165 NONAME
+ _ZN33QDeclarativeDebugRootContextQueryD1Ev @ 2166 NONAME
+ _ZN33QDeclarativeDebugRootContextQueryD2Ev @ 2167 NONAME
+ _ZN33QDeclarativeParticleMotionGravity11qt_metacallEN11QMetaObject4CallEiPPv @ 2168 NONAME
+ _ZN33QDeclarativeParticleMotionGravity11qt_metacastEPKc @ 2169 NONAME
+ _ZN33QDeclarativeParticleMotionGravity13setXAttractorEf @ 2170 NONAME
+ _ZN33QDeclarativeParticleMotionGravity13setYAttractorEf @ 2171 NONAME
+ _ZN33QDeclarativeParticleMotionGravity15setAccelerationEf @ 2172 NONAME
+ _ZN33QDeclarativeParticleMotionGravity16staticMetaObjectE @ 2173 NONAME DATA 16
+ _ZN33QDeclarativeParticleMotionGravity17xattractorChangedEv @ 2174 NONAME
+ _ZN33QDeclarativeParticleMotionGravity17yattractorChangedEv @ 2175 NONAME
+ _ZN33QDeclarativeParticleMotionGravity19accelerationChangedEv @ 2176 NONAME
+ _ZN33QDeclarativeParticleMotionGravity19getStaticMetaObjectEv @ 2177 NONAME
+ _ZN33QDeclarativeParticleMotionGravity7advanceER20QDeclarativeParticlei @ 2178 NONAME
+ _ZN34QDeclarativeDebugPropertyReferenceC1ERKS_ @ 2179 NONAME
+ _ZN34QDeclarativeDebugPropertyReferenceC1Ev @ 2180 NONAME
+ _ZN34QDeclarativeDebugPropertyReferenceC2ERKS_ @ 2181 NONAME
+ _ZN34QDeclarativeDebugPropertyReferenceC2Ev @ 2182 NONAME
+ _ZN34QDeclarativeDebugPropertyReferenceaSERKS_ @ 2183 NONAME
+ _ZN35QDeclarativeGraphicsObjectContainer10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 2184 NONAME
+ _ZN35QDeclarativeGraphicsObjectContainer11eventFilterEP7QObjectP6QEvent @ 2185 NONAME
+ _ZN35QDeclarativeGraphicsObjectContainer11qt_metacallEN11QMetaObject4CallEiPPv @ 2186 NONAME
+ _ZN35QDeclarativeGraphicsObjectContainer11qt_metacastEPKc @ 2187 NONAME
+ _ZN35QDeclarativeGraphicsObjectContainer16staticMetaObjectE @ 2188 NONAME DATA 16
+ _ZN35QDeclarativeGraphicsObjectContainer17setGraphicsObjectEP15QGraphicsObject @ 2189 NONAME
+ _ZN35QDeclarativeGraphicsObjectContainer19getStaticMetaObjectEv @ 2190 NONAME
+ _ZN35QDeclarativeGraphicsObjectContainer23setSynchronizedResizingEb @ 2191 NONAME
+ _ZN35QDeclarativeGraphicsObjectContainerC1EP16QDeclarativeItem @ 2192 NONAME
+ _ZN35QDeclarativeGraphicsObjectContainerC2EP16QDeclarativeItem @ 2193 NONAME
+ _ZN35QDeclarativeGraphicsObjectContainerD0Ev @ 2194 NONAME
+ _ZN35QDeclarativeGraphicsObjectContainerD1Ev @ 2195 NONAME
+ _ZN35QDeclarativeGraphicsObjectContainerD2Ev @ 2196 NONAME
+ _ZN36QDeclarativeDomValueValueInterceptorC1ERKS_ @ 2197 NONAME
+ _ZN36QDeclarativeDomValueValueInterceptorC1Ev @ 2198 NONAME
+ _ZN36QDeclarativeDomValueValueInterceptorC2ERKS_ @ 2199 NONAME
+ _ZN36QDeclarativeDomValueValueInterceptorC2Ev @ 2200 NONAME
+ _ZN36QDeclarativeDomValueValueInterceptorD1Ev @ 2201 NONAME
+ _ZN36QDeclarativeDomValueValueInterceptorD2Ev @ 2202 NONAME
+ _ZN36QDeclarativeDomValueValueInterceptoraSERKS_ @ 2203 NONAME
+ _ZN36QDeclarativePropertyValueInterceptorC2Ev @ 2204 NONAME
+ _ZN36QDeclarativePropertyValueInterceptorD0Ev @ 2205 NONAME
+ _ZN36QDeclarativePropertyValueInterceptorD1Ev @ 2206 NONAME
+ _ZN36QDeclarativePropertyValueInterceptorD2Ev @ 2207 NONAME
+ _ZN38QDeclarativeDebugObjectExpressionWatch11qt_metacallEN11QMetaObject4CallEiPPv @ 2208 NONAME
+ _ZN38QDeclarativeDebugObjectExpressionWatch11qt_metacastEPKc @ 2209 NONAME
+ _ZN38QDeclarativeDebugObjectExpressionWatch16staticMetaObjectE @ 2210 NONAME DATA 16
+ _ZN38QDeclarativeDebugObjectExpressionWatch19getStaticMetaObjectEv @ 2211 NONAME
+ _ZN38QDeclarativeDebugObjectExpressionWatchC1EP7QObject @ 2212 NONAME
+ _ZN38QDeclarativeDebugObjectExpressionWatchC2EP7QObject @ 2213 NONAME
+ _ZN39QDeclarativeNetworkAccessManagerFactoryD0Ev @ 2214 NONAME
+ _ZN39QDeclarativeNetworkAccessManagerFactoryD1Ev @ 2215 NONAME
+ _ZN39QDeclarativeNetworkAccessManagerFactoryD2Ev @ 2216 NONAME
+ _ZN7QPacket5clearEv @ 2217 NONAME
+ _ZN7QPacketC1ERK10QByteArray @ 2218 NONAME
+ _ZN7QPacketC1ERKS_ @ 2219 NONAME
+ _ZN7QPacketC1Ev @ 2220 NONAME
+ _ZN7QPacketC2ERK10QByteArray @ 2221 NONAME
+ _ZN7QPacketC2ERKS_ @ 2222 NONAME
+ _ZN7QPacketC2Ev @ 2223 NONAME
+ _ZN7QPacketD0Ev @ 2224 NONAME
+ _ZN7QPacketD1Ev @ 2225 NONAME
+ _ZN7QPacketD2Ev @ 2226 NONAME
+ _ZNK15QDeclarativePen10metaObjectEv @ 2227 NONAME
+ _ZNK15QDeclarativeRow10metaObjectEv @ 2228 NONAME
+ _ZNK15QPacketProtocol10metaObjectEv @ 2229 NONAME
+ _ZNK15QPacketProtocol16packetsAvailableEv @ 2230 NONAME
+ _ZNK15QPacketProtocol17maximumPacketSizeEv @ 2231 NONAME
+ _ZNK16QDeclarativeBind10metaObjectEv @ 2232 NONAME
+ _ZNK16QDeclarativeBind4whenEv @ 2233 NONAME
+ _ZNK16QDeclarativeBind5valueEv @ 2234 NONAME
+ _ZNK16QDeclarativeBind8propertyEv @ 2235 NONAME
+ _ZNK16QDeclarativeDrag10metaObjectEv @ 2236 NONAME
+ _ZNK16QDeclarativeDrag4axisEv @ 2237 NONAME
+ _ZNK16QDeclarativeDrag4xmaxEv @ 2238 NONAME
+ _ZNK16QDeclarativeDrag4xminEv @ 2239 NONAME
+ _ZNK16QDeclarativeDrag4ymaxEv @ 2240 NONAME
+ _ZNK16QDeclarativeDrag4yminEv @ 2241 NONAME
+ _ZNK16QDeclarativeDrag6targetEv @ 2242 NONAME
+ _ZNK16QDeclarativeFlow10metaObjectEv @ 2243 NONAME
+ _ZNK16QDeclarativeFlow4flowEv @ 2244 NONAME
+ _ZNK16QDeclarativeGrid10metaObjectEv @ 2245 NONAME
+ _ZNK16QDeclarativeItem10metaObjectEv @ 2246 NONAME
+ _ZNK16QDeclarativeItem10parentItemEv @ 2247 NONAME
+ _ZNK16QDeclarativeItem10wantsFocusEv @ 2248 NONAME
+ _ZNK16QDeclarativeItem10widthValidEv @ 2249 NONAME
+ _ZNK16QDeclarativeItem11heightValidEv @ 2250 NONAME
+ _ZNK16QDeclarativeItem12boundingRectEv @ 2251 NONAME
+ _ZNK16QDeclarativeItem13implicitWidthEv @ 2252 NONAME
+ _ZNK16QDeclarativeItem13keepMouseGrabEv @ 2253 NONAME
+ _ZNK16QDeclarativeItem14baselineOffsetEv @ 2254 NONAME
+ _ZNK16QDeclarativeItem14implicitHeightEv @ 2255 NONAME
+ _ZNK16QDeclarativeItem14verticalCenterEv @ 2256 NONAME
+ _ZNK16QDeclarativeItem15transformOriginEv @ 2257 NONAME
+ _ZNK16QDeclarativeItem16horizontalCenterEv @ 2258 NONAME
+ _ZNK16QDeclarativeItem16inputMethodQueryEN2Qt16InputMethodQueryE @ 2259 NONAME
+ _ZNK16QDeclarativeItem19isComponentCompleteEv @ 2260 NONAME
+ _ZNK16QDeclarativeItem3topEv @ 2261 NONAME
+ _ZNK16QDeclarativeItem4clipEv @ 2262 NONAME
+ _ZNK16QDeclarativeItem4leftEv @ 2263 NONAME
+ _ZNK16QDeclarativeItem5rightEv @ 2264 NONAME
+ _ZNK16QDeclarativeItem5stateEv @ 2265 NONAME
+ _ZNK16QDeclarativeItem5widthEv @ 2266 NONAME
+ _ZNK16QDeclarativeItem6bottomEv @ 2267 NONAME
+ _ZNK16QDeclarativeItem6heightEv @ 2268 NONAME
+ _ZNK16QDeclarativeItem6smoothEv @ 2269 NONAME
+ _ZNK16QDeclarativeItem8baselineEv @ 2270 NONAME
+ _ZNK16QDeclarativeItem8hasFocusEv @ 2271 NONAME
+ _ZNK16QDeclarativePath10attributesEv @ 2272 NONAME
+ _ZNK16QDeclarativePath10metaObjectEv @ 2273 NONAME
+ _ZNK16QDeclarativePath11attributeAtERK7QStringf @ 2274 NONAME
+ _ZNK16QDeclarativePath16createPointCacheEv @ 2275 NONAME
+ _ZNK16QDeclarativePath4pathEv @ 2276 NONAME
+ _ZNK16QDeclarativePath6startXEv @ 2277 NONAME
+ _ZNK16QDeclarativePath6startYEv @ 2278 NONAME
+ _ZNK16QDeclarativePath7pointAtEf @ 2279 NONAME
+ _ZNK16QDeclarativePath8isClosedEv @ 2280 NONAME
+ _ZNK16QDeclarativeText10metaObjectEv @ 2281 NONAME
+ _ZNK16QDeclarativeText10styleColorEv @ 2282 NONAME
+ _ZNK16QDeclarativeText10textFormatEv @ 2283 NONAME
+ _ZNK16QDeclarativeText4fontEv @ 2284 NONAME
+ _ZNK16QDeclarativeText4textEv @ 2285 NONAME
+ _ZNK16QDeclarativeText4wrapEv @ 2286 NONAME
+ _ZNK16QDeclarativeText5colorEv @ 2287 NONAME
+ _ZNK16QDeclarativeText5styleEv @ 2288 NONAME
+ _ZNK16QDeclarativeText6hAlignEv @ 2289 NONAME
+ _ZNK16QDeclarativeText6vAlignEv @ 2290 NONAME
+ _ZNK16QDeclarativeText9elideModeEv @ 2291 NONAME
+ _ZNK16QDeclarativeType10metaObjectEv @ 2292 NONAME
+ _ZNK16QDeclarativeType11isInterfaceEv @ 2293 NONAME
+ _ZNK16QDeclarativeType11qListTypeIdEv @ 2294 NONAME
+ _ZNK16QDeclarativeType11qmlTypeNameEv @ 2295 NONAME
+ _ZNK16QDeclarativeType12customParserEv @ 2296 NONAME
+ _ZNK16QDeclarativeType12interfaceIIdEv @ 2297 NONAME
+ _ZNK16QDeclarativeType12majorVersionEv @ 2298 NONAME
+ _ZNK16QDeclarativeType12minorVersionEv @ 2299 NONAME
+ _ZNK16QDeclarativeType14baseMetaObjectEv @ 2300 NONAME
+ _ZNK16QDeclarativeType16parserStatusCastEv @ 2301 NONAME
+ _ZNK16QDeclarativeType18availableInVersionEii @ 2302 NONAME
+ _ZNK16QDeclarativeType22attachedPropertiesTypeEv @ 2303 NONAME
+ _ZNK16QDeclarativeType23propertyValueSourceCastEv @ 2304 NONAME
+ _ZNK16QDeclarativeType26attachedPropertiesFunctionEv @ 2305 NONAME
+ _ZNK16QDeclarativeType28propertyValueInterceptorCastEv @ 2306 NONAME
+ _ZNK16QDeclarativeType5indexEv @ 2307 NONAME
+ _ZNK16QDeclarativeType6createEv @ 2308 NONAME
+ _ZNK16QDeclarativeType6typeIdEv @ 2309 NONAME
+ _ZNK16QDeclarativeType8typeNameEv @ 2310 NONAME
+ _ZNK16QDeclarativeView10metaObjectEv @ 2311 NONAME
+ _ZNK16QDeclarativeView10resizeModeEv @ 2312 NONAME
+ _ZNK16QDeclarativeView10rootObjectEv @ 2313 NONAME
+ _ZNK16QDeclarativeView6errorsEv @ 2314 NONAME
+ _ZNK16QDeclarativeView6sourceEv @ 2315 NONAME
+ _ZNK16QDeclarativeView6statusEv @ 2316 NONAME
+ _ZNK16QDeclarativeView8sizeHintEv @ 2317 NONAME
+ _ZNK16QMetaEnumBuilder3keyEi @ 2318 NONAME
+ _ZNK16QMetaEnumBuilder4nameEv @ 2319 NONAME
+ _ZNK16QMetaEnumBuilder5valueEi @ 2320 NONAME
+ _ZNK16QMetaEnumBuilder6d_funcEv @ 2321 NONAME
+ _ZNK16QMetaEnumBuilder6isFlagEv @ 2322 NONAME
+ _ZNK16QMetaEnumBuilder8keyCountEv @ 2323 NONAME
+ _ZNK17QDeclarativeCurve10metaObjectEv @ 2324 NONAME
+ _ZNK17QDeclarativeCurve1xEv @ 2325 NONAME
+ _ZNK17QDeclarativeCurve1yEv @ 2326 NONAME
+ _ZNK17QDeclarativeError11descriptionEv @ 2327 NONAME
+ _ZNK17QDeclarativeError3urlEv @ 2328 NONAME
+ _ZNK17QDeclarativeError4lineEv @ 2329 NONAME
+ _ZNK17QDeclarativeError6columnEv @ 2330 NONAME
+ _ZNK17QDeclarativeError7isValidEv @ 2331 NONAME
+ _ZNK17QDeclarativeError8toStringEv @ 2332 NONAME
+ _ZNK17QDeclarativeImage10metaObjectEv @ 2333 NONAME
+ _ZNK17QDeclarativeImage12paintedWidthEv @ 2334 NONAME
+ _ZNK17QDeclarativeImage13paintedHeightEv @ 2335 NONAME
+ _ZNK17QDeclarativeImage6pixmapEv @ 2336 NONAME
+ _ZNK17QDeclarativeImage8fillModeEv @ 2337 NONAME
+ _ZNK17QDeclarativeState10metaObjectEv @ 2338 NONAME
+ _ZNK17QDeclarativeState10stateGroupEv @ 2339 NONAME
+ _ZNK17QDeclarativeState11isWhenKnownEv @ 2340 NONAME
+ _ZNK17QDeclarativeState11operationAtEi @ 2341 NONAME
+ _ZNK17QDeclarativeState14operationCountEv @ 2342 NONAME
+ _ZNK17QDeclarativeState4nameEv @ 2343 NONAME
+ _ZNK17QDeclarativeState4whenEv @ 2344 NONAME
+ _ZNK17QDeclarativeState7extendsEv @ 2345 NONAME
+ _ZNK17QDeclarativeTimer10metaObjectEv @ 2346 NONAME
+ _ZNK17QDeclarativeTimer11isRepeatingEv @ 2347 NONAME
+ _ZNK17QDeclarativeTimer16triggeredOnStartEv @ 2348 NONAME
+ _ZNK17QDeclarativeTimer8intervalEv @ 2349 NONAME
+ _ZNK17QDeclarativeTimer9isRunningEv @ 2350 NONAME
+ _ZNK18QDeclarativeColumn10metaObjectEv @ 2351 NONAME
+ _ZNK18QDeclarativeEngine10metaObjectEv @ 2352 NONAME
+ _ZNK18QDeclarativeEngine13imageProviderERK7QString @ 2353 NONAME
+ _ZNK18QDeclarativeEngine18offlineStoragePathEv @ 2354 NONAME
+ _ZNK18QDeclarativeEngine20networkAccessManagerEv @ 2355 NONAME
+ _ZNK18QDeclarativeEngine27networkAccessManagerFactoryEv @ 2356 NONAME
+ _ZNK18QDeclarativeEngine7baseUrlEv @ 2357 NONAME
+ _ZNK18QDeclarativeLoader10metaObjectEv @ 2358 NONAME
+ _ZNK18QDeclarativeLoader10resizeModeEv @ 2359 NONAME
+ _ZNK18QDeclarativeLoader15sourceComponentEv @ 2360 NONAME
+ _ZNK18QDeclarativeLoader4itemEv @ 2361 NONAME
+ _ZNK18QDeclarativeLoader6sourceEv @ 2362 NONAME
+ _ZNK18QDeclarativeLoader6statusEv @ 2363 NONAME
+ _ZNK18QDeclarativeLoader8progressEv @ 2364 NONAME
+ _ZNK18QMetaMethodBuilder10attributesEv @ 2365 NONAME
+ _ZNK18QMetaMethodBuilder10methodTypeEv @ 2366 NONAME
+ _ZNK18QMetaMethodBuilder10returnTypeEv @ 2367 NONAME
+ _ZNK18QMetaMethodBuilder14parameterNamesEv @ 2368 NONAME
+ _ZNK18QMetaMethodBuilder3tagEv @ 2369 NONAME
+ _ZNK18QMetaMethodBuilder5indexEv @ 2370 NONAME
+ _ZNK18QMetaMethodBuilder6accessEv @ 2371 NONAME
+ _ZNK18QMetaMethodBuilder6d_funcEv @ 2372 NONAME
+ _ZNK18QMetaMethodBuilder9signatureEv @ 2373 NONAME
+ _ZNK18QMetaObjectBuilder10enumeratorEi @ 2374 NONAME
+ _ZNK18QMetaObjectBuilder10superClassEv @ 2375 NONAME
+ _ZNK18QMetaObjectBuilder11constructorEi @ 2376 NONAME
+ _ZNK18QMetaObjectBuilder11methodCountEv @ 2377 NONAME
+ _ZNK18QMetaObjectBuilder12toMetaObjectEv @ 2378 NONAME
+ _ZNK18QMetaObjectBuilder13classInfoNameEi @ 2379 NONAME
+ _ZNK18QMetaObjectBuilder13propertyCountEv @ 2380 NONAME
+ _ZNK18QMetaObjectBuilder14classInfoCountEv @ 2381 NONAME
+ _ZNK18QMetaObjectBuilder14classInfoValueEi @ 2382 NONAME
+ _ZNK18QMetaObjectBuilder15enumeratorCountEv @ 2383 NONAME
+ _ZNK18QMetaObjectBuilder16constructorCountEv @ 2384 NONAME
+ _ZNK18QMetaObjectBuilder17relatedMetaObjectEi @ 2385 NONAME
+ _ZNK18QMetaObjectBuilder17toRelocatableDataEPb @ 2386 NONAME
+ _ZNK18QMetaObjectBuilder22relatedMetaObjectCountEv @ 2387 NONAME
+ _ZNK18QMetaObjectBuilder22staticMetacallFunctionEv @ 2388 NONAME
+ _ZNK18QMetaObjectBuilder5flagsEv @ 2389 NONAME
+ _ZNK18QMetaObjectBuilder6methodEi @ 2390 NONAME
+ _ZNK18QMetaObjectBuilder8propertyEi @ 2391 NONAME
+ _ZNK18QMetaObjectBuilder9classNameEv @ 2392 NONAME
+ _ZNK18QMetaObjectBuilder9serializeER11QDataStream @ 2393 NONAME
+ _ZNK19QDeclarativeAnchors10leftMarginEv @ 2394 NONAME
+ _ZNK19QDeclarativeAnchors10metaObjectEv @ 2395 NONAME
+ _ZNK19QDeclarativeAnchors11rightMarginEv @ 2396 NONAME
+ _ZNK19QDeclarativeAnchors11usedAnchorsEv @ 2397 NONAME
+ _ZNK19QDeclarativeAnchors12bottomMarginEv @ 2398 NONAME
+ _ZNK19QDeclarativeAnchors14baselineOffsetEv @ 2399 NONAME
+ _ZNK19QDeclarativeAnchors14verticalCenterEv @ 2400 NONAME
+ _ZNK19QDeclarativeAnchors16horizontalCenterEv @ 2401 NONAME
+ _ZNK19QDeclarativeAnchors20verticalCenterOffsetEv @ 2402 NONAME
+ _ZNK19QDeclarativeAnchors22horizontalCenterOffsetEv @ 2403 NONAME
+ _ZNK19QDeclarativeAnchors3topEv @ 2404 NONAME
+ _ZNK19QDeclarativeAnchors4fillEv @ 2405 NONAME
+ _ZNK19QDeclarativeAnchors4leftEv @ 2406 NONAME
+ _ZNK19QDeclarativeAnchors5rightEv @ 2407 NONAME
+ _ZNK19QDeclarativeAnchors6bottomEv @ 2408 NONAME
+ _ZNK19QDeclarativeAnchors7marginsEv @ 2409 NONAME
+ _ZNK19QDeclarativeAnchors8baselineEv @ 2410 NONAME
+ _ZNK19QDeclarativeAnchors8centerInEv @ 2411 NONAME
+ _ZNK19QDeclarativeAnchors9topMarginEv @ 2412 NONAME
+ _ZNK19QDeclarativeContext10metaObjectEv @ 2413 NONAME
+ _ZNK19QDeclarativeContext13parentContextEv @ 2414 NONAME
+ _ZNK19QDeclarativeContext15contextPropertyERK7QString @ 2415 NONAME
+ _ZNK19QDeclarativeContext6engineEv @ 2416 NONAME
+ _ZNK19QDeclarativeContext7baseUrlEv @ 2417 NONAME
+ _ZNK19QDeclarativeDomList14commaPositionsEv @ 2418 NONAME
+ _ZNK19QDeclarativeDomList6lengthEv @ 2419 NONAME
+ _ZNK19QDeclarativeDomList6valuesEv @ 2420 NONAME
+ _ZNK19QDeclarativeDomList8positionEv @ 2421 NONAME
+ _ZNK19QDeclarativeWebPage10metaObjectEv @ 2422 NONAME
+ _ZNK19QDeclarativeWebView10backActionEv @ 2423 NONAME
+ _ZNK19QDeclarativeWebView10metaObjectEv @ 2424 NONAME
+ _ZNK19QDeclarativeWebView10statusTextEv @ 2425 NONAME
+ _ZNK19QDeclarativeWebView10stopActionEv @ 2426 NONAME
+ _ZNK19QDeclarativeWebView10zoomFactorEv @ 2427 NONAME
+ _ZNK19QDeclarativeWebView12reloadActionEv @ 2428 NONAME
+ _ZNK19QDeclarativeWebView13elementAreaAtEiiii @ 2429 NONAME
+ _ZNK19QDeclarativeWebView13forwardActionEv @ 2430 NONAME
+ _ZNK19QDeclarativeWebView13pressGrabTimeEv @ 2431 NONAME
+ _ZNK19QDeclarativeWebView14preferredWidthEv @ 2432 NONAME
+ _ZNK19QDeclarativeWebView14settingsObjectEv @ 2433 NONAME
+ _ZNK19QDeclarativeWebView15newWindowParentEv @ 2434 NONAME
+ _ZNK19QDeclarativeWebView15preferredHeightEv @ 2435 NONAME
+ _ZNK19QDeclarativeWebView16renderingEnabledEv @ 2436 NONAME
+ _ZNK19QDeclarativeWebView18newWindowComponentEv @ 2437 NONAME
+ _ZNK19QDeclarativeWebView3urlEv @ 2438 NONAME
+ _ZNK19QDeclarativeWebView4htmlEv @ 2439 NONAME
+ _ZNK19QDeclarativeWebView4iconEv @ 2440 NONAME
+ _ZNK19QDeclarativeWebView4pageEv @ 2441 NONAME
+ _ZNK19QDeclarativeWebView5titleEv @ 2442 NONAME
+ _ZNK19QDeclarativeWebView6statusEv @ 2443 NONAME
+ _ZNK19QDeclarativeWebView7historyEv @ 2444 NONAME
+ _ZNK19QDeclarativeWebView8progressEv @ 2445 NONAME
+ _ZNK19QDeclarativeWebView8settingsEv @ 2446 NONAME
+ _ZNK19QListModelInterface10metaObjectEv @ 2447 NONAME
+ _ZNK20QDeclarativeBehavior10metaObjectEv @ 2448 NONAME
+ _ZNK20QDeclarativeBehavior7enabledEv @ 2449 NONAME
+ _ZNK20QDeclarativeCompiler6errorsEv @ 2450 NONAME
+ _ZNK20QDeclarativeCompiler7isErrorEv @ 2451 NONAME
+ _ZNK20QDeclarativeDomValue13isValueSourceEv @ 2452 NONAME
+ _ZNK20QDeclarativeDomValue13toValueSourceEv @ 2453 NONAME
+ _ZNK20QDeclarativeDomValue18isValueInterceptorEv @ 2454 NONAME
+ _ZNK20QDeclarativeDomValue18toValueInterceptorEv @ 2455 NONAME
+ _ZNK20QDeclarativeDomValue4typeEv @ 2456 NONAME
+ _ZNK20QDeclarativeDomValue6isListEv @ 2457 NONAME
+ _ZNK20QDeclarativeDomValue6lengthEv @ 2458 NONAME
+ _ZNK20QDeclarativeDomValue6toListEv @ 2459 NONAME
+ _ZNK20QDeclarativeDomValue8isObjectEv @ 2460 NONAME
+ _ZNK20QDeclarativeDomValue8positionEv @ 2461 NONAME
+ _ZNK20QDeclarativeDomValue8toObjectEv @ 2462 NONAME
+ _ZNK20QDeclarativeDomValue9isBindingEv @ 2463 NONAME
+ _ZNK20QDeclarativeDomValue9isInvalidEv @ 2464 NONAME
+ _ZNK20QDeclarativeDomValue9isLiteralEv @ 2465 NONAME
+ _ZNK20QDeclarativeDomValue9toBindingEv @ 2466 NONAME
+ _ZNK20QDeclarativeDomValue9toLiteralEv @ 2467 NONAME
+ _ZNK20QDeclarativeFlipable10metaObjectEv @ 2468 NONAME
+ _ZNK20QDeclarativeFlipable4sideEv @ 2469 NONAME
+ _ZNK20QDeclarativeGradient10metaObjectEv @ 2470 NONAME
+ _ZNK20QDeclarativeGradient8gradientEv @ 2471 NONAME
+ _ZNK20QDeclarativeGridView10cellHeightEv @ 2472 NONAME
+ _ZNK20QDeclarativeGridView10maxXExtentEv @ 2473 NONAME
+ _ZNK20QDeclarativeGridView10maxYExtentEv @ 2474 NONAME
+ _ZNK20QDeclarativeGridView10metaObjectEv @ 2475 NONAME
+ _ZNK20QDeclarativeGridView10minXExtentEv @ 2476 NONAME
+ _ZNK20QDeclarativeGridView10minYExtentEv @ 2477 NONAME
+ _ZNK20QDeclarativeGridView11cacheBufferEv @ 2478 NONAME
+ _ZNK20QDeclarativeGridView12currentIndexEv @ 2479 NONAME
+ _ZNK20QDeclarativeGridView13isWrapEnabledEv @ 2480 NONAME
+ _ZNK20QDeclarativeGridView27highlightFollowsCurrentItemEv @ 2481 NONAME
+ _ZNK20QDeclarativeGridView4flowEv @ 2482 NONAME
+ _ZNK20QDeclarativeGridView5countEv @ 2483 NONAME
+ _ZNK20QDeclarativeGridView5modelEv @ 2484 NONAME
+ _ZNK20QDeclarativeGridView8delegateEv @ 2485 NONAME
+ _ZNK20QDeclarativeGridView9cellWidthEv @ 2486 NONAME
+ _ZNK20QDeclarativeGridView9highlightEv @ 2487 NONAME
+ _ZNK20QDeclarativeListView10maxXExtentEv @ 2488 NONAME
+ _ZNK20QDeclarativeListView10maxYExtentEv @ 2489 NONAME
+ _ZNK20QDeclarativeListView10metaObjectEv @ 2490 NONAME
+ _ZNK20QDeclarativeListView10minXExtentEv @ 2491 NONAME
+ _ZNK20QDeclarativeListView10minYExtentEv @ 2492 NONAME
+ _ZNK20QDeclarativeListView11cacheBufferEv @ 2493 NONAME
+ _ZNK20QDeclarativeListView11orientationEv @ 2494 NONAME
+ _ZNK20QDeclarativeListView12currentIndexEv @ 2495 NONAME
+ _ZNK20QDeclarativeListView13isWrapEnabledEv @ 2496 NONAME
+ _ZNK20QDeclarativeListView14currentSectionEv @ 2497 NONAME
+ _ZNK20QDeclarativeListView18highlightMoveSpeedEv @ 2498 NONAME
+ _ZNK20QDeclarativeListView18highlightRangeModeEv @ 2499 NONAME
+ _ZNK20QDeclarativeListView20highlightResizeSpeedEv @ 2500 NONAME
+ _ZNK20QDeclarativeListView21preferredHighlightEndEv @ 2501 NONAME
+ _ZNK20QDeclarativeListView23preferredHighlightBeginEv @ 2502 NONAME
+ _ZNK20QDeclarativeListView27highlightFollowsCurrentItemEv @ 2503 NONAME
+ _ZNK20QDeclarativeListView5countEv @ 2504 NONAME
+ _ZNK20QDeclarativeListView5modelEv @ 2505 NONAME
+ _ZNK20QDeclarativeListView6footerEv @ 2506 NONAME
+ _ZNK20QDeclarativeListView6headerEv @ 2507 NONAME
+ _ZNK20QDeclarativeListView7spacingEv @ 2508 NONAME
+ _ZNK20QDeclarativeListView8delegateEv @ 2509 NONAME
+ _ZNK20QDeclarativeListView8snapModeEv @ 2510 NONAME
+ _ZNK20QDeclarativeListView9highlightEv @ 2511 NONAME
+ _ZNK20QDeclarativePathLine10metaObjectEv @ 2512 NONAME
+ _ZNK20QDeclarativePathQuad10metaObjectEv @ 2513 NONAME
+ _ZNK20QDeclarativePathQuad8controlXEv @ 2514 NONAME
+ _ZNK20QDeclarativePathQuad8controlYEv @ 2515 NONAME
+ _ZNK20QDeclarativePathView10dragMarginEv @ 2516 NONAME
+ _ZNK20QDeclarativePathView10metaObjectEv @ 2517 NONAME
+ _ZNK20QDeclarativePathView12currentIndexEv @ 2518 NONAME
+ _ZNK20QDeclarativePathView12snapPositionEv @ 2519 NONAME
+ _ZNK20QDeclarativePathView13pathItemCountEv @ 2520 NONAME
+ _ZNK20QDeclarativePathView4pathEv @ 2521 NONAME
+ _ZNK20QDeclarativePathView5countEv @ 2522 NONAME
+ _ZNK20QDeclarativePathView5modelEv @ 2523 NONAME
+ _ZNK20QDeclarativePathView6offsetEv @ 2524 NONAME
+ _ZNK20QDeclarativePathView8delegateEv @ 2525 NONAME
+ _ZNK20QDeclarativeProperty10isPropertyEv @ 2526 NONAME
+ _ZNK20QDeclarativeProperty10isWritableEv @ 2527 NONAME
+ _ZNK20QDeclarativeProperty12isDesignableEv @ 2528 NONAME
+ _ZNK20QDeclarativeProperty12isResettableEv @ 2529 NONAME
+ _ZNK20QDeclarativeProperty12propertyTypeEv @ 2530 NONAME
+ _ZNK20QDeclarativeProperty15hasNotifySignalEv @ 2531 NONAME
+ _ZNK20QDeclarativeProperty16isSignalPropertyEv @ 2532 NONAME
+ _ZNK20QDeclarativeProperty16propertyTypeNameEv @ 2533 NONAME
+ _ZNK20QDeclarativeProperty17needsNotifySignalEv @ 2534 NONAME
+ _ZNK20QDeclarativeProperty19connectNotifySignalEP7QObjectPKc @ 2535 NONAME
+ _ZNK20QDeclarativeProperty19connectNotifySignalEP7QObjecti @ 2536 NONAME
+ _ZNK20QDeclarativeProperty20propertyTypeCategoryEv @ 2537 NONAME
+ _ZNK20QDeclarativeProperty4nameEv @ 2538 NONAME
+ _ZNK20QDeclarativeProperty4readEv @ 2539 NONAME
+ _ZNK20QDeclarativeProperty4typeEv @ 2540 NONAME
+ _ZNK20QDeclarativeProperty5indexEv @ 2541 NONAME
+ _ZNK20QDeclarativeProperty5resetEv @ 2542 NONAME
+ _ZNK20QDeclarativeProperty5writeERK8QVariant @ 2543 NONAME
+ _ZNK20QDeclarativeProperty6methodEv @ 2544 NONAME
+ _ZNK20QDeclarativeProperty6objectEv @ 2545 NONAME
+ _ZNK20QDeclarativeProperty7isValidEv @ 2546 NONAME
+ _ZNK20QDeclarativeProperty8propertyEv @ 2547 NONAME
+ _ZNK20QDeclarativePropertyeqERKS_ @ 2548 NONAME
+ _ZNK20QDeclarativeRepeater10metaObjectEv @ 2549 NONAME
+ _ZNK20QDeclarativeRepeater5countEv @ 2550 NONAME
+ _ZNK20QDeclarativeRepeater5modelEv @ 2551 NONAME
+ _ZNK20QDeclarativeRepeater8delegateEv @ 2552 NONAME
+ _ZNK20QDeclarativeTextEdit10cursorRectEv @ 2553 NONAME
+ _ZNK20QDeclarativeTextEdit10isReadOnlyEv @ 2554 NONAME
+ _ZNK20QDeclarativeTextEdit10metaObjectEv @ 2555 NONAME
+ _ZNK20QDeclarativeTextEdit10textFormatEv @ 2556 NONAME
+ _ZNK20QDeclarativeTextEdit10textMarginEv @ 2557 NONAME
+ _ZNK20QDeclarativeTextEdit12focusOnPressEv @ 2558 NONAME
+ _ZNK20QDeclarativeTextEdit12selectedTextEv @ 2559 NONAME
+ _ZNK20QDeclarativeTextEdit12selectionEndEv @ 2560 NONAME
+ _ZNK20QDeclarativeTextEdit14cursorDelegateEv @ 2561 NONAME
+ _ZNK20QDeclarativeTextEdit14cursorPositionEv @ 2562 NONAME
+ _ZNK20QDeclarativeTextEdit14selectionColorEv @ 2563 NONAME
+ _ZNK20QDeclarativeTextEdit14selectionStartEv @ 2564 NONAME
+ _ZNK20QDeclarativeTextEdit15isCursorVisibleEv @ 2565 NONAME
+ _ZNK20QDeclarativeTextEdit16inputMethodQueryEN2Qt16InputMethodQueryE @ 2566 NONAME
+ _ZNK20QDeclarativeTextEdit17selectedTextColorEv @ 2567 NONAME
+ _ZNK20QDeclarativeTextEdit19persistentSelectionEv @ 2568 NONAME
+ _ZNK20QDeclarativeTextEdit20textInteractionFlagsEv @ 2569 NONAME
+ _ZNK20QDeclarativeTextEdit4fontEv @ 2570 NONAME
+ _ZNK20QDeclarativeTextEdit4textEv @ 2571 NONAME
+ _ZNK20QDeclarativeTextEdit4wrapEv @ 2572 NONAME
+ _ZNK20QDeclarativeTextEdit5colorEv @ 2573 NONAME
+ _ZNK20QDeclarativeTextEdit6hAlignEv @ 2574 NONAME
+ _ZNK20QDeclarativeTextEdit6vAlignEv @ 2575 NONAME
+ _ZNK20QMetaPropertyBuilder10isEditableEv @ 2576 NONAME
+ _ZNK20QMetaPropertyBuilder10isReadableEv @ 2577 NONAME
+ _ZNK20QMetaPropertyBuilder10isWritableEv @ 2578 NONAME
+ _ZNK20QMetaPropertyBuilder12hasStdCppSetEv @ 2579 NONAME
+ _ZNK20QMetaPropertyBuilder12isDesignableEv @ 2580 NONAME
+ _ZNK20QMetaPropertyBuilder12isEnumOrFlagEv @ 2581 NONAME
+ _ZNK20QMetaPropertyBuilder12isResettableEv @ 2582 NONAME
+ _ZNK20QMetaPropertyBuilder12isScriptableEv @ 2583 NONAME
+ _ZNK20QMetaPropertyBuilder12notifySignalEv @ 2584 NONAME
+ _ZNK20QMetaPropertyBuilder15hasNotifySignalEv @ 2585 NONAME
+ _ZNK20QMetaPropertyBuilder4nameEv @ 2586 NONAME
+ _ZNK20QMetaPropertyBuilder4typeEv @ 2587 NONAME
+ _ZNK20QMetaPropertyBuilder6d_funcEv @ 2588 NONAME
+ _ZNK20QMetaPropertyBuilder6isUserEv @ 2589 NONAME
+ _ZNK20QMetaPropertyBuilder8isStoredEv @ 2590 NONAME
+ _ZNK20QMetaPropertyBuilder9isDynamicEv @ 2591 NONAME
+ _ZNK21QDeclarativeComponent10metaObjectEv @ 2592 NONAME
+ _ZNK21QDeclarativeComponent12errorsStringEv @ 2593 NONAME
+ _ZNK21QDeclarativeComponent15creationContextEv @ 2594 NONAME
+ _ZNK21QDeclarativeComponent3urlEv @ 2595 NONAME
+ _ZNK21QDeclarativeComponent6errorsEv @ 2596 NONAME
+ _ZNK21QDeclarativeComponent6isNullEv @ 2597 NONAME
+ _ZNK21QDeclarativeComponent6statusEv @ 2598 NONAME
+ _ZNK21QDeclarativeComponent7isErrorEv @ 2599 NONAME
+ _ZNK21QDeclarativeComponent7isReadyEv @ 2600 NONAME
+ _ZNK21QDeclarativeComponent8progressEv @ 2601 NONAME
+ _ZNK21QDeclarativeComponent9isLoadingEv @ 2602 NONAME
+ _ZNK21QDeclarativeDomImport3uriEv @ 2603 NONAME
+ _ZNK21QDeclarativeDomImport4typeEv @ 2604 NONAME
+ _ZNK21QDeclarativeDomImport7versionEv @ 2605 NONAME
+ _ZNK21QDeclarativeDomImport9qualifierEv @ 2606 NONAME
+ _ZNK21QDeclarativeDomObject10objectTypeEv @ 2607 NONAME
+ _ZNK21QDeclarativeDomObject10propertiesEv @ 2608 NONAME
+ _ZNK21QDeclarativeDomObject11isComponentEv @ 2609 NONAME
+ _ZNK21QDeclarativeDomObject11toComponentEv @ 2610 NONAME
+ _ZNK21QDeclarativeDomObject12isCustomTypeEv @ 2611 NONAME
+ _ZNK21QDeclarativeDomObject14customTypeDataEv @ 2612 NONAME
+ _ZNK21QDeclarativeDomObject15dynamicPropertyERK10QByteArray @ 2613 NONAME
+ _ZNK21QDeclarativeDomObject15objectClassNameEv @ 2614 NONAME
+ _ZNK21QDeclarativeDomObject17dynamicPropertiesEv @ 2615 NONAME
+ _ZNK21QDeclarativeDomObject22objectTypeMajorVersionEv @ 2616 NONAME
+ _ZNK21QDeclarativeDomObject22objectTypeMinorVersionEv @ 2617 NONAME
+ _ZNK21QDeclarativeDomObject3urlEv @ 2618 NONAME
+ _ZNK21QDeclarativeDomObject6lengthEv @ 2619 NONAME
+ _ZNK21QDeclarativeDomObject7isValidEv @ 2620 NONAME
+ _ZNK21QDeclarativeDomObject8objectIdEv @ 2621 NONAME
+ _ZNK21QDeclarativeDomObject8positionEv @ 2622 NONAME
+ _ZNK21QDeclarativeDomObject8propertyERK10QByteArray @ 2623 NONAME
+ _ZNK21QDeclarativeFlickable10isFlickingEv @ 2624 NONAME
+ _ZNK21QDeclarativeFlickable10maxXExtentEv @ 2625 NONAME
+ _ZNK21QDeclarativeFlickable10maxYExtentEv @ 2626 NONAME
+ _ZNK21QDeclarativeFlickable10metaObjectEv @ 2627 NONAME
+ _ZNK21QDeclarativeFlickable10minXExtentEv @ 2628 NONAME
+ _ZNK21QDeclarativeFlickable10minYExtentEv @ 2629 NONAME
+ _ZNK21QDeclarativeFlickable10pressDelayEv @ 2630 NONAME
+ _ZNK21QDeclarativeFlickable12contentWidthEv @ 2631 NONAME
+ _ZNK21QDeclarativeFlickable13contentHeightEv @ 2632 NONAME
+ _ZNK21QDeclarativeFlickable13isInteractiveEv @ 2633 NONAME
+ _ZNK21QDeclarativeFlickable14flickDirectionEv @ 2634 NONAME
+ _ZNK21QDeclarativeFlickable14isAtXBeginningEv @ 2635 NONAME
+ _ZNK21QDeclarativeFlickable14isAtYBeginningEv @ 2636 NONAME
+ _ZNK21QDeclarativeFlickable16verticalVelocityEv @ 2637 NONAME
+ _ZNK21QDeclarativeFlickable17flickDecelerationEv @ 2638 NONAME
+ _ZNK21QDeclarativeFlickable18horizontalVelocityEv @ 2639 NONAME
+ _ZNK21QDeclarativeFlickable20maximumFlickVelocityEv @ 2640 NONAME
+ _ZNK21QDeclarativeFlickable6vWidthEv @ 2641 NONAME
+ _ZNK21QDeclarativeFlickable6xflickEv @ 2642 NONAME
+ _ZNK21QDeclarativeFlickable6yflickEv @ 2643 NONAME
+ _ZNK21QDeclarativeFlickable7vHeightEv @ 2644 NONAME
+ _ZNK21QDeclarativeFlickable8contentXEv @ 2645 NONAME
+ _ZNK21QDeclarativeFlickable8contentYEv @ 2646 NONAME
+ _ZNK21QDeclarativeFlickable8isAtXEndEv @ 2647 NONAME
+ _ZNK21QDeclarativeFlickable8isAtYEndEv @ 2648 NONAME
+ _ZNK21QDeclarativeFlickable8isMovingEv @ 2649 NONAME
+ _ZNK21QDeclarativeFlickable9overShootEv @ 2650 NONAME
+ _ZNK21QDeclarativeImageBase10metaObjectEv @ 2651 NONAME
+ _ZNK21QDeclarativeImageBase12asynchronousEv @ 2652 NONAME
+ _ZNK21QDeclarativeImageBase6sourceEv @ 2653 NONAME
+ _ZNK21QDeclarativeImageBase6statusEv @ 2654 NONAME
+ _ZNK21QDeclarativeImageBase8progressEv @ 2655 NONAME
+ _ZNK21QDeclarativeListModel10checkRolesEv @ 2656 NONAME
+ _ZNK21QDeclarativeListModel10metaObjectEv @ 2657 NONAME
+ _ZNK21QDeclarativeListModel12valueForNodeEP9ModelNode @ 2658 NONAME
+ _ZNK21QDeclarativeListModel3getEi @ 2659 NONAME
+ _ZNK21QDeclarativeListModel4dataEiRK5QListIiE @ 2660 NONAME
+ _ZNK21QDeclarativeListModel4dataEii @ 2661 NONAME
+ _ZNK21QDeclarativeListModel5countEv @ 2662 NONAME
+ _ZNK21QDeclarativeListModel5rolesEv @ 2663 NONAME
+ _ZNK21QDeclarativeListModel7addRoleERK7QString @ 2664 NONAME
+ _ZNK21QDeclarativeListModel8toStringEi @ 2665 NONAME
+ _ZNK21QDeclarativeMouseArea10metaObjectEv @ 2666 NONAME
+ _ZNK21QDeclarativeMouseArea14pressedButtonsEv @ 2667 NONAME
+ _ZNK21QDeclarativeMouseArea15acceptedButtonsEv @ 2668 NONAME
+ _ZNK21QDeclarativeMouseArea6mouseXEv @ 2669 NONAME
+ _ZNK21QDeclarativeMouseArea6mouseYEv @ 2670 NONAME
+ _ZNK21QDeclarativeMouseArea7hoveredEv @ 2671 NONAME
+ _ZNK21QDeclarativeMouseArea7pressedEv @ 2672 NONAME
+ _ZNK21QDeclarativeMouseArea9isEnabledEv @ 2673 NONAME
+ _ZNK21QDeclarativeParticles10metaObjectEv @ 2674 NONAME
+ _ZNK21QDeclarativeParticles12emissionRateEv @ 2675 NONAME
+ _ZNK21QDeclarativeParticles14angleDeviationEv @ 2676 NONAME
+ _ZNK21QDeclarativeParticles14fadeInDurationEv @ 2677 NONAME
+ _ZNK21QDeclarativeParticles15fadeOutDurationEv @ 2678 NONAME
+ _ZNK21QDeclarativeParticles16emissionVarianceEv @ 2679 NONAME
+ _ZNK21QDeclarativeParticles17lifeSpanDeviationEv @ 2680 NONAME
+ _ZNK21QDeclarativeParticles17velocityDeviationEv @ 2681 NONAME
+ _ZNK21QDeclarativeParticles5angleEv @ 2682 NONAME
+ _ZNK21QDeclarativeParticles5countEv @ 2683 NONAME
+ _ZNK21QDeclarativeParticles6motionEv @ 2684 NONAME
+ _ZNK21QDeclarativeParticles6sourceEv @ 2685 NONAME
+ _ZNK21QDeclarativeParticles8lifeSpanEv @ 2686 NONAME
+ _ZNK21QDeclarativeParticles8velocityEv @ 2687 NONAME
+ _ZNK21QDeclarativePathCubic10metaObjectEv @ 2688 NONAME
+ _ZNK21QDeclarativePathCubic9control1XEv @ 2689 NONAME
+ _ZNK21QDeclarativePathCubic9control1YEv @ 2690 NONAME
+ _ZNK21QDeclarativePathCubic9control2XEv @ 2691 NONAME
+ _ZNK21QDeclarativePathCubic9control2YEv @ 2692 NONAME
+ _ZNK21QDeclarativeRectangle10metaObjectEv @ 2693 NONAME
+ _ZNK21QDeclarativeRectangle12boundingRectEv @ 2694 NONAME
+ _ZNK21QDeclarativeRectangle5colorEv @ 2695 NONAME
+ _ZNK21QDeclarativeRectangle6radiusEv @ 2696 NONAME
+ _ZNK21QDeclarativeRectangle8gradientEv @ 2697 NONAME
+ _ZNK21QDeclarativeScaleGrid10metaObjectEv @ 2698 NONAME
+ _ZNK21QDeclarativeScaleGrid6isNullEv @ 2699 NONAME
+ _ZNK21QDeclarativeTextInput10cursorRectEv @ 2700 NONAME
+ _ZNK21QDeclarativeTextInput10isReadOnlyEv @ 2701 NONAME
+ _ZNK21QDeclarativeTextInput10metaObjectEv @ 2702 NONAME
+ _ZNK21QDeclarativeTextInput12focusOnPressEv @ 2703 NONAME
+ _ZNK21QDeclarativeTextInput12selectedTextEv @ 2704 NONAME
+ _ZNK21QDeclarativeTextInput12selectionEndEv @ 2705 NONAME
+ _ZNK21QDeclarativeTextInput14cursorDelegateEv @ 2706 NONAME
+ _ZNK21QDeclarativeTextInput14cursorPositionEv @ 2707 NONAME
+ _ZNK21QDeclarativeTextInput14selectionColorEv @ 2708 NONAME
+ _ZNK21QDeclarativeTextInput14selectionStartEv @ 2709 NONAME
+ _ZNK21QDeclarativeTextInput15isCursorVisibleEv @ 2710 NONAME
+ _ZNK21QDeclarativeTextInput16inputMethodQueryEN2Qt16InputMethodQueryE @ 2711 NONAME
+ _ZNK21QDeclarativeTextInput17selectedTextColorEv @ 2712 NONAME
+ _ZNK21QDeclarativeTextInput18hasAcceptableInputEv @ 2713 NONAME
+ _ZNK21QDeclarativeTextInput4fontEv @ 2714 NONAME
+ _ZNK21QDeclarativeTextInput4textEv @ 2715 NONAME
+ _ZNK21QDeclarativeTextInput5colorEv @ 2716 NONAME
+ _ZNK21QDeclarativeTextInput6hAlignEv @ 2717 NONAME
+ _ZNK21QDeclarativeTextInput8echoModeEv @ 2718 NONAME
+ _ZNK21QDeclarativeTextInput9inputMaskEv @ 2719 NONAME
+ _ZNK21QDeclarativeTextInput9maxLengthEv @ 2720 NONAME
+ _ZNK21QDeclarativeTextInput9validatorEv @ 2721 NONAME
+ _ZNK21QDeclarativeValueType10metaObjectEv @ 2722 NONAME
+ _ZNK22QDeclarativeDebugQuery10metaObjectEv @ 2723 NONAME
+ _ZNK22QDeclarativeDebugQuery5stateEv @ 2724 NONAME
+ _ZNK22QDeclarativeDebugQuery9isWaitingEv @ 2725 NONAME
+ _ZNK22QDeclarativeDebugWatch10metaObjectEv @ 2726 NONAME
+ _ZNK22QDeclarativeDebugWatch13objectDebugIdEv @ 2727 NONAME
+ _ZNK22QDeclarativeDebugWatch5stateEv @ 2728 NONAME
+ _ZNK22QDeclarativeDebugWatch7queryIdEv @ 2729 NONAME
+ _ZNK22QDeclarativeEaseFollow10metaObjectEv @ 2730 NONAME
+ _ZNK22QDeclarativeEaseFollow11sourceValueEv @ 2731 NONAME
+ _ZNK22QDeclarativeEaseFollow13reversingModeEv @ 2732 NONAME
+ _ZNK22QDeclarativeEaseFollow17maximumEasingTimeEv @ 2733 NONAME
+ _ZNK22QDeclarativeEaseFollow7enabledEv @ 2734 NONAME
+ _ZNK22QDeclarativeEaseFollow8durationEv @ 2735 NONAME
+ _ZNK22QDeclarativeEaseFollow8velocityEv @ 2736 NONAME
+ _ZNK22QDeclarativeExpression10expressionEv @ 2737 NONAME
+ _ZNK22QDeclarativeExpression10lineNumberEv @ 2738 NONAME
+ _ZNK22QDeclarativeExpression10metaObjectEv @ 2739 NONAME
+ _ZNK22QDeclarativeExpression10sourceFileEv @ 2740 NONAME
+ _ZNK22QDeclarativeExpression11scopeObjectEv @ 2741 NONAME
+ _ZNK22QDeclarativeExpression20notifyOnValueChangedEv @ 2742 NONAME
+ _ZNK22QDeclarativeExpression5errorEv @ 2743 NONAME
+ _ZNK22QDeclarativeExpression6engineEv @ 2744 NONAME
+ _ZNK22QDeclarativeExpression7contextEv @ 2745 NONAME
+ _ZNK22QDeclarativeExpression8hasErrorEv @ 2746 NONAME
+ _ZNK22QDeclarativeFocusPanel10metaObjectEv @ 2747 NONAME
+ _ZNK22QDeclarativeFocusScope10metaObjectEv @ 2748 NONAME
+ _ZNK22QDeclarativeFontLoader10metaObjectEv @ 2749 NONAME
+ _ZNK22QDeclarativeFontLoader4nameEv @ 2750 NONAME
+ _ZNK22QDeclarativeFontLoader6sourceEv @ 2751 NONAME
+ _ZNK22QDeclarativeFontLoader6statusEv @ 2752 NONAME
+ _ZNK22QDeclarativeStateGroup10metaObjectEv @ 2753 NONAME
+ _ZNK22QDeclarativeStateGroup5stateEv @ 2754 NONAME
+ _ZNK22QDeclarativeStateGroup6statesEv @ 2755 NONAME
+ _ZNK22QDeclarativeStateGroup9findStateERK7QString @ 2756 NONAME
+ _ZNK22QDeclarativeTransition10metaObjectEv @ 2757 NONAME
+ _ZNK22QDeclarativeTransition10reversibleEv @ 2758 NONAME
+ _ZNK22QDeclarativeTransition7toStateEv @ 2759 NONAME
+ _ZNK22QDeclarativeTransition9fromStateEv @ 2760 NONAME
+ _ZNK23QDeclarativeBorderImage10metaObjectEv @ 2761 NONAME
+ _ZNK23QDeclarativeBorderImage16verticalTileModeEv @ 2762 NONAME
+ _ZNK23QDeclarativeBorderImage18horizontalTileModeEv @ 2763 NONAME
+ _ZNK23QDeclarativeConnections10metaObjectEv @ 2764 NONAME
+ _ZNK23QDeclarativeConnections6targetEv @ 2765 NONAME
+ _ZNK23QDeclarativeDebugClient10metaObjectEv @ 2766 NONAME
+ _ZNK23QDeclarativeDebugClient11isConnectedEv @ 2767 NONAME
+ _ZNK23QDeclarativeDebugClient4nameEv @ 2768 NONAME
+ _ZNK23QDeclarativeDebugClient9isEnabledEv @ 2769 NONAME
+ _ZNK23QDeclarativeDomDocument10rootObjectEv @ 2770 NONAME
+ _ZNK23QDeclarativeDomDocument6errorsEv @ 2771 NONAME
+ _ZNK23QDeclarativeDomDocument7importsEv @ 2772 NONAME
+ _ZNK23QDeclarativeDomProperty12propertyNameEv @ 2773 NONAME
+ _ZNK23QDeclarativeDomProperty17isDefaultPropertyEv @ 2774 NONAME
+ _ZNK23QDeclarativeDomProperty17propertyNamePartsEv @ 2775 NONAME
+ _ZNK23QDeclarativeDomProperty5valueEv @ 2776 NONAME
+ _ZNK23QDeclarativeDomProperty6lengthEv @ 2777 NONAME
+ _ZNK23QDeclarativeDomProperty7isValidEv @ 2778 NONAME
+ _ZNK23QDeclarativeDomProperty8positionEv @ 2779 NONAME
+ _ZNK23QDeclarativeEngineDebug10metaObjectEv @ 2780 NONAME
+ _ZNK23QDeclarativePaintedItem10metaObjectEv @ 2781 NONAME
+ _ZNK23QDeclarativePaintedItem11smoothCacheEv @ 2782 NONAME
+ _ZNK23QDeclarativePaintedItem12contentsSizeEv @ 2783 NONAME
+ _ZNK23QDeclarativePaintedItem13contentsScaleEv @ 2784 NONAME
+ _ZNK23QDeclarativePaintedItem14pixelCacheSizeEv @ 2785 NONAME
+ _ZNK23QDeclarativePaintedItem9fillColorEv @ 2786 NONAME
+ _ZNK23QDeclarativePathElement10metaObjectEv @ 2787 NONAME
+ _ZNK23QDeclarativePathPercent10metaObjectEv @ 2788 NONAME
+ _ZNK23QDeclarativePathPercent5valueEv @ 2789 NONAME
+ _ZNK23QDeclarativePixmapReply10metaObjectEv @ 2790 NONAME
+ _ZNK23QDeclarativePixmapReply3urlEv @ 2791 NONAME
+ _ZNK23QDeclarativePixmapReply6statusEv @ 2792 NONAME
+ _ZNK23QDeclarativePixmapReply9isLoadingEv @ 2793 NONAME
+ _ZNK23QDeclarativePropertyMap10metaObjectEv @ 2794 NONAME
+ _ZNK23QDeclarativePropertyMap4keysEv @ 2795 NONAME
+ _ZNK23QDeclarativePropertyMap4sizeEv @ 2796 NONAME
+ _ZNK23QDeclarativePropertyMap5countEv @ 2797 NONAME
+ _ZNK23QDeclarativePropertyMap5valueERK7QString @ 2798 NONAME
+ _ZNK23QDeclarativePropertyMap7isEmptyEv @ 2799 NONAME
+ _ZNK23QDeclarativePropertyMap8containsERK7QString @ 2800 NONAME
+ _ZNK23QDeclarativePropertyMapixERK7QString @ 2801 NONAME
+ _ZNK23QDeclarativeViewSection10metaObjectEv @ 2802 NONAME
+ _ZNK23QDeclarativeVisualModel10metaObjectEv @ 2803 NONAME
+ _ZNK24QDeclarativeDebugService10metaObjectEv @ 2804 NONAME
+ _ZNK24QDeclarativeDebugService4nameEv @ 2805 NONAME
+ _ZNK24QDeclarativeDebugService9isEnabledEv @ 2806 NONAME
+ _ZNK24QDeclarativeDomComponent13componentRootEv @ 2807 NONAME
+ _ZNK24QDeclarativeGradientStop10metaObjectEv @ 2808 NONAME
+ _ZNK24QDeclarativeListAccessor2atEi @ 2809 NONAME
+ _ZNK24QDeclarativeListAccessor4listEv @ 2810 NONAME
+ _ZNK24QDeclarativeListAccessor5countEv @ 2811 NONAME
+ _ZNK24QDeclarativeListAccessor7isValidEv @ 2812 NONAME
+ _ZNK24QDeclarativeParentChange10metaObjectEv @ 2813 NONAME
+ _ZNK24QDeclarativeParentChange10scaleIsSetEv @ 2814 NONAME
+ _ZNK24QDeclarativeParentChange10widthIsSetEv @ 2815 NONAME
+ _ZNK24QDeclarativeParentChange11heightIsSetEv @ 2816 NONAME
+ _ZNK24QDeclarativeParentChange13rotationIsSetEv @ 2817 NONAME
+ _ZNK24QDeclarativeParentChange14originalParentEv @ 2818 NONAME
+ _ZNK24QDeclarativeParentChange1xEv @ 2819 NONAME
+ _ZNK24QDeclarativeParentChange1yEv @ 2820 NONAME
+ _ZNK24QDeclarativeParentChange5scaleEv @ 2821 NONAME
+ _ZNK24QDeclarativeParentChange5widthEv @ 2822 NONAME
+ _ZNK24QDeclarativeParentChange6heightEv @ 2823 NONAME
+ _ZNK24QDeclarativeParentChange6objectEv @ 2824 NONAME
+ _ZNK24QDeclarativeParentChange6parentEv @ 2825 NONAME
+ _ZNK24QDeclarativeParentChange6xIsSetEv @ 2826 NONAME
+ _ZNK24QDeclarativeParentChange6yIsSetEv @ 2827 NONAME
+ _ZNK24QDeclarativeParentChange8rotationEv @ 2828 NONAME
+ _ZNK24QDeclarativeParentChange8typeNameEv @ 2829 NONAME
+ _ZNK24QDeclarativeScriptString11scopeObjectEv @ 2830 NONAME
+ _ZNK24QDeclarativeScriptString6scriptEv @ 2831 NONAME
+ _ZNK24QDeclarativeScriptString7contextEv @ 2832 NONAME
+ _ZNK24QDeclarativeSpringFollow10metaObjectEv @ 2833 NONAME
+ _ZNK24QDeclarativeSpringFollow11sourceValueEv @ 2834 NONAME
+ _ZNK24QDeclarativeSpringFollow4massEv @ 2835 NONAME
+ _ZNK24QDeclarativeSpringFollow5valueEv @ 2836 NONAME
+ _ZNK24QDeclarativeSpringFollow6inSyncEv @ 2837 NONAME
+ _ZNK24QDeclarativeSpringFollow6springEv @ 2838 NONAME
+ _ZNK24QDeclarativeSpringFollow7dampingEv @ 2839 NONAME
+ _ZNK24QDeclarativeSpringFollow7enabledEv @ 2840 NONAME
+ _ZNK24QDeclarativeSpringFollow7epsilonEv @ 2841 NONAME
+ _ZNK24QDeclarativeSpringFollow7modulusEv @ 2842 NONAME
+ _ZNK24QDeclarativeSpringFollow8velocityEv @ 2843 NONAME
+ _ZNK24QDeclarativeXmlListModel10metaObjectEv @ 2844 NONAME
+ _ZNK24QDeclarativeXmlListModel21namespaceDeclarationsEv @ 2845 NONAME
+ _ZNK24QDeclarativeXmlListModel3xmlEv @ 2846 NONAME
+ _ZNK24QDeclarativeXmlListModel4dataEiRK5QListIiE @ 2847 NONAME
+ _ZNK24QDeclarativeXmlListModel4dataEii @ 2848 NONAME
+ _ZNK24QDeclarativeXmlListModel5countEv @ 2849 NONAME
+ _ZNK24QDeclarativeXmlListModel5queryEv @ 2850 NONAME
+ _ZNK24QDeclarativeXmlListModel5rolesEv @ 2851 NONAME
+ _ZNK24QDeclarativeXmlListModel6sourceEv @ 2852 NONAME
+ _ZNK24QDeclarativeXmlListModel6statusEv @ 2853 NONAME
+ _ZNK24QDeclarativeXmlListModel8progressEv @ 2854 NONAME
+ _ZNK24QDeclarativeXmlListModel8toStringEi @ 2855 NONAME
+ _ZNK25QDeclarativeAnchorChanges10metaObjectEv @ 2856 NONAME
+ _ZNK25QDeclarativeAnchorChanges14verticalCenterEv @ 2857 NONAME
+ _ZNK25QDeclarativeAnchorChanges16horizontalCenterEv @ 2858 NONAME
+ _ZNK25QDeclarativeAnchorChanges3topEv @ 2859 NONAME
+ _ZNK25QDeclarativeAnchorChanges4leftEv @ 2860 NONAME
+ _ZNK25QDeclarativeAnchorChanges5resetEv @ 2861 NONAME
+ _ZNK25QDeclarativeAnchorChanges5rightEv @ 2862 NONAME
+ _ZNK25QDeclarativeAnchorChanges6bottomEv @ 2863 NONAME
+ _ZNK25QDeclarativeAnchorChanges6objectEv @ 2864 NONAME
+ _ZNK25QDeclarativeAnchorChanges8baselineEv @ 2865 NONAME
+ _ZNK25QDeclarativeAnchorChanges8typeNameEv @ 2866 NONAME
+ _ZNK25QDeclarativeAnimatedImage10frameCountEv @ 2867 NONAME
+ _ZNK25QDeclarativeAnimatedImage10metaObjectEv @ 2868 NONAME
+ _ZNK25QDeclarativeAnimatedImage12currentFrameEv @ 2869 NONAME
+ _ZNK25QDeclarativeAnimatedImage8isPausedEv @ 2870 NONAME
+ _ZNK25QDeclarativeAnimatedImage9isPlayingEv @ 2871 NONAME
+ _ZNK25QDeclarativeListReference15listElementTypeEv @ 2872 NONAME
+ _ZNK25QDeclarativeListReference2atEi @ 2873 NONAME
+ _ZNK25QDeclarativeListReference5canAtEv @ 2874 NONAME
+ _ZNK25QDeclarativeListReference5clearEv @ 2875 NONAME
+ _ZNK25QDeclarativeListReference5countEv @ 2876 NONAME
+ _ZNK25QDeclarativeListReference6appendEP7QObject @ 2877 NONAME
+ _ZNK25QDeclarativeListReference6objectEv @ 2878 NONAME
+ _ZNK25QDeclarativeListReference7isValidEv @ 2879 NONAME
+ _ZNK25QDeclarativeListReference8canClearEv @ 2880 NONAME
+ _ZNK25QDeclarativeListReference8canCountEv @ 2881 NONAME
+ _ZNK25QDeclarativeListReference9canAppendEv @ 2882 NONAME
+ _ZNK25QDeclarativePathAttribute10metaObjectEv @ 2883 NONAME
+ _ZNK25QDeclarativePathAttribute4nameEv @ 2884 NONAME
+ _ZNK25QDeclarativePathAttribute5valueEv @ 2885 NONAME
+ _ZNK25QDeclarativeSystemPalette10buttonTextEv @ 2886 NONAME
+ _ZNK25QDeclarativeSystemPalette10colorGroupEv @ 2887 NONAME
+ _ZNK25QDeclarativeSystemPalette10metaObjectEv @ 2888 NONAME
+ _ZNK25QDeclarativeSystemPalette10windowTextEv @ 2889 NONAME
+ _ZNK25QDeclarativeSystemPalette13alternateBaseEv @ 2890 NONAME
+ _ZNK25QDeclarativeSystemPalette15highlightedTextEv @ 2891 NONAME
+ _ZNK25QDeclarativeSystemPalette3midEv @ 2892 NONAME
+ _ZNK25QDeclarativeSystemPalette4baseEv @ 2893 NONAME
+ _ZNK25QDeclarativeSystemPalette4darkEv @ 2894 NONAME
+ _ZNK25QDeclarativeSystemPalette4textEv @ 2895 NONAME
+ _ZNK25QDeclarativeSystemPalette5lightEv @ 2896 NONAME
+ _ZNK25QDeclarativeSystemPalette6buttonEv @ 2897 NONAME
+ _ZNK25QDeclarativeSystemPalette6shadowEv @ 2898 NONAME
+ _ZNK25QDeclarativeSystemPalette6windowEv @ 2899 NONAME
+ _ZNK25QDeclarativeSystemPalette8midlightEv @ 2900 NONAME
+ _ZNK25QDeclarativeSystemPalette9highlightEv @ 2901 NONAME
+ _ZNK26QDeclarativeBasePositioner10metaObjectEv @ 2902 NONAME
+ _ZNK26QDeclarativeBasePositioner3addEv @ 2903 NONAME
+ _ZNK26QDeclarativeBasePositioner4moveEv @ 2904 NONAME
+ _ZNK26QDeclarativeBasePositioner7spacingEv @ 2905 NONAME
+ _ZNK26QDeclarativeOpenMetaObject4nameEi @ 2906 NONAME
+ _ZNK26QDeclarativeOpenMetaObject4typeEv @ 2907 NONAME
+ _ZNK26QDeclarativeOpenMetaObject5countEv @ 2908 NONAME
+ _ZNK26QDeclarativeOpenMetaObject5valueERK10QByteArray @ 2909 NONAME
+ _ZNK26QDeclarativeOpenMetaObject5valueEi @ 2910 NONAME
+ _ZNK26QDeclarativeOpenMetaObject6objectEv @ 2911 NONAME
+ _ZNK26QDeclarativeOpenMetaObject6parentEv @ 2912 NONAME
+ _ZNK26QDeclarativeParticleMotion10metaObjectEv @ 2913 NONAME
+ _ZNK26QDeclarativeStateOperation10metaObjectEv @ 2914 NONAME
+ _ZNK27QDeclarativeDebugConnection10metaObjectEv @ 2915 NONAME
+ _ZNK27QDeclarativeDebugConnection11isConnectedEv @ 2916 NONAME
+ _ZNK27QDeclarativeDomValueBinding7bindingEv @ 2917 NONAME
+ _ZNK27QDeclarativeDomValueLiteral7literalEv @ 2918 NONAME
+ _ZNK27QDeclarativeExtensionPlugin10metaObjectEv @ 2919 NONAME
+ _ZNK27QDeclarativeGridScaledImage10gridBottomEv @ 2920 NONAME
+ _ZNK27QDeclarativeGridScaledImage7gridTopEv @ 2921 NONAME
+ _ZNK27QDeclarativeGridScaledImage7isValidEv @ 2922 NONAME
+ _ZNK27QDeclarativeGridScaledImage8gridLeftEv @ 2923 NONAME
+ _ZNK27QDeclarativeGridScaledImage9gridRightEv @ 2924 NONAME
+ _ZNK27QDeclarativeGridScaledImage9pixmapUrlEv @ 2925 NONAME
+ _ZNK27QDeclarativeNumberFormatter10metaObjectEv @ 2926 NONAME
+ _ZNK27QDeclarativeNumberFormatter4textEv @ 2927 NONAME
+ _ZNK27QDeclarativeNumberFormatter6formatEv @ 2928 NONAME
+ _ZNK27QDeclarativeNumberFormatter6numberEv @ 2929 NONAME
+ _ZNK27QDeclarativePropertyChanges10isExplicitEv @ 2930 NONAME
+ _ZNK27QDeclarativePropertyChanges10metaObjectEv @ 2931 NONAME
+ _ZNK27QDeclarativePropertyChanges18restoreEntryValuesEv @ 2932 NONAME
+ _ZNK27QDeclarativePropertyChanges6objectEv @ 2933 NONAME
+ _ZNK27QDeclarativeVisualDataModel10metaObjectEv @ 2934 NONAME
+ _ZNK27QDeclarativeVisualDataModel4partEv @ 2935 NONAME
+ _ZNK27QDeclarativeVisualDataModel5countEv @ 2936 NONAME
+ _ZNK27QDeclarativeVisualDataModel5modelEv @ 2937 NONAME
+ _ZNK27QDeclarativeVisualDataModel7indexOfEP16QDeclarativeItemP7QObject @ 2938 NONAME
+ _ZNK27QDeclarativeVisualDataModel8delegateEv @ 2939 NONAME
+ _ZNK27QDeclarativeVisualDataModel9rootIndexEv @ 2940 NONAME
+ _ZNK27QDeclarativeVisualItemModel10metaObjectEv @ 2941 NONAME
+ _ZNK27QDeclarativeVisualItemModel5countEv @ 2942 NONAME
+ _ZNK27QDeclarativeVisualItemModel7indexOfEP16QDeclarativeItemP7QObject @ 2943 NONAME
+ _ZNK27QDeclarativeVisualItemModel7isValidEv @ 2944 NONAME
+ _ZNK28QDeclarativeCustomParserNode10propertiesEv @ 2945 NONAME
+ _ZNK28QDeclarativeCustomParserNode4nameEv @ 2946 NONAME
+ _ZNK28QDeclarativeCustomParserNode8locationEv @ 2947 NONAME
+ _ZNK28QDeclarativeDebugObjectQuery10metaObjectEv @ 2948 NONAME
+ _ZNK28QDeclarativeDebugObjectQuery6objectEv @ 2949 NONAME
+ _ZNK28QDeclarativeXmlListModelRole10metaObjectEv @ 2950 NONAME
+ _ZNK29QDeclarativeDateTimeFormatter10dateFormatEv @ 2951 NONAME
+ _ZNK29QDeclarativeDateTimeFormatter10metaObjectEv @ 2952 NONAME
+ _ZNK29QDeclarativeDateTimeFormatter10timeFormatEv @ 2953 NONAME
+ _ZNK29QDeclarativeDateTimeFormatter12dateTimeTextEv @ 2954 NONAME
+ _ZNK29QDeclarativeDateTimeFormatter14dateTimeFormatEv @ 2955 NONAME
+ _ZNK29QDeclarativeDateTimeFormatter4dateEv @ 2956 NONAME
+ _ZNK29QDeclarativeDateTimeFormatter4timeEv @ 2957 NONAME
+ _ZNK29QDeclarativeDateTimeFormatter8dateTextEv @ 2958 NONAME
+ _ZNK29QDeclarativeDateTimeFormatter8dateTimeEv @ 2959 NONAME
+ _ZNK29QDeclarativeDateTimeFormatter8timeTextEv @ 2960 NONAME
+ _ZNK29QDeclarativeDateTimeFormatter9longStyleEv @ 2961 NONAME
+ _ZNK29QDeclarativeDebugEnginesQuery10metaObjectEv @ 2962 NONAME
+ _ZNK29QDeclarativeDebugEnginesQuery7enginesEv @ 2963 NONAME
+ _ZNK29QDeclarativeStateChangeScript10metaObjectEv @ 2964 NONAME
+ _ZNK29QDeclarativeStateChangeScript4nameEv @ 2965 NONAME
+ _ZNK29QDeclarativeStateChangeScript6scriptEv @ 2966 NONAME
+ _ZNK29QDeclarativeStateChangeScript8typeNameEv @ 2967 NONAME
+ _ZNK30QDeclarativeDebugFileReference10lineNumberEv @ 2968 NONAME
+ _ZNK30QDeclarativeDebugFileReference12columnNumberEv @ 2969 NONAME
+ _ZNK30QDeclarativeDebugFileReference3urlEv @ 2970 NONAME
+ _ZNK30QDeclarativeDebugPropertyWatch10metaObjectEv @ 2971 NONAME
+ _ZNK30QDeclarativeDebugPropertyWatch4nameEv @ 2972 NONAME
+ _ZNK30QDeclarativeDomDynamicProperty12defaultValueEv @ 2973 NONAME
+ _ZNK30QDeclarativeDomDynamicProperty12propertyNameEv @ 2974 NONAME
+ _ZNK30QDeclarativeDomDynamicProperty12propertyTypeEv @ 2975 NONAME
+ _ZNK30QDeclarativeDomDynamicProperty16propertyTypeNameEv @ 2976 NONAME
+ _ZNK30QDeclarativeDomDynamicProperty17isDefaultPropertyEv @ 2977 NONAME
+ _ZNK30QDeclarativeDomDynamicProperty6lengthEv @ 2978 NONAME
+ _ZNK30QDeclarativeDomDynamicProperty7isAliasEv @ 2979 NONAME
+ _ZNK30QDeclarativeDomDynamicProperty7isValidEv @ 2980 NONAME
+ _ZNK30QDeclarativeDomDynamicProperty8positionEv @ 2981 NONAME
+ _ZNK30QDeclarativeOpenMetaObjectType12signalOffsetEv @ 2982 NONAME
+ _ZNK30QDeclarativeOpenMetaObjectType14propertyOffsetEv @ 2983 NONAME
+ _ZNK31QDeclarativeDomValueValueSource6objectEv @ 2984 NONAME
+ _ZNK32QDeclarativeCustomParserProperty14assignedValuesEv @ 2985 NONAME
+ _ZNK32QDeclarativeCustomParserProperty4nameEv @ 2986 NONAME
+ _ZNK32QDeclarativeCustomParserProperty6isListEv @ 2987 NONAME
+ _ZNK32QDeclarativeCustomParserProperty8locationEv @ 2988 NONAME
+ _ZNK32QDeclarativeDebugEngineReference4nameEv @ 2989 NONAME
+ _ZNK32QDeclarativeDebugEngineReference7debugIdEv @ 2990 NONAME
+ _ZNK32QDeclarativeDebugExpressionQuery10expressionEv @ 2991 NONAME
+ _ZNK32QDeclarativeDebugExpressionQuery10metaObjectEv @ 2992 NONAME
+ _ZNK32QDeclarativeDebugExpressionQuery6resultEv @ 2993 NONAME
+ _ZNK32QDeclarativeDebugObjectReference10propertiesEv @ 2994 NONAME
+ _ZNK32QDeclarativeDebugObjectReference14contextDebugIdEv @ 2995 NONAME
+ _ZNK32QDeclarativeDebugObjectReference4nameEv @ 2996 NONAME
+ _ZNK32QDeclarativeDebugObjectReference6sourceEv @ 2997 NONAME
+ _ZNK32QDeclarativeDebugObjectReference7debugIdEv @ 2998 NONAME
+ _ZNK32QDeclarativeDebugObjectReference8childrenEv @ 2999 NONAME
+ _ZNK32QDeclarativeDebugObjectReference9classNameEv @ 3000 NONAME
+ _ZNK32QDeclarativeParticleMotionLinear10metaObjectEv @ 3001 NONAME
+ _ZNK32QDeclarativeParticleMotionWander10metaObjectEv @ 3002 NONAME
+ _ZNK33QDeclarativeDebugContextReference4nameEv @ 3003 NONAME
+ _ZNK33QDeclarativeDebugContextReference7debugIdEv @ 3004 NONAME
+ _ZNK33QDeclarativeDebugContextReference7objectsEv @ 3005 NONAME
+ _ZNK33QDeclarativeDebugContextReference8contextsEv @ 3006 NONAME
+ _ZNK33QDeclarativeDebugRootContextQuery10metaObjectEv @ 3007 NONAME
+ _ZNK33QDeclarativeDebugRootContextQuery11rootContextEv @ 3008 NONAME
+ _ZNK33QDeclarativeParticleMotionGravity10metaObjectEv @ 3009 NONAME
+ _ZNK34QDeclarativeDebugPropertyReference13objectDebugIdEv @ 3010 NONAME
+ _ZNK34QDeclarativeDebugPropertyReference13valueTypeNameEv @ 3011 NONAME
+ _ZNK34QDeclarativeDebugPropertyReference15hasNotifySignalEv @ 3012 NONAME
+ _ZNK34QDeclarativeDebugPropertyReference4nameEv @ 3013 NONAME
+ _ZNK34QDeclarativeDebugPropertyReference5valueEv @ 3014 NONAME
+ _ZNK34QDeclarativeDebugPropertyReference7bindingEv @ 3015 NONAME
+ _ZNK35QDeclarativeGraphicsObjectContainer10metaObjectEv @ 3016 NONAME
+ _ZNK35QDeclarativeGraphicsObjectContainer14graphicsObjectEv @ 3017 NONAME
+ _ZNK35QDeclarativeGraphicsObjectContainer20synchronizedResizingEv @ 3018 NONAME
+ _ZNK36QDeclarativeDomValueValueInterceptor6objectEv @ 3019 NONAME
+ _ZNK38QDeclarativeDebugObjectExpressionWatch10expressionEv @ 3020 NONAME
+ _ZNK38QDeclarativeDebugObjectExpressionWatch10metaObjectEv @ 3021 NONAME
+ _ZNK7QPacket7isEmptyEv @ 3022 NONAME
+ _ZTI15QDeclarativePen @ 3023 NONAME
+ _ZTI15QDeclarativeRow @ 3024 NONAME
+ _ZTI15QPacketAutoSend @ 3025 NONAME
+ _ZTI15QPacketProtocol @ 3026 NONAME
+ _ZTI16QDeclarativeBind @ 3027 NONAME
+ _ZTI16QDeclarativeDrag @ 3028 NONAME
+ _ZTI16QDeclarativeFlow @ 3029 NONAME
+ _ZTI16QDeclarativeGrid @ 3030 NONAME
+ _ZTI16QDeclarativeItem @ 3031 NONAME
+ _ZTI16QDeclarativePath @ 3032 NONAME
+ _ZTI16QDeclarativeText @ 3033 NONAME
+ _ZTI16QDeclarativeView @ 3034 NONAME
+ _ZTI17QDeclarativeCurve @ 3035 NONAME
+ _ZTI17QDeclarativeImage @ 3036 NONAME
+ _ZTI17QDeclarativeState @ 3037 NONAME
+ _ZTI17QDeclarativeTimer @ 3038 NONAME
+ _ZTI18QDeclarativeColumn @ 3039 NONAME
+ _ZTI18QDeclarativeEngine @ 3040 NONAME
+ _ZTI18QDeclarativeLoader @ 3041 NONAME
+ _ZTI18QMetaObjectBuilder @ 3042 NONAME
+ _ZTI19QDeclarativeAnchors @ 3043 NONAME
+ _ZTI19QDeclarativeContext @ 3044 NONAME
+ _ZTI19QDeclarativeWebPage @ 3045 NONAME
+ _ZTI19QDeclarativeWebView @ 3046 NONAME
+ _ZTI19QListModelInterface @ 3047 NONAME
+ _ZTI20QDeclarativeBehavior @ 3048 NONAME
+ _ZTI20QDeclarativeFlipable @ 3049 NONAME
+ _ZTI20QDeclarativeGradient @ 3050 NONAME
+ _ZTI20QDeclarativeGridView @ 3051 NONAME
+ _ZTI20QDeclarativeListView @ 3052 NONAME
+ _ZTI20QDeclarativePathLine @ 3053 NONAME
+ _ZTI20QDeclarativePathQuad @ 3054 NONAME
+ _ZTI20QDeclarativePathView @ 3055 NONAME
+ _ZTI20QDeclarativeRepeater @ 3056 NONAME
+ _ZTI20QDeclarativeTextEdit @ 3057 NONAME
+ _ZTI21QDeclarativeComponent @ 3058 NONAME
+ _ZTI21QDeclarativeFlickable @ 3059 NONAME
+ _ZTI21QDeclarativeImageBase @ 3060 NONAME
+ _ZTI21QDeclarativeListModel @ 3061 NONAME
+ _ZTI21QDeclarativeMouseArea @ 3062 NONAME
+ _ZTI21QDeclarativeParticles @ 3063 NONAME
+ _ZTI21QDeclarativePathCubic @ 3064 NONAME
+ _ZTI21QDeclarativeRectangle @ 3065 NONAME
+ _ZTI21QDeclarativeScaleGrid @ 3066 NONAME
+ _ZTI21QDeclarativeTextInput @ 3067 NONAME
+ _ZTI21QDeclarativeValueType @ 3068 NONAME
+ _ZTI22QDeclarativeDebugQuery @ 3069 NONAME
+ _ZTI22QDeclarativeDebugWatch @ 3070 NONAME
+ _ZTI22QDeclarativeEaseFollow @ 3071 NONAME
+ _ZTI22QDeclarativeExpression @ 3072 NONAME
+ _ZTI22QDeclarativeFocusPanel @ 3073 NONAME
+ _ZTI22QDeclarativeFocusScope @ 3074 NONAME
+ _ZTI22QDeclarativeFontLoader @ 3075 NONAME
+ _ZTI22QDeclarativeStateGroup @ 3076 NONAME
+ _ZTI22QDeclarativeTransition @ 3077 NONAME
+ _ZTI23QDeclarativeBorderImage @ 3078 NONAME
+ _ZTI23QDeclarativeConnections @ 3079 NONAME
+ _ZTI23QDeclarativeDebugClient @ 3080 NONAME
+ _ZTI23QDeclarativeEngineDebug @ 3081 NONAME
+ _ZTI23QDeclarativePaintedItem @ 3082 NONAME
+ _ZTI23QDeclarativePathElement @ 3083 NONAME
+ _ZTI23QDeclarativePathPercent @ 3084 NONAME
+ _ZTI23QDeclarativePixmapReply @ 3085 NONAME
+ _ZTI23QDeclarativePropertyMap @ 3086 NONAME
+ _ZTI23QDeclarativeViewSection @ 3087 NONAME
+ _ZTI23QDeclarativeVisualModel @ 3088 NONAME
+ _ZTI24QDeclarativeCustomParser @ 3089 NONAME
+ _ZTI24QDeclarativeDebugService @ 3090 NONAME
+ _ZTI24QDeclarativeGradientStop @ 3091 NONAME
+ _ZTI24QDeclarativeParentChange @ 3092 NONAME
+ _ZTI24QDeclarativeParserStatus @ 3093 NONAME
+ _ZTI24QDeclarativeSpringFollow @ 3094 NONAME
+ _ZTI24QDeclarativeXmlListModel @ 3095 NONAME
+ _ZTI25QDeclarativeAnchorChanges @ 3096 NONAME
+ _ZTI25QDeclarativeAnimatedImage @ 3097 NONAME
+ _ZTI25QDeclarativeImageProvider @ 3098 NONAME
+ _ZTI25QDeclarativePathAttribute @ 3099 NONAME
+ _ZTI25QDeclarativeSystemPalette @ 3100 NONAME
+ _ZTI26QDeclarativeBasePositioner @ 3101 NONAME
+ _ZTI26QDeclarativeContextPrivate @ 3102 NONAME
+ _ZTI26QDeclarativeDebuggerStatus @ 3103 NONAME
+ _ZTI26QDeclarativeOpenMetaObject @ 3104 NONAME
+ _ZTI26QDeclarativeParticleMotion @ 3105 NONAME
+ _ZTI26QDeclarativeStateOperation @ 3106 NONAME
+ _ZTI27QDeclarativeDebugConnection @ 3107 NONAME
+ _ZTI27QDeclarativeExtensionPlugin @ 3108 NONAME
+ _ZTI27QDeclarativeNumberFormatter @ 3109 NONAME
+ _ZTI27QDeclarativePropertyChanges @ 3110 NONAME
+ _ZTI27QDeclarativeVisualDataModel @ 3111 NONAME
+ _ZTI27QDeclarativeVisualItemModel @ 3112 NONAME
+ _ZTI28QDeclarativeDebugObjectQuery @ 3113 NONAME
+ _ZTI28QDeclarativeXmlListModelRole @ 3114 NONAME
+ _ZTI29QDeclarativeDateTimeFormatter @ 3115 NONAME
+ _ZTI29QDeclarativeDebugEnginesQuery @ 3116 NONAME
+ _ZTI29QDeclarativeStateChangeScript @ 3117 NONAME
+ _ZTI30QDeclarativeDebugPropertyWatch @ 3118 NONAME
+ _ZTI30QDeclarativeExtensionInterface @ 3119 NONAME
+ _ZTI30QDeclarativeOpenMetaObjectType @ 3120 NONAME
+ _ZTI31QDeclarativePropertyValueSource @ 3121 NONAME
+ _ZTI32QDeclarativeDebugExpressionQuery @ 3122 NONAME
+ _ZTI32QDeclarativeParticleMotionLinear @ 3123 NONAME
+ _ZTI32QDeclarativeParticleMotionWander @ 3124 NONAME
+ _ZTI33QDeclarativeDebugRootContextQuery @ 3125 NONAME
+ _ZTI33QDeclarativeParticleMotionGravity @ 3126 NONAME
+ _ZTI35QDeclarativeGraphicsObjectContainer @ 3127 NONAME
+ _ZTI36QDeclarativePropertyValueInterceptor @ 3128 NONAME
+ _ZTI38QDeclarativeDebugObjectExpressionWatch @ 3129 NONAME
+ _ZTI39QDeclarativeNetworkAccessManagerFactory @ 3130 NONAME
+ _ZTI7QPacket @ 3131 NONAME
+ _ZTV15QDeclarativePen @ 3132 NONAME
+ _ZTV15QDeclarativeRow @ 3133 NONAME
+ _ZTV15QPacketAutoSend @ 3134 NONAME
+ _ZTV15QPacketProtocol @ 3135 NONAME
+ _ZTV16QDeclarativeBind @ 3136 NONAME
+ _ZTV16QDeclarativeDrag @ 3137 NONAME
+ _ZTV16QDeclarativeFlow @ 3138 NONAME
+ _ZTV16QDeclarativeGrid @ 3139 NONAME
+ _ZTV16QDeclarativeItem @ 3140 NONAME
+ _ZTV16QDeclarativePath @ 3141 NONAME
+ _ZTV16QDeclarativeText @ 3142 NONAME
+ _ZTV16QDeclarativeView @ 3143 NONAME
+ _ZTV17QDeclarativeCurve @ 3144 NONAME
+ _ZTV17QDeclarativeImage @ 3145 NONAME
+ _ZTV17QDeclarativeState @ 3146 NONAME
+ _ZTV17QDeclarativeTimer @ 3147 NONAME
+ _ZTV18QDeclarativeColumn @ 3148 NONAME
+ _ZTV18QDeclarativeEngine @ 3149 NONAME
+ _ZTV18QDeclarativeLoader @ 3150 NONAME
+ _ZTV18QMetaObjectBuilder @ 3151 NONAME
+ _ZTV19QDeclarativeAnchors @ 3152 NONAME
+ _ZTV19QDeclarativeContext @ 3153 NONAME
+ _ZTV19QDeclarativeWebPage @ 3154 NONAME
+ _ZTV19QDeclarativeWebView @ 3155 NONAME
+ _ZTV19QListModelInterface @ 3156 NONAME
+ _ZTV20QDeclarativeBehavior @ 3157 NONAME
+ _ZTV20QDeclarativeFlipable @ 3158 NONAME
+ _ZTV20QDeclarativeGradient @ 3159 NONAME
+ _ZTV20QDeclarativeGridView @ 3160 NONAME
+ _ZTV20QDeclarativeListView @ 3161 NONAME
+ _ZTV20QDeclarativePathLine @ 3162 NONAME
+ _ZTV20QDeclarativePathQuad @ 3163 NONAME
+ _ZTV20QDeclarativePathView @ 3164 NONAME
+ _ZTV20QDeclarativeRepeater @ 3165 NONAME
+ _ZTV20QDeclarativeTextEdit @ 3166 NONAME
+ _ZTV21QDeclarativeComponent @ 3167 NONAME
+ _ZTV21QDeclarativeFlickable @ 3168 NONAME
+ _ZTV21QDeclarativeImageBase @ 3169 NONAME
+ _ZTV21QDeclarativeListModel @ 3170 NONAME
+ _ZTV21QDeclarativeMouseArea @ 3171 NONAME
+ _ZTV21QDeclarativeParticles @ 3172 NONAME
+ _ZTV21QDeclarativePathCubic @ 3173 NONAME
+ _ZTV21QDeclarativeRectangle @ 3174 NONAME
+ _ZTV21QDeclarativeScaleGrid @ 3175 NONAME
+ _ZTV21QDeclarativeTextInput @ 3176 NONAME
+ _ZTV21QDeclarativeValueType @ 3177 NONAME
+ _ZTV22QDeclarativeDebugQuery @ 3178 NONAME
+ _ZTV22QDeclarativeDebugWatch @ 3179 NONAME
+ _ZTV22QDeclarativeEaseFollow @ 3180 NONAME
+ _ZTV22QDeclarativeExpression @ 3181 NONAME
+ _ZTV22QDeclarativeFocusPanel @ 3182 NONAME
+ _ZTV22QDeclarativeFocusScope @ 3183 NONAME
+ _ZTV22QDeclarativeFontLoader @ 3184 NONAME
+ _ZTV22QDeclarativeStateGroup @ 3185 NONAME
+ _ZTV22QDeclarativeTransition @ 3186 NONAME
+ _ZTV23QDeclarativeBorderImage @ 3187 NONAME
+ _ZTV23QDeclarativeConnections @ 3188 NONAME
+ _ZTV23QDeclarativeDebugClient @ 3189 NONAME
+ _ZTV23QDeclarativeEngineDebug @ 3190 NONAME
+ _ZTV23QDeclarativePaintedItem @ 3191 NONAME
+ _ZTV23QDeclarativePathElement @ 3192 NONAME
+ _ZTV23QDeclarativePathPercent @ 3193 NONAME
+ _ZTV23QDeclarativePixmapReply @ 3194 NONAME
+ _ZTV23QDeclarativePropertyMap @ 3195 NONAME
+ _ZTV23QDeclarativeViewSection @ 3196 NONAME
+ _ZTV23QDeclarativeVisualModel @ 3197 NONAME
+ _ZTV24QDeclarativeCustomParser @ 3198 NONAME
+ _ZTV24QDeclarativeDebugService @ 3199 NONAME
+ _ZTV24QDeclarativeGradientStop @ 3200 NONAME
+ _ZTV24QDeclarativeParentChange @ 3201 NONAME
+ _ZTV24QDeclarativeParserStatus @ 3202 NONAME
+ _ZTV24QDeclarativeSpringFollow @ 3203 NONAME
+ _ZTV24QDeclarativeXmlListModel @ 3204 NONAME
+ _ZTV25QDeclarativeAnchorChanges @ 3205 NONAME
+ _ZTV25QDeclarativeAnimatedImage @ 3206 NONAME
+ _ZTV25QDeclarativeImageProvider @ 3207 NONAME
+ _ZTV25QDeclarativePathAttribute @ 3208 NONAME
+ _ZTV25QDeclarativeSystemPalette @ 3209 NONAME
+ _ZTV26QDeclarativeBasePositioner @ 3210 NONAME
+ _ZTV26QDeclarativeContextPrivate @ 3211 NONAME
+ _ZTV26QDeclarativeDebuggerStatus @ 3212 NONAME
+ _ZTV26QDeclarativeOpenMetaObject @ 3213 NONAME
+ _ZTV26QDeclarativeParticleMotion @ 3214 NONAME
+ _ZTV26QDeclarativeStateOperation @ 3215 NONAME
+ _ZTV27QDeclarativeDebugConnection @ 3216 NONAME
+ _ZTV27QDeclarativeExtensionPlugin @ 3217 NONAME
+ _ZTV27QDeclarativeNumberFormatter @ 3218 NONAME
+ _ZTV27QDeclarativePropertyChanges @ 3219 NONAME
+ _ZTV27QDeclarativeVisualDataModel @ 3220 NONAME
+ _ZTV27QDeclarativeVisualItemModel @ 3221 NONAME
+ _ZTV28QDeclarativeDebugObjectQuery @ 3222 NONAME
+ _ZTV28QDeclarativeXmlListModelRole @ 3223 NONAME
+ _ZTV29QDeclarativeDateTimeFormatter @ 3224 NONAME
+ _ZTV29QDeclarativeDebugEnginesQuery @ 3225 NONAME
+ _ZTV29QDeclarativeStateChangeScript @ 3226 NONAME
+ _ZTV30QDeclarativeDebugPropertyWatch @ 3227 NONAME
+ _ZTV30QDeclarativeOpenMetaObjectType @ 3228 NONAME
+ _ZTV31QDeclarativePropertyValueSource @ 3229 NONAME
+ _ZTV32QDeclarativeDebugExpressionQuery @ 3230 NONAME
+ _ZTV32QDeclarativeParticleMotionLinear @ 3231 NONAME
+ _ZTV32QDeclarativeParticleMotionWander @ 3232 NONAME
+ _ZTV33QDeclarativeDebugRootContextQuery @ 3233 NONAME
+ _ZTV33QDeclarativeParticleMotionGravity @ 3234 NONAME
+ _ZTV35QDeclarativeGraphicsObjectContainer @ 3235 NONAME
+ _ZTV36QDeclarativePropertyValueInterceptor @ 3236 NONAME
+ _ZTV38QDeclarativeDebugObjectExpressionWatch @ 3237 NONAME
+ _ZTV39QDeclarativeNetworkAccessManagerFactory @ 3238 NONAME
+ _ZTV7QPacket @ 3239 NONAME
+ _ZThn16_N16QDeclarativeItem10classBeginEv @ 3240 NONAME
+ _ZThn16_N16QDeclarativeItem17componentCompleteEv @ 3241 NONAME
+ _ZThn16_N16QDeclarativeItemD0Ev @ 3242 NONAME
+ _ZThn16_N16QDeclarativeItemD1Ev @ 3243 NONAME
+ _ZThn16_N16QDeclarativeText17componentCompleteEv @ 3244 NONAME
+ _ZThn16_N16QDeclarativeTextD0Ev @ 3245 NONAME
+ _ZThn16_N16QDeclarativeTextD1Ev @ 3246 NONAME
+ _ZThn16_N17QDeclarativeImageD0Ev @ 3247 NONAME
+ _ZThn16_N17QDeclarativeImageD1Ev @ 3248 NONAME
+ _ZThn16_N18QDeclarativeLoaderD0Ev @ 3249 NONAME
+ _ZThn16_N18QDeclarativeLoaderD1Ev @ 3250 NONAME
+ _ZThn16_N19QDeclarativeWebView17componentCompleteEv @ 3251 NONAME
+ _ZThn16_N19QDeclarativeWebViewD0Ev @ 3252 NONAME
+ _ZThn16_N19QDeclarativeWebViewD1Ev @ 3253 NONAME
+ _ZThn16_N20QDeclarativeFlipableD0Ev @ 3254 NONAME
+ _ZThn16_N20QDeclarativeFlipableD1Ev @ 3255 NONAME
+ _ZThn16_N20QDeclarativeGridView17componentCompleteEv @ 3256 NONAME
+ _ZThn16_N20QDeclarativeGridViewD0Ev @ 3257 NONAME
+ _ZThn16_N20QDeclarativeGridViewD1Ev @ 3258 NONAME
+ _ZThn16_N20QDeclarativeListView17componentCompleteEv @ 3259 NONAME
+ _ZThn16_N20QDeclarativeListViewD0Ev @ 3260 NONAME
+ _ZThn16_N20QDeclarativeListViewD1Ev @ 3261 NONAME
+ _ZThn16_N20QDeclarativePathView17componentCompleteEv @ 3262 NONAME
+ _ZThn16_N20QDeclarativePathViewD0Ev @ 3263 NONAME
+ _ZThn16_N20QDeclarativePathViewD1Ev @ 3264 NONAME
+ _ZThn16_N20QDeclarativeRepeater17componentCompleteEv @ 3265 NONAME
+ _ZThn16_N20QDeclarativeRepeaterD0Ev @ 3266 NONAME
+ _ZThn16_N20QDeclarativeRepeaterD1Ev @ 3267 NONAME
+ _ZThn16_N20QDeclarativeTextEdit17componentCompleteEv @ 3268 NONAME
+ _ZThn16_N21QDeclarativeFlickableD0Ev @ 3269 NONAME
+ _ZThn16_N21QDeclarativeFlickableD1Ev @ 3270 NONAME
+ _ZThn16_N21QDeclarativeImageBase17componentCompleteEv @ 3271 NONAME
+ _ZThn16_N21QDeclarativeImageBaseD0Ev @ 3272 NONAME
+ _ZThn16_N21QDeclarativeImageBaseD1Ev @ 3273 NONAME
+ _ZThn16_N21QDeclarativeMouseAreaD0Ev @ 3274 NONAME
+ _ZThn16_N21QDeclarativeMouseAreaD1Ev @ 3275 NONAME
+ _ZThn16_N21QDeclarativeParticles17componentCompleteEv @ 3276 NONAME
+ _ZThn16_N21QDeclarativeParticlesD0Ev @ 3277 NONAME
+ _ZThn16_N21QDeclarativeParticlesD1Ev @ 3278 NONAME
+ _ZThn16_N21QDeclarativeTextInputD0Ev @ 3279 NONAME
+ _ZThn16_N21QDeclarativeTextInputD1Ev @ 3280 NONAME
+ _ZThn16_N22QDeclarativeFocusPanelD0Ev @ 3281 NONAME
+ _ZThn16_N22QDeclarativeFocusPanelD1Ev @ 3282 NONAME
+ _ZThn16_N22QDeclarativeFocusScopeD0Ev @ 3283 NONAME
+ _ZThn16_N22QDeclarativeFocusScopeD1Ev @ 3284 NONAME
+ _ZThn16_N23QDeclarativeBorderImageD0Ev @ 3285 NONAME
+ _ZThn16_N23QDeclarativeBorderImageD1Ev @ 3286 NONAME
+ _ZThn16_N23QDeclarativePaintedItemD0Ev @ 3287 NONAME
+ _ZThn16_N23QDeclarativePaintedItemD1Ev @ 3288 NONAME
+ _ZThn16_N25QDeclarativeAnimatedImage17componentCompleteEv @ 3289 NONAME
+ _ZThn16_N25QDeclarativeAnimatedImageD0Ev @ 3290 NONAME
+ _ZThn16_N25QDeclarativeAnimatedImageD1Ev @ 3291 NONAME
+ _ZThn16_N26QDeclarativeBasePositioner17componentCompleteEv @ 3292 NONAME
+ _ZThn16_N26QDeclarativeBasePositionerD0Ev @ 3293 NONAME
+ _ZThn16_N26QDeclarativeBasePositionerD1Ev @ 3294 NONAME
+ _ZThn16_N35QDeclarativeGraphicsObjectContainerD0Ev @ 3295 NONAME
+ _ZThn16_N35QDeclarativeGraphicsObjectContainerD1Ev @ 3296 NONAME
+ _ZThn8_N16QDeclarativeBind17componentCompleteEv @ 3297 NONAME
+ _ZThn8_N16QDeclarativeBindD0Ev @ 3298 NONAME
+ _ZThn8_N16QDeclarativeBindD1Ev @ 3299 NONAME
+ _ZThn8_N16QDeclarativeItem10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 3300 NONAME
+ _ZThn8_N16QDeclarativeItem10sceneEventEP6QEvent @ 3301 NONAME
+ _ZThn8_N16QDeclarativeItem13keyPressEventEP9QKeyEvent @ 3302 NONAME
+ _ZThn8_N16QDeclarativeItem15keyReleaseEventEP9QKeyEvent @ 3303 NONAME
+ _ZThn8_N16QDeclarativeItem16inputMethodEventEP17QInputMethodEvent @ 3304 NONAME
+ _ZThn8_N16QDeclarativeItem5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 3305 NONAME
+ _ZThn8_N16QDeclarativeItemD0Ev @ 3306 NONAME
+ _ZThn8_N16QDeclarativeItemD1Ev @ 3307 NONAME
+ _ZThn8_N16QDeclarativePath17componentCompleteEv @ 3308 NONAME
+ _ZThn8_N16QDeclarativePathD0Ev @ 3309 NONAME
+ _ZThn8_N16QDeclarativePathD1Ev @ 3310 NONAME
+ _ZThn8_N16QDeclarativeText15mousePressEventEP24QGraphicsSceneMouseEvent @ 3311 NONAME
+ _ZThn8_N16QDeclarativeText17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 3312 NONAME
+ _ZThn8_N16QDeclarativeText5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 3313 NONAME
+ _ZThn8_N16QDeclarativeTextD0Ev @ 3314 NONAME
+ _ZThn8_N16QDeclarativeTextD1Ev @ 3315 NONAME
+ _ZThn8_N16QDeclarativeViewD0Ev @ 3316 NONAME
+ _ZThn8_N16QDeclarativeViewD1Ev @ 3317 NONAME
+ _ZThn8_N17QDeclarativeImage5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 3318 NONAME
+ _ZThn8_N17QDeclarativeImageD0Ev @ 3319 NONAME
+ _ZThn8_N17QDeclarativeImageD1Ev @ 3320 NONAME
+ _ZThn8_N17QDeclarativeTimer10classBeginEv @ 3321 NONAME
+ _ZThn8_N17QDeclarativeTimer17componentCompleteEv @ 3322 NONAME
+ _ZThn8_N18QDeclarativeLoader10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 3323 NONAME
+ _ZThn8_N18QDeclarativeLoaderD0Ev @ 3324 NONAME
+ _ZThn8_N18QDeclarativeLoaderD1Ev @ 3325 NONAME
+ _ZThn8_N19QDeclarativeWebView10sceneEventEP6QEvent @ 3326 NONAME
+ _ZThn8_N19QDeclarativeWebView13keyPressEventEP9QKeyEvent @ 3327 NONAME
+ _ZThn8_N19QDeclarativeWebView14hoverMoveEventEP24QGraphicsSceneHoverEvent @ 3328 NONAME
+ _ZThn8_N19QDeclarativeWebView14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 3329 NONAME
+ _ZThn8_N19QDeclarativeWebView15keyReleaseEventEP9QKeyEvent @ 3330 NONAME
+ _ZThn8_N19QDeclarativeWebView15mousePressEventEP24QGraphicsSceneMouseEvent @ 3331 NONAME
+ _ZThn8_N19QDeclarativeWebView17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 3332 NONAME
+ _ZThn8_N19QDeclarativeWebView21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 3333 NONAME
+ _ZThn8_N19QDeclarativeWebViewD0Ev @ 3334 NONAME
+ _ZThn8_N19QDeclarativeWebViewD1Ev @ 3335 NONAME
+ _ZThn8_N20QDeclarativeBehavior5writeERK8QVariant @ 3336 NONAME
+ _ZThn8_N20QDeclarativeBehavior9setTargetERK20QDeclarativeProperty @ 3337 NONAME
+ _ZThn8_N20QDeclarativeBehaviorD0Ev @ 3338 NONAME
+ _ZThn8_N20QDeclarativeBehaviorD1Ev @ 3339 NONAME
+ _ZThn8_N20QDeclarativeFlipableD0Ev @ 3340 NONAME
+ _ZThn8_N20QDeclarativeFlipableD1Ev @ 3341 NONAME
+ _ZThn8_N20QDeclarativeGridView13keyPressEventEP9QKeyEvent @ 3342 NONAME
+ _ZThn8_N20QDeclarativeGridViewD0Ev @ 3343 NONAME
+ _ZThn8_N20QDeclarativeGridViewD1Ev @ 3344 NONAME
+ _ZThn8_N20QDeclarativeListView13keyPressEventEP9QKeyEvent @ 3345 NONAME
+ _ZThn8_N20QDeclarativeListViewD0Ev @ 3346 NONAME
+ _ZThn8_N20QDeclarativeListViewD1Ev @ 3347 NONAME
+ _ZThn8_N20QDeclarativePathView14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 3348 NONAME
+ _ZThn8_N20QDeclarativePathView15mousePressEventEP24QGraphicsSceneMouseEvent @ 3349 NONAME
+ _ZThn8_N20QDeclarativePathView16sceneEventFilterEP13QGraphicsItemP6QEvent @ 3350 NONAME
+ _ZThn8_N20QDeclarativePathView17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 3351 NONAME
+ _ZThn8_N20QDeclarativePathViewD0Ev @ 3352 NONAME
+ _ZThn8_N20QDeclarativePathViewD1Ev @ 3353 NONAME
+ _ZThn8_N20QDeclarativeRepeater10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 3354 NONAME
+ _ZThn8_N20QDeclarativeRepeaterD0Ev @ 3355 NONAME
+ _ZThn8_N20QDeclarativeRepeaterD1Ev @ 3356 NONAME
+ _ZThn8_N20QDeclarativeTextEdit13keyPressEventEP9QKeyEvent @ 3357 NONAME
+ _ZThn8_N20QDeclarativeTextEdit14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 3358 NONAME
+ _ZThn8_N20QDeclarativeTextEdit15keyReleaseEventEP9QKeyEvent @ 3359 NONAME
+ _ZThn8_N20QDeclarativeTextEdit15mousePressEventEP24QGraphicsSceneMouseEvent @ 3360 NONAME
+ _ZThn8_N20QDeclarativeTextEdit16inputMethodEventEP17QInputMethodEvent @ 3361 NONAME
+ _ZThn8_N20QDeclarativeTextEdit17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 3362 NONAME
+ _ZThn8_N20QDeclarativeTextEdit21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 3363 NONAME
+ _ZThn8_N21QDeclarativeFlickable10wheelEventEP24QGraphicsSceneWheelEvent @ 3364 NONAME
+ _ZThn8_N21QDeclarativeFlickable14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 3365 NONAME
+ _ZThn8_N21QDeclarativeFlickable15mousePressEventEP24QGraphicsSceneMouseEvent @ 3366 NONAME
+ _ZThn8_N21QDeclarativeFlickable16sceneEventFilterEP13QGraphicsItemP6QEvent @ 3367 NONAME
+ _ZThn8_N21QDeclarativeFlickable17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 3368 NONAME
+ _ZThn8_N21QDeclarativeFlickableD0Ev @ 3369 NONAME
+ _ZThn8_N21QDeclarativeFlickableD1Ev @ 3370 NONAME
+ _ZThn8_N21QDeclarativeImageBaseD0Ev @ 3371 NONAME
+ _ZThn8_N21QDeclarativeImageBaseD1Ev @ 3372 NONAME
+ _ZThn8_N21QDeclarativeMouseArea10sceneEventEP6QEvent @ 3373 NONAME
+ _ZThn8_N21QDeclarativeMouseArea14hoverMoveEventEP24QGraphicsSceneHoverEvent @ 3374 NONAME
+ _ZThn8_N21QDeclarativeMouseArea14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 3375 NONAME
+ _ZThn8_N21QDeclarativeMouseArea15hoverEnterEventEP24QGraphicsSceneHoverEvent @ 3376 NONAME
+ _ZThn8_N21QDeclarativeMouseArea15hoverLeaveEventEP24QGraphicsSceneHoverEvent @ 3377 NONAME
+ _ZThn8_N21QDeclarativeMouseArea15mousePressEventEP24QGraphicsSceneMouseEvent @ 3378 NONAME
+ _ZThn8_N21QDeclarativeMouseArea17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 3379 NONAME
+ _ZThn8_N21QDeclarativeMouseArea21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 3380 NONAME
+ _ZThn8_N21QDeclarativeMouseAreaD0Ev @ 3381 NONAME
+ _ZThn8_N21QDeclarativeMouseAreaD1Ev @ 3382 NONAME
+ _ZThn8_N21QDeclarativeParticles5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 3383 NONAME
+ _ZThn8_N21QDeclarativeParticlesD0Ev @ 3384 NONAME
+ _ZThn8_N21QDeclarativeParticlesD1Ev @ 3385 NONAME
+ _ZThn8_N21QDeclarativeRectangle5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 3386 NONAME
+ _ZThn8_N21QDeclarativeTextInput13keyPressEventEP9QKeyEvent @ 3387 NONAME
+ _ZThn8_N21QDeclarativeTextInput15mousePressEventEP24QGraphicsSceneMouseEvent @ 3388 NONAME
+ _ZThn8_N21QDeclarativeTextInput17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 3389 NONAME
+ _ZThn8_N21QDeclarativeTextInputD0Ev @ 3390 NONAME
+ _ZThn8_N21QDeclarativeTextInputD1Ev @ 3391 NONAME
+ _ZThn8_N22QDeclarativeEaseFollow9setTargetERK20QDeclarativeProperty @ 3392 NONAME
+ _ZThn8_N22QDeclarativeEaseFollowD0Ev @ 3393 NONAME
+ _ZThn8_N22QDeclarativeEaseFollowD1Ev @ 3394 NONAME
+ _ZThn8_N22QDeclarativeFocusPanel10sceneEventEP6QEvent @ 3395 NONAME
+ _ZThn8_N22QDeclarativeFocusPanelD0Ev @ 3396 NONAME
+ _ZThn8_N22QDeclarativeFocusPanelD1Ev @ 3397 NONAME
+ _ZThn8_N22QDeclarativeFocusScopeD0Ev @ 3398 NONAME
+ _ZThn8_N22QDeclarativeFocusScopeD1Ev @ 3399 NONAME
+ _ZThn8_N22QDeclarativeStateGroup10classBeginEv @ 3400 NONAME
+ _ZThn8_N22QDeclarativeStateGroup17componentCompleteEv @ 3401 NONAME
+ _ZThn8_N22QDeclarativeStateGroupD0Ev @ 3402 NONAME
+ _ZThn8_N22QDeclarativeStateGroupD1Ev @ 3403 NONAME
+ _ZThn8_N23QDeclarativeBorderImage5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 3404 NONAME
+ _ZThn8_N23QDeclarativeBorderImageD0Ev @ 3405 NONAME
+ _ZThn8_N23QDeclarativeBorderImageD1Ev @ 3406 NONAME
+ _ZThn8_N23QDeclarativeConnections17componentCompleteEv @ 3407 NONAME
+ _ZThn8_N23QDeclarativeConnectionsD0Ev @ 3408 NONAME
+ _ZThn8_N23QDeclarativeConnectionsD1Ev @ 3409 NONAME
+ _ZThn8_N23QDeclarativePaintedItem5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 3410 NONAME
+ _ZThn8_N23QDeclarativePaintedItemD0Ev @ 3411 NONAME
+ _ZThn8_N23QDeclarativePaintedItemD1Ev @ 3412 NONAME
+ _ZThn8_N24QDeclarativeParentChange12isReversableEv @ 3413 NONAME
+ _ZThn8_N24QDeclarativeParentChange13saveOriginalsEv @ 3414 NONAME
+ _ZThn8_N24QDeclarativeParentChange17saveCurrentValuesEv @ 3415 NONAME
+ _ZThn8_N24QDeclarativeParentChange6rewindEv @ 3416 NONAME
+ _ZThn8_N24QDeclarativeParentChange7executeEv @ 3417 NONAME
+ _ZThn8_N24QDeclarativeParentChange7reverseEv @ 3418 NONAME
+ _ZThn8_N24QDeclarativeParentChange8overrideEP23QDeclarativeActionEvent @ 3419 NONAME
+ _ZThn8_N24QDeclarativeParentChangeD0Ev @ 3420 NONAME
+ _ZThn8_N24QDeclarativeParentChangeD1Ev @ 3421 NONAME
+ _ZThn8_N24QDeclarativeSpringFollow9setTargetERK20QDeclarativeProperty @ 3422 NONAME
+ _ZThn8_N24QDeclarativeSpringFollowD0Ev @ 3423 NONAME
+ _ZThn8_N24QDeclarativeSpringFollowD1Ev @ 3424 NONAME
+ _ZThn8_N24QDeclarativeXmlListModel10classBeginEv @ 3425 NONAME
+ _ZThn8_N24QDeclarativeXmlListModel17componentCompleteEv @ 3426 NONAME
+ _ZThn8_N24QDeclarativeXmlListModelD0Ev @ 3427 NONAME
+ _ZThn8_N24QDeclarativeXmlListModelD1Ev @ 3428 NONAME
+ _ZThn8_N25QDeclarativeAnchorChanges12extraActionsEv @ 3429 NONAME
+ _ZThn8_N25QDeclarativeAnchorChanges12isReversableEv @ 3430 NONAME
+ _ZThn8_N25QDeclarativeAnchorChanges13saveOriginalsEv @ 3431 NONAME
+ _ZThn8_N25QDeclarativeAnchorChanges15changesBindingsEv @ 3432 NONAME
+ _ZThn8_N25QDeclarativeAnchorChanges17saveCurrentValuesEv @ 3433 NONAME
+ _ZThn8_N25QDeclarativeAnchorChanges20clearForwardBindingsEv @ 3434 NONAME
+ _ZThn8_N25QDeclarativeAnchorChanges20clearReverseBindingsEv @ 3435 NONAME
+ _ZThn8_N25QDeclarativeAnchorChanges6rewindEv @ 3436 NONAME
+ _ZThn8_N25QDeclarativeAnchorChanges7executeEv @ 3437 NONAME
+ _ZThn8_N25QDeclarativeAnchorChanges7reverseEv @ 3438 NONAME
+ _ZThn8_N25QDeclarativeAnchorChanges8overrideEP23QDeclarativeActionEvent @ 3439 NONAME
+ _ZThn8_N25QDeclarativeAnchorChangesD0Ev @ 3440 NONAME
+ _ZThn8_N25QDeclarativeAnchorChangesD1Ev @ 3441 NONAME
+ _ZThn8_N25QDeclarativeAnimatedImageD0Ev @ 3442 NONAME
+ _ZThn8_N25QDeclarativeAnimatedImageD1Ev @ 3443 NONAME
+ _ZThn8_N26QDeclarativeBasePositioner10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 3444 NONAME
+ _ZThn8_N26QDeclarativeBasePositionerD0Ev @ 3445 NONAME
+ _ZThn8_N26QDeclarativeBasePositionerD1Ev @ 3446 NONAME
+ _ZThn8_N27QDeclarativeExtensionPlugin16initializeEngineEP18QDeclarativeEnginePKc @ 3447 NONAME
+ _ZThn8_N27QDeclarativeExtensionPluginD0Ev @ 3448 NONAME
+ _ZThn8_N27QDeclarativeExtensionPluginD1Ev @ 3449 NONAME
+ _ZThn8_N27QDeclarativeNumberFormatter10classBeginEv @ 3450 NONAME
+ _ZThn8_N27QDeclarativeNumberFormatter17componentCompleteEv @ 3451 NONAME
+ _ZThn8_N27QDeclarativeNumberFormatterD0Ev @ 3452 NONAME
+ _ZThn8_N27QDeclarativeNumberFormatterD1Ev @ 3453 NONAME
+ _ZThn8_N29QDeclarativeDateTimeFormatter10classBeginEv @ 3454 NONAME
+ _ZThn8_N29QDeclarativeDateTimeFormatter17componentCompleteEv @ 3455 NONAME
+ _ZThn8_N29QDeclarativeDateTimeFormatterD0Ev @ 3456 NONAME
+ _ZThn8_N29QDeclarativeDateTimeFormatterD1Ev @ 3457 NONAME
+ _ZThn8_N29QDeclarativeStateChangeScript7executeEv @ 3458 NONAME
+ _ZThn8_N29QDeclarativeStateChangeScriptD0Ev @ 3459 NONAME
+ _ZThn8_N29QDeclarativeStateChangeScriptD1Ev @ 3460 NONAME
+ _ZThn8_N35QDeclarativeGraphicsObjectContainer10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 3461 NONAME
+ _ZThn8_N35QDeclarativeGraphicsObjectContainerD0Ev @ 3462 NONAME
+ _ZThn8_N35QDeclarativeGraphicsObjectContainerD1Ev @ 3463 NONAME
+ _ZThn8_NK16QDeclarativeItem12boundingRectEv @ 3464 NONAME
+ _ZThn8_NK16QDeclarativeItem16inputMethodQueryEN2Qt16InputMethodQueryE @ 3465 NONAME
+ _ZThn8_NK20QDeclarativeTextEdit16inputMethodQueryEN2Qt16InputMethodQueryE @ 3466 NONAME
+ _ZThn8_NK21QDeclarativeRectangle12boundingRectEv @ 3467 NONAME
+ _ZThn8_NK21QDeclarativeTextInput16inputMethodQueryEN2Qt16InputMethodQueryE @ 3468 NONAME
+ _ZThn8_NK24QDeclarativeParentChange8typeNameEv @ 3469 NONAME
+ _ZThn8_NK25QDeclarativeAnchorChanges8typeNameEv @ 3470 NONAME
+ _ZThn8_NK29QDeclarativeStateChangeScript8typeNameEv @ 3471 NONAME
+ _Zls6QDebugP16QDeclarativeItem @ 3472 NONAME
+ _Zls6QDebugRK17QDeclarativeError @ 3473 NONAME
+ _ZlsR11QDataStreamRKN29QDeclarativeEngineDebugServer22QDeclarativeObjectDataE @ 3474 NONAME
+ _ZlsR11QDataStreamRKN29QDeclarativeEngineDebugServer26QDeclarativeObjectPropertyE @ 3475 NONAME
+ _ZrsR11QDataStreamRN29QDeclarativeEngineDebugServer22QDeclarativeObjectDataE @ 3476 NONAME
+ _ZrsR11QDataStreamRN29QDeclarativeEngineDebugServer26QDeclarativeObjectPropertyE @ 3477 NONAME
+ _ZN19QDeclarativeBinding10setEnabledEb6QFlagsIN27QDeclarativePropertyPrivate9WriteFlagEE @ 3478 NONAME
+ _ZN19QDeclarativeBinding11qt_metacallEN11QMetaObject4CallEiPPv @ 3479 NONAME
+ _ZN19QDeclarativeBinding11qt_metacastEPKc @ 3480 NONAME
+ _ZN19QDeclarativeBinding13propertyIndexEv @ 3481 NONAME
+ _ZN19QDeclarativeBinding16staticMetaObjectE @ 3482 NONAME DATA 16
+ _ZN19QDeclarativeBinding19getStaticMetaObjectEv @ 3483 NONAME
+ _ZN19QDeclarativeBinding6updateE6QFlagsIN27QDeclarativePropertyPrivate9WriteFlagEE @ 3484 NONAME
+ _ZN19QDeclarativeBinding9setTargetERK20QDeclarativeProperty @ 3485 NONAME
+ _ZN19QDeclarativeBindingC1EPvP20QDeclarativeRefCountP7QObjectP19QDeclarativeContextRK7QStringiS4_ @ 3486 NONAME
+ _ZN19QDeclarativeBindingC1ERK7QStringP7QObjectP19QDeclarativeContextS4_ @ 3487 NONAME
+ _ZN19QDeclarativeBindingC2EPvP20QDeclarativeRefCountP7QObjectP19QDeclarativeContextRK7QStringiS4_ @ 3488 NONAME
+ _ZN19QDeclarativeBindingC2ERK7QStringP7QObjectP19QDeclarativeContextS4_ @ 3489 NONAME
+ _ZN19QDeclarativeBindingD0Ev @ 3490 NONAME
+ _ZN19QDeclarativeBindingD1Ev @ 3491 NONAME
+ _ZN19QDeclarativeBindingD2Ev @ 3492 NONAME
+ _ZN27QDeclarativeAbstractBinding10setEnabledEb6QFlagsIN27QDeclarativePropertyPrivate9WriteFlagEE @ 3493 NONAME
+ _ZN27QDeclarativeAbstractBinding11addToObjectEP7QObject @ 3494 NONAME
+ _ZN27QDeclarativeAbstractBinding16removeFromObjectEv @ 3495 NONAME
+ _ZN27QDeclarativeAbstractBinding5clearEv @ 3496 NONAME
+ _ZN27QDeclarativeAbstractBinding7destroyEv @ 3497 NONAME
+ _ZN27QDeclarativeAbstractBindingC2Ev @ 3498 NONAME
+ _ZN27QDeclarativeAbstractBindingD0Ev @ 3499 NONAME
+ _ZN27QDeclarativeAbstractBindingD1Ev @ 3500 NONAME
+ _ZN27QDeclarativeAbstractBindingD2Ev @ 3501 NONAME
+ _ZN27QDeclarativePropertyPrivate10canConvertEPK11QMetaObjectS2_ @ 3502 NONAME
+ _ZN27QDeclarativePropertyPrivate10setBindingEP7QObjectRKN25QDeclarativePropertyCache4DataEP27QDeclarativeAbstractBinding6QFlagsINS_9WriteFlagEE @ 3503 NONAME
+ _ZN27QDeclarativePropertyPrivate10setBindingERK20QDeclarativePropertyP27QDeclarativeAbstractBinding6QFlagsINS_9WriteFlagEE @ 3504 NONAME
+ _ZN27QDeclarativePropertyPrivate11initDefaultEP7QObject @ 3505 NONAME
+ _ZN27QDeclarativePropertyPrivate12initPropertyEP7QObjectRK7QString @ 3506 NONAME
+ _ZN27QDeclarativePropertyPrivate12savePropertyEPK11QMetaObjecti @ 3507 NONAME
+ _ZN27QDeclarativePropertyPrivate13saveValueTypeEPK11QMetaObjectiS2_i @ 3508 NONAME
+ _ZN27QDeclarativePropertyPrivate16signalExpressionERK20QDeclarativeProperty @ 3509 NONAME
+ _ZN27QDeclarativePropertyPrivate17readValuePropertyEv @ 3510 NONAME
+ _ZN27QDeclarativePropertyPrivate17writeEnumPropertyERK13QMetaPropertyiP7QObjectRK8QVarianti @ 3511 NONAME
+ _ZN27QDeclarativePropertyPrivate18valueTypeCoreIndexERK20QDeclarativeProperty @ 3512 NONAME
+ _ZN27QDeclarativePropertyPrivate18writeValuePropertyERK8QVariant6QFlagsINS_9WriteFlagEE @ 3513 NONAME
+ _ZN27QDeclarativePropertyPrivate19setSignalExpressionERK20QDeclarativePropertyP22QDeclarativeExpression @ 3514 NONAME
+ _ZN27QDeclarativePropertyPrivate20rawMetaObjectForTypeEP25QDeclarativeEnginePrivatei @ 3515 NONAME
+ _ZN27QDeclarativePropertyPrivate5equalEPK11QMetaObjectS2_ @ 3516 NONAME
+ _ZN27QDeclarativePropertyPrivate5writeEP7QObjectRKN25QDeclarativePropertyCache4DataERK8QVariantP19QDeclarativeContext6QFlagsINS_9WriteFlagEE @ 3517 NONAME
+ _ZN27QDeclarativePropertyPrivate5writeERK20QDeclarativePropertyRK8QVariant6QFlagsINS_9WriteFlagEE @ 3518 NONAME
+ _ZN27QDeclarativePropertyPrivate7bindingERK20QDeclarativeProperty @ 3519 NONAME
+ _ZN27QDeclarativePropertyPrivate7restoreERK10QByteArrayP7QObjectP19QDeclarativeContext @ 3520 NONAME
+ _ZNK19QDeclarativeBinding10expressionEv @ 3521 NONAME
+ _ZNK19QDeclarativeBinding10metaObjectEv @ 3522 NONAME
+ _ZNK19QDeclarativeBinding7enabledEv @ 3523 NONAME
+ _ZNK19QDeclarativeBinding8propertyEv @ 3524 NONAME
+ _ZNK27QDeclarativeAbstractBinding10expressionEv @ 3525 NONAME
+ _ZNK27QDeclarativePropertyPrivate11isValueTypeEv @ 3526 NONAME
+ _ZNK27QDeclarativePropertyPrivate12propertyTypeEv @ 3527 NONAME
+ _ZNK27QDeclarativePropertyPrivate20propertyTypeCategoryEv @ 3528 NONAME
+ _ZTI19QDeclarativeBinding @ 3529 NONAME
+ _ZTI27QDeclarativeAbstractBinding @ 3530 NONAME
+ _ZTV19QDeclarativeBinding @ 3531 NONAME
+ _ZTV27QDeclarativeAbstractBinding @ 3532 NONAME
+ _ZThn8_N19QDeclarativeBinding10setEnabledEb6QFlagsIN27QDeclarativePropertyPrivate9WriteFlagEE @ 3533 NONAME
+ _ZThn8_N19QDeclarativeBinding13propertyIndexEv @ 3534 NONAME
+ _ZThn8_N19QDeclarativeBinding6updateE6QFlagsIN27QDeclarativePropertyPrivate9WriteFlagEE @ 3535 NONAME
+ _ZThn8_N19QDeclarativeBindingD0Ev @ 3536 NONAME
+ _ZThn8_N19QDeclarativeBindingD1Ev @ 3537 NONAME
+ _ZThn8_NK19QDeclarativeBinding10expressionEv @ 3538 NONAME
+
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index 373f66d50f..7c912647b3 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -1,7 +1,7 @@
EXPORTS
_Z11qFadeEffectP7QWidgeti @ 1 NONAME
_Z11qt_image_idRK6QImage @ 2 NONAME
- _Z12qDrawPixmapsP8QPainterPKN12QDrawPixmaps4DataEiRK7QPixmap6QFlagsINS1_11DrawingHintEE @ 3 NONAME
+ _Z12qDrawPixmapsP8QPainterPKN12QDrawPixmaps4DataEiRK7QPixmap6QFlagsINS1_11DrawingHintEE @ 3 NONAME ABSENT
_Z12qt_pixmap_idRK7QPixmap @ 4 NONAME
_Z13qDrawWinPanelP8QPainterRK5QRectRK8QPalettebPK6QBrush @ 5 NONAME
_Z13qDrawWinPanelP8QPainteriiiiRK8QPalettebPK6QBrush @ 6 NONAME
@@ -2906,7 +2906,7 @@ EXPORTS
_ZN14QPaintEngineEx10drawPointsEPK7QPointFi @ 2905 NONAME
_ZN14QPaintEngineEx11drawEllipseERK5QRect @ 2906 NONAME
_ZN14QPaintEngineEx11drawEllipseERK6QRectF @ 2907 NONAME
- _ZN14QPaintEngineEx11drawPixmapsEPKN12QDrawPixmaps4DataEiRK7QPixmap6QFlagsINS0_11DrawingHintEE @ 2908 NONAME
+ _ZN14QPaintEngineEx11drawPixmapsEPKN12QDrawPixmaps4DataEiRK7QPixmap6QFlagsINS0_11DrawingHintEE @ 2908 NONAME ABSENT
_ZN14QPaintEngineEx11drawPolygonEPK6QPointiN12QPaintEngine15PolygonDrawModeE @ 2909 NONAME
_ZN14QPaintEngineEx11drawPolygonEPK7QPointFiN12QPaintEngine15PolygonDrawModeE @ 2910 NONAME
_ZN14QPaintEngineEx11updateStateERK17QPaintEngineState @ 2911 NONAME
@@ -4223,7 +4223,7 @@ EXPORTS
_ZN18QTextBlockUserDataD0Ev @ 4222 NONAME
_ZN18QTextBlockUserDataD1Ev @ 4223 NONAME
_ZN18QTextBlockUserDataD2Ev @ 4224 NONAME
- _ZN18QTextureGlyphCache8populateERK12QTextItemIntRK15QVarLengthArrayIjLi256EERKS3_I11QFixedPointLi256EE @ 4225 NONAME
+ _ZN18QTextureGlyphCache8populateERK12QTextItemIntRK15QVarLengthArrayIjLi256EERKS3_I11QFixedPointLi256EE @ 4225 NONAME ABSENT
_ZN19QAbstractProxyModel11qt_metacallEN11QMetaObject4CallEiPPv @ 4226 NONAME
_ZN19QAbstractProxyModel11qt_metacastEPKc @ 4227 NONAME
_ZN19QAbstractProxyModel13setHeaderDataEiN2Qt11OrientationERK8QVarianti @ 4228 NONAME
@@ -11805,4 +11805,125 @@ EXPORTS
_ZN24QImagePixmapCleanupHooks34executePixmapDataModificationHooksEP11QPixmapData @ 11804 NONAME
_ZN9QS60Style10timerEventEP11QTimerEvent @ 11805 NONAME
_ZN9QS60Style11eventFilterEP7QObjectP6QEvent @ 11806 NONAME
+ _Z14qt_draw_glyphsP8QPainterPKjPK7QPointFi @ 11807 NONAME
+ _ZN10QZipReader5closeEv @ 11808 NONAME
+ _ZN10QZipReader8FileInfoC1ERKS0_ @ 11809 NONAME
+ _ZN10QZipReader8FileInfoC1Ev @ 11810 NONAME
+ _ZN10QZipReader8FileInfoC2ERKS0_ @ 11811 NONAME
+ _ZN10QZipReader8FileInfoC2Ev @ 11812 NONAME
+ _ZN10QZipReader8FileInfoD1Ev @ 11813 NONAME
+ _ZN10QZipReader8FileInfoD2Ev @ 11814 NONAME
+ _ZN10QZipReader8FileInfoaSERKS0_ @ 11815 NONAME
+ _ZN10QZipReaderC1EP9QIODevice @ 11816 NONAME
+ _ZN10QZipReaderC1ERK7QString6QFlagsIN9QIODevice12OpenModeFlagEE @ 11817 NONAME
+ _ZN10QZipReaderC2EP9QIODevice @ 11818 NONAME
+ _ZN10QZipReaderC2ERK7QString6QFlagsIN9QIODevice12OpenModeFlagEE @ 11819 NONAME
+ _ZN10QZipReaderD1Ev @ 11820 NONAME
+ _ZN10QZipReaderD2Ev @ 11821 NONAME
+ _ZN11QStaticText13setTextFormatEN2Qt10TextFormatE @ 11822 NONAME
+ _ZN11QStaticText14setMaximumSizeERK6QSizeF @ 11823 NONAME
+ _ZN11QStaticText18setPerformanceHintENS_15PerformanceHintE @ 11824 NONAME
+ _ZN11QStaticText6detachEv @ 11825 NONAME
+ _ZN11QStaticText7prepareERK10QTransformRK5QFont @ 11826 NONAME
+ _ZN11QStaticText7setTextERK7QString @ 11827 NONAME
+ _ZN11QStaticTextC1ERK7QStringRK6QSizeF @ 11828 NONAME
+ _ZN11QStaticTextC1ERKS_ @ 11829 NONAME
+ _ZN11QStaticTextC1Ev @ 11830 NONAME
+ _ZN11QStaticTextC2ERK7QStringRK6QSizeF @ 11831 NONAME
+ _ZN11QStaticTextC2ERKS_ @ 11832 NONAME
+ _ZN11QStaticTextC2Ev @ 11833 NONAME
+ _ZN11QStaticTextD1Ev @ 11834 NONAME
+ _ZN11QStaticTextD2Ev @ 11835 NONAME
+ _ZN11QStaticTextaSERKS_ @ 11836 NONAME
+ _ZN12QKeySequence6assignERK7QStringNS_14SequenceFormatE @ 11837 NONAME
+ _ZN12QKeySequenceC1ERK7QStringNS_14SequenceFormatE @ 11838 NONAME
+ _ZN12QKeySequenceC2ERK7QStringNS_14SequenceFormatE @ 11839 NONAME
+ _ZN13QTextDocument19clearUndoRedoStacksENS_6StacksE @ 11840 NONAME
+ _ZN14QPaintEngineEx19drawPixmapFragmentsEPKN8QPainter8FragmentEiRK7QPixmap6QFlagsINS0_12FragmentHintEE @ 11841 NONAME
+ _ZN14QWidgetPrivate11inTabWidgetEP7QWidget @ 11842 NONAME
+ _ZN14QWidgetPrivate17canKeypadNavigateEN2Qt11OrientationE @ 11843 NONAME
+ _ZN14QWidgetPrivate6renderEP12QPaintDeviceRK6QPointRK7QRegion6QFlagsIN7QWidget10RenderFlagEEb @ 11844 NONAME
+ _ZN15QGraphicsWidget21setAutoFillBackgroundEb @ 11845 NONAME
+ _ZN16QFileSystemModel15directoryLoadedERK7QString @ 11846 NONAME
+ _ZN18QTextureGlyphCache8populateEP11QFontEngineiPKjPK11QFixedPoint @ 11847 NONAME
+ _ZN19QApplicationPrivate15getPixmapCursorEN2Qt11CursorShapeE @ 11848 NONAME
+ _ZN20QGraphicsViewPrivate10centerViewEN13QGraphicsView14ViewportAnchorE @ 11849 NONAME
+ _ZN20QGraphicsViewPrivate10updateRectERK5QRect @ 11850 NONAME
+ _ZN20QGraphicsViewPrivate12updateRegionERK7QRegion @ 11851 NONAME
+ _ZN20QGraphicsViewPrivate12updateScrollEv @ 11852 NONAME
+ _ZN20QGraphicsViewPrivate15storeMouseEventEP11QMouseEvent @ 11853 NONAME
+ _ZN20QGraphicsViewPrivate18storeDragDropEventEPK27QGraphicsSceneDragDropEvent @ 11854 NONAME
+ _ZN20QGraphicsViewPrivate19translateTouchEventEPS_P11QTouchEvent @ 11855 NONAME
+ _ZN20QGraphicsViewPrivate20_q_setViewportCursorERK7QCursor @ 11856 NONAME
+ _ZN20QGraphicsViewPrivate20replayLastMouseEventEv @ 11857 NONAME
+ _ZN20QGraphicsViewPrivate21freeStyleOptionsArrayEP24QStyleOptionGraphicsItem @ 11858 NONAME
+ _ZN20QGraphicsViewPrivate21mouseMoveEventHandlerEP11QMouseEvent @ 11859 NONAME
+ _ZN20QGraphicsViewPrivate21processPendingUpdatesEv @ 11860 NONAME
+ _ZN20QGraphicsViewPrivate21updateLastCenterPointEv @ 11861 NONAME
+ _ZN20QGraphicsViewPrivate22_q_unsetViewportCursorEv @ 11862 NONAME
+ _ZN20QGraphicsViewPrivate22allocStyleOptionsArrayEi @ 11863 NONAME
+ _ZN20QGraphicsViewPrivate22recalculateContentSizeEv @ 11864 NONAME
+ _ZN20QGraphicsViewPrivate26populateSceneDragDropEventEP27QGraphicsSceneDragDropEventP10QDropEvent @ 11865 NONAME
+ _ZN20QGraphicsViewPrivate28updateInputMethodSensitivityEv @ 11866 NONAME
+ _ZN20QGraphicsViewPrivateC1Ev @ 11867 NONAME
+ _ZN20QGraphicsViewPrivateC2Ev @ 11868 NONAME
+ _ZN24QImagePixmapCleanupHooks13isImageCachedERK6QImage @ 11869 NONAME
+ _ZN24QImagePixmapCleanupHooks14isPixmapCachedERK7QPixmap @ 11870 NONAME
+ _ZN26QAbstractScrollAreaPrivate14layoutChildrenEv @ 11871 NONAME
+ _ZN26QAbstractScrollAreaPrivate16replaceScrollBarEP10QScrollBarN2Qt11OrientationE @ 11872 NONAME
+ _ZN26QAbstractScrollAreaPrivate23_q_showOrHideScrollBarsEv @ 11873 NONAME
+ _ZN26QAbstractScrollAreaPrivate4initEv @ 11874 NONAME
+ _ZN26QAbstractScrollAreaPrivate9_q_hslideEi @ 11875 NONAME
+ _ZN26QAbstractScrollAreaPrivate9_q_vslideEi @ 11876 NONAME
+ _ZN26QAbstractScrollAreaPrivateC1Ev @ 11877 NONAME
+ _ZN26QAbstractScrollAreaPrivateC2Ev @ 11878 NONAME
+ _ZN6QColor12isValidColorERK7QString @ 11879 NONAME
+ _ZN6QColor18setColorFromStringERK7QString @ 11880 NONAME
+ _ZN6QLabel12setSelectionEii @ 11881 NONAME
+ _ZN7QPixmap16convertFromImageERK6QImage6QFlagsIN2Qt19ImageConversionFlagEE @ 11882 NONAME
+ _ZN8QPainter14drawStaticTextERK7QPointFRK11QStaticText @ 11883 NONAME
+ _ZN8QPainter19drawPixmapFragmentsEPKNS_8FragmentEiRK7QPixmap6QFlagsINS_12FragmentHintEE @ 11884 NONAME
+ _ZN8QPainter8Fragment6createERK7QPointFRK6QRectFffff @ 11885 NONAME
+ _ZN8QToolBar17visibilityChangedEb @ 11886 NONAME
+ _ZNK10QZipReader10extractAllERK7QString @ 11887 NONAME
+ _ZNK10QZipReader10isReadableEv @ 11888 NONAME
+ _ZNK10QZipReader11entryInfoAtEi @ 11889 NONAME
+ _ZNK10QZipReader12fileInfoListEv @ 11890 NONAME
+ _ZNK10QZipReader5countEv @ 11891 NONAME
+ _ZNK10QZipReader6existsEv @ 11892 NONAME
+ _ZNK10QZipReader6statusEv @ 11893 NONAME
+ _ZNK10QZipReader8fileDataERK7QString @ 11894 NONAME
+ _ZNK11QStaticText10textFormatEv @ 11895 NONAME
+ _ZNK11QStaticText11maximumSizeEv @ 11896 NONAME
+ _ZNK11QStaticText15performanceHintEv @ 11897 NONAME
+ _ZNK11QStaticText4sizeEv @ 11898 NONAME
+ _ZNK11QStaticText4textEv @ 11899 NONAME
+ _ZNK11QStaticTexteqERKS_ @ 11900 NONAME
+ _ZNK11QStaticTextneERKS_ @ 11901 NONAME
+ _ZNK11QTextCursor15positionInBlockEv @ 11902 NONAME
+ _ZNK13QIntValidator5fixupER7QString @ 11903 NONAME
+ _ZNK14QPlainTextEdit8anchorAtERK6QPoint @ 11904 NONAME
+ _ZNK15QGraphicsWidget18autoFillBackgroundEv @ 11905 NONAME
+ _ZNK20QGraphicsViewPrivate10mapToSceneERK6QRectF @ 11906 NONAME
+ _ZNK20QGraphicsViewPrivate10mapToSceneERK7QPointF @ 11907 NONAME
+ _ZNK20QGraphicsViewPrivate13mapToViewRectEPK13QGraphicsItemRK6QRectF @ 11908 NONAME
+ _ZNK20QGraphicsViewPrivate14mapRectToSceneERK5QRect @ 11909 NONAME
+ _ZNK20QGraphicsViewPrivate14verticalScrollEv @ 11910 NONAME
+ _ZNK20QGraphicsViewPrivate15mapToViewRegionEPK13QGraphicsItemRK6QRectF @ 11911 NONAME
+ _ZNK20QGraphicsViewPrivate16horizontalScrollEv @ 11912 NONAME
+ _ZNK20QGraphicsViewPrivate16mapRectFromSceneERK6QRectF @ 11913 NONAME
+ _ZNK20QGraphicsViewPrivate16rubberBandRegionEPK7QWidgetRK5QRect @ 11914 NONAME
+ _ZNK20QGraphicsViewPrivate9findItemsERK7QRegionPbRK10QTransform @ 11915 NONAME
+ _ZNK26QAbstractScrollAreaPrivate14contentsOffsetEv @ 11916 NONAME
+ _ZNK6QImage13constScanLineEi @ 11917 NONAME
+ _ZNK6QImage9constBitsEv @ 11918 NONAME
+ _ZNK6QLabel12selectedTextEv @ 11919 NONAME
+ _ZNK6QLabel14selectionStartEv @ 11920 NONAME
+ _ZNK6QLabel15hasSelectedTextEv @ 11921 NONAME
+ _ZNK7QBezier11getSubRangeEff @ 11922 NONAME
+ _ZNK7QBezier5mapByERK10QTransform @ 11923 NONAME
+ _ZTI20QGraphicsViewPrivate @ 11924 NONAME
+ _ZTI26QAbstractScrollAreaPrivate @ 11925 NONAME
+ _ZTV20QGraphicsViewPrivate @ 11926 NONAME
+ _ZTV26QAbstractScrollAreaPrivate @ 11927 NONAME
diff --git a/src/s60installs/eabi/QtMultimediau.def b/src/s60installs/eabi/QtMultimediau.def
index b5fda9ac19..fbc5f7b1fd 100644
--- a/src/s60installs/eabi/QtMultimediau.def
+++ b/src/s60installs/eabi/QtMultimediau.def
@@ -295,4 +295,655 @@ EXPORTS
_ZNK21QAbstractVideoSurface13nearestFormatERK19QVideoSurfaceFormat @ 294 NONAME
_ZNK21QAbstractVideoSurface17isFormatSupportedERK19QVideoSurfaceFormat @ 295 NONAME
_ZNK21QAbstractVideoSurface8isActiveEv @ 296 NONAME
+ _ZN12QAudioFormat13setSampleRateEi @ 297 NONAME
+ _ZN12QAudioFormat15setChannelCountEi @ 298 NONAME
+ _ZN12QMediaObject11qt_metacallEN11QMetaObject4CallEiPPv @ 299 NONAME
+ _ZN12QMediaObject11qt_metacastEPKc @ 300 NONAME
+ _ZN12QMediaObject11setMetaDataEN12QtMultimedia8MetaDataERK8QVariant @ 301 NONAME
+ _ZN12QMediaObject13setupMetaDataEv @ 302 NONAME
+ _ZN12QMediaObject15metaDataChangedEv @ 303 NONAME
+ _ZN12QMediaObject16addPropertyWatchERK10QByteArray @ 304 NONAME
+ _ZN12QMediaObject16staticMetaObjectE @ 305 NONAME DATA 16
+ _ZN12QMediaObject17setNotifyIntervalEi @ 306 NONAME
+ _ZN12QMediaObject19availabilityChangedEb @ 307 NONAME
+ _ZN12QMediaObject19getStaticMetaObjectEv @ 308 NONAME
+ _ZN12QMediaObject19removePropertyWatchERK10QByteArray @ 309 NONAME
+ _ZN12QMediaObject19setExtendedMetaDataERK7QStringRK8QVariant @ 310 NONAME
+ _ZN12QMediaObject21notifyIntervalChangedEi @ 311 NONAME
+ _ZN12QMediaObject23metaDataWritableChangedEb @ 312 NONAME
+ _ZN12QMediaObject24metaDataAvailableChangedEb @ 313 NONAME
+ _ZN12QMediaObject4bindEP7QObject @ 314 NONAME
+ _ZN12QMediaObject6unbindEP7QObject @ 315 NONAME
+ _ZN12QMediaObjectC1EP7QObjectP13QMediaService @ 316 NONAME
+ _ZN12QMediaObjectC1ER19QMediaObjectPrivateP7QObjectP13QMediaService @ 317 NONAME
+ _ZN12QMediaObjectC2EP7QObjectP13QMediaService @ 318 NONAME
+ _ZN12QMediaObjectC2ER19QMediaObjectPrivateP7QObjectP13QMediaService @ 319 NONAME
+ _ZN12QMediaObjectD0Ev @ 320 NONAME
+ _ZN12QMediaObjectD1Ev @ 321 NONAME
+ _ZN12QMediaObjectD2Ev @ 322 NONAME
+ _ZN12QMediaPlayer10hasSupportERK7QStringRK11QStringList6QFlagsINS_4FlagEE @ 323 NONAME
+ _ZN12QMediaPlayer11qt_metacallEN11QMetaObject4CallEiPPv @ 324 NONAME
+ _ZN12QMediaPlayer11qt_metacastEPKc @ 325 NONAME
+ _ZN12QMediaPlayer11setPositionEx @ 326 NONAME
+ _ZN12QMediaPlayer12mediaChangedERK13QMediaContent @ 327 NONAME
+ _ZN12QMediaPlayer12mutedChangedEb @ 328 NONAME
+ _ZN12QMediaPlayer12stateChangedENS_5StateE @ 329 NONAME
+ _ZN12QMediaPlayer13volumeChangedEi @ 330 NONAME
+ _ZN12QMediaPlayer15durationChangedEx @ 331 NONAME
+ _ZN12QMediaPlayer15positionChangedEx @ 332 NONAME
+ _ZN12QMediaPlayer15seekableChangedEb @ 333 NONAME
+ _ZN12QMediaPlayer15setPlaybackRateEf @ 334 NONAME
+ _ZN12QMediaPlayer16staticMetaObjectE @ 335 NONAME DATA 16
+ _ZN12QMediaPlayer18mediaStatusChangedENS_11MediaStatusE @ 336 NONAME
+ _ZN12QMediaPlayer18supportedMimeTypesE6QFlagsINS_4FlagEE @ 337 NONAME
+ _ZN12QMediaPlayer19bufferStatusChangedEi @ 338 NONAME
+ _ZN12QMediaPlayer19getStaticMetaObjectEv @ 339 NONAME
+ _ZN12QMediaPlayer19playbackRateChangedEf @ 340 NONAME
+ _ZN12QMediaPlayer21audioAvailableChangedEb @ 341 NONAME
+ _ZN12QMediaPlayer21videoAvailableChangedEb @ 342 NONAME
+ _ZN12QMediaPlayer4bindEP7QObject @ 343 NONAME
+ _ZN12QMediaPlayer4playEv @ 344 NONAME
+ _ZN12QMediaPlayer4stopEv @ 345 NONAME
+ _ZN12QMediaPlayer5errorENS_5ErrorE @ 346 NONAME
+ _ZN12QMediaPlayer5pauseEv @ 347 NONAME
+ _ZN12QMediaPlayer6unbindEP7QObject @ 348 NONAME
+ _ZN12QMediaPlayer8setMediaERK13QMediaContentP9QIODevice @ 349 NONAME
+ _ZN12QMediaPlayer8setMutedEb @ 350 NONAME
+ _ZN12QMediaPlayer9setVolumeEi @ 351 NONAME
+ _ZN12QMediaPlayerC1EP7QObject6QFlagsINS_4FlagEEP21QMediaServiceProvider @ 352 NONAME
+ _ZN12QMediaPlayerC2EP7QObject6QFlagsINS_4FlagEEP21QMediaServiceProvider @ 353 NONAME
+ _ZN12QMediaPlayerD0Ev @ 354 NONAME
+ _ZN12QMediaPlayerD1Ev @ 355 NONAME
+ _ZN12QMediaPlayerD2Ev @ 356 NONAME
+ _ZN12QVideoWidget10hueChangedEi @ 357 NONAME
+ _ZN12QVideoWidget10paintEventEP11QPaintEvent @ 358 NONAME
+ _ZN12QVideoWidget11qt_metacallEN11QMetaObject4CallEiPPv @ 359 NONAME
+ _ZN12QVideoWidget11qt_metacastEPKc @ 360 NONAME
+ _ZN12QVideoWidget11resizeEventEP12QResizeEvent @ 361 NONAME
+ _ZN12QVideoWidget11setContrastEi @ 362 NONAME
+ _ZN12QVideoWidget13setBrightnessEi @ 363 NONAME
+ _ZN12QVideoWidget13setFullScreenEb @ 364 NONAME
+ _ZN12QVideoWidget13setSaturationEi @ 365 NONAME
+ _ZN12QVideoWidget14setMediaObjectEP12QMediaObject @ 366 NONAME
+ _ZN12QVideoWidget15contrastChangedEi @ 367 NONAME
+ _ZN12QVideoWidget16staticMetaObjectE @ 368 NONAME DATA 16
+ _ZN12QVideoWidget17brightnessChangedEi @ 369 NONAME
+ _ZN12QVideoWidget17fullScreenChangedEb @ 370 NONAME
+ _ZN12QVideoWidget17saturationChangedEi @ 371 NONAME
+ _ZN12QVideoWidget18setAspectRatioModeENS_15AspectRatioModeE @ 372 NONAME
+ _ZN12QVideoWidget19getStaticMetaObjectEv @ 373 NONAME
+ _ZN12QVideoWidget5eventEP6QEvent @ 374 NONAME
+ _ZN12QVideoWidget6setHueEi @ 375 NONAME
+ _ZN12QVideoWidget9hideEventEP10QHideEvent @ 376 NONAME
+ _ZN12QVideoWidget9moveEventEP10QMoveEvent @ 377 NONAME
+ _ZN12QVideoWidget9showEventEP10QShowEvent @ 378 NONAME
+ _ZN12QVideoWidgetC1EP7QWidget @ 379 NONAME
+ _ZN12QVideoWidgetC2EP7QWidget @ 380 NONAME
+ _ZN12QVideoWidgetD0Ev @ 381 NONAME
+ _ZN12QVideoWidgetD1Ev @ 382 NONAME
+ _ZN12QVideoWidgetD2Ev @ 383 NONAME
+ _ZN12QtMultimedia28qRegisterDeclarativeElementsEPKc @ 384 NONAME
+ _ZN13QMediaContentC1ERK14QMediaResource @ 385 NONAME
+ _ZN13QMediaContentC1ERK15QNetworkRequest @ 386 NONAME
+ _ZN13QMediaContentC1ERK4QUrl @ 387 NONAME
+ _ZN13QMediaContentC1ERK5QListI14QMediaResourceE @ 388 NONAME
+ _ZN13QMediaContentC1ERKS_ @ 389 NONAME
+ _ZN13QMediaContentC1Ev @ 390 NONAME
+ _ZN13QMediaContentC2ERK14QMediaResource @ 391 NONAME
+ _ZN13QMediaContentC2ERK15QNetworkRequest @ 392 NONAME
+ _ZN13QMediaContentC2ERK4QUrl @ 393 NONAME
+ _ZN13QMediaContentC2ERK5QListI14QMediaResourceE @ 394 NONAME
+ _ZN13QMediaContentC2ERKS_ @ 395 NONAME
+ _ZN13QMediaContentC2Ev @ 396 NONAME
+ _ZN13QMediaContentD1Ev @ 397 NONAME
+ _ZN13QMediaContentD2Ev @ 398 NONAME
+ _ZN13QMediaContentaSERKS_ @ 399 NONAME
+ _ZN13QMediaControl11qt_metacallEN11QMetaObject4CallEiPPv @ 400 NONAME
+ _ZN13QMediaControl11qt_metacastEPKc @ 401 NONAME
+ _ZN13QMediaControl16staticMetaObjectE @ 402 NONAME DATA 16
+ _ZN13QMediaControl19getStaticMetaObjectEv @ 403 NONAME
+ _ZN13QMediaControlC1EP7QObject @ 404 NONAME
+ _ZN13QMediaControlC1ER20QMediaControlPrivateP7QObject @ 405 NONAME
+ _ZN13QMediaControlC2EP7QObject @ 406 NONAME
+ _ZN13QMediaControlC2ER20QMediaControlPrivateP7QObject @ 407 NONAME
+ _ZN13QMediaControlD0Ev @ 408 NONAME
+ _ZN13QMediaControlD1Ev @ 409 NONAME
+ _ZN13QMediaControlD2Ev @ 410 NONAME
+ _ZN13QMediaService11qt_metacallEN11QMetaObject4CallEiPPv @ 411 NONAME
+ _ZN13QMediaService11qt_metacastEPKc @ 412 NONAME
+ _ZN13QMediaService16staticMetaObjectE @ 413 NONAME DATA 16
+ _ZN13QMediaService19getStaticMetaObjectEv @ 414 NONAME
+ _ZN13QMediaServiceC2EP7QObject @ 415 NONAME
+ _ZN13QMediaServiceC2ER20QMediaServicePrivateP7QObject @ 416 NONAME
+ _ZN13QMediaServiceD0Ev @ 417 NONAME
+ _ZN13QMediaServiceD1Ev @ 418 NONAME
+ _ZN13QMediaServiceD2Ev @ 419 NONAME
+ _ZN14QMediaPlaylist10loadFailedEv @ 420 NONAME
+ _ZN14QMediaPlaylist11insertMediaEiRK13QMediaContent @ 421 NONAME
+ _ZN14QMediaPlaylist11insertMediaEiRK5QListI13QMediaContentE @ 422 NONAME
+ _ZN14QMediaPlaylist11qt_metacallEN11QMetaObject4CallEiPPv @ 423 NONAME
+ _ZN14QMediaPlaylist11qt_metacastEPKc @ 424 NONAME
+ _ZN14QMediaPlaylist11removeMediaEi @ 425 NONAME
+ _ZN14QMediaPlaylist11removeMediaEii @ 426 NONAME
+ _ZN14QMediaPlaylist12mediaChangedEii @ 427 NONAME
+ _ZN14QMediaPlaylist12mediaRemovedEii @ 428 NONAME
+ _ZN14QMediaPlaylist13mediaInsertedEii @ 429 NONAME
+ _ZN14QMediaPlaylist14setMediaObjectEP12QMediaObject @ 430 NONAME
+ _ZN14QMediaPlaylist15setCurrentIndexEi @ 431 NONAME
+ _ZN14QMediaPlaylist15setPlaybackModeENS_12PlaybackModeE @ 432 NONAME
+ _ZN14QMediaPlaylist16staticMetaObjectE @ 433 NONAME DATA 16
+ _ZN14QMediaPlaylist19currentIndexChangedEi @ 434 NONAME
+ _ZN14QMediaPlaylist19currentMediaChangedERK13QMediaContent @ 435 NONAME
+ _ZN14QMediaPlaylist19getStaticMetaObjectEv @ 436 NONAME
+ _ZN14QMediaPlaylist19playbackModeChangedENS_12PlaybackModeE @ 437 NONAME
+ _ZN14QMediaPlaylist21mediaAboutToBeRemovedEii @ 438 NONAME
+ _ZN14QMediaPlaylist22mediaAboutToBeInsertedEii @ 439 NONAME
+ _ZN14QMediaPlaylist4loadEP9QIODevicePKc @ 440 NONAME
+ _ZN14QMediaPlaylist4loadERK4QUrlPKc @ 441 NONAME
+ _ZN14QMediaPlaylist4nextEv @ 442 NONAME
+ _ZN14QMediaPlaylist4saveEP9QIODevicePKc @ 443 NONAME
+ _ZN14QMediaPlaylist4saveERK4QUrlPKc @ 444 NONAME
+ _ZN14QMediaPlaylist5clearEv @ 445 NONAME
+ _ZN14QMediaPlaylist6loadedEv @ 446 NONAME
+ _ZN14QMediaPlaylist7shuffleEv @ 447 NONAME
+ _ZN14QMediaPlaylist8addMediaERK13QMediaContent @ 448 NONAME
+ _ZN14QMediaPlaylist8addMediaERK5QListI13QMediaContentE @ 449 NONAME
+ _ZN14QMediaPlaylist8previousEv @ 450 NONAME
+ _ZN14QMediaPlaylistC1EP7QObject @ 451 NONAME
+ _ZN14QMediaPlaylistC2EP7QObject @ 452 NONAME
+ _ZN14QMediaPlaylistD0Ev @ 453 NONAME
+ _ZN14QMediaPlaylistD1Ev @ 454 NONAME
+ _ZN14QMediaPlaylistD2Ev @ 455 NONAME
+ _ZN14QMediaResource11setDataSizeEx @ 456 NONAME
+ _ZN14QMediaResource11setLanguageERK7QString @ 457 NONAME
+ _ZN14QMediaResource13setAudioCodecERK7QString @ 458 NONAME
+ _ZN14QMediaResource13setResolutionERK5QSize @ 459 NONAME
+ _ZN14QMediaResource13setResolutionEii @ 460 NONAME
+ _ZN14QMediaResource13setSampleRateEi @ 461 NONAME
+ _ZN14QMediaResource13setVideoCodecERK7QString @ 462 NONAME
+ _ZN14QMediaResource15setAudioBitRateEi @ 463 NONAME
+ _ZN14QMediaResource15setChannelCountEi @ 464 NONAME
+ _ZN14QMediaResource15setVideoBitRateEi @ 465 NONAME
+ _ZN14QMediaResourceC1ERK15QNetworkRequestRK7QString @ 466 NONAME
+ _ZN14QMediaResourceC1ERK4QUrlRK7QString @ 467 NONAME
+ _ZN14QMediaResourceC1ERKS_ @ 468 NONAME
+ _ZN14QMediaResourceC1Ev @ 469 NONAME
+ _ZN14QMediaResourceC2ERK15QNetworkRequestRK7QString @ 470 NONAME
+ _ZN14QMediaResourceC2ERK4QUrlRK7QString @ 471 NONAME
+ _ZN14QMediaResourceC2ERKS_ @ 472 NONAME
+ _ZN14QMediaResourceC2Ev @ 473 NONAME
+ _ZN14QMediaResourceD1Ev @ 474 NONAME
+ _ZN14QMediaResourceD2Ev @ 475 NONAME
+ _ZN14QMediaResourceaSERKS_ @ 476 NONAME
+ _ZN15QMediaTimeRange11addIntervalERK18QMediaTimeInterval @ 477 NONAME
+ _ZN15QMediaTimeRange11addIntervalExx @ 478 NONAME
+ _ZN15QMediaTimeRange12addTimeRangeERKS_ @ 479 NONAME
+ _ZN15QMediaTimeRange14removeIntervalERK18QMediaTimeInterval @ 480 NONAME
+ _ZN15QMediaTimeRange14removeIntervalExx @ 481 NONAME
+ _ZN15QMediaTimeRange15removeTimeRangeERKS_ @ 482 NONAME
+ _ZN15QMediaTimeRange5clearEv @ 483 NONAME
+ _ZN15QMediaTimeRangeC1ERK18QMediaTimeInterval @ 484 NONAME
+ _ZN15QMediaTimeRangeC1ERKS_ @ 485 NONAME
+ _ZN15QMediaTimeRangeC1Ev @ 486 NONAME
+ _ZN15QMediaTimeRangeC1Exx @ 487 NONAME
+ _ZN15QMediaTimeRangeC2ERK18QMediaTimeInterval @ 488 NONAME
+ _ZN15QMediaTimeRangeC2ERKS_ @ 489 NONAME
+ _ZN15QMediaTimeRangeC2Ev @ 490 NONAME
+ _ZN15QMediaTimeRangeC2Exx @ 491 NONAME
+ _ZN15QMediaTimeRangeD1Ev @ 492 NONAME
+ _ZN15QMediaTimeRangeD2Ev @ 493 NONAME
+ _ZN15QMediaTimeRangeaSERK18QMediaTimeInterval @ 494 NONAME
+ _ZN15QMediaTimeRangeaSERKS_ @ 495 NONAME
+ _ZN15QMediaTimeRangemIERK18QMediaTimeInterval @ 496 NONAME
+ _ZN15QMediaTimeRangemIERKS_ @ 497 NONAME
+ _ZN15QMediaTimeRangepLERK18QMediaTimeInterval @ 498 NONAME
+ _ZN15QMediaTimeRangepLERKS_ @ 499 NONAME
+ _ZN16QMetaDataControl11qt_metacallEN11QMetaObject4CallEiPPv @ 500 NONAME
+ _ZN16QMetaDataControl11qt_metacastEPKc @ 501 NONAME
+ _ZN16QMetaDataControl15metaDataChangedEv @ 502 NONAME
+ _ZN16QMetaDataControl15writableChangedEb @ 503 NONAME
+ _ZN16QMetaDataControl16staticMetaObjectE @ 504 NONAME DATA 16
+ _ZN16QMetaDataControl19getStaticMetaObjectEv @ 505 NONAME
+ _ZN16QMetaDataControl24metaDataAvailableChangedEb @ 506 NONAME
+ _ZN16QMetaDataControlC2EP7QObject @ 507 NONAME
+ _ZN16QMetaDataControlD0Ev @ 508 NONAME
+ _ZN16QMetaDataControlD1Ev @ 509 NONAME
+ _ZN16QMetaDataControlD2Ev @ 510 NONAME
+ _ZN18QGraphicsVideoItem10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 511 NONAME
+ _ZN18QGraphicsVideoItem11qt_metacallEN11QMetaObject4CallEiPPv @ 512 NONAME
+ _ZN18QGraphicsVideoItem11qt_metacastEPKc @ 513 NONAME
+ _ZN18QGraphicsVideoItem14setMediaObjectEP12QMediaObject @ 514 NONAME
+ _ZN18QGraphicsVideoItem16staticMetaObjectE @ 515 NONAME DATA 16
+ _ZN18QGraphicsVideoItem17nativeSizeChangedERK6QSizeF @ 516 NONAME
+ _ZN18QGraphicsVideoItem18setAspectRatioModeEN2Qt15AspectRatioModeE @ 517 NONAME
+ _ZN18QGraphicsVideoItem19getStaticMetaObjectEv @ 518 NONAME
+ _ZN18QGraphicsVideoItem5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 519 NONAME
+ _ZN18QGraphicsVideoItem7setSizeERK6QSizeF @ 520 NONAME
+ _ZN18QGraphicsVideoItem9setOffsetERK7QPointF @ 521 NONAME
+ _ZN18QGraphicsVideoItemC1EP13QGraphicsItem @ 522 NONAME
+ _ZN18QGraphicsVideoItemC2EP13QGraphicsItem @ 523 NONAME
+ _ZN18QGraphicsVideoItemD0Ev @ 524 NONAME
+ _ZN18QGraphicsVideoItemD1Ev @ 525 NONAME
+ _ZN18QGraphicsVideoItemD2Ev @ 526 NONAME
+ _ZN18QMediaTimeIntervalC1ERKS_ @ 527 NONAME
+ _ZN18QMediaTimeIntervalC1Ev @ 528 NONAME
+ _ZN18QMediaTimeIntervalC1Exx @ 529 NONAME
+ _ZN18QMediaTimeIntervalC2ERKS_ @ 530 NONAME
+ _ZN18QMediaTimeIntervalC2Ev @ 531 NONAME
+ _ZN18QMediaTimeIntervalC2Exx @ 532 NONAME
+ _ZN19QMediaPlayerControl11qt_metacallEN11QMetaObject4CallEiPPv @ 533 NONAME
+ _ZN19QMediaPlayerControl11qt_metacastEPKc @ 534 NONAME
+ _ZN19QMediaPlayerControl12mediaChangedERK13QMediaContent @ 535 NONAME
+ _ZN19QMediaPlayerControl12mutedChangedEb @ 536 NONAME
+ _ZN19QMediaPlayerControl12stateChangedEN12QMediaPlayer5StateE @ 537 NONAME
+ _ZN19QMediaPlayerControl13volumeChangedEi @ 538 NONAME
+ _ZN19QMediaPlayerControl15durationChangedEx @ 539 NONAME
+ _ZN19QMediaPlayerControl15positionChangedEx @ 540 NONAME
+ _ZN19QMediaPlayerControl15seekableChangedEb @ 541 NONAME
+ _ZN19QMediaPlayerControl16staticMetaObjectE @ 542 NONAME DATA 16
+ _ZN19QMediaPlayerControl18mediaStatusChangedEN12QMediaPlayer11MediaStatusE @ 543 NONAME
+ _ZN19QMediaPlayerControl19bufferStatusChangedEi @ 544 NONAME
+ _ZN19QMediaPlayerControl19getStaticMetaObjectEv @ 545 NONAME
+ _ZN19QMediaPlayerControl19playbackRateChangedEf @ 546 NONAME
+ _ZN19QMediaPlayerControl21audioAvailableChangedEb @ 547 NONAME
+ _ZN19QMediaPlayerControl21videoAvailableChangedEb @ 548 NONAME
+ _ZN19QMediaPlayerControl30availablePlaybackRangesChangedERK15QMediaTimeRange @ 549 NONAME
+ _ZN19QMediaPlayerControl5errorEiRK7QString @ 550 NONAME
+ _ZN19QMediaPlayerControlC2EP7QObject @ 551 NONAME
+ _ZN19QMediaPlayerControlD0Ev @ 552 NONAME
+ _ZN19QMediaPlayerControlD1Ev @ 553 NONAME
+ _ZN19QMediaPlayerControlD2Ev @ 554 NONAME
+ _ZN19QVideoDeviceControl11qt_metacallEN11QMetaObject4CallEiPPv @ 555 NONAME
+ _ZN19QVideoDeviceControl11qt_metacastEPKc @ 556 NONAME
+ _ZN19QVideoDeviceControl14devicesChangedEv @ 557 NONAME
+ _ZN19QVideoDeviceControl16staticMetaObjectE @ 558 NONAME DATA 16
+ _ZN19QVideoDeviceControl19getStaticMetaObjectEv @ 559 NONAME
+ _ZN19QVideoDeviceControl21selectedDeviceChangedERK7QString @ 560 NONAME
+ _ZN19QVideoDeviceControl21selectedDeviceChangedEi @ 561 NONAME
+ _ZN19QVideoDeviceControlC2EP7QObject @ 562 NONAME
+ _ZN19QVideoDeviceControlD0Ev @ 563 NONAME
+ _ZN19QVideoDeviceControlD1Ev @ 564 NONAME
+ _ZN19QVideoDeviceControlD2Ev @ 565 NONAME
+ _ZN19QVideoOutputControl11qt_metacallEN11QMetaObject4CallEiPPv @ 566 NONAME
+ _ZN19QVideoOutputControl11qt_metacastEPKc @ 567 NONAME
+ _ZN19QVideoOutputControl16staticMetaObjectE @ 568 NONAME DATA 16
+ _ZN19QVideoOutputControl19getStaticMetaObjectEv @ 569 NONAME
+ _ZN19QVideoOutputControl23availableOutputsChangedERK5QListINS_6OutputEE @ 570 NONAME
+ _ZN19QVideoOutputControlC2EP7QObject @ 571 NONAME
+ _ZN19QVideoOutputControlD0Ev @ 572 NONAME
+ _ZN19QVideoOutputControlD1Ev @ 573 NONAME
+ _ZN19QVideoOutputControlD2Ev @ 574 NONAME
+ _ZN19QVideoWidgetControl10hueChangedEi @ 575 NONAME
+ _ZN19QVideoWidgetControl11qt_metacallEN11QMetaObject4CallEiPPv @ 576 NONAME
+ _ZN19QVideoWidgetControl11qt_metacastEPKc @ 577 NONAME
+ _ZN19QVideoWidgetControl15contrastChangedEi @ 578 NONAME
+ _ZN19QVideoWidgetControl16staticMetaObjectE @ 579 NONAME DATA 16
+ _ZN19QVideoWidgetControl17brightnessChangedEi @ 580 NONAME
+ _ZN19QVideoWidgetControl17fullScreenChangedEb @ 581 NONAME
+ _ZN19QVideoWidgetControl17saturationChangedEi @ 582 NONAME
+ _ZN19QVideoWidgetControl19getStaticMetaObjectEv @ 583 NONAME
+ _ZN19QVideoWidgetControlC2EP7QObject @ 584 NONAME
+ _ZN19QVideoWidgetControlD0Ev @ 585 NONAME
+ _ZN19QVideoWidgetControlD1Ev @ 586 NONAME
+ _ZN19QVideoWidgetControlD2Ev @ 587 NONAME
+ _ZN19QVideoWindowControl10hueChangedEi @ 588 NONAME
+ _ZN19QVideoWindowControl11qt_metacallEN11QMetaObject4CallEiPPv @ 589 NONAME
+ _ZN19QVideoWindowControl11qt_metacastEPKc @ 590 NONAME
+ _ZN19QVideoWindowControl15contrastChangedEi @ 591 NONAME
+ _ZN19QVideoWindowControl16staticMetaObjectE @ 592 NONAME DATA 16
+ _ZN19QVideoWindowControl17brightnessChangedEi @ 593 NONAME
+ _ZN19QVideoWindowControl17fullScreenChangedEb @ 594 NONAME
+ _ZN19QVideoWindowControl17nativeSizeChangedEv @ 595 NONAME
+ _ZN19QVideoWindowControl17saturationChangedEi @ 596 NONAME
+ _ZN19QVideoWindowControl19getStaticMetaObjectEv @ 597 NONAME
+ _ZN19QVideoWindowControlC2EP7QObject @ 598 NONAME
+ _ZN19QVideoWindowControlD0Ev @ 599 NONAME
+ _ZN19QVideoWindowControlD1Ev @ 600 NONAME
+ _ZN19QVideoWindowControlD2Ev @ 601 NONAME
+ _ZN20QMediaPlaylistReaderD0Ev @ 602 NONAME
+ _ZN20QMediaPlaylistReaderD1Ev @ 603 NONAME
+ _ZN20QMediaPlaylistReaderD2Ev @ 604 NONAME
+ _ZN20QMediaPlaylistWriterD0Ev @ 605 NONAME
+ _ZN20QMediaPlaylistWriterD1Ev @ 606 NONAME
+ _ZN20QMediaPlaylistWriterD2Ev @ 607 NONAME
+ _ZN20QPainterVideoSurface11qt_metacallEN11QMetaObject4CallEiPPv @ 608 NONAME
+ _ZN20QPainterVideoSurface11qt_metacastEPKc @ 609 NONAME
+ _ZN20QPainterVideoSurface11setContrastEi @ 610 NONAME
+ _ZN20QPainterVideoSurface12frameChangedEv @ 611 NONAME
+ _ZN20QPainterVideoSurface13createPainterEv @ 612 NONAME
+ _ZN20QPainterVideoSurface13setBrightnessEi @ 613 NONAME
+ _ZN20QPainterVideoSurface13setSaturationEi @ 614 NONAME
+ _ZN20QPainterVideoSurface16staticMetaObjectE @ 615 NONAME DATA 16
+ _ZN20QPainterVideoSurface19getStaticMetaObjectEv @ 616 NONAME
+ _ZN20QPainterVideoSurface4stopEv @ 617 NONAME
+ _ZN20QPainterVideoSurface5paintEP8QPainterRK6QRectFS4_ @ 618 NONAME
+ _ZN20QPainterVideoSurface5startERK19QVideoSurfaceFormat @ 619 NONAME
+ _ZN20QPainterVideoSurface6setHueEi @ 620 NONAME
+ _ZN20QPainterVideoSurface7presentERK11QVideoFrame @ 621 NONAME
+ _ZN20QPainterVideoSurface8setReadyEb @ 622 NONAME
+ _ZN20QPainterVideoSurfaceC1EP7QObject @ 623 NONAME
+ _ZN20QPainterVideoSurfaceC2EP7QObject @ 624 NONAME
+ _ZN20QPainterVideoSurfaceD0Ev @ 625 NONAME
+ _ZN20QPainterVideoSurfaceD1Ev @ 626 NONAME
+ _ZN20QPainterVideoSurfaceD2Ev @ 627 NONAME
+ _ZN21QMediaPlaylistControl11qt_metacallEN11QMetaObject4CallEiPPv @ 628 NONAME
+ _ZN21QMediaPlaylistControl11qt_metacastEPKc @ 629 NONAME
+ _ZN21QMediaPlaylistControl16staticMetaObjectE @ 630 NONAME DATA 16
+ _ZN21QMediaPlaylistControl19currentIndexChangedEi @ 631 NONAME
+ _ZN21QMediaPlaylistControl19currentMediaChangedERK13QMediaContent @ 632 NONAME
+ _ZN21QMediaPlaylistControl19getStaticMetaObjectEv @ 633 NONAME
+ _ZN21QMediaPlaylistControl19playbackModeChangedEN14QMediaPlaylist12PlaybackModeE @ 634 NONAME
+ _ZN21QMediaPlaylistControl23playlistProviderChangedEv @ 635 NONAME
+ _ZN21QMediaPlaylistControlC2EP7QObject @ 636 NONAME
+ _ZN21QMediaPlaylistControlD0Ev @ 637 NONAME
+ _ZN21QMediaPlaylistControlD1Ev @ 638 NONAME
+ _ZN21QMediaPlaylistControlD2Ev @ 639 NONAME
+ _ZN21QMediaServiceProvider11qt_metacallEN11QMetaObject4CallEiPPv @ 640 NONAME
+ _ZN21QMediaServiceProvider11qt_metacastEPKc @ 641 NONAME
+ _ZN21QMediaServiceProvider16staticMetaObjectE @ 642 NONAME DATA 16
+ _ZN21QMediaServiceProvider17deviceDescriptionERK10QByteArrayS2_ @ 643 NONAME
+ _ZN21QMediaServiceProvider19getStaticMetaObjectEv @ 644 NONAME
+ _ZN21QMediaServiceProvider22defaultServiceProviderEv @ 645 NONAME
+ _ZN21QVideoRendererControl11qt_metacallEN11QMetaObject4CallEiPPv @ 646 NONAME
+ _ZN21QVideoRendererControl11qt_metacastEPKc @ 647 NONAME
+ _ZN21QVideoRendererControl16staticMetaObjectE @ 648 NONAME DATA 16
+ _ZN21QVideoRendererControl19getStaticMetaObjectEv @ 649 NONAME
+ _ZN21QVideoRendererControlC2EP7QObject @ 650 NONAME
+ _ZN21QVideoRendererControlD0Ev @ 651 NONAME
+ _ZN21QVideoRendererControlD1Ev @ 652 NONAME
+ _ZN21QVideoRendererControlD2Ev @ 653 NONAME
+ _ZN22QMediaPlaylistIOPlugin11qt_metacallEN11QMetaObject4CallEiPPv @ 654 NONAME
+ _ZN22QMediaPlaylistIOPlugin11qt_metacastEPKc @ 655 NONAME
+ _ZN22QMediaPlaylistIOPlugin16staticMetaObjectE @ 656 NONAME DATA 16
+ _ZN22QMediaPlaylistIOPlugin19getStaticMetaObjectEv @ 657 NONAME
+ _ZN22QMediaPlaylistIOPluginC2EP7QObject @ 658 NONAME
+ _ZN22QMediaPlaylistIOPluginD0Ev @ 659 NONAME
+ _ZN22QMediaPlaylistIOPluginD1Ev @ 660 NONAME
+ _ZN22QMediaPlaylistIOPluginD2Ev @ 661 NONAME
+ _ZN22QMediaPlaylistProvider10loadFailedEN14QMediaPlaylist5ErrorERK7QString @ 662 NONAME
+ _ZN22QMediaPlaylistProvider11insertMediaEiRK13QMediaContent @ 663 NONAME
+ _ZN22QMediaPlaylistProvider11insertMediaEiRK5QListI13QMediaContentE @ 664 NONAME
+ _ZN22QMediaPlaylistProvider11qt_metacallEN11QMetaObject4CallEiPPv @ 665 NONAME
+ _ZN22QMediaPlaylistProvider11qt_metacastEPKc @ 666 NONAME
+ _ZN22QMediaPlaylistProvider11removeMediaEi @ 667 NONAME
+ _ZN22QMediaPlaylistProvider11removeMediaEii @ 668 NONAME
+ _ZN22QMediaPlaylistProvider12mediaChangedEii @ 669 NONAME
+ _ZN22QMediaPlaylistProvider12mediaRemovedEii @ 670 NONAME
+ _ZN22QMediaPlaylistProvider13mediaInsertedEii @ 671 NONAME
+ _ZN22QMediaPlaylistProvider16staticMetaObjectE @ 672 NONAME DATA 16
+ _ZN22QMediaPlaylistProvider19getStaticMetaObjectEv @ 673 NONAME
+ _ZN22QMediaPlaylistProvider21mediaAboutToBeRemovedEii @ 674 NONAME
+ _ZN22QMediaPlaylistProvider22mediaAboutToBeInsertedEii @ 675 NONAME
+ _ZN22QMediaPlaylistProvider4loadEP9QIODevicePKc @ 676 NONAME
+ _ZN22QMediaPlaylistProvider4loadERK4QUrlPKc @ 677 NONAME
+ _ZN22QMediaPlaylistProvider4saveEP9QIODevicePKc @ 678 NONAME
+ _ZN22QMediaPlaylistProvider4saveERK4QUrlPKc @ 679 NONAME
+ _ZN22QMediaPlaylistProvider5clearEv @ 680 NONAME
+ _ZN22QMediaPlaylistProvider6loadedEv @ 681 NONAME
+ _ZN22QMediaPlaylistProvider7shuffleEv @ 682 NONAME
+ _ZN22QMediaPlaylistProvider8addMediaERK13QMediaContent @ 683 NONAME
+ _ZN22QMediaPlaylistProvider8addMediaERK5QListI13QMediaContentE @ 684 NONAME
+ _ZN22QMediaPlaylistProviderC2EP7QObject @ 685 NONAME
+ _ZN22QMediaPlaylistProviderC2ER29QMediaPlaylistProviderPrivateP7QObject @ 686 NONAME
+ _ZN22QMediaPlaylistProviderD0Ev @ 687 NONAME
+ _ZN22QMediaPlaylistProviderD1Ev @ 688 NONAME
+ _ZN22QMediaPlaylistProviderD2Ev @ 689 NONAME
+ _ZN23QMediaPlaylistNavigator11qt_metacallEN11QMetaObject4CallEiPPv @ 690 NONAME
+ _ZN23QMediaPlaylistNavigator11qt_metacastEPKc @ 691 NONAME
+ _ZN23QMediaPlaylistNavigator11setPlaylistEP22QMediaPlaylistProvider @ 692 NONAME
+ _ZN23QMediaPlaylistNavigator15setPlaybackModeEN14QMediaPlaylist12PlaybackModeE @ 693 NONAME
+ _ZN23QMediaPlaylistNavigator16staticMetaObjectE @ 694 NONAME DATA 16
+ _ZN23QMediaPlaylistNavigator19currentIndexChangedEi @ 695 NONAME
+ _ZN23QMediaPlaylistNavigator19getStaticMetaObjectEv @ 696 NONAME
+ _ZN23QMediaPlaylistNavigator19playbackModeChangedEN14QMediaPlaylist12PlaybackModeE @ 697 NONAME
+ _ZN23QMediaPlaylistNavigator23surroundingItemsChangedEv @ 698 NONAME
+ _ZN23QMediaPlaylistNavigator4jumpEi @ 699 NONAME
+ _ZN23QMediaPlaylistNavigator4nextEv @ 700 NONAME
+ _ZN23QMediaPlaylistNavigator8previousEv @ 701 NONAME
+ _ZN23QMediaPlaylistNavigator9activatedERK13QMediaContent @ 702 NONAME
+ _ZN23QMediaPlaylistNavigatorC1EP22QMediaPlaylistProviderP7QObject @ 703 NONAME
+ _ZN23QMediaPlaylistNavigatorC2EP22QMediaPlaylistProviderP7QObject @ 704 NONAME
+ _ZN23QMediaPlaylistNavigatorD0Ev @ 705 NONAME
+ _ZN23QMediaPlaylistNavigatorD1Ev @ 706 NONAME
+ _ZN23QMediaPlaylistNavigatorD2Ev @ 707 NONAME
+ _ZN25QMediaServiceProviderHintC1E6QFlagsINS_7FeatureEE @ 708 NONAME
+ _ZN25QMediaServiceProviderHintC1ERK10QByteArray @ 709 NONAME
+ _ZN25QMediaServiceProviderHintC1ERK7QStringRK11QStringList @ 710 NONAME
+ _ZN25QMediaServiceProviderHintC1ERKS_ @ 711 NONAME
+ _ZN25QMediaServiceProviderHintC1Ev @ 712 NONAME
+ _ZN25QMediaServiceProviderHintC2E6QFlagsINS_7FeatureEE @ 713 NONAME
+ _ZN25QMediaServiceProviderHintC2ERK10QByteArray @ 714 NONAME
+ _ZN25QMediaServiceProviderHintC2ERK7QStringRK11QStringList @ 715 NONAME
+ _ZN25QMediaServiceProviderHintC2ERKS_ @ 716 NONAME
+ _ZN25QMediaServiceProviderHintC2Ev @ 717 NONAME
+ _ZN25QMediaServiceProviderHintD1Ev @ 718 NONAME
+ _ZN25QMediaServiceProviderHintD2Ev @ 719 NONAME
+ _ZN25QMediaServiceProviderHintaSERKS_ @ 720 NONAME
+ _ZN27QLocalMediaPlaylistProvider11insertMediaEiRK13QMediaContent @ 721 NONAME
+ _ZN27QLocalMediaPlaylistProvider11insertMediaEiRK5QListI13QMediaContentE @ 722 NONAME
+ _ZN27QLocalMediaPlaylistProvider11qt_metacallEN11QMetaObject4CallEiPPv @ 723 NONAME
+ _ZN27QLocalMediaPlaylistProvider11qt_metacastEPKc @ 724 NONAME
+ _ZN27QLocalMediaPlaylistProvider11removeMediaEi @ 725 NONAME
+ _ZN27QLocalMediaPlaylistProvider11removeMediaEii @ 726 NONAME
+ _ZN27QLocalMediaPlaylistProvider16staticMetaObjectE @ 727 NONAME DATA 16
+ _ZN27QLocalMediaPlaylistProvider19getStaticMetaObjectEv @ 728 NONAME
+ _ZN27QLocalMediaPlaylistProvider5clearEv @ 729 NONAME
+ _ZN27QLocalMediaPlaylistProvider7shuffleEv @ 730 NONAME
+ _ZN27QLocalMediaPlaylistProvider8addMediaERK13QMediaContent @ 731 NONAME
+ _ZN27QLocalMediaPlaylistProvider8addMediaERK5QListI13QMediaContentE @ 732 NONAME
+ _ZN27QLocalMediaPlaylistProviderC1EP7QObject @ 733 NONAME
+ _ZN27QLocalMediaPlaylistProviderC2EP7QObject @ 734 NONAME
+ _ZN27QLocalMediaPlaylistProviderD0Ev @ 735 NONAME
+ _ZN27QLocalMediaPlaylistProviderD1Ev @ 736 NONAME
+ _ZN27QLocalMediaPlaylistProviderD2Ev @ 737 NONAME
+ _ZN27QMediaServiceProviderPlugin11qt_metacallEN11QMetaObject4CallEiPPv @ 738 NONAME
+ _ZN27QMediaServiceProviderPlugin11qt_metacastEPKc @ 739 NONAME
+ _ZN27QMediaServiceProviderPlugin16staticMetaObjectE @ 740 NONAME DATA 16
+ _ZN27QMediaServiceProviderPlugin19getStaticMetaObjectEv @ 741 NONAME
+ _ZNK12QAudioFormat10sampleRateEv @ 742 NONAME
+ _ZNK12QAudioFormat12channelCountEv @ 743 NONAME
+ _ZNK12QMediaObject10metaObjectEv @ 744 NONAME
+ _ZNK12QMediaObject11isAvailableEv @ 745 NONAME
+ _ZNK12QMediaObject14notifyIntervalEv @ 746 NONAME
+ _ZNK12QMediaObject16extendedMetaDataERK7QString @ 747 NONAME
+ _ZNK12QMediaObject17availabilityErrorEv @ 748 NONAME
+ _ZNK12QMediaObject17availableMetaDataEv @ 749 NONAME
+ _ZNK12QMediaObject18isMetaDataWritableEv @ 750 NONAME
+ _ZNK12QMediaObject19isMetaDataAvailableEv @ 751 NONAME
+ _ZNK12QMediaObject25availableExtendedMetaDataEv @ 752 NONAME
+ _ZNK12QMediaObject7serviceEv @ 753 NONAME
+ _ZNK12QMediaObject8metaDataEN12QtMultimedia8MetaDataE @ 754 NONAME
+ _ZNK12QMediaPlayer10isSeekableEv @ 755 NONAME
+ _ZNK12QMediaPlayer10metaObjectEv @ 756 NONAME
+ _ZNK12QMediaPlayer11errorStringEv @ 757 NONAME
+ _ZNK12QMediaPlayer11mediaStatusEv @ 758 NONAME
+ _ZNK12QMediaPlayer11mediaStreamEv @ 759 NONAME
+ _ZNK12QMediaPlayer12bufferStatusEv @ 760 NONAME
+ _ZNK12QMediaPlayer12playbackRateEv @ 761 NONAME
+ _ZNK12QMediaPlayer16isAudioAvailableEv @ 762 NONAME
+ _ZNK12QMediaPlayer16isVideoAvailableEv @ 763 NONAME
+ _ZNK12QMediaPlayer5errorEv @ 764 NONAME
+ _ZNK12QMediaPlayer5mediaEv @ 765 NONAME
+ _ZNK12QMediaPlayer5stateEv @ 766 NONAME
+ _ZNK12QMediaPlayer6volumeEv @ 767 NONAME
+ _ZNK12QMediaPlayer7isMutedEv @ 768 NONAME
+ _ZNK12QMediaPlayer8durationEv @ 769 NONAME
+ _ZNK12QMediaPlayer8positionEv @ 770 NONAME
+ _ZNK12QVideoWidget10brightnessEv @ 771 NONAME
+ _ZNK12QVideoWidget10metaObjectEv @ 772 NONAME
+ _ZNK12QVideoWidget10saturationEv @ 773 NONAME
+ _ZNK12QVideoWidget11mediaObjectEv @ 774 NONAME
+ _ZNK12QVideoWidget15aspectRatioModeEv @ 775 NONAME
+ _ZNK12QVideoWidget3hueEv @ 776 NONAME
+ _ZNK12QVideoWidget8contrastEv @ 777 NONAME
+ _ZNK12QVideoWidget8sizeHintEv @ 778 NONAME
+ _ZNK13QMediaContent12canonicalUrlEv @ 779 NONAME
+ _ZNK13QMediaContent16canonicalRequestEv @ 780 NONAME
+ _ZNK13QMediaContent17canonicalResourceEv @ 781 NONAME
+ _ZNK13QMediaContent6isNullEv @ 782 NONAME
+ _ZNK13QMediaContent9resourcesEv @ 783 NONAME
+ _ZNK13QMediaContenteqERKS_ @ 784 NONAME
+ _ZNK13QMediaContentneERKS_ @ 785 NONAME
+ _ZNK13QMediaControl10metaObjectEv @ 786 NONAME
+ _ZNK13QMediaService10metaObjectEv @ 787 NONAME
+ _ZNK14QMediaPlaylist10isReadOnlyEv @ 788 NONAME
+ _ZNK14QMediaPlaylist10mediaCountEv @ 789 NONAME
+ _ZNK14QMediaPlaylist10metaObjectEv @ 790 NONAME
+ _ZNK14QMediaPlaylist11errorStringEv @ 791 NONAME
+ _ZNK14QMediaPlaylist11mediaObjectEv @ 792 NONAME
+ _ZNK14QMediaPlaylist12currentIndexEv @ 793 NONAME
+ _ZNK14QMediaPlaylist12currentMediaEv @ 794 NONAME
+ _ZNK14QMediaPlaylist12playbackModeEv @ 795 NONAME
+ _ZNK14QMediaPlaylist13previousIndexEi @ 796 NONAME
+ _ZNK14QMediaPlaylist5errorEv @ 797 NONAME
+ _ZNK14QMediaPlaylist5mediaEi @ 798 NONAME
+ _ZNK14QMediaPlaylist7isEmptyEv @ 799 NONAME
+ _ZNK14QMediaPlaylist9nextIndexEi @ 800 NONAME
+ _ZNK14QMediaResource10audioCodecEv @ 801 NONAME
+ _ZNK14QMediaResource10resolutionEv @ 802 NONAME
+ _ZNK14QMediaResource10sampleRateEv @ 803 NONAME
+ _ZNK14QMediaResource10videoCodecEv @ 804 NONAME
+ _ZNK14QMediaResource12audioBitRateEv @ 805 NONAME
+ _ZNK14QMediaResource12channelCountEv @ 806 NONAME
+ _ZNK14QMediaResource12videoBitRateEv @ 807 NONAME
+ _ZNK14QMediaResource3urlEv @ 808 NONAME
+ _ZNK14QMediaResource6isNullEv @ 809 NONAME
+ _ZNK14QMediaResource7requestEv @ 810 NONAME
+ _ZNK14QMediaResource8dataSizeEv @ 811 NONAME
+ _ZNK14QMediaResource8languageEv @ 812 NONAME
+ _ZNK14QMediaResource8mimeTypeEv @ 813 NONAME
+ _ZNK14QMediaResourceeqERKS_ @ 814 NONAME
+ _ZNK14QMediaResourceneERKS_ @ 815 NONAME
+ _ZNK15QMediaTimeRange10latestTimeEv @ 816 NONAME
+ _ZNK15QMediaTimeRange12earliestTimeEv @ 817 NONAME
+ _ZNK15QMediaTimeRange12isContinuousEv @ 818 NONAME
+ _ZNK15QMediaTimeRange7isEmptyEv @ 819 NONAME
+ _ZNK15QMediaTimeRange8containsEx @ 820 NONAME
+ _ZNK15QMediaTimeRange9intervalsEv @ 821 NONAME
+ _ZNK16QAudioDeviceInfo20supportedSampleRatesEv @ 822 NONAME
+ _ZNK16QAudioDeviceInfo22supportedChannelCountsEv @ 823 NONAME
+ _ZNK16QMetaDataControl10metaObjectEv @ 824 NONAME
+ _ZNK18QGraphicsVideoItem10metaObjectEv @ 825 NONAME
+ _ZNK18QGraphicsVideoItem10nativeSizeEv @ 826 NONAME
+ _ZNK18QGraphicsVideoItem11mediaObjectEv @ 827 NONAME
+ _ZNK18QGraphicsVideoItem12boundingRectEv @ 828 NONAME
+ _ZNK18QGraphicsVideoItem15aspectRatioModeEv @ 829 NONAME
+ _ZNK18QGraphicsVideoItem4sizeEv @ 830 NONAME
+ _ZNK18QGraphicsVideoItem6offsetEv @ 831 NONAME
+ _ZNK18QMediaTimeInterval10normalizedEv @ 832 NONAME
+ _ZNK18QMediaTimeInterval10translatedEx @ 833 NONAME
+ _ZNK18QMediaTimeInterval3endEv @ 834 NONAME
+ _ZNK18QMediaTimeInterval5startEv @ 835 NONAME
+ _ZNK18QMediaTimeInterval8containsEx @ 836 NONAME
+ _ZNK18QMediaTimeInterval8isNormalEv @ 837 NONAME
+ _ZNK19QMediaPlayerControl10metaObjectEv @ 838 NONAME
+ _ZNK19QVideoDeviceControl10metaObjectEv @ 839 NONAME
+ _ZNK19QVideoOutputControl10metaObjectEv @ 840 NONAME
+ _ZNK19QVideoWidgetControl10metaObjectEv @ 841 NONAME
+ _ZNK19QVideoWindowControl10metaObjectEv @ 842 NONAME
+ _ZNK20QPainterVideoSurface10brightnessEv @ 843 NONAME
+ _ZNK20QPainterVideoSurface10metaObjectEv @ 844 NONAME
+ _ZNK20QPainterVideoSurface10saturationEv @ 845 NONAME
+ _ZNK20QPainterVideoSurface17isFormatSupportedERK19QVideoSurfaceFormatPS0_ @ 846 NONAME
+ _ZNK20QPainterVideoSurface21supportedPixelFormatsEN20QAbstractVideoBuffer10HandleTypeE @ 847 NONAME
+ _ZNK20QPainterVideoSurface3hueEv @ 848 NONAME
+ _ZNK20QPainterVideoSurface7isReadyEv @ 849 NONAME
+ _ZNK20QPainterVideoSurface8contrastEv @ 850 NONAME
+ _ZNK21QMediaPlaylistControl10metaObjectEv @ 851 NONAME
+ _ZNK21QMediaServiceProvider10hasSupportERK10QByteArrayRK7QStringRK11QStringListi @ 852 NONAME
+ _ZNK21QMediaServiceProvider10metaObjectEv @ 853 NONAME
+ _ZNK21QMediaServiceProvider18supportedMimeTypesERK10QByteArrayi @ 854 NONAME
+ _ZNK21QMediaServiceProvider7devicesERK10QByteArray @ 855 NONAME
+ _ZNK21QVideoRendererControl10metaObjectEv @ 856 NONAME
+ _ZNK22QMediaPlaylistIOPlugin10metaObjectEv @ 857 NONAME
+ _ZNK22QMediaPlaylistProvider10isReadOnlyEv @ 858 NONAME
+ _ZNK22QMediaPlaylistProvider10metaObjectEv @ 859 NONAME
+ _ZNK23QMediaPlaylistNavigator10metaObjectEv @ 860 NONAME
+ _ZNK23QMediaPlaylistNavigator11currentItemEv @ 861 NONAME
+ _ZNK23QMediaPlaylistNavigator12currentIndexEv @ 862 NONAME
+ _ZNK23QMediaPlaylistNavigator12playbackModeEv @ 863 NONAME
+ _ZNK23QMediaPlaylistNavigator12previousItemEi @ 864 NONAME
+ _ZNK23QMediaPlaylistNavigator13previousIndexEi @ 865 NONAME
+ _ZNK23QMediaPlaylistNavigator6itemAtEi @ 866 NONAME
+ _ZNK23QMediaPlaylistNavigator8nextItemEi @ 867 NONAME
+ _ZNK23QMediaPlaylistNavigator8playlistEv @ 868 NONAME
+ _ZNK23QMediaPlaylistNavigator9nextIndexEi @ 869 NONAME
+ _ZNK25QMediaServiceProviderHint4typeEv @ 870 NONAME
+ _ZNK25QMediaServiceProviderHint6codecsEv @ 871 NONAME
+ _ZNK25QMediaServiceProviderHint6deviceEv @ 872 NONAME
+ _ZNK25QMediaServiceProviderHint6isNullEv @ 873 NONAME
+ _ZNK25QMediaServiceProviderHint8featuresEv @ 874 NONAME
+ _ZNK25QMediaServiceProviderHint8mimeTypeEv @ 875 NONAME
+ _ZNK25QMediaServiceProviderHinteqERKS_ @ 876 NONAME
+ _ZNK25QMediaServiceProviderHintneERKS_ @ 877 NONAME
+ _ZNK27QLocalMediaPlaylistProvider10isReadOnlyEv @ 878 NONAME
+ _ZNK27QLocalMediaPlaylistProvider10mediaCountEv @ 879 NONAME
+ _ZNK27QLocalMediaPlaylistProvider10metaObjectEv @ 880 NONAME
+ _ZNK27QLocalMediaPlaylistProvider5mediaEi @ 881 NONAME
+ _ZNK27QMediaServiceProviderPlugin10metaObjectEv @ 882 NONAME
+ _ZTI12QMediaObject @ 883 NONAME
+ _ZTI12QMediaPlayer @ 884 NONAME
+ _ZTI12QVideoWidget @ 885 NONAME
+ _ZTI13QMediaControl @ 886 NONAME
+ _ZTI13QMediaService @ 887 NONAME
+ _ZTI14QMediaPlaylist @ 888 NONAME
+ _ZTI16QMetaDataControl @ 889 NONAME
+ _ZTI18QGraphicsVideoItem @ 890 NONAME
+ _ZTI19QMediaPlayerControl @ 891 NONAME
+ _ZTI19QVideoDeviceControl @ 892 NONAME
+ _ZTI19QVideoOutputControl @ 893 NONAME
+ _ZTI19QVideoWidgetControl @ 894 NONAME
+ _ZTI19QVideoWindowControl @ 895 NONAME
+ _ZTI20QMediaPlaylistReader @ 896 NONAME
+ _ZTI20QMediaPlaylistWriter @ 897 NONAME
+ _ZTI20QPainterVideoSurface @ 898 NONAME
+ _ZTI21QMediaPlaylistControl @ 899 NONAME
+ _ZTI21QMediaServiceProvider @ 900 NONAME
+ _ZTI21QVideoRendererControl @ 901 NONAME
+ _ZTI22QMediaPlaylistIOPlugin @ 902 NONAME
+ _ZTI22QMediaPlaylistProvider @ 903 NONAME
+ _ZTI23QMediaPlaylistNavigator @ 904 NONAME
+ _ZTI25QMediaPlaylistIOInterface @ 905 NONAME
+ _ZTI27QLocalMediaPlaylistProvider @ 906 NONAME
+ _ZTI27QMediaServiceProviderPlugin @ 907 NONAME
+ _ZTI37QMediaServiceProviderFactoryInterface @ 908 NONAME
+ _ZTV12QMediaObject @ 909 NONAME
+ _ZTV12QMediaPlayer @ 910 NONAME
+ _ZTV12QVideoWidget @ 911 NONAME
+ _ZTV13QMediaControl @ 912 NONAME
+ _ZTV13QMediaService @ 913 NONAME
+ _ZTV14QMediaPlaylist @ 914 NONAME
+ _ZTV16QMetaDataControl @ 915 NONAME
+ _ZTV18QGraphicsVideoItem @ 916 NONAME
+ _ZTV19QMediaPlayerControl @ 917 NONAME
+ _ZTV19QVideoDeviceControl @ 918 NONAME
+ _ZTV19QVideoOutputControl @ 919 NONAME
+ _ZTV19QVideoWidgetControl @ 920 NONAME
+ _ZTV19QVideoWindowControl @ 921 NONAME
+ _ZTV20QMediaPlaylistReader @ 922 NONAME
+ _ZTV20QMediaPlaylistWriter @ 923 NONAME
+ _ZTV20QPainterVideoSurface @ 924 NONAME
+ _ZTV21QMediaPlaylistControl @ 925 NONAME
+ _ZTV21QMediaServiceProvider @ 926 NONAME
+ _ZTV21QVideoRendererControl @ 927 NONAME
+ _ZTV22QMediaPlaylistIOPlugin @ 928 NONAME
+ _ZTV22QMediaPlaylistProvider @ 929 NONAME
+ _ZTV23QMediaPlaylistNavigator @ 930 NONAME
+ _ZTV27QLocalMediaPlaylistProvider @ 931 NONAME
+ _ZTV27QMediaServiceProviderPlugin @ 932 NONAME
+ _ZThn8_N12QVideoWidgetD0Ev @ 933 NONAME
+ _ZThn8_N12QVideoWidgetD1Ev @ 934 NONAME
+ _ZThn8_N18QGraphicsVideoItem10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 935 NONAME
+ _ZThn8_N18QGraphicsVideoItem5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 936 NONAME
+ _ZThn8_N18QGraphicsVideoItemD0Ev @ 937 NONAME
+ _ZThn8_N18QGraphicsVideoItemD1Ev @ 938 NONAME
+ _ZThn8_N22QMediaPlaylistIOPluginD0Ev @ 939 NONAME
+ _ZThn8_N22QMediaPlaylistIOPluginD1Ev @ 940 NONAME
+ _ZThn8_NK18QGraphicsVideoItem12boundingRectEv @ 941 NONAME
+ _ZeqRK15QMediaTimeRangeS1_ @ 942 NONAME
+ _ZeqRK18QMediaTimeIntervalS1_ @ 943 NONAME
+ _ZmiRK15QMediaTimeRangeS1_ @ 944 NONAME
+ _ZneRK15QMediaTimeRangeS1_ @ 945 NONAME
+ _ZneRK18QMediaTimeIntervalS1_ @ 946 NONAME
+ _ZplRK15QMediaTimeRangeS1_ @ 947 NONAME
diff --git a/src/s60installs/eabi/QtNetworku.def b/src/s60installs/eabi/QtNetworku.def
index c37c4a0544..a27c4be424 100644
--- a/src/s60installs/eabi/QtNetworku.def
+++ b/src/s60installs/eabi/QtNetworku.def
@@ -993,4 +993,161 @@ EXPORTS
_ZN10QSslSocket15setSocketOptionEN15QAbstractSocket12SocketOptionERK8QVariant @ 992 NONAME
_ZN15QNetworkRequest20setOriginatingObjectEP7QObject @ 993 NONAME
_ZNK15QNetworkRequest17originatingObjectEv @ 994 NONAME
+ _Z35qNetworkConfigurationManagerPrivatev @ 995 NONAME
+ _ZN13QBearerEngine11qt_metacallEN11QMetaObject4CallEiPPv @ 996 NONAME
+ _ZN13QBearerEngine11qt_metacastEPKc @ 997 NONAME
+ _ZN13QBearerEngine15updateCompletedEv @ 998 NONAME
+ _ZN13QBearerEngine16staticMetaObjectE @ 999 NONAME DATA 16
+ _ZN13QBearerEngine18configurationAddedE28QExplicitlySharedDataPointerI28QNetworkConfigurationPrivateE @ 1000 NONAME
+ _ZN13QBearerEngine19getStaticMetaObjectEv @ 1001 NONAME
+ _ZN13QBearerEngine20configurationChangedE28QExplicitlySharedDataPointerI28QNetworkConfigurationPrivateE @ 1002 NONAME
+ _ZN13QBearerEngine20configurationRemovedE28QExplicitlySharedDataPointerI28QNetworkConfigurationPrivateE @ 1003 NONAME
+ _ZN13QBearerEngineC2EP7QObject @ 1004 NONAME
+ _ZN13QBearerEngineD0Ev @ 1005 NONAME
+ _ZN13QBearerEngineD1Ev @ 1006 NONAME
+ _ZN13QBearerEngineD2Ev @ 1007 NONAME
+ _ZN15QNetworkRequest11setPriorityENS_8PriorityE @ 1008 NONAME
+ _ZN15QNetworkSession11qt_metacallEN11QMetaObject4CallEiPPv @ 1009 NONAME
+ _ZN15QNetworkSession11qt_metacastEPKc @ 1010 NONAME
+ _ZN15QNetworkSession12stateChangedENS_5StateE @ 1011 NONAME
+ _ZN15QNetworkSession13connectNotifyEPKc @ 1012 NONAME
+ _ZN15QNetworkSession13waitForOpenedEi @ 1013 NONAME
+ _ZN15QNetworkSession16disconnectNotifyEPKc @ 1014 NONAME
+ _ZN15QNetworkSession16staticMetaObjectE @ 1015 NONAME DATA 16
+ _ZN15QNetworkSession18setSessionPropertyERK7QStringRK8QVariant @ 1016 NONAME
+ _ZN15QNetworkSession19getStaticMetaObjectEv @ 1017 NONAME
+ _ZN15QNetworkSession25newConfigurationActivatedEv @ 1018 NONAME
+ _ZN15QNetworkSession29preferredConfigurationChangedERK21QNetworkConfigurationb @ 1019 NONAME
+ _ZN15QNetworkSession4openEv @ 1020 NONAME
+ _ZN15QNetworkSession4stopEv @ 1021 NONAME
+ _ZN15QNetworkSession5closeEv @ 1022 NONAME
+ _ZN15QNetworkSession5errorENS_12SessionErrorE @ 1023 NONAME
+ _ZN15QNetworkSession6acceptEv @ 1024 NONAME
+ _ZN15QNetworkSession6closedEv @ 1025 NONAME
+ _ZN15QNetworkSession6ignoreEv @ 1026 NONAME
+ _ZN15QNetworkSession6openedEv @ 1027 NONAME
+ _ZN15QNetworkSession6rejectEv @ 1028 NONAME
+ _ZN15QNetworkSession7migrateEv @ 1029 NONAME
+ _ZN15QNetworkSessionC1ERK21QNetworkConfigurationP7QObject @ 1030 NONAME
+ _ZN15QNetworkSessionC2ERK21QNetworkConfigurationP7QObject @ 1031 NONAME
+ _ZN15QNetworkSessionD0Ev @ 1032 NONAME
+ _ZN15QNetworkSessionD1Ev @ 1033 NONAME
+ _ZN15QNetworkSessionD2Ev @ 1034 NONAME
+ _ZN19QBearerEnginePlugin11qt_metacallEN11QMetaObject4CallEiPPv @ 1035 NONAME
+ _ZN19QBearerEnginePlugin11qt_metacastEPKc @ 1036 NONAME
+ _ZN19QBearerEnginePlugin16staticMetaObjectE @ 1037 NONAME DATA 16
+ _ZN19QBearerEnginePlugin19getStaticMetaObjectEv @ 1038 NONAME
+ _ZN19QBearerEnginePluginC2EP7QObject @ 1039 NONAME
+ _ZN19QBearerEnginePluginD0Ev @ 1040 NONAME
+ _ZN19QBearerEnginePluginD1Ev @ 1041 NONAME
+ _ZN19QBearerEnginePluginD2Ev @ 1042 NONAME
+ _ZN21QNetworkAccessManager16setConfigurationERK21QNetworkConfiguration @ 1043 NONAME
+ _ZN21QNetworkAccessManager17sendCustomRequestERK15QNetworkRequestRK10QByteArrayP9QIODevice @ 1044 NONAME
+ _ZN21QNetworkAccessManager20networkAccessChangedEb @ 1045 NONAME
+ _ZN21QNetworkAccessManager20networkSessionOnlineEv @ 1046 NONAME
+ _ZN21QNetworkAccessManager23setNetworkAccessEnabledEb @ 1047 NONAME
+ _ZN21QNetworkConfigurationC1ERKS_ @ 1048 NONAME
+ _ZN21QNetworkConfigurationC1Ev @ 1049 NONAME
+ _ZN21QNetworkConfigurationC2ERKS_ @ 1050 NONAME
+ _ZN21QNetworkConfigurationC2Ev @ 1051 NONAME
+ _ZN21QNetworkConfigurationD1Ev @ 1052 NONAME
+ _ZN21QNetworkConfigurationD2Ev @ 1053 NONAME
+ _ZN21QNetworkConfigurationaSERKS_ @ 1054 NONAME
+ _ZN22QNetworkSessionPrivate11qt_metacallEN11QMetaObject4CallEiPPv @ 1055 NONAME
+ _ZN22QNetworkSessionPrivate11qt_metacastEPKc @ 1056 NONAME
+ _ZN22QNetworkSessionPrivate12stateChangedEN15QNetworkSession5StateE @ 1057 NONAME
+ _ZN22QNetworkSessionPrivate16staticMetaObjectE @ 1058 NONAME DATA 16
+ _ZN22QNetworkSessionPrivate19getStaticMetaObjectEv @ 1059 NONAME
+ _ZN22QNetworkSessionPrivate25newConfigurationActivatedEv @ 1060 NONAME
+ _ZN22QNetworkSessionPrivate25quitPendingWaitsForOpenedEv @ 1061 NONAME
+ _ZN22QNetworkSessionPrivate29preferredConfigurationChangedERK21QNetworkConfigurationb @ 1062 NONAME
+ _ZN22QNetworkSessionPrivate5errorEN15QNetworkSession12SessionErrorE @ 1063 NONAME
+ _ZN22QNetworkSessionPrivate6closedEv @ 1064 NONAME
+ _ZN28QNetworkConfigurationManager11qt_metacallEN11QMetaObject4CallEiPPv @ 1065 NONAME
+ _ZN28QNetworkConfigurationManager11qt_metacastEPKc @ 1066 NONAME
+ _ZN28QNetworkConfigurationManager15updateCompletedEv @ 1067 NONAME
+ _ZN28QNetworkConfigurationManager16staticMetaObjectE @ 1068 NONAME DATA 16
+ _ZN28QNetworkConfigurationManager18configurationAddedERK21QNetworkConfiguration @ 1069 NONAME
+ _ZN28QNetworkConfigurationManager18onlineStateChangedEb @ 1070 NONAME
+ _ZN28QNetworkConfigurationManager19getStaticMetaObjectEv @ 1071 NONAME
+ _ZN28QNetworkConfigurationManager20configurationChangedERK21QNetworkConfiguration @ 1072 NONAME
+ _ZN28QNetworkConfigurationManager20configurationRemovedERK21QNetworkConfiguration @ 1073 NONAME
+ _ZN28QNetworkConfigurationManager20updateConfigurationsEv @ 1074 NONAME
+ _ZN28QNetworkConfigurationManagerC1EP7QObject @ 1075 NONAME
+ _ZN28QNetworkConfigurationManagerC2EP7QObject @ 1076 NONAME
+ _ZN28QNetworkConfigurationManagerD0Ev @ 1077 NONAME
+ _ZN28QNetworkConfigurationManagerD1Ev @ 1078 NONAME
+ _ZN28QNetworkConfigurationManagerD2Ev @ 1079 NONAME
+ _ZN35QNetworkConfigurationManagerPrivate11qt_metacallEN11QMetaObject4CallEiPPv @ 1080 NONAME
+ _ZN35QNetworkConfigurationManagerPrivate11qt_metacastEPKc @ 1081 NONAME
+ _ZN35QNetworkConfigurationManagerPrivate16staticMetaObjectE @ 1082 NONAME DATA 16
+ _ZN35QNetworkConfigurationManagerPrivate18configurationAddedE28QExplicitlySharedDataPointerI28QNetworkConfigurationPrivateE @ 1083 NONAME
+ _ZN35QNetworkConfigurationManagerPrivate18configurationAddedERK21QNetworkConfiguration @ 1084 NONAME
+ _ZN35QNetworkConfigurationManagerPrivate18onlineStateChangedEb @ 1085 NONAME
+ _ZN35QNetworkConfigurationManagerPrivate19getStaticMetaObjectEv @ 1086 NONAME
+ _ZN35QNetworkConfigurationManagerPrivate20configurationChangedE28QExplicitlySharedDataPointerI28QNetworkConfigurationPrivateE @ 1087 NONAME
+ _ZN35QNetworkConfigurationManagerPrivate20configurationChangedERK21QNetworkConfiguration @ 1088 NONAME
+ _ZN35QNetworkConfigurationManagerPrivate20configurationRemovedE28QExplicitlySharedDataPointerI28QNetworkConfigurationPrivateE @ 1089 NONAME
+ _ZN35QNetworkConfigurationManagerPrivate20configurationRemovedERK21QNetworkConfiguration @ 1090 NONAME
+ _ZN35QNetworkConfigurationManagerPrivate20updateConfigurationsEv @ 1091 NONAME
+ _ZN35QNetworkConfigurationManagerPrivate27configurationUpdateCompleteEv @ 1092 NONAME
+ _ZN35QNetworkConfigurationManagerPrivate31performAsyncConfigurationUpdateEv @ 1093 NONAME
+ _ZN35QNetworkConfigurationManagerPrivate5abortEv @ 1094 NONAME
+ _ZN35QNetworkConfigurationManagerPrivate7enginesEv @ 1095 NONAME
+ _ZN35QNetworkConfigurationManagerPrivateC1Ev @ 1096 NONAME
+ _ZN35QNetworkConfigurationManagerPrivateC2Ev @ 1097 NONAME
+ _ZN35QNetworkConfigurationManagerPrivateD0Ev @ 1098 NONAME
+ _ZN35QNetworkConfigurationManagerPrivateD1Ev @ 1099 NONAME
+ _ZN35QNetworkConfigurationManagerPrivateD2Ev @ 1100 NONAME
+ _ZNK13QBearerEngine10metaObjectEv @ 1101 NONAME
+ _ZNK13QNetworkReply14rawHeaderPairsEv @ 1102 NONAME
+ _ZNK15QNetworkRequest8priorityEv @ 1103 NONAME
+ _ZNK15QNetworkSession10activeTimeEv @ 1104 NONAME
+ _ZNK15QNetworkSession10metaObjectEv @ 1105 NONAME
+ _ZNK15QNetworkSession11errorStringEv @ 1106 NONAME
+ _ZNK15QNetworkSession12bytesWrittenEv @ 1107 NONAME
+ _ZNK15QNetworkSession13bytesReceivedEv @ 1108 NONAME
+ _ZNK15QNetworkSession13configurationEv @ 1109 NONAME
+ _ZNK15QNetworkSession15sessionPropertyERK7QString @ 1110 NONAME
+ _ZNK15QNetworkSession5errorEv @ 1111 NONAME
+ _ZNK15QNetworkSession5stateEv @ 1112 NONAME
+ _ZNK15QNetworkSession6isOpenEv @ 1113 NONAME
+ _ZNK15QNetworkSession9interfaceEv @ 1114 NONAME
+ _ZNK19QBearerEnginePlugin10metaObjectEv @ 1115 NONAME
+ _ZNK21QNetworkAccessManager13configurationEv @ 1116 NONAME
+ _ZNK21QNetworkAccessManager19activeConfigurationEv @ 1117 NONAME
+ _ZNK21QNetworkAccessManager20networkAccessEnabledEv @ 1118 NONAME
+ _ZNK21QNetworkConfiguration10bearerNameEv @ 1119 NONAME
+ _ZNK21QNetworkConfiguration10identifierEv @ 1120 NONAME
+ _ZNK21QNetworkConfiguration18isRoamingAvailableEv @ 1121 NONAME
+ _ZNK21QNetworkConfiguration4nameEv @ 1122 NONAME
+ _ZNK21QNetworkConfiguration4typeEv @ 1123 NONAME
+ _ZNK21QNetworkConfiguration5stateEv @ 1124 NONAME
+ _ZNK21QNetworkConfiguration7isValidEv @ 1125 NONAME
+ _ZNK21QNetworkConfiguration7purposeEv @ 1126 NONAME
+ _ZNK21QNetworkConfiguration8childrenEv @ 1127 NONAME
+ _ZNK21QNetworkConfigurationeqERKS_ @ 1128 NONAME
+ _ZNK22QNetworkSessionPrivate10metaObjectEv @ 1129 NONAME
+ _ZNK28QNetworkConfigurationManager10metaObjectEv @ 1130 NONAME
+ _ZNK28QNetworkConfigurationManager12capabilitiesEv @ 1131 NONAME
+ _ZNK28QNetworkConfigurationManager17allConfigurationsE6QFlagsIN21QNetworkConfiguration9StateFlagEE @ 1132 NONAME
+ _ZNK28QNetworkConfigurationManager20defaultConfigurationEv @ 1133 NONAME
+ _ZNK28QNetworkConfigurationManager27configurationFromIdentifierERK7QString @ 1134 NONAME
+ _ZNK28QNetworkConfigurationManager8isOnlineEv @ 1135 NONAME
+ _ZNK35QNetworkConfigurationManagerPrivate10metaObjectEv @ 1136 NONAME
+ _ZTI13QBearerEngine @ 1137 NONAME
+ _ZTI15QNetworkSession @ 1138 NONAME
+ _ZTI19QBearerEnginePlugin @ 1139 NONAME
+ _ZTI22QNetworkSessionPrivate @ 1140 NONAME
+ _ZTI28QNetworkConfigurationManager @ 1141 NONAME
+ _ZTI29QBearerEngineFactoryInterface @ 1142 NONAME
+ _ZTI35QNetworkConfigurationManagerPrivate @ 1143 NONAME
+ _ZTV13QBearerEngine @ 1144 NONAME
+ _ZTV15QNetworkSession @ 1145 NONAME
+ _ZTV19QBearerEnginePlugin @ 1146 NONAME
+ _ZTV22QNetworkSessionPrivate @ 1147 NONAME
+ _ZTV28QNetworkConfigurationManager @ 1148 NONAME
+ _ZTV35QNetworkConfigurationManagerPrivate @ 1149 NONAME
+ _ZThn8_N19QBearerEnginePluginD0Ev @ 1150 NONAME
+ _ZThn8_N19QBearerEnginePluginD1Ev @ 1151 NONAME
diff --git a/src/s60installs/eabi/QtScriptu.def b/src/s60installs/eabi/QtScriptu.def
index 8a4be2c9cb..6a70ed3d54 100644
--- a/src/s60installs/eabi/QtScriptu.def
+++ b/src/s60installs/eabi/QtScriptu.def
@@ -394,4 +394,45 @@ EXPORTS
_ZTI23QScriptDeclarativeClass @ 393 NONAME
_ZTV23QScriptDeclarativeClass @ 394 NONAME
_ZNK23QScriptDeclarativeClass9isQObjectEv @ 395 NONAME
+ _ZN23QScriptDeclarativeClass13functionValueERK12QScriptValueRKPv @ 396 NONAME
+ _ZN23QScriptDeclarativeClass13propertyValueERK12QScriptValueRKPv @ 397 NONAME
+ _ZN23QScriptDeclarativeClass14newObjectValueEP13QScriptEnginePS_PNS_6ObjectE @ 398 NONAME
+ _ZN23QScriptDeclarativeClass15setSupportsCallEb @ 399 NONAME
+ _ZN23QScriptDeclarativeClass4callEPNS_6ObjectEP14QScriptContext @ 400 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC1EP13QScriptEngineRK12QScriptValue @ 401 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC1EP13QScriptEngineRK7QString @ 402 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC1EP13QScriptEngineb @ 403 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC1EP13QScriptEngined @ 404 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC1EP13QScriptEnginef @ 405 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC1EP13QScriptEnginei @ 406 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC1EP13QScriptEnginej @ 407 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC1EP14QScriptContextRK12QScriptValue @ 408 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC1EP14QScriptContextRK7QString @ 409 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC1EP14QScriptContextb @ 410 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC1EP14QScriptContextd @ 411 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC1EP14QScriptContextf @ 412 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC1EP14QScriptContexti @ 413 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC1EP14QScriptContextj @ 414 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC1ERKS0_ @ 415 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC1Ev @ 416 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC2EP13QScriptEngineRK12QScriptValue @ 417 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC2EP13QScriptEngineRK7QString @ 418 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC2EP13QScriptEngineb @ 419 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC2EP13QScriptEngined @ 420 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC2EP13QScriptEnginef @ 421 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC2EP13QScriptEnginei @ 422 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC2EP13QScriptEnginej @ 423 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC2EP14QScriptContextRK12QScriptValue @ 424 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC2EP14QScriptContextRK7QString @ 425 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC2EP14QScriptContextb @ 426 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC2EP14QScriptContextd @ 427 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC2EP14QScriptContextf @ 428 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC2EP14QScriptContexti @ 429 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC2EP14QScriptContextj @ 430 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC2ERKS0_ @ 431 NONAME
+ _ZN23QScriptDeclarativeClass5ValueC2Ev @ 432 NONAME
+ _ZN23QScriptDeclarativeClass5ValueD1Ev @ 433 NONAME
+ _ZN23QScriptDeclarativeClass5ValueD2Ev @ 434 NONAME
+ _ZNK23QScriptDeclarativeClass12supportsCallEv @ 435 NONAME
+ _ZNK23QScriptDeclarativeClass5Value13toScriptValueEP13QScriptEngine @ 436 NONAME
diff --git a/src/s60installs/eabi/QtTestu.def b/src/s60installs/eabi/QtTestu.def
index b66ffc1bcb..5cb95baa3f 100644
--- a/src/s60installs/eabi/QtTestu.def
+++ b/src/s60installs/eabi/QtTestu.def
@@ -69,4 +69,5 @@ EXPORTS
_ZNK9QTestData9dataCountEv @ 68 NONAME
_ZTI14QTestEventLoop @ 69 NONAME
_ZTV14QTestEventLoop @ 70 NONAME
+ _ZN5QTest18setBenchmarkResultEfNS_16QBenchmarkMetricE @ 71 NONAME
diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro
index 1b1e965417..841fce4e87 100644
--- a/src/s60installs/s60installs.pro
+++ b/src/s60installs/s60installs.pro
@@ -82,7 +82,16 @@ symbian: {
qtbackup.sources = backup_registration.xml
qtbackup.path = c:/private/10202D56/import/packages/$$replace(TARGET.UID3, 0x,)
- DEPLOYMENT += qtresources qtlibraries qtbackup imageformats_plugins codecs_plugins graphicssystems_plugins
+ bearer_plugins.path = c:$$QT_PLUGINS_BASE_DIR/bearer
+ bearer_plugins.sources += qsymbianbearer.dll
+
+ DEPLOYMENT += qtresources \
+ qtlibraries \
+ qtbackup \
+ imageformats_plugins \
+ codecs_plugins \
+ graphicssystems_plugins \
+ bearer_plugins
contains(QT_CONFIG, svg): {
qtlibraries.sources += QtSvg.dll
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 119926361c..024b4d0687 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -24,7 +24,6 @@
#include "config.h"
#include "qscriptengine.h"
#include "qscriptsyntaxchecker_p.h"
-#include "qnumeric.h"
#include "qscriptengine_p.h"
#include "qscriptengineagent_p.h"
@@ -41,12 +40,11 @@
#include <QtCore/qstringlist.h>
#include <QtCore/qmetaobject.h>
+#include <math.h>
+
#include "Error.h"
-#include "JSArray.h"
#include "JSLock.h"
#include "Interpreter.h"
-#include "DateConstructor.h"
-#include "RegExpConstructor.h"
#include "PrototypeFunction.h"
#include "InitializeThreading.h"
@@ -56,11 +54,10 @@
#include "TimeoutChecker.h"
#include "JSFunction.h"
#include "Parser.h"
+#include "PropertyNameArray.h"
#include "Operations.h"
-#include "utils/qscriptdate_p.h"
#include "bridge/qscriptfunction_p.h"
-#include "bridge/qscriptobject_p.h"
#include "bridge/qscriptclassobject_p.h"
#include "bridge/qscriptvariant_p.h"
#include "bridge/qscriptqobject_p.h"
@@ -328,6 +325,89 @@ public:
namespace QScript
{
+static const qsreal D32 = 4294967296.0;
+
+qint32 ToInt32(qsreal n)
+{
+ if (qIsNaN(n) || qIsInf(n) || (n == 0))
+ return 0;
+
+ qsreal sign = (n < 0) ? -1.0 : 1.0;
+ qsreal abs_n = fabs(n);
+
+ n = ::fmod(sign * ::floor(abs_n), D32);
+ const double D31 = D32 / 2.0;
+
+ if (sign == -1 && n < -D31)
+ n += D32;
+
+ else if (sign != -1 && n >= D31)
+ n -= D32;
+
+ return qint32 (n);
+}
+
+quint32 ToUInt32(qsreal n)
+{
+ if (qIsNaN(n) || qIsInf(n) || (n == 0))
+ return 0;
+
+ qsreal sign = (n < 0) ? -1.0 : 1.0;
+ qsreal abs_n = fabs(n);
+
+ n = ::fmod(sign * ::floor(abs_n), D32);
+
+ if (n < 0)
+ n += D32;
+
+ return quint32 (n);
+}
+
+quint16 ToUInt16(qsreal n)
+{
+ static const qsreal D16 = 65536.0;
+
+ if (qIsNaN(n) || qIsInf(n) || (n == 0))
+ return 0;
+
+ qsreal sign = (n < 0) ? -1.0 : 1.0;
+ qsreal abs_n = fabs(n);
+
+ n = ::fmod(sign * ::floor(abs_n), D16);
+
+ if (n < 0)
+ n += D16;
+
+ return quint16 (n);
+}
+
+qsreal ToInteger(qsreal n)
+{
+ if (qIsNaN(n))
+ return 0;
+
+ if (n == 0 || qIsInf(n))
+ return n;
+
+ int sign = n < 0 ? -1 : 1;
+ return sign * ::floor(::fabs(n));
+}
+
+#ifdef Q_CC_MSVC
+// MSVC2008 crashes if these are inlined.
+
+QString ToString(qsreal value)
+{
+ return JSC::UString::from(value);
+}
+
+qsreal ToNumber(const QString &value)
+{
+ return ((JSC::UString)value).toDouble();
+}
+
+#endif
+
void GlobalClientData::mark(JSC::MarkStack& markStack)
{
engine->mark(markStack);
@@ -482,11 +562,9 @@ JSC::JSValue JSC_HOST_CALL functionDisconnect(JSC::ExecState *exec, JSC::JSObjec
if (isFunction(arg1))
slot = arg1;
else {
- // ### don't go via QScriptValue
QScript::SaveFrameHelper saveFrame(engine, exec);
- QScriptValue tmp = engine->scriptValueFromJSCValue(arg0);
- QString propertyName(arg1.toString(exec));
- slot = engine->scriptValueToJSCValue(tmp.property(propertyName, QScriptValue::ResolvePrototype));
+ JSC::UString propertyName = QScriptEnginePrivate::toString(exec, arg1);
+ slot = QScriptEnginePrivate::property(exec, arg0, propertyName, QScriptValue::ResolvePrototype);
}
}
@@ -566,11 +644,9 @@ JSC::JSValue JSC_HOST_CALL functionConnect(JSC::ExecState *exec, JSC::JSObject *
if (isFunction(arg1))
slot = arg1;
else {
- // ### don't go via QScriptValue
QScript::SaveFrameHelper saveFrame(engine, exec);
- QScriptValue tmp = engine->scriptValueFromJSCValue(arg0);
- QString propertyName = arg1.toString(exec);
- slot = engine->scriptValueToJSCValue(tmp.property(propertyName, QScriptValue::ResolvePrototype));
+ JSC::UString propertyName = QScriptEnginePrivate::toString(exec, arg1);
+ slot = QScriptEnginePrivate::property(exec, arg0, propertyName, QScriptValue::ResolvePrototype);
}
}
@@ -647,19 +723,19 @@ JSC::JSValue JSC_HOST_CALL functionQsTranslate(JSC::ExecState *exec, JSC::JSObje
if ((args.size() > 4) && !args.at(4).isNumber())
return JSC::throwError(exec, JSC::GeneralError, "qsTranslate(): fifth argument (n) must be a number");
#ifndef QT_NO_QOBJECT
- QString context(args.at(0).toString(exec));
+ JSC::UString context = args.at(0).toString(exec);
#endif
- QString text(args.at(1).toString(exec));
+ JSC::UString text = args.at(1).toString(exec);
#ifndef QT_NO_QOBJECT
- QString comment;
+ JSC::UString comment;
if (args.size() > 2)
comment = args.at(2).toString(exec);
QCoreApplication::Encoding encoding = QCoreApplication::CodecForTr;
if (args.size() > 3) {
- QString encStr(args.at(3).toString(exec));
- if (encStr == QLatin1String("CodecForTr"))
+ JSC::UString encStr = args.at(3).toString(exec);
+ if (encStr == "CodecForTr")
encoding = QCoreApplication::CodecForTr;
- else if (encStr == QLatin1String("UnicodeUTF8"))
+ else if (encStr == "UnicodeUTF8")
encoding = QCoreApplication::UnicodeUTF8;
else
return JSC::throwError(exec, JSC::GeneralError, QString::fromLatin1("qsTranslate(): invalid encoding '%s'").arg(encStr));
@@ -668,11 +744,11 @@ JSC::JSValue JSC_HOST_CALL functionQsTranslate(JSC::ExecState *exec, JSC::JSObje
if (args.size() > 4)
n = args.at(4).toInt32(exec);
#endif
- QString result;
+ JSC::UString result;
#ifndef QT_NO_QOBJECT
- result = QCoreApplication::translate(context.toLatin1().constData(),
- text.toLatin1().constData(),
- comment.toLatin1().constData(),
+ result = QCoreApplication::translate(QScript::convertToLatin1(context).constData(),
+ QScript::convertToLatin1(text).constData(),
+ QScript::convertToLatin1(comment).constData(),
encoding, n);
#else
result = text;
@@ -698,25 +774,25 @@ JSC::JSValue JSC_HOST_CALL functionQsTr(JSC::ExecState *exec, JSC::JSObject*, JS
if ((args.size() > 2) && !args.at(2).isNumber())
return JSC::throwError(exec, JSC::GeneralError, "qsTranslate(): third argument (n) must be a number");
#ifndef QT_NO_QOBJECT
- QString context;
+ JSC::UString context;
QScriptContext *ctx = QScriptEnginePrivate::contextForFrame(exec);
if (ctx && ctx->parentContext())
context = QFileInfo(QScriptContextInfo(ctx->parentContext()).fileName()).baseName();
#endif
- QString text(args.at(0).toString(exec));
+ JSC::UString text = args.at(0).toString(exec);
#ifndef QT_NO_QOBJECT
- QString comment;
+ JSC::UString comment;
if (args.size() > 1)
comment = args.at(1).toString(exec);
int n = -1;
if (args.size() > 2)
n = args.at(2).toInt32(exec);
#endif
- QString result;
+ JSC::UString result;
#ifndef QT_NO_QOBJECT
- result = QCoreApplication::translate(context.toLatin1().constData(),
- text.toLatin1().constData(),
- comment.toLatin1().constData(),
+ result = QCoreApplication::translate(QScript::convertToLatin1(context).constData(),
+ QScript::convertToLatin1(text).constData(),
+ QScript::convertToLatin1(comment).constData(),
QCoreApplication::CodecForTr, n);
#else
result = text;
@@ -844,23 +920,15 @@ QScriptEnginePrivate::~QScriptEnginePrivate()
}
}
-QScriptValue QScriptEnginePrivate::scriptValueFromVariant(const QVariant &v)
-{
- Q_Q(QScriptEngine);
- QScriptValue result = q->create(v.userType(), v.data());
- Q_ASSERT(result.isValid());
- return result;
-}
-
-QVariant QScriptEnginePrivate::scriptValueToVariant(const QScriptValue &value, int targetType)
+QVariant QScriptEnginePrivate::jscValueToVariant(JSC::ExecState *exec, JSC::JSValue value, int targetType)
{
QVariant v(targetType, (void *)0);
- if (QScriptEnginePrivate::convert(value, targetType, v.data(), this))
+ if (convertValue(exec, value, targetType, v.data()))
return v;
if (uint(targetType) == QVariant::LastType)
- return value.toVariant();
- if (value.isVariant()) {
- v = value.toVariant();
+ return toVariant(exec, value);
+ if (isVariant(value)) {
+ v = variantValue(value);
if (v.canConvert(QVariant::Type(targetType))) {
v.convert(QVariant::Type(targetType));
return v;
@@ -871,88 +939,61 @@ QVariant QScriptEnginePrivate::scriptValueToVariant(const QScriptValue &value, i
return QVariant(targetType, *reinterpret_cast<void* *>(v.data()));
}
}
-
return QVariant();
}
-JSC::JSValue QScriptEnginePrivate::jscValueFromVariant(const QVariant &v)
-{
- // ### it's inefficient to convert to QScriptValue and then to JSValue
- QScriptValue vv = scriptValueFromVariant(v);
- QScriptValuePrivate *p = QScriptValuePrivate::get(vv);
- switch (p->type) {
- case QScriptValuePrivate::JavaScriptCore:
- return p->jscValue;
- case QScriptValuePrivate::Number:
- return JSC::jsNumber(currentFrame, p->numberValue);
- case QScriptValuePrivate::String: {
- JSC::UString str = p->stringValue;
- return JSC::jsString(currentFrame, str);
- }
- }
- return JSC::JSValue();
-}
-
-QVariant QScriptEnginePrivate::jscValueToVariant(JSC::JSValue value, int targetType)
-{
- // ### it's inefficient to convert to QScriptValue and then to QVariant
- return scriptValueToVariant(scriptValueFromJSCValue(value), targetType);
-}
-
-QScriptValue QScriptEnginePrivate::arrayFromStringList(const QStringList &lst)
+JSC::JSValue QScriptEnginePrivate::arrayFromStringList(JSC::ExecState *exec, const QStringList &lst)
{
- Q_Q(QScriptEngine);
- QScriptValue arr = q->newArray(lst.size());
+ JSC::JSValue arr = newArray(exec, lst.size());
for (int i = 0; i < lst.size(); ++i)
- arr.setProperty(i, QScriptValue(q, lst.at(i)));
+ setProperty(exec, arr, i, JSC::jsString(exec, lst.at(i)));
return arr;
}
-QStringList QScriptEnginePrivate::stringListFromArray(const QScriptValue &arr)
+QStringList QScriptEnginePrivate::stringListFromArray(JSC::ExecState *exec, JSC::JSValue arr)
{
QStringList lst;
- uint len = arr.property(QLatin1String("length")).toUInt32();
+ uint len = toUInt32(exec, property(exec, arr, exec->propertyNames().length));
for (uint i = 0; i < len; ++i)
- lst.append(arr.property(i).toString());
+ lst.append(toString(exec, property(exec, arr, i)));
return lst;
}
-QScriptValue QScriptEnginePrivate::arrayFromVariantList(const QVariantList &lst)
+JSC::JSValue QScriptEnginePrivate::arrayFromVariantList(JSC::ExecState *exec, const QVariantList &lst)
{
- Q_Q(QScriptEngine);
- QScriptValue arr = q->newArray(lst.size());
+ JSC::JSValue arr = newArray(exec, lst.size());
for (int i = 0; i < lst.size(); ++i)
- arr.setProperty(i, scriptValueFromVariant(lst.at(i)));
+ setProperty(exec, arr, i, jscValueFromVariant(exec, lst.at(i)));
return arr;
}
-QVariantList QScriptEnginePrivate::variantListFromArray(const QScriptValue &arr)
+QVariantList QScriptEnginePrivate::variantListFromArray(JSC::ExecState *exec, JSC::JSValue arr)
{
QVariantList lst;
- uint len = arr.property(QLatin1String("length")).toUInt32();
+ uint len = toUInt32(exec, property(exec, arr, exec->propertyNames().length));
for (uint i = 0; i < len; ++i)
- lst.append(arr.property(i).toVariant());
+ lst.append(toVariant(exec, property(exec, arr, i)));
return lst;
}
-QScriptValue QScriptEnginePrivate::objectFromVariantMap(const QVariantMap &vmap)
+JSC::JSValue QScriptEnginePrivate::objectFromVariantMap(JSC::ExecState *exec, const QVariantMap &vmap)
{
- Q_Q(QScriptEngine);
- QScriptValue obj = q->newObject();
+ JSC::JSValue obj = JSC::constructEmptyObject(exec);
QVariantMap::const_iterator it;
for (it = vmap.constBegin(); it != vmap.constEnd(); ++it)
- obj.setProperty(it.key(), scriptValueFromVariant(it.value()));
+ setProperty(exec, obj, it.key(), jscValueFromVariant(exec, it.value()));
return obj;
}
-QVariantMap QScriptEnginePrivate::variantMapFromObject(const QScriptValue &obj)
+QVariantMap QScriptEnginePrivate::variantMapFromObject(JSC::ExecState *exec, JSC::JSValue obj)
{
+ JSC::PropertyNameArray propertyNames(exec);
+ propertyNames.setShouldCache(false);
+ JSC::asObject(obj)->getOwnPropertyNames(exec, propertyNames, /*includeNonEnumerable=*/true);
QVariantMap vmap;
- QScriptValueIterator it(obj);
- while (it.hasNext()) {
- it.next();
- vmap.insert(it.name(), it.value().toVariant());
- }
+ JSC::PropertyNameArray::const_iterator it = propertyNames.begin();
+ for( ; it != propertyNames.end(); ++it)
+ vmap.insert(it->ustring(), toVariant(exec, property(exec, obj, *it)));
return vmap;
}
@@ -1281,13 +1322,13 @@ JSC::JSValue QScriptEnginePrivate::newQMetaObject(
return result;
}
-bool QScriptEnginePrivate::convertToNativeQObject(const QScriptValue &value,
+bool QScriptEnginePrivate::convertToNativeQObject(JSC::ExecState *exec, JSC::JSValue value,
const QByteArray &targetType,
void **result)
{
if (!targetType.endsWith('*'))
return false;
- if (QObject *qobject = value.toQObject()) {
+ if (QObject *qobject = toQObject(exec, value)) {
int start = targetType.startsWith("const ") ? 6 : 0;
QByteArray className = targetType.mid(start, targetType.size()-start-1);
if (void *instance = qobject->qt_metacast(className)) {
@@ -1428,6 +1469,330 @@ void QScriptEnginePrivate::detachAllRegisteredScriptStrings()
registeredScriptStrings = 0;
}
+#ifndef QT_NO_REGEXP
+
+extern QString qt_regexp_toCanonical(const QString &, QRegExp::PatternSyntax);
+
+JSC::JSValue QScriptEnginePrivate::newRegExp(JSC::ExecState *exec, const QRegExp &regexp)
+{
+ JSC::JSValue buf[2];
+ JSC::ArgList args(buf, sizeof(buf));
+
+ //convert the pattern to a ECMAScript pattern
+ QString pattern = qt_regexp_toCanonical(regexp.pattern(), regexp.patternSyntax());
+ if (regexp.isMinimal()) {
+ QString ecmaPattern;
+ int len = pattern.length();
+ ecmaPattern.reserve(len);
+ int i = 0;
+ const QChar *wc = pattern.unicode();
+ bool inBracket = false;
+ while (i < len) {
+ QChar c = wc[i++];
+ ecmaPattern += c;
+ switch (c.unicode()) {
+ case '?':
+ case '+':
+ case '*':
+ case '}':
+ if (!inBracket)
+ ecmaPattern += QLatin1Char('?');
+ break;
+ case '\\':
+ if (i < len)
+ ecmaPattern += wc[i++];
+ break;
+ case '[':
+ inBracket = true;
+ break;
+ case ']':
+ inBracket = false;
+ break;
+ default:
+ break;
+ }
+ }
+ pattern = ecmaPattern;
+ }
+
+ JSC::UString jscPattern = pattern;
+ QString flags;
+ if (regexp.caseSensitivity() == Qt::CaseInsensitive)
+ flags.append(QLatin1Char('i'));
+ JSC::UString jscFlags = flags;
+ buf[0] = JSC::jsString(exec, jscPattern);
+ buf[1] = JSC::jsString(exec, jscFlags);
+ return JSC::constructRegExp(exec, args);
+}
+
+#endif
+
+JSC::JSValue QScriptEnginePrivate::newRegExp(JSC::ExecState *exec, const QString &pattern, const QString &flags)
+{
+ JSC::JSValue buf[2];
+ JSC::ArgList args(buf, sizeof(buf));
+ JSC::UString jscPattern = pattern;
+ QString strippedFlags;
+ if (flags.contains(QLatin1Char('i')))
+ strippedFlags += QLatin1Char('i');
+ if (flags.contains(QLatin1Char('m')))
+ strippedFlags += QLatin1Char('m');
+ if (flags.contains(QLatin1Char('g')))
+ strippedFlags += QLatin1Char('g');
+ JSC::UString jscFlags = strippedFlags;
+ buf[0] = JSC::jsString(exec, jscPattern);
+ buf[1] = JSC::jsString(exec, jscFlags);
+ return JSC::constructRegExp(exec, args);
+}
+
+JSC::JSValue QScriptEnginePrivate::newVariant(const QVariant &value)
+{
+ QScriptObject *obj = new (currentFrame) QScriptObject(variantWrapperObjectStructure);
+ obj->setDelegate(new QScript::QVariantDelegate(value));
+ JSC::JSValue proto = defaultPrototype(value.userType());
+ if (proto)
+ obj->setPrototype(proto);
+ return obj;
+}
+
+JSC::JSValue QScriptEnginePrivate::newVariant(JSC::JSValue objectValue,
+ const QVariant &value)
+{
+ if (!isObject(objectValue))
+ return newVariant(value);
+ JSC::JSObject *jscObject = JSC::asObject(objectValue);
+ if (!jscObject->inherits(&QScriptObject::info)) {
+ qWarning("QScriptEngine::newVariant(): changing class of non-QScriptObject not supported");
+ return JSC::JSValue();
+ }
+ QScriptObject *jscScriptObject = static_cast<QScriptObject*>(jscObject);
+ if (!isVariant(objectValue)) {
+ jscScriptObject->setDelegate(new QScript::QVariantDelegate(value));
+ } else {
+ setVariantValue(objectValue, value);
+ }
+ return objectValue;
+}
+
+#ifndef QT_NO_REGEXP
+
+QRegExp QScriptEnginePrivate::toRegExp(JSC::ExecState *exec, JSC::JSValue value)
+{
+ if (!isRegExp(value))
+ return QRegExp();
+ QString pattern = toString(exec, property(exec, value, "source", QScriptValue::ResolvePrototype));
+ Qt::CaseSensitivity kase = Qt::CaseSensitive;
+ if (toBool(exec, property(exec, value, "ignoreCase", QScriptValue::ResolvePrototype)))
+ kase = Qt::CaseInsensitive;
+ return QRegExp(pattern, kase, QRegExp::RegExp2);
+}
+
+#endif
+
+QVariant QScriptEnginePrivate::toVariant(JSC::ExecState *exec, JSC::JSValue value)
+{
+ if (!value) {
+ return QVariant();
+ } else if (isObject(value)) {
+ if (isVariant(value))
+ return variantValue(value);
+#ifndef QT_NO_QOBJECT
+ else if (isQObject(value))
+ return qVariantFromValue(toQObject(exec, value));
+#endif
+ else if (isDate(value))
+ return QVariant(toDateTime(exec, value));
+#ifndef QT_NO_REGEXP
+ else if (isRegExp(value))
+ return QVariant(toRegExp(exec, value));
+#endif
+ else if (isArray(value))
+ return variantListFromArray(exec, value);
+ else if (QScriptDeclarativeClass *dc = declarativeClass(value))
+ return dc->toVariant(declarativeObject(value));
+ // try to convert to primitive
+ JSC::JSValue savedException;
+ saveException(exec, &savedException);
+ JSC::JSValue prim = value.toPrimitive(exec);
+ restoreException(exec, savedException);
+ if (!prim.isObject())
+ return toVariant(exec, prim);
+ } else if (value.isNumber()) {
+ return QVariant(toNumber(exec, value));
+ } else if (value.isString()) {
+ return QVariant(toString(exec, value));
+ } else if (value.isBoolean()) {
+ return QVariant(toBool(exec, value));
+ }
+ return QVariant();
+}
+
+JSC::JSValue QScriptEnginePrivate::propertyHelper(JSC::ExecState *exec, JSC::JSValue value, const JSC::Identifier &id, int resolveMode)
+{
+ JSC::JSValue result;
+ if (!(resolveMode & QScriptValue::ResolvePrototype)) {
+ // Look in the object's own properties
+ JSC::JSObject *object = JSC::asObject(value);
+ JSC::PropertySlot slot(object);
+ if (object->getOwnPropertySlot(exec, id, slot))
+ result = slot.getValue(exec, id);
+ }
+ if (!result && (resolveMode & QScriptValue::ResolveScope)) {
+ // ### check if it's a function object and look in the scope chain
+ JSC::JSValue scope = property(exec, value, "__qt_scope__", QScriptValue::ResolveLocal);
+ if (isObject(scope))
+ result = property(exec, scope, id, resolveMode);
+ }
+ return result;
+}
+
+JSC::JSValue QScriptEnginePrivate::propertyHelper(JSC::ExecState *exec, JSC::JSValue value, quint32 index, int resolveMode)
+{
+ JSC::JSValue result;
+ if (!(resolveMode & QScriptValue::ResolvePrototype)) {
+ // Look in the object's own properties
+ JSC::JSObject *object = JSC::asObject(value);
+ JSC::PropertySlot slot(object);
+ if (object->getOwnPropertySlot(exec, index, slot))
+ result = slot.getValue(exec, index);
+ }
+ return result;
+}
+
+void QScriptEnginePrivate::setProperty(JSC::ExecState *exec, JSC::JSValue objectValue, const JSC::Identifier &id,
+ JSC::JSValue value, const QScriptValue::PropertyFlags &flags)
+{
+ JSC::JSObject *thisObject = JSC::asObject(objectValue);
+ JSC::JSValue setter = thisObject->lookupSetter(exec, id);
+ JSC::JSValue getter = thisObject->lookupGetter(exec, id);
+ if ((flags & QScriptValue::PropertyGetter) || (flags & QScriptValue::PropertySetter)) {
+ if (!value) {
+ // deleting getter/setter
+ if ((flags & QScriptValue::PropertyGetter) && (flags & QScriptValue::PropertySetter)) {
+ // deleting both: just delete the property
+ thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false);
+ } else if (flags & QScriptValue::PropertyGetter) {
+ // preserve setter, if there is one
+ thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false);
+ if (setter && setter.isObject())
+ thisObject->defineSetter(exec, id, JSC::asObject(setter));
+ } else { // flags & QScriptValue::PropertySetter
+ // preserve getter, if there is one
+ thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false);
+ if (getter && getter.isObject())
+ thisObject->defineGetter(exec, id, JSC::asObject(getter));
+ }
+ } else {
+ if (value.isObject()) { // ### should check if it has callData()
+ // defining getter/setter
+ if (id == exec->propertyNames().underscoreProto) {
+ qWarning("QScriptValue::setProperty() failed: "
+ "cannot set getter or setter of native property `__proto__'");
+ } else {
+ if (flags & QScriptValue::PropertyGetter)
+ thisObject->defineGetter(exec, id, JSC::asObject(value));
+ if (flags & QScriptValue::PropertySetter)
+ thisObject->defineSetter(exec, id, JSC::asObject(value));
+ }
+ } else {
+ qWarning("QScriptValue::setProperty(): getter/setter must be a function");
+ }
+ }
+ } else {
+ // setting the value
+ if (getter && getter.isObject() && !(setter && setter.isObject())) {
+ qWarning("QScriptValue::setProperty() failed: "
+ "property '%s' has a getter but no setter",
+ qPrintable(QString(id.ustring())));
+ return;
+ }
+ if (!value) {
+ // ### check if it's a getter/setter property
+ thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false);
+ } else if (flags != QScriptValue::KeepExistingFlags) {
+ if (thisObject->hasOwnProperty(exec, id))
+ thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); // ### hmmm - can't we just update the attributes?
+ unsigned attribs = 0;
+ if (flags & QScriptValue::ReadOnly)
+ attribs |= JSC::ReadOnly;
+ if (flags & QScriptValue::SkipInEnumeration)
+ attribs |= JSC::DontEnum;
+ if (flags & QScriptValue::Undeletable)
+ attribs |= JSC::DontDelete;
+ attribs |= flags & QScriptValue::UserRange;
+ thisObject->putWithAttributes(exec, id, value, attribs);
+ } else {
+ JSC::PutPropertySlot slot;
+ thisObject->put(exec, id, value, slot);
+ }
+ }
+}
+
+void QScriptEnginePrivate::setProperty(JSC::ExecState *exec, JSC::JSValue objectValue, quint32 index,
+ JSC::JSValue value, const QScriptValue::PropertyFlags &flags)
+{
+ if (!value) {
+ JSC::asObject(objectValue)->deleteProperty(exec, index, /*checkDontDelete=*/false);
+ } else {
+ if ((flags & QScriptValue::PropertyGetter) || (flags & QScriptValue::PropertySetter)) {
+ // fall back to string-based setProperty(), since there is no
+ // JSC::JSObject::defineGetter(unsigned)
+ setProperty(exec, objectValue, JSC::Identifier::from(exec, index), value, flags);
+ } else {
+ if (flags != QScriptValue::KeepExistingFlags) {
+ // if (JSC::asObject(d->jscValue)->hasOwnProperty(exec, arrayIndex))
+ // JSC::asObject(d->jscValue)->deleteProperty(exec, arrayIndex);
+ unsigned attribs = 0;
+ if (flags & QScriptValue::ReadOnly)
+ attribs |= JSC::ReadOnly;
+ if (flags & QScriptValue::SkipInEnumeration)
+ attribs |= JSC::DontEnum;
+ if (flags & QScriptValue::Undeletable)
+ attribs |= JSC::DontDelete;
+ attribs |= flags & QScriptValue::UserRange;
+ JSC::asObject(objectValue)->putWithAttributes(exec, index, value, attribs);
+ } else {
+ JSC::asObject(objectValue)->put(exec, index, value);
+ }
+ }
+ }
+}
+
+QScriptValue::PropertyFlags QScriptEnginePrivate::propertyFlags(JSC::ExecState *exec, JSC::JSValue value, const JSC::Identifier &id,
+ const QScriptValue::ResolveFlags &mode)
+{
+ JSC::JSObject *object = JSC::asObject(value);
+ unsigned attribs = 0;
+ JSC::PropertyDescriptor descriptor;
+ if (object->getOwnPropertyDescriptor(exec, id, descriptor))
+ attribs = descriptor.attributes();
+ else if (!object->getPropertyAttributes(exec, id, attribs)) {
+ if ((mode & QScriptValue::ResolvePrototype) && object->prototype() && object->prototype().isObject()) {
+ JSC::JSValue proto = object->prototype();
+ return propertyFlags(exec, proto, id, mode);
+ }
+ return 0;
+ }
+ QScriptValue::PropertyFlags result = 0;
+ if (attribs & JSC::ReadOnly)
+ result |= QScriptValue::ReadOnly;
+ if (attribs & JSC::DontEnum)
+ result |= QScriptValue::SkipInEnumeration;
+ if (attribs & JSC::DontDelete)
+ result |= QScriptValue::Undeletable;
+ //We cannot rely on attribs JSC::Setter/Getter because they are not necesserly set by JSC (bug?)
+ if (attribs & JSC::Getter || !object->lookupGetter(exec, id).isUndefinedOrNull())
+ result |= QScriptValue::PropertyGetter;
+ if (attribs & JSC::Setter || !object->lookupSetter(exec, id).isUndefinedOrNull())
+ result |= QScriptValue::PropertySetter;
+#ifndef QT_NO_QOBJECT
+ if (attribs & QScript::QObjectMemberAttribute)
+ result |= QScriptValue::QObjectMember;
+#endif
+ result |= QScriptValue::PropertyFlag(attribs & QScriptValue::UserRange);
+ return result;
+}
+
#ifdef QT_NO_QOBJECT
QScriptEngine::QScriptEngine()
@@ -1600,56 +1965,7 @@ extern QString qt_regexp_toCanonical(const QString &, QRegExp::PatternSyntax);
QScriptValue QScriptEngine::newRegExp(const QRegExp &regexp)
{
Q_D(QScriptEngine);
- JSC::ExecState* exec = d->currentFrame;
- JSC::JSValue buf[2];
- JSC::ArgList args(buf, sizeof(buf));
-
- //convert the pattern to a ECMAScript pattern
- QString pattern = qt_regexp_toCanonical(regexp.pattern(), regexp.patternSyntax());
- if (regexp.isMinimal()) {
- QString ecmaPattern;
- int len = pattern.length();
- ecmaPattern.reserve(len);
- int i = 0;
- const QChar *wc = pattern.unicode();
- bool inBracket = false;
- while (i < len) {
- QChar c = wc[i++];
- ecmaPattern += c;
- switch (c.unicode()) {
- case '?':
- case '+':
- case '*':
- case '}':
- if (!inBracket)
- ecmaPattern += QLatin1Char('?');
- break;
- case '\\':
- if (i < len)
- ecmaPattern += wc[i++];
- break;
- case '[':
- inBracket = true;
- break;
- case ']':
- inBracket = false;
- break;
- default:
- break;
- }
- }
- pattern = ecmaPattern;
- }
-
- JSC::UString jscPattern = pattern;
- QString flags;
- if (regexp.caseSensitivity() == Qt::CaseInsensitive)
- flags.append(QLatin1Char('i'));
- JSC::UString jscFlags = flags;
- buf[0] = JSC::jsString(exec, jscPattern);
- buf[1] = JSC::jsString(exec, jscFlags);
- JSC::JSObject* result = JSC::constructRegExp(exec, args);
- return d->scriptValueFromJSCValue(result);
+ return d->scriptValueFromJSCValue(d->newRegExp(d->currentFrame, regexp));
}
#endif // QT_NO_REGEXP
@@ -1667,14 +1983,7 @@ QScriptValue QScriptEngine::newRegExp(const QRegExp &regexp)
QScriptValue QScriptEngine::newVariant(const QVariant &value)
{
Q_D(QScriptEngine);
- JSC::ExecState* exec = d->currentFrame;
- QScriptObject *obj = new (exec) QScriptObject(d->variantWrapperObjectStructure);
- obj->setDelegate(new QScript::QVariantDelegate(value));
- QScriptValue result = d->scriptValueFromJSCValue(obj);
- QScriptValue proto = defaultPrototype(value.userType());
- if (proto.isValid())
- result.setPrototype(proto);
- return result;
+ return d->scriptValueFromJSCValue(d->newVariant(value));
}
/*!
@@ -1704,20 +2013,9 @@ QScriptValue QScriptEngine::newVariant(const QVariant &value)
QScriptValue QScriptEngine::newVariant(const QScriptValue &object,
const QVariant &value)
{
- if (!object.isObject())
- return newVariant(value);
- JSC::JSObject *jscObject = JSC::asObject(QScriptValuePrivate::get(object)->jscValue);
- if (!jscObject->inherits(&QScriptObject::info)) {
- qWarning("QScriptEngine::newVariant(): changing class of non-QScriptObject not supported");
- return QScriptValue();
- }
- QScriptObject *jscScriptObject = static_cast<QScriptObject*>(jscObject);
- if (!object.isVariant()) {
- jscScriptObject->setDelegate(new QScript::QVariantDelegate(value));
- } else {
- QScriptValuePrivate::get(object)->setVariantValue(value);
- }
- return object;
+ Q_D(QScriptEngine);
+ JSC::JSValue jsObject = d->scriptValueToJSCValue(object);
+ return d->scriptValueFromJSCValue(d->newVariant(jsObject, value));
}
#ifndef QT_NO_QOBJECT
@@ -1813,9 +2111,7 @@ QScriptValue QScriptEngine::newQObject(const QScriptValue &scriptObject,
QScriptValue QScriptEngine::newObject()
{
Q_D(QScriptEngine);
- JSC::ExecState* exec = d->currentFrame;
- JSC::JSObject *result = new (exec)QScriptObject(d->scriptObjectStructure);
- return d->scriptValueFromJSCValue(result);
+ return d->scriptValueFromJSCValue(d->newObject());
}
/*!
@@ -1938,9 +2234,7 @@ QScriptValue QScriptEngine::newFunction(QScriptEngine::FunctionWithArgSignature
QScriptValue QScriptEngine::newArray(uint length)
{
Q_D(QScriptEngine);
- JSC::ExecState* exec = d->currentFrame;
- JSC::JSArray* result = JSC::constructEmptyArray(exec, length);
- return d->scriptValueFromJSCValue(result);
+ return d->scriptValueFromJSCValue(d->newArray(d->currentFrame, length));
}
/*!
@@ -1953,22 +2247,7 @@ QScriptValue QScriptEngine::newArray(uint length)
QScriptValue QScriptEngine::newRegExp(const QString &pattern, const QString &flags)
{
Q_D(QScriptEngine);
- JSC::ExecState* exec = d->currentFrame;
- JSC::JSValue buf[2];
- JSC::ArgList args(buf, sizeof(buf));
- JSC::UString jscPattern = pattern;
- QString strippedFlags;
- if (flags.contains(QLatin1Char('i')))
- strippedFlags += QLatin1Char('i');
- if (flags.contains(QLatin1Char('m')))
- strippedFlags += QLatin1Char('m');
- if (flags.contains(QLatin1Char('g')))
- strippedFlags += QLatin1Char('g');
- JSC::UString jscFlags = strippedFlags;
- buf[0] = JSC::jsString(exec, jscPattern);
- buf[1] = JSC::jsString(exec, jscFlags);
- JSC::JSObject* result = JSC::constructRegExp(exec, args);
- return d->scriptValueFromJSCValue(result);
+ return d->scriptValueFromJSCValue(d->newRegExp(d->currentFrame, pattern, flags));
}
/*!
@@ -1979,11 +2258,7 @@ QScriptValue QScriptEngine::newRegExp(const QString &pattern, const QString &fla
QScriptValue QScriptEngine::newDate(qsreal value)
{
Q_D(QScriptEngine);
- JSC::ExecState* exec = d->currentFrame;
- JSC::JSValue val = JSC::jsNumber(exec, value);
- JSC::ArgList args(&val, 1);
- JSC::JSObject *result = JSC::constructDate(exec, args);
- return d->scriptValueFromJSCValue(result);
+ return d->scriptValueFromJSCValue(d->newDate(d->currentFrame, value));
}
/*!
@@ -1993,7 +2268,8 @@ QScriptValue QScriptEngine::newDate(qsreal value)
*/
QScriptValue QScriptEngine::newDate(const QDateTime &value)
{
- return newDate(QScript::FromDateTime(value));
+ Q_D(QScriptEngine);
+ return d->scriptValueFromJSCValue(d->newDate(d->currentFrame, value));
}
#ifndef QT_NO_QOBJECT
@@ -2552,128 +2828,127 @@ void QScriptEngine::setDefaultPrototype(int metaTypeId, const QScriptValue &prot
QScriptValue QScriptEngine::create(int type, const void *ptr)
{
Q_D(QScriptEngine);
- return d->create(type, ptr);
+ return d->scriptValueFromJSCValue(d->create(d->currentFrame, type, ptr));
}
-QScriptValue QScriptEnginePrivate::create(int type, const void *ptr)
+JSC::JSValue QScriptEnginePrivate::create(JSC::ExecState *exec, int type, const void *ptr)
{
- Q_Q(QScriptEngine);
Q_ASSERT(ptr != 0);
- QScriptValue result;
- QScriptTypeInfo *info = m_typeInfos.value(type);
+ JSC::JSValue result;
+ QScriptEnginePrivate *eng = exec ? QScript::scriptEngineFromExec(exec) : 0;
+ QScriptTypeInfo *info = eng ? eng->m_typeInfos.value(type) : 0;
if (info && info->marshal) {
- result = info->marshal(q, ptr);
+ result = eng->scriptValueToJSCValue(info->marshal(eng->q_func(), ptr));
} else {
// check if it's one of the types we know
switch (QMetaType::Type(type)) {
case QMetaType::Void:
- return QScriptValue(q, QScriptValue::UndefinedValue);
+ return JSC::jsUndefined();
case QMetaType::Bool:
- return QScriptValue(q, *reinterpret_cast<const bool*>(ptr));
+ return JSC::jsBoolean(*reinterpret_cast<const bool*>(ptr));
case QMetaType::Int:
- return QScriptValue(q, *reinterpret_cast<const int*>(ptr));
+ return JSC::jsNumber(exec, *reinterpret_cast<const int*>(ptr));
case QMetaType::UInt:
- return QScriptValue(q, *reinterpret_cast<const uint*>(ptr));
+ return JSC::jsNumber(exec, *reinterpret_cast<const uint*>(ptr));
case QMetaType::LongLong:
- return QScriptValue(q, qsreal(*reinterpret_cast<const qlonglong*>(ptr)));
+ return JSC::jsNumber(exec, qsreal(*reinterpret_cast<const qlonglong*>(ptr)));
case QMetaType::ULongLong:
#if defined(Q_OS_WIN) && defined(_MSC_FULL_VER) && _MSC_FULL_VER <= 12008804
#pragma message("** NOTE: You need the Visual Studio Processor Pack to compile support for 64bit unsigned integers.")
- return QScriptValue(q, qsreal((qlonglong)*reinterpret_cast<const qulonglong*>(ptr)));
+ return JSC::jsNumber(exec, qsreal((qlonglong)*reinterpret_cast<const qulonglong*>(ptr)));
#elif defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET)
- return QScriptValue(q, qsreal((qlonglong)*reinterpret_cast<const qulonglong*>(ptr)));
+ return JSC::jsNumber(exec, qsreal((qlonglong)*reinterpret_cast<const qulonglong*>(ptr)));
#else
- return QScriptValue(q, qsreal(*reinterpret_cast<const qulonglong*>(ptr)));
+ return JSC::jsNumber(exec, qsreal(*reinterpret_cast<const qulonglong*>(ptr)));
#endif
case QMetaType::Double:
- return QScriptValue(q, qsreal(*reinterpret_cast<const double*>(ptr)));
+ return JSC::jsNumber(exec, qsreal(*reinterpret_cast<const double*>(ptr)));
case QMetaType::QString:
- return QScriptValue(q, *reinterpret_cast<const QString*>(ptr));
+ return JSC::jsString(exec, *reinterpret_cast<const QString*>(ptr));
case QMetaType::Float:
- return QScriptValue(q, *reinterpret_cast<const float*>(ptr));
+ return JSC::jsNumber(exec, *reinterpret_cast<const float*>(ptr));
case QMetaType::Short:
- return QScriptValue(q, *reinterpret_cast<const short*>(ptr));
+ return JSC::jsNumber(exec, *reinterpret_cast<const short*>(ptr));
case QMetaType::UShort:
- return QScriptValue(q, *reinterpret_cast<const unsigned short*>(ptr));
+ return JSC::jsNumber(exec, *reinterpret_cast<const unsigned short*>(ptr));
case QMetaType::Char:
- return QScriptValue(q, *reinterpret_cast<const char*>(ptr));
+ return JSC::jsNumber(exec, *reinterpret_cast<const char*>(ptr));
case QMetaType::UChar:
- return QScriptValue(q, *reinterpret_cast<const unsigned char*>(ptr));
+ return JSC::jsNumber(exec, *reinterpret_cast<const unsigned char*>(ptr));
case QMetaType::QChar:
- return QScriptValue(q, (*reinterpret_cast<const QChar*>(ptr)).unicode());
+ return JSC::jsNumber(exec, (*reinterpret_cast<const QChar*>(ptr)).unicode());
case QMetaType::QStringList:
- result = arrayFromStringList(*reinterpret_cast<const QStringList *>(ptr));
+ result = arrayFromStringList(exec, *reinterpret_cast<const QStringList *>(ptr));
break;
case QMetaType::QVariantList:
- result = arrayFromVariantList(*reinterpret_cast<const QVariantList *>(ptr));
+ result = arrayFromVariantList(exec, *reinterpret_cast<const QVariantList *>(ptr));
break;
case QMetaType::QVariantMap:
- result = objectFromVariantMap(*reinterpret_cast<const QVariantMap *>(ptr));
+ result = objectFromVariantMap(exec, *reinterpret_cast<const QVariantMap *>(ptr));
break;
case QMetaType::QDateTime:
- result = q->newDate(*reinterpret_cast<const QDateTime *>(ptr));
+ result = newDate(exec, *reinterpret_cast<const QDateTime *>(ptr));
break;
case QMetaType::QDate:
- result = q->newDate(QDateTime(*reinterpret_cast<const QDate *>(ptr)));
+ result = newDate(exec, QDateTime(*reinterpret_cast<const QDate *>(ptr)));
break;
#ifndef QT_NO_REGEXP
case QMetaType::QRegExp:
- result = q->newRegExp(*reinterpret_cast<const QRegExp *>(ptr));
+ result = newRegExp(exec, *reinterpret_cast<const QRegExp *>(ptr));
break;
#endif
#ifndef QT_NO_QOBJECT
case QMetaType::QObjectStar:
case QMetaType::QWidgetStar:
- result = q->newQObject(*reinterpret_cast<QObject* const *>(ptr));
+ result = eng->newQObject(*reinterpret_cast<QObject* const *>(ptr));
break;
#endif
+ case QMetaType::QVariant:
+ result = jscValueFromVariant(exec, *reinterpret_cast<const QVariant*>(ptr));
+ break;
default:
if (type == qMetaTypeId<QScriptValue>()) {
- result = *reinterpret_cast<const QScriptValue*>(ptr);
- if (!result.isValid())
- return QScriptValue(q, QScriptValue::UndefinedValue);
+ result = eng->scriptValueToJSCValue(*reinterpret_cast<const QScriptValue*>(ptr));
+ if (!result)
+ return JSC::jsUndefined();
}
#ifndef QT_NO_QOBJECT
// lazy registration of some common list types
else if (type == qMetaTypeId<QObjectList>()) {
- qScriptRegisterSequenceMetaType<QObjectList>(q);
- return create(type, ptr);
+ qScriptRegisterSequenceMetaType<QObjectList>(eng->q_func());
+ return create(exec, type, ptr);
}
#endif
else if (type == qMetaTypeId<QList<int> >()) {
- qScriptRegisterSequenceMetaType<QList<int> >(q);
- return create(type, ptr);
+ qScriptRegisterSequenceMetaType<QList<int> >(eng->q_func());
+ return create(exec, type, ptr);
}
else {
QByteArray typeName = QMetaType::typeName(type);
- if (typeName == "QVariant")
- result = scriptValueFromVariant(*reinterpret_cast<const QVariant*>(ptr));
if (typeName.endsWith('*') && !*reinterpret_cast<void* const *>(ptr))
- return QScriptValue(q, QScriptValue::NullValue);
+ return JSC::jsNull();
else
- result = q->newVariant(QVariant(type, ptr));
+ result = eng->newVariant(QVariant(type, ptr));
}
}
}
- if (result.isObject() && info && info->prototype
- && JSC::JSValue::strictEqual(scriptValueToJSCValue(result.prototype()), originalGlobalObject()->objectPrototype())) {
- result.setPrototype(scriptValueFromJSCValue(info->prototype));
+ if (result && result.isObject() && info && info->prototype
+ && JSC::JSValue::strictEqual(JSC::asObject(result)->prototype(), eng->originalGlobalObject()->objectPrototype())) {
+ JSC::asObject(result)->setPrototype(info->prototype);
}
return result;
}
-bool QScriptEnginePrivate::convert(const QScriptValue &value,
- int type, void *ptr,
- QScriptEnginePrivate *eng)
+bool QScriptEnginePrivate::convertValue(JSC::ExecState *exec, JSC::JSValue value,
+ int type, void *ptr)
{
- if (!eng)
- eng = QScriptValuePrivate::getEngine(value);
+ QScriptEnginePrivate *eng = exec ? QScript::scriptEngineFromExec(exec) : 0;
if (eng) {
QScriptTypeInfo *info = eng->m_typeInfos.value(type);
if (info && info->demarshal) {
- info->demarshal(value, ptr);
+ info->demarshal(eng->scriptValueFromJSCValue(value), ptr);
return true;
}
}
@@ -2681,78 +2956,78 @@ bool QScriptEnginePrivate::convert(const QScriptValue &value,
// check if it's one of the types we know
switch (QMetaType::Type(type)) {
case QMetaType::Bool:
- *reinterpret_cast<bool*>(ptr) = value.toBoolean();
+ *reinterpret_cast<bool*>(ptr) = toBool(exec, value);
return true;
case QMetaType::Int:
- *reinterpret_cast<int*>(ptr) = value.toInt32();
+ *reinterpret_cast<int*>(ptr) = toInt32(exec, value);
return true;
case QMetaType::UInt:
- *reinterpret_cast<uint*>(ptr) = value.toUInt32();
+ *reinterpret_cast<uint*>(ptr) = toUInt32(exec, value);
return true;
case QMetaType::LongLong:
- *reinterpret_cast<qlonglong*>(ptr) = qlonglong(value.toInteger());
+ *reinterpret_cast<qlonglong*>(ptr) = qlonglong(toInteger(exec, value));
return true;
case QMetaType::ULongLong:
- *reinterpret_cast<qulonglong*>(ptr) = qulonglong(value.toInteger());
+ *reinterpret_cast<qulonglong*>(ptr) = qulonglong(toInteger(exec, value));
return true;
case QMetaType::Double:
- *reinterpret_cast<double*>(ptr) = value.toNumber();
+ *reinterpret_cast<double*>(ptr) = toNumber(exec, value);
return true;
case QMetaType::QString:
if (value.isUndefined() || value.isNull())
*reinterpret_cast<QString*>(ptr) = QString();
else
- *reinterpret_cast<QString*>(ptr) = value.toString();
+ *reinterpret_cast<QString*>(ptr) = toString(exec, value);
return true;
case QMetaType::Float:
- *reinterpret_cast<float*>(ptr) = value.toNumber();
+ *reinterpret_cast<float*>(ptr) = toNumber(exec, value);
return true;
case QMetaType::Short:
- *reinterpret_cast<short*>(ptr) = short(value.toInt32());
+ *reinterpret_cast<short*>(ptr) = short(toInt32(exec, value));
return true;
case QMetaType::UShort:
- *reinterpret_cast<unsigned short*>(ptr) = value.toUInt16();
+ *reinterpret_cast<unsigned short*>(ptr) = QScript::ToUInt16(toNumber(exec, value));
return true;
case QMetaType::Char:
- *reinterpret_cast<char*>(ptr) = char(value.toInt32());
+ *reinterpret_cast<char*>(ptr) = char(toInt32(exec, value));
return true;
case QMetaType::UChar:
- *reinterpret_cast<unsigned char*>(ptr) = (unsigned char)(value.toInt32());
+ *reinterpret_cast<unsigned char*>(ptr) = (unsigned char)(toInt32(exec, value));
return true;
case QMetaType::QChar:
if (value.isString()) {
- QString str = value.toString();
+ QString str = toString(exec, value);
*reinterpret_cast<QChar*>(ptr) = str.isEmpty() ? QChar() : str.at(0);
} else {
- *reinterpret_cast<QChar*>(ptr) = QChar(value.toUInt16());
+ *reinterpret_cast<QChar*>(ptr) = QChar(QScript::ToUInt16(toNumber(exec, value)));
}
return true;
case QMetaType::QDateTime:
- if (value.isDate()) {
- *reinterpret_cast<QDateTime *>(ptr) = value.toDateTime();
+ if (isDate(value)) {
+ *reinterpret_cast<QDateTime *>(ptr) = toDateTime(exec, value);
return true;
} break;
case QMetaType::QDate:
- if (value.isDate()) {
- *reinterpret_cast<QDate *>(ptr) = value.toDateTime().date();
+ if (isDate(value)) {
+ *reinterpret_cast<QDate *>(ptr) = toDateTime(exec, value).date();
return true;
} break;
#ifndef QT_NO_REGEXP
case QMetaType::QRegExp:
- if (value.isRegExp()) {
- *reinterpret_cast<QRegExp *>(ptr) = value.toRegExp();
+ if (isRegExp(value)) {
+ *reinterpret_cast<QRegExp *>(ptr) = toRegExp(exec, value);
return true;
} break;
#endif
#ifndef QT_NO_QOBJECT
case QMetaType::QObjectStar:
- if (value.isQObject() || value.isNull()) {
- *reinterpret_cast<QObject* *>(ptr) = value.toQObject();
+ if (isQObject(value) || value.isNull()) {
+ *reinterpret_cast<QObject* *>(ptr) = toQObject(exec, value);
return true;
} break;
case QMetaType::QWidgetStar:
- if (value.isQObject() || value.isNull()) {
- QObject *qo = value.toQObject();
+ if (isQObject(value) || value.isNull()) {
+ QObject *qo = toQObject(exec, value);
if (!qo || qo->isWidgetType()) {
*reinterpret_cast<QWidget* *>(ptr) = reinterpret_cast<QWidget*>(qo);
return true;
@@ -2760,48 +3035,51 @@ bool QScriptEnginePrivate::convert(const QScriptValue &value,
} break;
#endif
case QMetaType::QStringList:
- if (value.isArray()) {
- *reinterpret_cast<QStringList *>(ptr) = stringListFromArray(value);
+ if (isArray(value)) {
+ *reinterpret_cast<QStringList *>(ptr) = stringListFromArray(exec, value);
return true;
} break;
case QMetaType::QVariantList:
- if (value.isArray()) {
- *reinterpret_cast<QVariantList *>(ptr) = variantListFromArray(value);
+ if (isArray(value)) {
+ *reinterpret_cast<QVariantList *>(ptr) = variantListFromArray(exec, value);
return true;
} break;
case QMetaType::QVariantMap:
- if (value.isObject()) {
- *reinterpret_cast<QVariantMap *>(ptr) = variantMapFromObject(value);
+ if (isObject(value)) {
+ *reinterpret_cast<QVariantMap *>(ptr) = variantMapFromObject(exec, value);
return true;
} break;
+ case QMetaType::QVariant:
+ *reinterpret_cast<QVariant*>(ptr) = toVariant(exec, value);
+ return true;
default:
;
}
QByteArray name = QMetaType::typeName(type);
#ifndef QT_NO_QOBJECT
- if (convertToNativeQObject(value, name, reinterpret_cast<void* *>(ptr)))
+ if (convertToNativeQObject(exec, value, name, reinterpret_cast<void* *>(ptr)))
return true;
#endif
- if (value.isVariant() && name.endsWith('*')) {
+ if (isVariant(value) && name.endsWith('*')) {
int valueType = QMetaType::type(name.left(name.size()-1));
- QVariant &var = QScriptValuePrivate::get(value)->variantValue();
+ QVariant &var = variantValue(value);
if (valueType == var.userType()) {
*reinterpret_cast<void* *>(ptr) = var.data();
return true;
} else {
// look in the prototype chain
- QScriptValue proto = value.prototype();
+ JSC::JSValue proto = JSC::asObject(value)->prototype();
while (proto.isObject()) {
bool canCast = false;
- if (proto.isVariant()) {
- canCast = (type == proto.toVariant().userType())
- || (valueType && (valueType == proto.toVariant().userType()));
+ if (isVariant(proto)) {
+ canCast = (type == variantValue(proto).userType())
+ || (valueType && (valueType == variantValue(proto).userType()));
}
#ifndef QT_NO_QOBJECT
- else if (proto.isQObject()) {
+ else if (isQObject(proto)) {
QByteArray className = name.left(name.size()-1);
- if (QObject *qobject = proto.toQObject())
+ if (QObject *qobject = toQObject(exec, proto))
canCast = qobject->qt_metacast(className) != 0;
}
#endif
@@ -2813,7 +3091,7 @@ bool QScriptEnginePrivate::convert(const QScriptValue &value,
*reinterpret_cast<void* *>(ptr) = var.data();
return true;
}
- proto = proto.prototype();
+ proto = JSC::asObject(proto)->prototype();
}
}
} else if (value.isNull() && name.endsWith('*')) {
@@ -2822,10 +3100,7 @@ bool QScriptEnginePrivate::convert(const QScriptValue &value,
} else if (type == qMetaTypeId<QScriptValue>()) {
if (!eng)
return false;
- *reinterpret_cast<QScriptValue*>(ptr) = value;
- return true;
- } else if (name == "QVariant") {
- *reinterpret_cast<QVariant*>(ptr) = value.toVariant();
+ *reinterpret_cast<QScriptValue*>(ptr) = eng->scriptValueFromJSCValue(value);
return true;
}
@@ -2835,14 +3110,14 @@ bool QScriptEnginePrivate::convert(const QScriptValue &value,
if (!eng)
return false;
qScriptRegisterSequenceMetaType<QObjectList>(eng->q_func());
- return convert(value, type, ptr, eng);
+ return convertValue(exec, value, type, ptr);
}
#endif
else if (type == qMetaTypeId<QList<int> >()) {
if (!eng)
return false;
qScriptRegisterSequenceMetaType<QList<int> >(eng->q_func());
- return convert(value, type, ptr, eng);
+ return convertValue(exec, value, type, ptr);
}
#if 0
@@ -2854,6 +3129,102 @@ bool QScriptEnginePrivate::convert(const QScriptValue &value,
return false;
}
+bool QScriptEnginePrivate::convertNumber(qsreal value, int type, void *ptr)
+{
+ switch (QMetaType::Type(type)) {
+ case QMetaType::Bool:
+ *reinterpret_cast<bool*>(ptr) = QScript::ToBool(value);
+ return true;
+ case QMetaType::Int:
+ *reinterpret_cast<int*>(ptr) = QScript::ToInt32(value);
+ return true;
+ case QMetaType::UInt:
+ *reinterpret_cast<uint*>(ptr) = QScript::ToUInt32(value);
+ return true;
+ case QMetaType::LongLong:
+ *reinterpret_cast<qlonglong*>(ptr) = qlonglong(QScript::ToInteger(value));
+ return true;
+ case QMetaType::ULongLong:
+ *reinterpret_cast<qulonglong*>(ptr) = qulonglong(QScript::ToInteger(value));
+ return true;
+ case QMetaType::Double:
+ *reinterpret_cast<double*>(ptr) = value;
+ return true;
+ case QMetaType::QString:
+ *reinterpret_cast<QString*>(ptr) = QScript::ToString(value);
+ return true;
+ case QMetaType::Float:
+ *reinterpret_cast<float*>(ptr) = value;
+ return true;
+ case QMetaType::Short:
+ *reinterpret_cast<short*>(ptr) = short(QScript::ToInt32(value));
+ return true;
+ case QMetaType::UShort:
+ *reinterpret_cast<unsigned short*>(ptr) = QScript::ToUInt16(value);
+ return true;
+ case QMetaType::Char:
+ *reinterpret_cast<char*>(ptr) = char(QScript::ToInt32(value));
+ return true;
+ case QMetaType::UChar:
+ *reinterpret_cast<unsigned char*>(ptr) = (unsigned char)(QScript::ToInt32(value));
+ return true;
+ case QMetaType::QChar:
+ *reinterpret_cast<QChar*>(ptr) = QChar(QScript::ToUInt16(value));
+ return true;
+ default:
+ break;
+ }
+ return false;
+}
+
+bool QScriptEnginePrivate::convertString(const QString &value, int type, void *ptr)
+{
+ switch (QMetaType::Type(type)) {
+ case QMetaType::Bool:
+ *reinterpret_cast<bool*>(ptr) = QScript::ToBool(value);
+ return true;
+ case QMetaType::Int:
+ *reinterpret_cast<int*>(ptr) = QScript::ToInt32(value);
+ return true;
+ case QMetaType::UInt:
+ *reinterpret_cast<uint*>(ptr) = QScript::ToUInt32(value);
+ return true;
+ case QMetaType::LongLong:
+ *reinterpret_cast<qlonglong*>(ptr) = qlonglong(QScript::ToInteger(value));
+ return true;
+ case QMetaType::ULongLong:
+ *reinterpret_cast<qulonglong*>(ptr) = qulonglong(QScript::ToInteger(value));
+ return true;
+ case QMetaType::Double:
+ *reinterpret_cast<double*>(ptr) = QScript::ToNumber(value);
+ return true;
+ case QMetaType::QString:
+ *reinterpret_cast<QString*>(ptr) = value;
+ return true;
+ case QMetaType::Float:
+ *reinterpret_cast<float*>(ptr) = QScript::ToNumber(value);
+ return true;
+ case QMetaType::Short:
+ *reinterpret_cast<short*>(ptr) = short(QScript::ToInt32(value));
+ return true;
+ case QMetaType::UShort:
+ *reinterpret_cast<unsigned short*>(ptr) = QScript::ToUInt16(value);
+ return true;
+ case QMetaType::Char:
+ *reinterpret_cast<char*>(ptr) = char(QScript::ToInt32(value));
+ return true;
+ case QMetaType::UChar:
+ *reinterpret_cast<unsigned char*>(ptr) = (unsigned char)(QScript::ToInt32(value));
+ return true;
+ case QMetaType::QChar:
+ *reinterpret_cast<QChar*>(ptr) = QChar(QScript::ToUInt16(value));
+ return true;
+ default:
+ break;
+ }
+ return false;
+}
+
bool QScriptEnginePrivate::hasDemarshalFunction(int type) const
{
QScriptTypeInfo *info = m_typeInfos.value(type);
@@ -2866,7 +3237,7 @@ bool QScriptEnginePrivate::hasDemarshalFunction(int type) const
bool QScriptEngine::convert(const QScriptValue &value, int type, void *ptr)
{
Q_D(QScriptEngine);
- return QScriptEnginePrivate::convert(value, type, ptr, d);
+ return QScriptEnginePrivate::convertValue(d->currentFrame, d->scriptValueToJSCValue(value), type, ptr);
}
/*!
@@ -2874,7 +3245,20 @@ bool QScriptEngine::convert(const QScriptValue &value, int type, void *ptr)
*/
bool QScriptEngine::convertV2(const QScriptValue &value, int type, void *ptr)
{
- return QScriptEnginePrivate::convert(value, type, ptr, /*engine=*/0);
+ QScriptValuePrivate *vp = QScriptValuePrivate::get(value);
+ if (vp) {
+ switch (vp->type) {
+ case QScriptValuePrivate::JavaScriptCore: {
+ JSC::ExecState *exec = vp->engine ? vp->engine->currentFrame : 0;
+ return QScriptEnginePrivate::convertValue(exec, vp->jscValue, type, ptr);
+ }
+ case QScriptValuePrivate::Number:
+ return QScriptEnginePrivate::convertNumber(vp->numberValue, type, ptr);
+ case QScriptValuePrivate::String:
+ return QScriptEnginePrivate::convertString(vp->stringValue, type, ptr);
+ }
+ }
+ return false;
}
/*!
@@ -3846,4 +4230,9 @@ Q_AUTOTEST_EXPORT bool qt_script_isJITEnabled()
}
#endif
+#ifdef Q_CC_MSVC
+// Try to prevent compiler from crashing.
+#pragma optimize("", off)
+#endif
+
QT_END_NAMESPACE
diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h
index 401d6d2613..5166d89475 100644
--- a/src/script/api/qscriptengine_p.h
+++ b/src/script/api/qscriptengine_p.h
@@ -37,14 +37,30 @@
#include "private/qobject_p.h"
+#include <QtCore/qdatetime.h>
#include <QtCore/qhash.h>
+#include <QtCore/qnumeric.h>
+#include <QtCore/qregexp.h>
#include <QtCore/qset.h>
#include "qscriptvalue_p.h"
#include "qscriptstring_p.h"
-
+#include "bridge/qscriptclassobject_p.h"
+#include "bridge/qscriptdeclarativeclass_p.h"
+#include "bridge/qscriptdeclarativeobject_p.h"
+#include "bridge/qscriptobject_p.h"
+#include "bridge/qscriptqobject_p.h"
+#include "bridge/qscriptvariant_p.h"
+#include "utils/qscriptdate_p.h"
+
+#include "DateConstructor.h"
+#include "DateInstance.h"
#include "Debugger.h"
+#include "ErrorInstance.h"
+#include "JSArray.h"
#include "Lexer.h"
#include "RefPtr.h"
+#include "RegExpConstructor.h"
+#include "RegExpObject.h"
#include "SourceProvider.h"
#include "Structure.h"
#include "JSGlobalObject.h"
@@ -83,10 +99,33 @@ namespace QScript
#endif
class TimeoutCheckerProxy;
+ qint32 ToInt32(qsreal);
+ quint32 ToUInt32(qsreal);
+ quint16 ToUInt16(qsreal);
+ qsreal ToInteger(qsreal);
+
+ inline bool ToBool(qsreal);
+ inline bool ToBool(const QString &);
+ inline qint32 ToInt32(const QString &);
+ inline quint32 ToUInt32(const QString &);
+ inline quint16 ToUInt16(const QString &);
+ inline qsreal ToInteger(const QString &);
+#ifdef Q_CC_MSVC
+ // MSVC2008 crashes if these are inlined.
+ qsreal ToNumber(const QString &);
+ QString ToString(qsreal);
+#else
+ inline qsreal ToNumber(const QString &);
+ inline QString ToString(qsreal);
+#endif
+
//some conversion helper functions
inline QScriptEnginePrivate *scriptEngineFromExec(const JSC::ExecState *exec);
bool isFunction(JSC::JSValue value);
+ inline void convertToLatin1_helper(const UChar *i, int length, char *s);
+ inline QByteArray convertToLatin1(const JSC::UString &str);
+
class UStringSourceProviderWithFeedback;
struct GlobalClientData : public JSC::JSGlobalData::ClientData
@@ -114,29 +153,72 @@ public:
static QScriptEnginePrivate *get(QScriptEngine *q) { return q ? q->d_func() : 0; }
static QScriptEngine *get(QScriptEnginePrivate *d) { return d ? d->q_func() : 0; }
- static bool convert(const QScriptValue &value,
- int type, void *ptr,
- QScriptEnginePrivate *eng);
- QScriptValue create(int type, const void *ptr);
+ static inline bool isArray(JSC::JSValue);
+ static inline bool isDate(JSC::JSValue);
+ static inline bool isError(JSC::JSValue);
+ static inline bool isObject(JSC::JSValue);
+ static inline bool isRegExp(JSC::JSValue);
+ static inline bool isVariant(JSC::JSValue);
+ static inline bool isQObject(JSC::JSValue);
+ static inline bool isQMetaObject(JSC::JSValue);
+
+ static inline bool toBool(JSC::ExecState *, JSC::JSValue);
+ static inline qsreal toInteger(JSC::ExecState *, JSC::JSValue);
+ static inline qsreal toNumber(JSC::ExecState *, JSC::JSValue);
+ static inline qint32 toInt32(JSC::ExecState *, JSC::JSValue);
+ static inline quint32 toUInt32(JSC::ExecState *, JSC::JSValue);
+ static inline quint16 toUInt16(JSC::ExecState *, JSC::JSValue);
+ static inline JSC::UString toString(JSC::ExecState *, JSC::JSValue);
+
+ static inline QDateTime toDateTime(JSC::ExecState *, JSC::JSValue);
+#ifndef QT_NO_REGEXP
+ static QRegExp toRegExp(JSC::ExecState*, JSC::JSValue);
+#endif
+ static QVariant toVariant(JSC::ExecState *, JSC::JSValue);
+ static inline QObject *toQObject(JSC::ExecState *, JSC::JSValue);
+ static inline const QMetaObject *toQMetaObject(JSC::ExecState *, JSC::JSValue);
+
+ static inline JSC::JSValue property(JSC::ExecState*, JSC::JSValue, const JSC::Identifier &id,
+ int resolveMode = QScriptValue::ResolvePrototype);
+ static JSC::JSValue propertyHelper(JSC::ExecState*, JSC::JSValue, const JSC::Identifier &id, int resolveMode);
+ static inline JSC::JSValue property(JSC::ExecState*, JSC::JSValue, quint32 index,
+ int resolveMode = QScriptValue::ResolvePrototype);
+ static JSC::JSValue propertyHelper(JSC::ExecState*, JSC::JSValue, quint32, int resolveMode);
+ static inline JSC::JSValue property(JSC::ExecState*, JSC::JSValue, const JSC::UString &, int resolveMode);
+ static inline void setProperty(JSC::ExecState*, JSC::JSValue object, const JSC::UString &name, JSC::JSValue,
+ const QScriptValue::PropertyFlags &flags = QScriptValue::KeepExistingFlags);
+ static void setProperty(JSC::ExecState*, JSC::JSValue object, const JSC::Identifier &id, JSC::JSValue,
+ const QScriptValue::PropertyFlags &flags = QScriptValue::KeepExistingFlags);
+ static void setProperty(JSC::ExecState*, JSC::JSValue object, quint32 index, JSC::JSValue,
+ const QScriptValue::PropertyFlags &flags = QScriptValue::KeepExistingFlags);
+ static QScriptValue::PropertyFlags propertyFlags(JSC::ExecState*, JSC::JSValue value,
+ const JSC::Identifier &id, const QScriptValue::ResolveFlags &mode);
+ static inline QScriptValue::PropertyFlags propertyFlags(JSC::ExecState*, JSC::JSValue value,
+ const JSC::UString &name, const QScriptValue::ResolveFlags &mode);
+
+ static bool convertValue(JSC::ExecState*, JSC::JSValue value,
+ int type, void *ptr);
+ static bool convertNumber(qsreal, int type, void *ptr);
+ static bool convertString(const QString &, int type, void *ptr);
+ static JSC::JSValue create(JSC::ExecState*, int type, const void *ptr);
bool hasDemarshalFunction(int type) const;
inline QScriptValue scriptValueFromJSCValue(JSC::JSValue value);
inline JSC::JSValue scriptValueToJSCValue(const QScriptValue &value);
- QScriptValue scriptValueFromVariant(const QVariant &value);
- QVariant scriptValueToVariant(const QScriptValue &value, int targetType);
-
- JSC::JSValue jscValueFromVariant(const QVariant &value);
- QVariant jscValueToVariant(JSC::JSValue value, int targetType);
+ static inline JSC::JSValue jscValueFromVariant(JSC::ExecState*, const QVariant &value);
+ static QVariant jscValueToVariant(JSC::ExecState*, JSC::JSValue value, int targetType);
+ static inline QVariant &variantValue(JSC::JSValue value);
+ static inline void setVariantValue(JSC::JSValue objectValue, const QVariant &value);
- QScriptValue arrayFromStringList(const QStringList &lst);
- static QStringList stringListFromArray(const QScriptValue &arr);
+ static JSC::JSValue arrayFromStringList(JSC::ExecState*, const QStringList &lst);
+ static QStringList stringListFromArray(JSC::ExecState*, JSC::JSValue arr);
- QScriptValue arrayFromVariantList(const QVariantList &lst);
- static QVariantList variantListFromArray(const QScriptValue &arr);
+ static JSC::JSValue arrayFromVariantList(JSC::ExecState*, const QVariantList &lst);
+ static QVariantList variantListFromArray(JSC::ExecState*, JSC::JSValue arr);
- QScriptValue objectFromVariantMap(const QVariantMap &vmap);
- static QVariantMap variantMapFromObject(const QScriptValue &obj);
+ static JSC::JSValue objectFromVariantMap(JSC::ExecState*, const QVariantMap &vmap);
+ static QVariantMap variantMapFromObject(JSC::ExecState*, JSC::JSValue obj);
JSC::JSValue defaultPrototype(int metaTypeId) const;
void setDefaultPrototype(int metaTypeId, JSC::JSValue prototype);
@@ -177,10 +259,43 @@ public:
void agentDeleted(QScriptEngineAgent *agent);
+ static inline void saveException(JSC::ExecState *, JSC::JSValue *);
+ static inline void restoreException(JSC::ExecState *, JSC::JSValue);
+
void setCurrentException(QScriptValue exception) { m_currentException = exception; }
QScriptValue currentException() const { return m_currentException; }
void clearCurrentException() { m_currentException.d_ptr.reset(); }
+ static QScriptSyntaxCheckResult checkSyntax(const QString &program);
+ static bool canEvaluate(const QString &program);
+
+ inline QScriptValuePrivate *allocateScriptValuePrivate(size_t);
+ inline void freeScriptValuePrivate(QScriptValuePrivate *p);
+
+ inline void registerScriptValue(QScriptValuePrivate *value);
+ inline void unregisterScriptValue(QScriptValuePrivate *value);
+ void detachAllRegisteredScriptValues();
+
+ inline void registerScriptString(QScriptStringPrivate *value);
+ inline void unregisterScriptString(QScriptStringPrivate *value);
+ void detachAllRegisteredScriptStrings();
+
+ static inline JSC::JSValue newArray(JSC::ExecState *, uint length);
+ static inline JSC::JSValue newDate(JSC::ExecState *, qsreal value);
+ static inline JSC::JSValue newDate(JSC::ExecState *, const QDateTime &);
+ inline JSC::JSValue newObject();
+
+#ifndef QT_NO_REGEXP
+ static JSC::JSValue newRegExp(JSC::ExecState *, const QRegExp &);
+#endif
+
+ static JSC::JSValue newRegExp(JSC::ExecState *, const QString &pattern, const QString &flags);
+ JSC::JSValue newVariant(const QVariant &);
+ JSC::JSValue newVariant(JSC::JSValue objectValue, const QVariant &);
+
+ static inline QScriptDeclarativeClass *declarativeClass(JSC::JSValue);
+ static inline QScriptDeclarativeClass::Object *declarativeObject(JSC::JSValue);
+
#ifndef QT_NO_QOBJECT
JSC::JSValue newQObject(QObject *object,
QScriptEngine::ValueOwnership ownership = QScriptEngine::QtOwnership,
@@ -188,9 +303,7 @@ public:
JSC::JSValue newQMetaObject(const QMetaObject *metaObject,
JSC::JSValue ctor);
- static QScriptSyntaxCheckResult checkSyntax(const QString &program);
- static bool canEvaluate(const QString &program);
- static bool convertToNativeQObject(const QScriptValue &value,
+ static bool convertToNativeQObject(JSC::ExecState*, JSC::JSValue,
const QByteArray &targetType,
void **result);
@@ -220,17 +333,6 @@ public:
bool scriptDisconnect(JSC::JSValue signal, JSC::JSValue receiver,
JSC::JSValue function);
- inline QScriptValuePrivate *allocateScriptValuePrivate(size_t);
- inline void freeScriptValuePrivate(QScriptValuePrivate *p);
-
- inline void registerScriptValue(QScriptValuePrivate *value);
- inline void unregisterScriptValue(QScriptValuePrivate *value);
- void detachAllRegisteredScriptValues();
-
- inline void registerScriptString(QScriptStringPrivate *value);
- inline void unregisterScriptString(QScriptStringPrivate *value);
- void detachAllRegisteredScriptStrings();
-
// private slots
void _q_objectDestroyed(QObject *);
#endif
@@ -372,6 +474,66 @@ inline QScriptEnginePrivate *scriptEngineFromExec(const JSC::ExecState *exec)
return static_cast<GlobalClientData*>(exec->globalData().clientData)->engine;
}
+#ifndef Q_CC_MSVC
+// MSVC2008 crashes if these are inlined.
+
+inline QString ToString(qsreal value)
+{
+ return JSC::UString::from(value);
+}
+
+inline qsreal ToNumber(const QString &value)
+{
+ return ((JSC::UString)value).toDouble();
+}
+
+#endif
+
+inline qint32 ToInt32(const QString &value)
+{
+ return ToInt32(ToNumber(value));
+}
+
+inline quint32 ToUInt32(const QString &value)
+{
+ return ToUInt32(ToNumber(value));
+}
+
+inline quint16 ToUInt16(const QString &value)
+{
+ return ToUInt16(ToNumber(value));
+}
+
+inline qsreal ToInteger(const QString &value)
+{
+ return ToInteger(ToNumber(value));
+}
+
+inline bool ToBool(qsreal value)
+{
+ return (value != 0) && !qIsNaN(value);
+}
+
+inline bool ToBool(const QString &value)
+{
+ return !value.isEmpty();
+}
+
+inline void convertToLatin1_helper(const UChar *i, int length, char *s)
+{
+ const UChar *e = i + length;
+ while (i != e)
+ *(s++) = (uchar) *(i++);
+ *s = '\0';
+}
+
+inline QByteArray convertToLatin1(const JSC::UString &str)
+{
+ QByteArray ba(str.size(), Qt::Uninitialized);
+ convertToLatin1_helper(str.data(), str.size(), ba.data());
+ return ba;
+}
+
} // namespace QScript
inline QScriptValuePrivate *QScriptEnginePrivate::allocateScriptValuePrivate(size_t size)
@@ -417,6 +579,13 @@ inline void QScriptEnginePrivate::unregisterScriptValue(QScriptValuePrivate *val
value->next = 0;
}
+inline JSC::JSValue QScriptEnginePrivate::jscValueFromVariant(JSC::ExecState *exec, const QVariant &v)
+{
+ JSC::JSValue result = create(exec, v.userType(), v.data());
+ Q_ASSERT(result);
+ return result;
+}
+
inline QScriptValue QScriptEnginePrivate::scriptValueFromJSCValue(JSC::JSValue value)
{
if (!value)
@@ -478,32 +647,83 @@ inline void QScriptValuePrivate::initFrom(const QString &value)
engine->registerScriptValue(this);
}
-inline QScriptValue QScriptValuePrivate::property(const QString &name, int resolveMode) const
+inline JSC::JSValue QScriptEnginePrivate::property(JSC::ExecState *exec, JSC::JSValue value, const JSC::UString &name, int resolveMode)
{
- JSC::ExecState *exec = engine->currentFrame;
- return property(JSC::Identifier(exec, name), resolveMode);
+ return property(exec, value, JSC::Identifier(exec, name), resolveMode);
}
-inline QScriptValue QScriptValuePrivate::property(const JSC::Identifier &id, int resolveMode) const
+inline JSC::JSValue QScriptEnginePrivate::property(JSC::ExecState *exec, JSC::JSValue value, const JSC::Identifier &id, int resolveMode)
{
- Q_ASSERT(isObject());
- JSC::ExecState *exec = engine->currentFrame;
- JSC::JSObject *object = JSC::asObject(jscValue);
+ Q_ASSERT(isObject(value));
+ JSC::JSObject *object = JSC::asObject(value);
JSC::PropertySlot slot(object);
if ((resolveMode & QScriptValue::ResolvePrototype) && object->getPropertySlot(exec, id, slot))
- return engine->scriptValueFromJSCValue(slot.getValue(exec, id));
- return propertyHelper(id, resolveMode);
+ return slot.getValue(exec, id);
+ return propertyHelper(exec, value, id, resolveMode);
}
-inline QScriptValue QScriptValuePrivate::property(quint32 index, int resolveMode) const
+inline JSC::JSValue QScriptEnginePrivate::property(JSC::ExecState *exec, JSC::JSValue value, quint32 index, int resolveMode)
{
- Q_ASSERT(isObject());
- JSC::ExecState *exec = engine->currentFrame;
- JSC::JSObject *object = JSC::asObject(jscValue);
+ Q_ASSERT(isObject(value));
+ JSC::JSObject *object = JSC::asObject(value);
JSC::PropertySlot slot(object);
if ((resolveMode & QScriptValue::ResolvePrototype) && object->getPropertySlot(exec, index, slot))
- return engine->scriptValueFromJSCValue(slot.getValue(exec, index));
- return propertyHelper(index, resolveMode);
+ return slot.getValue(exec, index);
+ return propertyHelper(exec, value, index, resolveMode);
+}
+
+inline QScriptValue::PropertyFlags QScriptEnginePrivate::propertyFlags(JSC::ExecState *exec, JSC::JSValue value,
+ const JSC::UString &name,
+ const QScriptValue::ResolveFlags &mode)
+{
+ return propertyFlags(exec, value, JSC::Identifier(exec, name), mode);
+}
+
+inline void QScriptEnginePrivate::setProperty(JSC::ExecState *exec, JSC::JSValue objectValue, const JSC::UString &name,
+ JSC::JSValue value, const QScriptValue::PropertyFlags &flags)
+{
+ setProperty(exec, objectValue, JSC::Identifier(exec, name), value, flags);
+}
+
+inline JSC::JSValue QScriptValuePrivate::property(const JSC::Identifier &id, int resolveMode) const
+{
+ return QScriptEnginePrivate::property(engine->currentFrame, jscValue, id, resolveMode);
+}
+
+inline JSC::JSValue QScriptValuePrivate::property(quint32 index, int resolveMode) const
+{
+ return QScriptEnginePrivate::property(engine->currentFrame, jscValue, index, resolveMode);
+}
+
+inline JSC::JSValue QScriptValuePrivate::property(const JSC::UString &name, int resolveMode) const
+{
+ JSC::ExecState *exec = engine->currentFrame;
+ return QScriptEnginePrivate::property(exec, jscValue, JSC::Identifier(exec, name), resolveMode);
+}
+
+inline QScriptValue::PropertyFlags QScriptValuePrivate::propertyFlags(
+ const JSC::Identifier &id, const QScriptValue::ResolveFlags &mode) const
+{
+ return QScriptEnginePrivate::propertyFlags(engine->currentFrame, jscValue, id, mode);
+}
+
+inline void QScriptValuePrivate::setProperty(const JSC::Identifier &id, const JSC::JSValue &value,
+ const QScriptValue::PropertyFlags &flags)
+{
+ QScriptEnginePrivate::setProperty(engine->currentFrame, jscValue, id, value, flags);
+}
+
+inline void QScriptValuePrivate::setProperty(quint32 index, const JSC::JSValue &value,
+ const QScriptValue::PropertyFlags &flags)
+{
+ QScriptEnginePrivate::setProperty(engine->currentFrame, jscValue, index, value, flags);
+}
+
+inline void QScriptValuePrivate::setProperty(const JSC::UString &name, const JSC::JSValue &value,
+ const QScriptValue::PropertyFlags &flags)
+{
+ JSC::ExecState *exec = engine->currentFrame;
+ QScriptEnginePrivate::setProperty(exec, jscValue, JSC::Identifier(exec, name), value, flags);
}
inline void* QScriptValuePrivate::operator new(size_t size, QScriptEnginePrivate *engine)
@@ -522,7 +742,7 @@ inline void QScriptValuePrivate::operator delete(void *ptr)
qFree(d);
}
-inline void QScriptValuePrivate::saveException(JSC::ExecState *exec, JSC::JSValue *val)
+inline void QScriptEnginePrivate::saveException(JSC::ExecState *exec, JSC::JSValue *val)
{
if (exec) {
*val = exec->exception();
@@ -532,7 +752,7 @@ inline void QScriptValuePrivate::saveException(JSC::ExecState *exec, JSC::JSValu
}
}
-inline void QScriptValuePrivate::restoreException(JSC::ExecState *exec, JSC::JSValue val)
+inline void QScriptEnginePrivate::restoreException(JSC::ExecState *exec, JSC::JSValue val)
{
if (exec && val)
exec->setException(val);
@@ -586,6 +806,231 @@ inline JSC::ExecState *QScriptEnginePrivate::globalExec() const
return originalGlobalObject()->globalExec();
}
+inline JSC::JSValue QScriptEnginePrivate::newArray(JSC::ExecState *exec, uint length)
+{
+ return JSC::constructEmptyArray(exec, length);
+}
+
+inline JSC::JSValue QScriptEnginePrivate::newDate(JSC::ExecState *exec, qsreal value)
+{
+ JSC::JSValue val = JSC::jsNumber(exec, value);
+ JSC::ArgList args(&val, 1);
+ return JSC::constructDate(exec, args);
+}
+
+inline JSC::JSValue QScriptEnginePrivate::newDate(JSC::ExecState *exec, const QDateTime &value)
+{
+ return newDate(exec, QScript::FromDateTime(value));
+}
+
+inline JSC::JSValue QScriptEnginePrivate::newObject()
+{
+ return new (currentFrame)QScriptObject(scriptObjectStructure);
+}
+
+inline bool QScriptEnginePrivate::isObject(JSC::JSValue value)
+{
+ return value && value.isObject();
+}
+
+inline bool QScriptEnginePrivate::isArray(JSC::JSValue value)
+{
+ return isObject(value) && value.inherits(&JSC::JSArray::info);
+}
+
+inline bool QScriptEnginePrivate::isDate(JSC::JSValue value)
+{
+ return isObject(value) && value.inherits(&JSC::DateInstance::info);
+}
+
+inline bool QScriptEnginePrivate::isError(JSC::JSValue value)
+{
+ return isObject(value) && value.inherits(&JSC::ErrorInstance::info);
+}
+
+inline bool QScriptEnginePrivate::isRegExp(JSC::JSValue value)
+{
+ return isObject(value) && value.inherits(&JSC::RegExpObject::info);
+}
+
+inline bool QScriptEnginePrivate::isVariant(JSC::JSValue value)
+{
+ if (!isObject(value) || !value.inherits(&QScriptObject::info))
+ return false;
+ QScriptObject *object = static_cast<QScriptObject*>(JSC::asObject(value));
+ QScriptObjectDelegate *delegate = object->delegate();
+ return (delegate && (delegate->type() == QScriptObjectDelegate::Variant));
+}
+
+inline bool QScriptEnginePrivate::isQObject(JSC::JSValue value)
+{
+#ifndef QT_NO_QOBJECT
+ if (!isObject(value) || !value.inherits(&QScriptObject::info))
+ return false;
+ QScriptObject *object = static_cast<QScriptObject*>(JSC::asObject(value));
+ QScriptObjectDelegate *delegate = object->delegate();
+ return (delegate && (delegate->type() == QScriptObjectDelegate::QtObject ||
+ (delegate->type() == QScriptObjectDelegate::DeclarativeClassObject &&
+ static_cast<QScript::DeclarativeObjectDelegate*>(delegate)->scriptClass()->isQObject())));
+#else
+ return false;
+#endif
+}
+
+inline bool QScriptEnginePrivate::isQMetaObject(JSC::JSValue value)
+{
+#ifndef QT_NO_QOBJECT
+ return isObject(value) && JSC::asObject(value)->inherits(&QScript::QMetaObjectWrapperObject::info);
+#else
+ return false;
+#endif
+}
+
+inline bool QScriptEnginePrivate::toBool(JSC::ExecState *exec, JSC::JSValue value)
+{
+ JSC::JSValue savedException;
+ saveException(exec, &savedException);
+ bool result = value.toBoolean(exec);
+ restoreException(exec, savedException);
+ return result;
+}
+
+inline qsreal QScriptEnginePrivate::toInteger(JSC::ExecState *exec, JSC::JSValue value)
+{
+ JSC::JSValue savedException;
+ saveException(exec, &savedException);
+ qsreal result = value.toInteger(exec);
+ restoreException(exec, savedException);
+ return result;
+}
+
+inline qsreal QScriptEnginePrivate::toNumber(JSC::ExecState *exec, JSC::JSValue value)
+{
+ JSC::JSValue savedException;
+ saveException(exec, &savedException);
+ qsreal result = value.toNumber(exec);
+ restoreException(exec, savedException);
+ return result;
+}
+
+inline qint32 QScriptEnginePrivate::toInt32(JSC::ExecState *exec, JSC::JSValue value)
+{
+ JSC::JSValue savedException;
+ saveException(exec, &savedException);
+ qint32 result = value.toInt32(exec);
+ restoreException(exec, savedException);
+ return result;
+}
+
+inline quint32 QScriptEnginePrivate::toUInt32(JSC::ExecState *exec, JSC::JSValue value)
+{
+ JSC::JSValue savedException;
+ saveException(exec, &savedException);
+ quint32 result = value.toUInt32(exec);
+ restoreException(exec, savedException);
+ return result;
+}
+
+inline quint16 QScriptEnginePrivate::toUInt16(JSC::ExecState *exec, JSC::JSValue value)
+{
+ // ### no equivalent function in JSC
+ return QScript::ToUInt16(toNumber(exec, value));
+}
+
+inline JSC::UString QScriptEnginePrivate::toString(JSC::ExecState *exec, JSC::JSValue value)
+{
+ JSC::JSValue savedException;
+ saveException(exec, &savedException);
+ JSC::UString str = value.toString(exec);
+ if (exec && exec->hadException() && !str.size()) {
+ JSC::JSValue savedException2;
+ saveException(exec, &savedException2);
+ str = savedException2.toString(exec);
+ restoreException(exec, savedException2);
+ }
+ if (savedException)
+ restoreException(exec, savedException);
+ return str;
+}
+
+inline QDateTime QScriptEnginePrivate::toDateTime(JSC::ExecState *, JSC::JSValue value)
+{
+ if (!isDate(value))
+ return QDateTime();
+ qsreal t = static_cast<JSC::DateInstance*>(JSC::asObject(value))->internalNumber();
+ return QScript::ToDateTime(t, Qt::LocalTime);
+}
+
+inline QObject *QScriptEnginePrivate::toQObject(JSC::ExecState *exec, JSC::JSValue value)
+{
+#ifndef QT_NO_QOBJECT
+ if (isObject(value) && value.inherits(&QScriptObject::info)) {
+ QScriptObject *object = static_cast<QScriptObject*>(JSC::asObject(value));
+ QScriptObjectDelegate *delegate = object->delegate();
+ if (!delegate)
+ return 0;
+ if (delegate->type() == QScriptObjectDelegate::QtObject)
+ return static_cast<QScript::QObjectDelegate*>(delegate)->value();
+ if (delegate->type() == QScriptObjectDelegate::DeclarativeClassObject)
+ return static_cast<QScript::DeclarativeObjectDelegate*>(delegate)->scriptClass()->toQObject(declarativeObject(value));
+ if (delegate->type() == QScriptObjectDelegate::Variant) {
+ QVariant var = variantValue(value);
+ int type = var.userType();
+ if ((type == QMetaType::QObjectStar) || (type == QMetaType::QWidgetStar))
+ return *reinterpret_cast<QObject* const *>(var.constData());
+ }
+ }
+#endif
+ return 0;
+}
+
+inline const QMetaObject *QScriptEnginePrivate::toQMetaObject(JSC::ExecState*, JSC::JSValue value)
+{
+#ifndef QT_NO_QOBJECT
+ if (isQMetaObject(value))
+ return static_cast<QScript::QMetaObjectWrapperObject*>(JSC::asObject(value))->value();
+#endif
+ return 0;
+}
+
+inline QVariant &QScriptEnginePrivate::variantValue(JSC::JSValue value)
+{
+ Q_ASSERT(value.inherits(&QScriptObject::info));
+ QScriptObjectDelegate *delegate = static_cast<QScriptObject*>(JSC::asObject(value))->delegate();
+ Q_ASSERT(delegate && (delegate->type() == QScriptObjectDelegate::Variant));
+ return static_cast<QScript::QVariantDelegate*>(delegate)->value();
+}
+
+inline void QScriptEnginePrivate::setVariantValue(JSC::JSValue objectValue, const QVariant &value)
+{
+ Q_ASSERT(objectValue.inherits(&QScriptObject::info));
+ QScriptObjectDelegate *delegate = static_cast<QScriptObject*>(JSC::asObject(objectValue))->delegate();
+ Q_ASSERT(delegate && (delegate->type() == QScriptObjectDelegate::Variant));
+ static_cast<QScript::QVariantDelegate*>(delegate)->setValue(value);
+}
+
+inline QScriptDeclarativeClass *QScriptEnginePrivate::declarativeClass(JSC::JSValue v)
+{
+ if (!QScriptEnginePrivate::isObject(v) || !v.inherits(&QScriptObject::info))
+ return 0;
+ QScriptObject *scriptObject = static_cast<QScriptObject*>(JSC::asObject(v));
+ QScriptObjectDelegate *delegate = scriptObject->delegate();
+ if (!delegate || (delegate->type() != QScriptObjectDelegate::DeclarativeClassObject))
+ return 0;
+ return static_cast<QScript::DeclarativeObjectDelegate*>(delegate)->scriptClass();
+}
+
+inline QScriptDeclarativeClass::Object *QScriptEnginePrivate::declarativeObject(JSC::JSValue v)
+{
+ if (!QScriptEnginePrivate::isObject(v) || !v.inherits(&QScriptObject::info))
+ return 0;
+ QScriptObject *scriptObject = static_cast<QScriptObject*>(JSC::asObject(v));
+ QScriptObjectDelegate *delegate = scriptObject->delegate();
+ if (!delegate || (delegate->type() != QScriptObjectDelegate::DeclarativeClassObject))
+ return 0;
+ return static_cast<QScript::DeclarativeObjectDelegate*>(delegate)->object();
+}
+
QT_END_NAMESPACE
#endif
diff --git a/src/script/api/qscriptprogram.cpp b/src/script/api/qscriptprogram.cpp
index c45205238f..d4a32f4e07 100644
--- a/src/script/api/qscriptprogram.cpp
+++ b/src/script/api/qscriptprogram.cpp
@@ -63,7 +63,6 @@ QScriptProgramPrivate::QScriptProgramPrivate(const QString &src,
QScriptProgramPrivate::~QScriptProgramPrivate()
{
- delete _executable;
}
QScriptProgramPrivate *QScriptProgramPrivate::get(const QScriptProgram &q)
@@ -76,17 +75,17 @@ JSC::EvalExecutable *QScriptProgramPrivate::executable(JSC::ExecState *exec,
{
if (_executable) {
if (eng == engine)
- return _executable;
- delete _executable;
+ return _executable.get();
+ _executable = 0;
}
WTF::PassRefPtr<QScript::UStringSourceProviderWithFeedback> provider
= QScript::UStringSourceProviderWithFeedback::create(sourceCode, fileName, firstLineNumber, eng);
sourceId = provider->asID();
JSC::SourceCode source(provider, firstLineNumber); //after construction of SourceCode provider variable will be null.
- _executable = new JSC::EvalExecutable(exec, source);
+ _executable = JSC::EvalExecutable::create(exec, source);
engine = eng;
isCompiled = false;
- return _executable;
+ return _executable.get();
}
/*!
diff --git a/src/script/api/qscriptprogram_p.h b/src/script/api/qscriptprogram_p.h
index 427ab34b55..95e75fda5b 100644
--- a/src/script/api/qscriptprogram_p.h
+++ b/src/script/api/qscriptprogram_p.h
@@ -37,6 +37,8 @@
#include <QtCore/qobjectdefs.h>
+#include "RefPtr.h"
+
namespace JSC
{
class EvalExecutable;
@@ -67,7 +69,7 @@ public:
int firstLineNumber;
QScriptEnginePrivate *engine;
- JSC::EvalExecutable *_executable;
+ WTF::RefPtr<JSC::EvalExecutable> _executable;
intptr_t sourceId;
bool isCompiled;
};
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index 5bfe46acc7..414a45cac1 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -29,33 +29,19 @@
#include "qscriptengine_p.h"
#include "qscriptstring_p.h"
-#include "JSArray.h"
#include "JSGlobalObject.h"
#include "JSImmediate.h"
#include "JSObject.h"
#include "JSValue.h"
#include "JSFunction.h"
-#include "DateInstance.h"
-#include "ErrorInstance.h"
-#include "RegExpObject.h"
#include "Identifier.h"
#include "Operations.h"
#include "Arguments.h"
-#include <QtCore/qdatetime.h>
-#include <QtCore/qregexp.h>
#include <QtCore/qvariant.h>
#include <QtCore/qvarlengtharray.h>
#include <QtCore/qnumeric.h>
-#include "utils/qscriptdate_p.h"
-#include "bridge/qscriptobject_p.h"
-#include "bridge/qscriptclassobject_p.h"
-#include "bridge/qscriptvariant_p.h"
-#include "bridge/qscriptqobject_p.h"
-#include "bridge/qscriptdeclarativeclass_p.h"
-#include "bridge/qscriptdeclarativeobject_p.h"
-
/*!
\since 4.3
\class QScriptValue
@@ -180,248 +166,8 @@
\omitvalue ResolveFull Check the object's own properties first, then search the prototype chain, and finally search the scope chain.
*/
-// ### move
-
-#include <QtCore/qnumeric.h>
-#include <math.h>
-
QT_BEGIN_NAMESPACE
-namespace QScript
-{
-
-static const qsreal D32 = 4294967296.0;
-
-qint32 ToInt32(qsreal n)
-{
- if (qIsNaN(n) || qIsInf(n) || (n == 0))
- return 0;
-
- qsreal sign = (n < 0) ? -1.0 : 1.0;
- qsreal abs_n = fabs(n);
-
- n = ::fmod(sign * ::floor(abs_n), D32);
- const double D31 = D32 / 2.0;
-
- if (sign == -1 && n < -D31)
- n += D32;
-
- else if (sign != -1 && n >= D31)
- n -= D32;
-
- return qint32 (n);
-}
-
-quint32 ToUint32(qsreal n)
-{
- if (qIsNaN(n) || qIsInf(n) || (n == 0))
- return 0;
-
- qsreal sign = (n < 0) ? -1.0 : 1.0;
- qsreal abs_n = fabs(n);
-
- n = ::fmod(sign * ::floor(abs_n), D32);
-
- if (n < 0)
- n += D32;
-
- return quint32 (n);
-}
-
-quint16 ToUint16(qsreal n)
-{
- static const qsreal D16 = 65536.0;
-
- if (qIsNaN(n) || qIsInf(n) || (n == 0))
- return 0;
-
- qsreal sign = (n < 0) ? -1.0 : 1.0;
- qsreal abs_n = fabs(n);
-
- n = ::fmod(sign * ::floor(abs_n), D16);
-
- if (n < 0)
- n += D16;
-
- return quint16 (n);
-}
-
-qsreal ToInteger(qsreal n)
-{
- if (qIsNaN(n))
- return 0;
-
- if (n == 0 || qIsInf(n))
- return n;
-
- int sign = n < 0 ? -1 : 1;
- return sign * ::floor(::fabs(n));
-}
-
-} // namespace QScript
-
-QScriptValue QScriptValuePrivate::propertyHelper(const JSC::Identifier &id, int resolveMode) const
-{
- JSC::JSValue result;
- if (!(resolveMode & QScriptValue::ResolvePrototype)) {
- // Look in the object's own properties
- JSC::ExecState *exec = engine->currentFrame;
- JSC::JSObject *object = JSC::asObject(jscValue);
- JSC::PropertySlot slot(object);
- if (object->getOwnPropertySlot(exec, id, slot))
- result = slot.getValue(exec, id);
- }
- if (!result && (resolveMode & QScriptValue::ResolveScope)) {
- // ### check if it's a function object and look in the scope chain
- QScriptValue scope = property(QString::fromLatin1("__qt_scope__"), QScriptValue::ResolveLocal);
- if (scope.isObject())
- result = engine->scriptValueToJSCValue(QScriptValuePrivate::get(scope)->property(id, resolveMode));
- }
- return engine->scriptValueFromJSCValue(result);
-}
-
-QScriptValue QScriptValuePrivate::propertyHelper(quint32 index, int resolveMode) const
-{
- JSC::JSValue result;
- if (!(resolveMode & QScriptValue::ResolvePrototype)) {
- // Look in the object's own properties
- JSC::ExecState *exec = engine->currentFrame;
- JSC::JSObject *object = JSC::asObject(jscValue);
- JSC::PropertySlot slot(object);
- if (object->getOwnPropertySlot(exec, index, slot))
- result = slot.getValue(exec, index);
- }
- return engine->scriptValueFromJSCValue(result);
-}
-
-void QScriptValuePrivate::setProperty(const JSC::Identifier &id, const QScriptValue &value,
- const QScriptValue::PropertyFlags &flags)
-{
- QScriptEnginePrivate *valueEngine = QScriptValuePrivate::getEngine(value);
- if (valueEngine && (valueEngine != engine)) {
- qWarning("QScriptValue::setProperty(%s) failed: "
- "cannot set value created in a different engine",
- qPrintable(QString(id.ustring())));
- return;
- }
- JSC::ExecState *exec = engine->currentFrame;
- JSC::JSValue jsValue = engine->scriptValueToJSCValue(value);
- JSC::JSObject *thisObject = JSC::asObject(jscValue);
- JSC::JSValue setter = thisObject->lookupSetter(exec, id);
- JSC::JSValue getter = thisObject->lookupGetter(exec, id);
- if ((flags & QScriptValue::PropertyGetter) || (flags & QScriptValue::PropertySetter)) {
- if (!jsValue) {
- // deleting getter/setter
- if ((flags & QScriptValue::PropertyGetter) && (flags & QScriptValue::PropertySetter)) {
- // deleting both: just delete the property
- thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false);
- } else if (flags & QScriptValue::PropertyGetter) {
- // preserve setter, if there is one
- thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false);
- if (setter && setter.isObject())
- thisObject->defineSetter(exec, id, JSC::asObject(setter));
- } else { // flags & QScriptValue::PropertySetter
- // preserve getter, if there is one
- thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false);
- if (getter && getter.isObject())
- thisObject->defineGetter(exec, id, JSC::asObject(getter));
- }
- } else {
- if (jsValue.isObject()) { // ### should check if it has callData()
- // defining getter/setter
- if (id == exec->propertyNames().underscoreProto) {
- qWarning("QScriptValue::setProperty() failed: "
- "cannot set getter or setter of native property `__proto__'");
- } else {
- if (flags & QScriptValue::PropertyGetter)
- thisObject->defineGetter(exec, id, JSC::asObject(jsValue));
- if (flags & QScriptValue::PropertySetter)
- thisObject->defineSetter(exec, id, JSC::asObject(jsValue));
- }
- } else {
- qWarning("QScriptValue::setProperty(): getter/setter must be a function");
- }
- }
- } else {
- // setting the value
- if (getter && getter.isObject() && !(setter && setter.isObject())) {
- qWarning("QScriptValue::setProperty() failed: "
- "property '%s' has a getter but no setter",
- qPrintable(QString(id.ustring())));
- return;
- }
- if (!jsValue) {
- // ### check if it's a getter/setter property
- thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false);
- } else if (flags != QScriptValue::KeepExistingFlags) {
- if (thisObject->hasOwnProperty(exec, id))
- thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); // ### hmmm - can't we just update the attributes?
- unsigned attribs = 0;
- if (flags & QScriptValue::ReadOnly)
- attribs |= JSC::ReadOnly;
- if (flags & QScriptValue::SkipInEnumeration)
- attribs |= JSC::DontEnum;
- if (flags & QScriptValue::Undeletable)
- attribs |= JSC::DontDelete;
- attribs |= flags & QScriptValue::UserRange;
- thisObject->putWithAttributes(exec, id, jsValue, attribs);
- } else {
- JSC::PutPropertySlot slot;
- thisObject->put(exec, id, jsValue, slot);
- }
- }
-}
-
-QScriptValue::PropertyFlags QScriptValuePrivate::propertyFlags(const JSC::Identifier &id,
- const QScriptValue::ResolveFlags &mode) const
-{
- JSC::ExecState *exec = engine->currentFrame;
- JSC::JSObject *object = JSC::asObject(jscValue);
- unsigned attribs = 0;
- JSC::PropertyDescriptor descriptor;
- if (object->getOwnPropertyDescriptor(exec, id, descriptor))
- attribs = descriptor.attributes();
- else if (!object->getPropertyAttributes(exec, id, attribs)) {
- if ((mode & QScriptValue::ResolvePrototype) && object->prototype() && object->prototype().isObject()) {
- QScriptValue proto = engine->scriptValueFromJSCValue(object->prototype());
- return QScriptValuePrivate::get(proto)->propertyFlags(id, mode);
- }
- return 0;
- }
- QScriptValue::PropertyFlags result = 0;
- if (attribs & JSC::ReadOnly)
- result |= QScriptValue::ReadOnly;
- if (attribs & JSC::DontEnum)
- result |= QScriptValue::SkipInEnumeration;
- if (attribs & JSC::DontDelete)
- result |= QScriptValue::Undeletable;
- //We cannot rely on attribs JSC::Setter/Getter because they are not necesserly set by JSC (bug?)
- if (attribs & JSC::Getter || !object->lookupGetter(exec, id).isUndefinedOrNull())
- result |= QScriptValue::PropertyGetter;
- if (attribs & JSC::Setter || !object->lookupSetter(exec, id).isUndefinedOrNull())
- result |= QScriptValue::PropertySetter;
- if (attribs & QScript::QObjectMemberAttribute)
- result |= QScriptValue::QObjectMember;
- result |= QScriptValue::PropertyFlag(attribs & QScriptValue::UserRange);
- return result;
-}
-
-QVariant &QScriptValuePrivate::variantValue() const
-{
- Q_ASSERT(jscValue.inherits(&QScriptObject::info));
- QScriptObjectDelegate *delegate = static_cast<QScriptObject*>(JSC::asObject(jscValue))->delegate();
- Q_ASSERT(delegate && (delegate->type() == QScriptObjectDelegate::Variant));
- return static_cast<QScript::QVariantDelegate*>(delegate)->value();
-}
-
-void QScriptValuePrivate::setVariantValue(const QVariant &value)
-{
- Q_ASSERT(jscValue.inherits(&QScriptObject::info));
- QScriptObjectDelegate *delegate = static_cast<QScriptObject*>(JSC::asObject(jscValue))->delegate();
- Q_ASSERT(delegate && (delegate->type() == QScriptObjectDelegate::Variant));
- static_cast<QScript::QVariantDelegate*>(delegate)->setValue(value);
-}
-
void QScriptValuePrivate::detachFromEngine()
{
if (isJSC())
@@ -707,9 +453,9 @@ QScriptValue &QScriptValue::operator=(const QScriptValue &other)
bool QScriptValue::isError() const
{
Q_D(const QScriptValue);
- if (!d || !d->isObject())
+ if (!d || !d->isJSC())
return false;
- return d->jscValue.inherits(&JSC::ErrorInstance::info);
+ return QScriptEnginePrivate::isError(d->jscValue);
}
/*!
@@ -721,9 +467,9 @@ bool QScriptValue::isError() const
bool QScriptValue::isArray() const
{
Q_D(const QScriptValue);
- if (!d || !d->isObject())
+ if (!d || !d->isJSC())
return false;
- return d->jscValue.inherits(&JSC::JSArray::info);
+ return QScriptEnginePrivate::isArray(d->jscValue);
}
/*!
@@ -735,9 +481,9 @@ bool QScriptValue::isArray() const
bool QScriptValue::isDate() const
{
Q_D(const QScriptValue);
- if (!d || !d->isObject())
+ if (!d || !d->isJSC())
return false;
- return d->jscValue.inherits(&JSC::DateInstance::info);
+ return QScriptEnginePrivate::isDate(d->jscValue);
}
/*!
@@ -749,9 +495,9 @@ bool QScriptValue::isDate() const
bool QScriptValue::isRegExp() const
{
Q_D(const QScriptValue);
- if (!d || !d->isObject())
+ if (!d || !d->isJSC())
return false;
- return d->jscValue.inherits(&JSC::RegExpObject::info);
+ return QScriptEnginePrivate::isRegExp(d->jscValue);
}
/*!
@@ -816,7 +562,8 @@ QScriptValue QScriptValue::scope() const
if (!d || !d->isObject())
return QScriptValue();
// ### make hidden property
- return d->property(QLatin1String("__qt_scope__"), QScriptValue::ResolveLocal);
+ JSC::JSValue result = d->property("__qt_scope__", QScriptValue::ResolveLocal);
+ return d->engine->scriptValueFromJSCValue(result);
}
/*!
@@ -910,9 +657,9 @@ QScriptValue ToPrimitive(const QScriptValue &object, JSC::PreferredPrimitiveType
Q_ASSERT(pp->engine != 0);
JSC::ExecState *exec = pp->engine->currentFrame;
JSC::JSValue savedException;
- QScriptValuePrivate::saveException(exec, &savedException);
+ QScriptEnginePrivate::saveException(exec, &savedException);
JSC::JSValue result = JSC::asObject(pp->jscValue)->toPrimitive(exec, hint);
- QScriptValuePrivate::restoreException(exec, savedException);
+ QScriptEnginePrivate::restoreException(exec, savedException);
return pp->engine->scriptValueFromJSCValue(result);
}
@@ -1103,9 +850,9 @@ bool QScriptValue::equals(const QScriptValue &other) const
if (eng_p) {
JSC::ExecState *exec = eng_p->currentFrame;
JSC::JSValue savedException;
- QScriptValuePrivate::saveException(exec, &savedException);
+ QScriptEnginePrivate::saveException(exec, &savedException);
bool result = JSC::JSValue::equal(exec, d->jscValue, other.d_ptr->jscValue);
- QScriptValuePrivate::restoreException(exec, savedException);
+ QScriptEnginePrivate::restoreException(exec, savedException);
return result;
}
}
@@ -1191,21 +938,10 @@ QString QScriptValue::toString() const
switch (d->type) {
case QScriptValuePrivate::JavaScriptCore: {
JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0;
- JSC::JSValue savedException;
- QScriptValuePrivate::saveException(exec, &savedException);
- JSC::UString str = d->jscValue.toString(exec);
- if (exec && exec->hadException() && !str.size()) {
- JSC::JSValue savedException2;
- QScriptValuePrivate::saveException(exec, &savedException2);
- str = savedException2.toString(exec);
- QScriptValuePrivate::restoreException(exec, savedException2);
- }
- if (savedException)
- QScriptValuePrivate::restoreException(exec, savedException);
- return str;
+ return QScriptEnginePrivate::toString(exec, d->jscValue);
}
case QScriptValuePrivate::Number:
- return JSC::UString::from(d->numberValue);
+ return QScript::ToString(d->numberValue);
case QScriptValuePrivate::String:
return d->stringValue;
}
@@ -1232,16 +968,12 @@ qsreal QScriptValue::toNumber() const
switch (d->type) {
case QScriptValuePrivate::JavaScriptCore: {
JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0;
- JSC::JSValue savedException;
- QScriptValuePrivate::saveException(exec, &savedException);
- qsreal result = d->jscValue.toNumber(exec);
- QScriptValuePrivate::restoreException(exec, savedException);
- return result;
+ return QScriptEnginePrivate::toNumber(exec, d->jscValue);
}
case QScriptValuePrivate::Number:
return d->numberValue;
case QScriptValuePrivate::String:
- return ((JSC::UString)d->stringValue).toDouble();
+ return QScript::ToNumber(d->stringValue);
}
return 0;
}
@@ -1259,16 +991,12 @@ bool QScriptValue::toBoolean() const
switch (d->type) {
case QScriptValuePrivate::JavaScriptCore: {
JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0;
- JSC::JSValue savedException;
- QScriptValuePrivate::saveException(exec, &savedException);
- bool result = d->jscValue.toBoolean(exec);
- QScriptValuePrivate::restoreException(exec, savedException);
- return result;
+ return QScriptEnginePrivate::toBool(exec, d->jscValue);
}
case QScriptValuePrivate::Number:
- return (d->numberValue != 0) && !qIsNaN(d->numberValue);
+ return QScript::ToBool(d->numberValue);
case QScriptValuePrivate::String:
- return (!d->stringValue.isEmpty());
+ return QScript::ToBool(d->stringValue);
}
return false;
}
@@ -1295,16 +1023,12 @@ bool QScriptValue::toBool() const
switch (d->type) {
case QScriptValuePrivate::JavaScriptCore: {
JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0;
- JSC::JSValue savedException;
- QScriptValuePrivate::saveException(exec, &savedException);
- bool result = d->jscValue.toBoolean(exec);
- QScriptValuePrivate::restoreException(exec, savedException);
- return result;
+ return QScriptEnginePrivate::toBool(exec, d->jscValue);
}
case QScriptValuePrivate::Number:
- return (d->numberValue != 0) && !qIsNaN(d->numberValue);
+ return QScript::ToBool(d->numberValue);
case QScriptValuePrivate::String:
- return (!d->stringValue.isEmpty());
+ return QScript::ToBool(d->stringValue);
}
return false;
}
@@ -1329,16 +1053,12 @@ qint32 QScriptValue::toInt32() const
switch (d->type) {
case QScriptValuePrivate::JavaScriptCore: {
JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0;
- JSC::JSValue savedException;
- QScriptValuePrivate::saveException(exec, &savedException);
- qint32 result = d->jscValue.toInt32(exec);
- QScriptValuePrivate::restoreException(exec, savedException);
- return result;
+ return QScriptEnginePrivate::toInt32(exec, d->jscValue);
}
case QScriptValuePrivate::Number:
return QScript::ToInt32(d->numberValue);
case QScriptValuePrivate::String:
- return QScript::ToInt32(((JSC::UString)d->stringValue).toDouble());
+ return QScript::ToInt32(d->stringValue);
}
return 0;
}
@@ -1363,16 +1083,12 @@ quint32 QScriptValue::toUInt32() const
switch (d->type) {
case QScriptValuePrivate::JavaScriptCore: {
JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0;
- JSC::JSValue savedException;
- QScriptValuePrivate::saveException(exec, &savedException);
- quint32 result = d->jscValue.toUInt32(exec);
- QScriptValuePrivate::restoreException(exec, savedException);
- return result;
+ return QScriptEnginePrivate::toUInt32(exec, d->jscValue);
}
case QScriptValuePrivate::Number:
- return QScript::ToUint32(d->numberValue);
+ return QScript::ToUInt32(d->numberValue);
case QScriptValuePrivate::String:
- return QScript::ToUint32(((JSC::UString)d->stringValue).toDouble());
+ return QScript::ToUInt32(d->stringValue);
}
return 0;
}
@@ -1396,13 +1112,13 @@ quint16 QScriptValue::toUInt16() const
return 0;
switch (d->type) {
case QScriptValuePrivate::JavaScriptCore: {
- // ### no equivalent function in JSC
- return QScript::ToUint16(toNumber());
+ JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0;
+ return QScriptEnginePrivate::toUInt16(exec, d->jscValue);
}
case QScriptValuePrivate::Number:
- return QScript::ToUint16(d->numberValue);
+ return QScript::ToUInt16(d->numberValue);
case QScriptValuePrivate::String:
- return QScript::ToUint16(((JSC::UString)d->stringValue).toDouble());
+ return QScript::ToUInt16(d->stringValue);
}
return 0;
}
@@ -1427,16 +1143,12 @@ qsreal QScriptValue::toInteger() const
switch (d->type) {
case QScriptValuePrivate::JavaScriptCore: {
JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0;
- JSC::JSValue savedException;
- QScriptValuePrivate::saveException(exec, &savedException);
- qsreal result = d->jscValue.toInteger(exec);
- QScriptValuePrivate::restoreException(exec, savedException);
- return result;
+ return QScriptEnginePrivate::toInteger(exec, d->jscValue);
}
case QScriptValuePrivate::Number:
return QScript::ToInteger(d->numberValue);
case QScriptValuePrivate::String:
- return QScript::ToInteger(((JSC::UString)d->stringValue).toDouble());
+ return QScript::ToInteger(d->stringValue);
}
return 0;
}
@@ -1469,40 +1181,10 @@ QVariant QScriptValue::toVariant() const
if (!d)
return QVariant();
switch (d->type) {
- case QScriptValuePrivate::JavaScriptCore:
- if (isObject()) {
- if (isVariant())
- return d->variantValue();
-#ifndef QT_NO_QOBJECT
- else if (isQObject())
- return qVariantFromValue(toQObject());
-#endif
- else if (isDate())
- return QVariant(toDateTime());
-#ifndef QT_NO_REGEXP
- else if (isRegExp())
- return QVariant(toRegExp());
-#endif
- else if (isArray())
- return QScriptEnginePrivate::variantListFromArray(*this);
- else if (QScriptDeclarativeClass *dc = QScriptDeclarativeClass::scriptClass(*this))
- return dc->toVariant(QScriptDeclarativeClass::object(*this));
- // try to convert to primitive
- JSC::ExecState *exec = d->engine->currentFrame;
- JSC::JSValue savedException;
- QScriptValuePrivate::saveException(exec, &savedException);
- JSC::JSValue prim = d->jscValue.toPrimitive(exec);
- QScriptValuePrivate::restoreException(exec, savedException);
- if (!prim.isObject())
- return d->engine->scriptValueFromJSCValue(prim).toVariant();
- } else if (isNumber()) {
- return QVariant(toNumber());
- } else if (isString()) {
- return QVariant(toString());
- } else if (isBool()) {
- return QVariant(toBool());
- }
- return QVariant();
+ case QScriptValuePrivate::JavaScriptCore: {
+ JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0;
+ return QScriptEnginePrivate::toVariant(exec, d->jscValue);
+ }
case QScriptValuePrivate::Number:
return QVariant(d->numberValue);
case QScriptValuePrivate::String:
@@ -1534,10 +1216,9 @@ QScriptValue QScriptValue::toObject() const
QDateTime QScriptValue::toDateTime() const
{
Q_D(const QScriptValue);
- if (!isDate())
+ if (!d || !d->engine)
return QDateTime();
- qsreal t = static_cast<JSC::DateInstance*>(JSC::asObject(d->jscValue))->internalNumber();
- return QScript::ToDateTime(t, Qt::LocalTime);
+ return QScriptEnginePrivate::toDateTime(d->engine->currentFrame, d->jscValue);
}
#ifndef QT_NO_REGEXP
@@ -1551,13 +1232,9 @@ QDateTime QScriptValue::toDateTime() const
QRegExp QScriptValue::toRegExp() const
{
Q_D(const QScriptValue);
- if (!isRegExp())
- return QRegExp();
- QString pattern = d->property(QLatin1String("source"), QScriptValue::ResolvePrototype).toString();
- Qt::CaseSensitivity kase = Qt::CaseSensitive;
- if (d->property(QLatin1String("ignoreCase"), QScriptValue::ResolvePrototype).toBool())
- kase = Qt::CaseInsensitive;
- return QRegExp(pattern, kase, QRegExp::RegExp2);
+ if (!d || !d->engine)
+ return QRegExp();
+ return QScriptEnginePrivate::toRegExp(d->engine->currentFrame, d->jscValue);
}
#endif // QT_NO_REGEXP
@@ -1574,19 +1251,9 @@ QRegExp QScriptValue::toRegExp() const
QObject *QScriptValue::toQObject() const
{
Q_D(const QScriptValue);
- if (isQObject()) {
- QScriptObject *object = static_cast<QScriptObject*>(JSC::asObject(d->jscValue));
- QScriptObjectDelegate *delegate = object->delegate();
- if (delegate->type() == QScriptObjectDelegate::DeclarativeClassObject)
- return static_cast<QScript::DeclarativeObjectDelegate*>(delegate)->scriptClass()->toQObject(QScriptDeclarativeClass::object(*this));
- return static_cast<QScript::QObjectDelegate*>(delegate)->value();
- } else if (isVariant()) {
- QVariant var = toVariant();
- int type = var.userType();
- if ((type == QMetaType::QObjectStar) || (type == QMetaType::QWidgetStar))
- return *reinterpret_cast<QObject* const *>(var.constData());
- }
- return 0;
+ if (!d || !d->engine)
+ return 0;
+ return QScriptEnginePrivate::toQObject(d->engine->currentFrame, d->jscValue);
}
/*!
@@ -1598,9 +1265,9 @@ QObject *QScriptValue::toQObject() const
const QMetaObject *QScriptValue::toQMetaObject() const
{
Q_D(const QScriptValue);
- if (isQMetaObject())
- return static_cast<QScript::QMetaObjectWrapperObject*>(JSC::asObject(d->jscValue))->value();
- return 0;
+ if (!d || !d->engine)
+ return 0;
+ return QScriptEnginePrivate::toQMetaObject(d->engine->currentFrame, d->jscValue);
}
/*!
@@ -1634,8 +1301,15 @@ void QScriptValue::setProperty(const QString &name, const QScriptValue &value,
Q_D(QScriptValue);
if (!d || !d->isObject())
return;
- JSC::ExecState *exec = d->engine->currentFrame;
- d->setProperty(JSC::Identifier(exec, name), value, flags);
+ QScriptEnginePrivate *valueEngine = QScriptValuePrivate::getEngine(value);
+ if (valueEngine && (valueEngine != d->engine)) {
+ qWarning("QScriptValue::setProperty(%s) failed: "
+ "cannot set value created in a different engine",
+ qPrintable(name));
+ return;
+ }
+ JSC::JSValue jsValue = d->engine->scriptValueToJSCValue(value);
+ d->setProperty(name, jsValue, flags);
}
/*!
@@ -1659,7 +1333,7 @@ QScriptValue QScriptValue::property(const QString &name,
Q_D(const QScriptValue);
if (!d || !d->isObject())
return QScriptValue();
- return d->property(name, mode);
+ return d->engine->scriptValueFromJSCValue(d->property(name, mode));
}
/*!
@@ -1681,7 +1355,7 @@ QScriptValue QScriptValue::property(quint32 arrayIndex,
Q_D(const QScriptValue);
if (!d || !d->isObject())
return QScriptValue();
- return d->property(arrayIndex, mode);
+ return d->engine->scriptValueFromJSCValue(d->property(arrayIndex, mode));
}
/*!
@@ -1708,33 +1382,8 @@ void QScriptValue::setProperty(quint32 arrayIndex, const QScriptValue &value,
"cannot set value created in a different engine");
return;
}
- JSC::ExecState *exec = d->engine->currentFrame;
- JSC::JSValue jscValue = d->engine->scriptValueToJSCValue(value);
- if (!jscValue) {
- JSC::asObject(d->jscValue)->deleteProperty(exec, arrayIndex, /*checkDontDelete=*/false);
- } else {
- if ((flags & QScriptValue::PropertyGetter) || (flags & QScriptValue::PropertySetter)) {
- // fall back to string-based setProperty(), since there is no
- // JSC::JSObject::defineGetter(unsigned)
- d->setProperty(JSC::Identifier::from(exec, arrayIndex), value, flags);
- } else {
- if (flags != QScriptValue::KeepExistingFlags) {
-// if (JSC::asObject(d->jscValue)->hasOwnProperty(exec, arrayIndex))
-// JSC::asObject(d->jscValue)->deleteProperty(exec, arrayIndex);
- unsigned attribs = 0;
- if (flags & QScriptValue::ReadOnly)
- attribs |= JSC::ReadOnly;
- if (flags & QScriptValue::SkipInEnumeration)
- attribs |= JSC::DontEnum;
- if (flags & QScriptValue::Undeletable)
- attribs |= JSC::DontDelete;
- attribs |= flags & QScriptValue::UserRange;
- JSC::asObject(d->jscValue)->putWithAttributes(exec, arrayIndex, jscValue, attribs);
- } else {
- JSC::asObject(d->jscValue)->put(exec, arrayIndex, jscValue);
- }
- }
- }
+ JSC::JSValue jsValue = d->engine->scriptValueToJSCValue(value);
+ d->setProperty(arrayIndex, jsValue, flags);
}
/*!
@@ -1755,7 +1404,7 @@ QScriptValue QScriptValue::property(const QScriptString &name,
Q_D(const QScriptValue);
if (!d || !d->isObject() || !QScriptStringPrivate::isValid(name))
return QScriptValue();
- return d->property(name.d_ptr->identifier, mode);
+ return d->engine->scriptValueFromJSCValue(d->property(name.d_ptr->identifier, mode));
}
/*!
@@ -1778,7 +1427,15 @@ void QScriptValue::setProperty(const QScriptString &name,
Q_D(QScriptValue);
if (!d || !d->isObject() || !QScriptStringPrivate::isValid(name))
return;
- d->setProperty(name.d_ptr->identifier, value, flags);
+ QScriptEnginePrivate *valueEngine = QScriptValuePrivate::getEngine(value);
+ if (valueEngine && (valueEngine != d->engine)) {
+ qWarning("QScriptValue::setProperty(%s) failed: "
+ "cannot set value created in a different engine",
+ qPrintable(name.toString()));
+ return;
+ }
+ JSC::JSValue jsValue = d->engine->scriptValueToJSCValue(value);
+ d->setProperty(name.d_ptr->identifier, jsValue, flags);
}
/*!
@@ -1882,12 +1539,12 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject,
JSC::ArgList jscArgs(argsVector.data(), argsVector.size());
JSC::JSValue savedException;
- QScriptValuePrivate::saveException(exec, &savedException);
+ QScriptEnginePrivate::saveException(exec, &savedException);
JSC::JSValue result = JSC::call(exec, callee, callType, callData, jscThisObject, jscArgs);
if (exec->hadException()) {
result = exec->exception();
} else {
- QScriptValuePrivate::restoreException(exec, savedException);
+ QScriptEnginePrivate::restoreException(exec, savedException);
}
return d->engine->scriptValueFromJSCValue(result);
}
@@ -1963,12 +1620,12 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject,
}
JSC::JSValue savedException;
- QScriptValuePrivate::saveException(exec, &savedException);
+ QScriptEnginePrivate::saveException(exec, &savedException);
JSC::JSValue result = JSC::call(exec, callee, callType, callData, jscThisObject, applyArgs);
if (exec->hadException()) {
result = exec->exception();
} else {
- QScriptValuePrivate::restoreException(exec, savedException);
+ QScriptEnginePrivate::restoreException(exec, savedException);
}
return d->engine->scriptValueFromJSCValue(result);
}
@@ -2015,12 +1672,12 @@ QScriptValue QScriptValue::construct(const QScriptValueList &args)
JSC::ArgList jscArgs(argsVector.data(), argsVector.size());
JSC::JSValue savedException;
- QScriptValuePrivate::saveException(exec, &savedException);
+ QScriptEnginePrivate::saveException(exec, &savedException);
JSC::JSObject *result = JSC::construct(exec, callee, constructType, constructData, jscArgs);
if (exec->hadException()) {
result = JSC::asObject(exec->exception());
} else {
- QScriptValuePrivate::restoreException(exec, savedException);
+ QScriptEnginePrivate::restoreException(exec, savedException);
}
return d->engine->scriptValueFromJSCValue(result);
}
@@ -2074,13 +1731,13 @@ QScriptValue QScriptValue::construct(const QScriptValue &arguments)
}
JSC::JSValue savedException;
- QScriptValuePrivate::saveException(exec, &savedException);
+ QScriptEnginePrivate::saveException(exec, &savedException);
JSC::JSObject *result = JSC::construct(exec, callee, constructType, constructData, applyArgs);
if (exec->hadException()) {
if (exec->exception().isObject())
result = JSC::asObject(exec->exception());
} else {
- QScriptValuePrivate::restoreException(exec, savedException);
+ QScriptEnginePrivate::restoreException(exec, savedException);
}
return d->engine->scriptValueFromJSCValue(result);
}
@@ -2229,11 +1886,9 @@ bool QScriptValue::isObject() const
bool QScriptValue::isVariant() const
{
Q_D(const QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.inherits(&QScriptObject::info))
+ if (!d || !d->isJSC())
return false;
- QScriptObject *object = static_cast<QScriptObject*>(JSC::asObject(d->jscValue));
- QScriptObjectDelegate *delegate = object->delegate();
- return (delegate && (delegate->type() == QScriptObjectDelegate::Variant));
+ return QScriptEnginePrivate::isVariant(d->jscValue);
}
/*!
@@ -2248,13 +1903,9 @@ bool QScriptValue::isVariant() const
bool QScriptValue::isQObject() const
{
Q_D(const QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.inherits(&QScriptObject::info))
+ if (!d || !d->isJSC())
return false;
- QScriptObject *object = static_cast<QScriptObject*>(JSC::asObject(d->jscValue));
- QScriptObjectDelegate *delegate = object->delegate();
- return (delegate && (delegate->type() == QScriptObjectDelegate::QtObject ||
- (delegate->type() == QScriptObjectDelegate::DeclarativeClassObject &&
- static_cast<QScript::DeclarativeObjectDelegate*>(delegate)->scriptClass()->isQObject())));
+ return QScriptEnginePrivate::isQObject(d->jscValue);
}
/*!
@@ -2266,9 +1917,9 @@ bool QScriptValue::isQObject() const
bool QScriptValue::isQMetaObject() const
{
Q_D(const QScriptValue);
- if (!d || !d->isObject())
+ if (!d || !d->isJSC())
return false;
- return JSC::asObject(d->jscValue)->inherits(&QScript::QMetaObjectWrapperObject::info);
+ return QScriptEnginePrivate::isQMetaObject(d->jscValue);
}
/*!
@@ -2299,7 +1950,7 @@ QScriptValue QScriptValue::data() const
return d->engine->scriptValueFromJSCValue(scriptObject->data());
} else {
// ### make hidden property
- return d->property(QLatin1String("__qt_data__"), QScriptValue::ResolveLocal);
+ return property(QLatin1String("__qt_data__"), QScriptValue::ResolveLocal);
}
}
diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h
index 7440d21c17..089b923468 100644
--- a/src/script/api/qscriptvalue_p.h
+++ b/src/script/api/qscriptvalue_p.h
@@ -69,9 +69,6 @@ public:
inline bool isJSC() const;
inline bool isObject() const;
- QVariant &variantValue() const;
- void setVariantValue(const QVariant &value);
-
static inline QScriptValuePrivate *get(const QScriptValue &q)
{
return q.d_ptr.data();
@@ -89,14 +86,16 @@ public:
return q.d_ptr->engine;
}
- inline QScriptValue property(const JSC::Identifier &id, int resolveMode) const;
- QScriptValue propertyHelper(const JSC::Identifier &id, int resolveMode) const;
- inline QScriptValue property(quint32 index, int resolveMode) const;
- QScriptValue propertyHelper(quint32, int resolveMode) const;
- inline QScriptValue property(const QString &, int resolveMode) const;
- void setProperty(const JSC::Identifier &id, const QScriptValue &value,
- const QScriptValue::PropertyFlags &flags);
- QScriptValue::PropertyFlags propertyFlags(
+ inline JSC::JSValue property(const JSC::Identifier &id, int resolveMode) const;
+ inline JSC::JSValue property(quint32 index, int resolveMode) const;
+ inline JSC::JSValue property(const JSC::UString &, int resolveMode) const;
+ inline void setProperty(const JSC::UString &name, const JSC::JSValue &value,
+ const QScriptValue::PropertyFlags &flags);
+ inline void setProperty(const JSC::Identifier &id, const JSC::JSValue &value,
+ const QScriptValue::PropertyFlags &flags);
+ inline void setProperty(quint32 index, const JSC::JSValue &value,
+ const QScriptValue::PropertyFlags &flags);
+ inline QScriptValue::PropertyFlags propertyFlags(
const JSC::Identifier &id, const QScriptValue::ResolveFlags &mode) const;
void detachFromEngine();
@@ -109,9 +108,6 @@ public:
return -1;
}
- static inline void saveException(JSC::ExecState*, JSC::JSValue*);
- static inline void restoreException(JSC::ExecState*, JSC::JSValue);
-
QScriptEnginePrivate *engine;
Type type;
JSC::JSValue jscValue;
diff --git a/src/script/bridge/qscriptclassobject.cpp b/src/script/bridge/qscriptclassobject.cpp
index a3dd2396a3..ce0a08e68a 100644
--- a/src/script/bridge/qscriptclassobject.cpp
+++ b/src/script/bridge/qscriptclassobject.cpp
@@ -206,7 +206,7 @@ JSC::JSValue JSC_HOST_CALL ClassObjectDelegate::call(JSC::ExecState *exec, JSC::
QVariant result = scriptClass->extension(QScriptClass::Callable, qVariantFromValue(ctx));
eng_p->popContext();
eng_p->currentFrame = oldFrame;
- return eng_p->jscValueFromVariant(result);
+ return QScriptEnginePrivate::jscValueFromVariant(exec, result);
}
JSC::ConstructType ClassObjectDelegate::getConstructData(QScriptObject*, JSC::ConstructData &constructData)
diff --git a/src/script/bridge/qscriptdeclarativeclass.cpp b/src/script/bridge/qscriptdeclarativeclass.cpp
index 24037e1fc8..1d11ede215 100644
--- a/src/script/bridge/qscriptdeclarativeclass.cpp
+++ b/src/script/bridge/qscriptdeclarativeclass.cpp
@@ -35,7 +35,113 @@
QT_BEGIN_NAMESPACE
+/*!
+\class QScriptDeclarativeClass::Value
+\internal
+\brief The QScriptDeclarativeClass::Value class acts as a container for JavaScript data types.
+
+QScriptDeclarativeClass::Value class is similar to QScriptValue, but it is slightly faster.
+Unlike QScriptValue, however, Value instances cannot be stored as they may not survive garbage
+collection. If you need to store a Value, convert it to a QScriptValue and store that.
+*/
+
+QScriptDeclarativeClass::Value::Value()
+{
+ new (this) JSC::JSValue(JSC::jsUndefined());
+}
+
+QScriptDeclarativeClass::Value::Value(const Value &other)
+{
+ new (this) JSC::JSValue((JSC::JSValue &)other);
+}
+
+static QScriptDeclarativeClass::Value jscToValue(const JSC::JSValue &val)
+{
+ return QScriptDeclarativeClass::Value((QScriptDeclarativeClass::Value &)val);
+}
+
+QScriptDeclarativeClass::Value::Value(QScriptContext *ctxt, int value)
+{
+ new (this) JSC::JSValue(QScriptEnginePrivate::frameForContext(ctxt), value);
+}
+
+QScriptDeclarativeClass::Value::Value(QScriptContext *ctxt, uint value)
+{
+ new (this) JSC::JSValue(QScriptEnginePrivate::frameForContext(ctxt), value);
+}
+
+QScriptDeclarativeClass::Value::Value(QScriptContext *ctxt, bool value)
+{
+ new (this) JSC::JSValue(QScriptEnginePrivate::frameForContext(ctxt), value);
+}
+
+QScriptDeclarativeClass::Value::Value(QScriptContext *ctxt, double value)
+{
+ new (this) JSC::JSValue(QScriptEnginePrivate::frameForContext(ctxt), value);
+}
+
+QScriptDeclarativeClass::Value::Value(QScriptContext *ctxt, float value)
+{
+ new (this) JSC::JSValue(QScriptEnginePrivate::frameForContext(ctxt), value);
+}
+
+QScriptDeclarativeClass::Value::Value(QScriptContext *ctxt, const QString &value)
+{
+ new (this) JSC::JSValue(JSC::jsString(QScriptEnginePrivate::frameForContext(ctxt), value));
+}
+
+QScriptDeclarativeClass::Value::Value(QScriptContext *ctxt, const QScriptValue &value)
+{
+ new (this) JSC::JSValue(QScriptEnginePrivate::get(ctxt->engine())->scriptValueToJSCValue(value));
+}
+
+QScriptDeclarativeClass::Value::Value(QScriptEngine *eng, int value)
+{
+ new (this) JSC::JSValue(QScriptEnginePrivate::get(eng)->currentFrame, value);
+}
+
+QScriptDeclarativeClass::Value::Value(QScriptEngine *eng, uint value)
+{
+ new (this) JSC::JSValue(QScriptEnginePrivate::get(eng)->currentFrame, value);
+}
+
+QScriptDeclarativeClass::Value::Value(QScriptEngine *eng, bool value)
+{
+ new (this) JSC::JSValue(QScriptEnginePrivate::get(eng)->currentFrame, value);
+}
+
+QScriptDeclarativeClass::Value::Value(QScriptEngine *eng, double value)
+{
+ new (this) JSC::JSValue(QScriptEnginePrivate::get(eng)->currentFrame, value);
+}
+
+QScriptDeclarativeClass::Value::Value(QScriptEngine *eng, float value)
+{
+ new (this) JSC::JSValue(QScriptEnginePrivate::get(eng)->currentFrame, value);
+}
+
+QScriptDeclarativeClass::Value::Value(QScriptEngine *eng, const QString &value)
+{
+ new (this) JSC::JSValue(JSC::jsString(QScriptEnginePrivate::get(eng)->currentFrame, value));
+}
+
+QScriptDeclarativeClass::Value::Value(QScriptEngine *eng, const QScriptValue &value)
+{
+ new (this) JSC::JSValue(QScriptEnginePrivate::get(eng)->scriptValueToJSCValue(value));
+}
+
+QScriptDeclarativeClass::Value::~Value()
+{
+ ((JSC::JSValue *)(this))->~JSValue();
+}
+
+QScriptValue QScriptDeclarativeClass::Value::toScriptValue(QScriptEngine *engine) const
+{
+ return QScriptEnginePrivate::get(engine)->scriptValueFromJSCValue((JSC::JSValue &)*this);
+}
+
QScriptDeclarativeClass::PersistentIdentifier::PersistentIdentifier()
+: identifier(0)
{
new (&d) JSC::Identifier();
}
@@ -82,28 +188,36 @@ QScriptValue QScriptDeclarativeClass::newObject(QScriptEngine *engine,
return p->scriptValueFromJSCValue(result);
}
+QScriptDeclarativeClass::Value
+QScriptDeclarativeClass::newObjectValue(QScriptEngine *engine,
+ QScriptDeclarativeClass *scriptClass,
+ Object *object)
+{
+ Q_ASSERT(engine);
+ Q_ASSERT(scriptClass);
+
+ QScriptEnginePrivate *p = static_cast<QScriptEnginePrivate *>(QObjectPrivate::get(engine));
+
+ JSC::ExecState* exec = p->currentFrame;
+ QScriptObject *result = new (exec) QScriptObject(p->scriptObjectStructure);
+ result->setDelegate(new QScript::DeclarativeObjectDelegate(scriptClass, object));
+ return jscToValue(JSC::JSValue(result));
+}
+
QScriptDeclarativeClass *QScriptDeclarativeClass::scriptClass(const QScriptValue &v)
{
QScriptValuePrivate *d = QScriptValuePrivate::get(v);
- if (!d || !d->isJSC() || !d->jscValue.inherits(&QScriptObject::info))
- return 0;
- QScriptObject *scriptObject = static_cast<QScriptObject*>(JSC::asObject(d->jscValue));
- QScriptObjectDelegate *delegate = scriptObject->delegate();
- if (!delegate || (delegate->type() != QScriptObjectDelegate::DeclarativeClassObject))
+ if (!d || !d->isJSC())
return 0;
- return static_cast<QScript::DeclarativeObjectDelegate*>(delegate)->scriptClass();
+ return QScriptEnginePrivate::declarativeClass(d->jscValue);
}
QScriptDeclarativeClass::Object *QScriptDeclarativeClass::object(const QScriptValue &v)
{
QScriptValuePrivate *d = QScriptValuePrivate::get(v);
- if (!d || !d->isJSC() || !d->jscValue.inherits(&QScriptObject::info))
+ if (!d || !d->isJSC())
return 0;
- QScriptObject *scriptObject = static_cast<QScriptObject*>(JSC::asObject(d->jscValue));
- QScriptObjectDelegate *delegate = scriptObject->delegate();
- if (!delegate || (delegate->type() != QScriptObjectDelegate::DeclarativeClassObject))
- return 0;
- return static_cast<QScript::DeclarativeObjectDelegate*>(delegate)->object();
+ return QScriptEnginePrivate::declarativeObject(d->jscValue);
}
QScriptValue QScriptDeclarativeClass::function(const QScriptValue &v, const Identifier &name)
@@ -151,6 +265,53 @@ QScriptValue QScriptDeclarativeClass::property(const QScriptValue &v, const Iden
return QScriptValue();
}
+QScriptDeclarativeClass::Value
+QScriptDeclarativeClass::functionValue(const QScriptValue &v, const Identifier &name)
+{
+ QScriptValuePrivate *d = QScriptValuePrivate::get(v);
+
+ if (!d->isObject())
+ return Value();
+
+ JSC::ExecState *exec = d->engine->currentFrame;
+ JSC::JSObject *object = d->jscValue.getObject();
+ JSC::PropertySlot slot(const_cast<JSC::JSObject*>(object));
+ JSC::JSValue result;
+
+ JSC::Identifier id(exec, (JSC::UString::Rep *)name);
+
+ if (const_cast<JSC::JSObject*>(object)->getOwnPropertySlot(exec, id, slot)) {
+ result = slot.getValue(exec, id);
+ if (QScript::isFunction(result))
+ return jscToValue(result);
+ }
+
+ return Value();
+}
+
+QScriptDeclarativeClass::Value
+QScriptDeclarativeClass::propertyValue(const QScriptValue &v, const Identifier &name)
+{
+ QScriptValuePrivate *d = QScriptValuePrivate::get(v);
+
+ if (!d->isObject())
+ return Value();
+
+ JSC::ExecState *exec = d->engine->currentFrame;
+ JSC::JSObject *object = d->jscValue.getObject();
+ JSC::PropertySlot slot(const_cast<JSC::JSObject*>(object));
+ JSC::JSValue result;
+
+ JSC::Identifier id(exec, (JSC::UString::Rep *)name);
+
+ if (const_cast<JSC::JSObject*>(object)->getOwnPropertySlot(exec, id, slot)) {
+ result = slot.getValue(exec, id);
+ return jscToValue(result);
+ }
+
+ return Value();
+}
+
/*
Returns the scope chain entry at \a index. If index is less than 0, returns
entries starting at the end. For example, scopeChainValue(context, -1) will return
@@ -241,6 +402,16 @@ QScriptEngine *QScriptDeclarativeClass::engine() const
return d_ptr->engine;
}
+bool QScriptDeclarativeClass::supportsCall() const
+{
+ return d_ptr->supportsCall;
+}
+
+void QScriptDeclarativeClass::setSupportsCall(bool c)
+{
+ d_ptr->supportsCall = c;
+}
+
QScriptDeclarativeClass::PersistentIdentifier
QScriptDeclarativeClass::createPersistentIdentifier(const QString &str)
{
@@ -290,11 +461,12 @@ QScriptDeclarativeClass::queryProperty(Object *object, const Identifier &name,
return 0;
}
-QScriptValue QScriptDeclarativeClass::property(Object *object, const Identifier &name)
+QScriptDeclarativeClass::Value
+QScriptDeclarativeClass::property(Object *object, const Identifier &name)
{
Q_UNUSED(object);
Q_UNUSED(name);
- return QScriptValue();
+ return Value();
}
void QScriptDeclarativeClass::setProperty(Object *object, const Identifier &name,
@@ -313,6 +485,14 @@ QScriptDeclarativeClass::propertyFlags(Object *object, const Identifier &name)
return 0;
}
+QScriptDeclarativeClass::Value QScriptDeclarativeClass::call(Object *object,
+ QScriptContext *ctxt)
+{
+ Q_UNUSED(object);
+ Q_UNUSED(ctxt);
+ return Value();
+}
+
QStringList QScriptDeclarativeClass::propertyNames(Object *object)
{
Q_UNUSED(object);
diff --git a/src/script/bridge/qscriptdeclarativeclass_p.h b/src/script/bridge/qscriptdeclarativeclass_p.h
index d28a37171a..a0fd6d5027 100644
--- a/src/script/bridge/qscriptdeclarativeclass_p.h
+++ b/src/script/bridge/qscriptdeclarativeclass_p.h
@@ -47,16 +47,47 @@ class QScriptContext;
class Q_SCRIPT_EXPORT QScriptDeclarativeClass
{
public:
+#define QT_HAVE_QSCRIPTDECLARATIVECLASS_VALUE
+ class Q_SCRIPT_EXPORT Value
+ {
+ public:
+ Value();
+ Value(const Value &);
+
+ Value(QScriptContext *, int);
+ Value(QScriptContext *, uint);
+ Value(QScriptContext *, bool);
+ Value(QScriptContext *, double);
+ Value(QScriptContext *, float);
+ Value(QScriptContext *, const QString &);
+ Value(QScriptContext *, const QScriptValue &);
+ Value(QScriptEngine *, int);
+ Value(QScriptEngine *, uint);
+ Value(QScriptEngine *, bool);
+ Value(QScriptEngine *, double);
+ Value(QScriptEngine *, float);
+ Value(QScriptEngine *, const QString &);
+ Value(QScriptEngine *, const QScriptValue &);
+ ~Value();
+
+ QScriptValue toScriptValue(QScriptEngine *) const;
+ private:
+ char dummy[8];
+ };
+
typedef void* Identifier;
struct Object { virtual ~Object() {} };
static QScriptValue newObject(QScriptEngine *, QScriptDeclarativeClass *, Object *);
+ static Value newObjectValue(QScriptEngine *, QScriptDeclarativeClass *, Object *);
static QScriptDeclarativeClass *scriptClass(const QScriptValue &);
static Object *object(const QScriptValue &);
static QScriptValue function(const QScriptValue &, const Identifier &);
static QScriptValue property(const QScriptValue &, const Identifier &);
+ static Value functionValue(const QScriptValue &, const Identifier &);
+ static Value propertyValue(const QScriptValue &, const Identifier &);
static QScriptValue scopeChainValue(QScriptContext *, int index);
static QScriptContext *pushCleanContext(QScriptEngine *);
@@ -82,6 +113,9 @@ public:
QScriptEngine *engine() const;
+ bool supportsCall() const;
+ void setSupportsCall(bool);
+
PersistentIdentifier createPersistentIdentifier(const QString &);
PersistentIdentifier createPersistentIdentifier(const Identifier &);
@@ -91,9 +125,10 @@ public:
virtual QScriptClass::QueryFlags queryProperty(Object *, const Identifier &,
QScriptClass::QueryFlags flags);
- virtual QScriptValue property(Object *, const Identifier &);
+ virtual Value property(Object *, const Identifier &);
virtual void setProperty(Object *, const Identifier &name, const QScriptValue &);
virtual QScriptValue::PropertyFlags propertyFlags(Object *, const Identifier &);
+ virtual Value call(Object *, QScriptContext *);
virtual QStringList propertyNames(Object *);
diff --git a/src/script/bridge/qscriptdeclarativeobject.cpp b/src/script/bridge/qscriptdeclarativeobject.cpp
index aecb09ad1c..c6ab6a7c22 100644
--- a/src/script/bridge/qscriptdeclarativeobject.cpp
+++ b/src/script/bridge/qscriptdeclarativeobject.cpp
@@ -74,9 +74,9 @@ bool DeclarativeObjectDelegate::getOwnPropertySlot(QScriptObject* object,
QScriptClass::QueryFlags flags =
m_class->queryProperty(m_object, identifier, QScriptClass::HandlesReadAccess);
if (flags & QScriptClass::HandlesReadAccess) {
- QScriptValue value = m_class->property(m_object, identifier);
+ QScriptDeclarativeClass::Value val = m_class->property(m_object, identifier);
p->context = 0;
- slot.setValue(engine->scriptValueToJSCValue(value));
+ slot.setValue((const JSC::JSValue &)val);
return true;
}
p->context = 0;
@@ -155,7 +155,36 @@ void DeclarativeObjectDelegate::getOwnPropertyNames(QScriptObject* object, JSC::
JSC::CallType DeclarativeObjectDelegate::getCallData(QScriptObject *object, JSC::CallData &callData)
{
- return QScriptObjectDelegate::getCallData(object, callData);
+ if (!QScriptDeclarativeClassPrivate::get(m_class)->supportsCall)
+ return JSC::CallTypeNone;
+ callData.native.function = call;
+ return JSC::CallTypeHost;
+}
+
+JSC::JSValue DeclarativeObjectDelegate::call(JSC::ExecState *exec, JSC::JSObject *callee,
+ JSC::JSValue thisValue, const JSC::ArgList &args)
+{
+ if (!callee->inherits(&QScriptObject::info))
+ return JSC::throwError(exec, JSC::TypeError, "callee is not a DeclarativeObject object");
+ QScriptObject *obj = static_cast<QScriptObject*>(callee);
+ QScriptObjectDelegate *delegate = obj->delegate();
+ if (!delegate || (delegate->type() != QScriptObjectDelegate::DeclarativeClassObject))
+ return JSC::throwError(exec, JSC::TypeError, "callee is not a DeclarativeObject object");
+
+ QScriptDeclarativeClass *scriptClass = static_cast<DeclarativeObjectDelegate*>(delegate)->m_class;
+ QScriptEnginePrivate *eng_p = scriptEngineFromExec(exec);
+
+ JSC::ExecState *oldFrame = eng_p->currentFrame;
+ eng_p->pushContext(exec, thisValue, args, callee);
+ QScriptContext *ctxt = eng_p->contextForFrame(eng_p->currentFrame);
+
+ QScriptValue scriptObject = eng_p->scriptValueFromJSCValue(obj);
+ QScriptDeclarativeClass::Value result =
+ scriptClass->call(static_cast<DeclarativeObjectDelegate*>(delegate)->m_object, ctxt);
+
+ eng_p->popContext();
+ eng_p->currentFrame = oldFrame;
+ return (JSC::JSValue &)(result);
}
JSC::ConstructType DeclarativeObjectDelegate::getConstructData(QScriptObject* object, JSC::ConstructData &constructData)
diff --git a/src/script/bridge/qscriptdeclarativeobject_p.h b/src/script/bridge/qscriptdeclarativeobject_p.h
index d5bf673fff..ec8a43ef32 100644
--- a/src/script/bridge/qscriptdeclarativeobject_p.h
+++ b/src/script/bridge/qscriptdeclarativeobject_p.h
@@ -48,11 +48,12 @@ class QScriptClass;
class QScriptDeclarativeClassPrivate
{
public:
- QScriptDeclarativeClassPrivate() : engine(0), q_ptr(0), context(0) {}
+ QScriptDeclarativeClassPrivate() : engine(0), q_ptr(0), context(0), supportsCall(false) {}
QScriptEngine *engine;
QScriptDeclarativeClass *q_ptr;
QScriptContext *context;
+ bool supportsCall:1;
static QScriptDeclarativeClassPrivate *get(QScriptDeclarativeClass *c) {
return c->d_ptr.data();
@@ -90,6 +91,9 @@ public:
bool includeNonEnumerable = false);
virtual JSC::CallType getCallData(QScriptObject*, JSC::CallData&);
+ static JSC::JSValue JSC_HOST_CALL call(JSC::ExecState*, JSC::JSObject*,
+ JSC::JSValue, const JSC::ArgList&);
+
virtual JSC::ConstructType getConstructData(QScriptObject*, JSC::ConstructData&);
virtual bool hasInstance(QScriptObject*, JSC::ExecState*,
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp
index db312bc57d..6c401f8eed 100644
--- a/src/script/bridge/qscriptqobject.cpp
+++ b/src/script/bridge/qscriptqobject.cpp
@@ -163,23 +163,51 @@ static bool isEnumerableMetaProperty(const QMetaProperty &prop,
&& (mo->indexOfProperty(prop.name()) == index);
}
-static inline QByteArray methodName(const QMetaMethod &method)
+/*! \internal
+ Calculates the length of the name of the given \a method by looking
+ for the first '(' character.
+*/
+static inline int methodNameLength(const QMetaMethod &method)
{
- QByteArray signature = method.signature();
- return signature.left(signature.indexOf('('));
+ const char *signature = method.signature();
+ const char *s = signature;
+ while (*s && (*s != '('))
+ ++s;
+ return s - signature;
}
-static QVariant variantFromValue(QScriptEnginePrivate *eng,
- int targetType, const QScriptValue &value)
+/*! \internal
+ Makes a deep copy of the first \a nameLength characters of the given
+ method \a signature and returns the copy.
+*/
+static inline QByteArray methodName(const char *signature, int nameLength)
+{
+ return QByteArray(signature, nameLength);
+}
+
+/*! \internal
+
+ Returns true if the name of the given \a method is the same as that
+ specified by the (signature, nameLength) pair, otherwise returns
+ false.
+*/
+static inline bool methodNameEquals(const QMetaMethod &method,
+ const char *signature, int nameLength)
+{
+ const char *otherSignature = method.signature();
+ return !qstrncmp(otherSignature, signature, nameLength)
+ && (otherSignature[nameLength] == '(');
+}
+
+static QVariant variantFromValue(JSC::ExecState *exec, int targetType, JSC::JSValue value)
{
QVariant v(targetType, (void *)0);
- Q_ASSERT(eng);
- if (QScriptEnginePrivate::convert(value, targetType, v.data(), eng))
+ if (QScriptEnginePrivate::convertValue(exec, value, targetType, v.data()))
return v;
if (uint(targetType) == QVariant::LastType)
- return value.toVariant();
- if (value.isVariant()) {
- v = value.toVariant();
+ return QScriptEnginePrivate::toVariant(exec, value);
+ if (QScriptEnginePrivate::isVariant(value)) {
+ v = QScriptEnginePrivate::variantValue(value);
if (v.canConvert(QVariant::Type(targetType))) {
v.convert(QVariant::Type(targetType));
return v;
@@ -312,25 +340,16 @@ QList<int> QScript::QtFunction::overloadedIndexes() const
if (!maybeOverloaded())
return QList<int>();
QList<int> result;
- QString name = functionName();
const QMetaObject *meta = metaObject();
+ QMetaMethod method = meta->method(initialIndex());
+ int nameLength = methodNameLength(method);
for (int index = mostGeneralMethod() - 1; index >= 0; --index) {
- QString otherName = QString::fromLatin1(methodName(meta->method(index)));
- if (otherName == name)
+ if (methodNameEquals(meta->method(index), method.signature(), nameLength))
result.append(index);
}
return result;
}
-QString QtFunction::functionName() const
-{
- const QMetaObject *meta = metaObject();
- if (!meta)
- return QString();
- QMetaMethod method = meta->method(initialIndex());
- return QLatin1String(methodName(method));
-}
-
class QScriptMetaType
{
public:
@@ -417,8 +436,8 @@ class QScriptMetaMethod
public:
inline QScriptMetaMethod()
{ }
- inline QScriptMetaMethod(const QByteArray &name, const QVector<QScriptMetaType> &types)
- : m_name(name), m_types(types), m_firstUnresolvedIndex(-1)
+ inline QScriptMetaMethod(const QVector<QScriptMetaType> &types)
+ : m_types(types), m_firstUnresolvedIndex(-1)
{
QVector<QScriptMetaType>::const_iterator it;
for (it = m_types.constBegin(); it != m_types.constEnd(); ++it) {
@@ -431,9 +450,6 @@ public:
inline bool isValid() const
{ return !m_types.isEmpty(); }
- QByteArray name() const
- { return m_name; }
-
inline QScriptMetaType returnType() const
{ return m_types.at(0); }
@@ -462,7 +478,6 @@ public:
{ return m_types; }
private:
- QByteArray m_name;
QVector<QScriptMetaType> m_types;
int m_firstUnresolvedIndex;
};
@@ -499,7 +514,6 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c
const QMetaObject *meta, int initialIndex,
bool maybeOverloaded)
{
- QByteArray funName;
QScriptMetaMethod chosenMethod;
int chosenIndex = -1;
QVarLengthArray<QVariant, 9> args;
@@ -508,15 +522,18 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c
QVector<int> tooFewArgs;
QVector<int> conversionFailed;
int index;
+ int nameLength = 0;
+ const char *initialMethodSignature = 0;
exec->clearException();
QScriptEnginePrivate *engine = QScript::scriptEngineFromExec(exec);
for (index = initialIndex; index >= 0; --index) {
QMetaMethod method = metaMethod(meta, callType, index);
- if (index == initialIndex)
- funName = methodName(method);
- else {
- if (methodName(method) != funName)
+ if (index == initialIndex) {
+ initialMethodSignature = method.signature();
+ nameLength = methodNameLength(method);
+ } else {
+ if (!methodNameEquals(method, initialMethodSignature, nameLength))
continue;
}
@@ -525,19 +542,15 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c
QByteArray returnTypeName = method.typeName();
int rtype = QMetaType::type(returnTypeName);
if ((rtype == 0) && !returnTypeName.isEmpty()) {
- if (returnTypeName == "QVariant") {
- types.append(QScriptMetaType::variant());
- } else {
- int enumIndex = indexOfMetaEnum(meta, returnTypeName);
- if (enumIndex != -1)
- types.append(QScriptMetaType::metaEnum(enumIndex, returnTypeName));
- else
- types.append(QScriptMetaType::unresolved(returnTypeName));
- }
+ int enumIndex = indexOfMetaEnum(meta, returnTypeName);
+ if (enumIndex != -1)
+ types.append(QScriptMetaType::metaEnum(enumIndex, returnTypeName));
+ else
+ types.append(QScriptMetaType::unresolved(returnTypeName));
} else {
if (callType == QMetaMethod::Constructor)
types.append(QScriptMetaType::metaType(QMetaType::QObjectStar, "QObject*"));
- else if (returnTypeName == "QVariant")
+ else if (rtype == QMetaType::QVariant)
types.append(QScriptMetaType::variant());
else
types.append(QScriptMetaType::metaType(rtype, returnTypeName));
@@ -549,24 +562,19 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c
QByteArray argTypeName = parameterTypeNames.at(i);
int atype = QMetaType::type(argTypeName);
if (atype == 0) {
- if (argTypeName == "QVariant") {
- types.append(QScriptMetaType::variant());
- } else {
- int enumIndex = indexOfMetaEnum(meta, argTypeName);
- if (enumIndex != -1)
- types.append(QScriptMetaType::metaEnum(enumIndex, argTypeName));
- else
- types.append(QScriptMetaType::unresolved(argTypeName));
- }
- } else {
- if (argTypeName == "QVariant")
- types.append(QScriptMetaType::variant());
+ int enumIndex = indexOfMetaEnum(meta, argTypeName);
+ if (enumIndex != -1)
+ types.append(QScriptMetaType::metaEnum(enumIndex, argTypeName));
else
- types.append(QScriptMetaType::metaType(atype, argTypeName));
+ types.append(QScriptMetaType::unresolved(argTypeName));
+ } else if (atype == QMetaType::QVariant) {
+ types.append(QScriptMetaType::variant());
+ } else {
+ types.append(QScriptMetaType::metaType(atype, argTypeName));
}
}
- QScriptMetaMethod mtd = QScriptMetaMethod(methodName(method), types);
+ QScriptMetaMethod mtd = QScriptMetaMethod(types);
if (int(scriptArgs.size()) < mtd.argumentCount()) {
tooFewArgs.append(index);
@@ -591,38 +599,38 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c
bool converted = true;
int matchDistance = 0;
for (int i = 0; converted && i < mtd.argumentCount(); ++i) {
- QScriptValue actual;
+ JSC::JSValue actual;
if (i < (int)scriptArgs.size())
- actual = engine->scriptValueFromJSCValue(scriptArgs.at(i));
+ actual = scriptArgs.at(i);
else
- actual = QScriptValue(QScriptValue::UndefinedValue);
+ actual = JSC::jsUndefined();
QScriptMetaType argType = mtd.argumentType(i);
int tid = -1;
QVariant v;
if (argType.isUnresolved()) {
v = QVariant(QMetaType::QObjectStar, (void *)0);
- converted = engine->convertToNativeQObject(
- actual, argType.name(), reinterpret_cast<void* *>(v.data()));
+ converted = QScriptEnginePrivate::convertToNativeQObject(
+ exec, actual, argType.name(), reinterpret_cast<void* *>(v.data()));
} else if (argType.isVariant()) {
- if (actual.isVariant()) {
- v = actual.toVariant();
+ if (QScriptEnginePrivate::isVariant(actual)) {
+ v = QScriptEnginePrivate::variantValue(actual);
} else {
- v = actual.toVariant();
+ v = QScriptEnginePrivate::toVariant(exec, actual);
converted = v.isValid() || actual.isUndefined() || actual.isNull();
}
} else {
tid = argType.typeId();
v = QVariant(tid, (void *)0);
- converted = QScriptEnginePrivate::convert(actual, tid, v.data(), engine);
+ converted = QScriptEnginePrivate::convertValue(exec, actual, tid, v.data());
if (exec->hadException())
return exec->exception();
}
if (!converted) {
- if (actual.isVariant()) {
+ if (QScriptEnginePrivate::isVariant(actual)) {
if (tid == -1)
tid = argType.typeId();
- QVariant vv = actual.toVariant();
+ QVariant vv = QScriptEnginePrivate::variantValue(actual);
if (vv.canConvert(QVariant::Type(tid))) {
v = vv;
converted = v.convert(QVariant::Type(tid));
@@ -649,15 +657,15 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c
}
if (m.isValid()) {
if (actual.isNumber()) {
- int ival = actual.toInt32();
+ int ival = QScriptEnginePrivate::toInt32(exec, actual);
if (m.valueToKey(ival) != 0) {
qVariantSetValue(v, ival);
converted = true;
matchDistance += 10;
}
} else {
- QString sval = actual.toString();
- int ival = m.keyToValue(sval.toLatin1());
+ JSC::UString sval = QScriptEnginePrivate::toString(exec, actual);
+ int ival = m.keyToValue(convertToLatin1(sval));
if (ival != -1) {
qVariantSetValue(v, ival);
converted = true;
@@ -718,7 +726,7 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c
matchDistance += 10;
break;
}
- } else if (actual.isDate()) {
+ } else if (QScriptEnginePrivate::isDate(actual)) {
switch (tid) {
case QMetaType::QDateTime:
// perfect
@@ -733,7 +741,7 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c
matchDistance += 10;
break;
}
- } else if (actual.isRegExp()) {
+ } else if (QScriptEnginePrivate::isRegExp(actual)) {
switch (tid) {
case QMetaType::QRegExp:
// perfect
@@ -742,14 +750,14 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c
matchDistance += 10;
break;
}
- } else if (actual.isVariant()) {
+ } else if (QScriptEnginePrivate::isVariant(actual)) {
if (argType.isVariant()
- || (actual.toVariant().userType() == tid)) {
+ || (QScriptEnginePrivate::toVariant(exec, actual).userType() == tid)) {
// perfect
} else {
matchDistance += 10;
}
- } else if (actual.isArray()) {
+ } else if (QScriptEnginePrivate::isArray(actual)) {
switch (tid) {
case QMetaType::QStringList:
case QMetaType::QVariantList:
@@ -759,7 +767,7 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c
matchDistance += 10;
break;
}
- } else if (actual.isQObject()) {
+ } else if (QScriptEnginePrivate::isQObject(actual)) {
switch (tid) {
case QMetaType::QObjectStar:
case QMetaType::QWidgetStar:
@@ -841,9 +849,10 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c
//#ifndef Q_SCRIPT_NO_EVENT_NOTIFY
// engine->notifyFunctionEntry(context);
//#endif
+ QString funName = QString::fromLatin1(methodName(initialMethodSignature, nameLength));
if (!conversionFailed.isEmpty()) {
QString message = QString::fromLatin1("incompatible type of argument(s) in call to %0(); candidates were\n")
- .arg(QLatin1String(funName));
+ .arg(funName);
for (int i = 0; i < conversionFailed.size(); ++i) {
if (i > 0)
message += QLatin1String("\n");
@@ -858,7 +867,7 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c
QScriptMetaType unresolvedType = argsInstance.method.type(unresolvedIndex);
QString unresolvedTypeName = QString::fromLatin1(unresolvedType.name());
QString message = QString::fromLatin1("cannot call %0(): ")
- .arg(QString::fromLatin1(funName));
+ .arg(funName);
if (unresolvedIndex > 0) {
message.append(QString::fromLatin1("argument %0 has unknown type `%1'").
arg(unresolvedIndex).arg(unresolvedTypeName));
@@ -870,7 +879,7 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c
result = JSC::throwError(exec, JSC::TypeError, message);
} else {
QString message = QString::fromLatin1("too few arguments in call to %0(); candidates are\n")
- .arg(QLatin1String(funName));
+ .arg(funName);
for (int i = 0; i < tooFewArgs.size(); ++i) {
if (i > 0)
message += QLatin1String("\n");
@@ -886,6 +895,7 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c
&& (metaArgs.args.count() == candidates.at(1).args.count())
&& (metaArgs.matchDistance == candidates.at(1).matchDistance)) {
// ambiguous call
+ QByteArray funName = methodName(initialMethodSignature, nameLength);
QString message = QString::fromLatin1("ambiguous call of overloaded function %0(); candidates were\n")
.arg(QLatin1String(funName));
for (int i = 0; i < candidates.size(); ++i) {
@@ -953,13 +963,11 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c
} else {
QScriptMetaType retType = chosenMethod.returnType();
if (retType.isVariant()) {
- result = engine->jscValueFromVariant(*(QVariant *)params[0]);
+ result = QScriptEnginePrivate::jscValueFromVariant(exec, *(QVariant *)params[0]);
} else if (retType.typeId() != 0) {
- result = engine->scriptValueToJSCValue(engine->create(retType.typeId(), params[0]));
- if (!result) {
- QScriptValue sv = QScriptEnginePrivate::get(engine)->newVariant(QVariant(retType.typeId(), params[0]));
- result = engine->scriptValueToJSCValue(sv);
- }
+ result = QScriptEnginePrivate::create(exec, retType.typeId(), params[0]);
+ if (!result)
+ result = engine->newVariant(QVariant(retType.typeId(), params[0]));
} else {
result = JSC::jsUndefined();
}
@@ -1049,14 +1057,7 @@ JSC::JSValue JSC_HOST_CALL QtPropertyFunction::call(
if (!callee->inherits(&QtPropertyFunction::info))
return throwError(exec, JSC::TypeError, "callee is not a QtPropertyFunction object");
QtPropertyFunction *qfun = static_cast<QtPropertyFunction*>(callee);
- QScriptEnginePrivate *eng_p = scriptEngineFromExec(exec);
- JSC::ExecState *previousFrame = eng_p->currentFrame;
- eng_p->currentFrame = exec;
- eng_p->pushContext(exec, thisValue, args, callee);
- JSC::JSValue result = qfun->execute(eng_p->currentFrame, thisValue, args);
- eng_p->popContext();
- eng_p->currentFrame = previousFrame;
- return result;
+ return qfun->execute(exec, thisValue, args);
}
JSC::JSValue QtPropertyFunction::execute(JSC::ExecState *exec,
@@ -1065,15 +1066,16 @@ JSC::JSValue QtPropertyFunction::execute(JSC::ExecState *exec,
{
JSC::JSValue result = JSC::jsUndefined();
- // ### don't go via QScriptValue
QScriptEnginePrivate *engine = scriptEngineFromExec(exec);
- thisValue = engine->toUsableValue(thisValue);
- QScriptValue object = engine->scriptValueFromJSCValue(thisValue);
- QObject *qobject = object.toQObject();
+ JSC::ExecState *previousFrame = engine->currentFrame;
+ engine->currentFrame = exec;
+
+ JSC::JSValue qobjectValue = engine->toUsableValue(thisValue);
+ QObject *qobject = QScriptEnginePrivate::toQObject(exec, qobjectValue);
while ((!qobject || (qobject->metaObject() != data->meta))
- && object.prototype().isObject()) {
- object = object.prototype();
- qobject = object.toQObject();
+ && JSC::asObject(qobjectValue)->prototype().isObject()) {
+ qobjectValue = JSC::asObject(qobjectValue)->prototype();
+ qobject = QScriptEnginePrivate::toQObject(exec, qobjectValue);
}
Q_ASSERT_X(qobject, Q_FUNC_INFO, "this-object must be a QObject");
@@ -1085,16 +1087,19 @@ JSC::JSValue QtPropertyFunction::execute(JSC::ExecState *exec,
QScriptable *scriptable = scriptableFromQObject(qobject);
QScriptEngine *oldEngine = 0;
if (scriptable) {
+ engine->pushContext(exec, thisValue, args, this);
oldEngine = QScriptablePrivate::get(scriptable)->engine;
QScriptablePrivate::get(scriptable)->engine = QScriptEnginePrivate::get(engine);
}
QVariant v = prop.read(qobject);
- if (scriptable)
+ if (scriptable) {
QScriptablePrivate::get(scriptable)->engine = oldEngine;
+ engine->popContext();
+ }
- result = engine->jscValueFromVariant(v);
+ result = QScriptEnginePrivate::jscValueFromVariant(exec, v);
}
} else {
// set
@@ -1106,25 +1111,27 @@ JSC::JSValue QtPropertyFunction::execute(JSC::ExecState *exec,
// string to enum value
v = (QString)arg.toString(exec);
} else {
- // ### don't go via QScriptValue
- QScriptValue tmp = engine->scriptValueFromJSCValue(arg);
- v = variantFromValue(engine, prop.userType(), tmp);
+ v = variantFromValue(exec, prop.userType(), arg);
}
QScriptable *scriptable = scriptableFromQObject(qobject);
QScriptEngine *oldEngine = 0;
if (scriptable) {
+ engine->pushContext(exec, thisValue, args, this);
oldEngine = QScriptablePrivate::get(scriptable)->engine;
QScriptablePrivate::get(scriptable)->engine = QScriptEnginePrivate::get(engine);
}
prop.write(qobject, v);
- if (scriptable)
+ if (scriptable) {
QScriptablePrivate::get(scriptable)->engine = oldEngine;
+ engine->popContext();
+ }
result = arg;
}
+ engine->currentFrame = previousFrame;
return result;
}
@@ -1176,7 +1183,7 @@ bool QObjectDelegate::getOwnPropertySlot(QScriptObject *object, JSC::ExecState *
{
//Note: this has to be kept in sync with getOwnPropertyDescriptor
#ifndef QT_NO_PROPERTIES
- QByteArray name = QString(propertyName.ustring()).toLatin1();
+ QByteArray name = convertToLatin1(propertyName.ustring());
QObject *qobject = data->value;
if (!qobject) {
QString message = QString::fromLatin1("cannot access member `%0' of deleted QObject")
@@ -1237,7 +1244,7 @@ bool QObjectDelegate::getOwnPropertySlot(QScriptObject *object, JSC::ExecState *
if (!prop.isValid())
val = JSC::jsUndefined();
else
- val = eng->jscValueFromVariant(prop.read(qobject));
+ val = QScriptEnginePrivate::jscValueFromVariant(exec, prop.read(qobject));
slot.setValue(val);
}
return true;
@@ -1247,7 +1254,7 @@ bool QObjectDelegate::getOwnPropertySlot(QScriptObject *object, JSC::ExecState *
index = qobject->dynamicPropertyNames().indexOf(name);
if (index != -1) {
- JSC::JSValue val = eng->jscValueFromVariant(qobject->property(name));
+ JSC::JSValue val = QScriptEnginePrivate::jscValueFromVariant(exec, qobject->property(name));
slot.setValue(val);
return true;
}
@@ -1257,7 +1264,7 @@ bool QObjectDelegate::getOwnPropertySlot(QScriptObject *object, JSC::ExecState *
for (index = meta->methodCount() - 1; index >= offset; --index) {
QMetaMethod method = meta->method(index);
if (hasMethodAccess(method, index, opt)
- && (methodName(method) == name)) {
+ && methodNameEquals(method, name.constData(), name.length())) {
QtFunction *fun = new (exec)QtFunction(
object, index, /*maybeOverloaded=*/true,
&exec->globalData(), eng->originalGlobalObject()->functionStructure(),
@@ -1274,8 +1281,7 @@ bool QObjectDelegate::getOwnPropertySlot(QScriptObject *object, JSC::ExecState *
QObject *child = children.at(index);
if (child->objectName() == QString(propertyName.ustring())) {
QScriptEngine::QObjectWrapOptions opt = QScriptEngine::PreferExistingWrapperObject;
- QScriptValue tmp = QScriptEnginePrivate::get(eng)->newQObject(child, QScriptEngine::QtOwnership, opt);
- slot.setValue(eng->scriptValueToJSCValue(tmp));
+ slot.setValue(eng->newQObject(child, QScriptEngine::QtOwnership, opt));
return true;
}
}
@@ -1294,7 +1300,7 @@ bool QObjectDelegate::getOwnPropertyDescriptor(QScriptObject *object, JSC::ExecS
{
//Note: this has to be kept in sync with getOwnPropertySlot abd getPropertyAttributes
#ifndef QT_NO_PROPERTIES
- QByteArray name = QString(propertyName.ustring()).toLatin1();
+ QByteArray name = convertToLatin1(propertyName.ustring());
QObject *qobject = data->value;
if (!qobject) {
QString message = QString::fromLatin1("cannot access member `%0' of deleted QObject")
@@ -1370,7 +1376,7 @@ bool QObjectDelegate::getOwnPropertyDescriptor(QScriptObject *object, JSC::ExecS
if (!prop.isValid())
val = JSC::jsUndefined();
else
- val = eng->jscValueFromVariant(prop.read(qobject));
+ val = QScriptEnginePrivate::jscValueFromVariant(exec, prop.read(qobject));
descriptor.setDescriptor(val, attributes);
}
return true;
@@ -1380,7 +1386,7 @@ bool QObjectDelegate::getOwnPropertyDescriptor(QScriptObject *object, JSC::ExecS
index = qobject->dynamicPropertyNames().indexOf(name);
if (index != -1) {
- JSC::JSValue val = eng->jscValueFromVariant(qobject->property(name));
+ JSC::JSValue val = QScriptEnginePrivate::jscValueFromVariant(exec, qobject->property(name));
descriptor.setDescriptor(val, QObjectMemberAttribute);
return true;
}
@@ -1390,7 +1396,7 @@ bool QObjectDelegate::getOwnPropertyDescriptor(QScriptObject *object, JSC::ExecS
for (index = meta->methodCount() - 1; index >= offset; --index) {
QMetaMethod method = meta->method(index);
if (hasMethodAccess(method, index, opt)
- && (methodName(method) == name)) {
+ && methodNameEquals(method, name.constData(), name.length())) {
QtFunction *fun = new (exec)QtFunction(
object, index, /*maybeOverloaded=*/true,
&exec->globalData(), eng->originalGlobalObject()->functionStructure(),
@@ -1410,8 +1416,8 @@ bool QObjectDelegate::getOwnPropertyDescriptor(QScriptObject *object, JSC::ExecS
QObject *child = children.at(index);
if (child->objectName() == QString(propertyName.ustring())) {
QScriptEngine::QObjectWrapOptions opt = QScriptEngine::PreferExistingWrapperObject;
- QScriptValue tmp = QScriptEnginePrivate::get(eng)->newQObject(child, QScriptEngine::QtOwnership, opt);
- descriptor.setDescriptor(eng->scriptValueToJSCValue(tmp), JSC::ReadOnly | JSC::DontDelete | JSC::DontEnum);
+ descriptor.setDescriptor(eng->newQObject(child, QScriptEngine::QtOwnership, opt),
+ JSC::ReadOnly | JSC::DontDelete | JSC::DontEnum);
return true;
}
}
@@ -1428,7 +1434,7 @@ void QObjectDelegate::put(QScriptObject *object, JSC::ExecState* exec,
JSC::JSValue value, JSC::PutPropertySlot &slot)
{
#ifndef QT_NO_PROPERTIES
- QByteArray name = ((QString)propertyName.ustring()).toLatin1();
+ QByteArray name = convertToLatin1(propertyName.ustring());
QObject *qobject = data->value;
if (!qobject) {
QString message = QString::fromLatin1("cannot access member `%0' of deleted QObject")
@@ -1490,7 +1496,7 @@ void QObjectDelegate::put(QScriptObject *object, JSC::ExecState* exec,
// string to enum value
v = (QString)value.toString(exec);
} else {
- v = eng->jscValueToVariant(value, prop.userType());
+ v = QScriptEnginePrivate::jscValueToVariant(exec, value, prop.userType());
}
(void)prop.write(qobject, v);
}
@@ -1504,7 +1510,7 @@ void QObjectDelegate::put(QScriptObject *object, JSC::ExecState* exec,
for (index = meta->methodCount() - 1; index >= offset; --index) {
QMetaMethod method = meta->method(index);
if (hasMethodAccess(method, index, opt)
- && (methodName(method) == name)) {
+ && methodNameEquals(method, name.constData(), name.length())) {
data->cachedMembers.insert(name, value);
return;
}
@@ -1512,7 +1518,7 @@ void QObjectDelegate::put(QScriptObject *object, JSC::ExecState* exec,
index = qobject->dynamicPropertyNames().indexOf(name);
if ((index != -1) || (opt & QScriptEngine::AutoCreateDynamicProperties)) {
- QVariant v = eng->scriptValueFromJSCValue(value).toVariant();
+ QVariant v = QScriptEnginePrivate::toVariant(exec, value);
(void)qobject->setProperty(name, v);
return;
}
@@ -1526,7 +1532,7 @@ bool QObjectDelegate::deleteProperty(QScriptObject *object, JSC::ExecState *exec
bool checkDontDelete)
{
#ifndef QT_NO_PROPERTIES
- QByteArray name = ((QString)propertyName.ustring()).toLatin1();
+ QByteArray name = convertToLatin1(propertyName.ustring());
QObject *qobject = data->value;
if (!qobject) {
QString message = QString::fromLatin1("cannot access member `%0' of deleted QObject")
@@ -1576,7 +1582,7 @@ bool QObjectDelegate::getPropertyAttributes(const QScriptObject *object,
{
#ifndef QT_NO_PROPERTIES
//Note: this has to be kept in sync with getOwnPropertyDescriptor and getOwnPropertySlot
- QByteArray name = ((QString)propertyName.ustring()).toLatin1();
+ QByteArray name = convertToLatin1(propertyName.ustring());
QObject *qobject = data->value;
if (!qobject)
return false;
@@ -1623,7 +1629,7 @@ bool QObjectDelegate::getPropertyAttributes(const QScriptObject *object,
for (index = meta->methodCount() - 1; index >= offset; --index) {
QMetaMethod method = meta->method(index);
if (hasMethodAccess(method, index, opt)
- && (methodName(method) == name)) {
+ && methodNameEquals(method, name.constData(), name.length())) {
attributes = QObjectMemberAttribute;
if (opt & QScriptEngine::SkipMethodsInEnumeration)
attributes |= JSC::DontEnum;
@@ -1862,7 +1868,7 @@ bool QMetaObjectWrapperObject::getOwnPropertySlot(
return true;
}
- QByteArray name = QString(propertyName.ustring()).toLatin1();
+ QByteArray name = convertToLatin1(propertyName.ustring());
for (int i = 0; i < meta->enumeratorCount(); ++i) {
QMetaEnum e = meta->enumerator(i);
@@ -1890,7 +1896,7 @@ void QMetaObjectWrapperObject::put(JSC::ExecState* exec, const JSC::Identifier&
}
const QMetaObject *meta = data->value;
if (meta) {
- QByteArray name = QString(propertyName.ustring()).toLatin1();
+ QByteArray name = convertToLatin1(propertyName.ustring());
for (int i = 0; i < meta->enumeratorCount(); ++i) {
QMetaEnum e = meta->enumerator(i);
for (int j = 0; j < e.keyCount(); ++j) {
@@ -1910,7 +1916,7 @@ bool QMetaObjectWrapperObject::deleteProperty(
return false;
const QMetaObject *meta = data->value;
if (meta) {
- QByteArray name = QString(propertyName.ustring()).toLatin1();
+ QByteArray name = convertToLatin1(propertyName.ustring());
for (int i = 0; i < meta->enumeratorCount(); ++i) {
QMetaEnum e = meta->enumerator(i);
for (int j = 0; j < e.keyCount(); ++j) {
@@ -1932,7 +1938,7 @@ bool QMetaObjectWrapperObject::getPropertyAttributes(JSC::ExecState *exec,
}
const QMetaObject *meta = data->value;
if (meta) {
- QByteArray name = QString(propertyName.ustring()).toLatin1();
+ QByteArray name = convertToLatin1(propertyName.ustring());
for (int i = 0; i < meta->enumeratorCount(); ++i) {
QMetaEnum e = meta->enumerator(i);
for (int j = 0; j < e.keyCount(); ++j) {
@@ -2178,24 +2184,21 @@ void QObjectConnectionManager::execute(int slotIndex, void **argv)
JSC::ExecState *exec = engine->currentFrame;
QVarLengthArray<JSC::JSValue, 8> argsVector(argc);
for (int i = 0; i < argc; ++i) {
- // ### optimize -- no need to convert via QScriptValue
- QScriptValue actual;
+ JSC::JSValue actual;
void *arg = argv[i + 1];
QByteArray typeName = parameterTypes.at(i);
int argType = QMetaType::type(parameterTypes.at(i));
if (!argType) {
- if (typeName == "QVariant") {
- actual = engine->scriptValueFromVariant(*reinterpret_cast<QVariant*>(arg));
- } else {
- qWarning("QScriptEngine: Unable to handle unregistered datatype '%s' "
- "when invoking handler of signal %s::%s",
- typeName.constData(), meta->className(), method.signature());
- actual = QScriptValue(QScriptValue::UndefinedValue);
- }
+ qWarning("QScriptEngine: Unable to handle unregistered datatype '%s' "
+ "when invoking handler of signal %s::%s",
+ typeName.constData(), meta->className(), method.signature());
+ actual = JSC::jsUndefined();
+ } else if (argType == QMetaType::QVariant) {
+ actual = QScriptEnginePrivate::jscValueFromVariant(exec, *reinterpret_cast<QVariant*>(arg));
} else {
- actual = engine->create(argType, arg);
+ actual = QScriptEnginePrivate::create(exec, argType, arg);
}
- argsVector[i] = engine->scriptValueToJSCValue(actual);
+ argsVector[i] = actual;
}
JSC::ArgList jscArgs(argsVector.data(), argsVector.size());
diff --git a/src/script/bridge/qscriptqobject_p.h b/src/script/bridge/qscriptqobject_p.h
index 448fa9938a..8b05d6b0fe 100644
--- a/src/script/bridge/qscriptqobject_p.h
+++ b/src/script/bridge/qscriptqobject_p.h
@@ -212,7 +212,6 @@ public:
bool maybeOverloaded() const;
int mostGeneralMethod(QMetaMethod *out = 0) const;
QList<int> overloadedIndexes() const;
- QString functionName() const;
private:
Data *data;
diff --git a/src/script/bridge/qscriptvariant.cpp b/src/script/bridge/qscriptvariant.cpp
index 0287d24414..b4f0365170 100644
--- a/src/script/bridge/qscriptvariant.cpp
+++ b/src/script/bridge/qscriptvariant.cpp
@@ -133,7 +133,7 @@ static JSC::JSValue JSC_HOST_CALL variantProtoFuncToString(JSC::ExecState *exec,
bool QVariantDelegate::compareToObject(QScriptObject *, JSC::ExecState *exec, JSC::JSObject *o2)
{
const QVariant &variant1 = value();
- return variant1 == scriptEngineFromExec(exec)->scriptValueFromJSCValue(o2).toVariant();
+ return variant1 == QScriptEnginePrivate::toVariant(exec, o2);
}
QVariantPrototype::QVariantPrototype(JSC::ExecState* exec, WTF::PassRefPtr<JSC::Structure> structure,
diff --git a/src/scripttools/debugging/qscriptdebuggerconsole.cpp b/src/scripttools/debugging/qscriptdebuggerconsole.cpp
index 7fd80f058a..2f7a99833b 100644
--- a/src/scripttools/debugging/qscriptdebuggerconsole.cpp
+++ b/src/scripttools/debugging/qscriptdebuggerconsole.cpp
@@ -44,16 +44,216 @@
#include "qscriptdebuggerconsolecommandmanager_p.h"
#include "qscriptdebuggerscriptedconsolecommand_p.h"
#include "qscriptmessagehandlerinterface_p.h"
+#include "qscriptbreakpointdata_p.h"
+#include "qscriptdebuggerresponse_p.h"
+#include "qscriptdebuggervalueproperty_p.h"
+#include "qscriptscriptdata_p.h"
#include <QtCore/qdir.h>
#include <QtCore/qfileinfo.h>
#include <QtCore/qstring.h>
#include <QtCore/qstringlist.h>
#include <QtCore/qdebug.h>
+#include <QtScript/qscriptcontextinfo.h>
#include <QtScript/qscriptengine.h>
+Q_DECLARE_METATYPE(QScriptDebuggerResponse)
+Q_DECLARE_METATYPE(QScriptBreakpointData)
+Q_DECLARE_METATYPE(QScriptBreakpointMap)
+Q_DECLARE_METATYPE(QScriptScriptData)
+Q_DECLARE_METATYPE(QScriptScriptMap)
+Q_DECLARE_METATYPE(QScriptContextInfo)
+Q_DECLARE_METATYPE(QScriptDebuggerValue)
+Q_DECLARE_METATYPE(QScriptDebuggerValueProperty)
+Q_DECLARE_METATYPE(QScriptDebuggerValuePropertyList)
+Q_DECLARE_METATYPE(QScriptDebuggerConsoleCommand*)
+Q_DECLARE_METATYPE(QScriptDebuggerConsoleCommandList)
+Q_DECLARE_METATYPE(QScriptDebuggerConsoleCommandGroupData)
+Q_DECLARE_METATYPE(QScriptDebuggerConsoleCommandGroupMap)
+
QT_BEGIN_NAMESPACE
+static QScriptValue debuggerResponseToScriptValue(QScriptEngine *eng, const QScriptDebuggerResponse &in)
+{
+ QScriptValue out = eng->newObject();
+ out.setProperty(QString::fromLatin1("result"), qScriptValueFromValue(eng, in.result()));
+ out.setProperty(QString::fromLatin1("error"), QScriptValue(eng, in.error()));
+ out.setProperty(QString::fromLatin1("async"), QScriptValue(eng, in.async()));
+ return out;
+}
+
+static void debuggerResponseFromScriptValue(const QScriptValue &, QScriptDebuggerResponse &)
+{
+ Q_ASSERT(0);
+}
+
+static QScriptValue breakpointDataToScriptValue(QScriptEngine *eng, const QScriptBreakpointData &in)
+{
+ QScriptValue out = eng->newObject();
+ out.setProperty(QString::fromLatin1("scriptId"), QScriptValue(eng, qsreal(in.scriptId())));
+ out.setProperty(QString::fromLatin1("fileName"), QScriptValue(eng, in.fileName()));
+ out.setProperty(QString::fromLatin1("lineNumber"), QScriptValue(eng, in.lineNumber()));
+ out.setProperty(QString::fromLatin1("enabled"), QScriptValue(eng, in.isEnabled()));
+ out.setProperty(QString::fromLatin1("singleShot"), QScriptValue(eng, in.isSingleShot()));
+ out.setProperty(QString::fromLatin1("ignoreCount"), QScriptValue(eng, in.ignoreCount()));
+ out.setProperty(QString::fromLatin1("condition"), QScriptValue(eng, in.condition()));
+ return out;
+}
+
+static void breakpointDataFromScriptValue(const QScriptValue &in, QScriptBreakpointData &out)
+{
+ QScriptValue scriptId = in.property(QString::fromLatin1("scriptId"));
+ if (scriptId.isValid())
+ out.setScriptId((qint64)scriptId.toNumber());
+ out.setFileName(in.property(QString::fromLatin1("fileName")).toString());
+ out.setLineNumber(in.property(QString::fromLatin1("lineNumber")).toInt32());
+ QScriptValue enabled = in.property(QString::fromLatin1("enabled"));
+ if (enabled.isValid())
+ out.setEnabled(enabled.toBoolean());
+ QScriptValue singleShot = in.property(QString::fromLatin1("singleShot"));
+ if (singleShot.isValid())
+ out.setSingleShot(singleShot.toBoolean());
+ out.setIgnoreCount(in.property(QString::fromLatin1("ignoreCount")).toInt32());
+ out.setCondition(in.property(QString::fromLatin1("condition")).toString());
+}
+
+static QScriptValue breakpointMapToScriptValue(QScriptEngine *eng, const QScriptBreakpointMap &in)
+{
+ QScriptValue out = eng->newObject();
+ QScriptBreakpointMap::const_iterator it;
+ for (it = in.constBegin(); it != in.constEnd(); ++it) {
+ out.setProperty(QString::number(it.key()), qScriptValueFromValue(eng, it.value()));
+ }
+ return out;
+}
+
+static void breakpointMapFromScriptValue(const QScriptValue &, QScriptBreakpointMap &)
+{
+ Q_ASSERT(0);
+}
+
+static QScriptValue scriptDataToScriptValue(QScriptEngine *eng, const QScriptScriptData &in)
+{
+ QScriptValue out = eng->newObject();
+ out.setProperty(QString::fromLatin1("contents"), QScriptValue(eng, in.contents()));
+ out.setProperty(QString::fromLatin1("fileName"), QScriptValue(eng, in.fileName()));
+ out.setProperty(QString::fromLatin1("baseLineNumber"), QScriptValue(eng, in.baseLineNumber()));
+ return out;
+}
+
+static void scriptDataFromScriptValue(const QScriptValue &in, QScriptScriptData &out)
+{
+ QString contents = in.property(QString::fromLatin1("contents")).toString();
+ QString fileName = in.property(QString::fromLatin1("fileName")).toString();
+ int baseLineNumber = in.property(QString::fromLatin1("baseLineNumber")).toInt32();
+ QScriptScriptData tmp(contents, fileName, baseLineNumber);
+ out = tmp;
+}
+
+static QScriptValue scriptMapToScriptValue(QScriptEngine *eng, const QScriptScriptMap &in)
+{
+ QScriptValue out = eng->newObject();
+ QScriptScriptMap::const_iterator it;
+ for (it = in.constBegin(); it != in.constEnd(); ++it) {
+ out.setProperty(QString::number(it.key()), qScriptValueFromValue(eng, it.value()));
+ }
+ return out;
+}
+
+static void scriptMapFromScriptValue(const QScriptValue &, QScriptScriptMap &)
+{
+ Q_ASSERT(0);
+}
+
+static QScriptValue consoleCommandToScriptValue(
+ QScriptEngine *eng, QScriptDebuggerConsoleCommand* const &in)
+{
+ if (!in)
+ return eng->undefinedValue();
+ QScriptValue out = eng->newObject();
+ out.setProperty(QString::fromLatin1("name"), QScriptValue(eng, in->name()));
+ out.setProperty(QString::fromLatin1("group"), QScriptValue(eng, in->group()));
+ out.setProperty(QString::fromLatin1("shortDescription"), QScriptValue(eng, in->shortDescription()));
+ out.setProperty(QString::fromLatin1("longDescription"), QScriptValue(eng, in->longDescription()));
+ out.setProperty(QString::fromLatin1("aliases"), qScriptValueFromValue(eng, in->aliases()));
+ out.setProperty(QString::fromLatin1("seeAlso"), qScriptValueFromValue(eng, in->seeAlso()));
+ return out;
+}
+
+static void consoleCommandFromScriptValue(
+ const QScriptValue &, QScriptDebuggerConsoleCommand* &)
+{
+ Q_ASSERT(0);
+}
+
+static QScriptValue consoleCommandGroupDataToScriptValue(
+ QScriptEngine *eng, const QScriptDebuggerConsoleCommandGroupData &in)
+{
+ QScriptValue out = eng->newObject();
+ out.setProperty(QString::fromLatin1("longDescription"), QScriptValue(eng, in.longDescription()));
+ out.setProperty(QString::fromLatin1("shortDescription"), QScriptValue(eng, in.shortDescription()));
+ return out;
+}
+
+static void consoleCommandGroupDataFromScriptValue(
+ const QScriptValue &, QScriptDebuggerConsoleCommandGroupData &)
+{
+ Q_ASSERT(0);
+}
+
+static QScriptValue consoleCommandGroupMapToScriptValue(
+ QScriptEngine *eng, const QScriptDebuggerConsoleCommandGroupMap &in)
+{
+ QScriptValue out = eng->newObject();
+ QScriptDebuggerConsoleCommandGroupMap::const_iterator it;
+ for (it = in.constBegin(); it != in.constEnd(); ++it) {
+ out.setProperty(it.key(), qScriptValueFromValue(eng, it.value()));
+ }
+ return out;
+}
+
+static void consoleCommandGroupMapFromScriptValue(
+ const QScriptValue &, QScriptDebuggerConsoleCommandGroupMap &)
+{
+ Q_ASSERT(0);
+}
+
+static QScriptValue contextInfoToScriptValue(QScriptEngine *eng, const QScriptContextInfo &in)
+{
+ QScriptValue out = eng->newObject();
+ out.setProperty(QString::fromLatin1("scriptId"), QScriptValue(eng, qsreal(in.scriptId())));
+ out.setProperty(QString::fromLatin1("fileName"), QScriptValue(eng, in.fileName()));
+ out.setProperty(QString::fromLatin1("lineNumber"), QScriptValue(eng, in.lineNumber()));
+ out.setProperty(QString::fromLatin1("columnNumber"), QScriptValue(eng, in.columnNumber()));
+ out.setProperty(QString::fromLatin1("functionName"), QScriptValue(eng, in.functionName()));
+ return out;
+}
+
+static void contextInfoFromScriptValue(const QScriptValue &, QScriptContextInfo &)
+{
+ Q_ASSERT(0);
+}
+
+static QScriptValue debuggerScriptValuePropertyToScriptValue(QScriptEngine *eng, const QScriptDebuggerValueProperty &in)
+{
+ QScriptValue out = eng->newObject();
+ out.setProperty(QString::fromLatin1("name"), QScriptValue(eng, in.name()));
+ out.setProperty(QString::fromLatin1("value"), qScriptValueFromValue(eng, in.value()));
+ out.setProperty(QString::fromLatin1("valueAsString"), QScriptValue(eng, in.valueAsString()));
+ out.setProperty(QString::fromLatin1("flags"), QScriptValue(eng, static_cast<int>(in.flags())));
+ return out;
+}
+
+static void debuggerScriptValuePropertyFromScriptValue(const QScriptValue &in, QScriptDebuggerValueProperty &out)
+{
+ QString name = in.property(QString::fromLatin1("name")).toString();
+ QScriptDebuggerValue value = qscriptvalue_cast<QScriptDebuggerValue>(in.property(QString::fromLatin1("value")));
+ QString valueAsString = in.property(QString::fromLatin1("valueAsString")).toString();
+ int flags = in.property(QString::fromLatin1("flags")).toInt32();
+ QScriptDebuggerValueProperty tmp(name, value, valueAsString, QScriptValue::PropertyFlags(flags));
+ out = tmp;
+}
+
/*!
\since 4.5
\class QScriptDebuggerConsole
@@ -76,6 +276,7 @@ public:
QScriptMessageHandlerInterface *messageHandler,
QScriptDebuggerCommandSchedulerInterface *commandScheduler);
+ QScriptEngine *commandEngine;
QScriptDebuggerConsoleCommandManager *commandManager;
QString commandPrefix;
QString input;
@@ -99,11 +300,29 @@ QScriptDebuggerConsolePrivate::QScriptDebuggerConsolePrivate(QScriptDebuggerCons
evaluateAction = 0;
commandPrefix = QLatin1String(".");
commandManager = new QScriptDebuggerConsoleCommandManager();
+
+ commandEngine = new QScriptEngine;
+ qScriptRegisterMetaType<QScriptBreakpointData>(commandEngine, breakpointDataToScriptValue, breakpointDataFromScriptValue);
+ qScriptRegisterMetaType<QScriptBreakpointMap>(commandEngine, breakpointMapToScriptValue, breakpointMapFromScriptValue);
+ qScriptRegisterMetaType<QScriptScriptData>(commandEngine, scriptDataToScriptValue, scriptDataFromScriptValue);
+ qScriptRegisterMetaType<QScriptScriptMap>(commandEngine, scriptMapToScriptValue, scriptMapFromScriptValue);
+ qScriptRegisterMetaType<QScriptContextInfo>(commandEngine, contextInfoToScriptValue, contextInfoFromScriptValue);
+ qScriptRegisterMetaType<QScriptDebuggerValueProperty>(commandEngine, debuggerScriptValuePropertyToScriptValue, debuggerScriptValuePropertyFromScriptValue);
+ qScriptRegisterSequenceMetaType<QScriptDebuggerValuePropertyList>(commandEngine);
+ qScriptRegisterMetaType<QScriptDebuggerResponse>(commandEngine, debuggerResponseToScriptValue, debuggerResponseFromScriptValue);
+ qScriptRegisterMetaType<QScriptDebuggerConsoleCommand*>(commandEngine, consoleCommandToScriptValue, consoleCommandFromScriptValue);
+ qScriptRegisterSequenceMetaType<QScriptDebuggerConsoleCommandList>(commandEngine);
+ qScriptRegisterMetaType<QScriptDebuggerConsoleCommandGroupData>(commandEngine, consoleCommandGroupDataToScriptValue, consoleCommandGroupDataFromScriptValue);
+ qScriptRegisterMetaType<QScriptDebuggerConsoleCommandGroupMap>(commandEngine, consoleCommandGroupMapToScriptValue, consoleCommandGroupMapFromScriptValue);
+// ### can't do this, if it's an object ID the conversion will be incorrect since
+// ### the object ID refers to an object in a different engine!
+// qScriptRegisterMetaType(commandEngine, debuggerScriptValueToScriptValue, debuggerScriptValueFromScriptValue);
}
QScriptDebuggerConsolePrivate::~QScriptDebuggerConsolePrivate()
{
delete commandManager;
+ delete commandEngine;
}
/*!
@@ -126,7 +345,7 @@ void QScriptDebuggerConsolePrivate::loadScriptedCommands(
QString program = stream.readAll();
QScriptDebuggerScriptedConsoleCommand *command;
command = QScriptDebuggerScriptedConsoleCommand::parse(
- program, fileName, messageHandler);
+ program, fileName, commandEngine, messageHandler);
if (!command)
continue;
commandManager->addCommand(command);
diff --git a/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp b/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp
index 068de42b57..ec6230bc9e 100644
--- a/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp
+++ b/src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp
@@ -54,6 +54,7 @@
#include <QtCore/qdebug.h>
#include <QtCore/qcoreapplication.h>
+#include <QtCore/qpointer.h>
#include <QtGui/qbrush.h>
#include <QtGui/qfont.h>
@@ -370,6 +371,7 @@ public:
{
if (!m_index.isValid()) {
// nothing to do, the node has been removed
+ finish();
return;
}
QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this);
@@ -475,7 +477,7 @@ namespace {
class InitModelJob : public QScriptDebuggerCommandSchedulerJob
{
public:
- InitModelJob(QScriptDebuggerLocalsModelPrivate *model,
+ InitModelJob(QScriptDebuggerLocalsModel *model,
int frameIndex,
QScriptDebuggerCommandSchedulerInterface *scheduler)
: QScriptDebuggerCommandSchedulerJob(scheduler),
@@ -484,6 +486,11 @@ public:
void start()
{
+ if (!m_model) {
+ // Model has been deleted.
+ finish();
+ return;
+ }
QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this);
frontend.scheduleGetScopeChain(m_frameIndex);
}
@@ -491,7 +498,13 @@ public:
void handleResponse(const QScriptDebuggerResponse &response,
int)
{
+ if (!m_model) {
+ // Model has been deleted.
+ finish();
+ return;
+ }
QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this);
+ QScriptDebuggerLocalsModelPrivate *model_d = QScriptDebuggerLocalsModelPrivate::get(m_model);
switch (m_state) {
case 0: {
QScriptDebuggerValueList scopeChain = response.resultAsScriptValueList();
@@ -500,23 +513,23 @@ public:
QString name = QString::fromLatin1("Scope");
if (i > 0)
name.append(QString::fromLatin1(" (%0)").arg(i));
- QModelIndex index = m_model->addTopLevelObject(name, scopeObject);
+ QModelIndex index = model_d->addTopLevelObject(name, scopeObject);
if (i == 0)
- m_model->emitScopeObjectAvailable(index);
+ model_d->emitScopeObjectAvailable(index);
}
frontend.scheduleGetThisObject(m_frameIndex);
++m_state;
} break;
case 1: {
QScriptDebuggerValue thisObject = response.resultAsScriptValue();
- m_model->addTopLevelObject(QLatin1String("this"), thisObject);
+ model_d->addTopLevelObject(QLatin1String("this"), thisObject);
finish();
} break;
}
}
private:
- QScriptDebuggerLocalsModelPrivate *m_model;
+ QPointer<QScriptDebuggerLocalsModel> m_model;
int m_frameIndex;
int m_state;
};
@@ -527,7 +540,7 @@ void QScriptDebuggerLocalsModel::init(int frameIndex)
{
Q_D(QScriptDebuggerLocalsModel);
d->frameIndex = frameIndex;
- QScriptDebuggerJob *job = new InitModelJob(d, frameIndex, d->commandScheduler);
+ QScriptDebuggerJob *job = new InitModelJob(this, frameIndex, d->commandScheduler);
d->jobScheduler->scheduleJob(job);
}
@@ -536,7 +549,7 @@ namespace {
class SyncModelJob : public QScriptDebuggerCommandSchedulerJob
{
public:
- SyncModelJob(QScriptDebuggerLocalsModelPrivate *model,
+ SyncModelJob(QScriptDebuggerLocalsModel *model,
int frameIndex,
QScriptDebuggerCommandSchedulerInterface *scheduler)
: QScriptDebuggerCommandSchedulerJob(scheduler),
@@ -545,6 +558,11 @@ public:
void start()
{
+ if (!m_model) {
+ // Model has been deleted.
+ finish();
+ return;
+ }
QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this);
frontend.scheduleGetScopeChain(m_frameIndex);
}
@@ -552,6 +570,11 @@ public:
void handleResponse(const QScriptDebuggerResponse &response,
int)
{
+ if (!m_model) {
+ // Model has been deleted.
+ finish();
+ return;
+ }
QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this);
switch (m_state) {
case 0: {
@@ -561,18 +584,19 @@ public:
++m_state;
} break;
case 1: {
+ QScriptDebuggerLocalsModelPrivate *model_d = QScriptDebuggerLocalsModelPrivate::get(m_model);
QScriptDebuggerValue thisObject = response.resultAsScriptValue();
m_topLevelObjects.append(thisObject);
- bool equal = (m_topLevelObjects.size() == m_model->invisibleRootNode->children.size());
+ bool equal = (m_topLevelObjects.size() == model_d->invisibleRootNode->children.size());
for (int i = 0; equal && (i < m_topLevelObjects.size()); ++i) {
const QScriptDebuggerValue &object = m_topLevelObjects.at(i);
- equal = (object == m_model->invisibleRootNode->children.at(i)->property.value());
+ equal = (object == model_d->invisibleRootNode->children.at(i)->property.value());
}
if (!equal) {
// the scope chain and/or this-object changed, so invalidate the model.
// we could try to be more clever, i.e. figure out
// exactly which objects were popped/pushed
- m_model->removeTopLevelNodes();
+ model_d->removeTopLevelNodes();
for (int j = 0; j < m_topLevelObjects.size(); ++j) {
const QScriptDebuggerValue &object = m_topLevelObjects.at(j);
QString name;
@@ -583,12 +607,12 @@ public:
if (j > 0)
name.append(QString::fromLatin1(" (%0)").arg(j));
}
- QModelIndex index = m_model->addTopLevelObject(name, object);
+ QModelIndex index = model_d->addTopLevelObject(name, object);
if (j == 0)
- m_model->emitScopeObjectAvailable(index);
+ model_d->emitScopeObjectAvailable(index);
}
} else {
- m_model->syncTopLevelNodes();
+ model_d->syncTopLevelNodes();
}
finish();
} break;
@@ -596,7 +620,7 @@ public:
}
private:
- QScriptDebuggerLocalsModelPrivate *m_model;
+ QPointer<QScriptDebuggerLocalsModel> m_model;
int m_frameIndex;
int m_state;
QScriptDebuggerValueList m_topLevelObjects;
@@ -608,7 +632,7 @@ void QScriptDebuggerLocalsModel::sync(int frameIndex)
{
Q_D(QScriptDebuggerLocalsModel);
d->frameIndex = frameIndex;
- QScriptDebuggerJob *job = new SyncModelJob(d, frameIndex, d->commandScheduler);
+ QScriptDebuggerJob *job = new SyncModelJob(this, frameIndex, d->commandScheduler);
d->jobScheduler->scheduleJob(job);
}
@@ -636,6 +660,7 @@ public:
{
if (!m_index.isValid()) {
// nothing to do, the node has been removed
+ finish();
return;
}
QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this);
diff --git a/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp b/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp
index 516a200637..bbced5ff90 100644
--- a/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp
+++ b/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp
@@ -70,6 +70,8 @@ public:
bool hasChildren(const QModelIndex &parent) const
{
+ if (!sourceModel())
+ return false;
QModelIndex sourceParent = mapToSource(parent);
if (parent.isValid() && !sourceParent.isValid())
return false;
@@ -184,7 +186,8 @@ void QScriptDebuggerLocalsWidgetPrivate::_q_insertCompletion(const QString &text
void QScriptDebuggerLocalsWidgetPrivate::_q_expandIndex(const QModelIndex &index)
{
- view->expand(proxy->mapFromSource(index));
+ if (view->model() == index.model())
+ view->expand(proxy->mapFromSource(index));
}
class QScriptDebuggerLocalsItemDelegate
diff --git a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp
index 8d6a579d7c..117c2d60aa 100644
--- a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp
+++ b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp
@@ -46,8 +46,6 @@
#include "qscriptmessagehandlerinterface_p.h"
#include "qscriptdebuggerconsoleglobalobject_p.h"
#include "qscriptdebuggerresponse_p.h"
-#include "qscriptdebuggervalue_p.h"
-#include "qscriptdebuggervalueproperty_p.h"
#include "qscriptdebuggercommandschedulerinterface_p.h"
#include <QtCore/qstring.h>
@@ -59,202 +57,9 @@
#include <QtCore/qdebug.h>
Q_DECLARE_METATYPE(QScriptDebuggerResponse)
-Q_DECLARE_METATYPE(QScriptBreakpointData)
-Q_DECLARE_METATYPE(QScriptBreakpointMap)
-Q_DECLARE_METATYPE(QScriptScriptData)
-Q_DECLARE_METATYPE(QScriptScriptMap)
-Q_DECLARE_METATYPE(QScriptContextInfo)
-Q_DECLARE_METATYPE(QScriptDebuggerValue)
-Q_DECLARE_METATYPE(QScriptDebuggerValueProperty)
-Q_DECLARE_METATYPE(QScriptDebuggerValuePropertyList)
-Q_DECLARE_METATYPE(QScriptDebuggerConsoleCommand*)
-Q_DECLARE_METATYPE(QScriptDebuggerConsoleCommandList)
-Q_DECLARE_METATYPE(QScriptDebuggerConsoleCommandGroupData)
-Q_DECLARE_METATYPE(QScriptDebuggerConsoleCommandGroupMap)
QT_BEGIN_NAMESPACE
-static QScriptValue debuggerResponseToScriptValue(QScriptEngine *eng, const QScriptDebuggerResponse &in)
-{
- QScriptValue out = eng->newObject();
- out.setProperty(QString::fromLatin1("result"), qScriptValueFromValue(eng, in.result()));
- out.setProperty(QString::fromLatin1("error"), QScriptValue(eng, in.error()));
- out.setProperty(QString::fromLatin1("async"), QScriptValue(eng, in.async()));
- return out;
-}
-
-static void debuggerResponseFromScriptValue(const QScriptValue &, QScriptDebuggerResponse &)
-{
- Q_ASSERT(0);
-}
-
-static QScriptValue breakpointDataToScriptValue(QScriptEngine *eng, const QScriptBreakpointData &in)
-{
- QScriptValue out = eng->newObject();
- out.setProperty(QString::fromLatin1("scriptId"), QScriptValue(eng, qsreal(in.scriptId())));
- out.setProperty(QString::fromLatin1("fileName"), QScriptValue(eng, in.fileName()));
- out.setProperty(QString::fromLatin1("lineNumber"), QScriptValue(eng, in.lineNumber()));
- out.setProperty(QString::fromLatin1("enabled"), QScriptValue(eng, in.isEnabled()));
- out.setProperty(QString::fromLatin1("singleShot"), QScriptValue(eng, in.isSingleShot()));
- out.setProperty(QString::fromLatin1("ignoreCount"), QScriptValue(eng, in.ignoreCount()));
- out.setProperty(QString::fromLatin1("condition"), QScriptValue(eng, in.condition()));
- return out;
-}
-
-static void breakpointDataFromScriptValue(const QScriptValue &in, QScriptBreakpointData &out)
-{
- QScriptValue scriptId = in.property(QString::fromLatin1("scriptId"));
- if (scriptId.isValid())
- out.setScriptId((qint64)scriptId.toNumber());
- out.setFileName(in.property(QString::fromLatin1("fileName")).toString());
- out.setLineNumber(in.property(QString::fromLatin1("lineNumber")).toInt32());
- QScriptValue enabled = in.property(QString::fromLatin1("enabled"));
- if (enabled.isValid())
- out.setEnabled(enabled.toBoolean());
- QScriptValue singleShot = in.property(QString::fromLatin1("singleShot"));
- if (singleShot.isValid())
- out.setSingleShot(singleShot.toBoolean());
- out.setIgnoreCount(in.property(QString::fromLatin1("ignoreCount")).toInt32());
- out.setCondition(in.property(QString::fromLatin1("condition")).toString());
-}
-
-static QScriptValue breakpointMapToScriptValue(QScriptEngine *eng, const QScriptBreakpointMap &in)
-{
- QScriptValue out = eng->newObject();
- QScriptBreakpointMap::const_iterator it;
- for (it = in.constBegin(); it != in.constEnd(); ++it) {
- out.setProperty(QString::number(it.key()), qScriptValueFromValue(eng, it.value()));
- }
- return out;
-}
-
-static void breakpointMapFromScriptValue(const QScriptValue &, QScriptBreakpointMap &)
-{
- Q_ASSERT(0);
-}
-
-static QScriptValue scriptDataToScriptValue(QScriptEngine *eng, const QScriptScriptData &in)
-{
- QScriptValue out = eng->newObject();
- out.setProperty(QString::fromLatin1("contents"), QScriptValue(eng, in.contents()));
- out.setProperty(QString::fromLatin1("fileName"), QScriptValue(eng, in.fileName()));
- out.setProperty(QString::fromLatin1("baseLineNumber"), QScriptValue(eng, in.baseLineNumber()));
- return out;
-}
-
-static void scriptDataFromScriptValue(const QScriptValue &in, QScriptScriptData &out)
-{
- QString contents = in.property(QString::fromLatin1("contents")).toString();
- QString fileName = in.property(QString::fromLatin1("fileName")).toString();
- int baseLineNumber = in.property(QString::fromLatin1("baseLineNumber")).toInt32();
- QScriptScriptData tmp(contents, fileName, baseLineNumber);
- out = tmp;
-}
-
-static QScriptValue scriptMapToScriptValue(QScriptEngine *eng, const QScriptScriptMap &in)
-{
- QScriptValue out = eng->newObject();
- QScriptScriptMap::const_iterator it;
- for (it = in.constBegin(); it != in.constEnd(); ++it) {
- out.setProperty(QString::number(it.key()), qScriptValueFromValue(eng, it.value()));
- }
- return out;
-}
-
-static void scriptMapFromScriptValue(const QScriptValue &, QScriptScriptMap &)
-{
- Q_ASSERT(0);
-}
-
-static QScriptValue consoleCommandToScriptValue(
- QScriptEngine *eng, QScriptDebuggerConsoleCommand* const &in)
-{
- if (!in)
- return eng->undefinedValue();
- QScriptValue out = eng->newObject();
- out.setProperty(QString::fromLatin1("name"), QScriptValue(eng, in->name()));
- out.setProperty(QString::fromLatin1("group"), QScriptValue(eng, in->group()));
- out.setProperty(QString::fromLatin1("shortDescription"), QScriptValue(eng, in->shortDescription()));
- out.setProperty(QString::fromLatin1("longDescription"), QScriptValue(eng, in->longDescription()));
- out.setProperty(QString::fromLatin1("aliases"), qScriptValueFromValue(eng, in->aliases()));
- out.setProperty(QString::fromLatin1("seeAlso"), qScriptValueFromValue(eng, in->seeAlso()));
- return out;
-}
-
-static void consoleCommandFromScriptValue(
- const QScriptValue &, QScriptDebuggerConsoleCommand* &)
-{
- Q_ASSERT(0);
-}
-
-static QScriptValue consoleCommandGroupDataToScriptValue(
- QScriptEngine *eng, const QScriptDebuggerConsoleCommandGroupData &in)
-{
- QScriptValue out = eng->newObject();
- out.setProperty(QString::fromLatin1("longDescription"), QScriptValue(eng, in.longDescription()));
- out.setProperty(QString::fromLatin1("shortDescription"), QScriptValue(eng, in.shortDescription()));
- return out;
-}
-
-static void consoleCommandGroupDataFromScriptValue(
- const QScriptValue &, QScriptDebuggerConsoleCommandGroupData &)
-{
- Q_ASSERT(0);
-}
-
-static QScriptValue consoleCommandGroupMapToScriptValue(
- QScriptEngine *eng, const QScriptDebuggerConsoleCommandGroupMap &in)
-{
- QScriptValue out = eng->newObject();
- QScriptDebuggerConsoleCommandGroupMap::const_iterator it;
- for (it = in.constBegin(); it != in.constEnd(); ++it) {
- out.setProperty(it.key(), qScriptValueFromValue(eng, it.value()));
- }
- return out;
-}
-
-static void consoleCommandGroupMapFromScriptValue(
- const QScriptValue &, QScriptDebuggerConsoleCommandGroupMap &)
-{
- Q_ASSERT(0);
-}
-
-static QScriptValue contextInfoToScriptValue(QScriptEngine *eng, const QScriptContextInfo &in)
-{
- QScriptValue out = eng->newObject();
- out.setProperty(QString::fromLatin1("scriptId"), QScriptValue(eng, qsreal(in.scriptId())));
- out.setProperty(QString::fromLatin1("fileName"), QScriptValue(eng, in.fileName()));
- out.setProperty(QString::fromLatin1("lineNumber"), QScriptValue(eng, in.lineNumber()));
- out.setProperty(QString::fromLatin1("columnNumber"), QScriptValue(eng, in.columnNumber()));
- out.setProperty(QString::fromLatin1("functionName"), QScriptValue(eng, in.functionName()));
- return out;
-}
-
-static void contextInfoFromScriptValue(const QScriptValue &, QScriptContextInfo &)
-{
- Q_ASSERT(0);
-}
-
-static QScriptValue debuggerScriptValuePropertyToScriptValue(QScriptEngine *eng, const QScriptDebuggerValueProperty &in)
-{
- QScriptValue out = eng->newObject();
- out.setProperty(QString::fromLatin1("name"), QScriptValue(eng, in.name()));
- out.setProperty(QString::fromLatin1("value"), qScriptValueFromValue(eng, in.value()));
- out.setProperty(QString::fromLatin1("valueAsString"), QScriptValue(eng, in.valueAsString()));
- out.setProperty(QString::fromLatin1("flags"), QScriptValue(eng, static_cast<int>(in.flags())));
- return out;
-}
-
-static void debuggerScriptValuePropertyFromScriptValue(const QScriptValue &in, QScriptDebuggerValueProperty &out)
-{
- QString name = in.property(QString::fromLatin1("name")).toString();
- QScriptDebuggerValue value = qscriptvalue_cast<QScriptDebuggerValue>(in.property(QString::fromLatin1("value")));
- QString valueAsString = in.property(QString::fromLatin1("valueAsString")).toString();
- int flags = in.property(QString::fromLatin1("flags")).toInt32();
- QScriptDebuggerValueProperty tmp(name, value, valueAsString, QScriptValue::PropertyFlags(flags));
- out = tmp;
-}
-
/*!
\since 4.5
\class QScriptDebuggerScriptedConsoleCommand
@@ -279,19 +84,17 @@ public:
QStringList seeAlso;
QStringList argumentTypes;
QStringList subCommands;
- QScriptEngine *engine;
+ QScriptValue globalObject;
QScriptValue execFunction;
QScriptValue responseFunction;
};
QScriptDebuggerScriptedConsoleCommandPrivate::QScriptDebuggerScriptedConsoleCommandPrivate()
{
- engine = 0;
}
QScriptDebuggerScriptedConsoleCommandPrivate::~QScriptDebuggerScriptedConsoleCommandPrivate()
{
- delete engine;
}
QScriptDebuggerScriptedConsoleCommand::QScriptDebuggerScriptedConsoleCommand(
@@ -299,6 +102,7 @@ QScriptDebuggerScriptedConsoleCommand::QScriptDebuggerScriptedConsoleCommand(
const QString &shortDescription, const QString &longDescription,
const QStringList &aliases, const QStringList &seeAlso,
const QStringList &argumentTypes, const QStringList &subCommands,
+ const QScriptValue &globalObject,
const QScriptValue &execFunction, const QScriptValue &responseFunction)
: QScriptDebuggerConsoleCommand(*new QScriptDebuggerScriptedConsoleCommandPrivate)
{
@@ -311,25 +115,9 @@ QScriptDebuggerScriptedConsoleCommand::QScriptDebuggerScriptedConsoleCommand(
d->seeAlso = seeAlso;
d->argumentTypes = argumentTypes;
d->subCommands = subCommands;
+ d->globalObject = globalObject;
d->execFunction = execFunction;
d->responseFunction = responseFunction;
- d->engine = execFunction.engine();
-
- qScriptRegisterMetaType<QScriptBreakpointData>(d->engine, breakpointDataToScriptValue, breakpointDataFromScriptValue);
- qScriptRegisterMetaType<QScriptBreakpointMap>(d->engine, breakpointMapToScriptValue, breakpointMapFromScriptValue);
- qScriptRegisterMetaType<QScriptScriptData>(d->engine, scriptDataToScriptValue, scriptDataFromScriptValue);
- qScriptRegisterMetaType<QScriptScriptMap>(d->engine, scriptMapToScriptValue, scriptMapFromScriptValue);
- qScriptRegisterMetaType<QScriptContextInfo>(d->engine, contextInfoToScriptValue, contextInfoFromScriptValue);
- qScriptRegisterMetaType<QScriptDebuggerValueProperty>(d->engine, debuggerScriptValuePropertyToScriptValue, debuggerScriptValuePropertyFromScriptValue);
- qScriptRegisterSequenceMetaType<QScriptDebuggerValuePropertyList>(d->engine);
- qScriptRegisterMetaType<QScriptDebuggerResponse>(d->engine, debuggerResponseToScriptValue, debuggerResponseFromScriptValue);
- qScriptRegisterMetaType<QScriptDebuggerConsoleCommand*>(d->engine, consoleCommandToScriptValue, consoleCommandFromScriptValue);
- qScriptRegisterSequenceMetaType<QScriptDebuggerConsoleCommandList>(d->engine);
- qScriptRegisterMetaType<QScriptDebuggerConsoleCommandGroupData>(d->engine, consoleCommandGroupDataToScriptValue, consoleCommandGroupDataFromScriptValue);
- qScriptRegisterMetaType<QScriptDebuggerConsoleCommandGroupMap>(d->engine, consoleCommandGroupMapToScriptValue, consoleCommandGroupMapFromScriptValue);
-// ### can't do this, if it's an object ID the conversion will be incorrect since
-// ### the object ID refers to an object in a different engine!
-// qScriptRegisterMetaType(d->engine, debuggerScriptValueToScriptValue, debuggerScriptValueFromScriptValue);
}
QScriptDebuggerScriptedConsoleCommand::~QScriptDebuggerScriptedConsoleCommand()
@@ -405,7 +193,8 @@ int QScriptDebuggerScriptedConsoleCommandJob::scheduleCommand(
void QScriptDebuggerScriptedConsoleCommandJob::start()
{
Q_D(QScriptDebuggerScriptedConsoleCommandJob);
- QScriptEngine *engine = d->command->engine;
+ QScriptEngine *engine = d->command->globalObject.engine();
+ engine->setGlobalObject(d->command->globalObject);
QScriptValueList args;
for (int i = 0; i < d->arguments.size(); ++i)
args.append(QScriptValue(engine, d->arguments.at(i)));
@@ -435,12 +224,13 @@ void QScriptDebuggerScriptedConsoleCommandJob::handleResponse(
{
Q_D(QScriptDebuggerScriptedConsoleCommandJob);
// ### generalize
- QScriptEngine *engine = d->command->engine;
+ QScriptEngine *engine = d->command->globalObject.engine();
+ engine->setGlobalObject(d->command->globalObject);
QScriptValueList args;
args.append(qScriptValueFromValue(engine, response));
args.append(QScriptValue(engine, commandId));
QScriptDebuggerConsoleGlobalObject *global;
- global = qobject_cast<QScriptDebuggerConsoleGlobalObject*>(engine->globalObject().toQObject());
+ global = qobject_cast<QScriptDebuggerConsoleGlobalObject*>(d->command->globalObject.toQObject());
Q_ASSERT(global != 0);
global->setScheduler(this);
global->setResponseHandler(this);
@@ -551,9 +341,8 @@ QScriptDebuggerConsoleCommandJob *QScriptDebuggerScriptedConsoleCommand::createJ
*/
QScriptDebuggerScriptedConsoleCommand *QScriptDebuggerScriptedConsoleCommand::parse(
const QString &program, const QString &fileName,
- QScriptMessageHandlerInterface *messageHandler)
+ QScriptEngine *engine, QScriptMessageHandlerInterface *messageHandler)
{
- QScriptEngine *engine = new QScriptEngine();
// create a custom global object
QScriptDebuggerConsoleGlobalObject *cppGlobal = new QScriptDebuggerConsoleGlobalObject();
QScriptValue global = engine->newQObject(cppGlobal,
@@ -574,14 +363,12 @@ QScriptDebuggerScriptedConsoleCommand *QScriptDebuggerScriptedConsoleCommand::pa
if (engine->hasUncaughtException()) {
messageHandler->message(QtCriticalMsg, ret.toString(), fileName,
engine->uncaughtExceptionLineNumber());
- delete engine;
return 0;
}
QScriptValue name = global.property(QLatin1String("name"));
if (!name.isString()) {
messageHandler->message(QtCriticalMsg, QLatin1String("command definition lacks a name"), fileName);
- delete engine;
return 0;
}
QString nameStr = name.toString();
@@ -590,7 +377,6 @@ QScriptDebuggerScriptedConsoleCommand *QScriptDebuggerScriptedConsoleCommand::pa
if (!group.isString()) {
messageHandler->message(QtCriticalMsg, QString::fromLatin1("definition of command \"%0\" lacks a group name")
.arg(nameStr), fileName);
- delete engine;
return 0;
}
QString groupStr = group.toString();
@@ -599,7 +385,6 @@ QScriptDebuggerScriptedConsoleCommand *QScriptDebuggerScriptedConsoleCommand::pa
if (!shortDesc.isString()) {
messageHandler->message(QtCriticalMsg, QString::fromLatin1("definition of command \"%0\" lacks shortDescription")
.arg(nameStr), fileName);
- delete engine;
return 0;
}
QString shortDescStr = shortDesc.toString();
@@ -608,7 +393,6 @@ QScriptDebuggerScriptedConsoleCommand *QScriptDebuggerScriptedConsoleCommand::pa
if (!longDesc.isString()) {
messageHandler->message(QtCriticalMsg, QString::fromLatin1("definition of command \"%0\" lacks longDescription")
.arg(nameStr), fileName);
- delete engine;
return 0;
}
QString longDescStr = longDesc.toString();
@@ -629,7 +413,6 @@ QScriptDebuggerScriptedConsoleCommand *QScriptDebuggerScriptedConsoleCommand::pa
if (!execFunction.isFunction()) {
messageHandler->message(QtCriticalMsg, QString::fromLatin1("definition of command \"%0\" lacks execute() function")
.arg(nameStr), fileName);
- delete engine;
return 0;
}
@@ -640,7 +423,7 @@ QScriptDebuggerScriptedConsoleCommand *QScriptDebuggerScriptedConsoleCommand::pa
shortDescStr, longDescStr,
aliases, seeAlso,
argTypes, subCommands,
- execFunction, responseFunction);
+ global, execFunction, responseFunction);
return result;
}
diff --git a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand_p.h b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand_p.h
index 1536de2e1f..2b2b3f8f07 100644
--- a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand_p.h
+++ b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand_p.h
@@ -57,6 +57,7 @@
QT_BEGIN_NAMESPACE
+class QScriptEngine;
class QScriptValue;
class QScriptDebuggerScriptedConsoleCommandPrivate;
@@ -72,6 +73,7 @@ protected:
const QStringList &seeAlso,
const QStringList &argumentTypes,
const QStringList &subCommands,
+ const QScriptValue &globalObject,
const QScriptValue &execFunction,
const QScriptValue &responseFunction);
public:
@@ -79,7 +81,7 @@ public:
static QScriptDebuggerScriptedConsoleCommand *parse(
const QString &program, const QString &fileName,
- QScriptMessageHandlerInterface *messageHandler);
+ QScriptEngine *engine, QScriptMessageHandlerInterface *messageHandler);
QString name() const;
QString group() const;
diff --git a/src/sql/drivers/db2/qsql_db2.cpp b/src/sql/drivers/db2/qsql_db2.cpp
index d5b398429d..ea0b42e0d7 100644
--- a/src/sql/drivers/db2/qsql_db2.cpp
+++ b/src/sql/drivers/db2/qsql_db2.cpp
@@ -109,7 +109,7 @@ public:
static QString qFromTChar(SQLTCHAR* str)
{
- return QString::fromUtf16(str);
+ return QString((const QChar *)str);
}
// dangerous!! (but fast). Don't use in functions that
@@ -833,7 +833,7 @@ bool QDB2Result::exec()
break;
case QVariant::String:
if (bindValueType(i) & QSql::Out)
- values[i] = QString::fromUtf16((ushort*)tmpStorage.takeFirst().constData());
+ values[i] = QString((const QChar *)tmpStorage.takeFirst().constData());
break;
default: {
values[i] = QString::fromAscii(tmpStorage.takeFirst().constData());
diff --git a/src/sql/drivers/drivers.pri b/src/sql/drivers/drivers.pri
index 7250c6e26f..8dfc50f88e 100644
--- a/src/sql/drivers/drivers.pri
+++ b/src/sql/drivers/drivers.pri
@@ -6,19 +6,16 @@ contains(sql-drivers, psql) {
HEADERS += drivers/psql/qsql_psql.h
SOURCES += drivers/psql/qsql_psql.cpp
- unix {
- !isEmpty(QT_LFLAGS_PSQL) {
- LIBS *= $$QT_LFLAGS_PSQL
+ unix|win32-g++ {
+ !static:!isEmpty(QT_LFLAGS_PSQL) {
+ !contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz
+ !static:LIBS *= $$QT_LFLAGS_PSQL
QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL
}
!contains(LIBS, .*pq.*):LIBS *= -lpq
}
- win32 {
- !win32-g++:!contains( LIBS, .*pq.* ):LIBS *= -llibpq
- win32-g++:!contains( LIBS, .*pq.* ):LIBS *= -lpq
- LIBS *= -lws2_32 -ladvapi32
- }
+ win32:!win32-g++:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32
}
contains(sql-drivers, mysql) {
diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp
index 4a211fc013..2f0cfdce58 100644
--- a/src/sql/drivers/oci/qsql_oci.cpp
+++ b/src/sql/drivers/oci/qsql_oci.cpp
@@ -56,6 +56,12 @@
#include <qvector.h>
#include <qdebug.h>
+// This is needed for oracle oci when compiling with mingw-w64 headers
+#if defined(__MINGW64_VERSION_MAJOR) && defined(_WIN64)
+#define _int64 __int64
+#endif
+
+
#include <oci.h>
#ifdef max
#undef max
@@ -364,8 +370,8 @@ static void qOraOutValue(QVariant &value, QList<QByteArray> &storage)
value = qMakeDate(storage.takeFirst());
break;
case QVariant::String:
- value = QString::fromUtf16(
- reinterpret_cast<const ushort *>(storage.takeFirst().constData()));
+ value = QString(
+ reinterpret_cast<const QChar *>(storage.takeFirst().constData()));
break;
default:
break; //nothing
@@ -454,7 +460,7 @@ QString qOraWarn(OCIError *err, int *errorCode)
OCI_HTYPE_ERROR);
if (errorCode)
*errorCode = errcode;
- return QString::fromUtf16(reinterpret_cast<const ushort *>(errbuf));
+ return QString(reinterpret_cast<const QChar *>(errbuf));
}
void qOraWarning(const char* msg, OCIError *err)
@@ -989,8 +995,7 @@ int QOCICols::readPiecewise(QVector<QVariant> &values, int index)
} else {
if (isStringField) {
QString str = values.at(fieldNum + index).toString();
- str += QString::fromUtf16(reinterpret_cast<const ushort *>(col),
- chunkSize / 2);
+ str += QString(reinterpret_cast<const QChar *>(col), chunkSize / 2);
values[fieldNum + index] = str;
fieldInf[fieldNum].ind = 0;
} else {
@@ -1457,7 +1462,7 @@ bool QOCICols::execBatch(QOCIResultPrivate *d, QVector<QVariant> &boundValues, b
break;
case SQLT_STR:
- (*list)[r] = QString::fromUtf16(reinterpret_cast<ushort *>(data
+ (*list)[r] = QString(reinterpret_cast<const QChar *>(data
+ r * columns[i].maxLen));
break;
@@ -1608,7 +1613,7 @@ void QOCICols::getValues(QVector<QVariant> &v, int index)
}
// else fall through
case QVariant::String:
- v[index + i] = QString::fromUtf16(reinterpret_cast<const ushort *>(fld.data));
+ v[index + i] = QString(reinterpret_cast<const QChar *>(fld.data));
break;
case QVariant::ByteArray:
if (fld.len > 0)
@@ -2102,7 +2107,7 @@ bool QOCIDriver::open(const QString & db,
qWarning("QOCIDriver::open: could not get Oracle server version.");
} else {
QString versionStr;
- versionStr = QString::fromUtf16(reinterpret_cast<ushort *>(vertxt));
+ versionStr = QString(reinterpret_cast<const QChar *>(vertxt));
QRegExp vers(QLatin1String("([0-9]+)\\.[0-9\\.]+[0-9]"));
if (vers.indexIn(versionStr) >= 0)
d->serverVersion = vers.cap(1).toInt();
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index e75c19d795..ee22bc3a98 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -62,15 +62,8 @@ QT_BEGIN_NAMESPACE
// undefine this to prevent initial check of the ODBC driver
#define ODBC_CHECK_DRIVER
-#if defined(Q_ODBC_VERSION_2)
-//crude hack to get non-unicode capable driver managers to work
-# undef UNICODE
-# define SQLTCHAR SQLCHAR
-# define SQL_C_TCHAR SQL_C_CHAR
-#endif
-
// newer platform SDKs use SQLLEN instead of SQLINTEGER
-#if defined(WIN32) && (_MSC_VER < 1300)
+#if defined(WIN32) && (_MSC_VER < 1300) && !defined(__MINGW64_VERSION_MAJOR)
# define QSQLLEN SQLINTEGER
# define QSQLULEN SQLUINTEGER
#else
@@ -340,13 +333,11 @@ static QVariant::Type qDecodeODBCType(SQLSMALLINT sqltype, const T* p, bool isSi
case SQL_TYPE_TIMESTAMP:
type = QVariant::DateTime;
break;
-#ifndef Q_ODBC_VERSION_2
case SQL_WCHAR:
case SQL_WVARCHAR:
case SQL_WLONGVARCHAR:
type = QVariant::String;
break;
-#endif
case SQL_CHAR:
case SQL_VARCHAR:
case SQL_GUID:
@@ -620,17 +611,9 @@ static QSqlField qMakeFieldInfo(const QODBCPrivate* p, int i )
static int qGetODBCVersion(const QString &connOpts)
{
-#ifndef Q_ODBC_VERSION_2
if (connOpts.contains(QLatin1String("SQL_ATTR_ODBC_VERSION=SQL_OV_ODBC3"), Qt::CaseInsensitive))
return SQL_OV_ODBC3;
-#endif
- if (connOpts.contains(QLatin1String("SQL_ATTR_ODBC_VERSION=SQL_OV_ODBC2"), Qt::CaseInsensitive))
- return SQL_OV_ODBC2;
-#ifdef _IODBCUNIX_H
- return SQL_OV_ODBC3;
-#else
return SQL_OV_ODBC2;
-#endif
}
QChar QODBCDriverPrivate::quoteChar()
@@ -731,7 +714,6 @@ bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts)
continue;
}
r = SQLSetConnectAttr(hDbc, SQL_ATTR_TRACE, (SQLPOINTER) v, 0);
-#ifndef Q_ODBC_VERSION_2
} else if (opt.toUpper() == QLatin1String("SQL_ATTR_CONNECTION_POOLING")) {
if (val == QLatin1String("SQL_CP_OFF"))
v = SQL_CP_OFF;
@@ -758,7 +740,6 @@ bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts)
continue;
}
r = SQLSetConnectAttr(hDbc, SQL_ATTR_CP_MATCH, (SQLPOINTER)v, 0);
-#endif
} else if (opt.toUpper() == QLatin1String("SQL_ATTR_ODBC_VERSION")) {
// Already handled in QODBCDriver::open()
continue;
@@ -1484,7 +1465,6 @@ bool QODBCResult::exec()
*ind == SQL_NULL_DATA ? ind : NULL);
break;
case QVariant::String:
-#ifndef Q_ODBC_VERSION_2
if (d->unicode) {
QString str = val.toString();
if (*ind != SQL_NULL_DATA)
@@ -1522,7 +1502,6 @@ bool QODBCResult::exec()
break;
}
else
-#endif
{
QByteArray str = val.toString().toUtf8();
if (*ind != SQL_NULL_DATA)
@@ -1927,11 +1906,6 @@ void QODBCDriver::cleanup()
// as two byte unicode characters
void QODBCDriverPrivate::checkUnicode()
{
-#if defined(Q_ODBC_VERSION_2)
- unicode = false;
- return;
-#endif
-
SQLRETURN r;
SQLUINTEGER fFunc;
diff --git a/src/sql/drivers/odbc/qsql_odbc.h b/src/sql/drivers/odbc/qsql_odbc.h
index 13b2cc3e7f..e739a3862c 100644
--- a/src/sql/drivers/odbc/qsql_odbc.h
+++ b/src/sql/drivers/odbc/qsql_odbc.h
@@ -49,13 +49,6 @@
#include <QtCore/qt_windows.h>
#endif
-#if defined (Q_OS_MAC) && (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3)
-// assume we use iodbc on MACX
-// comment next line out if you use a
-// unicode compatible manager
-# define Q_ODBC_VERSION_2
-#endif
-
#ifdef QT_PLUGIN
#define Q_EXPORT_SQLDRIVER_ODBC
#else
diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp
index d3be304b02..24dcad9f18 100644
--- a/src/sql/drivers/sqlite/qsql_sqlite.cpp
+++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp
@@ -95,7 +95,7 @@ static QSqlError qMakeError(sqlite3 *access, const QString &descr, QSqlError::Er
int errorCode = -1)
{
return QSqlError(descr,
- QString::fromUtf16(static_cast<const ushort *>(sqlite3_errmsg16(access))),
+ QString(reinterpret_cast<const QChar *>(sqlite3_errmsg16(access))),
type, errorCode);
}
@@ -162,13 +162,13 @@ void QSQLiteResultPrivate::initColumns(bool emptyResultset)
q->init(nCols);
for (int i = 0; i < nCols; ++i) {
- QString colName = QString::fromUtf16(
- static_cast<const ushort *>(sqlite3_column_name16(stmt, i))
+ QString colName = QString(reinterpret_cast<const QChar *>(
+ sqlite3_column_name16(stmt, i))
).remove(QLatin1Char('"'));
// must use typeName for resolving the type to match QSqliteDriver::record
- QString typeName = QString::fromUtf16(
- static_cast<const ushort *>(sqlite3_column_decltype16(stmt, i)));
+ QString typeName = QString(reinterpret_cast<const QChar *>(
+ sqlite3_column_decltype16(stmt, i)));
int dotIdx = colName.lastIndexOf(QLatin1Char('.'));
QSqlField fld(colName.mid(dotIdx == -1 ? 0 : dotIdx + 1), qGetColumnType(typeName));
diff --git a/src/src.pro b/src/src.pro
index f2070ae223..809a0781e7 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -19,7 +19,6 @@ contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, o
contains(QT_CONFIG, openvg): SRC_SUBDIRS += src_openvg
contains(QT_CONFIG, xmlpatterns): SRC_SUBDIRS += src_xmlpatterns
contains(QT_CONFIG, phonon): SRC_SUBDIRS += src_phonon
-contains(QT_CONFIG, multimedia): SRC_SUBDIRS += src_multimedia
contains(QT_CONFIG, svg): SRC_SUBDIRS += src_svg
contains(QT_CONFIG, webkit) {
#exists($$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro): SRC_SUBDIRS += src_javascriptcore
@@ -28,7 +27,9 @@ contains(QT_CONFIG, webkit) {
contains(QT_CONFIG, script): SRC_SUBDIRS += src_script
contains(QT_CONFIG, scripttools): SRC_SUBDIRS += src_scripttools
contains(QT_CONFIG, declarative): SRC_SUBDIRS += src_declarative
+contains(QT_CONFIG, multimedia): SRC_SUBDIRS += src_multimedia
SRC_SUBDIRS += src_plugins
+contains(QT_CONFIG, declarative): SRC_SUBDIRS += src_imports
src_s60main.subdir = $$QT_SOURCE_TREE/src/s60main
src_s60main.target = sub-s60main
@@ -70,6 +71,8 @@ src_activeqt.subdir = $$QT_SOURCE_TREE/src/activeqt
src_activeqt.target = sub-activeqt
src_plugins.subdir = $$QT_SOURCE_TREE/src/plugins
src_plugins.target = sub-plugins
+src_imports.subdir = $$QT_SOURCE_TREE/src/imports
+src_imports.target = sub-imports
src_testlib.subdir = $$QT_SOURCE_TREE/src/testlib
src_testlib.target = sub-testlib
src_javascriptcore.subdir = $$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore
@@ -102,12 +105,14 @@ src_declarative.target = sub-declarative
src_multimedia.depends = src_gui
src_tools_activeqt.depends = src_tools_idc src_gui
src_declarative.depends = src_xml src_gui src_script src_network src_svg
- src_plugins.depends = src_gui src_sql src_svg
+ src_plugins.depends = src_gui src_sql src_svg src_multimedia
+ src_imports.depends = src_gui src_declarative
contains(QT_CONFIG, webkit) {
src_webkit.depends = src_gui src_sql src_network src_xml
contains(QT_CONFIG, phonon):src_webkit.depends += src_phonon
contains(QT_CONFIG, xmlpatterns): src_webkit.depends += src_xmlpatterns
contains(QT_CONFIG, declarative):src_declarative.depends += src_webkit
+ src_imports.depends += src_webkit
#exists($$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro): src_webkit.depends += src_javascriptcore
}
contains(QT_CONFIG, qt3support): src_plugins.depends += src_qt3support
diff --git a/src/svg/qsvggenerator.cpp b/src/svg/qsvggenerator.cpp
index 4a8fc0bd29..cb9086cf06 100644
--- a/src/svg/qsvggenerator.cpp
+++ b/src/svg/qsvggenerator.cpp
@@ -310,7 +310,6 @@ public:
{
*d_func()->stream << QLatin1String("fill=\"none\" ");
*d_func()->stream << QLatin1String("stroke=\"black\" ");
- *d_func()->stream << QLatin1String("vector-effect=\"non-scaling-stroke\" ");
*d_func()->stream << QLatin1String("stroke-width=\"1\" ");
*d_func()->stream << QLatin1String("fill-rule=\"evenodd\" ");
*d_func()->stream << QLatin1String("stroke-linecap=\"square\" ");
@@ -380,13 +379,10 @@ public:
break;
}
- if (spen.widthF() == 0) {
- width = QLatin1String("1");
- stream() << "vector-effect=\"non-scaling-stroke\" ";
- }
+ if (spen.widthF() == 0)
+ stream() <<"stroke-width=\"1\" ";
else
- width = QString::number(spen.widthF());
- stream() <<"stroke-width=\""<<width<<"\" ";
+ stream() <<"stroke-width=\"" << spen.widthF() << "\" ";
switch (spen.capStyle()) {
case Qt::FlatCap:
@@ -983,14 +979,11 @@ void QSvgPaintEngine::drawPath(const QPainterPath &p)
{
Q_D(QSvgPaintEngine);
- *d->stream << "<path "
- "fill-rule=";
- if (p.fillRule() == Qt::OddEvenFill)
- *d->stream << "\"evenodd\" ";
- else
- *d->stream << "\"nonzero\" ";
-
- *d->stream << "d=\"";
+ *d->stream << "<path vector-effect=\""
+ << (state->pen().isCosmetic() ? "non-scaling-stroke" : "none")
+ << "\" fill-rule=\""
+ << (p.fillRule() == Qt::OddEvenFill ? "evenodd" : "nonzero")
+ << "\" d=\"";
for (int i=0; i<p.elementCount(); ++i) {
const QPainterPath::Element &e = p.elementAt(i);
@@ -1038,7 +1031,9 @@ void QSvgPaintEngine::drawPolygon(const QPointF *points, int pointCount,
path.lineTo(points[i]);
if (mode == PolylineMode) {
- stream() << "<polyline fill=\"none\" points=\"";
+ stream() << "<polyline fill=\"none\" vector-effect=\""
+ << (state->pen().isCosmetic() ? "non-scaling-stroke" : "none")
+ << "\" points=\"";
for (int i = 0; i < pointCount; ++i) {
const QPointF &pt = points[i];
stream() << pt.x() << ',' << pt.y() << ' ';
diff --git a/src/svg/qsvggraphics.cpp b/src/svg/qsvggraphics.cpp
index cd0e1acebe..a29764ac3f 100644
--- a/src/svg/qsvggraphics.cpp
+++ b/src/svg/qsvggraphics.cpp
@@ -78,33 +78,29 @@ void QSvgAnimation::draw(QPainter *, QSvgExtraStates &)
qWarning("<animation> no implemented");
}
-static inline QRectF boundsOnStroke(const QPainterPath &path, qreal width)
+static inline QRectF boundsOnStroke(QPainter *p, const QPainterPath &path, qreal width)
{
QPainterPathStroker stroker;
stroker.setWidth(width);
QPainterPath stroke = stroker.createStroke(path);
- return stroke.boundingRect();
+ return p->transform().map(stroke).boundingRect();
}
-QSvgCircle::QSvgCircle(QSvgNode *parent, const QRectF &rect)
+QSvgEllipse::QSvgEllipse(QSvgNode *parent, const QRectF &rect)
: QSvgNode(parent), m_bounds(rect)
{
}
-QRectF QSvgCircle::bounds() const
+QRectF QSvgEllipse::bounds(QPainter *p, QSvgExtraStates &) const
{
- qreal sw = strokeWidth();
- if (qFuzzyIsNull(sw))
- return m_bounds;
- else {
- QPainterPath path;
- path.addRect(m_bounds);
- return boundsOnStroke(path, sw);
- }
+ QPainterPath path;
+ path.addEllipse(m_bounds);
+ qreal sw = strokeWidth(p);
+ return qFuzzyIsNull(sw) ? p->transform().map(path).boundingRect() : boundsOnStroke(p, path, sw);
}
-void QSvgCircle::draw(QPainter *p, QSvgExtraStates &states)
+void QSvgEllipse::draw(QPainter *p, QSvgExtraStates &states)
{
applyStyle(p, states);
QT_SVG_DRAW_SHAPE(p->drawEllipse(m_bounds));
@@ -112,9 +108,8 @@ void QSvgCircle::draw(QPainter *p, QSvgExtraStates &states)
}
QSvgArc::QSvgArc(QSvgNode *parent, const QPainterPath &path)
- : QSvgNode(parent), cubic(path)
+ : QSvgNode(parent), m_path(path)
{
- m_cachedBounds = path.boundingRect();
}
void QSvgArc::draw(QPainter *p, QSvgExtraStates &states)
@@ -123,36 +118,12 @@ void QSvgArc::draw(QPainter *p, QSvgExtraStates &states)
if (p->pen().widthF() != 0) {
qreal oldOpacity = p->opacity();
p->setOpacity(oldOpacity * states.strokeOpacity);
- p->drawPath(cubic);
+ p->drawPath(m_path);
p->setOpacity(oldOpacity);
}
revertStyle(p, states);
}
-QSvgEllipse::QSvgEllipse(QSvgNode *parent, const QRectF &rect)
- : QSvgNode(parent), m_bounds(rect)
-{
-}
-
-QRectF QSvgEllipse::bounds() const
-{
- qreal sw = strokeWidth();
- if (qFuzzyIsNull(sw))
- return m_bounds;
- else {
- QPainterPath path;
- path.addEllipse(m_bounds);
- return boundsOnStroke(path, sw);
- }
-}
-
-void QSvgEllipse::draw(QPainter *p, QSvgExtraStates &states)
-{
- applyStyle(p, states);
- QT_SVG_DRAW_SHAPE(p->drawEllipse(m_bounds));
- revertStyle(p, states);
-}
-
QSvgImage::QSvgImage(QSvgNode *parent, const QImage &image,
const QRect &bounds)
: QSvgNode(parent), m_image(image),
@@ -173,7 +144,7 @@ void QSvgImage::draw(QPainter *p, QSvgExtraStates &states)
QSvgLine::QSvgLine(QSvgNode *parent, const QLineF &line)
- : QSvgNode(parent), m_bounds(line)
+ : QSvgNode(parent), m_line(line)
{
}
@@ -184,7 +155,7 @@ void QSvgLine::draw(QPainter *p, QSvgExtraStates &states)
if (p->pen().widthF() != 0) {
qreal oldOpacity = p->opacity();
p->setOpacity(oldOpacity * states.strokeOpacity);
- p->drawLine(m_bounds);
+ p->drawLine(m_line);
p->setOpacity(oldOpacity);
}
revertStyle(p, states);
@@ -203,19 +174,11 @@ void QSvgPath::draw(QPainter *p, QSvgExtraStates &states)
revertStyle(p, states);
}
-QRectF QSvgPath::bounds() const
+QRectF QSvgPath::bounds(QPainter *p, QSvgExtraStates &) const
{
- qreal sw = strokeWidth();
- if (qFuzzyIsNull(sw)) {
- if (m_cachedBounds.isNull())
- //m_cachedBounds = m_path.controlPointRect();
- m_cachedBounds = m_path.boundingRect();
-
- return m_cachedBounds;
- }
- else {
- return boundsOnStroke(m_path, sw);
- }
+ qreal sw = strokeWidth(p);
+ return qFuzzyIsNull(sw) ? p->transform().map(m_path).boundingRect()
+ : boundsOnStroke(p, m_path, sw);
}
QSvgPolygon::QSvgPolygon(QSvgNode *parent, const QPolygonF &poly)
@@ -223,15 +186,15 @@ QSvgPolygon::QSvgPolygon(QSvgNode *parent, const QPolygonF &poly)
{
}
-QRectF QSvgPolygon::bounds() const
+QRectF QSvgPolygon::bounds(QPainter *p, QSvgExtraStates &) const
{
- qreal sw = strokeWidth();
- if (qFuzzyIsNull(sw))
- return m_poly.boundingRect();
- else {
+ qreal sw = strokeWidth(p);
+ if (qFuzzyIsNull(sw)) {
+ return p->transform().map(m_poly).boundingRect();
+ } else {
QPainterPath path;
path.addPolygon(m_poly);
- return boundsOnStroke(path, sw);
+ return boundsOnStroke(p, path, sw);
}
}
@@ -274,15 +237,15 @@ QSvgRect::QSvgRect(QSvgNode *node, const QRectF &rect, int rx, int ry)
{
}
-QRectF QSvgRect::bounds() const
+QRectF QSvgRect::bounds(QPainter *p, QSvgExtraStates &) const
{
- qreal sw = strokeWidth();
- if (qFuzzyIsNull(sw))
- return m_rect;
- else {
+ qreal sw = strokeWidth(p);
+ if (qFuzzyIsNull(sw)) {
+ return p->transform().mapRect(m_rect);
+ } else {
QPainterPath path;
path.addRect(m_rect);
- return boundsOnStroke(path, sw);
+ return boundsOnStroke(p, path, sw);
}
}
@@ -322,7 +285,7 @@ void QSvgText::setTextArea(const QSizeF &size)
m_type = TEXTAREA;
}
-//QRectF QSvgText::bounds() const {}
+//QRectF QSvgText::bounds(QPainter *p, QSvgExtraStates &) const {}
void QSvgText::draw(QPainter *p, QSvgExtraStates &states)
{
@@ -593,80 +556,57 @@ QSvgNode::Type QSvgVideo::type() const
return VIDEO;
}
-QRectF QSvgUse::bounds() const
-{
- if (m_link && m_bounds.isEmpty()) {
- m_bounds = m_link->bounds();
- m_bounds = QRectF(m_bounds.x()+m_start.x(),
- m_bounds.y()+m_start.y(),
- m_bounds.width(),
- m_bounds.height());
-
- return m_bounds;
- }
- return m_bounds;
-}
-
-QRectF QSvgUse::transformedBounds(const QTransform &transform) const
+QRectF QSvgUse::bounds(QPainter *p, QSvgExtraStates &states) const
{
QRectF bounds;
- QTransform t = transform;
-
- if (m_link) {
- QSvgTransformStyle *transStyle = m_style.transform;
- if (transStyle) {
- t = transStyle->qtransform() * t;
- }
- t.translate(m_start.x(), m_start.y());
-
- bounds = m_link->transformedBounds(t);
-
- return bounds;
+ if (m_link) {
+ p->translate(m_start);
+ bounds = m_link->transformedBounds(p, states);
+ p->translate(-m_start);
}
return bounds;
}
-QRectF QSvgPolyline::bounds() const
+QRectF QSvgPolyline::bounds(QPainter *p, QSvgExtraStates &) const
{
- qreal sw = strokeWidth();
- if (qFuzzyIsNull(sw))
- return m_poly.boundingRect();
- else {
+ qreal sw = strokeWidth(p);
+ if (qFuzzyIsNull(sw)) {
+ return p->transform().map(m_poly).boundingRect();
+ } else {
QPainterPath path;
path.addPolygon(m_poly);
- return boundsOnStroke(path, sw);
+ return boundsOnStroke(p, path, sw);
}
}
-QRectF QSvgArc::bounds() const
+QRectF QSvgArc::bounds(QPainter *p, QSvgExtraStates &) const
{
- qreal sw = strokeWidth();
- if (qFuzzyIsNull(sw))
- return m_cachedBounds;
- else {
- return boundsOnStroke(cubic, sw);
- }
+ qreal sw = strokeWidth(p);
+ return qFuzzyIsNull(sw) ? p->transform().map(m_path).boundingRect()
+ : boundsOnStroke(p, m_path, sw);
}
-QRectF QSvgImage::bounds() const
+QRectF QSvgImage::bounds(QPainter *p, QSvgExtraStates &) const
{
- return m_bounds;
+ return p->transform().mapRect(m_bounds);
}
-QRectF QSvgLine::bounds() const
+QRectF QSvgLine::bounds(QPainter *p, QSvgExtraStates &) const
{
- qreal sw = strokeWidth();
+ qreal sw = strokeWidth(p);
if (qFuzzyIsNull(sw)) {
- qreal minX = qMin(m_bounds.x1(), m_bounds.x2());
- qreal minY = qMin(m_bounds.y1(), m_bounds.y2());
- qreal maxX = qMax(m_bounds.x1(), m_bounds.x2());
- qreal maxY = qMax(m_bounds.y1(), m_bounds.y2());
- return QRectF(minX, minY, maxX-minX, maxY-minY);
+ QPointF p1 = p->transform().map(m_line.p1());
+ QPointF p2 = p->transform().map(m_line.p2());
+ qreal minX = qMin(p1.x(), p2.x());
+ qreal minY = qMin(p1.y(), p2.y());
+ qreal maxX = qMax(p1.x(), p2.x());
+ qreal maxY = qMax(p1.y(), p2.y());
+ return QRectF(minX, minY, maxX - minX, maxY - minY);
} else {
QPainterPath path;
- path.moveTo(m_bounds.x1(), m_bounds.y1());
- path.lineTo(m_bounds.x2(), m_bounds.y2());
- return boundsOnStroke(path, sw);
+ path.moveTo(m_line.p1());
+ path.lineTo(m_line.p2());
+ return boundsOnStroke(p, path, sw);
}
}
diff --git a/src/svg/qsvggraphics_p.h b/src/svg/qsvggraphics_p.h
index ca0677782f..fdc770ad8b 100644
--- a/src/svg/qsvggraphics_p.h
+++ b/src/svg/qsvggraphics_p.h
@@ -80,32 +80,27 @@ public:
QSvgArc(QSvgNode *parent, const QPainterPath &path);
virtual void draw(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
- virtual QRectF bounds() const;
+ virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
private:
- QPainterPath cubic;
- QRectF m_cachedBounds;
+ QPainterPath m_path;
};
-class QSvgCircle : public QSvgNode
+class QSvgEllipse : public QSvgNode
{
public:
- QSvgCircle(QSvgNode *parent, const QRectF &rect);
+ QSvgEllipse(QSvgNode *parent, const QRectF &rect);
virtual void draw(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
- virtual QRectF bounds() const;
+ virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
private:
QRectF m_bounds;
};
-class QSvgEllipse : public QSvgNode
+class QSvgCircle : public QSvgEllipse
{
public:
- QSvgEllipse(QSvgNode *parent, const QRectF &rect);
- virtual void draw(QPainter *p, QSvgExtraStates &states);
+ QSvgCircle(QSvgNode *parent, const QRectF &rect) : QSvgEllipse(parent, rect) { }
virtual Type type() const;
- virtual QRectF bounds() const;
-private:
- QRectF m_bounds;
};
class QSvgImage : public QSvgNode
@@ -115,7 +110,7 @@ public:
const QRect &bounds);
virtual void draw(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
- virtual QRectF bounds() const;
+ virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
private:
QImage m_image;
QRect m_bounds;
@@ -127,9 +122,9 @@ public:
QSvgLine(QSvgNode *parent, const QLineF &line);
virtual void draw(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
- virtual QRectF bounds() const;
+ virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
private:
- QLineF m_bounds;
+ QLineF m_line;
};
class QSvgPath : public QSvgNode
@@ -138,14 +133,13 @@ public:
QSvgPath(QSvgNode *parent, const QPainterPath &qpath);
virtual void draw(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
- virtual QRectF bounds() const;
+ virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
QPainterPath *qpath() {
return &m_path;
}
private:
QPainterPath m_path;
- mutable QRectF m_cachedBounds;
};
class QSvgPolygon : public QSvgNode
@@ -154,7 +148,7 @@ public:
QSvgPolygon(QSvgNode *parent, const QPolygonF &poly);
virtual void draw(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
- virtual QRectF bounds() const;
+ virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
private:
QPolygonF m_poly;
};
@@ -165,7 +159,7 @@ public:
QSvgPolyline(QSvgNode *parent, const QPolygonF &poly);
virtual void draw(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
- virtual QRectF bounds() const;
+ virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
private:
QPolygonF m_poly;
};
@@ -176,7 +170,7 @@ public:
QSvgRect(QSvgNode *paren, const QRectF &rect, int rx=0, int ry=0);
virtual Type type() const;
virtual void draw(QPainter *p, QSvgExtraStates &states);
- virtual QRectF bounds() const;
+ virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
private:
QRectF m_rect;
int m_rx, m_ry;
@@ -205,7 +199,7 @@ public:
void addLineBreak() {m_tspans.append(LINEBREAK);}
void setWhitespaceMode(WhitespaceMode mode) {m_mode = mode;}
- //virtual QRectF bounds() const;
+ //virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
private:
static QSvgTspan * const LINEBREAK;
@@ -248,13 +242,11 @@ public:
QSvgUse(const QPointF &start, QSvgNode *parent, QSvgNode *link);
virtual void draw(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
- virtual QRectF bounds() const;
- virtual QRectF transformedBounds(const QTransform &transform) const;
+ virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
private:
QSvgNode *m_link;
QPointF m_start;
- mutable QRectF m_bounds;
};
class QSvgVideo : public QSvgNode
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index 926b04dbc7..bc4ca76e75 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -2962,9 +2962,9 @@ static QSvgNode *createRectNode(QSvgNode *parent,
if (nry > bounds.height()/2)
nry = bounds.height()/2;
- if (nrx && !nry)
+ if (!rx.isEmpty() && ry.isEmpty())
nry = nrx;
- else if (nry && !nrx)
+ else if (!ry.isEmpty() && rx.isEmpty())
nrx = nry;
//we draw rounded rect from 0...99
diff --git a/src/svg/qsvgnode.cpp b/src/svg/qsvgnode.cpp
index 86f2af548f..f6bc1c00b9 100644
--- a/src/svg/qsvgnode.cpp
+++ b/src/svg/qsvgnode.cpp
@@ -45,6 +45,7 @@
#ifndef QT_NO_SVG
#include "qdebug.h"
+#include "qstack.h"
QT_BEGIN_NAMESPACE
@@ -114,12 +115,12 @@ void QSvgNode::appendStyleProperty(QSvgStyleProperty *prop, const QString &id)
}
}
-void QSvgNode::applyStyle(QPainter *p, QSvgExtraStates &states)
+void QSvgNode::applyStyle(QPainter *p, QSvgExtraStates &states) const
{
- m_style.apply(p, bounds(), this, states);
+ m_style.apply(p, this, states);
}
-void QSvgNode::revertStyle(QPainter *p, QSvgExtraStates &states)
+void QSvgNode::revertStyle(QPainter *p, QSvgExtraStates &states) const
{
m_style.revert(p, states);
}
@@ -195,11 +196,40 @@ QSvgFillStyleProperty * QSvgNode::styleProperty(const QString &id) const
return doc ? doc->namedStyle(rid) : 0;
}
-QRectF QSvgNode::bounds() const
+QRectF QSvgNode::bounds(QPainter *, QSvgExtraStates &) const
{
return QRectF(0, 0, 0, 0);
}
+QRectF QSvgNode::transformedBounds() const
+{
+ if (!m_cachedBounds.isEmpty())
+ return m_cachedBounds;
+
+ QImage dummy(1, 1, QImage::Format_RGB32);
+ QPainter p(&dummy);
+ QSvgExtraStates states;
+
+ QPen pen(Qt::NoBrush, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ pen.setMiterLimit(4);
+ p.setPen(pen);
+
+ QStack<QSvgNode*> parentApplyStack;
+ QSvgNode *parent = m_parent;
+ while (parent) {
+ parentApplyStack.push(parent);
+ parent = parent->parent();
+ }
+
+ for (int i = parentApplyStack.size() - 1; i >= 0; --i)
+ parentApplyStack[i]->applyStyle(&p, states);
+
+ p.setWorldTransform(QTransform());
+
+ m_cachedBounds = transformedBounds(&p, states);
+ return m_cachedBounds;
+}
+
QSvgTinyDocument * QSvgNode::document() const
{
QSvgTinyDocument *doc = 0;
@@ -274,19 +304,11 @@ void QSvgNode::setVisible(bool visible)
m_visible = visible;
}
-QRectF QSvgNode::transformedBounds(const QTransform &transform) const
+QRectF QSvgNode::transformedBounds(QPainter *p, QSvgExtraStates &states) const
{
- QTransform t = transform;
-
- QSvgTransformStyle *transStyle = m_style.transform;
- if (transStyle) {
- t = transStyle->qtransform() * t;
- }
-
- QRectF rect = bounds();
-
- rect = t.mapRect(rect);
-
+ applyStyle(p, states);
+ QRectF rect = bounds(p, states);
+ revertStyle(p, states);
return rect;
}
@@ -310,15 +332,12 @@ QSvgNode::DisplayMode QSvgNode::displayMode() const
return m_displayMode;
}
-qreal QSvgNode::strokeWidth() const
+qreal QSvgNode::strokeWidth(QPainter *p)
{
- QSvgStrokeStyle *stroke = static_cast<QSvgStrokeStyle*>(
- styleProperty(QSvgStyleProperty::STROKE));
- if (!stroke)
- return 0;
- if (stroke->stroke().brush().style() == Qt::NoBrush)
+ QPen pen = p->pen();
+ if (pen.style() == Qt::NoPen || pen.brush().style() == Qt::NoBrush || pen.isCosmetic())
return 0;
- return stroke->width();
+ return pen.widthF();
}
QT_END_NAMESPACE
diff --git a/src/svg/qsvgnode_p.h b/src/svg/qsvgnode_p.h
index 15466f25b5..a34c7c0bf5 100644
--- a/src/svg/qsvgnode_p.h
+++ b/src/svg/qsvgnode_p.h
@@ -118,16 +118,17 @@ public:
QSvgNode *parent() const;
void appendStyleProperty(QSvgStyleProperty *prop, const QString &id);
- void applyStyle(QPainter *p, QSvgExtraStates &states);
- void revertStyle(QPainter *p, QSvgExtraStates &states);
+ void applyStyle(QPainter *p, QSvgExtraStates &states) const;
+ void revertStyle(QPainter *p, QSvgExtraStates &states) const;
QSvgStyleProperty *styleProperty(QSvgStyleProperty::Type type) const;
QSvgFillStyleProperty *styleProperty(const QString &id) const;
QSvgTinyDocument *document() const;
virtual Type type() const =0;
- virtual QRectF bounds() const;
- virtual QRectF transformedBounds(const QTransform &transform) const;
+ virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
+ virtual QRectF transformedBounds(QPainter *p, QSvgExtraStates &states) const;
+ QRectF transformedBounds() const;
void setRequiredFeatures(const QStringList &lst);
const QStringList & requiredFeatures() const;
@@ -156,9 +157,9 @@ public:
QString xmlClass() const;
void setXmlClass(const QString &str);
protected:
- QSvgStyle m_style;
+ mutable QSvgStyle m_style;
- qreal strokeWidth() const;
+ static qreal strokeWidth(QPainter *p);
private:
QSvgNode *m_parent;
@@ -174,6 +175,7 @@ private:
QString m_class;
DisplayMode m_displayMode;
+ mutable QRectF m_cachedBounds;
friend class QSvgTinyDocument;
};
diff --git a/src/svg/qsvgstructure.cpp b/src/svg/qsvgstructure.cpp
index 34426b788e..db5cb9ee4a 100644
--- a/src/svg/qsvgstructure.cpp
+++ b/src/svg/qsvgstructure.cpp
@@ -357,15 +357,12 @@ void QSvgSwitch::init()
m_systemLanguagePrefix = m_systemLanguage.mid(0, idx);
}
-QRectF QSvgStructureNode::bounds() const
+QRectF QSvgStructureNode::bounds(QPainter *p, QSvgExtraStates &states) const
{
- if (m_bounds.isEmpty()) {
- foreach(QSvgNode *node, m_renderers) {
- m_bounds |= node->transformedBounds(QTransform());
- }
- }
-
- return m_bounds;
+ QRectF bounds;
+ foreach(QSvgNode *node, m_renderers)
+ bounds |= node->transformedBounds(p, states);
+ return bounds;
}
QSvgNode * QSvgStructureNode::previousSiblingNode(QSvgNode *n) const
diff --git a/src/svg/qsvgstructure_p.h b/src/svg/qsvgstructure_p.h
index fd6eb0a370..dd82fc05c8 100644
--- a/src/svg/qsvgstructure_p.h
+++ b/src/svg/qsvgstructure_p.h
@@ -74,14 +74,13 @@ public:
~QSvgStructureNode();
QSvgNode *scopeNode(const QString &id) const;
void addChild(QSvgNode *child, const QString &id);
- virtual QRectF bounds() const;
+ virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
QSvgNode *previousSiblingNode(QSvgNode *n) const;
QList<QSvgNode*> renderers() const { return m_renderers; }
protected:
QList<QSvgNode*> m_renderers;
QHash<QString, QSvgNode*> m_scope;
QList<QSvgStructureNode*> m_linkedScopes;
- mutable QRectF m_bounds;
};
class QSvgG : public QSvgStructureNode
diff --git a/src/svg/qsvgstyle.cpp b/src/svg/qsvgstyle.cpp
index 2b12c49af6..0d1bad9cb0 100644
--- a/src/svg/qsvgstyle.cpp
+++ b/src/svg/qsvgstyle.cpp
@@ -73,7 +73,7 @@ QSvgStyleProperty::~QSvgStyleProperty()
{
}
-void QSvgFillStyleProperty::apply(QPainter *, const QRectF &, QSvgNode *, QSvgExtraStates &)
+void QSvgFillStyleProperty::apply(QPainter *, const QSvgNode *, QSvgExtraStates &)
{
Q_ASSERT(!"This should not be called!");
}
@@ -89,7 +89,7 @@ QSvgQualityStyle::QSvgQualityStyle(int color)
{
}
-void QSvgQualityStyle::apply(QPainter *, const QRectF &, QSvgNode *, QSvgExtraStates &)
+void QSvgQualityStyle::apply(QPainter *, const QSvgNode *, QSvgExtraStates &)
{
}
@@ -136,7 +136,7 @@ void QSvgFillStyle::setBrush(QBrush brush)
m_fillSet = 1;
}
-void QSvgFillStyle::apply(QPainter *p, const QRectF &, QSvgNode *, QSvgExtraStates &states)
+void QSvgFillStyle::apply(QPainter *p, const QSvgNode *, QSvgExtraStates &states)
{
m_oldFill = p->brush();
m_oldFillRule = states.fillRule;
@@ -169,7 +169,7 @@ QSvgViewportFillStyle::QSvgViewportFillStyle(const QBrush &brush)
{
}
-void QSvgViewportFillStyle::apply(QPainter *p, const QRectF &, QSvgNode *, QSvgExtraStates &)
+void QSvgViewportFillStyle::apply(QPainter *p, const QSvgNode *, QSvgExtraStates &)
{
m_oldFill = p->brush();
p->setBrush(m_viewportFill);
@@ -224,7 +224,7 @@ int QSvgFontStyle::SVGToQtWeight(int weight) {
return QFont::Normal;
}
-void QSvgFontStyle::apply(QPainter *p, const QRectF &, QSvgNode *, QSvgExtraStates &states)
+void QSvgFontStyle::apply(QPainter *p, const QSvgNode *, QSvgExtraStates &states)
{
m_oldQFont = p->font();
m_oldSvgFont = states.svgFont;
@@ -292,7 +292,7 @@ QSvgStrokeStyle::QSvgStrokeStyle()
{
}
-void QSvgStrokeStyle::apply(QPainter *p, const QRectF &, QSvgNode *, QSvgExtraStates &states)
+void QSvgStrokeStyle::apply(QPainter *p, const QSvgNode *, QSvgExtraStates &states)
{
m_oldStroke = p->pen();
m_oldStrokeOpacity = states.strokeOpacity;
@@ -443,7 +443,7 @@ QSvgTransformStyle::QSvgTransformStyle(const QTransform &trans)
{
}
-void QSvgTransformStyle::apply(QPainter *p, const QRectF &, QSvgNode *, QSvgExtraStates &)
+void QSvgTransformStyle::apply(QPainter *p, const QSvgNode *, QSvgExtraStates &)
{
m_oldWorldTransform = p->worldTransform();
p->setWorldTransform(m_transform, true);
@@ -501,7 +501,7 @@ QSvgCompOpStyle::QSvgCompOpStyle(QPainter::CompositionMode mode)
}
-void QSvgCompOpStyle::apply(QPainter *p, const QRectF &, QSvgNode *, QSvgExtraStates &)
+void QSvgCompOpStyle::apply(QPainter *p, const QSvgNode *, QSvgExtraStates &)
{
m_oldMode = p->compositionMode();
p->setCompositionMode(m_mode);
@@ -521,34 +521,34 @@ QSvgStyle::~QSvgStyle()
{
}
-void QSvgStyle::apply(QPainter *p, const QRectF &rect, QSvgNode *node, QSvgExtraStates &states)
+void QSvgStyle::apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states)
{
if (quality) {
- quality->apply(p, rect, node, states);
+ quality->apply(p, node, states);
}
if (fill) {
- fill->apply(p, rect, node, states);
+ fill->apply(p, node, states);
}
if (viewportFill) {
- viewportFill->apply(p, rect, node, states);
+ viewportFill->apply(p, node, states);
}
if (font) {
- font->apply(p, rect, node, states);
+ font->apply(p, node, states);
}
if (stroke) {
- stroke->apply(p, rect, node, states);
+ stroke->apply(p, node, states);
}
if (transform) {
- transform->apply(p, rect, node, states);
+ transform->apply(p, node, states);
}
if (animateColor) {
- animateColor->apply(p, rect, node, states);
+ animateColor->apply(p, node, states);
}
//animated transforms have to be applied
@@ -572,16 +572,16 @@ void QSvgStyle::apply(QPainter *p, const QRectF &rect, QSvgNode *node, QSvgExtra
// Apply the animateTransforms after and including the last one with additive="replace".
for (; itr != animateTransforms.constEnd(); ++itr) {
if ((*itr)->animActive(totalTimeElapsed))
- (*itr)->apply(p, rect, node, states);
+ (*itr)->apply(p, node, states);
}
}
if (opacity) {
- opacity->apply(p, rect, node, states);
+ opacity->apply(p, node, states);
}
if (compop) {
- compop->apply(p, rect, node, states);
+ compop->apply(p, node, states);
}
}
@@ -655,7 +655,7 @@ void QSvgAnimateTransform::setArgs(TransformType type, Additive additive, const
m_count = args.count() / 3;
}
-void QSvgAnimateTransform::apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &)
+void QSvgAnimateTransform::apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &)
{
m_oldWorldTransform = p->worldTransform();
resolveMatrix(node);
@@ -669,7 +669,7 @@ void QSvgAnimateTransform::revert(QPainter *p, QSvgExtraStates &)
m_transformApplied = false;
}
-void QSvgAnimateTransform::resolveMatrix(QSvgNode *node)
+void QSvgAnimateTransform::resolveMatrix(const QSvgNode *node)
{
static const qreal deg2rad = qreal(0.017453292519943295769);
qreal totalTimeElapsed = node->document()->currentElapsed();
@@ -834,7 +834,7 @@ void QSvgAnimateColor::setRepeatCount(qreal repeatCount)
m_repeatCount = repeatCount;
}
-void QSvgAnimateColor::apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &)
+void QSvgAnimateColor::apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &)
{
qreal totalTimeElapsed = node->document()->currentElapsed();
if (totalTimeElapsed < m_from || m_finished)
@@ -912,7 +912,7 @@ QSvgOpacityStyle::QSvgOpacityStyle(qreal opacity)
}
-void QSvgOpacityStyle::apply(QPainter *p, const QRectF &, QSvgNode *, QSvgExtraStates &)
+void QSvgOpacityStyle::apply(QPainter *p, const QSvgNode *, QSvgExtraStates &)
{
m_oldOpacity = p->opacity();
p->setOpacity(m_opacity * m_oldOpacity);
diff --git a/src/svg/qsvgstyle_p.h b/src/svg/qsvgstyle_p.h
index 202de93a4e..af3b4e57d0 100644
--- a/src/svg/qsvgstyle_p.h
+++ b/src/svg/qsvgstyle_p.h
@@ -172,7 +172,7 @@ public:
};
public:
virtual ~QSvgStyleProperty();
- virtual void apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &states) =0;
+ virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) = 0;
virtual void revert(QPainter *p, QSvgExtraStates &states) =0;
virtual Type type() const=0;
};
@@ -181,7 +181,7 @@ class QSvgFillStyleProperty : public QSvgStyleProperty
{
public:
virtual QBrush brush(QPainter *p, QSvgExtraStates &states) = 0;
- virtual void apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &states);
+ virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
virtual void revert(QPainter *p, QSvgExtraStates &states);
};
@@ -189,7 +189,7 @@ class QSvgQualityStyle : public QSvgStyleProperty
{
public:
QSvgQualityStyle(int color);
- virtual void apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &states);
+ virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
virtual void revert(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
private:
@@ -221,7 +221,7 @@ class QSvgOpacityStyle : public QSvgStyleProperty
{
public:
QSvgOpacityStyle(qreal opacity);
- virtual void apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &states);
+ virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
virtual void revert(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
private:
@@ -233,7 +233,7 @@ class QSvgFillStyle : public QSvgStyleProperty
{
public:
QSvgFillStyle();
- virtual void apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &states);
+ virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
virtual void revert(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
@@ -306,7 +306,7 @@ class QSvgViewportFillStyle : public QSvgStyleProperty
{
public:
QSvgViewportFillStyle(const QBrush &brush);
- virtual void apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &states);
+ virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
virtual void revert(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
@@ -330,7 +330,7 @@ public:
QSvgFontStyle(QSvgFont *font, QSvgTinyDocument *doc);
QSvgFontStyle();
- virtual void apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &states);
+ virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
virtual void revert(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
@@ -410,7 +410,7 @@ class QSvgStrokeStyle : public QSvgStyleProperty
{
public:
QSvgStrokeStyle();
- virtual void apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &states);
+ virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
virtual void revert(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
@@ -617,7 +617,7 @@ class QSvgTransformStyle : public QSvgStyleProperty
{
public:
QSvgTransformStyle(const QTransform &transform);
- virtual void apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &states);
+ virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
virtual void revert(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
@@ -654,7 +654,7 @@ public:
void setArgs(TransformType type, Additive additive, const QVector<qreal> &args);
void setFreeze(bool freeze);
void setRepeatCount(qreal repeatCount);
- virtual void apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &states);
+ virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
virtual void revert(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
QSvgAnimateTransform::Additive additiveType() const
@@ -688,7 +688,7 @@ public:
}
protected:
- void resolveMatrix(QSvgNode *node);
+ void resolveMatrix(const QSvgNode *node);
private:
qreal m_from, m_to, m_by;
qreal m_totalRunningTime;
@@ -712,7 +712,7 @@ public:
void setArgs(bool fill, const QList<QColor> &colors);
void setFreeze(bool freeze);
void setRepeatCount(qreal repeatCount);
- virtual void apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &states);
+ virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
virtual void revert(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
private:
@@ -732,7 +732,7 @@ class QSvgCompOpStyle : public QSvgStyleProperty
{
public:
QSvgCompOpStyle(QPainter::CompositionMode mode);
- virtual void apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &states);
+ virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
virtual void revert(QPainter *p, QSvgExtraStates &states);
virtual Type type() const;
@@ -766,7 +766,7 @@ public:
{}
~QSvgStyle();
- void apply(QPainter *p, const QRectF &rect, QSvgNode *node, QSvgExtraStates &states);
+ void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
void revert(QPainter *p, QSvgExtraStates &states);
QSvgRefCounter<QSvgQualityStyle> quality;
QSvgRefCounter<QSvgFillStyle> fill;
diff --git a/src/svg/qsvgtinydocument.cpp b/src/svg/qsvgtinydocument.cpp
index 17618f7396..b21b99f780 100644
--- a/src/svg/qsvgtinydocument.cpp
+++ b/src/svg/qsvgtinydocument.cpp
@@ -277,7 +277,7 @@ void QSvgTinyDocument::draw(QPainter *p, const QString &id,
p->save();
- const QRectF elementBounds = node->transformedBounds(QTransform());
+ const QRectF elementBounds = node->transformedBounds();
mapSourceToTarget(p, bounds, elementBounds);
QTransform originalTransform = p->worldTransform();
@@ -299,7 +299,7 @@ void QSvgTinyDocument::draw(QPainter *p, const QString &id,
for (int i = parentApplyStack.size() - 1; i >= 0; --i)
parentApplyStack[i]->applyStyle(p, m_states);
-
+
// Reset the world transform so that our parents don't affect
// the position
QTransform currentTransform = p->worldTransform();
@@ -432,8 +432,7 @@ QRectF QSvgTinyDocument::boundsOnElement(const QString &id) const
const QSvgNode *node = scopeNode(id);
if (!node)
node = this;
-
- return node->transformedBounds(QTransform());
+ return node->transformedBounds();
}
bool QSvgTinyDocument::elementExists(const QString &id) const
diff --git a/src/svg/qsvgtinydocument_p.h b/src/svg/qsvgtinydocument_p.h
index c03c7988e6..3b407704be 100644
--- a/src/svg/qsvgtinydocument_p.h
+++ b/src/svg/qsvgtinydocument_p.h
@@ -173,9 +173,8 @@ inline bool QSvgTinyDocument::heightPercent() const
inline QRectF QSvgTinyDocument::viewBox() const
{
- if (m_viewBox.isNull()) {
- m_viewBox = transformedBounds(QTransform());
- }
+ if (m_viewBox.isNull())
+ m_viewBox = transformedBounds();
return m_viewBox;
}
diff --git a/src/testlib/qbenchmark.cpp b/src/testlib/qbenchmark.cpp
index 4ccbee691b..23c563983a 100644
--- a/src/testlib/qbenchmark.cpp
+++ b/src/testlib/qbenchmark.cpp
@@ -41,6 +41,7 @@
#include "QtTest/qbenchmark.h"
#include "QtTest/private/qbenchmark_p.h"
+#include "QtTest/private/qbenchmarkmetric_p.h"
#ifdef QT_GUI_LIB
#include <QtGui/qapplication.h>
@@ -138,7 +139,7 @@ void QBenchmarkTestMethodData::endDataRun()
int QBenchmarkTestMethodData::adjustIterationCount(int suggestion)
{
- // Let the -iteration-count option override the measurer.
+ // Let the -iterations option override the measurer.
if (QBenchmarkGlobalData::current->iterationCount != -1) {
iterationCount = QBenchmarkGlobalData::current->iterationCount;
} else {
@@ -148,20 +149,21 @@ int QBenchmarkTestMethodData::adjustIterationCount(int suggestion)
return iterationCount;
}
-void QBenchmarkTestMethodData::setResult(qint64 value)
+void QBenchmarkTestMethodData::setResult(
+ qreal value, QTest::QBenchmarkMetric metric, bool setByMacro)
{
bool accepted = false;
// Always accept the result if the iteration count has been
- // specified on the command line with -iteartion-count.
+ // specified on the command line with -iterations.
if (QBenchmarkGlobalData::current->iterationCount != -1)
accepted = true;
- if (QBenchmarkTestMethodData::current->runOnce) {
+ if (QBenchmarkTestMethodData::current->runOnce || !setByMacro) {
iterationCount = 1;
accepted = true;
}
-
+
// Test the result directly without calling the measurer if the minimum time
// has been specifed on the command line with -minimumvalue.
else if (QBenchmarkGlobalData::current->walltimeMinimum != -1)
@@ -175,8 +177,8 @@ void QBenchmarkTestMethodData::setResult(qint64 value)
else
iterationCount *= 2;
- this->result =
- QBenchmarkResult(QBenchmarkGlobalData::current->context, value, iterationCount);
+ this->result = QBenchmarkResult(
+ QBenchmarkGlobalData::current->context, value, iterationCount, metric, setByMacro);
}
/*!
@@ -208,7 +210,8 @@ QTest::QBenchmarkIterationController::QBenchmarkIterationController()
*/
QTest::QBenchmarkIterationController::~QBenchmarkIterationController()
{
- QBenchmarkTestMethodData::current->setResult(QTest::endBenchmarkMeasurement());
+ const qreal result = QTest::endBenchmarkMeasurement();
+ QBenchmarkTestMethodData::current->setResult(result, QBenchmarkGlobalData::current->measurer->metricType());
}
/*! \internal
@@ -259,28 +262,32 @@ void QTest::beginBenchmarkMeasurement()
/*! \internal
*/
-qint64 QTest::endBenchmarkMeasurement()
+quint64 QTest::endBenchmarkMeasurement()
{
// the clock is ticking before the line below, don't add code here.
return QBenchmarkGlobalData::current->measurer->stop();
}
-/*! \internal
-*/
-void QTest::setResult(qint64 result)
-{
- QBenchmarkTestMethodData::current->setResult(result);
-}
-
-/*! \internal
+/*!
+ Sets the benchmark result for this test function to \a result.
+
+ Use this function if you want to report benchmark results without
+ using the QBENCHMARK macro. Use \a metric to specify how QTestLib
+ should interpret the results.
+
+ The context for the result will be the test function name and any
+ data tag from the _data function. This function can only be called
+ once in each test function, subsequent calls will replace the
+ earlier reported results.
+
+ Note that the -iterations command line argument has no effect
+ on test functions without the QBENCHMARK macro.
+
+ \since 4.7
*/
-void QTest::setResult(const QString &tag, qint64 result)
+void QTest::setBenchmarkResult(qreal result, QTest::QBenchmarkMetric metric)
{
- QBenchmarkContext context = QBenchmarkGlobalData::current->context;
- context.tag = tag;
- QBenchmarkTestMethodData::current->result =
- QBenchmarkResult( context, result,
- QBenchmarkTestMethodData::current->iterationCount);
+ QBenchmarkTestMethodData::current->setResult(result, metric, false);
}
template <typename T>
@@ -298,6 +305,4 @@ Q_TYPENAME T::value_type qAverage(const T &container)
return acc / count;
}
-
QT_END_NAMESPACE
-
diff --git a/src/testlib/qbenchmark.h b/src/testlib/qbenchmark.h
index 0207b5bcc1..46f51ca59e 100644
--- a/src/testlib/qbenchmark.h
+++ b/src/testlib/qbenchmark.h
@@ -43,6 +43,7 @@
#define QBENCHMARK_H
#include <QtTest/qtest_global.h>
+#include <QtTest/qbenchmarkmetric.h>
QT_BEGIN_HEADER
@@ -75,6 +76,8 @@ public:
}
+// --- BEGIN public API ---
+
#define QBENCHMARK \
for (QTest::QBenchmarkIterationController __iteration_controller; \
__iteration_controller.isDone() == false; __iteration_controller.next())
@@ -83,6 +86,13 @@ public:
for (QTest::QBenchmarkIterationController __iteration_controller(QTest::QBenchmarkIterationController::RunOnce); \
__iteration_controller.isDone() == false; __iteration_controller.next())
+namespace QTest
+{
+ void Q_TESTLIB_EXPORT setBenchmarkResult(qreal result, QBenchmarkMetric metric);
+}
+
+// --- END public API ---
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/testlib/qbenchmark_p.h b/src/testlib/qbenchmark_p.h
index 0d6542fecb..50329e1775 100644
--- a/src/testlib/qbenchmark_p.h
+++ b/src/testlib/qbenchmark_p.h
@@ -42,6 +42,8 @@
#ifndef QBENCHMARK_P_H
#define QBENCHMARK_P_H
+#include <stdlib.h>
+
//
// W A R N I N G
// -------------
@@ -68,6 +70,7 @@
#include "QtTest/private/qbenchmarkvalgrind_p.h"
#endif
#include "QtTest/private/qbenchmarkevent_p.h"
+#include "QtTest/private/qbenchmarkmetric_p.h"
QT_BEGIN_NAMESPACE
@@ -92,23 +95,29 @@ class QBenchmarkResult
{
public:
QBenchmarkContext context;
- qint64 value;
+ qreal value;
int iterations;
+ QTest::QBenchmarkMetric metric;
+ bool setByMacro;
bool valid;
QBenchmarkResult()
: value(-1)
, iterations(-1)
+ , setByMacro(true)
, valid(false)
- { }
+ { }
- QBenchmarkResult(const QBenchmarkContext &context, const qint64 value, const int iterations)
+ QBenchmarkResult(
+ const QBenchmarkContext &context, const qreal value, const int iterations,
+ QTest::QBenchmarkMetric metric, bool setByMacro)
: context(context)
, value(value)
, iterations(iterations)
+ , metric(metric)
+ , setByMacro(setByMacro)
, valid(true)
- {
- }
+ { }
bool operator<(const QBenchmarkResult &other) const
{
@@ -167,7 +176,7 @@ public:
bool isBenchmark() const { return result.valid; }
bool resultsAccepted() const { return resultAccepted; }
int adjustIterationCount(int suggestion);
- void setResult(qint64 value);
+ void setResult(qreal value, QTest::QBenchmarkMetric metric, bool setByMacro = true);
QBenchmarkResult result;
bool resultAccepted;
@@ -183,10 +192,7 @@ namespace QTest
void setIterationCount(int count);
Q_TESTLIB_EXPORT void beginBenchmarkMeasurement();
- Q_TESTLIB_EXPORT qint64 endBenchmarkMeasurement();
-
- void setResult(qint64 result);
- void setResult(const QString &tag, qint64 result);
+ Q_TESTLIB_EXPORT quint64 endBenchmarkMeasurement();
}
QT_END_NAMESPACE
diff --git a/src/testlib/qbenchmarkevent.cpp b/src/testlib/qbenchmarkevent.cpp
index 9c6709692e..39eb1c53eb 100644
--- a/src/testlib/qbenchmarkevent.cpp
+++ b/src/testlib/qbenchmarkevent.cpp
@@ -41,6 +41,7 @@
#include "QtTest/private/qbenchmarkevent_p.h"
#include "QtTest/private/qbenchmark_p.h"
+#include "QtTest/private/qbenchmarkmetric_p.h"
#include <qdebug.h>
QT_BEGIN_NAMESPACE
@@ -91,14 +92,9 @@ int QBenchmarkEvent::adjustMedianCount(int suggestion)
return 1;
}
-QString QBenchmarkEvent::unitText()
+QTest::QBenchmarkMetric QBenchmarkEvent::metricType()
{
- return QLatin1String("events");
-}
-
-QString QBenchmarkEvent::metricText()
-{
- return QLatin1String("events");
+ return QTest::Events;
}
// This could be done in a much better way, this is just the beginning.
diff --git a/src/testlib/qbenchmarkevent_p.h b/src/testlib/qbenchmarkevent_p.h
index 1a48964e97..5e13b9fc5e 100644
--- a/src/testlib/qbenchmarkevent_p.h
+++ b/src/testlib/qbenchmarkevent_p.h
@@ -70,8 +70,7 @@ public:
int adjustIterationCount(int suggestion);
int adjustMedianCount(int suggestion);
bool repeatCount() { return 1; }
- QString unitText();
- QString metricText();
+ QTest::QBenchmarkMetric metricType();
static bool eventCountingMechanism(void *message);
static qint64 eventCounter;
};
diff --git a/src/testlib/qbenchmarkmeasurement.cpp b/src/testlib/qbenchmarkmeasurement.cpp
index 836d85fbcc..c03cbff2ac 100644
--- a/src/testlib/qbenchmarkmeasurement.cpp
+++ b/src/testlib/qbenchmarkmeasurement.cpp
@@ -41,6 +41,8 @@
#include "QtTest/private/qbenchmarkmeasurement_p.h"
#include "QtTest/private/qbenchmark_p.h"
+#include "QtTest/private/qbenchmarkmetric_p.h"
+#include "qbenchmark.h"
#include <qdebug.h>
QT_BEGIN_NAMESPACE
@@ -77,14 +79,9 @@ int QBenchmarkTimeMeasurer::adjustMedianCount(int)
return 1;
}
-QString QBenchmarkTimeMeasurer::unitText()
+QTest::QBenchmarkMetric QBenchmarkTimeMeasurer::metricType()
{
- return QLatin1String("msec");
-}
-
-QString QBenchmarkTimeMeasurer::metricText()
-{
- return QLatin1String("walltime");
+ return QTest::WalltimeMilliseconds;
}
#ifdef HAVE_TICK_COUNTER // defined in 3rdparty/cycle_p.h
@@ -126,14 +123,9 @@ bool QBenchmarkTickMeasurer::needsWarmupIteration()
return true;
}
-QString QBenchmarkTickMeasurer::unitText()
-{
- return QLatin1String("ticks");
-}
-
-QString QBenchmarkTickMeasurer::metricText()
+QTest::QBenchmarkMetric QBenchmarkTickMeasurer::metricType()
{
- return QLatin1String("cputicks");
+ return QTest::CPUTicks;
}
#endif
diff --git a/src/testlib/qbenchmarkmeasurement_p.h b/src/testlib/qbenchmarkmeasurement_p.h
index 6f3c0343f5..8ad36134c7 100644
--- a/src/testlib/qbenchmarkmeasurement_p.h
+++ b/src/testlib/qbenchmarkmeasurement_p.h
@@ -55,6 +55,7 @@
#include <QtCore/qdatetime.h>
#include "3rdparty/cycle_p.h"
+#include "qbenchmark.h"
QT_BEGIN_NAMESPACE
@@ -71,8 +72,7 @@ public:
virtual int adjustMedianCount(int suggestion) = 0;
virtual bool repeatCount() { return 1; }
virtual bool needsWarmupIteration() { return false; }
- virtual QString unitText() = 0;
- virtual QString metricText() = 0;
+ virtual QTest::QBenchmarkMetric metricType() = 0;
};
class QBenchmarkTimeMeasurer : public QBenchmarkMeasurerBase
@@ -84,8 +84,7 @@ public:
bool isMeasurementAccepted(qint64 measurement);
int adjustIterationCount(int sugestion);
int adjustMedianCount(int suggestion);
- QString unitText();
- QString metricText();
+ QTest::QBenchmarkMetric metricType();
private:
QTime time;
};
@@ -102,8 +101,7 @@ public:
int adjustIterationCount(int);
int adjustMedianCount(int suggestion);
bool needsWarmupIteration();
- QString unitText();
- QString metricText();
+ QTest::QBenchmarkMetric metricType();
private:
CycleCounterTicks startTicks;
};
diff --git a/src/testlib/qbenchmarkmetric.cpp b/src/testlib/qbenchmarkmetric.cpp
new file mode 100644
index 0000000000..7356134096
--- /dev/null
+++ b/src/testlib/qbenchmarkmetric.cpp
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** 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 QtTest module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/private/qbenchmarkmetric_p.h>
+
+/*!
+ \enum QTest::QBenchmarkMetric
+ \since 4.7
+
+ This enum lists all the things that can be benchmarked.
+
+ \value FramesPerSecond Frames per second
+ \value BitsPerSecond Bits per second
+ \value BytesPerSecond Bytes per second
+ \value WalltimeMilliseconds Clock time in milliseconds
+ \value CPUTicks CPU time
+ \value InstructionReads Instruction reads
+ \value Events Event count
+
+ \sa QTest::benchmarkMetricName(), QTest::benchmarkMetricUnit()
+
+ */
+
+/*!
+ \relates QTest
+ \since 4.7
+ Returns the enum value \a metric as a character string.
+ */
+const char * QTest::benchmarkMetricName(QBenchmarkMetric metric)
+{
+ switch (metric) {
+ case FramesPerSecond:
+ return "FramesPerSecond";
+ case BitsPerSecond:
+ return "BitsPerSecond";
+ case BytesPerSecond:
+ return "BytesPerSecond";
+ case WalltimeMilliseconds:
+ return "WalltimeMilliseconds";
+ case CPUTicks:
+ return "CPUTicks";
+ case InstructionReads:
+ return "InstructionReads";
+ case Events:
+ return "Events";
+ default:
+ return "";
+ }
+};
+
+/*!
+ \relates QTest
+ \since 4.7
+ Retuns the units of measure for the specified \a metric.
+ */
+const char * QTest::benchmarkMetricUnit(QBenchmarkMetric metric)
+{
+ switch (metric) {
+ case FramesPerSecond:
+ return "fps";
+ case BitsPerSecond:
+ return "bits/s";
+ case BytesPerSecond:
+ return "bytes/s";
+ case WalltimeMilliseconds:
+ return "msecs";
+ case CPUTicks:
+ return "CPU ticks";
+ case InstructionReads:
+ return "instruction reads";
+ case Events:
+ return "events";
+ default:
+ return "";
+ }
+}
+
diff --git a/src/testlib/qbenchmarkmetric.h b/src/testlib/qbenchmarkmetric.h
new file mode 100644
index 0000000000..18155277ac
--- /dev/null
+++ b/src/testlib/qbenchmarkmetric.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** 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 QtTest module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QBENCHMARKMETRIC_H
+#define QBENCHMARKMETRIC_H
+
+#include <QtTest/qtest_global.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Test)
+
+namespace QTest {
+
+enum QBenchmarkMetric {
+ FramesPerSecond,
+ BitsPerSecond,
+ BytesPerSecond,
+ WalltimeMilliseconds,
+ CPUTicks,
+ InstructionReads,
+ Events
+};
+
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QBENCHMARK_H
diff --git a/src/testlib/qbenchmarkmetric_p.h b/src/testlib/qbenchmarkmetric_p.h
new file mode 100644
index 0000000000..f0afc0412d
--- /dev/null
+++ b/src/testlib/qbenchmarkmetric_p.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** 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 QtTest module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QBENCHMARKMETRIC_P_H
+#define QBENCHMARKMETRIC_P_H
+
+#include <QtTest/qtest_global.h>
+#include <QtTest/qbenchmarkmetric.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Test)
+
+namespace QTest {
+ const char * benchmarkMetricName(QBenchmarkMetric metric);
+ const char * benchmarkMetricUnit(QBenchmarkMetric metric);
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QBENCHMARK_H
diff --git a/src/testlib/qbenchmarkvalgrind.cpp b/src/testlib/qbenchmarkvalgrind.cpp
index 264774ea30..8c64c0be9c 100644
--- a/src/testlib/qbenchmarkvalgrind.cpp
+++ b/src/testlib/qbenchmarkvalgrind.cpp
@@ -263,14 +263,9 @@ bool QBenchmarkCallgrindMeasurer::needsWarmupIteration()
return true;
}
-QString QBenchmarkCallgrindMeasurer::unitText()
+QTest::QBenchmarkMetric QBenchmarkCallgrindMeasurer::metricType()
{
- return QLatin1String("instr. loads");
-}
-
-QString QBenchmarkCallgrindMeasurer::metricText()
-{
- return QLatin1String("callgrind");
+ return QTest::InstructionReads;
}
QT_END_NAMESPACE
diff --git a/src/testlib/qbenchmarkvalgrind_p.h b/src/testlib/qbenchmarkvalgrind_p.h
index 754fe3d6df..7b6893b56f 100644
--- a/src/testlib/qbenchmarkvalgrind_p.h
+++ b/src/testlib/qbenchmarkvalgrind_p.h
@@ -54,6 +54,7 @@
//
#include "QtTest/private/qbenchmarkmeasurement_p.h"
+#include "QtTest/private/qbenchmarkmetric_p.h"
#include <QtCore/qmap.h>
#include <QtCore/qstring.h>
@@ -84,8 +85,7 @@ public:
int adjustIterationCount(int);
int adjustMedianCount(int);
bool needsWarmupIteration();
- QString unitText();
- QString metricText();
+ QTest::QBenchmarkMetric metricType();
};
QT_END_NAMESPACE
diff --git a/src/testlib/qplaintestlogger.cpp b/src/testlib/qplaintestlogger.cpp
index 0888cfc769..46431a8586 100644
--- a/src/testlib/qplaintestlogger.cpp
+++ b/src/testlib/qplaintestlogger.cpp
@@ -44,6 +44,7 @@
#include "QtTest/private/qtestlog_p.h"
#include "QtTest/private/qplaintestlogger_p.h"
#include "QtTest/private/qbenchmark_p.h"
+#include "QtTest/private/qbenchmarkmetric_p.h"
#include <stdarg.h>
#include <stdio.h>
@@ -324,7 +325,6 @@ namespace QTest {
QTestResult::currentTestObjectName(),
result.context.slotName.toAscii().data());
-
char bufTag[1024];
bufTag[0] = 0;
QByteArray tag = result.context.tag.toAscii();
@@ -340,32 +340,43 @@ namespace QTest {
char fill[1024];
QTest::qt_snprintf(fill, sizeof(fill), fillFormat, "");
-
- QByteArray unitText = QBenchmarkGlobalData::current->measurer->unitText().toAscii();
+ const char * unitText = QTest::benchmarkMetricUnit(result.metric);
qreal valuePerIteration = qreal(result.value) / qreal(result.iterations);
char resultBuffer[100] = "";
formatResult(resultBuffer, 100, valuePerIteration, countSignificantDigits(result.value));
- QByteArray iterationText = "per iteration";
-
char buf2[1024];
- Q_ASSERT(result.iterations > 0);
QTest::qt_snprintf(
- buf2, sizeof(buf2), "%s %s %s",
+ buf2, sizeof(buf2), "%s %s",
resultBuffer,
- unitText.data(),
+ unitText);
+
+ char buf2_[1024];
+ QByteArray iterationText = " per iteration";
+ Q_ASSERT(result.iterations > 0);
+ QTest::qt_snprintf(
+ buf2_,
+ sizeof(buf2_), "%s",
iterationText.data());
char buf3[1024];
Q_ASSERT(result.iterations > 0);
+ formatResult(resultBuffer, 100, result.value, countSignificantDigits(result.value));
QTest::qt_snprintf(
- buf3, sizeof(buf3), " (total: %s, iterations: %d)\n",
- QByteArray::number(result.value).constData(), // no 64-bit qt_snprintf support
+ buf3, sizeof(buf3), " (total: %s, iterations: %d)",
+ resultBuffer,
result.iterations);
char buf[1024];
- QTest::qt_snprintf(buf, sizeof(buf), "%s%s%s%s%s", buf1, bufTag, fill, buf2, buf3);
+
+ if (result.setByMacro) {
+ QTest::qt_snprintf(
+ buf, sizeof(buf), "%s%s%s%s%s%s\n", buf1, bufTag, fill, buf2, buf2_, buf3);
+ } else {
+ QTest::qt_snprintf(buf, sizeof(buf), "%s%s%s%s\n", buf1, bufTag, fill, buf2);
+ }
+
memcpy(buf, bmtag, strlen(bmtag));
outputMessage(buf);
}
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 659148149a..63e22cccd3 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -846,6 +846,9 @@ namespace QTest
static int mouseDelay = -1;
static int eventDelay = -1;
static int keyVerbose = -1;
+#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
+ static bool noCrashHandler = false;
+#endif
void filter_unprintable(char *str)
{
@@ -874,6 +877,19 @@ int qt_snprintf(char *str, int size, const char *format, ...)
return res;
}
+/*! \internal
+ Invoke a method of the object without generating warning if the method does not exist
+ */
+static void invokeMethod(QObject *obj, const char *methodName)
+{
+ const QMetaObject *metaObject = obj->metaObject();
+ int funcIndex = metaObject->indexOfMethod(methodName);
+ if (funcIndex >= 0) {
+ QMetaMethod method = metaObject->method(funcIndex);
+ method.invoke(obj, Qt::DirectConnection);
+ }
+}
+
bool Q_TESTLIB_EXPORT defaultKeyVerbose()
{
if (keyVerbose == -1) {
@@ -976,6 +992,9 @@ static void qParseArgs(int argc, char *argv[])
" -keyevent-verbose : Turn on verbose messages for keyboard simulation\n"
" -maxwarnings n : Sets the maximum amount of messages to output.\n"
" 0 means unlimited, default: 2000\n"
+#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
+ " -nocrashhandler : Disables the crash handler\n"
+#endif
"\n"
" Benchmark related options:\n"
#ifdef QTESTLIB_USE_VALGRIND
@@ -1056,6 +1075,10 @@ static void qParseArgs(int argc, char *argv[])
} else {
QTestLog::setMaxWarnings(qToInt(argv[++i]));
}
+#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
+ } else if (strcmp(argv[i], "-nocrashhandler") == 0) {
+ QTest::noCrashHandler = true;
+#endif
} else if (strcmp(argv[i], "-keyevent-verbose") == 0) {
QTest::keyVerbose = 1;
#ifdef QTESTLIB_USE_VALGRIND
@@ -1203,7 +1226,7 @@ static void qInvokeTestMethodDataEntry(char *slot)
bool invokeOk;
do {
QTestResult::setCurrentTestLocation(QTestResult::InitFunc);
- QMetaObject::invokeMethod(QTest::currentTestObject, "init");
+ invokeMethod(QTest::currentTestObject, "init()");
if (QTestResult::skipCurrentTest())
break;
@@ -1223,7 +1246,7 @@ static void qInvokeTestMethodDataEntry(char *slot)
QTestResult::addFailure("Unable to execute slot", __FILE__, __LINE__);
QTestResult::setCurrentTestLocation(QTestResult::CleanupFunc);
- QMetaObject::invokeMethod(QTest::currentTestObject, "cleanup");
+ invokeMethod(QTest::currentTestObject, "cleanup()");
QTestResult::setCurrentTestLocation(QTestResult::NoWhere);
// If this test method has a benchmark, repeat until all measurements are
@@ -1290,8 +1313,9 @@ static bool qInvokeTestMethod(const char *slotName, const char *data=0)
if (curGlobalDataIndex == 0) {
QTestResult::setCurrentTestLocation(QTestResult::DataFunc);
- QTest::qt_snprintf(member, 512, "%s_data", slot);
- QMetaObject::invokeMethod(QTest::currentTestObject, member, Qt::DirectConnection);
+ QTest::qt_snprintf(member, 512, "%s_data()", slot);
+ invokeMethod(QTest::currentTestObject, member);
+
// if we encounter a SkipAll in the _data slot, we skip the whole
// testfunction, no matter how much global data exists
if (QTestResult::skipCurrentTest()) {
@@ -1456,11 +1480,11 @@ static void qInvokeTestMethods(QObject *testObject)
QTestResult::setCurrentTestFunction("initTestCase");
QTestResult::setCurrentTestLocation(QTestResult::DataFunc);
QTestTable::globalTestTable();
- QMetaObject::invokeMethod(testObject, "initTestCase_data", Qt::DirectConnection);
+ invokeMethod(testObject, "initTestCase_data()");
if (!QTestResult::skipCurrentTest() && !QTest::currentTestFailed()) {
QTestResult::setCurrentTestLocation(QTestResult::InitFunc);
- QMetaObject::invokeMethod(testObject, "initTestCase");
+ invokeMethod(testObject, "initTestCase()");
// finishedCurrentTestFunction() resets QTestResult::testFailed(), so use a local copy.
const bool previousFailed = QTestResult::testFailed();
@@ -1488,7 +1512,7 @@ static void qInvokeTestMethods(QObject *testObject)
QTestResult::setSkipCurrentTest(false);
QTestResult::setCurrentTestFunction("cleanupTestCase");
- QMetaObject::invokeMethod(testObject, "cleanupTestCase");
+ invokeMethod(testObject, "cleanupTestCase()");
}
QTestResult::finishedCurrentTestFunction();
QTestResult::setCurrentTestFunction(0);
@@ -1541,7 +1565,11 @@ FatalSignalHandler::FatalSignalHandler()
#ifndef Q_WS_QWS
// Don't overwrite any non-default handlers
// however, we need to replace the default QWS handlers
- if (oldact.sa_flags & SA_SIGINFO || oldact.sa_handler != SIG_DFL) {
+ if (
+#ifdef SA_SIGINFO
+ oldact.sa_flags & SA_SIGINFO ||
+#endif
+ oldact.sa_handler != SIG_DFL) {
sigaction(fatalSignals[i], &oldact, 0);
} else
#endif
@@ -1681,7 +1709,9 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
#endif
{
#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
- FatalSignalHandler handler;
+ QScopedPointer<FatalSignalHandler> handler;
+ if (!noCrashHandler)
+ handler.reset(new FatalSignalHandler);
#endif
qInvokeTestMethods(testObject);
}
diff --git a/src/testlib/qtestcoreelement.h b/src/testlib/qtestcoreelement.h
index e1ad44a731..4738f7de70 100644
--- a/src/testlib/qtestcoreelement.h
+++ b/src/testlib/qtestcoreelement.h
@@ -45,6 +45,8 @@
#include <QtTest/qtestcorelist.h>
#include <QtTest/qtestelementattribute.h>
+#include <cstdlib>
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -93,6 +95,9 @@ void QTestCoreElement<ElementType>::addAttribute(const QTest::AttributeIndex att
if (attribute(attributeIndex))
return;
+ // if (attributeIndex == QTest::AI_Metric)
+ // abort();
+
QTestElementAttribute *testAttribute = new QTestElementAttribute;
testAttribute->setPair(attributeIndex, value);
testAttribute->addToList(&listOfAttributes);
diff --git a/src/testlib/qtestlogger.cpp b/src/testlib/qtestlogger.cpp
index c0bc26c4c9..6c76388397 100644
--- a/src/testlib/qtestlogger.cpp
+++ b/src/testlib/qtestlogger.cpp
@@ -267,7 +267,9 @@ void QTestLogger::addBenchmarkResult(const QBenchmarkResult &result)
QTestElement *benchmarkElement = new QTestElement(QTest::LET_Benchmark);
// printf("element %i", benchmarkElement->elementType());
- benchmarkElement->addAttribute(QTest::AI_Metric, QBenchmarkGlobalData::current->measurer->metricText().toAscii().data());
+ benchmarkElement->addAttribute(
+ QTest::AI_Metric,
+ QTest::benchmarkMetricName(QBenchmarkTestMethodData::current->result.metric));
benchmarkElement->addAttribute(QTest::AI_Tag, result.context.tag.toAscii().data());
benchmarkElement->addAttribute(QTest::AI_Value, QByteArray::number(result.value).constData());
diff --git a/src/testlib/qxmltestlogger.cpp b/src/testlib/qxmltestlogger.cpp
index 13103f3bfb..2236666571 100644
--- a/src/testlib/qxmltestlogger.cpp
+++ b/src/testlib/qxmltestlogger.cpp
@@ -46,6 +46,7 @@
#include "QtTest/private/qxmltestlogger_p.h"
#include "QtTest/private/qtestresult_p.h"
#include "QtTest/private/qbenchmark_p.h"
+#include "QtTest/private/qbenchmarkmetric_p.h"
#include "QtTest/qtestcase.h"
QT_BEGIN_NAMESPACE
@@ -243,7 +244,7 @@ void QXmlTestLogger::addBenchmarkResult(const QBenchmarkResult &result)
QTestCharBuffer quotedTag;
xmlQuote(&quotedMetric,
- QBenchmarkGlobalData::current->measurer->metricText().toAscii().constData());
+ benchmarkMetricUnit(result.metric));
xmlQuote(&quotedTag, result.context.tag.toAscii().constData());
QTest::qt_asprintf(
diff --git a/src/testlib/testlib.pro b/src/testlib/testlib.pro
index f68ff3584e..a8186d820e 100644
--- a/src/testlib/testlib.pro
+++ b/src/testlib/testlib.pro
@@ -47,6 +47,7 @@ SOURCES = qtestcase.cpp \
qbenchmarkmeasurement.cpp \
qbenchmarkvalgrind.cpp \
qbenchmarkevent.cpp \
+ qbenchmarkmetric.cpp \
qtestelement.cpp \
qtestelementattribute.cpp \
qtestbasicstreamer.cpp \
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index 982d95f576..6729c62ba5 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -173,7 +173,7 @@ void Generator::generateCode()
int index = 14;
fprintf(out, "static const uint qt_meta_data_%s[] = {\n", qualifiedClassNameIdentifier.constData());
fprintf(out, "\n // content:\n");
- fprintf(out, " %4d, // revision\n", 4);
+ fprintf(out, " %4d, // revision\n", 5);
fprintf(out, " %4d, // classname\n", strreg(cdef->qualified));
fprintf(out, " %4d, %4d, // classinfo\n", cdef->classInfoList.count(), cdef->classInfoList.count() ? index : 0);
index += cdef->classInfoList.count() * 2;
diff --git a/src/tools/moc/util/generate_keywords.pro b/src/tools/moc/util/generate_keywords.pro
index 8dff74471f..eb04409922 100644
--- a/src/tools/moc/util/generate_keywords.pro
+++ b/src/tools/moc/util/generate_keywords.pro
@@ -10,4 +10,3 @@ INCLUDEPATH += .
# Input
SOURCES += generate_keywords.cpp
CONFIG += qt create_prl link_prl
-OBJECTS_DIR=.obj/debug-shared
diff --git a/src/xmlpatterns/type/qprimitives_p.h b/src/xmlpatterns/type/qprimitives_p.h
index 1090f7f8a8..c378a66363 100644
--- a/src/xmlpatterns/type/qprimitives_p.h
+++ b/src/xmlpatterns/type/qprimitives_p.h
@@ -79,18 +79,6 @@ class QString;
*/
namespace QPatternist
{
-
- /**
- * @internal
- *
- * A method to allow a QHash or QSet with QUrl
- * as key type.
- */
- inline uint qHash(const QUrl &uri)
- {
- return qHash(uri.toString());
- }
-
/**
* @defgroup Patternist_cppWXSTypes C++ Primitives for W3C XML Schema Number Types
*
@@ -208,8 +196,6 @@ namespace QPatternist
QString Q_AUTOTEST_EXPORT escape(const QString &input);
}
-using QPatternist::qHash;
-
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/tests/arthur/lance/widgets.h b/tests/arthur/lance/widgets.h
index 88e0726531..f7d32685b8 100644
--- a/tests/arthur/lance/widgets.h
+++ b/tests/arthur/lance/widgets.h
@@ -236,7 +236,12 @@ public:
}
if (m_render_view.isNull()) {
- m_render_view = T::window()->windowSurface()->grabWidget(this);
+
+ if (T::window()->windowSurface())
+ m_render_view = T::window()->windowSurface()->grabWidget(this);
+ else
+ m_render_view = QPixmap::grabWidget(this);
+
m_render_view.save("renderView.png");
}
}
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 0d48522a8f..497e7206b9 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -18,5 +18,6 @@ contains(QT_CONFIG, webkit): SUBDIRS += webkit.pro
contains(QT_CONFIG, multimedia): SUBDIRS += multimedia.pro
contains(QT_CONFIG, phonon): SUBDIRS += phonon.pro
contains(QT_CONFIG, svg): SUBDIRS += svg.pro
+contains(QT_CONFIG, declarative): SUBDIRS += declarative
diff --git a/tests/auto/declarative/.gitignore b/tests/auto/declarative/.gitignore
new file mode 100644
index 0000000000..d937eb424d
--- /dev/null
+++ b/tests/auto/declarative/.gitignore
@@ -0,0 +1,4 @@
+tst_*
+!tst_*.*
+tst_*.debug
+tst_*~
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
new file mode 100644
index 0000000000..143fbadf1d
--- /dev/null
+++ b/tests/auto/declarative/declarative.pro
@@ -0,0 +1,72 @@
+TEMPLATE = subdirs
+SUBDIRS += \
+ graphicswidgets \ # Cover
+ layouts \ # Cover
+ parserstress \ # Cover
+ qmetaobjectbuilder \ # Cover
+ qdeclarativeanimations \ # Cover
+ qdeclarativebehaviors \ # Cover
+ qdeclarativebinding \ # Cover
+ qdeclarativecomponent \ # Cover
+ qdeclarativeconnection \ # Cover
+ qdeclarativecontext \ # Cover
+ qdeclarativedebug \ # Cover
+ qdeclarativedebugclient \ # Cover
+ qdeclarativedebugservice \ # Cover
+ qdeclarativedom \ # Cover
+ qdeclarativeeasefollow \ # Cover
+ qdeclarativeecmascript \ # Cover
+ qdeclarativeengine \ # Cover
+ qdeclarativeerror \ # Cover
+ qdeclarativefontloader \ # Cover
+ qdeclarativeanchors \ # Cover
+ qdeclarativeanimatedimage \ # Cover
+ qdeclarativeimage \ # Cover
+ qdeclarativeborderimage \ # Cover
+ qdeclarativeflickable \ # Cover
+ qdeclarativeflipable \ # Cover
+ qdeclarativegridview \ # Cover
+ qdeclarativeitem \ # Cover
+ qdeclarativelistview \ # Cover
+ qdeclarativeloader \ # Cover
+ qdeclarativemousearea \ # Cover
+ qdeclarativeparticles \ # Cover
+ qdeclarativepathview \ # Cover
+ qdeclarativepositioners \ # Cover
+ qdeclarativetext \ # Cover
+ qdeclarativetextedit \ # Cover
+ qdeclarativetextinput \ # Cover
+ qdeclarativeinfo \ # Cover
+ qdeclarativeinstruction \ # Cover
+ qdeclarativelanguage \ # Cover
+ qdeclarativelistreference \ # Cover
+ qdeclarativelistmodel \ # Cover
+ qdeclarativeproperty \ # Cover
+ qdeclarativemetatype \ # Cover
+ qdeclarativemoduleplugin \ # Cover
+ qdeclarativepixmapcache \ # Cover
+ qdeclarativepropertymap \ # Cover
+ qdeclarativeqt \ # Cover
+ qdeclarativespringfollow \ # Cover
+ qdeclarativestates \ # Cover
+ qdeclarativesystempalette \ # Cover
+ qdeclarativetimer \ # Cover
+ qdeclarativexmllistmodel \ # Cover
+ qpacketprotocol \ # Cover
+ qdeclarativerepeater \ # Cover
+ qdeclarativeworkerscript \ # Cover
+ qdeclarativeworkerlistmodel \ # Cover
+ qdeclarativevaluetypes \ # Cover
+ qdeclarativexmlhttprequest \ # Cover
+ qdeclarativeimageprovider \ # Cover
+ qdeclarativestyledtext \ # Cover
+ sql # Cover
+
+contains(QT_CONFIG, webkit) {
+ SUBDIRS += \
+ qdeclarativewebview # Cover
+}
+
+# Tests which should run in Pulse
+PULSE_TESTS = $$SUBDIRS
+
diff --git a/tests/auto/declarative/examples/data/dummytest.qml b/tests/auto/declarative/examples/data/dummytest.qml
new file mode 100644
index 0000000000..b20e907f27
--- /dev/null
+++ b/tests/auto/declarative/examples/data/dummytest.qml
@@ -0,0 +1,6 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame { msec: 0 }
+ Frame { msec: 10 }
+}
diff --git a/tests/auto/declarative/examples/data/webbrowser/webbrowser.qml b/tests/auto/declarative/examples/data/webbrowser/webbrowser.qml
new file mode 100644
index 0000000000..d31787b939
--- /dev/null
+++ b/tests/auto/declarative/examples/data/webbrowser/webbrowser.qml
@@ -0,0 +1,6 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame { msec: 0 }
+ Frame { msec: 2000 }
+}
diff --git a/tests/auto/declarative/examples/examples.pro b/tests/auto/declarative/examples/examples.pro
new file mode 100644
index 0000000000..85d2a73ce0
--- /dev/null
+++ b/tests/auto/declarative/examples/examples.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_examples.cpp
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/examples/tst_examples.cpp b/tests/auto/declarative/examples/tst_examples.cpp
new file mode 100644
index 0000000000..678dd5909f
--- /dev/null
+++ b/tests/auto/declarative/examples/tst_examples.cpp
@@ -0,0 +1,203 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QLibraryInfo>
+#include <QDir>
+#include <QProcess>
+#include <QDebug>
+
+class tst_examples : public QObject
+{
+ Q_OBJECT
+public:
+ tst_examples();
+
+private slots:
+ void examples_data();
+ void examples();
+
+ void namingConvention();
+private:
+ QString qmlruntime;
+ QStringList excludedDirs;
+
+ void namingConvention(const QDir &);
+ QStringList findQmlFiles(const QDir &);
+};
+
+tst_examples::tst_examples()
+{
+ QString binaries = QLibraryInfo::location(QLibraryInfo::BinariesPath);
+
+#if defined(Q_WS_MAC)
+ qmlruntime = QDir(binaries).absoluteFilePath("qml.app/Contents/MacOS/qml");
+#elif defined(Q_WS_WIN)
+ qmlruntime = QDir(binaries).absoluteFilePath("qml.exe");
+#else
+ qmlruntime = QDir(binaries).absoluteFilePath("qml");
+#endif
+
+
+ // Add directories you want excluded here
+ excludedDirs << "examples/declarative/extending";
+ excludedDirs << "examples/declarative/plugins";
+}
+
+/*
+This tests that the demos and examples follow the naming convention required
+to have them tested by the examples() test.
+*/
+void tst_examples::namingConvention(const QDir &d)
+{
+ for (int ii = 0; ii < excludedDirs.count(); ++ii) {
+ QString s = QDir::toNativeSeparators(excludedDirs.at(ii));
+ if (d.absolutePath().endsWith(s))
+ return;
+ }
+
+ QStringList files = d.entryList(QStringList() << QLatin1String("*.qml"),
+ QDir::Files);
+
+ bool seenQml = !files.isEmpty();
+ bool seenLowercase = false;
+
+ foreach (const QString &file, files) {
+ if (file.at(0).isLower())
+ seenLowercase = true;
+ }
+
+ if (!seenQml) {
+ QStringList dirs = d.entryList(QDir::Dirs | QDir::NoDotAndDotDot |
+ QDir::NoSymLinks);
+ foreach (const QString &dir, dirs) {
+ QDir sub = d;
+ sub.cd(dir);
+ namingConvention(sub);
+ }
+ } else if(!seenLowercase) {
+ QTest::qFail(QString("Directory " + d.absolutePath() + " violates naming convention").toLatin1().constData(), __FILE__, __LINE__);
+ }
+}
+
+void tst_examples::namingConvention()
+{
+ QString examples = QLibraryInfo::location(QLibraryInfo::ExamplesPath);
+ QString demos = QLibraryInfo::location(QLibraryInfo::DemosPath);
+
+ namingConvention(QDir(examples));
+ namingConvention(QDir(demos));
+}
+
+QStringList tst_examples::findQmlFiles(const QDir &d)
+{
+ for (int ii = 0; ii < excludedDirs.count(); ++ii) {
+ QString s = QDir::toNativeSeparators(excludedDirs.at(ii));
+ if (d.absolutePath().endsWith(s))
+ return QStringList();
+ }
+
+ QStringList rv;
+
+ QStringList files = d.entryList(QStringList() << QLatin1String("*.qml"),
+ QDir::Files);
+ foreach (const QString &file, files) {
+ if (file.at(0).isLower()) {
+ rv << d.absoluteFilePath(file);
+ }
+ }
+
+ QStringList dirs = d.entryList(QDir::Dirs | QDir::NoDotAndDotDot |
+ QDir::NoSymLinks);
+ foreach (const QString &dir, dirs) {
+ QDir sub = d;
+ sub.cd(dir);
+ rv << findQmlFiles(sub);
+ }
+
+ return rv;
+}
+
+/*
+This test runs all the examples in the declarative UI source tree and ensures
+that they start and exit cleanly.
+
+Examples are any .qml files under the examples/ or demos/ directory that start
+with a lower case letter.
+*/
+void tst_examples::examples_data()
+{
+ QTest::addColumn<QString>("file");
+
+ QString examples = QLibraryInfo::location(QLibraryInfo::ExamplesPath);
+ QString demos = QLibraryInfo::location(QLibraryInfo::DemosPath);
+ QString snippets = QLatin1String(SRCDIR) + "/../../../../doc/src/snippets/";
+
+ QStringList files;
+ files << findQmlFiles(QDir(examples));
+ files << findQmlFiles(QDir(demos));
+ files << findQmlFiles(QDir(snippets));
+
+ foreach (const QString &file, files)
+ QTest::newRow(file.toLatin1().constData()) << file;
+}
+
+void tst_examples::examples()
+{
+ QFETCH(QString, file);
+
+ QFileInfo fi(file);
+ QFileInfo dir(fi.path());
+ QString script = "data/"+dir.baseName()+"/"+fi.baseName();
+ QFileInfo testdata(script+".qml");
+ QStringList arguments;
+ arguments << "-script" << (testdata.exists() ? script : QLatin1String("data/dummytest"))
+ << "-scriptopts" << "play,testerror,exitoncomplete,exitonfailure"
+ << file;
+ QProcess p;
+ p.start(qmlruntime, arguments);
+ QVERIFY(p.waitForFinished());
+ QCOMPARE(p.exitStatus(), QProcess::NormalExit);
+ QCOMPARE(p.exitCode(), 0);
+}
+
+QTEST_MAIN(tst_examples)
+
+#include "tst_examples.moc"
diff --git a/tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml b/tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml
new file mode 100644
index 0000000000..c00173d5ed
--- /dev/null
+++ b/tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml
@@ -0,0 +1,58 @@
+import Qt 4.6
+import Qt.widgets 4.6
+
+QGraphicsView {
+ objectName: "GView"
+ size: "800x600"
+
+ QGraphicsScene {
+ objectName: "GScene"
+ sceneRect: "0,0,500x300"
+
+ QGraphicsWidget {
+ layout: QGraphicsLinearLayout {
+ orientation: Qt.Horizontal
+ QGraphicsWidget {
+ layout: QGraphicsLinearLayout {
+ spacing: 10; orientation: Qt.Vertical
+ LayoutItem {
+ QGraphicsLinearLayout.stretchFactor: 1
+ objectName: "left"
+ minimumSize: "100x100"
+ maximumSize: "300x300"
+ preferredSize: "100x100"
+ Rectangle { objectName: "yellowRect"; color: "yellow"; anchors.fill: parent }
+ }
+ LayoutItem {
+ QGraphicsLinearLayout.stretchFactor: 10
+ objectName: "left"
+ minimumSize: "100x100"
+ maximumSize: "300x300"
+ preferredSize: "100x100"
+ Rectangle { objectName: "yellowRect"; color: "blue"; anchors.fill: parent }
+ }
+ }
+ }
+ QGraphicsWidget {
+ layout: QGraphicsLinearLayout {
+ spacing: 10; orientation: Qt.Vertical
+ LayoutItem {
+ objectName: "left"
+ minimumSize: "100x100"
+ maximumSize: "300x300"
+ preferredSize: "100x100"
+ Rectangle { objectName: "yellowRect"; color: "red"; anchors.fill: parent }
+ }
+ LayoutItem {
+ objectName: "left"
+ minimumSize: "100x100"
+ maximumSize: "300x300"
+ preferredSize: "100x100"
+ Rectangle { objectName: "yellowRect"; color: "green"; anchors.fill: parent }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/graphicswidgets/graphicswidgets.pro b/tests/auto/declarative/graphicswidgets/graphicswidgets.pro
new file mode 100644
index 0000000000..712c34c47c
--- /dev/null
+++ b/tests/auto/declarative/graphicswidgets/graphicswidgets.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_graphicswidgets.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/graphicswidgets/tst_graphicswidgets.cpp b/tests/auto/declarative/graphicswidgets/tst_graphicswidgets.cpp
new file mode 100644
index 0000000000..a85ceed3a5
--- /dev/null
+++ b/tests/auto/declarative/graphicswidgets/tst_graphicswidgets.cpp
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QFile>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtGui/qgraphicsview.h>
+
+class tst_graphicswidgets : public QObject
+
+{
+ Q_OBJECT
+public:
+ tst_graphicswidgets();
+
+private slots:
+ void widgets();
+};
+
+tst_graphicswidgets::tst_graphicswidgets()
+{
+}
+
+void tst_graphicswidgets::widgets()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/graphicswidgets.qml"));
+ QGraphicsView *obj = qobject_cast<QGraphicsView*>(c.create());
+
+ QVERIFY(obj != 0);
+ QVERIFY(obj->scene() != 0);
+ QList<QObject*> list;
+ QVERIFY(obj->scene()->children() != list);
+ delete obj;
+}
+
+QTEST_MAIN(tst_graphicswidgets)
+
+#include "tst_graphicswidgets.moc"
diff --git a/tests/auto/declarative/layouts/data/layouts.qml b/tests/auto/declarative/layouts/data/layouts.qml
new file mode 100644
index 0000000000..17925008e7
--- /dev/null
+++ b/tests/auto/declarative/layouts/data/layouts.qml
@@ -0,0 +1,34 @@
+import Qt 4.6
+import Qt.widgets 4.6
+
+Item {
+ id: resizable
+ width:300
+ height:300
+
+ GraphicsObjectContainer {
+ anchors.fill: parent
+ synchronizedResizing: true
+
+ QGraphicsWidget {
+
+ layout: QGraphicsLinearLayout {
+ spacing: 0
+ LayoutItem {
+ objectName: "left"
+ minimumSize: "100x100"
+ maximumSize: "300x300"
+ preferredSize: "100x100"
+ Rectangle { objectName: "yellowRect"; color: "yellow"; anchors.fill: parent }
+ }
+ LayoutItem {
+ objectName: "right"
+ minimumSize: "100x100"
+ maximumSize: "400x400"
+ preferredSize: "200x200"
+ Rectangle { objectName: "greenRect"; color: "green"; anchors.fill: parent }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/layouts/layouts.pro b/tests/auto/declarative/layouts/layouts.pro
new file mode 100644
index 0000000000..f38e15513a
--- /dev/null
+++ b/tests/auto/declarative/layouts/layouts.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+SOURCES += tst_layouts.cpp
+macx:CONFIG -= app_bundle
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/layouts/tst_layouts.cpp b/tests/auto/declarative/layouts/tst_layouts.cpp
new file mode 100644
index 0000000000..942125f268
--- /dev/null
+++ b/tests/auto/declarative/layouts/tst_layouts.cpp
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QtTest/QtTest>
+#include <private/qlistmodelinterface_p.h>
+#include <qdeclarativeview.h>
+#include <private/qdeclarativelayoutitem_p.h>
+#include <qdeclarativeexpression.h>
+#include <QStyle>
+
+class tst_QDeclarativeLayouts : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QDeclarativeLayouts();
+
+private slots:
+ void test_qml();//GraphicsLayout set up in Qml
+ void test_cpp();//GraphicsLayout set up in C++
+
+private:
+ QDeclarativeView *createView(const QString &filename);
+};
+
+tst_QDeclarativeLayouts::tst_QDeclarativeLayouts()
+{
+}
+
+void tst_QDeclarativeLayouts::test_qml()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/layouts.qml");
+
+ qApp->processEvents();
+ QDeclarativeLayoutItem *left = static_cast<QDeclarativeLayoutItem*>(canvas->rootObject()->findChild<QDeclarativeItem*>("left"));
+ QVERIFY(left != 0);
+
+ QDeclarativeLayoutItem *right = static_cast<QDeclarativeLayoutItem*>(canvas->rootObject()->findChild<QDeclarativeItem*>("right"));
+ QVERIFY(right != 0);
+
+ qreal l = QApplication::style()->pixelMetric(QStyle::PM_LayoutLeftMargin);
+ qreal r = QApplication::style()->pixelMetric(QStyle::PM_LayoutRightMargin);
+ qreal t = QApplication::style()->pixelMetric(QStyle::PM_LayoutTopMargin);
+ qreal b = QApplication::style()->pixelMetric(QStyle::PM_LayoutBottomMargin);
+ QVERIFY2(l == r && r == t && t == b, "Test assumes equal margins.");
+ qreal gvMargin = l;
+
+ QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(canvas->rootObject());
+ QVERIFY(rootItem != 0);
+
+ //Preferred Size
+ rootItem->setWidth(300 + 2*gvMargin);
+ rootItem->setHeight(300 + 2*gvMargin);
+
+ QCOMPARE(left->x(), gvMargin);
+ QCOMPARE(left->y(), gvMargin);
+ QCOMPARE(left->width(), 100.0);
+ QCOMPARE(left->height(), 300.0);
+
+ QCOMPARE(right->x(), 100.0 + gvMargin);
+ QCOMPARE(right->y(), 0.0 + gvMargin);
+ QCOMPARE(right->width(), 200.0);
+ QCOMPARE(right->height(), 300.0);
+
+ //Minimum Size
+ rootItem->setWidth(10+2*gvMargin);
+ rootItem->setHeight(10+2*gvMargin);
+
+ QCOMPARE(left->x(), gvMargin);
+ QCOMPARE(left->width(), 100.0);
+ QCOMPARE(left->height(), 100.0);
+
+ QCOMPARE(right->x(), 100.0 + gvMargin);
+ QCOMPARE(right->width(), 100.0);
+ QCOMPARE(right->height(), 100.0);
+
+ //Between preferred and Maximum Size
+ /*Note that if set to maximum size (or above) GraphicsLinearLayout behavior
+ is to shrink them down to preferred size. So the exact maximum size can't
+ be used*/
+ rootItem->setWidth(670 + 2*gvMargin);
+ rootItem->setHeight(300 + 2*gvMargin);
+
+ QCOMPARE(left->x(), gvMargin);
+ QCOMPARE(left->width(), 270.0);
+ QCOMPARE(left->height(), 300.0);
+
+ QCOMPARE(right->x(), 270.0 + gvMargin);
+ QCOMPARE(right->width(), 400.0);
+ QCOMPARE(right->height(), 300.0);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeLayouts::test_cpp()
+{
+ //TODO: Waiting on QT-2407 to write this test
+}
+
+QDeclarativeView *tst_QDeclarativeLayouts::createView(const QString &filename)
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setSource(QUrl::fromLocalFile(filename));
+
+ return canvas;
+}
+
+
+QTEST_MAIN(tst_QDeclarativeLayouts)
+
+#include "tst_layouts.moc"
diff --git a/tests/auto/declarative/parserstress/parserstress.pro b/tests/auto/declarative/parserstress/parserstress.pro
new file mode 100644
index 0000000000..48f147a774
--- /dev/null
+++ b/tests/auto/declarative/parserstress/parserstress.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_parserstress.cpp
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/parserstress/tst_parserstress.cpp b/tests/auto/declarative/parserstress/tst_parserstress.cpp
new file mode 100644
index 0000000000..6ff5515c31
--- /dev/null
+++ b/tests/auto/declarative/parserstress/tst_parserstress.cpp
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QDebug>
+#include <QDir>
+#include <QFile>
+
+class tst_parserstress : public QObject
+{
+ Q_OBJECT
+public:
+ tst_parserstress() {}
+
+private slots:
+ void ecmascript_data();
+ void ecmascript();
+
+private:
+ static QStringList findJSFiles(const QDir &);
+ QDeclarativeEngine engine;
+};
+
+QStringList tst_parserstress::findJSFiles(const QDir &d)
+{
+ QStringList rv;
+
+ QStringList files = d.entryList(QStringList() << QLatin1String("*.js"),
+ QDir::Files);
+ foreach (const QString &file, files) {
+ if (file == "browser.js")
+ continue;
+ rv << d.absoluteFilePath(file);
+ }
+
+ QStringList dirs = d.entryList(QDir::Dirs | QDir::NoDotAndDotDot |
+ QDir::NoSymLinks);
+ foreach (const QString &dir, dirs) {
+ QDir sub = d;
+ sub.cd(dir);
+ rv << findJSFiles(sub);
+ }
+
+ return rv;
+}
+
+void tst_parserstress::ecmascript_data()
+{
+ QDir dir(SRCDIR);
+ dir.cdUp();
+ dir.cdUp();
+ dir.cd("qscriptjstestsuite");
+ dir.cd("tests");
+
+ QStringList files = findJSFiles(dir);
+
+ QTest::addColumn<QString>("file");
+ foreach (const QString &file, files) {
+ QTest::newRow(qPrintable(file)) << file;
+ }
+}
+
+void tst_parserstress::ecmascript()
+{
+ QFETCH(QString, file);
+
+ QFile f(file);
+ QVERIFY(f.open(QIODevice::ReadOnly));
+
+ QByteArray data = f.readAll();
+
+ QVERIFY(!data.isEmpty());
+
+ QString dataStr = QString::fromUtf8(data);
+
+ QString qml = "import Qt 4.6\n";
+ qml+= "\n";
+ qml+= "QtObject {\n";
+ qml+= " property int test\n";
+ qml+= " test: {\n";
+ qml+= dataStr + "\n";
+ qml+= " return 1;\n";
+ qml+= " }\n";
+ qml+= " Script {\n";
+ qml+= " function stress() {\n";
+ qml+= dataStr;
+ qml+= " }\n";
+ qml+= " }\n";
+ qml+= "}\n";
+
+ QByteArray qmlData = qml.toUtf8();
+
+ QDeclarativeComponent component(&engine);
+ component.setData(qmlData, QUrl::fromLocalFile(SRCDIR + QString("/dummy.qml")));
+ QSet<QString> failingTests;
+ failingTests << "uc-003.js" << "uc-005.js" << "regress-352044-02-n.js"
+ << "regress-334158.js" << "regress-58274.js" << "dowhile-006.js" << "dowhile-005.js";
+ QFileInfo info(file);
+ foreach (const QString &failing, failingTests) {
+ if (info.fileName().endsWith(failing)) {
+ QEXPECT_FAIL("", "QTBUG-8108", Continue);
+ break;
+ }
+ }
+ QVERIFY(!component.isError());
+}
+
+
+QTEST_MAIN(tst_parserstress)
+
+#include "tst_parserstress.moc"
diff --git a/tests/auto/declarative/qdeclarativeanchors/data/anchors.qml b/tests/auto/declarative/qdeclarativeanchors/data/anchors.qml
new file mode 100644
index 0000000000..b64d0b02ef
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanchors/data/anchors.qml
@@ -0,0 +1,162 @@
+import Qt 4.6
+
+Rectangle {
+ color: "white"
+ width: 240
+ height: 320
+ Rectangle { id: masterRect; objectName: "masterRect"; x: 26; width: 96; height: 20; color: "red" }
+ Rectangle {
+ id: rect1; objectName: "rect1"
+ y: 20; width: 10; height: 10
+ anchors.left: masterRect.left
+ }
+ Rectangle {
+ id: rect2; objectName: "rect2"
+ y: 20; width: 10; height: 10
+ anchors.left: masterRect.right
+ }
+ Rectangle {
+ id: rect3; objectName: "rect3"
+ y: 20; width: 10; height: 10
+ anchors.left: masterRect.horizontalCenter
+ }
+ Rectangle {
+ id: rect4; objectName: "rect4"
+ y: 30; width: 10; height: 10
+ anchors.right: masterRect.left
+ }
+ Rectangle {
+ id: rect5; objectName: "rect5"
+ y: 30; width: 10; height: 10
+ anchors.right: masterRect.right
+ }
+ Rectangle {
+ id: rect6; objectName: "rect6"
+ y: 30; width: 10; height: 10
+ anchors.right: masterRect.horizontalCenter
+ }
+ Rectangle {
+ id: rect7; objectName: "rect7"
+ y: 50; width: 10; height: 10
+ anchors.left: parent.left
+ }
+ Rectangle {
+ id: rect8; objectName: "rect8"
+ y: 50; width: 10; height: 10
+ anchors.left: parent.right
+ }
+ Rectangle {
+ id: rect9; objectName: "rect9"
+ y: 50; width: 10; height: 10
+ anchors.left: parent.horizontalCenter
+ }
+ Rectangle {
+ id: rect10; objectName: "rect10"
+ y: 60; width: 10; height: 10
+ anchors.right: parent.left
+ }
+ Rectangle {
+ id: rect11; objectName: "rect11"
+ y: 60; width: 10; height: 10
+ anchors.right: parent.right
+ }
+ Rectangle {
+ id: rect12; objectName: "rect12"
+ y: 60; width: 10; height: 10
+ anchors.right: parent.horizontalCenter
+ }
+ Rectangle {
+ id: rect13; objectName: "rect13"
+ x: 200; width: 10; height: 10
+ anchors.top: masterRect.bottom
+ }
+ Rectangle {
+ id: rect14; objectName: "rect14"
+ width: 10; height: 10; color: "steelblue"
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ Rectangle {
+ id: rect15; objectName: "rect15"
+ y: 200; height: 10
+ anchors.left: masterRect.left
+ anchors.right: masterRect.right
+ }
+ Rectangle {
+ id: rect16; objectName: "rect16"
+ y: 220; height: 10
+ anchors.left: masterRect.left
+ anchors.horizontalCenter: masterRect.right
+ }
+ Rectangle {
+ id: rect17; objectName: "rect17"
+ y: 240; height: 10
+ anchors.right: masterRect.right
+ anchors.horizontalCenter: masterRect.left
+ }
+ Rectangle {
+ id: rect18; objectName: "rect18"
+ x: 180; width: 10
+ anchors.top: masterRect.bottom
+ anchors.bottom: rect12.top
+ }
+ Rectangle {
+ id: rect19; objectName: "rect19"
+ y: 70; width: 10; height: 10
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+ Rectangle {
+ id: rect20; objectName: "rect20"
+ y: 70; width: 10; height: 10
+ anchors.horizontalCenter: parent.right
+ }
+ Rectangle {
+ id: rect21; objectName: "rect21"
+ y: 70; width: 10; height: 10
+ anchors.horizontalCenter: parent.left
+ }
+ Rectangle {
+ id: rect22; objectName: "rect22"
+ width: 10; height: 10
+ anchors.centerIn: masterRect
+ }
+ Rectangle {
+ id: rect23; objectName: "rect23"
+ anchors.left: masterRect.left
+ anchors.leftMargin: 5
+ anchors.right: masterRect.right
+ anchors.rightMargin: 5
+ anchors.top: masterRect.top
+ anchors.topMargin: 5
+ anchors.bottom: masterRect.bottom
+ anchors.bottomMargin: 5
+ }
+ Rectangle {
+ id: rect24; objectName: "rect24"
+ width: 10; height: 10
+ anchors.horizontalCenter: masterRect.left
+ anchors.horizontalCenterOffset: width/2
+ }
+ Rectangle {
+ id: rect25; objectName: "rect25"
+ width: 10; height: 10
+ anchors.verticalCenter: rect12.top
+ anchors.verticalCenterOffset: height/2
+ }
+ Rectangle {
+ id: rect26; objectName: "rect26"
+ width: 10; height: 10
+ anchors.baseline: masterRect.top
+ anchors.baselineOffset: height/2
+ }
+ Text {
+ id: text1; objectName: "text1"
+ y: 200;
+ text: "Hello"
+ }
+ Text {
+ id: text2; objectName: "text2"
+ anchors.baseline: text1.baseline
+ anchors.left: text1.right
+ text: "World"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanchors/data/centerin.qml b/tests/auto/declarative/qdeclarativeanchors/data/centerin.qml
new file mode 100644
index 0000000000..09b97f6c43
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanchors/data/centerin.qml
@@ -0,0 +1,12 @@
+import Qt 4.6
+
+Rectangle {
+ width: 200; height: 200
+ Rectangle {
+ objectName: "centered"
+ width: 50; height: 50; color: "blue"
+ anchors.centerIn: parent;
+ anchors.verticalCenterOffset: 30
+ anchors.horizontalCenterOffset: 10
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanchors/data/crash1.qml b/tests/auto/declarative/qdeclarativeanchors/data/crash1.qml
new file mode 100644
index 0000000000..fd9dc554ef
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanchors/data/crash1.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+
+Column {
+ Text {
+ text: "foo"
+ anchors.fill: parent
+ }
+ Text {
+ text: "bar"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanchors/data/fill.qml b/tests/auto/declarative/qdeclarativeanchors/data/fill.qml
new file mode 100644
index 0000000000..902465c6e3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanchors/data/fill.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+Rectangle {
+ width: 200; height: 200
+ Rectangle {
+ objectName: "filler"
+ width: 50; height: 50; color: "blue"
+ anchors.fill: parent;
+ anchors.leftMargin: 10;
+ anchors.rightMargin: 20;
+ anchors.topMargin: 30;
+ anchors.bottomMargin: 40;
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanchors/data/loop1.qml b/tests/auto/declarative/qdeclarativeanchors/data/loop1.qml
new file mode 100644
index 0000000000..a266612526
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanchors/data/loop1.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+Rectangle {
+ id: rect
+ width: 120; height: 200; color: "white"
+ Text { id: text1; anchors.right: text2.right; text: "Hello" }
+ Text { id: text2; anchors.right: text1.right; anchors.rightMargin: 10; text: "World" }
+}
diff --git a/tests/auto/declarative/qdeclarativeanchors/data/loop2.qml b/tests/auto/declarative/qdeclarativeanchors/data/loop2.qml
new file mode 100644
index 0000000000..acb57cdf18
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanchors/data/loop2.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+Rectangle {
+ id: container;
+ width: 600;
+ height: 600;
+
+ Image {
+ id: image1
+ source: "http://labs.trolltech.com/blogs/wp-content/uploads/2009/03/3311388091_ac2a257feb.jpg"
+ anchors.right: image2.left
+ }
+
+ Image {
+ id: image2
+ source: "http://labs.trolltech.com/blogs/wp-content/uploads/2009/03/oslo_groupphoto.jpg"
+ anchors.left: image1.right
+ anchors.leftMargin: 20
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanchors/data/margins.qml b/tests/auto/declarative/qdeclarativeanchors/data/margins.qml
new file mode 100644
index 0000000000..4a29e770ab
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanchors/data/margins.qml
@@ -0,0 +1,13 @@
+import Qt 4.6
+
+Rectangle {
+ width: 200; height: 200
+ Rectangle {
+ objectName: "filler"
+ width: 50; height: 50; color: "blue"
+ anchors.fill: parent;
+ anchors.margins: 10
+ anchors.leftMargin: 5
+ anchors.topMargin: 6
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro b/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
new file mode 100644
index 0000000000..ca2f68f45a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+SOURCES += tst_qdeclarativeanchors.cpp
+macx:CONFIG -= app_bundle
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
new file mode 100644
index 0000000000..9d8ba6ce1c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
@@ -0,0 +1,448 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QSignalSpy>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativeview.h>
+#include <private/qdeclarativerectangle_p.h>
+#include <private/qdeclarativetext_p.h>
+#include <QtDeclarative/private/qdeclarativeanchors_p_p.h>
+
+Q_DECLARE_METATYPE(QDeclarativeAnchors::UsedAnchor)
+Q_DECLARE_METATYPE(QDeclarativeAnchorLine::AnchorLine)
+
+
+class tst_qdeclarativeanchors : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativeanchors() {}
+
+ template<typename T>
+ T *findItem(QGraphicsObject *parent, const QString &id);
+
+private slots:
+ void basicAnchors();
+ void loops();
+ void illegalSets();
+ void illegalSets_data();
+ void reset();
+ void reset_data();
+ void resetConvenience();
+ void nullItem();
+ void nullItem_data();
+ void crash1();
+ void centerIn();
+ void fill();
+ void margins();
+};
+
+/*
+ Find an item with the specified id.
+*/
+template<typename T>
+T *tst_qdeclarativeanchors::findItem(QGraphicsObject *parent, const QString &objectName)
+{
+ const QMetaObject &mo = T::staticMetaObject;
+ QList<QGraphicsItem *> children = parent->childItems();
+ for (int i = 0; i < children.count(); ++i) {
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(children.at(i)->toGraphicsObject());
+ if (item) {
+ if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) {
+ return static_cast<T*>(item);
+ }
+ item = findItem<T>(item, objectName);
+ if (item)
+ return static_cast<T*>(item);
+ }
+ }
+
+ return 0;
+}
+
+void tst_qdeclarativeanchors::basicAnchors()
+{
+ QDeclarativeView *view = new QDeclarativeView;
+ view->setSource(QUrl::fromLocalFile(SRCDIR "/data/anchors.qml"));
+
+ qApp->processEvents();
+
+ //sibling horizontal
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect1"))->x(), 26.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect2"))->x(), 122.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect3"))->x(), 74.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect4"))->x(), 16.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect5"))->x(), 112.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect6"))->x(), 64.0);
+
+ //parent horizontal
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect7"))->x(), 0.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect8"))->x(), 240.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect9"))->x(), 120.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect10"))->x(), -10.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect11"))->x(), 230.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect12"))->x(), 110.0);
+
+ //vertical
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect13"))->y(), 20.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect14"))->y(), 155.0);
+
+ //stretch
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect15"))->x(), 26.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect15"))->width(), 96.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect16"))->x(), 26.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect16"))->width(), 192.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect17"))->x(), -70.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect17"))->width(), 192.0);
+
+ //vertical stretch
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect18"))->y(), 20.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect18"))->height(), 40.0);
+
+ //more parent horizontal
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect19"))->x(), 115.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect20"))->x(), 235.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect21"))->x(), -5.0);
+
+ //centerIn
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect22"))->x(), 69.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect22"))->y(), 5.0);
+
+ //margins
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect23"))->x(), 31.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect23"))->y(), 5.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect23"))->width(), 86.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect23"))->height(), 10.0);
+
+ // offsets
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect24"))->x(), 26.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect25"))->y(), 60.0);
+ QCOMPARE(findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("rect26"))->y(), 5.0);
+
+ //baseline
+ QDeclarativeText *text1 = findItem<QDeclarativeText>(view->rootObject(), QLatin1String("text1"));
+ QDeclarativeText *text2 = findItem<QDeclarativeText>(view->rootObject(), QLatin1String("text2"));
+ QCOMPARE(text1->y(), text2->y());
+
+ delete view;
+}
+
+// mostly testing that we don't crash
+void tst_qdeclarativeanchors::loops()
+{
+ {
+ QUrl source(QUrl::fromLocalFile(SRCDIR "/data/loop1.qml"));
+
+ QString expect = "QML Text (" + source.toString() + ":6:5" + ") Possible anchor loop detected on horizontal anchor.";
+ QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
+ QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
+ QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
+
+ QDeclarativeView *view = new QDeclarativeView;
+ view->setSource(source);
+ qApp->processEvents();
+
+ delete view;
+ }
+
+ {
+ QUrl source(QUrl::fromLocalFile(SRCDIR "/data/loop2.qml"));
+
+ QString expect = "QML Image (" + source.toString() + ":8:3" + ") Possible anchor loop detected on horizontal anchor.";
+ QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
+
+ QDeclarativeView *view = new QDeclarativeView;
+ view->setSource(source);
+ qApp->processEvents();
+
+ delete view;
+ }
+}
+
+void tst_qdeclarativeanchors::illegalSets()
+{
+ QFETCH(QString, qml);
+ QFETCH(QString, warning);
+
+ QTest::ignoreMessage(QtWarningMsg, warning.toLatin1());
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine);
+ component.setData(QByteArray("import Qt 4.6\n" + qml.toUtf8()), QUrl::fromLocalFile(""));
+ if (!component.isReady())
+ qWarning() << "Test errors:" << component.errors();
+ QVERIFY(component.isReady());
+ QObject *o = component.create();
+ delete o;
+}
+
+void tst_qdeclarativeanchors::illegalSets_data()
+{
+ QTest::addColumn<QString>("qml");
+ QTest::addColumn<QString>("warning");
+
+ QTest::newRow("H - too many anchors")
+ << "Rectangle { id: rect; Rectangle { anchors.left: rect.left; anchors.right: rect.right; anchors.horizontalCenter: rect.horizontalCenter } }"
+ << "QML Rectangle (file::2:23) Cannot specify left, right, and hcenter anchors.";
+
+ foreach (const QString &side, QStringList() << "left" << "right") {
+ QTest::newRow("H - anchor to V")
+ << QString("Rectangle { Rectangle { anchors.%1: parent.top } }").arg(side)
+ << "QML Rectangle (file::2:13) Cannot anchor a horizontal edge to a vertical edge.";
+
+ QTest::newRow("H - anchor to non parent/sibling")
+ << QString("Rectangle { Item { Rectangle { id: rect } } Rectangle { anchors.%1: rect.%1 } }").arg(side)
+ << "QML Rectangle (file::2:45) Cannot anchor to an item that isn't a parent or sibling.";
+
+ QTest::newRow("H - anchor to self")
+ << QString("Rectangle { id: rect; anchors.%1: rect.%1 }").arg(side)
+ << "QML Rectangle (file::2:1) Cannot anchor item to self.";
+ }
+
+
+ QTest::newRow("V - too many anchors")
+ << "Rectangle { id: rect; Rectangle { anchors.top: rect.top; anchors.bottom: rect.bottom; anchors.verticalCenter: rect.verticalCenter } }"
+ << "QML Rectangle (file::2:23) Cannot specify top, bottom, and vcenter anchors.";
+
+ QTest::newRow("V - too many anchors with baseline")
+ << "Rectangle { Text { id: text1; text: \"Hello\" } Text { anchors.baseline: text1.baseline; anchors.top: text1.top; } }"
+ << "QML Text (file::2:47) Baseline anchor cannot be used in conjunction with top, bottom, or vcenter anchors.";
+
+ foreach (const QString &side, QStringList() << "top" << "bottom" << "baseline") {
+
+ QTest::newRow("V - anchor to H")
+ << QString("Rectangle { Rectangle { anchors.%1: parent.left } }").arg(side)
+ << "QML Rectangle (file::2:13) Cannot anchor a vertical edge to a horizontal edge.";
+
+ QTest::newRow("V - anchor to non parent/sibling")
+ << QString("Rectangle { Item { Rectangle { id: rect } } Rectangle { anchors.%1: rect.%1 } }").arg(side)
+ << "QML Rectangle (file::2:45) Cannot anchor to an item that isn't a parent or sibling.";
+
+ QTest::newRow("V - anchor to self")
+ << QString("Rectangle { id: rect; anchors.%1: rect.%1 }").arg(side)
+ << "QML Rectangle (file::2:1) Cannot anchor item to self.";
+ }
+
+
+ QTest::newRow("centerIn - anchor to non parent/sibling")
+ << "Rectangle { Item { Rectangle { id: rect } } Rectangle { anchors.centerIn: rect} }"
+ << "QML Rectangle (file::2:45) Cannot anchor to an item that isn't a parent or sibling.";
+
+
+ QTest::newRow("fill - anchor to non parent/sibling")
+ << "Rectangle { Item { Rectangle { id: rect } } Rectangle { anchors.fill: rect} }"
+ << "QML Rectangle (file::2:45) Cannot anchor to an item that isn't a parent or sibling.";
+}
+
+void tst_qdeclarativeanchors::reset()
+{
+ QFETCH(QString, side);
+ QFETCH(QDeclarativeAnchorLine::AnchorLine, anchorLine);
+ QFETCH(QDeclarativeAnchors::UsedAnchor, usedAnchor);
+
+ QDeclarativeItem *baseItem = new QDeclarativeItem;
+
+ QDeclarativeAnchorLine anchor;
+ anchor.item = baseItem;
+ anchor.anchorLine = anchorLine;
+
+ QDeclarativeItem *item = new QDeclarativeItem;
+
+ const QMetaObject *meta = item->anchors()->metaObject();
+ QMetaProperty p = meta->property(meta->indexOfProperty(side.toUtf8().constData()));
+
+ QVERIFY(p.write(item->anchors(), qVariantFromValue(anchor)));
+ QCOMPARE(item->anchors()->usedAnchors().testFlag(usedAnchor), true);
+
+ QVERIFY(p.reset(item->anchors()));
+ QCOMPARE(item->anchors()->usedAnchors().testFlag(usedAnchor), false);
+
+ delete item;
+ delete baseItem;
+}
+
+void tst_qdeclarativeanchors::reset_data()
+{
+ QTest::addColumn<QString>("side");
+ QTest::addColumn<QDeclarativeAnchorLine::AnchorLine>("anchorLine");
+ QTest::addColumn<QDeclarativeAnchors::UsedAnchor>("usedAnchor");
+
+ QTest::newRow("left") << "left" << QDeclarativeAnchorLine::Left << QDeclarativeAnchors::HasLeftAnchor;
+ QTest::newRow("top") << "top" << QDeclarativeAnchorLine::Top << QDeclarativeAnchors::HasTopAnchor;
+ QTest::newRow("right") << "right" << QDeclarativeAnchorLine::Right << QDeclarativeAnchors::HasRightAnchor;
+ QTest::newRow("bottom") << "bottom" << QDeclarativeAnchorLine::Bottom << QDeclarativeAnchors::HasBottomAnchor;
+
+ QTest::newRow("hcenter") << "horizontalCenter" << QDeclarativeAnchorLine::HCenter << QDeclarativeAnchors::HasHCenterAnchor;
+ QTest::newRow("vcenter") << "verticalCenter" << QDeclarativeAnchorLine::VCenter << QDeclarativeAnchors::HasVCenterAnchor;
+ QTest::newRow("baseline") << "baseline" << QDeclarativeAnchorLine::Baseline << QDeclarativeAnchors::HasBaselineAnchor;
+}
+
+void tst_qdeclarativeanchors::resetConvenience()
+{
+ QDeclarativeItem *baseItem = new QDeclarativeItem;
+ QDeclarativeItem *item = new QDeclarativeItem;
+
+ //fill
+ item->anchors()->setFill(baseItem);
+ QVERIFY(item->anchors()->fill() == baseItem);
+ item->anchors()->resetFill();
+ QVERIFY(item->anchors()->fill() == 0);
+
+ //centerIn
+ item->anchors()->setCenterIn(baseItem);
+ QVERIFY(item->anchors()->centerIn() == baseItem);
+ item->anchors()->resetCenterIn();
+ QVERIFY(item->anchors()->centerIn() == 0);
+
+ delete item;
+ delete baseItem;
+}
+
+void tst_qdeclarativeanchors::nullItem()
+{
+ QFETCH(QString, side);
+
+ QDeclarativeAnchorLine anchor;
+ QDeclarativeItem *item = new QDeclarativeItem;
+
+ const QMetaObject *meta = item->anchors()->metaObject();
+ QMetaProperty p = meta->property(meta->indexOfProperty(side.toUtf8().constData()));
+
+ QTest::ignoreMessage(QtWarningMsg, "QML Item (unknown location) Cannot anchor to a null item.");
+ QVERIFY(p.write(item->anchors(), qVariantFromValue(anchor)));
+
+ delete item;
+}
+
+void tst_qdeclarativeanchors::nullItem_data()
+{
+ QTest::addColumn<QString>("side");
+
+ QTest::newRow("left") << "left";
+ QTest::newRow("top") << "top";
+ QTest::newRow("right") << "right";
+ QTest::newRow("bottom") << "bottom";
+
+ QTest::newRow("hcenter") << "horizontalCenter";
+ QTest::newRow("vcenter") << "verticalCenter";
+ QTest::newRow("baseline") << "baseline";
+}
+
+void tst_qdeclarativeanchors::crash1()
+{
+ QUrl source(QUrl::fromLocalFile(SRCDIR "/data/crash1.qml"));
+
+ QString expect = "QML Text (" + source.toString() + ":4:5" + ") Possible anchor loop detected on fill.";
+ QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
+ QTest::ignoreMessage(QtWarningMsg, expect.toLatin1()); // XXX ideally, should be one message
+
+ QDeclarativeView *view = new QDeclarativeView(source);
+ qApp->processEvents();
+
+ delete view;
+}
+
+void tst_qdeclarativeanchors::fill()
+{
+ QDeclarativeView *view = new QDeclarativeView(QUrl::fromLocalFile(SRCDIR "/data/fill.qml"));
+
+ qApp->processEvents();
+ QDeclarativeRectangle* rect = findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("filler"));
+ QCOMPARE(rect->x(), 0.0 + 10.0);
+ QCOMPARE(rect->y(), 0.0 + 30.0);
+ QCOMPARE(rect->width(), 200.0 - 10.0 - 20.0);
+ QCOMPARE(rect->height(), 200.0 - 30.0 - 40.0);
+ //Alter Offsets (QTBUG-6631)
+ rect->anchors()->setLeftMargin(20.0);
+ rect->anchors()->setRightMargin(0.0);
+ rect->anchors()->setBottomMargin(0.0);
+ rect->anchors()->setTopMargin(10.0);
+ QCOMPARE(rect->x(), 0.0 + 20.0);
+ QCOMPARE(rect->y(), 0.0 + 10.0);
+ QCOMPARE(rect->width(), 200.0 - 20.0);
+ QCOMPARE(rect->height(), 200.0 - 10.0);
+
+ delete view;
+}
+
+void tst_qdeclarativeanchors::centerIn()
+{
+ QDeclarativeView *view = new QDeclarativeView(QUrl::fromLocalFile(SRCDIR "/data/centerin.qml"));
+
+ qApp->processEvents();
+ QDeclarativeRectangle* rect = findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("centered"));
+ QCOMPARE(rect->x(), 75.0 + 10);
+ QCOMPARE(rect->y(), 75.0 + 30);
+ //Alter Offsets (QTBUG-6631)
+ rect->anchors()->setHorizontalCenterOffset(-20.0);
+ rect->anchors()->setVerticalCenterOffset(-10.0);
+ QCOMPARE(rect->x(), 75.0 - 20.0);
+ QCOMPARE(rect->y(), 75.0 - 10.0);
+
+ delete view;
+}
+
+void tst_qdeclarativeanchors::margins()
+{
+ QDeclarativeView *view = new QDeclarativeView(QUrl::fromLocalFile(SRCDIR "/data/margins.qml"));
+
+ qApp->processEvents();
+ QDeclarativeRectangle* rect = findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("filler"));
+ QCOMPARE(rect->x(), 5.0);
+ QCOMPARE(rect->y(), 6.0);
+ QCOMPARE(rect->width(), 200.0 - 5.0 - 10.0);
+ QCOMPARE(rect->height(), 200.0 - 6.0 - 10.0);
+
+ rect->anchors()->setTopMargin(0.0);
+ rect->anchors()->setMargins(20.0);
+
+ QCOMPARE(rect->x(), 5.0);
+ QCOMPARE(rect->y(), 20.0);
+ QCOMPARE(rect->width(), 200.0 - 5.0 - 20.0);
+ QCOMPARE(rect->height(), 200.0 - 20.0 - 20.0);
+
+ delete view;
+}
+
+QTEST_MAIN(tst_qdeclarativeanchors)
+
+#include "tst_qdeclarativeanchors.moc"
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/colors.gif b/tests/auto/declarative/qdeclarativeanimatedimage/data/colors.gif
new file mode 100644
index 0000000000..1270bfaa79
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/data/colors.gif
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/colors.qml b/tests/auto/declarative/qdeclarativeanimatedimage/data/colors.qml
new file mode 100644
index 0000000000..5bada340d0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/data/colors.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+AnimatedImage {
+ source: "colors.gif"
+}
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/stickman.gif b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickman.gif
new file mode 100644
index 0000000000..7c4cd18687
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickman.gif
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/stickman.qml b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickman.qml
new file mode 100644
index 0000000000..a70db5dbe9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickman.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+AnimatedImage {
+ source: "stickman.gif"
+}
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanpause.qml b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanpause.qml
new file mode 100644
index 0000000000..7ab17d4265
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanpause.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+AnimatedImage {
+ source: "stickman.gif"
+ paused: true
+ currentFrame: 2
+}
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanstopped.qml b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanstopped.qml
new file mode 100644
index 0000000000..53b0c3a739
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/data/stickmanstopped.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+AnimatedImage {
+ source: "stickman.gif"
+ playing: false
+}
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro b/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
new file mode 100644
index 0000000000..2904986823
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative network
+HEADERS += ../shared/testhttpserver.h
+SOURCES += tst_qdeclarativeanimatedimage.cpp ../shared/testhttpserver.cpp
+macx:CONFIG -= app_bundle
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
new file mode 100644
index 0000000000..31efc64287
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
@@ -0,0 +1,191 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativeview.h>
+#include <private/qdeclarativerectangle_p.h>
+#include <private/qdeclarativeimage_p.h>
+#include <private/qdeclarativeanimatedimage_p.h>
+
+#include "../shared/testhttpserver.h"
+
+#define TRY_WAIT(expr) \
+ do { \
+ for (int ii = 0; ii < 6; ++ii) { \
+ if ((expr)) break; \
+ QTest::qWait(50); \
+ } \
+ QVERIFY((expr)); \
+ } while (false)
+
+
+class tst_qdeclarativeanimatedimage : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativeanimatedimage() {}
+
+private slots:
+ void play();
+ void pause();
+ void stopped();
+ void setFrame();
+ void frameCount();
+ void remote();
+ void remote_data();
+ void invalidSource();
+};
+
+void tst_qdeclarativeanimatedimage::play()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/stickman.qml"));
+ QDeclarativeAnimatedImage *anim = qobject_cast<QDeclarativeAnimatedImage *>(component.create());
+ QVERIFY(anim);
+ QVERIFY(anim->isPlaying());
+
+ delete anim;
+}
+
+void tst_qdeclarativeanimatedimage::pause()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/stickmanpause.qml"));
+ QDeclarativeAnimatedImage *anim = qobject_cast<QDeclarativeAnimatedImage *>(component.create());
+ QVERIFY(anim);
+ QVERIFY(anim->isPlaying());
+ QVERIFY(anim->isPaused());
+
+ delete anim;
+}
+
+void tst_qdeclarativeanimatedimage::stopped()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/stickmanstopped.qml"));
+ QDeclarativeAnimatedImage *anim = qobject_cast<QDeclarativeAnimatedImage *>(component.create());
+ QVERIFY(anim);
+ QVERIFY(!anim->isPlaying());
+ QCOMPARE(anim->currentFrame(), 0);
+
+ delete anim;
+}
+
+void tst_qdeclarativeanimatedimage::setFrame()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/stickmanpause.qml"));
+ QDeclarativeAnimatedImage *anim = qobject_cast<QDeclarativeAnimatedImage *>(component.create());
+ QVERIFY(anim);
+ QVERIFY(anim->isPlaying());
+ QCOMPARE(anim->currentFrame(), 2);
+
+ delete anim;
+}
+
+void tst_qdeclarativeanimatedimage::frameCount()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/colors.qml"));
+ QDeclarativeAnimatedImage *anim = qobject_cast<QDeclarativeAnimatedImage *>(component.create());
+ QVERIFY(anim);
+ QVERIFY(anim->isPlaying());
+ QCOMPARE(anim->frameCount(), 3);
+
+ delete anim;
+}
+
+void tst_qdeclarativeanimatedimage::remote()
+{
+ QFETCH(QString, fileName);
+ QFETCH(bool, paused);
+
+ TestHTTPServer server(14445);
+ QVERIFY(server.isValid());
+ server.serveDirectory(SRCDIR "/data");
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl("http://127.0.0.1:14445/" + fileName));
+ TRY_WAIT(component.isReady());
+
+ QDeclarativeAnimatedImage *anim = qobject_cast<QDeclarativeAnimatedImage *>(component.create());
+ QVERIFY(anim);
+
+ TRY_WAIT(anim->isPlaying());
+ if (paused) {
+ TRY_WAIT(anim->isPaused());
+ QCOMPARE(anim->currentFrame(), 2);
+ }
+
+ delete anim;
+}
+
+void tst_qdeclarativeanimatedimage::remote_data()
+{
+ QTest::addColumn<QString>("fileName");
+ QTest::addColumn<bool>("paused");
+
+ QTest::newRow("playing") << "stickman.qml" << false;
+ QTest::newRow("paused") << "stickmanpause.qml" << true;
+}
+
+void tst_qdeclarativeanimatedimage::invalidSource()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.6\n AnimatedImage { source: \"no-such-file.gif\" }", QUrl::fromLocalFile(""));
+ QVERIFY(component.isReady());
+
+ QTest::ignoreMessage(QtWarningMsg, "Error Reading Animated Image File QUrl( \"file:no-such-file.gif\" ) ");
+
+ QDeclarativeAnimatedImage *anim = qobject_cast<QDeclarativeAnimatedImage *>(component.create());
+ QVERIFY(anim);
+
+ QVERIFY(!anim->isPlaying());
+ QVERIFY(!anim->isPaused());
+ QCOMPARE(anim->currentFrame(), 0);
+ QCOMPARE(anim->frameCount(), 0);
+}
+
+QTEST_MAIN(tst_qdeclarativeanimatedimage)
+
+#include "tst_qdeclarativeanimatedimage.moc"
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/attached.qml b/tests/auto/declarative/qdeclarativeanimations/data/attached.qml
new file mode 100644
index 0000000000..0fb6f8cbca
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/attached.qml
@@ -0,0 +1,34 @@
+import Qt 4.6
+
+Rectangle {
+ width: 180; height: 200;
+
+ Component {
+ id: delegate
+ Rectangle {
+ id: wrapper
+ width: 180; height: 200
+ color: "blue"
+
+ states: State {
+ name: "otherState"
+ PropertyChanges { target: wrapper; color: "green" }
+ }
+
+ transitions: Transition {
+ PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: true }
+ ScriptAction { script: console.log(ListView.delayRemove ? "on" : "off") }
+ }
+
+ Component.onCompleted: {
+ console.log(ListView.delayRemove ? "on" : "off");
+ wrapper.state = "otherState"
+ }
+ }
+ }
+
+ ListView {
+ model: 1
+ delegate: delegate
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/badproperty1.qml b/tests/auto/declarative/qdeclarativeanimations/data/badproperty1.qml
new file mode 100644
index 0000000000..d31cae99d3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/badproperty1.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+
+Rectangle {
+ id: wrapper
+ width: 240
+ height: 320
+ Rectangle {
+ id: myRect
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+ states: State {
+ name: "state1"
+ PropertyChanges { target: myRect; border.color: "blue" }
+ }
+ transitions: Transition {
+ ColorAnimation { target: myRect; to: "red"; property: "border.colr"; duration: 1000 }
+ }
+ Component.onCompleted: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1";
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/badproperty2.qml b/tests/auto/declarative/qdeclarativeanimations/data/badproperty2.qml
new file mode 100644
index 0000000000..3b8b111ac2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/badproperty2.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+
+Rectangle {
+ id: wrapper
+ width: 240
+ height: 320
+ Rectangle {
+ id: myRect
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+ states: State {
+ name: "state1"
+ PropertyChanges { target: myRect; border.color: "blue" }
+ }
+ transitions: Transition {
+ ColorAnimation { target: myRect; to: "red"; property: "border"; duration: 1000 }
+ }
+ Component.onCompleted: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1";
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/badtype1.qml b/tests/auto/declarative/qdeclarativeanimations/data/badtype1.qml
new file mode 100644
index 0000000000..2629cf4f11
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/badtype1.qml
@@ -0,0 +1,12 @@
+import Qt 4.6
+
+Rectangle {
+ width: 240
+ height: 320
+ Rectangle {
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ PropertyAnimation on x { from: "blue"; to: "green"; }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/badtype2.qml b/tests/auto/declarative/qdeclarativeanimations/data/badtype2.qml
new file mode 100644
index 0000000000..1543a2af2e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/badtype2.qml
@@ -0,0 +1,12 @@
+import Qt 4.6
+
+Rectangle {
+ width: 240
+ height: 320
+ Rectangle {
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ NumberAnimation on x { from: "blue"; to: "green"; }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/badtype3.qml b/tests/auto/declarative/qdeclarativeanimations/data/badtype3.qml
new file mode 100644
index 0000000000..aa98c3333f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/badtype3.qml
@@ -0,0 +1,12 @@
+import Qt 4.6
+
+Rectangle {
+ width: 240
+ height: 320
+ Rectangle {
+ color: "red"
+ ColorAnimation on color { from: 10; to: 15; }
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/badtype4.qml b/tests/auto/declarative/qdeclarativeanimations/data/badtype4.qml
new file mode 100644
index 0000000000..e80762fd72
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/badtype4.qml
@@ -0,0 +1,27 @@
+import Qt 4.6
+
+Rectangle {
+ id: wrapper
+ width: 240
+ height: 320
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ MouseArea {
+ anchors.fill: parent
+ onClicked: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1";
+ }
+ }
+ states: State {
+ name: "state1"
+ PropertyChanges { target: myRect; x: 200; color: "blue" }
+ }
+ transitions: Transition {
+ //comment out each in turn to make sure each only animates the relevant property
+ ColorAnimation { properties: "x,color"; duration: 1000 } //x is real, color is color
+ NumberAnimation { properties: "x,color"; duration: 1000 } //x is real, color is color
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml b/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml
new file mode 100644
index 0000000000..408ad87cd2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml
@@ -0,0 +1,18 @@
+import Qt 4.6
+
+Rectangle {
+ id: wrapper
+ width: 600
+ height: 400
+
+ Rectangle {
+ id: redRect
+ width: 100; height: 100
+ color: Qt.rgba(1,0,0)
+ Behavior on x {
+ NumberAnimation { id: myAnim; objectName: "MyAnim"; target: redRect; property: "y"; to: 300; repeat: true}
+ }
+
+ }
+
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/dontStart.qml b/tests/auto/declarative/qdeclarativeanimations/data/dontStart.qml
new file mode 100644
index 0000000000..efed058eef
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/dontStart.qml
@@ -0,0 +1,19 @@
+import Qt 4.6
+
+Rectangle {
+ id: wrapper
+ width: 600
+ height: 400
+
+ Rectangle {
+ id: redRect
+ width: 100; height: 100
+ color: Qt.rgba(1,0,0)
+ SequentialAnimation on x {
+ running: false
+ NumberAnimation { objectName: "MyAnim"; running: true }
+ }
+
+ }
+
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/dontStart2.qml b/tests/auto/declarative/qdeclarativeanimations/data/dontStart2.qml
new file mode 100644
index 0000000000..1a6540fde5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/dontStart2.qml
@@ -0,0 +1,19 @@
+import Qt 4.6
+
+Rectangle {
+ id: wrapper
+ width: 600
+ height: 400
+
+ Rectangle {
+ id: redRect
+ width: 100; height: 100
+ color: Qt.rgba(1,0,0)
+
+ transitions: Transition {
+ SequentialAnimation {
+ NumberAnimation { id: myAnim; objectName: "MyAnim"; running: true }
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/dotproperty.qml b/tests/auto/declarative/qdeclarativeanimations/data/dotproperty.qml
new file mode 100644
index 0000000000..9f0e699da2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/dotproperty.qml
@@ -0,0 +1,24 @@
+import Qt 4.6
+
+Rectangle {
+ id: wrapper
+ width: 240
+ height: 320
+ Rectangle {
+ id: myRect
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ MouseArea {
+ anchors.fill: parent
+ onClicked: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1";
+ }
+ }
+ states: State {
+ name: "state1"
+ PropertyChanges { target: myRect; border.color: "blue" }
+ }
+ transitions: Transition {
+ ColorAnimation { properties: "border.color"; duration: 1000 }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/mixedtype1.qml b/tests/auto/declarative/qdeclarativeanimations/data/mixedtype1.qml
new file mode 100644
index 0000000000..67703669ad
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/mixedtype1.qml
@@ -0,0 +1,25 @@
+import Qt 4.6
+
+Rectangle {
+ id: wrapper
+ width: 240
+ height: 320
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ MouseArea {
+ anchors.fill: parent
+ onClicked: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1";
+ }
+ }
+ states: State {
+ name: "state1"
+ PropertyChanges { target: myRect; x: 200; border.width: 10 }
+ }
+ transitions: Transition {
+ PropertyAnimation { properties: "x,border.width"; duration: 1000 } //x is real, border.width is int
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/mixedtype2.qml b/tests/auto/declarative/qdeclarativeanimations/data/mixedtype2.qml
new file mode 100644
index 0000000000..80c9473044
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/mixedtype2.qml
@@ -0,0 +1,25 @@
+import Qt 4.6
+
+Rectangle {
+ id: wrapper
+ width: 240
+ height: 320
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ MouseArea {
+ anchors.fill: parent
+ onClicked: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1";
+ }
+ }
+ states: State {
+ name: "state1"
+ PropertyChanges { target: myRect; x: 200; color: "blue" }
+ }
+ transitions: Transition {
+ PropertyAnimation { properties: "x,color"; duration: 1000 } //x is real, color is color
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/properties.qml b/tests/auto/declarative/qdeclarativeanimations/data/properties.qml
new file mode 100644
index 0000000000..4437815b4e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/properties.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ NumberAnimation on x { to: 200 }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/properties2.qml b/tests/auto/declarative/qdeclarativeanimations/data/properties2.qml
new file mode 100644
index 0000000000..b1f2020822
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/properties2.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ NumberAnimation on x { targets: theRect; properties: "x"; to: 200; }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/properties3.qml b/tests/auto/declarative/qdeclarativeanimations/data/properties3.qml
new file mode 100644
index 0000000000..0a0ed6f247
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/properties3.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ NumberAnimation on x { target: theRect; property: "x"; to: 300; }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/properties4.qml b/tests/auto/declarative/qdeclarativeanimations/data/properties4.qml
new file mode 100644
index 0000000000..a90f004fb5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/properties4.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ NumberAnimation on x { target: theRect; property: "y"; to: 200; }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/properties5.qml b/tests/auto/declarative/qdeclarativeanimations/data/properties5.qml
new file mode 100644
index 0000000000..7d3cec9481
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/properties5.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ NumberAnimation on x { targets: theRect; properties: "y"; to: 200; }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition.qml b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition.qml
new file mode 100644
index 0000000000..b13b94b3fc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition.qml
@@ -0,0 +1,29 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+
+ states: State {
+ name: "moved"
+ PropertyChanges {
+ target: theRect
+ x: 200
+ }
+ }
+ transitions: Transition {
+ NumberAnimation { targets: theRect; properties: "x" }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: parent.state = "moved"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition2.qml b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition2.qml
new file mode 100644
index 0000000000..033c5c1f29
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition2.qml
@@ -0,0 +1,29 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+
+ states: State {
+ name: "moved"
+ PropertyChanges {
+ target: theRect
+ x: 200
+ }
+ }
+ transitions: Transition {
+ NumberAnimation { target: theRect; property: "y"; to: 200 }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: parent.state = "moved"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition3.qml b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition3.qml
new file mode 100644
index 0000000000..d0704c9429
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition3.qml
@@ -0,0 +1,29 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+
+ states: State {
+ name: "moved"
+ PropertyChanges {
+ target: theRect
+ x: 200
+ }
+ }
+ transitions: Transition {
+ NumberAnimation { targets: theRect; properties: "y" }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: parent.state = "moved"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition4.qml b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition4.qml
new file mode 100644
index 0000000000..e70c95c943
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition4.qml
@@ -0,0 +1,29 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+
+ states: State {
+ name: "moved"
+ PropertyChanges {
+ target: theRect
+ x: 200
+ }
+ }
+ transitions: Transition {
+ NumberAnimation { target: theRect; properties: "x" }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: parent.state = "moved"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition5.qml b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition5.qml
new file mode 100644
index 0000000000..b9e27da523
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition5.qml
@@ -0,0 +1,29 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+
+ states: State {
+ name: "moved"
+ PropertyChanges {
+ target: theRect
+ x: 200
+ }
+ }
+ transitions: Transition {
+ NumberAnimation { targets: theRect; property: "x" }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: parent.state = "moved"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition6.qml b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition6.qml
new file mode 100644
index 0000000000..7417ed14ee
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/propertiesTransition6.qml
@@ -0,0 +1,29 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: theRect
+ objectName: "TheRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ }
+
+ states: State {
+ name: "moved"
+ PropertyChanges {
+ target: theRect
+ x: 200
+ }
+ }
+ transitions: Transition {
+ NumberAnimation { targets: theItem; properties: "x" }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: parent.state = "moved"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/rotation.qml b/tests/auto/declarative/qdeclarativeanimations/data/rotation.qml
new file mode 100644
index 0000000000..e9c57d41db
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/rotation.qml
@@ -0,0 +1,48 @@
+import Qt 4.6
+
+Rectangle {
+ width: 600; height: 200
+
+ Row {
+ spacing: 5
+ Rectangle {
+ id: rr
+ objectName: "rr"
+ color: "red"
+ width: 100; height: 100
+ }
+ Rectangle {
+ id: rr2
+ objectName: "rr2"
+ color: "red"
+ width: 100; height: 100
+ }
+ Rectangle {
+ id: rr3
+ objectName: "rr3"
+ color: "red"
+ width: 100; height: 100
+ }
+ Rectangle {
+ id: rr4
+ objectName: "rr4"
+ color: "red"
+ width: 100; height: 100
+ }
+ }
+
+ states: State {
+ name: "state1"
+ PropertyChanges { target: rr; rotation: 370 }
+ PropertyChanges { target: rr2; rotation: 370 }
+ PropertyChanges { target: rr3; rotation: 370 }
+ PropertyChanges { target: rr4; rotation: 370 }
+ }
+
+ transitions: Transition {
+ RotationAnimation { target: rr; direction: RotationAnimation.Numerical; duration: 1000 }
+ RotationAnimation { target: rr2; direction: RotationAnimation.Clockwise; duration: 1000 }
+ RotationAnimation { target: rr3; direction: RotationAnimation.Counterclockwise; duration: 1000 }
+ RotationAnimation { target: rr4; direction: RotationAnimation.Shortest; duration: 1000 }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/valuesource.qml b/tests/auto/declarative/qdeclarativeanimations/data/valuesource.qml
new file mode 100644
index 0000000000..2260440e77
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/valuesource.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: rect
+ objectName: "MyRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ NumberAnimation on x { id: anim; objectName: "MyAnim"; to: 200 }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/valuesource2.qml b/tests/auto/declarative/qdeclarativeanimations/data/valuesource2.qml
new file mode 100644
index 0000000000..36d6c72787
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/data/valuesource2.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: rect
+ objectName: "MyRect"
+ color: "red"
+ width: 50; height: 50
+ x: 100; y: 100
+ NumberAnimation on x { id: anim; objectName: "MyAnim"; running: false; to: 200 }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro b/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
new file mode 100644
index 0000000000..8eac75f10d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+SOURCES += tst_qdeclarativeanimations.cpp
+macx:CONFIG -= app_bundle
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
new file mode 100644
index 0000000000..076afea147
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
@@ -0,0 +1,730 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativeview.h>
+#include <private/qdeclarativerectangle_p.h>
+#include <private/qdeclarativeanimation_p.h>
+#include <QVariantAnimation>
+#include <QEasingCurve>
+
+class tst_qdeclarativeanimations : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativeanimations() {}
+
+private slots:
+ void initTestCase() { QDeclarativeEngine engine; } // ensure types are registered
+
+ void simpleProperty();
+ void simpleNumber();
+ void simpleColor();
+ void simpleRotation();
+ void alwaysRunToEnd();
+ void complete();
+ void resume();
+ void dotProperty();
+ void badTypes();
+ void badProperties();
+ void mixedTypes();
+ void properties();
+ void propertiesTransition();
+ void invalidDuration();
+ void attached();
+ void propertyValueSourceDefaultStart();
+ void dontStart();
+ void easingProperties();
+ void rotation();
+};
+
+#define QTIMED_COMPARE(lhs, rhs) do { \
+ for (int ii = 0; ii < 5; ++ii) { \
+ if (lhs == rhs) \
+ break; \
+ QTest::qWait(50); \
+ } \
+ QCOMPARE(lhs, rhs); \
+} while (false)
+
+void tst_qdeclarativeanimations::simpleProperty()
+{
+ QDeclarativeRectangle rect;
+ QDeclarativePropertyAnimation animation;
+ animation.setTarget(&rect);
+ animation.setProperty("pos");
+ animation.setTo(QPointF(200,200));
+ QVERIFY(animation.target() == &rect);
+ QVERIFY(animation.property() == "pos");
+ QVERIFY(animation.to().toPointF() == QPointF(200,200));
+ animation.start();
+ QVERIFY(animation.isRunning());
+ QTest::qWait(animation.duration());
+ QTIMED_COMPARE(rect.pos(), QPointF(200,200));
+
+ rect.setPos(0,0);
+ animation.start();
+ animation.pause();
+ QVERIFY(animation.isRunning());
+ QVERIFY(animation.isPaused());
+ animation.setCurrentTime(125);
+ QVERIFY(animation.currentTime() == 125);
+ QCOMPARE(rect.pos(), QPointF(100,100));
+}
+
+void tst_qdeclarativeanimations::simpleNumber()
+{
+ QDeclarativeRectangle rect;
+ QDeclarativeNumberAnimation animation;
+ animation.setTarget(&rect);
+ animation.setProperty("x");
+ animation.setTo(200);
+ QVERIFY(animation.target() == &rect);
+ QVERIFY(animation.property() == "x");
+ QVERIFY(animation.to() == 200);
+ animation.start();
+ QVERIFY(animation.isRunning());
+ QTest::qWait(animation.duration());
+ QTIMED_COMPARE(rect.x(), qreal(200));
+
+ rect.setX(0);
+ animation.start();
+ animation.pause();
+ QVERIFY(animation.isRunning());
+ QVERIFY(animation.isPaused());
+ animation.setCurrentTime(125);
+ QVERIFY(animation.currentTime() == 125);
+ QCOMPARE(rect.x(), qreal(100));
+}
+
+void tst_qdeclarativeanimations::simpleColor()
+{
+ QDeclarativeRectangle rect;
+ QDeclarativeColorAnimation animation;
+ animation.setTarget(&rect);
+ animation.setProperty("color");
+ animation.setTo(QColor("red"));
+ QVERIFY(animation.target() == &rect);
+ QVERIFY(animation.property() == "color");
+ QVERIFY(animation.to() == QColor("red"));
+ animation.start();
+ QVERIFY(animation.isRunning());
+ QTest::qWait(animation.duration());
+ QTIMED_COMPARE(rect.color(), QColor("red"));
+
+ rect.setColor(QColor("blue"));
+ animation.start();
+ animation.pause();
+ QVERIFY(animation.isRunning());
+ QVERIFY(animation.isPaused());
+ animation.setCurrentTime(125);
+ QVERIFY(animation.currentTime() == 125);
+ QCOMPARE(rect.color(), QColor::fromRgbF(0.498039, 0, 0.498039, 1));
+
+ rect.setColor(QColor("green"));
+ animation.setFrom(QColor("blue"));
+ QVERIFY(animation.from() == QColor("blue"));
+ animation.restart();
+ QCOMPARE(rect.color(), QColor("blue"));
+ QVERIFY(animation.isRunning());
+ animation.setCurrentTime(125);
+ QCOMPARE(rect.color(), QColor::fromRgbF(0.498039, 0, 0.498039, 1));
+}
+
+void tst_qdeclarativeanimations::simpleRotation()
+{
+ QDeclarativeRectangle rect;
+ QDeclarativeRotationAnimation animation;
+ animation.setTarget(&rect);
+ animation.setProperty("rotation");
+ animation.setTo(270);
+ QVERIFY(animation.target() == &rect);
+ QVERIFY(animation.property() == "rotation");
+ QVERIFY(animation.to() == 270);
+ QVERIFY(animation.direction() == QDeclarativeRotationAnimation::Shortest);
+ animation.start();
+ QVERIFY(animation.isRunning());
+ QTest::qWait(animation.duration());
+ QTIMED_COMPARE(rect.rotation(), qreal(270));
+
+ rect.setRotation(0);
+ animation.start();
+ animation.pause();
+ QVERIFY(animation.isRunning());
+ QVERIFY(animation.isPaused());
+ animation.setCurrentTime(125);
+ QVERIFY(animation.currentTime() == 125);
+ QCOMPARE(rect.rotation(), qreal(-45));
+}
+
+void tst_qdeclarativeanimations::alwaysRunToEnd()
+{
+ QDeclarativeRectangle rect;
+ QDeclarativePropertyAnimation animation;
+ animation.setTarget(&rect);
+ animation.setProperty("x");
+ animation.setTo(200);
+ animation.setDuration(1000);
+ animation.setRepeat(true);
+ animation.setAlwaysRunToEnd(true);
+ QVERIFY(animation.repeat() == true);
+ QVERIFY(animation.alwaysRunToEnd() == true);
+ animation.start();
+ QTest::qWait(1500);
+ animation.stop();
+ QVERIFY(rect.x() != qreal(200));
+ QTest::qWait(500);
+ QTIMED_COMPARE(rect.x(), qreal(200));
+}
+
+void tst_qdeclarativeanimations::complete()
+{
+ QDeclarativeRectangle rect;
+ QDeclarativePropertyAnimation animation;
+ animation.setTarget(&rect);
+ animation.setProperty("x");
+ animation.setFrom(1);
+ animation.setTo(200);
+ animation.setDuration(500);
+ QVERIFY(animation.from() == 1);
+ animation.start();
+ QTest::qWait(50);
+ animation.stop();
+ QVERIFY(rect.x() != qreal(200));
+ animation.start();
+ QTest::qWait(50);
+ QVERIFY(animation.isRunning());
+ animation.complete();
+ QCOMPARE(rect.x(), qreal(200));
+}
+
+void tst_qdeclarativeanimations::resume()
+{
+ QDeclarativeRectangle rect;
+ QDeclarativePropertyAnimation animation;
+ animation.setTarget(&rect);
+ animation.setProperty("x");
+ animation.setFrom(10);
+ animation.setTo(200);
+ animation.setDuration(1000);
+ QVERIFY(animation.from() == 10);
+
+ animation.start();
+ QTest::qWait(400);
+ animation.pause();
+ qreal x = rect.x();
+ QVERIFY(x != qreal(200) && x != qreal(10));
+ QVERIFY(animation.isRunning());
+ QVERIFY(animation.isPaused());
+
+ animation.resume();
+ QVERIFY(animation.isRunning());
+ QVERIFY(!animation.isPaused());
+ QTest::qWait(400);
+ animation.stop();
+ QVERIFY(rect.x() > x);
+}
+
+void tst_qdeclarativeanimations::dotProperty()
+{
+ QDeclarativeRectangle rect;
+ QDeclarativeNumberAnimation animation;
+ animation.setTarget(&rect);
+ animation.setProperty("border.width");
+ animation.setTo(10);
+ animation.start();
+ QTest::qWait(animation.duration()+50);
+ QTIMED_COMPARE(rect.border()->width(), 10);
+
+ rect.border()->setWidth(0);
+ animation.start();
+ animation.pause();
+ animation.setCurrentTime(125);
+ QVERIFY(animation.currentTime() == 125);
+ QCOMPARE(rect.border()->width(), 5);
+}
+
+void tst_qdeclarativeanimations::badTypes()
+{
+ //don't crash
+ {
+ QDeclarativeView *view = new QDeclarativeView;
+ view->setSource(QUrl::fromLocalFile(SRCDIR "/data/badtype1.qml"));
+
+ qApp->processEvents();
+
+ delete view;
+ }
+
+ //make sure we get a compiler error
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/badtype2.qml"));
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeComponent: Component is not ready");
+ c.create();
+
+ QVERIFY(c.errors().count() == 1);
+ QCOMPARE(c.errors().at(0).description(), QLatin1String("Invalid property assignment: double expected"));
+ }
+
+ //make sure we get a compiler error
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/badtype3.qml"));
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeComponent: Component is not ready");
+ c.create();
+
+ QVERIFY(c.errors().count() == 1);
+ QCOMPARE(c.errors().at(0).description(), QLatin1String("Invalid property assignment: color expected"));
+ }
+
+ //don't crash
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/badtype4.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ rect->setState("state1");
+ QTest::qWait(1000 + 50);
+ QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("MyRect");
+ QVERIFY(myRect);
+ QCOMPARE(myRect->x(),qreal(200));
+ }
+}
+
+void tst_qdeclarativeanimations::badProperties()
+{
+ //make sure we get a runtime error
+ {
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c1(&engine, QUrl::fromLocalFile(SRCDIR "/data/badproperty1.qml"));
+ QByteArray message = "QML ColorAnimation (" + QUrl::fromLocalFile(SRCDIR "/data/badproperty1.qml").toString().toUtf8() + ":18:9) Cannot animate non-existent property \"border.colr\"";
+ QTest::ignoreMessage(QtWarningMsg, message);
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c1.create());
+ QVERIFY(rect);
+
+ QDeclarativeComponent c2(&engine, QUrl::fromLocalFile(SRCDIR "/data/badproperty2.qml"));
+ message = "QML ColorAnimation (" + QUrl::fromLocalFile(SRCDIR "/data/badproperty2.qml").toString().toUtf8() + ":18:9) Cannot animate read-only property \"border\"";
+ QTest::ignoreMessage(QtWarningMsg, message);
+ rect = qobject_cast<QDeclarativeRectangle*>(c2.create());
+ QVERIFY(rect);
+
+ //### should we warn here are well?
+ //rect->setState("state1");
+ }
+}
+
+//test animating mixed types with property animation in a transition
+//for example, int + real; color + real; etc
+void tst_qdeclarativeanimations::mixedTypes()
+{
+ //assumes border.width stays a real -- not real robust
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/mixedtype1.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ rect->setState("state1");
+ QTest::qWait(500);
+ QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("MyRect");
+ QVERIFY(myRect);
+
+ //rather inexact -- is there a better way?
+ QVERIFY(myRect->x() > 100 && myRect->x() < 200);
+ QVERIFY(myRect->border()->width() > 1 && myRect->border()->width() < 10);
+ }
+
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/mixedtype2.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ rect->setState("state1");
+ QTest::qWait(500);
+ QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("MyRect");
+ QVERIFY(myRect);
+
+ //rather inexact -- is there a better way?
+ QVERIFY(myRect->x() > 100 && myRect->x() < 200);
+ QVERIFY(myRect->color() != QColor("red") && myRect->color() != QColor("blue"));
+ }
+}
+
+void tst_qdeclarativeanimations::properties()
+{
+ const int waitDuration = 300;
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/properties.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("TheRect");
+ QVERIFY(myRect);
+ QTest::qWait(waitDuration);
+ QTIMED_COMPARE(myRect->x(),qreal(200));
+ }
+
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/properties2.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("TheRect");
+ QVERIFY(myRect);
+ QTest::qWait(waitDuration);
+ QTIMED_COMPARE(myRect->x(),qreal(200));
+ }
+
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/properties3.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("TheRect");
+ QVERIFY(myRect);
+ QTest::qWait(waitDuration);
+ QTIMED_COMPARE(myRect->x(),qreal(300));
+ }
+
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/properties4.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("TheRect");
+ QVERIFY(myRect);
+ QTest::qWait(waitDuration);
+ QTIMED_COMPARE(myRect->y(),qreal(200));
+ QTIMED_COMPARE(myRect->x(),qreal(100));
+ }
+
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/properties5.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("TheRect");
+ QVERIFY(myRect);
+ QTest::qWait(waitDuration);
+ QTIMED_COMPARE(myRect->x(),qreal(100));
+ QTIMED_COMPARE(myRect->y(),qreal(200));
+ }
+}
+
+void tst_qdeclarativeanimations::propertiesTransition()
+{
+ const int waitDuration = 300;
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertiesTransition.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ rect->setState("moved");
+ QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("TheRect");
+ QVERIFY(myRect);
+ QTest::qWait(waitDuration);
+ QTIMED_COMPARE(myRect->x(),qreal(200));
+ }
+
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertiesTransition2.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("TheRect");
+ QVERIFY(myRect);
+ rect->setState("moved");
+ QCOMPARE(myRect->x(),qreal(200));
+ QCOMPARE(myRect->y(),qreal(100));
+ QTest::qWait(waitDuration);
+ QTIMED_COMPARE(myRect->y(),qreal(200));
+ }
+
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertiesTransition3.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("TheRect");
+ QVERIFY(myRect);
+ rect->setState("moved");
+ QCOMPARE(myRect->x(),qreal(200));
+ QCOMPARE(myRect->y(),qreal(100));
+ }
+
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertiesTransition4.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("TheRect");
+ QVERIFY(myRect);
+ rect->setState("moved");
+ QCOMPARE(myRect->x(),qreal(100));
+ QTest::qWait(waitDuration);
+ QTIMED_COMPARE(myRect->x(),qreal(200));
+ }
+
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertiesTransition5.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("TheRect");
+ QVERIFY(myRect);
+ rect->setState("moved");
+ QCOMPARE(myRect->x(),qreal(100));
+ QTest::qWait(waitDuration);
+ QTIMED_COMPARE(myRect->x(),qreal(200));
+ }
+
+ /*{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertiesTransition6.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("TheRect");
+ QVERIFY(myRect);
+ rect->setState("moved");
+ QCOMPARE(myRect->x(),qreal(100));
+ QTest::qWait(waitDuration);
+ QTIMED_COMPARE(myRect->x(),qreal(100));
+ }*/
+}
+
+void tst_qdeclarativeanimations::invalidDuration()
+{
+ QDeclarativePropertyAnimation *animation = new QDeclarativePropertyAnimation;
+ QTest::ignoreMessage(QtWarningMsg, "QML PropertyAnimation (unknown location) Cannot set a duration of < 0");
+ animation->setDuration(-1);
+ QCOMPARE(animation->duration(), 250);
+
+ QDeclarativePauseAnimation *pauseAnimation = new QDeclarativePauseAnimation;
+ QTest::ignoreMessage(QtWarningMsg, "QML PauseAnimation (unknown location) Cannot set a duration of < 0");
+ pauseAnimation->setDuration(-1);
+ QCOMPARE(pauseAnimation->duration(), 250);
+}
+
+void tst_qdeclarativeanimations::attached()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/attached.qml"));
+ QTest::ignoreMessage(QtDebugMsg, "off");
+ QTest::ignoreMessage(QtDebugMsg, "on");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+}
+
+void tst_qdeclarativeanimations::propertyValueSourceDefaultStart()
+{
+ {
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/valuesource.qml"));
+
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeAbstractAnimation *myAnim = rect->findChild<QDeclarativeAbstractAnimation*>("MyAnim");
+ QVERIFY(myAnim);
+ QVERIFY(myAnim->isRunning());
+ }
+
+ {
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/valuesource2.qml"));
+
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeAbstractAnimation *myAnim = rect->findChild<QDeclarativeAbstractAnimation*>("MyAnim");
+ QVERIFY(myAnim);
+ QVERIFY(myAnim->isRunning() == false);
+ }
+
+ {
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/dontAutoStart.qml"));
+
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeAbstractAnimation *myAnim = rect->findChild<QDeclarativeAbstractAnimation*>("MyAnim");
+ QVERIFY(myAnim && myAnim->qtAnimation());
+ QVERIFY(myAnim->qtAnimation()->state() == QAbstractAnimation::Stopped);
+ }
+}
+
+
+void tst_qdeclarativeanimations::dontStart()
+{
+ {
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/dontStart.qml"));
+
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeAbstractAnimation: setRunning() cannot be used on non-root animation nodes");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeAbstractAnimation *myAnim = rect->findChild<QDeclarativeAbstractAnimation*>("MyAnim");
+ QVERIFY(myAnim && myAnim->qtAnimation());
+ QVERIFY(myAnim->qtAnimation()->state() == QAbstractAnimation::Stopped);
+ }
+
+ {
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/dontStart2.qml"));
+
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeAbstractAnimation: setRunning() cannot be used on non-root animation nodes");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeAbstractAnimation *myAnim = rect->findChild<QDeclarativeAbstractAnimation*>("MyAnim");
+ QVERIFY(myAnim && myAnim->qtAnimation());
+ QVERIFY(myAnim->qtAnimation()->state() == QAbstractAnimation::Stopped);
+ }
+}
+
+void tst_qdeclarativeanimations::easingProperties()
+{
+ {
+ QDeclarativeEngine engine;
+ QString componentStr = "import Qt 4.6\nNumberAnimation { easing.type: \"InOutQuad\" }";
+ QDeclarativeComponent animationComponent(&engine);
+ animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativePropertyAnimation *animObject = qobject_cast<QDeclarativePropertyAnimation*>(animationComponent.create());
+
+ QVERIFY(animObject != 0);
+ QCOMPARE(animObject->easing().type(), QEasingCurve::InOutQuad);
+ }
+
+ {
+ QDeclarativeEngine engine;
+ QString componentStr = "import Qt 4.6\nPropertyAnimation { easing.type: \"OutBounce\"; easing.amplitude: 5.0 }";
+ QDeclarativeComponent animationComponent(&engine);
+ animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativePropertyAnimation *animObject = qobject_cast<QDeclarativePropertyAnimation*>(animationComponent.create());
+
+ QVERIFY(animObject != 0);
+ QCOMPARE(animObject->easing().type(), QEasingCurve::OutBounce);
+ QCOMPARE(animObject->easing().amplitude(), 5.0);
+ }
+
+ {
+ QDeclarativeEngine engine;
+ QString componentStr = "import Qt 4.6\nPropertyAnimation { easing.type: \"OutElastic\"; easing.amplitude: 5.0; easing.period: 3.0}";
+ QDeclarativeComponent animationComponent(&engine);
+ animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativePropertyAnimation *animObject = qobject_cast<QDeclarativePropertyAnimation*>(animationComponent.create());
+
+ QVERIFY(animObject != 0);
+ QCOMPARE(animObject->easing().type(), QEasingCurve::OutElastic);
+ QCOMPARE(animObject->easing().amplitude(), 5.0);
+ QCOMPARE(animObject->easing().period(), 3.0);
+ }
+
+ {
+ QDeclarativeEngine engine;
+ QString componentStr = "import Qt 4.6\nPropertyAnimation { easing.type: \"InOutBack\"; easing.overshoot: 2 }";
+ QDeclarativeComponent animationComponent(&engine);
+ animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativePropertyAnimation *animObject = qobject_cast<QDeclarativePropertyAnimation*>(animationComponent.create());
+
+ QVERIFY(animObject != 0);
+ QCOMPARE(animObject->easing().type(), QEasingCurve::InOutBack);
+ QCOMPARE(animObject->easing().overshoot(), 2.0);
+ }
+}
+
+void tst_qdeclarativeanimations::rotation()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/rotation.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeRectangle *rr = rect->findChild<QDeclarativeRectangle*>("rr");
+ QDeclarativeRectangle *rr2 = rect->findChild<QDeclarativeRectangle*>("rr2");
+ QDeclarativeRectangle *rr3 = rect->findChild<QDeclarativeRectangle*>("rr3");
+ QDeclarativeRectangle *rr4 = rect->findChild<QDeclarativeRectangle*>("rr4");
+
+ rect->setState("state1");
+ QTest::qWait(800);
+ qreal r1 = rr->rotation();
+ qreal r2 = rr2->rotation();
+ qreal r3 = rr3->rotation();
+ qreal r4 = rr4->rotation();
+
+ QVERIFY(r1 > qreal(0) && r1 < qreal(370));
+ QVERIFY(r2 > qreal(0) && r2 < qreal(370));
+ QVERIFY(r3 < qreal(0) && r3 > qreal(-350));
+ QVERIFY(r4 > qreal(0) && r4 < qreal(10));
+ QCOMPARE(r1,r2);
+ QVERIFY(r4 < r2);
+
+ QTest::qWait(800);
+ QTIMED_COMPARE(rr->rotation() + rr2->rotation() + rr3->rotation() + rr4->rotation(), qreal(370*4));
+}
+
+QTEST_MAIN(tst_qdeclarativeanimations)
+
+#include "tst_qdeclarativeanimations.moc"
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml b/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml
new file mode 100644
index 0000000000..e982f21ae3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml
@@ -0,0 +1,26 @@
+import Qt 4.6
+Rectangle {
+ width: 400
+ height: 400
+ property real basex : 0
+ property real movedx: 200
+ Rectangle {
+ id: rect
+ objectName: "MyRect"
+ width: 100; height: 100; color: "green"
+ x: basex
+ Behavior on x { NumberAnimation { duration: 500; } }
+ }
+ MouseArea {
+ id: clicker
+ anchors.fill: parent
+ }
+ states: State {
+ name: "moved"
+ when: clicker.pressed
+ PropertyChanges {
+ target: rect
+ x: movedx
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/color.qml b/tests/auto/declarative/qdeclarativebehaviors/data/color.qml
new file mode 100644
index 0000000000..f2f4742ff4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/color.qml
@@ -0,0 +1,24 @@
+import Qt 4.6
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: rect
+ objectName: "MyRect"
+ width: 100; height: 100;
+ color: "green"
+ Behavior on color { ColorAnimation { duration: 500; } }
+ }
+ MouseArea {
+ id: clicker
+ anchors.fill: parent
+ }
+ states: State {
+ name: "red"
+ when: clicker.pressed
+ PropertyChanges {
+ target: rect
+ color: "red"
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/cpptrigger.qml b/tests/auto/declarative/qdeclarativebehaviors/data/cpptrigger.qml
new file mode 100644
index 0000000000..3ea9376670
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/cpptrigger.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: rect
+ objectName: "MyRect"
+ width: 100; height: 100; color: "green"
+ Behavior on x { NumberAnimation { duration: 500; } }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/disabled.qml b/tests/auto/declarative/qdeclarativebehaviors/data/disabled.qml
new file mode 100644
index 0000000000..1403eb93b4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/disabled.qml
@@ -0,0 +1,27 @@
+import Qt 4.6
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: rect
+ objectName: "MyRect"
+ width: 100; height: 100; color: "green"
+ Behavior on x {
+ objectName: "MyBehavior";
+ enabled: false
+ NumberAnimation { duration: 200; }
+ }
+ }
+ MouseArea {
+ id: clicker
+ anchors.fill: parent
+ }
+ states: State {
+ name: "moved"
+ when: clicker.pressed
+ PropertyChanges {
+ target: rect
+ x: 200
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/dontStart.qml b/tests/auto/declarative/qdeclarativebehaviors/data/dontStart.qml
new file mode 100644
index 0000000000..12b1b7b30e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/dontStart.qml
@@ -0,0 +1,18 @@
+import Qt 4.6
+
+Rectangle {
+ id: wrapper
+ width: 600
+ height: 400
+
+ Rectangle {
+ id: redRect
+ width: 100; height: 100
+ color: Qt.rgba(1,0,0)
+ Behavior on x {
+ NumberAnimation { objectName: "MyAnim"; running: true }
+ }
+
+ }
+
+}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/empty.qml b/tests/auto/declarative/qdeclarativebehaviors/data/empty.qml
new file mode 100644
index 0000000000..5e30f03a46
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/empty.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: rect
+ objectName: "MyRect"
+ width: 100; height: 100; color: "green"
+ Behavior on x {}
+ }
+ MouseArea {
+ id: clicker
+ anchors.fill: parent
+ }
+ states: State {
+ name: "moved"
+ when: clicker.pressed
+ PropertyChanges {
+ target: rect
+ x: 200
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/explicit.qml b/tests/auto/declarative/qdeclarativebehaviors/data/explicit.qml
new file mode 100644
index 0000000000..ca0ea548ec
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/explicit.qml
@@ -0,0 +1,26 @@
+import Qt 4.6
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: rect
+ objectName: "MyRect"
+ width: 100; height: 100; color: "green"
+ Behavior on x {
+ objectName: "MyBehavior";
+ NumberAnimation { target: rect; property: "x"; duration: 500; }
+ }
+ }
+ MouseArea {
+ id: clicker
+ anchors.fill: parent
+ }
+ states: State {
+ name: "moved"
+ when: clicker.pressed
+ PropertyChanges {
+ target: rect
+ x: 200
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty.qml b/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty.qml
new file mode 100644
index 0000000000..a6c4ed9f27
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: rect
+ objectName: "MyRect"
+ width: 100; height: 100; color: "green"
+ Behavior on pos { PropertyAnimation { duration: 500; } }
+ }
+ MouseArea {
+ id: clicker
+ anchors.fill: parent
+ }
+ states: State {
+ name: "moved"
+ when: clicker.pressed
+ PropertyChanges {
+ target: rect
+ pos: Qt.point(200,0);
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty2.qml b/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty2.qml
new file mode 100644
index 0000000000..2dda220683
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty2.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: rect
+ objectName: "MyRect"
+ width: 100; height: 100; color: "green"
+ Behavior on pos.x { NumberAnimation { duration: 500; } }
+ }
+ MouseArea {
+ id: clicker
+ anchors.fill: parent
+ }
+ states: State {
+ name: "moved"
+ when: clicker.pressed
+ PropertyChanges {
+ target: rect
+ pos.x: 200;
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/loop.qml b/tests/auto/declarative/qdeclarativebehaviors/data/loop.qml
new file mode 100644
index 0000000000..61877688cb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/loop.qml
@@ -0,0 +1,19 @@
+import Qt 4.6
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: rect
+ objectName: "MyRect"
+ width: 100; height: 100; color: "green"
+ Behavior on x { NumberAnimation { duration: 200; } }
+ onXChanged: x = 100;
+ }
+ states: State {
+ name: "moved"
+ PropertyChanges {
+ target: rect
+ x: 200
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/nonSelecting2.qml b/tests/auto/declarative/qdeclarativebehaviors/data/nonSelecting2.qml
new file mode 100644
index 0000000000..640a7d1d07
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/nonSelecting2.qml
@@ -0,0 +1,26 @@
+import Qt 4.6
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: rect
+ objectName: "MyRect"
+ width: 100; height: 100; color: "green"
+ Behavior on x {
+ objectName: "MyBehavior";
+ NumberAnimation { targets: rect; properties: "y"; duration: 200; }
+ }
+ }
+ MouseArea {
+ id: clicker
+ anchors.fill: parent
+ }
+ states: State {
+ name: "moved"
+ when: clicker.pressed
+ PropertyChanges {
+ target: rect
+ x: 200
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/parent.qml b/tests/auto/declarative/qdeclarativebehaviors/data/parent.qml
new file mode 100644
index 0000000000..3860ec7ae4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/parent.qml
@@ -0,0 +1,28 @@
+import Qt 4.6
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: rect
+ objectName: "MyRect"
+ width: 100; height: 100; color: "green"
+ Behavior on parent {
+ SequentialAnimation {
+ PauseAnimation { duration: 500 }
+ PropertyAction {}
+ }
+ }
+ }
+ Item {
+ id: newParent
+ objectName: "NewParent"
+ x: 100
+ }
+ states: State {
+ name: "reparented"
+ PropertyChanges {
+ target: rect
+ parent: newParent
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml b/tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml
new file mode 100644
index 0000000000..6419a6b005
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml
@@ -0,0 +1,27 @@
+import Qt 4.6
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: rect
+ objectName: "MyRect"
+ width: 100; height: 100; color: "green"
+ Behavior on x {
+ objectName: "MyBehavior"
+ NumberAnimation { duration: 200 }
+ NumberAnimation { duration: 1000 }
+ }
+ }
+ MouseArea {
+ id: clicker
+ anchors.fill: parent
+ }
+ states: State {
+ name: "moved"
+ when: clicker.pressed
+ PropertyChanges {
+ target: rect
+ x: 200
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml b/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml
new file mode 100644
index 0000000000..b22441acb6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml
@@ -0,0 +1,16 @@
+import Qt 4.6
+Rectangle {
+ width: 400
+ height: 400
+
+ onColorChanged: {
+ rect.x = 200
+ }
+
+ Rectangle {
+ id: rect
+ objectName: "MyRect"
+ width: 100; height: 100; color: "green"
+ Behavior on x { NumberAnimation { duration: 500; } }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/simple.qml b/tests/auto/declarative/qdeclarativebehaviors/data/simple.qml
new file mode 100644
index 0000000000..c28fa9a8b1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/simple.qml
@@ -0,0 +1,26 @@
+import Qt 4.6
+Rectangle {
+ width: 400
+ height: 400
+ Rectangle {
+ id: rect
+ objectName: "MyRect"
+ width: 100; height: 100; color: "green"
+ Behavior on x {
+ objectName: "MyBehavior";
+ NumberAnimation { duration: 500; }
+ }
+ }
+ MouseArea {
+ id: clicker
+ anchors.fill: parent
+ }
+ states: State {
+ name: "moved"
+ when: clicker.pressed
+ PropertyChanges {
+ target: rect
+ x: 200
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro b/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
new file mode 100644
index 0000000000..a1dac32f64
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+SOURCES += tst_qdeclarativebehaviors.cpp
+macx:CONFIG -= app_bundle
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
new file mode 100644
index 0000000000..0bf0b81a36
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
@@ -0,0 +1,301 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativeview.h>
+#include <private/qdeclarativerectangle_p.h>
+#include <private/qdeclarativebehavior_p.h>
+#include <private/qdeclarativeanimation_p.h>
+
+class tst_qdeclarativebehaviors : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativebehaviors() {}
+
+private slots:
+ void simpleBehavior();
+ void scriptTriggered();
+ void cppTriggered();
+ void loop();
+ void colorBehavior();
+ void parentBehavior();
+ void replaceBinding();
+ //void transitionOverrides();
+ void group();
+ void emptyBehavior();
+ void explicitSelection();
+ void nonSelectingBehavior();
+ void reassignedAnimation();
+ void disabled();
+ void dontStart();
+};
+
+void tst_qdeclarativebehaviors::simpleBehavior()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/simple.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+ QVERIFY(qobject_cast<QDeclarativeBehavior*>(rect->findChild<QDeclarativeBehavior*>("MyBehavior"))->animation());
+
+ rect->setState("moved");
+ QTest::qWait(200);
+ qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
+ QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
+}
+
+void tst_qdeclarativebehaviors::scriptTriggered()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/scripttrigger.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ rect->setColor(QColor("red"));
+ QTest::qWait(200);
+ qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
+ QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
+}
+
+void tst_qdeclarativebehaviors::cppTriggered()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/cpptrigger.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QVERIFY(innerRect);
+
+ innerRect->setProperty("x", 200);
+ QTest::qWait(200);
+ qreal x = innerRect->x();
+ QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
+}
+
+void tst_qdeclarativebehaviors::loop()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/loop.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ //don't crash
+ rect->setState("moved");
+}
+
+void tst_qdeclarativebehaviors::colorBehavior()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/color.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ rect->setState("red");
+ QTest::qWait(200);
+ QColor color = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->color();
+ QVERIFY(color != QColor("red") && color != QColor("green")); //i.e. the behavior has been triggered
+}
+
+void tst_qdeclarativebehaviors::parentBehavior()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/parent.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ rect->setState("reparented");
+ QTest::qWait(200);
+ QDeclarativeItem *newParent = rect->findChild<QDeclarativeItem*>("NewParent");
+ QDeclarativeItem *parent = rect->findChild<QDeclarativeRectangle*>("MyRect")->parentItem();
+ QVERIFY(parent != newParent);
+ QTest::qWait(600);
+ parent = rect->findChild<QDeclarativeRectangle*>("MyRect")->parentItem();
+ QVERIFY(parent == newParent);
+}
+
+void tst_qdeclarativebehaviors::replaceBinding()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/binding.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ rect->setState("moved");
+ QTest::qWait(200);
+ QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QVERIFY(innerRect);
+ qreal x = innerRect->x();
+ QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
+ QTest::qWait(600);
+ QCOMPARE(innerRect->x(), (qreal)200);
+ rect->setProperty("basex", 10);
+ QCOMPARE(innerRect->x(), (qreal)200);
+ rect->setProperty("movedx", 210);
+ QTest::qWait(600);
+ QCOMPARE(innerRect->x(), (qreal)210);
+
+ rect->setState("");
+ QTest::qWait(200);
+ x = innerRect->x();
+ QVERIFY(x > 10 && x < 210); //i.e. the behavior has been triggered
+ QTest::qWait(600);
+ QCOMPARE(innerRect->x(), (qreal)10);
+ rect->setProperty("movedx", 200);
+ QCOMPARE(innerRect->x(), (qreal)10);
+ rect->setProperty("basex", 20);
+ QTest::qWait(600);
+ QCOMPARE(innerRect->x(), (qreal)20);
+}
+
+void tst_qdeclarativebehaviors::group()
+{
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/groupProperty.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ rect->setState("moved");
+ QTest::qWait(200);
+ qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
+ QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
+ }
+
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/groupProperty2.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ rect->setState("moved");
+ QTest::qWait(200);
+ qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
+ QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
+ }
+}
+
+void tst_qdeclarativebehaviors::emptyBehavior()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/empty.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ rect->setState("moved");
+ qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
+ QCOMPARE(x, qreal(200)); //should change immediately
+}
+
+void tst_qdeclarativebehaviors::explicitSelection()
+{
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/explicit.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ rect->setState("moved");
+ QTest::qWait(200);
+ qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
+ QVERIFY(x > 0 && x < 200); //i.e. the behavior has been triggered
+ }
+}
+
+void tst_qdeclarativebehaviors::nonSelectingBehavior()
+{
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/nonSelecting2.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ rect->setState("moved");
+ qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
+ QCOMPARE(x, qreal(200)); //should change immediately
+ }
+}
+
+void tst_qdeclarativebehaviors::reassignedAnimation()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/reassignedAnimation.qml"));
+ QTest::ignoreMessage(QtWarningMsg, QString("QML Behavior (" + QUrl::fromLocalFile(SRCDIR "/data/reassignedAnimation.qml").toString() + ":9:9) Cannot change the animation assigned to a Behavior.").toUtf8().constData());
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+ QCOMPARE(qobject_cast<QDeclarativeNumberAnimation*>(
+ qobject_cast<QDeclarativeBehavior*>(
+ rect->findChild<QDeclarativeBehavior*>("MyBehavior"))->animation())->duration(), 200);
+}
+
+void tst_qdeclarativebehaviors::disabled()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/disabled.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+ QCOMPARE(rect->findChild<QDeclarativeBehavior*>("MyBehavior")->enabled(), false);
+
+ rect->setState("moved");
+ qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
+ QCOMPARE(x, qreal(200)); //should change immediately
+}
+
+void tst_qdeclarativebehaviors::dontStart()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/dontStart.qml"));
+
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeAbstractAnimation: setRunning() cannot be used on non-root animation nodes");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeAbstractAnimation *myAnim = rect->findChild<QDeclarativeAbstractAnimation*>("MyAnim");
+ QVERIFY(myAnim && myAnim->qtAnimation());
+ QVERIFY(myAnim->qtAnimation()->state() == QAbstractAnimation::Stopped);
+}
+
+QTEST_MAIN(tst_qdeclarativebehaviors)
+
+#include "tst_qdeclarativebehaviors.moc"
diff --git a/tests/auto/declarative/qdeclarativebinding/data/test-binding.qml b/tests/auto/declarative/qdeclarativebinding/data/test-binding.qml
new file mode 100644
index 0000000000..e9101e4759
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebinding/data/test-binding.qml
@@ -0,0 +1,16 @@
+import Qt 4.6
+
+Rectangle {
+ id: screen
+ width: 320; height: 240
+ property string text
+ property bool changeColor: false
+
+ Text { id: s1; text: "Hello" }
+ Rectangle { id: r1; width: 1; height: 1; color: "yellow" }
+ Rectangle { id: r2; width: 1; height: 1; color: "red" }
+
+ Binding { target: screen; property: "text"; value: s1.text; objectName: "binding1" }
+ Binding { target: screen; property: "color"; value: r1.color }
+ Binding { target: screen; property: "color"; when: screen.changeColor == true; value: r2.color }
+}
diff --git a/tests/auto/declarative/qdeclarativebinding/data/test-binding2.qml b/tests/auto/declarative/qdeclarativebinding/data/test-binding2.qml
new file mode 100644
index 0000000000..ea20c169fe
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebinding/data/test-binding2.qml
@@ -0,0 +1,16 @@
+import Qt 4.6
+
+Rectangle {
+ id: screen
+ width: 320; height: 240
+ property string text
+ property bool changeColor: false
+
+ Text { id: s1; text: "Hello" }
+ Rectangle { id: r1; width: 1; height: 1; color: "yellow" }
+ Rectangle { id: r2; width: 1; height: 1; color: "red" }
+
+ Binding { target: screen; property: "text"; value: s1.text }
+ Binding { target: screen; property: "color"; value: r1.color }
+ Binding { target: screen; property: "color"; value: r2.color; when: screen.changeColor == true }
+}
diff --git a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro b/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
new file mode 100644
index 0000000000..787997646f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativebinding.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
new file mode 100644
index 0000000000..826df4fd3d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativebind_p.h>
+#include <private/qdeclarativerectangle_p.h>
+#include "../../../shared/util.h"
+
+class tst_qdeclarativebinding : public QObject
+
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativebinding();
+
+private slots:
+ void binding();
+ void whenAfterValue();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+tst_qdeclarativebinding::tst_qdeclarativebinding()
+{
+}
+
+void tst_qdeclarativebinding::binding()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/test-binding.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+
+ QVERIFY(rect != 0);
+ QCOMPARE(rect->color(), QColor("yellow"));
+ QCOMPARE(rect->property("text").toString(), QString("Hello"));
+
+ rect->setProperty("changeColor", true);
+ QCOMPARE(rect->color(), QColor("red"));
+
+ QDeclarativeBind *binding = qobject_cast<QDeclarativeBind*>(rect->findChild<QDeclarativeBind*>("binding1"));
+ QVERIFY(binding != 0);
+ QCOMPARE(binding->object(), rect);
+ QCOMPARE(binding->property(), QLatin1String("text"));
+ QCOMPARE(binding->value().toString(), QLatin1String("Hello"));
+
+ delete rect;
+}
+
+void tst_qdeclarativebinding::whenAfterValue()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/test-binding2.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+
+ QVERIFY(rect != 0);
+ QCOMPARE(rect->color(), QColor("yellow"));
+ QCOMPARE(rect->property("text").toString(), QString("Hello"));
+
+ rect->setProperty("changeColor", true);
+ QCOMPARE(rect->color(), QColor("red"));
+
+ delete rect;
+}
+
+QTEST_MAIN(tst_qdeclarativebinding)
+
+#include "tst_qdeclarativebinding.moc"
diff --git a/tests/auto/declarative/qdeclarativeborderimage/data/colors-round.sci b/tests/auto/declarative/qdeclarativeborderimage/data/colors-round.sci
new file mode 100644
index 0000000000..5d2f49f0e1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeborderimage/data/colors-round.sci
@@ -0,0 +1,7 @@
+border.left:10
+border.top:20
+border.right:30
+border.bottom:40
+horizontalTileRule:Round
+verticalTileRule:Repeat
+source:colors.png
diff --git a/tests/auto/declarative/qdeclarativeborderimage/data/colors.png b/tests/auto/declarative/qdeclarativeborderimage/data/colors.png
new file mode 100644
index 0000000000..dfb62f3d64
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeborderimage/data/colors.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativeborderimage/data/invalid.sci b/tests/auto/declarative/qdeclarativeborderimage/data/invalid.sci
new file mode 100644
index 0000000000..98c72c9bf1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeborderimage/data/invalid.sci
@@ -0,0 +1,7 @@
+border.left:10
+border.top:20
+border.down:30
+border.up:40
+horizontalTileRule:Roun
+verticalTileRule:Repea
+source:colors.png
diff --git a/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro b/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
new file mode 100644
index 0000000000..0574ddb119
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
@@ -0,0 +1,9 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui network
+macx:CONFIG -= app_bundle
+
+HEADERS += ../shared/testhttpserver.h
+SOURCES += tst_qdeclarativeborderimage.cpp ../shared/testhttpserver.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
new file mode 100644
index 0000000000..8aeba6dfee
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
@@ -0,0 +1,351 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QTextDocument>
+#include <QTcpServer>
+#include <QTcpSocket>
+#include <QDir>
+
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativeborderimage_p.h>
+#include <private/qdeclarativeimagebase_p.h>
+#include <private/qdeclarativescalegrid_p_p.h>
+#include <private/qdeclarativeloader_p.h>
+#include <QtDeclarative/qdeclarativecontext.h>
+
+#include "../shared/testhttpserver.h"
+
+
+#define SERVER_PORT 14445
+#define SERVER_ADDR "http://127.0.0.1:14445"
+
+#define TRY_WAIT(expr) \
+ do { \
+ for (int ii = 0; ii < 60; ++ii) { \
+ if ((expr)) break; \
+ QTest::qWait(50); \
+ } \
+ QVERIFY((expr)); \
+ } while (false)
+
+
+class tst_qdeclarativeborderimage : public QObject
+
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativeborderimage();
+
+private slots:
+ void noSource();
+ void imageSource();
+ void imageSource_data();
+ void clearSource();
+ void resized();
+ void smooth();
+ void tileModes();
+ void sciSource();
+ void sciSource_data();
+ void invalidSciFile();
+ void pendingRemoteRequest();
+ void pendingRemoteRequest_data();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+tst_qdeclarativeborderimage::tst_qdeclarativeborderimage()
+{
+}
+
+void tst_qdeclarativeborderimage::noSource()
+{
+ QString componentStr = "import Qt 4.6\nBorderImage { source: \"\" }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->source(), QUrl());
+ QCOMPARE(obj->width(), 0.);
+ QCOMPARE(obj->height(), 0.);
+ QCOMPARE(obj->horizontalTileMode(), QDeclarativeBorderImage::Stretch);
+ QCOMPARE(obj->verticalTileMode(), QDeclarativeBorderImage::Stretch);
+
+ delete obj;
+}
+
+void tst_qdeclarativeborderimage::imageSource_data()
+{
+ QTest::addColumn<QString>("source");
+ QTest::addColumn<bool>("remote");
+ QTest::addColumn<QString>("error");
+
+ QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() << false << "";
+ QTest::newRow("local not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString() << false
+ << "Cannot open QUrl( \"" + QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString() + "\" ) ";
+ QTest::newRow("remote") << SERVER_ADDR "/colors.png" << true << "";
+ QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.png" << true
+ << "\"Error downloading " SERVER_ADDR "/no-such-file.png - server replied: Not found\" ";
+}
+
+void tst_qdeclarativeborderimage::imageSource()
+{
+ QFETCH(QString, source);
+ QFETCH(bool, remote);
+ QFETCH(QString, error);
+
+ TestHTTPServer *server = 0;
+ if (remote) {
+ server = new TestHTTPServer(SERVER_PORT);
+ QVERIFY(server->isValid());
+ server->serveDirectory(SRCDIR "/data");
+ }
+
+ if (!error.isEmpty())
+ QTest::ignoreMessage(QtWarningMsg, error.toUtf8());
+
+ QString componentStr = "import Qt 4.6\nBorderImage { source: \"" + source + "\" }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
+ QVERIFY(obj != 0);
+
+ if (remote)
+ TRY_WAIT(obj->status() == QDeclarativeBorderImage::Loading);
+
+ QCOMPARE(obj->source(), remote ? source : QUrl(source));
+
+ if (error.isEmpty()) {
+ TRY_WAIT(obj->status() == QDeclarativeBorderImage::Ready);
+ QCOMPARE(obj->width(), 120.);
+ QCOMPARE(obj->height(), 120.);
+ QCOMPARE(obj->horizontalTileMode(), QDeclarativeBorderImage::Stretch);
+ QCOMPARE(obj->verticalTileMode(), QDeclarativeBorderImage::Stretch);
+ } else {
+ TRY_WAIT(obj->status() == QDeclarativeBorderImage::Error);
+ }
+
+ delete obj;
+ delete server;
+}
+
+void tst_qdeclarativeborderimage::clearSource()
+{
+ QString componentStr = "import Qt 4.6\nBorderImage { source: srcImage }";
+ QDeclarativeContext *ctxt = engine.rootContext();
+ ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(SRCDIR "/data/colors.png"));
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
+ QVERIFY(obj != 0);
+ QVERIFY(obj->status() == QDeclarativeBorderImage::Ready);
+ QCOMPARE(obj->width(), 120.);
+ QCOMPARE(obj->height(), 120.);
+
+ ctxt->setContextProperty("srcImage", "");
+ QVERIFY(obj->source().isEmpty());
+ QVERIFY(obj->status() == QDeclarativeBorderImage::Null);
+ QCOMPARE(obj->width(), 0.);
+ QCOMPARE(obj->height(), 0.);
+}
+
+void tst_qdeclarativeborderimage::resized()
+{
+ QString componentStr = "import Qt 4.6\nBorderImage { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() + "\"; width: 300; height: 300 }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->width(), 300.);
+ QCOMPARE(obj->height(), 300.);
+ QCOMPARE(obj->horizontalTileMode(), QDeclarativeBorderImage::Stretch);
+ QCOMPARE(obj->verticalTileMode(), QDeclarativeBorderImage::Stretch);
+
+ delete obj;
+}
+
+void tst_qdeclarativeborderimage::smooth()
+{
+ QString componentStr = "import Qt 4.6\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; smooth: true; width: 300; height: 300 }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->width(), 300.);
+ QCOMPARE(obj->height(), 300.);
+ QCOMPARE(obj->smooth(), true);
+ QCOMPARE(obj->horizontalTileMode(), QDeclarativeBorderImage::Stretch);
+ QCOMPARE(obj->verticalTileMode(), QDeclarativeBorderImage::Stretch);
+
+ delete obj;
+}
+
+void tst_qdeclarativeborderimage::tileModes()
+{
+ {
+ QString componentStr = "import Qt 4.6\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; width: 100; height: 300; horizontalTileMode: BorderImage.Repeat; verticalTileMode: BorderImage.Repeat }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->width(), 100.);
+ QCOMPARE(obj->height(), 300.);
+ QCOMPARE(obj->horizontalTileMode(), QDeclarativeBorderImage::Repeat);
+ QCOMPARE(obj->verticalTileMode(), QDeclarativeBorderImage::Repeat);
+
+ delete obj;
+ }
+ {
+ QString componentStr = "import Qt 4.6\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; width: 300; height: 150; horizontalTileMode: BorderImage.Round; verticalTileMode: BorderImage.Round }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->width(), 300.);
+ QCOMPARE(obj->height(), 150.);
+ QCOMPARE(obj->horizontalTileMode(), QDeclarativeBorderImage::Round);
+ QCOMPARE(obj->verticalTileMode(), QDeclarativeBorderImage::Round);
+
+ delete obj;
+ }
+}
+
+void tst_qdeclarativeborderimage::sciSource()
+{
+ QFETCH(QString, source);
+ QFETCH(bool, valid);
+
+ bool remote = source.startsWith("http");
+ TestHTTPServer *server = 0;
+ if (remote) {
+ server = new TestHTTPServer(SERVER_PORT);
+ QVERIFY(server->isValid());
+ server->serveDirectory(SRCDIR "/data");
+ }
+
+ QString componentStr = "import Qt 4.6\nBorderImage { source: \"" + source + "\"; width: 300; height: 300 }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
+ QVERIFY(obj != 0);
+
+ if (remote)
+ TRY_WAIT(obj->status() == QDeclarativeBorderImage::Loading);
+
+ QCOMPARE(obj->source(), remote ? source : QUrl(source));
+ QCOMPARE(obj->width(), 300.);
+ QCOMPARE(obj->height(), 300.);
+
+ if (valid) {
+ TRY_WAIT(obj->status() == QDeclarativeBorderImage::Ready);
+ QCOMPARE(obj->border()->left(), 10);
+ QCOMPARE(obj->border()->top(), 20);
+ QCOMPARE(obj->border()->right(), 30);
+ QCOMPARE(obj->border()->bottom(), 40);
+ QCOMPARE(obj->horizontalTileMode(), QDeclarativeBorderImage::Round);
+ QCOMPARE(obj->verticalTileMode(), QDeclarativeBorderImage::Repeat);
+ } else {
+ TRY_WAIT(obj->status() == QDeclarativeBorderImage::Error);
+ }
+
+ delete obj;
+ delete server;
+}
+
+void tst_qdeclarativeborderimage::sciSource_data()
+{
+ QTest::addColumn<QString>("source");
+ QTest::addColumn<bool>("valid");
+
+ QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/colors-round.sci").toString() << true;
+ QTest::newRow("local not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file.sci").toString() << false;
+ QTest::newRow("remote") << SERVER_ADDR "/colors-round.sci" << true;
+ QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.sci" << false;
+}
+
+void tst_qdeclarativeborderimage::invalidSciFile()
+{
+ QTest::ignoreMessage(QtWarningMsg, "Unknown tile rule specified. Using Stretch "); // for "Roun"
+ QTest::ignoreMessage(QtWarningMsg, "Unknown tile rule specified. Using Stretch "); // for "Repea"
+
+ QString componentStr = "import Qt 4.6\nBorderImage { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/invalid.sci").toString() +"\"; width: 300; height: 300 }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->width(), 300.);
+ QCOMPARE(obj->height(), 300.);
+ QCOMPARE(obj->status(), QDeclarativeImageBase::Error);
+ QCOMPARE(obj->horizontalTileMode(), QDeclarativeBorderImage::Stretch);
+ QCOMPARE(obj->verticalTileMode(), QDeclarativeBorderImage::Stretch);
+
+ delete obj;
+}
+
+void tst_qdeclarativeborderimage::pendingRemoteRequest()
+{
+ QFETCH(QString, source);
+
+ QString componentStr = "import Qt 4.6\nBorderImage { source: \"" + source + "\" }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->status(), QDeclarativeBorderImage::Loading);
+
+ // verify no crash
+ // This will cause a delayed "QThread: Destroyed while thread is still running" warning
+ delete obj;
+ QTest::qWait(50);
+}
+
+void tst_qdeclarativeborderimage::pendingRemoteRequest_data()
+{
+ QTest::addColumn<QString>("source");
+
+ QTest::newRow("png file") << "http://no-such-qt-server-like-this/none.png";
+ QTest::newRow("sci file") << "http://no-such-qt-server-like-this/none.sci";
+}
+
+QTEST_MAIN(tst_qdeclarativeborderimage)
+
+#include "tst_qdeclarativeborderimage.moc"
diff --git a/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro b/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
new file mode 100644
index 0000000000..c7affb7b31
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+QT += script network
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativecomponent.cpp
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
new file mode 100644
index 0000000000..c9e304cc26
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+
+class tst_qdeclarativecomponent : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativecomponent() { }
+
+private slots:
+ void loadEmptyUrl();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+void tst_qdeclarativecomponent::loadEmptyUrl()
+{
+ QDeclarativeComponent c(&engine);
+ c.loadUrl(QUrl());
+
+ QVERIFY(c.isError());
+ QCOMPARE(c.errors().count(), 1);
+ QDeclarativeError error = c.errors().first();
+ QCOMPARE(error.url(), QUrl());
+ QCOMPARE(error.line(), -1);
+ QCOMPARE(error.column(), -1);
+ QCOMPARE(error.description(), QLatin1String("Invalid empty URL"));
+}
+
+QTEST_MAIN(tst_qdeclarativecomponent)
+
+#include "tst_qdeclarativecomponent.moc"
diff --git a/tests/auto/declarative/qdeclarativeconnection/data/test-connection.qml b/tests/auto/declarative/qdeclarativeconnection/data/test-connection.qml
new file mode 100644
index 0000000000..81ab599276
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeconnection/data/test-connection.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+Item {
+ id: screen; width: 50
+
+ property bool tested: false
+ signal testMe
+
+ Connections { target: screen; onWidthChanged: screen.tested = true }
+}
diff --git a/tests/auto/declarative/qdeclarativeconnection/data/test-connection2.qml b/tests/auto/declarative/qdeclarativeconnection/data/test-connection2.qml
new file mode 100644
index 0000000000..22e9422561
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeconnection/data/test-connection2.qml
@@ -0,0 +1,3 @@
+import Qt 4.6
+
+Connections { id: connection; target: connection; onTargetChanged: 1 == 1 }
diff --git a/tests/auto/declarative/qdeclarativeconnection/data/test-connection3.qml b/tests/auto/declarative/qdeclarativeconnection/data/test-connection3.qml
new file mode 100644
index 0000000000..6e396c0be1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeconnection/data/test-connection3.qml
@@ -0,0 +1,3 @@
+import Qt 4.6
+
+Connections {}
diff --git a/tests/auto/declarative/qdeclarativeconnection/data/trimming.qml b/tests/auto/declarative/qdeclarativeconnection/data/trimming.qml
new file mode 100644
index 0000000000..736d5e870d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeconnection/data/trimming.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+Item {
+ id: screen; width: 50
+
+ property string tested
+ signal testMe(int param1, string param2)
+
+ Connections { target: screen; onTestMe: screen.tested = param2 + param1 }
+}
diff --git a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
new file mode 100644
index 0000000000..a6adfa4523
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativeconnection.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp b/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp
new file mode 100644
index 0000000000..f4914e172f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp
@@ -0,0 +1,135 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativeconnections_p.h>
+#include <private/qdeclarativeitem_p.h>
+#include "../../../shared/util.h"
+#include <QtDeclarative/qdeclarativescriptstring.h>
+
+class tst_qdeclarativeconnection : public QObject
+
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativeconnection();
+
+private slots:
+ void defaultValues();
+ void properties();
+ void connection();
+ void trimming();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+tst_qdeclarativeconnection::tst_qdeclarativeconnection()
+{
+}
+
+void tst_qdeclarativeconnection::defaultValues()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/test-connection3.qml"));
+ QDeclarativeConnections *item = qobject_cast<QDeclarativeConnections*>(c.create());
+
+ QVERIFY(item != 0);
+ QVERIFY(item->target() == 0);
+
+ delete item;
+}
+
+void tst_qdeclarativeconnection::properties()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/test-connection2.qml"));
+ QDeclarativeConnections *item = qobject_cast<QDeclarativeConnections*>(c.create());
+
+ QVERIFY(item != 0);
+
+ QVERIFY(item != 0);
+ QVERIFY(item->target() == item);
+
+ delete item;
+}
+
+void tst_qdeclarativeconnection::connection()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/test-connection.qml"));
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(c.create());
+
+ QVERIFY(item != 0);
+
+ QCOMPARE(item->property("tested").toBool(), false);
+ QCOMPARE(item->width(), 50.);
+ emit item->setWidth(100.);
+ QCOMPARE(item->width(), 100.);
+ QCOMPARE(item->property("tested").toBool(), true);
+
+ delete item;
+}
+
+void tst_qdeclarativeconnection::trimming()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/trimming.qml"));
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(c.create());
+
+ QVERIFY(item != 0);
+
+ QCOMPARE(item->property("tested").toString(), QString(""));
+ int index = item->metaObject()->indexOfSignal("testMe(int,QString)");
+ QMetaMethod method = item->metaObject()->method(index);
+ method.invoke(item,
+ Qt::DirectConnection,
+ Q_ARG(int, 5),
+ Q_ARG(QString, "worked"));
+ QCOMPARE(item->property("tested").toString(), QString("worked5"));
+
+ delete item;
+}
+
+QTEST_MAIN(tst_qdeclarativeconnection)
+
+#include "tst_qdeclarativeconnection.moc"
diff --git a/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro b/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro
new file mode 100644
index 0000000000..adace7065d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+SOURCES += tst_qdeclarativecontext.cpp
+macx:CONFIG -= app_bundle
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
new file mode 100644
index 0000000000..f0117f56bb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
@@ -0,0 +1,454 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QDebug>
+#include <QDeclarativeEngine>
+#include <QDeclarativeContext>
+#include <QDeclarativeComponent>
+#include <QDeclarativeExpression>
+
+class tst_qdeclarativecontext : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativecontext() {}
+
+private slots:
+ void baseUrl();
+ void resolvedUrl();
+ void engineMethod();
+ void parentContext();
+ void setContextProperty();
+ void addDefaultObject();
+ void destruction();
+ void idAsContextProperty();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+void tst_qdeclarativecontext::baseUrl()
+{
+ QDeclarativeContext ctxt(&engine);
+
+ QCOMPARE(ctxt.baseUrl(), QUrl());
+
+ ctxt.setBaseUrl(QUrl("http://www.nokia.com/"));
+
+ QCOMPARE(ctxt.baseUrl(), QUrl("http://www.nokia.com/"));
+}
+
+void tst_qdeclarativecontext::resolvedUrl()
+{
+ // Relative to the component
+ {
+ QDeclarativeContext ctxt(&engine);
+ ctxt.setBaseUrl(QUrl("http://www.nokia.com/"));
+
+ QCOMPARE(ctxt.resolvedUrl(QUrl("main.qml")), QUrl("http://www.nokia.com/main.qml"));
+ }
+
+ // Relative to a parent
+ {
+ QDeclarativeContext ctxt(&engine);
+ ctxt.setBaseUrl(QUrl("http://www.nokia.com/"));
+
+ QDeclarativeContext ctxt2(&ctxt);
+ QCOMPARE(ctxt2.resolvedUrl(QUrl("main2.qml")), QUrl("http://www.nokia.com/main2.qml"));
+ }
+
+ // Relative to the engine
+ {
+ QDeclarativeContext ctxt(&engine);
+ QCOMPARE(ctxt.resolvedUrl(QUrl("main.qml")), engine.baseUrl().resolved(QUrl("main.qml")));
+ }
+
+ // Relative to a deleted parent
+ {
+ QDeclarativeContext *ctxt = new QDeclarativeContext(&engine);
+ ctxt->setBaseUrl(QUrl("http://www.nokia.com/"));
+
+ QDeclarativeContext ctxt2(ctxt);
+ QCOMPARE(ctxt2.resolvedUrl(QUrl("main2.qml")), QUrl("http://www.nokia.com/main2.qml"));
+
+ delete ctxt; ctxt = 0;
+
+ QCOMPARE(ctxt2.resolvedUrl(QUrl("main2.qml")), QUrl());
+ }
+
+ // Absolute
+ {
+ QDeclarativeContext ctxt(&engine);
+
+ QCOMPARE(ctxt.resolvedUrl(QUrl("http://www.nokia.com/main2.qml")), QUrl("http://www.nokia.com/main2.qml"));
+ QCOMPARE(ctxt.resolvedUrl(QUrl("file:///main2.qml")), QUrl("file:///main2.qml"));
+ }
+}
+
+void tst_qdeclarativecontext::engineMethod()
+{
+ QDeclarativeEngine *engine = new QDeclarativeEngine;
+
+ QDeclarativeContext ctxt(engine);
+ QDeclarativeContext ctxt2(&ctxt);
+ QDeclarativeContext ctxt3(&ctxt2);
+ QDeclarativeContext ctxt4(&ctxt2);
+
+ QCOMPARE(ctxt.engine(), engine);
+ QCOMPARE(ctxt2.engine(), engine);
+ QCOMPARE(ctxt3.engine(), engine);
+ QCOMPARE(ctxt4.engine(), engine);
+
+ delete engine; engine = 0;
+
+ QCOMPARE(ctxt.engine(), engine);
+ QCOMPARE(ctxt2.engine(), engine);
+ QCOMPARE(ctxt3.engine(), engine);
+ QCOMPARE(ctxt4.engine(), engine);
+}
+
+void tst_qdeclarativecontext::parentContext()
+{
+ QDeclarativeEngine *engine = new QDeclarativeEngine;
+
+ QCOMPARE(engine->rootContext()->parentContext(), (QDeclarativeContext *)0);
+
+ QDeclarativeContext *ctxt = new QDeclarativeContext(engine);
+ QDeclarativeContext *ctxt2 = new QDeclarativeContext(ctxt);
+ QDeclarativeContext *ctxt3 = new QDeclarativeContext(ctxt2);
+ QDeclarativeContext *ctxt4 = new QDeclarativeContext(ctxt2);
+ QDeclarativeContext *ctxt5 = new QDeclarativeContext(ctxt);
+ QDeclarativeContext *ctxt6 = new QDeclarativeContext(engine);
+ QDeclarativeContext *ctxt7 = new QDeclarativeContext(engine->rootContext());
+
+ QCOMPARE(ctxt->parentContext(), engine->rootContext());
+ QCOMPARE(ctxt2->parentContext(), ctxt);
+ QCOMPARE(ctxt3->parentContext(), ctxt2);
+ QCOMPARE(ctxt4->parentContext(), ctxt2);
+ QCOMPARE(ctxt5->parentContext(), ctxt);
+ QCOMPARE(ctxt6->parentContext(), engine->rootContext());
+ QCOMPARE(ctxt7->parentContext(), engine->rootContext());
+
+ delete ctxt2; ctxt2 = 0;
+
+ QCOMPARE(ctxt->parentContext(), engine->rootContext());
+ QCOMPARE(ctxt3->parentContext(), ctxt2);
+ QCOMPARE(ctxt4->parentContext(), ctxt2);
+ QCOMPARE(ctxt5->parentContext(), ctxt);
+ QCOMPARE(ctxt6->parentContext(), engine->rootContext());
+ QCOMPARE(ctxt7->parentContext(), engine->rootContext());
+
+ delete engine; engine = 0;
+
+ QCOMPARE(ctxt->parentContext(), (QDeclarativeContext *)0);
+ QCOMPARE(ctxt3->parentContext(), ctxt2);
+ QCOMPARE(ctxt4->parentContext(), ctxt2);
+ QCOMPARE(ctxt5->parentContext(), ctxt);
+ QCOMPARE(ctxt6->parentContext(), (QDeclarativeContext *)0);
+ QCOMPARE(ctxt7->parentContext(), (QDeclarativeContext *)0);
+
+ delete ctxt7;
+ delete ctxt6;
+ delete ctxt5;
+ delete ctxt4;
+ delete ctxt3;
+ delete ctxt;
+}
+
+class TestObject : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int a READ a NOTIFY aChanged)
+ Q_PROPERTY(int b READ b NOTIFY bChanged)
+ Q_PROPERTY(int c READ c NOTIFY cChanged)
+
+public:
+ TestObject() : _a(10), _b(10), _c(10) {}
+
+ int a() const { return _a; }
+ void setA(int a) { _a = a; emit aChanged(); }
+
+ int b() const { return _b; }
+ void setB(int b) { _b = b; emit bChanged(); }
+
+ int c() const { return _c; }
+ void setC(int c) { _c = c; emit cChanged(); }
+
+signals:
+ void aChanged();
+ void bChanged();
+ void cChanged();
+
+private:
+ int _a;
+ int _b;
+ int _c;
+};
+
+class TestObject2 : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int b READ b NOTIFY bChanged)
+
+public:
+ TestObject2() : _b(10) {}
+
+ int b() const { return _b; }
+ void setB(int b) { _b = b; emit bChanged(); }
+
+signals:
+ void bChanged();
+
+private:
+ int _b;
+};
+
+#define TEST_CONTEXT_PROPERTY(ctxt, name, value) \
+{ \
+ QDeclarativeComponent component(&engine); \
+ component.setData("import Qt 4.6; QtObject { property var test: " #name " }", QUrl()); \
+\
+ QObject *obj = component.create(ctxt); \
+\
+ QCOMPARE(obj->property("test"), value); \
+\
+ delete obj; \
+}
+
+void tst_qdeclarativecontext::setContextProperty()
+{
+ QDeclarativeContext ctxt(&engine);
+ QDeclarativeContext ctxt2(&ctxt);
+
+ TestObject obj1;
+ obj1.setA(3345);
+ TestObject obj2;
+ obj2.setA(-19);
+
+ // Static context properties
+ ctxt.setContextProperty("a", QVariant(10));
+ ctxt.setContextProperty("b", QVariant(9));
+ ctxt2.setContextProperty("d", &obj2);
+ ctxt2.setContextProperty("b", QVariant(19));
+ ctxt2.setContextProperty("c", QVariant(QString("Hello World!")));
+ ctxt.setContextProperty("d", &obj1);
+ ctxt.setContextProperty("e", &obj1);
+
+ TEST_CONTEXT_PROPERTY(&ctxt2, a, QVariant(10));
+ TEST_CONTEXT_PROPERTY(&ctxt2, b, QVariant(19));
+ TEST_CONTEXT_PROPERTY(&ctxt2, c, QVariant(QString("Hello World!")));
+ TEST_CONTEXT_PROPERTY(&ctxt2, d.a, QVariant(-19));
+ TEST_CONTEXT_PROPERTY(&ctxt2, e.a, QVariant(3345));
+
+ ctxt.setContextProperty("a", QVariant(13));
+ ctxt.setContextProperty("b", QVariant(4));
+ ctxt2.setContextProperty("b", QVariant(8));
+ ctxt2.setContextProperty("c", QVariant(QString("Hi World!")));
+ ctxt2.setContextProperty("d", &obj1);
+ obj1.setA(12);
+
+ TEST_CONTEXT_PROPERTY(&ctxt2, a, QVariant(13));
+ TEST_CONTEXT_PROPERTY(&ctxt2, b, QVariant(8));
+ TEST_CONTEXT_PROPERTY(&ctxt2, c, QVariant(QString("Hi World!")));
+ TEST_CONTEXT_PROPERTY(&ctxt2, d.a, QVariant(12));
+ TEST_CONTEXT_PROPERTY(&ctxt2, e.a, QVariant(12));
+
+ // Changes in context properties
+ {
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.6; QtObject { property var test: a }", QUrl());
+
+ QObject *obj = component.create(&ctxt2);
+
+ QCOMPARE(obj->property("test"), QVariant(13));
+ ctxt.setContextProperty("a", QVariant(19));
+ QCOMPARE(obj->property("test"), QVariant(19));
+
+ delete obj;
+ }
+ {
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.6; QtObject { property var test: b }", QUrl());
+
+ QObject *obj = component.create(&ctxt2);
+
+ QCOMPARE(obj->property("test"), QVariant(8));
+ ctxt.setContextProperty("b", QVariant(5));
+ QCOMPARE(obj->property("test"), QVariant(8));
+ ctxt2.setContextProperty("b", QVariant(1912));
+ QCOMPARE(obj->property("test"), QVariant(1912));
+
+ delete obj;
+ }
+ {
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.6; QtObject { property var test: e.a }", QUrl());
+
+ QObject *obj = component.create(&ctxt2);
+
+ QCOMPARE(obj->property("test"), QVariant(12));
+ obj1.setA(13);
+ QCOMPARE(obj->property("test"), QVariant(13));
+
+ delete obj;
+ }
+
+ // New context properties
+ {
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.6; QtObject { property var test: a }", QUrl());
+
+ QObject *obj = component.create(&ctxt2);
+
+ QCOMPARE(obj->property("test"), QVariant(19));
+ ctxt2.setContextProperty("a", QVariant(1945));
+ QCOMPARE(obj->property("test"), QVariant(1945));
+
+ delete obj;
+ }
+
+ // Setting an object-variant context property
+ {
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.6; QtObject { id: root; property int a: 10; property int test: ctxtProp.a; property var obj: root; }", QUrl());
+
+ QDeclarativeContext ctxt(engine.rootContext());
+ ctxt.setContextProperty("ctxtProp", QVariant());
+
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>:1: TypeError: Result of expression 'ctxtProp' [undefined] is not an object.");
+ QObject *obj = component.create(&ctxt);
+
+ QVariant v = obj->property("obj");
+
+ ctxt.setContextProperty("ctxtProp", v);
+
+ QCOMPARE(obj->property("test"), QVariant(10));
+
+ delete obj;
+ }
+}
+
+void tst_qdeclarativecontext::addDefaultObject()
+{
+ QDeclarativeContext ctxt(&engine);
+
+ TestObject to;
+ TestObject2 to2;
+
+ to.setA(2);
+ to.setB(192);
+ to.setC(18);
+ to2.setB(111999);
+
+ ctxt.addDefaultObject(&to2);
+ ctxt.addDefaultObject(&to);
+ ctxt.setContextProperty("c", QVariant(9));
+
+ // Static context properties
+ TEST_CONTEXT_PROPERTY(&ctxt, a, QVariant(2));
+ TEST_CONTEXT_PROPERTY(&ctxt, b, QVariant(111999));
+ TEST_CONTEXT_PROPERTY(&ctxt, c, QVariant(9));
+
+ to.setA(12);
+ to.setB(100);
+ to.setC(7);
+ to2.setB(1612);
+ ctxt.setContextProperty("c", QVariant(3));
+
+ TEST_CONTEXT_PROPERTY(&ctxt, a, QVariant(12));
+ TEST_CONTEXT_PROPERTY(&ctxt, b, QVariant(1612));
+ TEST_CONTEXT_PROPERTY(&ctxt, c, QVariant(3));
+
+ // Changes in context properties
+ {
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.6; QtObject { property var test: a }", QUrl());
+
+ QObject *obj = component.create(&ctxt);
+
+ QCOMPARE(obj->property("test"), QVariant(12));
+ to.setA(14);
+ QCOMPARE(obj->property("test"), QVariant(14));
+
+ delete obj;
+ }
+}
+
+void tst_qdeclarativecontext::destruction()
+{
+ QDeclarativeContext *ctxt = new QDeclarativeContext(&engine);
+
+ QObject obj;
+ QDeclarativeEngine::setContextForObject(&obj, ctxt);
+ QDeclarativeExpression expr(ctxt, "a", 0);
+
+ QCOMPARE(ctxt, QDeclarativeEngine::contextForObject(&obj));
+ QCOMPARE(ctxt, expr.context());
+
+ delete ctxt; ctxt = 0;
+
+ QCOMPARE(ctxt, QDeclarativeEngine::contextForObject(&obj));
+ QCOMPARE(ctxt, expr.context());
+}
+
+void tst_qdeclarativecontext::idAsContextProperty()
+{
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.6; QtObject { property var a; a: QtObject { id: myObject } }", QUrl());
+
+ QObject *obj = component.create();
+ QVERIFY(obj);
+
+ QVariant a = obj->property("a");
+ QVERIFY(a.userType() == QMetaType::QObjectStar);
+
+ QVariant ctxt = qmlContext(obj)->contextProperty("myObject");
+ QVERIFY(ctxt.userType() == QMetaType::QObjectStar);
+
+ QVERIFY(a == ctxt);
+
+ delete obj;
+}
+
+QTEST_MAIN(tst_qdeclarativecontext)
+
+#include "tst_qdeclarativecontext.moc"
diff --git a/tests/auto/declarative/qdeclarativedebug/qdeclarativedebug.pro b/tests/auto/declarative/qdeclarativedebug/qdeclarativedebug.pro
new file mode 100644
index 0000000000..ff1d0d4be5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedebug/qdeclarativedebug.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += network declarative
+macx:CONFIG -= app_bundle
+
+HEADERS += ../shared/debugutil_p.h
+SOURCES += tst_qdeclarativedebug.cpp \
+ ../shared/debugutil.cpp
diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
new file mode 100644
index 0000000000..0c3ca765bd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
@@ -0,0 +1,843 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QSignalSpy>
+#include <QTimer>
+#include <QHostAddress>
+#include <QDebug>
+#include <QThread>
+
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecontext.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativeexpression.h>
+#include <QtDeclarative/qdeclarativeproperty.h>
+
+#include <private/qdeclarativebinding_p.h>
+#include <private/qdeclarativedebug_p.h>
+#include <private/qdeclarativeenginedebug_p.h>
+#include <private/qdeclarativedebugclient_p.h>
+#include <private/qdeclarativedebugservice_p.h>
+#include <private/qdeclarativerectangle_p.h>
+#include <private/qdeclarativemetatype_p.h>
+#include <private/qdeclarativeproperty_p.h>
+
+#include "../shared/debugutil_p.h"
+
+Q_DECLARE_METATYPE(QDeclarativeDebugWatch::State)
+
+
+class tst_QDeclarativeDebug : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QDeclarativeDebug(QDeclarativeDebugTestData *data)
+ {
+ m_conn = data->conn;
+ m_engine = data->engine;
+ m_rootItem = data->items[0];
+ }
+
+private:
+ QDeclarativeDebugObjectReference findRootObject();
+ QDeclarativeDebugPropertyReference findProperty(const QList<QDeclarativeDebugPropertyReference> &props, const QString &name) const;
+ void waitForQuery(QDeclarativeDebugQuery *query);
+
+ void recursiveObjectTest(QObject *o, const QDeclarativeDebugObjectReference &oref, bool recursive) const;
+
+ void recursiveCompareObjects(const QDeclarativeDebugObjectReference &a, const QDeclarativeDebugObjectReference &b) const;
+ void recursiveCompareContexts(const QDeclarativeDebugContextReference &a, const QDeclarativeDebugContextReference &b) const;
+ void compareProperties(const QDeclarativeDebugPropertyReference &a, const QDeclarativeDebugPropertyReference &b) const;
+
+ QDeclarativeDebugConnection *m_conn;
+ QDeclarativeEngineDebug *m_dbg;
+ QDeclarativeEngine *m_engine;
+ QDeclarativeItem *m_rootItem;
+
+private slots:
+ void initTestCase();
+
+ void watch_property();
+ void watch_object();
+ void watch_expression();
+ void watch_expression_data();
+ void watch_context();
+ void watch_file();
+
+ void queryAvailableEngines();
+ void queryRootContexts();
+ void queryObject();
+ void queryObject_data();
+ void queryExpressionResult();
+ void queryExpressionResult_data();
+
+ void tst_QDeclarativeDebugFileReference();
+ void tst_QDeclarativeDebugEngineReference();
+ void tst_QDeclarativeDebugObjectReference();
+ void tst_QDeclarativeDebugContextReference();
+ void tst_QDeclarativeDebugPropertyReference();
+};
+
+QDeclarativeDebugObjectReference tst_QDeclarativeDebug::findRootObject()
+{
+ QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this);
+ waitForQuery(q_engines);
+
+ if (q_engines->engines().count() == 0)
+ return QDeclarativeDebugObjectReference();
+ QDeclarativeDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this);
+ waitForQuery(q_context);
+
+ if (q_context->rootContext().objects().count() == 0)
+ return QDeclarativeDebugObjectReference();
+ QDeclarativeDebugObjectQuery *q_obj = m_dbg->queryObject(q_context->rootContext().objects()[0], this);
+ waitForQuery(q_obj);
+
+ QDeclarativeDebugObjectReference result = q_obj->object();
+
+ delete q_engines;
+ delete q_context;
+ delete q_obj;
+
+ return result;
+}
+
+QDeclarativeDebugPropertyReference tst_QDeclarativeDebug::findProperty(const QList<QDeclarativeDebugPropertyReference> &props, const QString &name) const
+{
+ foreach(const QDeclarativeDebugPropertyReference &p, props) {
+ if (p.name() == name)
+ return p;
+ }
+ return QDeclarativeDebugPropertyReference();
+}
+
+void tst_QDeclarativeDebug::waitForQuery(QDeclarativeDebugQuery *query)
+{
+ QVERIFY(query);
+ QCOMPARE(query->parent(), this);
+ QVERIFY(query->state() == QDeclarativeDebugQuery::Waiting);
+ if (!QDeclarativeDebugTest::waitForSignal(query, SIGNAL(stateChanged(QDeclarativeDebugQuery::State))))
+ QFAIL("query timed out");
+}
+
+void tst_QDeclarativeDebug::recursiveObjectTest(QObject *o, const QDeclarativeDebugObjectReference &oref, bool recursive) const
+{
+ const QMetaObject *meta = o->metaObject();
+
+ QDeclarativeType *type = QDeclarativeMetaType::qmlType(o->metaObject());
+ QString className = type ? type->qmlTypeName() : QString();
+ className = className.mid(className.lastIndexOf(QLatin1Char('/'))+1);
+
+ QCOMPARE(oref.debugId(), QDeclarativeDebugService::idForObject(o));
+ QCOMPARE(oref.name(), o->objectName());
+ QCOMPARE(oref.className(), className);
+ QCOMPARE(oref.contextDebugId(), QDeclarativeDebugService::idForObject(qmlContext(o)));
+
+ const QObjectList &children = o->children();
+ for (int i=0; i<children.count(); i++) {
+ QObject *child = children[i];
+ if (!qmlContext(child))
+ continue;
+ int debugId = QDeclarativeDebugService::idForObject(child);
+ QVERIFY(debugId >= 0);
+
+ QDeclarativeDebugObjectReference cref;
+ foreach (const QDeclarativeDebugObjectReference &ref, oref.children()) {
+ if (ref.debugId() == debugId) {
+ cref = ref;
+ break;
+ }
+ }
+ QVERIFY(cref.debugId() >= 0);
+
+ if (recursive)
+ recursiveObjectTest(child, cref, true);
+ }
+
+ foreach (const QDeclarativeDebugPropertyReference &p, oref.properties()) {
+ QCOMPARE(p.objectDebugId(), QDeclarativeDebugService::idForObject(o));
+
+ // signal properties are fake - they are generated from QDeclarativeBoundSignal children
+ if (p.name().startsWith("on") && p.name().length() > 2 && p.name()[2].isUpper()) {
+ QVERIFY(p.value().toString().startsWith('{') && p.value().toString().endsWith('}'));
+ QVERIFY(p.valueTypeName().isEmpty());
+ QVERIFY(p.binding().isEmpty());
+ QVERIFY(!p.hasNotifySignal());
+ continue;
+ }
+
+ QMetaProperty pmeta = meta->property(meta->indexOfProperty(p.name().toUtf8().constData()));
+
+ QCOMPARE(p.name(), QString::fromUtf8(pmeta.name()));
+
+ if (pmeta.type() < QVariant::UserType) // TODO test complex types
+ QCOMPARE(p.value(), pmeta.read(o));
+
+ if (p.name() == "parent")
+ QVERIFY(p.valueTypeName() == "QGraphicsObject*" || p.valueTypeName() == "QDeclarativeItem*");
+ else
+ QCOMPARE(p.valueTypeName(), QString::fromUtf8(pmeta.typeName()));
+
+ QDeclarativeAbstractBinding *binding =
+ QDeclarativePropertyPrivate::binding(QDeclarativeProperty(o, p.name()));
+ if (binding)
+ QCOMPARE(binding->expression(), p.binding());
+
+ QCOMPARE(p.hasNotifySignal(), pmeta.hasNotifySignal());
+
+ QVERIFY(pmeta.isValid());
+ }
+}
+
+void tst_QDeclarativeDebug::recursiveCompareObjects(const QDeclarativeDebugObjectReference &a, const QDeclarativeDebugObjectReference &b) const
+{
+ QCOMPARE(a.debugId(), b.debugId());
+ QCOMPARE(a.className(), b.className());
+ QCOMPARE(a.name(), b.name());
+ QCOMPARE(a.contextDebugId(), b.contextDebugId());
+
+ QCOMPARE(a.source().url(), b.source().url());
+ QCOMPARE(a.source().lineNumber(), b.source().lineNumber());
+ QCOMPARE(a.source().columnNumber(), b.source().columnNumber());
+
+ QCOMPARE(a.properties().count(), b.properties().count());
+ QCOMPARE(a.children().count(), b.children().count());
+
+ QList<QDeclarativeDebugPropertyReference> aprops = a.properties();
+ QList<QDeclarativeDebugPropertyReference> bprops = b.properties();
+
+ for (int i=0; i<aprops.count(); i++)
+ compareProperties(aprops[i], bprops[i]);
+
+ for (int i=0; i<a.children().count(); i++)
+ recursiveCompareObjects(a.children()[i], b.children()[i]);
+}
+
+void tst_QDeclarativeDebug::recursiveCompareContexts(const QDeclarativeDebugContextReference &a, const QDeclarativeDebugContextReference &b) const
+{
+ QCOMPARE(a.debugId(), b.debugId());
+ QCOMPARE(a.name(), b.name());
+ QCOMPARE(a.objects().count(), b.objects().count());
+ QCOMPARE(a.contexts().count(), b.contexts().count());
+
+ for (int i=0; i<a.objects().count(); i++)
+ recursiveCompareObjects(a.objects()[i], b.objects()[i]);
+
+ for (int i=0; i<a.contexts().count(); i++)
+ recursiveCompareContexts(a.contexts()[i], b.contexts()[i]);
+}
+
+void tst_QDeclarativeDebug::compareProperties(const QDeclarativeDebugPropertyReference &a, const QDeclarativeDebugPropertyReference &b) const
+{
+ QCOMPARE(a.objectDebugId(), b.objectDebugId());
+ QCOMPARE(a.name(), b.name());
+ QCOMPARE(a.value(), b.value());
+ QCOMPARE(a.valueTypeName(), b.valueTypeName());
+ QCOMPARE(a.binding(), b.binding());
+ QCOMPARE(a.hasNotifySignal(), b.hasNotifySignal());
+}
+
+void tst_QDeclarativeDebug::initTestCase()
+{
+ m_dbg = new QDeclarativeEngineDebug(m_conn, this);
+
+ qRegisterMetaType<QDeclarativeDebugWatch::State>();
+}
+
+void tst_QDeclarativeDebug::watch_property()
+{
+ QDeclarativeDebugObjectReference obj = findRootObject();
+ QDeclarativeDebugPropertyReference prop = findProperty(obj.properties(), "width");
+
+ QDeclarativeDebugPropertyWatch *watch;
+
+ QDeclarativeEngineDebug *unconnected = new QDeclarativeEngineDebug(0);
+ watch = unconnected->addWatch(prop, this);
+ QCOMPARE(watch->state(), QDeclarativeDebugWatch::Dead);
+ delete watch;
+ delete unconnected;
+
+ watch = m_dbg->addWatch(QDeclarativeDebugPropertyReference(), this);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QDeclarativeDebugWatch::State))));
+ QCOMPARE(watch->state(), QDeclarativeDebugWatch::Inactive);
+ delete watch;
+
+ watch = m_dbg->addWatch(prop, this);
+ QCOMPARE(watch->state(), QDeclarativeDebugWatch::Waiting);
+ QCOMPARE(watch->objectDebugId(), obj.debugId());
+ QCOMPARE(watch->name(), prop.name());
+
+ QSignalSpy spy(watch, SIGNAL(valueChanged(QByteArray,QVariant)));
+
+ int origWidth = m_rootItem->property("width").toInt();
+ m_rootItem->setProperty("width", origWidth*2);
+
+ // stateChanged() is received before valueChanged()
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QDeclarativeDebugWatch::State))));
+ QCOMPARE(watch->state(), QDeclarativeDebugWatch::Active);
+ QCOMPARE(spy.count(), 1);
+
+ m_dbg->removeWatch(watch);
+ delete watch;
+
+ // restore original value and verify spy doesn't get additional signal since watch has been removed
+ m_rootItem->setProperty("width", origWidth);
+ QTest::qWait(100);
+ QCOMPARE(spy.count(), 1);
+
+ QCOMPARE(spy.at(0).at(0).value<QByteArray>(), prop.name().toUtf8());
+ QCOMPARE(spy.at(0).at(1).value<QVariant>(), qVariantFromValue(origWidth*2));
+}
+
+void tst_QDeclarativeDebug::watch_object()
+{
+ QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this);
+ waitForQuery(q_engines);
+
+ Q_ASSERT(q_engines->engines().count() > 0);
+ QDeclarativeDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this);
+ waitForQuery(q_context);
+
+ Q_ASSERT(q_context->rootContext().objects().count() > 0);
+ QDeclarativeDebugObjectQuery *q_obj = m_dbg->queryObject(q_context->rootContext().objects()[0], this);
+ waitForQuery(q_obj);
+
+ QDeclarativeDebugObjectReference obj = q_obj->object();
+
+ delete q_engines;
+ delete q_context;
+ delete q_obj;
+
+ QDeclarativeDebugWatch *watch;
+
+ QDeclarativeEngineDebug *unconnected = new QDeclarativeEngineDebug(0);
+ watch = unconnected->addWatch(obj, this);
+ QCOMPARE(watch->state(), QDeclarativeDebugWatch::Dead);
+ delete watch;
+ delete unconnected;
+
+ watch = m_dbg->addWatch(QDeclarativeDebugObjectReference(), this);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QDeclarativeDebugWatch::State))));
+ QCOMPARE(watch->state(), QDeclarativeDebugWatch::Inactive);
+ delete watch;
+
+ watch = m_dbg->addWatch(obj, this);
+ QCOMPARE(watch->state(), QDeclarativeDebugWatch::Waiting);
+ QCOMPARE(watch->objectDebugId(), obj.debugId());
+
+ QSignalSpy spy(watch, SIGNAL(valueChanged(QByteArray,QVariant)));
+
+ int origWidth = m_rootItem->property("width").toInt();
+ int origHeight = m_rootItem->property("height").toInt();
+ m_rootItem->setProperty("width", origWidth*2);
+ m_rootItem->setProperty("height", origHeight*2);
+
+ // stateChanged() is received before any valueChanged() signals
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QDeclarativeDebugWatch::State))));
+ QCOMPARE(watch->state(), QDeclarativeDebugWatch::Active);
+ QVERIFY(spy.count() > 0);
+
+ int newWidth = -1;
+ int newHeight = -1;
+ for (int i=0; i<spy.count(); i++) {
+ const QVariantList &values = spy[i];
+ if (values[0].value<QByteArray>() == "width")
+ newWidth = values[1].value<QVariant>().toInt();
+ else if (values[0].value<QByteArray>() == "height")
+ newHeight = values[1].value<QVariant>().toInt();
+
+ }
+
+ m_dbg->removeWatch(watch);
+ delete watch;
+
+ // since watch has been removed, restoring the original values should not trigger a valueChanged()
+ spy.clear();
+ m_rootItem->setProperty("width", origWidth);
+ m_rootItem->setProperty("height", origHeight);
+ QTest::qWait(100);
+ QCOMPARE(spy.count(), 0);
+
+ QCOMPARE(newWidth, origWidth * 2);
+ QCOMPARE(newHeight, origHeight * 2);
+}
+
+void tst_QDeclarativeDebug::watch_expression()
+{
+ QFETCH(QString, expr);
+ QFETCH(int, increment);
+ QFETCH(int, incrementCount);
+
+ int origWidth = m_rootItem->property("width").toInt();
+
+ QDeclarativeDebugObjectReference obj = findRootObject();
+
+ QDeclarativeDebugObjectExpressionWatch *watch;
+
+ QDeclarativeEngineDebug *unconnected = new QDeclarativeEngineDebug(0);
+ watch = unconnected->addWatch(obj, expr, this);
+ QCOMPARE(watch->state(), QDeclarativeDebugWatch::Dead);
+ delete watch;
+ delete unconnected;
+
+ watch = m_dbg->addWatch(QDeclarativeDebugObjectReference(), expr, this);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QDeclarativeDebugWatch::State))));
+ QCOMPARE(watch->state(), QDeclarativeDebugWatch::Inactive);
+ delete watch;
+
+ watch = m_dbg->addWatch(obj, expr, this);
+ QCOMPARE(watch->state(), QDeclarativeDebugWatch::Waiting);
+ QCOMPARE(watch->objectDebugId(), obj.debugId());
+ QCOMPARE(watch->expression(), expr);
+
+ QSignalSpy spyState(watch, SIGNAL(stateChanged(QDeclarativeDebugWatch::State)));
+
+ QSignalSpy spy(watch, SIGNAL(valueChanged(QByteArray,QVariant)));
+ int expectedSpyCount = incrementCount + 1; // should also get signal with expression's initial value
+
+ int width = origWidth;
+ for (int i=0; i<incrementCount+1; i++) {
+ if (i > 0) {
+ width += increment;
+ m_rootItem->setProperty("width", width);
+ }
+ if (!QDeclarativeDebugTest::waitForSignal(watch, SIGNAL(valueChanged(QByteArray,QVariant))))
+ QFAIL("Did not receive valueChanged() for expression");
+ }
+
+ if (spyState.count() == 0)
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(watch, SIGNAL(stateChanged(QDeclarativeDebugWatch::State))));
+ QCOMPARE(spyState.count(), 1);
+ QCOMPARE(watch->state(), QDeclarativeDebugWatch::Active);
+
+ m_dbg->removeWatch(watch);
+ delete watch;
+
+ // restore original value and verify spy doesn't get a signal since watch has been removed
+ m_rootItem->setProperty("width", origWidth);
+ QTest::qWait(100);
+ QCOMPARE(spy.count(), expectedSpyCount);
+
+ width = origWidth + increment;
+ for (int i=0; i<spy.count(); i++) {
+ QCOMPARE(spy.at(i).at(1).value<QVariant>().toInt(), width);
+ width += increment;
+ }
+}
+
+void tst_QDeclarativeDebug::watch_expression_data()
+{
+ QTest::addColumn<QString>("expr");
+ QTest::addColumn<int>("increment");
+ QTest::addColumn<int>("incrementCount");
+
+ QTest::newRow("width") << "width" << 0 << 0;
+ QTest::newRow("width+10") << "width + 10" << 10 << 5;
+}
+
+void tst_QDeclarativeDebug::watch_context()
+{
+ QDeclarativeDebugContextReference c;
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeEngineDebug::addWatch(): Not implemented");
+ QVERIFY(!m_dbg->addWatch(c, QString(), this));
+}
+
+void tst_QDeclarativeDebug::watch_file()
+{
+ QDeclarativeDebugFileReference f;
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeEngineDebug::addWatch(): Not implemented");
+ QVERIFY(!m_dbg->addWatch(f, this));
+}
+
+void tst_QDeclarativeDebug::queryAvailableEngines()
+{
+ QDeclarativeDebugEnginesQuery *q_engines;
+
+ QDeclarativeEngineDebug *unconnected = new QDeclarativeEngineDebug(0);
+ q_engines = unconnected->queryAvailableEngines(0);
+ QCOMPARE(q_engines->state(), QDeclarativeDebugQuery::Error);
+ delete q_engines;
+ delete unconnected;
+
+ q_engines = m_dbg->queryAvailableEngines(this);
+ delete q_engines;
+
+ q_engines = m_dbg->queryAvailableEngines(this);
+ QVERIFY(q_engines->engines().isEmpty());
+ waitForQuery(q_engines);
+
+ // TODO test multiple engines
+ QList<QDeclarativeDebugEngineReference> engines = q_engines->engines();
+ QCOMPARE(engines.count(), 1);
+
+ foreach(const QDeclarativeDebugEngineReference &e, engines) {
+ QCOMPARE(e.debugId(), QDeclarativeDebugService::idForObject(m_engine));
+ QCOMPARE(e.name(), m_engine->objectName());
+ }
+
+ delete q_engines;
+}
+
+void tst_QDeclarativeDebug::queryRootContexts()
+{
+ QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this);
+ waitForQuery(q_engines);
+ int engineId = q_engines->engines()[0].debugId();
+
+ QDeclarativeDebugRootContextQuery *q_context;
+
+ QDeclarativeEngineDebug *unconnected = new QDeclarativeEngineDebug(0);
+ q_context = unconnected->queryRootContexts(engineId, this);
+ QCOMPARE(q_context->state(), QDeclarativeDebugQuery::Error);
+ delete q_context;
+ delete unconnected;
+
+ q_context = m_dbg->queryRootContexts(engineId, this);
+ delete q_context;
+
+ q_context = m_dbg->queryRootContexts(engineId, this);
+ waitForQuery(q_context);
+
+ QDeclarativeContext *actualContext = m_engine->rootContext();
+ QDeclarativeDebugContextReference context = q_context->rootContext();
+ QCOMPARE(context.debugId(), QDeclarativeDebugService::idForObject(actualContext));
+ QCOMPARE(context.name(), actualContext->objectName());
+
+ QCOMPARE(context.objects().count(), 2); // 2 qml component objects created for context in main()
+
+ // root context query sends only root object data - it doesn't fill in
+ // the children or property info
+ QCOMPARE(context.objects()[0].properties().count(), 0);
+ QCOMPARE(context.objects()[0].children().count(), 0);
+
+ QCOMPARE(context.contexts().count(), 1);
+ QVERIFY(context.contexts()[0].debugId() >= 0);
+ QCOMPARE(context.contexts()[0].name(), QString("tst_QDeclarativeDebug_childContext"));
+
+ delete q_engines;
+ delete q_context;
+}
+
+void tst_QDeclarativeDebug::queryObject()
+{
+ QFETCH(bool, recursive);
+
+ QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this);
+ waitForQuery(q_engines);
+
+ QDeclarativeDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this);
+ waitForQuery(q_context);
+ QDeclarativeDebugObjectReference rootObject = q_context->rootContext().objects()[0];
+
+ QDeclarativeDebugObjectQuery *q_obj = 0;
+
+ QDeclarativeEngineDebug *unconnected = new QDeclarativeEngineDebug(0);
+ q_obj = recursive ? unconnected->queryObjectRecursive(rootObject, this) : unconnected->queryObject(rootObject, this);
+ QCOMPARE(q_obj->state(), QDeclarativeDebugQuery::Error);
+ delete q_obj;
+ delete unconnected;
+
+ q_obj = recursive ? m_dbg->queryObjectRecursive(rootObject, this) : m_dbg->queryObject(rootObject, this);
+ delete q_obj;
+
+ q_obj = recursive ? m_dbg->queryObjectRecursive(rootObject, this) : m_dbg->queryObject(rootObject, this);
+ waitForQuery(q_obj);
+
+ QDeclarativeDebugObjectReference obj = q_obj->object();
+
+ delete q_engines;
+ delete q_context;
+ delete q_obj;
+
+ // check source as defined in main()
+ QDeclarativeDebugFileReference source = obj.source();
+ QCOMPARE(source.url(), QUrl::fromLocalFile(""));
+ QCOMPARE(source.lineNumber(), 2);
+ QCOMPARE(source.columnNumber(), 1);
+
+ // generically test all properties, children and childrens' properties
+ recursiveObjectTest(m_rootItem, obj, recursive);
+
+ if (recursive) {
+ foreach(const QDeclarativeDebugObjectReference &child, obj.children())
+ QVERIFY(child.properties().count() > 0);
+
+ QDeclarativeDebugObjectReference rect;
+ QDeclarativeDebugObjectReference text;
+ foreach (const QDeclarativeDebugObjectReference &child, obj.children()) {
+ if (child.className() == "Rectangle")
+ rect = child;
+ else if (child.className() == "Text")
+ text = child;
+ }
+
+ // test specific property values
+ QCOMPARE(findProperty(rect.properties(), "width").value(), qVariantFromValue(500));
+ QCOMPARE(findProperty(rect.properties(), "height").value(), qVariantFromValue(600));
+ QCOMPARE(findProperty(rect.properties(), "color").value(), qVariantFromValue(QColor("blue")));
+
+ QCOMPARE(findProperty(text.properties(), "color").value(), qVariantFromValue(QColor("blue")));
+
+ } else {
+ foreach(const QDeclarativeDebugObjectReference &child, obj.children())
+ QCOMPARE(child.properties().count(), 0);
+ }
+}
+
+void tst_QDeclarativeDebug::queryObject_data()
+{
+ QTest::addColumn<bool>("recursive");
+
+ QTest::newRow("non-recursive") << false;
+ QTest::newRow("recursive") << true;
+}
+
+void tst_QDeclarativeDebug::queryExpressionResult()
+{
+ QFETCH(QString, expr);
+ QFETCH(QVariant, result);
+
+ QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this);
+ waitForQuery(q_engines); // check immediate deletion is ok
+
+ QDeclarativeDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this);
+ waitForQuery(q_context);
+ int objectId = q_context->rootContext().objects()[0].debugId();
+
+ QDeclarativeDebugExpressionQuery *q_expr;
+
+ QDeclarativeEngineDebug *unconnected = new QDeclarativeEngineDebug(0);
+ q_expr = unconnected->queryExpressionResult(objectId, expr, this);
+ QCOMPARE(q_expr->state(), QDeclarativeDebugQuery::Error);
+ delete q_expr;
+ delete unconnected;
+
+ q_expr = m_dbg->queryExpressionResult(objectId, expr, this);
+ delete q_expr;
+
+ q_expr = m_dbg->queryExpressionResult(objectId, expr, this);
+ QCOMPARE(q_expr->expression(), expr);
+ waitForQuery(q_expr);
+
+ QCOMPARE(q_expr->result(), result);
+
+ delete q_engines;
+ delete q_context;
+ delete q_expr;
+}
+
+void tst_QDeclarativeDebug::queryExpressionResult_data()
+{
+ QTest::addColumn<QString>("expr");
+ QTest::addColumn<QVariant>("result");
+
+ QTest::newRow("width + 50") << "width + 50" << qVariantFromValue(60);
+ QTest::newRow("blueRect.width") << "blueRect.width" << qVariantFromValue(500);
+ QTest::newRow("bad expr") << "aeaef" << qVariantFromValue(QString("<undefined>"));
+}
+
+void tst_QDeclarativeDebug::tst_QDeclarativeDebugFileReference()
+{
+ QDeclarativeDebugFileReference ref;
+ QVERIFY(ref.url().isEmpty());
+ QCOMPARE(ref.lineNumber(), -1);
+ QCOMPARE(ref.columnNumber(), -1);
+
+ ref.setUrl(QUrl("http://test"));
+ QCOMPARE(ref.url(), QUrl("http://test"));
+ ref.setLineNumber(1);
+ QCOMPARE(ref.lineNumber(), 1);
+ ref.setColumnNumber(1);
+ QCOMPARE(ref.columnNumber(), 1);
+
+ QDeclarativeDebugFileReference copy(ref);
+ QDeclarativeDebugFileReference copyAssign;
+ copyAssign = ref;
+ foreach (const QDeclarativeDebugFileReference &r, (QList<QDeclarativeDebugFileReference>() << copy << copyAssign)) {
+ QCOMPARE(r.url(), ref.url());
+ QCOMPARE(r.lineNumber(), ref.lineNumber());
+ QCOMPARE(r.columnNumber(), ref.columnNumber());
+ }
+}
+
+void tst_QDeclarativeDebug::tst_QDeclarativeDebugEngineReference()
+{
+ QDeclarativeDebugEngineReference ref;
+ QCOMPARE(ref.debugId(), -1);
+ QVERIFY(ref.name().isEmpty());
+
+ ref = QDeclarativeDebugEngineReference(1);
+ QCOMPARE(ref.debugId(), 1);
+ QVERIFY(ref.name().isEmpty());
+
+ QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this);
+ waitForQuery(q_engines);
+ ref = q_engines->engines()[0];
+ delete q_engines;
+
+ QDeclarativeDebugEngineReference copy(ref);
+ QDeclarativeDebugEngineReference copyAssign;
+ copyAssign = ref;
+ foreach (const QDeclarativeDebugEngineReference &r, (QList<QDeclarativeDebugEngineReference>() << copy << copyAssign)) {
+ QCOMPARE(r.debugId(), ref.debugId());
+ QCOMPARE(r.name(), ref.name());
+ }
+}
+
+void tst_QDeclarativeDebug::tst_QDeclarativeDebugObjectReference()
+{
+ QDeclarativeDebugObjectReference ref;
+ QCOMPARE(ref.debugId(), -1);
+ QCOMPARE(ref.className(), QString());
+ QCOMPARE(ref.name(), QString());
+ QCOMPARE(ref.contextDebugId(), -1);
+ QVERIFY(ref.properties().isEmpty());
+ QVERIFY(ref.children().isEmpty());
+
+ QDeclarativeDebugFileReference source = ref.source();
+ QVERIFY(source.url().isEmpty());
+ QVERIFY(source.lineNumber() < 0);
+ QVERIFY(source.columnNumber() < 0);
+
+ ref = QDeclarativeDebugObjectReference(1);
+ QCOMPARE(ref.debugId(), 1);
+
+ QDeclarativeDebugObjectReference rootObject = findRootObject();
+ QDeclarativeDebugObjectQuery *query = m_dbg->queryObjectRecursive(rootObject, this);
+ waitForQuery(query);
+ ref = query->object();
+ delete query;
+
+ QVERIFY(ref.debugId() >= 0);
+
+ QDeclarativeDebugObjectReference copy(ref);
+ QDeclarativeDebugObjectReference copyAssign;
+ copyAssign = ref;
+ foreach (const QDeclarativeDebugObjectReference &r, (QList<QDeclarativeDebugObjectReference>() << copy << copyAssign))
+ recursiveCompareObjects(r, ref);
+}
+
+void tst_QDeclarativeDebug::tst_QDeclarativeDebugContextReference()
+{
+ QDeclarativeDebugContextReference ref;
+ QCOMPARE(ref.debugId(), -1);
+ QVERIFY(ref.name().isEmpty());
+ QVERIFY(ref.objects().isEmpty());
+ QVERIFY(ref.contexts().isEmpty());
+
+ QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this);
+ waitForQuery(q_engines);
+ QDeclarativeDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this);
+ waitForQuery(q_context);
+
+ ref = q_context->rootContext();
+ delete q_engines;
+ delete q_context;
+ QVERIFY(ref.debugId() >= 0);
+
+ QDeclarativeDebugContextReference copy(ref);
+ QDeclarativeDebugContextReference copyAssign;
+ copyAssign = ref;
+ foreach (const QDeclarativeDebugContextReference &r, (QList<QDeclarativeDebugContextReference>() << copy << copyAssign))
+ recursiveCompareContexts(r, ref);
+}
+
+void tst_QDeclarativeDebug::tst_QDeclarativeDebugPropertyReference()
+{
+ QDeclarativeDebugObjectReference rootObject = findRootObject();
+ QDeclarativeDebugObjectQuery *query = m_dbg->queryObject(rootObject, this);
+ waitForQuery(query);
+ QDeclarativeDebugObjectReference obj = query->object();
+ delete query;
+
+ QDeclarativeDebugPropertyReference ref = findProperty(obj.properties(), "scale");
+ QVERIFY(ref.objectDebugId() > 0);
+ QVERIFY(!ref.name().isEmpty());
+ QVERIFY(!ref.value().isNull());
+ QVERIFY(!ref.valueTypeName().isEmpty());
+ QVERIFY(!ref.binding().isEmpty());
+ QVERIFY(ref.hasNotifySignal());
+
+ QDeclarativeDebugPropertyReference copy(ref);
+ QDeclarativeDebugPropertyReference copyAssign;
+ copyAssign = ref;
+ foreach (const QDeclarativeDebugPropertyReference &r, (QList<QDeclarativeDebugPropertyReference>() << copy << copyAssign))
+ compareProperties(r, ref);
+}
+
+
+class tst_QDeclarativeDebug_Factory : public QDeclarativeTestFactory
+{
+public:
+ QObject *createTest(QDeclarativeDebugTestData *data)
+ {
+ tst_QDeclarativeDebug *test = new tst_QDeclarativeDebug(data);
+ QDeclarativeContext *c = new QDeclarativeContext(data->engine->rootContext(), test);
+ c->setObjectName("tst_QDeclarativeDebug_childContext");
+ return test;
+ }
+};
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QList<QByteArray> qml;
+ qml << "import Qt 4.6\n"
+ "Item {"
+ "width: 10; height: 20; scale: blueRect.scale;"
+ "Rectangle { id: blueRect; width: 500; height: 600; color: \"blue\"; }"
+ "Text { color: blueRect.color; }"
+ "MouseArea {"
+ "onEntered: { console.log('hello') }"
+ "}"
+ "}";
+ // add second component to test multiple root contexts
+ qml << "import Qt 4.6\n"
+ "Item {}";
+ tst_QDeclarativeDebug_Factory factory;
+ return QDeclarativeDebugTest::runTests(&factory, qml);
+}
+
+//QTEST_MAIN(tst_QDeclarativeDebug)
+
+#include "tst_qdeclarativedebug.moc"
diff --git a/tests/auto/declarative/qdeclarativedebugclient/qdeclarativedebugclient.pro b/tests/auto/declarative/qdeclarativedebugclient/qdeclarativedebugclient.pro
new file mode 100644
index 0000000000..a3afd990a7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedebugclient/qdeclarativedebugclient.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += network declarative
+macx:CONFIG -= app_bundle
+
+HEADERS += ../shared/debugutil_p.h
+SOURCES += tst_qdeclarativedebugclient.cpp \
+ ../shared/debugutil.cpp
diff --git a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp
new file mode 100644
index 0000000000..d3679a73f8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QSignalSpy>
+#include <QTimer>
+#include <QHostAddress>
+#include <QDebug>
+#include <QThread>
+
+#include <QtDeclarative/qdeclarativeengine.h>
+
+#include <private/qdeclarativedebug_p.h>
+#include <private/qdeclarativeenginedebug_p.h>
+#include <private/qdeclarativedebugclient_p.h>
+#include <private/qdeclarativedebugservice_p.h>
+
+#include "../shared/debugutil_p.h"
+
+class tst_QDeclarativeDebugClient : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QDeclarativeDebugClient(QDeclarativeDebugTestData *data)
+ {
+ m_conn = data->conn;
+ }
+
+ QDeclarativeDebugConnection *m_conn;
+
+private slots:
+ void name();
+ void isEnabled();
+ void setEnabled();
+ void isConnected();
+ void sendMessage();
+};
+
+void tst_QDeclarativeDebugClient::name()
+{
+ QString name = "tst_QDeclarativeDebugClient::name()";
+
+ QDeclarativeDebugClient client(name, m_conn);
+ QCOMPARE(client.name(), name);
+}
+
+void tst_QDeclarativeDebugClient::isEnabled()
+{
+ QDeclarativeDebugClient client("tst_QDeclarativeDebugClient::isEnabled()", m_conn);
+ QCOMPARE(client.isEnabled(), false);
+}
+
+void tst_QDeclarativeDebugClient::setEnabled()
+{
+ QDeclarativeDebugTestService service("tst_QDeclarativeDebugClient::setEnabled()");
+ QDeclarativeDebugTestClient client("tst_QDeclarativeDebugClient::setEnabled()", m_conn);
+
+ QCOMPARE(service.isEnabled(), false);
+
+ client.setEnabled(true);
+ QCOMPARE(client.isEnabled(), true);
+ QDeclarativeDebugTest::waitForSignal(&service, SIGNAL(enabledStateChanged()));
+ QCOMPARE(service.isEnabled(), true);
+
+ client.setEnabled(false);
+ QCOMPARE(client.isEnabled(), false);
+ QDeclarativeDebugTest::waitForSignal(&service, SIGNAL(enabledStateChanged()));
+ QCOMPARE(service.isEnabled(), false);
+}
+
+void tst_QDeclarativeDebugClient::isConnected()
+{
+ QDeclarativeDebugClient client1("tst_QDeclarativeDebugClient::isConnected() A", m_conn);
+ QCOMPARE(client1.isConnected(), true);
+
+ QDeclarativeDebugConnection conn;
+ QDeclarativeDebugClient client2("tst_QDeclarativeDebugClient::isConnected() B", &conn);
+ QCOMPARE(client2.isConnected(), false);
+
+ QDeclarativeDebugClient client3("tst_QDeclarativeDebugClient::isConnected() C", 0);
+ QCOMPARE(client3.isConnected(), false);
+
+ // duplicate plugin name
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugClient: Conflicting plugin name \"tst_QDeclarativeDebugClient::isConnected() A\" ");
+ QDeclarativeDebugClient client4("tst_QDeclarativeDebugClient::isConnected() A", m_conn);
+ QCOMPARE(client4.isConnected(), false);
+}
+
+void tst_QDeclarativeDebugClient::sendMessage()
+{
+ QDeclarativeDebugTestService service("tst_QDeclarativeDebugClient::sendMessage()");
+ QDeclarativeDebugTestClient client("tst_QDeclarativeDebugClient::sendMessage()", m_conn);
+
+ QByteArray msg = "hello!";
+
+ client.sendMessage(msg);
+ QByteArray resp = client.waitForResponse();
+ QCOMPARE(resp, msg);
+}
+
+
+class tst_QDeclarativeDebugClient_Factory : public QDeclarativeTestFactory
+{
+public:
+ QObject *createTest(QDeclarativeDebugTestData *data) { return new tst_QDeclarativeDebugClient(data); }
+};
+
+
+// This does not use QTEST_MAIN because the test has to be created and run
+// in a separate thread.
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ tst_QDeclarativeDebugClient_Factory factory;
+ return QDeclarativeDebugTest::runTests(&factory);
+}
+
+#include "tst_qdeclarativedebugclient.moc"
diff --git a/tests/auto/declarative/qdeclarativedebugservice/qdeclarativedebugservice.pro b/tests/auto/declarative/qdeclarativedebugservice/qdeclarativedebugservice.pro
new file mode 100644
index 0000000000..e37588954e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedebugservice/qdeclarativedebugservice.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += network declarative
+macx:CONFIG -= app_bundle
+
+HEADERS += ../shared/debugutil_p.h
+SOURCES += tst_qdeclarativedebugservice.cpp \
+ ../shared/debugutil.cpp
diff --git a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
new file mode 100644
index 0000000000..c8fc001fa3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
@@ -0,0 +1,190 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QSignalSpy>
+#include <QTimer>
+#include <QHostAddress>
+#include <QDebug>
+#include <QThread>
+
+#include <QtDeclarative/qdeclarativeengine.h>
+
+#include <private/qdeclarativedebug_p.h>
+#include <private/qdeclarativeenginedebug_p.h>
+#include <private/qdeclarativedebugclient_p.h>
+#include <private/qdeclarativedebugservice_p.h>
+
+#include "../shared/debugutil_p.h"
+
+class tst_QDeclarativeDebugService : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QDeclarativeDebugService(QDeclarativeDebugTestData *data)
+ {
+ m_conn = data->conn;
+ }
+
+ QDeclarativeDebugConnection *m_conn;
+
+private slots:
+ void name();
+ void isEnabled();
+ void enabledChanged();
+ void sendMessage();
+ void idForObject();
+ void objectForId();
+ void objectToString();
+};
+
+void tst_QDeclarativeDebugService::name()
+{
+ QString name = "tst_QDeclarativeDebugService::name()";
+
+ QDeclarativeDebugService service(name);
+ QCOMPARE(service.name(), name);
+}
+
+void tst_QDeclarativeDebugService::isEnabled()
+{
+ QDeclarativeDebugTestService service("tst_QDeclarativeDebugService::isEnabled()", m_conn);
+ QCOMPARE(service.isEnabled(), false);
+
+ QDeclarativeDebugTestClient client("tst_QDeclarativeDebugService::isEnabled()", m_conn);
+ client.setEnabled(true);
+ QDeclarativeDebugTest::waitForSignal(&service, SIGNAL(enabledStateChanged()));
+ QCOMPARE(service.isEnabled(), true);
+
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugService: Conflicting plugin name \"tst_QDeclarativeDebugService::isEnabled()\" ");
+ QDeclarativeDebugService duplicate("tst_QDeclarativeDebugService::isEnabled()", m_conn);
+ QCOMPARE(duplicate.isEnabled(), false);
+}
+
+void tst_QDeclarativeDebugService::enabledChanged()
+{
+ QDeclarativeDebugTestService service("tst_QDeclarativeDebugService::enabledChanged()");
+ QDeclarativeDebugTestClient client("tst_QDeclarativeDebugService::enabledChanged()", m_conn);
+
+ QCOMPARE(service.enabled, false);
+
+ client.setEnabled(true);
+ QDeclarativeDebugTest::waitForSignal(&service, SIGNAL(enabledStateChanged()));
+ QCOMPARE(service.enabled, true);
+}
+
+void tst_QDeclarativeDebugService::sendMessage()
+{
+ QDeclarativeDebugTestService service("tst_QDeclarativeDebugService::sendMessage()");
+ QDeclarativeDebugTestClient client("tst_QDeclarativeDebugService::sendMessage()", m_conn);
+
+ QByteArray msg = "hello!";
+
+ client.sendMessage(msg);
+ QByteArray resp = client.waitForResponse();
+ QCOMPARE(resp, msg);
+}
+
+void tst_QDeclarativeDebugService::idForObject()
+{
+ QCOMPARE(QDeclarativeDebugService::idForObject(0), -1);
+
+ QObject *objA = new QObject;
+
+ int idA = QDeclarativeDebugService::idForObject(objA);
+ QVERIFY(idA >= 0);
+ QCOMPARE(QDeclarativeDebugService::objectForId(idA), objA);
+
+ int idAA = QDeclarativeDebugService::idForObject(objA);
+ QCOMPARE(idAA, idA);
+
+ QObject *objB = new QObject;
+ int idB = QDeclarativeDebugService::idForObject(objB);
+ QVERIFY(idB != idA);
+ QCOMPARE(QDeclarativeDebugService::objectForId(idB), objB);
+
+ delete objA;
+ delete objB;
+}
+
+void tst_QDeclarativeDebugService::objectForId()
+{
+ QCOMPARE(QDeclarativeDebugService::objectForId(-1), static_cast<QObject*>(0));
+ QCOMPARE(QDeclarativeDebugService::objectForId(1), static_cast<QObject*>(0));
+
+ QObject *obj = new QObject;
+ int id = QDeclarativeDebugService::idForObject(obj);
+ QCOMPARE(QDeclarativeDebugService::objectForId(id), obj);
+
+ delete obj;
+ QCOMPARE(QDeclarativeDebugService::objectForId(id), static_cast<QObject*>(0));
+}
+
+void tst_QDeclarativeDebugService::objectToString()
+{
+ QCOMPARE(QDeclarativeDebugService::objectToString(0), QString("NULL"));
+
+ QObject *obj = new QObject;
+ QCOMPARE(QDeclarativeDebugService::objectToString(obj), QString("QObject: <unnamed>"));
+
+ obj->setObjectName("Hello");
+ QCOMPARE(QDeclarativeDebugService::objectToString(obj), QString("QObject: Hello"));
+ delete obj;
+}
+
+
+class tst_QDeclarativeDebugService_Factory : public QDeclarativeTestFactory
+{
+public:
+ QObject *createTest(QDeclarativeDebugTestData *data) { return new tst_QDeclarativeDebugService(data); }
+};
+
+// This does not use QTEST_MAIN because the test has to be created and run
+// in a separate thread.
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ tst_QDeclarativeDebugService_Factory factory;
+ return QDeclarativeDebugTest::runTests(&factory);
+}
+
+#include "tst_qdeclarativedebugservice.moc"
diff --git a/tests/auto/declarative/qdeclarativedom/data/MyComponent.qml b/tests/auto/declarative/qdeclarativedom/data/MyComponent.qml
new file mode 100644
index 0000000000..1472f01bfc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedom/data/MyComponent.qml
@@ -0,0 +1,4 @@
+import Qt 4.6
+
+Item {
+}
diff --git a/tests/auto/declarative/qdeclarativedom/data/MyItem.qml b/tests/auto/declarative/qdeclarativedom/data/MyItem.qml
new file mode 100644
index 0000000000..1472f01bfc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedom/data/MyItem.qml
@@ -0,0 +1,4 @@
+import Qt 4.6
+
+Item {
+}
diff --git a/tests/auto/declarative/qdeclarativedom/data/importdir/Bar.qml b/tests/auto/declarative/qdeclarativedom/data/importdir/Bar.qml
new file mode 100644
index 0000000000..2d1a4a3c7b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedom/data/importdir/Bar.qml
@@ -0,0 +1,2 @@
+import Qt 4.6
+
diff --git a/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir/Foo.qml b/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir/Foo.qml
new file mode 100644
index 0000000000..2d1a4a3c7b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir/Foo.qml
@@ -0,0 +1,2 @@
+import Qt 4.6
+
diff --git a/tests/auto/declarative/qdeclarativedom/data/top.qml b/tests/auto/declarative/qdeclarativedom/data/top.qml
new file mode 100644
index 0000000000..2681993bc1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedom/data/top.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+MyComponent {
+ width: 100
+ height: 100
+}
diff --git a/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro b/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
new file mode 100644
index 0000000000..35df26e906
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativedom.cpp
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
new file mode 100644
index 0000000000..6cd0bdb8bd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
@@ -0,0 +1,1313 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/private/qdeclarativedom_p.h>
+
+#include <QtCore/QDebug>
+#include <QtCore/QFile>
+
+class tst_qdeclarativedom : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativedom() {}
+
+private slots:
+ void loadSimple();
+ void loadProperties();
+ void loadGroupedProperties();
+ void loadChildObject();
+ void loadComposite();
+ void loadImports();
+ void loadErrors();
+ void loadSyntaxErrors();
+ void loadRemoteErrors();
+ void loadDynamicProperty();
+ void loadComponent();
+
+ void testValueSource();
+ void testValueInterceptor();
+
+ void object_dynamicProperty();
+ void object_property();
+ void object_url();
+
+ void copy();
+ void position();
+private:
+ QDeclarativeEngine engine;
+};
+
+
+void tst_qdeclarativedom::loadSimple()
+{
+ QByteArray qml = "import Qt 4.6\n"
+ "Item {}";
+
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, qml));
+ QVERIFY(document.errors().isEmpty());
+
+ QDeclarativeDomObject rootObject = document.rootObject();
+ QVERIFY(rootObject.isValid());
+ QVERIFY(!rootObject.isComponent());
+ QVERIFY(!rootObject.isCustomType());
+ QVERIFY(rootObject.objectType() == "Qt/Item");
+ QVERIFY(rootObject.objectTypeMajorVersion() == 4);
+ QVERIFY(rootObject.objectTypeMinorVersion() == 6);
+}
+
+// Test regular properties
+void tst_qdeclarativedom::loadProperties()
+{
+ QByteArray qml = "import Qt 4.6\n"
+ "Item { id : item; x : 300; visible : true }";
+
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, qml));
+
+ QDeclarativeDomObject rootObject = document.rootObject();
+ QVERIFY(rootObject.isValid());
+ QVERIFY(rootObject.objectId() == "item");
+ QCOMPARE(rootObject.properties().size(), 3);
+
+ QDeclarativeDomProperty xProperty = rootObject.property("x");
+ QVERIFY(xProperty.propertyName() == "x");
+ QCOMPARE(xProperty.propertyNameParts().count(), 1);
+ QVERIFY(xProperty.propertyNameParts().at(0) == "x");
+ QCOMPARE(xProperty.position(), 32);
+ QCOMPARE(xProperty.length(), 1);
+ QVERIFY(xProperty.value().isLiteral());
+ QVERIFY(xProperty.value().toLiteral().literal() == "300");
+
+ QDeclarativeDomProperty visibleProperty = rootObject.property("visible");
+ QVERIFY(visibleProperty.propertyName() == "visible");
+ QCOMPARE(visibleProperty.propertyNameParts().count(), 1);
+ QVERIFY(visibleProperty.propertyNameParts().at(0) == "visible");
+ QCOMPARE(visibleProperty.position(), 41);
+ QCOMPARE(visibleProperty.length(), 7);
+ QVERIFY(visibleProperty.value().isLiteral());
+ QVERIFY(visibleProperty.value().toLiteral().literal() == "true");
+}
+
+// Test grouped properties
+void tst_qdeclarativedom::loadGroupedProperties()
+{
+ {
+ QByteArray qml = "import Qt 4.6\n"
+ "Item { anchors.left: parent.left; anchors.right: parent.right }";
+
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, qml));
+
+ QDeclarativeDomObject rootItem = document.rootObject();
+ QVERIFY(rootItem.isValid());
+ QVERIFY(rootItem.properties().size() == 2);
+
+ // Order is not deterministic
+ QDeclarativeDomProperty p0 = rootItem.properties().at(0);
+ QDeclarativeDomProperty p1 = rootItem.properties().at(1);
+ QDeclarativeDomProperty leftProperty;
+ QDeclarativeDomProperty rightProperty;
+ if (p0.propertyName() == "anchors.left") {
+ leftProperty = p0;
+ rightProperty = p1;
+ } else {
+ leftProperty = p1;
+ rightProperty = p0;
+ }
+
+ QVERIFY(leftProperty.propertyName() == "anchors.left");
+ QCOMPARE(leftProperty.propertyNameParts().count(), 2);
+ QVERIFY(leftProperty.propertyNameParts().at(0) == "anchors");
+ QVERIFY(leftProperty.propertyNameParts().at(1) == "left");
+ QCOMPARE(leftProperty.position(), 21);
+ QCOMPARE(leftProperty.length(), 12);
+ QVERIFY(leftProperty.value().isBinding());
+ QVERIFY(leftProperty.value().toBinding().binding() == "parent.left");
+
+ QVERIFY(rightProperty.propertyName() == "anchors.right");
+ QCOMPARE(rightProperty.propertyNameParts().count(), 2);
+ QVERIFY(rightProperty.propertyNameParts().at(0) == "anchors");
+ QVERIFY(rightProperty.propertyNameParts().at(1) == "right");
+ QCOMPARE(rightProperty.position(), 48);
+ QCOMPARE(rightProperty.length(), 13);
+ QVERIFY(rightProperty.value().isBinding());
+ QVERIFY(rightProperty.value().toBinding().binding() == "parent.right");
+ }
+
+ {
+ QByteArray qml = "import Qt 4.6\n"
+ "Item { \n"
+ " anchors {\n"
+ " left: parent.left\n"
+ " right: parent.right\n"
+ " }\n"
+ "}";
+
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, qml));
+
+ QDeclarativeDomObject rootItem = document.rootObject();
+ QVERIFY(rootItem.isValid());
+ QVERIFY(rootItem.properties().size() == 2);
+
+ // Order is not deterministic
+ QDeclarativeDomProperty p0 = rootItem.properties().at(0);
+ QDeclarativeDomProperty p1 = rootItem.properties().at(1);
+ QDeclarativeDomProperty leftProperty;
+ QDeclarativeDomProperty rightProperty;
+ if (p0.propertyName() == "anchors.left") {
+ leftProperty = p0;
+ rightProperty = p1;
+ } else {
+ leftProperty = p1;
+ rightProperty = p0;
+ }
+
+ QVERIFY(leftProperty.propertyName() == "anchors.left");
+ QCOMPARE(leftProperty.propertyNameParts().count(), 2);
+ QVERIFY(leftProperty.propertyNameParts().at(0) == "anchors");
+ QVERIFY(leftProperty.propertyNameParts().at(1) == "left");
+ QCOMPARE(leftProperty.position(), 44);
+ QCOMPARE(leftProperty.length(), 4);
+ QVERIFY(leftProperty.value().isBinding());
+ QVERIFY(leftProperty.value().toBinding().binding() == "parent.left");
+
+ QVERIFY(rightProperty.propertyName() == "anchors.right");
+ QCOMPARE(rightProperty.propertyNameParts().count(), 2);
+ QVERIFY(rightProperty.propertyNameParts().at(0) == "anchors");
+ QVERIFY(rightProperty.propertyNameParts().at(1) == "right");
+ QCOMPARE(rightProperty.position(), 70);
+ QCOMPARE(rightProperty.length(), 5);
+ QVERIFY(rightProperty.value().isBinding());
+ QVERIFY(rightProperty.value().toBinding().binding() == "parent.right");
+ }
+
+}
+
+void tst_qdeclarativedom::loadChildObject()
+{
+ QByteArray qml = "import Qt 4.6\n"
+ "Item { Item {} }";
+
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, qml));
+
+ QDeclarativeDomObject rootItem = document.rootObject();
+ QVERIFY(rootItem.isValid());
+ QVERIFY(rootItem.properties().size() == 1);
+
+ QDeclarativeDomProperty listProperty = rootItem.properties().at(0);
+ QVERIFY(listProperty.isDefaultProperty());
+ QVERIFY(listProperty.value().isList());
+
+ QDeclarativeDomList list = listProperty.value().toList();
+ QVERIFY(list.values().size() == 1);
+
+ QDeclarativeDomObject childItem = list.values().first().toObject();
+ QVERIFY(childItem.isValid());
+ QVERIFY(childItem.objectType() == "Qt/Item");
+}
+
+void tst_qdeclarativedom::loadComposite()
+{
+ QFile file(SRCDIR "/data/top.qml");
+ QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text));
+
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, file.readAll(), QUrl::fromLocalFile(file.fileName())));
+ QVERIFY(document.errors().isEmpty());
+
+ QDeclarativeDomObject rootItem = document.rootObject();
+ QVERIFY(rootItem.isValid());
+ QCOMPARE(rootItem.objectType(), QByteArray("MyComponent"));
+ QCOMPARE(rootItem.properties().size(), 2);
+
+ QDeclarativeDomProperty widthProperty = rootItem.property("width");
+ QVERIFY(widthProperty.value().isLiteral());
+
+ QDeclarativeDomProperty heightProperty = rootItem.property("height");
+ QVERIFY(heightProperty.value().isLiteral());
+}
+
+void tst_qdeclarativedom::testValueSource()
+{
+ QByteArray qml = "import Qt 4.6\n"
+ "Rectangle { SpringFollow on height { spring: 1.4; damping: .15; source: Math.min(Math.max(-130, value*2.2 - 130), 133); }}";
+
+ QDeclarativeEngine freshEngine;
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&freshEngine, qml));
+
+ QDeclarativeDomObject rootItem = document.rootObject();
+ QVERIFY(rootItem.isValid());
+ QDeclarativeDomProperty heightProperty = rootItem.properties().at(0);
+ QVERIFY(heightProperty.propertyName() == "height");
+ QVERIFY(heightProperty.value().isValueSource());
+
+ const QDeclarativeDomValueValueSource valueSource = heightProperty.value().toValueSource();
+ QDeclarativeDomObject valueSourceObject = valueSource.object();
+ QVERIFY(valueSourceObject.isValid());
+
+ QVERIFY(valueSourceObject.objectType() == "Qt/SpringFollow");
+
+ const QDeclarativeDomValue springValue = valueSourceObject.property("spring").value();
+ QVERIFY(!springValue.isInvalid());
+ QVERIFY(springValue.isLiteral());
+ QVERIFY(springValue.toLiteral().literal() == "1.4");
+
+ const QDeclarativeDomValue sourceValue = valueSourceObject.property("source").value();
+ QVERIFY(!sourceValue.isInvalid());
+ QVERIFY(sourceValue.isBinding());
+ QVERIFY(sourceValue.toBinding().binding() == "Math.min(Math.max(-130, value*2.2 - 130), 133)");
+}
+
+void tst_qdeclarativedom::testValueInterceptor()
+{
+ QByteArray qml = "import Qt 4.6\n"
+ "Rectangle { Behavior on height { NumberAnimation { duration: 100 } } }";
+
+ QDeclarativeEngine freshEngine;
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&freshEngine, qml));
+
+ QDeclarativeDomObject rootItem = document.rootObject();
+ QVERIFY(rootItem.isValid());
+ QDeclarativeDomProperty heightProperty = rootItem.properties().at(0);
+ QVERIFY(heightProperty.propertyName() == "height");
+ QVERIFY(heightProperty.value().isValueInterceptor());
+
+ const QDeclarativeDomValueValueInterceptor valueInterceptor = heightProperty.value().toValueInterceptor();
+ QDeclarativeDomObject valueInterceptorObject = valueInterceptor.object();
+ QVERIFY(valueInterceptorObject.isValid());
+
+ QVERIFY(valueInterceptorObject.objectType() == "Qt/Behavior");
+
+ const QDeclarativeDomValue animationValue = valueInterceptorObject.property("animation").value();
+ QVERIFY(!animationValue.isInvalid());
+ QVERIFY(animationValue.isObject());
+}
+
+// Test QDeclarativeDomDocument::imports()
+void tst_qdeclarativedom::loadImports()
+{
+ QByteArray qml = "import Qt 4.6\n"
+ "import importlib.sublib 4.7\n"
+ "import importlib.sublib 4.6 as NewFoo\n"
+ "import 'import'\n"
+ "import 'import' as X\n"
+ "Item {}";
+
+ QDeclarativeEngine engine;
+ engine.addImportPath(SRCDIR "/data");
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, qml));
+
+ QCOMPARE(document.imports().size(), 5);
+
+ QDeclarativeDomImport import = document.imports().at(0);
+ QCOMPARE(import.type(), QDeclarativeDomImport::Library);
+ QCOMPARE(import.uri(), QLatin1String("Qt"));
+ QCOMPARE(import.qualifier(), QString());
+ QCOMPARE(import.version(), QLatin1String("4.6"));
+
+ import = document.imports().at(1);
+ QCOMPARE(import.type(), QDeclarativeDomImport::Library);
+ QCOMPARE(import.uri(), QLatin1String("importlib.sublib"));
+ QCOMPARE(import.qualifier(), QString());
+ QCOMPARE(import.version(), QLatin1String("4.7"));
+
+ import = document.imports().at(2);
+ QCOMPARE(import.type(), QDeclarativeDomImport::Library);
+ QCOMPARE(import.uri(), QLatin1String("importlib.sublib"));
+ QCOMPARE(import.qualifier(), QLatin1String("NewFoo"));
+ QCOMPARE(import.version(), QLatin1String("4.6"));
+
+ import = document.imports().at(3);
+ QCOMPARE(import.type(), QDeclarativeDomImport::File);
+ QCOMPARE(import.uri(), QLatin1String("import"));
+ QCOMPARE(import.qualifier(), QLatin1String(""));
+ QCOMPARE(import.version(), QLatin1String(""));
+
+ import = document.imports().at(4);
+ QCOMPARE(import.type(), QDeclarativeDomImport::File);
+ QCOMPARE(import.uri(), QLatin1String("import"));
+ QCOMPARE(import.qualifier(), QLatin1String("X"));
+ QCOMPARE(import.version(), QLatin1String(""));
+}
+
+// Test loading a file with errors
+void tst_qdeclarativedom::loadErrors()
+{
+ QByteArray qml = "import Qt 4.6\n"
+ "Item {\n"
+ " foo: 12\n"
+ "}";
+
+ QDeclarativeDomDocument document;
+ QVERIFY(false == document.load(&engine, qml));
+
+ QCOMPARE(document.errors().count(), 1);
+ QDeclarativeError error = document.errors().first();
+
+ QCOMPARE(error.url(), QUrl());
+ QCOMPARE(error.line(), 3);
+ QCOMPARE(error.column(), 3);
+ QCOMPARE(error.description(), QString("Cannot assign to non-existent property \"foo\""));
+}
+
+// Test loading a file with syntax errors
+void tst_qdeclarativedom::loadSyntaxErrors()
+{
+ QByteArray qml = "import Qt 4.6\n"
+ "asdf";
+
+ QDeclarativeDomDocument document;
+ QVERIFY(false == document.load(&engine, qml));
+
+ QCOMPARE(document.errors().count(), 1);
+ QDeclarativeError error = document.errors().first();
+
+ QCOMPARE(error.url(), QUrl());
+ QCOMPARE(error.line(), 2);
+ QCOMPARE(error.column(), 1);
+ QCOMPARE(error.description(), QString("Syntax error"));
+}
+
+// Test attempting to load a file with remote references
+void tst_qdeclarativedom::loadRemoteErrors()
+{
+ QByteArray qml = "import Qt 4.6\n"
+ "Item {\n"
+ " Script {\n"
+ " source: \"http://localhost/exampleQmlScript.js\""
+ " }\n"
+ "}";
+ QDeclarativeDomDocument document;
+ QVERIFY(false == document.load(&engine, qml));
+
+ QCOMPARE(document.errors().count(), 1);
+ QDeclarativeError error = document.errors().first();
+
+ QCOMPARE(error.url(), QUrl());
+ QCOMPARE(error.line(), -1);
+ QCOMPARE(error.column(), -1);
+ QCOMPARE(error.description(), QString("QDeclarativeDomDocument supports local types only"));
+}
+
+// Test dynamic property declarations
+void tst_qdeclarativedom::loadDynamicProperty()
+{
+ {
+ QByteArray qml = "import Qt 4.6\n"
+ "Item {\n"
+ " property int a\n"
+ " property bool b\n"
+ " property double c\n"
+ " property real d\n"
+ " property string e\n"
+ " property url f\n"
+ " property color g\n"
+ " property date h\n"
+ " property var i\n"
+ " property variant j\n"
+ " property QtObject k\n"
+ "}";
+
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, qml));
+
+ QDeclarativeDomObject rootObject = document.rootObject();
+ QVERIFY(rootObject.isValid());
+
+ QCOMPARE(rootObject.dynamicProperties().count(), 11);
+
+#define DP_TEST(index, name, type, test_position, test_length, propTypeName) \
+ { \
+ QDeclarativeDomDynamicProperty d = rootObject.dynamicProperties().at(index); \
+ QVERIFY(d.isValid()); \
+ QVERIFY(d.propertyName() == # name ); \
+ QVERIFY(d.propertyType() == type); \
+ QVERIFY(d.propertyTypeName() == propTypeName); \
+ QVERIFY(d.isDefaultProperty() == false); \
+ QVERIFY(d.defaultValue().isValid() == false); \
+ QCOMPARE(d.position(), test_position); \
+ QCOMPARE(d.length(), test_length); \
+ } \
+
+ DP_TEST(0, a, QVariant::Int, 25, 14, "int");
+ DP_TEST(1, b, QVariant::Bool, 44, 15, "bool");
+ DP_TEST(2, c, QVariant::Double, 64, 17, "double");
+ DP_TEST(3, d, QMetaType::QReal, 86, 15, "real");
+ DP_TEST(4, e, QVariant::String, 106, 17, "string");
+ DP_TEST(5, f, QVariant::Url, 128, 14, "url");
+ DP_TEST(6, g, QVariant::Color, 147, 16, "color");
+ DP_TEST(7, h, QVariant::Date, 168, 15, "date");
+ DP_TEST(8, i, qMetaTypeId<QVariant>(), 188, 14, "var");
+ DP_TEST(9, j, qMetaTypeId<QVariant>(), 207, 18, "variant");
+ DP_TEST(10, k, -1, 230, 19, "QtObject");
+ }
+
+ {
+ QByteArray qml = "import Qt 4.6\n"
+ "Item {\n"
+ " property int a: 12\n"
+ " property int b: a + 6\n"
+ " default property QtObject c\n"
+ "}\n";
+
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, qml));
+
+ QDeclarativeDomObject rootObject = document.rootObject();
+ QVERIFY(rootObject.isValid());
+
+ QCOMPARE(rootObject.dynamicProperties().count(), 3);
+
+ {
+ QDeclarativeDomDynamicProperty d = rootObject.dynamicProperties().at(0);
+ QVERIFY(d.isDefaultProperty() == false);
+ QVERIFY(d.defaultValue().isValid());
+ QVERIFY(d.defaultValue().propertyName() == "a");
+ QVERIFY(d.defaultValue().value().isLiteral());
+ }
+
+ {
+ QDeclarativeDomDynamicProperty d = rootObject.dynamicProperties().at(1);
+ QVERIFY(d.isDefaultProperty() == false);
+ QVERIFY(d.defaultValue().isValid());
+ QVERIFY(d.defaultValue().propertyName() == "b");
+ QVERIFY(d.defaultValue().value().isBinding());
+ }
+
+ {
+ QDeclarativeDomDynamicProperty d = rootObject.dynamicProperties().at(2);
+ QVERIFY(d.isDefaultProperty() == true);
+ QVERIFY(d.defaultValue().isValid() == false);
+ }
+ }
+}
+
+// Test inline components
+void tst_qdeclarativedom::loadComponent()
+{
+ // Explicit component
+ {
+ QByteArray qml = "import Qt 4.6\n"
+ "Item {\n"
+ " Component {\n"
+ " id: myComponent\n"
+ " Item {}\n"
+ " }\n"
+ "}";
+
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, qml));
+
+ QDeclarativeDomObject rootItem = document.rootObject();
+ QVERIFY(rootItem.isValid());
+ QVERIFY(rootItem.properties().size() == 1);
+
+ QDeclarativeDomProperty listProperty = rootItem.properties().at(0);
+ QVERIFY(listProperty.isDefaultProperty());
+ QVERIFY(listProperty.value().isList());
+
+ QDeclarativeDomList list = listProperty.value().toList();
+ QVERIFY(list.values().size() == 1);
+
+ QDeclarativeDomObject componentObject = list.values().first().toObject();
+ QVERIFY(componentObject.isValid());
+ QVERIFY(componentObject.objectClassName() == "Component");
+ QVERIFY(componentObject.isComponent());
+
+ QDeclarativeDomComponent component = componentObject.toComponent();
+ QVERIFY(component.isValid());
+ QVERIFY(component.objectType() == "Qt/Component");
+ QVERIFY(component.objectTypeMajorVersion() == 4);
+ QVERIFY(component.objectTypeMinorVersion() == 6);
+ QVERIFY(component.objectClassName() == "Component");
+ QVERIFY(component.objectId() == "myComponent");
+ QVERIFY(component.properties().isEmpty());
+ QVERIFY(component.dynamicProperties().isEmpty());
+ QVERIFY(component.isCustomType() == false);
+ QVERIFY(component.customTypeData() == "");
+ QVERIFY(component.isComponent());
+ QCOMPARE(component.position(), 25);
+ QCOMPARE(component.length(), 57);
+
+ QVERIFY(component.componentRoot().isValid());
+ QVERIFY(component.componentRoot().objectClassName() == "Item");
+ }
+
+ // Implicit component
+ {
+ QByteArray qml = "import Qt 4.6\n"
+ "ListView {\n"
+ " delegate: Item {}\n"
+ "}";
+
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, qml));
+
+ QDeclarativeDomObject rootItem = document.rootObject();
+ QVERIFY(rootItem.isValid());
+ QVERIFY(rootItem.properties().size() == 1);
+
+ QDeclarativeDomProperty delegate = rootItem.property("delegate");
+
+ QDeclarativeDomObject componentObject = delegate.value().toObject();
+ QVERIFY(componentObject.isValid());
+ QVERIFY(componentObject.objectClassName() == "Component");
+ QVERIFY(componentObject.isComponent());
+
+ QDeclarativeDomComponent component = componentObject.toComponent();
+ QVERIFY(component.isValid());
+ QVERIFY(component.objectType() == "Qt/Component");
+ QVERIFY(component.objectClassName() == "Component");
+ QVERIFY(component.objectId() == "");
+ QVERIFY(component.properties().isEmpty());
+ QVERIFY(component.dynamicProperties().isEmpty());
+ QVERIFY(component.isCustomType() == false);
+ QVERIFY(component.customTypeData() == "");
+ QVERIFY(component.isComponent());
+ QCOMPARE(component.position(), 39);
+ QCOMPARE(component.length(), 7);
+
+ QVERIFY(component.componentRoot().isValid());
+ QVERIFY(component.componentRoot().objectClassName() == "Item");
+ }
+}
+
+// Test QDeclarativeDomObject::dynamicProperty() method
+void tst_qdeclarativedom::object_dynamicProperty()
+{
+ // Invalid object
+ {
+ QDeclarativeDomObject object;
+ QVERIFY(object.dynamicProperty("").isValid() == false);
+ QVERIFY(object.dynamicProperty("foo").isValid() == false);
+ }
+
+
+ // Valid object, no dynamic properties
+ {
+ QByteArray qml = "import Qt 4.6\n"
+ "Item {}";
+
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, qml));
+
+ QDeclarativeDomObject rootObject = document.rootObject();
+ QVERIFY(rootObject.isValid());
+
+ QVERIFY(rootObject.dynamicProperty("").isValid() == false);
+ QVERIFY(rootObject.dynamicProperty("foo").isValid() == false);
+ }
+
+ // Valid object, dynamic properties
+ {
+ QByteArray qml = "import Qt 4.6\n"
+ "Item {\n"
+ " property int a\n"
+ "}";
+
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, qml));
+
+ QDeclarativeDomObject rootObject = document.rootObject();
+ QVERIFY(rootObject.isValid());
+
+ QVERIFY(rootObject.dynamicProperty("").isValid() == false);
+ QVERIFY(rootObject.dynamicProperty("foo").isValid() == false);
+
+ QDeclarativeDomDynamicProperty p = rootObject.dynamicProperty("a");
+ QVERIFY(p.isValid());
+ QVERIFY(p.propertyName() == "a");
+ QVERIFY(p.propertyType() == QVariant::Int);
+ QVERIFY(p.propertyTypeName() == "int");
+ QVERIFY(p.isDefaultProperty() == false);
+ QCOMPARE(p.position(), 25);
+ QCOMPARE(p.length(), 14);
+ }
+
+}
+
+// Test QDeclarativeObject::property() method
+void tst_qdeclarativedom::object_property()
+{
+ // Invalid object
+ {
+ QDeclarativeDomObject object;
+ QVERIFY(object.property("").isValid() == false);
+ QVERIFY(object.property("foo").isValid() == false);
+ }
+
+ // Valid object - no default
+ {
+ QByteArray qml = "import Qt 4.6\n"
+ "Item {\n"
+ " x: 10\n"
+ " y: 12\n"
+ "}\n";
+
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, qml));
+
+ QDeclarativeDomObject rootObject = document.rootObject();
+ QVERIFY(rootObject.isValid());
+
+ QVERIFY(rootObject.property("").isValid() == false);
+ QVERIFY(rootObject.property("foo").isValid() == false);
+
+ QDeclarativeDomProperty x = rootObject.property("x");
+ QVERIFY(x.isValid());
+ QVERIFY(x.propertyName() == "x");
+ QVERIFY(x.propertyNameParts().count() == 1);
+ QVERIFY(x.propertyNameParts().at(0) == "x");
+ QVERIFY(x.isDefaultProperty() == false);
+ QVERIFY(x.value().isLiteral());
+ QVERIFY(x.value().toLiteral().literal() == "10");
+ QCOMPARE(x.position(), 25);
+ QCOMPARE(x.length(), 1);
+
+ QDeclarativeDomProperty y = rootObject.property("y");
+ QVERIFY(y.isValid());
+ QVERIFY(y.propertyName() == "y");
+ QVERIFY(y.propertyNameParts().count() == 1);
+ QVERIFY(y.propertyNameParts().at(0) == "y");
+ QVERIFY(y.isDefaultProperty() == false);
+ QVERIFY(y.value().isLiteral());
+ QVERIFY(y.value().toLiteral().literal() == "12");
+ QCOMPARE(y.position(), 35);
+ QCOMPARE(y.length(), 1);
+ }
+
+ // Valid object - with default
+ {
+ QByteArray qml = "import Qt 4.6\n"
+ "Item {\n"
+ " x: 10\n"
+ " y: 12\n"
+ " Item {}\n"
+ "}\n";
+
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, qml));
+
+ QDeclarativeDomObject rootObject = document.rootObject();
+ QVERIFY(rootObject.isValid());
+
+ QVERIFY(rootObject.property("").isValid() == false);
+ QVERIFY(rootObject.property("foo").isValid() == false);
+
+ QDeclarativeDomProperty x = rootObject.property("x");
+ QVERIFY(x.isValid());
+ QVERIFY(x.propertyName() == "x");
+ QVERIFY(x.propertyNameParts().count() == 1);
+ QVERIFY(x.propertyNameParts().at(0) == "x");
+ QVERIFY(x.isDefaultProperty() == false);
+ QVERIFY(x.value().isLiteral());
+ QVERIFY(x.value().toLiteral().literal() == "10");
+ QCOMPARE(x.position(), 25);
+ QCOMPARE(x.length(), 1);
+
+ QDeclarativeDomProperty y = rootObject.property("y");
+ QVERIFY(y.isValid());
+ QVERIFY(y.propertyName() == "y");
+ QVERIFY(y.propertyNameParts().count() == 1);
+ QVERIFY(y.propertyNameParts().at(0) == "y");
+ QVERIFY(y.isDefaultProperty() == false);
+ QVERIFY(y.value().isLiteral());
+ QVERIFY(y.value().toLiteral().literal() == "12");
+ QCOMPARE(y.position(), 35);
+ QCOMPARE(y.length(), 1);
+
+ QDeclarativeDomProperty data = rootObject.property("data");
+ QVERIFY(data.isValid());
+ QVERIFY(data.propertyName() == "data");
+ QVERIFY(data.propertyNameParts().count() == 1);
+ QVERIFY(data.propertyNameParts().at(0) == "data");
+ QVERIFY(data.isDefaultProperty() == true);
+ QVERIFY(data.value().isList());
+ QCOMPARE(data.position(), 45);
+ QCOMPARE(data.length(), 0);
+ }
+}
+
+// Tests the QDeclarativeDomObject::url() method
+void tst_qdeclarativedom::object_url()
+{
+ // Invalid object
+ {
+ QDeclarativeDomObject object;
+ QCOMPARE(object.url(), QUrl());
+ }
+
+ // Valid builtin object
+ {
+ QByteArray qml = "import Qt 4.6\n"
+ "Item {}";
+
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, qml));
+
+ QDeclarativeDomObject rootObject = document.rootObject();
+ QVERIFY(rootObject.isValid());
+ QCOMPARE(rootObject.url(), QUrl());
+ }
+
+ // Valid composite object
+ {
+ QByteArray qml = "import Qt 4.6\n"
+ "MyItem {}";
+
+ QUrl myUrl = QUrl::fromLocalFile(SRCDIR "/data/main.qml");
+ QUrl subUrl = QUrl::fromLocalFile(SRCDIR "/data/MyItem.qml");
+
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, qml, myUrl));
+
+ QDeclarativeDomObject rootObject = document.rootObject();
+ QVERIFY(rootObject.isValid());
+ QCOMPARE(rootObject.url(), subUrl);
+ }
+}
+
+// Test copy constructors and operators
+void tst_qdeclarativedom::copy()
+{
+ QByteArray qml = "import Qt 4.6\n"
+ "MyItem {\n"
+ " id: myItem\n"
+ " property int a: 10\n"
+ " x: 10\n"
+ " y: x + 10\n"
+ " NumberAnimation on z {}\n"
+ " Behavior on opacity {}\n"
+ " Component {\n"
+ " Item{}\n"
+ " }\n"
+ " children: [ Item{}, Item{} ]\n"
+ "}\n";
+
+ QUrl myUrl = QUrl::fromLocalFile(SRCDIR "/data/main.qml");
+
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, qml, myUrl));
+
+ // QDeclarativeDomDocument
+ {
+ QDeclarativeDomDocument document2(document);
+ QDeclarativeDomDocument document3;
+ document3 = document;
+
+ QCOMPARE(document.imports().count(), document2.imports().count());
+ QCOMPARE(document.errors().count(), document2.errors().count());
+ QCOMPARE(document.rootObject().objectClassName(), document2.rootObject().objectClassName());
+
+ QCOMPARE(document.imports().count(), document3.imports().count());
+ QCOMPARE(document.errors().count(), document3.errors().count());
+ QCOMPARE(document.rootObject().objectClassName(), document3.rootObject().objectClassName());
+ }
+
+ // QDeclarativeDomImport
+ {
+ QCOMPARE(document.imports().count(), 1);
+ QDeclarativeDomImport import = document.imports().at(0);
+
+ QDeclarativeDomImport import2(import);
+ QDeclarativeDomImport import3;
+ import3 = import2;
+
+ QCOMPARE(import.type(), import2.type());
+ QCOMPARE(import.uri(), import2.uri());
+ QCOMPARE(import.version(), import2.version());
+ QCOMPARE(import.qualifier(), import2.qualifier());
+
+ QCOMPARE(import.type(), import3.type());
+ QCOMPARE(import.uri(), import3.uri());
+ QCOMPARE(import.version(), import3.version());
+ QCOMPARE(import.qualifier(), import3.qualifier());
+ }
+
+ // QDeclarativeDomObject
+ {
+ QDeclarativeDomObject object = document.rootObject();
+ QVERIFY(object.isValid());
+
+ QDeclarativeDomObject object2(object);
+ QDeclarativeDomObject object3;
+ object3 = object;
+
+ QCOMPARE(object.isValid(), object2.isValid());
+ QCOMPARE(object.objectType(), object2.objectType());
+ QCOMPARE(object.objectClassName(), object2.objectClassName());
+ QCOMPARE(object.objectTypeMajorVersion(), object2.objectTypeMajorVersion());
+ QCOMPARE(object.objectTypeMinorVersion(), object2.objectTypeMinorVersion());
+ QCOMPARE(object.objectId(), object2.objectId());
+ QCOMPARE(object.properties().count(), object2.properties().count());
+ QCOMPARE(object.dynamicProperties().count(), object2.dynamicProperties().count());
+ QCOMPARE(object.isCustomType(), object2.isCustomType());
+ QCOMPARE(object.customTypeData(), object2.customTypeData());
+ QCOMPARE(object.isComponent(), object2.isComponent());
+ QCOMPARE(object.position(), object2.position());
+ QCOMPARE(object.length(), object2.length());
+ QCOMPARE(object.url(), object2.url());
+
+ QCOMPARE(object.isValid(), object3.isValid());
+ QCOMPARE(object.objectType(), object3.objectType());
+ QCOMPARE(object.objectClassName(), object3.objectClassName());
+ QCOMPARE(object.objectTypeMajorVersion(), object3.objectTypeMajorVersion());
+ QCOMPARE(object.objectTypeMinorVersion(), object3.objectTypeMinorVersion());
+ QCOMPARE(object.objectId(), object3.objectId());
+ QCOMPARE(object.properties().count(), object3.properties().count());
+ QCOMPARE(object.dynamicProperties().count(), object3.dynamicProperties().count());
+ QCOMPARE(object.isCustomType(), object3.isCustomType());
+ QCOMPARE(object.customTypeData(), object3.customTypeData());
+ QCOMPARE(object.isComponent(), object3.isComponent());
+ QCOMPARE(object.position(), object3.position());
+ QCOMPARE(object.length(), object3.length());
+ QCOMPARE(object.url(), object3.url());
+ }
+
+ // QDeclarativeDomDynamicProperty
+ {
+ QDeclarativeDomObject object = document.rootObject();
+ QDeclarativeDomDynamicProperty property = object.dynamicProperty("a");
+
+ QDeclarativeDomDynamicProperty property2(property);
+ QDeclarativeDomDynamicProperty property3;
+ property3 = property;
+
+ QCOMPARE(property.isValid(), property2.isValid());
+ QCOMPARE(property.propertyName(), property2.propertyName());
+ QCOMPARE(property.propertyType(), property2.propertyType());
+ QCOMPARE(property.propertyTypeName(), property2.propertyTypeName());
+ QCOMPARE(property.isDefaultProperty(), property2.isDefaultProperty());
+ QCOMPARE(property.defaultValue().propertyName(), property2.defaultValue().propertyName());
+ QCOMPARE(property.position(), property2.position());
+ QCOMPARE(property.length(), property2.length());
+
+ QCOMPARE(property.isValid(), property3.isValid());
+ QCOMPARE(property.propertyName(), property3.propertyName());
+ QCOMPARE(property.propertyType(), property3.propertyType());
+ QCOMPARE(property.propertyTypeName(), property3.propertyTypeName());
+ QCOMPARE(property.isDefaultProperty(), property3.isDefaultProperty());
+ QCOMPARE(property.defaultValue().propertyName(), property3.defaultValue().propertyName());
+ QCOMPARE(property.position(), property3.position());
+ QCOMPARE(property.length(), property3.length());
+ }
+
+ // QDeclarativeDomProperty
+ {
+ QDeclarativeDomObject object = document.rootObject();
+ QDeclarativeDomProperty property = object.property("opacity");
+
+ QDeclarativeDomProperty property2(property);
+ QDeclarativeDomProperty property3;
+ property3 = property;
+
+ QCOMPARE(property.isValid(), property2.isValid());
+ QCOMPARE(property.propertyName(), property2.propertyName());
+ QCOMPARE(property.propertyNameParts(), property2.propertyNameParts());
+ QCOMPARE(property.isDefaultProperty(), property2.isDefaultProperty());
+ QCOMPARE(property.value().type(), property2.value().type());
+ QCOMPARE(property.position(), property2.position());
+ QCOMPARE(property.length(), property2.length());
+
+ QCOMPARE(property.isValid(), property3.isValid());
+ QCOMPARE(property.propertyName(), property3.propertyName());
+ QCOMPARE(property.propertyNameParts(), property3.propertyNameParts());
+ QCOMPARE(property.isDefaultProperty(), property3.isDefaultProperty());
+ QCOMPARE(property.value().type(), property3.value().type());
+ QCOMPARE(property.position(), property3.position());
+ QCOMPARE(property.length(), property3.length());
+ }
+
+ // QDeclarativeDomValueLiteral
+ {
+ QDeclarativeDomObject object = document.rootObject();
+ QDeclarativeDomProperty property = object.property("x");
+ QDeclarativeDomValueLiteral literal = property.value().toLiteral();
+ QCOMPARE(literal.literal(), QString("10"));
+
+ QDeclarativeDomValueLiteral literal2(literal);
+ QDeclarativeDomValueLiteral literal3;
+ literal3 = literal2;
+
+ QCOMPARE(literal2.literal(), QString("10"));
+ QCOMPARE(literal3.literal(), QString("10"));
+ }
+
+
+ // QDeclarativeDomValueBinding
+ {
+ QDeclarativeDomObject object = document.rootObject();
+ QDeclarativeDomProperty property = object.property("y");
+ QDeclarativeDomValueBinding binding = property.value().toBinding();
+ QCOMPARE(binding.binding(), QString("x + 10"));
+
+ QDeclarativeDomValueBinding binding2(binding);
+ QDeclarativeDomValueBinding binding3;
+ binding3 = binding2;
+
+ QCOMPARE(binding2.binding(), QString("x + 10"));
+ QCOMPARE(binding3.binding(), QString("x + 10"));
+ }
+
+ // QDeclarativeDomValueValueSource
+ {
+ QDeclarativeDomObject object = document.rootObject();
+ QDeclarativeDomProperty property = object.property("z");
+ QDeclarativeDomValueValueSource source = property.value().toValueSource();
+ QCOMPARE(source.object().objectClassName(), QByteArray("NumberAnimation"));
+
+ QDeclarativeDomValueValueSource source2(source);
+ QDeclarativeDomValueValueSource source3;
+ source3 = source;
+
+ QCOMPARE(source2.object().objectClassName(), QByteArray("NumberAnimation"));
+ QCOMPARE(source3.object().objectClassName(), QByteArray("NumberAnimation"));
+ }
+
+ // QDeclarativeDomValueValueInterceptor
+ {
+ QDeclarativeDomObject object = document.rootObject();
+ QDeclarativeDomProperty property = object.property("opacity");
+ QDeclarativeDomValueValueInterceptor interceptor = property.value().toValueInterceptor();
+ QCOMPARE(interceptor.object().objectClassName(), QByteArray("Behavior"));
+
+ QDeclarativeDomValueValueInterceptor interceptor2(interceptor);
+ QDeclarativeDomValueValueInterceptor interceptor3;
+ interceptor3 = interceptor;
+
+ QCOMPARE(interceptor2.object().objectClassName(), QByteArray("Behavior"));
+ QCOMPARE(interceptor3.object().objectClassName(), QByteArray("Behavior"));
+ }
+
+ // QDeclarativeDomComponent
+ {
+ QDeclarativeDomObject object = document.rootObject();
+ QDeclarativeDomProperty property = object.property("data");
+ QCOMPARE(property.value().toList().values().count(), 1);
+ QDeclarativeDomComponent component =
+ property.value().toList().values().at(0).toObject().toComponent();
+ QCOMPARE(component.componentRoot().objectClassName(), QByteArray("Item"));
+
+ QDeclarativeDomComponent component2(component);
+ QDeclarativeDomComponent component3;
+ component3 = component;
+
+ QCOMPARE(component.componentRoot().objectClassName(), component2.componentRoot().objectClassName());
+ QCOMPARE(component.isValid(), component2.isValid());
+ QCOMPARE(component.objectType(), component2.objectType());
+ QCOMPARE(component.objectClassName(), component2.objectClassName());
+ QCOMPARE(component.objectTypeMajorVersion(), component2.objectTypeMajorVersion());
+ QCOMPARE(component.objectTypeMinorVersion(), component2.objectTypeMinorVersion());
+ QCOMPARE(component.objectId(), component2.objectId());
+ QCOMPARE(component.properties().count(), component2.properties().count());
+ QCOMPARE(component.dynamicProperties().count(), component2.dynamicProperties().count());
+ QCOMPARE(component.isCustomType(), component2.isCustomType());
+ QCOMPARE(component.customTypeData(), component2.customTypeData());
+ QCOMPARE(component.isComponent(), component2.isComponent());
+ QCOMPARE(component.position(), component2.position());
+ QCOMPARE(component.length(), component2.length());
+ QCOMPARE(component.url(), component2.url());
+
+ QCOMPARE(component.componentRoot().objectClassName(), component3.componentRoot().objectClassName());
+ QCOMPARE(component.isValid(), component3.isValid());
+ QCOMPARE(component.objectType(), component3.objectType());
+ QCOMPARE(component.objectClassName(), component3.objectClassName());
+ QCOMPARE(component.objectTypeMajorVersion(), component3.objectTypeMajorVersion());
+ QCOMPARE(component.objectTypeMinorVersion(), component3.objectTypeMinorVersion());
+ QCOMPARE(component.objectId(), component3.objectId());
+ QCOMPARE(component.properties().count(), component3.properties().count());
+ QCOMPARE(component.dynamicProperties().count(), component3.dynamicProperties().count());
+ QCOMPARE(component.isCustomType(), component3.isCustomType());
+ QCOMPARE(component.customTypeData(), component3.customTypeData());
+ QCOMPARE(component.isComponent(), component3.isComponent());
+ QCOMPARE(component.position(), component3.position());
+ QCOMPARE(component.length(), component3.length());
+ QCOMPARE(component.url(), component3.url());
+ }
+
+ // QDeclarativeDomValue
+ {
+ QDeclarativeDomObject object = document.rootObject();
+ QDeclarativeDomProperty property = object.property("data");
+ QDeclarativeDomValue value = property.value();
+
+ QDeclarativeDomValue value2(value);
+ QDeclarativeDomValue value3;
+ value3 = value;
+
+ QCOMPARE(value.type(), value2.type());
+ QCOMPARE(value.isInvalid(), value2.isInvalid());
+ QCOMPARE(value.isLiteral(), value2.isLiteral());
+ QCOMPARE(value.isBinding(), value2.isBinding());
+ QCOMPARE(value.isValueSource(), value2.isValueSource());
+ QCOMPARE(value.isValueInterceptor(), value2.isValueInterceptor());
+ QCOMPARE(value.isObject(), value2.isObject());
+ QCOMPARE(value.isList(), value2.isList());
+ QCOMPARE(value.position(), value2.position());
+ QCOMPARE(value.length(), value2.length());
+
+ QCOMPARE(value.type(), value3.type());
+ QCOMPARE(value.isInvalid(), value3.isInvalid());
+ QCOMPARE(value.isLiteral(), value3.isLiteral());
+ QCOMPARE(value.isBinding(), value3.isBinding());
+ QCOMPARE(value.isValueSource(), value3.isValueSource());
+ QCOMPARE(value.isValueInterceptor(), value3.isValueInterceptor());
+ QCOMPARE(value.isObject(), value3.isObject());
+ QCOMPARE(value.isList(), value3.isList());
+ QCOMPARE(value.position(), value3.position());
+ QCOMPARE(value.length(), value3.length());
+ }
+ {
+ QDeclarativeDomObject object = document.rootObject();
+ QDeclarativeDomProperty property = object.property("x");
+ QDeclarativeDomValue value = property.value();
+
+ QDeclarativeDomValue value2(value);
+ QDeclarativeDomValue value3;
+ value3 = value;
+
+ QCOMPARE(value.type(), value2.type());
+ QCOMPARE(value.isInvalid(), value2.isInvalid());
+ QCOMPARE(value.isLiteral(), value2.isLiteral());
+ QCOMPARE(value.isBinding(), value2.isBinding());
+ QCOMPARE(value.isValueSource(), value2.isValueSource());
+ QCOMPARE(value.isValueInterceptor(), value2.isValueInterceptor());
+ QCOMPARE(value.isObject(), value2.isObject());
+ QCOMPARE(value.isList(), value2.isList());
+ QCOMPARE(value.position(), value2.position());
+ QCOMPARE(value.length(), value2.length());
+
+ QCOMPARE(value.type(), value3.type());
+ QCOMPARE(value.isInvalid(), value3.isInvalid());
+ QCOMPARE(value.isLiteral(), value3.isLiteral());
+ QCOMPARE(value.isBinding(), value3.isBinding());
+ QCOMPARE(value.isValueSource(), value3.isValueSource());
+ QCOMPARE(value.isValueInterceptor(), value3.isValueInterceptor());
+ QCOMPARE(value.isObject(), value3.isObject());
+ QCOMPARE(value.isList(), value3.isList());
+ QCOMPARE(value.position(), value3.position());
+ QCOMPARE(value.length(), value3.length());
+ }
+ {
+ QDeclarativeDomValue value;
+
+ QDeclarativeDomValue value2(value);
+ QDeclarativeDomValue value3;
+ value3 = value;
+
+ QCOMPARE(value.type(), value2.type());
+ QCOMPARE(value.isInvalid(), value2.isInvalid());
+ QCOMPARE(value.isLiteral(), value2.isLiteral());
+ QCOMPARE(value.isBinding(), value2.isBinding());
+ QCOMPARE(value.isValueSource(), value2.isValueSource());
+ QCOMPARE(value.isValueInterceptor(), value2.isValueInterceptor());
+ QCOMPARE(value.isObject(), value2.isObject());
+ QCOMPARE(value.isList(), value2.isList());
+ QCOMPARE(value.position(), value2.position());
+ QCOMPARE(value.length(), value2.length());
+
+ QCOMPARE(value.type(), value3.type());
+ QCOMPARE(value.isInvalid(), value3.isInvalid());
+ QCOMPARE(value.isLiteral(), value3.isLiteral());
+ QCOMPARE(value.isBinding(), value3.isBinding());
+ QCOMPARE(value.isValueSource(), value3.isValueSource());
+ QCOMPARE(value.isValueInterceptor(), value3.isValueInterceptor());
+ QCOMPARE(value.isObject(), value3.isObject());
+ QCOMPARE(value.isList(), value3.isList());
+ QCOMPARE(value.position(), value3.position());
+ QCOMPARE(value.length(), value3.length());
+ }
+
+ // QDeclarativeDomList
+ {
+ QDeclarativeDomObject object = document.rootObject();
+ QDeclarativeDomProperty property = object.property("children");
+ QDeclarativeDomList list = property.value().toList();
+ QCOMPARE(list.values().count(), 2);
+
+ QDeclarativeDomList list2(list);
+ QDeclarativeDomList list3;
+ list3 = list2;
+
+ QCOMPARE(list.values().count(), list2.values().count());
+ QCOMPARE(list.position(), list2.position());
+ QCOMPARE(list.length(), list2.length());
+ QCOMPARE(list.commaPositions(), list2.commaPositions());
+
+ QCOMPARE(list.values().count(), list3.values().count());
+ QCOMPARE(list.position(), list3.position());
+ QCOMPARE(list.length(), list3.length());
+ QCOMPARE(list.commaPositions(), list3.commaPositions());
+
+ }
+}
+
+// Tests the position/length of various elements
+void tst_qdeclarativedom::position()
+{
+ QByteArray qml = "import Qt 4.6\n"
+ "Item {\n"
+ " id: myItem\n"
+ " property int a: 10\n"
+ " x: 10\n"
+ " y: x + 10\n"
+ " NumberAnimation on z {}\n"
+ " Behavior on opacity {}\n"
+ " Component {\n"
+ " Item{}\n"
+ " }\n"
+ " children: [ Item{}, Item{} ]\n"
+ "}\n";
+
+
+ QDeclarativeDomDocument document;
+ QVERIFY(document.load(&engine, qml));
+
+ QDeclarativeDomObject root = document.rootObject();
+
+ // All QDeclarativeDomDynamicProperty
+ QDeclarativeDomDynamicProperty dynProp = root.dynamicProperty("a");
+ QCOMPARE(dynProp.position(), 40);
+ QCOMPARE(dynProp.length(), 18);
+
+ // All QDeclarativeDomProperty
+ QDeclarativeDomProperty x = root.property("x");
+ QCOMPARE(x.position(), 63);
+ QCOMPARE(x.length(), 1);
+
+ QDeclarativeDomProperty y = root.property("y");
+ QCOMPARE(y.position(), 73);
+ QCOMPARE(y.length(), 1);
+
+ QDeclarativeDomProperty z = root.property("z");
+ QCOMPARE(z.position(), 106);
+ QCOMPARE(z.length(), 1);
+
+ QDeclarativeDomProperty opacity = root.property("opacity");
+ QCOMPARE(opacity.position(), 127);
+ QCOMPARE(opacity.length(), 7);
+
+ QDeclarativeDomProperty data = root.property("data");
+ QCOMPARE(data.position(), 142);
+ QCOMPARE(data.length(), 0);
+
+ QDeclarativeDomProperty children = root.property("children");
+ QCOMPARE(children.position(), 179);
+ QCOMPARE(children.length(), 8);
+
+ QDeclarativeDomList dataList = data.value().toList();
+ QCOMPARE(dataList.values().count(), 1);
+ QDeclarativeDomList childrenList = children.value().toList();
+ QCOMPARE(childrenList.values().count(), 2);
+
+ // All QDeclarativeDomObject
+ QCOMPARE(root.position(), 14);
+ QCOMPARE(root.length(), 195);
+
+ QDeclarativeDomObject numberAnimation = z.value().toValueSource().object();
+ QCOMPARE(numberAnimation.position(), 87);
+ QCOMPARE(numberAnimation.length(), 23);
+
+ QDeclarativeDomObject behavior = opacity.value().toValueInterceptor().object();
+ QCOMPARE(behavior.position(), 115);
+ QCOMPARE(behavior.length(), 22);
+
+ QDeclarativeDomObject component = dataList.values().at(0).toObject();
+ QCOMPARE(component.position(), 142);
+ QCOMPARE(component.length(), 32);
+
+ QDeclarativeDomObject componentRoot = component.toComponent().componentRoot();
+ QCOMPARE(componentRoot.position(), 162);
+ QCOMPARE(componentRoot.length(), 6);
+
+ QDeclarativeDomObject child1 = childrenList.values().at(0).toObject();
+ QCOMPARE(child1.position(), 191);
+ QCOMPARE(child1.length(), 6);
+
+ QDeclarativeDomObject child2 = childrenList.values().at(1).toObject();
+ QCOMPARE(child2.position(), 199);
+ QCOMPARE(child2.length(), 6);
+
+ // All QDeclarativeDomValue
+ QDeclarativeDomValue xValue = x.value();
+ QCOMPARE(xValue.position(), 66);
+ QCOMPARE(xValue.length(), 2);
+
+ QDeclarativeDomValue yValue = y.value();
+ QCOMPARE(yValue.position(), 76);
+ QCOMPARE(yValue.length(), 6);
+
+ QDeclarativeDomValue zValue = z.value();
+ QCOMPARE(zValue.position(), 87);
+ QCOMPARE(zValue.length(), 23);
+
+ QDeclarativeDomValue opacityValue = opacity.value();
+ QCOMPARE(opacityValue.position(), 115);
+ QCOMPARE(opacityValue.length(), 22);
+
+ QDeclarativeDomValue dataValue = data.value();
+ QCOMPARE(dataValue.position(), 142);
+ QCOMPARE(dataValue.length(), 32);
+
+ QDeclarativeDomValue child1Value = childrenList.values().at(0);
+ QCOMPARE(child1Value.position(), 191);
+ QCOMPARE(child1Value.length(), 6);
+
+ QDeclarativeDomValue child2Value = childrenList.values().at(1);
+ QCOMPARE(child2Value.position(), 199);
+ QCOMPARE(child2Value.length(), 6);
+
+ // All QDeclarativeDomList
+ qWarning("QDeclarativeListValue position test required");
+}
+
+QTEST_MAIN(tst_qdeclarativedom)
+
+#include "tst_qdeclarativedom.moc"
diff --git a/tests/auto/declarative/qdeclarativeeasefollow/data/easefollow1.qml b/tests/auto/declarative/qdeclarativeeasefollow/data/easefollow1.qml
new file mode 100644
index 0000000000..0cc19ebf2f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeeasefollow/data/easefollow1.qml
@@ -0,0 +1,3 @@
+import Qt 4.6
+
+EaseFollow {}
diff --git a/tests/auto/declarative/qdeclarativeeasefollow/data/easefollow2.qml b/tests/auto/declarative/qdeclarativeeasefollow/data/easefollow2.qml
new file mode 100644
index 0000000000..b65964e1ac
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeeasefollow/data/easefollow2.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+EaseFollow {
+ source: 10; duration: 300; enabled: true; reversingMode: EaseFollow.Immediate
+}
diff --git a/tests/auto/declarative/qdeclarativeeasefollow/data/easefollow3.qml b/tests/auto/declarative/qdeclarativeeasefollow/data/easefollow3.qml
new file mode 100644
index 0000000000..f8886e965f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeeasefollow/data/easefollow3.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+EaseFollow {
+ source: 10; velocity: 250; enabled: false; reversingMode: EaseFollow.Sync
+ maximumEasingTime: 150
+}
diff --git a/tests/auto/declarative/qdeclarativeeasefollow/qdeclarativeeasefollow.pro b/tests/auto/declarative/qdeclarativeeasefollow/qdeclarativeeasefollow.pro
new file mode 100644
index 0000000000..71df4f4d4e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeeasefollow/qdeclarativeeasefollow.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativeeasefollow.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeeasefollow/tst_qdeclarativeeasefollow.cpp b/tests/auto/declarative/qdeclarativeeasefollow/tst_qdeclarativeeasefollow.cpp
new file mode 100644
index 0000000000..036eec0617
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeeasefollow/tst_qdeclarativeeasefollow.cpp
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativeeasefollow_p.h>
+#include <private/qdeclarativevaluetype_p.h>
+#include "../../../shared/util.h"
+
+class tst_qdeclarativeeasefollow : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativeeasefollow();
+
+private slots:
+ void defaultValues();
+ void values();
+ void disabled();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+tst_qdeclarativeeasefollow::tst_qdeclarativeeasefollow()
+{
+}
+
+void tst_qdeclarativeeasefollow::defaultValues()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/easefollow1.qml"));
+ QDeclarativeEaseFollow *obj = qobject_cast<QDeclarativeEaseFollow*>(c.create());
+
+ QVERIFY(obj != 0);
+
+ QCOMPARE(obj->sourceValue(), 0.);
+ QCOMPARE(obj->velocity(), 200.);
+ QCOMPARE(obj->enabled(), true);
+ QCOMPARE(obj->duration(), -1.);
+ QCOMPARE(obj->maximumEasingTime(), -1.);
+ QCOMPARE(obj->reversingMode(), QDeclarativeEaseFollow::Eased);
+
+ delete obj;
+}
+
+void tst_qdeclarativeeasefollow::values()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/easefollow2.qml"));
+ QDeclarativeEaseFollow *obj = qobject_cast<QDeclarativeEaseFollow*>(c.create());
+
+ QVERIFY(obj != 0);
+
+ QCOMPARE(obj->sourceValue(), 10.);
+ QCOMPARE(obj->velocity(), 200.);
+ QCOMPARE(obj->enabled(), true);
+ QCOMPARE(obj->duration(), 300.);
+ QCOMPARE(obj->maximumEasingTime(), -1.);
+ QCOMPARE(obj->reversingMode(), QDeclarativeEaseFollow::Immediate);
+
+ delete obj;
+}
+
+void tst_qdeclarativeeasefollow::disabled()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/easefollow3.qml"));
+ QDeclarativeEaseFollow *obj = qobject_cast<QDeclarativeEaseFollow*>(c.create());
+
+ QVERIFY(obj != 0);
+
+ QCOMPARE(obj->sourceValue(), 10.);
+ QCOMPARE(obj->velocity(), 250.);
+ QCOMPARE(obj->enabled(), false);
+ QCOMPARE(obj->maximumEasingTime(), 150.);
+ QCOMPARE(obj->reversingMode(), QDeclarativeEaseFollow::Sync);
+
+ delete obj;
+}
+
+QTEST_MAIN(tst_qdeclarativeeasefollow)
+
+#include "tst_qdeclarativeeasefollow.moc"
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/ConstantsOverrideBindings.qml b/tests/auto/declarative/qdeclarativeecmascript/data/ConstantsOverrideBindings.qml
new file mode 100644
index 0000000000..b4a702bbbe
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/ConstantsOverrideBindings.qml
@@ -0,0 +1,6 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ property int c1: 0
+ property int c2: c1
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/CustomObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/CustomObject.qml
new file mode 100644
index 0000000000..691d9ecb8f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/CustomObject.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+QtObject {
+ property string greeting: "hello world"
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/MethodsObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/MethodsObject.qml
new file mode 100644
index 0000000000..f51ca86633
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/MethodsObject.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+QtObject {
+ function testFunction() { return 19; }
+ function testFunction2() { return 18; }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml
new file mode 100644
index 0000000000..7c32e563b2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+
+QtObject {
+ property int b: obj.prop.a
+
+ property var prop;
+ prop: QtObject {
+ property int a: 10
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/ScopeObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/ScopeObject.qml
new file mode 100644
index 0000000000..b7bec63569
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/ScopeObject.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+Item {
+ property int a: 3
+ property int binding: myFunction();
+ property int binding2: myCompFunction();
+
+ Script {
+ function myCompFunction() {
+ return a;
+ }
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/TypeForDynamicCreation.qml b/tests/auto/declarative/qdeclarativeecmascript/data/TypeForDynamicCreation.qml
new file mode 100644
index 0000000000..56e06252c4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/TypeForDynamicCreation.qml
@@ -0,0 +1,2 @@
+import Qt.test 1.0
+MyQmlObject{objectName:"objectThree"}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasPropertyAndBinding.qml b/tests/auto/declarative/qdeclarativeecmascript/data/aliasPropertyAndBinding.qml
new file mode 100644
index 0000000000..5c3ea1fe16
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/aliasPropertyAndBinding.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+import Qt.test 1.0
+
+MyQmlObject {
+ property alias c1: myObject.c1
+ property int c2: 3
+ property int c3: c2
+ objectProperty: QtObject {
+ id: myObject
+ property int c1
+ }
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.2.qml
new file mode 100644
index 0000000000..db7f2b51c1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.2.qml
@@ -0,0 +1,26 @@
+import Qt.test 1.0
+
+MyTypeObject {
+ flagProperty: if(1) "FlagVal1 | FlagVal3"
+ enumProperty: if(1) "EnumVal2"
+ stringProperty: if(1) "Hello World!"
+ uintProperty: if(1) 10
+ intProperty: if(1) -19
+ realProperty: if(1) 23.2
+ doubleProperty: if(1) -19.7
+ floatProperty: if(1) 8.5
+ colorProperty: if(1) "red"
+ dateProperty: if(1) "1982-11-25"
+ timeProperty: if(1) "11:11:32"
+ dateTimeProperty: if(1) "2009-05-12T13:22:01"
+ pointProperty: if(1) "99,13"
+ pointFProperty: if(1) "-10.1,12.3"
+ sizeProperty: if(1) "99x13"
+ sizeFProperty: if(1) "0.1x0.2"
+ rectProperty: if(1) "9,7,100x200"
+ rectFProperty: if(1) "1000.1,-10.9,400x90.99"
+ boolProperty: if(1) true
+ variantProperty: if(1) "Hello World!"
+ vectorProperty: if(1) "10,1,2.2"
+ urlProperty: if(1) "main.qml"
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.qml b/tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.qml
new file mode 100644
index 0000000000..128db692fb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.qml
@@ -0,0 +1,29 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyTypeObject {
+ Component.onCompleted: {
+ flagProperty = "FlagVal1 | FlagVal3"
+ enumProperty = "EnumVal2"
+ stringProperty = "Hello World!"
+ uintProperty = 10
+ intProperty = -19
+ realProperty = 23.2
+ doubleProperty = -19.7
+ floatProperty = 8.5
+ colorProperty = "red"
+ dateProperty = "1982-11-25"
+ timeProperty = "11:11:32"
+ dateTimeProperty = "2009-05-12T13:22:01"
+ pointProperty = "99,13"
+ pointFProperty = "-10.1,12.3"
+ sizeProperty = "99x13"
+ sizeFProperty = "0.1x0.2"
+ rectProperty = "9,7,100x200"
+ rectFProperty = "1000.1,-10.9,400x90.99"
+ boolProperty = true
+ variantProperty = "Hello World!"
+ vectorProperty = "10,1,2.2"
+ urlProperty = "main.qml"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/attachedProperty.qml b/tests/auto/declarative/qdeclarativeecmascript/data/attachedProperty.qml
new file mode 100644
index 0000000000..061eda0e54
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/attachedProperty.qml
@@ -0,0 +1,11 @@
+import Qt.test 1.0
+import Qt.test 1.0 as Namespace
+
+MyQmlObject {
+ id: me
+ property int a: MyQmlObject.value
+ property int b: Namespace.MyQmlObject.value
+ property int c: me.Namespace.MyQmlObject.value
+ property int d: me.Namespace.MyQmlObject.value
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/attachedPropertyScope.qml b/tests/auto/declarative/qdeclarativeecmascript/data/attachedPropertyScope.qml
new file mode 100644
index 0000000000..4b5464d56e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/attachedPropertyScope.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+import Qt.test 1.0
+
+QtObject {
+ property int value: 9
+ property int value2
+
+ MyQmlObject.onMySignal: value2 = value
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/bindingLoop.qml b/tests/auto/declarative/qdeclarativeecmascript/data/bindingLoop.qml
new file mode 100644
index 0000000000..80545cf72b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/bindingLoop.qml
@@ -0,0 +1,14 @@
+import Qt.test 1.0
+
+MyQmlContainer {
+ children : [
+ MyQmlObject {
+ id: object1
+ stringProperty: "hello" + object2.stringProperty
+ },
+ MyQmlObject {
+ id: object2
+ stringProperty: "hello" + object1.stringProperty
+ }
+ ]
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/boolPropertiesEvaluateAsBool.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/boolPropertiesEvaluateAsBool.1.qml
new file mode 100644
index 0000000000..3147f63989
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/boolPropertiesEvaluateAsBool.1.qml
@@ -0,0 +1,5 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ stringProperty: trueProperty?'pass':'fail'
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/boolPropertiesEvaluateAsBool.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/boolPropertiesEvaluateAsBool.2.qml
new file mode 100644
index 0000000000..c89bb49b45
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/boolPropertiesEvaluateAsBool.2.qml
@@ -0,0 +1,5 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ stringProperty: falseProperty?'fail':'pass'
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/bug.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/bug.1.qml
new file mode 100644
index 0000000000..266de76b86
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/bug.1.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+QtObject {
+ property int a: 10
+ property bool b: false
+
+ property int test
+
+ test: ((a == 10)?(a + 1):0) + ((b == true)?9:3)
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/compositePropertyType.qml b/tests/auto/declarative/qdeclarativeecmascript/data/compositePropertyType.qml
new file mode 100644
index 0000000000..80a2814ef3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/compositePropertyType.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+QtObject {
+ property CustomObject myObject
+ myObject: CustomObject { }
+
+ Component.onCompleted: console.log(myObject.greeting)
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.1.qml
new file mode 100644
index 0000000000..13c5ae5fff
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.1.qml
@@ -0,0 +1,8 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ property int c1: 0
+ property int c2: c1
+
+ onBasicSignal: c2 = 13
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.2.qml
new file mode 100644
index 0000000000..207a06b700
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.2.qml
@@ -0,0 +1,11 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ property alias c1: myConstants.c1
+ property alias c2: myConstants.c2
+
+ objectProperty: ConstantsOverrideBindings {
+ id: myConstants
+ c2: 10
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.3.qml
new file mode 100644
index 0000000000..ca9d1d8ab9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.3.qml
@@ -0,0 +1,7 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ property int c1: 0
+ property int c2: c1
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/declarativeToString.qml b/tests/auto/declarative/qdeclarativeecmascript/data/declarativeToString.qml
new file mode 100644
index 0000000000..ac296ce293
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/declarativeToString.qml
@@ -0,0 +1,11 @@
+import Qt.test 1.0
+
+MyQmlObject{
+ id: obj
+ objectName: "objName"
+ function testToString()
+ {
+ obj.stringProperty = obj.toString();
+ }
+
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deferredProperties.qml b/tests/auto/declarative/qdeclarativeecmascript/data/deferredProperties.qml
new file mode 100644
index 0000000000..e01f708a07
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/deferredProperties.qml
@@ -0,0 +1,10 @@
+import Qt.test 1.0
+
+MyDeferredObject {
+ id: root
+ value: 10
+ objectProperty: MyQmlObject {
+ value: root.value
+ }
+ objectProperty2: MyQmlObject { id: blah }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml
new file mode 100644
index 0000000000..6bc3a17a3f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml
@@ -0,0 +1,25 @@
+import Qt 4.6
+import Qt.test 1.0
+
+QtObject {
+ property var obj
+ obj: MyQmlObject {
+ id: myObject
+ value: 92
+ }
+
+ property bool test1: false
+ property bool test2: false
+ property bool test3: false
+ property bool test4: false
+
+ Component.onCompleted: {
+ test1 = myObject.value == 92;
+ test2 = obj.value == 92;
+
+ myObject.deleteOnSet = 1;
+
+ test3 = myObject.value == undefined;
+ // test4 = obj.value == undefined;
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.helper.qml b/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.helper.qml
new file mode 100644
index 0000000000..d790d634e9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.helper.qml
@@ -0,0 +1,6 @@
+import Qt.test 1.0
+
+MyQmlObject{
+ objectName: "objectTwo"
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml b/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml
new file mode 100644
index 0000000000..ed5e571cb3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml
@@ -0,0 +1,21 @@
+import Qt.test 1.0
+
+MyQmlObject{
+ id: obj
+ objectName: "obj"
+ function createOne()
+ {
+ obj.objectProperty = createQmlObject('import Qt.test 1.0; MyQmlObject{objectName:"objectOne"}', obj);
+ }
+
+ function createTwo()
+ {
+ var component = createComponent('dynamicCreation.helper.qml');
+ obj.objectProperty = component.createObject();
+ }
+
+ function createThree()
+ {
+ obj.objectProperty = createQmlObject('TypeForDynamicCreation{}', obj);
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/dynamicDeletion.qml b/tests/auto/declarative/qdeclarativeecmascript/data/dynamicDeletion.qml
new file mode 100644
index 0000000000..0855b2915b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/dynamicDeletion.qml
@@ -0,0 +1,20 @@
+import Qt.test 1.0
+
+MyQmlObject{
+ id: obj
+ objectName: "obj"
+ function create()
+ {
+ obj.objectProperty = createQmlObject('import Qt.test 1.0; MyQmlObject{objectName:"emptyObject"}', obj);
+ }
+
+ function killOther()
+ {
+ obj.objectProperty.destroy(500);
+ }
+
+ function killMe()
+ {
+ obj.destroy();//Must not segfault
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/enums.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/enums.1.qml
new file mode 100644
index 0000000000..6351823230
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/enums.1.qml
@@ -0,0 +1,20 @@
+import Qt.test 1.0
+import Qt.test 1.0 as Namespace
+
+MyQmlObject {
+ // Enums from non-namespaced type
+ property int a: MyQmlObject.EnumValue1
+ property int b: MyQmlObject.EnumValue2
+ property int c: MyQmlObject.EnumValue3
+ property int d: MyQmlObject.EnumValue4
+
+ // Enums from namespaced type
+ property int e: Namespace.MyQmlObject.EnumValue1
+ property int f: Namespace.MyQmlObject.EnumValue2
+ property int g: Namespace.MyQmlObject.EnumValue3
+ property int h: Namespace.MyQmlObject.EnumValue4
+
+ // Test that enums don't mask attached properties
+ property int i: MyQmlObject.value
+ property int j: Namespace.MyQmlObject.value
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/enums.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/enums.2.qml
new file mode 100644
index 0000000000..bdc672fadc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/enums.2.qml
@@ -0,0 +1,8 @@
+import Qt.test 1.0
+import Qt.test 1.0 as Namespace
+
+MyQmlObject {
+ property int a: MyQmlObject.EnumValue10
+ property int b: Namespace.MyQmlObject.EnumValue10
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/exceptionClearsOnReeval.qml b/tests/auto/declarative/qdeclarativeecmascript/data/exceptionClearsOnReeval.qml
new file mode 100644
index 0000000000..a2f0d1a8b7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/exceptionClearsOnReeval.qml
@@ -0,0 +1,6 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ property bool test: objectProperty.objectProperty.trueProperty
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning.qml b/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning.qml
new file mode 100644
index 0000000000..acc3163837
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+import Qt.test 1.0
+
+MyQmlObject {
+ Component.onCompleted:
+ { throw(new Error("JS exception")) }
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning2.qml
new file mode 100644
index 0000000000..44e10c1ae0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning2.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+import Qt.test 1.0
+
+MyQmlObject {
+ value: { throw(new Error("JS exception")) }
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/extendedObjectPropertyLookup.qml b/tests/auto/declarative/qdeclarativeecmascript/data/extendedObjectPropertyLookup.qml
new file mode 100644
index 0000000000..9a82ad19d7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/extendedObjectPropertyLookup.qml
@@ -0,0 +1,8 @@
+import Qt.test 1.0
+import Qt 4.6
+
+QtObject {
+ property MyExtendedObject a;
+ a: MyExtendedObject { id: root }
+ property int b: Math.max(root.extendedProperty, 0)
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml b/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml
new file mode 100644
index 0000000000..a902312802
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml
@@ -0,0 +1,10 @@
+import Qt.test 1.0
+
+MyExtendedObject
+{
+ baseProperty: baseExtendedProperty
+ baseExtendedProperty: 13
+
+ coreProperty: extendedProperty
+ extendedProperty: 9
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.1.qml
new file mode 100644
index 0000000000..2ac7b6e57b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.1.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+
+QtObject {
+ property int test: external_script_func();
+
+ Script {
+ // Single source as non-array literal
+ source: "externalScript.js"
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.2.js b/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.2.js
new file mode 100644
index 0000000000..78c3a86859
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.2.js
@@ -0,0 +1,8 @@
+function external_script_func2() {
+ return a;
+}
+
+function is_a_undefined() {
+ return a == undefined;
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.2.qml
new file mode 100644
index 0000000000..dec657cb94
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.2.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+
+QtObject {
+ property int test: external_script_func();
+
+ Script {
+ // Single source as array
+ source: [ "externalScript.js" ]
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.3.qml
new file mode 100644
index 0000000000..d7acf3806e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.3.qml
@@ -0,0 +1,13 @@
+import Qt 4.6
+
+QtObject {
+ property int test: external_script_func();
+ property int test2: external_script_func2();
+ property bool test3: is_a_undefined();
+
+ Script {
+ // Multiple script
+ source: [ "externalScript.js", "externalScript.2.js" ]
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.4.qml
new file mode 100644
index 0000000000..16211aaeab
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.4.qml
@@ -0,0 +1,15 @@
+import Qt 4.6
+
+QtObject {
+ property int test: external_script_func();
+ property bool test2: is_a_undefined();
+
+ // Disconnected scripts
+ Script {
+ source: "externalScript.js"
+ }
+
+ Script {
+ source: "externalScript.2.js"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.js b/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.js
new file mode 100644
index 0000000000..892865299f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/externalScript.js
@@ -0,0 +1,6 @@
+var a = 92;
+
+function external_script_func() {
+ return a;
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml
new file mode 100644
index 0000000000..2db0fc6050
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml
@@ -0,0 +1,13 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ objectProperty: if(1) otherObject
+
+ property var obj
+
+ obj: QtObject {
+ id: otherObject
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml b/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml
new file mode 100644
index 0000000000..f66428d419
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml
@@ -0,0 +1,12 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ objectProperty: otherObject
+
+ property var obj
+
+ obj: QtObject {
+ id: otherObject
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/jsObject.qml
new file mode 100644
index 0000000000..4128c92679
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/jsObject.qml
@@ -0,0 +1,12 @@
+import Qt 4.6
+
+QtObject {
+ property int test
+
+ Component.onCompleted: {
+ var o = new Object;
+ o.test = 92;
+ test = o.test;
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml b/tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml
new file mode 100644
index 0000000000..810f9b6d7a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml
@@ -0,0 +1,27 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ id: root
+
+ objectListProperty: [
+ QtObject { property int a: 10 },
+ QtObject { property int a: 11 }
+ ]
+
+ Script {
+ function calcTest1() {
+ var rv = 0;
+ for (var ii = 0; ii < root.objectListProperty.length; ++ii) {
+ rv += root.objectListProperty[ii].a;
+ }
+ return rv;
+ }
+
+ }
+
+ property int test1: calcTest1();
+ property int test2: root.objectListProperty.length
+ property bool test3: root.objectListProperty[1] != undefined
+ property bool test4: root.objectListProperty[100] == undefined
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml b/tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml
new file mode 100644
index 0000000000..47f4e50873
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+QtObject {
+ property var test: children
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/methods.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/methods.1.qml
new file mode 100644
index 0000000000..0bbee16df8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/methods.1.qml
@@ -0,0 +1,6 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ id: myObject
+ onBasicSignal: myObject.methodNoArgs()
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/methods.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/methods.2.qml
new file mode 100644
index 0000000000..9f0c6b15fe
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/methods.2.qml
@@ -0,0 +1,6 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ id: myObject
+ onBasicSignal: myObject.method(163)
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/methods.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/methods.3.qml
new file mode 100644
index 0000000000..79efc508d7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/methods.3.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+QtObject {
+ function testFunction() { return 19; }
+
+ property int test: testFunction()
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/methods.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/methods.4.qml
new file mode 100644
index 0000000000..aac711cbd4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/methods.4.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+
+MethodsObject {
+ function testFunction2() { return 17; }
+ function testFunction3() { return 16; }
+
+ property int test: testFunction()
+ property int test2: testFunction2()
+ property int test3: testFunction3()
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml b/tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml
new file mode 100644
index 0000000000..5ba324adf0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+Item {
+ property alias blah: item.x
+ Item { id: item }
+
+ function testFunction() { return 9; }
+ property int test: testFunction();
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/multiEngineObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/multiEngineObject.qml
new file mode 100644
index 0000000000..7da09e4701
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/multiEngineObject.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+QtObject {
+ property string test: thing.stringProperty
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/nonExistantAttachedObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/nonExistantAttachedObject.qml
new file mode 100644
index 0000000000..f9585db009
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/nonExistantAttachedObject.qml
@@ -0,0 +1,5 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ stringProperty: MyQmlContainer.prop
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml b/tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml
new file mode 100644
index 0000000000..18e488a1cb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml
@@ -0,0 +1,15 @@
+import Qt 4.6
+
+Item {
+ id: root
+
+ property var item: child
+ Item { id: child }
+
+ property bool test1: child == child
+ property bool test2: child.parent == root
+ property bool test3: root != child
+ property bool test4: item == child
+ property bool test5: item != root
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/outerBindingOverridesInnerBinding.qml b/tests/auto/declarative/qdeclarativeecmascript/data/outerBindingOverridesInnerBinding.qml
new file mode 100644
index 0000000000..0a933e86f2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/outerBindingOverridesInnerBinding.qml
@@ -0,0 +1,14 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ property alias c1: myConstants.c1
+ property alias c2: myConstants.c2
+ property int c3: 0
+
+ objectProperty: ConstantsOverrideBindings {
+ id: myConstants
+ c2: c3
+ }
+
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scope.2.qml
new file mode 100644
index 0000000000..8e5aa0b26f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scope.2.qml
@@ -0,0 +1,42 @@
+import Qt 4.6
+
+Item {
+ property int a: 0
+ property int b: 0
+
+ Script {
+ function b() { return 11; }
+ function c() { return 33; }
+ }
+
+ QtObject {
+ id: a
+ property int value: 19
+ }
+
+ QtObject {
+ id: c
+ property int value: 24
+ }
+
+ QtObject {
+ id: nested
+ property int a: 1
+ property int test: a.value
+ property int test2: b()
+ property int test3: c.value
+ }
+
+
+ // id takes precedence over local, and root properties
+ property int test1: a.value
+ property alias test2: nested.test
+
+ // methods takes precedence over local, and root properties
+ property int test3: b()
+ property alias test4: nested.test2
+
+ // id takes precedence over methods
+ property int test5: c.value
+ property alias test6: nested.test3
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml
new file mode 100644
index 0000000000..4ad7f340a0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml
@@ -0,0 +1,13 @@
+import Qt 4.6
+
+Item {
+ id: root
+
+ property int foo: 12
+ property int console: 11
+
+ property bool test1: foo == 12
+ property bool test2: console != 11
+ property bool test3: root.console == 11
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scope.4.qml
new file mode 100644
index 0000000000..d65b6e7c7c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scope.4.qml
@@ -0,0 +1,12 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ id: a
+ property int b: 9
+
+ property int test
+ property string test2
+
+ // Should resolve to signal arguments, not to other elements in the file
+ onArgumentSignal: { test = a; test2 = b; }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scope.qml
new file mode 100644
index 0000000000..cccd3d38d0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scope.qml
@@ -0,0 +1,48 @@
+import Qt 4.6
+
+Item {
+ id: root
+
+ property int a: 1
+ property int binding: a
+ property string binding2: a + "Test"
+ property int binding3: myFunction()
+ property int binding4: myNestedFunction()
+
+ Script {
+ function myFunction() {
+ return a;
+ }
+ }
+
+ Item {
+ id: nestedObject
+
+ Script {
+ function myNestedFunction() {
+ return a;
+ }
+ }
+
+ property int a: 2
+ property int binding: a
+ property string binding2: a + "Test"
+ property int binding3: myFunction()
+ property int binding4: myNestedFunction()
+ }
+
+ ScopeObject {
+ id: compObject
+ }
+
+ property alias test1: root.binding
+ property alias test2: nestedObject.binding
+ property alias test3: root.binding2
+ property alias test4: nestedObject.binding2
+ property alias test5: root.binding3
+ property alias test6: nestedObject.binding3
+ property alias test7: root.binding4
+ property alias test8: nestedObject.binding4
+ property alias test9: compObject.binding
+ property alias test10: compObject.binding2
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptAccess.js b/tests/auto/declarative/qdeclarativeecmascript/data/scriptAccess.js
new file mode 100644
index 0000000000..c00d28500e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptAccess.js
@@ -0,0 +1,7 @@
+var extVariable = 19;
+
+function extMethod()
+{
+ return extVariable;
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptAccess.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptAccess.qml
new file mode 100644
index 0000000000..feb6d167dd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptAccess.qml
@@ -0,0 +1,17 @@
+import Qt 4.6
+
+Item {
+ Script {
+ function method() {
+ return 10;
+ }
+ }
+
+ Script {
+ source: "scriptAccess.js"
+ }
+
+ property int test1: method()
+ property int test2: extMethod()
+ property int test3: extVariable
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml
new file mode 100644
index 0000000000..2bdd706922
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml
@@ -0,0 +1,16 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property bool test: false
+
+ id: root
+
+ Script {
+ function testFunction() {
+ test = true;
+ }
+ }
+
+ Component.onCompleted: root.argumentSignal.connect(testFunction);
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml
new file mode 100644
index 0000000000..fa90918d5e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml
@@ -0,0 +1,22 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property bool test: false
+
+ id: root
+
+ Script {
+ function testFunction() {
+ if (this.b == 12)
+ test = true;
+ }
+ }
+
+ Component.onCompleted: {
+ var a = new Object;
+ a.b = 12;
+ root.argumentSignal.connect(a, testFunction);
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml
new file mode 100644
index 0000000000..0d8e6efda0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml
@@ -0,0 +1,15 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property bool test: false
+
+ id: root
+
+ function testFunction() {
+ test = true;
+ }
+
+ Component.onCompleted: root.argumentSignal.connect(testFunction);
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml
new file mode 100644
index 0000000000..3e1ff1b6c1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml
@@ -0,0 +1,12 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property bool test: false
+
+ id: root
+
+ Component.onCompleted: root.argumentSignal.connect(methodNoArgs);
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml
new file mode 100644
index 0000000000..3ad5cbc95d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml
@@ -0,0 +1,11 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property bool test: false
+
+ id: root
+
+ Component.onCompleted: root.argumentSignal.connect(root, methodNoArgs);
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml
new file mode 100644
index 0000000000..8c35db1f6e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml
@@ -0,0 +1,20 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property int test: 0
+
+ id: root
+
+ Script {
+ function testFunction() {
+ test++;
+ }
+ }
+
+ Component.onCompleted: {
+ root.argumentSignal.connect(testFunction);
+ root.argumentSignal.connect(testFunction);
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml
new file mode 100644
index 0000000000..45c4f738bd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml
@@ -0,0 +1,18 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property int test: 0
+
+ id: root
+
+ Script {
+ function testFunction() {
+ test++;
+ }
+ }
+
+ Component.onCompleted: root.argumentSignal.connect(testFunction);
+
+ onBasicSignal: root.argumentSignal.disconnect(testFunction);
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml
new file mode 100644
index 0000000000..a47fe74eda
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml
@@ -0,0 +1,19 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property int test: 0
+
+ id: root
+
+ Script {
+ function testFunction() {
+ test++;
+ }
+ }
+
+ Component.onCompleted: root.argumentSignal.connect(root, testFunction);
+
+ onBasicSignal: root.argumentSignal.disconnect(root, testFunction);
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml
new file mode 100644
index 0000000000..c95ffbf27d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml
@@ -0,0 +1,19 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property int test: 0
+
+ id: root
+
+ Script {
+ function testFunction() {
+ test++;
+ }
+ }
+
+ Component.onCompleted: root.argumentSignal.connect(root, testFunction);
+
+ onBasicSignal: root.argumentSignal.disconnect(testFunction);
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml
new file mode 100644
index 0000000000..342f24aa2c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml
@@ -0,0 +1,20 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property int test: 0
+
+ id: root
+
+ Script {
+ function testFunction() {
+ test++;
+ }
+ function otherFunction() {
+ }
+ }
+
+ Component.onCompleted: root.argumentSignal.connect(testFunction);
+
+ onBasicSignal: root.argumentSignal.disconnect(otherFunction);
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.js b/tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.js
new file mode 100644
index 0000000000..1d7b35704d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.js
@@ -0,0 +1,2 @@
+// Comment
+a = 10
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.qml
new file mode 100644
index 0000000000..c2edb416ac
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptErrors.qml
@@ -0,0 +1,17 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ Script { source: "scriptErrors.js" }
+ Script { function getValue() { a = 10; return 0; } }
+
+ property int t: a.value
+ property int w: getValue();
+ property int x: undefinedObject
+ property int y: (a.value, undefinedObject)
+
+ onBasicSignal: { console.log(a.value); }
+ id: myObj
+ onAnotherBasicSignal: myObj.trueProperty = false;
+ onThirdBasicSignal: myObj.fakeProperty = "";
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.1.qml
new file mode 100644
index 0000000000..9b11fa9ed9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.1.qml
@@ -0,0 +1,13 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ property string result
+
+ Script{
+ function f() {
+ result = b
+ }
+
+ }
+ onArgumentSignal: f()
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.2.qml
new file mode 100644
index 0000000000..ec727e23d8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.2.qml
@@ -0,0 +1,11 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ property string result
+ property string aProp: "hello"
+
+ Script{
+ source: "scriptScope.js"
+ }
+ onBasicSignal: f()
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.js b/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.js
new file mode 100644
index 0000000000..568993023f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptScope.js
@@ -0,0 +1,5 @@
+var aProp = "world";
+
+function f() {
+ result = aProp;
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/selfDeletingBinding.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/selfDeletingBinding.2.qml
new file mode 100644
index 0000000000..58cf8051f0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/selfDeletingBinding.2.qml
@@ -0,0 +1,17 @@
+import Qt.test 1.0
+
+MyQmlContainer {
+ property bool triggerDelete: false
+
+ children: [
+ MyQmlObject {
+ // Will trigger deletion on binding assignment
+ deleteOnSet: Math.max(0, 1)
+ },
+
+ MyQmlObject {
+ // Will trigger deletion on binding assignment, but after component creation
+ deleteOnSet: if (triggerDelete) 1; else 0;
+ }
+ ]
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/selfDeletingBinding.qml b/tests/auto/declarative/qdeclarativeecmascript/data/selfDeletingBinding.qml
new file mode 100644
index 0000000000..074851a67b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/selfDeletingBinding.qml
@@ -0,0 +1,18 @@
+import Qt.test 1.0
+
+MyQmlContainer {
+ property bool triggerDelete: false
+
+ children: [
+ MyQmlObject {
+ // Will trigger deletion during binding evaluation
+ stringProperty: {deleteMe(), "Hello"}
+ },
+
+ MyQmlObject {
+ // Will trigger deletion during binding evaluation, but after component creation
+ stringProperty: if (triggerDelete) { deleteMe(), "Hello" } else { "World" }
+ }
+
+ ]
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/shutdownErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/shutdownErrors.qml
new file mode 100644
index 0000000000..5a1963910d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/shutdownErrors.qml
@@ -0,0 +1,13 @@
+import Qt 4.6
+
+Item {
+ property int test: myObject.object.a
+
+ Item {
+ id: myObject
+ property QtObject object;
+ object: QtObject {
+ property int a: 10
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/signalAssignment.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/signalAssignment.1.qml
new file mode 100644
index 0000000000..fbd09142f7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/signalAssignment.1.qml
@@ -0,0 +1,5 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ onBasicSignal: setString('pass')
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/signalAssignment.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/signalAssignment.2.qml
new file mode 100644
index 0000000000..8addcb9125
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/signalAssignment.2.qml
@@ -0,0 +1,5 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ onArgumentSignal: setString('pass ' + a + ' ' + b + ' ' + c)
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/signalParameterTypes.qml b/tests/auto/declarative/qdeclarativeecmascript/data/signalParameterTypes.qml
new file mode 100644
index 0000000000..6fc8b02664
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/signalParameterTypes.qml
@@ -0,0 +1,16 @@
+import Qt.test 1.0
+
+MyQmlObject
+{
+ id: root
+ property int intProperty
+ property real realProperty
+ property color colorProperty
+ property var variantProperty
+
+ signal mySignal(int a, real b, color c, var d)
+
+ onMySignal: { intProperty = a; realProperty = b; colorProperty = c; variantProperty = d; }
+
+ onBasicSignal: root.mySignal(10, 19.2, Qt.rgba(1, 1, 0, 1), Qt.rgba(1, 0, 1, 1))
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/signalTriggeredBindings.qml b/tests/auto/declarative/qdeclarativeecmascript/data/signalTriggeredBindings.qml
new file mode 100644
index 0000000000..7d419cd7e8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/signalTriggeredBindings.qml
@@ -0,0 +1,20 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property real base: 50
+ property alias test1: myObject.test1
+ property alias test2: myObject.test2
+
+ objectProperty: QtObject {
+ id: myObject
+ property real test1: base
+ property real test2: Math.max(0, base)
+ }
+
+ // Signal with no args
+ onBasicSignal: base = 200
+ // Signal with args
+ onArgumentSignal: base = 400
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml
new file mode 100644
index 0000000000..fa7e01c81b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+QtObject {
+ property var obj: nested
+
+ property var obj2
+ obj2: NestedTypeTransientErrors {
+ id: nested
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/undefinedResetsProperty.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/undefinedResetsProperty.2.qml
new file mode 100644
index 0000000000..e73d38e2ce
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/undefinedResetsProperty.2.qml
@@ -0,0 +1,10 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ resettableProperty: 19
+
+ function doReset() {
+ resettableProperty = undefined;
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/undefinedResetsProperty.qml b/tests/auto/declarative/qdeclarativeecmascript/data/undefinedResetsProperty.qml
new file mode 100644
index 0000000000..eceff60aa1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/undefinedResetsProperty.qml
@@ -0,0 +1,7 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ property bool setUndefined: false
+
+ resettableProperty: setUndefined?undefined:92
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/valueTypeFunctions.qml b/tests/auto/declarative/qdeclarativeecmascript/data/valueTypeFunctions.qml
new file mode 100644
index 0000000000..33b4a68c40
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/valueTypeFunctions.qml
@@ -0,0 +1,6 @@
+import Qt.test 1.0
+
+MyTypeObject {
+ rectProperty: Qt.rect(0,0,100,100)
+ rectFProperty: Qt.rect(0,0.5,100,99.5)
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro b/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
new file mode 100644
index 0000000000..0e21cb2399
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
@@ -0,0 +1,10 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative script
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativeecmascript.cpp \
+ testtypes.cpp
+HEADERS += testtypes.h
+
+# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
+# LIBS += -lgcov
diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp b/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp
new file mode 100644
index 0000000000..6a047049f8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "testtypes.h"
+
+class BaseExtensionObject : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int baseExtendedProperty READ extendedProperty WRITE setExtendedProperty NOTIFY extendedPropertyChanged);
+public:
+ BaseExtensionObject(QObject *parent) : QObject(parent), m_value(0) {}
+
+ int extendedProperty() const { return m_value; }
+ void setExtendedProperty(int v) { m_value = v; emit extendedPropertyChanged(); }
+
+signals:
+ void extendedPropertyChanged();
+private:
+ int m_value;
+};
+
+class ExtensionObject : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int extendedProperty READ extendedProperty WRITE setExtendedProperty NOTIFY extendedPropertyChanged);
+public:
+ ExtensionObject(QObject *parent) : QObject(parent), m_value(0) {}
+
+ int extendedProperty() const { return m_value; }
+ void setExtendedProperty(int v) { m_value = v; emit extendedPropertyChanged(); }
+
+signals:
+ void extendedPropertyChanged();
+private:
+ int m_value;
+};
+
+void registerTypes()
+{
+ QML_REGISTER_TYPE(Qt.test, 1,0, MyQmlObject,MyQmlObject);
+ QML_REGISTER_TYPE(Qt.test, 1,0, MyDeferredObject,MyDeferredObject);
+ QML_REGISTER_TYPE(Qt.test, 1,0, MyQmlContainer,MyQmlContainer);
+ QML_REGISTER_EXTENDED_TYPE(Qt.test, 1,0, MyBaseExtendedObject,MyBaseExtendedObject,BaseExtensionObject);
+ QML_REGISTER_EXTENDED_TYPE(Qt.test, 1,0, MyExtendedObject,MyExtendedObject,ExtensionObject);
+ QML_REGISTER_TYPE(Qt.test, 1,0, MyTypeObject, MyTypeObject);
+}
+
+#include "testtypes.moc"
diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
new file mode 100644
index 0000000000..a283e3f31b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
@@ -0,0 +1,609 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef TESTTYPES_H
+#define TESTTYPES_H
+
+#include <QtCore/qobject.h>
+#include <QtDeclarative/qdeclarative.h>
+#include <QtDeclarative/qdeclarativeexpression.h>
+#include <QtCore/qpoint.h>
+#include <QtCore/qsize.h>
+#include <QtDeclarative/qdeclarativelist.h>
+#include <QtCore/qrect.h>
+#include <QtGui/qmatrix.h>
+#include <QtGui/qcolor.h>
+#include <QtGui/qvector3d.h>
+#include <QtCore/qdatetime.h>
+#include <QtScript/qscriptvalue.h>
+#include <QtDeclarative/qdeclarativescriptstring.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+
+class MyQmlAttachedObject : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int value READ value CONSTANT)
+ Q_PROPERTY(int value2 READ value2 WRITE setValue2)
+public:
+ MyQmlAttachedObject(QObject *parent) : QObject(parent), m_value2(0) {}
+
+ int value() const { return 19; }
+ int value2() const { return m_value2; }
+ void setValue2(int v) { m_value2 = v; }
+
+ void emitMySignal() { emit mySignal(); }
+
+signals:
+ void mySignal();
+
+private:
+ int m_value2;
+};
+
+class MyQmlObject : public QObject
+{
+ Q_OBJECT
+ Q_ENUMS(MyEnum)
+ Q_ENUMS(MyEnum2)
+ Q_PROPERTY(int deleteOnSet READ deleteOnSet WRITE setDeleteOnSet)
+ Q_PROPERTY(bool trueProperty READ trueProperty CONSTANT)
+ Q_PROPERTY(bool falseProperty READ falseProperty CONSTANT)
+ Q_PROPERTY(int value READ value WRITE setValue)
+ Q_PROPERTY(QString stringProperty READ stringProperty WRITE setStringProperty NOTIFY stringChanged)
+ Q_PROPERTY(QObject *objectProperty READ objectProperty WRITE setObjectProperty NOTIFY objectChanged)
+ Q_PROPERTY(QDeclarativeListProperty<QObject> objectListProperty READ objectListProperty CONSTANT)
+ Q_PROPERTY(int resettableProperty READ resettableProperty WRITE setResettableProperty RESET resetProperty)
+
+public:
+ MyQmlObject(): m_methodCalled(false), m_methodIntCalled(false), m_object(0), m_value(0), m_resetProperty(13) {}
+
+ enum MyEnum { EnumValue1 = 0, EnumValue2 = 1 };
+ enum MyEnum2 { EnumValue3 = 2, EnumValue4 = 3 };
+
+ bool trueProperty() const { return true; }
+ bool falseProperty() const { return false; }
+
+ QString stringProperty() const { return m_string; }
+ void setStringProperty(const QString &s)
+ {
+ if (s == m_string)
+ return;
+ m_string = s;
+ emit stringChanged();
+ }
+
+ QObject *objectProperty() const { return m_object; }
+ void setObjectProperty(QObject *obj) {
+ if (obj == m_object)
+ return;
+ m_object = obj;
+ emit objectChanged();
+ }
+
+ QDeclarativeListProperty<QObject> objectListProperty() { return QDeclarativeListProperty<QObject>(this, m_objectQList); }
+
+ bool methodCalled() const { return m_methodCalled; }
+ bool methodIntCalled() const { return m_methodIntCalled; }
+
+ QString string() const { return m_string; }
+
+ static MyQmlAttachedObject *qmlAttachedProperties(QObject *o) {
+ return new MyQmlAttachedObject(o);
+ }
+
+ int deleteOnSet() const { return 1; }
+ void setDeleteOnSet(int v) { if(v) delete this; }
+
+ int value() const { return m_value; }
+ void setValue(int v) { m_value = v; }
+
+ int resettableProperty() const { return m_resetProperty; }
+ void setResettableProperty(int v) { m_resetProperty = v; }
+ void resetProperty() { m_resetProperty = 13; }
+
+signals:
+ void basicSignal();
+ void argumentSignal(int a, QString b, qreal c);
+ void stringChanged();
+ void objectChanged();
+ void anotherBasicSignal();
+ void thirdBasicSignal();
+
+public slots:
+ void deleteMe() { delete this; }
+ void methodNoArgs() { m_methodCalled = true; }
+ void method(int a) { if(a == 163) m_methodIntCalled = true; }
+ void setString(const QString &s) { m_string = s; }
+
+private:
+ friend class tst_qdeclarativeecmascript;
+ bool m_methodCalled;
+ bool m_methodIntCalled;
+
+ QObject *m_object;
+ QString m_string;
+ QList<QObject *> m_objectQList;
+ int m_value;
+ int m_resetProperty;
+};
+
+QML_DECLARE_TYPEINFO(MyQmlObject, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(MyQmlObject);
+
+class MyQmlContainer : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QDeclarativeListProperty<MyQmlObject> children READ children CONSTANT)
+public:
+ MyQmlContainer() {}
+
+ QDeclarativeListProperty<MyQmlObject> children() { return QDeclarativeListProperty<MyQmlObject>(this, m_children); }
+
+private:
+ QList<MyQmlObject*> m_children;
+};
+
+QML_DECLARE_TYPE(MyQmlContainer);
+
+class MyExpression : public QDeclarativeExpression
+{
+ Q_OBJECT
+public:
+ MyExpression(QDeclarativeContext *ctxt, const QString &expr)
+ : QDeclarativeExpression(ctxt, expr, 0), changed(false)
+ {
+ QObject::connect(this, SIGNAL(valueChanged()), this, SLOT(expressionValueChanged()));
+ setNotifyOnValueChanged(true);
+ }
+
+ bool changed;
+
+public slots:
+ void expressionValueChanged() {
+ changed = true;
+ }
+};
+
+
+class MyDefaultObject1 : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int horseLegs READ horseLegs CONSTANT);
+ Q_PROPERTY(int antLegs READ antLegs CONSTANT);
+public:
+ int horseLegs() const { return 4; }
+ int antLegs() const { return 6; }
+};
+
+class MyDefaultObject2 : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int antLegs READ antLegs CONSTANT);
+ Q_PROPERTY(int emuLegs READ emuLegs CONSTANT);
+public:
+ int antLegs() const { return 5; } // Had an accident
+ int emuLegs() const { return 2; }
+};
+
+class MyDefaultObject3 : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int antLegs READ antLegs CONSTANT);
+ Q_PROPERTY(int humanLegs READ humanLegs CONSTANT);
+public:
+ int antLegs() const { return 7; } // Mutant
+ int humanLegs() const { return 2; }
+ int millipedeLegs() const { return 1000; }
+};
+
+class MyDeferredObject : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged)
+ Q_PROPERTY(QObject *objectProperty READ objectProperty WRITE setObjectProperty);
+ Q_PROPERTY(QObject *objectProperty2 READ objectProperty2 WRITE setObjectProperty2);
+ Q_CLASSINFO("DeferredPropertyNames", "value,objectProperty,objectProperty2");
+
+public:
+ MyDeferredObject() : m_value(0), m_object(0), m_object2(0) {}
+
+ int value() const { return m_value; }
+ void setValue(int v) { m_value = v; emit valueChanged(); }
+
+ QObject *objectProperty() const { return m_object; }
+ void setObjectProperty(QObject *obj) { m_object = obj; }
+
+ QObject *objectProperty2() const { return m_object2; }
+ void setObjectProperty2(QObject *obj) { m_object2 = obj; }
+
+signals:
+ void valueChanged();
+
+private:
+ int m_value;
+ QObject *m_object;
+ QObject *m_object2;
+};
+QML_DECLARE_TYPE(MyDeferredObject);
+
+class MyBaseExtendedObject : public QObject
+{
+Q_OBJECT
+Q_PROPERTY(int baseProperty READ baseProperty WRITE setBaseProperty);
+public:
+ MyBaseExtendedObject() : m_value(0) {}
+
+ int baseProperty() const { return m_value; }
+ void setBaseProperty(int v) { m_value = v; }
+
+private:
+ int m_value;
+};
+QML_DECLARE_TYPE(MyBaseExtendedObject);
+
+class MyExtendedObject : public MyBaseExtendedObject
+{
+Q_OBJECT
+Q_PROPERTY(int coreProperty READ coreProperty WRITE setCoreProperty);
+public:
+ MyExtendedObject() : m_value(0) {}
+
+ int coreProperty() const { return m_value; }
+ void setCoreProperty(int v) { m_value = v; }
+
+private:
+ int m_value;
+};
+QML_DECLARE_TYPE(MyExtendedObject);
+
+class MyTypeObject : public QObject
+{
+ Q_OBJECT
+ Q_ENUMS(MyEnum)
+ Q_FLAGS(MyFlags)
+
+ Q_PROPERTY(QString id READ id WRITE setId);
+ Q_PROPERTY(QObject *objectProperty READ objectProperty WRITE setObjectProperty);
+ Q_PROPERTY(QDeclarativeComponent *componentProperty READ componentProperty WRITE setComponentProperty);
+ Q_PROPERTY(MyFlags flagProperty READ flagProperty WRITE setFlagProperty);
+ Q_PROPERTY(MyEnum enumProperty READ enumProperty WRITE setEnumProperty);
+ Q_PROPERTY(QString stringProperty READ stringProperty WRITE setStringProperty);
+ Q_PROPERTY(uint uintProperty READ uintProperty WRITE setUintProperty);
+ Q_PROPERTY(int intProperty READ intProperty WRITE setIntProperty);
+ Q_PROPERTY(qreal realProperty READ realProperty WRITE setRealProperty);
+ Q_PROPERTY(double doubleProperty READ doubleProperty WRITE setDoubleProperty);
+ Q_PROPERTY(float floatProperty READ floatProperty WRITE setFloatProperty);
+ Q_PROPERTY(QColor colorProperty READ colorProperty WRITE setColorProperty);
+ Q_PROPERTY(QDate dateProperty READ dateProperty WRITE setDateProperty);
+ Q_PROPERTY(QTime timeProperty READ timeProperty WRITE setTimeProperty);
+ Q_PROPERTY(QDateTime dateTimeProperty READ dateTimeProperty WRITE setDateTimeProperty);
+ Q_PROPERTY(QPoint pointProperty READ pointProperty WRITE setPointProperty);
+ Q_PROPERTY(QPointF pointFProperty READ pointFProperty WRITE setPointFProperty);
+ Q_PROPERTY(QSize sizeProperty READ sizeProperty WRITE setSizeProperty);
+ Q_PROPERTY(QSizeF sizeFProperty READ sizeFProperty WRITE setSizeFProperty);
+ Q_PROPERTY(QRect rectProperty READ rectProperty WRITE setRectProperty NOTIFY rectPropertyChanged);
+ Q_PROPERTY(QRect rectProperty2 READ rectProperty2 WRITE setRectProperty2);
+ Q_PROPERTY(QRectF rectFProperty READ rectFProperty WRITE setRectFProperty);
+ Q_PROPERTY(bool boolProperty READ boolProperty WRITE setBoolProperty);
+ Q_PROPERTY(QVariant variantProperty READ variantProperty WRITE setVariantProperty);
+ Q_PROPERTY(QVector3D vectorProperty READ vectorProperty WRITE setVectorProperty);
+ Q_PROPERTY(QUrl urlProperty READ urlProperty WRITE setUrlProperty);
+
+ Q_PROPERTY(QDeclarativeScriptString scriptProperty READ scriptProperty WRITE setScriptProperty);
+
+public:
+ MyTypeObject()
+ : objectPropertyValue(0), componentPropertyValue(0) {}
+
+ QString idValue;
+ QString id() const {
+ return idValue;
+ }
+ void setId(const QString &v) {
+ idValue = v;
+ }
+
+ QObject *objectPropertyValue;
+ QObject *objectProperty() const {
+ return objectPropertyValue;
+ }
+ void setObjectProperty(QObject *v) {
+ objectPropertyValue = v;
+ }
+
+ QDeclarativeComponent *componentPropertyValue;
+ QDeclarativeComponent *componentProperty() const {
+ return componentPropertyValue;
+ }
+ void setComponentProperty(QDeclarativeComponent *v) {
+ componentPropertyValue = v;
+ }
+
+ enum MyFlag { FlagVal1 = 0x01, FlagVal2 = 0x02, FlagVal3 = 0x04 };
+ Q_DECLARE_FLAGS(MyFlags, MyFlag)
+ MyFlags flagPropertyValue;
+ MyFlags flagProperty() const {
+ return flagPropertyValue;
+ }
+ void setFlagProperty(MyFlags v) {
+ flagPropertyValue = v;
+ }
+
+ enum MyEnum { EnumVal1, EnumVal2 };
+ MyEnum enumPropertyValue;
+ MyEnum enumProperty() const {
+ return enumPropertyValue;
+ }
+ void setEnumProperty(MyEnum v) {
+ enumPropertyValue = v;
+ }
+
+ QString stringPropertyValue;
+ QString stringProperty() const {
+ return stringPropertyValue;
+ }
+ void setStringProperty(const QString &v) {
+ stringPropertyValue = v;
+ }
+
+ uint uintPropertyValue;
+ uint uintProperty() const {
+ return uintPropertyValue;
+ }
+ void setUintProperty(const uint &v) {
+ uintPropertyValue = v;
+ }
+
+ int intPropertyValue;
+ int intProperty() const {
+ return intPropertyValue;
+ }
+ void setIntProperty(const int &v) {
+ intPropertyValue = v;
+ }
+
+ qreal realPropertyValue;
+ qreal realProperty() const {
+ return realPropertyValue;
+ }
+ void setRealProperty(const qreal &v) {
+ realPropertyValue = v;
+ }
+
+ double doublePropertyValue;
+ double doubleProperty() const {
+ return doublePropertyValue;
+ }
+ void setDoubleProperty(const double &v) {
+ doublePropertyValue = v;
+ }
+
+ float floatPropertyValue;
+ float floatProperty() const {
+ return floatPropertyValue;
+ }
+ void setFloatProperty(const float &v) {
+ floatPropertyValue = v;
+ }
+
+ QColor colorPropertyValue;
+ QColor colorProperty() const {
+ return colorPropertyValue;
+ }
+ void setColorProperty(const QColor &v) {
+ colorPropertyValue = v;
+ }
+
+ QDate datePropertyValue;
+ QDate dateProperty() const {
+ return datePropertyValue;
+ }
+ void setDateProperty(const QDate &v) {
+ datePropertyValue = v;
+ }
+
+ QTime timePropertyValue;
+ QTime timeProperty() const {
+ return timePropertyValue;
+ }
+ void setTimeProperty(const QTime &v) {
+ timePropertyValue = v;
+ }
+
+ QDateTime dateTimePropertyValue;
+ QDateTime dateTimeProperty() const {
+ return dateTimePropertyValue;
+ }
+ void setDateTimeProperty(const QDateTime &v) {
+ dateTimePropertyValue = v;
+ }
+
+ QPoint pointPropertyValue;
+ QPoint pointProperty() const {
+ return pointPropertyValue;
+ }
+ void setPointProperty(const QPoint &v) {
+ pointPropertyValue = v;
+ }
+
+ QPointF pointFPropertyValue;
+ QPointF pointFProperty() const {
+ return pointFPropertyValue;
+ }
+ void setPointFProperty(const QPointF &v) {
+ pointFPropertyValue = v;
+ }
+
+ QSize sizePropertyValue;
+ QSize sizeProperty() const {
+ return sizePropertyValue;
+ }
+ void setSizeProperty(const QSize &v) {
+ sizePropertyValue = v;
+ }
+
+ QSizeF sizeFPropertyValue;
+ QSizeF sizeFProperty() const {
+ return sizeFPropertyValue;
+ }
+ void setSizeFProperty(const QSizeF &v) {
+ sizeFPropertyValue = v;
+ }
+
+ QRect rectPropertyValue;
+ QRect rectProperty() const {
+ return rectPropertyValue;
+ }
+ void setRectProperty(const QRect &v) {
+ rectPropertyValue = v;
+ emit rectPropertyChanged();
+ }
+
+ QRect rectPropertyValue2;
+ QRect rectProperty2() const {
+ return rectPropertyValue2;
+ }
+ void setRectProperty2(const QRect &v) {
+ rectPropertyValue2 = v;
+ }
+
+ QRectF rectFPropertyValue;
+ QRectF rectFProperty() const {
+ return rectFPropertyValue;
+ }
+ void setRectFProperty(const QRectF &v) {
+ rectFPropertyValue = v;
+ }
+
+ bool boolPropertyValue;
+ bool boolProperty() const {
+ return boolPropertyValue;
+ }
+ void setBoolProperty(const bool &v) {
+ boolPropertyValue = v;
+ }
+
+ QVariant variantPropertyValue;
+ QVariant variantProperty() const {
+ return variantPropertyValue;
+ }
+ void setVariantProperty(const QVariant &v) {
+ variantPropertyValue = v;
+ }
+
+ QVector3D vectorPropertyValue;
+ QVector3D vectorProperty() const {
+ return vectorPropertyValue;
+ }
+ void setVectorProperty(const QVector3D &v) {
+ vectorPropertyValue = v;
+ }
+
+ QUrl urlPropertyValue;
+ QUrl urlProperty() const {
+ return urlPropertyValue;
+ }
+ void setUrlProperty(const QUrl &v) {
+ urlPropertyValue = v;
+ }
+
+ QDeclarativeScriptString scriptPropertyValue;
+ QDeclarativeScriptString scriptProperty() const {
+ return scriptPropertyValue;
+ }
+ void setScriptProperty(const QDeclarativeScriptString &v) {
+ scriptPropertyValue = v;
+ }
+
+ void doAction() { emit action(); }
+signals:
+ void action();
+ void rectPropertyChanged();
+};
+Q_DECLARE_OPERATORS_FOR_FLAGS(MyTypeObject::MyFlags)
+QML_DECLARE_TYPE(MyTypeObject);
+
+Q_DECLARE_METATYPE(QScriptValue);
+class MyInvokableObject : public QObject
+{
+ Q_OBJECT
+public:
+ MyInvokableObject() { reset(); }
+
+ int invoked() const { return m_invoked; }
+ bool error() const { return m_invokedError; }
+ const QVariantList &actuals() const { return m_actuals; }
+ void reset() { m_invoked = -1; m_invokedError = false; m_actuals.clear(); }
+
+ Q_INVOKABLE QPointF method_get_QPointF() { return QPointF(99.3, -10.2); }
+ Q_INVOKABLE QPoint method_get_QPoint() { return QPoint(9, 12); }
+
+ Q_INVOKABLE void method_NoArgs() { invoke(0); }
+ Q_INVOKABLE int method_NoArgs_int() { invoke(1); return 6; }
+ Q_INVOKABLE qreal method_NoArgs_real() { invoke(2); return 19.7; }
+ Q_INVOKABLE QPointF method_NoArgs_QPointF() { invoke(3); return QPointF(123, 4.5); }
+ Q_INVOKABLE QObject *method_NoArgs_QObject() { invoke(4); return this; }
+ Q_INVOKABLE MyInvokableObject *method_NoArgs_unknown() { invoke(5); return this; }
+ Q_INVOKABLE QScriptValue method_NoArgs_QScriptValue() { invoke(6); return QScriptValue("Hello world"); }
+ Q_INVOKABLE QVariant method_NoArgs_QVariant() { invoke(7); return QVariant("QML rocks"); }
+
+ Q_INVOKABLE void method_int(int a) { invoke(8); m_actuals << a; }
+ Q_INVOKABLE void method_intint(int a, int b) { invoke(9); m_actuals << a << b; }
+ Q_INVOKABLE void method_real(qreal a) { invoke(10); m_actuals << a; }
+ Q_INVOKABLE void method_QString(QString a) { invoke(11); m_actuals << a; }
+ Q_INVOKABLE void method_QPointF(QPointF a) { invoke(12); m_actuals << a; }
+ Q_INVOKABLE void method_QObject(QObject *a) { invoke(13); m_actuals << qVariantFromValue(a); }
+ Q_INVOKABLE void method_QScriptValue(QScriptValue a) { invoke(14); m_actuals << qVariantFromValue(a); }
+ Q_INVOKABLE void method_intQScriptValue(int a, QScriptValue b) { invoke(15); m_actuals << a << qVariantFromValue(b); }
+
+ Q_INVOKABLE void method_overload(int a) { invoke(16); m_actuals << a; }
+ Q_INVOKABLE void method_overload(int a, int b) { invoke(17); m_actuals << a << b; }
+
+private:
+ void invoke(int idx) { if (m_invoked != -1) m_invokedError = true; m_invoked = idx;}
+ int m_invoked;
+ bool m_invokedError;
+ QVariantList m_actuals;
+};
+
+void registerTypes();
+
+#endif // TESTTYPES_H
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
new file mode 100644
index 0000000000..4838288cac
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -0,0 +1,1898 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativeexpression.h>
+#include <QtDeclarative/qdeclarativecontext.h>
+#include <QtCore/qfileinfo.h>
+#include <QtCore/qdebug.h>
+#include <QtDeclarative/private/qdeclarativeguard_p.h>
+#include <QtCore/qdir.h>
+#include <QtCore/qnumeric.h>
+#include <private/qdeclarativeengine_p.h>
+#include <private/qdeclarativeglobalscriptclass_p.h>
+#include "testtypes.h"
+
+/*
+This test covers evaluation of ECMAScript expressions and bindings from within
+QML. This does not include static QML language issues.
+
+Static QML language issues are covered in qmllanguage
+*/
+inline QUrl TEST_FILE(const QString &filename)
+{
+ QFileInfo fileInfo(__FILE__);
+ return QUrl::fromLocalFile(fileInfo.absoluteDir().filePath("data/" + filename));
+}
+
+inline QUrl TEST_FILE(const char *filename)
+{
+ return TEST_FILE(QLatin1String(filename));
+}
+
+class tst_qdeclarativeecmascript : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativeecmascript() {}
+
+private slots:
+ void initTestCase();
+ void assignBasicTypes();
+ void idShortcutInvalidates();
+ void boolPropertiesEvaluateAsBool();
+ void methods();
+ void signalAssignment();
+ void bindingLoop();
+ void basicExpressions();
+ void basicExpressions_data();
+ void arrayExpressions();
+ void contextPropertiesTriggerReeval();
+ void objectPropertiesTriggerReeval();
+ void deferredProperties();
+ void extensionObjects();
+ void attachedProperties();
+ void enums();
+ void valueTypeFunctions();
+ void constantsOverrideBindings();
+ void outerBindingOverridesInnerBinding();
+ void aliasPropertyAndBinding();
+ void nonExistantAttachedObject();
+ void scope();
+ void signalParameterTypes();
+ void objectsCompareAsEqual();
+ void scriptAccess();
+ void dynamicCreation_data();
+ void dynamicCreation();
+ void dynamicDestruction();
+ void objectToString();
+ void selfDeletingBinding();
+ void extendedObjectPropertyLookup();
+ void scriptErrors();
+ void signalTriggeredBindings();
+ void listProperties();
+ void exceptionClearsOnReeval();
+ void exceptionSlotProducesWarning();
+ void exceptionBindingProducesWarning();
+ void transientErrors();
+ void shutdownErrors();
+ void externalScript();
+ void compositePropertyType();
+ void jsObject();
+ void undefinedResetsProperty();
+ void listToVariant();
+ void multiEngineObject();
+ void deletedObject();
+ void scriptScope();
+ void attachedPropertyScope();
+ void scriptConnect();
+ void scriptDisconnect();
+
+ void bug1();
+
+ void callQtInvokables();
+private:
+ QDeclarativeEngine engine;
+};
+
+void tst_qdeclarativeecmascript::initTestCase() { registerTypes(); }
+
+void tst_qdeclarativeecmascript::assignBasicTypes()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("assignBasicTypes.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->flagProperty(), MyTypeObject::FlagVal1 | MyTypeObject::FlagVal3);
+ QCOMPARE(object->enumProperty(), MyTypeObject::EnumVal2);
+ QCOMPARE(object->stringProperty(), QString("Hello World!"));
+ QCOMPARE(object->uintProperty(), uint(10));
+ QCOMPARE(object->intProperty(), -19);
+ QCOMPARE((float)object->realProperty(), float(23.2));
+ QCOMPARE((float)object->doubleProperty(), float(-19.7));
+ QCOMPARE((float)object->floatProperty(), float(8.5));
+ QCOMPARE(object->colorProperty(), QColor("red"));
+ QCOMPARE(object->dateProperty(), QDate(1982, 11, 25));
+ QCOMPARE(object->timeProperty(), QTime(11, 11, 32));
+ QCOMPARE(object->dateTimeProperty(), QDateTime(QDate(2009, 5, 12), QTime(13, 22, 1)));
+ QCOMPARE(object->pointProperty(), QPoint(99,13));
+ QCOMPARE(object->pointFProperty(), QPointF(-10.1, 12.3));
+ QCOMPARE(object->sizeProperty(), QSize(99, 13));
+ QCOMPARE(object->sizeFProperty(), QSizeF(0.1, 0.2));
+ QCOMPARE(object->rectProperty(), QRect(9, 7, 100, 200));
+ QCOMPARE(object->rectFProperty(), QRectF(1000.1, -10.9, 400, 90.99));
+ QCOMPARE(object->boolProperty(), true);
+ QCOMPARE(object->variantProperty(), QVariant("Hello World!"));
+ QCOMPARE(object->vectorProperty(), QVector3D(10, 1, 2.2));
+ QCOMPARE(object->urlProperty(), component.url().resolved(QUrl("main.qml")));
+ delete object;
+ }
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("assignBasicTypes.2.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->flagProperty(), MyTypeObject::FlagVal1 | MyTypeObject::FlagVal3);
+ QCOMPARE(object->enumProperty(), MyTypeObject::EnumVal2);
+ QCOMPARE(object->stringProperty(), QString("Hello World!"));
+ QCOMPARE(object->uintProperty(), uint(10));
+ QCOMPARE(object->intProperty(), -19);
+ QCOMPARE((float)object->realProperty(), float(23.2));
+ QCOMPARE((float)object->doubleProperty(), float(-19.7));
+ QCOMPARE((float)object->floatProperty(), float(8.5));
+ QCOMPARE(object->colorProperty(), QColor("red"));
+ QCOMPARE(object->dateProperty(), QDate(1982, 11, 25));
+ QCOMPARE(object->timeProperty(), QTime(11, 11, 32));
+ QCOMPARE(object->dateTimeProperty(), QDateTime(QDate(2009, 5, 12), QTime(13, 22, 1)));
+ QCOMPARE(object->pointProperty(), QPoint(99,13));
+ QCOMPARE(object->pointFProperty(), QPointF(-10.1, 12.3));
+ QCOMPARE(object->sizeProperty(), QSize(99, 13));
+ QCOMPARE(object->sizeFProperty(), QSizeF(0.1, 0.2));
+ QCOMPARE(object->rectProperty(), QRect(9, 7, 100, 200));
+ QCOMPARE(object->rectFProperty(), QRectF(1000.1, -10.9, 400, 90.99));
+ QCOMPARE(object->boolProperty(), true);
+ QCOMPARE(object->variantProperty(), QVariant("Hello World!"));
+ QCOMPARE(object->vectorProperty(), QVector3D(10, 1, 2.2));
+ QCOMPARE(object->urlProperty(), component.url().resolved(QUrl("main.qml")));
+ delete object;
+ }
+}
+
+void tst_qdeclarativeecmascript::idShortcutInvalidates()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("idShortcutInvalidates.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+ QVERIFY(object->objectProperty() != 0);
+ delete object->objectProperty();
+ QVERIFY(object->objectProperty() == 0);
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("idShortcutInvalidates.1.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+ QVERIFY(object->objectProperty() != 0);
+ delete object->objectProperty();
+ QVERIFY(object->objectProperty() == 0);
+ }
+}
+
+void tst_qdeclarativeecmascript::boolPropertiesEvaluateAsBool()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("boolPropertiesEvaluateAsBool.1.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->stringProperty(), QLatin1String("pass"));
+ }
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("boolPropertiesEvaluateAsBool.2.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->stringProperty(), QLatin1String("pass"));
+ }
+}
+
+void tst_qdeclarativeecmascript::signalAssignment()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("signalAssignment.1.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->string(), QString());
+ emit object->basicSignal();
+ QCOMPARE(object->string(), QString("pass"));
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("signalAssignment.2.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->string(), QString());
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->string(), QString("pass 19 Hello world! 10.3"));
+ }
+}
+
+void tst_qdeclarativeecmascript::methods()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("methods.1.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->methodCalled(), false);
+ QCOMPARE(object->methodIntCalled(), false);
+ emit object->basicSignal();
+ QCOMPARE(object->methodCalled(), true);
+ QCOMPARE(object->methodIntCalled(), false);
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("methods.2.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->methodCalled(), false);
+ QCOMPARE(object->methodIntCalled(), false);
+ emit object->basicSignal();
+ QCOMPARE(object->methodCalled(), false);
+ QCOMPARE(object->methodIntCalled(), true);
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("methods.3.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ QCOMPARE(object->property("test").toInt(), 19);
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("methods.4.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ QCOMPARE(object->property("test").toInt(), 19);
+ QCOMPARE(object->property("test2").toInt(), 17);
+ QCOMPARE(object->property("test3").toInt(), 16);
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("methods.5.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ QCOMPARE(object->property("test").toInt(), 9);
+ }
+}
+
+void tst_qdeclarativeecmascript::bindingLoop()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("bindingLoop.qml"));
+ QString warning = "QML MyQmlObject (" + component.url().toString() + ":9:9) Binding loop detected for property \"stringProperty\"";
+ QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData());
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+}
+
+void tst_qdeclarativeecmascript::basicExpressions_data()
+{
+ QTest::addColumn<QString>("expression");
+ QTest::addColumn<QVariant>("result");
+ QTest::addColumn<bool>("nest");
+
+ QTest::newRow("Syntax error (self test)") << "{console.log({'a':1'}.a)}" << QVariant() << false;
+ QTest::newRow("Context property") << "a" << QVariant(1944) << false;
+ QTest::newRow("Context property") << "a" << QVariant(1944) << true;
+ QTest::newRow("Context property expression") << "a * 2" << QVariant(3888) << false;
+ QTest::newRow("Context property expression") << "a * 2" << QVariant(3888) << true;
+ QTest::newRow("Overridden context property") << "b" << QVariant("Milk") << false;
+ QTest::newRow("Overridden context property") << "b" << QVariant("Cow") << true;
+ QTest::newRow("Object property") << "object.stringProperty" << QVariant("Object1") << false;
+ QTest::newRow("Object property") << "object.stringProperty" << QVariant("Object1") << true;
+ QTest::newRow("Overridden object property") << "objectOverride.stringProperty" << QVariant("Object2") << false;
+ QTest::newRow("Overridden object property") << "objectOverride.stringProperty" << QVariant("Object3") << true;
+ QTest::newRow("Default object property") << "horseLegs" << QVariant(4) << false;
+ QTest::newRow("Default object property") << "antLegs" << QVariant(6) << false;
+ QTest::newRow("Default object property") << "emuLegs" << QVariant(2) << false;
+ QTest::newRow("Nested default object property") << "horseLegs" << QVariant(4) << true;
+ QTest::newRow("Nested default object property") << "antLegs" << QVariant(7) << true;
+ QTest::newRow("Nested default object property") << "emuLegs" << QVariant(2) << true;
+ QTest::newRow("Nested default object property") << "humanLegs" << QVariant(2) << true;
+ QTest::newRow("Context property override default object property") << "millipedeLegs" << QVariant(100) << true;
+}
+
+void tst_qdeclarativeecmascript::basicExpressions()
+{
+ QFETCH(QString, expression);
+ QFETCH(QVariant, result);
+ QFETCH(bool, nest);
+
+ MyQmlObject object1;
+ MyQmlObject object2;
+ MyQmlObject object3;
+ MyDefaultObject1 default1;
+ MyDefaultObject2 default2;
+ MyDefaultObject3 default3;
+ object1.setStringProperty("Object1");
+ object2.setStringProperty("Object2");
+ object3.setStringProperty("Object3");
+
+ QDeclarativeContext context(engine.rootContext());
+ QDeclarativeContext nestedContext(&context);
+
+ context.addDefaultObject(&default1);
+ context.addDefaultObject(&default2);
+ context.setContextProperty("a", QVariant(1944));
+ context.setContextProperty("b", QVariant("Milk"));
+ context.setContextProperty("object", &object1);
+ context.setContextProperty("objectOverride", &object2);
+ nestedContext.addDefaultObject(&default3);
+ nestedContext.setContextProperty("b", QVariant("Cow"));
+ nestedContext.setContextProperty("objectOverride", &object3);
+ nestedContext.setContextProperty("millipedeLegs", QVariant(100));
+
+ MyExpression expr(nest?&nestedContext:&context, expression);
+ QCOMPARE(expr.value(), result);
+}
+
+void tst_qdeclarativeecmascript::arrayExpressions()
+{
+ QObject obj1;
+ QObject obj2;
+ QObject obj3;
+
+ QDeclarativeContext context(engine.rootContext());
+ context.setContextProperty("a", &obj1);
+ context.setContextProperty("b", &obj2);
+ context.setContextProperty("c", &obj3);
+
+ MyExpression expr(&context, "[a, b, c, 10]");
+ QVariant result = expr.value();
+ QCOMPARE(result.userType(), qMetaTypeId<QList<QObject *> >());
+ QList<QObject *> list = qvariant_cast<QList<QObject *> >(result);
+ QCOMPARE(list.count(), 4);
+ QCOMPARE(list.at(0), &obj1);
+ QCOMPARE(list.at(1), &obj2);
+ QCOMPARE(list.at(2), &obj3);
+ QCOMPARE(list.at(3), (QObject *)0);
+}
+
+// Tests that modifying a context property will reevaluate expressions
+void tst_qdeclarativeecmascript::contextPropertiesTriggerReeval()
+{
+ QDeclarativeContext context(engine.rootContext());
+ MyQmlObject object1;
+ MyQmlObject object2;
+ MyQmlObject *object3 = new MyQmlObject;
+
+ object1.setStringProperty("Hello");
+ object2.setStringProperty("World");
+
+ context.setContextProperty("testProp", QVariant(1));
+ context.setContextProperty("testObj", &object1);
+ context.setContextProperty("testObj2", object3);
+
+ {
+ MyExpression expr(&context, "testProp + 1");
+ QCOMPARE(expr.changed, false);
+ QCOMPARE(expr.value(), QVariant(2));
+
+ context.setContextProperty("testProp", QVariant(2));
+ QCOMPARE(expr.changed, true);
+ QCOMPARE(expr.value(), QVariant(3));
+ }
+
+ {
+ MyExpression expr(&context, "testProp + testProp + testProp");
+ QCOMPARE(expr.changed, false);
+ QCOMPARE(expr.value(), QVariant(6));
+
+ context.setContextProperty("testProp", QVariant(4));
+ QCOMPARE(expr.changed, true);
+ QCOMPARE(expr.value(), QVariant(12));
+ }
+
+ {
+ MyExpression expr(&context, "testObj.stringProperty");
+ QCOMPARE(expr.changed, false);
+ QCOMPARE(expr.value(), QVariant("Hello"));
+
+ context.setContextProperty("testObj", &object2);
+ QCOMPARE(expr.changed, true);
+ QCOMPARE(expr.value(), QVariant("World"));
+ }
+
+ {
+ MyExpression expr(&context, "testObj.stringProperty /**/");
+ QCOMPARE(expr.changed, false);
+ QCOMPARE(expr.value(), QVariant("World"));
+
+ context.setContextProperty("testObj", &object1);
+ QCOMPARE(expr.changed, true);
+ QCOMPARE(expr.value(), QVariant("Hello"));
+ }
+
+ {
+ MyExpression expr(&context, "testObj2");
+ QCOMPARE(expr.changed, false);
+ QCOMPARE(expr.value(), QVariant::fromValue((QObject *)object3));
+ }
+
+}
+
+void tst_qdeclarativeecmascript::objectPropertiesTriggerReeval()
+{
+ QDeclarativeContext context(engine.rootContext());
+ MyQmlObject object1;
+ MyQmlObject object2;
+ MyQmlObject object3;
+ context.setContextProperty("testObj", &object1);
+
+ object1.setStringProperty(QLatin1String("Hello"));
+ object2.setStringProperty(QLatin1String("Dog"));
+ object3.setStringProperty(QLatin1String("Cat"));
+
+ {
+ MyExpression expr(&context, "testObj.stringProperty");
+ QCOMPARE(expr.changed, false);
+ QCOMPARE(expr.value(), QVariant("Hello"));
+
+ object1.setStringProperty(QLatin1String("World"));
+ QCOMPARE(expr.changed, true);
+ QCOMPARE(expr.value(), QVariant("World"));
+ }
+
+ {
+ MyExpression expr(&context, "testObj.objectProperty.stringProperty");
+ QCOMPARE(expr.changed, false);
+ QCOMPARE(expr.value(), QVariant());
+
+ object1.setObjectProperty(&object2);
+ QCOMPARE(expr.changed, true);
+ expr.changed = false;
+ QCOMPARE(expr.value(), QVariant("Dog"));
+
+ object1.setObjectProperty(&object3);
+ QCOMPARE(expr.changed, true);
+ expr.changed = false;
+ QCOMPARE(expr.value(), QVariant("Cat"));
+
+ object1.setObjectProperty(0);
+ QCOMPARE(expr.changed, true);
+ expr.changed = false;
+ QCOMPARE(expr.value(), QVariant());
+
+ object1.setObjectProperty(&object3);
+ QCOMPARE(expr.changed, true);
+ expr.changed = false;
+ QCOMPARE(expr.value(), QVariant("Cat"));
+
+ object3.setStringProperty("Donkey");
+ QCOMPARE(expr.changed, true);
+ expr.changed = false;
+ QCOMPARE(expr.value(), QVariant("Donkey"));
+ }
+}
+
+void tst_qdeclarativeecmascript::deferredProperties()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("deferredProperties.qml"));
+ MyDeferredObject *object =
+ qobject_cast<MyDeferredObject *>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->value(), 0);
+ QVERIFY(object->objectProperty() == 0);
+ QVERIFY(object->objectProperty2() != 0);
+ qmlExecuteDeferred(object);
+ QCOMPARE(object->value(), 10);
+ QVERIFY(object->objectProperty() != 0);
+ MyQmlObject *qmlObject =
+ qobject_cast<MyQmlObject *>(object->objectProperty());
+ QVERIFY(qmlObject != 0);
+ QCOMPARE(qmlObject->value(), 10);
+ object->setValue(19);
+ QCOMPARE(qmlObject->value(), 19);
+}
+
+void tst_qdeclarativeecmascript::extensionObjects()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("extensionObjects.qml"));
+ MyExtendedObject *object =
+ qobject_cast<MyExtendedObject *>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->baseProperty(), 13);
+ QCOMPARE(object->coreProperty(), 9);
+
+ object->setProperty("extendedProperty", QVariant(11));
+ object->setProperty("baseExtendedProperty", QVariant(92));
+ QCOMPARE(object->coreProperty(), 11);
+ QCOMPARE(object->baseProperty(), 92);
+}
+
+void tst_qdeclarativeecmascript::attachedProperties()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("attachedProperty.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ QCOMPARE(object->property("a").toInt(), 19);
+ QCOMPARE(object->property("b").toInt(), 19);
+ QCOMPARE(object->property("c").toInt(), 19);
+ QCOMPARE(object->property("d").toInt(), 19);
+
+ // ### Need to test attached property assignment
+}
+
+void tst_qdeclarativeecmascript::enums()
+{
+ // Existant enums
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("enums.1.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("a").toInt(), 0);
+ QCOMPARE(object->property("b").toInt(), 1);
+ QCOMPARE(object->property("c").toInt(), 2);
+ QCOMPARE(object->property("d").toInt(), 3);
+ QCOMPARE(object->property("e").toInt(), 0);
+ QCOMPARE(object->property("f").toInt(), 1);
+ QCOMPARE(object->property("g").toInt(), 2);
+ QCOMPARE(object->property("h").toInt(), 3);
+ QCOMPARE(object->property("i").toInt(), 19);
+ QCOMPARE(object->property("j").toInt(), 19);
+ }
+ // Non-existent enums
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("enums.2.qml"));
+
+ QString warning1 = component.url().toString() + ":5: Unable to assign [undefined] to int";
+ QString warning2 = component.url().toString() + ":6: Unable to assign [undefined] to int";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ QCOMPARE(object->property("a").toInt(), 0);
+ QCOMPARE(object->property("b").toInt(), 0);
+ }
+}
+
+void tst_qdeclarativeecmascript::valueTypeFunctions()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("valueTypeFunctions.qml"));
+ MyTypeObject *obj = qobject_cast<MyTypeObject*>(component.create());
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->rectProperty(), QRect(0,0,100,100));
+ QCOMPARE(obj->rectFProperty(), QRectF(0,0.5,100,99.5));
+}
+
+/*
+Tests that writing a constant to a property with a binding on it disables the
+binding.
+*/
+void tst_qdeclarativeecmascript::constantsOverrideBindings()
+{
+ // From ECMAScript
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("constantsOverrideBindings.1.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("c2").toInt(), 0);
+ object->setProperty("c1", QVariant(9));
+ QCOMPARE(object->property("c2").toInt(), 9);
+
+ emit object->basicSignal();
+
+ QCOMPARE(object->property("c2").toInt(), 13);
+ object->setProperty("c1", QVariant(8));
+ QCOMPARE(object->property("c2").toInt(), 13);
+ }
+
+ // During construction
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("constantsOverrideBindings.2.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("c1").toInt(), 0);
+ QCOMPARE(object->property("c2").toInt(), 10);
+ object->setProperty("c1", QVariant(9));
+ QCOMPARE(object->property("c1").toInt(), 9);
+ QCOMPARE(object->property("c2").toInt(), 10);
+ }
+
+#if 0
+ // From C++
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("constantsOverrideBindings.3.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("c2").toInt(), 0);
+ object->setProperty("c1", QVariant(9));
+ QCOMPARE(object->property("c2").toInt(), 9);
+
+ object->setProperty("c2", QVariant(13));
+ QCOMPARE(object->property("c2").toInt(), 13);
+ object->setProperty("c1", QVariant(7));
+ QCOMPARE(object->property("c1").toInt(), 7);
+ QCOMPARE(object->property("c2").toInt(), 13);
+ }
+#endif
+}
+
+/*
+Tests that assigning a binding to a property that already has a binding causes
+the original binding to be disabled.
+*/
+void tst_qdeclarativeecmascript::outerBindingOverridesInnerBinding()
+{
+ QDeclarativeComponent component(&engine,
+ TEST_FILE("outerBindingOverridesInnerBinding.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("c1").toInt(), 0);
+ QCOMPARE(object->property("c2").toInt(), 0);
+ QCOMPARE(object->property("c3").toInt(), 0);
+
+ object->setProperty("c1", QVariant(9));
+ QCOMPARE(object->property("c1").toInt(), 9);
+ QCOMPARE(object->property("c2").toInt(), 0);
+ QCOMPARE(object->property("c3").toInt(), 0);
+
+ object->setProperty("c3", QVariant(8));
+ QCOMPARE(object->property("c1").toInt(), 9);
+ QCOMPARE(object->property("c2").toInt(), 8);
+ QCOMPARE(object->property("c3").toInt(), 8);
+}
+
+/*
+Access a non-existent attached object.
+
+Tests for a regression where this used to crash.
+*/
+void tst_qdeclarativeecmascript::nonExistantAttachedObject()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("nonExistantAttachedObject.qml"));
+
+ QString warning = component.url().toString() + ":4: Unable to assign [undefined] to QString";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+}
+
+void tst_qdeclarativeecmascript::scope()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scope.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test1").toInt(), 1);
+ QCOMPARE(object->property("test2").toInt(), 2);
+ QCOMPARE(object->property("test3").toString(), QString("1Test"));
+ QCOMPARE(object->property("test4").toString(), QString("2Test"));
+ QCOMPARE(object->property("test5").toInt(), 1);
+ QCOMPARE(object->property("test6").toInt(), 1);
+ QCOMPARE(object->property("test7").toInt(), 2);
+ QCOMPARE(object->property("test8").toInt(), 2);
+ QCOMPARE(object->property("test9").toInt(), 1);
+ QCOMPARE(object->property("test10").toInt(), 3);
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scope.2.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test1").toInt(), 19);
+ QCOMPARE(object->property("test2").toInt(), 19);
+ QCOMPARE(object->property("test3").toInt(), 11);
+ QCOMPARE(object->property("test4").toInt(), 11);
+ QCOMPARE(object->property("test5").toInt(), 24);
+ QCOMPARE(object->property("test6").toInt(), 24);
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scope.3.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test1").toBool(), true);
+ QCOMPARE(object->property("test2").toBool(), true);
+ QCOMPARE(object->property("test3").toBool(), true);
+ }
+
+ // Signal argument scope
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scope.4.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toInt(), 0);
+ QCOMPARE(object->property("test2").toString(), QString());
+
+ emit object->argumentSignal(13, "Argument Scope", 9);
+
+ QCOMPARE(object->property("test").toInt(), 13);
+ QCOMPARE(object->property("test2").toString(), QString("Argument Scope"));
+
+ delete object;
+ }
+}
+
+/*
+Tests that "any" type passes through a synthesized signal parameter. This
+is essentially a test of QDeclarativeMetaType::copy()
+*/
+void tst_qdeclarativeecmascript::signalParameterTypes()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("signalParameterTypes.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ emit object->basicSignal();
+
+ QCOMPARE(object->property("intProperty").toInt(), 10);
+ QCOMPARE(object->property("realProperty").toReal(), 19.2);
+ QVERIFY(object->property("colorProperty").value<QColor>() == QColor(255, 255, 0, 255));
+ QVERIFY(object->property("variantProperty") == QVariant::fromValue(QColor(255, 0, 255, 255)));
+}
+
+/*
+Test that two JS objects for the same QObject compare as equal.
+*/
+void tst_qdeclarativeecmascript::objectsCompareAsEqual()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("objectsCompareAsEqual.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test1").toBool(), true);
+ QCOMPARE(object->property("test2").toBool(), true);
+ QCOMPARE(object->property("test3").toBool(), true);
+ QCOMPARE(object->property("test4").toBool(), true);
+ QCOMPARE(object->property("test5").toBool(), true);
+}
+
+/*
+Confirm bindings and alias properties can coexist.
+
+Tests for a regression where the binding would not reevaluate.
+*/
+void tst_qdeclarativeecmascript::aliasPropertyAndBinding()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("aliasPropertyAndBinding.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("c2").toInt(), 3);
+ QCOMPARE(object->property("c3").toInt(), 3);
+
+ object->setProperty("c2", QVariant(19));
+
+ QCOMPARE(object->property("c2").toInt(), 19);
+ QCOMPARE(object->property("c3").toInt(), 19);
+}
+
+/*
+Tests that only methods of Script {} blocks are exposed.
+*/
+void tst_qdeclarativeecmascript::scriptAccess()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptAccess.qml"));
+
+ QString warning = component.url().toString() + ":16: Unable to assign [undefined] to int";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test1").toInt(), 10);
+ QCOMPARE(object->property("test2").toInt(), 19);
+ QCOMPARE(object->property("test3").toInt(), 0);
+}
+
+void tst_qdeclarativeecmascript::dynamicCreation_data()
+{
+ QTest::addColumn<QString>("method");
+ QTest::addColumn<QString>("createdName");
+
+ QTest::newRow("One") << "createOne" << "objectOne";
+ QTest::newRow("Two") << "createTwo" << "objectTwo";
+ QTest::newRow("Three") << "createThree" << "objectThree";
+}
+
+/*
+Test using createQmlObject to dynamically generate an item
+Also using createComponent is tested.
+*/
+void tst_qdeclarativeecmascript::dynamicCreation()
+{
+ QFETCH(QString, method);
+ QFETCH(QString, createdName);
+
+ QDeclarativeComponent component(&engine, TEST_FILE("dynamicCreation.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create());
+ QVERIFY(object != 0);
+
+ QMetaObject::invokeMethod(object, method.toUtf8());
+ QObject *created = object->objectProperty();
+ QVERIFY(created);
+ QCOMPARE(created->objectName(), createdName);
+}
+
+/*
+ Tests the destroy function
+*/
+void tst_qdeclarativeecmascript::dynamicDestruction()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("dynamicDeletion.qml"));
+ QDeclarativeGuard<MyQmlObject> object = qobject_cast<MyQmlObject*>(component.create());
+ QVERIFY(object != 0);
+ QDeclarativeGuard<QObject> createdQmlObject = 0;
+
+ QMetaObject::invokeMethod(object, "create");
+ createdQmlObject = object->objectProperty();
+ QVERIFY(createdQmlObject);
+ QCOMPARE(createdQmlObject->objectName(), QString("emptyObject"));
+
+ QMetaObject::invokeMethod(object, "killOther");
+ QVERIFY(createdQmlObject);
+ QCoreApplication::instance()->processEvents(QEventLoop::DeferredDeletion);
+ QVERIFY(createdQmlObject);
+ for (int ii = 0; createdQmlObject && ii < 50; ++ii) { // After 5 seconds we should give up
+ if (createdQmlObject) {
+ QTest::qWait(100);
+ QCoreApplication::instance()->processEvents(QEventLoop::DeferredDeletion);
+ }
+ }
+ QVERIFY(!createdQmlObject);
+
+ QMetaObject::invokeMethod(object, "killMe");
+ QVERIFY(object);
+ QTest::qWait(0);
+ QCoreApplication::instance()->processEvents(QEventLoop::DeferredDeletion);
+ QVERIFY(!object);
+}
+
+/*
+ tests that id.toString() works
+*/
+void tst_qdeclarativeecmascript::objectToString()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("declarativeToString.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create());
+ QVERIFY(object != 0);
+ QMetaObject::invokeMethod(object, "testToString");
+ QVERIFY(object->stringProperty().startsWith("MyQmlObject_QML_"));
+ QVERIFY(object->stringProperty().endsWith(", \"objName\")"));
+}
+
+/*
+Tests bindings that indirectly cause their own deletion work.
+
+This test is best run under valgrind to ensure no invalid memory access occur.
+*/
+void tst_qdeclarativeecmascript::selfDeletingBinding()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("selfDeletingBinding.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ object->setProperty("triggerDelete", true);
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("selfDeletingBinding.2.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ object->setProperty("triggerDelete", true);
+ }
+}
+
+/*
+Test that extended object properties can be accessed.
+
+This test a regression where this used to crash. The issue was specificially
+for extended objects that did not include a synthesized meta object (so non-root
+and no synthesiszed properties).
+*/
+void tst_qdeclarativeecmascript::extendedObjectPropertyLookup()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("extendedObjectPropertyLookup.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+}
+
+/*
+Test file/lineNumbers for binding/Script errors.
+*/
+void tst_qdeclarativeecmascript::scriptErrors()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptErrors.qml"));
+ QString url = component.url().toString();
+
+ QString warning1 = url.left(url.length() - 3) + "js:2: Error: Invalid write to global property \"a\"";
+ QString warning2 = url + ":7: TypeError: Result of expression 'a' [undefined] is not an object.";
+ QString warning3 = url + ":5: Error: Invalid write to global property \"a\"";
+ QString warning4 = url + ":12: TypeError: Result of expression 'a' [undefined] is not an object.";
+ QString warning5 = url + ":10: TypeError: Result of expression 'a' [undefined] is not an object.";
+ QString warning6 = url + ":9: Unable to assign [undefined] to int";
+ QString warning7 = url + ":14: Error: Cannot assign to read-only property \"trueProperty\"";
+ QString warning8 = url + ":15: Error: Cannot assign to non-existent property \"fakeProperty\"";
+
+ QTest::ignoreMessage(QtWarningMsg, warning1.toLatin1().constData());
+ QTest::ignoreMessage(QtWarningMsg, warning2.toLatin1().constData());
+ QTest::ignoreMessage(QtWarningMsg, warning3.toLatin1().constData());
+ QTest::ignoreMessage(QtWarningMsg, warning5.toLatin1().constData());
+ QTest::ignoreMessage(QtWarningMsg, warning6.toLatin1().constData());
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QTest::ignoreMessage(QtWarningMsg, warning4.toLatin1().constData());
+ emit object->basicSignal();
+
+ QTest::ignoreMessage(QtWarningMsg, warning7.toLatin1().constData());
+ emit object->anotherBasicSignal();
+
+ QTest::ignoreMessage(QtWarningMsg, warning8.toLatin1().constData());
+ emit object->thirdBasicSignal();
+}
+
+/*
+Test bindings still work when the reeval is triggered from within
+a signal script.
+*/
+void tst_qdeclarativeecmascript::signalTriggeredBindings()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("signalTriggeredBindings.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("base").toReal(), 50.);
+ QCOMPARE(object->property("test1").toReal(), 50.);
+ QCOMPARE(object->property("test2").toReal(), 50.);
+
+ object->basicSignal();
+
+ QCOMPARE(object->property("base").toReal(), 200.);
+ QCOMPARE(object->property("test1").toReal(), 200.);
+ QCOMPARE(object->property("test2").toReal(), 200.);
+
+ object->argumentSignal(10, QString(), 10);
+
+ QCOMPARE(object->property("base").toReal(), 400.);
+ QCOMPARE(object->property("test1").toReal(), 400.);
+ QCOMPARE(object->property("test2").toReal(), 400.);
+}
+
+/*
+Test that list properties can be iterated from ECMAScript
+*/
+void tst_qdeclarativeecmascript::listProperties()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("listProperties.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test1").toInt(), 21);
+ QCOMPARE(object->property("test2").toInt(), 2);
+ QCOMPARE(object->property("test3").toBool(), true);
+ QCOMPARE(object->property("test4").toBool(), true);
+}
+
+void tst_qdeclarativeecmascript::exceptionClearsOnReeval()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("exceptionClearsOnReeval.qml"));
+ QString url = component.url().toString();
+
+ QString warning = url + ":4: TypeError: Result of expression 'objectProperty.objectProperty' [undefined] is not an object.";
+
+ QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData());
+ MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toBool(), false);
+
+ MyQmlObject object2;
+ MyQmlObject object3;
+ object2.setObjectProperty(&object3);
+ object->setObjectProperty(&object2);
+
+ QCOMPARE(object->property("test").toBool(), true);
+}
+
+void tst_qdeclarativeecmascript::exceptionSlotProducesWarning()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("exceptionProducesWarning.qml"));
+ QString url = component.url().toString();
+
+ QString warning = component.url().toString() + ":6: Error: JS exception";
+
+ QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData());
+ MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create());
+ QVERIFY(object != 0);
+}
+
+void tst_qdeclarativeecmascript::exceptionBindingProducesWarning()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("exceptionProducesWarning2.qml"));
+ QString url = component.url().toString();
+
+ QString warning = component.url().toString() + ":5: Error: JS exception";
+
+ QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData());
+ MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create());
+ QVERIFY(object != 0);
+}
+
+static int transientErrorsMsgCount = 0;
+static void transientErrorsMsgHandler(QtMsgType, const char *)
+{
+ ++transientErrorsMsgCount;
+}
+
+// Check that transient binding errors are not displayed
+void tst_qdeclarativeecmascript::transientErrors()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("transientErrors.qml"));
+
+ transientErrorsMsgCount = 0;
+ QtMsgHandler old = qInstallMsgHandler(transientErrorsMsgHandler);
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ qInstallMsgHandler(old);
+
+ QCOMPARE(transientErrorsMsgCount, 0);
+}
+
+// Check that errors during shutdown are minimized
+void tst_qdeclarativeecmascript::shutdownErrors()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("shutdownErrors.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ transientErrorsMsgCount = 0;
+ QtMsgHandler old = qInstallMsgHandler(transientErrorsMsgHandler);
+
+ delete object;
+
+ qInstallMsgHandler(old);
+ QCOMPARE(transientErrorsMsgCount, 0);
+}
+
+// Check that Script::source property works as expected
+void tst_qdeclarativeecmascript::externalScript()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("externalScript.1.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toInt(), 92);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("externalScript.2.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toInt(), 92);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("externalScript.3.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toInt(), 92);
+ QCOMPARE(object->property("test2").toInt(), 92);
+ QCOMPARE(object->property("test3").toBool(), false);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("externalScript.4.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toInt(), 92);
+ QCOMPARE(object->property("test2").toBool(), true);
+
+ delete object;
+ }
+}
+
+void tst_qdeclarativeecmascript::compositePropertyType()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("compositePropertyType.qml"));
+ QTest::ignoreMessage(QtDebugMsg, "hello world");
+ QObject *object = qobject_cast<QObject *>(component.create());
+ delete object;
+}
+
+// QTBUG-5759
+void tst_qdeclarativeecmascript::jsObject()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("jsObject.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toInt(), 92);
+
+ delete object;
+}
+
+void tst_qdeclarativeecmascript::undefinedResetsProperty()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("undefinedResetsProperty.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("resettableProperty").toInt(), 92);
+
+ object->setProperty("setUndefined", true);
+
+ QCOMPARE(object->property("resettableProperty").toInt(), 13);
+
+ object->setProperty("setUndefined", false);
+
+ QCOMPARE(object->property("resettableProperty").toInt(), 92);
+
+ delete object;
+ }
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("undefinedResetsProperty.2.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("resettableProperty").toInt(), 19);
+
+ QMetaObject::invokeMethod(object, "doReset");
+
+ QCOMPARE(object->property("resettableProperty").toInt(), 13);
+
+ delete object;
+ }
+}
+
+// QTBUG-6781
+void tst_qdeclarativeecmascript::bug1()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("bug.1.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toInt(), 14);
+
+ object->setProperty("a", 11);
+
+ QCOMPARE(object->property("test").toInt(), 3);
+
+ object->setProperty("b", true);
+
+ QCOMPARE(object->property("test").toInt(), 9);
+
+ delete object;
+}
+
+void tst_qdeclarativeecmascript::callQtInvokables()
+{
+ MyInvokableObject o;
+
+ QDeclarativeEngine qmlengine;
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(&qmlengine);
+ QScriptEngine *engine = &ep->scriptEngine;
+ ep->globalClass->explicitSetProperty("object", ep->objectClass->newQObject(&o));
+
+ // Non-existent methods
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_nonexistent()").isError(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), -1);
+ QCOMPARE(o.actuals().count(), 0);
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_nonexistent(10, 11)").isError(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), -1);
+ QCOMPARE(o.actuals().count(), 0);
+
+ // Insufficient arguments
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_int()").isError(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), -1);
+ QCOMPARE(o.actuals().count(), 0);
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_intint(10)").isError(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), -1);
+ QCOMPARE(o.actuals().count(), 0);
+
+ // Excessive arguments
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_int(10, 11)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 8);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(10));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_intint(10, 11, 12)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 9);
+ QCOMPARE(o.actuals().count(), 2);
+ QCOMPARE(o.actuals().at(0), QVariant(10));
+ QCOMPARE(o.actuals().at(1), QVariant(11));
+
+ // Test return types
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_NoArgs()").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 0);
+ QCOMPARE(o.actuals().count(), 0);
+
+ o.reset();
+ QVERIFY(engine->evaluate("object.method_NoArgs_int()").strictlyEquals(QScriptValue(engine, 6)));
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 1);
+ QCOMPARE(o.actuals().count(), 0);
+
+ o.reset();
+ QVERIFY(engine->evaluate("object.method_NoArgs_real()").strictlyEquals(QScriptValue(engine, 19.7)));
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 2);
+ QCOMPARE(o.actuals().count(), 0);
+
+ o.reset();
+ {
+ QScriptValue ret = engine->evaluate("object.method_NoArgs_QPointF()");
+ QVERIFY(ret.isVariant());
+ QCOMPARE(ret.toVariant(), QVariant(QPointF(123, 4.5)));
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 3);
+ QCOMPARE(o.actuals().count(), 0);
+ }
+
+ o.reset();
+ {
+ QScriptValue ret = engine->evaluate("object.method_NoArgs_QObject()");
+ QVERIFY(ret.isQObject());
+ QCOMPARE(ret.toQObject(), (QObject *)&o);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 4);
+ QCOMPARE(o.actuals().count(), 0);
+ }
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_NoArgs_unknown()").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 5);
+ QCOMPARE(o.actuals().count(), 0);
+
+ o.reset();
+ {
+ QScriptValue ret = engine->evaluate("object.method_NoArgs_QScriptValue()");
+ QVERIFY(ret.isString());
+ QCOMPARE(ret.toString(), QString("Hello world"));
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 6);
+ QCOMPARE(o.actuals().count(), 0);
+ }
+
+ o.reset();
+ QVERIFY(engine->evaluate("object.method_NoArgs_QVariant()").strictlyEquals(QScriptValue(engine, "QML rocks")));
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 7);
+ QCOMPARE(o.actuals().count(), 0);
+
+ // Test arg types
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_int(94)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 8);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(94));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_int(\"94\")").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 8);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(94));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_int(\"not a number\")").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 8);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(0));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_int(null)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 8);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(0));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_int(undefined)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 8);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(0));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_int(object)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 8);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(0));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_intint(122, 9)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 9);
+ QCOMPARE(o.actuals().count(), 2);
+ QCOMPARE(o.actuals().at(0), QVariant(122));
+ QCOMPARE(o.actuals().at(1), QVariant(9));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_real(94.3)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 10);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(94.3));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_real(\"94.3\")").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 10);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(94.3));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_real(\"not a number\")").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 10);
+ QCOMPARE(o.actuals().count(), 1);
+ QVERIFY(qIsNaN(o.actuals().at(0).toDouble()));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_real(null)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 10);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(0));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_real(undefined)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 10);
+ QCOMPARE(o.actuals().count(), 1);
+ QVERIFY(qIsNaN(o.actuals().at(0).toDouble()));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_real(object)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 10);
+ QCOMPARE(o.actuals().count(), 1);
+ QVERIFY(qIsNaN(o.actuals().at(0).toDouble()));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QString(\"Hello world\")").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 11);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant("Hello world"));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QString(19)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 11);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant("19"));
+
+ o.reset();
+ {
+ QString expected = "MyInvokableObject(0x" + QString::number((intptr_t)&o, 16) + ")";
+ QCOMPARE(engine->evaluate("object.method_QString(object)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 11);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(expected));
+ }
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QString(null)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 11);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(QString()));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QString(undefined)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 11);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(QString()));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QPointF(0)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 12);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(QPointF()));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QPointF(null)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 12);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(QPointF()));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QPointF(undefined)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 12);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(QPointF()));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QPointF(object)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 12);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(QPointF()));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QPointF(object.method_get_QPointF())").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 12);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(QPointF(99.3, -10.2)));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QPointF(object.method_get_QPoint())").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 12);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), QVariant(QPointF(9, 12)));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QObject(0)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 13);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), qVariantFromValue((QObject *)0));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QObject(\"Hello world\")").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 13);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), qVariantFromValue((QObject *)0));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QObject(null)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 13);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), qVariantFromValue((QObject *)0));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QObject(undefined)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 13);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), qVariantFromValue((QObject *)0));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QObject(object)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 13);
+ QCOMPARE(o.actuals().count(), 1);
+ QCOMPARE(o.actuals().at(0), qVariantFromValue((QObject *)&o));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QScriptValue(null)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 14);
+ QCOMPARE(o.actuals().count(), 1);
+ QVERIFY(qvariant_cast<QScriptValue>(o.actuals().at(0)).isNull());
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QScriptValue(undefined)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 14);
+ QCOMPARE(o.actuals().count(), 1);
+ QVERIFY(qvariant_cast<QScriptValue>(o.actuals().at(0)).isUndefined());
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QScriptValue(19)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 14);
+ QCOMPARE(o.actuals().count(), 1);
+ QVERIFY(qvariant_cast<QScriptValue>(o.actuals().at(0)).strictlyEquals(QScriptValue(engine, 19)));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_QScriptValue([19, 20])").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 14);
+ QCOMPARE(o.actuals().count(), 1);
+ QVERIFY(qvariant_cast<QScriptValue>(o.actuals().at(0)).isArray());
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_intQScriptValue(4, null)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 15);
+ QCOMPARE(o.actuals().count(), 2);
+ QCOMPARE(o.actuals().at(0), QVariant(4));
+ QVERIFY(qvariant_cast<QScriptValue>(o.actuals().at(1)).isNull());
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_intQScriptValue(8, undefined)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 15);
+ QCOMPARE(o.actuals().count(), 2);
+ QCOMPARE(o.actuals().at(0), QVariant(8));
+ QVERIFY(qvariant_cast<QScriptValue>(o.actuals().at(1)).isUndefined());
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_intQScriptValue(3, 19)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 15);
+ QCOMPARE(o.actuals().count(), 2);
+ QCOMPARE(o.actuals().at(0), QVariant(3));
+ QVERIFY(qvariant_cast<QScriptValue>(o.actuals().at(1)).strictlyEquals(QScriptValue(engine, 19)));
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_intQScriptValue(44, [19, 20])").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 15);
+ QCOMPARE(o.actuals().count(), 2);
+ QCOMPARE(o.actuals().at(0), QVariant(44));
+ QVERIFY(qvariant_cast<QScriptValue>(o.actuals().at(1)).isArray());
+
+ // Test overloads - QML will always invoke the *last* method
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_overload()").isError(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), -1);
+ QCOMPARE(o.actuals().count(), 0);
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_overload(10)").isError(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), -1);
+ QCOMPARE(o.actuals().count(), 0);
+
+ o.reset();
+ QCOMPARE(engine->evaluate("object.method_overload(10, 11)").isUndefined(), true);
+ QCOMPARE(o.error(), false);
+ QCOMPARE(o.invoked(), 17);
+ QCOMPARE(o.actuals().count(), 2);
+ QCOMPARE(o.actuals().at(0), QVariant(10));
+ QCOMPARE(o.actuals().at(1), QVariant(11));
+}
+
+// QTBUG-5675
+void tst_qdeclarativeecmascript::listToVariant()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("listToVariant.qml"));
+
+ MyQmlContainer container;
+
+ QDeclarativeContext context(engine.rootContext());
+ context.addDefaultObject(&container);
+
+ QObject *object = component.create(&context);
+ QVERIFY(object != 0);
+
+ QVariant v = object->property("test");
+ QCOMPARE(v.userType(), qMetaTypeId<QDeclarativeListReference>());
+ QVERIFY(qvariant_cast<QDeclarativeListReference>(v).object() == &container);
+
+ delete object;
+}
+
+// QTBUG-7957
+void tst_qdeclarativeecmascript::multiEngineObject()
+{
+ MyQmlObject obj;
+ obj.setStringProperty("Howdy planet");
+
+ QDeclarativeEngine e1;
+ e1.rootContext()->setContextProperty("thing", &obj);
+ QDeclarativeComponent c1(&e1, TEST_FILE("multiEngineObject.qml"));
+
+ QDeclarativeEngine e2;
+ e2.rootContext()->setContextProperty("thing", &obj);
+ QDeclarativeComponent c2(&e2, TEST_FILE("multiEngineObject.qml"));
+
+ QObject *o1 = c1.create();
+ QObject *o2 = c2.create();
+
+ QCOMPARE(o1->property("test").toString(), QString("Howdy planet"));
+ QCOMPARE(o2->property("test").toString(), QString("Howdy planet"));
+
+ delete o2;
+ delete o1;
+}
+
+// Test that references to QObjects are cleanup when the object is destroyed
+void tst_qdeclarativeecmascript::deletedObject()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("deletedObject.qml"));
+
+ QObject *object = component.create();
+
+ QCOMPARE(object->property("test1").toBool(), true);
+ QCOMPARE(object->property("test2").toBool(), true);
+ QCOMPARE(object->property("test3").toBool(), true);
+ QEXPECT_FAIL("", "QTBUG-8077", Continue);
+ QCOMPARE(object->property("test4").toBool(), true);
+
+ delete object;
+}
+
+void tst_qdeclarativeecmascript::scriptScope()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptScope.1.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("result").toString(), QString());
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptScope.2.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+ emit object->basicSignal();
+ QCOMPARE(object->property("result").toString(), QLatin1String("world"));
+
+ delete object;
+ }
+}
+
+void tst_qdeclarativeecmascript::attachedPropertyScope()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("attachedPropertyScope.qml"));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ MyQmlAttachedObject *attached =
+ qobject_cast<MyQmlAttachedObject *>(qmlAttachedPropertiesObject<MyQmlObject>(object));
+ QVERIFY(attached != 0);
+
+ QCOMPARE(object->property("value2").toInt(), 0);
+
+ attached->emitMySignal();
+
+ QCOMPARE(object->property("value2").toInt(), 9);
+
+ delete object;
+}
+
+void tst_qdeclarativeecmascript::scriptConnect()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptConnect.1.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toBool(), false);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toBool(), true);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptConnect.2.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toBool(), false);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toBool(), true);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptConnect.3.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toBool(), false);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toBool(), true);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptConnect.4.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->methodCalled(), false);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->methodCalled(), true);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptConnect.5.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->methodCalled(), false);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->methodCalled(), true);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptConnect.6.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toInt(), 0);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 2);
+
+ delete object;
+ }
+}
+
+void tst_qdeclarativeecmascript::scriptDisconnect()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptDisconnect.1.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toInt(), 0);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 1);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 2);
+ emit object->basicSignal();
+ QCOMPARE(object->property("test").toInt(), 2);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 2);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptDisconnect.2.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toInt(), 0);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 1);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 2);
+ emit object->basicSignal();
+ QCOMPARE(object->property("test").toInt(), 2);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 2);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptDisconnect.3.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toInt(), 0);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 1);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 2);
+ emit object->basicSignal();
+ QCOMPARE(object->property("test").toInt(), 2);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 3);
+
+ delete object;
+ }
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptDisconnect.4.qml"));
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toInt(), 0);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 1);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 2);
+ emit object->basicSignal();
+ QCOMPARE(object->property("test").toInt(), 2);
+ emit object->argumentSignal(19, "Hello world!", 10.3);
+ QCOMPARE(object->property("test").toInt(), 3);
+
+ delete object;
+ }
+
+}
+
+QTEST_MAIN(tst_qdeclarativeecmascript)
+
+#include "tst_qdeclarativeecmascript.moc"
diff --git a/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro b/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro
new file mode 100644
index 0000000000..5b6530dc2e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative network
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativeengine.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp
new file mode 100644
index 0000000000..5dc5f19f70
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp
@@ -0,0 +1,240 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QDeclarativeEngine>
+#include <QDeclarativeContext>
+#include <QNetworkAccessManager>
+#include <QPointer>
+#include <QDir>
+#include <QDesktopServices>
+#include <QDebug>
+#include <QDeclarativeComponent>
+#include <QDeclarativeNetworkAccessManagerFactory>
+
+class tst_qdeclarativeengine : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativeengine() {}
+
+private slots:
+ void rootContext();
+ void networkAccessManager();
+ void baseUrl();
+ void contextForObject();
+ void offlineStoragePath();
+ void clearComponentCache();
+};
+
+void tst_qdeclarativeengine::rootContext()
+{
+ QDeclarativeEngine engine;
+
+ QVERIFY(engine.rootContext());
+
+ QCOMPARE(engine.rootContext()->engine(), &engine);
+ QVERIFY(engine.rootContext()->parentContext() == 0);
+}
+
+class NetworkAccessManagerFactory : public QDeclarativeNetworkAccessManagerFactory
+{
+public:
+ NetworkAccessManagerFactory() : manager(0) {}
+
+ QNetworkAccessManager *create(QObject *parent) {
+ manager = new QNetworkAccessManager(parent);
+ return manager;
+ }
+
+ QNetworkAccessManager *manager;
+};
+
+void tst_qdeclarativeengine::networkAccessManager()
+{
+ QDeclarativeEngine *engine = new QDeclarativeEngine;
+
+ // Test QDeclarativeEngine created manager
+ QPointer<QNetworkAccessManager> manager = engine->networkAccessManager();
+ QVERIFY(manager != 0);
+ delete engine;
+
+ // Test factory created manager
+ engine = new QDeclarativeEngine;
+ NetworkAccessManagerFactory factory;
+ engine->setNetworkAccessManagerFactory(&factory);
+ QVERIFY(engine->networkAccessManager() == factory.manager);
+ delete engine;
+}
+
+void tst_qdeclarativeengine::baseUrl()
+{
+ QDeclarativeEngine engine;
+
+ QUrl cwd = QUrl::fromLocalFile(QDir::currentPath() + QDir::separator());
+
+ QCOMPARE(engine.baseUrl(), cwd);
+ QCOMPARE(engine.rootContext()->resolvedUrl(QUrl("main.qml")), cwd.resolved(QUrl("main.qml")));
+
+ QDir dir = QDir::current();
+ dir.cdUp();
+ QVERIFY(dir != QDir::current());
+ QDir::setCurrent(dir.path());
+ QVERIFY(QDir::current() == dir);
+
+ QUrl cwd2 = QUrl::fromLocalFile(QDir::currentPath() + QDir::separator());
+ QCOMPARE(engine.baseUrl(), cwd2);
+ QCOMPARE(engine.rootContext()->resolvedUrl(QUrl("main.qml")), cwd2.resolved(QUrl("main.qml")));
+
+ engine.setBaseUrl(cwd);
+ QCOMPARE(engine.baseUrl(), cwd);
+ QCOMPARE(engine.rootContext()->resolvedUrl(QUrl("main.qml")), cwd.resolved(QUrl("main.qml")));
+}
+
+void tst_qdeclarativeengine::contextForObject()
+{
+ QDeclarativeEngine *engine = new QDeclarativeEngine;
+
+ // Test null-object
+ QVERIFY(QDeclarativeEngine::contextForObject(0) == 0);
+
+ // Test an object with no context
+ QObject object;
+ QVERIFY(QDeclarativeEngine::contextForObject(&object) == 0);
+
+ // Test setting null-object
+ QDeclarativeEngine::setContextForObject(0, engine->rootContext());
+
+ // Test setting null-context
+ QDeclarativeEngine::setContextForObject(&object, 0);
+
+ // Test setting context
+ QDeclarativeEngine::setContextForObject(&object, engine->rootContext());
+ QVERIFY(QDeclarativeEngine::contextForObject(&object) == engine->rootContext());
+
+ QDeclarativeContext context(engine->rootContext());
+
+ // Try changing context
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeEngine::setContextForObject(): Object already has a QDeclarativeContext");
+ QDeclarativeEngine::setContextForObject(&object, &context);
+ QVERIFY(QDeclarativeEngine::contextForObject(&object) == engine->rootContext());
+
+ // Delete context
+ delete engine; engine = 0;
+ QVERIFY(QDeclarativeEngine::contextForObject(&object) == 0);
+}
+
+void tst_qdeclarativeengine::offlineStoragePath()
+{
+ // Without these set, QDesktopServices::storageLocation returns
+ // strings with extra "//" at the end. We set them to ignore this problem.
+ qApp->setApplicationName("tst_qdeclarativeengine");
+ qApp->setOrganizationName("Nokia");
+ qApp->setOrganizationDomain("nokia.com");
+
+ QDeclarativeEngine engine;
+
+ QDir dir(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
+ dir.mkpath("QML");
+ dir.cd("QML");
+ dir.mkpath("OfflineStorage");
+ dir.cd("OfflineStorage");
+
+ QCOMPARE(QDir::fromNativeSeparators(engine.offlineStoragePath()), dir.path());
+
+ engine.setOfflineStoragePath(QDir::homePath());
+ QCOMPARE(engine.offlineStoragePath(), QDir::homePath());
+}
+
+void tst_qdeclarativeengine::clearComponentCache()
+{
+ QDeclarativeEngine engine;
+
+ // Create original qml file
+ {
+ QFile file("temp.qml");
+ QVERIFY(file.open(QIODevice::WriteOnly));
+ file.write("import Qt 4.6\nQtObject {\nproperty int test: 10\n}\n");
+ file.close();
+ }
+
+ // Test "test" property
+ {
+ QDeclarativeComponent component(&engine, "temp.qml");
+ QObject *obj = component.create();
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->property("test").toInt(), 10);
+ delete obj;
+ }
+
+ // Modify qml file
+ {
+ QFile file("temp.qml");
+ QVERIFY(file.open(QIODevice::WriteOnly));
+ file.write("import Qt 4.6\nQtObject {\nproperty int test: 11\n}\n");
+ file.close();
+ }
+
+ // Test cache hit
+ {
+ QDeclarativeComponent component(&engine, "temp.qml");
+ QObject *obj = component.create();
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->property("test").toInt(), 10);
+ delete obj;
+ }
+
+ // Clear cache
+ engine.clearComponentCache();
+
+ // Test cache refresh
+ {
+ QDeclarativeComponent component(&engine, "temp.qml");
+ QObject *obj = component.create();
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->property("test").toInt(), 11);
+ delete obj;
+ }
+}
+
+QTEST_MAIN(tst_qdeclarativeengine)
+
+#include "tst_qdeclarativeengine.moc"
diff --git a/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro b/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro
new file mode 100644
index 0000000000..6591406462
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+SOURCES += tst_qdeclarativeerror.cpp
+macx:CONFIG -= app_bundle
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeerror/test.txt b/tests/auto/declarative/qdeclarativeerror/test.txt
new file mode 100644
index 0000000000..cdafd9ed82
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeerror/test.txt
@@ -0,0 +1,3 @@
+Line Content
+Line2 Content
+Line3 Content
diff --git a/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp b/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp
new file mode 100644
index 0000000000..ba1ebae402
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp
@@ -0,0 +1,242 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QDeclarativeError>
+#include <QDebug>
+
+class tst_qdeclarativeerror : public QObject
+{
+ Q_OBJECT
+private slots:
+ void url();
+ void description();
+ void line();
+ void column();
+ void toString();
+
+ void copy();
+ void debug();
+};
+
+void tst_qdeclarativeerror::url()
+{
+ QDeclarativeError error;
+
+ QCOMPARE(error.url(), QUrl());
+
+ error.setUrl(QUrl("http://www.nokia.com/main.qml"));
+
+ QCOMPARE(error.url(), QUrl("http://www.nokia.com/main.qml"));
+
+ QDeclarativeError error2 = error;
+
+ QCOMPARE(error2.url(), QUrl("http://www.nokia.com/main.qml"));
+
+ error.setUrl(QUrl("http://qt.nokia.com/main.qml"));
+
+ QCOMPARE(error.url(), QUrl("http://qt.nokia.com/main.qml"));
+ QCOMPARE(error2.url(), QUrl("http://www.nokia.com/main.qml"));
+}
+
+void tst_qdeclarativeerror::description()
+{
+ QDeclarativeError error;
+
+ QCOMPARE(error.description(), QString());
+
+ error.setDescription("An Error");
+
+ QCOMPARE(error.description(), QString("An Error"));
+
+ QDeclarativeError error2 = error;
+
+ QCOMPARE(error2.description(), QString("An Error"));
+
+ error.setDescription("Another Error");
+
+ QCOMPARE(error.description(), QString("Another Error"));
+ QCOMPARE(error2.description(), QString("An Error"));
+}
+
+void tst_qdeclarativeerror::line()
+{
+ QDeclarativeError error;
+
+ QCOMPARE(error.line(), -1);
+
+ error.setLine(102);
+
+ QCOMPARE(error.line(), 102);
+
+ QDeclarativeError error2 = error;
+
+ QCOMPARE(error2.line(), 102);
+
+ error.setLine(4);
+
+ QCOMPARE(error.line(), 4);
+ QCOMPARE(error2.line(), 102);
+}
+
+void tst_qdeclarativeerror::column()
+{
+ QDeclarativeError error;
+
+ QCOMPARE(error.column(), -1);
+
+ error.setColumn(16);
+
+ QCOMPARE(error.column(), 16);
+
+ QDeclarativeError error2 = error;
+
+ QCOMPARE(error2.column(), 16);
+
+ error.setColumn(3);
+
+ QCOMPARE(error.column(), 3);
+ QCOMPARE(error2.column(), 16);
+}
+
+void tst_qdeclarativeerror::toString()
+{
+ {
+ QDeclarativeError error;
+ error.setUrl(QUrl("http://www.nokia.com/main.qml"));
+ error.setDescription("An Error");
+ error.setLine(92);
+ error.setColumn(13);
+
+ QCOMPARE(error.toString(), QString("http://www.nokia.com/main.qml:92:13: An Error"));
+ }
+
+ {
+ QDeclarativeError error;
+ error.setUrl(QUrl("http://www.nokia.com/main.qml"));
+ error.setDescription("An Error");
+ error.setLine(92);
+
+ QCOMPARE(error.toString(), QString("http://www.nokia.com/main.qml:92: An Error"));
+ }
+}
+
+void tst_qdeclarativeerror::copy()
+{
+ QDeclarativeError error;
+ error.setUrl(QUrl("http://www.nokia.com/main.qml"));
+ error.setDescription("An Error");
+ error.setLine(92);
+ error.setColumn(13);
+
+ QDeclarativeError error2(error);
+ QDeclarativeError error3;
+ error3 = error;
+
+ error.setUrl(QUrl("http://qt.nokia.com/main.qml"));
+ error.setDescription("Another Error");
+ error.setLine(2);
+ error.setColumn(33);
+
+ QCOMPARE(error.url(), QUrl("http://qt.nokia.com/main.qml"));
+ QCOMPARE(error.description(), QString("Another Error"));
+ QCOMPARE(error.line(), 2);
+ QCOMPARE(error.column(), 33);
+
+ QCOMPARE(error2.url(), QUrl("http://www.nokia.com/main.qml"));
+ QCOMPARE(error2.description(), QString("An Error"));
+ QCOMPARE(error2.line(), 92);
+ QCOMPARE(error2.column(), 13);
+
+ QCOMPARE(error3.url(), QUrl("http://www.nokia.com/main.qml"));
+ QCOMPARE(error3.description(), QString("An Error"));
+ QCOMPARE(error3.line(), 92);
+ QCOMPARE(error3.column(), 13);
+
+}
+
+void tst_qdeclarativeerror::debug()
+{
+ {
+ QDeclarativeError error;
+ error.setUrl(QUrl("http://www.nokia.com/main.qml"));
+ error.setDescription("An Error");
+ error.setLine(92);
+ error.setColumn(13);
+
+ QTest::ignoreMessage(QtWarningMsg, "http://www.nokia.com/main.qml:92:13: An Error ");
+ qWarning() << error;
+ }
+
+ {
+ QUrl url(QUrl::fromLocalFile(QString(SRCDIR) + "/").resolved(QUrl("test.txt")));
+ QDeclarativeError error;
+ error.setUrl(url);
+ error.setDescription("An Error");
+ error.setLine(2);
+ error.setColumn(5);
+
+ QString out = url.toString() + ":2:5: An Error \n Line2 Content \n ^ ";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(out));
+
+ qWarning() << error;
+ }
+
+ {
+ QUrl url(QUrl::fromLocalFile(QString(SRCDIR) + "/").resolved(QUrl("foo.txt")));
+ QDeclarativeError error;
+ error.setUrl(url);
+ error.setDescription("An Error");
+ error.setLine(2);
+ error.setColumn(5);
+
+ QString out = url.toString() + ":2:5: An Error ";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(out));
+
+ qWarning() << error;
+ }
+}
+
+
+
+QTEST_MAIN(tst_qdeclarativeerror)
+
+#include "tst_qdeclarativeerror.moc"
diff --git a/tests/auto/declarative/qdeclarativeflickable/data/flickable01.qml b/tests/auto/declarative/qdeclarativeflickable/data/flickable01.qml
new file mode 100644
index 0000000000..8a1843c79e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeflickable/data/flickable01.qml
@@ -0,0 +1,4 @@
+import Qt 4.6
+
+Flickable {
+}
diff --git a/tests/auto/declarative/qdeclarativeflickable/data/flickable02.qml b/tests/auto/declarative/qdeclarativeflickable/data/flickable02.qml
new file mode 100644
index 0000000000..4b82d5c4e5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeflickable/data/flickable02.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+Flickable {
+ width: 100; height: 100
+ contentWidth: row.width; contentHeight: row.height
+
+ Row {
+ id: row
+ Repeater {
+ model: 4
+ Rectangle { width: 200; height: 300; color: "blue" }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeflickable/data/flickable03.qml b/tests/auto/declarative/qdeclarativeflickable/data/flickable03.qml
new file mode 100644
index 0000000000..49eed5a299
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeflickable/data/flickable03.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+Flickable {
+ width: 100; height: 100
+ contentWidth: column.width; contentHeight: column.height
+
+ Column {
+ id: column
+ Repeater {
+ model: 4
+ Rectangle { width: 200; height: 300; color: "blue" }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeflickable/data/flickable04.qml b/tests/auto/declarative/qdeclarativeflickable/data/flickable04.qml
new file mode 100644
index 0000000000..40c4606e2b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeflickable/data/flickable04.qml
@@ -0,0 +1,16 @@
+import Qt 4.6
+
+Flickable {
+ width: 100; height: 100
+ contentWidth: column.width; contentHeight: column.height
+ pressDelay: 200; overShoot: false; interactive: false
+ maximumFlickVelocity: 2000
+
+ Column {
+ id: column
+ Repeater {
+ model: 4
+ Rectangle { width: 200; height: 300; color: "blue" }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro b/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
new file mode 100644
index 0000000000..4b71381266
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativeflickable.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
new file mode 100644
index 0000000000..cb87977f04
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
@@ -0,0 +1,223 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtTest/QSignalSpy>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativeflickable_p.h>
+#include <private/qdeclarativevaluetype_p.h>
+#include <math.h>
+
+class tst_qdeclarativeflickable : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativeflickable();
+
+private slots:
+ void create();
+ void horizontalViewportSize();
+ void verticalViewportSize();
+ void properties();
+ void overShoot();
+ void maximumFlickVelocity();
+ void flickDeceleration();
+ void pressDelay();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+tst_qdeclarativeflickable::tst_qdeclarativeflickable()
+{
+}
+
+void tst_qdeclarativeflickable::create()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/flickable01.qml"));
+ QDeclarativeFlickable *obj = qobject_cast<QDeclarativeFlickable*>(c.create());
+
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->isAtXBeginning(), true);
+ QCOMPARE(obj->isAtXEnd(), false);
+ QCOMPARE(obj->isAtYBeginning(), true);
+ QCOMPARE(obj->isAtYEnd(), false);
+ QCOMPARE(obj->contentX(), 0.);
+ QCOMPARE(obj->contentY(), 0.);
+
+ QCOMPARE(obj->horizontalVelocity(), 0.);
+ QCOMPARE(obj->verticalVelocity(), 0.);
+
+ QCOMPARE(obj->isInteractive(), true);
+ QCOMPARE(obj->overShoot(), true);
+ QCOMPARE(obj->pressDelay(), 0);
+ QCOMPARE(obj->maximumFlickVelocity(), 2000.);
+
+ delete obj;
+}
+
+void tst_qdeclarativeflickable::horizontalViewportSize()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/flickable02.qml"));
+ QDeclarativeFlickable *obj = qobject_cast<QDeclarativeFlickable*>(c.create());
+
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->contentWidth(), 800.);
+ QCOMPARE(obj->contentHeight(), 300.);
+ QCOMPARE(obj->isAtXBeginning(), true);
+ QCOMPARE(obj->isAtXEnd(), false);
+ QCOMPARE(obj->isAtYBeginning(), true);
+ QCOMPARE(obj->isAtYEnd(), false);
+
+ delete obj;
+}
+
+void tst_qdeclarativeflickable::verticalViewportSize()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/flickable03.qml"));
+ QDeclarativeFlickable *obj = qobject_cast<QDeclarativeFlickable*>(c.create());
+
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->contentWidth(), 200.);
+ QCOMPARE(obj->contentHeight(), 1200.);
+ QCOMPARE(obj->isAtXBeginning(), true);
+ QCOMPARE(obj->isAtXEnd(), false);
+ QCOMPARE(obj->isAtYBeginning(), true);
+ QCOMPARE(obj->isAtYEnd(), false);
+
+ delete obj;
+}
+
+void tst_qdeclarativeflickable::properties()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/flickable04.qml"));
+ QDeclarativeFlickable *obj = qobject_cast<QDeclarativeFlickable*>(c.create());
+
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->isInteractive(), false);
+ QCOMPARE(obj->overShoot(), false);
+ QCOMPARE(obj->pressDelay(), 200);
+ QCOMPARE(obj->maximumFlickVelocity(), 2000.);
+
+ delete obj;
+}
+
+void tst_qdeclarativeflickable::overShoot()
+{
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.6; Flickable { overShoot: false; }", QUrl::fromLocalFile(""));
+ QDeclarativeFlickable *flickable = qobject_cast<QDeclarativeFlickable*>(component.create());
+ QSignalSpy spy(flickable, SIGNAL(overShootChanged()));
+
+ QVERIFY(flickable);
+ QVERIFY(!flickable->overShoot());
+
+ flickable->setOverShoot(true);
+ QVERIFY(flickable->overShoot());
+ QCOMPARE(spy.count(),1);
+ flickable->setOverShoot(true);
+ QCOMPARE(spy.count(),1);
+
+ flickable->setOverShoot(false);
+ QVERIFY(!flickable->overShoot());
+ QCOMPARE(spy.count(),2);
+ flickable->setOverShoot(false);
+ QCOMPARE(spy.count(),2);
+}
+
+void tst_qdeclarativeflickable::maximumFlickVelocity()
+{
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.6; Flickable { maximumFlickVelocity: 1.0; }", QUrl::fromLocalFile(""));
+ QDeclarativeFlickable *flickable = qobject_cast<QDeclarativeFlickable*>(component.create());
+ QSignalSpy spy(flickable, SIGNAL(maximumFlickVelocityChanged()));
+
+ QVERIFY(flickable);
+ QCOMPARE(flickable->maximumFlickVelocity(), 1.0);
+
+ flickable->setMaximumFlickVelocity(2.0);
+ QCOMPARE(flickable->maximumFlickVelocity(), 2.0);
+ QCOMPARE(spy.count(),1);
+ flickable->setMaximumFlickVelocity(2.0);
+ QCOMPARE(spy.count(),1);
+}
+
+void tst_qdeclarativeflickable::flickDeceleration()
+{
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.6; Flickable { flickDeceleration: 1.0; }", QUrl::fromLocalFile(""));
+ QDeclarativeFlickable *flickable = qobject_cast<QDeclarativeFlickable*>(component.create());
+ QSignalSpy spy(flickable, SIGNAL(flickDecelerationChanged()));
+
+ QVERIFY(flickable);
+ QCOMPARE(flickable->flickDeceleration(), 1.0);
+
+ flickable->setFlickDeceleration(2.0);
+ QCOMPARE(flickable->flickDeceleration(), 2.0);
+ QCOMPARE(spy.count(),1);
+ flickable->setFlickDeceleration(2.0);
+ QCOMPARE(spy.count(),1);
+}
+
+void tst_qdeclarativeflickable::pressDelay()
+{
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.6; Flickable { pressDelay: 100; }", QUrl::fromLocalFile(""));
+ QDeclarativeFlickable *flickable = qobject_cast<QDeclarativeFlickable*>(component.create());
+ QSignalSpy spy(flickable, SIGNAL(pressDelayChanged()));
+
+ QVERIFY(flickable);
+ QCOMPARE(flickable->pressDelay(), 100);
+
+ flickable->setPressDelay(200);
+ QCOMPARE(flickable->pressDelay(), 200);
+ QCOMPARE(spy.count(),1);
+ flickable->setPressDelay(200);
+ QCOMPARE(spy.count(),1);
+}
+
+QTEST_MAIN(tst_qdeclarativeflickable)
+
+#include "tst_qdeclarativeflickable.moc"
diff --git a/tests/auto/declarative/qdeclarativeflipable/data/test-flipable.qml b/tests/auto/declarative/qdeclarativeflipable/data/test-flipable.qml
new file mode 100644
index 0000000000..21d356d524
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeflipable/data/test-flipable.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+Flipable {
+ id: flipable
+ width: 640; height: 480
+
+ front: Rectangle { anchors.fill: flipable }
+ back: Rectangle { anchors.fill: flipable }
+}
diff --git a/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro b/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
new file mode 100644
index 0000000000..e29d3247b1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativeflipable.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp b/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
new file mode 100644
index 0000000000..ed37c43333
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativeflipable_p.h>
+#include <private/qdeclarativevaluetype_p.h>
+#include <QFontMetrics>
+#include <private/qdeclarativerectangle_p.h>
+#include <math.h>
+
+class tst_qdeclarativeflipable : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativeflipable();
+
+private slots:
+ void create();
+ void checkFrontAndBack();
+ void setFrontAndBack();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+tst_qdeclarativeflipable::tst_qdeclarativeflipable()
+{
+}
+
+void tst_qdeclarativeflipable::create()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/test-flipable.qml"));
+ QDeclarativeFlipable *obj = qobject_cast<QDeclarativeFlipable*>(c.create());
+
+ QVERIFY(obj != 0);
+ delete obj;
+}
+
+void tst_qdeclarativeflipable::checkFrontAndBack()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/test-flipable.qml"));
+ QDeclarativeFlipable *obj = qobject_cast<QDeclarativeFlipable*>(c.create());
+
+ QVERIFY(obj != 0);
+ QVERIFY(obj->front() != 0);
+ QVERIFY(obj->back() != 0);
+ delete obj;
+}
+
+void tst_qdeclarativeflipable::setFrontAndBack()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/test-flipable.qml"));
+ QDeclarativeFlipable *obj = qobject_cast<QDeclarativeFlipable*>(c.create());
+
+ QVERIFY(obj != 0);
+ QVERIFY(obj->front() != 0);
+ QVERIFY(obj->back() != 0);
+
+ QString message = "QML Flipable (" + c.url().toString() + ":3:1) front is a write-once property";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
+ obj->setFront(new QDeclarativeRectangle());
+
+ message = "QML Flipable (" + c.url().toString() + ":3:1) back is a write-once property";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
+ obj->setBack(new QDeclarativeRectangle());
+ delete obj;
+}
+
+QTEST_MAIN(tst_qdeclarativeflipable)
+
+#include "tst_qdeclarativeflipable.moc"
diff --git a/tests/auto/qdiriterator/foo/bar/readme.txt b/tests/auto/declarative/qdeclarativefontloader/data/dummy.ttf
index e69de29bb2..e69de29bb2 100644
--- a/tests/auto/qdiriterator/foo/bar/readme.txt
+++ b/tests/auto/declarative/qdeclarativefontloader/data/dummy.ttf
diff --git a/tests/auto/declarative/qdeclarativefontloader/data/tarzeau_ocr_a.ttf b/tests/auto/declarative/qdeclarativefontloader/data/tarzeau_ocr_a.ttf
new file mode 100644
index 0000000000..cf93f9651f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativefontloader/data/tarzeau_ocr_a.ttf
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro b/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
new file mode 100644
index 0000000000..0c736b4f77
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativefontloader.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
new file mode 100644
index 0000000000..a9762df6a3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
@@ -0,0 +1,156 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativefontloader_p.h>
+#include "../../../shared/util.h"
+
+class tst_qdeclarativefontloader : public QObject
+
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativefontloader();
+
+private slots:
+ void noFont();
+ void namedFont();
+ void localFont();
+ void failLocalFont();
+ void webFont();
+ void failWebFont();
+
+private slots:
+
+private:
+ QDeclarativeEngine engine;
+};
+
+tst_qdeclarativefontloader::tst_qdeclarativefontloader()
+{
+}
+
+void tst_qdeclarativefontloader::noFont()
+{
+ QString componentStr = "import Qt 4.6\nFontLoader { }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeFontLoader *fontObject = qobject_cast<QDeclarativeFontLoader*>(component.create());
+
+ QVERIFY(fontObject != 0);
+ QCOMPARE(fontObject->name(), QString(""));
+ QCOMPARE(fontObject->source(), QUrl(""));
+ QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Null);
+
+ delete fontObject;
+}
+
+void tst_qdeclarativefontloader::namedFont()
+{
+ QString componentStr = "import Qt 4.6\nFontLoader { name: \"Helvetica\" }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeFontLoader *fontObject = qobject_cast<QDeclarativeFontLoader*>(component.create());
+
+ QVERIFY(fontObject != 0);
+ QCOMPARE(fontObject->source(), QUrl(""));
+ QCOMPARE(fontObject->name(), QString("Helvetica"));
+ QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Ready);
+}
+
+void tst_qdeclarativefontloader::localFont()
+{
+ QString componentStr = "import Qt 4.6\nFontLoader { source: \"" SRCDIR "/data/tarzeau_ocr_a.ttf\" }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeFontLoader *fontObject = qobject_cast<QDeclarativeFontLoader*>(component.create());
+
+ QVERIFY(fontObject != 0);
+ QVERIFY(fontObject->source() != QUrl(""));
+ QTRY_COMPARE(fontObject->name(), QString("OCRA"));
+ QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Ready);
+}
+
+void tst_qdeclarativefontloader::failLocalFont()
+{
+ QString componentStr = "import Qt 4.6\nFontLoader { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/dummy.ttf").toString() + "\" }";
+ QTest::ignoreMessage(QtWarningMsg, QString("Cannot load font: QUrl( \"" + QUrl::fromLocalFile(SRCDIR "/data/dummy.ttf").toString() + "\" ) ").toUtf8().constData());
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeFontLoader *fontObject = qobject_cast<QDeclarativeFontLoader*>(component.create());
+
+ QVERIFY(fontObject != 0);
+ QVERIFY(fontObject->source() != QUrl(""));
+ QTRY_COMPARE(fontObject->name(), QString(""));
+ QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Error);
+}
+
+void tst_qdeclarativefontloader::webFont()
+{
+ QString componentStr = "import Qt 4.6\nFontLoader { source: \"http://www.princexml.com/fonts/steffmann/Starburst.ttf\" }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeFontLoader *fontObject = qobject_cast<QDeclarativeFontLoader*>(component.create());
+
+ QVERIFY(fontObject != 0);
+ QVERIFY(fontObject->source() != QUrl(""));
+ QTRY_COMPARE(fontObject->name(), QString("Starburst"));
+ QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Ready);
+}
+
+void tst_qdeclarativefontloader::failWebFont()
+{
+ QString componentStr = "import Qt 4.6\nFontLoader { source: \"http://wrong.address.com/Starburst.ttf\" }";
+ QTest::ignoreMessage(QtWarningMsg, "Cannot load font: QUrl( \"http://wrong.address.com/Starburst.ttf\" ) ");
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeFontLoader *fontObject = qobject_cast<QDeclarativeFontLoader*>(component.create());
+
+ QVERIFY(fontObject != 0);
+ QVERIFY(fontObject->source() != QUrl(""));
+ QTRY_COMPARE(fontObject->name(), QString(""));
+ QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Error);
+}
+
+QTEST_MAIN(tst_qdeclarativefontloader)
+
+#include "tst_qdeclarativefontloader.moc"
diff --git a/tests/auto/declarative/qdeclarativegridview/data/displaygrid.qml b/tests/auto/declarative/qdeclarativegridview/data/displaygrid.qml
new file mode 100644
index 0000000000..d3cdcd8b48
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativegridview/data/displaygrid.qml
@@ -0,0 +1,39 @@
+import Qt 4.6
+
+Rectangle {
+ width: 240
+ height: 320
+ color: "#ffffff"
+ resources: [
+ Component {
+ id: myDelegate
+ Rectangle {
+ id: wrapper
+ objectName: "wrapper"
+ width: 80
+ height: 60
+ border.color: "blue"
+ Text {
+ text: index
+ }
+ Text {
+ y: 20
+ id: displayText
+ objectName: "displayText"
+ text: display
+ }
+ color: GridView.isCurrentItem ? "lightsteelblue" : "white"
+ }
+ }
+ ]
+ GridView {
+ id: grid
+ objectName: "grid"
+ width: 240
+ height: 320
+ cellWidth: 80
+ cellHeight: 60
+ model: testModel
+ delegate: myDelegate
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml
new file mode 100644
index 0000000000..e45c4c3bef
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml
@@ -0,0 +1,56 @@
+import Qt 4.6
+
+Rectangle {
+ width: 240
+ height: 320
+ color: "#ffffff"
+ Component {
+ id: myDelegate
+ Item {
+ id: wrapper
+ objectName: "wrapper"
+ height: 100
+ width: 100
+ Text {
+ text: index
+ }
+ Text {
+ y: 25
+ id: textName
+ objectName: "textName"
+ text: name
+ }
+ Text {
+ y: 50
+ id: textNumber
+ objectName: "textNumber"
+ text: number
+ }
+ Text {
+ y: 75
+ text: wrapper.y
+ }
+ }
+ }
+
+ Component {
+ id: myHighlight
+ Rectangle {
+ color: "lightsteelblue"
+ }
+ }
+
+ GridView {
+ id: grid
+ objectName: "grid"
+ width: 240
+ height: 320
+ model: testModel
+ delegate: myDelegate
+ highlight: myHighlight
+ preferredHighlightBegin: 100
+ preferredHighlightEnd: 100
+ highlightRangeMode: "StrictlyEnforceRange"
+ focus: true
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview-initCurrent.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview-initCurrent.qml
new file mode 100644
index 0000000000..32833d2f08
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativegridview/data/gridview-initCurrent.qml
@@ -0,0 +1,51 @@
+import Qt 4.6
+
+Rectangle {
+ width: 240
+ height: 320
+ color: "#ffffff"
+ resources: [
+ Component {
+ id: myDelegate
+ Rectangle {
+ id: wrapper
+ objectName: "wrapper"
+ width: 80
+ height: 60
+ border.color: "blue"
+ Text {
+ text: index
+ }
+ Text {
+ x: 40
+ text: wrapper.x + ", " + wrapper.y
+ }
+ Text {
+ y: 20
+ id: textName
+ objectName: "textName"
+ text: name
+ }
+ Text {
+ y: 40
+ id: textNumber
+ objectName: "textNumber"
+ text: number
+ }
+ color: GridView.isCurrentItem ? "lightsteelblue" : "white"
+ }
+ }
+ ]
+ GridView {
+ id: grid
+ objectName: "grid"
+ focus: true
+ width: 240
+ height: 320
+ currentIndex: 5
+ cellWidth: 80
+ cellHeight: 60
+ delegate: myDelegate
+ model: testModel
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview.qml
new file mode 100644
index 0000000000..ba6b807132
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativegridview/data/gridview.qml
@@ -0,0 +1,56 @@
+import Qt 4.6
+
+Rectangle {
+ id: root
+ property int added: -1
+ property var removed
+
+ width: 240
+ height: 320
+ color: "#ffffff"
+ resources: [
+ Component {
+ id: myDelegate
+ Rectangle {
+ id: wrapper
+ objectName: "wrapper"
+ width: 80
+ height: 60
+ border.color: "blue"
+ Text {
+ text: index
+ }
+ Text {
+ x: 40
+ text: wrapper.x + ", " + wrapper.y
+ }
+ Text {
+ y: 20
+ id: textName
+ objectName: "textName"
+ text: name
+ }
+ Text {
+ y: 40
+ id: textNumber
+ objectName: "textNumber"
+ text: number
+ }
+ color: GridView.isCurrentItem ? "lightsteelblue" : "white"
+ GridView.onAdd: root.added = index
+ GridView.onRemove: root.removed = name
+ }
+ }
+ ]
+ GridView {
+ id: grid
+ objectName: "grid"
+ width: 240
+ height: 320
+ cellWidth: 80
+ cellHeight: 60
+ flow: (testTopToBottom == false) ? "LeftToRight" : "TopToBottom"
+ model: testModel
+ delegate: myDelegate
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview2.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview2.qml
new file mode 100644
index 0000000000..62b5bd35b4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativegridview/data/gridview2.qml
@@ -0,0 +1,26 @@
+import Qt 4.6
+
+GridView {
+ anchors.fill: parent
+ width: 320; height: 200
+ cellWidth: 100; cellHeight: 100; cacheBuffer: 200; focus: true
+ keyNavigationWraps: true; highlightFollowsCurrentItem: false
+
+ model: ListModel {
+ id: appModel
+ ListElement { lColor: "red" }
+ ListElement { lColor: "yellow" }
+ ListElement { lColor: "green" }
+ ListElement { lColor: "blue" }
+ }
+
+ delegate: Item {
+ width: 100; height: 100
+ Rectangle {
+ color: lColor; x: 4; y: 4
+ width: 92; height: 92
+ }
+ }
+
+ highlight: Rectangle { width: 100; height: 100; color: "black" }
+}
diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview3.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview3.qml
new file mode 100644
index 0000000000..b133d55934
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativegridview/data/gridview3.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+GridView {
+ anchors.fill: parent
+ width: 320; height: 200
+}
diff --git a/tests/auto/declarative/qdeclarativegridview/data/propertychanges.qml b/tests/auto/declarative/qdeclarativegridview/data/propertychanges.qml
new file mode 100644
index 0000000000..da2e8d00de
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativegridview/data/propertychanges.qml
@@ -0,0 +1,69 @@
+import Qt 4.6
+
+Rectangle {
+ width: 360; height: 120; color: "white"
+ Component {
+ id: delegate
+ Item {
+ id: wrapper
+ width: 180; height: 40;
+ Column {
+ x: 5; y: 5
+ Text { text: '<b>Name:</b> ' + name }
+ Text { text: '<b>Number:</b> ' + number }
+ }
+ }
+ }
+ Component {
+ id: highlightRed
+ Rectangle {
+ color: "red"
+ radius: 10
+ opacity: 0.5
+ }
+ }
+ GridView {
+ cellWidth:180
+ cellHeight:40
+ objectName: "gridView"
+ anchors.fill: parent
+ model: listModel
+ delegate: delegate
+ highlight: highlightRed
+ focus: true
+ keyNavigationWraps: true
+ cacheBuffer: 10
+ flow: GridView.LeftToRight
+ }
+
+ data:[
+ ListModel {
+ id: listModel
+ ListElement {
+ name: "Bill Smith"
+ number: "555 3264"
+ }
+ ListElement {
+ name: "John Brown"
+ number: "555 8426"
+ }
+ ListElement {
+ name: "Sam Wise"
+ number: "555 0473"
+ }
+ },
+ ListModel {
+ objectName: "alternateModel"
+ ListElement {
+ name: "Jack"
+ number: "555 8426"
+ }
+ ListElement {
+ name: "Mary"
+ number: "555 3264"
+ }
+ }
+ ]
+}
+
+ \ No newline at end of file
diff --git a/tests/auto/declarative/qdeclarativegridview/data/setindex.qml b/tests/auto/declarative/qdeclarativegridview/data/setindex.qml
new file mode 100644
index 0000000000..908b365f63
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativegridview/data/setindex.qml
@@ -0,0 +1,33 @@
+import Qt 4.6
+
+Rectangle {
+ width: 200
+ height: 200
+ Component {
+ id: appDelegate
+
+ Item {
+ id : wrapper
+ Script {
+ function startupFunction()
+ {
+ if (index == 5) view.currentIndex = index;
+
+ }
+ }
+ Component.onCompleted: startupFunction();
+ width: 30; height: 30
+ Text { text: index }
+ }
+ }
+
+ GridView {
+ id: view
+ objectName: "grid"
+ anchors.fill: parent
+ cellWidth: 30; cellHeight: 30
+ model: 35
+ delegate: appDelegate
+ focus: true
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro b/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
new file mode 100644
index 0000000000..af206d7489
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativegridview.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
new file mode 100644
index 0000000000..a1edc53f94
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
@@ -0,0 +1,1185 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QtGui/qstringlistmodel.h>
+#include <QtDeclarative/qdeclarativeview.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativecontext.h>
+#include <QtDeclarative/qdeclarativeexpression.h>
+#include <QtDeclarative/private/qlistmodelinterface_p.h>
+#include <QtDeclarative/private/qdeclarativegridview_p.h>
+#include <QtDeclarative/private/qdeclarativetext_p.h>
+#include <QtDeclarative/private/qdeclarativelistmodel_p.h>
+
+class tst_QDeclarativeGridView : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QDeclarativeGridView();
+
+private slots:
+ void items();
+ void changed();
+ void inserted();
+ void removed();
+ void moved();
+ void changeFlow();
+ void currentIndex();
+ void defaultValues();
+ void properties();
+ void propertyChanges();
+ void componentChanges();
+ void modelChanges();
+ void positionViewAtIndex();
+ void resetModel();
+ void enforceRange();
+ void QTBUG_8456();
+
+private:
+ QDeclarativeView *createView();
+ template<typename T>
+ T *findItem(QGraphicsObject *parent, const QString &id, int index=-1);
+ template<typename T>
+ QList<T*> findItems(QGraphicsObject *parent, const QString &objectName);
+ void dumpTree(QDeclarativeItem *parent, int depth = 0);
+};
+
+class TestModel : public QAbstractListModel
+{
+public:
+ enum Roles { Name = Qt::UserRole+1, Number = Qt::UserRole+2 };
+
+ TestModel(QObject *parent=0) : QAbstractListModel(parent) {
+ QHash<int, QByteArray> roles;
+ roles[Name] = "name";
+ roles[Number] = "number";
+ setRoleNames(roles);
+ }
+
+ int rowCount(const QModelIndex &parent=QModelIndex()) const { Q_UNUSED(parent); return list.count(); }
+ QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const {
+ QVariant rv;
+ if (role == Name)
+ rv = list.at(index.row()).first;
+ else if (role == Number)
+ rv = list.at(index.row()).second;
+
+ return rv;
+ }
+
+ int count() const { return rowCount(); }
+ QString name(int index) const { return list.at(index).first; }
+ QString number(int index) const { return list.at(index).second; }
+
+ void addItem(const QString &name, const QString &number) {
+ emit beginInsertRows(QModelIndex(), list.count(), list.count());
+ list.append(QPair<QString,QString>(name, number));
+ emit endInsertRows();
+ }
+
+ void insertItem(int index, const QString &name, const QString &number) {
+ emit beginInsertRows(QModelIndex(), index, index);
+ list.insert(index, QPair<QString,QString>(name, number));
+ emit endInsertRows();
+ }
+
+ void removeItem(int index) {
+ emit beginRemoveRows(QModelIndex(), index, index);
+ list.removeAt(index);
+ emit endRemoveRows();
+ }
+
+ void moveItem(int from, int to) {
+ emit beginMoveRows(QModelIndex(), from, from, QModelIndex(), to);
+ list.move(from, to);
+ emit endMoveRows();
+ }
+
+ void modifyItem(int idx, const QString &name, const QString &number) {
+ list[idx] = QPair<QString,QString>(name, number);
+ emit dataChanged(index(idx,0), index(idx,0));
+ }
+
+private:
+ QList<QPair<QString,QString> > list;
+};
+
+tst_QDeclarativeGridView::tst_QDeclarativeGridView()
+{
+}
+
+void tst_QDeclarativeGridView::items()
+{
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ model.addItem("Fred", "12345");
+ model.addItem("John", "2345");
+ model.addItem("Bob", "54321");
+ model.addItem("Billy", "22345");
+ model.addItem("Sam", "2945");
+ model.addItem("Ben", "04321");
+ model.addItem("Jim", "0780");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+ ctxt->setContextProperty("testTopToBottom", QVariant(false));
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/gridview.qml"));
+ qApp->processEvents();
+
+ QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
+ QVERIFY(gridview != 0);
+
+ QDeclarativeItem *viewport = gridview->viewport();
+ QVERIFY(viewport != 0);
+
+ QCOMPARE(gridview->count(), model.count());
+ QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
+
+ for (int i = 0; i < model.count(); ++i) {
+ QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", i);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(i));
+ QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", i);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(i));
+ }
+
+ // set an empty model and confirm that items are destroyed
+ TestModel model2;
+ ctxt->setContextProperty("testModel", &model2);
+
+ int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ QVERIFY(itemCount == 0);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeGridView::changed()
+{
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ model.addItem("Fred", "12345");
+ model.addItem("John", "2345");
+ model.addItem("Bob", "54321");
+ model.addItem("Billy", "22345");
+ model.addItem("Sam", "2945");
+ model.addItem("Ben", "04321");
+ model.addItem("Jim", "0780");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+ ctxt->setContextProperty("testTopToBottom", QVariant(false));
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/gridview.qml"));
+ qApp->processEvents();
+
+ QDeclarativeFlickable *gridview = findItem<QDeclarativeFlickable>(canvas->rootObject(), "grid");
+ QVERIFY(gridview != 0);
+
+ QDeclarativeItem *viewport = gridview->viewport();
+ QVERIFY(viewport != 0);
+
+ model.modifyItem(1, "Will", "9876");
+ QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(1));
+ QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 1);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(1));
+
+ delete canvas;
+}
+
+void tst_QDeclarativeGridView::inserted()
+{
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ model.addItem("Fred", "12345");
+ model.addItem("John", "2345");
+ model.addItem("Bob", "54321");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+ ctxt->setContextProperty("testTopToBottom", QVariant(false));
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/gridview.qml"));
+ qApp->processEvents();
+
+ QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
+ QVERIFY(gridview != 0);
+
+ QDeclarativeItem *viewport = gridview->viewport();
+ QVERIFY(viewport != 0);
+
+ model.insertItem(1, "Will", "9876");
+
+ // let transitions settle.
+ QTest::qWait(100);
+
+ QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
+
+ QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(1));
+ QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 1);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(1));
+
+ // Checks that onAdd is called
+ int added = canvas->rootObject()->property("added").toInt();
+ QCOMPARE(added, 1);
+
+ // Confirm items positioned correctly
+ for (int i = 0; i < model.count(); ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ QCOMPARE(item->x(), (i%3)*80.0);
+ QCOMPARE(item->y(), (i/3)*60.0);
+ }
+
+ model.insertItem(0, "Foo", "1111"); // zero index, and current item
+
+ // let transitions settle.
+ QTest::qWait(100);
+
+ QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
+
+ name = findItem<QDeclarativeText>(viewport, "textName", 0);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(0));
+ number = findItem<QDeclarativeText>(viewport, "textNumber", 0);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(0));
+
+ QCOMPARE(gridview->currentIndex(), 1);
+
+ // Confirm items positioned correctly
+ for (int i = 0; i < model.count(); ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ QVERIFY(item->x() == (i%3)*80);
+ QVERIFY(item->y() == (i/3)*60);
+ }
+
+ for (int i = model.count(); i < 30; ++i)
+ model.insertItem(i, "Hello", QString::number(i));
+ QTest::qWait(100);
+
+ gridview->setContentY(120);
+ QTest::qWait(100);
+
+ // Insert item outside visible area
+ model.insertItem(1, "Hello", "1324");
+ QTest::qWait(100);
+
+ QVERIFY(gridview->contentY() == 120);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeGridView::removed()
+{
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ for (int i = 0; i < 40; i++)
+ model.addItem("Item" + QString::number(i), "");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+ ctxt->setContextProperty("testTopToBottom", QVariant(false));
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/gridview.qml"));
+ qApp->processEvents();
+
+ QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
+ QVERIFY(gridview != 0);
+
+ QDeclarativeItem *viewport = gridview->viewport();
+ QVERIFY(viewport != 0);
+
+ model.removeItem(1);
+
+ // let transitions settle.
+ QTest::qWait(100);
+
+ QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(1));
+ QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 1);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(1));
+
+ // Checks that onRemove is called
+ QString removed = canvas->rootObject()->property("removed").toString();
+ QCOMPARE(removed, QString("Item1"));
+
+ // Confirm items positioned correctly
+ int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QVERIFY(item->x() == (i%3)*80);
+ QVERIFY(item->y() == (i/3)*60);
+ }
+
+ // Remove first item (which is the current item);
+ model.removeItem(0);
+
+ // let transitions settle.
+ QTest::qWait(100);
+
+ name = findItem<QDeclarativeText>(viewport, "textName", 0);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(0));
+ number = findItem<QDeclarativeText>(viewport, "textNumber", 0);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(0));
+
+ // Confirm items positioned correctly
+ itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QVERIFY(item->x() == (i%3)*80);
+ QVERIFY(item->y() == (i/3)*60);
+ }
+
+ // Remove items not visible
+ model.removeItem(25);
+ // let transitions settle.
+ QTest::qWait(100);
+
+ // Confirm items positioned correctly
+ itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QVERIFY(item->x() == (i%3)*80);
+ QVERIFY(item->y() == (i/3)*60);
+ }
+
+ // Remove items before visible
+ gridview->setContentY(120);
+ QTest::qWait(100);
+ gridview->setCurrentIndex(10);
+
+ // let transitions settle.
+ QTest::qWait(100);
+
+ // Setting currentIndex above shouldn't cause view to scroll
+ QCOMPARE(gridview->contentY(), 120.0);
+
+ model.removeItem(1);
+
+ // let transitions settle.
+ QTest::qWait(100);
+
+ // Confirm items positioned correctly
+ for (int i = 6; i < 18; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QVERIFY(item->x() == (i%3)*80);
+ QVERIFY(item->y() == (i/3)*60);
+ }
+
+ // Remove currentIndex
+ QDeclarativeItem *oldCurrent = gridview->currentItem();
+ model.removeItem(9);
+ QTest::qWait(100);
+
+ QCOMPARE(gridview->currentIndex(), 9);
+ QVERIFY(gridview->currentItem() != oldCurrent);
+
+ gridview->setContentY(0);
+ // let transitions settle.
+ QTest::qWait(100);
+
+ // Confirm items positioned correctly
+ itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QVERIFY(item->x() == (i%3)*80);
+ QVERIFY(item->y() == (i/3)*60);
+ }
+
+ // remove item outside current view.
+ gridview->setCurrentIndex(32);
+ QTest::qWait(100);
+ gridview->setContentY(240);
+
+ model.removeItem(30);
+ QVERIFY(gridview->currentIndex() == 31);
+
+ // remove current item beyond visible items.
+ gridview->setCurrentIndex(20);
+ QTest::qWait(100);
+ gridview->setContentY(0);
+ model.removeItem(20);
+ QTest::qWait(100);
+
+ QCOMPARE(gridview->currentIndex(), 20);
+ QVERIFY(gridview->currentItem() != 0);
+
+ // remove item before current, but visible
+ gridview->setCurrentIndex(8);
+ QTest::qWait(100);
+ gridview->setContentY(240);
+ oldCurrent = gridview->currentItem();
+ model.removeItem(6);
+ QTest::qWait(100);
+
+ QCOMPARE(gridview->currentIndex(), 7);
+ QVERIFY(gridview->currentItem() == oldCurrent);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeGridView::moved()
+{
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ for (int i = 0; i < 30; i++)
+ model.addItem("Item" + QString::number(i), "");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+ ctxt->setContextProperty("testTopToBottom", QVariant(false));
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/gridview.qml"));
+ qApp->processEvents();
+
+ QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
+ QVERIFY(gridview != 0);
+
+ QDeclarativeItem *viewport = gridview->viewport();
+ QVERIFY(viewport != 0);
+
+ model.moveItem(1, 8);
+
+ // let transitions settle.
+ QTest::qWait(100);
+
+ QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(1));
+ QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 1);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(1));
+
+ name = findItem<QDeclarativeText>(viewport, "textName", 8);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(8));
+ number = findItem<QDeclarativeText>(viewport, "textNumber", 8);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(8));
+
+ // Confirm items positioned correctly
+ int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QVERIFY(item->x() == (i%3)*80);
+ QVERIFY(item->y() == (i/3)*60);
+ }
+
+ gridview->setContentY(120);
+
+ // move outside visible area
+ model.moveItem(1, 25);
+
+ // let transitions settle.
+ QTest::qWait(100);
+
+ // Confirm items positioned correctly and indexes correct
+ itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count()-1;
+ for (int i = 6; i < model.count()-6 && i < itemCount+6; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->x(), qreal((i%3)*80));
+ QCOMPARE(item->y(), qreal((i/3)*60));
+ name = findItem<QDeclarativeText>(viewport, "textName", i);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(i));
+ number = findItem<QDeclarativeText>(viewport, "textNumber", i);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(i));
+ }
+
+ // move from outside visible into visible
+ model.moveItem(28, 8);
+
+ // let transitions settle.
+ QTest::qWait(100);
+
+ // Confirm items positioned correctly and indexes correct
+ for (int i = 6; i < model.count()-6 && i < itemCount+6; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QVERIFY(item->x() == (i%3)*80);
+ QVERIFY(item->y() == (i/3)*60);
+ name = findItem<QDeclarativeText>(viewport, "textName", i);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(i));
+ number = findItem<QDeclarativeText>(viewport, "textNumber", i);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(i));
+ }
+
+ delete canvas;
+}
+
+void tst_QDeclarativeGridView::currentIndex()
+{
+ TestModel model;
+ for (int i = 0; i < 30; i++)
+ model.addItem("Item" + QString::number(i), QString::number(i));
+
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setFixedSize(240,320);
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ QString filename(SRCDIR "/data/gridview-initCurrent.qml");
+ canvas->setSource(QUrl::fromLocalFile(filename));
+
+ qApp->processEvents();
+
+ QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
+ QVERIFY(gridview != 0);
+
+ QDeclarativeItem *viewport = gridview->viewport();
+ QVERIFY(viewport != 0);
+
+ QTest::qWait(300);
+
+ // current item should be third item
+ QCOMPARE(gridview->currentIndex(), 5);
+ QCOMPARE(gridview->currentItem(), findItem<QDeclarativeItem>(viewport, "wrapper", 5));
+ QCOMPARE(gridview->currentItem()->y(), gridview->highlightItem()->y());
+
+ gridview->moveCurrentIndexRight();
+ QCOMPARE(gridview->currentIndex(), 6);
+ gridview->moveCurrentIndexDown();
+ QCOMPARE(gridview->currentIndex(), 9);
+ gridview->moveCurrentIndexUp();
+ QCOMPARE(gridview->currentIndex(), 6);
+ gridview->moveCurrentIndexLeft();
+ QCOMPARE(gridview->currentIndex(), 5);
+
+ // no wrap
+ gridview->setCurrentIndex(0);
+ QCOMPARE(gridview->currentIndex(), 0);
+
+ gridview->moveCurrentIndexUp();
+ QCOMPARE(gridview->currentIndex(), 0);
+
+ gridview->moveCurrentIndexLeft();
+ QCOMPARE(gridview->currentIndex(), 0);
+
+ gridview->setCurrentIndex(model.count()-1);
+ QTest::qWait(100);
+ QCOMPARE(gridview->currentIndex(), model.count()-1);
+
+ gridview->moveCurrentIndexRight();
+ QCOMPARE(gridview->currentIndex(), model.count()-1);
+
+ gridview->moveCurrentIndexDown();
+ QCOMPARE(gridview->currentIndex(), model.count()-1);
+
+ // with wrap
+ gridview->setWrapEnabled(true);
+
+ gridview->setCurrentIndex(0);
+ QCOMPARE(gridview->currentIndex(), 0);
+ QTest::qWait(500);
+
+ gridview->moveCurrentIndexLeft();
+ QCOMPARE(gridview->currentIndex(), model.count()-1);
+
+ QTest::qWait(500);
+ QCOMPARE(gridview->contentY(), 279.0);
+
+ gridview->moveCurrentIndexRight();
+ QCOMPARE(gridview->currentIndex(), 0);
+
+ QTest::qWait(500);
+ QCOMPARE(gridview->contentY(), 0.0);
+
+ // Test keys
+ canvas->show();
+ qApp->setActiveWindow(canvas);
+#ifdef Q_WS_X11
+ // to be safe and avoid failing setFocus with window managers
+ qt_x11_wait_for_window_manager(canvas);
+#endif
+ QVERIFY(canvas->hasFocus());
+ QVERIFY(canvas->scene()->hasFocus());
+ qApp->processEvents();
+
+ QTest::keyClick(canvas, Qt::Key_Down);
+ QCOMPARE(gridview->currentIndex(), 3);
+
+ QTest::keyClick(canvas, Qt::Key_Up);
+ QCOMPARE(gridview->currentIndex(), 0);
+
+ gridview->setFlow(QDeclarativeGridView::TopToBottom);
+
+ QTest::keyClick(canvas, Qt::Key_Right);
+ QCOMPARE(gridview->currentIndex(), 5);
+
+ QTest::keyClick(canvas, Qt::Key_Left);
+ QCOMPARE(gridview->currentIndex(), 0);
+
+ QTest::keyClick(canvas, Qt::Key_Down);
+ QCOMPARE(gridview->currentIndex(), 1);
+
+ QTest::keyClick(canvas, Qt::Key_Up);
+ QCOMPARE(gridview->currentIndex(), 0);
+
+
+ // turn off auto highlight
+ gridview->setHighlightFollowsCurrentItem(false);
+ QVERIFY(gridview->highlightFollowsCurrentItem() == false);
+ QVERIFY(gridview->highlightItem());
+ qreal hlPosX = gridview->highlightItem()->x();
+ qreal hlPosY = gridview->highlightItem()->y();
+
+ gridview->setCurrentIndex(5);
+ QTest::qWait(500);
+ QCOMPARE(gridview->highlightItem()->x(), hlPosX);
+ QCOMPARE(gridview->highlightItem()->y(), hlPosY);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeGridView::changeFlow()
+{
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ for (int i = 0; i < 30; i++)
+ model.addItem("Item" + QString::number(i), QString::number(i));
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+ ctxt->setContextProperty("testTopToBottom", QVariant(false));
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/gridview.qml"));
+ qApp->processEvents();
+
+ QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
+ QVERIFY(gridview != 0);
+
+ QDeclarativeItem *viewport = gridview->viewport();
+ QVERIFY(viewport != 0);
+
+ // Confirm items positioned correctly and indexes correct
+ int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->x(), qreal((i%3)*80));
+ QCOMPARE(item->y(), qreal((i/3)*60));
+ QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", i);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(i));
+ QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", i);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(i));
+ }
+
+ ctxt->setContextProperty("testTopToBottom", QVariant(true));
+ QTest::qWait(100);
+
+ // Confirm items positioned correctly and indexes correct
+ itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->x(), qreal((i/5)*80));
+ QCOMPARE(item->y(), qreal((i%5)*60));
+ QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", i);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(i));
+ QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", i);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(i));
+ }
+
+ delete canvas;
+}
+
+void tst_QDeclarativeGridView::defaultValues()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/gridview3.qml"));
+ QDeclarativeGridView *obj = qobject_cast<QDeclarativeGridView*>(c.create());
+
+ QVERIFY(obj != 0);
+ QVERIFY(obj->model() == QVariant());
+ QVERIFY(obj->delegate() == 0);
+ QCOMPARE(obj->currentIndex(), -1);
+ QVERIFY(obj->currentItem() == 0);
+ QCOMPARE(obj->count(), 0);
+ QVERIFY(obj->highlight() == 0);
+ QVERIFY(obj->highlightItem() == 0);
+ QCOMPARE(obj->highlightFollowsCurrentItem(), true);
+ QVERIFY(obj->flow() == 0);
+ QCOMPARE(obj->isWrapEnabled(), false);
+ QCOMPARE(obj->cacheBuffer(), 0);
+ QCOMPARE(obj->cellWidth(), 100); //### Should 100 be the default?
+ QCOMPARE(obj->cellHeight(), 100);
+ delete obj;
+}
+
+void tst_QDeclarativeGridView::properties()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/gridview2.qml"));
+ QDeclarativeGridView *obj = qobject_cast<QDeclarativeGridView*>(c.create());
+
+ QVERIFY(obj != 0);
+ QVERIFY(obj->model() != QVariant());
+ QVERIFY(obj->delegate() != 0);
+ QCOMPARE(obj->currentIndex(), 0);
+ QVERIFY(obj->currentItem() != 0);
+ QCOMPARE(obj->count(), 4);
+ QVERIFY(obj->highlight() != 0);
+ QVERIFY(obj->highlightItem() != 0);
+ QCOMPARE(obj->highlightFollowsCurrentItem(), false);
+ QVERIFY(obj->flow() == 0);
+ QCOMPARE(obj->isWrapEnabled(), true);
+ QCOMPARE(obj->cacheBuffer(), 200);
+ QCOMPARE(obj->cellWidth(), 100);
+ QCOMPARE(obj->cellHeight(), 100);
+ delete obj;
+}
+
+void tst_QDeclarativeGridView::propertyChanges()
+{
+ QDeclarativeView *canvas = createView();
+ QVERIFY(canvas);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
+
+ QDeclarativeGridView *gridView = canvas->rootObject()->findChild<QDeclarativeGridView*>("gridView");
+ QVERIFY(gridView);
+
+ QSignalSpy keyNavigationWrapsSpy(gridView, SIGNAL(keyNavigationWrapsChanged()));
+ QSignalSpy cacheBufferSpy(gridView, SIGNAL(cacheBufferChanged()));
+ QSignalSpy flowSpy(gridView, SIGNAL(flowChanged()));
+
+ QCOMPARE(gridView->isWrapEnabled(), true);
+ QCOMPARE(gridView->cacheBuffer(), 10);
+ QCOMPARE(gridView->flow(), QDeclarativeGridView::LeftToRight);
+
+ gridView->setWrapEnabled(false);
+ gridView->setCacheBuffer(3);
+ gridView->setFlow(QDeclarativeGridView::TopToBottom);
+
+ QCOMPARE(gridView->isWrapEnabled(), false);
+ QCOMPARE(gridView->cacheBuffer(), 3);
+ QCOMPARE(gridView->flow(), QDeclarativeGridView::TopToBottom);
+
+ QCOMPARE(keyNavigationWrapsSpy.count(),1);
+ QCOMPARE(cacheBufferSpy.count(),1);
+ QCOMPARE(flowSpy.count(),1);
+
+ gridView->setWrapEnabled(false);
+ gridView->setCacheBuffer(3);
+ gridView->setFlow(QDeclarativeGridView::TopToBottom);
+
+ QCOMPARE(keyNavigationWrapsSpy.count(),1);
+ QCOMPARE(cacheBufferSpy.count(),1);
+ QCOMPARE(flowSpy.count(),1);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeGridView::componentChanges()
+{
+ QDeclarativeView *canvas = createView();
+ QVERIFY(canvas);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
+
+ QDeclarativeGridView *gridView = canvas->rootObject()->findChild<QDeclarativeGridView*>("gridView");
+ QVERIFY(gridView);
+
+ QDeclarativeComponent component(canvas->engine());
+ component.setData("import Qt 4.6; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile(""));
+
+ QDeclarativeComponent delegateComponent(canvas->engine());
+ delegateComponent.setData("import Qt 4.6; Text { text: '<b>Name:</b> ' + name }", QUrl::fromLocalFile(""));
+
+ QSignalSpy highlightSpy(gridView, SIGNAL(highlightChanged()));
+ QSignalSpy delegateSpy(gridView, SIGNAL(delegateChanged()));
+
+ gridView->setHighlight(&component);
+ gridView->setDelegate(&delegateComponent);
+
+ QCOMPARE(gridView->highlight(), &component);
+ QCOMPARE(gridView->delegate(), &delegateComponent);
+
+ QCOMPARE(highlightSpy.count(),1);
+ QCOMPARE(delegateSpy.count(),1);
+
+ gridView->setHighlight(&component);
+ gridView->setDelegate(&delegateComponent);
+
+ QCOMPARE(highlightSpy.count(),1);
+ QCOMPARE(delegateSpy.count(),1);
+ delete canvas;
+}
+
+void tst_QDeclarativeGridView::modelChanges()
+{
+ QDeclarativeView *canvas = createView();
+ QVERIFY(canvas);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
+
+ QDeclarativeGridView *gridView = canvas->rootObject()->findChild<QDeclarativeGridView*>("gridView");
+ QVERIFY(gridView);
+
+ QDeclarativeListModel *alternateModel = canvas->rootObject()->findChild<QDeclarativeListModel*>("alternateModel");
+ QVERIFY(alternateModel);
+ QVariant modelVariant = QVariant::fromValue(alternateModel);
+ QSignalSpy modelSpy(gridView, SIGNAL(modelChanged()));
+
+ gridView->setModel(modelVariant);
+ QCOMPARE(gridView->model(), modelVariant);
+ QCOMPARE(modelSpy.count(),1);
+
+ gridView->setModel(modelVariant);
+ QCOMPARE(modelSpy.count(),1);
+
+ gridView->setModel(QVariant());
+ QCOMPARE(modelSpy.count(),2);
+ delete canvas;
+}
+
+void tst_QDeclarativeGridView::positionViewAtIndex()
+{
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ for (int i = 0; i < 40; i++)
+ model.addItem("Item" + QString::number(i), "");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+ ctxt->setContextProperty("testTopToBottom", QVariant(false));
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/gridview.qml"));
+ qApp->processEvents();
+
+ QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
+ QVERIFY(gridview != 0);
+
+ QDeclarativeItem *viewport = gridview->viewport();
+ QVERIFY(viewport != 0);
+
+ // Confirm items positioned correctly
+ int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount-1; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->x(), (i%3)*80.);
+ QCOMPARE(item->y(), (i/3)*60.);
+ }
+
+ // Position on a currently visible item
+ gridview->positionViewAtIndex(4);
+ QCOMPARE(gridview->contentY(), 60.);
+
+ // Confirm items positioned correctly
+ itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 3; i < model.count() && i < itemCount-3-1; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->x(), (i%3)*80.);
+ QCOMPARE(item->y(), (i/3)*60.);
+ }
+
+ // Position on an item beyond the visible items
+ gridview->positionViewAtIndex(21);
+ QCOMPARE(gridview->contentY(), 420.);
+
+ // Confirm items positioned correctly
+ itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 22; i < model.count() && i < itemCount-22-1; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->x(), (i%3)*80.);
+ QCOMPARE(item->y(), (i/3)*60.);
+ }
+
+ // Position on an item that would leave empty space if positioned at the top
+ gridview->positionViewAtIndex(31);
+ QCOMPARE(gridview->contentY(), 520.);
+
+ // Confirm items positioned correctly
+ itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 24; i < model.count() && i < itemCount-24-1; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->x(), (i%3)*80.);
+ QCOMPARE(item->y(), (i/3)*60.);
+ }
+
+ // Position at the beginning again
+ gridview->positionViewAtIndex(0);
+ QCOMPARE(gridview->contentY(), 0.);
+
+ // Confirm items positioned correctly
+ itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount-1; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->x(), (i%3)*80.);
+ QCOMPARE(item->y(), (i/3)*60.);
+ }
+
+ delete canvas;
+}
+
+void tst_QDeclarativeGridView::resetModel()
+{
+ QDeclarativeView *canvas = createView();
+
+ QStringList strings;
+ strings << "one" << "two" << "three";
+ QStringListModel model(strings);
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/displaygrid.qml"));
+ qApp->processEvents();
+
+ QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
+ QVERIFY(gridview != 0);
+
+ QDeclarativeItem *viewport = gridview->viewport();
+ QVERIFY(viewport != 0);
+
+ QCOMPARE(gridview->count(), model.rowCount());
+
+ for (int i = 0; i < model.rowCount(); ++i) {
+ QDeclarativeText *display = findItem<QDeclarativeText>(viewport, "displayText", i);
+ QVERIFY(display != 0);
+ QCOMPARE(display->text(), strings.at(i));
+ }
+
+ strings.clear();
+ strings << "four" << "five" << "six" << "seven";
+ model.setStringList(strings);
+
+ QCOMPARE(gridview->count(), model.rowCount());
+
+ for (int i = 0; i < model.rowCount(); ++i) {
+ QDeclarativeText *display = findItem<QDeclarativeText>(viewport, "displayText", i);
+ QVERIFY(display != 0);
+ QCOMPARE(display->text(), strings.at(i));
+ }
+}
+
+void tst_QDeclarativeGridView::enforceRange()
+{
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ for (int i = 0; i < 30; i++)
+ model.addItem("Item" + QString::number(i), "");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/gridview-enforcerange.qml"));
+ qApp->processEvents();
+
+ QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
+ QVERIFY(gridview != 0);
+
+ QCOMPARE(gridview->preferredHighlightBegin(), 100.0);
+ QCOMPARE(gridview->preferredHighlightEnd(), 100.0);
+ QCOMPARE(gridview->highlightRangeMode(), QDeclarativeGridView::StrictlyEnforceRange);
+
+ QDeclarativeItem *viewport = gridview->viewport();
+ QVERIFY(viewport != 0);
+
+ // view should be positioned at the top of the range.
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", 0);
+ QVERIFY(item);
+ QCOMPARE(gridview->contentY(), -100.0);
+
+ QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 0);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(0));
+ QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 0);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(0));
+
+ // Check currentIndex is updated when viewport moves
+ gridview->setContentY(0);
+ QCOMPARE(gridview->currentIndex(), 2);
+
+ gridview->setCurrentIndex(5);
+ QTest::qWait(500);
+ QCOMPARE(gridview->contentY(), 100.);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeGridView::QTBUG_8456()
+{
+ QDeclarativeView *canvas = createView();
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/setindex.qml"));
+ qApp->processEvents();
+
+ QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
+ QVERIFY(gridview != 0);
+
+ QCOMPARE(gridview->currentIndex(), 0);
+}
+
+QDeclarativeView *tst_QDeclarativeGridView::createView()
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setFixedSize(240,320);
+
+ return canvas;
+}
+
+/*
+ Find an item with the specified objectName. If index is supplied then the
+ item must also evaluate the {index} expression equal to index
+*/
+template<typename T>
+T *tst_QDeclarativeGridView::findItem(QGraphicsObject *parent, const QString &objectName, int index)
+{
+ const QMetaObject &mo = T::staticMetaObject;
+ //qDebug() << parent->childItems().count() << "children";
+ for (int i = 0; i < parent->childItems().count(); ++i) {
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(parent->childItems().at(i));
+ if(!item)
+ continue;
+ //qDebug() << "try" << item;
+ if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) {
+ if (index != -1) {
+ QDeclarativeContext *context = QDeclarativeEngine::contextForObject(item);
+ if (context) {
+ if (context->contextProperty("index").toInt() == index) {
+ return static_cast<T*>(item);
+ }
+ }
+ } else {
+ return static_cast<T*>(item);
+ }
+ }
+ item = findItem<T>(item, objectName, index);
+ if (item)
+ return static_cast<T*>(item);
+ }
+
+ return 0;
+}
+
+template<typename T>
+QList<T*> tst_QDeclarativeGridView::findItems(QGraphicsObject *parent, const QString &objectName)
+{
+ QList<T*> items;
+ const QMetaObject &mo = T::staticMetaObject;
+ //qDebug() << parent->childItems().count() << "children";
+ for (int i = 0; i < parent->childItems().count(); ++i) {
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(parent->childItems().at(i));
+ if(!item)
+ continue;
+ //qDebug() << "try" << item;
+ if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) {
+ items.append(static_cast<T*>(item));
+ //qDebug() << " found:" << item;
+ }
+ items += findItems<T>(item, objectName);
+ }
+
+ return items;
+}
+
+void tst_QDeclarativeGridView::dumpTree(QDeclarativeItem *parent, int depth)
+{
+ static QString padding(" ");
+ for (int i = 0; i < parent->childItems().count(); ++i) {
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(parent->childItems().at(i));
+ if(!item)
+ continue;
+ QDeclarativeContext *context = QDeclarativeEngine::contextForObject(item);
+ qDebug() << padding.left(depth*2) << item << (context ? context->contextProperty("index").toInt() : -1);
+ dumpTree(item, depth+1);
+ }
+}
+
+
+QTEST_MAIN(tst_QDeclarativeGridView)
+
+#include "tst_qdeclarativegridview.moc"
diff --git a/tests/auto/declarative/qdeclarativeimage/data/colors.png b/tests/auto/declarative/qdeclarativeimage/data/colors.png
new file mode 100644
index 0000000000..dfb62f3d64
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeimage/data/colors.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativeimage/data/colors1.png b/tests/auto/declarative/qdeclarativeimage/data/colors1.png
new file mode 100644
index 0000000000..dfb62f3d64
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeimage/data/colors1.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro b/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
new file mode 100644
index 0000000000..7634c12797
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
@@ -0,0 +1,9 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui network
+macx:CONFIG -= app_bundle
+
+HEADERS += ../shared/testhttpserver.h
+SOURCES += tst_qdeclarativeimage.cpp ../shared/testhttpserver.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
new file mode 100644
index 0000000000..ed2095bc5d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
@@ -0,0 +1,253 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QTextDocument>
+#include <QTcpServer>
+#include <QTcpSocket>
+#include <QDir>
+
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativeimage_p.h>
+#include <private/qdeclarativeimagebase_p.h>
+#include <private/qdeclarativeloader_p.h>
+#include <QtDeclarative/qdeclarativecontext.h>
+
+#include "../shared/testhttpserver.h"
+
+
+#define SERVER_PORT 14445
+#define SERVER_ADDR "http://127.0.0.1:14445"
+
+#define TRY_WAIT(expr) \
+ do { \
+ for (int ii = 0; ii < 60; ++ii) { \
+ if ((expr)) break; \
+ QTest::qWait(50); \
+ } \
+ QVERIFY((expr)); \
+ } while (false)
+
+
+class tst_qdeclarativeimage : public QObject
+
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativeimage();
+
+private slots:
+ void noSource();
+ void imageSource();
+ void imageSource_data();
+ void clearSource();
+ void resized();
+ void smooth();
+ void pixmap();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+tst_qdeclarativeimage::tst_qdeclarativeimage()
+{
+}
+
+void tst_qdeclarativeimage::noSource()
+{
+ QString componentStr = "import Qt 4.6\nImage { source: \"\" }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->source(), QUrl());
+ QVERIFY(obj->status() == QDeclarativeImage::Null);
+ QCOMPARE(obj->width(), 0.);
+ QCOMPARE(obj->height(), 0.);
+ QCOMPARE(obj->fillMode(), QDeclarativeImage::Stretch);
+ QCOMPARE(obj->progress(), 0.0);
+
+ delete obj;
+}
+
+void tst_qdeclarativeimage::imageSource_data()
+{
+ QTest::addColumn<QString>("source");
+ QTest::addColumn<bool>("remote");
+ QTest::addColumn<bool>("async");
+ QTest::addColumn<QString>("error");
+
+ QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() << false << false << "";
+ QTest::newRow("local async") << QUrl::fromLocalFile(SRCDIR "/data/colors1.png").toString() << false << true << "";
+ QTest::newRow("local not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString() << false
+ << false << "Cannot open QUrl( \"" + QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString() + "\" ) ";
+ QTest::newRow("local async not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file-1.png").toString() << false
+ << true << "\"Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file-1.png").toString() + "\" ";
+ QTest::newRow("remote") << SERVER_ADDR "/colors.png" << true << false << "";
+ QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.png" << true << false
+ << "\"Error downloading " SERVER_ADDR "/no-such-file.png - server replied: Not found\" ";
+}
+
+void tst_qdeclarativeimage::imageSource()
+{
+ QFETCH(QString, source);
+ QFETCH(bool, remote);
+ QFETCH(bool, async);
+ QFETCH(QString, error);
+
+ TestHTTPServer server(SERVER_PORT);
+ if (remote) {
+ QVERIFY(server.isValid());
+ server.serveDirectory(SRCDIR "/data");
+ }
+
+ if (!error.isEmpty())
+ QTest::ignoreMessage(QtWarningMsg, error.toUtf8());
+
+ QString componentStr = "import Qt 4.6\nImage { source: \"" + source + "\"; asynchronous: "
+ + (async ? QLatin1String("true") : QLatin1String("false")) + " }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
+ QVERIFY(obj != 0);
+
+ if (remote || async)
+ TRY_WAIT(obj->status() == QDeclarativeImage::Loading);
+
+ QCOMPARE(obj->source(), remote ? source : QUrl(source));
+
+ if (error.isEmpty()) {
+ TRY_WAIT(obj->status() == QDeclarativeImage::Ready);
+ QCOMPARE(obj->width(), 120.);
+ QCOMPARE(obj->height(), 120.);
+ QCOMPARE(obj->fillMode(), QDeclarativeImage::Stretch);
+ QCOMPARE(obj->progress(), 1.0);
+ } else {
+ TRY_WAIT(obj->status() == QDeclarativeImage::Error);
+ }
+
+ delete obj;
+}
+
+void tst_qdeclarativeimage::clearSource()
+{
+ QString componentStr = "import Qt 4.6\nImage { source: srcImage }";
+ QDeclarativeContext *ctxt = engine.rootContext();
+ ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(SRCDIR "/data/colors.png"));
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
+ QVERIFY(obj != 0);
+ QVERIFY(obj->status() == QDeclarativeImage::Ready);
+ QCOMPARE(obj->width(), 120.);
+ QCOMPARE(obj->height(), 120.);
+ QCOMPARE(obj->progress(), 1.0);
+
+ ctxt->setContextProperty("srcImage", "");
+ QVERIFY(obj->source().isEmpty());
+ QVERIFY(obj->status() == QDeclarativeImage::Null);
+ QCOMPARE(obj->width(), 0.);
+ QCOMPARE(obj->height(), 0.);
+ QCOMPARE(obj->progress(), 0.0);
+}
+
+void tst_qdeclarativeimage::resized()
+{
+ QString componentStr = "import Qt 4.6\nImage { source: \"" SRCDIR "/data/colors.png\"; width: 300; height: 300 }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->width(), 300.);
+ QCOMPARE(obj->height(), 300.);
+ QCOMPARE(obj->fillMode(), QDeclarativeImage::Stretch);
+
+ delete obj;
+}
+
+void tst_qdeclarativeimage::smooth()
+{
+ QString componentStr = "import Qt 4.6\nImage { source: \"" SRCDIR "/data/colors.png\"; smooth: true; width: 300; height: 300 }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->width(), 300.);
+ QCOMPARE(obj->height(), 300.);
+ QCOMPARE(obj->smooth(), true);
+ QCOMPARE(obj->fillMode(), QDeclarativeImage::Stretch);
+
+ delete obj;
+}
+
+void tst_qdeclarativeimage::pixmap()
+{
+ QString componentStr = "import Qt 4.6\nImage { pixmap: testPixmap }";
+
+ QPixmap pixmap;
+ QDeclarativeContext *ctxt = engine.rootContext();
+ ctxt->setContextProperty("testPixmap", pixmap);
+
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+
+ QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->source(), QUrl());
+ QVERIFY(obj->status() == QDeclarativeImage::Null);
+ QCOMPARE(obj->width(), 0.);
+ QCOMPARE(obj->height(), 0.);
+ QCOMPARE(obj->fillMode(), QDeclarativeImage::Stretch);
+ QCOMPARE(obj->progress(), 0.0);
+ QVERIFY(obj->pixmap().isNull());
+
+ pixmap = QPixmap(SRCDIR "/data/colors.png");
+ ctxt->setContextProperty("testPixmap", pixmap);
+ QCOMPARE(obj->width(), 120.);
+ QCOMPARE(obj->height(), 120.);
+ QVERIFY(obj->status() == QDeclarativeImage::Ready);
+
+ delete obj;
+}
+
+QTEST_MAIN(tst_qdeclarativeimage)
+
+#include "tst_qdeclarativeimage.moc"
diff --git a/tests/auto/declarative/qdeclarativeimageprovider/data/exists.png b/tests/auto/declarative/qdeclarativeimageprovider/data/exists.png
new file mode 100644
index 0000000000..399bd0b1d9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeimageprovider/data/exists.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativeimageprovider/data/exists1.png b/tests/auto/declarative/qdeclarativeimageprovider/data/exists1.png
new file mode 100644
index 0000000000..399bd0b1d9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeimageprovider/data/exists1.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativeimageprovider/data/exists2.png b/tests/auto/declarative/qdeclarativeimageprovider/data/exists2.png
new file mode 100644
index 0000000000..399bd0b1d9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeimageprovider/data/exists2.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro b/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro
new file mode 100644
index 0000000000..a4d3eb27fa
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro
@@ -0,0 +1,12 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+QT += network
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativeimageprovider.cpp
+
+# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
+# LIBS += -lgcov
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
new file mode 100644
index 0000000000..c5bdfc898a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
@@ -0,0 +1,166 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtTest/QtTest>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativeimageprovider.h>
+#include <private/qdeclarativeimage_p.h>
+
+// QDeclarativeImageProvider::request() is run in an idle thread where possible
+// Be generous in our timeout.
+#define TRY_WAIT(expr) \
+ do { \
+ for (int ii = 0; ii < 10; ++ii) { \
+ if ((expr)) break; \
+ QTest::qWait(100); \
+ } \
+ QVERIFY((expr)); \
+ } while (false)
+
+
+class tst_qdeclarativeimageprovider : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativeimageprovider()
+ {
+ }
+
+private slots:
+ void imageSource();
+ void imageSource_data();
+ void removeProvider();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+class TestProvider : public QDeclarativeImageProvider
+{
+public:
+ QImage request(const QString &id) {
+ QImage image;
+ image.load(SRCDIR "/data/" + id);
+ return image;
+ }
+};
+
+void tst_qdeclarativeimageprovider::imageSource_data()
+{
+ QTest::addColumn<QString>("source");
+ QTest::addColumn<QString>("error");
+
+ QTest::newRow("exists") << "image://test/exists.png" << "";
+ QTest::newRow("missing") << "image://test/no-such-file.png"
+ << "\"Failed to get image from provider: image://test/no-such-file.png\" ";
+ QTest::newRow("unknown provider") << "image://bogus/exists.png"
+ << "\"Failed to get image from provider: image://bogus/exists.png\" ";
+}
+
+void tst_qdeclarativeimageprovider::imageSource()
+{
+ QFETCH(QString, source);
+ QFETCH(QString, error);
+
+ if (!error.isEmpty())
+ QTest::ignoreMessage(QtWarningMsg, error.toUtf8());
+
+ engine.addImageProvider("test", new TestProvider);
+ QVERIFY(engine.imageProvider("test") != 0);
+
+ QString componentStr = "import Qt 4.6\nImage { source: \"" + source + "\" }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
+ QVERIFY(obj != 0);
+
+ TRY_WAIT(obj->status() == QDeclarativeImage::Loading);
+
+ QCOMPARE(obj->source(), QUrl(source));
+
+ if (error.isEmpty()) {
+ TRY_WAIT(obj->status() == QDeclarativeImage::Ready);
+ QCOMPARE(obj->width(), 100.);
+ QCOMPARE(obj->height(), 100.);
+ QCOMPARE(obj->fillMode(), QDeclarativeImage::Stretch);
+ QCOMPARE(obj->progress(), 1.0);
+ } else {
+ TRY_WAIT(obj->status() == QDeclarativeImage::Error);
+ }
+
+ delete obj;
+}
+
+void tst_qdeclarativeimageprovider::removeProvider()
+{
+ engine.addImageProvider("test2", new TestProvider);
+ QVERIFY(engine.imageProvider("test2") != 0);
+
+ // add provider, confirm it works
+ QString componentStr = "import Qt 4.6\nImage { source: \"image://test2/exists1.png\" }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
+ QVERIFY(obj != 0);
+
+ TRY_WAIT(obj->status() == QDeclarativeImage::Loading);
+ TRY_WAIT(obj->status() == QDeclarativeImage::Ready);
+
+ QCOMPARE(obj->width(), 100.0);
+
+ // remove the provider and confirm
+ QString error("\"Failed to get image from provider: image://test2/exists2.png\" ");
+ QTest::ignoreMessage(QtWarningMsg, error.toUtf8());
+
+ engine.removeImageProvider("test2");
+
+ obj->setSource(QUrl("image://test2/exists2.png"));
+
+ TRY_WAIT(obj->status() == QDeclarativeImage::Loading);
+ TRY_WAIT(obj->status() == QDeclarativeImage::Error);
+
+ delete obj;
+}
+
+
+QTEST_MAIN(tst_qdeclarativeimageprovider)
+
+#include "tst_qdeclarativeimageprovider.moc"
diff --git a/tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml b/tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml
new file mode 100644
index 0000000000..cd5b426d06
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+QtObject {
+ property var nested
+
+ nested: QtObject {}
+}
+
diff --git a/tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml b/tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml
new file mode 100644
index 0000000000..a2ce78a6fb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+QtObject {
+ property var nested
+ nested: NestedObject { }
+ property var nested2: nested.nested
+}
+
diff --git a/tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml b/tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml
new file mode 100644
index 0000000000..ce05f89e78
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+QtObject {
+ property var nested
+
+ nested: QtObject {
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro b/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
new file mode 100644
index 0000000000..015c094f88
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativeinfo.cpp
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp b/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp
new file mode 100644
index 0000000000..aa3f03b155
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QPushButton>
+#include <QDeclarativeContext>
+#include <qdeclarativeinfo.h>
+
+class tst_qdeclarativeinfo : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativeinfo() {}
+
+private slots:
+ void qmlObject();
+ void nestedQmlObject();
+ void nonQmlObject();
+ void nullObject();
+ void nonQmlContextedObject();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+inline QUrl TEST_FILE(const QString &filename)
+{
+ return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename);
+}
+
+void tst_qdeclarativeinfo::qmlObject()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("qmlObject.qml"));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QString message = "QML QObject_QML_0 (" + component.url().toString() + ":3:1) Test Message";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
+ qmlInfo(object) << "Test Message";
+
+ QObject *nested = qvariant_cast<QObject *>(object->property("nested"));
+ QVERIFY(nested != 0);
+
+ message = "QML QtObject (" + component.url().toString() + ":6:13) Second Test Message";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
+ qmlInfo(nested) << "Second Test Message";
+}
+
+void tst_qdeclarativeinfo::nestedQmlObject()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("nestedQmlObject.qml"));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QObject *nested = qvariant_cast<QObject *>(object->property("nested"));
+ QVERIFY(nested != 0);
+ QObject *nested2 = qvariant_cast<QObject *>(object->property("nested2"));
+ QVERIFY(nested2 != 0);
+
+ QString message = "QML NestedObject (" + component.url().toString() + ":5:13) Outer Object";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
+ qmlInfo(nested) << "Outer Object";
+
+ message = "QML QtObject (" + TEST_FILE("NestedObject.qml").toString() + ":6:14) Inner Object";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
+ qmlInfo(nested2) << "Inner Object";
+}
+
+void tst_qdeclarativeinfo::nonQmlObject()
+{
+ QObject object;
+ QTest::ignoreMessage(QtWarningMsg, "QML QtObject (unknown location) Test Message");
+ qmlInfo(&object) << "Test Message";
+
+ QPushButton pbObject;
+ QTest::ignoreMessage(QtWarningMsg, "QML QPushButton (unknown location) Test Message");
+ qmlInfo(&pbObject) << "Test Message";
+}
+
+void tst_qdeclarativeinfo::nullObject()
+{
+ QTest::ignoreMessage(QtWarningMsg, "QML (unknown location) Null Object Test Message");
+ qmlInfo(0) << "Null Object Test Message";
+}
+
+void tst_qdeclarativeinfo::nonQmlContextedObject()
+{
+ QObject object;
+ QDeclarativeContext context(&engine);
+ QDeclarativeEngine::setContextForObject(&object, &context);
+ QTest::ignoreMessage(QtWarningMsg, "QML QtObject (unknown location) Test Message");
+ qmlInfo(&object) << "Test Message";
+}
+
+QTEST_MAIN(tst_qdeclarativeinfo)
+
+#include "tst_qdeclarativeinfo.moc"
diff --git a/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro b/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro
new file mode 100644
index 0000000000..b8f7d277b9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative script
+SOURCES += tst_qdeclarativeinstruction.cpp
+macx:CONFIG -= app_bundle
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
new file mode 100644
index 0000000000..636c5e3129
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
@@ -0,0 +1,585 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <private/qdeclarativecompiler_p.h>
+
+class tst_qdeclarativeinstruction : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativeinstruction() {}
+
+private slots:
+ void dump();
+};
+
+static QStringList messages;
+static void msgHandler(QtMsgType, const char *msg)
+{
+ messages << QLatin1String(msg);
+}
+
+void tst_qdeclarativeinstruction::dump()
+{
+ QDeclarativeCompiledData *data = new QDeclarativeCompiledData(0);
+ {
+ QDeclarativeInstruction i;
+ i.line = 0;
+ i.type = QDeclarativeInstruction::Init;
+ i.init.bindingsSize = 0;
+ i.init.parserStatusSize = 3;
+ i.init.contextCache = -1;
+ i.init.compiledBinding = -1;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeCompiledData::TypeReference ref;
+ ref.className = "Test";
+ data->types << ref;
+
+ QDeclarativeInstruction i;
+ i.line = 1;
+ i.type = QDeclarativeInstruction::CreateObject;
+ i.create.type = 0;
+ i.create.data = -1;
+ i.create.bindingBits = -1;
+ i.create.column = 10;
+ data->bytecode << i;
+ }
+
+ {
+ data->primitives << "testId";
+
+ QDeclarativeInstruction i;
+ i.line = 2;
+ i.type = QDeclarativeInstruction::SetId;
+ i.setId.value = 0;
+ i.setId.index = 0;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 3;
+ i.type = QDeclarativeInstruction::SetDefault;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 4;
+ i.type = QDeclarativeInstruction::CreateComponent;
+ i.createComponent.count = 3;
+ i.createComponent.column = 4;
+ i.createComponent.endLine = 14;
+ i.createComponent.metaObject = 0;
+
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 5;
+ i.type = QDeclarativeInstruction::StoreMetaObject;
+ i.storeMeta.data = 3;
+ i.storeMeta.aliasData = 6;
+ i.storeMeta.propertyCache = 7;
+
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 6;
+ i.type = QDeclarativeInstruction::StoreFloat;
+ i.storeFloat.propertyIndex = 3;
+ i.storeFloat.value = 11.3;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 7;
+ i.type = QDeclarativeInstruction::StoreDouble;
+ i.storeDouble.propertyIndex = 4;
+ i.storeDouble.value = 14.8;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 8;
+ i.type = QDeclarativeInstruction::StoreInteger;
+ i.storeInteger.propertyIndex = 5;
+ i.storeInteger.value = 9;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 9;
+ i.type = QDeclarativeInstruction::StoreBool;
+ i.storeBool.propertyIndex = 6;
+ i.storeBool.value = true;
+
+ data->bytecode << i;
+ }
+
+ {
+ data->primitives << "Test String";
+ QDeclarativeInstruction i;
+ i.line = 10;
+ i.type = QDeclarativeInstruction::StoreString;
+ i.storeString.propertyIndex = 7;
+ i.storeString.value = 1;
+ data->bytecode << i;
+ }
+
+ {
+ data->primitives << "http://www.nokia.com";
+ QDeclarativeInstruction i;
+ i.line = 11;
+ i.type = QDeclarativeInstruction::StoreUrl;
+ i.storeUrl.propertyIndex = 8;
+ i.storeUrl.value = 2;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 12;
+ i.type = QDeclarativeInstruction::StoreColor;
+ i.storeColor.propertyIndex = 9;
+ i.storeColor.value = 0xFF00FF00;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 13;
+ i.type = QDeclarativeInstruction::StoreDate;
+ i.storeDate.propertyIndex = 10;
+ i.storeDate.value = 9;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 14;
+ i.type = QDeclarativeInstruction::StoreTime;
+ i.storeTime.propertyIndex = 11;
+ i.storeTime.valueIndex = 33;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 15;
+ i.type = QDeclarativeInstruction::StoreDateTime;
+ i.storeDateTime.propertyIndex = 12;
+ i.storeDateTime.valueIndex = 44;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 16;
+ i.type = QDeclarativeInstruction::StorePoint;
+ i.storeRealPair.propertyIndex = 13;
+ i.storeRealPair.valueIndex = 3;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 17;
+ i.type = QDeclarativeInstruction::StorePointF;
+ i.storeRealPair.propertyIndex = 14;
+ i.storeRealPair.valueIndex = 9;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 18;
+ i.type = QDeclarativeInstruction::StoreSize;
+ i.storeRealPair.propertyIndex = 15;
+ i.storeRealPair.valueIndex = 8;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 19;
+ i.type = QDeclarativeInstruction::StoreSizeF;
+ i.storeRealPair.propertyIndex = 16;
+ i.storeRealPair.valueIndex = 99;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 20;
+ i.type = QDeclarativeInstruction::StoreRect;
+ i.storeRect.propertyIndex = 17;
+ i.storeRect.valueIndex = 2;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 21;
+ i.type = QDeclarativeInstruction::StoreRectF;
+ i.storeRect.propertyIndex = 18;
+ i.storeRect.valueIndex = 19;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 22;
+ i.type = QDeclarativeInstruction::StoreVector3D;
+ i.storeVector3D.propertyIndex = 19;
+ i.storeVector3D.valueIndex = 9;
+ data->bytecode << i;
+ }
+
+ {
+ data->primitives << "color(1, 1, 1, 1)";
+ QDeclarativeInstruction i;
+ i.line = 23;
+ i.type = QDeclarativeInstruction::StoreVariant;
+ i.storeString.propertyIndex = 20;
+ i.storeString.value = 3;
+
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 24;
+ i.type = QDeclarativeInstruction::StoreObject;
+ i.storeObject.propertyIndex = 21;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 25;
+ i.type = QDeclarativeInstruction::StoreVariantObject;
+ i.storeObject.propertyIndex = 22;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 26;
+ i.type = QDeclarativeInstruction::StoreInterface;
+ i.storeObject.propertyIndex = 23;
+ data->bytecode << i;
+ }
+
+ {
+ data->primitives << "console.log(1921)";
+
+ QDeclarativeInstruction i;
+ i.line = 27;
+ i.type = QDeclarativeInstruction::StoreSignal;
+ i.storeSignal.signalIndex = 2;
+ i.storeSignal.value = 4;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 28;
+ i.type = QDeclarativeInstruction::StoreScript;
+ i.storeScript.value = 2;
+ //i.storeScript.fileName = 18;
+ //i.storeScript.lineNumber = 28;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 29;
+ i.type = QDeclarativeInstruction::StoreScriptString;
+ i.storeScriptString.propertyIndex = 24;
+ i.storeScriptString.value = 3;
+ i.storeScriptString.scope = 1;
+ data->bytecode << i;
+ }
+
+ {
+ data->datas << "mySignal";
+
+ QDeclarativeInstruction i;
+ i.line = 30;
+ i.type = QDeclarativeInstruction::AssignSignalObject;
+ i.assignSignalObject.signal = 0;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 31;
+ i.type = QDeclarativeInstruction::AssignCustomType;
+ i.assignCustomType.propertyIndex = 25;
+ i.assignCustomType.valueIndex = 4;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 32;
+ i.type = QDeclarativeInstruction::StoreBinding;
+ i.assignBinding.property = 26;
+ i.assignBinding.value = 3;
+ i.assignBinding.context = 2;
+ i.assignBinding.owner = 0;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 33;
+ i.type = QDeclarativeInstruction::StoreCompiledBinding;
+ i.assignBinding.property = 27;
+ i.assignBinding.value = 2;
+ i.assignBinding.context = 4;
+ i.assignBinding.owner = 0;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 34;
+ i.type = QDeclarativeInstruction::StoreValueSource;
+ i.assignValueSource.property = 29;
+ i.assignValueSource.owner = 1;
+ i.assignValueSource.castValue = 4;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 35;
+ i.type = QDeclarativeInstruction::StoreValueInterceptor;
+ i.assignValueInterceptor.property = 30;
+ i.assignValueInterceptor.owner = 2;
+ i.assignValueInterceptor.castValue = -4;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 36;
+ i.type = QDeclarativeInstruction::BeginObject;
+ i.begin.castValue = 4;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 38;
+ i.type = QDeclarativeInstruction::StoreObjectQList;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 39;
+ i.type = QDeclarativeInstruction::AssignObjectList;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 40;
+ i.type = QDeclarativeInstruction::FetchAttached;
+ i.fetchAttached.id = 23;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 42;
+ i.type = QDeclarativeInstruction::FetchQList;
+ i.fetch.property = 32;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 43;
+ i.type = QDeclarativeInstruction::FetchObject;
+ i.fetch.property = 33;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 44;
+ i.type = QDeclarativeInstruction::FetchValueType;
+ i.fetchValue.property = 34;
+ i.fetchValue.type = 6;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 45;
+ i.type = QDeclarativeInstruction::PopFetchedObject;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 46;
+ i.type = QDeclarativeInstruction::PopQList;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 47;
+ i.type = QDeclarativeInstruction::PopValueType;
+ i.fetchValue.property = 35;
+ i.fetchValue.type = 8;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 48;
+ i.type = QDeclarativeInstruction::Defer;
+ i.defer.deferCount = 7;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = -1;
+ i.type = QDeclarativeInstruction::Defer;
+ i.defer.deferCount = 7;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
+ i.line = 50;
+ i.type = (QDeclarativeInstruction::Type)(QDeclarativeInstruction::Defer + 1); // Non-existant
+ data->bytecode << i;
+ }
+
+ QStringList expect;
+ expect
+ << "Index\tLine\tOperation\t\tData1\tData2\tData3\tComments"
+ << "-------------------------------------------------------------------------------"
+ << "0\t\t0\tINIT\t\t\t0\t3\t-1\t-1"
+ << "1\t\t1\tCREATE\t\t\t0\t\t\t\"Test\""
+ << "2\t\t2\tSETID\t\t\t0\t\t\t\"testId\""
+ << "3\t\t3\tSET_DEFAULT"
+ << "4\t\t4\tCREATE_COMPONENT\t3"
+ << "5\t\t5\tSTORE_META\t\t3"
+ << "6\t\t6\tSTORE_FLOAT\t\t3\t11.3"
+ << "7\t\t7\tSTORE_DOUBLE\t\t4\t14.8"
+ << "8\t\t8\tSTORE_INTEGER\t\t5\t9"
+ << "9\t\t9\tSTORE_BOOL\t\t6\ttrue"
+ << "10\t\t10\tSTORE_STRING\t\t7\t1\t\t\"Test String\""
+ << "11\t\t11\tSTORE_URL\t\t8\t2\t\t\"http://www.nokia.com\""
+ << "12\t\t12\tSTORE_COLOR\t\t9\t\t\t\"ff00ff00\""
+ << "13\t\t13\tSTORE_DATE\t\t10\t9"
+ << "14\t\t14\tSTORE_TIME\t\t11\t33"
+ << "15\t\t15\tSTORE_DATETIME\t\t12\t44"
+ << "16\t\t16\tSTORE_POINT\t\t13\t3"
+ << "17\t\t17\tSTORE_POINTF\t\t14\t9"
+ << "18\t\t18\tSTORE_SIZE\t\t15\t8"
+ << "19\t\t19\tSTORE_SIZEF\t\t16\t99"
+ << "20\t\t20\tSTORE_RECT\t\t17\t2"
+ << "21\t\t21\tSTORE_RECTF\t\t18\t19"
+ << "22\t\t22\tSTORE_VECTOR3D\t\t19\t9"
+ << "23\t\t23\tSTORE_VARIANT\t\t20\t3\t\t\"color(1, 1, 1, 1)\""
+ << "24\t\t24\tSTORE_OBJECT\t\t21"
+ << "25\t\t25\tSTORE_VARIANT_OBJECT\t22"
+ << "26\t\t26\tSTORE_INTERFACE\t\t23"
+ << "27\t\t27\tSTORE_SIGNAL\t\t2\t4\t\t\"console.log(1921)\""
+ << "28\t\t28\tSTORE_SCRIPT\t\t2"
+ << "29\t\t29\tSTORE_SCRIPT_STRING\t24\t3\t1"
+ << "30\t\t30\tASSIGN_SIGNAL_OBJECT\t0\t\t\t\"mySignal\""
+ << "31\t\t31\tASSIGN_CUSTOMTYPE\t25\t4"
+ << "32\t\t32\tSTORE_BINDING\t26\t3\t2"
+ << "33\t\t33\tSTORE_COMPILED_BINDING\t27\t2\t4"
+ << "34\t\t34\tSTORE_VALUE_SOURCE\t29\t4"
+ << "35\t\t35\tSTORE_VALUE_INTERCEPTOR\t30\t-4"
+ << "36\t\t36\tBEGIN\t\t\t4"
+ << "37\t\t38\tSTORE_OBJECT_QLIST"
+ << "38\t\t39\tASSIGN_OBJECT_LIST"
+ << "39\t\t40\tFETCH_ATTACHED\t\t23"
+ << "40\t\t42\tFETCH_QLIST\t\t32"
+ << "41\t\t43\tFETCH\t\t\t33"
+ << "42\t\t44\tFETCH_VALUE\t\t34\t6"
+ << "43\t\t45\tPOP"
+ << "44\t\t46\tPOP_QLIST"
+ << "45\t\t47\tPOP_VALUE\t\t35\t8"
+ << "46\t\t48\tDEFER\t\t\t7"
+ << "47\t\tNA\tDEFER\t\t\t7"
+ << "48\t\t50\tXXX UNKOWN INSTRUCTION\t47"
+ << "-------------------------------------------------------------------------------";
+
+ messages = QStringList();
+ QtMsgHandler old = qInstallMsgHandler(msgHandler);
+ data->dumpInstructions();
+ qInstallMsgHandler(old);
+
+ QCOMPARE(messages.count(), expect.count());
+ for (int ii = 0; ii < messages.count(); ++ii) {
+ QCOMPARE(messages.at(ii), expect.at(ii));
+ }
+
+ data->release();
+}
+
+QTEST_MAIN(tst_qdeclarativeinstruction)
+
+#include "tst_qdeclarativeinstruction.moc"
diff --git a/tests/auto/declarative/qdeclarativeitem/data/keynavigation.qml b/tests/auto/declarative/qdeclarativeitem/data/keynavigation.qml
new file mode 100644
index 0000000000..08da901ed5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeitem/data/keynavigation.qml
@@ -0,0 +1,47 @@
+import Qt 4.6
+
+Grid {
+ columns: 2
+ width: 100; height: 100
+ Rectangle {
+ id: item1
+ objectName: "item1"
+ focus: true
+ width: 50; height: 50
+ color: focus ? "red" : "lightgray"
+ KeyNavigation.right: item2
+ KeyNavigation.down: item3
+ KeyNavigation.tab: item2
+ KeyNavigation.backtab: item4
+ }
+ Rectangle {
+ id: item2
+ objectName: "item2"
+ width: 50; height: 50
+ color: focus ? "red" : "lightgray"
+ KeyNavigation.left: item1
+ KeyNavigation.down: item4
+ KeyNavigation.tab: item3
+ KeyNavigation.backtab: item1
+ }
+ Rectangle {
+ id: item3
+ objectName: "item3"
+ width: 50; height: 50
+ color: focus ? "red" : "lightgray"
+ KeyNavigation.right: item4
+ KeyNavigation.up: item1
+ KeyNavigation.tab: item4
+ KeyNavigation.backtab: item2
+ }
+ Rectangle {
+ id: item4
+ objectName: "item4"
+ width: 50; height: 50
+ color: focus ? "red" : "lightgray"
+ KeyNavigation.left: item3
+ KeyNavigation.up: item2
+ KeyNavigation.tab: item1
+ KeyNavigation.backtab: item3
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeitem/data/keys.qml b/tests/auto/declarative/qdeclarativeitem/data/keys.qml
new file mode 100644
index 0000000000..7d34fc8463
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeitem/data/keys.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+Item {
+ focus: true
+ Keys.onPressed: keysTestObject.keyPress(event.key, event.text, event.modifiers)
+ Keys.onReleased: { keysTestObject.keyRelease(event.key, event.text, event.modifiers); event.accepted = true; }
+ Keys.onReturnPressed: keysTestObject.keyPress(event.key, "Return", event.modifiers)
+ Keys.onDigit0Pressed: keysTestObject.keyPress(event.key, event.text, event.modifiers)
+ Keys.onDigit9Pressed: { event.accepted = false; keysTestObject.keyPress(event.key, event.text, event.modifiers) }
+ Keys.onTabPressed: keysTestObject.keyPress(event.key, "Tab", event.modifiers)
+ Keys.onBacktabPressed: keysTestObject.keyPress(event.key, "Backtab", event.modifiers)
+ Keys.forwardTo: [ item2 ]
+ Keys.enabled: enableKeyHanding
+
+ Item {
+ id: item2
+ Keys.onPressed: keysTestObject.forwardedKey(event.key)
+ Keys.onReleased: keysTestObject.forwardedKey(event.key)
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml b/tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml
new file mode 100644
index 0000000000..40a21063ee
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml
@@ -0,0 +1,43 @@
+import Qt 4.6
+
+Item {
+ id: root; objectName: "root"
+ width: 200; height: 200
+
+ Item { id: itemA; objectName: "itemA"; x: 50; y: 50 }
+
+ Item {
+ x: 50; y: 50
+ Item { id: itemB; objectName: "itemB"; x: 100; y: 100 }
+ }
+
+ function mapAToB(x, y) {
+ var pos = itemA.mapToItem(itemB, x, y)
+ return Qt.point(pos.x, pos.y)
+ }
+
+ function mapAFromB(x, y) {
+ var pos = itemA.mapFromItem(itemB, x, y)
+ return Qt.point(pos.x, pos.y)
+ }
+
+ function mapAToNull(x, y) {
+ var pos = itemA.mapToItem(null, x, y)
+ return Qt.point(pos.x, pos.y)
+ }
+
+ function mapAFromNull(x, y) {
+ var pos = itemA.mapFromItem(null, x, y)
+ return Qt.point(pos.x, pos.y)
+ }
+
+ function checkMapAToInvalid(x, y) {
+ var pos = itemA.mapToItem(1122, x, y)
+ return pos.x == undefined && pos.y == undefined
+ }
+
+ function checkMapAFromInvalid(x, y) {
+ var pos = itemA.mapFromItem(1122, x, y)
+ return pos.x == undefined && pos.y == undefined
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro b/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
new file mode 100644
index 0000000000..0eb2141f9c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativeitem.cpp
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
new file mode 100644
index 0000000000..bbcc86ebae
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
@@ -0,0 +1,422 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtTest/QSignalSpy>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativecontext.h>
+#include <QtDeclarative/qdeclarativeview.h>
+#include <QtDeclarative/qdeclarativeitem.h>
+
+class tst_QDeclarativeItem : public QObject
+
+{
+ Q_OBJECT
+public:
+ tst_QDeclarativeItem();
+
+private slots:
+ void keys();
+ void keyNavigation();
+ void smooth();
+ void clip();
+ void mapCoordinates();
+ void mapCoordinates_data();
+
+private:
+ template<typename T>
+ T *findItem(QGraphicsObject *parent, const QString &objectName);
+ QDeclarativeEngine engine;
+};
+
+class KeysTestObject : public QObject
+{
+ Q_OBJECT
+public:
+ KeysTestObject() : mKey(0), mModifiers(0), mForwardedKey(0) {}
+
+ void reset() {
+ mKey = 0;
+ mText = QString();
+ mModifiers = 0;
+ mForwardedKey = 0;
+ }
+
+public slots:
+ void keyPress(int key, QString text, int modifiers) {
+ mKey = key;
+ mText = text;
+ mModifiers = modifiers;
+ }
+ void keyRelease(int key, QString text, int modifiers) {
+ mKey = key;
+ mText = text;
+ mModifiers = modifiers;
+ }
+ void forwardedKey(int key) {
+ mForwardedKey = key;
+ }
+
+public:
+ int mKey;
+ QString mText;
+ int mModifiers;
+ int mForwardedKey;
+
+private:
+};
+
+
+tst_QDeclarativeItem::tst_QDeclarativeItem()
+{
+}
+
+void tst_QDeclarativeItem::keys()
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setFixedSize(240,320);
+
+ KeysTestObject *testObject = new KeysTestObject;
+ canvas->rootContext()->setContextProperty("keysTestObject", testObject);
+
+ canvas->rootContext()->setContextProperty("enableKeyHanding", QVariant(true));
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/keys.qml"));
+ canvas->show();
+ qApp->processEvents();
+
+ QEvent wa(QEvent::WindowActivate);
+ QApplication::sendEvent(canvas, &wa);
+ QFocusEvent fe(QEvent::FocusIn);
+ QApplication::sendEvent(canvas, &fe);
+
+ QKeyEvent key(QEvent::KeyPress, Qt::Key_A, Qt::NoModifier, "A", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QCOMPARE(testObject->mKey, int(Qt::Key_A));
+ QCOMPARE(testObject->mForwardedKey, int(Qt::Key_A));
+ QCOMPARE(testObject->mText, QLatin1String("A"));
+ QVERIFY(testObject->mModifiers == Qt::NoModifier);
+ QVERIFY(!key.isAccepted());
+
+ testObject->reset();
+
+ key = QKeyEvent(QEvent::KeyRelease, Qt::Key_A, Qt::ShiftModifier, "A", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QCOMPARE(testObject->mKey, int(Qt::Key_A));
+ QCOMPARE(testObject->mForwardedKey, int(Qt::Key_A));
+ QCOMPARE(testObject->mText, QLatin1String("A"));
+ QVERIFY(testObject->mModifiers == Qt::ShiftModifier);
+ QVERIFY(key.isAccepted());
+
+ testObject->reset();
+
+ key = QKeyEvent(QEvent::KeyPress, Qt::Key_Return, Qt::NoModifier, "", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QCOMPARE(testObject->mKey, int(Qt::Key_Return));
+ QCOMPARE(testObject->mForwardedKey, int(Qt::Key_Return));
+ QCOMPARE(testObject->mText, QLatin1String("Return"));
+ QVERIFY(testObject->mModifiers == Qt::NoModifier);
+ QVERIFY(key.isAccepted());
+
+ testObject->reset();
+
+ key = QKeyEvent(QEvent::KeyPress, Qt::Key_0, Qt::NoModifier, "0", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QCOMPARE(testObject->mKey, int(Qt::Key_0));
+ QCOMPARE(testObject->mForwardedKey, int(Qt::Key_0));
+ QCOMPARE(testObject->mText, QLatin1String("0"));
+ QVERIFY(testObject->mModifiers == Qt::NoModifier);
+ QVERIFY(key.isAccepted());
+
+ testObject->reset();
+
+ key = QKeyEvent(QEvent::KeyPress, Qt::Key_9, Qt::NoModifier, "9", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QCOMPARE(testObject->mKey, int(Qt::Key_9));
+ QCOMPARE(testObject->mForwardedKey, int(Qt::Key_9));
+ QCOMPARE(testObject->mText, QLatin1String("9"));
+ QVERIFY(testObject->mModifiers == Qt::NoModifier);
+ QVERIFY(!key.isAccepted());
+
+ testObject->reset();
+
+ key = QKeyEvent(QEvent::KeyPress, Qt::Key_Tab, Qt::NoModifier, "", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QCOMPARE(testObject->mKey, int(Qt::Key_Tab));
+ QCOMPARE(testObject->mForwardedKey, int(Qt::Key_Tab));
+ QCOMPARE(testObject->mText, QLatin1String("Tab"));
+ QVERIFY(testObject->mModifiers == Qt::NoModifier);
+ QVERIFY(key.isAccepted());
+
+ testObject->reset();
+
+ key = QKeyEvent(QEvent::KeyPress, Qt::Key_Backtab, Qt::NoModifier, "", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QCOMPARE(testObject->mKey, int(Qt::Key_Backtab));
+ QCOMPARE(testObject->mForwardedKey, int(Qt::Key_Backtab));
+ QCOMPARE(testObject->mText, QLatin1String("Backtab"));
+ QVERIFY(testObject->mModifiers == Qt::NoModifier);
+ QVERIFY(key.isAccepted());
+
+ testObject->reset();
+
+ canvas->rootContext()->setContextProperty("enableKeyHanding", QVariant(false));
+
+ key = QKeyEvent(QEvent::KeyPress, Qt::Key_Return, Qt::NoModifier, "", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QCOMPARE(testObject->mKey, 0);
+ QVERIFY(!key.isAccepted());
+
+ delete canvas;
+ delete testObject;
+}
+
+void tst_QDeclarativeItem::keyNavigation()
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setFixedSize(240,320);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/keynavigation.qml"));
+ canvas->show();
+ qApp->processEvents();
+
+ QEvent wa(QEvent::WindowActivate);
+ QApplication::sendEvent(canvas, &wa);
+ QFocusEvent fe(QEvent::FocusIn);
+ QApplication::sendEvent(canvas, &fe);
+
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(canvas->rootObject(), "item1");
+ QVERIFY(item);
+ QVERIFY(item->hasFocus());
+
+ // right
+ QKeyEvent key(QEvent::KeyPress, Qt::Key_Right, Qt::NoModifier, "", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QVERIFY(key.isAccepted());
+
+ item = findItem<QDeclarativeItem>(canvas->rootObject(), "item2");
+ QVERIFY(item);
+ QVERIFY(item->hasFocus());
+
+ // down
+ key = QKeyEvent(QEvent::KeyPress, Qt::Key_Down, Qt::NoModifier, "", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QVERIFY(key.isAccepted());
+
+ item = findItem<QDeclarativeItem>(canvas->rootObject(), "item4");
+ QVERIFY(item);
+ QVERIFY(item->hasFocus());
+
+ // left
+ key = QKeyEvent(QEvent::KeyPress, Qt::Key_Left, Qt::NoModifier, "", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QVERIFY(key.isAccepted());
+
+ item = findItem<QDeclarativeItem>(canvas->rootObject(), "item3");
+ QVERIFY(item);
+ QVERIFY(item->hasFocus());
+
+ // up
+ key = QKeyEvent(QEvent::KeyPress, Qt::Key_Up, Qt::NoModifier, "", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QVERIFY(key.isAccepted());
+
+ item = findItem<QDeclarativeItem>(canvas->rootObject(), "item1");
+ QVERIFY(item);
+ QVERIFY(item->hasFocus());
+
+ // tab
+ key = QKeyEvent(QEvent::KeyPress, Qt::Key_Tab, Qt::NoModifier, "", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QVERIFY(key.isAccepted());
+
+ item = findItem<QDeclarativeItem>(canvas->rootObject(), "item2");
+ QVERIFY(item);
+ QVERIFY(item->hasFocus());
+
+ // backtab
+ key = QKeyEvent(QEvent::KeyPress, Qt::Key_Backtab, Qt::NoModifier, "", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QVERIFY(key.isAccepted());
+
+ item = findItem<QDeclarativeItem>(canvas->rootObject(), "item1");
+ QVERIFY(item);
+ QVERIFY(item->hasFocus());
+
+ delete canvas;
+}
+
+void tst_QDeclarativeItem::smooth()
+{
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.6; Item { smooth: false; }", QUrl::fromLocalFile(""));
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QSignalSpy spy(item, SIGNAL(smoothChanged()));
+
+ QVERIFY(item);
+ QVERIFY(!item->smooth());
+
+ item->setSmooth(true);
+ QVERIFY(item->smooth());
+ QCOMPARE(spy.count(),1);
+ item->setSmooth(true);
+ QCOMPARE(spy.count(),1);
+
+ item->setSmooth(false);
+ QVERIFY(!item->smooth());
+ QCOMPARE(spy.count(),2);
+ item->setSmooth(false);
+ QCOMPARE(spy.count(),2);
+
+ delete item;
+}
+
+void tst_QDeclarativeItem::clip()
+{
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.6\nItem { clip: false\n }", QUrl::fromLocalFile(""));
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QSignalSpy spy(item, SIGNAL(clipChanged()));
+
+ QVERIFY(item);
+ QVERIFY(!item->clip());
+
+ item->setClip(true);
+ QVERIFY(item->clip());
+ QCOMPARE(spy.count(),1);
+ item->setClip(true);
+ QCOMPARE(spy.count(),1);
+
+ item->setClip(false);
+ QVERIFY(!item->clip());
+ QCOMPARE(spy.count(),2);
+ item->setClip(false);
+ QCOMPARE(spy.count(),2);
+
+ delete item;
+}
+
+void tst_QDeclarativeItem::mapCoordinates()
+{
+ QFETCH(int, x);
+ QFETCH(int, y);
+
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setFixedSize(300, 300);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/mapCoordinates.qml"));
+ canvas->show();
+ qApp->processEvents();
+
+ QDeclarativeItem *root = qobject_cast<QDeclarativeItem*>(canvas->rootObject());
+ QVERIFY(root != 0);
+ QDeclarativeItem *a = findItem<QDeclarativeItem>(canvas->rootObject(), "itemA");
+ QVERIFY(a != 0);
+ QDeclarativeItem *b = findItem<QDeclarativeItem>(canvas->rootObject(), "itemB");
+ QVERIFY(b != 0);
+
+ QVariant result;
+
+ QVERIFY(QMetaObject::invokeMethod(root, "mapAToB",
+ Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y)));
+ QCOMPARE(result.value<QPointF>(), qobject_cast<QGraphicsItem*>(a)->mapToItem(b, x, y));
+
+ QVERIFY(QMetaObject::invokeMethod(root, "mapAFromB",
+ Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y)));
+ QCOMPARE(result.value<QPointF>(), qobject_cast<QGraphicsItem*>(a)->mapFromItem(b, x, y));
+
+ QVERIFY(QMetaObject::invokeMethod(root, "mapAToNull",
+ Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y)));
+ QCOMPARE(result.value<QPointF>(), qobject_cast<QGraphicsItem*>(a)->mapToScene(x, y));
+
+ QVERIFY(QMetaObject::invokeMethod(root, "mapAFromNull",
+ Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y)));
+ QCOMPARE(result.value<QPointF>(), qobject_cast<QGraphicsItem*>(a)->mapFromScene(x, y));
+
+ QTest::ignoreMessage(QtWarningMsg, "mapToItem() given argument \"1122\" which is neither null nor an Item");
+ QVERIFY(QMetaObject::invokeMethod(root, "checkMapAToInvalid",
+ Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y)));
+ QVERIFY(result.toBool());
+
+ QTest::ignoreMessage(QtWarningMsg, "mapFromItem() given argument \"1122\" which is neither null nor an Item");
+ QVERIFY(QMetaObject::invokeMethod(root, "checkMapAFromInvalid",
+ Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y)));
+ QVERIFY(result.toBool());
+
+ delete canvas;
+}
+
+void tst_QDeclarativeItem::mapCoordinates_data()
+{
+ QTest::addColumn<int>("x");
+ QTest::addColumn<int>("y");
+
+ for (int i=-20; i<=20; i+=10)
+ QTest::newRow(QTest::toString(i)) << i << i;
+}
+
+template<typename T>
+T *tst_QDeclarativeItem::findItem(QGraphicsObject *parent, const QString &objectName)
+{
+ if (!parent)
+ return 0;
+
+ const QMetaObject &mo = T::staticMetaObject;
+ //qDebug() << parent->QGraphicsObject::children().count() << "children";
+ for (int i = 0; i < parent->childItems().count(); ++i) {
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(parent->childItems().at(i));
+ if(!item)
+ continue;
+ //qDebug() << "try" << item;
+ if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName))
+ return static_cast<T*>(item);
+ item = findItem<T>(item, objectName);
+ if (item)
+ return static_cast<T*>(item);
+ }
+
+ return 0;
+}
+
+
+
+QTEST_MAIN(tst_QDeclarativeItem)
+
+#include "tst_qdeclarativeitem.moc"
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/Alias.qml b/tests/auto/declarative/qdeclarativelanguage/data/Alias.qml
new file mode 100644
index 0000000000..55aa2312b1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/Alias.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+QtObject {
+ id: root
+ property int value: 1892
+ property alias aliasValue: root.value
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml b/tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml
new file mode 100644
index 0000000000..6362b2dd21
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml
@@ -0,0 +1,9 @@
+import Test 1.0
+import Qt 4.6
+
+QtObject {
+ property var other
+ other: MyTypeObject { id: obj }
+ property alias enumAlias: obj.enumProperty;
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml b/tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml
new file mode 100644
index 0000000000..d1e78f82b9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml
@@ -0,0 +1,12 @@
+import Test 1.0
+import Qt 4.6
+
+QtObject {
+ property alias obj : otherObj
+ property var child
+ child: QtObject {
+ id: otherObj
+ property int myValue: 10
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/Alias4.qml b/tests/auto/declarative/qdeclarativelanguage/data/Alias4.qml
new file mode 100644
index 0000000000..573674c021
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/Alias4.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+import Qt 4.6
+
+Alias3 {}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/ComponentComposite.qml b/tests/auto/declarative/qdeclarativelanguage/data/ComponentComposite.qml
new file mode 100644
index 0000000000..05fbc3fdbd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/ComponentComposite.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+Component {
+ QtObject {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/CompositeType.qml b/tests/auto/declarative/qdeclarativelanguage/data/CompositeType.qml
new file mode 100644
index 0000000000..99d010f02f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/CompositeType.qml
@@ -0,0 +1,4 @@
+import Qt 4.6
+
+QtObject {
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/CompositeType2.qml b/tests/auto/declarative/qdeclarativelanguage/data/CompositeType2.qml
new file mode 100644
index 0000000000..86210e9072
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/CompositeType2.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+
+MyQmlObject {
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/CompositeType3.qml b/tests/auto/declarative/qdeclarativelanguage/data/CompositeType3.qml
new file mode 100644
index 0000000000..d08f35bb54
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/CompositeType3.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+QtObject {
+ property int a
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/CompositeType4.qml b/tests/auto/declarative/qdeclarativelanguage/data/CompositeType4.qml
new file mode 100644
index 0000000000..a6a8168d8f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/CompositeType4.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyQmlObject {
+ property int a
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/DynamicPropertiesNestedType.qml b/tests/auto/declarative/qdeclarativelanguage/data/DynamicPropertiesNestedType.qml
new file mode 100644
index 0000000000..aefbf9a2a1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/DynamicPropertiesNestedType.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+QtObject {
+ property int super_a: 10
+ property int super_c: 14
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml b/tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml
new file mode 100644
index 0000000000..dc3b382b23
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml
@@ -0,0 +1,9 @@
+import Test 1.0
+import Qt 4.6
+
+QtObject {
+ property var child
+ child: QtObject { id: obj }
+ property alias objAlias: obj;
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/I18n.qml b/tests/auto/declarative/qdeclarativelanguage/data/I18n.qml
new file mode 100644
index 0000000000..558c836e52
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/I18n.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ property int áâãäå: 10
+ stringProperty: "Test áâãäå: " + áâãäå
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/I18nType30.qml b/tests/auto/declarative/qdeclarativelanguage/data/I18nType30.qml
new file mode 100644
index 0000000000..42dbc69044
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/I18nType30.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+
+MyTypeObject {
+ stringProperty: "Test áâãäå: 30"
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/MyComponent.qml b/tests/auto/declarative/qdeclarativelanguage/data/MyComponent.qml
new file mode 100644
index 0000000000..1a23277ff8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/MyComponent.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyQmlObject {
+ property real x;
+ property real y;
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/MyCompositeValueSource.qml b/tests/auto/declarative/qdeclarativelanguage/data/MyCompositeValueSource.qml
new file mode 100644
index 0000000000..e620e26490
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/MyCompositeValueSource.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyPropertyValueSource {
+ property int x
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/MyContainerComponent.qml b/tests/auto/declarative/qdeclarativelanguage/data/MyContainerComponent.qml
new file mode 100644
index 0000000000..61f54c5eb8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/MyContainerComponent.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+
+MyContainer {
+ property int x
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/NestedAlias.qml b/tests/auto/declarative/qdeclarativelanguage/data/NestedAlias.qml
new file mode 100644
index 0000000000..5155612264
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/NestedAlias.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+QtObject {
+ property QtObject o1
+ property QtObject o2
+
+ property alias a: object2.a
+
+ o1: QtObject { id: object1 }
+ o2: QtObject {
+ id: object2
+ property int a: 1923
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/NestedErrorsType.qml b/tests/auto/declarative/qdeclarativelanguage/data/NestedErrorsType.qml
new file mode 100644
index 0000000000..5cc8d20ff2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/NestedErrorsType.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+Item {
+ x: "You can't assign a string to a real!"
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/OnCompletedType.qml b/tests/auto/declarative/qdeclarativelanguage/data/OnCompletedType.qml
new file mode 100644
index 0000000000..2889caf031
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/OnCompletedType.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property int a: Math.max(10, 9)
+ property int b: 11
+ Component.onCompleted: console.log("Completed " + a + " " + b);
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.1.qml
new file mode 100644
index 0000000000..500b0f66d6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.1.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+import Qt 4.6
+
+QtObject {
+ id: root
+ property int value: 10
+ property alias valueAlias: root.value
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.2.qml
new file mode 100644
index 0000000000..5c922709fe
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.2.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+
+MyQmlObject {
+ id: root
+ property alias aliasObject: root.qmlobjectProperty
+
+ qmlobjectProperty: MyQmlObject { value : 10 }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml
new file mode 100644
index 0000000000..e059937b2d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+QtObject {
+ property var other
+ other: Alias { id: myAliasObject }
+
+ property alias value: myAliasObject.aliasValue
+ property alias value2: myAliasObject.value
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.4.qml
new file mode 100644
index 0000000000..bd6a769367
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.4.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+Alias2 {
+ enumAlias: MyTypeObject.EnumVal2
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml
new file mode 100644
index 0000000000..4316d0d7d7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml
@@ -0,0 +1,13 @@
+import Qt 4.6
+import Test 1.0
+
+QtObject {
+ property alias otherAlias: otherObject
+
+ property var other
+ other: MyQmlObject {
+ id: otherObject
+ value: 10
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.6.qml
new file mode 100644
index 0000000000..e3af23090d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.6.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+QtObject {
+ property QtObject o;
+ property alias a: object.a
+ o: NestedAlias { id: object }
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.7.qml
new file mode 100644
index 0000000000..a9a57eb2e9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.7.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+QtObject {
+ property QtObject object
+ property alias aliasedObject: target.object
+
+ object: QtObject {
+ id: target
+
+ property QtObject object
+ object: QtObject {}
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml
new file mode 100644
index 0000000000..2b9ad85e0f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+QtObject {
+ property var other
+ other: Alias3 { id: myAliasObject }
+
+ property int value: myAliasObject.obj.myValue
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml
new file mode 100644
index 0000000000..a2a41a1729
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+QtObject {
+ property var other
+ other: Alias4 { id: myAliasObject }
+
+ property int value: myAliasObject.obj.myValue
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignBasicTypes.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignBasicTypes.qml
new file mode 100644
index 0000000000..9fe0ded459
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/assignBasicTypes.qml
@@ -0,0 +1,27 @@
+import Test 1.0
+MyTypeObject {
+ flagProperty: "FlagVal1 | FlagVal3"
+ enumProperty: "EnumVal2"
+ stringProperty: "Hello World!"
+ uintProperty: 10
+ intProperty: -19
+ realProperty: 23.2
+ doubleProperty: -19.7
+ floatProperty: 8.5
+ colorProperty: "red"
+ dateProperty: "1982-11-25"
+ timeProperty: "11:11:32"
+ dateTimeProperty: "2009-05-12T13:22:01"
+ pointProperty: "99,13"
+ pointFProperty: "-10.1,12.3"
+ sizeProperty: "99x13"
+ sizeFProperty: "0.1x0.2"
+ rectProperty: "9,7,100x200"
+ rectFProperty: "1000.1,-10.9,400x90.99"
+ boolProperty: true
+ variantProperty: "Hello World!"
+ vectorProperty: "10,1,2.2"
+ urlProperty: "main.qml"
+
+ objectProperty: MyTypeObject { intProperty: 8 }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignCompositeToType.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignCompositeToType.qml
new file mode 100644
index 0000000000..f6422bdcb1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/assignCompositeToType.qml
@@ -0,0 +1,18 @@
+import Qt 4.6
+import Test 1.0
+
+QtObject {
+ property QtObject myProperty
+ property QtObject myProperty2
+ property QtObject myProperty3
+ property QtObject myProperty4
+ property MyQmlObject myProperty5
+ property MyQmlObject myProperty6
+
+ myProperty: CompositeType {}
+ myProperty2: CompositeType2 {}
+ myProperty3: CompositeType3 {}
+ myProperty4: CompositeType4 {}
+ myProperty5: CompositeType2 {}
+ myProperty6: CompositeType4 {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralSignalProperty.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralSignalProperty.qml
new file mode 100644
index 0000000000..399fcea04d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralSignalProperty.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ onLiteralSignal: 10
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToSignal.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToSignal.qml
new file mode 100644
index 0000000000..789cc66215
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToSignal.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ onBasicSignal: MyQmlObject {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml
new file mode 100644
index 0000000000..0ff9370a0e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+import Qt 4.6
+
+QtObject {
+ property var a;
+ a: MyQmlObject {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignQmlComponent.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignQmlComponent.qml
new file mode 100644
index 0000000000..20bdc559c1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/assignQmlComponent.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyContainer {
+ MyComponent { x: 10; y: 11; }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignSignal.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignSignal.qml
new file mode 100644
index 0000000000..2a48df8fcf
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/assignSignal.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyQmlObject {
+ onBasicSignal: basicSlot()
+ onBasicParameterizedSignal: basicSlotWithArgs(parameter)
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignTypeExtremes.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignTypeExtremes.qml
new file mode 100644
index 0000000000..60ede525e4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/assignTypeExtremes.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyTypeObject {
+ uintProperty: 4000000000
+ intProperty: -2000000000
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/attachedProperties.qml b/tests/auto/declarative/qdeclarativelanguage/data/attachedProperties.qml
new file mode 100644
index 0000000000..b46ec34c4f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/attachedProperties.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+import Test 1.0 as Namespace
+import Qt 4.6
+
+QtObject {
+ MyQmlObject.value: 10
+ Namespace.MyQmlObject.value2: 13
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/autoComponentCreation.qml b/tests/auto/declarative/qdeclarativelanguage/data/autoComponentCreation.qml
new file mode 100644
index 0000000000..5d00144eaf
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/autoComponentCreation.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyTypeObject {
+ componentProperty : MyTypeObject { realProperty: 9 }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/autoNotifyConnection.qml b/tests/auto/declarative/qdeclarativelanguage/data/autoNotifyConnection.qml
new file mode 100644
index 0000000000..640fb54f99
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/autoNotifyConnection.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+MyQmlObject {
+ property bool receivedNotify : false
+ onPropertyWithNotifyChanged: { receivedNotify = true; }
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/component.1.errors.txt
new file mode 100644
index 0000000000..091aad61fa
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.1.errors.txt
@@ -0,0 +1 @@
+3:1:Cannot create empty component specification
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.1.qml
new file mode 100644
index 0000000000..07e463ab76
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.1.qml
@@ -0,0 +1,4 @@
+import Qt 4.6
+
+Component {
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/component.2.errors.txt
new file mode 100644
index 0000000000..76e7656a62
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.2.errors.txt
@@ -0,0 +1 @@
+6:9:id is not unique
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.2.qml
new file mode 100644
index 0000000000..88e0f7378c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.2.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+Item {
+ id: myId
+ Component {
+ id: myId
+ QtObject {}
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/component.3.errors.txt
new file mode 100644
index 0000000000..450fc163bd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.3.errors.txt
@@ -0,0 +1 @@
+6:9:Property value set multiple times
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.3.qml
new file mode 100644
index 0000000000..287a959173
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.3.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+Item {
+ Component {
+ id: myId
+ id: myId2
+ QtObject {}
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.4.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/component.4.errors.txt
new file mode 100644
index 0000000000..2ab18685c8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.4.errors.txt
@@ -0,0 +1 @@
+3:1:Invalid component body specification
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.4.qml
new file mode 100644
index 0000000000..ab1e29be78
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.4.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+Component {
+ QtObject {}
+ QtObject {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.5.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/component.5.errors.txt
new file mode 100644
index 0000000000..e3c2df755f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.5.errors.txt
@@ -0,0 +1 @@
+4:5:Component elements may not contain properties other than id
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.5.qml
new file mode 100644
index 0000000000..629e9988db
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.5.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+Component {
+ x: 10
+ QtObject {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.6.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/component.6.errors.txt
new file mode 100644
index 0000000000..2b1c6ca606
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.6.errors.txt
@@ -0,0 +1 @@
+4:5:Invalid component id specification
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.6.qml
new file mode 100644
index 0000000000..2303ebf001
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/component.6.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+Component {
+ id: QtObject {}
+ QtObject {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml b/tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml
new file mode 100644
index 0000000000..0a7249ad31
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+QtObject {
+ property var test
+
+ test: ComponentComposite {}
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/cppnamespace.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/cppnamespace.2.qml
new file mode 100644
index 0000000000..e3b32ca5d8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/cppnamespace.2.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+
+MySecondNamespacedType {
+ list: [ MyNamespacedType {} ]
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/cppnamespace.qml b/tests/auto/declarative/qdeclarativelanguage/data/cppnamespace.qml
new file mode 100644
index 0000000000..e1daf3b78f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/cppnamespace.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+
+MyNamespacedType {
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/crash2.qml b/tests/auto/declarative/qdeclarativelanguage/data/crash2.qml
new file mode 100644
index 0000000000..a22c776678
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/crash2.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+QtObject {
+ objectName: "Hello" + "World"
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml b/tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml
new file mode 100644
index 0000000000..7cd6a83d65
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+QtObject {
+ property int on
+
+ Component.onCompleted: on = 10
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.errors.txt
new file mode 100644
index 0000000000..43a8bb28b3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.errors.txt
@@ -0,0 +1 @@
+4:19:ListElement: cannot use reserved "id" property
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.qml b/tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.qml
new file mode 100644
index 0000000000..00cc0c46eb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+ListModel {
+ ListElement { a: 10 }
+ ListElement { id: foo; a: 12 }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/customParserTypes.qml b/tests/auto/declarative/qdeclarativelanguage/data/customParserTypes.qml
new file mode 100644
index 0000000000..cf2f272a62
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/customParserTypes.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+ListModel {
+ ListElement { a: 10 }
+ ListElement { a: 12 }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/customVariantTypes.qml b/tests/auto/declarative/qdeclarativelanguage/data/customVariantTypes.qml
new file mode 100644
index 0000000000..0263ed20f2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/customVariantTypes.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ customType: "10"
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/declaredPropertyValues.qml b/tests/auto/declarative/qdeclarativelanguage/data/declaredPropertyValues.qml
new file mode 100644
index 0000000000..3987a3cacd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/declaredPropertyValues.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+QtObject {
+ property int a: 10
+ property int b: 10 + a
+ property QtObject c: QtObject {}
+ property list<QtObject> d: [ QtObject {}, QtObject {} ]
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.errors.txt
new file mode 100644
index 0000000000..32055f6608
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.errors.txt
@@ -0,0 +1 @@
+7:9:Cannot assign a value directly to a grouped property
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.qml b/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.qml
new file mode 100644
index 0000000000..0fd14047c6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.qml
@@ -0,0 +1,10 @@
+import Test 1.0
+import Qt 4.6
+
+MyTypeObject {
+ grouped {
+ script: console.log(1921)
+ QtObject {}
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/defaultPropertyListOrder.qml b/tests/auto/declarative/qdeclarativelanguage/data/defaultPropertyListOrder.qml
new file mode 100644
index 0000000000..3651511376
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/defaultPropertyListOrder.qml
@@ -0,0 +1,29 @@
+import Test 1.0
+import Qt 4.6
+
+MyContainer {
+ QtObject {
+ property int index: 0
+ }
+
+ QtObject {
+ property int index: 1
+ }
+
+ children: [
+ QtObject {
+ property int index: 2
+ },
+ QtObject {
+ property int index: 3
+ }
+ ]
+
+ QtObject {
+ property int index: 4
+ }
+
+ QtObject {
+ property int index: 5
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/doubleSignal.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/doubleSignal.errors.txt
new file mode 100644
index 0000000000..e1f7ec5bc2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/doubleSignal.errors.txt
@@ -0,0 +1 @@
+5:5:Property value set multiple times
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/doubleSignal.qml b/tests/auto/declarative/qdeclarativelanguage/data/doubleSignal.qml
new file mode 100644
index 0000000000..fb07b9f659
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/doubleSignal.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyQmlObject {
+ onBasicSignal: console.log(1921)
+ onBasicSignal: console.log(1921)
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/duplicateIDs.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/duplicateIDs.errors.txt
new file mode 100644
index 0000000000..66241cf1f2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/duplicateIDs.errors.txt
@@ -0,0 +1 @@
+4:19:id is not unique
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/duplicateIDs.qml b/tests/auto/declarative/qdeclarativelanguage/data/duplicateIDs.qml
new file mode 100644
index 0000000000..a993abdd37
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/duplicateIDs.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+MyContainer {
+ MyQmlObject { id: myID }
+ MyQmlObject { id: myID }
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml
new file mode 100644
index 0000000000..85d1052847
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+import Qt 4.6
+PropertyChanges {
+ propa: a + 10
+ propb: Math.min(a, 10)
+ propc: MyPropertyValueSource {}
+ onPropA: a
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.qml
new file mode 100644
index 0000000000..c80a7c04d9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.qml
@@ -0,0 +1,13 @@
+import Test 1.0
+import Qt 4.6
+import Qt 4.6 as Qt
+
+QtObject {
+ property QtObject objectProperty
+ property QtObject objectProperty2
+ objectProperty2: QtObject {}
+
+ property MyComponent myComponentProperty
+ property MyComponent myComponentProperty2
+ myComponentProperty2: MyComponent {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml
new file mode 100644
index 0000000000..aef3269dc8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml
@@ -0,0 +1,14 @@
+import Test 1.0
+import Qt 4.6
+QtObject {
+ default property int intProperty : 10
+ property bool boolProperty: false
+ property double doubleProperty: -10.1
+ property real realProperty: -19.9
+ property string stringProperty: "Hello World!"
+ property color colorProperty: "red"
+ property url urlProperty: "main.qml"
+ property date dateProperty: "1945-09-02"
+ property var varProperty: "Hello World!"
+ property variant variantProperty: 12
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicPropertiesNested.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicPropertiesNested.qml
new file mode 100644
index 0000000000..7bfab672c9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicPropertiesNested.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+DynamicPropertiesNestedType {
+ property int a: 13
+ property int b: 12
+
+ super_a: 11
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicSignalsAndSlots.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicSignalsAndSlots.qml
new file mode 100644
index 0000000000..2a834e8f39
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicSignalsAndSlots.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+QtObject {
+ signal signal1
+ function slot1() {}
+ signal signal2
+ function slot2() {}
+
+ property int test: 0
+ function slot3(a) { console.log(1921); test = a; }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/empty.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/empty.errors.txt
new file mode 100644
index 0000000000..d416e76ae2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/empty.errors.txt
@@ -0,0 +1,2 @@
+0:0:Expected token `numeric literal'
+0:0:Expected a qualified name id
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/empty.qml b/tests/auto/declarative/qdeclarativelanguage/data/empty.qml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/empty.qml
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.errors.txt
new file mode 100644
index 0000000000..353bbf5d8c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.errors.txt
@@ -0,0 +1 @@
+4:5:Empty signal assignment
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.qml b/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.qml
new file mode 100644
index 0000000000..4c5a122782
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyQmlObject {
+ onBasicSignal: " "
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.errors.txt
new file mode 100644
index 0000000000..d4e0cc0bc4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.errors.txt
@@ -0,0 +1 @@
+3:1:Element is not creatable.
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml b/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml
new file mode 100644
index 0000000000..a723269eb8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml
@@ -0,0 +1,4 @@
+import Qt 4.6
+
+Font {
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/failingComponent.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/failingComponent.errors.txt
new file mode 100644
index 0000000000..0cf0ef3208
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/failingComponent.errors.txt
@@ -0,0 +1 @@
+3:5:Type FailingComponent unavailable
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/failingComponentTest.qml b/tests/auto/declarative/qdeclarativelanguage/data/failingComponentTest.qml
new file mode 100644
index 0000000000..74a6acfc49
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/failingComponentTest.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyContainer {
+ FailingComponent {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/fakeDotProperty.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/fakeDotProperty.errors.txt
new file mode 100644
index 0000000000..30748234bc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/fakeDotProperty.errors.txt
@@ -0,0 +1 @@
+3:5:Invalid grouped property access
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/fakeDotProperty.qml b/tests/auto/declarative/qdeclarativelanguage/data/fakeDotProperty.qml
new file mode 100644
index 0000000000..d971eee4d0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/fakeDotProperty.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ value.something: "hello"
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/finalOverride.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/finalOverride.errors.txt
new file mode 100644
index 0000000000..49e06cbdf5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/finalOverride.errors.txt
@@ -0,0 +1 @@
+3:5:Cannot override FINAL property
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/finalOverride.qml b/tests/auto/declarative/qdeclarativelanguage/data/finalOverride.qml
new file mode 100644
index 0000000000..a84393af94
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/finalOverride.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ property int value: 10
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/i18nDeclaredPropertyNames.qml b/tests/auto/declarative/qdeclarativelanguage/data/i18nDeclaredPropertyNames.qml
new file mode 100644
index 0000000000..558c836e52
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/i18nDeclaredPropertyNames.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ property int áâãäå: 10
+ stringProperty: "Test áâãäå: " + áâãäå
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/i18nDeclaredPropertyUse.qml b/tests/auto/declarative/qdeclarativelanguage/data/i18nDeclaredPropertyUse.qml
new file mode 100644
index 0000000000..74918e2764
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/i18nDeclaredPropertyUse.qml
@@ -0,0 +1,3 @@
+I18n {
+ áâãäå: 15
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/i18nNameSpace.qml b/tests/auto/declarative/qdeclarativelanguage/data/i18nNameSpace.qml
new file mode 100644
index 0000000000..c0b2f94857
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/i18nNameSpace.qml
@@ -0,0 +1,5 @@
+import Test 1.0 as Ãâãäå
+
+Ãâãäå.MyTypeObject {
+ stringProperty: "Test áâãäå: 40"
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/i18nScript.qml b/tests/auto/declarative/qdeclarativelanguage/data/i18nScript.qml
new file mode 100644
index 0000000000..942ed9009c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/i18nScript.qml
@@ -0,0 +1,12 @@
+import Test 1.0
+
+MyTypeObject {
+ Script {
+ function val() {
+ var áâãäå = 20
+ return "Test áâãäå: " + áâãäå
+ }
+
+ }
+ stringProperty: val()
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/i18nStrings.qml b/tests/auto/declarative/qdeclarativelanguage/data/i18nStrings.qml
new file mode 100644
index 0000000000..764c92639a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/i18nStrings.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+
+MyTypeObject {
+ stringProperty: "Test áâãäå (5 accented 'a' letters)"
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/i18nType.qml b/tests/auto/declarative/qdeclarativelanguage/data/i18nType.qml
new file mode 100644
index 0000000000..d7954ef718
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/i18nType.qml
@@ -0,0 +1 @@
+I18nTypeÃâãäå { }
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/idProperty.qml b/tests/auto/declarative/qdeclarativelanguage/data/idProperty.qml
new file mode 100644
index 0000000000..90c1483a07
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/idProperty.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+MyContainer {
+ property var object : myObjectId
+
+ MyTypeObject {
+ id: "myObjectId"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.errors.txt
new file mode 100644
index 0000000000..231998daf7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.errors.txt
@@ -0,0 +1 @@
+4:1:Namespace Rectangle cannot be used as a type
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.qml b/tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.qml
new file mode 100644
index 0000000000..cd112af04a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.qml
@@ -0,0 +1,4 @@
+import Test 1.0 as Rectangle
+import Qt 4.6
+
+Rectangle { }
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingBuiltIn.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingBuiltIn.errors.txt
new file mode 100644
index 0000000000..c7d880e79e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingBuiltIn.errors.txt
@@ -0,0 +1 @@
+1:16:Library import requires a version
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingBuiltIn.qml b/tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingBuiltIn.qml
new file mode 100644
index 0000000000..23ed566e15
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingBuiltIn.qml
@@ -0,0 +1,7 @@
+import Test as S
+
+S.MyQmlObject {
+ property real x;
+ property real y;
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingInstalled.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingInstalled.errors.txt
new file mode 100644
index 0000000000..89e58ee764
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingInstalled.errors.txt
@@ -0,0 +1 @@
+1:35:Library import requires a version
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingInstalled.qml b/tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingInstalled.qml
new file mode 100644
index 0000000000..97ec22280f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importVersionMissingInstalled.qml
@@ -0,0 +1,3 @@
+import com.nokia.installedtest as T
+
+T.InstalledTest {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/inlineQmlComponents.qml b/tests/auto/declarative/qdeclarativelanguage/data/inlineQmlComponents.qml
new file mode 100644
index 0000000000..478f06a8df
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/inlineQmlComponents.qml
@@ -0,0 +1,10 @@
+import Test 1.0
+import Qt 4.6
+MyContainer {
+ Component {
+ id: myComponent
+ MyQmlObject {
+ value: 11
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/interfaceProperty.qml b/tests/auto/declarative/qdeclarativelanguage/data/interfaceProperty.qml
new file mode 100644
index 0000000000..70879ffd21
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/interfaceProperty.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+import Qt 4.6
+MyQmlObject {
+ interfaceProperty: MyQmlObject {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/interfaceQList.qml b/tests/auto/declarative/qdeclarativelanguage/data/interfaceQList.qml
new file mode 100644
index 0000000000..c87dfae785
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/interfaceQList.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+MyContainer {
+ qlistInterfaces: [
+ MyQmlObject {},
+ MyQmlObject {}
+ ]
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.errors.txt
new file mode 100644
index 0000000000..492bbb48fa
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.errors.txt
@@ -0,0 +1 @@
+5:17:Cannot assign to non-existent property "foo"
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.qml
new file mode 100644
index 0000000000..324f79c2f4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+import Qt 4.6
+
+QtObject {
+ MyQmlObject.foo: 10
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.errors.txt
new file mode 100644
index 0000000000..ff2409bd2d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.errors.txt
@@ -0,0 +1 @@
+5:15:Non-existent attached object
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.qml
new file mode 100644
index 0000000000..b768e9f86b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.qml
@@ -0,0 +1,6 @@
+import Test 1.0 as Namespace
+import Qt 4.6
+
+QtObject {
+ Namespace.MadeUpClass.foo: 10
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.errors.txt
new file mode 100644
index 0000000000..fee5050743
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.errors.txt
@@ -0,0 +1 @@
+5:15:Not an attached property name
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.qml
new file mode 100644
index 0000000000..7b782beb68
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.qml
@@ -0,0 +1,7 @@
+import Test 1.0 as Namespace
+import Qt 4.6
+
+QtObject {
+ Namespace.madeUpClass.foo: 10
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.errors.txt
new file mode 100644
index 0000000000..34de769e13
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.errors.txt
@@ -0,0 +1 @@
+5:27:Cannot assign to non-existent property "foo"
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.qml
new file mode 100644
index 0000000000..1f47c61622
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.qml
@@ -0,0 +1,6 @@
+import Test 1.0 as Namespace
+import Qt 4.6
+
+QtObject {
+ Namespace.MyQmlObject.foo: 10
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.errors.txt
new file mode 100644
index 0000000000..05161c4d10
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.errors.txt
@@ -0,0 +1 @@
+5:5:Invalid attached object assignment
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.qml
new file mode 100644
index 0000000000..79c2981505
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+import Qt 4.6
+
+QtObject {
+ MyQmlObject: 10
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.errors.txt
new file mode 100644
index 0000000000..a208bcfaa7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.errors.txt
@@ -0,0 +1 @@
+5:15:Invalid attached object assignment
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.qml
new file mode 100644
index 0000000000..af0be80e56
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.qml
@@ -0,0 +1,7 @@
+import Test 1.0 as Namespace
+import Qt 4.6
+
+QtObject {
+ Namespace.MyQmlObject: 10
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.errors.txt
new file mode 100644
index 0000000000..05161c4d10
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.errors.txt
@@ -0,0 +1 @@
+5:5:Invalid attached object assignment
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.qml
new file mode 100644
index 0000000000..0546322143
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+import Qt 4.6
+
+QtObject {
+ MyQmlObject: QtObject {}
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.errors.txt
new file mode 100644
index 0000000000..6770e1f30b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.errors.txt
@@ -0,0 +1 @@
+5:5:Non-existent attached object
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.qml
new file mode 100644
index 0000000000..108109a317
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+import Qt 4.6
+
+QtObject {
+ Test.MyQmlObject: QtObject {}
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.errors.txt
new file mode 100644
index 0000000000..6770e1f30b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.errors.txt
@@ -0,0 +1 @@
+5:5:Non-existent attached object
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.qml
new file mode 100644
index 0000000000..ccf03536f3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+import Qt 4.6
+
+QtObject {
+ MyTypeObject.foo: 10
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.errors.txt
new file mode 100644
index 0000000000..ff2409bd2d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.errors.txt
@@ -0,0 +1 @@
+5:15:Non-existent attached object
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.qml
new file mode 100644
index 0000000000..e736379112
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.qml
@@ -0,0 +1,6 @@
+import Test 1.0 as Namespace
+import Qt 4.6
+
+QtObject {
+ Namespace.MyTypeObject.foo: 10
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.errors.txt
new file mode 100644
index 0000000000..6770e1f30b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.errors.txt
@@ -0,0 +1 @@
+5:5:Non-existent attached object
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.qml
new file mode 100644
index 0000000000..a0952295a6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+import Qt 4.6
+
+QtObject {
+ MadeUpClass.foo: 10
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.errors.txt
new file mode 100644
index 0000000000..810fd31b41
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.errors.txt
@@ -0,0 +1 @@
+5:5:Invalid grouped property access
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml
new file mode 100644
index 0000000000..1167e391c4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+QtObject {
+ property var o;
+ o.blah: 10
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.10.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.10.errors.txt
new file mode 100644
index 0000000000..1fcb1b65f5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.10.errors.txt
@@ -0,0 +1 @@
+4:14:Cannot assign a value directly to a grouped property
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.10.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.10.qml
new file mode 100644
index 0000000000..41aa3e2923
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.10.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ grouped: "10x10"
+ grouped.value: 10
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.errors.txt
new file mode 100644
index 0000000000..810fd31b41
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.errors.txt
@@ -0,0 +1 @@
+5:5:Invalid grouped property access
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.qml
new file mode 100644
index 0000000000..a0c83062b9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+QtObject {
+ property int o;
+ o.blah: 10
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.3.errors.txt
new file mode 100644
index 0000000000..f6d6f29fbf
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.3.errors.txt
@@ -0,0 +1 @@
+4:5:Invalid grouped property access
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.3.qml
new file mode 100644
index 0000000000..0bbfc4f529
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.3.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+
+MyQmlObject {
+ customType.x: 10
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.4.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.4.errors.txt
new file mode 100644
index 0000000000..69c68716d9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.4.errors.txt
@@ -0,0 +1 @@
+4:5:Cannot assign to non-existent property "foo"
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.4.qml
new file mode 100644
index 0000000000..134fef9b0a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.4.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+
+MyQmlObject {
+ foo.x: 10
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.5.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.5.errors.txt
new file mode 100644
index 0000000000..2c8a970da7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.5.errors.txt
@@ -0,0 +1 @@
+4:18:Property assignment expected
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.5.qml
new file mode 100644
index 0000000000..55cefe66b9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.5.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+
+MyTypeObject {
+ rectProperty.x.foo: 100
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.6.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.6.errors.txt
new file mode 100644
index 0000000000..e1f7ec5bc2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.6.errors.txt
@@ -0,0 +1 @@
+5:5:Property value set multiple times
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.6.qml
new file mode 100644
index 0000000000..9ec33abe7b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.6.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ rectProperty.x: 100
+ rectProperty.x: 101
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.7.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.7.errors.txt
new file mode 100644
index 0000000000..4a7e3830a8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.7.errors.txt
@@ -0,0 +1 @@
+4:-1:Cannot set properties on nullGrouped as it is null
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.7.qml
new file mode 100644
index 0000000000..977539a357
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.7.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+
+MyTypeObject {
+ nullGrouped.script: console.log(1921)
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.8.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.8.errors.txt
new file mode 100644
index 0000000000..fa0da21c55
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.8.errors.txt
@@ -0,0 +1 @@
+5:19:Property has already been assigned a value
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.8.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.8.qml
new file mode 100644
index 0000000000..56fca9b990
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.8.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ pointProperty: "10x10"
+ pointProperty.x: 10
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.9.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.9.errors.txt
new file mode 100644
index 0000000000..6d837a7222
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.9.errors.txt
@@ -0,0 +1 @@
+5:20:Property has already been assigned a value
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.9.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.9.qml
new file mode 100644
index 0000000000..982ab26051
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.9.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ pointProperty.x: 10
+ pointProperty: "10x10"
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.2.errors.txt
new file mode 100644
index 0000000000..2c6b8bf0f3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.2.errors.txt
@@ -0,0 +1,2 @@
+3:9:Invalid empty ID
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.2.qml
new file mode 100644
index 0000000000..4fb3b298dd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.2.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyQmlObject {
+ id: ""
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.3.errors.txt
new file mode 100644
index 0000000000..bb811cfe9d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.3.errors.txt
@@ -0,0 +1 @@
+3:5:Invalid use of id property
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.3.qml
new file mode 100644
index 0000000000..668417286b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.3.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyQmlObject {
+ id.other: 10
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.4.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.4.errors.txt
new file mode 100644
index 0000000000..c721fe91bf
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.4.errors.txt
@@ -0,0 +1 @@
+4:5:Property value set multiple times
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.4.qml
new file mode 100644
index 0000000000..86010bf792
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.4.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+MyQmlObject {
+ id: hello
+ id: world
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.5.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.5.errors.txt
new file mode 100644
index 0000000000..c167de382e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.5.errors.txt
@@ -0,0 +1 @@
+2:20:Invalid import qualifier ID
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.5.qml
new file mode 100644
index 0000000000..5b92a1a0eb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.5.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+import Test 1.0 as hello
+MyQmlObject {
+ id: hello
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.6.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.6.errors.txt
new file mode 100644
index 0000000000..7251de118f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.6.errors.txt
@@ -0,0 +1 @@
+3:9:IDs cannot start with an uppercase letter
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.6.qml
new file mode 100644
index 0000000000..62187d9473
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.6.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyQmlObject {
+ id: StartsWithUpperCase
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.7.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.7.errors.txt
new file mode 100644
index 0000000000..e4fd1db3f0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.7.errors.txt
@@ -0,0 +1 @@
+3:9:ID illegally masks global JavaScript property
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.7.qml
new file mode 100644
index 0000000000..d4bc539650
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.7.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyQmlObject {
+ id: gc
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.8.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.8.errors.txt
new file mode 100644
index 0000000000..b03ec6ccea
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.8.errors.txt
@@ -0,0 +1 @@
+3:9:IDs must contain only letters, numbers, and underscores
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.8.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.8.qml
new file mode 100644
index 0000000000..1ea615c32e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.8.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyQmlObject {
+ id: hello.world
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.9.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.9.errors.txt
new file mode 100644
index 0000000000..c010e79492
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.9.errors.txt
@@ -0,0 +1 @@
+3:9:IDs must start with a letter or underscore
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.9.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.9.qml
new file mode 100644
index 0000000000..57474b7212
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.9.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyQmlObject {
+ id: "3hello"
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.errors.txt
new file mode 100644
index 0000000000..c010e79492
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.errors.txt
@@ -0,0 +1 @@
+3:9:IDs must start with a letter or underscore
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidID.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.qml
new file mode 100644
index 0000000000..04db3eb67c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidID.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ id: 1
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.errors.txt
new file mode 100644
index 0000000000..a65f5fddd6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.errors.txt
@@ -0,0 +1 @@
+2:18:Invalid import qualifier ID
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.qml
new file mode 100644
index 0000000000..30d88d504d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.qml
@@ -0,0 +1,4 @@
+import Qt 4.6
+import Qt 4.6 as qt
+
+QtObject {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.errors.txt
new file mode 100644
index 0000000000..4bcc948e92
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.errors.txt
@@ -0,0 +1 @@
+1:1:Expected type name
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.qml
new file mode 100644
index 0000000000..427827ca89
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidRoot.qml
@@ -0,0 +1,2 @@
+foo {
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest.qml b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest.qml
new file mode 100644
index 0000000000..d8a22a82d2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest.qml
@@ -0,0 +1,2 @@
+import Qt 4.6
+Rectangle {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml
new file mode 100644
index 0000000000..a0706addf8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml
@@ -0,0 +1,2 @@
+import Qt 4.6
+Text {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/PrivateType.qml b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/PrivateType.qml
new file mode 100644
index 0000000000..93c7630128
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/PrivateType.qml
@@ -0,0 +1,2 @@
+import Qt 4.6
+Image {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/qmldir b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/qmldir
new file mode 100644
index 0000000000..eeb9a05a95
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/qmldir
@@ -0,0 +1,4 @@
+Rectangle 1.5 InstalledTest2.qml
+InstalledTest 1.4 InstalledTest2.qml
+InstalledTest 1.0 InstalledTest.qml
+InstalledTestTP 0.0 InstalledTest.qml
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.2.errors.txt
new file mode 100644
index 0000000000..8b40aa3ebb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.2.errors.txt
@@ -0,0 +1,2 @@
+3:15:Cannot assign primitives to lists
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.2.qml
new file mode 100644
index 0000000000..e3baadb46c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.2.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyContainer {
+ children: 2
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.3.errors.txt
new file mode 100644
index 0000000000..c721fe91bf
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.3.errors.txt
@@ -0,0 +1 @@
+4:5:Property value set multiple times
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.3.qml
new file mode 100644
index 0000000000..00c4c6b543
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.3.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+MyContainer {
+ children: childBinding.expression
+ children: childBinding2.expression
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listItemDeleteSelf.qml b/tests/auto/declarative/qdeclarativelanguage/data/listItemDeleteSelf.qml
new file mode 100644
index 0000000000..32b5b6c7f2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/listItemDeleteSelf.qml
@@ -0,0 +1,38 @@
+import Qt 4.6
+
+Item {
+ ListModel {
+ id: fruitModel
+ ListElement {
+ name: "Apple"
+ cost: 2.45
+ }
+ ListElement {
+ name: "Orange"
+ cost: 3.25
+ }
+ ListElement {
+ name: "Banana"
+ cost: 1.95
+ }
+ }
+
+ Component {
+ id: fruitDelegate
+ Item {
+ width: 200; height: 50
+ Text { text: name }
+ Text { text: '$'+cost; anchors.right: parent.right }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: fruitModel.remove(index)
+ }
+ }
+ }
+
+ ListView {
+ model: fruitModel
+ delegate: fruitDelegate
+ anchors.fill: parent
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listProperties.qml b/tests/auto/declarative/qdeclarativelanguage/data/listProperties.qml
new file mode 100644
index 0000000000..ba9e37ce39
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/listProperties.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+QtObject {
+ property list<QtObject> listProperty
+ property int test: listProperty.length
+
+ listProperty: [ QtObject{}, QtObject {} ]
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/method.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/method.1.errors.txt
new file mode 100644
index 0000000000..b10984f035
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/method.1.errors.txt
@@ -0,0 +1 @@
+3:1:Method names cannot begin with an upper case letter
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/method.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/method.1.qml
new file mode 100644
index 0000000000..d9794b48f9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/method.1.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+QtObject {
+ function MyMethod() {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/missingObject.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/missingObject.errors.txt
new file mode 100644
index 0000000000..b31b562de1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/missingObject.errors.txt
@@ -0,0 +1 @@
+1:10:Expected token `{'
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/missingObject.qml b/tests/auto/declarative/qdeclarativelanguage/data/missingObject.qml
new file mode 100644
index 0000000000..2f17045869
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/missingObject.qml
@@ -0,0 +1 @@
+something: 24
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/missingSignal.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/missingSignal.errors.txt
new file mode 100644
index 0000000000..f562246288
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/missingSignal.errors.txt
@@ -0,0 +1 @@
+4:5:Cannot assign to non-existent property "onClicked"
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/missingSignal.qml b/tests/auto/declarative/qdeclarativelanguage/data/missingSignal.qml
new file mode 100644
index 0000000000..3bf75f688d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/missingSignal.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+import Qt 4.6
+QtObject {
+ onClicked: console.log("Hello world!")
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/missingValueTypeProperty.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/missingValueTypeProperty.errors.txt
new file mode 100644
index 0000000000..caf7e55ba2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/missingValueTypeProperty.errors.txt
@@ -0,0 +1 @@
+4:18:Cannot assign to non-existent property "foo"
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/missingValueTypeProperty.qml b/tests/auto/declarative/qdeclarativelanguage/data/missingValueTypeProperty.qml
new file mode 100644
index 0000000000..9a0fa6a26b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/missingValueTypeProperty.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+
+MyTypeObject {
+ rectProperty.foo: 9
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.1.errors.txt
new file mode 100644
index 0000000000..e1f7ec5bc2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.1.errors.txt
@@ -0,0 +1 @@
+5:5:Property value set multiple times
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.1.qml
new file mode 100644
index 0000000000..649c49ee3a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.1.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ intProperty: 10
+ intProperty: 11
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.10.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.10.errors.txt
new file mode 100644
index 0000000000..e1f7ec5bc2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.10.errors.txt
@@ -0,0 +1 @@
+5:5:Property value set multiple times
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.10.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.10.qml
new file mode 100644
index 0000000000..bc21db98f8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.10.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ property int a: 10
+ a: 11
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.2.errors.txt
new file mode 100644
index 0000000000..e1f7ec5bc2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.2.errors.txt
@@ -0,0 +1 @@
+5:5:Property value set multiple times
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.2.qml
new file mode 100644
index 0000000000..abcd216744
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.2.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ intProperty: 10
+ intProperty: a + 10
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.3.errors.txt
new file mode 100644
index 0000000000..e1f7ec5bc2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.3.errors.txt
@@ -0,0 +1 @@
+5:5:Property value set multiple times
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.3.qml
new file mode 100644
index 0000000000..77eaba0b32
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.3.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ intProperty: a + 10
+ intProperty: 10
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.4.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.4.errors.txt
new file mode 100644
index 0000000000..e1f7ec5bc2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.4.errors.txt
@@ -0,0 +1 @@
+5:5:Property value set multiple times
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.4.qml
new file mode 100644
index 0000000000..c16d04fea6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.4.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ intProperty: 10
+ intProperty: MyTypeObject {}
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.5.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.5.errors.txt
new file mode 100644
index 0000000000..e1f7ec5bc2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.5.errors.txt
@@ -0,0 +1 @@
+5:5:Property value set multiple times
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.5.qml
new file mode 100644
index 0000000000..2980c5b28c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.5.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyContainer {
+ children: MyContainer {}
+ children: MyContainer {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.6.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.6.errors.txt
new file mode 100644
index 0000000000..e1f7ec5bc2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.6.errors.txt
@@ -0,0 +1 @@
+5:5:Property value set multiple times
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.6.qml
new file mode 100644
index 0000000000..492c720edc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.6.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyContainer {
+ children: MyContainer {}
+ children: [ MyContainer {}, MyContainer {} ]
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.7.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.7.errors.txt
new file mode 100644
index 0000000000..e1f7ec5bc2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.7.errors.txt
@@ -0,0 +1 @@
+5:5:Property value set multiple times
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.7.qml
new file mode 100644
index 0000000000..2a9c1d0de8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.7.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyContainer {
+ children: [ MyContainer {}, MyContainer {} ]
+ children: MyContainer {}
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.8.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.8.errors.txt
new file mode 100644
index 0000000000..450fc163bd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.8.errors.txt
@@ -0,0 +1 @@
+6:9:Property value set multiple times
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.8.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.8.qml
new file mode 100644
index 0000000000..052437ea18
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.8.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+
+MyTypeObject {
+ grouped {
+ value: 10
+ value: 11
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.9.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.9.errors.txt
new file mode 100644
index 0000000000..e1f7ec5bc2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.9.errors.txt
@@ -0,0 +1 @@
+5:5:Property value set multiple times
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/multiSet.9.qml b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.9.qml
new file mode 100644
index 0000000000..e2e954f778
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/multiSet.9.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ grouped.value: 10
+ grouped.value: 11
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.errors.txt
new file mode 100644
index 0000000000..886da55cba
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.errors.txt
@@ -0,0 +1,2 @@
+4:5:Unable to create type NestedErrorsType
+4:8:Invalid property assignment: double expected
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.qml b/tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.qml
new file mode 100644
index 0000000000..c0d755ae98
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+Item {
+ NestedErrorsType {}
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.1.errors.txt
new file mode 100644
index 0000000000..6bfce9a2c9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.1.errors.txt
@@ -0,0 +1 @@
+2:15:Cannot assign to non-existent property "something"
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.1.qml
new file mode 100644
index 0000000000..df7406ce98
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.1.qml
@@ -0,0 +1,2 @@
+import Test 1.0
+MyQmlObject { something: 24 }
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.2.errors.txt
new file mode 100644
index 0000000000..4b30056d59
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.2.errors.txt
@@ -0,0 +1 @@
+3:5:Cannot assign to non-existent property "something"
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.2.qml
new file mode 100644
index 0000000000..06ccd37905
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.2.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ something: 24
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.3.errors.txt
new file mode 100644
index 0000000000..4b30056d59
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.3.errors.txt
@@ -0,0 +1 @@
+3:5:Cannot assign to non-existent property "something"
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.3.qml
new file mode 100644
index 0000000000..5b08608862
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.3.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ something: 1 + 1
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.4.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.4.errors.txt
new file mode 100644
index 0000000000..4b30056d59
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.4.errors.txt
@@ -0,0 +1 @@
+3:5:Cannot assign to non-existent property "something"
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.4.qml
new file mode 100644
index 0000000000..65791919ba
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.4.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ something: ;
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.5.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.5.errors.txt
new file mode 100644
index 0000000000..c07f2b99a2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.5.errors.txt
@@ -0,0 +1 @@
+3:5:Expected a qualified name id
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.5.qml
new file mode 100644
index 0000000000..37af05731e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.5.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ 24
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.6.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.6.errors.txt
new file mode 100644
index 0000000000..89925b74c2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.6.errors.txt
@@ -0,0 +1 @@
+3:5:Cannot assign to non-existent default property
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.6.qml
new file mode 100644
index 0000000000..5cd55d0856
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/nonexistantProperty.6.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ MyQmlObject {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nullDotProperty.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/nullDotProperty.errors.txt
new file mode 100644
index 0000000000..07a40949cd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/nullDotProperty.errors.txt
@@ -0,0 +1 @@
+3:-1:Cannot set properties on obj as it is null
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nullDotProperty.qml b/tests/auto/declarative/qdeclarativelanguage/data/nullDotProperty.qml
new file mode 100644
index 0000000000..4e36779b5c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/nullDotProperty.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyDotPropertyObject {
+ obj.value: 1
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/objectValueTypeProperty.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/objectValueTypeProperty.errors.txt
new file mode 100644
index 0000000000..db7d9c0f60
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/objectValueTypeProperty.errors.txt
@@ -0,0 +1 @@
+4:18:Unexpected object assignment
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/objectValueTypeProperty.qml b/tests/auto/declarative/qdeclarativelanguage/data/objectValueTypeProperty.qml
new file mode 100644
index 0000000000..99247735dd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/objectValueTypeProperty.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ rectProperty.x: MyTypeObject {}
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/onCompleted.qml b/tests/auto/declarative/qdeclarativelanguage/data/onCompleted.qml
new file mode 100644
index 0000000000..5725f858e9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/onCompleted.qml
@@ -0,0 +1,17 @@
+import Test 1.0
+import Qt 4.6
+
+MyTypeObject {
+ // We set a and b to ensure that onCompleted is executed after bindings and
+ // constants have been assigned
+ property int a: Math.min(6, 7)
+ Component.onCompleted: console.log("Completed " + a + " " + nestedObject.b)
+
+ objectProperty: OnCompletedType {
+ qmlobjectProperty: MyQmlObject {
+ id: nestedObject
+ property int b: 10
+ Component.onCompleted: console.log("Completed " + a + " " + nestedObject.b)
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/property.1.errors.txt
new file mode 100644
index 0000000000..3ae6c4601b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.1.errors.txt
@@ -0,0 +1 @@
+4:14:Expected property type
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.1.qml
new file mode 100644
index 0000000000..cadc39a745
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.1.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+QtObject {
+ property blah a;
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/property.2.errors.txt
new file mode 100644
index 0000000000..a18e21a01c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.2.errors.txt
@@ -0,0 +1 @@
+4:14:Unexpected property type modifier
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.2.qml
new file mode 100644
index 0000000000..e810c6cfd2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.2.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+QtObject {
+ property invalidmodifier<int> a;
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/property.3.errors.txt
new file mode 100644
index 0000000000..5e09a25b57
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.3.errors.txt
@@ -0,0 +1 @@
+4:14:Invalid property type modifier
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.3.qml
new file mode 100644
index 0000000000..04147c2701
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.3.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+QtObject {
+ property invalidmodifier<QtObject> a;
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.4.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/property.4.errors.txt
new file mode 100644
index 0000000000..b447186849
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.4.errors.txt
@@ -0,0 +1 @@
+5:1:Syntax error
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.4.qml
new file mode 100644
index 0000000000..b2ec4826a7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.4.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+QtObject {
+ readonly property int a
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.5.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/property.5.errors.txt
new file mode 100644
index 0000000000..32a8dc11e1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.5.errors.txt
@@ -0,0 +1 @@
+4:5:Readonly not yet supported
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.5.qml
new file mode 100644
index 0000000000..65fafbbc14
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.5.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+QtObject {
+ readonly property int a: value
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.6.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/property.6.errors.txt
new file mode 100644
index 0000000000..9e8d45448f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.6.errors.txt
@@ -0,0 +1 @@
+4:5:Property names cannot begin with an upper case letter
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.6.qml
new file mode 100644
index 0000000000..f39bed3338
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.6.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+QtObject {
+ property int Hello
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.7.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/property.7.errors.txt
new file mode 100644
index 0000000000..9e8d45448f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.7.errors.txt
@@ -0,0 +1 @@
+4:5:Property names cannot begin with an upper case letter
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.7.qml
new file mode 100644
index 0000000000..502eb22670
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/property.7.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+QtObject {
+ property int Hello: 10
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.2.qml
new file mode 100644
index 0000000000..e48526abec
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.2.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyTypeObject {
+ MyCompositeValueSource on intProperty {}
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.qml b/tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.qml
new file mode 100644
index 0000000000..22aa68250e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/propertyValueSource.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyTypeObject {
+ MyPropertyValueSource on intProperty {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.1.qml
new file mode 100644
index 0000000000..429c327a3d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.1.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+import Qt 4.6
+QtObject {
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.2.qml
new file mode 100644
index 0000000000..0f57b61f20
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.2.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+import Qt 4.6
+QtObject {
+ MyQmlObject.value: 10
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.1.errors.txt
new file mode 100644
index 0000000000..b8c34042be
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.1.errors.txt
@@ -0,0 +1 @@
+3:21:Invalid property assignment: "readOnlyString" is a read-only property
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.1.qml
new file mode 100644
index 0000000000..60757bd005
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.1.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ readOnlyString: "Hello World"
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.2.errors.txt
new file mode 100644
index 0000000000..d857a0440e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.2.errors.txt
@@ -0,0 +1 @@
+3:5:Invalid property assignment: "readOnlyString" is a read-only property
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.2.qml
new file mode 100644
index 0000000000..8f1633cc11
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.2.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ readOnlyString: "Hello" + "World"
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.errors.txt
new file mode 100644
index 0000000000..c7e9e1bb2f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.errors.txt
@@ -0,0 +1 @@
+6:36:Invalid property assignment: "objAlias" is a read-only property
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml
new file mode 100644
index 0000000000..cd86a4828d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+import Qt 4.6
+
+QtObject {
+ property var child
+ child: HelperAlias { objAlias: QtObject {} }
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/rootAsQmlComponent.qml b/tests/auto/declarative/qdeclarativelanguage/data/rootAsQmlComponent.qml
new file mode 100644
index 0000000000..8d72cd3844
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/rootAsQmlComponent.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+MyContainerComponent {
+ x: 11
+ MyQmlObject {}
+ MyQmlObject {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.1.errors.txt
new file mode 100644
index 0000000000..50518ccff6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.1.errors.txt
@@ -0,0 +1 @@
+3:1:Invalid use of Script block
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.1.qml
new file mode 100644
index 0000000000..8dac8b7312
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.1.qml
@@ -0,0 +1,4 @@
+import Qt 4.6
+
+Script {
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.10.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.10.errors.txt
new file mode 100644
index 0000000000..13f47d18ba
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.10.errors.txt
@@ -0,0 +1 @@
+6:9:Component elements may not contain script blocks
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.10.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.10.qml
new file mode 100644
index 0000000000..516e878c46
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.10.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+Item {
+ Component {
+ Item {}
+ Script {}
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.11.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.11.errors.txt
new file mode 100644
index 0000000000..a664203880
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.11.errors.txt
@@ -0,0 +1 @@
+5:9:Invalid Script block
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.11.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.11.qml
new file mode 100644
index 0000000000..6d2d598106
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.11.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+QtObject {
+ Script {
+ QtObject {}
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.12.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.12.errors.txt
new file mode 100644
index 0000000000..f8297f5061
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.12.errors.txt
@@ -0,0 +1 @@
+4:5:JavaScript declaration outside Script element
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.12.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.12.qml
new file mode 100644
index 0000000000..9ecb5d903c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.12.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+QtObject {
+ var a
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.2.errors.txt
new file mode 100644
index 0000000000..8fb3bbd124
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.2.errors.txt
@@ -0,0 +1 @@
+5:9:Properties cannot be set on Script block
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.2.qml
new file mode 100644
index 0000000000..dce1a41594
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.2.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+QtObject {
+ Script {
+ id: myScript
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.3.errors.txt
new file mode 100644
index 0000000000..8fb3bbd124
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.3.errors.txt
@@ -0,0 +1 @@
+5:9:Properties cannot be set on Script block
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.3.qml
new file mode 100644
index 0000000000..8621a9a7a2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.3.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+QtObject {
+ Script {
+ hello: world
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.4.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.4.errors.txt
new file mode 100644
index 0000000000..49a507feff
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.4.errors.txt
@@ -0,0 +1 @@
+5:9:Invalid Script source value
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.4.qml
new file mode 100644
index 0000000000..d89817c257
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.4.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+QtObject {
+ Script {
+ source: 10
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.5.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.5.errors.txt
new file mode 100644
index 0000000000..49a507feff
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.5.errors.txt
@@ -0,0 +1 @@
+5:9:Invalid Script source value
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.5.qml
new file mode 100644
index 0000000000..8986b3b632
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.5.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+QtObject {
+ Script {
+ source: "hello" + ".js"
+ }
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.6.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.6.errors.txt
new file mode 100644
index 0000000000..4e53b6b172
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.6.errors.txt
@@ -0,0 +1 @@
+5:9:Invalid Script block. Specify either the source property or inline script
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.6.qml
new file mode 100644
index 0000000000..07e9d78d6f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.6.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+
+QtObject {
+ Script {
+ source: "test.js"
+ function helloWorld() {}
+ }
+}
+
+
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.7.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.7.errors.txt
new file mode 100644
index 0000000000..dc15ddff71
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.7.errors.txt
@@ -0,0 +1 @@
+5:9:Variable declarations not allow in inline Script blocks
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.7.qml
new file mode 100644
index 0000000000..fa905e628e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.7.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+
+QtObject {
+ Script {
+ var a = 10;
+ }
+}
+
+
+
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.8.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.8.errors.txt
new file mode 100644
index 0000000000..450fc163bd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.8.errors.txt
@@ -0,0 +1 @@
+6:9:Property value set multiple times
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.8.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.8.qml
new file mode 100644
index 0000000000..f600c886df
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.8.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+QtObject {
+ Script {
+ source: "test.js"
+ source: "test2.js"
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.9.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.9.errors.txt
new file mode 100644
index 0000000000..41e8d46786
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.9.errors.txt
@@ -0,0 +1 @@
+5:9:Component elements may not contain script blocks
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.9.qml b/tests/auto/declarative/qdeclarativelanguage/data/script.9.qml
new file mode 100644
index 0000000000..79aa504ec0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.9.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+Item {
+ Component {
+ Script {}
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString.qml b/tests/auto/declarative/qdeclarativelanguage/data/scriptString.qml
new file mode 100644
index 0000000000..40a3bbeede
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/scriptString.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ scriptProperty: foo + bar
+ grouped.script: console.log(1921)
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/signal.1.errors.txt
new file mode 100644
index 0000000000..78d996016a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/signal.1.errors.txt
@@ -0,0 +1 @@
+4:12:Expected parameter type
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/signal.1.qml
new file mode 100644
index 0000000000..fbaf017a91
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/signal.1.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+QtObject {
+ signal mySignal(nontype a)
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/signal.2.errors.txt
new file mode 100644
index 0000000000..fce89285ec
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/signal.2.errors.txt
@@ -0,0 +1 @@
+4:21:Unexpected token `;'
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/signal.2.qml
new file mode 100644
index 0000000000..504919242c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/signal.2.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+QtObject {
+ signal mySignal(,)
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/signal.3.errors.txt
new file mode 100644
index 0000000000..bf043ac85a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/signal.3.errors.txt
@@ -0,0 +1 @@
+4:22:Expected token `identifier'
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/signal.3.qml
new file mode 100644
index 0000000000..9dd4cc7cb1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/signal.3.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+QtObject {
+ signal mySignal(a)
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.4.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/signal.4.errors.txt
new file mode 100644
index 0000000000..d96f9e3ed9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/signal.4.errors.txt
@@ -0,0 +1 @@
+3:1:Signal names cannot begin with an upper case letter
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/signal.4.qml
new file mode 100644
index 0000000000..7279a46c1d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/signal.4.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+QtObject {
+ signal MySignal
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/simpleBindings.qml b/tests/auto/declarative/qdeclarativelanguage/data/simpleBindings.qml
new file mode 100644
index 0000000000..2fcd1a5a4f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/simpleBindings.qml
@@ -0,0 +1,18 @@
+import Test 1.0
+MyTypeObject {
+ id: me
+ property int v1: 10
+ property int v2: 11
+
+ property int value1
+ property int value2
+ property int value3
+ property int value4
+
+ value1: v1
+ value2: me.v1
+ value3: v1 + v2
+ value4: Math.min(v1, v2)
+
+ objectProperty: me
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/simpleContainer.qml b/tests/auto/declarative/qdeclarativelanguage/data/simpleContainer.qml
new file mode 100644
index 0000000000..c3a795f536
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/simpleContainer.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyContainer {
+ MyQmlObject {}
+ MyQmlObject {}
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/simpleObject.qml b/tests/auto/declarative/qdeclarativelanguage/data/simpleObject.qml
new file mode 100644
index 0000000000..30c78237de
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/simpleObject.qml
@@ -0,0 +1,2 @@
+import Test 1.0
+MyQmlObject {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/subdir/Test.qml b/tests/auto/declarative/qdeclarativelanguage/data/subdir/Test.qml
new file mode 100644
index 0000000000..c4d5905e4d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/subdir/Test.qml
@@ -0,0 +1,2 @@
+import Qt 4.6
+Rectangle { }
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/subdir/subsubdir/SubTest.qml b/tests/auto/declarative/qdeclarativelanguage/data/subdir/subsubdir/SubTest.qml
new file mode 100644
index 0000000000..c4d5905e4d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/subdir/subsubdir/SubTest.qml
@@ -0,0 +1,2 @@
+import Qt 4.6
+Rectangle { }
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/test.js b/tests/auto/declarative/qdeclarativelanguage/data/test.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/test.js
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/test2.js b/tests/auto/declarative/qdeclarativelanguage/data/test2.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/test2.js
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/unregisteredObject.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/unregisteredObject.errors.txt
new file mode 100644
index 0000000000..347db05a81
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/unregisteredObject.errors.txt
@@ -0,0 +1 @@
+2:1:Type UnregisteredObjectType unavailable
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/unregisteredObject.qml b/tests/auto/declarative/qdeclarativelanguage/data/unregisteredObject.qml
new file mode 100644
index 0000000000..4969f62ad5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/unregisteredObject.qml
@@ -0,0 +1,2 @@
+import Test 1.0
+UnregisteredObjectType {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/unsupportedProperty.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/unsupportedProperty.errors.txt
new file mode 100644
index 0000000000..3cd626de86
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/unsupportedProperty.errors.txt
@@ -0,0 +1 @@
+3:13:Invalid property assignment: unsupported type "QMatrix"
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/unsupportedProperty.qml b/tests/auto/declarative/qdeclarativelanguage/data/unsupportedProperty.qml
new file mode 100644
index 0000000000..9f19680368
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/unsupportedProperty.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ matrix: "1,0,0,0,1,0,0,0,1"
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/valueTypes.qml b/tests/auto/declarative/qdeclarativelanguage/data/valueTypes.qml
new file mode 100644
index 0000000000..bf325a74ee
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/valueTypes.qml
@@ -0,0 +1,13 @@
+import Test 1.0
+MyTypeObject {
+ rectProperty.x: 10
+ rectProperty.y: 11
+ rectProperty.width: rectProperty.x + 2
+ rectProperty.height: 13
+
+ intProperty: rectProperty.x
+
+ onAction: { var a = rectProperty; a.x = 12; }
+
+ rectProperty2: rectProperty
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.1.errors.txt
new file mode 100644
index 0000000000..ba7a0766b2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.1.errors.txt
@@ -0,0 +1 @@
+3:12:Invalid property assignment: int expected
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.1.qml
new file mode 100644
index 0000000000..289d37f050
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.1.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ value: "hello"
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.10.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.10.errors.txt
new file mode 100644
index 0000000000..ae75b5289d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.10.errors.txt
@@ -0,0 +1 @@
+3:23:Invalid property assignment: datetime expected
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.10.qml b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.10.qml
new file mode 100644
index 0000000000..2cf0e50277
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.10.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyTypeObject {
+ dateTimeProperty: 12
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.11.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.11.errors.txt
new file mode 100644
index 0000000000..23a4cda4c2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.11.errors.txt
@@ -0,0 +1 @@
+3:20:Invalid property assignment: point expected
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.11.qml b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.11.qml
new file mode 100644
index 0000000000..ae77ba1fe8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.11.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyTypeObject {
+ pointProperty: "apples"
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.12.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.12.errors.txt
new file mode 100644
index 0000000000..3092100280
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.12.errors.txt
@@ -0,0 +1 @@
+3:19:Invalid property assignment: size expected
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.12.qml b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.12.qml
new file mode 100644
index 0000000000..b7a366f567
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.12.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyTypeObject {
+ sizeProperty: "red"
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.13.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.13.errors.txt
new file mode 100644
index 0000000000..ba7a0766b2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.13.errors.txt
@@ -0,0 +1 @@
+3:12:Invalid property assignment: int expected
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.13.qml b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.13.qml
new file mode 100644
index 0000000000..477aff1dbe
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.13.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ value: "12"
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.14.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.14.errors.txt
new file mode 100644
index 0000000000..d621fdd6cd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.14.errors.txt
@@ -0,0 +1 @@
+3:21:Invalid property assignment: string expected
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.14.qml b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.14.qml
new file mode 100644
index 0000000000..672d693c72
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.14.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyTypeObject {
+ stringProperty: 10
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.15.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.15.errors.txt
new file mode 100644
index 0000000000..44768e30cb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.15.errors.txt
@@ -0,0 +1 @@
+3:18:Invalid property assignment: url expected
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.15.qml b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.15.qml
new file mode 100644
index 0000000000..633a5ba2ba
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.15.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyTypeObject {
+ urlProperty: 12
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.2.errors.txt
new file mode 100644
index 0000000000..9ff9f250c0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.2.errors.txt
@@ -0,0 +1 @@
+3:14:Invalid property assignment: boolean expected
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.2.qml
new file mode 100644
index 0000000000..34b74f7e01
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.2.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ enabled: 5
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.3.errors.txt
new file mode 100644
index 0000000000..6d971c6499
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.3.errors.txt
@@ -0,0 +1 @@
+3:11:Invalid property assignment: rect expected
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.3.qml
new file mode 100644
index 0000000000..384181a17f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.3.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyQmlObject {
+ rect: "5,5x10"
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.4.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.4.errors.txt
new file mode 100644
index 0000000000..ef34d0ea95
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.4.errors.txt
@@ -0,0 +1 @@
+3:19:Invalid property assignment: unknown enumeration
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.4.qml
new file mode 100644
index 0000000000..0787bf5fda
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.4.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+MyTypeObject {
+ enumProperty: "InvalidEnumName"
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.5.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.5.errors.txt
new file mode 100644
index 0000000000..cab10bddb8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.5.errors.txt
@@ -0,0 +1 @@
+3:19:Invalid property assignment: unsigned int expected
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.5.qml
new file mode 100644
index 0000000000..c50ae9a26d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.5.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyTypeObject {
+ uintProperty: -13
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.6.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.6.errors.txt
new file mode 100644
index 0000000000..d0a0b001b6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.6.errors.txt
@@ -0,0 +1 @@
+3:19:Invalid property assignment: double expected
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.6.qml
new file mode 100644
index 0000000000..da10b7895f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.6.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyTypeObject {
+ realProperty: "Hello"
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.7.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.7.errors.txt
new file mode 100644
index 0000000000..614346bd2b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.7.errors.txt
@@ -0,0 +1 @@
+3:20:Invalid property assignment: color expected
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.7.qml
new file mode 100644
index 0000000000..ddc3835199
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.7.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyTypeObject {
+ colorProperty: 12
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.8.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.8.errors.txt
new file mode 100644
index 0000000000..1773c00825
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.8.errors.txt
@@ -0,0 +1 @@
+3:19:Invalid property assignment: date expected
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.8.qml b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.8.qml
new file mode 100644
index 0000000000..a5f6756399
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.8.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyTypeObject {
+ dateProperty: 12
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.9.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.9.errors.txt
new file mode 100644
index 0000000000..8630975c57
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.9.errors.txt
@@ -0,0 +1 @@
+3:19:Invalid property assignment: time expected
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.9.qml b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.9.qml
new file mode 100644
index 0000000000..a3db732692
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.9.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+MyTypeObject {
+ timeProperty: 12
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro b/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
new file mode 100644
index 0000000000..d7c1defb9f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
@@ -0,0 +1,14 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+QT += script network
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativelanguage.cpp \
+ testtypes.cpp
+HEADERS += testtypes.h
+
+INCLUDEPATH += ../shared/
+HEADERS += ../shared/testhttpserver.h
+SOURCES += ../shared/testhttpserver.cpp
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/LocalInternal.qml b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/LocalInternal.qml
new file mode 100644
index 0000000000..836c20a1f4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/LocalInternal.qml
@@ -0,0 +1,3 @@
+import Qt 4.6
+
+Image { source: "pics/blue.png" }
diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/Test.qml b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/Test.qml
new file mode 100644
index 0000000000..c4d5905e4d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/Test.qml
@@ -0,0 +1,2 @@
+import Qt 4.6
+Rectangle { }
diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/TestLocal.qml b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/TestLocal.qml
new file mode 100644
index 0000000000..11443ca6d5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/TestLocal.qml
@@ -0,0 +1 @@
+LocalInternal {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/TestSubDir.qml b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/TestSubDir.qml
new file mode 100644
index 0000000000..0dfede4093
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/TestSubDir.qml
@@ -0,0 +1,2 @@
+import "subdir"
+SubTest { }
diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/pics/blue.png b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/pics/blue.png
new file mode 100644
index 0000000000..46f815f1ed
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/pics/blue.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/qmldir b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/qmldir
new file mode 100644
index 0000000000..b32f82b251
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/qmldir
@@ -0,0 +1,3 @@
+Test 0.0 Test.qml
+TestSubDir 0.0 TestSubDir.qml
+TestLocal 0.0 TestLocal.qml
diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/SubTest.qml b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/SubTest.qml
new file mode 100644
index 0000000000..0ea9ec6a61
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/SubTest.qml
@@ -0,0 +1,3 @@
+import Qt 4.6
+
+Text {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/qmldir b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/qmldir
new file mode 100644
index 0000000000..f7016c7c0f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/qmldir
@@ -0,0 +1 @@
+SubTest 0.0 SubTest.qml
diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp
new file mode 100644
index 0000000000..9ffe28a569
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp
@@ -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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "testtypes.h"
+
+void registerTypes()
+{
+ QML_REGISTER_INTERFACE(MyInterface);
+ QML_REGISTER_TYPE(Test,1,0,MyQmlObject,MyQmlObject);
+ QML_REGISTER_TYPE(Test,1,0,MyTypeObject,MyTypeObject);
+ QML_REGISTER_TYPE(Test,1,0,MyContainer,MyContainer);
+ QML_REGISTER_TYPE(Test,1,0,MyPropertyValueSource,MyPropertyValueSource);
+ QML_REGISTER_TYPE(Test,1,0,MyDotPropertyObject,MyDotPropertyObject);
+ QML_REGISTER_TYPE(Test,1,0,MyNamespacedType,MyNamespace::MyNamespacedType);
+ QML_REGISTER_TYPE(Test,1,0,MySecondNamespacedType,MyNamespace::MySecondNamespacedType);
+ QML_REGISTER_NOCREATE_TYPE(MyGroupedObject);
+}
+
+QVariant myCustomVariantTypeConverter(const QString &data)
+{
+ MyCustomVariantType rv;
+ rv.a = data.toInt();
+ return QVariant::fromValue(rv);
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.h b/tests/auto/declarative/qdeclarativelanguage/testtypes.h
new file mode 100644
index 0000000000..df93dc85fe
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.h
@@ -0,0 +1,565 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef TESTTYPES_H
+#define TESTTYPES_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qrect.h>
+#include <QtCore/qdatetime.h>
+#include <QtGui/qmatrix.h>
+#include <QtGui/qcolor.h>
+#include <QtGui/qvector3d.h>
+#include <QtDeclarative/qdeclarative.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativeparserstatus.h>
+#include <QtDeclarative/qdeclarativepropertyvaluesource.h>
+#include <QtDeclarative/qdeclarativescriptstring.h>
+#include <QtDeclarative/qdeclarativeproperty.h>
+
+QVariant myCustomVariantTypeConverter(const QString &data);
+
+class MyInterface
+{
+public:
+ MyInterface() : id(913) {}
+ int id;
+};
+
+QT_BEGIN_NAMESPACE
+Q_DECLARE_INTERFACE(MyInterface, "com.trolltech.Qt.Test.MyInterface");
+QT_END_NAMESPACE
+QML_DECLARE_INTERFACE(MyInterface);
+
+struct MyCustomVariantType
+{
+ MyCustomVariantType() : a(0) {}
+ int a;
+};
+Q_DECLARE_METATYPE(MyCustomVariantType);
+
+class MyAttachedObject : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged)
+ Q_PROPERTY(int value2 READ value2 WRITE setValue2)
+public:
+ MyAttachedObject(QObject *parent) : QObject(parent), m_value(0), m_value2(0) {}
+
+ int value() const { return m_value; }
+ void setValue(int v) { if (m_value != v) { m_value = v; emit valueChanged(); } }
+
+ int value2() const { return m_value2; }
+ void setValue2(int v) { m_value2 = v; }
+
+signals:
+ void valueChanged();
+
+private:
+ int m_value;
+ int m_value2;
+};
+
+class MyQmlObject : public QObject, public MyInterface, public QDeclarativeParserStatus
+{
+ Q_OBJECT
+ Q_PROPERTY(int value READ value WRITE setValue FINAL)
+ Q_PROPERTY(QString readOnlyString READ readOnlyString)
+ Q_PROPERTY(bool enabled READ enabled WRITE setEnabled)
+ Q_PROPERTY(QRect rect READ rect WRITE setRect)
+ Q_PROPERTY(QMatrix matrix READ matrix WRITE setMatrix) //assumed to be unsupported by QML
+ Q_PROPERTY(MyInterface *interfaceProperty READ interface WRITE setInterface)
+ Q_PROPERTY(int onLiteralSignal READ onLiteralSignal WRITE setOnLiteralSignal);
+ Q_PROPERTY(MyCustomVariantType customType READ customType WRITE setCustomType);
+ Q_PROPERTY(MyQmlObject *qmlobjectProperty READ qmlobject WRITE setQmlobject)
+ Q_PROPERTY(int propertyWithNotify READ propertyWithNotify WRITE setPropertyWithNotify NOTIFY oddlyNamedNotifySignal)
+
+ Q_INTERFACES(MyInterface QDeclarativeParserStatus)
+public:
+ MyQmlObject() : m_value(-1), m_interface(0), m_qmlobject(0) { qRegisterMetaType<MyCustomVariantType>("MyCustomVariantType"); }
+
+ int value() const { return m_value; }
+ void setValue(int v) { m_value = v; }
+
+ QString readOnlyString() const { return QLatin1String(""); }
+
+ bool enabled() const { return false; }
+ void setEnabled(bool) {}
+
+ QRect rect() const { return QRect(); }
+ void setRect(const QRect&) {}
+
+ QMatrix matrix() const { return QMatrix(); }
+ void setMatrix(const QMatrix&) {}
+
+ MyInterface *interface() const { return m_interface; }
+ void setInterface(MyInterface *iface) { m_interface = iface; }
+
+ static MyAttachedObject *qmlAttachedProperties(QObject *other) {
+ return new MyAttachedObject(other);
+ }
+ Q_CLASSINFO("DefaultMethod", "basicSlot()");
+
+ int onLiteralSignal() const { return m_value; }
+ void setOnLiteralSignal(int v) { m_value = v; }
+
+ MyQmlObject *qmlobject() const { return m_qmlobject; }
+ void setQmlobject(MyQmlObject *o) { m_qmlobject = o; }
+
+ MyCustomVariantType customType() const { return m_custom; }
+ void setCustomType(const MyCustomVariantType &v) { m_custom = v; }
+
+ int propertyWithNotify() const { return m_propertyWithNotify; }
+ void setPropertyWithNotify(int i) { m_propertyWithNotify = i; emit oddlyNamedNotifySignal(); }
+public slots:
+ void basicSlot() { qWarning("MyQmlObject::basicSlot"); }
+ void basicSlotWithArgs(int v) { qWarning("MyQmlObject::basicSlotWithArgs(%d)", v); }
+
+signals:
+ void basicSignal();
+ void basicParameterizedSignal(int parameter);
+ void oddlyNamedNotifySignal();
+
+private:
+ friend class tst_qdeclarativelanguage;
+ int m_value;
+ MyInterface *m_interface;
+ MyQmlObject *m_qmlobject;
+ MyCustomVariantType m_custom;
+ int m_propertyWithNotify;
+};
+QML_DECLARE_TYPEINFO(MyQmlObject, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(MyQmlObject);
+
+class MyGroupedObject : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QDeclarativeScriptString script READ script WRITE setScript);
+ Q_PROPERTY(int value READ value WRITE setValue);
+public:
+ QDeclarativeScriptString script() const { return m_script; }
+ void setScript(const QDeclarativeScriptString &s) { m_script = s; }
+
+ int value() const { return m_value; }
+ void setValue(int v) { m_value = v; }
+
+private:
+ int m_value;
+ QDeclarativeScriptString m_script;
+};
+
+QML_DECLARE_TYPE(MyGroupedObject);
+
+
+class MyTypeObject : public QObject
+{
+ Q_OBJECT
+ Q_ENUMS(MyEnum)
+ Q_FLAGS(MyFlags)
+
+ Q_PROPERTY(QString id READ id WRITE setId);
+ Q_PROPERTY(QObject *objectProperty READ objectProperty WRITE setObjectProperty);
+ Q_PROPERTY(QDeclarativeComponent *componentProperty READ componentProperty WRITE setComponentProperty);
+ Q_PROPERTY(MyFlags flagProperty READ flagProperty WRITE setFlagProperty);
+ Q_PROPERTY(MyEnum enumProperty READ enumProperty WRITE setEnumProperty);
+ Q_PROPERTY(QString stringProperty READ stringProperty WRITE setStringProperty);
+ Q_PROPERTY(uint uintProperty READ uintProperty WRITE setUintProperty);
+ Q_PROPERTY(int intProperty READ intProperty WRITE setIntProperty);
+ Q_PROPERTY(qreal realProperty READ realProperty WRITE setRealProperty);
+ Q_PROPERTY(double doubleProperty READ doubleProperty WRITE setDoubleProperty);
+ Q_PROPERTY(float floatProperty READ floatProperty WRITE setFloatProperty);
+ Q_PROPERTY(QColor colorProperty READ colorProperty WRITE setColorProperty);
+ Q_PROPERTY(QDate dateProperty READ dateProperty WRITE setDateProperty);
+ Q_PROPERTY(QTime timeProperty READ timeProperty WRITE setTimeProperty);
+ Q_PROPERTY(QDateTime dateTimeProperty READ dateTimeProperty WRITE setDateTimeProperty);
+ Q_PROPERTY(QPoint pointProperty READ pointProperty WRITE setPointProperty);
+ Q_PROPERTY(QPointF pointFProperty READ pointFProperty WRITE setPointFProperty);
+ Q_PROPERTY(QSize sizeProperty READ sizeProperty WRITE setSizeProperty);
+ Q_PROPERTY(QSizeF sizeFProperty READ sizeFProperty WRITE setSizeFProperty);
+ Q_PROPERTY(QRect rectProperty READ rectProperty WRITE setRectProperty NOTIFY rectPropertyChanged);
+ Q_PROPERTY(QRect rectProperty2 READ rectProperty2 WRITE setRectProperty2);
+ Q_PROPERTY(QRectF rectFProperty READ rectFProperty WRITE setRectFProperty);
+ Q_PROPERTY(bool boolProperty READ boolProperty WRITE setBoolProperty);
+ Q_PROPERTY(QVariant variantProperty READ variantProperty WRITE setVariantProperty);
+ Q_PROPERTY(QVector3D vectorProperty READ vectorProperty WRITE setVectorProperty);
+ Q_PROPERTY(QUrl urlProperty READ urlProperty WRITE setUrlProperty);
+
+ Q_PROPERTY(QDeclarativeScriptString scriptProperty READ scriptProperty WRITE setScriptProperty);
+ Q_PROPERTY(MyGroupedObject *grouped READ grouped CONSTANT);
+ Q_PROPERTY(MyGroupedObject *nullGrouped READ nullGrouped CONSTANT);
+
+public:
+ MyTypeObject()
+ : objectPropertyValue(0), componentPropertyValue(0) {}
+
+ QString idValue;
+ QString id() const {
+ return idValue;
+ }
+ void setId(const QString &v) {
+ idValue = v;
+ }
+
+ QObject *objectPropertyValue;
+ QObject *objectProperty() const {
+ return objectPropertyValue;
+ }
+ void setObjectProperty(QObject *v) {
+ objectPropertyValue = v;
+ }
+
+ QDeclarativeComponent *componentPropertyValue;
+ QDeclarativeComponent *componentProperty() const {
+ return componentPropertyValue;
+ }
+ void setComponentProperty(QDeclarativeComponent *v) {
+ componentPropertyValue = v;
+ }
+
+ enum MyFlag { FlagVal1 = 0x01, FlagVal2 = 0x02, FlagVal3 = 0x04 };
+ Q_DECLARE_FLAGS(MyFlags, MyFlag)
+ MyFlags flagPropertyValue;
+ MyFlags flagProperty() const {
+ return flagPropertyValue;
+ }
+ void setFlagProperty(MyFlags v) {
+ flagPropertyValue = v;
+ }
+
+ enum MyEnum { EnumVal1, EnumVal2 };
+ MyEnum enumPropertyValue;
+ MyEnum enumProperty() const {
+ return enumPropertyValue;
+ }
+ void setEnumProperty(MyEnum v) {
+ enumPropertyValue = v;
+ }
+
+ QString stringPropertyValue;
+ QString stringProperty() const {
+ return stringPropertyValue;
+ }
+ void setStringProperty(const QString &v) {
+ stringPropertyValue = v;
+ }
+
+ uint uintPropertyValue;
+ uint uintProperty() const {
+ return uintPropertyValue;
+ }
+ void setUintProperty(const uint &v) {
+ uintPropertyValue = v;
+ }
+
+ int intPropertyValue;
+ int intProperty() const {
+ return intPropertyValue;
+ }
+ void setIntProperty(const int &v) {
+ intPropertyValue = v;
+ }
+
+ qreal realPropertyValue;
+ qreal realProperty() const {
+ return realPropertyValue;
+ }
+ void setRealProperty(const qreal &v) {
+ realPropertyValue = v;
+ }
+
+ double doublePropertyValue;
+ double doubleProperty() const {
+ return doublePropertyValue;
+ }
+ void setDoubleProperty(const double &v) {
+ doublePropertyValue = v;
+ }
+
+ float floatPropertyValue;
+ float floatProperty() const {
+ return floatPropertyValue;
+ }
+ void setFloatProperty(const float &v) {
+ floatPropertyValue = v;
+ }
+
+ QColor colorPropertyValue;
+ QColor colorProperty() const {
+ return colorPropertyValue;
+ }
+ void setColorProperty(const QColor &v) {
+ colorPropertyValue = v;
+ }
+
+ QDate datePropertyValue;
+ QDate dateProperty() const {
+ return datePropertyValue;
+ }
+ void setDateProperty(const QDate &v) {
+ datePropertyValue = v;
+ }
+
+ QTime timePropertyValue;
+ QTime timeProperty() const {
+ return timePropertyValue;
+ }
+ void setTimeProperty(const QTime &v) {
+ timePropertyValue = v;
+ }
+
+ QDateTime dateTimePropertyValue;
+ QDateTime dateTimeProperty() const {
+ return dateTimePropertyValue;
+ }
+ void setDateTimeProperty(const QDateTime &v) {
+ dateTimePropertyValue = v;
+ }
+
+ QPoint pointPropertyValue;
+ QPoint pointProperty() const {
+ return pointPropertyValue;
+ }
+ void setPointProperty(const QPoint &v) {
+ pointPropertyValue = v;
+ }
+
+ QPointF pointFPropertyValue;
+ QPointF pointFProperty() const {
+ return pointFPropertyValue;
+ }
+ void setPointFProperty(const QPointF &v) {
+ pointFPropertyValue = v;
+ }
+
+ QSize sizePropertyValue;
+ QSize sizeProperty() const {
+ return sizePropertyValue;
+ }
+ void setSizeProperty(const QSize &v) {
+ sizePropertyValue = v;
+ }
+
+ QSizeF sizeFPropertyValue;
+ QSizeF sizeFProperty() const {
+ return sizeFPropertyValue;
+ }
+ void setSizeFProperty(const QSizeF &v) {
+ sizeFPropertyValue = v;
+ }
+
+ QRect rectPropertyValue;
+ QRect rectProperty() const {
+ return rectPropertyValue;
+ }
+ void setRectProperty(const QRect &v) {
+ rectPropertyValue = v;
+ emit rectPropertyChanged();
+ }
+
+ QRect rectPropertyValue2;
+ QRect rectProperty2() const {
+ return rectPropertyValue2;
+ }
+ void setRectProperty2(const QRect &v) {
+ rectPropertyValue2 = v;
+ }
+
+ QRectF rectFPropertyValue;
+ QRectF rectFProperty() const {
+ return rectFPropertyValue;
+ }
+ void setRectFProperty(const QRectF &v) {
+ rectFPropertyValue = v;
+ }
+
+ bool boolPropertyValue;
+ bool boolProperty() const {
+ return boolPropertyValue;
+ }
+ void setBoolProperty(const bool &v) {
+ boolPropertyValue = v;
+ }
+
+ QVariant variantPropertyValue;
+ QVariant variantProperty() const {
+ return variantPropertyValue;
+ }
+ void setVariantProperty(const QVariant &v) {
+ variantPropertyValue = v;
+ }
+
+ QVector3D vectorPropertyValue;
+ QVector3D vectorProperty() const {
+ return vectorPropertyValue;
+ }
+ void setVectorProperty(const QVector3D &v) {
+ vectorPropertyValue = v;
+ }
+
+ QUrl urlPropertyValue;
+ QUrl urlProperty() const {
+ return urlPropertyValue;
+ }
+ void setUrlProperty(const QUrl &v) {
+ urlPropertyValue = v;
+ }
+
+ QDeclarativeScriptString scriptPropertyValue;
+ QDeclarativeScriptString scriptProperty() const {
+ return scriptPropertyValue;
+ }
+ void setScriptProperty(const QDeclarativeScriptString &v) {
+ scriptPropertyValue = v;
+ }
+
+ MyGroupedObject groupedValue;
+ MyGroupedObject *grouped() { return &groupedValue; }
+
+ MyGroupedObject *nullGrouped() { return 0; }
+
+ void doAction() { emit action(); }
+signals:
+ void action();
+ void rectPropertyChanged();
+};
+Q_DECLARE_OPERATORS_FOR_FLAGS(MyTypeObject::MyFlags)
+QML_DECLARE_TYPE(MyTypeObject);
+
+class MyContainer : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QDeclarativeListProperty<QObject> children READ children)
+ Q_PROPERTY(QDeclarativeListProperty<MyInterface> qlistInterfaces READ qlistInterfaces)
+ Q_CLASSINFO("DefaultProperty", "children");
+public:
+ MyContainer() {}
+
+ QDeclarativeListProperty<QObject> children() { return QDeclarativeListProperty<QObject>(this, m_children); }
+ QList<QObject *> *getChildren() { return &m_children; }
+ QDeclarativeListProperty<MyInterface> qlistInterfaces() { return QDeclarativeListProperty<MyInterface>(this, m_interfaces); }
+ QList<MyInterface *> *getQListInterfaces() { return &m_interfaces; }
+
+ QList<QObject*> m_children;
+ QList<MyInterface *> m_interfaces;
+};
+
+QML_DECLARE_TYPE(MyContainer);
+
+
+class MyPropertyValueSource : public QObject, public QDeclarativePropertyValueSource
+{
+ Q_OBJECT
+ Q_INTERFACES(QDeclarativePropertyValueSource)
+public:
+ MyPropertyValueSource()
+ : QDeclarativePropertyValueSource() {}
+
+ QDeclarativeProperty prop;
+ virtual void setTarget(const QDeclarativeProperty &p)
+ {
+ prop = p;
+ }
+};
+QML_DECLARE_TYPE(MyPropertyValueSource);
+
+class MyDotPropertyObject : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(MyQmlObject *obj READ obj)
+ Q_PROPERTY(MyQmlObject *readWriteObj READ readWriteObj WRITE setReadWriteObj)
+public:
+ MyDotPropertyObject() : m_rwobj(0), m_ownRWObj(false) {}
+ ~MyDotPropertyObject()
+ {
+ if (m_ownRWObj)
+ delete m_rwobj;
+ }
+
+ MyQmlObject *obj() { return 0; }
+
+ MyQmlObject *readWriteObj()
+ {
+ if (!m_rwobj) {
+ m_rwobj = new MyQmlObject;
+ m_ownRWObj = true;
+ }
+ return m_rwobj;
+ }
+
+ void setReadWriteObj(MyQmlObject *obj)
+ {
+ if (m_ownRWObj) {
+ delete m_rwobj;
+ m_ownRWObj = false;
+ }
+
+ m_rwobj = obj;
+ }
+
+private:
+ MyQmlObject *m_rwobj;
+ bool m_ownRWObj;
+};
+
+QML_DECLARE_TYPE(MyDotPropertyObject);
+
+namespace MyNamespace {
+ class MyNamespacedType : public QObject
+ {
+ Q_OBJECT
+ };
+
+ class MySecondNamespacedType : public QObject
+ {
+ Q_OBJECT
+ Q_PROPERTY(QDeclarativeListProperty<MyNamespace::MyNamespacedType> list READ list);
+ public:
+ QDeclarativeListProperty<MyNamespacedType> list() { return QDeclarativeListProperty<MyNamespacedType>(this, m_list); }
+
+ private:
+ QList<MyNamespacedType *> m_list;
+ };
+}
+QML_DECLARE_TYPE(MyNamespace::MyNamespacedType);
+QML_DECLARE_TYPE(MyNamespace::MySecondNamespacedType);
+
+void registerTypes();
+
+#endif // TESTTYPES_H
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
new file mode 100644
index 0000000000..083c55179a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -0,0 +1,1441 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtCore/qfile.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qfileinfo.h>
+#include <QtCore/qdir.h>
+
+#include <private/qdeclarativeproperty_p.h>
+#include <private/qdeclarativemetatype_p.h>
+
+#include "testtypes.h"
+
+#include "../../../shared/util.h"
+
+/*
+This test case covers QML language issues. This covers everything that does not
+involve evaluating ECMAScript expressions and bindings.
+
+Evaluation of expressions and bindings is covered in qmlecmascript
+*/
+class tst_qdeclarativelanguage : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativelanguage() {
+ QDeclarativeMetaType::registerCustomStringConverter(qMetaTypeId<MyCustomVariantType>(), myCustomVariantTypeConverter);
+ QFileInfo fileInfo(__FILE__);
+ engine.addImportPath(fileInfo.absoluteDir().filePath(QLatin1String("data/lib")));
+ }
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+
+ void errors_data();
+ void errors();
+
+ void simpleObject();
+ void simpleContainer();
+ void interfaceProperty();
+ void interfaceQList();
+ void assignObjectToSignal();
+ void assignObjectToVariant();
+ void assignLiteralSignalProperty();
+ void assignQmlComponent();
+ void assignBasicTypes();
+ void assignTypeExtremes();
+ void assignCompositeToType();
+ void customParserTypes();
+ void rootAsQmlComponent();
+ void inlineQmlComponents();
+ void idProperty();
+ void autoNotifyConnection();
+ void assignSignal();
+ void dynamicProperties();
+ void dynamicPropertiesNested();
+ void listProperties();
+ void dynamicObjectProperties();
+ void dynamicSignalsAndSlots();
+ void simpleBindings();
+ void autoComponentCreation();
+ void propertyValueSource();
+ void attachedProperties();
+ void dynamicObjects();
+ void customVariantTypes();
+ void valueTypes();
+ void cppnamespace();
+ void aliasProperties();
+ void componentCompositeType();
+ void i18n();
+ void i18n_data();
+ void onCompleted();
+ void scriptString();
+ void defaultPropertyListOrder();
+ void declaredPropertyValues();
+
+ void importsBuiltin_data();
+ void importsBuiltin();
+ void importsLocal_data();
+ void importsLocal();
+ void importsRemote_data();
+ void importsRemote();
+ void importsInstalled_data();
+ void importsInstalled();
+ void importsOrder_data();
+ void importsOrder();
+
+ void qmlAttachedPropertiesObjectMethod();
+
+ void customOnProperty();
+
+ // regression tests for crashes
+ void crash1();
+ void crash2();
+
+private:
+ QDeclarativeEngine engine;
+ void testType(const QString& qml, const QString& type);
+};
+
+#define VERIFY_ERRORS(errorfile) \
+ if (!errorfile) { \
+ if (qgetenv("DEBUG") != "" && !component.errors().isEmpty()) \
+ qWarning() << "Unexpected Errors:" << component.errors(); \
+ QVERIFY(!component.isError()); \
+ QVERIFY(component.errors().isEmpty()); \
+ } else { \
+ QFile file(QLatin1String(SRCDIR) + QLatin1String("/data/") + QLatin1String(errorfile)); \
+ QVERIFY(file.open(QIODevice::ReadOnly)); \
+ QByteArray data = file.readAll(); \
+ file.close(); \
+ QList<QByteArray> expected = data.split('\n'); \
+ expected.removeAll(QByteArray("")); \
+ QList<QDeclarativeError> errors = component.errors(); \
+ QList<QByteArray> actual; \
+ for (int ii = 0; ii < errors.count(); ++ii) { \
+ const QDeclarativeError &error = errors.at(ii); \
+ QByteArray errorStr = QByteArray::number(error.line()) + ":" + \
+ QByteArray::number(error.column()) + ":" + \
+ error.description().toUtf8(); \
+ actual << errorStr; \
+ } \
+ if (qgetenv("DEBUG") != "" && expected != actual) \
+ qWarning() << "Expected:" << expected << "Actual:" << actual; \
+ if (qgetenv("QDECLARATIVELANGUAGE_UPDATEERRORS") != "" && expected != actual) {\
+ QFile file(QLatin1String("data/") + QLatin1String(errorfile)); \
+ QVERIFY(file.open(QIODevice::WriteOnly)); \
+ for (int ii = 0; ii < actual.count(); ++ii) { \
+ file.write(actual.at(ii)); file.write("\n"); \
+ } \
+ file.close(); \
+ } else { \
+ QCOMPARE(expected, actual); \
+ } \
+ }
+
+inline QUrl TEST_FILE(const QString &filename)
+{
+ QFileInfo fileInfo(__FILE__);
+ return QUrl::fromLocalFile(fileInfo.absoluteDir().filePath(QLatin1String("data/") + filename));
+}
+
+inline QUrl TEST_FILE(const char *filename)
+{
+ return TEST_FILE(QLatin1String(filename));
+}
+
+void tst_qdeclarativelanguage::cleanupTestCase()
+{
+ QVERIFY(QFile::remove(TEST_FILE(QString::fromUtf8("I18nType\303\201\303\242\303\243\303\244\303\245.qml")).toLocalFile()));
+}
+
+void tst_qdeclarativelanguage::errors_data()
+{
+ QTest::addColumn<QString>("file");
+ QTest::addColumn<QString>("errorFile");
+ QTest::addColumn<bool>("create");
+
+ QTest::newRow("nonexistantProperty.1") << "nonexistantProperty.1.qml" << "nonexistantProperty.1.errors.txt" << false;
+ QTest::newRow("nonexistantProperty.2") << "nonexistantProperty.2.qml" << "nonexistantProperty.2.errors.txt" << false;
+ QTest::newRow("nonexistantProperty.3") << "nonexistantProperty.3.qml" << "nonexistantProperty.3.errors.txt" << false;
+ QTest::newRow("nonexistantProperty.4") << "nonexistantProperty.4.qml" << "nonexistantProperty.4.errors.txt" << false;
+ QTest::newRow("nonexistantProperty.5") << "nonexistantProperty.5.qml" << "nonexistantProperty.5.errors.txt" << false;
+ QTest::newRow("nonexistantProperty.6") << "nonexistantProperty.6.qml" << "nonexistantProperty.6.errors.txt" << false;
+
+ QTest::newRow("wrongType (string for int)") << "wrongType.1.qml" << "wrongType.1.errors.txt" << false;
+ QTest::newRow("wrongType (int for bool)") << "wrongType.2.qml" << "wrongType.2.errors.txt" << false;
+ QTest::newRow("wrongType (bad rect)") << "wrongType.3.qml" << "wrongType.3.errors.txt" << false;
+
+ QTest::newRow("wrongType (invalid enum)") << "wrongType.4.qml" << "wrongType.4.errors.txt" << false;
+ QTest::newRow("wrongType (int for uint)") << "wrongType.5.qml" << "wrongType.5.errors.txt" << false;
+ QTest::newRow("wrongType (string for real)") << "wrongType.6.qml" << "wrongType.6.errors.txt" << false;
+ QTest::newRow("wrongType (int for color)") << "wrongType.7.qml" << "wrongType.7.errors.txt" << false;
+ QTest::newRow("wrongType (int for date)") << "wrongType.8.qml" << "wrongType.8.errors.txt" << false;
+ QTest::newRow("wrongType (int for time)") << "wrongType.9.qml" << "wrongType.9.errors.txt" << false;
+ QTest::newRow("wrongType (int for datetime)") << "wrongType.10.qml" << "wrongType.10.errors.txt" << false;
+ QTest::newRow("wrongType (string for point)") << "wrongType.11.qml" << "wrongType.11.errors.txt" << false;
+ QTest::newRow("wrongType (color for size)") << "wrongType.12.qml" << "wrongType.12.errors.txt" << false;
+ QTest::newRow("wrongType (number string for int)") << "wrongType.13.qml" << "wrongType.13.errors.txt" << false;
+ QTest::newRow("wrongType (int for string)") << "wrongType.14.qml" << "wrongType.14.errors.txt" << false;
+ QTest::newRow("wrongType (int for url)") << "wrongType.15.qml" << "wrongType.15.errors.txt" << false;
+
+ QTest::newRow("readOnly.1") << "readOnly.1.qml" << "readOnly.1.errors.txt" << false;
+ QTest::newRow("readOnly.2") << "readOnly.2.qml" << "readOnly.2.errors.txt" << false;
+ QTest::newRow("readOnly.3") << "readOnly.3.qml" << "readOnly.3.errors.txt" << false;
+
+ QTest::newRow("listAssignment.2") << "listAssignment.2.qml" << "listAssignment.2.errors.txt" << false;
+ QTest::newRow("listAssignment.3") << "listAssignment.3.qml" << "listAssignment.3.errors.txt" << false;
+
+ QTest::newRow("invalidID.1") << "invalidID.qml" << "invalidID.errors.txt" << false;
+ QTest::newRow("invalidID.2") << "invalidID.2.qml" << "invalidID.2.errors.txt" << false;
+ QTest::newRow("invalidID.3") << "invalidID.3.qml" << "invalidID.3.errors.txt" << false;
+ QTest::newRow("invalidID.4") << "invalidID.4.qml" << "invalidID.4.errors.txt" << false;
+ QTest::newRow("invalidID.5") << "invalidID.5.qml" << "invalidID.5.errors.txt" << false;
+ QTest::newRow("invalidID.6") << "invalidID.6.qml" << "invalidID.6.errors.txt" << false;
+ QTest::newRow("invalidID.7") << "invalidID.7.qml" << "invalidID.7.errors.txt" << false;
+ QTest::newRow("invalidID.8") << "invalidID.8.qml" << "invalidID.8.errors.txt" << false;
+ QTest::newRow("invalidID.9") << "invalidID.9.qml" << "invalidID.9.errors.txt" << false;
+
+ QTest::newRow("unsupportedProperty") << "unsupportedProperty.qml" << "unsupportedProperty.errors.txt" << false;
+ QTest::newRow("nullDotProperty") << "nullDotProperty.qml" << "nullDotProperty.errors.txt" << true;
+ QTest::newRow("fakeDotProperty") << "fakeDotProperty.qml" << "fakeDotProperty.errors.txt" << false;
+ QTest::newRow("duplicateIDs") << "duplicateIDs.qml" << "duplicateIDs.errors.txt" << false;
+ QTest::newRow("unregisteredObject") << "unregisteredObject.qml" << "unregisteredObject.errors.txt" << false;
+ QTest::newRow("empty") << "empty.qml" << "empty.errors.txt" << false;
+ QTest::newRow("missingObject") << "missingObject.qml" << "missingObject.errors.txt" << false;
+ QTest::newRow("failingComponent") << "failingComponentTest.qml" << "failingComponent.errors.txt" << false;
+ QTest::newRow("missingSignal") << "missingSignal.qml" << "missingSignal.errors.txt" << false;
+ QTest::newRow("finalOverride") << "finalOverride.qml" << "finalOverride.errors.txt" << false;
+ QTest::newRow("customParserIdNotAllowed") << "customParserIdNotAllowed.qml" << "customParserIdNotAllowed.errors.txt" << false;
+
+ QTest::newRow("invalidGroupedProperty.1") << "invalidGroupedProperty.1.qml" << "invalidGroupedProperty.1.errors.txt" << false;
+ QTest::newRow("invalidGroupedProperty.2") << "invalidGroupedProperty.2.qml" << "invalidGroupedProperty.2.errors.txt" << false;
+ QTest::newRow("invalidGroupedProperty.3") << "invalidGroupedProperty.3.qml" << "invalidGroupedProperty.3.errors.txt" << false;
+ QTest::newRow("invalidGroupedProperty.4") << "invalidGroupedProperty.4.qml" << "invalidGroupedProperty.4.errors.txt" << false;
+ QTest::newRow("invalidGroupedProperty.5") << "invalidGroupedProperty.5.qml" << "invalidGroupedProperty.5.errors.txt" << false;
+ QTest::newRow("invalidGroupedProperty.6") << "invalidGroupedProperty.6.qml" << "invalidGroupedProperty.6.errors.txt" << false;
+ QTest::newRow("invalidGroupedProperty.7") << "invalidGroupedProperty.7.qml" << "invalidGroupedProperty.7.errors.txt" << true;
+ QTest::newRow("invalidGroupedProperty.8") << "invalidGroupedProperty.8.qml" << "invalidGroupedProperty.8.errors.txt" << false;
+ QTest::newRow("invalidGroupedProperty.9") << "invalidGroupedProperty.9.qml" << "invalidGroupedProperty.9.errors.txt" << false;
+ QTest::newRow("invalidGroupedProperty.10") << "invalidGroupedProperty.10.qml" << "invalidGroupedProperty.10.errors.txt" << false;
+
+ QTest::newRow("importNamespaceConflict") << "importNamespaceConflict.qml" << "importNamespaceConflict.errors.txt" << false;
+ QTest::newRow("importVersionMissing (builtin)") << "importVersionMissingBuiltIn.qml" << "importVersionMissingBuiltIn.errors.txt" << false;
+ QTest::newRow("importVersionMissing (installed)") << "importVersionMissingInstalled.qml" << "importVersionMissingInstalled.errors.txt" << false;
+ QTest::newRow("invalidImportID") << "invalidImportID.qml" << "invalidImportID.errors.txt" << false;
+
+ QTest::newRow("signal.1") << "signal.1.qml" << "signal.1.errors.txt" << false;
+ QTest::newRow("signal.2") << "signal.2.qml" << "signal.2.errors.txt" << false;
+ QTest::newRow("signal.3") << "signal.3.qml" << "signal.3.errors.txt" << false;
+ QTest::newRow("signal.4") << "signal.4.qml" << "signal.4.errors.txt" << false;
+
+ QTest::newRow("method.1") << "method.1.qml" << "method.1.errors.txt" << false;
+
+ QTest::newRow("property.1") << "property.1.qml" << "property.1.errors.txt" << false;
+ QTest::newRow("property.2") << "property.2.qml" << "property.2.errors.txt" << false;
+ QTest::newRow("property.3") << "property.3.qml" << "property.3.errors.txt" << false;
+ QTest::newRow("property.4") << "property.4.qml" << "property.4.errors.txt" << false;
+ QTest::newRow("property.5") << "property.5.qml" << "property.5.errors.txt" << false;
+ QTest::newRow("property.6") << "property.6.qml" << "property.6.errors.txt" << false;
+ QTest::newRow("property.7") << "property.7.qml" << "property.7.errors.txt" << false;
+
+ QTest::newRow("Script.1") << "script.1.qml" << "script.1.errors.txt" << false;
+ QTest::newRow("Script.2") << "script.2.qml" << "script.2.errors.txt" << false;
+ QTest::newRow("Script.3") << "script.3.qml" << "script.3.errors.txt" << false;
+ QTest::newRow("Script.4") << "script.4.qml" << "script.4.errors.txt" << false;
+ QTest::newRow("Script.5") << "script.5.qml" << "script.5.errors.txt" << false;
+ QTest::newRow("Script.6") << "script.6.qml" << "script.6.errors.txt" << false;
+ QTest::newRow("Script.7") << "script.7.qml" << "script.7.errors.txt" << false;
+ QTest::newRow("Script.8") << "script.8.qml" << "script.8.errors.txt" << false;
+ QTest::newRow("Script.9") << "script.9.qml" << "script.9.errors.txt" << false;
+ QTest::newRow("Script.10") << "script.10.qml" << "script.10.errors.txt" << false;
+ QTest::newRow("Script.11") << "script.11.qml" << "script.11.errors.txt" << false;
+ QTest::newRow("Script.12") << "script.12.qml" << "script.12.errors.txt" << false;
+
+ QTest::newRow("Component.1") << "component.1.qml" << "component.1.errors.txt" << false;
+ QTest::newRow("Component.2") << "component.2.qml" << "component.2.errors.txt" << false;
+ QTest::newRow("Component.3") << "component.3.qml" << "component.3.errors.txt" << false;
+ QTest::newRow("Component.4") << "component.4.qml" << "component.4.errors.txt" << false;
+ QTest::newRow("Component.5") << "component.5.qml" << "component.5.errors.txt" << false;
+ QTest::newRow("Component.6") << "component.6.qml" << "component.6.errors.txt" << false;
+
+ QTest::newRow("MultiSet.1") << "multiSet.1.qml" << "multiSet.1.errors.txt" << false;
+ QTest::newRow("MultiSet.2") << "multiSet.2.qml" << "multiSet.2.errors.txt" << false;
+ QTest::newRow("MultiSet.3") << "multiSet.3.qml" << "multiSet.3.errors.txt" << false;
+ QTest::newRow("MultiSet.4") << "multiSet.4.qml" << "multiSet.4.errors.txt" << false;
+ QTest::newRow("MultiSet.5") << "multiSet.5.qml" << "multiSet.5.errors.txt" << false;
+ QTest::newRow("MultiSet.6") << "multiSet.6.qml" << "multiSet.6.errors.txt" << false;
+ QTest::newRow("MultiSet.7") << "multiSet.7.qml" << "multiSet.7.errors.txt" << false;
+ QTest::newRow("MultiSet.8") << "multiSet.8.qml" << "multiSet.8.errors.txt" << false;
+ QTest::newRow("MultiSet.9") << "multiSet.9.qml" << "multiSet.9.errors.txt" << false;
+ QTest::newRow("MultiSet.10") << "multiSet.10.qml" << "multiSet.10.errors.txt" << false;
+
+ QTest::newRow("invalidAttachedProperty.1") << "invalidAttachedProperty.1.qml" << "invalidAttachedProperty.1.errors.txt" << false;
+ QTest::newRow("invalidAttachedProperty.2") << "invalidAttachedProperty.2.qml" << "invalidAttachedProperty.2.errors.txt" << false;
+ QTest::newRow("invalidAttachedProperty.3") << "invalidAttachedProperty.3.qml" << "invalidAttachedProperty.3.errors.txt" << false;
+ QTest::newRow("invalidAttachedProperty.4") << "invalidAttachedProperty.4.qml" << "invalidAttachedProperty.4.errors.txt" << false;
+ QTest::newRow("invalidAttachedProperty.5") << "invalidAttachedProperty.5.qml" << "invalidAttachedProperty.5.errors.txt" << false;
+ QTest::newRow("invalidAttachedProperty.6") << "invalidAttachedProperty.6.qml" << "invalidAttachedProperty.6.errors.txt" << false;
+ QTest::newRow("invalidAttachedProperty.7") << "invalidAttachedProperty.7.qml" << "invalidAttachedProperty.7.errors.txt" << false;
+ QTest::newRow("invalidAttachedProperty.8") << "invalidAttachedProperty.8.qml" << "invalidAttachedProperty.8.errors.txt" << false;
+ QTest::newRow("invalidAttachedProperty.9") << "invalidAttachedProperty.9.qml" << "invalidAttachedProperty.9.errors.txt" << false;
+ QTest::newRow("invalidAttachedProperty.10") << "invalidAttachedProperty.10.qml" << "invalidAttachedProperty.10.errors.txt" << false;
+ QTest::newRow("invalidAttachedProperty.11") << "invalidAttachedProperty.11.qml" << "invalidAttachedProperty.11.errors.txt" << false;
+
+ QTest::newRow("nestedErrors") << "nestedErrors.qml" << "nestedErrors.errors.txt" << false;
+ QTest::newRow("defaultGrouped") << "defaultGrouped.qml" << "defaultGrouped.errors.txt" << false;
+ QTest::newRow("emptySignal") << "emptySignal.qml" << "emptySignal.errors.txt" << false;
+ QTest::newRow("doubleSignal") << "doubleSignal.qml" << "doubleSignal.errors.txt" << false;
+ QTest::newRow("invalidRoot") << "invalidRoot.qml" << "invalidRoot.errors.txt" << false;
+ QTest::newRow("missingValueTypeProperty") << "missingValueTypeProperty.qml" << "missingValueTypeProperty.errors.txt" << false;
+ QTest::newRow("objectValueTypeProperty") << "objectValueTypeProperty.qml" << "objectValueTypeProperty.errors.txt" << false;
+ QTest::newRow("enumTypes") << "enumTypes.qml" << "enumTypes.errors.txt" << false;
+}
+
+
+void tst_qdeclarativelanguage::errors()
+{
+ QFETCH(QString, file);
+ QFETCH(QString, errorFile);
+ QFETCH(bool, create);
+
+ QDeclarativeComponent component(&engine, TEST_FILE(file));
+
+ if(create) {
+ QObject *object = component.create();
+ QVERIFY(object == 0);
+ }
+
+ VERIFY_ERRORS(errorFile.toLatin1().constData());
+}
+
+void tst_qdeclarativelanguage::simpleObject()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("simpleObject.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+}
+
+void tst_qdeclarativelanguage::simpleContainer()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("simpleContainer.qml"));
+ VERIFY_ERRORS(0);
+ MyContainer *container= qobject_cast<MyContainer*>(component.create());
+ QVERIFY(container != 0);
+ QCOMPARE(container->getChildren()->count(),2);
+}
+
+void tst_qdeclarativelanguage::interfaceProperty()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("interfaceProperty.qml"));
+ VERIFY_ERRORS(0);
+ MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create());
+ QVERIFY(object != 0);
+ QVERIFY(object->interface());
+ QVERIFY(object->interface()->id == 913);
+}
+
+void tst_qdeclarativelanguage::interfaceQList()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("interfaceQList.qml"));
+ VERIFY_ERRORS(0);
+ MyContainer *container= qobject_cast<MyContainer*>(component.create());
+ QVERIFY(container != 0);
+ QVERIFY(container->getQListInterfaces()->count() == 2);
+ for(int ii = 0; ii < 2; ++ii)
+ QVERIFY(container->getQListInterfaces()->at(ii)->id == 913);
+}
+
+void tst_qdeclarativelanguage::assignObjectToSignal()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("assignObjectToSignal.qml"));
+ VERIFY_ERRORS(0);
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+ QTest::ignoreMessage(QtWarningMsg, "MyQmlObject::basicSlot");
+ emit object->basicSignal();
+}
+
+void tst_qdeclarativelanguage::assignObjectToVariant()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("assignObjectToVariant.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ QVariant v = object->property("a");
+ QVERIFY(v.userType() == qMetaTypeId<QObject *>());
+}
+
+void tst_qdeclarativelanguage::assignLiteralSignalProperty()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("assignLiteralSignalProperty.qml"));
+ VERIFY_ERRORS(0);
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->onLiteralSignal(), 10);
+}
+
+// Test is an external component can be loaded and assigned (to a qlist)
+void tst_qdeclarativelanguage::assignQmlComponent()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("assignQmlComponent.qml"));
+ VERIFY_ERRORS(0);
+ MyContainer *object = qobject_cast<MyContainer *>(component.create());
+ QVERIFY(object != 0);
+ QVERIFY(object->getChildren()->count() == 1);
+ QObject *child = object->getChildren()->at(0);
+ QCOMPARE(child->property("x"), QVariant(10));
+ QCOMPARE(child->property("y"), QVariant(11));
+}
+
+// Test literal assignment to all the basic types
+void tst_qdeclarativelanguage::assignBasicTypes()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("assignBasicTypes.qml"));
+ VERIFY_ERRORS(0);
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->flagProperty(), MyTypeObject::FlagVal1 | MyTypeObject::FlagVal3);
+ QCOMPARE(object->enumProperty(), MyTypeObject::EnumVal2);
+ QCOMPARE(object->stringProperty(), QString("Hello World!"));
+ QCOMPARE(object->uintProperty(), uint(10));
+ QCOMPARE(object->intProperty(), -19);
+ QCOMPARE((float)object->realProperty(), float(23.2));
+ QCOMPARE((float)object->doubleProperty(), float(-19.7));
+ QCOMPARE((float)object->floatProperty(), float(8.5));
+ QCOMPARE(object->colorProperty(), QColor("red"));
+ QCOMPARE(object->dateProperty(), QDate(1982, 11, 25));
+ QCOMPARE(object->timeProperty(), QTime(11, 11, 32));
+ QCOMPARE(object->dateTimeProperty(), QDateTime(QDate(2009, 5, 12), QTime(13, 22, 1)));
+ QCOMPARE(object->pointProperty(), QPoint(99,13));
+ QCOMPARE(object->pointFProperty(), QPointF((float)-10.1, (float)12.3));
+ QCOMPARE(object->sizeProperty(), QSize(99, 13));
+ QCOMPARE(object->sizeFProperty(), QSizeF((float)0.1, (float)0.2));
+ QCOMPARE(object->rectProperty(), QRect(9, 7, 100, 200));
+ QCOMPARE(object->rectFProperty(), QRectF((float)1000.1, (float)-10.9, (float)400, (float)90.99));
+ QCOMPARE(object->boolProperty(), true);
+ QCOMPARE(object->variantProperty(), QVariant("Hello World!"));
+ QCOMPARE(object->vectorProperty(), QVector3D(10, 1, 2.2));
+ QCOMPARE(object->urlProperty(), component.url().resolved(QUrl("main.qml")));
+ QVERIFY(object->objectProperty() != 0);
+ MyTypeObject *child = qobject_cast<MyTypeObject *>(object->objectProperty());
+ QVERIFY(child != 0);
+ QCOMPARE(child->intProperty(), 8);
+}
+
+// Test edge case type assignments
+void tst_qdeclarativelanguage::assignTypeExtremes()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("assignTypeExtremes.qml"));
+ VERIFY_ERRORS(0);
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->uintProperty(), 0xEE6B2800);
+ QCOMPARE(object->intProperty(), -0x77359400);
+}
+
+// Test that a composite type can assign to a property of its base type
+void tst_qdeclarativelanguage::assignCompositeToType()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("assignCompositeToType.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+}
+
+// Tests that custom parser types can be instantiated
+void tst_qdeclarativelanguage::customParserTypes()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("customParserTypes.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ QVERIFY(object->property("count") == QVariant(2));
+}
+
+// Tests that the root item can be a custom component
+void tst_qdeclarativelanguage::rootAsQmlComponent()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("rootAsQmlComponent.qml"));
+ VERIFY_ERRORS(0);
+ MyContainer *object = qobject_cast<MyContainer *>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->property("x"), QVariant(11));
+ QCOMPARE(object->getChildren()->count(), 2);
+}
+
+// Tests that components can be specified inline
+void tst_qdeclarativelanguage::inlineQmlComponents()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("inlineQmlComponents.qml"));
+ VERIFY_ERRORS(0);
+ MyContainer *object = qobject_cast<MyContainer *>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->getChildren()->count(), 1);
+ QDeclarativeComponent *comp = qobject_cast<QDeclarativeComponent *>(object->getChildren()->at(0));
+ QVERIFY(comp != 0);
+ MyQmlObject *compObject = qobject_cast<MyQmlObject *>(comp->create());
+ QVERIFY(compObject != 0);
+ QCOMPARE(compObject->value(), 11);
+}
+
+// Tests that types that have an id property have it set
+void tst_qdeclarativelanguage::idProperty()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("idProperty.qml"));
+ VERIFY_ERRORS(0);
+ MyContainer *object = qobject_cast<MyContainer *>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->getChildren()->count(), 1);
+ MyTypeObject *child =
+ qobject_cast<MyTypeObject *>(object->getChildren()->at(0));
+ QVERIFY(child != 0);
+ QCOMPARE(child->id(), QString("myObjectId"));
+ QCOMPARE(object->property("object"), QVariant::fromValue((QObject *)child));
+}
+
+// Tests automatic connection to notify signals if "onBlahChanged" syntax is used
+// even if the notify signal for "blah" is not called "blahChanged"
+void tst_qdeclarativelanguage::autoNotifyConnection()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("autoNotifyConnection.qml"));
+ VERIFY_ERRORS(0);
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+ QMetaProperty prop = object->metaObject()->property(object->metaObject()->indexOfProperty("receivedNotify"));
+ QVERIFY(prop.isValid());
+
+ QCOMPARE(prop.read(object), QVariant::fromValue(false));
+ object->setPropertyWithNotify(1);
+ QCOMPARE(prop.read(object), QVariant::fromValue(true));
+}
+
+// Tests that signals can be assigned to
+void tst_qdeclarativelanguage::assignSignal()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("assignSignal.qml"));
+ VERIFY_ERRORS(0);
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(object != 0);
+ QTest::ignoreMessage(QtWarningMsg, "MyQmlObject::basicSlot");
+ emit object->basicSignal();
+ QTest::ignoreMessage(QtWarningMsg, "MyQmlObject::basicSlotWithArgs(9)");
+ emit object->basicParameterizedSignal(9);
+}
+
+// Tests the creation and assignment of dynamic properties
+void tst_qdeclarativelanguage::dynamicProperties()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("dynamicProperties.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ QCOMPARE(object->property("intProperty"), QVariant(10));
+ QCOMPARE(object->property("boolProperty"), QVariant(false));
+ QCOMPARE(object->property("doubleProperty"), QVariant(-10.1));
+ QCOMPARE(object->property("realProperty"), QVariant((qreal)-19.9));
+ QCOMPARE(object->property("stringProperty"), QVariant("Hello World!"));
+ QCOMPARE(object->property("urlProperty"), QVariant(TEST_FILE("main.qml")));
+ QCOMPARE(object->property("colorProperty"), QVariant(QColor("red")));
+ QCOMPARE(object->property("dateProperty"), QVariant(QDate(1945, 9, 2)));
+ QCOMPARE(object->property("varProperty"), QVariant("Hello World!"));
+ QCOMPARE(object->property("variantProperty"), QVariant(12));
+}
+
+// Test that nested types can use dynamic properties
+void tst_qdeclarativelanguage::dynamicPropertiesNested()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("dynamicPropertiesNested.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("super_a").toInt(), 11); // Overridden
+ QCOMPARE(object->property("super_c").toInt(), 14); // Inherited
+ QCOMPARE(object->property("a").toInt(), 13); // New
+ QCOMPARE(object->property("b").toInt(), 12); // New
+
+ delete object;
+}
+
+// Tests the creation and assignment to dynamic list properties
+void tst_qdeclarativelanguage::listProperties()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("listProperties.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toInt(), 2);
+}
+
+// Tests the creation and assignment of dynamic object properties
+// ### Not complete
+void tst_qdeclarativelanguage::dynamicObjectProperties()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("dynamicObjectProperties.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QVERIFY(object->property("objectProperty") == qVariantFromValue((QObject*)0));
+ QVERIFY(object->property("objectProperty2") != qVariantFromValue((QObject*)0));
+}
+
+// Tests the declaration of dynamic signals and slots
+void tst_qdeclarativelanguage::dynamicSignalsAndSlots()
+{
+ QTest::ignoreMessage(QtDebugMsg, "1921");
+
+ QDeclarativeComponent component(&engine, TEST_FILE("dynamicSignalsAndSlots.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ QVERIFY(object->metaObject()->indexOfMethod("signal1()") != -1);
+ QVERIFY(object->metaObject()->indexOfMethod("signal2()") != -1);
+ QVERIFY(object->metaObject()->indexOfMethod("slot1()") != -1);
+ QVERIFY(object->metaObject()->indexOfMethod("slot2()") != -1);
+
+ QCOMPARE(object->property("test").toInt(), 0);
+ QMetaObject::invokeMethod(object, "slot3", Qt::DirectConnection, Q_ARG(QVariant, QVariant(10)));
+ QCOMPARE(object->property("test").toInt(), 10);
+}
+
+void tst_qdeclarativelanguage::simpleBindings()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("simpleBindings.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ QCOMPARE(object->property("value1"), QVariant(10));
+ QCOMPARE(object->property("value2"), QVariant(10));
+ QCOMPARE(object->property("value3"), QVariant(21));
+ QCOMPARE(object->property("value4"), QVariant(10));
+ QCOMPARE(object->property("objectProperty"), QVariant::fromValue(object));
+}
+
+void tst_qdeclarativelanguage::autoComponentCreation()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("autoComponentCreation.qml"));
+ VERIFY_ERRORS(0);
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+ QVERIFY(object->componentProperty() != 0);
+ MyTypeObject *child = qobject_cast<MyTypeObject *>(object->componentProperty()->create());
+ QVERIFY(child != 0);
+ QCOMPARE(child->realProperty(), qreal(9));
+}
+
+void tst_qdeclarativelanguage::propertyValueSource()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("propertyValueSource.qml"));
+ VERIFY_ERRORS(0);
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QList<QObject *> valueSources;
+ QObjectList allChildren = object->findChildren<QObject*>();
+ foreach (QObject *child, allChildren) {
+ if (qobject_cast<QDeclarativePropertyValueSource *>(child))
+ valueSources.append(child);
+ }
+
+ QCOMPARE(valueSources.count(), 1);
+ MyPropertyValueSource *valueSource =
+ qobject_cast<MyPropertyValueSource *>(valueSources.at(0));
+ QVERIFY(valueSource != 0);
+ QCOMPARE(valueSource->prop.object(), object);
+ QCOMPARE(valueSource->prop.name(), QString(QLatin1String("intProperty")));
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("propertyValueSource.2.qml"));
+ VERIFY_ERRORS(0);
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QList<QObject *> valueSources;
+ QObjectList allChildren = object->findChildren<QObject*>();
+ foreach (QObject *child, allChildren) {
+ if (qobject_cast<QDeclarativePropertyValueSource *>(child))
+ valueSources.append(child);
+ }
+
+ QCOMPARE(valueSources.count(), 1);
+ MyPropertyValueSource *valueSource =
+ qobject_cast<MyPropertyValueSource *>(valueSources.at(0));
+ QVERIFY(valueSource != 0);
+ QCOMPARE(valueSource->prop.object(), object);
+ QCOMPARE(valueSource->prop.name(), QString(QLatin1String("intProperty")));
+ }
+}
+
+void tst_qdeclarativelanguage::attachedProperties()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("attachedProperties.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ QObject *attached = qmlAttachedPropertiesObject<MyQmlObject>(object);
+ QVERIFY(attached != 0);
+ QCOMPARE(attached->property("value"), QVariant(10));
+ QCOMPARE(attached->property("value2"), QVariant(13));
+}
+
+// Tests non-static object properties
+void tst_qdeclarativelanguage::dynamicObjects()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("dynamicObject.1.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+}
+
+// Tests the registration of custom variant string converters
+void tst_qdeclarativelanguage::customVariantTypes()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("customVariantTypes.qml"));
+ VERIFY_ERRORS(0);
+ MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->customType().a, 10);
+}
+
+void tst_qdeclarativelanguage::valueTypes()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("valueTypes.qml"));
+ VERIFY_ERRORS(0);
+
+ QString message = QLatin1String("QML MyTypeObject (") + component.url().toString() +
+ QLatin1String(":2:1) Binding loop detected for property \"rectProperty.width\"");
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
+
+ MyTypeObject *object = qobject_cast<MyTypeObject*>(component.create());
+ QVERIFY(object != 0);
+
+
+ QCOMPARE(object->rectProperty(), QRect(10, 11, 12, 13));
+ QCOMPARE(object->rectProperty2(), QRect(10, 11, 12, 13));
+ QCOMPARE(object->intProperty(), 10);
+ object->doAction();
+ QCOMPARE(object->rectProperty(), QRect(12, 11, 14, 13));
+ QCOMPARE(object->rectProperty2(), QRect(12, 11, 14, 13));
+ QCOMPARE(object->intProperty(), 12);
+
+ // ###
+#if 0
+ QDeclarativeProperty p(object, "rectProperty.x");
+ QCOMPARE(p.read(), QVariant(12));
+ p.write(13);
+ QCOMPARE(p.read(), QVariant(13));
+
+ quint32 r = QDeclarativePropertyPrivate::saveValueType(p.coreIndex(), p.valueTypeCoreIndex());
+ QDeclarativeProperty p2;
+ QDeclarativePropertyPrivate::restore(p2, r, object);
+ QCOMPARE(p2.read(), QVariant(13));
+#endif
+}
+
+void tst_qdeclarativelanguage::cppnamespace()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("cppnamespace.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("cppnamespace.2.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ delete object;
+ }
+}
+
+void tst_qdeclarativelanguage::aliasProperties()
+{
+ // Simple "int" alias
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("alias.1.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ // Read through alias
+ QCOMPARE(object->property("valueAlias").toInt(), 10);
+ object->setProperty("value", QVariant(13));
+ QCOMPARE(object->property("valueAlias").toInt(), 13);
+
+ // Write throught alias
+ object->setProperty("valueAlias", QVariant(19));
+ QCOMPARE(object->property("valueAlias").toInt(), 19);
+ QCOMPARE(object->property("value").toInt(), 19);
+
+ delete object;
+ }
+
+ // Complex object alias
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("alias.2.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ // Read through alias
+ MyQmlObject *v =
+ qvariant_cast<MyQmlObject *>(object->property("aliasObject"));
+ QVERIFY(v != 0);
+ QCOMPARE(v->value(), 10);
+
+ // Write through alias
+ MyQmlObject *v2 = new MyQmlObject();
+ v2->setParent(object);
+ object->setProperty("aliasObject", qVariantFromValue(v2));
+ MyQmlObject *v3 =
+ qvariant_cast<MyQmlObject *>(object->property("aliasObject"));
+ QVERIFY(v3 != 0);
+ QCOMPARE(v3, v2);
+
+ delete object;
+ }
+
+ // Nested aliases
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("alias.3.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("value").toInt(), 1892);
+ QCOMPARE(object->property("value2").toInt(), 1892);
+
+ object->setProperty("value", QVariant(1313));
+ QCOMPARE(object->property("value").toInt(), 1313);
+ QCOMPARE(object->property("value2").toInt(), 1313);
+
+ object->setProperty("value2", QVariant(8080));
+ QCOMPARE(object->property("value").toInt(), 8080);
+ QCOMPARE(object->property("value2").toInt(), 8080);
+
+ delete object;
+ }
+
+ // Enum aliases
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("alias.4.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("enumAlias").toInt(), 1);
+
+ delete object;
+ }
+
+ // Id aliases
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("alias.5.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QVariant v = object->property("otherAlias");
+ QCOMPARE(v.userType(), qMetaTypeId<MyQmlObject*>());
+ MyQmlObject *o = qvariant_cast<MyQmlObject*>(v);
+ QCOMPARE(o->value(), 10);
+
+ delete o;
+
+ v = object->property("otherAlias");
+ QCOMPARE(v.userType(), qMetaTypeId<MyQmlObject*>());
+ o = qvariant_cast<MyQmlObject*>(v);
+ QVERIFY(o == 0);
+
+ delete object;
+ }
+
+ // Nested aliases - this used to cause a crash
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("alias.6.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("a").toInt(), 1923);
+ }
+
+ // Ptr Alias Cleanup - check that aliases to ptr types return 0
+ // if the object aliased to is removed
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("alias.7.qml"));
+ VERIFY_ERRORS(0);
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QObject *object1 = qvariant_cast<QObject *>(object->property("object"));
+ QVERIFY(object1 != 0);
+ QObject *object2 = qvariant_cast<QObject *>(object1->property("object"));
+ QVERIFY(object2 != 0);
+
+ QObject *alias = qvariant_cast<QObject *>(object->property("aliasedObject"));
+ QVERIFY(alias == object2);
+
+ delete object1;
+
+ QObject *alias2 = object; // "Random" start value
+ int status = -1;
+ void *a[] = { &alias2, 0, &status };
+ QMetaObject::metacall(object, QMetaObject::ReadProperty,
+ object->metaObject()->indexOfProperty("aliasedObject"), a);
+ QVERIFY(alias2 == 0);
+ }
+
+ // Simple composite type
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("alias.8.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("value").toInt(), 10);
+
+ delete object;
+ }
+
+ // Complex composite type
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("alias.9.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("value").toInt(), 10);
+
+ delete object;
+ }
+}
+
+// Test that the root element in a composite type can be a Component
+void tst_qdeclarativelanguage::componentCompositeType()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("componentCompositeType.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+}
+
+class TestType : public QObject {
+ Q_OBJECT
+public:
+ TestType(QObject *p=0) : QObject(p) {}
+};
+
+class TestType2 : public QObject {
+ Q_OBJECT
+public:
+ TestType2(QObject *p=0) : QObject(p) {}
+};
+
+void tst_qdeclarativelanguage::i18n_data()
+{
+ QTest::addColumn<QString>("file");
+ QTest::addColumn<QString>("stringProperty");
+ QTest::newRow("i18nStrings") << "i18nStrings.qml" << QString::fromUtf8("Test \303\241\303\242\303\243\303\244\303\245 (5 accented 'a' letters)");
+ QTest::newRow("i18nDeclaredPropertyNames") << "i18nDeclaredPropertyNames.qml" << QString::fromUtf8("Test \303\241\303\242\303\243\303\244\303\245: 10");
+ QTest::newRow("i18nDeclaredPropertyUse") << "i18nDeclaredPropertyUse.qml" << QString::fromUtf8("Test \303\241\303\242\303\243\303\244\303\245: 15");
+ QTest::newRow("i18nScript") << "i18nScript.qml" << QString::fromUtf8("Test \303\241\303\242\303\243\303\244\303\245: 20");
+ QTest::newRow("i18nType") << "i18nType.qml" << QString::fromUtf8("Test \303\241\303\242\303\243\303\244\303\245: 30");
+ QTest::newRow("i18nNameSpace") << "i18nNameSpace.qml" << QString::fromUtf8("Test \303\241\303\242\303\243\303\244\303\245: 40");
+}
+
+void tst_qdeclarativelanguage::i18n()
+{
+ QFETCH(QString, file);
+ QFETCH(QString, stringProperty);
+ QDeclarativeComponent component(&engine, TEST_FILE(file));
+ VERIFY_ERRORS(0);
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->stringProperty(), stringProperty);
+
+ delete object;
+}
+
+// Check that the Component::onCompleted attached property works
+void tst_qdeclarativelanguage::onCompleted()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("onCompleted.qml"));
+ VERIFY_ERRORS(0);
+ QTest::ignoreMessage(QtDebugMsg, "Completed 6 10");
+ QTest::ignoreMessage(QtDebugMsg, "Completed 6 10");
+ QTest::ignoreMessage(QtDebugMsg, "Completed 10 11");
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+}
+
+// Check that assignments to QDeclarativeScriptString properties work
+void tst_qdeclarativelanguage::scriptString()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptString.qml"));
+ VERIFY_ERRORS(0);
+
+ MyTypeObject *object = qobject_cast<MyTypeObject*>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->scriptProperty().script(), QString("foo + bar"));
+ QCOMPARE(object->scriptProperty().scopeObject(), object);
+ QCOMPARE(object->scriptProperty().context(), qmlContext(object));
+
+ QVERIFY(object->grouped() != 0);
+ QCOMPARE(object->grouped()->script().script(), QString("console.log(1921)"));
+ QCOMPARE(object->grouped()->script().scopeObject(), object);
+ QCOMPARE(object->grouped()->script().context(), qmlContext(object));
+}
+
+// Check that default property assignments are correctly spliced into explicit
+// property assignments
+void tst_qdeclarativelanguage::defaultPropertyListOrder()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("defaultPropertyListOrder.qml"));
+ VERIFY_ERRORS(0);
+
+ MyContainer *container = qobject_cast<MyContainer *>(component.create());
+ QVERIFY(container != 0);
+
+ QCOMPARE(container->getChildren()->count(), 6);
+ QCOMPARE(container->getChildren()->at(0)->property("index"), QVariant(0));
+ QCOMPARE(container->getChildren()->at(1)->property("index"), QVariant(1));
+ QCOMPARE(container->getChildren()->at(2)->property("index"), QVariant(2));
+ QCOMPARE(container->getChildren()->at(3)->property("index"), QVariant(3));
+ QCOMPARE(container->getChildren()->at(4)->property("index"), QVariant(4));
+ QCOMPARE(container->getChildren()->at(5)->property("index"), QVariant(5));
+}
+
+void tst_qdeclarativelanguage::declaredPropertyValues()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("declaredPropertyValues.qml"));
+ QEXPECT_FAIL("", "QTBUG-7860", Abort);
+ VERIFY_ERRORS(0);
+}
+
+// Check that first child of qml is of given type. Empty type insists on error.
+void tst_qdeclarativelanguage::testType(const QString& qml, const QString& type)
+{
+ QDeclarativeComponent component(&engine);
+ component.setData(qml.toUtf8(), TEST_FILE("empty.qml")); // just a file for relative local imports
+
+ QTRY_VERIFY(!component.isLoading());
+
+ if (type.isEmpty()) {
+ QVERIFY(component.isError());
+ } else {
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ QCOMPARE(QString(object->metaObject()->className()), type);
+ }
+}
+
+QML_DECLARE_TYPE(TestType)
+QML_DECLARE_TYPE(TestType2)
+
+// Import tests (QT-558)
+
+void tst_qdeclarativelanguage::importsBuiltin_data()
+{
+ // QT-610
+
+ QTest::addColumn<QString>("qml");
+ QTest::addColumn<QString>("type");
+
+ // import built-ins
+ QTest::newRow("missing import")
+ << "Test {}"
+ << "";
+ QTest::newRow("not in version 0.0")
+ << "import com.nokia.Test 0.0\n"
+ "Test {}"
+ << "";
+ QTest::newRow("in version 0.0")
+ << "import com.nokia.Test 0.0\n"
+ "TestTP {}"
+ << "TestType";
+ QTest::newRow("qualified in version 0.0")
+ << "import com.nokia.Test 0.0 as T\n"
+ "T.TestTP {}"
+ << "TestType";
+ QTest::newRow("in version 1.0")
+ << "import com.nokia.Test 1.0\n"
+ "Test {}"
+ << "TestType";
+ QTest::newRow("qualified wrong")
+ << "import com.nokia.Test 1.0 as T\n" // QT-610
+ "Test {}"
+ << "";
+ QTest::newRow("qualified right")
+ << "import com.nokia.Test 1.0 as T\n"
+ "T.Test {}"
+ << "TestType";
+ QTest::newRow("qualified right but not in version 0.0")
+ << "import com.nokia.Test 0.0 as T\n"
+ "T.Test {}"
+ << "";
+ QTest::newRow("in version 1.1")
+ << "import com.nokia.Test 1.1\n"
+ "Test {}"
+ << "TestType";
+ QTest::newRow("in version 1.3")
+ << "import com.nokia.Test 1.3\n"
+ "Test {}"
+ << "TestType";
+ QTest::newRow("in version 1.5")
+ << "import com.nokia.Test 1.5\n"
+ "Test {}"
+ << "TestType";
+ QTest::newRow("changed in version 1.8")
+ << "import com.nokia.Test 1.8\n"
+ "Test {}"
+ << "TestType2";
+ QTest::newRow("in version 1.12")
+ << "import com.nokia.Test 1.12\n"
+ "Test {}"
+ << "TestType2";
+ QTest::newRow("old in version 1.9")
+ << "import com.nokia.Test 1.9\n"
+ "OldTest {}"
+ << "TestType";
+ QTest::newRow("old in version 1.11")
+ << "import com.nokia.Test 1.11\n"
+ "OldTest {}"
+ << "TestType";
+ QTest::newRow("multiversion 1")
+ << "import com.nokia.Test 1.11\n"
+ "import com.nokia.Test 1.12\n"
+ "Test {}"
+ << "TestType2";
+ QTest::newRow("multiversion 2")
+ << "import com.nokia.Test 1.11\n"
+ "import com.nokia.Test 1.12\n"
+ "OldTest {}"
+ << "TestType";
+ QTest::newRow("qualified multiversion 3")
+ << "import com.nokia.Test 1.0 as T0\n"
+ "import com.nokia.Test 1.8 as T8\n"
+ "T0.Test {}"
+ << "TestType";
+ QTest::newRow("qualified multiversion 4")
+ << "import com.nokia.Test 1.0 as T0\n"
+ "import com.nokia.Test 1.8 as T8\n"
+ "T8.Test {}"
+ << "TestType2";
+}
+
+void tst_qdeclarativelanguage::importsBuiltin()
+{
+ QFETCH(QString, qml);
+ QFETCH(QString, type);
+ testType(qml,type);
+}
+
+void tst_qdeclarativelanguage::importsLocal_data()
+{
+ QTest::addColumn<QString>("qml");
+ QTest::addColumn<QString>("type");
+
+ // import locals
+ QTest::newRow("local import")
+ << "import \"subdir\"\n" // QT-613
+ "Test {}"
+ << "QDeclarativeRectangle";
+ QTest::newRow("local import second")
+ << "import Qt 4.6\nimport \"subdir\"\n"
+ "Test {}"
+ << "QDeclarativeRectangle";
+ QTest::newRow("local import subsubdir")
+ << "import Qt 4.6\nimport \"subdir/subsubdir\"\n"
+ "SubTest {}"
+ << "QDeclarativeRectangle";
+ QTest::newRow("local import QTBUG-7721 A")
+ << "subdir.Test {}" // no longer allowed (QTBUG-7721)
+ << "";
+ QTest::newRow("local import QTBUG-7721 B")
+ << "import \"subdir\" as X\n"
+ "X.subsubdir.SubTest {}" // no longer allowed (QTBUG-7721)
+ << "";
+ QTest::newRow("local import as")
+ << "import \"subdir\" as T\n"
+ "T.Test {}"
+ << "QDeclarativeRectangle";
+ QTest::newRow("wrong local import as")
+ << "import \"subdir\" as T\n"
+ "Test {}"
+ << "";
+ QTest::newRow("library precedence over local import")
+ << "import \"subdir\"\n"
+ "import com.nokia.Test 1.0\n"
+ "Test {}"
+ << "TestType";
+}
+
+void tst_qdeclarativelanguage::importsLocal()
+{
+ QFETCH(QString, qml);
+ QFETCH(QString, type);
+ testType(qml,type);
+}
+
+void tst_qdeclarativelanguage::importsRemote_data()
+{
+ QTest::addColumn<QString>("qml");
+ QTest::addColumn<QString>("type");
+
+ QString serverdir = "http://127.0.0.1:14445/qtest/declarative/qmllanguage";
+
+ QTest::newRow("remote import") << "import \""+serverdir+"\"\nTest {}" << "QDeclarativeRectangle";
+ QTest::newRow("remote import with subdir") << "import \""+serverdir+"\"\nTestSubDir {}" << "QDeclarativeText";
+ QTest::newRow("remote import with local") << "import \""+serverdir+"\"\nTestLocal {}" << "QDeclarativeImage";
+}
+
+#include "testhttpserver.h"
+
+void tst_qdeclarativelanguage::importsRemote()
+{
+ QFETCH(QString, qml);
+ QFETCH(QString, type);
+
+ TestHTTPServer server(14445);
+ server.serveDirectory(SRCDIR);
+
+ testType(qml,type);
+}
+
+void tst_qdeclarativelanguage::importsInstalled_data()
+{
+ // QT-610
+
+ QTest::addColumn<QString>("qml");
+ QTest::addColumn<QString>("type");
+
+ // import installed
+ QTest::newRow("installed import 0")
+ << "import com.nokia.installedtest 0.0\n"
+ "InstalledTestTP {}"
+ << "QDeclarativeRectangle";
+ QTest::newRow("installed import 0 as TP")
+ << "import com.nokia.installedtest 0.0 as TP\n"
+ "TP.InstalledTestTP {}"
+ << "QDeclarativeRectangle";
+ QTest::newRow("installed import 1")
+ << "import com.nokia.installedtest 1.0\n"
+ "InstalledTest {}"
+ << "QDeclarativeRectangle";
+ QTest::newRow("installed import 2")
+ << "import com.nokia.installedtest 1.3\n"
+ "InstalledTest {}"
+ << "QDeclarativeRectangle";
+ QTest::newRow("installed import 3")
+ << "import com.nokia.installedtest 1.4\n"
+ "InstalledTest {}"
+ << "QDeclarativeText";
+ QTest::newRow("installed import 4")
+ << "import com.nokia.installedtest 1.10\n"
+ "InstalledTest {}"
+ << "QDeclarativeText";
+ QTest::newRow("installed import visibility") // QT-614
+ << "import com.nokia.installedtest 1.4\n"
+ "PrivateType {}"
+ << "";
+}
+
+void tst_qdeclarativelanguage::importsInstalled()
+{
+ QFETCH(QString, qml);
+ QFETCH(QString, type);
+ testType(qml,type);
+}
+
+
+void tst_qdeclarativelanguage::importsOrder_data()
+{
+ QTest::addColumn<QString>("qml");
+ QTest::addColumn<QString>("type");
+
+ QTest::newRow("installed import overrides 1") <<
+ "import com.nokia.installedtest 1.0\n"
+ "import com.nokia.installedtest 1.4\n"
+ "InstalledTest {}"
+ << "QDeclarativeText";
+ QTest::newRow("installed import overrides 2") <<
+ "import com.nokia.installedtest 1.4\n"
+ "import com.nokia.installedtest 1.0\n"
+ "InstalledTest {}"
+ << "QDeclarativeRectangle";
+ QTest::newRow("installed import re-overrides 1") <<
+ "import com.nokia.installedtest 1.4\n"
+ "import com.nokia.installedtest 1.0\n"
+ "import com.nokia.installedtest 1.4\n"
+ "InstalledTest {}"
+ << "QDeclarativeText";
+ QTest::newRow("installed import re-overrides 2") <<
+ "import com.nokia.installedtest 1.4\n"
+ "import com.nokia.installedtest 1.0\n"
+ "import com.nokia.installedtest 1.4\n"
+ "import com.nokia.installedtest 1.0\n"
+ "InstalledTest {}"
+ << "QDeclarativeRectangle";
+
+ QTest::newRow("installed import versus builtin 1") <<
+ "import com.nokia.installedtest 1.5\n"
+ "import Qt 4.6\n"
+ "Rectangle {}"
+ << "QDeclarativeRectangle";
+ QTest::newRow("installed import versus builtin 2") <<
+ "import Qt 4.6\n"
+ "import com.nokia.installedtest 1.5\n"
+ "Rectangle {}"
+ << "QDeclarativeText";
+ QTest::newRow("namespaces cannot be overridden by types 1") <<
+ "import Qt 4.6 as Rectangle\n"
+ "import com.nokia.installedtest 1.5\n"
+ "Rectangle {}"
+ << "";
+ QTest::newRow("namespaces cannot be overridden by types 2") <<
+ "import Qt 4.6 as Rectangle\n"
+ "import com.nokia.installedtest 1.5\n"
+ "Rectangle.Image {}"
+ << "QDeclarativeImage";
+}
+
+void tst_qdeclarativelanguage::importsOrder()
+{
+ QFETCH(QString, qml);
+ QFETCH(QString, type);
+ testType(qml,type);
+}
+
+void tst_qdeclarativelanguage::qmlAttachedPropertiesObjectMethod()
+{
+ QObject object;
+
+ QCOMPARE(qmlAttachedPropertiesObject<MyQmlObject>(&object, false), (QObject *)0);
+ QCOMPARE(qmlAttachedPropertiesObject<MyQmlObject>(&object, true), (QObject *)0);
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("qmlAttachedPropertiesObjectMethod.1.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(qmlAttachedPropertiesObject<MyQmlObject>(object, false), (QObject *)0);
+ QVERIFY(qmlAttachedPropertiesObject<MyQmlObject>(object, true) != 0);
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("qmlAttachedPropertiesObjectMethod.2.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QVERIFY(qmlAttachedPropertiesObject<MyQmlObject>(object, false) != 0);
+ QVERIFY(qmlAttachedPropertiesObject<MyQmlObject>(object, true) != 0);
+ }
+}
+
+void tst_qdeclarativelanguage::crash1()
+{
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.6\nComponent {}", QUrl());
+}
+
+void tst_qdeclarativelanguage::crash2()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("crash2.qml"));
+}
+
+// QTBUG-8676
+void tst_qdeclarativelanguage::customOnProperty()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("customOnProperty.qml"));
+
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("on").toInt(), 10);
+
+ delete object;
+}
+
+void tst_qdeclarativelanguage::initTestCase()
+{
+ registerTypes();
+
+ QML_REGISTER_TYPE(com.nokia.Test, 0, 0, TestTP, TestType);
+ QML_REGISTER_TYPE(com.nokia.Test, 1, 0, Test, TestType);
+ QML_REGISTER_TYPE(com.nokia.Test, 1, 5, Test, TestType);
+ QML_REGISTER_TYPE(com.nokia.Test, 1, 8, Test, TestType2);
+ QML_REGISTER_TYPE(com.nokia.Test, 1, 9, OldTest, TestType);
+ QML_REGISTER_TYPE(com.nokia.Test, 1, 12, Test, TestType2);
+
+ // Create locale-specific file
+ // For POSIX, this will just be data/I18nType.qml, since POSIX is 7-bit
+ // For iso8859-1 locale, this will just be data/I18nType?????.qml where ????? is 5 8-bit characters
+ // For utf-8 locale, this will be data/I18nType??????????.qml where ?????????? is 5 8-bit characters, UTF-8 encoded
+ QFile in(TEST_FILE(QLatin1String("I18nType30.qml")).toLocalFile());
+ QVERIFY(in.open(QIODevice::ReadOnly));
+ QFile out(TEST_FILE(QString::fromUtf8("I18nType\303\201\303\242\303\243\303\244\303\245.qml")).toLocalFile());
+ QVERIFY(out.open(QIODevice::WriteOnly));
+ out.write(in.readAll());
+}
+
+QTEST_MAIN(tst_qdeclarativelanguage)
+
+#include "tst_qdeclarativelanguage.moc"
diff --git a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
new file mode 100644
index 0000000000..d728d082a8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+QT += script
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativelistmodel.cpp
diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
new file mode 100644
index 0000000000..a1e6d6bfea
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
@@ -0,0 +1,346 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/private/qdeclarativelistmodel_p.h>
+#include <QtDeclarative/private/qdeclarativeexpression_p.h>
+#include <QDeclarativeComponent>
+#include <QDebug>
+
+class tst_QDeclarativeListModel : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QDeclarativeListModel() {}
+
+private slots:
+ void static_types();
+ void static_types_data();
+ void static_i18n();
+ void static_nestedElements();
+ void static_nestedElements_data();
+ void dynamic_data();
+ void dynamic();
+ void error_data();
+ void error();
+};
+
+void tst_QDeclarativeListModel::static_i18n()
+{
+ QString expect = QString::fromUtf8("na\303\257ve");
+ QString componentStr = "import Qt 4.6\nListModel { ListElement { prop1: \""+expect+"\" } }";
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toUtf8(), QUrl::fromLocalFile(""));
+ QDeclarativeListModel *obj = qobject_cast<QDeclarativeListModel*>(component.create());
+ QVERIFY(obj != 0);
+ QString prop = obj->get(0).property(QLatin1String("prop1")).toString();
+ QCOMPARE(prop,expect);
+ delete obj;
+}
+
+void tst_QDeclarativeListModel::static_nestedElements()
+{
+ QFETCH(int, elementCount);
+
+ QStringList elements;
+ for (int i=0; i<elementCount; i++)
+ elements.append("ListElement { a: 1; b: 2 }");
+ QString elementsStr = elements.join(",\n") + "\n";
+
+ QString componentStr =
+ "import Qt 4.6\n"
+ "ListModel {\n"
+ " ListElement {\n"
+ " attributes: [\n";
+ componentStr += elementsStr.toUtf8().constData();
+ componentStr +=
+ " ]\n"
+ " }\n"
+ "}";
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toUtf8(), QUrl::fromLocalFile(""));
+
+ QDeclarativeListModel *obj = qobject_cast<QDeclarativeListModel*>(component.create());
+ QVERIFY(obj != 0);
+
+ QScriptValue prop = obj->get(0).property(QLatin1String("attributes")).property(QLatin1String("count"));
+ QVERIFY(prop.isNumber());
+ QCOMPARE(prop.toInt32(), qint32(elementCount));
+
+ delete obj;
+}
+
+void tst_QDeclarativeListModel::static_nestedElements_data()
+{
+ QTest::addColumn<int>("elementCount");
+
+ QTest::newRow("0 items") << 0;
+ QTest::newRow("1 item") << 1;
+ QTest::newRow("2 items") << 2;
+ QTest::newRow("many items") << 5;
+}
+
+void tst_QDeclarativeListModel::dynamic_data()
+{
+ QTest::addColumn<QString>("script");
+ QTest::addColumn<int>("result");
+ QTest::addColumn<QString>("warning");
+
+ // Simple flat model
+
+ QTest::newRow("count") << "count" << 0 << "";
+
+ QTest::newRow("get1") << "{get(0)}" << 0 << "QML ListModel (unknown location) get: index 0 out of range";
+ QTest::newRow("get2") << "{get(-1)}" << 0 << "QML ListModel (unknown location) get: index -1 out of range";
+
+ QTest::newRow("append1") << "{append({'foo':123});count}" << 1 << "";
+ QTest::newRow("append2") << "{append({'foo':123,'bar':456});count}" << 1 << "";
+ QTest::newRow("append3a") << "{append({'foo':123});append({'foo':456});get(0).foo}" << 123 << "";
+ QTest::newRow("append3b") << "{append({'foo':123});append({'foo':456});get(1).foo}" << 456 << "";
+ QTest::newRow("append4a") << "{append(123)}" << 0 << "QML ListModel (unknown location) append: value is not an object";
+ QTest::newRow("append4b") << "{append([1,2,3])}" << 0 << "QML ListModel (unknown location) append: value is not an object";
+
+ QTest::newRow("clear1") << "{append({'foo':456});clear();count}" << 0 << "";
+ QTest::newRow("clear2") << "{append({'foo':123});append({'foo':456});clear();count}" << 0 << "";
+ QTest::newRow("clear2") << "{append({'foo':123});clear();get(0).foo}" << 0 << "QML ListModel (unknown location) get: index 0 out of range";
+
+ QTest::newRow("remove1") << "{append({'foo':123});remove(0);count}" << 0 << "";
+ QTest::newRow("remove2a") << "{append({'foo':123});append({'foo':456});remove(0);count}" << 1 << "";
+ QTest::newRow("remove2b") << "{append({'foo':123});append({'foo':456});remove(0);get(0).foo}" << 456 << "";
+ QTest::newRow("remove2c") << "{append({'foo':123});append({'foo':456});remove(1);get(0).foo}" << 123 << "";
+ QTest::newRow("remove3") << "{append({'foo':123});remove(0);get(0).foo}" << 0 << "QML ListModel (unknown location) get: index 0 out of range";
+ QTest::newRow("remove3a") << "{append({'foo':123});remove(-1)}" << 0 << "QML ListModel (unknown location) remove: index -1 out of range";
+ QTest::newRow("remove4a") << "{remove(0)}" << 0 << "QML ListModel (unknown location) remove: index 0 out of range";
+ QTest::newRow("remove4b") << "{append({'foo':123});remove(0);remove(0)}" << 0 << "QML ListModel (unknown location) remove: index 0 out of range";
+ QTest::newRow("remove4c") << "{append({'foo':123});remove(1)}" << 0 << "QML ListModel (unknown location) remove: index 1 out of range";
+
+ QTest::newRow("insert1") << "{insert(0,{'foo':123});count}" << 1 << "";
+ QTest::newRow("insert2") << "{insert(1,{'foo':123});count}" << 0 << "QML ListModel (unknown location) insert: index 1 out of range";
+ QTest::newRow("insert3a") << "{append({'foo':123});insert(1,{'foo':456});count}" << 2 << "";
+ QTest::newRow("insert3b") << "{append({'foo':123});insert(1,{'foo':456});get(0).foo}" << 123 << "";
+ QTest::newRow("insert3c") << "{append({'foo':123});insert(1,{'foo':456});get(1).foo}" << 456 << "";
+ QTest::newRow("insert3d") << "{append({'foo':123});insert(0,{'foo':456});get(0).foo}" << 456 << "";
+ QTest::newRow("insert3e") << "{append({'foo':123});insert(0,{'foo':456});get(1).foo}" << 123 << "";
+ QTest::newRow("insert4") << "{append({'foo':123});insert(-1,{'foo':456})}" << 0 << "QML ListModel (unknown location) insert: index -1 out of range";
+ QTest::newRow("insert5a") << "{insert(0,123)}" << 0 << "QML ListModel (unknown location) insert: value is not an object";
+ QTest::newRow("insert5b") << "{insert(0,[1,2,3])}" << 0 << "QML ListModel (unknown location) insert: value is not an object";
+
+ QTest::newRow("set1") << "{append({'foo':123});set(0,{'foo':456});count}" << 1 << "";
+ QTest::newRow("set2") << "{append({'foo':123});set(0,{'foo':456});get(0).foo}" << 456 << "";
+ QTest::newRow("set3a") << "{append({'foo':123,'bar':456});set(0,{'foo':999});get(0).foo}" << 999 << "";
+ QTest::newRow("set3b") << "{append({'foo':123,'bar':456});set(0,{'foo':999});get(0).bar}" << 456 << "";
+ QTest::newRow("set4a") << "{set(0,{'foo':456})}" << 0 << "QML ListModel (unknown location) set: index 0 out of range";
+ QTest::newRow("set4c") << "{set(-1,{'foo':456})}" << 0 << "QML ListModel (unknown location) set: index -1 out of range";
+ QTest::newRow("set5a") << "{append({'foo':123,'bar':456});set(0,123)}" << 0 << "QML ListModel (unknown location) set: value is not an object";
+ QTest::newRow("set5b") << "{append({'foo':123,'bar':456});set(0,[1,2,3])}" << 0 << "QML ListModel (unknown location) set: value is not an object";
+ QTest::newRow("set6") << "{append({'foo':123});set(1,{'foo':456});count}" << 2 << "";
+
+ QTest::newRow("setprop1") << "{append({'foo':123});setProperty(0,'foo',456);count}" << 1 << "";
+ QTest::newRow("setprop2") << "{append({'foo':123});setProperty(0,'foo',456);get(0).foo}" << 456 << "";
+ QTest::newRow("setprop3a") << "{append({'foo':123,'bar':456});setProperty(0,'foo',999);get(0).foo}" << 999 << "";
+ QTest::newRow("setprop3b") << "{append({'foo':123,'bar':456});setProperty(0,'foo',999);get(0).bar}" << 456 << "";
+ QTest::newRow("setprop4a") << "{setProperty(0,'foo',456)}" << 0 << "QML ListModel (unknown location) set: index 0 out of range";
+ QTest::newRow("setprop4b") << "{setProperty(-1,'foo',456)}" << 0 << "QML ListModel (unknown location) set: index -1 out of range";
+ QTest::newRow("setprop4c") << "{append({'foo':123,'bar':456});setProperty(1,'foo',456)}" << 0 << "QML ListModel (unknown location) set: index 1 out of range";
+ QTest::newRow("setprop5") << "{append({'foo':123,'bar':456});append({'foo':111});setProperty(1,'bar',222);get(1).bar}" << 222 << "";
+
+ QTest::newRow("move1a") << "{append({'foo':123});append({'foo':456});move(0,1,1);count}" << 2 << "";
+ QTest::newRow("move1b") << "{append({'foo':123});append({'foo':456});move(0,1,1);get(0).foo}" << 456 << "";
+ QTest::newRow("move1c") << "{append({'foo':123});append({'foo':456});move(0,1,1);get(1).foo}" << 123 << "";
+ QTest::newRow("move1d") << "{append({'foo':123});append({'foo':456});move(1,0,1);get(0).foo}" << 456 << "";
+ QTest::newRow("move1e") << "{append({'foo':123});append({'foo':456});move(1,0,1);get(1).foo}" << 123 << "";
+ QTest::newRow("move2a") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(0,1,2);count}" << 3 << "";
+ QTest::newRow("move2b") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(0,1,2);get(0).foo}" << 789 << "";
+ QTest::newRow("move2c") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(0,1,2);get(1).foo}" << 123 << "";
+ QTest::newRow("move2d") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(0,1,2);get(2).foo}" << 456 << "";
+ QTest::newRow("move3a") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(1,0,3)}" << 0 << "QML ListModel (unknown location) move: out of range";
+ QTest::newRow("move3b") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(1,-1,1)}" << 0 << "QML ListModel (unknown location) move: out of range";
+ QTest::newRow("move3c") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(1,0,-1)}" << 0 << "QML ListModel (unknown location) move: out of range";
+ QTest::newRow("move3d") << "{append({'foo':123});append({'foo':456});append({'foo':789});move(0,3,1)}" << 0 << "QML ListModel (unknown location) move: out of range";
+
+ // Structured model
+
+ QTest::newRow("listprop1a") << "{append({'foo':123,'bars':[{'a':1},{'a':2},{'a':3}]});count}" << 1 << "";
+ QTest::newRow("listprop1b") << "{append({'foo':123,'bars':[{'a':1},{'a':2},{'a':3}]});get(0).bars.get(1).a}" << 2 << "";
+ QTest::newRow("listprop2a") << "{append({'foo':123,'bars':[{'a':1},{'a':2},{'a':3}]});get(0).bars.append({'a':4});get(0).bars.get(3).a}" << 4 << "";
+}
+
+void tst_QDeclarativeListModel::dynamic()
+{
+ QFETCH(QString, script);
+ QFETCH(int, result);
+ QFETCH(QString, warning);
+
+ QDeclarativeEngine engine;
+ QDeclarativeListModel model;
+ QDeclarativeEngine::setContextForObject(&model,engine.rootContext());
+ engine.rootContext()->addDefaultObject(&model);
+ QDeclarativeExpression e(engine.rootContext(), script, &model);
+ if (!warning.isEmpty())
+ QTest::ignoreMessage(QtWarningMsg, warning.toLatin1());
+ int actual = e.value().toInt();
+ if (e.hasError())
+ qDebug() << e.error(); // errors not expected
+ QVERIFY(!e.hasError());
+ QCOMPARE(actual,result);
+}
+
+void tst_QDeclarativeListModel::static_types_data()
+{
+ QTest::addColumn<QString>("qml");
+ QTest::addColumn<QVariant>("value");
+
+ QTest::newRow("string")
+ << "ListElement { foo: \"bar\" }"
+ << QVariant(QString("bar"));
+
+ QTest::newRow("real")
+ << "ListElement { foo: 10.5 }"
+ << QVariant(10.5);
+
+ QTest::newRow("real0")
+ << "ListElement { foo: 0 }"
+ << QVariant(double(0));
+
+ QTest::newRow("bool")
+ << "ListElement { foo: false }"
+ << QVariant(false);
+
+ QTest::newRow("bool")
+ << "ListElement { foo: true }"
+ << QVariant(true);
+
+ QTest::newRow("enum")
+ << "ListElement { foo: Text.AlignHCenter }"
+ << QVariant("QTBUG-5974:ListElement: constant script support for property value");
+}
+
+void tst_QDeclarativeListModel::static_types()
+{
+ QFETCH(QString, qml);
+ QFETCH(QVariant, value);
+
+ qml = "import Qt 4.6\nListModel { " + qml + " }";
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine);
+ component.setData(qml.toUtf8(),
+ QUrl::fromLocalFile(QString("dummy.qml")));
+
+ if (value.toString().startsWith("QTBUG-"))
+ QEXPECT_FAIL("",value.toString().toLatin1(),Abort);
+
+ QVERIFY(!component.isError());
+
+ QDeclarativeListModel *obj = qobject_cast<QDeclarativeListModel*>(component.create());
+ QVERIFY(obj != 0);
+
+ QScriptValue actual = obj->get(0).property(QLatin1String("foo"));
+
+ QCOMPARE(actual.isString(), value.type() == QVariant::String);
+ QCOMPARE(actual.isBoolean(), value.type() == QVariant::Bool);
+ QCOMPARE(actual.isNumber(), value.type() == QVariant::Double);
+
+ QCOMPARE(actual.toString(), value.toString());
+
+ delete obj;
+}
+
+void tst_QDeclarativeListModel::error_data()
+{
+ QTest::addColumn<QString>("qml");
+ QTest::addColumn<QString>("error");
+
+ QTest::newRow("id not allowed in ListElement")
+ << "import Qt 4.6\nListModel { ListElement { id: fred } }"
+ << "ListElement: cannot use reserved \"id\" property";
+
+ QTest::newRow("id allowed in ListModel")
+ << "import Qt 4.6\nListModel { id:model }"
+ << "";
+
+ QTest::newRow("random properties not allowed in ListModel")
+ << "import Qt 4.6\nListModel { foo:123 }"
+ << "ListModel: undefined property 'foo'";
+
+ QTest::newRow("random properties allowed in ListElement")
+ << "import Qt 4.6\nListModel { ListElement { foo:123 } }"
+ << "";
+
+ QTest::newRow("bindings not allowed in ListElement")
+ << "import Qt 4.6\nRectangle { id: rect; ListModel { ListElement { foo: rect.color } } }"
+ << "ListElement: cannot use script for property value"; // but note QTBUG-5974
+
+ QTest::newRow("random object list properties allowed in ListElement")
+ << "import Qt 4.6\nListModel { ListElement { foo: [ ListElement { bar: 123 } ] } }"
+ << "";
+
+ QTest::newRow("default properties not allowed in ListElement")
+ << "import Qt 4.6\nListModel { ListElement { Item { } } }"
+ << "QTBUG-6082 ListElement should not allow child objects";
+}
+
+void tst_QDeclarativeListModel::error()
+{
+ QFETCH(QString, qml);
+ QFETCH(QString, error);
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine);
+ component.setData(qml.toUtf8(),
+ QUrl::fromLocalFile(QString("dummy.qml")));
+ if (error.isEmpty()) {
+ QVERIFY(!component.isError());
+ } else {
+ if (error.startsWith(QLatin1String("QTBUG-")))
+ QEXPECT_FAIL("",error.toLatin1(),Abort);
+ QVERIFY(component.isError());
+ QList<QDeclarativeError> errors = component.errors();
+ QCOMPARE(errors.count(),1);
+ QCOMPARE(errors.at(0).description(),error);
+ }
+}
+
+QTEST_MAIN(tst_QDeclarativeListModel)
+
+#include "tst_qdeclarativelistmodel.moc"
diff --git a/tests/auto/declarative/qdeclarativelistreference/data/MyType.qml b/tests/auto/declarative/qdeclarativelistreference/data/MyType.qml
new file mode 100644
index 0000000000..d08f35bb54
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistreference/data/MyType.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+QtObject {
+ property int a
+}
diff --git a/tests/auto/declarative/qdeclarativelistreference/data/engineTypes.qml b/tests/auto/declarative/qdeclarativelistreference/data/engineTypes.qml
new file mode 100644
index 0000000000..670aee470d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistreference/data/engineTypes.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+QtObject {
+ property list<MyType> myList
+
+ myList: [ MyType { a: 1 },
+ MyType { a: 9 } ]
+
+}
diff --git a/tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml b/tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml
new file mode 100644
index 0000000000..0c2d0aa2fc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+QtObject {
+ property list<QtObject> myList;
+ myList: QtObject {}
+
+ property var value: myList
+ property int test: value.length
+}
+
diff --git a/tests/auto/declarative/qdeclarativelistreference/qdeclarativelistreference.pro b/tests/auto/declarative/qdeclarativelistreference/qdeclarativelistreference.pro
new file mode 100644
index 0000000000..0c9b2d976b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistreference/qdeclarativelistreference.pro
@@ -0,0 +1,5 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativelistreference.cpp
diff --git a/tests/auto/declarative/qdeclarativelistreference/tst_qdeclarativelistreference.cpp b/tests/auto/declarative/qdeclarativelistreference/tst_qdeclarativelistreference.cpp
new file mode 100644
index 0000000000..1b7af19c48
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistreference/tst_qdeclarativelistreference.cpp
@@ -0,0 +1,580 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QUrl>
+#include <QFileInfo>
+#include <QDir>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QtDeclarative/qdeclarative.h>
+#include <QtDeclarative/qdeclarativeprivate.h>
+#include <QtDeclarative/qdeclarativeproperty.h>
+#include <QDebug>
+
+inline QUrl TEST_FILE(const QString &filename)
+{
+ QFileInfo fileInfo(__FILE__);
+ return QUrl::fromLocalFile(fileInfo.absoluteDir().filePath("data/" + filename));
+}
+
+inline QUrl TEST_FILE(const char *filename)
+{
+ return TEST_FILE(QLatin1String(filename));
+}
+
+class tst_qdeclarativelistreference : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativelistreference() {}
+
+private slots:
+ void initTestCase();
+ void qmllistreference();
+ void qmllistreference_invalid();
+ void isValid();
+ void object();
+ void listElementType();
+ void canAppend();
+ void canAt();
+ void canClear();
+ void canCount();
+ void append();
+ void at();
+ void clear();
+ void count();
+ void copy();
+ void qmlmetaproperty();
+ void engineTypes();
+ void variantToList();
+};
+
+class TestType : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QDeclarativeListProperty<TestType> data READ dataProperty);
+ Q_PROPERTY(int intProperty READ intProperty);
+
+public:
+ TestType() : property(this, data) {}
+ QDeclarativeListProperty<TestType> dataProperty() { return property; }
+ int intProperty() const { return 10; }
+
+ QList<TestType *> data;
+ QDeclarativeListProperty<TestType> property;
+};
+QML_DECLARE_TYPE(TestType);
+
+void tst_qdeclarativelistreference::initTestCase()
+{
+ QML_REGISTER_NOCREATE_TYPE(TestType);
+}
+
+void tst_qdeclarativelistreference::qmllistreference()
+{
+ TestType tt;
+
+ QDeclarativeListReference r(&tt, "data");
+ QVERIFY(r.isValid() == true);
+ QCOMPARE(r.count(), 0);
+
+ tt.data.append(&tt);
+ QCOMPARE(r.count(), 1);
+}
+
+void tst_qdeclarativelistreference::qmllistreference_invalid()
+{
+ TestType tt;
+
+ // Invalid
+ {
+ QDeclarativeListReference r;
+ QVERIFY(r.isValid() == false);
+ QVERIFY(r.object() == 0);
+ QVERIFY(r.listElementType() == 0);
+ QVERIFY(r.canAt() == false);
+ QVERIFY(r.canClear() == false);
+ QVERIFY(r.canCount() == false);
+ QVERIFY(r.append(0) == false);
+ QVERIFY(r.at(10) == 0);
+ QVERIFY(r.clear() == false);
+ QVERIFY(r.count() == 0);
+ }
+
+ // Non-property
+ {
+ QDeclarativeListReference r(&tt, "blah");
+ QVERIFY(r.isValid() == false);
+ QVERIFY(r.object() == 0);
+ QVERIFY(r.listElementType() == 0);
+ QVERIFY(r.canAt() == false);
+ QVERIFY(r.canClear() == false);
+ QVERIFY(r.canCount() == false);
+ QVERIFY(r.append(0) == false);
+ QVERIFY(r.at(10) == 0);
+ QVERIFY(r.clear() == false);
+ QVERIFY(r.count() == 0);
+ }
+
+ // Non-list property
+ {
+ QDeclarativeListReference r(&tt, "intProperty");
+ QVERIFY(r.isValid() == false);
+ QVERIFY(r.object() == 0);
+ QVERIFY(r.listElementType() == 0);
+ QVERIFY(r.canAt() == false);
+ QVERIFY(r.canClear() == false);
+ QVERIFY(r.canCount() == false);
+ QVERIFY(r.append(0) == false);
+ QVERIFY(r.at(10) == 0);
+ QVERIFY(r.clear() == false);
+ QVERIFY(r.count() == 0);
+ }
+}
+
+void tst_qdeclarativelistreference::isValid()
+{
+ TestType *tt = new TestType;
+
+ {
+ QDeclarativeListReference ref;
+ QVERIFY(ref.isValid() == false);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "blah");
+ QVERIFY(ref.isValid() == false);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "data");
+ QVERIFY(ref.isValid() == true);
+ delete tt;
+ QVERIFY(ref.isValid() == false);
+ }
+}
+
+void tst_qdeclarativelistreference::object()
+{
+ TestType *tt = new TestType;
+
+ {
+ QDeclarativeListReference ref;
+ QVERIFY(ref.object() == 0);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "blah");
+ QVERIFY(ref.object() == 0);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "data");
+ QVERIFY(ref.object() == tt);
+ delete tt;
+ QVERIFY(ref.object() == 0);
+ }
+}
+
+void tst_qdeclarativelistreference::listElementType()
+{
+ TestType *tt = new TestType;
+
+ {
+ QDeclarativeListReference ref;
+ QVERIFY(ref.listElementType() == 0);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "blah");
+ QVERIFY(ref.listElementType() == 0);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "data");
+ QVERIFY(ref.listElementType() == &TestType::staticMetaObject);
+ delete tt;
+ QVERIFY(ref.listElementType() == 0);
+ }
+}
+
+void tst_qdeclarativelistreference::canAppend()
+{
+ TestType *tt = new TestType;
+
+ {
+ QDeclarativeListReference ref;
+ QVERIFY(ref.canAppend() == false);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "blah");
+ QVERIFY(ref.canAppend() == false);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "data");
+ QVERIFY(ref.canAppend() == true);
+ delete tt;
+ QVERIFY(ref.canAppend() == false);
+ }
+
+ {
+ TestType tt;
+ tt.property.append = 0;
+ QDeclarativeListReference ref(&tt, "data");
+ QVERIFY(ref.canAppend() == false);
+ }
+}
+
+void tst_qdeclarativelistreference::canAt()
+{
+ TestType *tt = new TestType;
+
+ {
+ QDeclarativeListReference ref;
+ QVERIFY(ref.canAt() == false);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "blah");
+ QVERIFY(ref.canAt() == false);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "data");
+ QVERIFY(ref.canAt() == true);
+ delete tt;
+ QVERIFY(ref.canAt() == false);
+ }
+
+ {
+ TestType tt;
+ tt.property.at = 0;
+ QDeclarativeListReference ref(&tt, "data");
+ QVERIFY(ref.canAt() == false);
+ }
+}
+
+void tst_qdeclarativelistreference::canClear()
+{
+ TestType *tt = new TestType;
+
+ {
+ QDeclarativeListReference ref;
+ QVERIFY(ref.canClear() == false);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "blah");
+ QVERIFY(ref.canClear() == false);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "data");
+ QVERIFY(ref.canClear() == true);
+ delete tt;
+ QVERIFY(ref.canClear() == false);
+ }
+
+ {
+ TestType tt;
+ tt.property.clear = 0;
+ QDeclarativeListReference ref(&tt, "data");
+ QVERIFY(ref.canClear() == false);
+ }
+}
+
+void tst_qdeclarativelistreference::canCount()
+{
+ TestType *tt = new TestType;
+
+ {
+ QDeclarativeListReference ref;
+ QVERIFY(ref.canCount() == false);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "blah");
+ QVERIFY(ref.canCount() == false);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "data");
+ QVERIFY(ref.canCount() == true);
+ delete tt;
+ QVERIFY(ref.canCount() == false);
+ }
+
+ {
+ TestType tt;
+ tt.property.count = 0;
+ QDeclarativeListReference ref(&tt, "data");
+ QVERIFY(ref.canCount() == false);
+ }
+}
+
+void tst_qdeclarativelistreference::append()
+{
+ TestType *tt = new TestType;
+ QObject object;
+
+ {
+ QDeclarativeListReference ref;
+ QVERIFY(ref.append(tt) == false);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "blah");
+ QVERIFY(ref.append(tt) == false);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "data");
+ QVERIFY(ref.append(tt) == true);
+ QVERIFY(tt->data.count() == 1);
+ QVERIFY(tt->data.at(0) == tt);
+ QVERIFY(ref.append(&object) == false);
+ QVERIFY(tt->data.count() == 1);
+ QVERIFY(tt->data.at(0) == tt);
+ QVERIFY(ref.append(0) == true);
+ QVERIFY(tt->data.count() == 2);
+ QVERIFY(tt->data.at(0) == tt);
+ QVERIFY(tt->data.at(1) == 0);
+ delete tt;
+ QVERIFY(ref.append(0) == false);
+ }
+
+ {
+ TestType tt;
+ tt.property.append = 0;
+ QDeclarativeListReference ref(&tt, "data");
+ QVERIFY(ref.append(&tt) == false);
+ }
+}
+
+void tst_qdeclarativelistreference::at()
+{
+ TestType *tt = new TestType;
+ tt->data.append(tt);
+ tt->data.append(0);
+ tt->data.append(tt);
+
+ {
+ QDeclarativeListReference ref;
+ QVERIFY(ref.at(0) == 0);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "blah");
+ QVERIFY(ref.at(0) == 0);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "data");
+ QVERIFY(ref.at(0) == tt);
+ QVERIFY(ref.at(1) == 0);
+ QVERIFY(ref.at(2) == tt);
+ delete tt;
+ QVERIFY(ref.at(0) == 0);
+ }
+
+ {
+ TestType tt;
+ tt.data.append(&tt);
+ tt.property.at = 0;
+ QDeclarativeListReference ref(&tt, "data");
+ QVERIFY(ref.at(0) == 0);
+ }
+}
+
+void tst_qdeclarativelistreference::clear()
+{
+ TestType *tt = new TestType;
+ tt->data.append(tt);
+ tt->data.append(0);
+ tt->data.append(tt);
+
+ {
+ QDeclarativeListReference ref;
+ QVERIFY(ref.clear() == false);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "blah");
+ QVERIFY(ref.clear() == false);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "data");
+ QVERIFY(ref.clear() == true);
+ QVERIFY(tt->data.count() == 0);
+ delete tt;
+ QVERIFY(ref.clear() == false);
+ }
+
+ {
+ TestType tt;
+ tt.property.clear = 0;
+ QDeclarativeListReference ref(&tt, "data");
+ QVERIFY(ref.clear() == false);
+ }
+}
+
+void tst_qdeclarativelistreference::count()
+{
+ TestType *tt = new TestType;
+ tt->data.append(tt);
+ tt->data.append(0);
+ tt->data.append(tt);
+
+ {
+ QDeclarativeListReference ref;
+ QVERIFY(ref.count() == 0);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "blah");
+ QVERIFY(ref.count() == 0);
+ }
+
+ {
+ QDeclarativeListReference ref(tt, "data");
+ QVERIFY(ref.count() == 3);
+ tt->data.removeAt(1);
+ QVERIFY(ref.count() == 2);
+ delete tt;
+ QVERIFY(ref.count() == 0);
+ }
+
+ {
+ TestType tt;
+ tt.data.append(&tt);
+ tt.property.count = 0;
+ QDeclarativeListReference ref(&tt, "data");
+ QVERIFY(ref.count() == 0);
+ }
+}
+
+void tst_qdeclarativelistreference::copy()
+{
+ TestType tt;
+ tt.data.append(&tt);
+ tt.data.append(0);
+ tt.data.append(&tt);
+
+ QDeclarativeListReference *r1 = new QDeclarativeListReference(&tt, "data");
+ QVERIFY(r1->count() == 3);
+
+ QDeclarativeListReference r2(*r1);
+ QDeclarativeListReference r3;
+ r3 = *r1;
+
+ QVERIFY(r2.count() == 3);
+ QVERIFY(r3.count() == 3);
+
+ delete r1;
+
+ QVERIFY(r2.count() == 3);
+ QVERIFY(r3.count() == 3);
+
+ tt.data.removeAt(2);
+
+ QVERIFY(r2.count() == 2);
+ QVERIFY(r3.count() == 2);
+}
+
+void tst_qdeclarativelistreference::qmlmetaproperty()
+{
+ TestType tt;
+ tt.data.append(&tt);
+ tt.data.append(0);
+ tt.data.append(&tt);
+
+ QDeclarativeProperty prop(&tt, QLatin1String("data"));
+ QVariant v = prop.read();
+ QVERIFY(v.userType() == qMetaTypeId<QDeclarativeListReference>());
+ QDeclarativeListReference ref = qvariant_cast<QDeclarativeListReference>(v);
+ QVERIFY(ref.count() == 3);
+ QVERIFY(ref.listElementType() == &TestType::staticMetaObject);
+}
+
+void tst_qdeclarativelistreference::engineTypes()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, TEST_FILE("engineTypes.qml"));
+
+ QObject *o = component.create();
+ QVERIFY(o);
+
+ QDeclarativeProperty p1(o, QLatin1String("myList"));
+ QVERIFY(p1.propertyTypeCategory() == QDeclarativeProperty::Normal);
+
+ QDeclarativeProperty p2(o, QLatin1String("myList"), engine.rootContext());
+ QVERIFY(p2.propertyTypeCategory() == QDeclarativeProperty::List);
+ QVariant v = p2.read();
+ QVERIFY(v.userType() == qMetaTypeId<QDeclarativeListReference>());
+ QDeclarativeListReference ref = qvariant_cast<QDeclarativeListReference>(v);
+ QVERIFY(ref.count() == 2);
+ QVERIFY(ref.listElementType());
+ QVERIFY(ref.listElementType() != &QObject::staticMetaObject);
+
+ delete o;
+}
+
+void tst_qdeclarativelistreference::variantToList()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, TEST_FILE("variantToList.qml"));
+
+ QObject *o = component.create();
+ QVERIFY(o);
+
+ QVERIFY(o->property("value").userType() == qMetaTypeId<QDeclarativeListReference>());
+ QCOMPARE(o->property("test").toInt(), 1);
+
+ delete o;
+}
+
+QTEST_MAIN(tst_qdeclarativelistreference)
+
+#include "tst_qdeclarativelistreference.moc"
diff --git a/tests/auto/declarative/qdeclarativelistview/data/displaylist.qml b/tests/auto/declarative/qdeclarativelistview/data/displaylist.qml
new file mode 100644
index 0000000000..7b124a56ff
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistview/data/displaylist.qml
@@ -0,0 +1,43 @@
+import Qt 4.6
+
+Rectangle {
+ width: 240
+ height: 320
+ color: "#ffffff"
+ resources: [
+ Component {
+ id: myDelegate
+ Rectangle {
+ id: wrapper
+ objectName: "wrapper"
+ height: 20
+ width: 240
+ Text {
+ text: index
+ }
+ Text {
+ x: 30
+ objectName: "displayText"
+ text: display
+ }
+ color: ListView.isCurrentItem ? "lightsteelblue" : "white"
+ }
+ },
+ Component {
+ id: myHighlight
+ Rectangle { color: "green" }
+ }
+ ]
+ ListView {
+ id: list
+ objectName: "list"
+ focus: true
+ width: 240
+ height: 320
+ model: testModel
+ delegate: myDelegate
+ highlight: myHighlight
+ highlightMoveSpeed: 1000
+ highlightResizeSpeed: 1000
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelistview/data/itemlist.qml b/tests/auto/declarative/qdeclarativelistview/data/itemlist.qml
new file mode 100644
index 0000000000..e6b5c8fa52
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistview/data/itemlist.qml
@@ -0,0 +1,43 @@
+// This example demonstrates placing items in a view using
+// a VisualItemModel
+
+import Qt 4.6
+
+Rectangle {
+ color: "lightgray"
+ width: 240
+ height: 320
+
+ VisualItemModel {
+ id: itemModel
+ objectName: "itemModel"
+ Rectangle {
+ objectName: "item1"
+ height: view.height; width: view.width; color: "#FFFEF0"
+ Text { objectName: "text1"; text: "index: " + parent.VisualItemModel.index; font.bold: true; anchors.centerIn: parent }
+ }
+ Rectangle {
+ objectName: "item2"
+ height: view.height; width: view.width; color: "#F0FFF7"
+ Text { objectName: "text2"; text: "index: " + parent.VisualItemModel.index; font.bold: true; anchors.centerIn: parent }
+ }
+ Rectangle {
+ objectName: "item3"
+ height: view.height; width: view.width; color: "#F4F0FF"
+ Text { objectName: "text3"; text: "index: " + parent.VisualItemModel.index; font.bold: true; anchors.centerIn: parent }
+ }
+ }
+
+ ListView {
+ id: view
+ objectName: "view"
+ anchors.fill: parent
+ anchors.bottomMargin: 30
+ model: itemModel
+ preferredHighlightBegin: 0
+ preferredHighlightEnd: 0
+ highlightRangeMode: "StrictlyEnforceRange"
+ orientation: ListView.Horizontal
+ flickDeceleration: 2000
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelistview/data/listview-enforcerange.qml b/tests/auto/declarative/qdeclarativelistview/data/listview-enforcerange.qml
new file mode 100644
index 0000000000..46fddae5ad
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistview/data/listview-enforcerange.qml
@@ -0,0 +1,55 @@
+import Qt 4.6
+
+Rectangle {
+ width: 240
+ height: 320
+ color: "#ffffff"
+ Component {
+ id: myDelegate
+ Item {
+ id: wrapper
+ objectName: "wrapper"
+ height: 20
+ width: 240
+ Text {
+ text: index
+ }
+ Text {
+ x: 30
+ id: textName
+ objectName: "textName"
+ text: name
+ }
+ Text {
+ x: 120
+ id: textNumber
+ objectName: "textNumber"
+ text: number
+ }
+ Text {
+ x: 200
+ text: wrapper.y
+ }
+ }
+ }
+
+ Component {
+ id: myHighlight
+ Rectangle {
+ color: "lightsteelblue"
+ }
+ }
+
+ ListView {
+ id: list
+ objectName: "list"
+ width: 240
+ height: 320
+ model: testModel
+ delegate: myDelegate
+ highlight: myHighlight
+ preferredHighlightBegin: 100
+ preferredHighlightEnd: 100
+ highlightRangeMode: "StrictlyEnforceRange"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelistview/data/listview-initCurrent.qml b/tests/auto/declarative/qdeclarativelistview/data/listview-initCurrent.qml
new file mode 100644
index 0000000000..74f5ef494f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistview/data/listview-initCurrent.qml
@@ -0,0 +1,50 @@
+import Qt 4.6
+
+Rectangle {
+ width: 240
+ height: 320
+ color: "#ffffff"
+ resources: [
+ Component {
+ id: myDelegate
+ Rectangle {
+ id: wrapper
+ objectName: "wrapper"
+ height: 20
+ width: 240
+ Text {
+ text: index
+ }
+ Text {
+ x: 30
+ id: textName
+ objectName: "textName"
+ text: name
+ }
+ Text {
+ x: 120
+ id: textNumber
+ objectName: "textNumber"
+ text: number
+ }
+ Text {
+ x: 200
+ text: wrapper.y
+ }
+ color: ListView.isCurrentItem ? "lightsteelblue" : "white"
+ }
+ }
+ ]
+ ListView {
+ id: list
+ objectName: "list"
+ focus: true
+ currentIndex: 3
+ width: 240
+ height: 320
+ keyNavigationWraps: testWrap
+ delegate: myDelegate
+ highlightMoveSpeed: 1000
+ model: testModel
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelistview/data/listview-sections.qml b/tests/auto/declarative/qdeclarativelistview/data/listview-sections.qml
new file mode 100644
index 0000000000..4b5bea6648
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistview/data/listview-sections.qml
@@ -0,0 +1,59 @@
+import Qt 4.6
+
+Rectangle {
+ width: 240
+ height: 320
+ color: "#ffffff"
+ resources: [
+ Component {
+ id: myDelegate
+ Item {
+ id: wrapper
+ objectName: "wrapper"
+ height: ListView.prevSection != ListView.section ? 40 : 20;
+ width: 240
+ Rectangle {
+ y: wrapper.ListView.prevSection != wrapper.ListView.section ? 20 : 0
+ height: 20
+ width: parent.width
+ color: wrapper.ListView.isCurrentItem ? "lightsteelblue" : "white"
+ Text {
+ text: index
+ }
+ Text {
+ x: 30
+ id: textName
+ objectName: "textName"
+ text: name
+ }
+ Text {
+ x: 120
+ id: textNumber
+ objectName: "textNumber"
+ text: number
+ }
+ Text {
+ x: 200
+ text: wrapper.y
+ }
+ }
+ Rectangle {
+ color: "#99bb99"
+ height: wrapper.ListView.prevSection != wrapper.ListView.section ? 20 : 0
+ width: parent.width
+ visible: wrapper.ListView.prevSection != wrapper.ListView.section ? true : false
+ Text { text: wrapper.ListView.section }
+ }
+ }
+ }
+ ]
+ ListView {
+ id: list
+ objectName: "list"
+ width: 240
+ height: 320
+ model: testModel
+ delegate: myDelegate
+ section.property: "number"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelistview/data/listview.qml b/tests/auto/declarative/qdeclarativelistview/data/listview.qml
new file mode 100644
index 0000000000..1c1b3f8c7c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistview/data/listview.qml
@@ -0,0 +1,119 @@
+import Qt 4.6
+
+Rectangle {
+ width: 240
+ height: 320
+ color: "#ffffff"
+ function checkProperties() {
+ testObject.error = false;
+ if (list.model != testModel) {
+ console.log("model property incorrect");
+ testObject.error = true;
+ }
+ if (!testObject.animate && list.delegate != myDelegate) {
+ console.log("delegate property incorrect - expected myDelegate");
+ testObject.error = true;
+ }
+ if (testObject.animate && list.delegate != animatedDelegate) {
+ console.log("delegate property incorrect - expected animatedDelegate");
+ testObject.error = true;
+ }
+ if (testObject.invalidHighlight && list.highlight != invalidHl) {
+ console.log("highlight property incorrect - expected invalidHl");
+ testObject.error = true;
+ }
+ if (!testObject.invalidHighlight && list.highlight != myHighlight) {
+ console.log("highlight property incorrect - expected myHighlight");
+ testObject.error = true;
+ }
+ }
+ resources: [
+ Component {
+ id: myDelegate
+ Rectangle {
+ id: wrapper
+ objectName: "wrapper"
+ height: 20
+ width: 240
+ Text {
+ text: index
+ }
+ Text {
+ x: 30
+ id: textName
+ objectName: "textName"
+ text: name
+ }
+ Text {
+ x: 120
+ id: textNumber
+ objectName: "textNumber"
+ text: number
+ }
+ Text {
+ x: 200
+ text: wrapper.y
+ }
+ color: ListView.isCurrentItem ? "lightsteelblue" : "white"
+ }
+ },
+ Component {
+ id: animatedDelegate
+ Rectangle {
+ id: wrapper
+ objectName: "wrapper"
+ height: 20
+ width: 240
+ Text {
+ text: index
+ }
+ Text {
+ x: 30
+ id: textName
+ objectName: "textName"
+ text: name
+ }
+ Text {
+ x: 120
+ id: textNumber
+ objectName: "textNumber"
+ text: number
+ }
+ Text {
+ x: 200
+ text: wrapper.y
+ }
+ color: ListView.isCurrentItem ? "lightsteelblue" : "white"
+ ListView.onRemove: SequentialAnimation {
+ ScriptAction { script: console.log("Fix PropertyAction with attached properties") }
+/*
+ PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: true }
+ NumberAnimation { target: wrapper; property: "scale"; to: 0; duration: 250; easing.type: "InOutQuad" }
+ PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: false }
+*/
+ }
+ }
+ },
+ Component {
+ id: myHighlight
+ Rectangle { color: "green" }
+ },
+ Component {
+ id: invalidHl
+ EaseFollow {}
+ }
+ ]
+ ListView {
+ id: list
+ objectName: "list"
+ focus: true
+ width: 240
+ height: 320
+ model: testModel
+ delegate: testObject.animate ? animatedDelegate : myDelegate
+ highlight: testObject.invalidHighlight ? invalidHl : myHighlight
+ highlightMoveSpeed: 1000
+ highlightResizeSpeed: 1000
+ cacheBuffer: testObject.cacheBuffer
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelistview/data/propertychanges.qml b/tests/auto/declarative/qdeclarativelistview/data/propertychanges.qml
new file mode 100644
index 0000000000..a41f003833
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistview/data/propertychanges.qml
@@ -0,0 +1,71 @@
+import Qt 4.6
+
+Rectangle {
+ width: 180; height: 120; color: "white"
+ Component {
+ id: delegate
+ Item {
+ id: wrapper
+ width: 180; height: 40;
+ Column {
+ x: 5; y: 5
+ Text { text: '<b>Name:</b> ' + name }
+ Text { text: '<b>Number:</b> ' + number }
+ }
+ }
+ }
+ Component {
+ id: highlightRed
+ Rectangle {
+ color: "red"
+ radius: 10
+ opacity: 0.5
+ }
+ }
+ ListView {
+ objectName: "listView"
+ anchors.fill: parent
+ model: listModel
+ delegate: delegate
+ highlight: highlightRed
+ focus: true
+ highlightFollowsCurrentItem: true
+ preferredHighlightBegin: 0.0
+ preferredHighlightEnd: 0.0
+ highlightRangeMode: ListView.ApplyRange
+ keyNavigationWraps: true
+ cacheBuffer: 10
+ snapMode: ListView.SnapToItem
+ }
+
+ data:[
+ ListModel {
+ id: listModel
+ ListElement {
+ name: "Bill Smith"
+ number: "555 3264"
+ }
+ ListElement {
+ name: "John Brown"
+ number: "555 8426"
+ }
+ ListElement {
+ name: "Sam Wise"
+ number: "555 0473"
+ }
+ },
+ ListModel {
+ objectName: "alternateModel"
+ ListElement {
+ name: "Jack"
+ number: "555 8426"
+ }
+ ListElement {
+ name: "Mary"
+ number: "555 3264"
+ }
+ }
+ ]
+}
+
+ \ No newline at end of file
diff --git a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
new file mode 100644
index 0000000000..3a076f8b47
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativelistview.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
new file mode 100644
index 0000000000..75fbbf8620
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
@@ -0,0 +1,1561 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QtGui/QStringListModel>
+#include <QtDeclarative/qdeclarativeview.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecontext.h>
+#include <QtDeclarative/qdeclarativeexpression.h>
+#include <QtDeclarative/private/qdeclarativelistview_p.h>
+#include <QtDeclarative/private/qdeclarativetext_p.h>
+#include <QtDeclarative/private/qdeclarativevisualitemmodel_p.h>
+#include <QtDeclarative/private/qdeclarativelistmodel_p.h>
+#include <QtDeclarative/private/qlistmodelinterface_p.h>
+
+class tst_QDeclarativeListView : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QDeclarativeListView();
+
+private slots:
+ // Test both QListModelInterface and QAbstractItemModel model types
+ void qListModelInterface_items();
+ void qAbstractItemModel_items();
+
+ void qListModelInterface_changed();
+ void qAbstractItemModel_changed();
+
+ void qListModelInterface_inserted();
+ void qAbstractItemModel_inserted();
+
+ void qListModelInterface_removed();
+ void qAbstractItemModel_removed();
+
+ void qListModelInterface_moved();
+ void qAbstractItemModel_moved();
+
+ void qListModelInterface_clear();
+ void qAbstractItemModel_clear();
+
+ void itemList();
+ void currentIndex();
+ void enforceRange();
+ void spacing();
+ void sections();
+ void cacheBuffer();
+ void positionViewAtIndex();
+ void resetModel();
+ void propertyChanges();
+ void componentChanges();
+ void modelChanges();
+
+private:
+ template <class T> void items();
+ template <class T> void changed();
+ template <class T> void inserted();
+ template <class T> void removed(bool animated);
+ template <class T> void moved();
+ template <class T> void clear();
+ QDeclarativeView *createView();
+ template<typename T>
+ T *findItem(QGraphicsObject *parent, const QString &id, int index=-1);
+ template<typename T>
+ QList<T*> findItems(QGraphicsObject *parent, const QString &objectName);
+ void dumpTree(QDeclarativeItem *parent, int depth = 0);
+};
+
+class TestObject : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(bool error READ error WRITE setError NOTIFY changedError)
+ Q_PROPERTY(bool animate READ animate NOTIFY changedAnim)
+ Q_PROPERTY(bool invalidHighlight READ invalidHighlight NOTIFY changedHl)
+ Q_PROPERTY(int cacheBuffer READ cacheBuffer NOTIFY changedCacheBuffer)
+
+public:
+ TestObject(QObject *parent = 0)
+ : QObject(parent), mError(true), mAnimate(false), mInvalidHighlight(false)
+ , mCacheBuffer(0) {}
+
+ bool error() const { return mError; }
+ void setError(bool err) { mError = err; emit changedError(); }
+
+ bool animate() const { return mAnimate; }
+ void setAnimate(bool anim) { mAnimate = anim; emit changedAnim(); }
+
+ bool invalidHighlight() const { return mInvalidHighlight; }
+ void setInvalidHighlight(bool invalid) { mInvalidHighlight = invalid; emit changedHl(); }
+
+ int cacheBuffer() const { return mCacheBuffer; }
+ void setCacheBuffer(int buffer) { mCacheBuffer = buffer; emit changedCacheBuffer(); }
+
+signals:
+ void changedError();
+ void changedAnim();
+ void changedHl();
+ void changedCacheBuffer();
+
+public:
+ bool mError;
+ bool mAnimate;
+ bool mInvalidHighlight;
+ int mCacheBuffer;
+};
+
+class TestModel : public QListModelInterface
+{
+ Q_OBJECT
+public:
+ TestModel(QObject *parent = 0) : QListModelInterface(parent) {}
+ ~TestModel() {}
+
+ enum Roles { Name, Number };
+
+ QString name(int index) const { return list.at(index).first; }
+ QString number(int index) const { return list.at(index).second; }
+
+ int count() const { return list.count(); }
+
+ QList<int> roles() const { return QList<int>() << Name << Number; }
+ QString toString(int role) const {
+ switch(role) {
+ case Name:
+ return "name";
+ case Number:
+ return "number";
+ default:
+ return "";
+ }
+ }
+
+ QVariant data(int index, int role) const
+ {
+ if (role==0)
+ return list.at(index).first;
+ if (role==1)
+ return list.at(index).second;
+ return QVariant();
+ }
+ QHash<int, QVariant> data(int index, const QList<int> &roles) const {
+ QHash<int,QVariant> returnHash;
+
+ for (int i = 0; i < roles.size(); ++i) {
+ int role = roles.at(i);
+ QVariant info;
+ switch(role) {
+ case Name:
+ info = list.at(index).first;
+ break;
+ case Number:
+ info = list.at(index).second;
+ break;
+ default:
+ break;
+ }
+ returnHash.insert(role, info);
+ }
+ return returnHash;
+ }
+
+ void addItem(const QString &name, const QString &number) {
+ list.append(QPair<QString,QString>(name, number));
+ emit itemsInserted(list.count()-1, 1);
+ }
+
+ void insertItem(int index, const QString &name, const QString &number) {
+ list.insert(index, QPair<QString,QString>(name, number));
+ emit itemsInserted(index, 1);
+ }
+
+ void removeItem(int index) {
+ list.removeAt(index);
+ emit itemsRemoved(index, 1);
+ }
+
+ void moveItem(int from, int to) {
+ list.move(from, to);
+ emit itemsMoved(from, to, 1);
+ }
+
+ void modifyItem(int index, const QString &name, const QString &number) {
+ list[index] = QPair<QString,QString>(name, number);
+ emit itemsChanged(index, 1, roles());
+ }
+
+ void clear() {
+ int count = list.count();
+ list.clear();
+ emit itemsRemoved(0, count);
+ }
+
+private:
+ QList<QPair<QString,QString> > list;
+};
+
+
+class TestModel2 : public QAbstractListModel
+{
+public:
+ enum Roles { Name = Qt::UserRole+1, Number = Qt::UserRole+2 };
+
+ TestModel2(QObject *parent=0) : QAbstractListModel(parent) {
+ QHash<int, QByteArray> roles;
+ roles[Name] = "name";
+ roles[Number] = "number";
+ setRoleNames(roles);
+ }
+
+ int rowCount(const QModelIndex &parent=QModelIndex()) const { Q_UNUSED(parent); return list.count(); }
+ QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const {
+ QVariant rv;
+ if (role == Name)
+ rv = list.at(index.row()).first;
+ else if (role == Number)
+ rv = list.at(index.row()).second;
+
+ return rv;
+ }
+
+ int count() const { return rowCount(); }
+ QString name(int index) const { return list.at(index).first; }
+ QString number(int index) const { return list.at(index).second; }
+
+ void addItem(const QString &name, const QString &number) {
+ emit beginInsertRows(QModelIndex(), list.count(), list.count());
+ list.append(QPair<QString,QString>(name, number));
+ emit endInsertRows();
+ }
+
+ void insertItem(int index, const QString &name, const QString &number) {
+ emit beginInsertRows(QModelIndex(), index, index);
+ list.insert(index, QPair<QString,QString>(name, number));
+ emit endInsertRows();
+ }
+
+ void removeItem(int index) {
+ emit beginRemoveRows(QModelIndex(), index, index);
+ list.removeAt(index);
+ emit endRemoveRows();
+ }
+
+ void moveItem(int from, int to) {
+ emit beginMoveRows(QModelIndex(), from, from, QModelIndex(), to);
+ list.move(from, to);
+ emit endMoveRows();
+ }
+
+ void modifyItem(int idx, const QString &name, const QString &number) {
+ list[idx] = QPair<QString,QString>(name, number);
+ emit dataChanged(index(idx,0), index(idx,0));
+ }
+
+ void clear() {
+ int count = list.count();
+ emit beginRemoveRows(QModelIndex(), 0, count-1);
+ list.clear();
+ emit endRemoveRows();
+ }
+
+private:
+ QList<QPair<QString,QString> > list;
+};
+
+tst_QDeclarativeListView::tst_QDeclarativeListView()
+{
+}
+
+template <class T>
+void tst_QDeclarativeListView::items()
+{
+ QDeclarativeView *canvas = createView();
+
+ T model;
+ model.addItem("Fred", "12345");
+ model.addItem("John", "2345");
+ model.addItem("Bob", "54321");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ TestObject *testObject = new TestObject;
+ ctxt->setContextProperty("testObject", testObject);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/listview.qml"));
+ qApp->processEvents();
+
+ QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
+ QVERIFY(listview != 0);
+
+ QDeclarativeItem *viewport = listview->viewport();
+ QVERIFY(viewport != 0);
+
+ QMetaObject::invokeMethod(canvas->rootObject(), "checkProperties");
+ QVERIFY(testObject->error() == false);
+
+ QVERIFY(listview->highlightItem() != 0);
+ QCOMPARE(listview->count(), model.count());
+ QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
+
+ // current item should be first item
+ QCOMPARE(listview->currentItem(), findItem<QDeclarativeItem>(viewport, "wrapper", 0));
+
+ for (int i = 0; i < model.count(); ++i) {
+ QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", i);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(i));
+ QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", i);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(i));
+ }
+
+ // switch to other delegate
+ testObject->setAnimate(true);
+ QMetaObject::invokeMethod(canvas->rootObject(), "checkProperties");
+ QVERIFY(testObject->error() == false);
+ QVERIFY(listview->currentItem());
+
+ // set invalid highlight
+ testObject->setInvalidHighlight(true);
+ QMetaObject::invokeMethod(canvas->rootObject(), "checkProperties");
+ QVERIFY(testObject->error() == false);
+ QVERIFY(listview->currentItem());
+ QVERIFY(listview->highlightItem() == 0);
+
+ // back to normal highlight
+ testObject->setInvalidHighlight(false);
+ QMetaObject::invokeMethod(canvas->rootObject(), "checkProperties");
+ QVERIFY(testObject->error() == false);
+ QVERIFY(listview->currentItem());
+ QVERIFY(listview->highlightItem() != 0);
+
+ // set an empty model and confirm that items are destroyed
+ T model2;
+ ctxt->setContextProperty("testModel", &model2);
+
+ // Allow deleteLaters to process
+ QTest::qWait(500);
+
+ int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ QVERIFY(itemCount == 0);
+
+ QCOMPARE(listview->highlightResizeSpeed(), 1000.0);
+ QCOMPARE(listview->highlightMoveSpeed(), 1000.0);
+
+ delete canvas;
+}
+
+
+template <class T>
+void tst_QDeclarativeListView::changed()
+{
+ QDeclarativeView *canvas = createView();
+
+ T model;
+ model.addItem("Fred", "12345");
+ model.addItem("John", "2345");
+ model.addItem("Bob", "54321");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ TestObject *testObject = new TestObject;
+ ctxt->setContextProperty("testObject", testObject);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/listview.qml"));
+ qApp->processEvents();
+
+ QDeclarativeFlickable *listview = findItem<QDeclarativeFlickable>(canvas->rootObject(), "list");
+ QVERIFY(listview != 0);
+
+ QDeclarativeItem *viewport = listview->viewport();
+ QVERIFY(viewport != 0);
+
+ model.modifyItem(1, "Will", "9876");
+ QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(1));
+ QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 1);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(1));
+
+ delete canvas;
+}
+
+template <class T>
+void tst_QDeclarativeListView::inserted()
+{
+ QDeclarativeView *canvas = createView();
+
+ T model;
+ model.addItem("Fred", "12345");
+ model.addItem("John", "2345");
+ model.addItem("Bob", "54321");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ TestObject *testObject = new TestObject;
+ ctxt->setContextProperty("testObject", testObject);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/listview.qml"));
+ qApp->processEvents();
+
+ QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
+ QVERIFY(listview != 0);
+
+ QDeclarativeItem *viewport = listview->viewport();
+ QVERIFY(viewport != 0);
+
+ model.insertItem(1, "Will", "9876");
+
+ // let transitions settle.
+ QTest::qWait(300);
+
+ QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
+
+ QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(1));
+ QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 1);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(1));
+
+ // Confirm items positioned correctly
+ for (int i = 0; i < model.count(); ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ QCOMPARE(item->y(), i*20.0);
+ }
+
+ model.insertItem(0, "Foo", "1111"); // zero index, and current item
+
+ // let transitions settle.
+ QTest::qWait(300);
+
+ QCOMPARE(viewport->childItems().count(), model.count()+1); // assumes all are visible, +1 for the (default) highlight item
+
+ name = findItem<QDeclarativeText>(viewport, "textName", 0);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(0));
+ number = findItem<QDeclarativeText>(viewport, "textNumber", 0);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(0));
+
+ QCOMPARE(listview->currentIndex(), 1);
+
+ // Confirm items positioned correctly
+ for (int i = 0; i < model.count(); ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ QCOMPARE(item->y(), i*20.0);
+ }
+
+ for (int i = model.count(); i < 30; ++i)
+ model.insertItem(i, "Hello", QString::number(i));
+ QTest::qWait(300);
+
+ listview->setContentY(80);
+ QTest::qWait(300);
+
+ // Insert item outside visible area
+ model.insertItem(1, "Hello", "1324");
+ QTest::qWait(300);
+
+ QVERIFY(listview->contentY() == 80);
+
+ // Confirm items positioned correctly
+ for (int i = 5; i < 5+15; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->y(), i*20.0 - 20.0);
+ }
+
+// QCOMPARE(listview->viewportHeight(), model.count() * 20.0);
+
+ delete canvas;
+}
+
+template <class T>
+void tst_QDeclarativeListView::removed(bool animated)
+{
+ QDeclarativeView *canvas = createView();
+
+ T model;
+ for (int i = 0; i < 30; i++)
+ model.addItem("Item" + QString::number(i), "");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ TestObject *testObject = new TestObject;
+ testObject->setAnimate(animated);
+ ctxt->setContextProperty("testObject", testObject);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/listview.qml"));
+ qApp->processEvents();
+
+ QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
+ QVERIFY(listview != 0);
+
+ QDeclarativeItem *viewport = listview->viewport();
+ QVERIFY(viewport != 0);
+
+ model.removeItem(1);
+
+ // let transitions settle.
+ QTest::qWait(300);
+
+ QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(1));
+ QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 1);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(1));
+
+ // Confirm items positioned correctly
+ int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QVERIFY(item->y() == i*20);
+ }
+
+ // Remove first item (which is the current item);
+ model.removeItem(0); // post: top item starts at 20
+
+ // let transitions settle.
+ QTest::qWait(300);
+
+ name = findItem<QDeclarativeText>(viewport, "textName", 0);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(0));
+ number = findItem<QDeclarativeText>(viewport, "textNumber", 0);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(0));
+
+ // Confirm items positioned correctly
+ itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->y(),i*20.0 + 20.0);
+ }
+
+ // Remove items not visible
+ model.removeItem(18);
+ // let transitions settle.
+ QTest::qWait(300);
+
+ // Confirm items positioned correctly
+ itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->y(),i*20.0+20.0);
+ }
+
+ // Remove items before visible
+ listview->setContentY(80);
+ listview->setCurrentIndex(10);
+
+ model.removeItem(1); // post: top item will be at 40
+ // let transitions settle.
+ QTest::qWait(300);
+
+ // Confirm items positioned correctly
+ for (int i = 2; i < 18; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->y(),40+i*20.0);
+ }
+
+ // Remove current index
+ QVERIFY(listview->currentIndex() == 9);
+ QDeclarativeItem *oldCurrent = listview->currentItem();
+ model.removeItem(9);
+ QTest::qWait(300);
+
+ QCOMPARE(listview->currentIndex(), 9);
+ QVERIFY(listview->currentItem() != oldCurrent);
+
+ listview->setContentY(40); // That's the top now
+ // let transitions settle.
+ QTest::qWait(300);
+
+ // Confirm items positioned correctly
+ itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->y(),40+i*20.0);
+ }
+
+ // remove current item beyond visible items.
+ listview->setCurrentIndex(20);
+ QTest::qWait(300);
+ listview->setContentY(40);
+ model.removeItem(20);
+ QTest::qWait(300);
+
+ QCOMPARE(listview->currentIndex(), 20);
+ QVERIFY(listview->currentItem() != 0);
+
+ // remove item before current, but visible
+ listview->setCurrentIndex(8);
+ QTest::qWait(300);
+ oldCurrent = listview->currentItem();
+ model.removeItem(6);
+ QTest::qWait(300);
+
+ QCOMPARE(listview->currentIndex(), 7);
+ QVERIFY(listview->currentItem() == oldCurrent);
+
+ delete canvas;
+}
+
+template <class T>
+void tst_QDeclarativeListView::clear()
+{
+ QDeclarativeView *canvas = createView();
+
+ T model;
+ for (int i = 0; i < 30; i++)
+ model.addItem("Item" + QString::number(i), "");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ TestObject *testObject = new TestObject;
+ ctxt->setContextProperty("testObject", testObject);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/listview.qml"));
+ qApp->processEvents();
+
+ QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
+ QVERIFY(listview != 0);
+
+ QDeclarativeItem *viewport = listview->viewport();
+ QVERIFY(viewport != 0);
+
+ model.clear();
+
+ // let transitions settle.
+ QTest::qWait(500);
+
+ QVERIFY(listview->count() == 0);
+ QVERIFY(listview->currentItem() == 0);
+ QVERIFY(listview->contentY() == 0);
+
+ delete canvas;
+}
+
+
+template <class T>
+void tst_QDeclarativeListView::moved()
+{
+ QDeclarativeView *canvas = createView();
+
+ T model;
+ for (int i = 0; i < 30; i++)
+ model.addItem("Item" + QString::number(i), "");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ TestObject *testObject = new TestObject;
+ ctxt->setContextProperty("testObject", testObject);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/listview.qml"));
+ qApp->processEvents();
+
+ QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
+ QVERIFY(listview != 0);
+
+ QDeclarativeItem *viewport = listview->viewport();
+ QVERIFY(viewport != 0);
+
+ model.moveItem(1, 4);
+
+ // let transitions settle.
+ QTest::qWait(500);
+
+ QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 1);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(1));
+ QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 1);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(1));
+
+ name = findItem<QDeclarativeText>(viewport, "textName", 4);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(4));
+ number = findItem<QDeclarativeText>(viewport, "textNumber", 4);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(4));
+
+ // Confirm items positioned correctly
+ int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QVERIFY(item->y() == i*20);
+ }
+
+ listview->setContentY(80);
+
+ // move outside visible area
+ model.moveItem(1, 18);
+
+ // let transitions settle.
+ QTest::qWait(500);
+
+ // Confirm items positioned correctly and indexes correct
+ for (int i = 3; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->y(), i*20.0 + 20);
+ name = findItem<QDeclarativeText>(viewport, "textName", i);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(i));
+ number = findItem<QDeclarativeText>(viewport, "textNumber", i);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(i));
+ }
+
+ // move from outside visible into visible
+ model.moveItem(20, 4);
+
+ // let transitions settle.
+ QTest::qWait(500);
+
+ // Confirm items positioned correctly and indexes correct
+ for (int i = 3; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->y(), i*20.0 + 20);
+ name = findItem<QDeclarativeText>(viewport, "textName", i);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(i));
+ number = findItem<QDeclarativeText>(viewport, "textNumber", i);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(i));
+ }
+
+ delete canvas;
+}
+
+void tst_QDeclarativeListView::enforceRange()
+{
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ for (int i = 0; i < 30; i++)
+ model.addItem("Item" + QString::number(i), "");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/listview-enforcerange.qml"));
+ qApp->processEvents();
+
+ QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
+ QVERIFY(listview != 0);
+
+ QCOMPARE(listview->preferredHighlightBegin(), 100.0);
+ QCOMPARE(listview->preferredHighlightEnd(), 100.0);
+ QCOMPARE(listview->highlightRangeMode(), QDeclarativeListView::StrictlyEnforceRange);
+
+ QDeclarativeItem *viewport = listview->viewport();
+ QVERIFY(viewport != 0);
+
+ // view should be positioned at the top of the range.
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", 0);
+ QVERIFY(item);
+ QCOMPARE(listview->contentY(), -100.0);
+
+ QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "textName", 0);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(0));
+ QDeclarativeText *number = findItem<QDeclarativeText>(viewport, "textNumber", 0);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(0));
+
+ // Check currentIndex is updated when viewport moves
+ listview->setContentY(20);
+ QTest::qWait(500);
+
+ QCOMPARE(listview->currentIndex(), 6);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeListView::spacing()
+{
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ for (int i = 0; i < 30; i++)
+ model.addItem("Item" + QString::number(i), "");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ TestObject *testObject = new TestObject;
+ ctxt->setContextProperty("testObject", testObject);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/listview.qml"));
+ qApp->processEvents();
+
+ QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
+ QVERIFY(listview != 0);
+
+ QDeclarativeItem *viewport = listview->viewport();
+ QVERIFY(viewport != 0);
+
+ // Confirm items positioned correctly
+ int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QVERIFY(item->y() == i*20);
+ }
+
+ listview->setSpacing(10);
+ QVERIFY(listview->spacing() == 10);
+
+ // Confirm items positioned correctly
+ itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QVERIFY(item->y() == i*30);
+ }
+
+ listview->setSpacing(0);
+
+ // Confirm items positioned correctly
+ itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->y(), i*20.0);
+ }
+
+ delete canvas;
+}
+
+void tst_QDeclarativeListView::sections()
+{
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ for (int i = 0; i < 30; i++)
+ model.addItem("Item" + QString::number(i), QString::number(i/5));
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/listview-sections.qml"));
+ qApp->processEvents();
+
+ QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
+ QVERIFY(listview != 0);
+
+ QDeclarativeItem *viewport = listview->viewport();
+ QVERIFY(viewport != 0);
+
+ // Confirm items positioned correctly
+ int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ QVERIFY(item);
+ QCOMPARE(item->y(), qreal(i*20 + ((i+4)/5) * 20));
+ }
+
+ // Remove section boundary
+ model.removeItem(5);
+
+ // New section header created
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", 5);
+ QVERIFY(item);
+ QCOMPARE(item->height(), 40.0);
+
+ model.insertItem(3, "New Item", "0");
+
+ // Section header moved
+ item = findItem<QDeclarativeItem>(viewport, "wrapper", 5);
+ QVERIFY(item);
+ QCOMPARE(item->height(), 20.0);
+
+ item = findItem<QDeclarativeItem>(viewport, "wrapper", 6);
+ QVERIFY(item);
+ QCOMPARE(item->height(), 40.0);
+
+ // insert item which will become a section header
+ model.insertItem(6, "Replace header", "1");
+
+ item = findItem<QDeclarativeItem>(viewport, "wrapper", 6);
+ QVERIFY(item);
+ QCOMPARE(item->height(), 40.0);
+
+ item = findItem<QDeclarativeItem>(viewport, "wrapper", 7);
+ QVERIFY(item);
+ QCOMPARE(item->height(), 20.0);
+
+ QCOMPARE(listview->currentSection(), QString("0"));
+
+ listview->setContentY(140);
+ QCOMPARE(listview->currentSection(), QString("1"));
+
+ listview->setContentY(20);
+ QCOMPARE(listview->currentSection(), QString("0"));
+
+ item = findItem<QDeclarativeItem>(viewport, "wrapper", 1);
+ QVERIFY(item);
+ QCOMPARE(item->height(), 20.0);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeListView::currentIndex()
+{
+ TestModel model;
+ for (int i = 0; i < 30; i++)
+ model.addItem("Item" + QString::number(i), QString::number(i));
+
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setFixedSize(240,320);
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+ ctxt->setContextProperty("testWrap", QVariant(false));
+
+ QString filename(SRCDIR "/data/listview-initCurrent.qml");
+ canvas->setSource(QUrl::fromLocalFile(filename));
+
+ qApp->processEvents();
+
+ QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
+ QVERIFY(listview != 0);
+
+ QDeclarativeItem *viewport = listview->viewport();
+ QVERIFY(viewport != 0);
+
+ QTest::qWait(500);
+
+ // current item should be third item
+ QCOMPARE(listview->currentIndex(), 3);
+ QCOMPARE(listview->currentItem(), findItem<QDeclarativeItem>(viewport, "wrapper", 3));
+ QCOMPARE(listview->highlightItem()->y(), listview->currentItem()->y());
+
+ // no wrap
+ listview->setCurrentIndex(0);
+ QCOMPARE(listview->currentIndex(), 0);
+
+ listview->incrementCurrentIndex();
+ QCOMPARE(listview->currentIndex(), 1);
+ listview->decrementCurrentIndex();
+ QCOMPARE(listview->currentIndex(), 0);
+
+ listview->decrementCurrentIndex();
+ QCOMPARE(listview->currentIndex(), 0);
+
+ // with wrap
+ ctxt->setContextProperty("testWrap", QVariant(true));
+ QVERIFY(listview->isWrapEnabled());
+
+ listview->decrementCurrentIndex();
+ QCOMPARE(listview->currentIndex(), model.count()-1);
+
+ QTest::qWait(1000);
+ QCOMPARE(listview->contentY(), 279.0);
+
+ listview->incrementCurrentIndex();
+ QCOMPARE(listview->currentIndex(), 0);
+
+ QTest::qWait(1000);
+ QCOMPARE(listview->contentY(), 0.0);
+
+ // Test keys
+ canvas->show();
+ qApp->setActiveWindow(canvas);
+#ifdef Q_WS_X11
+ // to be safe and avoid failing setFocus with window managers
+ qt_x11_wait_for_window_manager(canvas);
+#endif
+ QVERIFY(canvas->hasFocus());
+ QVERIFY(canvas->scene()->hasFocus());
+ qApp->processEvents();
+
+ QTest::keyClick(canvas, Qt::Key_Down);
+ QCOMPARE(listview->currentIndex(), 1);
+
+ QTest::keyClick(canvas, Qt::Key_Up);
+ QCOMPARE(listview->currentIndex(), 0);
+
+ // turn off auto highlight
+ listview->setHighlightFollowsCurrentItem(false);
+ QVERIFY(listview->highlightFollowsCurrentItem() == false);
+
+ QTest::qWait(500);
+ QVERIFY(listview->highlightItem());
+ qreal hlPos = listview->highlightItem()->y();
+
+ listview->setCurrentIndex(4);
+ QTest::qWait(500);
+ QCOMPARE(listview->highlightItem()->y(), hlPos);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeListView::itemList()
+{
+ QDeclarativeView *canvas = createView();
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/itemlist.qml"));
+ qApp->processEvents();
+
+ QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "view");
+ QVERIFY(listview != 0);
+
+ QDeclarativeItem *viewport = listview->viewport();
+ QVERIFY(viewport != 0);
+
+ QDeclarativeVisualItemModel *model = canvas->rootObject()->findChild<QDeclarativeVisualItemModel*>("itemModel");
+ QVERIFY(model != 0);
+
+ QVERIFY(model->count() == 3);
+ QCOMPARE(listview->currentIndex(), 0);
+
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "item1");
+ QVERIFY(item);
+ QCOMPARE(item->x(), 0.0);
+
+ QDeclarativeText *text = findItem<QDeclarativeText>(viewport, "text1");
+ QVERIFY(text);
+ QCOMPARE(text->text(), QLatin1String("index: 0"));
+
+ listview->setCurrentIndex(2);
+ QTest::qWait(1000);
+
+ item = findItem<QDeclarativeItem>(viewport, "item3");
+ QVERIFY(item);
+ QCOMPARE(item->x(), 480.0);
+
+ text = findItem<QDeclarativeText>(viewport, "text3");
+ QVERIFY(text);
+ QCOMPARE(text->text(), QLatin1String("index: 2"));
+
+ delete canvas;
+}
+
+void tst_QDeclarativeListView::cacheBuffer()
+{
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ for (int i = 0; i < 30; i++)
+ model.addItem("Item" + QString::number(i), "");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ TestObject *testObject = new TestObject;
+ ctxt->setContextProperty("testObject", testObject);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/listview.qml"));
+ qApp->processEvents();
+
+ QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
+ QVERIFY(listview != 0);
+
+ QDeclarativeItem *viewport = listview->viewport();
+ QVERIFY(viewport != 0);
+ QVERIFY(listview->delegate() != 0);
+ QVERIFY(listview->model() != 0);
+ QVERIFY(listview->highlight() != 0);
+
+ // Confirm items positioned correctly
+ int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QVERIFY(item->y() == i*20);
+ }
+
+ testObject->setCacheBuffer(400);
+ QVERIFY(listview->cacheBuffer() == 400);
+
+ int newItemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ QVERIFY(newItemCount > itemCount);
+
+ // Confirm items positioned correctly
+ for (int i = 0; i < model.count() && i < newItemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QVERIFY(item->y() == i*20);
+ }
+
+ delete canvas;
+}
+
+void tst_QDeclarativeListView::positionViewAtIndex()
+{
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ for (int i = 0; i < 40; i++)
+ model.addItem("Item" + QString::number(i), "");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ TestObject *testObject = new TestObject;
+ ctxt->setContextProperty("testObject", testObject);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/listview.qml"));
+ qApp->processEvents();
+
+ QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
+ QVERIFY(listview != 0);
+
+ QDeclarativeItem *viewport = listview->viewport();
+ QVERIFY(viewport != 0);
+
+ // Confirm items positioned correctly
+ int itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->y(), i*20.);
+ }
+
+ // Position on a currently visible item
+ listview->positionViewAtIndex(3);
+ QCOMPARE(listview->contentY(), 60.);
+
+ // Confirm items positioned correctly
+ itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 3; i < model.count() && i < itemCount-3-1; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->y(), i*20.);
+ }
+
+ // Position on an item beyond the visible items
+ listview->positionViewAtIndex(22);
+ QCOMPARE(listview->contentY(), 440.);
+
+ // Confirm items positioned correctly
+ itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 22; i < model.count() && i < itemCount-22-1; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->y(), i*20.);
+ }
+
+ // Position on an item that would leave empty space if positioned at the top
+ listview->positionViewAtIndex(28);
+ QCOMPARE(listview->contentY(), 480.);
+
+ // Confirm items positioned correctly
+ itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 24; i < model.count() && i < itemCount-24-1; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->y(), i*20.);
+ }
+
+ // Position at the beginning again
+ listview->positionViewAtIndex(0);
+ QCOMPARE(listview->contentY(), 0.);
+
+ // Confirm items positioned correctly
+ itemCount = findItems<QDeclarativeItem>(viewport, "wrapper").count();
+ for (int i = 0; i < model.count() && i < itemCount-1; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", i);
+ if (!item) qWarning() << "Item" << i << "not found";
+ QVERIFY(item);
+ QCOMPARE(item->y(), i*20.);
+ }
+
+ delete canvas;
+}
+
+void tst_QDeclarativeListView::resetModel()
+{
+ QDeclarativeView *canvas = createView();
+
+ QStringList strings;
+ strings << "one" << "two" << "three";
+ QStringListModel model(strings);
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/displaylist.qml"));
+ qApp->processEvents();
+
+ QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
+ QVERIFY(listview != 0);
+
+ QDeclarativeItem *viewport = listview->viewport();
+ QVERIFY(viewport != 0);
+
+ QCOMPARE(listview->count(), model.rowCount());
+
+ for (int i = 0; i < model.rowCount(); ++i) {
+ QDeclarativeText *display = findItem<QDeclarativeText>(viewport, "displayText", i);
+ QVERIFY(display != 0);
+ QCOMPARE(display->text(), strings.at(i));
+ }
+
+ strings.clear();
+ strings << "four" << "five" << "six" << "seven";
+ model.setStringList(strings);
+
+ QCOMPARE(listview->count(), model.rowCount());
+
+ for (int i = 0; i < model.rowCount(); ++i) {
+ QDeclarativeText *display = findItem<QDeclarativeText>(viewport, "displayText", i);
+ QVERIFY(display != 0);
+ QCOMPARE(display->text(), strings.at(i));
+ }
+}
+
+void tst_QDeclarativeListView::propertyChanges()
+{
+ QDeclarativeView *canvas = createView();
+ QVERIFY(canvas);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
+
+ QDeclarativeListView *listView = canvas->rootObject()->findChild<QDeclarativeListView*>("listView");
+ QVERIFY(listView);
+
+ QSignalSpy highlightFollowsCurrentItemSpy(listView, SIGNAL(highlightFollowsCurrentItemChanged()));
+ QSignalSpy preferredHighlightBeginSpy(listView, SIGNAL(preferredHighlightBeginChanged()));
+ QSignalSpy preferredHighlightEndSpy(listView, SIGNAL(preferredHighlightEndChanged()));
+ QSignalSpy highlightRangeModeSpy(listView, SIGNAL(highlightRangeModeChanged()));
+ QSignalSpy keyNavigationWrapsSpy(listView, SIGNAL(keyNavigationWrapsChanged()));
+ QSignalSpy cacheBufferSpy(listView, SIGNAL(cacheBufferChanged()));
+ QSignalSpy snapModeSpy(listView, SIGNAL(snapModeChanged()));
+
+ QCOMPARE(listView->highlightFollowsCurrentItem(), true);
+ QCOMPARE(listView->preferredHighlightBegin(), 0.0);
+ QCOMPARE(listView->preferredHighlightEnd(), 0.0);
+ QCOMPARE(listView->highlightRangeMode(), QDeclarativeListView::ApplyRange);
+ QCOMPARE(listView->isWrapEnabled(), true);
+ QCOMPARE(listView->cacheBuffer(), 10);
+ QCOMPARE(listView->snapMode(), QDeclarativeListView::SnapToItem);
+
+ listView->setHighlightFollowsCurrentItem(false);
+ listView->setPreferredHighlightBegin(1.0);
+ listView->setPreferredHighlightEnd(1.0);
+ listView->setHighlightRangeMode(QDeclarativeListView::StrictlyEnforceRange);
+ listView->setWrapEnabled(false);
+ listView->setCacheBuffer(3);
+ listView->setSnapMode(QDeclarativeListView::SnapOneItem);
+
+ QCOMPARE(listView->highlightFollowsCurrentItem(), false);
+ QCOMPARE(listView->preferredHighlightBegin(), 1.0);
+ QCOMPARE(listView->preferredHighlightEnd(), 1.0);
+ QCOMPARE(listView->highlightRangeMode(), QDeclarativeListView::StrictlyEnforceRange);
+ QCOMPARE(listView->isWrapEnabled(), false);
+ QCOMPARE(listView->cacheBuffer(), 3);
+ QCOMPARE(listView->snapMode(), QDeclarativeListView::SnapOneItem);
+
+ QCOMPARE(highlightFollowsCurrentItemSpy.count(),1);
+ QCOMPARE(preferredHighlightBeginSpy.count(),1);
+ QCOMPARE(preferredHighlightEndSpy.count(),1);
+ QCOMPARE(highlightRangeModeSpy.count(),1);
+ QCOMPARE(keyNavigationWrapsSpy.count(),1);
+ QCOMPARE(cacheBufferSpy.count(),1);
+ QCOMPARE(snapModeSpy.count(),1);
+
+ listView->setHighlightFollowsCurrentItem(false);
+ listView->setPreferredHighlightBegin(1.0);
+ listView->setPreferredHighlightEnd(1.0);
+ listView->setHighlightRangeMode(QDeclarativeListView::StrictlyEnforceRange);
+ listView->setWrapEnabled(false);
+ listView->setCacheBuffer(3);
+ listView->setSnapMode(QDeclarativeListView::SnapOneItem);
+
+ QCOMPARE(highlightFollowsCurrentItemSpy.count(),1);
+ QCOMPARE(preferredHighlightBeginSpy.count(),1);
+ QCOMPARE(preferredHighlightEndSpy.count(),1);
+ QCOMPARE(highlightRangeModeSpy.count(),1);
+ QCOMPARE(keyNavigationWrapsSpy.count(),1);
+ QCOMPARE(cacheBufferSpy.count(),1);
+ QCOMPARE(snapModeSpy.count(),1);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeListView::componentChanges()
+{
+ QDeclarativeView *canvas = createView();
+ QVERIFY(canvas);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
+
+ QDeclarativeListView *listView = canvas->rootObject()->findChild<QDeclarativeListView*>("listView");
+ QVERIFY(listView);
+
+ QDeclarativeComponent component(canvas->engine());
+ component.setData("import Qt 4.6; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile(""));
+
+ QDeclarativeComponent delegateComponent(canvas->engine());
+ delegateComponent.setData("import Qt 4.6; Text { text: '<b>Name:</b> ' + name }", QUrl::fromLocalFile(""));
+
+ QSignalSpy highlightSpy(listView, SIGNAL(highlightChanged()));
+ QSignalSpy delegateSpy(listView, SIGNAL(delegateChanged()));
+ QSignalSpy headerSpy(listView, SIGNAL(headerChanged()));
+ QSignalSpy footerSpy(listView, SIGNAL(footerChanged()));
+
+ listView->setHighlight(&component);
+ listView->setHeader(&component);
+ listView->setFooter(&component);
+ listView->setDelegate(&delegateComponent);
+
+ QCOMPARE(listView->highlight(), &component);
+ QCOMPARE(listView->header(), &component);
+ QCOMPARE(listView->footer(), &component);
+ QCOMPARE(listView->delegate(), &delegateComponent);
+
+ QCOMPARE(highlightSpy.count(),1);
+ QCOMPARE(delegateSpy.count(),1);
+ QCOMPARE(headerSpy.count(),1);
+ QCOMPARE(footerSpy.count(),1);
+
+ listView->setHighlight(&component);
+ listView->setHeader(&component);
+ listView->setFooter(&component);
+ listView->setDelegate(&delegateComponent);
+
+ QCOMPARE(highlightSpy.count(),1);
+ QCOMPARE(delegateSpy.count(),1);
+ QCOMPARE(headerSpy.count(),1);
+ QCOMPARE(footerSpy.count(),1);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeListView::modelChanges()
+{
+ QDeclarativeView *canvas = createView();
+ QVERIFY(canvas);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
+
+ QDeclarativeListView *listView = canvas->rootObject()->findChild<QDeclarativeListView*>("listView");
+ QVERIFY(listView);
+
+ QDeclarativeListModel *alternateModel = canvas->rootObject()->findChild<QDeclarativeListModel*>("alternateModel");
+ QVERIFY(alternateModel);
+ QVariant modelVariant = QVariant::fromValue(alternateModel);
+ QSignalSpy modelSpy(listView, SIGNAL(modelChanged()));
+
+ listView->setModel(modelVariant);
+ QCOMPARE(listView->model(), modelVariant);
+ QCOMPARE(modelSpy.count(),1);
+
+ listView->setModel(modelVariant);
+ QCOMPARE(modelSpy.count(),1);
+
+ listView->setModel(QVariant());
+ QCOMPARE(modelSpy.count(),2);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeListView::qListModelInterface_items()
+{
+ items<TestModel>();
+}
+
+void tst_QDeclarativeListView::qAbstractItemModel_items()
+{
+ items<TestModel2>();
+}
+
+void tst_QDeclarativeListView::qListModelInterface_changed()
+{
+ changed<TestModel>();
+}
+
+void tst_QDeclarativeListView::qAbstractItemModel_changed()
+{
+ changed<TestModel2>();
+}
+
+void tst_QDeclarativeListView::qListModelInterface_inserted()
+{
+ inserted<TestModel>();
+}
+
+void tst_QDeclarativeListView::qAbstractItemModel_inserted()
+{
+ inserted<TestModel2>();
+}
+
+void tst_QDeclarativeListView::qListModelInterface_removed()
+{
+ removed<TestModel>(false);
+ removed<TestModel>(true);
+}
+
+void tst_QDeclarativeListView::qAbstractItemModel_removed()
+{
+ removed<TestModel2>(false);
+ removed<TestModel2>(true);
+}
+
+void tst_QDeclarativeListView::qListModelInterface_moved()
+{
+ moved<TestModel>();
+}
+
+void tst_QDeclarativeListView::qAbstractItemModel_moved()
+{
+ moved<TestModel2>();
+}
+
+void tst_QDeclarativeListView::qListModelInterface_clear()
+{
+ clear<TestModel>();
+}
+
+void tst_QDeclarativeListView::qAbstractItemModel_clear()
+{
+ clear<TestModel2>();
+}
+
+QDeclarativeView *tst_QDeclarativeListView::createView()
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setFixedSize(240,320);
+
+ return canvas;
+}
+
+/*
+ Find an item with the specified objectName. If index is supplied then the
+ item must also evaluate the {index} expression equal to index
+*/
+template<typename T>
+T *tst_QDeclarativeListView::findItem(QGraphicsObject *parent, const QString &objectName, int index)
+{
+ const QMetaObject &mo = T::staticMetaObject;
+ //qDebug() << parent->childItems().count() << "children";
+ for (int i = 0; i < parent->childItems().count(); ++i) {
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(parent->childItems().at(i));
+ if(!item)
+ continue;
+ //qDebug() << "try" << item;
+ if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) {
+ if (index != -1) {
+ QDeclarativeExpression e(qmlContext(item), "index", item);
+ if (e.value().toInt() == index)
+ return static_cast<T*>(item);
+ } else {
+ return static_cast<T*>(item);
+ }
+ }
+ item = findItem<T>(item, objectName, index);
+ if (item)
+ return static_cast<T*>(item);
+ }
+
+ return 0;
+}
+
+template<typename T>
+QList<T*> tst_QDeclarativeListView::findItems(QGraphicsObject *parent, const QString &objectName)
+{
+ QList<T*> items;
+ const QMetaObject &mo = T::staticMetaObject;
+ //qDebug() << parent->childItems().count() << "children";
+ for (int i = 0; i < parent->childItems().count(); ++i) {
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(parent->childItems().at(i));
+ if(!item)
+ continue;
+ //qDebug() << "try" << item;
+ if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName))
+ items.append(static_cast<T*>(item));
+ items += findItems<T>(item, objectName);
+ }
+
+ return items;
+}
+
+void tst_QDeclarativeListView::dumpTree(QDeclarativeItem *parent, int depth)
+{
+ static QString padding(" ");
+ for (int i = 0; i < parent->childItems().count(); ++i) {
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(parent->childItems().at(i));
+ if(!item)
+ continue;
+ qDebug() << padding.left(depth*2) << item;
+ dumpTree(item, depth+1);
+ }
+}
+
+
+QTEST_MAIN(tst_QDeclarativeListView)
+
+#include "tst_qdeclarativelistview.moc"
diff --git a/tests/auto/declarative/qdeclarativeloader/data/GraphicsWidget250x250.qml b/tests/auto/declarative/qdeclarativeloader/data/GraphicsWidget250x250.qml
new file mode 100644
index 0000000000..4ebf3664c0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/GraphicsWidget250x250.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+import Qt.widgets 4.6
+
+QGraphicsWidget {
+ size: "250x250"
+}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/NoResize.qml b/tests/auto/declarative/qdeclarativeloader/data/NoResize.qml
new file mode 100644
index 0000000000..cfbb55a6e7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/NoResize.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+Loader {
+ resizeMode: "NoResize"
+ width: 200; height: 80
+ source: "Rect120x60.qml"
+}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/NoResizeGraphicsWidget.qml b/tests/auto/declarative/qdeclarativeloader/data/NoResizeGraphicsWidget.qml
new file mode 100644
index 0000000000..5eab96506f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/NoResizeGraphicsWidget.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+Loader {
+ resizeMode: Loader.NoResize
+ source: "GraphicsWidget250x250.qml"
+ width: 200
+ height: 80
+}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/Rect120x60.qml b/tests/auto/declarative/qdeclarativeloader/data/Rect120x60.qml
new file mode 100644
index 0000000000..aa4b0c28b8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/Rect120x60.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+Rectangle {
+ width: 120
+ height:60
+}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml b/tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml
new file mode 100644
index 0000000000..1db56c408f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+Item {
+ Component { id: comp; Rectangle { width: 100; height: 50 } }
+ Loader { sourceComponent: comp }
+}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml b/tests/auto/declarative/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml
new file mode 100644
index 0000000000..568a1363b8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+Loader {
+ resizeMode: Loader.SizeItemToLoader
+ width: 200
+ height: 80
+ source: "GraphicsWidget250x250.qml"
+}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml b/tests/auto/declarative/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml
new file mode 100644
index 0000000000..a7108033c4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+Loader {
+ resizeMode: Loader.SizeLoaderToItem
+ source: "GraphicsWidget250x250.qml"
+}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/SizeToItem.qml b/tests/auto/declarative/qdeclarativeloader/data/SizeToItem.qml
new file mode 100644
index 0000000000..b52fa03762
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/SizeToItem.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+Loader {
+ resizeMode: "SizeLoaderToItem"
+ source: "Rect120x60.qml"
+}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/SizeToLoader.qml b/tests/auto/declarative/qdeclarativeloader/data/SizeToLoader.qml
new file mode 100644
index 0000000000..1a107e130f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/SizeToLoader.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+Loader {
+ resizeMode: "SizeItemToLoader"
+ width: 200; height: 80
+ source: "Rect120x60.qml"
+}
diff --git a/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro b/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
new file mode 100644
index 0000000000..8ff2be4901
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
@@ -0,0 +1,11 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui network
+macx:CONFIG -= app_bundle
+
+INCLUDEPATH += ../shared/
+HEADERS += ../shared/testhttpserver.h
+SOURCES += tst_qdeclarativeloader.cpp \
+ ../shared/testhttpserver.cpp
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
+
diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
new file mode 100644
index 0000000000..61b2800bde
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
@@ -0,0 +1,464 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtGui/QGraphicsWidget>
+#include <QtGui/QGraphicsScene>
+
+#include <QSignalSpy>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativeloader_p.h>
+#include "testhttpserver.h"
+
+#define SERVER_PORT 14445
+
+inline QUrl TEST_FILE(const QString &filename)
+{
+ return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename);
+}
+
+#define TRY_WAIT(expr) \
+ do { \
+ for (int ii = 0; ii < 6; ++ii) { \
+ if ((expr)) break; \
+ QTest::qWait(50); \
+ } \
+ QVERIFY((expr)); \
+ } while (false)
+
+class tst_QDeclarativeLoader : public QObject
+
+{
+ Q_OBJECT
+public:
+ tst_QDeclarativeLoader();
+
+private slots:
+ void url();
+ void invalidUrl();
+ void component();
+ void clear();
+ void urlToComponent();
+ void componentToUrl();
+ void sizeLoaderToItem();
+ void sizeItemToLoader();
+ void noResize();
+ void sizeLoaderToGraphicsWidget();
+ void sizeGraphicsWidgetToLoader();
+ void noResizeGraphicsWidget();
+ void networkRequestUrl();
+ void failNetworkRequest();
+// void networkComponent();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+
+tst_QDeclarativeLoader::tst_QDeclarativeLoader()
+{
+}
+
+void tst_QDeclarativeLoader::url()
+{
+ QDeclarativeComponent component(&engine);
+ component.setData(QByteArray("import Qt 4.6\nLoader { source: \"Rect120x60.qml\" }"), TEST_FILE(""));
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
+ QVERIFY(loader != 0);
+ QVERIFY(loader->item());
+ QVERIFY(loader->source() == QUrl::fromLocalFile(SRCDIR "/data/Rect120x60.qml"));
+ QCOMPARE(loader->progress(), 1.0);
+ QCOMPARE(loader->status(), QDeclarativeLoader::Ready);
+ QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 1);
+
+ delete loader;
+}
+
+void tst_QDeclarativeLoader::component()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("/SetSourceComponent.qml"));
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(item->QGraphicsObject::children().at(1));
+ QVERIFY(loader);
+ QVERIFY(loader->item());
+ QCOMPARE(loader->progress(), 1.0);
+ QCOMPARE(loader->status(), QDeclarativeLoader::Ready);
+ QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 1);
+
+ delete loader;
+}
+
+void tst_QDeclarativeLoader::invalidUrl()
+{
+ QTest::ignoreMessage(QtWarningMsg, QString("(:-1: File error for URL " + QUrl::fromLocalFile(SRCDIR "/data/IDontExist.qml").toString() + ") ").toUtf8().constData());
+
+ QDeclarativeComponent component(&engine);
+ component.setData(QByteArray("import Qt 4.6\nLoader { source: \"IDontExist.qml\" }"), TEST_FILE(""));
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
+ QVERIFY(loader != 0);
+ QVERIFY(loader->item() == 0);
+ QCOMPARE(loader->progress(), 1.0);
+ QCOMPARE(loader->status(), QDeclarativeLoader::Error);
+ QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 0);
+
+ delete loader;
+}
+
+void tst_QDeclarativeLoader::clear()
+{
+ {
+ QDeclarativeComponent component(&engine);
+ component.setData(QByteArray(
+ "import Qt 4.6\n"
+ " Loader { id: loader\n"
+ " source: 'Rect120x60.qml'\n"
+ " Timer { interval: 200; running: true; onTriggered: loader.source = '' }\n"
+ " }")
+ , TEST_FILE(""));
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
+ QVERIFY(loader != 0);
+ QVERIFY(loader->item());
+ QCOMPARE(loader->progress(), 1.0);
+ QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 1);
+
+ QTest::qWait(500);
+
+ QVERIFY(loader->item() == 0);
+ QCOMPARE(loader->progress(), 0.0);
+ QCOMPARE(loader->status(), QDeclarativeLoader::Null);
+ QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 0);
+
+ delete loader;
+ }
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("/SetSourceComponent.qml"));
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(item->QGraphicsObject::children().at(1));
+ QVERIFY(loader);
+ QVERIFY(loader->item());
+ QCOMPARE(loader->progress(), 1.0);
+ QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 1);
+
+ loader->setSourceComponent(0);
+
+ QVERIFY(loader->item() == 0);
+ QCOMPARE(loader->progress(), 0.0);
+ QCOMPARE(loader->status(), QDeclarativeLoader::Null);
+ QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 0);
+
+ delete loader;
+ }
+}
+
+void tst_QDeclarativeLoader::urlToComponent()
+{
+ QDeclarativeComponent component(&engine);
+ component.setData(QByteArray("import Qt 4.6\n"
+ "Loader {\n"
+ " id: loader\n"
+ " Component { id: myComp; Rectangle { width: 10; height: 10 } }\n"
+ " source: \"Rect120x60.qml\"\n"
+ " Timer { interval: 100; running: true; onTriggered: loader.sourceComponent = myComp }\n"
+ "}" )
+ , TEST_FILE(""));
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
+ QTest::qWait(500);
+ QVERIFY(loader != 0);
+ QVERIFY(loader->item());
+ QCOMPARE(loader->progress(), 1.0);
+ QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 1);
+ QCOMPARE(loader->width(), 10.0);
+ QCOMPARE(loader->height(), 10.0);
+
+ delete loader;
+}
+
+void tst_QDeclarativeLoader::componentToUrl()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("/SetSourceComponent.qml"));
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(item->QGraphicsObject::children().at(1));
+ QVERIFY(loader);
+ QVERIFY(loader->item());
+ QCOMPARE(loader->progress(), 1.0);
+ QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 1);
+
+ loader->setSource(TEST_FILE("/Rect120x60.qml"));
+ QVERIFY(loader->item());
+ QCOMPARE(loader->progress(), 1.0);
+ QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 1);
+ QCOMPARE(loader->width(), 120.0);
+ QCOMPARE(loader->height(), 60.0);
+
+ delete loader;
+}
+
+void tst_QDeclarativeLoader::sizeLoaderToItem()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("/SizeToItem.qml"));
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
+ QVERIFY(loader != 0);
+ QVERIFY(loader->resizeMode() == QDeclarativeLoader::SizeLoaderToItem);
+ QCOMPARE(loader->width(), 120.0);
+ QCOMPARE(loader->height(), 60.0);
+
+ // Check resize
+ QDeclarativeItem *rect = qobject_cast<QDeclarativeItem*>(loader->item());
+ QVERIFY(rect);
+ rect->setWidth(150);
+ rect->setHeight(45);
+ QCOMPARE(loader->width(), 150.0);
+ QCOMPARE(loader->height(), 45.0);
+
+ // Switch mode
+ loader->setResizeMode(QDeclarativeLoader::SizeItemToLoader);
+ loader->setWidth(180);
+ loader->setHeight(30);
+ QCOMPARE(rect->width(), 180.0);
+ QCOMPARE(rect->height(), 30.0);
+
+ // notify
+ QSignalSpy spy(loader, SIGNAL(resizeModeChanged()));
+ loader->setResizeMode(QDeclarativeLoader::NoResize);
+ QCOMPARE(spy.count(),1);
+ loader->setResizeMode(QDeclarativeLoader::NoResize);
+ QCOMPARE(spy.count(),1);
+}
+
+void tst_QDeclarativeLoader::sizeItemToLoader()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("/SizeToLoader.qml"));
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
+ QVERIFY(loader != 0);
+ QVERIFY(loader->resizeMode() == QDeclarativeLoader::SizeItemToLoader);
+ QCOMPARE(loader->width(), 200.0);
+ QCOMPARE(loader->height(), 80.0);
+
+ QDeclarativeItem *rect = qobject_cast<QDeclarativeItem*>(loader->item());
+ QVERIFY(rect);
+ QCOMPARE(rect->width(), 200.0);
+ QCOMPARE(rect->height(), 80.0);
+
+ // Check resize
+ loader->setWidth(180);
+ loader->setHeight(30);
+ QCOMPARE(rect->width(), 180.0);
+ QCOMPARE(rect->height(), 30.0);
+
+ // Switch mode
+ loader->setResizeMode(QDeclarativeLoader::SizeLoaderToItem);
+ rect->setWidth(160);
+ rect->setHeight(45);
+ QCOMPARE(loader->width(), 160.0);
+ QCOMPARE(loader->height(), 45.0);
+}
+
+void tst_QDeclarativeLoader::noResize()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("/NoResize.qml"));
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
+ QVERIFY(loader != 0);
+ QCOMPARE(loader->width(), 200.0);
+ QCOMPARE(loader->height(), 80.0);
+
+ QDeclarativeItem *rect = qobject_cast<QDeclarativeItem*>(loader->item());
+ QVERIFY(rect);
+ QCOMPARE(rect->width(), 120.0);
+ QCOMPARE(rect->height(), 60.0);
+}
+
+void tst_QDeclarativeLoader::sizeLoaderToGraphicsWidget()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("/SizeLoaderToGraphicsWidget.qml"));
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
+ QGraphicsScene scene;
+ scene.addItem(loader);
+
+ QVERIFY(loader != 0);
+ QVERIFY(loader->resizeMode() == QDeclarativeLoader::SizeLoaderToItem);
+ QCOMPARE(loader->width(), 250.0);
+ QCOMPARE(loader->height(), 250.0);
+
+ // Check resize
+ QGraphicsWidget *widget = qobject_cast<QGraphicsWidget*>(loader->item());
+ QVERIFY(widget);
+ widget->resize(QSizeF(150,45));
+ QCOMPARE(loader->width(), 150.0);
+ QCOMPARE(loader->height(), 45.0);
+
+ // Switch mode
+ loader->setResizeMode(QDeclarativeLoader::SizeItemToLoader);
+ loader->setWidth(180);
+ loader->setHeight(30);
+ QCOMPARE(widget->size().width(), 180.0);
+ QCOMPARE(widget->size().height(), 30.0);
+}
+
+void tst_QDeclarativeLoader::sizeGraphicsWidgetToLoader()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("/SizeGraphicsWidgetToLoader.qml"));
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
+ QGraphicsScene scene;
+ scene.addItem(loader);
+
+ QVERIFY(loader != 0);
+ QVERIFY(loader->resizeMode() == QDeclarativeLoader::SizeItemToLoader);
+ QCOMPARE(loader->width(), 200.0);
+ QCOMPARE(loader->height(), 80.0);
+
+ QGraphicsWidget *widget = qobject_cast<QGraphicsWidget*>(loader->item());
+ QVERIFY(widget);
+ QCOMPARE(widget->size().width(), 200.0);
+ QCOMPARE(widget->size().height(), 80.0);
+
+ // Check resize
+ loader->setWidth(180);
+ loader->setHeight(30);
+ QCOMPARE(widget->size().width(), 180.0);
+ QCOMPARE(widget->size().height(), 30.0);
+
+ // Switch mode
+ loader->setResizeMode(QDeclarativeLoader::SizeLoaderToItem);
+ widget->resize(QSizeF(160,45));
+ QCOMPARE(loader->width(), 160.0);
+ QCOMPARE(loader->height(), 45.0);
+}
+
+void tst_QDeclarativeLoader::noResizeGraphicsWidget()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("/NoResizeGraphicsWidget.qml"));
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
+ QGraphicsScene scene;
+ scene.addItem(loader);
+
+ QVERIFY(loader != 0);
+ QCOMPARE(loader->width(), 200.0);
+ QCOMPARE(loader->height(), 80.0);
+
+ QGraphicsWidget *widget = qobject_cast<QGraphicsWidget*>(loader->item());
+ QVERIFY(widget);
+ QCOMPARE(widget->size().width(), 250.0);
+ QCOMPARE(widget->size().height(), 250.0);
+}
+
+void tst_QDeclarativeLoader::networkRequestUrl()
+{
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ server.serveDirectory(SRCDIR "/data");
+
+ QDeclarativeComponent component(&engine);
+ component.setData(QByteArray("import Qt 4.6\nLoader { source: \"http://127.0.0.1:14445/Rect120x60.qml\" }"), TEST_FILE(""));
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
+ QVERIFY(loader != 0);
+
+ TRY_WAIT(loader->status() == QDeclarativeLoader::Ready);
+
+ QVERIFY(loader->item());
+ QCOMPARE(loader->progress(), 1.0);
+ QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 1);
+
+ delete loader;
+}
+
+/* XXX Component waits until all dependencies are loaded. Is this actually possible?
+void tst_QDeclarativeLoader::networkComponent()
+{
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ server.serveDirectory("slowdata", TestHTTPServer::Delay);
+
+ QDeclarativeComponent component(&engine);
+ component.setData(QByteArray(
+ "import Qt 4.6\n"
+ "import \"http://127.0.0.1:14445/\" as NW\n"
+ "Item {\n"
+ " Component { id: comp; NW.SlowRect {} }\n"
+ " Loader { sourceComponent: comp } }")
+ , TEST_FILE(""));
+
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(item->QGraphicsObject::children().at(1));
+ QVERIFY(loader);
+ TRY_WAIT(loader->status() == QDeclarativeLoader::Ready);
+
+ QVERIFY(loader->item());
+ QCOMPARE(loader->progress(), 1.0);
+ QCOMPARE(loader->status(), QDeclarativeLoader::Ready);
+ QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 1);
+
+ delete loader;
+}
+*/
+
+void tst_QDeclarativeLoader::failNetworkRequest()
+{
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ server.serveDirectory(SRCDIR "/data");
+
+ QTest::ignoreMessage(QtWarningMsg, "(:-1: Network error for URL http://127.0.0.1:14445/IDontExist.qml) ");
+
+ QDeclarativeComponent component(&engine);
+ component.setData(QByteArray("import Qt 4.6\nLoader { source: \"http://127.0.0.1:14445/IDontExist.qml\" }"), TEST_FILE(""));
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
+ QVERIFY(loader != 0);
+
+ TRY_WAIT(loader->status() == QDeclarativeLoader::Error);
+
+ QVERIFY(loader->item() == 0);
+ QCOMPARE(loader->progress(), 0.0);
+ QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 0);
+
+ delete loader;
+}
+
+QTEST_MAIN(tst_QDeclarativeLoader)
+
+#include "tst_qdeclarativeloader.moc"
diff --git a/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro b/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro
new file mode 100644
index 0000000000..2f7ff824ec
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+SOURCES += tst_qdeclarativemetatype.cpp
+macx:CONFIG -= app_bundle
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp b/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp
new file mode 100644
index 0000000000..818f1089ec
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp
@@ -0,0 +1,378 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QLocale>
+#include <QPixmap>
+#include <QBitmap>
+#include <QPen>
+#include <QTextLength>
+#include <QMatrix4x4>
+#include <QVector2D>
+#include <QVector3D>
+#include <QVector4D>
+#include <QQuaternion>
+#include <qdeclarative.h>
+
+#include <private/qdeclarativemetatype_p.h>
+
+class tst_qdeclarativemetatype : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativemetatype() {}
+
+private slots:
+ void initTestCase();
+
+ void copy();
+
+ void qmlParserStatusCast();
+ void qmlPropertyValueSourceCast();
+ void qmlPropertyValueInterceptorCast();
+
+ void isList();
+
+ void defaultObject();
+};
+
+class TestType : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int foo READ foo);
+
+ Q_CLASSINFO("DefaultProperty", "foo");
+public:
+ int foo() { return 0; }
+};
+QML_DECLARE_TYPE(TestType);
+
+class ParserStatusTestType : public QObject, public QDeclarativeParserStatus
+{
+ Q_OBJECT
+ Q_CLASSINFO("DefaultProperty", "foo"); // Missing default property
+};
+QML_DECLARE_TYPE(ParserStatusTestType);
+
+class ValueSourceTestType : public QObject, public QDeclarativePropertyValueSource
+{
+ Q_OBJECT
+ Q_INTERFACES(QDeclarativePropertyValueSource)
+public:
+ virtual void setTarget(const QDeclarativeProperty &) {}
+};
+QML_DECLARE_TYPE(ValueSourceTestType);
+
+class ValueInterceptorTestType : public QObject, public QDeclarativePropertyValueInterceptor
+{
+ Q_OBJECT
+ Q_INTERFACES(QDeclarativePropertyValueInterceptor)
+public:
+ virtual void setTarget(const QDeclarativeProperty &) {}
+ virtual void write(const QVariant &) {}
+};
+QML_DECLARE_TYPE(ValueInterceptorTestType);
+
+
+#define COPY_TEST(cpptype, metatype, value, defaultvalue) \
+{ \
+ cpptype v = (value); cpptype v2 = (value); \
+ QVERIFY(QDeclarativeMetaType::copy(QMetaType:: metatype, &v, 0)); \
+ QVERIFY(v == (defaultvalue)); \
+ QVERIFY(QDeclarativeMetaType::copy(QMetaType:: metatype, &v, &v2)); \
+ QVERIFY(v == (value)); \
+}
+
+#define QT_COPY_TEST(type, value) \
+{ \
+ type v = (value); type v2 = (value); \
+ QVERIFY(QDeclarativeMetaType::copy(QMetaType:: type, &v, 0)); \
+ QVERIFY(v == (type ())); \
+ QVERIFY(QDeclarativeMetaType::copy(QMetaType:: type, &v, &v2)); \
+ QVERIFY(v == (value)); \
+}
+
+void tst_qdeclarativemetatype::initTestCase()
+{
+ QML_REGISTER_TYPE(Test, 1, 0, TestType, TestType);
+ QML_REGISTER_TYPE(Test, 1, 0, ParserStatusTestType, ParserStatusTestType);
+ QML_REGISTER_TYPE(Test, 1, 0, ValueSourceTestType, ValueSourceTestType);
+ QML_REGISTER_TYPE(Test, 1, 0, ValueInterceptorTestType, ValueInterceptorTestType);
+}
+
+void tst_qdeclarativemetatype::copy()
+{
+ QVERIFY(QDeclarativeMetaType::copy(QMetaType::Void, 0, 0));
+
+ COPY_TEST(bool, Bool, true, false);
+ COPY_TEST(int, Int, 10, 0);
+ COPY_TEST(unsigned int, UInt, 10, 0);
+ COPY_TEST(long long, LongLong, 10, 0);
+ COPY_TEST(unsigned long long, ULongLong, 10, 0);
+ COPY_TEST(double, Double, 19.2, 0);
+
+ QT_COPY_TEST(QChar, QChar('a'));
+
+ QVariantMap variantMap;
+ variantMap.insert("Hello World!", QVariant(10));
+ QT_COPY_TEST(QVariantMap, variantMap);
+
+ QT_COPY_TEST(QVariantList, QVariantList() << QVariant(19.2));
+ QT_COPY_TEST(QString, QString("QML Rocks!"));
+ QT_COPY_TEST(QStringList, QStringList() << "QML" << "Rocks");
+ QT_COPY_TEST(QByteArray, QByteArray("0x1102DDD"));
+ QT_COPY_TEST(QBitArray, QBitArray(102, true));
+ QDate cd = QDate::currentDate();
+ QT_COPY_TEST(QDate, cd);
+ QTime ct = QTime::currentTime();
+ QT_COPY_TEST(QTime, ct);
+ QDateTime cdt = QDateTime::currentDateTime();
+ QT_COPY_TEST(QDateTime, cdt);
+ QT_COPY_TEST(QUrl, QUrl("http://www.nokia.com"));
+ QT_COPY_TEST(QLocale, QLocale(QLocale::English, QLocale::Australia));
+ QT_COPY_TEST(QRect, QRect(-10, 10, 102, 99));
+ QT_COPY_TEST(QRectF, QRectF(-10.2, 1.2, 102, 99.6));
+ QT_COPY_TEST(QSize, QSize(100, 2));
+ QT_COPY_TEST(QSizeF, QSizeF(20.2, -100234.2));
+ QT_COPY_TEST(QLine, QLine(0, 0, 100, 100));
+ QT_COPY_TEST(QLineF, QLineF(-10.2, 0, 103, 1));
+ QT_COPY_TEST(QPoint, QPoint(-1912, 1613));
+ QT_COPY_TEST(QPointF, QPointF(-908.1, 1612));
+ QT_COPY_TEST(QRegExp, QRegExp("(\\d+)(?:\\s*)(cm|inch)"));
+
+ QVariantHash variantHash;
+ variantHash.insert("Hello World!", QVariant(19));
+ QT_COPY_TEST(QVariantHash, variantHash);
+
+#ifdef QT3_SUPPORT
+ QT_COPY_TEST(QColorGroup, QColorGroup(Qt::red, Qt::red, Qt::red, Qt::red, Qt::red, Qt::red, Qt::red));
+#endif
+
+ QT_COPY_TEST(QFont, QFont("Helvetica", 1024));
+
+ {
+ QPixmap v = QPixmap(100, 100); QPixmap v2 = QPixmap(100, 100);
+ QVERIFY(QDeclarativeMetaType::copy(QMetaType::QPixmap, &v, 0));
+ QVERIFY(v.size() == QPixmap().size());
+ QVERIFY(QDeclarativeMetaType::copy(QMetaType::QPixmap , &v, &v2));
+ QVERIFY(v.size() == QPixmap(100,100).size());
+ }
+
+ QT_COPY_TEST(QBrush, QBrush(Qt::blue));
+ QT_COPY_TEST(QColor, QColor("lightsteelblue"));
+ QT_COPY_TEST(QPalette, QPalette(Qt::green));
+
+ {
+ QPixmap icon(100, 100);
+
+ QIcon v = QIcon(icon); QIcon v2 = QIcon(icon);
+ QVERIFY(QDeclarativeMetaType::copy(QMetaType::QIcon, &v, 0));
+ QVERIFY(v.isNull() == QIcon().isNull());
+ QVERIFY(QDeclarativeMetaType::copy(QMetaType::QIcon , &v, &v2));
+ QVERIFY(v.isNull() == QIcon(icon).isNull());
+ }
+
+ {
+ QImage v = QImage(100, 100, QImage::Format_RGB32);
+ QImage v2 = QImage(100, 100, QImage::Format_RGB32);
+ QVERIFY(QDeclarativeMetaType::copy(QMetaType::QImage, &v, 0));
+ QVERIFY(v.size() == QImage().size());
+ QVERIFY(QDeclarativeMetaType::copy(QMetaType::QImage , &v, &v2));
+ QVERIFY(v.size() == QImage(100,100, QImage::Format_RGB32).size());
+ }
+
+ QT_COPY_TEST(QPolygon, QPolygon(QRect(100, 100, 200, 103)));
+ QT_COPY_TEST(QRegion, QRegion(QRect(0, 10, 99, 87)));
+
+ {
+ QBitmap v = QBitmap(100, 100); QBitmap v2 = QBitmap(100, 100);
+ QVERIFY(QDeclarativeMetaType::copy(QMetaType::QBitmap, &v, 0));
+ QVERIFY(v.size() == QBitmap().size());
+ QVERIFY(QDeclarativeMetaType::copy(QMetaType::QBitmap , &v, &v2));
+ QVERIFY(v.size() == QBitmap(100,100).size());
+ }
+
+ {
+ QCursor v = QCursor(Qt::SizeFDiagCursor); QCursor v2 = QCursor(Qt::SizeFDiagCursor);
+ QVERIFY(QDeclarativeMetaType::copy(QMetaType::QCursor, &v, 0));
+ QVERIFY(v.shape() == QCursor().shape());
+ QVERIFY(QDeclarativeMetaType::copy(QMetaType::QCursor , &v, &v2));
+ QVERIFY(v.shape() == QCursor(Qt::SizeFDiagCursor).shape());
+ }
+
+ QT_COPY_TEST(QSizePolicy, QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Maximum));
+ QT_COPY_TEST(QKeySequence, QKeySequence("Ctrl+O"));
+ QT_COPY_TEST(QPen, QPen(Qt::red));
+ QT_COPY_TEST(QTextLength, QTextLength(QTextLength::FixedLength, 10.2));
+ QT_COPY_TEST(QTextFormat, QTextFormat(QTextFormat::ListFormat));
+ QT_COPY_TEST(QMatrix, QMatrix().translate(10, 10));
+ QT_COPY_TEST(QTransform, QTransform().translate(10, 10));
+ QT_COPY_TEST(QMatrix4x4, QMatrix4x4(1,0,2,3,0,1,0,0,9,0,1,0,0,0,10,1));
+ QT_COPY_TEST(QVector2D, QVector2D(10.2, 1));
+ QT_COPY_TEST(QVector3D, QVector3D(10.2, 1, -2));
+ QT_COPY_TEST(QVector4D, QVector4D(10.2, 1, -2, 1.2));
+ QT_COPY_TEST(QQuaternion, QQuaternion(1.0, 10.2, 1, -2));
+
+ int voidValue;
+ COPY_TEST(void *, VoidStar, (void *)&voidValue, (void *)0);
+ COPY_TEST(long, Long, 10, 0);
+ COPY_TEST(short, Short, 10, 0);
+ COPY_TEST(char, Char, 'a', 0);
+ COPY_TEST(unsigned long, ULong, 10, 0);
+ COPY_TEST(unsigned short, UShort, 10, 0);
+ COPY_TEST(unsigned char, UChar, 'a', 0);
+ COPY_TEST(float, Float, 10.5, 0);
+
+ QObject objectValue;
+ QWidget widgetValue;
+ COPY_TEST(QObject *, QObjectStar, &objectValue, 0);
+ COPY_TEST(QWidget *, QWidgetStar, &widgetValue, 0);
+ COPY_TEST(qreal, QReal, 10.2, 0);
+
+ {
+ QVariant tv = QVariant::fromValue(QVariant(10));
+ QVariant v(tv); QVariant v2(tv);
+ QVERIFY(QDeclarativeMetaType::copy(qMetaTypeId<QVariant>(), &v, 0));
+ QVERIFY(v == QVariant());
+ QVERIFY(QDeclarativeMetaType::copy(qMetaTypeId<QVariant>(), &v, &v2));
+ QVERIFY(v == tv);
+ }
+
+ {
+ TestType t; QVariant tv = QVariant::fromValue(&t);
+
+ QVariant v(tv); QVariant v2(tv);
+ QVERIFY(QDeclarativeMetaType::copy(qMetaTypeId<TestType *>(), &v, 0));
+ QVERIFY(v == QVariant::fromValue((TestType *)0));
+ QVERIFY(QDeclarativeMetaType::copy(qMetaTypeId<TestType *>(), &v, &v2));
+ QVERIFY(v == tv);
+ }
+}
+
+void tst_qdeclarativemetatype::qmlParserStatusCast()
+{
+ QVERIFY(QDeclarativeMetaType::qmlType(QVariant::Int) == 0);
+ QVERIFY(QDeclarativeMetaType::qmlType(qMetaTypeId<TestType *>()) != 0);
+ QCOMPARE(QDeclarativeMetaType::qmlType(qMetaTypeId<TestType *>())->parserStatusCast(), -1);
+ QVERIFY(QDeclarativeMetaType::qmlType(qMetaTypeId<ValueSourceTestType *>()) != 0);
+ QCOMPARE(QDeclarativeMetaType::qmlType(qMetaTypeId<ValueSourceTestType *>())->parserStatusCast(), -1);
+
+ QVERIFY(QDeclarativeMetaType::qmlType(qMetaTypeId<ParserStatusTestType *>()) != 0);
+ int cast = QDeclarativeMetaType::qmlType(qMetaTypeId<ParserStatusTestType *>())->parserStatusCast();
+ QVERIFY(cast != -1);
+ QVERIFY(cast != 0);
+
+ ParserStatusTestType t;
+ QVERIFY(reinterpret_cast<char *>((QObject *)&t) != reinterpret_cast<char *>((QDeclarativeParserStatus *)&t));
+
+ QDeclarativeParserStatus *status = reinterpret_cast<QDeclarativeParserStatus *>(reinterpret_cast<char *>((QObject *)&t) + cast);
+ QCOMPARE(status, &t);
+}
+
+void tst_qdeclarativemetatype::qmlPropertyValueSourceCast()
+{
+ QVERIFY(QDeclarativeMetaType::qmlType(QVariant::Int) == 0);
+ QVERIFY(QDeclarativeMetaType::qmlType(qMetaTypeId<TestType *>()) != 0);
+ QCOMPARE(QDeclarativeMetaType::qmlType(qMetaTypeId<TestType *>())->propertyValueSourceCast(), -1);
+ QVERIFY(QDeclarativeMetaType::qmlType(qMetaTypeId<ParserStatusTestType *>()) != 0);
+ QCOMPARE(QDeclarativeMetaType::qmlType(qMetaTypeId<ParserStatusTestType *>())->propertyValueSourceCast(), -1);
+
+ QVERIFY(QDeclarativeMetaType::qmlType(qMetaTypeId<ValueSourceTestType *>()) != 0);
+ int cast = QDeclarativeMetaType::qmlType(qMetaTypeId<ValueSourceTestType *>())->propertyValueSourceCast();
+ QVERIFY(cast != -1);
+ QVERIFY(cast != 0);
+
+ ValueSourceTestType t;
+ QVERIFY(reinterpret_cast<char *>((QObject *)&t) != reinterpret_cast<char *>((QDeclarativePropertyValueSource *)&t));
+
+ QDeclarativePropertyValueSource *source = reinterpret_cast<QDeclarativePropertyValueSource *>(reinterpret_cast<char *>((QObject *)&t) + cast);
+ QCOMPARE(source, &t);
+}
+
+void tst_qdeclarativemetatype::qmlPropertyValueInterceptorCast()
+{
+ QVERIFY(QDeclarativeMetaType::qmlType(QVariant::Int) == 0);
+ QVERIFY(QDeclarativeMetaType::qmlType(qMetaTypeId<TestType *>()) != 0);
+ QCOMPARE(QDeclarativeMetaType::qmlType(qMetaTypeId<TestType *>())->propertyValueInterceptorCast(), -1);
+ QVERIFY(QDeclarativeMetaType::qmlType(qMetaTypeId<ParserStatusTestType *>()) != 0);
+ QCOMPARE(QDeclarativeMetaType::qmlType(qMetaTypeId<ParserStatusTestType *>())->propertyValueInterceptorCast(), -1);
+
+ QVERIFY(QDeclarativeMetaType::qmlType(qMetaTypeId<ValueInterceptorTestType *>()) != 0);
+ int cast = QDeclarativeMetaType::qmlType(qMetaTypeId<ValueInterceptorTestType *>())->propertyValueInterceptorCast();
+ QVERIFY(cast != -1);
+ QVERIFY(cast != 0);
+
+ ValueInterceptorTestType t;
+ QVERIFY(reinterpret_cast<char *>((QObject *)&t) != reinterpret_cast<char *>((QDeclarativePropertyValueInterceptor *)&t));
+
+ QDeclarativePropertyValueInterceptor *interceptor = reinterpret_cast<QDeclarativePropertyValueInterceptor *>(reinterpret_cast<char *>((QObject *)&t) + cast);
+ QCOMPARE(interceptor, &t);
+}
+
+void tst_qdeclarativemetatype::isList()
+{
+ QCOMPARE(QDeclarativeMetaType::isList(QVariant::Invalid), false);
+ QCOMPARE(QDeclarativeMetaType::isList(QVariant::Int), false);
+
+ QDeclarativeListProperty<TestType> list;
+
+ QCOMPARE(QDeclarativeMetaType::isList(qMetaTypeId<QDeclarativeListProperty<TestType> >()), true);
+}
+
+void tst_qdeclarativemetatype::defaultObject()
+{
+ QVERIFY(QDeclarativeMetaType::defaultProperty(&QObject::staticMetaObject).name() == 0);
+ QVERIFY(QDeclarativeMetaType::defaultProperty(&ParserStatusTestType::staticMetaObject).name() == 0);
+ QCOMPARE(QString(QDeclarativeMetaType::defaultProperty(&TestType::staticMetaObject).name()), QString("foo"));
+
+ QObject o;
+ TestType t;
+ ParserStatusTestType p;
+
+ QVERIFY(QDeclarativeMetaType::defaultProperty((QObject *)0).name() == 0);
+ QVERIFY(QDeclarativeMetaType::defaultProperty(&o).name() == 0);
+ QVERIFY(QDeclarativeMetaType::defaultProperty(&p).name() == 0);
+ QCOMPARE(QString(QDeclarativeMetaType::defaultProperty(&t).name()), QString("foo"));
+}
+
+QTEST_MAIN(tst_qdeclarativemetatype)
+
+#include "tst_qdeclarativemetatype.moc"
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/com/nokia/AutoTestQmlPluginType/qmldir b/tests/auto/declarative/qdeclarativemoduleplugin/com/nokia/AutoTestQmlPluginType/qmldir
new file mode 100644
index 0000000000..0a8b5d46eb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/com/nokia/AutoTestQmlPluginType/qmldir
@@ -0,0 +1 @@
+plugin plugin
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin.qml b/tests/auto/declarative/qdeclarativemoduleplugin/plugin.qml
new file mode 100644
index 0000000000..f29ae24ea2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/plugin.qml
@@ -0,0 +1,3 @@
+import com.nokia.AutoTestQmlPluginType 1.0
+
+MyPluginType { value: 123 }
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp
new file mode 100644
index 0000000000..fd94cc61ec
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QStringList>
+#include <QtDeclarative/qdeclarativeextensionplugin.h>
+#include <QtDeclarative/qdeclarative.h>
+#include <QDebug>
+
+class MyPluginType : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int value READ value WRITE setValue)
+
+public:
+ MyPluginType(QObject *parent=0) : QObject(parent)
+ {
+ qWarning("import worked");
+ }
+
+ int value() const { return v; }
+ void setValue(int i) { v = i; }
+
+private:
+ int v;
+};
+
+QML_DECLARE_TYPE(MyPluginType);
+
+
+class MyPlugin : public QDeclarativeExtensionPlugin
+{
+ Q_OBJECT
+public:
+ MyPlugin()
+ {
+ qWarning("plugin created");
+ }
+
+ void registerTypes(const char *uri)
+ {
+ Q_ASSERT(QLatin1String(uri) == "com.nokia.AutoTestQmlPluginType");
+ qmlRegisterType<MyPluginType>(uri, 1, 0, "MyPluginType");
+ }
+};
+
+#include "plugin.moc"
+
+Q_EXPORT_PLUGIN2(plugin, MyPlugin);
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro b/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro
new file mode 100644
index 0000000000..035cb7dcd8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro
@@ -0,0 +1,6 @@
+TEMPLATE = lib
+CONFIG += plugin
+SOURCES = plugin.cpp
+QT = core declarative
+DESTDIR = ../com/nokia/AutoTestQmlPluginType
+
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro b/tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro
new file mode 100644
index 0000000000..96f4454198
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro
@@ -0,0 +1,7 @@
+QT = core
+TEMPLATE = subdirs
+SUBDIRS = plugin
+tst_qdeclarativemoduleplugin_pro.depends += plugin
+SUBDIRS += tst_qdeclarativemoduleplugin.pro
+
+
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
new file mode 100644
index 0000000000..92f7aefa0b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <qdir.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QDebug>
+
+class tst_qdeclarativemoduleplugin : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativemoduleplugin() {
+ QCoreApplication::addLibraryPath(QLatin1String(SRCDIR) + QDir::separator() + QLatin1String("plugin"));
+ }
+
+private slots:
+ void importsPlugin();
+};
+
+#define VERIFY_ERRORS(errorfile) \
+ if (!errorfile) { \
+ if (qgetenv("DEBUG") != "" && !component.errors().isEmpty()) \
+ qWarning() << "Unexpected Errors:" << component.errors(); \
+ QVERIFY(!component.isError()); \
+ QVERIFY(component.errors().isEmpty()); \
+ } else { \
+ QFile file(QLatin1String("data/") + QLatin1String(errorfile)); \
+ QVERIFY(file.open(QIODevice::ReadOnly)); \
+ QByteArray data = file.readAll(); \
+ file.close(); \
+ QList<QByteArray> expected = data.split('\n'); \
+ expected.removeAll(QByteArray("")); \
+ QList<QDeclarativeError> errors = component.errors(); \
+ QList<QByteArray> actual; \
+ for (int ii = 0; ii < errors.count(); ++ii) { \
+ const QDeclarativeError &error = errors.at(ii); \
+ QByteArray errorStr = QByteArray::number(error.line()) + ":" + \
+ QByteArray::number(error.column()) + ":" + \
+ error.description().toUtf8(); \
+ actual << errorStr; \
+ } \
+ if (qgetenv("DEBUG") != "" && expected != actual) \
+ qWarning() << "Expected:" << expected << "Actual:" << actual; \
+ if (qgetenv("QDECLARATIVELANGUAGE_UPDATEERRORS") != "" && expected != actual) {\
+ QFile file(QLatin1String("data/") + QLatin1String(errorfile)); \
+ QVERIFY(file.open(QIODevice::WriteOnly)); \
+ for (int ii = 0; ii < actual.count(); ++ii) { \
+ file.write(actual.at(ii)); file.write("\n"); \
+ } \
+ file.close(); \
+ } else { \
+ QCOMPARE(expected, actual); \
+ } \
+ }
+
+inline QUrl TEST_FILE(const QString &filename)
+{
+ QFileInfo fileInfo(__FILE__);
+ return QUrl::fromLocalFile(fileInfo.absoluteDir().filePath(filename));
+}
+
+
+void tst_qdeclarativemoduleplugin::importsPlugin()
+{
+ QDeclarativeEngine engine;
+ QTest::ignoreMessage(QtWarningMsg, "plugin created");
+ QTest::ignoreMessage(QtWarningMsg, "import worked");
+ QDeclarativeComponent component(&engine, TEST_FILE("plugin.qml"));
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ QCOMPARE(object->property("value").toInt(),123);
+}
+
+QTEST_MAIN(tst_qdeclarativemoduleplugin)
+
+#include "tst_qdeclarativemoduleplugin.moc"
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro
new file mode 100644
index 0000000000..d895ed070c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro
@@ -0,0 +1,5 @@
+load(qttest_p4)
+SOURCES = tst_qdeclarativemoduleplugin.cpp
+QT += declarative
+CONFIG -= app_bundle
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativemousearea/data/dragproperties.qml b/tests/auto/declarative/qdeclarativemousearea/data/dragproperties.qml
new file mode 100644
index 0000000000..4cd78da4f2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemousearea/data/dragproperties.qml
@@ -0,0 +1,28 @@
+import Qt 4.6
+Rectangle {
+ id: whiteRect
+ width: 200
+ height: 200
+ color: "white"
+ Rectangle {
+ id: blackRect
+ objectName: "blackrect"
+ color: "black"
+ y: 50
+ x: 50
+ width: 100
+ height: 100
+ opacity: (whiteRect.width-blackRect.x+whiteRect.height-blackRect.y-199)/200
+ Text { text: blackRect.opacity}
+ MouseArea {
+ objectName: "mouseregion"
+ anchors.fill: parent
+ drag.target: blackRect
+ drag.axis: Drag.XandYAxis
+ drag.minimumX: 0
+ drag.maximumX: whiteRect.width-blackRect.width
+ drag.minimumY: 0
+ drag.maximumY: whiteRect.height-blackRect.height
+ }
+ }
+ }
diff --git a/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro b/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
new file mode 100644
index 0000000000..d01955be1d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
@@ -0,0 +1,9 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui network
+macx:CONFIG -= app_bundle
+
+HEADERS += ../shared/testhttpserver.h
+SOURCES += tst_qdeclarativemousearea.cpp ../shared/testhttpserver.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
new file mode 100644
index 0000000000..769cf32d3e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QtTest/QSignalSpy>
+#include <private/qdeclarativemousearea_p.h>
+#include <QtDeclarative/qdeclarativeview.h>
+
+class tst_QDeclarativeMouseArea: public QObject
+{
+ Q_OBJECT
+private slots:
+ void dragProperties();
+private:
+ QDeclarativeView *createView(const QString &filename);
+};
+
+void tst_QDeclarativeMouseArea::dragProperties()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/dragproperties.qml");
+ canvas->show();
+ canvas->setFocus();
+ QVERIFY(canvas->rootObject() != 0);
+
+ QDeclarativeMouseArea *mouseRegion = canvas->rootObject()->findChild<QDeclarativeMouseArea*>("mouseregion");
+ QDeclarativeDrag *drag = mouseRegion->drag();
+ QVERIFY(mouseRegion != 0);
+ QVERIFY(drag != 0);
+
+ // target
+ QDeclarativeItem *blackRect = canvas->rootObject()->findChild<QDeclarativeItem*>("blackrect");
+ QVERIFY(blackRect != 0);
+ QVERIFY(blackRect == drag->target());
+ QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(canvas->rootObject());
+ QVERIFY(rootItem != 0);
+ QSignalSpy targetSpy(drag, SIGNAL(targetChanged()));
+ drag->setTarget(rootItem);
+ QCOMPARE(targetSpy.count(),1);
+ drag->setTarget(rootItem);
+ QCOMPARE(targetSpy.count(),1);
+
+ // axis
+ QCOMPARE(drag->axis(), QDeclarativeDrag::XandYAxis);
+ QSignalSpy axisSpy(drag, SIGNAL(axisChanged()));
+ drag->setAxis(QDeclarativeDrag::XAxis);
+ QCOMPARE(drag->axis(), QDeclarativeDrag::XAxis);
+ QCOMPARE(axisSpy.count(),1);
+ drag->setAxis(QDeclarativeDrag::XAxis);
+ QCOMPARE(axisSpy.count(),1);
+
+ // minimum and maximum properties
+ QSignalSpy xminSpy(drag, SIGNAL(minimumXChanged()));
+ QSignalSpy xmaxSpy(drag, SIGNAL(maximumXChanged()));
+ QSignalSpy yminSpy(drag, SIGNAL(minimumYChanged()));
+ QSignalSpy ymaxSpy(drag, SIGNAL(maximumYChanged()));
+
+ QCOMPARE(drag->xmin(), 0.0);
+ QCOMPARE(drag->xmax(), rootItem->width()-blackRect->width());
+ QCOMPARE(drag->ymin(), 0.0);
+ QCOMPARE(drag->ymax(), rootItem->height()-blackRect->height());
+
+ drag->setXmin(10);
+ drag->setXmax(10);
+ drag->setYmin(10);
+ drag->setYmax(10);
+
+ QCOMPARE(drag->xmin(), 10.0);
+ QCOMPARE(drag->xmax(), 10.0);
+ QCOMPARE(drag->ymin(), 10.0);
+ QCOMPARE(drag->ymax(), 10.0);
+
+ QCOMPARE(xminSpy.count(),1);
+ QCOMPARE(xmaxSpy.count(),1);
+ QCOMPARE(yminSpy.count(),1);
+ QCOMPARE(ymaxSpy.count(),1);
+
+ drag->setXmin(10);
+ drag->setXmax(10);
+ drag->setYmin(10);
+ drag->setYmax(10);
+
+ QCOMPARE(xminSpy.count(),1);
+ QCOMPARE(xmaxSpy.count(),1);
+ QCOMPARE(yminSpy.count(),1);
+ QCOMPARE(ymaxSpy.count(),1);
+}
+
+QDeclarativeView *tst_QDeclarativeMouseArea::createView(const QString &filename)
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setFixedSize(240,320);
+
+ canvas->setSource(QUrl::fromLocalFile(filename));
+
+ return canvas;
+}
+
+QTEST_MAIN(tst_QDeclarativeMouseArea)
+
+#include "tst_qdeclarativemousearea.moc"
diff --git a/tests/auto/declarative/qdeclarativeparticles/data/particle.png b/tests/auto/declarative/qdeclarativeparticles/data/particle.png
new file mode 100644
index 0000000000..defbde53ca
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeparticles/data/particle.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativeparticles/data/particlemotion.qml b/tests/auto/declarative/qdeclarativeparticles/data/particlemotion.qml
new file mode 100644
index 0000000000..ace61fe07b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeparticles/data/particlemotion.qml
@@ -0,0 +1,33 @@
+import Qt 4.6
+Rectangle {
+ width: 240
+ height: 320
+ color: "black"
+ Particles {
+ objectName: "particles"
+ anchors.fill: parent
+ width: 1
+ height: 1
+ source: "particle.png"
+ lifeSpan: 5000
+ count: 200
+ angle: 270
+ angleDeviation: 45
+ velocity: 50
+ velocityDeviation: 30
+ ParticleMotionGravity {
+ objectName: "motionGravity"
+ yattractor: 1000
+ xattractor: 0
+ acceleration: 25
+ }
+ }
+ resources: [
+ ParticleMotionWander {
+ objectName: "motionWander"
+ xvariance: 30
+ yvariance: 30
+ pace: 100
+ }
+ ]
+} \ No newline at end of file
diff --git a/tests/auto/declarative/qdeclarativeparticles/data/particles.qml b/tests/auto/declarative/qdeclarativeparticles/data/particles.qml
new file mode 100644
index 0000000000..0d426451fd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeparticles/data/particles.qml
@@ -0,0 +1,15 @@
+import Qt 4.6
+Rectangle{
+ width: 100
+ height: 100
+ color: "black"
+ objectName: "rect"
+ Particles { id: particles
+ objectName: "particles"
+ width:1; height:1; anchors.centerIn: parent; opacity: 1
+ lifeSpan: 100; lifeSpanDeviation: 20; count:1000;
+ fadeInDuration: 20; fadeOutDuration: 20; emissionRate: 1000
+ angle: 0; angleDeviation: 360; velocity: 500; velocityDeviation:30
+ source: "particle.png"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro b/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
new file mode 100644
index 0000000000..043bb85408
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativeparticles.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeparticles/tst_qdeclarativeparticles.cpp b/tests/auto/declarative/qdeclarativeparticles/tst_qdeclarativeparticles.cpp
new file mode 100644
index 0000000000..6090a07b8d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeparticles/tst_qdeclarativeparticles.cpp
@@ -0,0 +1,209 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QtTest/QtTest>
+#include <QtTest/QSignalSpy>
+#include <qdeclarativeview.h>
+#include <private/qdeclarativeparticles_p.h>
+
+class tst_QDeclarativeParticles : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QDeclarativeParticles();
+
+private slots:
+ void properties();
+ void motionGravity();
+ void motionWander();
+ void runs();
+private:
+ QDeclarativeView *createView(const QString &filename);
+
+};
+
+tst_QDeclarativeParticles::tst_QDeclarativeParticles()
+{
+}
+
+void tst_QDeclarativeParticles::properties()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/particles.qml");
+ QVERIFY(canvas->rootObject());
+ QDeclarativeParticles* particles = canvas->rootObject()->findChild<QDeclarativeParticles*>("particles");
+ QVERIFY(particles);
+
+ particles->setSource(QUrl::fromLocalFile(SRCDIR "/data/particle.png"));
+ QCOMPARE(particles->source(), QUrl::fromLocalFile(SRCDIR "/data/particle.png"));
+
+ particles->setLifeSpanDeviation(1000);
+ QCOMPARE(particles->lifeSpanDeviation(), 1000);
+
+ particles->setFadeInDuration(1000);
+ QCOMPARE(particles->fadeInDuration(), 1000);
+
+ particles->setFadeOutDuration(1000);
+ QCOMPARE(particles->fadeOutDuration(), 1000);
+
+ particles->setAngle(100.0);
+ QCOMPARE(particles->angle(), 100.0);
+
+ particles->setAngleDeviation(100.0);
+ QCOMPARE(particles->angleDeviation(), 100.0);
+
+ particles->setVelocity(100.0);
+ QCOMPARE(particles->velocity(), 100.0);
+
+ particles->setVelocityDeviation(100.0);
+ QCOMPARE(particles->velocityDeviation(), 100.0);
+
+ particles->setEmissionVariance(0.5);
+ QCOMPARE(particles->emissionVariance(),0.5);
+
+ particles->setEmissionRate(12);
+ QCOMPARE(particles->emissionRate(), 12);
+}
+
+void tst_QDeclarativeParticles::motionGravity()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/particlemotion.qml");
+ QVERIFY(canvas->rootObject());
+ QDeclarativeParticles* particles = canvas->rootObject()->findChild<QDeclarativeParticles*>("particles");
+ QVERIFY(particles);
+
+ QDeclarativeParticleMotionGravity* motionGravity = canvas->rootObject()->findChild<QDeclarativeParticleMotionGravity*>("motionGravity");
+ QCOMPARE(particles->motion(), motionGravity);
+
+ QSignalSpy xattractorSpy(motionGravity, SIGNAL(xattractorChanged()));
+ QSignalSpy yattractorSpy(motionGravity, SIGNAL(yattractorChanged()));
+ QSignalSpy accelerationSpy(motionGravity, SIGNAL(accelerationChanged()));
+
+ QCOMPARE(motionGravity->xAttractor(), 0.0);
+ QCOMPARE(motionGravity->yAttractor(), 1000.0);
+ QCOMPARE(motionGravity->acceleration(), 25.0);
+
+ motionGravity->setXAttractor(20.0);
+ motionGravity->setYAttractor(10.0);
+ motionGravity->setAcceleration(10.0);
+
+ QCOMPARE(motionGravity->xAttractor(), 20.0);
+ QCOMPARE(motionGravity->yAttractor(), 10.0);
+ QCOMPARE(motionGravity->acceleration(), 10.0);
+
+ QCOMPARE(xattractorSpy.count(), 1);
+ QCOMPARE(yattractorSpy.count(), 1);
+ QCOMPARE(accelerationSpy.count(), 1);
+
+ motionGravity->setXAttractor(20.0);
+ motionGravity->setYAttractor(10.0);
+ motionGravity->setAcceleration(10.0);
+
+ QCOMPARE(xattractorSpy.count(), 1);
+ QCOMPARE(yattractorSpy.count(), 1);
+ QCOMPARE(accelerationSpy.count(), 1);
+}
+
+void tst_QDeclarativeParticles::motionWander()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/particlemotion.qml");
+ QVERIFY(canvas->rootObject());
+ QDeclarativeParticles* particles = canvas->rootObject()->findChild<QDeclarativeParticles*>("particles");
+ QVERIFY(particles);
+
+ QSignalSpy motionSpy(particles, SIGNAL(motionChanged()));
+ QDeclarativeParticleMotionWander* motionWander = canvas->rootObject()->findChild<QDeclarativeParticleMotionWander*>("motionWander");
+
+ particles->setMotion(motionWander);
+ QCOMPARE(particles->motion(),motionWander);
+ QCOMPARE(motionSpy.count(), 1);
+
+ particles->setMotion(motionWander);
+ QCOMPARE(motionSpy.count(), 1);
+
+ QSignalSpy xvarianceSpy(motionWander, SIGNAL(xvarianceChanged()));
+ QSignalSpy yvarianceSpy(motionWander, SIGNAL(yvarianceChanged()));
+ QSignalSpy paceSpy(motionWander, SIGNAL(paceChanged()));
+
+ QCOMPARE(motionWander->xVariance(), 30.0);
+ QCOMPARE(motionWander->yVariance(), 30.0);
+ QCOMPARE(motionWander->pace(), 100.0);
+
+ motionWander->setXVariance(20.0);
+ motionWander->setYVariance(10.0);
+ motionWander->setPace(10.0);
+
+ QCOMPARE(motionWander->xVariance(), 20.0);
+ QCOMPARE(motionWander->yVariance(), 10.0);
+ QCOMPARE(motionWander->pace(), 10.0);
+
+ QCOMPARE(xvarianceSpy.count(), 1);
+ QCOMPARE(yvarianceSpy.count(), 1);
+ QCOMPARE(paceSpy.count(), 1);
+
+ motionWander->setXVariance(20.0);
+ motionWander->setYVariance(10.0);
+ motionWander->setPace(10.0);
+
+ QCOMPARE(xvarianceSpy.count(), 1);
+ QCOMPARE(yvarianceSpy.count(), 1);
+ QCOMPARE(paceSpy.count(), 1);
+}
+
+void tst_QDeclarativeParticles::runs()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/particles.qml");
+ QVERIFY(canvas->rootObject());
+ QDeclarativeParticles* particles = canvas->rootObject()->findChild<QDeclarativeParticles*>("particles");
+ QVERIFY(particles);
+ QTest::qWait(1000);//Run for one second. Test passes if it doesn't crash.
+}
+
+QDeclarativeView *tst_QDeclarativeParticles::createView(const QString &filename)
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setFixedSize(240,320);
+
+ canvas->setSource(QUrl::fromLocalFile(filename));
+
+ return canvas;
+}
+QTEST_MAIN(tst_QDeclarativeParticles)
+
+#include "tst_qdeclarativeparticles.moc"
diff --git a/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml b/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml
new file mode 100644
index 0000000000..8d07db2a53
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml
@@ -0,0 +1,36 @@
+import Qt 4.6
+
+PathView {
+ id: pathview
+ objectName: "pathview"
+ width: 240; height: 320
+ pathItemCount: testObject.pathItemCount
+
+ function checkProperties() {
+ testObject.error = false;
+ if (testObject.useModel && pathview.model != testData) {
+ console.log("model property incorrect");
+ testObject.error = true;
+ }
+ }
+
+ model: testObject.useModel ? testData : 0
+
+ delegate: Component {
+ id: myDelegate
+ Rectangle {
+ id: wrapper
+ objectName: "wrapper"
+ width: 20; height: 20; color: name
+ Text {
+ objectName: "myText"
+ text: name
+ }
+ }
+ }
+
+ path: Path {
+ startX: 120; startY: 20;
+ PathLine { x: 120; y: 300 }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepathview/data/displaypath.qml b/tests/auto/declarative/qdeclarativepathview/data/displaypath.qml
new file mode 100644
index 0000000000..ab1538bf77
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepathview/data/displaypath.qml
@@ -0,0 +1,60 @@
+import Qt 4.6
+
+Rectangle {
+ width: 240
+ height: 320
+ color: "#ffffff"
+ resources: [
+ Component {
+ id: delegate
+ Rectangle {
+ id: wrapper
+ objectName: "wrapper"
+ height: 20
+ width: 60
+ color: "white"
+ border.color: "black"
+ Text {
+ text: index
+ }
+ Text {
+ x: 20
+ id: displayText
+ objectName: "displayText"
+ text: display
+ }
+ }
+ }
+ ]
+ PathView {
+ id: view
+ objectName: "view"
+ width: 240
+ height: 320
+ model: testModel
+ delegate: delegate
+ snapPosition: 0.0001
+ path: Path {
+ startY: 120
+ startX: 160
+ PathQuad {
+ y: 120
+ x: 80
+ controlY: 330
+ controlX: 100
+ }
+ PathLine {
+ y: 160
+ x: 20
+ }
+ PathCubic {
+ y: 120
+ x: 160
+ control1Y: 0
+ control1X: 100
+ control2Y: 000
+ control2X: 200
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepathview/data/path.qml b/tests/auto/declarative/qdeclarativepathview/data/path.qml
new file mode 100644
index 0000000000..7e82a4814c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepathview/data/path.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+Path {
+ startX: 120; startY: 100
+
+ PathAttribute { name: "scale"; value: 1.0 }
+ PathQuad { x: 120; y: 25; controlX: 260; controlY: 75 }
+ PathPercent { value: 0.3 }
+ PathLine { x: 120; y: 100 }
+ PathCubic {
+ x: 180; y: 0; control1X: -10; control1Y: 90
+ control2X: 210; control2Y: 90
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview.qml
new file mode 100644
index 0000000000..ae0c86aed5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepathview/data/pathview.qml
@@ -0,0 +1,75 @@
+import Qt 4.6
+
+Rectangle {
+ id: root
+ property int currentA: -1
+ property int currentB: -1
+ width: 240
+ height: 320
+ color: "#ffffff"
+ resources: [
+ Component {
+ id: delegate
+ Rectangle {
+ id: wrapper
+ objectName: "wrapper"
+ height: 20
+ width: 60
+ color: PathView.isCurrentItem ? "lightsteelblue" : "white"
+ border.color: "black"
+ Text {
+ text: index
+ }
+ Text {
+ x: 20
+ id: textName
+ objectName: "textName"
+ text: name
+ }
+ Text {
+ x: 40
+ id: textNumber
+ objectName: "textNumber"
+ text: number
+ }
+ PathView.onCurrentItemChanged: {
+ if (PathView.isCurrentItem) {
+ root.currentA = index;
+ root.currentB = wrapper.PathView.view.currentIndex;
+ }
+ }
+ }
+ }
+ ]
+ PathView {
+ id: view
+ objectName: "view"
+ width: 240
+ height: 320
+ model: testModel
+ delegate: delegate
+ snapPosition: 0.0001
+ path: Path {
+ startY: 120
+ startX: 160
+ PathQuad {
+ y: 120
+ x: 80
+ controlY: 330
+ controlX: 100
+ }
+ PathLine {
+ y: 160
+ x: 20
+ }
+ PathCubic {
+ y: 120
+ x: 160
+ control1Y: 0
+ control1X: 100
+ control2Y: 000
+ control2X: 200
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview1.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview1.qml
new file mode 100644
index 0000000000..b3b0a9ae43
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepathview/data/pathview1.qml
@@ -0,0 +1,4 @@
+import Qt 4.6
+
+PathView {
+}
diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview2.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview2.qml
new file mode 100644
index 0000000000..c825292f28
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepathview/data/pathview2.qml
@@ -0,0 +1,57 @@
+import Qt 4.6
+
+PathView {
+ id: photoPathView
+ y: 100; width: 800; height: 330; pathItemCount: 10; z: 1
+
+ path: Path {
+ startX: -50; startY: 40;
+
+ PathAttribute { name: "scale"; value: 0.5 }
+ PathAttribute { name: "angle"; value: -45 }
+
+ PathCubic {
+ x: 400; y: 220
+ control1X: 140; control1Y: 40
+ control2X: 210; control2Y: 220
+ }
+
+ PathAttribute { name: "scale"; value: 1.2 }
+ PathAttribute { name: "angle"; value: 0 }
+
+ PathCubic {
+ x: 850; y: 40
+ control2X: 660; control2Y: 40
+ control1X: 590; control1Y: 220
+ }
+
+ PathAttribute { name: "scale"; value: 0.5 }
+ PathAttribute { name: "angle"; value: 45 }
+ }
+
+ model: ListModel {
+ id: rssModel
+ ListElement { lColor: "red" }
+ ListElement { lColor: "green" }
+ ListElement { lColor: "yellow" }
+ ListElement { lColor: "blue" }
+ ListElement { lColor: "purple" }
+ ListElement { lColor: "gray" }
+ ListElement { lColor: "brown" }
+ ListElement { lColor: "thistle" }
+ }
+
+ delegate: Component {
+ id: photoDelegate
+ Rectangle {
+ id: wrapper
+ width: 85; height: 85; color: lColor
+ scale: wrapper.PathView.scale
+
+ transform: Rotation {
+ id: itemRotation; origin.x: wrapper.width/2; origin.y: wrapper.height/2
+ axis.y: 1; axis.z: 0; angle: wrapper.PathView.angle
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml
new file mode 100644
index 0000000000..f8ed29fe3d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml
@@ -0,0 +1,57 @@
+import Qt 4.6
+
+PathView {
+ id: photoPathView
+ y: 100; width: 800; height: 330; pathItemCount: 4; offset: 10
+ dragMargin: 24; snapPosition: 0.50
+
+ path: Path {
+ startX: -50; startY: 40;
+
+ PathAttribute { name: "scale"; value: 0.5 }
+ PathAttribute { name: "angle"; value: -45 }
+
+ PathCubic {
+ x: 400; y: 220
+ control1X: 140; control1Y: 40
+ control2X: 210; control2Y: 220
+ }
+
+ PathAttribute { name: "scale"; value: 1.2 }
+ PathAttribute { name: "angle"; value: 0 }
+
+ PathCubic {
+ x: 850; y: 40
+ control2X: 660; control2Y: 40
+ control1X: 590; control1Y: 220
+ }
+
+ PathAttribute { name: "scale"; value: 0.5 }
+ PathAttribute { name: "angle"; value: 45 }
+ }
+
+ model: ListModel {
+ id: rssModel
+ ListElement { lColor: "red" }
+ ListElement { lColor: "green" }
+ ListElement { lColor: "yellow" }
+ ListElement { lColor: "blue" }
+ ListElement { lColor: "purple" }
+ ListElement { lColor: "gray" }
+ ListElement { lColor: "brown" }
+ ListElement { lColor: "thistle" }
+ }
+
+ delegate: Component {
+ id: photoDelegate
+ Rectangle {
+ id: wrapper
+ width: 85; height: 85; color: lColor
+
+ transform: Rotation {
+ id: itemRotation; origin.x: wrapper.width/2; origin.y: wrapper.height/2
+ axis.y: 1; axis.z: 0
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml b/tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml
new file mode 100644
index 0000000000..db70b7bbaf
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml
@@ -0,0 +1,115 @@
+import Qt 4.6
+
+Rectangle {
+ width: 350; height: 220; color: "white"
+ Component {
+ id: myDelegate
+ Item {
+ id: wrapper
+ width: 180; height: 40;
+ opacity: PathView.opacity
+ Column {
+ x: 5; y: 5
+ Text { text: '<b>Name:</b> ' + name }
+ Text { text: '<b>Number:</b> ' + number }
+ }
+ }
+ }
+
+ PathView {
+ snapPosition: 0.1
+ dragMargin: 5.0
+ id: pathView
+ objectName: "pathView"
+ anchors.fill: parent
+ model: listModel
+ delegate: myDelegate
+ focus: true
+ path: Path {
+ id: myPath
+ objectName: "path"
+ startX: 220; startY: 200
+ PathAttribute { name: "opacity"; value: 1.0; objectName: "pathAttribute"; }
+ PathQuad { x: 220; y: 25; controlX: 260; controlY: 75 }
+ PathAttribute { name: "opacity"; value: 0.3 }
+ PathQuad { x: 220; y: 200; controlX: -20; controlY: 75 }
+ }
+ Timer {
+ interval: 2000; running: true; repeat: true
+ onTriggered: {
+ if (pathView.path == alternatePath)
+ pathView.path = myPath;
+ else
+ pathView.path = alternatePath;
+ }
+ }
+ }
+
+ data:[
+ ListModel {
+ id: listModel
+ ListElement {
+ name: "Bill Smith"
+ number: "555 3264"
+ }
+ ListElement {
+ name: "John Brown"
+ number: "555 8426"
+ }
+ ListElement {
+ name: "Sam Wise"
+ number: "555 0473"
+ }
+ ListElement {
+ name: "Bill Smith"
+ number: "555 3264"
+ }
+ ListElement {
+ name: "John Brown"
+ number: "555 8426"
+ }
+ ListElement {
+ name: "Sam Wise"
+ number: "555 0473"
+ }
+ ListElement {
+ name: "Bill Smith"
+ number: "555 3264"
+ }
+ ListElement {
+ name: "John Brown"
+ number: "555 8426"
+ }
+ ListElement {
+ name: "Sam Wise"
+ number: "555 0473"
+ }
+ },
+ ListModel {
+ objectName: "alternateModel"
+ ListElement {
+ name: "Jack"
+ number: "555 8426"
+ }
+ ListElement {
+ name: "Mary"
+ number: "555 3264"
+ }
+ },
+ Path {
+ id: alternatePath
+ objectName: "alternatePath"
+ startX: 100; startY: 40
+ PathAttribute { name: "opacity"; value: 0.0 }
+ PathLine { x: 100; y: 160 }
+ PathAttribute { name: "opacity"; value: 0.2 }
+ PathLine { x: 300; y: 160 }
+ PathAttribute { name: "opacity"; value: 0.0 }
+ PathLine { x: 300; y: 40 }
+ PathAttribute { name: "opacity"; value: 0.2 }
+ PathLine { x: 100; y: 40 }
+ }
+ ]
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro b/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
new file mode 100644
index 0000000000..2f6ae3253d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativepathview.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
new file mode 100644
index 0000000000..62eb8c38dd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
@@ -0,0 +1,722 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QtDeclarative/qdeclarativeview.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativecontext.h>
+#include <QtDeclarative/qdeclarativeexpression.h>
+#include <QtDeclarative/private/qdeclarativepathview_p.h>
+#include <QtDeclarative/private/qdeclarativepath_p.h>
+#include <QtDeclarative/private/qdeclarativetext_p.h>
+#include <QtDeclarative/private/qdeclarativerectangle_p.h>
+#include <QtDeclarative/private/qdeclarativelistmodel_p.h>
+#include <QtDeclarative/private/qdeclarativevaluetype_p.h>
+#include <QAbstractListModel>
+#include <QStringListModel>
+#include <QFile>
+
+#include "../../../shared/util.h"
+
+class tst_QDeclarativePathView : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QDeclarativePathView();
+
+private slots:
+ void initValues();
+ void items();
+ void dataModel();
+ void pathview2();
+ void pathview3();
+ void path();
+ void pathMoved();
+ void setCurrentIndex();
+ void resetModel();
+ void propertyChanges();
+ void pathChanges();
+ void componentChanges();
+ void modelChanges();
+
+
+private:
+ QDeclarativeView *createView();
+ template<typename T>
+ T *findItem(QGraphicsObject *parent, const QString &objectName, int index=-1);
+ template<typename T>
+ QList<T*> findItems(QGraphicsObject *parent, const QString &objectName);
+};
+
+class TestObject : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(bool error READ error WRITE setError)
+ Q_PROPERTY(bool useModel READ useModel NOTIFY useModelChanged)
+ Q_PROPERTY(int pathItemCount READ pathItemCount NOTIFY pathItemCountChanged)
+
+public:
+ TestObject() : QObject(), mError(true), mUseModel(true), mPathItemCount(-1) {}
+
+ bool error() const { return mError; }
+ void setError(bool err) { mError = err; }
+
+ bool useModel() const { return mUseModel; }
+ void setUseModel(bool use) { mUseModel = use; emit useModelChanged(); }
+
+ int pathItemCount() const { return mPathItemCount; }
+ void setPathItemCount(int count) { mPathItemCount = count; emit pathItemCountChanged(); }
+
+signals:
+ void useModelChanged();
+ void pathItemCountChanged();
+
+private:
+ bool mError;
+ bool mUseModel;
+ int mPathItemCount;
+};
+
+class TestModel : public QAbstractListModel
+{
+public:
+ enum Roles { Name = Qt::UserRole+1, Number = Qt::UserRole+2 };
+
+ TestModel(QObject *parent=0) : QAbstractListModel(parent) {
+ QHash<int, QByteArray> roles;
+ roles[Name] = "name";
+ roles[Number] = "number";
+ setRoleNames(roles);
+ }
+
+ int rowCount(const QModelIndex &parent=QModelIndex()) const { Q_UNUSED(parent); return list.count(); }
+ QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const {
+ QVariant rv;
+ if (role == Name)
+ rv = list.at(index.row()).first;
+ else if (role == Number)
+ rv = list.at(index.row()).second;
+
+ return rv;
+ }
+
+ int count() const { return rowCount(); }
+ QString name(int index) const { return list.at(index).first; }
+ QString number(int index) const { return list.at(index).second; }
+
+ void addItem(const QString &name, const QString &number) {
+ emit beginInsertRows(QModelIndex(), list.count(), list.count());
+ list.append(QPair<QString,QString>(name, number));
+ emit endInsertRows();
+ }
+
+ void insertItem(int index, const QString &name, const QString &number) {
+ emit beginInsertRows(QModelIndex(), index, index);
+ list.insert(index, QPair<QString,QString>(name, number));
+ emit endInsertRows();
+ }
+
+ void removeItem(int index) {
+ emit beginRemoveRows(QModelIndex(), index, index);
+ list.removeAt(index);
+ emit endRemoveRows();
+ }
+
+ void moveItem(int from, int to) {
+ emit beginMoveRows(QModelIndex(), from, from, QModelIndex(), to);
+ list.move(from, to);
+ emit endMoveRows();
+ }
+
+ void modifyItem(int idx, const QString &name, const QString &number) {
+ list[idx] = QPair<QString,QString>(name, number);
+ emit dataChanged(index(idx,0), index(idx,0));
+ }
+
+private:
+ QList<QPair<QString,QString> > list;
+};
+
+
+tst_QDeclarativePathView::tst_QDeclarativePathView()
+{
+}
+
+void tst_QDeclarativePathView::initValues()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/pathview1.qml"));
+ QDeclarativePathView *obj = qobject_cast<QDeclarativePathView*>(c.create());
+
+ QVERIFY(obj != 0);
+ QVERIFY(obj->path() == 0);
+ QVERIFY(obj->delegate() == 0);
+ QCOMPARE(obj->model(), QVariant());
+ QCOMPARE(obj->currentIndex(), 0);
+ QCOMPARE(obj->offset(), 0.);
+ QCOMPARE(obj->snapPosition(), 0.);
+ QCOMPARE(obj->dragMargin(), 0.);
+ QCOMPARE(obj->count(), 0);
+ QCOMPARE(obj->pathItemCount(), -1);
+}
+
+void tst_QDeclarativePathView::items()
+{
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ model.addItem("Fred", "12345");
+ model.addItem("John", "2345");
+ model.addItem("Bob", "54321");
+ model.addItem("Bill", "4321");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pathview.qml"));
+ qApp->processEvents();
+
+ QDeclarativePathView *pathview = findItem<QDeclarativePathView>(canvas->rootObject(), "view");
+ QVERIFY(pathview != 0);
+
+ QCOMPARE(pathview->childItems().count(), model.count()); // assumes all are visible
+
+ for (int i = 0; i < model.count(); ++i) {
+ QDeclarativeText *name = findItem<QDeclarativeText>(pathview, "textName", i);
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), model.name(i));
+ QDeclarativeText *number = findItem<QDeclarativeText>(pathview, "textNumber", i);
+ QVERIFY(number != 0);
+ QCOMPARE(number->text(), model.number(i));
+ }
+
+ delete canvas;
+}
+
+void tst_QDeclarativePathView::pathview2()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/pathview2.qml"));
+ QDeclarativePathView *obj = qobject_cast<QDeclarativePathView*>(c.create());
+
+ QVERIFY(obj != 0);
+ QVERIFY(obj->path() != 0);
+ QVERIFY(obj->delegate() != 0);
+ QVERIFY(obj->model() != QVariant());
+ QCOMPARE(obj->currentIndex(), 0);
+ QCOMPARE(obj->offset(), 0.);
+ QCOMPARE(obj->snapPosition(), 0.);
+ QCOMPARE(obj->dragMargin(), 0.);
+ QCOMPARE(obj->count(), 8);
+ QCOMPARE(obj->pathItemCount(), 10);
+}
+
+void tst_QDeclarativePathView::pathview3()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/pathview3.qml"));
+ QDeclarativePathView *obj = qobject_cast<QDeclarativePathView*>(c.create());
+
+ QVERIFY(obj != 0);
+ QVERIFY(obj->path() != 0);
+ QVERIFY(obj->delegate() != 0);
+ QVERIFY(obj->model() != QVariant());
+ QCOMPARE(obj->currentIndex(), 0);
+ QCOMPARE(obj->offset(), 50.); // ???
+ QCOMPARE(obj->snapPosition(), 0.5); // ???
+ QCOMPARE(obj->dragMargin(), 24.);
+ QCOMPARE(obj->count(), 8);
+ QCOMPARE(obj->pathItemCount(), 4);
+}
+
+void tst_QDeclarativePathView::path()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/path.qml"));
+ QDeclarativePath *obj = qobject_cast<QDeclarativePath*>(c.create());
+
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->startX(), 120.);
+ QCOMPARE(obj->startY(), 100.);
+ QVERIFY(obj->path() != QPainterPath());
+
+ QDeclarativeListReference list(obj, "pathElements");
+ QCOMPARE(list.count(), 5);
+
+ QDeclarativePathAttribute* attr = qobject_cast<QDeclarativePathAttribute*>(list.at(0));
+ QVERIFY(attr != 0);
+ QCOMPARE(attr->name(), QString("scale"));
+ QCOMPARE(attr->value(), 1.0);
+
+ QDeclarativePathQuad* quad = qobject_cast<QDeclarativePathQuad*>(list.at(1));
+ QVERIFY(quad != 0);
+ QCOMPARE(quad->x(), 120.);
+ QCOMPARE(quad->y(), 25.);
+ QCOMPARE(quad->controlX(), 260.);
+ QCOMPARE(quad->controlY(), 75.);
+
+ QDeclarativePathPercent* perc = qobject_cast<QDeclarativePathPercent*>(list.at(2));
+ QVERIFY(perc != 0);
+ QCOMPARE(perc->value(), 0.3);
+
+ QDeclarativePathLine* line = qobject_cast<QDeclarativePathLine*>(list.at(3));
+ QVERIFY(line != 0);
+ QCOMPARE(line->x(), 120.);
+ QCOMPARE(line->y(), 100.);
+
+ QDeclarativePathCubic* cubic = qobject_cast<QDeclarativePathCubic*>(list.at(4));
+ QVERIFY(cubic != 0);
+ QCOMPARE(cubic->x(), 180.);
+ QCOMPARE(cubic->y(), 0.);
+ QCOMPARE(cubic->control1X(), -10.);
+ QCOMPARE(cubic->control1Y(), 90.);
+ QCOMPARE(cubic->control2X(), 210.);
+ QCOMPARE(cubic->control2Y(), 90.);
+}
+
+void tst_QDeclarativePathView::dataModel()
+{
+ QDeclarativeView *canvas = createView();
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ TestObject *testObject = new TestObject;
+ ctxt->setContextProperty("testObject", testObject);
+
+ TestModel model;
+ model.addItem("red", "1");
+ model.addItem("green", "2");
+ model.addItem("blue", "3");
+ model.addItem("purple", "4");
+ model.addItem("gray", "5");
+ model.addItem("brown", "6");
+ model.addItem("yellow", "7");
+ model.addItem("thistle", "8");
+ model.addItem("cyan", "9");
+
+ ctxt->setContextProperty("testData", &model);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/datamodel.qml"));
+ qApp->processEvents();
+
+ QDeclarativePathView *pathview = qobject_cast<QDeclarativePathView*>(canvas->rootObject());
+ QVERIFY(pathview != 0);
+
+ QMetaObject::invokeMethod(canvas->rootObject(), "checkProperties");
+ QVERIFY(testObject->error() == false);
+
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(pathview, "wrapper", 0);
+ QVERIFY(item);
+ QCOMPARE(item->x(), 110.0);
+ QCOMPARE(item->y(), 10.0);
+
+ model.insertItem(4, "orange", "10");
+
+ int itemCount = findItems<QDeclarativeItem>(pathview, "wrapper").count();
+ QCOMPARE(itemCount, 10);
+
+ QDeclarativeText *text = findItem<QDeclarativeText>(pathview, "myText", 4);
+ QVERIFY(text);
+ QCOMPARE(text->text(), model.name(4));
+
+ model.removeItem(2);
+ text = findItem<QDeclarativeText>(pathview, "myText", 2);
+ QVERIFY(text);
+ QCOMPARE(text->text(), model.name(2));
+
+ testObject->setPathItemCount(5);
+ QMetaObject::invokeMethod(canvas->rootObject(), "checkProperties");
+ QVERIFY(testObject->error() == false);
+
+ itemCount = findItems<QDeclarativeItem>(pathview, "wrapper").count();
+ QCOMPARE(itemCount, 5);
+
+ QDeclarativeRectangle *testItem = findItem<QDeclarativeRectangle>(pathview, "wrapper", 4);
+ QVERIFY(testItem != 0);
+ testItem = findItem<QDeclarativeRectangle>(pathview, "wrapper", 5);
+ QVERIFY(testItem == 0);
+
+ model.insertItem(2, "pink", "2");
+
+ itemCount = findItems<QDeclarativeItem>(pathview, "wrapper").count();
+ QCOMPARE(itemCount, 5);
+
+ text = findItem<QDeclarativeText>(pathview, "myText", 2);
+ QVERIFY(text);
+ QCOMPARE(text->text(), model.name(2));
+
+ model.removeItem(3);
+ itemCount = findItems<QDeclarativeItem>(pathview, "wrapper").count();
+ QCOMPARE(itemCount, 5);
+ text = findItem<QDeclarativeText>(pathview, "myText", 3);
+ QVERIFY(text);
+ QCOMPARE(text->text(), model.name(3));
+
+ delete canvas;
+}
+
+void tst_QDeclarativePathView::pathMoved()
+{
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ model.addItem("Ben", "12345");
+ model.addItem("Bohn", "2345");
+ model.addItem("Bob", "54321");
+ model.addItem("Bill", "4321");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pathview.qml"));
+ qApp->processEvents();
+
+ QDeclarativePathView *pathview = findItem<QDeclarativePathView>(canvas->rootObject(), "view");
+ QVERIFY(pathview != 0);
+
+ QDeclarativeRectangle *firstItem = findItem<QDeclarativeRectangle>(pathview, "wrapper", 0);
+ QVERIFY(firstItem);
+ QDeclarativePath *path = qobject_cast<QDeclarativePath*>(pathview->path());
+ QVERIFY(path);
+ QPointF start = path->pointAt(0.0);
+ QPointF offset;//Center of item is at point, but pos is from corner
+ offset.setX(firstItem->width()/2);
+ offset.setY(firstItem->height()/2);
+ QCOMPARE(firstItem->pos() + offset, start);
+ pathview->setOffset(10);
+
+ for(int i=0; i<model.count(); i++){
+ QDeclarativeRectangle *curItem = findItem<QDeclarativeRectangle>(pathview, "wrapper", i);
+ QCOMPARE(curItem->pos() + offset, path->pointAt(0.1 + i*0.25));
+ }
+
+ pathview->setOffset(100);
+ QCOMPARE(firstItem->pos() + offset, start);
+
+ delete canvas;
+}
+
+void tst_QDeclarativePathView::setCurrentIndex()
+{
+ QDeclarativeView *canvas = createView();
+
+ TestModel model;
+ model.addItem("Ben", "12345");
+ model.addItem("Bohn", "2345");
+ model.addItem("Bob", "54321");
+ model.addItem("Bill", "4321");
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pathview.qml"));
+ qApp->processEvents();
+
+ QDeclarativePathView *pathview = findItem<QDeclarativePathView>(canvas->rootObject(), "view");
+ QVERIFY(pathview != 0);
+
+ QDeclarativeRectangle *firstItem = findItem<QDeclarativeRectangle>(pathview, "wrapper", 0);
+ QVERIFY(firstItem);
+ QDeclarativePath *path = qobject_cast<QDeclarativePath*>(pathview->path());
+ QVERIFY(path);
+ QPointF start = path->pointAt(0.0);
+ QPointF offset;//Center of item is at point, but pos is from corner
+ offset.setX(firstItem->width()/2);
+ offset.setY(firstItem->height()/2);
+ QCOMPARE(firstItem->pos() + offset, start);
+ QCOMPARE(canvas->rootObject()->property("currentA").toInt(), 0);
+ QCOMPARE(canvas->rootObject()->property("currentB").toInt(), 0);
+
+ pathview->setCurrentIndex(2);
+ QTest::qWait(1000);
+
+ firstItem = findItem<QDeclarativeRectangle>(pathview, "wrapper", 2);
+ QCOMPARE(firstItem->pos() + offset, start);
+ QCOMPARE(canvas->rootObject()->property("currentA").toInt(), 2);
+ QCOMPARE(canvas->rootObject()->property("currentB").toInt(), 2);
+
+ delete canvas;
+}
+
+void tst_QDeclarativePathView::resetModel()
+{
+ QDeclarativeView *canvas = createView();
+
+ QStringList strings;
+ strings << "one" << "two" << "three";
+ QStringListModel model(strings);
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testModel", &model);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/displaypath.qml"));
+ qApp->processEvents();
+
+ QDeclarativePathView *pathview = findItem<QDeclarativePathView>(canvas->rootObject(), "view");
+ QVERIFY(pathview != 0);
+
+ QCOMPARE(pathview->count(), model.rowCount());
+
+ for (int i = 0; i < model.rowCount(); ++i) {
+ QDeclarativeText *display = findItem<QDeclarativeText>(pathview, "displayText", i);
+ QVERIFY(display != 0);
+ QCOMPARE(display->text(), strings.at(i));
+ }
+
+ strings.clear();
+ strings << "four" << "five" << "six" << "seven";
+ model.setStringList(strings);
+
+ QCOMPARE(pathview->count(), model.rowCount());
+
+ for (int i = 0; i < model.rowCount(); ++i) {
+ QDeclarativeText *display = findItem<QDeclarativeText>(pathview, "displayText", i);
+ QVERIFY(display != 0);
+ QCOMPARE(display->text(), strings.at(i));
+ }
+}
+
+void tst_QDeclarativePathView::propertyChanges()
+{
+ QDeclarativeView *canvas = createView();
+ QVERIFY(canvas);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
+
+ QDeclarativePathView *pathView = canvas->rootObject()->findChild<QDeclarativePathView*>("pathView");
+ QVERIFY(pathView);
+
+ QSignalSpy snapPositionSpy(pathView, SIGNAL(snapPositionChanged()));
+ QSignalSpy dragMarginSpy(pathView, SIGNAL(dragMarginChanged()));
+
+ QCOMPARE(pathView->snapPosition(), 0.1);
+ QCOMPARE(pathView->dragMargin(), 5.0);
+
+ pathView->setSnapPosition(0.4);
+ pathView->setDragMargin(20.0);
+
+ QCOMPARE(pathView->snapPosition(), 0.4);
+ QCOMPARE(pathView->dragMargin(), 20.0);
+
+ QCOMPARE(snapPositionSpy.count(), 1);
+ QCOMPARE(dragMarginSpy.count(), 1);
+
+ pathView->setSnapPosition(0.4);
+ pathView->setDragMargin(20.0);
+
+ QCOMPARE(snapPositionSpy.count(), 1);
+ QCOMPARE(dragMarginSpy.count(), 1);
+ delete canvas;
+}
+
+void tst_QDeclarativePathView::pathChanges()
+{
+ QDeclarativeView *canvas = createView();
+ QVERIFY(canvas);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
+
+ QDeclarativePathView *pathView = canvas->rootObject()->findChild<QDeclarativePathView*>("pathView");
+ QVERIFY(pathView);
+
+ QDeclarativePath *path = canvas->rootObject()->findChild<QDeclarativePath*>("path");
+ QVERIFY(path);
+
+ QSignalSpy startXSpy(path, SIGNAL(startXChanged()));
+ QSignalSpy startYSpy(path, SIGNAL(startYChanged()));
+
+ QCOMPARE(path->startX(), 220.0);
+ QCOMPARE(path->startY(), 200.0);
+
+ path->setStartX(240.0);
+ path->setStartY(220.0);
+
+ QCOMPARE(path->startX(), 240.0);
+ QCOMPARE(path->startY(), 220.0);
+
+ QCOMPARE(startXSpy.count(),1);
+ QCOMPARE(startYSpy.count(),1);
+
+ path->setStartX(240);
+ path->setStartY(220);
+
+ QCOMPARE(startXSpy.count(),1);
+ QCOMPARE(startYSpy.count(),1);
+
+ QDeclarativePath *alternatePath = canvas->rootObject()->findChild<QDeclarativePath*>("alternatePath");
+ QVERIFY(alternatePath);
+
+ QSignalSpy pathSpy(pathView, SIGNAL(pathChanged()));
+
+ QCOMPARE(pathView->path(), path);
+
+ pathView->setPath(alternatePath);
+ QCOMPARE(pathView->path(), alternatePath);
+ QCOMPARE(pathSpy.count(),1);
+
+ pathView->setPath(alternatePath);
+ QCOMPARE(pathSpy.count(),1);
+
+ QDeclarativePathAttribute *pathAttribute = canvas->rootObject()->findChild<QDeclarativePathAttribute*>("pathAttribute");
+ QVERIFY(pathAttribute);
+
+ QSignalSpy nameSpy(pathAttribute, SIGNAL(nameChanged()));
+ QCOMPARE(pathAttribute->name(), QString("opacity"));
+
+ pathAttribute->setName("scale");
+ QCOMPARE(pathAttribute->name(), QString("scale"));
+ QCOMPARE(nameSpy.count(),1);
+
+ pathAttribute->setName("scale");
+ QCOMPARE(nameSpy.count(),1);
+ delete canvas;
+}
+
+void tst_QDeclarativePathView::componentChanges()
+{
+ QDeclarativeView *canvas = createView();
+ QVERIFY(canvas);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
+
+ QDeclarativePathView *pathView = canvas->rootObject()->findChild<QDeclarativePathView*>("pathView");
+ QVERIFY(pathView);
+
+ QDeclarativeComponent delegateComponent(canvas->engine());
+ delegateComponent.setData("import Qt 4.6; Text { text: '<b>Name:</b> ' + name }", QUrl::fromLocalFile(""));
+
+ QSignalSpy delegateSpy(pathView, SIGNAL(delegateChanged()));
+
+ pathView->setDelegate(&delegateComponent);
+ QCOMPARE(pathView->delegate(), &delegateComponent);
+ QCOMPARE(delegateSpy.count(),1);
+
+ pathView->setDelegate(&delegateComponent);
+ QCOMPARE(delegateSpy.count(),1);
+ delete canvas;
+}
+
+void tst_QDeclarativePathView::modelChanges()
+{
+ QDeclarativeView *canvas = createView();
+ QVERIFY(canvas);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
+
+ QDeclarativePathView *pathView = canvas->rootObject()->findChild<QDeclarativePathView*>("pathView");
+ QVERIFY(pathView);
+
+ QDeclarativeListModel *alternateModel = canvas->rootObject()->findChild<QDeclarativeListModel*>("alternateModel");
+ QVERIFY(alternateModel);
+ QVariant modelVariant = QVariant::fromValue(alternateModel);
+ QSignalSpy modelSpy(pathView, SIGNAL(modelChanged()));
+
+ pathView->setModel(modelVariant);
+ QCOMPARE(pathView->model(), modelVariant);
+ QCOMPARE(modelSpy.count(),1);
+
+ pathView->setModel(modelVariant);
+ QCOMPARE(modelSpy.count(),1);
+
+ pathView->setModel(QVariant());
+ QCOMPARE(modelSpy.count(),2);
+
+ delete canvas;
+}
+
+QDeclarativeView *tst_QDeclarativePathView::createView()
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setFixedSize(240,320);
+
+ return canvas;
+}
+
+/*
+ Find an item with the specified objectName. If index is supplied then the
+ item must also evaluate the {index} expression equal to index
+ */
+template<typename T>
+T *tst_QDeclarativePathView::findItem(QGraphicsObject *parent, const QString &objectName, int index)
+{
+ const QMetaObject &mo = T::staticMetaObject;
+ //qDebug() << parent->childItems().count() << "children";
+ for (int i = 0; i < parent->childItems().count(); ++i) {
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(parent->childItems().at(i));
+ if(!item)
+ continue;
+ //qDebug() << "try" << item;
+ if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) {
+ if (index != -1) {
+ QDeclarativeExpression e(qmlContext(item), "index", item);
+ if (e.value().toInt() == index)
+ return static_cast<T*>(item);
+ } else {
+ return static_cast<T*>(item);
+ }
+ }
+ item = findItem<T>(item, objectName, index);
+ if (item)
+ return static_cast<T*>(item);
+ }
+
+ return 0;
+}
+
+template<typename T>
+QList<T*> tst_QDeclarativePathView::findItems(QGraphicsObject *parent, const QString &objectName)
+{
+ QList<T*> items;
+ const QMetaObject &mo = T::staticMetaObject;
+ //qDebug() << parent->QGraphicsObject::children().count() << "children";
+ for (int i = 0; i < parent->childItems().count(); ++i) {
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(parent->childItems().at(i));
+ if(!item)
+ continue;
+ //qDebug() << "try" << item;
+ if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName))
+ items.append(static_cast<T*>(item));
+ items += findItems<T>(item, objectName);
+ }
+
+ return items;
+}
+
+QTEST_MAIN(tst_QDeclarativePathView)
+
+#include "tst_qdeclarativepathview.moc"
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/data/exists.png b/tests/auto/declarative/qdeclarativepixmapcache/data/exists.png
new file mode 100644
index 0000000000..399bd0b1d9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepixmapcache/data/exists.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/data/exists1.png b/tests/auto/declarative/qdeclarativepixmapcache/data/exists1.png
new file mode 100644
index 0000000000..399bd0b1d9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepixmapcache/data/exists1.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/data/exists2.png b/tests/auto/declarative/qdeclarativepixmapcache/data/exists2.png
new file mode 100644
index 0000000000..399bd0b1d9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepixmapcache/data/exists2.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro b/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
new file mode 100644
index 0000000000..899c43fe52
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
@@ -0,0 +1,9 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+QT += network
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativepixmapcache.cpp
+
+# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
+# LIBS += -lgcov
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
new file mode 100644
index 0000000000..223f54fc85
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
@@ -0,0 +1,282 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtTest/QtTest>
+#include <private/qdeclarativepixmapcache_p.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QNetworkReply>
+
+// These don't let normal people run tests!
+//#include "../network-settings.h"
+
+class tst_qdeclarativepixmapcache : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativepixmapcache() :
+ thisfile(QUrl::fromLocalFile(__FILE__))
+ {
+ }
+
+private slots:
+ void single();
+ void single_data();
+ void parallel();
+ void parallel_data();
+
+private:
+ QDeclarativeEngine engine;
+ QUrl thisfile;
+};
+
+
+static int slotters=0;
+
+class Slotter : public QObject
+{
+ Q_OBJECT
+public:
+ Slotter()
+ {
+ gotslot = false;
+ slotters++;
+ }
+ bool gotslot;
+
+public slots:
+ void got()
+ {
+ gotslot = true;
+ --slotters;
+ if (slotters==0)
+ QTestEventLoop::instance().exitLoop();
+ }
+};
+
+#ifndef QT_NO_LOCALFILE_OPTIMIZED_QML
+static const bool localfile_optimized = true;
+#else
+static const bool localfile_optimized = false;
+#endif
+
+void tst_qdeclarativepixmapcache::single_data()
+{
+ // Note, since QDeclarativePixmapCache is shared, tests affect each other!
+ // so use different files fore all test functions.
+
+ QTest::addColumn<QUrl>("target");
+ QTest::addColumn<bool>("incache");
+ QTest::addColumn<bool>("exists");
+ QTest::addColumn<bool>("neterror");
+
+ // File URLs are optimized
+ QTest::newRow("local") << thisfile.resolved(QUrl("data/exists.png")) << localfile_optimized << true << false;
+ QTest::newRow("local") << thisfile.resolved(QUrl("data/notexists.png")) << localfile_optimized << false << false;
+ QTest::newRow("remote") << QUrl("http://qt.nokia.com/logo.png") << false << true << false;
+ QTest::newRow("remote") << QUrl("http://qt.nokia.com/thereisnologo.png") << false << false << true;
+}
+
+void tst_qdeclarativepixmapcache::single()
+{
+ QFETCH(QUrl, target);
+ QFETCH(bool, incache);
+ QFETCH(bool, exists);
+ QFETCH(bool, neterror);
+
+ if (neterror) {
+ QString expected = "\"Error downloading " + target.toString() + " - server replied: Not Found\" ";
+ QTest::ignoreMessage(QtWarningMsg, expected.toLatin1());
+ } else if (!exists) {
+ QString expected = "Cannot open QUrl( \"" + target.toString() + "\" ) ";
+ QTest::ignoreMessage(QtWarningMsg, expected.toLatin1());
+ }
+
+ QPixmap pixmap;
+ QVERIFY(pixmap.width() <= 0); // Check Qt assumption
+ QDeclarativePixmapReply::Status status = QDeclarativePixmapCache::get(target, &pixmap);
+
+ if (incache) {
+ if (exists) {
+ QVERIFY(status == QDeclarativePixmapReply::Ready);
+ QVERIFY(pixmap.width() > 0);
+ } else {
+ QVERIFY(status == QDeclarativePixmapReply::Error);
+ QVERIFY(pixmap.width() <= 0);
+ }
+ } else {
+ QDeclarativePixmapReply *reply = QDeclarativePixmapCache::request(&engine, target);
+ QVERIFY(reply);
+ QVERIFY(pixmap.width() <= 0);
+
+ Slotter getter;
+ connect(reply, SIGNAL(finished()), &getter, SLOT(got()));
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+ QVERIFY(getter.gotslot);
+ if (exists) {
+ QVERIFY(QDeclarativePixmapCache::get(target, &pixmap) == QDeclarativePixmapReply::Ready);
+ QVERIFY(pixmap.width() > 0);
+ } else {
+ QVERIFY(QDeclarativePixmapCache::get(target, &pixmap) == QDeclarativePixmapReply::Error);
+ QVERIFY(pixmap.width() <= 0);
+ }
+ }
+
+ QCOMPARE(QDeclarativePixmapCache::pendingRequests(), 0);
+}
+
+void tst_qdeclarativepixmapcache::parallel_data()
+{
+ // Note, since QDeclarativePixmapCache is shared, tests affect each other!
+ // so use different files fore all test functions.
+
+ QTest::addColumn<QUrl>("target1");
+ QTest::addColumn<QUrl>("target2");
+ QTest::addColumn<int>("incache");
+ QTest::addColumn<int>("cancel"); // which one to cancel
+ QTest::addColumn<int>("requests");
+
+ QTest::newRow("local")
+ << thisfile.resolved(QUrl("data/exists1.png"))
+ << thisfile.resolved(QUrl("data/exists2.png"))
+ << (localfile_optimized ? 2 : 0)
+ << -1
+ << (localfile_optimized ? 0 : 2)
+ ;
+
+ QTest::newRow("remote")
+ << QUrl("http://qt.nokia.com/images/template/checkbox-on.png")
+ << QUrl("http://qt.nokia.com/images/products/qt-logo/image_tile")
+ << 0
+ << -1
+ << 2
+ ;
+
+ QTest::newRow("remoteagain")
+ << QUrl("http://qt.nokia.com/images/template/checkbox-on.png")
+ << QUrl("http://qt.nokia.com/images/products/qt-logo/image_tile")
+ << 2
+ << -1
+ << 0
+ ;
+
+ QTest::newRow("remotecopy")
+ << QUrl("http://qt.nokia.com/images/template/checkbox-off.png")
+ << QUrl("http://qt.nokia.com/images/template/checkbox-off.png")
+ << 0
+ << -1
+ << 1
+ ;
+
+ QTest::newRow("remotecopycancel")
+ << QUrl("http://qt.nokia.com/rounded_block_bg.png")
+ << QUrl("http://qt.nokia.com/rounded_block_bg.png")
+ << 0
+ << 0
+ << 1
+ ;
+}
+
+void tst_qdeclarativepixmapcache::parallel()
+{
+ QFETCH(QUrl, target1);
+ QFETCH(QUrl, target2);
+ QFETCH(int, incache);
+ QFETCH(int, cancel);
+ QFETCH(int, requests);
+
+ QList<QUrl> targets;
+ targets << target1 << target2;
+
+ QList<QDeclarativePixmapReply*> replies;
+ QList<Slotter*> getters;
+ for (int i=0; i<targets.count(); ++i) {
+ QUrl target = targets.at(i);
+ QPixmap pixmap;
+ QDeclarativePixmapReply::Status status = QDeclarativePixmapCache::get(target, &pixmap);
+ QDeclarativePixmapReply *reply = 0;
+ if (status != QDeclarativePixmapReply::Error && status != QDeclarativePixmapReply::Ready)
+ reply = QDeclarativePixmapCache::request(&engine, target);
+ replies.append(reply);
+ if (!reply) {
+ QVERIFY(pixmap.width() > 0);
+ getters.append(0);
+ } else {
+ QVERIFY(pixmap.width() <= 0);
+ getters.append(new Slotter);
+ connect(reply, SIGNAL(finished()), getters[i], SLOT(got()));
+ }
+ }
+
+ QCOMPARE(incache+slotters, targets.count());
+ QCOMPARE(QDeclarativePixmapCache::pendingRequests(), requests);
+
+ if (cancel >= 0) {
+ QDeclarativePixmapCache::cancel(targets.at(cancel), getters[cancel]);
+ slotters--;
+ }
+
+ if (slotters) {
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+ }
+
+ for (int i=0; i<targets.count(); ++i) {
+ QDeclarativePixmapReply *reply = replies[i];
+ if (reply) {
+ if (i == cancel) {
+ QVERIFY(!getters[i]->gotslot);
+ } else {
+ QVERIFY(getters[i]->gotslot);
+ QPixmap pixmap;
+ QVERIFY(QDeclarativePixmapCache::get(targets[i], &pixmap) == QDeclarativePixmapReply::Ready);
+ QVERIFY(pixmap.width() > 0);
+ }
+ delete getters[i];
+ }
+ }
+
+ QCOMPARE(QDeclarativePixmapCache::pendingRequests(), 0);
+}
+
+QTEST_MAIN(tst_qdeclarativepixmapcache)
+
+#include "tst_qdeclarativepixmapcache.moc"
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml b/tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml
new file mode 100644
index 0000000000..f6376a153e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml
@@ -0,0 +1,60 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Grid {
+ columns: 3
+ add: Transition {
+ NumberAnimation {
+ properties: "x,y";
+ }
+ }
+ move: Transition {
+ NumberAnimation {
+ properties: "x,y";
+ }
+ }
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ x: -100
+ y: -100
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ x: -100
+ y: -100
+ opacity: 0
+ color: "green"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "three"
+ color: "blue"
+ x: -100
+ y: -100
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "four"
+ color: "cyan"
+ x: -100
+ y: -100
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "five"
+ color: "magenta"
+ x: -100
+ y: -100
+ width: 50
+ height: 50
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/grid-spacing.qml b/tests/auto/declarative/qdeclarativepositioners/data/grid-spacing.qml
new file mode 100644
index 0000000000..5b4a30dfd9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepositioners/data/grid-spacing.qml
@@ -0,0 +1,40 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Grid {
+ columns: 3
+ spacing: 4
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ color: "green"
+ width: 20
+ height: 50
+ }
+ Rectangle {
+ objectName: "three"
+ color: "blue"
+ width: 50
+ height: 20
+ }
+ Rectangle {
+ objectName: "four"
+ color: "cyan"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "five"
+ color: "magenta"
+ width: 10
+ height: 10
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/grid.qml b/tests/auto/declarative/qdeclarativepositioners/data/grid.qml
new file mode 100644
index 0000000000..830df6acd0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepositioners/data/grid.qml
@@ -0,0 +1,39 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Grid {
+ columns: 3
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ color: "green"
+ width: 20
+ height: 50
+ }
+ Rectangle {
+ objectName: "three"
+ color: "blue"
+ width: 50
+ height: 20
+ }
+ Rectangle {
+ objectName: "four"
+ color: "cyan"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "five"
+ color: "magenta"
+ width: 10
+ height: 10
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml
new file mode 100644
index 0000000000..c113a367bc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml
@@ -0,0 +1,40 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Row {
+ add: Transition {
+ NumberAnimation {
+ properties: "x";
+ }
+ }
+ move: Transition {
+ NumberAnimation {
+ properties: "x";
+ }
+ }
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ x: -100;
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ color: "blue"
+ x: -100;
+ opacity: 0
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "three"
+ x: -100;
+ color: "green"
+ width: 50
+ height: 50
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml
new file mode 100644
index 0000000000..32bf775588
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml
@@ -0,0 +1,27 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Row {
+ spacing: 10
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ color: "red"
+ width: 20
+ height: 10
+ }
+ Rectangle {
+ objectName: "three"
+ color: "red"
+ width: 40
+ height: 20
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/horizontal.qml b/tests/auto/declarative/qdeclarativepositioners/data/horizontal.qml
new file mode 100644
index 0000000000..06ae151494
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepositioners/data/horizontal.qml
@@ -0,0 +1,26 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Row {
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ color: "red"
+ width: 20
+ height: 10
+ }
+ Rectangle {
+ objectName: "three"
+ color: "red"
+ width: 40
+ height: 20
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/propertychanges.qml b/tests/auto/declarative/qdeclarativepositioners/data/propertychanges.qml
new file mode 100644
index 0000000000..4370a1825e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepositioners/data/propertychanges.qml
@@ -0,0 +1,39 @@
+import Qt 4.6
+
+Grid {
+ id: myGrid
+
+ width: 270
+ height: 270
+ x: 3
+ y: 3
+ columns: 4
+ spacing: 3
+
+ add: columnTransition
+ move: columnTransition
+
+ Repeater {
+ model: 20
+ Rectangle { color: "black"; width: 50; height: 50 }
+ }
+
+ data: [
+ Transition {
+ id: rowTransition
+ objectName: "rowTransition"
+ NumberAnimation {
+ properties: "x,y";
+ easing.type: "OutInCubic"
+ }
+ },
+ Transition {
+ id: columnTransition
+ objectName: "columnTransition"
+ NumberAnimation {
+ properties: "x,y";
+ easing.type: "OutInCubic"
+ }
+ }
+ ]
+}
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/repeater.qml b/tests/auto/declarative/qdeclarativepositioners/data/repeater.qml
new file mode 100644
index 0000000000..2bc5e94775
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepositioners/data/repeater.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Row {
+ Repeater{ model: 3;
+ delegate: Component {
+ Rectangle {
+ color: "red"
+ width: 50
+ height: 50
+ z: {if(index == 0){2;}else if(index == 1){1;} else{3;}}
+ objectName: {if(index == 0){"one";}else if(index == 1){"two";} else{"three";}}
+
+ }
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/vertical-animated.qml b/tests/auto/declarative/qdeclarativepositioners/data/vertical-animated.qml
new file mode 100644
index 0000000000..10f6cbb3d1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepositioners/data/vertical-animated.qml
@@ -0,0 +1,40 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Column {
+ add: Transition {
+ NumberAnimation {
+ properties: "y";
+ }
+ }
+ move: Transition {
+ NumberAnimation {
+ properties: "y";
+ }
+ }
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ y: -100
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ color: "blue"
+ y: -100
+ opacity: 0
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "three"
+ color: "red"
+ y: -100
+ width: 50
+ height: 50
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/vertical-spacing.qml b/tests/auto/declarative/qdeclarativepositioners/data/vertical-spacing.qml
new file mode 100644
index 0000000000..69a8256c39
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepositioners/data/vertical-spacing.qml
@@ -0,0 +1,27 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Column {
+ spacing: 10
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ color: "red"
+ width: 20
+ height: 10
+ }
+ Rectangle {
+ objectName: "three"
+ color: "red"
+ width: 40
+ height: 20
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/vertical.qml b/tests/auto/declarative/qdeclarativepositioners/data/vertical.qml
new file mode 100644
index 0000000000..856c180a45
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepositioners/data/vertical.qml
@@ -0,0 +1,26 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Column {
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ color: "red"
+ width: 20
+ height: 10
+ }
+ Rectangle {
+ objectName: "three"
+ color: "red"
+ width: 40
+ height: 20
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro b/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
new file mode 100644
index 0000000000..5edfa55292
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+SOURCES += tst_qdeclarativepositioners.cpp
+macx:CONFIG -= app_bundle
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
new file mode 100644
index 0000000000..d23d74c602
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
@@ -0,0 +1,455 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QtTest/QtTest>
+#include <private/qlistmodelinterface_p.h>
+#include <qdeclarativeview.h>
+#include <private/qdeclarativerectangle_p.h>
+#include <private/qdeclarativepositioners_p.h>
+#include <private/qdeclarativetransition_p.h>
+#include <qdeclarativeexpression.h>
+#include "../../../shared/util.h"
+
+class tst_QDeclarativePositioners : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QDeclarativePositioners();
+
+private slots:
+ void test_horizontal();
+ void test_horizontal_spacing();
+ void test_horizontal_animated();
+ void test_vertical();
+ void test_vertical_spacing();
+ void test_vertical_animated();
+ void test_grid();
+ void test_grid_spacing();
+ void test_grid_animated();
+ void test_propertychanges();
+ void test_repeater();
+private:
+ QDeclarativeView *createView(const QString &filename);
+};
+
+tst_QDeclarativePositioners::tst_QDeclarativePositioners()
+{
+}
+
+void tst_QDeclarativePositioners::test_horizontal()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/horizontal.qml");
+
+ QDeclarativeRectangle *one = canvas->rootObject()->findChild<QDeclarativeRectangle*>("one");
+ QVERIFY(one != 0);
+
+ QDeclarativeRectangle *two = canvas->rootObject()->findChild<QDeclarativeRectangle*>("two");
+ QVERIFY(two != 0);
+
+ QDeclarativeRectangle *three = canvas->rootObject()->findChild<QDeclarativeRectangle*>("three");
+ QVERIFY(three != 0);
+
+ QCOMPARE(one->x(), 0.0);
+ QCOMPARE(one->y(), 0.0);
+ QCOMPARE(two->x(), 50.0);
+ QCOMPARE(two->y(), 0.0);
+ QCOMPARE(three->x(), 70.0);
+ QCOMPARE(three->y(), 0.0);
+}
+
+void tst_QDeclarativePositioners::test_horizontal_spacing()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/horizontal-spacing.qml");
+
+ QDeclarativeRectangle *one = canvas->rootObject()->findChild<QDeclarativeRectangle*>("one");
+ QVERIFY(one != 0);
+
+ QDeclarativeRectangle *two = canvas->rootObject()->findChild<QDeclarativeRectangle*>("two");
+ QVERIFY(two != 0);
+
+ QDeclarativeRectangle *three = canvas->rootObject()->findChild<QDeclarativeRectangle*>("three");
+ QVERIFY(three != 0);
+
+ QCOMPARE(one->x(), 0.0);
+ QCOMPARE(one->y(), 0.0);
+ QCOMPARE(two->x(), 60.0);
+ QCOMPARE(two->y(), 0.0);
+ QCOMPARE(three->x(), 90.0);
+ QCOMPARE(three->y(), 0.0);
+}
+
+void tst_QDeclarativePositioners::test_horizontal_animated()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/horizontal-animated.qml");
+
+ QDeclarativeRectangle *one = canvas->rootObject()->findChild<QDeclarativeRectangle*>("one");
+ QVERIFY(one != 0);
+
+ QDeclarativeRectangle *two = canvas->rootObject()->findChild<QDeclarativeRectangle*>("two");
+ QVERIFY(two != 0);
+
+ QDeclarativeRectangle *three = canvas->rootObject()->findChild<QDeclarativeRectangle*>("three");
+ QVERIFY(three != 0);
+
+ //Note that they animate in
+ QCOMPARE(one->x(), -100.0);
+ QCOMPARE(two->x(), -100.0);
+ QCOMPARE(three->x(), -100.0);
+
+ //QTRY_COMPARE used instead of waiting for the expected time of animation completion
+ //Note that this means the duration of the animation is NOT tested
+
+ QTRY_COMPARE(one->x(), 0.0);
+ QTRY_COMPARE(one->y(), 0.0);
+ QTRY_COMPARE(two->opacity(), 0.0);
+ QTRY_COMPARE(two->x(), -100.0);//Not 'in' yet
+ QTRY_COMPARE(two->y(), 0.0);
+ QTRY_COMPARE(three->x(), 50.0);
+ QTRY_COMPARE(three->y(), 0.0);
+
+ //Add 'two'
+ two->setOpacity(1.0);
+ QCOMPARE(two->opacity(), 1.0);
+ QTest::qWait(0);//Let the animation start
+ QCOMPARE(two->x(), -100.0);
+ QCOMPARE(three->x(), 50.0);
+
+ QTRY_COMPARE(two->x(), 50.0);
+ QTRY_COMPARE(three->x(), 100.0);
+}
+
+void tst_QDeclarativePositioners::test_vertical()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/vertical.qml");
+
+ QDeclarativeRectangle *one = canvas->rootObject()->findChild<QDeclarativeRectangle*>("one");
+ QVERIFY(one != 0);
+
+ QDeclarativeRectangle *two = canvas->rootObject()->findChild<QDeclarativeRectangle*>("two");
+ QVERIFY(two != 0);
+
+ QDeclarativeRectangle *three = canvas->rootObject()->findChild<QDeclarativeRectangle*>("three");
+ QVERIFY(three != 0);
+
+ QCOMPARE(one->x(), 0.0);
+ QCOMPARE(one->y(), 0.0);
+ QCOMPARE(two->x(), 0.0);
+ QCOMPARE(two->y(), 50.0);
+ QCOMPARE(three->x(), 0.0);
+ QCOMPARE(three->y(), 60.0);
+}
+
+void tst_QDeclarativePositioners::test_vertical_spacing()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/vertical-spacing.qml");
+
+ QDeclarativeRectangle *one = canvas->rootObject()->findChild<QDeclarativeRectangle*>("one");
+ QVERIFY(one != 0);
+
+ QDeclarativeRectangle *two = canvas->rootObject()->findChild<QDeclarativeRectangle*>("two");
+ QVERIFY(two != 0);
+
+ QDeclarativeRectangle *three = canvas->rootObject()->findChild<QDeclarativeRectangle*>("three");
+ QVERIFY(three != 0);
+
+ QCOMPARE(one->x(), 0.0);
+ QCOMPARE(one->y(), 0.0);
+ QCOMPARE(two->x(), 0.0);
+ QCOMPARE(two->y(), 60.0);
+ QCOMPARE(three->x(), 0.0);
+ QCOMPARE(three->y(), 80.0);
+}
+
+void tst_QDeclarativePositioners::test_vertical_animated()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/vertical-animated.qml");
+
+ //Note that they animate in
+ QDeclarativeRectangle *one = canvas->rootObject()->findChild<QDeclarativeRectangle*>("one");
+ QVERIFY(one != 0);
+ QCOMPARE(one->y(), -100.0);
+
+ QDeclarativeRectangle *two = canvas->rootObject()->findChild<QDeclarativeRectangle*>("two");
+ QVERIFY(two != 0);
+ QCOMPARE(two->y(), -100.0);
+
+ QDeclarativeRectangle *three = canvas->rootObject()->findChild<QDeclarativeRectangle*>("three");
+ QVERIFY(three != 0);
+ QCOMPARE(three->y(), -100.0);
+
+ //QTRY_COMPARE used instead of waiting for the expected time of animation completion
+ //Note that this means the duration of the animation is NOT tested
+
+ QTRY_COMPARE(one->y(), 0.0);
+ QTRY_COMPARE(one->x(), 0.0);
+ QTRY_COMPARE(two->opacity(), 0.0);
+ QTRY_COMPARE(two->y(), -100.0);//Not 'in' yet
+ QTRY_COMPARE(two->x(), 0.0);
+ QTRY_COMPARE(three->y(), 50.0);
+ QTRY_COMPARE(three->x(), 0.0);
+
+ //Add 'two'
+ two->setOpacity(1.0);
+ QTRY_COMPARE(two->opacity(), 1.0);
+ QTest::qWait(0);//Let the animation start
+ QCOMPARE(two->y(), -100.0);
+ QCOMPARE(three->y(), 50.0);
+
+ QTRY_COMPARE(two->y(), 50.0);
+ QTRY_COMPARE(three->y(), 100.0);
+
+}
+
+void tst_QDeclarativePositioners::test_grid()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/grid.qml");
+
+ QDeclarativeRectangle *one = canvas->rootObject()->findChild<QDeclarativeRectangle*>("one");
+ QVERIFY(one != 0);
+ QDeclarativeRectangle *two = canvas->rootObject()->findChild<QDeclarativeRectangle*>("two");
+ QVERIFY(two != 0);
+ QDeclarativeRectangle *three = canvas->rootObject()->findChild<QDeclarativeRectangle*>("three");
+ QVERIFY(three != 0);
+ QDeclarativeRectangle *four = canvas->rootObject()->findChild<QDeclarativeRectangle*>("four");
+ QVERIFY(four != 0);
+ QDeclarativeRectangle *five = canvas->rootObject()->findChild<QDeclarativeRectangle*>("five");
+ QVERIFY(five != 0);
+
+ QCOMPARE(one->x(), 0.0);
+ QCOMPARE(one->y(), 0.0);
+ QCOMPARE(two->x(), 50.0);
+ QCOMPARE(two->y(), 0.0);
+ QCOMPARE(three->x(), 70.0);
+ QCOMPARE(three->y(), 0.0);
+ QCOMPARE(four->x(), 0.0);
+ QCOMPARE(four->y(), 50.0);
+ QCOMPARE(five->x(), 50.0);
+ QCOMPARE(five->y(), 50.0);
+}
+
+void tst_QDeclarativePositioners::test_grid_spacing()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/grid-spacing.qml");
+
+ QDeclarativeRectangle *one = canvas->rootObject()->findChild<QDeclarativeRectangle*>("one");
+ QVERIFY(one != 0);
+ QDeclarativeRectangle *two = canvas->rootObject()->findChild<QDeclarativeRectangle*>("two");
+ QVERIFY(two != 0);
+ QDeclarativeRectangle *three = canvas->rootObject()->findChild<QDeclarativeRectangle*>("three");
+ QVERIFY(three != 0);
+ QDeclarativeRectangle *four = canvas->rootObject()->findChild<QDeclarativeRectangle*>("four");
+ QVERIFY(four != 0);
+ QDeclarativeRectangle *five = canvas->rootObject()->findChild<QDeclarativeRectangle*>("five");
+ QVERIFY(five != 0);
+
+ QCOMPARE(one->x(), 0.0);
+ QCOMPARE(one->y(), 0.0);
+ QCOMPARE(two->x(), 54.0);
+ QCOMPARE(two->y(), 0.0);
+ QCOMPARE(three->x(), 78.0);
+ QCOMPARE(three->y(), 0.0);
+ QCOMPARE(four->x(), 0.0);
+ QCOMPARE(four->y(), 54.0);
+ QCOMPARE(five->x(), 54.0);
+ QCOMPARE(five->y(), 54.0);
+}
+
+void tst_QDeclarativePositioners::test_grid_animated()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/grid-animated.qml");
+
+ //Note that all animate in
+ QDeclarativeRectangle *one = canvas->rootObject()->findChild<QDeclarativeRectangle*>("one");
+ QVERIFY(one != 0);
+ QCOMPARE(one->x(), -100.0);
+ QCOMPARE(one->y(), -100.0);
+
+ QDeclarativeRectangle *two = canvas->rootObject()->findChild<QDeclarativeRectangle*>("two");
+ QVERIFY(two != 0);
+ QCOMPARE(two->x(), -100.0);
+ QCOMPARE(two->y(), -100.0);
+
+ QDeclarativeRectangle *three = canvas->rootObject()->findChild<QDeclarativeRectangle*>("three");
+ QVERIFY(three != 0);
+ QCOMPARE(three->x(), -100.0);
+ QCOMPARE(three->y(), -100.0);
+
+ QDeclarativeRectangle *four = canvas->rootObject()->findChild<QDeclarativeRectangle*>("four");
+ QVERIFY(four != 0);
+ QCOMPARE(four->x(), -100.0);
+ QCOMPARE(four->y(), -100.0);
+
+ QDeclarativeRectangle *five = canvas->rootObject()->findChild<QDeclarativeRectangle*>("five");
+ QVERIFY(five != 0);
+ QCOMPARE(five->x(), -100.0);
+ QCOMPARE(five->y(), -100.0);
+
+ //QTRY_COMPARE used instead of waiting for the expected time of animation completion
+ //Note that this means the duration of the animation is NOT tested
+
+ QTRY_COMPARE(one->y(), 0.0);
+ QTRY_COMPARE(one->x(), 0.0);
+ QTRY_COMPARE(two->opacity(), 0.0);
+ QTRY_COMPARE(two->y(), -100.0);
+ QTRY_COMPARE(two->x(), -100.0);
+ QTRY_COMPARE(three->y(), 0.0);
+ QTRY_COMPARE(three->x(), 50.0);
+ QTRY_COMPARE(four->y(), 0.0);
+ QTRY_COMPARE(four->x(), 100.0);
+ QTRY_COMPARE(five->y(), 50.0);
+ QTRY_COMPARE(five->x(), 0.0);
+
+ //Add 'two'
+ two->setOpacity(1.0);
+ QCOMPARE(two->opacity(), 1.0);
+ QTest::qWait(0);//Let the animation start
+ QCOMPARE(two->x(), -100.0);
+ QCOMPARE(two->y(), -100.0);
+ QCOMPARE(one->x(), 0.0);
+ QCOMPARE(one->y(), 0.0);
+ QCOMPARE(three->x(), 50.0);
+ QCOMPARE(three->y(), 0.0);
+ QCOMPARE(four->x(), 100.0);
+ QCOMPARE(four->y(), 0.0);
+ QCOMPARE(five->x(), 0.0);
+ QCOMPARE(five->y(), 50.0);
+ //Let the animation complete
+ QTRY_COMPARE(two->x(), 50.0);
+ QTRY_COMPARE(two->y(), 0.0);
+ QTRY_COMPARE(one->x(), 0.0);
+ QTRY_COMPARE(one->y(), 0.0);
+ QTRY_COMPARE(three->x(), 100.0);
+ QTRY_COMPARE(three->y(), 0.0);
+ QTRY_COMPARE(four->x(), 0.0);
+ QTRY_COMPARE(four->y(), 50.0);
+ QTRY_COMPARE(five->x(), 50.0);
+ QTRY_COMPARE(five->y(), 50.0);
+
+}
+void tst_QDeclarativePositioners::test_propertychanges()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/propertychanges.qml");
+
+ QDeclarativeGrid *grid = qobject_cast<QDeclarativeGrid*>(canvas->rootObject());
+ QDeclarativeTransition *rowTransition = canvas->rootObject()->findChild<QDeclarativeTransition*>("rowTransition");
+ QDeclarativeTransition *columnTransition = canvas->rootObject()->findChild<QDeclarativeTransition*>("columnTransition");
+
+ QSignalSpy addSpy(grid, SIGNAL(addChanged()));
+ QSignalSpy moveSpy(grid, SIGNAL(moveChanged()));
+ QSignalSpy columnsSpy(grid, SIGNAL(columnsChanged()));
+ QSignalSpy rowsSpy(grid, SIGNAL(rowsChanged()));
+
+ QVERIFY(grid);
+ QVERIFY(rowTransition);
+ QVERIFY(columnTransition);
+ QCOMPARE(grid->add(), columnTransition);
+ QCOMPARE(grid->move(), columnTransition);
+ QCOMPARE(grid->columns(), 4);
+ QCOMPARE(grid->rows(), -1);
+
+ grid->setAdd(rowTransition);
+ grid->setMove(rowTransition);
+ QCOMPARE(grid->add(), rowTransition);
+ QCOMPARE(grid->move(), rowTransition);
+ QCOMPARE(addSpy.count(),1);
+ QCOMPARE(moveSpy.count(),1);
+
+ grid->setAdd(rowTransition);
+ grid->setMove(rowTransition);
+ QCOMPARE(addSpy.count(),1);
+ QCOMPARE(moveSpy.count(),1);
+
+ grid->setAdd(0);
+ grid->setMove(0);
+ QCOMPARE(addSpy.count(),2);
+ QCOMPARE(moveSpy.count(),2);
+
+ grid->setColumns(-1);
+ grid->setRows(3);
+ QCOMPARE(grid->columns(), -1);
+ QCOMPARE(grid->rows(), 3);
+ QCOMPARE(columnsSpy.count(),1);
+ QCOMPARE(rowsSpy.count(),1);
+
+ grid->setColumns(-1);
+ grid->setRows(3);
+ QCOMPARE(columnsSpy.count(),1);
+ QCOMPARE(rowsSpy.count(),1);
+
+ grid->setColumns(2);
+ grid->setRows(2);
+ QCOMPARE(columnsSpy.count(),2);
+ QCOMPARE(rowsSpy.count(),2);
+}
+
+void tst_QDeclarativePositioners::test_repeater()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/repeater.qml");
+
+ QDeclarativeRectangle *one = canvas->rootObject()->findChild<QDeclarativeRectangle*>("one");
+ QVERIFY(one != 0);
+
+ QDeclarativeRectangle *two = canvas->rootObject()->findChild<QDeclarativeRectangle*>("two");
+ QVERIFY(two != 0);
+
+ QDeclarativeRectangle *three = canvas->rootObject()->findChild<QDeclarativeRectangle*>("three");
+ QVERIFY(three != 0);
+
+ QCOMPARE(one->x(), 0.0);
+ QCOMPARE(one->y(), 0.0);
+ QCOMPARE(two->x(), 50.0);
+ QCOMPARE(two->y(), 0.0);
+ QCOMPARE(three->x(), 100.0);
+ QCOMPARE(three->y(), 0.0);
+}
+
+QDeclarativeView *tst_QDeclarativePositioners::createView(const QString &filename)
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+
+ canvas->setSource(QUrl::fromLocalFile(filename));
+
+ return canvas;
+}
+
+
+QTEST_MAIN(tst_QDeclarativePositioners)
+
+#include "tst_qdeclarativepositioners.moc"
diff --git a/tests/auto/declarative/qdeclarativeproperty/data/TestType.qml b/tests/auto/declarative/qdeclarativeproperty/data/TestType.qml
new file mode 100644
index 0000000000..1dfb3e1b31
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeproperty/data/TestType.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+QtObject {
+ property int a: 10
+}
+
diff --git a/tests/auto/declarative/qdeclarativeproperty/data/readSynthesizedObject.qml b/tests/auto/declarative/qdeclarativeproperty/data/readSynthesizedObject.qml
new file mode 100644
index 0000000000..8085db2f74
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeproperty/data/readSynthesizedObject.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+QtObject {
+ property TestType test
+
+ test: TestType {
+ property int b: 19
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
new file mode 100644
index 0000000000..af1e1b66c3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativeproperty.cpp
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp
new file mode 100644
index 0000000000..9b8a643934
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp
@@ -0,0 +1,1359 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativeproperty.h>
+#include <QtDeclarative/private/qdeclarativeproperty_p.h>
+#include <private/qguard_p.h>
+#include <private/qdeclarativebinding_p.h>
+#include <QtGui/QLineEdit>
+#include <QtCore/qfileinfo.h>
+#include <QtCore/qdir.h>
+
+inline QUrl TEST_FILE(const QString &filename)
+{
+ QFileInfo fileInfo(__FILE__);
+ return QUrl::fromLocalFile(fileInfo.absoluteDir().filePath(QLatin1String("data/") + filename));
+}
+
+class MyQmlObject : public QObject
+{
+ Q_OBJECT
+public:
+ MyQmlObject() {}
+};
+
+QML_DECLARE_TYPE(MyQmlObject);
+
+class MyAttached : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int foo READ foo WRITE setFoo)
+public:
+ MyAttached(QObject *parent) : QObject(parent), m_foo(13) {}
+
+ int foo() const { return m_foo; }
+ void setFoo(int f) { m_foo = f; }
+
+private:
+ int m_foo;
+};
+
+class MyContainer : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QDeclarativeListProperty<MyQmlObject> children READ children)
+public:
+ MyContainer() {}
+
+ QDeclarativeListProperty<MyQmlObject> children() { return QDeclarativeListProperty<MyQmlObject>(this, m_children); }
+
+ static MyAttached *qmlAttachedProperties(QObject *o) {
+ return new MyAttached(o);
+ }
+
+private:
+ QList<MyQmlObject*> m_children;
+};
+
+QML_DECLARE_TYPE(MyContainer);
+QML_DECLARE_TYPEINFO(MyContainer, QML_HAS_ATTACHED_PROPERTIES)
+
+class tst_qdeclarativeproperty : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativeproperty() {}
+
+private slots:
+ void initTestCase();
+
+ // Constructors
+ void qmlmetaproperty();
+ void qmlmetaproperty_object();
+ void qmlmetaproperty_object_string();
+ void qmlmetaproperty_object_context();
+ void qmlmetaproperty_object_string_context();
+
+ // Methods
+ void name();
+ void read();
+ void write();
+ void reset();
+
+ // Functionality
+ void writeObjectToList();
+ void writeListToList();
+
+ //writeToReadOnly();
+
+ // Bugs
+ void crashOnValueProperty();
+
+ void copy();
+private:
+ QDeclarativeEngine engine;
+};
+
+void tst_qdeclarativeproperty::qmlmetaproperty()
+{
+ QDeclarativeProperty prop;
+
+ QGuard<QDeclarativeBinding> binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext()));
+ QVERIFY(binding != 0);
+ QGuard<QDeclarativeExpression> expression(new QDeclarativeExpression());
+ QVERIFY(expression != 0);
+
+ QObject *obj = new QObject;
+
+ QCOMPARE(prop.name(), QString());
+ QCOMPARE(prop.read(), QVariant());
+ QCOMPARE(prop.write(QVariant()), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), false);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
+ QVERIFY(prop.method().signature() == 0);
+ QCOMPARE(prop.type(), QDeclarativeProperty::Invalid);
+ QCOMPARE(prop.isProperty(), false);
+ QCOMPARE(prop.isWritable(), false);
+ QCOMPARE(prop.isDesignable(), false);
+ QCOMPARE(prop.isResettable(), false);
+ QCOMPARE(prop.isValid(), false);
+ QCOMPARE(prop.object(), (QObject *)0);
+ QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory);
+ QCOMPARE(prop.propertyType(), 0);
+ QCOMPARE(prop.propertyTypeName(), (const char *)0);
+ QVERIFY(prop.property().name() == 0);
+ QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding) == 0);
+ QVERIFY(binding == 0);
+ QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
+ QVERIFY(expression == 0);
+ QCOMPARE(prop.index(), -1);
+ QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
+
+ delete obj;
+}
+
+class PropertyObject : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int defaultProperty READ defaultProperty);
+ Q_PROPERTY(QRect rectProperty READ rectProperty);
+ Q_PROPERTY(QRect wrectProperty READ wrectProperty WRITE setWRectProperty);
+ Q_PROPERTY(QUrl url READ url WRITE setUrl);
+ Q_PROPERTY(int resettableProperty READ resettableProperty WRITE setResettableProperty RESET resetProperty);
+ Q_PROPERTY(int propertyWithNotify READ propertyWithNotify WRITE setPropertyWithNotify NOTIFY oddlyNamedNotifySignal)
+ Q_PROPERTY(MyQmlObject *qmlObject READ qmlObject);
+
+ Q_CLASSINFO("DefaultProperty", "defaultProperty");
+public:
+ PropertyObject() : m_resetProperty(9) {}
+
+ int defaultProperty() { return 10; }
+ QRect rectProperty() { return QRect(10, 10, 1, 209); }
+
+ QRect wrectProperty() { return m_rect; }
+ void setWRectProperty(const QRect &r) { m_rect = r; }
+
+ QUrl url() { return m_url; }
+ void setUrl(const QUrl &u) { m_url = u; }
+
+ int resettableProperty() const { return m_resetProperty; }
+ void setResettableProperty(int r) { m_resetProperty = r; }
+ void resetProperty() { m_resetProperty = 9; }
+
+ int propertyWithNotify() const { return m_propertyWithNotify; }
+ void setPropertyWithNotify(int i) { m_propertyWithNotify = i; emit oddlyNamedNotifySignal(); }
+
+ MyQmlObject *qmlObject() { return &m_qmlObject; }
+signals:
+ void clicked();
+ void oddlyNamedNotifySignal();
+
+private:
+ int m_resetProperty;
+ QRect m_rect;
+ QUrl m_url;
+ int m_propertyWithNotify;
+ MyQmlObject m_qmlObject;
+};
+
+QML_DECLARE_TYPE(PropertyObject);
+
+void tst_qdeclarativeproperty::qmlmetaproperty_object()
+{
+ QObject object; // Has no default property
+ PropertyObject dobject; // Has default property
+
+ {
+ QDeclarativeProperty prop(&object);
+
+ QGuard<QDeclarativeBinding> binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext()));
+ QVERIFY(binding != 0);
+ QGuard<QDeclarativeExpression> expression(new QDeclarativeExpression());
+ QVERIFY(expression != 0);
+
+ QObject *obj = new QObject;
+
+ QCOMPARE(prop.name(), QString());
+ QCOMPARE(prop.read(), QVariant());
+ QCOMPARE(prop.write(QVariant()), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), false);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
+ QVERIFY(prop.method().signature() == 0);
+ QCOMPARE(prop.type(), QDeclarativeProperty::Invalid);
+ QCOMPARE(prop.isProperty(), false);
+ QCOMPARE(prop.isWritable(), false);
+ QCOMPARE(prop.isDesignable(), false);
+ QCOMPARE(prop.isResettable(), false);
+ QCOMPARE(prop.isValid(), false);
+ QCOMPARE(prop.object(), (QObject *)0);
+ QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory);
+ QCOMPARE(prop.propertyType(), 0);
+ QCOMPARE(prop.propertyTypeName(), (const char *)0);
+ QVERIFY(prop.property().name() == 0);
+ QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding) == 0);
+ QVERIFY(binding == 0);
+ QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
+ QVERIFY(expression == 0);
+ QCOMPARE(prop.index(), -1);
+ QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
+
+ delete obj;
+ }
+
+ {
+ QDeclarativeProperty prop(&dobject);
+
+ QGuard<QDeclarativeBinding> binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext()));
+ binding->setTarget(prop);
+ QVERIFY(binding != 0);
+ QGuard<QDeclarativeExpression> expression(new QDeclarativeExpression());
+ QVERIFY(expression != 0);
+
+ QObject *obj = new QObject;
+
+ QCOMPARE(prop.name(), QString("defaultProperty"));
+ QCOMPARE(prop.read(), QVariant(10));
+ QCOMPARE(prop.write(QVariant()), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), true);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
+ QVERIFY(prop.method().signature() == 0);
+ QCOMPARE(prop.type(), QDeclarativeProperty::Property);
+ QCOMPARE(prop.isProperty(), true);
+ QCOMPARE(prop.isWritable(), false);
+ QCOMPARE(prop.isDesignable(), true);
+ QCOMPARE(prop.isResettable(), false);
+ QCOMPARE(prop.isValid(), true);
+ QCOMPARE(prop.object(), &dobject);
+ QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal);
+ QCOMPARE(prop.propertyType(), (int)QVariant::Int);
+ QCOMPARE(prop.propertyTypeName(), "int");
+ QCOMPARE(QString(prop.property().name()), QString("defaultProperty"));
+ QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0);
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>:-1: Unable to assign null to int");
+ QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding) == 0);
+ QVERIFY(binding != 0);
+ QVERIFY(QDeclarativePropertyPrivate::binding(prop) == binding);
+ QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
+ QVERIFY(expression == 0);
+ QCOMPARE(prop.index(), dobject.metaObject()->indexOfProperty("defaultProperty"));
+ QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
+
+ delete obj;
+ }
+}
+
+void tst_qdeclarativeproperty::qmlmetaproperty_object_string()
+{
+ QObject object;
+ PropertyObject dobject;
+
+ {
+ QDeclarativeProperty prop(&object, QString("defaultProperty"));
+
+ QGuard<QDeclarativeBinding> binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext()));
+ QVERIFY(binding != 0);
+ QGuard<QDeclarativeExpression> expression(new QDeclarativeExpression());
+ QVERIFY(expression != 0);
+
+ QObject *obj = new QObject;
+
+ QCOMPARE(prop.name(), QString());
+ QCOMPARE(prop.read(), QVariant());
+ QCOMPARE(prop.write(QVariant()), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), false);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
+ QVERIFY(prop.method().signature() == 0);
+ QCOMPARE(prop.type(), QDeclarativeProperty::Invalid);
+ QCOMPARE(prop.isProperty(), false);
+ QCOMPARE(prop.isWritable(), false);
+ QCOMPARE(prop.isDesignable(), false);
+ QCOMPARE(prop.isResettable(), false);
+ QCOMPARE(prop.isValid(), false);
+ QCOMPARE(prop.object(), (QObject *)0);
+ QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory);
+ QCOMPARE(prop.propertyType(), 0);
+ QCOMPARE(prop.propertyTypeName(), (const char *)0);
+ QVERIFY(prop.property().name() == 0);
+ QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding) == 0);
+ QVERIFY(binding == 0);
+ QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
+ QVERIFY(expression == 0);
+ QCOMPARE(prop.index(), -1);
+ QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
+
+ delete obj;
+ }
+
+ {
+ QDeclarativeProperty prop(&dobject, QString("defaultProperty"));
+
+ QGuard<QDeclarativeBinding> binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext()));
+ binding->setTarget(prop);
+ QVERIFY(binding != 0);
+ QGuard<QDeclarativeExpression> expression(new QDeclarativeExpression());
+ QVERIFY(expression != 0);
+
+ QObject *obj = new QObject;
+
+ QCOMPARE(prop.name(), QString("defaultProperty"));
+ QCOMPARE(prop.read(), QVariant(10));
+ QCOMPARE(prop.write(QVariant()), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), true);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
+ QVERIFY(prop.method().signature() == 0);
+ QCOMPARE(prop.type(), QDeclarativeProperty::Property);
+ QCOMPARE(prop.isProperty(), true);
+ QCOMPARE(prop.isWritable(), false);
+ QCOMPARE(prop.isDesignable(), true);
+ QCOMPARE(prop.isResettable(), false);
+ QCOMPARE(prop.isValid(), true);
+ QCOMPARE(prop.object(), &dobject);
+ QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal);
+ QCOMPARE(prop.propertyType(), (int)QVariant::Int);
+ QCOMPARE(prop.propertyTypeName(), "int");
+ QCOMPARE(QString(prop.property().name()), QString("defaultProperty"));
+ QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0);
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>:-1: Unable to assign null to int");
+ QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding) == 0);
+ QVERIFY(binding != 0);
+ QVERIFY(QDeclarativePropertyPrivate::binding(prop) == binding);
+ QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
+ QVERIFY(expression == 0);
+ QCOMPARE(prop.index(), dobject.metaObject()->indexOfProperty("defaultProperty"));
+ QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
+
+ delete obj;
+ }
+
+ {
+ QDeclarativeProperty prop(&dobject, QString("onClicked"));
+
+ QGuard<QDeclarativeBinding> binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext()));
+ binding->setTarget(prop);
+ QVERIFY(binding != 0);
+ QGuard<QDeclarativeExpression> expression(new QDeclarativeExpression());
+ QVERIFY(expression != 0);
+
+ QObject *obj = new QObject;
+
+ QCOMPARE(prop.name(), QString("onClicked"));
+ QCOMPARE(prop.read(), QVariant());
+ QCOMPARE(prop.write(QVariant("Hello")), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), false);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
+ QCOMPARE(QString(prop.method().signature()), QString("clicked()"));
+ QCOMPARE(prop.type(), QDeclarativeProperty::SignalProperty);
+ QCOMPARE(prop.isProperty(), false);
+ QCOMPARE(prop.isWritable(), false);
+ QCOMPARE(prop.isDesignable(), false);
+ QCOMPARE(prop.isResettable(), false);
+ QCOMPARE(prop.isValid(), true);
+ QCOMPARE(prop.object(), &dobject);
+ QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory);
+ QCOMPARE(prop.propertyType(), 0);
+ QCOMPARE(prop.propertyTypeName(), (const char *)0);
+ QCOMPARE(prop.property().name(), (const char *)0);
+ QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding) == 0);
+ QVERIFY(binding == 0);
+ QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
+ QVERIFY(expression != 0);
+ QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == expression);
+ QCOMPARE(prop.index(), dobject.metaObject()->indexOfMethod("clicked()"));
+ QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
+
+ delete obj;
+ }
+
+ {
+ QDeclarativeProperty prop(&dobject, QString("onPropertyWithNotifyChanged"));
+
+ QGuard<QDeclarativeBinding> binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext()));
+ binding->setTarget(prop);
+ QVERIFY(binding != 0);
+ QGuard<QDeclarativeExpression> expression(new QDeclarativeExpression());
+ QVERIFY(expression != 0);
+
+ QObject *obj = new QObject;
+
+ QCOMPARE(prop.name(), QString("onOddlyNamedNotifySignal"));
+ QCOMPARE(prop.read(), QVariant());
+ QCOMPARE(prop.write(QVariant("Hello")), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), false);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
+ QCOMPARE(QString(prop.method().signature()), QString("oddlyNamedNotifySignal()"));
+ QCOMPARE(prop.type(), QDeclarativeProperty::SignalProperty);
+ QCOMPARE(prop.isProperty(), false);
+ QCOMPARE(prop.isWritable(), false);
+ QCOMPARE(prop.isDesignable(), false);
+ QCOMPARE(prop.isResettable(), false);
+ QCOMPARE(prop.isValid(), true);
+ QCOMPARE(prop.object(), &dobject);
+ QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory);
+ QCOMPARE(prop.propertyType(), 0);
+ QCOMPARE(prop.propertyTypeName(), (const char *)0);
+ QCOMPARE(prop.property().name(), (const char *)0);
+ QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding) == 0);
+ QVERIFY(binding == 0);
+ QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
+ QVERIFY(expression != 0);
+ QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == expression);
+ QCOMPARE(prop.index(), dobject.metaObject()->indexOfMethod("oddlyNamedNotifySignal()"));
+ QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
+
+ delete obj;
+ }
+}
+
+void tst_qdeclarativeproperty::qmlmetaproperty_object_context()
+{
+ QObject object; // Has no default property
+ PropertyObject dobject; // Has default property
+
+ {
+ QDeclarativeProperty prop(&object, engine.rootContext());
+
+ QGuard<QDeclarativeBinding> binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext()));
+ QVERIFY(binding != 0);
+ QGuard<QDeclarativeExpression> expression(new QDeclarativeExpression());
+ QVERIFY(expression != 0);
+
+ QObject *obj = new QObject;
+
+ QCOMPARE(prop.name(), QString());
+ QCOMPARE(prop.read(), QVariant());
+ QCOMPARE(prop.write(QVariant()), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), false);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
+ QVERIFY(prop.method().signature() == 0);
+ QCOMPARE(prop.type(), QDeclarativeProperty::Invalid);
+ QCOMPARE(prop.isProperty(), false);
+ QCOMPARE(prop.isWritable(), false);
+ QCOMPARE(prop.isDesignable(), false);
+ QCOMPARE(prop.isResettable(), false);
+ QCOMPARE(prop.isValid(), false);
+ QCOMPARE(prop.object(), (QObject *)0);
+ QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory);
+ QCOMPARE(prop.propertyType(), 0);
+ QCOMPARE(prop.propertyTypeName(), (const char *)0);
+ QVERIFY(prop.property().name() == 0);
+ QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding) == 0);
+ QVERIFY(binding == 0);
+ QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
+ QVERIFY(expression == 0);
+ QCOMPARE(prop.index(), -1);
+ QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
+
+ delete obj;
+ }
+
+ {
+ QDeclarativeProperty prop(&dobject, engine.rootContext());
+
+ QGuard<QDeclarativeBinding> binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext()));
+ binding->setTarget(prop);
+ QVERIFY(binding != 0);
+ QGuard<QDeclarativeExpression> expression(new QDeclarativeExpression());
+ QVERIFY(expression != 0);
+
+ QObject *obj = new QObject;
+
+ QCOMPARE(prop.name(), QString("defaultProperty"));
+ QCOMPARE(prop.read(), QVariant(10));
+ QCOMPARE(prop.write(QVariant()), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), true);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
+ QVERIFY(prop.method().signature() == 0);
+ QCOMPARE(prop.type(), QDeclarativeProperty::Property);
+ QCOMPARE(prop.isProperty(), true);
+ QCOMPARE(prop.isWritable(), false);
+ QCOMPARE(prop.isDesignable(), true);
+ QCOMPARE(prop.isResettable(), false);
+ QCOMPARE(prop.isValid(), true);
+ QCOMPARE(prop.object(), &dobject);
+ QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal);
+ QCOMPARE(prop.propertyType(), (int)QVariant::Int);
+ QCOMPARE(prop.propertyTypeName(), "int");
+ QCOMPARE(QString(prop.property().name()), QString("defaultProperty"));
+ QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0);
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>:-1: Unable to assign null to int");
+ QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding) == 0);
+ QVERIFY(binding != 0);
+ QVERIFY(QDeclarativePropertyPrivate::binding(prop) == binding);
+ QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
+ QVERIFY(expression == 0);
+ QCOMPARE(prop.index(), dobject.metaObject()->indexOfProperty("defaultProperty"));
+ QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
+
+ delete obj;
+ }
+}
+
+void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context()
+{
+ QObject object;
+ PropertyObject dobject;
+
+ {
+ QDeclarativeProperty prop(&object, QString("defaultProperty"), engine.rootContext());
+
+ QGuard<QDeclarativeBinding> binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext()));
+ QVERIFY(binding != 0);
+ QGuard<QDeclarativeExpression> expression(new QDeclarativeExpression());
+ QVERIFY(expression != 0);
+
+ QObject *obj = new QObject;
+
+ QCOMPARE(prop.name(), QString());
+ QCOMPARE(prop.read(), QVariant());
+ QCOMPARE(prop.write(QVariant()), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), false);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
+ QVERIFY(prop.method().signature() == 0);
+ QCOMPARE(prop.type(), QDeclarativeProperty::Invalid);
+ QCOMPARE(prop.isProperty(), false);
+ QCOMPARE(prop.isWritable(), false);
+ QCOMPARE(prop.isDesignable(), false);
+ QCOMPARE(prop.isResettable(), false);
+ QCOMPARE(prop.isValid(), false);
+ QCOMPARE(prop.object(), (QObject *)0);
+ QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory);
+ QCOMPARE(prop.propertyType(), 0);
+ QCOMPARE(prop.propertyTypeName(), (const char *)0);
+ QVERIFY(prop.property().name() == 0);
+ QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding) == 0);
+ QVERIFY(binding == 0);
+ QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
+ QVERIFY(expression == 0);
+ QCOMPARE(prop.index(), -1);
+ QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
+
+ delete obj;
+ }
+
+ {
+ QDeclarativeProperty prop(&dobject, QString("defaultProperty"), engine.rootContext());
+
+ QGuard<QDeclarativeBinding> binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext()));
+ binding->setTarget(prop);
+ QVERIFY(binding != 0);
+ QGuard<QDeclarativeExpression> expression(new QDeclarativeExpression());
+ QVERIFY(expression != 0);
+
+ QObject *obj = new QObject;
+
+ QCOMPARE(prop.name(), QString("defaultProperty"));
+ QCOMPARE(prop.read(), QVariant(10));
+ QCOMPARE(prop.write(QVariant()), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), true);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
+ QVERIFY(prop.method().signature() == 0);
+ QCOMPARE(prop.type(), QDeclarativeProperty::Property);
+ QCOMPARE(prop.isProperty(), true);
+ QCOMPARE(prop.isWritable(), false);
+ QCOMPARE(prop.isDesignable(), true);
+ QCOMPARE(prop.isResettable(), false);
+ QCOMPARE(prop.isValid(), true);
+ QCOMPARE(prop.object(), &dobject);
+ QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal);
+ QCOMPARE(prop.propertyType(), (int)QVariant::Int);
+ QCOMPARE(prop.propertyTypeName(), "int");
+ QCOMPARE(QString(prop.property().name()), QString("defaultProperty"));
+ QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0);
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>:-1: Unable to assign null to int");
+ QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding) == 0);
+ QVERIFY(binding != 0);
+ QVERIFY(QDeclarativePropertyPrivate::binding(prop) == binding);
+ QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
+ QVERIFY(expression == 0);
+ QCOMPARE(prop.index(), dobject.metaObject()->indexOfProperty("defaultProperty"));
+ QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
+
+ delete obj;
+ }
+
+ {
+ QDeclarativeProperty prop(&dobject, QString("onClicked"), engine.rootContext());
+
+ QGuard<QDeclarativeBinding> binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext()));
+ binding->setTarget(prop);
+ QVERIFY(binding != 0);
+ QGuard<QDeclarativeExpression> expression(new QDeclarativeExpression());
+ QVERIFY(expression != 0);
+
+ QObject *obj = new QObject;
+
+ QCOMPARE(prop.name(), QString("onClicked"));
+ QCOMPARE(prop.read(), QVariant());
+ QCOMPARE(prop.write(QVariant("Hello")), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), false);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
+ QCOMPARE(QString(prop.method().signature()), QString("clicked()"));
+ QCOMPARE(prop.type(), QDeclarativeProperty::SignalProperty);
+ QCOMPARE(prop.isProperty(), false);
+ QCOMPARE(prop.isWritable(), false);
+ QCOMPARE(prop.isDesignable(), false);
+ QCOMPARE(prop.isResettable(), false);
+ QCOMPARE(prop.isValid(), true);
+ QCOMPARE(prop.object(), &dobject);
+ QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory);
+ QCOMPARE(prop.propertyType(), 0);
+ QCOMPARE(prop.propertyTypeName(), (const char *)0);
+ QCOMPARE(prop.property().name(), (const char *)0);
+ QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding) == 0);
+ QVERIFY(binding == 0);
+ QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
+ QVERIFY(expression != 0);
+ QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == expression);
+ QCOMPARE(prop.index(), dobject.metaObject()->indexOfMethod("clicked()"));
+ QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
+
+ delete obj;
+ }
+
+ {
+ QDeclarativeProperty prop(&dobject, QString("onPropertyWithNotifyChanged"), engine.rootContext());
+
+ QGuard<QDeclarativeBinding> binding(new QDeclarativeBinding(QLatin1String("null"), 0, engine.rootContext()));
+ binding->setTarget(prop);
+ QVERIFY(binding != 0);
+ QGuard<QDeclarativeExpression> expression(new QDeclarativeExpression());
+ QVERIFY(expression != 0);
+
+ QObject *obj = new QObject;
+
+ QCOMPARE(prop.name(), QString("onOddlyNamedNotifySignal"));
+ QCOMPARE(prop.read(), QVariant());
+ QCOMPARE(prop.write(QVariant("Hello")), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), false);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
+ QCOMPARE(QString(prop.method().signature()), QString("oddlyNamedNotifySignal()"));
+ QCOMPARE(prop.type(), QDeclarativeProperty::SignalProperty);
+ QCOMPARE(prop.isProperty(), false);
+ QCOMPARE(prop.isWritable(), false);
+ QCOMPARE(prop.isDesignable(), false);
+ QCOMPARE(prop.isResettable(), false);
+ QCOMPARE(prop.isValid(), true);
+ QCOMPARE(prop.object(), &dobject);
+ QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory);
+ QCOMPARE(prop.propertyType(), 0);
+ QCOMPARE(prop.propertyTypeName(), (const char *)0);
+ QCOMPARE(prop.property().name(), (const char *)0);
+ QVERIFY(QDeclarativePropertyPrivate::binding(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setBinding(prop, binding) == 0);
+ QVERIFY(binding == 0);
+ QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
+ QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
+ QVERIFY(expression != 0);
+ QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == expression);
+ QCOMPARE(prop.index(), dobject.metaObject()->indexOfMethod("oddlyNamedNotifySignal()"));
+ QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
+
+ delete obj;
+ }
+}
+
+void tst_qdeclarativeproperty::name()
+{
+ {
+ QDeclarativeProperty p;
+ QCOMPARE(p.name(), QString());
+ }
+
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o);
+ QCOMPARE(p.name(), QString("defaultProperty"));
+ }
+
+ {
+ QObject o;
+ QDeclarativeProperty p(&o, QString("objectName"));
+ QCOMPARE(p.name(), QString("objectName"));
+ }
+
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, "onClicked");
+ QCOMPARE(p.name(), QString("onClicked"));
+ }
+
+ {
+ QObject o;
+ QDeclarativeProperty p(&o, "onClicked");
+ QCOMPARE(p.name(), QString());
+ }
+
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, "onPropertyWithNotifyChanged");
+ QCOMPARE(p.name(), QString("onOddlyNamedNotifySignal"));
+ }
+
+ {
+ QObject o;
+ QDeclarativeProperty p(&o, "onPropertyWithNotifyChanged");
+ QCOMPARE(p.name(), QString());
+ }
+
+ {
+ QObject o;
+ QDeclarativeProperty p(&o, "foo");
+ QCOMPARE(p.name(), QString());
+ }
+
+ {
+ QDeclarativeProperty p(0, "foo");
+ QCOMPARE(p.name(), QString());
+ }
+
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, "rectProperty");
+ QCOMPARE(p.name(), QString("rectProperty"));
+ }
+
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, "rectProperty.x");
+ QCOMPARE(p.name(), QString("rectProperty.x"));
+ }
+
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, "rectProperty.foo");
+ QCOMPARE(p.name(), QString());
+ }
+}
+
+void tst_qdeclarativeproperty::read()
+{
+ // Invalid
+ {
+ QDeclarativeProperty p;
+ QCOMPARE(p.read(), QVariant());
+ }
+
+ // Default prop
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o);
+ QCOMPARE(p.read(), QVariant(10));
+ }
+
+ // Invalid default prop
+ {
+ QObject o;
+ QDeclarativeProperty p(&o);
+ QCOMPARE(p.read(), QVariant());
+ }
+
+ // Value prop by name
+ {
+ QObject o;
+
+ QDeclarativeProperty p(&o, "objectName");
+ QCOMPARE(p.read(), QVariant(QString()));
+
+ o.setObjectName("myName");
+
+ QCOMPARE(p.read(), QVariant("myName"));
+ }
+
+ // Value-type prop
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, "rectProperty.x");
+ QCOMPARE(p.read(), QVariant(10));
+ }
+
+ // Invalid value-type prop
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, "rectProperty.foo");
+ QCOMPARE(p.read(), QVariant());
+ }
+
+ // Signal property
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, "onClicked");
+ QCOMPARE(p.read(), QVariant());
+
+ QVERIFY(0 == QDeclarativePropertyPrivate::setSignalExpression(p, new QDeclarativeExpression()));
+ QVERIFY(0 != QDeclarativePropertyPrivate::signalExpression(p));
+
+ QCOMPARE(p.read(), QVariant());
+ }
+
+ // Automatic signal property
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, "onPropertyWithNotifyChanged");
+ QCOMPARE(p.read(), QVariant());
+
+ QVERIFY(0 == QDeclarativePropertyPrivate::setSignalExpression(p, new QDeclarativeExpression()));
+ QVERIFY(0 != QDeclarativePropertyPrivate::signalExpression(p));
+
+ QCOMPARE(p.read(), QVariant());
+ }
+
+ // Deleted object
+ {
+ PropertyObject *o = new PropertyObject;
+ QDeclarativeProperty p(o, "rectProperty.x");
+ QCOMPARE(p.read(), QVariant(10));
+ delete o;
+ QCOMPARE(p.read(), QVariant());
+ }
+
+ // Object property
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, "qmlObject");
+ QCOMPARE(p.propertyTypeCategory(), QDeclarativeProperty::Object);
+ QCOMPARE(p.propertyType(), qMetaTypeId<MyQmlObject*>());
+ QVariant v = p.read();
+ QVERIFY(v.userType() == QMetaType::QObjectStar);
+ QVERIFY(qvariant_cast<QObject *>(v) == o.qmlObject());
+ }
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("readSynthesizedObject.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QDeclarativeProperty p(object, "test", &engine);
+
+ QCOMPARE(p.propertyTypeCategory(), QDeclarativeProperty::Object);
+ QVERIFY(p.propertyType() != QMetaType::QObjectStar);
+
+ QVariant v = p.read();
+ QVERIFY(v.userType() == QMetaType::QObjectStar);
+ QCOMPARE(qvariant_cast<QObject *>(v)->property("a").toInt(), 10);
+ QCOMPARE(qvariant_cast<QObject *>(v)->property("b").toInt(), 19);
+ }
+
+ // Attached property
+ {
+ QDeclarativeComponent component(&engine);
+ component.setData("import Test 1.0\nMyContainer { }", QUrl());
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QDeclarativeProperty p(object, "MyContainer.foo", qmlContext(object));
+ QCOMPARE(p.read(), QVariant(13));
+ delete object;
+ }
+ {
+ QDeclarativeComponent component(&engine);
+ component.setData("import Test 1.0\nMyContainer { MyContainer.foo: 10 }", QUrl());
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QDeclarativeProperty p(object, "MyContainer.foo", qmlContext(object));
+ QCOMPARE(p.read(), QVariant(10));
+ delete object;
+ }
+ {
+ QDeclarativeComponent component(&engine);
+ component.setData("import Test 1.0 as Foo\nFoo.MyContainer { Foo.MyContainer.foo: 10 }", QUrl());
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QDeclarativeProperty p(object, "Foo.MyContainer.foo", qmlContext(object));
+ QCOMPARE(p.read(), QVariant(10));
+ delete object;
+ }
+}
+
+void tst_qdeclarativeproperty::write()
+{
+ // Invalid
+ {
+ QDeclarativeProperty p;
+ QCOMPARE(p.write(QVariant(10)), false);
+ }
+
+ // Read-only default prop
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o);
+ QCOMPARE(p.write(QVariant(10)), false);
+ }
+
+ // Invalid default prop
+ {
+ QObject o;
+ QDeclarativeProperty p(&o);
+ QCOMPARE(p.write(QVariant(10)), false);
+ }
+
+ // Read-only prop by name
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, QString("defaultProperty"));
+ QCOMPARE(p.write(QVariant(10)), false);
+ }
+
+ // Writable prop by name
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, QString("objectName"));
+ QCOMPARE(o.objectName(), QString());
+ QCOMPARE(p.write(QVariant(QString("myName"))), true);
+ QCOMPARE(o.objectName(), QString("myName"));
+ }
+
+ // Deleted object
+ {
+ PropertyObject *o = new PropertyObject;
+ QDeclarativeProperty p(o, QString("objectName"));
+ QCOMPARE(p.write(QVariant(QString("myName"))), true);
+ QCOMPARE(o->objectName(), QString("myName"));
+
+ delete o;
+
+ QCOMPARE(p.write(QVariant(QString("myName"))), false);
+ }
+
+ // Signal property
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, "onClicked");
+ QCOMPARE(p.write(QVariant("console.log(1921)")), false);
+
+ QVERIFY(0 == QDeclarativePropertyPrivate::setSignalExpression(p, new QDeclarativeExpression()));
+ QVERIFY(0 != QDeclarativePropertyPrivate::signalExpression(p));
+
+ QCOMPARE(p.write(QVariant("console.log(1921)")), false);
+
+ QVERIFY(0 != QDeclarativePropertyPrivate::signalExpression(p));
+ }
+
+ // Automatic signal property
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, "onPropertyWithNotifyChanged");
+ QCOMPARE(p.write(QVariant("console.log(1921)")), false);
+
+ QVERIFY(0 == QDeclarativePropertyPrivate::setSignalExpression(p, new QDeclarativeExpression()));
+ QVERIFY(0 != QDeclarativePropertyPrivate::signalExpression(p));
+
+ QCOMPARE(p.write(QVariant("console.log(1921)")), false);
+
+ QVERIFY(0 != QDeclarativePropertyPrivate::signalExpression(p));
+ }
+
+ // Value-type property
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, "wrectProperty");
+
+ QCOMPARE(o.wrectProperty(), QRect());
+ QCOMPARE(p.write(QRect(1, 13, 99, 8)), true);
+ QCOMPARE(o.wrectProperty(), QRect(1, 13, 99, 8));
+
+ QDeclarativeProperty p2(&o, "wrectProperty.x");
+ QCOMPARE(p2.read(), QVariant(1));
+ QCOMPARE(p2.write(QVariant(6)), true);
+ QCOMPARE(p2.read(), QVariant(6));
+ QCOMPARE(o.wrectProperty(), QRect(6, 13, 99, 8));
+ }
+
+ // URL-property
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, "url");
+
+ QCOMPARE(p.write(QUrl("main.qml")), true);
+ QCOMPARE(o.url(), QUrl("main.qml"));
+
+ QDeclarativeProperty p2(&o, "url", engine.rootContext());
+
+ QUrl result = engine.baseUrl().resolved(QUrl("main.qml"));
+ QVERIFY(result != QUrl("main.qml"));
+
+ QCOMPARE(p2.write(QUrl("main.qml")), true);
+ QCOMPARE(o.url(), result);
+ }
+
+ // Attached property
+ {
+ QDeclarativeComponent component(&engine);
+ component.setData("import Test 1.0\nMyContainer { }", QUrl());
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QDeclarativeProperty p(object, "MyContainer.foo", qmlContext(object));
+ p.write(QVariant(99));
+ QCOMPARE(p.read(), QVariant(99));
+ delete object;
+ }
+ {
+ QDeclarativeComponent component(&engine);
+ component.setData("import Test 1.0 as Foo\nFoo.MyContainer { Foo.MyContainer.foo: 10 }", QUrl());
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QDeclarativeProperty p(object, "Foo.MyContainer.foo", qmlContext(object));
+ p.write(QVariant(99));
+ QCOMPARE(p.read(), QVariant(99));
+ delete object;
+ }
+}
+
+void tst_qdeclarativeproperty::reset()
+{
+ // Invalid
+ {
+ QDeclarativeProperty p;
+ QCOMPARE(p.isResettable(), false);
+ QCOMPARE(p.reset(), false);
+ }
+
+ // Read-only default prop
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o);
+ QCOMPARE(p.isResettable(), false);
+ QCOMPARE(p.reset(), false);
+ }
+
+ // Invalid default prop
+ {
+ QObject o;
+ QDeclarativeProperty p(&o);
+ QCOMPARE(p.isResettable(), false);
+ QCOMPARE(p.reset(), false);
+ }
+
+ // Non-resettable-only prop by name
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, QString("defaultProperty"));
+ QCOMPARE(p.isResettable(), false);
+ QCOMPARE(p.reset(), false);
+ }
+
+ // Resettable prop by name
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, QString("resettableProperty"));
+
+ QCOMPARE(p.read(), QVariant(9));
+ QCOMPARE(p.write(QVariant(11)), true);
+ QCOMPARE(p.read(), QVariant(11));
+
+ QCOMPARE(p.isResettable(), true);
+ QCOMPARE(p.reset(), true);
+
+ QCOMPARE(p.read(), QVariant(9));
+ }
+
+ // Deleted object
+ {
+ PropertyObject *o = new PropertyObject;
+
+ QDeclarativeProperty p(o, QString("resettableProperty"));
+
+ QCOMPARE(p.isResettable(), true);
+ QCOMPARE(p.reset(), true);
+
+ delete o;
+
+ QCOMPARE(p.isResettable(), false);
+ QCOMPARE(p.reset(), false);
+ }
+
+ // Signal property
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, "onClicked");
+
+ QCOMPARE(p.isResettable(), false);
+ QCOMPARE(p.reset(), false);
+ }
+
+ // Automatic signal property
+ {
+ PropertyObject o;
+ QDeclarativeProperty p(&o, "onPropertyWithNotifyChanged");
+
+ QCOMPARE(p.isResettable(), false);
+ QCOMPARE(p.reset(), false);
+ }
+}
+
+void tst_qdeclarativeproperty::writeObjectToList()
+{
+ QDeclarativeComponent containerComponent(&engine);
+ containerComponent.setData("import Test 1.0\nMyContainer { children: MyQmlObject {} }", QUrl());
+ MyContainer *container = qobject_cast<MyContainer*>(containerComponent.create());
+ QVERIFY(container != 0);
+ QDeclarativeListReference list(container, "children");
+ QVERIFY(list.count() == 1);
+
+ MyQmlObject *object = new MyQmlObject;
+ QDeclarativeProperty prop(container, "children");
+ prop.write(qVariantFromValue(object));
+ QCOMPARE(list.count(), 1);
+ QCOMPARE(list.at(0), object);
+}
+
+Q_DECLARE_METATYPE(QList<QObject *>);
+void tst_qdeclarativeproperty::writeListToList()
+{
+ QDeclarativeComponent containerComponent(&engine);
+ containerComponent.setData("import Test 1.0\nMyContainer { children: MyQmlObject {} }", QUrl());
+ MyContainer *container = qobject_cast<MyContainer*>(containerComponent.create());
+ QVERIFY(container != 0);
+ QDeclarativeListReference list(container, "children");
+ QVERIFY(list.count() == 1);
+
+ QList<QObject*> objList;
+ objList << new MyQmlObject() << new MyQmlObject() << new MyQmlObject() << new MyQmlObject();
+ QDeclarativeProperty prop(container, "children");
+ prop.write(qVariantFromValue(objList));
+ QCOMPARE(list.count(), 4);
+
+ //XXX need to try this with read/write prop (for read-only it correctly doesn't write)
+ /*QList<MyQmlObject*> typedObjList;
+ typedObjList << new MyQmlObject();
+ prop.write(qVariantFromValue(&typedObjList));
+ QCOMPARE(container->children()->size(), 1);*/
+}
+
+void tst_qdeclarativeproperty::crashOnValueProperty()
+{
+ QDeclarativeEngine *engine = new QDeclarativeEngine;
+ QDeclarativeComponent component(engine);
+
+ component.setData("import Test 1.0\nPropertyObject { wrectProperty.x: 10 }", QUrl());
+ PropertyObject *obj = qobject_cast<PropertyObject*>(component.create());
+ QVERIFY(obj != 0);
+
+ QDeclarativeProperty p(obj, "wrectProperty.x", qmlContext(obj));
+ QCOMPARE(p.name(), QString("wrectProperty.x"));
+
+ QCOMPARE(p.read(), QVariant(10));
+
+ //don't crash once the engine is deleted
+ delete engine;
+ engine = 0;
+
+ QCOMPARE(p.propertyTypeName(), "int");
+ QCOMPARE(p.read(), QVariant(10));
+ p.write(QVariant(20));
+ QCOMPARE(p.read(), QVariant(20));
+}
+
+void tst_qdeclarativeproperty::copy()
+{
+ PropertyObject object;
+
+ QDeclarativeProperty *property = new QDeclarativeProperty(&object, QLatin1String("defaultProperty"));
+ QCOMPARE(property->name(), QString("defaultProperty"));
+ QCOMPARE(property->read(), QVariant(10));
+ QCOMPARE(property->type(), QDeclarativeProperty::Property);
+ QCOMPARE(property->propertyTypeCategory(), QDeclarativeProperty::Normal);
+ QCOMPARE(property->propertyType(), (int)QVariant::Int);
+
+ QDeclarativeProperty p1(*property);
+ QCOMPARE(p1.name(), QString("defaultProperty"));
+ QCOMPARE(p1.read(), QVariant(10));
+ QCOMPARE(p1.type(), QDeclarativeProperty::Property);
+ QCOMPARE(p1.propertyTypeCategory(), QDeclarativeProperty::Normal);
+ QCOMPARE(p1.propertyType(), (int)QVariant::Int);
+
+ QDeclarativeProperty p2(&object, QLatin1String("url"));
+ QCOMPARE(p2.name(), QString("url"));
+ p2 = *property;
+ QCOMPARE(p2.name(), QString("defaultProperty"));
+ QCOMPARE(p2.read(), QVariant(10));
+ QCOMPARE(p2.type(), QDeclarativeProperty::Property);
+ QCOMPARE(p2.propertyTypeCategory(), QDeclarativeProperty::Normal);
+ QCOMPARE(p2.propertyType(), (int)QVariant::Int);
+
+ delete property; property = 0;
+
+ QCOMPARE(p1.name(), QString("defaultProperty"));
+ QCOMPARE(p1.read(), QVariant(10));
+ QCOMPARE(p1.type(), QDeclarativeProperty::Property);
+ QCOMPARE(p1.propertyTypeCategory(), QDeclarativeProperty::Normal);
+ QCOMPARE(p1.propertyType(), (int)QVariant::Int);
+
+ QCOMPARE(p2.name(), QString("defaultProperty"));
+ QCOMPARE(p2.read(), QVariant(10));
+ QCOMPARE(p2.type(), QDeclarativeProperty::Property);
+ QCOMPARE(p2.propertyTypeCategory(), QDeclarativeProperty::Normal);
+ QCOMPARE(p2.propertyType(), (int)QVariant::Int);
+}
+
+void tst_qdeclarativeproperty::initTestCase()
+{
+ QML_REGISTER_TYPE(Test,1,0,MyQmlObject,MyQmlObject);
+ QML_REGISTER_TYPE(Test,1,0,PropertyObject,PropertyObject);
+ QML_REGISTER_TYPE(Test,1,0,MyContainer,MyContainer);
+}
+
+
+QTEST_MAIN(tst_qdeclarativeproperty)
+
+#include "tst_qdeclarativeproperty.moc"
diff --git a/tests/auto/declarative/qdeclarativepropertymap/qdeclarativepropertymap.pro b/tests/auto/declarative/qdeclarativepropertymap/qdeclarativepropertymap.pro
new file mode 100644
index 0000000000..aeccf9b233
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepropertymap/qdeclarativepropertymap.pro
@@ -0,0 +1,5 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativepropertymap.cpp
diff --git a/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp b/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
new file mode 100644
index 0000000000..22c5581f2e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
@@ -0,0 +1,171 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecontext.h>
+#include <QtDeclarative/qdeclarativepropertymap.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativetext_p.h>
+#include <QSignalSpy>
+
+class tst_QDeclarativePropertyMap : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QDeclarativePropertyMap() {}
+
+private slots:
+ void insert();
+ void operatorInsert();
+ void operatorValue();
+ void clear();
+ void changed();
+ void count();
+};
+
+void tst_QDeclarativePropertyMap::insert()
+{
+ QDeclarativePropertyMap map;
+ map.insert(QLatin1String("key1"),100);
+ map.insert(QLatin1String("key2"),200);
+ QVERIFY(map.keys().count() == 2);
+ QVERIFY(map.contains(QLatin1String("key1")));
+
+ QCOMPARE(map.value(QLatin1String("key1")), QVariant(100));
+ QCOMPARE(map.value(QLatin1String("key2")), QVariant(200));
+
+ map.insert(QLatin1String("key1"),"Hello World");
+ QCOMPARE(map.value(QLatin1String("key1")), QVariant("Hello World"));
+}
+
+void tst_QDeclarativePropertyMap::operatorInsert()
+{
+ QDeclarativePropertyMap map;
+ map[QLatin1String("key1")] = 100;
+ map[QLatin1String("key2")] = 200;
+ QVERIFY(map.keys().count() == 2);
+
+ QCOMPARE(map.value(QLatin1String("key1")), QVariant(100));
+ QCOMPARE(map.value(QLatin1String("key2")), QVariant(200));
+
+ map[QLatin1String("key1")] = "Hello World";
+ QCOMPARE(map.value(QLatin1String("key1")), QVariant("Hello World"));
+}
+
+void tst_QDeclarativePropertyMap::operatorValue()
+{
+ QDeclarativePropertyMap map;
+ map.insert(QLatin1String("key1"),100);
+ map.insert(QLatin1String("key2"),200);
+ QVERIFY(map.count() == 2);
+ QVERIFY(map.contains(QLatin1String("key1")));
+
+ const QDeclarativePropertyMap &constMap = map;
+
+ QCOMPARE(constMap.value(QLatin1String("key1")), QVariant(100));
+ QCOMPARE(constMap.value(QLatin1String("key2")), QVariant(200));
+ QCOMPARE(constMap[QLatin1String("key1")], constMap.value(QLatin1String("key1")));
+ QCOMPARE(constMap[QLatin1String("key2")], constMap.value(QLatin1String("key2")));
+}
+
+void tst_QDeclarativePropertyMap::clear()
+{
+ QDeclarativePropertyMap map;
+ map.insert(QLatin1String("key1"),100);
+ QVERIFY(map.keys().count() == 1);
+
+ QCOMPARE(map.value(QLatin1String("key1")), QVariant(100));
+
+ map.clear(QLatin1String("key1"));
+ QVERIFY(map.keys().count() == 1);
+ QVERIFY(map.contains(QLatin1String("key1")));
+ QCOMPARE(map.value(QLatin1String("key1")), QVariant());
+}
+
+void tst_QDeclarativePropertyMap::changed()
+{
+ QDeclarativePropertyMap map;
+ QSignalSpy spy(&map, SIGNAL(valueChanged(const QString&)));
+ map.insert(QLatin1String("key1"),100);
+ map.insert(QLatin1String("key2"),200);
+ QCOMPARE(spy.count(), 0);
+
+ map.clear(QLatin1String("key1"));
+ QCOMPARE(spy.count(), 0);
+
+ //make changes in QML
+ QDeclarativeEngine engine;
+ QDeclarativeContext *ctxt = engine.rootContext();
+ ctxt->setContextProperty(QLatin1String("testdata"), &map);
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.6\nText { text: { testdata.key1 = 'Hello World'; 'X' } }",
+ QUrl::fromLocalFile(""));
+ QVERIFY(component.isReady());
+ QDeclarativeText *txt = qobject_cast<QDeclarativeText*>(component.create());
+ QVERIFY(txt);
+ QCOMPARE(txt->text(), QString('X'));
+ QCOMPARE(spy.count(), 1);
+ QList<QVariant> arguments = spy.takeFirst();
+ QCOMPARE(arguments.at(0).toString(),QLatin1String("key1"));
+ QCOMPARE(map.value(QLatin1String("key1")), QVariant("Hello World"));
+}
+
+void tst_QDeclarativePropertyMap::count()
+{
+ QDeclarativePropertyMap map;
+ QCOMPARE(map.isEmpty(), true);
+ map.insert(QLatin1String("key1"),100);
+ map.insert(QLatin1String("key2"),200);
+ QCOMPARE(map.count(), 2);
+ QCOMPARE(map.isEmpty(), false);
+
+ map.insert(QLatin1String("key3"),"Hello World");
+ QCOMPARE(map.count(), 3);
+
+ //clearing doesn't remove the key
+ map.clear(QLatin1String("key3"));
+ QCOMPARE(map.count(), 3);
+ QCOMPARE(map.size(), map.count());
+}
+
+QTEST_MAIN(tst_QDeclarativePropertyMap)
+
+#include "tst_qdeclarativepropertymap.moc"
diff --git a/tests/auto/declarative/qdeclarativeqt/data/closestangle.qml b/tests/auto/declarative/qdeclarativeqt/data/closestangle.qml
new file mode 100644
index 0000000000..b5f7fc637d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/closestangle.qml
@@ -0,0 +1,12 @@
+import Qt 4.6
+
+QtObject {
+ property var testSame: Qt.closestAngle(0,1)
+ property var testLess: Qt.closestAngle(0,-359)
+ property var testMore: Qt.closestAngle(0,361)
+ property var testFail: Qt.closestAngle(0)
+ property var test5: Qt.closestAngle(0,1,2)
+ property var test6: Qt.closestAngle(123.45465768,1.11)
+ property var test7: Qt.closestAngle(-3.1415,1.11)
+}
+
diff --git a/tests/auto/declarative/qdeclarativeqt/data/consoleLog.qml b/tests/auto/declarative/qdeclarativeqt/data/consoleLog.qml
new file mode 100644
index 0000000000..e657ff1a4b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/consoleLog.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+QtObject {
+ Component.onCompleted: {
+ console.log("completed", "ok")
+ console.log("completed ok")
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/createComponent.qml b/tests/auto/declarative/qdeclarativeqt/data/createComponent.qml
new file mode 100644
index 0000000000..d9b70ec671
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/createComponent.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+
+QtObject {
+ property bool incorrectArgCount1: false
+ property bool incorrectArgCount2: false
+ property bool emptyArg: false
+
+ property string relativeUrl
+ property string absoluteUrl
+
+ Component.onCompleted: {
+ // Test that using incorrect argument count returns a null object
+ incorrectArgCount1 = (createComponent() == null);
+ incorrectArgCount2 = (createComponent("main.qml", 10) == null);
+ emptyArg = (createComponent("") == null);
+
+ var r = createComponent("createComponentData.qml");
+ relativeUrl = r.url;
+
+ var a = createComponent("http://www.example.com/test.qml");
+ absoluteUrl = a.url;
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/createComponentData.qml b/tests/auto/declarative/qdeclarativeqt/data/createComponentData.qml
new file mode 100644
index 0000000000..a5e99a0ee8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/createComponentData.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+QtObject {
+ property int test: 1913
+}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml b/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml
new file mode 100644
index 0000000000..9150782ffa
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml
@@ -0,0 +1,31 @@
+import Qt 4.6
+
+Item {
+ id: root
+
+ property bool incorrectArgCount1: false
+ property bool incorrectArgCount2: false
+ property bool emptyArg: false
+ property bool noParent: false
+ property bool notReady: false
+ property bool runtimeError: false
+ property bool errors: false
+
+ property bool success: false
+
+ Component.onCompleted: {
+ // errors
+ incorrectArgCount1 = (createQmlObject() == null);
+ incorrectArgCount2 = (createQmlObject("import Qt 4.6\nQtObject{}", root, "main.qml", 10) == null);
+ emptyArg = (createQmlObject("", root) == null);
+ errors = (createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13\nproperty int test: 13\n}", root, "main.qml") == null);
+ noParent = (createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13}", 0) == null);
+ notReady = (createQmlObject("import Qt 4.6\nQtObject{\nBlah{}\n}", root, "http://www.example.com/main.qml") == null);
+ runtimeError = (createQmlObject("import Qt 4.6\nQtObject{property int test\nonTestChanged: QtObject{}\n}", root) == null);
+
+ var o = createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13\n}", root);
+ success = (o.test == 13);
+
+ createQmlObject("import Qt 4.6\nItem {}\n", root);
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/darker.qml b/tests/auto/declarative/qdeclarativeqt/data/darker.qml
new file mode 100644
index 0000000000..2df067e240
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/darker.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+
+QtObject {
+ property var test1: Qt.darker(Qt.rgba(1, 0.8, 0.3))
+ property var test2: Qt.darker()
+ property var test3: Qt.darker(Qt.rgba(1, 0.8, 0.3), 10)
+ property var test4: Qt.darker("red");
+ property var test5: Qt.darker("perfectred"); // Non-existant color
+ property var test6: Qt.darker(10);
+}
+
diff --git a/tests/auto/declarative/qdeclarativeqt/data/enums.qml b/tests/auto/declarative/qdeclarativeqt/data/enums.qml
new file mode 100644
index 0000000000..1efa6f5931
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/enums.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+QtObject {
+ property int test1: Qt.Key_Escape
+ property int test2: Qt.DescendingOrder
+ property int test3: Qt.ElideMiddle
+ property int test4: Qt.AlignRight
+}
+
diff --git a/tests/auto/declarative/qdeclarativeqt/data/formatting.qml b/tests/auto/declarative/qdeclarativeqt/data/formatting.qml
new file mode 100644
index 0000000000..e62749a3ac
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/formatting.qml
@@ -0,0 +1,19 @@
+import Qt 4.6
+
+QtObject {
+ property date date1: "2008-12-24"
+ property string test1: Qt.formatDate(date1)
+ property string test2: Qt.formatDate(date1, Qt.DefaultLocaleLongDate)
+ property string test3: Qt.formatDate(date1, "ddd MMMM d yy")
+
+ property var time1: new Date(0,0,0,14,15,38,200)
+ property string test4: Qt.formatTime(time1)
+ property string test5: Qt.formatTime(time1, Qt.DefaultLocaleLongDate)
+ property string test6: Qt.formatTime(time1, "H:m:s a")
+ property string test7: Qt.formatTime(time1, "hh:mm:ss.zzz")
+
+ property var dateTime1: new Date(1978,2,4,9,13,54)
+ property string test8: Qt.formatDateTime(dateTime1)
+ property string test9: Qt.formatDateTime(dateTime1, Qt.DefaultLocaleLongDate)
+ property string test10: Qt.formatDateTime(dateTime1, "M/d/yy H:m:s a")
+}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/hsla.qml b/tests/auto/declarative/qdeclarativeqt/data/hsla.qml
new file mode 100644
index 0000000000..df51ccdbff
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/hsla.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+
+QtObject {
+ property color test1: Qt.hsla(1, 0, 0, 0.8);
+ property color test2: Qt.hsla(1, 0.5, 0.3);
+ property color test3: Qt.hsla(1, 1);
+ property color test4: Qt.hsla(1, 1, 1, 1, 1);
+ property color test5: Qt.hsla(1.2, 1, 1);
+ property color test6: Qt.hsla(-0.1, 1, 1);
+}
+
diff --git a/tests/auto/declarative/qdeclarativeqt/data/lighter.qml b/tests/auto/declarative/qdeclarativeqt/data/lighter.qml
new file mode 100644
index 0000000000..4e0c43110b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/lighter.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+QtObject {
+ property var test1: Qt.lighter(Qt.rgba(1, 0.8, 0.3))
+ property var test2: Qt.lighter()
+ property var test3: Qt.lighter(Qt.rgba(1, 0.8, 0.3), 10)
+ property var test4: Qt.lighter("red");
+ property var test5: Qt.lighter("perfectred"); // Non-existant color
+ property var test6: Qt.lighter(10);
+}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/md5.qml b/tests/auto/declarative/qdeclarativeqt/data/md5.qml
new file mode 100644
index 0000000000..c474b7185e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/md5.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+QtObject {
+ property string test1: Qt.md5()
+ property string test2: Qt.md5("Hello World")
+}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/point.qml b/tests/auto/declarative/qdeclarativeqt/data/point.qml
new file mode 100644
index 0000000000..c383bebe2f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/point.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+QtObject {
+ property var test1: Qt.point(19, 34);
+ property var test2: Qt.point(-3, 109.2);
+ property var test3: Qt.point(-3);
+ property var test4: Qt.point(-3, 109.2, 1);
+}
+
diff --git a/tests/auto/declarative/qdeclarativeqt/data/rect.qml b/tests/auto/declarative/qdeclarativeqt/data/rect.qml
new file mode 100644
index 0000000000..82b642892d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/rect.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+QtObject {
+ property var test1: Qt.rect(10, 13, 100, 109)
+ property var test2: Qt.rect(-10, 13, 100, 109.6)
+ property var test3: Qt.rect(10, 13);
+ property var test4: Qt.rect(10, 13, 100, 109, 10)
+ property var test5: Qt.rect(10, 13, 100, -109)
+}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/rgba.qml b/tests/auto/declarative/qdeclarativeqt/data/rgba.qml
new file mode 100644
index 0000000000..6dd656584e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/rgba.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+QtObject {
+ property color test1: Qt.rgba(1, 0, 0, 0.8);
+ property color test2: Qt.rgba(1, 0.5, 0.3);
+ property color test3: Qt.rgba(1, 1);
+ property color test4: Qt.rgba(1, 1, 1, 1, 1);
+ property color test5: Qt.rgba(1.2, 1, 1);
+ property color test6: Qt.rgba(-0.1, 1, 1);
+}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/size.qml b/tests/auto/declarative/qdeclarativeqt/data/size.qml
new file mode 100644
index 0000000000..05b0317a9b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/size.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+
+QtObject {
+ property var test1: Qt.size(19, 34);
+ property var test2: Qt.size(3, 109.2);
+ property var test3: Qt.size(-3, 10);
+ property var test4: Qt.size(3);
+ property var test5: Qt.size(3, 109.2, 1);
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativeqt/data/tint.qml b/tests/auto/declarative/qdeclarativeqt/data/tint.qml
new file mode 100644
index 0000000000..478245f063
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/tint.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+QtObject {
+ property color test1: Qt.tint("red", "blue");
+ property color test2: Qt.tint(Qt.rgba(1, 0, 0), Qt.rgba(0, 0, 0, 0));
+ property color test3: Qt.tint("red", Qt.rgba(0, 0, 1, 0.5));
+ property color test4: Qt.tint("red", Qt.rgba(0, 0, 1, 0.5), 10);
+ property color test5: Qt.tint("red")
+}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/vector.qml b/tests/auto/declarative/qdeclarativeqt/data/vector.qml
new file mode 100644
index 0000000000..a471c7a7bb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/vector.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+QtObject {
+ property var test1: Qt.vector3d(1, 0, 0.9);
+ property var test2: Qt.vector3d(102, -10, -982.1);
+ property var test3: Qt.vector3d(102, -10);
+ property var test4: Qt.vector3d(102, -10, -982.1, 10);
+}
diff --git a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
new file mode 100644
index 0000000000..aff00ad14f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
@@ -0,0 +1,9 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+SOURCES += tst_qdeclarativeqt.cpp
+macx:CONFIG -= app_bundle
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
+# LIBS += -lgcov
diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
new file mode 100644
index 0000000000..b70011b7b8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
@@ -0,0 +1,391 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QDebug>
+#include <QDeclarativeEngine>
+#include <QFileInfo>
+#include <QDeclarativeComponent>
+#include <QDir>
+#include <QVector3D>
+#include <QCryptographicHash>
+#include <QDeclarativeItem>
+
+class tst_qdeclarativeqt : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativeqt() {}
+
+private slots:
+ void enums();
+ void rgba();
+ void hsla();
+ void rect();
+ void point();
+ void size();
+ void vector();
+ void lighter();
+ void darker();
+ void tint();
+ void closestAngle();
+ void openUrlExternally();
+ void md5();
+ void createComponent();
+ void createQmlObject();
+ void consoleLog();
+ void formatting();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+inline QUrl TEST_FILE(const QString &filename)
+{
+ return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename);
+}
+
+void tst_qdeclarativeqt::enums()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("enums.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test1").toInt(), (int)Qt::Key_Escape);
+ QCOMPARE(object->property("test2").toInt(), (int)Qt::DescendingOrder);
+ QCOMPARE(object->property("test3").toInt(), (int)Qt::ElideMiddle);
+ QCOMPARE(object->property("test4").toInt(), (int)Qt::AlignRight);
+
+ delete object;
+}
+
+void tst_qdeclarativeqt::rgba()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("rgba.qml"));
+
+ QString warning1 = component.url().toString() + ":6: Unable to assign null to QColor";
+ QString warning2 = component.url().toString() + ":7: Unable to assign null to QColor";
+ QString warning3 = component.url().toString() + ":8: Unable to assign null to QColor";
+ QString warning4 = component.url().toString() + ":9: Unable to assign null to QColor";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning3));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning4));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+
+ QCOMPARE(qvariant_cast<QColor>(object->property("test1")), QColor::fromRgbF(1, 0, 0, 0.8));
+ QCOMPARE(qvariant_cast<QColor>(object->property("test2")), QColor::fromRgbF(1, 0.5, 0.3, 1));
+ QCOMPARE(qvariant_cast<QColor>(object->property("test3")), QColor());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test4")), QColor());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test5")), QColor());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test6")), QColor());
+
+ delete object;
+}
+
+void tst_qdeclarativeqt::hsla()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("hsla.qml"));
+
+ QString warning1 = component.url().toString() + ":6: Unable to assign null to QColor";
+ QString warning2 = component.url().toString() + ":7: Unable to assign null to QColor";
+ QString warning3 = component.url().toString() + ":8: Unable to assign null to QColor";
+ QString warning4 = component.url().toString() + ":9: Unable to assign null to QColor";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning3));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning4));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(qvariant_cast<QColor>(object->property("test1")), QColor::fromHslF(1, 0, 0, 0.8));
+ QCOMPARE(qvariant_cast<QColor>(object->property("test2")), QColor::fromHslF(1, 0.5, 0.3, 1));
+ QCOMPARE(qvariant_cast<QColor>(object->property("test3")), QColor());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test4")), QColor());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test5")), QColor());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test6")), QColor());
+
+ delete object;
+}
+
+void tst_qdeclarativeqt::rect()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("rect.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(qvariant_cast<QRectF>(object->property("test1")), QRectF(10, 13, 100, 109));
+ QCOMPARE(qvariant_cast<QRectF>(object->property("test2")), QRectF(-10, 13, 100, 109.6));
+ QCOMPARE(qvariant_cast<QRectF>(object->property("test3")), QRectF());
+ QCOMPARE(qvariant_cast<QRectF>(object->property("test4")), QRectF());
+ QCOMPARE(qvariant_cast<QRectF>(object->property("test5")), QRectF());
+
+ delete object;
+}
+
+void tst_qdeclarativeqt::point()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("point.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(qvariant_cast<QPointF>(object->property("test1")), QPointF(19, 34));
+ QCOMPARE(qvariant_cast<QPointF>(object->property("test2")), QPointF(-3, 109.2));
+ QCOMPARE(qvariant_cast<QPointF>(object->property("test3")), QPointF());
+ QCOMPARE(qvariant_cast<QPointF>(object->property("test4")), QPointF());
+
+ delete object;
+}
+
+void tst_qdeclarativeqt::size()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("size.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(qvariant_cast<QSizeF>(object->property("test1")), QSizeF(19, 34));
+ QCOMPARE(qvariant_cast<QSizeF>(object->property("test2")), QSizeF(3, 109.2));
+ QCOMPARE(qvariant_cast<QSizeF>(object->property("test3")), QSizeF(-3, 10));
+ QCOMPARE(qvariant_cast<QSizeF>(object->property("test4")), QSizeF());
+ QCOMPARE(qvariant_cast<QSizeF>(object->property("test5")), QSizeF());
+
+ delete object;
+}
+
+void tst_qdeclarativeqt::vector()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("vector.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(qvariant_cast<QVector3D>(object->property("test1")), QVector3D(1, 0, 0.9));
+ QCOMPARE(qvariant_cast<QVector3D>(object->property("test2")), QVector3D(102, -10, -982.1));
+ QCOMPARE(qvariant_cast<QVector3D>(object->property("test3")), QVector3D());
+ QCOMPARE(qvariant_cast<QVector3D>(object->property("test4")), QVector3D());
+
+ delete object;
+}
+
+void tst_qdeclarativeqt::lighter()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("lighter.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(qvariant_cast<QColor>(object->property("test1")), QColor::fromRgbF(1, 0.8, 0.3).lighter());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test2")), QColor());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test3")), QColor());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test4")), QColor("red").lighter());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test5")), QColor());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test6")), QColor());
+
+ delete object;
+}
+
+void tst_qdeclarativeqt::darker()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("darker.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(qvariant_cast<QColor>(object->property("test1")), QColor::fromRgbF(1, 0.8, 0.3).darker());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test2")), QColor());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test3")), QColor());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test4")), QColor("red").darker());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test5")), QColor());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test6")), QColor());
+
+ delete object;
+}
+
+void tst_qdeclarativeqt::tint()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("tint.qml"));
+
+ QString warning1 = component.url().toString() + ":7: Unable to assign null to QColor";
+ QString warning2 = component.url().toString() + ":8: Unable to assign null to QColor";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(qvariant_cast<QColor>(object->property("test1")), QColor::fromRgbF(0, 0, 1));
+ QCOMPARE(qvariant_cast<QColor>(object->property("test2")), QColor::fromRgbF(1, 0, 0));
+ QColor test3 = qvariant_cast<QColor>(object->property("test3"));
+ QCOMPARE(test3.rgba(), 0xFF7F0080);
+ QCOMPARE(qvariant_cast<QColor>(object->property("test4")), QColor());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test5")), QColor());
+
+ delete object;
+}
+
+void tst_qdeclarativeqt::closestAngle()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("closestangle.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(qvariant_cast<qreal>(object->property("testSame")), 1.0);
+ QCOMPARE(qvariant_cast<qreal>(object->property("testLess")), 1.0);
+ QCOMPARE(qvariant_cast<qreal>(object->property("testMore")), 1.0);
+ QCOMPARE(qvariant_cast<qreal>(object->property("testFail")), 0.0);
+ QCOMPARE(qvariant_cast<qreal>(object->property("test5")), 1.0);
+ QCOMPARE(qvariant_cast<qreal>(object->property("test6")), 1.11);
+ QCOMPARE(qvariant_cast<qreal>(object->property("test7")), 1.11);
+
+ delete object;
+}
+
+void tst_qdeclarativeqt::openUrlExternally()
+{
+ QEXPECT_FAIL("", "How do we test this?", Abort);
+ QVERIFY(false);
+}
+
+void tst_qdeclarativeqt::md5()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("md5.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test1").toString(), QLatin1String(QCryptographicHash::hash(QByteArray(), QCryptographicHash::Md5).toHex()));
+ QCOMPARE(object->property("test2").toString(), QLatin1String(QCryptographicHash::hash("Hello World", QCryptographicHash::Md5).toHex()));
+
+ delete object;
+}
+
+void tst_qdeclarativeqt::createComponent()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("createComponent.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("incorrectArgCount1").toBool(), true);
+ QCOMPARE(object->property("incorrectArgCount2").toBool(), true);
+ QCOMPARE(object->property("emptyArg").toBool(), true);
+
+ QCOMPARE(object->property("absoluteUrl").toString(), QString("http://www.example.com/test.qml"));
+ QCOMPARE(object->property("relativeUrl").toString(), TEST_FILE("createComponentData.qml").toString());
+
+ delete object;
+}
+
+void tst_qdeclarativeqt::createQmlObject()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("createQmlObject.qml"));
+
+ QString warning1 = "QDeclarativeEngine::createQmlObject():";
+ QString warning2 = " " + TEST_FILE("main.qml").toString() + ":4:1: Duplicate property name";
+ QString warning3 = "QDeclarativeEngine::createQmlObject(): Component is not ready";
+ QString warning4 = "QDeclarativeEngine::createQmlObject():";
+ QString warning5 = " " + TEST_FILE("inline").toString() + ":3: Cannot assign object type QObject with no default method";
+
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning3));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning4));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning5));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("incorrectArgCount1").toBool(), true);
+ QCOMPARE(object->property("incorrectArgCount2").toBool(), true);
+ QCOMPARE(object->property("emptyArg").toBool(), true);
+ QCOMPARE(object->property("errors").toBool(), true);
+ QCOMPARE(object->property("noParent").toBool(), true);
+ QCOMPARE(object->property("notReady").toBool(), true);
+ QCOMPARE(object->property("runtimeError").toBool(), true);
+ QCOMPARE(object->property("success").toBool(), true);
+
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(object);
+ QVERIFY(item != 0);
+ QVERIFY(item->childItems().count() == 1);
+
+ delete object;
+}
+
+void tst_qdeclarativeqt::consoleLog()
+{
+ QTest::ignoreMessage(QtDebugMsg, "completed ok");
+ QTest::ignoreMessage(QtDebugMsg, "completed ok");
+ QDeclarativeComponent component(&engine, TEST_FILE("consoleLog.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ delete object;
+}
+
+void tst_qdeclarativeqt::formatting()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("formatting.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QDate date1(2008,12,24);
+ QCOMPARE(object->property("date1").toDate(), date1);
+ QCOMPARE(object->property("test1").toString(), date1.toString(Qt::DefaultLocaleShortDate));
+ QCOMPARE(object->property("test2").toString(), date1.toString(Qt::DefaultLocaleLongDate));
+ QCOMPARE(object->property("test3").toString(), date1.toString("ddd MMMM d yy"));
+
+ QTime time1(14,15,38,200);
+ QCOMPARE(object->property("time1").toTime(), time1);
+ QCOMPARE(object->property("test4").toString(), time1.toString(Qt::DefaultLocaleShortDate));
+ QCOMPARE(object->property("test5").toString(), time1.toString(Qt::DefaultLocaleLongDate));
+ QCOMPARE(object->property("test6").toString(), time1.toString("H:m:s a"));
+ QCOMPARE(object->property("test7").toString(), time1.toString("hh:mm:ss.zzz"));
+
+ QDateTime dateTime1(QDate(1978,03,04),QTime(9,13,54));
+ QCOMPARE(object->property("dateTime1").toDateTime(),dateTime1);
+ QCOMPARE(object->property("test8").toString(), dateTime1.toString(Qt::DefaultLocaleShortDate));
+ QCOMPARE(object->property("test9").toString(), dateTime1.toString(Qt::DefaultLocaleLongDate));
+ QCOMPARE(object->property("test10").toString(), dateTime1.toString("M/d/yy H:m:s a"));
+
+ delete object;
+}
+
+QTEST_MAIN(tst_qdeclarativeqt)
+
+#include "tst_qdeclarativeqt.moc"
diff --git a/tests/auto/declarative/qdeclarativerepeater/data/intmodel.qml b/tests/auto/declarative/qdeclarativerepeater/data/intmodel.qml
new file mode 100644
index 0000000000..cf1fb4da6c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativerepeater/data/intmodel.qml
@@ -0,0 +1,29 @@
+import Qt 4.6
+
+Rectangle {
+ id: container
+ objectName: "container"
+ width: 240
+ height: 320
+ color: "white"
+
+ function checkProperties() {
+ testObject.error = false;
+ if (repeater.delegate != comp) {
+ console.log("delegate property incorrect");
+ testObject.error = true;
+ }
+ }
+
+ Component {
+ id: comp
+ Item{}
+ }
+
+ Repeater {
+ id: repeater
+ objectName: "repeater"
+ model: testData
+ delegate: comp
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativerepeater/data/itemlist.qml b/tests/auto/declarative/qdeclarativerepeater/data/itemlist.qml
new file mode 100644
index 0000000000..fc6b34c8ad
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativerepeater/data/itemlist.qml
@@ -0,0 +1,49 @@
+// This example demonstrates placing items in a view using
+// a VisualItemModel
+
+import Qt 4.6
+
+Rectangle {
+ color: "lightgray"
+ width: 240
+ height: 320
+
+ function checkProperties() {
+ testObject.error = false;
+ if (testObject.useModel && view.model != itemModel) {
+ console.log("model property incorrect");
+ testObject.error = true;
+ }
+ }
+
+ VisualItemModel {
+ id: itemModel
+ objectName: "itemModel"
+ Rectangle {
+ objectName: "item1"
+ height: view.height; width: view.width; color: "#FFFEF0"
+ Text { objectName: "text1"; text: "index: " + parent.VisualItemModel.index; font.bold: true; anchors.centerIn: parent }
+ }
+ Rectangle {
+ objectName: "item2"
+ height: view.height; width: view.width; color: "#F0FFF7"
+ Text { objectName: "text2"; text: "index: " + parent.VisualItemModel.index; font.bold: true; anchors.centerIn: parent }
+ }
+ Rectangle {
+ objectName: "item3"
+ height: view.height; width: view.width; color: "#F4F0FF"
+ Text { objectName: "text3"; text: "index: " + parent.VisualItemModel.index; font.bold: true; anchors.centerIn: parent }
+ }
+ }
+
+ Column {
+ objectName: "container"
+ Repeater {
+ id: view
+ objectName: "repeater"
+ anchors.fill: parent
+ anchors.bottomMargin: 30
+ model: testObject.useModel ? itemModel : 0
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml b/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml
new file mode 100644
index 0000000000..e6d0acb849
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+
+Rectangle {
+ id: container
+ objectName: "container"
+ width: 240
+ height: 320
+ color: "white"
+ Repeater {
+ id: repeater
+ objectName: "repeater"
+ model: testData
+ property int errors: 0
+ property int instantiated: 0
+ Component {
+ Item{
+ Component.onCompleted: {if(index!=model.idx) repeater.errors += 1; repeater.instantiated++}
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativerepeater/data/properties.qml b/tests/auto/declarative/qdeclarativerepeater/data/properties.qml
new file mode 100644
index 0000000000..550ce8dba7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativerepeater/data/properties.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+
+Row {
+ Repeater {
+ objectName: "repeater"
+ model: 5
+ Text {
+ text: "I'm item " + index
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/auto/declarative/qdeclarativerepeater/data/repeater.qml b/tests/auto/declarative/qdeclarativerepeater/data/repeater.qml
new file mode 100644
index 0000000000..7d832309b7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativerepeater/data/repeater.qml
@@ -0,0 +1,28 @@
+import Qt 4.6
+
+Rectangle {
+ id: container
+ objectName: "container"
+ width: 240
+ height: 320
+ color: "white"
+ Text {
+ text: "Zero"
+ }
+ Repeater {
+ id: repeater
+ objectName: "repeater"
+ width: 240
+ height: 320
+ model: testData
+ Component {
+ Text {
+ y: index*20
+ text: modelData
+ }
+ }
+ }
+ Text {
+ text: "Last"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml b/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml
new file mode 100644
index 0000000000..c3c3260e39
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml
@@ -0,0 +1,35 @@
+import Qt 4.6
+
+Rectangle {
+ width: 240
+ height: 320
+ color: "white"
+ Component {
+ id: myDelegate
+ Item {
+ objectName: "myDelegate"
+ height: 20
+ Text {
+ y: index*20
+ text: name
+ }
+ Text {
+ y: index*20
+ x: 100
+ text: number
+ }
+ }
+ }
+ Column {
+ id: container
+ objectName: "container"
+ Repeater {
+ id: repeater
+ objectName: "repeater"
+ width: 240
+ height: 320
+ delegate: myDelegate
+ model: testData
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro b/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
new file mode 100644
index 0000000000..132123a827
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativerepeater.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
new file mode 100644
index 0000000000..7a97e60217
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
@@ -0,0 +1,385 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QtTest/QSignalSpy>
+#include <private/qlistmodelinterface_p.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativeview.h>
+#include <QtDeclarative/qdeclarativecontext.h>
+#include <private/qdeclarativerepeater_p.h>
+#include <private/qdeclarativetext_p.h>
+
+inline QUrl TEST_FILE(const QString &filename)
+{
+ return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename);
+}
+
+class tst_QDeclarativeRepeater : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QDeclarativeRepeater();
+
+private slots:
+ void numberModel();
+ void objectList();
+ void stringList();
+ void dataModel();
+ void itemModel();
+ void properties();
+
+private:
+ QDeclarativeView *createView();
+ template<typename T>
+ T *findItem(QGraphicsObject *parent, const QString &id);
+};
+
+class TestObject : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(bool error READ error WRITE setError)
+ Q_PROPERTY(bool useModel READ useModel NOTIFY useModelChanged)
+
+public:
+ TestObject() : QObject(), mError(true), mUseModel(false) {}
+
+ bool error() const { return mError; }
+ void setError(bool err) { mError = err; }
+
+ bool useModel() const { return mUseModel; }
+ void setUseModel(bool use) { mUseModel = use; emit useModelChanged(); }
+
+signals:
+ void useModelChanged();
+
+private:
+ bool mError;
+ bool mUseModel;
+};
+
+class TestModel : public QAbstractListModel
+{
+public:
+ enum Roles { Name = Qt::UserRole+1, Number = Qt::UserRole+2 };
+
+ TestModel(QObject *parent=0) : QAbstractListModel(parent) {
+ QHash<int, QByteArray> roles;
+ roles[Name] = "name";
+ roles[Number] = "number";
+ setRoleNames(roles);
+ }
+
+ int rowCount(const QModelIndex &parent=QModelIndex()) const { return list.count(); }
+ QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const {
+ QVariant rv;
+ if (role == Name)
+ rv = list.at(index.row()).first;
+ else if (role == Number)
+ rv = list.at(index.row()).second;
+
+ return rv;
+ }
+
+ int count() const { return rowCount(); }
+ QString name(int index) const { return list.at(index).first; }
+ QString number(int index) const { return list.at(index).second; }
+
+ void addItem(const QString &name, const QString &number) {
+ emit beginInsertRows(QModelIndex(), list.count(), list.count());
+ list.append(QPair<QString,QString>(name, number));
+ emit endInsertRows();
+ }
+
+ void insertItem(int index, const QString &name, const QString &number) {
+ emit beginInsertRows(QModelIndex(), index, index);
+ list.insert(index, QPair<QString,QString>(name, number));
+ emit endInsertRows();
+ }
+
+ void removeItem(int index) {
+ emit beginRemoveRows(QModelIndex(), index, index);
+ list.removeAt(index);
+ emit endRemoveRows();
+ }
+
+ void moveItem(int from, int to) {
+ emit beginMoveRows(QModelIndex(), from, from, QModelIndex(), to);
+ list.move(from, to);
+ emit endMoveRows();
+ }
+
+ void modifyItem(int idx, const QString &name, const QString &number) {
+ list[idx] = QPair<QString,QString>(name, number);
+ emit dataChanged(index(idx,0), index(idx,0));
+ }
+
+private:
+ QList<QPair<QString,QString> > list;
+};
+
+
+tst_QDeclarativeRepeater::tst_QDeclarativeRepeater()
+{
+}
+
+void tst_QDeclarativeRepeater::numberModel()
+{
+ QDeclarativeView *canvas = createView();
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testData", 5);
+ TestObject *testObject = new TestObject;
+ ctxt->setContextProperty("testObject", testObject);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/intmodel.qml"));
+ qApp->processEvents();
+
+ QDeclarativeRepeater *repeater = findItem<QDeclarativeRepeater>(canvas->rootObject(), "repeater");
+ QVERIFY(repeater != 0);
+ QCOMPARE(repeater->parentItem()->childItems().count(), 5+1);
+
+ QMetaObject::invokeMethod(canvas->rootObject(), "checkProperties");
+ QVERIFY(testObject->error() == false);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeRepeater::objectList()
+{
+ QDeclarativeView *canvas = createView();
+
+ QObjectList data;
+ for(int i=0; i<100; i++){
+ data << new QObject();
+ data.back()->setProperty("idx", i);
+ }
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testData", QVariant::fromValue(data));
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/objlist.qml"));
+ qApp->processEvents();
+
+ QDeclarativeRepeater *repeater = findItem<QDeclarativeRepeater>(canvas->rootObject(), "repeater");
+ QVERIFY(repeater != 0);
+ QCOMPARE(repeater->property("errors").toInt(), 0);//If this fails either they are out of order or can't find the object's data
+ QCOMPARE(repeater->property("instantiated").toInt(), 100);
+}
+
+/*
+The Repeater element creates children at its own position in its parent's
+stacking order. In this test we insert a repeater between two other Text
+elements to test this.
+*/
+void tst_QDeclarativeRepeater::stringList()
+{
+ QDeclarativeView *canvas = createView();
+
+ QStringList data;
+ data << "One";
+ data << "Two";
+ data << "Three";
+ data << "Four";
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("testData", data);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/repeater.qml"));
+ qApp->processEvents();
+
+ QDeclarativeRepeater *repeater = findItem<QDeclarativeRepeater>(canvas->rootObject(), "repeater");
+ QVERIFY(repeater != 0);
+
+ QDeclarativeItem *container = findItem<QDeclarativeItem>(canvas->rootObject(), "container");
+ QVERIFY(container != 0);
+
+ QCOMPARE(container->childItems().count(), data.count() + 3);
+
+ bool saw_repeater = false;
+ for (int i = 0; i < container->childItems().count(); ++i) {
+
+ if (i == 0) {
+ QDeclarativeText *name = qobject_cast<QDeclarativeText*>(container->childItems().at(i));
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), QLatin1String("Zero"));
+ } else if (i == container->childItems().count() - 2) {
+ // The repeater itself
+ QDeclarativeRepeater *rep = qobject_cast<QDeclarativeRepeater*>(container->childItems().at(i));
+ QCOMPARE(rep, repeater);
+ saw_repeater = true;
+ continue;
+ } else if (i == container->childItems().count() - 1) {
+ QDeclarativeText *name = qobject_cast<QDeclarativeText*>(container->childItems().at(i));
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), QLatin1String("Last"));
+ } else {
+ QDeclarativeText *name = qobject_cast<QDeclarativeText*>(container->childItems().at(i));
+ QVERIFY(name != 0);
+ QCOMPARE(name->text(), data.at(i-1));
+ }
+ }
+ QVERIFY(saw_repeater);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeRepeater::dataModel()
+{
+ QDeclarativeView *canvas = createView();
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ TestObject *testObject = new TestObject;
+ ctxt->setContextProperty("testObject", testObject);
+
+ TestModel testModel;
+ testModel.addItem("one", "1");
+ testModel.addItem("two", "2");
+ testModel.addItem("three", "3");
+
+ ctxt->setContextProperty("testData", &testModel);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/repeater2.qml"));
+ qApp->processEvents();
+
+ QDeclarativeRepeater *repeater = findItem<QDeclarativeRepeater>(canvas->rootObject(), "repeater");
+ QVERIFY(repeater != 0);
+
+ QDeclarativeItem *container = findItem<QDeclarativeItem>(canvas->rootObject(), "container");
+ QVERIFY(container != 0);
+
+ QCOMPARE(container->childItems().count(), 4);
+
+ testModel.addItem("four", "4");
+ QCOMPARE(container->childItems().count(), 5);
+
+ testModel.removeItem(2);
+ QCOMPARE(container->childItems().count(), 4);
+}
+
+void tst_QDeclarativeRepeater::itemModel()
+{
+ QDeclarativeView *canvas = createView();
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ TestObject *testObject = new TestObject;
+ ctxt->setContextProperty("testObject", testObject);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/itemlist.qml"));
+ qApp->processEvents();
+
+ QDeclarativeRepeater *repeater = findItem<QDeclarativeRepeater>(canvas->rootObject(), "repeater");
+ QVERIFY(repeater != 0);
+
+ QDeclarativeItem *container = findItem<QDeclarativeItem>(canvas->rootObject(), "container");
+ QVERIFY(container != 0);
+
+ QCOMPARE(container->childItems().count(), 1);
+
+ testObject->setUseModel(true);
+ QMetaObject::invokeMethod(canvas->rootObject(), "checkProperties");
+ QVERIFY(testObject->error() == false);
+
+ QCOMPARE(container->childItems().count(), 4);
+ QVERIFY(qobject_cast<QObject*>(container->childItems().at(0))->objectName() == "item1");
+ QVERIFY(qobject_cast<QObject*>(container->childItems().at(1))->objectName() == "item2");
+ QVERIFY(qobject_cast<QObject*>(container->childItems().at(2))->objectName() == "item3");
+ QVERIFY(container->childItems().at(3) == repeater);
+
+ delete canvas;
+}
+
+void tst_QDeclarativeRepeater::properties()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, TEST_FILE("/properties.qml"));
+
+ QDeclarativeItem *rootObject = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(rootObject);
+
+ QDeclarativeRepeater *repeater = findItem<QDeclarativeRepeater>(rootObject, "repeater");
+ QVERIFY(repeater);
+
+ QSignalSpy modelSpy(repeater, SIGNAL(modelChanged()));
+ repeater->setModel(3);
+ QCOMPARE(modelSpy.count(),1);
+ repeater->setModel(3);
+ QCOMPARE(modelSpy.count(),1);
+
+ QSignalSpy delegateSpy(repeater, SIGNAL(delegateChanged()));
+
+ QDeclarativeComponent rectComponent(&engine);
+ rectComponent.setData("import Qt 4.6; Rectangle {}", QUrl::fromLocalFile(""));
+
+ repeater->setDelegate(&rectComponent);
+ QCOMPARE(delegateSpy.count(),1);
+ repeater->setDelegate(&rectComponent);
+ QCOMPARE(delegateSpy.count(),1);
+}
+
+QDeclarativeView *tst_QDeclarativeRepeater::createView()
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setFixedSize(240,320);
+
+ return canvas;
+}
+
+template<typename T>
+T *tst_QDeclarativeRepeater::findItem(QGraphicsObject *parent, const QString &objectName)
+{
+ const QMetaObject &mo = T::staticMetaObject;
+ if (mo.cast(parent) && (objectName.isEmpty() || parent->objectName() == objectName))
+ return static_cast<T*>(parent);
+ for (int i = 0; i < parent->childItems().count(); ++i) {
+ QDeclarativeItem *child = qobject_cast<QDeclarativeItem*>(parent->childItems().at(i));
+ if (!child)
+ continue;
+ QDeclarativeItem *item = findItem<T>(child, objectName);
+ if (item)
+ return static_cast<T*>(item);
+ }
+
+ return 0;
+}
+
+QTEST_MAIN(tst_QDeclarativeRepeater)
+
+#include "tst_qdeclarativerepeater.moc"
diff --git a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow1.qml b/tests/auto/declarative/qdeclarativespringfollow/data/springfollow1.qml
new file mode 100644
index 0000000000..959d206b37
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativespringfollow/data/springfollow1.qml
@@ -0,0 +1,4 @@
+import Qt 4.6
+
+SpringFollow {
+}
diff --git a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow2.qml b/tests/auto/declarative/qdeclarativespringfollow/data/springfollow2.qml
new file mode 100644
index 0000000000..7c81fb5b8d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativespringfollow/data/springfollow2.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+SpringFollow {
+ source: 1.44; velocity: 0.9
+ spring: 1.0; damping: 0.5
+ epsilon: 0.25; modulus: 360.0
+ mass: 2.0; enabled: true
+}
diff --git a/tests/auto/declarative/qdeclarativespringfollow/data/springfollow3.qml b/tests/auto/declarative/qdeclarativespringfollow/data/springfollow3.qml
new file mode 100644
index 0000000000..6fec55bdf2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativespringfollow/data/springfollow3.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+SpringFollow {
+ source: 1.44; velocity: 0.9
+ spring: 1.0; damping: 0.5
+ epsilon: 0.25; modulus: 360.0
+ mass: 2.0; enabled: false
+}
diff --git a/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro b/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro
new file mode 100644
index 0000000000..61aad0f65c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativespringfollow.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp b/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp
new file mode 100644
index 0000000000..7a60e78b6f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativespringfollow_p.h>
+#include <private/qdeclarativevaluetype_p.h>
+#include "../../../shared/util.h"
+
+class tst_qdeclarativespringfollow : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativespringfollow();
+
+private slots:
+ void defaultValues();
+ void values();
+ void disabled();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+tst_qdeclarativespringfollow::tst_qdeclarativespringfollow()
+{
+}
+
+void tst_qdeclarativespringfollow::defaultValues()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/springfollow1.qml"));
+ QDeclarativeSpringFollow *obj = qobject_cast<QDeclarativeSpringFollow*>(c.create());
+
+ QVERIFY(obj != 0);
+
+ QCOMPARE(obj->sourceValue(), 0.);
+ QCOMPARE(obj->velocity(), 0.);
+ QCOMPARE(obj->spring(), 0.);
+ QCOMPARE(obj->damping(), 0.);
+ QCOMPARE(obj->epsilon(), 0.01);
+ QCOMPARE(obj->modulus(), 0.);
+ QCOMPARE(obj->value(), 0.);
+ QCOMPARE(obj->mass(), 1.);
+ QCOMPARE(obj->enabled(), true);
+ QCOMPARE(obj->inSync(), true);
+
+ delete obj;
+}
+
+void tst_qdeclarativespringfollow::values()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/springfollow2.qml"));
+ QDeclarativeSpringFollow *obj = qobject_cast<QDeclarativeSpringFollow*>(c.create());
+
+ QVERIFY(obj != 0);
+
+ QCOMPARE(obj->sourceValue(), 1.44);
+ QCOMPARE(obj->velocity(), 0.9);
+ QCOMPARE(obj->spring(), 1.0);
+ QCOMPARE(obj->damping(), 0.5);
+ QCOMPARE(obj->epsilon(), 0.25);
+ QCOMPARE(obj->modulus(), 360.0);
+ QCOMPARE(obj->mass(), 2.0);
+ QCOMPARE(obj->enabled(), true);
+
+ QTRY_COMPARE(obj->value(), 1.44);
+ QTRY_COMPARE(obj->inSync(), true);
+
+ delete obj;
+}
+
+void tst_qdeclarativespringfollow::disabled()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/springfollow3.qml"));
+ QDeclarativeSpringFollow *obj = qobject_cast<QDeclarativeSpringFollow*>(c.create());
+
+ QVERIFY(obj != 0);
+
+ QCOMPARE(obj->sourceValue(), 1.44);
+ QCOMPARE(obj->velocity(), 0.9);
+ QCOMPARE(obj->spring(), 1.0);
+ QCOMPARE(obj->damping(), 0.5);
+ QCOMPARE(obj->epsilon(), 0.25);
+ QCOMPARE(obj->modulus(), 360.0);
+ QCOMPARE(obj->mass(), 2.0);
+ QCOMPARE(obj->enabled(), false);
+
+ QCOMPARE(obj->value(), 0.0);
+ QCOMPARE(obj->inSync(), false);
+
+ delete obj;
+}
+
+QTEST_MAIN(tst_qdeclarativespringfollow)
+
+#include "tst_qdeclarativespringfollow.moc"
diff --git a/tests/auto/declarative/qdeclarativestates/data/ExtendedRectangle.qml b/tests/auto/declarative/qdeclarativestates/data/ExtendedRectangle.qml
new file mode 100644
index 0000000000..8d646635df
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/ExtendedRectangle.qml
@@ -0,0 +1,19 @@
+import Qt 4.6
+Rectangle {
+ id: extendedRect
+ objectName: "extendedRect"
+ property color extendedColor: "orange"
+
+ width: 100; height: 100
+ color: "red"
+ states: State {
+ name: "green"
+ PropertyChanges {
+ target: rect
+ onDidSomething: {
+ extendedRect.color = "green"
+ extendedColor = "green"
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges.qml
new file mode 100644
index 0000000000..7dce88955b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+
+Rectangle {
+ id: container
+ width: 200; height: 200
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ width: 50; height: 50
+ color: "green";
+ anchors.left: parent.left
+ anchors.leftMargin: 5
+ }
+ states: State {
+ name: "right"
+ AnchorChanges {
+ id: ancCh
+ target: myRect;
+ reset: "left"
+ right: container.right
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml
new file mode 100644
index 0000000000..545345e539
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+
+Rectangle {
+ width: 200; height: 200
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ width: 50; height: 50
+ color: "green";
+ anchors.left: parent.left
+ anchors.leftMargin: 5
+ }
+ states: State {
+ name: "right"
+ AnchorChanges {
+ target: myRect;
+ reset: "left"
+ right: parent.right
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml
new file mode 100644
index 0000000000..9d5b317786
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml
@@ -0,0 +1,29 @@
+import Qt 4.6
+
+Rectangle {
+ id: container
+ width: 200; height: 200
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ color: "green";
+ anchors.left: parent.left
+ anchors.right: rightGuideline.left
+ anchors.top: topGuideline.top
+ anchors.bottom: container.bottom
+ }
+ Item { objectName: "LeftGuideline"; id: leftGuideline; x: 10 }
+ Item { id: rightGuideline; x: 150 }
+ Item { id: topGuideline; y: 10 }
+ Item { objectName: "BottomGuideline"; id: bottomGuideline; y: 150 }
+ states: State {
+ name: "reanchored"
+ AnchorChanges {
+ target: myRect;
+ left: leftGuideline.left
+ right: container.right
+ top: container.top
+ bottom: bottomGuideline.bottom
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml
new file mode 100644
index 0000000000..f12898908d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml
@@ -0,0 +1,22 @@
+import Qt 4.6
+
+Rectangle {
+ width: 200; height: 200
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ color: "green";
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ Item { objectName: "LeftGuideline"; id: leftGuideline; x: 10 }
+ Item { objectName: "BottomGuideline"; id: bottomGuideline; y: 150 }
+ states: State {
+ name: "reanchored"
+ AnchorChanges {
+ target: myRect;
+ horizontalCenter: bottomGuideline.horizontalCenter
+ verticalCenter: leftGuideline.verticalCenter
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml
new file mode 100644
index 0000000000..4e6d34b25f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml
@@ -0,0 +1,22 @@
+import Qt 4.6
+
+Rectangle {
+ width: 200; height: 200
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ color: "green";
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.baseline: parent.baseline
+ }
+ Item { objectName: "LeftGuideline"; id: leftGuideline; x: 10 }
+ Item { objectName: "BottomGuideline"; id: bottomGuideline; y: 150 }
+ states: State {
+ name: "reanchored"
+ AnchorChanges {
+ target: myRect;
+ horizontalCenter: bottomGuideline.horizontalCenter
+ baseline: leftGuideline.baseline
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml b/tests/auto/declarative/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml
new file mode 100644
index 0000000000..693a5c5a0e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml
@@ -0,0 +1,18 @@
+import Qt 4.6
+
+Item {
+ id: root
+ property int input: 1
+ property int test: 9
+
+ states: [
+ State {
+ name: "portrait"
+ when: root.input == 1
+ PropertyChanges {
+ target: root
+ test: 3
+ }
+ }
+ ]
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicBinding.qml b/tests/auto/declarative/qdeclarativestates/data/basicBinding.qml
new file mode 100644
index 0000000000..652811380f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/basicBinding.qml
@@ -0,0 +1,12 @@
+import Qt 4.6
+Rectangle {
+ id: myRectangle
+
+ property color sourceColor: "blue"
+ width: 100; height: 100
+ color: "red"
+ states: State {
+ name: "blue"
+ PropertyChanges { target: myRectangle; color: sourceColor }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicBinding2.qml b/tests/auto/declarative/qdeclarativestates/data/basicBinding2.qml
new file mode 100644
index 0000000000..2e7b4cf614
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/basicBinding2.qml
@@ -0,0 +1,12 @@
+import Qt 4.6
+Rectangle {
+ id: myRectangle
+
+ property color sourceColor: "red"
+ width: 100; height: 100
+ color: sourceColor
+ states: State {
+ name: "blue"
+ PropertyChanges { target: myRectangle; color: "blue" }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicBinding3.qml b/tests/auto/declarative/qdeclarativestates/data/basicBinding3.qml
new file mode 100644
index 0000000000..a3c47d9db6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/basicBinding3.qml
@@ -0,0 +1,13 @@
+import Qt 4.6
+Rectangle {
+ id: myRectangle
+
+ property color sourceColor: "red"
+ property color sourceColor2: "blue"
+ width: 100; height: 100
+ color: sourceColor
+ states: State {
+ name: "blue"
+ PropertyChanges { target: myRectangle; color: sourceColor2 }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicBinding4.qml b/tests/auto/declarative/qdeclarativestates/data/basicBinding4.qml
new file mode 100644
index 0000000000..1f52d0e773
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/basicBinding4.qml
@@ -0,0 +1,17 @@
+import Qt 4.6
+Rectangle {
+ id: myRectangle
+
+ property color sourceColor: "blue"
+ width: 100; height: 100
+ color: "red"
+ states: [
+ State {
+ name: "blue"
+ PropertyChanges { target: myRectangle; color: sourceColor }
+ },
+ State {
+ name: "green"
+ PropertyChanges { target: myRectangle; color: "green" }
+ }]
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicChanges.qml b/tests/auto/declarative/qdeclarativestates/data/basicChanges.qml
new file mode 100644
index 0000000000..88ea2565ed
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/basicChanges.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+Rectangle {
+ id: myRectangle
+ width: 100; height: 100
+ color: "red"
+ states: State {
+ name: "blue"
+ PropertyChanges { target: myRectangle; color: "blue" }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicChanges2.qml b/tests/auto/declarative/qdeclarativestates/data/basicChanges2.qml
new file mode 100644
index 0000000000..4dd293f6f0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/basicChanges2.qml
@@ -0,0 +1,15 @@
+import Qt 4.6
+Rectangle {
+ id: myRectangle
+ width: 100; height: 100
+ color: "red"
+ states: [
+ State {
+ name: "blue"
+ PropertyChanges { target: myRectangle; color: "blue" }
+ },
+ State {
+ name: "green"
+ PropertyChanges { target: myRectangle; color: "green" }
+ }]
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicChanges3.qml b/tests/auto/declarative/qdeclarativestates/data/basicChanges3.qml
new file mode 100644
index 0000000000..62ab1d58a6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/basicChanges3.qml
@@ -0,0 +1,15 @@
+import Qt 4.6
+Rectangle {
+ id: myRectangle
+ width: 100; height: 100
+ color: "red"
+ states: [
+ State {
+ name: "blue"
+ PropertyChanges { target: myRectangle; color: "blue" }
+ },
+ State {
+ name: "bordered"
+ PropertyChanges { target: myRectangle; border.width: 2 }
+ }]
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml b/tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml
new file mode 100644
index 0000000000..a373cfcde6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml
@@ -0,0 +1,19 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyRectangle {
+ id: rect
+ width: 100; height: 100
+ color: "red"
+
+ states: State {
+ name: "aBlueDay"
+ PropertyChanges {
+ target: rect
+ onPropertyWithNotifyChanged: { rect.color = "blue"; }
+ }
+ }
+
+ Component.onCompleted: rect.state = "aBlueDay"
+}
+
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicExtension.qml b/tests/auto/declarative/qdeclarativestates/data/basicExtension.qml
new file mode 100644
index 0000000000..1836f8a077
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/basicExtension.qml
@@ -0,0 +1,16 @@
+import Qt 4.6
+Rectangle {
+ id: myRectangle
+ width: 100; height: 100
+ color: "red"
+ states: [
+ State {
+ name: "blue"
+ PropertyChanges { target: myRectangle; color: "blue" }
+ },
+ State {
+ name: "bordered"
+ extend: "blue"
+ PropertyChanges { target: myRectangle; border.width: 2 }
+ }]
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/deleting.qml b/tests/auto/declarative/qdeclarativestates/data/deleting.qml
new file mode 100644
index 0000000000..3da0b12356
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/deleting.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+Rectangle {
+ id: myRectangle
+ width: 100; height: 100
+ color: "red"
+ states: State {
+ name: "blue"
+ PropertyChanges { target: myRectangle; color: "blue"; objectName: "pc1" }
+ PropertyChanges { target: myRectangle; radius: 5; objectName: "pc2" }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/deletingState.qml b/tests/auto/declarative/qdeclarativestates/data/deletingState.qml
new file mode 100644
index 0000000000..a5e8ed3a97
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/deletingState.qml
@@ -0,0 +1,13 @@
+import Qt 4.6
+Rectangle {
+ id: myRectangle
+ width: 100; height: 100
+ color: "red"
+ StateGroup {
+ id: stateGroup
+ states: State {
+ name: "blue"
+ PropertyChanges { target: myRectangle; color: "blue" }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/explicit.qml b/tests/auto/declarative/qdeclarativestates/data/explicit.qml
new file mode 100644
index 0000000000..7543f84414
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/explicit.qml
@@ -0,0 +1,15 @@
+import Qt 4.6
+Rectangle {
+ id: myRectangle
+ property color sourceColor: "blue"
+ width: 100; height: 100
+ color: "red"
+ states: State {
+ name: "blue"
+ PropertyChanges {
+ objectName: "changes"
+ target: myRectangle; explicit: true
+ color: sourceColor
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/fakeExtension.qml b/tests/auto/declarative/qdeclarativestates/data/fakeExtension.qml
new file mode 100644
index 0000000000..c7975e12ef
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/fakeExtension.qml
@@ -0,0 +1,16 @@
+import Qt 4.6
+Rectangle {
+ id: myRectangle
+ width: 100; height: 100
+ color: "red"
+ states: [
+ State {
+ name: "blue"
+ PropertyChanges { target: myRectangle; color: "blue" }
+ },
+ State {
+ name: "green"
+ extend: "blue"
+ PropertyChanges { target: myRectangle; color: "green" }
+ }]
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/illegalTempState.qml b/tests/auto/declarative/qdeclarativestates/data/illegalTempState.qml
new file mode 100644
index 0000000000..0dc39ae155
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/illegalTempState.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+
+Rectangle {
+ id: card
+ width: 100; height: 100
+
+ states: [
+ State {
+ name: "placed"
+ PropertyChanges { target: card; state: "idle" }
+ },
+ State {
+ name: "idle"
+ }
+ ]
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: card.state = "placed"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/legalTempState.qml b/tests/auto/declarative/qdeclarativestates/data/legalTempState.qml
new file mode 100644
index 0000000000..9be984cc30
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/legalTempState.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+
+Rectangle {
+ id: card
+ width: 100; height: 100
+
+ states: [
+ State {
+ name: "placed"
+ onCompleted: card.state = "idle"
+ StateChangeScript { script: console.log("entering placed") }
+ },
+ State {
+ name: "idle"
+ StateChangeScript { script: console.log("entering idle") }
+ }
+ ]
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: card.state = "placed"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/nonExistantProp.qml b/tests/auto/declarative/qdeclarativestates/data/nonExistantProp.qml
new file mode 100644
index 0000000000..a5dd86a71c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/nonExistantProp.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+Rectangle {
+ id: myRectangle
+
+ width: 100; height: 100
+ color: "red"
+ states: State {
+ name: "blue"
+ PropertyChanges { target: myRectangle; colr: "blue" }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange.qml
new file mode 100644
index 0000000000..b8c781808e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/parentChange.qml
@@ -0,0 +1,37 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400; height: 400
+ Item {
+ x: 10; y: 10
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ x: 5
+ width: 100; height: 100
+ color: "red"
+ }
+ }
+ MouseArea {
+ id: clickable
+ anchors.fill: parent
+ }
+
+ Item {
+ x: -100; y: -50
+ Item {
+ id: newParent
+ objectName: "NewParent"
+ x: 248; y: 360
+ }
+ }
+
+ states: State {
+ name: "reparented"
+ when: clickable.pressed
+ ParentChange {
+ target: myRect
+ parent: newParent
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange2.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange2.qml
new file mode 100644
index 0000000000..8b23591350
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/parentChange2.qml
@@ -0,0 +1,31 @@
+import Qt 4.6
+
+Rectangle {
+ id: newParent
+ width: 400; height: 400
+ Item {
+ scale: .5
+ rotation: 15
+ x: 10; y: 10
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ x: 5
+ width: 100; height: 100
+ color: "red"
+ }
+ }
+ MouseArea {
+ id: clickable
+ anchors.fill: parent
+ }
+
+ states: State {
+ name: "reparented"
+ when: clickable.pressed
+ ParentChange {
+ target: myRect
+ parent: newParent
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange3.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange3.qml
new file mode 100644
index 0000000000..ddf92683a8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/parentChange3.qml
@@ -0,0 +1,42 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400; height: 400
+ Item {
+ scale: .5
+ rotation: 15
+ transformOrigin: "Center"
+ x: 10; y: 10
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ x: 5
+ width: 100; height: 100
+ transformOrigin: "BottomLeft"
+ color: "red"
+ }
+ }
+ MouseArea {
+ id: clickable
+ anchors.fill: parent
+ }
+
+ Item {
+ x: 200; y: 200
+ rotation: 52;
+ scale: 2
+ Item {
+ id: newParent
+ x: 100; y: 100
+ }
+ }
+
+ states: State {
+ name: "reparented"
+ when: clickable.pressed
+ ParentChange {
+ target: myRect
+ parent: newParent
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange4.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange4.qml
new file mode 100644
index 0000000000..34d667a0c4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/parentChange4.qml
@@ -0,0 +1,30 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400; height: 400
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ x: 5; y: 5
+ width: 100; height: 100
+ color: "red"
+ }
+ MouseArea {
+ id: clickable
+ anchors.fill: parent
+ }
+
+ Item {
+ id: newParent
+ transform: Scale { xScale: .5; yScale: .7}
+ }
+
+ states: State {
+ name: "reparented"
+ when: clickable.pressed
+ ParentChange {
+ target: myRect
+ parent: newParent
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange5.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange5.qml
new file mode 100644
index 0000000000..56bdd89b7e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/parentChange5.qml
@@ -0,0 +1,30 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400; height: 400
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ x: 5; y: 5
+ width: 100; height: 100
+ color: "red"
+ }
+ MouseArea {
+ id: clickable
+ anchors.fill: parent
+ }
+
+ Item {
+ id: newParent
+ transform: Rotation { angle: 30; axis { x: 0; y: 1; z: 0 } }
+ }
+
+ states: State {
+ name: "reparented"
+ when: clickable.pressed
+ ParentChange {
+ target: myRect
+ parent: newParent
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml b/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml
new file mode 100644
index 0000000000..080e833879
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+Rectangle {
+ id: myRectangle
+ width: 100; height: 100
+ color: "red"
+ states: State {
+ name: "blue"
+ PropertyChanges { target: myRectangle; colr: "blue"; wantsFocus: true }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/reset.qml b/tests/auto/declarative/qdeclarativestates/data/reset.qml
new file mode 100644
index 0000000000..a0a2b8c8c5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/reset.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+Rectangle {
+ width: 640
+ height: 480
+ Text {
+ id: theText
+ width: 50
+ wrap: true
+ text: "a text string that is longer than 50 pixels"
+ }
+
+ states: State {
+ name: "state1"
+ PropertyChanges {
+ target: theText
+ width: undefined
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/restoreEntryValues.qml b/tests/auto/declarative/qdeclarativestates/data/restoreEntryValues.qml
new file mode 100644
index 0000000000..088c6081c6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/restoreEntryValues.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+Rectangle {
+ id: myRectangle
+ width: 100; height: 100
+ color: "red"
+ states: State {
+ name: "blue"
+ PropertyChanges {
+ target: myRectangle
+ restoreEntryValues: false
+ color: "blue"
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/script.qml b/tests/auto/declarative/qdeclarativestates/data/script.qml
new file mode 100644
index 0000000000..3c5f33e9e4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/script.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+Rectangle {
+ id: myRectangle
+ width: 100; height: 100
+ color: "red"
+ states: State {
+ name: "blue"
+ StateChangeScript { script: myRectangle.color = "blue"; }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverride.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverride.qml
new file mode 100644
index 0000000000..5ba1566b39
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/signalOverride.qml
@@ -0,0 +1,18 @@
+import Qt 4.6
+import Qt.test 1.0
+
+MyRectangle {
+ id: rect
+
+ onDidSomething: color = "blue"
+
+ width: 100; height: 100
+ color: "red"
+ states: State {
+ name: "green"
+ PropertyChanges {
+ target: rect
+ onDidSomething: color = "green"
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverride2.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverride2.qml
new file mode 100644
index 0000000000..527e165048
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/signalOverride2.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+import Qt.test 1.0
+
+MyRectangle {
+ id: rect
+ onDidSomething: color = "blue"
+ width: 100; height: 100
+ ExtendedRectangle {}
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash.qml
new file mode 100644
index 0000000000..702fa86964
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash.qml
@@ -0,0 +1,15 @@
+import Qt 4.6
+import Qt.test 1.0
+
+MyRectangle {
+ id: rect
+
+ width: 100; height: 100
+ states: State {
+ name: "overridden"
+ PropertyChanges {
+ target: rect
+ onDidSomething: rect.state = ""
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
new file mode 100644
index 0000000000..f874803511
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativestates.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
new file mode 100644
index 0000000000..8d3ca7a837
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
@@ -0,0 +1,969 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativeanchors_p_p.h>
+#include <private/qdeclarativerectangle_p.h>
+#include <private/qdeclarativetext_p.h>
+#include <private/qdeclarativepropertychanges_p.h>
+#include <private/qdeclarativestategroup_p.h>
+
+
+class MyRect : public QDeclarativeRectangle
+{
+ Q_OBJECT
+ Q_PROPERTY(int propertyWithNotify READ propertyWithNotify WRITE setPropertyWithNotify NOTIFY oddlyNamedNotifySignal)
+public:
+ MyRect() {}
+
+ void doSomething() { emit didSomething(); }
+
+ int propertyWithNotify() const { return m_prop; }
+ void setPropertyWithNotify(int i) { m_prop = i; emit oddlyNamedNotifySignal(); }
+Q_SIGNALS:
+ void didSomething();
+ void oddlyNamedNotifySignal();
+
+private:
+ int m_prop;
+};
+
+QML_DECLARE_TYPE(MyRect)
+
+
+class tst_qdeclarativestates : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativestates() {}
+
+private:
+ static QByteArray fullDataPath(const QString &path);
+
+private slots:
+ void initTestCase();
+
+ void basicChanges();
+ void basicExtension();
+ void basicBinding();
+ void signalOverride();
+ void signalOverrideCrash();
+ void parentChange();
+ void parentChangeErrors();
+ void anchorChanges();
+ void anchorChanges2();
+ void anchorChanges3();
+ void anchorChanges4();
+ void anchorChanges5();
+ void script();
+ void restoreEntryValues();
+ void explicitChanges();
+ void propertyErrors();
+ void incorrectRestoreBug();
+ void autoStateAtStartupRestoreBug();
+ void deletingChange();
+ void deletingState();
+ void tempState();
+ void illegalTempState();
+ void nonExistantProperty();
+ void reset();
+};
+
+void tst_qdeclarativestates::initTestCase()
+{
+ QML_REGISTER_TYPE(Qt.test, 1, 0, MyRectangle,MyRect);
+}
+
+QByteArray tst_qdeclarativestates::fullDataPath(const QString &path)
+{
+ return QUrl::fromLocalFile(SRCDIR + path).toString().toUtf8();
+}
+
+void tst_qdeclarativestates::basicChanges()
+{
+ QDeclarativeEngine engine;
+
+ {
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicChanges.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("red"));
+ }
+
+ {
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicChanges2.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ rect->setState("green");
+ QCOMPARE(rect->color(),QColor("green"));
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("green");
+ QCOMPARE(rect->color(),QColor("green"));
+ }
+
+ {
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicChanges3.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QCOMPARE(rect->color(),QColor("red"));
+ QCOMPARE(rect->border()->width(),1);
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+ QCOMPARE(rect->border()->width(),1);
+
+ rect->setState("bordered");
+ QCOMPARE(rect->color(),QColor("red"));
+ QCOMPARE(rect->border()->width(),2);
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("red"));
+ QCOMPARE(rect->border()->width(),1);
+ //### we should be checking that this is an implicit rather than explicit 1 (which currently fails)
+
+ rect->setState("bordered");
+ QCOMPARE(rect->color(),QColor("red"));
+ QCOMPARE(rect->border()->width(),2);
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+ QCOMPARE(rect->border()->width(),1);
+
+ }
+
+ {
+ // Test basicChanges4.qml can magically connect to propertyWithNotify's notify
+ // signal using 'onPropertyWithNotifyChanged' even though the signal name is
+ // actually 'oddlyNamedNotifySignal'
+
+ QDeclarativeComponent component(&engine, SRCDIR "/data/basicChanges4.qml");
+ QVERIFY(component.isReady());
+
+ MyRect *rect = qobject_cast<MyRect*>(component.create());
+ QVERIFY(rect != 0);
+
+ QMetaProperty prop = rect->metaObject()->property(rect->metaObject()->indexOfProperty("propertyWithNotify"));
+ QVERIFY(prop.hasNotifySignal());
+ QString notifySignal = QByteArray(prop.notifySignal().signature());
+ QVERIFY(!notifySignal.startsWith("propertyWithNotifyChanged("));
+
+ QCOMPARE(rect->color(), QColor(Qt::red));
+
+ rect->setPropertyWithNotify(100);
+ QCOMPARE(rect->color(), QColor(Qt::blue));
+ }
+}
+
+void tst_qdeclarativestates::basicExtension()
+{
+ QDeclarativeEngine engine;
+
+ {
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicExtension.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QCOMPARE(rect->color(),QColor("red"));
+ QCOMPARE(rect->border()->width(),1);
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+ QCOMPARE(rect->border()->width(),1);
+
+ rect->setState("bordered");
+ QCOMPARE(rect->color(),QColor("blue"));
+ QCOMPARE(rect->border()->width(),2);
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+ QCOMPARE(rect->border()->width(),1);
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("red"));
+ QCOMPARE(rect->border()->width(),1);
+
+ rect->setState("bordered");
+ QCOMPARE(rect->color(),QColor("blue"));
+ QCOMPARE(rect->border()->width(),2);
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("red"));
+ QCOMPARE(rect->border()->width(),1);
+ }
+
+ {
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/fakeExtension.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ rect->setState("green");
+ QCOMPARE(rect->color(),QColor("green"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ rect->setState("green");
+ QCOMPARE(rect->color(),QColor("green"));
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("green");
+ QCOMPARE(rect->color(),QColor("green"));
+ }
+}
+
+void tst_qdeclarativestates::basicBinding()
+{
+ QDeclarativeEngine engine;
+
+ {
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicBinding.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+ rect->setProperty("sourceColor", QColor("green"));
+ QCOMPARE(rect->color(),QColor("green"));
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("red"));
+ rect->setProperty("sourceColor", QColor("yellow"));
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("yellow"));
+ }
+
+ {
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicBinding2.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+ rect->setProperty("sourceColor", QColor("green"));
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("green"));
+ rect->setProperty("sourceColor", QColor("yellow"));
+ QCOMPARE(rect->color(),QColor("yellow"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("yellow"));
+ }
+
+ {
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicBinding3.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QCOMPARE(rect->color(),QColor("red"));
+ rect->setProperty("sourceColor", QColor("green"));
+ QCOMPARE(rect->color(),QColor("green"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+ rect->setProperty("sourceColor", QColor("red"));
+ QCOMPARE(rect->color(),QColor("blue"));
+ rect->setProperty("sourceColor2", QColor("yellow"));
+ QCOMPARE(rect->color(),QColor("yellow"));
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("red"));
+ rect->setProperty("sourceColor2", QColor("green"));
+ QCOMPARE(rect->color(),QColor("red"));
+ rect->setProperty("sourceColor", QColor("yellow"));
+ QCOMPARE(rect->color(),QColor("yellow"));
+ }
+
+ {
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicBinding4.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+ rect->setProperty("sourceColor", QColor("yellow"));
+ QCOMPARE(rect->color(),QColor("yellow"));
+
+ rect->setState("green");
+ QCOMPARE(rect->color(),QColor("green"));
+ rect->setProperty("sourceColor", QColor("purple"));
+ QCOMPARE(rect->color(),QColor("green"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("purple"));
+
+ rect->setState("green");
+ QCOMPARE(rect->color(),QColor("green"));
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("red"));
+ }
+}
+
+void tst_qdeclarativestates::signalOverride()
+{
+ QDeclarativeEngine engine;
+
+ {
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/signalOverride.qml");
+ MyRect *rect = qobject_cast<MyRect*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QCOMPARE(rect->color(),QColor("red"));
+ rect->doSomething();
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ rect->setState("green");
+ rect->doSomething();
+ QCOMPARE(rect->color(),QColor("green"));
+ }
+
+ {
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/signalOverride2.qml");
+ MyRect *rect = qobject_cast<MyRect*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QCOMPARE(rect->color(),QColor("white"));
+ rect->doSomething();
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("extendedRect"));
+
+ innerRect->setState("green");
+ rect->doSomething();
+ QCOMPARE(rect->color(),QColor("blue"));
+ QCOMPARE(innerRect->color(),QColor("green"));
+ QCOMPARE(innerRect->property("extendedColor").value<QColor>(),QColor("green"));
+ }
+}
+
+void tst_qdeclarativestates::signalOverrideCrash()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/signalOverrideCrash.qml");
+ MyRect *rect = qobject_cast<MyRect*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ rect->setState("overridden");
+ rect->doSomething();
+}
+
+void tst_qdeclarativestates::parentChange()
+{
+ QDeclarativeEngine engine;
+
+ {
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/parentChange.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QVERIFY(innerRect != 0);
+
+ QDeclarativeListReference list(rect, "states");
+ QDeclarativeState *state = qobject_cast<QDeclarativeState*>(list.at(0));
+ QVERIFY(state != 0);
+
+ qmlExecuteDeferred(state);
+ QDeclarativeParentChange *pChange = qobject_cast<QDeclarativeParentChange*>(state->operationAt(0));
+ QVERIFY(pChange != 0);
+ QDeclarativeItem *nParent = qobject_cast<QDeclarativeItem*>(rect->findChild<QDeclarativeItem*>("NewParent"));
+ QVERIFY(nParent != 0);
+
+ QCOMPARE(pChange->parent(), nParent);
+
+ rect->setState("reparented");
+ QCOMPARE(innerRect->rotation(), qreal(0));
+ QCOMPARE(innerRect->scale(), qreal(1));
+ QCOMPARE(innerRect->x(), qreal(-133));
+ QCOMPARE(innerRect->y(), qreal(-300));
+ }
+
+ {
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/parentChange2.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QVERIFY(innerRect != 0);
+
+ rect->setState("reparented");
+ QCOMPARE(innerRect->rotation(), qreal(15));
+ QCOMPARE(innerRect->scale(), qreal(.5));
+ QCOMPARE(QString("%1").arg(innerRect->x()), QString("%1").arg(-19.9075));
+ QCOMPARE(QString("%1").arg(innerRect->y()), QString("%1").arg(-8.73433));
+ }
+
+ {
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/parentChange3.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QVERIFY(innerRect != 0);
+
+ rect->setState("reparented");
+ QCOMPARE(innerRect->rotation(), qreal(-37));
+ QCOMPARE(innerRect->scale(), qreal(.25));
+ QCOMPARE(QString("%1").arg(innerRect->x()), QString("%1").arg(-217.305));
+ QCOMPARE(QString("%1").arg(innerRect->y()), QString("%1").arg(-164.413));
+
+ rect->setState("");
+ QCOMPARE(innerRect->rotation(), qreal(0));
+ QCOMPARE(innerRect->scale(), qreal(1));
+ QCOMPARE(innerRect->x(), qreal(5));
+ //do a non-qFuzzyCompare fuzzy compare
+ QVERIFY(innerRect->y() < qreal(0.00001) && innerRect->y() > qreal(-0.00001));
+ }
+}
+
+void tst_qdeclarativestates::parentChangeErrors()
+{
+ QDeclarativeEngine engine;
+
+ {
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/parentChange4.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QVERIFY(innerRect != 0);
+
+ QTest::ignoreMessage(QtWarningMsg, QByteArray("QML ParentChange (" + fullDataPath("/data/parentChange4.qml") + ":25:9) Unable to preserve appearance under non-uniform scale").constData());
+ rect->setState("reparented");
+ QCOMPARE(innerRect->rotation(), qreal(0));
+ QCOMPARE(innerRect->scale(), qreal(1));
+ QCOMPARE(innerRect->x(), qreal(5));
+ QCOMPARE(innerRect->y(), qreal(5));
+ }
+
+ {
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/parentChange5.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QVERIFY(innerRect != 0);
+
+ QTest::ignoreMessage(QtWarningMsg, QByteArray("QML ParentChange (" + fullDataPath("/data/parentChange5.qml") + ":25:9) Unable to preserve appearance under complex transform").constData());
+ rect->setState("reparented");
+ QCOMPARE(innerRect->rotation(), qreal(0));
+ QCOMPARE(innerRect->scale(), qreal(1));
+ QCOMPARE(innerRect->x(), qreal(5));
+ QCOMPARE(innerRect->y(), qreal(5));
+ }
+}
+
+void tst_qdeclarativestates::anchorChanges()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorChanges.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QVERIFY(innerRect != 0);
+
+ QDeclarativeListReference list(rect, "states");
+ QDeclarativeState *state = qobject_cast<QDeclarativeState*>(list.at(0));
+ QVERIFY(state != 0);
+
+ qmlExecuteDeferred(state);
+ QDeclarativeAnchorChanges *aChanges = qobject_cast<QDeclarativeAnchorChanges*>(state->operationAt(0));
+ QVERIFY(aChanges != 0);
+
+ rect->setState("right");
+ QCOMPARE(innerRect->x(), qreal(150));
+ QCOMPARE(aChanges->reset(), QString("left"));
+ QCOMPARE(aChanges->object(), innerRect);
+ QCOMPARE(aChanges->right().item, rect->right().item);
+ QCOMPARE(aChanges->right().anchorLine, rect->right().anchorLine);
+
+ rect->setState("");
+ QCOMPARE(innerRect->x(), qreal(5));
+
+ delete rect;
+}
+
+void tst_qdeclarativestates::anchorChanges2()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorChanges2.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QVERIFY(innerRect != 0);
+
+ rect->setState("right");
+ QEXPECT_FAIL("", "QTBUG-5338", Continue);
+ QCOMPARE(innerRect->x(), qreal(150));
+
+ rect->setState("");
+ QCOMPARE(innerRect->x(), qreal(5));
+
+ delete rect;
+}
+
+void tst_qdeclarativestates::anchorChanges3()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorChanges3.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QVERIFY(innerRect != 0);
+
+ QDeclarativeItem *leftGuideline = qobject_cast<QDeclarativeItem*>(rect->findChild<QDeclarativeItem*>("LeftGuideline"));
+ QVERIFY(leftGuideline != 0);
+
+ QDeclarativeItem *bottomGuideline = qobject_cast<QDeclarativeItem*>(rect->findChild<QDeclarativeItem*>("BottomGuideline"));
+ QVERIFY(bottomGuideline != 0);
+
+ QDeclarativeListReference list(rect, "states");
+ QDeclarativeState *state = qobject_cast<QDeclarativeState*>(list.at(0));
+ QVERIFY(state != 0);
+
+ qmlExecuteDeferred(state);
+ QDeclarativeAnchorChanges *aChanges = qobject_cast<QDeclarativeAnchorChanges*>(state->operationAt(0));
+ QVERIFY(aChanges != 0);
+
+ rect->setState("reanchored");
+ QCOMPARE(aChanges->object(), innerRect);
+ QCOMPARE(aChanges->left().item, leftGuideline->left().item);
+ QCOMPARE(aChanges->left().anchorLine, leftGuideline->left().anchorLine);
+ QCOMPARE(aChanges->right().item, rect->right().item);
+ QCOMPARE(aChanges->right().anchorLine, rect->right().anchorLine);
+ QCOMPARE(aChanges->top().item, rect->top().item);
+ QCOMPARE(aChanges->top().anchorLine, rect->top().anchorLine);
+ QCOMPARE(aChanges->bottom().item, bottomGuideline->bottom().item);
+ QCOMPARE(aChanges->bottom().anchorLine, bottomGuideline->bottom().anchorLine);
+
+ QCOMPARE(innerRect->x(), qreal(10));
+ QCOMPARE(innerRect->y(), qreal(0));
+ QCOMPARE(innerRect->width(), qreal(190));
+ QCOMPARE(innerRect->height(), qreal(150));
+
+ rect->setState("");
+ QCOMPARE(innerRect->x(), qreal(0));
+ QCOMPARE(innerRect->y(), qreal(10));
+ QCOMPARE(innerRect->width(), qreal(150));
+ QCOMPARE(innerRect->height(), qreal(190));
+
+ delete rect;
+}
+
+void tst_qdeclarativestates::anchorChanges4()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorChanges4.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QVERIFY(innerRect != 0);
+
+ QDeclarativeItem *leftGuideline = qobject_cast<QDeclarativeItem*>(rect->findChild<QDeclarativeItem*>("LeftGuideline"));
+ QVERIFY(leftGuideline != 0);
+
+ QDeclarativeItem *bottomGuideline = qobject_cast<QDeclarativeItem*>(rect->findChild<QDeclarativeItem*>("BottomGuideline"));
+ QVERIFY(bottomGuideline != 0);
+
+ QDeclarativeListReference list(rect, "states");
+ QDeclarativeState *state = qobject_cast<QDeclarativeState*>(list.at(0));
+ QVERIFY(state != 0);
+
+ qmlExecuteDeferred(state);
+ QDeclarativeAnchorChanges *aChanges = qobject_cast<QDeclarativeAnchorChanges*>(state->operationAt(0));
+ QVERIFY(aChanges != 0);
+
+ rect->setState("reanchored");
+ QCOMPARE(aChanges->object(), innerRect);
+ QCOMPARE(aChanges->horizontalCenter().item, bottomGuideline->horizontalCenter().item);
+ QCOMPARE(aChanges->horizontalCenter().anchorLine, bottomGuideline->horizontalCenter().anchorLine);
+ QCOMPARE(aChanges->verticalCenter().item, leftGuideline->verticalCenter().item);
+ QCOMPARE(aChanges->verticalCenter().anchorLine, leftGuideline->verticalCenter().anchorLine);
+
+ delete rect;
+}
+
+void tst_qdeclarativestates::anchorChanges5()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorChanges5.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
+ QVERIFY(innerRect != 0);
+
+ QDeclarativeItem *leftGuideline = qobject_cast<QDeclarativeItem*>(rect->findChild<QDeclarativeItem*>("LeftGuideline"));
+ QVERIFY(leftGuideline != 0);
+
+ QDeclarativeItem *bottomGuideline = qobject_cast<QDeclarativeItem*>(rect->findChild<QDeclarativeItem*>("BottomGuideline"));
+ QVERIFY(bottomGuideline != 0);
+
+ QDeclarativeListReference list(rect, "states");
+ QDeclarativeState *state = qobject_cast<QDeclarativeState*>(list.at(0));
+ QVERIFY(state != 0);
+
+ qmlExecuteDeferred(state);
+ QDeclarativeAnchorChanges *aChanges = qobject_cast<QDeclarativeAnchorChanges*>(state->operationAt(0));
+ QVERIFY(aChanges != 0);
+
+ rect->setState("reanchored");
+ QCOMPARE(aChanges->object(), innerRect);
+ QCOMPARE(aChanges->horizontalCenter().item, bottomGuideline->horizontalCenter().item);
+ QCOMPARE(aChanges->horizontalCenter().anchorLine, bottomGuideline->horizontalCenter().anchorLine);
+ QCOMPARE(aChanges->baseline().item, leftGuideline->baseline().item);
+ QCOMPARE(aChanges->baseline().anchorLine, leftGuideline->baseline().anchorLine);
+
+ delete rect;
+}
+
+void tst_qdeclarativestates::script()
+{
+ QDeclarativeEngine engine;
+
+ {
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/script.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("blue")); // a script isn't reverted
+ }
+}
+
+void tst_qdeclarativestates::restoreEntryValues()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/restoreEntryValues.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("blue"));
+}
+
+void tst_qdeclarativestates::explicitChanges()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/explicit.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QDeclarativeListReference list(rect, "states");
+ QDeclarativeState *state = qobject_cast<QDeclarativeState*>(list.at(0));
+ QVERIFY(state != 0);
+
+ qmlExecuteDeferred(state);
+ QDeclarativePropertyChanges *changes = qobject_cast<QDeclarativePropertyChanges*>(rect->findChild<QDeclarativePropertyChanges*>("changes"));
+ QVERIFY(changes != 0);
+ QVERIFY(changes->isExplicit());
+
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ rect->setProperty("sourceColor", QColor("green"));
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("red"));
+ rect->setProperty("sourceColor", QColor("yellow"));
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("yellow"));
+}
+
+void tst_qdeclarativestates::propertyErrors()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/propertyErrors.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QCOMPARE(rect->color(),QColor("red"));
+
+ QTest::ignoreMessage(QtWarningMsg, QByteArray("QML PropertyChanges (" + fullDataPath("/data/propertyErrors.qml") + ":8:9) Cannot assign to non-existent property \"colr\"").constData());
+ QTest::ignoreMessage(QtWarningMsg, QByteArray("QML PropertyChanges (" + fullDataPath("/data/propertyErrors.qml") + ":8:9) Cannot assign to read-only property \"wantsFocus\"").constData());
+ rect->setState("blue");
+}
+
+void tst_qdeclarativestates::incorrectRestoreBug()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicChanges.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QCOMPARE(rect->color(),QColor("red"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("red"));
+
+ // make sure if we change the base state value, we then restore to it correctly
+ rect->setColor(QColor("green"));
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("green"));
+}
+
+void tst_qdeclarativestates::autoStateAtStartupRestoreBug()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent component(&engine, SRCDIR "/data/autoStateAtStartupRestoreBug.qml");
+ QObject *obj = component.create();
+
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->property("test").toInt(), 3);
+
+ obj->setProperty("input", 2);
+
+ QCOMPARE(obj->property("test").toInt(), 9);
+
+ delete obj;
+}
+
+void tst_qdeclarativestates::deletingChange()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/deleting.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+ QCOMPARE(rect->radius(),qreal(5));
+
+ rect->setState("");
+ QCOMPARE(rect->color(),QColor("red"));
+ QCOMPARE(rect->radius(),qreal(0));
+
+ QDeclarativePropertyChanges *pc = rect->findChild<QDeclarativePropertyChanges*>("pc1");
+ QVERIFY(pc != 0);
+ delete pc;
+
+ QDeclarativeState *state = rect->findChild<QDeclarativeState*>();
+ QVERIFY(state != 0);
+ qmlExecuteDeferred(state);
+ QCOMPARE(state->operationCount(), 1);
+
+ rect->setState("blue");
+ QCOMPARE(rect->color(),QColor("red"));
+ QCOMPARE(rect->radius(),qreal(5));
+
+ delete rect;
+}
+
+void tst_qdeclarativestates::deletingState()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/deletingState.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QDeclarativeStateGroup *sg = rect->findChild<QDeclarativeStateGroup*>();
+ QVERIFY(sg != 0);
+ QVERIFY(sg->findState("blue") != 0);
+
+ sg->setState("blue");
+ QCOMPARE(rect->color(),QColor("blue"));
+
+ sg->setState("");
+ QCOMPARE(rect->color(),QColor("red"));
+
+ QDeclarativeState *state = rect->findChild<QDeclarativeState*>();
+ QVERIFY(state != 0);
+ delete state;
+
+ QVERIFY(sg->findState("blue") == 0);
+
+ //### should we warn that state doesn't exist
+ sg->setState("blue");
+ QCOMPARE(rect->color(),QColor("red"));
+
+ delete rect;
+}
+
+void tst_qdeclarativestates::tempState()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/legalTempState.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QTest::ignoreMessage(QtDebugMsg, "entering placed");
+ QTest::ignoreMessage(QtDebugMsg, "entering idle");
+ rect->setState("placed");
+ QCOMPARE(rect->state(), QLatin1String("idle"));
+}
+
+void tst_qdeclarativestates::illegalTempState()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/illegalTempState.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QTest::ignoreMessage(QtWarningMsg, "Can't apply a state change as part of a state definition. ");
+ rect->setState("placed");
+ QCOMPARE(rect->state(), QLatin1String("placed"));
+}
+
+void tst_qdeclarativestates::nonExistantProperty()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/nonExistantProp.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QTest::ignoreMessage(QtWarningMsg, QByteArray("QML PropertyChanges (" + fullDataPath("/data/nonExistantProp.qml") + ":9:9) Cannot assign to non-existent property \"colr\"").constData());
+ rect->setState("blue");
+ QCOMPARE(rect->state(), QLatin1String("blue"));
+}
+
+void tst_qdeclarativestates::reset()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, SRCDIR "/data/reset.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect != 0);
+
+ QDeclarativeText *text = rect->findChild<QDeclarativeText*>();
+ QVERIFY(text != 0);
+ QCOMPARE(text->width(), qreal(50.));
+ QVERIFY(text->width() < text->height());
+
+ rect->setState("state1");
+
+ QVERIFY(text->width() > 51);
+ QVERIFY(text->width() > text->height());
+}
+
+QTEST_MAIN(tst_qdeclarativestates)
+
+#include "tst_qdeclarativestates.moc"
diff --git a/tests/auto/declarative/qdeclarativestyledtext/qdeclarativestyledtext.pro b/tests/auto/declarative/qdeclarativestyledtext/qdeclarativestyledtext.pro
new file mode 100644
index 0000000000..bd4d829728
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestyledtext/qdeclarativestyledtext.pro
@@ -0,0 +1,9 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+QT += network
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativestyledtext.cpp
+
+# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
+# LIBS += -lgcov
diff --git a/tests/auto/declarative/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp b/tests/auto/declarative/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp
new file mode 100644
index 0000000000..7b1293e54a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtTest/QtTest>
+#include <QtGui/QTextLayout>
+#include <private/qdeclarativestyledtext_p.h>
+
+class tst_qdeclarativestyledtext : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativestyledtext()
+ {
+ }
+
+private slots:
+ void textOutput();
+ void textOutput_data();
+};
+
+// For malformed input all we test is that we get the expected text out.
+//
+void tst_qdeclarativestyledtext::textOutput_data()
+{
+ QTest::addColumn<QString>("input");
+ QTest::addColumn<QString>("output");
+
+ QTest::newRow("bold") << "<b>bold</b>" << "bold";
+ QTest::newRow("italic") << "<b>italic</b>" << "italic";
+ QTest::newRow("missing >") << "<b>text</b" << "text";
+ QTest::newRow("missing b>") << "<b>text</" << "text";
+ QTest::newRow("missing /b>") << "<b>text<" << "text";
+ QTest::newRow("missing </b>") << "<b>text" << "text";
+ QTest::newRow("bad nest") << "<b>text <i>italic</b></i>" << "text italic";
+ QTest::newRow("font color") << "<font color=\"red\">red text</font>" << "red text";
+ QTest::newRow("font size") << "<font size=\"1\">text</font>" << "text";
+ QTest::newRow("font empty") << "<font>text</font>" << "text";
+ QTest::newRow("font bad 1") << "<font ezis=\"blah\">text</font>" << "text";
+ QTest::newRow("font bad 2") << "<font size=\"1>text</font>" << "";
+ QTest::newRow("extra close") << "<b>text</b></b>" << "text";
+ QTest::newRow("empty") << "" << "";
+}
+
+void tst_qdeclarativestyledtext::textOutput()
+{
+ QFETCH(QString, input);
+ QFETCH(QString, output);
+
+ QTextLayout layout;
+ QDeclarativeStyledText::parse(input, layout);
+
+ QCOMPARE(layout.text(), output);
+}
+
+
+QTEST_MAIN(tst_qdeclarativestyledtext)
+
+#include "tst_qdeclarativestyledtext.moc"
diff --git a/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro b/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro
new file mode 100644
index 0000000000..0781774266
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro
@@ -0,0 +1,5 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativesystempalette.cpp
diff --git a/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp b/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp
new file mode 100644
index 0000000000..5c9395283a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp
@@ -0,0 +1,187 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QDebug>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativesystempalette_p.h>
+#include <qpalette.h>
+#include "../../../shared/util.h"
+
+class tst_qdeclarativesystempalette : public QObject
+
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativesystempalette();
+
+private slots:
+ void activePalette();
+ void inactivePalette();
+ void disabledPalette();
+ void paletteChanged();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+tst_qdeclarativesystempalette::tst_qdeclarativesystempalette()
+{
+}
+
+void tst_qdeclarativesystempalette::activePalette()
+{
+ QString componentStr = "import Qt 4.6\nSystemPalette { }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeSystemPalette *object = qobject_cast<QDeclarativeSystemPalette*>(component.create());
+
+ QVERIFY(object != 0);
+
+ QPalette palette;
+ palette.setCurrentColorGroup(QPalette::Active);
+ QCOMPARE(palette.window().color(), object->window());
+ QCOMPARE(palette.windowText().color(), object->windowText());
+ QCOMPARE(palette.base().color(), object->base());
+ QCOMPARE(palette.text().color(), object->text());
+ QCOMPARE(palette.alternateBase().color(), object->alternateBase());
+ QCOMPARE(palette.button().color(), object->button());
+ QCOMPARE(palette.buttonText().color(), object->buttonText());
+ QCOMPARE(palette.light().color(), object->light());
+ QCOMPARE(palette.midlight().color(), object->midlight());
+ QCOMPARE(palette.dark().color(), object->dark());
+ QCOMPARE(palette.mid().color(), object->mid());
+ QCOMPARE(palette.shadow().color(), object->shadow());
+ QCOMPARE(palette.highlight().color(), object->highlight());
+ QCOMPARE(palette.highlightedText().color(), object->highlightedText());
+
+ delete object;
+}
+
+void tst_qdeclarativesystempalette::inactivePalette()
+{
+ QString componentStr = "import Qt 4.6\nSystemPalette { colorGroup: SystemPalette.Inactive }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeSystemPalette *object = qobject_cast<QDeclarativeSystemPalette*>(component.create());
+
+ QVERIFY(object != 0);
+ QVERIFY(object->colorGroup() == QDeclarativeSystemPalette::Inactive);
+
+ QPalette palette;
+ palette.setCurrentColorGroup(QPalette::Inactive);
+ QCOMPARE(palette.window().color(), object->window());
+ QCOMPARE(palette.windowText().color(), object->windowText());
+ QCOMPARE(palette.base().color(), object->base());
+ QCOMPARE(palette.text().color(), object->text());
+ QCOMPARE(palette.alternateBase().color(), object->alternateBase());
+ QCOMPARE(palette.button().color(), object->button());
+ QCOMPARE(palette.buttonText().color(), object->buttonText());
+ QCOMPARE(palette.light().color(), object->light());
+ QCOMPARE(palette.midlight().color(), object->midlight());
+ QCOMPARE(palette.dark().color(), object->dark());
+ QCOMPARE(palette.mid().color(), object->mid());
+ QCOMPARE(palette.shadow().color(), object->shadow());
+ QCOMPARE(palette.highlight().color(), object->highlight());
+ QCOMPARE(palette.highlightedText().color(), object->highlightedText());
+
+ delete object;
+}
+
+void tst_qdeclarativesystempalette::disabledPalette()
+{
+ QString componentStr = "import Qt 4.6\nSystemPalette { colorGroup: SystemPalette.Disabled }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeSystemPalette *object = qobject_cast<QDeclarativeSystemPalette*>(component.create());
+
+ QVERIFY(object != 0);
+ QVERIFY(object->colorGroup() == QDeclarativeSystemPalette::Disabled);
+
+ QPalette palette;
+ palette.setCurrentColorGroup(QPalette::Disabled);
+ QCOMPARE(palette.window().color(), object->window());
+ QCOMPARE(palette.windowText().color(), object->windowText());
+ QCOMPARE(palette.base().color(), object->base());
+ QCOMPARE(palette.text().color(), object->text());
+ QCOMPARE(palette.alternateBase().color(), object->alternateBase());
+ QCOMPARE(palette.button().color(), object->button());
+ QCOMPARE(palette.buttonText().color(), object->buttonText());
+ QCOMPARE(palette.light().color(), object->light());
+ QCOMPARE(palette.midlight().color(), object->midlight());
+ QCOMPARE(palette.dark().color(), object->dark());
+ QCOMPARE(palette.mid().color(), object->mid());
+ QCOMPARE(palette.shadow().color(), object->shadow());
+ QCOMPARE(palette.highlight().color(), object->highlight());
+ QCOMPARE(palette.highlightedText().color(), object->highlightedText());
+
+ delete object;
+}
+
+void tst_qdeclarativesystempalette::paletteChanged()
+{
+ QString componentStr = "import Qt 4.6\nSystemPalette { }";
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeSystemPalette *object = qobject_cast<QDeclarativeSystemPalette*>(component.create());
+
+ QVERIFY(object != 0);
+
+ QPalette p;
+ p.setCurrentColorGroup(QPalette::Active);
+ p.setColor(QPalette::Active, QPalette::Text, QColor("red"));
+ p.setColor(QPalette::Active, QPalette::ButtonText, QColor("green"));
+ p.setColor(QPalette::Active, QPalette::WindowText, QColor("blue"));
+
+ qApp->setPalette(p);
+
+ object->setColorGroup(QDeclarativeSystemPalette::Active);
+ QTRY_COMPARE(QColor("red"), object->text());
+ QTRY_COMPARE(QColor("green"), object->buttonText());
+ QTRY_COMPARE(QColor("blue"), object->windowText());
+
+ delete object;
+}
+
+QTEST_MAIN(tst_qdeclarativesystempalette)
+
+#include "tst_qdeclarativesystempalette.moc"
diff --git a/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro b/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
new file mode 100644
index 0000000000..8b4b4d1382
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
@@ -0,0 +1,5 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativetext.cpp
diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
new file mode 100644
index 0000000000..bbbbd836b5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
@@ -0,0 +1,844 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QTextDocument>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativetext_p.h>
+#include <private/qdeclarativevaluetype_p.h>
+#include <QFontMetrics>
+#include <QGraphicsSceneMouseEvent>
+#include <qmath.h>
+
+class tst_qdeclarativetext : public QObject
+
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativetext();
+
+private slots:
+ void text();
+ void width();
+ void wrap();
+ void elide();
+ void textFormat();
+
+ // ### these tests may be trivial
+ void horizontalAlignment();
+ void verticalAlignment();
+ void font();
+ void style();
+ void color();
+ void smooth();
+
+ // QDeclarativeFontValueType
+ void weight();
+ void underline();
+ void overline();
+ void strikeout();
+ void capitalization();
+ void letterSpacing();
+ void wordSpacing();
+
+ void clickLink();
+
+private:
+ QStringList standard;
+ QStringList richText;
+
+ QStringList horizontalAlignmentmentStrings;
+ QStringList verticalAlignmentmentStrings;
+
+ QList<Qt::Alignment> verticalAlignmentments;
+ QList<Qt::Alignment> horizontalAlignmentments;
+
+ QStringList styleStrings;
+ QList<QDeclarativeText::TextStyle> styles;
+
+ QStringList colorStrings;
+
+ QDeclarativeEngine engine;
+};
+
+tst_qdeclarativetext::tst_qdeclarativetext()
+{
+ standard << "the quick brown fox jumped over the lazy dog"
+ << "the quick brown fox\n jumped over the lazy dog";
+
+ richText << "<i>the <b>quick</b> brown <a href=\\\"http://www.google.com\\\">fox</a> jumped over the <b>lazy</b> dog</i>"
+ << "<i>the <b>quick</b> brown <a href=\\\"http://www.google.com\\\">fox</a><br>jumped over the <b>lazy</b> dog</i>";
+
+ horizontalAlignmentmentStrings << "AlignLeft"
+ << "AlignRight"
+ << "AlignHCenter";
+
+ verticalAlignmentmentStrings << "AlignTop"
+ << "AlignBottom"
+ << "AlignVCenter";
+
+ horizontalAlignmentments << Qt::AlignLeft
+ << Qt::AlignRight
+ << Qt::AlignHCenter;
+
+ verticalAlignmentments << Qt::AlignTop
+ << Qt::AlignBottom
+ << Qt::AlignVCenter;
+
+ styleStrings << "Normal"
+ << "Outline"
+ << "Raised"
+ << "Sunken";
+
+ styles << QDeclarativeText::Normal
+ << QDeclarativeText::Outline
+ << QDeclarativeText::Raised
+ << QDeclarativeText::Sunken;
+
+ colorStrings << "aliceblue"
+ << "antiquewhite"
+ << "aqua"
+ << "darkkhaki"
+ << "darkolivegreen"
+ << "dimgray"
+ << "palevioletred"
+ << "lightsteelblue"
+ << "#000000"
+ << "#AAAAAA"
+ << "#FFFFFF"
+ << "#2AC05F";
+ //
+ // need a different test to do alpha channel test
+ // << "#AA0011DD"
+ // << "#00F16B11";
+ //
+}
+
+void tst_qdeclarativetext::text()
+{
+ {
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData("import Qt 4.6\nText { text: \"\" }", QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->text(), QString(""));
+ QVERIFY(textObject->width() == 0);
+
+ delete textObject;
+ }
+
+ for (int i = 0; i < standard.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"" + standard.at(i) + "\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->text(), standard.at(i));
+ QVERIFY(textObject->width() > 0);
+ }
+
+ for (int i = 0; i < richText.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"" + richText.at(i) + "\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QString expected = richText.at(i);
+ QCOMPARE(textObject->text(), expected.replace("\\\"", "\""));
+ QVERIFY(textObject->width() > 0);
+ }
+}
+
+void tst_qdeclarativetext::width()
+{
+ // uses Font metrics to find the width for standard and document to find the width for rich
+ {
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData("import Qt 4.6\nText { text: \"\" }", QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->width(), 0.);
+ }
+
+ for (int i = 0; i < standard.size(); i++)
+ {
+ QVERIFY(!Qt::mightBeRichText(standard.at(i))); // self-test
+
+ QFont f;
+ QFontMetricsF fm(f);
+ qreal metricWidth = fm.size(Qt::TextExpandTabs && Qt::TextShowMnemonic, standard.at(i)).width();
+ metricWidth = qCeil(metricWidth);
+
+ QString componentStr = "import Qt 4.6\nText { text: \"" + standard.at(i) + "\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->width(), qreal(metricWidth));
+ QVERIFY(textObject->textFormat() == QDeclarativeText::AutoText); // setting text doesn't change format
+ }
+
+ for (int i = 0; i < richText.size(); i++)
+ {
+ QVERIFY(Qt::mightBeRichText(richText.at(i))); // self-test
+
+ QTextDocument document;
+ document.setHtml(richText.at(i));
+ document.setDocumentMargin(0);
+
+ int documentWidth = document.idealWidth();
+
+ QString componentStr = "import Qt 4.6\nText { text: \"" + richText.at(i) + "\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->width(), qreal(documentWidth));
+ QVERIFY(textObject->textFormat() == QDeclarativeText::AutoText); // setting text doesn't change format
+ }
+}
+
+void tst_qdeclarativetext::wrap()
+{
+ int textHeight = 0;
+ // for specified width and wrap set true
+ {
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData("import Qt 4.6\nText { text: \"Hello\"; wrap: true; width: 300 }", QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+ textHeight = textObject->height();
+
+ QVERIFY(textObject != 0);
+ QVERIFY(textObject->wrap() == true);
+ QCOMPARE(textObject->width(), 300.);
+ }
+
+ for (int i = 0; i < standard.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nText { wrap: true; width: 30; text: \"" + standard.at(i) + "\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->width(), 30.);
+ QVERIFY(textObject->height() > textHeight);
+
+ int oldHeight = textObject->height();
+ textObject->setWidth(100);
+ QVERIFY(textObject->height() < oldHeight);
+ }
+
+ for (int i = 0; i < richText.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nText { wrap: true; width: 30; text: \"" + richText.at(i) + "\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->width(), 30.);
+ QVERIFY(textObject->height() > textHeight);
+ }
+
+}
+
+void tst_qdeclarativetext::elide()
+{
+ for (QDeclarativeText::TextElideMode m = QDeclarativeText::ElideLeft; m<=QDeclarativeText::ElideNone; m=QDeclarativeText::TextElideMode(int(m)+1)) {
+ const char* elidename[]={"ElideLeft", "ElideRight", "ElideMiddle", "ElideNone"};
+ QString elide = "elide: Text." + QString(elidename[int(m)]) + ";";
+
+ // XXX Poor coverage.
+
+ {
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(("import Qt 4.6\nText { text: \"\"; "+elide+" width: 100 }").toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QCOMPARE(textObject->elideMode(), m);
+ QCOMPARE(textObject->width(), 100.);
+ }
+
+ for (int i = 0; i < standard.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nText { "+elide+" width: 100; text: \"" + standard.at(i) + "\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QCOMPARE(textObject->elideMode(), m);
+ QCOMPARE(textObject->width(), 100.);
+ }
+
+ // richtext - does nothing
+ for (int i = 0; i < richText.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nText { "+elide+" width: 100; text: \"" + richText.at(i) + "\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QCOMPARE(textObject->elideMode(), m);
+ QCOMPARE(textObject->width(), 100.);
+ }
+ }
+}
+
+void tst_qdeclarativetext::textFormat()
+{
+ {
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData("import Qt 4.6\nText { text: \"Hello\"; textFormat: Text.RichText }", QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QVERIFY(textObject->textFormat() == QDeclarativeText::RichText);
+ }
+ {
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData("import Qt 4.6\nText { text: \"<b>Hello</b>\"; textFormat: Text.PlainText }", QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QVERIFY(textObject->textFormat() == QDeclarativeText::PlainText);
+ }
+}
+
+//the alignment tests may be trivial o.oa
+void tst_qdeclarativetext::horizontalAlignment()
+{
+ //test one align each, and then test if two align fails.
+
+ for (int i = 0; i < standard.size(); i++)
+ {
+ for (int j=0; j < horizontalAlignmentmentStrings.size(); j++)
+ {
+ QString componentStr = "import Qt 4.6\nText { horizontalAlignment: \"" + horizontalAlignmentmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QCOMPARE((int)textObject->hAlign(), (int)horizontalAlignmentments.at(j));
+ }
+ }
+
+ for (int i = 0; i < richText.size(); i++)
+ {
+ for (int j=0; j < horizontalAlignmentmentStrings.size(); j++)
+ {
+ QString componentStr = "import Qt 4.6\nText { horizontalAlignment: \"" + horizontalAlignmentmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QCOMPARE((int)textObject->hAlign(), (int)horizontalAlignmentments.at(j));
+ }
+ }
+
+}
+
+void tst_qdeclarativetext::verticalAlignment()
+{
+ //test one align each, and then test if two align fails.
+
+ for (int i = 0; i < standard.size(); i++)
+ {
+ for (int j=0; j < verticalAlignmentmentStrings.size(); j++)
+ {
+ QString componentStr = "import Qt 4.6\nText { verticalAlignment: \"" + verticalAlignmentmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE((int)textObject->vAlign(), (int)verticalAlignmentments.at(j));
+ }
+ }
+
+ for (int i = 0; i < richText.size(); i++)
+ {
+ for (int j=0; j < verticalAlignmentmentStrings.size(); j++)
+ {
+ QString componentStr = "import Qt 4.6\nText { verticalAlignment: \"" + verticalAlignmentmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE((int)textObject->vAlign(), (int)verticalAlignmentments.at(j));
+ }
+ }
+
+}
+
+void tst_qdeclarativetext::font()
+{
+ //test size, then bold, then italic, then family
+ {
+ QString componentStr = "import Qt 4.6\nText { font.pointSize: 40; text: \"Hello World\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QCOMPARE(textObject->font().pointSize(), 40);
+ QCOMPARE(textObject->font().bold(), false);
+ QCOMPARE(textObject->font().italic(), false);
+ }
+
+ {
+ QString componentStr = "import Qt 4.6\nText { font.pixelSize: 40; text: \"Hello World\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QCOMPARE(textObject->font().pixelSize(), 40);
+ QCOMPARE(textObject->font().bold(), false);
+ QCOMPARE(textObject->font().italic(), false);
+ }
+
+ {
+ QString componentStr = "import Qt 4.6\nText { font.bold: true; text: \"Hello World\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QCOMPARE(textObject->font().bold(), true);
+ QCOMPARE(textObject->font().italic(), false);
+ }
+
+ {
+ QString componentStr = "import Qt 4.6\nText { font.italic: true; text: \"Hello World\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QCOMPARE(textObject->font().italic(), true);
+ QCOMPARE(textObject->font().bold(), false);
+ }
+
+ {
+ QString componentStr = "import Qt 4.6\nText { font.family: \"Helvetica\"; text: \"Hello World\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QCOMPARE(textObject->font().family(), QString("Helvetica"));
+ QCOMPARE(textObject->font().bold(), false);
+ QCOMPARE(textObject->font().italic(), false);
+ }
+
+ {
+ QString componentStr = "import Qt 4.6\nText { font.family: \"\"; text: \"Hello World\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QCOMPARE(textObject->font().family(), QString(""));
+ }
+}
+
+void tst_qdeclarativetext::style()
+{
+ //test style
+ for (int i = 0; i < styles.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nText { style: \"" + styleStrings.at(i) + "\"; styleColor: \"white\"; text: \"Hello World\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QCOMPARE((int)textObject->style(), (int)styles.at(i));
+ QCOMPARE(textObject->styleColor(), QColor("white"));
+ }
+}
+
+void tst_qdeclarativetext::color()
+{
+ //test style
+ for (int i = 0; i < colorStrings.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nText { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QCOMPARE(textObject->color(), QColor(colorStrings.at(i)));
+ QCOMPARE(textObject->styleColor(), QColor());
+ }
+
+ for (int i = 0; i < colorStrings.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nText { styleColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QCOMPARE(textObject->styleColor(), QColor(colorStrings.at(i)));
+ // default color to black?
+ QCOMPARE(textObject->color(), QColor("black"));
+ }
+
+ for (int i = 0; i < colorStrings.size(); i++)
+ {
+ for (int j = 0; j < colorStrings.size(); j++)
+ {
+ QString componentStr = "import Qt 4.6\nText { color: \"" + colorStrings.at(i) + "\"; styleColor: \"" + colorStrings.at(j) + "\"; text: \"Hello World\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QCOMPARE(textObject->color(), QColor(colorStrings.at(i)));
+ QCOMPARE(textObject->styleColor(), QColor(colorStrings.at(j)));
+ }
+ }
+ {
+ QString colorStr = "#AA001234";
+ QColor testColor("#001234");
+ testColor.setAlpha(170);
+
+ QString componentStr = "import Qt 4.6\nText { color: \"" + colorStr + "\"; text: \"Hello World\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QCOMPARE(textObject->color(), testColor);
+ }
+}
+
+void tst_qdeclarativetext::smooth()
+{
+ for (int i = 0; i < standard.size(); i++)
+ {
+ {
+ QString componentStr = "import Qt 4.6\nText { smooth: true; text: \"" + standard.at(i) + "\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+ QCOMPARE(textObject->smooth(), true);
+ }
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"" + standard.at(i) + "\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+ QCOMPARE(textObject->smooth(), false);
+ }
+ }
+ for (int i = 0; i < richText.size(); i++)
+ {
+ {
+ QString componentStr = "import Qt 4.6\nText { smooth: true; text: \"" + richText.at(i) + "\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+ QCOMPARE(textObject->smooth(), true);
+ }
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"" + richText.at(i) + "\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+ QCOMPARE(textObject->smooth(), false);
+ }
+ }
+}
+
+void tst_qdeclarativetext::weight()
+{
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE((int)textObject->font().weight(), (int)QDeclarativeFontValueType::Normal);
+ }
+ {
+ QString componentStr = "import Qt 4.6\nText { font.weight: \"Bold\"; text: \"Hello world!\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE((int)textObject->font().weight(), (int)QDeclarativeFontValueType::Bold);
+ }
+}
+
+void tst_qdeclarativetext::underline()
+{
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->font().underline(), false);
+ }
+ {
+ QString componentStr = "import Qt 4.6\nText { font.underline: true; text: \"Hello world!\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->font().underline(), true);
+ }
+}
+
+void tst_qdeclarativetext::overline()
+{
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->font().overline(), false);
+ }
+ {
+ QString componentStr = "import Qt 4.6\nText { font.overline: true; text: \"Hello world!\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->font().overline(), true);
+ }
+}
+
+void tst_qdeclarativetext::strikeout()
+{
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->font().strikeOut(), false);
+ }
+ {
+ QString componentStr = "import Qt 4.6\nText { font.strikeout: true; text: \"Hello world!\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->font().strikeOut(), true);
+ }
+}
+
+void tst_qdeclarativetext::capitalization()
+{
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::MixedCase);
+ }
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.capitalization: \"AllUppercase\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::AllUppercase);
+ }
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.capitalization: \"AllLowercase\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::AllLowercase);
+ }
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.capitalization: \"SmallCaps\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::SmallCaps);
+ }
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.capitalization: \"Capitalize\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::Capitalize);
+ }
+}
+
+void tst_qdeclarativetext::letterSpacing()
+{
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->font().letterSpacing(), 0.0);
+ }
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.letterSpacing: -50 }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->font().letterSpacing(), -50.);
+ }
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.letterSpacing: 200 }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->font().letterSpacing(), 200.);
+ }
+}
+
+void tst_qdeclarativetext::wordSpacing()
+{
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->font().wordSpacing(), 0.0);
+ }
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.wordSpacing: -50 }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->font().wordSpacing(), -50.);
+ }
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.wordSpacing: 200 }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QCOMPARE(textObject->font().wordSpacing(), 200.);
+ }
+}
+
+class EventSender : public QGraphicsItem
+{
+public:
+ void sendEvent(QEvent *event) { sceneEvent(event); }
+};
+
+class LinkTest : public QObject
+{
+ Q_OBJECT
+public:
+ LinkTest() {}
+
+ QString link;
+
+public slots:
+ void linkClicked(QString l) { link = l; }
+};
+
+void tst_qdeclarativetext::clickLink()
+{
+ {
+ QString componentStr = "import Qt 4.6\nText { text: \"<a href=\\\"http://qt.nokia.com\\\">Hello world!</a>\" }";
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+
+ LinkTest test;
+ QObject::connect(textObject, SIGNAL(linkActivated(QString)), &test, SLOT(linkClicked(QString)));
+
+ {
+ QGraphicsSceneMouseEvent me(QEvent::GraphicsSceneMousePress);
+ me.setPos(QPointF(textObject->x()/2, textObject->y()/2));
+ me.setButton(Qt::LeftButton);
+ static_cast<EventSender*>(static_cast<QGraphicsItem*>(textObject))->sendEvent(&me);
+ }
+
+ {
+ QGraphicsSceneMouseEvent me(QEvent::GraphicsSceneMouseRelease);
+ me.setPos(QPointF(textObject->x()/2, textObject->y()/2));
+ me.setButton(Qt::LeftButton);
+ static_cast<EventSender*>(static_cast<QGraphicsItem*>(textObject))->sendEvent(&me);
+ }
+
+ QCOMPARE(test.link, QLatin1String("http://qt.nokia.com"));
+ }
+}
+
+QTEST_MAIN(tst_qdeclarativetext)
+
+#include "tst_qdeclarativetext.moc"
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/cursorTest.qml b/tests/auto/declarative/qdeclarativetextedit/data/cursorTest.qml
new file mode 100644
index 0000000000..e5df8f103e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/cursorTest.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+Rectangle { width: 300; height: 300; color: "white"
+ TextEdit { text: "Hello world!"; id: textEditObject; objectName: "textEditObject"
+ resources: [ Component { id:cursor; Item { id:cursorInstance; objectName: "cursorInstance" } } ]
+ cursorDelegate: cursor
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/ErrItem.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/ErrItem.qml
new file mode 100644
index 0000000000..34b3883431
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/http/ErrItem.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+Item{
+ Fungus{
+ palatable: false;
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/NormItem.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/NormItem.qml
new file mode 100644
index 0000000000..718cb719a7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/http/NormItem.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+Item {
+ objectName: "delegateOkay"
+ Rectangle { }
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTest.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTest.qml
new file mode 100644
index 0000000000..3c31e112ff
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTest.qml
@@ -0,0 +1,22 @@
+import Qt 4.6
+
+Rectangle { width: 300; height: 300; color: "white"
+ resources: [
+ Component { id:cursorFail; FailItem { objectName: "delegateFail" } },
+ Component { id:cursorWait; WaitItem { objectName: "delegateSlow" } },
+ Component { id:cursorNorm; NormItem { objectName: "delegateOkay" } },
+ Component { id:cursorErr; ErrItem { objectName: "delegateErrorA" } }
+ ]
+ TextEdit {
+ cursorDelegate: cursorFail
+ }
+ TextEdit {
+ cursorDelegate: cursorWait
+ }
+ TextEdit {
+ cursorDelegate: cursorNorm
+ }
+ TextEdit {
+ cursorDelegate: cursorErr
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail1.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail1.qml
new file mode 100644
index 0000000000..a44aec25cd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail1.qml
@@ -0,0 +1,18 @@
+import Qt 4.6
+
+Rectangle { width: 300; height: 300; color: "white"
+ resources: [
+ Component { id:cursorFail; FailItem { objectName: "delegateFail" } },
+ Component { id:cursorWait; WaitItem { objectName: "delegateSlow" } },
+ Component { id:cursorNorm; NormItem { objectName: "delegateOkay" } }
+ ]
+ TextEdit {
+ cursorDelegate: cursorFail
+ }
+ TextEdit {
+ cursorDelegate: cursorWait
+ }
+ TextEdit {
+ cursorDelegate: cursorNorm
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail2.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail2.qml
new file mode 100644
index 0000000000..57d3e47352
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail2.qml
@@ -0,0 +1,18 @@
+import Qt 4.6
+
+Rectangle { width: 300; height: 300; color: "white"
+ resources: [
+ Component { id:cursorWait; WaitItem { objectName: "delegateSlow" } },
+ Component { id:cursorNorm; NormItem { objectName: "delegateOkay" } },
+ Component { id:cursorErr; ErrItem { objectName: "delegateErrorA" } }
+ ]
+ TextEdit {
+ cursorDelegate: cursorWait
+ }
+ TextEdit {
+ cursorDelegate: cursorNorm
+ }
+ TextEdit {
+ cursorDelegate: cursorErr
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml
new file mode 100644
index 0000000000..a44e8675af
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml
@@ -0,0 +1,18 @@
+import Qt 4.6
+
+Rectangle { width: 300; height: 300; color: "white"
+ resources: [
+ Component { id:cursorWait; WaitItem { objectName: "delegateSlow" } },
+ Component { id:cursorNorm; NormItem { objectName: "delegateOkay" } }
+ ]
+ TextEdit {
+ cursorDelegate: cursorWait
+ text: "Hello"
+ }
+ TextEdit {
+ objectName: "textEditObject"
+ cursorDelegate: cursorNorm
+ focus: true;
+ text: "Hello"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/httpfail/FailItem.qml b/tests/auto/declarative/qdeclarativetextedit/data/httpfail/FailItem.qml
new file mode 100644
index 0000000000..ddbf526f3d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/httpfail/FailItem.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+Item {
+ Rectangle { }
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/httpslow/WaitItem.qml b/tests/auto/declarative/qdeclarativetextedit/data/httpslow/WaitItem.qml
new file mode 100644
index 0000000000..ddbf526f3d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/httpslow/WaitItem.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+Item {
+ Rectangle { }
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/inputmethodhints.qml b/tests/auto/declarative/qdeclarativetextedit/data/inputmethodhints.qml
new file mode 100644
index 0000000000..c3d4c160b2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/inputmethodhints.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+TextEdit {
+ text: "Hello world!"
+ inputMethodHints: Qt.ImhNoPredictiveText
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/navigation.qml b/tests/auto/declarative/qdeclarativetextedit/data/navigation.qml
new file mode 100644
index 0000000000..8d7dbbc082
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/navigation.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+
+Rectangle {
+ property var myInput: input
+
+ width: 800; height: 600; color: "blue"
+
+ Item {
+ id: firstItem;
+ KeyNavigation.right: input
+ }
+
+ TextEdit { id: input; focus: true
+ KeyNavigation.left: firstItem
+ KeyNavigation.right: lastItem
+ KeyNavigation.up: firstItem
+ KeyNavigation.down: lastItem
+ }
+ Item {
+ id: lastItem
+ KeyNavigation.left: input
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/readOnly.qml b/tests/auto/declarative/qdeclarativetextedit/data/readOnly.qml
new file mode 100644
index 0000000000..103a6278d5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/readOnly.qml
@@ -0,0 +1,12 @@
+import Qt 4.6
+
+Rectangle {
+ property var myInput: input
+
+ width: 800; height: 600; color: "blue"
+
+ TextEdit { id: input; focus: true
+ readOnly: true
+ text: "I am the very model of a modern major general.\n"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro b/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro
new file mode 100644
index 0000000000..2228f11deb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro
@@ -0,0 +1,9 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui network
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativetextedit.cpp ../shared/testhttpserver.cpp
+HEADERS += ../shared/testhttpserver.h
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
new file mode 100644
index 0000000000..b1935df492
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
@@ -0,0 +1,793 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include "../../../shared/util.h"
+#include "../shared/testhttpserver.h"
+#include <math.h>
+#include <QFile>
+#include <QTextDocument>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecontext.h>
+#include <QtDeclarative/qdeclarativeexpression.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativetextedit_p.h>
+#include <QFontMetrics>
+#include <QDeclarativeView>
+#include <QStyle>
+#include <QInputContext>
+
+class tst_qdeclarativetextedit : public QObject
+
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativetextedit();
+
+private slots:
+ void text();
+ void width();
+ void wrap();
+ void textFormat();
+
+ // ### these tests may be trivial
+ void hAlign();
+ void vAlign();
+ void font();
+ void color();
+ void textMargin();
+ void persistentSelection();
+ void focusOnPress();
+ void selection();
+ void inputMethodHints();
+
+ void cursorDelegate();
+ void delegateLoading();
+ void navigation();
+ void readOnly();
+ void sendRequestSoftwareInputPanelEvent();
+
+private:
+ void simulateKey(QDeclarativeView *, int key);
+ QDeclarativeView *createView(const QString &filename);
+
+ QStringList standard;
+ QStringList richText;
+
+ QStringList hAlignmentStrings;
+ QStringList vAlignmentStrings;
+
+ QList<Qt::Alignment> vAlignments;
+ QList<Qt::Alignment> hAlignments;
+
+ QStringList colorStrings;
+
+ QDeclarativeEngine engine;
+};
+
+tst_qdeclarativetextedit::tst_qdeclarativetextedit()
+{
+ standard << "the quick brown fox jumped over the lazy dog"
+ << "the quick brown fox\n jumped over the lazy dog";
+
+ richText << "<i>the <b>quick</b> brown <a href=\\\"http://www.google.com\\\">fox</a> jumped over the <b>lazy</b> dog</i>"
+ << "<i>the <b>quick</b> brown <a href=\\\"http://www.google.com\\\">fox</a><br>jumped over the <b>lazy</b> dog</i>";
+
+ hAlignmentStrings << "AlignLeft"
+ << "AlignRight"
+ << "AlignHCenter";
+
+ vAlignmentStrings << "AlignTop"
+ << "AlignBottom"
+ << "AlignVCenter";
+
+ hAlignments << Qt::AlignLeft
+ << Qt::AlignRight
+ << Qt::AlignHCenter;
+
+ vAlignments << Qt::AlignTop
+ << Qt::AlignBottom
+ << Qt::AlignVCenter;
+
+ colorStrings << "aliceblue"
+ << "antiquewhite"
+ << "aqua"
+ << "darkkhaki"
+ << "darkolivegreen"
+ << "dimgray"
+ << "palevioletred"
+ << "lightsteelblue"
+ << "#000000"
+ << "#AAAAAA"
+ << "#FFFFFF"
+ << "#2AC05F";
+ //
+ // need a different test to do alpha channel test
+ // << "#AA0011DD"
+ // << "#00F16B11";
+ //
+}
+
+void tst_qdeclarativetextedit::text()
+{
+ {
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData("import Qt 4.6\nTextEdit { text: \"\" }", QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->text(), QString(""));
+ }
+
+ for (int i = 0; i < standard.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { text: \"" + standard.at(i) + "\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->text(), standard.at(i));
+ }
+
+ for (int i = 0; i < richText.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { text: \"" + richText.at(i) + "\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QString actual = textEditObject->text();
+ QString expected = richText.at(i);
+ actual.replace(QRegExp(".*<body[^>]*>"),"");
+ actual.replace(QRegExp("(<[^>]*>)+"),"<>");
+ expected.replace(QRegExp("(<[^>]*>)+"),"<>");
+ QCOMPARE(actual.simplified(),expected.simplified());
+ }
+}
+
+void tst_qdeclarativetextedit::width()
+{
+ // uses Font metrics to find the width for standard and document to find the width for rich
+ {
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData("import Qt 4.6\nTextEdit { text: \"\" }", QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->width(), 1.);//+1 for cursor
+ }
+
+ for (int i = 0; i < standard.size(); i++)
+ {
+ QFont f;
+ QFontMetricsF fm(f);
+ qreal metricWidth = fm.size(Qt::TextExpandTabs && Qt::TextShowMnemonic, standard.at(i)).width();
+ metricWidth = floor(metricWidth);
+
+ QString componentStr = "import Qt 4.6\nTextEdit { text: \"" + standard.at(i) + "\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->width(), qreal(metricWidth + 1 + 3));//+3 is the current way of accounting for space between cursor and last character.
+ }
+
+ for (int i = 0; i < richText.size(); i++)
+ {
+ QTextDocument document;
+ document.setHtml(richText.at(i));
+ document.setDocumentMargin(0);
+
+ int documentWidth = document.idealWidth();
+
+ QString componentStr = "import Qt 4.6\nTextEdit { text: \"" + richText.at(i) + "\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->width(), qreal(documentWidth + 1 + 3));
+ }
+}
+
+void tst_qdeclarativetextedit::wrap()
+{
+ // for specified width and wrap set true
+ {
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData("import Qt 4.6\nTextEdit { text: \"\"; wrap: true; width: 300 }", QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->width(), 300.);
+ }
+
+ for (int i = 0; i < standard.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { wrap: true; width: 300; text: \"" + standard.at(i) + "\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->width(), 300.);
+ }
+
+ for (int i = 0; i < richText.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { wrap: true; width: 300; text: \"" + richText.at(i) + "\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->width(), 300.);
+ }
+
+}
+
+void tst_qdeclarativetextedit::textFormat()
+{
+ {
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData("import Qt 4.6\nTextEdit { text: \"Hello\"; textFormat: Text.RichText }", QUrl::fromLocalFile(""));
+ QDeclarativeTextEdit *textObject = qobject_cast<QDeclarativeTextEdit*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QVERIFY(textObject->textFormat() == QDeclarativeTextEdit::RichText);
+ }
+ {
+ QDeclarativeComponent textComponent(&engine);
+ textComponent.setData("import Qt 4.6\nTextEdit { text: \"<b>Hello</b>\"; textFormat: Text.PlainText }", QUrl::fromLocalFile(""));
+ QDeclarativeTextEdit *textObject = qobject_cast<QDeclarativeTextEdit*>(textComponent.create());
+
+ QVERIFY(textObject != 0);
+ QVERIFY(textObject->textFormat() == QDeclarativeTextEdit::PlainText);
+ }
+}
+
+//the alignment tests may be trivial o.oa
+void tst_qdeclarativetextedit::hAlign()
+{
+ //test one align each, and then test if two align fails.
+
+ for (int i = 0; i < standard.size(); i++)
+ {
+ for (int j=0; j < hAlignmentStrings.size(); j++)
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { horizontalAlignment: \"" + hAlignmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QCOMPARE((int)textEditObject->hAlign(), (int)hAlignments.at(j));
+ }
+ }
+
+ for (int i = 0; i < richText.size(); i++)
+ {
+ for (int j=0; j < hAlignmentStrings.size(); j++)
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { horizontalAlignment: \"" + hAlignmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QCOMPARE((int)textEditObject->hAlign(), (int)hAlignments.at(j));
+ }
+ }
+
+}
+
+void tst_qdeclarativetextedit::vAlign()
+{
+ //test one align each, and then test if two align fails.
+
+ for (int i = 0; i < standard.size(); i++)
+ {
+ for (int j=0; j < vAlignmentStrings.size(); j++)
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { verticalAlignment: \"" + vAlignmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QCOMPARE((int)textEditObject->vAlign(), (int)vAlignments.at(j));
+ }
+ }
+
+ for (int i = 0; i < richText.size(); i++)
+ {
+ for (int j=0; j < vAlignmentStrings.size(); j++)
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { verticalAlignment: \"" + vAlignmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QCOMPARE((int)textEditObject->vAlign(), (int)vAlignments.at(j));
+ }
+ }
+
+}
+
+void tst_qdeclarativetextedit::font()
+{
+ //test size, then bold, then italic, then family
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { font.pointSize: 40; text: \"Hello World\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->font().pointSize(), 40);
+ QCOMPARE(textEditObject->font().bold(), false);
+ QCOMPARE(textEditObject->font().italic(), false);
+ }
+
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { font.bold: true; text: \"Hello World\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->font().bold(), true);
+ QCOMPARE(textEditObject->font().italic(), false);
+ }
+
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { font.italic: true; text: \"Hello World\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->font().italic(), true);
+ QCOMPARE(textEditObject->font().bold(), false);
+ }
+
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { font.family: \"Helvetica\"; text: \"Hello World\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->font().family(), QString("Helvetica"));
+ QCOMPARE(textEditObject->font().bold(), false);
+ QCOMPARE(textEditObject->font().italic(), false);
+ }
+
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { font.family: \"\"; text: \"Hello World\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->font().family(), QString(""));
+ }
+}
+
+void tst_qdeclarativetextedit::color()
+{
+ //test normal
+ for (int i = 0; i < colorStrings.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+ //qDebug() << "textEditObject: " << textEditObject->color() << "vs. " << QColor(colorStrings.at(i));
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->color(), QColor(colorStrings.at(i)));
+ }
+
+ //test selection
+ for (int i = 0; i < colorStrings.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { selectionColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->selectionColor(), QColor(colorStrings.at(i)));
+ }
+
+ //test selected text
+ for (int i = 0; i < colorStrings.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { selectedTextColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->selectedTextColor(), QColor(colorStrings.at(i)));
+ }
+
+ {
+ QString colorStr = "#AA001234";
+ QColor testColor("#001234");
+ testColor.setAlpha(170);
+
+ QString componentStr = "import Qt 4.6\nTextEdit { color: \"" + colorStr + "\"; text: \"Hello World\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->color(), testColor);
+ }
+}
+
+void tst_qdeclarativetextedit::textMargin()
+{
+ for(qreal i=0; i<=10; i+=0.3){
+ QString componentStr = "import Qt 4.6\nTextEdit { textMargin: " + QString::number(i) + "; text: \"Hello World\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->textMargin(), i);
+ }
+}
+
+void tst_qdeclarativetextedit::persistentSelection()
+{
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { persistentSelection: true; text: \"Hello World\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->persistentSelection(), true);
+ }
+
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { persistentSelection: false; text: \"Hello World\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->persistentSelection(), false);
+ }
+}
+
+void tst_qdeclarativetextedit::focusOnPress()
+{
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { focusOnPress: true; text: \"Hello World\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->focusOnPress(), true);
+ }
+
+ {
+ QString componentStr = "import Qt 4.6\nTextEdit { focusOnPress: false; text: \"Hello World\" }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+ QVERIFY(textEditObject != 0);
+ QCOMPARE(textEditObject->focusOnPress(), false);
+ }
+}
+
+void tst_qdeclarativetextedit::selection()
+{
+ QString testStr = standard[0];//TODO: What should happen for multiline/rich text?
+ QString componentStr = "import Qt 4.6\nTextEdit { text: \""+ testStr +"\"; }";
+ QDeclarativeComponent texteditComponent(&engine);
+ texteditComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
+ QVERIFY(textEditObject != 0);
+
+
+ //Test selection follows cursor
+ for(int i=0; i<= testStr.size(); i++) {
+ textEditObject->setCursorPosition(i);
+ QCOMPARE(textEditObject->cursorPosition(), i);
+ QCOMPARE(textEditObject->selectionStart(), i);
+ QCOMPARE(textEditObject->selectionEnd(), i);
+ QVERIFY(textEditObject->selectedText().isNull());
+ }
+
+ textEditObject->setCursorPosition(0);
+ QVERIFY(textEditObject->cursorPosition() == 0);
+ QVERIFY(textEditObject->selectionStart() == 0);
+ QVERIFY(textEditObject->selectionEnd() == 0);
+ QVERIFY(textEditObject->selectedText().isNull());
+
+ //Test selection
+ for(int i=0; i<= testStr.size(); i++) {
+ textEditObject->setSelectionEnd(i);
+ QCOMPARE(testStr.mid(0,i), textEditObject->selectedText());
+ }
+ for(int i=0; i<= testStr.size(); i++) {
+ textEditObject->setSelectionStart(i);
+ QCOMPARE(testStr.mid(i,testStr.size()-i), textEditObject->selectedText());
+ }
+
+ textEditObject->setCursorPosition(0);
+ QVERIFY(textEditObject->cursorPosition() == 0);
+ QVERIFY(textEditObject->selectionStart() == 0);
+ QVERIFY(textEditObject->selectionEnd() == 0);
+ QVERIFY(textEditObject->selectedText().isNull());
+
+ for(int i=0; i< testStr.size(); i++) {
+ textEditObject->setSelectionStart(i);
+ QCOMPARE(textEditObject->selectionEnd(), i);
+ QCOMPARE(testStr.mid(i,0), textEditObject->selectedText());
+ textEditObject->setSelectionEnd(i+1);
+ QCOMPARE(textEditObject->selectionStart(), i);
+ QCOMPARE(testStr.mid(i,1), textEditObject->selectedText());
+ }
+
+ for(int i= testStr.size() - 1; i>0; i--) {
+ textEditObject->setSelectionEnd(i);
+ QCOMPARE(testStr.mid(i,0), textEditObject->selectedText());
+ textEditObject->setSelectionStart(i-1);
+ QCOMPARE(testStr.mid(i-1,1), textEditObject->selectedText());
+ }
+
+ //Test Error Ignoring behaviour
+ textEditObject->setCursorPosition(0);
+ QVERIFY(textEditObject->selectedText().isNull());
+ textEditObject->setSelectionStart(-10);
+ QVERIFY(textEditObject->selectedText().isNull());
+ textEditObject->setSelectionStart(100);
+ QVERIFY(textEditObject->selectedText().isNull());
+ textEditObject->setSelectionEnd(-10);
+ QVERIFY(textEditObject->selectedText().isNull());
+ textEditObject->setSelectionEnd(100);
+ QVERIFY(textEditObject->selectedText().isNull());
+ textEditObject->setSelectionStart(0);
+ textEditObject->setSelectionEnd(10);
+ QVERIFY(textEditObject->selectedText().size() == 10);
+ textEditObject->setSelectionStart(-10);
+ QVERIFY(textEditObject->selectedText().size() == 10);
+ textEditObject->setSelectionStart(100);
+ QVERIFY(textEditObject->selectedText().size() == 10);
+ textEditObject->setSelectionEnd(-10);
+ QVERIFY(textEditObject->selectedText().size() == 10);
+ textEditObject->setSelectionEnd(100);
+ QVERIFY(textEditObject->selectedText().size() == 10);
+}
+
+void tst_qdeclarativetextedit::inputMethodHints()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/inputmethodhints.qml");
+ canvas->show();
+ canvas->setFocus();
+
+ QVERIFY(canvas->rootObject() != 0);
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit *>(canvas->rootObject());
+ QVERIFY(textEditObject != 0);
+ QVERIFY(textEditObject->inputMethodHints() & Qt::ImhNoPredictiveText);
+ textEditObject->setInputMethodHints(Qt::ImhUppercaseOnly);
+ QVERIFY(textEditObject->inputMethodHints() & Qt::ImhUppercaseOnly);
+}
+
+void tst_qdeclarativetextedit::cursorDelegate()
+{
+ QDeclarativeView* view = createView(SRCDIR "/data/cursorTest.qml");
+ view->show();
+ view->setFocus();
+ QDeclarativeTextEdit *textEditObject = view->rootObject()->findChild<QDeclarativeTextEdit*>("textEditObject");
+ QVERIFY(textEditObject != 0);
+ QVERIFY(textEditObject->findChild<QDeclarativeItem*>("cursorInstance"));
+ //Test Delegate gets created
+ textEditObject->setFocus(true);
+ QDeclarativeItem* delegateObject = textEditObject->findChild<QDeclarativeItem*>("cursorInstance");
+ QVERIFY(delegateObject);
+ //Test Delegate gets moved
+ for(int i=0; i<= textEditObject->text().length(); i++){
+ textEditObject->setCursorPosition(i);
+ QCOMPARE(textEditObject->cursorRect().x(), qRound(delegateObject->x()));
+ QCOMPARE(textEditObject->cursorRect().y(), qRound(delegateObject->y()));
+ }
+ textEditObject->setCursorPosition(0);
+ QCOMPARE(textEditObject->cursorRect().x(), qRound(delegateObject->x()));
+ QCOMPARE(textEditObject->cursorRect().y(), qRound(delegateObject->y()));
+ //Test Delegate gets deleted
+ textEditObject->setCursorDelegate(0);
+ QVERIFY(!textEditObject->findChild<QDeclarativeItem*>("cursorInstance"));
+}
+
+void tst_qdeclarativetextedit::delegateLoading()
+{
+ TestHTTPServer server(42332);
+ server.serveDirectory(SRCDIR "/data/httpfail", TestHTTPServer::Disconnect);
+ server.serveDirectory(SRCDIR "/data/httpslow", TestHTTPServer::Delay);
+ server.serveDirectory(SRCDIR "/data/http");
+ QDeclarativeView* view = new QDeclarativeView(0);
+ view->setSource(QUrl("http://localhost:42332/cursorHttpTestPass.qml"));
+ view->show();
+ view->setFocus();
+ QTRY_VERIFY(view->rootObject());//Wait for loading to finish.
+ QDeclarativeTextEdit *textEditObject = view->rootObject()->findChild<QDeclarativeTextEdit*>("textEditObject");
+ // view->rootObject()->dumpObjectTree();
+ QVERIFY(textEditObject != 0);
+ textEditObject->setFocus(true);
+ QDeclarativeItem *delegate;
+ delegate = view->rootObject()->findChild<QDeclarativeItem*>("delegateOkay");
+ QVERIFY(delegate);
+ delegate = view->rootObject()->findChild<QDeclarativeItem*>("delegateSlow");
+ QVERIFY(delegate);
+ view->setSource(QUrl("http://localhost:42332/cursorHttpTestFail1.qml"));
+ view->show();
+ QTRY_VERIFY(view->status()==QDeclarativeView::Error);
+ view->setFocus();
+ QTRY_VERIFY(!view->rootObject()); // there is fail item inside this test
+ view->setSource(QUrl("http://localhost:42332/cursorHttpTestFail2.qml"));
+ view->show();
+ QTRY_VERIFY(view->status()==QDeclarativeView::Error);
+ view->setFocus();
+ QTRY_VERIFY(!view->rootObject()); // there is fail item inside this test
+ //A test should be added here with a component which is ready but component.create() returns null
+ //Not sure how to accomplish this with QDeclarativeTextEdits cursor delegate
+ //###This was only needed for code coverage, and could be a case of overzealous defensive programming
+ //delegate = view->rootObject()->findChild<QDeclarativeItem*>("delegateErrorB");
+ //QVERIFY(!delegate);
+}
+
+/*
+TextEdit element should only handle left/right keys until the cursor reaches
+the extent of the text, then they should ignore the keys.
+*/
+void tst_qdeclarativetextedit::navigation()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/navigation.qml");
+ canvas->show();
+ canvas->setFocus();
+
+ QVERIFY(canvas->rootObject() != 0);
+
+ QDeclarativeItem *input = qobject_cast<QDeclarativeItem *>(qvariant_cast<QObject *>(canvas->rootObject()->property("myInput")));
+
+ QVERIFY(input != 0);
+ QTRY_VERIFY(input->hasFocus() == true);
+ simulateKey(canvas, Qt::Key_Left);
+ QVERIFY(input->hasFocus() == false);
+ simulateKey(canvas, Qt::Key_Right);
+ QVERIFY(input->hasFocus() == true);
+ simulateKey(canvas, Qt::Key_Right);
+ QVERIFY(input->hasFocus() == false);
+ simulateKey(canvas, Qt::Key_Left);
+ QVERIFY(input->hasFocus() == true);
+}
+
+void tst_qdeclarativetextedit::readOnly()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/readOnly.qml");
+ canvas->show();
+ canvas->setFocus();
+
+ QVERIFY(canvas->rootObject() != 0);
+
+ QDeclarativeTextEdit *edit = qobject_cast<QDeclarativeTextEdit *>(qvariant_cast<QObject *>(canvas->rootObject()->property("myInput")));
+
+ QVERIFY(edit != 0);
+ QTRY_VERIFY(edit->hasFocus() == true);
+ QVERIFY(edit->isReadOnly() == true);
+ QString initial = edit->text();
+ for(int k=Qt::Key_0; k<=Qt::Key_Z; k++)
+ simulateKey(canvas, k);
+ simulateKey(canvas, Qt::Key_Return);
+ simulateKey(canvas, Qt::Key_Space);
+ simulateKey(canvas, Qt::Key_Escape);
+ QCOMPARE(edit->text(), initial);
+}
+
+void tst_qdeclarativetextedit::simulateKey(QDeclarativeView *view, int key)
+{
+ QKeyEvent press(QKeyEvent::KeyPress, key, 0);
+ QKeyEvent release(QKeyEvent::KeyRelease, key, 0);
+
+ QApplication::sendEvent(view, &press);
+ QApplication::sendEvent(view, &release);
+}
+
+QDeclarativeView *tst_qdeclarativetextedit::createView(const QString &filename)
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+
+ canvas->setSource(QUrl::fromLocalFile(filename));
+ return canvas;
+}
+
+class MyInputContext : public QInputContext
+{
+public:
+ MyInputContext() : softwareInputPanelEventReceived(false) {}
+ ~MyInputContext() {}
+
+ QString identifierName() { return QString(); }
+ QString language() { return QString(); }
+
+ void reset() {}
+
+ bool isComposing() const { return false; }
+
+ bool filterEvent( const QEvent *event )
+ {
+ if (event->type() == QEvent::RequestSoftwareInputPanel)
+ softwareInputPanelEventReceived = true;
+ return QInputContext::filterEvent(event);
+ }
+ bool softwareInputPanelEventReceived;
+};
+
+void tst_qdeclarativetextedit::sendRequestSoftwareInputPanelEvent()
+{
+ QGraphicsScene scene;
+ QGraphicsView view(&scene);
+ MyInputContext ic;
+ view.viewport()->setInputContext(&ic);
+ QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel(
+ view.style()->styleHint(QStyle::SH_RequestSoftwareInputPanel));
+ if ((behavior != QStyle::RSIP_OnMouseClick))
+ QSKIP("This test need to have a style with RSIP_OnMouseClick", SkipSingle);
+ QDeclarativeTextEdit edit;
+ edit.setText("Hello world");
+ edit.setPos(0, 0);
+ scene.addItem(&edit);
+ view.show();
+ qApp->setAutoSipEnabled(true);
+ QApplication::setActiveWindow(&view);
+ QTest::qWaitForWindowShown(&view);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&view));
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos()));
+ QApplication::processEvents();
+ QCOMPARE(ic.softwareInputPanelEventReceived, true);
+}
+QTEST_MAIN(tst_qdeclarativetextedit)
+
+#include "tst_qdeclarativetextedit.moc"
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml b/tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml
new file mode 100644
index 0000000000..ddc98cc763
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+Rectangle { width: 300; height: 300; color: "white"
+ TextInput { text: "Hello world!"; id: textInputObject; objectName: "textInputObject"
+ resources: [ Component { id:cursor; Item { id:cursorInstance; objectName: "cursorInstance";} } ]
+ cursorDelegate: cursor
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/inputmethodhints.qml b/tests/auto/declarative/qdeclarativetextinput/data/inputmethodhints.qml
new file mode 100644
index 0000000000..b404682b9c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextinput/data/inputmethodhints.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+TextInput {
+ text: "Hello world!"
+ inputMethodHints: Qt.ImhNoPredictiveText
+}
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/masks.qml b/tests/auto/declarative/qdeclarativetextinput/data/masks.qml
new file mode 100644
index 0000000000..08a857cea0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextinput/data/masks.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+TextInput{
+ focus: true
+ objectName: "myInput"
+ inputMask: "HHHHhhhh; "
+}
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml b/tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml
new file mode 100644
index 0000000000..7cbeadd027
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+TextInput{
+ focus: true
+ objectName: "myInput"
+ maximumLength: 10
+}
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml b/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml
new file mode 100644
index 0000000000..493db5b83c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml
@@ -0,0 +1,24 @@
+import Qt 4.6
+
+Rectangle {
+ property var myInput: input
+
+ width: 800; height: 600; color: "blue"
+
+ Item {
+ id: firstItem;
+ KeyNavigation.right: input
+ }
+
+ TextInput { id: input; focus: true
+ text: "Needs some text"
+ KeyNavigation.left: firstItem
+ KeyNavigation.right: lastItem
+ KeyNavigation.up: firstItem
+ KeyNavigation.down: lastItem
+ }
+ Item {
+ id: lastItem
+ KeyNavigation.left: input
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml b/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml
new file mode 100644
index 0000000000..c47371a4ed
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml
@@ -0,0 +1,12 @@
+import Qt 4.6
+
+Rectangle {
+ property var myInput: input
+
+ width: 800; height: 600; color: "blue"
+
+ TextInput { id: input; focus: true
+ readOnly: true
+ text: "I am the very model of a modern major general.\n"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/validators.qml b/tests/auto/declarative/qdeclarativetextinput/data/validators.qml
new file mode 100644
index 0000000000..0c81548dc0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextinput/data/validators.qml
@@ -0,0 +1,23 @@
+import Qt 4.7
+
+Item {
+ property var intInput: intInput
+ property var dblInput: dblInput
+ property var strInput: strInput
+
+ width: 800; height: 600;
+
+ Column{
+ TextInput { id: intInput;
+ validator: QIntValidator{top: 11; bottom: 2}
+ }
+ TextInput { id: dblInput;
+ validator: QDoubleValidator{top: 12.12; bottom: 2.93; decimals: 2; notation: QDoubleValidator.StandardNotation}
+ }
+ TextInput { id: strInput;
+ //Requires QTBUG-8025 to be implemented first
+ //validator: QRegExpValidator { regExp: /[a-zA-z]{2,4}/;}
+ }
+ }
+
+}
diff --git a/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro b/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
new file mode 100644
index 0000000000..5aed51fe58
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativetextinput.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
new file mode 100644
index 0000000000..8b513e851a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -0,0 +1,656 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include "../../../shared/util.h"
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QFile>
+#include <QtDeclarative/qdeclarativeview.h>
+#include <private/qdeclarativetextinput_p.h>
+#include <QDebug>
+#include <QStyle>
+#include <QInputContext>
+
+class tst_qdeclarativetextinput : public QObject
+
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativetextinput();
+
+private slots:
+ void text();
+ void width();
+ void font();
+ void color();
+ void selection();
+
+ void maxLength();
+ void masks();
+ void validators();
+ void inputMethodHints();
+
+ void cursorDelegate();
+ void navigation();
+ void readOnly();
+
+ void sendRequestSoftwareInputPanelEvent();
+
+private:
+ void simulateKey(QDeclarativeView *, int key);
+ QDeclarativeView *createView(const QString &filename);
+
+ QDeclarativeEngine engine;
+ QStringList standard;
+ QStringList colorStrings;
+};
+
+tst_qdeclarativetextinput::tst_qdeclarativetextinput()
+{
+ standard << "the quick brown fox jumped over the lazy dog"
+ << "It's supercalifragisiticexpialidocious!"
+ << "Hello, world!";
+
+ colorStrings << "aliceblue"
+ << "antiquewhite"
+ << "aqua"
+ << "darkkhaki"
+ << "darkolivegreen"
+ << "dimgray"
+ << "palevioletred"
+ << "lightsteelblue"
+ << "#000000"
+ << "#AAAAAA"
+ << "#FFFFFF"
+ << "#2AC05F";
+}
+
+void tst_qdeclarativetextinput::text()
+{
+ {
+ QDeclarativeComponent textinputComponent(&engine);
+ textinputComponent.setData("import Qt 4.6\nTextInput { text: \"\" }", QUrl());
+ QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
+
+ QVERIFY(textinputObject != 0);
+ QCOMPARE(textinputObject->text(), QString(""));
+ }
+
+ for (int i = 0; i < standard.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nTextInput { text: \"" + standard.at(i) + "\" }";
+ QDeclarativeComponent textinputComponent(&engine);
+ textinputComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
+
+ QVERIFY(textinputObject != 0);
+ QCOMPARE(textinputObject->text(), standard.at(i));
+ }
+
+}
+
+void tst_qdeclarativetextinput::width()
+{
+ // uses Font metrics to find the width for standard
+ {
+ QDeclarativeComponent textinputComponent(&engine);
+ textinputComponent.setData("import Qt 4.6\nTextInput { text: \"\" }", QUrl());
+ QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
+
+ QVERIFY(textinputObject != 0);
+ QCOMPARE(textinputObject->width(), 1.);//1 for the cursor
+ }
+
+ for (int i = 0; i < standard.size(); i++)
+ {
+ QFont f;
+ QFontMetricsF fm(f);
+ qreal metricWidth = fm.width(standard.at(i));
+
+ QString componentStr = "import Qt 4.6\nTextInput { text: \"" + standard.at(i) + "\" }";
+ QDeclarativeComponent textinputComponent(&engine);
+ textinputComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
+
+ QVERIFY(textinputObject != 0);
+ QCOMPARE(textinputObject->width(), qreal(metricWidth) + 1.);//1 for the cursor
+ }
+}
+
+void tst_qdeclarativetextinput::font()
+{
+ //test size, then bold, then italic, then family
+ {
+ QString componentStr = "import Qt 4.6\nTextInput { font.pointSize: 40; text: \"Hello World\" }";
+ QDeclarativeComponent textinputComponent(&engine);
+ textinputComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
+
+ QVERIFY(textinputObject != 0);
+ QCOMPARE(textinputObject->font().pointSize(), 40);
+ QCOMPARE(textinputObject->font().bold(), false);
+ QCOMPARE(textinputObject->font().italic(), false);
+ }
+
+ {
+ QString componentStr = "import Qt 4.6\nTextInput { font.bold: true; text: \"Hello World\" }";
+ QDeclarativeComponent textinputComponent(&engine);
+ textinputComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
+
+ QVERIFY(textinputObject != 0);
+ QCOMPARE(textinputObject->font().bold(), true);
+ QCOMPARE(textinputObject->font().italic(), false);
+ }
+
+ {
+ QString componentStr = "import Qt 4.6\nTextInput { font.italic: true; text: \"Hello World\" }";
+ QDeclarativeComponent textinputComponent(&engine);
+ textinputComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
+
+ QVERIFY(textinputObject != 0);
+ QCOMPARE(textinputObject->font().italic(), true);
+ QCOMPARE(textinputObject->font().bold(), false);
+ }
+
+ {
+ QString componentStr = "import Qt 4.6\nTextInput { font.family: \"Helvetica\"; text: \"Hello World\" }";
+ QDeclarativeComponent textinputComponent(&engine);
+ textinputComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
+
+ QVERIFY(textinputObject != 0);
+ QCOMPARE(textinputObject->font().family(), QString("Helvetica"));
+ QCOMPARE(textinputObject->font().bold(), false);
+ QCOMPARE(textinputObject->font().italic(), false);
+ }
+
+ {
+ QString componentStr = "import Qt 4.6\nTextInput { font.family: \"\"; text: \"Hello World\" }";
+ QDeclarativeComponent textinputComponent(&engine);
+ textinputComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
+
+ QVERIFY(textinputObject != 0);
+ QCOMPARE(textinputObject->font().family(), QString(""));
+ }
+}
+
+void tst_qdeclarativetextinput::color()
+{
+ //test color
+ for (int i = 0; i < colorStrings.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nTextInput { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QDeclarativeComponent textinputComponent(&engine);
+ textinputComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
+ QVERIFY(textinputObject != 0);
+ QCOMPARE(textinputObject->color(), QColor(colorStrings.at(i)));
+ }
+
+ //test selection color
+ for (int i = 0; i < colorStrings.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nTextInput { selectionColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QDeclarativeComponent textinputComponent(&engine);
+ textinputComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
+ QVERIFY(textinputObject != 0);
+ QCOMPARE(textinputObject->selectionColor(), QColor(colorStrings.at(i)));
+ }
+
+ //test selected text color
+ for (int i = 0; i < colorStrings.size(); i++)
+ {
+ QString componentStr = "import Qt 4.6\nTextInput { selectedTextColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QDeclarativeComponent textinputComponent(&engine);
+ textinputComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
+ QVERIFY(textinputObject != 0);
+ QCOMPARE(textinputObject->selectedTextColor(), QColor(colorStrings.at(i)));
+ }
+
+ {
+ QString colorStr = "#AA001234";
+ QColor testColor("#001234");
+ testColor.setAlpha(170);
+
+ QString componentStr = "import Qt 4.6\nTextInput { color: \"" + colorStr + "\"; text: \"Hello World\" }";
+ QDeclarativeComponent textinputComponent(&engine);
+ textinputComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
+
+ QVERIFY(textinputObject != 0);
+ QCOMPARE(textinputObject->color(), testColor);
+ }
+}
+
+void tst_qdeclarativetextinput::selection()
+{
+ QString testStr = standard[0];
+ QString componentStr = "import Qt 4.6\nTextInput { text: \""+ testStr +"\"; }";
+ QDeclarativeComponent textinputComponent(&engine);
+ textinputComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
+ QVERIFY(textinputObject != 0);
+
+
+ //Test selection follows cursor
+ for(int i=0; i<= testStr.size(); i++) {
+ textinputObject->setCursorPosition(i);
+ QCOMPARE(textinputObject->cursorPosition(), i);
+ QCOMPARE(textinputObject->selectionStart(), i);
+ QCOMPARE(textinputObject->selectionEnd(), i);
+ QVERIFY(textinputObject->selectedText().isNull());
+ }
+
+ textinputObject->setCursorPosition(0);
+ QVERIFY(textinputObject->cursorPosition() == 0);
+ QVERIFY(textinputObject->selectionStart() == 0);
+ QVERIFY(textinputObject->selectionEnd() == 0);
+ QVERIFY(textinputObject->selectedText().isNull());
+
+ //Test selection
+ for(int i=0; i<= testStr.size(); i++) {
+ textinputObject->setSelectionEnd(i);
+ QCOMPARE(testStr.mid(0,i), textinputObject->selectedText());
+ }
+ for(int i=0; i<= testStr.size(); i++) {
+ textinputObject->setSelectionStart(i);
+ QCOMPARE(testStr.mid(i,testStr.size()-i), textinputObject->selectedText());
+ }
+
+ textinputObject->setCursorPosition(0);
+ QVERIFY(textinputObject->cursorPosition() == 0);
+ QVERIFY(textinputObject->selectionStart() == 0);
+ QVERIFY(textinputObject->selectionEnd() == 0);
+ QVERIFY(textinputObject->selectedText().isNull());
+
+ for(int i=0; i< testStr.size(); i++) {
+ textinputObject->setSelectionStart(i);
+ QCOMPARE(textinputObject->selectionEnd(), i);
+ QCOMPARE(testStr.mid(i,0), textinputObject->selectedText());
+ textinputObject->setSelectionEnd(i+1);
+ QCOMPARE(textinputObject->selectionStart(), i);
+ QCOMPARE(testStr.mid(i,1), textinputObject->selectedText());
+ }
+
+ for(int i= testStr.size() - 1; i>0; i--) {
+ textinputObject->setSelectionEnd(i);
+ QCOMPARE(testStr.mid(i,0), textinputObject->selectedText());
+ textinputObject->setSelectionStart(i-1);
+ QCOMPARE(testStr.mid(i-1,1), textinputObject->selectedText());
+ }
+
+ //Test Error Ignoring behaviour
+ textinputObject->setCursorPosition(0);
+ QVERIFY(textinputObject->selectedText().isNull());
+ textinputObject->setSelectionStart(-10);
+ QVERIFY(textinputObject->selectedText().isNull());
+ textinputObject->setSelectionStart(100);
+ QVERIFY(textinputObject->selectedText().isNull());
+ textinputObject->setSelectionEnd(-10);
+ QVERIFY(textinputObject->selectedText().isNull());
+ textinputObject->setSelectionEnd(100);
+ QVERIFY(textinputObject->selectedText().isNull());
+ textinputObject->setSelectionStart(0);
+ textinputObject->setSelectionEnd(10);
+ QVERIFY(textinputObject->selectedText().size() == 10);
+ textinputObject->setSelectionStart(-10);
+ QVERIFY(textinputObject->selectedText().size() == 10);
+ textinputObject->setSelectionStart(100);
+ QVERIFY(textinputObject->selectedText().size() == 10);
+ textinputObject->setSelectionEnd(-10);
+ QVERIFY(textinputObject->selectedText().size() == 10);
+ textinputObject->setSelectionEnd(100);
+ QVERIFY(textinputObject->selectedText().size() == 10);
+}
+
+void tst_qdeclarativetextinput::maxLength()
+{
+ //QString componentStr = "import Qt 4.6\nTextInput { maximumLength: 10; }";
+ QDeclarativeView *canvas = createView(SRCDIR "/data/maxLength.qml");
+ canvas->show();
+ canvas->setFocus();
+ QVERIFY(canvas->rootObject() != 0);
+ QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput *>(canvas->rootObject());
+ QVERIFY(textinputObject != 0);
+ QVERIFY(textinputObject->text().isEmpty());
+ QVERIFY(textinputObject->maxLength() == 10);
+ foreach(const QString &str, standard){
+ QVERIFY(textinputObject->text().length() <= 10);
+ textinputObject->setText(str);
+ QVERIFY(textinputObject->text().length() <= 10);
+ }
+
+ textinputObject->setText("");
+ QTRY_VERIFY(textinputObject->hasFocus() == true);
+ for(int i=0; i<20; i++){
+ QCOMPARE(textinputObject->text().length(), qMin(i,10));
+ //simulateKey(canvas, Qt::Key_A);
+ QTest::keyPress(canvas, Qt::Key_A);
+ QTest::keyRelease(canvas, Qt::Key_A, Qt::NoModifier ,10);
+ }
+}
+
+void tst_qdeclarativetextinput::masks()
+{
+ //Not a comprehensive test of the possible masks, that's done elsewhere (QLineEdit)
+ //QString componentStr = "import Qt 4.6\nTextInput { inputMask: 'HHHHhhhh'; }";
+ QDeclarativeView *canvas = createView(SRCDIR "/data/masks.qml");
+ canvas->show();
+ canvas->setFocus();
+ QVERIFY(canvas->rootObject() != 0);
+ QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput *>(canvas->rootObject());
+ QVERIFY(textinputObject != 0);
+ QTRY_VERIFY(textinputObject->hasFocus() == true);
+ QVERIFY(textinputObject->text().length() == 0);
+ QCOMPARE(textinputObject->inputMask(), QString("HHHHhhhh; "));
+ for(int i=0; i<10; i++){
+ QCOMPARE(qMin(i,8), textinputObject->text().length());
+ QCOMPARE(i>=4, textinputObject->hasAcceptableInput());
+ //simulateKey(canvas, Qt::Key_A);
+ QTest::keyPress(canvas, Qt::Key_A);
+ QTest::keyRelease(canvas, Qt::Key_A, Qt::NoModifier ,10);
+ }
+}
+
+void tst_qdeclarativetextinput::validators()
+{
+ // Note that this test assumes that the validators are working properly
+ // so you may need to run their tests first. All validators are checked
+ // here to ensure that their exposure to QML is working.
+
+ QDeclarativeView *canvas = createView(SRCDIR "/data/validators.qml");
+ canvas->show();
+ canvas->setFocus();
+
+ QVERIFY(canvas->rootObject() != 0);
+
+ QDeclarativeTextInput *intInput = qobject_cast<QDeclarativeTextInput *>(qvariant_cast<QObject *>(canvas->rootObject()->property("intInput")));
+ QVERIFY(intInput);
+ intInput->setFocus(true);
+ QTRY_VERIFY(intInput->hasFocus());
+ QTest::keyPress(canvas, Qt::Key_1);
+ QTest::keyRelease(canvas, Qt::Key_1, Qt::NoModifier ,10);
+ QCOMPARE(intInput->text(), QLatin1String("1"));
+ QCOMPARE(intInput->hasAcceptableInput(), false);
+ QTest::keyPress(canvas, Qt::Key_2);
+ QTest::keyRelease(canvas, Qt::Key_2, Qt::NoModifier ,10);
+ QCOMPARE(intInput->text(), QLatin1String("1"));
+ QCOMPARE(intInput->hasAcceptableInput(), false);
+ QTest::keyPress(canvas, Qt::Key_1);
+ QTest::keyRelease(canvas, Qt::Key_1, Qt::NoModifier ,10);
+ QCOMPARE(intInput->text(), QLatin1String("11"));
+ QCOMPARE(intInput->hasAcceptableInput(), true);
+ QTest::keyPress(canvas, Qt::Key_0);
+ QTest::keyRelease(canvas, Qt::Key_0, Qt::NoModifier ,10);
+ QCOMPARE(intInput->text(), QLatin1String("11"));
+ QCOMPARE(intInput->hasAcceptableInput(), true);
+
+ QDeclarativeTextInput *dblInput = qobject_cast<QDeclarativeTextInput *>(qvariant_cast<QObject *>(canvas->rootObject()->property("dblInput")));
+ QTRY_VERIFY(dblInput);
+ dblInput->setFocus(true);
+ QVERIFY(dblInput->hasFocus() == true);
+ QTest::keyPress(canvas, Qt::Key_1);
+ QTest::keyRelease(canvas, Qt::Key_1, Qt::NoModifier ,10);
+ QCOMPARE(dblInput->text(), QLatin1String("1"));
+ QCOMPARE(dblInput->hasAcceptableInput(), false);
+ QTest::keyPress(canvas, Qt::Key_2);
+ QTest::keyRelease(canvas, Qt::Key_2, Qt::NoModifier ,10);
+ QCOMPARE(dblInput->text(), QLatin1String("12"));
+ QCOMPARE(dblInput->hasAcceptableInput(), true);
+ QTest::keyPress(canvas, Qt::Key_Period);
+ QTest::keyRelease(canvas, Qt::Key_Period, Qt::NoModifier ,10);
+ QCOMPARE(dblInput->text(), QLatin1String("12."));
+ QCOMPARE(dblInput->hasAcceptableInput(), true);
+ QTest::keyPress(canvas, Qt::Key_1);
+ QTest::keyRelease(canvas, Qt::Key_1, Qt::NoModifier ,10);
+ QCOMPARE(dblInput->text(), QLatin1String("12.1"));
+ QCOMPARE(dblInput->hasAcceptableInput(), true);
+ QTest::keyPress(canvas, Qt::Key_1);
+ QTest::keyRelease(canvas, Qt::Key_1, Qt::NoModifier ,10);
+ QCOMPARE(dblInput->text(), QLatin1String("12.11"));
+ QCOMPARE(dblInput->hasAcceptableInput(), true);
+ QTest::keyPress(canvas, Qt::Key_1);
+ QTest::keyRelease(canvas, Qt::Key_1, Qt::NoModifier ,10);
+ QCOMPARE(dblInput->text(), QLatin1String("12.11"));
+ QCOMPARE(dblInput->hasAcceptableInput(), true);
+
+ QDeclarativeTextInput *strInput = qobject_cast<QDeclarativeTextInput *>(qvariant_cast<QObject *>(canvas->rootObject()->property("strInput")));
+ QTRY_VERIFY(strInput);
+ strInput->setFocus(true);
+ QVERIFY(strInput->hasFocus() == true);
+ QTest::keyPress(canvas, Qt::Key_1);
+ QTest::keyRelease(canvas, Qt::Key_1, Qt::NoModifier ,10);
+ QEXPECT_FAIL("","Will not work until QTBUG-8025 is resolved", Abort);
+ QCOMPARE(strInput->text(), QLatin1String(""));
+ QCOMPARE(strInput->hasAcceptableInput(), false);
+ QTest::keyPress(canvas, Qt::Key_A);
+ QTest::keyRelease(canvas, Qt::Key_A, Qt::NoModifier ,10);
+ QCOMPARE(strInput->text(), QLatin1String("a"));
+ QCOMPARE(strInput->hasAcceptableInput(), false);
+ QTest::keyPress(canvas, Qt::Key_A);
+ QTest::keyRelease(canvas, Qt::Key_A, Qt::NoModifier ,10);
+ QCOMPARE(strInput->text(), QLatin1String("aa"));
+ QCOMPARE(strInput->hasAcceptableInput(), true);
+ QTest::keyPress(canvas, Qt::Key_A);
+ QTest::keyRelease(canvas, Qt::Key_A, Qt::NoModifier ,10);
+ QCOMPARE(strInput->text(), QLatin1String("aaa"));
+ QCOMPARE(strInput->hasAcceptableInput(), true);
+ QTest::keyPress(canvas, Qt::Key_A);
+ QTest::keyRelease(canvas, Qt::Key_A, Qt::NoModifier ,10);
+ QCOMPARE(strInput->text(), QLatin1String("aaaa"));
+ QCOMPARE(strInput->hasAcceptableInput(), true);
+ QTest::keyPress(canvas, Qt::Key_A);
+ QTest::keyRelease(canvas, Qt::Key_A, Qt::NoModifier ,10);
+ QCOMPARE(strInput->text(), QLatin1String("aaaa"));
+ QCOMPARE(strInput->hasAcceptableInput(), true);
+}
+
+void tst_qdeclarativetextinput::inputMethodHints()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/inputmethodhints.qml");
+ canvas->show();
+ canvas->setFocus();
+
+ QVERIFY(canvas->rootObject() != 0);
+ QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput *>(canvas->rootObject());
+ QVERIFY(textinputObject != 0);
+ QVERIFY(textinputObject->inputMethodHints() & Qt::ImhNoPredictiveText);
+ textinputObject->setInputMethodHints(Qt::ImhUppercaseOnly);
+ QVERIFY(textinputObject->inputMethodHints() & Qt::ImhUppercaseOnly);
+}
+
+/*
+TextInput element should only handle left/right keys until the cursor reaches
+the extent of the text, then they should ignore the keys.
+
+*/
+void tst_qdeclarativetextinput::navigation()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/navigation.qml");
+ canvas->show();
+ canvas->setFocus();
+
+ QVERIFY(canvas->rootObject() != 0);
+
+ QDeclarativeTextInput *input = qobject_cast<QDeclarativeTextInput *>(qvariant_cast<QObject *>(canvas->rootObject()->property("myInput")));
+
+ QVERIFY(input != 0);
+ input->setCursorPosition(0);
+ QTRY_VERIFY(input->hasFocus() == true);
+ simulateKey(canvas, Qt::Key_Left);
+ QVERIFY(input->hasFocus() == false);
+ simulateKey(canvas, Qt::Key_Right);
+ QVERIFY(input->hasFocus() == true);
+ //QT-2944: If text is selected, then we should deselect first.
+ input->setCursorPosition(input->text().length());
+ input->setSelectionStart(0);
+ input->setSelectionEnd(input->text().length());
+ QVERIFY(input->selectionStart() != input->selectionEnd());
+ simulateKey(canvas, Qt::Key_Right);
+ QVERIFY(input->selectionStart() == input->selectionEnd());
+ QVERIFY(input->selectionStart() == input->text().length());
+ QVERIFY(input->hasFocus() == true);
+ simulateKey(canvas, Qt::Key_Right);
+ QVERIFY(input->hasFocus() == false);
+ simulateKey(canvas, Qt::Key_Left);
+ QVERIFY(input->hasFocus() == true);
+}
+
+void tst_qdeclarativetextinput::cursorDelegate()
+{
+ QDeclarativeView* view = createView(SRCDIR "/data/cursorTest.qml");
+ view->show();
+ view->setFocus();
+ QDeclarativeTextInput *textInputObject = view->rootObject()->findChild<QDeclarativeTextInput*>("textInputObject");
+ QVERIFY(textInputObject != 0);
+ QVERIFY(textInputObject->findChild<QDeclarativeItem*>("cursorInstance"));
+ //Test Delegate gets created
+ textInputObject->setFocus(true);
+ QDeclarativeItem* delegateObject = textInputObject->findChild<QDeclarativeItem*>("cursorInstance");
+ QVERIFY(delegateObject);
+ //Test Delegate gets moved
+ for(int i=0; i<= textInputObject->text().length(); i++){
+ textInputObject->setCursorPosition(i);
+ //+5 is because the TextInput cursorRect is just a 10xHeight area centered on cursor position
+ QCOMPARE(textInputObject->cursorRect().x() + 5, qRound(delegateObject->x()));
+ QCOMPARE(textInputObject->cursorRect().y(), qRound(delegateObject->y()));
+ }
+ textInputObject->setCursorPosition(0);
+ QCOMPARE(textInputObject->cursorRect().x()+5, qRound(delegateObject->x()));
+ QCOMPARE(textInputObject->cursorRect().y(), qRound(delegateObject->y()));
+ //Test Delegate gets deleted
+ textInputObject->setCursorDelegate(0);
+ QVERIFY(!textInputObject->findChild<QDeclarativeItem*>("cursorInstance"));
+}
+
+void tst_qdeclarativetextinput::readOnly()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/readOnly.qml");
+ canvas->show();
+ canvas->setFocus();
+
+ QVERIFY(canvas->rootObject() != 0);
+
+ QDeclarativeTextInput *input = qobject_cast<QDeclarativeTextInput *>(qvariant_cast<QObject *>(canvas->rootObject()->property("myInput")));
+
+ QVERIFY(input != 0);
+ QTRY_VERIFY(input->hasFocus() == true);
+ QVERIFY(input->isReadOnly() == true);
+ QString initial = input->text();
+ for(int k=Qt::Key_0; k<=Qt::Key_Z; k++)
+ simulateKey(canvas, k);
+ simulateKey(canvas, Qt::Key_Return);
+ simulateKey(canvas, Qt::Key_Space);
+ simulateKey(canvas, Qt::Key_Escape);
+ QCOMPARE(input->text(), initial);
+}
+
+void tst_qdeclarativetextinput::simulateKey(QDeclarativeView *view, int key)
+{
+ QKeyEvent press(QKeyEvent::KeyPress, key, 0);
+ QKeyEvent release(QKeyEvent::KeyRelease, key, 0);
+
+ QApplication::sendEvent(view, &press);
+ QApplication::sendEvent(view, &release);
+}
+
+QDeclarativeView *tst_qdeclarativetextinput::createView(const QString &filename)
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+
+ canvas->setSource(QUrl::fromLocalFile(filename));
+
+ return canvas;
+}
+
+class MyInputContext : public QInputContext
+{
+public:
+ MyInputContext() : softwareInputPanelEventReceived(false) {}
+ ~MyInputContext() {}
+
+ QString identifierName() { return QString(); }
+ QString language() { return QString(); }
+
+ void reset() {}
+
+ bool isComposing() const { return false; }
+
+ bool filterEvent( const QEvent *event )
+ {
+ if (event->type() == QEvent::RequestSoftwareInputPanel)
+ softwareInputPanelEventReceived = true;
+ return QInputContext::filterEvent(event);
+ }
+ bool softwareInputPanelEventReceived;
+};
+
+void tst_qdeclarativetextinput::sendRequestSoftwareInputPanelEvent()
+{
+ QGraphicsScene scene;
+ QGraphicsView view(&scene);
+ MyInputContext ic;
+ view.viewport()->setInputContext(&ic);
+ QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel(
+ view.style()->styleHint(QStyle::SH_RequestSoftwareInputPanel));
+ if ((behavior != QStyle::RSIP_OnMouseClick))
+ QSKIP("This test need to have a style with RSIP_OnMouseClick", SkipSingle);
+ QDeclarativeTextInput input;
+ input.setText("Hello world");
+ input.setPos(0, 0);
+ scene.addItem(&input);
+ view.show();
+ qApp->setAutoSipEnabled(true);
+ QApplication::setActiveWindow(&view);
+ QTest::qWaitForWindowShown(&view);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&view));
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
+ QApplication::processEvents();
+ QCOMPARE(ic.softwareInputPanelEventReceived, true);
+}
+
+QTEST_MAIN(tst_qdeclarativetextinput)
+
+#include "tst_qdeclarativetextinput.moc"
diff --git a/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro b/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro
new file mode 100644
index 0000000000..b162739f21
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativetimer.cpp
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
new file mode 100644
index 0000000000..1dfec50360
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
@@ -0,0 +1,322 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QtTest/QSignalSpy>
+#include <qtest.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativetimer_p.h>
+#include <QDebug>
+
+class tst_qdeclarativetimer : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativetimer();
+
+private slots:
+ void notRepeating();
+ void notRepeatingStart();
+ void repeat();
+ void noTriggerIfNotRunning();
+ void triggeredOnStart();
+ void triggeredOnStartRepeat();
+ void changeDuration();
+ void restart();
+};
+
+class TimerHelper : public QObject
+{
+ Q_OBJECT
+public:
+ TimerHelper() : QObject(), count(0)
+ {
+ }
+
+ int count;
+
+public slots:
+ void timeout() {
+ ++count;
+ }
+};
+
+#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
+// Increase wait as emulator startup can cause unexpected delays
+#define TIMEOUT_TIMEOUT 2000
+#else
+#define TIMEOUT_TIMEOUT 200
+#endif
+
+tst_qdeclarativetimer::tst_qdeclarativetimer()
+{
+}
+
+void tst_qdeclarativetimer::notRepeating()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine);
+ component.setData(QByteArray("import Qt 4.6\nTimer { interval: 100; running: true }"), QUrl::fromLocalFile(""));
+ QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
+ QVERIFY(timer != 0);
+ QVERIFY(timer->isRunning());
+ QVERIFY(!timer->isRepeating());
+ QCOMPARE(timer->interval(), 100);
+
+ TimerHelper helper;
+ connect(timer, SIGNAL(triggered()), &helper, SLOT(timeout()));
+
+ QTest::qWait(TIMEOUT_TIMEOUT);
+ QCOMPARE(helper.count, 1);
+ QTest::qWait(TIMEOUT_TIMEOUT);
+ QCOMPARE(helper.count, 1);
+ QVERIFY(timer->isRunning() == false);
+}
+
+void tst_qdeclarativetimer::notRepeatingStart()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine);
+ component.setData(QByteArray("import Qt 4.6\nTimer { interval: 100 }"), QUrl::fromLocalFile(""));
+ QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
+ QVERIFY(timer != 0);
+ QVERIFY(!timer->isRunning());
+
+ TimerHelper helper;
+ connect(timer, SIGNAL(triggered()), &helper, SLOT(timeout()));
+
+ QTest::qWait(TIMEOUT_TIMEOUT);
+ QCOMPARE(helper.count, 0);
+
+ timer->start();
+ QTest::qWait(TIMEOUT_TIMEOUT);
+ QCOMPARE(helper.count, 1);
+ QTest::qWait(TIMEOUT_TIMEOUT);
+ QCOMPARE(helper.count, 1);
+ QVERIFY(timer->isRunning() == false);
+
+ delete timer;
+}
+
+void tst_qdeclarativetimer::repeat()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine);
+ component.setData(QByteArray("import Qt 4.6\nTimer { interval: 100; repeat: true; running: true }"), QUrl::fromLocalFile(""));
+ QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
+ QVERIFY(timer != 0);
+
+ TimerHelper helper;
+ connect(timer, SIGNAL(triggered()), &helper, SLOT(timeout()));
+ QCOMPARE(helper.count, 0);
+
+ QTest::qWait(TIMEOUT_TIMEOUT);
+ QVERIFY(helper.count > 0);
+ int oldCount = helper.count;
+
+ QTest::qWait(TIMEOUT_TIMEOUT);
+ QVERIFY(helper.count > oldCount);
+ QVERIFY(timer->isRunning());
+
+ oldCount = helper.count;
+ timer->stop();
+
+ QTest::qWait(TIMEOUT_TIMEOUT);
+ QVERIFY(helper.count == oldCount);
+ QVERIFY(timer->isRunning() == false);
+
+ QSignalSpy spy(timer, SIGNAL(repeatChanged()));
+
+ timer->setRepeating(false);
+ QVERIFY(!timer->isRepeating());
+ QCOMPARE(spy.count(),1);
+
+ timer->setRepeating(false);
+ QCOMPARE(spy.count(),1);
+
+ timer->setRepeating(true);
+ QCOMPARE(spy.count(),2);
+
+ delete timer;
+}
+
+void tst_qdeclarativetimer::triggeredOnStart()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine);
+ component.setData(QByteArray("import Qt 4.6\nTimer { interval: 100; running: true; triggeredOnStart: true }"), QUrl::fromLocalFile(""));
+ QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
+ QVERIFY(timer != 0);
+ QVERIFY(timer->triggeredOnStart());
+
+ TimerHelper helper;
+ connect(timer, SIGNAL(triggered()), &helper, SLOT(timeout()));
+ QTest::qWait(1);
+ QCOMPARE(helper.count, 1);
+
+ QTest::qWait(TIMEOUT_TIMEOUT);
+ QCOMPARE(helper.count, 2);
+ QTest::qWait(TIMEOUT_TIMEOUT);
+ QCOMPARE(helper.count, 2);
+ QVERIFY(timer->isRunning() == false);
+
+ QSignalSpy spy(timer, SIGNAL(triggeredOnStartChanged()));
+
+ timer->setTriggeredOnStart(false);
+ QVERIFY(!timer->triggeredOnStart());
+ QCOMPARE(spy.count(),1);
+
+ timer->setTriggeredOnStart(false);
+ QCOMPARE(spy.count(),1);
+
+ timer->setTriggeredOnStart(true);
+ QCOMPARE(spy.count(),2);
+
+ delete timer;
+}
+
+void tst_qdeclarativetimer::triggeredOnStartRepeat()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine);
+ component.setData(QByteArray("import Qt 4.6\nTimer { interval: 100; running: true; triggeredOnStart: true; repeat: true }"), QUrl::fromLocalFile(""));
+ QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
+ QVERIFY(timer != 0);
+
+ TimerHelper helper;
+ connect(timer, SIGNAL(triggered()), &helper, SLOT(timeout()));
+ QTest::qWait(1);
+ QCOMPARE(helper.count, 1);
+
+ QTest::qWait(TIMEOUT_TIMEOUT);
+ QVERIFY(helper.count > 1);
+ int oldCount = helper.count;
+ QTest::qWait(TIMEOUT_TIMEOUT);
+ QVERIFY(helper.count > oldCount);
+ QVERIFY(timer->isRunning());
+
+ delete timer;
+}
+
+void tst_qdeclarativetimer::noTriggerIfNotRunning()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine);
+ component.setData(QByteArray(
+ "import Qt 4.6\n"
+ "Item { property bool ok: true\n"
+ "Timer { id: t1; interval: 100; repeat: true; running: true; onTriggered: if (!running) ok=false }"
+ "Timer { interval: 10; running: true; onTriggered: t1.running=false }"
+ "}"
+ ), QUrl::fromLocalFile(""));
+ QObject *item = component.create();
+ QVERIFY(item != 0);
+ QTest::qWait(TIMEOUT_TIMEOUT);
+ QCOMPARE(item->property("ok").toBool(), true);
+
+ delete item;
+}
+
+void tst_qdeclarativetimer::changeDuration()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine);
+ component.setData(QByteArray("import Qt 4.6\nTimer { interval: 200; repeat: true; running: true }"), QUrl::fromLocalFile(""));
+ QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
+ QVERIFY(timer != 0);
+
+ TimerHelper helper;
+ connect(timer, SIGNAL(triggered()), &helper, SLOT(timeout()));
+ QCOMPARE(helper.count, 0);
+
+ QTest::qWait(500);
+ QCOMPARE(helper.count, 2);
+
+ timer->setInterval(500);
+
+ QTest::qWait(600);
+ QCOMPARE(helper.count, 3);
+ QVERIFY(timer->isRunning());
+
+ QSignalSpy spy(timer, SIGNAL(intervalChanged()));
+
+ timer->setInterval(200);
+ QCOMPARE(timer->interval(), 200);
+ QCOMPARE(spy.count(),1);
+
+ timer->setInterval(200);
+ QCOMPARE(spy.count(),1);
+
+ timer->setInterval(300);
+ QCOMPARE(spy.count(),2);
+
+ delete timer;
+}
+
+void tst_qdeclarativetimer::restart()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine);
+ component.setData(QByteArray("import Qt 4.6\nTimer { interval: 500; repeat: true; running: true }"), QUrl::fromLocalFile(""));
+ QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
+ QVERIFY(timer != 0);
+
+ TimerHelper helper;
+ connect(timer, SIGNAL(triggered()), &helper, SLOT(timeout()));
+ QCOMPARE(helper.count, 0);
+
+ QTest::qWait(600);
+ QCOMPARE(helper.count, 1);
+
+ QTest::qWait(300);
+
+ timer->restart();
+
+ QTest::qWait(700);
+
+ QCOMPARE(helper.count, 2);
+ QVERIFY(timer->isRunning());
+
+ delete timer;
+}
+
+QTEST_MAIN(tst_qdeclarativetimer)
+
+#include "tst_qdeclarativetimer.moc"
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.2.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.2.qml
new file mode 100644
index 0000000000..ce2e82d0f8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.2.qml
@@ -0,0 +1,9 @@
+import Test 1.0
+
+MyTypeObject {
+ property int value: 10
+ rect.x: value
+
+ onRunScript: { rect = Qt.rect(10, 10, 10, 10) }
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.3.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.3.qml
new file mode 100644
index 0000000000..c82b533633
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.3.qml
@@ -0,0 +1,10 @@
+import Test 1.0
+
+MyTypeObject {
+ property var value
+
+ rect: value
+
+ onRunScript: { rect.x = 44 }
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.qml
new file mode 100644
index 0000000000..a8a72f515b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/autoBindingRemoval.qml
@@ -0,0 +1,9 @@
+import Test 1.0
+
+MyTypeObject {
+ property int value: 10
+ rect.x: value
+
+ onRunScript: { rect.x = 42; }
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/bindingAssignment.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/bindingAssignment.qml
new file mode 100644
index 0000000000..a65218669b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/bindingAssignment.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ property int value: 10
+
+ rect.x: value
+}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/bindingConflict.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/bindingConflict.qml
new file mode 100644
index 0000000000..fd25c9f0a7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/bindingConflict.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+
+MyTypeObject {
+ property int value: 13
+
+ rect.x: value
+ rect: "10,10,10x10"
+}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/bindingRead.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/bindingRead.qml
new file mode 100644
index 0000000000..538d776fba
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/bindingRead.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+
+MyTypeObject {
+ property int value: rect.x
+}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/bindingVariantCopy.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/bindingVariantCopy.qml
new file mode 100644
index 0000000000..691a56cc92
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/bindingVariantCopy.qml
@@ -0,0 +1,13 @@
+import Test 1.0
+
+MyTypeObject {
+ property var object
+ object: MyTypeObject {
+ rect.x: 19
+ rect.y: 33
+ rect.width: 5
+ rect.height: 99
+ }
+
+ rect: object.rect
+}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.js b/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.js
new file mode 100644
index 0000000000..af298ffbd0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.js
@@ -0,0 +1,13 @@
+var savedReference;
+
+function startup()
+{
+ savedReference = object.rect;
+ console.log("Test: " + savedReference.x);
+}
+
+function afterDelete()
+{
+ console.log("Test: " + savedReference.x);
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml
new file mode 100644
index 0000000000..05459f46f2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml
@@ -0,0 +1,12 @@
+import Test 1.0
+import Qt 4.6
+
+MyTypeObject {
+ property var object
+
+ Script { source: "deletedObject.js" }
+
+ object: MyTypeObject {}
+ Component.onCompleted: startup()
+ onRunScript: afterDelete()
+}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.1.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.1.qml
new file mode 100644
index 0000000000..cb01a80669
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.1.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ font.capitalization: "AllUppercase"
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.2.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.2.qml
new file mode 100644
index 0000000000..93f1ed59bc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.2.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ font.capitalization: if (1) "AllUppercase"
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml
new file mode 100644
index 0000000000..3be50990d5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+import Qt 4.6
+
+MyTypeObject {
+ font.capitalization: Font.AllUppercase
+}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml
new file mode 100644
index 0000000000..6b494e447d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+import Qt 4.6 as MyQt
+
+MyTypeObject {
+ font.capitalization: MyQt.Font.AllUppercase
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/font_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/font_read.qml
new file mode 100644
index 0000000000..e1d1ce0962
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/font_read.qml
@@ -0,0 +1,18 @@
+import Test 1.0
+
+MyTypeObject {
+ property string f_family: font.family
+ property bool f_bold: font.bold
+ property int f_weight: font.weight
+ property bool f_italic: font.italic
+ property bool f_underline: font.underline
+ property bool f_overline: font.overline
+ property bool f_strikeout: font.strikeout
+ property real f_pointSize: font.pointSize
+ property int f_pixelSize: font.pixelSize
+ property int f_capitalization: font.capitalization
+ property real f_letterSpacing: font.letterSpacing
+ property real f_wordSpacing: font.wordSpacing;
+ property var copy: font
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.2.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.2.qml
new file mode 100644
index 0000000000..b559389efb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.2.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ font.pixelSize: 10
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.3.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.3.qml
new file mode 100644
index 0000000000..913ac50738
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.3.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ font.pixelSize: 10
+ font.pointSize: 19
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.qml
new file mode 100644
index 0000000000..ff4d0a1004
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.qml
@@ -0,0 +1,16 @@
+import Test 1.0
+
+MyTypeObject {
+ font.family: if(1) "Helvetica"
+ font.bold: if(1) false
+ font.weight: "Normal"
+ font.italic: if(1) false
+ font.underline: if(1) false
+ font.overline: if(1) false
+ font.strikeout: if(1) false
+ font.pointSize: if(1) 15
+ font.capitalization: "AllLowercase"
+ font.letterSpacing: if(1) 9.7
+ font.wordSpacing: if(1) 11.2
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/point_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/point_read.qml
new file mode 100644
index 0000000000..3e67de6ccc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/point_read.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ property int p_x: point.x
+ property int p_y: point.y
+ property var copy: point
+}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/point_write.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/point_write.qml
new file mode 100644
index 0000000000..063525a6f0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/point_write.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ point.x: if (true) 11
+ point.y: if (true) 12
+}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/pointf_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/pointf_read.qml
new file mode 100644
index 0000000000..d845a5be28
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/pointf_read.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+
+MyTypeObject {
+ property real p_x: pointf.x
+ property real p_y: pointf.y
+ property var copy: pointf
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/pointf_write.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/pointf_write.qml
new file mode 100644
index 0000000000..9ee3fc1bda
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/pointf_write.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ pointf.x: if (true) 6.8
+ pointf.y: if (true) 9.3
+}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/rect_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/rect_read.qml
new file mode 100644
index 0000000000..536443148d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/rect_read.qml
@@ -0,0 +1,10 @@
+import Test 1.0
+
+MyTypeObject {
+ property int r_x: rect.x
+ property int r_y: rect.y
+ property int r_width: rect.width
+ property int r_height: rect.height
+ property var copy: rect
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/rect_write.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/rect_write.qml
new file mode 100644
index 0000000000..8add45305c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/rect_write.qml
@@ -0,0 +1,9 @@
+import Test 1.0
+
+MyTypeObject {
+ rect.x: if (true) 1234
+ rect.y: if (true) 7
+ rect.width: if (true) 56
+ rect.height: if (true) 63
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/rectf_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/rectf_read.qml
new file mode 100644
index 0000000000..aeb9f413f8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/rectf_read.qml
@@ -0,0 +1,10 @@
+import Test 1.0
+
+MyTypeObject {
+ property real r_x: rectf.x
+ property real r_y: rectf.y
+ property real r_width: rectf.width
+ property real r_height: rectf.height
+ property var copy: rectf
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/rectf_write.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/rectf_write.qml
new file mode 100644
index 0000000000..1e6ff4ff90
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/rectf_write.qml
@@ -0,0 +1,9 @@
+import Test 1.0
+
+MyTypeObject {
+ rectf.x: if (true) 70.1
+ rectf.y: if (true) -113.2
+ rectf.width: if (true) 80924.8
+ rectf.height: if (true) 99.2
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/scriptAccess.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/scriptAccess.qml
new file mode 100644
index 0000000000..96592ebc0d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/scriptAccess.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+import Test 1.0
+
+MyTypeObject {
+ property int valuePre;
+ property int valuePost;
+
+ Component.onCompleted: { valuePre = rect.x; rect.x = 19; valuePost = rect.x; }
+}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/scriptVariantCopy.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/scriptVariantCopy.qml
new file mode 100644
index 0000000000..29157e8c67
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/scriptVariantCopy.qml
@@ -0,0 +1,14 @@
+import Test 1.0
+
+MyTypeObject {
+ property var object
+ object: MyTypeObject {
+ rect.x: 19
+ rect.y: 33
+ rect.width: 5
+ rect.height: 99
+ }
+
+ onRunScript: rect = object.rect
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/size_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/size_read.qml
new file mode 100644
index 0000000000..86dba03224
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/size_read.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+
+MyTypeObject {
+ property int s_width: size.width
+ property int s_height: size.height
+ property var copy: size
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/size_write.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/size_write.qml
new file mode 100644
index 0000000000..2f9d10e45f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/size_write.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ size.width: if (true) 13
+ size.height: if (true) 88
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/sizef_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/sizef_read.qml
new file mode 100644
index 0000000000..c6f34e42ca
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/sizef_read.qml
@@ -0,0 +1,9 @@
+import Test 1.0
+
+MyTypeObject {
+ property real s_width: sizef.width
+ property real s_height: sizef.height
+ property var copy: sizef
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/sizef_write.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/sizef_write.qml
new file mode 100644
index 0000000000..f16f0bdf93
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/sizef_write.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ sizef.width: if (true) 44.3
+ sizef.height: if (true) 92.8
+}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/staticAssignment.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/staticAssignment.qml
new file mode 100644
index 0000000000..b687f89eef
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/staticAssignment.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+
+MyTypeObject {
+ rect.x: 9
+}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/valueInterceptors.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/valueInterceptors.qml
new file mode 100644
index 0000000000..0897847d2d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/valueInterceptors.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+
+MyTypeObject {
+ property int value: 13;
+
+ MyOffsetValueInterceptor on rect.x {}
+ rect.x: value
+}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/valueSources.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/valueSources.qml
new file mode 100644
index 0000000000..717f3502c0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/valueSources.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+
+MyTypeObject {
+ MyConstantValueSource on rect.x {}
+}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_read.qml
new file mode 100644
index 0000000000..abdf9f04cf
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_read.qml
@@ -0,0 +1,9 @@
+import Test 1.0
+
+MyTypeObject {
+ property real v_x: vector.x
+ property real v_y: vector.y
+ property real v_z: vector.z
+ property var copy: vector
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_write.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_write.qml
new file mode 100644
index 0000000000..9c1bf7620a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/vector3d_write.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+
+MyTypeObject {
+ vector.x: if (true) -0.3
+ vector.y: if (true) -12.9
+ vector.z: if (true) 907.4
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
new file mode 100644
index 0000000000..028fc5754f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
@@ -0,0 +1,10 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
+HEADERS += testtypes.h
+
+SOURCES += tst_qdeclarativevaluetypes.cpp \
+ testtypes.cpp
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/testtypes.cpp b/tests/auto/declarative/qdeclarativevaluetypes/testtypes.cpp
new file mode 100644
index 0000000000..aa8bd6e1bf
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/testtypes.cpp
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "testtypes.h"
+
+void registerTypes()
+{
+ QML_REGISTER_TYPE(Test, 1, 0, MyTypeObject, MyTypeObject);
+ QML_REGISTER_TYPE(Test, 1, 0, MyConstantValueSource, MyConstantValueSource);
+ QML_REGISTER_TYPE(Test, 1, 0, MyOffsetValueInterceptor, MyOffsetValueInterceptor);
+}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h b/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h
new file mode 100644
index 0000000000..dfc28297eb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h
@@ -0,0 +1,156 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef TESTTYPES_H
+#define TESTTYPES_H
+
+#include <QObject>
+#include <QPoint>
+#include <QPointF>
+#include <QSize>
+#include <QSizeF>
+#include <QRect>
+#include <QRectF>
+#include <QVector3D>
+#include <QFont>
+#include <qdeclarative.h>
+#include <QDeclarativePropertyValueSource>
+#include <QDeclarativeProperty>
+#include <private/qdeclarativeproperty_p.h>
+
+class MyTypeObject : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QPoint point READ point WRITE setPoint NOTIFY changed);
+ Q_PROPERTY(QPointF pointf READ pointf WRITE setPointf NOTIFY changed);
+ Q_PROPERTY(QSize size READ size WRITE setSize NOTIFY changed);
+ Q_PROPERTY(QSizeF sizef READ sizef WRITE setSizef NOTIFY changed);
+ Q_PROPERTY(QRect rect READ rect WRITE setRect NOTIFY changed);
+ Q_PROPERTY(QRectF rectf READ rectf WRITE setRectf NOTIFY changed);
+ Q_PROPERTY(QVector3D vector READ vector WRITE setVector NOTIFY changed);
+ Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY changed);
+
+public:
+ MyTypeObject() :
+ m_point(10, 4),
+ m_pointf(11.3, -10.9),
+ m_size(1912, 1913),
+ m_sizef(0.1, 100923.2),
+ m_rect(2, 3, 109, 102),
+ m_rectf(103.8, 99.2, 88.1, 77.6),
+ m_vector(23.88, 3.1, 4.3)
+ {
+ m_font.setFamily("Arial");
+ m_font.setBold(true);
+ m_font.setWeight(QFont::DemiBold);
+ m_font.setItalic(true);
+ m_font.setUnderline(true);
+ m_font.setOverline(true);
+ m_font.setStrikeOut(true);
+ m_font.setPointSize(29);
+ m_font.setCapitalization(QFont::AllUppercase);
+ m_font.setLetterSpacing(QFont::AbsoluteSpacing, 10.2);
+ m_font.setWordSpacing(19.7);
+ }
+
+ QPoint m_point;
+ QPoint point() const { return m_point; }
+ void setPoint(const QPoint &v) { m_point = v; emit changed(); }
+
+ QPointF m_pointf;
+ QPointF pointf() const { return m_pointf; }
+ void setPointf(const QPointF &v) { m_pointf = v; emit changed(); }
+
+ QSize m_size;
+ QSize size() const { return m_size; }
+ void setSize(const QSize &v) { m_size = v; emit changed(); }
+
+ QSizeF m_sizef;
+ QSizeF sizef() const { return m_sizef; }
+ void setSizef(const QSizeF &v) { m_sizef = v; emit changed(); }
+
+ QRect m_rect;
+ QRect rect() const { return m_rect; }
+ void setRect(const QRect &v) { m_rect = v; emit changed(); }
+
+ QRectF m_rectf;
+ QRectF rectf() const { return m_rectf; }
+ void setRectf(const QRectF &v) { m_rectf = v; emit changed(); }
+
+ QVector3D m_vector;
+ QVector3D vector() const { return m_vector; }
+ void setVector(const QVector3D &v) { m_vector = v; emit changed(); }
+
+ QFont m_font;
+ QFont font() const { return m_font; }
+ void setFont(const QFont &v) { m_font = v; emit changed(); }
+
+ void emitRunScript() { emit runScript(); }
+
+signals:
+ void changed();
+ void runScript();
+};
+QML_DECLARE_TYPE(MyTypeObject);
+
+class MyConstantValueSource : public QObject, public QDeclarativePropertyValueSource
+{
+ Q_OBJECT
+public:
+ virtual void setTarget(const QDeclarativeProperty &p) { p.write(3345); }
+};
+QML_DECLARE_TYPE(MyConstantValueSource);
+
+class MyOffsetValueInterceptor : public QObject, public QDeclarativePropertyValueInterceptor
+{
+ Q_OBJECT
+public:
+ virtual void setTarget(const QDeclarativeProperty &p) { prop = p; }
+ virtual void write(const QVariant &value) { QDeclarativePropertyPrivate::write(prop, value.toInt() + 13, QDeclarativePropertyPrivate::BypassInterceptor); }
+
+private:
+ QDeclarativeProperty prop;
+};
+QML_DECLARE_TYPE(MyOffsetValueInterceptor);
+
+void registerTypes();
+
+#endif // TESTTYPES_H
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp
new file mode 100644
index 0000000000..51f9a07285
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp
@@ -0,0 +1,631 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QDebug>
+#include <private/qdeclarativevaluetype_p.h>
+#include "testtypes.h"
+
+class tst_qdeclarativevaluetypes : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativevaluetypes() {}
+
+private slots:
+ void initTestCase();
+
+ void point();
+ void pointf();
+ void size();
+ void sizef();
+ void rect();
+ void rectf();
+ void vector3d();
+ void font();
+
+ void bindingAssignment();
+ void bindingRead();
+ void staticAssignment();
+ void scriptAccess();
+ void autoBindingRemoval();
+ void valueSources();
+ void valueInterceptors();
+ void bindingConflict();
+ void deletedObject();
+ void bindingVariantCopy();
+ void scriptVariantCopy();
+ void cppClasses();
+ void enums();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+void tst_qdeclarativevaluetypes::initTestCase()
+{
+ registerTypes();
+}
+
+inline QUrl TEST_FILE(const QString &filename)
+{
+ return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename);
+}
+
+void tst_qdeclarativevaluetypes::point()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("point_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("p_x").toInt(), 10);
+ QCOMPARE(object->property("p_y").toInt(), 4);
+ QCOMPARE(object->property("copy"), QVariant(QPoint(10, 4)));
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("point_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->point(), QPoint(11, 12));
+
+ delete object;
+ }
+}
+
+void tst_qdeclarativevaluetypes::pointf()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("pointf_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("p_x").toDouble(), 11.3);
+ QCOMPARE(object->property("p_y").toDouble(), -10.9);
+ QCOMPARE(object->property("copy"), QVariant(QPointF(11.3, -10.9)));
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("pointf_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->pointf(), QPointF(6.8, 9.3));
+
+ delete object;
+ }
+}
+
+void tst_qdeclarativevaluetypes::size()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("size_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("s_width").toInt(), 1912);
+ QCOMPARE(object->property("s_height").toInt(), 1913);
+ QCOMPARE(object->property("copy"), QVariant(QSize(1912, 1913)));
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("size_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->size(), QSize(13, 88));
+
+ delete object;
+ }
+}
+
+void tst_qdeclarativevaluetypes::sizef()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("sizef_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("s_width").toDouble(), 0.1);
+ QCOMPARE(object->property("s_height").toDouble(), 100923.2);
+ QCOMPARE(object->property("copy"), QVariant(QSizeF(0.1, 100923.2)));
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("sizef_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->sizef(), QSizeF(44.3, 92.8));
+
+ delete object;
+ }
+}
+
+void tst_qdeclarativevaluetypes::rect()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("rect_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("r_x").toInt(), 2);
+ QCOMPARE(object->property("r_y").toInt(), 3);
+ QCOMPARE(object->property("r_width").toInt(), 109);
+ QCOMPARE(object->property("r_height").toInt(), 102);
+ QCOMPARE(object->property("copy"), QVariant(QRect(2, 3, 109, 102)));
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("rect_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->rect(), QRect(1234, 7, 56, 63));
+
+ delete object;
+ }
+}
+
+void tst_qdeclarativevaluetypes::rectf()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("rectf_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("r_x").toDouble(), 103.8);
+ QCOMPARE(object->property("r_y").toDouble(), 99.2);
+ QCOMPARE(object->property("r_width").toDouble(), 88.1);
+ QCOMPARE(object->property("r_height").toDouble(), 77.6);
+ QCOMPARE(object->property("copy"), QVariant(QRectF(103.8, 99.2, 88.1, 77.6)));
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("rectf_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->rectf(), QRectF(70.1, -113.2, 80924.8, 99.2));
+
+ delete object;
+ }
+}
+
+void tst_qdeclarativevaluetypes::vector3d()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("vector3d_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE((float)object->property("v_x").toDouble(), (float)23.88);
+ QCOMPARE((float)object->property("v_y").toDouble(), (float)3.1);
+ QCOMPARE((float)object->property("v_z").toDouble(), (float)4.3);
+ QCOMPARE(object->property("copy"), QVariant(QVector3D(23.88, 3.1, 4.3)));
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("vector3d_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->vector(), QVector3D(-0.3, -12.9, 907.4));
+
+ delete object;
+ }
+}
+
+void tst_qdeclarativevaluetypes::font()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("font_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("f_family").toString(), object->font().family());
+ QCOMPARE(object->property("f_bold").toBool(), object->font().bold());
+ QCOMPARE(object->property("f_weight").toInt(), object->font().weight());
+ QCOMPARE(object->property("f_italic").toBool(), object->font().italic());
+ QCOMPARE(object->property("f_underline").toBool(), object->font().underline());
+ QCOMPARE(object->property("f_overline").toBool(), object->font().overline());
+ QCOMPARE(object->property("f_strikeout").toBool(), object->font().strikeOut());
+ QCOMPARE(object->property("f_pointSize").toDouble(), object->font().pointSizeF());
+ QCOMPARE(object->property("f_pixelSize").toInt(), object->font().pixelSize());
+ QCOMPARE(object->property("f_capitalization").toInt(), (int)object->font().capitalization());
+ QCOMPARE(object->property("f_letterSpacing").toDouble(), object->font().letterSpacing());
+ QCOMPARE(object->property("f_wordSpacing").toDouble(), object->font().wordSpacing());
+
+ QCOMPARE(object->property("copy"), QVariant(object->font()));
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("font_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QFont font;
+ font.setFamily("Helvetica");
+ font.setBold(false);
+ font.setWeight(QFont::Normal);
+ font.setItalic(false);
+ font.setUnderline(false);
+ font.setStrikeOut(false);
+ font.setPointSize(15);
+ font.setCapitalization(QFont::AllLowercase);
+ font.setLetterSpacing(QFont::AbsoluteSpacing, 9.7);
+ font.setWordSpacing(11.2);
+
+ QEXPECT_FAIL("", "QT-2920", Continue);
+ QCOMPARE(object->font(), font);
+
+ delete object;
+ }
+
+ // Test pixelSize
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("font_write.2.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->font().pixelSize(), 10);
+
+ delete object;
+ }
+
+ // Test pixelSize and pointSize
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("font_write.3.qml"));
+ QTest::ignoreMessage(QtWarningMsg, "Both point size and pixel size set. Using pixel size. ");
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->font().pixelSize(), 10);
+
+ delete object;
+ }
+}
+
+// Test bindings can write to value types
+void tst_qdeclarativevaluetypes::bindingAssignment()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("bindingAssignment.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->rect().x(), 10);
+
+ object->setProperty("value", QVariant(92));
+
+ QCOMPARE(object->rect().x(), 92);
+
+ delete object;
+}
+
+// Test bindings can read from value types
+void tst_qdeclarativevaluetypes::bindingRead()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("bindingRead.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("value").toInt(), 2);
+
+ object->setRect(QRect(19, 3, 88, 2));
+
+ QCOMPARE(object->property("value").toInt(), 19);
+
+ delete object;
+}
+
+// Test static values can assign to value types
+void tst_qdeclarativevaluetypes::staticAssignment()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("staticAssignment.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->rect().x(), 9);
+
+ delete object;
+}
+
+// Test scripts can read/write value types
+void tst_qdeclarativevaluetypes::scriptAccess()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptAccess.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("valuePre").toInt(), 2);
+ QCOMPARE(object->rect().x(), 19);
+ QCOMPARE(object->property("valuePost").toInt(), 19);
+
+ delete object;
+}
+
+// Test that assigning a constant from script removes any binding
+void tst_qdeclarativevaluetypes::autoBindingRemoval()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("autoBindingRemoval.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->rect().x(), 10);
+
+ object->setProperty("value", QVariant(13));
+
+ QCOMPARE(object->rect().x(), 13);
+
+ object->emitRunScript();
+
+ QCOMPARE(object->rect().x(), 42);
+
+ object->setProperty("value", QVariant(92));
+
+ QEXPECT_FAIL("", "QT-2920", Continue);
+ QCOMPARE(object->rect().x(), 42);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("autoBindingRemoval.2.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->rect().x(), 10);
+
+ object->setProperty("value", QVariant(13));
+
+ QCOMPARE(object->rect().x(), 13);
+
+ object->emitRunScript();
+
+ QCOMPARE(object->rect(), QRect(10, 10, 10, 10));
+
+ object->setProperty("value", QVariant(92));
+
+ QCOMPARE(object->rect(), QRect(10, 10, 10, 10));
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("autoBindingRemoval.3.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ object->setProperty("value", QVariant(QRect(9, 22, 33, 44)));
+
+ QCOMPARE(object->rect(), QRect(9, 22, 33, 44));
+
+ object->emitRunScript();
+
+ QCOMPARE(object->rect(), QRect(44, 22, 33, 44));
+
+ object->setProperty("value", QVariant(QRect(19, 3, 4, 8)));
+
+ QEXPECT_FAIL("", "QT-2920", Continue);
+ QCOMPARE(object->rect(), QRect(44, 22, 33, 44));
+
+ delete object;
+ }
+
+}
+
+// Test that property value sources assign to value types
+void tst_qdeclarativevaluetypes::valueSources()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("valueSources.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->rect().x(), 3345);
+
+ delete object;
+}
+
+static void checkNoErrors(QDeclarativeComponent& component)
+{
+ QList<QDeclarativeError> errors = component.errors();
+ if (errors.isEmpty())
+ return;
+ for (int ii = 0; ii < errors.count(); ++ii) {
+ const QDeclarativeError &error = errors.at(ii);
+ qWarning("%d:%d:%s",error.line(),error.column(),error.description().toUtf8().constData());
+ }
+}
+
+// Test that property value interceptors can be applied to value types
+void tst_qdeclarativevaluetypes::valueInterceptors()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("valueInterceptors.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ checkNoErrors(component);
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->rect().x(), 13);
+
+ object->setProperty("value", 99);
+
+ QCOMPARE(object->rect().x(), 112);
+
+ delete object;
+}
+
+// Test that you can't assign a binding to the "root" value type, and a sub-property
+void tst_qdeclarativevaluetypes::bindingConflict()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("bindingConflict.qml"));
+ QCOMPARE(component.isError(), true);
+}
+
+#define CPP_TEST(type, v) \
+{ \
+ type *t = new type; \
+ QVariant value(v); \
+ t->setValue(value); \
+ QCOMPARE(t->value(), value); \
+ delete t; \
+}
+
+// Test that accessing a reference to a valuetype after the owning object is deleted
+// doesn't crash
+void tst_qdeclarativevaluetypes::deletedObject()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("deletedObject.qml"));
+ QTest::ignoreMessage(QtDebugMsg, "Test: 2");
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QObject *dObject = qvariant_cast<QObject *>(object->property("object"));
+ QVERIFY(dObject != 0);
+ delete dObject;
+
+ QTest::ignoreMessage(QtDebugMsg, "Test: undefined");
+ object->emitRunScript();
+
+ delete object;
+}
+
+// Test that value types can be assigned to another value type property in a binding
+void tst_qdeclarativevaluetypes::bindingVariantCopy()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("bindingVariantCopy.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->rect(), QRect(19, 33, 5, 99));
+
+ delete object;
+}
+
+// Test that value types can be assigned to another value type property in script
+void tst_qdeclarativevaluetypes::scriptVariantCopy()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptVariantCopy.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->rect(), QRect(2, 3, 109, 102));
+
+ object->emitRunScript();
+
+ QCOMPARE(object->rect(), QRect(19, 33, 5, 99));
+
+ delete object;
+}
+
+
+// Test that the value type classes can be used manually
+void tst_qdeclarativevaluetypes::cppClasses()
+{
+ CPP_TEST(QDeclarativePointValueType, QPoint(19, 33));
+ CPP_TEST(QDeclarativePointFValueType, QPointF(33.6, -23));
+ CPP_TEST(QDeclarativeSizeValueType, QSize(-100, 18));
+ CPP_TEST(QDeclarativeSizeFValueType, QSizeF(-100.7, 18.2));
+ CPP_TEST(QDeclarativeRectValueType, QRect(13, 39, 10928, 88));
+ CPP_TEST(QDeclarativeRectFValueType, QRectF(88.2, -90.1, 103.2, 118));
+ CPP_TEST(QDeclarativeVector3DValueType, QVector3D(18.2, 19.7, 1002));
+ CPP_TEST(QDeclarativeFontValueType, QFont("Helvetica"));
+
+}
+
+void tst_qdeclarativevaluetypes::enums()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("enums.1.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+ QVERIFY(object->font().capitalization() == QFont::AllUppercase);
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("enums.2.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+ QVERIFY(object->font().capitalization() == QFont::AllUppercase);
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("enums.3.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+ QVERIFY(object->font().capitalization() == QFont::AllUppercase);
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("enums.4.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+ QVERIFY(object->font().capitalization() == QFont::AllUppercase);
+ delete object;
+ }
+}
+
+QTEST_MAIN(tst_qdeclarativevaluetypes)
+
+#include "tst_qdeclarativevaluetypes.moc"
diff --git a/tests/auto/declarative/qdeclarativewebview/data/basic.html b/tests/auto/declarative/qdeclarativewebview/data/basic.html
new file mode 100644
index 0000000000..22e3e243d0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/data/basic.html
@@ -0,0 +1,17 @@
+<html>
+<head><title>Basic</title>
+<link rel="icon" sizes="48x48" href="basic.png">
+<script type="text/javascript">
+<!--
+window.onload = function(){ window.status = "status here"; }
+// -->
+</script>
+</head>
+<body leftmargin="0" marginwidth="0">
+<table width="123">
+<tbody>
+<tr><td>This is a basic test.</td></tr>
+</tbody>
+</table>
+</body>
+</html>
diff --git a/tests/auto/declarative/qdeclarativewebview/data/basic.ico b/tests/auto/declarative/qdeclarativewebview/data/basic.ico
new file mode 100644
index 0000000000..8f3d05e718
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/data/basic.ico
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativewebview/data/basic.png b/tests/auto/declarative/qdeclarativewebview/data/basic.png
new file mode 100644
index 0000000000..35717cca58
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/data/basic.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativewebview/data/basic.qml b/tests/auto/declarative/qdeclarativewebview/data/basic.qml
new file mode 100644
index 0000000000..f0b41ef06f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/data/basic.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+import org.webkit 1.0
+
+WebView {
+ url: "basic.html"
+}
diff --git a/tests/auto/declarative/qdeclarativewebview/data/elements.html b/tests/auto/declarative/qdeclarativewebview/data/elements.html
new file mode 100644
index 0000000000..923686794b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/data/elements.html
@@ -0,0 +1,14 @@
+<body leftmargin=0 topmargin=0>
+<table width="300px" border=1 cellpadding=0 cellspacing=0>
+<tr>
+<td align=center width=25%%><p>A</p></td>
+<td width=75% height=50px>
+ <table width=100% border=1 cellpadding=0 cellspacing=0>
+ <tr>
+ <td align=center width=50% height=50px><p>B</p></td>
+ <td align=center width=50% height=50px><p>C</p></td>
+ </tr>
+ </table>
+</td>
+</tr>
+</table>
diff --git a/tests/auto/declarative/qdeclarativewebview/data/elements.qml b/tests/auto/declarative/qdeclarativewebview/data/elements.qml
new file mode 100644
index 0000000000..16e578858a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/data/elements.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+import org.webkit 1.0
+
+WebView {
+ url: "elements.html"
+ width: 310
+ height: 100
+}
diff --git a/tests/auto/declarative/qdeclarativewebview/data/forward.html b/tests/auto/declarative/qdeclarativewebview/data/forward.html
new file mode 100644
index 0000000000..62ab62da92
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/data/forward.html
@@ -0,0 +1,12 @@
+<html>
+<head><title>Forward</title>
+<link rel="icon" sizes="32x32" href="forward.png">
+</head>
+<body leftmargin="0" marginwidth="0">
+<table width="123">
+<tbody>
+<tr><td>This is more.</td></tr>
+</tbody>
+</table>
+</body>
+</html>
diff --git a/tests/auto/declarative/qdeclarativewebview/data/forward.png b/tests/auto/declarative/qdeclarativewebview/data/forward.png
new file mode 100644
index 0000000000..a82533e3d3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/data/forward.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativewebview/data/javaScript.html b/tests/auto/declarative/qdeclarativewebview/data/javaScript.html
new file mode 100644
index 0000000000..35270bc472
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/data/javaScript.html
@@ -0,0 +1,11 @@
+<html>
+<head><title>JavaScript</title>
+<link rel="icon" sizes="48x48" href="basic.png">
+<script type="text/javascript">
+<!--
+window.onload = function(){ window.status = "status here"; }
+// -->
+</script>
+</head>
+<body>
+This is a JS test.
diff --git a/tests/auto/declarative/qdeclarativewebview/data/javaScript.qml b/tests/auto/declarative/qdeclarativewebview/data/javaScript.qml
new file mode 100644
index 0000000000..0e92e0ef67
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/data/javaScript.qml
@@ -0,0 +1,12 @@
+import Qt 4.6
+import org.webkit 1.0
+
+WebView {
+ url: "javaScript.html"
+ javaScriptWindowObjects: [
+ QtObject {
+ property string qmlprop: "qmlvalue"
+ WebView.windowObjectName: "myjsname"
+ }
+ ]
+}
diff --git a/tests/auto/declarative/qdeclarativewebview/data/loadError.qml b/tests/auto/declarative/qdeclarativewebview/data/loadError.qml
new file mode 100644
index 0000000000..f8272382f6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/data/loadError.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+import org.webkit 1.0
+
+WebView {
+ url: "does-not-exist.html"
+}
diff --git a/tests/auto/declarative/qdeclarativewebview/data/newwindows.html b/tests/auto/declarative/qdeclarativewebview/data/newwindows.html
new file mode 100644
index 0000000000..dd541f9b16
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/data/newwindows.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+<script type="text/javascript">
+<!--
+function clickTheLink()
+{
+ var ev = document.createEvent('MouseEvents');
+ ev.initEvent( "click", true, false );
+ document.getElementById('thelink').dispatchEvent(ev);
+}
+// -->
+</script>
+</head>
+<h1>Multiple windows...</h1>
+
+<a id=thelink target="_blank" href="newwindows.html">Popup!</a>
diff --git a/tests/auto/declarative/qdeclarativewebview/data/newwindows.qml b/tests/auto/declarative/qdeclarativewebview/data/newwindows.qml
new file mode 100644
index 0000000000..4d9df43174
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/data/newwindows.qml
@@ -0,0 +1,34 @@
+// Demonstrates opening new WebViews from HTML
+
+import Qt 4.6
+import org.webkit 1.0
+
+Grid {
+ columns: 3
+ id: pages
+ height: 300; width: 600
+ property int total: 0
+
+ Component {
+ id: webViewPage
+ Rectangle {
+ width: webView.width
+ height: webView.height
+ border.color: "gray"
+
+ WebView {
+ id: webView
+ width: 150 // force predictable for test
+ newWindowComponent: webViewPage
+ newWindowParent: pages
+ url: "newwindows.html"
+ Timer {
+ interval: 10; running: webView.status==WebView.Ready && total<4; repeat: false;
+ onTriggered: {total++; webView.evaluateJavaScript("clickTheLink()")}
+ }
+ }
+ }
+ }
+
+ Loader { sourceComponent: webViewPage }
+}
diff --git a/tests/auto/declarative/qdeclarativewebview/data/pixelCache.html b/tests/auto/declarative/qdeclarativewebview/data/pixelCache.html
new file mode 100644
index 0000000000..9412674091
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/data/pixelCache.html
@@ -0,0 +1,10 @@
+<html>
+<body topmargin=0 leftmargin=0>
+<table width=120 cellpadding=0 cellspacing=0>
+<tr><td>
+<h1>Pixel Cache</h1>
+This test is for the pixel cache. Because this is a long document,
+as it scrolls, more of the document will need to be rendered.
+If the pixelCacheSize is small, the first parts of the document will
+no longer be in the cache when it returns.
+</table>
diff --git a/tests/auto/declarative/qdeclarativewebview/data/pixelCache.qml b/tests/auto/declarative/qdeclarativewebview/data/pixelCache.qml
new file mode 100644
index 0000000000..08e4d65719
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/data/pixelCache.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyWebView {
+ anchors.fill: parent
+ url: "pixelCache.html"
+}
diff --git a/tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml b/tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml
new file mode 100644
index 0000000000..0770acfda7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml
@@ -0,0 +1,34 @@
+import Qt 4.6
+import org.webkit 1.0
+
+Item {
+ width: 240
+ height: 160
+ Grid {
+ anchors.fill: parent
+ objectName: "newWindowParent"
+ id: newWindowParent
+ }
+
+ Row {
+ anchors.fill: parent
+ id: oldWindowParent
+ objectName: "oldWindowParent"
+ }
+
+ Loader {
+ sourceComponent: webViewComponent
+ }
+ Component {
+ id: webViewComponent
+ WebView {
+ id: webView
+ objectName: "webView"
+ newWindowComponent: webViewComponent
+ newWindowParent: oldWindowParent
+ url: "basic.html"
+ renderingEnabled: true
+ pressGrabTime: 200
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativewebview/data/sethtml.qml b/tests/auto/declarative/qdeclarativewebview/data/sethtml.qml
new file mode 100644
index 0000000000..9e17597fec
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/data/sethtml.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+import org.webkit 1.0
+
+WebView {
+ html: "<p>This is a <b>string</b> set on the WebView"
+}
diff --git a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
new file mode 100644
index 0000000000..20173c6235
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
@@ -0,0 +1,9 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+contains(QT_CONFIG,webkit): QT += webkit
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativewebview.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp b/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp
new file mode 100644
index 0000000000..b63e14b8b7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp
@@ -0,0 +1,520 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtTest/QSignalSpy>
+#include "../../../shared/util.h"
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativepositioners_p.h>
+#include <QtWebKit/qwebpage.h>
+#include <QtWebKit/qwebframe.h>
+#include <QtCore/qdir.h>
+#include <QtCore/qfile.h>
+#include <QtGui/qpainter.h>
+
+class tst_qdeclarativewebview : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativewebview() {}
+
+private slots:
+ void initTestCase();
+ void basicProperties();
+ void settings();
+ void historyNav();
+ void multipleWindows();
+ void elementAreaAt();
+ void loadError();
+ void setHtml();
+ void javaScript();
+ void cleanupTestCase();
+ //void pixelCache();
+ void newWindowParent();
+ void newWindowComponent();
+ void renderingEnabled();
+ void pressGrabTime();
+
+private:
+ void checkNoErrors(const QDeclarativeComponent& component);
+ QDeclarativeEngine engine;
+ QString tmpDir() const
+ {
+ static QString tmpd = QDir::tempPath()+"/tst_qdeclarativewebview-"
+ + QDateTime::currentDateTime().toString(QLatin1String("yyyyMMddhhmmss"));
+ return tmpd;
+ }
+};
+
+void tst_qdeclarativewebview::initTestCase()
+{
+}
+
+static QString strippedHtml(QString html)
+{
+ html.replace(QRegExp("\\s+"),"");
+ return html;
+}
+
+static QString fileContents(const QString& filename)
+{
+ QFile file(filename);
+ file.open(QIODevice::ReadOnly);
+ return QString::fromUtf8(file.readAll());
+}
+
+
+static void removeRecursive(const QString& dirname)
+{
+ QDir dir(dirname);
+ QFileInfoList entries(dir.entryInfoList(QDir::Dirs|QDir::Files|QDir::NoDotAndDotDot));
+ for (int i = 0; i < entries.count(); ++i)
+ if (entries[i].isDir())
+ removeRecursive(entries[i].filePath());
+ else
+ dir.remove(entries[i].fileName());
+ QDir().rmdir(dirname);
+}
+
+void tst_qdeclarativewebview::cleanupTestCase()
+{
+ removeRecursive(tmpDir());
+}
+
+void tst_qdeclarativewebview::checkNoErrors(const QDeclarativeComponent& component)
+{
+ // Wait until the component is ready
+ QTRY_VERIFY(component.isReady());
+
+
+ if (component.isError()) {
+ QList<QDeclarativeError> errors = component.errors();
+ for (int ii = 0; ii < errors.count(); ++ii) {
+ const QDeclarativeError &error = errors.at(ii);
+ QByteArray errorStr = QByteArray::number(error.line()) + ":" +
+ QByteArray::number(error.column()) + ":" +
+ error.description().toUtf8();
+ qWarning() << errorStr;
+ }
+ }
+ QVERIFY(!component.isError());
+}
+
+void tst_qdeclarativewebview::basicProperties()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/basic.qml"));
+ checkNoErrors(component);
+ QWebSettings::enablePersistentStorage(tmpDir());
+
+ QObject *wv = component.create();
+ QVERIFY(wv != 0);
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+ QCOMPARE(wv->property("title").toString(),QString("Basic"));
+ QTRY_COMPARE(qvariant_cast<QPixmap>(wv->property("icon")).width(), 48);
+ QCOMPARE(qvariant_cast<QPixmap>(wv->property("icon")),QPixmap(SRCDIR "/data/basic.png"));
+ QCOMPARE(wv->property("statusText").toString(),QString("status here"));
+ QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/basic.html")), strippedHtml(wv->property("html").toString()));
+ QCOMPARE(wv->property("width").toDouble(), 123.0);
+ QCOMPARE(wv->property("preferredWidth").toInt(), 0);
+ QCOMPARE(wv->property("preferredHeight").toInt(), 0);
+ QCOMPARE(wv->property("zoomFactor").toDouble(), 1.0);
+ QCOMPARE(wv->property("url").toUrl(), QUrl::fromLocalFile(SRCDIR "/data/basic.html"));
+ QCOMPARE(wv->property("status").toInt(), 1 /*QDeclarativeWebView::Ready*/);
+ QVERIFY(qvariant_cast<QAction*>(wv->property("reload")));
+ QVERIFY(qvariant_cast<QAction*>(wv->property("reload"))->isEnabled());
+ QVERIFY(qvariant_cast<QAction*>(wv->property("back")));
+ QVERIFY(!qvariant_cast<QAction*>(wv->property("back"))->isEnabled());
+ QVERIFY(qvariant_cast<QAction*>(wv->property("forward")));
+ QVERIFY(!qvariant_cast<QAction*>(wv->property("forward"))->isEnabled());
+ QVERIFY(qvariant_cast<QAction*>(wv->property("stop")));
+ QVERIFY(!qvariant_cast<QAction*>(wv->property("stop"))->isEnabled());
+
+ wv->setProperty("pixelCacheSize", 0); // mainly testing that it doesn't crash or anything!
+ QCOMPARE(wv->property("pixelCacheSize").toInt(),0);
+ qvariant_cast<QAction*>(wv->property("reload"))->trigger();
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+}
+
+void tst_qdeclarativewebview::settings()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/basic.qml"));
+ checkNoErrors(component);
+ QObject *wv = component.create();
+ QVERIFY(wv != 0);
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+
+ QObject *s = QDeclarativeProperty(wv,"settings").object();
+ QVERIFY(s != 0);
+
+ // merely tests that setting gets stored (in QWebSettings)
+ // behavioural tests are in WebKit.
+ for (int b=0; b<=1; ++b) {
+ bool on = !!b;
+
+ s->setProperty("autoLoadImages", on);
+ s->setProperty("developerExtrasEnabled", on);
+ s->setProperty("javaEnabled", on);
+ s->setProperty("javascriptCanAccessClipboard", on);
+ s->setProperty("javascriptCanOpenWindows", on);
+ s->setProperty("javascriptEnabled", on);
+ s->setProperty("linksIncludedInFocusChain", on);
+ s->setProperty("localContentCanAccessRemoteUrls", on);
+ s->setProperty("localStorageDatabaseEnabled", on);
+ s->setProperty("offlineStorageDatabaseEnabled", on);
+ s->setProperty("offlineWebApplicationCacheEnabled", on);
+ s->setProperty("pluginsEnabled", on);
+ s->setProperty("printElementBackgrounds", on);
+ s->setProperty("privateBrowsingEnabled", on);
+ s->setProperty("zoomTextOnly", on);
+
+ QVERIFY(s->property("autoLoadImages") == on);
+ QVERIFY(s->property("developerExtrasEnabled") == on);
+ QVERIFY(s->property("javaEnabled") == on);
+ QVERIFY(s->property("javascriptCanAccessClipboard") == on);
+ QVERIFY(s->property("javascriptCanOpenWindows") == on);
+ QVERIFY(s->property("javascriptEnabled") == on);
+ QVERIFY(s->property("linksIncludedInFocusChain") == on);
+ QVERIFY(s->property("localContentCanAccessRemoteUrls") == on);
+ QVERIFY(s->property("localStorageDatabaseEnabled") == on);
+ QVERIFY(s->property("offlineStorageDatabaseEnabled") == on);
+ QVERIFY(s->property("offlineWebApplicationCacheEnabled") == on);
+ QVERIFY(s->property("pluginsEnabled") == on);
+ QVERIFY(s->property("printElementBackgrounds") == on);
+ QVERIFY(s->property("privateBrowsingEnabled") == on);
+ QVERIFY(s->property("zoomTextOnly") == on);
+
+ QVERIFY(s->property("autoLoadImages") == on);
+ QVERIFY(s->property("developerExtrasEnabled") == on);
+ QVERIFY(s->property("javaEnabled") == on);
+ QVERIFY(s->property("javascriptCanAccessClipboard") == on);
+ QVERIFY(s->property("javascriptCanOpenWindows") == on);
+ QVERIFY(s->property("javascriptEnabled") == on);
+ QVERIFY(s->property("linksIncludedInFocusChain") == on);
+ QVERIFY(s->property("localContentCanAccessRemoteUrls") == on);
+ QVERIFY(s->property("localStorageDatabaseEnabled") == on);
+ QVERIFY(s->property("offlineStorageDatabaseEnabled") == on);
+ QVERIFY(s->property("offlineWebApplicationCacheEnabled") == on);
+ QVERIFY(s->property("pluginsEnabled") == on);
+ QVERIFY(s->property("printElementBackgrounds") == on);
+ QVERIFY(s->property("privateBrowsingEnabled") == on);
+ QVERIFY(s->property("zoomTextOnly") == on);
+ }
+}
+
+void tst_qdeclarativewebview::historyNav()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/basic.qml"));
+ checkNoErrors(component);
+ QWebSettings::enablePersistentStorage(tmpDir());
+
+ QObject *wv = component.create();
+ QVERIFY(wv != 0);
+ for (int i=1; i<=2; ++i) {
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+ QCOMPARE(wv->property("title").toString(),QString("Basic"));
+ QTRY_COMPARE(qvariant_cast<QPixmap>(wv->property("icon")).width(), 48);
+ QCOMPARE(qvariant_cast<QPixmap>(wv->property("icon")),QPixmap(SRCDIR "/data/basic.png"));
+ QCOMPARE(wv->property("statusText").toString(),QString("status here"));
+ QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/basic.html")), strippedHtml(wv->property("html").toString()));
+ QCOMPARE(wv->property("width").toDouble(), 123.0);
+ QCOMPARE(wv->property("preferredWidth").toDouble(), 0.0);
+ QCOMPARE(wv->property("zoomFactor").toDouble(), 1.0);
+ QCOMPARE(wv->property("url").toUrl(), QUrl::fromLocalFile(SRCDIR "/data/basic.html"));
+ QCOMPARE(wv->property("status").toInt(), 1 /*QDeclarativeWebView::Ready*/);
+ QVERIFY(qvariant_cast<QAction*>(wv->property("reload")));
+ QVERIFY(qvariant_cast<QAction*>(wv->property("reload"))->isEnabled());
+ QVERIFY(qvariant_cast<QAction*>(wv->property("back")));
+ QVERIFY(!qvariant_cast<QAction*>(wv->property("back"))->isEnabled());
+ QVERIFY(qvariant_cast<QAction*>(wv->property("forward")));
+ QVERIFY(!qvariant_cast<QAction*>(wv->property("forward"))->isEnabled());
+ QVERIFY(qvariant_cast<QAction*>(wv->property("stop")));
+ QVERIFY(!qvariant_cast<QAction*>(wv->property("stop"))->isEnabled());
+
+ qvariant_cast<QAction*>(wv->property("reload"))->trigger();
+ }
+
+ wv->setProperty("url", QUrl::fromLocalFile(SRCDIR "/data/forward.html"));
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+ QCOMPARE(wv->property("title").toString(),QString("Forward"));
+ QTRY_COMPARE(qvariant_cast<QPixmap>(wv->property("icon")).width(), 32);
+ QCOMPARE(qvariant_cast<QPixmap>(wv->property("icon")),QPixmap(SRCDIR "/data/forward.png"));
+ QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/forward.html")), strippedHtml(wv->property("html").toString()));
+ QCOMPARE(wv->property("url").toUrl(), QUrl::fromLocalFile(SRCDIR "/data/forward.html"));
+ QCOMPARE(wv->property("status").toInt(), 1 /*QDeclarativeWebView::Ready*/);
+ QCOMPARE(wv->property("statusText").toString(),QString(""));
+ QVERIFY(qvariant_cast<QAction*>(wv->property("reload")));
+ QVERIFY(qvariant_cast<QAction*>(wv->property("reload"))->isEnabled());
+ QVERIFY(qvariant_cast<QAction*>(wv->property("back")));
+ QVERIFY(qvariant_cast<QAction*>(wv->property("back"))->isEnabled());
+ QVERIFY(qvariant_cast<QAction*>(wv->property("forward")));
+ QVERIFY(!qvariant_cast<QAction*>(wv->property("forward"))->isEnabled());
+ QVERIFY(qvariant_cast<QAction*>(wv->property("stop")));
+ QVERIFY(!qvariant_cast<QAction*>(wv->property("stop"))->isEnabled());
+
+ qvariant_cast<QAction*>(wv->property("back"))->trigger();
+
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+ QCOMPARE(wv->property("title").toString(),QString("Basic"));
+ QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/basic.html")), strippedHtml(wv->property("html").toString()));
+ QCOMPARE(wv->property("url").toUrl(), QUrl::fromLocalFile(SRCDIR "/data/basic.html"));
+ QCOMPARE(wv->property("status").toInt(), 1 /*QDeclarativeWebView::Ready*/);
+ QVERIFY(qvariant_cast<QAction*>(wv->property("reload")));
+ QVERIFY(qvariant_cast<QAction*>(wv->property("reload"))->isEnabled());
+ QVERIFY(qvariant_cast<QAction*>(wv->property("back")));
+ QVERIFY(!qvariant_cast<QAction*>(wv->property("back"))->isEnabled());
+ QVERIFY(qvariant_cast<QAction*>(wv->property("forward")));
+ QVERIFY(qvariant_cast<QAction*>(wv->property("forward"))->isEnabled());
+ QVERIFY(qvariant_cast<QAction*>(wv->property("stop")));
+ QVERIFY(!qvariant_cast<QAction*>(wv->property("stop"))->isEnabled());
+}
+
+void tst_qdeclarativewebview::multipleWindows()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/newwindows.qml"));
+ checkNoErrors(component);
+
+ QDeclarativeGrid *grid = qobject_cast<QDeclarativeGrid*>(component.create());
+ QVERIFY(grid != 0);
+ QTRY_COMPARE(grid->children().count(), 2+5); // Component, Loader, 5 WebViews
+ QDeclarativeItem* popup = qobject_cast<QDeclarativeItem*>(grid->children().at(3)); // first popup after Component, Loaded, original.
+ QVERIFY(popup != 0);
+ QTRY_COMPARE(popup->x(), 150.0);
+}
+
+void tst_qdeclarativewebview::loadError()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/loadError.qml"));
+ checkNoErrors(component);
+ QWebSettings::enablePersistentStorage(tmpDir());
+
+ QObject *wv = component.create();
+ QVERIFY(wv != 0);
+ for (int i=1; i<=2; ++i) {
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+ QCOMPARE(wv->property("title").toString(),QString(""));
+ QCOMPARE(wv->property("statusText").toString(),QString("")); // HTML 'status bar' text, not error message
+ QCOMPARE(wv->property("url").toUrl(), QUrl::fromLocalFile(SRCDIR "/data/does-not-exist.html")); // Unlike QWebPage, which loses url
+ QCOMPARE(wv->property("status").toInt(), 3 /*QDeclarativeWebView::Error*/);
+
+ qvariant_cast<QAction*>(wv->property("reload"))->trigger();
+ }
+}
+
+void tst_qdeclarativewebview::setHtml()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/sethtml.qml"));
+ checkNoErrors(component);
+ QObject *wv = component.create();
+ QVERIFY(wv != 0);
+ QCOMPARE(wv->property("html").toString(),QString("<html><head></head><body><p>This is a <b>string</b> set on the WebView</p></body></html>"));
+
+ QSignalSpy spy(wv, SIGNAL(htmlChanged()));
+ wv->setProperty("html", QString("<html><head><title>Basic</title></head><body><p>text</p></body></html>"));
+ QCOMPARE(spy.count(),1);
+}
+
+void tst_qdeclarativewebview::elementAreaAt()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/elements.qml"));
+ checkNoErrors(component);
+ QObject *wv = component.create();
+ QVERIFY(wv != 0);
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+
+ /* not now it's a plugin...
+ QCOMPARE(wv->elementAreaAt(40,30,100,100),QRect(1,1,75,54)); // Area A in data/elements.html
+ QCOMPARE(wv->elementAreaAt(130,30,200,100),QRect(78,3,110,50)); // Area B
+ QCOMPARE(wv->elementAreaAt(40,30,400,400),QRect(0,0,310,100)); // Whole view
+ QCOMPARE(wv->elementAreaAt(130,30,280,280),QRect(76,1,223,54)); // Area BC
+ QCOMPARE(wv->elementAreaAt(130,30,400,400),QRect(0,0,310,100)); // Whole view
+ */
+}
+
+void tst_qdeclarativewebview::javaScript()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/javaScript.qml"));
+ checkNoErrors(component);
+ QObject *wv = component.create();
+ QVERIFY(wv != 0);
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+ /* not now it's a plugin...
+ QCOMPARE(wv->evaluateJavaScript("123").toInt(), 123);
+ QCOMPARE(wv->evaluateJavaScript("window.status").toString(), QString("status here"));
+ QCOMPARE(wv->evaluateJavaScript("window.myjsname.qmlprop").toString(), QString("qmlvalue"));
+ */
+}
+
+/*
+Cannot be done now that webkit is a plugin
+
+void tst_qdeclarativewebview::pixelCache()
+{
+
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/pixelCache.qml"));
+ checkNoErrors(component);
+ MyWebView *wv = qobject_cast<MyWebView*>(component.create());
+ QVERIFY(wv != 0);
+ QTRY_COMPARE(wv->property("progress"), 1.0);
+ QPixmap pm(150,150);
+ QPainter p(&pm);
+ wv->paint(&p,0,0);
+ const int expected = 120*(150+128); // 120 = width of HTML page, 150=pixmap height, 128=cache extra area
+ QCOMPARE(wv->property("pixelsPainted"), expected);
+ wv->paint(&p,0,0);
+ QCOMPARE(wv->property("pixelsPainted"), expected); // nothing new needed to be painted
+ wv->setProperty("pixelCacheSize", 0); // clears the cache
+ wv->paint(&p,0,0);
+ QCOMPARE(wv->property("pixelsPainted"), expected*2); // everything needed to be painted
+ // Note that painted things always go into the cache (even if they don't "fit"),
+ // just that they will be removed if anything else needs to be painted.
+ wv->setProperty("pixelCacheSize", expected); // won't clear the cache
+ wv->paint(&p,0,0);
+ QCOMPARE(wv->property("pixelsPainted"), expected*2); // still there
+ wv->setProperty("pixelCacheSize", expected-1); // too small - will clear the cache
+ wv->paint(&p,0,0);
+ QCOMPARE(wv->property("pixelsPainted"), expected*3); // repainted
+}
+*/
+
+void tst_qdeclarativewebview::newWindowParent()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
+ checkNoErrors(component);
+ QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(component.create());
+ QObject *wv = rootItem->findChild<QObject*>("webView");
+ QVERIFY(rootItem != 0);
+ QVERIFY(wv != 0);
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+
+ QDeclarativeItem* oldWindowParent = rootItem->findChild<QDeclarativeItem*>("oldWindowParent");
+ QCOMPARE(qvariant_cast<QDeclarativeItem*>(wv->property("newWindowParent")), oldWindowParent);
+ QSignalSpy newWindowParentSpy(wv, SIGNAL(newWindowParentChanged()));
+
+ QDeclarativeItem* newWindowParent = rootItem->findChild<QDeclarativeItem*>("newWindowParent");
+ wv->setProperty("newWindowParent", QVariant::fromValue(newWindowParent));
+ QVERIFY(newWindowParent);
+ QVERIFY(oldWindowParent);
+ QVERIFY(oldWindowParent->childItems().count() == 0);
+ QCOMPARE(wv->property("newWindowParent"), QVariant::fromValue(newWindowParent));
+ QCOMPARE(newWindowParentSpy.count(),1);
+
+ wv->setProperty("newWindowParent", QVariant::fromValue(newWindowParent));
+ QCOMPARE(newWindowParentSpy.count(),1);
+
+ wv->setProperty("newWindowParent", QVariant::fromValue((QDeclarativeItem*)0));
+ QCOMPARE(newWindowParentSpy.count(),2);
+}
+
+void tst_qdeclarativewebview::newWindowComponent()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
+ checkNoErrors(component);
+ QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(component.create());
+ QObject *wv = rootItem->findChild<QObject*>("webView");
+ QVERIFY(rootItem != 0);
+ QVERIFY(wv != 0);
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+
+ QDeclarativeComponent substituteComponent(&engine);
+ substituteComponent.setData("import Qt 4.6; WebView { objectName: 'newWebView'; url: 'basic.html'; }", QUrl::fromLocalFile(""));
+ QSignalSpy newWindowComponentSpy(wv, SIGNAL(newWindowComponentChanged()));
+
+ wv->setProperty("newWindowComponent", QVariant::fromValue(&substituteComponent));
+ QCOMPARE(wv->property("newWindowComponent"), QVariant::fromValue(&substituteComponent));
+ QCOMPARE(newWindowComponentSpy.count(),1);
+
+ wv->setProperty("newWindowComponent", QVariant::fromValue(&substituteComponent));
+ QCOMPARE(newWindowComponentSpy.count(),1);
+
+ wv->setProperty("newWindowComponent", QVariant::fromValue((QDeclarativeComponent*)0));
+ QCOMPARE(newWindowComponentSpy.count(),2);
+}
+
+void tst_qdeclarativewebview::renderingEnabled()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
+ checkNoErrors(component);
+ QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(component.create());
+ QObject *wv = rootItem->findChild<QObject*>("webView");
+ QVERIFY(rootItem != 0);
+ QVERIFY(wv != 0);
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+
+ QVERIFY(wv->property("renderingEnabled").toBool());
+ QSignalSpy renderingEnabledSpy(wv, SIGNAL(renderingEnabledChanged()));
+
+ wv->setProperty("renderingEnabled", false);
+ QVERIFY(!wv->property("renderingEnabled").toBool());
+ QCOMPARE(renderingEnabledSpy.count(),1);
+
+ wv->setProperty("renderingEnabled", false);
+ QCOMPARE(renderingEnabledSpy.count(),1);
+
+ wv->setProperty("renderingEnabled", true);
+ QCOMPARE(renderingEnabledSpy.count(),2);
+}
+
+void tst_qdeclarativewebview::pressGrabTime()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
+ checkNoErrors(component);
+ QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(component.create());
+ QObject *wv = rootItem->findChild<QObject*>("webView");
+ QVERIFY(rootItem != 0);
+ QVERIFY(wv != 0);
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+ QCOMPARE(wv->property("pressGrabTime").toInt(), 200);
+ QSignalSpy pressGrabTimeSpy(wv, SIGNAL(pressGrabTimeChanged()));
+
+ wv->setProperty("pressGrabTime", 100);
+ QCOMPARE(wv->property("pressGrabTime").toInt(), 100);
+ QCOMPARE(pressGrabTimeSpy.count(),1);
+
+ wv->setProperty("pressGrabTime", 100);
+ QCOMPARE(pressGrabTimeSpy.count(),1);
+
+ wv->setProperty("pressGrabTime", 0);
+ QCOMPARE(pressGrabTimeSpy.count(),2);
+}
+
+QTEST_MAIN(tst_qdeclarativewebview)
+
+#include "tst_qdeclarativewebview.moc"
diff --git a/tests/auto/declarative/qdeclarativeworkerlistmodel/data/model.qml b/tests/auto/declarative/qdeclarativeworkerlistmodel/data/model.qml
new file mode 100644
index 0000000000..be94e0012e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeworkerlistmodel/data/model.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+Item {
+ property alias model: model
+
+ WorkerListModel { id: model }
+
+ function workerModifyModel(cmd) { worker.sendMessage({'command': cmd, 'model': model}) }
+
+ WorkerScript {
+ id: worker
+ source: "script.js"
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeworkerlistmodel/data/script.js b/tests/auto/declarative/qdeclarativeworkerlistmodel/data/script.js
new file mode 100644
index 0000000000..8ee62b4442
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeworkerlistmodel/data/script.js
@@ -0,0 +1,6 @@
+WorkerScript.onMessage = function(msg) {
+ eval("msg.model." + msg.command)
+ msg.model.sync()
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativeworkerlistmodel/qdeclarativeworkerlistmodel.pro b/tests/auto/declarative/qdeclarativeworkerlistmodel/qdeclarativeworkerlistmodel.pro
new file mode 100644
index 0000000000..960dbe16c8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeworkerlistmodel/qdeclarativeworkerlistmodel.pro
@@ -0,0 +1,9 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+QT += script
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativeworkerlistmodel.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeworkerlistmodel/tst_qdeclarativeworkerlistmodel.cpp b/tests/auto/declarative/qdeclarativeworkerlistmodel/tst_qdeclarativeworkerlistmodel.cpp
new file mode 100644
index 0000000000..11a74476bc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeworkerlistmodel/tst_qdeclarativeworkerlistmodel.cpp
@@ -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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtCore/qdebug.h>
+
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativeitem.h>
+
+#include <private/qdeclarativeworkerscript_p.h>
+#include <private/qdeclarativelistmodel_p.h>
+#include "../../../shared/util.h"
+
+
+
+class tst_QDeclarativeWorkerListModel : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QDeclarativeWorkerListModel() {}
+private slots:
+ void clear();
+ void remove();
+ void append();
+ void insert();
+ void get();
+ void set();
+
+private:
+ QByteArray modificationWarning() const {
+ QString file = QUrl::fromLocalFile(SRCDIR "/data/model.qml").toString();
+ return QString("QML WorkerListModel (" + file + ":6:5) List can only be modified from a WorkerScript").toUtf8();
+ }
+
+ QDeclarativeEngine m_engine;
+};
+
+void tst_QDeclarativeWorkerListModel::clear()
+{
+ QDeclarativeComponent component(&m_engine, SRCDIR "/data/model.qml");
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item != 0);
+ QDeclarativeWorkerListModel *model = item->property("model").value<QDeclarativeWorkerListModel*>();
+ QVERIFY(model != 0);
+
+ QCOMPARE(model->count(), 0);
+ QVERIFY(QMetaObject::invokeMethod(item, "workerModifyModel", Q_ARG(QVariant, "append({'name': 'A'})")));
+ QTRY_COMPARE(model->count(), 1);
+
+ QTest::ignoreMessage(QtWarningMsg, modificationWarning().constData());
+ model->clear();
+ QCOMPARE(model->count(), 1);
+
+ QVERIFY(QMetaObject::invokeMethod(item, "workerModifyModel", Q_ARG(QVariant, "clear()")));
+ QTRY_COMPARE(model->count(), 0);
+
+ qApp->processEvents();
+}
+
+void tst_QDeclarativeWorkerListModel::remove()
+{
+ QDeclarativeComponent component(&m_engine, SRCDIR "/data/model.qml");
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item != 0);
+ QDeclarativeWorkerListModel *model = item->property("model").value<QDeclarativeWorkerListModel*>();
+ QVERIFY(model != 0);
+
+ QVERIFY(QMetaObject::invokeMethod(item, "workerModifyModel", Q_ARG(QVariant, "append({'name': 'A'})")));
+ QTRY_COMPARE(model->count(), 1);
+
+ QTest::ignoreMessage(QtWarningMsg, modificationWarning().constData());
+ model->remove(0);
+ QCOMPARE(model->count(), 1);
+
+ QVERIFY(QMetaObject::invokeMethod(item, "workerModifyModel", Q_ARG(QVariant, "remove(0)")));
+ QTRY_COMPARE(model->count(), 0);
+
+ qApp->processEvents();
+}
+
+void tst_QDeclarativeWorkerListModel::append()
+{
+ QDeclarativeComponent component(&m_engine, SRCDIR "/data/model.qml");
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item != 0);
+ QDeclarativeWorkerListModel *model = item->property("model").value<QDeclarativeWorkerListModel*>();
+ QVERIFY(model != 0);
+
+ QVERIFY(QMetaObject::invokeMethod(item, "workerModifyModel", Q_ARG(QVariant, "append({'name': 'A'})")));
+ QTRY_COMPARE(model->count(), 1);
+
+ QTest::ignoreMessage(QtWarningMsg, modificationWarning().constData());
+ model->append(QScriptValue(1));
+ QCOMPARE(model->count(), 1);
+
+ qApp->processEvents();
+}
+
+void tst_QDeclarativeWorkerListModel::insert()
+{
+ QDeclarativeComponent component(&m_engine, SRCDIR "/data/model.qml");
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item != 0);
+ QDeclarativeWorkerListModel *model = item->property("model").value<QDeclarativeWorkerListModel*>();
+ QVERIFY(model != 0);
+
+ QVERIFY(QMetaObject::invokeMethod(item, "workerModifyModel", Q_ARG(QVariant, "insert(0, {'name': 'A'})")));
+ QTRY_COMPARE(model->count(), 1);
+
+ QTest::ignoreMessage(QtWarningMsg, modificationWarning().constData());
+ model->insert(0, QScriptValue(1));
+ QCOMPARE(model->count(), 1);
+
+ qApp->processEvents();
+}
+
+void tst_QDeclarativeWorkerListModel::get()
+{
+ QDeclarativeComponent component(&m_engine, SRCDIR "/data/model.qml");
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item != 0);
+ QDeclarativeWorkerListModel *model = item->property("model").value<QDeclarativeWorkerListModel*>();
+ QVERIFY(model != 0);
+
+ QVERIFY(QMetaObject::invokeMethod(item, "workerModifyModel", Q_ARG(QVariant, "append({'name': 'A'})")));
+ QTRY_COMPARE(model->count(), 1);
+ QCOMPARE(model->get(0).property("name").toString(), QString("A"));
+
+ qApp->processEvents();
+}
+
+void tst_QDeclarativeWorkerListModel::set()
+{
+ QDeclarativeComponent component(&m_engine, SRCDIR "/data/model.qml");
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item != 0);
+ QDeclarativeWorkerListModel *model = item->property("model").value<QDeclarativeWorkerListModel*>();
+ QVERIFY(model != 0);
+
+ QVERIFY(QMetaObject::invokeMethod(item, "workerModifyModel", Q_ARG(QVariant, "append({'name': 'A'})")));
+ QTRY_COMPARE(model->count(), 1);
+
+ QTest::ignoreMessage(QtWarningMsg, modificationWarning().constData());
+ model->set(0, QScriptValue(1));
+
+ QVERIFY(QMetaObject::invokeMethod(item, "workerModifyModel", Q_ARG(QVariant, "set(0, {'name': 'Z'})")));
+ QTRY_COMPARE(model->get(0).property("name").toString(), QString("Z"));
+
+ qApp->processEvents();
+}
+
+QTEST_MAIN(tst_QDeclarativeWorkerListModel)
+
+#include "tst_qdeclarativeworkerlistmodel.moc"
+
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/script.js b/tests/auto/declarative/qdeclarativeworkerscript/data/script.js
new file mode 100644
index 0000000000..09199de9be
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeworkerscript/data/script.js
@@ -0,0 +1,5 @@
+WorkerScript.onMessage = function(msg) {
+ WorkerScript.sendMessage(msg)
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml b/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml
new file mode 100644
index 0000000000..1fce1552d2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml
@@ -0,0 +1,24 @@
+import Qt 4.6
+
+WorkerScript {
+ id: worker
+ source: "script.js"
+
+ property var response
+
+ signal done()
+
+ function testSend(value) {
+ worker.sendMessage(value)
+ }
+
+ function compareLiteralResponse(expected) {
+ var e = eval('(' + expected + ')')
+ return worker.response == e
+ }
+
+ onMessage: {
+ worker.response = messageObject
+ worker.done()
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
new file mode 100644
index 0000000000..e2b31c7e33
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative script
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativeworkerscript.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
new file mode 100644
index 0000000000..fe2dac2207
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
@@ -0,0 +1,182 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qtimer.h>
+#include <QtScript/qscriptengine.h>
+
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativeitem.h>
+
+#include <private/qdeclarativeworkerscript_p.h>
+#include <private/qdeclarativeengine_p.h>
+#include "../../../shared/util.h"
+
+Q_DECLARE_METATYPE(QScriptValue)
+
+class tst_QDeclarativeWorkerScript : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QDeclarativeWorkerScript() {}
+private slots:
+ void source();
+ void messaging();
+ void messaging_data();
+ void messaging_sendQObjectList();
+ void messaging_sendJsObject();
+
+private:
+ void waitForEchoMessage(QDeclarativeWorkerScript *worker) {
+ QEventLoop loop;
+ QVERIFY(connect(worker, SIGNAL(done()), &loop, SLOT(quit())));
+ QTimer timer;
+ timer.setSingleShot(true);
+ connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
+ timer.start(10000);
+ loop.exec();
+ QVERIFY(timer.isActive());
+ }
+
+ QDeclarativeEngine m_engine;
+};
+
+void tst_QDeclarativeWorkerScript::source()
+{
+ QUrl source = QUrl::fromLocalFile(SRCDIR "/data/worker.qml");
+
+ QDeclarativeComponent component(&m_engine);
+ component.setData("import Qt 4.6\nWorkerScript { source: '" + source.toString().toUtf8() + "'; }", QUrl());
+
+ QDeclarativeWorkerScript *item = qobject_cast<QDeclarativeWorkerScript*>(component.create());
+ QVERIFY(item != 0);
+
+ QCOMPARE(item->source(), source);
+
+ qApp->processEvents();
+ delete item;
+}
+
+void tst_QDeclarativeWorkerScript::messaging()
+{
+ QFETCH(QVariant, value);
+
+ QDeclarativeComponent component(&m_engine, SRCDIR "/data/worker.qml");
+ QDeclarativeWorkerScript *worker = qobject_cast<QDeclarativeWorkerScript*>(component.create());
+ QVERIFY(worker != 0);
+
+ QVERIFY(QMetaObject::invokeMethod(worker, "testSend", Q_ARG(QVariant, value)));
+ waitForEchoMessage(worker);
+
+ const QMetaObject *mo = worker->metaObject();
+ QCOMPARE(mo->property(mo->indexOfProperty("response")).read(worker).value<QVariant>(), value);
+
+ qApp->processEvents();
+ delete worker;
+}
+
+void tst_QDeclarativeWorkerScript::messaging_data()
+{
+ QTest::addColumn<QVariant>("value");
+
+ QTest::newRow("invalid") << QVariant();
+ QTest::newRow("bool") << qVariantFromValue(true);
+ QTest::newRow("int") << qVariantFromValue(1001);
+ QTest::newRow("real") << qVariantFromValue(10334.323);
+ QTest::newRow("string") << qVariantFromValue(QString("More cheeeese, Gromit!"));
+ QTest::newRow("variant list") << qVariantFromValue((QVariantList() << "a" << "b" << "c"));
+}
+
+void tst_QDeclarativeWorkerScript::messaging_sendQObjectList()
+{
+ // Not allowed to send QObjects other than QDeclarativeWorkerListModelAgent
+ // instances. If objects are sent in a list, they will be sent as 'undefined'
+ // js values.
+
+ QDeclarativeComponent component(&m_engine, SRCDIR "/data/worker.qml");
+ QDeclarativeWorkerScript *worker = qobject_cast<QDeclarativeWorkerScript*>(component.create());
+ QVERIFY(worker != 0);
+
+ QVariantList objects;
+ for (int i=0; i<3; i++)
+ objects << qVariantFromValue(new QObject(this));
+
+ QVERIFY(QMetaObject::invokeMethod(worker, "testSend", Q_ARG(QVariant, qVariantFromValue(objects))));
+ waitForEchoMessage(worker);
+
+ const QMetaObject *mo = worker->metaObject();
+ QVariantList result = mo->property(mo->indexOfProperty("response")).read(worker).value<QVariantList>();
+ QCOMPARE(result, (QVariantList() << QVariant() << QVariant() << QVariant()));
+
+ qApp->processEvents();
+ delete worker;
+}
+
+void tst_QDeclarativeWorkerScript::messaging_sendJsObject()
+{
+ QDeclarativeComponent component(&m_engine, SRCDIR "/data/worker.qml");
+ QDeclarativeWorkerScript *worker = qobject_cast<QDeclarativeWorkerScript*>(component.create());
+ QVERIFY(worker != 0);
+
+ QString jsObject = "{'name': 'zyz', 'spell power': 3101, 'haste': 1125}";
+
+ QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(qmlEngine(worker));
+ QScriptValue sv = engine->newObject();
+ sv.setProperty("name", "zyz");
+ sv.setProperty("spell power", 3101);
+ sv.setProperty("haste", 1125);
+
+ QVERIFY(QMetaObject::invokeMethod(worker, "testSend", Q_ARG(QVariant, qVariantFromValue(sv))));
+ waitForEchoMessage(worker);
+
+ QVariant result = qVariantFromValue(false);
+ QVERIFY(QMetaObject::invokeMethod(worker, "compareLiteralResponse", Qt::DirectConnection,
+ Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, jsObject)));
+ QVERIFY(result.toBool());
+
+ qApp->processEvents();
+ delete worker;
+}
+
+QTEST_MAIN(tst_QDeclarativeWorkerScript)
+
+#include "tst_qdeclarativeworkerscript.moc"
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.expect
new file mode 100644
index 0000000000..f43e04345b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.expect
@@ -0,0 +1,10 @@
+PUT /testdocument.html HTTP/1.1
+Content-Type: text/plain;charset=UTF-8
+Content-Length: 9
+Connection: Keep-Alive
+Accept-Encoding: gzip
+Accept-Language: en-US,*
+User-Agent: Mozilla/5.0
+Host: 127.0.0.1:14445
+
+Test Data \ No newline at end of file
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml
new file mode 100644
index 0000000000..d7b9266ede
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml
@@ -0,0 +1,42 @@
+import Qt 4.6
+
+QtObject {
+ property string urlDummy
+ property string url
+
+ property bool seenDone: false
+ property bool didNotSeeUnsent: true
+ property bool endStateUnsent: false
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+ x.open("GET", urlDummy);
+ x.setRequestHeader("Test-header", "TestValue");
+ x.send();
+
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ seenDone = true;
+ } else if (x.readyState == XMLHttpRequest.UNSENT) {
+ didNotSeeUnsent = false;
+ }
+ }
+
+ x.abort();
+
+ if (x.readyState == XMLHttpRequest.UNSENT) {
+ endStateUnsent = true;
+ }
+
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+ x.open("PUT", url);
+ x.send("Test Data");
+ }
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.reply b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.reply
new file mode 100644
index 0000000000..7ae6951f9b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.reply
@@ -0,0 +1,3 @@
+HTTP/1.0 200 OK
+Connection: close
+Content-type: text/html; charset=UTF-8
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml
new file mode 100644
index 0000000000..72a45e7caf
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml
@@ -0,0 +1,58 @@
+import Qt 4.6
+
+QtObject {
+ property string url: "testdocument.html"
+
+ property bool readyState: false
+ property bool openedState: false
+
+ property bool status: false
+ property bool statusText: false
+ property bool responseText: false
+ property bool responseXML: false
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+ x.abort();
+
+ if (x.readyState == XMLHttpRequest.UNSENT)
+ readyState = true;
+
+ x.open("PUT", url);
+
+ x.abort();
+
+ x.open("GET", url);
+
+ if (x.readyState == XMLHttpRequest.OPENED)
+ openedState = true;
+
+ try {
+ var a = x.status;
+ } catch (error) {
+ if (error.code == DOMException.INVALID_STATE_ERR)
+ status = true;
+ }
+ try {
+ var a = x.statusText;
+ } catch (error) {
+ if (error.code == DOMException.INVALID_STATE_ERR)
+ statusText = true;
+ }
+ responseText = (x.responseText == "");
+ responseXML = (x.responseXML == null);
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+
+ x.send()
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml
new file mode 100644
index 0000000000..aa78cde20e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml
@@ -0,0 +1,54 @@
+import Qt 4.6
+
+QtObject {
+ property string url: "testdocument.html"
+
+ property bool readyState: false
+ property bool openedState: false
+
+ property bool status: false
+ property bool statusText: false
+ property bool responseText: false
+ property bool responseXML: false
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+ x.abort();
+
+ if (x.readyState == XMLHttpRequest.UNSENT)
+ readyState = true;
+
+ x.open("GET", url);
+
+ if (x.readyState == XMLHttpRequest.OPENED)
+ openedState = true;
+
+ try {
+ var a = x.status;
+ } catch (error) {
+ if (error.code == DOMException.INVALID_STATE_ERR)
+ status = true;
+ }
+ try {
+ var a = x.statusText;
+ } catch (error) {
+ if (error.code == DOMException.INVALID_STATE_ERR)
+ statusText = true;
+ }
+ responseText = (x.responseText == "");
+ responseXML = (x.responseXML == null);
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+
+ x.send()
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml
new file mode 100644
index 0000000000..9049fc7004
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml
@@ -0,0 +1,80 @@
+import Qt 4.6
+
+QtObject {
+ property bool xmlTest: false
+ property bool dataOK: false
+
+ Script {
+ function checkAttr(documentElement, attr)
+ {
+ if (attr == null)
+ return;
+
+ if (attr.name != "attr")
+ return;
+
+ if (attr.value != "myvalue")
+ return;
+
+ if (attr.ownerElement.tagName != documentElement.tagName)
+ return;
+
+ if (attr.nodeName != "attr")
+ return;
+
+ if (attr.nodeValue != "myvalue")
+ return;
+
+ if (attr.nodeType != 2)
+ return;
+
+ if (attr.childNodes.length != 0)
+ return;
+
+ if (attr.firstChild != null)
+ return;
+
+ if (attr.lastChild != null)
+ return;
+
+ if (attr.previousSibling != null)
+ return;
+
+ if (attr.nextSibling != null)
+ return;
+
+ if (attr.attributes != null)
+ return;
+
+ xmlTest = true;
+ }
+
+ function checkXML(document)
+ {
+ checkAttr(document.documentElement, document.documentElement.attributes[0]);
+ }
+ }
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ x.open("GET", "attr.xml");
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+
+ dataOK = true;
+
+ if (x.responseXML != null)
+ checkXML(x.responseXML);
+
+ }
+ }
+
+ x.send()
+ }
+}
+
+
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.xml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.xml
new file mode 100644
index 0000000000..2aa64a3d00
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.xml
@@ -0,0 +1 @@
+<root attr="myvalue" />
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/callbackException.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/callbackException.qml
new file mode 100644
index 0000000000..9255922d55
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/callbackException.qml
@@ -0,0 +1,25 @@
+import Qt 4.6
+
+QtObject {
+ id: obj
+ property string url
+ property string which
+ property bool threw: false
+
+ onWhichChanged: {
+ var x = new XMLHttpRequest;
+
+ x.onreadystatechange = function() {
+ if (x.readyState == which) {
+ obj.threw = true
+ throw(new Error("Exception from Callback"))
+ }
+ }
+
+ x.open("GET", url);
+ x.setRequestHeader("Test-header", "TestValue");
+ x.send();
+ }
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml
new file mode 100644
index 0000000000..b2d0209bc8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml
@@ -0,0 +1,135 @@
+import Qt 4.6
+
+QtObject {
+ property bool xmlTest: false
+ property bool dataOK: false
+
+ Script {
+ function checkCData(text, whitespacetext)
+ {
+ // This is essentially a copy of text.qml/checkText()
+
+ if (text == null)
+ return;
+
+ if (text.nodeName != "#cdata-section")
+ return;
+
+ if (text.nodeValue != "Hello world!")
+ return;
+
+ if (text.nodeType != 4)
+ return;
+
+ if (text.parentNode.nodeName != "item")
+ return;
+
+ if (text.childNodes.length != 0)
+ return;
+
+ if (text.firstChild != null)
+ return;
+
+ if (text.lastChild != null)
+ return;
+
+ if (text.previousSibling != null)
+ return;
+
+ if (text.nextSibling != null)
+ return;
+
+ if (text.attributes != null)
+ return;
+
+ if (text.wholeText != "Hello world!")
+ return;
+
+ if (text.data != "Hello world!")
+ return;
+
+ if (text.length != 12)
+ return;
+
+ if (text.isElementContentWhitespace != false)
+ return;
+
+ if (whitespacetext.nodeName != "#cdata-section")
+ return;
+
+ if (whitespacetext.nodeValue != " ")
+ return;
+
+ if (whitespacetext.nodeType != 4)
+ return;
+
+ if (whitespacetext.parentNode.nodeName != "item")
+ return;
+
+ if (whitespacetext.childNodes.length != 0)
+ return;
+
+ if (whitespacetext.firstChild != null)
+ return;
+
+ if (whitespacetext.lastChild != null)
+ return;
+
+ if (whitespacetext.previousSibling != null)
+ return;
+
+ if (whitespacetext.nextSibling != null)
+ return;
+
+ if (whitespacetext.attributes != null)
+ return;
+
+ if (whitespacetext.wholeText != " ")
+ return;
+
+ if (whitespacetext.data != " ")
+ return;
+
+ if (whitespacetext.length != 3)
+ return;
+
+ if (whitespacetext.isElementContentWhitespace != true)
+ return;
+
+
+ xmlTest = true;
+ }
+
+ function checkXML(document)
+ {
+ checkCData(document.documentElement.childNodes[0].childNodes[0],
+ document.documentElement.childNodes[1].childNodes[0]);
+
+ }
+ }
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ x.open("GET", "cdata.xml");
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+
+ dataOK = true;
+
+ if (x.responseXML != null)
+ checkXML(x.responseXML);
+
+ }
+ }
+
+ x.send()
+ }
+}
+
+
+
+
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.xml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.xml
new file mode 100644
index 0000000000..061d37c0b6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.xml
@@ -0,0 +1,2 @@
+<root><item><![CDATA[Hello world!]]></item><item><![CDATA[ ]]></item></root>
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/constructor.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/constructor.qml
new file mode 100644
index 0000000000..93e44fd9e2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/constructor.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+QtObject {
+ property bool calledAsConstructor
+ property bool calledAsFunction
+
+ Component.onCompleted: {
+ var x1 = new XMLHttpRequest;
+ var x2 = XMLHttpRequest();
+
+ calledAsConstructor = (x1 != null && x1 instanceof XMLHttpRequest);
+ calledAsFunction = (x2 == undefined);
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/defaultState.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/defaultState.qml
new file mode 100644
index 0000000000..4dcf6f9fd3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/defaultState.qml
@@ -0,0 +1,30 @@
+import Qt 4.6
+
+QtObject {
+ property int readyState
+ property bool statusIsException: false
+ property bool statusTextIsException: false
+ property string responseText
+ property bool responseXMLIsNull
+
+ Component.onCompleted: {
+ var xhr = new XMLHttpRequest();
+
+ readyState = xhr.readyState;
+ try {
+ status = xhr.status;
+ } catch (error) {
+ if (error.code == DOMException.INVALID_STATE_ERR)
+ statusIsException = true;
+ }
+ try {
+ statusText = xhr.statusText;
+ } catch (error) {
+ if (error.code == DOMException.INVALID_STATE_ERR)
+ statusTextIsException = true;
+ }
+ responseText = xhr.responseText;
+ responseXMLIsNull = (xhr.responseXML == null);
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml
new file mode 100644
index 0000000000..e3723619c6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml
@@ -0,0 +1,58 @@
+import Qt 4.6
+
+QtObject {
+ property bool xmlTest: false
+ property bool dataOK: false
+
+ Script {
+ function checkXML(document)
+ {
+ if (document.xmlVersion != "1.0")
+ return;
+
+ if (document.xmlEncoding != "UTF-8")
+ return;
+
+ if (document.xmlStandalone != true)
+ return;
+
+ if (document.documentElement == null)
+ return;
+
+ if (document.nodeName != "#document")
+ return;
+
+ if (document.nodeValue != null)
+ return;
+
+ if (document.parentNode != null)
+ return;
+
+ // ### Test other node properties
+ // ### test encoding (what is a valid qt encoding?)
+ xmlTest = true;
+ }
+ }
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ x.open("GET", "document.xml");
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+
+ dataOK = true;
+
+ if (x.responseXML != null)
+ checkXML(x.responseXML);
+
+ }
+ }
+
+ x.send()
+ }
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.xml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.xml
new file mode 100644
index 0000000000..fb693ea193
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8" standalone='yes'?>
+<root>
+</root>
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/domExceptionCodes.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/domExceptionCodes.qml
new file mode 100644
index 0000000000..de5ee4f762
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/domExceptionCodes.qml
@@ -0,0 +1,60 @@
+import Qt 4.6
+
+QtObject {
+ property int index_size_err: DOMException.INDEX_SIZE_ERR
+ property int domstring_size_err: DOMException.DOMSTRING_SIZE_ERR
+ property int hierarchy_request_err: DOMException.HIERARCHY_REQUEST_ERR
+ property int wrong_document_err: DOMException.WRONG_DOCUMENT_ERR
+ property int invalid_character_err: DOMException.INVALID_CHARACTER_ERR
+ property int no_data_allowed_err: DOMException.NO_DATA_ALLOWED_ERR
+ property int no_modification_allowed_err: DOMException.NO_MODIFICATION_ALLOWED_ERR
+ property int not_found_err: DOMException.NOT_FOUND_ERR
+ property int not_supported_err: DOMException.NOT_SUPPORTED_ERR
+ property int inuse_attribute_err: DOMException.INUSE_ATTRIBUTE_ERR
+ property int invalid_state_err: DOMException.INVALID_STATE_ERR
+ property int syntax_err: DOMException.SYNTAX_ERR
+ property int invalid_modification_err: DOMException.INVALID_MODIFICATION_ERR
+ property int namespace_err: DOMException.NAMESPACE_ERR
+ property int invalid_access_err: DOMException.INVALID_ACCESS_ERR
+ property int validation_err: DOMException.VALIDATION_ERR
+ property int type_mismatch_err: DOMException.TYPE_MISMATCH_ERR
+
+ Component.onCompleted: {
+ // Attempt to overwrite and delete values
+ DOMException.INDEX_SIZE_ERR = 44;
+ DOMException.DOMSTRING_SIZE_ERR = 44;
+ DOMException.HIERARCHY_REQUEST_ERR = 44;
+ DOMException.WRONG_DOCUMENT_ERR = 44;
+ DOMException.INVALID_CHARACTER_ERR = 44;
+ DOMException.NO_DATA_ALLOWED_ERR = 44;
+ DOMException.NO_MODIFICATION_ALLOWED_ERR = 44;
+ DOMException.NOT_FOUND_ERR = 44;
+ DOMException.NOT_SUPPORTED_ERR = 44;
+ DOMException.INUSE_ATTRIBUTE_ERR = 44;
+ DOMException.INVALID_STATE_ERR = 44;
+ DOMException.SYNTAX_ERR = 44;
+ DOMException.INVALID_MODIFICATION_ERR = 44;
+ DOMException.NAMESPACE_ERR = 44;
+ DOMException.INVALID_ACCESS_ERR = 44;
+ DOMException.VALIDATION_ERR = 44;
+ DOMException.TYPE_MISMATCH_ERR = 44;
+
+ delete DOMException.INDEX_SIZE_ERR;
+ delete DOMException.DOMSTRING_SIZE_ERR;
+ delete DOMException.HIERARCHY_REQUEST_ERR;
+ delete DOMException.WRONG_DOCUMENT_ERR;
+ delete DOMException.INVALID_CHARACTER_ERR;
+ delete DOMException.NO_DATA_ALLOWED_ERR;
+ delete DOMException.NO_MODIFICATION_ALLOWED_ERR;
+ delete DOMException.NOT_FOUND_ERR;
+ delete DOMException.NOT_SUPPORTED_ERR;
+ delete DOMException.INUSE_ATTRIBUTE_ERR;
+ delete DOMException.INVALID_STATE_ERR;
+ delete DOMException.SYNTAX_ERR;
+ delete DOMException.INVALID_MODIFICATION_ERR;
+ delete DOMException.NAMESPACE_ERR;
+ delete DOMException.INVALID_ACCESS_ERR;
+ delete DOMException.VALIDATION_ERR;
+ delete DOMException.TYPE_MISMATCH_ERR;
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml
new file mode 100644
index 0000000000..78c0374f8a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml
@@ -0,0 +1,147 @@
+import Qt 4.6
+
+QtObject {
+ property bool xmlTest: false
+ property bool dataOK: false
+
+ Script {
+ function checkElement(e, person, fruit)
+ {
+ if (e.tagName != "root")
+ return;
+
+ if (e.nodeName != "root")
+ return;
+
+ if (e.nodeValue != null)
+ return;
+
+ if (e.nodeType != 1)
+ return;
+
+ var childTagNames = [ "person", "fruit" ];
+
+ if (e.childNodes.length != childTagNames.length)
+ return;
+
+ for (var ii = 0; ii < childTagNames.length; ++ii) {
+ if (e.childNodes[ii].tagName != childTagNames[ii])
+ return;
+ }
+
+ if (e.childNodes[childTagNames.length + 1] != null)
+ return;
+
+ // Check writing fails
+ e.childNodes[0] = null;
+ if (e.childNodes[0] == null)
+ return;
+
+ e.childNodes[10] = 10;
+ if (e.childNodes[10] != null)
+ return;
+
+ if (e.firstChild.tagName != e.childNodes[0].tagName)
+ return;
+
+ if (e.lastChild.tagName != e.childNodes[1].tagName)
+ return;
+
+ if (e.previousSibling != null)
+ return;
+
+ if (e.nextSibling != null)
+ return;
+
+ if (e.attributes == null)
+ return;
+
+ if (e.attributes.length != 2)
+ return;
+
+ var attr1 = e.attributes["attr"];
+ if (attr1.nodeValue != "value")
+ return;
+
+ var attrIdx = e.attributes[0];
+ if (attrIdx.nodeValue != "value")
+ return;
+
+ var attr2 = e.attributes["attr2"];
+ if (attr2.nodeValue != "value2")
+ return;
+
+ var attr3 = e.attributes["attr3"];
+ if (attr3 != null)
+ return;
+
+ var attrIdx2 = e.attributes[11];
+ if (attrIdx2 != null)
+ return;
+
+ // Check writing fails
+ e.attributes[0] = null;
+ if (e.attributes[0] == null)
+ return;
+
+ e.attributes["attr"] = null;
+ if (e.attributes["attr"] == null)
+ return;
+
+ e.attributes["attr3"] = 10;
+ if (e.attributes["attr3"] != null)
+ return;
+
+ // Check person and fruit sub elements
+ if (person.parentNode.nodeName != "root")
+ return;
+
+ if (person.previousSibling != null)
+ return;
+
+ if (person.nextSibling.nodeName != "fruit")
+ return;
+
+ if (fruit.parentNode.nodeName != "root")
+ return;
+
+ if (fruit.previousSibling.nodeName != "person")
+ return;
+
+ if (fruit.nextSibling != null)
+ return;
+
+ xmlTest = true;
+ }
+
+ function checkXML(document)
+ {
+ checkElement(document.documentElement,
+ document.documentElement.childNodes[0],
+ document.documentElement.childNodes[1]);
+ }
+ }
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ x.open("GET", "element.xml");
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+
+ dataOK = true;
+
+ if (x.responseXML != null)
+ checkXML(x.responseXML);
+
+ }
+ }
+
+ x.send()
+ }
+}
+
+
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.xml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.xml
new file mode 100644
index 0000000000..071ffae057
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.xml
@@ -0,0 +1 @@
+<root attr="value" attr2="value2"><person /><fruit /></root>
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml
new file mode 100644
index 0000000000..8d67fad3de
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml
@@ -0,0 +1,65 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+
+ property bool unsentException: false
+ property bool openedException: false
+
+ property bool readyState: false
+ property bool openedState: false
+
+ property bool headersReceivedState: false
+ property bool headersReceivedHeader: false
+
+ property bool doneState: false
+ property bool doneHeader: false
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ try {
+ x.getResponseHeader("Test-Header");
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ unsentException = true;
+ }
+
+ if (x.readyState == XMLHttpRequest.UNSENT)
+ readyState = true;
+
+ x.open("GET", url);
+
+ if (x.readyState == XMLHttpRequest.OPENED)
+ openedState = true;
+
+ try {
+ x.getResponseHeader("Test-Header");
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ openedException = true;
+ }
+
+ var headers = "connection: close\r\ncontent-type: text/html; charset=UTF-8\r\ntest-header: TestValue\r\nmultitest-header: TestValue, SecondTestValue\r\ncontent-length: 11";
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.HEADERS_RECEIVED) {
+ headersReceivedState = true;
+
+ headersReceivedHeader = (x.getAllResponseHeaders() == headers);
+ } else if (x.readyState == XMLHttpRequest.DONE) {
+ doneState = headersReceivedState && true;
+
+ doneHeader = (x.getAllResponseHeaders() == headers);
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+ x.send()
+ }
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_args.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_args.qml
new file mode 100644
index 0000000000..37124c76a9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_args.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+
+QtObject {
+ property bool exceptionThrown: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ x.open("GET", "testdocument.html");
+ x.send();
+
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ try {
+ x.getAllResponseHeaders("Test-header");
+ } catch (e) {
+ if (e.code == DOMException.SYNTAX_ERR)
+ exceptionThrown = true;
+ }
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_sent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_sent.qml
new file mode 100644
index 0000000000..505e4b1871
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_sent.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+QtObject {
+ property bool test: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ x.open("GET", "testdocument.html");
+ x.send();
+
+ try {
+ x.getAllResponseHeaders();
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ test = true;
+ }
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_unsent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_unsent.qml
new file mode 100644
index 0000000000..20fb040c73
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_unsent.qml
@@ -0,0 +1,16 @@
+import Qt 4.6
+
+QtObject {
+ property bool test: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ try {
+ x.getAllResponseHeaders();
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ test = true;
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.expect
new file mode 100644
index 0000000000..a740c79cf8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.expect
@@ -0,0 +1,7 @@
+GET /testdocument.html HTTP/1.1
+Connection: Keep-Alive
+Accept-Encoding: gzip
+Accept-Language: en-US,*
+User-Agent: Mozilla/5.0
+Host: 127.0.0.1:14445
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml
new file mode 100644
index 0000000000..2f949e1480
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml
@@ -0,0 +1,75 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+
+ property bool unsentException: false
+ property bool openedException: false
+
+ property bool readyState: false
+ property bool openedState: false
+
+ property bool headersReceivedState: false
+ property bool headersReceivedNullHeader: false
+ property bool headersReceivedValidHeader: false
+ property bool headersReceivedMultiValidHeader: false
+ property bool headersReceivedCookieHeader: false
+
+ property bool doneState: false
+ property bool doneNullHeader: false
+ property bool doneValidHeader: false
+ property bool doneMultiValidHeader: false
+ property bool doneCookieHeader: false
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ try {
+ x.getResponseHeader("Test-Header");
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ unsentException = true;
+ }
+
+ if (x.readyState == XMLHttpRequest.UNSENT)
+ readyState = true;
+
+ x.open("GET", url);
+
+ if (x.readyState == XMLHttpRequest.OPENED)
+ openedState = true;
+
+ try {
+ x.getResponseHeader("Test-Header");
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ openedException = true;
+ }
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.HEADERS_RECEIVED) {
+ headersReceivedState = true;
+
+ headersReceivedNullHeader = (x.getResponseHeader("Nonexistant-header") == "");
+ headersReceivedValidHeader = (x.getResponseHeader("Test-HEAder") == "TestValue");
+ headersReceivedMultiValidHeader = (x.getResponseHeader("MultiTest-HEAder") == "TestValue, SecondTestValue");
+ headersReceivedCookieHeader = (x.getResponseHeader("Set-Cookie") == "" && x.getResponseHeader("Set-Cookie2") == "");
+ } else if (x.readyState == XMLHttpRequest.DONE) {
+ doneState = headersReceivedState && true;
+
+ doneNullHeader = (x.getResponseHeader("Nonexistant-header") == "");
+ doneValidHeader = (x.getResponseHeader("Test-HEAder") == "TestValue");
+ doneMultiValidHeader = (x.getResponseHeader("MultiTest-HEAder") == "TestValue, SecondTestValue");
+ doneCookieHeader = (x.getResponseHeader("Set-Cookie") == "" && x.getResponseHeader("Set-Cookie2") == "");
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+ x.send()
+ }
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.reply b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.reply
new file mode 100644
index 0000000000..c4b4bb2763
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.reply
@@ -0,0 +1,8 @@
+HTTP/1.0 200 OK
+Connection: close
+Content-type: text/html; charset=UTF-8
+Test-Header: TestValue
+MultiTest-Header: TestValue
+MultiTest-Header: SecondTestValue
+Set-Cookie: mycook=Value
+Set-Cookie2: mycook=Value
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_args.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_args.qml
new file mode 100644
index 0000000000..d5aa4b1c69
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_args.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+
+QtObject {
+ property bool exceptionThrown: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ x.open("GET", "testdocument.html");
+ x.send();
+
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ try {
+ x.getResponseHeader();
+ } catch (e) {
+ if (e.code == DOMException.SYNTAX_ERR)
+ exceptionThrown = true;
+ }
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_sent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_sent.qml
new file mode 100644
index 0000000000..7538ffdd6d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_sent.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+QtObject {
+ property bool test: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ x.open("GET", "testdocument.html");
+ x.send();
+
+ try {
+ x.getResponseHeader("Test-header");
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ test = true;
+ }
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_unsent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_unsent.qml
new file mode 100644
index 0000000000..3b55802c19
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_unsent.qml
@@ -0,0 +1,16 @@
+import Qt 4.6
+
+QtObject {
+ property bool test: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ try {
+ x.getResponseHeader("Test-header");
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ test = true;
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/instanceStateValues.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/instanceStateValues.qml
new file mode 100644
index 0000000000..b8d01c4218
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/instanceStateValues.qml
@@ -0,0 +1,33 @@
+import Qt 4.6
+
+QtObject {
+ property int unsent
+ property int opened
+ property int headers_received
+ property int loading
+ property int done
+
+ Component.onCompleted: {
+ // Attempt to overwrite and delete values
+ var x = new XMLHttpRequest();
+
+ x.UNSENT = 9;
+ x.OPENED = 9;
+ x.HEADERS_RECEIVED = 9;
+ x.LOADING = 9;
+ x.DONE = 9;
+
+ delete x.UNSENT;
+ delete x.OPENED;
+ delete x.HEADERS_RECEIVED;
+ delete x.LOADING;
+ delete x.DONE;
+
+ unsent = x.UNSENT
+ opened = x.OPENED
+ headers_received = x.HEADERS_RECEIVED
+ loading = x.LOADING
+ done = x.DONE
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/invalidMethodUsage.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/invalidMethodUsage.qml
new file mode 100644
index 0000000000..b30989bc73
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/invalidMethodUsage.qml
@@ -0,0 +1,160 @@
+import Qt 4.6
+
+QtObject {
+ property bool onreadystatechange: false
+ property bool readyState: false
+ property bool status: false
+ property bool statusText: false
+ property bool responseText: false
+ property bool responseXML: false
+
+ property bool open: false
+ property bool setRequestHeader: false
+ property bool send: false
+ property bool abort: false
+ property bool getResponseHeader: false
+ property bool getAllResponseHeaders: false
+
+ Component.onCompleted: {
+ var o = 10;
+
+ try {
+ XMLHttpRequest.prototype.onreadystatechange
+ } catch (e) {
+ if (!(e instanceof ReferenceError))
+ return;
+
+ if (e.message != "Not an XMLHttpRequest object")
+ return;
+
+ onreadystatechange = true;
+ }
+ try {
+ XMLHttpRequest.prototype.readyState
+ } catch (e) {
+ if (!(e instanceof ReferenceError))
+ return;
+
+ if (e.message != "Not an XMLHttpRequest object")
+ return;
+
+ readyState = true;
+ }
+ try {
+ XMLHttpRequest.prototype.status
+ } catch (e) {
+ if (!(e instanceof ReferenceError))
+ return;
+
+ if (e.message != "Not an XMLHttpRequest object")
+ return;
+
+ status = true;
+ }
+ try {
+ XMLHttpRequest.prototype.statusText
+ } catch (e) {
+ if (!(e instanceof ReferenceError))
+ return;
+
+ if (e.message != "Not an XMLHttpRequest object")
+ return;
+
+ statusText = true;
+ }
+ try {
+ XMLHttpRequest.prototype.responseText
+ } catch (e) {
+ if (!(e instanceof ReferenceError))
+ return;
+
+ if (e.message != "Not an XMLHttpRequest object")
+ return;
+
+ responseText = true;
+ }
+ try {
+ XMLHttpRequest.prototype.responseXML
+ } catch (e) {
+ if (!(e instanceof ReferenceError))
+ return;
+
+ if (e.message != "Not an XMLHttpRequest object")
+ return;
+
+ responseXML = true;
+ }
+
+ try {
+ XMLHttpRequest.prototype.open.call(o);
+ } catch (e) {
+ if (!(e instanceof ReferenceError))
+ return;
+
+ if (e.message != "Not an XMLHttpRequest object")
+ return;
+
+ open = true;
+ }
+
+ try {
+ XMLHttpRequest.prototype.setRequestHeader.call(o);
+ } catch (e) {
+ if (!(e instanceof ReferenceError))
+ return;
+
+ if (e.message != "Not an XMLHttpRequest object")
+ return;
+
+ setRequestHeader = true;
+ }
+
+ try {
+ XMLHttpRequest.prototype.send.call(o);
+ } catch (e) {
+ if (!(e instanceof ReferenceError))
+ return;
+
+ if (e.message != "Not an XMLHttpRequest object")
+ return;
+
+ send = true;
+ }
+
+ try {
+ XMLHttpRequest.prototype.abort.call(o);
+ } catch (e) {
+ if (!(e instanceof ReferenceError))
+ return;
+
+ if (e.message != "Not an XMLHttpRequest object")
+ return;
+
+ abort = true;
+ }
+
+ try {
+ XMLHttpRequest.prototype.getResponseHeader.call(o);
+ } catch (e) {
+ if (!(e instanceof ReferenceError))
+ return;
+
+ if (e.message != "Not an XMLHttpRequest object")
+ return;
+
+ getResponseHeader = true;
+ }
+
+ try {
+ XMLHttpRequest.prototype.getAllResponseHeaders.call(o);
+ } catch (e) {
+ if (!(e instanceof ReferenceError))
+ return;
+
+ if (e.message != "Not an XMLHttpRequest object")
+ return;
+
+ getAllResponseHeaders = true;
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml
new file mode 100644
index 0000000000..c06bae3b13
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml
@@ -0,0 +1,53 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+
+ property bool readyState: false
+ property bool openedState: false
+
+ property bool status: false
+ property bool statusText: false
+ property bool responseText: false
+ property bool responseXML: false
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ if (x.readyState == XMLHttpRequest.UNSENT)
+ readyState = true;
+
+ x.open("GET", url);
+
+ if (x.readyState == XMLHttpRequest.OPENED)
+ openedState = true;
+
+ try {
+ var a = x.status;
+ } catch (error) {
+ if (error.code == DOMException.INVALID_STATE_ERR)
+ status = true;
+ }
+ try {
+ var a = x.statusText;
+ } catch (error) {
+ if (error.code == DOMException.INVALID_STATE_ERR)
+ statusText = true;
+ }
+ responseText = (x.responseText == "");
+ responseXML = (x.responseXML == null);
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+
+ x.send()
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.1.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.1.qml
new file mode 100644
index 0000000000..b6d4c321aa
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.1.qml
@@ -0,0 +1,18 @@
+import Qt 4.6
+
+QtObject {
+ property bool exceptionThrown: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ try {
+ x.open("GET");
+ } catch (e) {
+ if (e.code == DOMException.SYNTAX_ERR)
+ exceptionThrown = true;
+ }
+ }
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.2.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.2.qml
new file mode 100644
index 0000000000..8c86c20771
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.2.qml
@@ -0,0 +1,18 @@
+import Qt 4.6
+
+QtObject {
+ property bool exceptionThrown: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ try {
+ x.open("GET", "http://www.nokia.com", true, "user", "password", "extra");
+ } catch (e) {
+ if (e.code == DOMException.SYNTAX_ERR)
+ exceptionThrown = true;
+ }
+ }
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml
new file mode 100644
index 0000000000..69f79ae531
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml
@@ -0,0 +1,16 @@
+import Qt 4.6
+
+QtObject {
+ property bool exceptionThrown: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ try {
+ x.open("BLAH", "http://www.nokia.com");
+ } catch (e) {
+ if (e.code == DOMException.SYNTAX_ERR)
+ exceptionThrown = true;
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.expect
new file mode 100644
index 0000000000..a740c79cf8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.expect
@@ -0,0 +1,7 @@
+GET /testdocument.html HTTP/1.1
+Connection: Keep-Alive
+Accept-Encoding: gzip
+Accept-Language: en-US,*
+User-Agent: Mozilla/5.0
+Host: 127.0.0.1:14445
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.reply b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.reply
new file mode 100644
index 0000000000..7ae6951f9b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.reply
@@ -0,0 +1,3 @@
+HTTP/1.0 200 OK
+Connection: close
+Content-type: text/html; charset=UTF-8
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.wait b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.wait
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_network.wait
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_sync.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_sync.qml
new file mode 100644
index 0000000000..1477279980
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_sync.qml
@@ -0,0 +1,17 @@
+import Qt 4.6
+
+QtObject {
+ property bool exceptionThrown: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ try {
+ x.open("GET", "http://www.nokia.com", false);
+ } catch (e) {
+ if (e.code == DOMException.NOT_SUPPORTED_ERR)
+ exceptionThrown = true;
+ }
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml
new file mode 100644
index 0000000000..19e37fa07f
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml
@@ -0,0 +1,53 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+
+ property bool readyState: false
+ property bool openedState: false
+
+ property bool status: false
+ property bool statusText: false
+ property bool responseText: false
+ property bool responseXML: false
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ if (x.readyState == XMLHttpRequest.UNSENT)
+ readyState = true;
+
+ x.open("GET", url, true, "username", "password");
+
+ if (x.readyState == XMLHttpRequest.OPENED)
+ openedState = true;
+
+ try {
+ var a = x.status;
+ } catch (error) {
+ if (error.code == DOMException.INVALID_STATE_ERR)
+ status = true;
+ }
+ try {
+ var a = x.statusText;
+ } catch (error) {
+ if (error.code == DOMException.INVALID_STATE_ERR)
+ statusText = true;
+ }
+ responseText = (x.responseText == "");
+ responseXML = (x.responseXML == null);
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+
+ x.send()
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_username.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_username.qml
new file mode 100644
index 0000000000..983ea14522
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_username.qml
@@ -0,0 +1,54 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+
+ property bool readyState: false
+ property bool openedState: false
+
+ property bool status: false
+ property bool statusText: false
+ property bool responseText: false
+ property bool responseXML: false
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ if (x.readyState == XMLHttpRequest.UNSENT)
+ readyState = true;
+
+ x.open("GET", url, true, "sampleusername", "password");
+
+ if (x.readyState == XMLHttpRequest.OPENED)
+ openedState = true;
+
+ try {
+ var a = x.status;
+ } catch (error) {
+ if (error.code == DOMException.INVALID_STATE_ERR)
+ status = true;
+ }
+ try {
+ var a = x.statusText;
+ } catch (error) {
+ if (error.code == DOMException.INVALID_STATE_ERR)
+ statusText = true;
+ }
+ responseText = (x.responseText == "");
+ responseXML = (x.responseXML == null);
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+
+ x.send()
+ }
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml
new file mode 100644
index 0000000000..6b345ccc21
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+
+ property bool dataOK: false
+ property bool done: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+ x.open("GET", url);
+
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ done = true;
+ dataOK = x.status == 404;
+ }
+ }
+
+ x.send();
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectRecur.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectRecur.qml
new file mode 100644
index 0000000000..c0321dc344
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectRecur.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+
+ property bool dataOK: false
+ property bool done: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+ x.open("GET", url);
+
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ done = true;
+ dataOK = x.status == 302;
+ }
+ }
+
+ x.send();
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirects.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirects.qml
new file mode 100644
index 0000000000..f6fabdba4b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirects.qml
@@ -0,0 +1,22 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+
+ property bool dataOK: false
+ property bool done: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+ x.open("GET", url);
+
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ done = true;
+ dataOK = x.responseText == "Redirected\n";
+ }
+ }
+
+ x.send();
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirecttarget.html b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirecttarget.html
new file mode 100644
index 0000000000..95f35e01c7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirecttarget.html
@@ -0,0 +1 @@
+Redirected
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml
new file mode 100644
index 0000000000..4bb3a7afd1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml
@@ -0,0 +1,52 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+ property string expectedText
+
+ property bool unsent: false
+ property bool opened: false
+ property bool sent: false
+ property bool headersReceived: false
+
+ property bool loading: false
+ property bool done: false
+
+ property bool reset: false
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ unsent = (x.responseText == "");
+
+ x.open("GET", url);
+
+ opened = (x.responseText == "");
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.HEADERS_RECEIVED) {
+ headersReceived = (x.responseText == "");
+ } else if (x.readyState == XMLHttpRequest.LOADING) {
+ if (x.responseText == expectedText)
+ loading = true;
+ } else if (x.readyState == XMLHttpRequest.DONE) {
+ if (x.responseText == expectedText)
+ done = true;
+
+ dataOK = (x.responseText == expectedText);
+
+ x.open("GET", url);
+
+ reset = (x.responseText == "");
+ }
+ }
+
+ x.send()
+
+ sent = (x.responseText == "");
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseXML_invalid.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseXML_invalid.qml
new file mode 100644
index 0000000000..63f288e8fc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseXML_invalid.qml
@@ -0,0 +1,24 @@
+import Qt 4.6
+
+QtObject {
+ property bool xmlNull: false
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ x.open("GET", "testdocument.html");
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ xmlNull = (x.responseXML == null);
+ }
+ }
+
+
+ x.send()
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/seconddocument.html b/tests/auto/declarative/qdeclarativexmlhttprequest/data/seconddocument.html
new file mode 100644
index 0000000000..a33f44bcb5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/seconddocument.html
@@ -0,0 +1 @@
+This should not be read!
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml
new file mode 100644
index 0000000000..0bad7df5d7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml
@@ -0,0 +1,27 @@
+import Qt 4.6
+
+QtObject {
+ property bool dataOK: false
+ property bool test: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+ x.open("GET", "testdocument.html");
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+ x.send();
+
+ try {
+ x.send()
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ test = true;
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.expect
new file mode 100644
index 0000000000..81dd4a00e9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.expect
@@ -0,0 +1,10 @@
+POST /testdocument.html HTTP/1.1
+Content-Type: text/plain;charset=UTF-8
+Content-Length: 12
+Connection: Keep-Alive
+Accept-Encoding: gzip
+Accept-Language: en-US,*
+User-Agent: Mozilla/5.0
+Host: 127.0.0.1:14445
+
+My Sent Data \ No newline at end of file
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml
new file mode 100644
index 0000000000..03543a9f35
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+ x.open("POST", url);
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+ x.send("My Sent Data");
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml
new file mode 100644
index 0000000000..79a27b62b6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+ x.open("POST", url);
+ x.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+ x.send("My Sent Data");
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml
new file mode 100644
index 0000000000..e0487691f5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+ x.open("POST", url);
+ x.setRequestHeader("Content-Type", "text/plain;charset=latin1");
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+ x.send("My Sent Data");
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.expect
new file mode 100644
index 0000000000..8fcf3ac8d9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.expect
@@ -0,0 +1,10 @@
+POST /testdocument.html HTTP/1.1
+Content-Type: charset=UTF-8;text/plain
+Content-Length: 12
+Connection: Keep-Alive
+Accept-Encoding: gzip
+Accept-Language: en-US,*
+User-Agent: Mozilla/5.0
+Host: 127.0.0.1:14445
+
+My Sent Data \ No newline at end of file
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml
new file mode 100644
index 0000000000..7ab0b278e8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+ x.open("POST", url);
+ x.setRequestHeader("Content-Type", "charset=UTF-8;text/plain");
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+ x.send("My Sent Data");
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml
new file mode 100644
index 0000000000..29bf2c216d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+ x.open("POST", url);
+ x.setRequestHeader("Content-Type", "charset=latin1;text/plain");
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+ x.send("My Sent Data");
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.expect
new file mode 100644
index 0000000000..97e6facde2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.expect
@@ -0,0 +1,10 @@
+PUT /testdocument.html HTTP/1.1
+Content-Type: text/plain;charset=UTF-8
+Content-Length: 12
+Connection: Keep-Alive
+Accept-Encoding: gzip
+Accept-Language: en-US,*
+User-Agent: Mozilla/5.0
+Host: 127.0.0.1:14445
+
+My Sent Data \ No newline at end of file
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml
new file mode 100644
index 0000000000..135f45c6f7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+ x.open("PUT", url);
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+ x.send("My Sent Data");
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml
new file mode 100644
index 0000000000..4a09527632
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+ x.open("POST", url);
+ x.setRequestHeader("Content-Type", "text/plain");
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+ x.send("My Sent Data");
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.reply b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.reply
new file mode 100644
index 0000000000..7ae6951f9b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.reply
@@ -0,0 +1,3 @@
+HTTP/1.0 200 OK
+Connection: close
+Content-type: text/html; charset=UTF-8
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml
new file mode 100644
index 0000000000..dd5fa46d6a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml
@@ -0,0 +1,26 @@
+import Qt 4.6
+
+QtObject {
+ property string reqType
+ property string url
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+ x.open(reqType, url);
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ if (reqType == "HEAD")
+ dataOK = (x.responseText == "");
+ else
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+ x.send("Data To Ignore");
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.reply b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.reply
new file mode 100644
index 0000000000..7ae6951f9b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.reply
@@ -0,0 +1,3 @@
+HTTP/1.0 200 OK
+Connection: close
+Content-type: text/html; charset=UTF-8
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_GET.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_GET.expect
new file mode 100644
index 0000000000..a740c79cf8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_GET.expect
@@ -0,0 +1,7 @@
+GET /testdocument.html HTTP/1.1
+Connection: Keep-Alive
+Accept-Encoding: gzip
+Accept-Language: en-US,*
+User-Agent: Mozilla/5.0
+Host: 127.0.0.1:14445
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_PUT.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_PUT.expect
new file mode 100644
index 0000000000..991bd59f95
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData_PUT.expect
@@ -0,0 +1,7 @@
+HEAD /testdocument.html HTTP/1.1
+Connection: Keep-Alive
+Accept-Encoding: gzip
+Accept-Language: en-US,*
+User-Agent: Mozilla/5.0
+Host: 127.0.0.1:14445
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_unsent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_unsent.qml
new file mode 100644
index 0000000000..7f51ecfa62
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_unsent.qml
@@ -0,0 +1,16 @@
+import Qt 4.6
+
+QtObject {
+ property bool test: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ try {
+ x.send();
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ test = true;
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.expect
new file mode 100644
index 0000000000..4600f2abe1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.expect
@@ -0,0 +1,9 @@
+GET /testdocument.html HTTP/1.1
+TEST-HEADER: value
+TEST-HEADER2: value,value2
+Connection: Keep-Alive
+Accept-Encoding: gzip
+Accept-Language: en-US,*
+User-Agent: Mozilla/5.0
+Host: 127.0.0.1:14445
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml
new file mode 100644
index 0000000000..b0723aa7a5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml
@@ -0,0 +1,28 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ x.open("GET", url);
+
+ x.setRequestHeader("Test-header", "value");
+ x.setRequestHeader("Test-header2", "value");
+ x.setRequestHeader("Test-header2", "value2");
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+ x.send();
+ }
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.reply b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.reply
new file mode 100644
index 0000000000..7ae6951f9b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.reply
@@ -0,0 +1,3 @@
+HTTP/1.0 200 OK
+Connection: close
+Content-type: text/html; charset=UTF-8
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_args.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_args.qml
new file mode 100644
index 0000000000..8305ae1f3d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_args.qml
@@ -0,0 +1,18 @@
+import Qt 4.6
+
+QtObject {
+ property bool exceptionThrown: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ x.open("GET", "testdocument.html");
+
+ try {
+ x.setRequestHeader("Test-header");
+ } catch (e) {
+ if (e.code == DOMException.SYNTAX_ERR)
+ exceptionThrown = true;
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml
new file mode 100644
index 0000000000..bf31eca4ef
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml
@@ -0,0 +1,57 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+ property string header
+
+ property bool readyState: false
+ property bool openedState: false
+
+ property bool status: false
+ property bool statusText: false
+ property bool responseText: false
+ property bool responseXML: false
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ if (x.readyState == XMLHttpRequest.UNSENT)
+ readyState = true;
+
+ x.open("GET", url);
+
+ x.setRequestHeader(header, "Value");
+
+ if (x.readyState == XMLHttpRequest.OPENED)
+ openedState = true;
+
+ try {
+ var a = x.status;
+ } catch (error) {
+ if (error.code == DOMException.INVALID_STATE_ERR)
+ status = true;
+ }
+ try {
+ var a = x.statusText;
+ } catch (error) {
+ if (error.code == DOMException.INVALID_STATE_ERR)
+ statusText = true;
+ }
+ responseText = (x.responseText == "");
+ responseXML = (x.responseXML == null);
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+
+ x.send()
+ }
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml
new file mode 100644
index 0000000000..c2bbc6ee29
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml
@@ -0,0 +1,31 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+ property bool test: false
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ x.open("GET", url);
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+ }
+
+ x.send();
+
+ try {
+ x.setRequestHeader("Test-header", "value");
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ test = true;
+ }
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_unsent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_unsent.qml
new file mode 100644
index 0000000000..30bc93e129
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_unsent.qml
@@ -0,0 +1,17 @@
+import Qt 4.6
+
+QtObject {
+ property bool test: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ try {
+ x.setRequestHeader("Test-header", "value");
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ test = true;
+ }
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/staticStateValues.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/staticStateValues.qml
new file mode 100644
index 0000000000..ec1c5d8e32
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/staticStateValues.qml
@@ -0,0 +1,24 @@
+import Qt 4.6
+
+QtObject {
+ property int unsent: XMLHttpRequest.UNSENT
+ property int opened: XMLHttpRequest.OPENED
+ property int headers_received: XMLHttpRequest.HEADERS_RECEIVED
+ property int loading: XMLHttpRequest.LOADING
+ property int done: XMLHttpRequest.DONE
+
+ Component.onCompleted: {
+ // Attempt to overwrite and delete values
+ XMLHttpRequest.UNSENT = 9;
+ XMLHttpRequest.OPENED = 9;
+ XMLHttpRequest.HEADERS_RECEIVED = 9;
+ XMLHttpRequest.LOADING = 9;
+ XMLHttpRequest.DONE = 9;
+
+ delete XMLHttpRequest.UNSENT;
+ delete XMLHttpRequest.OPENED;
+ delete XMLHttpRequest.HEADERS_RECEIVED;
+ delete XMLHttpRequest.LOADING;
+ delete XMLHttpRequest.DONE;
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.200.reply b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.200.reply
new file mode 100644
index 0000000000..7ae6951f9b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.200.reply
@@ -0,0 +1,3 @@
+HTTP/1.0 200 OK
+Connection: close
+Content-type: text/html; charset=UTF-8
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.404.reply b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.404.reply
new file mode 100644
index 0000000000..2e29f56d41
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.404.reply
@@ -0,0 +1,3 @@
+HTTP/1.0 404 Document not found
+Connection: close
+Content-type: text/html; charset=UTF-8
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.expect b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.expect
new file mode 100644
index 0000000000..a740c79cf8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.expect
@@ -0,0 +1,7 @@
+GET /testdocument.html HTTP/1.1
+Connection: Keep-Alive
+Accept-Encoding: gzip
+Accept-Language: en-US,*
+User-Agent: Mozilla/5.0
+Host: 127.0.0.1:14445
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml
new file mode 100644
index 0000000000..04202c41c5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml
@@ -0,0 +1,77 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+ property int expectedStatus
+
+ property bool unsentException: false;
+ property bool openedException: false;
+ property bool sentException: false;
+
+ property bool headersReceived: false
+ property bool loading: false
+ property bool done: false
+
+ property bool resetException: false
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ try {
+ var a = x.status;
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ unsentException = true;
+ }
+
+ x.open("GET", url);
+
+ try {
+ var a = x.status;
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ openedException = true;
+ }
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.HEADERS_RECEIVED) {
+ if (x.status == expectedStatus)
+ headersReceived = true;
+ } else if (x.readyState == XMLHttpRequest.LOADING) {
+ if (x.status == expectedStatus)
+ loading = true;
+ } else if (x.readyState == XMLHttpRequest.DONE) {
+ if (x.status == expectedStatus)
+ done = true;
+
+ if (expectedStatus == 404) {
+ dataOK = (x.responseText == "");
+ } else {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+
+ x.open("GET", url);
+
+ try {
+ var a = x.status;
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ resetException = true;
+ }
+
+ }
+ }
+
+ x.send()
+
+ try {
+ var a = x.status;
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ sentException = true;
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml
new file mode 100644
index 0000000000..8becc3b3d7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml
@@ -0,0 +1,77 @@
+import Qt 4.6
+
+QtObject {
+ property string url
+ property string expectedStatus
+
+ property bool unsentException: false;
+ property bool openedException: false;
+ property bool sentException: false;
+
+ property bool headersReceived: false
+ property bool loading: false
+ property bool done: false
+
+ property bool resetException: false
+
+ property bool dataOK: false
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ try {
+ var a = x.statusText;
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ unsentException = true;
+ }
+
+ x.open("GET", url);
+
+ try {
+ var a = x.statusText;
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ openedException = true;
+ }
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.HEADERS_RECEIVED) {
+ if (x.statusText == expectedStatus)
+ headersReceived = true;
+ } else if (x.readyState == XMLHttpRequest.LOADING) {
+ if (x.statusText == expectedStatus)
+ loading = true;
+ } else if (x.readyState == XMLHttpRequest.DONE) {
+ if (x.statusText == expectedStatus)
+ done = true;
+
+ if (expectedStatus != "OK") {
+ dataOK = (x.responseText == "");
+ } else {
+ dataOK = (x.responseText == "QML Rocks!\n");
+ }
+
+ x.open("GET", url);
+
+ try {
+ var a = x.statusText;
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ resetException = true;
+ }
+
+ }
+ }
+
+ x.send()
+
+ try {
+ var a = x.statusText;
+ } catch (e) {
+ if (e.code == DOMException.INVALID_STATE_ERR)
+ sentException = true;
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/testdocument.html b/tests/auto/declarative/qdeclarativexmlhttprequest/data/testdocument.html
new file mode 100644
index 0000000000..8fe0f4b0e2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/testdocument.html
@@ -0,0 +1 @@
+QML Rocks!
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml
new file mode 100644
index 0000000000..4615a07a47
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml
@@ -0,0 +1,131 @@
+import Qt 4.6
+
+QtObject {
+ property bool xmlTest: false
+ property bool dataOK: false
+
+ Script {
+ function checkText(text, whitespacetext)
+ {
+ if (text == null)
+ return;
+
+ if (text.nodeName != "#text")
+ return;
+
+ if (text.nodeValue != "Hello world!")
+ return;
+
+ if (text.nodeType != 3)
+ return;
+
+ if (text.parentNode.nodeName != "item")
+ return;
+
+ if (text.childNodes.length != 0)
+ return;
+
+ if (text.firstChild != null)
+ return;
+
+ if (text.lastChild != null)
+ return;
+
+ if (text.previousSibling != null)
+ return;
+
+ if (text.nextSibling != null)
+ return;
+
+ if (text.attributes != null)
+ return;
+
+ if (text.wholeText != "Hello world!")
+ return;
+
+ if (text.data != "Hello world!")
+ return;
+
+ if (text.length != 12)
+ return;
+
+ if (text.isElementContentWhitespace != false)
+ return;
+
+ if (whitespacetext.nodeName != "#text")
+ return;
+
+ if (whitespacetext.nodeValue != " ")
+ return;
+
+ if (whitespacetext.nodeType != 3)
+ return;
+
+ if (whitespacetext.parentNode.nodeName != "item")
+ return;
+
+ if (whitespacetext.childNodes.length != 0)
+ return;
+
+ if (whitespacetext.firstChild != null)
+ return;
+
+ if (whitespacetext.lastChild != null)
+ return;
+
+ if (whitespacetext.previousSibling != null)
+ return;
+
+ if (whitespacetext.nextSibling != null)
+ return;
+
+ if (whitespacetext.attributes != null)
+ return;
+
+ if (whitespacetext.wholeText != " ")
+ return;
+
+ if (whitespacetext.data != " ")
+ return;
+
+ if (whitespacetext.length != 3)
+ return;
+
+ if (whitespacetext.isElementContentWhitespace != true)
+ return;
+
+ xmlTest = true;
+ }
+
+ function checkXML(document)
+ {
+ checkText(document.documentElement.childNodes[0].childNodes[0],
+ document.documentElement.childNodes[1].childNodes[0]);
+
+ }
+ }
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ x.open("GET", "text.xml");
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+
+ dataOK = true;
+
+ if (x.responseXML != null)
+ checkXML(x.responseXML);
+
+ }
+ }
+
+ x.send()
+ }
+}
+
+
+
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.xml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.xml
new file mode 100644
index 0000000000..e7416888fd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.xml
@@ -0,0 +1 @@
+<root><item>Hello world!</item><item> </item></root>
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml
new file mode 100644
index 0000000000..63165ab5e3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml
@@ -0,0 +1,28 @@
+import Qt 4.6
+
+QtObject {
+ property bool dataOK: false
+
+ property string responseText
+ property string responseXmlRootNodeValue
+
+ Component.onCompleted: {
+ var x = new XMLHttpRequest;
+
+ x.open("GET", "utf16.xml");
+
+ // Test to the end
+ x.onreadystatechange = function() {
+ if (x.readyState == XMLHttpRequest.DONE) {
+
+ responseText = x.responseText
+ if (x.responseXML)
+ responseXmlRootNodeValue = x.responseXML.documentElement.childNodes[0].nodeValue
+
+ dataOK = true;
+ }
+ }
+ x.send()
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.xml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.xml
new file mode 100644
index 0000000000..0fbb126ed8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.xml
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro b/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
new file mode 100644
index 0000000000..7bc92af18a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
@@ -0,0 +1,13 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative network
+macx:CONFIG -= app_bundle
+
+INCLUDEPATH += ../shared/
+HEADERS += ../shared/testhttpserver.h
+
+SOURCES += tst_qdeclarativexmlhttprequest.cpp \
+ ../shared/testhttpserver.cpp
+
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp b/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp
new file mode 100644
index 0000000000..13ed9592e1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp
@@ -0,0 +1,1121 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QDebug>
+#include <QNetworkCookieJar>
+#include "testhttpserver.h"
+
+#define SERVER_PORT 14445
+
+class tst_qdeclarativexmlhttprequest : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativexmlhttprequest() {}
+
+private slots:
+ void initTestCase() {
+ if (QLocale::system().name().replace(QChar::fromAscii('_'),QChar::fromAscii('-')) != QLatin1String("en-US")) {
+ qWarning() << "Test will fail unless LANG is en_US";
+ }
+ }
+
+ void domExceptionCodes();
+ void callbackException();
+ void callbackException_data();
+ void staticStateValues();
+ void instanceStateValues();
+ void constructor();
+ void defaultState();
+ void open();
+ void open_data();
+ void open_invalid_method();
+ void open_sync();
+ void open_arg_count();
+ void setRequestHeader();
+ void setRequestHeader_unsent();
+ void setRequestHeader_illegalName_data();
+ void setRequestHeader_illegalName();
+ void setRequestHeader_sent();
+ void setRequestHeader_args();
+ void send_unsent();
+ void send_alreadySent();
+ void send_ignoreData();
+ void send_withdata();
+ void send_withdata_data();
+ void abort();
+ void abort_unsent();
+ void abort_opened();
+ void getResponseHeader();
+ void getResponseHeader_unsent();
+ void getResponseHeader_sent();
+ void getResponseHeader_args();
+ void getAllResponseHeaders();
+ void getAllResponseHeaders_unsent();
+ void getAllResponseHeaders_sent();
+ void getAllResponseHeaders_args();
+ void status();
+ void status_data();
+ void statusText();
+ void statusText_data();
+ void responseText();
+ void responseText_data();
+ void responseXML_invalid();
+ void invalidMethodUsage();
+ void redirects();
+ void nonUtf8();
+
+ // Attributes
+ void document();
+ void element();
+ void attr();
+ void text();
+ void cdata();
+
+ // Crashes
+ // void outstanding_request_at_shutdown();
+
+ // void network_errors()
+ // void readyState()
+
+private:
+ QDeclarativeEngine engine;
+};
+
+inline QUrl TEST_FILE(const QString &filename)
+{
+ return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename);
+}
+
+// Test that the dom exception codes are correct
+void tst_qdeclarativexmlhttprequest::domExceptionCodes()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("domExceptionCodes.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("index_size_err").toInt(), 1);
+ QCOMPARE(object->property("domstring_size_err").toInt(), 2);
+ QCOMPARE(object->property("hierarchy_request_err").toInt(), 3);
+ QCOMPARE(object->property("wrong_document_err").toInt(), 4);
+ QCOMPARE(object->property("invalid_character_err").toInt(), 5);
+ QCOMPARE(object->property("no_data_allowed_err").toInt(), 6);
+ QCOMPARE(object->property("no_modification_allowed_err").toInt(), 7);
+ QCOMPARE(object->property("not_found_err").toInt(), 8);
+ QCOMPARE(object->property("not_supported_err").toInt(), 9);
+ QCOMPARE(object->property("inuse_attribute_err").toInt(), 10);
+ QCOMPARE(object->property("invalid_state_err").toInt(), 11);
+ QCOMPARE(object->property("syntax_err").toInt(), 12);
+ QCOMPARE(object->property("invalid_modification_err").toInt(), 13);
+ QCOMPARE(object->property("namespace_err").toInt(), 14);
+ QCOMPARE(object->property("invalid_access_err").toInt(), 15);
+ QCOMPARE(object->property("validation_err").toInt(), 16);
+ QCOMPARE(object->property("type_mismatch_err").toInt(), 17);
+
+ delete object;
+}
+
+#define TRY_WAIT(expr) \
+ do { \
+ for (int ii = 0; ii < 6; ++ii) { \
+ if ((expr)) break; \
+ QTest::qWait(50); \
+ } \
+ QVERIFY((expr)); \
+ } while (false)
+
+
+void tst_qdeclarativexmlhttprequest::callbackException_data()
+{
+ QTest::addColumn<QString>("which");
+ QTest::addColumn<int>("line");
+
+ QTest::newRow("on-opened") << "1" << 15;
+ QTest::newRow("on-loading") << "3" << 15;
+ QTest::newRow("on-done") << "4" << 15;
+}
+
+void tst_qdeclarativexmlhttprequest::callbackException()
+{
+ // Test exception reporting for exceptions thrown at various points.
+
+ QFETCH(QString, which);
+ QFETCH(int, line);
+
+ QString expect = TEST_FILE("callbackException.qml").toString() + ":"+QString::number(line)+": Error: Exception from Callback";
+ QTest::ignoreMessage(QtWarningMsg, expect.toLatin1());
+
+ QDeclarativeComponent component(&engine, TEST_FILE("callbackException.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "testdocument.html");
+ object->setProperty("which", which);
+ component.completeCreate();
+
+ TRY_WAIT(object->property("threw").toBool() == true);
+
+ delete object;
+}
+
+// Test that the state value properties on the XMLHttpRequest constructor have the correct values.
+// ### WebKit does not do this, but it seems to fit the standard and QML better
+void tst_qdeclarativexmlhttprequest::staticStateValues()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("staticStateValues.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("unsent").toInt(), 0);
+ QCOMPARE(object->property("opened").toInt(), 1);
+ QCOMPARE(object->property("headers_received").toInt(), 2);
+ QCOMPARE(object->property("loading").toInt(), 3);
+ QCOMPARE(object->property("done").toInt(), 4);
+
+ delete object;
+}
+
+// Test that the state value properties on instances have the correct values.
+void tst_qdeclarativexmlhttprequest::instanceStateValues()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("instanceStateValues.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("unsent").toInt(), 0);
+ QCOMPARE(object->property("opened").toInt(), 1);
+ QCOMPARE(object->property("headers_received").toInt(), 2);
+ QCOMPARE(object->property("loading").toInt(), 3);
+ QCOMPARE(object->property("done").toInt(), 4);
+
+ delete object;
+}
+
+// Test calling constructor
+void tst_qdeclarativexmlhttprequest::constructor()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("constructor.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("calledAsConstructor").toBool(), true);
+ QCOMPARE(object->property("calledAsFunction").toBool(), true);
+
+ delete object;
+}
+
+// Test that all the properties are set correctly before any request is sent
+void tst_qdeclarativexmlhttprequest::defaultState()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("defaultState.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("readState").toInt(), 0);
+ QCOMPARE(object->property("statusIsException").toBool(), true);
+ QCOMPARE(object->property("statusTextIsException").toBool(), true);
+ QCOMPARE(object->property("responseText").toString(), QString());
+ QCOMPARE(object->property("responseXMLIsNull").toBool(), true);
+
+ delete object;
+}
+
+// Test valid XMLHttpRequest.open() calls
+void tst_qdeclarativexmlhttprequest::open()
+{
+ QFETCH(QUrl, qmlFile);
+ QFETCH(QString, url);
+ QFETCH(bool, remote);
+
+ TestHTTPServer *server = 0;
+ if (remote) {
+ server = new TestHTTPServer(SERVER_PORT);
+ QVERIFY(server->isValid());
+ QVERIFY(server->wait(TEST_FILE("open_network.expect"),
+ TEST_FILE("open_network.reply"),
+ TEST_FILE("testdocument.html")));
+ }
+
+ QDeclarativeComponent component(&engine, qmlFile);
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", url);
+ component.completeCreate();
+
+ QCOMPARE(object->property("readyState").toBool(), true);
+ QCOMPARE(object->property("openedState").toBool(), true);
+ QCOMPARE(object->property("status").toBool(), true);
+ QCOMPARE(object->property("statusText").toBool(), true);
+ QCOMPARE(object->property("responseText").toBool(), true);
+ QCOMPARE(object->property("responseXML").toBool(), true);
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ delete server;
+ delete object;
+}
+
+void tst_qdeclarativexmlhttprequest::open_data()
+{
+ QTest::addColumn<QUrl>("qmlFile");
+ QTest::addColumn<QString>("url");
+ QTest::addColumn<bool>("remote");
+
+ QTest::newRow("Relative url)") << TEST_FILE("open.qml") << "testdocument.html" << false;
+ QTest::newRow("Absolute url)") << TEST_FILE("open.qml") << TEST_FILE("testdocument.html").toString() << false;
+ QTest::newRow("Absolute network url)") << TEST_FILE("open.qml") << "http://127.0.0.1:14445/testdocument.html" << true;
+
+ // ### Check that the username/password were sent to the server
+ QTest::newRow("User/pass") << TEST_FILE("open_user.qml") << "http://127.0.0.1:14445/testdocument.html" << true;
+}
+
+// Test that calling XMLHttpRequest.open() with an invalid method raises an exception
+void tst_qdeclarativexmlhttprequest::open_invalid_method()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("open_invalid_method.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("exceptionThrown").toBool(), true);
+
+ delete object;
+}
+
+// Test that calling XMLHttpRequest.open() with sync raises an exception
+void tst_qdeclarativexmlhttprequest::open_sync()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("open_sync.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("exceptionThrown").toBool(), true);
+
+ delete object;
+}
+
+// Calling with incorrect arg count raises an exception
+void tst_qdeclarativexmlhttprequest::open_arg_count()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("open_arg_count.1.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("exceptionThrown").toBool(), true);
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("open_arg_count.2.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("exceptionThrown").toBool(), true);
+
+ delete object;
+ }
+}
+
+// Test valid setRequestHeader() calls
+void tst_qdeclarativexmlhttprequest::setRequestHeader()
+{
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ QVERIFY(server.wait(TEST_FILE("setRequestHeader.expect"),
+ TEST_FILE("setRequestHeader.reply"),
+ TEST_FILE("testdocument.html")));
+
+ QDeclarativeComponent component(&engine, TEST_FILE("setRequestHeader.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
+ component.completeCreate();
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ delete object;
+}
+
+// Test setting headers before open() throws exception
+void tst_qdeclarativexmlhttprequest::setRequestHeader_unsent()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("setRequestHeader_unsent.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toBool(), true);
+
+ delete object;
+}
+
+void tst_qdeclarativexmlhttprequest::setRequestHeader_illegalName_data()
+{
+ QTest::addColumn<QString>("name");
+
+ QTest::newRow("Accept-Charset") << "AccePT-CHArset";
+ QTest::newRow("Accept-Encoding") << "AccEpt-EnCOding";
+ QTest::newRow("Connection") << "ConnECtion";
+ QTest::newRow("Content-Length") << "ContEnt-LenGth";
+ QTest::newRow("Cookie") << "CookIe";
+ QTest::newRow("Cookie2") << "CoOkie2";
+ QTest::newRow("Content-Transfer-Encoding") << "ConteNT-tRANSFER-eNCOding";
+ QTest::newRow("Date") << "DaTE";
+ QTest::newRow("Expect") << "ExPect";
+ QTest::newRow("Host") << "HoST";
+ QTest::newRow("Keep-Alive") << "KEEP-aLive";
+ QTest::newRow("Referer") << "ReferEr";
+ QTest::newRow("TE") << "Te";
+ QTest::newRow("Trailer") << "TraILEr";
+ QTest::newRow("Transfer-Encoding") << "tRANsfer-Encoding";
+ QTest::newRow("Upgrade") << "UpgrADe";
+ QTest::newRow("User-Agent") << "uSEr-Agent";
+ QTest::newRow("Via") << "vIa";
+ QTest::newRow("Proxy-") << "ProXy-";
+ QTest::newRow("Sec-") << "SeC-";
+ QTest::newRow("Proxy-*") << "Proxy-BLAH";
+ QTest::newRow("Sec-*") << "Sec-F";
+}
+
+// Tests that using illegal header names has no effect
+void tst_qdeclarativexmlhttprequest::setRequestHeader_illegalName()
+{
+ QFETCH(QString, name);
+
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ QVERIFY(server.wait(TEST_FILE("open_network.expect"),
+ TEST_FILE("open_network.reply"),
+ TEST_FILE("testdocument.html")));
+
+ QDeclarativeComponent component(&engine, TEST_FILE("setRequestHeader_illegalName.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
+ object->setProperty("header", name);
+ component.completeCreate();
+
+ QCOMPARE(object->property("readyState").toBool(), true);
+ QCOMPARE(object->property("openedState").toBool(), true);
+ QCOMPARE(object->property("status").toBool(), true);
+ QCOMPARE(object->property("statusText").toBool(), true);
+ QCOMPARE(object->property("responseText").toBool(), true);
+ QCOMPARE(object->property("responseXML").toBool(), true);
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ delete object;
+}
+
+// Test that attempting to set a header after a request is sent throws an exception
+void tst_qdeclarativexmlhttprequest::setRequestHeader_sent()
+{
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ QVERIFY(server.wait(TEST_FILE("open_network.expect"),
+ TEST_FILE("open_network.reply"),
+ TEST_FILE("testdocument.html")));
+
+ QDeclarativeComponent component(&engine, TEST_FILE("setRequestHeader_sent.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
+ component.completeCreate();
+
+ QCOMPARE(object->property("test").toBool(), true);
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ delete object;
+}
+
+// Invalid arg count throws exception
+void tst_qdeclarativexmlhttprequest::setRequestHeader_args()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("setRequestHeader_args.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("exceptionThrown").toBool(), true);
+
+ delete object;
+}
+
+// Test that calling send() in UNSENT state throws an exception
+void tst_qdeclarativexmlhttprequest::send_unsent()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("send_unsent.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toBool(), true);
+
+ delete object;
+}
+
+// Test attempting to resend a sent request throws an exception
+void tst_qdeclarativexmlhttprequest::send_alreadySent()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("send_alreadySent.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toBool(), true);
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ delete object;
+}
+
+// Test that send for a GET or HEAD ignores data
+void tst_qdeclarativexmlhttprequest::send_ignoreData()
+{
+ {
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ QVERIFY(server.wait(TEST_FILE("send_ignoreData_GET.expect"),
+ TEST_FILE("send_ignoreData.reply"),
+ TEST_FILE("testdocument.html")));
+
+ QDeclarativeComponent component(&engine, TEST_FILE("send_ignoreData.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("reqType", "GET");
+ object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
+ component.completeCreate();
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ delete object;
+ }
+
+ {
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ QVERIFY(server.wait(TEST_FILE("send_ignoreData_PUT.expect"),
+ TEST_FILE("send_ignoreData.reply"),
+ TEST_FILE("testdocument.html")));
+
+ QDeclarativeComponent component(&engine, TEST_FILE("send_ignoreData.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("reqType", "HEAD");
+ object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
+ component.completeCreate();
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ delete object;
+ }
+}
+
+// Test that send()'ing data works
+void tst_qdeclarativexmlhttprequest::send_withdata()
+{
+ QFETCH(QString, file_expected);
+ QFETCH(QString, file_qml);
+
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ QVERIFY(server.wait(TEST_FILE(file_expected),
+ TEST_FILE("send_data.reply"),
+ TEST_FILE("testdocument.html")));
+
+ QDeclarativeComponent component(&engine, TEST_FILE(file_qml));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
+ component.completeCreate();
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ delete object;
+}
+
+void tst_qdeclarativexmlhttprequest::send_withdata_data()
+{
+ QTest::addColumn<QString>("file_expected");
+ QTest::addColumn<QString>("file_qml");
+
+ QTest::newRow("No content-type") << "send_data.1.expect" << "send_data.1.qml";
+ QTest::newRow("Correct content-type") << "send_data.1.expect" << "send_data.2.qml";
+ QTest::newRow("Incorrect content-type") << "send_data.1.expect" << "send_data.3.qml";
+ QTest::newRow("Correct content-type - out of order") << "send_data.4.expect" << "send_data.4.qml";
+ QTest::newRow("Incorrect content-type - out of order") << "send_data.4.expect" << "send_data.5.qml";
+ QTest::newRow("PUT") << "send_data.6.expect" << "send_data.6.qml";
+ QTest::newRow("Correct content-type - no charset") << "send_data.1.expect" << "send_data.7.qml";
+}
+
+// Test abort() has no effect in unsent state
+void tst_qdeclarativexmlhttprequest::abort_unsent()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("abort_unsent.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "testdocument.html");
+ component.completeCreate();
+
+ QCOMPARE(object->property("readyState").toBool(), true);
+ QCOMPARE(object->property("openedState").toBool(), true);
+ QCOMPARE(object->property("status").toBool(), true);
+ QCOMPARE(object->property("statusText").toBool(), true);
+ QCOMPARE(object->property("responseText").toBool(), true);
+ QCOMPARE(object->property("responseXML").toBool(), true);
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ delete object;
+}
+
+// Test abort() cancels an open (but unsent) request
+void tst_qdeclarativexmlhttprequest::abort_opened()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("abort_opened.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "testdocument.html");
+ component.completeCreate();
+
+ QCOMPARE(object->property("readyState").toBool(), true);
+ QCOMPARE(object->property("openedState").toBool(), true);
+ QCOMPARE(object->property("status").toBool(), true);
+ QCOMPARE(object->property("statusText").toBool(), true);
+ QCOMPARE(object->property("responseText").toBool(), true);
+ QCOMPARE(object->property("responseXML").toBool(), true);
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ delete object;
+}
+
+// Test abort() aborts in progress send
+void tst_qdeclarativexmlhttprequest::abort()
+{
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ QVERIFY(server.wait(TEST_FILE("abort.expect"),
+ TEST_FILE("abort.reply"),
+ TEST_FILE("testdocument.html")));
+
+ QDeclarativeComponent component(&engine, TEST_FILE("abort.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("urlDummy", "http://127.0.0.1:14449/testdocument.html");
+ object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
+ component.completeCreate();
+
+ QCOMPARE(object->property("seenDone").toBool(), true);
+ QCOMPARE(object->property("didNotSeeUnsent").toBool(), true);
+ QCOMPARE(object->property("endStateUnsent").toBool(), true);
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ delete object;
+}
+
+void tst_qdeclarativexmlhttprequest::getResponseHeader()
+{
+ QDeclarativeEngine engine; // Avoid cookie contamination
+
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ QVERIFY(server.wait(TEST_FILE("getResponseHeader.expect"),
+ TEST_FILE("getResponseHeader.reply"),
+ TEST_FILE("testdocument.html")));
+
+
+ QDeclarativeComponent component(&engine, TEST_FILE("getResponseHeader.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
+ component.completeCreate();
+
+ QCOMPARE(object->property("unsentException").toBool(), true);
+ QCOMPARE(object->property("openedException").toBool(), true);
+ QCOMPARE(object->property("readyState").toBool(), true);
+ QCOMPARE(object->property("openedState").toBool(), true);
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ QCOMPARE(object->property("headersReceivedState").toBool(), true);
+ QCOMPARE(object->property("headersReceivedNullHeader").toBool(), true);
+ QCOMPARE(object->property("headersReceivedValidHeader").toBool(), true);
+ QCOMPARE(object->property("headersReceivedMultiValidHeader").toBool(), true);
+ QCOMPARE(object->property("headersReceivedCookieHeader").toBool(), true);
+
+ QCOMPARE(object->property("doneState").toBool(), true);
+ QCOMPARE(object->property("doneNullHeader").toBool(), true);
+ QCOMPARE(object->property("doneValidHeader").toBool(), true);
+ QCOMPARE(object->property("doneMultiValidHeader").toBool(), true);
+ QCOMPARE(object->property("doneCookieHeader").toBool(), true);
+
+ delete object;
+}
+
+// Test getResponseHeader throws an exception in an invalid state
+void tst_qdeclarativexmlhttprequest::getResponseHeader_unsent()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("getResponseHeader_unsent.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toBool(), true);
+
+ delete object;
+}
+
+// Test getResponseHeader throws an exception in an invalid state
+void tst_qdeclarativexmlhttprequest::getResponseHeader_sent()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("getResponseHeader_sent.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toBool(), true);
+
+ delete object;
+}
+
+// Invalid arg count throws exception
+void tst_qdeclarativexmlhttprequest::getResponseHeader_args()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("getResponseHeader_args.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ TRY_WAIT(object->property("exceptionThrown").toBool() == true);
+
+ delete object;
+}
+
+void tst_qdeclarativexmlhttprequest::getAllResponseHeaders()
+{
+ QDeclarativeEngine engine; // Avoid cookie contamination
+
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ QVERIFY(server.wait(TEST_FILE("getResponseHeader.expect"),
+ TEST_FILE("getResponseHeader.reply"),
+ TEST_FILE("testdocument.html")));
+
+ QDeclarativeComponent component(&engine, TEST_FILE("getAllResponseHeaders.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
+ component.completeCreate();
+
+ QCOMPARE(object->property("unsentException").toBool(), true);
+ QCOMPARE(object->property("openedException").toBool(), true);
+ QCOMPARE(object->property("readyState").toBool(), true);
+ QCOMPARE(object->property("openedState").toBool(), true);
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ QCOMPARE(object->property("headersReceivedState").toBool(), true);
+ QCOMPARE(object->property("headersReceivedHeader").toBool(), true);
+
+ QCOMPARE(object->property("doneState").toBool(), true);
+ QCOMPARE(object->property("doneHeader").toBool(), true);
+
+ delete object;
+}
+
+// Test getAllResponseHeaders throws an exception in an invalid state
+void tst_qdeclarativexmlhttprequest::getAllResponseHeaders_unsent()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("getAllResponseHeaders_unsent.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toBool(), true);
+
+ delete object;
+}
+
+// Test getAllResponseHeaders throws an exception in an invalid state
+void tst_qdeclarativexmlhttprequest::getAllResponseHeaders_sent()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("getAllResponseHeaders_sent.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toBool(), true);
+
+ delete object;
+}
+
+// Invalid arg count throws exception
+void tst_qdeclarativexmlhttprequest::getAllResponseHeaders_args()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("getAllResponseHeaders_args.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ TRY_WAIT(object->property("exceptionThrown").toBool() == true);
+
+ delete object;
+}
+
+void tst_qdeclarativexmlhttprequest::status()
+{
+ QFETCH(QUrl, replyUrl);
+ QFETCH(int, status);
+
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ QVERIFY(server.wait(TEST_FILE("status.expect"),
+ replyUrl,
+ TEST_FILE("testdocument.html")));
+
+ QDeclarativeComponent component(&engine, TEST_FILE("status.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
+ object->setProperty("expectedStatus", status);
+ component.completeCreate();
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ QCOMPARE(object->property("unsentException").toBool(), true);
+ QCOMPARE(object->property("openedException").toBool(), true);
+ QCOMPARE(object->property("sentException").toBool(), true);
+ QCOMPARE(object->property("headersReceived").toBool(), true);
+ QCOMPARE(object->property("loading").toBool(), true);
+ QCOMPARE(object->property("done").toBool(), true);
+ QCOMPARE(object->property("resetException").toBool(), true);
+
+ delete object;
+}
+
+void tst_qdeclarativexmlhttprequest::status_data()
+{
+ QTest::addColumn<QUrl>("replyUrl");
+ QTest::addColumn<int>("status");
+
+ QTest::newRow("OK") << TEST_FILE("status.200.reply") << 200;
+ QTest::newRow("Not Found") << TEST_FILE("status.404.reply") << 404;
+}
+
+void tst_qdeclarativexmlhttprequest::statusText()
+{
+ QFETCH(QUrl, replyUrl);
+ QFETCH(QString, statusText);
+
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ QVERIFY(server.wait(TEST_FILE("status.expect"),
+ replyUrl,
+ TEST_FILE("testdocument.html")));
+
+ QDeclarativeComponent component(&engine, TEST_FILE("statusText.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
+ object->setProperty("expectedStatus", statusText);
+ component.completeCreate();
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ QCOMPARE(object->property("unsentException").toBool(), true);
+ QCOMPARE(object->property("openedException").toBool(), true);
+ QCOMPARE(object->property("sentException").toBool(), true);
+ QCOMPARE(object->property("headersReceived").toBool(), true);
+ QCOMPARE(object->property("loading").toBool(), true);
+ QCOMPARE(object->property("done").toBool(), true);
+ QCOMPARE(object->property("resetException").toBool(), true);
+
+ delete object;
+}
+
+void tst_qdeclarativexmlhttprequest::statusText_data()
+{
+ QTest::addColumn<QUrl>("replyUrl");
+ QTest::addColumn<QString>("statusText");
+
+ QTest::newRow("OK") << TEST_FILE("status.200.reply") << "OK";
+ QTest::newRow("Not Found") << TEST_FILE("status.404.reply") << "Document not found";
+}
+
+void tst_qdeclarativexmlhttprequest::responseText()
+{
+ QFETCH(QUrl, replyUrl);
+ QFETCH(QUrl, bodyUrl);
+ QFETCH(QString, responseText);
+
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ QVERIFY(server.wait(TEST_FILE("status.expect"),
+ replyUrl,
+ bodyUrl));
+
+ QDeclarativeComponent component(&engine, TEST_FILE("responseText.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "http://127.0.0.1:14445/testdocument.html");
+ object->setProperty("expectedText", responseText);
+ component.completeCreate();
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ QCOMPARE(object->property("unsent").toBool(), true);
+ QCOMPARE(object->property("opened").toBool(), true);
+ QCOMPARE(object->property("sent").toBool(), true);
+ QCOMPARE(object->property("headersReceived").toBool(), true);
+ QCOMPARE(object->property("loading").toBool(), true);
+ QCOMPARE(object->property("done").toBool(), true);
+ QCOMPARE(object->property("reset").toBool(), true);
+
+ delete object;
+}
+
+void tst_qdeclarativexmlhttprequest::responseText_data()
+{
+ QTest::addColumn<QUrl>("replyUrl");
+ QTest::addColumn<QUrl>("bodyUrl");
+ QTest::addColumn<QString>("responseText");
+
+ QTest::newRow("OK") << TEST_FILE("status.200.reply") << TEST_FILE("testdocument.html") << "QML Rocks!\n";
+ QTest::newRow("empty body") << TEST_FILE("status.200.reply") << QUrl() << "";
+ QTest::newRow("Not Found") << TEST_FILE("status.404.reply") << TEST_FILE("testdocument.html") << "";
+}
+
+void tst_qdeclarativexmlhttprequest::nonUtf8()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("utf16.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QString uc;
+ uc.resize(3);
+ uc[0] = QChar(0x10e3);
+ uc[1] = QChar(' ');
+ uc[2] = QChar(0x03a3);
+ QString xml = "<?xml version=\"1.0\" encoding=\"UTF-16\" standalone='yes'?>\n<root>\n" + uc + "\n</root>\n";
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ QString responseText = object->property("responseText").toString();
+ QCOMPARE(responseText, xml);
+
+ QString responseXmlText = object->property("responseXmlRootNodeValue").toString();
+ QCOMPARE(responseXmlText, '\n' + uc + '\n');
+
+ delete object;
+}
+
+// Test that calling hte XMLHttpRequest methods on a non-XMLHttpRequest object
+// throws an exception
+void tst_qdeclarativexmlhttprequest::invalidMethodUsage()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("invalidMethodUsage.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("onreadystatechange").toBool(), true);
+ QCOMPARE(object->property("readyState").toBool(), true);
+ QCOMPARE(object->property("status").toBool(), true);
+ QCOMPARE(object->property("statusText").toBool(), true);
+ QCOMPARE(object->property("responseText").toBool(), true);
+ QCOMPARE(object->property("responseXML").toBool(), true);
+
+ QCOMPARE(object->property("open").toBool(), true);
+ QCOMPARE(object->property("setRequestHeader").toBool(), true);
+ QCOMPARE(object->property("send").toBool(), true);
+ QCOMPARE(object->property("abort").toBool(), true);
+ QCOMPARE(object->property("getResponseHeader").toBool(), true);
+ QCOMPARE(object->property("getAllResponseHeaders").toBool(), true);
+
+ delete object;
+}
+
+// Test that XMLHttpRequest transparently redirects
+void tst_qdeclarativexmlhttprequest::redirects()
+{
+ {
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ server.addRedirect("redirect.html", "http://127.0.0.1:14445/redirecttarget.html");
+ server.serveDirectory(SRCDIR "/data");
+
+ QDeclarativeComponent component(&engine, TEST_FILE("redirects.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "http://127.0.0.1:14445/redirect.html");
+ object->setProperty("expectedText", "");
+ component.completeCreate();
+
+ TRY_WAIT(object->property("done").toBool() == true);
+ QCOMPARE(object->property("dataOK").toBool(), true);
+
+ delete object;
+ }
+
+ {
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ server.addRedirect("redirect.html", "http://127.0.0.1:14445/redirectmissing.html");
+ server.serveDirectory(SRCDIR "/data");
+
+ QDeclarativeComponent component(&engine, TEST_FILE("redirectError.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "http://127.0.0.1:14445/redirect.html");
+ object->setProperty("expectedText", "");
+ component.completeCreate();
+
+ TRY_WAIT(object->property("done").toBool() == true);
+ QCOMPARE(object->property("dataOK").toBool(), true);
+
+ delete object;
+ }
+
+ {
+ TestHTTPServer server(SERVER_PORT);
+ QVERIFY(server.isValid());
+ server.addRedirect("redirect.html", "http://127.0.0.1:14445/redirect.html");
+ server.serveDirectory(SRCDIR "/data");
+
+ QDeclarativeComponent component(&engine, TEST_FILE("redirectRecur.qml"));
+ QObject *object = component.beginCreate(engine.rootContext());
+ QVERIFY(object != 0);
+ object->setProperty("url", "http://127.0.0.1:14445/redirect.html");
+ object->setProperty("expectedText", "");
+ component.completeCreate();
+
+ for (int ii = 0; ii < 60; ++ii) {
+ if (object->property("done").toBool()) break;
+ QTest::qWait(50);
+ }
+ QVERIFY(object->property("done").toBool() == true);
+
+ QCOMPARE(object->property("dataOK").toBool(), true);
+
+ delete object;
+ }
+}
+
+void tst_qdeclarativexmlhttprequest::responseXML_invalid()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("responseXML_invalid.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ QCOMPARE(object->property("xmlNull").toBool(), true);
+
+ delete object;
+}
+
+// Test the Document DOM element
+void tst_qdeclarativexmlhttprequest::document()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("document.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ QCOMPARE(object->property("xmlTest").toBool(), true);
+
+ delete object;
+}
+
+// Test the Element DOM element
+void tst_qdeclarativexmlhttprequest::element()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("element.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ QCOMPARE(object->property("xmlTest").toBool(), true);
+
+ delete object;
+}
+
+// Test the Attr DOM element
+void tst_qdeclarativexmlhttprequest::attr()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("attr.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ QCOMPARE(object->property("xmlTest").toBool(), true);
+
+ delete object;
+}
+
+// Test the Text DOM element
+void tst_qdeclarativexmlhttprequest::text()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("text.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ QCOMPARE(object->property("xmlTest").toBool(), true);
+
+ delete object;
+}
+
+// Test the CDataSection DOM element
+void tst_qdeclarativexmlhttprequest::cdata()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("cdata.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ TRY_WAIT(object->property("dataOK").toBool() == true);
+
+ QCOMPARE(object->property("xmlTest").toBool(), true);
+
+ delete object;
+}
+
+QTEST_MAIN(tst_qdeclarativexmlhttprequest)
+
+#include "tst_qdeclarativexmlhttprequest.moc"
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/model.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/model.qml
new file mode 100644
index 0000000000..2cbb0276ab
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/model.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+XmlListModel {
+ source: "model.xml"
+ query: "/Pets/Pet"
+ XmlRole { name: "name"; query: "name/string()" }
+ XmlRole { name: "type"; query: "type/string()" }
+ XmlRole { name: "age"; query: "age/number()" }
+ XmlRole { name: "size"; query: "size/string()" }
+}
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/model.xml b/tests/auto/declarative/qdeclarativexmllistmodel/data/model.xml
new file mode 100644
index 0000000000..40cd6d0432
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/model.xml
@@ -0,0 +1,54 @@
+<Pets>
+ <Pet>
+ <name>Polly</name>
+ <type>Parrot</type>
+ <age>12</age>
+ <size>Small</size>
+ </Pet>
+ <Pet>
+ <name>Penny</name>
+ <type>Turtle</type>
+ <age>4</age>
+ <size>Small</size>
+ </Pet>
+ <Pet>
+ <name>Warren</name>
+ <type>Rabbit</type>
+ <age>2</age>
+ <size>Small</size>
+ </Pet>
+ <Pet>
+ <name>Spot</name>
+ <type>Dog</type>
+ <age>9</age>
+ <size>Medium</size>
+ </Pet>
+ <Pet>
+ <name>Whiskers</name>
+ <type>Cat</type>
+ <age>2</age>
+ <size>Medium</size>
+ </Pet>
+ <Pet>
+ <name>Joey</name>
+ <type>Kangaroo</type>
+ <age>1</age>
+ </Pet>
+ <Pet>
+ <name>Kimba</name>
+ <type>Bunny</type>
+ <age>65</age>
+ <size>Large</size>
+ </Pet>
+ <Pet>
+ <name>Rover</name>
+ <type>Dog</type>
+ <size>Large</size>
+ </Pet>
+ <Pet>
+ <name>Tiny</name>
+ <type>Elephant</type>
+ <age>15</age>
+ <size>Large</size>
+ </Pet>
+</Pets>
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml
new file mode 100644
index 0000000000..140e0ada80
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+
+XmlListModel {
+ source: "model.xml"
+ query: "/Pets/Pet"
+ XmlRole { name: "name"; query: "name/string()" }
+ XmlRole { name: "type"; query: "type/string()" }
+ XmlRole { name: "age"; query: "age/number()" }
+ XmlRole { name: "size"; query: "size/string()" }
+ XmlRole { name: "tricks"; query: "tricks/string()" }
+}
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/propertychanges.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/propertychanges.qml
new file mode 100644
index 0000000000..737ec81258
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/propertychanges.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+XmlListModel {
+ source: "model.xml"
+ query: "/Pets/Pet"
+ XmlRole { objectName: "role"; name: "name"; query: "name/string()" }
+ XmlRole { name: "type"; query: "type/string()" }
+ XmlRole { name: "age"; query: "age/number()" }
+ XmlRole { name: "size"; query: "size/string()" }
+}
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/recipes.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/recipes.qml
new file mode 100644
index 0000000000..13dea919f3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/recipes.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+XmlListModel {
+ source: "recipes.xml"
+ query: "/recipes/recipe"
+ XmlRole { name: "title"; query: "@title/string()" }
+ XmlRole { name: "picture"; query: "picture/string()" }
+ XmlRole { name: "ingredients"; query: "ingredients/string()" }
+ XmlRole { name: "preparation"; query: "method/string()" }
+}
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/recipes.xml b/tests/auto/declarative/qdeclarativexmllistmodel/data/recipes.xml
new file mode 100644
index 0000000000..d71de60710
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/recipes.xml
@@ -0,0 +1,90 @@
+<recipes>
+ <recipe title="Pancakes">
+ <picture>content/pics/pancakes.jpg</picture>
+ <ingredients><![CDATA[<html>
+ <ul>
+ <li> 1 cup (150g) self-raising flour
+ <li> 1 tbs caster sugar
+ <li> 3/4 cup (185ml) milk
+ <li> 1 egg
+ </ul>
+ </html>
+ ]]></ingredients>
+ <method><![CDATA[<html>
+ <ol>
+ <li> Sift flour and sugar together into a bowl. Add a pinch of salt.
+ <li> Beat milk and egg together, then add to dry ingredients. Beat until smooth.
+ <li> Pour mixture into a pan on medium heat and cook until bubbles appear on the surface.
+ <li> Turn over and cook other side until golden.
+ </ol>
+ </html>
+ ]]></method>
+ </recipe>
+ <recipe title="Fruit Salad">
+ <picture>content/pics/fruit-salad.jpg</picture>
+ <ingredients><![CDATA[* Seasonal Fruit]]></ingredients>
+ <method><![CDATA[* Chop fruit and place in a bowl.]]></method>
+ </recipe>
+ <recipe title="Vegetable Soup">
+ <picture>content/pics/vegetable-soup.jpg</picture>
+ <ingredients><![CDATA[<html>
+ <ul>
+ <li> 1 onion
+ <li> 1 turnip
+ <li> 1 potato
+ <li> 1 carrot
+ <li> 1 head of celery
+ <li> 1 1/2 litres of water
+ </ul>
+ </html>
+ ]]></ingredients>
+ <method><![CDATA[<html>
+ <ol>
+ <li> Chop vegetables.
+ <li> Boil in water until vegetables soften.
+ <li> Season with salt and pepper to taste.
+ </ol>
+ </html>
+ ]]></method>
+ </recipe>
+ <recipe title="Hamburger">
+ <picture>content/pics/hamburger.jpg</picture>
+ <ingredients><![CDATA[<html>
+ <ul>
+ <li> 500g minced beef
+ <li> Seasoning
+ <li> lettuce, tomato, onion, cheese
+ <li> 1 hamburger bun for each burger
+ </ul>
+ </html>
+ ]]></ingredients>
+ <method><![CDATA[<html>
+ <ol>
+ <li> Mix the beef, together with seasoning, in a food processor.
+ <li> Shape the beef into burgers.
+ <li> Grill the burgers for about 5 mins on each side (until cooked through)
+ <li> Serve each burger on a bun with ketchup, cheese, lettuce, tomato and onion.
+ </ol>
+ </html>
+ ]]></method>
+ </recipe>
+ <recipe title="Lemonade">
+ <picture>content/pics/lemonade.jpg</picture>
+ <ingredients><![CDATA[<html>
+ <ul>
+ <li> 1 cup Lemon Juice
+ <li> 1 cup Sugar
+ <li> 6 Cups of Water (2 cups warm water, 4 cups cold water)
+ </ul>
+ </html>
+ ]]></ingredients>
+ <method><![CDATA[<html>
+ <ol>
+ <li> Pour 2 cups of warm water into a pitcher and stir in sugar until it dissolves.
+ <li> Pour in lemon juice, stir again, and add 4 cups of cold water.
+ <li> Chill or serve over ice cubes.
+ </ol>
+ </html>
+ ]]></method>
+ </recipe>
+</recipes>
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/roleErrors.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/roleErrors.qml
new file mode 100644
index 0000000000..26c533fd45
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/roleErrors.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+XmlListModel {
+ source: "model.xml"
+ query: "/Pets/Pet"
+ XmlRole { name: "name"; query: "/name/string()" } //starts with '/'
+ XmlRole { name: "type"; query: "type" } //no type
+ XmlRole { name: "age"; query: "age/" } //ends with '/'
+ XmlRole { name: "size"; query: "size/number()" } //wrong type
+}
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/roleKeys.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/roleKeys.qml
new file mode 100644
index 0000000000..b90e57ef55
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/roleKeys.qml
@@ -0,0 +1,13 @@
+import Qt 4.6
+
+XmlListModel {
+ query: "/data/item"
+ XmlRole { id: nameRole; name: "name"; query: "name/string()"; isKey: true }
+ XmlRole { name: "age"; query: "age/number()"; isKey: true }
+ XmlRole { name: "sport"; query: "sport/string()" }
+
+ function disableNameKey() {
+ nameRole.isKey = false;
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/unique.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/unique.qml
new file mode 100644
index 0000000000..ed0f293395
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/unique.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+XmlListModel {
+ source: "model.xml"
+ query: "/Pets/Pet"
+ XmlRole { name: "name"; query: "name/string()" }
+ XmlRole { name: "name"; query: "type/string()" }
+}
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
new file mode 100644
index 0000000000..88832dc895
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
@@ -0,0 +1,11 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+contains(QT_CONFIG,xmlpatterns) {
+ QT += xmlpatterns
+ DEFINES += QTEST_XMLPATTERNS
+}
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativexmllistmodel.cpp
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
new file mode 100644
index 0000000000..0e5e1b0efc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
@@ -0,0 +1,579 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QtTest/qsignalspy.h>
+#include <QtCore/qtimer.h>
+
+#ifdef QTEST_XMLPATTERNS
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativexmllistmodel_p.h>
+#include "../../../shared/util.h"
+
+typedef QPair<int, int> QDeclarativeXmlListRange;
+typedef QList<QVariantList> QDeclarativeXmlModelData;
+
+Q_DECLARE_METATYPE(QList<QDeclarativeXmlListRange>)
+Q_DECLARE_METATYPE(QDeclarativeXmlModelData)
+
+class tst_qdeclarativexmllistmodel : public QObject
+
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativexmllistmodel() {}
+
+private slots:
+ void buildModel();
+ void missingFields();
+ void cdata();
+ void attributes();
+ void roles();
+ void roleErrors();
+ void uniqueRoleNames();
+ void reload();
+ void useKeys();
+ void useKeys_data();
+ void noKeysValueChanges();
+ void keysChanged();
+ void propertyChanges();
+
+private:
+ QString makeItemXmlAndData(const QString &data, QDeclarativeXmlModelData *modelData = 0) const
+ {
+ if (modelData)
+ modelData->clear();
+ QString xml;
+
+ if (!data.isEmpty()) {
+ QStringList items = data.split(";");
+ foreach(const QString &item, items) {
+ QVariantList variants;
+ xml += QLatin1String("<item>");
+ QStringList fields = item.split(",");
+ foreach(const QString &field, fields) {
+ QStringList values = field.split("=");
+ Q_ASSERT(values.count() == 2);
+ xml += QString("<%1>%2</%1>").arg(values[0], values[1]);
+ if (!modelData)
+ continue;
+ bool isNum = false;
+ int number = values[1].toInt(&isNum);
+ if (isNum)
+ variants << number;
+ else
+ variants << values[1];
+ }
+ xml += QLatin1String("</item>");
+ if (modelData)
+ modelData->append(variants);
+ }
+ }
+
+ QString decl = "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>";
+ return decl + QLatin1String("<data>") + xml + QLatin1String("</data>");
+ }
+
+ QDeclarativeEngine engine;
+};
+
+void tst_qdeclarativexmllistmodel::buildModel()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/model.qml"));
+ QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create());
+ QVERIFY(model != 0);
+ QTRY_COMPARE(model->count(), 9);
+
+ QList<int> roles;
+ roles << Qt::UserRole << Qt::UserRole + 1 << Qt::UserRole + 2 << Qt::UserRole + 3;
+ QHash<int, QVariant> data = model->data(3, roles);
+ QVERIFY(data.count() == 4);
+ QCOMPARE(data.value(Qt::UserRole).toString(), QLatin1String("Spot"));
+ QCOMPARE(data.value(Qt::UserRole+1).toString(), QLatin1String("Dog"));
+ QCOMPARE(data.value(Qt::UserRole+2).toInt(), 9);
+ QCOMPARE(data.value(Qt::UserRole+3).toString(), QLatin1String("Medium"));
+
+ delete model;
+}
+
+void tst_qdeclarativexmllistmodel::missingFields()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/model2.qml"));
+ QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create());
+ QVERIFY(model != 0);
+ QTRY_COMPARE(model->count(), 9);
+
+ QList<int> roles;
+ roles << Qt::UserRole << Qt::UserRole + 1 << Qt::UserRole + 2 << Qt::UserRole + 3 << Qt::UserRole + 4;
+ QHash<int, QVariant> data = model->data(5, roles);
+ QVERIFY(data.count() == 5);
+ QCOMPARE(data.value(Qt::UserRole+3).toString(), QLatin1String(""));
+ QCOMPARE(data.value(Qt::UserRole+4).toString(), QLatin1String(""));
+
+ data = model->data(7, roles);
+ QVERIFY(data.count() == 5);
+ QCOMPARE(data.value(Qt::UserRole+2).toString(), QLatin1String(""));
+
+ delete model;
+}
+
+void tst_qdeclarativexmllistmodel::cdata()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/recipes.qml"));
+ QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create());
+ QVERIFY(model != 0);
+ QTRY_COMPARE(model->count(), 5);
+
+ QList<int> roles;
+ roles << Qt::UserRole + 2;
+ QHash<int, QVariant> data = model->data(2, roles);
+ QVERIFY(data.count() == 1);
+ QVERIFY(data.value(Qt::UserRole+2).toString().startsWith(QLatin1String("<html>")));
+
+ delete model;
+}
+
+void tst_qdeclarativexmllistmodel::attributes()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/recipes.qml"));
+ QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create());
+ QVERIFY(model != 0);
+ QTRY_COMPARE(model->count(), 5);
+
+ QList<int> roles;
+ roles << Qt::UserRole;
+ QHash<int, QVariant> data = model->data(2, roles);
+ QVERIFY(data.count() == 1);
+ QCOMPARE(data.value(Qt::UserRole).toString(), QLatin1String("Vegetable Soup"));
+
+ delete model;
+}
+
+void tst_qdeclarativexmllistmodel::roles()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/model.qml"));
+ QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create());
+ QVERIFY(model != 0);
+ QTRY_COMPARE(model->count(), 9);
+
+ QList<int> roles = model->roles();
+ QCOMPARE(roles.count(), 4);
+ QCOMPARE(model->toString(roles.at(0)), QLatin1String("name"));
+ QCOMPARE(model->toString(roles.at(1)), QLatin1String("type"));
+ QCOMPARE(model->toString(roles.at(2)), QLatin1String("age"));
+ QCOMPARE(model->toString(roles.at(3)), QLatin1String("size"));
+
+ delete model;
+}
+
+void tst_qdeclarativexmllistmodel::roleErrors()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/roleErrors.qml"));
+ QTest::ignoreMessage(QtWarningMsg, QString("QML XmlRole (" + QUrl::fromLocalFile(SRCDIR "/data/roleErrors.qml").toString() + ":6:5) An XmlRole query must not start with '/'").toUtf8().constData());
+ //### make sure we receive all expected warning messages.
+ QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create());
+ QVERIFY(model != 0);
+ QTRY_COMPARE(model->count(), 9);
+
+ QList<int> roles;
+ roles << Qt::UserRole << Qt::UserRole + 1 << Qt::UserRole + 2 << Qt::UserRole + 3;
+ QHash<int, QVariant> data = model->data(3, roles);
+ QVERIFY(data.count() == 4);
+
+ //### should any of these return valid values?
+ QCOMPARE(data.value(Qt::UserRole), QVariant());
+ QCOMPARE(data.value(Qt::UserRole+1), QVariant());
+ QCOMPARE(data.value(Qt::UserRole+2), QVariant());
+
+ QEXPECT_FAIL("", "QT-2456", Continue);
+ QCOMPARE(data.value(Qt::UserRole+3), QVariant());
+
+ delete model;
+}
+
+void tst_qdeclarativexmllistmodel::uniqueRoleNames()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/unique.qml"));
+ QTest::ignoreMessage(QtWarningMsg, QString("QML XmlRole (" + QUrl::fromLocalFile(SRCDIR "/data/unique.qml").toString() + ":7:5) \"name\" duplicates a previous role name and will be disabled.").toUtf8().constData());
+ QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create());
+ QVERIFY(model != 0);
+ QTRY_COMPARE(model->count(), 9);
+
+ QList<int> roles = model->roles();
+ QCOMPARE(roles.count(), 1);
+
+ delete model;
+}
+
+void tst_qdeclarativexmllistmodel::reload()
+{
+ // If no keys are used, the model should be rebuilt from scratch when
+ // reload() is called.
+
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/model.qml"));
+ QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create());
+ QVERIFY(model != 0);
+ QTRY_COMPARE(model->count(), 9);
+
+ QSignalSpy spyInsert(model, SIGNAL(itemsInserted(int,int)));
+ QSignalSpy spyRemove(model, SIGNAL(itemsRemoved(int,int)));
+ QSignalSpy spyCount(model, SIGNAL(countChanged()));
+
+ model->reload();
+ QTRY_COMPARE(spyCount.count(), 1);
+ QTRY_COMPARE(spyInsert.count(), 1);
+ QTRY_COMPARE(spyRemove.count(), 1);
+
+ QCOMPARE(spyInsert[0][0].toInt(), 0);
+ QCOMPARE(spyInsert[0][1].toInt(), 9);
+
+ QCOMPARE(spyRemove[0][0].toInt(), 0);
+ QCOMPARE(spyRemove[0][1].toInt(), 9);
+
+ delete model;
+}
+
+void tst_qdeclarativexmllistmodel::useKeys()
+{
+ // If using incremental updates through keys, the model should only
+ // insert & remove some of the items, instead of throwing everything
+ // away and causing the view to repaint the whole view.
+
+ QFETCH(QString, oldXml);
+ QFETCH(int, oldCount);
+ QFETCH(QString, newXml);
+ QFETCH(QDeclarativeXmlModelData, newData);
+ QFETCH(QList<QDeclarativeXmlListRange>, insertRanges);
+ QFETCH(QList<QDeclarativeXmlListRange>, removeRanges);
+
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/roleKeys.qml"));
+ QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create());
+ QVERIFY(model != 0);
+
+ model->setXml(oldXml);
+ QTRY_COMPARE(model->count(), oldCount);
+
+ QSignalSpy spyInsert(model, SIGNAL(itemsInserted(int,int)));
+ QSignalSpy spyRemove(model, SIGNAL(itemsRemoved(int,int)));
+ QSignalSpy spyCount(model, SIGNAL(countChanged()));
+
+ model->setXml(newXml);
+
+ if (oldCount != newData.count()) {
+ QTRY_COMPARE(model->count(), newData.count());
+ QCOMPARE(spyCount.count(), 1);
+ } else {
+ QTRY_VERIFY(spyInsert.count() > 0 || spyRemove.count() > 0);
+ QCOMPARE(spyCount.count(), 0);
+ }
+
+ QList<int> roles = model->roles();
+ for (int i=0; i<model->count(); i++) {
+ for (int j=0; j<roles.count(); j++)
+ QCOMPARE(model->data(i, roles[j]), newData[i][j]);
+ }
+
+ QCOMPARE(spyInsert.count(), insertRanges.count());
+ for (int i=0; i<spyInsert.count(); i++) {
+ QCOMPARE(spyInsert[i][0].toInt(), insertRanges[i].first);
+ QCOMPARE(spyInsert[i][1].toInt(), insertRanges[i].second);
+ }
+
+ QCOMPARE(spyRemove.count(), removeRanges.count());
+ for (int i=0; i<spyRemove.count(); i++) {
+ QCOMPARE(spyRemove[i][0].toInt(), removeRanges[i].first);
+ QCOMPARE(spyRemove[i][1].toInt(), removeRanges[i].second);
+ }
+
+ delete model;
+}
+
+void tst_qdeclarativexmllistmodel::useKeys_data()
+{
+ QTest::addColumn<QString>("oldXml");
+ QTest::addColumn<int>("oldCount");
+ QTest::addColumn<QString>("newXml");
+ QTest::addColumn<QDeclarativeXmlModelData>("newData");
+ QTest::addColumn<QList<QDeclarativeXmlListRange> >("insertRanges");
+ QTest::addColumn<QList<QDeclarativeXmlListRange> >("removeRanges");
+
+ QDeclarativeXmlModelData modelData;
+
+ QTest::newRow("append 1")
+ << makeItemXmlAndData("name=A,age=25,sport=Football") << 1
+ << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics", &modelData)
+ << modelData
+ << (QList<QDeclarativeXmlListRange>() << qMakePair(1, 1))
+ << QList<QDeclarativeXmlListRange>();
+
+ QTest::newRow("append multiple")
+ << makeItemXmlAndData("name=A,age=25,sport=Football") << 1
+ << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics;name=C,age=45,sport=Curling", &modelData)
+ << modelData
+ << (QList<QDeclarativeXmlListRange>() << qMakePair(1, 2))
+ << QList<QDeclarativeXmlListRange>();
+
+ QTest::newRow("insert in different spots")
+ << makeItemXmlAndData("name=B,age=35,sport=Athletics") << 1
+ << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics;name=C,age=45,sport=Curling;name=D,age=55,sport=Golf", &modelData)
+ << modelData
+ << (QList<QDeclarativeXmlListRange>() << qMakePair(0, 1) << qMakePair(2,2))
+ << QList<QDeclarativeXmlListRange>();
+
+ QTest::newRow("insert in middle")
+ << makeItemXmlAndData("name=A,age=25,sport=Football;name=D,age=55,sport=Golf") << 2
+ << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics;name=C,age=45,sport=Curling;name=D,age=55,sport=Golf", &modelData)
+ << modelData
+ << (QList<QDeclarativeXmlListRange>() << qMakePair(1, 2))
+ << QList<QDeclarativeXmlListRange>();
+
+ QTest::newRow("remove first")
+ << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics") << 2
+ << makeItemXmlAndData("name=B,age=35,sport=Athletics", &modelData)
+ << modelData
+ << QList<QDeclarativeXmlListRange>()
+ << (QList<QDeclarativeXmlListRange>() << qMakePair(0, 1));
+
+ QTest::newRow("remove last")
+ << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics") << 2
+ << makeItemXmlAndData("name=A,age=25,sport=Football", &modelData)
+ << modelData
+ << QList<QDeclarativeXmlListRange>()
+ << (QList<QDeclarativeXmlListRange>() << qMakePair(1, 1));
+
+ QTest::newRow("remove from multiple spots")
+ << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics;name=C,age=45,sport=Curling;name=D,age=55,sport=Golf;name=E,age=65,sport=Fencing") << 5
+ << makeItemXmlAndData("name=A,age=25,sport=Football;name=C,age=45,sport=Curling", &modelData)
+ << modelData
+ << QList<QDeclarativeXmlListRange>()
+ << (QList<QDeclarativeXmlListRange>() << qMakePair(1, 1) << qMakePair(3,2));
+
+ QTest::newRow("remove all")
+ << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics;name=C,age=45,sport=Curling") << 3
+ << makeItemXmlAndData("", &modelData)
+ << modelData
+ << QList<QDeclarativeXmlListRange>()
+ << (QList<QDeclarativeXmlListRange>() << qMakePair(0, 3));
+
+ QTest::newRow("replace item")
+ << makeItemXmlAndData("name=A,age=25,sport=Football") << 1
+ << makeItemXmlAndData("name=ZZZ,age=25,sport=Football", &modelData)
+ << modelData
+ << (QList<QDeclarativeXmlListRange>() << qMakePair(0, 1))
+ << (QList<QDeclarativeXmlListRange>() << qMakePair(0, 1));
+
+ QTest::newRow("add and remove simultaneously, in different spots")
+ << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics;name=C,age=45,sport=Curling;name=D,age=55,sport=Golf") << 4
+ << makeItemXmlAndData("name=B,age=35,sport=Athletics;name=E,age=65,sport=Fencing", &modelData)
+ << modelData
+ << (QList<QDeclarativeXmlListRange>() << qMakePair(1, 1))
+ << (QList<QDeclarativeXmlListRange>() << qMakePair(0, 1) << qMakePair(2,2));
+
+ QTest::newRow("insert at start, remove at end i.e. rss feed")
+ << makeItemXmlAndData("name=C,age=45,sport=Curling;name=D,age=55,sport=Golf;name=E,age=65,sport=Fencing") << 3
+ << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics;name=C,age=45,sport=Curling", &modelData)
+ << modelData
+ << (QList<QDeclarativeXmlListRange>() << qMakePair(0, 2))
+ << (QList<QDeclarativeXmlListRange>() << qMakePair(1, 2));
+
+ QTest::newRow("remove at start, insert at end")
+ << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics;name=C,age=45,sport=Curling") << 3
+ << makeItemXmlAndData("name=C,age=45,sport=Curling;name=D,age=55,sport=Golf;name=E,age=65,sport=Fencing", &modelData)
+ << modelData
+ << (QList<QDeclarativeXmlListRange>() << qMakePair(1, 2))
+ << (QList<QDeclarativeXmlListRange>() << qMakePair(0, 2));
+
+ QTest::newRow("all data has changed")
+ << makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35") << 2
+ << makeItemXmlAndData("name=C,age=45,sport=Curling;name=D,age=55,sport=Golf", &modelData)
+ << modelData
+ << (QList<QDeclarativeXmlListRange>() << qMakePair(0, 2))
+ << (QList<QDeclarativeXmlListRange>() << qMakePair(0, 2));
+}
+
+void tst_qdeclarativexmllistmodel::noKeysValueChanges()
+{
+ // The 'key' roles are 'name' and 'age', as defined in roleKeys.qml.
+ // If a 'sport' value is changed, the model should not be reloaded,
+ // since 'sport' is not marked as a key.
+
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/roleKeys.qml"));
+ QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create());
+ QVERIFY(model != 0);
+
+ QString xml;
+
+ xml = makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics");
+ model->setXml(xml);
+ QTRY_COMPARE(model->count(), 2);
+
+ model->setXml("");
+
+ QSignalSpy spyInsert(model, SIGNAL(itemsInserted(int,int)));
+ QSignalSpy spyRemove(model, SIGNAL(itemsRemoved(int,int)));
+ QSignalSpy spyCount(model, SIGNAL(countChanged()));
+
+ xml = makeItemXmlAndData("name=A,age=25,sport=AussieRules;name=B,age=35,sport=Athletics");
+ model->setXml(xml);
+
+ // wait for the new xml data to be set, and verify no signals were emitted
+ QTRY_VERIFY(model->data(0, model->roles()[2]).toString() != QLatin1String("Football"));
+ QCOMPARE(model->data(0, model->roles()[2]).toString(), QLatin1String("AussieRules"));
+
+ QVERIFY(spyInsert.count() == 0);
+ QVERIFY(spyRemove.count() == 0);
+ QVERIFY(spyCount.count() == 0);
+
+ QCOMPARE(model->count(), 2);
+
+ delete model;
+}
+
+void tst_qdeclarativexmllistmodel::keysChanged()
+{
+ // If the key roles change, the next time the data is reloaded, it should
+ // delete all its data and build a clean model (i.e. same behaviour as
+ // if no keys are set).
+
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/roleKeys.qml"));
+ QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create());
+ QVERIFY(model != 0);
+
+ QString xml = makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics");
+ model->setXml(xml);
+ QTRY_COMPARE(model->count(), 2);
+
+ model->setXml("");
+
+ QSignalSpy spyInsert(model, SIGNAL(itemsInserted(int,int)));
+ QSignalSpy spyRemove(model, SIGNAL(itemsRemoved(int,int)));
+ QSignalSpy spyCount(model, SIGNAL(countChanged()));
+
+ QVERIFY(QMetaObject::invokeMethod(model, "disableNameKey"));
+ model->setXml(xml);
+
+ QTRY_VERIFY(spyInsert.count() > 0 && spyRemove.count() > 0);
+
+ QCOMPARE(spyInsert.count(), 1);
+ QCOMPARE(spyInsert[0][0].toInt(), 0);
+ QCOMPARE(spyInsert[0][1].toInt(), 2);
+
+ QCOMPARE(spyRemove.count(), 1);
+ QCOMPARE(spyRemove[0][0].toInt(), 0);
+ QCOMPARE(spyRemove[0][1].toInt(), 2);
+
+ QCOMPARE(spyCount.count(), 0);
+
+ delete model;
+}
+
+void tst_qdeclarativexmllistmodel::propertyChanges()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
+ QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create());
+ QVERIFY(model != 0);
+ QTRY_COMPARE(model->count(), 9);
+
+ QDeclarativeXmlListModelRole *role = model->findChild<QDeclarativeXmlListModelRole*>("role");
+ QVERIFY(role);
+
+ QSignalSpy nameSpy(role, SIGNAL(nameChanged()));
+ QSignalSpy querySpy(role, SIGNAL(queryChanged()));
+ QSignalSpy isKeySpy(role, SIGNAL(isKeyChanged()));
+
+ role->setName("size");
+ role->setQuery("size/string()");
+ role->setIsKey(true);
+
+ QCOMPARE(role->name(), QString("size"));
+ QCOMPARE(role->query(), QString("size/string()"));
+ QVERIFY(role->isKey());
+
+ QCOMPARE(nameSpy.count(),1);
+ QCOMPARE(querySpy.count(),1);
+ QCOMPARE(isKeySpy.count(),1);
+
+ role->setName("size");
+ role->setQuery("size/string()");
+ role->setIsKey(true);
+
+ QCOMPARE(nameSpy.count(),1);
+ QCOMPARE(querySpy.count(),1);
+ QCOMPARE(isKeySpy.count(),1);
+
+ QSignalSpy sourceSpy(model, SIGNAL(sourceChanged()));
+ QSignalSpy xmlSpy(model, SIGNAL(xmlChanged()));
+ QSignalSpy modelQuerySpy(model, SIGNAL(queryChanged()));
+ QSignalSpy namespaceDeclarationsSpy(model, SIGNAL(namespaceDeclarationsChanged()));
+
+ model->setSource(QUrl(""));
+ model->setXml("<Pets><Pet><name>Polly</name><type>Parrot</type><age>12</age><size>Small</size></Pet></Pets>");
+ model->setQuery("/Pets");
+ model->setNamespaceDeclarations("declare namespace media=\"http://search.yahoo.com/mrss/\";");
+
+ QCOMPARE(model->source(), QUrl(""));
+ QCOMPARE(model->xml(), QString("<Pets><Pet><name>Polly</name><type>Parrot</type><age>12</age><size>Small</size></Pet></Pets>"));
+ QCOMPARE(model->query(), QString("/Pets"));
+ QCOMPARE(model->namespaceDeclarations(), QString("declare namespace media=\"http://search.yahoo.com/mrss/\";"));
+
+ QCOMPARE(sourceSpy.count(),1);
+ QCOMPARE(xmlSpy.count(),1);
+ QCOMPARE(modelQuerySpy.count(),1);
+ QCOMPARE(namespaceDeclarationsSpy.count(),1);
+
+ model->setSource(QUrl(""));
+ model->setXml("<Pets><Pet><name>Polly</name><type>Parrot</type><age>12</age><size>Small</size></Pet></Pets>");
+ model->setQuery("/Pets");
+ model->setNamespaceDeclarations("declare namespace media=\"http://search.yahoo.com/mrss/\";");
+
+ QCOMPARE(sourceSpy.count(),1);
+ QCOMPARE(xmlSpy.count(),1);
+ QCOMPARE(modelQuerySpy.count(),1);
+ QCOMPARE(namespaceDeclarationsSpy.count(),1);
+}
+
+QTEST_MAIN(tst_qdeclarativexmllistmodel)
+
+#include "tst_qdeclarativexmllistmodel.moc"
+
+#else
+QTEST_NOOP_MAIN
+#endif
diff --git a/tests/auto/declarative/qmetaobjectbuilder/qmetaobjectbuilder.pro b/tests/auto/declarative/qmetaobjectbuilder/qmetaobjectbuilder.pro
new file mode 100644
index 0000000000..94ffe4b544
--- /dev/null
+++ b/tests/auto/declarative/qmetaobjectbuilder/qmetaobjectbuilder.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += \
+ tst_qmetaobjectbuilder.cpp
+
diff --git a/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp b/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
new file mode 100644
index 0000000000..c1dc92424f
--- /dev/null
+++ b/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
@@ -0,0 +1,1258 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QtCore/qlocale.h>
+#include <private/qmetaobjectbuilder_p.h>
+
+class tst_QMetaObjectBuilder : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QMetaObjectBuilder() {}
+ ~tst_QMetaObjectBuilder() {}
+
+private slots:
+ void mocVersionCheck();
+ void create();
+ void className();
+ void superClass();
+ void flags();
+ void method();
+ void slot();
+ void signal();
+ void constructor();
+ void property();
+ void notifySignal();
+ void enumerator();
+ void classInfo();
+ void relatedMetaObject();
+ void staticMetacall();
+ void copyMetaObject();
+ void serialize();
+ void removeNotifySignal();
+
+private:
+ static bool checkForSideEffects
+ (const QMetaObjectBuilder& builder,
+ QMetaObjectBuilder::AddMembers members);
+ static bool sameMetaObject
+ (const QMetaObject *meta1, const QMetaObject *meta2);
+};
+
+// Dummy class that has something of every type of thing moc can generate.
+class SomethingOfEverything : public QObject
+{
+ Q_OBJECT
+ Q_CLASSINFO("ci_foo", "ABC")
+ Q_CLASSINFO("ci_bar", "DEF")
+ Q_PROPERTY(QString prop READ prop WRITE setProp NOTIFY propChanged)
+ Q_PROPERTY(QString prop2 READ prop WRITE setProp)
+ Q_PROPERTY(SomethingEnum eprop READ eprop)
+ Q_PROPERTY(SomethingFlagEnum fprop READ fprop)
+ Q_PROPERTY(QLocale::Language language READ language)
+ Q_ENUMS(SomethingEnum)
+ Q_FLAGS(SomethingFlagEnum)
+public:
+ Q_INVOKABLE SomethingOfEverything() {}
+ ~SomethingOfEverything() {}
+
+ enum SomethingEnum
+ {
+ GHI,
+ JKL = 10
+ };
+
+ enum SomethingFlagEnum
+ {
+ XYZ = 1,
+ UVW = 8
+ };
+
+ Q_INVOKABLE Q_SCRIPTABLE void method1() {}
+
+ QString prop() const { return QString(); }
+ void setProp(const QString& v) { Q_UNUSED(v); }
+
+ SomethingOfEverything::SomethingEnum eprop() const { return GHI; }
+ SomethingOfEverything::SomethingFlagEnum fprop() const { return XYZ; }
+ QLocale::Language language() const { return QLocale::English; }
+
+public slots:
+ void slot1(const QString&) {}
+ void slot2(int, const QString&) {}
+
+private slots:
+ void slot3() {}
+
+protected slots:
+ Q_SCRIPTABLE void slot4(int) {}
+ void slot5(int a, const QString& b) { Q_UNUSED(a); Q_UNUSED(b); }
+
+signals:
+ void sig1();
+ void sig2(int x, const QString& y);
+ void propChanged(const QString&);
+};
+
+void tst_QMetaObjectBuilder::mocVersionCheck()
+{
+ // This test will fail when the moc version number is changed.
+ // It is intended as a reminder to also update QMetaObjectBuilder
+ // whenenver moc changes. Once QMetaObjectBuilder has been
+ // updated, this test can be changed to check for the next version.
+ QEXPECT_FAIL("", "QT-2918", Continue);
+ QCOMPARE(int(QObject::staticMetaObject.d.data[0]), 4);
+ QEXPECT_FAIL("", "QT-2918", Continue);
+ QCOMPARE(int(staticMetaObject.d.data[0]), 4);
+}
+
+void tst_QMetaObjectBuilder::create()
+{
+ QMetaObjectBuilder builder;
+ QVERIFY(builder.className().isEmpty());
+ QVERIFY(builder.superClass() == &QObject::staticMetaObject);
+ QCOMPARE(builder.methodCount(), 0);
+ QCOMPARE(builder.constructorCount(), 0);
+ QCOMPARE(builder.propertyCount(), 0);
+ QCOMPARE(builder.enumeratorCount(), 0);
+ QCOMPARE(builder.classInfoCount(), 0);
+ QCOMPARE(builder.relatedMetaObjectCount(), 0);
+ QVERIFY(builder.staticMetacallFunction() == 0);
+}
+
+void tst_QMetaObjectBuilder::className()
+{
+ QMetaObjectBuilder builder;
+
+ // Change the class name.
+ builder.setClassName("Foo");
+ QCOMPARE(builder.className(), QByteArray("Foo"));
+
+ // Change it again.
+ builder.setClassName("Bar");
+ QCOMPARE(builder.className(), QByteArray("Bar"));
+
+ // Clone the class name off a static QMetaObject.
+ builder.addMetaObject(&QObject::staticMetaObject, QMetaObjectBuilder::ClassName);
+ QCOMPARE(builder.className(), QByteArray("QObject"));
+
+ // Check that nothing else changed.
+ QVERIFY(checkForSideEffects(builder, QMetaObjectBuilder::ClassName));
+}
+
+void tst_QMetaObjectBuilder::superClass()
+{
+ QMetaObjectBuilder builder;
+
+ // Change the super class.
+ builder.setSuperClass(&QObject::staticMetaObject);
+ QVERIFY(builder.superClass() == &QObject::staticMetaObject);
+
+ // Change it again.
+ builder.setSuperClass(&staticMetaObject);
+ QVERIFY(builder.superClass() == &staticMetaObject);
+
+ // Clone the super class off a static QMetaObject.
+ builder.addMetaObject(&QObject::staticMetaObject, QMetaObjectBuilder::SuperClass);
+ QVERIFY(builder.superClass() == 0);
+ builder.addMetaObject(&staticMetaObject, QMetaObjectBuilder::SuperClass);
+ QVERIFY(builder.superClass() == staticMetaObject.superClass());
+
+ // Check that nothing else changed.
+ QVERIFY(checkForSideEffects(builder, QMetaObjectBuilder::SuperClass));
+}
+
+void tst_QMetaObjectBuilder::flags()
+{
+ QMetaObjectBuilder builder;
+
+ // Check default
+ QVERIFY(builder.flags() == 0);
+
+ // Set flags
+ builder.setFlags(QMetaObjectBuilder::DynamicMetaObject);
+ QVERIFY(builder.flags() == QMetaObjectBuilder::DynamicMetaObject);
+}
+
+void tst_QMetaObjectBuilder::method()
+{
+ QMetaObjectBuilder builder;
+
+ // Check null method
+ QMetaMethodBuilder nullMethod;
+ QCOMPARE(nullMethod.signature(), QByteArray());
+ QVERIFY(nullMethod.methodType() == QMetaMethod::Method);
+ QVERIFY(nullMethod.returnType().isEmpty());
+ QVERIFY(nullMethod.parameterNames().isEmpty());
+ QVERIFY(nullMethod.tag().isEmpty());
+ QVERIFY(nullMethod.access() == QMetaMethod::Public);
+ QCOMPARE(nullMethod.attributes(), 0);
+ QCOMPARE(nullMethod.index(), 0);
+
+ // Add a method and check its attributes.
+ QMetaMethodBuilder method1 = builder.addMethod("foo(const QString&, int)");
+ QCOMPARE(method1.signature(), QByteArray("foo(QString,int)"));
+ QVERIFY(method1.methodType() == QMetaMethod::Method);
+ QVERIFY(method1.returnType().isEmpty());
+ QVERIFY(method1.parameterNames().isEmpty());
+ QVERIFY(method1.tag().isEmpty());
+ QVERIFY(method1.access() == QMetaMethod::Public);
+ QCOMPARE(method1.attributes(), 0);
+ QCOMPARE(method1.index(), 0);
+ QCOMPARE(builder.methodCount(), 1);
+
+ // Add another method and check again.
+ QMetaMethodBuilder method2 = builder.addMethod("bar(QString)", "int");
+ QCOMPARE(method2.signature(), QByteArray("bar(QString)"));
+ QVERIFY(method2.methodType() == QMetaMethod::Method);
+ QCOMPARE(method2.returnType(), QByteArray("int"));
+ QVERIFY(method2.parameterNames().isEmpty());
+ QVERIFY(method2.tag().isEmpty());
+ QVERIFY(method2.access() == QMetaMethod::Public);
+ QCOMPARE(method2.attributes(), 0);
+ QCOMPARE(method2.index(), 1);
+ QCOMPARE(builder.methodCount(), 2);
+
+ // Perform index-based lookup.
+ QCOMPARE(builder.indexOfMethod("foo(const QString&, int)"), 0);
+ QCOMPARE(builder.indexOfMethod("bar(QString)"), 1);
+ QCOMPARE(builder.indexOfMethod("baz()"), -1);
+
+ // Modify the attributes on method1.
+ method1.setReturnType("int");
+ method1.setParameterNames(QList<QByteArray>() << "a" << "b");
+ method1.setTag("tag");
+ method1.setAccess(QMetaMethod::Private);
+ method1.setAttributes(42);
+
+ // Check that method1 is changed, but method2 is not.
+ QCOMPARE(method1.signature(), QByteArray("foo(QString,int)"));
+ QVERIFY(method1.methodType() == QMetaMethod::Method);
+ QCOMPARE(method1.returnType(), QByteArray("int"));
+ QCOMPARE(method1.parameterNames(), QList<QByteArray>() << "a" << "b");
+ QCOMPARE(method1.tag(), QByteArray("tag"));
+ QVERIFY(method1.access() == QMetaMethod::Private);
+ QCOMPARE(method1.attributes(), 42);
+ QCOMPARE(method1.index(), 0);
+ QCOMPARE(method2.signature(), QByteArray("bar(QString)"));
+ QVERIFY(method2.methodType() == QMetaMethod::Method);
+ QCOMPARE(method2.returnType(), QByteArray("int"));
+ QVERIFY(method2.parameterNames().isEmpty());
+ QVERIFY(method2.tag().isEmpty());
+ QVERIFY(method2.access() == QMetaMethod::Public);
+ QCOMPARE(method2.attributes(), 0);
+ QCOMPARE(method2.index(), 1);
+ QCOMPARE(builder.methodCount(), 2);
+
+ // Modify the attributes on method2.
+ method2.setReturnType("QString");
+ method2.setParameterNames(QList<QByteArray>() << "c");
+ method2.setTag("Q_FOO");
+ method2.setAccess(QMetaMethod::Protected);
+ method2.setAttributes(24);
+
+ // This time check that only method2 changed.
+ QCOMPARE(method1.signature(), QByteArray("foo(QString,int)"));
+ QVERIFY(method1.methodType() == QMetaMethod::Method);
+ QCOMPARE(method1.returnType(), QByteArray("int"));
+ QCOMPARE(method1.parameterNames(), QList<QByteArray>() << "a" << "b");
+ QCOMPARE(method1.tag(), QByteArray("tag"));
+ QVERIFY(method1.access() == QMetaMethod::Private);
+ QCOMPARE(method1.attributes(), 42);
+ QCOMPARE(method1.index(), 0);
+ QCOMPARE(method2.signature(), QByteArray("bar(QString)"));
+ QVERIFY(method2.methodType() == QMetaMethod::Method);
+ QCOMPARE(method2.returnType(), QByteArray("QString"));
+ QCOMPARE(method2.parameterNames(), QList<QByteArray>() << "c");
+ QCOMPARE(method2.tag(), QByteArray("Q_FOO"));
+ QVERIFY(method2.access() == QMetaMethod::Protected);
+ QCOMPARE(method2.attributes(), 24);
+ QCOMPARE(method2.index(), 1);
+ QCOMPARE(builder.methodCount(), 2);
+
+ // Remove method1 and check that method2 becomes index 0.
+ builder.removeMethod(0);
+ QCOMPARE(builder.methodCount(), 1);
+ method2 = builder.method(0);
+ QCOMPARE(method2.signature(), QByteArray("bar(QString)"));
+ QVERIFY(method2.methodType() == QMetaMethod::Method);
+ QCOMPARE(method2.returnType(), QByteArray("QString"));
+ QCOMPARE(method2.parameterNames(), QList<QByteArray>() << "c");
+ QCOMPARE(method2.tag(), QByteArray("Q_FOO"));
+ QVERIFY(method2.access() == QMetaMethod::Protected);
+ QCOMPARE(method2.attributes(), 24);
+ QCOMPARE(method2.index(), 0);
+
+ // Perform index-based lookup again.
+ QCOMPARE(builder.indexOfMethod("foo(const QString&, int)"), -1);
+ QCOMPARE(builder.indexOfMethod("bar(QString)"), 0);
+ QCOMPARE(builder.indexOfMethod("baz()"), -1);
+ QCOMPARE(builder.method(0).signature(), QByteArray("bar(QString)"));
+ QCOMPARE(builder.method(9).signature(), QByteArray());
+
+ // Check that nothing else changed.
+ QVERIFY(checkForSideEffects(builder, QMetaObjectBuilder::Methods));
+}
+
+void tst_QMetaObjectBuilder::slot()
+{
+ QMetaObjectBuilder builder;
+
+ // Add a slot and check its attributes.
+ QMetaMethodBuilder method1 = builder.addSlot("foo(const QString&, int)");
+ QCOMPARE(method1.signature(), QByteArray("foo(QString,int)"));
+ QVERIFY(method1.methodType() == QMetaMethod::Slot);
+ QVERIFY(method1.returnType().isEmpty());
+ QVERIFY(method1.parameterNames().isEmpty());
+ QVERIFY(method1.tag().isEmpty());
+ QVERIFY(method1.access() == QMetaMethod::Public);
+ QCOMPARE(method1.attributes(), 0);
+ QCOMPARE(method1.index(), 0);
+ QCOMPARE(builder.methodCount(), 1);
+
+ // Add another slot and check again.
+ QMetaMethodBuilder method2 = builder.addSlot("bar(QString)");
+ QCOMPARE(method2.signature(), QByteArray("bar(QString)"));
+ QVERIFY(method2.methodType() == QMetaMethod::Slot);
+ QVERIFY(method2.returnType().isEmpty());
+ QVERIFY(method2.parameterNames().isEmpty());
+ QVERIFY(method2.tag().isEmpty());
+ QVERIFY(method2.access() == QMetaMethod::Public);
+ QCOMPARE(method2.attributes(), 0);
+ QCOMPARE(method2.index(), 1);
+ QCOMPARE(builder.methodCount(), 2);
+
+ // Perform index-based lookup
+ QCOMPARE(builder.indexOfSlot("foo(const QString &, int)"), 0);
+ QCOMPARE(builder.indexOfSlot("bar(QString)"), 1);
+ QCOMPARE(builder.indexOfSlot("baz()"), -1);
+
+ // Check that nothing else changed.
+ QVERIFY(checkForSideEffects(builder, QMetaObjectBuilder::Methods));
+}
+
+void tst_QMetaObjectBuilder::signal()
+{
+ QMetaObjectBuilder builder;
+
+ // Add a signal and check its attributes.
+ QMetaMethodBuilder method1 = builder.addSignal("foo(const QString&, int)");
+ QCOMPARE(method1.signature(), QByteArray("foo(QString,int)"));
+ QVERIFY(method1.methodType() == QMetaMethod::Signal);
+ QVERIFY(method1.returnType().isEmpty());
+ QVERIFY(method1.parameterNames().isEmpty());
+ QVERIFY(method1.tag().isEmpty());
+ QVERIFY(method1.access() == QMetaMethod::Protected);
+ QCOMPARE(method1.attributes(), 0);
+ QCOMPARE(method1.index(), 0);
+ QCOMPARE(builder.methodCount(), 1);
+
+ // Add another signal and check again.
+ QMetaMethodBuilder method2 = builder.addSignal("bar(QString)");
+ QCOMPARE(method2.signature(), QByteArray("bar(QString)"));
+ QVERIFY(method2.methodType() == QMetaMethod::Signal);
+ QVERIFY(method2.returnType().isEmpty());
+ QVERIFY(method2.parameterNames().isEmpty());
+ QVERIFY(method2.tag().isEmpty());
+ QVERIFY(method2.access() == QMetaMethod::Protected);
+ QCOMPARE(method2.attributes(), 0);
+ QCOMPARE(method2.index(), 1);
+ QCOMPARE(builder.methodCount(), 2);
+
+ // Perform index-based lookup
+ QCOMPARE(builder.indexOfSignal("foo(const QString &, int)"), 0);
+ QCOMPARE(builder.indexOfSignal("bar(QString)"), 1);
+ QCOMPARE(builder.indexOfSignal("baz()"), -1);
+
+ // Check that nothing else changed.
+ QVERIFY(checkForSideEffects(builder, QMetaObjectBuilder::Methods));
+}
+
+void tst_QMetaObjectBuilder::constructor()
+{
+ QMetaObjectBuilder builder;
+
+ // Add a constructor and check its attributes.
+ QMetaMethodBuilder ctor1 = builder.addConstructor("foo(const QString&, int)");
+ QCOMPARE(ctor1.signature(), QByteArray("foo(QString,int)"));
+ QVERIFY(ctor1.methodType() == QMetaMethod::Constructor);
+ QVERIFY(ctor1.returnType().isEmpty());
+ QVERIFY(ctor1.parameterNames().isEmpty());
+ QVERIFY(ctor1.tag().isEmpty());
+ QVERIFY(ctor1.access() == QMetaMethod::Public);
+ QCOMPARE(ctor1.attributes(), 0);
+ QCOMPARE(ctor1.index(), 0);
+ QCOMPARE(builder.constructorCount(), 1);
+
+ // Add another constructor and check again.
+ QMetaMethodBuilder ctor2 = builder.addConstructor("bar(QString)");
+ QCOMPARE(ctor2.signature(), QByteArray("bar(QString)"));
+ QVERIFY(ctor2.methodType() == QMetaMethod::Constructor);
+ QVERIFY(ctor2.returnType().isEmpty());
+ QVERIFY(ctor2.parameterNames().isEmpty());
+ QVERIFY(ctor2.tag().isEmpty());
+ QVERIFY(ctor2.access() == QMetaMethod::Public);
+ QCOMPARE(ctor2.attributes(), 0);
+ QCOMPARE(ctor2.index(), 1);
+ QCOMPARE(builder.constructorCount(), 2);
+
+ // Perform index-based lookup.
+ QCOMPARE(builder.indexOfConstructor("foo(const QString&, int)"), 0);
+ QCOMPARE(builder.indexOfConstructor("bar(QString)"), 1);
+ QCOMPARE(builder.indexOfConstructor("baz()"), -1);
+ QCOMPARE(builder.constructor(1).signature(), QByteArray("bar(QString)"));
+ QCOMPARE(builder.constructor(9).signature(), QByteArray());
+
+ // Modify the attributes on ctor1.
+ ctor1.setReturnType("int");
+ ctor1.setParameterNames(QList<QByteArray>() << "a" << "b");
+ ctor1.setTag("tag");
+ ctor1.setAccess(QMetaMethod::Private);
+ ctor1.setAttributes(42);
+
+ // Check that ctor1 is changed, but ctor2 is not.
+ QCOMPARE(ctor1.signature(), QByteArray("foo(QString,int)"));
+ QVERIFY(ctor1.methodType() == QMetaMethod::Constructor);
+ QCOMPARE(ctor1.returnType(), QByteArray("int"));
+ QCOMPARE(ctor1.parameterNames(), QList<QByteArray>() << "a" << "b");
+ QCOMPARE(ctor1.tag(), QByteArray("tag"));
+ QVERIFY(ctor1.access() == QMetaMethod::Private);
+ QCOMPARE(ctor1.attributes(), 42);
+ QCOMPARE(ctor1.index(), 0);
+ QCOMPARE(ctor2.signature(), QByteArray("bar(QString)"));
+ QVERIFY(ctor2.methodType() == QMetaMethod::Constructor);
+ QVERIFY(ctor2.returnType().isEmpty());
+ QVERIFY(ctor2.parameterNames().isEmpty());
+ QVERIFY(ctor2.tag().isEmpty());
+ QVERIFY(ctor2.access() == QMetaMethod::Public);
+ QCOMPARE(ctor2.attributes(), 0);
+ QCOMPARE(ctor2.index(), 1);
+ QCOMPARE(builder.constructorCount(), 2);
+
+ // Modify the attributes on ctor2.
+ ctor2.setReturnType("QString");
+ ctor2.setParameterNames(QList<QByteArray>() << "c");
+ ctor2.setTag("Q_FOO");
+ ctor2.setAccess(QMetaMethod::Protected);
+ ctor2.setAttributes(24);
+
+ // This time check that only ctor2 changed.
+ QCOMPARE(ctor1.signature(), QByteArray("foo(QString,int)"));
+ QVERIFY(ctor1.methodType() == QMetaMethod::Constructor);
+ QCOMPARE(ctor1.returnType(), QByteArray("int"));
+ QCOMPARE(ctor1.parameterNames(), QList<QByteArray>() << "a" << "b");
+ QCOMPARE(ctor1.tag(), QByteArray("tag"));
+ QVERIFY(ctor1.access() == QMetaMethod::Private);
+ QCOMPARE(ctor1.attributes(), 42);
+ QCOMPARE(ctor1.index(), 0);
+ QCOMPARE(ctor2.signature(), QByteArray("bar(QString)"));
+ QVERIFY(ctor2.methodType() == QMetaMethod::Constructor);
+ QCOMPARE(ctor2.returnType(), QByteArray("QString"));
+ QCOMPARE(ctor2.parameterNames(), QList<QByteArray>() << "c");
+ QCOMPARE(ctor2.tag(), QByteArray("Q_FOO"));
+ QVERIFY(ctor2.access() == QMetaMethod::Protected);
+ QCOMPARE(ctor2.attributes(), 24);
+ QCOMPARE(ctor2.index(), 1);
+ QCOMPARE(builder.constructorCount(), 2);
+
+ // Remove ctor1 and check that ctor2 becomes index 0.
+ builder.removeConstructor(0);
+ QCOMPARE(builder.constructorCount(), 1);
+ ctor2 = builder.constructor(0);
+ QCOMPARE(ctor2.signature(), QByteArray("bar(QString)"));
+ QVERIFY(ctor2.methodType() == QMetaMethod::Constructor);
+ QCOMPARE(ctor2.returnType(), QByteArray("QString"));
+ QCOMPARE(ctor2.parameterNames(), QList<QByteArray>() << "c");
+ QCOMPARE(ctor2.tag(), QByteArray("Q_FOO"));
+ QVERIFY(ctor2.access() == QMetaMethod::Protected);
+ QCOMPARE(ctor2.attributes(), 24);
+ QCOMPARE(ctor2.index(), 0);
+
+ // Perform index-based lookup again.
+ QCOMPARE(builder.indexOfConstructor("foo(const QString&, int)"), -1);
+ QCOMPARE(builder.indexOfConstructor("bar(QString)"), 0);
+ QCOMPARE(builder.indexOfConstructor("baz()"), -1);
+
+ // Add constructor from prototype
+ QMetaMethod prototype = SomethingOfEverything::staticMetaObject.constructor(0);
+ QMetaMethodBuilder prototypeConstructor = builder.addMethod(prototype);
+ QCOMPARE(builder.constructorCount(), 2);
+
+ QCOMPARE(prototypeConstructor.signature(), QByteArray("SomethingOfEverything()"));
+ QVERIFY(prototypeConstructor.methodType() == QMetaMethod::Constructor);
+ QCOMPARE(prototypeConstructor.returnType(), QByteArray());
+ QVERIFY(prototypeConstructor.access() == QMetaMethod::Public);
+ QCOMPARE(prototypeConstructor.index(), 1);
+
+ // Check that nothing else changed.
+ QVERIFY(checkForSideEffects(builder, QMetaObjectBuilder::Constructors));
+}
+
+void tst_QMetaObjectBuilder::property()
+{
+ QMetaObjectBuilder builder;
+
+ // Null property builder
+ QMetaPropertyBuilder nullProp;
+ QCOMPARE(nullProp.name(), QByteArray());
+ QCOMPARE(nullProp.type(), QByteArray());
+ QVERIFY(!nullProp.hasNotifySignal());
+ QVERIFY(!nullProp.isReadable());
+ QVERIFY(!nullProp.isWritable());
+ QVERIFY(!nullProp.isResettable());
+ QVERIFY(!nullProp.isDesignable());
+ QVERIFY(!nullProp.isScriptable());
+ QVERIFY(!nullProp.isStored());
+ QVERIFY(!nullProp.isEditable());
+ QVERIFY(!nullProp.isUser());
+ QVERIFY(!nullProp.hasStdCppSet());
+ QVERIFY(!nullProp.isEnumOrFlag());
+ QVERIFY(!nullProp.isDynamic());
+ QCOMPARE(nullProp.index(), 0);
+
+ // Add a property and check its attributes.
+ QMetaPropertyBuilder prop1 = builder.addProperty("foo", "const QString &");
+ QCOMPARE(prop1.name(), QByteArray("foo"));
+ QCOMPARE(prop1.type(), QByteArray("QString"));
+ QVERIFY(!prop1.hasNotifySignal());
+ QVERIFY(prop1.isReadable());
+ QVERIFY(prop1.isWritable());
+ QVERIFY(!prop1.isResettable());
+ QVERIFY(!prop1.isDesignable());
+ QVERIFY(!prop1.isScriptable());
+ QVERIFY(!prop1.isStored());
+ QVERIFY(!prop1.isEditable());
+ QVERIFY(!prop1.isUser());
+ QVERIFY(!prop1.hasStdCppSet());
+ QVERIFY(!prop1.isEnumOrFlag());
+ QVERIFY(!prop1.isDynamic());
+ QCOMPARE(prop1.index(), 0);
+ QCOMPARE(builder.propertyCount(), 1);
+
+ // Add another property and check again.
+ QMetaPropertyBuilder prop2 = builder.addProperty("bar", "int");
+ QCOMPARE(prop2.name(), QByteArray("bar"));
+ QCOMPARE(prop2.type(), QByteArray("int"));
+ QVERIFY(!prop2.hasNotifySignal());
+ QVERIFY(prop2.isReadable());
+ QVERIFY(prop2.isWritable());
+ QVERIFY(!prop2.isResettable());
+ QVERIFY(!prop2.isDesignable());
+ QVERIFY(!prop2.isScriptable());
+ QVERIFY(!prop2.isStored());
+ QVERIFY(!prop2.isEditable());
+ QVERIFY(!prop2.isUser());
+ QVERIFY(!prop2.hasStdCppSet());
+ QVERIFY(!prop2.isEnumOrFlag());
+ QVERIFY(!prop2.isDynamic());
+ QCOMPARE(prop2.index(), 1);
+ QCOMPARE(builder.propertyCount(), 2);
+
+ // Perform index-based lookup.
+ QCOMPARE(builder.indexOfProperty("foo"), 0);
+ QCOMPARE(builder.indexOfProperty("bar"), 1);
+ QCOMPARE(builder.indexOfProperty("baz"), -1);
+ QCOMPARE(builder.property(1).name(), QByteArray("bar"));
+ QCOMPARE(builder.property(9).name(), QByteArray());
+
+ // Modify the attributes on prop1.
+ prop1.setReadable(false);
+ prop1.setWritable(false);
+ prop1.setResettable(true);
+ prop1.setDesignable(true);
+ prop1.setScriptable(true);
+ prop1.setStored(true);
+ prop1.setEditable(true);
+ prop1.setUser(true);
+ prop1.setStdCppSet(true);
+ prop1.setEnumOrFlag(true);
+ prop1.setDynamic(true);
+
+ // Check that prop1 is changed, but prop2 is not.
+ QCOMPARE(prop1.name(), QByteArray("foo"));
+ QCOMPARE(prop1.type(), QByteArray("QString"));
+ QVERIFY(!prop1.isReadable());
+ QVERIFY(!prop1.isWritable());
+ QVERIFY(prop1.isResettable());
+ QVERIFY(prop1.isDesignable());
+ QVERIFY(prop1.isScriptable());
+ QVERIFY(prop1.isStored());
+ QVERIFY(prop1.isEditable());
+ QVERIFY(prop1.isUser());
+ QVERIFY(prop1.hasStdCppSet());
+ QVERIFY(prop1.isEnumOrFlag());
+ QVERIFY(prop1.isDynamic());
+ QVERIFY(prop2.isReadable());
+ QVERIFY(prop2.isWritable());
+ QCOMPARE(prop2.name(), QByteArray("bar"));
+ QCOMPARE(prop2.type(), QByteArray("int"));
+ QVERIFY(!prop2.isResettable());
+ QVERIFY(!prop2.isDesignable());
+ QVERIFY(!prop2.isScriptable());
+ QVERIFY(!prop2.isStored());
+ QVERIFY(!prop2.isEditable());
+ QVERIFY(!prop2.isUser());
+ QVERIFY(!prop2.hasStdCppSet());
+ QVERIFY(!prop2.isEnumOrFlag());
+ QVERIFY(!prop2.isDynamic());
+
+ // Remove prop1 and check that prop2 becomes index 0.
+ builder.removeProperty(0);
+ QCOMPARE(builder.propertyCount(), 1);
+ prop2 = builder.property(0);
+ QCOMPARE(prop2.name(), QByteArray("bar"));
+ QCOMPARE(prop2.type(), QByteArray("int"));
+ QVERIFY(!prop2.isResettable());
+ QVERIFY(!prop2.isDesignable());
+ QVERIFY(!prop2.isScriptable());
+ QVERIFY(!prop2.isStored());
+ QVERIFY(!prop2.isEditable());
+ QVERIFY(!prop2.isUser());
+ QVERIFY(!prop2.hasStdCppSet());
+ QVERIFY(!prop2.isEnumOrFlag());
+ QVERIFY(!prop2.isDynamic());
+ QCOMPARE(prop2.index(), 0);
+
+ // Perform index-based lookup again.
+ QCOMPARE(builder.indexOfProperty("foo"), -1);
+ QCOMPARE(builder.indexOfProperty("bar"), 0);
+ QCOMPARE(builder.indexOfProperty("baz"), -1);
+
+ // Check for side-effects between the flags on prop2.
+ // Setting a flag to true shouldn't set any of the others to true.
+ // This checks for cut-and-paste bugs in the implementation where
+ // the flag code was pasted but the flag name was not changed.
+#define CLEAR_FLAGS() \
+ do { \
+ prop2.setReadable(false); \
+ prop2.setWritable(false); \
+ prop2.setResettable(false); \
+ prop2.setDesignable(false); \
+ prop2.setScriptable(false); \
+ prop2.setStored(false); \
+ prop2.setEditable(false); \
+ prop2.setUser(false); \
+ prop2.setStdCppSet(false); \
+ prop2.setEnumOrFlag(false); \
+ prop2.setDynamic(false); \
+ } while (0)
+#define COUNT_FLAGS() \
+ ((prop2.isReadable() ? 1 : 0) + \
+ (prop2.isWritable() ? 1 : 0) + \
+ (prop2.isResettable() ? 1 : 0) + \
+ (prop2.isDesignable() ? 1 : 0) + \
+ (prop2.isScriptable() ? 1 : 0) + \
+ (prop2.isStored() ? 1 : 0) + \
+ (prop2.isEditable() ? 1 : 0) + \
+ (prop2.isUser() ? 1 : 0) + \
+ (prop2.hasStdCppSet() ? 1 : 0) + \
+ (prop2.isEnumOrFlag() ? 1 : 0) + \
+ (prop2.isDynamic() ? 1 : 0))
+#define CHECK_FLAG(setFunc,isFunc) \
+ do { \
+ CLEAR_FLAGS(); \
+ QCOMPARE(COUNT_FLAGS(), 0); \
+ prop2.setFunc(true); \
+ QVERIFY(prop2.isFunc()); \
+ QCOMPARE(COUNT_FLAGS(), 1); \
+ } while (0)
+ CHECK_FLAG(setReadable, isReadable);
+ CHECK_FLAG(setWritable, isWritable);
+ CHECK_FLAG(setResettable, isResettable);
+ CHECK_FLAG(setDesignable, isDesignable);
+ CHECK_FLAG(setScriptable, isScriptable);
+ CHECK_FLAG(setStored, isStored);
+ CHECK_FLAG(setEditable, isEditable);
+ CHECK_FLAG(setUser, isUser);
+ CHECK_FLAG(setStdCppSet, hasStdCppSet);
+ CHECK_FLAG(setEnumOrFlag, isEnumOrFlag);
+ CHECK_FLAG(setDynamic, isDynamic);
+
+ // Check that nothing else changed.
+ QVERIFY(checkForSideEffects(builder, QMetaObjectBuilder::Properties));
+
+ // Add property from prototype
+ QMetaProperty prototype = SomethingOfEverything::staticMetaObject.property(1);
+ QVERIFY(prototype.name() == QByteArray("prop"));
+ QMetaPropertyBuilder prototypeProp = builder.addProperty(prototype);
+ QCOMPARE(prototypeProp.name(), QByteArray("prop"));
+ QVERIFY(prototypeProp.hasNotifySignal());
+ QCOMPARE(prototypeProp.notifySignal().signature(), QByteArray("propChanged(QString)"));
+ QCOMPARE(builder.methodCount(), 1);
+ QCOMPARE(builder.method(0).signature(), QByteArray("propChanged(QString)"));
+}
+
+void tst_QMetaObjectBuilder::notifySignal()
+{
+ QMetaObjectBuilder builder;
+
+ QMetaPropertyBuilder prop = builder.addProperty("foo", "const QString &");
+ builder.addSlot("setFoo(QString)");
+ QMetaMethodBuilder notify = builder.addSignal("fooChanged(QString)");
+
+ QVERIFY(!prop.hasNotifySignal());
+ QCOMPARE(prop.notifySignal().index(), 0);
+
+ prop.setNotifySignal(notify);
+ QVERIFY(prop.hasNotifySignal());
+ QCOMPARE(prop.notifySignal().index(), 1);
+
+ prop.setNotifySignal(QMetaMethodBuilder());
+ QVERIFY(!prop.hasNotifySignal());
+ QCOMPARE(prop.notifySignal().index(), 0);
+
+ prop.setNotifySignal(notify);
+ prop.removeNotifySignal();
+ QVERIFY(!prop.hasNotifySignal());
+ QCOMPARE(prop.notifySignal().index(), 0);
+
+ QCOMPARE(builder.methodCount(), 2);
+ QCOMPARE(builder.propertyCount(), 1);
+
+ // Check that nothing else changed except methods and properties.
+ QVERIFY(checkForSideEffects
+ (builder, QMetaObjectBuilder::Methods | QMetaObjectBuilder::Properties));
+}
+
+void tst_QMetaObjectBuilder::enumerator()
+{
+ QMetaObjectBuilder builder;
+
+ // Add an enumerator and check its attributes.
+ QMetaEnumBuilder enum1 = builder.addEnumerator("foo");
+ QCOMPARE(enum1.name(), QByteArray("foo"));
+ QVERIFY(!enum1.isFlag());
+ QCOMPARE(enum1.keyCount(), 0);
+ QCOMPARE(enum1.index(), 0);
+ QCOMPARE(builder.enumeratorCount(), 1);
+
+ // Add another enumerator and check again.
+ QMetaEnumBuilder enum2 = builder.addEnumerator("bar");
+ QCOMPARE(enum2.name(), QByteArray("bar"));
+ QVERIFY(!enum2.isFlag());
+ QCOMPARE(enum2.keyCount(), 0);
+ QCOMPARE(enum2.index(), 1);
+ QCOMPARE(builder.enumeratorCount(), 2);
+
+ // Perform index-based lookup.
+ QCOMPARE(builder.indexOfEnumerator("foo"), 0);
+ QCOMPARE(builder.indexOfEnumerator("bar"), 1);
+ QCOMPARE(builder.indexOfEnumerator("baz"), -1);
+ QCOMPARE(builder.enumerator(1).name(), QByteArray("bar"));
+ QCOMPARE(builder.enumerator(9).name(), QByteArray());
+
+ // Modify the attributes on enum1.
+ enum1.setIsFlag(true);
+ QCOMPARE(enum1.addKey("ABC", 0), 0);
+ QCOMPARE(enum1.addKey("DEF", 1), 1);
+ QCOMPARE(enum1.addKey("GHI", -1), 2);
+
+ // Check that enum1 is changed, but enum2 is not.
+ QCOMPARE(enum1.name(), QByteArray("foo"));
+ QVERIFY(enum1.isFlag());
+ QCOMPARE(enum1.keyCount(), 3);
+ QCOMPARE(enum1.index(), 0);
+ QCOMPARE(enum1.key(0), QByteArray("ABC"));
+ QCOMPARE(enum1.key(1), QByteArray("DEF"));
+ QCOMPARE(enum1.key(2), QByteArray("GHI"));
+ QCOMPARE(enum1.key(3), QByteArray());
+ QCOMPARE(enum1.value(0), 0);
+ QCOMPARE(enum1.value(1), 1);
+ QCOMPARE(enum1.value(2), -1);
+ QCOMPARE(enum2.name(), QByteArray("bar"));
+ QVERIFY(!enum2.isFlag());
+ QCOMPARE(enum2.keyCount(), 0);
+ QCOMPARE(enum2.index(), 1);
+
+ // Modify the attributes on enum2.
+ enum2.setIsFlag(true);
+ QCOMPARE(enum2.addKey("XYZ", 10), 0);
+ QCOMPARE(enum2.addKey("UVW", 19), 1);
+
+ // This time check that only method2 changed.
+ QCOMPARE(enum1.name(), QByteArray("foo"));
+ QVERIFY(enum1.isFlag());
+ QCOMPARE(enum1.keyCount(), 3);
+ QCOMPARE(enum1.index(), 0);
+ QCOMPARE(enum1.key(0), QByteArray("ABC"));
+ QCOMPARE(enum1.key(1), QByteArray("DEF"));
+ QCOMPARE(enum1.key(2), QByteArray("GHI"));
+ QCOMPARE(enum1.key(3), QByteArray());
+ QCOMPARE(enum1.value(0), 0);
+ QCOMPARE(enum1.value(1), 1);
+ QCOMPARE(enum1.value(2), -1);
+ QCOMPARE(enum2.name(), QByteArray("bar"));
+ QVERIFY(enum2.isFlag());
+ QCOMPARE(enum2.keyCount(), 2);
+ QCOMPARE(enum2.index(), 1);
+ QCOMPARE(enum2.key(0), QByteArray("XYZ"));
+ QCOMPARE(enum2.key(1), QByteArray("UVW"));
+ QCOMPARE(enum2.key(2), QByteArray());
+ QCOMPARE(enum2.value(0), 10);
+ QCOMPARE(enum2.value(1), 19);
+
+ // Remove enum1 key
+ enum1.removeKey(2);
+ QCOMPARE(enum1.name(), QByteArray("foo"));
+ QVERIFY(enum1.isFlag());
+ QCOMPARE(enum1.keyCount(), 2);
+ QCOMPARE(enum1.index(), 0);
+ QCOMPARE(enum1.key(0), QByteArray("ABC"));
+ QCOMPARE(enum1.key(1), QByteArray("DEF"));
+ QCOMPARE(enum1.key(2), QByteArray());
+ QCOMPARE(enum1.value(0), 0);
+ QCOMPARE(enum1.value(1), 1);
+ QCOMPARE(enum1.value(2), -1);
+ QCOMPARE(enum2.name(), QByteArray("bar"));
+ QVERIFY(enum2.isFlag());
+ QCOMPARE(enum2.keyCount(), 2);
+ QCOMPARE(enum2.index(), 1);
+ QCOMPARE(enum2.key(0), QByteArray("XYZ"));
+ QCOMPARE(enum2.key(1), QByteArray("UVW"));
+ QCOMPARE(enum2.key(2), QByteArray());
+ QCOMPARE(enum2.value(0), 10);
+ QCOMPARE(enum2.value(1), 19);
+
+ // Remove enum1 and check that enum2 becomes index 0.
+ builder.removeEnumerator(0);
+ QCOMPARE(builder.enumeratorCount(), 1);
+ enum2 = builder.enumerator(0);
+ QCOMPARE(enum2.name(), QByteArray("bar"));
+ QVERIFY(enum2.isFlag());
+ QCOMPARE(enum2.keyCount(), 2);
+ QCOMPARE(enum2.index(), 0);
+ QCOMPARE(enum2.key(0), QByteArray("XYZ"));
+ QCOMPARE(enum2.key(1), QByteArray("UVW"));
+ QCOMPARE(enum2.key(2), QByteArray());
+ QCOMPARE(enum2.value(0), 10);
+ QCOMPARE(enum2.value(1), 19);
+
+ // Perform index-based lookup again.
+ QCOMPARE(builder.indexOfEnumerator("foo"), -1);
+ QCOMPARE(builder.indexOfEnumerator("bar"), 0);
+ QCOMPARE(builder.indexOfEnumerator("baz"), -1);
+
+ // Check that nothing else changed.
+ QVERIFY(checkForSideEffects(builder, QMetaObjectBuilder::Enumerators));
+}
+
+void tst_QMetaObjectBuilder::classInfo()
+{
+ QMetaObjectBuilder builder;
+
+ // Add two items of class information and check their attributes.
+ QCOMPARE(builder.addClassInfo("foo", "value1"), 0);
+ QCOMPARE(builder.addClassInfo("bar", "value2"), 1);
+ QCOMPARE(builder.classInfoName(0), QByteArray("foo"));
+ QCOMPARE(builder.classInfoValue(0), QByteArray("value1"));
+ QCOMPARE(builder.classInfoName(1), QByteArray("bar"));
+ QCOMPARE(builder.classInfoValue(1), QByteArray("value2"));
+ QCOMPARE(builder.classInfoName(9), QByteArray());
+ QCOMPARE(builder.classInfoValue(9), QByteArray());
+ QCOMPARE(builder.classInfoCount(), 2);
+
+ // Perform index-based lookup.
+ QCOMPARE(builder.indexOfClassInfo("foo"), 0);
+ QCOMPARE(builder.indexOfClassInfo("bar"), 1);
+ QCOMPARE(builder.indexOfClassInfo("baz"), -1);
+
+ // Remove the first one and check again.
+ builder.removeClassInfo(0);
+ QCOMPARE(builder.classInfoName(0), QByteArray("bar"));
+ QCOMPARE(builder.classInfoValue(0), QByteArray("value2"));
+ QCOMPARE(builder.classInfoCount(), 1);
+
+ // Perform index-based lookup again.
+ QCOMPARE(builder.indexOfClassInfo("foo"), -1);
+ QCOMPARE(builder.indexOfClassInfo("bar"), 0);
+ QCOMPARE(builder.indexOfClassInfo("baz"), -1);
+
+ // Check that nothing else changed.
+ QVERIFY(checkForSideEffects(builder, QMetaObjectBuilder::ClassInfos));
+}
+
+void tst_QMetaObjectBuilder::relatedMetaObject()
+{
+ QMetaObjectBuilder builder;
+
+ // Add two related meta objects and check their attributes.
+ QCOMPARE(builder.addRelatedMetaObject(&QObject::staticMetaObject), 0);
+ QCOMPARE(builder.addRelatedMetaObject(&staticMetaObject), 1);
+ QVERIFY(builder.relatedMetaObject(0) == &QObject::staticMetaObject);
+ QVERIFY(builder.relatedMetaObject(1) == &staticMetaObject);
+ QCOMPARE(builder.relatedMetaObjectCount(), 2);
+
+ // Remove the first one and check again.
+ builder.removeRelatedMetaObject(0);
+ QVERIFY(builder.relatedMetaObject(0) == &staticMetaObject);
+ QCOMPARE(builder.relatedMetaObjectCount(), 1);
+
+ // Check that nothing else changed.
+ QVERIFY(checkForSideEffects(builder, QMetaObjectBuilder::RelatedMetaObjects));
+}
+
+static int smetacall(QMetaObject::Call, int, void **)
+{
+ return 0;
+}
+
+void tst_QMetaObjectBuilder::staticMetacall()
+{
+ QMetaObjectBuilder builder;
+ QVERIFY(!builder.staticMetacallFunction());
+ builder.setStaticMetacallFunction(smetacall);
+ QVERIFY(builder.staticMetacallFunction() == smetacall);
+ QVERIFY(checkForSideEffects(builder, QMetaObjectBuilder::StaticMetacall));
+}
+
+// Copy the entire contents of a static QMetaObject and then check
+// that QMetaObjectBuilder will produce an exact copy as output.
+void tst_QMetaObjectBuilder::copyMetaObject()
+{
+ QMetaObjectBuilder builder(&QObject::staticMetaObject);
+ QMetaObject *meta = builder.toMetaObject();
+ QVERIFY(sameMetaObject(meta, &QObject::staticMetaObject));
+ qFree(meta);
+
+ QMetaObjectBuilder builder2(&staticMetaObject);
+ meta = builder2.toMetaObject();
+ QVERIFY(sameMetaObject(meta, &staticMetaObject));
+ qFree(meta);
+
+ QMetaObjectBuilder builder3(&SomethingOfEverything::staticMetaObject);
+ meta = builder3.toMetaObject();
+ QVERIFY(sameMetaObject(meta, &SomethingOfEverything::staticMetaObject));
+ qFree(meta);
+}
+
+// Serialize and deserialize a meta object and check that
+// it round-trips to the exact same value.
+void tst_QMetaObjectBuilder::serialize()
+{
+ // Full QMetaObjectBuilder
+ {
+ QMetaObjectBuilder builder(&SomethingOfEverything::staticMetaObject);
+ QMetaObject *meta = builder.toMetaObject();
+
+ QByteArray data;
+ QDataStream stream(&data, QIODevice::WriteOnly | QIODevice::Append);
+ builder.serialize(stream);
+
+ QMetaObjectBuilder builder2;
+ QDataStream stream2(data);
+ QMap<QByteArray, const QMetaObject *> references;
+ references.insert(QByteArray("QLocale"), &QLocale::staticMetaObject);
+ builder2.deserialize(stream2, references);
+ builder2.setStaticMetacallFunction(builder.staticMetacallFunction());
+ QMetaObject *meta2 = builder2.toMetaObject();
+
+ QVERIFY(sameMetaObject(meta, meta2));
+ qFree(meta);
+ qFree(meta2);
+ }
+
+ // Partial QMetaObjectBuilder
+ {
+ QMetaObjectBuilder builder;
+ builder.setClassName("Test");
+ builder.addProperty("foo", "int");
+
+ QByteArray data;
+ QDataStream stream(&data, QIODevice::WriteOnly | QIODevice::Append);
+ builder.serialize(stream);
+
+ QMetaObjectBuilder builder2;
+ QDataStream stream2(data);
+ builder2.deserialize(stream2, QMap<QByteArray, const QMetaObject *>());
+
+ QCOMPARE(builder.superClass(), builder2.superClass());
+ QCOMPARE(builder.className(), builder2.className());
+ QCOMPARE(builder.propertyCount(), builder2.propertyCount());
+ QCOMPARE(builder.property(0).name(), builder2.property(0).name());
+ QCOMPARE(builder.property(0).type(), builder2.property(0).type());
+ }
+}
+
+// Check that removing a method updates notify signals appropriately
+void tst_QMetaObjectBuilder::removeNotifySignal()
+{
+ QMetaObjectBuilder builder;
+
+ QMetaMethodBuilder method1 = builder.addSignal("foo(const QString&, int)");
+ QMetaMethodBuilder method2 = builder.addSignal("bar(QString)");
+
+ // Setup property
+ QMetaPropertyBuilder prop = builder.addProperty("prop", "const QString &");
+ prop.setNotifySignal(method2);
+ QVERIFY(prop.hasNotifySignal());
+ QCOMPARE(prop.notifySignal().index(), 1);
+
+ // Remove non-notify signal
+ builder.removeMethod(0);
+ QVERIFY(prop.hasNotifySignal());
+ QCOMPARE(prop.notifySignal().index(), 0);
+
+ // Remove notify signal
+ builder.removeMethod(0);
+ QVERIFY(!prop.hasNotifySignal());
+}
+
+// Check that the only changes to a "builder" relative to the default
+// state is specified by "members".
+bool tst_QMetaObjectBuilder::checkForSideEffects
+ (const QMetaObjectBuilder& builder,
+ QMetaObjectBuilder::AddMembers members)
+{
+ if ((members & QMetaObjectBuilder::ClassName) == 0) {
+ if (!builder.className().isEmpty())
+ return false;
+ }
+
+ if ((members & QMetaObjectBuilder::SuperClass) == 0) {
+ if (builder.superClass() != &QObject::staticMetaObject)
+ return false;
+ }
+
+ if ((members & QMetaObjectBuilder::Methods) == 0) {
+ if (builder.methodCount() != 0)
+ return false;
+ }
+
+ if ((members & QMetaObjectBuilder::Constructors) == 0) {
+ if (builder.constructorCount() != 0)
+ return false;
+ }
+
+ if ((members & QMetaObjectBuilder::Properties) == 0) {
+ if (builder.propertyCount() != 0)
+ return false;
+ }
+
+ if ((members & QMetaObjectBuilder::Enumerators) == 0) {
+ if (builder.enumeratorCount() != 0)
+ return false;
+ }
+
+ if ((members & QMetaObjectBuilder::ClassInfos) == 0) {
+ if (builder.classInfoCount() != 0)
+ return false;
+ }
+
+ if ((members & QMetaObjectBuilder::RelatedMetaObjects) == 0) {
+ if (builder.relatedMetaObjectCount() != 0)
+ return false;
+ }
+
+ if ((members & QMetaObjectBuilder::StaticMetacall) == 0) {
+ if (builder.staticMetacallFunction() != 0)
+ return false;
+ }
+
+ return true;
+}
+
+static bool sameMethod(const QMetaMethod& method1, const QMetaMethod& method2)
+{
+ if (QByteArray(method1.signature()) != QByteArray(method2.signature()))
+ return false;
+
+ if (QByteArray(method1.typeName()) != QByteArray(method2.typeName()))
+ return false;
+
+ if (method1.parameterNames() != method2.parameterNames())
+ return false;
+
+ if (QByteArray(method1.tag()) != QByteArray(method2.tag()))
+ return false;
+
+ if (method1.access() != method2.access())
+ return false;
+
+ if (method1.methodType() != method2.methodType())
+ return false;
+
+ if (method1.attributes() != method2.attributes())
+ return false;
+
+ return true;
+}
+
+static bool sameProperty(const QMetaProperty& prop1, const QMetaProperty& prop2)
+{
+ if (QByteArray(prop1.name()) != QByteArray(prop2.name()))
+ return false;
+
+ if (QByteArray(prop1.typeName()) != QByteArray(prop2.typeName()))
+ return false;
+
+ if (prop1.isReadable() != prop2.isReadable() ||
+ prop1.isWritable() != prop2.isWritable() ||
+ prop1.isResettable() != prop2.isResettable() ||
+ prop1.isDesignable() != prop2.isDesignable() ||
+ prop1.isScriptable() != prop2.isScriptable() ||
+ prop1.isStored() != prop2.isStored() ||
+ prop1.isEditable() != prop2.isEditable() ||
+ prop1.isUser() != prop2.isUser() ||
+ prop1.isFlagType() != prop2.isFlagType() ||
+ prop1.isEnumType() != prop2.isEnumType() ||
+ prop1.hasNotifySignal() != prop2.hasNotifySignal() ||
+ prop1.hasStdCppSet() != prop2.hasStdCppSet())
+ return false;
+
+ if (prop1.hasNotifySignal()) {
+ if (prop1.notifySignalIndex() != prop2.notifySignalIndex())
+ return false;
+ }
+
+ return true;
+}
+
+static bool sameEnumerator(const QMetaEnum& enum1, const QMetaEnum& enum2)
+{
+ if (QByteArray(enum1.name()) != QByteArray(enum2.name()))
+ return false;
+
+ if (enum1.isFlag() != enum2.isFlag())
+ return false;
+
+ if (enum1.keyCount() != enum2.keyCount())
+ return false;
+
+ for (int index = 0; index < enum1.keyCount(); ++index) {
+ if (QByteArray(enum1.key(index)) != QByteArray(enum2.key(index)))
+ return false;
+ if (enum1.value(index) != enum2.value(index))
+ return false;
+ }
+
+ if (QByteArray(enum1.scope()) != QByteArray(enum2.scope()))
+ return false;
+
+ return true;
+}
+
+// Determine if two meta objects are identical.
+bool tst_QMetaObjectBuilder::sameMetaObject
+ (const QMetaObject *meta1, const QMetaObject *meta2)
+{
+ int index;
+
+ if (strcmp(meta1->className(), meta2->className()) != 0)
+ return false;
+
+ if (meta1->superClass() != meta2->superClass())
+ return false;
+
+ if (meta1->constructorCount() != meta2->constructorCount() ||
+ meta1->methodCount() != meta2->methodCount() ||
+ meta1->enumeratorCount() != meta2->enumeratorCount() ||
+ meta1->propertyCount() != meta2->propertyCount() ||
+ meta1->classInfoCount() != meta2->classInfoCount())
+ return false;
+
+ for (index = 0; index < meta1->constructorCount(); ++index) {
+ if (!sameMethod(meta1->constructor(index), meta2->constructor(index)))
+ return false;
+ }
+
+ for (index = 0; index < meta1->methodCount(); ++index) {
+ if (!sameMethod(meta1->method(index), meta2->method(index)))
+ return false;
+ }
+
+ for (index = 0; index < meta1->propertyCount(); ++index) {
+ if (!sameProperty(meta1->property(index), meta2->property(index)))
+ return false;
+ }
+
+ for (index = 0; index < meta1->enumeratorCount(); ++index) {
+ if (!sameEnumerator(meta1->enumerator(index), meta2->enumerator(index)))
+ return false;
+ }
+
+ for (index = 0; index < meta1->classInfoCount(); ++index) {
+ if (QByteArray(meta1->classInfo(index).name()) !=
+ QByteArray(meta2->classInfo(index).name()))
+ return false;
+ if (QByteArray(meta1->classInfo(index).value()) !=
+ QByteArray(meta2->classInfo(index).value()))
+ return false;
+ }
+
+ const QMetaObject **objects1 = 0;
+ const QMetaObject **objects2 = 0;
+ if (meta1->d.data[0] == meta2->d.data[0] && meta1->d.data[0] >= 2) {
+ QMetaObjectExtraData *extra1 = (QMetaObjectExtraData *)(meta1->d.extradata);
+ QMetaObjectExtraData *extra2 = (QMetaObjectExtraData *)(meta2->d.extradata);
+ if (extra1 && !extra2)
+ return false;
+ if (extra2 && !extra1)
+ return false;
+ if (extra1 && extra2) {
+ if (extra1->static_metacall != extra2->static_metacall)
+ return false;
+ objects1 = extra1->objects;
+ objects2 = extra1->objects;
+ }
+ } else if (meta1->d.data[0] == meta2->d.data[0] && meta1->d.data[0] == 1) {
+ objects1 = (const QMetaObject **)(meta1->d.extradata);
+ objects2 = (const QMetaObject **)(meta2->d.extradata);
+ }
+ if (objects1 && !objects2)
+ return false;
+ if (objects2 && !objects1)
+ return false;
+ if (objects1 && objects2) {
+ while (*objects1 != 0 && *objects2 != 0) {
+ if (*objects1 != *objects2)
+ return false;
+ ++objects1;
+ ++objects2;
+ }
+ }
+
+ return true;
+}
+
+QTEST_MAIN(tst_QMetaObjectBuilder)
+
+#include "tst_qmetaobjectbuilder.moc"
diff --git a/tests/auto/declarative/qpacketprotocol/qpacketprotocol.pro b/tests/auto/declarative/qpacketprotocol/qpacketprotocol.pro
new file mode 100644
index 0000000000..f42cecca2c
--- /dev/null
+++ b/tests/auto/declarative/qpacketprotocol/qpacketprotocol.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += network declarative
+macx:CONFIG -= app_bundle
+
+HEADERS += ../shared/debugutil_p.h
+SOURCES += tst_qpacketprotocol.cpp \
+ ../shared/debugutil.cpp
diff --git a/tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp b/tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp
new file mode 100644
index 0000000000..2621d658be
--- /dev/null
+++ b/tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp
@@ -0,0 +1,271 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QSignalSpy>
+#include <QTimer>
+#include <QTcpSocket>
+#include <QTcpServer>
+#include <QDebug>
+#include <QBuffer>
+
+#include <private/qpacketprotocol_p.h>
+
+#include "../shared/debugutil_p.h"
+
+class tst_QPacketProtocol : public QObject
+{
+ Q_OBJECT
+
+private:
+ QTcpServer *m_server;
+ QTcpSocket *m_client;
+ QTcpSocket *m_serverConn;
+
+private slots:
+ void init();
+ void cleanup();
+
+ void maximumPacketSize();
+ void setMaximumPacketSize();
+ void setMaximumPacketSize_data();
+ void send();
+ void send_data();
+ void packetsAvailable();
+ void packetsAvailable_data();
+ void clear();
+ void read();
+ void device();
+
+ void tst_QPacket_clear();
+};
+
+void tst_QPacketProtocol::init()
+{
+ m_server = new QTcpServer(this);
+ m_serverConn = 0;
+ QVERIFY(m_server->listen(QHostAddress("127.0.0.1")));
+
+ m_client = new QTcpSocket(this);
+ m_client->connectToHost(m_server->serverAddress(), m_server->serverPort());
+
+ QVERIFY(m_client->waitForConnected());
+ QVERIFY(m_server->waitForNewConnection());
+ m_serverConn = m_server->nextPendingConnection();
+}
+
+void tst_QPacketProtocol::cleanup()
+{
+ delete m_client;
+ delete m_serverConn;
+ delete m_server;
+}
+
+void tst_QPacketProtocol::maximumPacketSize()
+{
+ QPacketProtocol p(m_client);
+ QCOMPARE(p.maximumPacketSize(), 0x7FFFFFFF);
+}
+
+void tst_QPacketProtocol::setMaximumPacketSize()
+{
+ QFETCH(qint32, size);
+ QFETCH(qint32, expected);
+
+ QPacketProtocol out(m_serverConn);
+ QCOMPARE(out.setMaximumPacketSize(size), expected);
+
+ if (size == expected) {
+ QPacketProtocol in(m_client);
+ QByteArray b;
+ b.fill('a', size + 1);
+ out.send() << b.constData();
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&in, SIGNAL(invalidPacket())));
+ }
+}
+
+void tst_QPacketProtocol::setMaximumPacketSize_data()
+{
+ QTest::addColumn<int>("size");
+ QTest::addColumn<int>("expected");
+
+ QTest::newRow("invalid") << qint32(sizeof(qint32) - 1) << qint32(0x7FFFFFFF);
+ QTest::newRow("still invalid") << qint32(sizeof(qint32)) << qint32(0x7FFFFFFF);
+ QTest::newRow("valid") << qint32(sizeof(qint32) + 1) << qint32(sizeof(qint32) + 1);
+}
+
+void tst_QPacketProtocol::send()
+{
+ QFETCH(bool, useAutoSend);
+
+ QPacketProtocol in(m_client);
+ QPacketProtocol out(m_serverConn);
+
+ QByteArray ba;
+ int num;
+
+ if (useAutoSend) {
+ out.send() << "Hello world" << 123;
+ } else {
+ QPacket packet;
+ packet << "Hello world" << 123;
+ out.send(packet);
+ }
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&in, SIGNAL(readyRead())));
+
+ QPacket p = in.read();
+ p >> ba >> num;
+ QCOMPARE(ba, QByteArray("Hello world") + '\0');
+ QCOMPARE(num, 123);
+}
+
+void tst_QPacketProtocol::send_data()
+{
+ QTest::addColumn<bool>("useAutoSend");
+
+ QTest::newRow("auto send") << true;
+ QTest::newRow("no auto send") << false;
+}
+
+void tst_QPacketProtocol::packetsAvailable()
+{
+ QFETCH(int, packetCount);
+
+ QPacketProtocol out(m_client);
+ QPacketProtocol in(m_serverConn);
+
+ QCOMPARE(out.packetsAvailable(), qint64(0));
+ QCOMPARE(in.packetsAvailable(), qint64(0));
+
+ for (int i=0; i<packetCount; i++)
+ out.send() << "Hello";
+
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&in, SIGNAL(readyRead())));
+ QCOMPARE(in.packetsAvailable(), qint64(packetCount));
+}
+
+void tst_QPacketProtocol::packetsAvailable_data()
+{
+ QTest::addColumn<int>("packetCount");
+
+ QTest::newRow("1") << 1;
+ QTest::newRow("2") << 2;
+ QTest::newRow("10") << 10;
+}
+
+void tst_QPacketProtocol::clear()
+{
+ QPacketProtocol in(m_client);
+ QPacketProtocol out(m_serverConn);
+
+ out.send() << 123;
+ out.send() << 456;
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&in, SIGNAL(readyRead())));
+
+ in.clear();
+ QVERIFY(in.read().isEmpty());
+}
+
+void tst_QPacketProtocol::read()
+{
+ QPacketProtocol in(m_client);
+ QPacketProtocol out(m_serverConn);
+
+ QVERIFY(in.read().isEmpty());
+
+ out.send() << 123;
+ out.send() << 456;
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&in, SIGNAL(readyRead())));
+
+ int num;
+
+ QPacket p1 = in.read();
+ QVERIFY(!p1.isEmpty());
+ p1 >> num;
+ QCOMPARE(num, 123);
+
+ QPacket p2 = in.read();
+ QVERIFY(!p2.isEmpty());
+ p2 >> num;
+ QCOMPARE(num, 456);
+
+ QVERIFY(in.read().isEmpty());
+}
+
+void tst_QPacketProtocol::device()
+{
+ QPacketProtocol p(m_client);
+ QCOMPARE(p.device(), m_client);
+}
+
+void tst_QPacketProtocol::tst_QPacket_clear()
+{
+ QPacketProtocol protocol(m_client);
+
+ QPacket packet;
+
+ packet << "Hello world!" << 123;
+ protocol.send(packet);
+
+ packet.clear();
+ QVERIFY(packet.isEmpty());
+ packet << "Goodbyte world!" << 789;
+ protocol.send(packet);
+
+ QByteArray ba;
+ int num;
+ QPacketProtocol in(m_serverConn);
+ QVERIFY(QDeclarativeDebugTest::waitForSignal(&in, SIGNAL(readyRead())));
+
+ QPacket p1 = in.read();
+ p1 >> ba >> num;
+ QCOMPARE(ba, QByteArray("Hello world!") + '\0');
+ QCOMPARE(num, 123);
+
+ QPacket p2 = in.read();
+ p2 >> ba >> num;
+ QCOMPARE(ba, QByteArray("Goodbyte world!") + '\0');
+ QCOMPARE(num, 789);
+}
+
+QTEST_MAIN(tst_QPacketProtocol)
+
+#include "tst_qpacketprotocol.moc"
diff --git a/tests/auto/declarative/runall.sh b/tests/auto/declarative/runall.sh
new file mode 100755
index 0000000000..62e03e3155
--- /dev/null
+++ b/tests/auto/declarative/runall.sh
@@ -0,0 +1,100 @@
+#!/bin/sh
+#
+#############################################################################
+##
+## 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 test suite of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## No Commercial Usage
+## This file contains pre-release code and may not be distributed.
+## You may use this file in accordance with the terms and conditions
+## contained in the Technology Preview License Agreement accompanying
+## this package.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 2.1 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 2.1 requirements
+## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+##
+## In addition, as a special exception, Nokia gives you certain additional
+## rights. These rights are described in the Nokia Qt LGPL Exception
+## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+##
+## If you have questions regarding the use of this file, please contact
+## Nokia at qt-info@nokia.com.
+##
+##
+##
+##
+##
+##
+##
+##
+## $QT_END_LICENSE$
+##
+############################################################################/
+
+if [ "$(uname)" = Linux ]
+then
+ Xnest :7 2>/dev/null &
+ sleep 1
+ trap "kill $!" EXIT
+ export DISPLAY=:7
+ export LANG=en_US
+ kwin 2>/dev/null &
+ sleep 1
+fi
+
+function filter
+{
+ exe=$1
+ skip=0
+ while read line
+ do
+ if [ $skip != 0 ]
+ then
+ let skip=skip-1
+ else
+ case "$line" in
+ make*Error) echo "$line";;
+ make*Stop) echo "$line";;
+ /*/bin/make*) ;;
+ make*) ;;
+ install*) ;;
+ QDeclarativeDebugServer:*Waiting*) ;;
+ QDeclarativeDebugServer:*Connection*) ;;
+ */qmake*) ;;
+ */bin/moc*) ;;
+ *targ.debug*) ;;
+ g++*) ;;
+ cd*) ;;
+ XFAIL*) skip=1;;
+ SKIP*) skip=1;;
+ PASS*) ;;
+ QDEBUG*) ;;
+ Makefile*) ;;
+ Config*) ;;
+ Totals*) ;;
+ \**) ;;
+ ./*) ;;
+ *tst_*) echo "$line" ;;
+ *) echo "$exe: $line"
+ esac
+ fi
+ done
+}
+
+make -k -j1 install 2>&1 | filter build
+for exe in $(make install | sed -n 's/^install .* "\([^"]*qt4\/tst_[^"]*\)".*/\1/p')
+do
+ echo $exe
+ $exe 2>&1 | filter $exe
+done
+
diff --git a/tests/auto/declarative/shared/debugutil.cpp b/tests/auto/declarative/shared/debugutil.cpp
new file mode 100644
index 0000000000..66f04e5edf
--- /dev/null
+++ b/tests/auto/declarative/shared/debugutil.cpp
@@ -0,0 +1,179 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QSignalSpy>
+#include <QEventLoop>
+#include <QTimer>
+
+#include <private/qdeclarativedebugclient_p.h>
+#include <private/qdeclarativedebugservice_p.h>
+
+#include "debugutil_p.h"
+
+#include <iostream>
+
+bool QDeclarativeDebugTest::waitForSignal(QObject *receiver, const char *member, int timeout) {
+ QEventLoop loop;
+ QTimer timer;
+ QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
+ QObject::connect(receiver, member, &loop, SLOT(quit()));
+ timer.start(timeout);
+ loop.exec();
+ return timer.isActive();
+}
+
+
+QDeclarativeDebugTestData::QDeclarativeDebugTestData(QEventLoop *el)
+ : exitCode(-1), loop(el)
+{
+}
+
+QDeclarativeDebugTestData::~QDeclarativeDebugTestData()
+{
+ qDeleteAll(items);
+}
+
+void QDeclarativeDebugTestData::testsFinished(int code)
+{
+ exitCode = code;
+ loop->quit();
+}
+
+
+
+QDeclarativeDebugTestService::QDeclarativeDebugTestService(const QString &s, QObject *parent)
+ : QDeclarativeDebugService(s, parent), enabled(false)
+{
+}
+
+void QDeclarativeDebugTestService::messageReceived(const QByteArray &ba)
+{
+ sendMessage(ba);
+}
+
+void QDeclarativeDebugTestService::enabledChanged(bool e)
+{
+ enabled = e;
+ emit enabledStateChanged();
+}
+
+
+QDeclarativeDebugTestClient::QDeclarativeDebugTestClient(const QString &s, QDeclarativeDebugConnection *c)
+ : QDeclarativeDebugClient(s, c)
+{
+}
+
+QByteArray QDeclarativeDebugTestClient::waitForResponse()
+{
+ lastMsg.clear();
+ QDeclarativeDebugTest::waitForSignal(this, SIGNAL(serverMessage(QByteArray)));
+ if (lastMsg.isEmpty()) {
+ qWarning() << "tst_QDeclarativeDebugClient: no response from server!";
+ return QByteArray();
+ }
+ return lastMsg;
+}
+
+void QDeclarativeDebugTestClient::messageReceived(const QByteArray &ba)
+{
+ lastMsg = ba;
+ emit serverMessage(ba);
+}
+
+
+tst_QDeclarativeDebug_Thread::tst_QDeclarativeDebug_Thread(QDeclarativeDebugTestData *data, QDeclarativeTestFactory *factory)
+ : m_data(data), m_factory(factory)
+{
+}
+
+void tst_QDeclarativeDebug_Thread::run()
+{
+ bool ok = false;
+
+ QDeclarativeDebugConnection conn;
+ conn.connectToHost("127.0.0.1", 3768);
+ ok = conn.waitForConnected();
+ Q_ASSERT(ok);
+
+ QEventLoop loop;
+ connect(m_data, SIGNAL(engineCreated()), &loop, SLOT(quit()));
+ loop.exec();
+
+ m_data->conn = &conn;
+
+ Q_ASSERT(m_factory);
+ QObject *test = m_factory->createTest(m_data);
+ Q_ASSERT(test);
+ int code = QTest::qExec(test, QCoreApplication::arguments());
+ delete test;
+ emit testsFinished(code);
+}
+
+int QDeclarativeDebugTest::runTests(QDeclarativeTestFactory *factory, const QList<QByteArray> &qml)
+{
+ qputenv("QML_DEBUG_SERVER_PORT", "3768");
+
+ QEventLoop loop;
+ QDeclarativeDebugTestData data(&loop);
+
+ tst_QDeclarativeDebug_Thread thread(&data, factory);
+ QObject::connect(&thread, SIGNAL(testsFinished(int)), &data, SLOT(testsFinished(int)));
+
+ QDeclarativeDebugService::notifyOnServerStart(&thread, "start");
+
+ QDeclarativeEngine engine; // blocks until client connects
+
+ foreach (const QByteArray &code, qml) {
+ QDeclarativeComponent c(&engine);
+ c.setData(code, QUrl::fromLocalFile(""));
+ Q_ASSERT(c.isReady()); // fails if bad syntax
+ data.items << qobject_cast<QDeclarativeItem*>(c.create());
+ }
+
+ // start the test
+ data.engine = &engine;
+ emit data.engineCreated();
+
+ loop.exec();
+ thread.wait();
+
+ return data.exitCode;
+}
+
diff --git a/tests/auto/declarative/shared/debugutil_p.h b/tests/auto/declarative/shared/debugutil_p.h
new file mode 100644
index 0000000000..c152b5a604
--- /dev/null
+++ b/tests/auto/declarative/shared/debugutil_p.h
@@ -0,0 +1,150 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QSignalSpy>
+#include <QEventLoop>
+#include <QPointer>
+#include <QTimer>
+#include <QThread>
+#include <QTest>
+
+#include <QtDeclarative/qdeclarativeengine.h>
+
+#include <private/qdeclarativedebugclient_p.h>
+#include <private/qdeclarativedebugservice_p.h>
+#include <private/qdeclarativeitem_p.h>
+
+class QDeclarativeTestFactory;
+
+class QDeclarativeDebugTest
+{
+public:
+ static bool waitForSignal(QObject *receiver, const char *member, int timeout = 5000);
+
+ static int runTests(QDeclarativeTestFactory *factory, const QList<QByteArray> &qml = QList<QByteArray>());
+};
+
+class QDeclarativeDebugTestData : public QObject
+{
+ Q_OBJECT
+public:
+ QDeclarativeDebugTestData(QEventLoop *el);
+
+ ~QDeclarativeDebugTestData();
+
+ QDeclarativeDebugConnection *conn;
+ QDeclarativeEngine *engine;
+
+ int exitCode;
+ QEventLoop *loop;
+
+ QList<QDeclarativeItem *> items;
+
+signals:
+ void engineCreated();
+
+public slots:
+ void testsFinished(int code);
+
+private:
+ friend class QDeclarativeDebugTest;
+};
+
+
+class QDeclarativeTestFactory
+{
+public:
+ QDeclarativeTestFactory() {}
+ virtual ~QDeclarativeTestFactory() {}
+
+ virtual QObject *createTest(QDeclarativeDebugTestData *data) = 0;
+};
+
+class QDeclarativeDebugTestService : public QDeclarativeDebugService
+{
+ Q_OBJECT
+public:
+ QDeclarativeDebugTestService(const QString &s, QObject *parent = 0);
+ bool enabled;
+
+signals:
+ void enabledStateChanged();
+
+protected:
+ virtual void messageReceived(const QByteArray &ba);
+
+ virtual void enabledChanged(bool e);
+};
+
+class QDeclarativeDebugTestClient : public QDeclarativeDebugClient
+{
+ Q_OBJECT
+public:
+ QDeclarativeDebugTestClient(const QString &s, QDeclarativeDebugConnection *c);
+
+ QByteArray waitForResponse();
+
+signals:
+ void serverMessage(const QByteArray &);
+
+protected:
+ virtual void messageReceived(const QByteArray &ba);
+
+private:
+ QByteArray lastMsg;
+};
+
+class tst_QDeclarativeDebug_Thread : public QThread
+{
+ Q_OBJECT
+public:
+ tst_QDeclarativeDebug_Thread(QDeclarativeDebugTestData *data, QDeclarativeTestFactory *factory);
+
+ void run();
+
+signals:
+ void testsFinished(int);
+
+private:
+ QDeclarativeDebugTestData *m_data;
+ QDeclarativeTestFactory *m_factory;
+};
+
+
diff --git a/tests/auto/declarative/shared/testhttpserver.cpp b/tests/auto/declarative/shared/testhttpserver.cpp
new file mode 100644
index 0000000000..5d563275f1
--- /dev/null
+++ b/tests/auto/declarative/shared/testhttpserver.cpp
@@ -0,0 +1,324 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "testhttpserver.h"
+#include <QTcpSocket>
+#include <QDebug>
+#include <QFile>
+#include <QTimer>
+
+/*!
+\internal
+\class TestHTTPServer
+\brief provides a very, very basic HTTP server for testing.
+
+Inside the test case, an instance of TestHTTPServer should be created, with the
+appropriate port to listen on. The server will listen on the localhost interface.
+
+Directories to serve can then be added to server, which will be added as "roots".
+Each root can be added as a Normal, Delay or Disconnect root. Requests for files
+within a Normal root are returned immediately. Request for files within a Delay
+root are delayed for 500ms, and then served. Requests for files within a Disconnect
+directory cause the server to disconnect immediately. A request for a file that isn't
+found in any root will return a 404 error.
+
+If you have the following directory structure:
+
+\code
+disconnect/disconnectTest.qml
+files/main.qml
+files/Button.qml
+files/content/WebView.qml
+slowFiles/slowMain.qml
+\endcode
+it can be added like this:
+\code
+TestHTTPServer server(14445);
+server.serveDirectory("disconnect", TestHTTPServer::Disconnect);
+server.serveDirectory("files");
+server.serveDirectory("slowFiles", TestHTTPServer::Delay);
+\endcode
+
+The following request urls will then result in the appropriate action:
+\table
+\header \o URL \o Action
+\row \o http://localhost:14445/disconnectTest.qml \o Disconnection
+\row \o http://localhost:14445/main.qml \o main.qml returned immediately
+\row \o http://localhost:14445/Button.qml \o Button.qml returned immediately
+\row \o http://localhost:14445/content/WebView.qml \o content/WebView.qml returned immediately
+\row \o http://localhost:14445/slowMain.qml \o slowMain.qml returned after 500ms
+\endtable
+*/
+TestHTTPServer::TestHTTPServer(quint16 port)
+: m_hasFailed(false)
+{
+ QObject::connect(&server, SIGNAL(newConnection()), this, SLOT(newConnection()));
+
+ server.listen(QHostAddress::LocalHost, port);
+}
+
+bool TestHTTPServer::isValid() const
+{
+ return server.isListening();
+}
+
+bool TestHTTPServer::serveDirectory(const QString &dir, Mode mode)
+{
+ dirs.append(qMakePair(dir, mode));
+ return true;
+}
+
+/*
+ Add an alias, so that if filename is requested and does not exist,
+ alias may be returned.
+*/
+void TestHTTPServer::addAlias(const QString &filename, const QString &alias)
+{
+ aliases.insert(filename, alias);
+}
+
+void TestHTTPServer::addRedirect(const QString &filename, const QString &redirectName)
+{
+ redirects.insert(filename, redirectName);
+}
+
+bool TestHTTPServer::wait(const QUrl &expect, const QUrl &reply, const QUrl &body)
+{
+ m_hasFailed = false;
+
+ QFile expectFile(expect.toLocalFile());
+ if (!expectFile.open(QIODevice::ReadOnly)) return false;
+
+ QFile replyFile(reply.toLocalFile());
+ if (!replyFile.open(QIODevice::ReadOnly)) return false;
+
+ bodyData = QByteArray();
+ if (body.isValid()) {
+ QFile bodyFile(body.toLocalFile());
+ if (!bodyFile.open(QIODevice::ReadOnly)) return false;
+ bodyData = bodyFile.readAll();
+ }
+
+ waitData = expectFile.readAll();
+ /*
+ while (waitData.endsWith('\n'))
+ waitData = waitData.left(waitData.count() - 1);
+ */
+
+ replyData = replyFile.readAll();
+
+ if (!replyData.endsWith('\n'))
+ replyData.append("\n");
+ replyData.append("Content-length: " + QByteArray::number(bodyData.length()));
+ replyData .append("\n\n");
+
+ for (int ii = 0; ii < replyData.count(); ++ii) {
+ if (replyData.at(ii) == '\n' && (!ii || replyData.at(ii - 1) != '\r')) {
+ replyData.insert(ii, '\r');
+ ++ii;
+ }
+ }
+ replyData.append(bodyData);
+
+ return true;
+}
+
+bool TestHTTPServer::hasFailed() const
+{
+ return m_hasFailed;
+}
+
+void TestHTTPServer::newConnection()
+{
+ QTcpSocket *socket = server.nextPendingConnection();
+ if (!socket) return;
+
+ if (!dirs.isEmpty())
+ dataCache.insert(socket, QByteArray());
+
+ QObject::connect(socket, SIGNAL(disconnected()), this, SLOT(disconnected()));
+ QObject::connect(socket, SIGNAL(readyRead()), this, SLOT(readyRead()));
+}
+
+void TestHTTPServer::disconnected()
+{
+ QTcpSocket *socket = qobject_cast<QTcpSocket *>(sender());
+ if (!socket) return;
+
+ dataCache.remove(socket);
+ for (int ii = 0; ii < toSend.count(); ++ii) {
+ if (toSend.at(ii).first == socket) {
+ toSend.removeAt(ii);
+ --ii;
+ }
+ }
+ socket->disconnect();
+ socket->deleteLater();
+}
+
+void TestHTTPServer::readyRead()
+{
+ QTcpSocket *socket = qobject_cast<QTcpSocket *>(sender());
+ if (!socket || socket->state() == QTcpSocket::ClosingState) return;
+
+ QByteArray ba = socket->readAll();
+
+ if (!dirs.isEmpty()) {
+ serveGET(socket, ba);
+ return;
+ }
+
+ if (m_hasFailed || waitData.isEmpty()) {
+ qWarning() << "TestHTTPServer: Unexpected data" << ba;
+ return;
+ }
+
+ for (int ii = 0; ii < ba.count(); ++ii) {
+ const char c = ba.at(ii);
+ if (c == '\r' && waitData.isEmpty())
+ continue;
+ else if (!waitData.isEmpty() && c == waitData.at(0))
+ waitData = waitData.mid(1);
+ else if (c == '\r')
+ continue;
+ else {
+ QByteArray data = ba.mid(ii);
+ qWarning() << "TestHTTPServer: Unexpected data" << data << "\nExpected: " << waitData;
+ m_hasFailed = true;
+ socket->disconnectFromHost();
+ return;
+ }
+ }
+
+ if (waitData.isEmpty()) {
+ socket->write(replyData);
+ socket->disconnectFromHost();
+ }
+}
+
+bool TestHTTPServer::reply(QTcpSocket *socket, const QByteArray &fileName)
+{
+ if (redirects.contains(fileName)) {
+ QByteArray response = "HTTP/1.1 302 Found\r\nContent-length: 0\r\nContent-type: text/html; charset=UTF-8\r\nLocation: " + redirects[fileName].toUtf8() + "\r\n\r\n";
+ socket->write(response);
+ return true;
+ }
+
+ for (int ii = 0; ii < dirs.count(); ++ii) {
+ QString dir = dirs.at(ii).first;
+ Mode mode = dirs.at(ii).second;
+
+ QString dirFile = dir + QLatin1String("/") + QLatin1String(fileName);
+
+ if (!QFile::exists(dirFile)) {
+ if (aliases.contains(fileName))
+ dirFile = dir + QLatin1String("/") + aliases.value(fileName);
+ }
+
+ QFile file(dirFile);
+ if (file.open(QIODevice::ReadOnly)) {
+
+ if (mode == Disconnect)
+ return true;
+
+ QByteArray data = file.readAll();
+
+ QByteArray response = "HTTP/1.0 200 OK\r\nContent-type: text/html; charset=UTF-8\r\nContent-length: ";
+ response += QByteArray::number(data.count());
+ response += "\r\n\r\n";
+ response += data;
+
+ if (mode == Delay) {
+ toSend.append(qMakePair(socket, response));
+ QTimer::singleShot(500, this, SLOT(sendOne()));
+ return false;
+ } else {
+ socket->write(response);
+ return true;
+ }
+ }
+ }
+
+
+ QByteArray response = "HTTP/1.0 404 Not found\r\nContent-type: text/html; charset=UTF-8\r\n\r\n";
+ socket->write(response);
+
+ return true;
+}
+
+void TestHTTPServer::sendOne()
+{
+ if (!toSend.isEmpty()) {
+ toSend.first().first->write(toSend.first().second);
+ toSend.first().first->close();
+ toSend.removeFirst();
+ }
+}
+
+void TestHTTPServer::serveGET(QTcpSocket *socket, const QByteArray &data)
+{
+ if (!dataCache.contains(socket))
+ return;
+
+ QByteArray total = dataCache[socket] + data;
+ dataCache[socket] = total;
+
+ if (total.contains("\n\r\n")) {
+
+ bool close = true;
+
+ if (total.startsWith("GET /")) {
+
+ int space = total.indexOf(' ', 4);
+ if (space != -1) {
+
+ QByteArray req = total.mid(5, space - 5);
+ close = reply(socket, req);
+
+ }
+ }
+ dataCache.remove(socket);
+
+ if (close)
+ socket->disconnectFromHost();
+ }
+}
+
diff --git a/tests/auto/declarative/shared/testhttpserver.h b/tests/auto/declarative/shared/testhttpserver.h
new file mode 100644
index 0000000000..638237d9d3
--- /dev/null
+++ b/tests/auto/declarative/shared/testhttpserver.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TESTHTTPSERVER_H
+#define TESTHTTPSERVER_H
+
+#include <QObject>
+#include <QTcpServer>
+#include <QUrl>
+#include <QPair>
+
+class TestHTTPServer : public QObject
+{
+ Q_OBJECT
+public:
+ TestHTTPServer(quint16 port);
+
+ bool isValid() const;
+
+ enum Mode { Normal, Delay, Disconnect };
+ bool serveDirectory(const QString &, Mode = Normal);
+
+ bool wait(const QUrl &expect, const QUrl &reply, const QUrl &body);
+ bool hasFailed() const;
+
+ void addAlias(const QString &filename, const QString &aliasName);
+ void addRedirect(const QString &filename, const QString &redirectName);
+
+private slots:
+ void newConnection();
+ void disconnected();
+ void readyRead();
+ void sendOne();
+
+private:
+ void serveGET(QTcpSocket *, const QByteArray &);
+ bool reply(QTcpSocket *, const QByteArray &);
+
+ QList<QPair<QString, Mode> > dirs;
+ QHash<QTcpSocket *, QByteArray> dataCache;
+ QList<QPair<QTcpSocket *, QByteArray> > toSend;
+
+ QByteArray waitData;
+ QByteArray replyData;
+ QByteArray bodyData;
+ bool m_hasFailed;
+
+ QHash<QString,QString> aliases;
+ QHash<QString,QString> redirects;
+
+ QTcpServer server;
+};
+
+#endif // TESTHTTPSERVER_H
+
diff --git a/tests/auto/declarative/sql/data/README b/tests/auto/declarative/sql/data/README
new file mode 100644
index 0000000000..7efca3a972
--- /dev/null
+++ b/tests/auto/declarative/sql/data/README
@@ -0,0 +1,3 @@
+These tests are executed in sequence - the database persist until the end of the
+testing. This is done to better exercise the persistence of the database, since
+that is how it is used.
diff --git a/tests/auto/declarative/sql/data/changeversion.js b/tests/auto/declarative/sql/data/changeversion.js
new file mode 100644
index 0000000000..680d7a652f
--- /dev/null
+++ b/tests/auto/declarative/sql/data/changeversion.js
@@ -0,0 +1,53 @@
+function test() {
+ var r="transaction_not_finished";
+
+ var db = openDatabaseSync("QmlTestDB-changeversion", "", "Test database from Qt autotests", 1000000,
+ function(db) {
+ db.changeVersion("","1.0")
+ db.transaction(function(tx){
+ tx.executeSql('CREATE TABLE Greeting(salutation TEXT, salutee TEXT)');
+ })
+ });
+
+ db.transaction(function(tx){
+ tx.executeSql('INSERT INTO Greeting VALUES ("Hello", "world")');
+ tx.executeSql('INSERT INTO Greeting VALUES ("Goodbye", "cruel world")');
+ });
+
+
+ db = openDatabaseSync("QmlTestDB-changeversion", "", "Test database from Qt autotests", 1000000);
+
+ if (db.version == "1.0")
+ db.changeVersion("1.0","2.0",function(tx)
+ {
+ tx.executeSql('CREATE TABLE Utterance(type TEXT, phrase TEXT)')
+ var rs = tx.executeSql('SELECT * FROM Greeting');
+ for (var i=0; i<rs.rows.length; ++i) {
+ var type = "Greeting";
+ var phrase = rs.rows.item(i).salutation + ", " + rs.rows.item(i).salutee;
+ if (rs.rows.item(i).salutation == "Goodbye"
+ || rs.rows.item(i).salutation == "Farewell"
+ || rs.rows.item(i).salutation == "Good-bye") type = "Valediction";
+ var ins = tx.executeSql('INSERT INTO Utterance VALUES(?,?)',[type,phrase]);
+ }
+ tx.executeSql('DROP TABLE Greeting');
+ });
+ else
+ return "db.version should be 1.0, but is " + db.version;
+
+ var db = openDatabaseSync("QmlTestDB-changeversion", "2.0", "Test database from Qt autotests", 1000000);
+
+ db.transaction(function(tx){
+ var rs = tx.executeSql('SELECT * FROM Utterance');
+ r = ""
+ for (var i=0; i<rs.rows.length; ++i) {
+ r += "(" + rs.rows.item(i).type + ": " + rs.rows.item(i).phrase + ")";
+ }
+ if (r == "(Greeting: Hello, world)(Valediction: Goodbye, cruel world)")
+ r = "passed"
+ else
+ r = "WRONG DATA: " + r;
+ })
+
+ return r;
+}
diff --git a/tests/auto/declarative/sql/data/creation-a.js b/tests/auto/declarative/sql/data/creation-a.js
new file mode 100644
index 0000000000..bd7d5c5022
--- /dev/null
+++ b/tests/auto/declarative/sql/data/creation-a.js
@@ -0,0 +1,18 @@
+function test() {
+ var r="transaction_not_finished";
+
+ var db = openDatabaseSync("QmlTestDB-creation-a", "1.0", "Test database from Qt autotests", 1000000,
+ function(db) {
+ db.transaction(function(tx){
+ tx.executeSql('CREATE TABLE Greeting(salutation TEXT, salutee TEXT)');
+ r = "passed";
+ })
+ });
+
+ var db = openDatabaseSync("QmlTestDB-creation-a", "1.0", "Test database from Qt autotests", 1000000,
+ function(db) {
+ r = "FAILED: should have already been created";
+ });
+
+ return r;
+}
diff --git a/tests/auto/declarative/sql/data/creation.js b/tests/auto/declarative/sql/data/creation.js
new file mode 100644
index 0000000000..317b4c1564
--- /dev/null
+++ b/tests/auto/declarative/sql/data/creation.js
@@ -0,0 +1,14 @@
+function test() {
+ var r="transaction_not_finished";
+ var db = openDatabaseSync("QmlTestDB-creation", "1.0", "Test database from Qt autotests", 1000000);
+
+ db.transaction(
+ function(tx) {
+ tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)');
+ tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]);
+ r = "passed";
+ }
+ );
+
+ return r;
+}
diff --git a/tests/auto/declarative/sql/data/error-a.js b/tests/auto/declarative/sql/data/error-a.js
new file mode 100644
index 0000000000..10a23f68f7
--- /dev/null
+++ b/tests/auto/declarative/sql/data/error-a.js
@@ -0,0 +1,20 @@
+function test() {
+ var db = openDatabaseSync("QmlTestDB-error-a", "1.0", "Test database from Qt autotests", 1000000);
+ var r="transaction_not_finished";
+
+ try {
+ db.transaction(
+ function(tx) {
+ var rs = tx.executeSql('SELECT * FROM NotExists');
+ r = "SHOULD NOT SUCCEED";
+ }
+ );
+ } catch (err) {
+ if (err.message == "no such table: NotExists Unable to execute statement")
+ r = "passed";
+ else
+ r = "WRONG ERROR="+err.message;
+ }
+
+ return r;
+}
diff --git a/tests/auto/declarative/sql/data/error-b.js b/tests/auto/declarative/sql/data/error-b.js
new file mode 100644
index 0000000000..4dd0ecf2af
--- /dev/null
+++ b/tests/auto/declarative/sql/data/error-b.js
@@ -0,0 +1,13 @@
+function test() {
+ var db = openDatabaseSync("QmlTestDB-error-b", "1.0", "Test database from Qt autotests", 1000000);
+ var r="transaction_not_finished";
+
+ db.transaction(
+ function(tx) {
+ tx.executeSql('INSERT INTO Greeting VALUES("junk","junk")');
+ notexist[123] = "oops"
+ }
+ );
+
+ return r;
+}
diff --git a/tests/auto/declarative/sql/data/error-creation.js b/tests/auto/declarative/sql/data/error-creation.js
new file mode 100644
index 0000000000..92245fd7b4
--- /dev/null
+++ b/tests/auto/declarative/sql/data/error-creation.js
@@ -0,0 +1,12 @@
+function test() {
+ var r="transaction_not_finished";
+ try {
+ var db = openDatabaseSync("QmlTestDB-creation", "2.0", "Test database from Qt autotests", 1000000);
+ } catch (err) {
+ if (err.message == "SQL: database version mismatch")
+ r = "passed";
+ else
+ r = "WRONG ERROR="+err.message;
+ }
+ return r;
+}
diff --git a/tests/auto/declarative/sql/data/error-notransaction.js b/tests/auto/declarative/sql/data/error-notransaction.js
new file mode 100644
index 0000000000..b9cc6475a6
--- /dev/null
+++ b/tests/auto/declarative/sql/data/error-notransaction.js
@@ -0,0 +1,15 @@
+function test() {
+ var db = openDatabaseSync("QmlTestDB-data/error-notransaction", "1.0", "Test database from Qt autotests", 1000000);
+ var r="transaction_not_finished";
+
+ try {
+ db.transaction();
+ } catch (err) {
+ if (err.message == "transaction: missing callback")
+ r = "passed";
+ else
+ r = "WRONG ERROR="+err.message;
+ }
+
+ return r;
+}
diff --git a/tests/auto/declarative/sql/data/error-outsidetransaction.js b/tests/auto/declarative/sql/data/error-outsidetransaction.js
new file mode 100644
index 0000000000..a7af3bddbc
--- /dev/null
+++ b/tests/auto/declarative/sql/data/error-outsidetransaction.js
@@ -0,0 +1,17 @@
+function test() {
+ var db = openDatabaseSync("QmlTestDB-data/error-notransaction", "1.0", "Test database from Qt autotests", 1000000);
+ var r="transaction_not_finished";
+ var v;
+
+ try {
+ db.transaction(function(tx) { v = tx });
+ v.executeSql("SELECT 'bad'")
+ } catch (err) {
+ if (err.message == "executeSql called outside transaction()")
+ r = "passed";
+ else
+ r = "WRONG ERROR="+err.message;
+ }
+
+ return r;
+}
diff --git a/tests/auto/declarative/sql/data/iteration-forwardonly.js b/tests/auto/declarative/sql/data/iteration-forwardonly.js
new file mode 100644
index 0000000000..45947c08a7
--- /dev/null
+++ b/tests/auto/declarative/sql/data/iteration-forwardonly.js
@@ -0,0 +1,29 @@
+function test() {
+ var db = openDatabaseSync("QmlTestDB-iteration-forwardonly", "", "Test database from Qt autotests", 1000000);
+ var r="transaction_not_finished";
+
+ db.transaction(
+ function(tx) {
+ tx.executeSql('CREATE TABLE Greeting(salutation TEXT, salutee TEXT)');
+ tx.executeSql('INSERT INTO Greeting VALUES ("Hello", "world")');
+ tx.executeSql('INSERT INTO Greeting VALUES ("Goodbye", "cruel world")');
+ }
+ )
+
+ db.transaction(
+ function(tx) {
+ var rs = tx.executeSql('SELECT * FROM Greeting');
+ rs.forwardOnly = !rs.forwardOnly
+ var r1=""
+ for(var i = 0; i < rs.rows.length; i++)
+ r1 += rs.rows.item(i).salutation + ", " + rs.rows.item(i).salutee + ";"
+ if (r1 != "hello, world;hello, world;hello, world;hello, world;")
+ if (r1 != "Hello, world;Goodbye, cruel world;")
+ r = "SELECTED DATA WRONG: "+r1;
+ else
+ r = "passed";
+ }
+ );
+
+ return r;
+}
diff --git a/tests/auto/declarative/sql/data/iteration.js b/tests/auto/declarative/sql/data/iteration.js
new file mode 100644
index 0000000000..c34cbbb391
--- /dev/null
+++ b/tests/auto/declarative/sql/data/iteration.js
@@ -0,0 +1,28 @@
+function test() {
+ var db = openDatabaseSync("QmlTestDB-iteration", "", "Test database from Qt autotests", 1000000);
+ var r="transaction_not_finished";
+
+ db.transaction(
+ function(tx) {
+ tx.executeSql('CREATE TABLE Greeting(salutation TEXT, salutee TEXT)');
+ tx.executeSql('INSERT INTO Greeting VALUES ("Hello", "world")');
+ tx.executeSql('INSERT INTO Greeting VALUES ("Goodbye", "cruel world")');
+ }
+ )
+
+ db.transaction(
+ function(tx) {
+ var rs = tx.executeSql('SELECT * FROM Greeting');
+ var r1=""
+ for(var i = 0; i < rs.rows.length; i++)
+ r1 += rs.rows.item(i).salutation + ", " + rs.rows.item(i).salutee + ";"
+ if (r1 != "hello, world;hello, world;hello, world;hello, world;")
+ if (r1 != "Hello, world;Goodbye, cruel world;")
+ r = "SELECTED DATA WRONG: "+r1;
+ else
+ r = "passed";
+ }
+ );
+
+ return r;
+}
diff --git a/tests/auto/declarative/sql/data/readonly-error.js b/tests/auto/declarative/sql/data/readonly-error.js
new file mode 100644
index 0000000000..69ec67fb1a
--- /dev/null
+++ b/tests/auto/declarative/sql/data/readonly-error.js
@@ -0,0 +1,27 @@
+function test() {
+ var r="transaction_not_finished";
+ var db = openDatabaseSync("QmlTestDB-readonly-error", "1.0", "Test database from Qt autotests", 1000000);
+
+ db.transaction(
+ function(tx) {
+ tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)');
+ tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]);
+ }
+ );
+
+ try {
+ db.readTransaction(
+ function(tx) {
+ tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]);
+ r = "FAILED";
+ }
+ );
+ } catch (err) {
+ if (err.message == "Read-only Transaction")
+ r = "passed";
+ else
+ r = "WRONG ERROR="+err.message;
+ }
+
+ return r;
+}
diff --git a/tests/auto/declarative/sql/data/readonly.js b/tests/auto/declarative/sql/data/readonly.js
new file mode 100644
index 0000000000..5ee862c083
--- /dev/null
+++ b/tests/auto/declarative/sql/data/readonly.js
@@ -0,0 +1,24 @@
+function test() {
+ var r="transaction_not_finished";
+ var db = openDatabaseSync("QmlTestDB-readonly", "1.0", "Test database from Qt autotests", 1000000);
+
+ db.transaction(
+ function(tx) {
+ tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)');
+ tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]);
+ r = "passed";
+ }
+ );
+
+ db.readTransaction(
+ function(tx) {
+ var rs = tx.executeSql('SELECT * FROM Greeting');
+ if (rs.rows.item(0).salutation == 'hello')
+ r = "passed";
+ else
+ r = "FAILED";
+ }
+ );
+
+ return r;
+}
diff --git a/tests/auto/declarative/sql/data/reopen1.js b/tests/auto/declarative/sql/data/reopen1.js
new file mode 100644
index 0000000000..c1a8157b10
--- /dev/null
+++ b/tests/auto/declarative/sql/data/reopen1.js
@@ -0,0 +1,14 @@
+function test() {
+ var r="transaction_not_finished";
+ var db = openDatabaseSync("QmlTestDB-reopen", "1.0", "Test database from Qt autotests", 1000000);
+
+ db.transaction(
+ function(tx) {
+ tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)');
+ tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]);
+ r = "passed";
+ }
+ );
+
+ return r;
+}
diff --git a/tests/auto/declarative/sql/data/reopen2.js b/tests/auto/declarative/sql/data/reopen2.js
new file mode 100644
index 0000000000..4f7248f094
--- /dev/null
+++ b/tests/auto/declarative/sql/data/reopen2.js
@@ -0,0 +1,16 @@
+function test() {
+ var r="transaction_not_finished";
+ var db = openDatabaseSync("QmlTestDB-reopen", "1.0", "Test database from Qt autotests", 1000000);
+
+ db.transaction(
+ function(tx) {
+ var rs = tx.executeSql('SELECT * FROM Greeting');
+ if (rs.rows.item(0).salutation == 'hello')
+ r = "passed";
+ else
+ r = "FAILED";
+ }
+ );
+
+ return r;
+}
diff --git a/tests/auto/declarative/sql/data/selection-bindnames.js b/tests/auto/declarative/sql/data/selection-bindnames.js
new file mode 100644
index 0000000000..9786821f47
--- /dev/null
+++ b/tests/auto/declarative/sql/data/selection-bindnames.js
@@ -0,0 +1,26 @@
+function test() {
+ var db = openDatabaseSync("QmlTestDB-bindnames", "", "Test database from Qt autotests", 1000000);
+ var r="transaction_not_finished";
+
+ db.transaction(
+ function(tx) {
+ tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)');
+ tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]);
+ tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'goodbye', 'world' ]);
+ tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]);
+ tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'there' ]);
+ }
+ );
+
+ db.transaction(
+ function(tx) {
+ var rs = tx.executeSql('SELECT * FROM Greeting WHERE salutation=:p2 AND salutee=:p1', {':p1':'world', ':p2':'hello'});
+ if ( rs.rows.length != 2 )
+ r = "SELECT RETURNED WRONG VALUE "+rs.rows.length+rs.rows.item(0)+rs.rows.item(1)
+ else
+ r = "passed";
+ }
+ );
+
+ return r;
+}
diff --git a/tests/auto/declarative/sql/data/selection.js b/tests/auto/declarative/sql/data/selection.js
new file mode 100644
index 0000000000..f116efffd2
--- /dev/null
+++ b/tests/auto/declarative/sql/data/selection.js
@@ -0,0 +1,26 @@
+function test() {
+ var db = openDatabaseSync("QmlTestDB-selection", "", "Test database from Qt autotests", 1000000);
+ var r="transaction_not_finished";
+
+ db.transaction(
+ function(tx) {
+ tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)');
+ tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]);
+ tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]);
+ }
+ );
+
+ db.transaction(
+ function(tx) {
+ tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]);
+ tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]);
+ var rs = tx.executeSql('SELECT * FROM Greeting');
+ if ( rs.rows.length != 4 )
+ r = "SELECT RETURNED WRONG VALUE "+rs.rows.length+rs.rows[0]+rs.rows[1]
+ else
+ r = "passed";
+ }
+ );
+
+ return r;
+}
diff --git a/tests/auto/declarative/sql/sql.pro b/tests/auto/declarative/sql/sql.pro
new file mode 100644
index 0000000000..4217eac4bf
--- /dev/null
+++ b/tests/auto/declarative/sql/sql.pro
@@ -0,0 +1,9 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+QT += sql script
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_sql.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/sql/tst_sql.cpp b/tests/auto/declarative/sql/tst_sql.cpp
new file mode 100644
index 0000000000..e8a5e0c9f5
--- /dev/null
+++ b/tests/auto/declarative/sql/tst_sql.cpp
@@ -0,0 +1,237 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include "../../../shared/util.h"
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <private/qdeclarativetext_p.h>
+#include <private/qdeclarativeengine_p.h>
+#include <QtCore/qcryptographichash.h>
+#include <QtWebKit/qwebpage.h>
+#include <QtWebKit/qwebframe.h>
+#include <QtWebKit/qwebdatabase.h>
+#include <QtWebKit/qwebsecurityorigin.h>
+#include <QtSql/qsqldatabase.h>
+#include <QtCore/qdir.h>
+#include <QtCore/qfile.h>
+
+class tst_sql : public QObject
+{
+ Q_OBJECT
+public:
+ tst_sql()
+ {
+ qApp->setApplicationName("tst_sql");
+ qApp->setOrganizationName("Nokia");
+ qApp->setOrganizationDomain("nokia.com");
+ engine = new QDeclarativeEngine;
+ }
+
+ ~tst_sql()
+ {
+ delete engine;
+ }
+
+private slots:
+ void initTestCase();
+
+ void checkDatabasePath();
+
+ void testQml_data();
+ void testQml();
+ void testQml_cleanopen_data();
+ void testQml_cleanopen();
+ void totalDatabases();
+
+ void cleanupTestCase();
+
+private:
+ QString dbDir() const;
+ QDeclarativeEngine *engine;
+};
+
+class QWebPageWithJavaScriptConsoleMessages : public QWebPage {
+public:
+ void javaScriptConsoleMessage(const QString& message, int lineNumber, const QString& sourceID)
+ {
+ qWarning() << sourceID << ":" << lineNumber << ":" << message;
+ }
+};
+
+void removeRecursive(const QString& dirname)
+{
+ QDir dir(dirname);
+ QFileInfoList entries(dir.entryInfoList(QDir::Dirs|QDir::Files|QDir::NoDotAndDotDot));
+ for (int i = 0; i < entries.count(); ++i)
+ if (entries[i].isDir())
+ removeRecursive(entries[i].filePath());
+ else
+ dir.remove(entries[i].fileName());
+ QDir().rmdir(dirname);
+}
+
+void tst_sql::initTestCase()
+{
+ removeRecursive(dbDir());
+ QDir().mkpath(dbDir());
+}
+
+void tst_sql::cleanupTestCase()
+{
+ removeRecursive(dbDir());
+}
+
+QString tst_sql::dbDir() const
+{
+ static QString tmpd = QDir::tempPath()+"/tst_sql_output-"
+ + QDateTime::currentDateTime().toString(QLatin1String("yyyyMMddhhmmss"));
+ return tmpd;
+}
+
+void tst_sql::checkDatabasePath()
+{
+ // Check default storage path (we can't use it since we don't want to mess with user's data)
+ QVERIFY(engine->offlineStoragePath().contains("tst_sql"));
+ QVERIFY(engine->offlineStoragePath().contains("OfflineStorage"));
+}
+
+static const int total_databases_created_by_tests = 12;
+void tst_sql::testQml_data()
+{
+ QTest::addColumn<QString>("jsfile"); // The input file
+
+ // Each test should use a newly named DB to avoid inter-test dependencies
+ QTest::newRow("creation") << "data/creation.js";
+ QTest::newRow("creation-a") << "data/creation-a.js";
+ QTest::newRow("creation") << "data/creation.js";
+ QTest::newRow("error-creation") << "data/error-creation.js"; // re-uses above DB
+ QTest::newRow("changeversion") << "data/changeversion.js";
+ QTest::newRow("readonly") << "data/readonly.js";
+ QTest::newRow("readonly-error") << "data/readonly-error.js";
+ QTest::newRow("selection") << "data/selection.js";
+ QTest::newRow("selection-bindnames") << "data/selection-bindnames.js";
+ QTest::newRow("iteration") << "data/iteration.js";
+ QTest::newRow("iteration-forwardonly") << "data/iteration-forwardonly.js";
+ QTest::newRow("error-a") << "data/error-a.js";
+ QTest::newRow("error-notransaction") << "data/error-notransaction.js";
+ QTest::newRow("error-outsidetransaction") << "data/error-outsidetransaction.js"; // reuse above
+ QTest::newRow("reopen1") << "data/reopen1.js";
+ QTest::newRow("reopen2") << "data/reopen2.js"; // re-uses above DB
+
+ // If you add a test, you should usually use a new database in the
+ // test - in which case increment total_databases_created_by_tests above.
+}
+
+/*
+void tst_sql::validateAgainstWebkit()
+{
+ // Validates tests against WebKit (HTML5) support.
+ //
+ QFETCH(QString, jsfile);
+ QFETCH(QString, result);
+ QFETCH(int, databases);
+
+ QFile f(jsfile);
+ QVERIFY(f.open(QIODevice::ReadOnly));
+ QString js=f.readAll();
+
+ QWebPageWithJavaScriptConsoleMessages webpage;
+ webpage.settings()->setOfflineStoragePath(dbDir());
+ webpage.settings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true);
+
+ QEXPECT_FAIL("","WebKit doesn't support openDatabaseSync yet", Continue);
+ QCOMPARE(webpage.mainFrame()->evaluateJavaScript(js).toString(),result);
+
+ QTest::qWait(100); // WebKit crashes if you quit it too fast
+
+ QWebSecurityOrigin origin = webpage.mainFrame()->securityOrigin();
+ QList<QWebDatabase> dbs = origin.databases();
+ QCOMPARE(dbs.count(), databases);
+}
+*/
+
+void tst_sql::testQml()
+{
+ // Tests QML SQL Database support with tests
+ // that have been validated against Webkit.
+ //
+ QFETCH(QString, jsfile);
+
+ QString qml=
+ "import Qt 4.6\n"
+ "Text { Script { source: \""+jsfile+"\" } text: test() }";
+
+ engine->setOfflineStoragePath(dbDir());
+ QDeclarativeComponent component(engine);
+ component.setData(qml.toUtf8(), QUrl::fromLocalFile(SRCDIR "/empty.qml")); // just a file for relative local imports
+ QDeclarativeText *text = qobject_cast<QDeclarativeText*>(component.create());
+ QVERIFY(text != 0);
+ QCOMPARE(text->text(),QString("passed"));
+}
+
+void tst_sql::testQml_cleanopen_data()
+{
+ QTest::addColumn<QString>("jsfile"); // The input file
+ QTest::newRow("reopen1") << "data/reopen1.js";
+ QTest::newRow("reopen2") << "data/reopen2.js";
+ QTest::newRow("error-creation") << "data/error-creation.js"; // re-uses creation DB
+}
+
+void tst_sql::testQml_cleanopen()
+{
+ // Same as testQml, but clean connections between tests,
+ // making it more like the tests are running in new processes.
+ testQml();
+
+ QDeclarativeEnginePrivate::getScriptEngine(engine)->collectGarbage(); // close databases
+ foreach (QString dbname, QSqlDatabase::connectionNames()) {
+ QSqlDatabase::removeDatabase(dbname);
+ }
+}
+
+void tst_sql::totalDatabases()
+{
+ QCOMPARE(QDir(dbDir()+"/Databases").entryInfoList(QDir::Files|QDir::NoDotAndDotDot).count(), total_databases_created_by_tests*2);
+}
+
+QTEST_MAIN(tst_sql)
+
+#include "tst_sql.moc"
diff --git a/tests/auto/declarative/visual/ListView/basic1.qml b/tests/auto/declarative/visual/ListView/basic1.qml
new file mode 100644
index 0000000000..3c371a690e
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/basic1.qml
@@ -0,0 +1,27 @@
+import Qt 4.6
+
+Rectangle {
+ color: "blue"
+ width: 200
+ height: 300
+ id: page
+ ListView {
+ anchors.fill: parent
+ delegate: Rectangle {
+ color: "red"
+ width: 100
+ height: 100
+ Text {
+ text: name
+ }
+ }
+ model: ListModel {
+ ListElement {
+ name: "January"
+ }
+ ListElement {
+ name: "February"
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/basic2.qml b/tests/auto/declarative/visual/ListView/basic2.qml
new file mode 100644
index 0000000000..bdba65edb2
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/basic2.qml
@@ -0,0 +1,31 @@
+import Qt 4.6
+
+Rectangle {
+ color: "blue"
+ width: 200
+ height: 300
+ id: page
+ Component {
+ id: delegate
+ Rectangle {
+ color: "red"
+ width: 100
+ height: 100
+ Text {
+ text: name
+ }
+ }
+ }
+ ListView {
+ anchors.fill: parent
+ delegate: delegate
+ model: ListModel {
+ ListElement {
+ name: "January"
+ }
+ ListElement {
+ name: "February"
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/basic3.qml b/tests/auto/declarative/visual/ListView/basic3.qml
new file mode 100644
index 0000000000..05ac358db7
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/basic3.qml
@@ -0,0 +1,29 @@
+import Qt 4.6
+
+Rectangle {
+ color: "blue"
+ width: 200
+ height: 300
+ id: page
+ Listmodel {
+ id: model
+ ListElement {
+ name: "January"
+ }
+ ListElement {
+ name: "February"
+ }
+ }
+ ListView {
+ anchors.fill: parent
+ model: model
+ delegate: Rectangle {
+ color: "red"
+ width: 100
+ height: 100
+ Text {
+ text: name
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/basic4.qml b/tests/auto/declarative/visual/ListView/basic4.qml
new file mode 100644
index 0000000000..3628bd3715
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/basic4.qml
@@ -0,0 +1,33 @@
+import Qt 4.6
+
+Rectangle {
+ color: "blue"
+ width: 200
+ height: 300
+ id: page
+ Listmodel {
+ id: model
+ ListElement {
+ name: "January"
+ }
+ ListElement {
+ name: "February"
+ }
+ }
+ Component {
+ id: delegate
+ Rectangle {
+ color: "red"
+ width: 100
+ height: 100
+ Text {
+ text: name
+ }
+ }
+ }
+ ListView {
+ anchors.fill: parent
+ model: model
+ delegate: delegate
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/basic1.qml b/tests/auto/declarative/visual/ListView/data-MAC/basic1.qml
new file mode 100644
index 0000000000..83b700d967
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/basic1.qml
@@ -0,0 +1,159 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 32
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 48
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 64
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 80
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 96
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 112
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 128
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 144
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 160
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 176
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 192
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 208
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 224
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 240
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 256
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 272
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 288
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 304
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 320
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 336
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 352
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 368
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 384
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 400
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 416
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 432
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 448
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 464
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 480
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 496
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 512
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 528
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 544
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 560
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 576
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/basic2.qml b/tests/auto/declarative/visual/ListView/data-MAC/basic2.qml
new file mode 100644
index 0000000000..1483512fa6
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/basic2.qml
@@ -0,0 +1,187 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 32
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 48
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 64
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 80
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 96
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 112
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 128
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 144
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 160
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 176
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 192
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 208
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 224
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 240
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 256
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 272
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 288
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 304
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 320
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 336
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 352
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 368
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 384
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 400
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 416
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 432
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 448
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 464
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 480
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 496
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 512
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 528
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 544
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 560
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 576
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 592
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 608
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 624
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 640
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 656
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 672
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 688
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/basic3.qml b/tests/auto/declarative/visual/ListView/data-MAC/basic3.qml
new file mode 100644
index 0000000000..bf6899866e
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/basic3.qml
@@ -0,0 +1,147 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 32
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 48
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 64
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 80
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 96
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 112
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 128
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 144
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 160
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 176
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 192
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 208
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 224
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 240
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 256
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 272
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 288
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 304
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 320
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 336
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 352
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 368
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 384
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 400
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 416
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 432
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 448
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 464
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 480
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 496
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 512
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 528
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/basic4.qml b/tests/auto/declarative/visual/ListView/data-MAC/basic4.qml
new file mode 100644
index 0000000000..4aa9ab6640
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/basic4.qml
@@ -0,0 +1,171 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 32
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 48
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 64
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 80
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 96
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 112
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 128
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 144
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 160
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 176
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 192
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 208
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 224
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 240
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 256
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 272
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 288
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 304
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 320
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 336
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 352
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 368
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 384
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 400
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 416
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 432
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 448
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 464
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 480
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 496
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 512
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 528
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 544
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 560
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 576
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 592
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 608
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+ Frame {
+ msec: 624
+ hash: "895c70434a24da42144e60e6d8dcf323"
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/itemlist.0.png b/tests/auto/declarative/visual/ListView/data-MAC/itemlist.0.png
new file mode 100644
index 0000000000..13b280c1c5
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/itemlist.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/itemlist.1.png b/tests/auto/declarative/visual/ListView/data-MAC/itemlist.1.png
new file mode 100644
index 0000000000..402872bde4
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/itemlist.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/itemlist.2.png b/tests/auto/declarative/visual/ListView/data-MAC/itemlist.2.png
new file mode 100644
index 0000000000..afd0830a8d
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/itemlist.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/itemlist.3.png b/tests/auto/declarative/visual/ListView/data-MAC/itemlist.3.png
new file mode 100644
index 0000000000..7c15f610b2
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/itemlist.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/itemlist.4.png b/tests/auto/declarative/visual/ListView/data-MAC/itemlist.4.png
new file mode 100644
index 0000000000..afd0830a8d
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/itemlist.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/itemlist.5.png b/tests/auto/declarative/visual/ListView/data-MAC/itemlist.5.png
new file mode 100644
index 0000000000..fddf1cb0c0
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/itemlist.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/itemlist.6.png b/tests/auto/declarative/visual/ListView/data-MAC/itemlist.6.png
new file mode 100644
index 0000000000..13b280c1c5
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/itemlist.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/itemlist.qml b/tests/auto/declarative/visual/ListView/data-MAC/itemlist.qml
new file mode 100644
index 0000000000..073749f916
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/itemlist.qml
@@ -0,0 +1,2203 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 32
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 48
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 64
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 80
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 96
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 112
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 128
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 144
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 160
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 176
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 192
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 208
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 224
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 240
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 256
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 272
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 288
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 304
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 320
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 336
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 352
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 368
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 384
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 400
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 416
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 432
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 448
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 464
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 480
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 496
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 512
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 528
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 544
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 560
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 576
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 592
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 608
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 624
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 640
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 656
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 672
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 688
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 704
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 720
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 736
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 752
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 768
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 784
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 800
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 816
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 832
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 848
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 864
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 880
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 896
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 912
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 928
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 944
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 960
+ image: "itemlist.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 992
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1008
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1024
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1040
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1056
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1072
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1088
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1104
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1120
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1136
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1152
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1168
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1184
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1200
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1216
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1232
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1248
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1264
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1280
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1296
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1312
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1328
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1344
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1360
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1376
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1392
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1408
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1424
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1440
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1456
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1472
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1488
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1504
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1520
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1536
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1552
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1568
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1584
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1600
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1616
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1632
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1648
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 192; y: 111
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1664
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 191; y: 111
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1680
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 190; y: 112
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 113
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1696
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 184; y: 113
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 180; y: 113
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1712
+ hash: "a68b1bc6c2963ee92c3a45f500667b3b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 174; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 167; y: 115
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1728
+ hash: "7cda93e59466b3348e7ffe3895f89e86"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 160; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1744
+ hash: "06e0008c78e919f7270402938d9d764b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 140; y: 121
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 132; y: 122
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1760
+ hash: "9d8da9199efebb95f56e5d4ebc9a585e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 114; y: 126
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 98; y: 132
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1776
+ hash: "54a60a4279911ba4a8a5741bcadfa783"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 91; y: 132
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 91; y: 132
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1792
+ hash: "a1a19370a1a8ed78e475f0d0eb12311c"
+ }
+ Frame {
+ msec: 1808
+ hash: "196a3b127cf7065614c34856bf8d8bca"
+ }
+ Frame {
+ msec: 1824
+ hash: "5fbefbd7c7be4374382cc4c8b86ac78a"
+ }
+ Frame {
+ msec: 1840
+ hash: "d6a544c622e504c1b931e1a8a1310a6e"
+ }
+ Frame {
+ msec: 1856
+ hash: "20e76f0eb4ec5f691999faf8ad313370"
+ }
+ Frame {
+ msec: 1872
+ hash: "7f84a3545907c754ae8a6a30ef61c98d"
+ }
+ Frame {
+ msec: 1888
+ hash: "b544901eae32903ad054e8cdfed715eb"
+ }
+ Frame {
+ msec: 1904
+ hash: "a010ed1e3312f4ca9f429b7e32cdcef9"
+ }
+ Frame {
+ msec: 1920
+ image: "itemlist.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "93a731dc6f71b6ff5400bf74c87e6c46"
+ }
+ Frame {
+ msec: 1952
+ hash: "c73f63d1a024ba956e693487b3ccc761"
+ }
+ Frame {
+ msec: 1968
+ hash: "539d3d00fce2d0128cd697d86d237fe7"
+ }
+ Frame {
+ msec: 1984
+ hash: "52752d7d6f2d0e085f7132313907b72b"
+ }
+ Frame {
+ msec: 2000
+ hash: "f46dd5803a6075e979e0fc733d503bfb"
+ }
+ Frame {
+ msec: 2016
+ hash: "b8734698a6bad00ecf019f85328c2c21"
+ }
+ Frame {
+ msec: 2032
+ hash: "1cfc499ca756023430cc5b2fa95a599d"
+ }
+ Frame {
+ msec: 2048
+ hash: "63a816548837c19f8f0494c137fc0174"
+ }
+ Frame {
+ msec: 2064
+ hash: "1bce9b85235e9a1a472c079dfec70ec5"
+ }
+ Frame {
+ msec: 2080
+ hash: "6677863e7f74c12648409883f73adbe2"
+ }
+ Frame {
+ msec: 2096
+ hash: "98e707a3e39a5f7bd4a101c2ed83535c"
+ }
+ Frame {
+ msec: 2112
+ hash: "c1f6d8842d14a9394d4b7797314f50e8"
+ }
+ Frame {
+ msec: 2128
+ hash: "579758b477bcd2112b305a5aac7df338"
+ }
+ Frame {
+ msec: 2144
+ hash: "4a7bb81090db246db53e2dbc56f710ea"
+ }
+ Frame {
+ msec: 2160
+ hash: "074995cdd8a70817d1c8a7bb0ad4c542"
+ }
+ Frame {
+ msec: 2176
+ hash: "bd8d7bda4d2e9ad1fba2895d568f36cc"
+ }
+ Frame {
+ msec: 2192
+ hash: "40cce3d2d80ac470af44fc334cec1d5b"
+ }
+ Frame {
+ msec: 2208
+ hash: "15cbc226b032d5a97199735ea7a1408b"
+ }
+ Frame {
+ msec: 2224
+ hash: "12b296aea9b058a5402d0d0a620f8edc"
+ }
+ Frame {
+ msec: 2240
+ hash: "6ffd2b79cf0e941a59e74bc6f9025bcb"
+ }
+ Frame {
+ msec: 2256
+ hash: "589a58ef76ea709dc8d80390c9044f99"
+ }
+ Frame {
+ msec: 2272
+ hash: "c009924bfa30153f22ab168b539494e9"
+ }
+ Frame {
+ msec: 2288
+ hash: "4b83674a7c2daa68d735901ad40be2bd"
+ }
+ Frame {
+ msec: 2304
+ hash: "0525908c0302ada989e28990bac3f2ca"
+ }
+ Frame {
+ msec: 2320
+ hash: "89eb13976ba3ba4413cafeb0cc91c01b"
+ }
+ Frame {
+ msec: 2336
+ hash: "75c1295ef99680784b2e11fb88fa1423"
+ }
+ Frame {
+ msec: 2352
+ hash: "93d89165cf6a97c76ae6e7f75678a3cd"
+ }
+ Frame {
+ msec: 2368
+ hash: "53064c1938f08a55603a99b0db225174"
+ }
+ Frame {
+ msec: 2384
+ hash: "31db5684466c0c32128a9a8c7b1835e1"
+ }
+ Frame {
+ msec: 2400
+ hash: "99d9e58697736198e0a00443d237e85b"
+ }
+ Frame {
+ msec: 2416
+ hash: "6c1e860aef983367365d53f5849ad441"
+ }
+ Frame {
+ msec: 2432
+ hash: "6c1e860aef983367365d53f5849ad441"
+ }
+ Frame {
+ msec: 2448
+ hash: "6c1e860aef983367365d53f5849ad441"
+ }
+ Frame {
+ msec: 2464
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2480
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2496
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2512
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2528
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2544
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2560
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2576
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2592
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2608
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2624
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2640
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2656
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2672
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2688
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2704
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2720
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2736
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2752
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2768
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2784
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2800
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2816
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2832
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2848
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2864
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 181; y: 104
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2880
+ image: "itemlist.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 179; y: 105
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 177; y: 106
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2912
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 174; y: 108
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 170; y: 110
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2928
+ hash: "5bb06b4e74532ba5bc8c7bc38bf77d7f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 166; y: 112
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 160; y: 115
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2944
+ hash: "b10a6206830a876017799ef2fcf61b1a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 154; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 140; y: 123
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2960
+ hash: "b2e24759ba10afd6cff90f4b1e04b496"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 124; y: 127
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 124; y: 127
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2976
+ hash: "ccbcd6f45cb529c2db71504c0f69d73e"
+ }
+ Frame {
+ msec: 2992
+ hash: "7b31c6d5931677f1aa1e8c7d48a4ff22"
+ }
+ Frame {
+ msec: 3008
+ hash: "c52f691a0a6cf155118bdfea2dfea623"
+ }
+ Frame {
+ msec: 3024
+ hash: "dd639d1df3d4a9b8f06718def63d588f"
+ }
+ Frame {
+ msec: 3040
+ hash: "39d767b09a648ef6295cec2848f9226f"
+ }
+ Frame {
+ msec: 3056
+ hash: "5dd46d5f386431e7b13348ac9a9630ed"
+ }
+ Frame {
+ msec: 3072
+ hash: "0354e5183b0e66e7ba146d292c559df4"
+ }
+ Frame {
+ msec: 3088
+ hash: "984aa6d7075e24de429e05b1b0eda94a"
+ }
+ Frame {
+ msec: 3104
+ hash: "1af58a2f44f1f613712d4df85e38356d"
+ }
+ Frame {
+ msec: 3120
+ hash: "6e4085e7f1fee724d78808753f04b471"
+ }
+ Frame {
+ msec: 3136
+ hash: "73a019ef9057639d631cd99a431b3f3b"
+ }
+ Frame {
+ msec: 3152
+ hash: "c9414a2e655a90dfdcb6fb288b4ba0ca"
+ }
+ Frame {
+ msec: 3168
+ hash: "3f4c24f7ac89da982af22032309637fb"
+ }
+ Frame {
+ msec: 3184
+ hash: "a50e6ada8f73a257657f4348ceaffcfd"
+ }
+ Frame {
+ msec: 3200
+ hash: "a67bf40d09259bbd079c12ae4f49150f"
+ }
+ Frame {
+ msec: 3216
+ hash: "a2fc512b7c234a9d0b2c1a83387a8a46"
+ }
+ Frame {
+ msec: 3232
+ hash: "85090683ce9a3c9833b1cb0b3df076ee"
+ }
+ Frame {
+ msec: 3248
+ hash: "275f3594a0e2cc4b6717f9f336e7e1b6"
+ }
+ Frame {
+ msec: 3264
+ hash: "2473eb11f7b65a784a2b166114026488"
+ }
+ Frame {
+ msec: 3280
+ hash: "4865c30dc45fbf5ca82047b77eca0912"
+ }
+ Frame {
+ msec: 3296
+ hash: "54de88bca395449fbaea2c090c7a5d91"
+ }
+ Frame {
+ msec: 3312
+ hash: "833f9295cf9a34934f001eac48551b59"
+ }
+ Frame {
+ msec: 3328
+ hash: "5bf565f57ababa7380faeee94add91ca"
+ }
+ Frame {
+ msec: 3344
+ hash: "6325578867f1eb3b2d47ed40b017b571"
+ }
+ Frame {
+ msec: 3360
+ hash: "046a6114176b3a3206b7a2acd6e30b41"
+ }
+ Frame {
+ msec: 3376
+ hash: "f8d4120a17f28c2d1d9c4be959098058"
+ }
+ Frame {
+ msec: 3392
+ hash: "71356d2e48aad2900784ea6bc1a3d908"
+ }
+ Frame {
+ msec: 3408
+ hash: "b84ad460fb81fdc4049abe8f3ff180bb"
+ }
+ Frame {
+ msec: 3424
+ hash: "0354239f5eaea23474d9f81385392a8a"
+ }
+ Frame {
+ msec: 3440
+ hash: "8ef0eef3393e07ae7605c865a95edc30"
+ }
+ Frame {
+ msec: 3456
+ hash: "5b8b384cc8e3faf4310015e19b3eb487"
+ }
+ Frame {
+ msec: 3472
+ hash: "77c18ac7dfff2a4e516915e3e3df0717"
+ }
+ Frame {
+ msec: 3488
+ hash: "c1d3264384c26345eb8100de829309ca"
+ }
+ Frame {
+ msec: 3504
+ hash: "6b21f71d0bedef4bbcb445a13f61e7a3"
+ }
+ Frame {
+ msec: 3520
+ hash: "f619097356671f6eb54d3b1c481e709d"
+ }
+ Frame {
+ msec: 3536
+ hash: "e56e3a90da446e0c482cb93717f6aacc"
+ }
+ Frame {
+ msec: 3552
+ hash: "aa94ebdbb4b8423aff28c95daff0baf5"
+ }
+ Frame {
+ msec: 3568
+ hash: "e1744d9cacd1a2c96af4cfdd5c486995"
+ }
+ Frame {
+ msec: 3584
+ hash: "7f19ea52e9e41a3b1bd90bb2a144d305"
+ }
+ Frame {
+ msec: 3600
+ hash: "7f19ea52e9e41a3b1bd90bb2a144d305"
+ }
+ Frame {
+ msec: 3616
+ hash: "7f19ea52e9e41a3b1bd90bb2a144d305"
+ }
+ Frame {
+ msec: 3632
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3648
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3664
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3680
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3696
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3712
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3728
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3744
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3760
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3776
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3792
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3808
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3824
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3840
+ image: "itemlist.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3872
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3888
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3904
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3920
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3936
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3952
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3968
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3984
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 4000
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 4016
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 4032
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 4048
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 4064
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 4080
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 4096
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 31; y: 137
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4112
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 32; y: 137
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4128
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 33; y: 136
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 36; y: 135
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4144
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 40; y: 134
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 46; y: 132
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4160
+ hash: "c2c9c284b185a89faf4ddb5a7867f449"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 64; y: 130
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4176
+ hash: "de1c18aeda5d2fbd6dad4554c78617bd"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 86; y: 126
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 110; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 110; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4192
+ hash: "a67bf40d09259bbd079c12ae4f49150f"
+ }
+ Frame {
+ msec: 4208
+ hash: "94514668dafbe41c5890a578efd6dea4"
+ }
+ Frame {
+ msec: 4224
+ hash: "2e97a74eb9ddb1c9613c89e2d78db018"
+ }
+ Frame {
+ msec: 4240
+ hash: "4b5368f0d86bffeb6bd31b58aec88650"
+ }
+ Frame {
+ msec: 4256
+ hash: "b459bde7bb4ce51e6ecdab58f64fcbb9"
+ }
+ Frame {
+ msec: 4272
+ hash: "7bac8cc3ec64c9ad1c0da282e38c953e"
+ }
+ Frame {
+ msec: 4288
+ hash: "a73a58c3d7a757547740a2a161f4c756"
+ }
+ Frame {
+ msec: 4304
+ hash: "b35edcb1fa3568a3e770ab2364b82e75"
+ }
+ Frame {
+ msec: 4320
+ hash: "d6c863ef57c5e5cb04cdac72f920db0b"
+ }
+ Frame {
+ msec: 4336
+ hash: "0db5e4588ff851918b07796f0cf07382"
+ }
+ Frame {
+ msec: 4352
+ hash: "71ec8c363ca6a6f7556afb70faccffe6"
+ }
+ Frame {
+ msec: 4368
+ hash: "18d026e9c965ada1db67c643576d2a80"
+ }
+ Frame {
+ msec: 4384
+ hash: "69f71c22dff981a4da8ec1edcf90e79f"
+ }
+ Frame {
+ msec: 4400
+ hash: "680460f5e4d9e649931601041af046b2"
+ }
+ Frame {
+ msec: 4416
+ hash: "3028763fd15de2607b20b1331b904a4a"
+ }
+ Frame {
+ msec: 4432
+ hash: "333eb60e217fe1ea7469eab52ac461f1"
+ }
+ Frame {
+ msec: 4448
+ hash: "ccbcd6f45cb529c2db71504c0f69d73e"
+ }
+ Frame {
+ msec: 4464
+ hash: "3445df9b41a0a3e74738cbf328ab7d5c"
+ }
+ Frame {
+ msec: 4480
+ hash: "bd2c072558479e9de7a97207e58cc57f"
+ }
+ Frame {
+ msec: 4496
+ hash: "3d34b0b24a30eda93377dcb4585afed8"
+ }
+ Frame {
+ msec: 4512
+ hash: "d3045703863b0c5a327b9355c23d69f2"
+ }
+ Frame {
+ msec: 4528
+ hash: "2f2eb55f693415b840a317211b250e9f"
+ }
+ Frame {
+ msec: 4544
+ hash: "791b9ca7d47a3343474c30a35e336d4b"
+ }
+ Frame {
+ msec: 4560
+ hash: "73a0c02ebad6d3d5f939d9a00dd898bf"
+ }
+ Frame {
+ msec: 4576
+ hash: "d5c11135d586711b12f236430a2c2795"
+ }
+ Frame {
+ msec: 4592
+ hash: "34f9ea214fe714ff4e994f715ea6ea39"
+ }
+ Frame {
+ msec: 4608
+ hash: "8e49afa00983b156b818533923fb6edd"
+ }
+ Frame {
+ msec: 4624
+ hash: "e7e7bef17cee92eca9191fd734d7a577"
+ }
+ Frame {
+ msec: 4640
+ hash: "e407f6ed7cb3c130365ab5515d6308c0"
+ }
+ Frame {
+ msec: 4656
+ hash: "5bb06b4e74532ba5bc8c7bc38bf77d7f"
+ }
+ Frame {
+ msec: 4672
+ hash: "0ad7411316031e22034c14e81ca3a806"
+ }
+ Frame {
+ msec: 4688
+ hash: "dd81d7a9b48c922b4c42cba1b5f2b9d7"
+ }
+ Frame {
+ msec: 4704
+ hash: "32bef6f5005ad94e29ff59165958fbdc"
+ }
+ Frame {
+ msec: 4720
+ hash: "87758dd311f91193bf1e3536c2f58525"
+ }
+ Frame {
+ msec: 4736
+ hash: "015be92a4ff4e735fcc3cbc7a8b9d763"
+ }
+ Frame {
+ msec: 4752
+ hash: "d4c34ed49317c6692d71681fcd9842b6"
+ }
+ Frame {
+ msec: 4768
+ hash: "abaa235bb946a8abaddd52981d632c2d"
+ }
+ Frame {
+ msec: 4784
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4800
+ image: "itemlist.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4832
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4848
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4864
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4880
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4896
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4912
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4928
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4944
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4960
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4976
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4992
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5008
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5024
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5040
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5056
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5072
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5088
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5104
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5120
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5136
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5152
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5168
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5184
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5200
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5216
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5232
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 17; y: 120
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5248
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 19; y: 120
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 21; y: 120
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5264
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 24; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 28; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5280
+ hash: "95b380c9ab6f8db7b822faf023d94546"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 35; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 44; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5296
+ hash: "bb79e53556698c62ec30c75be9f6b7d7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 70; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 96; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 96; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5312
+ hash: "285cc2f0df1f59f25a0135560ab6edf2"
+ }
+ Frame {
+ msec: 5328
+ hash: "93a731dc6f71b6ff5400bf74c87e6c46"
+ }
+ Frame {
+ msec: 5344
+ hash: "eb555741ab128a50de5a18a454f2e639"
+ }
+ Frame {
+ msec: 5360
+ hash: "5dbe6cf898c1e37fcaacecfcf57b2194"
+ }
+ Frame {
+ msec: 5376
+ hash: "e7795610115593e78bb32f7bcc0ae2eb"
+ }
+ Frame {
+ msec: 5392
+ hash: "20e76f0eb4ec5f691999faf8ad313370"
+ }
+ Frame {
+ msec: 5408
+ hash: "d6a544c622e504c1b931e1a8a1310a6e"
+ }
+ Frame {
+ msec: 5424
+ hash: "e7a3a21feed244c5b1c710a9254c15f0"
+ }
+ Frame {
+ msec: 5440
+ hash: "5a4b1aca24f121d1373646e9d80b86fd"
+ }
+ Frame {
+ msec: 5456
+ hash: "331d2ec7021655c86aa64e47718a1088"
+ }
+ Frame {
+ msec: 5472
+ hash: "92096bc872e7395aa5b75c44646a0b60"
+ }
+ Frame {
+ msec: 5488
+ hash: "0d9aa6cee4d21488cbb5153f8f3ed593"
+ }
+ Frame {
+ msec: 5504
+ hash: "c1b943d43701605563fffffcb75f9fa7"
+ }
+ Frame {
+ msec: 5520
+ hash: "1b680025d5ad1ddd8f8d5f570ba73e71"
+ }
+ Frame {
+ msec: 5536
+ hash: "5539a3b9f60ea747c10ed8328b467cbf"
+ }
+ Frame {
+ msec: 5552
+ hash: "0a1317bcb606cd3488c5b14ee5d96585"
+ }
+ Frame {
+ msec: 5568
+ hash: "8844af68b11db7d92c69804c7371a746"
+ }
+ Frame {
+ msec: 5584
+ hash: "28d7fd127739c6e3b8488651b725c802"
+ }
+ Frame {
+ msec: 5600
+ hash: "0cf1a7d958a96aa2768995dddc5ccc09"
+ }
+ Frame {
+ msec: 5616
+ hash: "64b902fe7ab4d89ef0c7b760974e3488"
+ }
+ Frame {
+ msec: 5632
+ hash: "aba11c597eba550fc1eaddbf554057f6"
+ }
+ Frame {
+ msec: 5648
+ hash: "1bacaa3bb9dc3cac9ffc7491cb4dc1a5"
+ }
+ Frame {
+ msec: 5664
+ hash: "0ba8b582234d9f0c198c0c9e18e1cb02"
+ }
+ Frame {
+ msec: 5680
+ hash: "f66eaf2b5c3529987c0d9d005351ed73"
+ }
+ Frame {
+ msec: 5696
+ hash: "75b0bb720fa4c77da3783b3ff31c2fae"
+ }
+ Frame {
+ msec: 5712
+ hash: "345b235bb7f13409378e5c0c370f2a41"
+ }
+ Frame {
+ msec: 5728
+ hash: "83b7e902dce4e0fdc4ef5d629188c23c"
+ }
+ Frame {
+ msec: 5744
+ hash: "04b9041c6f10969889d92e94785c7e88"
+ }
+ Frame {
+ msec: 5760
+ image: "itemlist.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "4f3a902addc34ecdaf390e2427cc52e7"
+ }
+ Frame {
+ msec: 5792
+ hash: "68d443f16c16821ffc9ca68b17c76034"
+ }
+ Frame {
+ msec: 5808
+ hash: "9d25adc77befa761ee376a9b43595b5e"
+ }
+ Frame {
+ msec: 5824
+ hash: "a68b1bc6c2963ee92c3a45f500667b3b"
+ }
+ Frame {
+ msec: 5840
+ hash: "d5268cd58c222451d48038e715e83802"
+ }
+ Frame {
+ msec: 5856
+ hash: "f37d461541a8ec7a4161b18748de6aea"
+ }
+ Frame {
+ msec: 5872
+ hash: "805319ac7ca842feb3649e92f8b5b72f"
+ }
+ Frame {
+ msec: 5888
+ hash: "73124472a05080891d4948d8ca273f8c"
+ }
+ Frame {
+ msec: 5904
+ hash: "b6e433a23282a50db2e165a2447ba3f6"
+ }
+ Frame {
+ msec: 5920
+ hash: "fd8d3f5688b1806998c6087e18c6c730"
+ }
+ Frame {
+ msec: 5936
+ hash: "f132dd459950ef2d18aa93ca950d0692"
+ }
+ Frame {
+ msec: 5952
+ hash: "ade5beb259b5277c333ca806fc9bdbec"
+ }
+ Frame {
+ msec: 5968
+ hash: "ade5beb259b5277c333ca806fc9bdbec"
+ }
+ Frame {
+ msec: 5984
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6000
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6016
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6032
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6048
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6064
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6080
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6096
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6112
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6128
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6144
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6160
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6176
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6192
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6208
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6224
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6240
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6256
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6272
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6288
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6304
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6320
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6336
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6352
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6368
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6384
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6400
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6416
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6432
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6448
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6464
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6480
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6496
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6512
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6528
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6544
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6560
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6576
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6592
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6608
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6624
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6640
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6656
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6672
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6688
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6704
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6720
+ image: "itemlist.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6752
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6768
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6784
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6800
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6816
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6832
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6848
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6864
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6880
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6896
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6912
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6928
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6944
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6960
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6976
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6992
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7008
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7024
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7040
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7056
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7072
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7088
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7104
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7120
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7136
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7152
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7168
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7184
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7200
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7216
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7232
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7248
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7264
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7280
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7296
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7312
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.0.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.0.png
new file mode 100644
index 0000000000..a1ab987d8c
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.1.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.1.png
new file mode 100644
index 0000000000..a1ab987d8c
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.10.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.10.png
new file mode 100644
index 0000000000..dcfca3f794
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.10.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.11.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.11.png
new file mode 100644
index 0000000000..7cc40470bb
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.11.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.12.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.12.png
new file mode 100644
index 0000000000..a97f4ad519
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.12.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.13.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.13.png
new file mode 100644
index 0000000000..7a8c6bd52c
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.13.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.14.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.14.png
new file mode 100644
index 0000000000..ae47356225
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.14.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.15.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.15.png
new file mode 100644
index 0000000000..b3a72609a2
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.15.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.16.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.16.png
new file mode 100644
index 0000000000..581e8243df
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.16.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.17.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.17.png
new file mode 100644
index 0000000000..581e8243df
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.17.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.18.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.18.png
new file mode 100644
index 0000000000..581e8243df
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.18.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.19.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.19.png
new file mode 100644
index 0000000000..581e8243df
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.19.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.2.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.2.png
new file mode 100644
index 0000000000..9877b92f21
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.3.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.3.png
new file mode 100644
index 0000000000..603bd24577
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.4.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.4.png
new file mode 100644
index 0000000000..5fdfbb896e
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.5.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.5.png
new file mode 100644
index 0000000000..a1ab987d8c
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.6.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.6.png
new file mode 100644
index 0000000000..9ccf9b051e
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.7.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.7.png
new file mode 100644
index 0000000000..6b40e1bfb9
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.8.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.8.png
new file mode 100644
index 0000000000..2fda36d6b5
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.8.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.9.png b/tests/auto/declarative/visual/ListView/data-MAC/listview.9.png
new file mode 100644
index 0000000000..581e8243df
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.9.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data-MAC/listview.qml b/tests/auto/declarative/visual/ListView/data-MAC/listview.qml
new file mode 100644
index 0000000000..3765668581
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-MAC/listview.qml
@@ -0,0 +1,3079 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 32
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 48
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 64
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 80
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 96
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 112
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 128
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 144
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 160
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 176
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 192
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 208
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 224
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 240
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 256
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 272
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 288
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 304
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 320
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 336
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 352
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 368
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 384
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 400
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 416
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 432
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 448
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 464
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 480
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 496
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 512
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 528
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 544
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 560
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 576
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 592
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 608
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 624
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 640
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 656
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 672
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 688
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 704
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 720
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 736
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 752
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 768
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 784
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 800
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 816
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 832
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 848
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 864
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 880
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 896
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 912
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 928
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 944
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 960
+ image: "listview.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 992
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1008
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1024
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1040
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1056
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1072
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1088
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1104
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1120
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1136
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1152
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1168
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1184
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1200
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1216
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1232
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1248
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1264
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1280
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1296
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1312
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1328
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1344
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1360
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1376
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1392
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1408
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1424
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1440
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1456
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1472
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1488
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1504
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1520
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1536
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1552
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1568
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1584
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1600
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1616
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1632
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1648
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1664
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1680
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1696
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1712
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1728
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1744
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1760
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1776
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1792
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1808
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1824
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1840
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1856
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1872
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1888
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1904
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1920
+ image: "listview.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1952
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1968
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1984
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2000
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2016
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2032
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2048
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2064
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2080
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2096
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2112
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2128
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2144
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2160
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2176
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2192
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2208
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2224
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2240
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2256
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2272
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2288
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2304
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2320
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2336
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2352
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2368
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2384
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2400
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2416
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2432
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2448
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2464
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2480
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2496
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2512
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2528
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2544
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2560
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2576
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2592
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 553; y: 267
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2608
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2624
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 554; y: 267
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 555; y: 266
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2640
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 556; y: 265
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 558; y: 260
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2656
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 560; y: 256
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2672
+ hash: "c315e184c4dcb11d7e9fd4509a8b6a1f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 562; y: 250
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 566; y: 234
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2688
+ hash: "aeef1cacca9518408519b670443e396f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 568; y: 216
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2704
+ hash: "621626927f83bf7b36b78f5ca7ed4ed0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 572; y: 192
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 572; y: 192
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2720
+ hash: "b2aca965b745e98365195c52b9dd9a2c"
+ }
+ Frame {
+ msec: 2736
+ hash: "4cc8c162afcc45c79afd8230893d4ddd"
+ }
+ Frame {
+ msec: 2752
+ hash: "b9c0815086393878ad00566db7a3c577"
+ }
+ Frame {
+ msec: 2768
+ hash: "23cbc15fce97f966c24e3ec626e01960"
+ }
+ Frame {
+ msec: 2784
+ hash: "3a7ce897b47ba39e63be31a020de6f3d"
+ }
+ Frame {
+ msec: 2800
+ hash: "2a8a32cd27fad2c57c9eb518c7b3b3ca"
+ }
+ Frame {
+ msec: 2816
+ hash: "96d676ad58119430b440a5f0a2215f26"
+ }
+ Frame {
+ msec: 2832
+ hash: "5f9cd251615ee6a98470a7b6098f7890"
+ }
+ Frame {
+ msec: 2848
+ hash: "c9b1c073cbfbf1c353685b3f38baa675"
+ }
+ Frame {
+ msec: 2864
+ hash: "cf5bfbfe8904ea40b796d2b33d5cc363"
+ }
+ Frame {
+ msec: 2880
+ image: "listview.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "c75c3342b476f75fc0c5f56a374da13e"
+ }
+ Frame {
+ msec: 2912
+ hash: "0dfcd15d21b7e949b56bc69d881c52f5"
+ }
+ Frame {
+ msec: 2928
+ hash: "73b7352bb11d29cbf64b6b594e761e42"
+ }
+ Frame {
+ msec: 2944
+ hash: "876361c2fc18c2236c1dffd36f517f44"
+ }
+ Frame {
+ msec: 2960
+ hash: "0dfaf61e3a86ee056a5d76cf6f7994b2"
+ }
+ Frame {
+ msec: 2976
+ hash: "391995cfc5d8d3808b30d74ba5ea3188"
+ }
+ Frame {
+ msec: 2992
+ hash: "6fd4f14c16a8870355fa190c94e4be2d"
+ }
+ Frame {
+ msec: 3008
+ hash: "0aac04c8092505d934220e61c7959512"
+ }
+ Frame {
+ msec: 3024
+ hash: "6cb0fbe22fcd60b5ed6385e49522b32e"
+ }
+ Frame {
+ msec: 3040
+ hash: "2eb7fd1a773e32ae94284cf57efaaff2"
+ }
+ Frame {
+ msec: 3056
+ hash: "e143ed5eeb94b35ef97e965f34d45e4d"
+ }
+ Frame {
+ msec: 3072
+ hash: "529e85f2cd48c1f0d056682b8350445b"
+ }
+ Frame {
+ msec: 3088
+ hash: "d74bded985c00ecd192ff8fdce708450"
+ }
+ Frame {
+ msec: 3104
+ hash: "f71568b2173f72c4433a019775923c02"
+ }
+ Frame {
+ msec: 3120
+ hash: "1185a1c936ac08633c14d39ca9c4f5e9"
+ }
+ Frame {
+ msec: 3136
+ hash: "e641720bf75f1e4f0a8471f3a8b35094"
+ }
+ Frame {
+ msec: 3152
+ hash: "cecc41fb42abb95505c094829fd415bf"
+ }
+ Frame {
+ msec: 3168
+ hash: "7ad89090beb9de3cd7c5a5a03fca900d"
+ }
+ Frame {
+ msec: 3184
+ hash: "2a98fe4406367d4e286d8932d6a21318"
+ }
+ Frame {
+ msec: 3200
+ hash: "9aad024b2fc25ce886ccaa4ac106b1d8"
+ }
+ Frame {
+ msec: 3216
+ hash: "3c4a787a4d590efd2e72706e40df7b6d"
+ }
+ Frame {
+ msec: 3232
+ hash: "1135e06c2981bdaed13c13400e178dc3"
+ }
+ Frame {
+ msec: 3248
+ hash: "1fbceedf1c20f2aa3f05be36126280e2"
+ }
+ Frame {
+ msec: 3264
+ hash: "5d1ec83f43b649c732cc3f7815100428"
+ }
+ Frame {
+ msec: 3280
+ hash: "27501f6b6adccfdb77a5228611e2a95a"
+ }
+ Frame {
+ msec: 3296
+ hash: "218dc244352c14467f2b2a39d78a1bc7"
+ }
+ Frame {
+ msec: 3312
+ hash: "33a998563d2c053e375f619b7a75a224"
+ }
+ Frame {
+ msec: 3328
+ hash: "02d34b79e25367e6d0dc1765cab12353"
+ }
+ Frame {
+ msec: 3344
+ hash: "2698cf68138aa7d292167bcc85f60b74"
+ }
+ Frame {
+ msec: 3360
+ hash: "0b33e929b420596ff1dce2eeef8480db"
+ }
+ Frame {
+ msec: 3376
+ hash: "d8ec307a85cecaacaa908ceb34d5db5b"
+ }
+ Frame {
+ msec: 3392
+ hash: "4afe1df3e802b41d1b89b5fab4e35190"
+ }
+ Frame {
+ msec: 3408
+ hash: "e8f484ed8d2a6745ee87ac9544281d55"
+ }
+ Frame {
+ msec: 3424
+ hash: "6df053920e87d7e6e3ec0368b4b14c25"
+ }
+ Frame {
+ msec: 3440
+ hash: "6e94791acce321417a37132821c0260d"
+ }
+ Frame {
+ msec: 3456
+ hash: "fea3e31cbf3078615f57c934197dac35"
+ }
+ Frame {
+ msec: 3472
+ hash: "e8d15890a8bd95db39889d19f046901b"
+ }
+ Frame {
+ msec: 3488
+ hash: "038b422b154dfef2d955b833892c581e"
+ }
+ Frame {
+ msec: 3504
+ hash: "01180b3d9b504ca2814382eadaf3a4e0"
+ }
+ Frame {
+ msec: 3520
+ hash: "869a0aa0d67043822c65383e0f3264d4"
+ }
+ Frame {
+ msec: 3536
+ hash: "43785b1214510c10b65018a9d68a93b1"
+ }
+ Frame {
+ msec: 3552
+ hash: "95e6ebc35c2fb128b6e6ac0743268523"
+ }
+ Frame {
+ msec: 3568
+ hash: "f8c22a6ca3169de4d29b3b0e2908f581"
+ }
+ Frame {
+ msec: 3584
+ hash: "6baf16c321847d269718bcb3468aeeb2"
+ }
+ Frame {
+ msec: 3600
+ hash: "30804b5eb2a6d99116475cbdc1a9c043"
+ }
+ Frame {
+ msec: 3616
+ hash: "c892c17ec947a910b74f5b8704405e9f"
+ }
+ Frame {
+ msec: 3632
+ hash: "696029b77512943001c9eba64191e633"
+ }
+ Frame {
+ msec: 3648
+ hash: "4c26bb0ca28d74a2bb79d0bfc8127361"
+ }
+ Frame {
+ msec: 3664
+ hash: "6e8c50cc14c9afe73b4baf09a6a8f1a4"
+ }
+ Frame {
+ msec: 3680
+ hash: "fd20e4259b44357c93f22f35c698fe1b"
+ }
+ Frame {
+ msec: 3696
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3712
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3728
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3744
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3760
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3776
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3792
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3808
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3824
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3840
+ image: "listview.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3872
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3888
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3904
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3920
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3936
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3952
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3968
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3984
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4000
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4016
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4032
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4048
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4064
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4080
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4096
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4112
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4128
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4144
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 521; y: 24
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4160
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4176
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4192
+ hash: "a5df688148c264de1d376c9b87ddfa6b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 46
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4208
+ hash: "a4e2c1878b0afce0ee1eebd63e9c951a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 66
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 88
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4224
+ hash: "2f9a79278d492790ef86a09c77e95ff4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 531; y: 136
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 531; y: 136
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4240
+ hash: "5b5ce7206b26528157c426f4e1e3e0a8"
+ }
+ Frame {
+ msec: 4256
+ hash: "65a1e5f81ab89b163aed46b984cca45e"
+ }
+ Frame {
+ msec: 4272
+ hash: "e28253ad5a2415251b68bcda1d7d4bd0"
+ }
+ Frame {
+ msec: 4288
+ hash: "71aae5abb4a9e9077053ea21dd3ec315"
+ }
+ Frame {
+ msec: 4304
+ hash: "33fcea38fc3b328b3294f9ac2a26aa1a"
+ }
+ Frame {
+ msec: 4320
+ hash: "6299eb1d87f371966307668b92de6a0b"
+ }
+ Frame {
+ msec: 4336
+ hash: "4f66d8c7cb6971d0fc24089d123c547b"
+ }
+ Frame {
+ msec: 4352
+ hash: "d9906d61b31fabf968290ebcd6688f34"
+ }
+ Frame {
+ msec: 4368
+ hash: "5a1945993ff8096ba6b933d45586044a"
+ }
+ Frame {
+ msec: 4384
+ hash: "331535e54da9bbdbc2fbf2b244ad0199"
+ }
+ Frame {
+ msec: 4400
+ hash: "4dc39de0c54f6e0b77f94f6ae6c345ec"
+ }
+ Frame {
+ msec: 4416
+ hash: "ec309a298ce246c13eb666488eb75016"
+ }
+ Frame {
+ msec: 4432
+ hash: "a133819f8adc6265eb0e438261c869e3"
+ }
+ Frame {
+ msec: 4448
+ hash: "da4d64fd6b3ae7d49ee5c5c8d0117a37"
+ }
+ Frame {
+ msec: 4464
+ hash: "620dd1c3fc41ce657eac9d1a5b765fd4"
+ }
+ Frame {
+ msec: 4480
+ hash: "ff1c370bd1bf75a98ae7125e7dd5a9db"
+ }
+ Frame {
+ msec: 4496
+ hash: "59c6e4297109b5cc7c197749867dddae"
+ }
+ Frame {
+ msec: 4512
+ hash: "91b1719e86529d0c35a53a2d0a095dd6"
+ }
+ Frame {
+ msec: 4528
+ hash: "2994663d35c9eb453a27c1a1fa9aeeb8"
+ }
+ Frame {
+ msec: 4544
+ hash: "ae4ec37b9f6a00b3c9139e5cfe13d32e"
+ }
+ Frame {
+ msec: 4560
+ hash: "a98340236d1b65f47e88684168c1429d"
+ }
+ Frame {
+ msec: 4576
+ hash: "34848b483ea6a2bd412e29d26beb3ab0"
+ }
+ Frame {
+ msec: 4592
+ hash: "dd9bae0e2fca84b265d8cb59686ff88d"
+ }
+ Frame {
+ msec: 4608
+ hash: "18b6ef6f5913b0612b76e7b2e25073dd"
+ }
+ Frame {
+ msec: 4624
+ hash: "9398aab9478279aed1bc40c9378f8da4"
+ }
+ Frame {
+ msec: 4640
+ hash: "a297a304c12102f23bd1e0f0207e0df9"
+ }
+ Frame {
+ msec: 4656
+ hash: "091db9138cd6ae801ad857105a83c8f9"
+ }
+ Frame {
+ msec: 4672
+ hash: "253938ca4a4f13433ddd502eb94cb7cd"
+ }
+ Frame {
+ msec: 4688
+ hash: "6002df1793d290e4e31ee0c91c37bbe6"
+ }
+ Frame {
+ msec: 4704
+ hash: "212476fa1c3a52fb8eba03ec3aecdcd8"
+ }
+ Frame {
+ msec: 4720
+ hash: "80d4d8434d4e96a2bc23f5ed060d6ddc"
+ }
+ Frame {
+ msec: 4736
+ hash: "2d4add725f31a04558635ce4b73a758a"
+ }
+ Frame {
+ msec: 4752
+ hash: "57c06022ec1e502c4f49f43063c433e7"
+ }
+ Frame {
+ msec: 4768
+ hash: "8393e97990993f9d5f68ea65f8e4a2db"
+ }
+ Frame {
+ msec: 4784
+ hash: "9a1fcd96dffaf5c79ecc7f9427e02499"
+ }
+ Frame {
+ msec: 4800
+ image: "listview.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "5ae722cf541e3453e73bbee57dc379e9"
+ }
+ Frame {
+ msec: 4832
+ hash: "fc7326c2e2e56d9c3036e8dfc2ea77a8"
+ }
+ Frame {
+ msec: 4848
+ hash: "f22a2a68cea158f333b0457025d75490"
+ }
+ Frame {
+ msec: 4864
+ hash: "d684c8aa9b835779080f170cafead40f"
+ }
+ Frame {
+ msec: 4880
+ hash: "dd451e5e421f929d015981bc7aeb8c66"
+ }
+ Frame {
+ msec: 4896
+ hash: "d066f228295db7f46520495167d3e946"
+ }
+ Frame {
+ msec: 4912
+ hash: "ebf640a457e3498bade3220aafa70331"
+ }
+ Frame {
+ msec: 4928
+ hash: "190f5b1f3ce9d200790c34c50bcc62c5"
+ }
+ Frame {
+ msec: 4944
+ hash: "9d4ad865246eb008afa40740b5c9a208"
+ }
+ Frame {
+ msec: 4960
+ hash: "81c8b2c0b4f9e74f24d328a1d9b40a9f"
+ }
+ Frame {
+ msec: 4976
+ hash: "24acc300307e71bee79bce8de76f56cb"
+ }
+ Frame {
+ msec: 4992
+ hash: "1f9d31f94cfce6f868bfcc8a104d2465"
+ }
+ Frame {
+ msec: 5008
+ hash: "7a3cab008dcb7a893ae30797b33df6f2"
+ }
+ Frame {
+ msec: 5024
+ hash: "38d561a2950434e59513439c7f1120ea"
+ }
+ Frame {
+ msec: 5040
+ hash: "8d34131faa15bc126bd4d9ef3be39ef5"
+ }
+ Frame {
+ msec: 5056
+ hash: "85d57ef15791b56deb537795dd87911e"
+ }
+ Frame {
+ msec: 5072
+ hash: "71e932169915a6c8c2cef0b22febf316"
+ }
+ Frame {
+ msec: 5088
+ hash: "8b3452981963aeebadc9ac2013150263"
+ }
+ Frame {
+ msec: 5104
+ hash: "a3fb8abecfeb48ba1cd1fd8f40896fa0"
+ }
+ Frame {
+ msec: 5120
+ hash: "f53ab533f6a58ae45139f3da4bf8ab4e"
+ }
+ Frame {
+ msec: 5136
+ hash: "9ec7012404f3c1c7795810dcee5acc3b"
+ }
+ Frame {
+ msec: 5152
+ hash: "99ca43bab532dd5d7566e596c65053ce"
+ }
+ Frame {
+ msec: 5168
+ hash: "0af83ad2416821cc230cd2856d1a3e39"
+ }
+ Frame {
+ msec: 5184
+ hash: "86fa23ddf2005bbf35238ae04ae554ac"
+ }
+ Frame {
+ msec: 5200
+ hash: "bb52a748f1d85dde410cfa4f24e3ed20"
+ }
+ Frame {
+ msec: 5216
+ hash: "898b96bc5ee9a3ac61764e5cd9af8cfb"
+ }
+ Frame {
+ msec: 5232
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5248
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5264
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5280
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5296
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5312
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5328
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5344
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5360
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5376
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5392
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5408
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5424
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5440
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5456
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5472
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5488
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5504
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5520
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5536
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5552
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5568
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5584
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5600
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5616
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5632
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5648
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5664
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5680
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5696
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5712
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5728
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5744
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5760
+ image: "listview.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5792
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5808
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5824
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5840
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5856
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5872
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5888
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5904
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5920
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5936
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5952
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5968
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 111; y: 230
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 111; y: 227
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5984
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 111; y: 223
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6000
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 111; y: 216
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 111; y: 210
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6016
+ hash: "0076b55d3da4ca365688b6a2c984103f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 112; y: 205
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6032
+ hash: "db846ad8e3200ca1fce36a38dc7beab8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 112; y: 192
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6048
+ hash: "3cb6b25725b4285f9c096d595224c5ca"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 111; y: 180
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6064
+ hash: "1832e12fdf3b464b02b296e727b33694"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 110; y: 173
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6080
+ hash: "6d18d2b5f65cbba4915d0725d24b40f3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 109; y: 158
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 107; y: 140
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6096
+ hash: "79bc7afc6b1aa5f8904b3e6d5d4a9389"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 103; y: 124
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6112
+ hash: "4436f2d15304c839aacec486c1fd6d96"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 101; y: 111
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6128
+ hash: "c3bffc7c95893cf9bbd8596208b7f657"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 101; y: 105
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 101; y: 100
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6144
+ hash: "04231c2fdc02729aa34ed4e403dd373b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 101; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6160
+ hash: "392d75c4b372825e78366eb63a618170"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 101; y: 87
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 102; y: 83
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6176
+ hash: "7f91f7bdb0cb62d600ac4aa573681fe3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 102; y: 79
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6192
+ hash: "69207181a382650c5e33145555f0d9ba"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 103; y: 76
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 103; y: 72
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6208
+ hash: "65a184b5c49b02e08114e437483f928d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 104; y: 68
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 105; y: 64
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6224
+ hash: "c22da9ce54d04f51fb55da755753a509"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 105; y: 61
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6240
+ hash: "59dbd5216847a62f60a1d0701a15bb62"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 106; y: 57
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 106; y: 53
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6256
+ hash: "bbfc902db6e6ca253afb1c90306b2a63"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 106; y: 47
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 106; y: 47
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6272
+ hash: "5c41f194afec5f7e3db9d98673d03d5c"
+ }
+ Frame {
+ msec: 6288
+ hash: "deb06d0f915d5f6ec39b1820d57b6af6"
+ }
+ Frame {
+ msec: 6304
+ hash: "deb06d0f915d5f6ec39b1820d57b6af6"
+ }
+ Frame {
+ msec: 6320
+ hash: "2a1a1f9239a6ccb308e51796f9b0bb89"
+ }
+ Frame {
+ msec: 6336
+ hash: "3c1b44201616b8271023bf05a3f3f0f7"
+ }
+ Frame {
+ msec: 6352
+ hash: "87afcef49db8b2b547e85e834f8ec304"
+ }
+ Frame {
+ msec: 6368
+ hash: "290081b4b1272ef09ec9964c128e61b5"
+ }
+ Frame {
+ msec: 6384
+ hash: "19bb3b23ee4b14a5f0a313106ef7c8c1"
+ }
+ Frame {
+ msec: 6400
+ hash: "65a184b5c49b02e08114e437483f928d"
+ }
+ Frame {
+ msec: 6416
+ hash: "832d2aefbcaf776f35039be527d367c5"
+ }
+ Frame {
+ msec: 6432
+ hash: "69207181a382650c5e33145555f0d9ba"
+ }
+ Frame {
+ msec: 6448
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6464
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6480
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6496
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6512
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6528
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6544
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6560
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6576
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6592
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6608
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6624
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6640
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6656
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6672
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6688
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6704
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6720
+ image: "listview.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6752
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6768
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6784
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6800
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6816
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6832
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6848
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6864
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6880
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6896
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6912
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6928
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6944
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6960
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6976
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6992
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7008
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7024
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7040
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7056
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7072
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7088
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7104
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7120
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7136
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7152
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7168
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7184
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7200
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7216
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7232
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7248
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7264
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7280
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7296
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 519; y: 276
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7312
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 519; y: 275
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7328
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 519; y: 274
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7344
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 518; y: 273
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 518; y: 272
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7360
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 518; y: 271
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7376
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 518; y: 268
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7392
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 518; y: 266
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 518; y: 265
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7408
+ hash: "9047f597b9e59ca652c172338bed6ef9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: 262
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7424
+ hash: "87476f78daecd6bb49e8d6e673d28100"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: 260
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7440
+ hash: "6bfd895c6b7d97e4102eb26608cdfeca"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: 254
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7456
+ hash: "e4c2b75beaee54a5781a5acbeb37ea64"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: 249
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7472
+ hash: "d5e816768e9c3db0631416bd86b1b461"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: 243
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7488
+ hash: "df6c7252ebb51e7447396b640e1c6ead"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: 237
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7504
+ hash: "5f4db5386dc76b9f2dac47618c733dee"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: 231
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7520
+ hash: "534d1d16d8321996969b54875ec5f1e0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: 225
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7536
+ hash: "5263016e53327df1972498b55a60c0ed"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: 219
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7552
+ hash: "6787a5a16d2a61643bb1435f6488ada6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 518; y: 215
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7568
+ hash: "1feabcd683590c3d28d899167e6278b3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 519; y: 208
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7584
+ hash: "c0495d6083b2e4ddd2b1dca2f231529c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 520; y: 202
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7600
+ hash: "cb302493a17c1806dfcdf002c44e7acd"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 196
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7616
+ hash: "f3822b79b678532ce7f826952636be90"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 189
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7632
+ hash: "6e30eed182c38be110ba9c7e95b223be"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 185
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7648
+ hash: "9e3ad0331c0c041b9a5747a1d44a43fe"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 177
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7664
+ hash: "791e6abf9dae670770c2429ee9f1ad71"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 169
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7680
+ image: "listview.7.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 160
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7696
+ hash: "d3ae366fb8212cb987e23150802c88e3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 156
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7712
+ hash: "b87708e19d7e8b64fe1ab50ec1723975"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 147
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7728
+ hash: "512678e45cdd8d48e10b08ee020afe8e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 144
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7744
+ hash: "211aa70e813819d476996b3396e9e5a0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 137
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7760
+ hash: "f16eaa360604be84ce61364ad9733b52"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 130
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7776
+ hash: "d3af36dfb187d08abe1458f186a935a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 124
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7792
+ hash: "9d0a0ba1deb7c4a4a8838e5e6a27f2f6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 122
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7808
+ hash: "69aac14f4c137e66724ca33f00a86676"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7824
+ hash: "893d56e2a2ca257fae9f0c6c0629903d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 111
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7840
+ hash: "b9f734e57a72e33973740a59776948d9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 106
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7856
+ hash: "e4b0f3f6a6785d7a183e4a36c5803301"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 104
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7872
+ hash: "99ee1e8803c05e546a721b0c9ee39499"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7888
+ hash: "96e7da2f895500a786ed36cb295e9003"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7904
+ hash: "cd369fc5dc31814208e56cf7cd0decea"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7920
+ hash: "5fee72994b65a45b4900a3073f86a3e1"
+ }
+ Frame {
+ msec: 7936
+ hash: "9a2f8a65d842b8f92998e6411f7cd53c"
+ }
+ Frame {
+ msec: 7952
+ hash: "2848d69017ce71ae101ccdfa7c67f933"
+ }
+ Frame {
+ msec: 7968
+ hash: "6568aa88e81f988f65da435df7166167"
+ }
+ Frame {
+ msec: 7984
+ hash: "d5f15ee08a2d7667786757a378a7a7f4"
+ }
+ Frame {
+ msec: 8000
+ hash: "9b566bd02a561b32d1a4c1ec99c2e2c3"
+ }
+ Frame {
+ msec: 8016
+ hash: "580419e1c9e91046547d913f6b8790a4"
+ }
+ Frame {
+ msec: 8032
+ hash: "a5a3cd610ec0b35af1295ee6c41e09e3"
+ }
+ Frame {
+ msec: 8048
+ hash: "a5a3cd610ec0b35af1295ee6c41e09e3"
+ }
+ Frame {
+ msec: 8064
+ hash: "a5a3cd610ec0b35af1295ee6c41e09e3"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 521; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8080
+ hash: "a5a3cd610ec0b35af1295ee6c41e09e3"
+ }
+ Frame {
+ msec: 8096
+ hash: "a5a3cd610ec0b35af1295ee6c41e09e3"
+ }
+ Frame {
+ msec: 8112
+ hash: "83b91a371d682a501bc3a3fceabe4f8c"
+ }
+ Frame {
+ msec: 8128
+ hash: "798b1dbfa0cce362213f426e2c60ac0e"
+ }
+ Frame {
+ msec: 8144
+ hash: "d71b6a693c430a618c23413cb65bb320"
+ }
+ Frame {
+ msec: 8160
+ hash: "2baae394390da39447a67151bc503d65"
+ }
+ Frame {
+ msec: 8176
+ hash: "06688b05c61a7b862d39534207a8adab"
+ }
+ Frame {
+ msec: 8192
+ hash: "a1d3042e16709817906dcdc673ee52c7"
+ }
+ Frame {
+ msec: 8208
+ hash: "236dd41feac1b1a8a4bd7911bb184da2"
+ }
+ Frame {
+ msec: 8224
+ hash: "f3ec821bba1d32e90bdab0e85c07d7d8"
+ }
+ Frame {
+ msec: 8240
+ hash: "e328c35adf7ffc3d7e3af97e798ec8a5"
+ }
+ Frame {
+ msec: 8256
+ hash: "651101db68fd3ed1dc5f441c126dc31b"
+ }
+ Frame {
+ msec: 8272
+ hash: "651101db68fd3ed1dc5f441c126dc31b"
+ }
+ Frame {
+ msec: 8288
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8304
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8320
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8336
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8352
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8368
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8384
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8400
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8416
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8432
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8448
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8464
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8480
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8496
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8512
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8528
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8544
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8560
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8576
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8592
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8608
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8624
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8640
+ image: "listview.8.png"
+ }
+ Frame {
+ msec: 8656
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8672
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8688
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8704
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8720
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8736
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8752
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8768
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8784
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8800
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8816
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8832
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8848
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8864
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8880
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8896
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8912
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8928
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8944
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8960
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8976
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8992
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9008
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9024
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9040
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9056
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9072
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9088
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9104
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9120
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9136
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9152
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9168
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9184
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9200
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9216
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9232
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9248
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9264
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9280
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9296
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9312
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9328
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9344
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9360
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9376
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9392
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9408
+ hash: "1171be123a361d72859c25434573482c"
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/data-X11/basic1.qml b/tests/auto/declarative/visual/ListView/data-X11/basic1.qml
new file mode 100644
index 0000000000..ae59b14dd6
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-X11/basic1.qml
@@ -0,0 +1,159 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 32
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 48
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 64
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 80
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 96
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 112
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 128
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 144
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 160
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 176
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 192
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 208
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 224
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 240
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 256
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 272
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 288
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 304
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 320
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 336
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 352
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 368
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 384
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 400
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 416
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 432
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 448
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 464
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 480
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 496
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 512
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 528
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 544
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 560
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 576
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/data-X11/basic2.qml b/tests/auto/declarative/visual/ListView/data-X11/basic2.qml
new file mode 100644
index 0000000000..ff19d22abb
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-X11/basic2.qml
@@ -0,0 +1,187 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 32
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 48
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 64
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 80
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 96
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 112
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 128
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 144
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 160
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 176
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 192
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 208
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 224
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 240
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 256
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 272
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 288
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 304
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 320
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 336
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 352
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 368
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 384
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 400
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 416
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 432
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 448
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 464
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 480
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 496
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 512
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 528
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 544
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 560
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 576
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 592
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 608
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 624
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 640
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 656
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 672
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 688
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/data-X11/basic3.qml b/tests/auto/declarative/visual/ListView/data-X11/basic3.qml
new file mode 100644
index 0000000000..2f33cae8be
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-X11/basic3.qml
@@ -0,0 +1,147 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 32
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 48
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 64
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 80
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 96
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 112
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 128
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 144
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 160
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 176
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 192
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 208
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 224
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 240
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 256
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 272
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 288
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 304
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 320
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 336
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 352
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 368
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 384
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 400
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 416
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 432
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 448
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 464
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 480
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 496
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 512
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 528
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/data-X11/basic4.qml b/tests/auto/declarative/visual/ListView/data-X11/basic4.qml
new file mode 100644
index 0000000000..4b1c5cfca0
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data-X11/basic4.qml
@@ -0,0 +1,171 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 32
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 48
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 64
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 80
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 96
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 112
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 128
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 144
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 160
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 176
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 192
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 208
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 224
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 240
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 256
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 272
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 288
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 304
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 320
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 336
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 352
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 368
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 384
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 400
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 416
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 432
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 448
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 464
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 480
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 496
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 512
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 528
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 544
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 560
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 576
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 592
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 608
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+ Frame {
+ msec: 624
+ hash: "c0dc2737283d8dfa62631e0cbb948b99"
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/data/basic1.qml b/tests/auto/declarative/visual/ListView/data/basic1.qml
new file mode 100644
index 0000000000..4cd44fc972
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/basic1.qml
@@ -0,0 +1,159 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 32
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 48
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 64
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 80
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 96
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 112
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 128
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 144
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 160
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 176
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 192
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 208
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 224
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 240
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 256
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 272
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 288
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 304
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 320
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 336
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 352
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 368
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 384
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 400
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 416
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 432
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 448
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 464
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 480
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 496
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 512
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 528
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 544
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 560
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 576
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/data/basic2.qml b/tests/auto/declarative/visual/ListView/data/basic2.qml
new file mode 100644
index 0000000000..34ad5ed3c5
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/basic2.qml
@@ -0,0 +1,187 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 32
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 48
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 64
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 80
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 96
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 112
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 128
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 144
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 160
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 176
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 192
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 208
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 224
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 240
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 256
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 272
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 288
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 304
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 320
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 336
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 352
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 368
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 384
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 400
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 416
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 432
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 448
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 464
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 480
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 496
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 512
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 528
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 544
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 560
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 576
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 592
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 608
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 624
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 640
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 656
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 672
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 688
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/data/basic3.qml b/tests/auto/declarative/visual/ListView/data/basic3.qml
new file mode 100644
index 0000000000..1c5ddb0a66
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/basic3.qml
@@ -0,0 +1,147 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 32
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 48
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 64
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 80
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 96
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 112
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 128
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 144
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 160
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 176
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 192
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 208
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 224
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 240
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 256
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 272
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 288
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 304
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 320
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 336
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 352
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 368
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 384
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 400
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 416
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 432
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 448
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 464
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 480
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 496
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 512
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 528
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/data/basic4.qml b/tests/auto/declarative/visual/ListView/data/basic4.qml
new file mode 100644
index 0000000000..d121d912a7
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/basic4.qml
@@ -0,0 +1,171 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 32
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 48
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 64
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 80
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 96
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 112
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 128
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 144
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 160
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 176
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 192
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 208
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 224
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 240
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 256
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 272
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 288
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 304
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 320
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 336
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 352
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 368
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 384
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 400
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 416
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 432
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 448
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 464
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 480
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 496
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 512
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 528
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 544
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 560
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 576
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 592
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 608
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+ Frame {
+ msec: 624
+ hash: "c0ec1bac5550efaa1f8ce7b46c2fed94"
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/data/itemlist.0.png b/tests/auto/declarative/visual/ListView/data/itemlist.0.png
new file mode 100644
index 0000000000..a1947ca447
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/itemlist.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/itemlist.1.png b/tests/auto/declarative/visual/ListView/data/itemlist.1.png
new file mode 100644
index 0000000000..d27b7fa9f2
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/itemlist.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/itemlist.2.png b/tests/auto/declarative/visual/ListView/data/itemlist.2.png
new file mode 100644
index 0000000000..fdab8c6a25
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/itemlist.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/itemlist.3.png b/tests/auto/declarative/visual/ListView/data/itemlist.3.png
new file mode 100644
index 0000000000..dc321a85bf
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/itemlist.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/itemlist.4.png b/tests/auto/declarative/visual/ListView/data/itemlist.4.png
new file mode 100644
index 0000000000..fdab8c6a25
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/itemlist.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/itemlist.5.png b/tests/auto/declarative/visual/ListView/data/itemlist.5.png
new file mode 100644
index 0000000000..15b51cb500
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/itemlist.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/itemlist.6.png b/tests/auto/declarative/visual/ListView/data/itemlist.6.png
new file mode 100644
index 0000000000..a1947ca447
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/itemlist.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/itemlist.qml b/tests/auto/declarative/visual/ListView/data/itemlist.qml
new file mode 100644
index 0000000000..073749f916
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/itemlist.qml
@@ -0,0 +1,2203 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 32
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 48
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 64
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 80
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 96
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 112
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 128
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 144
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 160
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 176
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 192
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 208
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 224
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 240
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 256
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 272
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 288
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 304
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 320
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 336
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 352
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 368
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 384
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 400
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 416
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 432
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 448
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 464
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 480
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 496
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 512
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 528
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 544
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 560
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 576
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 592
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 608
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 624
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 640
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 656
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 672
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 688
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 704
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 720
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 736
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 752
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 768
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 784
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 800
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 816
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 832
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 848
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 864
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 880
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 896
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 912
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 928
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 944
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 960
+ image: "itemlist.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 992
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1008
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1024
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1040
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1056
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1072
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1088
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1104
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1120
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1136
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1152
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1168
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1184
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1200
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1216
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1232
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1248
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1264
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1280
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1296
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1312
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1328
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1344
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1360
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1376
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1392
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1408
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1424
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1440
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1456
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1472
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1488
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1504
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1520
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1536
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1552
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1568
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1584
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1600
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1616
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1632
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 1648
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 192; y: 111
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1664
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 191; y: 111
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1680
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 190; y: 112
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 113
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1696
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 184; y: 113
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 180; y: 113
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1712
+ hash: "a68b1bc6c2963ee92c3a45f500667b3b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 174; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 167; y: 115
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1728
+ hash: "7cda93e59466b3348e7ffe3895f89e86"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 160; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1744
+ hash: "06e0008c78e919f7270402938d9d764b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 140; y: 121
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 132; y: 122
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1760
+ hash: "9d8da9199efebb95f56e5d4ebc9a585e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 114; y: 126
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 98; y: 132
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1776
+ hash: "54a60a4279911ba4a8a5741bcadfa783"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 91; y: 132
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 91; y: 132
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1792
+ hash: "a1a19370a1a8ed78e475f0d0eb12311c"
+ }
+ Frame {
+ msec: 1808
+ hash: "196a3b127cf7065614c34856bf8d8bca"
+ }
+ Frame {
+ msec: 1824
+ hash: "5fbefbd7c7be4374382cc4c8b86ac78a"
+ }
+ Frame {
+ msec: 1840
+ hash: "d6a544c622e504c1b931e1a8a1310a6e"
+ }
+ Frame {
+ msec: 1856
+ hash: "20e76f0eb4ec5f691999faf8ad313370"
+ }
+ Frame {
+ msec: 1872
+ hash: "7f84a3545907c754ae8a6a30ef61c98d"
+ }
+ Frame {
+ msec: 1888
+ hash: "b544901eae32903ad054e8cdfed715eb"
+ }
+ Frame {
+ msec: 1904
+ hash: "a010ed1e3312f4ca9f429b7e32cdcef9"
+ }
+ Frame {
+ msec: 1920
+ image: "itemlist.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "93a731dc6f71b6ff5400bf74c87e6c46"
+ }
+ Frame {
+ msec: 1952
+ hash: "c73f63d1a024ba956e693487b3ccc761"
+ }
+ Frame {
+ msec: 1968
+ hash: "539d3d00fce2d0128cd697d86d237fe7"
+ }
+ Frame {
+ msec: 1984
+ hash: "52752d7d6f2d0e085f7132313907b72b"
+ }
+ Frame {
+ msec: 2000
+ hash: "f46dd5803a6075e979e0fc733d503bfb"
+ }
+ Frame {
+ msec: 2016
+ hash: "b8734698a6bad00ecf019f85328c2c21"
+ }
+ Frame {
+ msec: 2032
+ hash: "1cfc499ca756023430cc5b2fa95a599d"
+ }
+ Frame {
+ msec: 2048
+ hash: "63a816548837c19f8f0494c137fc0174"
+ }
+ Frame {
+ msec: 2064
+ hash: "1bce9b85235e9a1a472c079dfec70ec5"
+ }
+ Frame {
+ msec: 2080
+ hash: "6677863e7f74c12648409883f73adbe2"
+ }
+ Frame {
+ msec: 2096
+ hash: "98e707a3e39a5f7bd4a101c2ed83535c"
+ }
+ Frame {
+ msec: 2112
+ hash: "c1f6d8842d14a9394d4b7797314f50e8"
+ }
+ Frame {
+ msec: 2128
+ hash: "579758b477bcd2112b305a5aac7df338"
+ }
+ Frame {
+ msec: 2144
+ hash: "4a7bb81090db246db53e2dbc56f710ea"
+ }
+ Frame {
+ msec: 2160
+ hash: "074995cdd8a70817d1c8a7bb0ad4c542"
+ }
+ Frame {
+ msec: 2176
+ hash: "bd8d7bda4d2e9ad1fba2895d568f36cc"
+ }
+ Frame {
+ msec: 2192
+ hash: "40cce3d2d80ac470af44fc334cec1d5b"
+ }
+ Frame {
+ msec: 2208
+ hash: "15cbc226b032d5a97199735ea7a1408b"
+ }
+ Frame {
+ msec: 2224
+ hash: "12b296aea9b058a5402d0d0a620f8edc"
+ }
+ Frame {
+ msec: 2240
+ hash: "6ffd2b79cf0e941a59e74bc6f9025bcb"
+ }
+ Frame {
+ msec: 2256
+ hash: "589a58ef76ea709dc8d80390c9044f99"
+ }
+ Frame {
+ msec: 2272
+ hash: "c009924bfa30153f22ab168b539494e9"
+ }
+ Frame {
+ msec: 2288
+ hash: "4b83674a7c2daa68d735901ad40be2bd"
+ }
+ Frame {
+ msec: 2304
+ hash: "0525908c0302ada989e28990bac3f2ca"
+ }
+ Frame {
+ msec: 2320
+ hash: "89eb13976ba3ba4413cafeb0cc91c01b"
+ }
+ Frame {
+ msec: 2336
+ hash: "75c1295ef99680784b2e11fb88fa1423"
+ }
+ Frame {
+ msec: 2352
+ hash: "93d89165cf6a97c76ae6e7f75678a3cd"
+ }
+ Frame {
+ msec: 2368
+ hash: "53064c1938f08a55603a99b0db225174"
+ }
+ Frame {
+ msec: 2384
+ hash: "31db5684466c0c32128a9a8c7b1835e1"
+ }
+ Frame {
+ msec: 2400
+ hash: "99d9e58697736198e0a00443d237e85b"
+ }
+ Frame {
+ msec: 2416
+ hash: "6c1e860aef983367365d53f5849ad441"
+ }
+ Frame {
+ msec: 2432
+ hash: "6c1e860aef983367365d53f5849ad441"
+ }
+ Frame {
+ msec: 2448
+ hash: "6c1e860aef983367365d53f5849ad441"
+ }
+ Frame {
+ msec: 2464
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2480
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2496
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2512
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2528
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2544
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2560
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2576
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2592
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2608
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2624
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2640
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2656
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2672
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2688
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2704
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2720
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2736
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2752
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2768
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2784
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2800
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2816
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2832
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2848
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 2864
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 181; y: 104
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2880
+ image: "itemlist.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 179; y: 105
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 177; y: 106
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2912
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 174; y: 108
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 170; y: 110
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2928
+ hash: "5bb06b4e74532ba5bc8c7bc38bf77d7f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 166; y: 112
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 160; y: 115
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2944
+ hash: "b10a6206830a876017799ef2fcf61b1a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 154; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 140; y: 123
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2960
+ hash: "b2e24759ba10afd6cff90f4b1e04b496"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 124; y: 127
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 124; y: 127
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2976
+ hash: "ccbcd6f45cb529c2db71504c0f69d73e"
+ }
+ Frame {
+ msec: 2992
+ hash: "7b31c6d5931677f1aa1e8c7d48a4ff22"
+ }
+ Frame {
+ msec: 3008
+ hash: "c52f691a0a6cf155118bdfea2dfea623"
+ }
+ Frame {
+ msec: 3024
+ hash: "dd639d1df3d4a9b8f06718def63d588f"
+ }
+ Frame {
+ msec: 3040
+ hash: "39d767b09a648ef6295cec2848f9226f"
+ }
+ Frame {
+ msec: 3056
+ hash: "5dd46d5f386431e7b13348ac9a9630ed"
+ }
+ Frame {
+ msec: 3072
+ hash: "0354e5183b0e66e7ba146d292c559df4"
+ }
+ Frame {
+ msec: 3088
+ hash: "984aa6d7075e24de429e05b1b0eda94a"
+ }
+ Frame {
+ msec: 3104
+ hash: "1af58a2f44f1f613712d4df85e38356d"
+ }
+ Frame {
+ msec: 3120
+ hash: "6e4085e7f1fee724d78808753f04b471"
+ }
+ Frame {
+ msec: 3136
+ hash: "73a019ef9057639d631cd99a431b3f3b"
+ }
+ Frame {
+ msec: 3152
+ hash: "c9414a2e655a90dfdcb6fb288b4ba0ca"
+ }
+ Frame {
+ msec: 3168
+ hash: "3f4c24f7ac89da982af22032309637fb"
+ }
+ Frame {
+ msec: 3184
+ hash: "a50e6ada8f73a257657f4348ceaffcfd"
+ }
+ Frame {
+ msec: 3200
+ hash: "a67bf40d09259bbd079c12ae4f49150f"
+ }
+ Frame {
+ msec: 3216
+ hash: "a2fc512b7c234a9d0b2c1a83387a8a46"
+ }
+ Frame {
+ msec: 3232
+ hash: "85090683ce9a3c9833b1cb0b3df076ee"
+ }
+ Frame {
+ msec: 3248
+ hash: "275f3594a0e2cc4b6717f9f336e7e1b6"
+ }
+ Frame {
+ msec: 3264
+ hash: "2473eb11f7b65a784a2b166114026488"
+ }
+ Frame {
+ msec: 3280
+ hash: "4865c30dc45fbf5ca82047b77eca0912"
+ }
+ Frame {
+ msec: 3296
+ hash: "54de88bca395449fbaea2c090c7a5d91"
+ }
+ Frame {
+ msec: 3312
+ hash: "833f9295cf9a34934f001eac48551b59"
+ }
+ Frame {
+ msec: 3328
+ hash: "5bf565f57ababa7380faeee94add91ca"
+ }
+ Frame {
+ msec: 3344
+ hash: "6325578867f1eb3b2d47ed40b017b571"
+ }
+ Frame {
+ msec: 3360
+ hash: "046a6114176b3a3206b7a2acd6e30b41"
+ }
+ Frame {
+ msec: 3376
+ hash: "f8d4120a17f28c2d1d9c4be959098058"
+ }
+ Frame {
+ msec: 3392
+ hash: "71356d2e48aad2900784ea6bc1a3d908"
+ }
+ Frame {
+ msec: 3408
+ hash: "b84ad460fb81fdc4049abe8f3ff180bb"
+ }
+ Frame {
+ msec: 3424
+ hash: "0354239f5eaea23474d9f81385392a8a"
+ }
+ Frame {
+ msec: 3440
+ hash: "8ef0eef3393e07ae7605c865a95edc30"
+ }
+ Frame {
+ msec: 3456
+ hash: "5b8b384cc8e3faf4310015e19b3eb487"
+ }
+ Frame {
+ msec: 3472
+ hash: "77c18ac7dfff2a4e516915e3e3df0717"
+ }
+ Frame {
+ msec: 3488
+ hash: "c1d3264384c26345eb8100de829309ca"
+ }
+ Frame {
+ msec: 3504
+ hash: "6b21f71d0bedef4bbcb445a13f61e7a3"
+ }
+ Frame {
+ msec: 3520
+ hash: "f619097356671f6eb54d3b1c481e709d"
+ }
+ Frame {
+ msec: 3536
+ hash: "e56e3a90da446e0c482cb93717f6aacc"
+ }
+ Frame {
+ msec: 3552
+ hash: "aa94ebdbb4b8423aff28c95daff0baf5"
+ }
+ Frame {
+ msec: 3568
+ hash: "e1744d9cacd1a2c96af4cfdd5c486995"
+ }
+ Frame {
+ msec: 3584
+ hash: "7f19ea52e9e41a3b1bd90bb2a144d305"
+ }
+ Frame {
+ msec: 3600
+ hash: "7f19ea52e9e41a3b1bd90bb2a144d305"
+ }
+ Frame {
+ msec: 3616
+ hash: "7f19ea52e9e41a3b1bd90bb2a144d305"
+ }
+ Frame {
+ msec: 3632
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3648
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3664
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3680
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3696
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3712
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3728
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3744
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3760
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3776
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3792
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3808
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3824
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3840
+ image: "itemlist.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3872
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3888
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3904
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3920
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3936
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3952
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3968
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 3984
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 4000
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 4016
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 4032
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 4048
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 4064
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 4080
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Frame {
+ msec: 4096
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 31; y: 137
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4112
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 32; y: 137
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4128
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 33; y: 136
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 36; y: 135
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4144
+ hash: "88143ff6c278a5433b314b551b7b8b1d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 40; y: 134
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 46; y: 132
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4160
+ hash: "c2c9c284b185a89faf4ddb5a7867f449"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 64; y: 130
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4176
+ hash: "de1c18aeda5d2fbd6dad4554c78617bd"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 86; y: 126
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 110; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 110; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4192
+ hash: "a67bf40d09259bbd079c12ae4f49150f"
+ }
+ Frame {
+ msec: 4208
+ hash: "94514668dafbe41c5890a578efd6dea4"
+ }
+ Frame {
+ msec: 4224
+ hash: "2e97a74eb9ddb1c9613c89e2d78db018"
+ }
+ Frame {
+ msec: 4240
+ hash: "4b5368f0d86bffeb6bd31b58aec88650"
+ }
+ Frame {
+ msec: 4256
+ hash: "b459bde7bb4ce51e6ecdab58f64fcbb9"
+ }
+ Frame {
+ msec: 4272
+ hash: "7bac8cc3ec64c9ad1c0da282e38c953e"
+ }
+ Frame {
+ msec: 4288
+ hash: "a73a58c3d7a757547740a2a161f4c756"
+ }
+ Frame {
+ msec: 4304
+ hash: "b35edcb1fa3568a3e770ab2364b82e75"
+ }
+ Frame {
+ msec: 4320
+ hash: "d6c863ef57c5e5cb04cdac72f920db0b"
+ }
+ Frame {
+ msec: 4336
+ hash: "0db5e4588ff851918b07796f0cf07382"
+ }
+ Frame {
+ msec: 4352
+ hash: "71ec8c363ca6a6f7556afb70faccffe6"
+ }
+ Frame {
+ msec: 4368
+ hash: "18d026e9c965ada1db67c643576d2a80"
+ }
+ Frame {
+ msec: 4384
+ hash: "69f71c22dff981a4da8ec1edcf90e79f"
+ }
+ Frame {
+ msec: 4400
+ hash: "680460f5e4d9e649931601041af046b2"
+ }
+ Frame {
+ msec: 4416
+ hash: "3028763fd15de2607b20b1331b904a4a"
+ }
+ Frame {
+ msec: 4432
+ hash: "333eb60e217fe1ea7469eab52ac461f1"
+ }
+ Frame {
+ msec: 4448
+ hash: "ccbcd6f45cb529c2db71504c0f69d73e"
+ }
+ Frame {
+ msec: 4464
+ hash: "3445df9b41a0a3e74738cbf328ab7d5c"
+ }
+ Frame {
+ msec: 4480
+ hash: "bd2c072558479e9de7a97207e58cc57f"
+ }
+ Frame {
+ msec: 4496
+ hash: "3d34b0b24a30eda93377dcb4585afed8"
+ }
+ Frame {
+ msec: 4512
+ hash: "d3045703863b0c5a327b9355c23d69f2"
+ }
+ Frame {
+ msec: 4528
+ hash: "2f2eb55f693415b840a317211b250e9f"
+ }
+ Frame {
+ msec: 4544
+ hash: "791b9ca7d47a3343474c30a35e336d4b"
+ }
+ Frame {
+ msec: 4560
+ hash: "73a0c02ebad6d3d5f939d9a00dd898bf"
+ }
+ Frame {
+ msec: 4576
+ hash: "d5c11135d586711b12f236430a2c2795"
+ }
+ Frame {
+ msec: 4592
+ hash: "34f9ea214fe714ff4e994f715ea6ea39"
+ }
+ Frame {
+ msec: 4608
+ hash: "8e49afa00983b156b818533923fb6edd"
+ }
+ Frame {
+ msec: 4624
+ hash: "e7e7bef17cee92eca9191fd734d7a577"
+ }
+ Frame {
+ msec: 4640
+ hash: "e407f6ed7cb3c130365ab5515d6308c0"
+ }
+ Frame {
+ msec: 4656
+ hash: "5bb06b4e74532ba5bc8c7bc38bf77d7f"
+ }
+ Frame {
+ msec: 4672
+ hash: "0ad7411316031e22034c14e81ca3a806"
+ }
+ Frame {
+ msec: 4688
+ hash: "dd81d7a9b48c922b4c42cba1b5f2b9d7"
+ }
+ Frame {
+ msec: 4704
+ hash: "32bef6f5005ad94e29ff59165958fbdc"
+ }
+ Frame {
+ msec: 4720
+ hash: "87758dd311f91193bf1e3536c2f58525"
+ }
+ Frame {
+ msec: 4736
+ hash: "015be92a4ff4e735fcc3cbc7a8b9d763"
+ }
+ Frame {
+ msec: 4752
+ hash: "d4c34ed49317c6692d71681fcd9842b6"
+ }
+ Frame {
+ msec: 4768
+ hash: "abaa235bb946a8abaddd52981d632c2d"
+ }
+ Frame {
+ msec: 4784
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4800
+ image: "itemlist.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4832
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4848
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4864
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4880
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4896
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4912
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4928
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4944
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4960
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4976
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 4992
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5008
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5024
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5040
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5056
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5072
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5088
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5104
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5120
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5136
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5152
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5168
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5184
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5200
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5216
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Frame {
+ msec: 5232
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 17; y: 120
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5248
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 19; y: 120
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 21; y: 120
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5264
+ hash: "99f9988040a389576cb6420b5391f768"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 24; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 28; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5280
+ hash: "95b380c9ab6f8db7b822faf023d94546"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 35; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 44; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5296
+ hash: "bb79e53556698c62ec30c75be9f6b7d7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 70; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 96; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 96; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5312
+ hash: "285cc2f0df1f59f25a0135560ab6edf2"
+ }
+ Frame {
+ msec: 5328
+ hash: "93a731dc6f71b6ff5400bf74c87e6c46"
+ }
+ Frame {
+ msec: 5344
+ hash: "eb555741ab128a50de5a18a454f2e639"
+ }
+ Frame {
+ msec: 5360
+ hash: "5dbe6cf898c1e37fcaacecfcf57b2194"
+ }
+ Frame {
+ msec: 5376
+ hash: "e7795610115593e78bb32f7bcc0ae2eb"
+ }
+ Frame {
+ msec: 5392
+ hash: "20e76f0eb4ec5f691999faf8ad313370"
+ }
+ Frame {
+ msec: 5408
+ hash: "d6a544c622e504c1b931e1a8a1310a6e"
+ }
+ Frame {
+ msec: 5424
+ hash: "e7a3a21feed244c5b1c710a9254c15f0"
+ }
+ Frame {
+ msec: 5440
+ hash: "5a4b1aca24f121d1373646e9d80b86fd"
+ }
+ Frame {
+ msec: 5456
+ hash: "331d2ec7021655c86aa64e47718a1088"
+ }
+ Frame {
+ msec: 5472
+ hash: "92096bc872e7395aa5b75c44646a0b60"
+ }
+ Frame {
+ msec: 5488
+ hash: "0d9aa6cee4d21488cbb5153f8f3ed593"
+ }
+ Frame {
+ msec: 5504
+ hash: "c1b943d43701605563fffffcb75f9fa7"
+ }
+ Frame {
+ msec: 5520
+ hash: "1b680025d5ad1ddd8f8d5f570ba73e71"
+ }
+ Frame {
+ msec: 5536
+ hash: "5539a3b9f60ea747c10ed8328b467cbf"
+ }
+ Frame {
+ msec: 5552
+ hash: "0a1317bcb606cd3488c5b14ee5d96585"
+ }
+ Frame {
+ msec: 5568
+ hash: "8844af68b11db7d92c69804c7371a746"
+ }
+ Frame {
+ msec: 5584
+ hash: "28d7fd127739c6e3b8488651b725c802"
+ }
+ Frame {
+ msec: 5600
+ hash: "0cf1a7d958a96aa2768995dddc5ccc09"
+ }
+ Frame {
+ msec: 5616
+ hash: "64b902fe7ab4d89ef0c7b760974e3488"
+ }
+ Frame {
+ msec: 5632
+ hash: "aba11c597eba550fc1eaddbf554057f6"
+ }
+ Frame {
+ msec: 5648
+ hash: "1bacaa3bb9dc3cac9ffc7491cb4dc1a5"
+ }
+ Frame {
+ msec: 5664
+ hash: "0ba8b582234d9f0c198c0c9e18e1cb02"
+ }
+ Frame {
+ msec: 5680
+ hash: "f66eaf2b5c3529987c0d9d005351ed73"
+ }
+ Frame {
+ msec: 5696
+ hash: "75b0bb720fa4c77da3783b3ff31c2fae"
+ }
+ Frame {
+ msec: 5712
+ hash: "345b235bb7f13409378e5c0c370f2a41"
+ }
+ Frame {
+ msec: 5728
+ hash: "83b7e902dce4e0fdc4ef5d629188c23c"
+ }
+ Frame {
+ msec: 5744
+ hash: "04b9041c6f10969889d92e94785c7e88"
+ }
+ Frame {
+ msec: 5760
+ image: "itemlist.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "4f3a902addc34ecdaf390e2427cc52e7"
+ }
+ Frame {
+ msec: 5792
+ hash: "68d443f16c16821ffc9ca68b17c76034"
+ }
+ Frame {
+ msec: 5808
+ hash: "9d25adc77befa761ee376a9b43595b5e"
+ }
+ Frame {
+ msec: 5824
+ hash: "a68b1bc6c2963ee92c3a45f500667b3b"
+ }
+ Frame {
+ msec: 5840
+ hash: "d5268cd58c222451d48038e715e83802"
+ }
+ Frame {
+ msec: 5856
+ hash: "f37d461541a8ec7a4161b18748de6aea"
+ }
+ Frame {
+ msec: 5872
+ hash: "805319ac7ca842feb3649e92f8b5b72f"
+ }
+ Frame {
+ msec: 5888
+ hash: "73124472a05080891d4948d8ca273f8c"
+ }
+ Frame {
+ msec: 5904
+ hash: "b6e433a23282a50db2e165a2447ba3f6"
+ }
+ Frame {
+ msec: 5920
+ hash: "fd8d3f5688b1806998c6087e18c6c730"
+ }
+ Frame {
+ msec: 5936
+ hash: "f132dd459950ef2d18aa93ca950d0692"
+ }
+ Frame {
+ msec: 5952
+ hash: "ade5beb259b5277c333ca806fc9bdbec"
+ }
+ Frame {
+ msec: 5968
+ hash: "ade5beb259b5277c333ca806fc9bdbec"
+ }
+ Frame {
+ msec: 5984
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6000
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6016
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6032
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6048
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6064
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6080
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6096
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6112
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6128
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6144
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6160
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6176
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6192
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6208
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6224
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6240
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6256
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6272
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6288
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6304
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6320
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6336
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6352
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6368
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6384
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6400
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6416
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6432
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6448
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6464
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6480
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6496
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6512
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6528
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6544
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6560
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6576
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6592
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6608
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6624
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6640
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6656
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6672
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6688
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6704
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6720
+ image: "itemlist.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6752
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6768
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6784
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6800
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6816
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6832
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6848
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6864
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6880
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6896
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6912
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6928
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6944
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6960
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6976
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 6992
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7008
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7024
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7040
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7056
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7072
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7088
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7104
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7120
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7136
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7152
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7168
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7184
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7200
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7216
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7232
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7248
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7264
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7280
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7296
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+ Frame {
+ msec: 7312
+ hash: "bf47cc398a702dd17c8efebb3d2f8073"
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/data/listview.0.png b/tests/auto/declarative/visual/ListView/data/listview.0.png
new file mode 100644
index 0000000000..581e8243df
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.1.png b/tests/auto/declarative/visual/ListView/data/listview.1.png
new file mode 100644
index 0000000000..581e8243df
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.10.png b/tests/auto/declarative/visual/ListView/data/listview.10.png
new file mode 100644
index 0000000000..dcfca3f794
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.10.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.11.png b/tests/auto/declarative/visual/ListView/data/listview.11.png
new file mode 100644
index 0000000000..7cc40470bb
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.11.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.12.png b/tests/auto/declarative/visual/ListView/data/listview.12.png
new file mode 100644
index 0000000000..a97f4ad519
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.12.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.13.png b/tests/auto/declarative/visual/ListView/data/listview.13.png
new file mode 100644
index 0000000000..7a8c6bd52c
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.13.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.14.png b/tests/auto/declarative/visual/ListView/data/listview.14.png
new file mode 100644
index 0000000000..ae47356225
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.14.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.15.png b/tests/auto/declarative/visual/ListView/data/listview.15.png
new file mode 100644
index 0000000000..b3a72609a2
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.15.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.16.png b/tests/auto/declarative/visual/ListView/data/listview.16.png
new file mode 100644
index 0000000000..581e8243df
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.16.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.17.png b/tests/auto/declarative/visual/ListView/data/listview.17.png
new file mode 100644
index 0000000000..581e8243df
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.17.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.18.png b/tests/auto/declarative/visual/ListView/data/listview.18.png
new file mode 100644
index 0000000000..581e8243df
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.18.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.19.png b/tests/auto/declarative/visual/ListView/data/listview.19.png
new file mode 100644
index 0000000000..581e8243df
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.19.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.2.png b/tests/auto/declarative/visual/ListView/data/listview.2.png
new file mode 100644
index 0000000000..579c68c49a
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.3.png b/tests/auto/declarative/visual/ListView/data/listview.3.png
new file mode 100644
index 0000000000..b3a72609a2
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.4.png b/tests/auto/declarative/visual/ListView/data/listview.4.png
new file mode 100644
index 0000000000..19758b0e38
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.5.png b/tests/auto/declarative/visual/ListView/data/listview.5.png
new file mode 100644
index 0000000000..581e8243df
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.6.png b/tests/auto/declarative/visual/ListView/data/listview.6.png
new file mode 100644
index 0000000000..82cac48c87
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.7.png b/tests/auto/declarative/visual/ListView/data/listview.7.png
new file mode 100644
index 0000000000..9277a823df
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.8.png b/tests/auto/declarative/visual/ListView/data/listview.8.png
new file mode 100644
index 0000000000..8c36da732c
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.8.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.9.png b/tests/auto/declarative/visual/ListView/data/listview.9.png
new file mode 100644
index 0000000000..581e8243df
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.9.png
Binary files differ
diff --git a/tests/auto/declarative/visual/ListView/data/listview.qml b/tests/auto/declarative/visual/ListView/data/listview.qml
new file mode 100644
index 0000000000..cd5d7b4756
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/data/listview.qml
@@ -0,0 +1,3079 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 32
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 48
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 64
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 80
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 96
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 112
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 128
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 144
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 160
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 176
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 192
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 208
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 224
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 240
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 256
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 272
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 288
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 304
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 320
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 336
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 352
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 368
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 384
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 400
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 416
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 432
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 448
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 464
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 480
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 496
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 512
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 528
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 544
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 560
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 576
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 592
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 608
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 624
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 640
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 656
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 672
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 688
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 704
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 720
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 736
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 752
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 768
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 784
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 800
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 816
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 832
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 848
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 864
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 880
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 896
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 912
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 928
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 944
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 960
+ image: "listview.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 992
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1008
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1024
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1040
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1056
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1072
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1088
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1104
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1120
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1136
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1152
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1168
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1184
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1200
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1216
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1232
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1248
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1264
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1280
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1296
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1312
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1328
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1344
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1360
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1376
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1392
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1408
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1424
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1440
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1456
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1472
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1488
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1504
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1520
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1536
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1552
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1568
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1584
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1600
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1616
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1632
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1648
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1664
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1680
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1696
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1712
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1728
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1744
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1760
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1776
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1792
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1808
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1824
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1840
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1856
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1872
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1888
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1904
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1920
+ image: "listview.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1952
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1968
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 1984
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2000
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2016
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2032
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2048
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2064
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2080
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2096
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2112
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2128
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2144
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2160
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2176
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2192
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2208
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2224
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2240
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2256
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2272
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2288
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2304
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2320
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2336
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2352
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2368
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2384
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2400
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2416
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2432
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2448
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2464
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2480
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2496
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2512
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2528
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2544
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2560
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2576
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2592
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 553; y: 267
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2608
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 2624
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 554; y: 267
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 555; y: 266
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2640
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 556; y: 265
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 558; y: 260
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2656
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 560; y: 256
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2672
+ hash: "c315e184c4dcb11d7e9fd4509a8b6a1f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 562; y: 250
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 566; y: 234
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2688
+ hash: "aeef1cacca9518408519b670443e396f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 568; y: 216
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2704
+ hash: "621626927f83bf7b36b78f5ca7ed4ed0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 572; y: 192
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 572; y: 192
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2720
+ hash: "b2aca965b745e98365195c52b9dd9a2c"
+ }
+ Frame {
+ msec: 2736
+ hash: "b80cc493e604c42aca2367e26bc9e844"
+ }
+ Frame {
+ msec: 2752
+ hash: "39165ad87fc687e0f165f8a2675173b5"
+ }
+ Frame {
+ msec: 2768
+ hash: "edd1da7c34c3eb7f1f16b782dfa41a13"
+ }
+ Frame {
+ msec: 2784
+ hash: "d31a7915cdb2a7f392e6edc3047a6606"
+ }
+ Frame {
+ msec: 2800
+ hash: "3038dbb3fe3c255adcbecfc106bacb99"
+ }
+ Frame {
+ msec: 2816
+ hash: "454137c508d76f2c38b8007247420b81"
+ }
+ Frame {
+ msec: 2832
+ hash: "16eb385d3ce3b186745974500f855a97"
+ }
+ Frame {
+ msec: 2848
+ hash: "8871fded1fbbdcb0fdfdaa2e6eecc3d1"
+ }
+ Frame {
+ msec: 2864
+ hash: "f49955dab8341e7ca472c3f547cbeaab"
+ }
+ Frame {
+ msec: 2880
+ image: "listview.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "c0ef41c682fa9802c9eb74fd249cfd40"
+ }
+ Frame {
+ msec: 2912
+ hash: "6174fea6ef04fbcefd32d6a0b35a3514"
+ }
+ Frame {
+ msec: 2928
+ hash: "7b2288a8be7b3c465e725aeb5788e91f"
+ }
+ Frame {
+ msec: 2944
+ hash: "b39d8cb650ee00c245b556235843490b"
+ }
+ Frame {
+ msec: 2960
+ hash: "9478ea0bf640924931d627cd8b607eba"
+ }
+ Frame {
+ msec: 2976
+ hash: "39743788f56c6f5c29fa9549e586d1ae"
+ }
+ Frame {
+ msec: 2992
+ hash: "ec8ab3547e10d18e9493b8fae5125591"
+ }
+ Frame {
+ msec: 3008
+ hash: "169b115d03db8c901db4f4c2909a18d3"
+ }
+ Frame {
+ msec: 3024
+ hash: "bf438b17a1e8df6d6bb05474cacd12a7"
+ }
+ Frame {
+ msec: 3040
+ hash: "2aad06334128659e143c4c6c8415a30b"
+ }
+ Frame {
+ msec: 3056
+ hash: "ea0e8d7387b9b54a47bb99c058093462"
+ }
+ Frame {
+ msec: 3072
+ hash: "e483e585399a47490599ca265cf73000"
+ }
+ Frame {
+ msec: 3088
+ hash: "43bed4aac1a2a9b66eafefc117424500"
+ }
+ Frame {
+ msec: 3104
+ hash: "ba5c36add368938f8134a0a88e599c00"
+ }
+ Frame {
+ msec: 3120
+ hash: "c905be5276a871bd1ac392580231c9e4"
+ }
+ Frame {
+ msec: 3136
+ hash: "0c96d9b0119513c1f327f9e6651e89cd"
+ }
+ Frame {
+ msec: 3152
+ hash: "c4ba0836dbb900600f8f4aed42eb1ea1"
+ }
+ Frame {
+ msec: 3168
+ hash: "253d014f89a616032664f29f268cfd85"
+ }
+ Frame {
+ msec: 3184
+ hash: "a5185192d7db7c4a4c8bec6cb5a2a73a"
+ }
+ Frame {
+ msec: 3200
+ hash: "d453cc5b89d3fa00586cc41d5a9a8092"
+ }
+ Frame {
+ msec: 3216
+ hash: "b3c39c0c06643612681b098101458d32"
+ }
+ Frame {
+ msec: 3232
+ hash: "09beec410a0ca7c47fe08991341aea0c"
+ }
+ Frame {
+ msec: 3248
+ hash: "c13c269b384029d04a05fd0170e5909e"
+ }
+ Frame {
+ msec: 3264
+ hash: "cafe360c512ab92804dc1fddae9b8fb6"
+ }
+ Frame {
+ msec: 3280
+ hash: "26dfe538a7edc8f43af1d78e678f3dfa"
+ }
+ Frame {
+ msec: 3296
+ hash: "11e03f6901a4bdbc1eabe72b1ddbee4b"
+ }
+ Frame {
+ msec: 3312
+ hash: "0ea8886b1256649665a1597f62cc633b"
+ }
+ Frame {
+ msec: 3328
+ hash: "013c34be077fb689333df9b04a931b3a"
+ }
+ Frame {
+ msec: 3344
+ hash: "d0e9f1d147e0767c12a89f33b5f2b5b3"
+ }
+ Frame {
+ msec: 3360
+ hash: "9888bf29cd868bad6b2593842413b283"
+ }
+ Frame {
+ msec: 3376
+ hash: "d8ec307a85cecaacaa908ceb34d5db5b"
+ }
+ Frame {
+ msec: 3392
+ hash: "4afe1df3e802b41d1b89b5fab4e35190"
+ }
+ Frame {
+ msec: 3408
+ hash: "e8f484ed8d2a6745ee87ac9544281d55"
+ }
+ Frame {
+ msec: 3424
+ hash: "48eaa0644a27cb3e53c75bd0ce08bf47"
+ }
+ Frame {
+ msec: 3440
+ hash: "f1523d82dfc5c136fbe8746449bb5013"
+ }
+ Frame {
+ msec: 3456
+ hash: "d664786f1a79f851e72aa48ee6736374"
+ }
+ Frame {
+ msec: 3472
+ hash: "e43bb6d0374c8bab67b5fafcaeb2a205"
+ }
+ Frame {
+ msec: 3488
+ hash: "77ef61827c993b16691a023e99cc7f7e"
+ }
+ Frame {
+ msec: 3504
+ hash: "6198e0d242db79e81fb81f621c78a3c9"
+ }
+ Frame {
+ msec: 3520
+ hash: "a66b4773ef05ca78aa12e2c8a151c53a"
+ }
+ Frame {
+ msec: 3536
+ hash: "52fa0b693c3de208e5943521eef5587c"
+ }
+ Frame {
+ msec: 3552
+ hash: "0e237f706f9c2c4c616271f9b9d014e5"
+ }
+ Frame {
+ msec: 3568
+ hash: "14edd1dc2371a9aadaa3c079d325fab6"
+ }
+ Frame {
+ msec: 3584
+ hash: "1fe873b07ee24edaea224939e10830f1"
+ }
+ Frame {
+ msec: 3600
+ hash: "30804b5eb2a6d99116475cbdc1a9c043"
+ }
+ Frame {
+ msec: 3616
+ hash: "c892c17ec947a910b74f5b8704405e9f"
+ }
+ Frame {
+ msec: 3632
+ hash: "696029b77512943001c9eba64191e633"
+ }
+ Frame {
+ msec: 3648
+ hash: "4c26bb0ca28d74a2bb79d0bfc8127361"
+ }
+ Frame {
+ msec: 3664
+ hash: "2d1539db88647d73b9c53cde7c424dd7"
+ }
+ Frame {
+ msec: 3680
+ hash: "fd20e4259b44357c93f22f35c698fe1b"
+ }
+ Frame {
+ msec: 3696
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3712
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3728
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3744
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3760
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3776
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3792
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3808
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3824
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3840
+ image: "listview.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3872
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3888
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3904
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3920
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3936
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3952
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3968
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 3984
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4000
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4016
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4032
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4048
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4064
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4080
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4096
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4112
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4128
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Frame {
+ msec: 4144
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 521; y: 24
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4160
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4176
+ hash: "5d49efe1383065f0b88f1bfdbbe5e165"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4192
+ hash: "a5df688148c264de1d376c9b87ddfa6b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 46
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4208
+ hash: "a4e2c1878b0afce0ee1eebd63e9c951a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 66
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 88
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4224
+ hash: "2f9a79278d492790ef86a09c77e95ff4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 531; y: 136
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 531; y: 136
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4240
+ hash: "5b5ce7206b26528157c426f4e1e3e0a8"
+ }
+ Frame {
+ msec: 4256
+ hash: "65a1e5f81ab89b163aed46b984cca45e"
+ }
+ Frame {
+ msec: 4272
+ hash: "e28253ad5a2415251b68bcda1d7d4bd0"
+ }
+ Frame {
+ msec: 4288
+ hash: "71aae5abb4a9e9077053ea21dd3ec315"
+ }
+ Frame {
+ msec: 4304
+ hash: "33fcea38fc3b328b3294f9ac2a26aa1a"
+ }
+ Frame {
+ msec: 4320
+ hash: "6299eb1d87f371966307668b92de6a0b"
+ }
+ Frame {
+ msec: 4336
+ hash: "4f66d8c7cb6971d0fc24089d123c547b"
+ }
+ Frame {
+ msec: 4352
+ hash: "d9906d61b31fabf968290ebcd6688f34"
+ }
+ Frame {
+ msec: 4368
+ hash: "5a1945993ff8096ba6b933d45586044a"
+ }
+ Frame {
+ msec: 4384
+ hash: "331535e54da9bbdbc2fbf2b244ad0199"
+ }
+ Frame {
+ msec: 4400
+ hash: "4dc39de0c54f6e0b77f94f6ae6c345ec"
+ }
+ Frame {
+ msec: 4416
+ hash: "ec309a298ce246c13eb666488eb75016"
+ }
+ Frame {
+ msec: 4432
+ hash: "a133819f8adc6265eb0e438261c869e3"
+ }
+ Frame {
+ msec: 4448
+ hash: "da4d64fd6b3ae7d49ee5c5c8d0117a37"
+ }
+ Frame {
+ msec: 4464
+ hash: "620dd1c3fc41ce657eac9d1a5b765fd4"
+ }
+ Frame {
+ msec: 4480
+ hash: "ff1c370bd1bf75a98ae7125e7dd5a9db"
+ }
+ Frame {
+ msec: 4496
+ hash: "59c6e4297109b5cc7c197749867dddae"
+ }
+ Frame {
+ msec: 4512
+ hash: "91b1719e86529d0c35a53a2d0a095dd6"
+ }
+ Frame {
+ msec: 4528
+ hash: "2994663d35c9eb453a27c1a1fa9aeeb8"
+ }
+ Frame {
+ msec: 4544
+ hash: "ae4ec37b9f6a00b3c9139e5cfe13d32e"
+ }
+ Frame {
+ msec: 4560
+ hash: "a98340236d1b65f47e88684168c1429d"
+ }
+ Frame {
+ msec: 4576
+ hash: "34848b483ea6a2bd412e29d26beb3ab0"
+ }
+ Frame {
+ msec: 4592
+ hash: "dd9bae0e2fca84b265d8cb59686ff88d"
+ }
+ Frame {
+ msec: 4608
+ hash: "18b6ef6f5913b0612b76e7b2e25073dd"
+ }
+ Frame {
+ msec: 4624
+ hash: "9398aab9478279aed1bc40c9378f8da4"
+ }
+ Frame {
+ msec: 4640
+ hash: "a297a304c12102f23bd1e0f0207e0df9"
+ }
+ Frame {
+ msec: 4656
+ hash: "091db9138cd6ae801ad857105a83c8f9"
+ }
+ Frame {
+ msec: 4672
+ hash: "253938ca4a4f13433ddd502eb94cb7cd"
+ }
+ Frame {
+ msec: 4688
+ hash: "6002df1793d290e4e31ee0c91c37bbe6"
+ }
+ Frame {
+ msec: 4704
+ hash: "212476fa1c3a52fb8eba03ec3aecdcd8"
+ }
+ Frame {
+ msec: 4720
+ hash: "80d4d8434d4e96a2bc23f5ed060d6ddc"
+ }
+ Frame {
+ msec: 4736
+ hash: "2d4add725f31a04558635ce4b73a758a"
+ }
+ Frame {
+ msec: 4752
+ hash: "57c06022ec1e502c4f49f43063c433e7"
+ }
+ Frame {
+ msec: 4768
+ hash: "8393e97990993f9d5f68ea65f8e4a2db"
+ }
+ Frame {
+ msec: 4784
+ hash: "9a1fcd96dffaf5c79ecc7f9427e02499"
+ }
+ Frame {
+ msec: 4800
+ image: "listview.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "5ae722cf541e3453e73bbee57dc379e9"
+ }
+ Frame {
+ msec: 4832
+ hash: "fc7326c2e2e56d9c3036e8dfc2ea77a8"
+ }
+ Frame {
+ msec: 4848
+ hash: "f22a2a68cea158f333b0457025d75490"
+ }
+ Frame {
+ msec: 4864
+ hash: "d684c8aa9b835779080f170cafead40f"
+ }
+ Frame {
+ msec: 4880
+ hash: "dd451e5e421f929d015981bc7aeb8c66"
+ }
+ Frame {
+ msec: 4896
+ hash: "d066f228295db7f46520495167d3e946"
+ }
+ Frame {
+ msec: 4912
+ hash: "ebf640a457e3498bade3220aafa70331"
+ }
+ Frame {
+ msec: 4928
+ hash: "190f5b1f3ce9d200790c34c50bcc62c5"
+ }
+ Frame {
+ msec: 4944
+ hash: "9d4ad865246eb008afa40740b5c9a208"
+ }
+ Frame {
+ msec: 4960
+ hash: "81c8b2c0b4f9e74f24d328a1d9b40a9f"
+ }
+ Frame {
+ msec: 4976
+ hash: "24acc300307e71bee79bce8de76f56cb"
+ }
+ Frame {
+ msec: 4992
+ hash: "1f9d31f94cfce6f868bfcc8a104d2465"
+ }
+ Frame {
+ msec: 5008
+ hash: "7a3cab008dcb7a893ae30797b33df6f2"
+ }
+ Frame {
+ msec: 5024
+ hash: "38d561a2950434e59513439c7f1120ea"
+ }
+ Frame {
+ msec: 5040
+ hash: "8d34131faa15bc126bd4d9ef3be39ef5"
+ }
+ Frame {
+ msec: 5056
+ hash: "85d57ef15791b56deb537795dd87911e"
+ }
+ Frame {
+ msec: 5072
+ hash: "71e932169915a6c8c2cef0b22febf316"
+ }
+ Frame {
+ msec: 5088
+ hash: "8b3452981963aeebadc9ac2013150263"
+ }
+ Frame {
+ msec: 5104
+ hash: "a3fb8abecfeb48ba1cd1fd8f40896fa0"
+ }
+ Frame {
+ msec: 5120
+ hash: "f53ab533f6a58ae45139f3da4bf8ab4e"
+ }
+ Frame {
+ msec: 5136
+ hash: "9ec7012404f3c1c7795810dcee5acc3b"
+ }
+ Frame {
+ msec: 5152
+ hash: "99ca43bab532dd5d7566e596c65053ce"
+ }
+ Frame {
+ msec: 5168
+ hash: "0af83ad2416821cc230cd2856d1a3e39"
+ }
+ Frame {
+ msec: 5184
+ hash: "86fa23ddf2005bbf35238ae04ae554ac"
+ }
+ Frame {
+ msec: 5200
+ hash: "bb52a748f1d85dde410cfa4f24e3ed20"
+ }
+ Frame {
+ msec: 5216
+ hash: "898b96bc5ee9a3ac61764e5cd9af8cfb"
+ }
+ Frame {
+ msec: 5232
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5248
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5264
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5280
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5296
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5312
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5328
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5344
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5360
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5376
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5392
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5408
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5424
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5440
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5456
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5472
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5488
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5504
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5520
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5536
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5552
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5568
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5584
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5600
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5616
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5632
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5648
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5664
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5680
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5696
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5712
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5728
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5744
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5760
+ image: "listview.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5792
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5808
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5824
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5840
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5856
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5872
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5888
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5904
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5920
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5936
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5952
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Frame {
+ msec: 5968
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 111; y: 230
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 111; y: 227
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5984
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 111; y: 223
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6000
+ hash: "3b88645092be28037fca4a6034f5b2f7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 111; y: 216
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 111; y: 210
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6016
+ hash: "0076b55d3da4ca365688b6a2c984103f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 112; y: 205
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6032
+ hash: "db846ad8e3200ca1fce36a38dc7beab8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 112; y: 192
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6048
+ hash: "3cb6b25725b4285f9c096d595224c5ca"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 111; y: 180
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6064
+ hash: "1832e12fdf3b464b02b296e727b33694"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 110; y: 173
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6080
+ hash: "6d18d2b5f65cbba4915d0725d24b40f3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 109; y: 158
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 107; y: 140
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6096
+ hash: "79bc7afc6b1aa5f8904b3e6d5d4a9389"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 103; y: 124
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6112
+ hash: "4436f2d15304c839aacec486c1fd6d96"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 101; y: 111
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6128
+ hash: "c3bffc7c95893cf9bbd8596208b7f657"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 101; y: 105
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 101; y: 100
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6144
+ hash: "04231c2fdc02729aa34ed4e403dd373b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 101; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6160
+ hash: "392d75c4b372825e78366eb63a618170"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 101; y: 87
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 102; y: 83
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6176
+ hash: "7f91f7bdb0cb62d600ac4aa573681fe3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 102; y: 79
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6192
+ hash: "69207181a382650c5e33145555f0d9ba"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 103; y: 76
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 103; y: 72
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6208
+ hash: "65a184b5c49b02e08114e437483f928d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 104; y: 68
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 105; y: 64
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6224
+ hash: "c22da9ce54d04f51fb55da755753a509"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 105; y: 61
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6240
+ hash: "59dbd5216847a62f60a1d0701a15bb62"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 106; y: 57
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 106; y: 53
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6256
+ hash: "bbfc902db6e6ca253afb1c90306b2a63"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 106; y: 47
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 106; y: 47
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6272
+ hash: "5c41f194afec5f7e3db9d98673d03d5c"
+ }
+ Frame {
+ msec: 6288
+ hash: "5c41f194afec5f7e3db9d98673d03d5c"
+ }
+ Frame {
+ msec: 6304
+ hash: "deb06d0f915d5f6ec39b1820d57b6af6"
+ }
+ Frame {
+ msec: 6320
+ hash: "deb06d0f915d5f6ec39b1820d57b6af6"
+ }
+ Frame {
+ msec: 6336
+ hash: "2a1a1f9239a6ccb308e51796f9b0bb89"
+ }
+ Frame {
+ msec: 6352
+ hash: "3c1b44201616b8271023bf05a3f3f0f7"
+ }
+ Frame {
+ msec: 6368
+ hash: "87afcef49db8b2b547e85e834f8ec304"
+ }
+ Frame {
+ msec: 6384
+ hash: "290081b4b1272ef09ec9964c128e61b5"
+ }
+ Frame {
+ msec: 6400
+ hash: "19bb3b23ee4b14a5f0a313106ef7c8c1"
+ }
+ Frame {
+ msec: 6416
+ hash: "65a184b5c49b02e08114e437483f928d"
+ }
+ Frame {
+ msec: 6432
+ hash: "832d2aefbcaf776f35039be527d367c5"
+ }
+ Frame {
+ msec: 6448
+ hash: "69207181a382650c5e33145555f0d9ba"
+ }
+ Frame {
+ msec: 6464
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6480
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6496
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6512
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6528
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6544
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6560
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6576
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6592
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6608
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6624
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6640
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6656
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6672
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6688
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6704
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6720
+ image: "listview.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6752
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6768
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6784
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6800
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6816
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6832
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6848
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6864
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6880
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6896
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6912
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6928
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6944
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6960
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6976
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 6992
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7008
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7024
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7040
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7056
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7072
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7088
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7104
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7120
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7136
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7152
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7168
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7184
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7200
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7216
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7232
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7248
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7264
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7280
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Frame {
+ msec: 7296
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 519; y: 276
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7312
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 519; y: 275
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7328
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 519; y: 274
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7344
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 518; y: 273
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 518; y: 272
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7360
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 518; y: 271
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7376
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 518; y: 268
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7392
+ hash: "89fe95733476bd000457e36ee4ecfc73"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 518; y: 266
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 518; y: 265
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7408
+ hash: "9047f597b9e59ca652c172338bed6ef9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: 262
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7424
+ hash: "87476f78daecd6bb49e8d6e673d28100"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: 260
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7440
+ hash: "6bfd895c6b7d97e4102eb26608cdfeca"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: 254
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7456
+ hash: "e4c2b75beaee54a5781a5acbeb37ea64"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: 249
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7472
+ hash: "d5e816768e9c3db0631416bd86b1b461"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: 243
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7488
+ hash: "22cb512b302afc6c3c9dec1d47b3bf03"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: 237
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7504
+ hash: "a7e458e007954bd908cf27a1841d36ea"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: 231
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7520
+ hash: "0f9fa53b247f72e9a8ff6201b188b410"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: 225
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7536
+ hash: "c986ea3853dd33f7f2b5629f67429423"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: 219
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7552
+ hash: "114ffaa5cf38e4884a1d477884541b44"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 518; y: 215
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7568
+ hash: "7cdf1bb327484618909ded5411aca4ec"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 519; y: 208
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7584
+ hash: "d4c005194ed510f5d54a811176943dc2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 520; y: 202
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7600
+ hash: "3103351bc83675c877fb6dcd1a6ddbbc"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 196
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7616
+ hash: "2c13ddda8d89501c9487b83f8b115570"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 189
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7632
+ hash: "476834b6d88077f9983ed358c06bd0c3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 185
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7648
+ hash: "cc2148c6a7ba0bbe6ceea848b7e48621"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 177
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7664
+ hash: "5b8824848dd1de3632b26e04e95b5899"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 169
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7680
+ image: "listview.7.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 160
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7696
+ hash: "d0a4a8b631e3494043f261fb8da67938"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 156
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7712
+ hash: "985111215c3959a45b293879af701318"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 147
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7728
+ hash: "ed5917a3fe95777f2efdaa154af0c489"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 144
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7744
+ hash: "6fa9de2983f0e30cb96c035c28757b93"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 137
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7760
+ hash: "fd568c7d27618a71b0f0882ca57b685b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 130
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7776
+ hash: "f5b941f5741a9a78122605576809c395"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 124
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7792
+ hash: "ffc96a85d7dbbed257b69a0c735e21b8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 122
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7808
+ hash: "cfb6335c5449554e631d6e3106ea8a00"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7824
+ hash: "ff9786e85ee8af6177ac8e5cc1307462"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 111
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7840
+ hash: "3140b49dfee8e690b5c778044385e107"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 106
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7856
+ hash: "0d899af24685a9998a6b961023286fde"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 104
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7872
+ hash: "99ee1e8803c05e546a721b0c9ee39499"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7888
+ hash: "96e7da2f895500a786ed36cb295e9003"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7904
+ hash: "cd369fc5dc31814208e56cf7cd0decea"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7920
+ hash: "5fee72994b65a45b4900a3073f86a3e1"
+ }
+ Frame {
+ msec: 7936
+ hash: "9a2f8a65d842b8f92998e6411f7cd53c"
+ }
+ Frame {
+ msec: 7952
+ hash: "2848d69017ce71ae101ccdfa7c67f933"
+ }
+ Frame {
+ msec: 7968
+ hash: "6568aa88e81f988f65da435df7166167"
+ }
+ Frame {
+ msec: 7984
+ hash: "d5f15ee08a2d7667786757a378a7a7f4"
+ }
+ Frame {
+ msec: 8000
+ hash: "9b566bd02a561b32d1a4c1ec99c2e2c3"
+ }
+ Frame {
+ msec: 8016
+ hash: "580419e1c9e91046547d913f6b8790a4"
+ }
+ Frame {
+ msec: 8032
+ hash: "a5a3cd610ec0b35af1295ee6c41e09e3"
+ }
+ Frame {
+ msec: 8048
+ hash: "a5a3cd610ec0b35af1295ee6c41e09e3"
+ }
+ Frame {
+ msec: 8064
+ hash: "a5a3cd610ec0b35af1295ee6c41e09e3"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 521; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8080
+ hash: "a5a3cd610ec0b35af1295ee6c41e09e3"
+ }
+ Frame {
+ msec: 8096
+ hash: "a5a3cd610ec0b35af1295ee6c41e09e3"
+ }
+ Frame {
+ msec: 8112
+ hash: "83b91a371d682a501bc3a3fceabe4f8c"
+ }
+ Frame {
+ msec: 8128
+ hash: "798b1dbfa0cce362213f426e2c60ac0e"
+ }
+ Frame {
+ msec: 8144
+ hash: "d71b6a693c430a618c23413cb65bb320"
+ }
+ Frame {
+ msec: 8160
+ hash: "2baae394390da39447a67151bc503d65"
+ }
+ Frame {
+ msec: 8176
+ hash: "06688b05c61a7b862d39534207a8adab"
+ }
+ Frame {
+ msec: 8192
+ hash: "a1d3042e16709817906dcdc673ee52c7"
+ }
+ Frame {
+ msec: 8208
+ hash: "236dd41feac1b1a8a4bd7911bb184da2"
+ }
+ Frame {
+ msec: 8224
+ hash: "f3ec821bba1d32e90bdab0e85c07d7d8"
+ }
+ Frame {
+ msec: 8240
+ hash: "e328c35adf7ffc3d7e3af97e798ec8a5"
+ }
+ Frame {
+ msec: 8256
+ hash: "651101db68fd3ed1dc5f441c126dc31b"
+ }
+ Frame {
+ msec: 8272
+ hash: "651101db68fd3ed1dc5f441c126dc31b"
+ }
+ Frame {
+ msec: 8288
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8304
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8320
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8336
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8352
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8368
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8384
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8400
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8416
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8432
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8448
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8464
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8480
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8496
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8512
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8528
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8544
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8560
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8576
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8592
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8608
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8624
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8640
+ image: "listview.8.png"
+ }
+ Frame {
+ msec: 8656
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8672
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8688
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8704
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8720
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8736
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8752
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8768
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8784
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8800
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8816
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8832
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8848
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8864
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8880
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8896
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8912
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8928
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8944
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8960
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8976
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 8992
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9008
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9024
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9040
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9056
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9072
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9088
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9104
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9120
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9136
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9152
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9168
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9184
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9200
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9216
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9232
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9248
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9264
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9280
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9296
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9312
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9328
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9344
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9360
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9376
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9392
+ hash: "1171be123a361d72859c25434573482c"
+ }
+ Frame {
+ msec: 9408
+ hash: "1171be123a361d72859c25434573482c"
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/itemlist.qml b/tests/auto/declarative/visual/ListView/itemlist.qml
new file mode 100644
index 0000000000..8cbbdb0155
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/itemlist.qml
@@ -0,0 +1,40 @@
+// This example demonstrates placing items in a view using
+// a VisualItemModel
+
+import Qt 4.6
+
+Rectangle {
+ color: "lightgray"
+ width: 240
+ height: 320
+
+ VisualItemModel {
+ id: itemModel
+ objectName: "itemModel"
+ Rectangle {
+ objectName: "item1"
+ height: view.height; width: view.width; color: "#FFFEF0"
+ }
+ Rectangle {
+ objectName: "item2"
+ height: view.height; width: view.width; color: "#F0FFF7"
+ }
+ Rectangle {
+ objectName: "item3"
+ height: view.height; width: view.width; color: "#F4F0FF"
+ }
+ }
+
+ ListView {
+ id: view
+ objectName: "view"
+ anchors.fill: parent
+ anchors.bottomMargin: 30
+ model: itemModel
+ preferredHighlightBegin: 0
+ preferredHighlightEnd: 0
+ highlightRangeMode: "StrictlyEnforceRange"
+ orientation: ListView.Horizontal
+ flickDeceleration: 2000
+ }
+}
diff --git a/tests/auto/declarative/visual/ListView/listview.qml b/tests/auto/declarative/visual/ListView/listview.qml
new file mode 100644
index 0000000000..fb9eecdd21
--- /dev/null
+++ b/tests/auto/declarative/visual/ListView/listview.qml
@@ -0,0 +1,81 @@
+import Qt 4.6
+
+Rectangle {
+ width: 600; height: 300; color: "white"
+
+ ListModel {
+ id: myModel
+ ListElement {
+ itemColor: "red"
+ }
+ ListElement {
+ itemColor: "green"
+ }
+ ListElement {
+ itemColor: "blue"
+ }
+ ListElement {
+ itemColor: "orange"
+ }
+ ListElement {
+ itemColor: "brown"
+ }
+ ListElement {
+ itemColor: "yellow"
+ }
+ ListElement {
+ itemColor: "purple"
+ }
+ ListElement {
+ itemColor: "darkred"
+ }
+ ListElement {
+ itemColor: "darkblue"
+ }
+ }
+
+ Component {
+ id: myDelegate
+ Item {
+ width: 200; height: 50
+ Rectangle {
+ x: 5; y : 5
+ width: 190; height: 40
+ opacity: 0.5
+ color: itemColor
+ }
+ }
+ }
+
+ Component {
+ id: myHighlight
+ Rectangle { color: "black" }
+ }
+
+ ListView {
+ id: list1
+ width: 200; height: parent.height
+ model: myModel; delegate: myDelegate
+ highlight: myHighlight; currentIndex: list3.currentIndex
+ focus: true
+ }
+ ListView {
+ id: list2
+ x: 200; width: 200; height: parent.height
+ model: myModel; delegate: myDelegate; highlight: myHighlight
+ preferredHighlightBegin: 80
+ preferredHighlightEnd: 220
+ highlightRangeMode: "ApplyRange"
+ currentIndex: list1.currentIndex
+ }
+ ListView {
+ id: list3
+ x: 400; width: 200; height: parent.height
+ model: myModel; delegate: myDelegate; highlight: myHighlight
+ currentIndex: list1.currentIndex
+ preferredHighlightBegin: 125
+ preferredHighlightEnd: 125
+ highlightRangeMode: "StrictlyEnforceRange"
+ flickDeceleration: 1000
+ }
+}
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.0.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.0.png
new file mode 100644
index 0000000000..c59b816768
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.1.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.1.png
new file mode 100644
index 0000000000..d4dbc7049a
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.10.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.10.png
new file mode 100644
index 0000000000..ed9d3453cb
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.10.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.11.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.11.png
new file mode 100644
index 0000000000..ed9d3453cb
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.11.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.12.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.12.png
new file mode 100644
index 0000000000..45ee400008
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.12.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.13.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.13.png
new file mode 100644
index 0000000000..c73e1586b7
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.13.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.14.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.14.png
new file mode 100644
index 0000000000..e2fff6d6e3
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.14.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.15.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.15.png
new file mode 100644
index 0000000000..d7a13df741
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.15.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.16.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.16.png
new file mode 100644
index 0000000000..beb309450b
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.16.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.17.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.17.png
new file mode 100644
index 0000000000..beb309450b
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.17.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.18.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.18.png
new file mode 100644
index 0000000000..beb309450b
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.18.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.19.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.19.png
new file mode 100644
index 0000000000..d3a2650dfb
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.19.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.2.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.2.png
new file mode 100644
index 0000000000..a09dd286c3
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.20.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.20.png
new file mode 100644
index 0000000000..600462a976
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.20.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.21.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.21.png
new file mode 100644
index 0000000000..6defca0653
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.21.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.22.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.22.png
new file mode 100644
index 0000000000..91967e128f
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.22.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.3.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.3.png
new file mode 100644
index 0000000000..d099a79317
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.4.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.4.png
new file mode 100644
index 0000000000..385efc8454
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.5.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.5.png
new file mode 100644
index 0000000000..25a7c3c2ad
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.6.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.6.png
new file mode 100644
index 0000000000..25a7c3c2ad
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.7.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.7.png
new file mode 100644
index 0000000000..7a24f51fbd
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.8.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.8.png
new file mode 100644
index 0000000000..7a24f51fbd
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.8.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.9.png b/tests/auto/declarative/visual/Package_Views/data/packageviews.9.png
new file mode 100644
index 0000000000..45ee400008
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.9.png
Binary files differ
diff --git a/tests/auto/declarative/visual/Package_Views/data/packageviews.qml b/tests/auto/declarative/visual/Package_Views/data/packageviews.qml
new file mode 100644
index 0000000000..d062667ba3
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/data/packageviews.qml
@@ -0,0 +1,3751 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 32
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 48
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 64
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 80
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 96
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 112
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 128
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 144
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 160
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 176
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 192
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 208
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 224
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 240
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 256
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 272
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 288
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 304
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 320
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 336
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 352
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 368
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 384
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 400
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 416
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 432
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 448
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 464
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 480
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 496
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 512
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 528
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 544
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 560
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 576
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 592
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 608
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 624
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 640
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 656
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 672
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 688
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 704
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 720
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 736
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 752
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 768
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 784
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 800
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 816
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 832
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 848
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 864
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 880
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 896
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 912
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 928
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 944
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 960
+ image: "packageviews.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 992
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1008
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1024
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1040
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1056
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1072
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1088
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1104
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1120
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1136
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1152
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1168
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1184
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1200
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1216
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1232
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1248
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1264
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1280
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1296
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1312
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1328
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1344
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1360
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Frame {
+ msec: 1376
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 57; y: 164
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1392
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 57; y: 162
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1408
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 57; y: 159
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 57; y: 156
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1424
+ hash: "a327426c93b523526f993b5271ab4501"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 56; y: 152
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 56; y: 147
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1440
+ hash: "87b7cacfb2d9e8ad916e331b2cf1f13e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 55; y: 141
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 54; y: 133
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1456
+ hash: "34290c1435c1a96d08152479d2d1334e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 54; y: 126
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 54; y: 126
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1472
+ hash: "ef5fb09ec8fb4b0d97c864618d6f6231"
+ }
+ Frame {
+ msec: 1488
+ hash: "d5b4c2e1d4b0bc877c99739a67b4a4fb"
+ }
+ Frame {
+ msec: 1504
+ hash: "a3623a3f253590d51ee03b6849e88edb"
+ }
+ Frame {
+ msec: 1520
+ hash: "4c1115f1041629b7c37cf4ae001fd7d3"
+ }
+ Frame {
+ msec: 1536
+ hash: "845bb3d1f52bee4a469fb12d6875a323"
+ }
+ Frame {
+ msec: 1552
+ hash: "eb08b5a671149005dbafc8507bb78b18"
+ }
+ Frame {
+ msec: 1568
+ hash: "16744a5b90b29954faf0710010ac6369"
+ }
+ Frame {
+ msec: 1584
+ hash: "322bbe367fbbf0bf07f9153da652a5fc"
+ }
+ Frame {
+ msec: 1600
+ hash: "257769f7c3e24bb2d0cd674dfbe42913"
+ }
+ Frame {
+ msec: 1616
+ hash: "8e299cbcaeae4d53d0fc05e03d36e0d9"
+ }
+ Frame {
+ msec: 1632
+ hash: "f3fb7f30336045abb4557247aab5bde1"
+ }
+ Frame {
+ msec: 1648
+ hash: "468400fb4e9bfa454ea00f19aa5d77b5"
+ }
+ Frame {
+ msec: 1664
+ hash: "429cc820ada7a515b2cb71f133320949"
+ }
+ Frame {
+ msec: 1680
+ hash: "721ec7594d8f815e5648eb8d570d1179"
+ }
+ Frame {
+ msec: 1696
+ hash: "9bc4105a0456c36738c435323e690db1"
+ }
+ Frame {
+ msec: 1712
+ hash: "e54a84718dbdc45dd814089051772585"
+ }
+ Frame {
+ msec: 1728
+ hash: "2c969450ede6b6ea7e0e68ee54d02aaa"
+ }
+ Frame {
+ msec: 1744
+ hash: "c2015dd1d4bd223a7fe1df03027af2f3"
+ }
+ Frame {
+ msec: 1760
+ hash: "74108fedfb0967adea181893834bcd9b"
+ }
+ Frame {
+ msec: 1776
+ hash: "b04a22f1cfde6ede57117992cd97dc1c"
+ }
+ Frame {
+ msec: 1792
+ hash: "271d71cb03dd38100812466a973b79ef"
+ }
+ Frame {
+ msec: 1808
+ hash: "130709eecd8eca395085020a83e7553a"
+ }
+ Frame {
+ msec: 1824
+ hash: "a0e5e187ed5245fd766803d266195e6b"
+ }
+ Frame {
+ msec: 1840
+ hash: "d29c145f3ba39a7c2c6ac54b27f9cea1"
+ }
+ Frame {
+ msec: 1856
+ hash: "6e41349b4adb6e37a2f9f2482c0aa5b1"
+ }
+ Frame {
+ msec: 1872
+ hash: "c02c52d3c87c6befb65f3bf392981cd5"
+ }
+ Frame {
+ msec: 1888
+ hash: "ec48d113c8468bd1e1b465e248eecaee"
+ }
+ Frame {
+ msec: 1904
+ hash: "a2c9b917d1f0cff0e088d3b624d9eeb8"
+ }
+ Frame {
+ msec: 1920
+ image: "packageviews.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "c4d4f8a351316b4a33f42f5fb030f304"
+ }
+ Frame {
+ msec: 1952
+ hash: "1baee6be1da687309d84a992e430c915"
+ }
+ Frame {
+ msec: 1968
+ hash: "4245f02817f7a674c34c581cbd9e1181"
+ }
+ Frame {
+ msec: 1984
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2000
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2016
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2032
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2048
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2064
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2080
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2096
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2112
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2128
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2144
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2160
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2176
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2192
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2208
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2224
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2240
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2256
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2272
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2288
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 70; y: 89
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2304
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2320
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2336
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2352
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 70; y: 89
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2368
+ hash: "2fa6bb20f29467713c94886c6fffe5e3"
+ }
+ Frame {
+ msec: 2384
+ hash: "3b9a75225adddb01e92286463e15bf98"
+ }
+ Frame {
+ msec: 2400
+ hash: "32f99602756898b4ec607d4124b5120f"
+ }
+ Frame {
+ msec: 2416
+ hash: "60007f14752d2d87ba6e335ad596f1ad"
+ }
+ Frame {
+ msec: 2432
+ hash: "dcfad2407f53f83964fa7be762a137bd"
+ }
+ Frame {
+ msec: 2448
+ hash: "fcc1a30a33bec046868734014132eb70"
+ }
+ Frame {
+ msec: 2464
+ hash: "f60592829a2765b3cd3a0cecb9c45426"
+ }
+ Frame {
+ msec: 2480
+ hash: "a0e26063acd1b53b5eeeb31187f38336"
+ }
+ Frame {
+ msec: 2496
+ hash: "d7f3e776038bd479db292bcba3a65fc7"
+ }
+ Frame {
+ msec: 2512
+ hash: "4af31954235ab8a7cf8462eaa64d7dda"
+ }
+ Frame {
+ msec: 2528
+ hash: "aff3f287c07f546e0d3e9e68731d82fe"
+ }
+ Frame {
+ msec: 2544
+ hash: "75fbc4e26466e8a1f66503addfcbb525"
+ }
+ Frame {
+ msec: 2560
+ hash: "cb4c91f725ec46dd066475efc2bc2d65"
+ }
+ Frame {
+ msec: 2576
+ hash: "106434203ccc2fd8246c56520095a473"
+ }
+ Frame {
+ msec: 2592
+ hash: "129ced0e7fc406e81b1ced72397adc5c"
+ }
+ Frame {
+ msec: 2608
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2624
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2640
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2656
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2672
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2688
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2704
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2720
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2736
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2752
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2768
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2784
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2800
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2816
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2832
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2848
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2864
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2880
+ image: "packageviews.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2912
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2928
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2944
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2960
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2976
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 2992
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3008
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3024
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3040
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3056
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3072
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3088
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3104
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3120
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3136
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3152
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3168
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3184
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3200
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3216
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3232
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3248
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3264
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3280
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3296
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3312
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3328
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3344
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3360
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3376
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3392
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 49; y: 162
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3408
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Frame {
+ msec: 3424
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 49; y: 161
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3440
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 49; y: 159
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 48; y: 157
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3456
+ hash: "49903693b112d5f35c4e877bef6bbdb0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 48; y: 153
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 48; y: 149
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3472
+ hash: "1c84452b0ce90ae6f136f5bcce408220"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 50; y: 144
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 50; y: 138
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 50; y: 138
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3488
+ hash: "4c77d402b995297dadb5e671f071605f"
+ }
+ Frame {
+ msec: 3504
+ hash: "babd28626a81bd48b39b56f8da69c360"
+ }
+ Frame {
+ msec: 3520
+ hash: "71654a76f9b94fafaf3767003598fb96"
+ }
+ Frame {
+ msec: 3536
+ hash: "87ad69a660e072e71f940db93be3a949"
+ }
+ Frame {
+ msec: 3552
+ hash: "147f7f3f1913bc5ac5889c1a4daa8026"
+ }
+ Frame {
+ msec: 3568
+ hash: "9c26b3ad7a5dacd56028afa7bf4deef6"
+ }
+ Frame {
+ msec: 3584
+ hash: "18611ff90e5af36c9b6396c3df4cd646"
+ }
+ Frame {
+ msec: 3600
+ hash: "84701fd73ed8e1951bd4c806b70654ac"
+ }
+ Frame {
+ msec: 3616
+ hash: "42b40f1683beb23f4fe5ade066c0626f"
+ }
+ Frame {
+ msec: 3632
+ hash: "8c6aeefaa6f36cdffcf7bdb1597c6fbe"
+ }
+ Frame {
+ msec: 3648
+ hash: "731cea2e0d8fb8aac6ae919b23b89b87"
+ }
+ Frame {
+ msec: 3664
+ hash: "d4dc70a8e09e7ec03e7c1f5123b7abef"
+ }
+ Frame {
+ msec: 3680
+ hash: "5246e2f52aa104e8030eef105a5b5a7c"
+ }
+ Frame {
+ msec: 3696
+ hash: "a9c3d0034c09ba81d19d57ff550d7b4f"
+ }
+ Frame {
+ msec: 3712
+ hash: "e9092b1be19273f1f29912cd493dd238"
+ }
+ Frame {
+ msec: 3728
+ hash: "c2b19c7b818c94e932558676a026f049"
+ }
+ Frame {
+ msec: 3744
+ hash: "6627c4d6daab8e6500dbd0d921bc1ebd"
+ }
+ Frame {
+ msec: 3760
+ hash: "45c584ca18e8bfd6aa495c16a977662a"
+ }
+ Frame {
+ msec: 3776
+ hash: "de79039a8bb623f7d48afe1549ae23e0"
+ }
+ Frame {
+ msec: 3792
+ hash: "076d29278466038071095093266553f5"
+ }
+ Frame {
+ msec: 3808
+ hash: "73ed162dc5f9983bf22446f63691f7e4"
+ }
+ Frame {
+ msec: 3824
+ hash: "4cc3648635884a69191f0cfe2051f621"
+ }
+ Frame {
+ msec: 3840
+ image: "packageviews.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 3872
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 3888
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 3904
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 3920
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 3936
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 3952
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 3968
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 3984
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4000
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4016
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4032
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4048
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4064
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4080
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4096
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4112
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4128
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4144
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4160
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4176
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4192
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4208
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4224
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4240
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4256
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4272
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4288
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4304
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4320
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4336
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4352
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Frame {
+ msec: 4368
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 151; y: 170
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 151; y: 168
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4384
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 152; y: 166
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 153; y: 163
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4400
+ hash: "d06fbe4c7dd8bd392172aa5b29c6ceee"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 154; y: 160
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 155; y: 154
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4416
+ hash: "ac75b9adaecd10206c4daa07c93adb27"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 155; y: 148
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 156; y: 141
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4432
+ hash: "539ec244fd42801cfcf97adc12f48786"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 160; y: 121
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4448
+ hash: "7d7bc6f7d2ff1da352ddab0d679906e7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 162; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 166; y: 83
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 166; y: 83
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4464
+ hash: "4b508eb55971a03c6dc8a50d0244fa21"
+ }
+ Frame {
+ msec: 4480
+ hash: "2ceb497ca10e6448a019b62a225a72e4"
+ }
+ Frame {
+ msec: 4496
+ hash: "1fd9b89ebcb8e707c9b1b13ba64061b4"
+ }
+ Frame {
+ msec: 4512
+ hash: "24a3a48843860f643e55ca6dfec84f98"
+ }
+ Frame {
+ msec: 4528
+ hash: "48ea9398101f44a707c44ee1c5102d0c"
+ }
+ Frame {
+ msec: 4544
+ hash: "d8f2cebcdb542e75bbbaa4391ca881b8"
+ }
+ Frame {
+ msec: 4560
+ hash: "df35827ac111c67588922aadd45b3c85"
+ }
+ Frame {
+ msec: 4576
+ hash: "c1e612548c8d5c2f844e94ad4c0f1db4"
+ }
+ Frame {
+ msec: 4592
+ hash: "c298bccebeb1f4528c935e5fd256479c"
+ }
+ Frame {
+ msec: 4608
+ hash: "4c01d969eba4eca32b8a3b7f6f9c99f0"
+ }
+ Frame {
+ msec: 4624
+ hash: "66c783ae698cb91195088591a9bd67c1"
+ }
+ Frame {
+ msec: 4640
+ hash: "5419f6889162fb0db6b8c9e521f57f4f"
+ }
+ Frame {
+ msec: 4656
+ hash: "d153dbf30acf36145d7fcb8e37dd5c6d"
+ }
+ Frame {
+ msec: 4672
+ hash: "ffbf186683dc979ef29cdd5ff50296fc"
+ }
+ Frame {
+ msec: 4688
+ hash: "ddcedde95d1ebcafe5b73924ecfa047a"
+ }
+ Frame {
+ msec: 4704
+ hash: "d94b9e92f2c1a5e0ea2f8dd21a905517"
+ }
+ Frame {
+ msec: 4720
+ hash: "92c27d497128ccdcbfe8224a0f55a302"
+ }
+ Frame {
+ msec: 4736
+ hash: "7146017581b03e6551822653e54d5001"
+ }
+ Frame {
+ msec: 4752
+ hash: "a39567e01b8963d3b71f5f525d1582d4"
+ }
+ Frame {
+ msec: 4768
+ hash: "842654ef5a24143e41412b2450b6024c"
+ }
+ Frame {
+ msec: 4784
+ hash: "c2a002588b4b3f89806d6d283c39ea54"
+ }
+ Frame {
+ msec: 4800
+ image: "packageviews.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "2bea5cc22ea4989f8f07fbf62d09880b"
+ }
+ Frame {
+ msec: 4832
+ hash: "b8326b959b75b05c050ff91f0c34fa55"
+ }
+ Frame {
+ msec: 4848
+ hash: "d5f2e63bd18b2067221ec80764c7500d"
+ }
+ Frame {
+ msec: 4864
+ hash: "157f93ebaa95664965539237ba121265"
+ }
+ Frame {
+ msec: 4880
+ hash: "5bda47a6295e500f24b6ba7bf04e9282"
+ }
+ Frame {
+ msec: 4896
+ hash: "0134d543cfbf085eb4b5ea4a0f5ae32f"
+ }
+ Frame {
+ msec: 4912
+ hash: "d27f2ad3bd9817c23caf01ba64335776"
+ }
+ Frame {
+ msec: 4928
+ hash: "4dd96288601f4481a24b75afedd34599"
+ }
+ Frame {
+ msec: 4944
+ hash: "d5ebfbd190fe2482af54004ad9434818"
+ }
+ Frame {
+ msec: 4960
+ hash: "6a8c5c64228b3be521407e00c2b6a1de"
+ }
+ Frame {
+ msec: 4976
+ hash: "645219e7aa6761bef1b11ac8f17f1f42"
+ }
+ Frame {
+ msec: 4992
+ hash: "54fff3170fa43d99eca2c87381ecaf1e"
+ }
+ Frame {
+ msec: 5008
+ hash: "54fff3170fa43d99eca2c87381ecaf1e"
+ }
+ Frame {
+ msec: 5024
+ hash: "00c3c11b9b266504b8cdbdf4edcc3a98"
+ }
+ Frame {
+ msec: 5040
+ hash: "00c3c11b9b266504b8cdbdf4edcc3a98"
+ }
+ Frame {
+ msec: 5056
+ hash: "00c3c11b9b266504b8cdbdf4edcc3a98"
+ }
+ Frame {
+ msec: 5072
+ hash: "54fff3170fa43d99eca2c87381ecaf1e"
+ }
+ Frame {
+ msec: 5088
+ hash: "6a8c5c64228b3be521407e00c2b6a1de"
+ }
+ Frame {
+ msec: 5104
+ hash: "f91cea801322d1bc6ac1b9eeae96c704"
+ }
+ Frame {
+ msec: 5120
+ hash: "d27f2ad3bd9817c23caf01ba64335776"
+ }
+ Frame {
+ msec: 5136
+ hash: "5bda47a6295e500f24b6ba7bf04e9282"
+ }
+ Frame {
+ msec: 5152
+ hash: "d5f2e63bd18b2067221ec80764c7500d"
+ }
+ Frame {
+ msec: 5168
+ hash: "b10145c10c2bc9d01ec6a49a399f728e"
+ }
+ Frame {
+ msec: 5184
+ hash: "f0b759a49bf21b0c9b311a1dd02d7807"
+ }
+ Frame {
+ msec: 5200
+ hash: "1c5546c3ddbde95d10921c8c32fd2d67"
+ }
+ Frame {
+ msec: 5216
+ hash: "c2a002588b4b3f89806d6d283c39ea54"
+ }
+ Frame {
+ msec: 5232
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5248
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5264
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5280
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5296
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5312
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5328
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5344
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5360
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5376
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5392
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5408
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5424
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5440
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5456
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5472
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5488
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5504
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5520
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5536
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5552
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5568
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5584
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5600
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5616
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5632
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5648
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5664
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5680
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5696
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5712
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5728
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5744
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5760
+ image: "packageviews.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5792
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5808
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5824
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5840
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5856
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5872
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5888
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5904
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5920
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5936
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5952
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5968
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 5984
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6000
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6016
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6032
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6048
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6064
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6080
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6096
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6112
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6128
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6144
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6160
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6176
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6192
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6208
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6224
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6240
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6256
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6272
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6288
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6304
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6320
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6336
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6352
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6368
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6384
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6400
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6416
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6432
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6448
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6464
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6480
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6496
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6512
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 177; y: 168
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6528
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6544
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6560
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6576
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 178; y: 168
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6592
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 178; y: 168
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6608
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6624
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6640
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6656
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6672
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6688
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6704
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6720
+ image: "packageviews.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6752
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6768
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6784
+ hash: "1eb5d2140ff3c71d55a6e5338dd2853e"
+ }
+ Frame {
+ msec: 6800
+ hash: "f6de07972a225d276b4b5c424dc490ef"
+ }
+ Frame {
+ msec: 6816
+ hash: "d8c400ca33d590a9b4d9b179b5634d94"
+ }
+ Frame {
+ msec: 6832
+ hash: "21ec87c22e52b3daa78bd94b771a105c"
+ }
+ Frame {
+ msec: 6848
+ hash: "19a3667f4051e40e944ec58abb16846a"
+ }
+ Frame {
+ msec: 6864
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 6880
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 6896
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 6912
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 6928
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 6944
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 6960
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 6976
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 6992
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7008
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7024
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7040
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7056
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7072
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7088
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7104
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7120
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7136
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7152
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7168
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7184
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7200
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7216
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7232
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7248
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7264
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7280
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7296
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7312
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7328
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7344
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7360
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7376
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7392
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7408
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 157; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7424
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Frame {
+ msec: 7440
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 157; y: 39
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7456
+ hash: "08369a783b1f1f4e64da7dab40df6ef3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 157; y: 44
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 157; y: 51
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7472
+ hash: "e8ad02d4c2429a03ff0686888e4038bf"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 157; y: 59
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 158; y: 67
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7488
+ hash: "43dcc86aeff3b8b74ae1b87e735e8963"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 158; y: 87
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 158; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7504
+ hash: "96e10ce9e5a80caf626213e5c696d84d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 160; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7520
+ hash: "3b34cb99481d5418136840afd649807d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 164; y: 134
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 164; y: 134
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7536
+ hash: "494cf05eb3d8eb221d0e3c233c936e87"
+ }
+ Frame {
+ msec: 7552
+ hash: "e0d5f3aab9fbfac1de47f42202dbeb79"
+ }
+ Frame {
+ msec: 7568
+ hash: "8cd6919e15ea4320e00e79d43596ea80"
+ }
+ Frame {
+ msec: 7584
+ hash: "395a63aa12928a6b597eabd74f019a03"
+ }
+ Frame {
+ msec: 7600
+ hash: "16d4ccbda396a9afcaeac4ddca733012"
+ }
+ Frame {
+ msec: 7616
+ hash: "71955518b68a9817a41d5d0f63adcc57"
+ }
+ Frame {
+ msec: 7632
+ hash: "152f2569fe8849d5c4289699dba2ee32"
+ }
+ Frame {
+ msec: 7648
+ hash: "a1de2cb5acc31a9d73e005c3a44cee4f"
+ }
+ Frame {
+ msec: 7664
+ hash: "96ceaad68263b5165a65f557ae19d9cd"
+ }
+ Frame {
+ msec: 7680
+ image: "packageviews.7.png"
+ }
+ Frame {
+ msec: 7696
+ hash: "9ff5d2774820dac56655a44d965c7742"
+ }
+ Frame {
+ msec: 7712
+ hash: "79cdbfb2f93a35680eab38f0df2eaf66"
+ }
+ Frame {
+ msec: 7728
+ hash: "19896d510a27871fc589579e27adc0dc"
+ }
+ Frame {
+ msec: 7744
+ hash: "71b62e488897345eebf8d9640d50585f"
+ }
+ Frame {
+ msec: 7760
+ hash: "4853b95a3f1ae0ebbd468dff3605d595"
+ }
+ Frame {
+ msec: 7776
+ hash: "a8030aa0aede17d91758af08256cf39d"
+ }
+ Frame {
+ msec: 7792
+ hash: "a2a5e71349060ae262d337d9aa33b549"
+ }
+ Frame {
+ msec: 7808
+ hash: "7b5f32f0e53ab102ef6f1eca7da016dd"
+ }
+ Frame {
+ msec: 7824
+ hash: "7b5f32f0e53ab102ef6f1eca7da016dd"
+ }
+ Frame {
+ msec: 7840
+ hash: "25908df38057c7394135108d9618e28d"
+ }
+ Frame {
+ msec: 7856
+ hash: "d3b3ab6e43eef22ca71fc35c36b1f50d"
+ }
+ Frame {
+ msec: 7872
+ hash: "c25759db4e12acbe8e4701c7c86d1957"
+ }
+ Frame {
+ msec: 7888
+ hash: "fe67a155ead8495d646fa7bbcf5db6b4"
+ }
+ Frame {
+ msec: 7904
+ hash: "34e2877a8b84e53e5c85fb1b25d57e2b"
+ }
+ Frame {
+ msec: 7920
+ hash: "2fc6c5a0e9bb80e3c8f12553e7e96d02"
+ }
+ Frame {
+ msec: 7936
+ hash: "b5122a2530e21a01e93862bd8060e320"
+ }
+ Frame {
+ msec: 7952
+ hash: "9c55e0c920bcf5189fb24e1765d221db"
+ }
+ Frame {
+ msec: 7968
+ hash: "1106703562135e36ae62130200960fc8"
+ }
+ Frame {
+ msec: 7984
+ hash: "c24b57dbf01d2646fbbeb3e66636e220"
+ }
+ Frame {
+ msec: 8000
+ hash: "71663a05c04bb77c2e25299a9c6dd9ce"
+ }
+ Frame {
+ msec: 8016
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8032
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8048
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8064
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8080
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8096
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8112
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8128
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8144
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8160
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8176
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8192
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8208
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8224
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8240
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8256
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8272
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8288
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8304
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8320
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8336
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8352
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8368
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8384
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8400
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8416
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8432
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8448
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8464
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8480
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8496
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8512
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8528
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8544
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8560
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8576
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8592
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8608
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8624
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8640
+ image: "packageviews.8.png"
+ }
+ Frame {
+ msec: 8656
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8672
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8688
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Frame {
+ msec: 8704
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 46; y: 147
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8720
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 46; y: 146
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8736
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 46; y: 145
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 46; y: 143
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8752
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 46; y: 141
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8768
+ hash: "dd6caf22c0cacf5c34686785072da5f7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 46; y: 138
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 46; y: 134
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 46; y: 129
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8784
+ hash: "7b1354e70befc84c343145987c81562f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 45; y: 122
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8800
+ hash: "6107f00c6472d877b5c109dd58d73145"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 45; y: 115
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 45; y: 115
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8816
+ hash: "47288701643899e26b53d28595d59b29"
+ }
+ Frame {
+ msec: 8832
+ hash: "a3b4b613d19c8f21ec1b75c1c660ed1d"
+ }
+ Frame {
+ msec: 8848
+ hash: "7a5d9fe471eb673f68b77d97f9108bac"
+ }
+ Frame {
+ msec: 8864
+ hash: "20a09795ffcf05276d7a5be24b33e207"
+ }
+ Frame {
+ msec: 8880
+ hash: "225e529ac77f225fc8b84ed71cdcd70f"
+ }
+ Frame {
+ msec: 8896
+ hash: "e4188406a3d3d1f1b83547d362a187f8"
+ }
+ Frame {
+ msec: 8912
+ hash: "82707040aad297885ba1c8c6672dc017"
+ }
+ Frame {
+ msec: 8928
+ hash: "a369118e98e2bd67dc4242c5e8c86cb8"
+ }
+ Frame {
+ msec: 8944
+ hash: "001ef50f7d2b7db7e0db8d2190137d0c"
+ }
+ Frame {
+ msec: 8960
+ hash: "2db473b2bd9fd602ed0298501752dae9"
+ }
+ Frame {
+ msec: 8976
+ hash: "f9cdbb4e515abf23721627e3f2748960"
+ }
+ Frame {
+ msec: 8992
+ hash: "cbc072c5b117ce156a4d6661ae488a77"
+ }
+ Frame {
+ msec: 9008
+ hash: "79acb38cec803e6ebeb570dc4d7bbb30"
+ }
+ Frame {
+ msec: 9024
+ hash: "848014437545fc8d2e454a774586a8ca"
+ }
+ Frame {
+ msec: 9040
+ hash: "0836f3a48355f6384c6b3f452df1e7d6"
+ }
+ Frame {
+ msec: 9056
+ hash: "b3da223cdf138e915fcb424cf9181d6b"
+ }
+ Frame {
+ msec: 9072
+ hash: "1a7cf7e7ddaac64eeff0d23997580b8c"
+ }
+ Frame {
+ msec: 9088
+ hash: "cfbd055b2f905db503250b49120948db"
+ }
+ Frame {
+ msec: 9104
+ hash: "c5b8a4ce51ec806f0ce654a8977fb17d"
+ }
+ Frame {
+ msec: 9120
+ hash: "d09ba0ea9e7fed2f50d6463ac74da470"
+ }
+ Frame {
+ msec: 9136
+ hash: "47ec5bab098fd88ef5be3703c316717a"
+ }
+ Frame {
+ msec: 9152
+ hash: "3ea8c442ed43bd3a2aebc9cc2aacfc01"
+ }
+ Frame {
+ msec: 9168
+ hash: "f016f14b0b21781924ac2afe146b1b97"
+ }
+ Frame {
+ msec: 9184
+ hash: "7b7b6954cce0ca202585310520bbb3e3"
+ }
+ Frame {
+ msec: 9200
+ hash: "b0de94ee3b0ce4845101606d2d512426"
+ }
+ Frame {
+ msec: 9216
+ hash: "8dc56bcb2313bd8dd9ef0cbc098b80e5"
+ }
+ Frame {
+ msec: 9232
+ hash: "a1692b26fb73ade5a05e03de3f4a8dbe"
+ }
+ Frame {
+ msec: 9248
+ hash: "672dd46e629475d823b182104f15aa24"
+ }
+ Frame {
+ msec: 9264
+ hash: "2859e53d63c20af7891efc99d5e515b5"
+ }
+ Frame {
+ msec: 9280
+ hash: "b44b1c4eaa33fbd09c8e59c1bf2a8f2a"
+ }
+ Frame {
+ msec: 9296
+ hash: "d520fa81032ca25ec2cb6c358488049d"
+ }
+ Frame {
+ msec: 9312
+ hash: "3676c00bd5c3e9af8c4092afd80f58c2"
+ }
+ Frame {
+ msec: 9328
+ hash: "6be4d4c35aba5a8d32a28dd88f32acd1"
+ }
+ Frame {
+ msec: 9344
+ hash: "375473d4d838ef937c3164e7451d9391"
+ }
+ Frame {
+ msec: 9360
+ hash: "610253e766974af4958c3623547deebd"
+ }
+ Frame {
+ msec: 9376
+ hash: "20b79be381a95930c924240815cc63f4"
+ }
+ Frame {
+ msec: 9392
+ hash: "88130d7132f472ff8495d640adf290cc"
+ }
+ Frame {
+ msec: 9408
+ hash: "2e81f4c9a0221708146adcb508eb2d30"
+ }
+ Frame {
+ msec: 9424
+ hash: "977f52ed922ba5db66440f115f7484a2"
+ }
+ Frame {
+ msec: 9440
+ hash: "706f99c32d00be14ae67b4866fee0cd9"
+ }
+ Frame {
+ msec: 9456
+ hash: "210231604091497b510c4a1d42295574"
+ }
+ Frame {
+ msec: 9472
+ hash: "210231604091497b510c4a1d42295574"
+ }
+ Frame {
+ msec: 9488
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9504
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9520
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9536
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9552
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9568
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9584
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9600
+ image: "packageviews.9.png"
+ }
+ Frame {
+ msec: 9616
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9632
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9648
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9664
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9680
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9696
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9712
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9728
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9744
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9760
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9776
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9792
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9808
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9824
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9840
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9856
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9872
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9888
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9904
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9920
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9936
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9952
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9968
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 9984
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 10000
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 10016
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 10032
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 10048
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 10064
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 10080
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 10096
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 10112
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 10128
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 10144
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 10160
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 10176
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 48; y: 137
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10192
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 10208
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 10224
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 10240
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 10256
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 48; y: 137
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10272
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 10288
+ hash: "c54f97c72088b6319efba3c79bbef0fa"
+ }
+ Frame {
+ msec: 10304
+ hash: "3627adf820bc44f99cca852096f337a0"
+ }
+ Frame {
+ msec: 10320
+ hash: "48c0f775534ff9bbe9227e60ad9a3622"
+ }
+ Frame {
+ msec: 10336
+ hash: "da5c6fd80ee0dc20e81031c84ede20cf"
+ }
+ Frame {
+ msec: 10352
+ hash: "ce7595da55b274259771eb99a42df454"
+ }
+ Frame {
+ msec: 10368
+ hash: "c2dd2aa17b9508477699fefe55bfbd06"
+ }
+ Frame {
+ msec: 10384
+ hash: "4ee897ddfec1081eef8bc5d799774f82"
+ }
+ Frame {
+ msec: 10400
+ hash: "f4da67964a175acf4cde4a24b054c24c"
+ }
+ Frame {
+ msec: 10416
+ hash: "e3da951dad465f1a69d8d7c08e888f02"
+ }
+ Frame {
+ msec: 10432
+ hash: "ff862073eada170a07d209048367b823"
+ }
+ Frame {
+ msec: 10448
+ hash: "cb61d5a89c1acc2b646f3c07214bea4a"
+ }
+ Frame {
+ msec: 10464
+ hash: "15d842ac551c15a136c7598adf2fe2b1"
+ }
+ Frame {
+ msec: 10480
+ hash: "04b9e85f7418bbc402e51e0ce8149180"
+ }
+ Frame {
+ msec: 10496
+ hash: "455dff37edfac66f5e4ae78e10b93cf9"
+ }
+ Frame {
+ msec: 10512
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10528
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10544
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10560
+ image: "packageviews.10.png"
+ }
+ Frame {
+ msec: 10576
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10592
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10608
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10624
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10640
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10656
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10672
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10688
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10704
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10720
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10736
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10752
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10768
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10784
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10800
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10816
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10832
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10848
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10864
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10880
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10896
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10912
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10928
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10944
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10960
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10976
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 10992
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11008
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11024
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11040
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11056
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11072
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11088
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11104
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11120
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11136
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11152
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11168
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11184
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11200
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11216
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11232
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11248
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11264
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11280
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11296
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11312
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11328
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11344
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11360
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11376
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11392
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11408
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11424
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11440
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11456
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11472
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11488
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11504
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 47; y: 141
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11520
+ image: "packageviews.11.png"
+ }
+ Frame {
+ msec: 11536
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11552
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11568
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 47; y: 141
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11584
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11600
+ hash: "259e9da7c3b8738db1762128f2c8d4b0"
+ }
+ Frame {
+ msec: 11616
+ hash: "cf515f316c197a307a7fb8373df3b107"
+ }
+ Frame {
+ msec: 11632
+ hash: "927379ba611284d5c98a3eb5aca04f7c"
+ }
+ Frame {
+ msec: 11648
+ hash: "387ad2042589de0a19cb13aa0cac8872"
+ }
+ Frame {
+ msec: 11664
+ hash: "6536ad87d1f04b13c28c43ae0fed984f"
+ }
+ Frame {
+ msec: 11680
+ hash: "38d77d6610739614e95c70f32736f238"
+ }
+ Frame {
+ msec: 11696
+ hash: "9a6c3a95b61d3b9b787417600123b6d8"
+ }
+ Frame {
+ msec: 11712
+ hash: "782d907d7d170108beb030c93d9a4d94"
+ }
+ Frame {
+ msec: 11728
+ hash: "646ee08d1ffe676ca0363f70e14c2ed6"
+ }
+ Frame {
+ msec: 11744
+ hash: "830730ed9990c8f96fa5c7e6b4228884"
+ }
+ Frame {
+ msec: 11760
+ hash: "2e678862f358814278d38950c7c5765b"
+ }
+ Frame {
+ msec: 11776
+ hash: "c656eb6ace9caf86d417d79452c4ea34"
+ }
+ Frame {
+ msec: 11792
+ hash: "227a9bb3644c26622ef654ba2c61ddad"
+ }
+ Frame {
+ msec: 11808
+ hash: "bc8188bf8be749bfb28fc64bb5773922"
+ }
+ Frame {
+ msec: 11824
+ hash: "f1e90cfd466bdc26ba98632fe1e5360c"
+ }
+ Frame {
+ msec: 11840
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 11856
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 11872
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 11888
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 11904
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 11920
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 11936
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 11952
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 11968
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 11984
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12000
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12016
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12032
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12048
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12064
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12080
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12096
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12112
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12128
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12144
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12160
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12176
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12192
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12208
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12224
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12240
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12256
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12272
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12288
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12304
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12320
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12336
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12352
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12368
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12384
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12400
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12416
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12432
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12448
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12464
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12480
+ image: "packageviews.12.png"
+ }
+ Frame {
+ msec: 12496
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12512
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12528
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12544
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12560
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12576
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12592
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12608
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12624
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12640
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12656
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12672
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12688
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12704
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12720
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12736
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12752
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12768
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12784
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12800
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12816
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12832
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12848
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12864
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12880
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12896
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12912
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12928
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12944
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12960
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12976
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+ Frame {
+ msec: 12992
+ hash: "81795ee4213ac62e073d811aaf6b580c"
+ }
+}
diff --git a/tests/auto/declarative/visual/Package_Views/packageviews.qml b/tests/auto/declarative/visual/Package_Views/packageviews.qml
new file mode 100644
index 0000000000..cf3f9f764e
--- /dev/null
+++ b/tests/auto/declarative/visual/Package_Views/packageviews.qml
@@ -0,0 +1,89 @@
+import Qt 4.6
+
+Rectangle {
+ id: root
+ width: 200
+ height: 200
+ color: "black"
+
+ VisualDatamodel {
+ id: model
+ model: Listmodel {
+ ListElement { itemColor: "red" }
+ ListElement { itemColor: "green" }
+ ListElement { itemColor: "blue" }
+ ListElement { itemColor: "orange" }
+ ListElement { itemColor: "purple" }
+ ListElement { itemColor: "yellow" }
+ ListElement { itemColor: "slategrey" }
+ ListElement { itemColor: "cyan" }
+ ListElement { itemColor: "red" }
+ ListElement { itemColor: "green" }
+ ListElement { itemColor: "blue" }
+ ListElement { itemColor: "orange" }
+ ListElement { itemColor: "purple" }
+ ListElement { itemColor: "yellow" }
+ ListElement { itemColor: "slategrey" }
+ ListElement { itemColor: "cyan" }
+ }
+ delegate: Package {
+ Rectangle {
+ id: listItem; Package.name: "list"; width:root.width/2; height: 50; color: "transparent"; border.color: "white"
+ MouseArea {
+ anchors.fill: parent
+ onClicked: myState.state = myState.state == "list" ? "grid" : "list"
+ }
+ }
+ Rectangle {
+ id: gridItem; Package.name: "grid"; width:50; height: 50; color: "transparent"; border.color: "white"
+ MouseArea {
+ anchors.fill: parent
+ onClicked: myState.state = myState.state == "list" ? "grid" : "list"
+ }
+ }
+ Rectangle { id: myContent; width:50; height: 50; color: itemColor }
+
+ StateGroup {
+ id: myState
+ state: "list"
+ states: [
+ State {
+ name: "list"
+ ParentChange { target: myContent; parent: listItem }
+ PropertyChanges { target: myContent; x: 0; y: 0; width: listItem.width }
+ },
+ State {
+ name: "grid"
+ ParentChange { target: myContent; parent: gridItem }
+ PropertyChanges { target: myContent; x: 0; y: 0; width: gridItem.width }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ from: "*"; to: "*"
+ SequentialAnimation {
+ ParentAction{}
+ NumberAnimation { properties: "x,y,width"; easing.type: "InOutQuad" }
+ }
+ }
+ ]
+ }
+ }
+ }
+
+ ListView {
+ width: parent.width/2
+ height: parent.height
+ model: model.parts.list
+ }
+
+ GridView {
+ x: parent.width/2
+ width: parent.width/2
+ cellWidth: 50
+ cellHeight: 50
+ height: parent.height
+ model: model.parts.grid
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/bindinganimation/bindinganimation.qml b/tests/auto/declarative/visual/animation/bindinganimation/bindinganimation.qml
new file mode 100644
index 0000000000..70c14cf574
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/bindinganimation/bindinganimation.qml
@@ -0,0 +1,40 @@
+import Qt 4.6
+
+Rectangle {
+ color: "blue"
+ width: 320
+ height: 240
+ id: page
+ Rectangle {
+ id: myRectangle
+ width: 100
+ height: 100
+ color: "red"
+ x: 10
+ }
+ states: [
+ State {
+ name: "hello"
+ PropertyChanges {
+ target: myRectangle
+ x: 50 + 50
+ }
+ PropertyChanges {
+ target: myMouseArea
+ onClicked: page.state = ''
+ }
+ }
+ ]
+ transitions: [
+ Transition {
+ NumberAnimation {
+ properties: "x"
+ }
+ }
+ ]
+ MouseArea {
+ id: myMouseArea
+ anchors.fill: parent
+ onClicked: { page.state= 'hello' }
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.0.png b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.0.png
new file mode 100644
index 0000000000..1b08c81c67
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.1.png b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.1.png
new file mode 100644
index 0000000000..f3074fc93a
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.2.png b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.2.png
new file mode 100644
index 0000000000..1b08c81c67
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.3.png b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.3.png
new file mode 100644
index 0000000000..e2560e084d
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.4.png b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.4.png
new file mode 100644
index 0000000000..2ddde86c3b
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.5.png b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.5.png
new file mode 100644
index 0000000000..f3074fc93a
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.6.png b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.6.png
new file mode 100644
index 0000000000..1b08c81c67
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.qml b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.qml
new file mode 100644
index 0000000000..8297c5a421
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/bindinganimation/data/bindinganimation.qml
@@ -0,0 +1,1655 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 32
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 48
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 64
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 80
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 96
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 112
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 128
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 144
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 160
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 176
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 192
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 208
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 224
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 240
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 256
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 272
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 288
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 304
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 320
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 336
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 352
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 368
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 384
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 400
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 416
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 432
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 448
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 464
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 480
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 496
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 512
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 528
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 544
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 560
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 576
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 592
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 608
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 624
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 640
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 656
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 672
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 688
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 704
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 720
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 736
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 752
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 768
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 784
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 800
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 816
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 832
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 848
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 864
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 880
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 896
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 912
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 928
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 944
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 960
+ image: "bindinganimation.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 992
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 1008
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 1024
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 1040
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 1056
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 1072
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 1088
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 1104
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 1120
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 1136
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 1152
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 136; y: 174
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1168
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 1184
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 1200
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 1216
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 1232
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 1248
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 1264
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 1280
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 136; y: 174
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1296
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 1312
+ hash: "a78c9394bf3b81f192f42710cd7218b1"
+ }
+ Frame {
+ msec: 1328
+ hash: "7f08e8170feb1d02373c9ab42b6e882d"
+ }
+ Frame {
+ msec: 1344
+ hash: "967fbad8ac664400a3efbe66617d62aa"
+ }
+ Frame {
+ msec: 1360
+ hash: "abc2ec0bc7a93e75b5823310e6284db1"
+ }
+ Frame {
+ msec: 1376
+ hash: "afbd5b24e2f86646f5ec2aa22f3a4b5b"
+ }
+ Frame {
+ msec: 1392
+ hash: "9413dffb7ee853ba0125ac22ab22abbd"
+ }
+ Frame {
+ msec: 1408
+ hash: "fcae0317f81a3ddd713f4db1349a9da0"
+ }
+ Frame {
+ msec: 1424
+ hash: "37739777a5979f3ebf85e47e63341660"
+ }
+ Frame {
+ msec: 1440
+ hash: "72731478d80f024076ea639b55152360"
+ }
+ Frame {
+ msec: 1456
+ hash: "69058485ced6bc992a1a7c5ee34add4c"
+ }
+ Frame {
+ msec: 1472
+ hash: "391ad7ff2362e059f6170dfe306f94a7"
+ }
+ Frame {
+ msec: 1488
+ hash: "f9f74a2e38b52c9266f33e428b6acd9d"
+ }
+ Frame {
+ msec: 1504
+ hash: "25152412c4ea2aec6caf89486c073484"
+ }
+ Frame {
+ msec: 1520
+ hash: "ba403842ba3128b1cdf6a9cb28c90751"
+ }
+ Frame {
+ msec: 1536
+ hash: "e90cd68490cf3ce6ef9fe4e8f92feaa9"
+ }
+ Frame {
+ msec: 1552
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1568
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1584
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1600
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1616
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1632
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1648
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1664
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1680
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1696
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1712
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1728
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1744
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1760
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1776
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1792
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1808
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1824
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1840
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1856
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1872
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1888
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1904
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1920
+ image: "bindinganimation.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1952
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1968
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 1984
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2000
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2016
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2032
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2048
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2064
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2080
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2096
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2112
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2128
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2144
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2160
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2176
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2192
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2208
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2224
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2240
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2256
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2272
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2288
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2304
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2320
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2336
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2352
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2368
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 2384
+ hash: "adc501a3a2b8aaf72f58ba985b57424e"
+ }
+ Frame {
+ msec: 2400
+ hash: "bfa51b7c19753ef7b16d78afffc7b9dd"
+ }
+ Frame {
+ msec: 2416
+ hash: "ffa8471f57765b49fcdb9155393251e5"
+ }
+ Frame {
+ msec: 2432
+ hash: "ddb65481469c38f2331546ee03a44206"
+ }
+ Frame {
+ msec: 2448
+ hash: "6f48d1a9977b77cafd38a5903017605b"
+ }
+ Frame {
+ msec: 2464
+ hash: "4279c814163af3bd069ce21b3cd1c729"
+ }
+ Frame {
+ msec: 2480
+ hash: "17c46242c17983478f34cb49cb91ca6e"
+ }
+ Frame {
+ msec: 2496
+ hash: "42f65c58b1f5f4b5ba70855f4aaa7d2f"
+ }
+ Frame {
+ msec: 2512
+ hash: "6a74d6dc91a8b370200d3765c55c1136"
+ }
+ Frame {
+ msec: 2528
+ hash: "ecda10356cca33901c2acd0a702fee46"
+ }
+ Frame {
+ msec: 2544
+ hash: "4f58226bdbda7339d972eca065f75766"
+ }
+ Frame {
+ msec: 2560
+ hash: "a39c80859a7643c9879da9c77b644703"
+ }
+ Frame {
+ msec: 2576
+ hash: "16fe17b15900ff0464ab20ea921e5b1f"
+ }
+ Frame {
+ msec: 2592
+ hash: "bc5c83b2014b7260900587ae3637598f"
+ }
+ Frame {
+ msec: 2608
+ hash: "96c077e3a572edff04fa9b2f7020ffd0"
+ }
+ Frame {
+ msec: 2624
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2640
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2656
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2672
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2688
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2704
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2720
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2736
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2752
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2768
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2784
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2800
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2816
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2832
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2848
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2864
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2880
+ image: "bindinganimation.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2912
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2928
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2944
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2960
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2976
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 2992
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 3008
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 3024
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 3040
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 3056
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 3072
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 3088
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 3104
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 3120
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 3136
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 3152
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 3168
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3184
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 3200
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 3216
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 3232
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 3248
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 3264
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 3280
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3296
+ hash: "7cb5fc371040e587de9f06ce14a4b29a"
+ }
+ Frame {
+ msec: 3312
+ hash: "a78c9394bf3b81f192f42710cd7218b1"
+ }
+ Frame {
+ msec: 3328
+ hash: "7f08e8170feb1d02373c9ab42b6e882d"
+ }
+ Frame {
+ msec: 3344
+ hash: "967fbad8ac664400a3efbe66617d62aa"
+ }
+ Frame {
+ msec: 3360
+ hash: "abc2ec0bc7a93e75b5823310e6284db1"
+ }
+ Frame {
+ msec: 3376
+ hash: "afbd5b24e2f86646f5ec2aa22f3a4b5b"
+ }
+ Frame {
+ msec: 3392
+ hash: "9413dffb7ee853ba0125ac22ab22abbd"
+ }
+ Frame {
+ msec: 3408
+ hash: "fcae0317f81a3ddd713f4db1349a9da0"
+ }
+ Frame {
+ msec: 3424
+ hash: "37739777a5979f3ebf85e47e63341660"
+ }
+ Frame {
+ msec: 3440
+ hash: "72731478d80f024076ea639b55152360"
+ }
+ Frame {
+ msec: 3456
+ hash: "69058485ced6bc992a1a7c5ee34add4c"
+ }
+ Frame {
+ msec: 3472
+ hash: "391ad7ff2362e059f6170dfe306f94a7"
+ }
+ Mouse {
+ type: 4
+ button: 1
+ buttons: 1
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3488
+ hash: "f9f74a2e38b52c9266f33e428b6acd9d"
+ }
+ Frame {
+ msec: 3504
+ hash: "25152412c4ea2aec6caf89486c073484"
+ }
+ Frame {
+ msec: 3520
+ hash: "ba403842ba3128b1cdf6a9cb28c90751"
+ }
+ Frame {
+ msec: 3536
+ hash: "e90cd68490cf3ce6ef9fe4e8f92feaa9"
+ }
+ Frame {
+ msec: 3552
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 3568
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 3584
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 3600
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3616
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 3632
+ hash: "adc501a3a2b8aaf72f58ba985b57424e"
+ }
+ Frame {
+ msec: 3648
+ hash: "bfa51b7c19753ef7b16d78afffc7b9dd"
+ }
+ Frame {
+ msec: 3664
+ hash: "ffa8471f57765b49fcdb9155393251e5"
+ }
+ Frame {
+ msec: 3680
+ hash: "ddb65481469c38f2331546ee03a44206"
+ }
+ Frame {
+ msec: 3696
+ hash: "6f48d1a9977b77cafd38a5903017605b"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3712
+ hash: "4279c814163af3bd069ce21b3cd1c729"
+ }
+ Frame {
+ msec: 3728
+ hash: "17c46242c17983478f34cb49cb91ca6e"
+ }
+ Frame {
+ msec: 3744
+ hash: "42f65c58b1f5f4b5ba70855f4aaa7d2f"
+ }
+ Frame {
+ msec: 3760
+ hash: "6a74d6dc91a8b370200d3765c55c1136"
+ }
+ Frame {
+ msec: 3776
+ hash: "ecda10356cca33901c2acd0a702fee46"
+ }
+ Frame {
+ msec: 3792
+ hash: "4f58226bdbda7339d972eca065f75766"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3808
+ hash: "4f58226bdbda7339d972eca065f75766"
+ }
+ Frame {
+ msec: 3824
+ hash: "5fae0bdc65c609cb766ce585b8c649db"
+ }
+ Frame {
+ msec: 3840
+ image: "bindinganimation.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "6a74d6dc91a8b370200d3765c55c1136"
+ }
+ Frame {
+ msec: 3872
+ hash: "4f41101378a104e72228eeb4ba395ca8"
+ }
+ Frame {
+ msec: 3888
+ hash: "37739777a5979f3ebf85e47e63341660"
+ }
+ Frame {
+ msec: 3904
+ hash: "f4fe2cc93d65e086ba8ded1438269eb2"
+ }
+ Mouse {
+ type: 4
+ button: 1
+ buttons: 1
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3920
+ hash: "4279c814163af3bd069ce21b3cd1c729"
+ }
+ Frame {
+ msec: 3936
+ hash: "72a0c017a2fa90a4aeadfa6e552ff573"
+ }
+ Frame {
+ msec: 3952
+ hash: "391ad7ff2362e059f6170dfe306f94a7"
+ }
+ Frame {
+ msec: 3968
+ hash: "0b0c6419e1e5b016d9c22bd98fd452b1"
+ }
+ Frame {
+ msec: 3984
+ hash: "365c824c330398d267ea52ae9468b9ee"
+ }
+ Frame {
+ msec: 4000
+ hash: "65ad7e0189c096792331bd1bb0daf0db"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4016
+ hash: "65ad7e0189c096792331bd1bb0daf0db"
+ }
+ Frame {
+ msec: 4032
+ hash: "a21aa1984f068650cce2a124a82c12be"
+ }
+ Frame {
+ msec: 4048
+ hash: "8006ceaa02d22b5fdfeab400d39a0caf"
+ }
+ Frame {
+ msec: 4064
+ hash: "a2cebc35e5c2c709a2cd83e1df6eaeab"
+ }
+ Frame {
+ msec: 4080
+ hash: "07f751ea4cf877ba72fbb36f9da268d7"
+ }
+ Frame {
+ msec: 4096
+ hash: "72731478d80f024076ea639b55152360"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4112
+ hash: "37739777a5979f3ebf85e47e63341660"
+ }
+ Frame {
+ msec: 4128
+ hash: "ed47684a0b21836cd27549e0989e96dd"
+ }
+ Frame {
+ msec: 4144
+ hash: "772396bb23c713f34ea5c23bfbcb115e"
+ }
+ Frame {
+ msec: 4160
+ hash: "d9af30557f99b086bb1a185a946b580d"
+ }
+ Frame {
+ msec: 4176
+ hash: "575d30ac088448b01f49082519bbb3a1"
+ }
+ Frame {
+ msec: 4192
+ hash: "2e3f134664df8204a291af2c9f81239a"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4208
+ hash: "2e3f134664df8204a291af2c9f81239a"
+ }
+ Frame {
+ msec: 4224
+ hash: "4f58226bdbda7339d972eca065f75766"
+ }
+ Frame {
+ msec: 4240
+ hash: "5fae0bdc65c609cb766ce585b8c649db"
+ }
+ Frame {
+ msec: 4256
+ hash: "82363265ed2b611a54f8d48b2af22f11"
+ }
+ Frame {
+ msec: 4272
+ hash: "f9deee3a204c939562b896a6179743d2"
+ }
+ Frame {
+ msec: 4288
+ hash: "42f65c58b1f5f4b5ba70855f4aaa7d2f"
+ }
+ Mouse {
+ type: 4
+ button: 1
+ buttons: 1
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4304
+ hash: "3223ed179c828fadb3eca9c6373176c1"
+ }
+ Frame {
+ msec: 4320
+ hash: "56125a260a79bc38bb0ef44fd65ba49b"
+ }
+ Frame {
+ msec: 4336
+ hash: "07f751ea4cf877ba72fbb36f9da268d7"
+ }
+ Frame {
+ msec: 4352
+ hash: "6f48d1a9977b77cafd38a5903017605b"
+ }
+ Frame {
+ msec: 4368
+ hash: "8006ceaa02d22b5fdfeab400d39a0caf"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4384
+ hash: "8006ceaa02d22b5fdfeab400d39a0caf"
+ }
+ Frame {
+ msec: 4400
+ hash: "6f48d1a9977b77cafd38a5903017605b"
+ }
+ Frame {
+ msec: 4416
+ hash: "69058485ced6bc992a1a7c5ee34add4c"
+ }
+ Frame {
+ msec: 4432
+ hash: "dafcce427161a70c3513841ac22aea00"
+ }
+ Frame {
+ msec: 4448
+ hash: "3223ed179c828fadb3eca9c6373176c1"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4464
+ hash: "b08811b237ce7a460c80d285f04d53d8"
+ }
+ Frame {
+ msec: 4480
+ hash: "fcae0317f81a3ddd713f4db1349a9da0"
+ }
+ Frame {
+ msec: 4496
+ hash: "772396bb23c713f34ea5c23bfbcb115e"
+ }
+ Frame {
+ msec: 4512
+ hash: "ecda10356cca33901c2acd0a702fee46"
+ }
+ Frame {
+ msec: 4528
+ hash: "575d30ac088448b01f49082519bbb3a1"
+ }
+ Frame {
+ msec: 4544
+ hash: "abc2ec0bc7a93e75b5823310e6284db1"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4560
+ hash: "abc2ec0bc7a93e75b5823310e6284db1"
+ }
+ Frame {
+ msec: 4576
+ hash: "575d30ac088448b01f49082519bbb3a1"
+ }
+ Frame {
+ msec: 4592
+ hash: "ecda10356cca33901c2acd0a702fee46"
+ }
+ Frame {
+ msec: 4608
+ hash: "772396bb23c713f34ea5c23bfbcb115e"
+ }
+ Frame {
+ msec: 4624
+ hash: "fcae0317f81a3ddd713f4db1349a9da0"
+ }
+ Frame {
+ msec: 4640
+ hash: "b08811b237ce7a460c80d285f04d53d8"
+ }
+ Mouse {
+ type: 4
+ button: 1
+ buttons: 1
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4656
+ hash: "17c46242c17983478f34cb49cb91ca6e"
+ }
+ Frame {
+ msec: 4672
+ hash: "dafcce427161a70c3513841ac22aea00"
+ }
+ Frame {
+ msec: 4688
+ hash: "69058485ced6bc992a1a7c5ee34add4c"
+ }
+ Frame {
+ msec: 4704
+ hash: "6f48d1a9977b77cafd38a5903017605b"
+ }
+ Frame {
+ msec: 4720
+ hash: "ddb65481469c38f2331546ee03a44206"
+ }
+ Frame {
+ msec: 4736
+ hash: "a21aa1984f068650cce2a124a82c12be"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4752
+ hash: "a21aa1984f068650cce2a124a82c12be"
+ }
+ Frame {
+ msec: 4768
+ hash: "8006ceaa02d22b5fdfeab400d39a0caf"
+ }
+ Frame {
+ msec: 4784
+ hash: "6f48d1a9977b77cafd38a5903017605b"
+ }
+ Frame {
+ msec: 4800
+ image: "bindinganimation.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "56125a260a79bc38bb0ef44fd65ba49b"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4832
+ hash: "56c72b5da44bd5efdc47c3b9c3eac409"
+ }
+ Frame {
+ msec: 4848
+ hash: "42f65c58b1f5f4b5ba70855f4aaa7d2f"
+ }
+ Frame {
+ msec: 4864
+ hash: "6a74d6dc91a8b370200d3765c55c1136"
+ }
+ Frame {
+ msec: 4880
+ hash: "9413dffb7ee853ba0125ac22ab22abbd"
+ }
+ Frame {
+ msec: 4896
+ hash: "527b1f9e7a222483134675a73f9cf5b7"
+ }
+ Frame {
+ msec: 4912
+ hash: "ffeb3db6d3f177acf6f92049359a9025"
+ }
+ Frame {
+ msec: 4928
+ hash: "a39c80859a7643c9879da9c77b644703"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 122; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4944
+ hash: "a39c80859a7643c9879da9c77b644703"
+ }
+ Frame {
+ msec: 4960
+ hash: "ffeb3db6d3f177acf6f92049359a9025"
+ }
+ Frame {
+ msec: 4976
+ hash: "527b1f9e7a222483134675a73f9cf5b7"
+ }
+ Frame {
+ msec: 4992
+ hash: "9413dffb7ee853ba0125ac22ab22abbd"
+ }
+ Frame {
+ msec: 5008
+ hash: "6a74d6dc91a8b370200d3765c55c1136"
+ }
+ Frame {
+ msec: 5024
+ hash: "4f41101378a104e72228eeb4ba395ca8"
+ }
+ Frame {
+ msec: 5040
+ hash: "56c72b5da44bd5efdc47c3b9c3eac409"
+ }
+ Frame {
+ msec: 5056
+ hash: "72731478d80f024076ea639b55152360"
+ }
+ Frame {
+ msec: 5072
+ hash: "07f751ea4cf877ba72fbb36f9da268d7"
+ }
+ Frame {
+ msec: 5088
+ hash: "a2cebc35e5c2c709a2cd83e1df6eaeab"
+ }
+ Frame {
+ msec: 5104
+ hash: "8006ceaa02d22b5fdfeab400d39a0caf"
+ }
+ Frame {
+ msec: 5120
+ hash: "f9f74a2e38b52c9266f33e428b6acd9d"
+ }
+ Frame {
+ msec: 5136
+ hash: "a93f930ec8528f954cd4a770c9a8171b"
+ }
+ Frame {
+ msec: 5152
+ hash: "bfa51b7c19753ef7b16d78afffc7b9dd"
+ }
+ Frame {
+ msec: 5168
+ hash: "df62027b6b53c69a071cb3dc09c3a7ed"
+ }
+ Frame {
+ msec: 5184
+ hash: "0d59ac57f8790fe741a31d12c3438abf"
+ }
+ Frame {
+ msec: 5200
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5216
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5232
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5248
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5264
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5280
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5296
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5312
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5328
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5344
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5360
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5376
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5392
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5408
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5424
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5440
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5456
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5472
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5488
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5504
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5520
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5536
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5552
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5568
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5584
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5600
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5616
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5632
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5648
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5664
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5680
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5696
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5712
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5728
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5744
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5760
+ image: "bindinganimation.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5792
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5808
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5824
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5840
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+ Frame {
+ msec: 5856
+ hash: "383ba6b9efcc58fca512982a207631f6"
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/colorAnimation/colorAnimation.qml b/tests/auto/declarative/visual/animation/colorAnimation/colorAnimation.qml
new file mode 100644
index 0000000000..f205ae8f86
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/colorAnimation/colorAnimation.qml
@@ -0,0 +1,41 @@
+import Qt 4.6
+
+Rectangle {
+ id: mainrect
+ width: 200; height: 200
+ state: "first"
+ states: [
+ State {
+ name: "first"
+ PropertyChanges {
+ target: mainrect
+ color: "red"
+ }
+ },
+ State {
+ name: "second"
+ PropertyChanges {
+ target: mainrect
+ color: "blue"
+ }
+ }
+ ]
+ transitions: [
+ Transition {
+ from: "first"
+ to: "second"
+ reversible: true
+ SequentialAnimation {
+ ColorAnimation {
+ duration: 2000
+ target: mainrect
+ property: "color"
+ }
+ }
+ }
+ ]
+ MouseArea {
+ anchors.fill: parent
+ onClicked: { mainrect.state = 'second' }
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/colorAnimation/data/colorAnimation.0.png b/tests/auto/declarative/visual/animation/colorAnimation/data/colorAnimation.0.png
new file mode 100644
index 0000000000..f4a6cfd72e
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/colorAnimation/data/colorAnimation.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/colorAnimation/data/colorAnimation.1.png b/tests/auto/declarative/visual/animation/colorAnimation/data/colorAnimation.1.png
new file mode 100644
index 0000000000..f4a6cfd72e
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/colorAnimation/data/colorAnimation.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/colorAnimation/data/colorAnimation.2.png b/tests/auto/declarative/visual/animation/colorAnimation/data/colorAnimation.2.png
new file mode 100644
index 0000000000..f4a6cfd72e
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/colorAnimation/data/colorAnimation.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/colorAnimation/data/colorAnimation.qml b/tests/auto/declarative/visual/animation/colorAnimation/data/colorAnimation.qml
new file mode 100644
index 0000000000..900bf5c939
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/colorAnimation/data/colorAnimation.qml
@@ -0,0 +1,951 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 32
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 48
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 64
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 80
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 96
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 112
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 128
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 144
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 160
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 176
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 192
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 208
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 224
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 240
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 256
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 272
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 288
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 304
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 320
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 336
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 352
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 368
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 384
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 400
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 416
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 432
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 448
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 464
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 480
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 496
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 512
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 93; y: 136
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 528
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 544
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 560
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 576
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Frame {
+ msec: 592
+ hash: "acc736435c9f84aa82941ba561bc5dbc"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 93; y: 136
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 608
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 624
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 640
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 656
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 672
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 688
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 704
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 720
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 736
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 752
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 768
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 784
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 800
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 816
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 832
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 848
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 864
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 880
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 896
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 912
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 928
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 944
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 960
+ image: "colorAnimation.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 992
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1008
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1024
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1040
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1056
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1072
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1088
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1104
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1120
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1136
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1152
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1168
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1184
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1200
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1216
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1232
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1248
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1264
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1280
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1296
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1312
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1328
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1344
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1360
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1376
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1392
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1408
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1424
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1440
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1456
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1472
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1488
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1504
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1520
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1536
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1552
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1568
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1584
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1600
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1616
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1632
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1648
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1664
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1680
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1696
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1712
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1728
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1744
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1760
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1776
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1792
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1808
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1824
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1840
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1856
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1872
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1888
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1904
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1920
+ image: "colorAnimation.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1952
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1968
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 1984
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2000
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2016
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2032
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2048
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2064
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2080
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2096
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2112
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2128
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2144
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2160
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2176
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2192
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2208
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2224
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2240
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2256
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2272
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2288
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2304
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2320
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2336
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2352
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2368
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2384
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2400
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2416
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2432
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2448
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2464
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2480
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2496
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2512
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2528
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2544
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2560
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2576
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2592
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2608
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2624
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2640
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2656
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2672
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2688
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2704
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2720
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2736
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2752
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2768
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2784
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2800
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2816
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2832
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2848
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2864
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2880
+ image: "colorAnimation.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2912
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2928
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2944
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2960
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2976
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 2992
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3008
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3024
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3040
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3056
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3072
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3088
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3104
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3120
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3136
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3152
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3168
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3184
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3200
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3216
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3232
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3248
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3264
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3280
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3296
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3312
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3328
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3344
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3360
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3376
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3392
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3408
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3424
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3440
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3456
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3472
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3488
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3504
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3520
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3536
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3552
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3568
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3584
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3600
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3616
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3632
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3648
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3664
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+ Frame {
+ msec: 3680
+ hash: "8c0fcda4f8956394c53fc4ba18caa850"
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/easing/data/easing.0.png b/tests/auto/declarative/visual/animation/easing/data/easing.0.png
new file mode 100644
index 0000000000..4f75bfd2e2
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/easing/data/easing.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/easing/data/easing.1.png b/tests/auto/declarative/visual/animation/easing/data/easing.1.png
new file mode 100644
index 0000000000..dc17765ae3
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/easing/data/easing.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/easing/data/easing.2.png b/tests/auto/declarative/visual/animation/easing/data/easing.2.png
new file mode 100644
index 0000000000..7f83548f59
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/easing/data/easing.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/easing/data/easing.3.png b/tests/auto/declarative/visual/animation/easing/data/easing.3.png
new file mode 100644
index 0000000000..c68e0fa42e
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/easing/data/easing.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/easing/data/easing.qml b/tests/auto/declarative/visual/animation/easing/data/easing.qml
new file mode 100644
index 0000000000..d8e8688f07
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/easing/data/easing.qml
@@ -0,0 +1,779 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 32
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 48
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 64
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 80
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 96
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 112
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 128
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 144
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 160
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 176
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 192
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 208
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 224
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 240
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 256
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 272
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 111; y: 419
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 288
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 304
+ hash: "8f4c40d2e2b4f064bcb77c5ae43928c6"
+ }
+ Frame {
+ msec: 320
+ hash: "8b65094a9b7d5394fc67f92ea058627f"
+ }
+ Frame {
+ msec: 336
+ hash: "da450826b471a60ba98dabc581631ba1"
+ }
+ Frame {
+ msec: 352
+ hash: "e820fb4f1bc97152aa940b07db549f1b"
+ }
+ Frame {
+ msec: 368
+ hash: "b7d8186beca2fa0e37099f72419350f4"
+ }
+ Frame {
+ msec: 384
+ hash: "8500b93774f214e5e4789e25500262b8"
+ }
+ Frame {
+ msec: 400
+ hash: "277e1dff70285cca536b3e1fc2590688"
+ }
+ Frame {
+ msec: 416
+ hash: "b05b18f92c2089c681661566117ae0f5"
+ }
+ Frame {
+ msec: 432
+ hash: "6fec9c6b6ac3e3ea4126e3824a8d7566"
+ }
+ Frame {
+ msec: 448
+ hash: "53c6c90dd1eb7ca47721fc116474aebf"
+ }
+ Frame {
+ msec: 464
+ hash: "cf729c4a31414af3d2705878ba615738"
+ }
+ Frame {
+ msec: 480
+ hash: "f146b8a68960d507f893ef001189220e"
+ }
+ Frame {
+ msec: 496
+ hash: "18ff56b870bb048af246f928ee42a9b0"
+ }
+ Frame {
+ msec: 512
+ hash: "beee98f73fe7e878ada37b3070fa0c1d"
+ }
+ Frame {
+ msec: 528
+ hash: "435d389082912950a0be2b5dff480319"
+ }
+ Frame {
+ msec: 544
+ hash: "dc39b080eaddeaf4e309b90b7d97a835"
+ }
+ Frame {
+ msec: 560
+ hash: "666b1cde53f78d7db9c81e21adbe406a"
+ }
+ Frame {
+ msec: 576
+ hash: "c5c9627f4329e48aa96ebfbc982b6ba6"
+ }
+ Frame {
+ msec: 592
+ hash: "a583042052e5da7e80a4956337d6d1ff"
+ }
+ Frame {
+ msec: 608
+ hash: "a4a5df787e15da6f28275a12898e7620"
+ }
+ Frame {
+ msec: 624
+ hash: "02cacec2ccc803ebc03c5540484cbcaa"
+ }
+ Frame {
+ msec: 640
+ hash: "00600df1f006f358feaf43bfae9d32a5"
+ }
+ Frame {
+ msec: 656
+ hash: "737c884ba0d6d38b66252f4b97a36c33"
+ }
+ Frame {
+ msec: 672
+ hash: "7eeeade8100c84a6b56efa51cf597baf"
+ }
+ Frame {
+ msec: 688
+ hash: "18ab79d495097f0103dcf14db1897a88"
+ }
+ Frame {
+ msec: 704
+ hash: "21d3b0da00c46a101e09048928cd8027"
+ }
+ Frame {
+ msec: 720
+ hash: "a5995b0341872c275ffbc5aaee6eb853"
+ }
+ Frame {
+ msec: 736
+ hash: "bb4a37c1bd5e412ebce54d9539017723"
+ }
+ Frame {
+ msec: 752
+ hash: "63dcde9e2751ca94ed7d739feb359221"
+ }
+ Frame {
+ msec: 768
+ hash: "5790c8407e2e4d1a6a937d86d57d8edb"
+ }
+ Frame {
+ msec: 784
+ hash: "3a1c77abf6822030db60a036027dc86e"
+ }
+ Frame {
+ msec: 800
+ hash: "2a13c573ab9846cce60384dd7138b2b4"
+ }
+ Frame {
+ msec: 816
+ hash: "98983c2525265830033495b61071a5aa"
+ }
+ Frame {
+ msec: 832
+ hash: "26d2bba3d77053b410715afb497d4063"
+ }
+ Frame {
+ msec: 848
+ hash: "fd65d954c16acee425d9de65af68ef40"
+ }
+ Frame {
+ msec: 864
+ hash: "094fcc18d28b19ac6b452dd8106d813b"
+ }
+ Frame {
+ msec: 880
+ hash: "160105f6f99a960763535e4d51990ef6"
+ }
+ Frame {
+ msec: 896
+ hash: "0d5d1e6a66fc1f49f1106f01fb5a1c52"
+ }
+ Frame {
+ msec: 912
+ hash: "f6abc32680865783a4d94ecb738f9ff6"
+ }
+ Frame {
+ msec: 928
+ hash: "350509eceb134d5b18647e5ad07dbb47"
+ }
+ Frame {
+ msec: 944
+ hash: "a84e4e7c5385dc1f24ca219f45d529a5"
+ }
+ Frame {
+ msec: 960
+ image: "easing.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "efcc5ae79da3fa2f4c7d6eaa35e32d33"
+ }
+ Frame {
+ msec: 992
+ hash: "ff4afce604c8ecb4f08d1ddef8552534"
+ }
+ Frame {
+ msec: 1008
+ hash: "e2e63e12e9a5f8459720dd8b023ed17b"
+ }
+ Frame {
+ msec: 1024
+ hash: "991a01f92bcfa9cd9fe98e3f39d192fc"
+ }
+ Frame {
+ msec: 1040
+ hash: "bc3d2f0f3fac650c981457f3694c2518"
+ }
+ Frame {
+ msec: 1056
+ hash: "ee39fc9b1a602bf813d9118aa21901ac"
+ }
+ Frame {
+ msec: 1072
+ hash: "42120d098f2adf1e331332b33442dd3e"
+ }
+ Frame {
+ msec: 1088
+ hash: "1660c69b77b800d1ab57b93f0fc12aa5"
+ }
+ Frame {
+ msec: 1104
+ hash: "0630a3d6b8cb5dece5dc660f05036ec6"
+ }
+ Frame {
+ msec: 1120
+ hash: "9163f0bd9c5888794d7a09d3359bf1e5"
+ }
+ Frame {
+ msec: 1136
+ hash: "e0b7ad4883f679948c852ff152ba7907"
+ }
+ Frame {
+ msec: 1152
+ hash: "f748fc44f99b706e42b899cb18dbaaf7"
+ }
+ Frame {
+ msec: 1168
+ hash: "c84442f0cb1cf0bb50dae7d1c701aaf8"
+ }
+ Frame {
+ msec: 1184
+ hash: "d7b41567e3f3aa9576fe2793872134b7"
+ }
+ Frame {
+ msec: 1200
+ hash: "a1d10ff1adb85000902486fc8e4faa8d"
+ }
+ Frame {
+ msec: 1216
+ hash: "44b7b5d77068e360ead3af84e7d80232"
+ }
+ Frame {
+ msec: 1232
+ hash: "486c0b19c1379d9eefdf575a085e2875"
+ }
+ Frame {
+ msec: 1248
+ hash: "1d474472856d4740d960eb2f788ca5a6"
+ }
+ Frame {
+ msec: 1264
+ hash: "c74082553ab0f4ee00f5044e3369580b"
+ }
+ Frame {
+ msec: 1280
+ hash: "89fcd5514f336075ad32cae69518c1e5"
+ }
+ Frame {
+ msec: 1296
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1312
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1328
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1344
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1360
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1376
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1392
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1408
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1424
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1440
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1456
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1472
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1488
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1504
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1520
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1536
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1552
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1568
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1584
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1600
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 111; y: 419
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1616
+ hash: "9dd235eb98998d9bdd92e01300297257"
+ }
+ Frame {
+ msec: 1632
+ hash: "b77240f32e83d4f332d815c626f1e560"
+ }
+ Frame {
+ msec: 1648
+ hash: "7d89669231224cf8e02d75338c37c278"
+ }
+ Frame {
+ msec: 1664
+ hash: "a8cf7c179011ee8187a8e1111683e52e"
+ }
+ Frame {
+ msec: 1680
+ hash: "3e87a57e05da09a8260801320431b922"
+ }
+ Frame {
+ msec: 1696
+ hash: "a2b0d99c8a232715fe03e8772a36634c"
+ }
+ Frame {
+ msec: 1712
+ hash: "5b4634cd495ae7bb9c69a5c9c346189e"
+ }
+ Frame {
+ msec: 1728
+ hash: "492f8f2b84af355ef41c1a7cda3a8a73"
+ }
+ Frame {
+ msec: 1744
+ hash: "88e4eb08520fb5acc3d88ac4f0900542"
+ }
+ Frame {
+ msec: 1760
+ hash: "0c09cdcb906b4ce9840fd7502c39e5b9"
+ }
+ Frame {
+ msec: 1776
+ hash: "b054083bdd212cc03167a90df2d7eac5"
+ }
+ Frame {
+ msec: 1792
+ hash: "83971c2d37616ab92680364d6ac288a6"
+ }
+ Frame {
+ msec: 1808
+ hash: "a73951d25e2cb7c1d04c88c86dfa0e4d"
+ }
+ Frame {
+ msec: 1824
+ hash: "31fc8b20302abac97e506c37a14bbb7e"
+ }
+ Frame {
+ msec: 1840
+ hash: "f760ccd7339e01a9423da7b592498291"
+ }
+ Frame {
+ msec: 1856
+ hash: "24dfcd5553f854908396de751fb15b88"
+ }
+ Frame {
+ msec: 1872
+ hash: "1daf38a6e6199f980e9494a3eb480047"
+ }
+ Frame {
+ msec: 1888
+ hash: "a39e2de1090209e5dbc8cc26577ec97d"
+ }
+ Frame {
+ msec: 1904
+ hash: "f4edc780b063e34461263ed3b753be88"
+ }
+ Frame {
+ msec: 1920
+ image: "easing.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "a19b0353604491f56f72be0d20d76955"
+ }
+ Frame {
+ msec: 1952
+ hash: "9a70f109eebfcede2311ef77ceb50a44"
+ }
+ Frame {
+ msec: 1968
+ hash: "7b28313d6860aeefd4a4e136d38d62f8"
+ }
+ Frame {
+ msec: 1984
+ hash: "95d84f38473159fe6b38f84ffe371714"
+ }
+ Frame {
+ msec: 2000
+ hash: "07f91261794edb0ac1fde9bb4ff36011"
+ }
+ Frame {
+ msec: 2016
+ hash: "f9a4a6b92a9c2d265688f1bfac18fa0a"
+ }
+ Frame {
+ msec: 2032
+ hash: "cdec7cc00380fde4f73be997a992251a"
+ }
+ Frame {
+ msec: 2048
+ hash: "a52b34f84e98fcd8babb1d39979fc9c7"
+ }
+ Frame {
+ msec: 2064
+ hash: "bf05b3c79a9616f2e6c33d348b30e0ba"
+ }
+ Frame {
+ msec: 2080
+ hash: "c5931785685b4f4854d3ddfff5dd5466"
+ }
+ Frame {
+ msec: 2096
+ hash: "bae163e02b860a9ca19d1bcb60ac1f8e"
+ }
+ Frame {
+ msec: 2112
+ hash: "a36295a1ebb35e538f8899ae3ae3b36a"
+ }
+ Frame {
+ msec: 2128
+ hash: "b6448d61803d9b2c05b438aa8ce8bcd5"
+ }
+ Frame {
+ msec: 2144
+ hash: "631bf4caff2d93ef96a426100ffc5b32"
+ }
+ Frame {
+ msec: 2160
+ hash: "a8777c84a03996493f719f5fcfc80d00"
+ }
+ Frame {
+ msec: 2176
+ hash: "86e1759df103ef776bb03f24941f49da"
+ }
+ Frame {
+ msec: 2192
+ hash: "01a790ea60adeaf368c66bd53aa8fcb3"
+ }
+ Frame {
+ msec: 2208
+ hash: "79e5aca8ef6b9764f7f99cdfb51222ae"
+ }
+ Frame {
+ msec: 2224
+ hash: "82d10cc01b9be4683c5aa76096bd462c"
+ }
+ Frame {
+ msec: 2240
+ hash: "95d961a92c597e432611947f7480796a"
+ }
+ Frame {
+ msec: 2256
+ hash: "e8ee89b5313c7e2c66741fe1c2090029"
+ }
+ Frame {
+ msec: 2272
+ hash: "2e3e8cf25dc1a3f09e7bf2a086f8e3bb"
+ }
+ Frame {
+ msec: 2288
+ hash: "68ca8ad381f48db23d2bc5da9da0c17a"
+ }
+ Frame {
+ msec: 2304
+ hash: "e29f2411667049e8fae6c080f61c5869"
+ }
+ Frame {
+ msec: 2320
+ hash: "5b0a6fadedf3024e8ecb7f2c73a2277d"
+ }
+ Frame {
+ msec: 2336
+ hash: "af2eac625ef1fd928093ccd60bc0058e"
+ }
+ Frame {
+ msec: 2352
+ hash: "8a1ff780ebdc9e416e60ea0940e8f2d6"
+ }
+ Frame {
+ msec: 2368
+ hash: "7eb316c51cfd8ad972b7040247a651eb"
+ }
+ Frame {
+ msec: 2384
+ hash: "1bac7075c10c87a69e71c3859f0db41d"
+ }
+ Frame {
+ msec: 2400
+ hash: "0f16f40567729065cf9ecfcc15395a7b"
+ }
+ Frame {
+ msec: 2416
+ hash: "719f4e776776f0db5c68ae7c6177e9b7"
+ }
+ Frame {
+ msec: 2432
+ hash: "75172dbf31fd8d706f54748c59099845"
+ }
+ Frame {
+ msec: 2448
+ hash: "d730b550e05167b05350e0e6636dd97d"
+ }
+ Frame {
+ msec: 2464
+ hash: "e1f33eb5f023d9d42a99f8bc23223c45"
+ }
+ Frame {
+ msec: 2480
+ hash: "8a4b0df5bed6c7be73c194ce2bb6a271"
+ }
+ Frame {
+ msec: 2496
+ hash: "44a9ea371f12d4ac3a569121a995ae16"
+ }
+ Frame {
+ msec: 2512
+ hash: "14747e2e9e072210b9d6db50b4f704a1"
+ }
+ Frame {
+ msec: 2528
+ hash: "eea52abf430f8cc1adc37e7180036584"
+ }
+ Frame {
+ msec: 2544
+ hash: "0a9f6b14bc02e929a45bf4ebb736f9d3"
+ }
+ Frame {
+ msec: 2560
+ hash: "a68a6eef0fc8754564c47c88b60d9a2a"
+ }
+ Frame {
+ msec: 2576
+ hash: "eeb469e2fbda131d83538055e88ecdf7"
+ }
+ Frame {
+ msec: 2592
+ hash: "0f7b673472050e807c9d935fde5afd83"
+ }
+ Frame {
+ msec: 2608
+ hash: "80c90cce66bdd2324ca98bc591c22b44"
+ }
+ Frame {
+ msec: 2624
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2640
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2656
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2672
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2688
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2704
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2720
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2736
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2752
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2768
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2784
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2800
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2816
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2832
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2848
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2864
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2880
+ image: "easing.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2912
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2928
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2944
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2960
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2976
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 2992
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 3008
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+ Frame {
+ msec: 3024
+ hash: "bb8e2ba14526dc5ad74f74e8ff3d96a5"
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/easing/easing.qml b/tests/auto/declarative/visual/animation/easing/easing.qml
new file mode 100644
index 0000000000..4248d88887
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/easing/easing.qml
@@ -0,0 +1,193 @@
+import Qt 4.6
+
+Rectangle {
+ id: item
+ width: 600
+ height: layout.height
+ color: "white"
+ resources: [
+ ListModel {
+ id: easingtypes
+ ListElement {
+ type: "Linear"
+ }
+ ListElement {
+ type: "InQuad"
+ }
+ ListElement {
+ type: "OutQuad"
+ }
+ ListElement {
+ type: "InOutQuad"
+ }
+ ListElement {
+ type: "OutInQuad"
+ }
+ ListElement {
+ type: "InCubic"
+ }
+ ListElement {
+ type: "OutCubic"
+ }
+ ListElement {
+ type: "InOutCubic"
+ }
+ ListElement {
+ type: "OutInCubic"
+ }
+ ListElement {
+ type: "InQuart"
+ }
+ ListElement {
+ type: "OutQuart"
+ }
+ ListElement {
+ type: "InOutQuart"
+ }
+ ListElement {
+ type: "OutInQuart"
+ }
+ ListElement {
+ type: "InQuint"
+ }
+ ListElement {
+ type: "OutQuint"
+ }
+ ListElement {
+ type: "InOutQuint"
+ }
+ ListElement {
+ type: "OutInQuint"
+ }
+ ListElement {
+ type: "InSine"
+ }
+ ListElement {
+ type: "OutSine"
+ }
+ ListElement {
+ type: "InOutSine"
+ }
+ ListElement {
+ type: "OutInSine"
+ }
+ ListElement {
+ type: "InExpo"
+ }
+ ListElement {
+ type: "OutExpo"
+ }
+ ListElement {
+ type: "InOutExpo"
+ }
+ ListElement {
+ type: "OutInExpo"
+ }
+ ListElement {
+ type: "InCirc"
+ }
+ ListElement {
+ type: "OutCirc"
+ }
+ ListElement {
+ type: "InOutCirc"
+ }
+ ListElement {
+ type: "OutInCirc"
+ }
+ ListElement {
+ type: "InElastic"
+ }
+ ListElement {
+ type: "OutElastic"
+ }
+ ListElement {
+ type: "InOutElastic"
+ }
+ ListElement {
+ type: "OutInElastic"
+ }
+ ListElement {
+ type: "InBack"
+ }
+ ListElement {
+ type: "OutBack"
+ }
+ ListElement {
+ type: "InOutBack"
+ }
+ ListElement {
+ type: "OutInBack"
+ }
+ ListElement {
+ type: "OutBounce"
+ }
+ ListElement {
+ type: "InBounce"
+ }
+ ListElement {
+ type: "InOutBounce"
+ }
+ ListElement {
+ type: "OutInBounce"
+ }
+ }
+ ]
+ Column {
+ id: layout
+ anchors.left: item.left
+ anchors.right: item.right
+ Repeater {
+ model: easingtypes
+ Component {
+ Rectangle {
+ id: block
+ Text {
+ text: type
+ anchors.centerIn: parent
+ font.italic: true
+ color: index & 1 ? "black" : "white"
+ opacity: 0 // 1 for debugging
+ }
+ width: 120
+ height: 18
+ color: index & 1 ? "red" : "blue"
+ states: [
+ State {
+ name: "from"
+ when: !mouse.pressed
+ PropertyChanges {
+ target: block
+ x: 0
+ }
+ },
+ State {
+ name: "to"
+ when: mouse.pressed
+ PropertyChanges {
+ target: block
+ x: item.width-block.width
+ }
+ }
+ ]
+ transitions: [
+ Transition {
+ from: "*"
+ to: "to"
+ reversible: true
+ NumberAnimation {
+ properties: "x"
+ easing.type: type
+ duration: 1000
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ MouseArea {
+ id: mouse
+ anchors.fill: layout
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/easing/pics/qtlogo.png b/tests/auto/declarative/visual/animation/easing/pics/qtlogo.png
new file mode 100644
index 0000000000..399bd0b1d9
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/easing/pics/qtlogo.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/loop/data/loop.0.png b/tests/auto/declarative/visual/animation/loop/data/loop.0.png
new file mode 100644
index 0000000000..f4301d3759
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/loop/data/loop.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/loop/data/loop.1.png b/tests/auto/declarative/visual/animation/loop/data/loop.1.png
new file mode 100644
index 0000000000..ceb0e20b17
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/loop/data/loop.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/loop/data/loop.2.png b/tests/auto/declarative/visual/animation/loop/data/loop.2.png
new file mode 100644
index 0000000000..197c8c0150
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/loop/data/loop.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/loop/data/loop.3.png b/tests/auto/declarative/visual/animation/loop/data/loop.3.png
new file mode 100644
index 0000000000..3a4327ea37
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/loop/data/loop.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/loop/data/loop.4.png b/tests/auto/declarative/visual/animation/loop/data/loop.4.png
new file mode 100644
index 0000000000..239771970a
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/loop/data/loop.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/loop/data/loop.5.png b/tests/auto/declarative/visual/animation/loop/data/loop.5.png
new file mode 100644
index 0000000000..70d91a2e54
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/loop/data/loop.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/loop/data/loop.qml b/tests/auto/declarative/visual/animation/loop/data/loop.qml
new file mode 100644
index 0000000000..8804d44935
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/loop/data/loop.qml
@@ -0,0 +1,1471 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "eff7cc4b163dceb6084270cc589393f1"
+ }
+ Frame {
+ msec: 32
+ hash: "1012b52727ae98522061945e32a6269a"
+ }
+ Frame {
+ msec: 48
+ hash: "06c3f3c1fa014b0eb7341e0a45ca16e4"
+ }
+ Frame {
+ msec: 64
+ hash: "71ecb0af25649c056310d3b865d4144d"
+ }
+ Frame {
+ msec: 80
+ hash: "e249fe5b113797433f96a2f84d47e42b"
+ }
+ Frame {
+ msec: 96
+ hash: "2a7256921c25c79c22263f2b48d4e98c"
+ }
+ Frame {
+ msec: 112
+ hash: "8657944b456402622f2991a0c9acc2fb"
+ }
+ Frame {
+ msec: 128
+ hash: "c919a94cd7afb1fbad4c88537af00869"
+ }
+ Frame {
+ msec: 144
+ hash: "303b5057d94e328f9447a01d54eea93d"
+ }
+ Frame {
+ msec: 160
+ hash: "72eb974dc008c9454935b18b47d4d9e6"
+ }
+ Frame {
+ msec: 176
+ hash: "545f258cb0ec7f5d951b74cc7d3f4f0d"
+ }
+ Frame {
+ msec: 192
+ hash: "3b3d6046fb01adf7c8a7f67bbc46d28e"
+ }
+ Frame {
+ msec: 208
+ hash: "12f7556076cf7a4c2f029dab80e666e7"
+ }
+ Frame {
+ msec: 224
+ hash: "fab272c7dce2bbee4042764d38c7ceb5"
+ }
+ Frame {
+ msec: 240
+ hash: "ff8addee408527bbaed1819bae07c23f"
+ }
+ Frame {
+ msec: 256
+ hash: "53eb6f575db2af3635139e5ddbd7b2f9"
+ }
+ Frame {
+ msec: 272
+ hash: "a2fa1cf169acb8ff26a2c5ec1f1d5c81"
+ }
+ Frame {
+ msec: 288
+ hash: "ab8d5d6d146ed11b92bc93e78f28e50c"
+ }
+ Frame {
+ msec: 304
+ hash: "0fbfc6609b082008e44592067b18ab63"
+ }
+ Frame {
+ msec: 320
+ hash: "7fbeda19c19c62a0af5f7f98e633993f"
+ }
+ Frame {
+ msec: 336
+ hash: "1882b591bc9d4e79d69d0baecb78b700"
+ }
+ Frame {
+ msec: 352
+ hash: "dde429007f876206f3ec0c68d239983e"
+ }
+ Frame {
+ msec: 368
+ hash: "b656bdba2978a9a1af511cc2bb0cb59a"
+ }
+ Frame {
+ msec: 384
+ hash: "1f6573bf67b2893c94f0c2d40213dc73"
+ }
+ Frame {
+ msec: 400
+ hash: "f5786fb532300a1b2f820251fc17c775"
+ }
+ Frame {
+ msec: 416
+ hash: "a0e9c4bd3b6c4cdadd40bdf3ca5e2986"
+ }
+ Frame {
+ msec: 432
+ hash: "073f74ab23a1173025b3c63424ce2697"
+ }
+ Frame {
+ msec: 448
+ hash: "1ac1367d21e346c6c652a88b9ea25bfc"
+ }
+ Frame {
+ msec: 464
+ hash: "f62720308dc9ae67c3856bc3afb32b75"
+ }
+ Frame {
+ msec: 480
+ hash: "066476a57efba802d2497bc3731a3583"
+ }
+ Frame {
+ msec: 496
+ hash: "fb965028a760e8d0a4d81fd982a18ff3"
+ }
+ Frame {
+ msec: 512
+ hash: "ba008abd1a7a73c750b909d57c043649"
+ }
+ Frame {
+ msec: 528
+ hash: "4c974470953f74d1ee7bcd0f4a4c48cf"
+ }
+ Frame {
+ msec: 544
+ hash: "ea233f3476da26c90d67b7775b718aa2"
+ }
+ Frame {
+ msec: 560
+ hash: "e12c3b810c0aa628d7a3827453bea9f3"
+ }
+ Frame {
+ msec: 576
+ hash: "7451954ca0465c430fc4bae84f6d97cb"
+ }
+ Frame {
+ msec: 592
+ hash: "503e40f193a8b099daa4013eddc2f664"
+ }
+ Frame {
+ msec: 608
+ hash: "1f81acf94f325a51faa7aa61e73f8a25"
+ }
+ Frame {
+ msec: 624
+ hash: "0257d7d53eda8afe182a9f97ef451679"
+ }
+ Frame {
+ msec: 640
+ hash: "cfc260bdc977ef16311840022cc85378"
+ }
+ Frame {
+ msec: 656
+ hash: "27483f0b89d727b32722ea153fad30ad"
+ }
+ Frame {
+ msec: 672
+ hash: "355afa11b8e7b24a353d1aa79daf7564"
+ }
+ Frame {
+ msec: 688
+ hash: "bbc1d55f346719476f471a2294227bda"
+ }
+ Frame {
+ msec: 704
+ hash: "9bbab5ff75219d8bd65022c6d061e57a"
+ }
+ Frame {
+ msec: 720
+ hash: "ff0699f02845f3c5cf5aabb19198c346"
+ }
+ Frame {
+ msec: 736
+ hash: "26768e09270ade4c5b484154e7042f43"
+ }
+ Frame {
+ msec: 752
+ hash: "31c9ae63071de3fb2f7e1836a22515cb"
+ }
+ Frame {
+ msec: 768
+ hash: "783ce2acdae8d87883151532c9293336"
+ }
+ Frame {
+ msec: 784
+ hash: "86b9fd739f437127e0cc4d7dcd4284bd"
+ }
+ Frame {
+ msec: 800
+ hash: "5e1d6e164dd184cc197d514e5ff60a4c"
+ }
+ Frame {
+ msec: 816
+ hash: "13063a8d73704165d64dd2a95803ec0f"
+ }
+ Frame {
+ msec: 832
+ hash: "c244e0c0d60f4be2e017bba21a17ab3f"
+ }
+ Frame {
+ msec: 848
+ hash: "b3bd657873f1b49c888b9b98d8c0e23f"
+ }
+ Frame {
+ msec: 864
+ hash: "65a011e4f62ecddd820bdbdeb0084b65"
+ }
+ Frame {
+ msec: 880
+ hash: "86018de7b4a93b267fe94c4de9e61bab"
+ }
+ Frame {
+ msec: 896
+ hash: "44827055c99ae3ed924c101c9d1be5c5"
+ }
+ Frame {
+ msec: 912
+ hash: "1c31fcb20ec1abc7ea815b703ae05363"
+ }
+ Frame {
+ msec: 928
+ hash: "9d7825b7b05ca696846a4116ab27f966"
+ }
+ Frame {
+ msec: 944
+ hash: "61b6690dd14fc76dbac4d785bbddb8ee"
+ }
+ Frame {
+ msec: 960
+ image: "loop.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "2cc40e1119060483ae067f3881af0391"
+ }
+ Frame {
+ msec: 992
+ hash: "9747fdff3429f7a2dbc9e3173ad43a67"
+ }
+ Frame {
+ msec: 1008
+ hash: "e68058b9565138f2d7f0f96b74c38dec"
+ }
+ Frame {
+ msec: 1024
+ hash: "f32aceabb929471dffd73bf0290e75a2"
+ }
+ Frame {
+ msec: 1040
+ hash: "9112838cc8f9a0cfb94e0ef6ca7eca71"
+ }
+ Frame {
+ msec: 1056
+ hash: "53bd2c46e3a11db0ee151a6a0311b3a8"
+ }
+ Frame {
+ msec: 1072
+ hash: "d5105f958a592324e53aae4a83beb049"
+ }
+ Frame {
+ msec: 1088
+ hash: "862249432e6fc6114b63284ad9c97cb6"
+ }
+ Frame {
+ msec: 1104
+ hash: "3e6a6f505aa146a6789434d265ad4d3b"
+ }
+ Frame {
+ msec: 1120
+ hash: "0f5b2b05f72b86bd2b0a6d0ea2b6bf37"
+ }
+ Frame {
+ msec: 1136
+ hash: "922520f7ec954d6d1061208cbd63877e"
+ }
+ Frame {
+ msec: 1152
+ hash: "d1c02f3ce4bcc96e0c3d2503a0e9aa48"
+ }
+ Frame {
+ msec: 1168
+ hash: "ebb41112b687ecb062dedc3b49cb93fc"
+ }
+ Frame {
+ msec: 1184
+ hash: "7bc87d71d532aa52abc26ac9c1cbb665"
+ }
+ Frame {
+ msec: 1200
+ hash: "1a7a81f851c8817cac3cc0cb7ac07971"
+ }
+ Frame {
+ msec: 1216
+ hash: "ca17c870c55f2947bb5f85d28f30ee7c"
+ }
+ Frame {
+ msec: 1232
+ hash: "48b123cfd6d2ea1c2bc9f2ba822ec7bf"
+ }
+ Frame {
+ msec: 1248
+ hash: "2a6b8aecef26793e200993dc1e25fd95"
+ }
+ Frame {
+ msec: 1264
+ hash: "f10a0a11ed54a910fe434311f67343a4"
+ }
+ Frame {
+ msec: 1280
+ hash: "47b6e1beabdcd3cd3d21d77c62e5bed8"
+ }
+ Frame {
+ msec: 1296
+ hash: "1eea7eb2853a9e7a1a69738667457b7a"
+ }
+ Frame {
+ msec: 1312
+ hash: "9e018f9e7a5ba22bbb9be3049373124a"
+ }
+ Frame {
+ msec: 1328
+ hash: "d63069a8e7b0eb5611cc34caaecef2fb"
+ }
+ Frame {
+ msec: 1344
+ hash: "def9383a090e4454343725f1a7c4fb3d"
+ }
+ Frame {
+ msec: 1360
+ hash: "fd3036e559fd31eeadb0032666a95864"
+ }
+ Frame {
+ msec: 1376
+ hash: "cf9f82b9e2a03f63f75b6ac113b3d4e5"
+ }
+ Frame {
+ msec: 1392
+ hash: "346e7f597cfb4fc51d5393e705deddd5"
+ }
+ Frame {
+ msec: 1408
+ hash: "0d6d6cb2ca808f5a57acfa32e10fc335"
+ }
+ Frame {
+ msec: 1424
+ hash: "9a660a0fed41211a37d3ac82be40f81a"
+ }
+ Frame {
+ msec: 1440
+ hash: "df3fd60ecbd517879e00e8112c49bed4"
+ }
+ Frame {
+ msec: 1456
+ hash: "cd86fe5894e5d061f7ffe37913f00ce6"
+ }
+ Frame {
+ msec: 1472
+ hash: "a5fdb825c18d43f3ae18f5c28e715174"
+ }
+ Frame {
+ msec: 1488
+ hash: "0fdfb5f9463def560da6c19acf96bafb"
+ }
+ Frame {
+ msec: 1504
+ hash: "8849a36af064503dbccad69a35b6ab03"
+ }
+ Frame {
+ msec: 1520
+ hash: "baeb4f90b0e2efc09225dbb5dd003e9e"
+ }
+ Frame {
+ msec: 1536
+ hash: "86922e71c80976ef3aa2cab18f86c010"
+ }
+ Frame {
+ msec: 1552
+ hash: "10d166d7da9949370a66251415522186"
+ }
+ Frame {
+ msec: 1568
+ hash: "ada1608055b221dc9f1f7650a9764930"
+ }
+ Frame {
+ msec: 1584
+ hash: "dd25ffb9a6bf009139b2942f9cc1f8e7"
+ }
+ Frame {
+ msec: 1600
+ hash: "dc4a1c44d08328965b53ff079a8fa57b"
+ }
+ Frame {
+ msec: 1616
+ hash: "d3d88cf635ba38e5035732cb36014417"
+ }
+ Frame {
+ msec: 1632
+ hash: "be5e44f6b9978ba3b9ae878ae5758a96"
+ }
+ Frame {
+ msec: 1648
+ hash: "34f193daf199ab45310be2b407499e57"
+ }
+ Frame {
+ msec: 1664
+ hash: "d87c854e1c16642dba0d87e25f0e416f"
+ }
+ Frame {
+ msec: 1680
+ hash: "08c404f4efd27695071ad52fbfa57c0b"
+ }
+ Frame {
+ msec: 1696
+ hash: "84828f8e0cace1a39d9b7f19b6e4cbaa"
+ }
+ Frame {
+ msec: 1712
+ hash: "8a0c6e1f597e699c3e2be816ae4e1dd4"
+ }
+ Frame {
+ msec: 1728
+ hash: "9aecb0c464fb140725f34ad94ede367a"
+ }
+ Frame {
+ msec: 1744
+ hash: "a298b3ab2939819ced7e7f903ec63be4"
+ }
+ Frame {
+ msec: 1760
+ hash: "99789b6e168355a3960986c7d1f21f82"
+ }
+ Frame {
+ msec: 1776
+ hash: "ebd37ee719ca460480521fd4ec284a3f"
+ }
+ Frame {
+ msec: 1792
+ hash: "9c9b3fb5b623d3deaf9920c99279d71b"
+ }
+ Frame {
+ msec: 1808
+ hash: "8f0be6d4d6fd7f66a43fd604e17717dd"
+ }
+ Frame {
+ msec: 1824
+ hash: "854defd35cf3315e4501583756814ff6"
+ }
+ Frame {
+ msec: 1840
+ hash: "fd7157aef6dfb303472cd33b176f91d8"
+ }
+ Frame {
+ msec: 1856
+ hash: "e6521a3c74c190c193af2c913e5326e2"
+ }
+ Frame {
+ msec: 1872
+ hash: "19862dcb88fcbbb2c4ecdc42821c7fef"
+ }
+ Frame {
+ msec: 1888
+ hash: "5e29a9f9c6c4131c5b71f84d24503ad2"
+ }
+ Frame {
+ msec: 1904
+ hash: "140e63c071ef77d26034d0bb6a5d5b7a"
+ }
+ Frame {
+ msec: 1920
+ image: "loop.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "7f79dd50a0af8e8871191ee80afcad0f"
+ }
+ Frame {
+ msec: 1952
+ hash: "a5eb3334044999f56c759ce8727d627f"
+ }
+ Frame {
+ msec: 1968
+ hash: "3fb70a7591b6decfa44f7cad18f73855"
+ }
+ Frame {
+ msec: 1984
+ hash: "3fab99be73f7f12b9463dea359fc86d2"
+ }
+ Frame {
+ msec: 2000
+ hash: "50ce6b869e42c949b84cf2dd0cca3af9"
+ }
+ Frame {
+ msec: 2016
+ hash: "5369125b23e2f954c18f2fd4e0ba6f6a"
+ }
+ Frame {
+ msec: 2032
+ hash: "a76f624be0db97ec4450b10f748065df"
+ }
+ Frame {
+ msec: 2048
+ hash: "3fb70a7591b6decfa44f7cad18f73855"
+ }
+ Frame {
+ msec: 2064
+ hash: "dada267799b6e57acfcc5de3b8822c7c"
+ }
+ Frame {
+ msec: 2080
+ hash: "72c0bf8225504e86ff023242b84513a8"
+ }
+ Frame {
+ msec: 2096
+ hash: "1e8b095c39bd359637b1b9c975ee514c"
+ }
+ Frame {
+ msec: 2112
+ hash: "19862dcb88fcbbb2c4ecdc42821c7fef"
+ }
+ Frame {
+ msec: 2128
+ hash: "60c95993a894e1c6e2d476db365b7746"
+ }
+ Frame {
+ msec: 2144
+ hash: "854defd35cf3315e4501583756814ff6"
+ }
+ Frame {
+ msec: 2160
+ hash: "15e8959bfa4d206b2f0607322b21cba6"
+ }
+ Frame {
+ msec: 2176
+ hash: "ebd37ee719ca460480521fd4ec284a3f"
+ }
+ Frame {
+ msec: 2192
+ hash: "6d278926822d044fff04c3f182dcb058"
+ }
+ Frame {
+ msec: 2208
+ hash: "9aecb0c464fb140725f34ad94ede367a"
+ }
+ Frame {
+ msec: 2224
+ hash: "b36f70f138e6deecf5b105bcd89d1a15"
+ }
+ Frame {
+ msec: 2240
+ hash: "08c404f4efd27695071ad52fbfa57c0b"
+ }
+ Frame {
+ msec: 2256
+ hash: "6469d0bee7ab280639b565ebf174f251"
+ }
+ Frame {
+ msec: 2272
+ hash: "be5e44f6b9978ba3b9ae878ae5758a96"
+ }
+ Frame {
+ msec: 2288
+ hash: "5214e578bc78b729ddf35c140093c0da"
+ }
+ Frame {
+ msec: 2304
+ hash: "dd25ffb9a6bf009139b2942f9cc1f8e7"
+ }
+ Frame {
+ msec: 2320
+ hash: "2ddf31aeac4815be56848703a9b5aa14"
+ }
+ Frame {
+ msec: 2336
+ hash: "86922e71c80976ef3aa2cab18f86c010"
+ }
+ Frame {
+ msec: 2352
+ hash: "d8415ba4fb19b62b838ef2e09ae7607a"
+ }
+ Frame {
+ msec: 2368
+ hash: "0fdfb5f9463def560da6c19acf96bafb"
+ }
+ Frame {
+ msec: 2384
+ hash: "68fac60713af7cb130e92fa381be411c"
+ }
+ Frame {
+ msec: 2400
+ hash: "df3fd60ecbd517879e00e8112c49bed4"
+ }
+ Frame {
+ msec: 2416
+ hash: "64e49282d97ba864d2f6be632ae048e4"
+ }
+ Frame {
+ msec: 2432
+ hash: "346e7f597cfb4fc51d5393e705deddd5"
+ }
+ Frame {
+ msec: 2448
+ hash: "f302a9ce45187ff1001c967a4c753b2b"
+ }
+ Frame {
+ msec: 2464
+ hash: "def9383a090e4454343725f1a7c4fb3d"
+ }
+ Frame {
+ msec: 2480
+ hash: "fd177a7ae3b5b9205fd38e955be327e0"
+ }
+ Frame {
+ msec: 2496
+ hash: "1eea7eb2853a9e7a1a69738667457b7a"
+ }
+ Frame {
+ msec: 2512
+ hash: "32b16dd62ccf06e44be38fd5885f297e"
+ }
+ Frame {
+ msec: 2528
+ hash: "2a6b8aecef26793e200993dc1e25fd95"
+ }
+ Frame {
+ msec: 2544
+ hash: "8637606843905d6ae3f95fcb745f2a6e"
+ }
+ Frame {
+ msec: 2560
+ hash: "1a7a81f851c8817cac3cc0cb7ac07971"
+ }
+ Frame {
+ msec: 2576
+ hash: "704ca30ddc0a637f3d1cd4926a6f7983"
+ }
+ Frame {
+ msec: 2592
+ hash: "d1c02f3ce4bcc96e0c3d2503a0e9aa48"
+ }
+ Frame {
+ msec: 2608
+ hash: "7759418b4fe412857ab8e7294f5a3206"
+ }
+ Frame {
+ msec: 2624
+ hash: "3e6a6f505aa146a6789434d265ad4d3b"
+ }
+ Frame {
+ msec: 2640
+ hash: "3e6089b47573cd53b0a220275202c80b"
+ }
+ Frame {
+ msec: 2656
+ hash: "53bd2c46e3a11db0ee151a6a0311b3a8"
+ }
+ Frame {
+ msec: 2672
+ hash: "f30202ae354a587c5949a16c1f8b95c3"
+ }
+ Frame {
+ msec: 2688
+ hash: "66f78a34fe9d297af1ae8e98f84ead55"
+ }
+ Frame {
+ msec: 2704
+ hash: "3e2fc29876812fe57ea008a71db299a4"
+ }
+ Frame {
+ msec: 2720
+ hash: "7234b6df2220e418ef8ebe8f1c82bf26"
+ }
+ Frame {
+ msec: 2736
+ hash: "82dd491c3b34e702a24ece8e55761a6f"
+ }
+ Frame {
+ msec: 2752
+ hash: "d7f1065f5c42088dfc5ce36687fd8010"
+ }
+ Frame {
+ msec: 2768
+ hash: "15bfbb0261b66ccbe3b34d0ac807165c"
+ }
+ Frame {
+ msec: 2784
+ hash: "69963ce07eb434d787588b21fd020fa3"
+ }
+ Frame {
+ msec: 2800
+ hash: "2fb9e078573ebd1a5cf0f615c97f1d20"
+ }
+ Frame {
+ msec: 2816
+ hash: "31fa31ed47ea16390be8ea9d41f483e7"
+ }
+ Frame {
+ msec: 2832
+ hash: "0f9ed8cd5cfbdab03bcb05cf6dd92620"
+ }
+ Frame {
+ msec: 2848
+ hash: "a0e737132ae642c465e991e770ab3e34"
+ }
+ Frame {
+ msec: 2864
+ hash: "d57cc5045f01ab4e7eb72575aef22a10"
+ }
+ Frame {
+ msec: 2880
+ image: "loop.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "df41be1fa564353ceb2088af209610d3"
+ }
+ Frame {
+ msec: 2912
+ hash: "2d294613ed10dfdbca829b43b6990574"
+ }
+ Frame {
+ msec: 2928
+ hash: "0a278a4ec3626442c94ef2da30771171"
+ }
+ Frame {
+ msec: 2944
+ hash: "7071526c830fdfde9d520ad1578d27a8"
+ }
+ Frame {
+ msec: 2960
+ hash: "ad02e7b90f223d3fc5a433bc4ffbee9e"
+ }
+ Frame {
+ msec: 2976
+ hash: "e7ef412697c7df3887980ed1b079ffd5"
+ }
+ Frame {
+ msec: 2992
+ hash: "ebda21f95079b37f4862b42523bbc1c0"
+ }
+ Frame {
+ msec: 3008
+ hash: "6e8889e9b44ff8ed44e228d97fb5034c"
+ }
+ Frame {
+ msec: 3024
+ hash: "f32aceabb929471dffd73bf0290e75a2"
+ }
+ Frame {
+ msec: 3040
+ hash: "9112838cc8f9a0cfb94e0ef6ca7eca71"
+ }
+ Frame {
+ msec: 3056
+ hash: "53bd2c46e3a11db0ee151a6a0311b3a8"
+ }
+ Frame {
+ msec: 3072
+ hash: "d5105f958a592324e53aae4a83beb049"
+ }
+ Frame {
+ msec: 3088
+ hash: "862249432e6fc6114b63284ad9c97cb6"
+ }
+ Frame {
+ msec: 3104
+ hash: "3e6a6f505aa146a6789434d265ad4d3b"
+ }
+ Frame {
+ msec: 3120
+ hash: "0f5b2b05f72b86bd2b0a6d0ea2b6bf37"
+ }
+ Frame {
+ msec: 3136
+ hash: "922520f7ec954d6d1061208cbd63877e"
+ }
+ Frame {
+ msec: 3152
+ hash: "d1c02f3ce4bcc96e0c3d2503a0e9aa48"
+ }
+ Frame {
+ msec: 3168
+ hash: "ebb41112b687ecb062dedc3b49cb93fc"
+ }
+ Frame {
+ msec: 3184
+ hash: "7bc87d71d532aa52abc26ac9c1cbb665"
+ }
+ Frame {
+ msec: 3200
+ hash: "1a7a81f851c8817cac3cc0cb7ac07971"
+ }
+ Frame {
+ msec: 3216
+ hash: "ca17c870c55f2947bb5f85d28f30ee7c"
+ }
+ Frame {
+ msec: 3232
+ hash: "48b123cfd6d2ea1c2bc9f2ba822ec7bf"
+ }
+ Frame {
+ msec: 3248
+ hash: "2a6b8aecef26793e200993dc1e25fd95"
+ }
+ Frame {
+ msec: 3264
+ hash: "f10a0a11ed54a910fe434311f67343a4"
+ }
+ Frame {
+ msec: 3280
+ hash: "47b6e1beabdcd3cd3d21d77c62e5bed8"
+ }
+ Frame {
+ msec: 3296
+ hash: "1eea7eb2853a9e7a1a69738667457b7a"
+ }
+ Frame {
+ msec: 3312
+ hash: "9e018f9e7a5ba22bbb9be3049373124a"
+ }
+ Frame {
+ msec: 3328
+ hash: "d63069a8e7b0eb5611cc34caaecef2fb"
+ }
+ Frame {
+ msec: 3344
+ hash: "def9383a090e4454343725f1a7c4fb3d"
+ }
+ Frame {
+ msec: 3360
+ hash: "fd3036e559fd31eeadb0032666a95864"
+ }
+ Frame {
+ msec: 3376
+ hash: "cf9f82b9e2a03f63f75b6ac113b3d4e5"
+ }
+ Frame {
+ msec: 3392
+ hash: "346e7f597cfb4fc51d5393e705deddd5"
+ }
+ Frame {
+ msec: 3408
+ hash: "0d6d6cb2ca808f5a57acfa32e10fc335"
+ }
+ Frame {
+ msec: 3424
+ hash: "9a660a0fed41211a37d3ac82be40f81a"
+ }
+ Frame {
+ msec: 3440
+ hash: "df3fd60ecbd517879e00e8112c49bed4"
+ }
+ Frame {
+ msec: 3456
+ hash: "cd86fe5894e5d061f7ffe37913f00ce6"
+ }
+ Frame {
+ msec: 3472
+ hash: "a5fdb825c18d43f3ae18f5c28e715174"
+ }
+ Frame {
+ msec: 3488
+ hash: "0fdfb5f9463def560da6c19acf96bafb"
+ }
+ Frame {
+ msec: 3504
+ hash: "8849a36af064503dbccad69a35b6ab03"
+ }
+ Frame {
+ msec: 3520
+ hash: "baeb4f90b0e2efc09225dbb5dd003e9e"
+ }
+ Frame {
+ msec: 3536
+ hash: "86922e71c80976ef3aa2cab18f86c010"
+ }
+ Frame {
+ msec: 3552
+ hash: "10d166d7da9949370a66251415522186"
+ }
+ Frame {
+ msec: 3568
+ hash: "ada1608055b221dc9f1f7650a9764930"
+ }
+ Frame {
+ msec: 3584
+ hash: "dd25ffb9a6bf009139b2942f9cc1f8e7"
+ }
+ Frame {
+ msec: 3600
+ hash: "dc4a1c44d08328965b53ff079a8fa57b"
+ }
+ Frame {
+ msec: 3616
+ hash: "d3d88cf635ba38e5035732cb36014417"
+ }
+ Frame {
+ msec: 3632
+ hash: "be5e44f6b9978ba3b9ae878ae5758a96"
+ }
+ Frame {
+ msec: 3648
+ hash: "34f193daf199ab45310be2b407499e57"
+ }
+ Frame {
+ msec: 3664
+ hash: "d87c854e1c16642dba0d87e25f0e416f"
+ }
+ Frame {
+ msec: 3680
+ hash: "08c404f4efd27695071ad52fbfa57c0b"
+ }
+ Frame {
+ msec: 3696
+ hash: "84828f8e0cace1a39d9b7f19b6e4cbaa"
+ }
+ Frame {
+ msec: 3712
+ hash: "8a0c6e1f597e699c3e2be816ae4e1dd4"
+ }
+ Frame {
+ msec: 3728
+ hash: "9aecb0c464fb140725f34ad94ede367a"
+ }
+ Frame {
+ msec: 3744
+ hash: "a298b3ab2939819ced7e7f903ec63be4"
+ }
+ Frame {
+ msec: 3760
+ hash: "99789b6e168355a3960986c7d1f21f82"
+ }
+ Frame {
+ msec: 3776
+ hash: "ebd37ee719ca460480521fd4ec284a3f"
+ }
+ Frame {
+ msec: 3792
+ hash: "9c9b3fb5b623d3deaf9920c99279d71b"
+ }
+ Frame {
+ msec: 3808
+ hash: "8f0be6d4d6fd7f66a43fd604e17717dd"
+ }
+ Frame {
+ msec: 3824
+ hash: "854defd35cf3315e4501583756814ff6"
+ }
+ Frame {
+ msec: 3840
+ image: "loop.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "e6521a3c74c190c193af2c913e5326e2"
+ }
+ Frame {
+ msec: 3872
+ hash: "19862dcb88fcbbb2c4ecdc42821c7fef"
+ }
+ Frame {
+ msec: 3888
+ hash: "5e29a9f9c6c4131c5b71f84d24503ad2"
+ }
+ Frame {
+ msec: 3904
+ hash: "140e63c071ef77d26034d0bb6a5d5b7a"
+ }
+ Frame {
+ msec: 3920
+ hash: "72c0bf8225504e86ff023242b84513a8"
+ }
+ Frame {
+ msec: 3936
+ hash: "7f79dd50a0af8e8871191ee80afcad0f"
+ }
+ Frame {
+ msec: 3952
+ hash: "a5eb3334044999f56c759ce8727d627f"
+ }
+ Frame {
+ msec: 3968
+ hash: "3fb70a7591b6decfa44f7cad18f73855"
+ }
+ Frame {
+ msec: 3984
+ hash: "3fab99be73f7f12b9463dea359fc86d2"
+ }
+ Frame {
+ msec: 4000
+ hash: "50ce6b869e42c949b84cf2dd0cca3af9"
+ }
+ Frame {
+ msec: 4016
+ hash: "5369125b23e2f954c18f2fd4e0ba6f6a"
+ }
+ Frame {
+ msec: 4032
+ hash: "a76f624be0db97ec4450b10f748065df"
+ }
+ Frame {
+ msec: 4048
+ hash: "3fb70a7591b6decfa44f7cad18f73855"
+ }
+ Frame {
+ msec: 4064
+ hash: "dada267799b6e57acfcc5de3b8822c7c"
+ }
+ Frame {
+ msec: 4080
+ hash: "72c0bf8225504e86ff023242b84513a8"
+ }
+ Frame {
+ msec: 4096
+ hash: "1e8b095c39bd359637b1b9c975ee514c"
+ }
+ Frame {
+ msec: 4112
+ hash: "19862dcb88fcbbb2c4ecdc42821c7fef"
+ }
+ Frame {
+ msec: 4128
+ hash: "60c95993a894e1c6e2d476db365b7746"
+ }
+ Frame {
+ msec: 4144
+ hash: "854defd35cf3315e4501583756814ff6"
+ }
+ Frame {
+ msec: 4160
+ hash: "15e8959bfa4d206b2f0607322b21cba6"
+ }
+ Frame {
+ msec: 4176
+ hash: "ebd37ee719ca460480521fd4ec284a3f"
+ }
+ Frame {
+ msec: 4192
+ hash: "6d278926822d044fff04c3f182dcb058"
+ }
+ Frame {
+ msec: 4208
+ hash: "9aecb0c464fb140725f34ad94ede367a"
+ }
+ Frame {
+ msec: 4224
+ hash: "b36f70f138e6deecf5b105bcd89d1a15"
+ }
+ Frame {
+ msec: 4240
+ hash: "08c404f4efd27695071ad52fbfa57c0b"
+ }
+ Frame {
+ msec: 4256
+ hash: "6469d0bee7ab280639b565ebf174f251"
+ }
+ Frame {
+ msec: 4272
+ hash: "be5e44f6b9978ba3b9ae878ae5758a96"
+ }
+ Frame {
+ msec: 4288
+ hash: "5214e578bc78b729ddf35c140093c0da"
+ }
+ Frame {
+ msec: 4304
+ hash: "dd25ffb9a6bf009139b2942f9cc1f8e7"
+ }
+ Frame {
+ msec: 4320
+ hash: "2ddf31aeac4815be56848703a9b5aa14"
+ }
+ Frame {
+ msec: 4336
+ hash: "86922e71c80976ef3aa2cab18f86c010"
+ }
+ Frame {
+ msec: 4352
+ hash: "d8415ba4fb19b62b838ef2e09ae7607a"
+ }
+ Frame {
+ msec: 4368
+ hash: "0fdfb5f9463def560da6c19acf96bafb"
+ }
+ Frame {
+ msec: 4384
+ hash: "68fac60713af7cb130e92fa381be411c"
+ }
+ Frame {
+ msec: 4400
+ hash: "df3fd60ecbd517879e00e8112c49bed4"
+ }
+ Frame {
+ msec: 4416
+ hash: "64e49282d97ba864d2f6be632ae048e4"
+ }
+ Frame {
+ msec: 4432
+ hash: "346e7f597cfb4fc51d5393e705deddd5"
+ }
+ Frame {
+ msec: 4448
+ hash: "f302a9ce45187ff1001c967a4c753b2b"
+ }
+ Frame {
+ msec: 4464
+ hash: "def9383a090e4454343725f1a7c4fb3d"
+ }
+ Frame {
+ msec: 4480
+ hash: "fd177a7ae3b5b9205fd38e955be327e0"
+ }
+ Frame {
+ msec: 4496
+ hash: "1eea7eb2853a9e7a1a69738667457b7a"
+ }
+ Frame {
+ msec: 4512
+ hash: "32b16dd62ccf06e44be38fd5885f297e"
+ }
+ Frame {
+ msec: 4528
+ hash: "2a6b8aecef26793e200993dc1e25fd95"
+ }
+ Frame {
+ msec: 4544
+ hash: "8637606843905d6ae3f95fcb745f2a6e"
+ }
+ Frame {
+ msec: 4560
+ hash: "1a7a81f851c8817cac3cc0cb7ac07971"
+ }
+ Frame {
+ msec: 4576
+ hash: "704ca30ddc0a637f3d1cd4926a6f7983"
+ }
+ Frame {
+ msec: 4592
+ hash: "d1c02f3ce4bcc96e0c3d2503a0e9aa48"
+ }
+ Frame {
+ msec: 4608
+ hash: "7759418b4fe412857ab8e7294f5a3206"
+ }
+ Frame {
+ msec: 4624
+ hash: "3e6a6f505aa146a6789434d265ad4d3b"
+ }
+ Frame {
+ msec: 4640
+ hash: "3e6089b47573cd53b0a220275202c80b"
+ }
+ Frame {
+ msec: 4656
+ hash: "53bd2c46e3a11db0ee151a6a0311b3a8"
+ }
+ Frame {
+ msec: 4672
+ hash: "f30202ae354a587c5949a16c1f8b95c3"
+ }
+ Frame {
+ msec: 4688
+ hash: "66f78a34fe9d297af1ae8e98f84ead55"
+ }
+ Frame {
+ msec: 4704
+ hash: "3e2fc29876812fe57ea008a71db299a4"
+ }
+ Frame {
+ msec: 4720
+ hash: "7234b6df2220e418ef8ebe8f1c82bf26"
+ }
+ Frame {
+ msec: 4736
+ hash: "82dd491c3b34e702a24ece8e55761a6f"
+ }
+ Frame {
+ msec: 4752
+ hash: "d7f1065f5c42088dfc5ce36687fd8010"
+ }
+ Frame {
+ msec: 4768
+ hash: "15bfbb0261b66ccbe3b34d0ac807165c"
+ }
+ Frame {
+ msec: 4784
+ hash: "69963ce07eb434d787588b21fd020fa3"
+ }
+ Frame {
+ msec: 4800
+ image: "loop.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "31fa31ed47ea16390be8ea9d41f483e7"
+ }
+ Frame {
+ msec: 4832
+ hash: "0f9ed8cd5cfbdab03bcb05cf6dd92620"
+ }
+ Frame {
+ msec: 4848
+ hash: "a0e737132ae642c465e991e770ab3e34"
+ }
+ Frame {
+ msec: 4864
+ hash: "d57cc5045f01ab4e7eb72575aef22a10"
+ }
+ Frame {
+ msec: 4880
+ hash: "d57e1a10e48938e1f7fc219220fe1204"
+ }
+ Frame {
+ msec: 4896
+ hash: "df41be1fa564353ceb2088af209610d3"
+ }
+ Frame {
+ msec: 4912
+ hash: "2d294613ed10dfdbca829b43b6990574"
+ }
+ Frame {
+ msec: 4928
+ hash: "0a278a4ec3626442c94ef2da30771171"
+ }
+ Frame {
+ msec: 4944
+ hash: "7071526c830fdfde9d520ad1578d27a8"
+ }
+ Frame {
+ msec: 4960
+ hash: "ad02e7b90f223d3fc5a433bc4ffbee9e"
+ }
+ Frame {
+ msec: 4976
+ hash: "e7ef412697c7df3887980ed1b079ffd5"
+ }
+ Frame {
+ msec: 4992
+ hash: "ebda21f95079b37f4862b42523bbc1c0"
+ }
+ Frame {
+ msec: 5008
+ hash: "6e8889e9b44ff8ed44e228d97fb5034c"
+ }
+ Frame {
+ msec: 5024
+ hash: "f32aceabb929471dffd73bf0290e75a2"
+ }
+ Frame {
+ msec: 5040
+ hash: "9112838cc8f9a0cfb94e0ef6ca7eca71"
+ }
+ Frame {
+ msec: 5056
+ hash: "53bd2c46e3a11db0ee151a6a0311b3a8"
+ }
+ Frame {
+ msec: 5072
+ hash: "d5105f958a592324e53aae4a83beb049"
+ }
+ Frame {
+ msec: 5088
+ hash: "862249432e6fc6114b63284ad9c97cb6"
+ }
+ Frame {
+ msec: 5104
+ hash: "3e6a6f505aa146a6789434d265ad4d3b"
+ }
+ Frame {
+ msec: 5120
+ hash: "0f5b2b05f72b86bd2b0a6d0ea2b6bf37"
+ }
+ Frame {
+ msec: 5136
+ hash: "922520f7ec954d6d1061208cbd63877e"
+ }
+ Frame {
+ msec: 5152
+ hash: "d1c02f3ce4bcc96e0c3d2503a0e9aa48"
+ }
+ Frame {
+ msec: 5168
+ hash: "ebb41112b687ecb062dedc3b49cb93fc"
+ }
+ Frame {
+ msec: 5184
+ hash: "7bc87d71d532aa52abc26ac9c1cbb665"
+ }
+ Frame {
+ msec: 5200
+ hash: "1a7a81f851c8817cac3cc0cb7ac07971"
+ }
+ Frame {
+ msec: 5216
+ hash: "ca17c870c55f2947bb5f85d28f30ee7c"
+ }
+ Frame {
+ msec: 5232
+ hash: "48b123cfd6d2ea1c2bc9f2ba822ec7bf"
+ }
+ Frame {
+ msec: 5248
+ hash: "2a6b8aecef26793e200993dc1e25fd95"
+ }
+ Frame {
+ msec: 5264
+ hash: "f10a0a11ed54a910fe434311f67343a4"
+ }
+ Frame {
+ msec: 5280
+ hash: "47b6e1beabdcd3cd3d21d77c62e5bed8"
+ }
+ Frame {
+ msec: 5296
+ hash: "1eea7eb2853a9e7a1a69738667457b7a"
+ }
+ Frame {
+ msec: 5312
+ hash: "9e018f9e7a5ba22bbb9be3049373124a"
+ }
+ Frame {
+ msec: 5328
+ hash: "d63069a8e7b0eb5611cc34caaecef2fb"
+ }
+ Frame {
+ msec: 5344
+ hash: "def9383a090e4454343725f1a7c4fb3d"
+ }
+ Frame {
+ msec: 5360
+ hash: "fd3036e559fd31eeadb0032666a95864"
+ }
+ Frame {
+ msec: 5376
+ hash: "cf9f82b9e2a03f63f75b6ac113b3d4e5"
+ }
+ Frame {
+ msec: 5392
+ hash: "346e7f597cfb4fc51d5393e705deddd5"
+ }
+ Frame {
+ msec: 5408
+ hash: "0d6d6cb2ca808f5a57acfa32e10fc335"
+ }
+ Frame {
+ msec: 5424
+ hash: "9a660a0fed41211a37d3ac82be40f81a"
+ }
+ Frame {
+ msec: 5440
+ hash: "df3fd60ecbd517879e00e8112c49bed4"
+ }
+ Frame {
+ msec: 5456
+ hash: "cd86fe5894e5d061f7ffe37913f00ce6"
+ }
+ Frame {
+ msec: 5472
+ hash: "a5fdb825c18d43f3ae18f5c28e715174"
+ }
+ Frame {
+ msec: 5488
+ hash: "0fdfb5f9463def560da6c19acf96bafb"
+ }
+ Frame {
+ msec: 5504
+ hash: "8849a36af064503dbccad69a35b6ab03"
+ }
+ Frame {
+ msec: 5520
+ hash: "baeb4f90b0e2efc09225dbb5dd003e9e"
+ }
+ Frame {
+ msec: 5536
+ hash: "86922e71c80976ef3aa2cab18f86c010"
+ }
+ Frame {
+ msec: 5552
+ hash: "10d166d7da9949370a66251415522186"
+ }
+ Frame {
+ msec: 5568
+ hash: "ada1608055b221dc9f1f7650a9764930"
+ }
+ Frame {
+ msec: 5584
+ hash: "dd25ffb9a6bf009139b2942f9cc1f8e7"
+ }
+ Frame {
+ msec: 5600
+ hash: "dc4a1c44d08328965b53ff079a8fa57b"
+ }
+ Frame {
+ msec: 5616
+ hash: "d3d88cf635ba38e5035732cb36014417"
+ }
+ Frame {
+ msec: 5632
+ hash: "be5e44f6b9978ba3b9ae878ae5758a96"
+ }
+ Frame {
+ msec: 5648
+ hash: "34f193daf199ab45310be2b407499e57"
+ }
+ Frame {
+ msec: 5664
+ hash: "d87c854e1c16642dba0d87e25f0e416f"
+ }
+ Frame {
+ msec: 5680
+ hash: "08c404f4efd27695071ad52fbfa57c0b"
+ }
+ Frame {
+ msec: 5696
+ hash: "84828f8e0cace1a39d9b7f19b6e4cbaa"
+ }
+ Frame {
+ msec: 5712
+ hash: "8a0c6e1f597e699c3e2be816ae4e1dd4"
+ }
+ Frame {
+ msec: 5728
+ hash: "9aecb0c464fb140725f34ad94ede367a"
+ }
+ Frame {
+ msec: 5744
+ hash: "a298b3ab2939819ced7e7f903ec63be4"
+ }
+ Frame {
+ msec: 5760
+ image: "loop.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "ebd37ee719ca460480521fd4ec284a3f"
+ }
+ Frame {
+ msec: 5792
+ hash: "9c9b3fb5b623d3deaf9920c99279d71b"
+ }
+ Frame {
+ msec: 5808
+ hash: "8f0be6d4d6fd7f66a43fd604e17717dd"
+ }
+ Frame {
+ msec: 5824
+ hash: "854defd35cf3315e4501583756814ff6"
+ }
+ Frame {
+ msec: 5840
+ hash: "fd7157aef6dfb303472cd33b176f91d8"
+ }
+ Frame {
+ msec: 5856
+ hash: "e6521a3c74c190c193af2c913e5326e2"
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/loop/loop.qml b/tests/auto/declarative/visual/animation/loop/loop.qml
new file mode 100644
index 0000000000..f6049aeeba
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/loop/loop.qml
@@ -0,0 +1,24 @@
+import Qt 4.6
+
+Rectangle {
+ id: wrapper
+ width: 600
+ height: 100
+
+ Rectangle {
+ id: redRect
+ width: 100; height: 100
+ color: Qt.rgba(1,0,0)
+ /* This should produce an animation that starts at 0, animates smoothly
+ to 100, jumps to 200, animates smoothly to 400, animates smoothly
+ back to 100, jumps to 200, and so on.
+ */
+ x: SequentialAnimation {
+ repeat: true
+ NumberAnimation { to: 100; duration: 1000 }
+ NumberAnimation { from: 200; to: 400; duration: 1000 }
+ }
+
+ }
+
+}
diff --git a/tests/auto/declarative/visual/animation/parallelAnimation/data/parallelAnimation.0.png b/tests/auto/declarative/visual/animation/parallelAnimation/data/parallelAnimation.0.png
new file mode 100644
index 0000000000..82c18d7343
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parallelAnimation/data/parallelAnimation.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parallelAnimation/data/parallelAnimation.1.png b/tests/auto/declarative/visual/animation/parallelAnimation/data/parallelAnimation.1.png
new file mode 100644
index 0000000000..b9a3b898ca
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parallelAnimation/data/parallelAnimation.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parallelAnimation/data/parallelAnimation.2.png b/tests/auto/declarative/visual/animation/parallelAnimation/data/parallelAnimation.2.png
new file mode 100644
index 0000000000..789615b54b
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parallelAnimation/data/parallelAnimation.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parallelAnimation/data/parallelAnimation.qml b/tests/auto/declarative/visual/animation/parallelAnimation/data/parallelAnimation.qml
new file mode 100644
index 0000000000..5f5b8fc562
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parallelAnimation/data/parallelAnimation.qml
@@ -0,0 +1,463 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 32
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 48
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 64
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 80
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 96
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 112
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 128
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 144
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 160
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 176
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 192
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 208
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 224
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 240
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 256
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 272
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 288
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 304
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 320
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 336
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 352
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 368
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 384
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 400
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 416
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 432
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 448
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 464
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 480
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 496
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 512
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 528
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 544
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 560
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 576
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 592
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 608
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 624
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 640
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 656
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 672
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 688
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 704
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 720
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 736
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 752
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 137; y: 74
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 768
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 784
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 800
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 816
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 832
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 848
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 864
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 137; y: 74
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 880
+ hash: "4faa7727bafeea0771f2db62f0141ac9"
+ }
+ Frame {
+ msec: 896
+ hash: "0fada111cb977c4de8c7499e44714f38"
+ }
+ Frame {
+ msec: 912
+ hash: "1817e010332117dcddc1a1b1a2caf52d"
+ }
+ Frame {
+ msec: 928
+ hash: "e4add6bf93479c9bca571419fe2fabf9"
+ }
+ Frame {
+ msec: 944
+ hash: "d8812e206d2cbf434d58db6a35439a44"
+ }
+ Frame {
+ msec: 960
+ image: "parallelAnimation.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "a238178c584aaf2563d29bff927d5bab"
+ }
+ Frame {
+ msec: 992
+ hash: "f583e9fe8feda02e796a61c5fed7b0eb"
+ }
+ Frame {
+ msec: 1008
+ hash: "b3a1a4fd85912831e551a8c07da1a561"
+ }
+ Frame {
+ msec: 1024
+ hash: "f7c111ee4a04af6c1da958f8b56c28ee"
+ }
+ Frame {
+ msec: 1040
+ hash: "f53fa374817d81ee44fb98e64e464b36"
+ }
+ Frame {
+ msec: 1056
+ hash: "547ddef13cbcaaf57bb1f4e2bb7bc822"
+ }
+ Frame {
+ msec: 1072
+ hash: "8b10ccfef926103a6d67d68eee250f83"
+ }
+ Frame {
+ msec: 1088
+ hash: "008bbb50dc659e6f5eea15290680edd7"
+ }
+ Frame {
+ msec: 1104
+ hash: "0217e3230d3df44363a023d0d7defc5f"
+ }
+ Frame {
+ msec: 1120
+ hash: "ab9907a92452de6878f4c346febe705c"
+ }
+ Frame {
+ msec: 1136
+ hash: "7bce31f347a7f0598d2d64026c702f3e"
+ }
+ Frame {
+ msec: 1152
+ hash: "032080184907bc5b01db7675802d7dbe"
+ }
+ Frame {
+ msec: 1168
+ hash: "2cba43a2e5febcc44bfd1379b9cb2591"
+ }
+ Frame {
+ msec: 1184
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1200
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1216
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1232
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1248
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1264
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1280
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1296
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1312
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1328
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1344
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1360
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1376
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1392
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1408
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1424
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1440
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1456
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1472
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1488
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1504
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1520
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1536
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1552
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1568
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1584
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1600
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1616
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1632
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1648
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1664
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1680
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1696
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1712
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+ Frame {
+ msec: 1728
+ hash: "b901a51b5605621adff7b34c61f8f320"
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/parallelAnimation/parallelAnimation.qml b/tests/auto/declarative/visual/animation/parallelAnimation/parallelAnimation.qml
new file mode 100644
index 0000000000..1980b91045
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parallelAnimation/parallelAnimation.qml
@@ -0,0 +1,43 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400; height: 200
+ Rectangle {
+ id: redRect
+ width: 100; height: 100
+ color: "red"
+ }
+ Rectangle {
+ id: redRect2
+ width: 100; height: 100
+ y: 100
+ color: "red"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: parent.state = "state1"
+ }
+
+ states: State {
+ name: "state1"
+ PropertyChanges {
+ target: redRect
+ x: 300
+ color: "purple"
+ }
+ PropertyChanges {
+ target: redRect2
+ x: 300
+ color: "purple"
+ }
+ }
+
+ transitions: Transition {
+ PropertyAnimation { targets: redRect; properties: "x,color"; duration: 300 }
+ ParallelAnimation {
+ NumberAnimation { targets: redRect2; properties: "x"; duration: 300 }
+ ColorAnimation { targets: redRect2; properties: "color"; duration: 300 }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.0.png b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.0.png
new file mode 100644
index 0000000000..a0032f862a
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.1.png b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.1.png
new file mode 100644
index 0000000000..958b6af40c
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.2.png b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.2.png
new file mode 100644
index 0000000000..3a1811f3e2
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.3.png b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.3.png
new file mode 100644
index 0000000000..36064c2926
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.4.png b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.4.png
new file mode 100644
index 0000000000..c493a1d1ff
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.5.png b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.5.png
new file mode 100644
index 0000000000..c493a1d1ff
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.qml b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.qml
new file mode 100644
index 0000000000..de27af7850
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.qml
@@ -0,0 +1,1207 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 32
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 48
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 64
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 80
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 96
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 112
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 128
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 144
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 160
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 176
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 192
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 208
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 224
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 240
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 256
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 272
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 288
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 304
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 320
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 336
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 352
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 368
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 384
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 400
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 416
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 432
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 448
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 464
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 480
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 496
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 512
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 528
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 544
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 560
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 576
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 150; y: 274
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 592
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 608
+ hash: "a7bb3d44c8bcf403906afa86f5bc3062"
+ }
+ Frame {
+ msec: 624
+ hash: "2b366e6009e70fa0227a1fee662fe1bf"
+ }
+ Frame {
+ msec: 640
+ hash: "c12869fb8002aa36c3bfad7fd0979240"
+ }
+ Frame {
+ msec: 656
+ hash: "56c583e77b5e0a8707e977dc937c2acf"
+ }
+ Frame {
+ msec: 672
+ hash: "6b191d57a45a3f2d010a7f44064e409a"
+ }
+ Frame {
+ msec: 688
+ hash: "9457ee33c999a63fa4bd4db5c3ceac8b"
+ }
+ Frame {
+ msec: 704
+ hash: "446b23b662640ad6ad8c456f956fe73a"
+ }
+ Frame {
+ msec: 720
+ hash: "23c59708069406486e4979c7d59f3f4a"
+ }
+ Frame {
+ msec: 736
+ hash: "c9ce43ddca79b5b6f26af2c2259dc071"
+ }
+ Frame {
+ msec: 752
+ hash: "e838229ba70c30112918f19bb471fa34"
+ }
+ Frame {
+ msec: 768
+ hash: "0cbaeddb2ff6408a37a68fc685e2bca0"
+ }
+ Frame {
+ msec: 784
+ hash: "616b4ec719586b151ba3d709e51038bf"
+ }
+ Frame {
+ msec: 800
+ hash: "89b2c709f5c3083c204a9450e605c1d4"
+ }
+ Frame {
+ msec: 816
+ hash: "427a5c2d13631d899ff2d673e762f114"
+ }
+ Frame {
+ msec: 832
+ hash: "958aa9ca5a6b91aa6dfbc2a1ae3e2deb"
+ }
+ Frame {
+ msec: 848
+ hash: "09a3ac0010ed8f3df2cfa7ed9d0a92e4"
+ }
+ Frame {
+ msec: 864
+ hash: "5607ea54f9990f3232d6f56080e1ef15"
+ }
+ Frame {
+ msec: 880
+ hash: "600682467c55288b9d5e65299637dd72"
+ }
+ Frame {
+ msec: 896
+ hash: "bc7a238611574a13650f854ceac35032"
+ }
+ Frame {
+ msec: 912
+ hash: "e5f6b19b3685a96d4d0c3b8384513643"
+ }
+ Frame {
+ msec: 928
+ hash: "d5d23b0fc09136fd1ae121e311866cc3"
+ }
+ Frame {
+ msec: 944
+ hash: "5099e5edd1a6bd37f5f6c836a6ca7644"
+ }
+ Frame {
+ msec: 960
+ image: "parentAction.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "97dd20f7774cfd8379e1d1b44f8ddc7b"
+ }
+ Frame {
+ msec: 992
+ hash: "ab2deea9e4f8c43ed58b5a355800ecda"
+ }
+ Frame {
+ msec: 1008
+ hash: "88ec383ce368259d3cc18612b6f5b941"
+ }
+ Frame {
+ msec: 1024
+ hash: "f84b20b849a77e50717f99b9d844240e"
+ }
+ Frame {
+ msec: 1040
+ hash: "6c042360c2d24ad56cec32d01ce82d6b"
+ }
+ Frame {
+ msec: 1056
+ hash: "c86b464720192f3e039fa5d8ab5f09bb"
+ }
+ Frame {
+ msec: 1072
+ hash: "35ec432fdf91fcd1dfcd945cfe785b09"
+ }
+ Frame {
+ msec: 1088
+ hash: "27a2ec28e4fef006622e8211fd709853"
+ }
+ Frame {
+ msec: 1104
+ hash: "8454d1f5ed89551e2a403c869885116a"
+ }
+ Frame {
+ msec: 1120
+ hash: "7e33aed53dc4338c168274d972c8e711"
+ }
+ Frame {
+ msec: 1136
+ hash: "e0192ea2049d6bae6012f00406630a92"
+ }
+ Frame {
+ msec: 1152
+ hash: "a2ea5489a373084169024035a0f69e71"
+ }
+ Frame {
+ msec: 1168
+ hash: "6947a72c4d959b90dafdaddcac815b3e"
+ }
+ Frame {
+ msec: 1184
+ hash: "0e22cc3c96d0934095b7254f0f28b18b"
+ }
+ Frame {
+ msec: 1200
+ hash: "72529ddc6f2678a783aedf445d7038a4"
+ }
+ Frame {
+ msec: 1216
+ hash: "38f03c0ee50488ffd23a2fb3d3445461"
+ }
+ Frame {
+ msec: 1232
+ hash: "b441721ed30c787874a2a71a94e1ba44"
+ }
+ Frame {
+ msec: 1248
+ hash: "1e37f26d78590414b2ef01c72ad136a9"
+ }
+ Frame {
+ msec: 1264
+ hash: "88e4af80d068485ebd8c3d51f9bbfe8d"
+ }
+ Frame {
+ msec: 1280
+ hash: "107707216c16c629d8409cf006f9f2dc"
+ }
+ Frame {
+ msec: 1296
+ hash: "f56f3f4f140ac072f7df47eddfc76844"
+ }
+ Frame {
+ msec: 1312
+ hash: "41239a9d8ed793c24967875aabeae8a5"
+ }
+ Frame {
+ msec: 1328
+ hash: "30035e37320dae4f9ead01a30895eb38"
+ }
+ Frame {
+ msec: 1344
+ hash: "fb2f535b42b862b65f8adb3ad1a46779"
+ }
+ Frame {
+ msec: 1360
+ hash: "e10ba7f74d52fc963e20a4647ff0d620"
+ }
+ Frame {
+ msec: 1376
+ hash: "5abf5388566bed2fdb71afc8cd7cfe9b"
+ }
+ Frame {
+ msec: 1392
+ hash: "91990471563e3c8292e8e8325a1d17a2"
+ }
+ Frame {
+ msec: 1408
+ hash: "59a6293a48f83a9197adcffed3f32f15"
+ }
+ Frame {
+ msec: 1424
+ hash: "db3e75df318e9f0d239ce9b76e92eff3"
+ }
+ Frame {
+ msec: 1440
+ hash: "3b5c64bc64a701edb5c2e40b23443bc3"
+ }
+ Frame {
+ msec: 1456
+ hash: "9db08c0375148b2317427591b5f43608"
+ }
+ Frame {
+ msec: 1472
+ hash: "2d761f1530846eff87a7625a120e0afd"
+ }
+ Frame {
+ msec: 1488
+ hash: "c5460f8c58b83c2ac15842ddb023ad4f"
+ }
+ Frame {
+ msec: 1504
+ hash: "0efb51810a2dc359c7964268c98ea8eb"
+ }
+ Frame {
+ msec: 1520
+ hash: "b92a42012df57eb261badf1f518b8e67"
+ }
+ Frame {
+ msec: 1536
+ hash: "8d348bae62af2d35bdfee806a1c39910"
+ }
+ Frame {
+ msec: 1552
+ hash: "762d9bb4ed11d249bfd902a541129d60"
+ }
+ Frame {
+ msec: 1568
+ hash: "bddbd9f64a9f7156984feccd5fa94093"
+ }
+ Frame {
+ msec: 1584
+ hash: "353a98e1573b0518941ff22bf2776244"
+ }
+ Frame {
+ msec: 1600
+ hash: "1765aed97e29f25dee93a77a06557b82"
+ }
+ Frame {
+ msec: 1616
+ hash: "73b5c2bdb7f268f7a33e129c8ba44013"
+ }
+ Frame {
+ msec: 1632
+ hash: "46ac1976fb9932d0ef6e0b5927386ad9"
+ }
+ Frame {
+ msec: 1648
+ hash: "90b5b5b46c9c352e8be41cc74f96133a"
+ }
+ Frame {
+ msec: 1664
+ hash: "0efe0036577c890fd45cd7dd53014616"
+ }
+ Frame {
+ msec: 1680
+ hash: "7f32df17481abf40ccb33afe6d17085d"
+ }
+ Frame {
+ msec: 1696
+ hash: "1fa8544c48a476764f4f8278c14b651d"
+ }
+ Frame {
+ msec: 1712
+ hash: "f8f06ece30f690deeba5999ce63bf40b"
+ }
+ Frame {
+ msec: 1728
+ hash: "885b230f4b2fe380c7cf68955940d206"
+ }
+ Frame {
+ msec: 1744
+ hash: "d0fc5aa4df46099bb46a1d7db30baa09"
+ }
+ Frame {
+ msec: 1760
+ hash: "8fa7fe5197cbe1ff67f8a2c47f1f0740"
+ }
+ Frame {
+ msec: 1776
+ hash: "aa3b3b03460daf54f085551e1a46c08b"
+ }
+ Frame {
+ msec: 1792
+ hash: "35a1728a2430027a9474fb7d61090643"
+ }
+ Frame {
+ msec: 1808
+ hash: "2b1cff3986b8b03f1061176a4722b0f9"
+ }
+ Frame {
+ msec: 1824
+ hash: "8047be1b35ee3d5078a68c6cdc35eeb7"
+ }
+ Frame {
+ msec: 1840
+ hash: "7f7afa48bb7d612b354c8488e72c8339"
+ }
+ Frame {
+ msec: 1856
+ hash: "691a876caefce9aa0f5140c17059b8f4"
+ }
+ Frame {
+ msec: 1872
+ hash: "903bec66e47db766dc431f060726988c"
+ }
+ Frame {
+ msec: 1888
+ hash: "f13593fc891f0b050c01b61963019da1"
+ }
+ Frame {
+ msec: 1904
+ hash: "aa00de965bdb370a5974b195c3fb38af"
+ }
+ Frame {
+ msec: 1920
+ image: "parentAction.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "168d3e27261c0943e6262b6be27adfb0"
+ }
+ Frame {
+ msec: 1952
+ hash: "6fafebd0b396e7c0a78c767c6af936ba"
+ }
+ Frame {
+ msec: 1968
+ hash: "827e3a3fcd6fd8588e9fcc043769b3a8"
+ }
+ Frame {
+ msec: 1984
+ hash: "155329bf1c1a6f6c37bf7e6e8a92c59b"
+ }
+ Frame {
+ msec: 2000
+ hash: "d3008d1e7cee5170171699ef6fb9aa81"
+ }
+ Frame {
+ msec: 2016
+ hash: "5c1244e7806e131a6063f22a66e4eb12"
+ }
+ Frame {
+ msec: 2032
+ hash: "fcd6b372229a6cf14face81e9d614456"
+ }
+ Frame {
+ msec: 2048
+ hash: "bf1a375a81bf43c5671cccc62e9a0462"
+ }
+ Frame {
+ msec: 2064
+ hash: "0e22404508470baaa6621f37361951fa"
+ }
+ Frame {
+ msec: 2080
+ hash: "45046f28c103caa161e41861f71731c4"
+ }
+ Frame {
+ msec: 2096
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2112
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2128
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2144
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2160
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2176
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2192
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2208
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2224
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2240
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2256
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2272
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2288
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2304
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2320
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2336
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2352
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2368
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2384
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2400
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2416
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2432
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2448
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2464
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2480
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2496
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2512
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2528
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2544
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2560
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2576
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2592
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2608
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2624
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2640
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2656
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2672
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2688
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2704
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2720
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2736
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2752
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 150; y: 274
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2768
+ hash: "7a92731c713470a2b2c91fd6b83447de"
+ }
+ Frame {
+ msec: 2784
+ hash: "44a0b46c21bd4c76d44883ba146e3614"
+ }
+ Frame {
+ msec: 2800
+ hash: "2224abc3333a2bc5fa1cf3c4e8d6a6f9"
+ }
+ Frame {
+ msec: 2816
+ hash: "ea9c05c0295a300e21aacbdfd5b4968e"
+ }
+ Frame {
+ msec: 2832
+ hash: "e630e2893f89a6ae536bcbd1a084af07"
+ }
+ Frame {
+ msec: 2848
+ hash: "af56f1e79eb3746efb9e4bcbc3fbced8"
+ }
+ Frame {
+ msec: 2864
+ hash: "96be8c3ba0d7a85c6f6df877b869b563"
+ }
+ Frame {
+ msec: 2880
+ image: "parentAction.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "603d8684cb6f097e3ab2a2e5ef053112"
+ }
+ Frame {
+ msec: 2912
+ hash: "0433d242d1dd40a3792f55f807ebbff4"
+ }
+ Frame {
+ msec: 2928
+ hash: "1190067cacc7361f6cfe09f153c7a07e"
+ }
+ Frame {
+ msec: 2944
+ hash: "98e917880471511122847ad8a406e3a3"
+ }
+ Frame {
+ msec: 2960
+ hash: "fff06869074a3a6c5823ed3fb6fa7a43"
+ }
+ Frame {
+ msec: 2976
+ hash: "602d95daee8f160a0fd784931d0a06bd"
+ }
+ Frame {
+ msec: 2992
+ hash: "f7e466bbd52f40e88ff567758f4db835"
+ }
+ Frame {
+ msec: 3008
+ hash: "54417a4c4fb71d458439ad2e2126f8e1"
+ }
+ Frame {
+ msec: 3024
+ hash: "fe150dd5056b9dbf1cd0b196e9a7a47b"
+ }
+ Frame {
+ msec: 3040
+ hash: "1384c871bead85916f7bfcdebc370697"
+ }
+ Frame {
+ msec: 3056
+ hash: "5f13339cc0e604b75a9d1d85342fa717"
+ }
+ Frame {
+ msec: 3072
+ hash: "655069d61b7a44e729a2cbb33d683c3e"
+ }
+ Frame {
+ msec: 3088
+ hash: "2324e9e4a02e41855b066983dbf0e61d"
+ }
+ Frame {
+ msec: 3104
+ hash: "0217baf091325b95c033ba073bd68ce5"
+ }
+ Frame {
+ msec: 3120
+ hash: "c27854c3af5b58db85846a1762ab18ba"
+ }
+ Frame {
+ msec: 3136
+ hash: "45246ee6383ceb6260f84571a885ba90"
+ }
+ Frame {
+ msec: 3152
+ hash: "d82ded86f093d1a376994cacf43d0343"
+ }
+ Frame {
+ msec: 3168
+ hash: "c9179d30f80c6101bca2bed40d6a859f"
+ }
+ Frame {
+ msec: 3184
+ hash: "a63e032d20a9d985c6c345434d98a364"
+ }
+ Frame {
+ msec: 3200
+ hash: "fc7d6797ce15edf7fadb9dae691ecd5c"
+ }
+ Frame {
+ msec: 3216
+ hash: "76cf37ad8c50fed8b1900784b647819c"
+ }
+ Frame {
+ msec: 3232
+ hash: "256aab3690c9ba928bb4d4dd3bbfc756"
+ }
+ Frame {
+ msec: 3248
+ hash: "90cab52fdefbae4e7d0f0f93b46ebeb0"
+ }
+ Frame {
+ msec: 3264
+ hash: "badb5103bf826dc467f6e620cc2b47be"
+ }
+ Frame {
+ msec: 3280
+ hash: "e7d0e437de5ebc0fa07b2a4ef11159cb"
+ }
+ Frame {
+ msec: 3296
+ hash: "5931b1c3932ab91446324165d7e2603a"
+ }
+ Frame {
+ msec: 3312
+ hash: "ce1808db90ba955ab3cb845500f4c013"
+ }
+ Frame {
+ msec: 3328
+ hash: "142f8a440d1fe2d868f47ba3006de9d7"
+ }
+ Frame {
+ msec: 3344
+ hash: "10d32a6cc90319ea66d7f2c1241590ce"
+ }
+ Frame {
+ msec: 3360
+ hash: "7f633559d715396e6de451b3dd2fadbd"
+ }
+ Frame {
+ msec: 3376
+ hash: "d44590ae51ceef5e082747c44bc41be9"
+ }
+ Frame {
+ msec: 3392
+ hash: "2b498181668fb1fbf65294d575654929"
+ }
+ Frame {
+ msec: 3408
+ hash: "7efeeffd08e4de440da83511313de729"
+ }
+ Frame {
+ msec: 3424
+ hash: "8de2331393d1e712192d11ed096836d3"
+ }
+ Frame {
+ msec: 3440
+ hash: "fa9381ef2e295865a9b8cb9b36a0eacf"
+ }
+ Frame {
+ msec: 3456
+ hash: "97debc4432c5ecb7f606a81e5411b02c"
+ }
+ Frame {
+ msec: 3472
+ hash: "eb4c1bb1f4398e3c18182c28a015be76"
+ }
+ Frame {
+ msec: 3488
+ hash: "a976aa509f4c6f309d9a6011eeae02aa"
+ }
+ Frame {
+ msec: 3504
+ hash: "457de7ee05e0ef0ef120a3d4e371c02e"
+ }
+ Frame {
+ msec: 3520
+ hash: "0c01f9f150fe33155fa20703735a6d27"
+ }
+ Frame {
+ msec: 3536
+ hash: "5af4f80624082a264010247ea8630a1a"
+ }
+ Frame {
+ msec: 3552
+ hash: "b23a1191d149549fa29a61b6dc70f037"
+ }
+ Frame {
+ msec: 3568
+ hash: "e00fb32cb13b1347e4b7b9fdbcca68e5"
+ }
+ Frame {
+ msec: 3584
+ hash: "fef0503c82f253f8bc3fb3e705a98aa7"
+ }
+ Frame {
+ msec: 3600
+ hash: "7a9beca28340d2aa89da5e05f5ac2a55"
+ }
+ Frame {
+ msec: 3616
+ hash: "f3c57ea07ab486ffa1f46da60de0b8f1"
+ }
+ Frame {
+ msec: 3632
+ hash: "ef0a4ad9ac339fd6ea50dbe6baa9387f"
+ }
+ Frame {
+ msec: 3648
+ hash: "1b317a9eb4ce022f005d551546c688a4"
+ }
+ Frame {
+ msec: 3664
+ hash: "628e912a4a26800b9b7b5e60e60e3a7d"
+ }
+ Frame {
+ msec: 3680
+ hash: "3587b75e4d834a88729754d2c2a4b193"
+ }
+ Frame {
+ msec: 3696
+ hash: "084bc1360a38123589baec5aae15b4ff"
+ }
+ Frame {
+ msec: 3712
+ hash: "47f0f6c3cdf456826a6fd6846e58dcc8"
+ }
+ Frame {
+ msec: 3728
+ hash: "ed982c4c3ebd132baaaf43efad40a3f7"
+ }
+ Frame {
+ msec: 3744
+ hash: "d7ddce47c23fada4c69d53d934582d71"
+ }
+ Frame {
+ msec: 3760
+ hash: "74f2f911bee26c4c551f4c70596753ae"
+ }
+ Frame {
+ msec: 3776
+ hash: "3ed7cbf10dfce3a485d7878766cf9da6"
+ }
+ Frame {
+ msec: 3792
+ hash: "87a74257551ab6c7fcfe05e815482ae9"
+ }
+ Frame {
+ msec: 3808
+ hash: "4f63e4904e97d4ce832b20b7317a9958"
+ }
+ Frame {
+ msec: 3824
+ hash: "f912da8781e547c6e28890655c1b8884"
+ }
+ Frame {
+ msec: 3840
+ image: "parentAction.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "faa640ccf993324400254ffb862ac279"
+ }
+ Frame {
+ msec: 3872
+ hash: "b67f342424d1b9a364b09da8994fcd6b"
+ }
+ Frame {
+ msec: 3888
+ hash: "b2407732194c1e0c2a9bfb379b94b562"
+ }
+ Frame {
+ msec: 3904
+ hash: "55733608d0302ef90c124322ac6d8dc6"
+ }
+ Frame {
+ msec: 3920
+ hash: "734f5b628a26d3d7c91ee84fb26d5b5f"
+ }
+ Frame {
+ msec: 3936
+ hash: "27839fefa4a218cd77843358392bb874"
+ }
+ Frame {
+ msec: 3952
+ hash: "8cac19559d37bd2b581cef0a4c707753"
+ }
+ Frame {
+ msec: 3968
+ hash: "91422870aa1471571e7dd8ff5103f76c"
+ }
+ Frame {
+ msec: 3984
+ hash: "7156166d5f8d13483467ef515627c95d"
+ }
+ Frame {
+ msec: 4000
+ hash: "6028e8374c2ce42a9a9e85b4a8b53027"
+ }
+ Frame {
+ msec: 4016
+ hash: "17c99592be58d2e03f9f173c47c0649b"
+ }
+ Frame {
+ msec: 4032
+ hash: "6084b53186c6a7eda38ac7fa34bf45ce"
+ }
+ Frame {
+ msec: 4048
+ hash: "e82131a8a5a06519f49308bbc25738cf"
+ }
+ Frame {
+ msec: 4064
+ hash: "77bdb69cbe55d9c503c6aa1c0f974d87"
+ }
+ Frame {
+ msec: 4080
+ hash: "b2346ec5d376651347281d5fb00fc4d7"
+ }
+ Frame {
+ msec: 4096
+ hash: "36a3b72c9d7f09795c546855a269801d"
+ }
+ Frame {
+ msec: 4112
+ hash: "4e5478b33baca797f3f8f72c2c6c51ad"
+ }
+ Frame {
+ msec: 4128
+ hash: "e59d12be3ed1f58de010d385ddfe78e5"
+ }
+ Frame {
+ msec: 4144
+ hash: "9674106a146effd47c2724a2dd82ae84"
+ }
+ Frame {
+ msec: 4160
+ hash: "862cec781f169f713032e6d52d3616ce"
+ }
+ Frame {
+ msec: 4176
+ hash: "c8d47bdfb6518ef4827677023313d559"
+ }
+ Frame {
+ msec: 4192
+ hash: "19413931b3e788067dfaef39b47d30ff"
+ }
+ Frame {
+ msec: 4208
+ hash: "600e426532c0348cd622257b0773efd5"
+ }
+ Frame {
+ msec: 4224
+ hash: "6d975e259d4efa108375d271451531c1"
+ }
+ Frame {
+ msec: 4240
+ hash: "50b0da4848564c063694202ce16ea808"
+ }
+ Frame {
+ msec: 4256
+ hash: "0a9450739031f680735b5210e6a30c3f"
+ }
+ Frame {
+ msec: 4272
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4288
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4304
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4320
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4336
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4352
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4368
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4384
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4400
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4416
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4432
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4448
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4464
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4480
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4496
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4512
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4528
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4544
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4560
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4576
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4592
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4608
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4624
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4640
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4656
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4672
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4688
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+ Frame {
+ msec: 4704
+ hash: "23ce049cd7e715c28f5845fd1a1fc195"
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/parentAction/parentAction.qml b/tests/auto/declarative/visual/animation/parentAction/parentAction.qml
new file mode 100644
index 0000000000..eb3103e55a
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAction/parentAction.qml
@@ -0,0 +1,55 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400; height: 400
+ Item {
+ scale: .5
+ rotation: 15
+ transformOrigin: "Center"
+ x: 10; y: 10
+ Rectangle {
+ id: myRect
+ x: 5
+ width: 100; height: 100
+ transformOrigin: "BottomLeft"
+ color: "red"
+ }
+ }
+ MouseArea {
+ id: clickable
+ anchors.fill: parent
+ }
+
+ Item {
+ x: 200; y: 200
+ rotation: 52;
+ scale: 2
+ Item {
+ id: newParent
+ x: 100; y: 100
+ }
+ }
+
+ states: State {
+ name: "moved"
+ when: clickable.pressed
+ ParentChange {
+ target: myRect
+ parent: newParent
+ }
+ PropertyChanges {
+ target: myRect
+ rotation: -52
+ scale: 1
+ color: "blue"
+ }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ ColorAnimation { duration: 500}
+ ParentAction {}
+ NumberAnimation { properties: "rotation, scale"; duration: 1000 }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.0.png b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.0.png
new file mode 100644
index 0000000000..7d41abcca0
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.1.png b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.1.png
new file mode 100644
index 0000000000..16b95ab3da
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.2.png b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.2.png
new file mode 100644
index 0000000000..7d41abcca0
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.3.png b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.3.png
new file mode 100644
index 0000000000..800bf12b5a
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.4.png b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.4.png
new file mode 100644
index 0000000000..d0155bbb81
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.5.png b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.5.png
new file mode 100644
index 0000000000..7d41abcca0
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.qml b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.qml
new file mode 100644
index 0000000000..57185604aa
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAnimation/data/parentAnimation.qml
@@ -0,0 +1,1663 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 32
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 48
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 64
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 80
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 96
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 112
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 128
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 144
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 160
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 176
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 192
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 208
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 224
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 240
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 256
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 272
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 288
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 304
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 320
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 336
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 352
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 368
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 384
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 400
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 416
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 432
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 448
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 464
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 480
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 496
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 512
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 528
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 544
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 560
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 576
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 592
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 608
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 624
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 640
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 656
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 672
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 688
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 704
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 720
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 736
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 752
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 768
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 784
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 800
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 816
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 832
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 848
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 864
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 880
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 896
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 912
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 928
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 944
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 960
+ image: "parentAnimation.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 992
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1008
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1024
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1040
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1056
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1072
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1088
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1104
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1120
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1136
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1152
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1168
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1184
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1200
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1216
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1232
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1248
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1264
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1280
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1296
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1312
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1328
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1344
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1360
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1376
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1392
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1408
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1424
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1440
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1456
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1472
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1488
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1504
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1520
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1536
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1552
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 1568
+ hash: "633b5668278295faa57d0cfffe8a29cb"
+ }
+ Frame {
+ msec: 1584
+ hash: "ccbf4505e0f05547d2f7ce874ab941c0"
+ }
+ Frame {
+ msec: 1600
+ hash: "be904489959fa365badb642fa9e85922"
+ }
+ Frame {
+ msec: 1616
+ hash: "de6a97ac6e2677feb223336199cbffe1"
+ }
+ Frame {
+ msec: 1632
+ hash: "997b0a547336a9bb6a67cd9beffe1831"
+ }
+ Frame {
+ msec: 1648
+ hash: "ac9a6e111050b8a7c4492f06c33d3969"
+ }
+ Frame {
+ msec: 1664
+ hash: "7313c0d2ee06e393f486670222c29bb4"
+ }
+ Frame {
+ msec: 1680
+ hash: "24cea420d03d1fdcddb1b9cf5112cbee"
+ }
+ Frame {
+ msec: 1696
+ hash: "764688785eeaa01e9c84821476911edb"
+ }
+ Frame {
+ msec: 1712
+ hash: "b24ae0cb512abfd2606ff9c20a6751bf"
+ }
+ Frame {
+ msec: 1728
+ hash: "f1daed3391f10e27435a54222df8d0ab"
+ }
+ Frame {
+ msec: 1744
+ hash: "99704e182267f2c12d0215b9c03f4d68"
+ }
+ Frame {
+ msec: 1760
+ hash: "143cd9259a41b8af5d41a5b2aaf8de64"
+ }
+ Frame {
+ msec: 1776
+ hash: "b5f0a0f838b5870c162a24cd767f068b"
+ }
+ Frame {
+ msec: 1792
+ hash: "c5c8cdcbfab7466e447eaff582bf7312"
+ }
+ Frame {
+ msec: 1808
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1824
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1840
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1856
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1872
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1888
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1904
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1920
+ image: "parentAnimation.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1952
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1968
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 1984
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2000
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2016
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2032
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2048
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2064
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2080
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2096
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2112
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2128
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2144
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2160
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2176
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2192
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2208
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2224
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2240
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2256
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2272
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2288
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2304
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2320
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2336
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2352
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2368
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2384
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2400
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2416
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2432
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2448
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2464
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2480
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2496
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 2512
+ hash: "eaeeb8c51d43e3c38ff7dde632d1f9c8"
+ }
+ Frame {
+ msec: 2528
+ hash: "ec0e68c2e7a75fedd1091ce633dadd4f"
+ }
+ Frame {
+ msec: 2544
+ hash: "a5d60efc176dee9083a2d746e7ad8315"
+ }
+ Frame {
+ msec: 2560
+ hash: "48bcbbacf413080247f818e35e496e04"
+ }
+ Frame {
+ msec: 2576
+ hash: "c521af8efa19fbac39119ad75cd469f5"
+ }
+ Frame {
+ msec: 2592
+ hash: "0e74613c67fc9d9acb21a3d382c5efcd"
+ }
+ Frame {
+ msec: 2608
+ hash: "eeb3f4467ebd7ee678c3b7371db28519"
+ }
+ Frame {
+ msec: 2624
+ hash: "9c5b9009a35b74d0ddec8fec85f204bf"
+ }
+ Frame {
+ msec: 2640
+ hash: "aefc70824e23428aebf0a40830a57469"
+ }
+ Frame {
+ msec: 2656
+ hash: "1fa9c23760193b74b0063b4e4c434070"
+ }
+ Frame {
+ msec: 2672
+ hash: "8091700d4729163bd87521385853e608"
+ }
+ Frame {
+ msec: 2688
+ hash: "a13558e609570f9390f20a85d244fa22"
+ }
+ Frame {
+ msec: 2704
+ hash: "7be5e3609bbeb9a2c1df7d52f3953d4d"
+ }
+ Frame {
+ msec: 2720
+ hash: "51c8ae31f858121d86ef09cc9a5c5ef3"
+ }
+ Frame {
+ msec: 2736
+ hash: "84ce8f39207f4b07c2c3323425a8c238"
+ }
+ Frame {
+ msec: 2752
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2768
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2784
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2800
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2816
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2832
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2848
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2864
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2880
+ image: "parentAnimation.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2912
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2928
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2944
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2960
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2976
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 2992
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3008
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3024
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3040
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3056
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3072
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3088
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3104
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3120
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3136
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3152
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3168
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3184
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3200
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3216
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3232
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3248
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3264
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3280
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3296
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3312
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3328
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3344
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3360
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3376
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3392
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 3408
+ hash: "633b5668278295faa57d0cfffe8a29cb"
+ }
+ Frame {
+ msec: 3424
+ hash: "ccbf4505e0f05547d2f7ce874ab941c0"
+ }
+ Frame {
+ msec: 3440
+ hash: "be904489959fa365badb642fa9e85922"
+ }
+ Frame {
+ msec: 3456
+ hash: "de6a97ac6e2677feb223336199cbffe1"
+ }
+ Frame {
+ msec: 3472
+ hash: "997b0a547336a9bb6a67cd9beffe1831"
+ }
+ Frame {
+ msec: 3488
+ hash: "ac9a6e111050b8a7c4492f06c33d3969"
+ }
+ Frame {
+ msec: 3504
+ hash: "7313c0d2ee06e393f486670222c29bb4"
+ }
+ Frame {
+ msec: 3520
+ hash: "24cea420d03d1fdcddb1b9cf5112cbee"
+ }
+ Frame {
+ msec: 3536
+ hash: "764688785eeaa01e9c84821476911edb"
+ }
+ Frame {
+ msec: 3552
+ hash: "b24ae0cb512abfd2606ff9c20a6751bf"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3568
+ hash: "b24ae0cb512abfd2606ff9c20a6751bf"
+ }
+ Frame {
+ msec: 3584
+ hash: "d7bf1b48f1a03974e7f095468e07f037"
+ }
+ Frame {
+ msec: 3600
+ hash: "a59ab4fe1c22d27b5cdde949cf90e6f4"
+ }
+ Frame {
+ msec: 3616
+ hash: "7c3082720e65b8a6217bf5a5fe4d48c0"
+ }
+ Frame {
+ msec: 3632
+ hash: "350d1ff24fb8fba0ab8a6694d99544b3"
+ }
+ Frame {
+ msec: 3648
+ hash: "81d17a62c33d79ed25968ec47771d292"
+ }
+ Frame {
+ msec: 3664
+ hash: "43fd3ef88bd7a2e5bf4546f088783077"
+ }
+ Frame {
+ msec: 3680
+ hash: "041938ad2e023202db18df28f2329c8f"
+ }
+ Frame {
+ msec: 3696
+ hash: "ec8677eae06cbf77a9508953325b179e"
+ }
+ Mouse {
+ type: 4
+ button: 1
+ buttons: 1
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3712
+ hash: "ec8677eae06cbf77a9508953325b179e"
+ }
+ Frame {
+ msec: 3728
+ hash: "453026339c3901ee286831b4b41088f6"
+ }
+ Frame {
+ msec: 3744
+ hash: "d58a7a41ade691cc0acfb0303bfc3b68"
+ }
+ Frame {
+ msec: 3760
+ hash: "a200b05ef3d7e39e11513fd2f8ff1497"
+ }
+ Frame {
+ msec: 3776
+ hash: "faa1223975acdf2d4b48045d7f2ce445"
+ }
+ Frame {
+ msec: 3792
+ hash: "964d9b80d82d0fe3d3fb328a1661a60e"
+ }
+ Frame {
+ msec: 3808
+ hash: "705871bc384de93100354acb19b371b0"
+ }
+ Frame {
+ msec: 3824
+ hash: "1a4480463adfc5a3d525916b03c2c3ce"
+ }
+ Frame {
+ msec: 3840
+ image: "parentAnimation.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "9a55bdf428f45f02d9c8cf414dcd7754"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3872
+ hash: "9a55bdf428f45f02d9c8cf414dcd7754"
+ }
+ Frame {
+ msec: 3888
+ hash: "0f6d82d02ce7d79a1bdf6bf81791f321"
+ }
+ Frame {
+ msec: 3904
+ hash: "b145b9d299714020686069baec11cb71"
+ }
+ Frame {
+ msec: 3920
+ hash: "5dbf5e4151c01f10cf23b07ca1df56ab"
+ }
+ Frame {
+ msec: 3936
+ hash: "822d4397ac514673ca1015ad05c9b4ac"
+ }
+ Frame {
+ msec: 3952
+ hash: "461d35e865153d22e9a67bb0ffddefb7"
+ }
+ Frame {
+ msec: 3968
+ hash: "676fff498e6879144090d5596056c6c8"
+ }
+ Frame {
+ msec: 3984
+ hash: "854da7ed627237250e20b263f9eb9d90"
+ }
+ Frame {
+ msec: 4000
+ hash: "157ec877797883d329ff329537205d02"
+ }
+ Frame {
+ msec: 4016
+ hash: "613669ca60240fcc490d548fe802390d"
+ }
+ Frame {
+ msec: 4032
+ hash: "803e84f027c773db96f9530511e5fedb"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4048
+ hash: "803e84f027c773db96f9530511e5fedb"
+ }
+ Frame {
+ msec: 4064
+ hash: "f47cfd1f1094b782c08490be2f49c6ed"
+ }
+ Frame {
+ msec: 4080
+ hash: "db5953f3ee4e2db87e33b85464167f74"
+ }
+ Frame {
+ msec: 4096
+ hash: "8313cb750b9abc586a43b9422de08f53"
+ }
+ Frame {
+ msec: 4112
+ hash: "deb390ce992fee85c56733168b4bd1ec"
+ }
+ Frame {
+ msec: 4128
+ hash: "29a1cda3647c49731e9adcd107a2d13c"
+ }
+ Frame {
+ msec: 4144
+ hash: "bfa17a3afa06699107b217df6e4aed43"
+ }
+ Frame {
+ msec: 4160
+ hash: "8e639ef01ab6d8876c3f40adc44928c6"
+ }
+ Frame {
+ msec: 4176
+ hash: "14038aedf42de0ca62d872d317018ee0"
+ }
+ Frame {
+ msec: 4192
+ hash: "c1288465163d44ed40e28f21e0298ea6"
+ }
+ Frame {
+ msec: 4208
+ hash: "d6915f22a905737488d27e8138002f31"
+ }
+ Frame {
+ msec: 4224
+ hash: "5b1621451a5a3af40302603ec31bb8bb"
+ }
+ Frame {
+ msec: 4240
+ hash: "16fd73c0cb615cc717cdc4a6787471c2"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4256
+ hash: "16fd73c0cb615cc717cdc4a6787471c2"
+ }
+ Frame {
+ msec: 4272
+ hash: "db5caf42e11705ecdb2006e1ed6b0c4f"
+ }
+ Frame {
+ msec: 4288
+ hash: "4b7e51e4e9fb1dacb32aac11a4a46ceb"
+ }
+ Frame {
+ msec: 4304
+ hash: "63c93cda9892f733809125991af997b6"
+ }
+ Frame {
+ msec: 4320
+ hash: "0e74613c67fc9d9acb21a3d382c5efcd"
+ }
+ Frame {
+ msec: 4336
+ hash: "58e813a6619828b6c9ec9cf300ff0e2d"
+ }
+ Frame {
+ msec: 4352
+ hash: "181a6e334d745381f091bf1b55fc1690"
+ }
+ Frame {
+ msec: 4368
+ hash: "f25bbc9ddc8cc72036c49d50b45bece8"
+ }
+ Frame {
+ msec: 4384
+ hash: "88e8f0496debfee6bc2426895fe1c3d9"
+ }
+ Frame {
+ msec: 4400
+ hash: "db5953f3ee4e2db87e33b85464167f74"
+ }
+ Frame {
+ msec: 4416
+ hash: "9818a899adb916b6ba5f7537697ef062"
+ }
+ Frame {
+ msec: 4432
+ hash: "3842f40093d70089a4004fb803c05981"
+ }
+ Frame {
+ msec: 4448
+ hash: "be904489959fa365badb642fa9e85922"
+ }
+ Frame {
+ msec: 4464
+ hash: "cbae27751ff0ebce4fcc164564f4cf1b"
+ }
+ Frame {
+ msec: 4480
+ hash: "3a1b468bd3fd747bbe6b069426b170a9"
+ }
+ Frame {
+ msec: 4496
+ hash: "57fbcd580eb1607a2a7526a65842dfeb"
+ }
+ Frame {
+ msec: 4512
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 4528
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 4544
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 4560
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 4576
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 4592
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 4608
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 4624
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4640
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 4656
+ hash: "633b5668278295faa57d0cfffe8a29cb"
+ }
+ Frame {
+ msec: 4672
+ hash: "ccbf4505e0f05547d2f7ce874ab941c0"
+ }
+ Frame {
+ msec: 4688
+ hash: "be904489959fa365badb642fa9e85922"
+ }
+ Frame {
+ msec: 4704
+ hash: "de6a97ac6e2677feb223336199cbffe1"
+ }
+ Frame {
+ msec: 4720
+ hash: "997b0a547336a9bb6a67cd9beffe1831"
+ }
+ Frame {
+ msec: 4736
+ hash: "ac9a6e111050b8a7c4492f06c33d3969"
+ }
+ Frame {
+ msec: 4752
+ hash: "7313c0d2ee06e393f486670222c29bb4"
+ }
+ Frame {
+ msec: 4768
+ hash: "24cea420d03d1fdcddb1b9cf5112cbee"
+ }
+ Frame {
+ msec: 4784
+ hash: "764688785eeaa01e9c84821476911edb"
+ }
+ Frame {
+ msec: 4800
+ image: "parentAnimation.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "f1daed3391f10e27435a54222df8d0ab"
+ }
+ Frame {
+ msec: 4832
+ hash: "99704e182267f2c12d0215b9c03f4d68"
+ }
+ Frame {
+ msec: 4848
+ hash: "143cd9259a41b8af5d41a5b2aaf8de64"
+ }
+ Frame {
+ msec: 4864
+ hash: "b5f0a0f838b5870c162a24cd767f068b"
+ }
+ Frame {
+ msec: 4880
+ hash: "c5c8cdcbfab7466e447eaff582bf7312"
+ }
+ Frame {
+ msec: 4896
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 4912
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 4928
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 4944
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 4960
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 4976
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 4992
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5008
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5024
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5040
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5056
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5072
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5088
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5104
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5120
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5136
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5152
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5168
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5184
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5200
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5216
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5232
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5248
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5264
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5280
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5296
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5312
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5328
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5344
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 237; y: 299
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5360
+ hash: "f1bc451d1f62cfb5dd60a7ea483d3844"
+ }
+ Frame {
+ msec: 5376
+ hash: "eaeeb8c51d43e3c38ff7dde632d1f9c8"
+ }
+ Frame {
+ msec: 5392
+ hash: "ec0e68c2e7a75fedd1091ce633dadd4f"
+ }
+ Frame {
+ msec: 5408
+ hash: "a5d60efc176dee9083a2d746e7ad8315"
+ }
+ Frame {
+ msec: 5424
+ hash: "48bcbbacf413080247f818e35e496e04"
+ }
+ Frame {
+ msec: 5440
+ hash: "c521af8efa19fbac39119ad75cd469f5"
+ }
+ Frame {
+ msec: 5456
+ hash: "0e74613c67fc9d9acb21a3d382c5efcd"
+ }
+ Frame {
+ msec: 5472
+ hash: "eeb3f4467ebd7ee678c3b7371db28519"
+ }
+ Frame {
+ msec: 5488
+ hash: "9c5b9009a35b74d0ddec8fec85f204bf"
+ }
+ Frame {
+ msec: 5504
+ hash: "aefc70824e23428aebf0a40830a57469"
+ }
+ Frame {
+ msec: 5520
+ hash: "1fa9c23760193b74b0063b4e4c434070"
+ }
+ Frame {
+ msec: 5536
+ hash: "8091700d4729163bd87521385853e608"
+ }
+ Frame {
+ msec: 5552
+ hash: "a13558e609570f9390f20a85d244fa22"
+ }
+ Frame {
+ msec: 5568
+ hash: "7be5e3609bbeb9a2c1df7d52f3953d4d"
+ }
+ Frame {
+ msec: 5584
+ hash: "51c8ae31f858121d86ef09cc9a5c5ef3"
+ }
+ Frame {
+ msec: 5600
+ hash: "84ce8f39207f4b07c2c3323425a8c238"
+ }
+ Frame {
+ msec: 5616
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5632
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5648
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5664
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5680
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5696
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5712
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5728
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5744
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5760
+ image: "parentAnimation.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5792
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5808
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5824
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5840
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5856
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5872
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5888
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5904
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5920
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5936
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5952
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5968
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 5984
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6000
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6016
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6032
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6048
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6064
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6080
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6096
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6112
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6128
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6144
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6160
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6176
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6192
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6208
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6224
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6240
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6256
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+ Frame {
+ msec: 6272
+ hash: "4135271d78a5c63c3837a09c86f35ebe"
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/parentAnimation/parentAnimation.qml b/tests/auto/declarative/visual/animation/parentAnimation/parentAnimation.qml
new file mode 100644
index 0000000000..1833cf005a
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/parentAnimation/parentAnimation.qml
@@ -0,0 +1,58 @@
+import Qt 4.6
+Rectangle {
+ width: 800;
+ height: 480;
+ color: "black";
+
+ Rectangle {
+ id: gr
+ color: "green"
+ width: 100; height: 100
+ }
+
+ MouseRegion {
+ id: mouser
+ anchors.fill: parent
+ }
+
+ Rectangle {
+ id: np
+ x: 300
+ width: 300; height: 300
+ color: "yellow"
+ clip: true
+ Rectangle {
+ color: "red"
+ x: 100; y: 100; height: 100; width: 100
+ }
+
+ }
+
+ Rectangle {
+ id: vp
+ x: 200; y: 200
+ width: 100; height: 100
+ color: "blue"
+ rotation: 45
+ scale: 2
+ }
+
+ states: State {
+ name: "state1"
+ when: mouser.pressed
+ ParentChange {
+ target: gr
+ parent: np
+ x: 100; y: 100; width: 200;
+ }
+ }
+
+ transitions: Transition {
+ reversible: true
+ to: "state1"
+ ParentAnimation {
+ target: gr; via: vp;
+ NumberAnimation { properties: "x,y,rotation,scale,width" }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.0.png b/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.0.png
new file mode 100644
index 0000000000..693a7941c7
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.1.png b/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.1.png
new file mode 100644
index 0000000000..06d43f12c6
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.2.png b/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.2.png
new file mode 100644
index 0000000000..e619baf4f1
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.3.png b/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.3.png
new file mode 100644
index 0000000000..30c7671c32
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.4.png b/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.4.png
new file mode 100644
index 0000000000..132803cbc0
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.5.png b/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.5.png
new file mode 100644
index 0000000000..8372bc30b2
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.qml b/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.qml
new file mode 100644
index 0000000000..73c6542c04
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/pauseAnimation/data/pauseAnimation.qml
@@ -0,0 +1,1619 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 32
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 48
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 64
+ hash: "dcf2867c127e041970047ec8f3edc04f"
+ }
+ Frame {
+ msec: 80
+ hash: "41ba853c3403f68a23e708df82e21c53"
+ }
+ Frame {
+ msec: 96
+ hash: "a725b59b4947357546bbfc7df3d830af"
+ }
+ Frame {
+ msec: 112
+ hash: "336d31586171f22d541b989d24b95cbb"
+ }
+ Frame {
+ msec: 128
+ hash: "6d63fb5c8a80f0280e88b2cdf8641bb9"
+ }
+ Frame {
+ msec: 144
+ hash: "ef8941674cb61f54853dc33652bb854e"
+ }
+ Frame {
+ msec: 160
+ hash: "b3f4a2165ec1ee971542b8ef89656cea"
+ }
+ Frame {
+ msec: 176
+ hash: "af3120fe262d2489c0ed33fbbee1549f"
+ }
+ Frame {
+ msec: 192
+ hash: "1373545e43fff7251cec9e8375ea267f"
+ }
+ Frame {
+ msec: 208
+ hash: "21f0b0437a999bbde66a913032d495c2"
+ }
+ Frame {
+ msec: 224
+ hash: "0809d32d5bc1bfce199b1f39a1c68d4f"
+ }
+ Frame {
+ msec: 240
+ hash: "022137587b39f5123835482178a1f1cf"
+ }
+ Frame {
+ msec: 256
+ hash: "97566ce9558d13ea0780bce233097b27"
+ }
+ Frame {
+ msec: 272
+ hash: "96d79b07da105b7f631ed61582b26f7e"
+ }
+ Frame {
+ msec: 288
+ hash: "f4732ff2df93fe67cb850dec34184924"
+ }
+ Frame {
+ msec: 304
+ hash: "054e6e52f74a3e24f04e6ad0071f79f8"
+ }
+ Frame {
+ msec: 320
+ hash: "f541af93a9fde62e4bd1c91d30f91e65"
+ }
+ Frame {
+ msec: 336
+ hash: "c4f844ee71f23635bb3ec7375f6a134f"
+ }
+ Frame {
+ msec: 352
+ hash: "3e52e06db2bf78762bb9816fe6b105d9"
+ }
+ Frame {
+ msec: 368
+ hash: "d9604be23a91327e6ab454609a9d4a13"
+ }
+ Frame {
+ msec: 384
+ hash: "dc98a9bdd99367c1e9b838d4be489dcc"
+ }
+ Frame {
+ msec: 400
+ hash: "e87b00bfc2c2a75a4234ec02a057ad3a"
+ }
+ Frame {
+ msec: 416
+ hash: "5be4f5c67941efb6fcea363c79f1e321"
+ }
+ Frame {
+ msec: 432
+ hash: "6cc9de62a0c8fa5e42eac1b01e99ac32"
+ }
+ Frame {
+ msec: 448
+ hash: "62a7133012348f2ec3a388fb685ecc3f"
+ }
+ Frame {
+ msec: 464
+ hash: "4ac43a03cc6f2020ab5f894d704092ac"
+ }
+ Frame {
+ msec: 480
+ hash: "c1a7b7d6d64ac5584c073c2881290696"
+ }
+ Frame {
+ msec: 496
+ hash: "29ece1bca4d21fb5862091317d430a13"
+ }
+ Frame {
+ msec: 512
+ hash: "29ece1bca4d21fb5862091317d430a13"
+ }
+ Frame {
+ msec: 528
+ hash: "29ece1bca4d21fb5862091317d430a13"
+ }
+ Frame {
+ msec: 544
+ hash: "29ece1bca4d21fb5862091317d430a13"
+ }
+ Frame {
+ msec: 560
+ hash: "29ece1bca4d21fb5862091317d430a13"
+ }
+ Frame {
+ msec: 576
+ hash: "c1a7b7d6d64ac5584c073c2881290696"
+ }
+ Frame {
+ msec: 592
+ hash: "c1a7b7d6d64ac5584c073c2881290696"
+ }
+ Frame {
+ msec: 608
+ hash: "4ac43a03cc6f2020ab5f894d704092ac"
+ }
+ Frame {
+ msec: 624
+ hash: "4ac43a03cc6f2020ab5f894d704092ac"
+ }
+ Frame {
+ msec: 640
+ hash: "ffd39c1122fe2f7877ef30591b539b40"
+ }
+ Frame {
+ msec: 656
+ hash: "62a7133012348f2ec3a388fb685ecc3f"
+ }
+ Frame {
+ msec: 672
+ hash: "45281a70021f81dbef30334b1480da1b"
+ }
+ Frame {
+ msec: 688
+ hash: "6cc9de62a0c8fa5e42eac1b01e99ac32"
+ }
+ Frame {
+ msec: 704
+ hash: "79ec710576427df73dd03f39fba6e2eb"
+ }
+ Frame {
+ msec: 720
+ hash: "5be4f5c67941efb6fcea363c79f1e321"
+ }
+ Frame {
+ msec: 736
+ hash: "7d9096b1eb940c82a37baf39ef3ccf3e"
+ }
+ Frame {
+ msec: 752
+ hash: "e87b00bfc2c2a75a4234ec02a057ad3a"
+ }
+ Frame {
+ msec: 768
+ hash: "da60100dc55023c3bab367d97c8f6a85"
+ }
+ Frame {
+ msec: 784
+ hash: "dc98a9bdd99367c1e9b838d4be489dcc"
+ }
+ Frame {
+ msec: 800
+ hash: "3f869538028a09020d5e8f528f4fb119"
+ }
+ Frame {
+ msec: 816
+ hash: "9650fd0364c01b11e4f5dcce51d008af"
+ }
+ Frame {
+ msec: 832
+ hash: "2cb09d9655ecc30ae6a591b28c0d355c"
+ }
+ Frame {
+ msec: 848
+ hash: "4db9bc6c11caf1d77794c2eabb62a44e"
+ }
+ Frame {
+ msec: 864
+ hash: "ce2b5dd7418868acf86fea6ad19cc0c5"
+ }
+ Frame {
+ msec: 880
+ hash: "7c27ef654e645679c90520d6cf00b0c4"
+ }
+ Frame {
+ msec: 896
+ hash: "ab3e211df3ef7f5f7a8d712edc891c0f"
+ }
+ Frame {
+ msec: 912
+ hash: "19d2ae617a49b57dd012677e2834469c"
+ }
+ Frame {
+ msec: 928
+ hash: "5025eb75c88f0760f637e0342b7f88a2"
+ }
+ Frame {
+ msec: 944
+ hash: "005acbef952a8ee536e6308a48223e65"
+ }
+ Frame {
+ msec: 960
+ image: "pauseAnimation.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "5f18a81707f23d377e81a27c1fc41ce9"
+ }
+ Frame {
+ msec: 992
+ hash: "bcc35497884c158396c7f60759d1fda4"
+ }
+ Frame {
+ msec: 1008
+ hash: "7a4528b000a4ea142d1c77407fa1f581"
+ }
+ Frame {
+ msec: 1024
+ hash: "ba967a7d810a4531e577e5f6bd2def33"
+ }
+ Frame {
+ msec: 1040
+ hash: "f5afd9cf8ffe27e9992454b9e68688cb"
+ }
+ Frame {
+ msec: 1056
+ hash: "51d475c7f64a86d3a18fb115297a7b6b"
+ }
+ Frame {
+ msec: 1072
+ hash: "49f5d6fd45c195a8d245b7fefc1277ab"
+ }
+ Frame {
+ msec: 1088
+ hash: "f9b0b278659e3a0f78611e6b7f0f2176"
+ }
+ Frame {
+ msec: 1104
+ hash: "0809d32d5bc1bfce199b1f39a1c68d4f"
+ }
+ Frame {
+ msec: 1120
+ hash: "b7208d103b63a936dff8dd8ed224237f"
+ }
+ Frame {
+ msec: 1136
+ hash: "a57c81049b0dc68090ec7c3327b9922c"
+ }
+ Frame {
+ msec: 1152
+ hash: "e553f365912586c6408c8c53b1b7d118"
+ }
+ Frame {
+ msec: 1168
+ hash: "af3120fe262d2489c0ed33fbbee1549f"
+ }
+ Frame {
+ msec: 1184
+ hash: "0c20d12464abbdc45041ea5d9f2719b1"
+ }
+ Frame {
+ msec: 1200
+ hash: "dd60cbaff6f34027474e92315dbc0ebc"
+ }
+ Frame {
+ msec: 1216
+ hash: "336d31586171f22d541b989d24b95cbb"
+ }
+ Frame {
+ msec: 1232
+ hash: "41ba853c3403f68a23e708df82e21c53"
+ }
+ Frame {
+ msec: 1248
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 1264
+ hash: "41ba853c3403f68a23e708df82e21c53"
+ }
+ Frame {
+ msec: 1280
+ hash: "a725b59b4947357546bbfc7df3d830af"
+ }
+ Frame {
+ msec: 1296
+ hash: "336d31586171f22d541b989d24b95cbb"
+ }
+ Frame {
+ msec: 1312
+ hash: "f0d8132489c2f2ef760e905b3c093726"
+ }
+ Frame {
+ msec: 1328
+ hash: "6d63fb5c8a80f0280e88b2cdf8641bb9"
+ }
+ Frame {
+ msec: 1344
+ hash: "dd60cbaff6f34027474e92315dbc0ebc"
+ }
+ Frame {
+ msec: 1360
+ hash: "ef8941674cb61f54853dc33652bb854e"
+ }
+ Frame {
+ msec: 1376
+ hash: "bc426fb7c31751665b0d3f16e2cb0173"
+ }
+ Frame {
+ msec: 1392
+ hash: "0c20d12464abbdc45041ea5d9f2719b1"
+ }
+ Frame {
+ msec: 1408
+ hash: "53ae93140252373eaa4d9da73756bd8e"
+ }
+ Frame {
+ msec: 1424
+ hash: "721d7061811b5439c2e8e395917494bc"
+ }
+ Frame {
+ msec: 1440
+ hash: "af3120fe262d2489c0ed33fbbee1549f"
+ }
+ Frame {
+ msec: 1456
+ hash: "a8b624ebfc9ab713d1ce55f318a6e90d"
+ }
+ Frame {
+ msec: 1472
+ hash: "a88a8129259f86df5a73addc3649ad37"
+ }
+ Frame {
+ msec: 1488
+ hash: "a88a8129259f86df5a73addc3649ad37"
+ }
+ Frame {
+ msec: 1504
+ hash: "3db5e30ef19ea693c21ccf72892c4390"
+ }
+ Frame {
+ msec: 1520
+ hash: "e553f365912586c6408c8c53b1b7d118"
+ }
+ Frame {
+ msec: 1536
+ hash: "e553f365912586c6408c8c53b1b7d118"
+ }
+ Frame {
+ msec: 1552
+ hash: "e553f365912586c6408c8c53b1b7d118"
+ }
+ Frame {
+ msec: 1568
+ hash: "1373545e43fff7251cec9e8375ea267f"
+ }
+ Frame {
+ msec: 1584
+ hash: "1373545e43fff7251cec9e8375ea267f"
+ }
+ Frame {
+ msec: 1600
+ hash: "1373545e43fff7251cec9e8375ea267f"
+ }
+ Frame {
+ msec: 1616
+ hash: "1373545e43fff7251cec9e8375ea267f"
+ }
+ Frame {
+ msec: 1632
+ hash: "1373545e43fff7251cec9e8375ea267f"
+ }
+ Frame {
+ msec: 1648
+ hash: "1373545e43fff7251cec9e8375ea267f"
+ }
+ Frame {
+ msec: 1664
+ hash: "e553f365912586c6408c8c53b1b7d118"
+ }
+ Frame {
+ msec: 1680
+ hash: "e553f365912586c6408c8c53b1b7d118"
+ }
+ Frame {
+ msec: 1696
+ hash: "3db5e30ef19ea693c21ccf72892c4390"
+ }
+ Frame {
+ msec: 1712
+ hash: "3db5e30ef19ea693c21ccf72892c4390"
+ }
+ Frame {
+ msec: 1728
+ hash: "a88a8129259f86df5a73addc3649ad37"
+ }
+ Frame {
+ msec: 1744
+ hash: "a8b624ebfc9ab713d1ce55f318a6e90d"
+ }
+ Frame {
+ msec: 1760
+ hash: "a8b624ebfc9ab713d1ce55f318a6e90d"
+ }
+ Frame {
+ msec: 1776
+ hash: "af3120fe262d2489c0ed33fbbee1549f"
+ }
+ Frame {
+ msec: 1792
+ hash: "721d7061811b5439c2e8e395917494bc"
+ }
+ Frame {
+ msec: 1808
+ hash: "b3f4a2165ec1ee971542b8ef89656cea"
+ }
+ Frame {
+ msec: 1824
+ hash: "0c20d12464abbdc45041ea5d9f2719b1"
+ }
+ Frame {
+ msec: 1840
+ hash: "bc426fb7c31751665b0d3f16e2cb0173"
+ }
+ Frame {
+ msec: 1856
+ hash: "ef8941674cb61f54853dc33652bb854e"
+ }
+ Frame {
+ msec: 1872
+ hash: "dd60cbaff6f34027474e92315dbc0ebc"
+ }
+ Frame {
+ msec: 1888
+ hash: "6d63fb5c8a80f0280e88b2cdf8641bb9"
+ }
+ Frame {
+ msec: 1904
+ hash: "e74fe4a6bd92cbe8629c8bc8a870104d"
+ }
+ Frame {
+ msec: 1920
+ image: "pauseAnimation.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "a725b59b4947357546bbfc7df3d830af"
+ }
+ Frame {
+ msec: 1952
+ hash: "dcf2867c127e041970047ec8f3edc04f"
+ }
+ Frame {
+ msec: 1968
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 1984
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 2000
+ hash: "dcf2867c127e041970047ec8f3edc04f"
+ }
+ Frame {
+ msec: 2016
+ hash: "41ba853c3403f68a23e708df82e21c53"
+ }
+ Frame {
+ msec: 2032
+ hash: "ce57e27af329eba4fac3ab891f0407ce"
+ }
+ Frame {
+ msec: 2048
+ hash: "ce57e27af329eba4fac3ab891f0407ce"
+ }
+ Frame {
+ msec: 2064
+ hash: "a725b59b4947357546bbfc7df3d830af"
+ }
+ Frame {
+ msec: 2080
+ hash: "a725b59b4947357546bbfc7df3d830af"
+ }
+ Frame {
+ msec: 2096
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 2112
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 2128
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 2144
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 2160
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 2176
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 2192
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 2208
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 2224
+ hash: "a725b59b4947357546bbfc7df3d830af"
+ }
+ Frame {
+ msec: 2240
+ hash: "a725b59b4947357546bbfc7df3d830af"
+ }
+ Frame {
+ msec: 2256
+ hash: "ce57e27af329eba4fac3ab891f0407ce"
+ }
+ Frame {
+ msec: 2272
+ hash: "ce57e27af329eba4fac3ab891f0407ce"
+ }
+ Frame {
+ msec: 2288
+ hash: "41ba853c3403f68a23e708df82e21c53"
+ }
+ Frame {
+ msec: 2304
+ hash: "dcf2867c127e041970047ec8f3edc04f"
+ }
+ Frame {
+ msec: 2320
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 2336
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2352
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 2368
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 2384
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 2400
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 2416
+ hash: "dcf2867c127e041970047ec8f3edc04f"
+ }
+ Frame {
+ msec: 2432
+ hash: "dcf2867c127e041970047ec8f3edc04f"
+ }
+ Frame {
+ msec: 2448
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 2464
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 2480
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 2496
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 2512
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2528
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2544
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2560
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2576
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2592
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2608
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2624
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2640
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2656
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2672
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2688
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2704
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2720
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2736
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2752
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2768
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2784
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2800
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2816
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2832
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2848
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2864
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2880
+ image: "pauseAnimation.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2912
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2928
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2944
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2960
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2976
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 2992
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3008
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3024
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3040
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3056
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3072
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3088
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3104
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3120
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3136
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3152
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3168
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3184
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3200
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3216
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3232
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3248
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3264
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3280
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3296
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3312
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3328
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3344
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3360
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3376
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3392
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3408
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3424
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3440
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3456
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3472
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3488
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3504
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3520
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3536
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 3552
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 3568
+ hash: "dcf2867c127e041970047ec8f3edc04f"
+ }
+ Frame {
+ msec: 3584
+ hash: "ce57e27af329eba4fac3ab891f0407ce"
+ }
+ Frame {
+ msec: 3600
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 3616
+ hash: "e74fe4a6bd92cbe8629c8bc8a870104d"
+ }
+ Frame {
+ msec: 3632
+ hash: "e11455d4e23a5a865e222a7aba4ba4f9"
+ }
+ Frame {
+ msec: 3648
+ hash: "8757668e56be6449ec375f0b8fed1be3"
+ }
+ Frame {
+ msec: 3664
+ hash: "53ae93140252373eaa4d9da73756bd8e"
+ }
+ Frame {
+ msec: 3680
+ hash: "a88a8129259f86df5a73addc3649ad37"
+ }
+ Frame {
+ msec: 3696
+ hash: "630d90eef2673a69e8ebc4ef1ba40e81"
+ }
+ Frame {
+ msec: 3712
+ hash: "b7208d103b63a936dff8dd8ed224237f"
+ }
+ Frame {
+ msec: 3728
+ hash: "1516c3547c7cf64832b3bc7da7c44521"
+ }
+ Frame {
+ msec: 3744
+ hash: "49f5d6fd45c195a8d245b7fefc1277ab"
+ }
+ Frame {
+ msec: 3760
+ hash: "f5afd9cf8ffe27e9992454b9e68688cb"
+ }
+ Frame {
+ msec: 3776
+ hash: "7a4528b000a4ea142d1c77407fa1f581"
+ }
+ Frame {
+ msec: 3792
+ hash: "5f18a81707f23d377e81a27c1fc41ce9"
+ }
+ Frame {
+ msec: 3808
+ hash: "005acbef952a8ee536e6308a48223e65"
+ }
+ Frame {
+ msec: 3824
+ hash: "85c135ef72d3d25658a3663e69ffb7c2"
+ }
+ Frame {
+ msec: 3840
+ image: "pauseAnimation.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "20258f07c613958c32f783466771391a"
+ }
+ Frame {
+ msec: 3872
+ hash: "9650fd0364c01b11e4f5dcce51d008af"
+ }
+ Frame {
+ msec: 3888
+ hash: "f340cdf60c6d4c29d26b7202a093ec70"
+ }
+ Frame {
+ msec: 3904
+ hash: "d754d35d0793f9f7d4f6249a874e4c45"
+ }
+ Frame {
+ msec: 3920
+ hash: "79ec710576427df73dd03f39fba6e2eb"
+ }
+ Frame {
+ msec: 3936
+ hash: "45281a70021f81dbef30334b1480da1b"
+ }
+ Frame {
+ msec: 3952
+ hash: "ffd39c1122fe2f7877ef30591b539b40"
+ }
+ Frame {
+ msec: 3968
+ hash: "4ac43a03cc6f2020ab5f894d704092ac"
+ }
+ Frame {
+ msec: 3984
+ hash: "c1a7b7d6d64ac5584c073c2881290696"
+ }
+ Frame {
+ msec: 4000
+ hash: "29ece1bca4d21fb5862091317d430a13"
+ }
+ Frame {
+ msec: 4016
+ hash: "29ece1bca4d21fb5862091317d430a13"
+ }
+ Frame {
+ msec: 4032
+ hash: "29ece1bca4d21fb5862091317d430a13"
+ }
+ Frame {
+ msec: 4048
+ hash: "29ece1bca4d21fb5862091317d430a13"
+ }
+ Frame {
+ msec: 4064
+ hash: "29ece1bca4d21fb5862091317d430a13"
+ }
+ Frame {
+ msec: 4080
+ hash: "c1a7b7d6d64ac5584c073c2881290696"
+ }
+ Frame {
+ msec: 4096
+ hash: "c1a7b7d6d64ac5584c073c2881290696"
+ }
+ Frame {
+ msec: 4112
+ hash: "4ac43a03cc6f2020ab5f894d704092ac"
+ }
+ Frame {
+ msec: 4128
+ hash: "4ac43a03cc6f2020ab5f894d704092ac"
+ }
+ Frame {
+ msec: 4144
+ hash: "ffd39c1122fe2f7877ef30591b539b40"
+ }
+ Frame {
+ msec: 4160
+ hash: "62a7133012348f2ec3a388fb685ecc3f"
+ }
+ Frame {
+ msec: 4176
+ hash: "45281a70021f81dbef30334b1480da1b"
+ }
+ Frame {
+ msec: 4192
+ hash: "6cc9de62a0c8fa5e42eac1b01e99ac32"
+ }
+ Frame {
+ msec: 4208
+ hash: "79ec710576427df73dd03f39fba6e2eb"
+ }
+ Frame {
+ msec: 4224
+ hash: "5be4f5c67941efb6fcea363c79f1e321"
+ }
+ Frame {
+ msec: 4240
+ hash: "7d9096b1eb940c82a37baf39ef3ccf3e"
+ }
+ Frame {
+ msec: 4256
+ hash: "e87b00bfc2c2a75a4234ec02a057ad3a"
+ }
+ Frame {
+ msec: 4272
+ hash: "da60100dc55023c3bab367d97c8f6a85"
+ }
+ Frame {
+ msec: 4288
+ hash: "dc98a9bdd99367c1e9b838d4be489dcc"
+ }
+ Frame {
+ msec: 4304
+ hash: "b2c778a5eff5f01edc54f03d8b4de8c7"
+ }
+ Frame {
+ msec: 4320
+ hash: "9650fd0364c01b11e4f5dcce51d008af"
+ }
+ Frame {
+ msec: 4336
+ hash: "2cb09d9655ecc30ae6a591b28c0d355c"
+ }
+ Frame {
+ msec: 4352
+ hash: "4db9bc6c11caf1d77794c2eabb62a44e"
+ }
+ Frame {
+ msec: 4368
+ hash: "ce2b5dd7418868acf86fea6ad19cc0c5"
+ }
+ Frame {
+ msec: 4384
+ hash: "c4f844ee71f23635bb3ec7375f6a134f"
+ }
+ Frame {
+ msec: 4400
+ hash: "4e1fda8a0495ef968c1cffb1257426d7"
+ }
+ Frame {
+ msec: 4416
+ hash: "19d2ae617a49b57dd012677e2834469c"
+ }
+ Frame {
+ msec: 4432
+ hash: "f438e8d2c16b5de677924c8411219b19"
+ }
+ Frame {
+ msec: 4448
+ hash: "005acbef952a8ee536e6308a48223e65"
+ }
+ Frame {
+ msec: 4464
+ hash: "87b71778d52cd8563d171151d4d32407"
+ }
+ Frame {
+ msec: 4480
+ hash: "691cd8bf5c7802ff6c5024827a379fc6"
+ }
+ Frame {
+ msec: 4496
+ hash: "ab442c0173c3d221b6782d28001dac77"
+ }
+ Frame {
+ msec: 4512
+ hash: "6f886d4538704c2fad4d84c68214109f"
+ }
+ Frame {
+ msec: 4528
+ hash: "56d39f233fae41c60499d6161f891cbc"
+ }
+ Frame {
+ msec: 4544
+ hash: "95d987c3fd1352fb81c42c63634fe53b"
+ }
+ Frame {
+ msec: 4560
+ hash: "96dc84c0c548021910e7c5b580179054"
+ }
+ Frame {
+ msec: 4576
+ hash: "ddb71cbd57f6e43744d533d4f72b08db"
+ }
+ Frame {
+ msec: 4592
+ hash: "f7ab4b197bea455b22f259913438d207"
+ }
+ Frame {
+ msec: 4608
+ hash: "2ad64cb01c9d50e0118d5ece0a644df2"
+ }
+ Frame {
+ msec: 4624
+ hash: "6579681c59dd571df0ee4429d74fb5c7"
+ }
+ Frame {
+ msec: 4640
+ hash: "630d90eef2673a69e8ebc4ef1ba40e81"
+ }
+ Frame {
+ msec: 4656
+ hash: "3db5e30ef19ea693c21ccf72892c4390"
+ }
+ Frame {
+ msec: 4672
+ hash: "721d7061811b5439c2e8e395917494bc"
+ }
+ Frame {
+ msec: 4688
+ hash: "bc426fb7c31751665b0d3f16e2cb0173"
+ }
+ Frame {
+ msec: 4704
+ hash: "e11455d4e23a5a865e222a7aba4ba4f9"
+ }
+ Frame {
+ msec: 4720
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 4736
+ hash: "dcf2867c127e041970047ec8f3edc04f"
+ }
+ Frame {
+ msec: 4752
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 4768
+ hash: "41ba853c3403f68a23e708df82e21c53"
+ }
+ Frame {
+ msec: 4784
+ hash: "a725b59b4947357546bbfc7df3d830af"
+ }
+ Frame {
+ msec: 4800
+ image: "pauseAnimation.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "f0d8132489c2f2ef760e905b3c093726"
+ }
+ Frame {
+ msec: 4832
+ hash: "e11455d4e23a5a865e222a7aba4ba4f9"
+ }
+ Frame {
+ msec: 4848
+ hash: "dd60cbaff6f34027474e92315dbc0ebc"
+ }
+ Frame {
+ msec: 4864
+ hash: "8757668e56be6449ec375f0b8fed1be3"
+ }
+ Frame {
+ msec: 4880
+ hash: "bc426fb7c31751665b0d3f16e2cb0173"
+ }
+ Frame {
+ msec: 4896
+ hash: "b3f4a2165ec1ee971542b8ef89656cea"
+ }
+ Frame {
+ msec: 4912
+ hash: "53ae93140252373eaa4d9da73756bd8e"
+ }
+ Frame {
+ msec: 4928
+ hash: "721d7061811b5439c2e8e395917494bc"
+ }
+ Frame {
+ msec: 4944
+ hash: "af3120fe262d2489c0ed33fbbee1549f"
+ }
+ Frame {
+ msec: 4960
+ hash: "a8b624ebfc9ab713d1ce55f318a6e90d"
+ }
+ Frame {
+ msec: 4976
+ hash: "a88a8129259f86df5a73addc3649ad37"
+ }
+ Frame {
+ msec: 4992
+ hash: "3db5e30ef19ea693c21ccf72892c4390"
+ }
+ Frame {
+ msec: 5008
+ hash: "3db5e30ef19ea693c21ccf72892c4390"
+ }
+ Frame {
+ msec: 5024
+ hash: "e553f365912586c6408c8c53b1b7d118"
+ }
+ Frame {
+ msec: 5040
+ hash: "e553f365912586c6408c8c53b1b7d118"
+ }
+ Frame {
+ msec: 5056
+ hash: "1373545e43fff7251cec9e8375ea267f"
+ }
+ Frame {
+ msec: 5072
+ hash: "1373545e43fff7251cec9e8375ea267f"
+ }
+ Frame {
+ msec: 5088
+ hash: "1373545e43fff7251cec9e8375ea267f"
+ }
+ Frame {
+ msec: 5104
+ hash: "1373545e43fff7251cec9e8375ea267f"
+ }
+ Frame {
+ msec: 5120
+ hash: "1373545e43fff7251cec9e8375ea267f"
+ }
+ Frame {
+ msec: 5136
+ hash: "1373545e43fff7251cec9e8375ea267f"
+ }
+ Frame {
+ msec: 5152
+ hash: "1373545e43fff7251cec9e8375ea267f"
+ }
+ Frame {
+ msec: 5168
+ hash: "e553f365912586c6408c8c53b1b7d118"
+ }
+ Frame {
+ msec: 5184
+ hash: "e553f365912586c6408c8c53b1b7d118"
+ }
+ Frame {
+ msec: 5200
+ hash: "3db5e30ef19ea693c21ccf72892c4390"
+ }
+ Frame {
+ msec: 5216
+ hash: "3db5e30ef19ea693c21ccf72892c4390"
+ }
+ Frame {
+ msec: 5232
+ hash: "a88a8129259f86df5a73addc3649ad37"
+ }
+ Frame {
+ msec: 5248
+ hash: "a8b624ebfc9ab713d1ce55f318a6e90d"
+ }
+ Frame {
+ msec: 5264
+ hash: "af3120fe262d2489c0ed33fbbee1549f"
+ }
+ Frame {
+ msec: 5280
+ hash: "721d7061811b5439c2e8e395917494bc"
+ }
+ Frame {
+ msec: 5296
+ hash: "53ae93140252373eaa4d9da73756bd8e"
+ }
+ Frame {
+ msec: 5312
+ hash: "b3f4a2165ec1ee971542b8ef89656cea"
+ }
+ Frame {
+ msec: 5328
+ hash: "0c20d12464abbdc45041ea5d9f2719b1"
+ }
+ Frame {
+ msec: 5344
+ hash: "8757668e56be6449ec375f0b8fed1be3"
+ }
+ Frame {
+ msec: 5360
+ hash: "ef8941674cb61f54853dc33652bb854e"
+ }
+ Frame {
+ msec: 5376
+ hash: "e11455d4e23a5a865e222a7aba4ba4f9"
+ }
+ Frame {
+ msec: 5392
+ hash: "6d63fb5c8a80f0280e88b2cdf8641bb9"
+ }
+ Frame {
+ msec: 5408
+ hash: "e74fe4a6bd92cbe8629c8bc8a870104d"
+ }
+ Frame {
+ msec: 5424
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 5440
+ hash: "ce57e27af329eba4fac3ab891f0407ce"
+ }
+ Frame {
+ msec: 5456
+ hash: "dcf2867c127e041970047ec8f3edc04f"
+ }
+ Frame {
+ msec: 5472
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 5488
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 5504
+ hash: "dcf2867c127e041970047ec8f3edc04f"
+ }
+ Frame {
+ msec: 5520
+ hash: "41ba853c3403f68a23e708df82e21c53"
+ }
+ Frame {
+ msec: 5536
+ hash: "ce57e27af329eba4fac3ab891f0407ce"
+ }
+ Frame {
+ msec: 5552
+ hash: "ce57e27af329eba4fac3ab891f0407ce"
+ }
+ Frame {
+ msec: 5568
+ hash: "a725b59b4947357546bbfc7df3d830af"
+ }
+ Frame {
+ msec: 5584
+ hash: "a725b59b4947357546bbfc7df3d830af"
+ }
+ Frame {
+ msec: 5600
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 5616
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 5632
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 5648
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 5664
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 5680
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 5696
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 5712
+ hash: "3042003c067b257de2cb32f650dde693"
+ }
+ Frame {
+ msec: 5728
+ hash: "a725b59b4947357546bbfc7df3d830af"
+ }
+ Frame {
+ msec: 5744
+ hash: "a725b59b4947357546bbfc7df3d830af"
+ }
+ Frame {
+ msec: 5760
+ image: "pauseAnimation.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "41ba853c3403f68a23e708df82e21c53"
+ }
+ Frame {
+ msec: 5792
+ hash: "41ba853c3403f68a23e708df82e21c53"
+ }
+ Frame {
+ msec: 5808
+ hash: "dcf2867c127e041970047ec8f3edc04f"
+ }
+ Frame {
+ msec: 5824
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 5840
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 5856
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 5872
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 5888
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 5904
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 5920
+ hash: "dcf2867c127e041970047ec8f3edc04f"
+ }
+ Frame {
+ msec: 5936
+ hash: "dcf2867c127e041970047ec8f3edc04f"
+ }
+ Frame {
+ msec: 5952
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 5968
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 5984
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 6000
+ hash: "675ebbdd22dd22ce45993df4af1acfe9"
+ }
+ Frame {
+ msec: 6016
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6032
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6048
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6064
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6080
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6096
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6112
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6128
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6144
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6160
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6176
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6192
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6208
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6224
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6240
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6256
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6272
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6288
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6304
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6320
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6336
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6352
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6368
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6384
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6400
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+ Frame {
+ msec: 6416
+ hash: "a350b70c5238a340e85fd4a3ec0390a3"
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/pauseAnimation/pauseAnimation.qml b/tests/auto/declarative/visual/animation/pauseAnimation/pauseAnimation.qml
new file mode 100644
index 0000000000..24ca76becb
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/pauseAnimation/pauseAnimation.qml
@@ -0,0 +1,29 @@
+import Qt 4.6
+
+Rectangle {
+ id: rect
+ width: 120
+ height: 200
+ color: "white"
+ Image {
+ id: img
+ source: "pics/qtlogo.png"
+ x: 60-width/2
+ y: 200-height
+ y: SequentialAnimation {
+ repeat: true
+ NumberAnimation {
+ to: 0; duration: 500
+ easing.type: "InOutQuad"
+ }
+ NumberAnimation {
+ to: 200-img.height
+ easing.type: "OutBounce"
+ duration: 2000
+ }
+ PauseAnimation {
+ duration: 1000
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/pauseAnimation/pics/qtlogo.png b/tests/auto/declarative/visual/animation/pauseAnimation/pics/qtlogo.png
new file mode 100644
index 0000000000..399bd0b1d9
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/pauseAnimation/pics/qtlogo.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/propertyAction/data/propertyAction.0.png b/tests/auto/declarative/visual/animation/propertyAction/data/propertyAction.0.png
new file mode 100644
index 0000000000..64d6b06895
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/propertyAction/data/propertyAction.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/propertyAction/data/propertyAction.1.png b/tests/auto/declarative/visual/animation/propertyAction/data/propertyAction.1.png
new file mode 100644
index 0000000000..f7fce15f46
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/propertyAction/data/propertyAction.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/propertyAction/data/propertyAction.2.png b/tests/auto/declarative/visual/animation/propertyAction/data/propertyAction.2.png
new file mode 100644
index 0000000000..3080df5e30
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/propertyAction/data/propertyAction.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/propertyAction/data/propertyAction.qml b/tests/auto/declarative/visual/animation/propertyAction/data/propertyAction.qml
new file mode 100644
index 0000000000..7c8c23398f
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/propertyAction/data/propertyAction.qml
@@ -0,0 +1,939 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 32
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 48
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 64
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 80
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 96
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 112
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 128
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 144
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 160
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 176
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 192
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 208
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 224
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 240
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 256
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 272
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 288
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 304
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 320
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 336
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 352
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 368
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 384
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 400
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 416
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 432
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 448
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 464
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 480
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 496
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 512
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 528
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 544
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 560
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 576
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 592
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 608
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 624
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 640
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 656
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 672
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 688
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 704
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 720
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 736
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 752
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 768
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 784
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 800
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 816
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 832
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 848
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 864
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 880
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 896
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 912
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 928
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 944
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 960
+ image: "propertyAction.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 992
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1008
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1024
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1040
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1056
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1072
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1088
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1104
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1120
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1136
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1152
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1168
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1184
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1200
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1216
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1232
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1248
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1264
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1280
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1296
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1312
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1328
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1344
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1360
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1376
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1392
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1408
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1424
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1440
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1456
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1472
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1488
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1504
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1520
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1536
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1552
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1568
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1584
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1600
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 109; y: 247
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1616
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1632
+ hash: "c91921dba899d7a86de3cd013773889f"
+ }
+ Frame {
+ msec: 1648
+ hash: "888c0fc86155e10b5fc577ef6ec5755a"
+ }
+ Frame {
+ msec: 1664
+ hash: "7fd61a8910bf7b0d2bf57653a268c5d8"
+ }
+ Frame {
+ msec: 1680
+ hash: "f42f5073f90a423adf011d0e168c8a9b"
+ }
+ Frame {
+ msec: 1696
+ hash: "a3d89deb6cfa2bbbaa1d7d5b5e5b48d5"
+ }
+ Frame {
+ msec: 1712
+ hash: "f10e997d7a17c18251a32d58b018105a"
+ }
+ Frame {
+ msec: 1728
+ hash: "09ffb57d5f67edfa34d6aad36a002554"
+ }
+ Frame {
+ msec: 1744
+ hash: "01f3a2f5b9815f1397a907b099339360"
+ }
+ Frame {
+ msec: 1760
+ hash: "58c0910c49748edd2ef8472960179472"
+ }
+ Frame {
+ msec: 1776
+ hash: "cc82c5f7f93c5bc1af1c6c509268566a"
+ }
+ Frame {
+ msec: 1792
+ hash: "3ef272c6439b85fbc166375d1b98403c"
+ }
+ Frame {
+ msec: 1808
+ hash: "98c576f0900e4b8752d1f951bb6bf391"
+ }
+ Frame {
+ msec: 1824
+ hash: "4d66dd64d8736ef50163e08723873478"
+ }
+ Frame {
+ msec: 1840
+ hash: "9a5d8455b6763456185625811253e0b1"
+ }
+ Frame {
+ msec: 1856
+ hash: "77e85731efa786a2492aae19a87523c6"
+ }
+ Frame {
+ msec: 1872
+ hash: "f3199d0c860f1236e0b9472bef8785bc"
+ }
+ Frame {
+ msec: 1888
+ hash: "f3199d0c860f1236e0b9472bef8785bc"
+ }
+ Frame {
+ msec: 1904
+ hash: "32ccdab249268b01d9f1658a736052f1"
+ }
+ Frame {
+ msec: 1920
+ image: "propertyAction.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "db3010ef552146df938c237f6c92bff5"
+ }
+ Frame {
+ msec: 1952
+ hash: "101e8595d0301e88376ec52ba9361f84"
+ }
+ Frame {
+ msec: 1968
+ hash: "119d548c59baa7e47266d2ceca663288"
+ }
+ Frame {
+ msec: 1984
+ hash: "f141fafe102a0b9a2bf33e8c3fc800ff"
+ }
+ Frame {
+ msec: 2000
+ hash: "b01f9ca8d4fbff17b3d48c70898a044d"
+ }
+ Frame {
+ msec: 2016
+ hash: "cf67954a2d1b22e8d2cfdc26419bafb8"
+ }
+ Frame {
+ msec: 2032
+ hash: "7680b2b5a63dea13d733947297e01355"
+ }
+ Frame {
+ msec: 2048
+ hash: "af1c017acf6b3c8cff86c9ceb60db3cb"
+ }
+ Frame {
+ msec: 2064
+ hash: "0b23ec51f71fddae5e2238ab5754f1db"
+ }
+ Frame {
+ msec: 2080
+ hash: "976643961ecbdc86335180ba812b874e"
+ }
+ Frame {
+ msec: 2096
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2112
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2128
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2144
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2160
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2176
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2192
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2208
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2224
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2240
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2256
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2272
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2288
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2304
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2320
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2336
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2352
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2368
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2384
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2400
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2416
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2432
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2448
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2464
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2480
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2496
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2512
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2528
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2544
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2560
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2576
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2592
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2608
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2624
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2640
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2656
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2672
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2688
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2704
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2720
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2736
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2752
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 109; y: 247
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2768
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2784
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2800
+ hash: "ab924ae435262e76381c2e4af5d64342"
+ }
+ Frame {
+ msec: 2816
+ hash: "d60758fc12471a19d31c85f058f2ded7"
+ }
+ Frame {
+ msec: 2832
+ hash: "c62e2956f8eb5d2c8cd76ba05c5929d5"
+ }
+ Frame {
+ msec: 2848
+ hash: "f2967ee7e035a9ff258116a2706529f8"
+ }
+ Frame {
+ msec: 2864
+ hash: "885c4705c6c29f69c56c44abc1251d75"
+ }
+ Frame {
+ msec: 2880
+ image: "propertyAction.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "f4af6871e522511f95bc4c5abfc2a562"
+ }
+ Frame {
+ msec: 2912
+ hash: "b27e1e7e0d90468525309528ccfe2823"
+ }
+ Frame {
+ msec: 2928
+ hash: "78e7d84a4466258b40315fe61b7ca15c"
+ }
+ Frame {
+ msec: 2944
+ hash: "471013d921d8d6e7468fd6aba0b75c71"
+ }
+ Frame {
+ msec: 2960
+ hash: "856048da893c9136ac5740bc89b64128"
+ }
+ Frame {
+ msec: 2976
+ hash: "32ccdab249268b01d9f1658a736052f1"
+ }
+ Frame {
+ msec: 2992
+ hash: "2264fa3acd979f104633c1301a0efd8f"
+ }
+ Frame {
+ msec: 3008
+ hash: "f3199d0c860f1236e0b9472bef8785bc"
+ }
+ Frame {
+ msec: 3024
+ hash: "ad899d1ecaa43a5541be7b70413caee5"
+ }
+ Frame {
+ msec: 3040
+ hash: "4e652524c992f5ee1b987275ca509728"
+ }
+ Frame {
+ msec: 3056
+ hash: "a44b3dec2a016694bc8553a51b29d46c"
+ }
+ Frame {
+ msec: 3072
+ hash: "7fbe20346bc3c28c345e0797b55599f3"
+ }
+ Frame {
+ msec: 3088
+ hash: "bcff18ad433bb4f08126ee66efb037d1"
+ }
+ Frame {
+ msec: 3104
+ hash: "836666c64f73c38e87de95944ff2fe72"
+ }
+ Frame {
+ msec: 3120
+ hash: "4379982d23db239b1741b5d72c53e160"
+ }
+ Frame {
+ msec: 3136
+ hash: "0ed9476337214e1493c1510b8a4c90f8"
+ }
+ Frame {
+ msec: 3152
+ hash: "dab637406577a1924c7dbb30680e1af3"
+ }
+ Frame {
+ msec: 3168
+ hash: "dcc79277fdb8966e5a3f2ed1b2fc4292"
+ }
+ Frame {
+ msec: 3184
+ hash: "5f207d1dfad4907f200d76104881bf56"
+ }
+ Frame {
+ msec: 3200
+ hash: "3434fc7f81e859722585dae97c557864"
+ }
+ Frame {
+ msec: 3216
+ hash: "7c775b9be8c5293d4962324574267c22"
+ }
+ Frame {
+ msec: 3232
+ hash: "da0ff6955c2e4cd86421bdb9053f56e6"
+ }
+ Frame {
+ msec: 3248
+ hash: "a1297d525a3ad41abbbb7c2f15efd4fb"
+ }
+ Frame {
+ msec: 3264
+ hash: "5326b220995b2a1eaa308ad10fd353fa"
+ }
+ Frame {
+ msec: 3280
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3296
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3312
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3328
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3344
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3360
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3376
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3392
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3408
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3424
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3440
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3456
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3472
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3488
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3504
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3520
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3536
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3552
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3568
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3584
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3600
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3616
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 3632
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/propertyAction/propertyAction.qml b/tests/auto/declarative/visual/animation/propertyAction/propertyAction.qml
new file mode 100644
index 0000000000..e18e77030b
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/propertyAction/propertyAction.qml
@@ -0,0 +1,34 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400; height: 400
+ Rectangle {
+ id: myRect
+ width: 100; height: 100
+ color: "red"
+ }
+ MouseArea {
+ id: clickable
+ anchors.fill: parent
+ }
+
+ states: State {
+ name: "state1"
+ when: clickable.pressed
+ PropertyChanges {
+ target: myRect
+ x: 50; y: 50
+ color: "blue"
+ }
+ }
+
+ transitions: Transition {
+ to: "state1"
+ reversible: true
+ SequentialAnimation {
+ ColorAnimation {}
+ PropertyAction { properties: "x" }
+ NumberAnimation { properties: "y"; easing.type: "InOutQuad" }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/reanchor/data/reanchor.0.png b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.0.png
new file mode 100644
index 0000000000..c7bbf3883d
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/reanchor/data/reanchor.1.png b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.1.png
new file mode 100644
index 0000000000..612500b042
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/reanchor/data/reanchor.2.png b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.2.png
new file mode 100644
index 0000000000..c7bbf3883d
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/reanchor/data/reanchor.3.png b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.3.png
new file mode 100644
index 0000000000..c7bbf3883d
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/reanchor/data/reanchor.4.png b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.4.png
new file mode 100644
index 0000000000..1910eb4d4e
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/reanchor/data/reanchor.5.png b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.5.png
new file mode 100644
index 0000000000..3b8eebd00c
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/reanchor/data/reanchor.6.png b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.6.png
new file mode 100644
index 0000000000..c7bbf3883d
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/reanchor/data/reanchor.7.png b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.7.png
new file mode 100644
index 0000000000..c7bbf3883d
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/reanchor/data/reanchor.8.png b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.8.png
new file mode 100644
index 0000000000..960be31ba8
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.8.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/reanchor/data/reanchor.qml b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.qml
new file mode 100644
index 0000000000..0f58de55fe
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/reanchor/data/reanchor.qml
@@ -0,0 +1,2471 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 32
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 48
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 64
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 80
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 96
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 112
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 128
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 144
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 160
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 176
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 192
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 208
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 224
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 240
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 256
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 272
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 288
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 304
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 320
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 336
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 352
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 368
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 384
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 400
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 416
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 432
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 448
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 464
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 480
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 496
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 512
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 528
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 544
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 560
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 576
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 592
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 608
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 624
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 640
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 656
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 672
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 688
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 704
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 720
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 736
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 752
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 768
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 784
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 800
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 816
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 832
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 848
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 864
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 880
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 896
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 912
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 928
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 944
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 960
+ image: "reanchor.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 992
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1008
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1024
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1040
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1056
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1072
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1088
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1104
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1120
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1136
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1152
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1168
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1184
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1200
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1216
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1232
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1248
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1264
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1280
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1296
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1312
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1328
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1344
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1360
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 88; y: 115
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1376
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1392
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1408
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1424
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1440
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 88; y: 115
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1456
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 1472
+ hash: "c2d6dd91f3e9cdcacbadcb449c8a9896"
+ }
+ Frame {
+ msec: 1488
+ hash: "1098ea19aecebd71208e101d522c1981"
+ }
+ Frame {
+ msec: 1504
+ hash: "8cc59c20d796c073038518d2855fb6f0"
+ }
+ Frame {
+ msec: 1520
+ hash: "914a89d0cfdc68145024ce2305a5e76e"
+ }
+ Frame {
+ msec: 1536
+ hash: "7a2e3ca2660df24d9a6ec49a7422ebe1"
+ }
+ Frame {
+ msec: 1552
+ hash: "b71496d986d5f0aa76b4f1663627f1f7"
+ }
+ Frame {
+ msec: 1568
+ hash: "41b29a523db919bc0a4e0a9a88bfc873"
+ }
+ Frame {
+ msec: 1584
+ hash: "97632a0de766b9ffbf71f21eeb0ff9a2"
+ }
+ Frame {
+ msec: 1600
+ hash: "94cc196e62c150008461ff9996b4cae8"
+ }
+ Frame {
+ msec: 1616
+ hash: "32e96ad2d15fa2386d365ab249ddf4f4"
+ }
+ Frame {
+ msec: 1632
+ hash: "209394314f971b12fbc61ca45010cc62"
+ }
+ Frame {
+ msec: 1648
+ hash: "b917c2684dda8af00278b34ababdcf5c"
+ }
+ Frame {
+ msec: 1664
+ hash: "92b506860c1c5dc52f87c24c89921b05"
+ }
+ Frame {
+ msec: 1680
+ hash: "7b7e96113fa9359954be9b3ac87943c3"
+ }
+ Frame {
+ msec: 1696
+ hash: "42bc69db42c5df902038cec414246ec5"
+ }
+ Frame {
+ msec: 1712
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 1728
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 1744
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 1760
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 1776
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 1792
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 1808
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 1824
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 1840
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 1856
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 1872
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 1888
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 1904
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 1920
+ image: "reanchor.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 1952
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 1968
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 1984
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 2000
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 2016
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 2032
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 2048
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 2064
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 2080
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 2096
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 87; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2112
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 2128
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 2144
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 2160
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 2176
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 2192
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 2208
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 87; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2224
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 2240
+ hash: "2d1aa011f2008a6147ba593e3cf272d7"
+ }
+ Frame {
+ msec: 2256
+ hash: "206699ea84ce9fd60c1603b7a48a5134"
+ }
+ Frame {
+ msec: 2272
+ hash: "68eb6df93a2b6db7023f7c3cc71d5b5f"
+ }
+ Frame {
+ msec: 2288
+ hash: "5a4cd0620959dde92eeeaaa4dcd13091"
+ }
+ Frame {
+ msec: 2304
+ hash: "17b763187a777253b25b22f5dd7253ae"
+ }
+ Frame {
+ msec: 2320
+ hash: "1de9dcf4d385266f4482e2d0967d9119"
+ }
+ Frame {
+ msec: 2336
+ hash: "833496add6dbc3103a28a47e453a738b"
+ }
+ Frame {
+ msec: 2352
+ hash: "b3bab2e9c56db60cd54e68369e6b790d"
+ }
+ Frame {
+ msec: 2368
+ hash: "ee91c6cd909bec401a1a7eebd10b8b02"
+ }
+ Frame {
+ msec: 2384
+ hash: "0ed679ad0ab7bd3544947bccda88647b"
+ }
+ Frame {
+ msec: 2400
+ hash: "d7dfcdc8a4233821919f1732d8c39712"
+ }
+ Frame {
+ msec: 2416
+ hash: "c52829ee689e4c312a9dff8dbd4a79f9"
+ }
+ Frame {
+ msec: 2432
+ hash: "7962badda0e80a61b67943d3b31f892d"
+ }
+ Frame {
+ msec: 2448
+ hash: "fc5f2c24e3d8743ab5b20aaa122bacc2"
+ }
+ Frame {
+ msec: 2464
+ hash: "201b9ee6c9ac6208ef812fe2e95020ef"
+ }
+ Frame {
+ msec: 2480
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2496
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2512
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2528
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2544
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2560
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2576
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2592
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2608
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2624
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2640
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2656
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2672
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2688
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2704
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2720
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2736
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2752
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 87; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2768
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2784
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2800
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2816
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2832
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2848
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 2864
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 87; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2880
+ image: "reanchor.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "c2d6dd91f3e9cdcacbadcb449c8a9896"
+ }
+ Frame {
+ msec: 2912
+ hash: "1098ea19aecebd71208e101d522c1981"
+ }
+ Frame {
+ msec: 2928
+ hash: "8cc59c20d796c073038518d2855fb6f0"
+ }
+ Frame {
+ msec: 2944
+ hash: "914a89d0cfdc68145024ce2305a5e76e"
+ }
+ Frame {
+ msec: 2960
+ hash: "7a2e3ca2660df24d9a6ec49a7422ebe1"
+ }
+ Frame {
+ msec: 2976
+ hash: "b71496d986d5f0aa76b4f1663627f1f7"
+ }
+ Frame {
+ msec: 2992
+ hash: "41b29a523db919bc0a4e0a9a88bfc873"
+ }
+ Frame {
+ msec: 3008
+ hash: "97632a0de766b9ffbf71f21eeb0ff9a2"
+ }
+ Frame {
+ msec: 3024
+ hash: "94cc196e62c150008461ff9996b4cae8"
+ }
+ Frame {
+ msec: 3040
+ hash: "32e96ad2d15fa2386d365ab249ddf4f4"
+ }
+ Frame {
+ msec: 3056
+ hash: "209394314f971b12fbc61ca45010cc62"
+ }
+ Frame {
+ msec: 3072
+ hash: "b917c2684dda8af00278b34ababdcf5c"
+ }
+ Frame {
+ msec: 3088
+ hash: "92b506860c1c5dc52f87c24c89921b05"
+ }
+ Frame {
+ msec: 3104
+ hash: "7b7e96113fa9359954be9b3ac87943c3"
+ }
+ Frame {
+ msec: 3120
+ hash: "42bc69db42c5df902038cec414246ec5"
+ }
+ Frame {
+ msec: 3136
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3152
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3168
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3184
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3200
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3216
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3232
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3248
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3264
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3280
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3296
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3312
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3328
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3344
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3360
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 87; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3376
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3392
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3408
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3424
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3440
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3456
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3472
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 87; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3488
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 3504
+ hash: "2d1aa011f2008a6147ba593e3cf272d7"
+ }
+ Frame {
+ msec: 3520
+ hash: "206699ea84ce9fd60c1603b7a48a5134"
+ }
+ Frame {
+ msec: 3536
+ hash: "68eb6df93a2b6db7023f7c3cc71d5b5f"
+ }
+ Frame {
+ msec: 3552
+ hash: "5a4cd0620959dde92eeeaaa4dcd13091"
+ }
+ Frame {
+ msec: 3568
+ hash: "17b763187a777253b25b22f5dd7253ae"
+ }
+ Frame {
+ msec: 3584
+ hash: "1de9dcf4d385266f4482e2d0967d9119"
+ }
+ Frame {
+ msec: 3600
+ hash: "833496add6dbc3103a28a47e453a738b"
+ }
+ Frame {
+ msec: 3616
+ hash: "b3bab2e9c56db60cd54e68369e6b790d"
+ }
+ Frame {
+ msec: 3632
+ hash: "ee91c6cd909bec401a1a7eebd10b8b02"
+ }
+ Frame {
+ msec: 3648
+ hash: "0ed679ad0ab7bd3544947bccda88647b"
+ }
+ Frame {
+ msec: 3664
+ hash: "d7dfcdc8a4233821919f1732d8c39712"
+ }
+ Frame {
+ msec: 3680
+ hash: "c52829ee689e4c312a9dff8dbd4a79f9"
+ }
+ Frame {
+ msec: 3696
+ hash: "7962badda0e80a61b67943d3b31f892d"
+ }
+ Frame {
+ msec: 3712
+ hash: "fc5f2c24e3d8743ab5b20aaa122bacc2"
+ }
+ Frame {
+ msec: 3728
+ hash: "201b9ee6c9ac6208ef812fe2e95020ef"
+ }
+ Frame {
+ msec: 3744
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 3760
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 3776
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 3792
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 3808
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 3824
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 3840
+ image: "reanchor.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 3872
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 3888
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 3904
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 3920
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 3936
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 3952
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 3968
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 3984
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4000
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4016
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4032
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4048
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4064
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4080
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4096
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4112
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4128
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4144
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4160
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4176
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4192
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4208
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4224
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4240
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4256
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4272
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4288
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4304
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4320
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4336
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4352
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4368
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4384
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4400
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4416
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4432
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4448
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4464
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4480
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4496
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4512
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4528
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 174; y: 174
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4544
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4560
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4576
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4592
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4608
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4624
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4640
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4656
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 174; y: 174
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4672
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 4688
+ hash: "5d38bf4a033de31985ae9989107908af"
+ }
+ Frame {
+ msec: 4704
+ hash: "ed1bd2abd42848ecd07f0f0654c2b80f"
+ }
+ Frame {
+ msec: 4720
+ hash: "588de6662123733303d93f62c6481f6a"
+ }
+ Frame {
+ msec: 4736
+ hash: "aae79c2fbb2fd1ac7efa9802bff40f95"
+ }
+ Frame {
+ msec: 4752
+ hash: "f17512798136f67f25aaa0aeb60678e1"
+ }
+ Frame {
+ msec: 4768
+ hash: "79578a1e0e3e9cd45c210d0c5d3e75d6"
+ }
+ Frame {
+ msec: 4784
+ hash: "5dad4ff201744cda6ff41f89414c8d11"
+ }
+ Frame {
+ msec: 4800
+ image: "reanchor.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "c4559982aa3f3d291364deed4bd96d65"
+ }
+ Frame {
+ msec: 4832
+ hash: "0dff03ea9154bdb2a813358b04cfbde9"
+ }
+ Frame {
+ msec: 4848
+ hash: "09bdf2869dee1c0cbe3c8c2e9254580b"
+ }
+ Frame {
+ msec: 4864
+ hash: "ba7762978bbd63d624029910fe16fb6d"
+ }
+ Frame {
+ msec: 4880
+ hash: "f00d198ab8f4f625b60e9e2071d8adfd"
+ }
+ Frame {
+ msec: 4896
+ hash: "adcec9c9a5b0d60cf45b2915365ea09c"
+ }
+ Frame {
+ msec: 4912
+ hash: "a65cd6fbb26d618692ef23148015a4f2"
+ }
+ Frame {
+ msec: 4928
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 4944
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 4960
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 4976
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 4992
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5008
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5024
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5040
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5056
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5072
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5088
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5104
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5120
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5136
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5152
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5168
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5184
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5200
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5216
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5232
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5248
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5264
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5280
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5296
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5312
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5328
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5344
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5360
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5376
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5392
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5408
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5424
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5440
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5456
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5472
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5488
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5504
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5520
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5536
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5552
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5568
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5584
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5600
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5616
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5632
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5648
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5664
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5680
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5696
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5712
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5728
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5744
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5760
+ image: "reanchor.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5792
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5808
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 95; y: 78
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5824
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5840
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5856
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5872
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5888
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5904
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5920
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5936
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 95; y: 78
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5952
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 5968
+ hash: "103bbc9ce594851f5243b103f8fef1c1"
+ }
+ Frame {
+ msec: 5984
+ hash: "c381148b052be2e6244f24c2292b89cf"
+ }
+ Frame {
+ msec: 6000
+ hash: "2fda1d635fa47bff7de867df3dadfb4f"
+ }
+ Frame {
+ msec: 6016
+ hash: "4d35e00af33ad5dc84998cda2d066b4e"
+ }
+ Frame {
+ msec: 6032
+ hash: "14005d52d372acf6d3495f69bbf00b7d"
+ }
+ Frame {
+ msec: 6048
+ hash: "29728f64d12e858d960c4e197824ef43"
+ }
+ Frame {
+ msec: 6064
+ hash: "798822f0c20ef87cb01fe1dcd76c7585"
+ }
+ Frame {
+ msec: 6080
+ hash: "4cdeea0f91587ef32a2c2e282f6d00e6"
+ }
+ Frame {
+ msec: 6096
+ hash: "08ca5d16771e58da6cdd20b86dc65f03"
+ }
+ Frame {
+ msec: 6112
+ hash: "e9aeb432709d275048ad9d84fb21db1a"
+ }
+ Frame {
+ msec: 6128
+ hash: "3b642f27d356fd1815dc50f8e750623d"
+ }
+ Frame {
+ msec: 6144
+ hash: "7c1db0ec278849ec044ea0aa3383075b"
+ }
+ Frame {
+ msec: 6160
+ hash: "da902850879c95d4ddffbb1ba0060f25"
+ }
+ Frame {
+ msec: 6176
+ hash: "e4053bd0db7752e7a47e096da645b69b"
+ }
+ Frame {
+ msec: 6192
+ hash: "aabbb6d34399818347db265151a547b7"
+ }
+ Frame {
+ msec: 6208
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6224
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6240
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6256
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6272
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6288
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6304
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6320
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6336
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6352
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6368
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6384
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6400
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6416
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6432
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6448
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6464
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6480
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6496
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6512
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6528
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6544
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6560
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6576
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6592
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6608
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6624
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6640
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6656
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6672
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6688
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6704
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6720
+ image: "reanchor.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6752
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6768
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6784
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6800
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6816
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6832
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6848
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6864
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6880
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6896
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6912
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6928
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6944
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6960
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6976
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 6992
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7008
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7024
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7040
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7056
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7072
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7088
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7104
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7120
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7136
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7152
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7168
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7184
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7200
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7216
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7232
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7248
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7264
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7280
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7296
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7312
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7328
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7344
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7360
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7376
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7392
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7408
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7424
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7440
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7456
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7472
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7488
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7504
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7520
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7536
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7552
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7568
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7584
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7600
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 86; y: 136
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7616
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7632
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7648
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Frame {
+ msec: 7664
+ hash: "213811853dbefdc418099721e3bf8651"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 86; y: 136
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7680
+ image: "reanchor.7.png"
+ }
+ Frame {
+ msec: 7696
+ hash: "c2d6dd91f3e9cdcacbadcb449c8a9896"
+ }
+ Frame {
+ msec: 7712
+ hash: "1098ea19aecebd71208e101d522c1981"
+ }
+ Frame {
+ msec: 7728
+ hash: "8cc59c20d796c073038518d2855fb6f0"
+ }
+ Frame {
+ msec: 7744
+ hash: "914a89d0cfdc68145024ce2305a5e76e"
+ }
+ Frame {
+ msec: 7760
+ hash: "7a2e3ca2660df24d9a6ec49a7422ebe1"
+ }
+ Frame {
+ msec: 7776
+ hash: "b71496d986d5f0aa76b4f1663627f1f7"
+ }
+ Frame {
+ msec: 7792
+ hash: "41b29a523db919bc0a4e0a9a88bfc873"
+ }
+ Frame {
+ msec: 7808
+ hash: "97632a0de766b9ffbf71f21eeb0ff9a2"
+ }
+ Frame {
+ msec: 7824
+ hash: "94cc196e62c150008461ff9996b4cae8"
+ }
+ Frame {
+ msec: 7840
+ hash: "32e96ad2d15fa2386d365ab249ddf4f4"
+ }
+ Frame {
+ msec: 7856
+ hash: "209394314f971b12fbc61ca45010cc62"
+ }
+ Frame {
+ msec: 7872
+ hash: "b917c2684dda8af00278b34ababdcf5c"
+ }
+ Frame {
+ msec: 7888
+ hash: "92b506860c1c5dc52f87c24c89921b05"
+ }
+ Frame {
+ msec: 7904
+ hash: "7b7e96113fa9359954be9b3ac87943c3"
+ }
+ Frame {
+ msec: 7920
+ hash: "42bc69db42c5df902038cec414246ec5"
+ }
+ Frame {
+ msec: 7936
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 7952
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 7968
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 7984
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8000
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8016
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8032
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8048
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8064
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8080
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8096
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8112
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8128
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8144
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8160
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8176
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8192
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8208
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8224
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8240
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8256
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8272
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8288
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8304
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8320
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8336
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8352
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8368
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8384
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8400
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 177; y: 173
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8416
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8432
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8448
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8464
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8480
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8496
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8512
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 177; y: 173
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8528
+ hash: "7eb4027421fd6aa7d668a704e40a6e61"
+ }
+ Frame {
+ msec: 8544
+ hash: "b4f30663a9b21e42375645e970f57d0b"
+ }
+ Frame {
+ msec: 8560
+ hash: "6c12dbf4af8801573515b61123d4b1d7"
+ }
+ Frame {
+ msec: 8576
+ hash: "facc61397c734bb4409d5664dc059a14"
+ }
+ Frame {
+ msec: 8592
+ hash: "897e15e37276454d11fac6a528e967a6"
+ }
+ Frame {
+ msec: 8608
+ hash: "cf8173519f1e042c227ff61c62308640"
+ }
+ Frame {
+ msec: 8624
+ hash: "d0fcda14ea4bcfebf04ccf99e292ac6a"
+ }
+ Frame {
+ msec: 8640
+ image: "reanchor.8.png"
+ }
+ Frame {
+ msec: 8656
+ hash: "74b4ababa97def538f5340e88a4419a4"
+ }
+ Frame {
+ msec: 8672
+ hash: "b96b5b64505b1814ddd42a52569d7fd9"
+ }
+ Frame {
+ msec: 8688
+ hash: "0e3e07aad030b2075c4bc61b02ebe49e"
+ }
+ Frame {
+ msec: 8704
+ hash: "c5eebc652c58e3a44d5ed481100ef242"
+ }
+ Frame {
+ msec: 8720
+ hash: "d4a74185304c126739af728ddda40e0c"
+ }
+ Frame {
+ msec: 8736
+ hash: "448572d3c1060b8311952429a7f9430d"
+ }
+ Frame {
+ msec: 8752
+ hash: "00f64c09657a8afd6caa186efb6ad860"
+ }
+ Frame {
+ msec: 8768
+ hash: "2a360e6feaaf303e9ee63145085796e6"
+ }
+ Frame {
+ msec: 8784
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 8800
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 8816
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 8832
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 8848
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 8864
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 8880
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 8896
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 8912
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 8928
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 8944
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 8960
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 8976
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 8992
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9008
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9024
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9040
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9056
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9072
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9088
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9104
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9120
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9136
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 9152
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9168
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9184
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9200
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9216
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9232
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9248
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9264
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9280
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9296
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+ Frame {
+ msec: 9312
+ hash: "1137e22c68e043950811dee295e19b04"
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/reanchor/reanchor.qml b/tests/auto/declarative/visual/animation/reanchor/reanchor.qml
new file mode 100644
index 0000000000..d80631fe6a
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/reanchor/reanchor.qml
@@ -0,0 +1,68 @@
+import Qt 4.6
+
+Rectangle {
+ id: container
+ width: 200; height: 200
+ Rectangle {
+ id: myRect
+ objectName: "MyRect"
+ color: "green";
+ anchors.left: parent.left
+ anchors.right: rightGuideline.left
+ anchors.top: topGuideline.top
+ anchors.bottom: container.bottom
+ }
+ Item { id: leftGuideline; x: 10 }
+ Item { id: rightGuideline; x: 150 }
+ Item { id: topGuideline; y: 10 }
+ Item { id: bottomGuideline; y: 150 }
+ Item { id: topGuideline2; y: 50 }
+ Item { id: bottomGuideline2; y: 175 }
+
+ MouseArea {
+ id: wholeArea
+ anchors.fill: parent
+ onClicked: {
+ if (container.state == "") {
+ container.state = "reanchored";
+ } else if (container.state == "reanchored") {
+ container.state = "reanchored2";
+ } else if (container.state == "reanchored2")
+ container.state = "reanchored";
+ }
+ }
+
+ states: [ State {
+ name: "reanchored"
+ AnchorChanges {
+ target: myRect;
+ left: leftGuideline.left
+ right: container.right
+ top: container.top
+ bottom: bottomGuideline.bottom
+ }
+ }, State {
+ name: "reanchored2"
+ AnchorChanges {
+ target: myRect;
+ reset: "left, right"
+ top: topGuideline2.top
+ bottom: bottomGuideline2.bottom
+ }
+ }]
+
+ transitions: Transition {
+ NumberAnimation { properties: "x,y,width,height" }
+ }
+
+ MouseArea {
+ width: 50; height: 50
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ onClicked: {
+ container.state = "";
+ }
+ }
+
+ state: "reanchored"
+}
diff --git a/tests/auto/declarative/visual/animation/scriptAction/data/scriptAction.0.png b/tests/auto/declarative/visual/animation/scriptAction/data/scriptAction.0.png
new file mode 100644
index 0000000000..64d6b06895
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/scriptAction/data/scriptAction.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/scriptAction/data/scriptAction.1.png b/tests/auto/declarative/visual/animation/scriptAction/data/scriptAction.1.png
new file mode 100644
index 0000000000..1a25c63ba1
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/scriptAction/data/scriptAction.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/scriptAction/data/scriptAction.qml b/tests/auto/declarative/visual/animation/scriptAction/data/scriptAction.qml
new file mode 100644
index 0000000000..01da490228
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/scriptAction/data/scriptAction.qml
@@ -0,0 +1,535 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 32
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 48
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 64
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 80
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 96
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 112
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 128
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 144
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 160
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 176
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 192
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 208
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 224
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 240
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 256
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 272
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 288
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 304
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 320
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 336
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 352
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 368
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 384
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 400
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 416
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 432
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 448
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 464
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 480
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 496
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 512
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 528
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 544
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 560
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 576
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 592
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 608
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 624
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 640
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 656
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 672
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 688
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 704
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 720
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 736
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 752
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 768
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 784
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 800
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 816
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 832
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 848
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 864
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 880
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 896
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 912
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 928
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 944
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 960
+ image: "scriptAction.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 992
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1008
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1024
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1040
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1056
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1072
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1088
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 146; y: 259
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1104
+ hash: "55b713dcb7c810bf126e06cc97d26d24"
+ }
+ Frame {
+ msec: 1120
+ hash: "9850cd8ed4643900409d1a87ef0bc4cf"
+ }
+ Frame {
+ msec: 1136
+ hash: "1cf03396b01e931e4e7e8e7e57e19c5f"
+ }
+ Frame {
+ msec: 1152
+ hash: "25fe648b85ec2d82621853dcbdbf695a"
+ }
+ Frame {
+ msec: 1168
+ hash: "1ca701e56fe387d5849f6933eb53aee9"
+ }
+ Frame {
+ msec: 1184
+ hash: "b39ecb792659a053a8985e2a849d6d51"
+ }
+ Frame {
+ msec: 1200
+ hash: "9a783432a054beec81cc5687f75a36dc"
+ }
+ Frame {
+ msec: 1216
+ hash: "edbd222d7ba6c6f819ded45fe316d461"
+ }
+ Frame {
+ msec: 1232
+ hash: "eaf20159c4b90f90872bbd514d3a0cec"
+ }
+ Frame {
+ msec: 1248
+ hash: "964807dd9b91e765577a773ef1ce2593"
+ }
+ Frame {
+ msec: 1264
+ hash: "16e12026ab14657b0f36b8315684455d"
+ }
+ Frame {
+ msec: 1280
+ hash: "d001a6b2fec3c66baaa45d9ff93b3f63"
+ }
+ Frame {
+ msec: 1296
+ hash: "fef11eb5f635bc11cd9679b7213b3b92"
+ }
+ Frame {
+ msec: 1312
+ hash: "0a0cd5f5004048d88712cfe6943470c0"
+ }
+ Frame {
+ msec: 1328
+ hash: "0d83178afdae5feaa9915d56c24373ad"
+ }
+ Frame {
+ msec: 1344
+ hash: "0a9e6e0b7b23ce93dc4e1f886cf9c7d1"
+ }
+ Frame {
+ msec: 1360
+ hash: "f3199d0c860f1236e0b9472bef8785bc"
+ }
+ Frame {
+ msec: 1376
+ hash: "f3199d0c860f1236e0b9472bef8785bc"
+ }
+ Frame {
+ msec: 1392
+ hash: "32ccdab249268b01d9f1658a736052f1"
+ }
+ Frame {
+ msec: 1408
+ hash: "dc98f32a1a2d6e74998123b5232107b0"
+ }
+ Frame {
+ msec: 1424
+ hash: "db3010ef552146df938c237f6c92bff5"
+ }
+ Frame {
+ msec: 1440
+ hash: "101e8595d0301e88376ec52ba9361f84"
+ }
+ Frame {
+ msec: 1456
+ hash: "119d548c59baa7e47266d2ceca663288"
+ }
+ Frame {
+ msec: 1472
+ hash: "f141fafe102a0b9a2bf33e8c3fc800ff"
+ }
+ Frame {
+ msec: 1488
+ hash: "b01f9ca8d4fbff17b3d48c70898a044d"
+ }
+ Frame {
+ msec: 1504
+ hash: "cf67954a2d1b22e8d2cfdc26419bafb8"
+ }
+ Frame {
+ msec: 1520
+ hash: "7680b2b5a63dea13d733947297e01355"
+ }
+ Frame {
+ msec: 1536
+ hash: "af1c017acf6b3c8cff86c9ceb60db3cb"
+ }
+ Frame {
+ msec: 1552
+ hash: "0b23ec51f71fddae5e2238ab5754f1db"
+ }
+ Frame {
+ msec: 1568
+ hash: "976643961ecbdc86335180ba812b874e"
+ }
+ Frame {
+ msec: 1584
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1600
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1616
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1632
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1648
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1664
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1680
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1696
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1712
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1728
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1744
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1760
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1776
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1792
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1808
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1824
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1840
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1856
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1872
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1888
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1904
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1920
+ image: "scriptAction.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1952
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1968
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 1984
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2000
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2016
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2032
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+ Frame {
+ msec: 2048
+ hash: "aeed60899abb6c486a5b1df81f9a0224"
+ }
+}
diff --git a/tests/auto/declarative/visual/animation/scriptAction/scriptAction.qml b/tests/auto/declarative/visual/animation/scriptAction/scriptAction.qml
new file mode 100644
index 0000000000..ef4ed76285
--- /dev/null
+++ b/tests/auto/declarative/visual/animation/scriptAction/scriptAction.qml
@@ -0,0 +1,35 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400; height: 400
+ Rectangle {
+ id: myRect
+ width: 100; height: 100
+ color: "red"
+ }
+ MouseArea {
+ id: clickable
+ anchors.fill: parent
+ }
+
+ states: State {
+ name: "state1"
+ when: clickable.pressed
+ PropertyChanges {
+ target: myRect
+ x: 50; y: 50
+ }
+ StateChangeScript {
+ name: "setColor"
+ script: myRect.color = "blue"
+ }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ NumberAnimation { properties: "x"; easing.type: "InOutQuad" }
+ ScriptAction { stateChangeScriptName: "setColor" }
+ NumberAnimation { properties: "y"; easing.type: "InOutQuad" }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/fillmode/data/fillmode.0.png b/tests/auto/declarative/visual/fillmode/data/fillmode.0.png
new file mode 100644
index 0000000000..9c9ceae0c8
--- /dev/null
+++ b/tests/auto/declarative/visual/fillmode/data/fillmode.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/fillmode/data/fillmode.qml b/tests/auto/declarative/visual/fillmode/data/fillmode.qml
new file mode 100644
index 0000000000..7ac6f511fb
--- /dev/null
+++ b/tests/auto/declarative/visual/fillmode/data/fillmode.qml
@@ -0,0 +1,279 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 32
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 48
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 64
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 80
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 96
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 112
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 128
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 144
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 160
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 176
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 192
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 208
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 224
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 240
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 256
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 272
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 288
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 304
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 320
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 336
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 352
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 368
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 384
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 400
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 416
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 432
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 448
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 464
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 480
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 496
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 512
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 528
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 544
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 560
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 576
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 592
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 608
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 624
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 640
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 656
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 672
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 688
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 704
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 720
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 736
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 752
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 768
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 784
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 800
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 816
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 832
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 848
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 864
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 880
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 896
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 912
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 928
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 944
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 960
+ image: "fillmode.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 992
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 1008
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 1024
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 1040
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+ Frame {
+ msec: 1056
+ hash: "c8cb8d51ca04231dc272133faaf2fb6d"
+ }
+}
diff --git a/tests/auto/declarative/visual/fillmode/face.png b/tests/auto/declarative/visual/fillmode/face.png
new file mode 100644
index 0000000000..9623b1ad15
--- /dev/null
+++ b/tests/auto/declarative/visual/fillmode/face.png
Binary files differ
diff --git a/tests/auto/declarative/visual/fillmode/fillmode.qml b/tests/auto/declarative/visual/fillmode/fillmode.qml
new file mode 100644
index 0000000000..8450bf29cd
--- /dev/null
+++ b/tests/auto/declarative/visual/fillmode/fillmode.qml
@@ -0,0 +1,16 @@
+import Qt 4.6
+
+Rectangle {
+ id: screen; width: 750; height: 600; color: "gray"
+ property string source: "face.png"
+
+ Grid {
+ columns: 3
+ Image { width: 250; height: 300; source: screen.source; fillMode: Image.Stretch }
+ Image { width: 250; height: 300; source: screen.source; fillMode: Image.PreserveAspectFit; smooth: true }
+ Image { width: 250; height: 300; source: screen.source; fillMode: Image.PreserveAspectCrop }
+ Image { width: 250; height: 300; source: screen.source; fillMode: Image.Tile; smooth: true }
+ Image { width: 250; height: 300; source: screen.source; fillMode: Image.TileHorizontally }
+ Image { width: 250; height: 300; source: screen.source; fillMode: Image.TileVertically }
+ }
+}
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test.0.png b/tests/auto/declarative/visual/focusscope/data-MAC/test.0.png
new file mode 100644
index 0000000000..0f33d99ccb
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test.1.png b/tests/auto/declarative/visual/focusscope/data-MAC/test.1.png
new file mode 100644
index 0000000000..0f33d99ccb
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test.2.png b/tests/auto/declarative/visual/focusscope/data-MAC/test.2.png
new file mode 100644
index 0000000000..06a3dbd45f
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test.3.png b/tests/auto/declarative/visual/focusscope/data-MAC/test.3.png
new file mode 100644
index 0000000000..e0d02d658b
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test.4.png b/tests/auto/declarative/visual/focusscope/data-MAC/test.4.png
new file mode 100644
index 0000000000..e0d02d658b
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test.5.png b/tests/auto/declarative/visual/focusscope/data-MAC/test.5.png
new file mode 100644
index 0000000000..e0d02d658b
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test.qml b/tests/auto/declarative/visual/focusscope/data-MAC/test.qml
new file mode 100644
index 0000000000..44900fc596
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test.qml
@@ -0,0 +1,1599 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 32
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 48
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 64
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 80
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 96
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 112
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 128
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 144
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 160
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 176
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 192
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 208
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 224
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 240
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 256
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 272
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 288
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 304
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 320
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 336
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 352
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 368
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 384
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 400
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 416
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 432
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 448
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 464
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 480
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 496
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 512
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 528
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 544
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 560
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 576
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 592
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 608
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 624
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 640
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 656
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 672
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 688
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 704
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 720
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 736
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 752
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 768
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 784
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 800
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 816
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 832
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 848
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 864
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 880
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 896
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 912
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 928
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 944
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 960
+ image: "test.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 992
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1008
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1024
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1040
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1056
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1072
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1088
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1104
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1120
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1136
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1152
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1168
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1184
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1200
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1216
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1232
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1248
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1264
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1280
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1296
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1312
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1328
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1344
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1360
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1376
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1392
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1408
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1424
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1440
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1456
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1472
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1488
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1504
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1520
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1536
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1552
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1568
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1584
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1600
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1616
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1632
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1648
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1664
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1680
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1696
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1712
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1728
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1744
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1760
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1776
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1792
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 1808
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1824
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1840
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1856
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1872
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1888
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1904
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1920
+ image: "test.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1952
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1968
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 1984
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2000
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2016
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2032
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2048
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2064
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2080
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2096
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2112
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2128
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2144
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2160
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2176
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2192
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2208
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2224
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2240
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2256
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2272
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2288
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2304
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2320
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2336
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 2352
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Key {
+ type: 6
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2368
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2384
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2400
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2416
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2432
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2448
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2464
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Key {
+ type: 7
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2480
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2496
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2512
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2528
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2544
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2560
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2576
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2592
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2608
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2624
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2640
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2656
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2672
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2688
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2704
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2720
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2736
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2752
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2768
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2784
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2800
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2816
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2832
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2848
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2864
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2880
+ image: "test.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2912
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2928
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2944
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2960
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 2976
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Key {
+ type: 6
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2992
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3008
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3024
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3040
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3056
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3072
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3088
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Key {
+ type: 7
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3104
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3120
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3136
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3152
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3168
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3184
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3200
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3216
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3232
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3248
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3264
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3280
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3296
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3312
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3328
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3344
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3360
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3376
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3392
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3408
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3424
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3440
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3456
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3472
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3488
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3504
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3520
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Frame {
+ msec: 3536
+ hash: "70f4ce2881f2340167f314b49716707a"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3552
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3568
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3584
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3600
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3616
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3632
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3648
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3664
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3680
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3696
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3712
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3728
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3744
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3760
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3776
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3792
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3808
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3824
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3840
+ image: "test.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3872
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3888
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3904
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3920
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3936
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3952
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3968
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 3984
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4000
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4016
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4032
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4048
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4064
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4080
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4096
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4112
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4128
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4144
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4160
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4176
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Key {
+ type: 6
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4192
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4208
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4224
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4240
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4256
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4272
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Key {
+ type: 7
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4288
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4304
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4320
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4336
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4352
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4368
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4384
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4400
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4416
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4432
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4448
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4464
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4480
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4496
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4512
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4528
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4544
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4560
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4576
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4592
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4608
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4624
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4640
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4656
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4672
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4688
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4704
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4720
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4736
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4752
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4768
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Frame {
+ msec: 4784
+ hash: "773f573d4b37181f7a784597a30cd73d"
+ }
+ Key {
+ type: 6
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4800
+ image: "test.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4832
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4848
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4864
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4880
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4896
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Key {
+ type: 7
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4912
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4928
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4944
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4960
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4976
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 4992
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5008
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5024
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5040
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5056
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5072
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5088
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5104
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5120
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5136
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5152
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5168
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5184
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5200
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5216
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5232
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5248
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5264
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5280
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5296
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5312
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5328
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5344
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5360
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5376
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5392
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5408
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5424
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5440
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5456
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5472
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5488
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5504
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5520
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5536
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5552
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5568
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5584
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5600
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5616
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5632
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5648
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5664
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5680
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5696
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5712
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5728
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5744
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5760
+ image: "test.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5792
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5808
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5824
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5840
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5856
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5872
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+ Frame {
+ msec: 5888
+ hash: "715a587be7a5803af2827e882236d187"
+ }
+}
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test2.0.png b/tests/auto/declarative/visual/focusscope/data-MAC/test2.0.png
new file mode 100644
index 0000000000..fa711c1b36
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test2.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test2.1.png b/tests/auto/declarative/visual/focusscope/data-MAC/test2.1.png
new file mode 100644
index 0000000000..fa711c1b36
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test2.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test2.qml b/tests/auto/declarative/visual/focusscope/data-MAC/test2.qml
new file mode 100644
index 0000000000..7837ad95d7
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test2.qml
@@ -0,0 +1,607 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 32
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 48
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 64
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 80
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 96
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 112
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 128
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 144
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 160
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 176
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 192
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 208
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 224
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 240
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 256
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 272
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 288
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 304
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 320
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 336
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 352
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 368
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 384
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 400
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 416
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 432
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 448
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 464
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 480
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 496
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 512
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 528
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 544
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 560
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 576
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 592
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 608
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 624
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 640
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 656
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 672
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 688
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 704
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 720
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 736
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 752
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 768
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 784
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 800
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 816
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 832
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 848
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 864
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 880
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 896
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 912
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 928
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 944
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 960
+ image: "test2.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 992
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1008
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1024
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1040
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1056
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1072
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1088
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1104
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1120
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1136
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1152
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1168
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1184
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1200
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1216
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1232
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1248
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1264
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1280
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1296
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1312
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1328
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1344
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1360
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1376
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1392
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1408
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1424
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1440
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1456
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1472
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1488
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1504
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1520
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1536
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1552
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1568
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1584
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1600
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1616
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1632
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1648
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1664
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1680
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1696
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1712
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1728
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1744
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1760
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1776
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1792
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1808
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1824
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1840
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1856
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1872
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1888
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1904
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1920
+ image: "test2.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1952
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1968
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 1984
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2000
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2016
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2032
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2048
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2064
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2080
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2096
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2112
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2128
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2144
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2160
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2176
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2192
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2208
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2224
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2240
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2256
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2272
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2288
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2304
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2320
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2336
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2352
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+ Frame {
+ msec: 2368
+ hash: "9ecdd4addcaea53cdca16f3496ceb15c"
+ }
+}
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test3.0.png b/tests/auto/declarative/visual/focusscope/data-MAC/test3.0.png
new file mode 100644
index 0000000000..9309e377bc
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test3.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test3.1.png b/tests/auto/declarative/visual/focusscope/data-MAC/test3.1.png
new file mode 100644
index 0000000000..20e6c8e062
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test3.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test3.2.png b/tests/auto/declarative/visual/focusscope/data-MAC/test3.2.png
new file mode 100644
index 0000000000..c7559ac646
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test3.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test3.3.png b/tests/auto/declarative/visual/focusscope/data-MAC/test3.3.png
new file mode 100644
index 0000000000..bf2844b7cc
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test3.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test3.4.png b/tests/auto/declarative/visual/focusscope/data-MAC/test3.4.png
new file mode 100644
index 0000000000..beef0bf9ec
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test3.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test3.5.png b/tests/auto/declarative/visual/focusscope/data-MAC/test3.5.png
new file mode 100644
index 0000000000..1847dc703a
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test3.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test3.6.png b/tests/auto/declarative/visual/focusscope/data-MAC/test3.6.png
new file mode 100644
index 0000000000..c7559ac646
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test3.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test3.7.png b/tests/auto/declarative/visual/focusscope/data-MAC/test3.7.png
new file mode 100644
index 0000000000..20e6c8e062
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test3.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test3.8.png b/tests/auto/declarative/visual/focusscope/data-MAC/test3.8.png
new file mode 100644
index 0000000000..9309e377bc
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test3.8.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test3.9.png b/tests/auto/declarative/visual/focusscope/data-MAC/test3.9.png
new file mode 100644
index 0000000000..7ac879b003
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test3.9.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-MAC/test3.qml b/tests/auto/declarative/visual/focusscope/data-MAC/test3.qml
new file mode 100644
index 0000000000..7308a2342b
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-MAC/test3.qml
@@ -0,0 +1,2879 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 32
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 48
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 64
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 80
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 96
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 112
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 128
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 144
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 160
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 176
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 192
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 208
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 224
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 240
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 256
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 272
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 288
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 304
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 320
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 336
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 352
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 368
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 384
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 400
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 416
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 432
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 448
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 464
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 480
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 496
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 512
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 528
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 544
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 560
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 576
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 592
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 608
+ hash: "ce962a38caeb7bf7eef05112fbb52f91"
+ }
+ Frame {
+ msec: 624
+ hash: "779f0660ce5bc2c2fc9f05d8b86158a8"
+ }
+ Frame {
+ msec: 640
+ hash: "615e07a3c83539321befb44aa8fac811"
+ }
+ Frame {
+ msec: 656
+ hash: "8a00b9f66ca7fdb0e4975f547025f873"
+ }
+ Frame {
+ msec: 672
+ hash: "43bbe82799b1d8453f89a7ef928b1e54"
+ }
+ Frame {
+ msec: 688
+ hash: "2cc468d6e14c27ff1c0bd6064ae47509"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 704
+ hash: "1dc9d1b95016ccbeaca5b7a867a5cc3a"
+ }
+ Frame {
+ msec: 720
+ hash: "f36734c91fe41a7947965dac97393ad4"
+ }
+ Frame {
+ msec: 736
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 752
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 768
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 784
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 800
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 816
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 832
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 848
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 864
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 880
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 896
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 912
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 928
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 944
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 960
+ image: "test3.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 992
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 1008
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 1024
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 1040
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 1056
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 1072
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 1088
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1104
+ hash: "1c29b3d1086b261c2a9e94d49567484f"
+ }
+ Frame {
+ msec: 1120
+ hash: "6ab17a210b45dae1ed99fd1689bb3e46"
+ }
+ Frame {
+ msec: 1136
+ hash: "feb504605f7f27ca3a2bf080c1fb1e19"
+ }
+ Frame {
+ msec: 1152
+ hash: "bec2d2e2222587a379af12a30e078886"
+ }
+ Frame {
+ msec: 1168
+ hash: "39cb2bdc44273023b557a0f56df61d85"
+ }
+ Frame {
+ msec: 1184
+ hash: "2cda045b452c4645be1cdb4efd238532"
+ }
+ Frame {
+ msec: 1200
+ hash: "1f3efbfadd22734b5fd656596c11885b"
+ }
+ Frame {
+ msec: 1216
+ hash: "7277c05a06e481a5af13e4fe39e322f8"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1232
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 1248
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 1264
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 1280
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 1296
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 1312
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 1328
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 1344
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 1360
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 1376
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 1392
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 1408
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 1424
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 1440
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 1456
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 1472
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 1488
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 1504
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 1520
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1536
+ hash: "c5f88e95ead1f4542b766577d80e70fd"
+ }
+ Frame {
+ msec: 1552
+ hash: "d38118f26b9c2b68dc8fdb8d2a959134"
+ }
+ Frame {
+ msec: 1568
+ hash: "44c483c899220f040aa7808f15fac429"
+ }
+ Frame {
+ msec: 1584
+ hash: "02a63967944c8c53a9741318e99a326e"
+ }
+ Frame {
+ msec: 1600
+ hash: "7fc10e91212af979e09c8d3b98625c1b"
+ }
+ Frame {
+ msec: 1616
+ hash: "d14b69d18adc548dfb68dae1559effdb"
+ }
+ Frame {
+ msec: 1632
+ hash: "cb9bce7fa14a367197fa34ad3acc4cdd"
+ }
+ Frame {
+ msec: 1648
+ hash: "105a0e3d36296eba16077c4cf93547ae"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1664
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1680
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1696
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1712
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1728
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1744
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1760
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1776
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1792
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1808
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1824
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1840
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1856
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1872
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1888
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1904
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1920
+ image: "test3.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1952
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1968
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 1984
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 2000
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2016
+ hash: "6e4e4321cda32abab394419a9e6494dc"
+ }
+ Frame {
+ msec: 2032
+ hash: "45b79c56379afa7243547fedfa3260db"
+ }
+ Frame {
+ msec: 2048
+ hash: "4635555c632f325a151d340a3eb742b9"
+ }
+ Frame {
+ msec: 2064
+ hash: "0255da44fa95548427139073c994234c"
+ }
+ Frame {
+ msec: 2080
+ hash: "eac0c428ea7b7aa55a469562d2cb3fd6"
+ }
+ Frame {
+ msec: 2096
+ hash: "06ab23a83a5900cfdde98d4563414511"
+ }
+ Frame {
+ msec: 2112
+ hash: "808e4a745c58872d52ec6a3e669aea5c"
+ }
+ Frame {
+ msec: 2128
+ hash: "e6231b43f93fd6ae3e0990def1168c39"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2144
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2160
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2176
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2192
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2208
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2224
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2240
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2256
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2272
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2288
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2304
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2320
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2336
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2352
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2368
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2384
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2400
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2416
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2432
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2448
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2464
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2480
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2496
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 2512
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2528
+ hash: "e1c32968e36cb95be250121187ddf13e"
+ }
+ Frame {
+ msec: 2544
+ hash: "70498453babe3ab5e0fec62bcd0ff332"
+ }
+ Frame {
+ msec: 2560
+ hash: "76fc1b1e6b22771bf08dfdd16b3f24e9"
+ }
+ Frame {
+ msec: 2576
+ hash: "c6be4f26750b8bc1a5b71ff381e462c6"
+ }
+ Frame {
+ msec: 2592
+ hash: "986f738d0f0f70b88f951d9f028ef61b"
+ }
+ Frame {
+ msec: 2608
+ hash: "2201ad4f92bcf24ab62d0ddb8b2a64c1"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2624
+ hash: "27e9a18cb70c8f2ab9e4dd7af321e8e4"
+ }
+ Frame {
+ msec: 2640
+ hash: "3a352127f49f8c589b7b7da1232caf6b"
+ }
+ Frame {
+ msec: 2656
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2672
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2688
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2704
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2720
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2736
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2752
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2768
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2784
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2800
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2816
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2832
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2848
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2864
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2880
+ image: "test3.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2912
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2928
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2944
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2960
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 2976
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2992
+ hash: "20f96d3fbef9d51d8b8a28a6d58fabb2"
+ }
+ Frame {
+ msec: 3008
+ hash: "1e5d888fd4685960b8ae0a79e2287e89"
+ }
+ Frame {
+ msec: 3024
+ hash: "2115c2e6689ce6669abf9f3741eb5df1"
+ }
+ Frame {
+ msec: 3040
+ hash: "c67949eb5f2210c6b2dad4ff352831ed"
+ }
+ Frame {
+ msec: 3056
+ hash: "d982500bee0a6f6fb0861fb3c32319eb"
+ }
+ Frame {
+ msec: 3072
+ hash: "ffb111084712d5ecf072ade52103b985"
+ }
+ Frame {
+ msec: 3088
+ hash: "e5d594c8f08b9d283a3998648a383332"
+ }
+ Frame {
+ msec: 3104
+ hash: "20632ba6a4c14386eb01167059f7b617"
+ }
+ Frame {
+ msec: 3120
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3136
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3152
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3168
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3184
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3200
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3216
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3232
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3248
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3264
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3280
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3296
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3312
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3328
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3344
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3360
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3376
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3392
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3408
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3424
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3440
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3456
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3472
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 3488
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3504
+ hash: "f60a72dd52f6f319706dc97f873a484f"
+ }
+ Frame {
+ msec: 3520
+ hash: "a21fbcbb3c0ede708f2862959b84654f"
+ }
+ Frame {
+ msec: 3536
+ hash: "40e5f7530391e7641498c7870ce986c9"
+ }
+ Frame {
+ msec: 3552
+ hash: "809daf15ad3e9f981f1306da18dd6872"
+ }
+ Frame {
+ msec: 3568
+ hash: "4b053d234c8c9a5afb7800abe28ea96f"
+ }
+ Frame {
+ msec: 3584
+ hash: "e011e3aaf143befc8e207945fdfc9f47"
+ }
+ Frame {
+ msec: 3600
+ hash: "55539d51f833b8a98fc14031a4a70c4c"
+ }
+ Frame {
+ msec: 3616
+ hash: "07c2b526c022d0deae61acba26d7ea24"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3632
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3648
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3664
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3680
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3696
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3712
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3728
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3744
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3760
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3776
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3792
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3808
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3824
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3840
+ image: "test3.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3872
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3888
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3904
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3920
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3936
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3952
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3968
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 3984
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4000
+ hash: "7d2f24d5a68397bedc2f9e3652715126"
+ }
+ Frame {
+ msec: 4016
+ hash: "55ff9205bb36d8f8965fb122a8686203"
+ }
+ Frame {
+ msec: 4032
+ hash: "8968377cbbdf7a46b6f13690826ac711"
+ }
+ Frame {
+ msec: 4048
+ hash: "8ce9afffac571f1a2cc6986d79dd2c8f"
+ }
+ Frame {
+ msec: 4064
+ hash: "f75c375cdf8e1b83398e9b18e7c39852"
+ }
+ Frame {
+ msec: 4080
+ hash: "20c8db7fb344c056465175ed0fa9518a"
+ }
+ Frame {
+ msec: 4096
+ hash: "8135c2cae0dcf8ee6eccbfdd7b711bc0"
+ }
+ Frame {
+ msec: 4112
+ hash: "659fc24d328058eb118be5613ea25257"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4128
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4144
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4160
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4176
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4192
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4208
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4224
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4240
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4256
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4272
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4288
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4304
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4320
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4336
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4352
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4368
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4384
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4400
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4416
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4432
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4448
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4464
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4480
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4496
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4512
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4528
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4544
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4560
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4576
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4592
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4608
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4624
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4640
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4656
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4672
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4688
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4704
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4720
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4736
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4752
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4768
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4784
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4800
+ image: "test3.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4832
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4848
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4864
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4880
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4896
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4912
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4928
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4944
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4960
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4976
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 4992
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 5008
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 5024
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 5040
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 5056
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 5072
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 5088
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Frame {
+ msec: 5104
+ hash: "ef9a34bf49c632be0f88f6658196dfe6"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5120
+ hash: "f01088d95d8409f98ae19b7970ecf3ad"
+ }
+ Frame {
+ msec: 5136
+ hash: "393987a9e22db77233465e3d08cfb244"
+ }
+ Frame {
+ msec: 5152
+ hash: "40e58eac132aa3b5f66f244ab7b189be"
+ }
+ Frame {
+ msec: 5168
+ hash: "d60c98c5fafe6bfa73a3d0c55f8f6716"
+ }
+ Frame {
+ msec: 5184
+ hash: "775733a71bb1d39f51b9fbc7e28d9ffe"
+ }
+ Frame {
+ msec: 5200
+ hash: "a343457f584c6e63aaec36b5db4fb7d0"
+ }
+ Frame {
+ msec: 5216
+ hash: "7c416bd1be54135056b037642026251f"
+ }
+ Frame {
+ msec: 5232
+ hash: "42813b6c3ef437a7b3ea8f03bb8b1894"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5248
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5264
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5280
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5296
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5312
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5328
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5344
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5360
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5376
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5392
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5408
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5424
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5440
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5456
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5472
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5488
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5504
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5520
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5536
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5552
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5568
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5584
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5600
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5616
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5632
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5648
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5664
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5680
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5696
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Frame {
+ msec: 5712
+ hash: "cc0ab553f98262662e52191e0b370486"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5728
+ hash: "b3af171ca40a5f081e2bfc984b8da551"
+ }
+ Frame {
+ msec: 5744
+ hash: "aadbc8c960fbe2e8aac184a99ba818bd"
+ }
+ Frame {
+ msec: 5760
+ image: "test3.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "99fc06589f09cd10cfdf748f032eacbd"
+ }
+ Frame {
+ msec: 5792
+ hash: "f7915b1a8b9f7188263180a97c8b355f"
+ }
+ Frame {
+ msec: 5808
+ hash: "7fb30728fb764b659bad5bb6c4e71e2c"
+ }
+ Frame {
+ msec: 5824
+ hash: "4882459350feffaed89c2296c74b839d"
+ }
+ Frame {
+ msec: 5840
+ hash: "917a368858e431bebcd8f2fda67401f8"
+ }
+ Frame {
+ msec: 5856
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5872
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 5888
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 5904
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 5920
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 5936
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 5952
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 5968
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 5984
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 6000
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 6016
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 6032
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 6048
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 6064
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 6080
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 6096
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 6112
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 6128
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 6144
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 6160
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 6176
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 6192
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 6208
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 6224
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 6240
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 6256
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Frame {
+ msec: 6272
+ hash: "bfd0497c6505d42aefe6341adb850d89"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6288
+ hash: "ada3c3558261701c705ecf79716df56a"
+ }
+ Frame {
+ msec: 6304
+ hash: "81c73fd3dd69eb767d8899a54c3088bb"
+ }
+ Frame {
+ msec: 6320
+ hash: "d54e7dd1e876666f64b5904240bf8764"
+ }
+ Frame {
+ msec: 6336
+ hash: "32bdeac66a43a967d549ca2ad8c59bbd"
+ }
+ Frame {
+ msec: 6352
+ hash: "04eec62cc40c8b31d989bead64909f9e"
+ }
+ Frame {
+ msec: 6368
+ hash: "cfffdd4edc35303ee260ed32956238b7"
+ }
+ Frame {
+ msec: 6384
+ hash: "fb562c38b9d2360517160f8a8ab29ced"
+ }
+ Frame {
+ msec: 6400
+ hash: "ba8ec8f0663bf1e62ff426b0c7d0d3b2"
+ }
+ Frame {
+ msec: 6416
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6432
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6448
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6464
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6480
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6496
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6512
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6528
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6544
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6560
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6576
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6592
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6608
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6624
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6640
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6656
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6672
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6688
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6704
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6720
+ image: "test3.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6752
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6768
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6784
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6800
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6816
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6832
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Frame {
+ msec: 6848
+ hash: "e3b2de8a4e3229880971d2144e55de1b"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6864
+ hash: "e6292a001405924f6d5f1a4051c3f6cb"
+ }
+ Frame {
+ msec: 6880
+ hash: "0d8a6b740cc7b33659aa0a1cc2bd2aa9"
+ }
+ Frame {
+ msec: 6896
+ hash: "07c4267ff499c46977420d4be7529e04"
+ }
+ Frame {
+ msec: 6912
+ hash: "f69cd14d97de3ca8d21ace1df1d5a523"
+ }
+ Frame {
+ msec: 6928
+ hash: "1572b31fd3ae917d5701d0b8f1d2a2bc"
+ }
+ Frame {
+ msec: 6944
+ hash: "e3953027fe269a5d4c6581717d516c65"
+ }
+ Frame {
+ msec: 6960
+ hash: "e35e8a5dfa7309696fa20c6f5480ac50"
+ }
+ Frame {
+ msec: 6976
+ hash: "77e75e66118f911c8fff084e1a825d77"
+ }
+ Frame {
+ msec: 6992
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7008
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7024
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7040
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7056
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7072
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7088
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7104
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7120
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7136
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7152
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7168
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7184
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7200
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7216
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7232
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7248
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7264
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7280
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7296
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7312
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7328
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7344
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7360
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7376
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7392
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7408
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7424
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Frame {
+ msec: 7440
+ hash: "e97f921f1c34246fc229c48a4b66466c"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7456
+ hash: "8588c30394737cebc5580fe024589b08"
+ }
+ Frame {
+ msec: 7472
+ hash: "ca150a32b22cad95696ecfbad0ed3e67"
+ }
+ Frame {
+ msec: 7488
+ hash: "7f980e0cf67927918b1244456c38c7c0"
+ }
+ Frame {
+ msec: 7504
+ hash: "2bc38fb34a6875aabddce0f460914612"
+ }
+ Frame {
+ msec: 7520
+ hash: "328257a4691f341db39ee5ca677693eb"
+ }
+ Frame {
+ msec: 7536
+ hash: "05e0d8c986ff81e23f253d56ebdef46e"
+ }
+ Frame {
+ msec: 7552
+ hash: "be95d74a42318c52ab73ce694436a58b"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7568
+ hash: "eba8512746494f3602d24dab86fb2559"
+ }
+ Frame {
+ msec: 7584
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7600
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7616
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7632
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7648
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7664
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7680
+ image: "test3.7.png"
+ }
+ Frame {
+ msec: 7696
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7712
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7728
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7744
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7760
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7776
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7792
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7808
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7824
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7840
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7856
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7872
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7888
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7904
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7920
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7936
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7952
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Frame {
+ msec: 7968
+ hash: "8f443766efd0f74e96e79ed3c267892c"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7984
+ hash: "7b2b3a84e9649370ce282383a820c39b"
+ }
+ Frame {
+ msec: 8000
+ hash: "08547adce7e02eec593fa636af004257"
+ }
+ Frame {
+ msec: 8016
+ hash: "29789cfbd1b648ce705cf17d03298ffe"
+ }
+ Frame {
+ msec: 8032
+ hash: "9e89ef84c86b1fc0531f0bd5ee530ba5"
+ }
+ Frame {
+ msec: 8048
+ hash: "21b437a318c5ef87c38f9199772eafa6"
+ }
+ Frame {
+ msec: 8064
+ hash: "70c8c8fbcf2d0331ca7ede8641a6068b"
+ }
+ Frame {
+ msec: 8080
+ hash: "c277e9d4f89e99d974d03dcfe41a1755"
+ }
+ Frame {
+ msec: 8096
+ hash: "54c7a72a3f814e707777c16ddd4532b8"
+ }
+ Frame {
+ msec: 8112
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 8128
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8144
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8160
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8176
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8192
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8208
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8224
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8240
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8256
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8272
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8288
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8304
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8320
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8336
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8352
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8368
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8384
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8400
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8416
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8432
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8448
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8464
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8480
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Frame {
+ msec: 8496
+ hash: "bdf37518633a43d8dc47245f5b68550b"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 8512
+ hash: "7992512c72fe530fdd92866c96de29a0"
+ }
+ Frame {
+ msec: 8528
+ hash: "ad29d3653790efb998ac137538b4ce09"
+ }
+ Frame {
+ msec: 8544
+ hash: "f6daf0ad7f7c970ece3dc1898ab9f092"
+ }
+ Frame {
+ msec: 8560
+ hash: "417143caa8ed86082ea4e40aca7ca26e"
+ }
+ Frame {
+ msec: 8576
+ hash: "5215943d1fbffd5ef7c16d4ca6587628"
+ }
+ Frame {
+ msec: 8592
+ hash: "d143c87d3cf7560f911e98869983efef"
+ }
+ Frame {
+ msec: 8608
+ hash: "1fcb9b3d3b4c888c65334b88e240d79c"
+ }
+ Frame {
+ msec: 8624
+ hash: "61cec1c227eafafe6c03a33591b1825e"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 8640
+ image: "test3.8.png"
+ }
+ Frame {
+ msec: 8656
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8672
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8688
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8704
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8720
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8736
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8752
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8768
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8784
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8800
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8816
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8832
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8848
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8864
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8880
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8896
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8912
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8928
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8944
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8960
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8976
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 8992
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 9008
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 9024
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 9040
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Frame {
+ msec: 9056
+ hash: "57e009de047c348d3ae14a6271b2e6f2"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 9072
+ hash: "fcbb907bcf41602a5c30e2843a4b1fff"
+ }
+ Frame {
+ msec: 9088
+ hash: "5fee95daaa629bbf0cec3e41cd693502"
+ }
+ Frame {
+ msec: 9104
+ hash: "b9d721d2a8b0867bab29817b99b8ec2d"
+ }
+ Frame {
+ msec: 9120
+ hash: "e518e9872a502d3b2ff74d209626c9ee"
+ }
+ Frame {
+ msec: 9136
+ hash: "9c535d7da59ed2f2ce116e70c3e165cf"
+ }
+ Frame {
+ msec: 9152
+ hash: "e54fbcb23e01d5842885b92d4493535b"
+ }
+ Frame {
+ msec: 9168
+ hash: "7ac2467f24cef06c8842460ffe813ee0"
+ }
+ Frame {
+ msec: 9184
+ hash: "276293e289db5c9c7cd9612c73ef7792"
+ }
+ Frame {
+ msec: 9200
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 9216
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9232
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9248
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9264
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9280
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9296
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9312
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9328
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9344
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9360
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9376
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9392
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9408
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9424
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9440
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9456
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9472
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9488
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9504
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9520
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9536
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9552
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9568
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9584
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9600
+ image: "test3.9.png"
+ }
+ Frame {
+ msec: 9616
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9632
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9648
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9664
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9680
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9696
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9712
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9728
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9744
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9760
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9776
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9792
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9808
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9824
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9840
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9856
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9872
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9888
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9904
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9920
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9936
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9952
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9968
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 9984
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10000
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10016
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10032
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10048
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10064
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10080
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10096
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10112
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10128
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10144
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10160
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10176
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10192
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10208
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10224
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10240
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10256
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10272
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10288
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10304
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10320
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10336
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10352
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10368
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 10384
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10400
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10416
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+ Frame {
+ msec: 10432
+ hash: "d38da3f61cd2944eec8bdfbef70c928f"
+ }
+}
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test.0.png b/tests/auto/declarative/visual/focusscope/data-X11/test.0.png
new file mode 100644
index 0000000000..f68f7dcf4a
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test.1.png b/tests/auto/declarative/visual/focusscope/data-X11/test.1.png
new file mode 100644
index 0000000000..f68f7dcf4a
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test.2.png b/tests/auto/declarative/visual/focusscope/data-X11/test.2.png
new file mode 100644
index 0000000000..e26c0289bb
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test.3.png b/tests/auto/declarative/visual/focusscope/data-X11/test.3.png
new file mode 100644
index 0000000000..9c4b2f2c50
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test.4.png b/tests/auto/declarative/visual/focusscope/data-X11/test.4.png
new file mode 100644
index 0000000000..9c4b2f2c50
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test.5.png b/tests/auto/declarative/visual/focusscope/data-X11/test.5.png
new file mode 100644
index 0000000000..9c4b2f2c50
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test.qml b/tests/auto/declarative/visual/focusscope/data-X11/test.qml
new file mode 100644
index 0000000000..93189fa6b3
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test.qml
@@ -0,0 +1,1599 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 32
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 48
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 64
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 80
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 96
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 112
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 128
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 144
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 160
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 176
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 192
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 208
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 224
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 240
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 256
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 272
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 288
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 304
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 320
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 336
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 352
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 368
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 384
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 400
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 416
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 432
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 448
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 464
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 480
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 496
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 512
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 528
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 544
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 560
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 576
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 592
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 608
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 624
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 640
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 656
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 672
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 688
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 704
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 720
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 736
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 752
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 768
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 784
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 800
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 816
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 832
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 848
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 864
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 880
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 896
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 912
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 928
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 944
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 960
+ image: "test.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 992
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1008
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1024
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1040
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1056
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1072
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1088
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1104
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1120
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1136
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1152
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1168
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1184
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1200
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1216
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1232
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1248
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1264
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1280
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1296
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1312
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1328
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1344
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1360
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1376
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1392
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1408
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1424
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1440
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1456
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1472
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1488
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1504
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1520
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1536
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1552
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1568
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1584
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1600
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1616
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1632
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1648
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1664
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1680
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1696
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1712
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1728
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1744
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1760
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1776
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1792
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 1808
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1824
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1840
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1856
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1872
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1888
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1904
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1920
+ image: "test.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1952
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1968
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 1984
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2000
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2016
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2032
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2048
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2064
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2080
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2096
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2112
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2128
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2144
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2160
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2176
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2192
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2208
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2224
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2240
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2256
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2272
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2288
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2304
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2320
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2336
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 2352
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Key {
+ type: 6
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2368
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2384
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2400
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2416
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2432
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2448
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2464
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Key {
+ type: 7
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2480
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2496
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2512
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2528
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2544
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2560
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2576
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2592
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2608
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2624
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2640
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2656
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2672
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2688
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2704
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2720
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2736
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2752
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2768
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2784
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2800
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2816
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2832
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2848
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2864
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2880
+ image: "test.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2912
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2928
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2944
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2960
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 2976
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Key {
+ type: 6
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2992
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3008
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3024
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3040
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3056
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3072
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3088
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Key {
+ type: 7
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3104
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3120
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3136
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3152
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3168
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3184
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3200
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3216
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3232
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3248
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3264
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3280
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3296
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3312
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3328
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3344
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3360
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3376
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3392
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3408
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3424
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3440
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3456
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3472
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3488
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3504
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3520
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Frame {
+ msec: 3536
+ hash: "cd2aced96da9032ddd5e2cacf27d045d"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3552
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3568
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3584
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3600
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3616
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3632
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3648
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3664
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3680
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3696
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3712
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3728
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3744
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3760
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3776
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3792
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3808
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3824
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3840
+ image: "test.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3872
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3888
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3904
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3920
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3936
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3952
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3968
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 3984
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4000
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4016
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4032
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4048
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4064
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4080
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4096
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4112
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4128
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4144
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4160
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4176
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Key {
+ type: 6
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4192
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4208
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4224
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4240
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4256
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4272
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Key {
+ type: 7
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4288
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4304
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4320
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4336
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4352
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4368
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4384
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4400
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4416
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4432
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4448
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4464
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4480
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4496
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4512
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4528
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4544
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4560
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4576
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4592
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4608
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4624
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4640
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4656
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4672
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4688
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4704
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4720
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4736
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4752
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4768
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Frame {
+ msec: 4784
+ hash: "9157e592069482e801a091aa69758d26"
+ }
+ Key {
+ type: 6
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4800
+ image: "test.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4832
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4848
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4864
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4880
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4896
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Key {
+ type: 7
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4912
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4928
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4944
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4960
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4976
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 4992
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5008
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5024
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5040
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5056
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5072
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5088
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5104
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5120
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5136
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5152
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5168
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5184
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5200
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5216
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5232
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5248
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5264
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5280
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5296
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5312
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5328
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5344
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5360
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5376
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5392
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5408
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5424
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5440
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5456
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5472
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5488
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5504
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5520
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5536
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5552
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5568
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5584
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5600
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5616
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5632
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5648
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5664
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5680
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5696
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5712
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5728
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5744
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5760
+ image: "test.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5792
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5808
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5824
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5840
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5856
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5872
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+ Frame {
+ msec: 5888
+ hash: "0de58b2460574baf17912e90ba8a89b2"
+ }
+}
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test2.0.png b/tests/auto/declarative/visual/focusscope/data-X11/test2.0.png
new file mode 100644
index 0000000000..6be7aeff8a
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test2.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test2.1.png b/tests/auto/declarative/visual/focusscope/data-X11/test2.1.png
new file mode 100644
index 0000000000..6be7aeff8a
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test2.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test2.qml b/tests/auto/declarative/visual/focusscope/data-X11/test2.qml
new file mode 100644
index 0000000000..71709073e0
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test2.qml
@@ -0,0 +1,607 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 32
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 48
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 64
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 80
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 96
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 112
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 128
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 144
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 160
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 176
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 192
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 208
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 224
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 240
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 256
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 272
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 288
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 304
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 320
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 336
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 352
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 368
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 384
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 400
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 416
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 432
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 448
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 464
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 480
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 496
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 512
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 528
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 544
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 560
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 576
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 592
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 608
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 624
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 640
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 656
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 672
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 688
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 704
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 720
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 736
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 752
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 768
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 784
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 800
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 816
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 832
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 848
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 864
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 880
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 896
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 912
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 928
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 944
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 960
+ image: "test2.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 992
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1008
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1024
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1040
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1056
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1072
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1088
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1104
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1120
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1136
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1152
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1168
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1184
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1200
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1216
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1232
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1248
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1264
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1280
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1296
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1312
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1328
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1344
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1360
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1376
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1392
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1408
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1424
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1440
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1456
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1472
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1488
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1504
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1520
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1536
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1552
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1568
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1584
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1600
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1616
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1632
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1648
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1664
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1680
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1696
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1712
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1728
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1744
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1760
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1776
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1792
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1808
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1824
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1840
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1856
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1872
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1888
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1904
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1920
+ image: "test2.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1952
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1968
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 1984
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2000
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2016
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2032
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2048
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2064
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2080
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2096
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2112
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2128
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2144
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2160
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2176
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2192
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2208
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2224
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2240
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2256
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2272
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2288
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2304
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2320
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2336
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2352
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+ Frame {
+ msec: 2368
+ hash: "529409797f67656145ea88544bb8cc9f"
+ }
+}
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test3.0.png b/tests/auto/declarative/visual/focusscope/data-X11/test3.0.png
new file mode 100644
index 0000000000..5f93c67072
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test3.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test3.1.png b/tests/auto/declarative/visual/focusscope/data-X11/test3.1.png
new file mode 100644
index 0000000000..3b4e0e68c8
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test3.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test3.2.png b/tests/auto/declarative/visual/focusscope/data-X11/test3.2.png
new file mode 100644
index 0000000000..54a393407c
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test3.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test3.3.png b/tests/auto/declarative/visual/focusscope/data-X11/test3.3.png
new file mode 100644
index 0000000000..4f08fd29a3
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test3.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test3.4.png b/tests/auto/declarative/visual/focusscope/data-X11/test3.4.png
new file mode 100644
index 0000000000..9aee1f859d
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test3.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test3.5.png b/tests/auto/declarative/visual/focusscope/data-X11/test3.5.png
new file mode 100644
index 0000000000..04eb05cce7
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test3.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test3.6.png b/tests/auto/declarative/visual/focusscope/data-X11/test3.6.png
new file mode 100644
index 0000000000..54a393407c
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test3.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test3.7.png b/tests/auto/declarative/visual/focusscope/data-X11/test3.7.png
new file mode 100644
index 0000000000..3b4e0e68c8
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test3.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test3.8.png b/tests/auto/declarative/visual/focusscope/data-X11/test3.8.png
new file mode 100644
index 0000000000..2df55dfe49
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test3.8.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test3.9.png b/tests/auto/declarative/visual/focusscope/data-X11/test3.9.png
new file mode 100644
index 0000000000..91816fd58f
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test3.9.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data-X11/test3.qml b/tests/auto/declarative/visual/focusscope/data-X11/test3.qml
new file mode 100644
index 0000000000..b1f628f91f
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data-X11/test3.qml
@@ -0,0 +1,2879 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 32
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 48
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 64
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 80
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 96
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 112
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 128
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 144
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 160
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 176
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 192
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 208
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 224
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 240
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 256
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 272
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 288
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 304
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 320
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 336
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 352
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 368
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 384
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 400
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 416
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 432
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 448
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 464
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 480
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 496
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 512
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 528
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 544
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 560
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 576
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 592
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 608
+ hash: "ed71dfbe146870d1a0869d60c35ff9d7"
+ }
+ Frame {
+ msec: 624
+ hash: "ed71dfbe146870d1a0869d60c35ff9d7"
+ }
+ Frame {
+ msec: 640
+ hash: "34796cef9feb92f7f0e2e8d837d87d34"
+ }
+ Frame {
+ msec: 656
+ hash: "64fa8f195b57077aa03ca264fec9554a"
+ }
+ Frame {
+ msec: 672
+ hash: "ae33318904415e937363787273ecb566"
+ }
+ Frame {
+ msec: 688
+ hash: "67c3e1c8c728e7677a3554aadd9795c9"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 704
+ hash: "1857db7aa9eefe429d50e5b2ad87064b"
+ }
+ Frame {
+ msec: 720
+ hash: "507883a03bef0bc20755da1474731fdf"
+ }
+ Frame {
+ msec: 736
+ hash: "dafe7464394460e04d482c1f7a1e9ad0"
+ }
+ Frame {
+ msec: 752
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 768
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 784
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 800
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 816
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 832
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 848
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 864
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 880
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 896
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 912
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 928
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 944
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 960
+ image: "test3.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 992
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 1008
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 1024
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 1040
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 1056
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 1072
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 1088
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1104
+ hash: "7fb8cb07b6bca30912706cec43984d92"
+ }
+ Frame {
+ msec: 1120
+ hash: "7fb8cb07b6bca30912706cec43984d92"
+ }
+ Frame {
+ msec: 1136
+ hash: "c1915978cda982f6062790b2a583211b"
+ }
+ Frame {
+ msec: 1152
+ hash: "afdb50d740b3dc7be44021d826be4302"
+ }
+ Frame {
+ msec: 1168
+ hash: "4682717b9375b4b02a70378ddca30885"
+ }
+ Frame {
+ msec: 1184
+ hash: "aede0eebb3948a4a764e255b892b09be"
+ }
+ Frame {
+ msec: 1200
+ hash: "b42a147daec14a3da2548fd4de3a9a44"
+ }
+ Frame {
+ msec: 1216
+ hash: "2ff70f916f78fe3c199eb96ceb44ce4e"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1232
+ hash: "707ac8e58d317b97113903b45a482f6b"
+ }
+ Frame {
+ msec: 1248
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 1264
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 1280
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 1296
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 1312
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 1328
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 1344
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 1360
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 1376
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 1392
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 1408
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 1424
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 1440
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 1456
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 1472
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 1488
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 1504
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 1520
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1536
+ hash: "91525556fe23764f58b3a3f38a29cd76"
+ }
+ Frame {
+ msec: 1552
+ hash: "91525556fe23764f58b3a3f38a29cd76"
+ }
+ Frame {
+ msec: 1568
+ hash: "d1dc625bbf46fc51aaf47969ad27a8a4"
+ }
+ Frame {
+ msec: 1584
+ hash: "7d868176c7a8363a79ef8b8f4da56867"
+ }
+ Frame {
+ msec: 1600
+ hash: "d239e0b0e118d351680c6b4b2bc5d3b2"
+ }
+ Frame {
+ msec: 1616
+ hash: "8f6d1640dbc655eb3b326c66fcb97d3c"
+ }
+ Frame {
+ msec: 1632
+ hash: "d52b623b8449d71734f72c7bd661a1c4"
+ }
+ Frame {
+ msec: 1648
+ hash: "f7c0c77f3b5ed71321edd6bc7b605512"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1664
+ hash: "8b26397ff1a83baa894f82594a12a190"
+ }
+ Frame {
+ msec: 1680
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 1696
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 1712
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 1728
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 1744
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 1760
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 1776
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 1792
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 1808
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 1824
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 1840
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 1856
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 1872
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 1888
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 1904
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 1920
+ image: "test3.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 1952
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 1968
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 1984
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 2000
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2016
+ hash: "f63308a7cd48a8cb4d413d17120f5a26"
+ }
+ Frame {
+ msec: 2032
+ hash: "f63308a7cd48a8cb4d413d17120f5a26"
+ }
+ Frame {
+ msec: 2048
+ hash: "2e97db8ed93524dc197e76cc2d270999"
+ }
+ Frame {
+ msec: 2064
+ hash: "2b135d90684c0f94b8219c4b835b6da9"
+ }
+ Frame {
+ msec: 2080
+ hash: "c700a76932bb3bf72868b9e95d095db2"
+ }
+ Frame {
+ msec: 2096
+ hash: "08136d3c3de44ddab23d2d136ba1f310"
+ }
+ Frame {
+ msec: 2112
+ hash: "de701d641e004b61a3c0609556f52fe0"
+ }
+ Frame {
+ msec: 2128
+ hash: "4f7acd87f4de119ad88a53d2c9881037"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2144
+ hash: "deaf3c8a4680ef6f52cb4674a97e0767"
+ }
+ Frame {
+ msec: 2160
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2176
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2192
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2208
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2224
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2240
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2256
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2272
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2288
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2304
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2320
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2336
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2352
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2368
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2384
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2400
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2416
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2432
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2448
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2464
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2480
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2496
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 2512
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2528
+ hash: "fe67b3a48a8a074377be64f619d5922a"
+ }
+ Frame {
+ msec: 2544
+ hash: "fe67b3a48a8a074377be64f619d5922a"
+ }
+ Frame {
+ msec: 2560
+ hash: "088691f4f46f7a8c9a3b8ea766d9a437"
+ }
+ Frame {
+ msec: 2576
+ hash: "bd747ea04c3b36378374f8ea1031458f"
+ }
+ Frame {
+ msec: 2592
+ hash: "2ebd0e3373eb75a3ad986e203952f78a"
+ }
+ Frame {
+ msec: 2608
+ hash: "b4d89e4f3aef9f351facd13bd83f3022"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2624
+ hash: "091de1bd1719e1fa6d914cf9708f4ac6"
+ }
+ Frame {
+ msec: 2640
+ hash: "0097d8ed156cb0c78c48dfacc557cba8"
+ }
+ Frame {
+ msec: 2656
+ hash: "faeb379e01283cb21ea695e96727918d"
+ }
+ Frame {
+ msec: 2672
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 2688
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 2704
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 2720
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 2736
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 2752
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 2768
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 2784
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 2800
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 2816
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 2832
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 2848
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 2864
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 2880
+ image: "test3.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 2912
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 2928
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 2944
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 2960
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 2976
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2992
+ hash: "b00a29d67edc26e75f5298b2836d4e47"
+ }
+ Frame {
+ msec: 3008
+ hash: "b00a29d67edc26e75f5298b2836d4e47"
+ }
+ Frame {
+ msec: 3024
+ hash: "6e47c87b5063877a609e8d23ddf2d314"
+ }
+ Frame {
+ msec: 3040
+ hash: "06f147a69c3e903905376ef1229290bf"
+ }
+ Frame {
+ msec: 3056
+ hash: "5f02ff1a1207f17efd224ccc800b0057"
+ }
+ Frame {
+ msec: 3072
+ hash: "6c0860fdb216bb79fd2da4647792628d"
+ }
+ Frame {
+ msec: 3088
+ hash: "eb579f67620adb762722428d44a1d841"
+ }
+ Frame {
+ msec: 3104
+ hash: "c579017a82e34a471a95f8a116a20b9e"
+ }
+ Frame {
+ msec: 3120
+ hash: "bb5c08ff104b230829579dfb8015bdcc"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3136
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3152
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3168
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3184
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3200
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3216
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3232
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3248
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3264
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3280
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3296
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3312
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3328
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3344
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3360
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3376
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3392
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3408
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3424
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3440
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3456
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3472
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 3488
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3504
+ hash: "5aa664f268433f2724a1ab2cea1d6d25"
+ }
+ Frame {
+ msec: 3520
+ hash: "5aa664f268433f2724a1ab2cea1d6d25"
+ }
+ Frame {
+ msec: 3536
+ hash: "9e4854fd0c533efa75aec7d9a8bc41dd"
+ }
+ Frame {
+ msec: 3552
+ hash: "c4eee4eca804007dca6e6d9379cbfb1b"
+ }
+ Frame {
+ msec: 3568
+ hash: "c59774f00d54c0353b41202a39fc0dbd"
+ }
+ Frame {
+ msec: 3584
+ hash: "910e6b5b05530c60874eee00df0d62cf"
+ }
+ Frame {
+ msec: 3600
+ hash: "5b606a7a697c6d53fbe42e33333f96cc"
+ }
+ Frame {
+ msec: 3616
+ hash: "e1fce42312e8a31d74add4a447dd3df9"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3632
+ hash: "6250cb9ea51309922cf0a6647593bfee"
+ }
+ Frame {
+ msec: 3648
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3664
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3680
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3696
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3712
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3728
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3744
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3760
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3776
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3792
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3808
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3824
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3840
+ image: "test3.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3872
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3888
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3904
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3920
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3936
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3952
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3968
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 3984
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4000
+ hash: "d6eecfb695deacae4bb2fe5adb2d5c3d"
+ }
+ Frame {
+ msec: 4016
+ hash: "d6eecfb695deacae4bb2fe5adb2d5c3d"
+ }
+ Frame {
+ msec: 4032
+ hash: "b48f481a8149c03139e29b619dbb3f3c"
+ }
+ Frame {
+ msec: 4048
+ hash: "994ba7fc208bbf081d54384d82d0fc07"
+ }
+ Frame {
+ msec: 4064
+ hash: "05d30293c12eb6a3e21cebd42bb1f383"
+ }
+ Frame {
+ msec: 4080
+ hash: "f2b4140a5d26f241a27e2a3027785559"
+ }
+ Frame {
+ msec: 4096
+ hash: "1189e519fd1611c5603e598fbcadca44"
+ }
+ Frame {
+ msec: 4112
+ hash: "ee98893d95e55cb76966c0cfe29d237b"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4128
+ hash: "9ff3010efeb8707c864def782405ad4c"
+ }
+ Frame {
+ msec: 4144
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4160
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4176
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4192
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4208
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4224
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4240
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4256
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4272
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4288
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4304
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4320
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4336
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4352
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4368
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4384
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4400
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4416
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4432
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4448
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4464
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4480
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4496
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4512
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4528
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4544
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4560
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4576
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4592
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4608
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4624
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4640
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4656
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4672
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4688
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4704
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4720
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4736
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4752
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4768
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4784
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4800
+ image: "test3.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4832
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4848
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4864
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4880
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4896
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4912
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4928
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4944
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4960
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4976
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 4992
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 5008
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 5024
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 5040
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 5056
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 5072
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 5088
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Frame {
+ msec: 5104
+ hash: "c842d544f87332bc133833e8966240ee"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5120
+ hash: "a857238777462319fcedd4f359ce1a04"
+ }
+ Frame {
+ msec: 5136
+ hash: "a857238777462319fcedd4f359ce1a04"
+ }
+ Frame {
+ msec: 5152
+ hash: "d9248d1257bf0232dcdf29fca7536ad1"
+ }
+ Frame {
+ msec: 5168
+ hash: "0405e029cc4b2fa80761c06fb8898b0d"
+ }
+ Frame {
+ msec: 5184
+ hash: "a36fb7e32e6aafbb84b62ef56be3cf70"
+ }
+ Frame {
+ msec: 5200
+ hash: "9846c73bbe57277bd36bbca1c489e644"
+ }
+ Frame {
+ msec: 5216
+ hash: "8f4840715082c48d520ddb55501cf8eb"
+ }
+ Frame {
+ msec: 5232
+ hash: "478fde3a6fd8cecc222b8c16743d231f"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5248
+ hash: "b2bb760c93d26c6db21ce6beccd36b66"
+ }
+ Frame {
+ msec: 5264
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5280
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5296
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5312
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5328
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5344
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5360
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5376
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5392
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5408
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5424
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5440
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5456
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5472
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5488
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5504
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5520
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5536
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5552
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5568
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5584
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5600
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5616
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5632
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5648
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5664
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5680
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5696
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Frame {
+ msec: 5712
+ hash: "1ef605e1a68ff993f4f971a85a6bee97"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5728
+ hash: "4780d8094833831f27d1aff3e0f9689f"
+ }
+ Frame {
+ msec: 5744
+ hash: "4780d8094833831f27d1aff3e0f9689f"
+ }
+ Frame {
+ msec: 5760
+ image: "test3.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "93c8d7980de378a055b7ca824882ae4e"
+ }
+ Frame {
+ msec: 5792
+ hash: "e0abe402f89c5d84e5a02f0e4bcbd5e3"
+ }
+ Frame {
+ msec: 5808
+ hash: "067ca20bcfab459a28af7e8dc2830032"
+ }
+ Frame {
+ msec: 5824
+ hash: "d27dc1a08c66cf5f4a84efe3be522ec3"
+ }
+ Frame {
+ msec: 5840
+ hash: "639f7555adc7958e807c2e774694fe25"
+ }
+ Frame {
+ msec: 5856
+ hash: "b55f5fcbc2284736695049b2cdc9c8ce"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5872
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 5888
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 5904
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 5920
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 5936
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 5952
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 5968
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 5984
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 6000
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 6016
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 6032
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 6048
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 6064
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 6080
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 6096
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 6112
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 6128
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 6144
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 6160
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 6176
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 6192
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 6208
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 6224
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 6240
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 6256
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Frame {
+ msec: 6272
+ hash: "f209867bbf74dbe0385655a522e322f1"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6288
+ hash: "48910947dd160b33251c54ff45f6a0db"
+ }
+ Frame {
+ msec: 6304
+ hash: "48910947dd160b33251c54ff45f6a0db"
+ }
+ Frame {
+ msec: 6320
+ hash: "20b0f988a1517d67a0d3c78ae8af4e5a"
+ }
+ Frame {
+ msec: 6336
+ hash: "355b5b161176c31bcbae198b1581f59b"
+ }
+ Frame {
+ msec: 6352
+ hash: "19cbb853a93bd062a53d7908df54bfbd"
+ }
+ Frame {
+ msec: 6368
+ hash: "13fbe723f288cffd09f0a86b71457161"
+ }
+ Frame {
+ msec: 6384
+ hash: "0014ed3b1a868cf75bfffedb52674c5c"
+ }
+ Frame {
+ msec: 6400
+ hash: "a1c444be02b90e69319096b8a508947d"
+ }
+ Frame {
+ msec: 6416
+ hash: "b88a3f2f3290e4262757b1f5741cb5ce"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6432
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6448
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6464
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6480
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6496
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6512
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6528
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6544
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6560
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6576
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6592
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6608
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6624
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6640
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6656
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6672
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6688
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6704
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6720
+ image: "test3.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6752
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6768
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6784
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6800
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6816
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6832
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Frame {
+ msec: 6848
+ hash: "dc708a762ba7f1120eb14105571943f8"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6864
+ hash: "a44bb76233c69780c178dddd79cc1968"
+ }
+ Frame {
+ msec: 6880
+ hash: "a44bb76233c69780c178dddd79cc1968"
+ }
+ Frame {
+ msec: 6896
+ hash: "154b11fd0468aa18d1ef1895f2e2923c"
+ }
+ Frame {
+ msec: 6912
+ hash: "fe7ecb02e63fbb7584405e7162f0ee21"
+ }
+ Frame {
+ msec: 6928
+ hash: "90b6fea69d106c628a9c7ff23a97e6c2"
+ }
+ Frame {
+ msec: 6944
+ hash: "3e233e837e24976d441b6cabc3b74098"
+ }
+ Frame {
+ msec: 6960
+ hash: "7a490f7be5c4c0ae09421f884e9adadb"
+ }
+ Frame {
+ msec: 6976
+ hash: "462d44603dd661ccf126c81197608056"
+ }
+ Frame {
+ msec: 6992
+ hash: "0b7ca73497c37255bccad6787d690236"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7008
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7024
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7040
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7056
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7072
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7088
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7104
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7120
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7136
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7152
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7168
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7184
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7200
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7216
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7232
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7248
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7264
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7280
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7296
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7312
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7328
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7344
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7360
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7376
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7392
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7408
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7424
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Frame {
+ msec: 7440
+ hash: "224ade5c942415100b5418a11d043611"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7456
+ hash: "95ff2a535a13fcdded94229d53848f7c"
+ }
+ Frame {
+ msec: 7472
+ hash: "95ff2a535a13fcdded94229d53848f7c"
+ }
+ Frame {
+ msec: 7488
+ hash: "d2386e4137632f15aa5ba9dd1a138a67"
+ }
+ Frame {
+ msec: 7504
+ hash: "9f2c40191c1a81f37543f5bfcb852bdf"
+ }
+ Frame {
+ msec: 7520
+ hash: "5facdbcc9d7ab0adfcb2ca9d1812a3f5"
+ }
+ Frame {
+ msec: 7536
+ hash: "7bbb08470e4f3eeabe710e0ea327c467"
+ }
+ Frame {
+ msec: 7552
+ hash: "630abf60d09d3a685d79e6da627b3aa2"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7568
+ hash: "d8aed706508814cdbd1ef0984f112b94"
+ }
+ Frame {
+ msec: 7584
+ hash: "d191c2dc3e2edd05bfd649dcfa51029e"
+ }
+ Frame {
+ msec: 7600
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7616
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7632
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7648
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7664
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7680
+ image: "test3.7.png"
+ }
+ Frame {
+ msec: 7696
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7712
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7728
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7744
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7760
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7776
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7792
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7808
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7824
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7840
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7856
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7872
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7888
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7904
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7920
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7936
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7952
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Frame {
+ msec: 7968
+ hash: "7ee37281a3f5788305f779bdd33852e5"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7984
+ hash: "fb386abfd73a3feb05b573d16ffa93f9"
+ }
+ Frame {
+ msec: 8000
+ hash: "fb386abfd73a3feb05b573d16ffa93f9"
+ }
+ Frame {
+ msec: 8016
+ hash: "fa1374155fc5427c72bd09ec5a315172"
+ }
+ Frame {
+ msec: 8032
+ hash: "ee35a3edf91865e28b16b9fcab8b4c1c"
+ }
+ Frame {
+ msec: 8048
+ hash: "10f2677f7c8efe9f64e401940dec3ef7"
+ }
+ Frame {
+ msec: 8064
+ hash: "b2c53bb14a8a6643e69cad2bbb4aacf4"
+ }
+ Frame {
+ msec: 8080
+ hash: "7b7c7d167aca55464d1874ed726ec646"
+ }
+ Frame {
+ msec: 8096
+ hash: "19a828ca70133801f1f470f6e348857b"
+ }
+ Frame {
+ msec: 8112
+ hash: "bc829873ea3cf8ca8484d990d4b80aa2"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 8128
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8144
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8160
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8176
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8192
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8208
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8224
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8240
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8256
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8272
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8288
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8304
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8320
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8336
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8352
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8368
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8384
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8400
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8416
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8432
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8448
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8464
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8480
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Frame {
+ msec: 8496
+ hash: "201b90bc27073e945bb00c85501f4dc8"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 8512
+ hash: "d0d487fd66bcf4177188d4862bd74bc0"
+ }
+ Frame {
+ msec: 8528
+ hash: "d0d487fd66bcf4177188d4862bd74bc0"
+ }
+ Frame {
+ msec: 8544
+ hash: "4a4c2e49e4852748916a4d68710e4ae6"
+ }
+ Frame {
+ msec: 8560
+ hash: "0135092d8a296b7121495cc3994a0f9d"
+ }
+ Frame {
+ msec: 8576
+ hash: "7e004aae70236568d635ba929e085b2b"
+ }
+ Frame {
+ msec: 8592
+ hash: "3e6a4f60a57515a6bfe4d803c7c22da8"
+ }
+ Frame {
+ msec: 8608
+ hash: "142b866861f539837b0bdabaf48028e7"
+ }
+ Frame {
+ msec: 8624
+ hash: "32a4757602c923366566d9005c78f6cf"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 8640
+ image: "test3.8.png"
+ }
+ Frame {
+ msec: 8656
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8672
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8688
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8704
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8720
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8736
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8752
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8768
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8784
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8800
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8816
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8832
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8848
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8864
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8880
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8896
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8912
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8928
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8944
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8960
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8976
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 8992
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 9008
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 9024
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 9040
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Frame {
+ msec: 9056
+ hash: "358a3fbfa70526a40f2179cb2fd100d4"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 9072
+ hash: "b1dc330f31b064f1e3ff4e913773cde8"
+ }
+ Frame {
+ msec: 9088
+ hash: "b1dc330f31b064f1e3ff4e913773cde8"
+ }
+ Frame {
+ msec: 9104
+ hash: "a0419dede71451f36c93960c8ef8c00c"
+ }
+ Frame {
+ msec: 9120
+ hash: "b8141758fc93aa1b286fd60f91e6fa7e"
+ }
+ Frame {
+ msec: 9136
+ hash: "8b0d786f239c545be3f51622c336f1e1"
+ }
+ Frame {
+ msec: 9152
+ hash: "25ec52efac83de4f8cade8f257b93b8e"
+ }
+ Frame {
+ msec: 9168
+ hash: "5a1476841b9aaa0e85c397c0447be352"
+ }
+ Frame {
+ msec: 9184
+ hash: "d648b0911e6ab78e53121fde8b66b50b"
+ }
+ Frame {
+ msec: 9200
+ hash: "f552863ff4b76286d03240409c0a928b"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 9216
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9232
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9248
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9264
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9280
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9296
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9312
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9328
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9344
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9360
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9376
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9392
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9408
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9424
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9440
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9456
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9472
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9488
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9504
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9520
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9536
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9552
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9568
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9584
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9600
+ image: "test3.9.png"
+ }
+ Frame {
+ msec: 9616
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9632
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9648
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9664
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9680
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9696
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9712
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9728
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9744
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9760
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9776
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9792
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9808
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9824
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9840
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9856
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9872
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9888
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9904
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9920
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9936
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9952
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9968
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 9984
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10000
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10016
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10032
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10048
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10064
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10080
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10096
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10112
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10128
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10144
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10160
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10176
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10192
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10208
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10224
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10240
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10256
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10272
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10288
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10304
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10320
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10336
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10352
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10368
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 10384
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10400
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10416
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+ Frame {
+ msec: 10432
+ hash: "f3b4cab7975190f756c923f16ce4c298"
+ }
+}
diff --git a/tests/auto/declarative/visual/focusscope/data/test.0.png b/tests/auto/declarative/visual/focusscope/data/test.0.png
new file mode 100644
index 0000000000..67b99e0069
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data/test.1.png b/tests/auto/declarative/visual/focusscope/data/test.1.png
new file mode 100644
index 0000000000..67b99e0069
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data/test.2.png b/tests/auto/declarative/visual/focusscope/data/test.2.png
new file mode 100644
index 0000000000..69f036619d
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data/test.3.png b/tests/auto/declarative/visual/focusscope/data/test.3.png
new file mode 100644
index 0000000000..afe0bd95c6
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data/test.4.png b/tests/auto/declarative/visual/focusscope/data/test.4.png
new file mode 100644
index 0000000000..afe0bd95c6
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data/test.5.png b/tests/auto/declarative/visual/focusscope/data/test.5.png
new file mode 100644
index 0000000000..afe0bd95c6
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data/test.qml b/tests/auto/declarative/visual/focusscope/data/test.qml
new file mode 100644
index 0000000000..d86c034505
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test.qml
@@ -0,0 +1,1599 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 32
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 48
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 64
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 80
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 96
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 112
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 128
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 144
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 160
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 176
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 192
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 208
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 224
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 240
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 256
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 272
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 288
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 304
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 320
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 336
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 352
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 368
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 384
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 400
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 416
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 432
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 448
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 464
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 480
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 496
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 512
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 528
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 544
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 560
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 576
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 592
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 608
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 624
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 640
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 656
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 672
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 688
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 704
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 720
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 736
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 752
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 768
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 784
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 800
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 816
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 832
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 848
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 864
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 880
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 896
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 912
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 928
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 944
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 960
+ image: "test.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 992
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1008
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1024
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1040
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1056
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1072
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1088
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1104
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1120
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1136
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1152
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1168
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1184
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1200
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1216
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1232
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1248
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1264
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1280
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1296
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1312
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1328
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1344
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1360
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1376
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1392
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1408
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1424
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1440
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1456
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1472
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1488
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1504
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1520
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1536
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1552
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1568
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1584
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1600
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1616
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1632
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1648
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1664
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1680
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1696
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1712
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1728
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1744
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1760
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1776
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1792
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 1808
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1824
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1840
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1856
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1872
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1888
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1904
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1920
+ image: "test.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1952
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1968
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 1984
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2000
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2016
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2032
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2048
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2064
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2080
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2096
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2112
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2128
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2144
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2160
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2176
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2192
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2208
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2224
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2240
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2256
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2272
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2288
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2304
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2320
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2336
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 2352
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Key {
+ type: 6
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2368
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2384
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2400
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2416
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2432
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2448
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2464
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Key {
+ type: 7
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2480
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2496
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2512
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2528
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2544
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2560
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2576
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2592
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2608
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2624
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2640
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2656
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2672
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2688
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2704
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2720
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2736
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2752
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2768
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2784
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2800
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2816
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2832
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2848
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2864
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2880
+ image: "test.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2912
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2928
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2944
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2960
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 2976
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Key {
+ type: 6
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2992
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3008
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3024
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3040
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3056
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3072
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3088
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Key {
+ type: 7
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3104
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3120
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3136
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3152
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3168
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3184
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3200
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3216
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3232
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3248
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3264
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3280
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3296
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3312
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3328
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3344
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3360
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3376
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3392
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3408
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3424
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3440
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3456
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3472
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3488
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3504
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3520
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Frame {
+ msec: 3536
+ hash: "e7722f02692fbae81b9ec78547e1e4e9"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3552
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3568
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3584
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3600
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3616
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3632
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3648
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3664
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3680
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3696
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3712
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3728
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3744
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3760
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3776
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3792
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3808
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3824
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3840
+ image: "test.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3872
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3888
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3904
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3920
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3936
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3952
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3968
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 3984
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4000
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4016
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4032
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4048
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4064
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4080
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4096
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4112
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4128
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4144
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4160
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4176
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Key {
+ type: 6
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4192
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4208
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4224
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4240
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4256
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4272
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Key {
+ type: 7
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4288
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4304
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4320
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4336
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4352
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4368
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4384
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4400
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4416
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4432
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4448
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4464
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4480
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4496
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4512
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4528
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4544
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4560
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4576
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4592
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4608
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4624
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4640
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4656
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4672
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4688
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4704
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4720
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4736
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4752
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4768
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Frame {
+ msec: 4784
+ hash: "7e4814e27214ecbeb55992e319a88102"
+ }
+ Key {
+ type: 6
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4800
+ image: "test.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4832
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4848
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4864
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4880
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4896
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Key {
+ type: 7
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4912
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4928
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4944
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4960
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4976
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 4992
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5008
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5024
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5040
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5056
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5072
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5088
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5104
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5120
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5136
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5152
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5168
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5184
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5200
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5216
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5232
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5248
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5264
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5280
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5296
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5312
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5328
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5344
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5360
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5376
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5392
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5408
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5424
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5440
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5456
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5472
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5488
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5504
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5520
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5536
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5552
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5568
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5584
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5600
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5616
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5632
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5648
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5664
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5680
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5696
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5712
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5728
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5744
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5760
+ image: "test.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5792
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5808
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5824
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5840
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5856
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5872
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+ Frame {
+ msec: 5888
+ hash: "6f85c2226e6e408f4699762f687b83e1"
+ }
+}
diff --git a/tests/auto/declarative/visual/focusscope/data/test2.0.png b/tests/auto/declarative/visual/focusscope/data/test2.0.png
new file mode 100644
index 0000000000..555a968175
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test2.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data/test2.1.png b/tests/auto/declarative/visual/focusscope/data/test2.1.png
new file mode 100644
index 0000000000..555a968175
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test2.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data/test2.qml b/tests/auto/declarative/visual/focusscope/data/test2.qml
new file mode 100644
index 0000000000..fedc96ab9d
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test2.qml
@@ -0,0 +1,607 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 32
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 48
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 64
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 80
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 96
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 112
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 128
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 144
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 160
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 176
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 192
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 208
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 224
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 240
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 256
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 272
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 288
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 304
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 320
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 336
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 352
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 368
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 384
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 400
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 416
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 432
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 448
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 464
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 480
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 496
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 512
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 528
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 544
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 560
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 576
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 592
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 608
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 624
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 640
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 656
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 672
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 688
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 704
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 720
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 736
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 752
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 768
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 784
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 800
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 816
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 832
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 848
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 864
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 880
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 896
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 912
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 928
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 944
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 960
+ image: "test2.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 992
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1008
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1024
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1040
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1056
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1072
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1088
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1104
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1120
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1136
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1152
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1168
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1184
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1200
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1216
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1232
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1248
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1264
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1280
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1296
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1312
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1328
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1344
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1360
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1376
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1392
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1408
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1424
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1440
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1456
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1472
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1488
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1504
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1520
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1536
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1552
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1568
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1584
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1600
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1616
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1632
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1648
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1664
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1680
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1696
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1712
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1728
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1744
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1760
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1776
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1792
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1808
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1824
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1840
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1856
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1872
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1888
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1904
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1920
+ image: "test2.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1952
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1968
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 1984
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2000
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2016
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2032
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2048
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2064
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2080
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2096
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2112
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2128
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2144
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2160
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2176
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2192
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2208
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2224
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2240
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2256
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2272
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2288
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2304
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2320
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2336
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2352
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+ Frame {
+ msec: 2368
+ hash: "bb4131579c66dc948f2e27e236deb4ab"
+ }
+}
diff --git a/tests/auto/declarative/visual/focusscope/data/test3.0.png b/tests/auto/declarative/visual/focusscope/data/test3.0.png
new file mode 100644
index 0000000000..374acf556c
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test3.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data/test3.1.png b/tests/auto/declarative/visual/focusscope/data/test3.1.png
new file mode 100644
index 0000000000..b75cb10861
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test3.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data/test3.2.png b/tests/auto/declarative/visual/focusscope/data/test3.2.png
new file mode 100644
index 0000000000..9b2f919afe
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test3.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data/test3.3.png b/tests/auto/declarative/visual/focusscope/data/test3.3.png
new file mode 100644
index 0000000000..bf630326a6
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test3.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data/test3.4.png b/tests/auto/declarative/visual/focusscope/data/test3.4.png
new file mode 100644
index 0000000000..6981a06544
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test3.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data/test3.5.png b/tests/auto/declarative/visual/focusscope/data/test3.5.png
new file mode 100644
index 0000000000..5856325169
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test3.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data/test3.6.png b/tests/auto/declarative/visual/focusscope/data/test3.6.png
new file mode 100644
index 0000000000..9b2f919afe
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test3.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data/test3.7.png b/tests/auto/declarative/visual/focusscope/data/test3.7.png
new file mode 100644
index 0000000000..b75cb10861
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test3.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data/test3.8.png b/tests/auto/declarative/visual/focusscope/data/test3.8.png
new file mode 100644
index 0000000000..374acf556c
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test3.8.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data/test3.9.png b/tests/auto/declarative/visual/focusscope/data/test3.9.png
new file mode 100644
index 0000000000..11a08bdea0
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test3.9.png
Binary files differ
diff --git a/tests/auto/declarative/visual/focusscope/data/test3.qml b/tests/auto/declarative/visual/focusscope/data/test3.qml
new file mode 100644
index 0000000000..8ce79447d1
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/data/test3.qml
@@ -0,0 +1,2879 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 32
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 48
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 64
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 80
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 96
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 112
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 128
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 144
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 160
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 176
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 192
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 208
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 224
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 240
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 256
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 272
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 288
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 304
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 320
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 336
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 352
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 368
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 384
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 400
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 416
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 432
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 448
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 464
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 480
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 496
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 512
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 528
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 544
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 560
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 576
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 592
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 608
+ hash: "c114718c158f107e8a7d06bf49d30855"
+ }
+ Frame {
+ msec: 624
+ hash: "c71bf3c6ef7addc3c1f55e3f92c001ac"
+ }
+ Frame {
+ msec: 640
+ hash: "b075c33ed606041dfb57a03f92cf5574"
+ }
+ Frame {
+ msec: 656
+ hash: "1933a060fc0b889082df94054a2d3c7e"
+ }
+ Frame {
+ msec: 672
+ hash: "cc4133e796a242493538131c789c392c"
+ }
+ Frame {
+ msec: 688
+ hash: "cbc16ad8bcb8dcf73ae101ca4899adac"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 704
+ hash: "1a5e008ef5640ad85a19b307244a36f7"
+ }
+ Frame {
+ msec: 720
+ hash: "6a0c9d0f3ac068d65d590c844dae4ebb"
+ }
+ Frame {
+ msec: 736
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 752
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 768
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 784
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 800
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 816
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 832
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 848
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 864
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 880
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 896
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 912
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 928
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 944
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 960
+ image: "test3.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 992
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 1008
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 1024
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 1040
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 1056
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 1072
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 1088
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1104
+ hash: "ac2f6e2f5f379ad8717aa3754f2aab80"
+ }
+ Frame {
+ msec: 1120
+ hash: "e896c5b5a4fd121e5c25aba0a17c11f3"
+ }
+ Frame {
+ msec: 1136
+ hash: "1d1228cf0b205e46a969a0016245bb9e"
+ }
+ Frame {
+ msec: 1152
+ hash: "d07b1d53655e549c503223fddfa62038"
+ }
+ Frame {
+ msec: 1168
+ hash: "d774614f13d1a19eff3c451c4abce7e5"
+ }
+ Frame {
+ msec: 1184
+ hash: "0e8445283c961a41c22ede2f26ab0d0c"
+ }
+ Frame {
+ msec: 1200
+ hash: "f85ced79a9d521b70b093d43d1335914"
+ }
+ Frame {
+ msec: 1216
+ hash: "3f70531768847686f202336827ed5c51"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1232
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 1248
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 1264
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 1280
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 1296
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 1312
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 1328
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 1344
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 1360
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 1376
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 1392
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 1408
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 1424
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 1440
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 1456
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 1472
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 1488
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 1504
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 1520
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1536
+ hash: "c59557a62fb22756ecae00bf36589f19"
+ }
+ Frame {
+ msec: 1552
+ hash: "c2938aac121e121eb138b2cdc485a23c"
+ }
+ Frame {
+ msec: 1568
+ hash: "aa582bd07789a0ce000bb014b4924969"
+ }
+ Frame {
+ msec: 1584
+ hash: "59d7a7fed20a11ecb12de08c77f0f303"
+ }
+ Frame {
+ msec: 1600
+ hash: "9a1d7649e44e2c2436855b92abbae030"
+ }
+ Frame {
+ msec: 1616
+ hash: "e46c47a221da37bbdffcdf671e84774b"
+ }
+ Frame {
+ msec: 1632
+ hash: "85ff7ef61ef08dc97065b0536f9f8766"
+ }
+ Frame {
+ msec: 1648
+ hash: "1159f274e5c2947875484d04a3ac6694"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1664
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1680
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1696
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1712
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1728
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1744
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1760
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1776
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1792
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1808
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1824
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1840
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1856
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1872
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1888
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1904
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1920
+ image: "test3.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1952
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1968
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 1984
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 2000
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2016
+ hash: "26e5e7612374c7a4f7ac26a284c735b4"
+ }
+ Frame {
+ msec: 2032
+ hash: "03c63a8bab380ebcd02f2bf2f588df85"
+ }
+ Frame {
+ msec: 2048
+ hash: "1a7c4738de4f1123c7e639c935095476"
+ }
+ Frame {
+ msec: 2064
+ hash: "8362cb8a253dcb2e9ef7fb070579d639"
+ }
+ Frame {
+ msec: 2080
+ hash: "8fae548ad1f2e16738c14636b905efef"
+ }
+ Frame {
+ msec: 2096
+ hash: "05fca78fea63817204b2303495baaec7"
+ }
+ Frame {
+ msec: 2112
+ hash: "5bf7b04177db667f23f1bc4f0066bc44"
+ }
+ Frame {
+ msec: 2128
+ hash: "aa10d0614604f0563d4fc458b7bb9260"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2144
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2160
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2176
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2192
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2208
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2224
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2240
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2256
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2272
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2288
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2304
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2320
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2336
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2352
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2368
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2384
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2400
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2416
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2432
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2448
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2464
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2480
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2496
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 2512
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2528
+ hash: "1823a5c00778550c6b46416e6a2b730f"
+ }
+ Frame {
+ msec: 2544
+ hash: "7ca64f71eee9d3a926335de026be5fe2"
+ }
+ Frame {
+ msec: 2560
+ hash: "5f9e44b8374a490793b479440ce3b701"
+ }
+ Frame {
+ msec: 2576
+ hash: "b0969884a9654d87da9941fb9eb4c99a"
+ }
+ Frame {
+ msec: 2592
+ hash: "aeadf244a67b3c9e5c119b52aa0f15a0"
+ }
+ Frame {
+ msec: 2608
+ hash: "2d990e5ae8d3660079bdea7f2b5245a7"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2624
+ hash: "5998faffa17f9ffbf1cb39cdc09cdd54"
+ }
+ Frame {
+ msec: 2640
+ hash: "bf8089df5d863f627cd44294f322d796"
+ }
+ Frame {
+ msec: 2656
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2672
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2688
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2704
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2720
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2736
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2752
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2768
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2784
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2800
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2816
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2832
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2848
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2864
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2880
+ image: "test3.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2912
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2928
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2944
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2960
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 2976
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2992
+ hash: "d707cb6e2587eecba275d1e7ceb9d020"
+ }
+ Frame {
+ msec: 3008
+ hash: "fddd144d4d2e475330ff87f4e6febe35"
+ }
+ Frame {
+ msec: 3024
+ hash: "06115e65296d1a77ab956cd3984303ee"
+ }
+ Frame {
+ msec: 3040
+ hash: "6881ec448625fdc23f1241bd60362460"
+ }
+ Frame {
+ msec: 3056
+ hash: "d94fdfd178377328e3b840c32f774958"
+ }
+ Frame {
+ msec: 3072
+ hash: "d2cba0b3aac8002aa2de51f7b1442985"
+ }
+ Frame {
+ msec: 3088
+ hash: "c0ea81cddf6b1f5b4b4157dade6b8ca0"
+ }
+ Frame {
+ msec: 3104
+ hash: "964a80740cc7ba474d5d10b76cca1b14"
+ }
+ Frame {
+ msec: 3120
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3136
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3152
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3168
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3184
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3200
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3216
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3232
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3248
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3264
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3280
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3296
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3312
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3328
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3344
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3360
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3376
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3392
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3408
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3424
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3440
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3456
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3472
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 3488
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3504
+ hash: "56634199c96e5c4588c2954f0595fcaa"
+ }
+ Frame {
+ msec: 3520
+ hash: "a51221b77045e51cba2b0913546961cb"
+ }
+ Frame {
+ msec: 3536
+ hash: "9910569a15164882056802e5ecfaef42"
+ }
+ Frame {
+ msec: 3552
+ hash: "17080817e0b23212828d2cee23eff98f"
+ }
+ Frame {
+ msec: 3568
+ hash: "791fee9758645fe21fe52918e5435f7d"
+ }
+ Frame {
+ msec: 3584
+ hash: "e0fcea2889a4825075322524025a4bdf"
+ }
+ Frame {
+ msec: 3600
+ hash: "825f58093f328182fa32b3cbc573101f"
+ }
+ Frame {
+ msec: 3616
+ hash: "550972282584bd52108728290bd4aa5e"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3632
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3648
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3664
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3680
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3696
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3712
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3728
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3744
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3760
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3776
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3792
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3808
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3824
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3840
+ image: "test3.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3872
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3888
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3904
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3920
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3936
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3952
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3968
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 3984
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4000
+ hash: "a2386a0135e8ffd9f2ac12345ede3553"
+ }
+ Frame {
+ msec: 4016
+ hash: "9550cdc0032bc3ea0a611f2584f43cca"
+ }
+ Frame {
+ msec: 4032
+ hash: "3f39909102a04f0e41a97b10dde4425a"
+ }
+ Frame {
+ msec: 4048
+ hash: "535d56a4d450cf0222f94573a88bbf80"
+ }
+ Frame {
+ msec: 4064
+ hash: "c4b782cfb9399689b0cbfc2a97305984"
+ }
+ Frame {
+ msec: 4080
+ hash: "23604b04198d53e0ba4a0955d8bcf124"
+ }
+ Frame {
+ msec: 4096
+ hash: "a440962d680f70eb47af38a91390b8c0"
+ }
+ Frame {
+ msec: 4112
+ hash: "da4b079f00248a073ce49f749ff0cc77"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4128
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4144
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4160
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4176
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4192
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4208
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4224
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4240
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4256
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4272
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4288
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4304
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4320
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4336
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4352
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4368
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4384
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4400
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4416
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4432
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4448
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4464
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4480
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4496
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4512
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4528
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4544
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4560
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4576
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4592
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4608
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4624
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4640
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4656
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4672
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4688
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4704
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4720
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4736
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4752
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4768
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4784
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4800
+ image: "test3.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4832
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4848
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4864
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4880
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4896
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4912
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4928
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4944
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4960
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4976
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 4992
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 5008
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 5024
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 5040
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 5056
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 5072
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 5088
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Frame {
+ msec: 5104
+ hash: "861a8438a60e8a937d96f6b11fa1e3b3"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5120
+ hash: "58be5253b74ac1cecf08714e670e30af"
+ }
+ Frame {
+ msec: 5136
+ hash: "a8e15f6e28a67941730f9cfe8ea7f0ff"
+ }
+ Frame {
+ msec: 5152
+ hash: "f1bfd2e2cd3a3ff08ae36e785d33e626"
+ }
+ Frame {
+ msec: 5168
+ hash: "b61fd5c58ddaf806e72d77bed92e91f3"
+ }
+ Frame {
+ msec: 5184
+ hash: "f192f6b779fa6bdfd4bc9c8671dd3147"
+ }
+ Frame {
+ msec: 5200
+ hash: "1cf034cfdfe3cafa832e28950c90d67b"
+ }
+ Frame {
+ msec: 5216
+ hash: "b0d2223f7f2c302784654f03cb3a5c1c"
+ }
+ Frame {
+ msec: 5232
+ hash: "19d089ac37fd42c1be99facd38a954e3"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5248
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5264
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5280
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5296
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5312
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5328
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5344
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5360
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5376
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5392
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5408
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5424
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5440
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5456
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5472
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5488
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5504
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5520
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5536
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5552
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5568
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5584
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5600
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5616
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5632
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5648
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5664
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5680
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5696
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Frame {
+ msec: 5712
+ hash: "0cf213791ef1263f9dfc867df96e8211"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5728
+ hash: "51db47388acad98d18a8a2aaca279dba"
+ }
+ Frame {
+ msec: 5744
+ hash: "c83747a4356fa12593020452dbf43fe8"
+ }
+ Frame {
+ msec: 5760
+ image: "test3.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "39d476722de92703d0a2259b5c62554e"
+ }
+ Frame {
+ msec: 5792
+ hash: "3f01e465470c3d5ab58b52f3e1517374"
+ }
+ Frame {
+ msec: 5808
+ hash: "63570753ba8c5f1525bf4cee38e8cad8"
+ }
+ Frame {
+ msec: 5824
+ hash: "31beab91ef4cadcf0b379b32786530ac"
+ }
+ Frame {
+ msec: 5840
+ hash: "46cd2e22eb4ef988752e2b3441bdd450"
+ }
+ Frame {
+ msec: 5856
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5872
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 5888
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 5904
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 5920
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 5936
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 5952
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 5968
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 5984
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 6000
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 6016
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 6032
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 6048
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 6064
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 6080
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 6096
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 6112
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 6128
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 6144
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 6160
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 6176
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 6192
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 6208
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 6224
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 6240
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 6256
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Frame {
+ msec: 6272
+ hash: "3e44d7064e55c510401b5008a06d9b82"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6288
+ hash: "78c4aaf2427e0aa9b6d11ddf95df55f7"
+ }
+ Frame {
+ msec: 6304
+ hash: "d4859df2de6afa90c1997b1b4d6448ab"
+ }
+ Frame {
+ msec: 6320
+ hash: "f885e6a8cc09d06985a83f60e29a0a34"
+ }
+ Frame {
+ msec: 6336
+ hash: "41f27dbf80b0bc00498962162a5fe9db"
+ }
+ Frame {
+ msec: 6352
+ hash: "41800797032deeed5ccc87375b4093cb"
+ }
+ Frame {
+ msec: 6368
+ hash: "253276d23d8a0f195155361a27403496"
+ }
+ Frame {
+ msec: 6384
+ hash: "274bf40aacababde8fde71abf065d1aa"
+ }
+ Frame {
+ msec: 6400
+ hash: "86071a6486d35d3c10f318ab6bac7577"
+ }
+ Frame {
+ msec: 6416
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6432
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6448
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6464
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6480
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6496
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6512
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6528
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6544
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6560
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6576
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6592
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6608
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6624
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6640
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6656
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6672
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6688
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6704
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6720
+ image: "test3.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6752
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6768
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6784
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6800
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6816
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6832
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Frame {
+ msec: 6848
+ hash: "f75305426b87e1cdc325ae6668367be9"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6864
+ hash: "eea514e956369c55f9fe9bfc5b8bbda4"
+ }
+ Frame {
+ msec: 6880
+ hash: "b28436abb5ce17310b63ed96a7034000"
+ }
+ Frame {
+ msec: 6896
+ hash: "40c656f467200785a951dd8f98cf28f5"
+ }
+ Frame {
+ msec: 6912
+ hash: "38c6c6b29c9a7f0eba87a538a336c338"
+ }
+ Frame {
+ msec: 6928
+ hash: "b3f939577616f8ded1e11ee6e6dce882"
+ }
+ Frame {
+ msec: 6944
+ hash: "d72b00208712f039a5d7a06fbfacd4bd"
+ }
+ Frame {
+ msec: 6960
+ hash: "c7a079a37f6bd7a8da706e6ba5d048ee"
+ }
+ Frame {
+ msec: 6976
+ hash: "561cdf098bdc35fc852fbe8fff2471e2"
+ }
+ Frame {
+ msec: 6992
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7008
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7024
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7040
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7056
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7072
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7088
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7104
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7120
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7136
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7152
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7168
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7184
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7200
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7216
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7232
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7248
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7264
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7280
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7296
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7312
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7328
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7344
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7360
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7376
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7392
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7408
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7424
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Frame {
+ msec: 7440
+ hash: "0461d0e31648d2c155bee0145094c153"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7456
+ hash: "096530df53ed21214cf93381ac0d23ea"
+ }
+ Frame {
+ msec: 7472
+ hash: "36e7cee0725fb16c5d7e08875a3b88f7"
+ }
+ Frame {
+ msec: 7488
+ hash: "a2b68c7e9e4ef04c1429190d01a3288b"
+ }
+ Frame {
+ msec: 7504
+ hash: "6ee23f5d2c0ddc21499c8685ae46df64"
+ }
+ Frame {
+ msec: 7520
+ hash: "dc423d32154882b99b7bde596697c83a"
+ }
+ Frame {
+ msec: 7536
+ hash: "e82852d1d2a21f67029870601b00b124"
+ }
+ Frame {
+ msec: 7552
+ hash: "7cd2773c33d7f34feb3b1e4752f63753"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7568
+ hash: "2371f0ddf1b0ddcdb36f24e72b62d3a5"
+ }
+ Frame {
+ msec: 7584
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7600
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7616
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7632
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7648
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7664
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7680
+ image: "test3.7.png"
+ }
+ Frame {
+ msec: 7696
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7712
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7728
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7744
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7760
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7776
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7792
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7808
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7824
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7840
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7856
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7872
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7888
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7904
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7920
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7936
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7952
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Frame {
+ msec: 7968
+ hash: "113dd40f9b5c9869ad04a00dda9078c6"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7984
+ hash: "93fd3abe0b99ed76d880f6f059636335"
+ }
+ Frame {
+ msec: 8000
+ hash: "a273ec355c79968013c70aca1b2d5737"
+ }
+ Frame {
+ msec: 8016
+ hash: "6b2df83c0645530ca007cde136838725"
+ }
+ Frame {
+ msec: 8032
+ hash: "47d5ed89f7e9c89df33bab14ca967f77"
+ }
+ Frame {
+ msec: 8048
+ hash: "c777e0d1a1f03e7a1bc16483f98c0622"
+ }
+ Frame {
+ msec: 8064
+ hash: "ac7e693d7dbc8e8ff2318cb611b68b76"
+ }
+ Frame {
+ msec: 8080
+ hash: "593e9711ae94a5b4f49544e0cf26d188"
+ }
+ Frame {
+ msec: 8096
+ hash: "afce51158cb19dd6ae8c72ce19964251"
+ }
+ Frame {
+ msec: 8112
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 8128
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8144
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8160
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8176
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8192
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8208
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8224
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8240
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8256
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8272
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8288
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8304
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8320
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8336
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8352
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8368
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8384
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8400
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8416
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8432
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8448
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8464
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8480
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Frame {
+ msec: 8496
+ hash: "30c5f9005238542c83b2d994cb61de16"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 8512
+ hash: "136c689aca9aa0cf957035137a926653"
+ }
+ Frame {
+ msec: 8528
+ hash: "b7418e46bca4bc8c953c15b03c23ec89"
+ }
+ Frame {
+ msec: 8544
+ hash: "e99575fe130e741f13329704303b76ca"
+ }
+ Frame {
+ msec: 8560
+ hash: "a2b7d528f9c145c4db0845bc76b3571f"
+ }
+ Frame {
+ msec: 8576
+ hash: "77f8beccd0134b8991ddb2ac92d64ecb"
+ }
+ Frame {
+ msec: 8592
+ hash: "fc359bc56852093020084af44987746a"
+ }
+ Frame {
+ msec: 8608
+ hash: "9f3479a702bc79062fff916678e974f1"
+ }
+ Frame {
+ msec: 8624
+ hash: "55c8c91ff26671f9f3049f1e1aaf5958"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 8640
+ image: "test3.8.png"
+ }
+ Frame {
+ msec: 8656
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8672
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8688
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8704
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8720
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8736
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8752
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8768
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8784
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8800
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8816
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8832
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8848
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8864
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8880
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8896
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8912
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8928
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8944
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8960
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8976
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 8992
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 9008
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 9024
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 9040
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Frame {
+ msec: 9056
+ hash: "216a02433edb100e6ff3db4944f6b061"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 9072
+ hash: "367ee34ab6a6cb0197e064db85638be7"
+ }
+ Frame {
+ msec: 9088
+ hash: "c61db7f2c0402a63efe779bec816a7db"
+ }
+ Frame {
+ msec: 9104
+ hash: "29d4d2679a502a1cb8a21807c43153c2"
+ }
+ Frame {
+ msec: 9120
+ hash: "3f531d4111efbbac256d4281db1fdeba"
+ }
+ Frame {
+ msec: 9136
+ hash: "9f343d8b4dc12cc7ab5ae1ff08067baf"
+ }
+ Frame {
+ msec: 9152
+ hash: "eb29b7d6ef2b5507425b2c30ddb58fa8"
+ }
+ Frame {
+ msec: 9168
+ hash: "883c0d35567deb6de9125441da89a1fe"
+ }
+ Frame {
+ msec: 9184
+ hash: "7c25e95ea2b38288b5ba5737108ef5d1"
+ }
+ Frame {
+ msec: 9200
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 9216
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9232
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9248
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9264
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9280
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9296
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9312
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9328
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9344
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9360
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9376
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9392
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9408
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9424
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9440
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9456
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9472
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9488
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9504
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9520
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9536
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9552
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9568
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9584
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9600
+ image: "test3.9.png"
+ }
+ Frame {
+ msec: 9616
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9632
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9648
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9664
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9680
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9696
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9712
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9728
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9744
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9760
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9776
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9792
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9808
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9824
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9840
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9856
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9872
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9888
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9904
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9920
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9936
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9952
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9968
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 9984
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10000
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10016
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10032
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10048
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10064
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10080
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10096
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10112
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10128
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10144
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10160
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10176
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10192
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10208
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10224
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10240
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10256
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10272
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10288
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10304
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10320
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10336
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10352
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10368
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 10384
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10400
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10416
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+ Frame {
+ msec: 10432
+ hash: "f192b84337784a6d31c309af7e32b5f7"
+ }
+}
diff --git a/tests/auto/declarative/visual/focusscope/test.qml b/tests/auto/declarative/visual/focusscope/test.qml
new file mode 100644
index 0000000000..401c7dc0b2
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/test.qml
@@ -0,0 +1,76 @@
+import Qt 4.6
+
+Rectangle {
+ color: "white"
+ width: 800
+ height: 600
+
+ Keys.onDigit9Pressed: console.log("Error - Root")
+
+ FocusScope {
+ id: myScope
+ focus: true
+
+ Keys.onDigit9Pressed: console.log("Error - FocusScope")
+
+ Rectangle {
+ height: 120
+ width: 420
+
+ color: "transparent"
+ border.width: 5
+ border.color: myScope.wantsFocus?"blue":"black"
+
+ Rectangle {
+ id: item1
+ x: 10; y: 10
+ width: 100; height: 100; color: "green"
+ border.width: 5
+ border.color: wantsFocus?"blue":"black"
+ Keys.onDigit9Pressed: console.log("Top Left");
+ KeyNavigation.right: item2
+ focus: true
+
+ Rectangle {
+ width: 50; height: 50; anchors.centerIn: parent
+ color: parent.focus?"red":"transparent"
+ }
+ }
+
+ Rectangle {
+ id: item2
+ x: 310; y: 10
+ width: 100; height: 100; color: "green"
+ border.width: 5
+ border.color: wantsFocus?"blue":"black"
+ KeyNavigation.left: item1
+ Keys.onDigit9Pressed: console.log("Top Right");
+
+ Rectangle {
+ width: 50; height: 50; anchors.centerIn: parent
+ color: parent.focus?"red":"transparent"
+ }
+ }
+ }
+ KeyNavigation.down: item3
+ }
+
+ Text { x:100; y:170; text: "Blue border indicates scoped focus\nBlack border indicates NOT scoped focus\nRed box indicates active focus\nUse arrow keys to navigate\nPress \"9\" to print currently focused item" }
+
+ Rectangle {
+ id: item3
+ x: 10; y: 300
+ width: 100; height: 100; color: "green"
+ border.width: 5
+ border.color: wantsFocus?"blue":"black"
+
+ Keys.onDigit9Pressed: console.log("Bottom Left");
+ KeyNavigation.up: myScope
+
+ Rectangle {
+ width: 50; height: 50; anchors.centerIn: parent
+ color: parent.focus?"red":"transparent"
+ }
+ }
+
+}
diff --git a/tests/auto/declarative/visual/focusscope/test2.qml b/tests/auto/declarative/visual/focusscope/test2.qml
new file mode 100644
index 0000000000..5b6971aaa3
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/test2.qml
@@ -0,0 +1,40 @@
+import Qt 4.6
+
+Rectangle {
+ color: "white"
+ width: 800
+ height: 600
+
+ Text { text: "All five rectangles should be red" }
+
+ FocusScope {
+ y: 100
+ focus: true
+ Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+
+ FocusScope {
+ y: 100
+ focus: true
+ Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+
+ FocusScope {
+ y: 100
+ focus: true
+ Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+
+ FocusScope {
+ y: 100
+ focus: true
+ Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+
+ FocusScope {
+ y: 100
+ focus: true
+ Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
+ }
+ }
+ }
+ }
+ }
+
+}
diff --git a/tests/auto/declarative/visual/focusscope/test3.qml b/tests/auto/declarative/visual/focusscope/test3.qml
new file mode 100644
index 0000000000..855bdc52c1
--- /dev/null
+++ b/tests/auto/declarative/visual/focusscope/test3.qml
@@ -0,0 +1,52 @@
+import Qt 4.6
+
+Rectangle {
+ color: "white"
+ width: 800
+ height: 600
+
+ Listmodel {
+ id: model
+ ListElement { name: "1" }
+ ListElement { name: "2" }
+ ListElement { name: "3" }
+ ListElement { name: "4" }
+ ListElement { name: "5" }
+ ListElement { name: "6" }
+ ListElement { name: "7" }
+ ListElement { name: "8" }
+ ListElement { name: "9" }
+ }
+
+ Component {
+ id: verticalDelegate
+ FocusScope {
+ id: root
+ width: 50; height: 50;
+ Keys.onDigit9Pressed: console.log("Error - " + name)
+ Rectangle {
+ focus: true
+ Keys.onDigit9Pressed: console.log(name)
+ width: 50; height: 50;
+ color: root.ListView.isCurrentItem?"red":"green"
+ Text { text: name; anchors.centerIn: parent }
+ }
+ }
+ }
+
+ ListView {
+ width: 800; height: 50; orientation: "Horizontal"
+ focus: true
+ model: model
+ delegate: verticalDelegate
+ preferredHighlightBegin: 100
+ preferredHighlightEnd: 101
+ highlightRangeMode: ListView.StrictlyEnforceRange
+ }
+
+
+ Text {
+ y: 100; x: 50
+ text: "Currently selected element should be red\nPressing \"9\" should print the number of the currently selected item\nBe sure to scroll all the way to the right, pause, and then all the way to the left."
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/animated-smooth.qml b/tests/auto/declarative/visual/qdeclarativeborderimage/animated-smooth.qml
new file mode 100644
index 0000000000..0ceaf49e6a
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/animated-smooth.qml
@@ -0,0 +1,55 @@
+import Qt 4.6
+import "content"
+
+Rectangle {
+ id: page
+ color: "white"
+ width: 1030; height: 540
+
+ MyBorderImage {
+ x: 20; y: 20; minWidth: 120; maxWidth: 240
+ minHeight: 120; maxHeight: 240
+ source: "content/colors.png"; margin: 30; antialiased: true
+ }
+ MyBorderImage {
+ x: 270; y: 20; minWidth: 120; maxWidth: 240
+ minHeight: 120; maxHeight: 240; antialiased: true
+ source: "content/colors.png"; margin: 30
+ horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
+ }
+ MyBorderImage {
+ x: 520; y: 20; minWidth: 120; maxWidth: 240
+ minHeight: 120; maxHeight: 240; antialiased: true
+ source: "content/colors.png"; margin: 30
+ horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
+ }
+ MyBorderImage {
+ x: 770; y: 20; minWidth: 120; maxWidth: 240
+ minHeight: 120; maxHeight: 240; antialiased: true
+ source: "content/colors.png"; margin: 30
+ horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
+ }
+ MyBorderImage {
+ x: 20; y: 280; minWidth: 60; maxWidth: 200
+ minHeight: 40; maxHeight: 200; antialiased: true
+ source: "content/bw.png"; margin: 10
+ }
+ MyBorderImage {
+ x: 270; y: 280; minWidth: 60; maxWidth: 200
+ minHeight: 40; maxHeight: 200; antialiased: true
+ source: "content/bw.png"; margin: 10
+ horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
+ }
+ MyBorderImage {
+ x: 520; y: 280; minWidth: 60; maxWidth: 200
+ minHeight: 40; maxHeight: 200; antialiased: true
+ source: "content/bw.png"; margin: 10
+ horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
+ }
+ MyBorderImage {
+ x: 770; y: 280; minWidth: 60; maxWidth: 200
+ minHeight: 40; maxHeight: 200; antialiased: true
+ source: "content/bw.png"; margin: 10
+ horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/animated.qml b/tests/auto/declarative/visual/qdeclarativeborderimage/animated.qml
new file mode 100644
index 0000000000..29c02b3d56
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/animated.qml
@@ -0,0 +1,55 @@
+import Qt 4.6
+import "content"
+
+Rectangle {
+ id: page
+ color: "white"
+ width: 1030; height: 540
+
+ MyBorderImage {
+ x: 20; y: 20; minWidth: 120; maxWidth: 240
+ minHeight: 120; maxHeight: 240
+ source: "content/colors.png"; margin: 30
+ }
+ MyBorderImage {
+ x: 270; y: 20; minWidth: 120; maxWidth: 240
+ minHeight: 120; maxHeight: 240
+ source: "content/colors.png"; margin: 30
+ horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
+ }
+ MyBorderImage {
+ x: 520; y: 20; minWidth: 120; maxWidth: 240
+ minHeight: 120; maxHeight: 240
+ source: "content/colors.png"; margin: 30
+ horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
+ }
+ MyBorderImage {
+ x: 770; y: 20; minWidth: 120; maxWidth: 240
+ minHeight: 120; maxHeight: 240
+ source: "content/colors.png"; margin: 30
+ horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
+ }
+ MyBorderImage {
+ x: 20; y: 280; minWidth: 60; maxWidth: 200
+ minHeight: 40; maxHeight: 200
+ source: "content/bw.png"; margin: 10
+ }
+ MyBorderImage {
+ x: 270; y: 280; minWidth: 60; maxWidth: 200
+ minHeight: 40; maxHeight: 200
+ source: "content/bw.png"; margin: 10
+ horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
+ }
+ MyBorderImage {
+ x: 520; y: 280; minWidth: 60; maxWidth: 200
+ minHeight: 40; maxHeight: 200
+ source: "content/bw.png"; margin: 10
+ horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
+ }
+ MyBorderImage {
+ x: 770; y: 280; minWidth: 60; maxWidth: 200
+ minHeight: 40; maxHeight: 200
+ source: "content/bw.png"; margin: 10
+ horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/borders.qml b/tests/auto/declarative/visual/qdeclarativeborderimage/borders.qml
new file mode 100644
index 0000000000..98794165f2
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/borders.qml
@@ -0,0 +1,18 @@
+import Qt 4.6
+
+Rectangle {
+ id: page
+ color: "white"
+ width: 520; height: 280
+
+ BorderImage {
+ x: 20; y: 20; width: 230; height: 240
+ smooth: true
+ source: "content/colors-stretch.sci"
+ }
+ BorderImage {
+ x: 270; y: 20; width: 230; height: 240
+ smooth: true
+ source: "content/colors-round.sci"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/content/MyBorderImage.qml b/tests/auto/declarative/visual/qdeclarativeborderimage/content/MyBorderImage.qml
new file mode 100644
index 0000000000..e268ce7490
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/content/MyBorderImage.qml
@@ -0,0 +1,38 @@
+import Qt 4.6
+
+Item {
+ property alias horizontalMode: image.horizontalTileMode
+ property alias verticalMode: image.verticalTileMode
+ property alias source: image.source
+ property alias antialiased: image.smooth
+
+ property int minWidth
+ property int minHeight
+ property int maxWidth
+ property int maxHeight
+ property int margin
+
+ id: container
+ width: 240; height: 240
+
+ BorderImage {
+ id: image; x: container.width / 2 - width / 2; y: container.height / 2 - height / 2
+
+ width: SequentialAnimation {
+ repeat: true
+ NumberAnimation { from: container.minWidth; to: container.maxWidth; duration: 2000; easing.type: "InOutQuad"}
+ NumberAnimation { from: container.maxWidth; to: container.minWidth; duration: 2000; easing.type: "InOutQuad" }
+ }
+
+ height: SequentialAnimation {
+ repeat: true
+ NumberAnimation { from: container.minHeight; to: container.maxHeight; duration: 2000; easing.type: "InOutQuad"}
+ NumberAnimation { from: container.maxHeight; to: container.minHeight; duration: 2000; easing.type: "InOutQuad" }
+ }
+
+ border.top: container.margin
+ border.left: container.margin
+ border.bottom: container.margin
+ border.right: container.margin
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/content/bw.png b/tests/auto/declarative/visual/qdeclarativeborderimage/content/bw.png
new file mode 100644
index 0000000000..486eaae96e
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/content/bw.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/content/colors-round.sci b/tests/auto/declarative/visual/qdeclarativeborderimage/content/colors-round.sci
new file mode 100644
index 0000000000..506f6f5f99
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/content/colors-round.sci
@@ -0,0 +1,7 @@
+border.left:30
+border.top:30
+border.right:30
+border.bottom:30
+horizontalTileRule:Round
+verticalTileRule:Round
+source:colors.png
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/content/colors-stretch.sci b/tests/auto/declarative/visual/qdeclarativeborderimage/content/colors-stretch.sci
new file mode 100644
index 0000000000..e4989a723c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/content/colors-stretch.sci
@@ -0,0 +1,5 @@
+border.left:30
+border.top:30
+border.right:30
+border.bottom:30
+source:colors.png
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/content/colors.png b/tests/auto/declarative/visual/qdeclarativeborderimage/content/colors.png
new file mode 100644
index 0000000000..dfb62f3d64
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/content/colors.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.0.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.0.png
new file mode 100644
index 0000000000..9a6b079fdb
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.1.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.1.png
new file mode 100644
index 0000000000..1f960e5f9c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.2.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.2.png
new file mode 100644
index 0000000000..85a2729d2b
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.3.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.3.png
new file mode 100644
index 0000000000..de6ff7c3f9
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.4.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.4.png
new file mode 100644
index 0000000000..fe7d3dd1eb
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.5.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.5.png
new file mode 100644
index 0000000000..e73bef53f3
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.6.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.6.png
new file mode 100644
index 0000000000..0c75422191
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.qml b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.qml
new file mode 100644
index 0000000000..043f5e2a7a
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated-smooth.qml
@@ -0,0 +1,1823 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 32
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 48
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 64
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 80
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 96
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 112
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 128
+ hash: "cd2180be80101c2aa4350b51b7a6f502"
+ }
+ Frame {
+ msec: 144
+ hash: "de471829f8ad3b43bf1b4df9d1d65a4d"
+ }
+ Frame {
+ msec: 160
+ hash: "ed9f2ca797894612600bc4b7fbaecb84"
+ }
+ Frame {
+ msec: 176
+ hash: "59470d71fa4426d0283e86371f2bfc2a"
+ }
+ Frame {
+ msec: 192
+ hash: "9a2f92efb51bcc6293d6a8e82d5314ea"
+ }
+ Frame {
+ msec: 208
+ hash: "7b66e21652a7d0982226e281a48411a9"
+ }
+ Frame {
+ msec: 224
+ hash: "a716c8d2c94433dee719f92f0822c8ec"
+ }
+ Frame {
+ msec: 240
+ hash: "f22a47b846cfee96ebdf39bbce2e6d51"
+ }
+ Frame {
+ msec: 256
+ hash: "5a8932d13d624932a65694fd19ec05cd"
+ }
+ Frame {
+ msec: 272
+ hash: "48e62dd171f5da82b5aa26c765e4042c"
+ }
+ Frame {
+ msec: 288
+ hash: "63d3c47f7dec1236440a05e0a8380900"
+ }
+ Frame {
+ msec: 304
+ hash: "323af110731b7af0c30f8862ff59b833"
+ }
+ Frame {
+ msec: 320
+ hash: "83c029e328e80af83158c37089cf0ece"
+ }
+ Frame {
+ msec: 336
+ hash: "3f9a09ae19be34348bb2552915360cf7"
+ }
+ Frame {
+ msec: 352
+ hash: "df624d70cae1bcefda8d69c0ff055d83"
+ }
+ Frame {
+ msec: 368
+ hash: "d671a3b971468e1d8aa30ab655e020a9"
+ }
+ Frame {
+ msec: 384
+ hash: "74c837b29f7f05b615123f0e608b523f"
+ }
+ Frame {
+ msec: 400
+ hash: "277ef98ea859fb7685fe6cd44a538a7d"
+ }
+ Frame {
+ msec: 416
+ hash: "0a8da7a3f57c3e06e4be5ea1d8a83ae9"
+ }
+ Frame {
+ msec: 432
+ hash: "456be9c208d690c479ba12bf6325dde0"
+ }
+ Frame {
+ msec: 448
+ hash: "10307beea6d99ab0ff5863f8e35555ed"
+ }
+ Frame {
+ msec: 464
+ hash: "170a1d5fe3422cf5223a78015a6a45fd"
+ }
+ Frame {
+ msec: 480
+ hash: "64ecb03aa538e74d0b99c6dec7751401"
+ }
+ Frame {
+ msec: 496
+ hash: "f3a7e74a1839f9366f9eeec4d2b80d1e"
+ }
+ Frame {
+ msec: 512
+ hash: "37c3f25e5cfdb48d7e3ab0cf8ffb9154"
+ }
+ Frame {
+ msec: 528
+ hash: "0af81ee0d76ff8335a0e347dc086ca37"
+ }
+ Frame {
+ msec: 544
+ hash: "061406edcbd2d4930ab89c3fcab63c7f"
+ }
+ Frame {
+ msec: 560
+ hash: "31d65134f340d82dd40f2401bda3fb7e"
+ }
+ Frame {
+ msec: 576
+ hash: "16c16c77c65b36d1e0954d5ead2642be"
+ }
+ Frame {
+ msec: 592
+ hash: "61c16009b65a55bffb63e27727e1615e"
+ }
+ Frame {
+ msec: 608
+ hash: "e1474c2cdd8768ca1ef45bf3bc5234ca"
+ }
+ Frame {
+ msec: 624
+ hash: "89c159ef00d273ecfe61332e1bf7244d"
+ }
+ Frame {
+ msec: 640
+ hash: "f4d0d3bca25e67908b38910f47b4757e"
+ }
+ Frame {
+ msec: 656
+ hash: "0e0c40f8e11a7bd499c80562ac6f8a82"
+ }
+ Frame {
+ msec: 672
+ hash: "4310a4c3037d845f088f21ad608f366a"
+ }
+ Frame {
+ msec: 688
+ hash: "3d518cd0348d6202243364af1dd6ce89"
+ }
+ Frame {
+ msec: 704
+ hash: "41987e6b4248d7944c0dbc6eb3862023"
+ }
+ Frame {
+ msec: 720
+ hash: "3e81338d38723d56f2d6c428271f81c1"
+ }
+ Frame {
+ msec: 736
+ hash: "902683d72f789399e9d99d1cea1bf177"
+ }
+ Frame {
+ msec: 752
+ hash: "efc119983701908a904deb24108c59cb"
+ }
+ Frame {
+ msec: 768
+ hash: "3a77785cfd7755f567619d8e04583f6a"
+ }
+ Frame {
+ msec: 784
+ hash: "fd85d1dd931033973283a408b5e328a8"
+ }
+ Frame {
+ msec: 800
+ hash: "5d3e85acabe5e5ff802eb7731676274f"
+ }
+ Frame {
+ msec: 816
+ hash: "ae12f1f37a746e16b06e6b869c89fac1"
+ }
+ Frame {
+ msec: 832
+ hash: "a15f19f374bbfb6a922b69d080a91eaa"
+ }
+ Frame {
+ msec: 848
+ hash: "84ef6dda8318b623832f58c46d762e89"
+ }
+ Frame {
+ msec: 864
+ hash: "b699285764f5e8866a9996f4a0dccc69"
+ }
+ Frame {
+ msec: 880
+ hash: "ddd8a006ef048c8d929144aa9fcd7c5a"
+ }
+ Frame {
+ msec: 896
+ hash: "177666cb3bb784c83196886b2c6cf6b6"
+ }
+ Frame {
+ msec: 912
+ hash: "9cd29b4b023a8b92573575fb3c3dda83"
+ }
+ Frame {
+ msec: 928
+ hash: "adc670a9aa0326744cb23e4f5912e6c7"
+ }
+ Frame {
+ msec: 944
+ hash: "48db9a5e6aad9a9563a3cd35fb7fa9b6"
+ }
+ Frame {
+ msec: 960
+ image: "animated-smooth.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "64b21b89576fdd0083f60a26f57b9c11"
+ }
+ Frame {
+ msec: 992
+ hash: "0d407ee07692d0e5a480a60952807b3c"
+ }
+ Frame {
+ msec: 1008
+ hash: "845170815a87565dc4229792032b3357"
+ }
+ Frame {
+ msec: 1024
+ hash: "8b8120cfc14de03e048632fdea61be21"
+ }
+ Frame {
+ msec: 1040
+ hash: "b0070117f1c24a4da87434725d4bb989"
+ }
+ Frame {
+ msec: 1056
+ hash: "0239d697642ca1d1b1d1daa3ea048e1e"
+ }
+ Frame {
+ msec: 1072
+ hash: "3df54504f8891306fa8f1e9e2075a5e2"
+ }
+ Frame {
+ msec: 1088
+ hash: "853429387cc639496c7338244de7e1b7"
+ }
+ Frame {
+ msec: 1104
+ hash: "bd70500fbdfe5aa2fe4362a97a1dee2d"
+ }
+ Frame {
+ msec: 1120
+ hash: "b375e723b2396b13b8f55cfc0c81c3c3"
+ }
+ Frame {
+ msec: 1136
+ hash: "53f05993ba3b426949badd2e4cd66d84"
+ }
+ Frame {
+ msec: 1152
+ hash: "23291a0239c69ea07db959e709b1ff5f"
+ }
+ Frame {
+ msec: 1168
+ hash: "2192094410e2d7c8d9d4aa5f8deacff5"
+ }
+ Frame {
+ msec: 1184
+ hash: "d6615fc345831a3cc5b9a7196284b632"
+ }
+ Frame {
+ msec: 1200
+ hash: "92176cce4836dcae4dfca94e49b041a8"
+ }
+ Frame {
+ msec: 1216
+ hash: "2a1fcfb753ca237b518da26e67c928e5"
+ }
+ Frame {
+ msec: 1232
+ hash: "42be5d26afb9f066dd27cc9fbaf6ce20"
+ }
+ Frame {
+ msec: 1248
+ hash: "bd045f4532d78bba0ef1b64118fd9f24"
+ }
+ Frame {
+ msec: 1264
+ hash: "7f9999a9c87af43b9703323efab31770"
+ }
+ Frame {
+ msec: 1280
+ hash: "0640fcb0b24d3ba4ab8695f78271a438"
+ }
+ Frame {
+ msec: 1296
+ hash: "7c9a98e2101c33e17c1bd7e6c2d921ff"
+ }
+ Frame {
+ msec: 1312
+ hash: "fce2648975106bc5c0ca9a4530f7f748"
+ }
+ Frame {
+ msec: 1328
+ hash: "39cc17ee2e889f17dd07179fda99e431"
+ }
+ Frame {
+ msec: 1344
+ hash: "39c46d85d20f7ef3eca1d09c7eb6a068"
+ }
+ Frame {
+ msec: 1360
+ hash: "d65d50fbb920e683b041a1c72238225b"
+ }
+ Frame {
+ msec: 1376
+ hash: "49a1df977b0494c7c72ca0b65c394e13"
+ }
+ Frame {
+ msec: 1392
+ hash: "05cbce0eaa80b4610a9067af8c40f819"
+ }
+ Frame {
+ msec: 1408
+ hash: "00ab7798bcd77a99886dff0414f35382"
+ }
+ Frame {
+ msec: 1424
+ hash: "5cc90d798786c270ddd2616512f4459f"
+ }
+ Frame {
+ msec: 1440
+ hash: "e5df07ea21e8e415c3ec82560f2d0f34"
+ }
+ Frame {
+ msec: 1456
+ hash: "ddf1f5c0b97fe4821719ec5bf4bd091b"
+ }
+ Frame {
+ msec: 1472
+ hash: "c61d2aa7f934fb5a9f9f7883e063b51c"
+ }
+ Frame {
+ msec: 1488
+ hash: "29ddde3300d0520a4c01b5536d8b9e7a"
+ }
+ Frame {
+ msec: 1504
+ hash: "2fede2f5d871654f3f8a6e9d890adeac"
+ }
+ Frame {
+ msec: 1520
+ hash: "deed4c06c9b713834490832b88e7acaf"
+ }
+ Frame {
+ msec: 1536
+ hash: "c2edb016cfdd47c192d1c48281ee76ed"
+ }
+ Frame {
+ msec: 1552
+ hash: "a261be47ae89e6b53e6bc1c1197154ae"
+ }
+ Frame {
+ msec: 1568
+ hash: "e860e97ebd73b7d1d5d5d90458b34bfe"
+ }
+ Frame {
+ msec: 1584
+ hash: "a087b532ecb2f28e4ee60819228c2522"
+ }
+ Frame {
+ msec: 1600
+ hash: "64df51b4c1bf744b2aae1c6d908c2cc3"
+ }
+ Frame {
+ msec: 1616
+ hash: "4520003d4b221a3de6834b2729b3026d"
+ }
+ Frame {
+ msec: 1632
+ hash: "d1110817827c318ceb0c112e8c2bfc1d"
+ }
+ Frame {
+ msec: 1648
+ hash: "83d49474db15d5779923972ff5f55917"
+ }
+ Frame {
+ msec: 1664
+ hash: "3bae40654ec551d69e7c8c72f631c7a5"
+ }
+ Frame {
+ msec: 1680
+ hash: "774740a393f3e9b8f12b81cce8da8280"
+ }
+ Frame {
+ msec: 1696
+ hash: "d8e398a1ce9ca45c19951e93bd5c932a"
+ }
+ Frame {
+ msec: 1712
+ hash: "2b7eb8a9fe26b032be8b4b9c00995912"
+ }
+ Frame {
+ msec: 1728
+ hash: "47e920e3884ccf2f0f49e78070af6929"
+ }
+ Frame {
+ msec: 1744
+ hash: "fc913807eb1069d611495fbd5d43ee3d"
+ }
+ Frame {
+ msec: 1760
+ hash: "5d9ee853f083d514fbe51d6953d8e000"
+ }
+ Frame {
+ msec: 1776
+ hash: "5736362b42bc2d801e02edabb983663a"
+ }
+ Frame {
+ msec: 1792
+ hash: "e3a2b5c7247acfc1b30825233fbfd56b"
+ }
+ Frame {
+ msec: 1808
+ hash: "48952ffa5e300778eafa768b9fe7df0c"
+ }
+ Frame {
+ msec: 1824
+ hash: "fe04cae65aeec18697eca4f3f83a40e9"
+ }
+ Frame {
+ msec: 1840
+ hash: "382d454f2366c1fb4ca472faa3bfa5e9"
+ }
+ Frame {
+ msec: 1856
+ hash: "89022a8e2feb3dcb845de69aafc333ad"
+ }
+ Frame {
+ msec: 1872
+ hash: "25506557c853a0020e98cf3992956989"
+ }
+ Frame {
+ msec: 1888
+ hash: "9a64706c52c9e962816953e32950b8ba"
+ }
+ Frame {
+ msec: 1904
+ hash: "3cbfded47413172ada64095e65c55e8a"
+ }
+ Frame {
+ msec: 1920
+ image: "animated-smooth.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "c5e399e29b988148913e62ee208b3326"
+ }
+ Frame {
+ msec: 1952
+ hash: "3991bc7760b7981d80665e3a7654c9f4"
+ }
+ Frame {
+ msec: 1968
+ hash: "05312f9529c94d3331ace7d73c544284"
+ }
+ Frame {
+ msec: 1984
+ hash: "a94de4e90a8f8eb4ec33fe902afd226c"
+ }
+ Frame {
+ msec: 2000
+ hash: "723f87da7e5b002a2e9b0bcbc81f9458"
+ }
+ Frame {
+ msec: 2016
+ hash: "6b8ded0d9386a3fff0601a100c513080"
+ }
+ Frame {
+ msec: 2032
+ hash: "f976cd5046ef5391536859e63db905bd"
+ }
+ Frame {
+ msec: 2048
+ hash: "a94de4e90a8f8eb4ec33fe902afd226c"
+ }
+ Frame {
+ msec: 2064
+ hash: "05312f9529c94d3331ace7d73c544284"
+ }
+ Frame {
+ msec: 2080
+ hash: "b980703c1d0018937e83a8ba8862469e"
+ }
+ Frame {
+ msec: 2096
+ hash: "c5e399e29b988148913e62ee208b3326"
+ }
+ Frame {
+ msec: 2112
+ hash: "3b7b83e97d17440b42e6ef4b962076d8"
+ }
+ Frame {
+ msec: 2128
+ hash: "3cbfded47413172ada64095e65c55e8a"
+ }
+ Frame {
+ msec: 2144
+ hash: "9a64706c52c9e962816953e32950b8ba"
+ }
+ Frame {
+ msec: 2160
+ hash: "25506557c853a0020e98cf3992956989"
+ }
+ Frame {
+ msec: 2176
+ hash: "89022a8e2feb3dcb845de69aafc333ad"
+ }
+ Frame {
+ msec: 2192
+ hash: "382d454f2366c1fb4ca472faa3bfa5e9"
+ }
+ Frame {
+ msec: 2208
+ hash: "fe04cae65aeec18697eca4f3f83a40e9"
+ }
+ Frame {
+ msec: 2224
+ hash: "48952ffa5e300778eafa768b9fe7df0c"
+ }
+ Frame {
+ msec: 2240
+ hash: "e3a2b5c7247acfc1b30825233fbfd56b"
+ }
+ Frame {
+ msec: 2256
+ hash: "5736362b42bc2d801e02edabb983663a"
+ }
+ Frame {
+ msec: 2272
+ hash: "5d9ee853f083d514fbe51d6953d8e000"
+ }
+ Frame {
+ msec: 2288
+ hash: "fe899138116774df4c4441687e3019c5"
+ }
+ Frame {
+ msec: 2304
+ hash: "47e920e3884ccf2f0f49e78070af6929"
+ }
+ Frame {
+ msec: 2320
+ hash: "2b7eb8a9fe26b032be8b4b9c00995912"
+ }
+ Frame {
+ msec: 2336
+ hash: "64cd225202ed6c91b02c368a9160a656"
+ }
+ Frame {
+ msec: 2352
+ hash: "774740a393f3e9b8f12b81cce8da8280"
+ }
+ Frame {
+ msec: 2368
+ hash: "3bae40654ec551d69e7c8c72f631c7a5"
+ }
+ Frame {
+ msec: 2384
+ hash: "83d49474db15d5779923972ff5f55917"
+ }
+ Frame {
+ msec: 2400
+ hash: "d1110817827c318ceb0c112e8c2bfc1d"
+ }
+ Frame {
+ msec: 2416
+ hash: "4520003d4b221a3de6834b2729b3026d"
+ }
+ Frame {
+ msec: 2432
+ hash: "64df51b4c1bf744b2aae1c6d908c2cc3"
+ }
+ Frame {
+ msec: 2448
+ hash: "a087b532ecb2f28e4ee60819228c2522"
+ }
+ Frame {
+ msec: 2464
+ hash: "e860e97ebd73b7d1d5d5d90458b34bfe"
+ }
+ Frame {
+ msec: 2480
+ hash: "a261be47ae89e6b53e6bc1c1197154ae"
+ }
+ Frame {
+ msec: 2496
+ hash: "c2edb016cfdd47c192d1c48281ee76ed"
+ }
+ Frame {
+ msec: 2512
+ hash: "deed4c06c9b713834490832b88e7acaf"
+ }
+ Frame {
+ msec: 2528
+ hash: "2fede2f5d871654f3f8a6e9d890adeac"
+ }
+ Frame {
+ msec: 2544
+ hash: "29ddde3300d0520a4c01b5536d8b9e7a"
+ }
+ Frame {
+ msec: 2560
+ hash: "c61d2aa7f934fb5a9f9f7883e063b51c"
+ }
+ Frame {
+ msec: 2576
+ hash: "ddf1f5c0b97fe4821719ec5bf4bd091b"
+ }
+ Frame {
+ msec: 2592
+ hash: "e5df07ea21e8e415c3ec82560f2d0f34"
+ }
+ Frame {
+ msec: 2608
+ hash: "5cc90d798786c270ddd2616512f4459f"
+ }
+ Frame {
+ msec: 2624
+ hash: "00ab7798bcd77a99886dff0414f35382"
+ }
+ Frame {
+ msec: 2640
+ hash: "05cbce0eaa80b4610a9067af8c40f819"
+ }
+ Frame {
+ msec: 2656
+ hash: "a676f45d946aeb9fa577c0e862735b01"
+ }
+ Frame {
+ msec: 2672
+ hash: "d65d50fbb920e683b041a1c72238225b"
+ }
+ Frame {
+ msec: 2688
+ hash: "39c46d85d20f7ef3eca1d09c7eb6a068"
+ }
+ Frame {
+ msec: 2704
+ hash: "39cc17ee2e889f17dd07179fda99e431"
+ }
+ Frame {
+ msec: 2720
+ hash: "fce2648975106bc5c0ca9a4530f7f748"
+ }
+ Frame {
+ msec: 2736
+ hash: "7c9a98e2101c33e17c1bd7e6c2d921ff"
+ }
+ Frame {
+ msec: 2752
+ hash: "0640fcb0b24d3ba4ab8695f78271a438"
+ }
+ Frame {
+ msec: 2768
+ hash: "2084ccc60ddd493399c128717816d33b"
+ }
+ Frame {
+ msec: 2784
+ hash: "bd045f4532d78bba0ef1b64118fd9f24"
+ }
+ Frame {
+ msec: 2800
+ hash: "42be5d26afb9f066dd27cc9fbaf6ce20"
+ }
+ Frame {
+ msec: 2816
+ hash: "2a1fcfb753ca237b518da26e67c928e5"
+ }
+ Frame {
+ msec: 2832
+ hash: "92176cce4836dcae4dfca94e49b041a8"
+ }
+ Frame {
+ msec: 2848
+ hash: "d6615fc345831a3cc5b9a7196284b632"
+ }
+ Frame {
+ msec: 2864
+ hash: "85ef33fcb3f91e4fc20391bf94455984"
+ }
+ Frame {
+ msec: 2880
+ image: "animated-smooth.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "53f05993ba3b426949badd2e4cd66d84"
+ }
+ Frame {
+ msec: 2912
+ hash: "b375e723b2396b13b8f55cfc0c81c3c3"
+ }
+ Frame {
+ msec: 2928
+ hash: "bd70500fbdfe5aa2fe4362a97a1dee2d"
+ }
+ Frame {
+ msec: 2944
+ hash: "853429387cc639496c7338244de7e1b7"
+ }
+ Frame {
+ msec: 2960
+ hash: "3df54504f8891306fa8f1e9e2075a5e2"
+ }
+ Frame {
+ msec: 2976
+ hash: "0239d697642ca1d1b1d1daa3ea048e1e"
+ }
+ Frame {
+ msec: 2992
+ hash: "b0070117f1c24a4da87434725d4bb989"
+ }
+ Frame {
+ msec: 3008
+ hash: "8b8120cfc14de03e048632fdea61be21"
+ }
+ Frame {
+ msec: 3024
+ hash: "845170815a87565dc4229792032b3357"
+ }
+ Frame {
+ msec: 3040
+ hash: "0d407ee07692d0e5a480a60952807b3c"
+ }
+ Frame {
+ msec: 3056
+ hash: "64b21b89576fdd0083f60a26f57b9c11"
+ }
+ Frame {
+ msec: 3072
+ hash: "d7e96278583f83ab636ed68fa130e4d2"
+ }
+ Frame {
+ msec: 3088
+ hash: "48db9a5e6aad9a9563a3cd35fb7fa9b6"
+ }
+ Frame {
+ msec: 3104
+ hash: "adc670a9aa0326744cb23e4f5912e6c7"
+ }
+ Frame {
+ msec: 3120
+ hash: "9cd29b4b023a8b92573575fb3c3dda83"
+ }
+ Frame {
+ msec: 3136
+ hash: "177666cb3bb784c83196886b2c6cf6b6"
+ }
+ Frame {
+ msec: 3152
+ hash: "ddd8a006ef048c8d929144aa9fcd7c5a"
+ }
+ Frame {
+ msec: 3168
+ hash: "b699285764f5e8866a9996f4a0dccc69"
+ }
+ Frame {
+ msec: 3184
+ hash: "84ef6dda8318b623832f58c46d762e89"
+ }
+ Frame {
+ msec: 3200
+ hash: "a15f19f374bbfb6a922b69d080a91eaa"
+ }
+ Frame {
+ msec: 3216
+ hash: "ae12f1f37a746e16b06e6b869c89fac1"
+ }
+ Frame {
+ msec: 3232
+ hash: "5d3e85acabe5e5ff802eb7731676274f"
+ }
+ Frame {
+ msec: 3248
+ hash: "fd85d1dd931033973283a408b5e328a8"
+ }
+ Frame {
+ msec: 3264
+ hash: "3a77785cfd7755f567619d8e04583f6a"
+ }
+ Frame {
+ msec: 3280
+ hash: "efc119983701908a904deb24108c59cb"
+ }
+ Frame {
+ msec: 3296
+ hash: "902683d72f789399e9d99d1cea1bf177"
+ }
+ Frame {
+ msec: 3312
+ hash: "3e81338d38723d56f2d6c428271f81c1"
+ }
+ Frame {
+ msec: 3328
+ hash: "41987e6b4248d7944c0dbc6eb3862023"
+ }
+ Frame {
+ msec: 3344
+ hash: "3d518cd0348d6202243364af1dd6ce89"
+ }
+ Frame {
+ msec: 3360
+ hash: "4310a4c3037d845f088f21ad608f366a"
+ }
+ Frame {
+ msec: 3376
+ hash: "0e0c40f8e11a7bd499c80562ac6f8a82"
+ }
+ Frame {
+ msec: 3392
+ hash: "f4d0d3bca25e67908b38910f47b4757e"
+ }
+ Frame {
+ msec: 3408
+ hash: "f602e3eda1889d1a7e49560f0dfb5d4c"
+ }
+ Frame {
+ msec: 3424
+ hash: "e1474c2cdd8768ca1ef45bf3bc5234ca"
+ }
+ Frame {
+ msec: 3440
+ hash: "c8312ede0998636a6bd6451d13636577"
+ }
+ Frame {
+ msec: 3456
+ hash: "16c16c77c65b36d1e0954d5ead2642be"
+ }
+ Frame {
+ msec: 3472
+ hash: "31d65134f340d82dd40f2401bda3fb7e"
+ }
+ Frame {
+ msec: 3488
+ hash: "061406edcbd2d4930ab89c3fcab63c7f"
+ }
+ Frame {
+ msec: 3504
+ hash: "0af81ee0d76ff8335a0e347dc086ca37"
+ }
+ Frame {
+ msec: 3520
+ hash: "0f347763f25350ebb62dda1536372b45"
+ }
+ Frame {
+ msec: 3536
+ hash: "f3a7e74a1839f9366f9eeec4d2b80d1e"
+ }
+ Frame {
+ msec: 3552
+ hash: "64ecb03aa538e74d0b99c6dec7751401"
+ }
+ Frame {
+ msec: 3568
+ hash: "170a1d5fe3422cf5223a78015a6a45fd"
+ }
+ Frame {
+ msec: 3584
+ hash: "10307beea6d99ab0ff5863f8e35555ed"
+ }
+ Frame {
+ msec: 3600
+ hash: "456be9c208d690c479ba12bf6325dde0"
+ }
+ Frame {
+ msec: 3616
+ hash: "0a8da7a3f57c3e06e4be5ea1d8a83ae9"
+ }
+ Frame {
+ msec: 3632
+ hash: "277ef98ea859fb7685fe6cd44a538a7d"
+ }
+ Frame {
+ msec: 3648
+ hash: "74c837b29f7f05b615123f0e608b523f"
+ }
+ Frame {
+ msec: 3664
+ hash: "d671a3b971468e1d8aa30ab655e020a9"
+ }
+ Frame {
+ msec: 3680
+ hash: "df624d70cae1bcefda8d69c0ff055d83"
+ }
+ Frame {
+ msec: 3696
+ hash: "3f9a09ae19be34348bb2552915360cf7"
+ }
+ Frame {
+ msec: 3712
+ hash: "83c029e328e80af83158c37089cf0ece"
+ }
+ Frame {
+ msec: 3728
+ hash: "323af110731b7af0c30f8862ff59b833"
+ }
+ Frame {
+ msec: 3744
+ hash: "63d3c47f7dec1236440a05e0a8380900"
+ }
+ Frame {
+ msec: 3760
+ hash: "48e62dd171f5da82b5aa26c765e4042c"
+ }
+ Frame {
+ msec: 3776
+ hash: "5a8932d13d624932a65694fd19ec05cd"
+ }
+ Frame {
+ msec: 3792
+ hash: "8419b295f67cae133760da79dfc26505"
+ }
+ Frame {
+ msec: 3808
+ hash: "a716c8d2c94433dee719f92f0822c8ec"
+ }
+ Frame {
+ msec: 3824
+ hash: "7b66e21652a7d0982226e281a48411a9"
+ }
+ Frame {
+ msec: 3840
+ image: "animated-smooth.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "59470d71fa4426d0283e86371f2bfc2a"
+ }
+ Frame {
+ msec: 3872
+ hash: "d56ba74d38c1889a278929d1c1b7f17a"
+ }
+ Frame {
+ msec: 3888
+ hash: "de471829f8ad3b43bf1b4df9d1d65a4d"
+ }
+ Frame {
+ msec: 3904
+ hash: "cd2180be80101c2aa4350b51b7a6f502"
+ }
+ Frame {
+ msec: 3920
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 3936
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 3952
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 3968
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 3984
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 4000
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 4016
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 4032
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 4048
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 4064
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 4080
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 4096
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 4112
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 4128
+ hash: "cd2180be80101c2aa4350b51b7a6f502"
+ }
+ Frame {
+ msec: 4144
+ hash: "de471829f8ad3b43bf1b4df9d1d65a4d"
+ }
+ Frame {
+ msec: 4160
+ hash: "ed9f2ca797894612600bc4b7fbaecb84"
+ }
+ Frame {
+ msec: 4176
+ hash: "59470d71fa4426d0283e86371f2bfc2a"
+ }
+ Frame {
+ msec: 4192
+ hash: "9a2f92efb51bcc6293d6a8e82d5314ea"
+ }
+ Frame {
+ msec: 4208
+ hash: "7b66e21652a7d0982226e281a48411a9"
+ }
+ Frame {
+ msec: 4224
+ hash: "a716c8d2c94433dee719f92f0822c8ec"
+ }
+ Frame {
+ msec: 4240
+ hash: "f22a47b846cfee96ebdf39bbce2e6d51"
+ }
+ Frame {
+ msec: 4256
+ hash: "5a8932d13d624932a65694fd19ec05cd"
+ }
+ Frame {
+ msec: 4272
+ hash: "48e62dd171f5da82b5aa26c765e4042c"
+ }
+ Frame {
+ msec: 4288
+ hash: "63d3c47f7dec1236440a05e0a8380900"
+ }
+ Frame {
+ msec: 4304
+ hash: "323af110731b7af0c30f8862ff59b833"
+ }
+ Frame {
+ msec: 4320
+ hash: "83c029e328e80af83158c37089cf0ece"
+ }
+ Frame {
+ msec: 4336
+ hash: "3f9a09ae19be34348bb2552915360cf7"
+ }
+ Frame {
+ msec: 4352
+ hash: "df624d70cae1bcefda8d69c0ff055d83"
+ }
+ Frame {
+ msec: 4368
+ hash: "d671a3b971468e1d8aa30ab655e020a9"
+ }
+ Frame {
+ msec: 4384
+ hash: "74c837b29f7f05b615123f0e608b523f"
+ }
+ Frame {
+ msec: 4400
+ hash: "277ef98ea859fb7685fe6cd44a538a7d"
+ }
+ Frame {
+ msec: 4416
+ hash: "0a8da7a3f57c3e06e4be5ea1d8a83ae9"
+ }
+ Frame {
+ msec: 4432
+ hash: "456be9c208d690c479ba12bf6325dde0"
+ }
+ Frame {
+ msec: 4448
+ hash: "10307beea6d99ab0ff5863f8e35555ed"
+ }
+ Frame {
+ msec: 4464
+ hash: "170a1d5fe3422cf5223a78015a6a45fd"
+ }
+ Frame {
+ msec: 4480
+ hash: "64ecb03aa538e74d0b99c6dec7751401"
+ }
+ Frame {
+ msec: 4496
+ hash: "f3a7e74a1839f9366f9eeec4d2b80d1e"
+ }
+ Frame {
+ msec: 4512
+ hash: "37c3f25e5cfdb48d7e3ab0cf8ffb9154"
+ }
+ Frame {
+ msec: 4528
+ hash: "0af81ee0d76ff8335a0e347dc086ca37"
+ }
+ Frame {
+ msec: 4544
+ hash: "061406edcbd2d4930ab89c3fcab63c7f"
+ }
+ Frame {
+ msec: 4560
+ hash: "31d65134f340d82dd40f2401bda3fb7e"
+ }
+ Frame {
+ msec: 4576
+ hash: "16c16c77c65b36d1e0954d5ead2642be"
+ }
+ Frame {
+ msec: 4592
+ hash: "61c16009b65a55bffb63e27727e1615e"
+ }
+ Frame {
+ msec: 4608
+ hash: "e1474c2cdd8768ca1ef45bf3bc5234ca"
+ }
+ Frame {
+ msec: 4624
+ hash: "89c159ef00d273ecfe61332e1bf7244d"
+ }
+ Frame {
+ msec: 4640
+ hash: "f4d0d3bca25e67908b38910f47b4757e"
+ }
+ Frame {
+ msec: 4656
+ hash: "0e0c40f8e11a7bd499c80562ac6f8a82"
+ }
+ Frame {
+ msec: 4672
+ hash: "4310a4c3037d845f088f21ad608f366a"
+ }
+ Frame {
+ msec: 4688
+ hash: "3d518cd0348d6202243364af1dd6ce89"
+ }
+ Frame {
+ msec: 4704
+ hash: "41987e6b4248d7944c0dbc6eb3862023"
+ }
+ Frame {
+ msec: 4720
+ hash: "3e81338d38723d56f2d6c428271f81c1"
+ }
+ Frame {
+ msec: 4736
+ hash: "902683d72f789399e9d99d1cea1bf177"
+ }
+ Frame {
+ msec: 4752
+ hash: "efc119983701908a904deb24108c59cb"
+ }
+ Frame {
+ msec: 4768
+ hash: "3a77785cfd7755f567619d8e04583f6a"
+ }
+ Frame {
+ msec: 4784
+ hash: "fd85d1dd931033973283a408b5e328a8"
+ }
+ Frame {
+ msec: 4800
+ image: "animated-smooth.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "ae12f1f37a746e16b06e6b869c89fac1"
+ }
+ Frame {
+ msec: 4832
+ hash: "a15f19f374bbfb6a922b69d080a91eaa"
+ }
+ Frame {
+ msec: 4848
+ hash: "84ef6dda8318b623832f58c46d762e89"
+ }
+ Frame {
+ msec: 4864
+ hash: "b699285764f5e8866a9996f4a0dccc69"
+ }
+ Frame {
+ msec: 4880
+ hash: "ddd8a006ef048c8d929144aa9fcd7c5a"
+ }
+ Frame {
+ msec: 4896
+ hash: "177666cb3bb784c83196886b2c6cf6b6"
+ }
+ Frame {
+ msec: 4912
+ hash: "9cd29b4b023a8b92573575fb3c3dda83"
+ }
+ Frame {
+ msec: 4928
+ hash: "adc670a9aa0326744cb23e4f5912e6c7"
+ }
+ Frame {
+ msec: 4944
+ hash: "48db9a5e6aad9a9563a3cd35fb7fa9b6"
+ }
+ Frame {
+ msec: 4960
+ hash: "d7e96278583f83ab636ed68fa130e4d2"
+ }
+ Frame {
+ msec: 4976
+ hash: "64b21b89576fdd0083f60a26f57b9c11"
+ }
+ Frame {
+ msec: 4992
+ hash: "0d407ee07692d0e5a480a60952807b3c"
+ }
+ Frame {
+ msec: 5008
+ hash: "845170815a87565dc4229792032b3357"
+ }
+ Frame {
+ msec: 5024
+ hash: "8b8120cfc14de03e048632fdea61be21"
+ }
+ Frame {
+ msec: 5040
+ hash: "b0070117f1c24a4da87434725d4bb989"
+ }
+ Frame {
+ msec: 5056
+ hash: "0239d697642ca1d1b1d1daa3ea048e1e"
+ }
+ Frame {
+ msec: 5072
+ hash: "3df54504f8891306fa8f1e9e2075a5e2"
+ }
+ Frame {
+ msec: 5088
+ hash: "853429387cc639496c7338244de7e1b7"
+ }
+ Frame {
+ msec: 5104
+ hash: "bd70500fbdfe5aa2fe4362a97a1dee2d"
+ }
+ Frame {
+ msec: 5120
+ hash: "b375e723b2396b13b8f55cfc0c81c3c3"
+ }
+ Frame {
+ msec: 5136
+ hash: "53f05993ba3b426949badd2e4cd66d84"
+ }
+ Frame {
+ msec: 5152
+ hash: "23291a0239c69ea07db959e709b1ff5f"
+ }
+ Frame {
+ msec: 5168
+ hash: "2192094410e2d7c8d9d4aa5f8deacff5"
+ }
+ Frame {
+ msec: 5184
+ hash: "d6615fc345831a3cc5b9a7196284b632"
+ }
+ Frame {
+ msec: 5200
+ hash: "92176cce4836dcae4dfca94e49b041a8"
+ }
+ Frame {
+ msec: 5216
+ hash: "2a1fcfb753ca237b518da26e67c928e5"
+ }
+ Frame {
+ msec: 5232
+ hash: "42be5d26afb9f066dd27cc9fbaf6ce20"
+ }
+ Frame {
+ msec: 5248
+ hash: "bd045f4532d78bba0ef1b64118fd9f24"
+ }
+ Frame {
+ msec: 5264
+ hash: "7f9999a9c87af43b9703323efab31770"
+ }
+ Frame {
+ msec: 5280
+ hash: "0640fcb0b24d3ba4ab8695f78271a438"
+ }
+ Frame {
+ msec: 5296
+ hash: "7c9a98e2101c33e17c1bd7e6c2d921ff"
+ }
+ Frame {
+ msec: 5312
+ hash: "fce2648975106bc5c0ca9a4530f7f748"
+ }
+ Frame {
+ msec: 5328
+ hash: "39cc17ee2e889f17dd07179fda99e431"
+ }
+ Frame {
+ msec: 5344
+ hash: "39c46d85d20f7ef3eca1d09c7eb6a068"
+ }
+ Frame {
+ msec: 5360
+ hash: "d65d50fbb920e683b041a1c72238225b"
+ }
+ Frame {
+ msec: 5376
+ hash: "49a1df977b0494c7c72ca0b65c394e13"
+ }
+ Frame {
+ msec: 5392
+ hash: "05cbce0eaa80b4610a9067af8c40f819"
+ }
+ Frame {
+ msec: 5408
+ hash: "00ab7798bcd77a99886dff0414f35382"
+ }
+ Frame {
+ msec: 5424
+ hash: "5cc90d798786c270ddd2616512f4459f"
+ }
+ Frame {
+ msec: 5440
+ hash: "e5df07ea21e8e415c3ec82560f2d0f34"
+ }
+ Frame {
+ msec: 5456
+ hash: "ddf1f5c0b97fe4821719ec5bf4bd091b"
+ }
+ Frame {
+ msec: 5472
+ hash: "c61d2aa7f934fb5a9f9f7883e063b51c"
+ }
+ Frame {
+ msec: 5488
+ hash: "29ddde3300d0520a4c01b5536d8b9e7a"
+ }
+ Frame {
+ msec: 5504
+ hash: "2fede2f5d871654f3f8a6e9d890adeac"
+ }
+ Frame {
+ msec: 5520
+ hash: "deed4c06c9b713834490832b88e7acaf"
+ }
+ Frame {
+ msec: 5536
+ hash: "c2edb016cfdd47c192d1c48281ee76ed"
+ }
+ Frame {
+ msec: 5552
+ hash: "a261be47ae89e6b53e6bc1c1197154ae"
+ }
+ Frame {
+ msec: 5568
+ hash: "e860e97ebd73b7d1d5d5d90458b34bfe"
+ }
+ Frame {
+ msec: 5584
+ hash: "a087b532ecb2f28e4ee60819228c2522"
+ }
+ Frame {
+ msec: 5600
+ hash: "64df51b4c1bf744b2aae1c6d908c2cc3"
+ }
+ Frame {
+ msec: 5616
+ hash: "4520003d4b221a3de6834b2729b3026d"
+ }
+ Frame {
+ msec: 5632
+ hash: "d1110817827c318ceb0c112e8c2bfc1d"
+ }
+ Frame {
+ msec: 5648
+ hash: "83d49474db15d5779923972ff5f55917"
+ }
+ Frame {
+ msec: 5664
+ hash: "3bae40654ec551d69e7c8c72f631c7a5"
+ }
+ Frame {
+ msec: 5680
+ hash: "774740a393f3e9b8f12b81cce8da8280"
+ }
+ Frame {
+ msec: 5696
+ hash: "d8e398a1ce9ca45c19951e93bd5c932a"
+ }
+ Frame {
+ msec: 5712
+ hash: "2b7eb8a9fe26b032be8b4b9c00995912"
+ }
+ Frame {
+ msec: 5728
+ hash: "47e920e3884ccf2f0f49e78070af6929"
+ }
+ Frame {
+ msec: 5744
+ hash: "fc913807eb1069d611495fbd5d43ee3d"
+ }
+ Frame {
+ msec: 5760
+ image: "animated-smooth.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "5736362b42bc2d801e02edabb983663a"
+ }
+ Frame {
+ msec: 5792
+ hash: "e3a2b5c7247acfc1b30825233fbfd56b"
+ }
+ Frame {
+ msec: 5808
+ hash: "48952ffa5e300778eafa768b9fe7df0c"
+ }
+ Frame {
+ msec: 5824
+ hash: "fe04cae65aeec18697eca4f3f83a40e9"
+ }
+ Frame {
+ msec: 5840
+ hash: "382d454f2366c1fb4ca472faa3bfa5e9"
+ }
+ Frame {
+ msec: 5856
+ hash: "89022a8e2feb3dcb845de69aafc333ad"
+ }
+ Frame {
+ msec: 5872
+ hash: "25506557c853a0020e98cf3992956989"
+ }
+ Frame {
+ msec: 5888
+ hash: "9a64706c52c9e962816953e32950b8ba"
+ }
+ Frame {
+ msec: 5904
+ hash: "3cbfded47413172ada64095e65c55e8a"
+ }
+ Frame {
+ msec: 5920
+ hash: "ec7e1190dd4fe122545e6ce6c8740500"
+ }
+ Frame {
+ msec: 5936
+ hash: "c5e399e29b988148913e62ee208b3326"
+ }
+ Frame {
+ msec: 5952
+ hash: "3991bc7760b7981d80665e3a7654c9f4"
+ }
+ Frame {
+ msec: 5968
+ hash: "05312f9529c94d3331ace7d73c544284"
+ }
+ Frame {
+ msec: 5984
+ hash: "a94de4e90a8f8eb4ec33fe902afd226c"
+ }
+ Frame {
+ msec: 6000
+ hash: "723f87da7e5b002a2e9b0bcbc81f9458"
+ }
+ Frame {
+ msec: 6016
+ hash: "6b8ded0d9386a3fff0601a100c513080"
+ }
+ Frame {
+ msec: 6032
+ hash: "f976cd5046ef5391536859e63db905bd"
+ }
+ Frame {
+ msec: 6048
+ hash: "a94de4e90a8f8eb4ec33fe902afd226c"
+ }
+ Frame {
+ msec: 6064
+ hash: "05312f9529c94d3331ace7d73c544284"
+ }
+ Frame {
+ msec: 6080
+ hash: "b980703c1d0018937e83a8ba8862469e"
+ }
+ Frame {
+ msec: 6096
+ hash: "c5e399e29b988148913e62ee208b3326"
+ }
+ Frame {
+ msec: 6112
+ hash: "3b7b83e97d17440b42e6ef4b962076d8"
+ }
+ Frame {
+ msec: 6128
+ hash: "3cbfded47413172ada64095e65c55e8a"
+ }
+ Frame {
+ msec: 6144
+ hash: "9a64706c52c9e962816953e32950b8ba"
+ }
+ Frame {
+ msec: 6160
+ hash: "25506557c853a0020e98cf3992956989"
+ }
+ Frame {
+ msec: 6176
+ hash: "89022a8e2feb3dcb845de69aafc333ad"
+ }
+ Frame {
+ msec: 6192
+ hash: "382d454f2366c1fb4ca472faa3bfa5e9"
+ }
+ Frame {
+ msec: 6208
+ hash: "fe04cae65aeec18697eca4f3f83a40e9"
+ }
+ Frame {
+ msec: 6224
+ hash: "48952ffa5e300778eafa768b9fe7df0c"
+ }
+ Frame {
+ msec: 6240
+ hash: "e3a2b5c7247acfc1b30825233fbfd56b"
+ }
+ Frame {
+ msec: 6256
+ hash: "5736362b42bc2d801e02edabb983663a"
+ }
+ Frame {
+ msec: 6272
+ hash: "5d9ee853f083d514fbe51d6953d8e000"
+ }
+ Frame {
+ msec: 6288
+ hash: "fe899138116774df4c4441687e3019c5"
+ }
+ Frame {
+ msec: 6304
+ hash: "47e920e3884ccf2f0f49e78070af6929"
+ }
+ Frame {
+ msec: 6320
+ hash: "2b7eb8a9fe26b032be8b4b9c00995912"
+ }
+ Frame {
+ msec: 6336
+ hash: "64cd225202ed6c91b02c368a9160a656"
+ }
+ Frame {
+ msec: 6352
+ hash: "774740a393f3e9b8f12b81cce8da8280"
+ }
+ Frame {
+ msec: 6368
+ hash: "3bae40654ec551d69e7c8c72f631c7a5"
+ }
+ Frame {
+ msec: 6384
+ hash: "83d49474db15d5779923972ff5f55917"
+ }
+ Frame {
+ msec: 6400
+ hash: "d1110817827c318ceb0c112e8c2bfc1d"
+ }
+ Frame {
+ msec: 6416
+ hash: "4520003d4b221a3de6834b2729b3026d"
+ }
+ Frame {
+ msec: 6432
+ hash: "64df51b4c1bf744b2aae1c6d908c2cc3"
+ }
+ Frame {
+ msec: 6448
+ hash: "a087b532ecb2f28e4ee60819228c2522"
+ }
+ Frame {
+ msec: 6464
+ hash: "e860e97ebd73b7d1d5d5d90458b34bfe"
+ }
+ Frame {
+ msec: 6480
+ hash: "a261be47ae89e6b53e6bc1c1197154ae"
+ }
+ Frame {
+ msec: 6496
+ hash: "c2edb016cfdd47c192d1c48281ee76ed"
+ }
+ Frame {
+ msec: 6512
+ hash: "deed4c06c9b713834490832b88e7acaf"
+ }
+ Frame {
+ msec: 6528
+ hash: "2fede2f5d871654f3f8a6e9d890adeac"
+ }
+ Frame {
+ msec: 6544
+ hash: "29ddde3300d0520a4c01b5536d8b9e7a"
+ }
+ Frame {
+ msec: 6560
+ hash: "c61d2aa7f934fb5a9f9f7883e063b51c"
+ }
+ Frame {
+ msec: 6576
+ hash: "ddf1f5c0b97fe4821719ec5bf4bd091b"
+ }
+ Frame {
+ msec: 6592
+ hash: "e5df07ea21e8e415c3ec82560f2d0f34"
+ }
+ Frame {
+ msec: 6608
+ hash: "5cc90d798786c270ddd2616512f4459f"
+ }
+ Frame {
+ msec: 6624
+ hash: "00ab7798bcd77a99886dff0414f35382"
+ }
+ Frame {
+ msec: 6640
+ hash: "05cbce0eaa80b4610a9067af8c40f819"
+ }
+ Frame {
+ msec: 6656
+ hash: "a676f45d946aeb9fa577c0e862735b01"
+ }
+ Frame {
+ msec: 6672
+ hash: "d65d50fbb920e683b041a1c72238225b"
+ }
+ Frame {
+ msec: 6688
+ hash: "39c46d85d20f7ef3eca1d09c7eb6a068"
+ }
+ Frame {
+ msec: 6704
+ hash: "39cc17ee2e889f17dd07179fda99e431"
+ }
+ Frame {
+ msec: 6720
+ image: "animated-smooth.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "7c9a98e2101c33e17c1bd7e6c2d921ff"
+ }
+ Frame {
+ msec: 6752
+ hash: "0640fcb0b24d3ba4ab8695f78271a438"
+ }
+ Frame {
+ msec: 6768
+ hash: "2084ccc60ddd493399c128717816d33b"
+ }
+ Frame {
+ msec: 6784
+ hash: "bd045f4532d78bba0ef1b64118fd9f24"
+ }
+ Frame {
+ msec: 6800
+ hash: "42be5d26afb9f066dd27cc9fbaf6ce20"
+ }
+ Frame {
+ msec: 6816
+ hash: "2a1fcfb753ca237b518da26e67c928e5"
+ }
+ Frame {
+ msec: 6832
+ hash: "92176cce4836dcae4dfca94e49b041a8"
+ }
+ Frame {
+ msec: 6848
+ hash: "d6615fc345831a3cc5b9a7196284b632"
+ }
+ Frame {
+ msec: 6864
+ hash: "85ef33fcb3f91e4fc20391bf94455984"
+ }
+ Frame {
+ msec: 6880
+ hash: "23291a0239c69ea07db959e709b1ff5f"
+ }
+ Frame {
+ msec: 6896
+ hash: "53f05993ba3b426949badd2e4cd66d84"
+ }
+ Frame {
+ msec: 6912
+ hash: "b375e723b2396b13b8f55cfc0c81c3c3"
+ }
+ Frame {
+ msec: 6928
+ hash: "bd70500fbdfe5aa2fe4362a97a1dee2d"
+ }
+ Frame {
+ msec: 6944
+ hash: "853429387cc639496c7338244de7e1b7"
+ }
+ Frame {
+ msec: 6960
+ hash: "3df54504f8891306fa8f1e9e2075a5e2"
+ }
+ Frame {
+ msec: 6976
+ hash: "0239d697642ca1d1b1d1daa3ea048e1e"
+ }
+ Frame {
+ msec: 6992
+ hash: "b0070117f1c24a4da87434725d4bb989"
+ }
+ Frame {
+ msec: 7008
+ hash: "8b8120cfc14de03e048632fdea61be21"
+ }
+ Frame {
+ msec: 7024
+ hash: "845170815a87565dc4229792032b3357"
+ }
+ Frame {
+ msec: 7040
+ hash: "0d407ee07692d0e5a480a60952807b3c"
+ }
+ Frame {
+ msec: 7056
+ hash: "64b21b89576fdd0083f60a26f57b9c11"
+ }
+ Frame {
+ msec: 7072
+ hash: "d7e96278583f83ab636ed68fa130e4d2"
+ }
+ Frame {
+ msec: 7088
+ hash: "48db9a5e6aad9a9563a3cd35fb7fa9b6"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7104
+ hash: "adc670a9aa0326744cb23e4f5912e6c7"
+ }
+ Frame {
+ msec: 7120
+ hash: "9cd29b4b023a8b92573575fb3c3dda83"
+ }
+ Frame {
+ msec: 7136
+ hash: "177666cb3bb784c83196886b2c6cf6b6"
+ }
+ Frame {
+ msec: 7152
+ hash: "ddd8a006ef048c8d929144aa9fcd7c5a"
+ }
+ Frame {
+ msec: 7168
+ hash: "b699285764f5e8866a9996f4a0dccc69"
+ }
+ Frame {
+ msec: 7184
+ hash: "84ef6dda8318b623832f58c46d762e89"
+ }
+ Frame {
+ msec: 7200
+ hash: "a15f19f374bbfb6a922b69d080a91eaa"
+ }
+ Frame {
+ msec: 7216
+ hash: "ae12f1f37a746e16b06e6b869c89fac1"
+ }
+ Frame {
+ msec: 7232
+ hash: "5d3e85acabe5e5ff802eb7731676274f"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.0.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.0.png
new file mode 100644
index 0000000000..99228f9908
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.1.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.1.png
new file mode 100644
index 0000000000..a2dcd00aaa
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.2.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.2.png
new file mode 100644
index 0000000000..8a8002067c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.3.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.3.png
new file mode 100644
index 0000000000..02b57ef241
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.4.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.4.png
new file mode 100644
index 0000000000..df0f6cc57c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.5.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.5.png
new file mode 100644
index 0000000000..0add64df61
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.6.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.6.png
new file mode 100644
index 0000000000..08862076e2
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.7.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.7.png
new file mode 100644
index 0000000000..bc1a7b0675
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.qml b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.qml
new file mode 100644
index 0000000000..29e591a5d6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/animated.qml
@@ -0,0 +1,2091 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 32
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 48
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 64
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 80
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 96
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 112
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 128
+ hash: "4c60d345821f515c7811f3b69eb94607"
+ }
+ Frame {
+ msec: 144
+ hash: "aacf9ae3c23d174a1c1cda493600e355"
+ }
+ Frame {
+ msec: 160
+ hash: "228d5312c261d1a5455faf69ec2f2520"
+ }
+ Frame {
+ msec: 176
+ hash: "465ec993948f7b75aeb5759976f4620d"
+ }
+ Frame {
+ msec: 192
+ hash: "755cfccc38bababc468fe6e1076804bb"
+ }
+ Frame {
+ msec: 208
+ hash: "b63e4d1686057828fd8781f1c33585f5"
+ }
+ Frame {
+ msec: 224
+ hash: "c5b3dede34b0d1d78135e39c41d117c6"
+ }
+ Frame {
+ msec: 240
+ hash: "4d45d70f997c2c67166905c97a900d2e"
+ }
+ Frame {
+ msec: 256
+ hash: "7b4d12e5a877507e7454aa1b8ed87c2d"
+ }
+ Frame {
+ msec: 272
+ hash: "08b9be66e23c7b6f6f629c7470394601"
+ }
+ Frame {
+ msec: 288
+ hash: "3dac1d9632378bd18c1c938a4868e3fb"
+ }
+ Frame {
+ msec: 304
+ hash: "406224b535b4425d2708df0083acdc8e"
+ }
+ Frame {
+ msec: 320
+ hash: "482bb92d4f0ad5d7c7e379b9e1ad326e"
+ }
+ Frame {
+ msec: 336
+ hash: "8419f1d75b14130730bcfec4e3a9b058"
+ }
+ Frame {
+ msec: 352
+ hash: "a85ee8be6a47bbd1b14137803ce606ec"
+ }
+ Frame {
+ msec: 368
+ hash: "c1936628aec13e08e9581dcd2c6d5717"
+ }
+ Frame {
+ msec: 384
+ hash: "75c9bf83ca3fe24612c245698c089430"
+ }
+ Frame {
+ msec: 400
+ hash: "8c66a33d26eec2a1133f4362710a5fab"
+ }
+ Frame {
+ msec: 416
+ hash: "2266df495ab5265e7514a506d3bf5bc6"
+ }
+ Frame {
+ msec: 432
+ hash: "01947e631c3db43f7c5b4427229bc0c8"
+ }
+ Frame {
+ msec: 448
+ hash: "3f62f032239d412d3637198f5e3e83d6"
+ }
+ Frame {
+ msec: 464
+ hash: "06d8d8a1a41893d4e27725948a75caf4"
+ }
+ Frame {
+ msec: 480
+ hash: "6b48bfd0c7993f746d6301c2a0f61d23"
+ }
+ Frame {
+ msec: 496
+ hash: "ac8f096e8c7cc23bfb01de69cf3e266e"
+ }
+ Frame {
+ msec: 512
+ hash: "dd4c9e63001bc6e0e63ea4db2d85301f"
+ }
+ Frame {
+ msec: 528
+ hash: "2a7bed775824968e318c3d40fbc5b1c2"
+ }
+ Frame {
+ msec: 544
+ hash: "3152e5f29015ece423fbdd11a2b382b8"
+ }
+ Frame {
+ msec: 560
+ hash: "f1a7a4a67a21f5025294af4bea3f8998"
+ }
+ Frame {
+ msec: 576
+ hash: "a40014d842471784e1222eb205395f6f"
+ }
+ Frame {
+ msec: 592
+ hash: "18c2f321a149e38b258ac264d40c2376"
+ }
+ Frame {
+ msec: 608
+ hash: "4ae120bb6dc2bd5ff81cc99ae03c191e"
+ }
+ Frame {
+ msec: 624
+ hash: "19d05a96f3ae7388e854bbf1075b51c1"
+ }
+ Frame {
+ msec: 640
+ hash: "e418b5f54705515dce5ce3b4cbc45d19"
+ }
+ Frame {
+ msec: 656
+ hash: "554e1d360463871e7c05cfe6f8abe1dd"
+ }
+ Frame {
+ msec: 672
+ hash: "153237f8cf37e29ad2f32f7a8a6aecdb"
+ }
+ Frame {
+ msec: 688
+ hash: "60f158382f75103c78e2b9b408e0fe65"
+ }
+ Frame {
+ msec: 704
+ hash: "4e60300cfab8634e04dcd1b556251d31"
+ }
+ Frame {
+ msec: 720
+ hash: "6a521f952e05d91b86ad78fd6f5de4f9"
+ }
+ Frame {
+ msec: 736
+ hash: "b74521d6ac531414aeeca0fb28379d11"
+ }
+ Frame {
+ msec: 752
+ hash: "a6f17da2dd581bdc249ff62f833dc025"
+ }
+ Frame {
+ msec: 768
+ hash: "93d9f0a7c387cbe653a9a088f8f4ef2b"
+ }
+ Frame {
+ msec: 784
+ hash: "1ea07ee309ce2c52cbc36370b75a872f"
+ }
+ Frame {
+ msec: 800
+ hash: "593a8a45c3a0cd7ce1cb6bd1913136ba"
+ }
+ Frame {
+ msec: 816
+ hash: "c7eb7837dce71c914186326216214eeb"
+ }
+ Frame {
+ msec: 832
+ hash: "0cba07ca38c7f0483244832a42d9ac53"
+ }
+ Frame {
+ msec: 848
+ hash: "93cf31eabb454ec536c638a506be0648"
+ }
+ Frame {
+ msec: 864
+ hash: "e8a61d3858244127cb2b2812f04f5ce9"
+ }
+ Frame {
+ msec: 880
+ hash: "1ac8c393f084aa1894c26610b7f40ea6"
+ }
+ Frame {
+ msec: 896
+ hash: "8861bf848da5c96b35addff736b01520"
+ }
+ Frame {
+ msec: 912
+ hash: "f04e84ad3579d6334077abe73101d206"
+ }
+ Frame {
+ msec: 928
+ hash: "eac4600372f0fdfadee88896ac915a48"
+ }
+ Frame {
+ msec: 944
+ hash: "ff0928dfd16b2da9811a172c19817a97"
+ }
+ Frame {
+ msec: 960
+ image: "animated.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "7383209c80b403b93da3264eadbc047f"
+ }
+ Frame {
+ msec: 992
+ hash: "86360bd58bba5fdd901c105ddb2e3ade"
+ }
+ Frame {
+ msec: 1008
+ hash: "bc747167dfb3388ac63e9e68a86b9a03"
+ }
+ Frame {
+ msec: 1024
+ hash: "bccb4b8a494bd45bd70c2524a02a9dc3"
+ }
+ Frame {
+ msec: 1040
+ hash: "ae48da4a66f93c806725ce749700aac8"
+ }
+ Frame {
+ msec: 1056
+ hash: "c763f56728e17fc119539a4d45dfccc3"
+ }
+ Frame {
+ msec: 1072
+ hash: "956429472da133324c970774f77784f5"
+ }
+ Frame {
+ msec: 1088
+ hash: "a4ddb4956d71fd642d54757938100cf3"
+ }
+ Frame {
+ msec: 1104
+ hash: "ec0aea8dc8c269d1f0aee5817347ac55"
+ }
+ Frame {
+ msec: 1120
+ hash: "68dae343cf324391ec6721cea14575f7"
+ }
+ Frame {
+ msec: 1136
+ hash: "81d2fc6727dc7449d1a87b4abea9b704"
+ }
+ Frame {
+ msec: 1152
+ hash: "c3a1f12febc979150028737722d6d045"
+ }
+ Frame {
+ msec: 1168
+ hash: "80ebac4d923f67fb8dba3d133ce657ba"
+ }
+ Frame {
+ msec: 1184
+ hash: "7c22fc3e30377cc14326833bdd23ddd8"
+ }
+ Frame {
+ msec: 1200
+ hash: "5359f5e45e5467c62c2d9521c8199c48"
+ }
+ Frame {
+ msec: 1216
+ hash: "30f84a7f67b13a945ba6d5935ea92da5"
+ }
+ Frame {
+ msec: 1232
+ hash: "08f55088cdce741c67539f73291e53ab"
+ }
+ Frame {
+ msec: 1248
+ hash: "93128906d054e44bfd126fc22bdc3102"
+ }
+ Frame {
+ msec: 1264
+ hash: "97f7a2175dcf9ac2581a92d614d72f88"
+ }
+ Frame {
+ msec: 1280
+ hash: "587cb6e05048579088e88e0180e3ad48"
+ }
+ Frame {
+ msec: 1296
+ hash: "985868869ef2c332da379460a2f3a71b"
+ }
+ Frame {
+ msec: 1312
+ hash: "94084ca4998fcda408f6987f52c34185"
+ }
+ Frame {
+ msec: 1328
+ hash: "e91bb914c1eb63cd4269b30a220a128a"
+ }
+ Frame {
+ msec: 1344
+ hash: "e880d93963c80e4fab5173554c9600fc"
+ }
+ Frame {
+ msec: 1360
+ hash: "84c94704c16e246df1048f958cc8cefb"
+ }
+ Frame {
+ msec: 1376
+ hash: "4f1eace868a6688e5b24ce48a1f0fd18"
+ }
+ Frame {
+ msec: 1392
+ hash: "99de44f74f8e1f79652ab46afb4bb59e"
+ }
+ Frame {
+ msec: 1408
+ hash: "44072400ca3f0237d1aebae28a94becc"
+ }
+ Frame {
+ msec: 1424
+ hash: "a1bd4e995365e79389dba80f9e3b7af8"
+ }
+ Frame {
+ msec: 1440
+ hash: "95d776c84fe155617fc4ee51bdb45b7e"
+ }
+ Frame {
+ msec: 1456
+ hash: "3b95eb8cbfc831e1ebee2e456b026ab4"
+ }
+ Frame {
+ msec: 1472
+ hash: "826c7741ba0c51de407bb799e8f360b5"
+ }
+ Frame {
+ msec: 1488
+ hash: "11673a112566a64aca3c7010b9cc9c4d"
+ }
+ Frame {
+ msec: 1504
+ hash: "e1e6c7a7f51bcccd749710dbbf9e97f6"
+ }
+ Frame {
+ msec: 1520
+ hash: "5b027815ea3c1ea54e1a02c798c468db"
+ }
+ Frame {
+ msec: 1536
+ hash: "65c514c9e926affe1da0b4826d2754c7"
+ }
+ Frame {
+ msec: 1552
+ hash: "73c5f23f51797a33f4d2898738e6356e"
+ }
+ Frame {
+ msec: 1568
+ hash: "acd9a2e76b22ab0ff809fd3ec3a018ec"
+ }
+ Frame {
+ msec: 1584
+ hash: "fb17df681d99d5de05f6329bba697ea5"
+ }
+ Frame {
+ msec: 1600
+ hash: "1bf7a98884b506b38326f59f85a53f41"
+ }
+ Frame {
+ msec: 1616
+ hash: "0b1a741975e3d9ef8f5e78f371c89441"
+ }
+ Frame {
+ msec: 1632
+ hash: "a6937ee49648ed0cb409063bf1da3b87"
+ }
+ Frame {
+ msec: 1648
+ hash: "a790f0e884ab85f7802dd094e4ef550f"
+ }
+ Frame {
+ msec: 1664
+ hash: "3b644aac161f0a75bfb64f5075373190"
+ }
+ Frame {
+ msec: 1680
+ hash: "b12faa76c07adc21634cd8f8cb8436ae"
+ }
+ Frame {
+ msec: 1696
+ hash: "3fb20f9dbd40b4729235e13af9643afc"
+ }
+ Frame {
+ msec: 1712
+ hash: "f57727419bb51fb1e589b960ddeb20ae"
+ }
+ Frame {
+ msec: 1728
+ hash: "7b78cba247f2c209ed81e003ca25d0a5"
+ }
+ Frame {
+ msec: 1744
+ hash: "8172e076b05d95248d89e815fde820ef"
+ }
+ Frame {
+ msec: 1760
+ hash: "a88d6fc324ef48aa52c642a1662ec679"
+ }
+ Frame {
+ msec: 1776
+ hash: "74c1e71378b502bc1b732a55806a10f1"
+ }
+ Frame {
+ msec: 1792
+ hash: "6eae517ad33f0609c31ef1f8f80ba899"
+ }
+ Frame {
+ msec: 1808
+ hash: "a67e9a0f55512fb1c55f13c6b483923b"
+ }
+ Frame {
+ msec: 1824
+ hash: "4887cd34d9926a361f3ca2e75be53ea6"
+ }
+ Frame {
+ msec: 1840
+ hash: "13ca95adab171d9fad9ee8b75d0226bc"
+ }
+ Frame {
+ msec: 1856
+ hash: "affab9fb48c889a2680eb81458d400f9"
+ }
+ Frame {
+ msec: 1872
+ hash: "7aa0cbf73f7999be7cde4ec739efbc33"
+ }
+ Frame {
+ msec: 1888
+ hash: "36c054064c9a76f4072492e55c70fb6c"
+ }
+ Frame {
+ msec: 1904
+ hash: "d1ed4916cb1ecff60277d74369ff311b"
+ }
+ Frame {
+ msec: 1920
+ image: "animated.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "29245946cbd811fe6bf6b2b41cc13002"
+ }
+ Frame {
+ msec: 1952
+ hash: "8a9dd7a2d10771633e6896f3f4a722ae"
+ }
+ Frame {
+ msec: 1968
+ hash: "058c918e83bfdd665cd836566b53959b"
+ }
+ Frame {
+ msec: 1984
+ hash: "fdf3b7a0391119e2fe77be8d6a17481d"
+ }
+ Frame {
+ msec: 2000
+ hash: "ed5d80c33dbf72624385b1cf43784626"
+ }
+ Frame {
+ msec: 2016
+ hash: "911591db1519ba264847f09868e38e0e"
+ }
+ Frame {
+ msec: 2032
+ hash: "ed5d80c33dbf72624385b1cf43784626"
+ }
+ Frame {
+ msec: 2048
+ hash: "fdf3b7a0391119e2fe77be8d6a17481d"
+ }
+ Frame {
+ msec: 2064
+ hash: "058c918e83bfdd665cd836566b53959b"
+ }
+ Frame {
+ msec: 2080
+ hash: "8a9dd7a2d10771633e6896f3f4a722ae"
+ }
+ Frame {
+ msec: 2096
+ hash: "29245946cbd811fe6bf6b2b41cc13002"
+ }
+ Frame {
+ msec: 2112
+ hash: "63ebaa4869728f5e2891d068e4b0091c"
+ }
+ Frame {
+ msec: 2128
+ hash: "d1ed4916cb1ecff60277d74369ff311b"
+ }
+ Frame {
+ msec: 2144
+ hash: "36c054064c9a76f4072492e55c70fb6c"
+ }
+ Frame {
+ msec: 2160
+ hash: "7aa0cbf73f7999be7cde4ec739efbc33"
+ }
+ Frame {
+ msec: 2176
+ hash: "affab9fb48c889a2680eb81458d400f9"
+ }
+ Frame {
+ msec: 2192
+ hash: "13ca95adab171d9fad9ee8b75d0226bc"
+ }
+ Frame {
+ msec: 2208
+ hash: "4887cd34d9926a361f3ca2e75be53ea6"
+ }
+ Frame {
+ msec: 2224
+ hash: "a67e9a0f55512fb1c55f13c6b483923b"
+ }
+ Frame {
+ msec: 2240
+ hash: "6eae517ad33f0609c31ef1f8f80ba899"
+ }
+ Frame {
+ msec: 2256
+ hash: "74c1e71378b502bc1b732a55806a10f1"
+ }
+ Frame {
+ msec: 2272
+ hash: "a88d6fc324ef48aa52c642a1662ec679"
+ }
+ Frame {
+ msec: 2288
+ hash: "8172e076b05d95248d89e815fde820ef"
+ }
+ Frame {
+ msec: 2304
+ hash: "7b78cba247f2c209ed81e003ca25d0a5"
+ }
+ Frame {
+ msec: 2320
+ hash: "f57727419bb51fb1e589b960ddeb20ae"
+ }
+ Frame {
+ msec: 2336
+ hash: "3fb20f9dbd40b4729235e13af9643afc"
+ }
+ Frame {
+ msec: 2352
+ hash: "b12faa76c07adc21634cd8f8cb8436ae"
+ }
+ Frame {
+ msec: 2368
+ hash: "3b644aac161f0a75bfb64f5075373190"
+ }
+ Frame {
+ msec: 2384
+ hash: "a790f0e884ab85f7802dd094e4ef550f"
+ }
+ Frame {
+ msec: 2400
+ hash: "a6937ee49648ed0cb409063bf1da3b87"
+ }
+ Frame {
+ msec: 2416
+ hash: "0b1a741975e3d9ef8f5e78f371c89441"
+ }
+ Frame {
+ msec: 2432
+ hash: "1bf7a98884b506b38326f59f85a53f41"
+ }
+ Frame {
+ msec: 2448
+ hash: "fb17df681d99d5de05f6329bba697ea5"
+ }
+ Frame {
+ msec: 2464
+ hash: "acd9a2e76b22ab0ff809fd3ec3a018ec"
+ }
+ Frame {
+ msec: 2480
+ hash: "73c5f23f51797a33f4d2898738e6356e"
+ }
+ Frame {
+ msec: 2496
+ hash: "65c514c9e926affe1da0b4826d2754c7"
+ }
+ Frame {
+ msec: 2512
+ hash: "5b027815ea3c1ea54e1a02c798c468db"
+ }
+ Frame {
+ msec: 2528
+ hash: "e1e6c7a7f51bcccd749710dbbf9e97f6"
+ }
+ Frame {
+ msec: 2544
+ hash: "11673a112566a64aca3c7010b9cc9c4d"
+ }
+ Frame {
+ msec: 2560
+ hash: "826c7741ba0c51de407bb799e8f360b5"
+ }
+ Frame {
+ msec: 2576
+ hash: "3b95eb8cbfc831e1ebee2e456b026ab4"
+ }
+ Frame {
+ msec: 2592
+ hash: "95d776c84fe155617fc4ee51bdb45b7e"
+ }
+ Frame {
+ msec: 2608
+ hash: "a1bd4e995365e79389dba80f9e3b7af8"
+ }
+ Frame {
+ msec: 2624
+ hash: "44072400ca3f0237d1aebae28a94becc"
+ }
+ Frame {
+ msec: 2640
+ hash: "99de44f74f8e1f79652ab46afb4bb59e"
+ }
+ Frame {
+ msec: 2656
+ hash: "4f1eace868a6688e5b24ce48a1f0fd18"
+ }
+ Frame {
+ msec: 2672
+ hash: "84c94704c16e246df1048f958cc8cefb"
+ }
+ Frame {
+ msec: 2688
+ hash: "e880d93963c80e4fab5173554c9600fc"
+ }
+ Frame {
+ msec: 2704
+ hash: "e91bb914c1eb63cd4269b30a220a128a"
+ }
+ Frame {
+ msec: 2720
+ hash: "94084ca4998fcda408f6987f52c34185"
+ }
+ Frame {
+ msec: 2736
+ hash: "985868869ef2c332da379460a2f3a71b"
+ }
+ Frame {
+ msec: 2752
+ hash: "587cb6e05048579088e88e0180e3ad48"
+ }
+ Frame {
+ msec: 2768
+ hash: "97f7a2175dcf9ac2581a92d614d72f88"
+ }
+ Frame {
+ msec: 2784
+ hash: "93128906d054e44bfd126fc22bdc3102"
+ }
+ Frame {
+ msec: 2800
+ hash: "08f55088cdce741c67539f73291e53ab"
+ }
+ Frame {
+ msec: 2816
+ hash: "30f84a7f67b13a945ba6d5935ea92da5"
+ }
+ Frame {
+ msec: 2832
+ hash: "5359f5e45e5467c62c2d9521c8199c48"
+ }
+ Frame {
+ msec: 2848
+ hash: "7c22fc3e30377cc14326833bdd23ddd8"
+ }
+ Frame {
+ msec: 2864
+ hash: "80ebac4d923f67fb8dba3d133ce657ba"
+ }
+ Frame {
+ msec: 2880
+ image: "animated.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "81d2fc6727dc7449d1a87b4abea9b704"
+ }
+ Frame {
+ msec: 2912
+ hash: "68dae343cf324391ec6721cea14575f7"
+ }
+ Frame {
+ msec: 2928
+ hash: "ec0aea8dc8c269d1f0aee5817347ac55"
+ }
+ Frame {
+ msec: 2944
+ hash: "a4ddb4956d71fd642d54757938100cf3"
+ }
+ Frame {
+ msec: 2960
+ hash: "956429472da133324c970774f77784f5"
+ }
+ Frame {
+ msec: 2976
+ hash: "c763f56728e17fc119539a4d45dfccc3"
+ }
+ Frame {
+ msec: 2992
+ hash: "ae48da4a66f93c806725ce749700aac8"
+ }
+ Frame {
+ msec: 3008
+ hash: "bccb4b8a494bd45bd70c2524a02a9dc3"
+ }
+ Frame {
+ msec: 3024
+ hash: "bc747167dfb3388ac63e9e68a86b9a03"
+ }
+ Frame {
+ msec: 3040
+ hash: "86360bd58bba5fdd901c105ddb2e3ade"
+ }
+ Frame {
+ msec: 3056
+ hash: "7383209c80b403b93da3264eadbc047f"
+ }
+ Frame {
+ msec: 3072
+ hash: "280288a7988736e30a2a3e4289ac3b0c"
+ }
+ Frame {
+ msec: 3088
+ hash: "ff0928dfd16b2da9811a172c19817a97"
+ }
+ Frame {
+ msec: 3104
+ hash: "eac4600372f0fdfadee88896ac915a48"
+ }
+ Frame {
+ msec: 3120
+ hash: "f04e84ad3579d6334077abe73101d206"
+ }
+ Frame {
+ msec: 3136
+ hash: "8861bf848da5c96b35addff736b01520"
+ }
+ Frame {
+ msec: 3152
+ hash: "1ac8c393f084aa1894c26610b7f40ea6"
+ }
+ Frame {
+ msec: 3168
+ hash: "e8a61d3858244127cb2b2812f04f5ce9"
+ }
+ Frame {
+ msec: 3184
+ hash: "93cf31eabb454ec536c638a506be0648"
+ }
+ Frame {
+ msec: 3200
+ hash: "0cba07ca38c7f0483244832a42d9ac53"
+ }
+ Frame {
+ msec: 3216
+ hash: "c7eb7837dce71c914186326216214eeb"
+ }
+ Frame {
+ msec: 3232
+ hash: "593a8a45c3a0cd7ce1cb6bd1913136ba"
+ }
+ Frame {
+ msec: 3248
+ hash: "1ea07ee309ce2c52cbc36370b75a872f"
+ }
+ Frame {
+ msec: 3264
+ hash: "93d9f0a7c387cbe653a9a088f8f4ef2b"
+ }
+ Frame {
+ msec: 3280
+ hash: "a6f17da2dd581bdc249ff62f833dc025"
+ }
+ Frame {
+ msec: 3296
+ hash: "b74521d6ac531414aeeca0fb28379d11"
+ }
+ Frame {
+ msec: 3312
+ hash: "6a521f952e05d91b86ad78fd6f5de4f9"
+ }
+ Frame {
+ msec: 3328
+ hash: "4e60300cfab8634e04dcd1b556251d31"
+ }
+ Frame {
+ msec: 3344
+ hash: "60f158382f75103c78e2b9b408e0fe65"
+ }
+ Frame {
+ msec: 3360
+ hash: "153237f8cf37e29ad2f32f7a8a6aecdb"
+ }
+ Frame {
+ msec: 3376
+ hash: "554e1d360463871e7c05cfe6f8abe1dd"
+ }
+ Frame {
+ msec: 3392
+ hash: "e418b5f54705515dce5ce3b4cbc45d19"
+ }
+ Frame {
+ msec: 3408
+ hash: "19d05a96f3ae7388e854bbf1075b51c1"
+ }
+ Frame {
+ msec: 3424
+ hash: "4ae120bb6dc2bd5ff81cc99ae03c191e"
+ }
+ Frame {
+ msec: 3440
+ hash: "18c2f321a149e38b258ac264d40c2376"
+ }
+ Frame {
+ msec: 3456
+ hash: "a40014d842471784e1222eb205395f6f"
+ }
+ Frame {
+ msec: 3472
+ hash: "f1a7a4a67a21f5025294af4bea3f8998"
+ }
+ Frame {
+ msec: 3488
+ hash: "3152e5f29015ece423fbdd11a2b382b8"
+ }
+ Frame {
+ msec: 3504
+ hash: "2a7bed775824968e318c3d40fbc5b1c2"
+ }
+ Frame {
+ msec: 3520
+ hash: "dd4c9e63001bc6e0e63ea4db2d85301f"
+ }
+ Frame {
+ msec: 3536
+ hash: "ac8f096e8c7cc23bfb01de69cf3e266e"
+ }
+ Frame {
+ msec: 3552
+ hash: "6b48bfd0c7993f746d6301c2a0f61d23"
+ }
+ Frame {
+ msec: 3568
+ hash: "06d8d8a1a41893d4e27725948a75caf4"
+ }
+ Frame {
+ msec: 3584
+ hash: "3f62f032239d412d3637198f5e3e83d6"
+ }
+ Frame {
+ msec: 3600
+ hash: "01947e631c3db43f7c5b4427229bc0c8"
+ }
+ Frame {
+ msec: 3616
+ hash: "2266df495ab5265e7514a506d3bf5bc6"
+ }
+ Frame {
+ msec: 3632
+ hash: "8c66a33d26eec2a1133f4362710a5fab"
+ }
+ Frame {
+ msec: 3648
+ hash: "75c9bf83ca3fe24612c245698c089430"
+ }
+ Frame {
+ msec: 3664
+ hash: "c1936628aec13e08e9581dcd2c6d5717"
+ }
+ Frame {
+ msec: 3680
+ hash: "a85ee8be6a47bbd1b14137803ce606ec"
+ }
+ Frame {
+ msec: 3696
+ hash: "8419f1d75b14130730bcfec4e3a9b058"
+ }
+ Frame {
+ msec: 3712
+ hash: "482bb92d4f0ad5d7c7e379b9e1ad326e"
+ }
+ Frame {
+ msec: 3728
+ hash: "406224b535b4425d2708df0083acdc8e"
+ }
+ Frame {
+ msec: 3744
+ hash: "3dac1d9632378bd18c1c938a4868e3fb"
+ }
+ Frame {
+ msec: 3760
+ hash: "08b9be66e23c7b6f6f629c7470394601"
+ }
+ Frame {
+ msec: 3776
+ hash: "7b4d12e5a877507e7454aa1b8ed87c2d"
+ }
+ Frame {
+ msec: 3792
+ hash: "4d45d70f997c2c67166905c97a900d2e"
+ }
+ Frame {
+ msec: 3808
+ hash: "c5b3dede34b0d1d78135e39c41d117c6"
+ }
+ Frame {
+ msec: 3824
+ hash: "b63e4d1686057828fd8781f1c33585f5"
+ }
+ Frame {
+ msec: 3840
+ image: "animated.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "465ec993948f7b75aeb5759976f4620d"
+ }
+ Frame {
+ msec: 3872
+ hash: "228d5312c261d1a5455faf69ec2f2520"
+ }
+ Frame {
+ msec: 3888
+ hash: "aacf9ae3c23d174a1c1cda493600e355"
+ }
+ Frame {
+ msec: 3904
+ hash: "4c60d345821f515c7811f3b69eb94607"
+ }
+ Frame {
+ msec: 3920
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 3936
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 3952
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 3968
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 3984
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 4000
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 4016
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 4032
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 4048
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 4064
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 4080
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 4096
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 4112
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 4128
+ hash: "4c60d345821f515c7811f3b69eb94607"
+ }
+ Frame {
+ msec: 4144
+ hash: "aacf9ae3c23d174a1c1cda493600e355"
+ }
+ Frame {
+ msec: 4160
+ hash: "228d5312c261d1a5455faf69ec2f2520"
+ }
+ Frame {
+ msec: 4176
+ hash: "465ec993948f7b75aeb5759976f4620d"
+ }
+ Frame {
+ msec: 4192
+ hash: "755cfccc38bababc468fe6e1076804bb"
+ }
+ Frame {
+ msec: 4208
+ hash: "b63e4d1686057828fd8781f1c33585f5"
+ }
+ Frame {
+ msec: 4224
+ hash: "c5b3dede34b0d1d78135e39c41d117c6"
+ }
+ Frame {
+ msec: 4240
+ hash: "4d45d70f997c2c67166905c97a900d2e"
+ }
+ Frame {
+ msec: 4256
+ hash: "7b4d12e5a877507e7454aa1b8ed87c2d"
+ }
+ Frame {
+ msec: 4272
+ hash: "08b9be66e23c7b6f6f629c7470394601"
+ }
+ Frame {
+ msec: 4288
+ hash: "3dac1d9632378bd18c1c938a4868e3fb"
+ }
+ Frame {
+ msec: 4304
+ hash: "406224b535b4425d2708df0083acdc8e"
+ }
+ Frame {
+ msec: 4320
+ hash: "482bb92d4f0ad5d7c7e379b9e1ad326e"
+ }
+ Frame {
+ msec: 4336
+ hash: "8419f1d75b14130730bcfec4e3a9b058"
+ }
+ Frame {
+ msec: 4352
+ hash: "a85ee8be6a47bbd1b14137803ce606ec"
+ }
+ Frame {
+ msec: 4368
+ hash: "c1936628aec13e08e9581dcd2c6d5717"
+ }
+ Frame {
+ msec: 4384
+ hash: "75c9bf83ca3fe24612c245698c089430"
+ }
+ Frame {
+ msec: 4400
+ hash: "8c66a33d26eec2a1133f4362710a5fab"
+ }
+ Frame {
+ msec: 4416
+ hash: "2266df495ab5265e7514a506d3bf5bc6"
+ }
+ Frame {
+ msec: 4432
+ hash: "01947e631c3db43f7c5b4427229bc0c8"
+ }
+ Frame {
+ msec: 4448
+ hash: "3f62f032239d412d3637198f5e3e83d6"
+ }
+ Frame {
+ msec: 4464
+ hash: "06d8d8a1a41893d4e27725948a75caf4"
+ }
+ Frame {
+ msec: 4480
+ hash: "6b48bfd0c7993f746d6301c2a0f61d23"
+ }
+ Frame {
+ msec: 4496
+ hash: "ac8f096e8c7cc23bfb01de69cf3e266e"
+ }
+ Frame {
+ msec: 4512
+ hash: "dd4c9e63001bc6e0e63ea4db2d85301f"
+ }
+ Frame {
+ msec: 4528
+ hash: "2a7bed775824968e318c3d40fbc5b1c2"
+ }
+ Frame {
+ msec: 4544
+ hash: "3152e5f29015ece423fbdd11a2b382b8"
+ }
+ Frame {
+ msec: 4560
+ hash: "f1a7a4a67a21f5025294af4bea3f8998"
+ }
+ Frame {
+ msec: 4576
+ hash: "a40014d842471784e1222eb205395f6f"
+ }
+ Frame {
+ msec: 4592
+ hash: "18c2f321a149e38b258ac264d40c2376"
+ }
+ Frame {
+ msec: 4608
+ hash: "4ae120bb6dc2bd5ff81cc99ae03c191e"
+ }
+ Frame {
+ msec: 4624
+ hash: "19d05a96f3ae7388e854bbf1075b51c1"
+ }
+ Frame {
+ msec: 4640
+ hash: "e418b5f54705515dce5ce3b4cbc45d19"
+ }
+ Frame {
+ msec: 4656
+ hash: "554e1d360463871e7c05cfe6f8abe1dd"
+ }
+ Frame {
+ msec: 4672
+ hash: "153237f8cf37e29ad2f32f7a8a6aecdb"
+ }
+ Frame {
+ msec: 4688
+ hash: "60f158382f75103c78e2b9b408e0fe65"
+ }
+ Frame {
+ msec: 4704
+ hash: "4e60300cfab8634e04dcd1b556251d31"
+ }
+ Frame {
+ msec: 4720
+ hash: "6a521f952e05d91b86ad78fd6f5de4f9"
+ }
+ Frame {
+ msec: 4736
+ hash: "b74521d6ac531414aeeca0fb28379d11"
+ }
+ Frame {
+ msec: 4752
+ hash: "a6f17da2dd581bdc249ff62f833dc025"
+ }
+ Frame {
+ msec: 4768
+ hash: "93d9f0a7c387cbe653a9a088f8f4ef2b"
+ }
+ Frame {
+ msec: 4784
+ hash: "1ea07ee309ce2c52cbc36370b75a872f"
+ }
+ Frame {
+ msec: 4800
+ image: "animated.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "c7eb7837dce71c914186326216214eeb"
+ }
+ Frame {
+ msec: 4832
+ hash: "0cba07ca38c7f0483244832a42d9ac53"
+ }
+ Frame {
+ msec: 4848
+ hash: "93cf31eabb454ec536c638a506be0648"
+ }
+ Frame {
+ msec: 4864
+ hash: "e8a61d3858244127cb2b2812f04f5ce9"
+ }
+ Frame {
+ msec: 4880
+ hash: "1ac8c393f084aa1894c26610b7f40ea6"
+ }
+ Frame {
+ msec: 4896
+ hash: "8861bf848da5c96b35addff736b01520"
+ }
+ Frame {
+ msec: 4912
+ hash: "f04e84ad3579d6334077abe73101d206"
+ }
+ Frame {
+ msec: 4928
+ hash: "eac4600372f0fdfadee88896ac915a48"
+ }
+ Frame {
+ msec: 4944
+ hash: "ff0928dfd16b2da9811a172c19817a97"
+ }
+ Frame {
+ msec: 4960
+ hash: "280288a7988736e30a2a3e4289ac3b0c"
+ }
+ Frame {
+ msec: 4976
+ hash: "7383209c80b403b93da3264eadbc047f"
+ }
+ Frame {
+ msec: 4992
+ hash: "86360bd58bba5fdd901c105ddb2e3ade"
+ }
+ Frame {
+ msec: 5008
+ hash: "bc747167dfb3388ac63e9e68a86b9a03"
+ }
+ Frame {
+ msec: 5024
+ hash: "bccb4b8a494bd45bd70c2524a02a9dc3"
+ }
+ Frame {
+ msec: 5040
+ hash: "ae48da4a66f93c806725ce749700aac8"
+ }
+ Frame {
+ msec: 5056
+ hash: "c763f56728e17fc119539a4d45dfccc3"
+ }
+ Frame {
+ msec: 5072
+ hash: "956429472da133324c970774f77784f5"
+ }
+ Frame {
+ msec: 5088
+ hash: "a4ddb4956d71fd642d54757938100cf3"
+ }
+ Frame {
+ msec: 5104
+ hash: "ec0aea8dc8c269d1f0aee5817347ac55"
+ }
+ Frame {
+ msec: 5120
+ hash: "68dae343cf324391ec6721cea14575f7"
+ }
+ Frame {
+ msec: 5136
+ hash: "81d2fc6727dc7449d1a87b4abea9b704"
+ }
+ Frame {
+ msec: 5152
+ hash: "c3a1f12febc979150028737722d6d045"
+ }
+ Frame {
+ msec: 5168
+ hash: "80ebac4d923f67fb8dba3d133ce657ba"
+ }
+ Frame {
+ msec: 5184
+ hash: "7c22fc3e30377cc14326833bdd23ddd8"
+ }
+ Frame {
+ msec: 5200
+ hash: "5359f5e45e5467c62c2d9521c8199c48"
+ }
+ Frame {
+ msec: 5216
+ hash: "30f84a7f67b13a945ba6d5935ea92da5"
+ }
+ Frame {
+ msec: 5232
+ hash: "08f55088cdce741c67539f73291e53ab"
+ }
+ Frame {
+ msec: 5248
+ hash: "93128906d054e44bfd126fc22bdc3102"
+ }
+ Frame {
+ msec: 5264
+ hash: "97f7a2175dcf9ac2581a92d614d72f88"
+ }
+ Frame {
+ msec: 5280
+ hash: "587cb6e05048579088e88e0180e3ad48"
+ }
+ Frame {
+ msec: 5296
+ hash: "985868869ef2c332da379460a2f3a71b"
+ }
+ Frame {
+ msec: 5312
+ hash: "94084ca4998fcda408f6987f52c34185"
+ }
+ Frame {
+ msec: 5328
+ hash: "e91bb914c1eb63cd4269b30a220a128a"
+ }
+ Frame {
+ msec: 5344
+ hash: "e880d93963c80e4fab5173554c9600fc"
+ }
+ Frame {
+ msec: 5360
+ hash: "84c94704c16e246df1048f958cc8cefb"
+ }
+ Frame {
+ msec: 5376
+ hash: "4f1eace868a6688e5b24ce48a1f0fd18"
+ }
+ Frame {
+ msec: 5392
+ hash: "99de44f74f8e1f79652ab46afb4bb59e"
+ }
+ Frame {
+ msec: 5408
+ hash: "44072400ca3f0237d1aebae28a94becc"
+ }
+ Frame {
+ msec: 5424
+ hash: "a1bd4e995365e79389dba80f9e3b7af8"
+ }
+ Frame {
+ msec: 5440
+ hash: "95d776c84fe155617fc4ee51bdb45b7e"
+ }
+ Frame {
+ msec: 5456
+ hash: "3b95eb8cbfc831e1ebee2e456b026ab4"
+ }
+ Frame {
+ msec: 5472
+ hash: "826c7741ba0c51de407bb799e8f360b5"
+ }
+ Frame {
+ msec: 5488
+ hash: "11673a112566a64aca3c7010b9cc9c4d"
+ }
+ Frame {
+ msec: 5504
+ hash: "e1e6c7a7f51bcccd749710dbbf9e97f6"
+ }
+ Frame {
+ msec: 5520
+ hash: "5b027815ea3c1ea54e1a02c798c468db"
+ }
+ Frame {
+ msec: 5536
+ hash: "65c514c9e926affe1da0b4826d2754c7"
+ }
+ Frame {
+ msec: 5552
+ hash: "73c5f23f51797a33f4d2898738e6356e"
+ }
+ Frame {
+ msec: 5568
+ hash: "acd9a2e76b22ab0ff809fd3ec3a018ec"
+ }
+ Frame {
+ msec: 5584
+ hash: "fb17df681d99d5de05f6329bba697ea5"
+ }
+ Frame {
+ msec: 5600
+ hash: "1bf7a98884b506b38326f59f85a53f41"
+ }
+ Frame {
+ msec: 5616
+ hash: "0b1a741975e3d9ef8f5e78f371c89441"
+ }
+ Frame {
+ msec: 5632
+ hash: "a6937ee49648ed0cb409063bf1da3b87"
+ }
+ Frame {
+ msec: 5648
+ hash: "a790f0e884ab85f7802dd094e4ef550f"
+ }
+ Frame {
+ msec: 5664
+ hash: "3b644aac161f0a75bfb64f5075373190"
+ }
+ Frame {
+ msec: 5680
+ hash: "b12faa76c07adc21634cd8f8cb8436ae"
+ }
+ Frame {
+ msec: 5696
+ hash: "3fb20f9dbd40b4729235e13af9643afc"
+ }
+ Frame {
+ msec: 5712
+ hash: "f57727419bb51fb1e589b960ddeb20ae"
+ }
+ Frame {
+ msec: 5728
+ hash: "7b78cba247f2c209ed81e003ca25d0a5"
+ }
+ Frame {
+ msec: 5744
+ hash: "8172e076b05d95248d89e815fde820ef"
+ }
+ Frame {
+ msec: 5760
+ image: "animated.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "74c1e71378b502bc1b732a55806a10f1"
+ }
+ Frame {
+ msec: 5792
+ hash: "6eae517ad33f0609c31ef1f8f80ba899"
+ }
+ Frame {
+ msec: 5808
+ hash: "a67e9a0f55512fb1c55f13c6b483923b"
+ }
+ Frame {
+ msec: 5824
+ hash: "4887cd34d9926a361f3ca2e75be53ea6"
+ }
+ Frame {
+ msec: 5840
+ hash: "13ca95adab171d9fad9ee8b75d0226bc"
+ }
+ Frame {
+ msec: 5856
+ hash: "affab9fb48c889a2680eb81458d400f9"
+ }
+ Frame {
+ msec: 5872
+ hash: "7aa0cbf73f7999be7cde4ec739efbc33"
+ }
+ Frame {
+ msec: 5888
+ hash: "36c054064c9a76f4072492e55c70fb6c"
+ }
+ Frame {
+ msec: 5904
+ hash: "d1ed4916cb1ecff60277d74369ff311b"
+ }
+ Frame {
+ msec: 5920
+ hash: "63ebaa4869728f5e2891d068e4b0091c"
+ }
+ Frame {
+ msec: 5936
+ hash: "29245946cbd811fe6bf6b2b41cc13002"
+ }
+ Frame {
+ msec: 5952
+ hash: "8a9dd7a2d10771633e6896f3f4a722ae"
+ }
+ Frame {
+ msec: 5968
+ hash: "058c918e83bfdd665cd836566b53959b"
+ }
+ Frame {
+ msec: 5984
+ hash: "fdf3b7a0391119e2fe77be8d6a17481d"
+ }
+ Frame {
+ msec: 6000
+ hash: "ed5d80c33dbf72624385b1cf43784626"
+ }
+ Frame {
+ msec: 6016
+ hash: "911591db1519ba264847f09868e38e0e"
+ }
+ Frame {
+ msec: 6032
+ hash: "ed5d80c33dbf72624385b1cf43784626"
+ }
+ Frame {
+ msec: 6048
+ hash: "fdf3b7a0391119e2fe77be8d6a17481d"
+ }
+ Frame {
+ msec: 6064
+ hash: "058c918e83bfdd665cd836566b53959b"
+ }
+ Frame {
+ msec: 6080
+ hash: "8a9dd7a2d10771633e6896f3f4a722ae"
+ }
+ Frame {
+ msec: 6096
+ hash: "29245946cbd811fe6bf6b2b41cc13002"
+ }
+ Frame {
+ msec: 6112
+ hash: "63ebaa4869728f5e2891d068e4b0091c"
+ }
+ Frame {
+ msec: 6128
+ hash: "d1ed4916cb1ecff60277d74369ff311b"
+ }
+ Frame {
+ msec: 6144
+ hash: "36c054064c9a76f4072492e55c70fb6c"
+ }
+ Frame {
+ msec: 6160
+ hash: "7aa0cbf73f7999be7cde4ec739efbc33"
+ }
+ Frame {
+ msec: 6176
+ hash: "affab9fb48c889a2680eb81458d400f9"
+ }
+ Frame {
+ msec: 6192
+ hash: "13ca95adab171d9fad9ee8b75d0226bc"
+ }
+ Frame {
+ msec: 6208
+ hash: "4887cd34d9926a361f3ca2e75be53ea6"
+ }
+ Frame {
+ msec: 6224
+ hash: "a67e9a0f55512fb1c55f13c6b483923b"
+ }
+ Frame {
+ msec: 6240
+ hash: "6eae517ad33f0609c31ef1f8f80ba899"
+ }
+ Frame {
+ msec: 6256
+ hash: "74c1e71378b502bc1b732a55806a10f1"
+ }
+ Frame {
+ msec: 6272
+ hash: "a88d6fc324ef48aa52c642a1662ec679"
+ }
+ Frame {
+ msec: 6288
+ hash: "8172e076b05d95248d89e815fde820ef"
+ }
+ Frame {
+ msec: 6304
+ hash: "7b78cba247f2c209ed81e003ca25d0a5"
+ }
+ Frame {
+ msec: 6320
+ hash: "f57727419bb51fb1e589b960ddeb20ae"
+ }
+ Frame {
+ msec: 6336
+ hash: "3fb20f9dbd40b4729235e13af9643afc"
+ }
+ Frame {
+ msec: 6352
+ hash: "b12faa76c07adc21634cd8f8cb8436ae"
+ }
+ Frame {
+ msec: 6368
+ hash: "3b644aac161f0a75bfb64f5075373190"
+ }
+ Frame {
+ msec: 6384
+ hash: "a790f0e884ab85f7802dd094e4ef550f"
+ }
+ Frame {
+ msec: 6400
+ hash: "a6937ee49648ed0cb409063bf1da3b87"
+ }
+ Frame {
+ msec: 6416
+ hash: "0b1a741975e3d9ef8f5e78f371c89441"
+ }
+ Frame {
+ msec: 6432
+ hash: "1bf7a98884b506b38326f59f85a53f41"
+ }
+ Frame {
+ msec: 6448
+ hash: "fb17df681d99d5de05f6329bba697ea5"
+ }
+ Frame {
+ msec: 6464
+ hash: "acd9a2e76b22ab0ff809fd3ec3a018ec"
+ }
+ Frame {
+ msec: 6480
+ hash: "73c5f23f51797a33f4d2898738e6356e"
+ }
+ Frame {
+ msec: 6496
+ hash: "65c514c9e926affe1da0b4826d2754c7"
+ }
+ Frame {
+ msec: 6512
+ hash: "5b027815ea3c1ea54e1a02c798c468db"
+ }
+ Frame {
+ msec: 6528
+ hash: "e1e6c7a7f51bcccd749710dbbf9e97f6"
+ }
+ Frame {
+ msec: 6544
+ hash: "11673a112566a64aca3c7010b9cc9c4d"
+ }
+ Frame {
+ msec: 6560
+ hash: "826c7741ba0c51de407bb799e8f360b5"
+ }
+ Frame {
+ msec: 6576
+ hash: "3b95eb8cbfc831e1ebee2e456b026ab4"
+ }
+ Frame {
+ msec: 6592
+ hash: "95d776c84fe155617fc4ee51bdb45b7e"
+ }
+ Frame {
+ msec: 6608
+ hash: "a1bd4e995365e79389dba80f9e3b7af8"
+ }
+ Frame {
+ msec: 6624
+ hash: "44072400ca3f0237d1aebae28a94becc"
+ }
+ Frame {
+ msec: 6640
+ hash: "99de44f74f8e1f79652ab46afb4bb59e"
+ }
+ Frame {
+ msec: 6656
+ hash: "4f1eace868a6688e5b24ce48a1f0fd18"
+ }
+ Frame {
+ msec: 6672
+ hash: "84c94704c16e246df1048f958cc8cefb"
+ }
+ Frame {
+ msec: 6688
+ hash: "e880d93963c80e4fab5173554c9600fc"
+ }
+ Frame {
+ msec: 6704
+ hash: "e91bb914c1eb63cd4269b30a220a128a"
+ }
+ Frame {
+ msec: 6720
+ image: "animated.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "985868869ef2c332da379460a2f3a71b"
+ }
+ Frame {
+ msec: 6752
+ hash: "587cb6e05048579088e88e0180e3ad48"
+ }
+ Frame {
+ msec: 6768
+ hash: "97f7a2175dcf9ac2581a92d614d72f88"
+ }
+ Frame {
+ msec: 6784
+ hash: "93128906d054e44bfd126fc22bdc3102"
+ }
+ Frame {
+ msec: 6800
+ hash: "08f55088cdce741c67539f73291e53ab"
+ }
+ Frame {
+ msec: 6816
+ hash: "30f84a7f67b13a945ba6d5935ea92da5"
+ }
+ Frame {
+ msec: 6832
+ hash: "5359f5e45e5467c62c2d9521c8199c48"
+ }
+ Frame {
+ msec: 6848
+ hash: "7c22fc3e30377cc14326833bdd23ddd8"
+ }
+ Frame {
+ msec: 6864
+ hash: "80ebac4d923f67fb8dba3d133ce657ba"
+ }
+ Frame {
+ msec: 6880
+ hash: "c3a1f12febc979150028737722d6d045"
+ }
+ Frame {
+ msec: 6896
+ hash: "81d2fc6727dc7449d1a87b4abea9b704"
+ }
+ Frame {
+ msec: 6912
+ hash: "68dae343cf324391ec6721cea14575f7"
+ }
+ Frame {
+ msec: 6928
+ hash: "ec0aea8dc8c269d1f0aee5817347ac55"
+ }
+ Frame {
+ msec: 6944
+ hash: "a4ddb4956d71fd642d54757938100cf3"
+ }
+ Frame {
+ msec: 6960
+ hash: "956429472da133324c970774f77784f5"
+ }
+ Frame {
+ msec: 6976
+ hash: "c763f56728e17fc119539a4d45dfccc3"
+ }
+ Frame {
+ msec: 6992
+ hash: "ae48da4a66f93c806725ce749700aac8"
+ }
+ Frame {
+ msec: 7008
+ hash: "bccb4b8a494bd45bd70c2524a02a9dc3"
+ }
+ Frame {
+ msec: 7024
+ hash: "bc747167dfb3388ac63e9e68a86b9a03"
+ }
+ Frame {
+ msec: 7040
+ hash: "86360bd58bba5fdd901c105ddb2e3ade"
+ }
+ Frame {
+ msec: 7056
+ hash: "7383209c80b403b93da3264eadbc047f"
+ }
+ Frame {
+ msec: 7072
+ hash: "280288a7988736e30a2a3e4289ac3b0c"
+ }
+ Frame {
+ msec: 7088
+ hash: "ff0928dfd16b2da9811a172c19817a97"
+ }
+ Frame {
+ msec: 7104
+ hash: "eac4600372f0fdfadee88896ac915a48"
+ }
+ Frame {
+ msec: 7120
+ hash: "f04e84ad3579d6334077abe73101d206"
+ }
+ Frame {
+ msec: 7136
+ hash: "8861bf848da5c96b35addff736b01520"
+ }
+ Frame {
+ msec: 7152
+ hash: "1ac8c393f084aa1894c26610b7f40ea6"
+ }
+ Frame {
+ msec: 7168
+ hash: "e8a61d3858244127cb2b2812f04f5ce9"
+ }
+ Frame {
+ msec: 7184
+ hash: "93cf31eabb454ec536c638a506be0648"
+ }
+ Frame {
+ msec: 7200
+ hash: "0cba07ca38c7f0483244832a42d9ac53"
+ }
+ Frame {
+ msec: 7216
+ hash: "c7eb7837dce71c914186326216214eeb"
+ }
+ Frame {
+ msec: 7232
+ hash: "593a8a45c3a0cd7ce1cb6bd1913136ba"
+ }
+ Frame {
+ msec: 7248
+ hash: "1ea07ee309ce2c52cbc36370b75a872f"
+ }
+ Frame {
+ msec: 7264
+ hash: "93d9f0a7c387cbe653a9a088f8f4ef2b"
+ }
+ Frame {
+ msec: 7280
+ hash: "a6f17da2dd581bdc249ff62f833dc025"
+ }
+ Frame {
+ msec: 7296
+ hash: "b74521d6ac531414aeeca0fb28379d11"
+ }
+ Frame {
+ msec: 7312
+ hash: "6a521f952e05d91b86ad78fd6f5de4f9"
+ }
+ Frame {
+ msec: 7328
+ hash: "4e60300cfab8634e04dcd1b556251d31"
+ }
+ Frame {
+ msec: 7344
+ hash: "60f158382f75103c78e2b9b408e0fe65"
+ }
+ Frame {
+ msec: 7360
+ hash: "153237f8cf37e29ad2f32f7a8a6aecdb"
+ }
+ Frame {
+ msec: 7376
+ hash: "554e1d360463871e7c05cfe6f8abe1dd"
+ }
+ Frame {
+ msec: 7392
+ hash: "e418b5f54705515dce5ce3b4cbc45d19"
+ }
+ Frame {
+ msec: 7408
+ hash: "19d05a96f3ae7388e854bbf1075b51c1"
+ }
+ Frame {
+ msec: 7424
+ hash: "4ae120bb6dc2bd5ff81cc99ae03c191e"
+ }
+ Frame {
+ msec: 7440
+ hash: "18c2f321a149e38b258ac264d40c2376"
+ }
+ Frame {
+ msec: 7456
+ hash: "a40014d842471784e1222eb205395f6f"
+ }
+ Frame {
+ msec: 7472
+ hash: "f1a7a4a67a21f5025294af4bea3f8998"
+ }
+ Frame {
+ msec: 7488
+ hash: "3152e5f29015ece423fbdd11a2b382b8"
+ }
+ Frame {
+ msec: 7504
+ hash: "2a7bed775824968e318c3d40fbc5b1c2"
+ }
+ Frame {
+ msec: 7520
+ hash: "dd4c9e63001bc6e0e63ea4db2d85301f"
+ }
+ Frame {
+ msec: 7536
+ hash: "ac8f096e8c7cc23bfb01de69cf3e266e"
+ }
+ Frame {
+ msec: 7552
+ hash: "6b48bfd0c7993f746d6301c2a0f61d23"
+ }
+ Frame {
+ msec: 7568
+ hash: "06d8d8a1a41893d4e27725948a75caf4"
+ }
+ Frame {
+ msec: 7584
+ hash: "3f62f032239d412d3637198f5e3e83d6"
+ }
+ Frame {
+ msec: 7600
+ hash: "01947e631c3db43f7c5b4427229bc0c8"
+ }
+ Frame {
+ msec: 7616
+ hash: "2266df495ab5265e7514a506d3bf5bc6"
+ }
+ Frame {
+ msec: 7632
+ hash: "8c66a33d26eec2a1133f4362710a5fab"
+ }
+ Frame {
+ msec: 7648
+ hash: "75c9bf83ca3fe24612c245698c089430"
+ }
+ Frame {
+ msec: 7664
+ hash: "c1936628aec13e08e9581dcd2c6d5717"
+ }
+ Frame {
+ msec: 7680
+ image: "animated.7.png"
+ }
+ Frame {
+ msec: 7696
+ hash: "8419f1d75b14130730bcfec4e3a9b058"
+ }
+ Frame {
+ msec: 7712
+ hash: "482bb92d4f0ad5d7c7e379b9e1ad326e"
+ }
+ Frame {
+ msec: 7728
+ hash: "406224b535b4425d2708df0083acdc8e"
+ }
+ Frame {
+ msec: 7744
+ hash: "3dac1d9632378bd18c1c938a4868e3fb"
+ }
+ Frame {
+ msec: 7760
+ hash: "08b9be66e23c7b6f6f629c7470394601"
+ }
+ Frame {
+ msec: 7776
+ hash: "7b4d12e5a877507e7454aa1b8ed87c2d"
+ }
+ Frame {
+ msec: 7792
+ hash: "4d45d70f997c2c67166905c97a900d2e"
+ }
+ Frame {
+ msec: 7808
+ hash: "c5b3dede34b0d1d78135e39c41d117c6"
+ }
+ Frame {
+ msec: 7824
+ hash: "b63e4d1686057828fd8781f1c33585f5"
+ }
+ Frame {
+ msec: 7840
+ hash: "755cfccc38bababc468fe6e1076804bb"
+ }
+ Frame {
+ msec: 7856
+ hash: "465ec993948f7b75aeb5759976f4620d"
+ }
+ Frame {
+ msec: 7872
+ hash: "228d5312c261d1a5455faf69ec2f2520"
+ }
+ Frame {
+ msec: 7888
+ hash: "aacf9ae3c23d174a1c1cda493600e355"
+ }
+ Frame {
+ msec: 7904
+ hash: "4c60d345821f515c7811f3b69eb94607"
+ }
+ Frame {
+ msec: 7920
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 7936
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 7952
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 7968
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 7984
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 8000
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 8016
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 8032
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 8048
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 8064
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 8080
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 8096
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 8112
+ hash: "aec13bcab337e55832b0a02fb5c6b526"
+ }
+ Frame {
+ msec: 8128
+ hash: "4c60d345821f515c7811f3b69eb94607"
+ }
+ Frame {
+ msec: 8144
+ hash: "aacf9ae3c23d174a1c1cda493600e355"
+ }
+ Frame {
+ msec: 8160
+ hash: "228d5312c261d1a5455faf69ec2f2520"
+ }
+ Frame {
+ msec: 8176
+ hash: "465ec993948f7b75aeb5759976f4620d"
+ }
+ Frame {
+ msec: 8192
+ hash: "755cfccc38bababc468fe6e1076804bb"
+ }
+ Frame {
+ msec: 8208
+ hash: "b63e4d1686057828fd8781f1c33585f5"
+ }
+ Frame {
+ msec: 8224
+ hash: "c5b3dede34b0d1d78135e39c41d117c6"
+ }
+ Frame {
+ msec: 8240
+ hash: "4d45d70f997c2c67166905c97a900d2e"
+ }
+ Frame {
+ msec: 8256
+ hash: "7b4d12e5a877507e7454aa1b8ed87c2d"
+ }
+ Frame {
+ msec: 8272
+ hash: "08b9be66e23c7b6f6f629c7470394601"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 8288
+ hash: "3dac1d9632378bd18c1c938a4868e3fb"
+ }
+ Frame {
+ msec: 8304
+ hash: "406224b535b4425d2708df0083acdc8e"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.0.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.0.png
new file mode 100644
index 0000000000..80cbd2628d
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.1.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.1.png
new file mode 100644
index 0000000000..80cbd2628d
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.2.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.2.png
new file mode 100644
index 0000000000..80cbd2628d
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.3.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.3.png
new file mode 100644
index 0000000000..80cbd2628d
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.4.png b/tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.4.png
new file mode 100644
index 0000000000..80cbd2628d
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.qml b/tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.qml
new file mode 100644
index 0000000000..16cd5e93b9
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/data/borders.qml
@@ -0,0 +1,1359 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 32
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 48
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 64
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 80
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 96
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 112
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 128
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 144
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 160
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 176
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 192
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 208
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 224
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 240
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 256
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 272
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 288
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 304
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 320
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 336
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 352
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 368
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 384
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 400
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 416
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 432
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 448
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 464
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 480
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 496
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 512
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 528
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 544
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 560
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 576
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 592
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 608
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 624
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 640
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 656
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 672
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 688
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 704
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 720
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 736
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 752
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 768
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 784
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 800
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 816
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 832
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 848
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 864
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 880
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 896
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 912
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 928
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 944
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 960
+ image: "borders.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 992
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1008
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1024
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1040
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1056
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1072
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1088
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1104
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1120
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1136
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1152
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1168
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1184
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1200
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1216
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1232
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1248
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1264
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1280
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1296
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1312
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1328
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1344
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1360
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1376
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1392
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1408
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1424
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1440
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1456
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1472
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1488
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1504
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1520
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1536
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1552
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1568
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1584
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1600
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1616
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1632
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1648
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1664
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1680
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1696
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1712
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1728
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1744
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1760
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1776
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1792
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1808
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1824
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1840
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1856
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1872
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1888
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1904
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1920
+ image: "borders.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1952
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1968
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 1984
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2000
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2016
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2032
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2048
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2064
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2080
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2096
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2112
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2128
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2144
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2160
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2176
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2192
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2208
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2224
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2240
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2256
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2272
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2288
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2304
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2320
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2336
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2352
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2368
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2384
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2400
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2416
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2432
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2448
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2464
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2480
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2496
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2512
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2528
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2544
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2560
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2576
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2592
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2608
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2624
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2640
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2656
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2672
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2688
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2704
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2720
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2736
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2752
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2768
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2784
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2800
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2816
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2832
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2848
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2864
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2880
+ image: "borders.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2912
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2928
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2944
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2960
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2976
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 2992
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3008
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3024
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3040
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3056
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3072
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3088
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3104
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3120
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3136
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3152
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3168
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3184
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3200
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3216
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3232
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3248
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3264
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3280
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3296
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3312
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3328
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3344
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3360
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3376
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3392
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3408
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3424
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3440
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3456
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3472
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3488
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3504
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3520
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3536
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3552
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3568
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3584
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3600
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3616
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3632
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3648
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3664
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3680
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3696
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3712
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3728
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3744
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3760
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3776
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3792
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3808
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3824
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3840
+ image: "borders.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3872
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3888
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3904
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3920
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3936
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3952
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3968
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 3984
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4000
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4016
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4032
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4048
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4064
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4080
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4096
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4112
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4128
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4144
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4160
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4176
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4192
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4208
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4224
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4240
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4256
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4272
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4288
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4304
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4320
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4336
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4352
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4368
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4384
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4400
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4416
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4432
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4448
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4464
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4480
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4496
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4512
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4528
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4544
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4560
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4576
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4592
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4608
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4624
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4640
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4656
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4672
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4688
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4704
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4720
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4736
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4752
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4768
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4784
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4800
+ image: "borders.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4832
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4848
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4864
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4880
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4896
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4912
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4928
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4944
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4960
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4976
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 4992
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5008
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5024
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5040
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5056
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5072
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5088
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5104
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5120
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5136
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5152
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5168
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5184
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5200
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5216
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5232
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5248
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5264
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5280
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5296
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5312
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5328
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5344
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5360
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5376
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5392
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+ Frame {
+ msec: 5408
+ hash: "ab9753116e289c932064144bb0845857"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.0.png b/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.0.png
new file mode 100644
index 0000000000..21b6afbed9
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.1.png b/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.1.png
new file mode 100644
index 0000000000..bb8a02bc4c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.2.png b/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.2.png
new file mode 100644
index 0000000000..da60237b23
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.3.png b/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.3.png
new file mode 100644
index 0000000000..3e943e8819
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.4.png b/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.4.png
new file mode 100644
index 0000000000..4fbaf2634c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.5.png b/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.5.png
new file mode 100644
index 0000000000..c10d1966ab
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.6.png b/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.6.png
new file mode 100644
index 0000000000..a672c064c4
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.qml b/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.qml
new file mode 100644
index 0000000000..029a2fc022
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeeasefollow/data/easefollow.qml
@@ -0,0 +1,1807 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "1f60efdb8704b92c9361daa468a25391"
+ }
+ Frame {
+ msec: 32
+ hash: "3bb6a87617e0e5d4922e573eec975886"
+ }
+ Frame {
+ msec: 48
+ hash: "268941737e6324d580890b151de621fb"
+ }
+ Frame {
+ msec: 64
+ hash: "99c674eccc082d7f0982257a748d93e5"
+ }
+ Frame {
+ msec: 80
+ hash: "2970467e8262c8a3f0b11be71245d048"
+ }
+ Frame {
+ msec: 96
+ hash: "63cbd06d6bb035d27c18dba49238d8b2"
+ }
+ Frame {
+ msec: 112
+ hash: "49f77bb3d323f882c0ec56e1f1040b3a"
+ }
+ Frame {
+ msec: 128
+ hash: "40263c5f9b5d2236536163785f832b4d"
+ }
+ Frame {
+ msec: 144
+ hash: "dc63b1c21a2027c4beb9c297a3677fbd"
+ }
+ Frame {
+ msec: 160
+ hash: "4fab52ea29a819fec032f19dbcbef012"
+ }
+ Frame {
+ msec: 176
+ hash: "60b48407a8f8ae2cce7d3e7c8b21991c"
+ }
+ Frame {
+ msec: 192
+ hash: "6e542c681092a5ebeef0534fa2bd2d6c"
+ }
+ Frame {
+ msec: 208
+ hash: "c7c6471969bbf81efdb86d1695548fc6"
+ }
+ Frame {
+ msec: 224
+ hash: "b7f4ad9a49feb400894209c02b94478a"
+ }
+ Frame {
+ msec: 240
+ hash: "3eb58b2f5233aead976183c13f241113"
+ }
+ Frame {
+ msec: 256
+ hash: "54f2036c50c6d8079fc0cadc01385980"
+ }
+ Frame {
+ msec: 272
+ hash: "f297659d75f6e724d72bd548821f4c9f"
+ }
+ Frame {
+ msec: 288
+ hash: "112798f080336fc9c603a7e9097dd8aa"
+ }
+ Frame {
+ msec: 304
+ hash: "c432e6ec2b53ca43cb7a7325d0cc379b"
+ }
+ Frame {
+ msec: 320
+ hash: "4a6d3db3efd665ad7f372bf3f2508ed7"
+ }
+ Frame {
+ msec: 336
+ hash: "0befa5dc4d2cc196fed0eb1a3aa75b8f"
+ }
+ Frame {
+ msec: 352
+ hash: "a34d010b50d59c362b54e44d69c2df91"
+ }
+ Frame {
+ msec: 368
+ hash: "cbdacced50186c87066ce1d46548b27e"
+ }
+ Frame {
+ msec: 384
+ hash: "a4060010ae4d3c0973bda48d68f7bd0a"
+ }
+ Frame {
+ msec: 400
+ hash: "47353437da587f732f986004c09884d0"
+ }
+ Frame {
+ msec: 416
+ hash: "080c348145167bbec671a04da6f7564f"
+ }
+ Frame {
+ msec: 432
+ hash: "69dead737c717a076ae3865680341fb4"
+ }
+ Frame {
+ msec: 448
+ hash: "1efdc31c5c8fa72fc848877deb6caaa4"
+ }
+ Frame {
+ msec: 464
+ hash: "28d7da1e933d0585d03acf4a529e7b42"
+ }
+ Frame {
+ msec: 480
+ hash: "bf85534124bf025b7ede0d6c80b8e443"
+ }
+ Frame {
+ msec: 496
+ hash: "cdbeb2d51541b1b1eff060efe993db91"
+ }
+ Frame {
+ msec: 512
+ hash: "52ad56ae16c8ab523adda8edc512dd87"
+ }
+ Frame {
+ msec: 528
+ hash: "61b1937f4c8dd2cb0ddd7031c5bfb3ab"
+ }
+ Frame {
+ msec: 544
+ hash: "1b109baba71b16827f90da654af093a3"
+ }
+ Frame {
+ msec: 560
+ hash: "d56621362802c8626868f36ba1e7db22"
+ }
+ Frame {
+ msec: 576
+ hash: "ee5555ec3ad8760f43bbf5958a925936"
+ }
+ Frame {
+ msec: 592
+ hash: "1ed2831144a453af1978605c0e42d17c"
+ }
+ Frame {
+ msec: 608
+ hash: "c74d5cdb3395a702269dfa88c8c9d975"
+ }
+ Frame {
+ msec: 624
+ hash: "ea98ddd9588cc23fd82a342ec2925ba8"
+ }
+ Frame {
+ msec: 640
+ hash: "e76b94d6d57f1a510f7649eaab892562"
+ }
+ Frame {
+ msec: 656
+ hash: "022f40b6fe9dbaf8019855234acb3461"
+ }
+ Frame {
+ msec: 672
+ hash: "467da4f48aa6aeb113f0797facf157e8"
+ }
+ Frame {
+ msec: 688
+ hash: "8df407aadd4d896eb6537e1555a0242f"
+ }
+ Frame {
+ msec: 704
+ hash: "122e4671881e31f54e617729f4fbb3b0"
+ }
+ Frame {
+ msec: 720
+ hash: "562718f101c3cd7525b890076413df5e"
+ }
+ Frame {
+ msec: 736
+ hash: "07feae99ecf4b70eb094fd3e10deca56"
+ }
+ Frame {
+ msec: 752
+ hash: "0980d133b1006cc07796023880415163"
+ }
+ Frame {
+ msec: 768
+ hash: "7112b6ac97678b3b942c64c5108f0329"
+ }
+ Frame {
+ msec: 784
+ hash: "bb9f893a9aaee60ab6c30918552828a4"
+ }
+ Frame {
+ msec: 800
+ hash: "65d1f29437aaaea33676757276f1e434"
+ }
+ Frame {
+ msec: 816
+ hash: "52adcf2509f3236ac8ef571708e77206"
+ }
+ Frame {
+ msec: 832
+ hash: "22df5e7eda8a813531d0e0366cbfbf64"
+ }
+ Frame {
+ msec: 848
+ hash: "fe9b7b7812dd2410b8ed2eb19aa78f4d"
+ }
+ Frame {
+ msec: 864
+ hash: "141e22de4469f316b5ef5471f3c7bba0"
+ }
+ Frame {
+ msec: 880
+ hash: "1125c0a105fc4a2cae36b798058ce23f"
+ }
+ Frame {
+ msec: 896
+ hash: "8c17c5da2ae867fb0016a485ba9e4166"
+ }
+ Frame {
+ msec: 912
+ hash: "d8da9fc7ec4dcefb894c5a6a71e9d001"
+ }
+ Frame {
+ msec: 928
+ hash: "00ff642bea89fd89de394d78f8c5db33"
+ }
+ Frame {
+ msec: 944
+ hash: "8549063d517a3ce1ffd44c56b3b6cf5e"
+ }
+ Frame {
+ msec: 960
+ image: "easefollow.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "95a642caa72bb31cc1e04ecc12d07cd0"
+ }
+ Frame {
+ msec: 992
+ hash: "e65c823476bf920d0386f62ca831e6a0"
+ }
+ Frame {
+ msec: 1008
+ hash: "91e8913dc693c91a674a10b5b088dd8f"
+ }
+ Frame {
+ msec: 1024
+ hash: "1a469ffa0d530f72c78dc14783891c78"
+ }
+ Frame {
+ msec: 1040
+ hash: "6e46a83d07f8bc034b421103ef0e4f8c"
+ }
+ Frame {
+ msec: 1056
+ hash: "8ddacab411a8b73b6c9e69576fa1b003"
+ }
+ Frame {
+ msec: 1072
+ hash: "41f419a85fe44efe27c9a526d83a1e9a"
+ }
+ Frame {
+ msec: 1088
+ hash: "73d4ece31b258f9caf4556ce20a5be1f"
+ }
+ Frame {
+ msec: 1104
+ hash: "ef3ebe0acb50386cf79b9f08fbba2fbc"
+ }
+ Frame {
+ msec: 1120
+ hash: "c11a84d2fa80f28adb1466409812e987"
+ }
+ Frame {
+ msec: 1136
+ hash: "2e9db854b02d28b38063ff2a8e821ed1"
+ }
+ Frame {
+ msec: 1152
+ hash: "48e073c0e6b19aea8314629a2179af87"
+ }
+ Frame {
+ msec: 1168
+ hash: "77e518b7428d93b67a8fb0d33d85ed97"
+ }
+ Frame {
+ msec: 1184
+ hash: "1d18323af9c62e015513451883f8b39f"
+ }
+ Frame {
+ msec: 1200
+ hash: "df49889ba157cdc1ca240d08d2760ad7"
+ }
+ Frame {
+ msec: 1216
+ hash: "7b8cd2bcf0a4c38ab870f27894a43d2f"
+ }
+ Frame {
+ msec: 1232
+ hash: "84f10e0c9fd57dd1799df7fc34c5ef01"
+ }
+ Frame {
+ msec: 1248
+ hash: "ead4e609bc4a0755032b1648485b9625"
+ }
+ Frame {
+ msec: 1264
+ hash: "9a9829c3bd4a3a4155383c37e21e8db8"
+ }
+ Frame {
+ msec: 1280
+ hash: "5008917f60256abad867f32c1caf954d"
+ }
+ Frame {
+ msec: 1296
+ hash: "c21455d66ed0754177af5ce44b7c7600"
+ }
+ Frame {
+ msec: 1312
+ hash: "e8332f2586d80a2700b610e8fe5c72d9"
+ }
+ Frame {
+ msec: 1328
+ hash: "0d0c8af138f98bae8a370ebec4a4796c"
+ }
+ Frame {
+ msec: 1344
+ hash: "04065e8feeb900d18deeb941572f7f10"
+ }
+ Frame {
+ msec: 1360
+ hash: "992a225b1f25bf5b21dd7f8a55dc4b70"
+ }
+ Frame {
+ msec: 1376
+ hash: "8ef739d91ee2a4337cbfc3dc94ce9845"
+ }
+ Frame {
+ msec: 1392
+ hash: "46744977a26b37ab65e65e1891ceafe7"
+ }
+ Frame {
+ msec: 1408
+ hash: "1b4c0d79eeb8d6b2e30172f3664407b9"
+ }
+ Frame {
+ msec: 1424
+ hash: "d572831ed34d14d1125570b8b8767bdb"
+ }
+ Frame {
+ msec: 1440
+ hash: "8b785c756d11e0fc18959d0897a45673"
+ }
+ Frame {
+ msec: 1456
+ hash: "164a71ffcea63ceb6c1ebeb8d0d07af1"
+ }
+ Frame {
+ msec: 1472
+ hash: "e128dc12d5117eed9f7c0a16e8348ba2"
+ }
+ Frame {
+ msec: 1488
+ hash: "4c7db5b12d83bf22b1c88ac06ca7c385"
+ }
+ Frame {
+ msec: 1504
+ hash: "c7283df8dbd78121e17a5893e3ea4f3c"
+ }
+ Frame {
+ msec: 1520
+ hash: "fea768e5bb43f6d86d88ced9f73915de"
+ }
+ Frame {
+ msec: 1536
+ hash: "b99b54f8e75452c539bb4e7b6a36e944"
+ }
+ Frame {
+ msec: 1552
+ hash: "b7274938d16f03b376ad9739e2e893f1"
+ }
+ Frame {
+ msec: 1568
+ hash: "e61601942193add8c1c8ebf5c5319932"
+ }
+ Frame {
+ msec: 1584
+ hash: "8fdc2181e0120391505706716ba7e5d7"
+ }
+ Frame {
+ msec: 1600
+ hash: "66f737ed28453da5175d6b5e807c374d"
+ }
+ Frame {
+ msec: 1616
+ hash: "2e00a7895d61edbe794f0a8000871b30"
+ }
+ Frame {
+ msec: 1632
+ hash: "1a279fc6b7c4105eccc4e3bc99481bef"
+ }
+ Frame {
+ msec: 1648
+ hash: "bc1dea4d23ca9bc29b72a8c2bde4787b"
+ }
+ Frame {
+ msec: 1664
+ hash: "8ef40e0be5fb82b32b365b3d4b85421d"
+ }
+ Frame {
+ msec: 1680
+ hash: "ee37c68bf38d5eed4e3e9a31306f6801"
+ }
+ Frame {
+ msec: 1696
+ hash: "303d760c87a7a833606c8e9f46cb5fc0"
+ }
+ Frame {
+ msec: 1712
+ hash: "cc2563b47c58efd39bec6b4e0f2995bb"
+ }
+ Frame {
+ msec: 1728
+ hash: "33f7daf09497510475283d6dc7c51228"
+ }
+ Frame {
+ msec: 1744
+ hash: "5b5e2de9934c80bd49e0eb7afd85151d"
+ }
+ Frame {
+ msec: 1760
+ hash: "5e6bf706336789ca6b60a82998b70113"
+ }
+ Frame {
+ msec: 1776
+ hash: "b4d4a860f49bfb88dd2079862b40b7ec"
+ }
+ Frame {
+ msec: 1792
+ hash: "07b571fa55327487e34a592c778beb67"
+ }
+ Frame {
+ msec: 1808
+ hash: "cb5b349a536cf75a83734181b3eab92b"
+ }
+ Frame {
+ msec: 1824
+ hash: "ce903bb58c5c86f2955e68412893aedf"
+ }
+ Frame {
+ msec: 1840
+ hash: "ffa89e879558c83ed538812a93e2fe29"
+ }
+ Frame {
+ msec: 1856
+ hash: "562aa66bf537853be82a654542c8b80e"
+ }
+ Frame {
+ msec: 1872
+ hash: "dc45dac0cc20220bcc81210fb5506ee2"
+ }
+ Frame {
+ msec: 1888
+ hash: "3b429eb827df0800a1ad8b906ea32ef9"
+ }
+ Frame {
+ msec: 1904
+ hash: "d6ebaf12515d9e24cdbf6d75080c0b28"
+ }
+ Frame {
+ msec: 1920
+ image: "easefollow.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "9f6d26224055c809dc2f3490cd0ff880"
+ }
+ Frame {
+ msec: 1952
+ hash: "5630cc8f0b401f7d81bdceaaae5cce68"
+ }
+ Frame {
+ msec: 1968
+ hash: "dafda60467e5e2b99c41543dd191ac2d"
+ }
+ Frame {
+ msec: 1984
+ hash: "e053cb07a734278cd111d612883c165e"
+ }
+ Frame {
+ msec: 2000
+ hash: "63870f3e99c11707004dab9439d61389"
+ }
+ Frame {
+ msec: 2016
+ hash: "14c311a6fab45f828c3a19535ea9edc8"
+ }
+ Frame {
+ msec: 2032
+ hash: "13e614446cbfcbfd2a7ecc5f0e8688df"
+ }
+ Frame {
+ msec: 2048
+ hash: "173c97f59da05b9347180a4824e60c06"
+ }
+ Frame {
+ msec: 2064
+ hash: "932e2a9bbcb7dc5befca8f63d8fa3c95"
+ }
+ Frame {
+ msec: 2080
+ hash: "4b8f232ffe0cbc7f900de5737c9f95be"
+ }
+ Frame {
+ msec: 2096
+ hash: "9686d294d4e931a5eed0e6b5bda63377"
+ }
+ Frame {
+ msec: 2112
+ hash: "969c569d92e3ec51dfbdd20d64432224"
+ }
+ Frame {
+ msec: 2128
+ hash: "0cef3550cca9fb5611b836098c517dd1"
+ }
+ Frame {
+ msec: 2144
+ hash: "6728080a09aa5d48462a3abb8e285e8a"
+ }
+ Frame {
+ msec: 2160
+ hash: "4b904dc671b7fc72db0b6e52543e96bd"
+ }
+ Frame {
+ msec: 2176
+ hash: "38232f89dffc9b16db6ea60b02f8d1be"
+ }
+ Frame {
+ msec: 2192
+ hash: "6b41f2a0f950eddad217a03e137f9a9b"
+ }
+ Frame {
+ msec: 2208
+ hash: "be576ea74c2c404da46fcf1d22de6df9"
+ }
+ Frame {
+ msec: 2224
+ hash: "3f44bad4b51ceff2944337064a5efa91"
+ }
+ Frame {
+ msec: 2240
+ hash: "e1ab98ac1366e9fd8af62a6a26878c73"
+ }
+ Frame {
+ msec: 2256
+ hash: "bd131e1725a54b3dbbb86a29ca8a56a9"
+ }
+ Frame {
+ msec: 2272
+ hash: "4d3e8af70f228643803f780c4e36f1a6"
+ }
+ Frame {
+ msec: 2288
+ hash: "853a5ab4271af7a7638454cfa883aa33"
+ }
+ Frame {
+ msec: 2304
+ hash: "ede9260157000f346900153ce2409278"
+ }
+ Frame {
+ msec: 2320
+ hash: "b2b16d8ce1ba89f0d9558ac387e25c3d"
+ }
+ Frame {
+ msec: 2336
+ hash: "387d338910453637c5cf80fa35528e56"
+ }
+ Frame {
+ msec: 2352
+ hash: "26deabf9cdd994455f2a8802eb0e04dc"
+ }
+ Frame {
+ msec: 2368
+ hash: "13939659a315dae1b81e3ea166102edf"
+ }
+ Frame {
+ msec: 2384
+ hash: "be92b55bb7562372401b25a9167abb2b"
+ }
+ Frame {
+ msec: 2400
+ hash: "ee7bf60d7ee97b7de5e909b9af88df80"
+ }
+ Frame {
+ msec: 2416
+ hash: "434313a3bcd1d7582b0d89b9a145ef09"
+ }
+ Frame {
+ msec: 2432
+ hash: "0857ca59a283897e3df62b9633488f83"
+ }
+ Frame {
+ msec: 2448
+ hash: "76718fc7e3d21b54930bc8307a57733a"
+ }
+ Frame {
+ msec: 2464
+ hash: "93a91588b38129053a462b920fd686e3"
+ }
+ Frame {
+ msec: 2480
+ hash: "2a2486c52fde915696fd8cbd3682e8db"
+ }
+ Frame {
+ msec: 2496
+ hash: "b1f4ab6cc5fb4a3a1b4885f2d1b29277"
+ }
+ Frame {
+ msec: 2512
+ hash: "4258afce8a85a2e9ead149e34b43d8fc"
+ }
+ Frame {
+ msec: 2528
+ hash: "6672c71b98e13d51ebb523aed9036a72"
+ }
+ Frame {
+ msec: 2544
+ hash: "eaa39af7eb78948f433e3b44a9454317"
+ }
+ Frame {
+ msec: 2560
+ hash: "0a766bc97bea67d4b848c703eaa6777a"
+ }
+ Frame {
+ msec: 2576
+ hash: "0b461ec1885ede1dd96b71cf38bfd3d6"
+ }
+ Frame {
+ msec: 2592
+ hash: "15efc929370a3864529080e30db1026a"
+ }
+ Frame {
+ msec: 2608
+ hash: "e1529e30ff1e4ea1b092a88e85f2f1f6"
+ }
+ Frame {
+ msec: 2624
+ hash: "f29bd9dbf7317e94b885da63f0cb7374"
+ }
+ Frame {
+ msec: 2640
+ hash: "e5294e087e2ce0d7d936c0129b6c37ae"
+ }
+ Frame {
+ msec: 2656
+ hash: "9c63129e774b391cc398cf5da5c9339c"
+ }
+ Frame {
+ msec: 2672
+ hash: "4371d85854419d4b00671176bb7c5a2b"
+ }
+ Frame {
+ msec: 2688
+ hash: "dd10b3f50e2fdc56c75f00321634b1cc"
+ }
+ Frame {
+ msec: 2704
+ hash: "aac6256b21152a5f1f8c576b667d275e"
+ }
+ Frame {
+ msec: 2720
+ hash: "c937c44037b2228590d334df4d56a86f"
+ }
+ Frame {
+ msec: 2736
+ hash: "f6c714db51cbd1bdb737afe612c33f9c"
+ }
+ Frame {
+ msec: 2752
+ hash: "0bba45af79f3201bc7cf042d5c648f73"
+ }
+ Frame {
+ msec: 2768
+ hash: "941b08ddbafea3bd46262c060b1e290b"
+ }
+ Frame {
+ msec: 2784
+ hash: "d898918dc2023de239b4ab38f7420960"
+ }
+ Frame {
+ msec: 2800
+ hash: "d1a16dc2282329113093d06862e7a871"
+ }
+ Frame {
+ msec: 2816
+ hash: "bba5359475f643fbeee240e71e843d4c"
+ }
+ Frame {
+ msec: 2832
+ hash: "03cf861f4b6bc767e723e47e95c2448b"
+ }
+ Frame {
+ msec: 2848
+ hash: "a64bf158c6199b88bc2db3b741d342f0"
+ }
+ Frame {
+ msec: 2864
+ hash: "cf0fe7cb42ba842f1c28c1211adb768d"
+ }
+ Frame {
+ msec: 2880
+ image: "easefollow.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "9b3c6414e4ef5a452a5c92bb0b893fc3"
+ }
+ Frame {
+ msec: 2912
+ hash: "7cc7ddec3ac2d8cac33c0b0f80a7544d"
+ }
+ Frame {
+ msec: 2928
+ hash: "7dd4e7d606e953c872c57fad786d64aa"
+ }
+ Frame {
+ msec: 2944
+ hash: "117cc903a39d99ca22f6556095e6f883"
+ }
+ Frame {
+ msec: 2960
+ hash: "c6c9304fd65fee1909473bdb21ac7806"
+ }
+ Frame {
+ msec: 2976
+ hash: "8e704fe81c040f49c4d80e7dcc46084d"
+ }
+ Frame {
+ msec: 2992
+ hash: "d202d5c0a058e1e088fdd280e59f17bb"
+ }
+ Frame {
+ msec: 3008
+ hash: "90c072dea32c056f8bd6d010df681929"
+ }
+ Frame {
+ msec: 3024
+ hash: "80b4e99f1b47e64084e295a2a3e1121e"
+ }
+ Frame {
+ msec: 3040
+ hash: "41d6307075ec9ae9e92d227921f71289"
+ }
+ Frame {
+ msec: 3056
+ hash: "f33de23cf4a5c4881310c6866261d387"
+ }
+ Frame {
+ msec: 3072
+ hash: "441faa0a1fc95d66b27479dfc1e40188"
+ }
+ Frame {
+ msec: 3088
+ hash: "2314b5f6ba3864abd5e87bc87bd621b0"
+ }
+ Frame {
+ msec: 3104
+ hash: "e71e3b0ad953258ceef3101e38283fdb"
+ }
+ Frame {
+ msec: 3120
+ hash: "890c3b0e727f136bf1ccc486531c9677"
+ }
+ Frame {
+ msec: 3136
+ hash: "2a0d23e6dcc6475c323dbf8eb36e8094"
+ }
+ Frame {
+ msec: 3152
+ hash: "692682e82347936f87a66484b428e959"
+ }
+ Frame {
+ msec: 3168
+ hash: "cf4005c08789762ad21be1a1d78755c9"
+ }
+ Frame {
+ msec: 3184
+ hash: "566184563091626bb20ae679e3ce3b91"
+ }
+ Frame {
+ msec: 3200
+ hash: "f88a24ad3bbc2699924bb9a7ff6490b3"
+ }
+ Frame {
+ msec: 3216
+ hash: "23f3f63d07b2bdc2b82ff4e8606a634d"
+ }
+ Frame {
+ msec: 3232
+ hash: "fe121c71ce469ec6f0bf957eb2f0447b"
+ }
+ Frame {
+ msec: 3248
+ hash: "ba217690a33c701afe11842aa8105cbb"
+ }
+ Frame {
+ msec: 3264
+ hash: "e5c7c1323108f13ba26f5198cc62c137"
+ }
+ Frame {
+ msec: 3280
+ hash: "664f76d3d0008b56be2790c470befc91"
+ }
+ Frame {
+ msec: 3296
+ hash: "b3f54070ba64b983ccd2a15941ef4c35"
+ }
+ Frame {
+ msec: 3312
+ hash: "8a0ba2ae36ad3811778f3a3bc55743f5"
+ }
+ Frame {
+ msec: 3328
+ hash: "bfdc71733ca45a2ba2e8abf751554a62"
+ }
+ Frame {
+ msec: 3344
+ hash: "686e4d7bb5ae148d37fc2a1f6004a33a"
+ }
+ Frame {
+ msec: 3360
+ hash: "29c553d9fe42fdbbd019d0ead61dffa0"
+ }
+ Frame {
+ msec: 3376
+ hash: "bfa2b72c6554a2ed80a3b86f2cbed986"
+ }
+ Frame {
+ msec: 3392
+ hash: "074ff90417a947f0a04926d5675d073b"
+ }
+ Frame {
+ msec: 3408
+ hash: "6f56f9e0aa40149156ca71d6f8d4476a"
+ }
+ Frame {
+ msec: 3424
+ hash: "950ce749bbf572021de2dd1688cb87e6"
+ }
+ Frame {
+ msec: 3440
+ hash: "2d0903bd71862dc6f28bd702d955ae99"
+ }
+ Frame {
+ msec: 3456
+ hash: "2733adae56728f1b744a4086ecb98052"
+ }
+ Frame {
+ msec: 3472
+ hash: "779859d739e799bba15beeb97d18e682"
+ }
+ Frame {
+ msec: 3488
+ hash: "9074386cfabe136b8839637e5cd58f57"
+ }
+ Frame {
+ msec: 3504
+ hash: "fa5bcbf20c6ad0a218f23d98961229a1"
+ }
+ Frame {
+ msec: 3520
+ hash: "5406c94da1717eaa5eb0010564216059"
+ }
+ Frame {
+ msec: 3536
+ hash: "27d0a3c3a33c04df843bebd72ef79824"
+ }
+ Frame {
+ msec: 3552
+ hash: "270df9c99c2679071b854b3d82337f79"
+ }
+ Frame {
+ msec: 3568
+ hash: "5b3945505443a67e7a91f66fe42b4fe3"
+ }
+ Frame {
+ msec: 3584
+ hash: "9a2f8565c354cb366725368ed323ccf4"
+ }
+ Frame {
+ msec: 3600
+ hash: "6702cb7ccd61c008b511932d7bd5d107"
+ }
+ Frame {
+ msec: 3616
+ hash: "f6b86c3a1cc88357f588b6dae11aae30"
+ }
+ Frame {
+ msec: 3632
+ hash: "b10c23937f420db72af8abaf126f71c2"
+ }
+ Frame {
+ msec: 3648
+ hash: "7d6b0810ffc6e488c8168e19bccb7358"
+ }
+ Frame {
+ msec: 3664
+ hash: "c01ef69ec46391909619434e9d9dd0ce"
+ }
+ Frame {
+ msec: 3680
+ hash: "a046464fccb0c5ba1f63f8b569821a44"
+ }
+ Frame {
+ msec: 3696
+ hash: "8763c526924d882438f9aa9bfb4fe87d"
+ }
+ Frame {
+ msec: 3712
+ hash: "dede7a62d6e5c10e8f30caa075bd8dfd"
+ }
+ Frame {
+ msec: 3728
+ hash: "3b408e5c986f5bb01d8c3949876b792f"
+ }
+ Frame {
+ msec: 3744
+ hash: "0a458f3b17cdd3ea85522779c9346af9"
+ }
+ Frame {
+ msec: 3760
+ hash: "fef521f0301cce90af88d37e6d441ec8"
+ }
+ Frame {
+ msec: 3776
+ hash: "3d083e0822242b3b37c6839ca91a1f68"
+ }
+ Frame {
+ msec: 3792
+ hash: "f8fe013a717e6e61830137bdc78a8b40"
+ }
+ Frame {
+ msec: 3808
+ hash: "0ae80ad65dd194043500fa50b5a547a6"
+ }
+ Frame {
+ msec: 3824
+ hash: "a53c67fa32ef971eaea202fa5d8a6ad6"
+ }
+ Frame {
+ msec: 3840
+ image: "easefollow.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "41f86bbf0658b127f01e8d46d7ec941b"
+ }
+ Frame {
+ msec: 3872
+ hash: "d20f21df127565f9eb87c5d759a638d9"
+ }
+ Frame {
+ msec: 3888
+ hash: "85ff94f03cea3e111807e90d062c1367"
+ }
+ Frame {
+ msec: 3904
+ hash: "aa637850fe5f05a71ac4c7d31dbb36ee"
+ }
+ Frame {
+ msec: 3920
+ hash: "c86a67096c5e62bb73b785cdf6a5b6b1"
+ }
+ Frame {
+ msec: 3936
+ hash: "9d53537f2c50a0016bf7bb522b2ec3d8"
+ }
+ Frame {
+ msec: 3952
+ hash: "b48630c27c27785ddce568a85d4dc58f"
+ }
+ Frame {
+ msec: 3968
+ hash: "01c1bdb6e261cc509f26712b13eeb554"
+ }
+ Frame {
+ msec: 3984
+ hash: "af8a44284695fd999acd5944434f0372"
+ }
+ Frame {
+ msec: 4000
+ hash: "b156d9d6d5163f007ac4a309d8927ae9"
+ }
+ Frame {
+ msec: 4016
+ hash: "2df3715416c3c005f04b66fe1258c0d8"
+ }
+ Frame {
+ msec: 4032
+ hash: "96b4a7c6b8542b50fc345b54d38ec82a"
+ }
+ Frame {
+ msec: 4048
+ hash: "7e62e757fafa06833444c3a7e1d96ce4"
+ }
+ Frame {
+ msec: 4064
+ hash: "5222a8f9366c7d974d0687d05d229069"
+ }
+ Frame {
+ msec: 4080
+ hash: "ec96169f4633c3bddfd582feeb8e9ad4"
+ }
+ Frame {
+ msec: 4096
+ hash: "cb10db893d1e1cb2a370507dc5679985"
+ }
+ Frame {
+ msec: 4112
+ hash: "d7e346c2ac77796bde639bd829b72e85"
+ }
+ Frame {
+ msec: 4128
+ hash: "ba5bea8857e4fb444bedd3873563e7db"
+ }
+ Frame {
+ msec: 4144
+ hash: "05556fba5d1714f70fd6c2bfb43d213b"
+ }
+ Frame {
+ msec: 4160
+ hash: "aeeabf35f9759f045a670a9b9f90dc68"
+ }
+ Frame {
+ msec: 4176
+ hash: "131bd453f4c7726e5fdd546252700e2e"
+ }
+ Frame {
+ msec: 4192
+ hash: "7c5c3b5bb7a4082e6b9b43640e29f4e2"
+ }
+ Frame {
+ msec: 4208
+ hash: "07515e21b7a7895f333e4a8bbd2202eb"
+ }
+ Frame {
+ msec: 4224
+ hash: "6cf136f223ac6edd39ba6ed9b4445884"
+ }
+ Frame {
+ msec: 4240
+ hash: "84264f5745add8a922101735ed8def84"
+ }
+ Frame {
+ msec: 4256
+ hash: "660863d1e4b361f2e5445b417be0d2ad"
+ }
+ Frame {
+ msec: 4272
+ hash: "7ceb86f4b16546370d72164d0ca3147c"
+ }
+ Frame {
+ msec: 4288
+ hash: "a13e97da9722545ad87ac3c5eb92c497"
+ }
+ Frame {
+ msec: 4304
+ hash: "5896b5307cbd609d2062d3607786d40c"
+ }
+ Frame {
+ msec: 4320
+ hash: "c8c511115394116e4544c67f615ea5d5"
+ }
+ Frame {
+ msec: 4336
+ hash: "59ca5fdf12a735e5c292901b54acccb2"
+ }
+ Frame {
+ msec: 4352
+ hash: "155cce2738d34e0eac86f5eb63d638f0"
+ }
+ Frame {
+ msec: 4368
+ hash: "83a840c3ae7dbd9a05c17fdd8be07d7a"
+ }
+ Frame {
+ msec: 4384
+ hash: "800a15de28b14d88f0ad58fc3f4a2520"
+ }
+ Frame {
+ msec: 4400
+ hash: "c8381439a3cd3f9e7f80061023723a6e"
+ }
+ Frame {
+ msec: 4416
+ hash: "e3d63000db4b9458b202dece49d1bdba"
+ }
+ Frame {
+ msec: 4432
+ hash: "c943e56781695798f3c221f8ab09681a"
+ }
+ Frame {
+ msec: 4448
+ hash: "1137ee66d7fbf5a84c33f5ffff15b3dd"
+ }
+ Frame {
+ msec: 4464
+ hash: "5a98013cc4462aad18cad8d941f77aa0"
+ }
+ Frame {
+ msec: 4480
+ hash: "d0b3748fb49a13c0ad9a68b0e2914921"
+ }
+ Frame {
+ msec: 4496
+ hash: "12113f71f9117670acbd7877edded7e0"
+ }
+ Frame {
+ msec: 4512
+ hash: "22983424da08cdae7a9c6a8905b37736"
+ }
+ Frame {
+ msec: 4528
+ hash: "b2db5618a025cefb2650124c81880c49"
+ }
+ Frame {
+ msec: 4544
+ hash: "84fb5e7edc5b42163a83e0cd362b3a46"
+ }
+ Frame {
+ msec: 4560
+ hash: "39d6f1ed0f60a0c366c22e1442c455ac"
+ }
+ Frame {
+ msec: 4576
+ hash: "702367f6e4aaa2a862e57f9e02a08758"
+ }
+ Frame {
+ msec: 4592
+ hash: "ecc75293bc156c560d55cb7d278a4e58"
+ }
+ Frame {
+ msec: 4608
+ hash: "e68af8e97ce65376fd7904e599440c92"
+ }
+ Frame {
+ msec: 4624
+ hash: "75fe9f766d6cf636cd72d8879a461439"
+ }
+ Frame {
+ msec: 4640
+ hash: "162aef147ef4bbb0cd92bd70e4f37f62"
+ }
+ Frame {
+ msec: 4656
+ hash: "d879aae8949976c7bad4d97f1e5b5549"
+ }
+ Frame {
+ msec: 4672
+ hash: "8a983d7228190721f988de2d72cb3aa2"
+ }
+ Frame {
+ msec: 4688
+ hash: "a4f3c63fde664d128cd35b129a4f9a23"
+ }
+ Frame {
+ msec: 4704
+ hash: "115fb5f3c9b7f1c28ab379596faba91c"
+ }
+ Frame {
+ msec: 4720
+ hash: "ea9600c4d6c77a3b32e59401aa84fe96"
+ }
+ Frame {
+ msec: 4736
+ hash: "bd6531fdd9cfd46af2df73bacb31f4c5"
+ }
+ Frame {
+ msec: 4752
+ hash: "33bdcf1df50eab5e7963c649fbd32226"
+ }
+ Frame {
+ msec: 4768
+ hash: "236e88fb72369a55f9eba4b50712ae85"
+ }
+ Frame {
+ msec: 4784
+ hash: "5eb3c14a6296fb3a1c58603b2fc937c8"
+ }
+ Frame {
+ msec: 4800
+ image: "easefollow.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "31d11a1ce6422524241c77603fe53e61"
+ }
+ Frame {
+ msec: 4832
+ hash: "44e8b9947026c10b922c84883dd8e889"
+ }
+ Frame {
+ msec: 4848
+ hash: "d049e4f7c4bc1849398859a4d630c1b3"
+ }
+ Frame {
+ msec: 4864
+ hash: "e83b4757898e4eeef74be8213619fbfa"
+ }
+ Frame {
+ msec: 4880
+ hash: "d08f40615f2d5abc6236e856a67575dd"
+ }
+ Frame {
+ msec: 4896
+ hash: "d9cb26bf1b8bbafb2aed8f74bd454077"
+ }
+ Frame {
+ msec: 4912
+ hash: "aa321b94a6cc53b2ebac80e834c0a908"
+ }
+ Frame {
+ msec: 4928
+ hash: "48da37164be156b67a4b3b14e50f2375"
+ }
+ Frame {
+ msec: 4944
+ hash: "f522ce7728a4a9e7fad86c72f29bd8f9"
+ }
+ Frame {
+ msec: 4960
+ hash: "9bc1d16b4bda596702a3d8a3fad8a5c5"
+ }
+ Frame {
+ msec: 4976
+ hash: "5275dccf18745dec6c59b846de17d9ef"
+ }
+ Frame {
+ msec: 4992
+ hash: "4eb6babc177b96f69b148d52f56d82d7"
+ }
+ Frame {
+ msec: 5008
+ hash: "ccdfb454070ac04c4fe4f3513c52f8c8"
+ }
+ Frame {
+ msec: 5024
+ hash: "07f6adad6e8ff4f0eff92c758636a951"
+ }
+ Frame {
+ msec: 5040
+ hash: "241e0ad9218d49be477509e008e45548"
+ }
+ Frame {
+ msec: 5056
+ hash: "151a482e821779da8a61063f1cc73f8c"
+ }
+ Frame {
+ msec: 5072
+ hash: "1499d207c5a3a9bc7bbb84d9c5e35578"
+ }
+ Frame {
+ msec: 5088
+ hash: "c253753f653157a5058ef071f16b8bbb"
+ }
+ Frame {
+ msec: 5104
+ hash: "ec9fea5a870724a106b952edef7fb466"
+ }
+ Frame {
+ msec: 5120
+ hash: "99b673f8ed049d31a2aecabcc46d841d"
+ }
+ Frame {
+ msec: 5136
+ hash: "61e77fea693ea55aafbdc94c40c3ab33"
+ }
+ Frame {
+ msec: 5152
+ hash: "53e44a3732ee6858d5bd596b4c5d5305"
+ }
+ Frame {
+ msec: 5168
+ hash: "5b25d3894a56dc4f4a0aa8f88cb69e23"
+ }
+ Frame {
+ msec: 5184
+ hash: "5683ad02f1b9126f4e4ff6b03044fdc6"
+ }
+ Frame {
+ msec: 5200
+ hash: "0a3ec255575ec1b70e0b10cf59c7c5fd"
+ }
+ Frame {
+ msec: 5216
+ hash: "0f5f46fe3fdf42d4651891f13c8afc7e"
+ }
+ Frame {
+ msec: 5232
+ hash: "b6955407245c73e356a460d99dad77be"
+ }
+ Frame {
+ msec: 5248
+ hash: "6018b53414921943b37c33fa04a29697"
+ }
+ Frame {
+ msec: 5264
+ hash: "ff184d349ce0b648f8c1fce91ae997f6"
+ }
+ Frame {
+ msec: 5280
+ hash: "9c112a3a785d970593887eeab72fa7fe"
+ }
+ Frame {
+ msec: 5296
+ hash: "00384fb20d4c6cd6236d519d2d734cc3"
+ }
+ Frame {
+ msec: 5312
+ hash: "601ea99400e5f50ee9a5a4b74b6f3017"
+ }
+ Frame {
+ msec: 5328
+ hash: "9afed04bf7eca24d9b6d31ac84ae59c2"
+ }
+ Frame {
+ msec: 5344
+ hash: "1983319c8043bfe403513af7ccb5b924"
+ }
+ Frame {
+ msec: 5360
+ hash: "b0244e4e1b61202ede78405415c22bca"
+ }
+ Frame {
+ msec: 5376
+ hash: "ec5516b1aaeace8784b04649c51ab40b"
+ }
+ Frame {
+ msec: 5392
+ hash: "8ff7d2001594abb588f769bab15406d7"
+ }
+ Frame {
+ msec: 5408
+ hash: "64d5fd96a1726aa5276f9b508566676f"
+ }
+ Frame {
+ msec: 5424
+ hash: "ab49497a6c825038354f076bdbbbc235"
+ }
+ Frame {
+ msec: 5440
+ hash: "6b821e43be932800b20af58a7b5a1ff7"
+ }
+ Frame {
+ msec: 5456
+ hash: "683a2902300f930e2a81a82dc37c583b"
+ }
+ Frame {
+ msec: 5472
+ hash: "86d7946d7fbb66369ccbf26430939225"
+ }
+ Frame {
+ msec: 5488
+ hash: "fb38f5fb6555fc14e95a47c595a6ea0c"
+ }
+ Frame {
+ msec: 5504
+ hash: "3878f685d9fa3299e9ffe78c22595387"
+ }
+ Frame {
+ msec: 5520
+ hash: "b48840a68ff007901b02332c7177f315"
+ }
+ Frame {
+ msec: 5536
+ hash: "9d847abc99220b04aceef12e5c09aac0"
+ }
+ Frame {
+ msec: 5552
+ hash: "9893ac89fda64d96ec4140c3c87e17a5"
+ }
+ Frame {
+ msec: 5568
+ hash: "cd94e1c36e6be9877cd9c12df42bd968"
+ }
+ Frame {
+ msec: 5584
+ hash: "c1ce5e53b74af022dc103ad74ff5f1af"
+ }
+ Frame {
+ msec: 5600
+ hash: "b3630e08eac02a9578a00b01baabaaba"
+ }
+ Frame {
+ msec: 5616
+ hash: "0eb9241aa1f9526c1e24ba76d630805c"
+ }
+ Frame {
+ msec: 5632
+ hash: "1b532ae7f9253469467522d4ca66c47b"
+ }
+ Frame {
+ msec: 5648
+ hash: "7e6e49079ed6330da2e337a5e4ffd730"
+ }
+ Frame {
+ msec: 5664
+ hash: "0391d668f4b906b244a5f5c1713573c2"
+ }
+ Frame {
+ msec: 5680
+ hash: "8070fa3280d0d64bf976d4a276359c4c"
+ }
+ Frame {
+ msec: 5696
+ hash: "f7d0d36a2d40c798f56ac7ecc1effca6"
+ }
+ Frame {
+ msec: 5712
+ hash: "9f8e35ee5080e811c670c480a9c2bd9f"
+ }
+ Frame {
+ msec: 5728
+ hash: "c7fea75a43a59a11aa504df32afcdaf8"
+ }
+ Frame {
+ msec: 5744
+ hash: "7e549a93ffc6ddcc3d8111f10c05b29e"
+ }
+ Frame {
+ msec: 5760
+ image: "easefollow.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "92d298262f610a2dafa095e3d67c80af"
+ }
+ Frame {
+ msec: 5792
+ hash: "db8826b0b2feece0999863b8827a6234"
+ }
+ Frame {
+ msec: 5808
+ hash: "12c7050e8094bb39212aed0163666d1a"
+ }
+ Frame {
+ msec: 5824
+ hash: "69531beace5c749bf90160a4b25f736a"
+ }
+ Frame {
+ msec: 5840
+ hash: "ce873e4dbc8853183b54d59991b2e030"
+ }
+ Frame {
+ msec: 5856
+ hash: "fa1078973634578d69527402b11fb7e0"
+ }
+ Frame {
+ msec: 5872
+ hash: "1e3b3db590567c0afd1913101192cda9"
+ }
+ Frame {
+ msec: 5888
+ hash: "7b9e097018278b784973a546da3d401a"
+ }
+ Frame {
+ msec: 5904
+ hash: "a7b0667093888480de6697280aeea9ba"
+ }
+ Frame {
+ msec: 5920
+ hash: "e381f2422ead86575abf643b0b0c9797"
+ }
+ Frame {
+ msec: 5936
+ hash: "44b08f5a0de2a6955e02f67753f409c8"
+ }
+ Frame {
+ msec: 5952
+ hash: "db04665e58448ecc7f95baa3e4ea79a5"
+ }
+ Frame {
+ msec: 5968
+ hash: "0e4aae728d8d543538a9446c41e18e91"
+ }
+ Frame {
+ msec: 5984
+ hash: "e3cd1bbb1d9963e5c74d36e526a871b0"
+ }
+ Frame {
+ msec: 6000
+ hash: "bcd893a0e200ddda4e1468c159018865"
+ }
+ Frame {
+ msec: 6016
+ hash: "9c5293356aa6312f909e655e9bcf961b"
+ }
+ Frame {
+ msec: 6032
+ hash: "0bab7b9166f6af554d4fa0badeec739e"
+ }
+ Frame {
+ msec: 6048
+ hash: "e74996581f0aaeced118c5cbfd977d90"
+ }
+ Frame {
+ msec: 6064
+ hash: "5d128eb20a2a23da8c2d9a35293e5769"
+ }
+ Frame {
+ msec: 6080
+ hash: "ebbbc343698287faf7ffa7526a726b54"
+ }
+ Frame {
+ msec: 6096
+ hash: "d812172192cc19590f9a2d7dbf970439"
+ }
+ Frame {
+ msec: 6112
+ hash: "60263addb1b4b5ac43f8199b8ed77e40"
+ }
+ Frame {
+ msec: 6128
+ hash: "702a1ff2876eaaa59359811bb6437c5b"
+ }
+ Frame {
+ msec: 6144
+ hash: "8f81dc43decce5094ee7a089f0009730"
+ }
+ Frame {
+ msec: 6160
+ hash: "efda5dd9edd83a0da089d0b28806c6b6"
+ }
+ Frame {
+ msec: 6176
+ hash: "7274a33a7a5272d7abdaf41f4b2bf664"
+ }
+ Frame {
+ msec: 6192
+ hash: "0cc80077476e721a3da85c17cc56a65e"
+ }
+ Frame {
+ msec: 6208
+ hash: "e65a534f0e7e70520a9c2cfa09ee8159"
+ }
+ Frame {
+ msec: 6224
+ hash: "b05b514c63bd8998785382e6a9cbd849"
+ }
+ Frame {
+ msec: 6240
+ hash: "10a04d641e0cc65c120d8bcf2f3e54c8"
+ }
+ Frame {
+ msec: 6256
+ hash: "68418e2206a496dd15a05b50fec6f87e"
+ }
+ Frame {
+ msec: 6272
+ hash: "6549e0989e1c86e3a7eb0dcc8dd31380"
+ }
+ Frame {
+ msec: 6288
+ hash: "bd0193c2cbc8958f674f4ec52a693b72"
+ }
+ Frame {
+ msec: 6304
+ hash: "746440b45a3688dbd32b34c57454e956"
+ }
+ Frame {
+ msec: 6320
+ hash: "6b54ee8af30be2178e8b3afab5dcb4c7"
+ }
+ Frame {
+ msec: 6336
+ hash: "ba2fbad3fe2fe25ec0c0c542659168dc"
+ }
+ Frame {
+ msec: 6352
+ hash: "84bd72703bd8200f8f090783d06ae451"
+ }
+ Frame {
+ msec: 6368
+ hash: "17c9fb063280c2ee4cb4a13273bbb199"
+ }
+ Frame {
+ msec: 6384
+ hash: "df28fd55719f5c2d164596d02c2faff2"
+ }
+ Frame {
+ msec: 6400
+ hash: "c2e280e78e892200d40022d17ce695b7"
+ }
+ Frame {
+ msec: 6416
+ hash: "c657caa0c5158e178ec5df80bbad6bcb"
+ }
+ Frame {
+ msec: 6432
+ hash: "d91f4f6ec6503fe8280f9b02dd11e64a"
+ }
+ Frame {
+ msec: 6448
+ hash: "0fb9400cdca9dbd4035fbf8af9952360"
+ }
+ Frame {
+ msec: 6464
+ hash: "cac0e1b4aa094306b95f90ede4705391"
+ }
+ Frame {
+ msec: 6480
+ hash: "e60a4bb14300a937a767effee931c60f"
+ }
+ Frame {
+ msec: 6496
+ hash: "8b461397e3f210ee7e9305dcab2af2db"
+ }
+ Frame {
+ msec: 6512
+ hash: "6ce9ec0942dd06c9f73929a7e176852c"
+ }
+ Frame {
+ msec: 6528
+ hash: "da36e254635eea854a6552ba008117f9"
+ }
+ Frame {
+ msec: 6544
+ hash: "0bec6402b5eb09d05ce8e9ff5253ea8d"
+ }
+ Frame {
+ msec: 6560
+ hash: "72f6610527d395ca590eda166ef6bc4e"
+ }
+ Frame {
+ msec: 6576
+ hash: "622ae3fd47adb2432e2a40d3c5539393"
+ }
+ Frame {
+ msec: 6592
+ hash: "0b18c49e2bbf9370216e06b555faf183"
+ }
+ Frame {
+ msec: 6608
+ hash: "0c090bb975fb883301b52479fd6f5fdf"
+ }
+ Frame {
+ msec: 6624
+ hash: "c4205d7ecb7327426d9591e77247acab"
+ }
+ Frame {
+ msec: 6640
+ hash: "f0e0075243e4b8aa97056248fe6033ed"
+ }
+ Frame {
+ msec: 6656
+ hash: "47f99b40a8764ee9d9e429061fb7acb2"
+ }
+ Frame {
+ msec: 6672
+ hash: "49e8c1e974b0716570d85109b53817a5"
+ }
+ Frame {
+ msec: 6688
+ hash: "72f981bad831b6ed858009527902f734"
+ }
+ Frame {
+ msec: 6704
+ hash: "e959a0493b06369a429f90f66cb65977"
+ }
+ Frame {
+ msec: 6720
+ image: "easefollow.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "93470d983282f24425558f47ad705154"
+ }
+ Frame {
+ msec: 6752
+ hash: "cdccbe1a7c7abd4a6a6ee754ed0c9759"
+ }
+ Frame {
+ msec: 6768
+ hash: "0e1b7b5332a9fcdb492db5314a2a0267"
+ }
+ Frame {
+ msec: 6784
+ hash: "1e1ffe3439aab51d0b325474e7d8dc28"
+ }
+ Frame {
+ msec: 6800
+ hash: "e8e7e9b5871caf77f15678616d6c9c8a"
+ }
+ Frame {
+ msec: 6816
+ hash: "9771fff3b7752154d093c038bea73d28"
+ }
+ Frame {
+ msec: 6832
+ hash: "1af851ea214cbddb0e3a743084a5cf6b"
+ }
+ Frame {
+ msec: 6848
+ hash: "1566182a7e29bbb738705a90c4909617"
+ }
+ Frame {
+ msec: 6864
+ hash: "feed650e1d948fe622234d212fb745f2"
+ }
+ Frame {
+ msec: 6880
+ hash: "3cd3d063275b91f9680717421c118ba4"
+ }
+ Frame {
+ msec: 6896
+ hash: "c1f088801334762cd499e7cc70e1e59a"
+ }
+ Frame {
+ msec: 6912
+ hash: "e8f8d153e7a027a5092a9209411d97f7"
+ }
+ Frame {
+ msec: 6928
+ hash: "f11747c3533b4b2fc77a64ca0cace8b0"
+ }
+ Frame {
+ msec: 6944
+ hash: "21618c67a2a8bbce86fc872060ad40e8"
+ }
+ Frame {
+ msec: 6960
+ hash: "02da96335db74b87ceefe91b1dfe72e6"
+ }
+ Frame {
+ msec: 6976
+ hash: "2b2e4143143ead8dea5865fd782f1775"
+ }
+ Frame {
+ msec: 6992
+ hash: "13e710900b05e26cdb030b1e2b2be715"
+ }
+ Frame {
+ msec: 7008
+ hash: "29e8995d17aac4d02034debcbb9fcb98"
+ }
+ Frame {
+ msec: 7024
+ hash: "1099db1b3e4c69e84c6ab1b7c311bf1e"
+ }
+ Frame {
+ msec: 7040
+ hash: "cc7cb720043334f1eeb385dce4389dc2"
+ }
+ Frame {
+ msec: 7056
+ hash: "34c7a62c1bc7261e2fd31c40068b37a7"
+ }
+ Frame {
+ msec: 7072
+ hash: "7fafbe05cbcaa21893e3aa0f1fcfb5a0"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7088
+ hash: "5b26c8cf047706633795a8ed3e703a89"
+ }
+ Frame {
+ msec: 7104
+ hash: "e0774bf9e74d0cde81c5cb216a9258fc"
+ }
+ Frame {
+ msec: 7120
+ hash: "0870262f643245e13f4fba79fd575897"
+ }
+ Frame {
+ msec: 7136
+ hash: "8faf0d050bb435ade8af5012c1a6b0dc"
+ }
+ Frame {
+ msec: 7152
+ hash: "382c037895cc39a6870db57b5016c01f"
+ }
+ Frame {
+ msec: 7168
+ hash: "f1f5a2cbc103ab1bee9f537fa8266e03"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativeeasefollow/easefollow.qml b/tests/auto/declarative/visual/qdeclarativeeasefollow/easefollow.qml
new file mode 100644
index 0000000000..bd3270f701
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeeasefollow/easefollow.qml
@@ -0,0 +1,40 @@
+import Qt 4.6
+
+Rectangle {
+ width: 800; height: 240; color: "gray"
+
+ Rectangle {
+ id: rect
+ width: 50; height: 20; y: 30; color: "black"
+ x: SequentialAnimation {
+ repeat: true
+ NumberAnimation { from: 50; to: 700; duration: 2000 }
+ NumberAnimation { from: 700; to: 50; duration: 2000 }
+ }
+ }
+
+ Rectangle {
+ width: 50; height: 20; y: 60; color: "red"
+ x: EaseFollow { source: rect.x; velocity: 400 }
+ }
+
+ Rectangle {
+ width: 50; height: 20; y: 90; color: "yellow"
+ x: EaseFollow { source: rect.x; velocity: 300; reversingMode: EaseFollow.Immediate }
+ }
+
+ Rectangle {
+ width: 50; height: 20; y: 120; color: "green"
+ x: EaseFollow { source: rect.x; reversingMode: EaseFollow.Sync }
+ }
+
+ Rectangle {
+ width: 50; height: 20; y: 150; color: "purple"
+ x: EaseFollow { source: rect.x; maximumEasingTime: 200 }
+ }
+
+ Rectangle {
+ width: 50; height: 20; y: 180; color: "blue"
+ x: EaseFollow { source: rect.x; duration: 300 }
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.0.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.0.png
new file mode 100644
index 0000000000..016902bdb0
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.1.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.1.png
new file mode 100644
index 0000000000..a65493670f
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.2.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.2.png
new file mode 100644
index 0000000000..cfd5517750
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.3.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.3.png
new file mode 100644
index 0000000000..016902bdb0
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.qml b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.qml
new file mode 100644
index 0000000000..46086f913c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-horizontal.qml
@@ -0,0 +1,1199 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 32
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 48
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 64
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 80
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 96
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 112
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 128
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 144
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 160
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 176
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 192
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 208
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 224
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 240
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 256
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 272
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 288
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 304
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 320
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 336
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 352
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 368
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 384
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 400
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 416
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 432
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 448
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 464
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 480
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 496
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 512
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 528
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 544
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 560
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 576
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 592
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 608
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 624
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 640
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 656
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 672
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 688
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 704
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 720
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 736
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 752
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 768
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 784
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 800
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 816
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 832
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 848
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 864
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 880
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 896
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 912
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 928
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 944
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 477; y: 171
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 960
+ image: "flickable-horizontal.0.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 473; y: 171
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 976
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 463; y: 171
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 992
+ hash: "c4d91a9e7f785ccd50db55f697d75cb9"
+ }
+ Frame {
+ msec: 1008
+ hash: "c4d91a9e7f785ccd50db55f697d75cb9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 449; y: 171
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1024
+ hash: "4f054038668f56cf3fc46dee08504b24"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 425; y: 172
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1040
+ hash: "e6ae6e2a8e5fb7204ae1f559b5dc4a63"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 393; y: 172
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 393; y: 172
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1056
+ hash: "3bfaaef12ca852421ad179d8598a306d"
+ }
+ Frame {
+ msec: 1072
+ hash: "e00ff5e13a9a97bc11e041f89e4782f5"
+ }
+ Frame {
+ msec: 1088
+ hash: "ae10ada837b21365936672e9a4b4b175"
+ }
+ Frame {
+ msec: 1104
+ hash: "63566d7f1707025c9ec37e398d0e69ef"
+ }
+ Frame {
+ msec: 1120
+ hash: "20e9d299cd867d680cf85f99e06cd200"
+ }
+ Frame {
+ msec: 1136
+ hash: "4d3a19b3c50a20ba1d93a8bcd178a424"
+ }
+ Frame {
+ msec: 1152
+ hash: "d373ab5240e438e8234ae05f935c1ef8"
+ }
+ Frame {
+ msec: 1168
+ hash: "2f9c00aa1f8a8cc5d10e6c6a0baee366"
+ }
+ Frame {
+ msec: 1184
+ hash: "0fd8203b0a33fd8243ecd878f04f9b42"
+ }
+ Frame {
+ msec: 1200
+ hash: "24a197df4209c7076d68031e5dd4fd9e"
+ }
+ Frame {
+ msec: 1216
+ hash: "9e4271eacdc875183e3c8e7a1eb098c2"
+ }
+ Frame {
+ msec: 1232
+ hash: "cdf7aac4ff7e5df806977eb38392f5bc"
+ }
+ Frame {
+ msec: 1248
+ hash: "1ace4a1312cad6f173a04c388624a97f"
+ }
+ Frame {
+ msec: 1264
+ hash: "193d6d6838ac1d5ddb941fbb340ec506"
+ }
+ Frame {
+ msec: 1280
+ hash: "ed82807a48f28610ba9bda0c7ab91ce4"
+ }
+ Frame {
+ msec: 1296
+ hash: "e1168bb9a88a972decb0c537d86d7758"
+ }
+ Frame {
+ msec: 1312
+ hash: "828ba428b04826687c6ef19b72318924"
+ }
+ Frame {
+ msec: 1328
+ hash: "7dae52c428253cf44045ffaabaadd2f4"
+ }
+ Frame {
+ msec: 1344
+ hash: "06e2a81e1a2421523642cfcf17ec22e4"
+ }
+ Frame {
+ msec: 1360
+ hash: "283997835a54e80c0ab8a0321bd03ce7"
+ }
+ Frame {
+ msec: 1376
+ hash: "6354f9379b7b25c8fabda4e5bc3cdf6a"
+ }
+ Frame {
+ msec: 1392
+ hash: "6bc87dfd21d59efd3397e3cfb0d00d25"
+ }
+ Frame {
+ msec: 1408
+ hash: "4f97fc9aa1f79a6b007a00459386b9ff"
+ }
+ Frame {
+ msec: 1424
+ hash: "2b5c711ede124c9e97d3ef83a3fdcc8b"
+ }
+ Frame {
+ msec: 1440
+ hash: "5a8cbd4ac3fcd920f2aea6e2cfa96467"
+ }
+ Frame {
+ msec: 1456
+ hash: "5b32961cb36e519f5b1d50386e796d3e"
+ }
+ Frame {
+ msec: 1472
+ hash: "c91f95cccd38cbd1a16ee65abffd40ab"
+ }
+ Frame {
+ msec: 1488
+ hash: "25108050298d3ffc850113971bcf54da"
+ }
+ Frame {
+ msec: 1504
+ hash: "6a236881f2a1cb487ee1945c279e020b"
+ }
+ Frame {
+ msec: 1520
+ hash: "2df1824df1cf20022595f64d26adb4ad"
+ }
+ Frame {
+ msec: 1536
+ hash: "4ca4a0a4b4fd9f9c4846adebcdc8fd67"
+ }
+ Frame {
+ msec: 1552
+ hash: "1696ef0862ff4772f960d203c43fbddf"
+ }
+ Frame {
+ msec: 1568
+ hash: "c5846835b8eb5d98c481ee5811344ea1"
+ }
+ Frame {
+ msec: 1584
+ hash: "fbcb044ee53302de573321b43f068e65"
+ }
+ Frame {
+ msec: 1600
+ hash: "d369e0a6c4a3e63102be29a7362ef9eb"
+ }
+ Frame {
+ msec: 1616
+ hash: "e93131b881805d4aa44949c69f486821"
+ }
+ Frame {
+ msec: 1632
+ hash: "b7aeee9e5065f1d4656e451b542ecf6a"
+ }
+ Frame {
+ msec: 1648
+ hash: "05521ca19960c070d5f3dd72c5ade0e4"
+ }
+ Frame {
+ msec: 1664
+ hash: "2c68cb3291cf1f892c8b8eb28b409e4d"
+ }
+ Frame {
+ msec: 1680
+ hash: "5a0908aea91df2b9e65d222829c2b0ba"
+ }
+ Frame {
+ msec: 1696
+ hash: "0d4ff147517eee8b3dbcd51a708b2aa7"
+ }
+ Frame {
+ msec: 1712
+ hash: "521e1075de1de89c6e25f469d2728ab7"
+ }
+ Frame {
+ msec: 1728
+ hash: "c543447f98ae608058c6c02c8c8665e6"
+ }
+ Frame {
+ msec: 1744
+ hash: "ac259db754b7dfb8cce8548527c72e4b"
+ }
+ Frame {
+ msec: 1760
+ hash: "bc5b68d5ecfb583ae41001e326b7aa9b"
+ }
+ Frame {
+ msec: 1776
+ hash: "e08051cb1ab2d8f979a52dc86411f78f"
+ }
+ Frame {
+ msec: 1792
+ hash: "b1746ad9563359f0d70a1aaee62e9bd8"
+ }
+ Frame {
+ msec: 1808
+ hash: "5d6bc33ff2857fb8db582362bf7c19c7"
+ }
+ Frame {
+ msec: 1824
+ hash: "83f2c3a7124f9be4dbe883a27ca7df8e"
+ }
+ Frame {
+ msec: 1840
+ hash: "189f7cfb5ede1f8380b1a05b7e3d942e"
+ }
+ Frame {
+ msec: 1856
+ hash: "07b1a4e5ca156e6aa1f3e76b825807ce"
+ }
+ Frame {
+ msec: 1872
+ hash: "48b25f0acfe6eb3bc2cb9eb16e6595d0"
+ }
+ Frame {
+ msec: 1888
+ hash: "15ae05f5ed098021073c4593587949ea"
+ }
+ Frame {
+ msec: 1904
+ hash: "b300f2c75f4aebcf84ed37ad424ca9fa"
+ }
+ Frame {
+ msec: 1920
+ image: "flickable-horizontal.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "7d8ea492fb1c664502e95e085896c569"
+ }
+ Frame {
+ msec: 1952
+ hash: "7513b077e073d78b387309b56e1fd44c"
+ }
+ Frame {
+ msec: 1968
+ hash: "ed1ac5cf6d4b081983a8e16258f431bf"
+ }
+ Frame {
+ msec: 1984
+ hash: "fbb31f23ba6e5d02011363abfb4b3f18"
+ }
+ Frame {
+ msec: 2000
+ hash: "6f01df424b38036b9921b4ee1491a1c1"
+ }
+ Frame {
+ msec: 2016
+ hash: "11f706dfacbec5c0be0c2f3c5442f717"
+ }
+ Frame {
+ msec: 2032
+ hash: "0a70348986f4987f43db3e55af63fca5"
+ }
+ Frame {
+ msec: 2048
+ hash: "6f8b7aaad846f83c6349836d7af34662"
+ }
+ Frame {
+ msec: 2064
+ hash: "44723b22aad6d2d814e074ff9324f3c4"
+ }
+ Frame {
+ msec: 2080
+ hash: "44723b22aad6d2d814e074ff9324f3c4"
+ }
+ Frame {
+ msec: 2096
+ hash: "44723b22aad6d2d814e074ff9324f3c4"
+ }
+ Frame {
+ msec: 2112
+ hash: "1c12d2c68223324f040b7a693cef2074"
+ }
+ Frame {
+ msec: 2128
+ hash: "0a70348986f4987f43db3e55af63fca5"
+ }
+ Frame {
+ msec: 2144
+ hash: "bf4de7baf2730cdaf83887d50d577986"
+ }
+ Frame {
+ msec: 2160
+ hash: "23ddb2c0793d7161a0d8c5b2a777dceb"
+ }
+ Frame {
+ msec: 2176
+ hash: "7513b077e073d78b387309b56e1fd44c"
+ }
+ Frame {
+ msec: 2192
+ hash: "83fa82362057466dff6a243a95d423db"
+ }
+ Frame {
+ msec: 2208
+ hash: "0e60b632ce511109cb01d2e5ff6945f8"
+ }
+ Frame {
+ msec: 2224
+ hash: "78c25194827c4243a16807491f798cdf"
+ }
+ Frame {
+ msec: 2240
+ hash: "4c9dc46794d4a32e654395bb9d78409e"
+ }
+ Frame {
+ msec: 2256
+ hash: "e996d4f3a0b3a4a4ed29ec23a1ad5615"
+ }
+ Frame {
+ msec: 2272
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2288
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2304
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2320
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2336
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2352
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2368
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2384
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2400
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2416
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2432
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2448
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2464
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2480
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2496
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2512
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2528
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2544
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2560
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2576
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2592
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2608
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2624
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2640
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2656
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2672
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2688
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2704
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2720
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2736
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2752
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2768
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 152; y: 189
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2784
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2800
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Frame {
+ msec: 2816
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 154; y: 190
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2832
+ hash: "cd6770afe63f28517a93f0961cf9c26e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 169; y: 191
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2848
+ hash: "edd015434d7ead96c03a51a2b1c9e527"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 202; y: 192
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2864
+ hash: "ea0eda505daea4171e27aac358aa6a4a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 256; y: 192
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2880
+ image: "flickable-horizontal.2.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 331; y: 192
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2896
+ hash: "34f70dfe1c226e63300112aa9a4a6968"
+ }
+ Frame {
+ msec: 2912
+ hash: "34f70dfe1c226e63300112aa9a4a6968"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 395; y: 194
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 395; y: 194
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2928
+ hash: "dd61e0ae58d7a344908a10bb97cfcb39"
+ }
+ Frame {
+ msec: 2944
+ hash: "14a384c4bdd3e89808761d1e86976170"
+ }
+ Frame {
+ msec: 2960
+ hash: "0e82a4920a53239f117448cd0e0b27f2"
+ }
+ Frame {
+ msec: 2976
+ hash: "711e29bf6fbbeb7882064adb0619f4ac"
+ }
+ Frame {
+ msec: 2992
+ hash: "43307cbfe1688daf300fafc8df0082b8"
+ }
+ Frame {
+ msec: 3008
+ hash: "46d788d926c03d85a68b66252e73ae90"
+ }
+ Frame {
+ msec: 3024
+ hash: "a0042935ad2d5557c906050d4a3581c9"
+ }
+ Frame {
+ msec: 3040
+ hash: "b618a40490ca0aea310f08b452fa8c68"
+ }
+ Frame {
+ msec: 3056
+ hash: "e2aaad7f160a6d77dd788c76bb8cb8a7"
+ }
+ Frame {
+ msec: 3072
+ hash: "ab5c27fa790c67a6678db0bbae1ae477"
+ }
+ Frame {
+ msec: 3088
+ hash: "b43ed7af838cd6edd32393fc56cf8fb1"
+ }
+ Frame {
+ msec: 3104
+ hash: "88ac50602c9f27fb5b882ad32d14ff46"
+ }
+ Frame {
+ msec: 3120
+ hash: "259af2e080ed93e16cb633fa940c7c08"
+ }
+ Frame {
+ msec: 3136
+ hash: "d05bec2351068d552b7bbbf47cf82fad"
+ }
+ Frame {
+ msec: 3152
+ hash: "5354b8e07f1ed22950687187ee7a0290"
+ }
+ Frame {
+ msec: 3168
+ hash: "3bfaaef12ca852421ad179d8598a306d"
+ }
+ Frame {
+ msec: 3184
+ hash: "40d3a77fce7a9a9ca7ae6023fc4cfc10"
+ }
+ Frame {
+ msec: 3200
+ hash: "5837c0122aa6b28518f1b7043ead99a9"
+ }
+ Frame {
+ msec: 3216
+ hash: "9514d8530275e4642810ac441e8de353"
+ }
+ Frame {
+ msec: 3232
+ hash: "3b720882f52340549d8e1b9659443461"
+ }
+ Frame {
+ msec: 3248
+ hash: "4de5b95c8f4949a4f1ee9a119940e80a"
+ }
+ Frame {
+ msec: 3264
+ hash: "a35097c00483e0b481222e4ad220c7a4"
+ }
+ Frame {
+ msec: 3280
+ hash: "82ac348a63a4e358a877a2e45d48e2b1"
+ }
+ Frame {
+ msec: 3296
+ hash: "1322108409d1fa87d128f0c44c81ab4b"
+ }
+ Frame {
+ msec: 3312
+ hash: "f6b030effcca891ab20073f106b22d73"
+ }
+ Frame {
+ msec: 3328
+ hash: "a7ccd998ac2ff2777d9423d704ddef48"
+ }
+ Frame {
+ msec: 3344
+ hash: "b6d971a4f3321b7f3632e778ce733589"
+ }
+ Frame {
+ msec: 3360
+ hash: "b6d971a4f3321b7f3632e778ce733589"
+ }
+ Frame {
+ msec: 3376
+ hash: "b6d971a4f3321b7f3632e778ce733589"
+ }
+ Frame {
+ msec: 3392
+ hash: "82ef6700a513e39508fb6de5ef07f1e7"
+ }
+ Frame {
+ msec: 3408
+ hash: "9e4c4d479bc0b1a61566eae12416bea6"
+ }
+ Frame {
+ msec: 3424
+ hash: "f6b030effcca891ab20073f106b22d73"
+ }
+ Frame {
+ msec: 3440
+ hash: "8968acd022a9ba6fcc3ea52bdd7268c4"
+ }
+ Frame {
+ msec: 3456
+ hash: "de8f1a1fd680af475173d5f81e85b26c"
+ }
+ Frame {
+ msec: 3472
+ hash: "82e8c0c7cb7c2b1e8d7a5fc019533e6b"
+ }
+ Frame {
+ msec: 3488
+ hash: "f820d250252cd910af97e5c9be181457"
+ }
+ Frame {
+ msec: 3504
+ hash: "a40558c1fbf328d3c891b473b2454020"
+ }
+ Frame {
+ msec: 3520
+ hash: "0ef9e64bad67670102e1e4d9ef0e96f3"
+ }
+ Frame {
+ msec: 3536
+ hash: "1d8013765ac2d3fe09ccaa6db098a208"
+ }
+ Frame {
+ msec: 3552
+ hash: "1d8013765ac2d3fe09ccaa6db098a208"
+ }
+ Frame {
+ msec: 3568
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3584
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3600
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3616
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3632
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3648
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3664
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3680
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3696
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3712
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3728
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3744
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3760
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3776
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3792
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3808
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3824
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3840
+ image: "flickable-horizontal.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3872
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3888
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3904
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3920
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3936
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3952
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3968
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 3984
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 4000
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 4016
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 4032
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 4048
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 4064
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 4080
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 4096
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 4112
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 4128
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 4144
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 4160
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4176
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 4192
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 4208
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 4224
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 4240
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+ Frame {
+ msec: 4256
+ hash: "0fa60818532d1e5c20cd82ce3d61e3f7"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.0.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.0.png
new file mode 100644
index 0000000000..18fef53434
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.1.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.1.png
new file mode 100644
index 0000000000..18fef53434
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.10.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.10.png
new file mode 100644
index 0000000000..b352c68c1b
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.10.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.11.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.11.png
new file mode 100644
index 0000000000..ce7ee68dac
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.11.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.12.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.12.png
new file mode 100644
index 0000000000..d8cdacfa4c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.12.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.13.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.13.png
new file mode 100644
index 0000000000..0c2fa7b064
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.13.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.14.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.14.png
new file mode 100644
index 0000000000..e9b30282df
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.14.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.15.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.15.png
new file mode 100644
index 0000000000..2186a8b147
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.15.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.16.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.16.png
new file mode 100644
index 0000000000..b4590af80b
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.16.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.17.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.17.png
new file mode 100644
index 0000000000..fe29f19702
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.17.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.18.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.18.png
new file mode 100644
index 0000000000..fe29f19702
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.18.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.19.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.19.png
new file mode 100644
index 0000000000..4f8587fa9b
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.19.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.2.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.2.png
new file mode 100644
index 0000000000..0a7cc039fa
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.20.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.20.png
new file mode 100644
index 0000000000..4f8587fa9b
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.20.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.21.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.21.png
new file mode 100644
index 0000000000..c0b0bdfae5
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.21.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.22.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.22.png
new file mode 100644
index 0000000000..4168c3b54f
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.22.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.23.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.23.png
new file mode 100644
index 0000000000..18fef53434
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.23.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.24.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.24.png
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.24.png
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.3.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.3.png
new file mode 100644
index 0000000000..fc6669d666
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.4.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.4.png
new file mode 100644
index 0000000000..c0b0bdfae5
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.5.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.5.png
new file mode 100644
index 0000000000..2ffa96e05b
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.6.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.6.png
new file mode 100644
index 0000000000..f550b89209
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.7.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.7.png
new file mode 100644
index 0000000000..f550b89209
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.8.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.8.png
new file mode 100644
index 0000000000..f550b89209
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.8.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.9.png b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.9.png
new file mode 100644
index 0000000000..f550b89209
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.9.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.qml b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.qml
new file mode 100644
index 0000000000..db702983bf
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/data/flickable-vertical.qml
@@ -0,0 +1,7037 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 32
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 48
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 64
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 80
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 96
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 112
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 128
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 144
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 160
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 176
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 192
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 208
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 224
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 240
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 256
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 272
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 288
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 304
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 320
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 336
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 352
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 368
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 384
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 400
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 416
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 432
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 448
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 464
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 480
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 496
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 512
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 528
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 544
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 560
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 576
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 592
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 608
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 624
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 640
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 656
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 672
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 688
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 704
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 720
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 736
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 752
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 768
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 784
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 800
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 816
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 832
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 848
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 864
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 880
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 896
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 912
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 928
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 944
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 960
+ image: "flickable-vertical.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 992
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1008
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1024
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1040
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1056
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1072
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1088
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1104
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1120
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1136
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1152
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1168
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1184
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1200
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1216
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1232
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1248
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1264
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1280
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1296
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1312
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1328
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1344
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1360
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1376
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1392
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1408
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1424
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1440
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1456
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1472
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1488
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1504
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1520
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1536
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1552
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1568
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1584
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1600
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1616
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1632
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1648
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1664
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1680
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1696
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1712
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1728
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1744
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1760
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1776
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1792
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1808
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1824
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1840
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1856
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1872
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1888
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1904
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1920
+ image: "flickable-vertical.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1952
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1968
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 1984
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2000
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2016
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2032
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2048
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2064
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2080
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2096
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2112
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2128
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2144
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2160
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2176
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2192
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2208
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2224
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2240
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2256
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2272
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2288
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2304
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2320
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2336
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2352
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 2368
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 143; y: 387
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2384
+ hash: "a21e65718bc7a0cdcbeb058d0cbd2977"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 144; y: 386
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2400
+ hash: "a21e65718bc7a0cdcbeb058d0cbd2977"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 145; y: 386
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 147; y: 380
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2416
+ hash: "a21e65718bc7a0cdcbeb058d0cbd2977"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 151; y: 372
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2432
+ hash: "90d9c65705a006741671657d00ab9dba"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 159; y: 346
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2448
+ hash: "8c6301fb7409a22fda85072d48e838c8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 161; y: 328
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 161; y: 304
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2464
+ hash: "f5121fd6b0f20844d13cd8625a1a5047"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 159; y: 276
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 159; y: 276
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2480
+ hash: "0d64b804b3b7e3ee052395f612d62bcf"
+ }
+ Frame {
+ msec: 2496
+ hash: "17b68429dfaf80bb3313e78bb01d6c4e"
+ }
+ Frame {
+ msec: 2512
+ hash: "e86ea3b103a7d9f95f7484f3579a95b5"
+ }
+ Frame {
+ msec: 2528
+ hash: "884d3842f4aa2a38ff73511b143789a0"
+ }
+ Frame {
+ msec: 2544
+ hash: "646d1dd3003ccac06b7251e8ce1beb2f"
+ }
+ Frame {
+ msec: 2560
+ hash: "ff66db77c56bf6830bc39211b3441e69"
+ }
+ Frame {
+ msec: 2576
+ hash: "8ff9c081cf823adaf6b17014fc582f12"
+ }
+ Frame {
+ msec: 2592
+ hash: "7b1563aed6f030003e04f19bb6e91a51"
+ }
+ Frame {
+ msec: 2608
+ hash: "3661b26f082e44cbc38e6033c28e99cb"
+ }
+ Frame {
+ msec: 2624
+ hash: "8e0f117dc1f2527d6b2b3f0c849fbda1"
+ }
+ Frame {
+ msec: 2640
+ hash: "5a13b0045bc132ec6c917a6d7ddf9c7a"
+ }
+ Frame {
+ msec: 2656
+ hash: "06f332d287ed14b29dd0a252d59565a2"
+ }
+ Frame {
+ msec: 2672
+ hash: "7b1512aabac1fb17ecc8e0c771e2477f"
+ }
+ Frame {
+ msec: 2688
+ hash: "22b62a7b42df6bbafad76d99001616c7"
+ }
+ Frame {
+ msec: 2704
+ hash: "0f6588fc79fa06097b2ba9bf6b1d6d14"
+ }
+ Frame {
+ msec: 2720
+ hash: "c7849941c7572b3581a7eb9423838d90"
+ }
+ Frame {
+ msec: 2736
+ hash: "8ddd8e9dc33698ecca6e19f2318e1c2e"
+ }
+ Frame {
+ msec: 2752
+ hash: "1606eb49c73e60445d9eca11e23a33f9"
+ }
+ Frame {
+ msec: 2768
+ hash: "6a7e58d27492742bf3d853ee37144dae"
+ }
+ Frame {
+ msec: 2784
+ hash: "a55ba5b7ccdabd39385c6cb32e8e1b26"
+ }
+ Frame {
+ msec: 2800
+ hash: "afe5705e8ebc240babee4a88a4321189"
+ }
+ Frame {
+ msec: 2816
+ hash: "807d92ab4b8d2295f3abfd3508258dd5"
+ }
+ Frame {
+ msec: 2832
+ hash: "ae95ed79eee246c74535d9ca97878ce6"
+ }
+ Frame {
+ msec: 2848
+ hash: "c8cf5d07a06646552d5595603532b786"
+ }
+ Frame {
+ msec: 2864
+ hash: "45971fd130662a263fcd86513aee222d"
+ }
+ Frame {
+ msec: 2880
+ image: "flickable-vertical.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "8e78a9098ebd02cc828b76609c58d6b9"
+ }
+ Frame {
+ msec: 2912
+ hash: "7f4d7a1c8e0a5494bf7f37a0a165d02b"
+ }
+ Frame {
+ msec: 2928
+ hash: "881ed825133259e731b71cf6251ed862"
+ }
+ Frame {
+ msec: 2944
+ hash: "8fb86c54b4e0280de18eb2d4f1c55e68"
+ }
+ Frame {
+ msec: 2960
+ hash: "58ad7494c0bddc0de86bfd041f45a5d3"
+ }
+ Frame {
+ msec: 2976
+ hash: "87489ba1390ee152a7de023e8ba25c72"
+ }
+ Frame {
+ msec: 2992
+ hash: "b1f06b26110799e88837781cdf4688a7"
+ }
+ Frame {
+ msec: 3008
+ hash: "d23e94ef53ce3b8143a716028ab729f9"
+ }
+ Frame {
+ msec: 3024
+ hash: "1c5fdf8d85537836b698a50fcab58a4e"
+ }
+ Frame {
+ msec: 3040
+ hash: "bd9c6ea06278efa4d491519734d0032f"
+ }
+ Frame {
+ msec: 3056
+ hash: "b533e6543ca4efb34e187d540e4ed7e0"
+ }
+ Frame {
+ msec: 3072
+ hash: "65f4ff7328ce366671436512da44a094"
+ }
+ Frame {
+ msec: 3088
+ hash: "e7afcc4c29cd1868bcf1ebea1d19fca1"
+ }
+ Frame {
+ msec: 3104
+ hash: "ddaf80f4b1d98b07fe4bf8282e13b2a8"
+ }
+ Frame {
+ msec: 3120
+ hash: "d4888df20b11e30a7d613a32e603cea5"
+ }
+ Frame {
+ msec: 3136
+ hash: "ac74be483173b08cb41b8d63e3e4d073"
+ }
+ Frame {
+ msec: 3152
+ hash: "35c65757fe27f68e35c438269c00ba53"
+ }
+ Frame {
+ msec: 3168
+ hash: "b8a28356b50362f2dabd0ab4a0d1d621"
+ }
+ Frame {
+ msec: 3184
+ hash: "71205ebfcce9e3a018fe2c30f7f3ee92"
+ }
+ Frame {
+ msec: 3200
+ hash: "0ef526ebcc23342ba4b8dfa8ed41e7de"
+ }
+ Frame {
+ msec: 3216
+ hash: "9caaec9ca80b5da75e5e1231635c2f37"
+ }
+ Frame {
+ msec: 3232
+ hash: "bb6b951e8c2252d873828e9ef1c9b625"
+ }
+ Frame {
+ msec: 3248
+ hash: "15faa58fbb91f80a8c1256e5627e7777"
+ }
+ Frame {
+ msec: 3264
+ hash: "bf2d0f512ade00ee44adb6624573daf9"
+ }
+ Frame {
+ msec: 3280
+ hash: "5af713203ef673d40c69b014dcaf242f"
+ }
+ Frame {
+ msec: 3296
+ hash: "970972470176fbd64208a3b25d4f5f65"
+ }
+ Frame {
+ msec: 3312
+ hash: "135a4356d91e594ee2b71132ecf9a606"
+ }
+ Frame {
+ msec: 3328
+ hash: "8a6364c0e033d517180ec287e61b3c9d"
+ }
+ Frame {
+ msec: 3344
+ hash: "71c7d7eddd49b77e8f96f3b7a6e8470f"
+ }
+ Frame {
+ msec: 3360
+ hash: "59667814b3e1a2d832b895235a9cdaf6"
+ }
+ Frame {
+ msec: 3376
+ hash: "a324de5e8d115862b9908aba881df913"
+ }
+ Frame {
+ msec: 3392
+ hash: "300902de67507207465a74bf6404c1c4"
+ }
+ Frame {
+ msec: 3408
+ hash: "63f40e307d9f0c14bab111e833047ee1"
+ }
+ Frame {
+ msec: 3424
+ hash: "53f54f5a4745043ef616ac21583416ef"
+ }
+ Frame {
+ msec: 3440
+ hash: "851e6eebe48034d3185674f6908932af"
+ }
+ Frame {
+ msec: 3456
+ hash: "06ef04a044394ab55fe2806a50db2abf"
+ }
+ Frame {
+ msec: 3472
+ hash: "88c82d8bb518b18a174f55c647395de1"
+ }
+ Frame {
+ msec: 3488
+ hash: "e62b84c87e1d73028305b9038915c53d"
+ }
+ Frame {
+ msec: 3504
+ hash: "fdb38aa631cd6967585dd23e20f866a9"
+ }
+ Frame {
+ msec: 3520
+ hash: "edabcd9bee25b1abcabced3b0b3dff1e"
+ }
+ Frame {
+ msec: 3536
+ hash: "6f0a2dc3151c018846b13fd2e11d0fab"
+ }
+ Frame {
+ msec: 3552
+ hash: "5101944e7867260ffdd3134436c6373a"
+ }
+ Frame {
+ msec: 3568
+ hash: "a04f231f840571734f8dab609b2f82fd"
+ }
+ Frame {
+ msec: 3584
+ hash: "87c22f82c659b405fd4e81640ce0b166"
+ }
+ Frame {
+ msec: 3600
+ hash: "2273564228baea48cac343a4f30d6a59"
+ }
+ Frame {
+ msec: 3616
+ hash: "8a4d1fc12743e6153c0f47e1fce9d55f"
+ }
+ Frame {
+ msec: 3632
+ hash: "944cd812097868935a686211551ccd35"
+ }
+ Frame {
+ msec: 3648
+ hash: "a2f1a14510a1cfe3c2c45fa10b0442b4"
+ }
+ Frame {
+ msec: 3664
+ hash: "d754cc64c12ef8cc2db0ddf99381e88c"
+ }
+ Frame {
+ msec: 3680
+ hash: "168487c8ca6f3463b3aa4433cfc99792"
+ }
+ Frame {
+ msec: 3696
+ hash: "67a82c1516b0d8d953c7055f07a9fdc7"
+ }
+ Frame {
+ msec: 3712
+ hash: "0df1592631b8cc1986f905a049b40bf0"
+ }
+ Frame {
+ msec: 3728
+ hash: "8677472d35e17d7bd5fe40f7841bb01d"
+ }
+ Frame {
+ msec: 3744
+ hash: "4472a8412e41377e0795d51706fb9180"
+ }
+ Frame {
+ msec: 3760
+ hash: "84533717ec1419617895f2ec646fb1c0"
+ }
+ Frame {
+ msec: 3776
+ hash: "ad50bd7708be94c6b8e63077e589ae48"
+ }
+ Frame {
+ msec: 3792
+ hash: "a37fb5d7cec3fbff8e12157c88e08833"
+ }
+ Frame {
+ msec: 3808
+ hash: "df1ca02b5bb76338ff24a561876f89f2"
+ }
+ Frame {
+ msec: 3824
+ hash: "df1ca02b5bb76338ff24a561876f89f2"
+ }
+ Frame {
+ msec: 3840
+ image: "flickable-vertical.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "a37fb5d7cec3fbff8e12157c88e08833"
+ }
+ Frame {
+ msec: 3872
+ hash: "3c8a94d2e139a9e84eaa6bf522250756"
+ }
+ Frame {
+ msec: 3888
+ hash: "23647f577ee83bc500ca1078eea2be90"
+ }
+ Frame {
+ msec: 3904
+ hash: "c1a52221113c162e963a2a165b8d08a5"
+ }
+ Frame {
+ msec: 3920
+ hash: "993c57d4ed9026f8615c68ef5d8c5c16"
+ }
+ Frame {
+ msec: 3936
+ hash: "3d843eac108e047b6fe9ac21d8866fdd"
+ }
+ Frame {
+ msec: 3952
+ hash: "5be1fa7cb99fda017cd5cdcf91a18525"
+ }
+ Frame {
+ msec: 3968
+ hash: "c68ef5177f4568eb77c0f4135ba65e44"
+ }
+ Frame {
+ msec: 3984
+ hash: "f047939a56a0ecee5deefcd3d2bf1710"
+ }
+ Frame {
+ msec: 4000
+ hash: "4af748f59c6a62156a228ae635ec2d9c"
+ }
+ Frame {
+ msec: 4016
+ hash: "b69b045557a8eada80a24eb4caa7ea4e"
+ }
+ Frame {
+ msec: 4032
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4048
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4064
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4080
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4096
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4112
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4128
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4144
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4160
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4176
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4192
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4208
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4224
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4240
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4256
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4272
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4288
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4304
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4320
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4336
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4352
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4368
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4384
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4400
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4416
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4432
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4448
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4464
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4480
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4496
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4512
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4528
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4544
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4560
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4576
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4592
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4608
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4624
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4640
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4656
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4672
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4688
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4704
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4720
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4736
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4752
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4768
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4784
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4800
+ image: "flickable-vertical.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4832
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4848
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4864
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4880
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4896
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4912
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4928
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4944
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4960
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4976
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 4992
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 5008
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 5024
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 5040
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 5056
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 5072
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 5088
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 5104
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 5120
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 5136
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 5152
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 5168
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 5184
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 5200
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 5216
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 5232
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 5248
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 5264
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 5280
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 173; y: 85
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5296
+ hash: "06472b42bc00fcaf7f84cd4ac613bbd2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 173; y: 86
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5312
+ hash: "06472b42bc00fcaf7f84cd4ac613bbd2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 173; y: 89
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 173; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5328
+ hash: "0031f6edee383e97a3a31fe4268ff778"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 175; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 179; y: 137
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5344
+ hash: "e594c62fe10165ae08e3dd8b33b9f584"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 183; y: 159
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 185; y: 183
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5360
+ hash: "dd61c97aafee69eb7c54a47dceea5810"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 185; y: 207
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5376
+ hash: "29d06473d4aac07c89041b4413ce421f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 185; y: 227
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 185; y: 243
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5392
+ hash: "7843b1bdb9efdbee0e6dd39ef8f1078a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 185; y: 253
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 185; y: 253
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5408
+ hash: "f609350d3c3041998340c9a6ded9baec"
+ }
+ Frame {
+ msec: 5424
+ hash: "53b559ea9764ad466a0ffc1c55a596c2"
+ }
+ Frame {
+ msec: 5440
+ hash: "8ac64c07cb29adff5d8510f956f3c35d"
+ }
+ Frame {
+ msec: 5456
+ hash: "cb7ab2e7af067f1493197731515462fa"
+ }
+ Frame {
+ msec: 5472
+ hash: "a0509acbb96bb3ced08a7c968836bd69"
+ }
+ Frame {
+ msec: 5488
+ hash: "e4c5e681a275b4eff49eed39a6b544d6"
+ }
+ Frame {
+ msec: 5504
+ hash: "4403e91762ff703eb12dee1b47f4072c"
+ }
+ Frame {
+ msec: 5520
+ hash: "9f548a31dea71208c9f465e37bafc589"
+ }
+ Frame {
+ msec: 5536
+ hash: "c86dd18e63508adfdbd5b3b891fd0d99"
+ }
+ Frame {
+ msec: 5552
+ hash: "b182070ff0c1b579a9fd16d39f950079"
+ }
+ Frame {
+ msec: 5568
+ hash: "4308c4d6346e20ed89026c0ec216ae89"
+ }
+ Frame {
+ msec: 5584
+ hash: "2da84d83767e5ac1f7ce361bdcebe9c8"
+ }
+ Frame {
+ msec: 5600
+ hash: "a3ce932ebf10147f79a183e44a6f6eb7"
+ }
+ Frame {
+ msec: 5616
+ hash: "f5907789e23150c8dd0858d7c5098907"
+ }
+ Frame {
+ msec: 5632
+ hash: "98b76cfad574957f5b7633390c6788c8"
+ }
+ Frame {
+ msec: 5648
+ hash: "8c58d6511a7077cc386216a6227e8b52"
+ }
+ Frame {
+ msec: 5664
+ hash: "2ca5e16bfd83f933f32367aa49db0e1d"
+ }
+ Frame {
+ msec: 5680
+ hash: "ba387d0ab480eb9eaf6993c2ad168350"
+ }
+ Frame {
+ msec: 5696
+ hash: "ae9f3b3245ccf921967a178712566b55"
+ }
+ Frame {
+ msec: 5712
+ hash: "32cf742724558260447f61da03d5f321"
+ }
+ Frame {
+ msec: 5728
+ hash: "ad21273f37c1abac0719f532dd5530ac"
+ }
+ Frame {
+ msec: 5744
+ hash: "50e43629e0b8d0d651b9670241354cb1"
+ }
+ Frame {
+ msec: 5760
+ image: "flickable-vertical.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "e4f0192406831c8e0abe1b561120b9c0"
+ }
+ Frame {
+ msec: 5792
+ hash: "4c98e619b487d67d114ed0d7800f157e"
+ }
+ Frame {
+ msec: 5808
+ hash: "11ed6dc9464396eb790db236f3713164"
+ }
+ Frame {
+ msec: 5824
+ hash: "908febb1e344d6972d6df611e82792bd"
+ }
+ Frame {
+ msec: 5840
+ hash: "03536bb4d6ff84bf75d9ec3574bb7361"
+ }
+ Frame {
+ msec: 5856
+ hash: "f9946a44c2d4e91a947e6bda7415cf9b"
+ }
+ Frame {
+ msec: 5872
+ hash: "0e63e4b9dd6bc7d7b684cb461c6257bf"
+ }
+ Frame {
+ msec: 5888
+ hash: "1ffe88b771bed2aa27aafe6853b67c7a"
+ }
+ Frame {
+ msec: 5904
+ hash: "ff1b78113a710481273ecf01cc978a46"
+ }
+ Frame {
+ msec: 5920
+ hash: "e381553fa74436ca4b0d166bdca78cf7"
+ }
+ Frame {
+ msec: 5936
+ hash: "d9a6f9bfc011edb7da23091fe24e2717"
+ }
+ Frame {
+ msec: 5952
+ hash: "bd137e8b15f5c485d10b83461dedc67f"
+ }
+ Frame {
+ msec: 5968
+ hash: "8f5b5e19845aa537790b683ef37c8626"
+ }
+ Frame {
+ msec: 5984
+ hash: "5abbf0dccef8a3bb7b090a24d715a25f"
+ }
+ Frame {
+ msec: 6000
+ hash: "bf924dd11e226022c9c812b5c7e8229e"
+ }
+ Frame {
+ msec: 6016
+ hash: "c47b59ff7f3c4acfb296959f6eb14801"
+ }
+ Frame {
+ msec: 6032
+ hash: "b5c0ac4514d44a651a4ab817646f1d88"
+ }
+ Frame {
+ msec: 6048
+ hash: "86a9fba0e2ca761a4fb71e5edbf34cab"
+ }
+ Frame {
+ msec: 6064
+ hash: "5bf43304399bdc979afd2580b922fd30"
+ }
+ Frame {
+ msec: 6080
+ hash: "3696756d6250f23b1122d314df08b936"
+ }
+ Frame {
+ msec: 6096
+ hash: "49c7b24b1655a1b5a9b4cc2187f7cc58"
+ }
+ Frame {
+ msec: 6112
+ hash: "a387dce727804fb4ca1c3378ba130d08"
+ }
+ Frame {
+ msec: 6128
+ hash: "505150386afee9c5d89566c90778cf58"
+ }
+ Frame {
+ msec: 6144
+ hash: "a00ecae0150a069d306127ed54c4921f"
+ }
+ Frame {
+ msec: 6160
+ hash: "e556bfca052e4d8922a4b85d6e94a22a"
+ }
+ Frame {
+ msec: 6176
+ hash: "ac710b4796de4d0b7d275c5fffcefe1f"
+ }
+ Frame {
+ msec: 6192
+ hash: "2f0475e842083c93b0fa0b8a8a33117a"
+ }
+ Frame {
+ msec: 6208
+ hash: "6de0e820748df06e702a82f127d9f635"
+ }
+ Frame {
+ msec: 6224
+ hash: "b3748d7a26ea8289e2faa9dd624b23a3"
+ }
+ Frame {
+ msec: 6240
+ hash: "52be51e9a5bf6e6d0c2e64e584a4bf11"
+ }
+ Frame {
+ msec: 6256
+ hash: "9c4a08a51556d56f2809d27a1de0aae3"
+ }
+ Frame {
+ msec: 6272
+ hash: "4a151e94a39b68a47374cc45cb8969df"
+ }
+ Frame {
+ msec: 6288
+ hash: "a2c2926224103d6e0a679b891451f791"
+ }
+ Frame {
+ msec: 6304
+ hash: "c192adca5c3cf3741f6e7b33d53a722a"
+ }
+ Frame {
+ msec: 6320
+ hash: "8fa9d85c213243e0709e3e32f03cebd9"
+ }
+ Frame {
+ msec: 6336
+ hash: "20f516aa2c4ebc239a283176d83ade6f"
+ }
+ Frame {
+ msec: 6352
+ hash: "ac8ace61348c5500dd6e2d1f3b4b174b"
+ }
+ Frame {
+ msec: 6368
+ hash: "39cc6b136e17283ddc65425150cec7be"
+ }
+ Frame {
+ msec: 6384
+ hash: "b250cb3fd5a7ab5c76ae15d5a500a894"
+ }
+ Frame {
+ msec: 6400
+ hash: "f07e4f8b61c0ce514364e062867687a2"
+ }
+ Frame {
+ msec: 6416
+ hash: "caed510a4edc2830f885f9a8ff98c072"
+ }
+ Frame {
+ msec: 6432
+ hash: "2cfba2b8cd1cbc260edf390e17532afa"
+ }
+ Frame {
+ msec: 6448
+ hash: "f1d705e01521261f22b89aeefb146c7a"
+ }
+ Frame {
+ msec: 6464
+ hash: "9508799a0e28e60a65925b7c10fa2874"
+ }
+ Frame {
+ msec: 6480
+ hash: "accdad5176a0cdce92ed07a7ae818a13"
+ }
+ Frame {
+ msec: 6496
+ hash: "2748258d00cf2f0e5f94c94f97ed95ae"
+ }
+ Frame {
+ msec: 6512
+ hash: "994897c0842947675e2e2df4021c1b5e"
+ }
+ Frame {
+ msec: 6528
+ hash: "22936773b2fc5c555f14a8375da2a7a4"
+ }
+ Frame {
+ msec: 6544
+ hash: "22936773b2fc5c555f14a8375da2a7a4"
+ }
+ Frame {
+ msec: 6560
+ hash: "b58badc862e394bf5374554e019f90c0"
+ }
+ Frame {
+ msec: 6576
+ hash: "b58badc862e394bf5374554e019f90c0"
+ }
+ Frame {
+ msec: 6592
+ hash: "b58badc862e394bf5374554e019f90c0"
+ }
+ Frame {
+ msec: 6608
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6624
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6640
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6656
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6672
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6688
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6704
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6720
+ image: "flickable-vertical.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6752
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6768
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 31; y: 575
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6784
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6800
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6816
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6832
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6848
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6864
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 31; y: 575
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6880
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6896
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6912
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6928
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6944
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6960
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6976
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 6992
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7008
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7024
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7040
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7056
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7072
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7088
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7104
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7120
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7136
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7152
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7168
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7184
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7200
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7216
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7232
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7248
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7264
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7280
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 156; y: 403
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7296
+ hash: "843453070c3ac1bf26cfd84d3ab151eb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 156; y: 402
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 158; y: 396
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7312
+ hash: "843453070c3ac1bf26cfd84d3ab151eb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 158; y: 386
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7328
+ hash: "843453070c3ac1bf26cfd84d3ab151eb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 158; y: 376
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 158; y: 360
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7344
+ hash: "843453070c3ac1bf26cfd84d3ab151eb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 158; y: 344
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 160; y: 322
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7360
+ hash: "843453070c3ac1bf26cfd84d3ab151eb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 164; y: 298
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 168; y: 278
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 168; y: 278
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7376
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7392
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7408
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7424
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7440
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7456
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7472
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7488
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7504
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7520
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7536
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7552
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7568
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7584
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7600
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7616
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7632
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7648
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7664
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7680
+ image: "flickable-vertical.7.png"
+ }
+ Frame {
+ msec: 7696
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7712
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7728
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7744
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7760
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7776
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7792
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7808
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 154; y: 161
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7824
+ hash: "16eef219cc7d4e7589ea59ebc349973c"
+ }
+ Frame {
+ msec: 7840
+ hash: "16eef219cc7d4e7589ea59ebc349973c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 154; y: 162
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7856
+ hash: "16eef219cc7d4e7589ea59ebc349973c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 154; y: 164
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 154; y: 167
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7872
+ hash: "16eef219cc7d4e7589ea59ebc349973c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 154; y: 177
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7888
+ hash: "16eef219cc7d4e7589ea59ebc349973c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 150; y: 189
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 146; y: 207
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7904
+ hash: "16eef219cc7d4e7589ea59ebc349973c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 144; y: 229
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 140; y: 255
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7920
+ hash: "16eef219cc7d4e7589ea59ebc349973c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 134; y: 281
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 132; y: 313
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7936
+ hash: "16eef219cc7d4e7589ea59ebc349973c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 128; y: 343
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7952
+ hash: "16eef219cc7d4e7589ea59ebc349973c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 126; y: 373
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 126; y: 397
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 126; y: 397
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7968
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 7984
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8000
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8016
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8032
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8048
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8064
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8080
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8096
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8112
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8128
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8144
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8160
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8176
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8192
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8208
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8224
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8240
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8256
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8272
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8288
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8304
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8320
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8336
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8352
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8368
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8384
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8400
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8416
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8432
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8448
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8464
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8480
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8496
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8512
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8528
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8544
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8560
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8576
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8592
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8608
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8624
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8640
+ image: "flickable-vertical.8.png"
+ }
+ Frame {
+ msec: 8656
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8672
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8688
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8704
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8720
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8736
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8752
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8768
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8784
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8800
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8816
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8832
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8848
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8864
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8880
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8896
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8912
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8928
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8944
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8960
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8976
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 8992
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9008
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9024
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9040
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9056
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9072
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9088
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9104
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 44; y: 574
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9120
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9136
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9152
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 44; y: 574
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9168
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9184
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9200
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9216
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9232
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9248
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9264
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9280
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9296
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9312
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9328
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9344
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9360
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9376
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9392
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9408
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9424
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9440
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9456
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9472
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9488
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9504
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9520
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9536
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9552
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9568
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9584
+ hash: "679369b924d719ae309a45034bdba40d"
+ }
+ Frame {
+ msec: 9600
+ image: "flickable-vertical.9.png"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 152; y: 444
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9616
+ hash: "843453070c3ac1bf26cfd84d3ab151eb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 152; y: 442
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9632
+ hash: "843453070c3ac1bf26cfd84d3ab151eb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 152; y: 440
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 152; y: 438
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9648
+ hash: "843453070c3ac1bf26cfd84d3ab151eb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 154; y: 429
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9664
+ hash: "3b0e0ed925b1c197cd94afd3d1a6d572"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 156; y: 421
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 158; y: 413
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9680
+ hash: "d7b3838ee1219816b76224c29c7ba2e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 160; y: 403
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9696
+ hash: "9835b420f0c40a03f8f9fafe39e209f1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 162; y: 393
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 162; y: 393
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9712
+ hash: "46fb2005a813fc2c278f1bfe83801c0e"
+ }
+ Frame {
+ msec: 9728
+ hash: "81dd9308e475548db21474c37cb9a5b0"
+ }
+ Frame {
+ msec: 9744
+ hash: "10043d74eef240abd2360d45845dd51e"
+ }
+ Frame {
+ msec: 9760
+ hash: "0f83b8f23ba42b22c10a2b68227db64e"
+ }
+ Frame {
+ msec: 9776
+ hash: "7a296e3702c9fef25cb53ac04053853b"
+ }
+ Frame {
+ msec: 9792
+ hash: "ae439daa32f76a368ab314c86c55a378"
+ }
+ Frame {
+ msec: 9808
+ hash: "42ac3503dfa462bf0b5d8c15f6f3b143"
+ }
+ Frame {
+ msec: 9824
+ hash: "b8bb92eb2de7ca0f5924b09f380f47db"
+ }
+ Frame {
+ msec: 9840
+ hash: "994e314d2d38005b6006e81468f10efa"
+ }
+ Frame {
+ msec: 9856
+ hash: "be6a32f3c82aeccebc7778ff5646637f"
+ }
+ Frame {
+ msec: 9872
+ hash: "2fb196f53d5e785e04a14d98d9dab8a1"
+ }
+ Frame {
+ msec: 9888
+ hash: "0926f8209f4f35f6e6fa92935d7408e4"
+ }
+ Frame {
+ msec: 9904
+ hash: "780450301d37ea2b94eb9386e7e5294c"
+ }
+ Frame {
+ msec: 9920
+ hash: "cd4e9629c767813c9a2a2fa30dc5114b"
+ }
+ Frame {
+ msec: 9936
+ hash: "409630d7b9c3c4231bccf74f7453f0af"
+ }
+ Frame {
+ msec: 9952
+ hash: "4c98e619b487d67d114ed0d7800f157e"
+ }
+ Frame {
+ msec: 9968
+ hash: "0a8157dc45764ab8e0e0b89e5c73a76b"
+ }
+ Frame {
+ msec: 9984
+ hash: "ecfc611b58e000df9f608c8889a2a84f"
+ }
+ Frame {
+ msec: 10000
+ hash: "5c6bc246446c75d57bcd40e86041892b"
+ }
+ Frame {
+ msec: 10016
+ hash: "fe1a3e688da126861b29a94b676b68f7"
+ }
+ Frame {
+ msec: 10032
+ hash: "f5feef892bf013916bacb63ff6460cb7"
+ }
+ Frame {
+ msec: 10048
+ hash: "665018efd991cab3acb4b80005fc2bd3"
+ }
+ Frame {
+ msec: 10064
+ hash: "bc7614e4a0e0724a9cb0981f09f8a7f6"
+ }
+ Frame {
+ msec: 10080
+ hash: "463a6da452a5a6267240992ad5284e89"
+ }
+ Frame {
+ msec: 10096
+ hash: "eca3f146e0143856f58b4f7aee42e6f8"
+ }
+ Frame {
+ msec: 10112
+ hash: "dec9b9845509c4d28d7faae043b292d1"
+ }
+ Frame {
+ msec: 10128
+ hash: "49452842cb2429cd465e40478638e0e3"
+ }
+ Frame {
+ msec: 10144
+ hash: "a7029d0090d3620ee21b9e3d55eefe78"
+ }
+ Frame {
+ msec: 10160
+ hash: "1041b18d422acba0b9a45ca89856e493"
+ }
+ Frame {
+ msec: 10176
+ hash: "d53038b688b920715b196dd4cc2b2587"
+ }
+ Frame {
+ msec: 10192
+ hash: "da59ffebb491ab5fa98429117c3bb8ac"
+ }
+ Frame {
+ msec: 10208
+ hash: "602269f78eaf0df36c66de72e005989a"
+ }
+ Frame {
+ msec: 10224
+ hash: "a311b6b35feb4096b0d01753a6695210"
+ }
+ Frame {
+ msec: 10240
+ hash: "cd303e8850c6aac58fcf2a98db418f1b"
+ }
+ Frame {
+ msec: 10256
+ hash: "6e9132dd840a136cc688676bce7640de"
+ }
+ Frame {
+ msec: 10272
+ hash: "a3818492bb4ebd91ce86675d34731c58"
+ }
+ Frame {
+ msec: 10288
+ hash: "b85a127895713234028641787312b717"
+ }
+ Frame {
+ msec: 10304
+ hash: "a030dc1543e84d8a0ec9f77fd6325060"
+ }
+ Frame {
+ msec: 10320
+ hash: "669cd28abe17d419e9cabe4d796a38c3"
+ }
+ Frame {
+ msec: 10336
+ hash: "bfdd15cf058050203561b5f935106263"
+ }
+ Frame {
+ msec: 10352
+ hash: "a39abc94fee93175a6a37b402750e4f7"
+ }
+ Frame {
+ msec: 10368
+ hash: "0c65e19e12d95ec8ee253219b0c3e472"
+ }
+ Frame {
+ msec: 10384
+ hash: "15debc234e70765a4510bfbda886a2c9"
+ }
+ Frame {
+ msec: 10400
+ hash: "9566a87437cb6e9025f9a3881a620823"
+ }
+ Frame {
+ msec: 10416
+ hash: "b66d89244cba537a21901dcb11387bf7"
+ }
+ Frame {
+ msec: 10432
+ hash: "03347ce314393bd84873026cd01c562f"
+ }
+ Frame {
+ msec: 10448
+ hash: "458fab2449dba089ae6f1e78a230564b"
+ }
+ Frame {
+ msec: 10464
+ hash: "7115f27574bfc68ff58a2e4fb65107dd"
+ }
+ Frame {
+ msec: 10480
+ hash: "66260c030dddda4b086bc98982a11934"
+ }
+ Frame {
+ msec: 10496
+ hash: "d5790ee5eb8ecf249cb1dcf58aefa4ee"
+ }
+ Frame {
+ msec: 10512
+ hash: "6bec07ba1e2ac637aab7a9038cbacc93"
+ }
+ Frame {
+ msec: 10528
+ hash: "a72f36cc18c8620a2bd85bac49f6771a"
+ }
+ Frame {
+ msec: 10544
+ hash: "65b178ae559ab0ba9c568718f287ff68"
+ }
+ Frame {
+ msec: 10560
+ image: "flickable-vertical.10.png"
+ }
+ Frame {
+ msec: 10576
+ hash: "b35a8e33f876921d477809b5adb7a201"
+ }
+ Frame {
+ msec: 10592
+ hash: "057b69ef8137f38c596432da547f1ead"
+ }
+ Frame {
+ msec: 10608
+ hash: "62f76f46857106010c2e862ed19baeea"
+ }
+ Frame {
+ msec: 10624
+ hash: "fbfc73e1b20b79d71953c298ca095047"
+ }
+ Frame {
+ msec: 10640
+ hash: "aea78988f875083660dd46d6afc71683"
+ }
+ Frame {
+ msec: 10656
+ hash: "60d8decd7ded420433256a94f1bf954f"
+ }
+ Frame {
+ msec: 10672
+ hash: "221f72cdf18e0b33e7f6a65356fcc61b"
+ }
+ Frame {
+ msec: 10688
+ hash: "221f72cdf18e0b33e7f6a65356fcc61b"
+ }
+ Frame {
+ msec: 10704
+ hash: "c2eac9c0d84c6b2f133d8751ac5f265f"
+ }
+ Frame {
+ msec: 10720
+ hash: "c2eac9c0d84c6b2f133d8751ac5f265f"
+ }
+ Frame {
+ msec: 10736
+ hash: "c2eac9c0d84c6b2f133d8751ac5f265f"
+ }
+ Frame {
+ msec: 10752
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 10768
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 10784
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 10800
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 10816
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 10832
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 10848
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 10864
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 10880
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 98; y: 573
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10896
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 10912
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 10928
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 10944
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 10960
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 98; y: 573
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10976
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 10992
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11008
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11024
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11040
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11056
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11072
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11088
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11104
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11120
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11136
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11152
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11168
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11184
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11200
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11216
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11232
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11248
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11264
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11280
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11296
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11312
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11328
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11344
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11360
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11376
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11392
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11408
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11424
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11440
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11456
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11472
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11488
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11504
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11520
+ image: "flickable-vertical.11.png"
+ }
+ Frame {
+ msec: 11536
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11552
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11568
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11584
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11600
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11616
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11632
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11648
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11664
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11680
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11696
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11712
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11728
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 170; y: 335
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11744
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Frame {
+ msec: 11760
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 170; y: 336
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 170; y: 338
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11776
+ hash: "28a06534a2e35250c67112dfb6c05095"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 170; y: 346
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11792
+ hash: "12040d4dd56848fc93d6390005045188"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 170; y: 359
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11808
+ hash: "caa70db5f31eb607c2de39734a42796c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 168; y: 367
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 166; y: 379
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11824
+ hash: "ca45ab832b5a8b041ba8bea1185a2b38"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 166; y: 393
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 164; y: 407
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11840
+ hash: "188042b1a045dc96a65a7fc0e90568c3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 164; y: 419
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11856
+ hash: "714a3cf591beeeddbdc2df94f5cedef1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 164; y: 443
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11872
+ hash: "e9978c24eef649d01cb2245f783cb562"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 164; y: 461
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11888
+ hash: "bc8f32062afdfe33da7c99ee867bc2a3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 166; y: 467
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11904
+ hash: "d788c09f4acba8197b2d8fef2e8ece51"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 168; y: 470
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11920
+ hash: "b0a383eb416727c22451a30a997f48f1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 169; y: 472
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11936
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 11952
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 11968
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 11984
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12000
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12016
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12032
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12048
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12064
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 169; y: 472
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12080
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12096
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12112
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12128
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12144
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12160
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12176
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12192
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12208
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12224
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12240
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12256
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12272
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12288
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12304
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12320
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12336
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12352
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12368
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12384
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12400
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12416
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Frame {
+ msec: 12432
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 171; y: 452
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12448
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 172; y: 450
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 173; y: 448
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12464
+ hash: "6b81b365eb057ffa32d89e564bc92949"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 175; y: 434
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12480
+ image: "flickable-vertical.12.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 175; y: 431
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 177; y: 423
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12496
+ hash: "7e760a017ab10fe920074405248d1473"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 177; y: 415
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12512
+ hash: "eab43f1c2b6fb79aad578a164b8b7b28"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 181; y: 395
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 183; y: 383
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12528
+ hash: "a5446ca4c6650ffc9812845bdb8db088"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 185; y: 371
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12544
+ hash: "71cb7dc7f9dbb9e17d7f44885ec71bdb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 357
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12560
+ hash: "ccf0908d968f658311a9787182de498a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 329
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12576
+ hash: "26b9c6379590bbda24d129bd4f19f7d3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 303
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 293
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12592
+ hash: "6c88a02ffdffee6d615ddc6a11c1b698"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 283
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12608
+ hash: "38175cb09b6e63353b478635b22dbb5b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 280
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 277
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12624
+ hash: "5084910bf204e8b688de31d4f9018a57"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 275
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 273
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12640
+ hash: "e984565312571ec144a1cd4cc11253e8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 272
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 271
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12656
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12672
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12688
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12704
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12720
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12736
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12752
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12768
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 187; y: 271
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12784
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12800
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12816
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12832
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12848
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12864
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12880
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12896
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12912
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12928
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12944
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12960
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12976
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 12992
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 13008
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13024
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13040
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13056
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13072
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13088
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13104
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13120
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13136
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13152
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13168
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13184
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13200
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13216
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13232
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13248
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13264
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13280
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13296
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13312
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13328
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13344
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 181; y: 242
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 13360
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13376
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13392
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13408
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13424
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 181; y: 242
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 13440
+ image: "flickable-vertical.13.png"
+ }
+ Frame {
+ msec: 13456
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13472
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13488
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13504
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13520
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13536
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13552
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13568
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13584
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13600
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13616
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13632
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13648
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13664
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13680
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13696
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13712
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13728
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13744
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13760
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13776
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13792
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13808
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13824
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13840
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13856
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13872
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13888
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13904
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13920
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13936
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 181; y: 242
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 13952
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13968
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 13984
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 14000
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 14016
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 14032
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 14048
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 14064
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 14080
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 14096
+ hash: "4b86de37ae9bc630a2f3440811087617"
+ }
+ Frame {
+ msec: 14112
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14128
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14144
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14160
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14176
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14192
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14208
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14224
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14240
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14256
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14272
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14288
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14304
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14320
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14336
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14352
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14368
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14384
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14400
+ image: "flickable-vertical.14.png"
+ }
+ Frame {
+ msec: 14416
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14432
+ hash: "d96fb1b387b34f41f80e98c1feb05303"
+ }
+ Frame {
+ msec: 14448
+ hash: "ecd5db8e582e6d2e15943ffd9fcb32a7"
+ }
+ Frame {
+ msec: 14464
+ hash: "ecd5db8e582e6d2e15943ffd9fcb32a7"
+ }
+ Frame {
+ msec: 14480
+ hash: "ecd5db8e582e6d2e15943ffd9fcb32a7"
+ }
+ Frame {
+ msec: 14496
+ hash: "ecd5db8e582e6d2e15943ffd9fcb32a7"
+ }
+ Frame {
+ msec: 14512
+ hash: "ecd5db8e582e6d2e15943ffd9fcb32a7"
+ }
+ Frame {
+ msec: 14528
+ hash: "ecd5db8e582e6d2e15943ffd9fcb32a7"
+ }
+ Frame {
+ msec: 14544
+ hash: "ecd5db8e582e6d2e15943ffd9fcb32a7"
+ }
+ Frame {
+ msec: 14560
+ hash: "ecd5db8e582e6d2e15943ffd9fcb32a7"
+ }
+ Frame {
+ msec: 14576
+ hash: "ecd5db8e582e6d2e15943ffd9fcb32a7"
+ }
+ Frame {
+ msec: 14592
+ hash: "ecd5db8e582e6d2e15943ffd9fcb32a7"
+ }
+ Frame {
+ msec: 14608
+ hash: "ecd5db8e582e6d2e15943ffd9fcb32a7"
+ }
+ Frame {
+ msec: 14624
+ hash: "ecd5db8e582e6d2e15943ffd9fcb32a7"
+ }
+ Frame {
+ msec: 14640
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14656
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14672
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14688
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14704
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14720
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14736
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14752
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14768
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14784
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14800
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14816
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14832
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14848
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14864
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14880
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14896
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14912
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14928
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14944
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14960
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14976
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 14992
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 15008
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 15024
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 15040
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 181; y: 242
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 15056
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15072
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15088
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15104
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15120
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15136
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15152
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15168
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15184
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15200
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15216
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15232
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15248
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15264
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15280
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15296
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15312
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15328
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15344
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15360
+ image: "flickable-vertical.15.png"
+ }
+ Frame {
+ msec: 15376
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15392
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15408
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15424
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15440
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15456
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15472
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15488
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15504
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15520
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15536
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15552
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15568
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15584
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15600
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15616
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15632
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15648
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15664
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15680
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15696
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15712
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 192; y: 218
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 15728
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15744
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15760
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15776
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15792
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15808
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15824
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15840
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15856
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15872
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15888
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15904
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15920
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15936
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15952
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15968
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 15984
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 16000
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 16016
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 16032
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 16048
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 16064
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 16080
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 16096
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 16112
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 16128
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 16144
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 16160
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 16176
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 16192
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 16208
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 16224
+ hash: "e3069d9d3cbcd845b1e4763b0759dc38"
+ }
+ Frame {
+ msec: 16240
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16256
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16272
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16288
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16304
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16320
+ image: "flickable-vertical.16.png"
+ }
+ Frame {
+ msec: 16336
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16352
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16368
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16384
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16400
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16416
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16432
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16448
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16464
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16480
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16496
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16512
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16528
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16544
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16560
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16576
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16592
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16608
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16624
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16640
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Frame {
+ msec: 16656
+ hash: "53a0e69fe4816e6eed0b4e795bf90e19"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 222
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 224
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 16672
+ hash: "c30bea2a73a8b5af4565ef3996f29416"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 228
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 230
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 16688
+ hash: "9612c176ec3ecf76a367728f451522a4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 233
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 16704
+ hash: "24f6feeeb1ff82c8d4262f74e4656602"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 238
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 16720
+ hash: "5823b56f1e362fdfc216a82e2dcdec61"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 241
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 16736
+ hash: "4ee243b91e847dabaceb21b5540c2a6d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 245
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 16752
+ hash: "87f1dc2238577fc5be6b1bd941226f3e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 251
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 16768
+ hash: "480c6fcf1b3862a41a7225c35d8080c3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 256
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 16784
+ hash: "0ac819bd8e6ce19553bd954e466e7ac0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 199; y: 258
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 16800
+ hash: "0636dd7c4eb0b56697fb59fb46f47f9c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 201; y: 267
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 16816
+ hash: "62f76f46857106010c2e862ed19baeea"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 276
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 16832
+ hash: "26b9c6379590bbda24d129bd4f19f7d3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 279
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 280
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 16848
+ hash: "21baf0596553627c8e683a31c2e6d04f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 281
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 282
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 16864
+ hash: "036679da5def5e696361f2373172a3f4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 283
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 16880
+ hash: "e3fc6101bc6cccf309b3df6b194820ea"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 285
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 16896
+ hash: "d9ee6d0a7455cfd724c1856549100756"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 286
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 16912
+ hash: "caa70db5f31eb607c2de39734a42796c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 287
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 16928
+ hash: "e2dc88b454e69cf92d6887a2f0629a94"
+ }
+ Frame {
+ msec: 16944
+ hash: "e2dc88b454e69cf92d6887a2f0629a94"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 288
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 16960
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 16976
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 16992
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17008
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17024
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17040
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17056
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17072
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17088
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 203; y: 288
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 17104
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17120
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17136
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17152
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17168
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17184
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17200
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17216
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17232
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17248
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17264
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17280
+ image: "flickable-vertical.17.png"
+ }
+ Frame {
+ msec: 17296
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17312
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17328
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17344
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17360
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17376
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17392
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17408
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17424
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17440
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17456
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17472
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17488
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17504
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17520
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17536
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17552
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17568
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17584
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17600
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17616
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17632
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17648
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17664
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17680
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17696
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17712
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17728
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17744
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17760
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17776
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17792
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17808
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17824
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17840
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17856
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17872
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17888
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17904
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17920
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17936
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17952
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17968
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 17984
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18000
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18016
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18032
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18048
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18064
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18080
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18096
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18112
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18128
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18144
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18160
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18176
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18192
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18208
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18224
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18240
+ image: "flickable-vertical.18.png"
+ }
+ Frame {
+ msec: 18256
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18272
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18288
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18304
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18320
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18336
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18352
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18368
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18384
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18400
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18416
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18432
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18448
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 102; y: 575
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 18464
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18480
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18496
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 102; y: 575
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 18512
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18528
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18544
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18560
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18576
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18592
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18608
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18624
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18640
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18656
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18672
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18688
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18704
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18720
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18736
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18752
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18768
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18784
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18800
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18816
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18832
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18848
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18864
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18880
+ hash: "fac8455a2707b04aabff25723375a78b"
+ }
+ Frame {
+ msec: 18896
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 18912
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 18928
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 18944
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 18960
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 18976
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 18992
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19008
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19024
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19040
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19056
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19072
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19088
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19104
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19120
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19136
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19152
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19168
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19184
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19200
+ image: "flickable-vertical.19.png"
+ }
+ Frame {
+ msec: 19216
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19232
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19248
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19264
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 164; y: 571
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 19280
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19296
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19312
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19328
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 164; y: 571
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 19344
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19360
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19376
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19392
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19408
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19424
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19440
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19456
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19472
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19488
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19504
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19520
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19536
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19552
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19568
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19584
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19600
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19616
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19632
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19648
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19664
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19680
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19696
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19712
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19728
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19744
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19760
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19776
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19792
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19808
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19824
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19840
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19856
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19872
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19888
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19904
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19920
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19936
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19952
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19968
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 19984
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 20000
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 20016
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 20032
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 20048
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 20064
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 20080
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 20096
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 20112
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 20128
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 20144
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 20160
+ image: "flickable-vertical.20.png"
+ }
+ Frame {
+ msec: 20176
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 20192
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 20208
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Frame {
+ msec: 20224
+ hash: "cce4177eb20b7aa43a7383a16c43f473"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 170; y: 450
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 20240
+ hash: "b8e7a053fc023be42ab5136f6e7305fd"
+ }
+ Frame {
+ msec: 20256
+ hash: "b8e7a053fc023be42ab5136f6e7305fd"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 170; y: 448
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 20272
+ hash: "b8e7a053fc023be42ab5136f6e7305fd"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 172; y: 438
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 20288
+ hash: "40cf6e4567c796d6ad83778fb1959d8a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 176; y: 410
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 20304
+ hash: "9914584daf02407c1edc3b6a38b8302d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 176; y: 388
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 176; y: 366
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 20320
+ hash: "5aff2316a5e34f5e15b7cb36257a3d72"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 176; y: 342
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 176; y: 342
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 20336
+ hash: "de1f9ff1abfa8cdc760bc84129fab40d"
+ }
+ Frame {
+ msec: 20352
+ hash: "032c4fd62a0a611207262d317d4ea103"
+ }
+ Frame {
+ msec: 20368
+ hash: "1db8a7b3899f5efea25ccf93285ee6bd"
+ }
+ Frame {
+ msec: 20384
+ hash: "3c106f68b755862346cddd21d75c0caf"
+ }
+ Frame {
+ msec: 20400
+ hash: "41d025dfe037b9cebe84e4c7200e9d15"
+ }
+ Frame {
+ msec: 20416
+ hash: "f347687313c88150a6f977ae8b1620fc"
+ }
+ Frame {
+ msec: 20432
+ hash: "4bb30faaec54e2a47dfd2b2988a6c231"
+ }
+ Frame {
+ msec: 20448
+ hash: "fede02600e790d4b6eb1f85563b37cbc"
+ }
+ Frame {
+ msec: 20464
+ hash: "0a949f7150b3709b9eda62c98f98fc62"
+ }
+ Frame {
+ msec: 20480
+ hash: "214e571c2346b0d6b5d1220e856a8e67"
+ }
+ Frame {
+ msec: 20496
+ hash: "f84207d20cfff984d1c79654a1074d02"
+ }
+ Frame {
+ msec: 20512
+ hash: "7dc3592294dcd88fbfff2f984fd2d4c3"
+ }
+ Frame {
+ msec: 20528
+ hash: "42829e78f62e692a093df267d2b673e2"
+ }
+ Frame {
+ msec: 20544
+ hash: "d264570c78e7d1ea283c72191953a2ce"
+ }
+ Frame {
+ msec: 20560
+ hash: "b69b045557a8eada80a24eb4caa7ea4e"
+ }
+ Frame {
+ msec: 20576
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20592
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20608
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20624
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20640
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20656
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20672
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20688
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20704
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20720
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20736
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20752
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20768
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20784
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20800
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20816
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20832
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20848
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20864
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20880
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20896
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20912
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20928
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20944
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20960
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20976
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 20992
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21008
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21024
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21040
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21056
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21072
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21088
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21104
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21120
+ image: "flickable-vertical.21.png"
+ }
+ Frame {
+ msec: 21136
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21152
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21168
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21184
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21200
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21216
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21232
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21248
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21264
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21280
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21296
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21312
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21328
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21344
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21360
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21376
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21392
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21408
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21424
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21440
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21456
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21472
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21488
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21504
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21520
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21536
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21552
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21568
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Frame {
+ msec: 21584
+ hash: "a76f069dfcb1af0794999c34507e190e"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 197; y: 124
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 197; y: 132
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 21600
+ hash: "06472b42bc00fcaf7f84cd4ac613bbd2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 197; y: 146
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 197; y: 164
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 21616
+ hash: "463fce69afc3dec181425c9adaa3e77c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 197; y: 190
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 195; y: 218
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 21632
+ hash: "9af34ff618e277eafad32e0377ecc94b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 250
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 21648
+ hash: "db4b2333630ccc4a7982361609a12837"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 183; y: 284
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 183; y: 284
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 21664
+ hash: "50335b19a1e210f87924d01bb343a0e0"
+ }
+ Frame {
+ msec: 21680
+ hash: "59b4f80a7cd6b732eb26f3b4147efe7e"
+ }
+ Frame {
+ msec: 21696
+ hash: "b99cc1f07bcb0480801d4d5403372525"
+ }
+ Frame {
+ msec: 21712
+ hash: "871040b0f921646609b79828bab38949"
+ }
+ Frame {
+ msec: 21728
+ hash: "2acb3d19eed000313872d5cd66765b53"
+ }
+ Frame {
+ msec: 21744
+ hash: "b5431a2d2e856a726ceac2066b128f8f"
+ }
+ Frame {
+ msec: 21760
+ hash: "04047c917a95a2a3df30c14bb20601dd"
+ }
+ Frame {
+ msec: 21776
+ hash: "fea7ac3d26975f438129e394c667e628"
+ }
+ Frame {
+ msec: 21792
+ hash: "4db41ff05865cabc4ef288478254e633"
+ }
+ Frame {
+ msec: 21808
+ hash: "e0d3737effd817a8f603eb393677b8b6"
+ }
+ Frame {
+ msec: 21824
+ hash: "d4f06941d213544ddcae714ddc0b47e9"
+ }
+ Frame {
+ msec: 21840
+ hash: "dbb21caf4a4c9b88563f1d0aad35f3d3"
+ }
+ Frame {
+ msec: 21856
+ hash: "eb9a052219c3f955f2c036834990089b"
+ }
+ Frame {
+ msec: 21872
+ hash: "40090a35caf674ed9c4bf1d10f9209ea"
+ }
+ Frame {
+ msec: 21888
+ hash: "064de0abec66d1ddcf0f6073ce7d91ef"
+ }
+ Frame {
+ msec: 21904
+ hash: "f407334d0b63a34657dc1306fd67aeb7"
+ }
+ Frame {
+ msec: 21920
+ hash: "1c0744be97c65c68ca92bd86d42c7b0e"
+ }
+ Frame {
+ msec: 21936
+ hash: "7469d4a06c5df073e22db3c905baefc1"
+ }
+ Frame {
+ msec: 21952
+ hash: "35912a7e2ecc0c387fc9fb9da7201bfd"
+ }
+ Frame {
+ msec: 21968
+ hash: "9f835091374f0d0d9a6996e6dad10e19"
+ }
+ Frame {
+ msec: 21984
+ hash: "afade1ecbaf5f920880eaff3b3de606e"
+ }
+ Frame {
+ msec: 22000
+ hash: "9c70e8a020c8c1101b9884529cb4527f"
+ }
+ Frame {
+ msec: 22016
+ hash: "3e7d4dc75f85dfeb065da18ef1c102c1"
+ }
+ Frame {
+ msec: 22032
+ hash: "16852d62a77eefccea9497ae1b09842d"
+ }
+ Frame {
+ msec: 22048
+ hash: "ea8afda6d837a98f408a7aa133494575"
+ }
+ Frame {
+ msec: 22064
+ hash: "666435dccf30c53eb09ea7ad8b5264a1"
+ }
+ Frame {
+ msec: 22080
+ image: "flickable-vertical.22.png"
+ }
+ Frame {
+ msec: 22096
+ hash: "2e959bf0470bac84e2220d9e8a8bbb97"
+ }
+ Frame {
+ msec: 22112
+ hash: "595b6cfd559f8362b010616de4947ec6"
+ }
+ Frame {
+ msec: 22128
+ hash: "976dd345cc7cb4e3c09a288530d3c8af"
+ }
+ Frame {
+ msec: 22144
+ hash: "9493e425d5cd3f9eef904a1be63f45f1"
+ }
+ Frame {
+ msec: 22160
+ hash: "0a2013afebb5e09d82633c8d8a393f01"
+ }
+ Frame {
+ msec: 22176
+ hash: "d8377c464bc59d95e0670d697888d804"
+ }
+ Frame {
+ msec: 22192
+ hash: "52f9416973da953bd6fe55b2fe22786a"
+ }
+ Frame {
+ msec: 22208
+ hash: "23b9af0f371b7817e9ceaa1a83995d35"
+ }
+ Frame {
+ msec: 22224
+ hash: "34b0e0333c91bc4533e0c01eaeb3d3f9"
+ }
+ Frame {
+ msec: 22240
+ hash: "1597b86afe2841c3bb77bb5dd6aa6803"
+ }
+ Frame {
+ msec: 22256
+ hash: "d74111814ff259fea47e1eb3b36e174b"
+ }
+ Frame {
+ msec: 22272
+ hash: "c64c46fe9cd75afbf2385241ea8e55d4"
+ }
+ Frame {
+ msec: 22288
+ hash: "1e8740a104643fe30b0e874bbbed44ab"
+ }
+ Frame {
+ msec: 22304
+ hash: "ef669a8d142947463084383a6c7c7f85"
+ }
+ Frame {
+ msec: 22320
+ hash: "2314c42b5994bdbfd73eb2c3ea54626b"
+ }
+ Frame {
+ msec: 22336
+ hash: "53a0694d8eee91b968bd43efe43f2c9e"
+ }
+ Frame {
+ msec: 22352
+ hash: "be4772528f30c18193e49ae04a290af8"
+ }
+ Frame {
+ msec: 22368
+ hash: "a0b0877ab92a0323e35fdb7beb602dee"
+ }
+ Frame {
+ msec: 22384
+ hash: "a0e299fb4ba811a0b22fb62c222cb86c"
+ }
+ Frame {
+ msec: 22400
+ hash: "2562bc9c9aa60a48b6ca00333f60d163"
+ }
+ Frame {
+ msec: 22416
+ hash: "486b45c385d88d6f054fa6308b55f2ac"
+ }
+ Frame {
+ msec: 22432
+ hash: "86502af668ed6336dce8fe329e3408a6"
+ }
+ Frame {
+ msec: 22448
+ hash: "2a79a6530a07f00810310117d00d28ed"
+ }
+ Frame {
+ msec: 22464
+ hash: "94a5fce3e0c3b219e0d807bfcade11e8"
+ }
+ Frame {
+ msec: 22480
+ hash: "94a5fce3e0c3b219e0d807bfcade11e8"
+ }
+ Frame {
+ msec: 22496
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22512
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22528
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22544
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22560
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22576
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22592
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22608
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22624
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22640
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22656
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22672
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22688
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22704
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22720
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22736
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22752
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22768
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22784
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22800
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22816
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22832
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22848
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22864
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22880
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22896
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22912
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22928
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22944
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22960
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22976
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 22992
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 23008
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 23024
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 23040
+ image: "flickable-vertical.23.png"
+ }
+ Frame {
+ msec: 23056
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 23072
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 23088
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 23104
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 23120
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 23136
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 23152
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 23168
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 23184
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 23200
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 23216
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 23232
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 23248
+ hash: "8443c45791c906a9fe23831844f48a1c"
+ }
+ Frame {
+ msec: 23264
+ hash: "8443c45791c906a9fe23831844f48a1c
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/flickable-horizontal.qml b/tests/auto/declarative/visual/qdeclarativeflickable/flickable-horizontal.qml
new file mode 100644
index 0000000000..50ba9ad962
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/flickable-horizontal.qml
@@ -0,0 +1,37 @@
+import Qt 4.6
+
+Rectangle {
+ color: "lightSteelBlue"
+ width: 600; height: 300
+
+ ListModel {
+ id: list
+ ListElement { dayColor: "steelblue" }
+ ListElement { dayColor: "blue" }
+ ListElement { dayColor: "yellow" }
+ ListElement { dayColor: "purple" }
+ ListElement { dayColor: "red" }
+ ListElement { dayColor: "green" }
+ ListElement { dayColor: "orange" }
+ }
+
+ Flickable {
+ id: flickable
+ anchors.fill: parent; contentWidth: row.width
+
+ Row {
+ id: row
+ Repeater {
+ model: list
+ Rectangle { width: 200; height: 300; color: dayColor }
+ }
+ }
+ }
+ Rectangle {
+ radius: 3
+ y: flickable.height-8
+ height: 8
+ x: flickable.visibleArea.xPosition * flickable.width
+ width: flickable.visibleArea.widthRatio * flickable.width
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativeflickable/flickable-vertical.qml b/tests/auto/declarative/visual/qdeclarativeflickable/flickable-vertical.qml
new file mode 100644
index 0000000000..ebb963dc6a
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflickable/flickable-vertical.qml
@@ -0,0 +1,91 @@
+import Qt 4.6
+
+Rectangle {
+ color: "lightSteelBlue"
+ width: 300; height: 600
+
+ ListModel {
+ id: list
+ ListElement { dayColor: "steelblue" }
+ ListElement { dayColor: "blue" }
+ ListElement { dayColor: "yellow" }
+ ListElement { dayColor: "purple" }
+ ListElement { dayColor: "red" }
+ ListElement { dayColor: "green" }
+ ListElement { dayColor: "orange" }
+ }
+
+ flickable {
+ id: flick
+ height: parent.height-50
+ width: parent.width; contentHeight: column.height
+
+ Column {
+ id: column
+ Repeater {
+ model: list
+ Rectangle { width: 300; height: 200; color: mr.pressed ? "black" : dayColor
+ MouseArea {
+ id: mr
+ anchors.fill: parent
+ }
+ }
+ }
+ }
+ clip: true
+ reportedVelocitySmoothing: 1000
+ }
+ Rectangle {
+ radius: 3
+ x: flick.width-8
+ width: 8
+ y: flick.visibleArea.yPosition * flick.height
+ height: flick.visibleArea.heightRatio * flick.height
+ }
+
+ // click to toggle interactive flag
+ Rectangle {
+ width: 64
+ height: 48
+ y: parent.height - 50
+ color: "red"
+ MouseArea {
+ anchors.fill: parent
+ onClicked: flick.interactive = flick.interactive ? false : true
+ }
+ }
+
+ // click to toggle click delay
+ Rectangle {
+ width: 64
+ height: 48
+ x: 66
+ y: parent.height - 50
+ color: "green"
+ MouseArea {
+ anchors.fill: parent
+ onClicked: flick.pressDelay = flick.pressDelay > 0 ? 0 : 500
+ }
+ }
+
+ // click to toggle overshoot
+ Rectangle {
+ width: 64
+ height: 48
+ x: 130
+ y: parent.height - 50
+ color: "yellow"
+ MouseArea {
+ anchors.fill: parent
+ onClicked: flick.overShoot = flick.overShoot > 0 ? 0 : 30
+ }
+ }
+
+ Rectangle {
+ width: Math.abs(flick.verticalVelocity)/100
+ height: 50
+ x: 200
+ y: parent.height - 50
+ color: blue
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.0.png b/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.0.png
new file mode 100644
index 0000000000..53a8b42a00
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.1.png b/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.1.png
new file mode 100644
index 0000000000..b7efe8c3e2
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.2.png b/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.2.png
new file mode 100644
index 0000000000..aa6d14771a
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.3.png b/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.3.png
new file mode 100644
index 0000000000..9d3971335e
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.4.png b/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.4.png
new file mode 100644
index 0000000000..98e8817699
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.5.png b/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.5.png
new file mode 100644
index 0000000000..a3f9d8f45b
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.qml b/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.qml
new file mode 100644
index 0000000000..520d9a26db
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflipable/data/test-flipable.qml
@@ -0,0 +1,1623 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "7e16e6360fc2e9db67dbf11d58042745"
+ }
+ Frame {
+ msec: 32
+ hash: "7e16e6360fc2e9db67dbf11d58042745"
+ }
+ Frame {
+ msec: 48
+ hash: "7e16e6360fc2e9db67dbf11d58042745"
+ }
+ Frame {
+ msec: 64
+ hash: "06d7f0befa7e06972983ffe87c162750"
+ }
+ Frame {
+ msec: 80
+ hash: "51dff66a7767e3464fda60f2cf906700"
+ }
+ Frame {
+ msec: 96
+ hash: "f8038dc4b67b92ef776a97589240e8c5"
+ }
+ Frame {
+ msec: 112
+ hash: "692931f1db6ddf0b37eb64026ca830f8"
+ }
+ Frame {
+ msec: 128
+ hash: "f01b7368e42381dda5eadf56482ea993"
+ }
+ Frame {
+ msec: 144
+ hash: "9811f823e057882d384f36d7227fa12e"
+ }
+ Frame {
+ msec: 160
+ hash: "9b40b6c75af876567ff49688bc710f2a"
+ }
+ Frame {
+ msec: 176
+ hash: "e97a5d968da37789c28816608fa262a1"
+ }
+ Frame {
+ msec: 192
+ hash: "2cd0627fdc63bb91f8dcac789d7a93b2"
+ }
+ Frame {
+ msec: 208
+ hash: "ae2407f8da9a047d2725bcdcf8e568b2"
+ }
+ Frame {
+ msec: 224
+ hash: "da2a1e5e988c27577ceb453cb0383703"
+ }
+ Frame {
+ msec: 240
+ hash: "90fb4e4ba04ac32b52c10b3258431c04"
+ }
+ Frame {
+ msec: 256
+ hash: "90fb4e4ba04ac32b52c10b3258431c04"
+ }
+ Frame {
+ msec: 272
+ hash: "90fb4e4ba04ac32b52c10b3258431c04"
+ }
+ Frame {
+ msec: 288
+ hash: "73c06997014af4e008b546b53fe349fb"
+ }
+ Frame {
+ msec: 304
+ hash: "262404c6e55b93c4ab940582a49f7e18"
+ }
+ Frame {
+ msec: 320
+ hash: "451a9408b04826ab35749d9120efd6bb"
+ }
+ Frame {
+ msec: 336
+ hash: "451a9408b04826ab35749d9120efd6bb"
+ }
+ Frame {
+ msec: 352
+ hash: "2d112d040fd425c59b511066737e494d"
+ }
+ Frame {
+ msec: 368
+ hash: "769d2724656dbf0e793ecd8e42db3de2"
+ }
+ Frame {
+ msec: 384
+ hash: "9e375cb3815723a2c5dda39c79325e96"
+ }
+ Frame {
+ msec: 400
+ hash: "b21e92871bf63873b8ae48a2aff47be5"
+ }
+ Frame {
+ msec: 416
+ hash: "00d08f4257f35c6236cde0597b0005e4"
+ }
+ Frame {
+ msec: 432
+ hash: "8048f84221a02e7102cf3272445862a1"
+ }
+ Frame {
+ msec: 448
+ hash: "f0d7b45f0b01319494616c1893aa940e"
+ }
+ Frame {
+ msec: 464
+ hash: "457fad89140a1dda9e70549d451482e9"
+ }
+ Frame {
+ msec: 480
+ hash: "ee0feb79e843cdb2adea72fa37ecab67"
+ }
+ Frame {
+ msec: 496
+ hash: "ece02d3590147884e697dd5228dee8c4"
+ }
+ Frame {
+ msec: 512
+ hash: "91c4ec19716a0883c8f5c25b9a0d1f42"
+ }
+ Frame {
+ msec: 528
+ hash: "a7c9860dd4962b11b92c54370ba156ee"
+ }
+ Frame {
+ msec: 544
+ hash: "a28f2590be1e8cde4cde5219367015ac"
+ }
+ Frame {
+ msec: 560
+ hash: "3b641ba58f5e1f0e1f2f528acf38cb28"
+ }
+ Frame {
+ msec: 576
+ hash: "d0b0969ad165d4784f763683de42278e"
+ }
+ Frame {
+ msec: 592
+ hash: "93968dffda327a101e2bd07b80fff842"
+ }
+ Frame {
+ msec: 608
+ hash: "08f5db4cd7f27178c67e6d973e4bb023"
+ }
+ Frame {
+ msec: 624
+ hash: "0967cad0a3ae82307a049944e1bcdc3e"
+ }
+ Frame {
+ msec: 640
+ hash: "d70ffd02b434e607bc11a95ca536c19a"
+ }
+ Frame {
+ msec: 656
+ hash: "cd561b4d5e707bb6b9f6d493f9b99512"
+ }
+ Frame {
+ msec: 672
+ hash: "58355ca37c6e4e54061664180faa11fb"
+ }
+ Frame {
+ msec: 688
+ hash: "bd873f48c79286c50333c838e57d8ec7"
+ }
+ Frame {
+ msec: 704
+ hash: "db89bc0e04ebefe5440748fe85e0bdf7"
+ }
+ Frame {
+ msec: 720
+ hash: "c400bc1e6c02c792cc515a6dd8bbaa9b"
+ }
+ Frame {
+ msec: 736
+ hash: "accf3567a161239cd8c18dd9d4527aaf"
+ }
+ Frame {
+ msec: 752
+ hash: "2e3bcdf70f160bf8e3f1b77ee472b782"
+ }
+ Frame {
+ msec: 768
+ hash: "929da0d629253478c322360c9a8dfc9e"
+ }
+ Frame {
+ msec: 784
+ hash: "d5d4b7c52ba14e84bc9c34a8b55f84b7"
+ }
+ Frame {
+ msec: 800
+ hash: "063ce927e9e7c5afb9131302ea5a968c"
+ }
+ Frame {
+ msec: 816
+ hash: "b94b6fff850aacccdaf0f74d4e36ba67"
+ }
+ Frame {
+ msec: 832
+ hash: "bac2b9b9be4b71fafe59868506aa8ab9"
+ }
+ Frame {
+ msec: 848
+ hash: "a91fed41a5a07e84424e45477f463aa1"
+ }
+ Frame {
+ msec: 864
+ hash: "370eefd369ef366f1d5930b261340d0b"
+ }
+ Frame {
+ msec: 880
+ hash: "b04a87997d0eeb6ff2f91fc2f0d016f6"
+ }
+ Frame {
+ msec: 896
+ hash: "09c3602a08d6d3e2afb654c328606871"
+ }
+ Frame {
+ msec: 912
+ hash: "101e66b9d13b1b0872cfcc497c9d6ae3"
+ }
+ Frame {
+ msec: 928
+ hash: "b5eaf952e40cf90ef32e8cb64ccce7d3"
+ }
+ Frame {
+ msec: 944
+ hash: "b43b02133ebe5db93e5236c0307939c3"
+ }
+ Frame {
+ msec: 960
+ image: "test-flipable.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "7d1a0ff0eceb80ff64d828c34792a2d5"
+ }
+ Frame {
+ msec: 992
+ hash: "a7492d8ab6fddb5c1d7af2621078230b"
+ }
+ Frame {
+ msec: 1008
+ hash: "2ed3dc7f10cc8279a6fd926914cdb234"
+ }
+ Frame {
+ msec: 1024
+ hash: "e9f76e419f6f682bcc9052183bb50607"
+ }
+ Frame {
+ msec: 1040
+ hash: "fdee6990e101d4a628272e7b09a217a3"
+ }
+ Frame {
+ msec: 1056
+ hash: "05e028b2f37a433343d373bc05f73756"
+ }
+ Frame {
+ msec: 1072
+ hash: "a9ece04666d17979408dcd8690cd697c"
+ }
+ Frame {
+ msec: 1088
+ hash: "a5d8c9bee6ac10fb45cedf3bc4325539"
+ }
+ Frame {
+ msec: 1104
+ hash: "08f1ff1e515ec78f75efa13a39b21f56"
+ }
+ Frame {
+ msec: 1120
+ hash: "f0bc6c649a195e2c433cf84c1b4f5bcb"
+ }
+ Frame {
+ msec: 1136
+ hash: "2a548614a9b38867cd0fe44985ca443f"
+ }
+ Frame {
+ msec: 1152
+ hash: "8c8272fc028ce5b403e636b4061351d3"
+ }
+ Frame {
+ msec: 1168
+ hash: "df11678b255cc3f624fed24d7e6a24af"
+ }
+ Frame {
+ msec: 1184
+ hash: "7dd5ce1cce200d7eede0f248f150873c"
+ }
+ Frame {
+ msec: 1200
+ hash: "e5cb8e0e588854dce5e7572fd1e3a445"
+ }
+ Frame {
+ msec: 1216
+ hash: "71937cd7d319174232797d05fe28bda5"
+ }
+ Frame {
+ msec: 1232
+ hash: "021c3a598b008991114b25b26191e8ef"
+ }
+ Frame {
+ msec: 1248
+ hash: "b372131d6fc29e7dbffc2c5f4e269ad7"
+ }
+ Frame {
+ msec: 1264
+ hash: "2120fc188aed6888eba85e9d49139000"
+ }
+ Frame {
+ msec: 1280
+ hash: "0523499bb4f4c6d0c3d2cd28fbac7056"
+ }
+ Frame {
+ msec: 1296
+ hash: "19d1fc79802728d6b0af222050b59463"
+ }
+ Frame {
+ msec: 1312
+ hash: "f48686053780376c7ab2e6481e3fd0ad"
+ }
+ Frame {
+ msec: 1328
+ hash: "0f7c5ca70fec90e7e8b2fd50b791fd2e"
+ }
+ Frame {
+ msec: 1344
+ hash: "93cd129be7cfebaa2ea8a074a77aaa7c"
+ }
+ Frame {
+ msec: 1360
+ hash: "e6b149da031b1c0b842b1b7872bd2d91"
+ }
+ Frame {
+ msec: 1376
+ hash: "5481248e889fb4fe9f4cf54f69d9f614"
+ }
+ Frame {
+ msec: 1392
+ hash: "23bb444b6248901da3eb6a2e805438cb"
+ }
+ Frame {
+ msec: 1408
+ hash: "1c9feb1c3ae76d4015c99d005ecfed60"
+ }
+ Frame {
+ msec: 1424
+ hash: "41e5345dc90fd48476f35ceeab281948"
+ }
+ Frame {
+ msec: 1440
+ hash: "89682a955a00e68031571ac765f9f5e3"
+ }
+ Frame {
+ msec: 1456
+ hash: "8ff7cee41c6f19eeda417052c1b071d6"
+ }
+ Frame {
+ msec: 1472
+ hash: "67a73129d828e8a05b1efc768cf40146"
+ }
+ Frame {
+ msec: 1488
+ hash: "0800a78c97c92c697e44ded54fdcf934"
+ }
+ Frame {
+ msec: 1504
+ hash: "d5d51263367f0c53b8d94a03d83338d9"
+ }
+ Frame {
+ msec: 1520
+ hash: "ab749885f356683e17ca52f904ae582d"
+ }
+ Frame {
+ msec: 1536
+ hash: "7f5a56f30222a9886d1e9d014b4f5cab"
+ }
+ Frame {
+ msec: 1552
+ hash: "10c5e64eff104dce59f54f70c5564959"
+ }
+ Frame {
+ msec: 1568
+ hash: "38b00c7544648ef06705acc2e9eca1f5"
+ }
+ Frame {
+ msec: 1584
+ hash: "56bdfcb8fbb776b3799676ba7934a354"
+ }
+ Frame {
+ msec: 1600
+ hash: "ea5349d337e397b3ee5e0db0c296f5e5"
+ }
+ Frame {
+ msec: 1616
+ hash: "6bd784ca760edba5a6f0b4212237e1e8"
+ }
+ Frame {
+ msec: 1632
+ hash: "77e7888a37a7724bded817903cbe777e"
+ }
+ Frame {
+ msec: 1648
+ hash: "55213bdb2f1f2d25b5680db95e79bbac"
+ }
+ Frame {
+ msec: 1664
+ hash: "6d62c7f7f76cc1d4e33c152234000da0"
+ }
+ Frame {
+ msec: 1680
+ hash: "0f6aa29c172054887e4ddb6512ae43b1"
+ }
+ Frame {
+ msec: 1696
+ hash: "75fd94508b77bbdde34a61b74ff49e12"
+ }
+ Frame {
+ msec: 1712
+ hash: "0dfdd9a1d83a706a09318c83fd08b6fe"
+ }
+ Frame {
+ msec: 1728
+ hash: "4f895ee983424c164be3e2db488a4e51"
+ }
+ Frame {
+ msec: 1744
+ hash: "974fd5f390d33afb779ac754f0e30b2a"
+ }
+ Frame {
+ msec: 1760
+ hash: "fd40e22c7d3cfceeee7dc668d1cf0a12"
+ }
+ Frame {
+ msec: 1776
+ hash: "4e3c04b35bcc43a4295582da1674da2e"
+ }
+ Frame {
+ msec: 1792
+ hash: "629888aae80ea85db07a383df352214a"
+ }
+ Frame {
+ msec: 1808
+ hash: "9a92c68cfad54c313d24e38240ea072f"
+ }
+ Frame {
+ msec: 1824
+ hash: "3e27569d19670ec99f11bfa46099456a"
+ }
+ Frame {
+ msec: 1840
+ hash: "5d4be9ed8c4ba7faefde5427cdbffc73"
+ }
+ Frame {
+ msec: 1856
+ hash: "232d4e03a57edf0386b06884482f9730"
+ }
+ Frame {
+ msec: 1872
+ hash: "c45f959fd81ac08add219326cb6a8bfc"
+ }
+ Frame {
+ msec: 1888
+ hash: "349111e36190f77afd53c50ee2e9ba94"
+ }
+ Frame {
+ msec: 1904
+ hash: "ea5ed48b2bcdfd2a711a3a71a4ae37c3"
+ }
+ Frame {
+ msec: 1920
+ image: "test-flipable.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "ae4e35413e462221b8cb48dd0350f873"
+ }
+ Frame {
+ msec: 1952
+ hash: "63cc3851236d5de613c85a2971ef7145"
+ }
+ Frame {
+ msec: 1968
+ hash: "45d5fdb92107a7074d56d97bda34756f"
+ }
+ Frame {
+ msec: 1984
+ hash: "f74d9a3b53a629f7fccfdd255fdbba62"
+ }
+ Frame {
+ msec: 2000
+ hash: "60c6a30e15ed4ad61c14f15f9f1f3790"
+ }
+ Frame {
+ msec: 2016
+ hash: "b5f7c630f6e61c7ddac8493e17a1f53e"
+ }
+ Frame {
+ msec: 2032
+ hash: "98558c7135fa84fa08d457c6064b8653"
+ }
+ Frame {
+ msec: 2048
+ hash: "2858e39a9b39739bb5c0c1ce23e83b20"
+ }
+ Frame {
+ msec: 2064
+ hash: "0b174f04215131cfa32b5d1a32170ac3"
+ }
+ Frame {
+ msec: 2080
+ hash: "67e3618bab95519a034ed6c8c1543212"
+ }
+ Frame {
+ msec: 2096
+ hash: "2012c5310f198022a3878c9ded08523d"
+ }
+ Frame {
+ msec: 2112
+ hash: "1cb6a1f6d873d2bfde457828c17b4886"
+ }
+ Frame {
+ msec: 2128
+ hash: "be3f28bd56d9d985408e32cc0aab0623"
+ }
+ Frame {
+ msec: 2144
+ hash: "4aa07c4887f873f0f034930bd681f9dc"
+ }
+ Frame {
+ msec: 2160
+ hash: "adeae071187b590aa0a142c27098d2f4"
+ }
+ Frame {
+ msec: 2176
+ hash: "d777aaccd6143c2c1000bbfabdbefeb2"
+ }
+ Frame {
+ msec: 2192
+ hash: "7b4785b9e6610f02c52b4c824bea8ecd"
+ }
+ Frame {
+ msec: 2208
+ hash: "c539b3638272e46120edbe4a58e1d894"
+ }
+ Frame {
+ msec: 2224
+ hash: "ae466024a1dd731b6730dda255e68eb8"
+ }
+ Frame {
+ msec: 2240
+ hash: "f844a288b009cc4c6c28eb30d799c397"
+ }
+ Frame {
+ msec: 2256
+ hash: "4fc8ca1992802f97dd431783db89c725"
+ }
+ Frame {
+ msec: 2272
+ hash: "79b899461efae97b65b8c24c8820f348"
+ }
+ Frame {
+ msec: 2288
+ hash: "cb1ce87ddc372e24e37b60c013310549"
+ }
+ Frame {
+ msec: 2304
+ hash: "c8937aea34fd299c151706598828be6f"
+ }
+ Frame {
+ msec: 2320
+ hash: "ed5c3a904dc3b72937c6eea475514b2d"
+ }
+ Frame {
+ msec: 2336
+ hash: "09043e74a3ac60d05122675a1b253320"
+ }
+ Frame {
+ msec: 2352
+ hash: "57677a33d8c60a45c64aea10a695e8d0"
+ }
+ Frame {
+ msec: 2368
+ hash: "496fe0b0e420356e4205537fdf3adc2f"
+ }
+ Frame {
+ msec: 2384
+ hash: "f4146ce8db5cf2c3da15715820c9f62f"
+ }
+ Frame {
+ msec: 2400
+ hash: "b80bc46468695b874d401c4c9bd68932"
+ }
+ Frame {
+ msec: 2416
+ hash: "b0cf0021232ab917301206614f61f0bf"
+ }
+ Frame {
+ msec: 2432
+ hash: "b0abdf5b86e3fcb22a9254ac5b522380"
+ }
+ Frame {
+ msec: 2448
+ hash: "c1624cb7e90ea26ab0c37cfe9919ca36"
+ }
+ Frame {
+ msec: 2464
+ hash: "0ffd6a3b3e5f6db5a3a8df756caf713e"
+ }
+ Frame {
+ msec: 2480
+ hash: "1604ad8e7a4aa4fa8dff1f37fc8c51d7"
+ }
+ Frame {
+ msec: 2496
+ hash: "5bbca0b79c42e263162926e5c2fd3d82"
+ }
+ Frame {
+ msec: 2512
+ hash: "9436b4f2ab902673ed067de55da5003e"
+ }
+ Frame {
+ msec: 2528
+ hash: "3c7b5fa0970242a2ad308c72d761713b"
+ }
+ Frame {
+ msec: 2544
+ hash: "15e451c53e8f5c70614f87f33fe0a2e6"
+ }
+ Frame {
+ msec: 2560
+ hash: "7e8cbe203306d2f267a42fed1e4790ed"
+ }
+ Frame {
+ msec: 2576
+ hash: "db21ae28564614b58a7dd5ccd97082e6"
+ }
+ Frame {
+ msec: 2592
+ hash: "ff52e198874de749c46f9b34cfe40cfc"
+ }
+ Frame {
+ msec: 2608
+ hash: "916d92d24a81ced07a54d68c46299d4c"
+ }
+ Frame {
+ msec: 2624
+ hash: "2f6cf122e5f15fc5f5d3c92d92ca1384"
+ }
+ Frame {
+ msec: 2640
+ hash: "6f328038e5d505c402651423c44986a5"
+ }
+ Frame {
+ msec: 2656
+ hash: "6f328038e5d505c402651423c44986a5"
+ }
+ Frame {
+ msec: 2672
+ hash: "78e0dca60c04d3defbd90457685dbab3"
+ }
+ Frame {
+ msec: 2688
+ hash: "b915de1be0c1779e06fb9eea8237f91d"
+ }
+ Frame {
+ msec: 2704
+ hash: "0ff9fd6b09fc14abacb794353b9500f6"
+ }
+ Frame {
+ msec: 2720
+ hash: "5a1c9cd9da5492a61a3a1bc6ad37ef17"
+ }
+ Frame {
+ msec: 2736
+ hash: "4c4a72eb4105903802de56a4a62d86cc"
+ }
+ Frame {
+ msec: 2752
+ hash: "6d813ee777a5900c65aca5939c004d0c"
+ }
+ Frame {
+ msec: 2768
+ hash: "6d813ee777a5900c65aca5939c004d0c"
+ }
+ Frame {
+ msec: 2784
+ hash: "0acaa3ece071ad4461cf4a79d65a0f03"
+ }
+ Frame {
+ msec: 2800
+ hash: "0acaa3ece071ad4461cf4a79d65a0f03"
+ }
+ Frame {
+ msec: 2816
+ hash: "f5cf7e68edc5fcd9dd91882d3f9ba380"
+ }
+ Frame {
+ msec: 2832
+ hash: "51f8508eddffbac2fad22bd3e8040c69"
+ }
+ Frame {
+ msec: 2848
+ hash: "a09746c72df5330f6ca2a93d9b8e79f6"
+ }
+ Frame {
+ msec: 2864
+ hash: "b2ef52b66896649413b3852bcf642e1c"
+ }
+ Frame {
+ msec: 2880
+ image: "test-flipable.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "ae76d183491834e2b1d0371420d51ce5"
+ }
+ Frame {
+ msec: 2912
+ hash: "b19d89aa671cc3a773f64a7bae21adb6"
+ }
+ Frame {
+ msec: 2928
+ hash: "08eb7bd2e49fe600e922e49a3aa56e93"
+ }
+ Frame {
+ msec: 2944
+ hash: "1e3a7bdd0bd9d5b84c2cb5b646d7fb45"
+ }
+ Frame {
+ msec: 2960
+ hash: "be9f5091197899c0b89823e4403358f3"
+ }
+ Frame {
+ msec: 2976
+ hash: "1daeebce8e7eef80b135d2e4f83f780b"
+ }
+ Frame {
+ msec: 2992
+ hash: "1daeebce8e7eef80b135d2e4f83f780b"
+ }
+ Frame {
+ msec: 3008
+ hash: "1daeebce8e7eef80b135d2e4f83f780b"
+ }
+ Frame {
+ msec: 3024
+ hash: "1daeebce8e7eef80b135d2e4f83f780b"
+ }
+ Frame {
+ msec: 3040
+ hash: "1daeebce8e7eef80b135d2e4f83f780b"
+ }
+ Frame {
+ msec: 3056
+ hash: "1daeebce8e7eef80b135d2e4f83f780b"
+ }
+ Frame {
+ msec: 3072
+ hash: "be9f5091197899c0b89823e4403358f3"
+ }
+ Frame {
+ msec: 3088
+ hash: "be9f5091197899c0b89823e4403358f3"
+ }
+ Frame {
+ msec: 3104
+ hash: "1e3a7bdd0bd9d5b84c2cb5b646d7fb45"
+ }
+ Frame {
+ msec: 3120
+ hash: "b19d89aa671cc3a773f64a7bae21adb6"
+ }
+ Frame {
+ msec: 3136
+ hash: "e7ed4449b5ea3288d5e8fecb33a4a422"
+ }
+ Frame {
+ msec: 3152
+ hash: "186a2c1af03e7fa590ff3cd7422285e3"
+ }
+ Frame {
+ msec: 3168
+ hash: "373141f99bc88c40ead161502c9750e9"
+ }
+ Frame {
+ msec: 3184
+ hash: "0221e2ef4cf809ebfeba466206a77cce"
+ }
+ Frame {
+ msec: 3200
+ hash: "51f8508eddffbac2fad22bd3e8040c69"
+ }
+ Frame {
+ msec: 3216
+ hash: "f5cf7e68edc5fcd9dd91882d3f9ba380"
+ }
+ Frame {
+ msec: 3232
+ hash: "0acaa3ece071ad4461cf4a79d65a0f03"
+ }
+ Frame {
+ msec: 3248
+ hash: "0acaa3ece071ad4461cf4a79d65a0f03"
+ }
+ Frame {
+ msec: 3264
+ hash: "6d813ee777a5900c65aca5939c004d0c"
+ }
+ Frame {
+ msec: 3280
+ hash: "6d813ee777a5900c65aca5939c004d0c"
+ }
+ Frame {
+ msec: 3296
+ hash: "6d813ee777a5900c65aca5939c004d0c"
+ }
+ Frame {
+ msec: 3312
+ hash: "5a1c9cd9da5492a61a3a1bc6ad37ef17"
+ }
+ Frame {
+ msec: 3328
+ hash: "0ff9fd6b09fc14abacb794353b9500f6"
+ }
+ Frame {
+ msec: 3344
+ hash: "0ff9fd6b09fc14abacb794353b9500f6"
+ }
+ Frame {
+ msec: 3360
+ hash: "6f328038e5d505c402651423c44986a5"
+ }
+ Frame {
+ msec: 3376
+ hash: "6f328038e5d505c402651423c44986a5"
+ }
+ Frame {
+ msec: 3392
+ hash: "dd04a76df90f27358f4162fd85cfa4cd"
+ }
+ Frame {
+ msec: 3408
+ hash: "12df495b5e8bfd2c9dd13fbeccc69e08"
+ }
+ Frame {
+ msec: 3424
+ hash: "4b6f9dcde7d5d88b9c3eff3187378036"
+ }
+ Frame {
+ msec: 3440
+ hash: "712f3850c0efe45c60a3761f1354b90b"
+ }
+ Frame {
+ msec: 3456
+ hash: "22215981f00790d7a409230eb730abca"
+ }
+ Frame {
+ msec: 3472
+ hash: "a4a26f9736282ceb307f0f97735002eb"
+ }
+ Frame {
+ msec: 3488
+ hash: "b41d7a18d84a8b220e99464cab86882d"
+ }
+ Frame {
+ msec: 3504
+ hash: "c7c1961120f128cd0fcd6a7b61c98197"
+ }
+ Frame {
+ msec: 3520
+ hash: "e56e7ba603d2620afb0fab6b19aff33e"
+ }
+ Frame {
+ msec: 3536
+ hash: "1a258bed9a7a38452a746d7641016e73"
+ }
+ Frame {
+ msec: 3552
+ hash: "a237b9c187bbbcb79f624d74def15db2"
+ }
+ Frame {
+ msec: 3568
+ hash: "34a7afdebb7352ca65e0eaec61632d12"
+ }
+ Frame {
+ msec: 3584
+ hash: "a5a98e932a30418bae62bb006afc1048"
+ }
+ Frame {
+ msec: 3600
+ hash: "2ee25374cb9fef01e78d02c4131010b7"
+ }
+ Frame {
+ msec: 3616
+ hash: "7956b07b848ba89905e5c609657503e2"
+ }
+ Frame {
+ msec: 3632
+ hash: "0949a2b13f6475b3f11be04321c953a1"
+ }
+ Frame {
+ msec: 3648
+ hash: "5a1ff901ecc7c3cd7f39cd07e0273dd4"
+ }
+ Frame {
+ msec: 3664
+ hash: "44fcd7209b9f5b1c28c21e9aae408097"
+ }
+ Frame {
+ msec: 3680
+ hash: "bee94f395239aebb0bacca3dbbee95e5"
+ }
+ Frame {
+ msec: 3696
+ hash: "bd26b7e2b07bbcee3819fdacc35eea8d"
+ }
+ Frame {
+ msec: 3712
+ hash: "d3707b90c5cd0d1061db4b97b6fcb96a"
+ }
+ Frame {
+ msec: 3728
+ hash: "6f6ed6c7553b3f909d53e2146b3831d5"
+ }
+ Frame {
+ msec: 3744
+ hash: "a3a1a03617d1cb5660c51bf2f18088bc"
+ }
+ Frame {
+ msec: 3760
+ hash: "6d4646f0a53800ad60d173ab9cb9010a"
+ }
+ Frame {
+ msec: 3776
+ hash: "126cae232e2fe49e3188393c2798065b"
+ }
+ Frame {
+ msec: 3792
+ hash: "e1fa758d333ffe5208365c0babff33a0"
+ }
+ Frame {
+ msec: 3808
+ hash: "f2a6156f7d6013bd4234b35c21adb074"
+ }
+ Frame {
+ msec: 3824
+ hash: "0271f66eb6d9b91a3ab8da2d728b9581"
+ }
+ Frame {
+ msec: 3840
+ image: "test-flipable.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "e18635d7c6c5de361e7406c2db357aca"
+ }
+ Frame {
+ msec: 3872
+ hash: "56100e9ca8d1eb7e6334e5a05ef2b94d"
+ }
+ Frame {
+ msec: 3888
+ hash: "3d15b8d662d3df82dd78590c43794337"
+ }
+ Frame {
+ msec: 3904
+ hash: "9729b36fe9dbabf0c46e78b723885530"
+ }
+ Frame {
+ msec: 3920
+ hash: "ccb8b51084cc1ef3d201887b824fb1ac"
+ }
+ Frame {
+ msec: 3936
+ hash: "d9dc9d240a6f89603a54bccd66361530"
+ }
+ Frame {
+ msec: 3952
+ hash: "0e52d92455c263493d32ffe93f242739"
+ }
+ Frame {
+ msec: 3968
+ hash: "695ab932722844b975097779e26df55c"
+ }
+ Frame {
+ msec: 3984
+ hash: "da285cba2e11db1e87d1d180e376ff8e"
+ }
+ Frame {
+ msec: 4000
+ hash: "54bd12888fc4526d310fa0a66b5ba3be"
+ }
+ Frame {
+ msec: 4016
+ hash: "c3e3db473bdb96fd619b078f0f6b3ceb"
+ }
+ Frame {
+ msec: 4032
+ hash: "acfd8aaf0bb52ad3ef3116bb99f3656a"
+ }
+ Frame {
+ msec: 4048
+ hash: "c5a0877ce86c26b30b642818e83d6118"
+ }
+ Frame {
+ msec: 4064
+ hash: "b187fde9af2bad37f84f6324afcbb303"
+ }
+ Frame {
+ msec: 4080
+ hash: "0dfe035424d7f31dda88be3b4bb30c8a"
+ }
+ Frame {
+ msec: 4096
+ hash: "893bddc95fbf6e452ba61b06eab1a8c5"
+ }
+ Frame {
+ msec: 4112
+ hash: "35fb89ea579819f4b3416ff1c1b1cc9d"
+ }
+ Frame {
+ msec: 4128
+ hash: "316371649f9a1e12e336c5823408eaf9"
+ }
+ Frame {
+ msec: 4144
+ hash: "ade751c6e497c73a920baf18f0752908"
+ }
+ Frame {
+ msec: 4160
+ hash: "86720fa1eeae374c6cc67e107d27e23a"
+ }
+ Frame {
+ msec: 4176
+ hash: "1a6f080227f1ccd03b6c4093b9fdadb3"
+ }
+ Frame {
+ msec: 4192
+ hash: "f7d7398edba69716ec8c0699d5472dca"
+ }
+ Frame {
+ msec: 4208
+ hash: "9e62c9dd25abb203f5c06c7bff0d8363"
+ }
+ Frame {
+ msec: 4224
+ hash: "fd90404238b458fc86a4a17e6a976f9b"
+ }
+ Frame {
+ msec: 4240
+ hash: "e39668dc347318fc61a365f9006aab3c"
+ }
+ Frame {
+ msec: 4256
+ hash: "c40f41f635f10f5f9b04b42ba2dc5bb1"
+ }
+ Frame {
+ msec: 4272
+ hash: "c0f971c75b7237de7e9b2f25cc3f34b2"
+ }
+ Frame {
+ msec: 4288
+ hash: "a1c79481fd1632cfdc396aefb3592534"
+ }
+ Frame {
+ msec: 4304
+ hash: "6eee76f40fc7ec1a1e3d77c849321740"
+ }
+ Frame {
+ msec: 4320
+ hash: "0a36746ab17caef5946731c31af3823f"
+ }
+ Frame {
+ msec: 4336
+ hash: "863dedd22df4e1d14e73eaeb851e9b66"
+ }
+ Frame {
+ msec: 4352
+ hash: "318e8751f7056bb6a004c8a7ce7be870"
+ }
+ Frame {
+ msec: 4368
+ hash: "8fb2809a366f42c86fad7aa5db3ff22c"
+ }
+ Frame {
+ msec: 4384
+ hash: "8aaea666640cb3b27e3374f756fe411b"
+ }
+ Frame {
+ msec: 4400
+ hash: "1f552095d26a8d145584e36237630916"
+ }
+ Frame {
+ msec: 4416
+ hash: "cd5aa55715786cac0f7efc90c7c4b9d6"
+ }
+ Frame {
+ msec: 4432
+ hash: "7a3153d9309ec338dce3437ecf667646"
+ }
+ Frame {
+ msec: 4448
+ hash: "c7fa40e69148f1c5ec494ad159b6ce6c"
+ }
+ Frame {
+ msec: 4464
+ hash: "e131bc8ca25ddc4b7dd6582ff034fe14"
+ }
+ Frame {
+ msec: 4480
+ hash: "3174c672e62dae0341d5849e23031280"
+ }
+ Frame {
+ msec: 4496
+ hash: "0b25fb7d33708a3292ede7c66e25a3d7"
+ }
+ Frame {
+ msec: 4512
+ hash: "84b3cf92b3abc2f5acf07cfccf3c0202"
+ }
+ Frame {
+ msec: 4528
+ hash: "fafbd14d296e4954bce7816d811ddd89"
+ }
+ Frame {
+ msec: 4544
+ hash: "865018d8408863b741a7082a962236dc"
+ }
+ Frame {
+ msec: 4560
+ hash: "f626082691429565b55ce9e04b14a665"
+ }
+ Frame {
+ msec: 4576
+ hash: "8a02f7d3d53e98384d1f05dc7fc5fd37"
+ }
+ Frame {
+ msec: 4592
+ hash: "6af3a8305b25a9a769b8cf00479c6ab3"
+ }
+ Frame {
+ msec: 4608
+ hash: "b31470b0ac4a593317abc365acb2b281"
+ }
+ Frame {
+ msec: 4624
+ hash: "efd00c43b1b8bbc4bc5496dcfa58c6b0"
+ }
+ Frame {
+ msec: 4640
+ hash: "498cf6c20aeca609e9d9cea78f0cc6a3"
+ }
+ Frame {
+ msec: 4656
+ hash: "b55661b5d9632bc0d7fc7ff3a421a2e7"
+ }
+ Frame {
+ msec: 4672
+ hash: "2f1e402c5e4a0615528f91dd2e183ddd"
+ }
+ Frame {
+ msec: 4688
+ hash: "d1c166cc7932e72ba22a73637cad65d6"
+ }
+ Frame {
+ msec: 4704
+ hash: "374b703e0059fc80b67480113d584754"
+ }
+ Frame {
+ msec: 4720
+ hash: "e8de71d4a2a253e366b2edf5d475824d"
+ }
+ Frame {
+ msec: 4736
+ hash: "6a9d033b332f0c0285284fdaddf3bbdb"
+ }
+ Frame {
+ msec: 4752
+ hash: "640c227fb62e40c666035e7465ac5c4e"
+ }
+ Frame {
+ msec: 4768
+ hash: "9cf7dc6507befd6ae54f380a7d87a207"
+ }
+ Frame {
+ msec: 4784
+ hash: "d1c7b2160c08e03e7a98d7d2db0116f7"
+ }
+ Frame {
+ msec: 4800
+ image: "test-flipable.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "6e48e605ea1aed4028e02476328f182b"
+ }
+ Frame {
+ msec: 4832
+ hash: "2dfa5fdfd07e7000caee6abf5fe84378"
+ }
+ Frame {
+ msec: 4848
+ hash: "2b0c2f019b07f1f8b4e5af9a520ab061"
+ }
+ Frame {
+ msec: 4864
+ hash: "33cb1aaeb7dafc2475e4337be7cc7892"
+ }
+ Frame {
+ msec: 4880
+ hash: "91290d1435bedb5010ba135a7f99c0a2"
+ }
+ Frame {
+ msec: 4896
+ hash: "df7434eb6c6e5d45935d6c6fd03f06d1"
+ }
+ Frame {
+ msec: 4912
+ hash: "48dfe78dcdd65242132071454fb9ea33"
+ }
+ Frame {
+ msec: 4928
+ hash: "1b288012e123cb6051bfa180ea2a2bc0"
+ }
+ Frame {
+ msec: 4944
+ hash: "84b23d92987f59df336d9b269e3b7bbc"
+ }
+ Frame {
+ msec: 4960
+ hash: "c413ca53240df702c3ba0c7f4dacca3b"
+ }
+ Frame {
+ msec: 4976
+ hash: "339c06a2e1fc05ebfd3732097b9c5242"
+ }
+ Frame {
+ msec: 4992
+ hash: "f1e647e274ac8c8458d2c1e576623688"
+ }
+ Frame {
+ msec: 5008
+ hash: "a70dc2f51ecfc164595cfef61c1da245"
+ }
+ Frame {
+ msec: 5024
+ hash: "b69f034a71b53c885cd177da422d5fc7"
+ }
+ Frame {
+ msec: 5040
+ hash: "26c25a031944c677b30f69c8498ac6ce"
+ }
+ Frame {
+ msec: 5056
+ hash: "ebc2328766e8736eac989e309968d8f9"
+ }
+ Frame {
+ msec: 5072
+ hash: "41d55f53bfc74e614c906d3f6b813704"
+ }
+ Frame {
+ msec: 5088
+ hash: "135e97adb3f19aa19d746ece1b2b3d02"
+ }
+ Frame {
+ msec: 5104
+ hash: "85c4454dbe9a39b3005f32fd7a06b1b2"
+ }
+ Frame {
+ msec: 5120
+ hash: "7561e0dd6970f7c81bcb53c9371d4405"
+ }
+ Frame {
+ msec: 5136
+ hash: "c9961d5abf700a06ed294ce7aecb6147"
+ }
+ Frame {
+ msec: 5152
+ hash: "29acf87effa3c21322334080776c566e"
+ }
+ Frame {
+ msec: 5168
+ hash: "04990a79d5ff5cb41dcd48d3e3bf5b11"
+ }
+ Frame {
+ msec: 5184
+ hash: "f40c78c37a26249ecb161af778631f7b"
+ }
+ Frame {
+ msec: 5200
+ hash: "eddacaeae7c47d063db737f678896da1"
+ }
+ Frame {
+ msec: 5216
+ hash: "5ae523dc1115fd0904875718e05aa2a5"
+ }
+ Frame {
+ msec: 5232
+ hash: "f09c299412a9e2fd353c4937ad959f25"
+ }
+ Frame {
+ msec: 5248
+ hash: "9caeae0abd3bc665bd307997baea6a48"
+ }
+ Frame {
+ msec: 5264
+ hash: "e9d222c9d23773488b64b0a6323c1095"
+ }
+ Frame {
+ msec: 5280
+ hash: "ad34c46ab3d418a2af7bffc59e720868"
+ }
+ Frame {
+ msec: 5296
+ hash: "ff0d8cfd272fca5be34b663a7e52f283"
+ }
+ Frame {
+ msec: 5312
+ hash: "55f95277276217de16b6b43090bbb807"
+ }
+ Frame {
+ msec: 5328
+ hash: "387fadf4140d335c0b05cfee0c37a413"
+ }
+ Frame {
+ msec: 5344
+ hash: "10a1a5a91c11aa8279ae4e57e4d3946b"
+ }
+ Frame {
+ msec: 5360
+ hash: "414f7bf3a3ec05a9840cd104a13d5504"
+ }
+ Frame {
+ msec: 5376
+ hash: "e027716402ead36450732c8350e614b5"
+ }
+ Frame {
+ msec: 5392
+ hash: "0190f59275f01429ee6761b39ce99fc1"
+ }
+ Frame {
+ msec: 5408
+ hash: "7f99dd337561f006a7c56babe3c10c38"
+ }
+ Frame {
+ msec: 5424
+ hash: "4bbb76393e56b5da723c1f33a7694013"
+ }
+ Frame {
+ msec: 5440
+ hash: "00eedf86916629fe90f3c2f36e0c689e"
+ }
+ Frame {
+ msec: 5456
+ hash: "84d1f5a6604b75371f2fa7b60a59299b"
+ }
+ Frame {
+ msec: 5472
+ hash: "00488220a460746be6d7d1b66d15c392"
+ }
+ Frame {
+ msec: 5488
+ hash: "cae5a6d45425d641228210a47c5ee5f6"
+ }
+ Frame {
+ msec: 5504
+ hash: "670a2132e65564ca2cfd58ec9842ba93"
+ }
+ Frame {
+ msec: 5520
+ hash: "212b6cc9fa130bec9579cf218e1f7eeb"
+ }
+ Frame {
+ msec: 5536
+ hash: "b159e67541b5b1b5071f6cd041c62293"
+ }
+ Frame {
+ msec: 5552
+ hash: "8c4e62d26e19c32200772edefd329db3"
+ }
+ Frame {
+ msec: 5568
+ hash: "1ff120d0444e398cc79190012b548b4b"
+ }
+ Frame {
+ msec: 5584
+ hash: "1c75bccd5e19ee9a2644585b726db048"
+ }
+ Frame {
+ msec: 5600
+ hash: "bc16aff96b1f9cfe3807e95e371a8f26"
+ }
+ Frame {
+ msec: 5616
+ hash: "35a5fdb20bdbaf0122cac4cad60e7bb8"
+ }
+ Frame {
+ msec: 5632
+ hash: "ea7ac72c81abff8af260be508b6cf117"
+ }
+ Frame {
+ msec: 5648
+ hash: "2d112d040fd425c59b511066737e494d"
+ }
+ Frame {
+ msec: 5664
+ hash: "769d2724656dbf0e793ecd8e42db3de2"
+ }
+ Frame {
+ msec: 5680
+ hash: "1c25b3d65e8590f8c213afa76b722e97"
+ }
+ Frame {
+ msec: 5696
+ hash: "760a103d4524f8b665c6ff42185a8ce7"
+ }
+ Frame {
+ msec: 5712
+ hash: "451a9408b04826ab35749d9120efd6bb"
+ }
+ Frame {
+ msec: 5728
+ hash: "3fad6b23b0b78f844e02fe307e20d376"
+ }
+ Frame {
+ msec: 5744
+ hash: "451a9408b04826ab35749d9120efd6bb"
+ }
+ Frame {
+ msec: 5760
+ image: "test-flipable.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "90fb4e4ba04ac32b52c10b3258431c04"
+ }
+ Frame {
+ msec: 5792
+ hash: "90fb4e4ba04ac32b52c10b3258431c04"
+ }
+ Frame {
+ msec: 5808
+ hash: "da2a1e5e988c27577ceb453cb0383703"
+ }
+ Frame {
+ msec: 5824
+ hash: "ae2407f8da9a047d2725bcdcf8e568b2"
+ }
+ Frame {
+ msec: 5840
+ hash: "ae2407f8da9a047d2725bcdcf8e568b2"
+ }
+ Frame {
+ msec: 5856
+ hash: "e97a5d968da37789c28816608fa262a1"
+ }
+ Frame {
+ msec: 5872
+ hash: "9becb90d9f8a61f5afacdc53d137ebcb"
+ }
+ Frame {
+ msec: 5888
+ hash: "9811f823e057882d384f36d7227fa12e"
+ }
+ Frame {
+ msec: 5904
+ hash: "1e7a308d18851db0a430542178944c67"
+ }
+ Frame {
+ msec: 5920
+ hash: "692931f1db6ddf0b37eb64026ca830f8"
+ }
+ Frame {
+ msec: 5936
+ hash: "2117c775960234c297187ea2e9d51e73"
+ }
+ Frame {
+ msec: 5952
+ hash: "f8038dc4b67b92ef776a97589240e8c5"
+ }
+ Frame {
+ msec: 5968
+ hash: "51dff66a7767e3464fda60f2cf906700"
+ }
+ Frame {
+ msec: 5984
+ hash: "7e16e6360fc2e9db67dbf11d58042745"
+ }
+ Frame {
+ msec: 6000
+ hash: "7e16e6360fc2e9db67dbf11d58042745"
+ }
+ Frame {
+ msec: 6016
+ hash: "7e16e6360fc2e9db67dbf11d58042745"
+ }
+ Frame {
+ msec: 6032
+ hash: "7e16e6360fc2e9db67dbf11d58042745"
+ }
+ Frame {
+ msec: 6048
+ hash: "7e16e6360fc2e9db67dbf11d58042745"
+ }
+ Frame {
+ msec: 6064
+ hash: "51dff66a7767e3464fda60f2cf906700"
+ }
+ Frame {
+ msec: 6080
+ hash: "f8038dc4b67b92ef776a97589240e8c5"
+ }
+ Frame {
+ msec: 6096
+ hash: "2117c775960234c297187ea2e9d51e73"
+ }
+ Frame {
+ msec: 6112
+ hash: "692931f1db6ddf0b37eb64026ca830f8"
+ }
+ Frame {
+ msec: 6128
+ hash: "f01b7368e42381dda5eadf56482ea993"
+ }
+ Frame {
+ msec: 6144
+ hash: "9811f823e057882d384f36d7227fa12e"
+ }
+ Frame {
+ msec: 6160
+ hash: "9b40b6c75af876567ff49688bc710f2a"
+ }
+ Frame {
+ msec: 6176
+ hash: "e97a5d968da37789c28816608fa262a1"
+ }
+ Frame {
+ msec: 6192
+ hash: "2cd0627fdc63bb91f8dcac789d7a93b2"
+ }
+ Frame {
+ msec: 6208
+ hash: "ae2407f8da9a047d2725bcdcf8e568b2"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6224
+ hash: "90fb4e4ba04ac32b52c10b3258431c04"
+ }
+ Frame {
+ msec: 6240
+ hash: "90fb4e4ba04ac32b52c10b3258431c04"
+ }
+ Frame {
+ msec: 6256
+ hash: "90fb4e4ba04ac32b52c10b3258431c04"
+ }
+ Frame {
+ msec: 6272
+ hash: "90fb4e4ba04ac32b52c10b3258431c04"
+ }
+ Frame {
+ msec: 6288
+ hash: "73c06997014af4e008b546b53fe349fb"
+ }
+ Frame {
+ msec: 6304
+ hash: "451a9408b04826ab35749d9120efd6bb"
+ }
+ Frame {
+ msec: 6320
+ hash: "451a9408b04826ab35749d9120efd6bb"
+ }
+ Frame {
+ msec: 6336
+ hash: "3fad6b23b0b78f844e02fe307e20d376"
+ }
+ Frame {
+ msec: 6352
+ hash: "1c25b3d65e8590f8c213afa76b722e97"
+ }
+ Frame {
+ msec: 6368
+ hash: "769d2724656dbf0e793ecd8e42db3de2"
+ }
+ Frame {
+ msec: 6384
+ hash: "9e375cb3815723a2c5dda39c79325e96"
+ }
+ Frame {
+ msec: 6400
+ hash: "77a245991ed8e40163bd0224eb15f20e"
+ }
+ Frame {
+ msec: 6416
+ hash: "e6936f1122c8c0a76b0eb61ad086a9f1"
+ }
+ Frame {
+ msec: 6432
+ hash: "8048f84221a02e7102cf3272445862a1"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativeflipable/test-flipable.qml b/tests/auto/declarative/visual/qdeclarativeflipable/test-flipable.qml
new file mode 100644
index 0000000000..a27aa6e9f8
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeflipable/test-flipable.qml
@@ -0,0 +1,79 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400; height: 240
+ color: "white"
+
+ Timer {
+ interval: 3000; running: true; repeat: true; triggeredOnStart: true
+ onTriggered: {
+ if (flipable.state == '') flipable.state = 'back'; else flipable.state = ''
+ if (flipable2.state == '') flipable2.state = 'back'; else flipable2.state = ''
+ }
+ }
+
+ Flipable {
+ id: flipable
+ width: 200; height: 200
+
+ transform: Rotation {
+ id: rotation; angle: 0
+ origin.x: 100; origin.y: 100
+ axis.x: 0; axis.y: 1; axis.z: 0
+ }
+
+ front: Rectangle {
+ color: "steelblue"; width: 200; height: 200
+ }
+
+ back: Rectangle {
+ color: "deeppink"; width: 200; height: 200
+ }
+
+ states: State {
+ name: "back"
+ PropertyChanges { target: rotation; angle: 180 }
+ }
+
+ transitions: Transition {
+ NumberAnimation { easing.type: "InOutQuad"; properties: "angle"; duration: 3000 }
+ }
+ }
+
+ Flipable {
+ id: flipable2
+ x: 200; width: 200; height: 200
+
+ transform: Rotation {
+ id: rotation2; angle: 0
+ origin.x: 100; origin.y: 100
+ axis.x: 1; axis.z: 0
+ }
+
+ front: Rectangle {
+ color: "deeppink"; width: 200; height: 200
+ }
+
+ back: Rectangle {
+ color: "steelblue"; width: 200; height: 200
+ }
+
+ states: State {
+ name: "back"
+ PropertyChanges { target: rotation2; angle: 180 }
+ }
+
+ transitions: Transition {
+ NumberAnimation { easing.type: "InOutQuad"; properties: "angle"; duration: 3000 }
+ }
+ }
+
+ Rectangle {
+ x: 25; width: 150; y: 210; height: 20; color: "black"
+ visible: flipable.side == Flipable.Front
+ }
+ Rectangle {
+ x: 225; width: 150; y: 210; height: 20; color: "black"
+ visible: flipable2.side == Flipable.Back
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.0.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.0.png
new file mode 100644
index 0000000000..6c827779f1
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.1.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.1.png
new file mode 100644
index 0000000000..07b1f7c913
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.2.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.2.png
new file mode 100644
index 0000000000..f2f08c083a
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.3.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.3.png
new file mode 100644
index 0000000000..08649f959c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.4.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.4.png
new file mode 100644
index 0000000000..f9c2f17a6f
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.5.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.5.png
new file mode 100644
index 0000000000..52ec0bd132
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.6.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.6.png
new file mode 100644
index 0000000000..3fe25befa1
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.7.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.7.png
new file mode 100644
index 0000000000..4cc12a60d1
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.8.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.8.png
new file mode 100644
index 0000000000..2267f2326b
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.8.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.9.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.9.png
new file mode 100644
index 0000000000..6c827779f1
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.9.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.qml b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.qml
new file mode 100644
index 0000000000..c7ac52d865
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview.qml
@@ -0,0 +1,2859 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 32
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 48
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 64
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 80
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 96
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 112
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 128
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 144
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 160
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 176
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 192
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 208
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 224
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 240
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 256
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 272
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 288
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 304
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 320
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 336
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 352
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 368
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 384
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 400
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 416
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Frame {
+ msec: 432
+ hash: "c33447c78ea64452ec3cd1696fb502eb"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 448
+ hash: "96ad89eafa7f99269518a192573af91b"
+ }
+ Frame {
+ msec: 464
+ hash: "735b00b968d0e2ea1f34cc0bdc028a8e"
+ }
+ Frame {
+ msec: 480
+ hash: "ce37c8e15fbb1aea72aff9629683fa96"
+ }
+ Frame {
+ msec: 496
+ hash: "a3f2471ef4ceac77a1c20ac327550d8d"
+ }
+ Frame {
+ msec: 512
+ hash: "28f120bd3bda9552dbc8cc908409c67d"
+ }
+ Frame {
+ msec: 528
+ hash: "f21cf0ed746fa48e67dc90c70c5bbae8"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 544
+ hash: "485d55730366b68e01582879f6970fa1"
+ }
+ Frame {
+ msec: 560
+ hash: "700e53c78b28993dce5dafb4035f4760"
+ }
+ Frame {
+ msec: 576
+ hash: "1e538e175a5e402e2334cf354392e8a7"
+ }
+ Frame {
+ msec: 592
+ hash: "0fbfba93eebaf05ae60067b365b6b4bc"
+ }
+ Frame {
+ msec: 608
+ hash: "7b1893397b76b0c95094eeca1dd21446"
+ }
+ Frame {
+ msec: 624
+ hash: "7b1893397b76b0c95094eeca1dd21446"
+ }
+ Frame {
+ msec: 640
+ hash: "7b1893397b76b0c95094eeca1dd21446"
+ }
+ Frame {
+ msec: 656
+ hash: "7b1893397b76b0c95094eeca1dd21446"
+ }
+ Frame {
+ msec: 672
+ hash: "7b1893397b76b0c95094eeca1dd21446"
+ }
+ Frame {
+ msec: 688
+ hash: "7b1893397b76b0c95094eeca1dd21446"
+ }
+ Frame {
+ msec: 704
+ hash: "7b1893397b76b0c95094eeca1dd21446"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 720
+ hash: "25e48099a8194ed2674651818d854c61"
+ }
+ Frame {
+ msec: 736
+ hash: "b75d02dfc238ba2292306ca1421279c3"
+ }
+ Frame {
+ msec: 752
+ hash: "7e48b7d9c1291b4e438c81f44228d8ad"
+ }
+ Frame {
+ msec: 768
+ hash: "fe4b009abe081a6eaeab6ef9e996f3fd"
+ }
+ Frame {
+ msec: 784
+ hash: "edea8c305fe88708dbafc03e427caa09"
+ }
+ Frame {
+ msec: 800
+ hash: "7b58803f12d0ab893acf539799d79e31"
+ }
+ Frame {
+ msec: 816
+ hash: "9b56c3d1d140114dcc57d0a8568e9b95"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 832
+ hash: "35e38e273dbc8e565917b21d00fc1530"
+ }
+ Frame {
+ msec: 848
+ hash: "116e294391333e8780daeca54c3d51ea"
+ }
+ Frame {
+ msec: 864
+ hash: "6219676215f82540d7a53b2a8aa60279"
+ }
+ Frame {
+ msec: 880
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 896
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 912
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 928
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 944
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 960
+ image: "gridview.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 992
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 1008
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 1024
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 1040
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 1056
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 1072
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 1088
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 1104
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 1120
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 1136
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 1152
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1168
+ hash: "2667c2596de97dc15353158eba03495f"
+ }
+ Frame {
+ msec: 1184
+ hash: "6a7b64e1427dcb7e438aa09a739cbc7b"
+ }
+ Frame {
+ msec: 1200
+ hash: "5bad6dc745958f5827403ea593c78752"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1216
+ hash: "b393401219ada7d094a451dba8af3f1a"
+ }
+ Frame {
+ msec: 1232
+ hash: "ba656452f8adf3d1ca7db9286274c37f"
+ }
+ Frame {
+ msec: 1248
+ hash: "1e9725c8c364a491f34035fad1f77c63"
+ }
+ Frame {
+ msec: 1264
+ hash: "a0aef0b65446dec0673b5cec3a260390"
+ }
+ Frame {
+ msec: 1280
+ hash: "d60c11a5d376af0831d6f05f2a839a92"
+ }
+ Frame {
+ msec: 1296
+ hash: "1dd2c456c6ee9cc8f9be0e9f3617d44b"
+ }
+ Frame {
+ msec: 1312
+ hash: "56208e6551e2f4202bab2d62a1cf46a2"
+ }
+ Frame {
+ msec: 1328
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1344
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1360
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1376
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1392
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1408
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1424
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1440
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1456
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1472
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1488
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1504
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1520
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1536
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1552
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1568
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1584
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1600
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1616
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1632
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Frame {
+ msec: 1648
+ hash: "caa3c1a106d549e6bb94a1746bd7a53c"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1664
+ hash: "f0f00d22d15ed9828db7b5f3a3669fe9"
+ }
+ Frame {
+ msec: 1680
+ hash: "153e7984089530bbd052c9e4f62eb14c"
+ }
+ Frame {
+ msec: 1696
+ hash: "0525d40cc58d054a3abd7ee2486576f8"
+ }
+ Frame {
+ msec: 1712
+ hash: "8c23d5245774ab5252c98c19c33f8171"
+ }
+ Frame {
+ msec: 1728
+ hash: "5ca243794d1350f04cf973d4bfc8ab89"
+ }
+ Frame {
+ msec: 1744
+ hash: "d19b7f4c0897aba498e122d83b4cbbf1"
+ }
+ Frame {
+ msec: 1760
+ hash: "99e41460dd8efc6e5c3faf54b14c3d43"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1776
+ hash: "703469f8b133156ed3aabe02762d66c3"
+ }
+ Frame {
+ msec: 1792
+ hash: "1cc2c383e988048db76a80d8d7f5a0e2"
+ }
+ Frame {
+ msec: 1808
+ hash: "8e87117c19eb9d6e600c44e0f3869ae1"
+ }
+ Frame {
+ msec: 1824
+ hash: "8304d2432168a2ea8a887d9a135b40b4"
+ }
+ Frame {
+ msec: 1840
+ hash: "8304d2432168a2ea8a887d9a135b40b4"
+ }
+ Frame {
+ msec: 1856
+ hash: "8304d2432168a2ea8a887d9a135b40b4"
+ }
+ Frame {
+ msec: 1872
+ hash: "8304d2432168a2ea8a887d9a135b40b4"
+ }
+ Frame {
+ msec: 1888
+ hash: "8304d2432168a2ea8a887d9a135b40b4"
+ }
+ Frame {
+ msec: 1904
+ hash: "8304d2432168a2ea8a887d9a135b40b4"
+ }
+ Frame {
+ msec: 1920
+ image: "gridview.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "8304d2432168a2ea8a887d9a135b40b4"
+ }
+ Frame {
+ msec: 1952
+ hash: "8304d2432168a2ea8a887d9a135b40b4"
+ }
+ Frame {
+ msec: 1968
+ hash: "8304d2432168a2ea8a887d9a135b40b4"
+ }
+ Frame {
+ msec: 1984
+ hash: "8304d2432168a2ea8a887d9a135b40b4"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2000
+ hash: "4924037ce643d0748b8b2c666e61fd62"
+ }
+ Frame {
+ msec: 2016
+ hash: "ef9750584e669a8b2d415d13854e12a6"
+ }
+ Frame {
+ msec: 2032
+ hash: "69937eacef6e6b11ad1d5741c69a1faa"
+ }
+ Frame {
+ msec: 2048
+ hash: "a1bd870fffd95a0604dd8e170e571632"
+ }
+ Frame {
+ msec: 2064
+ hash: "a3a72386594aacc88977cdaa6441df48"
+ }
+ Frame {
+ msec: 2080
+ hash: "6d8e89de38d52f0f0f871dfa18361cb5"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2096
+ hash: "96cfb1eb6893fac86c9434d1ffb82fcb"
+ }
+ Frame {
+ msec: 2112
+ hash: "5e11df1660634ff317be474118174ec5"
+ }
+ Frame {
+ msec: 2128
+ hash: "2eb75858b50c3a9a80673ab89014ed63"
+ }
+ Frame {
+ msec: 2144
+ hash: "3ff5d66f7902af92d49ebebf04d16c26"
+ }
+ Frame {
+ msec: 2160
+ hash: "570da61e2d48acd11474fe005110ab4b"
+ }
+ Frame {
+ msec: 2176
+ hash: "570da61e2d48acd11474fe005110ab4b"
+ }
+ Frame {
+ msec: 2192
+ hash: "570da61e2d48acd11474fe005110ab4b"
+ }
+ Frame {
+ msec: 2208
+ hash: "570da61e2d48acd11474fe005110ab4b"
+ }
+ Frame {
+ msec: 2224
+ hash: "570da61e2d48acd11474fe005110ab4b"
+ }
+ Frame {
+ msec: 2240
+ hash: "570da61e2d48acd11474fe005110ab4b"
+ }
+ Frame {
+ msec: 2256
+ hash: "570da61e2d48acd11474fe005110ab4b"
+ }
+ Frame {
+ msec: 2272
+ hash: "570da61e2d48acd11474fe005110ab4b"
+ }
+ Frame {
+ msec: 2288
+ hash: "570da61e2d48acd11474fe005110ab4b"
+ }
+ Frame {
+ msec: 2304
+ hash: "570da61e2d48acd11474fe005110ab4b"
+ }
+ Frame {
+ msec: 2320
+ hash: "570da61e2d48acd11474fe005110ab4b"
+ }
+ Frame {
+ msec: 2336
+ hash: "570da61e2d48acd11474fe005110ab4b"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2352
+ hash: "efeda5b2d97e1b7c22e2308250501cb7"
+ }
+ Frame {
+ msec: 2368
+ hash: "d6158379b699279f66b94a8418e53af1"
+ }
+ Frame {
+ msec: 2384
+ hash: "ab960b0669fa594e0552df623a9136ea"
+ }
+ Frame {
+ msec: 2400
+ hash: "0ebf6be1305ee1eb8740f4d0365ef4c5"
+ }
+ Frame {
+ msec: 2416
+ hash: "46cde47dffc6f2687c8c643eca09b95d"
+ }
+ Frame {
+ msec: 2432
+ hash: "2b8698ce02a6964115d960ae19f40c37"
+ }
+ Frame {
+ msec: 2448
+ hash: "ff1e7d800bb27b41710c50554adc1091"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2464
+ hash: "5837b3aca09038cae23dcb149acc8b0b"
+ }
+ Frame {
+ msec: 2480
+ hash: "dbe7c571cdbdb9de4fd01faa6d5374cf"
+ }
+ Frame {
+ msec: 2496
+ hash: "f431abcaf05f49ead909296d7649f8a9"
+ }
+ Frame {
+ msec: 2512
+ hash: "043583b19c921740dbc990afd4f508ed"
+ }
+ Frame {
+ msec: 2528
+ hash: "043583b19c921740dbc990afd4f508ed"
+ }
+ Frame {
+ msec: 2544
+ hash: "043583b19c921740dbc990afd4f508ed"
+ }
+ Frame {
+ msec: 2560
+ hash: "043583b19c921740dbc990afd4f508ed"
+ }
+ Frame {
+ msec: 2576
+ hash: "043583b19c921740dbc990afd4f508ed"
+ }
+ Frame {
+ msec: 2592
+ hash: "043583b19c921740dbc990afd4f508ed"
+ }
+ Frame {
+ msec: 2608
+ hash: "043583b19c921740dbc990afd4f508ed"
+ }
+ Frame {
+ msec: 2624
+ hash: "043583b19c921740dbc990afd4f508ed"
+ }
+ Frame {
+ msec: 2640
+ hash: "043583b19c921740dbc990afd4f508ed"
+ }
+ Frame {
+ msec: 2656
+ hash: "043583b19c921740dbc990afd4f508ed"
+ }
+ Frame {
+ msec: 2672
+ hash: "043583b19c921740dbc990afd4f508ed"
+ }
+ Frame {
+ msec: 2688
+ hash: "043583b19c921740dbc990afd4f508ed"
+ }
+ Frame {
+ msec: 2704
+ hash: "043583b19c921740dbc990afd4f508ed"
+ }
+ Frame {
+ msec: 2720
+ hash: "043583b19c921740dbc990afd4f508ed"
+ }
+ Frame {
+ msec: 2736
+ hash: "043583b19c921740dbc990afd4f508ed"
+ }
+ Frame {
+ msec: 2752
+ hash: "043583b19c921740dbc990afd4f508ed"
+ }
+ Frame {
+ msec: 2768
+ hash: "043583b19c921740dbc990afd4f508ed"
+ }
+ Frame {
+ msec: 2784
+ hash: "043583b19c921740dbc990afd4f508ed"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2800
+ hash: "4f2fafdb59db544352e3067d67c0a714"
+ }
+ Frame {
+ msec: 2816
+ hash: "4dcd4cdf6f4e305732185ec52cd2f2f6"
+ }
+ Frame {
+ msec: 2832
+ hash: "dfd3c29b0520edbbee57dfacfa7e2b30"
+ }
+ Frame {
+ msec: 2848
+ hash: "257d3d8bcf78671d35a898befec091cb"
+ }
+ Frame {
+ msec: 2864
+ hash: "20e89c544284603943396694abe86756"
+ }
+ Frame {
+ msec: 2880
+ image: "gridview.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "b88c6af89423b32b3a4413035711df03"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2912
+ hash: "e34de13af44c449c9ecc86e06ce01ed2"
+ }
+ Frame {
+ msec: 2928
+ hash: "98ffe81129aa7cc7325764221f1dae59"
+ }
+ Frame {
+ msec: 2944
+ hash: "db2d545de9879362738e71a02a3d1d26"
+ }
+ Frame {
+ msec: 2960
+ hash: "e67ae32a47213b360c1a445bf645dde2"
+ }
+ Frame {
+ msec: 2976
+ hash: "e67ae32a47213b360c1a445bf645dde2"
+ }
+ Frame {
+ msec: 2992
+ hash: "e67ae32a47213b360c1a445bf645dde2"
+ }
+ Frame {
+ msec: 3008
+ hash: "e67ae32a47213b360c1a445bf645dde2"
+ }
+ Frame {
+ msec: 3024
+ hash: "e67ae32a47213b360c1a445bf645dde2"
+ }
+ Frame {
+ msec: 3040
+ hash: "e67ae32a47213b360c1a445bf645dde2"
+ }
+ Frame {
+ msec: 3056
+ hash: "e67ae32a47213b360c1a445bf645dde2"
+ }
+ Frame {
+ msec: 3072
+ hash: "e67ae32a47213b360c1a445bf645dde2"
+ }
+ Frame {
+ msec: 3088
+ hash: "e67ae32a47213b360c1a445bf645dde2"
+ }
+ Frame {
+ msec: 3104
+ hash: "e67ae32a47213b360c1a445bf645dde2"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3120
+ hash: "02d8c90faf56c65252e4f938944bda7b"
+ }
+ Frame {
+ msec: 3136
+ hash: "a32994e2320e357241f63b956b6db236"
+ }
+ Frame {
+ msec: 3152
+ hash: "9ada466c26c217adbcd7a93df264ed75"
+ }
+ Frame {
+ msec: 3168
+ hash: "79d1a3489be95d113e8c611a2ba63456"
+ }
+ Frame {
+ msec: 3184
+ hash: "d3aa82455c4ae3ac25097354e132a30f"
+ }
+ Frame {
+ msec: 3200
+ hash: "62d12e5933ed4ed048ccafd229f4b2b7"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3216
+ hash: "5bc4ac94ae20e425084d0811dee1ba08"
+ }
+ Frame {
+ msec: 3232
+ hash: "6d5113e3732dc7a9172eea3667a01f7b"
+ }
+ Frame {
+ msec: 3248
+ hash: "e435a2588b25d3336f290331931f5981"
+ }
+ Frame {
+ msec: 3264
+ hash: "bce201adbeb319b181cce139f179d7f0"
+ }
+ Frame {
+ msec: 3280
+ hash: "5fa3ec31176bed2de8cb076b87e0be74"
+ }
+ Frame {
+ msec: 3296
+ hash: "5fa3ec31176bed2de8cb076b87e0be74"
+ }
+ Frame {
+ msec: 3312
+ hash: "5fa3ec31176bed2de8cb076b87e0be74"
+ }
+ Frame {
+ msec: 3328
+ hash: "5fa3ec31176bed2de8cb076b87e0be74"
+ }
+ Frame {
+ msec: 3344
+ hash: "5fa3ec31176bed2de8cb076b87e0be74"
+ }
+ Frame {
+ msec: 3360
+ hash: "5fa3ec31176bed2de8cb076b87e0be74"
+ }
+ Frame {
+ msec: 3376
+ hash: "5fa3ec31176bed2de8cb076b87e0be74"
+ }
+ Frame {
+ msec: 3392
+ hash: "5fa3ec31176bed2de8cb076b87e0be74"
+ }
+ Frame {
+ msec: 3408
+ hash: "5fa3ec31176bed2de8cb076b87e0be74"
+ }
+ Frame {
+ msec: 3424
+ hash: "5fa3ec31176bed2de8cb076b87e0be74"
+ }
+ Frame {
+ msec: 3440
+ hash: "5fa3ec31176bed2de8cb076b87e0be74"
+ }
+ Frame {
+ msec: 3456
+ hash: "5fa3ec31176bed2de8cb076b87e0be74"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3472
+ hash: "8f0f3cd35ae92047f23084f447046eb8"
+ }
+ Frame {
+ msec: 3488
+ hash: "ceb12e6c5e9f0566039040d9f3ff587f"
+ }
+ Frame {
+ msec: 3504
+ hash: "dfd0c89c3ea73aceefcdafa71609c720"
+ }
+ Frame {
+ msec: 3520
+ hash: "8d8ed1a9dc6a9f74dfc81b79f02af4c5"
+ }
+ Frame {
+ msec: 3536
+ hash: "d450bd62e03e1e4c7cb66e98ece05f97"
+ }
+ Frame {
+ msec: 3552
+ hash: "d1ece2210cd24eedd5361e5c3a162236"
+ }
+ Frame {
+ msec: 3568
+ hash: "77589e48b9db95e702055753046319e5"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3584
+ hash: "7793263ecb831a1e63fbd76c8addde03"
+ }
+ Frame {
+ msec: 3600
+ hash: "bfa9675f981c37fed27dea100226f61a"
+ }
+ Frame {
+ msec: 3616
+ hash: "9780849fe8abd22c32ccafcdd46b0d65"
+ }
+ Frame {
+ msec: 3632
+ hash: "e63d987ba303a42046827f14941b444a"
+ }
+ Frame {
+ msec: 3648
+ hash: "e63d987ba303a42046827f14941b444a"
+ }
+ Frame {
+ msec: 3664
+ hash: "e63d987ba303a42046827f14941b444a"
+ }
+ Frame {
+ msec: 3680
+ hash: "e63d987ba303a42046827f14941b444a"
+ }
+ Frame {
+ msec: 3696
+ hash: "e63d987ba303a42046827f14941b444a"
+ }
+ Frame {
+ msec: 3712
+ hash: "e63d987ba303a42046827f14941b444a"
+ }
+ Frame {
+ msec: 3728
+ hash: "e63d987ba303a42046827f14941b444a"
+ }
+ Frame {
+ msec: 3744
+ hash: "e63d987ba303a42046827f14941b444a"
+ }
+ Frame {
+ msec: 3760
+ hash: "e63d987ba303a42046827f14941b444a"
+ }
+ Frame {
+ msec: 3776
+ hash: "e63d987ba303a42046827f14941b444a"
+ }
+ Frame {
+ msec: 3792
+ hash: "e63d987ba303a42046827f14941b444a"
+ }
+ Frame {
+ msec: 3808
+ hash: "e63d987ba303a42046827f14941b444a"
+ }
+ Frame {
+ msec: 3824
+ hash: "e63d987ba303a42046827f14941b444a"
+ }
+ Frame {
+ msec: 3840
+ image: "gridview.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "e63d987ba303a42046827f14941b444a"
+ }
+ Frame {
+ msec: 3872
+ hash: "e63d987ba303a42046827f14941b444a"
+ }
+ Frame {
+ msec: 3888
+ hash: "e63d987ba303a42046827f14941b444a"
+ }
+ Frame {
+ msec: 3904
+ hash: "e63d987ba303a42046827f14941b444a"
+ }
+ Frame {
+ msec: 3920
+ hash: "e63d987ba303a42046827f14941b444a"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3936
+ hash: "a61dbcb7d914afe34009085bf37fb8e2"
+ }
+ Frame {
+ msec: 3952
+ hash: "89175b83b4f7ee4b5d99219cdc97aa59"
+ }
+ Frame {
+ msec: 3968
+ hash: "f524421286503f6175e4ad71dd89145f"
+ }
+ Frame {
+ msec: 3984
+ hash: "ca5af7d98a008eccba1e21be0da61f3c"
+ }
+ Frame {
+ msec: 4000
+ hash: "77c19e7e17e00787ff0d7a4e7bad7bc8"
+ }
+ Frame {
+ msec: 4016
+ hash: "04c8db761e324101ad92e0ac9ceed7d4"
+ }
+ Frame {
+ msec: 4032
+ hash: "97a3dcb81349efab6b44d458e83ce5c4"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4048
+ hash: "e86ebc276b88705c97cc9efb66ccc6b2"
+ }
+ Frame {
+ msec: 4064
+ hash: "a134bbfd14879f13b288a04d23382348"
+ }
+ Frame {
+ msec: 4080
+ hash: "9530ad3f58ad1c66401572869f7d91bc"
+ }
+ Frame {
+ msec: 4096
+ hash: "db3d030de94b19ea1db5c60be7c7ca5c"
+ }
+ Frame {
+ msec: 4112
+ hash: "db3d030de94b19ea1db5c60be7c7ca5c"
+ }
+ Frame {
+ msec: 4128
+ hash: "db3d030de94b19ea1db5c60be7c7ca5c"
+ }
+ Frame {
+ msec: 4144
+ hash: "db3d030de94b19ea1db5c60be7c7ca5c"
+ }
+ Frame {
+ msec: 4160
+ hash: "db3d030de94b19ea1db5c60be7c7ca5c"
+ }
+ Frame {
+ msec: 4176
+ hash: "db3d030de94b19ea1db5c60be7c7ca5c"
+ }
+ Frame {
+ msec: 4192
+ hash: "db3d030de94b19ea1db5c60be7c7ca5c"
+ }
+ Frame {
+ msec: 4208
+ hash: "db3d030de94b19ea1db5c60be7c7ca5c"
+ }
+ Frame {
+ msec: 4224
+ hash: "db3d030de94b19ea1db5c60be7c7ca5c"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4240
+ hash: "980e0fa84fd3bab496623936f5f220a2"
+ }
+ Frame {
+ msec: 4256
+ hash: "ed3268911723d664699bbc31317befc1"
+ }
+ Frame {
+ msec: 4272
+ hash: "3bfda4b3b0b2d2a97ec1c0b5b3f4da63"
+ }
+ Frame {
+ msec: 4288
+ hash: "1616c6def28659d51905564ff83cc112"
+ }
+ Frame {
+ msec: 4304
+ hash: "68342f34c18956d3a093f8eeeae6977e"
+ }
+ Frame {
+ msec: 4320
+ hash: "ac1b12959e9055a28fe2bda0a12b75bc"
+ }
+ Frame {
+ msec: 4336
+ hash: "009b85ff6b86e418c78ed33a5e88d3f1"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4352
+ hash: "59753bc7dc69767fe2109fdc41f20dae"
+ }
+ Frame {
+ msec: 4368
+ hash: "1c87d3d8c8d564d4d95a26f57fd28f38"
+ }
+ Frame {
+ msec: 4384
+ hash: "4e43b7b6787002c9013010dd74c83f49"
+ }
+ Frame {
+ msec: 4400
+ hash: "2476aa1a7191b485a76c76e98c9be2b0"
+ }
+ Frame {
+ msec: 4416
+ hash: "2476aa1a7191b485a76c76e98c9be2b0"
+ }
+ Frame {
+ msec: 4432
+ hash: "2476aa1a7191b485a76c76e98c9be2b0"
+ }
+ Frame {
+ msec: 4448
+ hash: "2476aa1a7191b485a76c76e98c9be2b0"
+ }
+ Frame {
+ msec: 4464
+ hash: "2476aa1a7191b485a76c76e98c9be2b0"
+ }
+ Frame {
+ msec: 4480
+ hash: "2476aa1a7191b485a76c76e98c9be2b0"
+ }
+ Frame {
+ msec: 4496
+ hash: "2476aa1a7191b485a76c76e98c9be2b0"
+ }
+ Frame {
+ msec: 4512
+ hash: "2476aa1a7191b485a76c76e98c9be2b0"
+ }
+ Frame {
+ msec: 4528
+ hash: "2476aa1a7191b485a76c76e98c9be2b0"
+ }
+ Frame {
+ msec: 4544
+ hash: "2476aa1a7191b485a76c76e98c9be2b0"
+ }
+ Frame {
+ msec: 4560
+ hash: "2476aa1a7191b485a76c76e98c9be2b0"
+ }
+ Frame {
+ msec: 4576
+ hash: "2476aa1a7191b485a76c76e98c9be2b0"
+ }
+ Frame {
+ msec: 4592
+ hash: "2476aa1a7191b485a76c76e98c9be2b0"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4608
+ hash: "84de5b5e8b0fba190a783c72967661c7"
+ }
+ Frame {
+ msec: 4624
+ hash: "60b696f4913379d28f300fd1b531c6cb"
+ }
+ Frame {
+ msec: 4640
+ hash: "d01e651d9094332fd82ad1cea3e93e9d"
+ }
+ Frame {
+ msec: 4656
+ hash: "87be4cd7c894b03b2b64c996e915d71f"
+ }
+ Frame {
+ msec: 4672
+ hash: "b07fccb0c5565d2feed5a9fcdf8acead"
+ }
+ Frame {
+ msec: 4688
+ hash: "3dca3165fd34be549d21fb6c414c67d8"
+ }
+ Frame {
+ msec: 4704
+ hash: "5f69f3298f8ca73fa9b3b6e630c60186"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4720
+ hash: "d7f41e9a29d550a7d9a41bb947569abe"
+ }
+ Frame {
+ msec: 4736
+ hash: "4ede2e90ad216a2d44580c50a25dea23"
+ }
+ Frame {
+ msec: 4752
+ hash: "9b339845ee588b789dc9095c272e0bdf"
+ }
+ Frame {
+ msec: 4768
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 4784
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 4800
+ image: "gridview.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 4832
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 4848
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 4864
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 4880
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 4896
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 4912
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 4928
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 4944
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 4960
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 4976
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 4992
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 5008
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 5024
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 5040
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 5056
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 5072
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 5088
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 5104
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 5120
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 5136
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Frame {
+ msec: 5152
+ hash: "9cdea4790972efaecabd52b435107e69"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5168
+ hash: "d6f0a6d7604bad811eeba13fd7c45368"
+ }
+ Frame {
+ msec: 5184
+ hash: "5f92e1531a3f6c21ec82e3c908167fc7"
+ }
+ Frame {
+ msec: 5200
+ hash: "5214e99ff052dcdc8f85bad29de92e03"
+ }
+ Frame {
+ msec: 5216
+ hash: "d4abed9f0f1115c9a45b0b9b4f54754e"
+ }
+ Frame {
+ msec: 5232
+ hash: "cfae8a0281e704b0e62f6bf31b32800f"
+ }
+ Frame {
+ msec: 5248
+ hash: "c203f0674596ae690bf19f2d49be62ac"
+ }
+ Frame {
+ msec: 5264
+ hash: "2e2c7e05aade104bdc4f6c489b6f0601"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5280
+ hash: "b4b2148b0557dcab3a441165e5e4de5f"
+ }
+ Frame {
+ msec: 5296
+ hash: "c5e791d27a42a63d25cdbd492b4af29a"
+ }
+ Frame {
+ msec: 5312
+ hash: "0f94ebcb407f8e6ae263bd954f2c8177"
+ }
+ Frame {
+ msec: 5328
+ hash: "d9b56b817a411812789881697a28fe4c"
+ }
+ Frame {
+ msec: 5344
+ hash: "d9b56b817a411812789881697a28fe4c"
+ }
+ Frame {
+ msec: 5360
+ hash: "d9b56b817a411812789881697a28fe4c"
+ }
+ Frame {
+ msec: 5376
+ hash: "d9b56b817a411812789881697a28fe4c"
+ }
+ Frame {
+ msec: 5392
+ hash: "d9b56b817a411812789881697a28fe4c"
+ }
+ Frame {
+ msec: 5408
+ hash: "d9b56b817a411812789881697a28fe4c"
+ }
+ Frame {
+ msec: 5424
+ hash: "d9b56b817a411812789881697a28fe4c"
+ }
+ Frame {
+ msec: 5440
+ hash: "d9b56b817a411812789881697a28fe4c"
+ }
+ Frame {
+ msec: 5456
+ hash: "d9b56b817a411812789881697a28fe4c"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5472
+ hash: "6fdfe69e377da72e04dc130f5677ed2c"
+ }
+ Frame {
+ msec: 5488
+ hash: "c041d26d43766fa1735f2ada2a43225b"
+ }
+ Frame {
+ msec: 5504
+ hash: "aa62dbd6c6256665ee1b4ef468607978"
+ }
+ Frame {
+ msec: 5520
+ hash: "987fcdf6483a83b1242053f4e7fb7a26"
+ }
+ Frame {
+ msec: 5536
+ hash: "fbde70c34709b68eb22f5460a8815fba"
+ }
+ Frame {
+ msec: 5552
+ hash: "911ddc838ebaf5ade1bb026dff2741ba"
+ }
+ Frame {
+ msec: 5568
+ hash: "120bbf35b2a3b756bdeaea0df43e49b2"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5584
+ hash: "ea93e33c079d6dc5fb18c69fb4fed441"
+ }
+ Frame {
+ msec: 5600
+ hash: "b9ac8ab01cb59b1fee11967bdb6d2dd6"
+ }
+ Frame {
+ msec: 5616
+ hash: "3ff266bf29cbcaa30bc1e7af5dd9866b"
+ }
+ Frame {
+ msec: 5632
+ hash: "edd6c3a9493a63674e2d7af5f3e8467e"
+ }
+ Frame {
+ msec: 5648
+ hash: "edd6c3a9493a63674e2d7af5f3e8467e"
+ }
+ Frame {
+ msec: 5664
+ hash: "edd6c3a9493a63674e2d7af5f3e8467e"
+ }
+ Frame {
+ msec: 5680
+ hash: "edd6c3a9493a63674e2d7af5f3e8467e"
+ }
+ Frame {
+ msec: 5696
+ hash: "edd6c3a9493a63674e2d7af5f3e8467e"
+ }
+ Frame {
+ msec: 5712
+ hash: "edd6c3a9493a63674e2d7af5f3e8467e"
+ }
+ Frame {
+ msec: 5728
+ hash: "edd6c3a9493a63674e2d7af5f3e8467e"
+ }
+ Frame {
+ msec: 5744
+ hash: "edd6c3a9493a63674e2d7af5f3e8467e"
+ }
+ Frame {
+ msec: 5760
+ image: "gridview.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "edd6c3a9493a63674e2d7af5f3e8467e"
+ }
+ Frame {
+ msec: 5792
+ hash: "edd6c3a9493a63674e2d7af5f3e8467e"
+ }
+ Frame {
+ msec: 5808
+ hash: "edd6c3a9493a63674e2d7af5f3e8467e"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5824
+ hash: "de1f83d25751639dff42f1755a6534c3"
+ }
+ Frame {
+ msec: 5840
+ hash: "edefdea8b2461d03fb97cf5ed66e9b6d"
+ }
+ Frame {
+ msec: 5856
+ hash: "cef1886397e3932a511f37571b5011f4"
+ }
+ Frame {
+ msec: 5872
+ hash: "05589ad354314d9e04ef90c1addd99f5"
+ }
+ Frame {
+ msec: 5888
+ hash: "ff88b52e3755b9b4785d2719ddd4f090"
+ }
+ Frame {
+ msec: 5904
+ hash: "f59edc3016b177a2e8faa6612d718b17"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5920
+ hash: "dc673a7cdd927f70b28ebcfe51cd3d89"
+ }
+ Frame {
+ msec: 5936
+ hash: "3abec0da85fb663e63ab22188e092827"
+ }
+ Frame {
+ msec: 5952
+ hash: "50c2c8ac68cafad7c47b576cd8f4a037"
+ }
+ Frame {
+ msec: 5968
+ hash: "06c31b861e2b96e6595b2244d7b3f4d5"
+ }
+ Frame {
+ msec: 5984
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6000
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6016
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6032
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6048
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6064
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6080
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6096
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6112
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6128
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6144
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6160
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6176
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6192
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6208
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6224
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6240
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6256
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6272
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6288
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6304
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6320
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6336
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6352
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6368
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6384
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6400
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Frame {
+ msec: 6416
+ hash: "0aa7ce5ba9c875619a6e4629a0eb4065"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6432
+ hash: "7f52a770775c19e10784b4c5f7874210"
+ }
+ Frame {
+ msec: 6448
+ hash: "827cfb74286a2a80aca8b6c5277d6cfd"
+ }
+ Frame {
+ msec: 6464
+ hash: "8399231eda9b66821d43a3d8c4c7d645"
+ }
+ Frame {
+ msec: 6480
+ hash: "fc163583671f3c4023361460b436c895"
+ }
+ Frame {
+ msec: 6496
+ hash: "893dea6496c95c32095ad1d673e500c2"
+ }
+ Frame {
+ msec: 6512
+ hash: "808c7403b2cdcc882059da56a2f806fe"
+ }
+ Frame {
+ msec: 6528
+ hash: "7466b2e5b86ba8ad46be75818659786c"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6544
+ hash: "dd2561cd780e24401130305d47757a53"
+ }
+ Frame {
+ msec: 6560
+ hash: "bee89299532d43fc3e6c3e69c343b381"
+ }
+ Frame {
+ msec: 6576
+ hash: "94f8474aedee94098592c05d8fc7d868"
+ }
+ Frame {
+ msec: 6592
+ hash: "b6ee51bfa4d4ab7a83cca5c18453f0b8"
+ }
+ Frame {
+ msec: 6608
+ hash: "b6ee51bfa4d4ab7a83cca5c18453f0b8"
+ }
+ Frame {
+ msec: 6624
+ hash: "b6ee51bfa4d4ab7a83cca5c18453f0b8"
+ }
+ Frame {
+ msec: 6640
+ hash: "b6ee51bfa4d4ab7a83cca5c18453f0b8"
+ }
+ Frame {
+ msec: 6656
+ hash: "b6ee51bfa4d4ab7a83cca5c18453f0b8"
+ }
+ Frame {
+ msec: 6672
+ hash: "b6ee51bfa4d4ab7a83cca5c18453f0b8"
+ }
+ Frame {
+ msec: 6688
+ hash: "b6ee51bfa4d4ab7a83cca5c18453f0b8"
+ }
+ Frame {
+ msec: 6704
+ hash: "b6ee51bfa4d4ab7a83cca5c18453f0b8"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6720
+ image: "gridview.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "ccd58be20d47422121d6ef799b927a7a"
+ }
+ Frame {
+ msec: 6752
+ hash: "e090c7f39649786a1796870e25bd0f0d"
+ }
+ Frame {
+ msec: 6768
+ hash: "acf3dcd9f4a869169dbc1ae7fe60e9d0"
+ }
+ Frame {
+ msec: 6784
+ hash: "51795e9a720845e8305d23507785e1ca"
+ }
+ Frame {
+ msec: 6800
+ hash: "0d34a43e177e6b73e2ff9155747d0385"
+ }
+ Frame {
+ msec: 6816
+ hash: "1876c3cdffc1af01da1aaa0ac636d0a8"
+ }
+ Frame {
+ msec: 6832
+ hash: "3131296b6edf4190520e2cdb3f8b936e"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6848
+ hash: "ee92f0a764e5081b130e205a5c362b07"
+ }
+ Frame {
+ msec: 6864
+ hash: "8737ea2c60aeb215228c00a7fddd1baa"
+ }
+ Frame {
+ msec: 6880
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 6896
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 6912
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 6928
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 6944
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 6960
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 6976
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 6992
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7008
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7024
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7040
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7056
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7072
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7088
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7104
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7120
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7136
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7152
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7168
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7184
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7200
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7216
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7232
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7248
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7264
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7280
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7296
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7312
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7328
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7344
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7360
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7376
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7392
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7408
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7424
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7440
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7456
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7472
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7488
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7504
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7520
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7536
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7552
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7568
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7584
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Key {
+ type: 6
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7600
+ hash: "ac036f1f5c5ae23ddfca3060dff83f15"
+ }
+ Frame {
+ msec: 7616
+ hash: "eb0d1be15f63af6eaf6634b02e5f240a"
+ }
+ Frame {
+ msec: 7632
+ hash: "2423c305bebb3449e87c78e8fb447c88"
+ }
+ Frame {
+ msec: 7648
+ hash: "f0ede6ea85647728db80878b3e525edc"
+ }
+ Frame {
+ msec: 7664
+ hash: "387d127b2b000dc344ee4768cf2d29b2"
+ }
+ Frame {
+ msec: 7680
+ image: "gridview.7.png"
+ }
+ Frame {
+ msec: 7696
+ hash: "1d0d8100e994c16d7973ad9a97b0068f"
+ }
+ Key {
+ type: 7
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7712
+ hash: "95fb4a6d0331ffc4773e39ec8c3e6511"
+ }
+ Frame {
+ msec: 7728
+ hash: "34738f16150228d971972833d4bd5c8f"
+ }
+ Frame {
+ msec: 7744
+ hash: "9b71c8dacc530f32d7c6f409928caf5c"
+ }
+ Frame {
+ msec: 7760
+ hash: "831efd0970c5c29fbe10b3be7707f915"
+ }
+ Frame {
+ msec: 7776
+ hash: "831efd0970c5c29fbe10b3be7707f915"
+ }
+ Frame {
+ msec: 7792
+ hash: "831efd0970c5c29fbe10b3be7707f915"
+ }
+ Frame {
+ msec: 7808
+ hash: "831efd0970c5c29fbe10b3be7707f915"
+ }
+ Frame {
+ msec: 7824
+ hash: "831efd0970c5c29fbe10b3be7707f915"
+ }
+ Frame {
+ msec: 7840
+ hash: "831efd0970c5c29fbe10b3be7707f915"
+ }
+ Frame {
+ msec: 7856
+ hash: "831efd0970c5c29fbe10b3be7707f915"
+ }
+ Frame {
+ msec: 7872
+ hash: "831efd0970c5c29fbe10b3be7707f915"
+ }
+ Frame {
+ msec: 7888
+ hash: "831efd0970c5c29fbe10b3be7707f915"
+ }
+ Frame {
+ msec: 7904
+ hash: "831efd0970c5c29fbe10b3be7707f915"
+ }
+ Frame {
+ msec: 7920
+ hash: "831efd0970c5c29fbe10b3be7707f915"
+ }
+ Frame {
+ msec: 7936
+ hash: "831efd0970c5c29fbe10b3be7707f915"
+ }
+ Frame {
+ msec: 7952
+ hash: "831efd0970c5c29fbe10b3be7707f915"
+ }
+ Frame {
+ msec: 7968
+ hash: "831efd0970c5c29fbe10b3be7707f915"
+ }
+ Key {
+ type: 6
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 7984
+ hash: "831efd0970c5c29fbe10b3be7707f915"
+ }
+ Frame {
+ msec: 8000
+ hash: "0587fc809c38c3bbe1fbac2960596974"
+ }
+ Frame {
+ msec: 8016
+ hash: "d20eba806cf4730a850db4c095fa36f9"
+ }
+ Key {
+ type: 7
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 8032
+ hash: "c1663e75ba05b341e1e970a451958ea0"
+ }
+ Frame {
+ msec: 8048
+ hash: "ea40cc33b689d6b42fc5a69fa30178e4"
+ }
+ Frame {
+ msec: 8064
+ hash: "a07a1c61de1813158ff743cd326ee427"
+ }
+ Frame {
+ msec: 8080
+ hash: "6dfddaa340df8999ca77f6a6e4c6c3ce"
+ }
+ Frame {
+ msec: 8096
+ hash: "76ca40bb169c1ddc291847d4be2d38d7"
+ }
+ Frame {
+ msec: 8112
+ hash: "e44778541b76208981a3944a64235cac"
+ }
+ Frame {
+ msec: 8128
+ hash: "fdf45ea650d31957cc675c3bec8bf53e"
+ }
+ Frame {
+ msec: 8144
+ hash: "b78cdb727535ab7e567af08abf25e64c"
+ }
+ Frame {
+ msec: 8160
+ hash: "b78cdb727535ab7e567af08abf25e64c"
+ }
+ Frame {
+ msec: 8176
+ hash: "b78cdb727535ab7e567af08abf25e64c"
+ }
+ Frame {
+ msec: 8192
+ hash: "b78cdb727535ab7e567af08abf25e64c"
+ }
+ Frame {
+ msec: 8208
+ hash: "b78cdb727535ab7e567af08abf25e64c"
+ }
+ Frame {
+ msec: 8224
+ hash: "b78cdb727535ab7e567af08abf25e64c"
+ }
+ Frame {
+ msec: 8240
+ hash: "b78cdb727535ab7e567af08abf25e64c"
+ }
+ Key {
+ type: 6
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 8256
+ hash: "b78cdb727535ab7e567af08abf25e64c"
+ }
+ Frame {
+ msec: 8272
+ hash: "338481e6390f2a61e975084c16427584"
+ }
+ Frame {
+ msec: 8288
+ hash: "8923c45c23b1f4250b7d1e483b07a4da"
+ }
+ Frame {
+ msec: 8304
+ hash: "b21de834906d0eecea985561e2e41e4f"
+ }
+ Frame {
+ msec: 8320
+ hash: "a8c9761cfb20631520ed890cd2648c4b"
+ }
+ Frame {
+ msec: 8336
+ hash: "abf96a042ef12190bc48ff49732ef55a"
+ }
+ Key {
+ type: 7
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 8352
+ hash: "5b9506dfb038cd26dfc81ecd2406ada9"
+ }
+ Frame {
+ msec: 8368
+ hash: "be75b8d39f81b2fdaff01469bfc67d4a"
+ }
+ Frame {
+ msec: 8384
+ hash: "488aa2977f349df82b5f6ae5e3619d35"
+ }
+ Frame {
+ msec: 8400
+ hash: "d69f17f0ce8537511353d20b59d20de0"
+ }
+ Frame {
+ msec: 8416
+ hash: "7647efcc0152cc3d6544106f969ace26"
+ }
+ Frame {
+ msec: 8432
+ hash: "7647efcc0152cc3d6544106f969ace26"
+ }
+ Frame {
+ msec: 8448
+ hash: "7647efcc0152cc3d6544106f969ace26"
+ }
+ Frame {
+ msec: 8464
+ hash: "7647efcc0152cc3d6544106f969ace26"
+ }
+ Frame {
+ msec: 8480
+ hash: "7647efcc0152cc3d6544106f969ace26"
+ }
+ Frame {
+ msec: 8496
+ hash: "7647efcc0152cc3d6544106f969ace26"
+ }
+ Frame {
+ msec: 8512
+ hash: "7647efcc0152cc3d6544106f969ace26"
+ }
+ Frame {
+ msec: 8528
+ hash: "7647efcc0152cc3d6544106f969ace26"
+ }
+ Frame {
+ msec: 8544
+ hash: "7647efcc0152cc3d6544106f969ace26"
+ }
+ Key {
+ type: 6
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 8560
+ hash: "7647efcc0152cc3d6544106f969ace26"
+ }
+ Frame {
+ msec: 8576
+ hash: "8f74d33bf95cbf37fdb4521c69373a64"
+ }
+ Frame {
+ msec: 8592
+ hash: "e33bb4cd12790c9d9992efdd3e23bee9"
+ }
+ Frame {
+ msec: 8608
+ hash: "36f32e34b4093091c4707f26c52896ad"
+ }
+ Frame {
+ msec: 8624
+ hash: "5ab5e142f8dc883287c116cedbacfd55"
+ }
+ Frame {
+ msec: 8640
+ image: "gridview.8.png"
+ }
+ Key {
+ type: 7
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 8656
+ hash: "c74212e45a6c4b6a18caeb6a22350609"
+ }
+ Frame {
+ msec: 8672
+ hash: "8919643a7d13677dd902941860093209"
+ }
+ Frame {
+ msec: 8688
+ hash: "6f2ab4400fadf51b994351f0975e31fc"
+ }
+ Frame {
+ msec: 8704
+ hash: "4798559ce6f9bd7455ed5385d0030763"
+ }
+ Frame {
+ msec: 8720
+ hash: "72759bd1e2618c61c42bbe4de3ad3a96"
+ }
+ Frame {
+ msec: 8736
+ hash: "72759bd1e2618c61c42bbe4de3ad3a96"
+ }
+ Frame {
+ msec: 8752
+ hash: "72759bd1e2618c61c42bbe4de3ad3a96"
+ }
+ Frame {
+ msec: 8768
+ hash: "72759bd1e2618c61c42bbe4de3ad3a96"
+ }
+ Frame {
+ msec: 8784
+ hash: "72759bd1e2618c61c42bbe4de3ad3a96"
+ }
+ Frame {
+ msec: 8800
+ hash: "72759bd1e2618c61c42bbe4de3ad3a96"
+ }
+ Frame {
+ msec: 8816
+ hash: "72759bd1e2618c61c42bbe4de3ad3a96"
+ }
+ Frame {
+ msec: 8832
+ hash: "72759bd1e2618c61c42bbe4de3ad3a96"
+ }
+ Frame {
+ msec: 8848
+ hash: "72759bd1e2618c61c42bbe4de3ad3a96"
+ }
+ Frame {
+ msec: 8864
+ hash: "72759bd1e2618c61c42bbe4de3ad3a96"
+ }
+ Key {
+ type: 6
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 8880
+ hash: "72759bd1e2618c61c42bbe4de3ad3a96"
+ }
+ Frame {
+ msec: 8896
+ hash: "fac81cf6f45cb47abc1fa36d23e39d34"
+ }
+ Frame {
+ msec: 8912
+ hash: "862f4deee01183fd38b094da59048b23"
+ }
+ Frame {
+ msec: 8928
+ hash: "2f3b147221da30d8857d25fc788b3eac"
+ }
+ Frame {
+ msec: 8944
+ hash: "5b295b187c6cfc6aefa51e5efc2c27e3"
+ }
+ Frame {
+ msec: 8960
+ hash: "fe3139ddc8fdbc1b0c25bd641f83e833"
+ }
+ Key {
+ type: 7
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 8976
+ hash: "8f2a9585dc6248a403aafd0f151d6ba0"
+ }
+ Frame {
+ msec: 8992
+ hash: "39eca8cc6bb8ea30cc452dc24f8e46dc"
+ }
+ Frame {
+ msec: 9008
+ hash: "8dbbc6026942cb6e572f1cb7e2675713"
+ }
+ Frame {
+ msec: 9024
+ hash: "62dfa07b96dd18c6be89822654bf09f3"
+ }
+ Frame {
+ msec: 9040
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9056
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9072
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9088
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9104
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9120
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9136
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9152
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9168
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9184
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9200
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9216
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9232
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9248
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9264
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Key {
+ type: 6
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 9280
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9296
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9312
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9328
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9344
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9360
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9376
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Key {
+ type: 7
+ key: 16777235
+ modifiers: 536870912
+ text: "1e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 9392
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9408
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9424
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9440
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9456
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9472
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9488
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9504
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9520
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9536
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9552
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9568
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9584
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9600
+ image: "gridview.9.png"
+ }
+ Frame {
+ msec: 9616
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9632
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9648
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9664
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9680
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9696
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9712
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9728
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9744
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9760
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 9776
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9792
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9808
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9824
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+ Frame {
+ msec: 9840
+ hash: "02c632713d0dc64bff9d8e58f745df95"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.0.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.0.png
new file mode 100644
index 0000000000..3021d5831d
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.1.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.1.png
new file mode 100644
index 0000000000..baeb1a60b4
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.10.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.10.png
new file mode 100644
index 0000000000..b0486e5923
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.10.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.2.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.2.png
new file mode 100644
index 0000000000..2d0c7314f2
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.3.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.3.png
new file mode 100644
index 0000000000..af9ed05a63
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.4.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.4.png
new file mode 100644
index 0000000000..0b0945d88d
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.5.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.5.png
new file mode 100644
index 0000000000..618ae0c8c9
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.6.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.6.png
new file mode 100644
index 0000000000..fc31262bbd
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.7.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.7.png
new file mode 100644
index 0000000000..22291ac94a
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.8.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.8.png
new file mode 100644
index 0000000000..3021d5831d
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.8.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.9.png b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.9.png
new file mode 100644
index 0000000000..2f2f5b9b6f
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.9.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.qml b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.qml
new file mode 100644
index 0000000000..fb5f1fbaaa
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/data/gridview2.qml
@@ -0,0 +1,2479 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "dba2f6f1c773bd4cd9523108fca861c4"
+ }
+ Frame {
+ msec: 32
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 48
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 64
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 80
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 96
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 112
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 128
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 144
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 160
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 176
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 192
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 208
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 224
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 240
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 256
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 272
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 288
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 304
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 320
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 336
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 352
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 368
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 384
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 400
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 416
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 432
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 448
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 464
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 480
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 496
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 512
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 528
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 544
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 560
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 576
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 592
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 608
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 624
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 640
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 656
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 672
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 688
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 704
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 720
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 736
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 752
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 768
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 784
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 800
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 816
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 832
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 848
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 864
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 880
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 896
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 912
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 928
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 944
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 960
+ image: "gridview2.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 992
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 1008
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 1024
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 1040
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 1056
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 1072
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 1088
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 1104
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 1120
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 1136
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 1152
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 1168
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 1184
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 1200
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 1216
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 1232
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 1248
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1264
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 1280
+ hash: "aaec7184a27e6700d96ffff376b8fa53"
+ }
+ Frame {
+ msec: 1296
+ hash: "3fa3a890a4ff4a59336a9a2d478d0dde"
+ }
+ Frame {
+ msec: 1312
+ hash: "3711c6c2f4f9aba7f2c72bd1f1d85016"
+ }
+ Frame {
+ msec: 1328
+ hash: "23da2f9a800b805ce7b77ff08218907d"
+ }
+ Frame {
+ msec: 1344
+ hash: "12e4bc953b06cdaad0720f87fb96a37e"
+ }
+ Frame {
+ msec: 1360
+ hash: "46e69658bda69bab202a2790a76ba1cd"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1376
+ hash: "44608e67c69b92ccbb45e119e1158fe3"
+ }
+ Frame {
+ msec: 1392
+ hash: "97a309b47017d38294644a486a7ce68e"
+ }
+ Frame {
+ msec: 1408
+ hash: "41f42b50b22e0496c8aca5019b24b9cb"
+ }
+ Frame {
+ msec: 1424
+ hash: "8603ea1cb60c804563f50bc41c0180fe"
+ }
+ Frame {
+ msec: 1440
+ hash: "e29777fa70daafe9640c6e9bb7bd63d6"
+ }
+ Frame {
+ msec: 1456
+ hash: "2c4c360320f527e99fee799e68c2c0aa"
+ }
+ Frame {
+ msec: 1472
+ hash: "0d30916c7e05ff8609af5894f47a89bb"
+ }
+ Frame {
+ msec: 1488
+ hash: "0d30916c7e05ff8609af5894f47a89bb"
+ }
+ Frame {
+ msec: 1504
+ hash: "0d30916c7e05ff8609af5894f47a89bb"
+ }
+ Frame {
+ msec: 1520
+ hash: "0d30916c7e05ff8609af5894f47a89bb"
+ }
+ Frame {
+ msec: 1536
+ hash: "0d30916c7e05ff8609af5894f47a89bb"
+ }
+ Frame {
+ msec: 1552
+ hash: "0d30916c7e05ff8609af5894f47a89bb"
+ }
+ Frame {
+ msec: 1568
+ hash: "0d30916c7e05ff8609af5894f47a89bb"
+ }
+ Frame {
+ msec: 1584
+ hash: "0d30916c7e05ff8609af5894f47a89bb"
+ }
+ Key {
+ type: 6
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1600
+ hash: "0d30916c7e05ff8609af5894f47a89bb"
+ }
+ Frame {
+ msec: 1616
+ hash: "17027b7c099b11cb5382f30dbbd1e647"
+ }
+ Frame {
+ msec: 1632
+ hash: "0e17461a4ca843f9903b7f03e99a0b00"
+ }
+ Frame {
+ msec: 1648
+ hash: "a5e61901920553e59892fa405beea15a"
+ }
+ Frame {
+ msec: 1664
+ hash: "310eaf71fe8d3807606e58a666c65ccd"
+ }
+ Frame {
+ msec: 1680
+ hash: "76f556d05fb77082f33eb1836c10587a"
+ }
+ Key {
+ type: 7
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1696
+ hash: "4e7e4b7790a96396e7ea3533b5c32ed9"
+ }
+ Frame {
+ msec: 1712
+ hash: "b065287b6490f58ca6f0e9eb2027cf20"
+ }
+ Frame {
+ msec: 1728
+ hash: "907cd9dbdffa1d395caaabd466dc8e86"
+ }
+ Frame {
+ msec: 1744
+ hash: "3b144e5b4867328beafa3020ce931480"
+ }
+ Frame {
+ msec: 1760
+ hash: "b59b2b60b7d55424b61b1b0ed3e227b8"
+ }
+ Frame {
+ msec: 1776
+ hash: "4032e934871b315b68c7c2abea42efee"
+ }
+ Frame {
+ msec: 1792
+ hash: "8f80127b2f8d6fc10aa84062544cc381"
+ }
+ Frame {
+ msec: 1808
+ hash: "77d5193bc5f53fe5cb98a236c55f841e"
+ }
+ Frame {
+ msec: 1824
+ hash: "77d5193bc5f53fe5cb98a236c55f841e"
+ }
+ Frame {
+ msec: 1840
+ hash: "77d5193bc5f53fe5cb98a236c55f841e"
+ }
+ Frame {
+ msec: 1856
+ hash: "77d5193bc5f53fe5cb98a236c55f841e"
+ }
+ Frame {
+ msec: 1872
+ hash: "77d5193bc5f53fe5cb98a236c55f841e"
+ }
+ Frame {
+ msec: 1888
+ hash: "77d5193bc5f53fe5cb98a236c55f841e"
+ }
+ Frame {
+ msec: 1904
+ hash: "77d5193bc5f53fe5cb98a236c55f841e"
+ }
+ Frame {
+ msec: 1920
+ image: "gridview2.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "77d5193bc5f53fe5cb98a236c55f841e"
+ }
+ Frame {
+ msec: 1952
+ hash: "77d5193bc5f53fe5cb98a236c55f841e"
+ }
+ Frame {
+ msec: 1968
+ hash: "77d5193bc5f53fe5cb98a236c55f841e"
+ }
+ Frame {
+ msec: 1984
+ hash: "77d5193bc5f53fe5cb98a236c55f841e"
+ }
+ Frame {
+ msec: 2000
+ hash: "77d5193bc5f53fe5cb98a236c55f841e"
+ }
+ Frame {
+ msec: 2016
+ hash: "77d5193bc5f53fe5cb98a236c55f841e"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2032
+ hash: "77d5193bc5f53fe5cb98a236c55f841e"
+ }
+ Frame {
+ msec: 2048
+ hash: "a45d2630872a14541f39b862e15ff461"
+ }
+ Frame {
+ msec: 2064
+ hash: "714711d7382ef8bba5fb39e2e44bd59c"
+ }
+ Frame {
+ msec: 2080
+ hash: "63deed0356e761f94f88be18a7d10053"
+ }
+ Frame {
+ msec: 2096
+ hash: "d5b4fc1b568a4a1b63a91b422272c704"
+ }
+ Frame {
+ msec: 2112
+ hash: "b6d2c80925cc6b4b7b297bd6ee903c7c"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2128
+ hash: "38117482196360353586cb7ace593894"
+ }
+ Frame {
+ msec: 2144
+ hash: "2301f3a148bf4e311cc8ce011ddf65f8"
+ }
+ Frame {
+ msec: 2160
+ hash: "2a4982a0961f89a15618f8d4c2081f5a"
+ }
+ Frame {
+ msec: 2176
+ hash: "acf8666d6a8a29925f3895aa8e93f713"
+ }
+ Frame {
+ msec: 2192
+ hash: "967ed026bc92a6d2747c5227105543a6"
+ }
+ Frame {
+ msec: 2208
+ hash: "ff72f3fb95f25990c99c1c14cfef57da"
+ }
+ Frame {
+ msec: 2224
+ hash: "0874a4f863596c3860dcf5b1f7f6ceb2"
+ }
+ Frame {
+ msec: 2240
+ hash: "520445d8619ad9bdde0db0e61f17567c"
+ }
+ Frame {
+ msec: 2256
+ hash: "520445d8619ad9bdde0db0e61f17567c"
+ }
+ Frame {
+ msec: 2272
+ hash: "520445d8619ad9bdde0db0e61f17567c"
+ }
+ Frame {
+ msec: 2288
+ hash: "520445d8619ad9bdde0db0e61f17567c"
+ }
+ Frame {
+ msec: 2304
+ hash: "520445d8619ad9bdde0db0e61f17567c"
+ }
+ Frame {
+ msec: 2320
+ hash: "520445d8619ad9bdde0db0e61f17567c"
+ }
+ Frame {
+ msec: 2336
+ hash: "520445d8619ad9bdde0db0e61f17567c"
+ }
+ Frame {
+ msec: 2352
+ hash: "520445d8619ad9bdde0db0e61f17567c"
+ }
+ Frame {
+ msec: 2368
+ hash: "520445d8619ad9bdde0db0e61f17567c"
+ }
+ Key {
+ type: 6
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2384
+ hash: "520445d8619ad9bdde0db0e61f17567c"
+ }
+ Frame {
+ msec: 2400
+ hash: "7c4bbf0423d63d7642d218cac56a6215"
+ }
+ Frame {
+ msec: 2416
+ hash: "e8c77dbc89721b51549f8d46453fe09d"
+ }
+ Frame {
+ msec: 2432
+ hash: "7953503590b639872ac12215695e8cea"
+ }
+ Frame {
+ msec: 2448
+ hash: "edaee946a2e25fed6de9acfda0d44a14"
+ }
+ Frame {
+ msec: 2464
+ hash: "4996ef39bb0122c10d65f8dd8674b386"
+ }
+ Frame {
+ msec: 2480
+ hash: "ede7c6ca9d6deb7819c3715e98755d6e"
+ }
+ Frame {
+ msec: 2496
+ hash: "e703fad2fcf9244ec9865200c7d17ce3"
+ }
+ Key {
+ type: 7
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2512
+ hash: "e2bfc16fd893bb3eb0e5df89a0169af3"
+ }
+ Frame {
+ msec: 2528
+ hash: "cfd0eb2bc378bd46644f3f7820150685"
+ }
+ Frame {
+ msec: 2544
+ hash: "442b05b04762c2bcda291aaa0341398e"
+ }
+ Frame {
+ msec: 2560
+ hash: "55842a6503057eea98e2075ef160873e"
+ }
+ Frame {
+ msec: 2576
+ hash: "730f80233dacf1119660a76d2a34c5fc"
+ }
+ Frame {
+ msec: 2592
+ hash: "d4a48ee79a18cc5c0bc123fbb40c3efd"
+ }
+ Frame {
+ msec: 2608
+ hash: "d4a48ee79a18cc5c0bc123fbb40c3efd"
+ }
+ Frame {
+ msec: 2624
+ hash: "d4a48ee79a18cc5c0bc123fbb40c3efd"
+ }
+ Frame {
+ msec: 2640
+ hash: "d4a48ee79a18cc5c0bc123fbb40c3efd"
+ }
+ Frame {
+ msec: 2656
+ hash: "d4a48ee79a18cc5c0bc123fbb40c3efd"
+ }
+ Frame {
+ msec: 2672
+ hash: "d4a48ee79a18cc5c0bc123fbb40c3efd"
+ }
+ Frame {
+ msec: 2688
+ hash: "d4a48ee79a18cc5c0bc123fbb40c3efd"
+ }
+ Frame {
+ msec: 2704
+ hash: "d4a48ee79a18cc5c0bc123fbb40c3efd"
+ }
+ Frame {
+ msec: 2720
+ hash: "d4a48ee79a18cc5c0bc123fbb40c3efd"
+ }
+ Frame {
+ msec: 2736
+ hash: "d4a48ee79a18cc5c0bc123fbb40c3efd"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2752
+ hash: "d4a48ee79a18cc5c0bc123fbb40c3efd"
+ }
+ Frame {
+ msec: 2768
+ hash: "4d04c12bc7fab0b22df3135bf3a87a22"
+ }
+ Frame {
+ msec: 2784
+ hash: "fdca5a3f8312452feba7f37b1caa6419"
+ }
+ Frame {
+ msec: 2800
+ hash: "97b955e0f8cde30299b238d9ac0eb308"
+ }
+ Frame {
+ msec: 2816
+ hash: "19664de1a738458810896959ba4087ad"
+ }
+ Frame {
+ msec: 2832
+ hash: "4f9a4b6de6a2969e4639076a8f7c258e"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 536870912
+ text: "1c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2848
+ hash: "a10f18aa686be2681a48082ec9f01df7"
+ }
+ Frame {
+ msec: 2864
+ hash: "b8f39a6cca377dd573429d879286dd63"
+ }
+ Frame {
+ msec: 2880
+ image: "gridview2.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "3301e52a46efbc49882401c77853ffde"
+ }
+ Frame {
+ msec: 2912
+ hash: "0c614597f17496ebc701efe7b0c1fbb6"
+ }
+ Frame {
+ msec: 2928
+ hash: "6dda2d6b034c932e279cf216c9b3e6ad"
+ }
+ Frame {
+ msec: 2944
+ hash: "7bf08cd5fe3ad3f83bbef28f452e0545"
+ }
+ Frame {
+ msec: 2960
+ hash: "1b7ebcf0e3d68e429cb04966120985e5"
+ }
+ Frame {
+ msec: 2976
+ hash: "1b7ebcf0e3d68e429cb04966120985e5"
+ }
+ Frame {
+ msec: 2992
+ hash: "1b7ebcf0e3d68e429cb04966120985e5"
+ }
+ Frame {
+ msec: 3008
+ hash: "1b7ebcf0e3d68e429cb04966120985e5"
+ }
+ Frame {
+ msec: 3024
+ hash: "1b7ebcf0e3d68e429cb04966120985e5"
+ }
+ Key {
+ type: 6
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3040
+ hash: "1b7ebcf0e3d68e429cb04966120985e5"
+ }
+ Frame {
+ msec: 3056
+ hash: "0fe7d46e7c18ce7bb5a098c5c662d557"
+ }
+ Frame {
+ msec: 3072
+ hash: "cd5df541cc1ed545bc27da9e4a937261"
+ }
+ Frame {
+ msec: 3088
+ hash: "35762467b83fee1870cff9b0436994d3"
+ }
+ Frame {
+ msec: 3104
+ hash: "75a620b42caabf5b1576041dbd4c2808"
+ }
+ Frame {
+ msec: 3120
+ hash: "f1b06290a6cbd48b8d3d4ce1e42ed754"
+ }
+ Frame {
+ msec: 3136
+ hash: "8e1a50dc082828587a4656117760a852"
+ }
+ Frame {
+ msec: 3152
+ hash: "aae8e5f166e736040138d8e222a844dd"
+ }
+ Frame {
+ msec: 3168
+ hash: "f69e5cf2bcb26fe49126776695b0b7e0"
+ }
+ Key {
+ type: 7
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3184
+ hash: "7b482fece0255ea07496ef0545b008a2"
+ }
+ Frame {
+ msec: 3200
+ hash: "3f96eaebfebe8d4eeb347b201b59ab11"
+ }
+ Frame {
+ msec: 3216
+ hash: "9943626d2226c3be711c8213906133f0"
+ }
+ Frame {
+ msec: 3232
+ hash: "fd5fd8177b3957c27f1de0d95621351a"
+ }
+ Frame {
+ msec: 3248
+ hash: "506283ccfe9670633ce0bf60b437b37b"
+ }
+ Frame {
+ msec: 3264
+ hash: "506283ccfe9670633ce0bf60b437b37b"
+ }
+ Frame {
+ msec: 3280
+ hash: "506283ccfe9670633ce0bf60b437b37b"
+ }
+ Frame {
+ msec: 3296
+ hash: "506283ccfe9670633ce0bf60b437b37b"
+ }
+ Frame {
+ msec: 3312
+ hash: "506283ccfe9670633ce0bf60b437b37b"
+ }
+ Frame {
+ msec: 3328
+ hash: "506283ccfe9670633ce0bf60b437b37b"
+ }
+ Frame {
+ msec: 3344
+ hash: "506283ccfe9670633ce0bf60b437b37b"
+ }
+ Frame {
+ msec: 3360
+ hash: "506283ccfe9670633ce0bf60b437b37b"
+ }
+ Frame {
+ msec: 3376
+ hash: "506283ccfe9670633ce0bf60b437b37b"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3392
+ hash: "506283ccfe9670633ce0bf60b437b37b"
+ }
+ Frame {
+ msec: 3408
+ hash: "fb437f6c23561092a124e498f1604ff2"
+ }
+ Frame {
+ msec: 3424
+ hash: "402ba144bbb7260eec4553e68eb35cda"
+ }
+ Frame {
+ msec: 3440
+ hash: "76a983de9e85e0c81dfb8908252bd6c9"
+ }
+ Frame {
+ msec: 3456
+ hash: "09219f55fae47a0afed887ebf68a36bc"
+ }
+ Frame {
+ msec: 3472
+ hash: "344e81cc262093facef2f6a235a734dc"
+ }
+ Frame {
+ msec: 3488
+ hash: "8f1c5544eb537555b1c59a377b15e31d"
+ }
+ Frame {
+ msec: 3504
+ hash: "606b9bb549fe2e4bbd09d67b7dea0d1a"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3520
+ hash: "63e239c97bd01a61cb31ef2869e7f47c"
+ }
+ Frame {
+ msec: 3536
+ hash: "f7c176550c39f8a1ad64590cf33a60a4"
+ }
+ Frame {
+ msec: 3552
+ hash: "8581cb14ed81efdf9abb638b5e542cc3"
+ }
+ Frame {
+ msec: 3568
+ hash: "7a1e9354ecc49d8bc27d303c7bdc81f9"
+ }
+ Frame {
+ msec: 3584
+ hash: "610288b97276ee03702ed8a814ef333d"
+ }
+ Frame {
+ msec: 3600
+ hash: "8d36bc2f3ab614d19f3ec8821f3e81ed"
+ }
+ Frame {
+ msec: 3616
+ hash: "8d36bc2f3ab614d19f3ec8821f3e81ed"
+ }
+ Frame {
+ msec: 3632
+ hash: "8d36bc2f3ab614d19f3ec8821f3e81ed"
+ }
+ Frame {
+ msec: 3648
+ hash: "8d36bc2f3ab614d19f3ec8821f3e81ed"
+ }
+ Frame {
+ msec: 3664
+ hash: "8d36bc2f3ab614d19f3ec8821f3e81ed"
+ }
+ Frame {
+ msec: 3680
+ hash: "8d36bc2f3ab614d19f3ec8821f3e81ed"
+ }
+ Frame {
+ msec: 3696
+ hash: "8d36bc2f3ab614d19f3ec8821f3e81ed"
+ }
+ Frame {
+ msec: 3712
+ hash: "8d36bc2f3ab614d19f3ec8821f3e81ed"
+ }
+ Frame {
+ msec: 3728
+ hash: "8d36bc2f3ab614d19f3ec8821f3e81ed"
+ }
+ Frame {
+ msec: 3744
+ hash: "8d36bc2f3ab614d19f3ec8821f3e81ed"
+ }
+ Frame {
+ msec: 3760
+ hash: "8d36bc2f3ab614d19f3ec8821f3e81ed"
+ }
+ Frame {
+ msec: 3776
+ hash: "8d36bc2f3ab614d19f3ec8821f3e81ed"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3792
+ hash: "8d36bc2f3ab614d19f3ec8821f3e81ed"
+ }
+ Frame {
+ msec: 3808
+ hash: "9713c6b9aff051dd0cc45c545d34b688"
+ }
+ Frame {
+ msec: 3824
+ hash: "1f8fd4d759e343720a8681b6ad126b72"
+ }
+ Frame {
+ msec: 3840
+ image: "gridview2.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "8550d916d91a40b0c3a886b962e07ffc"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3872
+ hash: "df0c2e474139e79429bfc19c79a65ef8"
+ }
+ Frame {
+ msec: 3888
+ hash: "acfb99d081d754276e5ed59bd590aeab"
+ }
+ Frame {
+ msec: 3904
+ hash: "2b34cd101b442f7a3de2893fd5514c16"
+ }
+ Frame {
+ msec: 3920
+ hash: "df92ced66faa1d59354d8010278438ec"
+ }
+ Frame {
+ msec: 3936
+ hash: "dd39a8e6fa3784453461193a6da416cd"
+ }
+ Frame {
+ msec: 3952
+ hash: "5670e8f91ea2df451f0974a51cd77d7d"
+ }
+ Frame {
+ msec: 3968
+ hash: "74b97a09bfe7400872a2c6214e04a5ac"
+ }
+ Frame {
+ msec: 3984
+ hash: "cfd55b963506ab54cf09a7311e84bcc9"
+ }
+ Frame {
+ msec: 4000
+ hash: "59657ee9293c03f064d62de826931435"
+ }
+ Frame {
+ msec: 4016
+ hash: "31f6a4adf31be5ed0af0ea4097e3acee"
+ }
+ Frame {
+ msec: 4032
+ hash: "8f5bfc40c8cdb2f8ce69adb72e7efe76"
+ }
+ Frame {
+ msec: 4048
+ hash: "9dc38985113124130e2ca7950e0bd144"
+ }
+ Frame {
+ msec: 4064
+ hash: "786e6e8b9e74876a6f393d61a78b8fc7"
+ }
+ Frame {
+ msec: 4080
+ hash: "1f4d59a4e4684aab309363a711b30006"
+ }
+ Frame {
+ msec: 4096
+ hash: "a11e332de151b43051796e16dbcf75c3"
+ }
+ Frame {
+ msec: 4112
+ hash: "1a0e82029ae107cb2a018786752433ff"
+ }
+ Frame {
+ msec: 4128
+ hash: "b14c51977c7fbf51f9cf6fec309bff6a"
+ }
+ Frame {
+ msec: 4144
+ hash: "2b418f811992399c3f87c268db745632"
+ }
+ Frame {
+ msec: 4160
+ hash: "0e9a056207053ca98c4e9f42de244c62"
+ }
+ Frame {
+ msec: 4176
+ hash: "1945c3f9e3a1337e7d111e15adea345f"
+ }
+ Frame {
+ msec: 4192
+ hash: "d8cf36b6cc15a01ead815d814ae81cb4"
+ }
+ Frame {
+ msec: 4208
+ hash: "d8cf36b6cc15a01ead815d814ae81cb4"
+ }
+ Frame {
+ msec: 4224
+ hash: "d8cf36b6cc15a01ead815d814ae81cb4"
+ }
+ Frame {
+ msec: 4240
+ hash: "d8cf36b6cc15a01ead815d814ae81cb4"
+ }
+ Frame {
+ msec: 4256
+ hash: "d8cf36b6cc15a01ead815d814ae81cb4"
+ }
+ Frame {
+ msec: 4272
+ hash: "d8cf36b6cc15a01ead815d814ae81cb4"
+ }
+ Frame {
+ msec: 4288
+ hash: "d8cf36b6cc15a01ead815d814ae81cb4"
+ }
+ Frame {
+ msec: 4304
+ hash: "d8cf36b6cc15a01ead815d814ae81cb4"
+ }
+ Frame {
+ msec: 4320
+ hash: "d8cf36b6cc15a01ead815d814ae81cb4"
+ }
+ Frame {
+ msec: 4336
+ hash: "d8cf36b6cc15a01ead815d814ae81cb4"
+ }
+ Frame {
+ msec: 4352
+ hash: "d8cf36b6cc15a01ead815d814ae81cb4"
+ }
+ Frame {
+ msec: 4368
+ hash: "d8cf36b6cc15a01ead815d814ae81cb4"
+ }
+ Frame {
+ msec: 4384
+ hash: "d8cf36b6cc15a01ead815d814ae81cb4"
+ }
+ Frame {
+ msec: 4400
+ hash: "d8cf36b6cc15a01ead815d814ae81cb4"
+ }
+ Frame {
+ msec: 4416
+ hash: "d8cf36b6cc15a01ead815d814ae81cb4"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4432
+ hash: "d8cf36b6cc15a01ead815d814ae81cb4"
+ }
+ Frame {
+ msec: 4448
+ hash: "1945c3f9e3a1337e7d111e15adea345f"
+ }
+ Frame {
+ msec: 4464
+ hash: "0e9a056207053ca98c4e9f42de244c62"
+ }
+ Frame {
+ msec: 4480
+ hash: "2b418f811992399c3f87c268db745632"
+ }
+ Frame {
+ msec: 4496
+ hash: "b14c51977c7fbf51f9cf6fec309bff6a"
+ }
+ Frame {
+ msec: 4512
+ hash: "1a0e82029ae107cb2a018786752433ff"
+ }
+ Frame {
+ msec: 4528
+ hash: "a11e332de151b43051796e16dbcf75c3"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4544
+ hash: "1f4d59a4e4684aab309363a711b30006"
+ }
+ Frame {
+ msec: 4560
+ hash: "786e6e8b9e74876a6f393d61a78b8fc7"
+ }
+ Frame {
+ msec: 4576
+ hash: "9dc38985113124130e2ca7950e0bd144"
+ }
+ Frame {
+ msec: 4592
+ hash: "8f5bfc40c8cdb2f8ce69adb72e7efe76"
+ }
+ Frame {
+ msec: 4608
+ hash: "31f6a4adf31be5ed0af0ea4097e3acee"
+ }
+ Frame {
+ msec: 4624
+ hash: "59657ee9293c03f064d62de826931435"
+ }
+ Frame {
+ msec: 4640
+ hash: "23aa652a0de7fced4a780d72f0940a1b"
+ }
+ Frame {
+ msec: 4656
+ hash: "23aa652a0de7fced4a780d72f0940a1b"
+ }
+ Frame {
+ msec: 4672
+ hash: "23aa652a0de7fced4a780d72f0940a1b"
+ }
+ Frame {
+ msec: 4688
+ hash: "23aa652a0de7fced4a780d72f0940a1b"
+ }
+ Frame {
+ msec: 4704
+ hash: "23aa652a0de7fced4a780d72f0940a1b"
+ }
+ Frame {
+ msec: 4720
+ hash: "23aa652a0de7fced4a780d72f0940a1b"
+ }
+ Frame {
+ msec: 4736
+ hash: "23aa652a0de7fced4a780d72f0940a1b"
+ }
+ Frame {
+ msec: 4752
+ hash: "23aa652a0de7fced4a780d72f0940a1b"
+ }
+ Frame {
+ msec: 4768
+ hash: "23aa652a0de7fced4a780d72f0940a1b"
+ }
+ Frame {
+ msec: 4784
+ hash: "23aa652a0de7fced4a780d72f0940a1b"
+ }
+ Frame {
+ msec: 4800
+ image: "gridview2.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "23aa652a0de7fced4a780d72f0940a1b"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4832
+ hash: "23aa652a0de7fced4a780d72f0940a1b"
+ }
+ Frame {
+ msec: 4848
+ hash: "d46eea049d6156a5e85d9c6811d9d367"
+ }
+ Frame {
+ msec: 4864
+ hash: "d5796ae85247cb8502f92f0d044e4e1f"
+ }
+ Frame {
+ msec: 4880
+ hash: "90987ac49c1a4e6b668436e3ff631e6c"
+ }
+ Frame {
+ msec: 4896
+ hash: "c38d69759ad80242b1fe83ba191cd421"
+ }
+ Frame {
+ msec: 4912
+ hash: "09d08aed76a04e492d8a39cc4dd2b8f5"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 536870912
+ text: "1d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4928
+ hash: "9671d2ff9a2ef46ce3c750a1965404a4"
+ }
+ Frame {
+ msec: 4944
+ hash: "f55857816d666ece4a7987a70883b3d1"
+ }
+ Frame {
+ msec: 4960
+ hash: "a2d80527b30316d9120b057bbfcfa666"
+ }
+ Frame {
+ msec: 4976
+ hash: "87ca69287c1469cbc7e65d1673016de7"
+ }
+ Frame {
+ msec: 4992
+ hash: "51588c7ebbe2dcd87a3c9bebf028aee3"
+ }
+ Frame {
+ msec: 5008
+ hash: "917a9a171273fe9fd4c450eeed6f58ed"
+ }
+ Frame {
+ msec: 5024
+ hash: "6e7ade250a9a9692caee2a220dd2ac53"
+ }
+ Frame {
+ msec: 5040
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5056
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5072
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5088
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5104
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5120
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5136
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5152
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5168
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5184
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5200
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5216
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5232
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5248
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5264
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5280
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5296
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5312
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5328
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5344
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5360
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5376
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5392
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5408
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5424
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5440
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5456
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5472
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5488
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5504
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5520
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5536
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5552
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5568
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5584
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5600
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Key {
+ type: 6
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5616
+ hash: "ca2dcb16d553889a3a57b48700c2a595"
+ }
+ Frame {
+ msec: 5632
+ hash: "c5c9aab9bea757f1c451e89df72bd836"
+ }
+ Frame {
+ msec: 5648
+ hash: "a8cf3085f8c3b743f3f15db1ad7b8801"
+ }
+ Frame {
+ msec: 5664
+ hash: "c25a92050eced1c304506572723273a3"
+ }
+ Frame {
+ msec: 5680
+ hash: "cff981039c1a3eb6c3c1a20f142fbae2"
+ }
+ Frame {
+ msec: 5696
+ hash: "930765587fe3355873bbdff66b812b74"
+ }
+ Frame {
+ msec: 5712
+ hash: "6a60f97c7b39add465e1bd366e9c644b"
+ }
+ Key {
+ type: 7
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 5728
+ hash: "7a1fd3c488d1064a75dc598c9a773291"
+ }
+ Frame {
+ msec: 5744
+ hash: "e2ecd7e68e27eb3d2dcb5e368d3ee5a0"
+ }
+ Frame {
+ msec: 5760
+ image: "gridview2.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "20f3aaca2efc3066076e73d1d95e5363"
+ }
+ Frame {
+ msec: 5792
+ hash: "b18d476cadc36e22dddc3185f595c123"
+ }
+ Frame {
+ msec: 5808
+ hash: "8cbc47555178c8ee355774eab17b4b19"
+ }
+ Frame {
+ msec: 5824
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Frame {
+ msec: 5840
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Frame {
+ msec: 5856
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Frame {
+ msec: 5872
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Frame {
+ msec: 5888
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Frame {
+ msec: 5904
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Frame {
+ msec: 5920
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Frame {
+ msec: 5936
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Frame {
+ msec: 5952
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Frame {
+ msec: 5968
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Frame {
+ msec: 5984
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Frame {
+ msec: 6000
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Frame {
+ msec: 6016
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Frame {
+ msec: 6032
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Frame {
+ msec: 6048
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Frame {
+ msec: 6064
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Frame {
+ msec: 6080
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Frame {
+ msec: 6096
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Key {
+ type: 6
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6112
+ hash: "e488fb76fb550fba51b95bee3fee80d5"
+ }
+ Frame {
+ msec: 6128
+ hash: "8c2fab0c73d1cfbeeb0ec937085d6b3b"
+ }
+ Frame {
+ msec: 6144
+ hash: "5d9353517177ef7c6314d8a65cb009ec"
+ }
+ Frame {
+ msec: 6160
+ hash: "ed8de504f7e2028cd369c1555314fd81"
+ }
+ Frame {
+ msec: 6176
+ hash: "8fe84d8badbe5bd08d097ba6bda10611"
+ }
+ Frame {
+ msec: 6192
+ hash: "d77419a55a3cf933505e793bb258e6af"
+ }
+ Frame {
+ msec: 6208
+ hash: "457ac82be02e2f5e08e51ccc78c94781"
+ }
+ Frame {
+ msec: 6224
+ hash: "e57e2852f065afff9c24c5bc9f29edee"
+ }
+ Frame {
+ msec: 6240
+ hash: "f72cd6ad3324936c3a18c264e23e05a9"
+ }
+ Key {
+ type: 7
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6256
+ hash: "a4bf7eae6fc7a05239d09421ae95304a"
+ }
+ Frame {
+ msec: 6272
+ hash: "423f3bd07df8bee25818644c07201a3c"
+ }
+ Frame {
+ msec: 6288
+ hash: "225e9c698424f287b9458b7839b4479b"
+ }
+ Frame {
+ msec: 6304
+ hash: "0f463db7e4acc184a4efb7b5e5c0d397"
+ }
+ Frame {
+ msec: 6320
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6336
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6352
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6368
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6384
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6400
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6416
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6432
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6448
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6464
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6480
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6496
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6512
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6528
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6544
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6560
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6576
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6592
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6608
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6624
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6640
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6656
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6672
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6688
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6704
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6720
+ image: "gridview2.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Key {
+ type: 6
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6752
+ hash: "b92ad1c3be35c46c0d12bf7701c56f23"
+ }
+ Frame {
+ msec: 6768
+ hash: "738f6bcc043d221488285c7e529b1d1c"
+ }
+ Frame {
+ msec: 6784
+ hash: "cb0a4e8e79372dd67e8ecfea2143a47c"
+ }
+ Frame {
+ msec: 6800
+ hash: "544d1825b36f4e7950c1a62b26c1fd9b"
+ }
+ Frame {
+ msec: 6816
+ hash: "df99396622342b4f092b0db34a224c3d"
+ }
+ Frame {
+ msec: 6832
+ hash: "47391f51e5df2249a6ca1f1f6e8e80e0"
+ }
+ Key {
+ type: 7
+ key: 16777237
+ modifiers: 536870912
+ text: "1f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6848
+ hash: "d8079a874ca18d00aeeb611effcbeb8b"
+ }
+ Frame {
+ msec: 6864
+ hash: "4cfd9264af6935aca425da75ebb2d7cc"
+ }
+ Frame {
+ msec: 6880
+ hash: "aee6547cb653cd2d56d07285d836149d"
+ }
+ Frame {
+ msec: 6896
+ hash: "969720f17eae51258e2e143e14bfa737"
+ }
+ Frame {
+ msec: 6912
+ hash: "b6a0ee0b24737bc0045ff3fb68cfe3ad"
+ }
+ Frame {
+ msec: 6928
+ hash: "b6a0ee0b24737bc0045ff3fb68cfe3ad"
+ }
+ Frame {
+ msec: 6944
+ hash: "b6a0ee0b24737bc0045ff3fb68cfe3ad"
+ }
+ Frame {
+ msec: 6960
+ hash: "b6a0ee0b24737bc0045ff3fb68cfe3ad"
+ }
+ Frame {
+ msec: 6976
+ hash: "b6a0ee0b24737bc0045ff3fb68cfe3ad"
+ }
+ Frame {
+ msec: 6992
+ hash: "b6a0ee0b24737bc0045ff3fb68cfe3ad"
+ }
+ Frame {
+ msec: 7008
+ hash: "b6a0ee0b24737bc0045ff3fb68cfe3ad"
+ }
+ Frame {
+ msec: 7024
+ hash: "b6a0ee0b24737bc0045ff3fb68cfe3ad"
+ }
+ Frame {
+ msec: 7040
+ hash: "b6a0ee0b24737bc0045ff3fb68cfe3ad"
+ }
+ Frame {
+ msec: 7056
+ hash: "b6a0ee0b24737bc0045ff3fb68cfe3ad"
+ }
+ Frame {
+ msec: 7072
+ hash: "b6a0ee0b24737bc0045ff3fb68cfe3ad"
+ }
+ Frame {
+ msec: 7088
+ hash: "b6a0ee0b24737bc0045ff3fb68cfe3ad"
+ }
+ Frame {
+ msec: 7104
+ hash: "b6a0ee0b24737bc0045ff3fb68cfe3ad"
+ }
+ Frame {
+ msec: 7120
+ hash: "b6a0ee0b24737bc0045ff3fb68cfe3ad"
+ }
+ Frame {
+ msec: 7136
+ hash: "b6a0ee0b24737bc0045ff3fb68cfe3ad"
+ }
+ Frame {
+ msec: 7152
+ hash: "beeaec4b983c970ae448e33047dfdfea"
+ }
+ Frame {
+ msec: 7168
+ hash: "7c415ab1b7d8e25b71af75d3eec8ee4a"
+ }
+ Frame {
+ msec: 7184
+ hash: "8913037e57b9a6a58b68f2d6e69b1bd1"
+ }
+ Frame {
+ msec: 7200
+ hash: "19e59e9409fdaf90ccf75606b58688b7"
+ }
+ Frame {
+ msec: 7216
+ hash: "1ae71ef5b1006f637bd8df0769af65a6"
+ }
+ Frame {
+ msec: 7232
+ hash: "1f0aa8b368b2dbccafd54b923d8cce95"
+ }
+ Frame {
+ msec: 7248
+ hash: "c5079fb25a8c80a995d7aa5fbbd91428"
+ }
+ Frame {
+ msec: 7264
+ hash: "59f41220fa5d23db298c9e94f115c17b"
+ }
+ Frame {
+ msec: 7280
+ hash: "48259dfe8b266d9e7f50b187be98c3cb"
+ }
+ Frame {
+ msec: 7296
+ hash: "f7554552598351c3b8dfcbe3ebc32b3b"
+ }
+ Frame {
+ msec: 7312
+ hash: "219e9cd84d7e5c5c0e6cb80100aa3ab5"
+ }
+ Frame {
+ msec: 7328
+ hash: "5578e870ee8ce00bce5a59bb25e3d0a9"
+ }
+ Frame {
+ msec: 7344
+ hash: "4d9cebbf750c03380694245e0e22ab94"
+ }
+ Frame {
+ msec: 7360
+ hash: "a60a8032e97ed0a3caa05012c1283de5"
+ }
+ Frame {
+ msec: 7376
+ hash: "3bee20b349a7e9d67f7770ede6da8673"
+ }
+ Frame {
+ msec: 7392
+ hash: "d8c34576c25fb8b5e4fa12680ac32e99"
+ }
+ Frame {
+ msec: 7408
+ hash: "cd1360aa7db7c3b2f2012dfc44de2198"
+ }
+ Frame {
+ msec: 7424
+ hash: "cd82782f63c9a7d21d51b3440c2f038b"
+ }
+ Frame {
+ msec: 7440
+ hash: "e59061967a841aa45607c0828b687527"
+ }
+ Frame {
+ msec: 7456
+ hash: "01962406c9aaf1aa8bf3ab49e30ddf5f"
+ }
+ Frame {
+ msec: 7472
+ hash: "5a5732a568189e598c7985ee806bc67e"
+ }
+ Frame {
+ msec: 7488
+ hash: "54775aed3a6283c1fa330d65de5bc70c"
+ }
+ Frame {
+ msec: 7504
+ hash: "66640b4a5c1e68924b25de24e3c3f008"
+ }
+ Frame {
+ msec: 7520
+ hash: "76999d3125f20ba47dbdff38ee722a8a"
+ }
+ Frame {
+ msec: 7536
+ hash: "5159c81533bee8825cff11910bcb90dc"
+ }
+ Frame {
+ msec: 7552
+ hash: "ac0295495345987d1e000f6bb2436927"
+ }
+ Frame {
+ msec: 7568
+ hash: "d56b4a04f1d2835a0852ea20e8e2f451"
+ }
+ Frame {
+ msec: 7584
+ hash: "ae41fe23e2ab508d7642973c0d9d35b0"
+ }
+ Frame {
+ msec: 7600
+ hash: "730ca01fbee6ec4928715ec52773c06c"
+ }
+ Frame {
+ msec: 7616
+ hash: "ad1fa52c617a2b119d61eb9fb7d58a82"
+ }
+ Frame {
+ msec: 7632
+ hash: "c74321a822b515a393e8e218bd45e8e3"
+ }
+ Frame {
+ msec: 7648
+ hash: "a9e2f3bee1d47166204c74bdf90cd8c8"
+ }
+ Frame {
+ msec: 7664
+ hash: "e10d4bf08980ea7d079a2f359ee62b95"
+ }
+ Frame {
+ msec: 7680
+ image: "gridview2.7.png"
+ }
+ Frame {
+ msec: 7696
+ hash: "9f0ba6051e684e54ff4e36d980a7e600"
+ }
+ Frame {
+ msec: 7712
+ hash: "aa6268d8d7fb3d2b91db3e225e8c818a"
+ }
+ Frame {
+ msec: 7728
+ hash: "8e547e55279b1929f42bf51e753f142e"
+ }
+ Frame {
+ msec: 7744
+ hash: "5386c71f8d6701379e177f161d714da2"
+ }
+ Frame {
+ msec: 7760
+ hash: "a184e9e6012c72fc1aeaed9f98b0fb1e"
+ }
+ Frame {
+ msec: 7776
+ hash: "777a6b70ca77c45e2e5e3914cc328dcb"
+ }
+ Frame {
+ msec: 7792
+ hash: "424f73f25a1e91126f951838d45adc3b"
+ }
+ Frame {
+ msec: 7808
+ hash: "3f7f2eb6b9a5d19fbfcd700baf566dfb"
+ }
+ Frame {
+ msec: 7824
+ hash: "c3c4c72b25c2295b82a5fd7454942f77"
+ }
+ Frame {
+ msec: 7840
+ hash: "3b35e93d3eb9d28c5c03d6d353f805d2"
+ }
+ Frame {
+ msec: 7856
+ hash: "5dcad019a1c0eaaab381a7602e1914ff"
+ }
+ Frame {
+ msec: 7872
+ hash: "602a5c569555767413bf445af44c744f"
+ }
+ Frame {
+ msec: 7888
+ hash: "3e9facab95dae772f695b6f7c5175063"
+ }
+ Frame {
+ msec: 7904
+ hash: "0921220ec36ca7b25eaae699872a2006"
+ }
+ Frame {
+ msec: 7920
+ hash: "1d5fa7fd630af62bcc805bdc6686df37"
+ }
+ Frame {
+ msec: 7936
+ hash: "165c02de63604aa118d9f8995e6b45af"
+ }
+ Frame {
+ msec: 7952
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 7968
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 7984
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8000
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8016
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8032
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8048
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8064
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8080
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8096
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8112
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8128
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8144
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8160
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8176
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8192
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8208
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8224
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8240
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8256
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8272
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8288
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8304
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8320
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8336
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8352
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8368
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8384
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8400
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8416
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8432
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8448
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8464
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8480
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8496
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8512
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8528
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8544
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8560
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8576
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8592
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8608
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8624
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8640
+ image: "gridview2.8.png"
+ }
+ Frame {
+ msec: 8656
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8672
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8688
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8704
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 8720
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8736
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8752
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8768
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8784
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8800
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8816
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8832
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8848
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8864
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8880
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8896
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8912
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8928
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8944
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8960
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8976
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 8992
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 9008
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+ Frame {
+ msec: 9024
+ hash: "33d81c39d16c6a326012499796e50e03"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/gridview.qml b/tests/auto/declarative/visual/qdeclarativegridview/gridview.qml
new file mode 100644
index 0000000000..f8782a5d02
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/gridview.qml
@@ -0,0 +1,51 @@
+import Qt 4.6
+
+Rectangle {
+ width: 300; height: 400; color: "black"
+
+ ListModel {
+ id: appModel
+ ListElement { lColor: "red" }
+ ListElement { lColor: "yellow" }
+ ListElement { lColor: "green" }
+ ListElement { lColor: "blue" }
+ ListElement { lColor: "purple" }
+ ListElement { lColor: "orange" }
+ ListElement { lColor: "pink" }
+ ListElement { lColor: "brown" }
+ ListElement { lColor: "gray" }
+ ListElement { lColor: "red" }
+ ListElement { lColor: "yellow" }
+ ListElement { lColor: "green" }
+ ListElement { lColor: "blue" }
+ ListElement { lColor: "purple" }
+ ListElement { lColor: "orange" }
+ ListElement { lColor: "pink" }
+ ListElement { lColor: "brown" }
+ ListElement { lColor: "gray" }
+ }
+
+ Component {
+ id: appDelegate
+ Item {
+ width: 100; height: 100
+ Rectangle {
+ color: lColor; x: 4; y: 4
+ width: 92; height: 92
+ }
+ }
+ }
+
+ Component {
+ id: appHighlight
+ Rectangle { width: 100; height: 100; color: "white"; z: 3000 }
+ }
+
+ GridView {
+ anchors.fill: parent
+ cellWidth: 100; cellHeight: 100; cacheBuffer: 200
+ model: appModel; delegate: appDelegate
+ highlight: appHighlight
+ focus: true
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativegridview/gridview2.qml b/tests/auto/declarative/visual/qdeclarativegridview/gridview2.qml
new file mode 100644
index 0000000000..81d06cf280
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativegridview/gridview2.qml
@@ -0,0 +1,58 @@
+import Qt 4.6
+
+Rectangle {
+ width: 300; height: 400; color: "black"
+
+ ListModel {
+ id: appModel
+ ListElement { lColor: "red" }
+ ListElement { lColor: "yellow" }
+ ListElement { lColor: "green" }
+ ListElement { lColor: "blue" }
+ ListElement { lColor: "purple" }
+ ListElement { lColor: "orange" }
+ ListElement { lColor: "pink" }
+ ListElement { lColor: "brown" }
+ ListElement { lColor: "gray" }
+ ListElement { lColor: "red" }
+ ListElement { lColor: "yellow" }
+ ListElement { lColor: "green" }
+ ListElement { lColor: "blue" }
+ ListElement { lColor: "purple" }
+ ListElement { lColor: "orange" }
+ ListElement { lColor: "pink" }
+ ListElement { lColor: "brown" }
+ ListElement { lColor: "gray" }
+ ListElement { lColor: "red" }
+ ListElement { lColor: "yellow" }
+ ListElement { lColor: "green" }
+ }
+
+ Component {
+ id: appDelegate
+ Item {
+ width: 100; height: 100
+ Rectangle {
+ color: lColor; x: 4; y: 4
+ width: 92; height: 92
+ }
+ }
+ }
+
+ GridView {
+ id: gridView; anchors.fill: parent
+ cellWidth: 100; cellHeight: 100; cacheBuffer: 200
+ model: appModel; delegate: appDelegate; focus: true
+ keyNavigationWraps: true
+
+ flickableData: [
+ Rectangle {
+ color: "transparent"; border.color: "white"; border.width: 8; z: 3000
+ height: 100; width: 100; x: 4; y: 4
+ x: EaseFollow { source: gridView.currentItem.x; velocity: 500 }
+ y: EaseFollow { source: gridView.currentItem.y; velocity: 500 }
+ }
+ ]
+ }
+
+}
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.0.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.0.png
new file mode 100644
index 0000000000..cf36d605ed
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.1.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.1.png
new file mode 100644
index 0000000000..6069df845d
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.2.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.2.png
new file mode 100644
index 0000000000..b8bd5f3180
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.3.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.3.png
new file mode 100644
index 0000000000..cf36d605ed
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.4.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.4.png
new file mode 100644
index 0000000000..831d6b4633
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.5.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.5.png
new file mode 100644
index 0000000000..f7079dc16e
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.6.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.6.png
new file mode 100644
index 0000000000..a5f4451bbf
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.7.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.7.png
new file mode 100644
index 0000000000..e1261d03b0
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.8.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.8.png
new file mode 100644
index 0000000000..653905e2bb
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.8.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.qml b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.qml
new file mode 100644
index 0000000000..5a131e9ecb
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/drag.qml
@@ -0,0 +1,5207 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 32
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 48
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 64
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 80
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 96
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 112
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 128
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 144
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 160
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 176
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 192
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 208
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 224
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 240
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 256
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 272
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 288
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 304
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 320
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 336
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 352
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 368
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 384
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 400
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 416
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 432
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 448
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 464
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 480
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 496
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 512
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 528
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 544
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 560
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 576
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 592
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 608
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 624
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 640
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 656
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 672
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 688
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 704
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 720
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 736
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 752
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 768
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 784
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 800
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 816
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 832
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 848
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 864
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 880
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 896
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 912
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 928
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 944
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 960
+ image: "drag.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 992
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1008
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1024
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1040
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1056
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1072
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1088
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1104
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1120
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1136
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1152
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1168
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1184
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1200
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1216
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1232
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1248
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1264
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1280
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1296
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1312
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1328
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1344
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1360
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1376
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1392
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1408
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1424
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1440
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1456
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1472
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1488
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1504
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1520
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1536
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1552
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1568
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1584
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1600
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1616
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1632
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1648
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1664
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1680
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1696
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1712
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1728
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1744
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1760
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1776
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1792
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 16; y: 54
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1808
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 1824
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 16; y: 55
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 17; y: 55
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1840
+ hash: "b6b4b2c7acddd23609caa9727911b981"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 17; y: 55
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1856
+ hash: "b6b4b2c7acddd23609caa9727911b981"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 18; y: 55
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1872
+ hash: "022610222cfbcf9e9a8991cdb60c7bbb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 19; y: 54
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1888
+ hash: "9b5201a3201a102b20592d81218b5e74"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 22; y: 49
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 29; y: 42
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1904
+ hash: "a6c6df34bb552249393ba208ad327691"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 37; y: 35
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1920
+ image: "drag.1.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 47; y: 27
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1936
+ hash: "978543d8f9688605625f40b960d79c28"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 59; y: 21
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 73; y: 15
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1952
+ hash: "6170ab3a7e51278ac4462b89fe7781b4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 87; y: 9
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1968
+ hash: "32866f0aa5b13b3ab68661f49336439e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 100; y: 5
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1984
+ hash: "26dc17c16eed46d37932cfe48d182b62"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 111; y: 1
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 121; y: -3
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2000
+ hash: "ba70936fb44396fac184cc7ba0e94a90"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 130; y: -6
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2016
+ hash: "bae13291d4f031c34d80428d83367ede"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 140; y: -8
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2032
+ hash: "0a2fbfdc27bb6662553f637f1c325475"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 151; y: -9
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 160; y: -9
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2048
+ hash: "cdab85736dfcc4424d42e0e96094eded"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 170; y: -9
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2064
+ hash: "76d51ce9ad69560d983d8d86d50f7bd0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 174; y: -9
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2080
+ hash: "b5ada9e80f7f894aa141d5e3cfa5d69e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 176; y: -9
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2096
+ hash: "446d35fc7b9c0fe4bf0bfe0182f994f6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 183; y: -5
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2112
+ hash: "cced849d314835d43ebd93bcfe396c12"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 188; y: -3
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2128
+ hash: "09696d700944c373f82d7c6f75d51c51"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 193; y: 0
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2144
+ hash: "af56586db93c49637c9bfbb17cac9001"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 199; y: 2
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 5
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2160
+ hash: "66fc1b30b4037aad3975036faccbb7a7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 8
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2176
+ hash: "3f443d9c89d6ba1b36ca9635bc32de1a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 217; y: 11
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2192
+ hash: "df47db8cc7bb466b298749a6449d3d70"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 227; y: 15
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 234; y: 18
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 241; y: 20
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2208
+ hash: "c1146fdc0e628d050442606096e52b10"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 252; y: 23
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2224
+ hash: "22f44c43f300fd7ff2b4d87d93756178"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 272; y: 30
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2240
+ hash: "bf11dc9a9679692abde5d116a169eecf"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 299; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 329; y: 48
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2256
+ hash: "e63f1960f342639ac412010ffcefb049"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 360; y: 57
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2272
+ hash: "ae0228419ec9358025c3026a39abd671"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 392; y: 65
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2288
+ hash: "6d2272e2bea21c280100ed8de5b95d4e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 422; y: 72
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 451; y: 76
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2304
+ hash: "1628c6fa5feabd90924452bc9f55054d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 476; y: 78
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2320
+ hash: "f696791eb0a317b0efb69407616bec9f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 497; y: 78
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2336
+ hash: "f696791eb0a317b0efb69407616bec9f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 513; y: 77
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 527; y: 76
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2352
+ hash: "1628c6fa5feabd90924452bc9f55054d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 538; y: 75
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2368
+ hash: "a5d3d247e22a2852a60fe07ab40345a5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 548; y: 74
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2384
+ hash: "a453fb6bcdd87f819782d8d8c46b56ee"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 556; y: 74
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 563; y: 75
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2400
+ hash: "a5d3d247e22a2852a60fe07ab40345a5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 570; y: 76
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2416
+ hash: "1628c6fa5feabd90924452bc9f55054d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 576; y: 78
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2432
+ hash: "f696791eb0a317b0efb69407616bec9f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 582; y: 78
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 585; y: 80
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2448
+ hash: "8f061986df633c21dcad767ee857988c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 589; y: 81
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2464
+ hash: "2cc110a6fb800171d7d752693ede1e4e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 592; y: 82
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2480
+ hash: "319fc3053e02a8b161f33a79d9839bb1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 595; y: 85
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 597; y: 89
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2496
+ hash: "42915c8866746316cf1083a2d55410fb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 601; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2512
+ hash: "5df34b3ae292de9a9cd8ff09347e7bd4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 606; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2528
+ hash: "1f9bc3c955983ea85f568797cb4f7365"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 609; y: 113
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 613; y: 124
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2544
+ hash: "3f156dc64a12c672874acf5456ef4a31"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 618; y: 136
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2560
+ hash: "d4d9fe5b5f138e06a87039ebf8695d03"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 619; y: 142
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2576
+ hash: "383fe813021ee2791930200b2f88a802"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 620; y: 148
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 622; y: 155
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2592
+ hash: "a235544bd5e791dfa329bd0b87358bfa"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 625; y: 163
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2608
+ hash: "a87497cf47db3209610b532efe7eb380"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 629; y: 174
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2624
+ hash: "abe69b4e4b7508028226f9b73c38058a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 634; y: 194
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 642; y: 225
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2640
+ hash: "51c72fa2fa4c8765d882fe65dc0d697d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 649; y: 260
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2656
+ hash: "79da7ed21bd6fc16b7264d4403e763cc"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 655; y: 291
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2672
+ hash: "b2828b6340a57fa45416469b23b7cef0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 658; y: 316
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 659; y: 340
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2688
+ hash: "64a5351f2d746b338c34c7ea9ba6e1fe"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 660; y: 370
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2704
+ hash: "9eedb7a6875210084fd2ec95d3505512"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 661; y: 408
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2720
+ hash: "b88eb8fa8a0cfc263dc7b655ddc29db0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 661; y: 448
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2736
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 660; y: 487
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 659; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2752
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 658; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2768
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 658; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2784
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 658; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 658; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2800
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 657; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2816
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 656; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2832
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 654; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 652; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2848
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 651; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2864
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 650; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2880
+ image: "drag.2.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 650; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 648; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2896
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 647; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2912
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 646; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2928
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 645; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 644; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2944
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 643; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2960
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 642; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2976
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 641; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 640; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2992
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 640; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3008
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 639; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3024
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 639; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 638; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3040
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 636; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3056
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 625; y: 505
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3072
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 611; y: 505
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3088
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 582; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 546; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3104
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 505; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3120
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 460; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3136
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 408; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 354; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3152
+ hash: "c2997fdde10812f02791bfed5f158ac3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 300; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3168
+ hash: "23a6dfbd09e5b44d04f252cedaeb68af"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 250; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3184
+ hash: "f74422989711f86a0840ffc98e8a29e9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 163; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3200
+ hash: "fa922246d254a7c46d2d1d6ec91a2b02"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 140; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 122; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3216
+ hash: "ef216cb8c2bf58db7d58bd8a2e4eb38d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 101; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3232
+ hash: "a383228d22e64b8a7758c959288eaca8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 64; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3248
+ hash: "636ca2a8e91c49ef6c8b1c93b830f345"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 36; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 16; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3264
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -1; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3280
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3296
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3312
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3328
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3344
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3360
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3376
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 505
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3392
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 504
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 504
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3408
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 505
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3424
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3440
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3456
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3472
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3488
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3504
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3520
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3536
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3552
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Frame {
+ msec: 3568
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3584
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3600
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3616
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Frame {
+ msec: 3632
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 491
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3648
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 428
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3664
+ hash: "9fa1e3686467f28cb013fe093dab388c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 342
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3680
+ hash: "7ef97d10862f80d53e0b3b4446661deb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 264
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 203
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3696
+ hash: "c679866b3965b7b5f48b843d6efccf42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 160
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3712
+ hash: "de4bd9ad3cbb9bb19bf75f871b044072"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 144
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3728
+ hash: "c5349bbddc03edd5ee3537e2a738f1ad"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 136
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 132
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3744
+ hash: "bcbe9ec2687a6030385f08d3dc17becf"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 130
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3760
+ hash: "3ad767f63eaccb9e64a9f704900f2530"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 129
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3776
+ hash: "421a1ffde15fda0e7846bc095ed2ea37"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 128
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 128
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3792
+ hash: "55c260da304a6b1119af83f6a4efcff0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 123
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3808
+ hash: "f231cc521db801b4ec71248812e12db8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 104
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3824
+ hash: "b489b6b604e7f7699cac9e42d0725323"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 68
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 35
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3840
+ image: "drag.3.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 13
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3856
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 2
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3872
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: -6
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: -12
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3888
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: -25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3904
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: -46
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3920
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: -65
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: -70
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3936
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: -74
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3952
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: -76
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3968
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: -76
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3984
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: -76
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4000
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: -77
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4016
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: -78
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4032
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 4048
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: -78
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4064
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 4080
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 4096
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: -77
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4112
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 4128
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 4144
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: -78
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4160
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -3; y: -84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4176
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -2; y: -105
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 1; y: -151
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4192
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 4208
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 4224
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 4240
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 4256
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 4272
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 4288
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 4304
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 4320
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 4336
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 4352
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 4368
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Frame {
+ msec: 4384
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 3; y: -151
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4400
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 4; y: -149
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4416
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 5; y: -147
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4432
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 5; y: -143
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 6; y: -138
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4448
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 7; y: -130
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4464
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 9; y: -117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4480
+ hash: "668cc6d9d699b947a7c0f3ff4b26853f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 13; y: -94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 20; y: -63
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4496
+ hash: "b1b54f7bf8ab9cf98d96f9b34192434b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 29; y: -24
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4512
+ hash: "a6c6df34bb552249393ba208ad327691"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 39; y: 15
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4528
+ hash: "a05eb803b1f1f3574a2f2e08fe37bd35"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 49; y: 50
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 58; y: 74
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4544
+ hash: "3c2f3db46673c2640a26832900b609cb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 65; y: 91
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4560
+ hash: "d0539a9791874f48634bb3cb9f78d9db"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 71; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4576
+ hash: "f2d862a0b81e2578799d64aef2e6bddc"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 77; y: 112
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 81; y: 121
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4592
+ hash: "295ef097845e30064c4d810a7718896c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 86; y: 128
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4608
+ hash: "22a4a17d82ac402c0e8372861609ff1c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 92; y: 136
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4624
+ hash: "a70e81b1435afd77b9079c58685ef9d0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 98; y: 143
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 104; y: 151
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4640
+ hash: "d66fefd68fcd96834548c18797eee4bd"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 111; y: 159
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4656
+ hash: "fcc435dc6f2643cd21a7cfac078880af"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 118; y: 166
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4672
+ hash: "736edfcf33245d46aaea199634896c17"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 123; y: 173
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 129; y: 183
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4688
+ hash: "7b7ab312d0c6f4bfc87a2ae467324f4e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 137; y: 197
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4704
+ hash: "d78ce756fc27055eeee15001419b7fb5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 146; y: 215
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4720
+ hash: "4f15a726939d7f489d1fe58ebb5bcd0a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 157; y: 235
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 168; y: 255
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4736
+ hash: "72184d71fd2fdc6786a43045db0be68f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 180; y: 274
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4752
+ hash: "3b3f3f34218bf238f310412cb8c4968d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 293
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4768
+ hash: "24c00a7154471431d43b1db957ad6424"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 205; y: 316
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 221; y: 343
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4784
+ hash: "30081a33ab007ff2c7ba6cc293a5aec3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 237; y: 371
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4800
+ image: "drag.4.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 253; y: 396
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4816
+ hash: "c0cadb7730838d553b146804c37506b0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 268; y: 419
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 276; y: 429
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 284; y: 438
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4832
+ hash: "101c007d0e2cf82331ba1cab4880e8a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 291; y: 448
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4848
+ hash: "72e46df7427420c5e942a97831723d3f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 307; y: 468
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4864
+ hash: "4b7a009b46982a1e9e31250d7ebf0a20"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 323; y: 492
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 341; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4880
+ hash: "a3ba70933b6452fad0cdc4192e04be23"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 359; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4896
+ hash: "c2ee16182222b403f914eb5550ac6f91"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 378; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4912
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 397; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 416; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4928
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 432; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4944
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 445; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4960
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 456; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 466; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4976
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 475; y: 506
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4992
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 482; y: 505
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5008
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 488; y: 504
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 492; y: 503
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5024
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 496; y: 503
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5040
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 500; y: 502
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5056
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 507; y: 501
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5072
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 512; y: 500
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 516; y: 498
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5088
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 521; y: 494
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5104
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 525; y: 486
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5120
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 532; y: 472
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 542; y: 445
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5136
+ hash: "9356ce797d12ae076af947cd0e658551"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 553; y: 414
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5152
+ hash: "76a8d3b8465f08fdc4586c7766667eff"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 563; y: 389
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5168
+ hash: "569e56ba99776d03dd3140e53bc77f56"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 569; y: 373
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 573; y: 363
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5184
+ hash: "7139c72a2458685006da79d9cf11bc44"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 577; y: 354
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5200
+ hash: "a83d5ef213edec4c8f938ab04afb5c4f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 580; y: 344
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5216
+ hash: "5533602bc8a473c162966142d4bddebd"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 584; y: 321
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 586; y: 301
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5232
+ hash: "7a79d6e31874428233e9c141d70522fd"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 588; y: 264
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5248
+ hash: "b14f4daeb25cd71baae36f4cec111813"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 591; y: 238
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5264
+ hash: "e2b2513d2918ffb85bab5fff5a8be644"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 592; y: 225
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 593; y: 216
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5280
+ hash: "af0cbb3423491917db1fdaa8350d48b0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 594; y: 209
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5296
+ hash: "b9c107f0a13ad37ae05b4d5f9e5f5442"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 594; y: 200
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5312
+ hash: "0bbc0c7a4a40ee6b19565c04c23b565d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 594; y: 182
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 593; y: 146
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5328
+ hash: "49494e8526a1417c151c7cac7099b9e6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 590; y: 107
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5344
+ hash: "5e0839c4414cc8ddc5241c658fd3bf88"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 585; y: 80
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5360
+ hash: "8f061986df633c21dcad767ee857988c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 582; y: 67
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5376
+ hash: "d78c0a4fa0ccad407a565fab3a5c95b9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 579; y: 61
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 576; y: 57
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5392
+ hash: "cee6816f84911bc2262afe28d8996719"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 573; y: 55
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5408
+ hash: "2cc6cd514ef7299dd60bf1a735b81d36"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 569; y: 51
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5424
+ hash: "68c40f3551d7d10e61c5ffbb6948c7e6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 564; y: 44
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 557; y: 35
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5440
+ hash: "68c40f3551d7d10e61c5ffbb6948c7e6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 548; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5456
+ hash: "68c40f3551d7d10e61c5ffbb6948c7e6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 540; y: 14
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 532; y: 5
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5472
+ hash: "68c40f3551d7d10e61c5ffbb6948c7e6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 524; y: -1
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5488
+ hash: "68c40f3551d7d10e61c5ffbb6948c7e6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 517; y: -5
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5504
+ hash: "68c40f3551d7d10e61c5ffbb6948c7e6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 510; y: -9
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5520
+ hash: "68c40f3551d7d10e61c5ffbb6948c7e6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 501; y: -14
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 492; y: -18
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5536
+ hash: "68c40f3551d7d10e61c5ffbb6948c7e6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 483; y: -21
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5552
+ hash: "68c40f3551d7d10e61c5ffbb6948c7e6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 476; y: -21
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5568
+ hash: "68c40f3551d7d10e61c5ffbb6948c7e6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 470; y: -19
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 464; y: -15
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5584
+ hash: "68c40f3551d7d10e61c5ffbb6948c7e6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 458; y: -9
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5600
+ hash: "68c40f3551d7d10e61c5ffbb6948c7e6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 452; y: -3
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5616
+ hash: "68c40f3551d7d10e61c5ffbb6948c7e6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 446; y: 4
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 439; y: 11
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5632
+ hash: "68c40f3551d7d10e61c5ffbb6948c7e6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 432; y: 20
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5648
+ hash: "68c40f3551d7d10e61c5ffbb6948c7e6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 424; y: 29
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5664
+ hash: "68c40f3551d7d10e61c5ffbb6948c7e6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 413; y: 42
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 400; y: 59
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5680
+ hash: "9bc8a652f43c0e3cae9492f5dff624e7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 392; y: 70
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 385; y: 79
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5696
+ hash: "5465128afe72d9618cd9abc47f4ce72f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 378; y: 88
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5712
+ hash: "ad739c2028caf8f89d8ae04d509c7854"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 366; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 353; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5728
+ hash: "97cd37f639a7bea76a2f68774c0753db"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 339; y: 126
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5744
+ hash: "d24fc8a57dd34e6ddb726426247ec219"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 324; y: 140
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5760
+ image: "drag.5.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 308; y: 158
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 288; y: 181
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5776
+ hash: "7af87eb80fa9d87fe8d8b5e4a2fff5e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 266; y: 208
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5792
+ hash: "73623f4a857fd4d5150c2eeef1341540"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 243; y: 237
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5808
+ hash: "076c4b60d9ec197950ade51e3f1be791"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 217; y: 265
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 191; y: 291
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5824
+ hash: "22b7d7765c634763fa86912ea262efca"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 167; y: 314
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5840
+ hash: "1267c017931bda0b88b4672f46d499e0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 147; y: 331
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5856
+ hash: "b6a545e4c14b809f4ebcffbcb59a8e4f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 132; y: 344
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 121; y: 354
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5872
+ hash: "b1085cb508d4613c76e99bc879c62cbf"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 111; y: 363
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5888
+ hash: "365fd1260c2109e6d5bd0a97ce3a7e4e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 100; y: 370
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5904
+ hash: "3a7d001313b23cbbb7f3d842ab40f41b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 86; y: 377
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 66; y: 385
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5920
+ hash: "c5bda48bb2eaee54d6d8416592830327"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 45; y: 394
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5936
+ hash: "5d0fd6d8a6ced4f197fe3b09e7e9155b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 29; y: 402
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5952
+ hash: "79e2825f98644c061ae5216ae1823e4b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 16; y: 410
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 6; y: 417
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5968
+ hash: "22a3978f2f3a0cde67f459527af3b3f2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 0; y: 422
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 427
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5984
+ hash: "1511bec94911dd272f78a726e15bf76e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 432
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6000
+ hash: "0f892f7e570cdc703e492248c9f54b6c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 439
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6016
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 447
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 452
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6032
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 457
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6048
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 459
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6064
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 464
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 465
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6080
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 467
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6096
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 468
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6112
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 468
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 468
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6128
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 468
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6144
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 468
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6160
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 469
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 470
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6176
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 470
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6192
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Frame {
+ msec: 6208
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 470
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6224
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -3; y: 470
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -3; y: 470
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6240
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -2; y: 470
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6256
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -1; y: 470
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6272
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -1; y: 468
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 0; y: 467
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6288
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 0; y: 464
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6304
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 0; y: 458
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6320
+ hash: "ec34aa6937d2c081bdf11660a5eb461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -3; y: 441
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 408
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6336
+ hash: "58413f9b01f1e0b49519d8b6a3011607"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 366
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6352
+ hash: "b3992d2f9c1383c710ee325a94117a8b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 327
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6368
+ hash: "bd415044fcf6218d8184cb0206105e65"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 300
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 288
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6384
+ hash: "e7296140fe8b28bed77e95e588c0e463"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 280
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6400
+ hash: "9ff532223ccccd663809187465e478c2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 276
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6416
+ hash: "4de9ca75503db05df5d8274d75c202e5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 271
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 259
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6432
+ hash: "a83b5bc409207e986055081b4ed3faa6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 227
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6448
+ hash: "7fdbd00dd3553241f30fd6568a8ab646"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 190
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6464
+ hash: "5ebaa67eaadc1ede8c46964fa1dffff1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -4; y: 169
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: -2; y: 160
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6480
+ hash: "de4bd9ad3cbb9bb19bf75f871b044072"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 1; y: 156
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6496
+ hash: "9d762cd4dd6508cf8b54c47b76f4ef37"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 5; y: 155
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6512
+ hash: "bdf17c384f4f824a89a06b88ba17c15f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 10; y: 154
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 25; y: 152
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6528
+ hash: "f279f28995785afd143726aef7673b50"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 52; y: 149
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6544
+ hash: "53b6b82a61d017e12afb01a728d8d856"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 80; y: 148
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6560
+ hash: "9a48039175cab1360a0cf5cc195e2082"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 98; y: 148
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 112; y: 150
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6576
+ hash: "cfc3991e30eef6c2edb66cb6060b2bde"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 123; y: 153
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6592
+ hash: "737d8907f62768e623ba76866a509d1e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 134; y: 155
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6608
+ hash: "dea2a596f7d85f29728b33d126d997e5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 145; y: 158
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 157; y: 161
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6624
+ hash: "3969a0bbb284ab1d5efd20cf93b0422d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 168; y: 164
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6640
+ hash: "071ff25e49f7f16a727ff58c42ff766e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 176; y: 169
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6656
+ hash: "454abec991a4675763f379c256919fa7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 184; y: 173
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 189; y: 177
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6672
+ hash: "6de741c4e6057dc8580106155c4ac627"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 194; y: 184
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6688
+ hash: "e35853e99cd205b7ccabdf632b238584"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 199; y: 192
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6704
+ hash: "15a70a0196227c6bce50ed70cd6383c8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 201
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 211; y: 210
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6720
+ image: "drag.6.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 217; y: 217
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6736
+ hash: "5e951eb6017a060287e398fcaf4aeba9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 224; y: 223
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6752
+ hash: "ddd0f27027e23a45aef131296c781865"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 235; y: 228
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 246; y: 232
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6768
+ hash: "715102a252756e5a8c4f459d808aec6a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 257; y: 235
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6784
+ hash: "42b9c1b894247ddbd85f4a4aca5695f1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 267; y: 239
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6800
+ hash: "b67b4bdd412ed5160901803c60c6f19e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 275; y: 239
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 280; y: 239
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6816
+ hash: "3490cc41c2b1f9301c209bdb8f052add"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 281; y: 239
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6832
+ hash: "df32868d564ebbc41c359409b5a69e7d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 282; y: 239
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6848
+ hash: "b9cb430a6f677e67c87322e0aff53fb1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 282; y: 239
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6864
+ hash: "b9cb430a6f677e67c87322e0aff53fb1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 281; y: 239
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6880
+ hash: "df32868d564ebbc41c359409b5a69e7d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 280; y: 239
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6896
+ hash: "3490cc41c2b1f9301c209bdb8f052add"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 279; y: 240
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6912
+ hash: "e23a88f49a73cd2a9326095dd380ab55"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 277; y: 240
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6928
+ hash: "ffffc1aed27fe77c2fe5c035eab706a9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 277; y: 240
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6944
+ hash: "ffffc1aed27fe77c2fe5c035eab706a9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 276; y: 240
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6960
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 276; y: 240
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6976
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 6992
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 276; y: 240
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7008
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7024
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7040
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7056
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7072
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7088
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7104
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7120
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7136
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7152
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7168
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7184
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7200
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7216
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7232
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7248
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7264
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7280
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7296
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7312
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7328
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7344
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7360
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7376
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7392
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7408
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7424
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7440
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7456
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7472
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7488
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7504
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7520
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7536
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7552
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7568
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7584
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7600
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7616
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7632
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7648
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7664
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7680
+ image: "drag.7.png"
+ }
+ Frame {
+ msec: 7696
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7712
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7728
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7744
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7760
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7776
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7792
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7808
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7824
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7840
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7856
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7872
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7888
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7904
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7920
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7936
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7952
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7968
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 7984
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+ Frame {
+ msec: 8000
+ hash: "2c1ce07ab6ce0072f6cb205f1e5297e0"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.0.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.0.png
new file mode 100644
index 0000000000..c249c211d6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.1.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.1.png
new file mode 100644
index 0000000000..a96bf1ba7e
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.10.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.10.png
new file mode 100644
index 0000000000..7420ca7f83
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.10.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.11.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.11.png
new file mode 100644
index 0000000000..7420ca7f83
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.11.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.12.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.12.png
new file mode 100644
index 0000000000..7420ca7f83
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.12.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.13.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.13.png
new file mode 100644
index 0000000000..7420ca7f83
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.13.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.14.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.14.png
new file mode 100644
index 0000000000..7420ca7f83
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.14.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.15.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.15.png
new file mode 100644
index 0000000000..e797cc9322
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.15.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.16.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.16.png
new file mode 100644
index 0000000000..7951309c4f
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.16.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.17.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.17.png
new file mode 100644
index 0000000000..7951309c4f
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.17.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.18.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.18.png
new file mode 100644
index 0000000000..7951309c4f
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.18.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.19.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.19.png
new file mode 100644
index 0000000000..7951309c4f
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.19.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.2.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.2.png
new file mode 100644
index 0000000000..a96bf1ba7e
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.20.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.20.png
new file mode 100644
index 0000000000..7951309c4f
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.20.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.21.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.21.png
new file mode 100644
index 0000000000..7951309c4f
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.21.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.22.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.22.png
new file mode 100644
index 0000000000..7951309c4f
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.22.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.3.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.3.png
new file mode 100644
index 0000000000..a96bf1ba7e
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.4.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.4.png
new file mode 100644
index 0000000000..1fe365a49c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.5.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.5.png
new file mode 100644
index 0000000000..1fe365a49c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.6.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.6.png
new file mode 100644
index 0000000000..1fe365a49c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.7.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.7.png
new file mode 100644
index 0000000000..1fe365a49c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.8.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.8.png
new file mode 100644
index 0000000000..7420ca7f83
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.8.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.9.png b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.9.png
new file mode 100644
index 0000000000..7420ca7f83
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.9.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.qml b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.qml
new file mode 100644
index 0000000000..cc374fd0b6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/data/mouseregion.qml
@@ -0,0 +1,5867 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 32
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 48
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 64
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 80
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 96
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 112
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 128
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 144
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 160
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 176
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 192
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 208
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 224
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 240
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 256
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 272
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 288
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 304
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 320
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 336
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 352
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 368
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 384
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 400
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 416
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 432
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 448
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 464
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 480
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 496
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 512
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 528
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 544
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 560
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 576
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 592
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 608
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 624
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 640
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 656
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 672
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 688
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 704
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 720
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 736
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 752
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 768
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 784
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 800
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 816
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 832
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 848
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 864
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 880
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 896
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 912
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 928
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 944
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 960
+ image: "mouseregion.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 992
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1008
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1024
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1040
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1056
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1072
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1088
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1104
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1120
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1136
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1152
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1168
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1184
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1200
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1216
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1232
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1248
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1264
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1280
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1296
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1312
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1328
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1344
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1360
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1376
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1392
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1408
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1424
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1440
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1456
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1472
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1488
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1504
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1520
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1536
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1552
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1568
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1584
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1600
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1616
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1632
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1648
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Frame {
+ msec: 1664
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 2; y: 29
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 7; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1680
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 19; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 33; y: 48
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1696
+ hash: "1121bb51fc2d4c5c7ef3ae2c44794b49"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 49; y: 54
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1712
+ hash: "337f0f4af627bbdf8807135ce39d5070"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 67; y: 56
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 74; y: 56
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1728
+ hash: "337f0f4af627bbdf8807135ce39d5070"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 78; y: 57
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 81; y: 57
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1744
+ hash: "337f0f4af627bbdf8807135ce39d5070"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 82; y: 56
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 83; y: 55
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1760
+ hash: "337f0f4af627bbdf8807135ce39d5070"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 83; y: 54
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1776
+ hash: "337f0f4af627bbdf8807135ce39d5070"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 83; y: 53
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1792
+ hash: "337f0f4af627bbdf8807135ce39d5070"
+ }
+ Frame {
+ msec: 1808
+ hash: "337f0f4af627bbdf8807135ce39d5070"
+ }
+ Frame {
+ msec: 1824
+ hash: "337f0f4af627bbdf8807135ce39d5070"
+ }
+ Frame {
+ msec: 1840
+ hash: "337f0f4af627bbdf8807135ce39d5070"
+ }
+ Frame {
+ msec: 1856
+ hash: "337f0f4af627bbdf8807135ce39d5070"
+ }
+ Frame {
+ msec: 1872
+ hash: "337f0f4af627bbdf8807135ce39d5070"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 83; y: 52
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 82; y: 51
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1888
+ hash: "337f0f4af627bbdf8807135ce39d5070"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 80; y: 50
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 78; y: 48
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1904
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 75; y: 46
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 73; y: 45
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1920
+ image: "mouseregion.1.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 71; y: 43
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 68; y: 41
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1936
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 66; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1952
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 64; y: 39
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 63; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1968
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 61; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 60; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1984
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 58; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 57; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2000
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 56; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2016
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 55; y: 30
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 54; y: 29
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2032
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2048
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2064
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2080
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2096
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2112
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2128
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 54; y: 29
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2144
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2160
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2176
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2192
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2208
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2224
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2240
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 54; y: 29
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2256
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2272
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2288
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2304
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2320
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2336
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2352
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2368
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2384
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2400
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2416
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2432
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2448
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2464
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2480
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2496
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2512
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2528
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2544
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2560
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2576
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2592
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2608
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2624
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2640
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 2
+ button: 2
+ buttons: 2
+ x: 54; y: 29
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2656
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2672
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2688
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2704
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2720
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2736
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2752
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 3
+ button: 2
+ buttons: 0
+ x: 54; y: 29
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2768
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2784
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2800
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2816
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2832
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2848
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2864
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 2880
+ image: "mouseregion.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 55; y: 29
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 58; y: 29
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2912
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 62; y: 29
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 67; y: 29
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2928
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 75; y: 30
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2944
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 91; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 99; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2960
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 107; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 113; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2976
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 119; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 124; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2992
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 128; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 131; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3008
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 132; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 132; y: 31
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3024
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3040
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3056
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3072
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3088
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3104
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3120
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3136
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3152
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3168
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3184
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3200
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3216
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3232
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3248
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3264
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3280
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3296
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3312
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3328
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3344
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3360
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3376
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3392
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3408
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3424
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3440
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3456
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3472
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3488
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3504
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3520
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3536
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3552
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 133; y: 31
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3568
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3584
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 133; y: 31
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3600
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3616
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3632
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3648
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3664
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3680
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3696
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 133; y: 31
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3712
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3728
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3744
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3760
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3776
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3792
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3808
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3824
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3840
+ image: "mouseregion.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3872
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3888
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3904
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3920
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3936
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3952
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3968
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 3984
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4000
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4016
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4032
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4048
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4064
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4080
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4096
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4112
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4128
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4144
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4160
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4176
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4192
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4208
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4224
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4240
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4256
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4272
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4288
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4304
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4320
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 2
+ button: 2
+ buttons: 2
+ x: 133; y: 31
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4336
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4352
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4368
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4384
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4400
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4416
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Frame {
+ msec: 4432
+ hash: "73f1639b9e2164c7b974042934c0d151"
+ }
+ Mouse {
+ type: 3
+ button: 2
+ buttons: 0
+ x: 133; y: 31
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4448
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4464
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4480
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4496
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4512
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4528
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4544
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4560
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4576
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4592
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4608
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4624
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4640
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4656
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4672
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4688
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4704
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4720
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4736
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 133; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 136; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4752
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 142; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 148; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4768
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 155; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 161; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4784
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 166; y: 31
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4800
+ image: "mouseregion.4.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 168; y: 31
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 170; y: 30
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4816
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 171; y: 29
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4832
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4848
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4864
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 4880
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 172; y: 28
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 175; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4896
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 178; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4912
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 182; y: 24
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 187; y: 22
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4928
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 191; y: 22
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 195; y: 21
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4944
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 200; y: 21
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 206; y: 21
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4960
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 211; y: 21
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 215; y: 21
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4976
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 218; y: 21
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 221; y: 20
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4992
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 224; y: 20
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5008
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 225; y: 20
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 226; y: 20
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5024
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 227; y: 20
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5040
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5056
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5072
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 228; y: 20
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 229; y: 20
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5088
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 231; y: 20
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 232; y: 20
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5104
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 233; y: 20
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5120
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5136
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5152
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5168
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 233; y: 21
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 234; y: 22
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5184
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 237; y: 23
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5200
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 239; y: 24
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 242; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5216
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 244; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 245; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5232
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 247; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5248
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5264
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5280
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5296
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5312
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5328
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5344
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5360
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5376
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5392
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5408
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5424
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5440
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5456
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5472
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5488
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5504
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5520
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5536
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5552
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5568
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5584
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5600
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5616
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5632
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5648
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5664
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5680
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5696
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5712
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5728
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5744
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5760
+ image: "mouseregion.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5792
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5808
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5824
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5840
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 247; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5856
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5872
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5888
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5904
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5920
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5936
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 247; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5952
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5968
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 5984
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6000
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6016
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6032
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6048
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6064
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6080
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6096
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6112
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6128
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6144
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6160
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6176
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6192
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6208
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6224
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6240
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6256
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6272
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6288
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6304
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6320
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6336
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6352
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6368
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6384
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6400
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6416
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6432
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6448
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6464
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6480
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6496
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6512
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6528
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6544
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6560
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6576
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 247; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6592
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6608
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6624
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6640
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 247; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6656
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6672
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6688
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6704
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6720
+ image: "mouseregion.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 4
+ button: 1
+ buttons: 1
+ x: 247; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6752
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6768
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6784
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6800
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6816
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6832
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 247; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6848
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6864
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6880
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6896
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6912
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6928
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6944
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6960
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6976
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 6992
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7008
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7024
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7040
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7056
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7072
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7088
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7104
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7120
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7136
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7152
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7168
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7184
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7200
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 247; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7216
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7232
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7248
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7264
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7280
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7296
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7312
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7328
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7344
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7360
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7376
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7392
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7408
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7424
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7440
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7456
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7472
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7488
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7504
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7520
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7536
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7552
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7568
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7584
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7600
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7616
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7632
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7648
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7664
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7680
+ image: "mouseregion.7.png"
+ }
+ Frame {
+ msec: 7696
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7712
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7728
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7744
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7760
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7776
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7792
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7808
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7824
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7840
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7856
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7872
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7888
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7904
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7920
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7936
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7952
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7968
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 7984
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 8000
+ hash: "12edb0902e4d480c9052b00edc1a0a42"
+ }
+ Frame {
+ msec: 8016
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8032
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8048
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8064
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8080
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8096
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8112
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8128
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8144
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8160
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8176
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8192
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8208
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8224
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8240
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8256
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8272
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8288
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8304
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8320
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8336
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 247; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8352
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8368
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8384
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8400
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8416
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8432
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8448
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8464
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8480
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8496
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8512
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8528
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 248; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8544
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 254; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 259; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8560
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 264; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 268; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8576
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 273; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 277; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8592
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 281; y: 24
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 284; y: 24
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8608
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 287; y: 24
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 289; y: 24
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8624
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 292; y: 24
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8640
+ image: "mouseregion.8.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 294; y: 24
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 295; y: 24
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8656
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 297; y: 24
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 299; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8672
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 301; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 304; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8688
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 307; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8704
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 310; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 312; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8720
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 314; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 315; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8736
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 317; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 318; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8752
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 319; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8768
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 320; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8784
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 322; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 323; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8800
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 325; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 327; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8816
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 330; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 333; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8832
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 336; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 338; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8848
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 339; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8864
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 340; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8880
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 8896
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 340; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8912
+ hash: "d1f2fc2133f3d6554e41982196662c2a"
+ }
+ Frame {
+ msec: 8928
+ hash: "d1f2fc2133f3d6554e41982196662c2a"
+ }
+ Frame {
+ msec: 8944
+ hash: "d1f2fc2133f3d6554e41982196662c2a"
+ }
+ Frame {
+ msec: 8960
+ hash: "d1f2fc2133f3d6554e41982196662c2a"
+ }
+ Frame {
+ msec: 8976
+ hash: "d1f2fc2133f3d6554e41982196662c2a"
+ }
+ Frame {
+ msec: 8992
+ hash: "d1f2fc2133f3d6554e41982196662c2a"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 340; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9008
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9024
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9040
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9056
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9072
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9088
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9104
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9120
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9136
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9152
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9168
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9184
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9200
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9216
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9232
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9248
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9264
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9280
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9296
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9312
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9328
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9344
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9360
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9376
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9392
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9408
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9424
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9440
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9456
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9472
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9488
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9504
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9520
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9536
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9552
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9568
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9584
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 9600
+ image: "mouseregion.9.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 339; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9616
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 336; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9632
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 332; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 326; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9648
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 320; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 312; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9664
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 292; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 283; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9680
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 261; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9696
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 252; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 243; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9712
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 225; y: 29
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 207; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9728
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 189; y: 35
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 169; y: 39
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9744
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 161; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 145; y: 44
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9760
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 138; y: 45
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9776
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 133; y: 48
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 127; y: 50
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9792
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 122; y: 52
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 118; y: 56
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9808
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 114; y: 57
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 110; y: 60
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9824
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 109; y: 61
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9840
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 107; y: 62
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 106; y: 63
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9856
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 103; y: 63
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 100; y: 64
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9872
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 96; y: 64
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 92; y: 65
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9888
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 88; y: 65
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9904
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 85; y: 66
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 82; y: 67
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9920
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 79; y: 69
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 77; y: 70
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9936
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 74; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 70; y: 72
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9952
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 67; y: 74
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 64; y: 75
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9968
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 62; y: 76
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 9984
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 61; y: 76
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 60; y: 77
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10000
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Frame {
+ msec: 10016
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Frame {
+ msec: 10032
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 59; y: 77
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10048
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 58; y: 77
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 57; y: 77
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10064
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 56; y: 76
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10080
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Frame {
+ msec: 10096
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Frame {
+ msec: 10112
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Frame {
+ msec: 10128
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Frame {
+ msec: 10144
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Frame {
+ msec: 10160
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Frame {
+ msec: 10176
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Frame {
+ msec: 10192
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Frame {
+ msec: 10208
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Frame {
+ msec: 10224
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Frame {
+ msec: 10240
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 57; y: 76
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 59; y: 75
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10256
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 62; y: 75
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10272
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 65; y: 74
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 69; y: 74
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10288
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 72; y: 73
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 76; y: 73
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10304
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 80; y: 72
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 84; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10320
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 87; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 90; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10336
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 93; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10352
+ hash: "6627c7a1a4da7e642f4b4b24ca5e8e7a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 96; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 99; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10368
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 102; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 106; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10384
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 108; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 110; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10400
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 113; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 115; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10416
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 118; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 121; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10432
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 123; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10448
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 126; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 128; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10464
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 130; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 132; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10480
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 133; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10496
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 134; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10512
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10528
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 135; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 136; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10544
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 137; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 138; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10560
+ image: "mouseregion.10.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 140; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 10576
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10592
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10608
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10624
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10640
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10656
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10672
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10688
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10704
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10720
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10736
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10752
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10768
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10784
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10800
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10816
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10832
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10848
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10864
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10880
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10896
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10912
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10928
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10944
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10960
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10976
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 10992
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11008
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11024
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11040
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11056
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11072
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11088
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11104
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11120
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11136
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11152
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11168
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11184
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11200
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11216
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11232
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11248
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11264
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11280
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11296
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11312
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11328
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11344
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11360
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11376
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11392
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11408
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11424
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11440
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11456
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11472
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11488
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11504
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11520
+ image: "mouseregion.11.png"
+ }
+ Frame {
+ msec: 11536
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11552
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11568
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11584
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11600
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11616
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11632
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11648
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11664
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11680
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11696
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11712
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 2
+ button: 2
+ buttons: 2
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11728
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11744
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11760
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11776
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11792
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11808
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11824
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 3
+ button: 2
+ buttons: 0
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 11840
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11856
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11872
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11888
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11904
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11920
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11936
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11952
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11968
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 11984
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12000
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12016
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12032
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12048
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 4
+ button: 2
+ buttons: 2
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12064
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12080
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12096
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12112
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12128
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12144
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12160
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12176
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12192
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12208
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 3
+ button: 2
+ buttons: 0
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12224
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12240
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12256
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12272
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12288
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12304
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12320
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12336
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12352
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12368
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12384
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12400
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12416
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12432
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12448
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 2
+ button: 2
+ buttons: 3
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12464
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12480
+ image: "mouseregion.12.png"
+ }
+ Frame {
+ msec: 12496
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12512
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12528
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 3
+ button: 2
+ buttons: 1
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12544
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12560
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12576
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12592
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12608
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12624
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12640
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12656
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12672
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12688
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12704
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12720
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12736
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12752
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12768
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12784
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12800
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12816
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12832
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 4
+ button: 1
+ buttons: 1
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12848
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12864
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12880
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12896
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12912
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12928
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12944
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12960
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 12976
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 12992
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13008
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13024
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13040
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13056
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 13072
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13088
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 4
+ button: 1
+ buttons: 1
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 13104
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13120
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13136
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13152
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13168
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13184
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 13200
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13216
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13232
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13248
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13264
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13280
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13296
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 13312
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13328
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13344
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13360
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13376
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 13392
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13408
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13424
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13440
+ image: "mouseregion.13.png"
+ }
+ Frame {
+ msec: 13456
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13472
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13488
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13504
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13520
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13536
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13552
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13568
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13584
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13600
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13616
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13632
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 2
+ button: 2
+ buttons: 2
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 13648
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13664
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13680
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13696
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13712
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 3
+ button: 2
+ buttons: 0
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 13728
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13744
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13760
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13776
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13792
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13808
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 4
+ button: 2
+ buttons: 2
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 13824
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13840
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13856
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13872
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13888
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13904
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 3
+ button: 2
+ buttons: 0
+ x: 141; y: 71
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 13920
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13936
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13952
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13968
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 13984
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14000
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14016
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14032
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14048
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14064
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14080
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14096
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14112
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14128
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14144
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14160
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14176
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 141; y: 70
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 148; y: 68
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 14192
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 152; y: 68
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 158; y: 68
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 14208
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 164; y: 68
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 14224
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 171; y: 66
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 187; y: 62
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 205; y: 60
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 14240
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 223; y: 56
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 14256
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 239; y: 52
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 255; y: 46
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 14272
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 269; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 285; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 14288
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 299; y: 28
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 313; y: 20
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 14304
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 320; y: 18
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 326; y: 15
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 14320
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 340; y: 7
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 14336
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14352
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14368
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14384
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14400
+ image: "mouseregion.14.png"
+ }
+ Frame {
+ msec: 14416
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14432
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14448
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14464
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14480
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14496
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14512
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14528
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14544
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14560
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14576
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14592
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14608
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14624
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14640
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14656
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14672
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14688
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14704
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14720
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14736
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14752
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14768
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14784
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14800
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14816
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14832
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14848
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14864
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14880
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14896
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14912
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+ Frame {
+ msec: 14928
+ hash: "194ebac4ae7d95bf427f8161885a13e1"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/drag.qml b/tests/auto/declarative/visual/qdeclarativemouseregion/drag.qml
new file mode 100644
index 0000000000..dbb2a24b23
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/drag.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+
+Rectangle{
+ width:400
+ height:440
+ color: "white"
+ Rectangle{
+ id: draggable
+ width:40; height:40; color: "lightsteelblue"
+ y:20
+ MouseArea{
+ anchors.fill: parent
+ drag.target: draggable
+ drag.axis: "XandYAxis"
+ drag.minimumX: 0
+ drag.maximumX: 360
+ drag.minimumY: 20
+ drag.maximumY: 400
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativemouseregion/mouseregion.qml b/tests/auto/declarative/visual/qdeclarativemouseregion/mouseregion.qml
new file mode 100644
index 0000000000..3c722d02f6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativemouseregion/mouseregion.qml
@@ -0,0 +1,124 @@
+import Qt 4.6
+
+Rectangle {
+ id: root
+ width: 400
+ height: 100
+
+ // Left click on me
+ Rectangle {
+ width: 98; height: 48
+ color: "red"
+ MouseArea {
+ id: mr1
+ anchors.fill: parent
+ enabled: false
+ onClicked: { parent.color = "blue"; root.error = "mr1 should ignore presses"; }
+ }
+ }
+
+ // Left click, then right click
+ Rectangle {
+ x: 100
+ width: 98; height: 48
+ color: "red"
+ MouseArea {
+ id: mr2
+ anchors.fill: parent
+ acceptedButtons: Qt.RightButton
+ onClicked: {
+ if (mouse.button == Qt.RightButton) {
+ parent.color = "blue";
+ } else {
+ parent.color = "green";
+ root.error = "mr1 should ignore presses";
+ }
+ }
+ }
+ }
+
+ // press and hold me
+ Rectangle {
+ x: 200
+ width: 98; height: 48
+ color: "red"
+ MouseArea {
+ id: mr3
+ anchors.fill: parent
+ onPressAndHold: {
+ parent.color = "blue";
+ }
+ }
+ }
+
+ // click me
+ Rectangle {
+ x: 300
+ width: 98; height: 48
+ color: "red"
+ MouseArea {
+ id: mr4
+ anchors.fill: parent
+ onPressed: {
+ parent.color = "blue";
+ }
+ onReleased: {
+ parent.color = "red";
+ }
+ }
+ }
+
+ // move into and out of me
+ Rectangle {
+ x: 0
+ y: 50
+ width: 98; height: 48
+ color: "red"
+ MouseArea {
+ id: mr5
+ anchors.fill: parent
+ hoverEnabled: true
+ onEntered: {
+ parent.color = "blue";
+ }
+ onExited: {
+ parent.color = "green";
+ }
+ }
+ }
+
+ // click, then double click me
+ Rectangle {
+ x: 100
+ y: 50
+ width: 98; height: 48
+ color: "red"
+ MouseArea {
+ id: mr6
+ anchors.fill: parent
+ onClicked: {
+ parent.color = "blue";
+ }
+ onDoubleClicked: {
+ parent.color = "green";
+ }
+ }
+ }
+
+ // click, then double click me - nothing should happen
+ Rectangle {
+ x: 100
+ y: 50
+ width: 98; height: 48
+ color: "red"
+ MouseArea {
+ id: mr7
+ anchors.fill: parent
+ enabled: false
+ onClicked: { parent.color = "blue" }
+ onPressed: { parent.color = "yellow" }
+ onReleased: { parent.color = "cyan" }
+ onDoubleClicked: { parent.color = "green" }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativeparticles/data/particles.0.png b/tests/auto/declarative/visual/qdeclarativeparticles/data/particles.0.png
new file mode 100644
index 0000000000..7321d95c9c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeparticles/data/particles.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeparticles/data/particles.1.png b/tests/auto/declarative/visual/qdeclarativeparticles/data/particles.1.png
new file mode 100644
index 0000000000..49d2a5a7c2
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeparticles/data/particles.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeparticles/data/particles.2.png b/tests/auto/declarative/visual/qdeclarativeparticles/data/particles.2.png
new file mode 100644
index 0000000000..6fe14b717c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeparticles/data/particles.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativeparticles/data/particles.qml b/tests/auto/declarative/visual/qdeclarativeparticles/data/particles.qml
new file mode 100644
index 0000000000..d766dc6c4e
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeparticles/data/particles.qml
@@ -0,0 +1,775 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "b4df49cbd7cf972af9879399808f6c53"
+ }
+ Frame {
+ msec: 32
+ hash: "43c0ad5826e8058260951f063f0851ab"
+ }
+ Frame {
+ msec: 48
+ hash: "55eb2c9939514338e7ef58c9276fc223"
+ }
+ Frame {
+ msec: 64
+ hash: "6a1bbb91bf450547d6100b6e61a98f6d"
+ }
+ Frame {
+ msec: 80
+ hash: "bdb9b8cab70c72d99aba830eb8e8913b"
+ }
+ Frame {
+ msec: 96
+ hash: "71a0e046bc68183b830df9dafd8fa147"
+ }
+ Frame {
+ msec: 112
+ hash: "e7228e0ed77e05c661282c2d2fe88b3e"
+ }
+ Frame {
+ msec: 128
+ hash: "93a4c3e501b05844f687a2dd1754aad2"
+ }
+ Frame {
+ msec: 144
+ hash: "1856ac86313c16bf4874130d9a48ff45"
+ }
+ Frame {
+ msec: 160
+ hash: "3637d8dad4f44c938f91b0800bd9fb2f"
+ }
+ Frame {
+ msec: 176
+ hash: "c5ace4ede38d29363d69c6b4b2f9349f"
+ }
+ Frame {
+ msec: 192
+ hash: "a5d832d02f4a635052817654df90caba"
+ }
+ Frame {
+ msec: 208
+ hash: "9ebf8bea8abe7ac209d47214a87f8fc0"
+ }
+ Frame {
+ msec: 224
+ hash: "35b8f5cb18284867be8d27d601394a2b"
+ }
+ Frame {
+ msec: 240
+ hash: "a2c4a6063f219af6f2b29b2d21a4265d"
+ }
+ Frame {
+ msec: 256
+ hash: "27f25ace7b8e93c55638ed99f49b821c"
+ }
+ Frame {
+ msec: 272
+ hash: "4f6511bfbbd8113195a7597eb6dfb219"
+ }
+ Frame {
+ msec: 288
+ hash: "6a696159cdbb51a67064c600124535d1"
+ }
+ Frame {
+ msec: 304
+ hash: "6cd667eb352256dbb728532634e7ffd0"
+ }
+ Frame {
+ msec: 320
+ hash: "28fa16c8936bf86a8426ded306aa2b8c"
+ }
+ Frame {
+ msec: 336
+ hash: "061fecdb88733e3e51c5823571bc4d19"
+ }
+ Frame {
+ msec: 352
+ hash: "f64530f638b3d18d56593e0b7c884f5d"
+ }
+ Frame {
+ msec: 368
+ hash: "8530cf40739890dc7401fad65a6325bf"
+ }
+ Frame {
+ msec: 384
+ hash: "0abc555552e7256dbc424b2eac5c95f2"
+ }
+ Frame {
+ msec: 400
+ hash: "64aeae59a8c958dfc62d92636b2f5217"
+ }
+ Frame {
+ msec: 416
+ hash: "3e0f50f5bee017220b129d06b2acde2c"
+ }
+ Frame {
+ msec: 432
+ hash: "e676c01ff2e35bdfe674be67d49945b1"
+ }
+ Frame {
+ msec: 448
+ hash: "bc060b480aab94fd440fd27f5beb7383"
+ }
+ Frame {
+ msec: 464
+ hash: "79c79f723de72315e63da8a7cbe1b425"
+ }
+ Frame {
+ msec: 480
+ hash: "7bf93c2697af75d0f862a47d57cd6a7f"
+ }
+ Frame {
+ msec: 496
+ hash: "7641b9e233f4aabd99bcd985ce1d51ae"
+ }
+ Frame {
+ msec: 512
+ hash: "b596a28cb67617d37408bd25d947d088"
+ }
+ Frame {
+ msec: 528
+ hash: "f2c5cdf15c27b05c0ea97675ddc41757"
+ }
+ Frame {
+ msec: 544
+ hash: "eae5eb8c41a1d6d75446618518490f20"
+ }
+ Frame {
+ msec: 560
+ hash: "0be5e9a6d857fe1a262524801c69490d"
+ }
+ Frame {
+ msec: 576
+ hash: "65478b8c4d932c10924f70462a662254"
+ }
+ Frame {
+ msec: 592
+ hash: "7b034f3c98e8eb38eec11cf3c2aa0804"
+ }
+ Frame {
+ msec: 608
+ hash: "5bbc8eed41500ccbc820cfb38794232f"
+ }
+ Frame {
+ msec: 624
+ hash: "1b39d555ca8932b40efd769c4ba74d3f"
+ }
+ Frame {
+ msec: 640
+ hash: "f9a38e12becbce400191e22f1d22427c"
+ }
+ Frame {
+ msec: 656
+ hash: "cbc27c72517d76edfc2d3692cd83f151"
+ }
+ Frame {
+ msec: 672
+ hash: "4a883a5aed05f0bbcefcefea6ef56df6"
+ }
+ Frame {
+ msec: 688
+ hash: "7a30ea30c0619c87c96bcaba916c64df"
+ }
+ Frame {
+ msec: 704
+ hash: "33cd0797b6d229592ed53117fcaaa898"
+ }
+ Frame {
+ msec: 720
+ hash: "21178ef9366c8a65ecb9e21d584573b0"
+ }
+ Frame {
+ msec: 736
+ hash: "fe75beac8681fdac8a2b79c9c7267128"
+ }
+ Frame {
+ msec: 752
+ hash: "df26a23d394e053417de86309683c5e0"
+ }
+ Frame {
+ msec: 768
+ hash: "411594a1ed7c351cb872e0a6f3081b1b"
+ }
+ Frame {
+ msec: 784
+ hash: "b4b639f204cfed9e1fec872e4de115c2"
+ }
+ Frame {
+ msec: 800
+ hash: "4d801e2f4848399c011d60264720b912"
+ }
+ Frame {
+ msec: 816
+ hash: "4f28c7b154853ff78cdefb5a5ac9d2b7"
+ }
+ Frame {
+ msec: 832
+ hash: "cc6d4283b0d7bf9f579637575d5e1fef"
+ }
+ Frame {
+ msec: 848
+ hash: "8edc371d23d01be547990074b5e640af"
+ }
+ Frame {
+ msec: 864
+ hash: "874845d7178e6cd8369f21379060f561"
+ }
+ Frame {
+ msec: 880
+ hash: "98fb6d79990775385603fb1a50ab5186"
+ }
+ Frame {
+ msec: 896
+ hash: "d15539efc27baabb5a74f464b152d266"
+ }
+ Frame {
+ msec: 912
+ hash: "fc44d091d6689e8870162a6d29b6d287"
+ }
+ Frame {
+ msec: 928
+ hash: "a3c964f4bf524e22092b1650df43375a"
+ }
+ Frame {
+ msec: 944
+ hash: "ca203fd630ec1eadea37cf36bd30ba40"
+ }
+ Frame {
+ msec: 960
+ image: "particles.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "2e0630818c04fc6c259eec8561c645cd"
+ }
+ Frame {
+ msec: 992
+ hash: "a7b1f6305ddcf4a338e1a96ea31a5341"
+ }
+ Frame {
+ msec: 1008
+ hash: "23a5013a8f9407d06ac6fd0c1e961743"
+ }
+ Frame {
+ msec: 1024
+ hash: "9de73decddaab4269bd33efdb21278a3"
+ }
+ Frame {
+ msec: 1040
+ hash: "7582c26b45dd11c262f51b387af89cb2"
+ }
+ Frame {
+ msec: 1056
+ hash: "650e0d395f1d1f2ddda8711089d85511"
+ }
+ Frame {
+ msec: 1072
+ hash: "9ff84e81219aa6bb7ab534b2a47a3930"
+ }
+ Frame {
+ msec: 1088
+ hash: "11e255273e8ca4716047fb52636f0c3e"
+ }
+ Frame {
+ msec: 1104
+ hash: "b2fcbefd13db3c765183b1eefc2ca0bc"
+ }
+ Frame {
+ msec: 1120
+ hash: "7150aff523c0d480702f6a326699cb65"
+ }
+ Frame {
+ msec: 1136
+ hash: "63886c15107a2a7d639069cd81c3cd07"
+ }
+ Frame {
+ msec: 1152
+ hash: "1ec1fc30bbb5f43a1d6d36bce345f569"
+ }
+ Frame {
+ msec: 1168
+ hash: "34060cbc31ce1fbf406cbb595312c609"
+ }
+ Frame {
+ msec: 1184
+ hash: "6f3a04c7f411785956e640aa630f7ac4"
+ }
+ Frame {
+ msec: 1200
+ hash: "d7bdb7e170b6f193eaf4b07c01b4dc6b"
+ }
+ Frame {
+ msec: 1216
+ hash: "6ca02c0d9cfeb4b1932f7ad1feac9850"
+ }
+ Frame {
+ msec: 1232
+ hash: "d446c7b185361de5c615a17ac1fee607"
+ }
+ Frame {
+ msec: 1248
+ hash: "bc2faf5b7b2972f155954e4e685e80ae"
+ }
+ Frame {
+ msec: 1264
+ hash: "2bf26cedc76aea4a6d9744b7dd935db8"
+ }
+ Frame {
+ msec: 1280
+ hash: "accbee9d0f8cf73ef72aa7bfb49b3fa5"
+ }
+ Frame {
+ msec: 1296
+ hash: "933eb2e46f42e212bdfc515d30f663d3"
+ }
+ Frame {
+ msec: 1312
+ hash: "7495318c893dbb22771b53e93c7614e8"
+ }
+ Frame {
+ msec: 1328
+ hash: "894fe23c1b3543451293c047b640c4bb"
+ }
+ Frame {
+ msec: 1344
+ hash: "9b7179ef059ee82ca4a383f536f47a42"
+ }
+ Frame {
+ msec: 1360
+ hash: "5ec1a5bfac2473efdcad7dba0da4015c"
+ }
+ Frame {
+ msec: 1376
+ hash: "2bd64528e83260a80e7f2843e2c34a19"
+ }
+ Frame {
+ msec: 1392
+ hash: "16bf64a9bf6b4bc09b108c65d074b5f2"
+ }
+ Frame {
+ msec: 1408
+ hash: "c33eaa717ba63655f375499058b1be55"
+ }
+ Frame {
+ msec: 1424
+ hash: "d080f4591f9fd59745bf850525590849"
+ }
+ Frame {
+ msec: 1440
+ hash: "921585c88ec133c83c07650745bb4441"
+ }
+ Frame {
+ msec: 1456
+ hash: "f037b28137b22a0c91fc71fc6626475a"
+ }
+ Frame {
+ msec: 1472
+ hash: "e10b3c432a230d5509c2fa7df48b56c9"
+ }
+ Frame {
+ msec: 1488
+ hash: "ac02c7b7e68ee8cfad1fe556020e93d8"
+ }
+ Frame {
+ msec: 1504
+ hash: "12d59e70dedfa0c741afed9b98cb9a3a"
+ }
+ Frame {
+ msec: 1520
+ hash: "a9aa635ccde26829d7e1cdc29fcce8d1"
+ }
+ Frame {
+ msec: 1536
+ hash: "f571b3da827b884ad036dade8ad2fe37"
+ }
+ Frame {
+ msec: 1552
+ hash: "1ffa8d7512e9001cbc78b28451133b44"
+ }
+ Frame {
+ msec: 1568
+ hash: "2ef4b10f2eafd71dfde15f7f00e923c6"
+ }
+ Frame {
+ msec: 1584
+ hash: "09b3bc232a134eae5ae14c0336f508ba"
+ }
+ Frame {
+ msec: 1600
+ hash: "ebadb5c6b4986c865f7f8ef232680b7e"
+ }
+ Frame {
+ msec: 1616
+ hash: "26621991073510e9a95e3b208e3ee56e"
+ }
+ Frame {
+ msec: 1632
+ hash: "f18e97f13c06f3c5368edf851f19f401"
+ }
+ Frame {
+ msec: 1648
+ hash: "3c322dbbf5ecfe1de56595dcb7d949e1"
+ }
+ Frame {
+ msec: 1664
+ hash: "50058d1bb992a6d0601c9d5490149936"
+ }
+ Frame {
+ msec: 1680
+ hash: "4cc78f56f13478ec21a4a0d6b22f956b"
+ }
+ Frame {
+ msec: 1696
+ hash: "d765cd86560dff3faa5a3c902512c74c"
+ }
+ Frame {
+ msec: 1712
+ hash: "ad983068c2149b0c06da3b89a5d94d24"
+ }
+ Frame {
+ msec: 1728
+ hash: "e6da7260001771fc00c472bccae641fe"
+ }
+ Frame {
+ msec: 1744
+ hash: "71778ad8a61ecb0f78f7234ecf0d1d97"
+ }
+ Frame {
+ msec: 1760
+ hash: "6b2209ea5f7f17c2cd868986f0c907d9"
+ }
+ Frame {
+ msec: 1776
+ hash: "6513c82829ef7e7c9461dcf5b50f675f"
+ }
+ Frame {
+ msec: 1792
+ hash: "0172c5bdf96c8bceab25a6c82bdbe527"
+ }
+ Frame {
+ msec: 1808
+ hash: "64b53bf1c1988d3a799b564089f8e63f"
+ }
+ Frame {
+ msec: 1824
+ hash: "a1bdea4771ec9719cfe88f4e827bd005"
+ }
+ Frame {
+ msec: 1840
+ hash: "263de376cee2ba7701a7ca116bc1be81"
+ }
+ Frame {
+ msec: 1856
+ hash: "9795dada7f09d7d4d40df858dea8bc70"
+ }
+ Frame {
+ msec: 1872
+ hash: "85ea4c63fc31f79423cb509f6c6d4faa"
+ }
+ Frame {
+ msec: 1888
+ hash: "c86d8c4460d1e3c2f26b723dc628fe84"
+ }
+ Frame {
+ msec: 1904
+ hash: "6bf6ef1fd377bfcf0b93baa7f28e1d3d"
+ }
+ Frame {
+ msec: 1920
+ image: "particles.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "57b8a48bed9375b74391950c28e611da"
+ }
+ Frame {
+ msec: 1952
+ hash: "70203655bc832998529071d7f665ecbe"
+ }
+ Frame {
+ msec: 1968
+ hash: "9ab9808d495f907a255d85fbd82491e2"
+ }
+ Frame {
+ msec: 1984
+ hash: "297570136b058ba43e883b0aef20d82f"
+ }
+ Frame {
+ msec: 2000
+ hash: "0c2f15ce83e2d961ec36299b13890709"
+ }
+ Frame {
+ msec: 2016
+ hash: "6d57b6dcb1dbfa35245d79ef36ca49b2"
+ }
+ Frame {
+ msec: 2032
+ hash: "12a71804fd71991706d8a39b676d1628"
+ }
+ Frame {
+ msec: 2048
+ hash: "f6a9e1b0b498fc576f3eadeb86c08fe9"
+ }
+ Frame {
+ msec: 2064
+ hash: "051c2ed34cbef82d44aec4841a33f086"
+ }
+ Frame {
+ msec: 2080
+ hash: "12b89590b20fff8d6c94dde40a5d6185"
+ }
+ Frame {
+ msec: 2096
+ hash: "7a29cd11ddb042203465a9522ff951ce"
+ }
+ Frame {
+ msec: 2112
+ hash: "4853f364261ab8e1c9d35cfe42efb385"
+ }
+ Frame {
+ msec: 2128
+ hash: "7149ab3ed649cac9cf662be7c434056f"
+ }
+ Frame {
+ msec: 2144
+ hash: "bbe199700474dda156355d31ac09be39"
+ }
+ Frame {
+ msec: 2160
+ hash: "a3f3fbbe844b8c6fb8cb8bbcc17120e3"
+ }
+ Frame {
+ msec: 2176
+ hash: "e9a04cfe9e8c50f74978fbd4ecce536a"
+ }
+ Frame {
+ msec: 2192
+ hash: "0df1d4211f770cdd7b8a98ea476c6f42"
+ }
+ Frame {
+ msec: 2208
+ hash: "a6837afb43663b9473db2378b1a9f989"
+ }
+ Frame {
+ msec: 2224
+ hash: "691ea67f3b84b8dda449c2a8e86b1087"
+ }
+ Frame {
+ msec: 2240
+ hash: "16d18947637c63662b9a502c493f06ec"
+ }
+ Frame {
+ msec: 2256
+ hash: "8f9207d404da08706e150f3b64d0088d"
+ }
+ Frame {
+ msec: 2272
+ hash: "48ad430e38cdc34845a834cfb9ea70ef"
+ }
+ Frame {
+ msec: 2288
+ hash: "1252cfb294ae99c40b03dd021160553f"
+ }
+ Frame {
+ msec: 2304
+ hash: "b1d5e752fbe03c95ee0dc7bbdf6fb9f6"
+ }
+ Frame {
+ msec: 2320
+ hash: "2282cb42ef0c812ba27e33ed0f962a84"
+ }
+ Frame {
+ msec: 2336
+ hash: "42fc82c8d40d383b3cf31a741a4358c5"
+ }
+ Frame {
+ msec: 2352
+ hash: "368c1ffa2deb1911929f1769e31c8017"
+ }
+ Frame {
+ msec: 2368
+ hash: "8693bdbde404e36970943ac6b650ca00"
+ }
+ Frame {
+ msec: 2384
+ hash: "57609613c336029b60da428d48842a4e"
+ }
+ Frame {
+ msec: 2400
+ hash: "b61dafe9e87421d3fcf8cb9ff0e7a41b"
+ }
+ Frame {
+ msec: 2416
+ hash: "c8c34d1d82bef418ef97f52cb9773cf4"
+ }
+ Frame {
+ msec: 2432
+ hash: "aa756c09717dc02e81e76511b4c58f60"
+ }
+ Frame {
+ msec: 2448
+ hash: "96e75c5ce1b5393f6cc46fbbe0a67689"
+ }
+ Frame {
+ msec: 2464
+ hash: "fb5febae411f43a6cd218b03b36f5018"
+ }
+ Frame {
+ msec: 2480
+ hash: "889870fa67784261e7b73b7d0a53324e"
+ }
+ Frame {
+ msec: 2496
+ hash: "fb124d4ebee6457f2137f07954619912"
+ }
+ Frame {
+ msec: 2512
+ hash: "258ae87f78805c555e0ed802c5123eeb"
+ }
+ Frame {
+ msec: 2528
+ hash: "2e730872c37f118a03864d23ebf7bab3"
+ }
+ Frame {
+ msec: 2544
+ hash: "381386302f210932bc7d44247a48f13c"
+ }
+ Frame {
+ msec: 2560
+ hash: "306f8e6d183eb080da3375d65f2491f0"
+ }
+ Frame {
+ msec: 2576
+ hash: "39862f236aabf362d0a07ba64eb212e1"
+ }
+ Frame {
+ msec: 2592
+ hash: "57452ecfea80ebd4d9fd23f8efbb34f2"
+ }
+ Frame {
+ msec: 2608
+ hash: "64bd12d4f6e32f19abef79289673c2fe"
+ }
+ Frame {
+ msec: 2624
+ hash: "56340d636f4df7e5f68e84c1d8388429"
+ }
+ Frame {
+ msec: 2640
+ hash: "795cd97d4be294fa6157f23793861ec3"
+ }
+ Frame {
+ msec: 2656
+ hash: "4be9fd5314ad6721a0ddf5a5dc51ccee"
+ }
+ Frame {
+ msec: 2672
+ hash: "3349b775c329db022bf0414b9ed57466"
+ }
+ Frame {
+ msec: 2688
+ hash: "587b7070836063f9d138c4a4ee8da8bb"
+ }
+ Frame {
+ msec: 2704
+ hash: "5bb078819bef7695c9af1bd4b544a26a"
+ }
+ Frame {
+ msec: 2720
+ hash: "799c05999713e8b29f7d2917f515d2c2"
+ }
+ Frame {
+ msec: 2736
+ hash: "41bb926661acd8e21300f4933734748a"
+ }
+ Frame {
+ msec: 2752
+ hash: "2ead23d38a2f1834c7688a9657d9d7cc"
+ }
+ Frame {
+ msec: 2768
+ hash: "196309eac81adea21630dda19947ef5e"
+ }
+ Frame {
+ msec: 2784
+ hash: "cf414b2004712581f11f27890745c761"
+ }
+ Frame {
+ msec: 2800
+ hash: "6b2a6837da878fa8f3811b2045e098b1"
+ }
+ Frame {
+ msec: 2816
+ hash: "7390cfdef1d4bc194b86854b1947f15d"
+ }
+ Frame {
+ msec: 2832
+ hash: "9e4543fcf65a56edfbcaf46805343071"
+ }
+ Frame {
+ msec: 2848
+ hash: "3a886e2ed813eb7d44d0cd67eb5dee31"
+ }
+ Frame {
+ msec: 2864
+ hash: "625baed6cbf3a58b32060810be53d0b6"
+ }
+ Frame {
+ msec: 2880
+ image: "particles.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "484666ad104cee644c6a7e8ec0c4b10e"
+ }
+ Frame {
+ msec: 2912
+ hash: "41abe2e2d92b293407141d0333d7d04a"
+ }
+ Frame {
+ msec: 2928
+ hash: "953c03834bd3b50798b77c0c6bb0f4a8"
+ }
+ Frame {
+ msec: 2944
+ hash: "a076463868003c62df3ee5147ffd4660"
+ }
+ Frame {
+ msec: 2960
+ hash: "b389b5c9ed31816dd562a8f1332d28c9"
+ }
+ Frame {
+ msec: 2976
+ hash: "246706829939a2619d64fad63e424fdb"
+ }
+ Frame {
+ msec: 2992
+ hash: "d5e644f16bde52c566191a054a1279e5"
+ }
+ Frame {
+ msec: 3008
+ hash: "10b2e99d2e08939b75c24a6bbf481858"
+ }
+ Frame {
+ msec: 3024
+ hash: "732a7bb0009f394f0039e09594362c75"
+ }
+ Frame {
+ msec: 3040
+ hash: "261f38ce42a8a8c86daadd497ecfad07"
+ }
+ Frame {
+ msec: 3056
+ hash: "8b66ae6261db386d6c4e88d0146db090"
+ }
+ Frame {
+ msec: 3072
+ hash: "dc8dba79e4466059c29725084cf801bb"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativeparticles/particles.qml b/tests/auto/declarative/visual/qdeclarativeparticles/particles.qml
new file mode 100644
index 0000000000..2d481c96e0
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeparticles/particles.qml
@@ -0,0 +1,54 @@
+import Qt 4.6
+
+Rectangle {
+ width: 640; height: 480; color: "black"
+
+ Particles { id:particlesAnotEmitting
+ y:60; width: 260; height:30; source: "star.png";
+ lifeSpan:1000; count: 50; angle:70; angleDeviation:36;
+ velocity:30; velocityDeviation:10; emissionRate: 0
+ ParticleMotionWander { yvariance:5; xvariance:30; pace:100 }
+ }
+ Particles { id:particlesA
+ y:0; width: 260; height:30; source: "star.png";
+ lifeSpan:1000; count: 50; angle:70; angleDeviation:36;
+ velocity:30; velocityDeviation:10; emissionRate: 10
+ ParticleMotionWander { yvariance:5; xvariance:30; pace:100 }
+ }
+
+ Particles { id:particlesB
+ y:280; x:180; width:1; height:1; lifeSpan:1000; source: "star.png"
+ count: 100; angle:270; angleDeviation:45; velocity:50; velocityDeviation:30;
+ emissionRate: 0
+ ParticleMotionGravity { yattractor: 1000; xattractor:0; acceleration:25 }
+ }
+
+ Timer { running: true; interval: 1000; repeat: true; onTriggered: particlesB.burst(200, 2000); }
+
+ Column{
+ x: 340;
+ Repeater{
+ model: 5
+ delegate: Component{
+ Item{
+ width: 100; height: 100
+ Rectangle{
+ color: "blue"
+ width: 2; height: 2;
+ x: 49; y:49;
+ }
+ Particles{
+ x: 50; y:50; width: 0; height: 0;
+ fadeInDuration: 0; fadeOutDuration: 0
+ lifeSpan: 1000; lifeSpanDeviation:0;
+ source: "star.png"
+ count: -1; emissionRate: 120;
+ emissionVariance: index/2;
+ velocity: 250; velocityDeviation: 0;
+ angle: 0; angleDeviation: 0;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativeparticles/star.png b/tests/auto/declarative/visual/qdeclarativeparticles/star.png
new file mode 100644
index 0000000000..defbde53ca
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativeparticles/star.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.0.png b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.0.png
new file mode 100644
index 0000000000..18c8a9e6f0
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.1.png b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.1.png
new file mode 100644
index 0000000000..e86acb419d
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.2.png b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.2.png
new file mode 100644
index 0000000000..17990b706a
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.3.png b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.3.png
new file mode 100644
index 0000000000..18c8a9e6f0
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.4.png b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.4.png
new file mode 100644
index 0000000000..18c8a9e6f0
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.5.png b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.5.png
new file mode 100644
index 0000000000..8636f8f9e2
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.6.png b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.6.png
new file mode 100644
index 0000000000..fa7c4b622f
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.qml b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.qml
new file mode 100644
index 0000000000..b8ff925f79
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview-2.qml
@@ -0,0 +1,2303 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 32
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 48
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 64
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 80
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 96
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 112
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 128
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 144
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 160
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 176
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 192
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 208
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 224
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 240
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 256
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 272
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 288
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 304
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 320
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 336
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 352
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 368
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 384
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 400
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 416
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 432
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 448
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 464
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 480
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 496
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 512
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 528
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 544
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 560
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 576
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 592
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 608
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 624
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 640
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 656
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 672
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 688
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 704
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 720
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 736
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 752
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 768
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 784
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 800
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 816
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 832
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 848
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 864
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 880
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 896
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 912
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 928
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 944
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 960
+ image: "test-pathview-2.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 992
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 1008
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 1024
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 1040
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 562; y: 250
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1056
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 557; y: 251
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1072
+ hash: "1ed6fa56736cf7cb2f99b5d362974463"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 544; y: 254
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1088
+ hash: "24f3dd6c49dd8b19cd0c387409405e18"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 534; y: 258
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1104
+ hash: "08c828e7fdfba4252fa7a9fb06eb728e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 511; y: 267
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1120
+ hash: "b76110faf8520f52128b5e1af8f2b838"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 499; y: 272
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1136
+ hash: "5f56acb5f39ac291cc8e73c0268df214"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 473; y: 281
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1152
+ hash: "840ee0c0d8ea94e22e783a15687f979d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 459; y: 285
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1168
+ hash: "69827007bbdf5a360ccc34a016315113"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 446; y: 288
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1184
+ hash: "2437beb8f9cb39b125611fb186bad820"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 433; y: 290
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 433; y: 290
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1200
+ hash: "df07c389b26fc191234c70b97bfaa432"
+ }
+ Frame {
+ msec: 1216
+ hash: "8d4e23f4e91d0e0df9d87c3171d5971f"
+ }
+ Frame {
+ msec: 1232
+ hash: "dd79837aefeabffa7184be07f2a98969"
+ }
+ Frame {
+ msec: 1248
+ hash: "2d9bb2aaf4b882902f090ff0c89053c8"
+ }
+ Frame {
+ msec: 1264
+ hash: "b1ec9adbb026d8002a7f16fe9a8d56d2"
+ }
+ Frame {
+ msec: 1280
+ hash: "43b23d6e1aeeb36350c3530650e9156f"
+ }
+ Frame {
+ msec: 1296
+ hash: "03f231597c4d5010ee71c74217f2483d"
+ }
+ Frame {
+ msec: 1312
+ hash: "8607c7412a5a1b4ea1522f28c465a83e"
+ }
+ Frame {
+ msec: 1328
+ hash: "671e80e290bec997eb36320ff76fdccf"
+ }
+ Frame {
+ msec: 1344
+ hash: "5f6717112bd45e5ebe194e0f87d12be6"
+ }
+ Frame {
+ msec: 1360
+ hash: "ca8e33c7a5428d70ae13cb64e5098a48"
+ }
+ Frame {
+ msec: 1376
+ hash: "86e60eb395f66bbaa1ec07b3e07013c0"
+ }
+ Frame {
+ msec: 1392
+ hash: "342fa6ddc02d0a793e97a79ba8882415"
+ }
+ Frame {
+ msec: 1408
+ hash: "a907fbcc47807d4eb6d66e070ea7f2de"
+ }
+ Frame {
+ msec: 1424
+ hash: "04838f8b495bed6d050cbe54d00aad31"
+ }
+ Frame {
+ msec: 1440
+ hash: "d485534916473ea6c4612230c5a95421"
+ }
+ Frame {
+ msec: 1456
+ hash: "1d3da7cc5b9120724645558584f2f0f3"
+ }
+ Frame {
+ msec: 1472
+ hash: "c271f057d5f1745e910b2b407c52a4f3"
+ }
+ Frame {
+ msec: 1488
+ hash: "050d1814a9ced514db6cfd2732eb76be"
+ }
+ Frame {
+ msec: 1504
+ hash: "cfcd21aadfe3fd611caad83920fb2432"
+ }
+ Frame {
+ msec: 1520
+ hash: "472f900ef8eef74522da3338ce7fa93e"
+ }
+ Frame {
+ msec: 1536
+ hash: "f9d892a81c6ba3b9fc4c6e76082d4fa7"
+ }
+ Frame {
+ msec: 1552
+ hash: "a3febe1c3c4585e25a410a91cc34c1fa"
+ }
+ Frame {
+ msec: 1568
+ hash: "74cd765c9d9a6fb243070b4a56a07e87"
+ }
+ Frame {
+ msec: 1584
+ hash: "469d324abbef017a99bc587bfae622b3"
+ }
+ Frame {
+ msec: 1600
+ hash: "6054ff6e658f0a5f5e313f0a724d9610"
+ }
+ Frame {
+ msec: 1616
+ hash: "67cee7ebe428c9d35f1f28274f3049d5"
+ }
+ Frame {
+ msec: 1632
+ hash: "ce6c3a1dd726eacbba6306e56121beef"
+ }
+ Frame {
+ msec: 1648
+ hash: "a7d5f703c98c0c8cd32b189a79e1fd05"
+ }
+ Frame {
+ msec: 1664
+ hash: "41cfd9982767ba904843fb73a5a0ed71"
+ }
+ Frame {
+ msec: 1680
+ hash: "388dcde17a820800237d1185372d889f"
+ }
+ Frame {
+ msec: 1696
+ hash: "3bd72585388f04d55900ccd345cd576e"
+ }
+ Frame {
+ msec: 1712
+ hash: "0e5c63b066f2b70000eca7f3aaa3a195"
+ }
+ Frame {
+ msec: 1728
+ hash: "15199f3e9f00afc76279b5bbffb78d92"
+ }
+ Frame {
+ msec: 1744
+ hash: "596ad681a3b96afbc284e3af5fd173cb"
+ }
+ Frame {
+ msec: 1760
+ hash: "e5ae2d0245fc5d74c6ea3f7dddd1ca2a"
+ }
+ Frame {
+ msec: 1776
+ hash: "0d152716f9ebe5f0fae3f5cabb20630f"
+ }
+ Frame {
+ msec: 1792
+ hash: "74afbfa464b0d19b53432fa4d5ea2804"
+ }
+ Frame {
+ msec: 1808
+ hash: "c8aa3f4738a8c07cdf2450a24c885ce6"
+ }
+ Frame {
+ msec: 1824
+ hash: "2e4e0003f1b1cb10593075862b972643"
+ }
+ Frame {
+ msec: 1840
+ hash: "acea518c7da7330ae78daf5fbfd1a423"
+ }
+ Frame {
+ msec: 1856
+ hash: "0b8d4ea6947b522c6aa9a32d9f16723e"
+ }
+ Frame {
+ msec: 1872
+ hash: "19f2aef82586817ef574a70865060997"
+ }
+ Frame {
+ msec: 1888
+ hash: "115565eb0ba3024dbf15d00ed242c389"
+ }
+ Frame {
+ msec: 1904
+ hash: "7e59425c85acf93f5bf55e139c148737"
+ }
+ Frame {
+ msec: 1920
+ image: "test-pathview-2.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "ce96601476cf55f665bef09bb1b038e2"
+ }
+ Frame {
+ msec: 1952
+ hash: "dc6eaacefe37fc709ac0bef99110f796"
+ }
+ Frame {
+ msec: 1968
+ hash: "82ad9b84425bd8e385524cb052a8fdd4"
+ }
+ Frame {
+ msec: 1984
+ hash: "608000b44ade998e225010d5ea562316"
+ }
+ Frame {
+ msec: 2000
+ hash: "ec6b4d519b7bafcf5293c2b5e6585007"
+ }
+ Frame {
+ msec: 2016
+ hash: "9895792ffa929ba6fc600949f11766b6"
+ }
+ Frame {
+ msec: 2032
+ hash: "0d2b27c9ca22520b269f93c90de08df4"
+ }
+ Frame {
+ msec: 2048
+ hash: "78a61e4565db709215b419aa56f6efab"
+ }
+ Frame {
+ msec: 2064
+ hash: "d6f2aebed062d093c00b27a52f0b14b8"
+ }
+ Frame {
+ msec: 2080
+ hash: "21b7a438ad1e835b84e5576e52abbe84"
+ }
+ Frame {
+ msec: 2096
+ hash: "703e32f43e9a71b8677d6839a0eafe06"
+ }
+ Frame {
+ msec: 2112
+ hash: "b04bea8af558de4120723fc5abd0f36c"
+ }
+ Frame {
+ msec: 2128
+ hash: "ac8e91c3b55e058ce8ff08ad6e3af9b6"
+ }
+ Frame {
+ msec: 2144
+ hash: "54846c8c70b232d05ff5eaf144f6f7d3"
+ }
+ Frame {
+ msec: 2160
+ hash: "52281806f5c80512b4bcab7f61139f74"
+ }
+ Frame {
+ msec: 2176
+ hash: "a352657ff34ef8962162c00647df343a"
+ }
+ Frame {
+ msec: 2192
+ hash: "3a0b12d1f8bf5cae8ac06289dd30d52a"
+ }
+ Frame {
+ msec: 2208
+ hash: "2c6bbcd05719f69b9a67be18de2084a6"
+ }
+ Frame {
+ msec: 2224
+ hash: "ab091484522587412b0e8aceeb8987ce"
+ }
+ Frame {
+ msec: 2240
+ hash: "13682b0d45bcbad0f011d08899085b1d"
+ }
+ Frame {
+ msec: 2256
+ hash: "3c5d6f82eafd1b04edfbcbffbdbe2177"
+ }
+ Frame {
+ msec: 2272
+ hash: "151803d70b7c3327df32c8602fcd677a"
+ }
+ Frame {
+ msec: 2288
+ hash: "78613cec5364fe3f0df84188793d8eac"
+ }
+ Frame {
+ msec: 2304
+ hash: "fc05a3cad43af35230c5ba89f6fd13c5"
+ }
+ Frame {
+ msec: 2320
+ hash: "9f826733b300c89eeb80452129505e8b"
+ }
+ Frame {
+ msec: 2336
+ hash: "8565efc5c1fb1bdf5629e3bd495bb611"
+ }
+ Frame {
+ msec: 2352
+ hash: "3b8f6e8c526ab8cce170277c378a5a69"
+ }
+ Frame {
+ msec: 2368
+ hash: "07db3bc0ab19e0ca829e89558bacf1a1"
+ }
+ Frame {
+ msec: 2384
+ hash: "ed8843024c6ac28a8c782839b362149c"
+ }
+ Frame {
+ msec: 2400
+ hash: "381a9f6564c090613aa2cd0476b95210"
+ }
+ Frame {
+ msec: 2416
+ hash: "c3fabd891fa8e27fd71df175db383667"
+ }
+ Frame {
+ msec: 2432
+ hash: "9b441792fdaa9ba9d340fc0c6a9c11bd"
+ }
+ Frame {
+ msec: 2448
+ hash: "3209c9ba69fa016370e3d56e7e1e37a4"
+ }
+ Frame {
+ msec: 2464
+ hash: "34da0a01453fbb2571b370257fd35f8e"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 591; y: 245
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 588; y: 245
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2480
+ hash: "32e6204a07c493d0a0f9f50773fe8f32"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 585; y: 245
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2496
+ hash: "2a1814768ae500ba9c24bc2e3e4de1d5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 582; y: 245
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2512
+ hash: "7cf6e3c52d12d590beafd061979a49cb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 574; y: 245
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 565; y: 246
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2528
+ hash: "c66c36642ab7f6c32b45e27de38d23b6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 553; y: 246
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2544
+ hash: "6e003380cc6fd303ae3b499863225ba5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 538; y: 246
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2560
+ hash: "a790259cea2c247493be58c6018435b9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 523; y: 247
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 523; y: 247
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2576
+ hash: "e6cce7468a27b5063821df8dbaa15c18"
+ }
+ Frame {
+ msec: 2592
+ hash: "ff8386cbe89aeac184f4a75237ef4a14"
+ }
+ Frame {
+ msec: 2608
+ hash: "1a11a90853b025837b991be40efb78f8"
+ }
+ Frame {
+ msec: 2624
+ hash: "17da10de7e2d2fcf125207e2873bdee8"
+ }
+ Frame {
+ msec: 2640
+ hash: "dfbda435d05903cc3a31f4f8f31e8985"
+ }
+ Frame {
+ msec: 2656
+ hash: "1f3753e809099f20c6289f150a096935"
+ }
+ Frame {
+ msec: 2672
+ hash: "9454afc9d70103e1f1c00eb0ad2ca534"
+ }
+ Frame {
+ msec: 2688
+ hash: "860ab90e2421a0c8faab304915b5e6f2"
+ }
+ Frame {
+ msec: 2704
+ hash: "600258507426a8c3c89e3591ee9328f1"
+ }
+ Frame {
+ msec: 2720
+ hash: "0795a607b893da2bdc0970195f3039fd"
+ }
+ Frame {
+ msec: 2736
+ hash: "e300b9109e242d85537fc3f4461eaf8e"
+ }
+ Frame {
+ msec: 2752
+ hash: "dbb84b38e2bda694f210f133dc133180"
+ }
+ Frame {
+ msec: 2768
+ hash: "2455e9de47da4db88eef35fea1dc2abe"
+ }
+ Frame {
+ msec: 2784
+ hash: "5f0c3d7e089c921a68813a48f0fd8844"
+ }
+ Frame {
+ msec: 2800
+ hash: "e6d9e7d0fdc724a6a1804bc94629cab4"
+ }
+ Frame {
+ msec: 2816
+ hash: "d177183bcbaa27ad061fd88bd037277d"
+ }
+ Frame {
+ msec: 2832
+ hash: "78dd13fa6367abd14374462d89a3d066"
+ }
+ Frame {
+ msec: 2848
+ hash: "41d12e4c362ccc99a1a04b3a09f0e68c"
+ }
+ Frame {
+ msec: 2864
+ hash: "5112700bf72aacb176e63ef054fce244"
+ }
+ Frame {
+ msec: 2880
+ image: "test-pathview-2.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "0257e67512c62ffc42a272fd304e4ed3"
+ }
+ Frame {
+ msec: 2912
+ hash: "42cd0a98aa0f3768cf77aac284072fa9"
+ }
+ Frame {
+ msec: 2928
+ hash: "811d27f89b0c434fc49e4280f85c2f27"
+ }
+ Frame {
+ msec: 2944
+ hash: "887406c50c666d08e4d98c040efae9a5"
+ }
+ Frame {
+ msec: 2960
+ hash: "27e10fa9d82920c7f761465501d44564"
+ }
+ Frame {
+ msec: 2976
+ hash: "ba67dbe0010ba2aae3ca100886b11553"
+ }
+ Frame {
+ msec: 2992
+ hash: "8064db575e2c74c0faf7782adc527a08"
+ }
+ Frame {
+ msec: 3008
+ hash: "b7fd5446ad957610ab853e0c597b9a36"
+ }
+ Frame {
+ msec: 3024
+ hash: "092b53eb50e91d74db7899328899cfd3"
+ }
+ Frame {
+ msec: 3040
+ hash: "0346065ad603b41db9365987ebe81586"
+ }
+ Frame {
+ msec: 3056
+ hash: "705083f27a338fea544c9806f0d8fcb3"
+ }
+ Frame {
+ msec: 3072
+ hash: "fc29b4888e26deec4c983e487b9bd058"
+ }
+ Frame {
+ msec: 3088
+ hash: "0ff734e0509908eba292c1814f677e5b"
+ }
+ Frame {
+ msec: 3104
+ hash: "7181d9011ddd3ad49ee95fac2e146b12"
+ }
+ Frame {
+ msec: 3120
+ hash: "4478b07b0331bb30e60f23ee74475f73"
+ }
+ Frame {
+ msec: 3136
+ hash: "514aa7a4b1230ae1701004f479eeb5f2"
+ }
+ Frame {
+ msec: 3152
+ hash: "56e51f8f36e0f1a5a4b6b21c41151375"
+ }
+ Frame {
+ msec: 3168
+ hash: "f58216f12e507a91482ded5372f960c7"
+ }
+ Frame {
+ msec: 3184
+ hash: "18e8675ca5ea7ade7e32b29f1632e1ff"
+ }
+ Frame {
+ msec: 3200
+ hash: "13ec0166cc7dd82042e596739c598a1e"
+ }
+ Frame {
+ msec: 3216
+ hash: "5cebf9afa912b17ac3161619d238e5da"
+ }
+ Frame {
+ msec: 3232
+ hash: "f096b191e347b7e2eab51b6adc1a5aac"
+ }
+ Frame {
+ msec: 3248
+ hash: "81cffc13a615ab673172912760863c08"
+ }
+ Frame {
+ msec: 3264
+ hash: "e89c7acfc07bc0eb6e9740d545400064"
+ }
+ Frame {
+ msec: 3280
+ hash: "e681f06f57d43a38acb29a3cb45e4384"
+ }
+ Frame {
+ msec: 3296
+ hash: "945bfe7808fb620dc3f7ad887183244c"
+ }
+ Frame {
+ msec: 3312
+ hash: "4d1fc53701adce4e4af87c32e6c5a8de"
+ }
+ Frame {
+ msec: 3328
+ hash: "c42bbf27e800558fab33bc6e9a0f36b9"
+ }
+ Frame {
+ msec: 3344
+ hash: "5f48f59812b17a9be466f0601f0ed0df"
+ }
+ Frame {
+ msec: 3360
+ hash: "f3a3f645115077b7aeb66465280b7a16"
+ }
+ Frame {
+ msec: 3376
+ hash: "d1c295b2157001ff1020515f4b2aceaa"
+ }
+ Frame {
+ msec: 3392
+ hash: "e5f364e0e4bd75dd04280f6b6f48b8ba"
+ }
+ Frame {
+ msec: 3408
+ hash: "f439df4b5907ba0201c0dad934115721"
+ }
+ Frame {
+ msec: 3424
+ hash: "2e7eb0e999792f3aa87c63865f68d26b"
+ }
+ Frame {
+ msec: 3440
+ hash: "45d3ccb3b03adc8323445207d2dca502"
+ }
+ Frame {
+ msec: 3456
+ hash: "c345f92a25406e33256bfe47dc7f72f3"
+ }
+ Frame {
+ msec: 3472
+ hash: "dcb2663d27d644c0b50aa7386aa9d488"
+ }
+ Frame {
+ msec: 3488
+ hash: "ebe4b9eaf39676bcdd968f8517efa222"
+ }
+ Frame {
+ msec: 3504
+ hash: "deb3e3e6fdf8fe18de907f88822538e8"
+ }
+ Frame {
+ msec: 3520
+ hash: "30e8ab0e6cf32a45190c4b29e458d858"
+ }
+ Frame {
+ msec: 3536
+ hash: "059e6f57c2c78a25ab8b515c878231f9"
+ }
+ Frame {
+ msec: 3552
+ hash: "fa7621f338ae187edac5cb69b22e64b3"
+ }
+ Frame {
+ msec: 3568
+ hash: "bf287cbb0963fc8e575cd95808e1983d"
+ }
+ Frame {
+ msec: 3584
+ hash: "741dc09e0ae13d6afbdaae701cb699ef"
+ }
+ Frame {
+ msec: 3600
+ hash: "8dd52007df5585aed4b9737a8314a74d"
+ }
+ Frame {
+ msec: 3616
+ hash: "ddcd945a3a4467d8dd0b7a4197aafed5"
+ }
+ Frame {
+ msec: 3632
+ hash: "015deb5f228fa2f77978315ccca4f4c8"
+ }
+ Frame {
+ msec: 3648
+ hash: "e1c960e966873e694837fd98f231cfcb"
+ }
+ Frame {
+ msec: 3664
+ hash: "17a177d37b427d9488e36d19b345a397"
+ }
+ Frame {
+ msec: 3680
+ hash: "d4aded08d04f79d50536ecf539c0583d"
+ }
+ Frame {
+ msec: 3696
+ hash: "72890e9b84acf9df6083e23ab9270da1"
+ }
+ Frame {
+ msec: 3712
+ hash: "313859115de570f8d41f67c4db7cf49e"
+ }
+ Frame {
+ msec: 3728
+ hash: "98918d73b6d6b375db53470dd72c7b35"
+ }
+ Frame {
+ msec: 3744
+ hash: "ff706517a4d257747893c11a3b059926"
+ }
+ Frame {
+ msec: 3760
+ hash: "73e62664a31232c1a349568c8da6ce64"
+ }
+ Frame {
+ msec: 3776
+ hash: "bed046c6eae90d267e859cd76d3eacfb"
+ }
+ Frame {
+ msec: 3792
+ hash: "4643348fc1b47f0d3244e7e717247953"
+ }
+ Frame {
+ msec: 3808
+ hash: "0305bfc35b5618da19e9eabb3c1b5d2b"
+ }
+ Frame {
+ msec: 3824
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 3840
+ image: "test-pathview-2.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 3872
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 3888
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 3904
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 3920
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 3936
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 3952
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 3968
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 3984
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4000
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4016
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 305; y: 280
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4032
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 305; y: 281
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4048
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 306; y: 281
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4064
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 308; y: 281
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4080
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 310; y: 282
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4096
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 313; y: 283
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 317; y: 283
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4112
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 321; y: 283
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4128
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 328; y: 283
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4144
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 341; y: 283
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 347; y: 282
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4160
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 360; y: 281
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4176
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 385; y: 282
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4192
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 433; y: 292
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 486; y: 307
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4208
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 538; y: 322
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4224
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 588; y: 336
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4240
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 620; y: 343
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 677; y: 354
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4256
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 733; y: 362
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4272
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 785; y: 365
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4288
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 830; y: 365
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 861; y: 357
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4304
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 879; y: 346
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4320
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 888; y: 335
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4336
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 893; y: 326
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 893; y: 326
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4352
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4368
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4384
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4400
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4416
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4432
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4448
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4464
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4480
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4496
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4512
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4528
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4544
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4560
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4576
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4592
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4608
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4624
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4640
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4656
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4672
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4688
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4704
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4720
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4736
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4752
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4768
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4784
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4800
+ image: "test-pathview-2.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4832
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4848
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4864
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4880
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4896
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4912
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4928
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4944
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4960
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4976
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 4992
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5008
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5024
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5040
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5056
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5072
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5088
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5104
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5120
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5136
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5152
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5168
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5184
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5200
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5216
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5232
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5248
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5264
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5280
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5296
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5312
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5328
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5344
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5360
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Frame {
+ msec: 5376
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 242; y: 280
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5392
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 244; y: 280
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 246; y: 281
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5408
+ hash: "754f9689239e6154a762a6a1e9e0131b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 251; y: 282
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5424
+ hash: "ba4e61f8de7f078cfc1e5fc8dd3c65f3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 261; y: 282
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5440
+ hash: "00389598468dbd1a90cada9543715770"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 300; y: 279
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5456
+ hash: "ab020b76bc23554e176bd3a59712c3bc"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 350; y: 282
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5472
+ hash: "96483c5c51cc851c55166b13617b12ea"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 417; y: 290
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5488
+ hash: "1ad679d1400a0f185a380a75840c6a50"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 500; y: 300
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 585; y: 309
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5504
+ hash: "b5ed338d402d16a831c0595311350789"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 669; y: 315
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 669; y: 315
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5520
+ hash: "bf51ff7b6f264170d9c5700559e03262"
+ }
+ Frame {
+ msec: 5536
+ hash: "0d62681e661aad7b67b880e13afeb4de"
+ }
+ Frame {
+ msec: 5552
+ hash: "3371739270c458d4ce8a08f2e12d4ba5"
+ }
+ Frame {
+ msec: 5568
+ hash: "db271b0ebfa0172d8386ac9afde9f296"
+ }
+ Frame {
+ msec: 5584
+ hash: "d64c064ab483c9636b2736c67b2b1a48"
+ }
+ Frame {
+ msec: 5600
+ hash: "20a8ccb0ff1c0d5ff606b343f1a32bff"
+ }
+ Frame {
+ msec: 5616
+ hash: "5547bb0a4d6b51733829597b9d8d141a"
+ }
+ Frame {
+ msec: 5632
+ hash: "1135177a5cb24aa11372653985599775"
+ }
+ Frame {
+ msec: 5648
+ hash: "5031ea6ca8ec59155edb7c1f10f77925"
+ }
+ Frame {
+ msec: 5664
+ hash: "7c5c1015af23f32c002a24a880201883"
+ }
+ Frame {
+ msec: 5680
+ hash: "c1dd3ad07775d74d2e81b830d07543e0"
+ }
+ Frame {
+ msec: 5696
+ hash: "ad6651f644be3c6f1ebf340809fe516f"
+ }
+ Frame {
+ msec: 5712
+ hash: "1eb69541ae67d9d9193b86a6592de4c2"
+ }
+ Frame {
+ msec: 5728
+ hash: "c9c40ec693a421243804efb8f99707f4"
+ }
+ Frame {
+ msec: 5744
+ hash: "832884a5102069ca085001156a04e74e"
+ }
+ Frame {
+ msec: 5760
+ image: "test-pathview-2.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "df0c7d73069e1087d34c7a703197cb2a"
+ }
+ Frame {
+ msec: 5792
+ hash: "4a8e1f548e48b86140aa1a5fa8b17bd3"
+ }
+ Frame {
+ msec: 5808
+ hash: "f79f47e3a0c16a1361fa287a594c4673"
+ }
+ Frame {
+ msec: 5824
+ hash: "c26da5ed2e4055f5c172b48163560143"
+ }
+ Frame {
+ msec: 5840
+ hash: "0e971cd0c2e25d52b689d4b22509a7d9"
+ }
+ Frame {
+ msec: 5856
+ hash: "40bae0ef35772c476cddccc034b7c872"
+ }
+ Frame {
+ msec: 5872
+ hash: "ce1fc0faae5e313bc21e024dac3097da"
+ }
+ Frame {
+ msec: 5888
+ hash: "ba614972cec0e9fa47cb09f1ba77eefb"
+ }
+ Frame {
+ msec: 5904
+ hash: "2266ae29490ae01ff8a2329956c124a7"
+ }
+ Frame {
+ msec: 5920
+ hash: "debae0194926cb5af0a8f7fdfb7f08b8"
+ }
+ Frame {
+ msec: 5936
+ hash: "10a7111367cfcbe24063b9ee6975e4fc"
+ }
+ Frame {
+ msec: 5952
+ hash: "3c0f9e0603e33506f31ff6569d007b97"
+ }
+ Frame {
+ msec: 5968
+ hash: "69d92abce3f093cc7610bd715a7396fa"
+ }
+ Frame {
+ msec: 5984
+ hash: "befad9882a6af920684d94c74d8d7f78"
+ }
+ Frame {
+ msec: 6000
+ hash: "10632052ac53504bd36687ba7aa7ebc1"
+ }
+ Frame {
+ msec: 6016
+ hash: "af4053320c12cbcc6f0e7e321dba1c83"
+ }
+ Frame {
+ msec: 6032
+ hash: "4560c5fcef9d630d744e80dc46947b9d"
+ }
+ Frame {
+ msec: 6048
+ hash: "012ee780ed98131321aaa241a2599c5f"
+ }
+ Frame {
+ msec: 6064
+ hash: "25d3fb9d44bc2be3b86a5451d8ffaec2"
+ }
+ Frame {
+ msec: 6080
+ hash: "09c5cbff81a5c9fae40ec29b936ee52b"
+ }
+ Frame {
+ msec: 6096
+ hash: "27a0b1d2ea2fc8729e5542c6462c1815"
+ }
+ Frame {
+ msec: 6112
+ hash: "c6f347c942aed190ebee077b5bd0888c"
+ }
+ Frame {
+ msec: 6128
+ hash: "029d78844bd72acb310bd2887489bdf0"
+ }
+ Frame {
+ msec: 6144
+ hash: "3af16ab398f1515e90e81460ac061a74"
+ }
+ Frame {
+ msec: 6160
+ hash: "0151ca050722645e2899919f79f6aa0b"
+ }
+ Frame {
+ msec: 6176
+ hash: "eead61dfc1851bc9fba3b4bca510af6a"
+ }
+ Frame {
+ msec: 6192
+ hash: "da822098c606556ad8683316f5a821ab"
+ }
+ Frame {
+ msec: 6208
+ hash: "ee47fc2bcf2264f5799a76308fbf2b65"
+ }
+ Frame {
+ msec: 6224
+ hash: "81b208b84ca887d35cda79b5c0e4cd4e"
+ }
+ Frame {
+ msec: 6240
+ hash: "fd52ccaddcb79a2dfa12bb57640a3610"
+ }
+ Frame {
+ msec: 6256
+ hash: "b187e8fcd0a777657a733c260aaaf557"
+ }
+ Frame {
+ msec: 6272
+ hash: "2cfe47a86bf9df3704002288b6249ed9"
+ }
+ Frame {
+ msec: 6288
+ hash: "b79b81706f62789a15557ac1a017addf"
+ }
+ Frame {
+ msec: 6304
+ hash: "77a84eb447fe7034783678f6903ff76d"
+ }
+ Frame {
+ msec: 6320
+ hash: "82529385d3072812fa737193914ece1c"
+ }
+ Frame {
+ msec: 6336
+ hash: "a7ccfa6c8aebf2016f2f12045d2f1abe"
+ }
+ Frame {
+ msec: 6352
+ hash: "486d38e7ea6a5cf13f2ecd1c6919ece7"
+ }
+ Frame {
+ msec: 6368
+ hash: "6c5bd377d2289ec88f969e961f1dcf65"
+ }
+ Frame {
+ msec: 6384
+ hash: "92e20565fbcf8c7c9a67726f3a0dd41f"
+ }
+ Frame {
+ msec: 6400
+ hash: "0fcd995a26262b875440d0d9f03d16c4"
+ }
+ Frame {
+ msec: 6416
+ hash: "f679759eddca739764bd2816ee53ef31"
+ }
+ Frame {
+ msec: 6432
+ hash: "adffd1da9b750df3d9f48820a2235c0b"
+ }
+ Frame {
+ msec: 6448
+ hash: "e0f8730acf7a6802ade228f95d700c08"
+ }
+ Frame {
+ msec: 6464
+ hash: "2c5209c3715bb9f39ac23a8b32a17ef9"
+ }
+ Frame {
+ msec: 6480
+ hash: "741694ef4cbd3477a8e13ba89fc9d607"
+ }
+ Frame {
+ msec: 6496
+ hash: "e88d6a61acb3fde6b441c2e718a0c2fb"
+ }
+ Frame {
+ msec: 6512
+ hash: "b91863800e6ab967616d68def388d5d5"
+ }
+ Frame {
+ msec: 6528
+ hash: "4c28a99236c351a2e3e3301c0b5bbba8"
+ }
+ Frame {
+ msec: 6544
+ hash: "6affb524d7f63fef94d29629a148be04"
+ }
+ Frame {
+ msec: 6560
+ hash: "f7823d25adf673117f010738d977b787"
+ }
+ Frame {
+ msec: 6576
+ hash: "dfb930f3db30ec53c8e9a1aa5d9056e4"
+ }
+ Frame {
+ msec: 6592
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6608
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6624
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6640
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6656
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6672
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6688
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6704
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6720
+ image: "test-pathview-2.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6752
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6768
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6784
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6800
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6816
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6832
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6848
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6864
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6880
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6896
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6912
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6928
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6944
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6960
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6976
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 6992
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 7008
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 7024
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 7040
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 7056
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 7072
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 7088
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 7104
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 7120
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 7136
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 7152
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 7168
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 7184
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 7200
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 7216
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 7232
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 7248
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+ Frame {
+ msec: 7264
+ hash: "57269234dc01b66f6aeb841c328c06b5"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.0.png b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.0.png
new file mode 100644
index 0000000000..442ba9f1a9
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.1.png b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.1.png
new file mode 100644
index 0000000000..a9ff20fa4e
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.2.png b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.2.png
new file mode 100644
index 0000000000..157bb991eb
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.3.png b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.3.png
new file mode 100644
index 0000000000..8c49acb576
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.4.png b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.4.png
new file mode 100644
index 0000000000..eb2bf54803
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.qml b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.qml
new file mode 100644
index 0000000000..8cff5c6285
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepathview/data/test-pathview.qml
@@ -0,0 +1,1495 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 32
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 48
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 64
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 80
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 96
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 112
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 128
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 144
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 160
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 176
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 192
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 208
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 224
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 240
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 256
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 272
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 288
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 304
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 320
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 336
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 352
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 368
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 384
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 400
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 416
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 432
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 448
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 464
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 480
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 496
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 512
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 528
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 544
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 560
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 576
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 592
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 608
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 624
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 640
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 656
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 672
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 688
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 704
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 720
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 736
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 752
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 768
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 784
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 800
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 816
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 832
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 848
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 864
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 880
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 896
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 912
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 928
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 944
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 960
+ image: "test-pathview.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 992
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 1008
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 1024
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 1040
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 1056
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 1072
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 1088
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 1104
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 1120
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 1136
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 734; y: 177
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1152
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Frame {
+ msec: 1168
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 732; y: 177
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1184
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 726; y: 179
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1200
+ hash: "89bb697bb7b7fab38d3ff56e23e43959"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 716; y: 183
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1216
+ hash: "42c141399fda1cbb2ae117788d87092a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 700; y: 190
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1232
+ hash: "4d44343eb91838e3eb73e2e5326b5ac2"
+ }
+ Frame {
+ msec: 1248
+ hash: "4d44343eb91838e3eb73e2e5326b5ac2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 677; y: 200
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1264
+ hash: "15aaccb4f7961a4e3e6fe57260779d00"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 651; y: 209
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1280
+ hash: "5628fa3ac9893f5c9690013aad4b881a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 619; y: 219
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1296
+ hash: "384db58b6de773ac39ae81e6af4d547d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 579; y: 229
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1312
+ hash: "2a15a27a138b9d3d646b827d026e8843"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 535; y: 237
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 535; y: 237
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1328
+ hash: "098176f48a148eb2bc5ef67c307baa1c"
+ }
+ Frame {
+ msec: 1344
+ hash: "f838ab4301bf9d3106cec529f855cecd"
+ }
+ Frame {
+ msec: 1360
+ hash: "9725322067a04f83717b059d4970d610"
+ }
+ Frame {
+ msec: 1376
+ hash: "3605cfbebc3a9eb4460efb2d4b9b6da2"
+ }
+ Frame {
+ msec: 1392
+ hash: "4503a368d8db25d112503dbc3934541d"
+ }
+ Frame {
+ msec: 1408
+ hash: "80894cc06c82264bf527398ea235da12"
+ }
+ Frame {
+ msec: 1424
+ hash: "d4f9b90f886fc667309b33c9a296410c"
+ }
+ Frame {
+ msec: 1440
+ hash: "889d01025cff679b61bff182a1ac9cbc"
+ }
+ Frame {
+ msec: 1456
+ hash: "6147bc4455e7cb5ae55cd47be8dc4ad6"
+ }
+ Frame {
+ msec: 1472
+ hash: "ddd10a294eb6b19698c4e9fe4f1508fe"
+ }
+ Frame {
+ msec: 1488
+ hash: "748e8d9c1971f6258acee5133b7f114b"
+ }
+ Frame {
+ msec: 1504
+ hash: "1ef3f32ec9ef950588266bacbe3554a0"
+ }
+ Frame {
+ msec: 1520
+ hash: "57853ff47b65aba9e76f90b2efec4f8f"
+ }
+ Frame {
+ msec: 1536
+ hash: "3985fea21d89d223c1461d5e96364c76"
+ }
+ Frame {
+ msec: 1552
+ hash: "cb5f6a3caeeaed12e91efe43867f2c1f"
+ }
+ Frame {
+ msec: 1568
+ hash: "cdd4176776d5969373e0fc9a117e3c87"
+ }
+ Frame {
+ msec: 1584
+ hash: "3bac2e7506472db2ae11734240f1c3f4"
+ }
+ Frame {
+ msec: 1600
+ hash: "bb572659d79ebda7134c039e40cf2633"
+ }
+ Frame {
+ msec: 1616
+ hash: "e610181bfa17a85281f9c7417088f04f"
+ }
+ Frame {
+ msec: 1632
+ hash: "eb23ff021909589b6d8ce47ebff2c3ed"
+ }
+ Frame {
+ msec: 1648
+ hash: "c321dda3878c4b97cc63246c47368224"
+ }
+ Frame {
+ msec: 1664
+ hash: "6a65cdfd50e1455356040d4cbc09905e"
+ }
+ Frame {
+ msec: 1680
+ hash: "f2a44b12e4e5bae8283c4d227949e4e8"
+ }
+ Frame {
+ msec: 1696
+ hash: "55418d661f3257b5b79a7dbb172b5b70"
+ }
+ Frame {
+ msec: 1712
+ hash: "483d7111c86951918746d6ebe0dd9655"
+ }
+ Frame {
+ msec: 1728
+ hash: "85c83ac3a294a9320bb04a6721ecf7d5"
+ }
+ Frame {
+ msec: 1744
+ hash: "0d658b897b8e03397ddd8ffe475c2fc0"
+ }
+ Frame {
+ msec: 1760
+ hash: "6ed9d7ea344b3c1b1d9196ee36b2f89a"
+ }
+ Frame {
+ msec: 1776
+ hash: "6a1e7f6c03769c2c88e6343fb6c1a2a4"
+ }
+ Frame {
+ msec: 1792
+ hash: "9dc51f46e072eac4494d7318f2ecb39b"
+ }
+ Frame {
+ msec: 1808
+ hash: "59e833981c3fcd8a71f4a16d1c454b3a"
+ }
+ Frame {
+ msec: 1824
+ hash: "29b953efdda00548d8cf6fb49fa60d13"
+ }
+ Frame {
+ msec: 1840
+ hash: "fd4611f703f94ebefcc64781993ca85c"
+ }
+ Frame {
+ msec: 1856
+ hash: "aa4789ede618963157b40f099ce84987"
+ }
+ Frame {
+ msec: 1872
+ hash: "8a326b46ec536a67626ee2d2bc06aa9f"
+ }
+ Frame {
+ msec: 1888
+ hash: "011ff557672d47591e4f0f5c5ee418f1"
+ }
+ Frame {
+ msec: 1904
+ hash: "d72fba857bdc128ddcb5971b86aadcb2"
+ }
+ Frame {
+ msec: 1920
+ image: "test-pathview.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "49182b7ae9ef5fb4b9234969abd05960"
+ }
+ Frame {
+ msec: 1952
+ hash: "53de60f682574b7a9e6ffaee175fc9ff"
+ }
+ Frame {
+ msec: 1968
+ hash: "2de74fe5b8848c5c781b796146871f45"
+ }
+ Frame {
+ msec: 1984
+ hash: "33c87146d8c24dd9c2271d16a8ff5b53"
+ }
+ Frame {
+ msec: 2000
+ hash: "fdb29214e20d744d9776907061f50358"
+ }
+ Frame {
+ msec: 2016
+ hash: "8c7c920416c9b775e790e6da24c32927"
+ }
+ Frame {
+ msec: 2032
+ hash: "86b456059e4701379447fffaf9e072f0"
+ }
+ Frame {
+ msec: 2048
+ hash: "f92cc485ee03ef5bce3c4cdc35e00318"
+ }
+ Frame {
+ msec: 2064
+ hash: "2fad58883cb20273cfd79ebca345a66d"
+ }
+ Frame {
+ msec: 2080
+ hash: "84505ebbc6e12817f11f64aa6f61a0bf"
+ }
+ Frame {
+ msec: 2096
+ hash: "ded83cacb89838cc0f3ba14bcc69b66b"
+ }
+ Frame {
+ msec: 2112
+ hash: "5bb37e75bb45eaa6067c604b83ae13d7"
+ }
+ Frame {
+ msec: 2128
+ hash: "4ee9e4c90c40dbc25a0ce884d9c2c37f"
+ }
+ Frame {
+ msec: 2144
+ hash: "cb7148ff6f611038c29af36c8552b8c2"
+ }
+ Frame {
+ msec: 2160
+ hash: "a591d8cb42570272dd264d5f1ce595ab"
+ }
+ Frame {
+ msec: 2176
+ hash: "4e61657405d32dbcd39d3637f8af0958"
+ }
+ Frame {
+ msec: 2192
+ hash: "9c7c1411dd5d3c1c8fb78e63e14061fe"
+ }
+ Frame {
+ msec: 2208
+ hash: "ae83a37e99b578fa0872ed6bc2776bc0"
+ }
+ Frame {
+ msec: 2224
+ hash: "e8cb5a8a40c1e78c87c616f77d8de270"
+ }
+ Frame {
+ msec: 2240
+ hash: "9df093e4bcfa32be5924a0ca70bdaa3b"
+ }
+ Frame {
+ msec: 2256
+ hash: "40c358066d508143bee1446d12fe7b89"
+ }
+ Frame {
+ msec: 2272
+ hash: "a929ed6efc7fc68b38635f3c74242f52"
+ }
+ Frame {
+ msec: 2288
+ hash: "86ff721a3178b689ea47b6bc274a2b41"
+ }
+ Frame {
+ msec: 2304
+ hash: "ed1f680f6d05f54ceb75c9bae3a0716a"
+ }
+ Frame {
+ msec: 2320
+ hash: "3f09a565df2beb51f366a1b3fb6adfe9"
+ }
+ Frame {
+ msec: 2336
+ hash: "13468347bd26bab60f1db826fb17631c"
+ }
+ Frame {
+ msec: 2352
+ hash: "9f7d085fea5788a457098973f17c36cb"
+ }
+ Frame {
+ msec: 2368
+ hash: "4114b93246155b3434200831b2995330"
+ }
+ Frame {
+ msec: 2384
+ hash: "487171bd1430f74e3d51b5e215c34b5c"
+ }
+ Frame {
+ msec: 2400
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2416
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2432
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2448
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2464
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2480
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2496
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2512
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2528
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2544
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2560
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2576
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2592
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2608
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2624
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2640
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2656
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2672
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2688
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2704
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2720
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2736
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2752
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2768
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2784
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2800
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2816
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2832
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2848
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2864
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2880
+ image: "test-pathview.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2912
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2928
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2944
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2960
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2976
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 2992
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 3008
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 3024
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 3040
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 3056
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 3072
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 3088
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 728; y: 181
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3104
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 3120
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Frame {
+ msec: 3136
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 727; y: 181
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3152
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 723; y: 181
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3168
+ hash: "7ba9783ce63db6ad6b5f725a4ecd4eb8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 717; y: 184
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3184
+ hash: "6dcec6cdaa35eba74607ba64d6ea2ec0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 705; y: 188
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3200
+ hash: "16b7b4847fe86b25d8d6136106a4c400"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 686; y: 197
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3216
+ hash: "d946d55b19c99fa25bf1c04f2b71026a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 661; y: 207
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3232
+ hash: "96f40f5071365cde769c733fd1ef5a24"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 626; y: 221
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3248
+ hash: "7004058b95b7eab3ebba5c80c0923982"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 582; y: 235
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3264
+ hash: "2c78880237c414182f97f1709f1eef0f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 532; y: 246
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3280
+ hash: "c90a15ec9f88008ca8b0ec0185444d71"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 532; y: 246
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3296
+ hash: "c90a15ec9f88008ca8b0ec0185444d71"
+ }
+ Frame {
+ msec: 3312
+ hash: "36461e2a4cd860cac32223b8ee73c657"
+ }
+ Frame {
+ msec: 3328
+ hash: "5f9b3ad9202fb02a4c6fea28c248ad22"
+ }
+ Frame {
+ msec: 3344
+ hash: "d0d23c4e1ddb2d9ffa0ecc38030ae15c"
+ }
+ Frame {
+ msec: 3360
+ hash: "8e2e2d3eaf557c453f34016b6614e495"
+ }
+ Frame {
+ msec: 3376
+ hash: "7402c747fa7276293a0a72d48d342782"
+ }
+ Frame {
+ msec: 3392
+ hash: "6090c30e4d722a32c083a25171fb11ff"
+ }
+ Frame {
+ msec: 3408
+ hash: "f770d940cf287fec4b0803f7310292a8"
+ }
+ Frame {
+ msec: 3424
+ hash: "558e4ce32df69357b70a8285b00fe347"
+ }
+ Frame {
+ msec: 3440
+ hash: "8814168503c9a72ea8d3fa1e503f33d9"
+ }
+ Frame {
+ msec: 3456
+ hash: "6f5513d22e545096fadc6f5c4112902e"
+ }
+ Frame {
+ msec: 3472
+ hash: "43f11d8ac16fd3e8199e555528817e14"
+ }
+ Frame {
+ msec: 3488
+ hash: "d64bafdbd26878a323dae918d5e0a36d"
+ }
+ Frame {
+ msec: 3504
+ hash: "1c70bdddfc3751ae3864f008170f8b06"
+ }
+ Frame {
+ msec: 3520
+ hash: "bb7a18691fcd371e9d382b5bba4a0573"
+ }
+ Frame {
+ msec: 3536
+ hash: "547e15f5dea2d9aa3ed44640b25028b9"
+ }
+ Frame {
+ msec: 3552
+ hash: "c11b86a256fac6be10b9a54564903d6f"
+ }
+ Frame {
+ msec: 3568
+ hash: "0ada2dc586894d5e37de2632d2b37b15"
+ }
+ Frame {
+ msec: 3584
+ hash: "0ae1a39ea196a0e734d80dbdea67b285"
+ }
+ Frame {
+ msec: 3600
+ hash: "3cb70e64f9ab8aad841326dc2d2f1615"
+ }
+ Frame {
+ msec: 3616
+ hash: "a8f8b5ff19df9163ea628b589b675a5e"
+ }
+ Frame {
+ msec: 3632
+ hash: "26fcc73f477db0ea731bc18b00b4c791"
+ }
+ Frame {
+ msec: 3648
+ hash: "8702e49f3f26e1e21970e78c8aa4040a"
+ }
+ Frame {
+ msec: 3664
+ hash: "1a482a39d02779d8733e348b713f2312"
+ }
+ Frame {
+ msec: 3680
+ hash: "c728cc4a8e4d0a8d983514f86a92eae0"
+ }
+ Frame {
+ msec: 3696
+ hash: "82360ab373b08bf6a5d9e9ea9d0d18aa"
+ }
+ Frame {
+ msec: 3712
+ hash: "6231a4bce6cfc1e26a9606cc041acdbc"
+ }
+ Frame {
+ msec: 3728
+ hash: "6e3b48862fc749f15aa2dec1c17d1de0"
+ }
+ Frame {
+ msec: 3744
+ hash: "6c9e79a5692a3810b2a9058790f54cd7"
+ }
+ Frame {
+ msec: 3760
+ hash: "0652c67fedda0d5e55858ddefff2da9e"
+ }
+ Frame {
+ msec: 3776
+ hash: "3b058c0efeb3a9da54a1de72a1792a83"
+ }
+ Frame {
+ msec: 3792
+ hash: "96e6fb39c8dbfe4a00bf116bf80aac4d"
+ }
+ Frame {
+ msec: 3808
+ hash: "979c0c78c41e0f337cfe1b384fbbe51a"
+ }
+ Frame {
+ msec: 3824
+ hash: "8be0d6987a6d12864f30336b249e4b16"
+ }
+ Frame {
+ msec: 3840
+ image: "test-pathview.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "31e665f804a52a4dc88eab5dba78ae5a"
+ }
+ Frame {
+ msec: 3872
+ hash: "b7d4cf5a6a3ac79da3be101b50b38bc2"
+ }
+ Frame {
+ msec: 3888
+ hash: "559b1b8467b611cdeb7f2ae660e3bf51"
+ }
+ Frame {
+ msec: 3904
+ hash: "66abb5af85e793569382efb04744d0de"
+ }
+ Frame {
+ msec: 3920
+ hash: "b64eff8bbea5a953d146333363825724"
+ }
+ Frame {
+ msec: 3936
+ hash: "47b794c971c4d47baf15e1d63d65ac03"
+ }
+ Frame {
+ msec: 3952
+ hash: "b3882fa14f3cb7428c660737656d7ea2"
+ }
+ Frame {
+ msec: 3968
+ hash: "a6bd71c7d3a0f3f53674ea8e1334e560"
+ }
+ Frame {
+ msec: 3984
+ hash: "0926d3cd53aabb789686e34d91ef23dc"
+ }
+ Frame {
+ msec: 4000
+ hash: "914c4fa7264111b4a42c82a60701d652"
+ }
+ Frame {
+ msec: 4016
+ hash: "84c1fa22440a61126b79c38605b6f9ca"
+ }
+ Frame {
+ msec: 4032
+ hash: "b684fcf9f4725cfc02af0187454dfaf8"
+ }
+ Frame {
+ msec: 4048
+ hash: "2e94c1ca74af4eb836a0c505d131f263"
+ }
+ Frame {
+ msec: 4064
+ hash: "5f04912674e1bcdb16176976d10ce995"
+ }
+ Frame {
+ msec: 4080
+ hash: "aaf0bcef4a15aa1c699eaa1ce817c8ed"
+ }
+ Frame {
+ msec: 4096
+ hash: "97fd5bdcfa367191fbd3689658ab3273"
+ }
+ Frame {
+ msec: 4112
+ hash: "d76d6c59411636a0e9ac2e0c847b3fe3"
+ }
+ Frame {
+ msec: 4128
+ hash: "9cb88a76c962623b1a9cf4e7093d6e54"
+ }
+ Frame {
+ msec: 4144
+ hash: "ec3d7075680296905b1bdd6fdd9fcc40"
+ }
+ Frame {
+ msec: 4160
+ hash: "43c70dabc45ed059e8b876eb2ba5c66e"
+ }
+ Frame {
+ msec: 4176
+ hash: "8f97ca5c3092a20009c5d00139105a22"
+ }
+ Frame {
+ msec: 4192
+ hash: "d0f225d4b03495218f7916698e254338"
+ }
+ Frame {
+ msec: 4208
+ hash: "f8725467353a8f27bc5570af157c93c7"
+ }
+ Frame {
+ msec: 4224
+ hash: "749c8ca5c0a7774c81805b792e6b70e3"
+ }
+ Frame {
+ msec: 4240
+ hash: "d353c4a8a5eecb1dce30f4a5b85b1ef4"
+ }
+ Frame {
+ msec: 4256
+ hash: "a7105f3f1ddace730d0b4a12a3560208"
+ }
+ Frame {
+ msec: 4272
+ hash: "918f480af8a35f6074ff1e202dae2660"
+ }
+ Frame {
+ msec: 4288
+ hash: "ed98d08eb30db1b41aaf2a58f3b59398"
+ }
+ Frame {
+ msec: 4304
+ hash: "c362cf053b3749a44d1fc33483f9952b"
+ }
+ Frame {
+ msec: 4320
+ hash: "9b01b2c771ef86ff4a8ee3f6a4676e3c"
+ }
+ Frame {
+ msec: 4336
+ hash: "70ccec3c9db95206b5589d43dcd52b13"
+ }
+ Frame {
+ msec: 4352
+ hash: "57e7397c6aadd0d4d5c9d9d5fcdd8fde"
+ }
+ Frame {
+ msec: 4368
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4384
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4400
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4416
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4432
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4448
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4464
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4480
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4496
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4512
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4528
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4544
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4560
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4576
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4592
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4608
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4624
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4640
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4656
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4672
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4688
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4704
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4720
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4736
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4752
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4768
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4784
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4800
+ image: "test-pathview.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4832
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4848
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4864
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4880
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4896
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4912
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4928
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4944
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4960
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4976
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 4992
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 5008
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 5024
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 5040
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 5056
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 5072
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 5088
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 5104
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 5120
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 5136
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 5152
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 5168
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 5184
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 5200
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+ Frame {
+ msec: 5216
+ hash: "299b24eae7720e1711744b23335bca8c"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativepathview/test-pathview-2.qml b/tests/auto/declarative/visual/qdeclarativepathview/test-pathview-2.qml
new file mode 100644
index 0000000000..c6d71d588a
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepathview/test-pathview-2.qml
@@ -0,0 +1,62 @@
+import Qt 4.6
+
+Rectangle {
+ width: 800; height: 450
+ //Same as test-pathview, but with pathItemCount < model.count
+
+ ListModel {
+ id: rssModel
+ ListElement { lColor: "red" }
+ ListElement { lColor: "green" }
+ ListElement { lColor: "yellow" }
+ ListElement { lColor: "blue" }
+ ListElement { lColor: "purple" }
+ ListElement { lColor: "gray" }
+ ListElement { lColor: "brown" }
+ ListElement { lColor: "thistle" }
+ }
+
+ Component {
+ id: photoDelegate
+ Rectangle {
+ id: wrapper
+ width: 85; height: 85; color: lColor
+ scale: wrapper.PathView.scale
+
+ transform: Rotation {
+ id: itemRotation; origin.x: wrapper.width/2; origin.y: wrapper.height/2
+ axis.y: 1; axis.z: 0; angle: wrapper.PathView.angle
+ }
+ }
+ }
+
+ PathView {
+ id: pathView; model: rssModel; delegate: photoDelegate
+ y: 100; width: 800; height: 330; pathItemCount: 6; z: 1
+ focus: true
+ path: Path {
+ startX: -50; startY: 40;
+
+ PathAttribute { name: "scale"; value: 0.5 }
+ PathAttribute { name: "angle"; value: -45 }
+
+ PathCubic {
+ x: 400; y: 220
+ control1X: 140; control1Y: 40
+ control2X: 210; control2Y: 220
+ }
+
+ PathAttribute { name: "scale"; value: 1.2 }
+ PathAttribute { name: "angle"; value: 0 }
+
+ PathCubic {
+ x: 850; y: 40
+ control2X: 660; control2Y: 40
+ control1X: 590; control1Y: 220
+ }
+
+ PathAttribute { name: "scale"; value: 0.5 }
+ PathAttribute { name: "angle"; value: 45 }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativepathview/test-pathview.qml b/tests/auto/declarative/visual/qdeclarativepathview/test-pathview.qml
new file mode 100644
index 0000000000..0adfa0217e
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepathview/test-pathview.qml
@@ -0,0 +1,62 @@
+import Qt 4.6
+
+Rectangle {
+ width: 800; height: 450
+
+ ListModel {
+ id: rssModel
+ ListElement { lColor: "red" }
+ ListElement { lColor: "green" }
+ ListElement { lColor: "yellow" }
+ ListElement { lColor: "blue" }
+ ListElement { lColor: "purple" }
+ ListElement { lColor: "gray" }
+ ListElement { lColor: "brown" }
+ ListElement { lColor: "thistle" }
+ }
+
+ Component {
+ id: photoDelegate
+ Rectangle {
+ id: wrapper
+ width: 85; height: 85; color: lColor
+ scale: wrapper.PathView.scale
+
+ MouseArea { anchors.fill: parent }
+
+ transform: Rotation {
+ id: itemRotation; origin.x: wrapper.width/2; origin.y: wrapper.height/2
+ axis.y: 1; axis.z: 0; angle: wrapper.PathView.angle
+ }
+ }
+ }
+
+ PathView {
+ id: photoPathView; model: rssModel; delegate: photoDelegate
+ y: 100; width: 800; height: 330; pathItemCount: 10; z: 1
+ path: Path {
+ startX: -50; startY: 40;
+
+ PathAttribute { name: "scale"; value: 0.5 }
+ PathAttribute { name: "angle"; value: -45 }
+
+ PathCubic {
+ x: 400; y: 220
+ control1X: 140; control1Y: 40
+ control2X: 210; control2Y: 220
+ }
+
+ PathAttribute { name: "scale"; value: 1.2 }
+ PathAttribute { name: "angle"; value: 0 }
+
+ PathCubic {
+ x: 850; y: 40
+ control2X: 660; control2Y: 40
+ control1X: 590; control1Y: 220
+ }
+
+ PathAttribute { name: "scale"; value: 0.5 }
+ PathAttribute { name: "angle"; value: 45 }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.0.png b/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.0.png
new file mode 100644
index 0000000000..f474afecdc
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.1.png b/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.1.png
new file mode 100644
index 0000000000..8b7ae74b13
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.2.png b/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.2.png
new file mode 100644
index 0000000000..9088bb4f48
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.3.png b/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.3.png
new file mode 100644
index 0000000000..18cd4298f9
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.4.png b/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.4.png
new file mode 100644
index 0000000000..739afc17ca
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.5.png b/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.5.png
new file mode 100644
index 0000000000..93f0682397
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.qml b/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.qml
new file mode 100644
index 0000000000..7091bb3fae
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepositioners/data/dynamic.qml
@@ -0,0 +1,1603 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 32
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 48
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 64
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 80
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 96
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 112
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 128
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 144
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 160
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 176
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 192
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 208
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 224
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 240
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 256
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 272
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 288
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 304
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 320
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 336
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 352
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 368
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 384
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 400
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 416
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 432
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 448
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 464
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 480
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 496
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 512
+ hash: "ee42cfa8cbbd67becb7d50998d26fe73"
+ }
+ Frame {
+ msec: 528
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 544
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 560
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 576
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 592
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 608
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 624
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 640
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 656
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 672
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 688
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 704
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 720
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 736
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 752
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 768
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 784
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 800
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 816
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 832
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 848
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 864
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 880
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 896
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 912
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 928
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 944
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 960
+ image: "dynamic.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 992
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 1008
+ hash: "62727b1025930e19bb03c8f533a12ced"
+ }
+ Frame {
+ msec: 1024
+ hash: "3e52e7d7d428cf1b850cb9c60dbb3c21"
+ }
+ Frame {
+ msec: 1040
+ hash: "64f75ab14c979d33d6e0c0d86b76cd35"
+ }
+ Frame {
+ msec: 1056
+ hash: "c198a48f4050f176465649d203d6e09a"
+ }
+ Frame {
+ msec: 1072
+ hash: "6dd8cee5a585a96e78f2cf7478c4da62"
+ }
+ Frame {
+ msec: 1088
+ hash: "09edfbce2ea4b8a547f769ce709dcb6b"
+ }
+ Frame {
+ msec: 1104
+ hash: "e93d01aa6e4f5d3fc82cf5a008e3ea17"
+ }
+ Frame {
+ msec: 1120
+ hash: "0e2e7b5eec0e62853972b0139b8c17c6"
+ }
+ Frame {
+ msec: 1136
+ hash: "26d4f54628ce20f5665bdc6ddc7f3b6a"
+ }
+ Frame {
+ msec: 1152
+ hash: "59836aa6eff85b0152be352b97076d89"
+ }
+ Frame {
+ msec: 1168
+ hash: "47cc9894096731a52ca342ab04df9aad"
+ }
+ Frame {
+ msec: 1184
+ hash: "ec95dd3b34a0f17f6fb9b5bedab73653"
+ }
+ Frame {
+ msec: 1200
+ hash: "e32c2b70882828b5082ca3ec889a0dde"
+ }
+ Frame {
+ msec: 1216
+ hash: "68d3f8e9c9d5388a6f8360368c8f4d2f"
+ }
+ Frame {
+ msec: 1232
+ hash: "17378b2bd8bde7f357fa5463f457c7b2"
+ }
+ Frame {
+ msec: 1248
+ hash: "03db786cd54ec34ce8db15953a5fc847"
+ }
+ Frame {
+ msec: 1264
+ hash: "9e22a82a622ed0287c44cc629059d5bd"
+ }
+ Frame {
+ msec: 1280
+ hash: "42955cd23747f7c37d0f0229c0955e90"
+ }
+ Frame {
+ msec: 1296
+ hash: "42955cd23747f7c37d0f0229c0955e90"
+ }
+ Frame {
+ msec: 1312
+ hash: "42955cd23747f7c37d0f0229c0955e90"
+ }
+ Frame {
+ msec: 1328
+ hash: "42955cd23747f7c37d0f0229c0955e90"
+ }
+ Frame {
+ msec: 1344
+ hash: "42955cd23747f7c37d0f0229c0955e90"
+ }
+ Frame {
+ msec: 1360
+ hash: "42955cd23747f7c37d0f0229c0955e90"
+ }
+ Frame {
+ msec: 1376
+ hash: "42955cd23747f7c37d0f0229c0955e90"
+ }
+ Frame {
+ msec: 1392
+ hash: "42955cd23747f7c37d0f0229c0955e90"
+ }
+ Frame {
+ msec: 1408
+ hash: "42955cd23747f7c37d0f0229c0955e90"
+ }
+ Frame {
+ msec: 1424
+ hash: "42955cd23747f7c37d0f0229c0955e90"
+ }
+ Frame {
+ msec: 1440
+ hash: "42955cd23747f7c37d0f0229c0955e90"
+ }
+ Frame {
+ msec: 1456
+ hash: "42955cd23747f7c37d0f0229c0955e90"
+ }
+ Frame {
+ msec: 1472
+ hash: "42955cd23747f7c37d0f0229c0955e90"
+ }
+ Frame {
+ msec: 1488
+ hash: "42955cd23747f7c37d0f0229c0955e90"
+ }
+ Frame {
+ msec: 1504
+ hash: "42955cd23747f7c37d0f0229c0955e90"
+ }
+ Frame {
+ msec: 1520
+ hash: "981fb1ee75e307b548a32df08a86f4cd"
+ }
+ Frame {
+ msec: 1536
+ hash: "f77568307e93d8cd9f0ae417cc19d6e3"
+ }
+ Frame {
+ msec: 1552
+ hash: "3bdd4468e26aceee0dad6b3b97b1c1ea"
+ }
+ Frame {
+ msec: 1568
+ hash: "252c9ebc2c32755b2289ee1b03877fe3"
+ }
+ Frame {
+ msec: 1584
+ hash: "64169b7eb7b7ae8573556c5f80230965"
+ }
+ Frame {
+ msec: 1600
+ hash: "4965dfa709a9ac7d8f7dfb4bf8303c65"
+ }
+ Frame {
+ msec: 1616
+ hash: "8c53cf92510154087341ac65a93aae5a"
+ }
+ Frame {
+ msec: 1632
+ hash: "4dd7502e3e238743d2f3cf038270491e"
+ }
+ Frame {
+ msec: 1648
+ hash: "cd9a58316837eb92f4ac92dbd86bdba3"
+ }
+ Frame {
+ msec: 1664
+ hash: "5de043e3ac8696b59293a2fa60ed7e65"
+ }
+ Frame {
+ msec: 1680
+ hash: "1bf42a6f6be5a3468d2f47cccfac761e"
+ }
+ Frame {
+ msec: 1696
+ hash: "ca05510c1ad25e5d3b002603f4379a09"
+ }
+ Frame {
+ msec: 1712
+ hash: "f6904a918a6475f1965d74372e52a4b1"
+ }
+ Frame {
+ msec: 1728
+ hash: "9e2312ddfc1648b615288107a06c9f9c"
+ }
+ Frame {
+ msec: 1744
+ hash: "95c470273b1cb08d4d602efcce339554"
+ }
+ Frame {
+ msec: 1760
+ hash: "dade96f707d4a21885480e13b258b7e9"
+ }
+ Frame {
+ msec: 1776
+ hash: "0bfbd46f1d4cf562253fb383776cb601"
+ }
+ Frame {
+ msec: 1792
+ hash: "0bfbd46f1d4cf562253fb383776cb601"
+ }
+ Frame {
+ msec: 1808
+ hash: "0bfbd46f1d4cf562253fb383776cb601"
+ }
+ Frame {
+ msec: 1824
+ hash: "0bfbd46f1d4cf562253fb383776cb601"
+ }
+ Frame {
+ msec: 1840
+ hash: "0bfbd46f1d4cf562253fb383776cb601"
+ }
+ Frame {
+ msec: 1856
+ hash: "0bfbd46f1d4cf562253fb383776cb601"
+ }
+ Frame {
+ msec: 1872
+ hash: "0bfbd46f1d4cf562253fb383776cb601"
+ }
+ Frame {
+ msec: 1888
+ hash: "0bfbd46f1d4cf562253fb383776cb601"
+ }
+ Frame {
+ msec: 1904
+ hash: "0bfbd46f1d4cf562253fb383776cb601"
+ }
+ Frame {
+ msec: 1920
+ image: "dynamic.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "0bfbd46f1d4cf562253fb383776cb601"
+ }
+ Frame {
+ msec: 1952
+ hash: "0bfbd46f1d4cf562253fb383776cb601"
+ }
+ Frame {
+ msec: 1968
+ hash: "0bfbd46f1d4cf562253fb383776cb601"
+ }
+ Frame {
+ msec: 1984
+ hash: "0bfbd46f1d4cf562253fb383776cb601"
+ }
+ Frame {
+ msec: 2000
+ hash: "0bfbd46f1d4cf562253fb383776cb601"
+ }
+ Frame {
+ msec: 2016
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2032
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2048
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2064
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2080
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2096
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2112
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2128
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2144
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2160
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2176
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2192
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2208
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2224
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2240
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2256
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2272
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2288
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2304
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2320
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2336
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2352
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2368
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2384
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2400
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2416
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2432
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2448
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2464
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2480
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2496
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2512
+ hash: "6fc83e8d4ac99b34062c122a8f7f1850"
+ }
+ Frame {
+ msec: 2528
+ hash: "fabf4e535bc4cc17497939d2eeae4a2d"
+ }
+ Frame {
+ msec: 2544
+ hash: "a7981035f46869f5ae824d0c58b263b2"
+ }
+ Frame {
+ msec: 2560
+ hash: "86d8e369bdceb499b244f84ed9e80ba3"
+ }
+ Frame {
+ msec: 2576
+ hash: "e28a7dc7ea8690da75670b5a6e93a26b"
+ }
+ Frame {
+ msec: 2592
+ hash: "bf4e815360a67bd80732bd8812269b21"
+ }
+ Frame {
+ msec: 2608
+ hash: "a6f8c56cb93da8acc0c90e35596a60d4"
+ }
+ Frame {
+ msec: 2624
+ hash: "1e60656f0758605169e51b57bd03af36"
+ }
+ Frame {
+ msec: 2640
+ hash: "c069b26b9fae47e0104070d702ba9562"
+ }
+ Frame {
+ msec: 2656
+ hash: "457eb2ca1adff6cbb158afa140b2f20b"
+ }
+ Frame {
+ msec: 2672
+ hash: "4e5e750b0d94b6777aebff85d38225d9"
+ }
+ Frame {
+ msec: 2688
+ hash: "96d9840c2354a8786a8470309be97544"
+ }
+ Frame {
+ msec: 2704
+ hash: "ac7570cc7eeff1acd8c47f2d9328f8be"
+ }
+ Frame {
+ msec: 2720
+ hash: "887f937bb263c54f29659f27f2b7a3e3"
+ }
+ Frame {
+ msec: 2736
+ hash: "616371183c82b97f69a4c6e2367b8066"
+ }
+ Frame {
+ msec: 2752
+ hash: "36de8ffa9abe850fb681b37aea45ef8b"
+ }
+ Frame {
+ msec: 2768
+ hash: "0505101f0edaaf7ff17deeaaddc6bbf9"
+ }
+ Frame {
+ msec: 2784
+ hash: "e8c53dd8343d7d4c384c2f8507ff0631"
+ }
+ Frame {
+ msec: 2800
+ hash: "e8c53dd8343d7d4c384c2f8507ff0631"
+ }
+ Frame {
+ msec: 2816
+ hash: "e8c53dd8343d7d4c384c2f8507ff0631"
+ }
+ Frame {
+ msec: 2832
+ hash: "e8c53dd8343d7d4c384c2f8507ff0631"
+ }
+ Frame {
+ msec: 2848
+ hash: "e8c53dd8343d7d4c384c2f8507ff0631"
+ }
+ Frame {
+ msec: 2864
+ hash: "e8c53dd8343d7d4c384c2f8507ff0631"
+ }
+ Frame {
+ msec: 2880
+ image: "dynamic.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "e8c53dd8343d7d4c384c2f8507ff0631"
+ }
+ Frame {
+ msec: 2912
+ hash: "e8c53dd8343d7d4c384c2f8507ff0631"
+ }
+ Frame {
+ msec: 2928
+ hash: "e8c53dd8343d7d4c384c2f8507ff0631"
+ }
+ Frame {
+ msec: 2944
+ hash: "e8c53dd8343d7d4c384c2f8507ff0631"
+ }
+ Frame {
+ msec: 2960
+ hash: "e8c53dd8343d7d4c384c2f8507ff0631"
+ }
+ Frame {
+ msec: 2976
+ hash: "e8c53dd8343d7d4c384c2f8507ff0631"
+ }
+ Frame {
+ msec: 2992
+ hash: "e8c53dd8343d7d4c384c2f8507ff0631"
+ }
+ Frame {
+ msec: 3008
+ hash: "e8c53dd8343d7d4c384c2f8507ff0631"
+ }
+ Frame {
+ msec: 3024
+ hash: "99e4d853d64a381e8db27707b5ff2b25"
+ }
+ Frame {
+ msec: 3040
+ hash: "ab0e62aeffc0d57a5e1d63e6cf49b809"
+ }
+ Frame {
+ msec: 3056
+ hash: "4ab11bbf1fb6adb0eec8895f78a24a41"
+ }
+ Frame {
+ msec: 3072
+ hash: "634ff2ceb39a3f263a3362238a4ae252"
+ }
+ Frame {
+ msec: 3088
+ hash: "7f4856873dc23a02297b2497101de9b9"
+ }
+ Frame {
+ msec: 3104
+ hash: "bca3919e9d8e6dc5badd8090401dc934"
+ }
+ Frame {
+ msec: 3120
+ hash: "824bfe40c3657cfe1368563640e4cfce"
+ }
+ Frame {
+ msec: 3136
+ hash: "f831c1600f68bda139697c406ca70c5e"
+ }
+ Frame {
+ msec: 3152
+ hash: "f8102ca251a9ff46a8fe5a24cff0d2d6"
+ }
+ Frame {
+ msec: 3168
+ hash: "f33407ad684aa16efc6615d1cf6fa4b9"
+ }
+ Frame {
+ msec: 3184
+ hash: "a73d27f776a6ebfc90309b34421700e5"
+ }
+ Frame {
+ msec: 3200
+ hash: "ff2a4e2663fc50dfec35152f0e79f935"
+ }
+ Frame {
+ msec: 3216
+ hash: "4935f5f58f2672e9d240625151044bda"
+ }
+ Frame {
+ msec: 3232
+ hash: "f3ad5c203f621fe4d5d321c3c1880743"
+ }
+ Frame {
+ msec: 3248
+ hash: "d4fb7cd2e1f6a533dae65ddbb50da8ac"
+ }
+ Frame {
+ msec: 3264
+ hash: "91705e9234c4f02d0a730f6270f9e95f"
+ }
+ Frame {
+ msec: 3280
+ hash: "41e177bec783497b996d6d5f6dac1a15"
+ }
+ Frame {
+ msec: 3296
+ hash: "41e177bec783497b996d6d5f6dac1a15"
+ }
+ Frame {
+ msec: 3312
+ hash: "41e177bec783497b996d6d5f6dac1a15"
+ }
+ Frame {
+ msec: 3328
+ hash: "41e177bec783497b996d6d5f6dac1a15"
+ }
+ Frame {
+ msec: 3344
+ hash: "41e177bec783497b996d6d5f6dac1a15"
+ }
+ Frame {
+ msec: 3360
+ hash: "41e177bec783497b996d6d5f6dac1a15"
+ }
+ Frame {
+ msec: 3376
+ hash: "41e177bec783497b996d6d5f6dac1a15"
+ }
+ Frame {
+ msec: 3392
+ hash: "41e177bec783497b996d6d5f6dac1a15"
+ }
+ Frame {
+ msec: 3408
+ hash: "41e177bec783497b996d6d5f6dac1a15"
+ }
+ Frame {
+ msec: 3424
+ hash: "41e177bec783497b996d6d5f6dac1a15"
+ }
+ Frame {
+ msec: 3440
+ hash: "41e177bec783497b996d6d5f6dac1a15"
+ }
+ Frame {
+ msec: 3456
+ hash: "41e177bec783497b996d6d5f6dac1a15"
+ }
+ Frame {
+ msec: 3472
+ hash: "41e177bec783497b996d6d5f6dac1a15"
+ }
+ Frame {
+ msec: 3488
+ hash: "41e177bec783497b996d6d5f6dac1a15"
+ }
+ Frame {
+ msec: 3504
+ hash: "41e177bec783497b996d6d5f6dac1a15"
+ }
+ Frame {
+ msec: 3520
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3536
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3552
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3568
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3584
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3600
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3616
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3632
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3648
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3664
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3680
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3696
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3712
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3728
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3744
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3760
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3776
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3792
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3808
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3824
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3840
+ image: "dynamic.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3872
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3888
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3904
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3920
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3936
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3952
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3968
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 3984
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4000
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4016
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4032
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4048
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4064
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4080
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4096
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4112
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4128
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4144
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4160
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4176
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4192
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4208
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4224
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4240
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4256
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4272
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4288
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4304
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4320
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4336
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4352
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4368
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4384
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4400
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4416
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4432
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4448
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4464
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4480
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4496
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4512
+ hash: "496dc6261695bcf04a8e574146544e98"
+ }
+ Frame {
+ msec: 4528
+ hash: "9681be99003f8a14cc5654d06d2c8255"
+ }
+ Frame {
+ msec: 4544
+ hash: "bcb592a2335aa2e35956881fd028f4e6"
+ }
+ Frame {
+ msec: 4560
+ hash: "f914b25fdcb02a02b71220d82b7b2a75"
+ }
+ Frame {
+ msec: 4576
+ hash: "63c82c08eb7f2bd50b54b94c952df3f2"
+ }
+ Frame {
+ msec: 4592
+ hash: "8a8dc82be81fa55605c6c2e749895120"
+ }
+ Frame {
+ msec: 4608
+ hash: "271f8d79b8052dfcd840ffa9ba9ffeec"
+ }
+ Frame {
+ msec: 4624
+ hash: "8f77bbd0585b57e69ac1919bd81ee3b1"
+ }
+ Frame {
+ msec: 4640
+ hash: "b974260a2f90e141ebc33ced98fbca88"
+ }
+ Frame {
+ msec: 4656
+ hash: "77ada180f8a45652a6fa636d7ece4d9d"
+ }
+ Frame {
+ msec: 4672
+ hash: "4c8dc2e33cd989cb3b0938c6c75b5f95"
+ }
+ Frame {
+ msec: 4688
+ hash: "a145954989508b925a444e14f0c27a20"
+ }
+ Frame {
+ msec: 4704
+ hash: "8d27ff203819174747ae4a5cee8d0ae8"
+ }
+ Frame {
+ msec: 4720
+ hash: "830f34b0dab780c6efe2294872ba8508"
+ }
+ Frame {
+ msec: 4736
+ hash: "5d70a4bbd815569cfe5735b596bad080"
+ }
+ Frame {
+ msec: 4752
+ hash: "964527bb82ea006e03b030c787a8597c"
+ }
+ Frame {
+ msec: 4768
+ hash: "1ad54954b818fa9e6032ac4b6114e7db"
+ }
+ Frame {
+ msec: 4784
+ hash: "47865243cc252aef67774001af70c54c"
+ }
+ Frame {
+ msec: 4800
+ image: "dynamic.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "47865243cc252aef67774001af70c54c"
+ }
+ Frame {
+ msec: 4832
+ hash: "47865243cc252aef67774001af70c54c"
+ }
+ Frame {
+ msec: 4848
+ hash: "47865243cc252aef67774001af70c54c"
+ }
+ Frame {
+ msec: 4864
+ hash: "47865243cc252aef67774001af70c54c"
+ }
+ Frame {
+ msec: 4880
+ hash: "47865243cc252aef67774001af70c54c"
+ }
+ Frame {
+ msec: 4896
+ hash: "47865243cc252aef67774001af70c54c"
+ }
+ Frame {
+ msec: 4912
+ hash: "47865243cc252aef67774001af70c54c"
+ }
+ Frame {
+ msec: 4928
+ hash: "47865243cc252aef67774001af70c54c"
+ }
+ Frame {
+ msec: 4944
+ hash: "47865243cc252aef67774001af70c54c"
+ }
+ Frame {
+ msec: 4960
+ hash: "47865243cc252aef67774001af70c54c"
+ }
+ Frame {
+ msec: 4976
+ hash: "47865243cc252aef67774001af70c54c"
+ }
+ Frame {
+ msec: 4992
+ hash: "47865243cc252aef67774001af70c54c"
+ }
+ Frame {
+ msec: 5008
+ hash: "47865243cc252aef67774001af70c54c"
+ }
+ Frame {
+ msec: 5024
+ hash: "47865243cc252aef67774001af70c54c"
+ }
+ Frame {
+ msec: 5040
+ hash: "baeb8adffc13e230e797e0437f2ad5fa"
+ }
+ Frame {
+ msec: 5056
+ hash: "d2e440fcad0ee2b7b35d7e5c4e581f73"
+ }
+ Frame {
+ msec: 5072
+ hash: "fb8acb2f69234d3ee089281d0297ad7c"
+ }
+ Frame {
+ msec: 5088
+ hash: "7fda29a83dc535ed8d6b35e999400311"
+ }
+ Frame {
+ msec: 5104
+ hash: "6482e3eb10cfdbdeb57dd38ba3e3d67e"
+ }
+ Frame {
+ msec: 5120
+ hash: "4d222549bc2565c1598a532460aae4e6"
+ }
+ Frame {
+ msec: 5136
+ hash: "776d1b0f9945c0e1ceda0cf117264919"
+ }
+ Frame {
+ msec: 5152
+ hash: "f2c362b34a0982ee1a11dea6b063945e"
+ }
+ Frame {
+ msec: 5168
+ hash: "115f02b8893972b5b1d63525ce70762e"
+ }
+ Frame {
+ msec: 5184
+ hash: "7f2d53581fe2c6c45a628fa4cd9b5742"
+ }
+ Frame {
+ msec: 5200
+ hash: "b5ed1120c4edf842b15d5144adbd93b0"
+ }
+ Frame {
+ msec: 5216
+ hash: "3511938df57c4cdce316692de204b057"
+ }
+ Frame {
+ msec: 5232
+ hash: "99583918d068ab5d132fe7a699c2a7a6"
+ }
+ Frame {
+ msec: 5248
+ hash: "c0ce9df18479dbb57fb1dbc777f4f0e5"
+ }
+ Frame {
+ msec: 5264
+ hash: "b24db7b5c406328380fcf9927fb26c5c"
+ }
+ Frame {
+ msec: 5280
+ hash: "b24db7b5c406328380fcf9927fb26c5c"
+ }
+ Frame {
+ msec: 5296
+ hash: "b24db7b5c406328380fcf9927fb26c5c"
+ }
+ Frame {
+ msec: 5312
+ hash: "b24db7b5c406328380fcf9927fb26c5c"
+ }
+ Frame {
+ msec: 5328
+ hash: "b24db7b5c406328380fcf9927fb26c5c"
+ }
+ Frame {
+ msec: 5344
+ hash: "b24db7b5c406328380fcf9927fb26c5c"
+ }
+ Frame {
+ msec: 5360
+ hash: "b24db7b5c406328380fcf9927fb26c5c"
+ }
+ Frame {
+ msec: 5376
+ hash: "b24db7b5c406328380fcf9927fb26c5c"
+ }
+ Frame {
+ msec: 5392
+ hash: "b24db7b5c406328380fcf9927fb26c5c"
+ }
+ Frame {
+ msec: 5408
+ hash: "b24db7b5c406328380fcf9927fb26c5c"
+ }
+ Frame {
+ msec: 5424
+ hash: "b24db7b5c406328380fcf9927fb26c5c"
+ }
+ Frame {
+ msec: 5440
+ hash: "b24db7b5c406328380fcf9927fb26c5c"
+ }
+ Frame {
+ msec: 5456
+ hash: "b24db7b5c406328380fcf9927fb26c5c"
+ }
+ Frame {
+ msec: 5472
+ hash: "b24db7b5c406328380fcf9927fb26c5c"
+ }
+ Frame {
+ msec: 5488
+ hash: "b24db7b5c406328380fcf9927fb26c5c"
+ }
+ Frame {
+ msec: 5504
+ hash: "b24db7b5c406328380fcf9927fb26c5c"
+ }
+ Frame {
+ msec: 5520
+ hash: "b24db7b5c406328380fcf9927fb26c5c"
+ }
+ Frame {
+ msec: 5536
+ hash: "98cc64411264d8a635a6afe6b11cee6e"
+ }
+ Frame {
+ msec: 5552
+ hash: "b86434b7af8ad1db946c43a2791d69ab"
+ }
+ Frame {
+ msec: 5568
+ hash: "f45616f9e33658d1dddb537e842c8768"
+ }
+ Frame {
+ msec: 5584
+ hash: "e49d8955e27cdc19a37c331e56c81af1"
+ }
+ Frame {
+ msec: 5600
+ hash: "b2dbe764906b50195f65dc11a5842515"
+ }
+ Frame {
+ msec: 5616
+ hash: "71ce7c63d65c29cdffd83f5ae07f0b93"
+ }
+ Frame {
+ msec: 5632
+ hash: "901d01e1fc777ec185cd023ad0ace4c1"
+ }
+ Frame {
+ msec: 5648
+ hash: "a3f31de30fc2e92bae1f735504216216"
+ }
+ Frame {
+ msec: 5664
+ hash: "0fc52dd8102506e3e7671fa548551b23"
+ }
+ Frame {
+ msec: 5680
+ hash: "fb92809e728416035dbb91116ad8fe0e"
+ }
+ Frame {
+ msec: 5696
+ hash: "9003dc8ca4f781909035cb03dc45864f"
+ }
+ Frame {
+ msec: 5712
+ hash: "2bff1de793ad8521fd54413849c3cf29"
+ }
+ Frame {
+ msec: 5728
+ hash: "8362e4db7c4446282d844a4fc6632d19"
+ }
+ Frame {
+ msec: 5744
+ hash: "b874fa274c6ec77c106ff4a0288f9169"
+ }
+ Frame {
+ msec: 5760
+ image: "dynamic.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "e64ac8e11e36cafb25c947c5802d54b9"
+ }
+ Frame {
+ msec: 5792
+ hash: "e64ac8e11e36cafb25c947c5802d54b9"
+ }
+ Frame {
+ msec: 5808
+ hash: "e64ac8e11e36cafb25c947c5802d54b9"
+ }
+ Frame {
+ msec: 5824
+ hash: "e64ac8e11e36cafb25c947c5802d54b9"
+ }
+ Frame {
+ msec: 5840
+ hash: "e64ac8e11e36cafb25c947c5802d54b9"
+ }
+ Frame {
+ msec: 5856
+ hash: "e64ac8e11e36cafb25c947c5802d54b9"
+ }
+ Frame {
+ msec: 5872
+ hash: "e64ac8e11e36cafb25c947c5802d54b9"
+ }
+ Frame {
+ msec: 5888
+ hash: "e64ac8e11e36cafb25c947c5802d54b9"
+ }
+ Frame {
+ msec: 5904
+ hash: "e64ac8e11e36cafb25c947c5802d54b9"
+ }
+ Frame {
+ msec: 5920
+ hash: "e64ac8e11e36cafb25c947c5802d54b9"
+ }
+ Frame {
+ msec: 5936
+ hash: "e64ac8e11e36cafb25c947c5802d54b9"
+ }
+ Frame {
+ msec: 5952
+ hash: "e64ac8e11e36cafb25c947c5802d54b9"
+ }
+ Frame {
+ msec: 5968
+ hash: "e64ac8e11e36cafb25c947c5802d54b9"
+ }
+ Frame {
+ msec: 5984
+ hash: "e64ac8e11e36cafb25c947c5802d54b9"
+ }
+ Frame {
+ msec: 6000
+ hash: "e64ac8e11e36cafb25c947c5802d54b9"
+ }
+ Frame {
+ msec: 6016
+ hash: "e64ac8e11e36cafb25c947c5802d54b9"
+ }
+ Frame {
+ msec: 6032
+ hash: "7621e64568058b82bcb6f6b46cee3ebc"
+ }
+ Frame {
+ msec: 6048
+ hash: "f77f6de6fc88813f49427b4888a59dbf"
+ }
+ Frame {
+ msec: 6064
+ hash: "d3a48f596219372ac25941e4c5ec5b2b"
+ }
+ Frame {
+ msec: 6080
+ hash: "d572d932b613f9ca1e0acf144f127dd1"
+ }
+ Frame {
+ msec: 6096
+ hash: "edf317eaf51d933bcd0f57f214921a81"
+ }
+ Frame {
+ msec: 6112
+ hash: "e0cee7959a5a8a08ad03d75e7b5c6ca1"
+ }
+ Frame {
+ msec: 6128
+ hash: "96877a15f44d4a2c8d9974cb28b9e1b6"
+ }
+ Frame {
+ msec: 6144
+ hash: "c0ffb0ef6dd9d007d201feebd2f68e44"
+ }
+ Frame {
+ msec: 6160
+ hash: "209fb930223243fa19c5dde9e85ec518"
+ }
+ Frame {
+ msec: 6176
+ hash: "ae98ac4dba0e78eb8fb7f7dbe29b2832"
+ }
+ Frame {
+ msec: 6192
+ hash: "c94a7d68ce007d83df77a595a5815a96"
+ }
+ Frame {
+ msec: 6208
+ hash: "4c28e409bf5a6c1289bcab8cd59a9e42"
+ }
+ Frame {
+ msec: 6224
+ hash: "ea1009f1a3446dd5ce937e6949794794"
+ }
+ Frame {
+ msec: 6240
+ hash: "940c16766c2f87feef48e1187672ca9b"
+ }
+ Frame {
+ msec: 6256
+ hash: "93664c87c8dcfadc0345f646b2508625"
+ }
+ Frame {
+ msec: 6272
+ hash: "93664c87c8dcfadc0345f646b2508625"
+ }
+ Frame {
+ msec: 6288
+ hash: "93664c87c8dcfadc0345f646b2508625"
+ }
+ Frame {
+ msec: 6304
+ hash: "93664c87c8dcfadc0345f646b2508625"
+ }
+ Frame {
+ msec: 6320
+ hash: "93664c87c8dcfadc0345f646b2508625"
+ }
+ Frame {
+ msec: 6336
+ hash: "93664c87c8dcfadc0345f646b2508625"
+ }
+ Frame {
+ msec: 6352
+ hash: "93664c87c8dcfadc0345f646b2508625"
+ }
+ Frame {
+ msec: 6368
+ hash: "93664c87c8dcfadc0345f646b2508625"
+ }
+ Frame {
+ msec: 6384
+ hash: "93664c87c8dcfadc0345f646b2508625"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativepositioners/data/repeater.0.png b/tests/auto/declarative/visual/qdeclarativepositioners/data/repeater.0.png
new file mode 100644
index 0000000000..f7018fd9d2
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepositioners/data/repeater.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativepositioners/data/repeater.qml b/tests/auto/declarative/visual/qdeclarativepositioners/data/repeater.qml
new file mode 100644
index 0000000000..1eb115dacb
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepositioners/data/repeater.qml
@@ -0,0 +1,339 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 32
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 48
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 64
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 80
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 96
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 112
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 128
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 144
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 160
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 176
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 192
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 208
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 224
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 240
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 256
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 272
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 288
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 304
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 320
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 336
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 352
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 368
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 384
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 400
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 416
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 432
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 448
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 464
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 480
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 496
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 512
+ hash: "0273c293855f2b2bdbf579fc5cdce63f"
+ }
+ Frame {
+ msec: 528
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 544
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 560
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 576
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 592
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 608
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 624
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 640
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 656
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 672
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 688
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 704
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 720
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 736
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 752
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 768
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 784
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 800
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 816
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 832
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 848
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 864
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 880
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 896
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 912
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 928
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 944
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 960
+ image: "repeater.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 992
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1008
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1024
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1040
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1056
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1072
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1088
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1104
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1120
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1136
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1152
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1168
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1184
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1200
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1216
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1232
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1248
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1264
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1280
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1296
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1312
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+ Frame {
+ msec: 1328
+ hash: "53a01771047c8ec806a335a1a3d6af71"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativepositioners/dynamic.qml b/tests/auto/declarative/visual/qdeclarativepositioners/dynamic.qml
new file mode 100644
index 0000000000..f45e9a4d73
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepositioners/dynamic.qml
@@ -0,0 +1,65 @@
+import Qt 4.6
+
+Item {
+ width: 400; height: 400;
+ property int step: 0
+ function tick()
+ {
+ step++;
+ if(step == 1){
+ row1.destroy(); //Not dynamically created, so is this valid?
+ }else if(step == 2){
+ r2a.destroy();
+ }else if(step == 3){
+ r2b.destroy();
+ }else if(step == 4){
+ r2c.destroy();
+ }else if(step == 5){
+ r3a.parent = row2;
+ }else if(step == 6){
+ r3b.parent = row2;
+ }else if(step == 7){
+ r3c.parent = row2;
+ }else if(step == 8){
+ row3.destroy();
+ }else{
+ repeater.model++;
+ }
+ }
+
+ //Tests base positioner functionality, so just using row
+ Row{
+ id: row1
+ Rectangle{id: r1a; width:20; height:20; color: "red"}
+ Rectangle{id: r1b; width:20; height:20; color: "green"}
+ Rectangle{id: r1c; width:20; height:20; color: "blue"}
+ }
+ Row{
+ y:20
+ id: row2
+ move: Transition{NumberAnimation{properties:"x"}}
+ Repeater{
+ id: repeater
+ model: 0;
+ delegate: Component{ Rectangle { color: "yellow"; width:20; height:20;}}
+ }
+ Rectangle{id: r2a; width:20; height:20; color: "red"}
+ Rectangle{id: r2b; width:20; height:20; color: "green"}
+ Rectangle{id: r2c; width:20; height:20; color: "blue"}
+ }
+ Row{
+ move: Transition{NumberAnimation{properties:"x"}}
+ y:40
+ id: row3
+ Rectangle{id: r3a; width:20; height:20; color: "red"}
+ Rectangle{id: r3b; width:20; height:20; color: "green"}
+ Rectangle{id: r3c; width:20; height:20; color: "blue"}
+ }
+ Timer{
+ interval: 500;
+ running: true;
+ repeat: true;
+ onTriggered: tick();
+ }
+}
+
diff --git a/tests/auto/declarative/visual/qdeclarativepositioners/repeater.qml b/tests/auto/declarative/visual/qdeclarativepositioners/repeater.qml
new file mode 100644
index 0000000000..ff603650ec
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativepositioners/repeater.qml
@@ -0,0 +1,15 @@
+import Qt 4.6
+
+Item{
+ width: 200; height: 600
+ Column{
+ Rectangle{color:"Red"; width:40; height:40;}
+ Repeater{
+ id: rep
+ model: 3
+ delegate: Component{Rectangle{color:"Green"; width:40; height:40; radius: 20;}}
+ }
+ Rectangle{color:"Blue"; width:40; height:40;}
+ }
+ Timer{ interval: 500; running: true; onTriggered: rep.model=6;}
+}
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/clock.qml b/tests/auto/declarative/visual/qdeclarativespringfollow/clock.qml
new file mode 100644
index 0000000000..04bbabc39c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/clock.qml
@@ -0,0 +1,64 @@
+import Qt 4.6
+
+Rectangle {
+ id: clock
+ color: "gray"
+ width: 200; height: 200
+
+ property var hours: 10
+ property var minutes: 28
+ property var seconds: 0
+
+ Timer {
+ interval: 1000; running: true; repeat: true; triggeredOnStart: true
+ onTriggered: seconds++
+ }
+
+ Image { id: background; source: "content/clock.png" }
+
+ Image {
+ x: 92.5; y: 27
+ source: "content/hour.png"
+ smooth: true
+ transform: Rotation {
+ id: hourRotation
+ origin.x: 7.5; origin.y: 73; angle: 0
+ angle: SpringFollow {
+ spring: 2; damping: 0.2; modulus: 360
+ source: (clock.hours * 30) + (clock.minutes * 0.5)
+ }
+ }
+ }
+
+ Image {
+ x: 93.5; y: 17
+ source: "content/minute.png"
+ smooth: true
+ transform: Rotation {
+ id: minuteRotation
+ origin.x: 6.5; origin.y: 83; angle: 0
+ angle: SpringFollow {
+ spring: 2; damping: 0.2; modulus: 360
+ source: clock.minutes * 6
+ }
+ }
+ }
+
+ Image {
+ x: 97.5; y: 20
+ source: "content/second.png"
+ smooth: true
+ transform: Rotation {
+ id: secondRotation
+ origin.x: 2.5; origin.y: 80; angle: 0
+ angle: SpringFollow {
+ spring: 5; damping: 0.25; modulus: 360
+ source: clock.seconds * 6
+ }
+ }
+ }
+
+ Image {
+ anchors.centerIn: background; source: "content/center.png"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/content/background.png b/tests/auto/declarative/visual/qdeclarativespringfollow/content/background.png
new file mode 100644
index 0000000000..a885950862
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/content/background.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/content/center.png b/tests/auto/declarative/visual/qdeclarativespringfollow/content/center.png
new file mode 100755
index 0000000000..7fbd802a44
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/content/center.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/content/clock.png b/tests/auto/declarative/visual/qdeclarativespringfollow/content/clock.png
new file mode 100755
index 0000000000..462edacc0e
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/content/clock.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/content/hour.png b/tests/auto/declarative/visual/qdeclarativespringfollow/content/hour.png
new file mode 100755
index 0000000000..f8061a1235
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/content/hour.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/content/minute.png b/tests/auto/declarative/visual/qdeclarativespringfollow/content/minute.png
new file mode 100755
index 0000000000..1297ec7c2b
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/content/minute.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/content/second.png b/tests/auto/declarative/visual/qdeclarativespringfollow/content/second.png
new file mode 100755
index 0000000000..4aa9fb5e8e
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/content/second.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.0.png b/tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.0.png
new file mode 100644
index 0000000000..baf1d45a21
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.1.png b/tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.1.png
new file mode 100644
index 0000000000..932f63f4d7
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.2.png b/tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.2.png
new file mode 100644
index 0000000000..a5cb437fad
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.3.png b/tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.3.png
new file mode 100644
index 0000000000..62e895c730
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.qml b/tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.qml
new file mode 100644
index 0000000000..ffc6a5e05e
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/data/clock.qml
@@ -0,0 +1,1135 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "d17c9cd015b065adf7e36ad0d4f6c00c"
+ }
+ Frame {
+ msec: 32
+ hash: "e759f652c69a06d01837302cc0369a58"
+ }
+ Frame {
+ msec: 48
+ hash: "392855ef490903121fb894858961dfb0"
+ }
+ Frame {
+ msec: 64
+ hash: "5ba4248f606a3a35d840cb98eff30b46"
+ }
+ Frame {
+ msec: 80
+ hash: "3b97e1ab4054c20d19c1d05f795b71de"
+ }
+ Frame {
+ msec: 96
+ hash: "81904d248125cf35249f79da7e94d8d7"
+ }
+ Frame {
+ msec: 112
+ hash: "474179152aad4b64904c8b7c63581a89"
+ }
+ Frame {
+ msec: 128
+ hash: "583a7906d1dc41d8ce8d0c8f28c9b8c5"
+ }
+ Frame {
+ msec: 144
+ hash: "341437083f858e2dca36a8bb39559a1e"
+ }
+ Frame {
+ msec: 160
+ hash: "ed75a933c176ed6ac3fa5b2986cbfade"
+ }
+ Frame {
+ msec: 176
+ hash: "5494c10d3984a9be607b8b5ee659ebfc"
+ }
+ Frame {
+ msec: 192
+ hash: "7af8dfca43036ee69012cbb100d110ad"
+ }
+ Frame {
+ msec: 208
+ hash: "356b8185889e560b5a1a2d6436dac834"
+ }
+ Frame {
+ msec: 224
+ hash: "f601a66de5dc1a388e515ba4ff14be6e"
+ }
+ Frame {
+ msec: 240
+ hash: "4cfb9f3a72070533288b2e50820cbbbd"
+ }
+ Frame {
+ msec: 256
+ hash: "ddcb670af0806dadf5897bcd3fd65cd7"
+ }
+ Frame {
+ msec: 272
+ hash: "3fedf4aa340d7632359273b1eb71c5a3"
+ }
+ Frame {
+ msec: 288
+ hash: "3dab7e1eaccb68b14e30741775db6ff7"
+ }
+ Frame {
+ msec: 304
+ hash: "015ab6c080c2ffab8ac763681bf3f95c"
+ }
+ Frame {
+ msec: 320
+ hash: "74f438510f0d8f64120cc45bca7f4f5d"
+ }
+ Frame {
+ msec: 336
+ hash: "e57666fb224cdbf869e5be4ef3391be9"
+ }
+ Frame {
+ msec: 352
+ hash: "ff8b3dddd4d10b111b38801470fcbfd0"
+ }
+ Frame {
+ msec: 368
+ hash: "e547ee9f1e509d5db980cb91fce5f6ee"
+ }
+ Frame {
+ msec: 384
+ hash: "aaa9fb71bd47ad3a1c753d7ac918e399"
+ }
+ Frame {
+ msec: 400
+ hash: "54a335aac86669138730c0735ea99c8b"
+ }
+ Frame {
+ msec: 416
+ hash: "ff8f30aaa7afd8abfdd147b830e9d6c4"
+ }
+ Frame {
+ msec: 432
+ hash: "07f8fca270953cf815cb0e77534da824"
+ }
+ Frame {
+ msec: 448
+ hash: "30799c12182b2c3eb2f28b05d81ed6fc"
+ }
+ Frame {
+ msec: 464
+ hash: "6244e3b740218aec56c81c92dc57abcb"
+ }
+ Frame {
+ msec: 480
+ hash: "cb10a34e3d234043704e633b49184607"
+ }
+ Frame {
+ msec: 496
+ hash: "66de73779b5f86a6a1692eb74be24201"
+ }
+ Frame {
+ msec: 512
+ hash: "4c4c0b5e75f0f587ace8002720d78309"
+ }
+ Frame {
+ msec: 528
+ hash: "88c774ec272c72457b35b60306c2bc21"
+ }
+ Frame {
+ msec: 544
+ hash: "28ce64adc1d35d6bc34174765beda553"
+ }
+ Frame {
+ msec: 560
+ hash: "37238c3d6dc0c34bf4e00ba2a82ce3aa"
+ }
+ Frame {
+ msec: 576
+ hash: "d14dd306fec80f1a1ff9a85aa51b9a57"
+ }
+ Frame {
+ msec: 592
+ hash: "bfa2ec6fa546c75ee85e2ebeb3af8e3c"
+ }
+ Frame {
+ msec: 608
+ hash: "d1ec3faab47065f34e9397fd73f9edce"
+ }
+ Frame {
+ msec: 624
+ hash: "0b59b5dba365fff38872b520afc84edb"
+ }
+ Frame {
+ msec: 640
+ hash: "3c4ae01b5e878b85a2eea403f3ad478a"
+ }
+ Frame {
+ msec: 656
+ hash: "329111f7079230e8b3cfda1217e8fcdf"
+ }
+ Frame {
+ msec: 672
+ hash: "97761329ac9ba03ec41e3d5b35f245df"
+ }
+ Frame {
+ msec: 688
+ hash: "9d26e3a3357530e903ee89f7bf439357"
+ }
+ Frame {
+ msec: 704
+ hash: "1cf4c130ea3565547ff74280211f10c9"
+ }
+ Frame {
+ msec: 720
+ hash: "d60284711cb557b1dab4d27072c95597"
+ }
+ Frame {
+ msec: 736
+ hash: "98195e02405ee26c0a6a3177cebe9eaa"
+ }
+ Frame {
+ msec: 752
+ hash: "f0a776c39363e340ebfb7736f368f609"
+ }
+ Frame {
+ msec: 768
+ hash: "5a146b4b76f93e3064d5dfa13107b1c3"
+ }
+ Frame {
+ msec: 784
+ hash: "7f7fef3a7ff2047f598bfca0fc7d5935"
+ }
+ Frame {
+ msec: 800
+ hash: "85a2fd48605f8a77764bf96542db14c3"
+ }
+ Frame {
+ msec: 816
+ hash: "89bdc99d16e6605e2106dfa5f53d7c8e"
+ }
+ Frame {
+ msec: 832
+ hash: "d03754d56d85508b7c77959d1ab7b34a"
+ }
+ Frame {
+ msec: 848
+ hash: "8d330472a376b47d65cec0b8e3df25cb"
+ }
+ Frame {
+ msec: 864
+ hash: "401adaeecfd2c0a5598194e9ead4dd5d"
+ }
+ Frame {
+ msec: 880
+ hash: "5c600e940e0a01fec15505fba595df3d"
+ }
+ Frame {
+ msec: 896
+ hash: "b7940b041fbd3df5e6969130bf97da10"
+ }
+ Frame {
+ msec: 912
+ hash: "62314bb115c307eeff4c4c7c91ee74a2"
+ }
+ Frame {
+ msec: 928
+ hash: "54745a8a7ed96a4d5e2d4ec2de605882"
+ }
+ Frame {
+ msec: 944
+ hash: "a4145b63f59d060ac0e0dc32dd22c815"
+ }
+ Frame {
+ msec: 960
+ image: "clock.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "c420b1298329c7eb0d3ec6a90a7eb802"
+ }
+ Frame {
+ msec: 992
+ hash: "e63a5384cde6287c3cd8bdb823f35dca"
+ }
+ Frame {
+ msec: 1008
+ hash: "af708b5e4a2a706385afd43896eeff16"
+ }
+ Frame {
+ msec: 1024
+ hash: "32011e16d4b1c14619820ade020f6416"
+ }
+ Frame {
+ msec: 1040
+ hash: "fbf9f8f075b15922f7306e469075d3cf"
+ }
+ Frame {
+ msec: 1056
+ hash: "bf0fab116eae6e7fb5b3209220a3a52a"
+ }
+ Frame {
+ msec: 1072
+ hash: "7a21aee4bcb99feb12a2a2c6bb3fd893"
+ }
+ Frame {
+ msec: 1088
+ hash: "d721462af9c94e13f12374b2590dad1e"
+ }
+ Frame {
+ msec: 1104
+ hash: "70385b585c2cbf1b2d64f1b9ebb5fb56"
+ }
+ Frame {
+ msec: 1120
+ hash: "fc7adc3dd2f42bfe6cd74c2ee1ea9aa8"
+ }
+ Frame {
+ msec: 1136
+ hash: "232884da74c9843d1349e82a7300cc19"
+ }
+ Frame {
+ msec: 1152
+ hash: "c6790d9c8cbea7bf97cbedf443da330c"
+ }
+ Frame {
+ msec: 1168
+ hash: "1847875f98555ef46a103c107bd5bc37"
+ }
+ Frame {
+ msec: 1184
+ hash: "d7b35992b44a0220bd83a00b7f75dcdd"
+ }
+ Frame {
+ msec: 1200
+ hash: "fc9e1db602c34863088d82ed8f601364"
+ }
+ Frame {
+ msec: 1216
+ hash: "404e2d071f8a6409ba6c6bfd8450693c"
+ }
+ Frame {
+ msec: 1232
+ hash: "dc2b6be9bc4c32460797e94ec617406c"
+ }
+ Frame {
+ msec: 1248
+ hash: "5077b6afd808f7a2c319e66f0aef3002"
+ }
+ Frame {
+ msec: 1264
+ hash: "07f07a04ec7c864196faeb44eff65b4c"
+ }
+ Frame {
+ msec: 1280
+ hash: "5d9089a68ef0b8b78b68c33d3082b597"
+ }
+ Frame {
+ msec: 1296
+ hash: "d955c9f66eaf123351a19947240e8847"
+ }
+ Frame {
+ msec: 1312
+ hash: "f1821cbcb3883a041f22a114f7158532"
+ }
+ Frame {
+ msec: 1328
+ hash: "77f17db09c5a7125c42359c304f274de"
+ }
+ Frame {
+ msec: 1344
+ hash: "bc38a4c859f596f6cf3c399d3a04b1cd"
+ }
+ Frame {
+ msec: 1360
+ hash: "982c43a4a1c9fae8bf3980b5885cee2f"
+ }
+ Frame {
+ msec: 1376
+ hash: "c15bb9b7dd77d505ee9918eb36b75c31"
+ }
+ Frame {
+ msec: 1392
+ hash: "bda534fd941a6f8289bfbec9b8dde717"
+ }
+ Frame {
+ msec: 1408
+ hash: "7ad5c54b481525ace42ae8926a5c0556"
+ }
+ Frame {
+ msec: 1424
+ hash: "2399778158f63481eb8514245277b917"
+ }
+ Frame {
+ msec: 1440
+ hash: "6c200d090b34a0152c7eb233c97c3886"
+ }
+ Frame {
+ msec: 1456
+ hash: "7ba4500e81df31e3e2c5d165bacf771a"
+ }
+ Frame {
+ msec: 1472
+ hash: "c7e13f3d9bdfe35eb905c1d4ed6b73ac"
+ }
+ Frame {
+ msec: 1488
+ hash: "808b72766f5dce71fc983ffa01945665"
+ }
+ Frame {
+ msec: 1504
+ hash: "899ac513755476db1e1304317524a755"
+ }
+ Frame {
+ msec: 1520
+ hash: "27190dce033171966981672e52f07107"
+ }
+ Frame {
+ msec: 1536
+ hash: "5d9ef583b6b3cb5257cb044cf376eff2"
+ }
+ Frame {
+ msec: 1552
+ hash: "77b648fe26a942b246eec0fa018ad86f"
+ }
+ Frame {
+ msec: 1568
+ hash: "744a61493816338113ba4ba7c05f76de"
+ }
+ Frame {
+ msec: 1584
+ hash: "2eb0da64d5937c1a38754fd55ca684d0"
+ }
+ Frame {
+ msec: 1600
+ hash: "6f799c2c0c0e1ed419af03f8bbb9fae1"
+ }
+ Frame {
+ msec: 1616
+ hash: "5b84344f31d5e4d15be6b53ad3bf9c84"
+ }
+ Frame {
+ msec: 1632
+ hash: "997b5967e3e3a35d02f10e1eae417dbf"
+ }
+ Frame {
+ msec: 1648
+ hash: "c522369c836e8d08c56e2e332dd005ac"
+ }
+ Frame {
+ msec: 1664
+ hash: "22f4072da05d261cfcca232ea54d2cb4"
+ }
+ Frame {
+ msec: 1680
+ hash: "7081a90c33785306800b7a57a4a9a75c"
+ }
+ Frame {
+ msec: 1696
+ hash: "32a8bea14c92ce61ede89182765f0759"
+ }
+ Frame {
+ msec: 1712
+ hash: "4bafe476d5301974c616311073763ab4"
+ }
+ Frame {
+ msec: 1728
+ hash: "291188ca795d455ae293437c2fb2303d"
+ }
+ Frame {
+ msec: 1744
+ hash: "99d2658f863c82dd71fde0f0b93b4d62"
+ }
+ Frame {
+ msec: 1760
+ hash: "8a7183e11fde2846d5435847ad9add45"
+ }
+ Frame {
+ msec: 1776
+ hash: "34b6180b74f0653ce1f18c22022d333f"
+ }
+ Frame {
+ msec: 1792
+ hash: "34b6180b74f0653ce1f18c22022d333f"
+ }
+ Frame {
+ msec: 1808
+ hash: "34b6180b74f0653ce1f18c22022d333f"
+ }
+ Frame {
+ msec: 1824
+ hash: "34b6180b74f0653ce1f18c22022d333f"
+ }
+ Frame {
+ msec: 1840
+ hash: "34b6180b74f0653ce1f18c22022d333f"
+ }
+ Frame {
+ msec: 1856
+ hash: "34b6180b74f0653ce1f18c22022d333f"
+ }
+ Frame {
+ msec: 1872
+ hash: "34b6180b74f0653ce1f18c22022d333f"
+ }
+ Frame {
+ msec: 1888
+ hash: "34b6180b74f0653ce1f18c22022d333f"
+ }
+ Frame {
+ msec: 1904
+ hash: "34b6180b74f0653ce1f18c22022d333f"
+ }
+ Frame {
+ msec: 1920
+ image: "clock.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "34b6180b74f0653ce1f18c22022d333f"
+ }
+ Frame {
+ msec: 1952
+ hash: "34b6180b74f0653ce1f18c22022d333f"
+ }
+ Frame {
+ msec: 1968
+ hash: "34b6180b74f0653ce1f18c22022d333f"
+ }
+ Frame {
+ msec: 1984
+ hash: "34b6180b74f0653ce1f18c22022d333f"
+ }
+ Frame {
+ msec: 2000
+ hash: "34b6180b74f0653ce1f18c22022d333f"
+ }
+ Frame {
+ msec: 2016
+ hash: "34b6180b74f0653ce1f18c22022d333f"
+ }
+ Frame {
+ msec: 2032
+ hash: "150f511972394d8485979a6d9badcee5"
+ }
+ Frame {
+ msec: 2048
+ hash: "50b420f72479ec613fd443b5faa3cb94"
+ }
+ Frame {
+ msec: 2064
+ hash: "a51cbeea7ad5407b2784a3a3c8ca1ecf"
+ }
+ Frame {
+ msec: 2080
+ hash: "0f658f4c91f890cd252d0f9d9bbe064d"
+ }
+ Frame {
+ msec: 2096
+ hash: "c814c99815a91547eff01dc899c275f2"
+ }
+ Frame {
+ msec: 2112
+ hash: "f9dac59029008e52efe4225cf919f013"
+ }
+ Frame {
+ msec: 2128
+ hash: "b87bdcf09b425f2b2d6aed65f96ae8a3"
+ }
+ Frame {
+ msec: 2144
+ hash: "f353bf64e664166a542aa027dc625529"
+ }
+ Frame {
+ msec: 2160
+ hash: "12492b26c2f1c018e034c0fa936fa7b5"
+ }
+ Frame {
+ msec: 2176
+ hash: "33f04d25bced580f15590f12ddafef62"
+ }
+ Frame {
+ msec: 2192
+ hash: "cdd8ee656e4fec3ac6e72b6f7626de3b"
+ }
+ Frame {
+ msec: 2208
+ hash: "22a94ea46fb9ee78830eab79e4adc5c5"
+ }
+ Frame {
+ msec: 2224
+ hash: "64a10c9d4738c004c7f08f95b48a7a4d"
+ }
+ Frame {
+ msec: 2240
+ hash: "ff3300fb49a735e0a958362aead1905f"
+ }
+ Frame {
+ msec: 2256
+ hash: "8289dfdad12a8c13513175e5aad6a2d9"
+ }
+ Frame {
+ msec: 2272
+ hash: "49e5cbb94f7d8bc853ca3c9366d737c9"
+ }
+ Frame {
+ msec: 2288
+ hash: "76d2d8df4ad0359bb8ae102b225b3a68"
+ }
+ Frame {
+ msec: 2304
+ hash: "98d925b3306aa7dd1b1fb9e066cd8a02"
+ }
+ Frame {
+ msec: 2320
+ hash: "3911b53eb0346af1773ad991232e61ee"
+ }
+ Frame {
+ msec: 2336
+ hash: "8991c10234f9f286ebab39d72729525d"
+ }
+ Frame {
+ msec: 2352
+ hash: "ca2c8c6f23b30957a5cc20d9750a3ffe"
+ }
+ Frame {
+ msec: 2368
+ hash: "80abe9b146b31dbedf1fe2357d922dda"
+ }
+ Frame {
+ msec: 2384
+ hash: "0e34091d6bceab00bdabcec78e99e265"
+ }
+ Frame {
+ msec: 2400
+ hash: "ba04053c25e53b3dc790feac9a33e221"
+ }
+ Frame {
+ msec: 2416
+ hash: "cb6f7f2cce4f68ef1d35f765e00bbf7b"
+ }
+ Frame {
+ msec: 2432
+ hash: "1e63fb94f5fbf3b600ec9298cbb97c8a"
+ }
+ Frame {
+ msec: 2448
+ hash: "8991c10234f9f286ebab39d72729525d"
+ }
+ Frame {
+ msec: 2464
+ hash: "00531d4a5fe98bbb487ad835414e7d07"
+ }
+ Frame {
+ msec: 2480
+ hash: "7af9f861cb57c937c87b24eee9fbb558"
+ }
+ Frame {
+ msec: 2496
+ hash: "7ecd1a4a75753e70ad5937e5bc897e03"
+ }
+ Frame {
+ msec: 2512
+ hash: "557766fe964033f6a488574af7306cac"
+ }
+ Frame {
+ msec: 2528
+ hash: "bd0f7164dd0a84ce1a1b2a6acbc2157b"
+ }
+ Frame {
+ msec: 2544
+ hash: "d24ef664cf13519b99d6193bf98fcfd1"
+ }
+ Frame {
+ msec: 2560
+ hash: "6c3626248bbb41cab85ec2a908b7874b"
+ }
+ Frame {
+ msec: 2576
+ hash: "0f9bea8d474690164a09dfd3b13ff80b"
+ }
+ Frame {
+ msec: 2592
+ hash: "e5197674c91de893a970614e650547e5"
+ }
+ Frame {
+ msec: 2608
+ hash: "ce6861e9a7e75b809df026f078c8516b"
+ }
+ Frame {
+ msec: 2624
+ hash: "eb0539e30fd53fb905d7b28ff0bc6cfd"
+ }
+ Frame {
+ msec: 2640
+ hash: "45f70dda0d647119175457fb4d451e85"
+ }
+ Frame {
+ msec: 2656
+ hash: "ca6b75fa4ee612bf6bb1776ef4115b16"
+ }
+ Frame {
+ msec: 2672
+ hash: "c7d6bd687be6d5476300539411b97fc5"
+ }
+ Frame {
+ msec: 2688
+ hash: "27da9137b936d813d3c79a873053ed38"
+ }
+ Frame {
+ msec: 2704
+ hash: "4389a5758bf9df9553300c074aa7bb36"
+ }
+ Frame {
+ msec: 2720
+ hash: "30476b70a29716b359a046f99b6387e5"
+ }
+ Frame {
+ msec: 2736
+ hash: "b91c6f1e57d718e95ab05d1f386aedb9"
+ }
+ Frame {
+ msec: 2752
+ hash: "578b022173dcac39d227ffeb043e53d0"
+ }
+ Frame {
+ msec: 2768
+ hash: "fe8ffe202a5f58b184a65d0ebc9c5f32"
+ }
+ Frame {
+ msec: 2784
+ hash: "fe8ffe202a5f58b184a65d0ebc9c5f32"
+ }
+ Frame {
+ msec: 2800
+ hash: "fe8ffe202a5f58b184a65d0ebc9c5f32"
+ }
+ Frame {
+ msec: 2816
+ hash: "fe8ffe202a5f58b184a65d0ebc9c5f32"
+ }
+ Frame {
+ msec: 2832
+ hash: "fe8ffe202a5f58b184a65d0ebc9c5f32"
+ }
+ Frame {
+ msec: 2848
+ hash: "fe8ffe202a5f58b184a65d0ebc9c5f32"
+ }
+ Frame {
+ msec: 2864
+ hash: "fe8ffe202a5f58b184a65d0ebc9c5f32"
+ }
+ Frame {
+ msec: 2880
+ image: "clock.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "fe8ffe202a5f58b184a65d0ebc9c5f32"
+ }
+ Frame {
+ msec: 2912
+ hash: "fe8ffe202a5f58b184a65d0ebc9c5f32"
+ }
+ Frame {
+ msec: 2928
+ hash: "fe8ffe202a5f58b184a65d0ebc9c5f32"
+ }
+ Frame {
+ msec: 2944
+ hash: "fe8ffe202a5f58b184a65d0ebc9c5f32"
+ }
+ Frame {
+ msec: 2960
+ hash: "fe8ffe202a5f58b184a65d0ebc9c5f32"
+ }
+ Frame {
+ msec: 2976
+ hash: "fe8ffe202a5f58b184a65d0ebc9c5f32"
+ }
+ Frame {
+ msec: 2992
+ hash: "fe8ffe202a5f58b184a65d0ebc9c5f32"
+ }
+ Frame {
+ msec: 3008
+ hash: "fe8ffe202a5f58b184a65d0ebc9c5f32"
+ }
+ Frame {
+ msec: 3024
+ hash: "fe8ffe202a5f58b184a65d0ebc9c5f32"
+ }
+ Frame {
+ msec: 3040
+ hash: "294d542f880356b4cbb171170c28dcd7"
+ }
+ Frame {
+ msec: 3056
+ hash: "946b5937974e28ffd996ce132c8fad15"
+ }
+ Frame {
+ msec: 3072
+ hash: "bb61994ff1dc36d3933084b874073832"
+ }
+ Frame {
+ msec: 3088
+ hash: "ec337c7ae77deeb41f38adb1851720e5"
+ }
+ Frame {
+ msec: 3104
+ hash: "7691c6c048b78e1551b46a37b6e95b16"
+ }
+ Frame {
+ msec: 3120
+ hash: "b3116620d319ae4b681f4ca76c068b32"
+ }
+ Frame {
+ msec: 3136
+ hash: "ed5a27e5be3dbde3867715f877da41db"
+ }
+ Frame {
+ msec: 3152
+ hash: "8dcc220cc652f57aa8ac33364edc96a3"
+ }
+ Frame {
+ msec: 3168
+ hash: "a7832d86283e27ee1523c4808b42fc43"
+ }
+ Frame {
+ msec: 3184
+ hash: "fc90d18b072638f2df1bacee12fe1743"
+ }
+ Frame {
+ msec: 3200
+ hash: "cdd7b5598155eba57783ebe1872db818"
+ }
+ Frame {
+ msec: 3216
+ hash: "b45e32d12bbc2e56f4a3e7e473528d3e"
+ }
+ Frame {
+ msec: 3232
+ hash: "5762a693ea6287e8987c604ef9fac361"
+ }
+ Frame {
+ msec: 3248
+ hash: "2e46a8df5ec0c7070a374186a313f2c6"
+ }
+ Frame {
+ msec: 3264
+ hash: "e612134417f3f901661b658801a72848"
+ }
+ Frame {
+ msec: 3280
+ hash: "5de468fac915894ef34f3fee1c637e01"
+ }
+ Frame {
+ msec: 3296
+ hash: "e29c8713573e49fc98387311d80c7510"
+ }
+ Frame {
+ msec: 3312
+ hash: "6fce67b704f613e6fd9181ccb9ee237f"
+ }
+ Frame {
+ msec: 3328
+ hash: "bf499add3d91d751ffa1cce28bece380"
+ }
+ Frame {
+ msec: 3344
+ hash: "7d50cad7b18a4a37be6aac7796014195"
+ }
+ Frame {
+ msec: 3360
+ hash: "6695208c8d39373ff0846c821c819cb2"
+ }
+ Frame {
+ msec: 3376
+ hash: "0140ec2286b0fb94340d2dd6d418f539"
+ }
+ Frame {
+ msec: 3392
+ hash: "9f92a99737aa6a7da48af7e7a4ed7a6a"
+ }
+ Frame {
+ msec: 3408
+ hash: "8e593e8192d17d07c2265d6fa840f281"
+ }
+ Frame {
+ msec: 3424
+ hash: "ea70e72eb12d5595d9bf0d9cc77efd4d"
+ }
+ Frame {
+ msec: 3440
+ hash: "faeeb9e6e6a260a266ac8965f204b542"
+ }
+ Frame {
+ msec: 3456
+ hash: "d50987082d056997a8e7fe5940cb7968"
+ }
+ Frame {
+ msec: 3472
+ hash: "44089138e01bfee916306ae66ba43e9f"
+ }
+ Frame {
+ msec: 3488
+ hash: "60256356ca6fe8bd323ef36bc149a3ea"
+ }
+ Frame {
+ msec: 3504
+ hash: "6caae71d6bd897d755aeb22f10862171"
+ }
+ Frame {
+ msec: 3520
+ hash: "8ba18bf5df010718f83d6bb25aa1858b"
+ }
+ Frame {
+ msec: 3536
+ hash: "a903996370fb7efcaf295f00b9b4c4b6"
+ }
+ Frame {
+ msec: 3552
+ hash: "cc0b736c8b4d46d3d809dcfe82068c88"
+ }
+ Frame {
+ msec: 3568
+ hash: "037b2f65d162d44c39706d322cd6b6e5"
+ }
+ Frame {
+ msec: 3584
+ hash: "92c2b4f346329ffbcae07db74332ebbe"
+ }
+ Frame {
+ msec: 3600
+ hash: "3f9b2b5aade31333568a7cccf89e3176"
+ }
+ Frame {
+ msec: 3616
+ hash: "b40f9cce4cddf9fa5245276a105a3e0d"
+ }
+ Frame {
+ msec: 3632
+ hash: "74eb3e8a282693bd6bc92f381e380d61"
+ }
+ Frame {
+ msec: 3648
+ hash: "43d85dd9e0de49c639db0d91047c88bb"
+ }
+ Frame {
+ msec: 3664
+ hash: "563a07f4aa618252933e0356cc300bba"
+ }
+ Frame {
+ msec: 3680
+ hash: "73d1e5745154996fd245a91a831d5462"
+ }
+ Frame {
+ msec: 3696
+ hash: "7b2785b605c64135ea6914ad8388eb8f"
+ }
+ Frame {
+ msec: 3712
+ hash: "b2d989af972715a86ca374753d32f757"
+ }
+ Frame {
+ msec: 3728
+ hash: "96311aac52bc9167a7350af29741f3dc"
+ }
+ Frame {
+ msec: 3744
+ hash: "56e4b98816896f7353dddeac090f70d1"
+ }
+ Frame {
+ msec: 3760
+ hash: "7bd8ac36107e9e5db39e1aa37f2c5ca8"
+ }
+ Frame {
+ msec: 3776
+ hash: "b9545df89c8bec940678b65d5ef9ce04"
+ }
+ Frame {
+ msec: 3792
+ hash: "b9545df89c8bec940678b65d5ef9ce04"
+ }
+ Frame {
+ msec: 3808
+ hash: "b9545df89c8bec940678b65d5ef9ce04"
+ }
+ Frame {
+ msec: 3824
+ hash: "b9545df89c8bec940678b65d5ef9ce04"
+ }
+ Frame {
+ msec: 3840
+ image: "clock.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "b9545df89c8bec940678b65d5ef9ce04"
+ }
+ Frame {
+ msec: 3872
+ hash: "b9545df89c8bec940678b65d5ef9ce04"
+ }
+ Frame {
+ msec: 3888
+ hash: "b9545df89c8bec940678b65d5ef9ce04"
+ }
+ Frame {
+ msec: 3904
+ hash: "b9545df89c8bec940678b65d5ef9ce04"
+ }
+ Frame {
+ msec: 3920
+ hash: "b9545df89c8bec940678b65d5ef9ce04"
+ }
+ Frame {
+ msec: 3936
+ hash: "b9545df89c8bec940678b65d5ef9ce04"
+ }
+ Frame {
+ msec: 3952
+ hash: "b9545df89c8bec940678b65d5ef9ce04"
+ }
+ Frame {
+ msec: 3968
+ hash: "b9545df89c8bec940678b65d5ef9ce04"
+ }
+ Frame {
+ msec: 3984
+ hash: "b9545df89c8bec940678b65d5ef9ce04"
+ }
+ Frame {
+ msec: 4000
+ hash: "b9545df89c8bec940678b65d5ef9ce04"
+ }
+ Frame {
+ msec: 4016
+ hash: "b9545df89c8bec940678b65d5ef9ce04"
+ }
+ Frame {
+ msec: 4032
+ hash: "df3a1204f6243673d567724d27d07a9e"
+ }
+ Frame {
+ msec: 4048
+ hash: "7d0d3e92cb61d868d062bdf173924a4d"
+ }
+ Frame {
+ msec: 4064
+ hash: "29948b5d7807a6ed0076a9637ec3eb79"
+ }
+ Frame {
+ msec: 4080
+ hash: "2986b5e0a4a49bbe9f4ffada30433a48"
+ }
+ Frame {
+ msec: 4096
+ hash: "0d9e3813141a1ee15474380902d87815"
+ }
+ Frame {
+ msec: 4112
+ hash: "c5197a932430d498b7344c1f37454320"
+ }
+ Frame {
+ msec: 4128
+ hash: "c8ef8acf314486c157e74bdd2695ddb2"
+ }
+ Frame {
+ msec: 4144
+ hash: "adeb73de4b967912a9f2b04ba2b6fe4c"
+ }
+ Frame {
+ msec: 4160
+ hash: "da5fddd1e4ab8c096af0acc62114d69f"
+ }
+ Frame {
+ msec: 4176
+ hash: "5ef0784315603da196e66b4628524c5c"
+ }
+ Frame {
+ msec: 4192
+ hash: "1ff2a89c510953d71198056f5ac5b1a6"
+ }
+ Frame {
+ msec: 4208
+ hash: "f63d409e134e59b875099ab11b469d21"
+ }
+ Frame {
+ msec: 4224
+ hash: "e353748e0b0c49a217d6e2d06a9bfeb6"
+ }
+ Frame {
+ msec: 4240
+ hash: "a9d7470902a232d815bd2580e24fdc22"
+ }
+ Frame {
+ msec: 4256
+ hash: "eecbad718aa4eaf5bef7cd921b2ce9f9"
+ }
+ Frame {
+ msec: 4272
+ hash: "7a51cadbfb93eb4a66acc9cb150002ed"
+ }
+ Frame {
+ msec: 4288
+ hash: "2aa511fb96a51a50e3a45b784e349c15"
+ }
+ Frame {
+ msec: 4304
+ hash: "a1ad19593dc6b9f4c027f388e802dcbe"
+ }
+ Frame {
+ msec: 4320
+ hash: "ef6787f03bc1e33ea5f2a54aa1ba3a41"
+ }
+ Frame {
+ msec: 4336
+ hash: "3386337bbc1ab82374d9965b7b0ffdef"
+ }
+ Frame {
+ msec: 4352
+ hash: "c76afb4f412b4d5dd8eca74db6c54fb8"
+ }
+ Frame {
+ msec: 4368
+ hash: "f91ac74ec153152670d43f42b1e2a2db"
+ }
+ Frame {
+ msec: 4384
+ hash: "58f22723fa0c67379972238e0e7ed5e2"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4400
+ hash: "a4730b0a8d6e0dd9e7eb58b51fb631ec"
+ }
+ Frame {
+ msec: 4416
+ hash: "193bf624efefcad70af29f41eeab128e"
+ }
+ Frame {
+ msec: 4432
+ hash: "d692f262facf26c2be2b0f747903d476"
+ }
+ Frame {
+ msec: 4448
+ hash: "e59e43b5d4abebea0a55b1d072d148bc"
+ }
+ Frame {
+ msec: 4464
+ hash: "134ff829e91161146b5f048a50c7eef7"
+ }
+ Frame {
+ msec: 4480
+ hash: "07a80e45e70cb13f45e3858404c5f8dd"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.0.png b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.0.png
new file mode 100644
index 0000000000..3f42e75259
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.1.png b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.1.png
new file mode 100644
index 0000000000..d661df6745
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.10.png b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.10.png
new file mode 100644
index 0000000000..e8c96e174c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.10.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.2.png b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.2.png
new file mode 100644
index 0000000000..35bfa4382c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.3.png b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.3.png
new file mode 100644
index 0000000000..74141cf876
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.4.png b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.4.png
new file mode 100644
index 0000000000..9544054841
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.5.png b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.5.png
new file mode 100644
index 0000000000..4b02c797cf
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.6.png b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.6.png
new file mode 100644
index 0000000000..8ea83459d1
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.7.png b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.7.png
new file mode 100644
index 0000000000..76a73e8ae5
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.8.png b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.8.png
new file mode 100644
index 0000000000..88249403ee
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.8.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.9.png b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.9.png
new file mode 100644
index 0000000000..f954cc58ee
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.9.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.qml b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.qml
new file mode 100644
index 0000000000..fec5428c2e
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/data/follow.qml
@@ -0,0 +1,1763 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "3561ebf22b19c7bd5a70947d36b50b63"
+ }
+ Frame {
+ msec: 32
+ hash: "3561ebf22b19c7bd5a70947d36b50b63"
+ }
+ Frame {
+ msec: 48
+ hash: "bd0006fc34f58ec1ea6aa4c4acbb0070"
+ }
+ Frame {
+ msec: 64
+ hash: "c25f9fb6aea93413bfef5eb176c02476"
+ }
+ Frame {
+ msec: 80
+ hash: "4ce0eb12fb41960e60e208dffb09ed3a"
+ }
+ Frame {
+ msec: 96
+ hash: "75b3375881969710b6eb21f2a93c36cc"
+ }
+ Frame {
+ msec: 112
+ hash: "91e9b13e332959e41a29c0b225675a05"
+ }
+ Frame {
+ msec: 128
+ hash: "8e04a31a953b42903dffe86b37b3f59f"
+ }
+ Frame {
+ msec: 144
+ hash: "837e0e646a2853d3fde571f9dd966fc7"
+ }
+ Frame {
+ msec: 160
+ hash: "7367e25ae1e3a3731d83da76d5795f8c"
+ }
+ Frame {
+ msec: 176
+ hash: "3621846fb85b286a886a02de442e76c4"
+ }
+ Frame {
+ msec: 192
+ hash: "ed20a4c3476b8bb5545d5343747c39c8"
+ }
+ Frame {
+ msec: 208
+ hash: "1fc73efb410e9beb3f791cbff8e814b3"
+ }
+ Frame {
+ msec: 224
+ hash: "199c99a4e3aa14fbc8c8a0d8baacf998"
+ }
+ Frame {
+ msec: 240
+ hash: "513ce5a2f57e40002a26b7722c8a10db"
+ }
+ Frame {
+ msec: 256
+ hash: "b80b51cd4e75bdc799bbe79e66b7d02b"
+ }
+ Frame {
+ msec: 272
+ hash: "e1531b6c5b3ac872563fdfaf49d32a27"
+ }
+ Frame {
+ msec: 288
+ hash: "6d7cfd78ebd56ae6adfc97aad5d11b13"
+ }
+ Frame {
+ msec: 304
+ hash: "4252ebb2fba165e39f025f631e0a676a"
+ }
+ Frame {
+ msec: 320
+ hash: "04d6ae51415b083bbb0eabd1b0304ca4"
+ }
+ Frame {
+ msec: 336
+ hash: "750df1f1626c8b84dd72a35bf081fe00"
+ }
+ Frame {
+ msec: 352
+ hash: "003d7a846e09ba23ee8a7ae6d473be9f"
+ }
+ Frame {
+ msec: 368
+ hash: "5cf3abdbb9a5b8cba6a8afe8abb60ced"
+ }
+ Frame {
+ msec: 384
+ hash: "0669f86043a0c84d0b4672cc5c1136b4"
+ }
+ Frame {
+ msec: 400
+ hash: "94f59435fe4f3ca06699c996b537ae8c"
+ }
+ Frame {
+ msec: 416
+ hash: "211c8ec42a6d6949253af71c6eeffa53"
+ }
+ Frame {
+ msec: 432
+ hash: "6de6c6d1b4a37a864b96c0293be8ebf5"
+ }
+ Frame {
+ msec: 448
+ hash: "468d67d069eaac1968a6ad52e56f3ab5"
+ }
+ Frame {
+ msec: 464
+ hash: "18d8de7a5c73d8c8188e6ae00a701820"
+ }
+ Frame {
+ msec: 480
+ hash: "4387c724ed49bfbbca238bf57a704a14"
+ }
+ Frame {
+ msec: 496
+ hash: "f317c59f65c7266765333048d8545748"
+ }
+ Frame {
+ msec: 512
+ hash: "6575d40c2f27f110443a2ede8a873c77"
+ }
+ Frame {
+ msec: 528
+ hash: "3e65cb675124dbd9db5116fa7584e223"
+ }
+ Frame {
+ msec: 544
+ hash: "df80612a74b33eca81db6f43aa33e411"
+ }
+ Frame {
+ msec: 560
+ hash: "6b2bc20397f3fb452ea14d81e9efd61d"
+ }
+ Frame {
+ msec: 576
+ hash: "e5b8a2476487f6cd9fd37e3b3f54f88d"
+ }
+ Frame {
+ msec: 592
+ hash: "e93f8156e2dc278a5e20d9e28b48d9fa"
+ }
+ Frame {
+ msec: 608
+ hash: "e524d5117888b0b68781ffaf1a3e7303"
+ }
+ Frame {
+ msec: 624
+ hash: "f3b777409534d87c59e60499fd6a3808"
+ }
+ Frame {
+ msec: 640
+ hash: "09d1fa8f1306eb6f51db97d04c2d7ad3"
+ }
+ Frame {
+ msec: 656
+ hash: "acebdcebe6880c8b3b94ad7606181b72"
+ }
+ Frame {
+ msec: 672
+ hash: "347945a94002cd44d7a2df47f82940a1"
+ }
+ Frame {
+ msec: 688
+ hash: "c716014d63ff2a22cab04dadc18b10c1"
+ }
+ Frame {
+ msec: 704
+ hash: "ced019e3f8b5ca079582d01f1f585a8e"
+ }
+ Frame {
+ msec: 720
+ hash: "d61d31de835ea8d1ffa56fd04c873ac1"
+ }
+ Frame {
+ msec: 736
+ hash: "2eec542c5af4c6eecc153cc0fcae7dd3"
+ }
+ Frame {
+ msec: 752
+ hash: "c13b9443e1c000a2877e4586428da308"
+ }
+ Frame {
+ msec: 768
+ hash: "c5c2e30b3dc3298afc201f6045e79e59"
+ }
+ Frame {
+ msec: 784
+ hash: "308f2ca66133d37c2fcb222e68698d25"
+ }
+ Frame {
+ msec: 800
+ hash: "bf820215986a35b56daf07c164fd2a79"
+ }
+ Frame {
+ msec: 816
+ hash: "a0bb21475100fb25b767d055d70b062f"
+ }
+ Frame {
+ msec: 832
+ hash: "bfb0927bcb23689820b0f96ea56426fc"
+ }
+ Frame {
+ msec: 848
+ hash: "8f294742ca9dd6ab10689f1f4ec2ed96"
+ }
+ Frame {
+ msec: 864
+ hash: "f60c232307570fb4ec6e74f18e243553"
+ }
+ Frame {
+ msec: 880
+ hash: "7411970ab72d8b2dbf48ee8d4e6503b3"
+ }
+ Frame {
+ msec: 896
+ hash: "d4d766038daeae2fbec290204ca3983b"
+ }
+ Frame {
+ msec: 912
+ hash: "f85525c3fd784ee7f9a3d9465e37d6f3"
+ }
+ Frame {
+ msec: 928
+ hash: "c5e63da86ddbd2a54c7cd3d03e5428a2"
+ }
+ Frame {
+ msec: 944
+ hash: "369a7405b1717ddf06c99ab1dd6d4cb0"
+ }
+ Frame {
+ msec: 960
+ image: "follow.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "18d5c4378f9daf63bf4cb76d76374548"
+ }
+ Frame {
+ msec: 992
+ hash: "f36e649db2e1ec9fbe15e7711ea13ab5"
+ }
+ Frame {
+ msec: 1008
+ hash: "f68515607dca1bda14b6afa6e05ebb6b"
+ }
+ Frame {
+ msec: 1024
+ hash: "bc5cc4c9050a5bd4c64debd12643fd73"
+ }
+ Frame {
+ msec: 1040
+ hash: "f053a18bca4d8c47a0f181fad8118e9a"
+ }
+ Frame {
+ msec: 1056
+ hash: "9a2218f51faed4fa891c507fe6828d2c"
+ }
+ Frame {
+ msec: 1072
+ hash: "ce671ff4dd1f343243f2fcc263d137f4"
+ }
+ Frame {
+ msec: 1088
+ hash: "8624f8d814094ad25a1482a11f424990"
+ }
+ Frame {
+ msec: 1104
+ hash: "324dad940b3adb54491d6cdd4e7d8aa7"
+ }
+ Frame {
+ msec: 1120
+ hash: "0cd7c53ec5b591053de6769967b8bad5"
+ }
+ Frame {
+ msec: 1136
+ hash: "e9e8f5e9c2dc179498943d0b5912af09"
+ }
+ Frame {
+ msec: 1152
+ hash: "5f1552ccd61f09335a88658ee1c4e97e"
+ }
+ Frame {
+ msec: 1168
+ hash: "866e01eed7e26dd1bd9af8aaddf4d7c0"
+ }
+ Frame {
+ msec: 1184
+ hash: "2efba3c33c4c7b6d89ce7efca2dc516a"
+ }
+ Frame {
+ msec: 1200
+ hash: "2de9d8a2ad64d2491b3444712be032dc"
+ }
+ Frame {
+ msec: 1216
+ hash: "84206972322eae033d05f71b178180c9"
+ }
+ Frame {
+ msec: 1232
+ hash: "8571d11da1a893edcbe5add1a9399d7a"
+ }
+ Frame {
+ msec: 1248
+ hash: "c0d65ecefa77ee7cb1c08a560e3ad572"
+ }
+ Frame {
+ msec: 1264
+ hash: "0f8a8523969713771a6c7984069b15e4"
+ }
+ Frame {
+ msec: 1280
+ hash: "2e80e4b54538b7b586f4a3be55eb6da3"
+ }
+ Frame {
+ msec: 1296
+ hash: "ae028381f311a60946ecd26eab95bb42"
+ }
+ Frame {
+ msec: 1312
+ hash: "ac5902d58bc116a002c093f55cf20278"
+ }
+ Frame {
+ msec: 1328
+ hash: "242f8617718048cfab9950b812eb1b26"
+ }
+ Frame {
+ msec: 1344
+ hash: "b642f2f0d3161f80a702b09a910c589b"
+ }
+ Frame {
+ msec: 1360
+ hash: "d1508034ecd908120c6f58cf08360c3c"
+ }
+ Frame {
+ msec: 1376
+ hash: "ad10a5ea8598616f2ffa633eecfbd43a"
+ }
+ Frame {
+ msec: 1392
+ hash: "1d2c3cfaac1cca868f31872bf4248de8"
+ }
+ Frame {
+ msec: 1408
+ hash: "28da57a6aec84318ff6aa029ac17f1dd"
+ }
+ Frame {
+ msec: 1424
+ hash: "6f9bf89843d5e40f6c282e69337e7d25"
+ }
+ Frame {
+ msec: 1440
+ hash: "1c5733ad9620805127372fb76f5b0228"
+ }
+ Frame {
+ msec: 1456
+ hash: "16f21041e9e475a37c478cf38cdc353b"
+ }
+ Frame {
+ msec: 1472
+ hash: "b39ea2e8a1991b3ea5be818a284ff69f"
+ }
+ Frame {
+ msec: 1488
+ hash: "4f5bdc935080707525a2b74936b41b2e"
+ }
+ Frame {
+ msec: 1504
+ hash: "a39426dc761df1d2ba398aa17d220ded"
+ }
+ Frame {
+ msec: 1520
+ hash: "2e965042273b377958b04190250d273e"
+ }
+ Frame {
+ msec: 1536
+ hash: "51f021c1d50291b425c98dee4894b330"
+ }
+ Frame {
+ msec: 1552
+ hash: "88fea2e6d6898084acb5897833adb182"
+ }
+ Frame {
+ msec: 1568
+ hash: "12f55e64c8ec9825bf6c5cfd5d50d2bb"
+ }
+ Frame {
+ msec: 1584
+ hash: "365b358eb7a678e1076774c36a82f452"
+ }
+ Frame {
+ msec: 1600
+ hash: "a992b326739bff87bf042c711a7fa65c"
+ }
+ Frame {
+ msec: 1616
+ hash: "083aa3c766a3b50492e51aab3ee128d0"
+ }
+ Frame {
+ msec: 1632
+ hash: "16a2db3b3a773e2612bc57f7a7d7fbbe"
+ }
+ Frame {
+ msec: 1648
+ hash: "32a28101a53d308b107d26a30ae7cdd9"
+ }
+ Frame {
+ msec: 1664
+ hash: "da3908e584542ff2f73cb22369f49c1c"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 195; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1680
+ hash: "8ad535bb0c5decd8c970aa36286d57e7"
+ }
+ Frame {
+ msec: 1696
+ hash: "5bfbcab7607622486c350a9117ab0884"
+ }
+ Frame {
+ msec: 1712
+ hash: "17e13c8bfd81081f6400d3e71daecb4c"
+ }
+ Frame {
+ msec: 1728
+ hash: "9411a66b6c3ef9a98bc62dea282d6a51"
+ }
+ Frame {
+ msec: 1744
+ hash: "423cded80165ee13f903460e5396526b"
+ }
+ Frame {
+ msec: 1760
+ hash: "709cc55316e6702c1359b66c06676603"
+ }
+ Frame {
+ msec: 1776
+ hash: "27232931c000a2edb5c3d480a6692e6b"
+ }
+ Frame {
+ msec: 1792
+ hash: "22311fd0903b53f50df824ba345ca350"
+ }
+ Frame {
+ msec: 1808
+ hash: "9bb066e60e7e5b3eaa0a221b8ba1a431"
+ }
+ Frame {
+ msec: 1824
+ hash: "517000255d372d384773dff8c80f5a65"
+ }
+ Frame {
+ msec: 1840
+ hash: "329dbd77ae53ea8e4beb669a976033a8"
+ }
+ Frame {
+ msec: 1856
+ hash: "2acd5d3e878e1db5413270c1a50ffc83"
+ }
+ Frame {
+ msec: 1872
+ hash: "8eb5946ac5d53dfc2813d1f1c6a2b6c5"
+ }
+ Frame {
+ msec: 1888
+ hash: "375299e5b1067e02d5de3238a37659f2"
+ }
+ Frame {
+ msec: 1904
+ hash: "f385c90e585db5555e873996165f55af"
+ }
+ Frame {
+ msec: 1920
+ image: "follow.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "6c13bb69b6483c72463437e102a9dabb"
+ }
+ Frame {
+ msec: 1952
+ hash: "c1b5d10688681c3b2363bb6d4173deca"
+ }
+ Frame {
+ msec: 1968
+ hash: "b434649e4c9b2c184d2f9036f9d041bf"
+ }
+ Frame {
+ msec: 1984
+ hash: "ca32e9f9080983803bb37b7231ed1c84"
+ }
+ Frame {
+ msec: 2000
+ hash: "976eab47b2d6445fdd8293f2c73564c1"
+ }
+ Frame {
+ msec: 2016
+ hash: "e63daea8f3bc79cea7a6b8dcfd31a094"
+ }
+ Frame {
+ msec: 2032
+ hash: "626cbe5e6b79f2fd0ef57c943666b571"
+ }
+ Frame {
+ msec: 2048
+ hash: "4e07255ce12a21966eec33c0cc623d96"
+ }
+ Frame {
+ msec: 2064
+ hash: "94045005de77725c63c62575a6b06852"
+ }
+ Frame {
+ msec: 2080
+ hash: "3b6dcf783c5e9fe99ce3d9ca02bceff6"
+ }
+ Frame {
+ msec: 2096
+ hash: "e901ed7e831e2d012b97b98b3ab6fa1b"
+ }
+ Frame {
+ msec: 2112
+ hash: "74ef03f72d032daaff13114fde02b824"
+ }
+ Frame {
+ msec: 2128
+ hash: "9eb334d7dda3801c1fe292844040e014"
+ }
+ Frame {
+ msec: 2144
+ hash: "82bf8fb5e3a9bf167f3f00b1f6ab3c06"
+ }
+ Frame {
+ msec: 2160
+ hash: "df3a2bc7758d00d595347e62c7e53c4a"
+ }
+ Frame {
+ msec: 2176
+ hash: "e77ac04a6ad9f97226b45d202a0d5196"
+ }
+ Frame {
+ msec: 2192
+ hash: "37411333a28ea840c59cabd96fd1deba"
+ }
+ Frame {
+ msec: 2208
+ hash: "8d1eb90ffd080bcd078b69c9635108d1"
+ }
+ Frame {
+ msec: 2224
+ hash: "68ee5d58b2edeb6b5a64a714115e4499"
+ }
+ Frame {
+ msec: 2240
+ hash: "003ddf0a5dd3d4bb947a34bdd22ad8c1"
+ }
+ Frame {
+ msec: 2256
+ hash: "bf3c89d0a09ed2159a78f10124f5d7bb"
+ }
+ Frame {
+ msec: 2272
+ hash: "6ec994f41d4540db988846416c2f7b4f"
+ }
+ Frame {
+ msec: 2288
+ hash: "9ca7e3ca6ea26e8259d34a8c0f80f7a9"
+ }
+ Frame {
+ msec: 2304
+ hash: "edf5cea581d46400914610213c8503ea"
+ }
+ Frame {
+ msec: 2320
+ hash: "9b96aac3f98cd37a361788be8b81e308"
+ }
+ Frame {
+ msec: 2336
+ hash: "5d304a8398512ebc85bebf973ed6a4f4"
+ }
+ Frame {
+ msec: 2352
+ hash: "cf2a27a395f23f7976a48d69f5e8e120"
+ }
+ Frame {
+ msec: 2368
+ hash: "458323a37208ea14972d8f84cebc66a5"
+ }
+ Frame {
+ msec: 2384
+ hash: "da9c8e4d168b9cd32d5ec3f5857d2942"
+ }
+ Frame {
+ msec: 2400
+ hash: "5d6663be8e02b0a7a4701595c9c26663"
+ }
+ Frame {
+ msec: 2416
+ hash: "4190712a39ca07f810a6d84e15488393"
+ }
+ Frame {
+ msec: 2432
+ hash: "26b22be0a1c2fecec1e25a6513b19484"
+ }
+ Frame {
+ msec: 2448
+ hash: "3e623bc2b9e8cec49671571291cf6afb"
+ }
+ Frame {
+ msec: 2464
+ hash: "3e623bc2b9e8cec49671571291cf6afb"
+ }
+ Frame {
+ msec: 2480
+ hash: "2cb2968d16323af4659b3197d391bb91"
+ }
+ Frame {
+ msec: 2496
+ hash: "5376b1285647950428b29e75f2e27c4f"
+ }
+ Frame {
+ msec: 2512
+ hash: "baaacc3940c8d36f715d90e046346bed"
+ }
+ Frame {
+ msec: 2528
+ hash: "277719afea4c119f17c34c59ef0b7984"
+ }
+ Frame {
+ msec: 2544
+ hash: "00a172ff8afd1e8444fb84249a3af0fd"
+ }
+ Frame {
+ msec: 2560
+ hash: "bf8a0f939a5602a0a9f5a3bc7c8d0d86"
+ }
+ Frame {
+ msec: 2576
+ hash: "b22860751790b3113b2cb299c9f628b8"
+ }
+ Frame {
+ msec: 2592
+ hash: "fdda1e520457974443720bd44f21d929"
+ }
+ Frame {
+ msec: 2608
+ hash: "538af31f9463cd07163d54adc2721345"
+ }
+ Frame {
+ msec: 2624
+ hash: "2ca50398746c8fb1c936fd412c7556b4"
+ }
+ Frame {
+ msec: 2640
+ hash: "63cd898c3e22a29846489e5c47f455a1"
+ }
+ Frame {
+ msec: 2656
+ hash: "1e69cc765c3f2c27c2b6e7f3e47f515a"
+ }
+ Frame {
+ msec: 2672
+ hash: "9d7ce0df7bee9a387917ef228fd50652"
+ }
+ Frame {
+ msec: 2688
+ hash: "afa0b735a9dd0734362b3f3f7d7177c3"
+ }
+ Frame {
+ msec: 2704
+ hash: "91bee07133319a0adbf9a31c430e58ad"
+ }
+ Frame {
+ msec: 2720
+ hash: "6aee88b6391e524bafc15524825ada74"
+ }
+ Frame {
+ msec: 2736
+ hash: "655ce421faa628b3389f084fe675ad53"
+ }
+ Frame {
+ msec: 2752
+ hash: "367fd34b54f12e896839b0ef4fb06925"
+ }
+ Frame {
+ msec: 2768
+ hash: "0b3ac04504bfe876c4338a4dc3721280"
+ }
+ Frame {
+ msec: 2784
+ hash: "c6cdb77888f1a3cbfe4cfec28bfad12d"
+ }
+ Frame {
+ msec: 2800
+ hash: "ef01302544f4da4575035d3e4f2443c9"
+ }
+ Frame {
+ msec: 2816
+ hash: "53f01d26a75f7e91d14b8975c81638d5"
+ }
+ Frame {
+ msec: 2832
+ hash: "10fc7b3f7e5dff21edef4123d252cba0"
+ }
+ Frame {
+ msec: 2848
+ hash: "10fc7b3f7e5dff21edef4123d252cba0"
+ }
+ Frame {
+ msec: 2864
+ hash: "10fc7b3f7e5dff21edef4123d252cba0"
+ }
+ Frame {
+ msec: 2880
+ image: "follow.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "143970d31598c017d7f24e8b09fd0f0a"
+ }
+ Frame {
+ msec: 2912
+ hash: "fc6c38bfdcd2df7a928e83d57dc0b18d"
+ }
+ Frame {
+ msec: 2928
+ hash: "647c09aae23ea5ec7979775d3022cacf"
+ }
+ Frame {
+ msec: 2944
+ hash: "f1ed5cd564be1eed3242997c14a99887"
+ }
+ Frame {
+ msec: 2960
+ hash: "aec3d7f18d6c4002229ef1d36727c4b0"
+ }
+ Frame {
+ msec: 2976
+ hash: "3552e5a3923593a2c66ecd5e2cb2ee25"
+ }
+ Frame {
+ msec: 2992
+ hash: "55a72327b726a3c75383cc5a28ba9503"
+ }
+ Frame {
+ msec: 3008
+ hash: "c25ff06944f8c92006245452e07215ef"
+ }
+ Frame {
+ msec: 3024
+ hash: "cc0187a10a7ccf087838a481f667af6e"
+ }
+ Frame {
+ msec: 3040
+ hash: "ae9d7ff04066eb998d052c2e21b58327"
+ }
+ Frame {
+ msec: 3056
+ hash: "91707fa1aaa267e6d1d56d173a063bde"
+ }
+ Frame {
+ msec: 3072
+ hash: "c076a33b8afcaf915387375f065e49df"
+ }
+ Frame {
+ msec: 3088
+ hash: "c24390ec788b5f34356e7a6507507a93"
+ }
+ Frame {
+ msec: 3104
+ hash: "e42c9800379de3076d00802c68cc99e8"
+ }
+ Frame {
+ msec: 3120
+ hash: "a2d3ba5353b1c967da93d96b61f7927f"
+ }
+ Frame {
+ msec: 3136
+ hash: "fe719953aa3468d373801bb80ae93eff"
+ }
+ Frame {
+ msec: 3152
+ hash: "e89b9bed1ebc7ebdd37d6975ecb0601c"
+ }
+ Frame {
+ msec: 3168
+ hash: "7f3d84f49a7dd4fe39a1ba0ed7f5da3e"
+ }
+ Frame {
+ msec: 3184
+ hash: "b16c9e05f72e7c8fa59f80422b987600"
+ }
+ Frame {
+ msec: 3200
+ hash: "bd0606da0f7bc6c47a361462b3b2dede"
+ }
+ Frame {
+ msec: 3216
+ hash: "88f81db6d705b745c4d2ffe470cb6966"
+ }
+ Frame {
+ msec: 3232
+ hash: "4ac6769d3f725720bba6c125b43885cd"
+ }
+ Frame {
+ msec: 3248
+ hash: "4ac6769d3f725720bba6c125b43885cd"
+ }
+ Frame {
+ msec: 3264
+ hash: "4ac6769d3f725720bba6c125b43885cd"
+ }
+ Frame {
+ msec: 3280
+ hash: "4ac6769d3f725720bba6c125b43885cd"
+ }
+ Frame {
+ msec: 3296
+ hash: "88f81db6d705b745c4d2ffe470cb6966"
+ }
+ Frame {
+ msec: 3312
+ hash: "88f81db6d705b745c4d2ffe470cb6966"
+ }
+ Frame {
+ msec: 3328
+ hash: "1f112ff43280a208e967e373db8e3f34"
+ }
+ Frame {
+ msec: 3344
+ hash: "6d966dafdfd2cf1927c14f749e24a99c"
+ }
+ Frame {
+ msec: 3360
+ hash: "8ab4ce88e52d7cd2ec9059cdb973590d"
+ }
+ Frame {
+ msec: 3376
+ hash: "62d877f18b8d3fcf6b076946f2ce05f7"
+ }
+ Frame {
+ msec: 3392
+ hash: "efe3729cdeddc4bcee105b27e4062dcd"
+ }
+ Frame {
+ msec: 3408
+ hash: "a2eb63f12d434925d0780f4992155556"
+ }
+ Frame {
+ msec: 3424
+ hash: "5eee7ec87bb399e1395a8d337ede021b"
+ }
+ Frame {
+ msec: 3440
+ hash: "59769ae407be01b016df8d7fbf484243"
+ }
+ Frame {
+ msec: 3456
+ hash: "bbadb689ec5b76f76340905252b2376a"
+ }
+ Frame {
+ msec: 3472
+ hash: "97cd4f34259ac8370e8557ef3ecf5a96"
+ }
+ Frame {
+ msec: 3488
+ hash: "17c1513fe4c0132e15355378c6a6ee11"
+ }
+ Frame {
+ msec: 3504
+ hash: "7b19041638fc7d1cf60512f579f388dd"
+ }
+ Frame {
+ msec: 3520
+ hash: "4d23bbf68cb8b32638b73ac20551ee50"
+ }
+ Frame {
+ msec: 3536
+ hash: "3f0326db5a851887a534e80cc29dc21d"
+ }
+ Frame {
+ msec: 3552
+ hash: "df5902d22a31c4deac1428d2758a0ffa"
+ }
+ Frame {
+ msec: 3568
+ hash: "21badb1464775fa935c2619b91aa6e6e"
+ }
+ Frame {
+ msec: 3584
+ hash: "e8cf87f4a65f6915addc16de29c90108"
+ }
+ Frame {
+ msec: 3600
+ hash: "d3d4487b887695b7bba8e0af7756a0f8"
+ }
+ Frame {
+ msec: 3616
+ hash: "d7f52590e4f51621ad2d62c975a5d1ef"
+ }
+ Frame {
+ msec: 3632
+ hash: "9ebdc2b3ef05748e2cc8988f968f7a37"
+ }
+ Frame {
+ msec: 3648
+ hash: "74bb7974f9315e70e976c21955390b9e"
+ }
+ Frame {
+ msec: 3664
+ hash: "59e16a89e523160f2a482c22f003f87f"
+ }
+ Frame {
+ msec: 3680
+ hash: "d8284c216df0fdd37525f26b88707572"
+ }
+ Frame {
+ msec: 3696
+ hash: "d8711b4444eea59acc544652cea3c4ce"
+ }
+ Frame {
+ msec: 3712
+ hash: "12148c3f2b5f41a4ac4801e990b20114"
+ }
+ Frame {
+ msec: 3728
+ hash: "34429cbdfe581a524b1f9072cc404539"
+ }
+ Frame {
+ msec: 3744
+ hash: "1f6a17b91d73e10bcbdd166d97546822"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 195; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3760
+ hash: "bccd4f135f27199b3a710576e0013c53"
+ }
+ Frame {
+ msec: 3776
+ hash: "6aa4db9ecb8fa4ad4d4f81434c369759"
+ }
+ Frame {
+ msec: 3792
+ hash: "a7f2951411d8f5322ce91b3da7e86d64"
+ }
+ Frame {
+ msec: 3808
+ hash: "25fe19f3398d3d1a74ad8ed4114149d7"
+ }
+ Frame {
+ msec: 3824
+ hash: "05c3dae68897a461de2923824bef9390"
+ }
+ Frame {
+ msec: 3840
+ image: "follow.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "db6265c30dd614720d1532ffc411a28f"
+ }
+ Frame {
+ msec: 3872
+ hash: "f5de8e4ba755bc0a1e4c3f36ed3e6a93"
+ }
+ Frame {
+ msec: 3888
+ hash: "ad68229e5fe9a2570074648005c5e5df"
+ }
+ Frame {
+ msec: 3904
+ hash: "02d894680766289fe659a86b02d6c9ca"
+ }
+ Frame {
+ msec: 3920
+ hash: "4f228534dd909207e8d149c74bd8fd90"
+ }
+ Frame {
+ msec: 3936
+ hash: "f0b5c64f6a50e156452caf6a352c11e1"
+ }
+ Frame {
+ msec: 3952
+ hash: "64d46ff443534dbdb3cca88b7fc3e758"
+ }
+ Frame {
+ msec: 3968
+ hash: "717ad4b8012a21c6ed38dee5ea978f36"
+ }
+ Frame {
+ msec: 3984
+ hash: "ed38c7b528bcbb3e291761104bf1e86e"
+ }
+ Frame {
+ msec: 4000
+ hash: "8cc8674d325a2c72c41654ffbe5bce1f"
+ }
+ Frame {
+ msec: 4016
+ hash: "ab66dd60cc0e58d23bef5c709fe901ad"
+ }
+ Frame {
+ msec: 4032
+ hash: "b3b824cae4ddaac4a224e84f0e282fa4"
+ }
+ Frame {
+ msec: 4048
+ hash: "ead7fe4bec7987c24c305e114797284c"
+ }
+ Frame {
+ msec: 4064
+ hash: "e5e9501f1ca61ea9f99aadfc5ca02214"
+ }
+ Frame {
+ msec: 4080
+ hash: "f74a00eb31e1604f13a6ffb29fbd91b7"
+ }
+ Frame {
+ msec: 4096
+ hash: "539aca62492408ccc1815c67b55cb399"
+ }
+ Frame {
+ msec: 4112
+ hash: "4f548ad0eb7c4ce88a777e3b7ce2d3a8"
+ }
+ Frame {
+ msec: 4128
+ hash: "b0190c5ed53ff812988dd7a2152ffa61"
+ }
+ Frame {
+ msec: 4144
+ hash: "48214bdfbdcba256043e2cec7f5e321b"
+ }
+ Frame {
+ msec: 4160
+ hash: "952614329111d1d83b0304aa919af177"
+ }
+ Frame {
+ msec: 4176
+ hash: "fd874a73062dedfe7b904ad4c9fbcbc9"
+ }
+ Frame {
+ msec: 4192
+ hash: "365b9a18cf37521718ef98589ac23933"
+ }
+ Frame {
+ msec: 4208
+ hash: "32bbbf93d78925ef12f830386f0dbe2b"
+ }
+ Frame {
+ msec: 4224
+ hash: "835d391a498b7d470b317e91453ba2f9"
+ }
+ Frame {
+ msec: 4240
+ hash: "07d0cd82a39bfea2567587745f1e330d"
+ }
+ Frame {
+ msec: 4256
+ hash: "9560a63581007038e1c463b906a4b346"
+ }
+ Frame {
+ msec: 4272
+ hash: "076d25daafe8b582aeff39e247653285"
+ }
+ Frame {
+ msec: 4288
+ hash: "f2e66dad3231250b951388396705c839"
+ }
+ Frame {
+ msec: 4304
+ hash: "f168773343e928b60aad5430b9ca739d"
+ }
+ Frame {
+ msec: 4320
+ hash: "99ed4dc4be1a0e8d98e1a54d51208da3"
+ }
+ Frame {
+ msec: 4336
+ hash: "23b3e73a966f52ce6166bc91955570a1"
+ }
+ Frame {
+ msec: 4352
+ hash: "00cdb999f3d2c6fcad708c37c3059c3d"
+ }
+ Frame {
+ msec: 4368
+ hash: "96f1bef93ba1768afcc42924145d49ff"
+ }
+ Frame {
+ msec: 4384
+ hash: "0a76f6d5ec710e4046f32f76be8e0d68"
+ }
+ Frame {
+ msec: 4400
+ hash: "98f97a6c7eac1a493e81e79956177668"
+ }
+ Frame {
+ msec: 4416
+ hash: "9424ca6ba64d0d0c0bd1ee9da1b5085a"
+ }
+ Frame {
+ msec: 4432
+ hash: "2049a22079ac590aad3c9f6496879bcb"
+ }
+ Frame {
+ msec: 4448
+ hash: "f70f9f6bd3abf3bdcb70038cda5ed311"
+ }
+ Frame {
+ msec: 4464
+ hash: "48d6d01e1d80fea8eb05572ca26b692c"
+ }
+ Frame {
+ msec: 4480
+ hash: "af152dc6de929a8231687611cc301f28"
+ }
+ Frame {
+ msec: 4496
+ hash: "2ec869cd61570b570586870f80ba3832"
+ }
+ Frame {
+ msec: 4512
+ hash: "42be0431c015dcd0f5f6dd59ba7c2d7d"
+ }
+ Frame {
+ msec: 4528
+ hash: "abc112f396c5e504a19dce255437720c"
+ }
+ Frame {
+ msec: 4544
+ hash: "a371c4f49af16bdacc5ab5abbfc99e99"
+ }
+ Frame {
+ msec: 4560
+ hash: "1ebfd139bfabbbaf522acd63e3f47462"
+ }
+ Frame {
+ msec: 4576
+ hash: "b36086718a3dd89500adbf67aa7b0f1d"
+ }
+ Frame {
+ msec: 4592
+ hash: "e3ea2ad4955cb2ab8d503b331b3594c3"
+ }
+ Frame {
+ msec: 4608
+ hash: "4214c9f474d7f11bed74e32f5b3a0e9f"
+ }
+ Frame {
+ msec: 4624
+ hash: "f290e1dbf13ae399a2644eea3715804a"
+ }
+ Frame {
+ msec: 4640
+ hash: "6538c60446e3303dc1126c3c9c47ae42"
+ }
+ Frame {
+ msec: 4656
+ hash: "5319667f181eb5647710ccc6eddf43c9"
+ }
+ Frame {
+ msec: 4672
+ hash: "b98b68ea99d5a107115b50c32aa45c35"
+ }
+ Frame {
+ msec: 4688
+ hash: "2cc38e2915f77a46082c32c9393ae0c5"
+ }
+ Frame {
+ msec: 4704
+ hash: "40c695b17834cbba86d4dde0729f620b"
+ }
+ Frame {
+ msec: 4720
+ hash: "e8d5a95cfc726ce2626951ef1c68a948"
+ }
+ Frame {
+ msec: 4736
+ hash: "ab96c1668890ceffba74219d83e15e99"
+ }
+ Frame {
+ msec: 4752
+ hash: "4d69a73b3940911940b419028dabd223"
+ }
+ Frame {
+ msec: 4768
+ hash: "281043e3c045df177cbfae1abf51a8d1"
+ }
+ Frame {
+ msec: 4784
+ hash: "8adf6d8154d7950efe6b5bd7e2b760b6"
+ }
+ Frame {
+ msec: 4800
+ image: "follow.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "7fba4249c76b7f81c2b88cf906ce8ce6"
+ }
+ Frame {
+ msec: 4832
+ hash: "50b3c89d4d783469843b3acacb9690dd"
+ }
+ Frame {
+ msec: 4848
+ hash: "29f950ab7e6299036e78c8f37d114990"
+ }
+ Frame {
+ msec: 4864
+ hash: "3f8aecc5453406c9d8160eeb9691ed91"
+ }
+ Frame {
+ msec: 4880
+ hash: "ad7ff48fed4ca9e236271d169c3bf696"
+ }
+ Frame {
+ msec: 4896
+ hash: "2a2f872e4ef5c062a61fb59238df8794"
+ }
+ Frame {
+ msec: 4912
+ hash: "87cf2e21d7e56a82437a8ff3fa2bdc8c"
+ }
+ Frame {
+ msec: 4928
+ hash: "c3b04bb24d86d2aebd8fde7845f114cf"
+ }
+ Frame {
+ msec: 4944
+ hash: "3ad95d59a1f1841e3ff2324055ca23c0"
+ }
+ Frame {
+ msec: 4960
+ hash: "b91068fdce1fb2be9a64902a3dfa6b0d"
+ }
+ Frame {
+ msec: 4976
+ hash: "30f0118eb0bba40927a8038da03b652b"
+ }
+ Frame {
+ msec: 4992
+ hash: "ce5f3d15d3536be16b960f02a7335b99"
+ }
+ Frame {
+ msec: 5008
+ hash: "85b853c3f48b915ed6e80815709e8ac2"
+ }
+ Frame {
+ msec: 5024
+ hash: "c3511a76aa6dc2f1422a473ca4d80d0f"
+ }
+ Frame {
+ msec: 5040
+ hash: "deb1df70b4e1801c635356c65c0a5a46"
+ }
+ Frame {
+ msec: 5056
+ hash: "d04983df9b0ffc45e629af55a8e5cc95"
+ }
+ Frame {
+ msec: 5072
+ hash: "2a55c97509819657f5f8604d4789d9d4"
+ }
+ Frame {
+ msec: 5088
+ hash: "94589d594fa2e5ed621459ec2c8bd7e8"
+ }
+ Frame {
+ msec: 5104
+ hash: "a8a1bd7c15a5bdfe15d6580d719bdba6"
+ }
+ Frame {
+ msec: 5120
+ hash: "b4e1a4b1b649820be217c46b5086c8a4"
+ }
+ Frame {
+ msec: 5136
+ hash: "4de7d7ce85717eb9a67c61745ea26c0a"
+ }
+ Frame {
+ msec: 5152
+ hash: "c8ee53b7e659e10c7dbcf44e1a45f794"
+ }
+ Frame {
+ msec: 5168
+ hash: "f46ce03bc5a932c39862577c5a5cd24c"
+ }
+ Frame {
+ msec: 5184
+ hash: "d417370ed6fb99ccfa443eb97e6de331"
+ }
+ Frame {
+ msec: 5200
+ hash: "336af06572992960c829d4a209048263"
+ }
+ Frame {
+ msec: 5216
+ hash: "4066e8eef292abf9b58bc89b4b5f3ce9"
+ }
+ Frame {
+ msec: 5232
+ hash: "360f037a02bf4a337b278886266ff2f1"
+ }
+ Frame {
+ msec: 5248
+ hash: "79e9f387b0ce164057640c0caab8d10d"
+ }
+ Frame {
+ msec: 5264
+ hash: "ee8741d1810303cfe5ecff39c7d52fdd"
+ }
+ Frame {
+ msec: 5280
+ hash: "4cba1c857f0af49d7fe68584f99c89d7"
+ }
+ Frame {
+ msec: 5296
+ hash: "c0ae482a2fbb9f15a2c2ff631cc85c2c"
+ }
+ Frame {
+ msec: 5312
+ hash: "3b6bf6d6a0aeebdc92eff4e336fd3b6e"
+ }
+ Frame {
+ msec: 5328
+ hash: "43033eb8aeba6b49c135a1702f6b8f47"
+ }
+ Frame {
+ msec: 5344
+ hash: "1319c7e3a84484723891ee43a80bc765"
+ }
+ Frame {
+ msec: 5360
+ hash: "838ec693c923565d77b060f262beb1e8"
+ }
+ Frame {
+ msec: 5376
+ hash: "74306669836425de03cec617d4ed849a"
+ }
+ Frame {
+ msec: 5392
+ hash: "c063f4951755c8939399d0d560a0f762"
+ }
+ Frame {
+ msec: 5408
+ hash: "512c739e0ff25f7d6b983a193f7fc2c3"
+ }
+ Frame {
+ msec: 5424
+ hash: "6c5f69cc2ce2992fd2ecb0ea3691e2b8"
+ }
+ Frame {
+ msec: 5440
+ hash: "f5dbc5ce0ba00eafb9379ee86de67150"
+ }
+ Frame {
+ msec: 5456
+ hash: "f62bb7d8d9749272ca3e2bd1931598fb"
+ }
+ Frame {
+ msec: 5472
+ hash: "052fdac05286edcdd7fcd4d6d9582f39"
+ }
+ Frame {
+ msec: 5488
+ hash: "ac4702306e5be156fe7b069cb90e1038"
+ }
+ Frame {
+ msec: 5504
+ hash: "127e94c79f4d33e5f223a0853629245f"
+ }
+ Frame {
+ msec: 5520
+ hash: "dd77216b0a90c46dd5c264d38ab0fd74"
+ }
+ Frame {
+ msec: 5536
+ hash: "a4e50b39aa367d4cd7650d088d186856"
+ }
+ Frame {
+ msec: 5552
+ hash: "6e14946b9b23f0fc137bd61c02af1ca5"
+ }
+ Frame {
+ msec: 5568
+ hash: "8c550d5e4cfbcee2c7bd6c20dba53f41"
+ }
+ Frame {
+ msec: 5584
+ hash: "9f2385fb614bdaafe022712148f786d2"
+ }
+ Frame {
+ msec: 5600
+ hash: "c87903c96ae5a4b91c5bda524bfd4a4f"
+ }
+ Frame {
+ msec: 5616
+ hash: "9a98de9b4237b7c0ccb4468344d410bc"
+ }
+ Frame {
+ msec: 5632
+ hash: "7ff448f395ff50cde1f6e6cfaf0c1541"
+ }
+ Frame {
+ msec: 5648
+ hash: "ab7a6998a5b26e3d58bd1d0a949f3709"
+ }
+ Frame {
+ msec: 5664
+ hash: "ab7a6998a5b26e3d58bd1d0a949f3709"
+ }
+ Frame {
+ msec: 5680
+ hash: "2e1b5636ab75af91bd5b0d48c04828f5"
+ }
+ Frame {
+ msec: 5696
+ hash: "0976b605c78f6f8512acdfb61b9d123a"
+ }
+ Frame {
+ msec: 5712
+ hash: "bb816bfd8bd3972c80c3a76c9ddf785e"
+ }
+ Frame {
+ msec: 5728
+ hash: "c3518990fc7aa5660a9e86034cf4c46f"
+ }
+ Frame {
+ msec: 5744
+ hash: "b27230d8aeb214e18b43de167213ef7b"
+ }
+ Frame {
+ msec: 5760
+ image: "follow.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "fc55f00ae456c2687ed05ab4b6906a33"
+ }
+ Frame {
+ msec: 5792
+ hash: "50051a48d1fae3bc9c9d1f0a964d9561"
+ }
+ Frame {
+ msec: 5808
+ hash: "279a38d7261241c744c2317ea9843567"
+ }
+ Frame {
+ msec: 5824
+ hash: "0b3ed3960713dbda36326b7de492c42e"
+ }
+ Frame {
+ msec: 5840
+ hash: "fff5737541317406c4a0ef06f1cdc041"
+ }
+ Frame {
+ msec: 5856
+ hash: "47aef0d79da45139a3981a75290cc9b8"
+ }
+ Frame {
+ msec: 5872
+ hash: "d79f9f9371c76a855ea4f2cdeed97acd"
+ }
+ Frame {
+ msec: 5888
+ hash: "66610a0d5b926d419da26e20b04b55a5"
+ }
+ Frame {
+ msec: 5904
+ hash: "9891ad954da8535b44cc234bb2588f30"
+ }
+ Frame {
+ msec: 5920
+ hash: "b53056146701fae1598ab49e6399db01"
+ }
+ Frame {
+ msec: 5936
+ hash: "064799027a3f60458a3797c6c87d3e29"
+ }
+ Frame {
+ msec: 5952
+ hash: "81ad252f10e6f8f2a08e7df1d25e8a47"
+ }
+ Frame {
+ msec: 5968
+ hash: "09fbd923da02844f50ad25059f82560c"
+ }
+ Frame {
+ msec: 5984
+ hash: "f41d8370afdce8a154ab42204ca8d92d"
+ }
+ Frame {
+ msec: 6000
+ hash: "748b2d020c28b3ac36b08377b4a2544b"
+ }
+ Frame {
+ msec: 6016
+ hash: "748b2d020c28b3ac36b08377b4a2544b"
+ }
+ Frame {
+ msec: 6032
+ hash: "d8c02a54c0d1df20127025d547c741af"
+ }
+ Frame {
+ msec: 6048
+ hash: "d8c02a54c0d1df20127025d547c741af"
+ }
+ Frame {
+ msec: 6064
+ hash: "d7fd0dab22fec0f68ed01cfd6d32e7f5"
+ }
+ Frame {
+ msec: 6080
+ hash: "f0b035eda10c07f5c3c825784ad96437"
+ }
+ Frame {
+ msec: 6096
+ hash: "54b83800f8a01e1a4d57b8b1d371fb09"
+ }
+ Frame {
+ msec: 6112
+ hash: "19ad51c31e9cfdb314c76f323574806c"
+ }
+ Frame {
+ msec: 6128
+ hash: "dcf269a115781eb4df232a527de87a87"
+ }
+ Frame {
+ msec: 6144
+ hash: "95053206702a6118c23b541ff7fbef0d"
+ }
+ Frame {
+ msec: 6160
+ hash: "933a158398ee746c0465c2e7af9b6b4d"
+ }
+ Frame {
+ msec: 6176
+ hash: "ade4a4aa03f5787dce1331ed27ff9c6e"
+ }
+ Frame {
+ msec: 6192
+ hash: "9ecc7d4cb5cf0dd815e208e13e2c932a"
+ }
+ Frame {
+ msec: 6208
+ hash: "98e40cba2e717e57a5dcd3413e166f65"
+ }
+ Frame {
+ msec: 6224
+ hash: "f68f45b71f6d596eaa76fa2bc46cfe1b"
+ }
+ Frame {
+ msec: 6240
+ hash: "9230c9b1013b83b073ccb90d2633043f"
+ }
+ Frame {
+ msec: 6256
+ hash: "5d0fc4842b75703d29816fa0330624ba"
+ }
+ Frame {
+ msec: 6272
+ hash: "5d0fc4842b75703d29816fa0330624ba"
+ }
+ Frame {
+ msec: 6288
+ hash: "5d0fc4842b75703d29816fa0330624ba"
+ }
+ Frame {
+ msec: 6304
+ hash: "96008d5b8446f67e07129d02300d122d"
+ }
+ Frame {
+ msec: 6320
+ hash: "96008d5b8446f67e07129d02300d122d"
+ }
+ Frame {
+ msec: 6336
+ hash: "96008d5b8446f67e07129d02300d122d"
+ }
+ Frame {
+ msec: 6352
+ hash: "96008d5b8446f67e07129d02300d122d"
+ }
+ Frame {
+ msec: 6368
+ hash: "96008d5b8446f67e07129d02300d122d"
+ }
+ Frame {
+ msec: 6384
+ hash: "478be760047d33bd66017bdd304ff3ae"
+ }
+ Frame {
+ msec: 6400
+ hash: "478be760047d33bd66017bdd304ff3ae"
+ }
+ Frame {
+ msec: 6416
+ hash: "478be760047d33bd66017bdd304ff3ae"
+ }
+ Frame {
+ msec: 6432
+ hash: "478be760047d33bd66017bdd304ff3ae"
+ }
+ Frame {
+ msec: 6448
+ hash: "478be760047d33bd66017bdd304ff3ae"
+ }
+ Frame {
+ msec: 6464
+ hash: "8ff11dfe2642dc099c240e8aef8285df"
+ }
+ Frame {
+ msec: 6480
+ hash: "8ff11dfe2642dc099c240e8aef8285df"
+ }
+ Frame {
+ msec: 6496
+ hash: "8ff11dfe2642dc099c240e8aef8285df"
+ }
+ Frame {
+ msec: 6512
+ hash: "8ff11dfe2642dc099c240e8aef8285df"
+ }
+ Frame {
+ msec: 6528
+ hash: "8ff11dfe2642dc099c240e8aef8285df"
+ }
+ Frame {
+ msec: 6544
+ hash: "8ff11dfe2642dc099c240e8aef8285df"
+ }
+ Frame {
+ msec: 6560
+ hash: "8ff11dfe2642dc099c240e8aef8285df"
+ }
+ Frame {
+ msec: 6576
+ hash: "8ff11dfe2642dc099c240e8aef8285df"
+ }
+ Frame {
+ msec: 6592
+ hash: "8ff11dfe2642dc099c240e8aef8285df"
+ }
+ Frame {
+ msec: 6608
+ hash: "8ff11dfe2642dc099c240e8aef8285df"
+ }
+ Frame {
+ msec: 6624
+ hash: "8ff11dfe2642dc099c240e8aef8285df"
+ }
+ Frame {
+ msec: 6640
+ hash: "8ff11dfe2642dc099c240e8aef8285df"
+ }
+ Frame {
+ msec: 6656
+ hash: "8ff11dfe2642dc099c240e8aef8285df"
+ }
+ Frame {
+ msec: 6672
+ hash: "8ff11dfe2642dc099c240e8aef8285df"
+ }
+ Frame {
+ msec: 6688
+ hash: "8ff11dfe2642dc099c240e8aef8285df"
+ }
+ Frame {
+ msec: 6704
+ hash: "01ac8ff953f8f83c6fa2252fe6ff6698"
+ }
+ Frame {
+ msec: 6720
+ image: "follow.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "01ac8ff953f8f83c6fa2252fe6ff6698"
+ }
+ Frame {
+ msec: 6752
+ hash: "01ac8ff953f8f83c6fa2252fe6ff6698"
+ }
+ Frame {
+ msec: 6768
+ hash: "01ac8ff953f8f83c6fa2252fe6ff6698"
+ }
+ Frame {
+ msec: 6784
+ hash: "01ac8ff953f8f83c6fa2252fe6ff6698"
+ }
+ Frame {
+ msec: 6800
+ hash: "01ac8ff953f8f83c6fa2252fe6ff6698"
+ }
+ Frame {
+ msec: 6816
+ hash: "01ac8ff953f8f83c6fa2252fe6ff6698"
+ }
+ Frame {
+ msec: 6832
+ hash: "96008d5b8446f67e07129d02300d122d"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 6848
+ hash: "5d0fc4842b75703d29816fa0330624ba"
+ }
+ Frame {
+ msec: 6864
+ hash: "5d0fc4842b75703d29816fa0330624ba"
+ }
+ Frame {
+ msec: 6880
+ hash: "5d0fc4842b75703d29816fa0330624ba"
+ }
+ Frame {
+ msec: 6896
+ hash: "5d0fc4842b75703d29816fa0330624ba"
+ }
+ Frame {
+ msec: 6912
+ hash: "5d0fc4842b75703d29816fa0330624ba"
+ }
+ Frame {
+ msec: 6928
+ hash: "5d0fc4842b75703d29816fa0330624ba"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/follow.qml b/tests/auto/declarative/visual/qdeclarativespringfollow/follow.qml
new file mode 100644
index 0000000000..62503e495f
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/follow.qml
@@ -0,0 +1,71 @@
+import Qt 4.6
+
+Rectangle {
+ color: "#ffffff"
+ width: 320; height: 240
+ Rectangle {
+ id: rect
+ color: "#00ff00"
+ y: 200; width: 60; height: 20
+ y: SequentialAnimation {
+ repeat: true
+ NumberAnimation {
+ to: 20; duration: 500
+ easing.type: "InOutQuad"
+ }
+ NumberAnimation {
+ to: 200; duration: 2000
+ easing.type: "OutBounce"
+ }
+ PauseAnimation { duration: 1000 }
+ }
+ }
+
+ // Velocity
+ Rectangle {
+ color: "#ff0000"
+ x: rect.width; width: rect.width; height: 20
+ y: 200
+ y: SpringFollow { source: rect.y; velocity: 200 }
+ }
+
+ // Spring
+ Rectangle {
+ color: "#ff0000"
+ x: rect.width * 2; width: rect.width/2; height: 20
+ y: 200
+ y: SpringFollow { source: rect.y; spring: 1.0; damping: 0.2 }
+ }
+ Rectangle {
+ color: "#880000"
+ x: rect.width * 2.5; width: rect.width/2; height: 20
+ y: 200
+ y: SpringFollow { source: rect.y; spring: 1.0; damping: 0.2; mass: 3.0 } // "heavier" object
+ }
+
+ // Follow mouse
+ MouseArea {
+ id: mouseRegion
+ anchors.fill: parent
+ Rectangle {
+ id: ball
+ width: 20; height: 20
+ radius: 10
+ color: "#0000ff"
+ x: SpringFollow { id: f1; source: mouseRegion.mouseX-10; spring: 1.0; damping: 0.05; epsilon: 0.25 }
+ y: SpringFollow { id: f2; source: mouseRegion.mouseY-10; spring: 1.0; damping: 0.05; epsilon: 0.25 }
+ states: [
+ State {
+ name: "following"
+ when: !f1.inSync || !f2.inSync
+ PropertyChanges { target: ball; color: "#ff0000" }
+ }
+ ]
+ transitions: [
+ Transition {
+ ColorAnimation { duration: 200 }
+ }
+ ]
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/baseline/data-X11/parentanchor.qml b/tests/auto/declarative/visual/qdeclarativetext/baseline/data-X11/parentanchor.qml
new file mode 100644
index 0000000000..56d616e618
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/baseline/data-X11/parentanchor.qml
@@ -0,0 +1,131 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 32
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 48
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 64
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 80
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 96
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 112
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 128
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 144
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 160
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 176
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 192
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 208
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 224
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 240
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 256
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 272
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 288
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 304
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 320
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 336
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 352
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 368
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 384
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 400
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 416
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 432
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 448
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 464
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 480
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 496
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/baseline/data/parentanchor.qml b/tests/auto/declarative/visual/qdeclarativetext/baseline/data/parentanchor.qml
new file mode 100644
index 0000000000..56d616e618
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/baseline/data/parentanchor.qml
@@ -0,0 +1,131 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 32
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 48
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 64
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 80
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 96
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 112
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 128
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 144
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 160
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 176
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 192
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 208
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 224
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 240
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 256
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 272
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 288
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 304
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 320
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 336
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 352
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 368
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 384
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 400
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 416
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 432
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 448
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 464
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 480
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+ Frame {
+ msec: 496
+ hash: "3e022a120a2dbe688d53657508de36cf"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/baseline/parentanchor.qml b/tests/auto/declarative/visual/qdeclarativetext/baseline/parentanchor.qml
new file mode 100644
index 0000000000..80f0f03c37
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/baseline/parentanchor.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+Rectangle {
+ id: s; width: 600; height: 100; color: "lightsteelblue"
+ property string text: "The quick brown fox jumps over the lazy dog."
+ Text {
+ text: s.text
+ anchors.verticalCenter: s.verticalCenter
+ }
+ Text {
+ text: s.text
+ anchors.baseline: s.verticalCenter
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide.0.png b/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide.0.png
new file mode 100644
index 0000000000..eea336298b
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide.qml b/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide.qml
new file mode 100644
index 0000000000..1ccede4378
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide.qml
@@ -0,0 +1,279 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 32
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 48
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 64
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 80
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 96
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 112
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 128
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 144
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 160
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 176
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 192
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 208
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 224
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 240
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 256
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 272
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 288
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 304
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 320
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 336
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 352
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 368
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 384
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 400
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 416
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 432
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 448
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 464
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 480
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 496
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 512
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 528
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 544
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 560
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 576
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 592
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 608
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 624
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 640
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 656
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 672
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 688
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 704
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 720
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 736
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 752
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 768
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 784
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 800
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 816
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 832
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 848
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 864
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 880
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 896
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 912
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 928
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 944
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 960
+ image: "elide.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 992
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 1008
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 1024
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 1040
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+ Frame {
+ msec: 1056
+ hash: "1678890d66761a30100c37132ccec9a2"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.0.png b/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.0.png
new file mode 100644
index 0000000000..3dfade5c72
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.1.png b/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.1.png
new file mode 100644
index 0000000000..1ee2076add
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.2.png b/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.2.png
new file mode 100644
index 0000000000..ae680bebbe
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.3.png b/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.3.png
new file mode 100644
index 0000000000..c2859bef87
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.qml b/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.qml
new file mode 100644
index 0000000000..07ad23686b
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/elide2.qml
@@ -0,0 +1,991 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 32
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 48
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 64
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 80
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 96
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 112
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 128
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 144
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 160
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 176
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 192
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 208
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 224
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 240
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 256
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 272
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 288
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 304
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 320
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 336
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 352
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 368
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 384
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 400
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 416
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 432
+ hash: "fc3a7e898d6bfa2af4d774b20609f967"
+ }
+ Frame {
+ msec: 448
+ hash: "fc3a7e898d6bfa2af4d774b20609f967"
+ }
+ Frame {
+ msec: 464
+ hash: "fc3a7e898d6bfa2af4d774b20609f967"
+ }
+ Frame {
+ msec: 480
+ hash: "3bcaa6426796bc9097e0aeba90dd5e39"
+ }
+ Frame {
+ msec: 496
+ hash: "3bcaa6426796bc9097e0aeba90dd5e39"
+ }
+ Frame {
+ msec: 512
+ hash: "3bcaa6426796bc9097e0aeba90dd5e39"
+ }
+ Frame {
+ msec: 528
+ hash: "3bcaa6426796bc9097e0aeba90dd5e39"
+ }
+ Frame {
+ msec: 544
+ hash: "3bcaa6426796bc9097e0aeba90dd5e39"
+ }
+ Frame {
+ msec: 560
+ hash: "3bcaa6426796bc9097e0aeba90dd5e39"
+ }
+ Frame {
+ msec: 576
+ hash: "4daa612cd7e7ee455ff1a93329202865"
+ }
+ Frame {
+ msec: 592
+ hash: "4daa612cd7e7ee455ff1a93329202865"
+ }
+ Frame {
+ msec: 608
+ hash: "4daa612cd7e7ee455ff1a93329202865"
+ }
+ Frame {
+ msec: 624
+ hash: "4daa612cd7e7ee455ff1a93329202865"
+ }
+ Frame {
+ msec: 640
+ hash: "4daa612cd7e7ee455ff1a93329202865"
+ }
+ Frame {
+ msec: 656
+ hash: "3f362ad550db910f1d9f261557c65913"
+ }
+ Frame {
+ msec: 672
+ hash: "3f362ad550db910f1d9f261557c65913"
+ }
+ Frame {
+ msec: 688
+ hash: "f159011c2b85fe212a32a7b5d2a57016"
+ }
+ Frame {
+ msec: 704
+ hash: "f159011c2b85fe212a32a7b5d2a57016"
+ }
+ Frame {
+ msec: 720
+ hash: "f159011c2b85fe212a32a7b5d2a57016"
+ }
+ Frame {
+ msec: 736
+ hash: "f159011c2b85fe212a32a7b5d2a57016"
+ }
+ Frame {
+ msec: 752
+ hash: "f159011c2b85fe212a32a7b5d2a57016"
+ }
+ Frame {
+ msec: 768
+ hash: "f159011c2b85fe212a32a7b5d2a57016"
+ }
+ Frame {
+ msec: 784
+ hash: "a892c67199c23e5d9012a6a24cb45d16"
+ }
+ Frame {
+ msec: 800
+ hash: "a892c67199c23e5d9012a6a24cb45d16"
+ }
+ Frame {
+ msec: 816
+ hash: "a892c67199c23e5d9012a6a24cb45d16"
+ }
+ Frame {
+ msec: 832
+ hash: "532e01ed6ede95eca68e641e2edb7f1c"
+ }
+ Frame {
+ msec: 848
+ hash: "532e01ed6ede95eca68e641e2edb7f1c"
+ }
+ Frame {
+ msec: 864
+ hash: "532e01ed6ede95eca68e641e2edb7f1c"
+ }
+ Frame {
+ msec: 880
+ hash: "532e01ed6ede95eca68e641e2edb7f1c"
+ }
+ Frame {
+ msec: 896
+ hash: "532e01ed6ede95eca68e641e2edb7f1c"
+ }
+ Frame {
+ msec: 912
+ hash: "a7dc1d7dde956d62834de0968261386f"
+ }
+ Frame {
+ msec: 928
+ hash: "a7dc1d7dde956d62834de0968261386f"
+ }
+ Frame {
+ msec: 944
+ hash: "a7dc1d7dde956d62834de0968261386f"
+ }
+ Frame {
+ msec: 960
+ image: "elide2.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "a7dc1d7dde956d62834de0968261386f"
+ }
+ Frame {
+ msec: 992
+ hash: "a590e1358fac567dda9fdfc6bfe4ab89"
+ }
+ Frame {
+ msec: 1008
+ hash: "a590e1358fac567dda9fdfc6bfe4ab89"
+ }
+ Frame {
+ msec: 1024
+ hash: "778d34ca89b5db88fe26619576e9d337"
+ }
+ Frame {
+ msec: 1040
+ hash: "778d34ca89b5db88fe26619576e9d337"
+ }
+ Frame {
+ msec: 1056
+ hash: "778d34ca89b5db88fe26619576e9d337"
+ }
+ Frame {
+ msec: 1072
+ hash: "778d34ca89b5db88fe26619576e9d337"
+ }
+ Frame {
+ msec: 1088
+ hash: "778d34ca89b5db88fe26619576e9d337"
+ }
+ Frame {
+ msec: 1104
+ hash: "9424caee019aa9bccd4156b0b9ca2723"
+ }
+ Frame {
+ msec: 1120
+ hash: "9424caee019aa9bccd4156b0b9ca2723"
+ }
+ Frame {
+ msec: 1136
+ hash: "9424caee019aa9bccd4156b0b9ca2723"
+ }
+ Frame {
+ msec: 1152
+ hash: "000061a140ab71a44c0480a92ad3bc70"
+ }
+ Frame {
+ msec: 1168
+ hash: "000061a140ab71a44c0480a92ad3bc70"
+ }
+ Frame {
+ msec: 1184
+ hash: "000061a140ab71a44c0480a92ad3bc70"
+ }
+ Frame {
+ msec: 1200
+ hash: "5dec9638853165428cd15ae02e1d03ce"
+ }
+ Frame {
+ msec: 1216
+ hash: "5dec9638853165428cd15ae02e1d03ce"
+ }
+ Frame {
+ msec: 1232
+ hash: "5dec9638853165428cd15ae02e1d03ce"
+ }
+ Frame {
+ msec: 1248
+ hash: "ecb69bdbd13114715f738b1ace3ecf51"
+ }
+ Frame {
+ msec: 1264
+ hash: "ecb69bdbd13114715f738b1ace3ecf51"
+ }
+ Frame {
+ msec: 1280
+ hash: "ecb69bdbd13114715f738b1ace3ecf51"
+ }
+ Frame {
+ msec: 1296
+ hash: "ecb69bdbd13114715f738b1ace3ecf51"
+ }
+ Frame {
+ msec: 1312
+ hash: "ecb69bdbd13114715f738b1ace3ecf51"
+ }
+ Frame {
+ msec: 1328
+ hash: "923b4f4f4a3dbaefbf003859067b2ea9"
+ }
+ Frame {
+ msec: 1344
+ hash: "923b4f4f4a3dbaefbf003859067b2ea9"
+ }
+ Frame {
+ msec: 1360
+ hash: "923b4f4f4a3dbaefbf003859067b2ea9"
+ }
+ Frame {
+ msec: 1376
+ hash: "923b4f4f4a3dbaefbf003859067b2ea9"
+ }
+ Frame {
+ msec: 1392
+ hash: "923b4f4f4a3dbaefbf003859067b2ea9"
+ }
+ Frame {
+ msec: 1408
+ hash: "d4230a476237f9e13a132e775f1b960c"
+ }
+ Frame {
+ msec: 1424
+ hash: "d4230a476237f9e13a132e775f1b960c"
+ }
+ Frame {
+ msec: 1440
+ hash: "d4230a476237f9e13a132e775f1b960c"
+ }
+ Frame {
+ msec: 1456
+ hash: "d4230a476237f9e13a132e775f1b960c"
+ }
+ Frame {
+ msec: 1472
+ hash: "d4230a476237f9e13a132e775f1b960c"
+ }
+ Frame {
+ msec: 1488
+ hash: "504ad2ba8543f7ad6490bd45d86fbef9"
+ }
+ Frame {
+ msec: 1504
+ hash: "504ad2ba8543f7ad6490bd45d86fbef9"
+ }
+ Frame {
+ msec: 1520
+ hash: "504ad2ba8543f7ad6490bd45d86fbef9"
+ }
+ Frame {
+ msec: 1536
+ hash: "504ad2ba8543f7ad6490bd45d86fbef9"
+ }
+ Frame {
+ msec: 1552
+ hash: "504ad2ba8543f7ad6490bd45d86fbef9"
+ }
+ Frame {
+ msec: 1568
+ hash: "504ad2ba8543f7ad6490bd45d86fbef9"
+ }
+ Frame {
+ msec: 1584
+ hash: "dd412c6a2e5cb8890cb43142c84a5673"
+ }
+ Frame {
+ msec: 1600
+ hash: "dd412c6a2e5cb8890cb43142c84a5673"
+ }
+ Frame {
+ msec: 1616
+ hash: "dd412c6a2e5cb8890cb43142c84a5673"
+ }
+ Frame {
+ msec: 1632
+ hash: "38b1fa7bd4e2f13b05caa62903c56ab6"
+ }
+ Frame {
+ msec: 1648
+ hash: "38b1fa7bd4e2f13b05caa62903c56ab6"
+ }
+ Frame {
+ msec: 1664
+ hash: "38b1fa7bd4e2f13b05caa62903c56ab6"
+ }
+ Frame {
+ msec: 1680
+ hash: "38b1fa7bd4e2f13b05caa62903c56ab6"
+ }
+ Frame {
+ msec: 1696
+ hash: "ffb2cb01c868c1dfa6b5154c4e8a7fd8"
+ }
+ Frame {
+ msec: 1712
+ hash: "ffb2cb01c868c1dfa6b5154c4e8a7fd8"
+ }
+ Frame {
+ msec: 1728
+ hash: "ffb2cb01c868c1dfa6b5154c4e8a7fd8"
+ }
+ Frame {
+ msec: 1744
+ hash: "9effd5fc19246cfe3d2f5968c5caaa4e"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1760
+ hash: "9effd5fc19246cfe3d2f5968c5caaa4e"
+ }
+ Frame {
+ msec: 1776
+ hash: "9effd5fc19246cfe3d2f5968c5caaa4e"
+ }
+ Frame {
+ msec: 1792
+ hash: "9effd5fc19246cfe3d2f5968c5caaa4e"
+ }
+ Frame {
+ msec: 1808
+ hash: "4fa14ae57d170b16fd90d59d5ec83561"
+ }
+ Frame {
+ msec: 1824
+ hash: "4fa14ae57d170b16fd90d59d5ec83561"
+ }
+ Frame {
+ msec: 1840
+ hash: "4fa14ae57d170b16fd90d59d5ec83561"
+ }
+ Frame {
+ msec: 1856
+ hash: "4fa14ae57d170b16fd90d59d5ec83561"
+ }
+ Frame {
+ msec: 1872
+ hash: "4fa14ae57d170b16fd90d59d5ec83561"
+ }
+ Frame {
+ msec: 1888
+ hash: "976dd5bc154522438f92790f28639512"
+ }
+ Frame {
+ msec: 1904
+ hash: "976dd5bc154522438f92790f28639512"
+ }
+ Frame {
+ msec: 1920
+ image: "elide2.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "976dd5bc154522438f92790f28639512"
+ }
+ Frame {
+ msec: 1952
+ hash: "976dd5bc154522438f92790f28639512"
+ }
+ Frame {
+ msec: 1968
+ hash: "4ae1d6ddb9a78cc2f4e81b58fcca6a20"
+ }
+ Frame {
+ msec: 1984
+ hash: "4ae1d6ddb9a78cc2f4e81b58fcca6a20"
+ }
+ Frame {
+ msec: 2000
+ hash: "4ae1d6ddb9a78cc2f4e81b58fcca6a20"
+ }
+ Frame {
+ msec: 2016
+ hash: "4ae1d6ddb9a78cc2f4e81b58fcca6a20"
+ }
+ Frame {
+ msec: 2032
+ hash: "4ae1d6ddb9a78cc2f4e81b58fcca6a20"
+ }
+ Frame {
+ msec: 2048
+ hash: "84bdf634cfd4de588f2b0984aa3e97bd"
+ }
+ Frame {
+ msec: 2064
+ hash: "84bdf634cfd4de588f2b0984aa3e97bd"
+ }
+ Frame {
+ msec: 2080
+ hash: "84bdf634cfd4de588f2b0984aa3e97bd"
+ }
+ Frame {
+ msec: 2096
+ hash: "1a978ed6951afe40912efcfb54dcce65"
+ }
+ Frame {
+ msec: 2112
+ hash: "1a978ed6951afe40912efcfb54dcce65"
+ }
+ Frame {
+ msec: 2128
+ hash: "1a978ed6951afe40912efcfb54dcce65"
+ }
+ Frame {
+ msec: 2144
+ hash: "a57eea59fe6475164e24688489977869"
+ }
+ Frame {
+ msec: 2160
+ hash: "a57eea59fe6475164e24688489977869"
+ }
+ Frame {
+ msec: 2176
+ hash: "a57eea59fe6475164e24688489977869"
+ }
+ Frame {
+ msec: 2192
+ hash: "69ac1d93bd51f495783dbc6a0f7b27be"
+ }
+ Frame {
+ msec: 2208
+ hash: "69ac1d93bd51f495783dbc6a0f7b27be"
+ }
+ Frame {
+ msec: 2224
+ hash: "69ac1d93bd51f495783dbc6a0f7b27be"
+ }
+ Frame {
+ msec: 2240
+ hash: "69ac1d93bd51f495783dbc6a0f7b27be"
+ }
+ Frame {
+ msec: 2256
+ hash: "69ac1d93bd51f495783dbc6a0f7b27be"
+ }
+ Frame {
+ msec: 2272
+ hash: "04c62a4d01e9309eaeea87902013c8b9"
+ }
+ Frame {
+ msec: 2288
+ hash: "04c62a4d01e9309eaeea87902013c8b9"
+ }
+ Frame {
+ msec: 2304
+ hash: "fac2f5730a600d6b69280d5e6962c1d2"
+ }
+ Frame {
+ msec: 2320
+ hash: "fac2f5730a600d6b69280d5e6962c1d2"
+ }
+ Frame {
+ msec: 2336
+ hash: "fac2f5730a600d6b69280d5e6962c1d2"
+ }
+ Frame {
+ msec: 2352
+ hash: "fac2f5730a600d6b69280d5e6962c1d2"
+ }
+ Frame {
+ msec: 2368
+ hash: "fac2f5730a600d6b69280d5e6962c1d2"
+ }
+ Frame {
+ msec: 2384
+ hash: "13f7ce73c0a2f1c7958294e4fbf3d30d"
+ }
+ Frame {
+ msec: 2400
+ hash: "13f7ce73c0a2f1c7958294e4fbf3d30d"
+ }
+ Frame {
+ msec: 2416
+ hash: "13f7ce73c0a2f1c7958294e4fbf3d30d"
+ }
+ Frame {
+ msec: 2432
+ hash: "13f7ce73c0a2f1c7958294e4fbf3d30d"
+ }
+ Frame {
+ msec: 2448
+ hash: "13f7ce73c0a2f1c7958294e4fbf3d30d"
+ }
+ Frame {
+ msec: 2464
+ hash: "96a5678ee5bcbf28df6a2bf66b2b6189"
+ }
+ Frame {
+ msec: 2480
+ hash: "96a5678ee5bcbf28df6a2bf66b2b6189"
+ }
+ Frame {
+ msec: 2496
+ hash: "96a5678ee5bcbf28df6a2bf66b2b6189"
+ }
+ Frame {
+ msec: 2512
+ hash: "96a5678ee5bcbf28df6a2bf66b2b6189"
+ }
+ Frame {
+ msec: 2528
+ hash: "96a5678ee5bcbf28df6a2bf66b2b6189"
+ }
+ Frame {
+ msec: 2544
+ hash: "abb220abcd579abd988b6f9f7e0bc2b7"
+ }
+ Frame {
+ msec: 2560
+ hash: "abb220abcd579abd988b6f9f7e0bc2b7"
+ }
+ Frame {
+ msec: 2576
+ hash: "abb220abcd579abd988b6f9f7e0bc2b7"
+ }
+ Frame {
+ msec: 2592
+ hash: "abb220abcd579abd988b6f9f7e0bc2b7"
+ }
+ Frame {
+ msec: 2608
+ hash: "8a8585eb9a5cd1d6c38dc7076923e7f7"
+ }
+ Frame {
+ msec: 2624
+ hash: "8a8585eb9a5cd1d6c38dc7076923e7f7"
+ }
+ Frame {
+ msec: 2640
+ hash: "8a8585eb9a5cd1d6c38dc7076923e7f7"
+ }
+ Frame {
+ msec: 2656
+ hash: "c13ec1d294921e6a56f6ac4198e084eb"
+ }
+ Frame {
+ msec: 2672
+ hash: "c13ec1d294921e6a56f6ac4198e084eb"
+ }
+ Frame {
+ msec: 2688
+ hash: "c13ec1d294921e6a56f6ac4198e084eb"
+ }
+ Frame {
+ msec: 2704
+ hash: "c13ec1d294921e6a56f6ac4198e084eb"
+ }
+ Frame {
+ msec: 2720
+ hash: "53295720dbabe6fbfff56bea0e0ba7f1"
+ }
+ Frame {
+ msec: 2736
+ hash: "53295720dbabe6fbfff56bea0e0ba7f1"
+ }
+ Frame {
+ msec: 2752
+ hash: "53295720dbabe6fbfff56bea0e0ba7f1"
+ }
+ Frame {
+ msec: 2768
+ hash: "53295720dbabe6fbfff56bea0e0ba7f1"
+ }
+ Frame {
+ msec: 2784
+ hash: "53295720dbabe6fbfff56bea0e0ba7f1"
+ }
+ Frame {
+ msec: 2800
+ hash: "53295720dbabe6fbfff56bea0e0ba7f1"
+ }
+ Frame {
+ msec: 2816
+ hash: "53295720dbabe6fbfff56bea0e0ba7f1"
+ }
+ Frame {
+ msec: 2832
+ hash: "f44b88b80219497370b5d2ad380d03bf"
+ }
+ Frame {
+ msec: 2848
+ hash: "f44b88b80219497370b5d2ad380d03bf"
+ }
+ Frame {
+ msec: 2864
+ hash: "a093510751799f3466156f9775988044"
+ }
+ Frame {
+ msec: 2880
+ image: "elide2.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "a093510751799f3466156f9775988044"
+ }
+ Frame {
+ msec: 2912
+ hash: "6327bcbb2d78d3c33eb964643b0d09a5"
+ }
+ Frame {
+ msec: 2928
+ hash: "6327bcbb2d78d3c33eb964643b0d09a5"
+ }
+ Frame {
+ msec: 2944
+ hash: "6327bcbb2d78d3c33eb964643b0d09a5"
+ }
+ Frame {
+ msec: 2960
+ hash: "6327bcbb2d78d3c33eb964643b0d09a5"
+ }
+ Frame {
+ msec: 2976
+ hash: "6327bcbb2d78d3c33eb964643b0d09a5"
+ }
+ Frame {
+ msec: 2992
+ hash: "d7da3826914ad1d2696803b659992e73"
+ }
+ Frame {
+ msec: 3008
+ hash: "d7da3826914ad1d2696803b659992e73"
+ }
+ Frame {
+ msec: 3024
+ hash: "d7da3826914ad1d2696803b659992e73"
+ }
+ Frame {
+ msec: 3040
+ hash: "d7da3826914ad1d2696803b659992e73"
+ }
+ Frame {
+ msec: 3056
+ hash: "d7da3826914ad1d2696803b659992e73"
+ }
+ Frame {
+ msec: 3072
+ hash: "ad40dc153a57c35ea62d9d044f08c9ac"
+ }
+ Frame {
+ msec: 3088
+ hash: "ad40dc153a57c35ea62d9d044f08c9ac"
+ }
+ Frame {
+ msec: 3104
+ hash: "ad40dc153a57c35ea62d9d044f08c9ac"
+ }
+ Frame {
+ msec: 3120
+ hash: "df90afe882b18f3fd7b12e52ff36e66f"
+ }
+ Frame {
+ msec: 3136
+ hash: "df90afe882b18f3fd7b12e52ff36e66f"
+ }
+ Frame {
+ msec: 3152
+ hash: "5b84785ffe15c15c3b94c845db7a4a44"
+ }
+ Frame {
+ msec: 3168
+ hash: "5b84785ffe15c15c3b94c845db7a4a44"
+ }
+ Frame {
+ msec: 3184
+ hash: "5b84785ffe15c15c3b94c845db7a4a44"
+ }
+ Frame {
+ msec: 3200
+ hash: "f5ca71af8d9fa1809ab88b60f9170bb5"
+ }
+ Frame {
+ msec: 3216
+ hash: "f5ca71af8d9fa1809ab88b60f9170bb5"
+ }
+ Frame {
+ msec: 3232
+ hash: "f5ca71af8d9fa1809ab88b60f9170bb5"
+ }
+ Frame {
+ msec: 3248
+ hash: "f5ca71af8d9fa1809ab88b60f9170bb5"
+ }
+ Frame {
+ msec: 3264
+ hash: "f5ca71af8d9fa1809ab88b60f9170bb5"
+ }
+ Frame {
+ msec: 3280
+ hash: "39f1b201715413f13a60f449eef29706"
+ }
+ Frame {
+ msec: 3296
+ hash: "39f1b201715413f13a60f449eef29706"
+ }
+ Frame {
+ msec: 3312
+ hash: "39f1b201715413f13a60f449eef29706"
+ }
+ Frame {
+ msec: 3328
+ hash: "39f1b201715413f13a60f449eef29706"
+ }
+ Frame {
+ msec: 3344
+ hash: "39f1b201715413f13a60f449eef29706"
+ }
+ Frame {
+ msec: 3360
+ hash: "4baf5c1227de45f9e620fe6eb0590014"
+ }
+ Frame {
+ msec: 3376
+ hash: "4baf5c1227de45f9e620fe6eb0590014"
+ }
+ Frame {
+ msec: 3392
+ hash: "4baf5c1227de45f9e620fe6eb0590014"
+ }
+ Frame {
+ msec: 3408
+ hash: "e1ce9c06e59fb6348fff3ce650c7943e"
+ }
+ Frame {
+ msec: 3424
+ hash: "e1ce9c06e59fb6348fff3ce650c7943e"
+ }
+ Frame {
+ msec: 3440
+ hash: "ad812bdef31b4f1f42c35f7d56b3af83"
+ }
+ Frame {
+ msec: 3456
+ hash: "ad812bdef31b4f1f42c35f7d56b3af83"
+ }
+ Frame {
+ msec: 3472
+ hash: "ad812bdef31b4f1f42c35f7d56b3af83"
+ }
+ Frame {
+ msec: 3488
+ hash: "ad812bdef31b4f1f42c35f7d56b3af83"
+ }
+ Frame {
+ msec: 3504
+ hash: "ad812bdef31b4f1f42c35f7d56b3af83"
+ }
+ Frame {
+ msec: 3520
+ hash: "ad812bdef31b4f1f42c35f7d56b3af83"
+ }
+ Frame {
+ msec: 3536
+ hash: "c08c8bcfc8c23f5e0e89d7f632fde2ca"
+ }
+ Frame {
+ msec: 3552
+ hash: "c08c8bcfc8c23f5e0e89d7f632fde2ca"
+ }
+ Frame {
+ msec: 3568
+ hash: "c08c8bcfc8c23f5e0e89d7f632fde2ca"
+ }
+ Frame {
+ msec: 3584
+ hash: "c08c8bcfc8c23f5e0e89d7f632fde2ca"
+ }
+ Frame {
+ msec: 3600
+ hash: "c08c8bcfc8c23f5e0e89d7f632fde2ca"
+ }
+ Frame {
+ msec: 3616
+ hash: "b8853dc109d063d982952780aa80419a"
+ }
+ Frame {
+ msec: 3632
+ hash: "b8853dc109d063d982952780aa80419a"
+ }
+ Frame {
+ msec: 3648
+ hash: "b8853dc109d063d982952780aa80419a"
+ }
+ Frame {
+ msec: 3664
+ hash: "b8853dc109d063d982952780aa80419a"
+ }
+ Frame {
+ msec: 3680
+ hash: "b8853dc109d063d982952780aa80419a"
+ }
+ Frame {
+ msec: 3696
+ hash: "6bfd7cfd6369df1eb570fda103d9e009"
+ }
+ Frame {
+ msec: 3712
+ hash: "6bfd7cfd6369df1eb570fda103d9e009"
+ }
+ Frame {
+ msec: 3728
+ hash: "b6dba4a456cd8d1b62501039cb796625"
+ }
+ Frame {
+ msec: 3744
+ hash: "b6dba4a456cd8d1b62501039cb796625"
+ }
+ Frame {
+ msec: 3760
+ hash: "f43892fffe4a8ce005b60ec43ce0aa4a"
+ }
+ Frame {
+ msec: 3776
+ hash: "f43892fffe4a8ce005b60ec43ce0aa4a"
+ }
+ Frame {
+ msec: 3792
+ hash: "f43892fffe4a8ce005b60ec43ce0aa4a"
+ }
+ Frame {
+ msec: 3808
+ hash: "f43892fffe4a8ce005b60ec43ce0aa4a"
+ }
+ Frame {
+ msec: 3824
+ hash: "f43892fffe4a8ce005b60ec43ce0aa4a"
+ }
+ Frame {
+ msec: 3840
+ image: "elide2.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "d2e873e69aed3e0b6e53123cd63e386c"
+ }
+ Frame {
+ msec: 3872
+ hash: "d2e873e69aed3e0b6e53123cd63e386c"
+ }
+ Frame {
+ msec: 3888
+ hash: "baa8edfce77628c7a1ec83adce96e2c6"
+ }
+ Frame {
+ msec: 3904
+ hash: "baa8edfce77628c7a1ec83adce96e2c6"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/multilength.0.png b/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/multilength.0.png
new file mode 100644
index 0000000000..80549b4609
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/multilength.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/multilength.qml b/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/multilength.qml
new file mode 100644
index 0000000000..c2fd0d80df
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data-MAC/multilength.qml
@@ -0,0 +1,303 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "17f39c541a0b5bf958c3fdaa51b72fec"
+ }
+ Frame {
+ msec: 32
+ hash: "da61bb1afef532688045116bcce1da40"
+ }
+ Frame {
+ msec: 48
+ hash: "04ddcb158ce8ade4ea9ad16405c7d81a"
+ }
+ Frame {
+ msec: 64
+ hash: "7ca43ec7a6e630c9bc07478abf5c2686"
+ }
+ Frame {
+ msec: 80
+ hash: "ae2c4e73395cf4a5663110ba1b9996b2"
+ }
+ Frame {
+ msec: 96
+ hash: "5059426cced6ff6f92102100416b34d8"
+ }
+ Frame {
+ msec: 112
+ hash: "e816cb366ba9498d0ae194b789c25f12"
+ }
+ Frame {
+ msec: 128
+ hash: "fd8cd9b2916b7045086df92d19e8b436"
+ }
+ Frame {
+ msec: 144
+ hash: "965dfe4cad0a3d07c0b086d6351a43a1"
+ }
+ Frame {
+ msec: 160
+ hash: "56759a670c864d5f2ae392fa8545f3a4"
+ }
+ Frame {
+ msec: 176
+ hash: "8d3c2be4fcef526650cc84b5c2d29170"
+ }
+ Frame {
+ msec: 192
+ hash: "6d9f995bef186a69b259b8d18470f0e7"
+ }
+ Frame {
+ msec: 208
+ hash: "670c68a0943c5f037f8bf4c9ca0df501"
+ }
+ Frame {
+ msec: 224
+ hash: "6218cf02cb762aa6c33985fe1b2e47bb"
+ }
+ Frame {
+ msec: 240
+ hash: "6e3424f2b72d6582ceb5a6c1bfe3dba4"
+ }
+ Frame {
+ msec: 256
+ hash: "fb819344ab1d2966b043be790831e680"
+ }
+ Frame {
+ msec: 272
+ hash: "a729845b780cc708ddd578eab3bc0ab1"
+ }
+ Frame {
+ msec: 288
+ hash: "543f6566c4dfaecb70007848cc4f8525"
+ }
+ Frame {
+ msec: 304
+ hash: "5497699414bd8a428ead9703dc7273d5"
+ }
+ Frame {
+ msec: 320
+ hash: "e9230e525bb0ce33fe4bf3a2c948357d"
+ }
+ Frame {
+ msec: 336
+ hash: "ef6a6989f013d444547c0b98a65a34bf"
+ }
+ Frame {
+ msec: 352
+ hash: "ee89f5163fe269884d59acac7fc23336"
+ }
+ Frame {
+ msec: 368
+ hash: "0ffb11ceccdc607c1a072dde4aa40f93"
+ }
+ Frame {
+ msec: 384
+ hash: "97a51d7916e04815724506e289040e2a"
+ }
+ Frame {
+ msec: 400
+ hash: "a63d6d73827e1b40a7fec76e6555d7ab"
+ }
+ Frame {
+ msec: 416
+ hash: "d3eaf72442852317a48dc2b638ad48be"
+ }
+ Frame {
+ msec: 432
+ hash: "fa867a486d51089ddfeb60b9d44b329e"
+ }
+ Frame {
+ msec: 448
+ hash: "834ee944cfc63209bcba94153ccd2c4e"
+ }
+ Frame {
+ msec: 464
+ hash: "6d637d4763ae457233ab669f9f124bc1"
+ }
+ Frame {
+ msec: 480
+ hash: "66c60bd9de1870f46b726c404ab924d5"
+ }
+ Frame {
+ msec: 496
+ hash: "088499b53390e3a2c3ca7f42cac101a4"
+ }
+ Frame {
+ msec: 512
+ hash: "19d41f7696c86120460c4db7a0f9be1a"
+ }
+ Frame {
+ msec: 528
+ hash: "cd3ae14964e174db94e3e6c8609f366a"
+ }
+ Frame {
+ msec: 544
+ hash: "0c2172e091c2fb42d7c016779fa543d7"
+ }
+ Frame {
+ msec: 560
+ hash: "7534175e24b2cbab08518de8fc691003"
+ }
+ Frame {
+ msec: 576
+ hash: "a9ef64d20b4f93e60f25753e2d7dd2e0"
+ }
+ Frame {
+ msec: 592
+ hash: "d8e62a9fec27bfc892b0f3034bc73c3f"
+ }
+ Frame {
+ msec: 608
+ hash: "f8eee41f72e17693074a2ac250bb850e"
+ }
+ Frame {
+ msec: 624
+ hash: "3a08b62a8aa1f410415afbd7b8ee8728"
+ }
+ Frame {
+ msec: 640
+ hash: "0c4fba2bc8b7e440736f4a23d048c23c"
+ }
+ Frame {
+ msec: 656
+ hash: "521264dbeec0fbe3a467739f0c3f7b85"
+ }
+ Frame {
+ msec: 672
+ hash: "2c455560a624acfb7f316eae8926d765"
+ }
+ Frame {
+ msec: 688
+ hash: "c9fa632a0998cfae39d434b623b3060d"
+ }
+ Frame {
+ msec: 704
+ hash: "506ea16572fa0ee72cddcedfe5b4b9ea"
+ }
+ Frame {
+ msec: 720
+ hash: "83ae06a3ad24d2a6d49c71df2a287716"
+ }
+ Frame {
+ msec: 736
+ hash: "d4b11b45b4f97de0c0b878b97b804f09"
+ }
+ Frame {
+ msec: 752
+ hash: "868aac6c273b7cc90c31c14298ab9a3b"
+ }
+ Frame {
+ msec: 768
+ hash: "03d4222586194bb6513305d1837d3467"
+ }
+ Frame {
+ msec: 784
+ hash: "21e6cd89f06077bd5d346c7ccb8fa1e9"
+ }
+ Frame {
+ msec: 800
+ hash: "326092c4c29217f5afb5730ab3984353"
+ }
+ Frame {
+ msec: 816
+ hash: "4963d64093e65fe1973ffab5b7a15abc"
+ }
+ Frame {
+ msec: 832
+ hash: "3125e6e553bbf3f2fcf8fbf797a0c1f8"
+ }
+ Frame {
+ msec: 848
+ hash: "879b24c994d4a9854d08bda2bbf2ceda"
+ }
+ Frame {
+ msec: 864
+ hash: "03c4320dc2aa030c341d54899869b561"
+ }
+ Frame {
+ msec: 880
+ hash: "ae0e91975aecc6a416b4a23504fced32"
+ }
+ Frame {
+ msec: 896
+ hash: "e4150bdf0d4bab9bddc4605a9bde5b69"
+ }
+ Frame {
+ msec: 912
+ hash: "dc961cb82a0e58603b3914f16f0a3f52"
+ }
+ Frame {
+ msec: 928
+ hash: "5339507c303e42ecab853ca1688881f3"
+ }
+ Frame {
+ msec: 944
+ hash: "a7c616c57f98eb03c1501747ea1a8b45"
+ }
+ Frame {
+ msec: 960
+ image: "multilength.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "773ad6bc56f80bd5f6ce346ae0bc79c9"
+ }
+ Frame {
+ msec: 992
+ hash: "18b9ebfb9e5beac337143cc625fdfad7"
+ }
+ Frame {
+ msec: 1008
+ hash: "efb9f12a98ea137e2b50d344c21c4a89"
+ }
+ Frame {
+ msec: 1024
+ hash: "5b880958b3d20c09a10189cfc5f7b671"
+ }
+ Frame {
+ msec: 1040
+ hash: "edf2d8c174ac6e2e3a887336dc04df8c"
+ }
+ Frame {
+ msec: 1056
+ hash: "ad04b9e0e88695a13032abae8fef6f32"
+ }
+ Frame {
+ msec: 1072
+ hash: "e4ad91c9da3e954cac33ce98832fee1c"
+ }
+ Frame {
+ msec: 1088
+ hash: "a853212cf0ddc17cb0eb9be7f2ac5475"
+ }
+ Frame {
+ msec: 1104
+ hash: "a03f7ac2553fe114c4591ed98dab3ceb"
+ }
+ Frame {
+ msec: 1120
+ hash: "5de7491803582e0d13d2ff3e2eb3df82"
+ }
+ Frame {
+ msec: 1136
+ hash: "0685263ac468ce39b468d37a20f7e5f8"
+ }
+ Frame {
+ msec: 1152
+ hash: "14d4ab3f40dc6a0835c56c0f84256182"
+ }
+ Frame {
+ msec: 1168
+ hash: "6a8c61c31c3d00592863ad356c45b354"
+ }
+ Frame {
+ msec: 1184
+ hash: "08b3e3388469b1a62d3fc7f7a94f85a2"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data-X11/elide.0.png b/tests/auto/declarative/visual/qdeclarativetext/elide/data-X11/elide.0.png
new file mode 100644
index 0000000000..5631a46d3a
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data-X11/elide.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data-X11/elide.qml b/tests/auto/declarative/visual/qdeclarativetext/elide/data-X11/elide.qml
new file mode 100644
index 0000000000..cfd832e481
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data-X11/elide.qml
@@ -0,0 +1,279 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 32
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 48
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 64
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 80
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 96
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 112
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 128
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 144
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 160
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 176
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 192
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 208
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 224
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 240
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 256
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 272
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 288
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 304
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 320
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 336
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 352
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 368
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 384
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 400
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 416
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 432
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 448
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 464
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 480
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 496
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 512
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 528
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 544
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 560
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 576
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 592
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 608
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 624
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 640
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 656
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 672
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 688
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 704
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 720
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 736
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 752
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 768
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 784
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 800
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 816
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 832
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 848
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 864
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 880
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 896
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 912
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 928
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 944
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 960
+ image: "elide.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 992
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 1008
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 1024
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 1040
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+ Frame {
+ msec: 1056
+ hash: "48e2da07fd229d9db6afc0eda494cd11"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data-X11/multilength.0.png b/tests/auto/declarative/visual/qdeclarativetext/elide/data-X11/multilength.0.png
new file mode 100644
index 0000000000..6e2b625daa
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data-X11/multilength.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data-X11/multilength.qml b/tests/auto/declarative/visual/qdeclarativetext/elide/data-X11/multilength.qml
new file mode 100644
index 0000000000..0c061962f9
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data-X11/multilength.qml
@@ -0,0 +1,303 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "873e914454b7a040b05649ebd1a2f8c5"
+ }
+ Frame {
+ msec: 32
+ hash: "7682a4f1e361ca252da9713734a598e8"
+ }
+ Frame {
+ msec: 48
+ hash: "fa8884b550c8df872f96b61557163bcf"
+ }
+ Frame {
+ msec: 64
+ hash: "b84ecf9e38f126c3e32defee831d9462"
+ }
+ Frame {
+ msec: 80
+ hash: "21cc08f22d1f1fcb38b27a3a4259debe"
+ }
+ Frame {
+ msec: 96
+ hash: "93bdfeab813e25e85917f49c0d5f1314"
+ }
+ Frame {
+ msec: 112
+ hash: "5f03c252602e60fe19879945fa77c203"
+ }
+ Frame {
+ msec: 128
+ hash: "f0b2079f6c512bf80989ebfdbec4cfd8"
+ }
+ Frame {
+ msec: 144
+ hash: "9e7bb12d5b7605fc1d78ed9b2a549527"
+ }
+ Frame {
+ msec: 160
+ hash: "242bbbe6da87708c92fd47607ecb789d"
+ }
+ Frame {
+ msec: 176
+ hash: "f1db5c3a230b4d3e2e1dfefe6bf032a1"
+ }
+ Frame {
+ msec: 192
+ hash: "a416e820efd8e173cc52372218513e33"
+ }
+ Frame {
+ msec: 208
+ hash: "df711ab70c6087f8138fded16167f069"
+ }
+ Frame {
+ msec: 224
+ hash: "fb28eb2eeccfab28299640ef996c1115"
+ }
+ Frame {
+ msec: 240
+ hash: "c72c6d79a50dd7147f6b33784880eb36"
+ }
+ Frame {
+ msec: 256
+ hash: "4421027e65e95f98499ca53c57220ede"
+ }
+ Frame {
+ msec: 272
+ hash: "b7fbfb90d8cc167809e8e846d9021b4b"
+ }
+ Frame {
+ msec: 288
+ hash: "004614b1bf18e9aa78e78509c4f289aa"
+ }
+ Frame {
+ msec: 304
+ hash: "1792bbd8b69bae1d92fed2a6bcfe0187"
+ }
+ Frame {
+ msec: 320
+ hash: "957a8b95d6e85885d854b8eb1db10b04"
+ }
+ Frame {
+ msec: 336
+ hash: "d00c3e4d6d8e8d04b949840c28d73a33"
+ }
+ Frame {
+ msec: 352
+ hash: "2b79feaa62d773d92d8a684685b2004c"
+ }
+ Frame {
+ msec: 368
+ hash: "ef2f11b187028de0c56b23db3168fbc8"
+ }
+ Frame {
+ msec: 384
+ hash: "3a489a96aaeca80355313198b935691d"
+ }
+ Frame {
+ msec: 400
+ hash: "389f1798f900795a8686c38ace755974"
+ }
+ Frame {
+ msec: 416
+ hash: "34fc20be52fe3843420819b9adb90b22"
+ }
+ Frame {
+ msec: 432
+ hash: "fa715c5b6640eafe204bf3b8095c74b9"
+ }
+ Frame {
+ msec: 448
+ hash: "8e8315edcf23167ac58228b8c28b43e6"
+ }
+ Frame {
+ msec: 464
+ hash: "c18e82038f57dd869112cb1be14e4cfe"
+ }
+ Frame {
+ msec: 480
+ hash: "3f07e95b09e39f2e5d93216850f4a4d9"
+ }
+ Frame {
+ msec: 496
+ hash: "20f0e6eaeac04d6f93565adfab485218"
+ }
+ Frame {
+ msec: 512
+ hash: "e3f66d1dfe88dd868a54a8493828ef5f"
+ }
+ Frame {
+ msec: 528
+ hash: "d39d34f63e1b29c187249cb388552b38"
+ }
+ Frame {
+ msec: 544
+ hash: "5d2e8df5003732f3b53fff4aaddea06c"
+ }
+ Frame {
+ msec: 560
+ hash: "35c3aa2dae481a8f817d849b3f3151f2"
+ }
+ Frame {
+ msec: 576
+ hash: "966b78018879224948b4d85fe73d7985"
+ }
+ Frame {
+ msec: 592
+ hash: "0db067bf9debc3f36dd539cf83652fb8"
+ }
+ Frame {
+ msec: 608
+ hash: "ea1c3249ffd2439533907ceaeaafbc56"
+ }
+ Frame {
+ msec: 624
+ hash: "da85c0e14b95ca9a729984b67ebd52ad"
+ }
+ Frame {
+ msec: 640
+ hash: "5c26ae844ac52dbe131fed0638787aac"
+ }
+ Frame {
+ msec: 656
+ hash: "4b09c23ad624db80afcb2a6c1d5ddb96"
+ }
+ Frame {
+ msec: 672
+ hash: "9995deb3d22b418a19093b4b988b3fcc"
+ }
+ Frame {
+ msec: 688
+ hash: "77e53358f2d4392d0ba988187e7e272c"
+ }
+ Frame {
+ msec: 704
+ hash: "3fbbb73e790cf4a0583531fe1580f761"
+ }
+ Frame {
+ msec: 720
+ hash: "9d562e141095a258ee61463e644d9889"
+ }
+ Frame {
+ msec: 736
+ hash: "d05633ca49f96bf327bed5c9c0f6ac98"
+ }
+ Frame {
+ msec: 752
+ hash: "34c38e40e831dbede8fa83de31ed76aa"
+ }
+ Frame {
+ msec: 768
+ hash: "288e52c8be54f4914f687cef4ce1f24a"
+ }
+ Frame {
+ msec: 784
+ hash: "0b8b744aaf67e8b17fa459bb0ffb6db5"
+ }
+ Frame {
+ msec: 800
+ hash: "273dbe3e8c21bfeafa516d07778928c8"
+ }
+ Frame {
+ msec: 816
+ hash: "ef94ee1885287c72fa78038547d98b96"
+ }
+ Frame {
+ msec: 832
+ hash: "965e6387672319ac04fdc42768e581f1"
+ }
+ Frame {
+ msec: 848
+ hash: "95553d8aaece94c7017e57b03cd46c9a"
+ }
+ Frame {
+ msec: 864
+ hash: "bdaf35b920e5b08b8639d452afd2d51e"
+ }
+ Frame {
+ msec: 880
+ hash: "0ed16f00e89327dc8679bec42179c4ce"
+ }
+ Frame {
+ msec: 896
+ hash: "8c93e0ac399e09e98e34b90654e0e42a"
+ }
+ Frame {
+ msec: 912
+ hash: "93798fbb33adb6c813018757cfa34017"
+ }
+ Frame {
+ msec: 928
+ hash: "db4d7581e9a1f082a2c29ef7482a7893"
+ }
+ Frame {
+ msec: 944
+ hash: "67e074c1e083334de84a3549f4ee9ca4"
+ }
+ Frame {
+ msec: 960
+ image: "multilength.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "b1122c815a755c9988bcf03a3f7d7d6d"
+ }
+ Frame {
+ msec: 992
+ hash: "31148bae6653bdc3f1827d06de845663"
+ }
+ Frame {
+ msec: 1008
+ hash: "812428a944086ca46e102891964dac69"
+ }
+ Frame {
+ msec: 1024
+ hash: "ee7bb66bd7e8623325200ac994f8b41a"
+ }
+ Frame {
+ msec: 1040
+ hash: "6bd21a98e5c373a2c78334a0255e7750"
+ }
+ Frame {
+ msec: 1056
+ hash: "2e8e1eea14068b0e82464ed52ec1ab7a"
+ }
+ Frame {
+ msec: 1072
+ hash: "6dca5756e20eeb778e31d7b602ce77d7"
+ }
+ Frame {
+ msec: 1088
+ hash: "3cbb6700b9e30864a2b1e3d4d71d2a78"
+ }
+ Frame {
+ msec: 1104
+ hash: "c4d0230d2c4f73191a514e5df4c0b083"
+ }
+ Frame {
+ msec: 1120
+ hash: "a33df967fe43151dfc503d2ac78f8ca8"
+ }
+ Frame {
+ msec: 1136
+ hash: "0c7ff101efe60b600cacaf8d04d79053"
+ }
+ Frame {
+ msec: 1152
+ hash: "d246cfb75d89b9666877860aaf45ba60"
+ }
+ Frame {
+ msec: 1168
+ hash: "1130998aa2618a29ec6bc4b9219eedfa"
+ }
+ Frame {
+ msec: 1184
+ hash: "741dd83003633bbf8d28c2d4ddd8a2d0"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide.0.png b/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide.0.png
new file mode 100644
index 0000000000..1a8c89b870
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide.qml b/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide.qml
new file mode 100644
index 0000000000..59f17f7578
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide.qml
@@ -0,0 +1,279 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 32
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 48
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 64
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 80
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 96
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 112
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 128
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 144
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 160
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 176
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 192
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 208
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 224
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 240
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 256
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 272
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 288
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 304
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 320
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 336
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 352
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 368
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 384
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 400
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 416
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 432
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 448
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 464
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 480
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 496
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 512
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 528
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 544
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 560
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 576
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 592
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 608
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 624
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 640
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 656
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 672
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 688
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 704
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 720
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 736
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 752
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 768
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 784
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 800
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 816
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 832
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 848
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 864
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 880
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 896
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 912
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 928
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 944
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 960
+ image: "elide.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 992
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 1008
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 1024
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 1040
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+ Frame {
+ msec: 1056
+ hash: "c80d2bcd4be99c73e6c628870206ce8c"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.0.png b/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.0.png
new file mode 100644
index 0000000000..3dfade5c72
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.1.png b/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.1.png
new file mode 100644
index 0000000000..1ee2076add
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.2.png b/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.2.png
new file mode 100644
index 0000000000..ae680bebbe
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.3.png b/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.3.png
new file mode 100644
index 0000000000..c2859bef87
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.qml b/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.qml
new file mode 100644
index 0000000000..c592f182d6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/data/elide2.qml
@@ -0,0 +1,991 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 32
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 48
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 64
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 80
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 96
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 112
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 128
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 144
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 160
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 176
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 192
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 208
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 224
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 240
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 256
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 272
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 288
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 304
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 320
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 336
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 352
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 368
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 384
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 400
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 416
+ hash: "086a46352aa1221b5e57f5624b0c256b"
+ }
+ Frame {
+ msec: 432
+ hash: "fc3a7e898d6bfa2af4d774b20609f967"
+ }
+ Frame {
+ msec: 448
+ hash: "fc3a7e898d6bfa2af4d774b20609f967"
+ }
+ Frame {
+ msec: 464
+ hash: "fc3a7e898d6bfa2af4d774b20609f967"
+ }
+ Frame {
+ msec: 480
+ hash: "3bcaa6426796bc9097e0aeba90dd5e39"
+ }
+ Frame {
+ msec: 496
+ hash: "3bcaa6426796bc9097e0aeba90dd5e39"
+ }
+ Frame {
+ msec: 512
+ hash: "3bcaa6426796bc9097e0aeba90dd5e39"
+ }
+ Frame {
+ msec: 528
+ hash: "3bcaa6426796bc9097e0aeba90dd5e39"
+ }
+ Frame {
+ msec: 544
+ hash: "3bcaa6426796bc9097e0aeba90dd5e39"
+ }
+ Frame {
+ msec: 560
+ hash: "3bcaa6426796bc9097e0aeba90dd5e39"
+ }
+ Frame {
+ msec: 576
+ hash: "4daa612cd7e7ee455ff1a93329202865"
+ }
+ Frame {
+ msec: 592
+ hash: "4daa612cd7e7ee455ff1a93329202865"
+ }
+ Frame {
+ msec: 608
+ hash: "4daa612cd7e7ee455ff1a93329202865"
+ }
+ Frame {
+ msec: 624
+ hash: "4daa612cd7e7ee455ff1a93329202865"
+ }
+ Frame {
+ msec: 640
+ hash: "4daa612cd7e7ee455ff1a93329202865"
+ }
+ Frame {
+ msec: 656
+ hash: "3f362ad550db910f1d9f261557c65913"
+ }
+ Frame {
+ msec: 672
+ hash: "3f362ad550db910f1d9f261557c65913"
+ }
+ Frame {
+ msec: 688
+ hash: "f159011c2b85fe212a32a7b5d2a57016"
+ }
+ Frame {
+ msec: 704
+ hash: "f159011c2b85fe212a32a7b5d2a57016"
+ }
+ Frame {
+ msec: 720
+ hash: "f159011c2b85fe212a32a7b5d2a57016"
+ }
+ Frame {
+ msec: 736
+ hash: "f159011c2b85fe212a32a7b5d2a57016"
+ }
+ Frame {
+ msec: 752
+ hash: "f159011c2b85fe212a32a7b5d2a57016"
+ }
+ Frame {
+ msec: 768
+ hash: "f159011c2b85fe212a32a7b5d2a57016"
+ }
+ Frame {
+ msec: 784
+ hash: "a892c67199c23e5d9012a6a24cb45d16"
+ }
+ Frame {
+ msec: 800
+ hash: "a892c67199c23e5d9012a6a24cb45d16"
+ }
+ Frame {
+ msec: 816
+ hash: "a892c67199c23e5d9012a6a24cb45d16"
+ }
+ Frame {
+ msec: 832
+ hash: "532e01ed6ede95eca68e641e2edb7f1c"
+ }
+ Frame {
+ msec: 848
+ hash: "532e01ed6ede95eca68e641e2edb7f1c"
+ }
+ Frame {
+ msec: 864
+ hash: "532e01ed6ede95eca68e641e2edb7f1c"
+ }
+ Frame {
+ msec: 880
+ hash: "532e01ed6ede95eca68e641e2edb7f1c"
+ }
+ Frame {
+ msec: 896
+ hash: "532e01ed6ede95eca68e641e2edb7f1c"
+ }
+ Frame {
+ msec: 912
+ hash: "a7dc1d7dde956d62834de0968261386f"
+ }
+ Frame {
+ msec: 928
+ hash: "a7dc1d7dde956d62834de0968261386f"
+ }
+ Frame {
+ msec: 944
+ hash: "a7dc1d7dde956d62834de0968261386f"
+ }
+ Frame {
+ msec: 960
+ image: "elide2.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "a7dc1d7dde956d62834de0968261386f"
+ }
+ Frame {
+ msec: 992
+ hash: "a590e1358fac567dda9fdfc6bfe4ab89"
+ }
+ Frame {
+ msec: 1008
+ hash: "a590e1358fac567dda9fdfc6bfe4ab89"
+ }
+ Frame {
+ msec: 1024
+ hash: "778d34ca89b5db88fe26619576e9d337"
+ }
+ Frame {
+ msec: 1040
+ hash: "778d34ca89b5db88fe26619576e9d337"
+ }
+ Frame {
+ msec: 1056
+ hash: "778d34ca89b5db88fe26619576e9d337"
+ }
+ Frame {
+ msec: 1072
+ hash: "778d34ca89b5db88fe26619576e9d337"
+ }
+ Frame {
+ msec: 1088
+ hash: "778d34ca89b5db88fe26619576e9d337"
+ }
+ Frame {
+ msec: 1104
+ hash: "9424caee019aa9bccd4156b0b9ca2723"
+ }
+ Frame {
+ msec: 1120
+ hash: "9424caee019aa9bccd4156b0b9ca2723"
+ }
+ Frame {
+ msec: 1136
+ hash: "9424caee019aa9bccd4156b0b9ca2723"
+ }
+ Frame {
+ msec: 1152
+ hash: "000061a140ab71a44c0480a92ad3bc70"
+ }
+ Frame {
+ msec: 1168
+ hash: "000061a140ab71a44c0480a92ad3bc70"
+ }
+ Frame {
+ msec: 1184
+ hash: "000061a140ab71a44c0480a92ad3bc70"
+ }
+ Frame {
+ msec: 1200
+ hash: "5dec9638853165428cd15ae02e1d03ce"
+ }
+ Frame {
+ msec: 1216
+ hash: "5dec9638853165428cd15ae02e1d03ce"
+ }
+ Frame {
+ msec: 1232
+ hash: "5dec9638853165428cd15ae02e1d03ce"
+ }
+ Frame {
+ msec: 1248
+ hash: "ecb69bdbd13114715f738b1ace3ecf51"
+ }
+ Frame {
+ msec: 1264
+ hash: "ecb69bdbd13114715f738b1ace3ecf51"
+ }
+ Frame {
+ msec: 1280
+ hash: "ecb69bdbd13114715f738b1ace3ecf51"
+ }
+ Frame {
+ msec: 1296
+ hash: "ecb69bdbd13114715f738b1ace3ecf51"
+ }
+ Frame {
+ msec: 1312
+ hash: "ecb69bdbd13114715f738b1ace3ecf51"
+ }
+ Frame {
+ msec: 1328
+ hash: "923b4f4f4a3dbaefbf003859067b2ea9"
+ }
+ Frame {
+ msec: 1344
+ hash: "923b4f4f4a3dbaefbf003859067b2ea9"
+ }
+ Frame {
+ msec: 1360
+ hash: "923b4f4f4a3dbaefbf003859067b2ea9"
+ }
+ Frame {
+ msec: 1376
+ hash: "923b4f4f4a3dbaefbf003859067b2ea9"
+ }
+ Frame {
+ msec: 1392
+ hash: "923b4f4f4a3dbaefbf003859067b2ea9"
+ }
+ Frame {
+ msec: 1408
+ hash: "d4230a476237f9e13a132e775f1b960c"
+ }
+ Frame {
+ msec: 1424
+ hash: "d4230a476237f9e13a132e775f1b960c"
+ }
+ Frame {
+ msec: 1440
+ hash: "d4230a476237f9e13a132e775f1b960c"
+ }
+ Frame {
+ msec: 1456
+ hash: "d4230a476237f9e13a132e775f1b960c"
+ }
+ Frame {
+ msec: 1472
+ hash: "d4230a476237f9e13a132e775f1b960c"
+ }
+ Frame {
+ msec: 1488
+ hash: "504ad2ba8543f7ad6490bd45d86fbef9"
+ }
+ Frame {
+ msec: 1504
+ hash: "504ad2ba8543f7ad6490bd45d86fbef9"
+ }
+ Frame {
+ msec: 1520
+ hash: "504ad2ba8543f7ad6490bd45d86fbef9"
+ }
+ Frame {
+ msec: 1536
+ hash: "504ad2ba8543f7ad6490bd45d86fbef9"
+ }
+ Frame {
+ msec: 1552
+ hash: "504ad2ba8543f7ad6490bd45d86fbef9"
+ }
+ Frame {
+ msec: 1568
+ hash: "504ad2ba8543f7ad6490bd45d86fbef9"
+ }
+ Frame {
+ msec: 1584
+ hash: "dd412c6a2e5cb8890cb43142c84a5673"
+ }
+ Frame {
+ msec: 1600
+ hash: "dd412c6a2e5cb8890cb43142c84a5673"
+ }
+ Frame {
+ msec: 1616
+ hash: "dd412c6a2e5cb8890cb43142c84a5673"
+ }
+ Frame {
+ msec: 1632
+ hash: "38b1fa7bd4e2f13b05caa62903c56ab6"
+ }
+ Frame {
+ msec: 1648
+ hash: "38b1fa7bd4e2f13b05caa62903c56ab6"
+ }
+ Frame {
+ msec: 1664
+ hash: "38b1fa7bd4e2f13b05caa62903c56ab6"
+ }
+ Frame {
+ msec: 1680
+ hash: "38b1fa7bd4e2f13b05caa62903c56ab6"
+ }
+ Frame {
+ msec: 1696
+ hash: "ffb2cb01c868c1dfa6b5154c4e8a7fd8"
+ }
+ Frame {
+ msec: 1712
+ hash: "ffb2cb01c868c1dfa6b5154c4e8a7fd8"
+ }
+ Frame {
+ msec: 1728
+ hash: "ffb2cb01c868c1dfa6b5154c4e8a7fd8"
+ }
+ Frame {
+ msec: 1744
+ hash: "9effd5fc19246cfe3d2f5968c5caaa4e"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1760
+ hash: "9effd5fc19246cfe3d2f5968c5caaa4e"
+ }
+ Frame {
+ msec: 1776
+ hash: "9effd5fc19246cfe3d2f5968c5caaa4e"
+ }
+ Frame {
+ msec: 1792
+ hash: "9effd5fc19246cfe3d2f5968c5caaa4e"
+ }
+ Frame {
+ msec: 1808
+ hash: "4fa14ae57d170b16fd90d59d5ec83561"
+ }
+ Frame {
+ msec: 1824
+ hash: "4fa14ae57d170b16fd90d59d5ec83561"
+ }
+ Frame {
+ msec: 1840
+ hash: "4fa14ae57d170b16fd90d59d5ec83561"
+ }
+ Frame {
+ msec: 1856
+ hash: "4fa14ae57d170b16fd90d59d5ec83561"
+ }
+ Frame {
+ msec: 1872
+ hash: "4fa14ae57d170b16fd90d59d5ec83561"
+ }
+ Frame {
+ msec: 1888
+ hash: "976dd5bc154522438f92790f28639512"
+ }
+ Frame {
+ msec: 1904
+ hash: "976dd5bc154522438f92790f28639512"
+ }
+ Frame {
+ msec: 1920
+ image: "elide2.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "976dd5bc154522438f92790f28639512"
+ }
+ Frame {
+ msec: 1952
+ hash: "976dd5bc154522438f92790f28639512"
+ }
+ Frame {
+ msec: 1968
+ hash: "4ae1d6ddb9a78cc2f4e81b58fcca6a20"
+ }
+ Frame {
+ msec: 1984
+ hash: "4ae1d6ddb9a78cc2f4e81b58fcca6a20"
+ }
+ Frame {
+ msec: 2000
+ hash: "4ae1d6ddb9a78cc2f4e81b58fcca6a20"
+ }
+ Frame {
+ msec: 2016
+ hash: "4ae1d6ddb9a78cc2f4e81b58fcca6a20"
+ }
+ Frame {
+ msec: 2032
+ hash: "4ae1d6ddb9a78cc2f4e81b58fcca6a20"
+ }
+ Frame {
+ msec: 2048
+ hash: "84bdf634cfd4de588f2b0984aa3e97bd"
+ }
+ Frame {
+ msec: 2064
+ hash: "84bdf634cfd4de588f2b0984aa3e97bd"
+ }
+ Frame {
+ msec: 2080
+ hash: "84bdf634cfd4de588f2b0984aa3e97bd"
+ }
+ Frame {
+ msec: 2096
+ hash: "1a978ed6951afe40912efcfb54dcce65"
+ }
+ Frame {
+ msec: 2112
+ hash: "1a978ed6951afe40912efcfb54dcce65"
+ }
+ Frame {
+ msec: 2128
+ hash: "1a978ed6951afe40912efcfb54dcce65"
+ }
+ Frame {
+ msec: 2144
+ hash: "a57eea59fe6475164e24688489977869"
+ }
+ Frame {
+ msec: 2160
+ hash: "a57eea59fe6475164e24688489977869"
+ }
+ Frame {
+ msec: 2176
+ hash: "a57eea59fe6475164e24688489977869"
+ }
+ Frame {
+ msec: 2192
+ hash: "69ac1d93bd51f495783dbc6a0f7b27be"
+ }
+ Frame {
+ msec: 2208
+ hash: "69ac1d93bd51f495783dbc6a0f7b27be"
+ }
+ Frame {
+ msec: 2224
+ hash: "69ac1d93bd51f495783dbc6a0f7b27be"
+ }
+ Frame {
+ msec: 2240
+ hash: "69ac1d93bd51f495783dbc6a0f7b27be"
+ }
+ Frame {
+ msec: 2256
+ hash: "69ac1d93bd51f495783dbc6a0f7b27be"
+ }
+ Frame {
+ msec: 2272
+ hash: "04c62a4d01e9309eaeea87902013c8b9"
+ }
+ Frame {
+ msec: 2288
+ hash: "04c62a4d01e9309eaeea87902013c8b9"
+ }
+ Frame {
+ msec: 2304
+ hash: "fac2f5730a600d6b69280d5e6962c1d2"
+ }
+ Frame {
+ msec: 2320
+ hash: "fac2f5730a600d6b69280d5e6962c1d2"
+ }
+ Frame {
+ msec: 2336
+ hash: "fac2f5730a600d6b69280d5e6962c1d2"
+ }
+ Frame {
+ msec: 2352
+ hash: "fac2f5730a600d6b69280d5e6962c1d2"
+ }
+ Frame {
+ msec: 2368
+ hash: "fac2f5730a600d6b69280d5e6962c1d2"
+ }
+ Frame {
+ msec: 2384
+ hash: "13f7ce73c0a2f1c7958294e4fbf3d30d"
+ }
+ Frame {
+ msec: 2400
+ hash: "13f7ce73c0a2f1c7958294e4fbf3d30d"
+ }
+ Frame {
+ msec: 2416
+ hash: "13f7ce73c0a2f1c7958294e4fbf3d30d"
+ }
+ Frame {
+ msec: 2432
+ hash: "13f7ce73c0a2f1c7958294e4fbf3d30d"
+ }
+ Frame {
+ msec: 2448
+ hash: "13f7ce73c0a2f1c7958294e4fbf3d30d"
+ }
+ Frame {
+ msec: 2464
+ hash: "96a5678ee5bcbf28df6a2bf66b2b6189"
+ }
+ Frame {
+ msec: 2480
+ hash: "96a5678ee5bcbf28df6a2bf66b2b6189"
+ }
+ Frame {
+ msec: 2496
+ hash: "96a5678ee5bcbf28df6a2bf66b2b6189"
+ }
+ Frame {
+ msec: 2512
+ hash: "96a5678ee5bcbf28df6a2bf66b2b6189"
+ }
+ Frame {
+ msec: 2528
+ hash: "96a5678ee5bcbf28df6a2bf66b2b6189"
+ }
+ Frame {
+ msec: 2544
+ hash: "abb220abcd579abd988b6f9f7e0bc2b7"
+ }
+ Frame {
+ msec: 2560
+ hash: "abb220abcd579abd988b6f9f7e0bc2b7"
+ }
+ Frame {
+ msec: 2576
+ hash: "abb220abcd579abd988b6f9f7e0bc2b7"
+ }
+ Frame {
+ msec: 2592
+ hash: "abb220abcd579abd988b6f9f7e0bc2b7"
+ }
+ Frame {
+ msec: 2608
+ hash: "8a8585eb9a5cd1d6c38dc7076923e7f7"
+ }
+ Frame {
+ msec: 2624
+ hash: "8a8585eb9a5cd1d6c38dc7076923e7f7"
+ }
+ Frame {
+ msec: 2640
+ hash: "8a8585eb9a5cd1d6c38dc7076923e7f7"
+ }
+ Frame {
+ msec: 2656
+ hash: "c13ec1d294921e6a56f6ac4198e084eb"
+ }
+ Frame {
+ msec: 2672
+ hash: "c13ec1d294921e6a56f6ac4198e084eb"
+ }
+ Frame {
+ msec: 2688
+ hash: "c13ec1d294921e6a56f6ac4198e084eb"
+ }
+ Frame {
+ msec: 2704
+ hash: "c13ec1d294921e6a56f6ac4198e084eb"
+ }
+ Frame {
+ msec: 2720
+ hash: "53295720dbabe6fbfff56bea0e0ba7f1"
+ }
+ Frame {
+ msec: 2736
+ hash: "53295720dbabe6fbfff56bea0e0ba7f1"
+ }
+ Frame {
+ msec: 2752
+ hash: "53295720dbabe6fbfff56bea0e0ba7f1"
+ }
+ Frame {
+ msec: 2768
+ hash: "53295720dbabe6fbfff56bea0e0ba7f1"
+ }
+ Frame {
+ msec: 2784
+ hash: "53295720dbabe6fbfff56bea0e0ba7f1"
+ }
+ Frame {
+ msec: 2800
+ hash: "53295720dbabe6fbfff56bea0e0ba7f1"
+ }
+ Frame {
+ msec: 2816
+ hash: "53295720dbabe6fbfff56bea0e0ba7f1"
+ }
+ Frame {
+ msec: 2832
+ hash: "f44b88b80219497370b5d2ad380d03bf"
+ }
+ Frame {
+ msec: 2848
+ hash: "f44b88b80219497370b5d2ad380d03bf"
+ }
+ Frame {
+ msec: 2864
+ hash: "a093510751799f3466156f9775988044"
+ }
+ Frame {
+ msec: 2880
+ image: "elide2.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "a093510751799f3466156f9775988044"
+ }
+ Frame {
+ msec: 2912
+ hash: "6327bcbb2d78d3c33eb964643b0d09a5"
+ }
+ Frame {
+ msec: 2928
+ hash: "6327bcbb2d78d3c33eb964643b0d09a5"
+ }
+ Frame {
+ msec: 2944
+ hash: "6327bcbb2d78d3c33eb964643b0d09a5"
+ }
+ Frame {
+ msec: 2960
+ hash: "6327bcbb2d78d3c33eb964643b0d09a5"
+ }
+ Frame {
+ msec: 2976
+ hash: "6327bcbb2d78d3c33eb964643b0d09a5"
+ }
+ Frame {
+ msec: 2992
+ hash: "d7da3826914ad1d2696803b659992e73"
+ }
+ Frame {
+ msec: 3008
+ hash: "d7da3826914ad1d2696803b659992e73"
+ }
+ Frame {
+ msec: 3024
+ hash: "d7da3826914ad1d2696803b659992e73"
+ }
+ Frame {
+ msec: 3040
+ hash: "d7da3826914ad1d2696803b659992e73"
+ }
+ Frame {
+ msec: 3056
+ hash: "d7da3826914ad1d2696803b659992e73"
+ }
+ Frame {
+ msec: 3072
+ hash: "ad40dc153a57c35ea62d9d044f08c9ac"
+ }
+ Frame {
+ msec: 3088
+ hash: "ad40dc153a57c35ea62d9d044f08c9ac"
+ }
+ Frame {
+ msec: 3104
+ hash: "ad40dc153a57c35ea62d9d044f08c9ac"
+ }
+ Frame {
+ msec: 3120
+ hash: "df90afe882b18f3fd7b12e52ff36e66f"
+ }
+ Frame {
+ msec: 3136
+ hash: "df90afe882b18f3fd7b12e52ff36e66f"
+ }
+ Frame {
+ msec: 3152
+ hash: "5b84785ffe15c15c3b94c845db7a4a44"
+ }
+ Frame {
+ msec: 3168
+ hash: "5b84785ffe15c15c3b94c845db7a4a44"
+ }
+ Frame {
+ msec: 3184
+ hash: "5b84785ffe15c15c3b94c845db7a4a44"
+ }
+ Frame {
+ msec: 3200
+ hash: "f5ca71af8d9fa1809ab88b60f9170bb5"
+ }
+ Frame {
+ msec: 3216
+ hash: "f5ca71af8d9fa1809ab88b60f9170bb5"
+ }
+ Frame {
+ msec: 3232
+ hash: "f5ca71af8d9fa1809ab88b60f9170bb5"
+ }
+ Frame {
+ msec: 3248
+ hash: "f5ca71af8d9fa1809ab88b60f9170bb5"
+ }
+ Frame {
+ msec: 3264
+ hash: "f5ca71af8d9fa1809ab88b60f9170bb5"
+ }
+ Frame {
+ msec: 3280
+ hash: "39f1b201715413f13a60f449eef29706"
+ }
+ Frame {
+ msec: 3296
+ hash: "39f1b201715413f13a60f449eef29706"
+ }
+ Frame {
+ msec: 3312
+ hash: "39f1b201715413f13a60f449eef29706"
+ }
+ Frame {
+ msec: 3328
+ hash: "39f1b201715413f13a60f449eef29706"
+ }
+ Frame {
+ msec: 3344
+ hash: "39f1b201715413f13a60f449eef29706"
+ }
+ Frame {
+ msec: 3360
+ hash: "4baf5c1227de45f9e620fe6eb0590014"
+ }
+ Frame {
+ msec: 3376
+ hash: "4baf5c1227de45f9e620fe6eb0590014"
+ }
+ Frame {
+ msec: 3392
+ hash: "4baf5c1227de45f9e620fe6eb0590014"
+ }
+ Frame {
+ msec: 3408
+ hash: "e1ce9c06e59fb6348fff3ce650c7943e"
+ }
+ Frame {
+ msec: 3424
+ hash: "e1ce9c06e59fb6348fff3ce650c7943e"
+ }
+ Frame {
+ msec: 3440
+ hash: "ad812bdef31b4f1f42c35f7d56b3af83"
+ }
+ Frame {
+ msec: 3456
+ hash: "ad812bdef31b4f1f42c35f7d56b3af83"
+ }
+ Frame {
+ msec: 3472
+ hash: "ad812bdef31b4f1f42c35f7d56b3af83"
+ }
+ Frame {
+ msec: 3488
+ hash: "ad812bdef31b4f1f42c35f7d56b3af83"
+ }
+ Frame {
+ msec: 3504
+ hash: "ad812bdef31b4f1f42c35f7d56b3af83"
+ }
+ Frame {
+ msec: 3520
+ hash: "ad812bdef31b4f1f42c35f7d56b3af83"
+ }
+ Frame {
+ msec: 3536
+ hash: "c08c8bcfc8c23f5e0e89d7f632fde2ca"
+ }
+ Frame {
+ msec: 3552
+ hash: "c08c8bcfc8c23f5e0e89d7f632fde2ca"
+ }
+ Frame {
+ msec: 3568
+ hash: "c08c8bcfc8c23f5e0e89d7f632fde2ca"
+ }
+ Frame {
+ msec: 3584
+ hash: "c08c8bcfc8c23f5e0e89d7f632fde2ca"
+ }
+ Frame {
+ msec: 3600
+ hash: "c08c8bcfc8c23f5e0e89d7f632fde2ca"
+ }
+ Frame {
+ msec: 3616
+ hash: "b8853dc109d063d982952780aa80419a"
+ }
+ Frame {
+ msec: 3632
+ hash: "b8853dc109d063d982952780aa80419a"
+ }
+ Frame {
+ msec: 3648
+ hash: "b8853dc109d063d982952780aa80419a"
+ }
+ Frame {
+ msec: 3664
+ hash: "b8853dc109d063d982952780aa80419a"
+ }
+ Frame {
+ msec: 3680
+ hash: "b8853dc109d063d982952780aa80419a"
+ }
+ Frame {
+ msec: 3696
+ hash: "6bfd7cfd6369df1eb570fda103d9e009"
+ }
+ Frame {
+ msec: 3712
+ hash: "6bfd7cfd6369df1eb570fda103d9e009"
+ }
+ Frame {
+ msec: 3728
+ hash: "b6dba4a456cd8d1b62501039cb796625"
+ }
+ Frame {
+ msec: 3744
+ hash: "b6dba4a456cd8d1b62501039cb796625"
+ }
+ Frame {
+ msec: 3760
+ hash: "f43892fffe4a8ce005b60ec43ce0aa4a"
+ }
+ Frame {
+ msec: 3776
+ hash: "f43892fffe4a8ce005b60ec43ce0aa4a"
+ }
+ Frame {
+ msec: 3792
+ hash: "f43892fffe4a8ce005b60ec43ce0aa4a"
+ }
+ Frame {
+ msec: 3808
+ hash: "f43892fffe4a8ce005b60ec43ce0aa4a"
+ }
+ Frame {
+ msec: 3824
+ hash: "f43892fffe4a8ce005b60ec43ce0aa4a"
+ }
+ Frame {
+ msec: 3840
+ image: "elide2.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "d2e873e69aed3e0b6e53123cd63e386c"
+ }
+ Frame {
+ msec: 3872
+ hash: "d2e873e69aed3e0b6e53123cd63e386c"
+ }
+ Frame {
+ msec: 3888
+ hash: "baa8edfce77628c7a1ec83adce96e2c6"
+ }
+ Frame {
+ msec: 3904
+ hash: "baa8edfce77628c7a1ec83adce96e2c6"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/elide.qml b/tests/auto/declarative/visual/qdeclarativetext/elide/elide.qml
new file mode 100644
index 0000000000..fa6b5dacbf
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/elide.qml
@@ -0,0 +1,31 @@
+import Qt 4.6
+
+Rectangle {
+ width: childrenRect.width
+ height: childrenRect.height
+ Column {
+ width: 80
+ height: myText.height*4
+ Text {
+ elide: "ElideLeft"
+ text: "aaa bbb ccc ddd eee fff"
+ width: 80
+ id: myText
+ }
+ Text {
+ elide: "ElideMiddle"
+ text: "aaa bbb ccc ddd eee fff"
+ width: 80
+ }
+ Text {
+ elide: "ElideRight"
+ text: "aaa bbb ccc ddd eee fff"
+ width: 80
+ }
+ Text {
+ elide: "ElideNone"
+ text: "aaa bbb ccc ddd eee fff"
+ width: 80
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/elide2.qml b/tests/auto/declarative/visual/qdeclarativetext/elide/elide2.qml
new file mode 100644
index 0000000000..c163e051e1
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/elide2.qml
@@ -0,0 +1,12 @@
+import Qt 4.6
+
+Rectangle {
+ width: 500
+ height: 100
+
+ Text {
+ width: NumberAnimation { from: 500; to: 0; repeat: true; duration: 5000 }
+ elide: Text.ElideRight
+ text: 'Here is some very long text that we should truncate when sizing window'
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/multilength.qml b/tests/auto/declarative/visual/qdeclarativetext/elide/multilength.qml
new file mode 100644
index 0000000000..ca41eab2a5
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/multilength.qml
@@ -0,0 +1,19 @@
+import Qt 4.6
+
+Rectangle {
+ width: 500
+ height: 50
+ color: "lightBlue"
+ Rectangle {
+ width: myText.width
+ height: myText.height
+ color: "white"
+ anchors.centerIn: parent
+ Text {
+ id: myText
+ width: NumberAnimation { from: 500; to: 0; repeat: true; duration: 1000 }
+ elide: "ElideRight"
+ text: "Brevity is the soul of wit, and tediousness the limbs and outward flourishes.\x9CBrevity is a great charm of eloquence.\x9CBe concise!\x9CSHHHHHHHHHHHHHHHHHHHHHHHHHHHH"
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/font/data-MAC/plaintext.0.png b/tests/auto/declarative/visual/qdeclarativetext/font/data-MAC/plaintext.0.png
new file mode 100644
index 0000000000..67b497f651
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/font/data-MAC/plaintext.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetext/font/data-MAC/plaintext.qml b/tests/auto/declarative/visual/qdeclarativetext/font/data-MAC/plaintext.qml
new file mode 100644
index 0000000000..ab17eb1c20
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/font/data-MAC/plaintext.qml
@@ -0,0 +1,351 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 32
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 48
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 64
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 80
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 96
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 112
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 128
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 144
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 160
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 176
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 192
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 208
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 224
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 240
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 256
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 272
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 288
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 304
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 320
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 336
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 352
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 368
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 384
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 400
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 416
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 432
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 448
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 464
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 480
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 496
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 512
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 528
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 544
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 560
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 576
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 592
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 608
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 624
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 640
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 656
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 672
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 688
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 704
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 720
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 736
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 752
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 768
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 784
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 800
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 816
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 832
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 848
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 864
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 880
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 896
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 912
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 928
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 944
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 960
+ image: "plaintext.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 992
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1008
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1024
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1040
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1056
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1072
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1088
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1104
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1120
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1136
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1152
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1168
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1184
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1200
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1216
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1232
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1248
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1264
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1280
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1296
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1312
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1328
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+ Frame {
+ msec: 1344
+ hash: "cbf65bcb64a4781b79132b87f98d5fc7"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/font/data-MAC/richtext.0.png b/tests/auto/declarative/visual/qdeclarativetext/font/data-MAC/richtext.0.png
new file mode 100644
index 0000000000..63799421c3
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/font/data-MAC/richtext.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetext/font/data-MAC/richtext.qml b/tests/auto/declarative/visual/qdeclarativetext/font/data-MAC/richtext.qml
new file mode 100644
index 0000000000..72499b93fd
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/font/data-MAC/richtext.qml
@@ -0,0 +1,359 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 32
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 48
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 64
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 80
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 96
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 112
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 128
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 144
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 160
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 176
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 192
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 208
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 224
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 240
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 256
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 272
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 288
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 304
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 320
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 336
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 352
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 368
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 384
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 400
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 416
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 432
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 448
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 464
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 480
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 496
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 512
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 528
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 544
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 560
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 576
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 592
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 608
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 624
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 640
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 656
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 672
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 688
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 704
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 720
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 736
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 752
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 768
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 784
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 800
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 816
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 832
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 848
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 864
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 880
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 896
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 912
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 928
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 944
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 960
+ image: "richtext.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 992
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1008
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1024
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1040
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1056
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1072
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1088
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1104
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1120
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1136
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1152
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1168
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1184
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1200
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1216
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1232
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1248
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1264
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1280
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1296
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1312
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1328
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1344
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1360
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+ Frame {
+ msec: 1376
+ hash: "b902ff73e7c943bb09b5d2ae6c7a760e"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/font/data/plaintext.0.png b/tests/auto/declarative/visual/qdeclarativetext/font/data/plaintext.0.png
new file mode 100644
index 0000000000..50d56dc814
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/font/data/plaintext.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetext/font/data/plaintext.qml b/tests/auto/declarative/visual/qdeclarativetext/font/data/plaintext.qml
new file mode 100644
index 0000000000..f4cbcbd040
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/font/data/plaintext.qml
@@ -0,0 +1,351 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 32
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 48
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 64
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 80
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 96
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 112
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 128
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 144
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 160
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 176
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 192
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 208
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 224
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 240
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 256
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 272
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 288
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 304
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 320
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 336
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 352
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 368
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 384
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 400
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 416
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 432
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 448
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 464
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 480
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 496
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 512
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 528
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 544
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 560
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 576
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 592
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 608
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 624
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 640
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 656
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 672
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 688
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 704
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 720
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 736
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 752
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 768
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 784
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 800
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 816
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 832
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 848
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 864
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 880
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 896
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 912
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 928
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 944
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 960
+ image: "plaintext.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 992
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1008
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1024
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1040
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1056
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1072
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1088
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1104
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1120
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1136
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1152
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1168
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1184
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1200
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1216
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1232
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1248
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1264
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1280
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1296
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1312
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1328
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+ Frame {
+ msec: 1344
+ hash: "d553014bc56a46787e30459b0f44f57a"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/font/data/richtext.0.png b/tests/auto/declarative/visual/qdeclarativetext/font/data/richtext.0.png
new file mode 100644
index 0000000000..2910670adb
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/font/data/richtext.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetext/font/data/richtext.qml b/tests/auto/declarative/visual/qdeclarativetext/font/data/richtext.qml
new file mode 100644
index 0000000000..9f396c2e99
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/font/data/richtext.qml
@@ -0,0 +1,359 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 32
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 48
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 64
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 80
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 96
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 112
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 128
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 144
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 160
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 176
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 192
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 208
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 224
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 240
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 256
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 272
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 288
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 304
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 320
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 336
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 352
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 368
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 384
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 400
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 416
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 432
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 448
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 464
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 480
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 496
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 512
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 528
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 544
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 560
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 576
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 592
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 608
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 624
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 640
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 656
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 672
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 688
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 704
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 720
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 736
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 752
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 768
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 784
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 800
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 816
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 832
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 848
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 864
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 880
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 896
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 912
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 928
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 944
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 960
+ image: "richtext.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 992
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1008
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1024
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1040
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1056
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1072
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1088
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1104
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1120
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1136
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1152
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1168
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1184
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1200
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1216
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1232
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1248
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1264
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1280
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1296
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1312
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1328
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1344
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1360
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+ Frame {
+ msec: 1376
+ hash: "dfea78484b840b8cab690e277b960723"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/font/plaintext.qml b/tests/auto/declarative/visual/qdeclarativetext/font/plaintext.qml
new file mode 100644
index 0000000000..a3aa929b1f
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/font/plaintext.qml
@@ -0,0 +1,85 @@
+import Qt 4.6
+
+Rectangle {
+ id: s; width: 800; height: 1000; color: "lightsteelblue"
+ property string text: "The quick brown fox jumps over the lazy dog."
+
+ Column {
+ spacing: 10
+ Text {
+ text: s.text
+ }
+ Text {
+ text: s.text; font.pixelSize: 18
+ }
+ Text {
+ text: s.text; font.pointSize: 25
+ }
+ Text {
+ text: s.text; color: "red"; smooth: true
+ }
+ Text {
+ text: s.text; font.capitalization: "AllUppercase"
+ }
+ Text {
+ text: s.text; font.underline: true
+ }
+ Text {
+ text: s.text; font.overline: true; smooth: true
+ }
+ Text {
+ text: s.text; font.strikeout: true
+ }
+ Text {
+ text: s.text; font.underline: true; font.overline: true; font.strikeout: true
+ }
+ Text {
+ text: s.text; font.letterSpacing: 200
+ }
+ Text {
+ text: s.text; font.underline: true; font.letterSpacing: 200; font.capitalization: "AllUppercase"; color: "blue"
+ }
+ Text {
+ text: s.text; font.overline: true; font.wordSpacing: 25; font.capitalization: "Capitalize"; color: "green"
+ }
+ Text {
+ text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"
+ }
+ Text {
+ text: s.text; font.pixelSize: 18; style: Text.Sunken; styleColor: "gray"
+ }
+ Text {
+ text: s.text; font.pixelSize: 18; style: Text.Raised; styleColor: "yellow"
+ }
+ Text {
+ text: s.text; horizontalAlignment: Text.AlignLeft; width: 800
+ }
+ Text {
+ text: s.text; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; width: 800; height: 20
+ }
+ Text {
+ text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: 800; height: 20
+ }
+ Text {
+ text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrap: true; width: 200
+ }
+ Text {
+ text: s.text; elide: Text.ElideLeft; width: 200
+ }
+ Text {
+ text: s.text; elide: Text.ElideMiddle; width: 200
+ }
+ Text {
+ text: s.text; elide: Text.ElideRight; width: 200
+ }
+ Text {
+ text: s.text; elide: Text.ElideLeft; width: 200; wrap: true
+ }
+ Text {
+ text: s.text; elide: Text.ElideMiddle; width: 200; wrap: true
+ }
+ Text {
+ text: s.text; elide: Text.ElideRight; width: 200; wrap: true
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/font/richtext.qml b/tests/auto/declarative/visual/qdeclarativetext/font/richtext.qml
new file mode 100644
index 0000000000..35aa232089
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetext/font/richtext.qml
@@ -0,0 +1,85 @@
+import Qt 4.6
+
+Rectangle {
+ id: s; width: 800; height: 1000; color: "lightsteelblue"
+ property string text: "<b>The</b> <i>quick</i> <u>brown</u> <o>fox</o> <big>jumps</big> <small>over</small> <tt>the</tt> <s>lazy</s> <em>dog</em>."
+
+ Column {
+ spacing: 10
+ Text {
+ text: s.text
+ }
+ Text {
+ text: s.text; font.pixelSize: 18
+ }
+ Text {
+ text: s.text; font.pointSize: 25
+ }
+ Text {
+ text: s.text; color: "red"; smooth: true
+ }
+ Text {
+ text: s.text; font.capitalization: "AllUppercase"
+ }
+ Text {
+ text: s.text; font.underline: true
+ }
+ Text {
+ text: s.text; font.overline: true; smooth: true
+ }
+ Text {
+ text: s.text; font.strikeout: true
+ }
+ Text {
+ text: s.text; font.underline: true; font.overline: true; font.strikeout: true
+ }
+ Text {
+ text: s.text; font.letterSpacing: 200
+ }
+ Text {
+ text: s.text; font.underline: true; font.letterSpacing: 200; font.capitalization: "AllUppercase"; color: "blue"
+ }
+ Text {
+ text: s.text; font.overline: true; font.wordSpacing: 25; font.capitalization: "Capitalize"; color: "green"
+ }
+ Text {
+ text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"
+ }
+ Text {
+ text: s.text; font.pixelSize: 18; style: Text.Sunken; styleColor: "gray"
+ }
+ Text {
+ text: s.text; font.pixelSize: 18; style: Text.Raised; styleColor: "yellow"
+ }
+ Text {
+ text: s.text; horizontalAlignment: Text.AlignLeft; width: 800
+ }
+ Text {
+ text: s.text; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; width: 800; height: 20
+ }
+ Text {
+ text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: 800; height: 20
+ }
+ Text {
+ text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrap: true; width: 200
+ }
+ Text {
+ text: s.text; elide: Text.ElideLeft; width: 200
+ }
+ Text {
+ text: s.text; elide: Text.ElideMiddle; width: 200
+ }
+ Text {
+ text: s.text; elide: Text.ElideRight; width: 200
+ }
+ Text {
+ text: s.text; elide: Text.ElideLeft; width: 200; wrap: true
+ }
+ Text {
+ text: s.text; elide: Text.ElideMiddle; width: 200; wrap: true
+ }
+ Text {
+ text: s.text; elide: Text.ElideRight; width: 200; wrap: true
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/cursorDelegate.qml b/tests/auto/declarative/visual/qdeclarativetextedit/cursorDelegate.qml
new file mode 100644
index 0000000000..176a5b8ab2
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/cursorDelegate.qml
@@ -0,0 +1,35 @@
+import Qt 4.6
+ Rectangle {
+ resources: [
+ Component { id: cursorA
+ Item { id: cPage;
+ x: Behavior { NumberAnimation { } }
+ y: Behavior { NumberAnimation { } }
+ height: Behavior { NumberAnimation { duration: 200 } }
+ Rectangle { id: cRectangle; color: "black"; y: 1; width: 1; height: parent.height-2;
+ Rectangle { id:top; color: "black"; width: 3; height: 1; x: -1; y:0}
+ Rectangle { id:bottom; color: "black"; width: 3; height: 1; x: -1; anchors.bottom: parent.bottom;}
+ opacity: 1
+ opacity: SequentialAnimation { running: cPage.parent.focus == true; repeat: true;
+ NumberAnimation { properties: "opacity"; to: 1; duration: 500; easing.type: "InQuad"}
+ NumberAnimation { properties: "opacity"; to: 0; duration: 500; easing.type: "OutQuad"}
+ }
+ }
+ width: 1;
+ }
+ }
+ ]
+ width: 400
+ height: 200
+ color: "white"
+ TextEdit { id: mainText
+ text: "Hello World"
+ cursorDelegate: cursorA
+ focus: true
+ font.pixelSize: 28
+ selectionColor: "lightsteelblue"
+ selectedTextColor: "deeppink"
+ color: "forestgreen"
+ anchors.centerIn: parent
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.0.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.0.png
new file mode 100644
index 0000000000..464a578bb4
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.1.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.1.png
new file mode 100644
index 0000000000..9beb1ca4a7
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.2.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.2.png
new file mode 100644
index 0000000000..001be30b98
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.3.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.3.png
new file mode 100644
index 0000000000..fc3e4b3dec
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.4.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.4.png
new file mode 100644
index 0000000000..24f43e66e4
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.5.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.5.png
new file mode 100644
index 0000000000..001223b5b0
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.6.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.6.png
new file mode 100644
index 0000000000..7126e073dd
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.7.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.7.png
new file mode 100644
index 0000000000..f0bea88417
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.8.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.8.png
new file mode 100644
index 0000000000..4381b8dfb8
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.8.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.qml b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.qml
new file mode 100644
index 0000000000..8ee92d78e2
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/cursorDelegate.qml
@@ -0,0 +1,3555 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 32
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 48
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 64
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 80
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 96
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 112
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 128
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 144
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 160
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 176
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 192
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 208
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 224
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 240
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 256
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 272
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 288
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 304
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 320
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 336
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 352
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 368
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 384
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 400
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 416
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 432
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 448
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 464
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 480
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 496
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 512
+ hash: "e0366dbd264ca453f5dad3a7966f17a2"
+ }
+ Frame {
+ msec: 528
+ hash: "84cad44c4cccf8a0942865719d05c2eb"
+ }
+ Frame {
+ msec: 544
+ hash: "60d24c160adb8e074c04d4f40bf140a8"
+ }
+ Frame {
+ msec: 560
+ hash: "ff5fac70804eb01da28c2988aba520a4"
+ }
+ Frame {
+ msec: 576
+ hash: "a6bdf56b4f8783969935488e1955e59c"
+ }
+ Frame {
+ msec: 592
+ hash: "d0ad97647c5092a64426187406ec5316"
+ }
+ Frame {
+ msec: 608
+ hash: "77e7a4a4a9c38cd7b5ef734d39089e3f"
+ }
+ Frame {
+ msec: 624
+ hash: "0285340a2e03568810a76d840369f5c8"
+ }
+ Frame {
+ msec: 640
+ hash: "6ba6a1a05c5a9ec0d2897b3454affd09"
+ }
+ Frame {
+ msec: 656
+ hash: "3caa36cc3857803248d12ec09ea357df"
+ }
+ Frame {
+ msec: 672
+ hash: "500f7b72acc877fc1662e4f4ceb090e1"
+ }
+ Frame {
+ msec: 688
+ hash: "aadc71923926885ccce87e6be1c742d7"
+ }
+ Frame {
+ msec: 704
+ hash: "9b7503189ecf2999934716f227469463"
+ }
+ Frame {
+ msec: 720
+ hash: "874296e182abe96e58f9c0463a0f32c9"
+ }
+ Frame {
+ msec: 736
+ hash: "4262c79b6844d4d62aa9fb02c335fb95"
+ }
+ Frame {
+ msec: 752
+ hash: "a5862eaf12cc342054fd3f8d1f4c91c3"
+ }
+ Frame {
+ msec: 768
+ hash: "0034ef8851c9810ed5d50496aea367da"
+ }
+ Frame {
+ msec: 784
+ hash: "24cebf60ade86469a154abaa64f3b40d"
+ }
+ Frame {
+ msec: 800
+ hash: "1100ef4e2db234ea77ff4c70df6bfbe7"
+ }
+ Frame {
+ msec: 816
+ hash: "c40d8d42a55dde7dbbcae2dda9aaccb8"
+ }
+ Frame {
+ msec: 832
+ hash: "5c1000fdc279742cbe46987045c0a92b"
+ }
+ Frame {
+ msec: 848
+ hash: "bcef4a0ff72330f05f2bf5042e414fde"
+ }
+ Frame {
+ msec: 864
+ hash: "228551c38b567f1550b44f9dac08786b"
+ }
+ Frame {
+ msec: 880
+ hash: "531c5ca6992c4a12927c61e22c02dd6b"
+ }
+ Frame {
+ msec: 896
+ hash: "127cc30967f95cb88f4238e0b33c741d"
+ }
+ Frame {
+ msec: 912
+ hash: "3c3fb1d8dbe7443f80550a30ada7f120"
+ }
+ Frame {
+ msec: 928
+ hash: "edca065d42bf9b63a79d1e97d1a1eed0"
+ }
+ Frame {
+ msec: 944
+ hash: "1e4424f1f40bfce3205e1d1401ab0dcf"
+ }
+ Frame {
+ msec: 960
+ image: "cursorDelegate.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 992
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1008
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1024
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1040
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1056
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1072
+ hash: "90ac5ad7ce23786fe838426605e737e1"
+ }
+ Frame {
+ msec: 1088
+ hash: "1e4424f1f40bfce3205e1d1401ab0dcf"
+ }
+ Frame {
+ msec: 1104
+ hash: "edca065d42bf9b63a79d1e97d1a1eed0"
+ }
+ Frame {
+ msec: 1120
+ hash: "3c3fb1d8dbe7443f80550a30ada7f120"
+ }
+ Frame {
+ msec: 1136
+ hash: "127cc30967f95cb88f4238e0b33c741d"
+ }
+ Frame {
+ msec: 1152
+ hash: "531c5ca6992c4a12927c61e22c02dd6b"
+ }
+ Frame {
+ msec: 1168
+ hash: "228551c38b567f1550b44f9dac08786b"
+ }
+ Frame {
+ msec: 1184
+ hash: "bcef4a0ff72330f05f2bf5042e414fde"
+ }
+ Frame {
+ msec: 1200
+ hash: "5c1000fdc279742cbe46987045c0a92b"
+ }
+ Frame {
+ msec: 1216
+ hash: "c40d8d42a55dde7dbbcae2dda9aaccb8"
+ }
+ Frame {
+ msec: 1232
+ hash: "1100ef4e2db234ea77ff4c70df6bfbe7"
+ }
+ Frame {
+ msec: 1248
+ hash: "24cebf60ade86469a154abaa64f3b40d"
+ }
+ Frame {
+ msec: 1264
+ hash: "0034ef8851c9810ed5d50496aea367da"
+ }
+ Frame {
+ msec: 1280
+ hash: "a5862eaf12cc342054fd3f8d1f4c91c3"
+ }
+ Frame {
+ msec: 1296
+ hash: "4262c79b6844d4d62aa9fb02c335fb95"
+ }
+ Frame {
+ msec: 1312
+ hash: "874296e182abe96e58f9c0463a0f32c9"
+ }
+ Frame {
+ msec: 1328
+ hash: "9b7503189ecf2999934716f227469463"
+ }
+ Frame {
+ msec: 1344
+ hash: "aadc71923926885ccce87e6be1c742d7"
+ }
+ Frame {
+ msec: 1360
+ hash: "500f7b72acc877fc1662e4f4ceb090e1"
+ }
+ Frame {
+ msec: 1376
+ hash: "3caa36cc3857803248d12ec09ea357df"
+ }
+ Key {
+ type: 6
+ key: 16777232
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1392
+ hash: "6ba6a1a05c5a9ec0d2897b3454affd09"
+ }
+ Frame {
+ msec: 1408
+ hash: "0285340a2e03568810a76d840369f5c8"
+ }
+ Frame {
+ msec: 1424
+ hash: "77e7a4a4a9c38cd7b5ef734d39089e3f"
+ }
+ Frame {
+ msec: 1440
+ hash: "d0ad97647c5092a64426187406ec5316"
+ }
+ Frame {
+ msec: 1456
+ hash: "a6bdf56b4f8783969935488e1955e59c"
+ }
+ Key {
+ type: 7
+ key: 16777232
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1472
+ hash: "ff5fac70804eb01da28c2988aba520a4"
+ }
+ Frame {
+ msec: 1488
+ hash: "60d24c160adb8e074c04d4f40bf140a8"
+ }
+ Frame {
+ msec: 1504
+ hash: "84cad44c4cccf8a0942865719d05c2eb"
+ }
+ Frame {
+ msec: 1520
+ hash: "907c6363d1e524f391d001944febe1ac"
+ }
+ Frame {
+ msec: 1536
+ hash: "313a06d40274e46453342e66236f09f8"
+ }
+ Frame {
+ msec: 1552
+ hash: "0d410f7bfa3e4c58948a8f1e7c7695c4"
+ }
+ Frame {
+ msec: 1568
+ hash: "a9911e076af337fe30e322f03d84a528"
+ }
+ Frame {
+ msec: 1584
+ hash: "4a8efcc341bba9ba621ce0f785a75432"
+ }
+ Frame {
+ msec: 1600
+ hash: "479f192c8cf7b8e4407655382402700f"
+ }
+ Frame {
+ msec: 1616
+ hash: "63dc16e66def35abba5159d5650f165d"
+ }
+ Frame {
+ msec: 1632
+ hash: "26e88aae512304c28d425c311febce1b"
+ }
+ Key {
+ type: 6
+ key: 16777233
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1648
+ hash: "8dca7a7912ddaa853dff9c09882082b1"
+ }
+ Frame {
+ msec: 1664
+ hash: "5c3ebee155e29a0ba4a45706dd87396a"
+ }
+ Frame {
+ msec: 1680
+ hash: "29a517a66867f6f527c6db5bb5651f92"
+ }
+ Frame {
+ msec: 1696
+ hash: "a4fde31f55f866224eca2b51586b601f"
+ }
+ Frame {
+ msec: 1712
+ hash: "9c9c7fb9fb8aab8c24f2eb03df791a00"
+ }
+ Frame {
+ msec: 1728
+ hash: "dd972e37166d1186a717a956343a7758"
+ }
+ Key {
+ type: 7
+ key: 16777233
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1744
+ hash: "1af5e24651ef422ff93dab7bd2a8f832"
+ }
+ Frame {
+ msec: 1760
+ hash: "885473be4e44bb1f4b014f9b3d4d2e74"
+ }
+ Frame {
+ msec: 1776
+ hash: "1f6e0407392322c34567caaecae5b449"
+ }
+ Frame {
+ msec: 1792
+ hash: "dcae85a4b05c450b6b1619f9fd7e17b0"
+ }
+ Frame {
+ msec: 1808
+ hash: "3b872e5030e34edf678ac2547df48699"
+ }
+ Frame {
+ msec: 1824
+ hash: "5d76b324496297d08cff57b4c21ce592"
+ }
+ Frame {
+ msec: 1840
+ hash: "4acfe3c4cf2f4e477f1a72817af556d2"
+ }
+ Frame {
+ msec: 1856
+ hash: "a04671fe8d28cfb629f2090e342747fb"
+ }
+ Frame {
+ msec: 1872
+ hash: "2474db802c7d8e0ec8fa7f958c04bf30"
+ }
+ Frame {
+ msec: 1888
+ hash: "11a1e1f38c407de4bc069aa192319fe4"
+ }
+ Frame {
+ msec: 1904
+ hash: "ec8aacc8d2280068dd7f020e8648afea"
+ }
+ Frame {
+ msec: 1920
+ image: "cursorDelegate.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "fbbe4d0fed6274968a89e02bb1ca5685"
+ }
+ Frame {
+ msec: 1952
+ hash: "13d478424a8f0cab8bab6a157efce318"
+ }
+ Frame {
+ msec: 1968
+ hash: "ea6bc9ec217fb80b86276a2675c08a0f"
+ }
+ Frame {
+ msec: 1984
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2000
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2016
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2032
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2048
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2064
+ hash: "ea6bc9ec217fb80b86276a2675c08a0f"
+ }
+ Frame {
+ msec: 2080
+ hash: "13d478424a8f0cab8bab6a157efce318"
+ }
+ Frame {
+ msec: 2096
+ hash: "fbbe4d0fed6274968a89e02bb1ca5685"
+ }
+ Frame {
+ msec: 2112
+ hash: "00dedd48bd6861cb4bf4953162a67cc0"
+ }
+ Key {
+ type: 6
+ key: 16777248
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2128
+ hash: "ec8aacc8d2280068dd7f020e8648afea"
+ }
+ Frame {
+ msec: 2144
+ hash: "11a1e1f38c407de4bc069aa192319fe4"
+ }
+ Frame {
+ msec: 2160
+ hash: "2474db802c7d8e0ec8fa7f958c04bf30"
+ }
+ Frame {
+ msec: 2176
+ hash: "a04671fe8d28cfb629f2090e342747fb"
+ }
+ Frame {
+ msec: 2192
+ hash: "4acfe3c4cf2f4e477f1a72817af556d2"
+ }
+ Frame {
+ msec: 2208
+ hash: "5d76b324496297d08cff57b4c21ce592"
+ }
+ Frame {
+ msec: 2224
+ hash: "3b872e5030e34edf678ac2547df48699"
+ }
+ Frame {
+ msec: 2240
+ hash: "dcae85a4b05c450b6b1619f9fd7e17b0"
+ }
+ Frame {
+ msec: 2256
+ hash: "1f6e0407392322c34567caaecae5b449"
+ }
+ Frame {
+ msec: 2272
+ hash: "885473be4e44bb1f4b014f9b3d4d2e74"
+ }
+ Frame {
+ msec: 2288
+ hash: "1af5e24651ef422ff93dab7bd2a8f832"
+ }
+ Frame {
+ msec: 2304
+ hash: "dd972e37166d1186a717a956343a7758"
+ }
+ Frame {
+ msec: 2320
+ hash: "9c9c7fb9fb8aab8c24f2eb03df791a00"
+ }
+ Key {
+ type: 6
+ key: 16777232
+ modifiers: 33554432
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2336
+ hash: "aec9683f3a677dab781bdf3bbf7cce5e"
+ }
+ Frame {
+ msec: 2352
+ hash: "63c6a7810dec832f1b8288807f1d932a"
+ }
+ Frame {
+ msec: 2368
+ hash: "70409eeee50fbb54097a3c430e1e1f21"
+ }
+ Frame {
+ msec: 2384
+ hash: "efc77b82c0ffd7f3fbe5fed06ea418bd"
+ }
+ Frame {
+ msec: 2400
+ hash: "26e88aae512304c28d425c311febce1b"
+ }
+ Frame {
+ msec: 2416
+ hash: "63dc16e66def35abba5159d5650f165d"
+ }
+ Frame {
+ msec: 2432
+ hash: "479f192c8cf7b8e4407655382402700f"
+ }
+ Key {
+ type: 7
+ key: 16777232
+ modifiers: 33554432
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2448
+ hash: "4a8efcc341bba9ba621ce0f785a75432"
+ }
+ Frame {
+ msec: 2464
+ hash: "a9911e076af337fe30e322f03d84a528"
+ }
+ Frame {
+ msec: 2480
+ hash: "0d410f7bfa3e4c58948a8f1e7c7695c4"
+ }
+ Frame {
+ msec: 2496
+ hash: "313a06d40274e46453342e66236f09f8"
+ }
+ Frame {
+ msec: 2512
+ hash: "907c6363d1e524f391d001944febe1ac"
+ }
+ Frame {
+ msec: 2528
+ hash: "84cad44c4cccf8a0942865719d05c2eb"
+ }
+ Frame {
+ msec: 2544
+ hash: "60d24c160adb8e074c04d4f40bf140a8"
+ }
+ Frame {
+ msec: 2560
+ hash: "ff5fac70804eb01da28c2988aba520a4"
+ }
+ Frame {
+ msec: 2576
+ hash: "a6bdf56b4f8783969935488e1955e59c"
+ }
+ Frame {
+ msec: 2592
+ hash: "d0ad97647c5092a64426187406ec5316"
+ }
+ Frame {
+ msec: 2608
+ hash: "77e7a4a4a9c38cd7b5ef734d39089e3f"
+ }
+ Frame {
+ msec: 2624
+ hash: "0285340a2e03568810a76d840369f5c8"
+ }
+ Frame {
+ msec: 2640
+ hash: "6ba6a1a05c5a9ec0d2897b3454affd09"
+ }
+ Frame {
+ msec: 2656
+ hash: "3caa36cc3857803248d12ec09ea357df"
+ }
+ Frame {
+ msec: 2672
+ hash: "500f7b72acc877fc1662e4f4ceb090e1"
+ }
+ Frame {
+ msec: 2688
+ hash: "aadc71923926885ccce87e6be1c742d7"
+ }
+ Frame {
+ msec: 2704
+ hash: "9b7503189ecf2999934716f227469463"
+ }
+ Frame {
+ msec: 2720
+ hash: "874296e182abe96e58f9c0463a0f32c9"
+ }
+ Frame {
+ msec: 2736
+ hash: "4262c79b6844d4d62aa9fb02c335fb95"
+ }
+ Frame {
+ msec: 2752
+ hash: "a5862eaf12cc342054fd3f8d1f4c91c3"
+ }
+ Frame {
+ msec: 2768
+ hash: "0034ef8851c9810ed5d50496aea367da"
+ }
+ Frame {
+ msec: 2784
+ hash: "24cebf60ade86469a154abaa64f3b40d"
+ }
+ Key {
+ type: 7
+ key: 16777248
+ modifiers: 33554432
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2800
+ hash: "1100ef4e2db234ea77ff4c70df6bfbe7"
+ }
+ Frame {
+ msec: 2816
+ hash: "c40d8d42a55dde7dbbcae2dda9aaccb8"
+ }
+ Frame {
+ msec: 2832
+ hash: "5c1000fdc279742cbe46987045c0a92b"
+ }
+ Frame {
+ msec: 2848
+ hash: "bcef4a0ff72330f05f2bf5042e414fde"
+ }
+ Frame {
+ msec: 2864
+ hash: "228551c38b567f1550b44f9dac08786b"
+ }
+ Frame {
+ msec: 2880
+ image: "cursorDelegate.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "127cc30967f95cb88f4238e0b33c741d"
+ }
+ Frame {
+ msec: 2912
+ hash: "3c3fb1d8dbe7443f80550a30ada7f120"
+ }
+ Frame {
+ msec: 2928
+ hash: "edca065d42bf9b63a79d1e97d1a1eed0"
+ }
+ Frame {
+ msec: 2944
+ hash: "1e4424f1f40bfce3205e1d1401ab0dcf"
+ }
+ Frame {
+ msec: 2960
+ hash: "90ac5ad7ce23786fe838426605e737e1"
+ }
+ Frame {
+ msec: 2976
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2992
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3008
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3024
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3040
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3056
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3072
+ hash: "90ac5ad7ce23786fe838426605e737e1"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3088
+ hash: "cf467854dfde9b2111bc6e7e4442aab5"
+ }
+ Frame {
+ msec: 3104
+ hash: "df6f025130dc82f4764def81cec5fa7b"
+ }
+ Frame {
+ msec: 3120
+ hash: "bdcafed4ae9c890eec2e3e0cb2ff5a14"
+ }
+ Frame {
+ msec: 3136
+ hash: "14b328c8ec6276e022643102af80fa44"
+ }
+ Frame {
+ msec: 3152
+ hash: "078d75d72bff036574b85ac0aeaaf2b6"
+ }
+ Frame {
+ msec: 3168
+ hash: "fbefb1e0801f4578ab93dd7ff4062e68"
+ }
+ Frame {
+ msec: 3184
+ hash: "eac8375d9b9cf0afbf232e27c6ceb037"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3200
+ hash: "3462a3e166120515e67430600e4653f8"
+ }
+ Frame {
+ msec: 3216
+ hash: "7f2d9959323f0707e36ecb2252c89727"
+ }
+ Frame {
+ msec: 3232
+ hash: "0a1c2eb8a7451a5e37fefb96a58a88a1"
+ }
+ Frame {
+ msec: 3248
+ hash: "4a02aaca12e3fd86ee3b516b3a307f86"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3264
+ hash: "0034ef8851c9810ed5d50496aea367da"
+ }
+ Frame {
+ msec: 3280
+ hash: "a5862eaf12cc342054fd3f8d1f4c91c3"
+ }
+ Frame {
+ msec: 3296
+ hash: "4262c79b6844d4d62aa9fb02c335fb95"
+ }
+ Frame {
+ msec: 3312
+ hash: "874296e182abe96e58f9c0463a0f32c9"
+ }
+ Frame {
+ msec: 3328
+ hash: "9b7503189ecf2999934716f227469463"
+ }
+ Frame {
+ msec: 3344
+ hash: "aadc71923926885ccce87e6be1c742d7"
+ }
+ Frame {
+ msec: 3360
+ hash: "500f7b72acc877fc1662e4f4ceb090e1"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3376
+ hash: "3caa36cc3857803248d12ec09ea357df"
+ }
+ Frame {
+ msec: 3392
+ hash: "6ba6a1a05c5a9ec0d2897b3454affd09"
+ }
+ Frame {
+ msec: 3408
+ hash: "0285340a2e03568810a76d840369f5c8"
+ }
+ Frame {
+ msec: 3424
+ hash: "77e7a4a4a9c38cd7b5ef734d39089e3f"
+ }
+ Frame {
+ msec: 3440
+ hash: "d0ad97647c5092a64426187406ec5316"
+ }
+ Frame {
+ msec: 3456
+ hash: "a6bdf56b4f8783969935488e1955e59c"
+ }
+ Frame {
+ msec: 3472
+ hash: "ff5fac70804eb01da28c2988aba520a4"
+ }
+ Frame {
+ msec: 3488
+ hash: "60d24c160adb8e074c04d4f40bf140a8"
+ }
+ Frame {
+ msec: 3504
+ hash: "84cad44c4cccf8a0942865719d05c2eb"
+ }
+ Frame {
+ msec: 3520
+ hash: "907c6363d1e524f391d001944febe1ac"
+ }
+ Frame {
+ msec: 3536
+ hash: "313a06d40274e46453342e66236f09f8"
+ }
+ Frame {
+ msec: 3552
+ hash: "0d410f7bfa3e4c58948a8f1e7c7695c4"
+ }
+ Frame {
+ msec: 3568
+ hash: "a9911e076af337fe30e322f03d84a528"
+ }
+ Frame {
+ msec: 3584
+ hash: "4a8efcc341bba9ba621ce0f785a75432"
+ }
+ Frame {
+ msec: 3600
+ hash: "479f192c8cf7b8e4407655382402700f"
+ }
+ Frame {
+ msec: 3616
+ hash: "63dc16e66def35abba5159d5650f165d"
+ }
+ Frame {
+ msec: 3632
+ hash: "26e88aae512304c28d425c311febce1b"
+ }
+ Frame {
+ msec: 3648
+ hash: "efc77b82c0ffd7f3fbe5fed06ea418bd"
+ }
+ Frame {
+ msec: 3664
+ hash: "70409eeee50fbb54097a3c430e1e1f21"
+ }
+ Frame {
+ msec: 3680
+ hash: "63c6a7810dec832f1b8288807f1d932a"
+ }
+ Frame {
+ msec: 3696
+ hash: "aec9683f3a677dab781bdf3bbf7cce5e"
+ }
+ Frame {
+ msec: 3712
+ hash: "2e6dd79fc23acbf710e757f3d0999ab8"
+ }
+ Frame {
+ msec: 3728
+ hash: "4d9dd9e515a21478cb3364032acf8c15"
+ }
+ Frame {
+ msec: 3744
+ hash: "5dc2129cac6e667d39da3304a37a76f2"
+ }
+ Frame {
+ msec: 3760
+ hash: "ab5eb4750139875586a346b1c3a84f42"
+ }
+ Frame {
+ msec: 3776
+ hash: "96d3bd62d4a0bf39a672b97fcc050bd5"
+ }
+ Frame {
+ msec: 3792
+ hash: "546cec655631b5802eb4d7008093eb69"
+ }
+ Frame {
+ msec: 3808
+ hash: "85f33f1bf1b1e11be450ab85bf6dab3d"
+ }
+ Frame {
+ msec: 3824
+ hash: "44b195297acd1bf59e43751df8dc1c1d"
+ }
+ Frame {
+ msec: 3840
+ image: "cursorDelegate.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "47942253c07fd39894445ff5e5b9608c"
+ }
+ Frame {
+ msec: 3872
+ hash: "d26d71b1c03fb21550820dd1586a7a8e"
+ }
+ Frame {
+ msec: 3888
+ hash: "37ec2ed29006575e8bd41a1989b75e27"
+ }
+ Frame {
+ msec: 3904
+ hash: "5ad1ab34572f9ef339774134bc0ab407"
+ }
+ Frame {
+ msec: 3920
+ hash: "a4f68f6ee46642e7cc5a542b9f8a2464"
+ }
+ Frame {
+ msec: 3936
+ hash: "fce95d18a0efee74554209ca39637062"
+ }
+ Frame {
+ msec: 3952
+ hash: "1587fc2668f1f44e76f252bfd75f2708"
+ }
+ Frame {
+ msec: 3968
+ hash: "e0a6eb42de552281e297ca5c50c1df23"
+ }
+ Frame {
+ msec: 3984
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4000
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4016
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4032
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4048
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4064
+ hash: "e0a6eb42de552281e297ca5c50c1df23"
+ }
+ Frame {
+ msec: 4080
+ hash: "1587fc2668f1f44e76f252bfd75f2708"
+ }
+ Frame {
+ msec: 4096
+ hash: "fce95d18a0efee74554209ca39637062"
+ }
+ Frame {
+ msec: 4112
+ hash: "a4f68f6ee46642e7cc5a542b9f8a2464"
+ }
+ Frame {
+ msec: 4128
+ hash: "5ad1ab34572f9ef339774134bc0ab407"
+ }
+ Frame {
+ msec: 4144
+ hash: "37ec2ed29006575e8bd41a1989b75e27"
+ }
+ Frame {
+ msec: 4160
+ hash: "d26d71b1c03fb21550820dd1586a7a8e"
+ }
+ Frame {
+ msec: 4176
+ hash: "47942253c07fd39894445ff5e5b9608c"
+ }
+ Frame {
+ msec: 4192
+ hash: "a62f1cbf43da0381c7c9099d47ded882"
+ }
+ Frame {
+ msec: 4208
+ hash: "44b195297acd1bf59e43751df8dc1c1d"
+ }
+ Frame {
+ msec: 4224
+ hash: "85f33f1bf1b1e11be450ab85bf6dab3d"
+ }
+ Frame {
+ msec: 4240
+ hash: "546cec655631b5802eb4d7008093eb69"
+ }
+ Frame {
+ msec: 4256
+ hash: "96d3bd62d4a0bf39a672b97fcc050bd5"
+ }
+ Frame {
+ msec: 4272
+ hash: "ab5eb4750139875586a346b1c3a84f42"
+ }
+ Frame {
+ msec: 4288
+ hash: "5dc2129cac6e667d39da3304a37a76f2"
+ }
+ Frame {
+ msec: 4304
+ hash: "4d9dd9e515a21478cb3364032acf8c15"
+ }
+ Frame {
+ msec: 4320
+ hash: "2e6dd79fc23acbf710e757f3d0999ab8"
+ }
+ Frame {
+ msec: 4336
+ hash: "aec9683f3a677dab781bdf3bbf7cce5e"
+ }
+ Frame {
+ msec: 4352
+ hash: "63c6a7810dec832f1b8288807f1d932a"
+ }
+ Frame {
+ msec: 4368
+ hash: "70409eeee50fbb54097a3c430e1e1f21"
+ }
+ Frame {
+ msec: 4384
+ hash: "efc77b82c0ffd7f3fbe5fed06ea418bd"
+ }
+ Frame {
+ msec: 4400
+ hash: "26e88aae512304c28d425c311febce1b"
+ }
+ Frame {
+ msec: 4416
+ hash: "63dc16e66def35abba5159d5650f165d"
+ }
+ Frame {
+ msec: 4432
+ hash: "479f192c8cf7b8e4407655382402700f"
+ }
+ Frame {
+ msec: 4448
+ hash: "4a8efcc341bba9ba621ce0f785a75432"
+ }
+ Frame {
+ msec: 4464
+ hash: "a9911e076af337fe30e322f03d84a528"
+ }
+ Frame {
+ msec: 4480
+ hash: "0d410f7bfa3e4c58948a8f1e7c7695c4"
+ }
+ Frame {
+ msec: 4496
+ hash: "313a06d40274e46453342e66236f09f8"
+ }
+ Frame {
+ msec: 4512
+ hash: "907c6363d1e524f391d001944febe1ac"
+ }
+ Frame {
+ msec: 4528
+ hash: "84cad44c4cccf8a0942865719d05c2eb"
+ }
+ Frame {
+ msec: 4544
+ hash: "60d24c160adb8e074c04d4f40bf140a8"
+ }
+ Frame {
+ msec: 4560
+ hash: "ff5fac70804eb01da28c2988aba520a4"
+ }
+ Frame {
+ msec: 4576
+ hash: "a6bdf56b4f8783969935488e1955e59c"
+ }
+ Frame {
+ msec: 4592
+ hash: "d0ad97647c5092a64426187406ec5316"
+ }
+ Frame {
+ msec: 4608
+ hash: "77e7a4a4a9c38cd7b5ef734d39089e3f"
+ }
+ Frame {
+ msec: 4624
+ hash: "0285340a2e03568810a76d840369f5c8"
+ }
+ Frame {
+ msec: 4640
+ hash: "6ba6a1a05c5a9ec0d2897b3454affd09"
+ }
+ Frame {
+ msec: 4656
+ hash: "3caa36cc3857803248d12ec09ea357df"
+ }
+ Frame {
+ msec: 4672
+ hash: "500f7b72acc877fc1662e4f4ceb090e1"
+ }
+ Frame {
+ msec: 4688
+ hash: "aadc71923926885ccce87e6be1c742d7"
+ }
+ Frame {
+ msec: 4704
+ hash: "9b7503189ecf2999934716f227469463"
+ }
+ Frame {
+ msec: 4720
+ hash: "874296e182abe96e58f9c0463a0f32c9"
+ }
+ Frame {
+ msec: 4736
+ hash: "4262c79b6844d4d62aa9fb02c335fb95"
+ }
+ Frame {
+ msec: 4752
+ hash: "a5862eaf12cc342054fd3f8d1f4c91c3"
+ }
+ Frame {
+ msec: 4768
+ hash: "0034ef8851c9810ed5d50496aea367da"
+ }
+ Frame {
+ msec: 4784
+ hash: "24cebf60ade86469a154abaa64f3b40d"
+ }
+ Frame {
+ msec: 4800
+ image: "cursorDelegate.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "c40d8d42a55dde7dbbcae2dda9aaccb8"
+ }
+ Frame {
+ msec: 4832
+ hash: "5c1000fdc279742cbe46987045c0a92b"
+ }
+ Frame {
+ msec: 4848
+ hash: "bcef4a0ff72330f05f2bf5042e414fde"
+ }
+ Frame {
+ msec: 4864
+ hash: "228551c38b567f1550b44f9dac08786b"
+ }
+ Frame {
+ msec: 4880
+ hash: "531c5ca6992c4a12927c61e22c02dd6b"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 130; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4896
+ hash: "14b328c8ec6276e022643102af80fa44"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 130; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4912
+ hash: "bdcafed4ae9c890eec2e3e0cb2ff5a14"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 131; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4928
+ hash: "df6f025130dc82f4764def81cec5fa7b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 132; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4944
+ hash: "cf467854dfde9b2111bc6e7e4442aab5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 133; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 134; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4960
+ hash: "cfcdf63ca06c2b9ab197821bc1e48c7c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 135; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4976
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 136; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4992
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 137; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 138; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5008
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 139; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5024
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 140; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5040
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 141; y: 100
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 143; y: 100
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5056
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 144; y: 100
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5072
+ hash: "cfcdf63ca06c2b9ab197821bc1e48c7c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 146; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5088
+ hash: "cf467854dfde9b2111bc6e7e4442aab5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 148; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 149; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5104
+ hash: "7643fcfb740d33b87915300684e85a44"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 150; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5120
+ hash: "1bd041a5e8d2237b51720fed82250303"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 151; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5136
+ hash: "1a00c9d3ce747e3bc7ee5878d21260b4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 152; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 152; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5152
+ hash: "803896c1be68588ba2cddd7effbb8d62"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 153; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5168
+ hash: "282ab572698088fba3aba8e6a091aa38"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 154; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5184
+ hash: "24402d9e4fabd78bc8f3921db82e554e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 155; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 156; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5200
+ hash: "39a89e9ca7c4edd9c8503927d639df0f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 157; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5216
+ hash: "b984b7d032544acd4dab8901e0af1ef5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 158; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5232
+ hash: "e014414626407b0446939ad2ce38b7dd"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 160; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 161; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5248
+ hash: "beccb93613279e2f48507ddc9a4418e8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 163; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5264
+ hash: "dd861f8dc89587301e860217fdf2a701"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 164; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5280
+ hash: "1ae0b7a18a7d3ebe4871a0045005e2b7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 166; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 168; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5296
+ hash: "071e1f8bcc0e541b23d134f32c19d20b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 170; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5312
+ hash: "e8ce2716f4595bc5bf68c24c8a63bbfe"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 174; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5328
+ hash: "d36a35503af76b12fe5cec65e3f22eda"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 176; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 178; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5344
+ hash: "cea0f90a56fd5789b3e166f09f2bfcec"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 179; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5360
+ hash: "151f5357d9c1a3f1fe09380a287abab0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 180; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5376
+ hash: "bdab9d7077734087cb7f9516e9c517bc"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 182; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 183; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5392
+ hash: "6d6d929a7c7be1d2e7d1b2f98a6866be"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 185; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5408
+ hash: "3fbe3f45afc5aa40fff7f795ced8a05d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5424
+ hash: "b35b4dc480aeb76912d927b0ff8676c6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 189; y: 93
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 191; y: 92
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5440
+ hash: "94e82e888280f20cce3ac38b353b79f4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 92
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5456
+ hash: "4674fbd35e467bed780a5ea2fe2e258b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 194; y: 92
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5472
+ hash: "698827bfa7ff2eae6b0e0efa99bb15bb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 92
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 92
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5488
+ hash: "67c7adef5e41481d631f54d34423b93d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 199; y: 92
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5504
+ hash: "097512c005127fa3ebfcbc52808264a8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 200; y: 91
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5520
+ hash: "ad64b5913350e6c6fda199ecb34278f4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 200; y: 91
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 201; y: 90
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5536
+ hash: "3237e88e0f40595d2fde62723c00b7fa"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 202; y: 89
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5552
+ hash: "18db89296849f22a7af0a1ffc9762a32"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 88
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5568
+ hash: "7f6ac84baaa2c5fcd22ba45172611840"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 88
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5584
+ hash: "7b887d3aa44229d9f25fdde8f5ccf471"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 207; y: 86
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 208; y: 85
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5600
+ hash: "b0c08726d0f2a460d5862cd2d7ee6230"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 210; y: 85
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5616
+ hash: "d99389a3287d453b942f070d8c1e86e8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 212; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5632
+ hash: "a0751fa826b03cb25e615c6a1435d92a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 213; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 214; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5648
+ hash: "f33da88ae881c846bd86ab3dc4f12efc"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 215; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5664
+ hash: "7049bee9a984a2c2d3101eb6d3cce31e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 216; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5680
+ hash: "72757a5099748b70241a0d4279e42313"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 216; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 217; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5696
+ hash: "705feb098ebb2d689526d9271098d6b5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 218; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5712
+ hash: "49de92770edb0aae82cf66ae42b31caa"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 218; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5728
+ hash: "70fe89f9dce556ec1859f325aa27b7db"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 219; y: 85
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 219; y: 86
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 220; y: 86
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5744
+ hash: "1ededcc625a0e9e317c5aefc238a175a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 221; y: 87
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5760
+ image: "cursorDelegate.5.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 222; y: 87
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5776
+ hash: "f1ae53071836512830f7284c4ac884b3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 222; y: 88
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5792
+ hash: "f73c2b66b61bdcb080f8be6607079729"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 224; y: 90
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5808
+ hash: "11da14806fbca5c7cd559286fb5d70ff"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 226; y: 92
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5824
+ hash: "b3ad82e900925227fb020009ae619d28"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 228; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5840
+ hash: "d8cea4160f0044b09e595610ead01879"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 229; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 231; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5856
+ hash: "bdd0d1bea8590b40cdce2fb45e17901b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 232; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5872
+ hash: "007a5d123eea589264e22f862f1bcac6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 233; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5888
+ hash: "3a83635e8371f3e26baf83c285b7801d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 233; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5904
+ hash: "6615931007ab0f9da070b6316068ad12"
+ }
+ Frame {
+ msec: 5920
+ hash: "be695ab0dced25c1c498d977fc822cef"
+ }
+ Frame {
+ msec: 5936
+ hash: "46dea7348473bc6ce4ea696292e5aae0"
+ }
+ Frame {
+ msec: 5952
+ hash: "23ce0ba723ffe4253610fdc635df9ae2"
+ }
+ Frame {
+ msec: 5968
+ hash: "9d6243396fd98b7efd14ae8a67297e79"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 233; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5984
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 232; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 232; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6000
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 231; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6016
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 230; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6032
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 229; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 228; y: 100
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6048
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 227; y: 100
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6064
+ hash: "be488252ce6c39317c33706f7febe7b5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 225; y: 100
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6080
+ hash: "16c38b5dcd8ffbadc533d4fea8a85b0d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 224; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 222; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6096
+ hash: "a3ca6fa1bbc5ca3ff4cf281ae112102d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 220; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6112
+ hash: "58e53a9cb886d6d90c0b5987d0693904"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 219; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6128
+ hash: "a7f3e07ad0335e2852a156b5a3e1bd3d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 217; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 216; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6144
+ hash: "bea9d0338212c01474b25ee637aa8fd0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 215; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6160
+ hash: "b509c0cdea6b1352ff1e146a8f243820"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 213; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6176
+ hash: "9c968354773878009af2f176b1e38d42"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 212; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 212; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6192
+ hash: "d8cea4160f0044b09e595610ead01879"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 210; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6208
+ hash: "b3ad82e900925227fb020009ae619d28"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 210; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6224
+ hash: "11da14806fbca5c7cd559286fb5d70ff"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 208; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 207; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6240
+ hash: "707f51caadf24d3ed88b69c290d56971"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6256
+ hash: "c23b2afed7fa0e3dbce1183cf8e8d724"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 205; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6272
+ hash: "653b2e2d711c1abc1893d0068f4c531c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 104
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6288
+ hash: "246a73b19421f0ea8ec444429bd6704e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 202; y: 104
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6304
+ hash: "3878df64c0cecb2051e04dafe16ad407"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 201; y: 104
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6320
+ hash: "1cf92a793a4d145acce08c61cca3ba4f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 200; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 199; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6336
+ hash: "6c5f70c941a04172aae855eed1516971"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 197; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6352
+ hash: "5f4b8d6ad49de0ea1a2ee057e783b363"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 194; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6368
+ hash: "dc185cf4a14801d7bcc24ceadffe312b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 191; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 188; y: 100
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6384
+ hash: "6934c069d1b7daf1c2dd76739941c7c2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6400
+ hash: "415510947b49a08459523fa2221d3609"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 185; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6416
+ hash: "9586619df75f07cc1f01201abd0f1f43"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 182; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6432
+ hash: "d016b14c9d5e5cd2545f1c85aa1edc4f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 176; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6448
+ hash: "4100837adeaf1557534f5c243eeacc37"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 171; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6464
+ hash: "a9351f624dc7de55ca8e799cf4371e75"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 166; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 163; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6480
+ hash: "8f2f9ba7de4e01767dda2c6d8f09e218"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 160; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6496
+ hash: "fb9b7d7e1aa140efc7e39cbca7299d34"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 159; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6512
+ hash: "eb1c2399d5779cc3382f02e69e5a31f1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 157; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 156; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6528
+ hash: "3bd98dc8a8cfb7af8a5f2ab11f387065"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 156; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6544
+ hash: "1eea9af6e5f359b96df86d56d74f8375"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 155; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6560
+ hash: "74c68b948d8e1d3c716eba5f1a186464"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 154; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 153; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6576
+ hash: "7103ecc0c21208d210938b0cd86fa4e2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 152; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 151; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6592
+ hash: "187b7801be7cd9643c707016166fcb38"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 149; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6608
+ hash: "571fe7704d5d95e91d4bd411ab00edf0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 148; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6624
+ hash: "2b6fd25a47274ffa56c3d0020babfdfc"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 146; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6640
+ hash: "febcd6b5fc1806ff57d1669c79aa4cb2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 145; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6656
+ hash: "5c731fc4a2aeccf55a0af2b7171f25ce"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 145; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6672
+ hash: "7d9df9dd9a99eabaa4b426438e44d612"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 144; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6688
+ hash: "48278540489142f8a63ed120f4b956c2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 144; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6704
+ hash: "d08abdfb587a7ec07872cb662526b6d8"
+ }
+ Frame {
+ msec: 6720
+ image: "cursorDelegate.6.png"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 144; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6736
+ hash: "4622738082ac75e00b6c63e846b7e98b"
+ }
+ Frame {
+ msec: 6752
+ hash: "87a9f2facbaba462c562f09947bb7ded"
+ }
+ Frame {
+ msec: 6768
+ hash: "77e730ece9f195c3627508d1c2a126fc"
+ }
+ Frame {
+ msec: 6784
+ hash: "4a02aaca12e3fd86ee3b516b3a307f86"
+ }
+ Frame {
+ msec: 6800
+ hash: "0a1c2eb8a7451a5e37fefb96a58a88a1"
+ }
+ Frame {
+ msec: 6816
+ hash: "7f2d9959323f0707e36ecb2252c89727"
+ }
+ Frame {
+ msec: 6832
+ hash: "3462a3e166120515e67430600e4653f8"
+ }
+ Frame {
+ msec: 6848
+ hash: "eac8375d9b9cf0afbf232e27c6ceb037"
+ }
+ Frame {
+ msec: 6864
+ hash: "fbefb1e0801f4578ab93dd7ff4062e68"
+ }
+ Frame {
+ msec: 6880
+ hash: "078d75d72bff036574b85ac0aeaaf2b6"
+ }
+ Frame {
+ msec: 6896
+ hash: "14b328c8ec6276e022643102af80fa44"
+ }
+ Frame {
+ msec: 6912
+ hash: "bdcafed4ae9c890eec2e3e0cb2ff5a14"
+ }
+ Frame {
+ msec: 6928
+ hash: "df6f025130dc82f4764def81cec5fa7b"
+ }
+ Frame {
+ msec: 6944
+ hash: "cf467854dfde9b2111bc6e7e4442aab5"
+ }
+ Frame {
+ msec: 6960
+ hash: "cfcdf63ca06c2b9ab197821bc1e48c7c"
+ }
+ Frame {
+ msec: 6976
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6992
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 7008
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 7024
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 7040
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 7056
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 7072
+ hash: "cfcdf63ca06c2b9ab197821bc1e48c7c"
+ }
+ Frame {
+ msec: 7088
+ hash: "cf467854dfde9b2111bc6e7e4442aab5"
+ }
+ Frame {
+ msec: 7104
+ hash: "df6f025130dc82f4764def81cec5fa7b"
+ }
+ Frame {
+ msec: 7120
+ hash: "bdcafed4ae9c890eec2e3e0cb2ff5a14"
+ }
+ Frame {
+ msec: 7136
+ hash: "14b328c8ec6276e022643102af80fa44"
+ }
+ Frame {
+ msec: 7152
+ hash: "078d75d72bff036574b85ac0aeaaf2b6"
+ }
+ Frame {
+ msec: 7168
+ hash: "fbefb1e0801f4578ab93dd7ff4062e68"
+ }
+ Frame {
+ msec: 7184
+ hash: "eac8375d9b9cf0afbf232e27c6ceb037"
+ }
+ Frame {
+ msec: 7200
+ hash: "3462a3e166120515e67430600e4653f8"
+ }
+ Frame {
+ msec: 7216
+ hash: "7f2d9959323f0707e36ecb2252c89727"
+ }
+ Frame {
+ msec: 7232
+ hash: "0a1c2eb8a7451a5e37fefb96a58a88a1"
+ }
+ Frame {
+ msec: 7248
+ hash: "4a02aaca12e3fd86ee3b516b3a307f86"
+ }
+ Frame {
+ msec: 7264
+ hash: "77e730ece9f195c3627508d1c2a126fc"
+ }
+ Frame {
+ msec: 7280
+ hash: "87a9f2facbaba462c562f09947bb7ded"
+ }
+ Frame {
+ msec: 7296
+ hash: "4622738082ac75e00b6c63e846b7e98b"
+ }
+ Frame {
+ msec: 7312
+ hash: "9fcec7616e28cb8317709656fd94f480"
+ }
+ Frame {
+ msec: 7328
+ hash: "d08abdfb587a7ec07872cb662526b6d8"
+ }
+ Frame {
+ msec: 7344
+ hash: "48278540489142f8a63ed120f4b956c2"
+ }
+ Frame {
+ msec: 7360
+ hash: "7d9df9dd9a99eabaa4b426438e44d612"
+ }
+ Frame {
+ msec: 7376
+ hash: "5c731fc4a2aeccf55a0af2b7171f25ce"
+ }
+ Frame {
+ msec: 7392
+ hash: "febcd6b5fc1806ff57d1669c79aa4cb2"
+ }
+ Frame {
+ msec: 7408
+ hash: "4ad2c0877360b0e1bf2212f9455f741e"
+ }
+ Frame {
+ msec: 7424
+ hash: "4df1951aac4ed1957925c95e112b0766"
+ }
+ Frame {
+ msec: 7440
+ hash: "bfbb624abe63639f2a7cb826b6b47393"
+ }
+ Frame {
+ msec: 7456
+ hash: "538cf4ee98145b3801e198b036e24a46"
+ }
+ Frame {
+ msec: 7472
+ hash: "5602c039a304ac0b1fd99957970a825b"
+ }
+ Frame {
+ msec: 7488
+ hash: "9ddd7709269b9a008e15d942e156e13a"
+ }
+ Frame {
+ msec: 7504
+ hash: "91d7c43f5f985d624e77da43ba5fb90f"
+ }
+ Frame {
+ msec: 7520
+ hash: "9153b0419d28e3c8137b58f95451cd58"
+ }
+ Frame {
+ msec: 7536
+ hash: "c5aad5ea4db81cf72f1ff390ed1dc868"
+ }
+ Frame {
+ msec: 7552
+ hash: "47b52ce9e5c705017e94b419b53d20d9"
+ }
+ Frame {
+ msec: 7568
+ hash: "f968e3289a2a6343cdb64e37b83f142a"
+ }
+ Frame {
+ msec: 7584
+ hash: "6fe898a37b17b6b6fa9a2971b518d185"
+ }
+ Frame {
+ msec: 7600
+ hash: "90ced2e487b6e760f2ad2c7d6375a36f"
+ }
+ Frame {
+ msec: 7616
+ hash: "b2d87713d12a54d4d7b6fd6ba2671704"
+ }
+ Frame {
+ msec: 7632
+ hash: "edce9857bd0e93ab841ae62ffba0149f"
+ }
+ Frame {
+ msec: 7648
+ hash: "13ce69facee6bf01c9712db1781c5ef9"
+ }
+ Frame {
+ msec: 7664
+ hash: "64924e43e004f0d9e90c23f61813c732"
+ }
+ Frame {
+ msec: 7680
+ image: "cursorDelegate.7.png"
+ }
+ Frame {
+ msec: 7696
+ hash: "9c384359c664a71b5b6b9f9d62dd38bf"
+ }
+ Frame {
+ msec: 7712
+ hash: "5998579d228bcf0efdbcee805796ec23"
+ }
+ Frame {
+ msec: 7728
+ hash: "fe69cab70ad5b25f757bc413b895ff94"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 227; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7744
+ hash: "1ededcc625a0e9e317c5aefc238a175a"
+ }
+ Frame {
+ msec: 7760
+ hash: "460a4cbee55ccdeda1941c8dccf08cbd"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 227; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7776
+ hash: "f1ae53071836512830f7284c4ac884b3"
+ }
+ Frame {
+ msec: 7792
+ hash: "f73c2b66b61bdcb080f8be6607079729"
+ }
+ Frame {
+ msec: 7808
+ hash: "11da14806fbca5c7cd559286fb5d70ff"
+ }
+ Frame {
+ msec: 7824
+ hash: "b3ad82e900925227fb020009ae619d28"
+ }
+ Frame {
+ msec: 7840
+ hash: "d8cea4160f0044b09e595610ead01879"
+ }
+ Frame {
+ msec: 7856
+ hash: "9c968354773878009af2f176b1e38d42"
+ }
+ Frame {
+ msec: 7872
+ hash: "b509c0cdea6b1352ff1e146a8f243820"
+ }
+ Frame {
+ msec: 7888
+ hash: "bea9d0338212c01474b25ee637aa8fd0"
+ }
+ Frame {
+ msec: 7904
+ hash: "a7f3e07ad0335e2852a156b5a3e1bd3d"
+ }
+ Frame {
+ msec: 7920
+ hash: "58e53a9cb886d6d90c0b5987d0693904"
+ }
+ Frame {
+ msec: 7936
+ hash: "a3ca6fa1bbc5ca3ff4cf281ae112102d"
+ }
+ Frame {
+ msec: 7952
+ hash: "16c38b5dcd8ffbadc533d4fea8a85b0d"
+ }
+ Frame {
+ msec: 7968
+ hash: "be488252ce6c39317c33706f7febe7b5"
+ }
+ Frame {
+ msec: 7984
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 8000
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 8016
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 8032
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 8048
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 8064
+ hash: "be488252ce6c39317c33706f7febe7b5"
+ }
+ Frame {
+ msec: 8080
+ hash: "16c38b5dcd8ffbadc533d4fea8a85b0d"
+ }
+ Frame {
+ msec: 8096
+ hash: "a3ca6fa1bbc5ca3ff4cf281ae112102d"
+ }
+ Frame {
+ msec: 8112
+ hash: "58e53a9cb886d6d90c0b5987d0693904"
+ }
+ Frame {
+ msec: 8128
+ hash: "a7f3e07ad0335e2852a156b5a3e1bd3d"
+ }
+ Frame {
+ msec: 8144
+ hash: "bea9d0338212c01474b25ee637aa8fd0"
+ }
+ Frame {
+ msec: 8160
+ hash: "b509c0cdea6b1352ff1e146a8f243820"
+ }
+ Frame {
+ msec: 8176
+ hash: "9c968354773878009af2f176b1e38d42"
+ }
+ Frame {
+ msec: 8192
+ hash: "d8cea4160f0044b09e595610ead01879"
+ }
+ Frame {
+ msec: 8208
+ hash: "b3ad82e900925227fb020009ae619d28"
+ }
+ Frame {
+ msec: 8224
+ hash: "11da14806fbca5c7cd559286fb5d70ff"
+ }
+ Frame {
+ msec: 8240
+ hash: "f73c2b66b61bdcb080f8be6607079729"
+ }
+ Frame {
+ msec: 8256
+ hash: "f1ae53071836512830f7284c4ac884b3"
+ }
+ Frame {
+ msec: 8272
+ hash: "460a4cbee55ccdeda1941c8dccf08cbd"
+ }
+ Frame {
+ msec: 8288
+ hash: "1ededcc625a0e9e317c5aefc238a175a"
+ }
+ Frame {
+ msec: 8304
+ hash: "70fe89f9dce556ec1859f325aa27b7db"
+ }
+ Frame {
+ msec: 8320
+ hash: "49de92770edb0aae82cf66ae42b31caa"
+ }
+ Frame {
+ msec: 8336
+ hash: "705feb098ebb2d689526d9271098d6b5"
+ }
+ Frame {
+ msec: 8352
+ hash: "72757a5099748b70241a0d4279e42313"
+ }
+ Frame {
+ msec: 8368
+ hash: "7049bee9a984a2c2d3101eb6d3cce31e"
+ }
+ Frame {
+ msec: 8384
+ hash: "f33da88ae881c846bd86ab3dc4f12efc"
+ }
+ Frame {
+ msec: 8400
+ hash: "a0751fa826b03cb25e615c6a1435d92a"
+ }
+ Frame {
+ msec: 8416
+ hash: "d99389a3287d453b942f070d8c1e86e8"
+ }
+ Frame {
+ msec: 8432
+ hash: "e3219357e73a2dfd5b80dfbd6feb79e2"
+ }
+ Frame {
+ msec: 8448
+ hash: "c0953accd856883c813d4ecf99fb632b"
+ }
+ Frame {
+ msec: 8464
+ hash: "185743339cba9dfc1a2c2ff1efd23855"
+ }
+ Frame {
+ msec: 8480
+ hash: "30a4419de779037fd84bd70a99c4d6de"
+ }
+ Frame {
+ msec: 8496
+ hash: "1d9cbd0814831c518e9e8041fe8285c9"
+ }
+ Frame {
+ msec: 8512
+ hash: "81d660df1b0eab7c382991b600f88ba3"
+ }
+ Frame {
+ msec: 8528
+ hash: "7ee1467525b9fe3b6a32fba8c2454df1"
+ }
+ Frame {
+ msec: 8544
+ hash: "28dd72957652cf130d28d30203b36c59"
+ }
+ Frame {
+ msec: 8560
+ hash: "e9697d06a22958cea4f766dd3ec31ca9"
+ }
+ Frame {
+ msec: 8576
+ hash: "81970c31a0a1e42929c83ef5140401c2"
+ }
+ Frame {
+ msec: 8592
+ hash: "ebb5be43955725bef66bf99bd7288c04"
+ }
+ Frame {
+ msec: 8608
+ hash: "afbf0645ea651b2c459eeb43bdc65992"
+ }
+ Frame {
+ msec: 8624
+ hash: "42bf6ab3963652617f2feb96ee170af5"
+ }
+ Frame {
+ msec: 8640
+ image: "cursorDelegate.8.png"
+ }
+ Frame {
+ msec: 8656
+ hash: "4a5966f600f9b27bf7a65fcc6c1c5d17"
+ }
+ Frame {
+ msec: 8672
+ hash: "ecdc1d89af1e76648c8298e2b9940549"
+ }
+ Frame {
+ msec: 8688
+ hash: "0ba1e105a7ae41926e2106b60eafdec9"
+ }
+ Frame {
+ msec: 8704
+ hash: "96e4f277d4ff76afe0c2d58b4aed3acb"
+ }
+ Frame {
+ msec: 8720
+ hash: "f41c6fd9e22354b8f5c940c04930a591"
+ }
+ Frame {
+ msec: 8736
+ hash: "00b522554cf6c0c09e5425f4d3c3fcf9"
+ }
+ Frame {
+ msec: 8752
+ hash: "e8549c0c361f20d167cab128dc996274"
+ }
+ Frame {
+ msec: 8768
+ hash: "976c61615250f9bfa3b4c02ee88bee03"
+ }
+ Frame {
+ msec: 8784
+ hash: "06c95d2fa5e2b4751e5693b179e76eb4"
+ }
+ Frame {
+ msec: 8800
+ hash: "a3d79197235c4717b1f9af3582118ca6"
+ }
+ Frame {
+ msec: 8816
+ hash: "68b23db8f519aa161278074aa318eaa1"
+ }
+ Frame {
+ msec: 8832
+ hash: "af967462be12d0b6ddd3571b00804c12"
+ }
+ Frame {
+ msec: 8848
+ hash: "46f5c0baa2b95fd418984eebe308157e"
+ }
+ Frame {
+ msec: 8864
+ hash: "0a7407c6c751b3f1380a99883e95f1dd"
+ }
+ Frame {
+ msec: 8880
+ hash: "9969c206488671c45c43f3a3dd3f5994"
+ }
+ Frame {
+ msec: 8896
+ hash: "89efa872ce2e71935b47cac101bf15c9"
+ }
+ Frame {
+ msec: 8912
+ hash: "a4545a0c50fb071d267b06bf2d114802"
+ }
+ Frame {
+ msec: 8928
+ hash: "f4df98459c18399e1c6b2d8a43bdd678"
+ }
+ Frame {
+ msec: 8944
+ hash: "027eb091eea8bf51d7ad3ff44120e075"
+ }
+ Frame {
+ msec: 8960
+ hash: "138ec35b850d20664f905a4eea6f7456"
+ }
+ Frame {
+ msec: 8976
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 8992
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 9008
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 9024
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 9040
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 9056
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 9072
+ hash: "138ec35b850d20664f905a4eea6f7456"
+ }
+ Frame {
+ msec: 9088
+ hash: "027eb091eea8bf51d7ad3ff44120e075"
+ }
+ Frame {
+ msec: 9104
+ hash: "f4df98459c18399e1c6b2d8a43bdd678"
+ }
+ Frame {
+ msec: 9120
+ hash: "a4545a0c50fb071d267b06bf2d114802"
+ }
+ Frame {
+ msec: 9136
+ hash: "89efa872ce2e71935b47cac101bf15c9"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.0.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.0.png
new file mode 100644
index 0000000000..cc1774fdd6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.1.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.1.png
new file mode 100644
index 0000000000..60eba1686a
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.2.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.2.png
new file mode 100644
index 0000000000..d4663f731c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.3.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.3.png
new file mode 100644
index 0000000000..dc1bb52f08
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.qml b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.qml
new file mode 100644
index 0000000000..84c16e1918
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-MAC/qt-669.qml
@@ -0,0 +1,1371 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 32
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 48
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 64
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 80
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 96
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 112
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 128
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 144
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 160
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 176
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 192
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 208
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 224
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 240
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 256
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 272
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 288
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 304
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 320
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 336
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 352
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 368
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 384
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 400
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 416
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 432
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 448
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 464
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 480
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 496
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 512
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 528
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 544
+ hash: "fbc07fa31ab2022f3155bd1fb591fe6c"
+ }
+ Frame {
+ msec: 560
+ hash: "fbc07fa31ab2022f3155bd1fb591fe6c"
+ }
+ Frame {
+ msec: 576
+ hash: "fbc07fa31ab2022f3155bd1fb591fe6c"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 592
+ hash: "fbc07fa31ab2022f3155bd1fb591fe6c"
+ }
+ Frame {
+ msec: 608
+ hash: "fbc07fa31ab2022f3155bd1fb591fe6c"
+ }
+ Frame {
+ msec: 624
+ hash: "fbc07fa31ab2022f3155bd1fb591fe6c"
+ }
+ Frame {
+ msec: 640
+ hash: "fbc07fa31ab2022f3155bd1fb591fe6c"
+ }
+ Frame {
+ msec: 656
+ hash: "fbc07fa31ab2022f3155bd1fb591fe6c"
+ }
+ Frame {
+ msec: 672
+ hash: "fbc07fa31ab2022f3155bd1fb591fe6c"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 688
+ hash: "c602a6535ef86125615307d9d187eb3f"
+ }
+ Frame {
+ msec: 704
+ hash: "c602a6535ef86125615307d9d187eb3f"
+ }
+ Frame {
+ msec: 720
+ hash: "c602a6535ef86125615307d9d187eb3f"
+ }
+ Frame {
+ msec: 736
+ hash: "c602a6535ef86125615307d9d187eb3f"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 752
+ hash: "c602a6535ef86125615307d9d187eb3f"
+ }
+ Frame {
+ msec: 768
+ hash: "c602a6535ef86125615307d9d187eb3f"
+ }
+ Frame {
+ msec: 784
+ hash: "c602a6535ef86125615307d9d187eb3f"
+ }
+ Frame {
+ msec: 800
+ hash: "c602a6535ef86125615307d9d187eb3f"
+ }
+ Frame {
+ msec: 816
+ hash: "c602a6535ef86125615307d9d187eb3f"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 832
+ hash: "c186352ed5d1539a45b3c9e1dfa408d6"
+ }
+ Frame {
+ msec: 848
+ hash: "c186352ed5d1539a45b3c9e1dfa408d6"
+ }
+ Frame {
+ msec: 864
+ hash: "c186352ed5d1539a45b3c9e1dfa408d6"
+ }
+ Frame {
+ msec: 880
+ hash: "c186352ed5d1539a45b3c9e1dfa408d6"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 896
+ hash: "c186352ed5d1539a45b3c9e1dfa408d6"
+ }
+ Frame {
+ msec: 912
+ hash: "c186352ed5d1539a45b3c9e1dfa408d6"
+ }
+ Frame {
+ msec: 928
+ hash: "c186352ed5d1539a45b3c9e1dfa408d6"
+ }
+ Frame {
+ msec: 944
+ hash: "c186352ed5d1539a45b3c9e1dfa408d6"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 960
+ image: "qt-669.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 992
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 1008
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1024
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 1040
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 1056
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 1072
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 1088
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1104
+ hash: "f90403e0b62f9579b5c5f591e75e9eb5"
+ }
+ Frame {
+ msec: 1120
+ hash: "f90403e0b62f9579b5c5f591e75e9eb5"
+ }
+ Frame {
+ msec: 1136
+ hash: "f90403e0b62f9579b5c5f591e75e9eb5"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1152
+ hash: "f90403e0b62f9579b5c5f591e75e9eb5"
+ }
+ Frame {
+ msec: 1168
+ hash: "f90403e0b62f9579b5c5f591e75e9eb5"
+ }
+ Frame {
+ msec: 1184
+ hash: "f90403e0b62f9579b5c5f591e75e9eb5"
+ }
+ Frame {
+ msec: 1200
+ hash: "f90403e0b62f9579b5c5f591e75e9eb5"
+ }
+ Frame {
+ msec: 1216
+ hash: "f90403e0b62f9579b5c5f591e75e9eb5"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1232
+ hash: "823ccdc677997c96e4ae16891ffffa77"
+ }
+ Frame {
+ msec: 1248
+ hash: "823ccdc677997c96e4ae16891ffffa77"
+ }
+ Frame {
+ msec: 1264
+ hash: "823ccdc677997c96e4ae16891ffffa77"
+ }
+ Frame {
+ msec: 1280
+ hash: "823ccdc677997c96e4ae16891ffffa77"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1296
+ hash: "823ccdc677997c96e4ae16891ffffa77"
+ }
+ Frame {
+ msec: 1312
+ hash: "823ccdc677997c96e4ae16891ffffa77"
+ }
+ Frame {
+ msec: 1328
+ hash: "823ccdc677997c96e4ae16891ffffa77"
+ }
+ Frame {
+ msec: 1344
+ hash: "823ccdc677997c96e4ae16891ffffa77"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1360
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Frame {
+ msec: 1376
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Frame {
+ msec: 1392
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Frame {
+ msec: 1408
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1424
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Frame {
+ msec: 1440
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Frame {
+ msec: 1456
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Frame {
+ msec: 1472
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Frame {
+ msec: 1488
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1504
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1520
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1536
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1552
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1568
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1584
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1600
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1616
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1632
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1648
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1664
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1680
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1696
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1712
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1728
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1744
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1760
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1776
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1792
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1808
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1824
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Frame {
+ msec: 1840
+ hash: "781a5a09fb6c6ca1fd38f63938f9c8d0"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1856
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Frame {
+ msec: 1872
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Frame {
+ msec: 1888
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Frame {
+ msec: 1904
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Frame {
+ msec: 1920
+ image: "qt-669.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Frame {
+ msec: 1952
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Frame {
+ msec: 1968
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Frame {
+ msec: 1984
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2000
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Frame {
+ msec: 2016
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Frame {
+ msec: 2032
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Frame {
+ msec: 2048
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Frame {
+ msec: 2064
+ hash: "2718ab36551a20d36664f26e408f8f24"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2080
+ hash: "823ccdc677997c96e4ae16891ffffa77"
+ }
+ Frame {
+ msec: 2096
+ hash: "823ccdc677997c96e4ae16891ffffa77"
+ }
+ Frame {
+ msec: 2112
+ hash: "823ccdc677997c96e4ae16891ffffa77"
+ }
+ Frame {
+ msec: 2128
+ hash: "823ccdc677997c96e4ae16891ffffa77"
+ }
+ Frame {
+ msec: 2144
+ hash: "823ccdc677997c96e4ae16891ffffa77"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2160
+ hash: "823ccdc677997c96e4ae16891ffffa77"
+ }
+ Frame {
+ msec: 2176
+ hash: "823ccdc677997c96e4ae16891ffffa77"
+ }
+ Frame {
+ msec: 2192
+ hash: "823ccdc677997c96e4ae16891ffffa77"
+ }
+ Frame {
+ msec: 2208
+ hash: "823ccdc677997c96e4ae16891ffffa77"
+ }
+ Frame {
+ msec: 2224
+ hash: "823ccdc677997c96e4ae16891ffffa77"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2240
+ hash: "f90403e0b62f9579b5c5f591e75e9eb5"
+ }
+ Frame {
+ msec: 2256
+ hash: "f90403e0b62f9579b5c5f591e75e9eb5"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2272
+ hash: "f90403e0b62f9579b5c5f591e75e9eb5"
+ }
+ Frame {
+ msec: 2288
+ hash: "f90403e0b62f9579b5c5f591e75e9eb5"
+ }
+ Frame {
+ msec: 2304
+ hash: "f90403e0b62f9579b5c5f591e75e9eb5"
+ }
+ Frame {
+ msec: 2320
+ hash: "f90403e0b62f9579b5c5f591e75e9eb5"
+ }
+ Frame {
+ msec: 2336
+ hash: "f90403e0b62f9579b5c5f591e75e9eb5"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2352
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 2368
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 2384
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2400
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 2416
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 2432
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 2448
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 2464
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 2480
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 2496
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 2512
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 2528
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 2544
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 2560
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 2576
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Frame {
+ msec: 2592
+ hash: "1295bd1d94fe518d5a871e90cab88e0c"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2608
+ hash: "c186352ed5d1539a45b3c9e1dfa408d6"
+ }
+ Frame {
+ msec: 2624
+ hash: "c186352ed5d1539a45b3c9e1dfa408d6"
+ }
+ Frame {
+ msec: 2640
+ hash: "c186352ed5d1539a45b3c9e1dfa408d6"
+ }
+ Frame {
+ msec: 2656
+ hash: "c186352ed5d1539a45b3c9e1dfa408d6"
+ }
+ Frame {
+ msec: 2672
+ hash: "c186352ed5d1539a45b3c9e1dfa408d6"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2688
+ hash: "c186352ed5d1539a45b3c9e1dfa408d6"
+ }
+ Frame {
+ msec: 2704
+ hash: "c186352ed5d1539a45b3c9e1dfa408d6"
+ }
+ Frame {
+ msec: 2720
+ hash: "c186352ed5d1539a45b3c9e1dfa408d6"
+ }
+ Frame {
+ msec: 2736
+ hash: "c186352ed5d1539a45b3c9e1dfa408d6"
+ }
+ Frame {
+ msec: 2752
+ hash: "c186352ed5d1539a45b3c9e1dfa408d6"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2768
+ hash: "c602a6535ef86125615307d9d187eb3f"
+ }
+ Frame {
+ msec: 2784
+ hash: "c602a6535ef86125615307d9d187eb3f"
+ }
+ Frame {
+ msec: 2800
+ hash: "c602a6535ef86125615307d9d187eb3f"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2816
+ hash: "c602a6535ef86125615307d9d187eb3f"
+ }
+ Frame {
+ msec: 2832
+ hash: "c602a6535ef86125615307d9d187eb3f"
+ }
+ Frame {
+ msec: 2848
+ hash: "c602a6535ef86125615307d9d187eb3f"
+ }
+ Frame {
+ msec: 2864
+ hash: "c602a6535ef86125615307d9d187eb3f"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2880
+ image: "qt-669.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "fbc07fa31ab2022f3155bd1fb591fe6c"
+ }
+ Frame {
+ msec: 2912
+ hash: "fbc07fa31ab2022f3155bd1fb591fe6c"
+ }
+ Frame {
+ msec: 2928
+ hash: "fbc07fa31ab2022f3155bd1fb591fe6c"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2944
+ hash: "fbc07fa31ab2022f3155bd1fb591fe6c"
+ }
+ Frame {
+ msec: 2960
+ hash: "fbc07fa31ab2022f3155bd1fb591fe6c"
+ }
+ Frame {
+ msec: 2976
+ hash: "fbc07fa31ab2022f3155bd1fb591fe6c"
+ }
+ Frame {
+ msec: 2992
+ hash: "fbc07fa31ab2022f3155bd1fb591fe6c"
+ }
+ Frame {
+ msec: 3008
+ hash: "fbc07fa31ab2022f3155bd1fb591fe6c"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3024
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3040
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3056
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3072
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3088
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3104
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3120
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3136
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3152
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3168
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3184
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3200
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3216
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3232
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3248
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3264
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3280
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3296
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3312
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3328
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3344
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3360
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3376
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3392
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3408
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3424
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3440
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3456
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3472
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3488
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3504
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3520
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3536
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3552
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3568
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3584
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3600
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3616
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3632
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3648
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3664
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3680
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Frame {
+ msec: 3696
+ hash: "e64c3246a0f81e2df29ac276ac6d411f"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3712
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 3728
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 3744
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 3760
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 3776
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 3792
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3808
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 3824
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 3840
+ image: "qt-669.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 3872
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 3888
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 3904
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 3920
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 3936
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 3952
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 3968
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 3984
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4000
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4016
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4032
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4048
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4064
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4080
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4096
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4112
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4128
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4144
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4160
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4176
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4192
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4208
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4224
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4240
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4256
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4272
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4288
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+ Frame {
+ msec: 4304
+ hash: "c043ae4adb31cb53bfc089e7f2ed07b2"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.0.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.0.png
new file mode 100644
index 0000000000..ec65f494b6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.1.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.1.png
new file mode 100644
index 0000000000..ec65f494b6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.2.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.2.png
new file mode 100644
index 0000000000..ec65f494b6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.3.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.3.png
new file mode 100644
index 0000000000..ec65f494b6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.4.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.4.png
new file mode 100644
index 0000000000..ec65f494b6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.5.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.5.png
new file mode 100644
index 0000000000..ec65f494b6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.6.png b/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.6.png
new file mode 100644
index 0000000000..ec65f494b6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.qml b/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.qml
new file mode 100644
index 0000000000..4ff00f4a8a
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data-X11/wrap.qml
@@ -0,0 +1,2467 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 84
+ modifiers: 33554432
+ text: "54"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 32
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 16777248
+ modifiers: 33554432
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 48
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 64
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 80
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 96
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 72
+ modifiers: 0
+ text: "68"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 112
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 128
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 144
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 73
+ modifiers: 0
+ text: "69"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 160
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 176
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 192
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 72
+ modifiers: 0
+ text: "68"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 208
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 224
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 240
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 73
+ modifiers: 0
+ text: "69"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 256
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 272
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 288
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 304
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 320
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 336
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 352
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 368
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 384
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 400
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 416
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 432
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 448
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 464
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 73
+ modifiers: 0
+ text: "69"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 480
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 496
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 512
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 528
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 7
+ key: 73
+ modifiers: 0
+ text: "69"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 544
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 560
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 576
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 592
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 608
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 624
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 640
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 656
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 672
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 688
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 704
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 720
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 736
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 752
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 768
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 784
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 800
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 816
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 832
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 848
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 864
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 880
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 896
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 912
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 928
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 944
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 960
+ image: "wrap.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 992
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 7
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1008
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1024
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1040
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1056
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1072
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1088
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1104
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1120
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1136
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1152
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1168
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1184
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1200
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1216
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1232
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1248
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1264
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1280
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1296
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1312
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1328
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1344
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1360
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1376
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1392
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1408
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1424
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1440
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1456
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1472
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1488
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1504
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1520
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1536
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1552
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 72
+ modifiers: 0
+ text: "68"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1568
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1584
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1600
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1616
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1632
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 7
+ key: 72
+ modifiers: 0
+ text: "68"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1648
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1664
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1680
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1696
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1712
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1728
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1744
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1760
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1776
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1792
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1808
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1824
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1840
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1856
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1872
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1888
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1904
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1920
+ image: "wrap.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1952
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1968
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1984
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2000
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2016
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2032
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2048
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2064
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2080
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2096
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2112
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2128
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2144
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2160
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2176
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2192
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2208
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 88
+ modifiers: 0
+ text: "78"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2224
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2240
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2256
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2272
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2288
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2304
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 88
+ modifiers: 0
+ text: "78"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2320
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2336
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2352
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2368
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2384
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2400
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2416
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2432
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2448
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2464
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2480
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2496
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2512
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2528
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2544
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2560
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2576
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2592
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2608
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2624
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2640
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 68
+ modifiers: 0
+ text: "64"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2656
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2672
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2688
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2704
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 68
+ modifiers: 0
+ text: "64"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2720
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2736
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2752
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 73
+ modifiers: 0
+ text: "69"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2768
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2784
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2800
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2816
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2832
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 7
+ key: 73
+ modifiers: 0
+ text: "69"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2848
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2864
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2880
+ image: "wrap.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2912
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2928
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2944
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2960
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2976
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2992
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3008
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3024
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3040
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3056
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3072
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3088
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 87
+ modifiers: 0
+ text: "77"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3104
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3120
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3136
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3152
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3168
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 87
+ modifiers: 0
+ text: "77"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3184
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3200
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3216
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3232
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3248
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 82
+ modifiers: 0
+ text: "72"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3264
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3280
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3296
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 82
+ modifiers: 0
+ text: "72"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3312
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3328
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3344
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3360
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3376
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3392
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3408
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3424
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3440
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3456
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3472
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 80
+ modifiers: 0
+ text: "70"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3488
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3504
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3520
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3536
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 80
+ modifiers: 0
+ text: "70"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3552
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3568
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3584
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3600
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3616
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3632
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3648
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3664
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3680
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3696
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3712
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3728
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3744
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3760
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3776
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3792
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3808
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3824
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3840
+ image: "wrap.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3872
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3888
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3904
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 67
+ modifiers: 0
+ text: "63"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3920
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3936
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3952
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3968
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3984
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 67
+ modifiers: 0
+ text: "63"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4000
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4016
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 79
+ modifiers: 0
+ text: "6f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4032
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4048
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4064
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 79
+ modifiers: 0
+ text: "6f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4080
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 82
+ modifiers: 0
+ text: "72"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4096
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4112
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4128
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4144
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 82
+ modifiers: 0
+ text: "72"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4160
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4176
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4192
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 82
+ modifiers: 0
+ text: "72"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4208
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4224
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4240
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4256
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4272
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4288
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 82
+ modifiers: 0
+ text: "72"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4304
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4320
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4336
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4352
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4368
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4384
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4400
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4416
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 67
+ modifiers: 0
+ text: "63"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4432
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4448
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4464
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 67
+ modifiers: 0
+ text: "63"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4480
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4496
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4512
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4528
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4544
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4560
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4576
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4592
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4608
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4624
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4640
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4656
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4672
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 76
+ modifiers: 0
+ text: "6c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4688
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4704
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4720
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4736
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 76
+ modifiers: 0
+ text: "6c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4752
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4768
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4784
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 89
+ modifiers: 0
+ text: "79"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4800
+ image: "wrap.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 89
+ modifiers: 0
+ text: "79"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4832
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4848
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4864
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4880
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 46
+ modifiers: 0
+ text: "2e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4896
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4912
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4928
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4944
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 46
+ modifiers: 0
+ text: "2e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4960
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4976
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4992
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5008
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5024
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5040
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5056
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5072
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5088
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5104
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5120
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5136
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5152
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5168
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5184
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5200
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5216
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5232
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5248
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5264
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5280
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5296
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5312
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5328
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5344
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5360
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5376
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5392
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5408
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5424
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5440
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5456
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5472
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5488
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5504
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5520
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5536
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5552
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5568
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5584
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5600
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5616
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5632
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5648
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5664
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5680
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5696
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5712
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5728
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5744
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5760
+ image: "wrap.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5792
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5808
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5824
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5840
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5856
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5872
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5888
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5904
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5920
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5936
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5952
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5968
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5984
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6000
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6016
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6032
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6048
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6064
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6080
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6096
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6112
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6128
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6144
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6160
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6176
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6192
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6208
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6224
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6240
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6256
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6272
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6288
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6304
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6320
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6336
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6352
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6368
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6384
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6400
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6416
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6432
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6448
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6464
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6480
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6496
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6512
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6528
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6544
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6560
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6576
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6592
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6608
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6624
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6640
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6656
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6672
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6688
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6704
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6720
+ image: "wrap.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6752
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6768
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6784
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6800
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6816
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6832
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6848
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6864
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.0.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.0.png
new file mode 100644
index 0000000000..555996a21a
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.1.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.1.png
new file mode 100644
index 0000000000..b705bad7b0
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.2.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.2.png
new file mode 100644
index 0000000000..094cd2a6ec
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.3.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.3.png
new file mode 100644
index 0000000000..9c519c715c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.4.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.4.png
new file mode 100644
index 0000000000..3ec77b509d
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.5.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.5.png
new file mode 100644
index 0000000000..579a66e5b9
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.6.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.6.png
new file mode 100644
index 0000000000..9e5ac90c18
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.7.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.7.png
new file mode 100644
index 0000000000..9f3acfcc25
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.8.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.8.png
new file mode 100644
index 0000000000..f27518a1bb
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.8.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.qml b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.qml
new file mode 100644
index 0000000000..8578d48a85
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/cursorDelegate.qml
@@ -0,0 +1,3555 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 32
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 48
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 64
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 80
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 96
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 112
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 128
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 144
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 160
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 176
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 192
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 208
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 224
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 240
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 256
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 272
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 288
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 304
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 320
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 336
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 352
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 368
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 384
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 400
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 416
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 432
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 448
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 464
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 480
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 496
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 512
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 528
+ hash: "15da97430bcbac3a16d9897bbf2e4dbd"
+ }
+ Frame {
+ msec: 544
+ hash: "2aec32493055ad17f4aac9b3c9b84c5f"
+ }
+ Frame {
+ msec: 560
+ hash: "e0826ff09b628a5e3ddf6d9e5593f937"
+ }
+ Frame {
+ msec: 576
+ hash: "eacfa8db605b9e386a55508e8943e7d1"
+ }
+ Frame {
+ msec: 592
+ hash: "2dbe9b5bbb5baf12cd2cbfb4190be316"
+ }
+ Frame {
+ msec: 608
+ hash: "60a60e06237318bf005f87bbba386fef"
+ }
+ Frame {
+ msec: 624
+ hash: "97549f388c02adb8884c2e79510adc7e"
+ }
+ Frame {
+ msec: 640
+ hash: "d882fe91d9df9862d620cf984e27d0bd"
+ }
+ Frame {
+ msec: 656
+ hash: "6310b65572e39256122c7620f7e87442"
+ }
+ Frame {
+ msec: 672
+ hash: "4e7374a683050ff440056b6e7c971d2b"
+ }
+ Frame {
+ msec: 688
+ hash: "35c0d55cda3a02eb4c441a5832bcbbf4"
+ }
+ Frame {
+ msec: 704
+ hash: "8d71c418593eb3e4834d5e608ffd3f29"
+ }
+ Frame {
+ msec: 720
+ hash: "0da2c1cd0138172698a3bee5d19168c5"
+ }
+ Frame {
+ msec: 736
+ hash: "8ca757a4fd1987329488f63251b0f6b4"
+ }
+ Frame {
+ msec: 752
+ hash: "70c827f1b34b44cbd775b666913556d6"
+ }
+ Frame {
+ msec: 768
+ hash: "2b91dcef1b3ca66059dd9db4c8e335f3"
+ }
+ Frame {
+ msec: 784
+ hash: "38abc77b2361ce257d39c0cf268ba42b"
+ }
+ Frame {
+ msec: 800
+ hash: "59865194eb63465dd0f3925c7a500340"
+ }
+ Frame {
+ msec: 816
+ hash: "7bed5747d6b771db0fe5802153e54f2f"
+ }
+ Frame {
+ msec: 832
+ hash: "9ac1bf268749bc8e58bc4d04b55ef849"
+ }
+ Frame {
+ msec: 848
+ hash: "64ea5cb46782d250c46a7a2c8cceea20"
+ }
+ Frame {
+ msec: 864
+ hash: "d81037eb21bfcb434b6c7f3bbd21ad12"
+ }
+ Frame {
+ msec: 880
+ hash: "1079ea3a1a62e2cca9a8e907bc5aa4e1"
+ }
+ Frame {
+ msec: 896
+ hash: "96422f9bfbc11775cd7d1fae2ba357bd"
+ }
+ Frame {
+ msec: 912
+ hash: "0d247385059a6f68b37bc34f6b2214b1"
+ }
+ Frame {
+ msec: 928
+ hash: "7c513361e13a90eef229b42e68ffaa18"
+ }
+ Frame {
+ msec: 944
+ hash: "510b8441c613f0637dfc46e03c278112"
+ }
+ Frame {
+ msec: 960
+ image: "cursorDelegate.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "8d90112e2e1c6f226a1a5f4f75785939"
+ }
+ Frame {
+ msec: 992
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 1008
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 1024
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 1040
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 1056
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 1072
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 1088
+ hash: "8d90112e2e1c6f226a1a5f4f75785939"
+ }
+ Frame {
+ msec: 1104
+ hash: "85e6af1f5fd15338a15f984e24d5ec9d"
+ }
+ Frame {
+ msec: 1120
+ hash: "510b8441c613f0637dfc46e03c278112"
+ }
+ Frame {
+ msec: 1136
+ hash: "7c513361e13a90eef229b42e68ffaa18"
+ }
+ Frame {
+ msec: 1152
+ hash: "0d247385059a6f68b37bc34f6b2214b1"
+ }
+ Frame {
+ msec: 1168
+ hash: "96422f9bfbc11775cd7d1fae2ba357bd"
+ }
+ Frame {
+ msec: 1184
+ hash: "1079ea3a1a62e2cca9a8e907bc5aa4e1"
+ }
+ Frame {
+ msec: 1200
+ hash: "d81037eb21bfcb434b6c7f3bbd21ad12"
+ }
+ Frame {
+ msec: 1216
+ hash: "64ea5cb46782d250c46a7a2c8cceea20"
+ }
+ Frame {
+ msec: 1232
+ hash: "9ac1bf268749bc8e58bc4d04b55ef849"
+ }
+ Frame {
+ msec: 1248
+ hash: "7bed5747d6b771db0fe5802153e54f2f"
+ }
+ Frame {
+ msec: 1264
+ hash: "59865194eb63465dd0f3925c7a500340"
+ }
+ Frame {
+ msec: 1280
+ hash: "38abc77b2361ce257d39c0cf268ba42b"
+ }
+ Frame {
+ msec: 1296
+ hash: "2b91dcef1b3ca66059dd9db4c8e335f3"
+ }
+ Frame {
+ msec: 1312
+ hash: "70c827f1b34b44cbd775b666913556d6"
+ }
+ Frame {
+ msec: 1328
+ hash: "8ca757a4fd1987329488f63251b0f6b4"
+ }
+ Frame {
+ msec: 1344
+ hash: "0da2c1cd0138172698a3bee5d19168c5"
+ }
+ Frame {
+ msec: 1360
+ hash: "8d71c418593eb3e4834d5e608ffd3f29"
+ }
+ Frame {
+ msec: 1376
+ hash: "35c0d55cda3a02eb4c441a5832bcbbf4"
+ }
+ Key {
+ type: 6
+ key: 16777232
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1392
+ hash: "4e7374a683050ff440056b6e7c971d2b"
+ }
+ Frame {
+ msec: 1408
+ hash: "6310b65572e39256122c7620f7e87442"
+ }
+ Frame {
+ msec: 1424
+ hash: "d882fe91d9df9862d620cf984e27d0bd"
+ }
+ Frame {
+ msec: 1440
+ hash: "97549f388c02adb8884c2e79510adc7e"
+ }
+ Frame {
+ msec: 1456
+ hash: "60a60e06237318bf005f87bbba386fef"
+ }
+ Key {
+ type: 7
+ key: 16777232
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1472
+ hash: "2dbe9b5bbb5baf12cd2cbfb4190be316"
+ }
+ Frame {
+ msec: 1488
+ hash: "eacfa8db605b9e386a55508e8943e7d1"
+ }
+ Frame {
+ msec: 1504
+ hash: "e0826ff09b628a5e3ddf6d9e5593f937"
+ }
+ Frame {
+ msec: 1520
+ hash: "2aec32493055ad17f4aac9b3c9b84c5f"
+ }
+ Frame {
+ msec: 1536
+ hash: "c0e72cdf776b0c62742aa9c3683cd523"
+ }
+ Frame {
+ msec: 1552
+ hash: "ea3f512181b3ee94d8cdd4d9f59ed962"
+ }
+ Frame {
+ msec: 1568
+ hash: "de924155855e76d0591217448f79bdb6"
+ }
+ Frame {
+ msec: 1584
+ hash: "51da770a75102de9ad1920f1f6c44146"
+ }
+ Frame {
+ msec: 1600
+ hash: "e3c0e8f6385ef2ab9b671be3243774c4"
+ }
+ Frame {
+ msec: 1616
+ hash: "eac6de65ea6726f0cc50b6d30c1b7ba5"
+ }
+ Frame {
+ msec: 1632
+ hash: "2ee111386bd646c4ee577405e490a2f7"
+ }
+ Key {
+ type: 6
+ key: 16777233
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1648
+ hash: "24c376d5a2b3555126b156c8bc7a7a0c"
+ }
+ Frame {
+ msec: 1664
+ hash: "d9c35de8b02f11db321d9bdcdcd65403"
+ }
+ Frame {
+ msec: 1680
+ hash: "0b32a66497ec3cdd05dc27c0ef9c5718"
+ }
+ Frame {
+ msec: 1696
+ hash: "9626f80ef170af2db135792337203265"
+ }
+ Frame {
+ msec: 1712
+ hash: "6e4ce7599da579f764ff10e982888889"
+ }
+ Frame {
+ msec: 1728
+ hash: "5ad4dd681be780c0068734ca5c722507"
+ }
+ Key {
+ type: 7
+ key: 16777233
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1744
+ hash: "7d620ef53049f9195cc832d6f9dfd52b"
+ }
+ Frame {
+ msec: 1760
+ hash: "0f54144c574af01958505eedd69162f6"
+ }
+ Frame {
+ msec: 1776
+ hash: "50f168354e3901283708a4ae9088783d"
+ }
+ Frame {
+ msec: 1792
+ hash: "c55fdf2fd0a4eeb9ca0e3072aa3e60c4"
+ }
+ Frame {
+ msec: 1808
+ hash: "d351de13e7bb5b273ec3aebb88dffbd5"
+ }
+ Frame {
+ msec: 1824
+ hash: "977d44194d1ef05801167157714891af"
+ }
+ Frame {
+ msec: 1840
+ hash: "ef3694ca78764709abbe2f8781578fb4"
+ }
+ Frame {
+ msec: 1856
+ hash: "77afbc0e0b828d03148ed7fe342dfbda"
+ }
+ Frame {
+ msec: 1872
+ hash: "0d94e37430d8b835e65750a6af525ef7"
+ }
+ Frame {
+ msec: 1888
+ hash: "e009a8d2cb7c7f1200055666cf2efd9c"
+ }
+ Frame {
+ msec: 1904
+ hash: "096a2742962d7b22dba768577373e656"
+ }
+ Frame {
+ msec: 1920
+ image: "cursorDelegate.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "905b6c7ab24fd1a12f17494fc1935e98"
+ }
+ Frame {
+ msec: 1952
+ hash: "9bc98b4a32ea933fcc3a40eaae9b3516"
+ }
+ Frame {
+ msec: 1968
+ hash: "70f0313540b3517f3b6d403c3ab1199c"
+ }
+ Frame {
+ msec: 1984
+ hash: "309ae1af1ef7dbaf0b892ad60fd3eb93"
+ }
+ Frame {
+ msec: 2000
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 2016
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 2032
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 2048
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 2064
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 2080
+ hash: "309ae1af1ef7dbaf0b892ad60fd3eb93"
+ }
+ Frame {
+ msec: 2096
+ hash: "70f0313540b3517f3b6d403c3ab1199c"
+ }
+ Frame {
+ msec: 2112
+ hash: "9bc98b4a32ea933fcc3a40eaae9b3516"
+ }
+ Key {
+ type: 6
+ key: 16777248
+ modifiers: 33554432
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2128
+ hash: "905b6c7ab24fd1a12f17494fc1935e98"
+ }
+ Frame {
+ msec: 2144
+ hash: "31adf3a3bfbd1083c50cae7ed5d64334"
+ }
+ Frame {
+ msec: 2160
+ hash: "096a2742962d7b22dba768577373e656"
+ }
+ Frame {
+ msec: 2176
+ hash: "e009a8d2cb7c7f1200055666cf2efd9c"
+ }
+ Frame {
+ msec: 2192
+ hash: "0d94e37430d8b835e65750a6af525ef7"
+ }
+ Frame {
+ msec: 2208
+ hash: "77afbc0e0b828d03148ed7fe342dfbda"
+ }
+ Frame {
+ msec: 2224
+ hash: "ef3694ca78764709abbe2f8781578fb4"
+ }
+ Frame {
+ msec: 2240
+ hash: "977d44194d1ef05801167157714891af"
+ }
+ Frame {
+ msec: 2256
+ hash: "d351de13e7bb5b273ec3aebb88dffbd5"
+ }
+ Frame {
+ msec: 2272
+ hash: "c55fdf2fd0a4eeb9ca0e3072aa3e60c4"
+ }
+ Frame {
+ msec: 2288
+ hash: "50f168354e3901283708a4ae9088783d"
+ }
+ Frame {
+ msec: 2304
+ hash: "0f54144c574af01958505eedd69162f6"
+ }
+ Frame {
+ msec: 2320
+ hash: "7d620ef53049f9195cc832d6f9dfd52b"
+ }
+ Key {
+ type: 6
+ key: 16777232
+ modifiers: 33554432
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2336
+ hash: "03e906dfb3bf98f521d805331d3b5b9c"
+ }
+ Frame {
+ msec: 2352
+ hash: "c2376393ea9541b909b6b4fe188fa03e"
+ }
+ Frame {
+ msec: 2368
+ hash: "9b3935370412c75acdf6e91100cf2f53"
+ }
+ Frame {
+ msec: 2384
+ hash: "30ab7913bdfc51d2df5ab9f3863d28c7"
+ }
+ Frame {
+ msec: 2400
+ hash: "593656e93d6e01419002dbb581aa6cbd"
+ }
+ Frame {
+ msec: 2416
+ hash: "33800dd560e44ce39d6325bbdee689de"
+ }
+ Frame {
+ msec: 2432
+ hash: "c41a9c4f08053d5d18fb2d530ed8b5ad"
+ }
+ Key {
+ type: 7
+ key: 16777232
+ modifiers: 33554432
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2448
+ hash: "b3f2d4a2cb9a9d1304a2a2d07ad41ff2"
+ }
+ Frame {
+ msec: 2464
+ hash: "93cf7fe53bc1fd749c523d40b27d17b4"
+ }
+ Frame {
+ msec: 2480
+ hash: "6e9226d01dd93cff763e851148da8dfd"
+ }
+ Frame {
+ msec: 2496
+ hash: "79fdbda495bbc6c9ae8be03e1467de92"
+ }
+ Frame {
+ msec: 2512
+ hash: "c30fc0fa9351dbcdbe4f2a297cba9a52"
+ }
+ Frame {
+ msec: 2528
+ hash: "eaf26162fd5ce42262ea08ef39a7123d"
+ }
+ Frame {
+ msec: 2544
+ hash: "7bf0d6a5753a60eefae6d3c3819fabe4"
+ }
+ Frame {
+ msec: 2560
+ hash: "a2ee3a3b9cd22d7c0e54524cad32e647"
+ }
+ Frame {
+ msec: 2576
+ hash: "822298cfc4e2d64db1bf3e442dd891e6"
+ }
+ Frame {
+ msec: 2592
+ hash: "d075c64000b045eae1b42dce701787b7"
+ }
+ Frame {
+ msec: 2608
+ hash: "5ca7f15af781f896c83c81077f6b072e"
+ }
+ Frame {
+ msec: 2624
+ hash: "7d0f14896e67c56ed5238472dc127cb1"
+ }
+ Frame {
+ msec: 2640
+ hash: "dca161e8a9d786ba9d50aa655ccbecd3"
+ }
+ Frame {
+ msec: 2656
+ hash: "73bfcb0f5104efd056f25f7d73126369"
+ }
+ Frame {
+ msec: 2672
+ hash: "0090459043b05bf9504434f36230b32b"
+ }
+ Frame {
+ msec: 2688
+ hash: "f64315858f375c6ded480b2017fc18a5"
+ }
+ Frame {
+ msec: 2704
+ hash: "fe4c0ecfa9779c9fe052d4ffc9386d46"
+ }
+ Frame {
+ msec: 2720
+ hash: "849ad15f0ca893881165e956e8a26174"
+ }
+ Frame {
+ msec: 2736
+ hash: "c4373fa63ed00832c70a6b94cb729397"
+ }
+ Frame {
+ msec: 2752
+ hash: "0c7e08fb7f0dd954b0f171a37ef2a310"
+ }
+ Frame {
+ msec: 2768
+ hash: "505071572df7aa300a675f8a808bc7f4"
+ }
+ Frame {
+ msec: 2784
+ hash: "52839867e81d52746196f299a8371453"
+ }
+ Key {
+ type: 7
+ key: 16777248
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2800
+ hash: "c4d214a7e0fc52c2a45fc6e3df12550a"
+ }
+ Frame {
+ msec: 2816
+ hash: "f1fa48d796667bd053fff4af7ec1d8ce"
+ }
+ Frame {
+ msec: 2832
+ hash: "081e46decc8aba911f018acfd761cda1"
+ }
+ Frame {
+ msec: 2848
+ hash: "fa417c9bfda1da66320a8e59fbaeb5b6"
+ }
+ Frame {
+ msec: 2864
+ hash: "83dfa353fd20f3bf7caa8e6ca9a9933c"
+ }
+ Frame {
+ msec: 2880
+ image: "cursorDelegate.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "c11459b1d3e51f3d2f5bd30049bcca42"
+ }
+ Frame {
+ msec: 2912
+ hash: "997ff3fa82ba2fb27a9c41ed9abe8991"
+ }
+ Frame {
+ msec: 2928
+ hash: "f8baaadde147266416c9ab3f9d9106ce"
+ }
+ Frame {
+ msec: 2944
+ hash: "79d1d34fd343d8de631aa3259167fe26"
+ }
+ Frame {
+ msec: 2960
+ hash: "8b1445ca6131a0fc4377ded24a60186a"
+ }
+ Frame {
+ msec: 2976
+ hash: "784cc01604ecadf74a45164f73f0336d"
+ }
+ Frame {
+ msec: 2992
+ hash: "b9aeac2be5c8e16e7938e141f32776be"
+ }
+ Frame {
+ msec: 3008
+ hash: "b9aeac2be5c8e16e7938e141f32776be"
+ }
+ Frame {
+ msec: 3024
+ hash: "b9aeac2be5c8e16e7938e141f32776be"
+ }
+ Frame {
+ msec: 3040
+ hash: "b9aeac2be5c8e16e7938e141f32776be"
+ }
+ Frame {
+ msec: 3056
+ hash: "b9aeac2be5c8e16e7938e141f32776be"
+ }
+ Frame {
+ msec: 3072
+ hash: "b9aeac2be5c8e16e7938e141f32776be"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3088
+ hash: "00dfc5f4468482cb5f74e62be235b1d2"
+ }
+ Frame {
+ msec: 3104
+ hash: "62bc9c57724f7ab6bcf7d75d8ff68097"
+ }
+ Frame {
+ msec: 3120
+ hash: "ad65de5a6887c0a31a9d8f72a2a651db"
+ }
+ Frame {
+ msec: 3136
+ hash: "75e854ccaad087bfe776a843f0bd7284"
+ }
+ Frame {
+ msec: 3152
+ hash: "1e3f580f37a0dc063a383bdf435e85ea"
+ }
+ Frame {
+ msec: 3168
+ hash: "3d78320cb021944d7c6cee1a42056663"
+ }
+ Frame {
+ msec: 3184
+ hash: "fca865f762c1a6cc3e487e0e908eef73"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3200
+ hash: "fb7ad9156658f3866d19e43f006cf013"
+ }
+ Frame {
+ msec: 3216
+ hash: "6f7411363c66d0959ea5a16a9b610e61"
+ }
+ Frame {
+ msec: 3232
+ hash: "a33dce3c55b1b1541cfb9b85a75fcb53"
+ }
+ Frame {
+ msec: 3248
+ hash: "56b81435dc4ce193bb98c3d02c781242"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3264
+ hash: "59865194eb63465dd0f3925c7a500340"
+ }
+ Frame {
+ msec: 3280
+ hash: "38abc77b2361ce257d39c0cf268ba42b"
+ }
+ Frame {
+ msec: 3296
+ hash: "2b91dcef1b3ca66059dd9db4c8e335f3"
+ }
+ Frame {
+ msec: 3312
+ hash: "70c827f1b34b44cbd775b666913556d6"
+ }
+ Frame {
+ msec: 3328
+ hash: "8ca757a4fd1987329488f63251b0f6b4"
+ }
+ Frame {
+ msec: 3344
+ hash: "0da2c1cd0138172698a3bee5d19168c5"
+ }
+ Frame {
+ msec: 3360
+ hash: "8d71c418593eb3e4834d5e608ffd3f29"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3376
+ hash: "35c0d55cda3a02eb4c441a5832bcbbf4"
+ }
+ Frame {
+ msec: 3392
+ hash: "4e7374a683050ff440056b6e7c971d2b"
+ }
+ Frame {
+ msec: 3408
+ hash: "6310b65572e39256122c7620f7e87442"
+ }
+ Frame {
+ msec: 3424
+ hash: "d882fe91d9df9862d620cf984e27d0bd"
+ }
+ Frame {
+ msec: 3440
+ hash: "97549f388c02adb8884c2e79510adc7e"
+ }
+ Frame {
+ msec: 3456
+ hash: "60a60e06237318bf005f87bbba386fef"
+ }
+ Frame {
+ msec: 3472
+ hash: "2dbe9b5bbb5baf12cd2cbfb4190be316"
+ }
+ Frame {
+ msec: 3488
+ hash: "eacfa8db605b9e386a55508e8943e7d1"
+ }
+ Frame {
+ msec: 3504
+ hash: "e0826ff09b628a5e3ddf6d9e5593f937"
+ }
+ Frame {
+ msec: 3520
+ hash: "2aec32493055ad17f4aac9b3c9b84c5f"
+ }
+ Frame {
+ msec: 3536
+ hash: "c0e72cdf776b0c62742aa9c3683cd523"
+ }
+ Frame {
+ msec: 3552
+ hash: "ea3f512181b3ee94d8cdd4d9f59ed962"
+ }
+ Frame {
+ msec: 3568
+ hash: "de924155855e76d0591217448f79bdb6"
+ }
+ Frame {
+ msec: 3584
+ hash: "51da770a75102de9ad1920f1f6c44146"
+ }
+ Frame {
+ msec: 3600
+ hash: "e3c0e8f6385ef2ab9b671be3243774c4"
+ }
+ Frame {
+ msec: 3616
+ hash: "eac6de65ea6726f0cc50b6d30c1b7ba5"
+ }
+ Frame {
+ msec: 3632
+ hash: "2ee111386bd646c4ee577405e490a2f7"
+ }
+ Frame {
+ msec: 3648
+ hash: "fe95122352effcf1815bc237fc6ce6ab"
+ }
+ Frame {
+ msec: 3664
+ hash: "e3bb1ec3b84df25712f06e0d6963efdd"
+ }
+ Frame {
+ msec: 3680
+ hash: "a10d3184acc85c46e171fe4cf82e1c23"
+ }
+ Frame {
+ msec: 3696
+ hash: "d566b2763312e5e823593806acd9e809"
+ }
+ Frame {
+ msec: 3712
+ hash: "7db073b7487ddea48e7c9df8b9bfdc00"
+ }
+ Frame {
+ msec: 3728
+ hash: "85c663b943f67d158367dba0508980a5"
+ }
+ Frame {
+ msec: 3744
+ hash: "6336ce0d912ee63773475c4c6c5d59be"
+ }
+ Frame {
+ msec: 3760
+ hash: "c75ba80484af36633b6a4d17b666b1c9"
+ }
+ Frame {
+ msec: 3776
+ hash: "08b7d4eef2d15bc717ff1a981a11f275"
+ }
+ Frame {
+ msec: 3792
+ hash: "0ab8bebb0e43786a7e51ea780745080c"
+ }
+ Frame {
+ msec: 3808
+ hash: "6fa1811f520eff9893b3c7b00e53fa7d"
+ }
+ Frame {
+ msec: 3824
+ hash: "6feb44655bfbec651cc2902676bd08b4"
+ }
+ Frame {
+ msec: 3840
+ image: "cursorDelegate.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "00b7714df163d8055514e0dbd8a83bac"
+ }
+ Frame {
+ msec: 3872
+ hash: "6ef2a330d70a7e0ce343bb352c46f126"
+ }
+ Frame {
+ msec: 3888
+ hash: "f4e26309fa3b8a6d55f44bf146544101"
+ }
+ Frame {
+ msec: 3904
+ hash: "dfa1e24149f2662a4a552da3bb64348c"
+ }
+ Frame {
+ msec: 3920
+ hash: "9ab9d6ef4aeb5863401a9e251f684e2d"
+ }
+ Frame {
+ msec: 3936
+ hash: "c9f7591a37a3743b3b48de5337fd2fa0"
+ }
+ Frame {
+ msec: 3952
+ hash: "2d38f17db530050574d9192c805c142d"
+ }
+ Frame {
+ msec: 3968
+ hash: "38a4ad2cf9fa3015eff67014900a44cc"
+ }
+ Frame {
+ msec: 3984
+ hash: "9d9ce4ac0de6caa2f0bb78eac414ba65"
+ }
+ Frame {
+ msec: 4000
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 4016
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 4032
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 4048
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 4064
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 4080
+ hash: "9d9ce4ac0de6caa2f0bb78eac414ba65"
+ }
+ Frame {
+ msec: 4096
+ hash: "38a4ad2cf9fa3015eff67014900a44cc"
+ }
+ Frame {
+ msec: 4112
+ hash: "2d38f17db530050574d9192c805c142d"
+ }
+ Frame {
+ msec: 4128
+ hash: "c9f7591a37a3743b3b48de5337fd2fa0"
+ }
+ Frame {
+ msec: 4144
+ hash: "9ab9d6ef4aeb5863401a9e251f684e2d"
+ }
+ Frame {
+ msec: 4160
+ hash: "dfa1e24149f2662a4a552da3bb64348c"
+ }
+ Frame {
+ msec: 4176
+ hash: "f4e26309fa3b8a6d55f44bf146544101"
+ }
+ Frame {
+ msec: 4192
+ hash: "6ef2a330d70a7e0ce343bb352c46f126"
+ }
+ Frame {
+ msec: 4208
+ hash: "00b7714df163d8055514e0dbd8a83bac"
+ }
+ Frame {
+ msec: 4224
+ hash: "ae46d672649a4b0fc5171f776af93a2c"
+ }
+ Frame {
+ msec: 4240
+ hash: "6feb44655bfbec651cc2902676bd08b4"
+ }
+ Frame {
+ msec: 4256
+ hash: "6fa1811f520eff9893b3c7b00e53fa7d"
+ }
+ Frame {
+ msec: 4272
+ hash: "0ab8bebb0e43786a7e51ea780745080c"
+ }
+ Frame {
+ msec: 4288
+ hash: "08b7d4eef2d15bc717ff1a981a11f275"
+ }
+ Frame {
+ msec: 4304
+ hash: "c75ba80484af36633b6a4d17b666b1c9"
+ }
+ Frame {
+ msec: 4320
+ hash: "6336ce0d912ee63773475c4c6c5d59be"
+ }
+ Frame {
+ msec: 4336
+ hash: "85c663b943f67d158367dba0508980a5"
+ }
+ Frame {
+ msec: 4352
+ hash: "7db073b7487ddea48e7c9df8b9bfdc00"
+ }
+ Frame {
+ msec: 4368
+ hash: "d566b2763312e5e823593806acd9e809"
+ }
+ Frame {
+ msec: 4384
+ hash: "a10d3184acc85c46e171fe4cf82e1c23"
+ }
+ Frame {
+ msec: 4400
+ hash: "e3bb1ec3b84df25712f06e0d6963efdd"
+ }
+ Frame {
+ msec: 4416
+ hash: "fe95122352effcf1815bc237fc6ce6ab"
+ }
+ Frame {
+ msec: 4432
+ hash: "2ee111386bd646c4ee577405e490a2f7"
+ }
+ Frame {
+ msec: 4448
+ hash: "eac6de65ea6726f0cc50b6d30c1b7ba5"
+ }
+ Frame {
+ msec: 4464
+ hash: "e3c0e8f6385ef2ab9b671be3243774c4"
+ }
+ Frame {
+ msec: 4480
+ hash: "51da770a75102de9ad1920f1f6c44146"
+ }
+ Frame {
+ msec: 4496
+ hash: "de924155855e76d0591217448f79bdb6"
+ }
+ Frame {
+ msec: 4512
+ hash: "ea3f512181b3ee94d8cdd4d9f59ed962"
+ }
+ Frame {
+ msec: 4528
+ hash: "c0e72cdf776b0c62742aa9c3683cd523"
+ }
+ Frame {
+ msec: 4544
+ hash: "2aec32493055ad17f4aac9b3c9b84c5f"
+ }
+ Frame {
+ msec: 4560
+ hash: "e0826ff09b628a5e3ddf6d9e5593f937"
+ }
+ Frame {
+ msec: 4576
+ hash: "eacfa8db605b9e386a55508e8943e7d1"
+ }
+ Frame {
+ msec: 4592
+ hash: "2dbe9b5bbb5baf12cd2cbfb4190be316"
+ }
+ Frame {
+ msec: 4608
+ hash: "60a60e06237318bf005f87bbba386fef"
+ }
+ Frame {
+ msec: 4624
+ hash: "97549f388c02adb8884c2e79510adc7e"
+ }
+ Frame {
+ msec: 4640
+ hash: "d882fe91d9df9862d620cf984e27d0bd"
+ }
+ Frame {
+ msec: 4656
+ hash: "6310b65572e39256122c7620f7e87442"
+ }
+ Frame {
+ msec: 4672
+ hash: "4e7374a683050ff440056b6e7c971d2b"
+ }
+ Frame {
+ msec: 4688
+ hash: "35c0d55cda3a02eb4c441a5832bcbbf4"
+ }
+ Frame {
+ msec: 4704
+ hash: "8d71c418593eb3e4834d5e608ffd3f29"
+ }
+ Frame {
+ msec: 4720
+ hash: "0da2c1cd0138172698a3bee5d19168c5"
+ }
+ Frame {
+ msec: 4736
+ hash: "8ca757a4fd1987329488f63251b0f6b4"
+ }
+ Frame {
+ msec: 4752
+ hash: "70c827f1b34b44cbd775b666913556d6"
+ }
+ Frame {
+ msec: 4768
+ hash: "2b91dcef1b3ca66059dd9db4c8e335f3"
+ }
+ Frame {
+ msec: 4784
+ hash: "38abc77b2361ce257d39c0cf268ba42b"
+ }
+ Frame {
+ msec: 4800
+ image: "cursorDelegate.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "7bed5747d6b771db0fe5802153e54f2f"
+ }
+ Frame {
+ msec: 4832
+ hash: "9ac1bf268749bc8e58bc4d04b55ef849"
+ }
+ Frame {
+ msec: 4848
+ hash: "64ea5cb46782d250c46a7a2c8cceea20"
+ }
+ Frame {
+ msec: 4864
+ hash: "d81037eb21bfcb434b6c7f3bbd21ad12"
+ }
+ Frame {
+ msec: 4880
+ hash: "1079ea3a1a62e2cca9a8e907bc5aa4e1"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 130; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4896
+ hash: "3d78320cb021944d7c6cee1a42056663"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 130; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4912
+ hash: "1e3f580f37a0dc063a383bdf435e85ea"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 131; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4928
+ hash: "75e854ccaad087bfe776a843f0bd7284"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 132; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4944
+ hash: "ad65de5a6887c0a31a9d8f72a2a651db"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 133; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 134; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4960
+ hash: "62bc9c57724f7ab6bcf7d75d8ff68097"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 135; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4976
+ hash: "00dfc5f4468482cb5f74e62be235b1d2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 136; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4992
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 137; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 138; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5008
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 139; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5024
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 140; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5040
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 141; y: 100
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 143; y: 100
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5056
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 144; y: 100
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5072
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 146; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5088
+ hash: "748dc58a3ad83d7b99d7b26ad2f82786"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 148; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 149; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5104
+ hash: "242cc0ee7c3bdb44e8933068d3a93b61"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 150; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5120
+ hash: "3be6f0a35fb085dcf6c9481cf1c23f9d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 151; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5136
+ hash: "a6f63267eaba9aefd2c9ab338571ef33"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 152; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 152; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5152
+ hash: "ba37dd9ba649e294465dc707f6b768ec"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 153; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5168
+ hash: "35b186609721ec0b8a121d15bc54ce49"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 154; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5184
+ hash: "700ff15e4e48af93362455a149d90363"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 155; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 156; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5200
+ hash: "1c51eb8d4d25d086bda4d595a49c3a86"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 157; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5216
+ hash: "2f085b047d24384d463163df7fac2bd3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 158; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5232
+ hash: "46d7aff6eb47e50e23c061ecb149fbf9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 160; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 161; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5248
+ hash: "48d7a8f749f7501dbaa4599ca41096a5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 163; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5264
+ hash: "4c2a085c69c118fedfa15fe46cdc508b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 164; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5280
+ hash: "25f25828a4d22fe85db0de5c562f658e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 166; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 168; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5296
+ hash: "e9fb14ec21e9ec1235d2fea6e055b69d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 170; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5312
+ hash: "66417881aeb85778be66566241c45f5a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 174; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5328
+ hash: "c8c136690ffd8e5cc3e58f7376693b4f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 176; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 178; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5344
+ hash: "c58c4fb5b7197cd8bd95742dc8715bbf"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 179; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5360
+ hash: "2e0c93380883fcf2d0e56024fecba605"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 180; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5376
+ hash: "5f169f09e3d868eb0425a331d4bc3144"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 182; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 183; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5392
+ hash: "ed648742be4b0ded04e713e83ed24b27"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 185; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5408
+ hash: "92131288bb38480469f4578282dedaf8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5424
+ hash: "e16773f750bb0f635552b1eeadb2d625"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 189; y: 93
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 191; y: 92
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5440
+ hash: "6e653cd552d82f38f30b8027d1951534"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 192; y: 92
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5456
+ hash: "cfc1d6efa8d1b3b86396704f0be031ad"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 194; y: 92
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5472
+ hash: "5848af73f5ab7c811639a6d01921d502"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 92
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 92
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5488
+ hash: "3823e7da05678f63e6761a81ed7233e2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 199; y: 92
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5504
+ hash: "d095abe9814a60824914960a11663f12"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 200; y: 91
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5520
+ hash: "18922bb3269d903a36e0b690249b473a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 200; y: 91
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 201; y: 90
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5536
+ hash: "4d8400a3ca2b782e7b054bb2f71d4543"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 202; y: 89
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5552
+ hash: "24ed25d7a767f01fb02f545fc6c6931a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 88
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5568
+ hash: "55fb16784e3655ae70f97d6c32853cdc"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 88
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5584
+ hash: "694e6979f0de62b61324dc4b144a2d5d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 207; y: 86
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 208; y: 85
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5600
+ hash: "e61b8b03251f6312e3de4e0c8af684d5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 210; y: 85
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5616
+ hash: "6203321f87d53692dbb2b2aaf7dd3944"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 212; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5632
+ hash: "297b77029475d77cd8e481199b23da30"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 213; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 214; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5648
+ hash: "414615d772b4c80bf85eabfdca6fd0e0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 215; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5664
+ hash: "46d70882552a21267eebb3505da086f3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 216; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5680
+ hash: "372acafc63624307bcb384c48a803ab7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 216; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 217; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5696
+ hash: "1b98094dd4f192af8229b7058b8ce396"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 218; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5712
+ hash: "d627fa0ce696e46650225e43134643f5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 218; y: 84
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5728
+ hash: "0410f4b504d768bc00940b20d3d942f9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 219; y: 85
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 219; y: 86
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 220; y: 86
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5744
+ hash: "5f8011b44681d769800af8d205c757cb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 221; y: 87
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5760
+ image: "cursorDelegate.5.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 222; y: 87
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5776
+ hash: "99f7a46f841f96445962b5fb3496d996"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 222; y: 88
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5792
+ hash: "ed8bba2823ca2fe7cf138af0fcc52806"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 224; y: 90
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5808
+ hash: "c9007b7ae5038ba59bfc6fac15c80d5f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 226; y: 92
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5824
+ hash: "2db81c955a99652bcfef958e870054af"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 228; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5840
+ hash: "1e3906d7f3ee5a29c3c90b8e1f6c1eb0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 229; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 231; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5856
+ hash: "fc59738903cc9e6f36ef4d27bfde9496"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 232; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5872
+ hash: "768aaf4ef2b13b40b75bdf15787966b6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 233; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5888
+ hash: "3085baedc0c58a6757b134bb4f80fa9e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 233; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5904
+ hash: "0a1b8cad167bf93801f4d0dd34bf872e"
+ }
+ Frame {
+ msec: 5920
+ hash: "6366e04808ee015feed44d95cc117e1e"
+ }
+ Frame {
+ msec: 5936
+ hash: "dd67a8542a243aac9462e25dc1586e6e"
+ }
+ Frame {
+ msec: 5952
+ hash: "e06c8788b2ef327d005b4048f0807334"
+ }
+ Frame {
+ msec: 5968
+ hash: "dda2beda1253bd477d04cada4ec4df27"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 233; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5984
+ hash: "d659d1724637d90497c8e417764d3477"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 232; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 232; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6000
+ hash: "91035aecf2ac15f3c2c3dbc4b73b540f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 231; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6016
+ hash: "91035aecf2ac15f3c2c3dbc4b73b540f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 230; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6032
+ hash: "91035aecf2ac15f3c2c3dbc4b73b540f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 229; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 228; y: 100
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6048
+ hash: "91035aecf2ac15f3c2c3dbc4b73b540f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 227; y: 100
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6064
+ hash: "91035aecf2ac15f3c2c3dbc4b73b540f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 225; y: 100
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6080
+ hash: "bdc53613cad59416ed79287874eb59f8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 224; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 222; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6096
+ hash: "54efe0acb07fb69827024a566773a36e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 220; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6112
+ hash: "860530a5ac3d89193f3cf234e21f8f6a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 219; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6128
+ hash: "ade5f8e28159304b22866f688efdbb46"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 217; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 216; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6144
+ hash: "7d5f5cf34910527d899e89ea07fb7254"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 215; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6160
+ hash: "c201ed0f2419396a229d8396152aba01"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 213; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6176
+ hash: "b99135e2cb03ab252ff379c8001c26ad"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 212; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 212; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6192
+ hash: "768aaf4ef2b13b40b75bdf15787966b6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 210; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6208
+ hash: "71a5bed1a87e16c986b2f4b245e956b8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 210; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6224
+ hash: "7155607add8c7254286097cda52b5888"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 208; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 207; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6240
+ hash: "e516e4d8a4ef0195ae04b3287f536ffd"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6256
+ hash: "afa06d10b37d8ad8b57e392142ff50f2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 205; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6272
+ hash: "88c3fe68f7251d87a5bf197b9d59b899"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 204; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 203; y: 104
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6288
+ hash: "b2687baf5148539ee2181b18077e0a3d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 202; y: 104
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6304
+ hash: "457aed68cee2b9f3ff3c7d5f0eb2b6aa"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 201; y: 104
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6320
+ hash: "48bb4683718a3b7c34baea29260fbe8c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 200; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 199; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6336
+ hash: "7c32fbf799bbfc10d0fbdd96bcfa9d95"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 197; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6352
+ hash: "68cee3b8213a9d38e2ed431d06eb6756"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 196; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 194; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6368
+ hash: "596c732c40a86d16bc649f164b919457"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 191; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 188; y: 100
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6384
+ hash: "d9cb5bf69d4f8aaebefae6d680a99185"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 187; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6400
+ hash: "bb6759f3aff00f027f4f426efb775d2d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 185; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6416
+ hash: "a408d88f97c30ab8ab12a222b03571b4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 182; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6432
+ hash: "bb2e8994dc014eb6d4e4e33257269c2a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 176; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6448
+ hash: "190e9df0b8d20b0f37a198e9f3976416"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 171; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6464
+ hash: "aa7be52534c8550948deea6ae174330d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 166; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 163; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6480
+ hash: "533caac613ea1279a51a5b5b29acdccc"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 160; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6496
+ hash: "288cc34879d9ed8ed381ba6cc31de3e7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 159; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6512
+ hash: "2a57602c47ab788f288daa81b985fc1d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 157; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 156; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6528
+ hash: "fa3540fafa1a9e3c5e796b598dce8fb1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 156; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6544
+ hash: "7e9b17ae7c10cb30153539911ac6eb13"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 155; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6560
+ hash: "9e62b16c858e80ff1294ec53e2390498"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 154; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 153; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6576
+ hash: "287470e6cf9bd4b9acfd1cd1512307e3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 152; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 151; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6592
+ hash: "4086c7c7a573a1b9f98d22ebf9b46c5f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 149; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6608
+ hash: "7d0868f000a1102916720a29a332543f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 148; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6624
+ hash: "bda3cfdca81f7cba54514c512eb6b12e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 146; y: 96
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6640
+ hash: "923ff9fac39c3fba2c9cf7b52fc652ad"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 145; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6656
+ hash: "269718e3586affbbdf0b9599e12f5677"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 145; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6672
+ hash: "d12e03b5da6ea7b162d7dec6930c1a54"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 144; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6688
+ hash: "96edf1f15c674c5d8c4e4ce9e1d34f1d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 144; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6704
+ hash: "70ce229fae6985dd49de8cca01c031e6"
+ }
+ Frame {
+ msec: 6720
+ image: "cursorDelegate.6.png"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 144; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6736
+ hash: "56215b7d24ac382ff1ed256c80d14091"
+ }
+ Frame {
+ msec: 6752
+ hash: "ac132304e072806431803d26e345b264"
+ }
+ Frame {
+ msec: 6768
+ hash: "a8f3e7fbb95ed8fe2b83871eb3d2c151"
+ }
+ Frame {
+ msec: 6784
+ hash: "43906030c2572af0f8f0577dbc86e346"
+ }
+ Frame {
+ msec: 6800
+ hash: "d64b58801430d5063225dceac1603bca"
+ }
+ Frame {
+ msec: 6816
+ hash: "56b81435dc4ce193bb98c3d02c781242"
+ }
+ Frame {
+ msec: 6832
+ hash: "a33dce3c55b1b1541cfb9b85a75fcb53"
+ }
+ Frame {
+ msec: 6848
+ hash: "6f7411363c66d0959ea5a16a9b610e61"
+ }
+ Frame {
+ msec: 6864
+ hash: "fb7ad9156658f3866d19e43f006cf013"
+ }
+ Frame {
+ msec: 6880
+ hash: "fca865f762c1a6cc3e487e0e908eef73"
+ }
+ Frame {
+ msec: 6896
+ hash: "3d78320cb021944d7c6cee1a42056663"
+ }
+ Frame {
+ msec: 6912
+ hash: "1e3f580f37a0dc063a383bdf435e85ea"
+ }
+ Frame {
+ msec: 6928
+ hash: "75e854ccaad087bfe776a843f0bd7284"
+ }
+ Frame {
+ msec: 6944
+ hash: "ad65de5a6887c0a31a9d8f72a2a651db"
+ }
+ Frame {
+ msec: 6960
+ hash: "62bc9c57724f7ab6bcf7d75d8ff68097"
+ }
+ Frame {
+ msec: 6976
+ hash: "00dfc5f4468482cb5f74e62be235b1d2"
+ }
+ Frame {
+ msec: 6992
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 7008
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 7024
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 7040
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 7056
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 7072
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 7088
+ hash: "00dfc5f4468482cb5f74e62be235b1d2"
+ }
+ Frame {
+ msec: 7104
+ hash: "62bc9c57724f7ab6bcf7d75d8ff68097"
+ }
+ Frame {
+ msec: 7120
+ hash: "ad65de5a6887c0a31a9d8f72a2a651db"
+ }
+ Frame {
+ msec: 7136
+ hash: "75e854ccaad087bfe776a843f0bd7284"
+ }
+ Frame {
+ msec: 7152
+ hash: "1e3f580f37a0dc063a383bdf435e85ea"
+ }
+ Frame {
+ msec: 7168
+ hash: "3d78320cb021944d7c6cee1a42056663"
+ }
+ Frame {
+ msec: 7184
+ hash: "fca865f762c1a6cc3e487e0e908eef73"
+ }
+ Frame {
+ msec: 7200
+ hash: "fb7ad9156658f3866d19e43f006cf013"
+ }
+ Frame {
+ msec: 7216
+ hash: "6f7411363c66d0959ea5a16a9b610e61"
+ }
+ Frame {
+ msec: 7232
+ hash: "a33dce3c55b1b1541cfb9b85a75fcb53"
+ }
+ Frame {
+ msec: 7248
+ hash: "56b81435dc4ce193bb98c3d02c781242"
+ }
+ Frame {
+ msec: 7264
+ hash: "d64b58801430d5063225dceac1603bca"
+ }
+ Frame {
+ msec: 7280
+ hash: "43906030c2572af0f8f0577dbc86e346"
+ }
+ Frame {
+ msec: 7296
+ hash: "a8f3e7fbb95ed8fe2b83871eb3d2c151"
+ }
+ Frame {
+ msec: 7312
+ hash: "ac132304e072806431803d26e345b264"
+ }
+ Frame {
+ msec: 7328
+ hash: "56215b7d24ac382ff1ed256c80d14091"
+ }
+ Frame {
+ msec: 7344
+ hash: "4d5c97925b21d699f1c3720a3f51ebbb"
+ }
+ Frame {
+ msec: 7360
+ hash: "70ce229fae6985dd49de8cca01c031e6"
+ }
+ Frame {
+ msec: 7376
+ hash: "96edf1f15c674c5d8c4e4ce9e1d34f1d"
+ }
+ Frame {
+ msec: 7392
+ hash: "d12e03b5da6ea7b162d7dec6930c1a54"
+ }
+ Frame {
+ msec: 7408
+ hash: "269718e3586affbbdf0b9599e12f5677"
+ }
+ Frame {
+ msec: 7424
+ hash: "42d19ea6dd328c505da5a4eee23a257d"
+ }
+ Frame {
+ msec: 7440
+ hash: "e4d9d77859759dd95cf3ffee8f142cd8"
+ }
+ Frame {
+ msec: 7456
+ hash: "445e4c6e9872b63a1461e3277dd8185c"
+ }
+ Frame {
+ msec: 7472
+ hash: "d6343c629acd987179eae0d158d2504c"
+ }
+ Frame {
+ msec: 7488
+ hash: "a5340087baa2c3694ed0cc2bbc3e2ad9"
+ }
+ Frame {
+ msec: 7504
+ hash: "205973c30aaca71d1f20e740ce971d82"
+ }
+ Frame {
+ msec: 7520
+ hash: "ed28c7e07755e177222c7e322116bfb4"
+ }
+ Frame {
+ msec: 7536
+ hash: "6cebfc407a985694c803940608ab1303"
+ }
+ Frame {
+ msec: 7552
+ hash: "87f825fc820d3942e4d9b5ece5be3714"
+ }
+ Frame {
+ msec: 7568
+ hash: "9aa56dfe90ed2eba58eee0ff6ff3822c"
+ }
+ Frame {
+ msec: 7584
+ hash: "c93acf87a918f21a55cf39ea255315a3"
+ }
+ Frame {
+ msec: 7600
+ hash: "f8ce1bec5d5016c56fc66d52c28e69d1"
+ }
+ Frame {
+ msec: 7616
+ hash: "a365dba2f7c4be77ea98b727813c2f03"
+ }
+ Frame {
+ msec: 7632
+ hash: "e8d1c35ee9ef74c4070adfce5e4560f1"
+ }
+ Frame {
+ msec: 7648
+ hash: "f5f2dbb041eeb4de1821761f4fbca506"
+ }
+ Frame {
+ msec: 7664
+ hash: "f4ea6e9dff51778e9b5d1321453617ec"
+ }
+ Frame {
+ msec: 7680
+ image: "cursorDelegate.7.png"
+ }
+ Frame {
+ msec: 7696
+ hash: "f2869791dde1eb4c2ea24e04dc3ac653"
+ }
+ Frame {
+ msec: 7712
+ hash: "9bd70e91b765de22b70fe295adc4f87f"
+ }
+ Frame {
+ msec: 7728
+ hash: "c0338d0a5c72ba63bff666a76ab3242c"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 227; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7744
+ hash: "cb2a643eed9b5658260e04495820cd3d"
+ }
+ Frame {
+ msec: 7760
+ hash: "6dda51f2e611b1f589c75820fd8c7295"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 227; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7776
+ hash: "98d8692afd47c61421ddcae62414a72e"
+ }
+ Frame {
+ msec: 7792
+ hash: "2c533bcdd9df45c6f942d47509ebf20e"
+ }
+ Frame {
+ msec: 7808
+ hash: "d28f231fb1e128329e8985689deac882"
+ }
+ Frame {
+ msec: 7824
+ hash: "ea73450baf98a2f629ce1c203cfcd728"
+ }
+ Frame {
+ msec: 7840
+ hash: "959a31d38edc343b5e081fd0cddc81df"
+ }
+ Frame {
+ msec: 7856
+ hash: "9b1ae10ee8e9b3f176357733af9e6735"
+ }
+ Frame {
+ msec: 7872
+ hash: "89b0dd11f456bbb321e0bd2e1614c193"
+ }
+ Frame {
+ msec: 7888
+ hash: "a0a3aa6d8d4c677894e745ee432084e2"
+ }
+ Frame {
+ msec: 7904
+ hash: "f63207b8903085b19de1c9b6a9ff90e0"
+ }
+ Frame {
+ msec: 7920
+ hash: "c8f2126fece8c2b473c6511aa568dddb"
+ }
+ Frame {
+ msec: 7936
+ hash: "6ccd1f30e85dbad74468c228d92a9a3c"
+ }
+ Frame {
+ msec: 7952
+ hash: "bae09fe9f29e0f6ebda298cae753ddab"
+ }
+ Frame {
+ msec: 7968
+ hash: "cde4abae868488345fb124b927f46b45"
+ }
+ Frame {
+ msec: 7984
+ hash: "a88ccf9c8ae34ffcfd15af4e66102040"
+ }
+ Frame {
+ msec: 8000
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 8016
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 8032
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 8048
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 8064
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 8080
+ hash: "a88ccf9c8ae34ffcfd15af4e66102040"
+ }
+ Frame {
+ msec: 8096
+ hash: "cde4abae868488345fb124b927f46b45"
+ }
+ Frame {
+ msec: 8112
+ hash: "bae09fe9f29e0f6ebda298cae753ddab"
+ }
+ Frame {
+ msec: 8128
+ hash: "6ccd1f30e85dbad74468c228d92a9a3c"
+ }
+ Frame {
+ msec: 8144
+ hash: "c8f2126fece8c2b473c6511aa568dddb"
+ }
+ Frame {
+ msec: 8160
+ hash: "f63207b8903085b19de1c9b6a9ff90e0"
+ }
+ Frame {
+ msec: 8176
+ hash: "a0a3aa6d8d4c677894e745ee432084e2"
+ }
+ Frame {
+ msec: 8192
+ hash: "89b0dd11f456bbb321e0bd2e1614c193"
+ }
+ Frame {
+ msec: 8208
+ hash: "9b1ae10ee8e9b3f176357733af9e6735"
+ }
+ Frame {
+ msec: 8224
+ hash: "959a31d38edc343b5e081fd0cddc81df"
+ }
+ Frame {
+ msec: 8240
+ hash: "ea73450baf98a2f629ce1c203cfcd728"
+ }
+ Frame {
+ msec: 8256
+ hash: "d28f231fb1e128329e8985689deac882"
+ }
+ Frame {
+ msec: 8272
+ hash: "2c533bcdd9df45c6f942d47509ebf20e"
+ }
+ Frame {
+ msec: 8288
+ hash: "98d8692afd47c61421ddcae62414a72e"
+ }
+ Frame {
+ msec: 8304
+ hash: "6dda51f2e611b1f589c75820fd8c7295"
+ }
+ Frame {
+ msec: 8320
+ hash: "cb2a643eed9b5658260e04495820cd3d"
+ }
+ Frame {
+ msec: 8336
+ hash: "88afd2fa1182fbb2aab100d4587a1006"
+ }
+ Frame {
+ msec: 8352
+ hash: "bc657c5181a11a9ff9565f134bdccb8d"
+ }
+ Frame {
+ msec: 8368
+ hash: "a296634d814a6e12f9d09f4d8a9fa097"
+ }
+ Frame {
+ msec: 8384
+ hash: "f05a2deeb12722904c4f31d641dffeb4"
+ }
+ Frame {
+ msec: 8400
+ hash: "75823698247e39dd10a70fe224e13597"
+ }
+ Frame {
+ msec: 8416
+ hash: "244fa06c168f7a7401b8ec7f5ddb0e52"
+ }
+ Frame {
+ msec: 8432
+ hash: "a78e0f88d269290e9086d1d854618f0c"
+ }
+ Frame {
+ msec: 8448
+ hash: "57b1281d29d5c5fdc15d9cf1e3a5545c"
+ }
+ Frame {
+ msec: 8464
+ hash: "a24ac211ef29dcf7f22ac95991f1af3f"
+ }
+ Frame {
+ msec: 8480
+ hash: "361f978ea3597fd518c25c0069c22e8b"
+ }
+ Frame {
+ msec: 8496
+ hash: "ac8e2c01eb58aac0eb4feb6aba9b9628"
+ }
+ Frame {
+ msec: 8512
+ hash: "6099612934b5eb90296f1cc3cb5c1a84"
+ }
+ Frame {
+ msec: 8528
+ hash: "7c3f08291168065fc9c1d62108022d33"
+ }
+ Frame {
+ msec: 8544
+ hash: "8bf57ba445d668af5f3e59276c4f8800"
+ }
+ Frame {
+ msec: 8560
+ hash: "c8ed352cbfbc472ea4802a9e03d40052"
+ }
+ Frame {
+ msec: 8576
+ hash: "11e5546b30e47d2f3067c0364b9f0877"
+ }
+ Frame {
+ msec: 8592
+ hash: "9df0f136fca92d4a05f17ee68f0cd286"
+ }
+ Frame {
+ msec: 8608
+ hash: "39f47838a622ba328548cad57cca9e12"
+ }
+ Frame {
+ msec: 8624
+ hash: "c891d582be4b23c01e29032fe861081f"
+ }
+ Frame {
+ msec: 8640
+ image: "cursorDelegate.8.png"
+ }
+ Frame {
+ msec: 8656
+ hash: "c3820dfd382c4568d9fbd2ee95889eda"
+ }
+ Frame {
+ msec: 8672
+ hash: "528cf8778318bf7216b54f983dadb2b4"
+ }
+ Frame {
+ msec: 8688
+ hash: "419518a3c63aa36f6070e95eb93e58a3"
+ }
+ Frame {
+ msec: 8704
+ hash: "11b22e2853c0a9ea6e4ac764348698c9"
+ }
+ Frame {
+ msec: 8720
+ hash: "8018329c4b57647942ae34a5f83c2b12"
+ }
+ Frame {
+ msec: 8736
+ hash: "c37e9fd5c3d664c2e4911c8cb9fcabf7"
+ }
+ Frame {
+ msec: 8752
+ hash: "4e7895f802c9fc249894ba0db25959f7"
+ }
+ Frame {
+ msec: 8768
+ hash: "5fed71d99ef70432bc6be8caaea36f17"
+ }
+ Frame {
+ msec: 8784
+ hash: "69976d074acbd7a5731c70b33c8f084b"
+ }
+ Frame {
+ msec: 8800
+ hash: "c88952348da3df0627b12b8bb05ca13e"
+ }
+ Frame {
+ msec: 8816
+ hash: "cc5222da7a17c66d4db146c406492701"
+ }
+ Frame {
+ msec: 8832
+ hash: "8915e752776da27cb86019c9decc8a8c"
+ }
+ Frame {
+ msec: 8848
+ hash: "d8a77ccc7c01cf187e846a2903e1c55e"
+ }
+ Frame {
+ msec: 8864
+ hash: "3cf3f02f98a199c81ef73e8905e7f7ee"
+ }
+ Frame {
+ msec: 8880
+ hash: "7a1d47e0109fc370bf63714040cbef96"
+ }
+ Frame {
+ msec: 8896
+ hash: "2ca8b8ddbe73b29327e474da34a14a87"
+ }
+ Frame {
+ msec: 8912
+ hash: "ee75214865fca848aa38cc05b6049d8f"
+ }
+ Frame {
+ msec: 8928
+ hash: "05ab7d8118a806f2215160f5f266a082"
+ }
+ Frame {
+ msec: 8944
+ hash: "31e63095b7be56d0bf75e9cff832feb7"
+ }
+ Frame {
+ msec: 8960
+ hash: "3ffda2c2f154f1eb806e9f0963057fa1"
+ }
+ Frame {
+ msec: 8976
+ hash: "4e805203b58e8f6f331f2e878704fa01"
+ }
+ Frame {
+ msec: 8992
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 9008
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 9024
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 9040
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 9056
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 9072
+ hash: "60edce44dd4ca7fac8d8093990ee5ec1"
+ }
+ Frame {
+ msec: 9088
+ hash: "4e805203b58e8f6f331f2e878704fa01"
+ }
+ Frame {
+ msec: 9104
+ hash: "3ffda2c2f154f1eb806e9f0963057fa1"
+ }
+ Frame {
+ msec: 9120
+ hash: "31e63095b7be56d0bf75e9cff832feb7"
+ }
+ Frame {
+ msec: 9136
+ hash: "05ab7d8118a806f2215160f5f266a082"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.0.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.0.png
new file mode 100644
index 0000000000..95a835aaec
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.1.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.1.png
new file mode 100644
index 0000000000..409192c6eb
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.2.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.2.png
new file mode 100644
index 0000000000..cd2f11213e
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.3.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.3.png
new file mode 100644
index 0000000000..7191c1ef69
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.qml b/tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.qml
new file mode 100644
index 0000000000..352c890388
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/qt-669.qml
@@ -0,0 +1,1371 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 32
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 48
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 64
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 80
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 96
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 112
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 128
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 144
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 160
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 176
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 192
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 208
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 224
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 240
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 256
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 272
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 288
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 304
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 320
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 336
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 352
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 368
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 384
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 400
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 416
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 432
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 448
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 464
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 480
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 496
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 512
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 528
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 544
+ hash: "394360c0bff5ee3ad206d2911838d64e"
+ }
+ Frame {
+ msec: 560
+ hash: "394360c0bff5ee3ad206d2911838d64e"
+ }
+ Frame {
+ msec: 576
+ hash: "394360c0bff5ee3ad206d2911838d64e"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 592
+ hash: "394360c0bff5ee3ad206d2911838d64e"
+ }
+ Frame {
+ msec: 608
+ hash: "394360c0bff5ee3ad206d2911838d64e"
+ }
+ Frame {
+ msec: 624
+ hash: "394360c0bff5ee3ad206d2911838d64e"
+ }
+ Frame {
+ msec: 640
+ hash: "394360c0bff5ee3ad206d2911838d64e"
+ }
+ Frame {
+ msec: 656
+ hash: "394360c0bff5ee3ad206d2911838d64e"
+ }
+ Frame {
+ msec: 672
+ hash: "394360c0bff5ee3ad206d2911838d64e"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 688
+ hash: "3c455f51fea0926576077d55d6fbfbb2"
+ }
+ Frame {
+ msec: 704
+ hash: "3c455f51fea0926576077d55d6fbfbb2"
+ }
+ Frame {
+ msec: 720
+ hash: "3c455f51fea0926576077d55d6fbfbb2"
+ }
+ Frame {
+ msec: 736
+ hash: "3c455f51fea0926576077d55d6fbfbb2"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 752
+ hash: "3c455f51fea0926576077d55d6fbfbb2"
+ }
+ Frame {
+ msec: 768
+ hash: "3c455f51fea0926576077d55d6fbfbb2"
+ }
+ Frame {
+ msec: 784
+ hash: "3c455f51fea0926576077d55d6fbfbb2"
+ }
+ Frame {
+ msec: 800
+ hash: "3c455f51fea0926576077d55d6fbfbb2"
+ }
+ Frame {
+ msec: 816
+ hash: "3c455f51fea0926576077d55d6fbfbb2"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 832
+ hash: "c87aaf72137c2b9e8c876879e7215072"
+ }
+ Frame {
+ msec: 848
+ hash: "c87aaf72137c2b9e8c876879e7215072"
+ }
+ Frame {
+ msec: 864
+ hash: "c87aaf72137c2b9e8c876879e7215072"
+ }
+ Frame {
+ msec: 880
+ hash: "c87aaf72137c2b9e8c876879e7215072"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 896
+ hash: "c87aaf72137c2b9e8c876879e7215072"
+ }
+ Frame {
+ msec: 912
+ hash: "c87aaf72137c2b9e8c876879e7215072"
+ }
+ Frame {
+ msec: 928
+ hash: "c87aaf72137c2b9e8c876879e7215072"
+ }
+ Frame {
+ msec: 944
+ hash: "c87aaf72137c2b9e8c876879e7215072"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 960
+ image: "qt-669.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 992
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 1008
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1024
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 1040
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 1056
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 1072
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 1088
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1104
+ hash: "c899e9d181860f682ba7275fa36f82a1"
+ }
+ Frame {
+ msec: 1120
+ hash: "c899e9d181860f682ba7275fa36f82a1"
+ }
+ Frame {
+ msec: 1136
+ hash: "c899e9d181860f682ba7275fa36f82a1"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1152
+ hash: "c899e9d181860f682ba7275fa36f82a1"
+ }
+ Frame {
+ msec: 1168
+ hash: "c899e9d181860f682ba7275fa36f82a1"
+ }
+ Frame {
+ msec: 1184
+ hash: "c899e9d181860f682ba7275fa36f82a1"
+ }
+ Frame {
+ msec: 1200
+ hash: "c899e9d181860f682ba7275fa36f82a1"
+ }
+ Frame {
+ msec: 1216
+ hash: "c899e9d181860f682ba7275fa36f82a1"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1232
+ hash: "1313880b796ae7134f50fa8dafa4a974"
+ }
+ Frame {
+ msec: 1248
+ hash: "1313880b796ae7134f50fa8dafa4a974"
+ }
+ Frame {
+ msec: 1264
+ hash: "1313880b796ae7134f50fa8dafa4a974"
+ }
+ Frame {
+ msec: 1280
+ hash: "1313880b796ae7134f50fa8dafa4a974"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1296
+ hash: "1313880b796ae7134f50fa8dafa4a974"
+ }
+ Frame {
+ msec: 1312
+ hash: "1313880b796ae7134f50fa8dafa4a974"
+ }
+ Frame {
+ msec: 1328
+ hash: "1313880b796ae7134f50fa8dafa4a974"
+ }
+ Frame {
+ msec: 1344
+ hash: "1313880b796ae7134f50fa8dafa4a974"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1360
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Frame {
+ msec: 1376
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Frame {
+ msec: 1392
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Frame {
+ msec: 1408
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1424
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Frame {
+ msec: 1440
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Frame {
+ msec: 1456
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Frame {
+ msec: 1472
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Frame {
+ msec: 1488
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1504
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1520
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1536
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1552
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1568
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1584
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1600
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1616
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1632
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1648
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1664
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1680
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1696
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1712
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1728
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1744
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1760
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1776
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1792
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1808
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1824
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Frame {
+ msec: 1840
+ hash: "a3b98f215b2329e29d17b61eba0f9e45"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1856
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Frame {
+ msec: 1872
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Frame {
+ msec: 1888
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Frame {
+ msec: 1904
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Frame {
+ msec: 1920
+ image: "qt-669.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Frame {
+ msec: 1952
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Frame {
+ msec: 1968
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Frame {
+ msec: 1984
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2000
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Frame {
+ msec: 2016
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Frame {
+ msec: 2032
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Frame {
+ msec: 2048
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Frame {
+ msec: 2064
+ hash: "d85314199885fdf9cc8e666c3fb723fb"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2080
+ hash: "1313880b796ae7134f50fa8dafa4a974"
+ }
+ Frame {
+ msec: 2096
+ hash: "1313880b796ae7134f50fa8dafa4a974"
+ }
+ Frame {
+ msec: 2112
+ hash: "1313880b796ae7134f50fa8dafa4a974"
+ }
+ Frame {
+ msec: 2128
+ hash: "1313880b796ae7134f50fa8dafa4a974"
+ }
+ Frame {
+ msec: 2144
+ hash: "1313880b796ae7134f50fa8dafa4a974"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2160
+ hash: "1313880b796ae7134f50fa8dafa4a974"
+ }
+ Frame {
+ msec: 2176
+ hash: "1313880b796ae7134f50fa8dafa4a974"
+ }
+ Frame {
+ msec: 2192
+ hash: "1313880b796ae7134f50fa8dafa4a974"
+ }
+ Frame {
+ msec: 2208
+ hash: "1313880b796ae7134f50fa8dafa4a974"
+ }
+ Frame {
+ msec: 2224
+ hash: "1313880b796ae7134f50fa8dafa4a974"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2240
+ hash: "c899e9d181860f682ba7275fa36f82a1"
+ }
+ Frame {
+ msec: 2256
+ hash: "c899e9d181860f682ba7275fa36f82a1"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2272
+ hash: "c899e9d181860f682ba7275fa36f82a1"
+ }
+ Frame {
+ msec: 2288
+ hash: "c899e9d181860f682ba7275fa36f82a1"
+ }
+ Frame {
+ msec: 2304
+ hash: "c899e9d181860f682ba7275fa36f82a1"
+ }
+ Frame {
+ msec: 2320
+ hash: "c899e9d181860f682ba7275fa36f82a1"
+ }
+ Frame {
+ msec: 2336
+ hash: "c899e9d181860f682ba7275fa36f82a1"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2352
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 2368
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 2384
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2400
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 2416
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 2432
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 2448
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 2464
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 2480
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 2496
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 2512
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 2528
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 2544
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 2560
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 2576
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Frame {
+ msec: 2592
+ hash: "2caf044acf7aaf0af6a03e7b8180fa16"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2608
+ hash: "c87aaf72137c2b9e8c876879e7215072"
+ }
+ Frame {
+ msec: 2624
+ hash: "c87aaf72137c2b9e8c876879e7215072"
+ }
+ Frame {
+ msec: 2640
+ hash: "c87aaf72137c2b9e8c876879e7215072"
+ }
+ Frame {
+ msec: 2656
+ hash: "c87aaf72137c2b9e8c876879e7215072"
+ }
+ Frame {
+ msec: 2672
+ hash: "c87aaf72137c2b9e8c876879e7215072"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2688
+ hash: "c87aaf72137c2b9e8c876879e7215072"
+ }
+ Frame {
+ msec: 2704
+ hash: "c87aaf72137c2b9e8c876879e7215072"
+ }
+ Frame {
+ msec: 2720
+ hash: "c87aaf72137c2b9e8c876879e7215072"
+ }
+ Frame {
+ msec: 2736
+ hash: "c87aaf72137c2b9e8c876879e7215072"
+ }
+ Frame {
+ msec: 2752
+ hash: "c87aaf72137c2b9e8c876879e7215072"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2768
+ hash: "3c455f51fea0926576077d55d6fbfbb2"
+ }
+ Frame {
+ msec: 2784
+ hash: "3c455f51fea0926576077d55d6fbfbb2"
+ }
+ Frame {
+ msec: 2800
+ hash: "3c455f51fea0926576077d55d6fbfbb2"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2816
+ hash: "3c455f51fea0926576077d55d6fbfbb2"
+ }
+ Frame {
+ msec: 2832
+ hash: "3c455f51fea0926576077d55d6fbfbb2"
+ }
+ Frame {
+ msec: 2848
+ hash: "3c455f51fea0926576077d55d6fbfbb2"
+ }
+ Frame {
+ msec: 2864
+ hash: "3c455f51fea0926576077d55d6fbfbb2"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2880
+ image: "qt-669.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "394360c0bff5ee3ad206d2911838d64e"
+ }
+ Frame {
+ msec: 2912
+ hash: "394360c0bff5ee3ad206d2911838d64e"
+ }
+ Frame {
+ msec: 2928
+ hash: "394360c0bff5ee3ad206d2911838d64e"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2944
+ hash: "394360c0bff5ee3ad206d2911838d64e"
+ }
+ Frame {
+ msec: 2960
+ hash: "394360c0bff5ee3ad206d2911838d64e"
+ }
+ Frame {
+ msec: 2976
+ hash: "394360c0bff5ee3ad206d2911838d64e"
+ }
+ Frame {
+ msec: 2992
+ hash: "394360c0bff5ee3ad206d2911838d64e"
+ }
+ Frame {
+ msec: 3008
+ hash: "394360c0bff5ee3ad206d2911838d64e"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3024
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3040
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3056
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3072
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3088
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3104
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3120
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3136
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3152
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3168
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3184
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3200
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3216
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3232
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3248
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3264
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3280
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3296
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3312
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3328
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3344
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3360
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3376
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3392
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3408
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3424
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3440
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3456
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3472
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3488
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3504
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3520
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3536
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3552
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3568
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3584
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3600
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3616
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3632
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3648
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3664
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3680
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Frame {
+ msec: 3696
+ hash: "10573e4c9dab5bd6e46ec79949c098e5"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3712
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 3728
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 3744
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 3760
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 3776
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 3792
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3808
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 3824
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 3840
+ image: "qt-669.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 3872
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 3888
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 3904
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 3920
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 3936
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 3952
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 3968
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 3984
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4000
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4016
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4032
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4048
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4064
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4080
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4096
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4112
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4128
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4144
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4160
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4176
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4192
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4208
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4224
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4240
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4256
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4272
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4288
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+ Frame {
+ msec: 4304
+ hash: "4e0ce00bde70a96774a6477ef2305b7f"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.0.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.0.png
new file mode 100644
index 0000000000..ec65f494b6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.1.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.1.png
new file mode 100644
index 0000000000..ec65f494b6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.2.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.2.png
new file mode 100644
index 0000000000..ec65f494b6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.3.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.3.png
new file mode 100644
index 0000000000..ec65f494b6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.4.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.4.png
new file mode 100644
index 0000000000..ec65f494b6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.5.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.5.png
new file mode 100644
index 0000000000..ec65f494b6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.6.png b/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.6.png
new file mode 100644
index 0000000000..ec65f494b6
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.qml b/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.qml
new file mode 100644
index 0000000000..f96daa9cf8
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/data/wrap.qml
@@ -0,0 +1,2467 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 84
+ modifiers: 33554432
+ text: "54"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 32
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 16777248
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 48
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 64
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 80
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 96
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 72
+ modifiers: 0
+ text: "68"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 112
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 128
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 144
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 73
+ modifiers: 0
+ text: "69"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 160
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 176
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 192
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 72
+ modifiers: 0
+ text: "68"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 208
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 224
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 240
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 73
+ modifiers: 0
+ text: "69"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 256
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 272
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 288
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 304
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 320
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 336
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 352
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 368
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 384
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 400
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 416
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 432
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 448
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 464
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 73
+ modifiers: 0
+ text: "69"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 480
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 496
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 512
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 528
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 7
+ key: 73
+ modifiers: 0
+ text: "69"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 544
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 560
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 576
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 592
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 608
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 624
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 640
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 656
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 672
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 688
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 704
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 720
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 736
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 752
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 768
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 784
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 800
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 816
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 832
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 848
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 864
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 880
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 896
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 912
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 928
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 944
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 960
+ image: "wrap.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 992
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 7
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1008
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1024
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1040
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1056
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1072
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1088
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1104
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1120
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1136
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1152
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1168
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1184
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1200
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1216
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1232
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1248
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1264
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1280
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1296
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1312
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1328
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1344
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1360
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1376
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1392
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1408
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1424
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1440
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1456
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1472
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1488
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1504
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1520
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1536
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1552
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 72
+ modifiers: 0
+ text: "68"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1568
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1584
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1600
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1616
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1632
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 7
+ key: 72
+ modifiers: 0
+ text: "68"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1648
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1664
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1680
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1696
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1712
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1728
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1744
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1760
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1776
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1792
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1808
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1824
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1840
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1856
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1872
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1888
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1904
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1920
+ image: "wrap.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1952
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1968
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1984
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2000
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2016
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2032
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2048
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2064
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2080
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2096
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2112
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2128
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2144
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2160
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2176
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2192
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2208
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 88
+ modifiers: 0
+ text: "78"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2224
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2240
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2256
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2272
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2288
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2304
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 88
+ modifiers: 0
+ text: "78"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2320
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2336
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2352
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2368
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2384
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2400
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2416
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2432
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2448
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2464
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2480
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2496
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2512
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2528
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2544
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2560
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2576
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2592
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2608
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2624
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2640
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 68
+ modifiers: 0
+ text: "64"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2656
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2672
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2688
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2704
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 68
+ modifiers: 0
+ text: "64"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2720
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2736
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2752
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 73
+ modifiers: 0
+ text: "69"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2768
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2784
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2800
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2816
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2832
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 7
+ key: 73
+ modifiers: 0
+ text: "69"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2848
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2864
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2880
+ image: "wrap.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2912
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2928
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2944
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2960
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2976
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2992
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3008
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3024
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3040
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3056
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3072
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3088
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 87
+ modifiers: 0
+ text: "77"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3104
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3120
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3136
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3152
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3168
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 87
+ modifiers: 0
+ text: "77"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3184
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3200
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3216
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3232
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3248
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 82
+ modifiers: 0
+ text: "72"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3264
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3280
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3296
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 82
+ modifiers: 0
+ text: "72"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3312
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3328
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3344
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3360
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3376
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3392
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3408
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3424
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3440
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3456
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3472
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 80
+ modifiers: 0
+ text: "70"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3488
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3504
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3520
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3536
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 80
+ modifiers: 0
+ text: "70"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3552
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3568
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3584
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3600
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3616
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3632
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3648
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3664
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3680
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3696
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3712
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3728
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3744
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3760
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3776
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3792
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3808
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3824
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3840
+ image: "wrap.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3872
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3888
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3904
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 67
+ modifiers: 0
+ text: "63"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3920
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3936
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3952
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3968
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3984
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 67
+ modifiers: 0
+ text: "63"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4000
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4016
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 79
+ modifiers: 0
+ text: "6f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4032
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4048
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4064
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 79
+ modifiers: 0
+ text: "6f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4080
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 82
+ modifiers: 0
+ text: "72"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4096
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4112
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4128
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4144
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 82
+ modifiers: 0
+ text: "72"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4160
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4176
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4192
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 82
+ modifiers: 0
+ text: "72"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4208
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4224
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4240
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4256
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4272
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4288
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 82
+ modifiers: 0
+ text: "72"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4304
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4320
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4336
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4352
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4368
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4384
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4400
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4416
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 67
+ modifiers: 0
+ text: "63"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4432
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4448
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4464
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 67
+ modifiers: 0
+ text: "63"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4480
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4496
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4512
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4528
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4544
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4560
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4576
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4592
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4608
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 84
+ modifiers: 0
+ text: "74"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4624
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4640
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4656
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4672
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 76
+ modifiers: 0
+ text: "6c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4688
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4704
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4720
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4736
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 76
+ modifiers: 0
+ text: "6c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4752
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4768
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4784
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 89
+ modifiers: 0
+ text: "79"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4800
+ image: "wrap.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 89
+ modifiers: 0
+ text: "79"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4832
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4848
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4864
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4880
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 46
+ modifiers: 0
+ text: "2e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4896
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4912
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4928
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4944
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 7
+ key: 46
+ modifiers: 0
+ text: "2e"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4960
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4976
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4992
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5008
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5024
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5040
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5056
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5072
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5088
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5104
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5120
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5136
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5152
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5168
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5184
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5200
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5216
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5232
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5248
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5264
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5280
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5296
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5312
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5328
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5344
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5360
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5376
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5392
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5408
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5424
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5440
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5456
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5472
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5488
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5504
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5520
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5536
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5552
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5568
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5584
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5600
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5616
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5632
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5648
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5664
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5680
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5696
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5712
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5728
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5744
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5760
+ image: "wrap.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5792
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5808
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5824
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5840
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5856
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5872
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5888
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5904
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5920
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5936
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5952
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5968
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5984
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6000
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6016
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6032
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6048
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6064
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6080
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6096
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6112
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6128
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6144
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6160
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6176
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6192
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6208
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6224
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6240
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6256
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6272
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6288
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6304
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6320
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6336
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6352
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6368
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6384
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6400
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6416
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6432
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6448
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6464
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6480
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6496
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6512
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6528
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6544
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6560
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6576
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6592
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6608
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6624
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6640
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6656
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6672
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6688
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6704
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6720
+ image: "wrap.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6752
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6768
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6784
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6800
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6816
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6832
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6848
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6864
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/qt-669.qml b/tests/auto/declarative/visual/qdeclarativetextedit/qt-669.qml
new file mode 100644
index 0000000000..b01ddf897d
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/qt-669.qml
@@ -0,0 +1,19 @@
+import Qt 4.6
+
+Rectangle {
+ Component { id: testableCursor
+ //Doesn't blink
+ Rectangle {
+ color:"black"
+ width:1
+ }
+ }
+ color: "green"
+ width:400;
+ height:40;
+ TextEdit {
+ focus: true;
+ cursorDelegate: testableCursor
+ text: "Jackdaws love my big sphinx of Quartz"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/wrap.qml b/tests/auto/declarative/visual/qdeclarativetextedit/wrap.qml
new file mode 100644
index 0000000000..f9fe025fb9
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/wrap.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+
+Item {
+ height:400
+ width: 200
+ TextEdit {
+ width: 200
+ height: 200
+ wrap: true
+ focus: true
+ }
+ //With QTBUG-6273 only the bottom one would be wrapped
+ TextEdit {
+ width: 200
+ height: 200
+ wrap: true
+ text: "This is a test that text edit wraps correctly."
+ y:200
+ }
+
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/cursorDelegate.qml b/tests/auto/declarative/visual/qdeclarativetextinput/cursorDelegate.qml
new file mode 100644
index 0000000000..6a4e7fabad
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/cursorDelegate.qml
@@ -0,0 +1,35 @@
+import Qt 4.6
+ Rectangle {
+ resources: [
+ Component { id: cursorA
+ Item { id: cPage;
+ x: Behavior { NumberAnimation { } }
+ y: Behavior { NumberAnimation { } }
+ height: Behavior { NumberAnimation { duration: 200 } }
+ Rectangle { id: cRectangle; color: "black"; y: 1; width: 1; height: parent.height-2;
+ Rectangle { id:top; color: "black"; width: 3; height: 1; x: -1; y:0}
+ Rectangle { id:bottom; color: "black"; width: 3; height: 1; x: -1; anchors.bottom: parent.bottom;}
+ opacity: 1
+ opacity: SequentialAnimation { running: cPage.parent.focus == true; repeat: true;
+ NumberAnimation { properties: "opacity"; to: 1; duration: 500; easing.type: "InQuad"}
+ NumberAnimation { properties: "opacity"; to: 0; duration: 500; easing.type: "OutQuad"}
+ }
+ }
+ width: 1;
+ }
+ }
+ ]
+ width: 400
+ height: 200
+ color: "white"
+ TextInput { id: mainText
+ text: "Hello World"
+ cursorDelegate: cursorA
+ focus: true
+ font.pixelSize: 28
+ selectionColor: "lightsteelblue"
+ selectedTextColor: "deeppink"
+ color: "forestgreen"
+ anchors.centerIn: parent
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.0.png b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.0.png
new file mode 100644
index 0000000000..9d0bab2705
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.1.png b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.1.png
new file mode 100644
index 0000000000..db66ff79b3
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.2.png b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.2.png
new file mode 100644
index 0000000000..cbcca68d43
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.3.png b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.3.png
new file mode 100644
index 0000000000..c22196b6bf
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.4.png b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.4.png
new file mode 100644
index 0000000000..a1d051e6bd
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.5.png b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.5.png
new file mode 100644
index 0000000000..9289dc028a
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.6.png b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.6.png
new file mode 100644
index 0000000000..7331f89f0d
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.7.png b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.7.png
new file mode 100644
index 0000000000..968bdd2d3f
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.8.png b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.8.png
new file mode 100644
index 0000000000..9a3436a0d4
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.8.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.qml b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.qml
new file mode 100644
index 0000000000..3b664b63da
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data-MAC/cursorDelegate.qml
@@ -0,0 +1,3379 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 32
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 48
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 64
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 80
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 96
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 112
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 128
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 144
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 160
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 176
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 192
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 208
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 224
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 240
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 256
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 272
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 288
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 304
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 320
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 336
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 352
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 368
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 384
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 400
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 416
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 432
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 448
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 464
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 480
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 496
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Frame {
+ msec: 512
+ hash: "701d8c0f72330c0b72df071bd17749e6"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 528
+ hash: "438be260f19d04c9f98ed7dce1c7db40"
+ }
+ Frame {
+ msec: 544
+ hash: "6032aada2c48092000ecb93e52656414"
+ }
+ Frame {
+ msec: 560
+ hash: "d23bdd94019477d8378cde580d8765ad"
+ }
+ Frame {
+ msec: 576
+ hash: "d74f8e44d47710714d4197809fffb622"
+ }
+ Frame {
+ msec: 592
+ hash: "4fbbb8447d80012bc6b5c24ddbfe498e"
+ }
+ Frame {
+ msec: 608
+ hash: "4e875ba8703b690a17e445f2b3810435"
+ }
+ Frame {
+ msec: 624
+ hash: "e4d7a59716cd704fe1cfa8ba91454e93"
+ }
+ Frame {
+ msec: 640
+ hash: "a2ea272b45d8de225826d9381015ff2e"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 656
+ hash: "5d112a3675ea4c010e7bc60e036d0262"
+ }
+ Frame {
+ msec: 672
+ hash: "788d8962f311adf57a3acc876b0e8804"
+ }
+ Frame {
+ msec: 688
+ hash: "827fdd6a3d1006f4a9dd2faf208ea436"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 704
+ hash: "91b2695e4915238ae8610a64e279b0f4"
+ }
+ Frame {
+ msec: 720
+ hash: "a97d90765f87b998eae6e9f603c61bff"
+ }
+ Frame {
+ msec: 736
+ hash: "48969edab07b942480d93ac2d383ca24"
+ }
+ Frame {
+ msec: 752
+ hash: "ecfd9d6d5873001f0c67806544a14983"
+ }
+ Frame {
+ msec: 768
+ hash: "a3a3bc1e2523d3e7f961893bcd1dd3a8"
+ }
+ Frame {
+ msec: 784
+ hash: "e337735ad0b42e60c54f16f3da7af3cf"
+ }
+ Frame {
+ msec: 800
+ hash: "c39db081130d269f25dbcb1a19afb8d0"
+ }
+ Frame {
+ msec: 816
+ hash: "c464d501e3935ec0f53eb780bd1a8289"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 832
+ hash: "9dc01a69f2a6892d3c4203674c8bef72"
+ }
+ Frame {
+ msec: 848
+ hash: "d94054222fd37a350bd8abd592a332e3"
+ }
+ Frame {
+ msec: 864
+ hash: "46fed264c233490b477e3a7c22183e18"
+ }
+ Frame {
+ msec: 880
+ hash: "34bc703c915b49b0450ece1d18306df8"
+ }
+ Frame {
+ msec: 896
+ hash: "e87f18da2fa5c91c9b2b5dea50f9c1e2"
+ }
+ Frame {
+ msec: 912
+ hash: "4f6dbc7b249c37390518cc263832b587"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 928
+ hash: "df09fa2fd138d1b480eec82db3872d6f"
+ }
+ Frame {
+ msec: 944
+ hash: "b74cb1bfbb979a5e91853d9145d277d8"
+ }
+ Frame {
+ msec: 960
+ image: "cursorDelegate.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 992
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1008
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1024
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1040
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 1056
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Key {
+ type: 6
+ key: 16777248
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 33554432
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1072
+ hash: "35425ae3ccf3c8dcc1483479c57a3287"
+ }
+ Frame {
+ msec: 1088
+ hash: "b74cb1bfbb979a5e91853d9145d277d8"
+ }
+ Frame {
+ msec: 1104
+ hash: "df09fa2fd138d1b480eec82db3872d6f"
+ }
+ Frame {
+ msec: 1120
+ hash: "4f6dbc7b249c37390518cc263832b587"
+ }
+ Frame {
+ msec: 1136
+ hash: "e87f18da2fa5c91c9b2b5dea50f9c1e2"
+ }
+ Frame {
+ msec: 1152
+ hash: "34bc703c915b49b0450ece1d18306df8"
+ }
+ Frame {
+ msec: 1168
+ hash: "46fed264c233490b477e3a7c22183e18"
+ }
+ Frame {
+ msec: 1184
+ hash: "d94054222fd37a350bd8abd592a332e3"
+ }
+ Frame {
+ msec: 1200
+ hash: "9dc01a69f2a6892d3c4203674c8bef72"
+ }
+ Frame {
+ msec: 1216
+ hash: "76fb2e1ad33affe33c0887f04caa7396"
+ }
+ Frame {
+ msec: 1232
+ hash: "0f500339c81ca3621d13910017b84b7b"
+ }
+ Frame {
+ msec: 1248
+ hash: "702864de569e6a5648ee174d5ef891f8"
+ }
+ Frame {
+ msec: 1264
+ hash: "01e937e1fcc0331b2541fa32c3479a24"
+ }
+ Frame {
+ msec: 1280
+ hash: "ee661e6cc1f86e755ff399adb6b11fd1"
+ }
+ Frame {
+ msec: 1296
+ hash: "ea2d610e9b41e72b2984a51f0d3f7587"
+ }
+ Frame {
+ msec: 1312
+ hash: "4a646d76b706698a02cead560b1f8d57"
+ }
+ Frame {
+ msec: 1328
+ hash: "48ec87bfc25471f6fa2d43f9db80b693"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 100663296
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1344
+ hash: "12b5e016bad990d1f2bf427ee8e3e6d9"
+ }
+ Frame {
+ msec: 1360
+ hash: "66a2ba3f9e005cd58aa50cfa0000cd15"
+ }
+ Frame {
+ msec: 1376
+ hash: "a2e9e42e09dadbd0791f52bb96e0e0dc"
+ }
+ Frame {
+ msec: 1392
+ hash: "ac68396566ea85a157e944e601dd8d18"
+ }
+ Frame {
+ msec: 1408
+ hash: "b9bfdebec8dd1a93de7ef2768b2542ba"
+ }
+ Frame {
+ msec: 1424
+ hash: "2e0a4b960803770acb34ef56ccf2be35"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 100663296
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1440
+ hash: "df1643f0f8b7aa2dc080958822aeb3d0"
+ }
+ Frame {
+ msec: 1456
+ hash: "15bb91195adfaf83e88fd93e41ff3e17"
+ }
+ Frame {
+ msec: 1472
+ hash: "dc0476c27bd7eef3a59637df9a3fecd8"
+ }
+ Frame {
+ msec: 1488
+ hash: "a271f69e9dc6d1e0362c3e10760895df"
+ }
+ Frame {
+ msec: 1504
+ hash: "7fe66bcc6bada354b4dd7baf8c977740"
+ }
+ Frame {
+ msec: 1520
+ hash: "6b502dbd5ac8ff010df326cb9b593dce"
+ }
+ Frame {
+ msec: 1536
+ hash: "a9dd21649a95a6a6e8daea91bc6e2a5f"
+ }
+ Frame {
+ msec: 1552
+ hash: "374686590eaa02b7b436caa40cc0b0a0"
+ }
+ Frame {
+ msec: 1568
+ hash: "09ac3c5d413b1f650407eaa971aade81"
+ }
+ Frame {
+ msec: 1584
+ hash: "39f84e04f1ae58600591c0de40558d2c"
+ }
+ Frame {
+ msec: 1600
+ hash: "0336ea1799835af2185c361e221a9661"
+ }
+ Frame {
+ msec: 1616
+ hash: "8c7ab13e499d7f31107cf0f899334259"
+ }
+ Frame {
+ msec: 1632
+ hash: "bad5899324e52c9e6eadb72f3e7c2150"
+ }
+ Frame {
+ msec: 1648
+ hash: "4b78f451ecb22cfbed9f5998d61018eb"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 100663296
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1664
+ hash: "6c913bc712eee18947a43dd1c0a6516b"
+ }
+ Frame {
+ msec: 1680
+ hash: "4e566abf1e0696e72b2a4beab5a53d6e"
+ }
+ Frame {
+ msec: 1696
+ hash: "6ad579c289c63a6b90a1517765fc041e"
+ }
+ Frame {
+ msec: 1712
+ hash: "cef43f349cf221a1aa6e6e70f1fa6339"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 100663296
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1728
+ hash: "d89f7e3e2510fcb34786584747633673"
+ }
+ Frame {
+ msec: 1744
+ hash: "eb23a3eac684808f73034f4e4ef8984d"
+ }
+ Frame {
+ msec: 1760
+ hash: "6f2c1f61e58940d9cc1a70c0db903446"
+ }
+ Frame {
+ msec: 1776
+ hash: "f036a5ecda518be198f3bdf2dbc5baab"
+ }
+ Frame {
+ msec: 1792
+ hash: "7411784774fdc3b324644395f7beb013"
+ }
+ Frame {
+ msec: 1808
+ hash: "abfdd1f8440998af2ff7903f49f1bd7c"
+ }
+ Frame {
+ msec: 1824
+ hash: "6edd29f2e8d3d81e912c6b279ecc1885"
+ }
+ Frame {
+ msec: 1840
+ hash: "8eb5ba22793c7cbfa97a64557f2a023f"
+ }
+ Frame {
+ msec: 1856
+ hash: "9a39470525e6f508228f7e0014e02d64"
+ }
+ Frame {
+ msec: 1872
+ hash: "b3ad10cf28151f5f7f5a4c3540f1660e"
+ }
+ Frame {
+ msec: 1888
+ hash: "816203df3cf42fa7a0e8d6730c186444"
+ }
+ Frame {
+ msec: 1904
+ hash: "a0a7e7ff7960dfe6149e526badf799a6"
+ }
+ Frame {
+ msec: 1920
+ image: "cursorDelegate.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "4d245b2285eadfd206409f74e03c7fc9"
+ }
+ Frame {
+ msec: 1952
+ hash: "e1d5e6c2e4df1454b5a256c3678ffdef"
+ }
+ Frame {
+ msec: 1968
+ hash: "781d7fb03a37cb3f297cc0d2df338fd7"
+ }
+ Key {
+ type: 7
+ key: 16777249
+ modifiers: 100663296
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1984
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2000
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2016
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2032
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2048
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2064
+ hash: "781d7fb03a37cb3f297cc0d2df338fd7"
+ }
+ Frame {
+ msec: 2080
+ hash: "e1d5e6c2e4df1454b5a256c3678ffdef"
+ }
+ Frame {
+ msec: 2096
+ hash: "4d245b2285eadfd206409f74e03c7fc9"
+ }
+ Frame {
+ msec: 2112
+ hash: "5a647962e016d15daa417d88524d6061"
+ }
+ Frame {
+ msec: 2128
+ hash: "a0a7e7ff7960dfe6149e526badf799a6"
+ }
+ Frame {
+ msec: 2144
+ hash: "816203df3cf42fa7a0e8d6730c186444"
+ }
+ Frame {
+ msec: 2160
+ hash: "b3ad10cf28151f5f7f5a4c3540f1660e"
+ }
+ Frame {
+ msec: 2176
+ hash: "9a39470525e6f508228f7e0014e02d64"
+ }
+ Frame {
+ msec: 2192
+ hash: "8eb5ba22793c7cbfa97a64557f2a023f"
+ }
+ Frame {
+ msec: 2208
+ hash: "6edd29f2e8d3d81e912c6b279ecc1885"
+ }
+ Frame {
+ msec: 2224
+ hash: "abfdd1f8440998af2ff7903f49f1bd7c"
+ }
+ Frame {
+ msec: 2240
+ hash: "7411784774fdc3b324644395f7beb013"
+ }
+ Frame {
+ msec: 2256
+ hash: "f036a5ecda518be198f3bdf2dbc5baab"
+ }
+ Key {
+ type: 7
+ key: 16777248
+ modifiers: 33554432
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2272
+ hash: "6f2c1f61e58940d9cc1a70c0db903446"
+ }
+ Frame {
+ msec: 2288
+ hash: "eb23a3eac684808f73034f4e4ef8984d"
+ }
+ Frame {
+ msec: 2304
+ hash: "d89f7e3e2510fcb34786584747633673"
+ }
+ Frame {
+ msec: 2320
+ hash: "cef43f349cf221a1aa6e6e70f1fa6339"
+ }
+ Frame {
+ msec: 2336
+ hash: "6ad579c289c63a6b90a1517765fc041e"
+ }
+ Frame {
+ msec: 2352
+ hash: "4e566abf1e0696e72b2a4beab5a53d6e"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2368
+ hash: "6c913bc712eee18947a43dd1c0a6516b"
+ }
+ Frame {
+ msec: 2384
+ hash: "2c518a32ca3b5ca924709cc6990fb039"
+ }
+ Frame {
+ msec: 2400
+ hash: "7f40db00bd3e6d0b39454eefa1403f44"
+ }
+ Frame {
+ msec: 2416
+ hash: "98db32e0d1812e9584105dc4dbceff80"
+ }
+ Frame {
+ msec: 2432
+ hash: "c2150a67391bb574141c16cb011847bf"
+ }
+ Frame {
+ msec: 2448
+ hash: "f9ea21d894fa2dace4d43ce99a580b90"
+ }
+ Frame {
+ msec: 2464
+ hash: "2f580c3244499fc6ecd2121693f463fd"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2480
+ hash: "2f7f421d3e6a895a9efa6b0e8feb81c4"
+ }
+ Frame {
+ msec: 2496
+ hash: "35a18447f319431ed0a645d05a1d03d1"
+ }
+ Frame {
+ msec: 2512
+ hash: "54e36fb4014be554d13709b48b9bdce7"
+ }
+ Frame {
+ msec: 2528
+ hash: "dbe3456536a729b268850a6ee5d1fb47"
+ }
+ Frame {
+ msec: 2544
+ hash: "4c148434cf3868db5dc98f426d9fb913"
+ }
+ Frame {
+ msec: 2560
+ hash: "2eb6da3ebfd531037523347603a805e2"
+ }
+ Frame {
+ msec: 2576
+ hash: "fefbb2f4671f8a36f9d2207ced8c0bfb"
+ }
+ Frame {
+ msec: 2592
+ hash: "1ab596339afc1f96136ee69c4b7688e1"
+ }
+ Frame {
+ msec: 2608
+ hash: "e07f59d729cb2790296e8c7cd3d0d3c9"
+ }
+ Frame {
+ msec: 2624
+ hash: "a7dccada1080487cab2d0a916676c5cb"
+ }
+ Frame {
+ msec: 2640
+ hash: "ac5939eb4379394fab829b307cbfe7ec"
+ }
+ Frame {
+ msec: 2656
+ hash: "9329d353c678d2bc61d08f63029d1b9b"
+ }
+ Frame {
+ msec: 2672
+ hash: "41263f56af7875028bb0c1e7eccf6f5d"
+ }
+ Frame {
+ msec: 2688
+ hash: "e2eb18af82c85ea78ba438163e922df3"
+ }
+ Frame {
+ msec: 2704
+ hash: "91b2695e4915238ae8610a64e279b0f4"
+ }
+ Frame {
+ msec: 2720
+ hash: "a97d90765f87b998eae6e9f603c61bff"
+ }
+ Frame {
+ msec: 2736
+ hash: "48969edab07b942480d93ac2d383ca24"
+ }
+ Frame {
+ msec: 2752
+ hash: "ecfd9d6d5873001f0c67806544a14983"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2768
+ hash: "01e937e1fcc0331b2541fa32c3479a24"
+ }
+ Frame {
+ msec: 2784
+ hash: "702864de569e6a5648ee174d5ef891f8"
+ }
+ Frame {
+ msec: 2800
+ hash: "0f500339c81ca3621d13910017b84b7b"
+ }
+ Frame {
+ msec: 2816
+ hash: "76fb2e1ad33affe33c0887f04caa7396"
+ }
+ Frame {
+ msec: 2832
+ hash: "9dc01a69f2a6892d3c4203674c8bef72"
+ }
+ Frame {
+ msec: 2848
+ hash: "d94054222fd37a350bd8abd592a332e3"
+ }
+ Frame {
+ msec: 2864
+ hash: "46fed264c233490b477e3a7c22183e18"
+ }
+ Frame {
+ msec: 2880
+ image: "cursorDelegate.2.png"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2896
+ hash: "e87f18da2fa5c91c9b2b5dea50f9c1e2"
+ }
+ Frame {
+ msec: 2912
+ hash: "4f6dbc7b249c37390518cc263832b587"
+ }
+ Frame {
+ msec: 2928
+ hash: "df09fa2fd138d1b480eec82db3872d6f"
+ }
+ Frame {
+ msec: 2944
+ hash: "b74cb1bfbb979a5e91853d9145d277d8"
+ }
+ Frame {
+ msec: 2960
+ hash: "35425ae3ccf3c8dcc1483479c57a3287"
+ }
+ Frame {
+ msec: 2976
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 2992
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3008
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3024
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3040
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3056
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 3072
+ hash: "35425ae3ccf3c8dcc1483479c57a3287"
+ }
+ Frame {
+ msec: 3088
+ hash: "b74cb1bfbb979a5e91853d9145d277d8"
+ }
+ Frame {
+ msec: 3104
+ hash: "df09fa2fd138d1b480eec82db3872d6f"
+ }
+ Frame {
+ msec: 3120
+ hash: "4f6dbc7b249c37390518cc263832b587"
+ }
+ Frame {
+ msec: 3136
+ hash: "e87f18da2fa5c91c9b2b5dea50f9c1e2"
+ }
+ Frame {
+ msec: 3152
+ hash: "34bc703c915b49b0450ece1d18306df8"
+ }
+ Frame {
+ msec: 3168
+ hash: "46fed264c233490b477e3a7c22183e18"
+ }
+ Frame {
+ msec: 3184
+ hash: "d94054222fd37a350bd8abd592a332e3"
+ }
+ Frame {
+ msec: 3200
+ hash: "9dc01a69f2a6892d3c4203674c8bef72"
+ }
+ Frame {
+ msec: 3216
+ hash: "76fb2e1ad33affe33c0887f04caa7396"
+ }
+ Frame {
+ msec: 3232
+ hash: "0f500339c81ca3621d13910017b84b7b"
+ }
+ Frame {
+ msec: 3248
+ hash: "702864de569e6a5648ee174d5ef891f8"
+ }
+ Frame {
+ msec: 3264
+ hash: "01e937e1fcc0331b2541fa32c3479a24"
+ }
+ Frame {
+ msec: 3280
+ hash: "ee661e6cc1f86e755ff399adb6b11fd1"
+ }
+ Frame {
+ msec: 3296
+ hash: "ea2d610e9b41e72b2984a51f0d3f7587"
+ }
+ Frame {
+ msec: 3312
+ hash: "4a646d76b706698a02cead560b1f8d57"
+ }
+ Frame {
+ msec: 3328
+ hash: "48ec87bfc25471f6fa2d43f9db80b693"
+ }
+ Frame {
+ msec: 3344
+ hash: "827fdd6a3d1006f4a9dd2faf208ea436"
+ }
+ Frame {
+ msec: 3360
+ hash: "788d8962f311adf57a3acc876b0e8804"
+ }
+ Frame {
+ msec: 3376
+ hash: "5d112a3675ea4c010e7bc60e036d0262"
+ }
+ Frame {
+ msec: 3392
+ hash: "a2ea272b45d8de225826d9381015ff2e"
+ }
+ Frame {
+ msec: 3408
+ hash: "e4d7a59716cd704fe1cfa8ba91454e93"
+ }
+ Frame {
+ msec: 3424
+ hash: "4e875ba8703b690a17e445f2b3810435"
+ }
+ Frame {
+ msec: 3440
+ hash: "4fbbb8447d80012bc6b5c24ddbfe498e"
+ }
+ Frame {
+ msec: 3456
+ hash: "d74f8e44d47710714d4197809fffb622"
+ }
+ Frame {
+ msec: 3472
+ hash: "d23bdd94019477d8378cde580d8765ad"
+ }
+ Frame {
+ msec: 3488
+ hash: "6032aada2c48092000ecb93e52656414"
+ }
+ Frame {
+ msec: 3504
+ hash: "438be260f19d04c9f98ed7dce1c7db40"
+ }
+ Frame {
+ msec: 3520
+ hash: "3af60972e7d5d4320a549e5df52a1228"
+ }
+ Frame {
+ msec: 3536
+ hash: "bf8459b99ca0bf568c58a3bb2a2fcc1f"
+ }
+ Frame {
+ msec: 3552
+ hash: "c0dc1cf5ba7014e069c4d4bd7ac0f89d"
+ }
+ Frame {
+ msec: 3568
+ hash: "f2ddf9d4fd3a2a2d354172714ce94d99"
+ }
+ Frame {
+ msec: 3584
+ hash: "bdfb42dc3879099e402784238c2cdddb"
+ }
+ Frame {
+ msec: 3600
+ hash: "5e483b0fd4808f2fb31aea90ccf86d3e"
+ }
+ Frame {
+ msec: 3616
+ hash: "8159bda651d95a320ac09aa6feb377a1"
+ }
+ Frame {
+ msec: 3632
+ hash: "ceda37af96bd02baae218d3bfaed93f7"
+ }
+ Frame {
+ msec: 3648
+ hash: "4b81757a105aa7c5ac6148455eea66c3"
+ }
+ Frame {
+ msec: 3664
+ hash: "ff7e2cdd006f9b76ab8c0416d81f0cb1"
+ }
+ Frame {
+ msec: 3680
+ hash: "9b174cd9a87ff193ce646408946b310c"
+ }
+ Frame {
+ msec: 3696
+ hash: "89fa590b47ee77021dedf7938439ce69"
+ }
+ Frame {
+ msec: 3712
+ hash: "6e5680803184dfc76cbf1c2de804d6cc"
+ }
+ Frame {
+ msec: 3728
+ hash: "c6de6b9203673c77427ab84ce86daaf5"
+ }
+ Frame {
+ msec: 3744
+ hash: "198f8e912c19debd51f837627d1171e9"
+ }
+ Frame {
+ msec: 3760
+ hash: "3b380dcb6815698241f3dcccb52785c2"
+ }
+ Frame {
+ msec: 3776
+ hash: "254942e12b8a31420d2243b7e2529ae8"
+ }
+ Frame {
+ msec: 3792
+ hash: "ebf121910a5318c284f8e964d63aed40"
+ }
+ Frame {
+ msec: 3808
+ hash: "0fcf416a80d22f077fcf4d23bddeb6c6"
+ }
+ Frame {
+ msec: 3824
+ hash: "4a6596da390380dbafc1cdaceca1101e"
+ }
+ Frame {
+ msec: 3840
+ image: "cursorDelegate.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "c2be53ae5e2d5d3081df9af31426ec84"
+ }
+ Frame {
+ msec: 3872
+ hash: "52350ac5d10f8fe7571d12193b861d3f"
+ }
+ Frame {
+ msec: 3888
+ hash: "f286a35d7f4a022315f69a5db72da388"
+ }
+ Frame {
+ msec: 3904
+ hash: "aa329519eba4dad9589bff095528c535"
+ }
+ Frame {
+ msec: 3920
+ hash: "0beae60853afaaa0e7f7540fb50bcddf"
+ }
+ Frame {
+ msec: 3936
+ hash: "dc098a8b4d2f117a09cf1f2ced201a60"
+ }
+ Frame {
+ msec: 3952
+ hash: "3655b992097b433071ec9dd69e086c70"
+ }
+ Frame {
+ msec: 3968
+ hash: "82cb92d7940d13deee97e4ccda9210fb"
+ }
+ Frame {
+ msec: 3984
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4000
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4016
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4032
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4048
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4064
+ hash: "82cb92d7940d13deee97e4ccda9210fb"
+ }
+ Key {
+ type: 6
+ key: 16777232
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4080
+ hash: "3655b992097b433071ec9dd69e086c70"
+ }
+ Frame {
+ msec: 4096
+ hash: "dc098a8b4d2f117a09cf1f2ced201a60"
+ }
+ Frame {
+ msec: 4112
+ hash: "0beae60853afaaa0e7f7540fb50bcddf"
+ }
+ Frame {
+ msec: 4128
+ hash: "aa329519eba4dad9589bff095528c535"
+ }
+ Key {
+ type: 7
+ key: 16777232
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4144
+ hash: "f286a35d7f4a022315f69a5db72da388"
+ }
+ Frame {
+ msec: 4160
+ hash: "52350ac5d10f8fe7571d12193b861d3f"
+ }
+ Frame {
+ msec: 4176
+ hash: "c2be53ae5e2d5d3081df9af31426ec84"
+ }
+ Frame {
+ msec: 4192
+ hash: "367391b2a124e2c818510567d0884d18"
+ }
+ Frame {
+ msec: 4208
+ hash: "4a6596da390380dbafc1cdaceca1101e"
+ }
+ Frame {
+ msec: 4224
+ hash: "0fcf416a80d22f077fcf4d23bddeb6c6"
+ }
+ Frame {
+ msec: 4240
+ hash: "ebf121910a5318c284f8e964d63aed40"
+ }
+ Frame {
+ msec: 4256
+ hash: "254942e12b8a31420d2243b7e2529ae8"
+ }
+ Frame {
+ msec: 4272
+ hash: "3b380dcb6815698241f3dcccb52785c2"
+ }
+ Frame {
+ msec: 4288
+ hash: "198f8e912c19debd51f837627d1171e9"
+ }
+ Frame {
+ msec: 4304
+ hash: "c6de6b9203673c77427ab84ce86daaf5"
+ }
+ Frame {
+ msec: 4320
+ hash: "6e5680803184dfc76cbf1c2de804d6cc"
+ }
+ Frame {
+ msec: 4336
+ hash: "89fa590b47ee77021dedf7938439ce69"
+ }
+ Frame {
+ msec: 4352
+ hash: "9b174cd9a87ff193ce646408946b310c"
+ }
+ Frame {
+ msec: 4368
+ hash: "ff7e2cdd006f9b76ab8c0416d81f0cb1"
+ }
+ Frame {
+ msec: 4384
+ hash: "4b81757a105aa7c5ac6148455eea66c3"
+ }
+ Frame {
+ msec: 4400
+ hash: "ceda37af96bd02baae218d3bfaed93f7"
+ }
+ Frame {
+ msec: 4416
+ hash: "8159bda651d95a320ac09aa6feb377a1"
+ }
+ Frame {
+ msec: 4432
+ hash: "5e483b0fd4808f2fb31aea90ccf86d3e"
+ }
+ Frame {
+ msec: 4448
+ hash: "bdfb42dc3879099e402784238c2cdddb"
+ }
+ Frame {
+ msec: 4464
+ hash: "f2ddf9d4fd3a2a2d354172714ce94d99"
+ }
+ Frame {
+ msec: 4480
+ hash: "c0dc1cf5ba7014e069c4d4bd7ac0f89d"
+ }
+ Frame {
+ msec: 4496
+ hash: "bf8459b99ca0bf568c58a3bb2a2fcc1f"
+ }
+ Frame {
+ msec: 4512
+ hash: "3af60972e7d5d4320a549e5df52a1228"
+ }
+ Frame {
+ msec: 4528
+ hash: "438be260f19d04c9f98ed7dce1c7db40"
+ }
+ Frame {
+ msec: 4544
+ hash: "6032aada2c48092000ecb93e52656414"
+ }
+ Frame {
+ msec: 4560
+ hash: "d23bdd94019477d8378cde580d8765ad"
+ }
+ Frame {
+ msec: 4576
+ hash: "d74f8e44d47710714d4197809fffb622"
+ }
+ Key {
+ type: 6
+ key: 16777233
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4592
+ hash: "4fbbb8447d80012bc6b5c24ddbfe498e"
+ }
+ Frame {
+ msec: 4608
+ hash: "4e875ba8703b690a17e445f2b3810435"
+ }
+ Frame {
+ msec: 4624
+ hash: "e4d7a59716cd704fe1cfa8ba91454e93"
+ }
+ Key {
+ type: 7
+ key: 16777233
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4640
+ hash: "a2ea272b45d8de225826d9381015ff2e"
+ }
+ Frame {
+ msec: 4656
+ hash: "5d112a3675ea4c010e7bc60e036d0262"
+ }
+ Frame {
+ msec: 4672
+ hash: "788d8962f311adf57a3acc876b0e8804"
+ }
+ Frame {
+ msec: 4688
+ hash: "827fdd6a3d1006f4a9dd2faf208ea436"
+ }
+ Frame {
+ msec: 4704
+ hash: "48ec87bfc25471f6fa2d43f9db80b693"
+ }
+ Frame {
+ msec: 4720
+ hash: "4a646d76b706698a02cead560b1f8d57"
+ }
+ Frame {
+ msec: 4736
+ hash: "ea2d610e9b41e72b2984a51f0d3f7587"
+ }
+ Frame {
+ msec: 4752
+ hash: "ee661e6cc1f86e755ff399adb6b11fd1"
+ }
+ Frame {
+ msec: 4768
+ hash: "01e937e1fcc0331b2541fa32c3479a24"
+ }
+ Frame {
+ msec: 4784
+ hash: "702864de569e6a5648ee174d5ef891f8"
+ }
+ Frame {
+ msec: 4800
+ image: "cursorDelegate.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "76fb2e1ad33affe33c0887f04caa7396"
+ }
+ Frame {
+ msec: 4832
+ hash: "9dc01a69f2a6892d3c4203674c8bef72"
+ }
+ Frame {
+ msec: 4848
+ hash: "d94054222fd37a350bd8abd592a332e3"
+ }
+ Frame {
+ msec: 4864
+ hash: "46fed264c233490b477e3a7c22183e18"
+ }
+ Frame {
+ msec: 4880
+ hash: "34bc703c915b49b0450ece1d18306df8"
+ }
+ Frame {
+ msec: 4896
+ hash: "e87f18da2fa5c91c9b2b5dea50f9c1e2"
+ }
+ Frame {
+ msec: 4912
+ hash: "4f6dbc7b249c37390518cc263832b587"
+ }
+ Frame {
+ msec: 4928
+ hash: "df09fa2fd138d1b480eec82db3872d6f"
+ }
+ Frame {
+ msec: 4944
+ hash: "b74cb1bfbb979a5e91853d9145d277d8"
+ }
+ Frame {
+ msec: 4960
+ hash: "35425ae3ccf3c8dcc1483479c57a3287"
+ }
+ Frame {
+ msec: 4976
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 4992
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5008
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5024
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5040
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5056
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 5072
+ hash: "35425ae3ccf3c8dcc1483479c57a3287"
+ }
+ Frame {
+ msec: 5088
+ hash: "b74cb1bfbb979a5e91853d9145d277d8"
+ }
+ Frame {
+ msec: 5104
+ hash: "df09fa2fd138d1b480eec82db3872d6f"
+ }
+ Frame {
+ msec: 5120
+ hash: "4f6dbc7b249c37390518cc263832b587"
+ }
+ Frame {
+ msec: 5136
+ hash: "e87f18da2fa5c91c9b2b5dea50f9c1e2"
+ }
+ Frame {
+ msec: 5152
+ hash: "34bc703c915b49b0450ece1d18306df8"
+ }
+ Frame {
+ msec: 5168
+ hash: "46fed264c233490b477e3a7c22183e18"
+ }
+ Frame {
+ msec: 5184
+ hash: "d94054222fd37a350bd8abd592a332e3"
+ }
+ Frame {
+ msec: 5200
+ hash: "9dc01a69f2a6892d3c4203674c8bef72"
+ }
+ Frame {
+ msec: 5216
+ hash: "76fb2e1ad33affe33c0887f04caa7396"
+ }
+ Frame {
+ msec: 5232
+ hash: "0f500339c81ca3621d13910017b84b7b"
+ }
+ Frame {
+ msec: 5248
+ hash: "702864de569e6a5648ee174d5ef891f8"
+ }
+ Frame {
+ msec: 5264
+ hash: "01e937e1fcc0331b2541fa32c3479a24"
+ }
+ Frame {
+ msec: 5280
+ hash: "ee661e6cc1f86e755ff399adb6b11fd1"
+ }
+ Frame {
+ msec: 5296
+ hash: "ea2d610e9b41e72b2984a51f0d3f7587"
+ }
+ Frame {
+ msec: 5312
+ hash: "4a646d76b706698a02cead560b1f8d57"
+ }
+ Frame {
+ msec: 5328
+ hash: "48ec87bfc25471f6fa2d43f9db80b693"
+ }
+ Frame {
+ msec: 5344
+ hash: "827fdd6a3d1006f4a9dd2faf208ea436"
+ }
+ Frame {
+ msec: 5360
+ hash: "788d8962f311adf57a3acc876b0e8804"
+ }
+ Frame {
+ msec: 5376
+ hash: "5d112a3675ea4c010e7bc60e036d0262"
+ }
+ Frame {
+ msec: 5392
+ hash: "a2ea272b45d8de225826d9381015ff2e"
+ }
+ Frame {
+ msec: 5408
+ hash: "e4d7a59716cd704fe1cfa8ba91454e93"
+ }
+ Frame {
+ msec: 5424
+ hash: "4e875ba8703b690a17e445f2b3810435"
+ }
+ Frame {
+ msec: 5440
+ hash: "4fbbb8447d80012bc6b5c24ddbfe498e"
+ }
+ Frame {
+ msec: 5456
+ hash: "d74f8e44d47710714d4197809fffb622"
+ }
+ Frame {
+ msec: 5472
+ hash: "d23bdd94019477d8378cde580d8765ad"
+ }
+ Frame {
+ msec: 5488
+ hash: "6032aada2c48092000ecb93e52656414"
+ }
+ Frame {
+ msec: 5504
+ hash: "438be260f19d04c9f98ed7dce1c7db40"
+ }
+ Frame {
+ msec: 5520
+ hash: "3af60972e7d5d4320a549e5df52a1228"
+ }
+ Frame {
+ msec: 5536
+ hash: "bf8459b99ca0bf568c58a3bb2a2fcc1f"
+ }
+ Frame {
+ msec: 5552
+ hash: "c0dc1cf5ba7014e069c4d4bd7ac0f89d"
+ }
+ Frame {
+ msec: 5568
+ hash: "f2ddf9d4fd3a2a2d354172714ce94d99"
+ }
+ Frame {
+ msec: 5584
+ hash: "bdfb42dc3879099e402784238c2cdddb"
+ }
+ Frame {
+ msec: 5600
+ hash: "5e483b0fd4808f2fb31aea90ccf86d3e"
+ }
+ Frame {
+ msec: 5616
+ hash: "8159bda651d95a320ac09aa6feb377a1"
+ }
+ Frame {
+ msec: 5632
+ hash: "ceda37af96bd02baae218d3bfaed93f7"
+ }
+ Frame {
+ msec: 5648
+ hash: "4b81757a105aa7c5ac6148455eea66c3"
+ }
+ Frame {
+ msec: 5664
+ hash: "ff7e2cdd006f9b76ab8c0416d81f0cb1"
+ }
+ Frame {
+ msec: 5680
+ hash: "9b174cd9a87ff193ce646408946b310c"
+ }
+ Frame {
+ msec: 5696
+ hash: "89fa590b47ee77021dedf7938439ce69"
+ }
+ Frame {
+ msec: 5712
+ hash: "6e5680803184dfc76cbf1c2de804d6cc"
+ }
+ Frame {
+ msec: 5728
+ hash: "c6de6b9203673c77427ab84ce86daaf5"
+ }
+ Frame {
+ msec: 5744
+ hash: "198f8e912c19debd51f837627d1171e9"
+ }
+ Frame {
+ msec: 5760
+ image: "cursorDelegate.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "254942e12b8a31420d2243b7e2529ae8"
+ }
+ Frame {
+ msec: 5792
+ hash: "ebf121910a5318c284f8e964d63aed40"
+ }
+ Frame {
+ msec: 5808
+ hash: "0fcf416a80d22f077fcf4d23bddeb6c6"
+ }
+ Frame {
+ msec: 5824
+ hash: "4a6596da390380dbafc1cdaceca1101e"
+ }
+ Frame {
+ msec: 5840
+ hash: "367391b2a124e2c818510567d0884d18"
+ }
+ Frame {
+ msec: 5856
+ hash: "c2be53ae5e2d5d3081df9af31426ec84"
+ }
+ Frame {
+ msec: 5872
+ hash: "52350ac5d10f8fe7571d12193b861d3f"
+ }
+ Frame {
+ msec: 5888
+ hash: "f286a35d7f4a022315f69a5db72da388"
+ }
+ Frame {
+ msec: 5904
+ hash: "aa329519eba4dad9589bff095528c535"
+ }
+ Frame {
+ msec: 5920
+ hash: "0beae60853afaaa0e7f7540fb50bcddf"
+ }
+ Frame {
+ msec: 5936
+ hash: "dc098a8b4d2f117a09cf1f2ced201a60"
+ }
+ Frame {
+ msec: 5952
+ hash: "3655b992097b433071ec9dd69e086c70"
+ }
+ Frame {
+ msec: 5968
+ hash: "82cb92d7940d13deee97e4ccda9210fb"
+ }
+ Frame {
+ msec: 5984
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6000
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6016
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6032
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6048
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 6064
+ hash: "82cb92d7940d13deee97e4ccda9210fb"
+ }
+ Frame {
+ msec: 6080
+ hash: "3655b992097b433071ec9dd69e086c70"
+ }
+ Frame {
+ msec: 6096
+ hash: "dc098a8b4d2f117a09cf1f2ced201a60"
+ }
+ Frame {
+ msec: 6112
+ hash: "0beae60853afaaa0e7f7540fb50bcddf"
+ }
+ Frame {
+ msec: 6128
+ hash: "aa329519eba4dad9589bff095528c535"
+ }
+ Frame {
+ msec: 6144
+ hash: "f286a35d7f4a022315f69a5db72da388"
+ }
+ Frame {
+ msec: 6160
+ hash: "52350ac5d10f8fe7571d12193b861d3f"
+ }
+ Frame {
+ msec: 6176
+ hash: "c2be53ae5e2d5d3081df9af31426ec84"
+ }
+ Frame {
+ msec: 6192
+ hash: "367391b2a124e2c818510567d0884d18"
+ }
+ Frame {
+ msec: 6208
+ hash: "4a6596da390380dbafc1cdaceca1101e"
+ }
+ Frame {
+ msec: 6224
+ hash: "0fcf416a80d22f077fcf4d23bddeb6c6"
+ }
+ Frame {
+ msec: 6240
+ hash: "ebf121910a5318c284f8e964d63aed40"
+ }
+ Frame {
+ msec: 6256
+ hash: "254942e12b8a31420d2243b7e2529ae8"
+ }
+ Frame {
+ msec: 6272
+ hash: "3b380dcb6815698241f3dcccb52785c2"
+ }
+ Frame {
+ msec: 6288
+ hash: "198f8e912c19debd51f837627d1171e9"
+ }
+ Frame {
+ msec: 6304
+ hash: "c6de6b9203673c77427ab84ce86daaf5"
+ }
+ Frame {
+ msec: 6320
+ hash: "6e5680803184dfc76cbf1c2de804d6cc"
+ }
+ Frame {
+ msec: 6336
+ hash: "89fa590b47ee77021dedf7938439ce69"
+ }
+ Frame {
+ msec: 6352
+ hash: "9b174cd9a87ff193ce646408946b310c"
+ }
+ Frame {
+ msec: 6368
+ hash: "ff7e2cdd006f9b76ab8c0416d81f0cb1"
+ }
+ Frame {
+ msec: 6384
+ hash: "4b81757a105aa7c5ac6148455eea66c3"
+ }
+ Frame {
+ msec: 6400
+ hash: "ceda37af96bd02baae218d3bfaed93f7"
+ }
+ Frame {
+ msec: 6416
+ hash: "8159bda651d95a320ac09aa6feb377a1"
+ }
+ Frame {
+ msec: 6432
+ hash: "5e483b0fd4808f2fb31aea90ccf86d3e"
+ }
+ Frame {
+ msec: 6448
+ hash: "bdfb42dc3879099e402784238c2cdddb"
+ }
+ Frame {
+ msec: 6464
+ hash: "f2ddf9d4fd3a2a2d354172714ce94d99"
+ }
+ Frame {
+ msec: 6480
+ hash: "c0dc1cf5ba7014e069c4d4bd7ac0f89d"
+ }
+ Frame {
+ msec: 6496
+ hash: "bf8459b99ca0bf568c58a3bb2a2fcc1f"
+ }
+ Frame {
+ msec: 6512
+ hash: "3af60972e7d5d4320a549e5df52a1228"
+ }
+ Frame {
+ msec: 6528
+ hash: "438be260f19d04c9f98ed7dce1c7db40"
+ }
+ Frame {
+ msec: 6544
+ hash: "6032aada2c48092000ecb93e52656414"
+ }
+ Frame {
+ msec: 6560
+ hash: "d23bdd94019477d8378cde580d8765ad"
+ }
+ Frame {
+ msec: 6576
+ hash: "d74f8e44d47710714d4197809fffb622"
+ }
+ Frame {
+ msec: 6592
+ hash: "4fbbb8447d80012bc6b5c24ddbfe498e"
+ }
+ Frame {
+ msec: 6608
+ hash: "4e875ba8703b690a17e445f2b3810435"
+ }
+ Frame {
+ msec: 6624
+ hash: "e4d7a59716cd704fe1cfa8ba91454e93"
+ }
+ Frame {
+ msec: 6640
+ hash: "a2ea272b45d8de225826d9381015ff2e"
+ }
+ Frame {
+ msec: 6656
+ hash: "5d112a3675ea4c010e7bc60e036d0262"
+ }
+ Frame {
+ msec: 6672
+ hash: "788d8962f311adf57a3acc876b0e8804"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 271; y: 89
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6688
+ hash: "e2eb18af82c85ea78ba438163e922df3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 271; y: 92
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6704
+ hash: "91b2695e4915238ae8610a64e279b0f4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 271; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 270; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6720
+ image: "cursorDelegate.6.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 269; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6736
+ hash: "ea2d610e9b41e72b2984a51f0d3f7587"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 268; y: 107
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6752
+ hash: "ee661e6cc1f86e755ff399adb6b11fd1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 266; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6768
+ hash: "01e937e1fcc0331b2541fa32c3479a24"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 266; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6784
+ hash: "702864de569e6a5648ee174d5ef891f8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 265; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6800
+ hash: "0f500339c81ca3621d13910017b84b7b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 263; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 261; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6816
+ hash: "76fb2e1ad33affe33c0887f04caa7396"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 259; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6832
+ hash: "9dc01a69f2a6892d3c4203674c8bef72"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 256; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6848
+ hash: "58693aa1a3616310b7ae1e529c4c461a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 250; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 243; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6864
+ hash: "96afccd7ec697c9c10840f0effaa448d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 235; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6880
+ hash: "a00d49e2a9069b1be41f95f6ff4c0312"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 227; y: 121
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6896
+ hash: "a0ff4b93291fc12054d3989a20335a87"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 218; y: 124
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 126
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6912
+ hash: "a86e1347bb25489547514955762d92d3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 200; y: 126
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6928
+ hash: "e5cba3c1e41e38117508c84e894beb11"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 190; y: 127
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6944
+ hash: "2560f53b8ac0a84fef895dbb8f0e393e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 181; y: 127
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 172; y: 127
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6960
+ hash: "c1b8bfc008319b793b6bd9345d34ccf5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 163; y: 127
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6976
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 154; y: 126
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6992
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 146; y: 124
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 138; y: 121
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7008
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 130; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7024
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 123; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7040
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 118; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 114; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7056
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 110; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7072
+ hash: "a9f2804ac7918971f237c4cfa6339c24"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 108; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7088
+ hash: "bc9c96855f048cb6c86d480e501322ab"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 107; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 106; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7104
+ hash: "706730602364bfb4d0193d1728a6d350"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 105; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7120
+ hash: "df80fe3e3ba35ab3fafca929b9101e13"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 104; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7136
+ hash: "aa8fa1baf61919004a4f14948826882e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 103; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 102; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7152
+ hash: "1829dfa3615d6ae430ba81a2df9a9e15"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 101; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7168
+ hash: "c4ea5c767192bbd3bfac58d07594016a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 100; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7184
+ hash: "319aede65b3473f28a4ca62a524e4a76"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 100; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 100; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7200
+ hash: "e1de653161e3348e083267c9082bc0f0"
+ }
+ Frame {
+ msec: 7216
+ hash: "de5f2d5147c600d2cb44072801c2338e"
+ }
+ Frame {
+ msec: 7232
+ hash: "6db41d704d2e28f36b206bdb317ee361"
+ }
+ Frame {
+ msec: 7248
+ hash: "a500b87efea241cdf8adf97ae86e10c3"
+ }
+ Frame {
+ msec: 7264
+ hash: "86c4eb0164a5b57eb22de4c9d58345f5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 100; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7280
+ hash: "2dbb1e3a1374b7c4aecd5a891be4573d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 101; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7296
+ hash: "07bcafdf5ca28a1416a20ed375ec3ea6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 101; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7312
+ hash: "e79def41bbf7e544d64cf19d74524d3a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 102; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 102; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7328
+ hash: "20aff98618d16c00dc9b76035e9523f5"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 103; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7344
+ hash: "12b5e016bad990d1f2bf427ee8e3e6d9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 104; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 105; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7360
+ hash: "66a2ba3f9e005cd58aa50cfa0000cd15"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 107; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7376
+ hash: "a2e9e42e09dadbd0791f52bb96e0e0dc"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 110; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7392
+ hash: "ac68396566ea85a157e944e601dd8d18"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 113; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 117; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7408
+ hash: "b9bfdebec8dd1a93de7ef2768b2542ba"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 124; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7424
+ hash: "2e0a4b960803770acb34ef56ccf2be35"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 131; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7440
+ hash: "df1643f0f8b7aa2dc080958822aeb3d0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 138; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 144; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7456
+ hash: "af8ce877d953727d37fd6f7e4962f45a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 148; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 152; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7472
+ hash: "b9de04c0d7532d67404a5a773d9fab99"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 155; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7488
+ hash: "7904312a7efe0b545070c5a5615011df"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 157; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7504
+ hash: "0069a8f088c83c6716bac15567a5b38d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 159; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 162; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7520
+ hash: "8c17c78d663097e275ed2f80d6479caf"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 163; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7536
+ hash: "9e8781569e07fca7def229b76189082d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 165; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7552
+ hash: "8dba2f259740d869bfa20205d2e14433"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 166; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 168; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7568
+ hash: "4e7ad066aadbad3f71a08962ba1379c0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 171; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7584
+ hash: "a5d1554a6fb311239acc077f01adc597"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 174; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7600
+ hash: "e91b45c430f7e10c2205af620350ddb6"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 177; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 183; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7616
+ hash: "6c731f4dbdec441cd36b1e9727758d73"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 188; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7632
+ hash: "31634e757bdec45feb1f021e35746d65"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 193; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7648
+ hash: "846dcb42fa85719223eb19f7af3d0630"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7664
+ hash: "a5826c5d7d1b9161cc7fb76f59021fdd"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7680
+ image: "cursorDelegate.7.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 211; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7696
+ hash: "bdfb9b949489744bc77905249eb647f9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 212; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 212; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7712
+ hash: "307d4fb47604c00e213f8d9616e0da13"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 213; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7728
+ hash: "74201a80a9032cb18b0c9e26bb67363f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 214; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7744
+ hash: "38ca918199552a525fb7f3a3773761d9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 215; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7760
+ hash: "d64c06c25229b3b64b779ca1bef7d2cb"
+ }
+ Frame {
+ msec: 7776
+ hash: "4ba0117db1ff431de20c06c79866d509"
+ }
+ Frame {
+ msec: 7792
+ hash: "ca56899ded0e5ea361aac24493793f58"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 215; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 215; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7808
+ hash: "ebce1d3b4d088278b6f36dac444c7ca6"
+ }
+ Frame {
+ msec: 7824
+ hash: "16c52065169bffc4648eda0226dba13a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 216; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7840
+ hash: "7a5a6a02f57545d9f2336ff18dd118d6"
+ }
+ Frame {
+ msec: 7856
+ hash: "328c8133c68fc2e86dc2193d1bee3259"
+ }
+ Frame {
+ msec: 7872
+ hash: "fcad1d2819e3cede6081b4dfbb5a4a65"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 216; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7888
+ hash: "85ff2968ba06443f300c9c0ef36c7054"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 216; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7904
+ hash: "871025c33fa769a790fc460a95b183ec"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 216; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7920
+ hash: "5b96f2673e0ccd2b198b9f99c65b4b12"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 217; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7936
+ hash: "5fc6f30a2dd019c4f2af056b51cfaa27"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 218; y: 115
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 218; y: 115
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7952
+ hash: "fc6bf3bcde1f89f0bff40e3e019aed33"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 219; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7968
+ hash: "703beec7b035080146131936da8c0fb3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 220; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7984
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 221; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 222; y: 113
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8000
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 222; y: 113
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8016
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 8032
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 8048
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 222; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8064
+ hash: "703beec7b035080146131936da8c0fb3"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 222; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8080
+ hash: "fc6bf3bcde1f89f0bff40e3e019aed33"
+ }
+ Frame {
+ msec: 8096
+ hash: "5fc6f30a2dd019c4f2af056b51cfaa27"
+ }
+ Frame {
+ msec: 8112
+ hash: "5b96f2673e0ccd2b198b9f99c65b4b12"
+ }
+ Frame {
+ msec: 8128
+ hash: "871025c33fa769a790fc460a95b183ec"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 222; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8144
+ hash: "85ff2968ba06443f300c9c0ef36c7054"
+ }
+ Frame {
+ msec: 8160
+ hash: "fcad1d2819e3cede6081b4dfbb5a4a65"
+ }
+ Frame {
+ msec: 8176
+ hash: "328c8133c68fc2e86dc2193d1bee3259"
+ }
+ Frame {
+ msec: 8192
+ hash: "7a5a6a02f57545d9f2336ff18dd118d6"
+ }
+ Frame {
+ msec: 8208
+ hash: "16c52065169bffc4648eda0226dba13a"
+ }
+ Frame {
+ msec: 8224
+ hash: "ebce1d3b4d088278b6f36dac444c7ca6"
+ }
+ Frame {
+ msec: 8240
+ hash: "ca56899ded0e5ea361aac24493793f58"
+ }
+ Frame {
+ msec: 8256
+ hash: "4ba0117db1ff431de20c06c79866d509"
+ }
+ Frame {
+ msec: 8272
+ hash: "d64c06c25229b3b64b779ca1bef7d2cb"
+ }
+ Frame {
+ msec: 8288
+ hash: "38ca918199552a525fb7f3a3773761d9"
+ }
+ Frame {
+ msec: 8304
+ hash: "74201a80a9032cb18b0c9e26bb67363f"
+ }
+ Frame {
+ msec: 8320
+ hash: "307d4fb47604c00e213f8d9616e0da13"
+ }
+ Frame {
+ msec: 8336
+ hash: "9ad660f83ed62b964b676106f8aa7114"
+ }
+ Frame {
+ msec: 8352
+ hash: "457fc0df515f9813e98a6a86f4ab5231"
+ }
+ Frame {
+ msec: 8368
+ hash: "372cbc6ad4edc85319743627ced05671"
+ }
+ Frame {
+ msec: 8384
+ hash: "4e08beac6ee40acaa4de6963522d63d0"
+ }
+ Frame {
+ msec: 8400
+ hash: "5e790c2199a5e95fc17f8c0b49809cc9"
+ }
+ Frame {
+ msec: 8416
+ hash: "e36310e1866d4a95bac60084fa4aa2c1"
+ }
+ Frame {
+ msec: 8432
+ hash: "b7182b171316cc2db4de2b23de93dc41"
+ }
+ Frame {
+ msec: 8448
+ hash: "6aaf7f8e6e238973dfd4030eb146198b"
+ }
+ Frame {
+ msec: 8464
+ hash: "901ead3167e602dfe043c56c6c805d54"
+ }
+ Frame {
+ msec: 8480
+ hash: "5a97542680475b1382ad5b7c3f6fa96a"
+ }
+ Frame {
+ msec: 8496
+ hash: "fb34d93127f3c3ad0c7bacce0200753b"
+ }
+ Frame {
+ msec: 8512
+ hash: "993c97dc85e83e241538356e317b7767"
+ }
+ Frame {
+ msec: 8528
+ hash: "fb11a9edb3a613be5cb6949c76c5c715"
+ }
+ Frame {
+ msec: 8544
+ hash: "e68b7461f94adeaf330f67d36d0d3b3e"
+ }
+ Frame {
+ msec: 8560
+ hash: "7ed043cc027fdb467bd16847187cd48d"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 277; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8576
+ hash: "fefbb2f4671f8a36f9d2207ced8c0bfb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 277; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8592
+ hash: "1ab596339afc1f96136ee69c4b7688e1"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 276; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8608
+ hash: "e07f59d729cb2790296e8c7cd3d0d3c9"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 276; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8624
+ hash: "a7dccada1080487cab2d0a916676c5cb"
+ }
+ Frame {
+ msec: 8640
+ image: "cursorDelegate.8.png"
+ }
+ Frame {
+ msec: 8656
+ hash: "9329d353c678d2bc61d08f63029d1b9b"
+ }
+ Frame {
+ msec: 8672
+ hash: "41263f56af7875028bb0c1e7eccf6f5d"
+ }
+ Frame {
+ msec: 8688
+ hash: "e2eb18af82c85ea78ba438163e922df3"
+ }
+ Frame {
+ msec: 8704
+ hash: "91b2695e4915238ae8610a64e279b0f4"
+ }
+ Frame {
+ msec: 8720
+ hash: "a97d90765f87b998eae6e9f603c61bff"
+ }
+ Frame {
+ msec: 8736
+ hash: "48969edab07b942480d93ac2d383ca24"
+ }
+ Frame {
+ msec: 8752
+ hash: "ecfd9d6d5873001f0c67806544a14983"
+ }
+ Frame {
+ msec: 8768
+ hash: "a3a3bc1e2523d3e7f961893bcd1dd3a8"
+ }
+ Frame {
+ msec: 8784
+ hash: "e337735ad0b42e60c54f16f3da7af3cf"
+ }
+ Frame {
+ msec: 8800
+ hash: "c39db081130d269f25dbcb1a19afb8d0"
+ }
+ Frame {
+ msec: 8816
+ hash: "c464d501e3935ec0f53eb780bd1a8289"
+ }
+ Frame {
+ msec: 8832
+ hash: "2be4fd986de19f6f76dfddec75b26804"
+ }
+ Frame {
+ msec: 8848
+ hash: "a1280e9fb86ca96b2340bb70aa774806"
+ }
+ Frame {
+ msec: 8864
+ hash: "cce4c17a387893478bcfa547f7561aba"
+ }
+ Frame {
+ msec: 8880
+ hash: "7094db3e04895d8d7f5f58caf0658592"
+ }
+ Frame {
+ msec: 8896
+ hash: "edb1f644757f9ba0a39549d77141c280"
+ }
+ Frame {
+ msec: 8912
+ hash: "cd381e847ecfce2db111bdf94a437cbc"
+ }
+ Frame {
+ msec: 8928
+ hash: "6a089603b641b683a744b88f2ebe82d1"
+ }
+ Frame {
+ msec: 8944
+ hash: "8c0e47f7c87a1a11cd733a453b31c780"
+ }
+ Frame {
+ msec: 8960
+ hash: "b53c892d62e787eb2565820d79739de6"
+ }
+ Frame {
+ msec: 8976
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 8992
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 9008
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 9024
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 9040
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 9056
+ hash: "e165a0b90fdc1eef2c8244ad8545bd6f"
+ }
+ Frame {
+ msec: 9072
+ hash: "b53c892d62e787eb2565820d79739de6"
+ }
+ Frame {
+ msec: 9088
+ hash: "8c0e47f7c87a1a11cd733a453b31c780"
+ }
+ Frame {
+ msec: 9104
+ hash: "6a089603b641b683a744b88f2ebe82d1"
+ }
+ Frame {
+ msec: 9120
+ hash: "cd381e847ecfce2db111bdf94a437cbc"
+ }
+ Frame {
+ msec: 9136
+ hash: "edb1f644757f9ba0a39549d77141c280"
+ }
+ Frame {
+ msec: 9152
+ hash: "7094db3e04895d8d7f5f58caf0658592"
+ }
+ Frame {
+ msec: 9168
+ hash: "cce4c17a387893478bcfa547f7561aba"
+ }
+ Frame {
+ msec: 9184
+ hash: "a1280e9fb86ca96b2340bb70aa774806"
+ }
+ Frame {
+ msec: 9200
+ hash: "2be4fd986de19f6f76dfddec75b26804"
+ }
+ Frame {
+ msec: 9216
+ hash: "c464d501e3935ec0f53eb780bd1a8289"
+ }
+ Frame {
+ msec: 9232
+ hash: "c39db081130d269f25dbcb1a19afb8d0"
+ }
+ Frame {
+ msec: 9248
+ hash: "e337735ad0b42e60c54f16f3da7af3cf"
+ }
+ Frame {
+ msec: 9264
+ hash: "a3a3bc1e2523d3e7f961893bcd1dd3a8"
+ }
+ Frame {
+ msec: 9280
+ hash: "ecfd9d6d5873001f0c67806544a14983"
+ }
+ Frame {
+ msec: 9296
+ hash: "48969edab07b942480d93ac2d383ca24"
+ }
+ Frame {
+ msec: 9312
+ hash: "a97d90765f87b998eae6e9f603c61bff"
+ }
+ Frame {
+ msec: 9328
+ hash: "91b2695e4915238ae8610a64e279b0f4"
+ }
+ Frame {
+ msec: 9344
+ hash: "e2eb18af82c85ea78ba438163e922df3"
+ }
+ Frame {
+ msec: 9360
+ hash: "41263f56af7875028bb0c1e7eccf6f5d"
+ }
+ Frame {
+ msec: 9376
+ hash: "9329d353c678d2bc61d08f63029d1b9b"
+ }
+ Frame {
+ msec: 9392
+ hash: "ac5939eb4379394fab829b307cbfe7ec"
+ }
+ Frame {
+ msec: 9408
+ hash: "a7dccada1080487cab2d0a916676c5cb"
+ }
+ Frame {
+ msec: 9424
+ hash: "e07f59d729cb2790296e8c7cd3d0d3c9"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.0.png b/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.0.png
new file mode 100644
index 0000000000..2b45a061da
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.1.png b/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.1.png
new file mode 100644
index 0000000000..1f5bae01c3
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.2.png b/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.2.png
new file mode 100644
index 0000000000..cb2b5a4aa3
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.3.png b/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.3.png
new file mode 100644
index 0000000000..aa24805e0c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.4.png b/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.4.png
new file mode 100644
index 0000000000..aa24805e0c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.qml b/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.qml
new file mode 100644
index 0000000000..dd7b291607
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/echoMode.qml
@@ -0,0 +1,1043 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 32
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Key {
+ type: 6
+ key: 16777248
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 48
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 64
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 80
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 96
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 112
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 128
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 144
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 160
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 176
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 192
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 208
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 224
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 240
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 256
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 272
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 288
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 304
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 320
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 336
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 352
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Key {
+ type: 6
+ key: 74
+ modifiers: 33554432
+ text: "4a"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 368
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 384
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 400
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 416
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 432
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Key {
+ type: 7
+ key: 74
+ modifiers: 33554432
+ text: "4a"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 448
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 464
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 480
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 496
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 512
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 528
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Key {
+ type: 7
+ key: 16777248
+ modifiers: 33554432
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 544
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 560
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 576
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 592
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 608
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 624
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 640
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 656
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 672
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 688
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Key {
+ type: 6
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 704
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Frame {
+ msec: 720
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Frame {
+ msec: 736
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Frame {
+ msec: 752
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Frame {
+ msec: 768
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Key {
+ type: 7
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 784
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Frame {
+ msec: 800
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Frame {
+ msec: 816
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Frame {
+ msec: 832
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Frame {
+ msec: 848
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Key {
+ type: 6
+ key: 67
+ modifiers: 0
+ text: "63"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 864
+ hash: "a4b81c526a5bf8902fde9b8721980977"
+ }
+ Frame {
+ msec: 880
+ hash: "a4b81c526a5bf8902fde9b8721980977"
+ }
+ Frame {
+ msec: 896
+ hash: "a4b81c526a5bf8902fde9b8721980977"
+ }
+ Key {
+ type: 7
+ key: 67
+ modifiers: 0
+ text: "63"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 912
+ hash: "a4b81c526a5bf8902fde9b8721980977"
+ }
+ Frame {
+ msec: 928
+ hash: "a4b81c526a5bf8902fde9b8721980977"
+ }
+ Frame {
+ msec: 944
+ hash: "a4b81c526a5bf8902fde9b8721980977"
+ }
+ Frame {
+ msec: 960
+ image: "echoMode.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "a4b81c526a5bf8902fde9b8721980977"
+ }
+ Key {
+ type: 6
+ key: 75
+ modifiers: 0
+ text: "6b"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 992
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1008
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1024
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1040
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Key {
+ type: 7
+ key: 75
+ modifiers: 0
+ text: "6b"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1056
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1072
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1088
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1104
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1120
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1136
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1152
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1168
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1184
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1200
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1216
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1232
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Key {
+ type: 6
+ key: 68
+ modifiers: 0
+ text: "64"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1248
+ hash: "94defec2865529f185d02cfcbfe166cc"
+ }
+ Frame {
+ msec: 1264
+ hash: "94defec2865529f185d02cfcbfe166cc"
+ }
+ Frame {
+ msec: 1280
+ hash: "94defec2865529f185d02cfcbfe166cc"
+ }
+ Key {
+ type: 7
+ key: 68
+ modifiers: 0
+ text: "64"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1296
+ hash: "94defec2865529f185d02cfcbfe166cc"
+ }
+ Frame {
+ msec: 1312
+ hash: "94defec2865529f185d02cfcbfe166cc"
+ }
+ Frame {
+ msec: 1328
+ hash: "94defec2865529f185d02cfcbfe166cc"
+ }
+ Key {
+ type: 6
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1344
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Frame {
+ msec: 1360
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Frame {
+ msec: 1376
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Frame {
+ msec: 1392
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Frame {
+ msec: 1408
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Frame {
+ msec: 1424
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Frame {
+ msec: 1440
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Frame {
+ msec: 1456
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Frame {
+ msec: 1472
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Key {
+ type: 7
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1488
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Key {
+ type: 6
+ key: 87
+ modifiers: 0
+ text: "77"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1504
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Frame {
+ msec: 1520
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Frame {
+ msec: 1536
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Frame {
+ msec: 1552
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Key {
+ type: 7
+ key: 87
+ modifiers: 0
+ text: "77"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1568
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Frame {
+ msec: 1584
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Frame {
+ msec: 1600
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Frame {
+ msec: 1616
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Frame {
+ msec: 1632
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Frame {
+ msec: 1648
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Key {
+ type: 6
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1664
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Frame {
+ msec: 1680
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Frame {
+ msec: 1696
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Frame {
+ msec: 1712
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Frame {
+ msec: 1728
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1744
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Key {
+ type: 7
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1760
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Frame {
+ msec: 1776
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Frame {
+ msec: 1792
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1808
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Frame {
+ msec: 1824
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Frame {
+ msec: 1840
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Frame {
+ msec: 1856
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Key {
+ type: 6
+ key: 76
+ modifiers: 0
+ text: "6c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1872
+ hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ }
+ Frame {
+ msec: 1888
+ hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ }
+ Frame {
+ msec: 1904
+ hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ }
+ Frame {
+ msec: 1920
+ image: "echoMode.1.png"
+ }
+ Key {
+ type: 7
+ key: 76
+ modifiers: 0
+ text: "6c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1936
+ hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ }
+ Frame {
+ msec: 1952
+ hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ }
+ Frame {
+ msec: 1968
+ hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ }
+ Frame {
+ msec: 1984
+ hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ }
+ Frame {
+ msec: 2000
+ hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ }
+ Frame {
+ msec: 2016
+ hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ }
+ Key {
+ type: 6
+ key: 79
+ modifiers: 0
+ text: "6f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2032
+ hash: "c2aff1ebdee69cca7dc67a102fce5e8e"
+ }
+ Frame {
+ msec: 2048
+ hash: "c2aff1ebdee69cca7dc67a102fce5e8e"
+ }
+ Key {
+ type: 7
+ key: 79
+ modifiers: 0
+ text: "6f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2064
+ hash: "c2aff1ebdee69cca7dc67a102fce5e8e"
+ }
+ Frame {
+ msec: 2080
+ hash: "c2aff1ebdee69cca7dc67a102fce5e8e"
+ }
+ Key {
+ type: 6
+ key: 86
+ modifiers: 0
+ text: "76"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2096
+ hash: "c82441813af6ff577687f29f6a09da38"
+ }
+ Frame {
+ msec: 2112
+ hash: "c82441813af6ff577687f29f6a09da38"
+ }
+ Frame {
+ msec: 2128
+ hash: "c82441813af6ff577687f29f6a09da38"
+ }
+ Frame {
+ msec: 2144
+ hash: "c82441813af6ff577687f29f6a09da38"
+ }
+ Key {
+ type: 6
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 7
+ key: 86
+ modifiers: 0
+ text: "76"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2160
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Frame {
+ msec: 2176
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Frame {
+ msec: 2192
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Frame {
+ msec: 2208
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2224
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Key {
+ type: 7
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2240
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Frame {
+ msec: 2256
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Frame {
+ msec: 2272
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Frame {
+ msec: 2288
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Frame {
+ msec: 2304
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2320
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Frame {
+ msec: 2336
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Key {
+ type: 6
+ key: 77
+ modifiers: 0
+ text: "6d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2352
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Frame {
+ msec: 2368
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Frame {
+ msec: 2384
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Frame {
+ msec: 2400
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Frame {
+ msec: 2416
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Frame {
+ msec: 2432
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Key {
+ type: 7
+ key: 77
+ modifiers: 0
+ text: "6d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2448
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Frame {
+ msec: 2464
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Frame {
+ msec: 2480
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Frame {
+ msec: 2496
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Key {
+ type: 6
+ key: 89
+ modifiers: 0
+ text: "79"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2512
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2528
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2544
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Key {
+ type: 7
+ key: 89
+ modifiers: 0
+ text: "79"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2560
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2576
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2592
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2608
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2624
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2640
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2656
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2672
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2688
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2704
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2720
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2736
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2752
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2768
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2784
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2800
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2816
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2832
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2848
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2864
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2880
+ image: "echoMode.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2912
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2928
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2944
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2960
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2976
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2992
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 3008
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 3024
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 3040
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 3056
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/hAlign.0.png b/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/hAlign.0.png
new file mode 100644
index 0000000000..87c2e07ec3
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/hAlign.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/hAlign.qml b/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/hAlign.qml
new file mode 100644
index 0000000000..e29ac569cf
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data-X11/hAlign.qml
@@ -0,0 +1,107 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 32
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 48
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 64
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 80
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 96
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 112
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 128
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 144
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 160
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 176
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 192
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 208
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 224
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 240
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 256
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 272
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 288
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 304
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 320
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 336
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 352
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 368
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 384
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 400
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.0.png b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.0.png
new file mode 100644
index 0000000000..f04f65ead0
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.1.png b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.1.png
new file mode 100644
index 0000000000..46a703a194
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.2.png b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.2.png
new file mode 100644
index 0000000000..e4a38774ed
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.3.png b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.3.png
new file mode 100644
index 0000000000..9ef842ae10
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.4.png b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.4.png
new file mode 100644
index 0000000000..706e2b390d
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.5.png b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.5.png
new file mode 100644
index 0000000000..bcc86cc407
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.6.png b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.6.png
new file mode 100644
index 0000000000..51ddd44f40
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.7.png b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.7.png
new file mode 100644
index 0000000000..0a2fddafdc
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.8.png b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.8.png
new file mode 100644
index 0000000000..9c88bff24d
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.8.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.qml b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.qml
new file mode 100644
index 0000000000..df2dd3894b
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data/cursorDelegate.qml
@@ -0,0 +1,3379 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 32
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 48
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 64
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 80
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 96
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 112
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 128
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 144
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 160
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 176
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 192
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 208
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 224
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 240
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 256
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 272
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 288
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 304
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 320
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 336
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 352
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 368
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 384
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 400
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 416
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 432
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 448
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 464
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 480
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 496
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Frame {
+ msec: 512
+ hash: "cd442d6dc4d155f54ae24f03d080f50c"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 528
+ hash: "56db24ad686d34e75a2d184e5b1da2a9"
+ }
+ Frame {
+ msec: 544
+ hash: "c3487c7c7dcd392e7eacb74045dd4143"
+ }
+ Frame {
+ msec: 560
+ hash: "70aedcda6c93875d18ee111d8a19549e"
+ }
+ Frame {
+ msec: 576
+ hash: "47ad557d366536ad457f6866241dba93"
+ }
+ Frame {
+ msec: 592
+ hash: "e715c2a82745829665226df78598b819"
+ }
+ Frame {
+ msec: 608
+ hash: "2ff4bd5602c34c020162f0503d625049"
+ }
+ Frame {
+ msec: 624
+ hash: "a494b3b25a23daa858034ebccce0d1c7"
+ }
+ Frame {
+ msec: 640
+ hash: "59d2fb8e21802d256b11730b31919fb3"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 656
+ hash: "5e09b95292d6d0afe76a5015b0ccebf1"
+ }
+ Frame {
+ msec: 672
+ hash: "de3c911aec7e42557ece4bdcf02ce562"
+ }
+ Frame {
+ msec: 688
+ hash: "680f51f63c4b11a247a668eb7bbd2b62"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 704
+ hash: "9aa569f7b251371bdd1cb05c8d3aab28"
+ }
+ Frame {
+ msec: 720
+ hash: "a242c9d5ed7f9aef0a0622dcb66d0a7e"
+ }
+ Frame {
+ msec: 736
+ hash: "a0cb3f796fddf7100ca19aee3dedbea8"
+ }
+ Frame {
+ msec: 752
+ hash: "b4e273b6415e3951eab2f831100b0bb2"
+ }
+ Frame {
+ msec: 768
+ hash: "fd3fd655785c4e3c470f742451e3470f"
+ }
+ Frame {
+ msec: 784
+ hash: "7a9b2057760e48d5f9cfdc79b08866d8"
+ }
+ Frame {
+ msec: 800
+ hash: "2a55b52db02d97963d382c9862307384"
+ }
+ Frame {
+ msec: 816
+ hash: "c6c90915393fc7cb0aaa464caefbadb0"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 832
+ hash: "4f097223462c8f619188b0b0c2ecb080"
+ }
+ Frame {
+ msec: 848
+ hash: "243be452ff0798538defc6a14cb8a08b"
+ }
+ Frame {
+ msec: 864
+ hash: "e5472ed9a8a43a64a0fea12540619940"
+ }
+ Frame {
+ msec: 880
+ hash: "90b0f5f1aa7b5f066fb1266ea63254eb"
+ }
+ Frame {
+ msec: 896
+ hash: "97d5f9fe02e4bd06ec30a7805945f167"
+ }
+ Frame {
+ msec: 912
+ hash: "eb381a1e2ad945e4cfa540c137edbda7"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 928
+ hash: "75252ff61682fd32117f0759ebe4b6a1"
+ }
+ Frame {
+ msec: 944
+ hash: "d724bdacc59bce29d0a42d72479be0b6"
+ }
+ Frame {
+ msec: 960
+ image: "cursorDelegate.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 992
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 1008
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 1024
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 1040
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 1056
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Key {
+ type: 6
+ key: 16777248
+ modifiers: 33554432
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 100663296
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1072
+ hash: "d7703c18b69f485bba3abd655100b50d"
+ }
+ Frame {
+ msec: 1088
+ hash: "d724bdacc59bce29d0a42d72479be0b6"
+ }
+ Frame {
+ msec: 1104
+ hash: "75252ff61682fd32117f0759ebe4b6a1"
+ }
+ Frame {
+ msec: 1120
+ hash: "eb381a1e2ad945e4cfa540c137edbda7"
+ }
+ Frame {
+ msec: 1136
+ hash: "97d5f9fe02e4bd06ec30a7805945f167"
+ }
+ Frame {
+ msec: 1152
+ hash: "90b0f5f1aa7b5f066fb1266ea63254eb"
+ }
+ Frame {
+ msec: 1168
+ hash: "e5472ed9a8a43a64a0fea12540619940"
+ }
+ Frame {
+ msec: 1184
+ hash: "243be452ff0798538defc6a14cb8a08b"
+ }
+ Frame {
+ msec: 1200
+ hash: "4f097223462c8f619188b0b0c2ecb080"
+ }
+ Frame {
+ msec: 1216
+ hash: "e7346d8f223684143a0940def878b874"
+ }
+ Frame {
+ msec: 1232
+ hash: "512b9746ae4482557b8cef9f99905954"
+ }
+ Frame {
+ msec: 1248
+ hash: "4220dde85eb1c027366efd0798927e8d"
+ }
+ Frame {
+ msec: 1264
+ hash: "54f7f94b5cdf1becb2ee61d7f6f02c0e"
+ }
+ Frame {
+ msec: 1280
+ hash: "de09380dd57c58ae99fbdba169a19975"
+ }
+ Frame {
+ msec: 1296
+ hash: "bfc1b03df244839a012e8302dc07764f"
+ }
+ Frame {
+ msec: 1312
+ hash: "d5f220e5337837ec0d07eb118e2f948e"
+ }
+ Frame {
+ msec: 1328
+ hash: "7640c78a286b0b7bdf2ec9117ceced4a"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 100663296
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1344
+ hash: "c659fd76d632aac26d396809b57826dd"
+ }
+ Frame {
+ msec: 1360
+ hash: "b5ba335eca37416970dcab53157d7ae6"
+ }
+ Frame {
+ msec: 1376
+ hash: "df498dac81260d8867221612ff3b7619"
+ }
+ Frame {
+ msec: 1392
+ hash: "578c3a682278f4ead0ca894f029dbfb7"
+ }
+ Frame {
+ msec: 1408
+ hash: "5fe9b2365b091047df1b18bcaa5b1bb4"
+ }
+ Frame {
+ msec: 1424
+ hash: "c513b8df83f1d1cc3c05769c41741653"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 100663296
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1440
+ hash: "ee70a2002f52a3f4a9fa32db668db3d0"
+ }
+ Frame {
+ msec: 1456
+ hash: "3f299da38c2f3f9057df987d5d339e1f"
+ }
+ Frame {
+ msec: 1472
+ hash: "55f6adbd00910e5f39977162cfe8dcc5"
+ }
+ Frame {
+ msec: 1488
+ hash: "151fb386855954ae5143046cab314ddf"
+ }
+ Frame {
+ msec: 1504
+ hash: "d9ec76b2c07077b5b6d6c3777d116164"
+ }
+ Frame {
+ msec: 1520
+ hash: "ef3ba6c27d9b28de829360985505c185"
+ }
+ Frame {
+ msec: 1536
+ hash: "8eafd8f9aea08c172f40de3c4f2b3b59"
+ }
+ Frame {
+ msec: 1552
+ hash: "2329d5b8182794bb8375f0de204c9b16"
+ }
+ Frame {
+ msec: 1568
+ hash: "e6b25cf1a8c6858f6937e649b1315955"
+ }
+ Frame {
+ msec: 1584
+ hash: "3aeedff600509a138b0de31e10bbdd7b"
+ }
+ Frame {
+ msec: 1600
+ hash: "0636dee0ddc551ce8ecf3a6c6300b020"
+ }
+ Frame {
+ msec: 1616
+ hash: "77f5b0dfdf0c631cf863be60bd09db9c"
+ }
+ Frame {
+ msec: 1632
+ hash: "2e86762371ae933546e8b2154c78f74b"
+ }
+ Frame {
+ msec: 1648
+ hash: "1051ec29f94c31b257a5b1c922f8e93f"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 100663296
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1664
+ hash: "5c60da876c8cc9fa334905b5fc7c2a3d"
+ }
+ Frame {
+ msec: 1680
+ hash: "c0b0cddd62853ac3499b7ada200d206a"
+ }
+ Frame {
+ msec: 1696
+ hash: "5bd588d64917f942e0f5ea1553acbf63"
+ }
+ Frame {
+ msec: 1712
+ hash: "bc5744ef5c81b7d5b365bf977f909be5"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 100663296
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1728
+ hash: "892a1a8a5a9c198e5ae04cc19f0e1d0c"
+ }
+ Frame {
+ msec: 1744
+ hash: "708799d2d834302c659958701e217b37"
+ }
+ Frame {
+ msec: 1760
+ hash: "360d75bcc178bcfd4f93741d653fd821"
+ }
+ Frame {
+ msec: 1776
+ hash: "1cfe03528b1cd84e69efc02b9677c748"
+ }
+ Frame {
+ msec: 1792
+ hash: "6f45d7c37f1fb90138011b2af24aaf1e"
+ }
+ Frame {
+ msec: 1808
+ hash: "ba164375e7ac18cf2e1e613498158fbf"
+ }
+ Frame {
+ msec: 1824
+ hash: "14052b9da9e17a6f06fed05d4ed82b9c"
+ }
+ Frame {
+ msec: 1840
+ hash: "aac15ce22bfe38f44a46e4644913f144"
+ }
+ Frame {
+ msec: 1856
+ hash: "c63aa02ba29ea18334b188185690948d"
+ }
+ Frame {
+ msec: 1872
+ hash: "11ed187ccd4c2221f166851c08b6b467"
+ }
+ Frame {
+ msec: 1888
+ hash: "3543bd4e538981d4bb2c2313c9663a53"
+ }
+ Frame {
+ msec: 1904
+ hash: "a05fa618b094bde2b54b730f513bcabe"
+ }
+ Frame {
+ msec: 1920
+ image: "cursorDelegate.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "52fc4a32526a74f9a04d8795c7a47c6e"
+ }
+ Frame {
+ msec: 1952
+ hash: "17623e1b0ffca3b7736ce930f078dbe0"
+ }
+ Frame {
+ msec: 1968
+ hash: "75226dac5691627851d83c7370d7603c"
+ }
+ Key {
+ type: 7
+ key: 16777249
+ modifiers: 33554432
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1984
+ hash: "9e506ad52020e2913e80a13a7f3ac797"
+ }
+ Frame {
+ msec: 2000
+ hash: "9e506ad52020e2913e80a13a7f3ac797"
+ }
+ Frame {
+ msec: 2016
+ hash: "9e506ad52020e2913e80a13a7f3ac797"
+ }
+ Frame {
+ msec: 2032
+ hash: "9e506ad52020e2913e80a13a7f3ac797"
+ }
+ Frame {
+ msec: 2048
+ hash: "9e506ad52020e2913e80a13a7f3ac797"
+ }
+ Frame {
+ msec: 2064
+ hash: "75226dac5691627851d83c7370d7603c"
+ }
+ Frame {
+ msec: 2080
+ hash: "17623e1b0ffca3b7736ce930f078dbe0"
+ }
+ Frame {
+ msec: 2096
+ hash: "52fc4a32526a74f9a04d8795c7a47c6e"
+ }
+ Frame {
+ msec: 2112
+ hash: "89f2d3b4441faee557b8d5f44e1e1e18"
+ }
+ Frame {
+ msec: 2128
+ hash: "a05fa618b094bde2b54b730f513bcabe"
+ }
+ Frame {
+ msec: 2144
+ hash: "3543bd4e538981d4bb2c2313c9663a53"
+ }
+ Frame {
+ msec: 2160
+ hash: "11ed187ccd4c2221f166851c08b6b467"
+ }
+ Frame {
+ msec: 2176
+ hash: "c63aa02ba29ea18334b188185690948d"
+ }
+ Frame {
+ msec: 2192
+ hash: "aac15ce22bfe38f44a46e4644913f144"
+ }
+ Frame {
+ msec: 2208
+ hash: "14052b9da9e17a6f06fed05d4ed82b9c"
+ }
+ Frame {
+ msec: 2224
+ hash: "ba164375e7ac18cf2e1e613498158fbf"
+ }
+ Frame {
+ msec: 2240
+ hash: "6f45d7c37f1fb90138011b2af24aaf1e"
+ }
+ Frame {
+ msec: 2256
+ hash: "1cfe03528b1cd84e69efc02b9677c748"
+ }
+ Key {
+ type: 7
+ key: 16777248
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2272
+ hash: "360d75bcc178bcfd4f93741d653fd821"
+ }
+ Frame {
+ msec: 2288
+ hash: "708799d2d834302c659958701e217b37"
+ }
+ Frame {
+ msec: 2304
+ hash: "892a1a8a5a9c198e5ae04cc19f0e1d0c"
+ }
+ Frame {
+ msec: 2320
+ hash: "bc5744ef5c81b7d5b365bf977f909be5"
+ }
+ Frame {
+ msec: 2336
+ hash: "5bd588d64917f942e0f5ea1553acbf63"
+ }
+ Frame {
+ msec: 2352
+ hash: "c0b0cddd62853ac3499b7ada200d206a"
+ }
+ Key {
+ type: 6
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2368
+ hash: "5c60da876c8cc9fa334905b5fc7c2a3d"
+ }
+ Frame {
+ msec: 2384
+ hash: "136a103a893991b97ec09f373c68c5b9"
+ }
+ Frame {
+ msec: 2400
+ hash: "b2181ce0165ee060e1a8b713027011a9"
+ }
+ Frame {
+ msec: 2416
+ hash: "e4836bbaf1834658e3ec4bf54a619b53"
+ }
+ Frame {
+ msec: 2432
+ hash: "3072492f5f72427c8d45cf3c5d3ff919"
+ }
+ Frame {
+ msec: 2448
+ hash: "d897cba896239c77df4f7adb93ad5def"
+ }
+ Frame {
+ msec: 2464
+ hash: "ec9867a95de6d6f4c0f92af567d73771"
+ }
+ Key {
+ type: 7
+ key: 16777236
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2480
+ hash: "06b72e3180eb946622e4592de0fa6f91"
+ }
+ Frame {
+ msec: 2496
+ hash: "33f109c026eaefed113cc12db5912a19"
+ }
+ Frame {
+ msec: 2512
+ hash: "ce72c4b4470394dc1c4efd4d9de9907f"
+ }
+ Frame {
+ msec: 2528
+ hash: "64ac1105ea10ae1f6401e8421731c606"
+ }
+ Frame {
+ msec: 2544
+ hash: "ef977bd74941d3506b8f3ee4b1f587ad"
+ }
+ Frame {
+ msec: 2560
+ hash: "9278de91e10788ae5a80399ff5372460"
+ }
+ Frame {
+ msec: 2576
+ hash: "ddaaf945a5f714b856ed5155f4e502b2"
+ }
+ Frame {
+ msec: 2592
+ hash: "f6bb6ba15d996345df04825da71c2cf3"
+ }
+ Frame {
+ msec: 2608
+ hash: "466c78a5a5052b39b113adeda761da6c"
+ }
+ Frame {
+ msec: 2624
+ hash: "db650537d773e0d8a737a7bf5f408a5e"
+ }
+ Frame {
+ msec: 2640
+ hash: "64be9f85869f19defada296343895a2b"
+ }
+ Frame {
+ msec: 2656
+ hash: "5ac6d9751bfadbc7aa064ca0b4d78b2b"
+ }
+ Frame {
+ msec: 2672
+ hash: "a088b351dcc6fc3a8d29256f3a2410c3"
+ }
+ Frame {
+ msec: 2688
+ hash: "a16a77170a6c969042024fa0868da12d"
+ }
+ Frame {
+ msec: 2704
+ hash: "3a2509d0d3a314d2ed72f811f4af741e"
+ }
+ Frame {
+ msec: 2720
+ hash: "484db4e1954048cad7eea48bfea08267"
+ }
+ Frame {
+ msec: 2736
+ hash: "ad0f84634c5f99ab62ab6d12ad8d8c6a"
+ }
+ Frame {
+ msec: 2752
+ hash: "d99b590307f6910963257a1c41c50120"
+ }
+ Key {
+ type: 6
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2768
+ hash: "54f7f94b5cdf1becb2ee61d7f6f02c0e"
+ }
+ Frame {
+ msec: 2784
+ hash: "4220dde85eb1c027366efd0798927e8d"
+ }
+ Frame {
+ msec: 2800
+ hash: "512b9746ae4482557b8cef9f99905954"
+ }
+ Frame {
+ msec: 2816
+ hash: "e7346d8f223684143a0940def878b874"
+ }
+ Frame {
+ msec: 2832
+ hash: "4f097223462c8f619188b0b0c2ecb080"
+ }
+ Frame {
+ msec: 2848
+ hash: "243be452ff0798538defc6a14cb8a08b"
+ }
+ Frame {
+ msec: 2864
+ hash: "e5472ed9a8a43a64a0fea12540619940"
+ }
+ Frame {
+ msec: 2880
+ image: "cursorDelegate.2.png"
+ }
+ Key {
+ type: 7
+ key: 16777234
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2896
+ hash: "97d5f9fe02e4bd06ec30a7805945f167"
+ }
+ Frame {
+ msec: 2912
+ hash: "eb381a1e2ad945e4cfa540c137edbda7"
+ }
+ Frame {
+ msec: 2928
+ hash: "75252ff61682fd32117f0759ebe4b6a1"
+ }
+ Frame {
+ msec: 2944
+ hash: "d724bdacc59bce29d0a42d72479be0b6"
+ }
+ Frame {
+ msec: 2960
+ hash: "d7703c18b69f485bba3abd655100b50d"
+ }
+ Frame {
+ msec: 2976
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 2992
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 3008
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 3024
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 3040
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 3056
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 3072
+ hash: "d7703c18b69f485bba3abd655100b50d"
+ }
+ Frame {
+ msec: 3088
+ hash: "d724bdacc59bce29d0a42d72479be0b6"
+ }
+ Frame {
+ msec: 3104
+ hash: "75252ff61682fd32117f0759ebe4b6a1"
+ }
+ Frame {
+ msec: 3120
+ hash: "eb381a1e2ad945e4cfa540c137edbda7"
+ }
+ Frame {
+ msec: 3136
+ hash: "97d5f9fe02e4bd06ec30a7805945f167"
+ }
+ Frame {
+ msec: 3152
+ hash: "90b0f5f1aa7b5f066fb1266ea63254eb"
+ }
+ Frame {
+ msec: 3168
+ hash: "e5472ed9a8a43a64a0fea12540619940"
+ }
+ Frame {
+ msec: 3184
+ hash: "243be452ff0798538defc6a14cb8a08b"
+ }
+ Frame {
+ msec: 3200
+ hash: "4f097223462c8f619188b0b0c2ecb080"
+ }
+ Frame {
+ msec: 3216
+ hash: "e7346d8f223684143a0940def878b874"
+ }
+ Frame {
+ msec: 3232
+ hash: "512b9746ae4482557b8cef9f99905954"
+ }
+ Frame {
+ msec: 3248
+ hash: "4220dde85eb1c027366efd0798927e8d"
+ }
+ Frame {
+ msec: 3264
+ hash: "54f7f94b5cdf1becb2ee61d7f6f02c0e"
+ }
+ Frame {
+ msec: 3280
+ hash: "de09380dd57c58ae99fbdba169a19975"
+ }
+ Frame {
+ msec: 3296
+ hash: "bfc1b03df244839a012e8302dc07764f"
+ }
+ Frame {
+ msec: 3312
+ hash: "d5f220e5337837ec0d07eb118e2f948e"
+ }
+ Frame {
+ msec: 3328
+ hash: "7640c78a286b0b7bdf2ec9117ceced4a"
+ }
+ Frame {
+ msec: 3344
+ hash: "680f51f63c4b11a247a668eb7bbd2b62"
+ }
+ Frame {
+ msec: 3360
+ hash: "de3c911aec7e42557ece4bdcf02ce562"
+ }
+ Frame {
+ msec: 3376
+ hash: "5e09b95292d6d0afe76a5015b0ccebf1"
+ }
+ Frame {
+ msec: 3392
+ hash: "59d2fb8e21802d256b11730b31919fb3"
+ }
+ Frame {
+ msec: 3408
+ hash: "a494b3b25a23daa858034ebccce0d1c7"
+ }
+ Frame {
+ msec: 3424
+ hash: "2ff4bd5602c34c020162f0503d625049"
+ }
+ Frame {
+ msec: 3440
+ hash: "e715c2a82745829665226df78598b819"
+ }
+ Frame {
+ msec: 3456
+ hash: "47ad557d366536ad457f6866241dba93"
+ }
+ Frame {
+ msec: 3472
+ hash: "70aedcda6c93875d18ee111d8a19549e"
+ }
+ Frame {
+ msec: 3488
+ hash: "c3487c7c7dcd392e7eacb74045dd4143"
+ }
+ Frame {
+ msec: 3504
+ hash: "56db24ad686d34e75a2d184e5b1da2a9"
+ }
+ Frame {
+ msec: 3520
+ hash: "436349a8371597a74404428983cd894c"
+ }
+ Frame {
+ msec: 3536
+ hash: "6e1bb59ec518614a0414092f4939d5ad"
+ }
+ Frame {
+ msec: 3552
+ hash: "f0aa02772df579b921e0c68f794d2327"
+ }
+ Frame {
+ msec: 3568
+ hash: "09ea1462da333c2aeaaa01e9e4f8d54b"
+ }
+ Frame {
+ msec: 3584
+ hash: "46d23d8472ce833591dcff548a644288"
+ }
+ Frame {
+ msec: 3600
+ hash: "a7566d5d35a89078bb378bf3f6c78e13"
+ }
+ Frame {
+ msec: 3616
+ hash: "4c5f7155b20e34a5627387cdc466e890"
+ }
+ Frame {
+ msec: 3632
+ hash: "e9b98922327c412db0116a56283d3c86"
+ }
+ Frame {
+ msec: 3648
+ hash: "29ffede9c16c34ead5f291e69e388084"
+ }
+ Frame {
+ msec: 3664
+ hash: "16958b8f0b1dbdc15333d99bd1349124"
+ }
+ Frame {
+ msec: 3680
+ hash: "3408f8d6e4d6ef34d4d5a0cb51090c4c"
+ }
+ Frame {
+ msec: 3696
+ hash: "b32b099b260789266d0a3c0edd61c04e"
+ }
+ Frame {
+ msec: 3712
+ hash: "4dd3617b25e8b95cf2ec31db8b3bb80f"
+ }
+ Frame {
+ msec: 3728
+ hash: "46b42a08c59909f067810d1984f7a04e"
+ }
+ Frame {
+ msec: 3744
+ hash: "ab8c505601c381e8a44fa7b6eea6579d"
+ }
+ Frame {
+ msec: 3760
+ hash: "73f56e6e1d2cbf3f559d679eb2c15529"
+ }
+ Frame {
+ msec: 3776
+ hash: "b230c56da330823d7d7f7e081c304acb"
+ }
+ Frame {
+ msec: 3792
+ hash: "9f3cbd0023dbd78ba4951c26f71c7d5d"
+ }
+ Frame {
+ msec: 3808
+ hash: "9e9b11cf2695dd02c1ab175ff194f491"
+ }
+ Frame {
+ msec: 3824
+ hash: "8fa6f8eb5deb0ab95c3454e5812ada1d"
+ }
+ Frame {
+ msec: 3840
+ image: "cursorDelegate.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "0b6b24ae8df7c3aa9abb48edb6619d8a"
+ }
+ Frame {
+ msec: 3872
+ hash: "45805295dd2482fdf21ac8c9bfe47869"
+ }
+ Frame {
+ msec: 3888
+ hash: "4893cd31a730d786f075edfd0afc0ad9"
+ }
+ Frame {
+ msec: 3904
+ hash: "a3fbfe732568f5cf6e63809fd7e0c32e"
+ }
+ Frame {
+ msec: 3920
+ hash: "21d3327710d51f714e84b5a28df13e4f"
+ }
+ Frame {
+ msec: 3936
+ hash: "ea065ab48f27f60505eab36debee3faa"
+ }
+ Frame {
+ msec: 3952
+ hash: "fe4c2e368d2110374b7ba9e30f330713"
+ }
+ Frame {
+ msec: 3968
+ hash: "723281f6c1a3f03cf170e4de93fa4dbf"
+ }
+ Frame {
+ msec: 3984
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 4000
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 4016
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 4032
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 4048
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 4064
+ hash: "723281f6c1a3f03cf170e4de93fa4dbf"
+ }
+ Key {
+ type: 6
+ key: 16777232
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4080
+ hash: "c779e46a89c3c9d0f8234a3192175b60"
+ }
+ Frame {
+ msec: 4096
+ hash: "f223cfeba468e161943b24ac960196de"
+ }
+ Frame {
+ msec: 4112
+ hash: "dd2f21f063d055edc23c874380149067"
+ }
+ Frame {
+ msec: 4128
+ hash: "af580b32b67117eb062bbcefe262c719"
+ }
+ Key {
+ type: 7
+ key: 16777232
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4144
+ hash: "991f76d483e033024932790f85bb3c5d"
+ }
+ Frame {
+ msec: 4160
+ hash: "3d8aa66ab9533d14a468f0869b457033"
+ }
+ Frame {
+ msec: 4176
+ hash: "a5540bd5d088ab1201b5f22b32579d7c"
+ }
+ Frame {
+ msec: 4192
+ hash: "e0844f30578fef2cdcee4e4ff28ab7cf"
+ }
+ Frame {
+ msec: 4208
+ hash: "710e7022b65a9b3fd3a7372bf7f37c7a"
+ }
+ Frame {
+ msec: 4224
+ hash: "db553c856b11db7e6feb38b9d562a804"
+ }
+ Frame {
+ msec: 4240
+ hash: "6ba56c4ec6e903b0d82235c230ed78cb"
+ }
+ Frame {
+ msec: 4256
+ hash: "786de35a11c3fc1a228392195f509c28"
+ }
+ Frame {
+ msec: 4272
+ hash: "cc6307597cea821b63391fc9bdbe038b"
+ }
+ Frame {
+ msec: 4288
+ hash: "73d49e4d0bef103e11820d888bef0368"
+ }
+ Frame {
+ msec: 4304
+ hash: "b2ed6ebf66252463326c2f220b3992fa"
+ }
+ Frame {
+ msec: 4320
+ hash: "129b5bc6d55621e2366fc0d80f105df2"
+ }
+ Frame {
+ msec: 4336
+ hash: "ae8fe55fa9b497cd6eff18a517c301d8"
+ }
+ Frame {
+ msec: 4352
+ hash: "535210bd848a20db2966b06278198e07"
+ }
+ Frame {
+ msec: 4368
+ hash: "1f4ea7783b5c60bfc424c73cea07a3a0"
+ }
+ Frame {
+ msec: 4384
+ hash: "5b61f2e9308c4de2864bb7cf133ce545"
+ }
+ Frame {
+ msec: 4400
+ hash: "f641f87e9556ecfd24f0f0a772295e52"
+ }
+ Frame {
+ msec: 4416
+ hash: "36f28574c0b042647bc064d75afa9fbc"
+ }
+ Frame {
+ msec: 4432
+ hash: "dba2ca165b8ab35113b8ec127b204ae9"
+ }
+ Frame {
+ msec: 4448
+ hash: "56324b95f63eabba718df588159f374d"
+ }
+ Frame {
+ msec: 4464
+ hash: "af65d67fef3c743e31acca03716040c4"
+ }
+ Frame {
+ msec: 4480
+ hash: "105481b5becd127af4c28961d900148c"
+ }
+ Frame {
+ msec: 4496
+ hash: "4859d6bf9c456e52fd463e4c2f68d7f6"
+ }
+ Frame {
+ msec: 4512
+ hash: "21c0958bd3c6a1056bb062165c9bc18b"
+ }
+ Frame {
+ msec: 4528
+ hash: "287d258a79f45c26c92c69cce6b1a2f3"
+ }
+ Frame {
+ msec: 4544
+ hash: "deabc5c7dd111adcb253eb833f118764"
+ }
+ Frame {
+ msec: 4560
+ hash: "4bad7380f6b645c551edbe06ff67cac9"
+ }
+ Frame {
+ msec: 4576
+ hash: "67fc71c16d0b9405c35590bafdc5ea40"
+ }
+ Key {
+ type: 6
+ key: 16777233
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4592
+ hash: "7aed794eae2f0c65342f190ed4d4f889"
+ }
+ Frame {
+ msec: 4608
+ hash: "23edee3af8f1904558863d37c520555a"
+ }
+ Frame {
+ msec: 4624
+ hash: "2f9ed13e8a0d0edf098b05db02c04bdf"
+ }
+ Key {
+ type: 7
+ key: 16777233
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4640
+ hash: "86ed2aa2428feb9c6c14ad2a74e97978"
+ }
+ Frame {
+ msec: 4656
+ hash: "e189dc0dae9457a6af5082c6ccf451b6"
+ }
+ Frame {
+ msec: 4672
+ hash: "62d4bfa65bfdc50d24d9204f4df7bad8"
+ }
+ Frame {
+ msec: 4688
+ hash: "5a11ec8a0485a018ebe317e01136e4a5"
+ }
+ Frame {
+ msec: 4704
+ hash: "9aa569f7b251371bdd1cb05c8d3aab28"
+ }
+ Frame {
+ msec: 4720
+ hash: "a242c9d5ed7f9aef0a0622dcb66d0a7e"
+ }
+ Frame {
+ msec: 4736
+ hash: "a0cb3f796fddf7100ca19aee3dedbea8"
+ }
+ Frame {
+ msec: 4752
+ hash: "b4e273b6415e3951eab2f831100b0bb2"
+ }
+ Frame {
+ msec: 4768
+ hash: "fd3fd655785c4e3c470f742451e3470f"
+ }
+ Frame {
+ msec: 4784
+ hash: "7a9b2057760e48d5f9cfdc79b08866d8"
+ }
+ Frame {
+ msec: 4800
+ image: "cursorDelegate.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "c6c90915393fc7cb0aaa464caefbadb0"
+ }
+ Frame {
+ msec: 4832
+ hash: "36b65658073ac2687dbd88ec7a408a98"
+ }
+ Frame {
+ msec: 4848
+ hash: "84e165f9f2c55c5c51a260b11ca195c2"
+ }
+ Frame {
+ msec: 4864
+ hash: "c11cfcfda6f161d058a3d9e93349b578"
+ }
+ Frame {
+ msec: 4880
+ hash: "0568f8c0e1fa51b7547790a7f4978ea3"
+ }
+ Frame {
+ msec: 4896
+ hash: "b66fd97ac36ac395df74e9a0dd58d0c7"
+ }
+ Frame {
+ msec: 4912
+ hash: "31b5b3d68e452ffd90e9804ff9e9a264"
+ }
+ Frame {
+ msec: 4928
+ hash: "3cc8791e419986e1e913d4e153243fb2"
+ }
+ Frame {
+ msec: 4944
+ hash: "ff1b3ce85bc9f3dd3feb90fa31c3bc0a"
+ }
+ Frame {
+ msec: 4960
+ hash: "d3ae969e538c642d82662d08ef05964e"
+ }
+ Frame {
+ msec: 4976
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 4992
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 5008
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 5024
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 5040
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 5056
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 5072
+ hash: "d3ae969e538c642d82662d08ef05964e"
+ }
+ Frame {
+ msec: 5088
+ hash: "ff1b3ce85bc9f3dd3feb90fa31c3bc0a"
+ }
+ Frame {
+ msec: 5104
+ hash: "3cc8791e419986e1e913d4e153243fb2"
+ }
+ Frame {
+ msec: 5120
+ hash: "31b5b3d68e452ffd90e9804ff9e9a264"
+ }
+ Frame {
+ msec: 5136
+ hash: "b66fd97ac36ac395df74e9a0dd58d0c7"
+ }
+ Frame {
+ msec: 5152
+ hash: "0568f8c0e1fa51b7547790a7f4978ea3"
+ }
+ Frame {
+ msec: 5168
+ hash: "c11cfcfda6f161d058a3d9e93349b578"
+ }
+ Frame {
+ msec: 5184
+ hash: "84e165f9f2c55c5c51a260b11ca195c2"
+ }
+ Frame {
+ msec: 5200
+ hash: "36b65658073ac2687dbd88ec7a408a98"
+ }
+ Frame {
+ msec: 5216
+ hash: "c6c90915393fc7cb0aaa464caefbadb0"
+ }
+ Frame {
+ msec: 5232
+ hash: "2a55b52db02d97963d382c9862307384"
+ }
+ Frame {
+ msec: 5248
+ hash: "7a9b2057760e48d5f9cfdc79b08866d8"
+ }
+ Frame {
+ msec: 5264
+ hash: "fd3fd655785c4e3c470f742451e3470f"
+ }
+ Frame {
+ msec: 5280
+ hash: "b4e273b6415e3951eab2f831100b0bb2"
+ }
+ Frame {
+ msec: 5296
+ hash: "a0cb3f796fddf7100ca19aee3dedbea8"
+ }
+ Frame {
+ msec: 5312
+ hash: "a242c9d5ed7f9aef0a0622dcb66d0a7e"
+ }
+ Frame {
+ msec: 5328
+ hash: "9aa569f7b251371bdd1cb05c8d3aab28"
+ }
+ Frame {
+ msec: 5344
+ hash: "5a11ec8a0485a018ebe317e01136e4a5"
+ }
+ Frame {
+ msec: 5360
+ hash: "62d4bfa65bfdc50d24d9204f4df7bad8"
+ }
+ Frame {
+ msec: 5376
+ hash: "e189dc0dae9457a6af5082c6ccf451b6"
+ }
+ Frame {
+ msec: 5392
+ hash: "86ed2aa2428feb9c6c14ad2a74e97978"
+ }
+ Frame {
+ msec: 5408
+ hash: "2f9ed13e8a0d0edf098b05db02c04bdf"
+ }
+ Frame {
+ msec: 5424
+ hash: "23edee3af8f1904558863d37c520555a"
+ }
+ Frame {
+ msec: 5440
+ hash: "7aed794eae2f0c65342f190ed4d4f889"
+ }
+ Frame {
+ msec: 5456
+ hash: "0fa12b48c08266f50e77506e4136dd56"
+ }
+ Frame {
+ msec: 5472
+ hash: "679ee2b26a118ab53a84fa116de09edf"
+ }
+ Frame {
+ msec: 5488
+ hash: "b9dcdd88fba70636cbcae160edcc0136"
+ }
+ Frame {
+ msec: 5504
+ hash: "90af75eeef63ae67e9f6ff1a61d7cca3"
+ }
+ Frame {
+ msec: 5520
+ hash: "29d80ae32451c24b655c4d1fd01d3aa1"
+ }
+ Frame {
+ msec: 5536
+ hash: "c73fe137644cbc006d0b5274b72faa46"
+ }
+ Frame {
+ msec: 5552
+ hash: "8a4d76ae60f5d720a382cced2f6a2b5e"
+ }
+ Frame {
+ msec: 5568
+ hash: "a1efa0d424d568d338c6db9fc095c2fb"
+ }
+ Frame {
+ msec: 5584
+ hash: "205cafcabb29b78a6db3dcaf44a74ab6"
+ }
+ Frame {
+ msec: 5600
+ hash: "7507a3d2158d4cc68454c85922526871"
+ }
+ Frame {
+ msec: 5616
+ hash: "7135a6a7999e82cb81e39228805332ee"
+ }
+ Frame {
+ msec: 5632
+ hash: "ac2b714b5f32d2b911f31690d7082dc1"
+ }
+ Frame {
+ msec: 5648
+ hash: "5cb1ae6d86aafdf11284480c81b939dc"
+ }
+ Frame {
+ msec: 5664
+ hash: "ac705840cc94eb4af7a52d62649d0157"
+ }
+ Frame {
+ msec: 5680
+ hash: "8c2ebcd80e26ac7b9d25be486f54c4ce"
+ }
+ Frame {
+ msec: 5696
+ hash: "12b84aa02dbbab3592d3eb3cb6884b41"
+ }
+ Frame {
+ msec: 5712
+ hash: "675043ddde6ed65a3ec4ed093be1e760"
+ }
+ Frame {
+ msec: 5728
+ hash: "478126aeef5ddae9c0a77d08294cf3f2"
+ }
+ Frame {
+ msec: 5744
+ hash: "0b43af73d91a500ccdf27b4347b9bc47"
+ }
+ Frame {
+ msec: 5760
+ image: "cursorDelegate.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "a6d8708d08bedf0cab5230d6f2936936"
+ }
+ Frame {
+ msec: 5792
+ hash: "02e0646024aeef6f01b7541b15267baa"
+ }
+ Frame {
+ msec: 5808
+ hash: "da6717c94b46ad7a647c445c06314b0d"
+ }
+ Frame {
+ msec: 5824
+ hash: "2ed12d49d72884160ebbf6b6d0e15a9d"
+ }
+ Frame {
+ msec: 5840
+ hash: "a1fbc3333b7f742a8336a6fcbad156c9"
+ }
+ Frame {
+ msec: 5856
+ hash: "25cac33299d58cdd7775e8b75410085e"
+ }
+ Frame {
+ msec: 5872
+ hash: "5d81833eb342f632945c0571e18cb1f9"
+ }
+ Frame {
+ msec: 5888
+ hash: "23f6f2a7d971494af43a0fb97dbf8fb5"
+ }
+ Frame {
+ msec: 5904
+ hash: "216b70d02a4685dc07258454bb4e7c85"
+ }
+ Frame {
+ msec: 5920
+ hash: "1e06742af58d6e63facdc599c46e11b1"
+ }
+ Frame {
+ msec: 5936
+ hash: "00f8ac72d3794ed8d66db987402ecde0"
+ }
+ Frame {
+ msec: 5952
+ hash: "42ab5f162acba94f563823f5be1e37d2"
+ }
+ Frame {
+ msec: 5968
+ hash: "3272b97fdc54eb9f3590e7bbe4ac457d"
+ }
+ Frame {
+ msec: 5984
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 6000
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 6016
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 6032
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 6048
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 6064
+ hash: "3272b97fdc54eb9f3590e7bbe4ac457d"
+ }
+ Frame {
+ msec: 6080
+ hash: "42ab5f162acba94f563823f5be1e37d2"
+ }
+ Frame {
+ msec: 6096
+ hash: "00f8ac72d3794ed8d66db987402ecde0"
+ }
+ Frame {
+ msec: 6112
+ hash: "1e06742af58d6e63facdc599c46e11b1"
+ }
+ Frame {
+ msec: 6128
+ hash: "216b70d02a4685dc07258454bb4e7c85"
+ }
+ Frame {
+ msec: 6144
+ hash: "23f6f2a7d971494af43a0fb97dbf8fb5"
+ }
+ Frame {
+ msec: 6160
+ hash: "5d81833eb342f632945c0571e18cb1f9"
+ }
+ Frame {
+ msec: 6176
+ hash: "25cac33299d58cdd7775e8b75410085e"
+ }
+ Frame {
+ msec: 6192
+ hash: "a1fbc3333b7f742a8336a6fcbad156c9"
+ }
+ Frame {
+ msec: 6208
+ hash: "2ed12d49d72884160ebbf6b6d0e15a9d"
+ }
+ Frame {
+ msec: 6224
+ hash: "da6717c94b46ad7a647c445c06314b0d"
+ }
+ Frame {
+ msec: 6240
+ hash: "02e0646024aeef6f01b7541b15267baa"
+ }
+ Frame {
+ msec: 6256
+ hash: "a6d8708d08bedf0cab5230d6f2936936"
+ }
+ Frame {
+ msec: 6272
+ hash: "68d459091a85f24ece39a207e395039b"
+ }
+ Frame {
+ msec: 6288
+ hash: "0b43af73d91a500ccdf27b4347b9bc47"
+ }
+ Frame {
+ msec: 6304
+ hash: "478126aeef5ddae9c0a77d08294cf3f2"
+ }
+ Frame {
+ msec: 6320
+ hash: "675043ddde6ed65a3ec4ed093be1e760"
+ }
+ Frame {
+ msec: 6336
+ hash: "12b84aa02dbbab3592d3eb3cb6884b41"
+ }
+ Frame {
+ msec: 6352
+ hash: "8c2ebcd80e26ac7b9d25be486f54c4ce"
+ }
+ Frame {
+ msec: 6368
+ hash: "ac705840cc94eb4af7a52d62649d0157"
+ }
+ Frame {
+ msec: 6384
+ hash: "5cb1ae6d86aafdf11284480c81b939dc"
+ }
+ Frame {
+ msec: 6400
+ hash: "ac2b714b5f32d2b911f31690d7082dc1"
+ }
+ Frame {
+ msec: 6416
+ hash: "7135a6a7999e82cb81e39228805332ee"
+ }
+ Frame {
+ msec: 6432
+ hash: "7507a3d2158d4cc68454c85922526871"
+ }
+ Frame {
+ msec: 6448
+ hash: "205cafcabb29b78a6db3dcaf44a74ab6"
+ }
+ Frame {
+ msec: 6464
+ hash: "a1efa0d424d568d338c6db9fc095c2fb"
+ }
+ Frame {
+ msec: 6480
+ hash: "8a4d76ae60f5d720a382cced2f6a2b5e"
+ }
+ Frame {
+ msec: 6496
+ hash: "c73fe137644cbc006d0b5274b72faa46"
+ }
+ Frame {
+ msec: 6512
+ hash: "29d80ae32451c24b655c4d1fd01d3aa1"
+ }
+ Frame {
+ msec: 6528
+ hash: "90af75eeef63ae67e9f6ff1a61d7cca3"
+ }
+ Frame {
+ msec: 6544
+ hash: "b9dcdd88fba70636cbcae160edcc0136"
+ }
+ Frame {
+ msec: 6560
+ hash: "679ee2b26a118ab53a84fa116de09edf"
+ }
+ Frame {
+ msec: 6576
+ hash: "0fa12b48c08266f50e77506e4136dd56"
+ }
+ Frame {
+ msec: 6592
+ hash: "7aed794eae2f0c65342f190ed4d4f889"
+ }
+ Frame {
+ msec: 6608
+ hash: "23edee3af8f1904558863d37c520555a"
+ }
+ Frame {
+ msec: 6624
+ hash: "2f9ed13e8a0d0edf098b05db02c04bdf"
+ }
+ Frame {
+ msec: 6640
+ hash: "86ed2aa2428feb9c6c14ad2a74e97978"
+ }
+ Frame {
+ msec: 6656
+ hash: "e189dc0dae9457a6af5082c6ccf451b6"
+ }
+ Frame {
+ msec: 6672
+ hash: "62d4bfa65bfdc50d24d9204f4df7bad8"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 271; y: 89
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6688
+ hash: "680f51f63c4b11a247a668eb7bbd2b62"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 271; y: 92
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6704
+ hash: "7640c78a286b0b7bdf2ec9117ceced4a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 271; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 270; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6720
+ image: "cursorDelegate.6.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 269; y: 103
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6736
+ hash: "bfc1b03df244839a012e8302dc07764f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 268; y: 107
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6752
+ hash: "de09380dd57c58ae99fbdba169a19975"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 266; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6768
+ hash: "54f7f94b5cdf1becb2ee61d7f6f02c0e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 266; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6784
+ hash: "4220dde85eb1c027366efd0798927e8d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 265; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6800
+ hash: "512b9746ae4482557b8cef9f99905954"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 263; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 261; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6816
+ hash: "e7346d8f223684143a0940def878b874"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 259; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6832
+ hash: "7e7382302681cd29a2c6959a3a704660"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 256; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6848
+ hash: "ef8f7dfdd4e70100ecaecca4055d8f52"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 250; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 243; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6864
+ hash: "f5cacabb78b88c31af1a1b1e6f60069b"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 235; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6880
+ hash: "b016ef2306b0a721df86b6916e7953e4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 227; y: 121
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6896
+ hash: "a78e9b0b93569b77b0659c771336971a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 218; y: 124
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 126
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6912
+ hash: "b957ab07bcbaeffca963d9148130a965"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 200; y: 126
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6928
+ hash: "140bc4b078bac52d6903bdfdfc35a94c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 190; y: 127
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6944
+ hash: "047c3a7403ae88cceb7fc875793d1ed8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 181; y: 127
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 172; y: 127
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6960
+ hash: "03d48446aaf94450a3a9a8f1e956493f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 163; y: 127
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6976
+ hash: "6672e47aa6a975fbd82d2fe5bc99bbaf"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 154; y: 126
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6992
+ hash: "3bc73489d06e446d4c96117756a59227"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 146; y: 124
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 138; y: 121
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7008
+ hash: "aed995a61df4a1c189ef2962000d02de"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 130; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7024
+ hash: "aed995a61df4a1c189ef2962000d02de"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 123; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7040
+ hash: "74f0bbe92a23146fbdbd365edd5741c8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 118; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 114; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7056
+ hash: "74f0bbe92a23146fbdbd365edd5741c8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 110; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7072
+ hash: "6456208c6367687b8dc701791eccd7d4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 108; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7088
+ hash: "376b59dc6e00a51bc9f2d4cfa2718e57"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 107; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 106; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7104
+ hash: "fb7bc3401f70ce6eee131c9c7510e1fe"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 105; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7120
+ hash: "675a419f0cd8351d6b2a65daf7d2707a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 104; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7136
+ hash: "2f7951abac64e0f10d3b66d04966b6e9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 103; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 102; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7152
+ hash: "1f8daa78c58ae11ec105bd87681c1762"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 101; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7168
+ hash: "23ab196ed43219c26d94431698f6ac8d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 100; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7184
+ hash: "9581e2695f4818e063ec032cb5bb6b7f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 100; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 100; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7200
+ hash: "6752cd7c5383e0ccc9b08f79db6ac310"
+ }
+ Frame {
+ msec: 7216
+ hash: "51f5675e0fb1410c5a8ec03a86b42681"
+ }
+ Frame {
+ msec: 7232
+ hash: "c3c23213b2649b5ccabd8e420a251e00"
+ }
+ Frame {
+ msec: 7248
+ hash: "02ceab31171fe983a10e862b53aea16f"
+ }
+ Frame {
+ msec: 7264
+ hash: "8a774dda9a1bc16bd270724e570daf20"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 100; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7280
+ hash: "2b6b892cebfcce14a9db485fecf16703"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 101; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7296
+ hash: "8b8e6d3362f018cbd9b487f03cfb7a22"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 101; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7312
+ hash: "a8477a9429633384073618cc60841e6c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 102; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 102; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7328
+ hash: "59558c6665b73f02809259e039b4423a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 103; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7344
+ hash: "93540071bab8a970a929d209f628970e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 104; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 105; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7360
+ hash: "78cdb0a05583150ea33040d32d95de47"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 107; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7376
+ hash: "4b1ee34985d3f5b8dd4355678ad39af4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 110; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7392
+ hash: "5484e7699c388eabf0311de49706397f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 113; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 117; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7408
+ hash: "dee6c2380f398323002ebb43a38d27e8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 124; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7424
+ hash: "d66a27728e7fd3c616842613a034c5a0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 131; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7440
+ hash: "5f851161f99fcf5b67cbe008a3faf411"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 138; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 144; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7456
+ hash: "013e949285cfa9edb34ab14e26753230"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 148; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 152; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7472
+ hash: "5b50acdcbd49969bcce2cfab6f9af380"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 155; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7488
+ hash: "d4aeb24211007cfc01512d289ae7aa01"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 157; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7504
+ hash: "6f1b7e12bbf54586e9a48989145f3274"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 159; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 162; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7520
+ hash: "0e09c7468bc03770c6cc7f0fba1ee9c0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 163; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7536
+ hash: "0fc4522bbf1a2e72002eb0a3c7224e1f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 165; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7552
+ hash: "91727292aaa314bf263c618a577b7f74"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 166; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 168; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7568
+ hash: "a78fb2545d11c521a50a10fd2d1700a7"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 171; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7584
+ hash: "c207a291b47628921125acd4b8ed5ea8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 174; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7600
+ hash: "9a8e3df504ba36e82c51d71a3f5ce268"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 177; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 183; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7616
+ hash: "8cd9da94db91da50ae457d41866a32ba"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 188; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7632
+ hash: "9e52b6fdc3ce4ad9c5986e47ffa762fc"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 193; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7648
+ hash: "a1aff55bffb76bd4e2ac9ee482a03978"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 198; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 206; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7664
+ hash: "ba52431b72683cfbf0cc795a2407630e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 209; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7680
+ image: "cursorDelegate.7.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 211; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7696
+ hash: "eb5a19fbfbdceef233ed3c86c782817c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 212; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 212; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7712
+ hash: "7c8f3f2e96fa6a63867cb716061c8c77"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 213; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7728
+ hash: "96b0007f857aa19b41d184a7c7931f69"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 214; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7744
+ hash: "96201712b9ffbd9bfbebb5a5b7e23aba"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 215; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7760
+ hash: "d75e13a7715d5c329a47fdb818dfdbe5"
+ }
+ Frame {
+ msec: 7776
+ hash: "c8fa0c2d9e6aa1f3a33e76a31534359d"
+ }
+ Frame {
+ msec: 7792
+ hash: "03b11cc517f84c58a681906fdda98347"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 215; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 215; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7808
+ hash: "74cdf8af5d56216ad422951a56661536"
+ }
+ Frame {
+ msec: 7824
+ hash: "fcac2575aad872eada547508f312f09c"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 216; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7840
+ hash: "7d76aec1f29d2d6745585be8ef113be5"
+ }
+ Frame {
+ msec: 7856
+ hash: "2b4fe4f39433671a9bc440efa1c589a8"
+ }
+ Frame {
+ msec: 7872
+ hash: "55a166f920e76173e14121d848a11aa0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 216; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7888
+ hash: "f764df8ecd68161d3529800e922254f4"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 216; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7904
+ hash: "749caf21947e915b163f72e6fd190032"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 216; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7920
+ hash: "c350910df8ae4fea573a20d334fd3401"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 217; y: 116
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7936
+ hash: "d177da450f1d380a6d2406e2393b9582"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 218; y: 115
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 218; y: 115
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7952
+ hash: "bf3da78d7cac19daf2d5150b77840b1e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 219; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7968
+ hash: "22e337b0b81b18045a205355da6981ad"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 220; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7984
+ hash: "66c66927d2fc590fc43c146a403c1ccb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 221; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 222; y: 113
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8000
+ hash: "66c66927d2fc590fc43c146a403c1ccb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 222; y: 113
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8016
+ hash: "66c66927d2fc590fc43c146a403c1ccb"
+ }
+ Frame {
+ msec: 8032
+ hash: "66c66927d2fc590fc43c146a403c1ccb"
+ }
+ Frame {
+ msec: 8048
+ hash: "66c66927d2fc590fc43c146a403c1ccb"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 222; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8064
+ hash: "22e337b0b81b18045a205355da6981ad"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 222; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8080
+ hash: "bf3da78d7cac19daf2d5150b77840b1e"
+ }
+ Frame {
+ msec: 8096
+ hash: "d177da450f1d380a6d2406e2393b9582"
+ }
+ Frame {
+ msec: 8112
+ hash: "c350910df8ae4fea573a20d334fd3401"
+ }
+ Frame {
+ msec: 8128
+ hash: "749caf21947e915b163f72e6fd190032"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 222; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8144
+ hash: "f764df8ecd68161d3529800e922254f4"
+ }
+ Frame {
+ msec: 8160
+ hash: "55a166f920e76173e14121d848a11aa0"
+ }
+ Frame {
+ msec: 8176
+ hash: "2b4fe4f39433671a9bc440efa1c589a8"
+ }
+ Frame {
+ msec: 8192
+ hash: "7d76aec1f29d2d6745585be8ef113be5"
+ }
+ Frame {
+ msec: 8208
+ hash: "fcac2575aad872eada547508f312f09c"
+ }
+ Frame {
+ msec: 8224
+ hash: "74cdf8af5d56216ad422951a56661536"
+ }
+ Frame {
+ msec: 8240
+ hash: "03b11cc517f84c58a681906fdda98347"
+ }
+ Frame {
+ msec: 8256
+ hash: "c8fa0c2d9e6aa1f3a33e76a31534359d"
+ }
+ Frame {
+ msec: 8272
+ hash: "d75e13a7715d5c329a47fdb818dfdbe5"
+ }
+ Frame {
+ msec: 8288
+ hash: "96201712b9ffbd9bfbebb5a5b7e23aba"
+ }
+ Frame {
+ msec: 8304
+ hash: "96b0007f857aa19b41d184a7c7931f69"
+ }
+ Frame {
+ msec: 8320
+ hash: "bff5b731de7c93fa0cdcefbf99beeb5e"
+ }
+ Frame {
+ msec: 8336
+ hash: "ce76704964873be1bc6a324d8a3381be"
+ }
+ Frame {
+ msec: 8352
+ hash: "a31b4f2a3defc968098029328de9352d"
+ }
+ Frame {
+ msec: 8368
+ hash: "295e3f40a511bd30e1c6599ead93619a"
+ }
+ Frame {
+ msec: 8384
+ hash: "3cd74da8b04de8ec7446490dea0e4e6c"
+ }
+ Frame {
+ msec: 8400
+ hash: "78a7db5a316609136d1b873d20d5dd3e"
+ }
+ Frame {
+ msec: 8416
+ hash: "0f176fb11bfe26f872ef7103011df9e6"
+ }
+ Frame {
+ msec: 8432
+ hash: "47866013e79bc77607e0c40bf8457bed"
+ }
+ Frame {
+ msec: 8448
+ hash: "5f35467db5c5e0baf5caff90b97e2d0c"
+ }
+ Frame {
+ msec: 8464
+ hash: "fefa89763cc1ad8323fdf37b1f5f63d3"
+ }
+ Frame {
+ msec: 8480
+ hash: "b9823f88fa51944075ce6dedd695f097"
+ }
+ Frame {
+ msec: 8496
+ hash: "72521de21fcc57d6ccf16350b0df8eee"
+ }
+ Frame {
+ msec: 8512
+ hash: "fcd591a2e56ba5efa95b315b7bd10532"
+ }
+ Frame {
+ msec: 8528
+ hash: "5d437d59995741030e0975829712f85d"
+ }
+ Frame {
+ msec: 8544
+ hash: "e7189d174b181985b6aef10b8642726f"
+ }
+ Frame {
+ msec: 8560
+ hash: "cefadbae14e573f6c83d07ffc3a5152e"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 277; y: 97
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8576
+ hash: "0fa12b48c08266f50e77506e4136dd56"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 277; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8592
+ hash: "7aed794eae2f0c65342f190ed4d4f889"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 276; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8608
+ hash: "23edee3af8f1904558863d37c520555a"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 276; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8624
+ hash: "2f9ed13e8a0d0edf098b05db02c04bdf"
+ }
+ Frame {
+ msec: 8640
+ image: "cursorDelegate.8.png"
+ }
+ Frame {
+ msec: 8656
+ hash: "e189dc0dae9457a6af5082c6ccf451b6"
+ }
+ Frame {
+ msec: 8672
+ hash: "62d4bfa65bfdc50d24d9204f4df7bad8"
+ }
+ Frame {
+ msec: 8688
+ hash: "5a11ec8a0485a018ebe317e01136e4a5"
+ }
+ Frame {
+ msec: 8704
+ hash: "9aa569f7b251371bdd1cb05c8d3aab28"
+ }
+ Frame {
+ msec: 8720
+ hash: "a242c9d5ed7f9aef0a0622dcb66d0a7e"
+ }
+ Frame {
+ msec: 8736
+ hash: "a0cb3f796fddf7100ca19aee3dedbea8"
+ }
+ Frame {
+ msec: 8752
+ hash: "b4e273b6415e3951eab2f831100b0bb2"
+ }
+ Frame {
+ msec: 8768
+ hash: "fd3fd655785c4e3c470f742451e3470f"
+ }
+ Frame {
+ msec: 8784
+ hash: "7a9b2057760e48d5f9cfdc79b08866d8"
+ }
+ Frame {
+ msec: 8800
+ hash: "2a55b52db02d97963d382c9862307384"
+ }
+ Frame {
+ msec: 8816
+ hash: "c6c90915393fc7cb0aaa464caefbadb0"
+ }
+ Frame {
+ msec: 8832
+ hash: "36b65658073ac2687dbd88ec7a408a98"
+ }
+ Frame {
+ msec: 8848
+ hash: "84e165f9f2c55c5c51a260b11ca195c2"
+ }
+ Frame {
+ msec: 8864
+ hash: "c11cfcfda6f161d058a3d9e93349b578"
+ }
+ Frame {
+ msec: 8880
+ hash: "0568f8c0e1fa51b7547790a7f4978ea3"
+ }
+ Frame {
+ msec: 8896
+ hash: "b66fd97ac36ac395df74e9a0dd58d0c7"
+ }
+ Frame {
+ msec: 8912
+ hash: "31b5b3d68e452ffd90e9804ff9e9a264"
+ }
+ Frame {
+ msec: 8928
+ hash: "3cc8791e419986e1e913d4e153243fb2"
+ }
+ Frame {
+ msec: 8944
+ hash: "ff1b3ce85bc9f3dd3feb90fa31c3bc0a"
+ }
+ Frame {
+ msec: 8960
+ hash: "d3ae969e538c642d82662d08ef05964e"
+ }
+ Frame {
+ msec: 8976
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 8992
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 9008
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 9024
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 9040
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 9056
+ hash: "e3948b393a3778066a90197b31c71e51"
+ }
+ Frame {
+ msec: 9072
+ hash: "d3ae969e538c642d82662d08ef05964e"
+ }
+ Frame {
+ msec: 9088
+ hash: "ff1b3ce85bc9f3dd3feb90fa31c3bc0a"
+ }
+ Frame {
+ msec: 9104
+ hash: "3cc8791e419986e1e913d4e153243fb2"
+ }
+ Frame {
+ msec: 9120
+ hash: "31b5b3d68e452ffd90e9804ff9e9a264"
+ }
+ Frame {
+ msec: 9136
+ hash: "b66fd97ac36ac395df74e9a0dd58d0c7"
+ }
+ Frame {
+ msec: 9152
+ hash: "0568f8c0e1fa51b7547790a7f4978ea3"
+ }
+ Frame {
+ msec: 9168
+ hash: "c11cfcfda6f161d058a3d9e93349b578"
+ }
+ Frame {
+ msec: 9184
+ hash: "84e165f9f2c55c5c51a260b11ca195c2"
+ }
+ Frame {
+ msec: 9200
+ hash: "36b65658073ac2687dbd88ec7a408a98"
+ }
+ Frame {
+ msec: 9216
+ hash: "c6c90915393fc7cb0aaa464caefbadb0"
+ }
+ Frame {
+ msec: 9232
+ hash: "2a55b52db02d97963d382c9862307384"
+ }
+ Frame {
+ msec: 9248
+ hash: "7a9b2057760e48d5f9cfdc79b08866d8"
+ }
+ Frame {
+ msec: 9264
+ hash: "fd3fd655785c4e3c470f742451e3470f"
+ }
+ Frame {
+ msec: 9280
+ hash: "b4e273b6415e3951eab2f831100b0bb2"
+ }
+ Frame {
+ msec: 9296
+ hash: "a0cb3f796fddf7100ca19aee3dedbea8"
+ }
+ Frame {
+ msec: 9312
+ hash: "a242c9d5ed7f9aef0a0622dcb66d0a7e"
+ }
+ Frame {
+ msec: 9328
+ hash: "9aa569f7b251371bdd1cb05c8d3aab28"
+ }
+ Frame {
+ msec: 9344
+ hash: "5a11ec8a0485a018ebe317e01136e4a5"
+ }
+ Frame {
+ msec: 9360
+ hash: "62d4bfa65bfdc50d24d9204f4df7bad8"
+ }
+ Frame {
+ msec: 9376
+ hash: "e189dc0dae9457a6af5082c6ccf451b6"
+ }
+ Frame {
+ msec: 9392
+ hash: "86ed2aa2428feb9c6c14ad2a74e97978"
+ }
+ Frame {
+ msec: 9408
+ hash: "2f9ed13e8a0d0edf098b05db02c04bdf"
+ }
+ Frame {
+ msec: 9424
+ hash: "23edee3af8f1904558863d37c520555a"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.0.png b/tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.0.png
new file mode 100644
index 0000000000..2b45a061da
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.1.png b/tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.1.png
new file mode 100644
index 0000000000..1f5bae01c3
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.2.png b/tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.2.png
new file mode 100644
index 0000000000..cb2b5a4aa3
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.3.png b/tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.3.png
new file mode 100644
index 0000000000..aa24805e0c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.4.png b/tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.4.png
new file mode 100644
index 0000000000..aa24805e0c
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.qml b/tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.qml
new file mode 100644
index 0000000000..873a86d63a
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data/echoMode.qml
@@ -0,0 +1,1043 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 32
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Key {
+ type: 6
+ key: 16777248
+ modifiers: 33554432
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 48
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 64
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 80
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 96
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 112
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 128
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 144
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 160
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 176
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 192
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 208
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 224
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 240
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 256
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 272
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 288
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 304
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 320
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 336
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Frame {
+ msec: 352
+ hash: "b73bd9c2fef8812591fff9f43b73da13"
+ }
+ Key {
+ type: 6
+ key: 74
+ modifiers: 33554432
+ text: "4a"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 368
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 384
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 400
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 416
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 432
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Key {
+ type: 7
+ key: 74
+ modifiers: 33554432
+ text: "4a"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 448
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 464
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 480
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 496
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 512
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 528
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Key {
+ type: 7
+ key: 16777248
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 544
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 560
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 576
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 592
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 608
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 624
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 640
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 656
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 672
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Frame {
+ msec: 688
+ hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125"
+ }
+ Key {
+ type: 6
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 704
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Frame {
+ msec: 720
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Frame {
+ msec: 736
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Frame {
+ msec: 752
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Frame {
+ msec: 768
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Key {
+ type: 7
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 784
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Frame {
+ msec: 800
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Frame {
+ msec: 816
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Frame {
+ msec: 832
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Frame {
+ msec: 848
+ hash: "fbc09d695e0b47aae6e977c13f535bfd"
+ }
+ Key {
+ type: 6
+ key: 67
+ modifiers: 0
+ text: "63"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 864
+ hash: "a4b81c526a5bf8902fde9b8721980977"
+ }
+ Frame {
+ msec: 880
+ hash: "a4b81c526a5bf8902fde9b8721980977"
+ }
+ Frame {
+ msec: 896
+ hash: "a4b81c526a5bf8902fde9b8721980977"
+ }
+ Key {
+ type: 7
+ key: 67
+ modifiers: 0
+ text: "63"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 912
+ hash: "a4b81c526a5bf8902fde9b8721980977"
+ }
+ Frame {
+ msec: 928
+ hash: "a4b81c526a5bf8902fde9b8721980977"
+ }
+ Frame {
+ msec: 944
+ hash: "a4b81c526a5bf8902fde9b8721980977"
+ }
+ Frame {
+ msec: 960
+ image: "echoMode.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "a4b81c526a5bf8902fde9b8721980977"
+ }
+ Key {
+ type: 6
+ key: 75
+ modifiers: 0
+ text: "6b"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 992
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1008
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1024
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1040
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Key {
+ type: 7
+ key: 75
+ modifiers: 0
+ text: "6b"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1056
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1072
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1088
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1104
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1120
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1136
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1152
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1168
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1184
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1200
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1216
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Frame {
+ msec: 1232
+ hash: "d072aebc2314a149a856634786b208a0"
+ }
+ Key {
+ type: 6
+ key: 68
+ modifiers: 0
+ text: "64"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1248
+ hash: "94defec2865529f185d02cfcbfe166cc"
+ }
+ Frame {
+ msec: 1264
+ hash: "94defec2865529f185d02cfcbfe166cc"
+ }
+ Frame {
+ msec: 1280
+ hash: "94defec2865529f185d02cfcbfe166cc"
+ }
+ Key {
+ type: 7
+ key: 68
+ modifiers: 0
+ text: "64"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1296
+ hash: "94defec2865529f185d02cfcbfe166cc"
+ }
+ Frame {
+ msec: 1312
+ hash: "94defec2865529f185d02cfcbfe166cc"
+ }
+ Frame {
+ msec: 1328
+ hash: "94defec2865529f185d02cfcbfe166cc"
+ }
+ Key {
+ type: 6
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1344
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Frame {
+ msec: 1360
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Frame {
+ msec: 1376
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Frame {
+ msec: 1392
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Frame {
+ msec: 1408
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Frame {
+ msec: 1424
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Frame {
+ msec: 1440
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Frame {
+ msec: 1456
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Frame {
+ msec: 1472
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Key {
+ type: 7
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1488
+ hash: "f625a2a82879df96141000e6931d4487"
+ }
+ Key {
+ type: 6
+ key: 87
+ modifiers: 0
+ text: "77"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1504
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Frame {
+ msec: 1520
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Frame {
+ msec: 1536
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Frame {
+ msec: 1552
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Key {
+ type: 7
+ key: 87
+ modifiers: 0
+ text: "77"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1568
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Frame {
+ msec: 1584
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Frame {
+ msec: 1600
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Frame {
+ msec: 1616
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Frame {
+ msec: 1632
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Frame {
+ msec: 1648
+ hash: "1cf29837a4ea63bbb06c15382680d1b6"
+ }
+ Key {
+ type: 6
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1664
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Frame {
+ msec: 1680
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Frame {
+ msec: 1696
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Frame {
+ msec: 1712
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Frame {
+ msec: 1728
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1744
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Key {
+ type: 7
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1760
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Frame {
+ msec: 1776
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Frame {
+ msec: 1792
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1808
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Frame {
+ msec: 1824
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Frame {
+ msec: 1840
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Frame {
+ msec: 1856
+ hash: "6eabb6d168ecc9ac604dcf2db0075380"
+ }
+ Key {
+ type: 6
+ key: 76
+ modifiers: 0
+ text: "6c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1872
+ hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ }
+ Frame {
+ msec: 1888
+ hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ }
+ Frame {
+ msec: 1904
+ hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ }
+ Frame {
+ msec: 1920
+ image: "echoMode.1.png"
+ }
+ Key {
+ type: 7
+ key: 76
+ modifiers: 0
+ text: "6c"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1936
+ hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ }
+ Frame {
+ msec: 1952
+ hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ }
+ Frame {
+ msec: 1968
+ hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ }
+ Frame {
+ msec: 1984
+ hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ }
+ Frame {
+ msec: 2000
+ hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ }
+ Frame {
+ msec: 2016
+ hash: "cb2dc1c4fc4e213841b873561f404a4f"
+ }
+ Key {
+ type: 6
+ key: 79
+ modifiers: 0
+ text: "6f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2032
+ hash: "c2aff1ebdee69cca7dc67a102fce5e8e"
+ }
+ Frame {
+ msec: 2048
+ hash: "c2aff1ebdee69cca7dc67a102fce5e8e"
+ }
+ Key {
+ type: 7
+ key: 79
+ modifiers: 0
+ text: "6f"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2064
+ hash: "c2aff1ebdee69cca7dc67a102fce5e8e"
+ }
+ Frame {
+ msec: 2080
+ hash: "c2aff1ebdee69cca7dc67a102fce5e8e"
+ }
+ Key {
+ type: 6
+ key: 86
+ modifiers: 0
+ text: "76"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2096
+ hash: "c82441813af6ff577687f29f6a09da38"
+ }
+ Frame {
+ msec: 2112
+ hash: "c82441813af6ff577687f29f6a09da38"
+ }
+ Frame {
+ msec: 2128
+ hash: "c82441813af6ff577687f29f6a09da38"
+ }
+ Frame {
+ msec: 2144
+ hash: "c82441813af6ff577687f29f6a09da38"
+ }
+ Key {
+ type: 6
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Key {
+ type: 7
+ key: 86
+ modifiers: 0
+ text: "76"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2160
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Frame {
+ msec: 2176
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Frame {
+ msec: 2192
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Frame {
+ msec: 2208
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Key {
+ type: 6
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2224
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Key {
+ type: 7
+ key: 69
+ modifiers: 0
+ text: "65"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2240
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Frame {
+ msec: 2256
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Frame {
+ msec: 2272
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Frame {
+ msec: 2288
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Frame {
+ msec: 2304
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Key {
+ type: 7
+ key: 32
+ modifiers: 0
+ text: "20"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2320
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Frame {
+ msec: 2336
+ hash: "d7da9862980b99e97a1fcd1b5c4c976f"
+ }
+ Key {
+ type: 6
+ key: 77
+ modifiers: 0
+ text: "6d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2352
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Frame {
+ msec: 2368
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Frame {
+ msec: 2384
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Frame {
+ msec: 2400
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Frame {
+ msec: 2416
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Frame {
+ msec: 2432
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Key {
+ type: 7
+ key: 77
+ modifiers: 0
+ text: "6d"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2448
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Frame {
+ msec: 2464
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Frame {
+ msec: 2480
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Frame {
+ msec: 2496
+ hash: "8f36e26d8685fe55e7a1dd294188f649"
+ }
+ Key {
+ type: 6
+ key: 89
+ modifiers: 0
+ text: "79"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2512
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2528
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2544
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Key {
+ type: 7
+ key: 89
+ modifiers: 0
+ text: "79"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2560
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2576
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2592
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2608
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2624
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2640
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2656
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2672
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2688
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2704
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2720
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2736
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2752
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2768
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2784
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2800
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2816
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2832
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2848
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2864
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2880
+ image: "echoMode.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2912
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2928
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2944
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2960
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2976
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 2992
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 3008
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 3024
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 3040
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+ Frame {
+ msec: 3056
+ hash: "316f2ba46d059755576e6822dc77afb2"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data/hAlign.0.png b/tests/auto/declarative/visual/qdeclarativetextinput/data/hAlign.0.png
new file mode 100644
index 0000000000..87c2e07ec3
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data/hAlign.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/data/hAlign.qml b/tests/auto/declarative/visual/qdeclarativetextinput/data/hAlign.qml
new file mode 100644
index 0000000000..e29ac569cf
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/data/hAlign.qml
@@ -0,0 +1,107 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 32
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 48
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 64
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 80
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 96
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 112
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 128
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 144
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 160
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 176
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 192
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 208
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 224
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 240
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 256
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 272
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 288
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 304
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 320
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 336
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 352
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 368
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 384
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+ Frame {
+ msec: 400
+ hash: "7619ed68aca3544f373777e11a4bfefa"
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/echoMode.qml b/tests/auto/declarative/visual/qdeclarativetextinput/echoMode.qml
new file mode 100644
index 0000000000..b0b50e4420
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/echoMode.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+Item{
+ height: 50; width: 200
+ Column{
+ //Not an exhaustive echo mode test, that's in QLineEdit (since the functionality is in QLineControl)
+ TextInput{ id: main; focus: true; echoMode: TextInput.Password }
+ Text{ text: main.text }
+ }
+}
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/hAlign.qml b/tests/auto/declarative/visual/qdeclarativetextinput/hAlign.qml
new file mode 100644
index 0000000000..2d65adfe53
--- /dev/null
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/hAlign.qml
@@ -0,0 +1,39 @@
+import Qt 4.6
+
+Item{
+ width:600;
+ height:300;
+ Column{
+ TextInput{
+ text: "Jackdaws love my big sphinx of quartz";
+ horizontalAlignment: TextInput.AlignLeft;
+ }
+ TextInput{
+ text: "Jackdaws love my big sphinx of quartz";
+ horizontalAlignment: TextInput.AlignHCenter;
+ }
+ TextInput{
+ text: "Jackdaws love my big sphinx of quartz";
+ horizontalAlignment: TextInput.AlignRight;
+ }
+ Rectangle{ width: 600; height: 10; color: "pink" }
+ TextInput{
+ height: 30;
+ width: 600;
+ text: "Jackdaws love my big sphinx of quartz";
+ horizontalAlignment: TextInput.AlignLeft;
+ }
+ TextInput{
+ height: 30;
+ width: 600;
+ text: "Jackdaws love my big sphinx of quartz";
+ horizontalAlignment: TextInput.AlignHCenter;
+ }
+ TextInput{
+ height: 30;
+ width: 600;
+ text: "Jackdaws love my big sphinx of quartz";
+ horizontalAlignment: TextInput.AlignRight;
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/qfxwebview/autosize/autosize.qml b/tests/auto/declarative/visual/qfxwebview/autosize/autosize.qml
new file mode 100644
index 0000000000..3c00ee6a3e
--- /dev/null
+++ b/tests/auto/declarative/visual/qfxwebview/autosize/autosize.qml
@@ -0,0 +1,61 @@
+import Qt 4.6
+import org.webkit 1.0
+
+// The WebView size is determined by the width, height,
+// preferredWidth, and preferredHeight properties.
+Rectangle {
+ id: rect
+ color: "white"
+ width: 200
+ height: layout.height
+ Column {
+ id: layout
+ spacing: 2
+ WebView {
+ html: "No width defined."
+ Rectangle { color: "#10000000"
+ anchors.fill: parent
+ }
+ }
+ WebView {
+ width: rect.width
+ html: "The width is full."
+ Rectangle {
+ color: "#10000000"
+ anchors.fill: parent
+ }
+ }
+ WebView {
+ width: rect.width/2
+ html: "The width is half."
+ Rectangle {
+ color: "#10000000"
+ anchors.fill: parent
+ }
+ }
+ WebView {
+ preferredWidth: rect.width/2
+ html: "The preferredWidth is half."
+ Rectangle {
+ color: "#10000000"
+ anchors.fill: parent
+ }
+ }
+ WebView {
+ preferredWidth: rect.width/2
+ html: "The_preferredWidth_is_half."
+ Rectangle {
+ color: "#10000000"
+ anchors.fill: parent
+ }
+ }
+ WebView {
+ width: rect.width/2
+ html: "The_width_is_half."
+ Rectangle {
+ color: "#10000000"
+ anchors.fill: parent
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/qfxwebview/autosize/data-X11/autosize.0.png b/tests/auto/declarative/visual/qfxwebview/autosize/data-X11/autosize.0.png
new file mode 100644
index 0000000000..1f28b9a410
--- /dev/null
+++ b/tests/auto/declarative/visual/qfxwebview/autosize/data-X11/autosize.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qfxwebview/autosize/data-X11/autosize.qml b/tests/auto/declarative/visual/qfxwebview/autosize/data-X11/autosize.qml
new file mode 100644
index 0000000000..d920a4c41a
--- /dev/null
+++ b/tests/auto/declarative/visual/qfxwebview/autosize/data-X11/autosize.qml
@@ -0,0 +1,83 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+ Frame {
+ msec: 32
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+ Frame {
+ msec: 48
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+ Frame {
+ msec: 64
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+ Frame {
+ msec: 80
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+ Frame {
+ msec: 96
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+ Frame {
+ msec: 112
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+ Frame {
+ msec: 128
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+ Frame {
+ msec: 144
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+ Frame {
+ msec: 160
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+ Frame {
+ msec: 176
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+ Frame {
+ msec: 192
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+ Frame {
+ msec: 208
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+ Frame {
+ msec: 224
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+ Frame {
+ msec: 240
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+ Frame {
+ msec: 256
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+ Frame {
+ msec: 272
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+ Frame {
+ msec: 288
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+ Frame {
+ msec: 304
+ hash: "0c70d855adc847fe33d7959ccb98bb8b"
+ }
+}
diff --git a/tests/auto/declarative/visual/qfxwebview/autosize/data/autosize.0.png b/tests/auto/declarative/visual/qfxwebview/autosize/data/autosize.0.png
new file mode 100644
index 0000000000..1f28b9a410
--- /dev/null
+++ b/tests/auto/declarative/visual/qfxwebview/autosize/data/autosize.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/qfxwebview/autosize/data/autosize.qml b/tests/auto/declarative/visual/qfxwebview/autosize/data/autosize.qml
new file mode 100644
index 0000000000..47999be4f0
--- /dev/null
+++ b/tests/auto/declarative/visual/qfxwebview/autosize/data/autosize.qml
@@ -0,0 +1,83 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+ Frame {
+ msec: 32
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+ Frame {
+ msec: 48
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+ Frame {
+ msec: 64
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+ Frame {
+ msec: 80
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+ Frame {
+ msec: 96
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+ Frame {
+ msec: 112
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+ Frame {
+ msec: 128
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+ Frame {
+ msec: 144
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+ Frame {
+ msec: 160
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+ Frame {
+ msec: 176
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+ Frame {
+ msec: 192
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+ Frame {
+ msec: 208
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+ Frame {
+ msec: 224
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+ Frame {
+ msec: 240
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+ Frame {
+ msec: 256
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+ Frame {
+ msec: 272
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+ Frame {
+ msec: 288
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+ Frame {
+ msec: 304
+ hash: "66539e1b1983d95386b0d30d6e969904"
+ }
+}
diff --git a/tests/auto/declarative/visual/rect/GradientRect.qml b/tests/auto/declarative/visual/rect/GradientRect.qml
new file mode 100644
index 0000000000..1d3ec9816d
--- /dev/null
+++ b/tests/auto/declarative/visual/rect/GradientRect.qml
@@ -0,0 +1,25 @@
+import Qt 4.6
+
+Item {
+ id: rect
+ property color color
+ property color border : Qt.rgba(0,0,0,0)
+ property int rotation
+ property int radius
+ property int borderWidth
+ property bool smooth: false
+
+ width: 80; height: 80
+ Item {
+ anchors.centerIn: parent; rotation: rect.rotation;
+ Rectangle {
+ anchors.centerIn: parent; width: 80; height: 80
+ border.color: rect.border; border.width: rect.border != Qt.rgba(0,0,0,0) ? 2 : 0
+ radius: rect.radius; smooth: rect.smooth
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: rect.color }
+ GradientStop { position: 1.0; color: "white" }
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/rect/MyRect.qml b/tests/auto/declarative/visual/rect/MyRect.qml
new file mode 100644
index 0000000000..22e0948b5f
--- /dev/null
+++ b/tests/auto/declarative/visual/rect/MyRect.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+
+Item {
+ id: rect
+ property color color
+ property color border : Qt.rgba(0,0,0,0)
+ property int rotation
+ property int radius
+ property int borderWidth
+ property bool smooth: false
+
+ width: 80; height: 80
+ Item {
+ anchors.centerIn: parent; rotation: rect.rotation;
+ Rectangle {
+ anchors.centerIn: parent; width: 80; height: 80
+ color: rect.color; border.color: rect.border; border.width: rect.border != Qt.rgba(0,0,0,0) ? 2 : 0
+ radius: rect.radius; smooth: rect.smooth
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/rect/data/rect-painting.0.png b/tests/auto/declarative/visual/rect/data/rect-painting.0.png
new file mode 100644
index 0000000000..3b7970d24e
--- /dev/null
+++ b/tests/auto/declarative/visual/rect/data/rect-painting.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/rect/data/rect-painting.qml b/tests/auto/declarative/visual/rect/data/rect-painting.qml
new file mode 100644
index 0000000000..52acadf039
--- /dev/null
+++ b/tests/auto/declarative/visual/rect/data/rect-painting.qml
@@ -0,0 +1,287 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 32
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 48
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 64
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 80
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 96
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 112
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 128
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 144
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 160
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 176
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 192
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 208
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 224
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 240
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 256
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 272
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 288
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 304
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 320
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 336
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 352
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 368
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 384
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 400
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 416
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 432
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 448
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 464
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 480
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 496
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 512
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 528
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 544
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 560
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 576
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 592
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 608
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 624
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 640
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 656
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 672
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 688
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 704
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 720
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 736
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 752
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 768
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 784
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 800
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 816
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 832
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 848
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 864
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 880
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 896
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 912
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 928
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 944
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 960
+ image: "rect-painting.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 992
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 1008
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 1024
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 1040
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 1056
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 1072
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 1088
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+}
diff --git a/tests/auto/declarative/visual/rect/rect-painting.qml b/tests/auto/declarative/visual/rect/rect-painting.qml
new file mode 100644
index 0000000000..93beeec659
--- /dev/null
+++ b/tests/auto/declarative/visual/rect/rect-painting.qml
@@ -0,0 +1,55 @@
+import Qt 4.6
+
+Rectangle {
+ width: 900; height: 500
+ color: "white"
+
+ Rectangle {
+ anchors.top: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ color: "#eeeeee"
+ }
+
+ Grid {
+ anchors.centerIn: parent
+ columns: 8; rows:4; spacing: 30
+
+ MyRect { color: "lightsteelblue" }
+ MyRect { color: "lightsteelblue"; border: "gray" }
+ MyRect { color: "lightsteelblue"; radius: 10 }
+ MyRect { color: "lightsteelblue"; radius: 10; border: "gray" }
+ GradientRect { color: "lightsteelblue" }
+ GradientRect { color: "lightsteelblue"; border: "gray" }
+ GradientRect { color: "lightsteelblue"; radius: 10 }
+ GradientRect { color: "lightsteelblue"; radius: 10; border: "gray" }
+
+ MyRect { color: "thistle"; rotation: 10 }
+ MyRect { color: "thistle"; border: "gray"; rotation: 10 }
+ MyRect { color: "thistle"; radius: 10; rotation: 10 }
+ MyRect { color: "thistle"; radius: 10; border: "gray"; rotation: 10 }
+ GradientRect { color: "thistle"; rotation: 10 }
+ GradientRect { color: "thistle"; border: "gray"; rotation: 10 }
+ GradientRect { color: "thistle"; radius: 10; rotation: 10 }
+ GradientRect { color: "thistle"; radius: 10; border: "gray"; rotation: 10 }
+
+ MyRect { color: "lightsteelblue"; smooth: true }
+ MyRect { color: "lightsteelblue"; border: "gray"; smooth: true }
+ MyRect { color: "lightsteelblue"; radius: 10; smooth: true }
+ MyRect { color: "lightsteelblue"; radius: 10; border: "gray"; smooth: true }
+ GradientRect { color: "lightsteelblue"; smooth: true }
+ GradientRect { color: "lightsteelblue"; border: "gray"; smooth: true }
+ GradientRect { color: "lightsteelblue"; radius: 10; smooth: true }
+ GradientRect { color: "lightsteelblue"; radius: 10; border: "gray"; smooth: true }
+
+ MyRect { color: "thistle"; rotation: 10; smooth: true }
+ MyRect { color: "thistle"; border: "gray"; rotation: 10; smooth: true }
+ MyRect { color: "thistle"; radius: 10; rotation: 10; smooth: true }
+ MyRect { color: "thistle"; radius: 10; border: "gray"; rotation: 10; smooth: true }
+ GradientRect { color: "thistle"; rotation: 10; smooth: true }
+ GradientRect { color: "thistle"; border: "gray"; rotation: 10; smooth: true }
+ GradientRect { color: "thistle"; radius: 10; rotation: 10; smooth: true }
+ GradientRect { color: "thistle"; radius: 10; border: "gray"; rotation: 10; smooth: true }
+ }
+}
diff --git a/tests/auto/declarative/visual/repeater/basic1.qml b/tests/auto/declarative/visual/repeater/basic1.qml
new file mode 100644
index 0000000000..acb669cc47
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/basic1.qml
@@ -0,0 +1,27 @@
+import Qt 4.6
+
+Rectangle {
+ color: "blue"
+ width: 300
+ height: 200
+ Row {
+ Repeater {
+ delegate: Rectangle {
+ color: "red"
+ width: 100
+ height: 100
+ Text {
+ text: name
+ }
+ }
+ model: ListModel {
+ ListElement {
+ name: "January"
+ }
+ ListElement {
+ name: "February"
+ }
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/repeater/basic2.qml b/tests/auto/declarative/visual/repeater/basic2.qml
new file mode 100644
index 0000000000..3323da5bb5
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/basic2.qml
@@ -0,0 +1,31 @@
+import Qt 4.6
+
+Rectangle {
+ color: "blue"
+ width: 300
+ height: 200
+ Component {
+ id: delegate
+ Rectangle {
+ color: "red"
+ width: 100
+ height: 100
+ Text {
+ text: name
+ }
+ }
+ }
+ Row {
+ Repeater {
+ delegate: delegate
+ model: ListModel {
+ ListElement {
+ name: "January"
+ }
+ ListElement {
+ name: "February"
+ }
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/repeater/basic3.qml b/tests/auto/declarative/visual/repeater/basic3.qml
new file mode 100644
index 0000000000..cb57d49973
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/basic3.qml
@@ -0,0 +1,29 @@
+import Qt 4.6
+
+Rectangle {
+ color: "blue"
+ width: 300
+ height: 200
+ ListModel {
+ id: dataSource
+ ListElement {
+ name: "January"
+ }
+ ListElement {
+ name: "February"
+ }
+ }
+ Row {
+ Repeater {
+ model: dataSource
+ delegate: Rectangle {
+ color: "red"
+ width: 100
+ height: 100
+ Text {
+ text: name
+ }
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/repeater/basic4.qml b/tests/auto/declarative/visual/repeater/basic4.qml
new file mode 100644
index 0000000000..f31de2c364
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/basic4.qml
@@ -0,0 +1,33 @@
+import Qt 4.6
+
+Rectangle {
+ color: "blue"
+ width: 300
+ height: 200
+ ListModel {
+ id: dataSource
+ ListElement {
+ name: "January"
+ }
+ ListElement {
+ name: "February"
+ }
+ }
+ Component {
+ id: delegate
+ Rectangle {
+ color: "red"
+ width: 100
+ height: 100
+ Text {
+ text: name
+ }
+ }
+ }
+ Row {
+ Repeater {
+ model: dataSource
+ delegate: delegate
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/repeater/data-MAC/basic1.0.png b/tests/auto/declarative/visual/repeater/data-MAC/basic1.0.png
new file mode 100644
index 0000000000..2658b6b6d7
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data-MAC/basic1.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/repeater/data-MAC/basic1.qml b/tests/auto/declarative/visual/repeater/data-MAC/basic1.qml
new file mode 100644
index 0000000000..5bc0d6bd22
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data-MAC/basic1.qml
@@ -0,0 +1,323 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 32
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 48
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 64
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 80
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 96
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 112
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 128
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 144
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 160
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 176
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 192
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 208
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 224
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 240
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 256
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 272
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 288
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 304
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 320
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 336
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 352
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 368
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 384
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 400
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 416
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 432
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 448
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 464
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 480
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 496
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 512
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 528
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 544
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 560
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 576
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 592
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 608
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 624
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 640
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 656
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 672
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 688
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 704
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 720
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 736
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 752
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 768
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 784
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 800
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 816
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 832
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 848
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 864
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 880
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 896
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 912
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 928
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 944
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 960
+ image: "basic1.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 992
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1008
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1024
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1040
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1056
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1072
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1088
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1104
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1120
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1136
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1152
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1168
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1184
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1200
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1216
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1232
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+}
diff --git a/tests/auto/declarative/visual/repeater/data-MAC/basic2.0.png b/tests/auto/declarative/visual/repeater/data-MAC/basic2.0.png
new file mode 100644
index 0000000000..2658b6b6d7
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data-MAC/basic2.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/repeater/data-MAC/basic2.qml b/tests/auto/declarative/visual/repeater/data-MAC/basic2.qml
new file mode 100644
index 0000000000..64cf2ea5f2
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data-MAC/basic2.qml
@@ -0,0 +1,331 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 32
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 48
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 64
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 80
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 96
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 112
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 128
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 144
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 160
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 176
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 192
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 208
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 224
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 240
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 256
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 272
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 288
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 304
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 320
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 336
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 352
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 368
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 384
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 400
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 416
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 432
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 448
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 464
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 480
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 496
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 512
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 528
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 544
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 560
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 576
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 592
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 608
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 624
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 640
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 656
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 672
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 688
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 704
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 720
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 736
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 752
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 768
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 784
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 800
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 816
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 832
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 848
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 864
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 880
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 896
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 912
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 928
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 944
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 960
+ image: "basic2.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 992
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1008
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1024
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1040
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1056
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1072
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1088
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1104
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1120
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1136
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1152
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1168
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1184
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1200
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1216
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1232
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1248
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1264
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+}
diff --git a/tests/auto/declarative/visual/repeater/data-MAC/basic3.0.png b/tests/auto/declarative/visual/repeater/data-MAC/basic3.0.png
new file mode 100644
index 0000000000..2658b6b6d7
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data-MAC/basic3.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/repeater/data-MAC/basic3.qml b/tests/auto/declarative/visual/repeater/data-MAC/basic3.qml
new file mode 100644
index 0000000000..41e174a984
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data-MAC/basic3.qml
@@ -0,0 +1,347 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 32
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 48
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 64
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 80
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 96
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 112
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 128
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 144
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 160
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 176
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 192
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 208
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 224
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 240
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 256
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 272
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 288
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 304
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 320
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 336
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 352
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 368
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 384
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 400
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 416
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 432
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 448
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 464
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 480
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 496
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 512
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 528
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 544
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 560
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 576
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 592
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 608
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 624
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 640
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 656
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 672
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 688
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 704
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 720
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 736
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 752
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 768
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 784
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 800
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 816
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 832
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 848
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 864
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 880
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 896
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 912
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 928
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 944
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 960
+ image: "basic3.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 992
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1008
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1024
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1040
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1056
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1072
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1088
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1104
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1120
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1136
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1152
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1168
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1184
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1200
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1216
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1232
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1248
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1264
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1280
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1296
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1312
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1328
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+}
diff --git a/tests/auto/declarative/visual/repeater/data-MAC/basic4.0.png b/tests/auto/declarative/visual/repeater/data-MAC/basic4.0.png
new file mode 100644
index 0000000000..2658b6b6d7
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data-MAC/basic4.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/repeater/data-MAC/basic4.qml b/tests/auto/declarative/visual/repeater/data-MAC/basic4.qml
new file mode 100644
index 0000000000..fcf2504557
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data-MAC/basic4.qml
@@ -0,0 +1,419 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 32
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 48
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 64
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 80
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 96
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 112
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 128
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 144
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 160
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 176
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 192
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 208
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 224
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 240
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 256
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 272
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 288
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 304
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 320
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 336
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 352
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 368
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 384
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 400
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 416
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 432
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 448
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 464
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 480
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 496
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 512
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 528
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 544
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 560
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 576
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 592
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 608
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 624
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 640
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 656
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 672
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 688
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 704
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 720
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 736
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 752
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 768
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 784
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 800
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 816
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 832
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 848
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 864
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 880
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 896
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 912
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 928
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 944
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 960
+ image: "basic4.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 992
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1008
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1024
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1040
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1056
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1072
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1088
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1104
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1120
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1136
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1152
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1168
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1184
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1200
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1216
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1232
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1248
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1264
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1280
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1296
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1312
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1328
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1344
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1360
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1376
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1392
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1408
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1424
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1440
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1456
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1472
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1488
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1504
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1520
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1536
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1552
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1568
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1584
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1600
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+ Frame {
+ msec: 1616
+ hash: "2ab8ff9a9fb09111ac07d3966aac9d94"
+ }
+}
diff --git a/tests/auto/declarative/visual/repeater/data-X11/basic1.0.png b/tests/auto/declarative/visual/repeater/data-X11/basic1.0.png
new file mode 100644
index 0000000000..18ab54368f
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data-X11/basic1.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/repeater/data-X11/basic1.qml b/tests/auto/declarative/visual/repeater/data-X11/basic1.qml
new file mode 100644
index 0000000000..bf215ca417
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data-X11/basic1.qml
@@ -0,0 +1,323 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 32
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 48
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 64
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 80
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 96
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 112
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 128
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 144
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 160
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 176
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 192
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 208
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 224
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 240
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 256
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 272
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 288
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 304
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 320
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 336
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 352
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 368
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 384
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 400
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 416
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 432
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 448
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 464
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 480
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 496
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 512
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 528
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 544
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 560
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 576
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 592
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 608
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 624
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 640
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 656
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 672
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 688
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 704
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 720
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 736
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 752
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 768
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 784
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 800
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 816
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 832
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 848
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 864
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 880
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 896
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 912
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 928
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 944
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 960
+ image: "basic1.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 992
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1008
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1024
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1040
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1056
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1072
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1088
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1104
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1120
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1136
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1152
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1168
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1184
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1200
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1216
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1232
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+}
diff --git a/tests/auto/declarative/visual/repeater/data-X11/basic2.0.png b/tests/auto/declarative/visual/repeater/data-X11/basic2.0.png
new file mode 100644
index 0000000000..18ab54368f
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data-X11/basic2.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/repeater/data-X11/basic2.qml b/tests/auto/declarative/visual/repeater/data-X11/basic2.qml
new file mode 100644
index 0000000000..cb6b46cc25
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data-X11/basic2.qml
@@ -0,0 +1,331 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 32
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 48
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 64
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 80
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 96
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 112
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 128
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 144
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 160
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 176
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 192
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 208
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 224
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 240
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 256
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 272
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 288
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 304
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 320
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 336
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 352
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 368
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 384
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 400
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 416
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 432
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 448
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 464
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 480
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 496
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 512
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 528
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 544
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 560
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 576
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 592
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 608
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 624
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 640
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 656
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 672
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 688
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 704
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 720
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 736
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 752
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 768
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 784
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 800
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 816
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 832
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 848
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 864
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 880
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 896
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 912
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 928
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 944
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 960
+ image: "basic2.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 992
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1008
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1024
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1040
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1056
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1072
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1088
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1104
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1120
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1136
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1152
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1168
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1184
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1200
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1216
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1232
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1248
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1264
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+}
diff --git a/tests/auto/declarative/visual/repeater/data-X11/basic3.0.png b/tests/auto/declarative/visual/repeater/data-X11/basic3.0.png
new file mode 100644
index 0000000000..18ab54368f
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data-X11/basic3.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/repeater/data-X11/basic3.qml b/tests/auto/declarative/visual/repeater/data-X11/basic3.qml
new file mode 100644
index 0000000000..9545fa9493
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data-X11/basic3.qml
@@ -0,0 +1,347 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 32
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 48
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 64
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 80
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 96
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 112
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 128
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 144
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 160
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 176
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 192
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 208
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 224
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 240
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 256
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 272
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 288
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 304
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 320
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 336
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 352
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 368
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 384
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 400
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 416
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 432
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 448
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 464
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 480
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 496
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 512
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 528
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 544
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 560
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 576
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 592
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 608
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 624
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 640
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 656
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 672
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 688
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 704
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 720
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 736
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 752
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 768
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 784
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 800
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 816
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 832
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 848
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 864
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 880
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 896
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 912
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 928
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 944
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 960
+ image: "basic3.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 992
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1008
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1024
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1040
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1056
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1072
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1088
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1104
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1120
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1136
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1152
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1168
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1184
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1200
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1216
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1232
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1248
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1264
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1280
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1296
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1312
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1328
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+}
diff --git a/tests/auto/declarative/visual/repeater/data-X11/basic4.0.png b/tests/auto/declarative/visual/repeater/data-X11/basic4.0.png
new file mode 100644
index 0000000000..18ab54368f
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data-X11/basic4.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/repeater/data-X11/basic4.qml b/tests/auto/declarative/visual/repeater/data-X11/basic4.qml
new file mode 100644
index 0000000000..48392066ec
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data-X11/basic4.qml
@@ -0,0 +1,419 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 32
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 48
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 64
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 80
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 96
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 112
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 128
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 144
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 160
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 176
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 192
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 208
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 224
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 240
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 256
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 272
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 288
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 304
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 320
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 336
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 352
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 368
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 384
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 400
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 416
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 432
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 448
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 464
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 480
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 496
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 512
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 528
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 544
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 560
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 576
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 592
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 608
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 624
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 640
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 656
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 672
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 688
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 704
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 720
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 736
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 752
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 768
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 784
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 800
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 816
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 832
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 848
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 864
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 880
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 896
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 912
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 928
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 944
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 960
+ image: "basic4.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 992
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1008
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1024
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1040
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1056
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1072
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1088
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1104
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1120
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1136
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1152
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1168
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1184
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1200
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1216
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1232
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1248
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1264
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1280
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1296
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1312
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1328
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1344
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1360
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1376
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1392
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1408
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1424
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1440
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1456
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1472
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1488
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1504
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1520
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1536
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1552
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1568
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1584
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1600
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+ Frame {
+ msec: 1616
+ hash: "71dedc2f057c660fa5089de2dd6313a4"
+ }
+}
diff --git a/tests/auto/declarative/visual/repeater/data/basic1.0.png b/tests/auto/declarative/visual/repeater/data/basic1.0.png
new file mode 100644
index 0000000000..aea0e98748
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data/basic1.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/repeater/data/basic1.qml b/tests/auto/declarative/visual/repeater/data/basic1.qml
new file mode 100644
index 0000000000..9535a2c693
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data/basic1.qml
@@ -0,0 +1,323 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 32
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 48
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 64
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 80
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 96
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 112
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 128
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 144
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 160
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 176
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 192
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 208
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 224
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 240
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 256
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 272
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 288
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 304
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 320
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 336
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 352
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 368
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 384
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 400
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 416
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 432
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 448
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 464
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 480
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 496
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 512
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 528
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 544
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 560
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 576
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 592
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 608
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 624
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 640
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 656
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 672
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 688
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 704
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 720
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 736
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 752
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 768
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 784
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 800
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 816
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 832
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 848
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 864
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 880
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 896
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 912
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 928
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 944
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 960
+ image: "basic1.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 992
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1008
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1024
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1040
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1056
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1072
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1088
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1104
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1120
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1136
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1152
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1168
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1184
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1200
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1216
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1232
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+}
diff --git a/tests/auto/declarative/visual/repeater/data/basic2.0.png b/tests/auto/declarative/visual/repeater/data/basic2.0.png
new file mode 100644
index 0000000000..aea0e98748
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data/basic2.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/repeater/data/basic2.qml b/tests/auto/declarative/visual/repeater/data/basic2.qml
new file mode 100644
index 0000000000..81bc1f7f49
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data/basic2.qml
@@ -0,0 +1,331 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 32
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 48
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 64
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 80
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 96
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 112
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 128
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 144
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 160
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 176
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 192
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 208
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 224
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 240
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 256
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 272
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 288
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 304
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 320
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 336
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 352
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 368
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 384
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 400
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 416
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 432
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 448
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 464
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 480
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 496
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 512
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 528
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 544
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 560
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 576
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 592
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 608
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 624
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 640
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 656
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 672
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 688
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 704
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 720
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 736
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 752
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 768
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 784
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 800
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 816
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 832
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 848
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 864
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 880
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 896
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 912
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 928
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 944
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 960
+ image: "basic2.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 992
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1008
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1024
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1040
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1056
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1072
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1088
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1104
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1120
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1136
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1152
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1168
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1184
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1200
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1216
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1232
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1248
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1264
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+}
diff --git a/tests/auto/declarative/visual/repeater/data/basic3.0.png b/tests/auto/declarative/visual/repeater/data/basic3.0.png
new file mode 100644
index 0000000000..aea0e98748
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data/basic3.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/repeater/data/basic3.qml b/tests/auto/declarative/visual/repeater/data/basic3.qml
new file mode 100644
index 0000000000..417eaabeef
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data/basic3.qml
@@ -0,0 +1,347 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 32
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 48
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 64
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 80
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 96
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 112
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 128
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 144
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 160
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 176
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 192
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 208
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 224
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 240
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 256
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 272
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 288
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 304
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 320
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 336
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 352
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 368
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 384
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 400
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 416
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 432
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 448
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 464
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 480
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 496
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 512
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 528
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 544
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 560
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 576
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 592
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 608
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 624
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 640
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 656
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 672
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 688
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 704
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 720
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 736
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 752
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 768
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 784
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 800
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 816
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 832
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 848
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 864
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 880
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 896
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 912
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 928
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 944
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 960
+ image: "basic3.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 992
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1008
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1024
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1040
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1056
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1072
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1088
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1104
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1120
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1136
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1152
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1168
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1184
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1200
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1216
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1232
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1248
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1264
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1280
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1296
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1312
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1328
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+}
diff --git a/tests/auto/declarative/visual/repeater/data/basic4.0.png b/tests/auto/declarative/visual/repeater/data/basic4.0.png
new file mode 100644
index 0000000000..aea0e98748
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data/basic4.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/repeater/data/basic4.qml b/tests/auto/declarative/visual/repeater/data/basic4.qml
new file mode 100644
index 0000000000..264d825c1f
--- /dev/null
+++ b/tests/auto/declarative/visual/repeater/data/basic4.qml
@@ -0,0 +1,419 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 32
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 48
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 64
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 80
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 96
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 112
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 128
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 144
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 160
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 176
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 192
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 208
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 224
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 240
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 256
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 272
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 288
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 304
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 320
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 336
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 352
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 368
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 384
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 400
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 416
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 432
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 448
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 464
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 480
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 496
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 512
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 528
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 544
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 560
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 576
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 592
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 608
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 624
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 640
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 656
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 672
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 688
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 704
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 720
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 736
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 752
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 768
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 784
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 800
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 816
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 832
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 848
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 864
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 880
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 896
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 912
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 928
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 944
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 960
+ image: "basic4.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 992
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1008
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1024
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1040
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1056
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1072
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1088
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1104
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1120
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1136
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1152
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1168
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1184
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1200
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1216
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1232
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1248
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1264
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1280
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1296
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1312
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1328
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1344
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1360
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1376
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1392
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1408
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1424
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1440
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1456
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1472
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1488
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1504
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1520
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1536
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1552
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1568
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1584
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1600
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+ Frame {
+ msec: 1616
+ hash: "539de20cf149353d2677111ea3de5681"
+ }
+}
diff --git a/tests/auto/declarative/visual/selftest_noimages/data/selftest_noimages.qml b/tests/auto/declarative/visual/selftest_noimages/data/selftest_noimages.qml
new file mode 100644
index 0000000000..3104906ead
--- /dev/null
+++ b/tests/auto/declarative/visual/selftest_noimages/data/selftest_noimages.qml
@@ -0,0 +1,470 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ }
+ Frame {
+ msec: 32
+ }
+ Frame {
+ msec: 48
+ }
+ Frame {
+ msec: 64
+ }
+ Frame {
+ msec: 80
+ }
+ Frame {
+ msec: 96
+ }
+ Frame {
+ msec: 112
+ }
+ Frame {
+ msec: 128
+ }
+ Frame {
+ msec: 144
+ }
+ Frame {
+ msec: 160
+ }
+ Frame {
+ msec: 176
+ }
+ Frame {
+ msec: 192
+ }
+ Frame {
+ msec: 208
+ }
+ Frame {
+ msec: 224
+ }
+ Frame {
+ msec: 240
+ }
+ Frame {
+ msec: 256
+ }
+ Frame {
+ msec: 272
+ }
+ Frame {
+ msec: 288
+ }
+ Frame {
+ msec: 304
+ }
+ Frame {
+ msec: 320
+ }
+ Frame {
+ msec: 336
+ }
+ Frame {
+ msec: 352
+ }
+ Frame {
+ msec: 368
+ }
+ Frame {
+ msec: 384
+ }
+ Frame {
+ msec: 400
+ }
+ Frame {
+ msec: 416
+ }
+ Frame {
+ msec: 432
+ }
+ Frame {
+ msec: 448
+ }
+ Frame {
+ msec: 464
+ }
+ Frame {
+ msec: 480
+ }
+ Frame {
+ msec: 496
+ }
+ Frame {
+ msec: 512
+ }
+ Frame {
+ msec: 528
+ }
+ Frame {
+ msec: 544
+ }
+ Frame {
+ msec: 560
+ }
+ Frame {
+ msec: 576
+ }
+ Frame {
+ msec: 592
+ }
+ Frame {
+ msec: 608
+ }
+ Frame {
+ msec: 624
+ }
+ Frame {
+ msec: 640
+ }
+ Frame {
+ msec: 656
+ }
+ Frame {
+ msec: 672
+ }
+ Frame {
+ msec: 688
+ }
+ Frame {
+ msec: 704
+ }
+ Frame {
+ msec: 720
+ }
+ Frame {
+ msec: 736
+ }
+ Frame {
+ msec: 752
+ }
+ Frame {
+ msec: 768
+ }
+ Frame {
+ msec: 784
+ }
+ Frame {
+ msec: 800
+ }
+ Frame {
+ msec: 816
+ }
+ Frame {
+ msec: 832
+ }
+ Frame {
+ msec: 848
+ }
+ Frame {
+ msec: 864
+ }
+ Frame {
+ msec: 880
+ }
+ Frame {
+ msec: 896
+ }
+ Frame {
+ msec: 912
+ }
+ Frame {
+ msec: 928
+ }
+ Frame {
+ msec: 944
+ }
+ Frame {
+ msec: 960
+ }
+ Frame {
+ msec: 976
+ }
+ Frame {
+ msec: 992
+ }
+ Frame {
+ msec: 1008
+ }
+ Frame {
+ msec: 1024
+ }
+ Frame {
+ msec: 1040
+ }
+ Frame {
+ msec: 1056
+ }
+ Frame {
+ msec: 1072
+ }
+ Frame {
+ msec: 1088
+ }
+ Frame {
+ msec: 1104
+ }
+ Frame {
+ msec: 1120
+ }
+ Frame {
+ msec: 1136
+ }
+ Frame {
+ msec: 1152
+ }
+ Frame {
+ msec: 1168
+ }
+ Frame {
+ msec: 1184
+ }
+ Frame {
+ msec: 1200
+ }
+ Frame {
+ msec: 1216
+ }
+ Frame {
+ msec: 1232
+ }
+ Frame {
+ msec: 1248
+ }
+ Frame {
+ msec: 1264
+ }
+ Frame {
+ msec: 1280
+ }
+ Frame {
+ msec: 1296
+ }
+ Frame {
+ msec: 1312
+ }
+ Frame {
+ msec: 1328
+ }
+ Frame {
+ msec: 1344
+ }
+ Frame {
+ msec: 1360
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 77; y: 7
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1376
+ }
+ Frame {
+ msec: 1392
+ }
+ Frame {
+ msec: 1408
+ }
+ Frame {
+ msec: 1424
+ }
+ Frame {
+ msec: 1440
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 77; y: 7
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1456
+ }
+ Frame {
+ msec: 1472
+ }
+ Frame {
+ msec: 1488
+ }
+ Frame {
+ msec: 1504
+ }
+ Frame {
+ msec: 1520
+ }
+ Frame {
+ msec: 1536
+ }
+ Frame {
+ msec: 1552
+ }
+ Frame {
+ msec: 1568
+ }
+ Frame {
+ msec: 1584
+ }
+ Frame {
+ msec: 1600
+ }
+ Frame {
+ msec: 1616
+ }
+ Frame {
+ msec: 1632
+ }
+ Frame {
+ msec: 1648
+ }
+ Frame {
+ msec: 1664
+ }
+ Frame {
+ msec: 1680
+ }
+ Frame {
+ msec: 1696
+ }
+ Frame {
+ msec: 1712
+ }
+ Frame {
+ msec: 1728
+ }
+ Frame {
+ msec: 1744
+ }
+ Frame {
+ msec: 1760
+ }
+ Frame {
+ msec: 1776
+ }
+ Frame {
+ msec: 1792
+ }
+ Frame {
+ msec: 1808
+ }
+ Frame {
+ msec: 1824
+ }
+ Frame {
+ msec: 1840
+ }
+ Frame {
+ msec: 1856
+ }
+ Frame {
+ msec: 1872
+ }
+ Frame {
+ msec: 1888
+ }
+ Frame {
+ msec: 1904
+ }
+ Frame {
+ msec: 1920
+ }
+ Frame {
+ msec: 1936
+ }
+ Frame {
+ msec: 1952
+ }
+ Frame {
+ msec: 1968
+ }
+ Frame {
+ msec: 1984
+ }
+ Frame {
+ msec: 2000
+ }
+ Frame {
+ msec: 2016
+ }
+ Frame {
+ msec: 2032
+ }
+ Frame {
+ msec: 2048
+ }
+ Frame {
+ msec: 2064
+ }
+ Frame {
+ msec: 2080
+ }
+ Frame {
+ msec: 2096
+ }
+ Frame {
+ msec: 2112
+ }
+ Frame {
+ msec: 2128
+ }
+ Frame {
+ msec: 2144
+ }
+ Frame {
+ msec: 2160
+ }
+ Frame {
+ msec: 2176
+ }
+ Frame {
+ msec: 2192
+ }
+ Frame {
+ msec: 2208
+ }
+ Frame {
+ msec: 2224
+ }
+ Frame {
+ msec: 2240
+ }
+ Frame {
+ msec: 2256
+ }
+ Frame {
+ msec: 2272
+ }
+ Frame {
+ msec: 2288
+ }
+ Frame {
+ msec: 2304
+ }
+ Frame {
+ msec: 2320
+ }
+ Frame {
+ msec: 2336
+ }
+ Frame {
+ msec: 2352
+ }
+ Frame {
+ msec: 2368
+ }
+ Frame {
+ msec: 2384
+ }
+}
diff --git a/tests/auto/declarative/visual/selftest_noimages/selftest_noimages.qml b/tests/auto/declarative/visual/selftest_noimages/selftest_noimages.qml
new file mode 100644
index 0000000000..da7f9b68fb
--- /dev/null
+++ b/tests/auto/declarative/visual/selftest_noimages/selftest_noimages.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+Text {
+ property string error: "not pressed"
+ text: (new Date()).valueOf()
+ MouseArea {
+ anchors.fill: parent
+ onPressed: error=""
+ }
+}
diff --git a/tests/auto/declarative/visual/tst_visual.cpp b/tests/auto/declarative/visual/tst_visual.cpp
new file mode 100644
index 0000000000..cd88e87058
--- /dev/null
+++ b/tests/auto/declarative/visual/tst_visual.cpp
@@ -0,0 +1,370 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qtest.h>
+#include <QDeclarativeView>
+#include <QApplication>
+#include <QLibraryInfo>
+#include <QDir>
+#include <QDebug>
+#include <QProcess>
+#include <QFile>
+
+enum Mode { Record, RecordNoVisuals, Play, TestVisuals, RemoveVisuals, UpdateVisuals, UpdatePlatformVisuals, Test };
+
+static QString testdir;
+class tst_visual : public QObject
+{
+ Q_OBJECT
+public:
+ tst_visual();
+
+ static QString toTestScript(const QString &, Mode=Test);
+ static QString viewer();
+
+ static QStringList findQmlFiles(const QDir &d);
+private slots:
+ void visual_data();
+ void visual();
+
+private:
+ QString qmlruntime;
+};
+
+
+tst_visual::tst_visual()
+{
+ qmlruntime = viewer();
+}
+
+QString tst_visual::viewer()
+{
+ QString binaries = QLibraryInfo::location(QLibraryInfo::BinariesPath);
+
+ QString qmlruntime;
+
+#if defined(Q_WS_MAC)
+ qmlruntime = QDir(binaries).absoluteFilePath("qml.app/Contents/MacOS/qml");
+#elif defined(Q_WS_WIN)
+ qmlruntime = QDir(binaries).absoluteFilePath("qml.exe");
+#else
+ qmlruntime = QDir(binaries).absoluteFilePath("qml");
+#endif
+
+ return qmlruntime;
+}
+
+void tst_visual::visual_data()
+{
+ QTest::addColumn<QString>("file");
+ QTest::addColumn<QString>("testdata");
+
+ QStringList files;
+ files << findQmlFiles(QDir(QT_TEST_SOURCE_DIR));
+
+ foreach (const QString &file, files) {
+ QString testdata = toTestScript(file);
+ if (testdata.isEmpty())
+ continue;
+
+ QTest::newRow(file.toLatin1().constData()) << file << testdata;
+ }
+}
+
+void tst_visual::visual()
+{
+ QFETCH(QString, file);
+ QFETCH(QString, testdata);
+
+ QStringList arguments;
+ arguments << "-script" << testdata
+ << "-scriptopts" << "play,testimages,testerror,exitoncomplete,exitonfailure"
+ << file;
+ QProcess p;
+ p.start(qmlruntime, arguments);
+ QVERIFY(p.waitForFinished());
+ if (p.exitCode() != 0)
+ qDebug() << p.readAllStandardError();
+ QCOMPARE(p.exitStatus(), QProcess::NormalExit);
+ QCOMPARE(p.exitCode(), 0);
+}
+
+QString tst_visual::toTestScript(const QString &file, Mode mode)
+{
+ if (!file.endsWith(".qml"))
+ return QString();
+
+ int index = file.lastIndexOf(QDir::separator());
+ if (index == -1)
+ return QString();
+
+ const char* platformsuffix=0; // platforms with different fonts
+#if defined(Q_WS_MACX)
+ platformsuffix = "-MAC";
+#elif defined(Q_WS_X11)
+ platformsuffix = "-X11";
+#elif defined(Q_WS_WIN32)
+ platformsuffix = "-WIN";
+#elif defined(Q_WS_QWS)
+ platformsuffix = "-QWS";
+#elif defined(Q_WS_S60)
+ platformsuffix = "-S60";
+#endif
+
+ QString testdata = file.left(index + 1) +
+ QString("data");
+ QString testname = file.mid(index + 1, file.length() - index - 5);
+
+ if (platformsuffix && (mode == UpdatePlatformVisuals || QFile::exists(testdata+QLatin1String(platformsuffix)+QDir::separator()+testname+".qml"))) {
+ QString platformdir = testdata + QLatin1String(platformsuffix);
+ if (mode == UpdatePlatformVisuals) {
+ Q_ASSERT(QDir().mkpath(platformdir));
+ // Copy from base
+ QDir dir(testdata,testname+".*");
+ dir.setFilter(QDir::Files);
+ QFileInfoList list = dir.entryInfoList();
+ for (int i = 0; i < list.size(); ++i) {
+ QFile in(list.at(i).filePath());
+ Q_ASSERT(in.open(QIODevice::ReadOnly));
+ QFile out(platformdir + QDir::separator() + list.at(i).fileName());
+ Q_ASSERT(out.open(QIODevice::WriteOnly));
+ out.write(in.readAll());
+ }
+ }
+ testdata = platformdir;
+ }
+
+ testdata += QDir::separator() + testname;
+
+ return testdata;
+}
+
+QStringList tst_visual::findQmlFiles(const QDir &d)
+{
+ QStringList rv;
+
+ QStringList files = d.entryList(QStringList() << QLatin1String("*.qml"),
+ QDir::Files);
+ foreach (const QString &file, files) {
+ if (file.at(0).isLower()) {
+ rv << d.absoluteFilePath(file);
+ }
+ }
+
+ QStringList dirs = d.entryList(QDir::Dirs | QDir::NoDotAndDotDot |
+ QDir::NoSymLinks);
+ foreach (const QString &dir, dirs) {
+ if (dir.left(4) == "data")
+ continue;
+
+ QDir sub = d;
+ sub.cd(dir);
+ rv << findQmlFiles(sub);
+ }
+
+ return rv;
+}
+
+void action(Mode mode, const QString &file)
+{
+ Q_ASSERT(mode != Test);
+
+ QString testdata = tst_visual::toTestScript(file,mode);
+
+ QStringList arguments;
+ switch (mode) {
+ case Test:
+ // Don't run qml
+ break;
+ case Record:
+ arguments << "-script" << testdata
+ << "-scriptopts" << "record,testimages,saveonexit"
+ << file;
+ break;
+ case RecordNoVisuals:
+ arguments << "-script" << testdata
+ << "-scriptopts" << "record,saveonexit"
+ << file;
+ break;
+ case Play:
+ arguments << "-script" << testdata
+ << "-scriptopts" << "play,testimages,testerror,exitoncomplete"
+ << file;
+ break;
+ case TestVisuals:
+ arguments << "-script" << testdata
+ << "-scriptopts" << "play"
+ << file;
+ break;
+ case UpdateVisuals:
+ case UpdatePlatformVisuals:
+ arguments << "-script" << testdata
+ << "-scriptopts" << "play,record,testimages,exitoncomplete,saveonexit"
+ << file;
+ break;
+ case RemoveVisuals:
+ arguments << "-script" << testdata
+ << "-scriptopts" << "play,record,exitoncomplete,saveonexit"
+ << file;
+ break;
+ }
+ if (!arguments.isEmpty()) {
+ QProcess p;
+ p.setProcessChannelMode(QProcess::ForwardedChannels);
+ p.start(tst_visual::viewer(), arguments);
+ p.waitForFinished();
+ }
+}
+
+void usage()
+{
+ fprintf(stderr, "\n");
+ fprintf(stderr, "QML related options\n");
+ fprintf(stderr, " -listtests : list all the tests seen by tst_visual, and then exit immediately\n");
+ fprintf(stderr, " -record file : record new test data for file\n");
+ fprintf(stderr, " -recordnovisuals file : record new test data for file, but ignore visuals\n");
+ fprintf(stderr, " -play file : playback test data for file, printing errors\n");
+ fprintf(stderr, " -testvisuals file : playback test data for file, without errors\n");
+ fprintf(stderr, " -updatevisuals file : playback test data for file, accept new visuals for file\n");
+ fprintf(stderr, " -updateplatformvisuals file : playback test data for file, accept new visuals for file only on current platform (MacOSX/Win32/X11/QWS/S60)\n");
+ fprintf(stderr, "\n"
+ "Visual tests are recordings of manual interactions with a QML test,\n"
+ "that can then be run automatically. To record a new test, run:\n"
+ "\n"
+ " tst_visual -record yourtestdir/yourtest.qml\n"
+ "\n"
+ "This records everything you do (try to keep it short).\n"
+ "To play back a test, run:\n"
+ "\n"
+ " tst_visual -play yourtestdir/yourtest.qml\n"
+ "\n"
+ "Your test may include QML code to test itself, reporting any error to an\n"
+ "'error' property on the root object - the test will fail if this property\n"
+ "gets set to anything non-empty.\n"
+ "\n"
+ "If your test changes slightly but is still correct (check with -play), you\n"
+ "can update the visuals by running:\n"
+ "\n"
+ " tst_visual -updatevisuals yourtestdir/yourtest.qml\n"
+ "\n"
+ "If your test includes platform-sensitive visuals (eg. text in system fonts),\n"
+ "you should create platform-specific visuals, using -updateplatformvisuals\n"
+ "instead.\n"
+ "\n"
+ "If you ONLY wish to use the 'error' property, you can record your test with\n"
+ "-recordnovisuals, or discard existing visuals with -removevisuals; the test\n"
+ "will then only fail on a syntax error, crash, or non-empty 'error' property.\n"
+ );
+}
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ Mode mode = Test;
+ QString file;
+ bool showHelp = false;
+
+ int newArgc = 1;
+ char **newArgv = new char*[argc];
+ newArgv[0] = argv[0];
+
+ for (int ii = 1; ii < argc; ++ii) {
+ QString arg(argv[ii]);
+ if (arg == "-play" && (ii + 1) < argc) {
+ mode = Play;
+ file = argv[++ii];
+ } else if (arg == "-record" && (ii + 1) < argc) {
+ mode = Record;
+ file = argv[++ii];
+ } else if (arg == "-recordnovisuals" && (ii + 1) < argc) {
+ mode = RecordNoVisuals;
+ file = argv[++ii];
+ } else if (arg == "-testvisuals" && (ii + 1) < argc) {
+ mode = TestVisuals;
+ file = argv[++ii];
+ } else if (arg == "-removevisuals" && (ii + 1) < argc) {
+ mode = RemoveVisuals;
+ file = argv[++ii];
+ } else if (arg == "-updatevisuals" && (ii + 1) < argc) {
+ mode = UpdateVisuals;
+ file = argv[++ii];
+ } else if (arg == "-updateplatformvisuals" && (ii + 1) < argc) {
+ mode = UpdatePlatformVisuals;
+ file = argv[++ii];
+ } else {
+ newArgv[newArgc++] = argv[ii];
+ }
+
+ if (arg == "-help" || arg == "-?" || arg == "--help") {
+ atexit(usage);
+ showHelp = true;
+ }
+
+ if (arg == "-listtests") {
+ QStringList list = tst_visual::findQmlFiles(QDir(QT_TEST_SOURCE_DIR));
+ foreach (QString test, list) {
+ qWarning() << qPrintable(test);
+ }
+ return 0;
+ }
+ }
+
+ if (mode == Test || showHelp) {
+ tst_visual tc;
+ return QTest::qExec(&tc, newArgc, newArgv);
+ } else {
+ if (!file.endsWith(QLatin1String(".qml"))) {
+ qWarning() << "Error: Invalid file name (must end in .qml)";
+ return -1;
+ }
+ QDir d = QDir::current();
+ QString absFile = d.absoluteFilePath(file);
+ if (!QFile::exists(absFile)) {
+ qWarning() << "Error: File does not exist";
+ return -1;
+ }
+
+ action(mode, absFile);
+ return 0;
+ }
+}
+
+#include "tst_visual.moc"
diff --git a/tests/auto/declarative/visual/visual.pro b/tests/auto/declarative/visual/visual.pro
new file mode 100644
index 0000000000..7ae2bed629
--- /dev/null
+++ b/tests/auto/declarative/visual/visual.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_visual.cpp
+
+DEFINES += QT_TEST_SOURCE_DIR=\"\\\"$$PWD\\\"\"
diff --git a/tests/auto/declarative/visual/webview/embedding/data/nesting.0.png b/tests/auto/declarative/visual/webview/embedding/data/nesting.0.png
new file mode 100644
index 0000000000..57de71069e
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/embedding/data/nesting.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/embedding/data/nesting.qml b/tests/auto/declarative/visual/webview/embedding/data/nesting.qml
new file mode 100644
index 0000000000..8d38ebef77
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/embedding/data/nesting.qml
@@ -0,0 +1,363 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "5dc8dca7a73022fbf2116b654b709244"
+ }
+ Frame {
+ msec: 32
+ hash: "5dc8dca7a73022fbf2116b654b709244"
+ }
+ Frame {
+ msec: 48
+ hash: "34079c4076ab6aadd8b64fcba7d95e15"
+ }
+ Frame {
+ msec: 64
+ hash: "5ab5fc62b49e78d0609dcb4be6c9a157"
+ }
+ Frame {
+ msec: 80
+ hash: "063cc7438bbffae717648d98006021a8"
+ }
+ Frame {
+ msec: 96
+ hash: "c5cd16663e48639cbeade82c3bfa0403"
+ }
+ Frame {
+ msec: 112
+ hash: "ea7f8df84ddbad0f683fe97ddb0a0130"
+ }
+ Frame {
+ msec: 128
+ hash: "3c353e09bdb3a1e6ff388ad6020f55ea"
+ }
+ Frame {
+ msec: 144
+ hash: "5b6de430365d0c9824337011916b0c0b"
+ }
+ Frame {
+ msec: 160
+ hash: "48d353ac9e7ee1ce41361d0a2b47e008"
+ }
+ Frame {
+ msec: 176
+ hash: "c96e4d02d343ddd78e8d3dd6aa8e0198"
+ }
+ Frame {
+ msec: 192
+ hash: "543c63d77ec635b77672ba4c5160a3d4"
+ }
+ Frame {
+ msec: 208
+ hash: "2d56ad9c2352e555fef613d625e71151"
+ }
+ Frame {
+ msec: 224
+ hash: "18e433c3e3ee64510f875f674791d51c"
+ }
+ Frame {
+ msec: 240
+ hash: "56889122c1ddacdd8ebd88310c7410bc"
+ }
+ Frame {
+ msec: 256
+ hash: "d51c85458e0109bd5bf9528b741d98d0"
+ }
+ Frame {
+ msec: 272
+ hash: "ac54137afc29a3022c6f01df7cdf2fd6"
+ }
+ Frame {
+ msec: 288
+ hash: "c7a42b389bae3b729ba9e6cba7f54530"
+ }
+ Frame {
+ msec: 304
+ hash: "7583b55841e80891652c3472c658f989"
+ }
+ Frame {
+ msec: 320
+ hash: "95a7f8d47c3788261427727f82c9ff59"
+ }
+ Frame {
+ msec: 336
+ hash: "a87bad3e2f010680e16cd1e3f5e03e99"
+ }
+ Frame {
+ msec: 352
+ hash: "e16bc51653f21819e0eec412b99a069f"
+ }
+ Frame {
+ msec: 368
+ hash: "f1e869580ac148ae207141c5f0adc185"
+ }
+ Frame {
+ msec: 384
+ hash: "7e496e44363a16d7c62e4258af9ce087"
+ }
+ Frame {
+ msec: 400
+ hash: "19e97915c84d3554c66d5a9ad3aa6a3e"
+ }
+ Frame {
+ msec: 416
+ hash: "181181b48a1085d1850f18ca9b163549"
+ }
+ Frame {
+ msec: 432
+ hash: "4637cb04595a543867bd43b0c1c829ea"
+ }
+ Frame {
+ msec: 448
+ hash: "bd0a074fed5507f8556de6110bf56aa4"
+ }
+ Frame {
+ msec: 464
+ hash: "9547618923edac6f7f9a3ff324c4f2d8"
+ }
+ Frame {
+ msec: 480
+ hash: "a2f90c88eacb7c66878d45e33c2a787d"
+ }
+ Frame {
+ msec: 496
+ hash: "d5ffd3e35d0426887c106069310f84d8"
+ }
+ Frame {
+ msec: 512
+ hash: "6bc50a5b76e2a2ef0e6bee762abeb330"
+ }
+ Frame {
+ msec: 528
+ hash: "d4439933c842ed8432434d272fea2845"
+ }
+ Frame {
+ msec: 544
+ hash: "61699e6ec476ac3f090e4f485430421d"
+ }
+ Frame {
+ msec: 560
+ hash: "02d7fa9bcd697d2cab364d0a3ca4a0e2"
+ }
+ Frame {
+ msec: 576
+ hash: "914178cbf1f6a6822cc40f81823475e4"
+ }
+ Frame {
+ msec: 592
+ hash: "280f867ea27891ee764332998567d40d"
+ }
+ Frame {
+ msec: 608
+ hash: "ea0d00fe54a172a89c24eac781f7ae6d"
+ }
+ Frame {
+ msec: 624
+ hash: "4e910fb507964a710e26f318c62227bf"
+ }
+ Frame {
+ msec: 640
+ hash: "b0c3392eb739f270dd21f552ad999c23"
+ }
+ Frame {
+ msec: 656
+ hash: "f3698c83b0972bd66a53ad95d4fc301e"
+ }
+ Frame {
+ msec: 672
+ hash: "0d303a0d6a9b626943ac93cc6f3fb230"
+ }
+ Frame {
+ msec: 688
+ hash: "ba56d49e6f51aa6f1bd2a7500e3538fd"
+ }
+ Frame {
+ msec: 704
+ hash: "273ce89d5194168e5bfd1dcefad49be2"
+ }
+ Frame {
+ msec: 720
+ hash: "c2beef4fb7996dbccdaff4f54bdc33f1"
+ }
+ Frame {
+ msec: 736
+ hash: "1e1aa7d84f27158a8e61bd8698ddbf2a"
+ }
+ Frame {
+ msec: 752
+ hash: "24e82479802e710c673133ca0413be66"
+ }
+ Frame {
+ msec: 768
+ hash: "b77e935a690bcb396e15b942d772cf1b"
+ }
+ Frame {
+ msec: 784
+ hash: "7b729c74df1d15d6b0e8e1fc19c2d710"
+ }
+ Frame {
+ msec: 800
+ hash: "fd6cbdca3e481baaf35022dfea76e74c"
+ }
+ Frame {
+ msec: 816
+ hash: "c975f6eb592793aa81895ffcb74ca577"
+ }
+ Frame {
+ msec: 832
+ hash: "677c4039a650df53b4e885f37b049ab3"
+ }
+ Frame {
+ msec: 848
+ hash: "89563aae36552cb1749ec06567e46d9d"
+ }
+ Frame {
+ msec: 864
+ hash: "01f57402874de6608cc02937aaf91794"
+ }
+ Frame {
+ msec: 880
+ hash: "50c9c4e5eaaadee1ff230975390d34e3"
+ }
+ Frame {
+ msec: 896
+ hash: "20b7d277d398afad59afdf9e6b41a57e"
+ }
+ Frame {
+ msec: 912
+ hash: "8f9ea938a2375afeba419199de66dd52"
+ }
+ Frame {
+ msec: 928
+ hash: "b96745888ba954bcf304c0840a030f93"
+ }
+ Frame {
+ msec: 944
+ hash: "f5715e931274011123160f7ad10d6c52"
+ }
+ Frame {
+ msec: 960
+ image: "nesting.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "459fe967816c795a177a3926093fae75"
+ }
+ Frame {
+ msec: 992
+ hash: "c599a26083068b6db628c8d8416bab60"
+ }
+ Frame {
+ msec: 1008
+ hash: "e0aee7d1152c971b1beee9d36542acb7"
+ }
+ Frame {
+ msec: 1024
+ hash: "2af0facdf6412f7b06979aae25e4db26"
+ }
+ Frame {
+ msec: 1040
+ hash: "f147a92cb1826f95d4fdb7d011ba79b1"
+ }
+ Frame {
+ msec: 1056
+ hash: "12a1cb894b0fb8e44152cccacf855c1a"
+ }
+ Frame {
+ msec: 1072
+ hash: "c7500cf58b74fef2c3e9820d1de8f843"
+ }
+ Frame {
+ msec: 1088
+ hash: "3a031b2206835f8b2dc9837016df6ae6"
+ }
+ Frame {
+ msec: 1104
+ hash: "7a4796b419bbc04237764dea0b1d47d5"
+ }
+ Frame {
+ msec: 1120
+ hash: "151d350f0064e2faf0bfb9c58bc3e4f2"
+ }
+ Frame {
+ msec: 1136
+ hash: "d72c20a97e678908acc1d6c1f8114d9e"
+ }
+ Frame {
+ msec: 1152
+ hash: "22da1e645640a3c31b064ff757113197"
+ }
+ Frame {
+ msec: 1168
+ hash: "401f0bf370e2ecea5a84276fb72eb1da"
+ }
+ Frame {
+ msec: 1184
+ hash: "c6e00d7b0ac14a5c3860b6a29901c915"
+ }
+ Frame {
+ msec: 1200
+ hash: "f1f7dc55d7719fcb6e97157c0ca85fc0"
+ }
+ Frame {
+ msec: 1216
+ hash: "6a112e1d79c7128c235d093e4f1f9325"
+ }
+ Frame {
+ msec: 1232
+ hash: "14a2caf8cdca8d5147261a315059b69d"
+ }
+ Frame {
+ msec: 1248
+ hash: "5645243aa3cfd12b0b32442f063bedb2"
+ }
+ Frame {
+ msec: 1264
+ hash: "c7f72534a88e33c72a54cb8580534551"
+ }
+ Frame {
+ msec: 1280
+ hash: "6cd5e2e8e0128586a682b3c649ae0631"
+ }
+ Frame {
+ msec: 1296
+ hash: "67cefb4526b52d40a31811bc0dfaeb6a"
+ }
+ Frame {
+ msec: 1312
+ hash: "fbe2a43a27bf490719c8b9e2b094e34f"
+ }
+ Frame {
+ msec: 1328
+ hash: "e028aad6f51a47d8189efcf9c5d277ee"
+ }
+ Frame {
+ msec: 1344
+ hash: "2b4cc50c37c07289fa6f9309991d36da"
+ }
+ Frame {
+ msec: 1360
+ hash: "b67b2244cd0616d07e100d7b3b00bbe2"
+ }
+ Frame {
+ msec: 1376
+ hash: "4e4690cffc98c49e91bdb600f1e94c79"
+ }
+ Frame {
+ msec: 1392
+ hash: "e5215c727836a5547a170d42363bc5c8"
+ }
+ Frame {
+ msec: 1408
+ hash: "26868e91d1794bb3f42d51f508fef613"
+ }
+ Frame {
+ msec: 1424
+ hash: "1e5f431b125a66096ac9a4d5a211a2c4"
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/embedding/egg.qml b/tests/auto/declarative/visual/webview/embedding/egg.qml
new file mode 100644
index 0000000000..fe1bb70bf5
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/embedding/egg.qml
@@ -0,0 +1,26 @@
+import Qt 4.6
+
+Item {
+ property var period : 250
+ property var color : "black"
+ id: root
+
+ Item {
+ x: root.width/2
+ y: root.height/2
+ Rectangle {
+ radius: width/2
+ color: root.color
+ x: -width/2
+ y: -height/2
+ width: root.width*1.5
+ height: root.height*1.5
+ }
+ rotation: NumberAnimation {
+ from: 0
+ to: 360
+ repeat: true
+ duration: root.period
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/embedding/nesting.html b/tests/auto/declarative/visual/webview/embedding/nesting.html
new file mode 100644
index 0000000000..6e81689ec7
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/embedding/nesting.html
@@ -0,0 +1,9 @@
+<html>
+<head><title>Nesting</title>
+<link rel="icon" sizes="48x48" href="basic.png">
+</head>
+<body bgcolor="green">
+<h1>Nesting</h1>
+This is a test...
+<OBJECT data=egg.qml TYPE=application/x-qt-plugin width=50 height=70 period=2000 color=white></OBJECT>
+... with a spinning QML egg nested in it.
diff --git a/tests/auto/declarative/visual/webview/embedding/nesting.qml b/tests/auto/declarative/visual/webview/embedding/nesting.qml
new file mode 100644
index 0000000000..5e35306e84
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/embedding/nesting.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+import org.webkit 1.0
+
+WebView {
+ width: 300
+ height: 200
+ url: "nesting.html"
+ settings.pluginsEnabled: true
+}
diff --git a/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.0.png b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.0.png
new file mode 100644
index 0000000000..139aa9d8cd
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.1.png b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.1.png
new file mode 100644
index 0000000000..e2e164423d
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.2.png b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.2.png
new file mode 100644
index 0000000000..aa2fb828cb
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.3.png b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.3.png
new file mode 100644
index 0000000000..197643091b
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.4.png b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.4.png
new file mode 100644
index 0000000000..c895a0a35a
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.5.png b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.5.png
new file mode 100644
index 0000000000..c895a0a35a
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.5.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.6.png b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.6.png
new file mode 100644
index 0000000000..c895a0a35a
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.6.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.7.png b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.7.png
new file mode 100644
index 0000000000..c895a0a35a
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.7.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.8.png b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.8.png
new file mode 100644
index 0000000000..c895a0a35a
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.8.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.qml b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.qml
new file mode 100644
index 0000000000..957f9d5ed9
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/data/evaluateJavaScript.qml
@@ -0,0 +1,3759 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 32
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 48
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 64
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 80
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 96
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 112
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 128
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 144
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 160
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 176
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 192
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 208
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 224
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 240
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 256
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 272
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 288
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 304
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 320
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 336
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 352
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 368
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 384
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 400
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 416
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 195; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 187; y: 35
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 432
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 153; y: 77
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 448
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 145; y: 87
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 139; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 464
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 135; y: 111
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 129; y: 121
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 480
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 125; y: 131
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 121; y: 139
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 117; y: 149
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 496
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 111; y: 157
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 512
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 107; y: 165
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 101; y: 171
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 528
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 97; y: 177
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 95; y: 185
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 544
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 91; y: 189
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 89; y: 195
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 560
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 85; y: 199
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 84; y: 201
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 576
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 83; y: 203
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 82; y: 204
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 81; y: 204
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 592
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 80; y: 204
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 608
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 79; y: 205
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 78; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 624
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 77; y: 207
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 76; y: 208
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 75; y: 210
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 640
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 71; y: 216
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 656
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 70; y: 218
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 70; y: 220
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 672
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 69; y: 222
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 68; y: 224
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 688
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 67; y: 225
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 704
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 720
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 736
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 752
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 768
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 784
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 67; y: 225
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 800
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 66; y: 224
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 816
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 66; y: 222
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 832
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 65; y: 221
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 61; y: 217
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 848
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 60; y: 215
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 864
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 59; y: 214
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 57; y: 213
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 880
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 55; y: 213
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 896
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 912
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 928
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 944
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 960
+ image: "evaluateJavaScript.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 992
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1008
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 55; y: 213
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1024
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1040
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1056
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1072
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1088
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 55; y: 213
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1104
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1120
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1136
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1152
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1168
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1184
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1200
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1216
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1232
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1248
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1264
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1280
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1296
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 57; y: 212
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 63; y: 210
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1312
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 65; y: 210
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 67; y: 209
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1328
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 69; y: 208
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 71; y: 207
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1344
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 73; y: 207
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 74; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 75; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1360
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1376
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1392
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1408
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1424
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1440
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1456
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1472
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1488
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1504
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1520
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1536
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1552
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1568
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1584
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1600
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1616
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1632
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1648
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1664
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1680
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Frame {
+ msec: 1696
+ hash: "f35c69aed43a795ff02b46d7b01ef64a"
+ }
+ Key {
+ type: 6
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1712
+ hash: "244200622435603a75f58366496daf8b"
+ }
+ Frame {
+ msec: 1728
+ hash: "244200622435603a75f58366496daf8b"
+ }
+ Frame {
+ msec: 1744
+ hash: "244200622435603a75f58366496daf8b"
+ }
+ Frame {
+ msec: 1760
+ hash: "244200622435603a75f58366496daf8b"
+ }
+ Frame {
+ msec: 1776
+ hash: "244200622435603a75f58366496daf8b"
+ }
+ Key {
+ type: 7
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1792
+ hash: "244200622435603a75f58366496daf8b"
+ }
+ Frame {
+ msec: 1808
+ hash: "244200622435603a75f58366496daf8b"
+ }
+ Frame {
+ msec: 1824
+ hash: "244200622435603a75f58366496daf8b"
+ }
+ Frame {
+ msec: 1840
+ hash: "244200622435603a75f58366496daf8b"
+ }
+ Frame {
+ msec: 1856
+ hash: "244200622435603a75f58366496daf8b"
+ }
+ Frame {
+ msec: 1872
+ hash: "244200622435603a75f58366496daf8b"
+ }
+ Frame {
+ msec: 1888
+ hash: "244200622435603a75f58366496daf8b"
+ }
+ Frame {
+ msec: 1904
+ hash: "244200622435603a75f58366496daf8b"
+ }
+ Frame {
+ msec: 1920
+ image: "evaluateJavaScript.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "244200622435603a75f58366496daf8b"
+ }
+ Frame {
+ msec: 1952
+ hash: "244200622435603a75f58366496daf8b"
+ }
+ Frame {
+ msec: 1968
+ hash: "244200622435603a75f58366496daf8b"
+ }
+ Key {
+ type: 6
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 1984
+ hash: "44dc10a2914a391b57e68c2002a95adf"
+ }
+ Frame {
+ msec: 2000
+ hash: "44dc10a2914a391b57e68c2002a95adf"
+ }
+ Frame {
+ msec: 2016
+ hash: "44dc10a2914a391b57e68c2002a95adf"
+ }
+ Frame {
+ msec: 2032
+ hash: "44dc10a2914a391b57e68c2002a95adf"
+ }
+ Frame {
+ msec: 2048
+ hash: "44dc10a2914a391b57e68c2002a95adf"
+ }
+ Key {
+ type: 7
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2064
+ hash: "44dc10a2914a391b57e68c2002a95adf"
+ }
+ Frame {
+ msec: 2080
+ hash: "44dc10a2914a391b57e68c2002a95adf"
+ }
+ Frame {
+ msec: 2096
+ hash: "44dc10a2914a391b57e68c2002a95adf"
+ }
+ Frame {
+ msec: 2112
+ hash: "44dc10a2914a391b57e68c2002a95adf"
+ }
+ Frame {
+ msec: 2128
+ hash: "44dc10a2914a391b57e68c2002a95adf"
+ }
+ Frame {
+ msec: 2144
+ hash: "44dc10a2914a391b57e68c2002a95adf"
+ }
+ Frame {
+ msec: 2160
+ hash: "44dc10a2914a391b57e68c2002a95adf"
+ }
+ Frame {
+ msec: 2176
+ hash: "44dc10a2914a391b57e68c2002a95adf"
+ }
+ Frame {
+ msec: 2192
+ hash: "44dc10a2914a391b57e68c2002a95adf"
+ }
+ Key {
+ type: 6
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2208
+ hash: "c93921d0611e95373338c14cfcc17481"
+ }
+ Frame {
+ msec: 2224
+ hash: "c93921d0611e95373338c14cfcc17481"
+ }
+ Frame {
+ msec: 2240
+ hash: "c93921d0611e95373338c14cfcc17481"
+ }
+ Frame {
+ msec: 2256
+ hash: "c93921d0611e95373338c14cfcc17481"
+ }
+ Key {
+ type: 7
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2272
+ hash: "c93921d0611e95373338c14cfcc17481"
+ }
+ Frame {
+ msec: 2288
+ hash: "c93921d0611e95373338c14cfcc17481"
+ }
+ Frame {
+ msec: 2304
+ hash: "c93921d0611e95373338c14cfcc17481"
+ }
+ Frame {
+ msec: 2320
+ hash: "c93921d0611e95373338c14cfcc17481"
+ }
+ Frame {
+ msec: 2336
+ hash: "c93921d0611e95373338c14cfcc17481"
+ }
+ Frame {
+ msec: 2352
+ hash: "c93921d0611e95373338c14cfcc17481"
+ }
+ Frame {
+ msec: 2368
+ hash: "c93921d0611e95373338c14cfcc17481"
+ }
+ Frame {
+ msec: 2384
+ hash: "c93921d0611e95373338c14cfcc17481"
+ }
+ Frame {
+ msec: 2400
+ hash: "c93921d0611e95373338c14cfcc17481"
+ }
+ Frame {
+ msec: 2416
+ hash: "c93921d0611e95373338c14cfcc17481"
+ }
+ Key {
+ type: 6
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2432
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2448
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2464
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2480
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Key {
+ type: 7
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 2496
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2512
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2528
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2544
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2560
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2576
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2592
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2608
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2624
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2640
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2656
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2672
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2688
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2704
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2720
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2736
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2752
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2768
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2784
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2800
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2816
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2832
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2848
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2864
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2880
+ image: "evaluateJavaScript.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2912
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2928
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2944
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2960
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2976
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 2992
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3008
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3024
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3040
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3056
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3072
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3088
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3104
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3120
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3136
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3152
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3168
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3184
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3200
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3216
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3232
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3248
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3264
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3280
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3296
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3312
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 74; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3328
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 72; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3344
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 70; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 68; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 65; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3360
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 63; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3376
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 61; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 59; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3392
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 57; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 55; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3408
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 54; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 53; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3424
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3440
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3456
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3472
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3488
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3504
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Frame {
+ msec: 3520
+ hash: "9266775c7f2156977ff56fcd45246229"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 52; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 52; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3536
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3552
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3568
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3584
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3600
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3616
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3632
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3648
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 52; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3664
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3680
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3696
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3712
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3728
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3744
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3760
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3776
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3792
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3808
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3824
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3840
+ image: "evaluateJavaScript.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3872
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3888
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3904
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3920
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3936
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3952
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3968
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Frame {
+ msec: 3984
+ hash: "b62d9027299daa6ab8304d812ed00f83"
+ }
+ Key {
+ type: 6
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4000
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4016
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4032
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4048
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4064
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4080
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4096
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4112
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Key {
+ type: 7
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4128
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4144
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4160
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4176
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4192
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4208
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4224
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4240
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4256
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4272
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4288
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4304
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4320
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4336
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4352
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4368
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4384
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4400
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4416
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4432
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4448
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4464
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4480
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4496
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4512
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4528
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4544
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4560
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4576
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4592
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4608
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4624
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4640
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4656
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4672
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4688
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4704
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4720
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4736
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4752
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4768
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Frame {
+ msec: 4784
+ hash: "6cea5b700e402072a9953c81b605ef22"
+ }
+ Key {
+ type: 6
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4800
+ image: "evaluateJavaScript.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 4832
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 4848
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 4864
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 4880
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 4896
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 4912
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 4928
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Key {
+ type: 7
+ key: 65
+ modifiers: 0
+ text: "61"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4944
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 4960
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 4976
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 4992
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5008
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5024
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5040
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5056
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5072
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5088
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5104
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5120
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5136
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5152
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5168
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5184
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5200
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5216
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5232
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5248
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5264
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5280
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5296
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5312
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5328
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5344
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5360
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5376
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5392
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5408
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5424
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5440
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5456
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5472
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5488
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5504
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5520
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5536
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5552
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5568
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5584
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5600
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5616
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5632
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5648
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5664
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5680
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5696
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5712
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5728
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5744
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5760
+ image: "evaluateJavaScript.5.png"
+ }
+ Frame {
+ msec: 5776
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5792
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5808
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 5824
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 54; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5840
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 56; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 62; y: 204
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 65; y: 204
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5856
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 71; y: 202
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 79; y: 200
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5872
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 82; y: 200
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 90; y: 196
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5888
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 96; y: 192
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 102; y: 188
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5904
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 108; y: 182
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 112; y: 176
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5920
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 116; y: 168
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 120; y: 158
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5936
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 124; y: 148
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 128; y: 136
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5952
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 130; y: 124
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 134; y: 112
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5968
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 138; y: 100
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 142; y: 88
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 5984
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 144; y: 78
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6000
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 150; y: 68
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 154; y: 62
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 158; y: 56
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6016
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 162; y: 48
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6032
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 166; y: 44
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 168; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 172; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6048
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 174; y: 26
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 176; y: 20
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6064
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 177; y: 18
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6080
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 178; y: 16
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 178; y: 14
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6096
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 178; y: 12
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6112
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 178; y: 11
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6128
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 178; y: 10
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6144
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 179; y: 9
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6160
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 180; y: 7
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6176
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 181; y: 5
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 181; y: 4
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6192
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 182; y: 2
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 183; y: 1
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6208
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6224
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6240
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6256
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6272
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6288
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6304
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6320
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6336
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6352
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6368
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6384
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6400
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6416
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6432
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6448
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6464
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6480
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6496
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6512
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6528
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6544
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6560
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6576
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6592
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6608
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6624
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6640
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6656
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6672
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6688
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6704
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6720
+ image: "evaluateJavaScript.6.png"
+ }
+ Frame {
+ msec: 6736
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6752
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6768
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6784
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6800
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6816
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6832
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6848
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6864
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 176; y: 1
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 174; y: 15
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 172; y: 31
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6880
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 166; y: 47
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 162; y: 63
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6896
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 156; y: 81
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 150; y: 95
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6912
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 144; y: 107
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 138; y: 119
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6928
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 132; y: 127
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 126; y: 133
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6944
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 122; y: 137
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 120; y: 138
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6960
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 120; y: 139
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 6976
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 6992
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7008
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7024
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7040
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7056
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7072
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 119; y: 137
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7088
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7104
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7120
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 117; y: 137
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7136
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 116; y: 139
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 115; y: 141
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7152
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 113; y: 149
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 109; y: 155
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7168
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 107; y: 165
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 103; y: 171
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7184
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 99; y: 179
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 98; y: 181
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7200
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 96; y: 187
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 95; y: 189
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7216
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 95; y: 190
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7232
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7248
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7264
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7280
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 96; y: 188
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7296
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 96; y: 187
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 96; y: 186
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7312
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 96; y: 185
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 97; y: 184
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7328
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 97; y: 183
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 97; y: 182
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7344
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 98; y: 180
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7360
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 98; y: 178
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7376
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 99; y: 177
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 99; y: 176
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 99; y: 174
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7392
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7408
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 100; y: 172
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 100; y: 171
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7424
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 100; y: 170
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7440
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 100; y: 169
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7456
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 101; y: 167
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7472
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7488
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7504
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 101; y: 167
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7520
+ hash: "04e2e16813a9cafc37077a675e279f5f"
+ }
+ Frame {
+ msec: 7536
+ hash: "04e2e16813a9cafc37077a675e279f5f"
+ }
+ Frame {
+ msec: 7552
+ hash: "04e2e16813a9cafc37077a675e279f5f"
+ }
+ Frame {
+ msec: 7568
+ hash: "04e2e16813a9cafc37077a675e279f5f"
+ }
+ Frame {
+ msec: 7584
+ hash: "04e2e16813a9cafc37077a675e279f5f"
+ }
+ Frame {
+ msec: 7600
+ hash: "04e2e16813a9cafc37077a675e279f5f"
+ }
+ Frame {
+ msec: 7616
+ hash: "04e2e16813a9cafc37077a675e279f5f"
+ }
+ Frame {
+ msec: 7632
+ hash: "04e2e16813a9cafc37077a675e279f5f"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 101; y: 166
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 101; y: 166
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7648
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7664
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7680
+ image: "evaluateJavaScript.7.png"
+ }
+ Frame {
+ msec: 7696
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7712
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7728
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7744
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7760
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7776
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7792
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7808
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7824
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 103; y: 166
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7840
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 7856
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 105; y: 166
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7872
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 106; y: 165
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 107; y: 164
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7888
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 108; y: 164
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 109; y: 163
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7904
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 111; y: 163
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 112; y: 162
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7920
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 116; y: 158
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7936
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 118; y: 157
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 122; y: 153
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7952
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 128; y: 147
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 134; y: 139
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7968
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 140; y: 133
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 146; y: 125
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 150; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 7984
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 156; y: 109
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 160; y: 99
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8000
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 164; y: 89
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 166; y: 77
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8016
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 170; y: 67
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 172; y: 55
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8032
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 176; y: 45
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8048
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 178; y: 35
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 178; y: 27
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 180; y: 19
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8064
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 180; y: 11
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 182; y: 5
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 8080
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8096
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8112
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8128
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8144
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8160
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8176
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8192
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8208
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8224
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8240
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8256
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8272
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8288
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8304
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8320
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8336
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8352
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8368
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8384
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8400
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8416
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8432
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8448
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8464
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8480
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8496
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8512
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8528
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8544
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8560
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8576
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8592
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8608
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8624
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8640
+ image: "evaluateJavaScript.8.png"
+ }
+ Frame {
+ msec: 8656
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+ Frame {
+ msec: 8672
+ hash: "792140067e09d04b31e78be1fc9a40a2"
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/javascript/data/windowObjects.0.png b/tests/auto/declarative/visual/webview/javascript/data/windowObjects.0.png
new file mode 100644
index 0000000000..b5c35d2109
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/data/windowObjects.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/javascript/data/windowObjects.1.png b/tests/auto/declarative/visual/webview/javascript/data/windowObjects.1.png
new file mode 100644
index 0000000000..b5c35d2109
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/data/windowObjects.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/javascript/data/windowObjects.2.png b/tests/auto/declarative/visual/webview/javascript/data/windowObjects.2.png
new file mode 100644
index 0000000000..28403c88df
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/data/windowObjects.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/javascript/data/windowObjects.3.png b/tests/auto/declarative/visual/webview/javascript/data/windowObjects.3.png
new file mode 100644
index 0000000000..241b9f8b50
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/data/windowObjects.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/javascript/data/windowObjects.4.png b/tests/auto/declarative/visual/webview/javascript/data/windowObjects.4.png
new file mode 100644
index 0000000000..1877cb2684
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/data/windowObjects.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/javascript/data/windowObjects.qml b/tests/auto/declarative/visual/webview/javascript/data/windowObjects.qml
new file mode 100644
index 0000000000..7fce295a08
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/data/windowObjects.qml
@@ -0,0 +1,2643 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 32
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 48
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 64
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 80
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 96
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 112
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 128
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 144
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 160
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 176
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 192
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 208
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 224
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 240
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 256
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 272
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 288
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 304
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 320
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 336
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 352
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 368
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 384
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 400
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 416
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 432
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 448
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 464
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 480
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 496
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 512
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 528
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 544
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 560
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 576
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 592
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 608
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 624
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 640
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 656
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 672
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 688
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 704
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 720
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 736
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 752
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 768
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 784
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 800
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 816
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 832
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 848
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 864
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 880
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 896
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 912
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 928
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 944
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 960
+ image: "windowObjects.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 992
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1008
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1024
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1040
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 155; y: 9
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 145; y: 23
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1056
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 137; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 127; y: 53
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1072
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 119; y: 67
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 111; y: 77
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1088
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 103; y: 87
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1104
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 97; y: 93
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 91; y: 101
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 87; y: 109
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1120
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 83; y: 117
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 81; y: 125
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1136
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 81; y: 133
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 79; y: 139
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1152
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 79; y: 142
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 79; y: 145
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1168
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 78; y: 146
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 78; y: 147
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1184
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1200
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1216
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1232
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1248
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 82; y: 143
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1264
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1280
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 83; y: 142
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 83; y: 141
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 84; y: 139
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1296
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 85; y: 138
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1312
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1328
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1344
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 86; y: 137
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 87; y: 137
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1360
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 88; y: 137
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1376
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 89; y: 138
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 89; y: 139
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1392
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 90; y: 141
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 90; y: 142
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1408
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 91; y: 144
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1424
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 91; y: 146
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 91; y: 148
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 91; y: 149
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1440
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 91; y: 151
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 91; y: 153
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1456
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 90; y: 154
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 90; y: 155
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1472
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 89; y: 156
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1488
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1504
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1520
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1536
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1552
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1568
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1584
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1600
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1616
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1632
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1648
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1664
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1680
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1696
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1712
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1728
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1744
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1760
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1776
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1792
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1808
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1824
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1840
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1856
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1872
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1888
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1904
+ hash: "b1a19797afefa71e30f4594064aa4951"
+ }
+ Frame {
+ msec: 1920
+ image: "windowObjects.1.png"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 89; y: 156
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1936
+ hash: "fca76207a4fa6f2c4bb01d28aa018f0c"
+ }
+ Frame {
+ msec: 1952
+ hash: "fca76207a4fa6f2c4bb01d28aa018f0c"
+ }
+ Frame {
+ msec: 1968
+ hash: "fca76207a4fa6f2c4bb01d28aa018f0c"
+ }
+ Frame {
+ msec: 1984
+ hash: "fca76207a4fa6f2c4bb01d28aa018f0c"
+ }
+ Frame {
+ msec: 2000
+ hash: "fca76207a4fa6f2c4bb01d28aa018f0c"
+ }
+ Frame {
+ msec: 2016
+ hash: "fca76207a4fa6f2c4bb01d28aa018f0c"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 89; y: 156
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2032
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2048
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2064
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2080
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2096
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2112
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2128
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2144
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2160
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2176
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2192
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2208
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2224
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2240
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2256
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2272
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2288
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 89; y: 157
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 88; y: 158
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 87; y: 160
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2304
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 87; y: 161
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 83; y: 167
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2320
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 82; y: 169
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 80; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2336
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 78; y: 183
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 74; y: 189
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2352
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 72; y: 195
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 68; y: 201
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2368
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 64; y: 207
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 62; y: 213
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2384
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 61; y: 215
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 59; y: 221
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2400
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 58; y: 222
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 57; y: 224
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2416
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2432
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2448
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2464
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2480
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2496
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2512
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2528
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2544
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2560
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2576
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2592
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2608
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2624
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2640
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2656
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2672
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2688
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2704
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2720
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2736
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 49; y: 225
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 50; y: 224
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2752
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 50; y: 223
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2768
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 51; y: 222
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2784
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 51; y: 221
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 52; y: 220
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2800
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 52; y: 218
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2816
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 53; y: 217
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2832
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2848
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2864
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 54; y: 216
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2880
+ image: "windowObjects.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 55; y: 215
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2912
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2928
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 56; y: 214
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2944
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2960
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 2976
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 57; y: 214
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 57; y: 214
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2992
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 3008
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 3024
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 3040
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 3056
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 3072
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 3088
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 3104
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 57; y: 214
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3120
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 3136
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 3152
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 3168
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 3184
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 3200
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 3216
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Frame {
+ msec: 3232
+ hash: "6927f81ca01ef75d204994aa82c60c4d"
+ }
+ Key {
+ type: 6
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3248
+ hash: "2165224e8f66a797ae5c991462fb56d8"
+ }
+ Frame {
+ msec: 3264
+ hash: "2165224e8f66a797ae5c991462fb56d8"
+ }
+ Frame {
+ msec: 3280
+ hash: "2165224e8f66a797ae5c991462fb56d8"
+ }
+ Frame {
+ msec: 3296
+ hash: "2165224e8f66a797ae5c991462fb56d8"
+ }
+ Key {
+ type: 7
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3312
+ hash: "2165224e8f66a797ae5c991462fb56d8"
+ }
+ Frame {
+ msec: 3328
+ hash: "2165224e8f66a797ae5c991462fb56d8"
+ }
+ Frame {
+ msec: 3344
+ hash: "2165224e8f66a797ae5c991462fb56d8"
+ }
+ Frame {
+ msec: 3360
+ hash: "2165224e8f66a797ae5c991462fb56d8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 57; y: 212
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3376
+ hash: "2165224e8f66a797ae5c991462fb56d8"
+ }
+ Frame {
+ msec: 3392
+ hash: "2165224e8f66a797ae5c991462fb56d8"
+ }
+ Frame {
+ msec: 3408
+ hash: "2165224e8f66a797ae5c991462fb56d8"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 57; y: 211
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3424
+ hash: "2165224e8f66a797ae5c991462fb56d8"
+ }
+ Key {
+ type: 6
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3440
+ hash: "c6ac7e0be8b7b2a80966344389def97a"
+ }
+ Frame {
+ msec: 3456
+ hash: "c6ac7e0be8b7b2a80966344389def97a"
+ }
+ Frame {
+ msec: 3472
+ hash: "c6ac7e0be8b7b2a80966344389def97a"
+ }
+ Frame {
+ msec: 3488
+ hash: "40f333072bb9f1d334d5ae432d9641b9"
+ }
+ Frame {
+ msec: 3504
+ hash: "40f333072bb9f1d334d5ae432d9641b9"
+ }
+ Key {
+ type: 7
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3520
+ hash: "40f333072bb9f1d334d5ae432d9641b9"
+ }
+ Frame {
+ msec: 3536
+ hash: "40f333072bb9f1d334d5ae432d9641b9"
+ }
+ Frame {
+ msec: 3552
+ hash: "40f333072bb9f1d334d5ae432d9641b9"
+ }
+ Frame {
+ msec: 3568
+ hash: "40f333072bb9f1d334d5ae432d9641b9"
+ }
+ Frame {
+ msec: 3584
+ hash: "40f333072bb9f1d334d5ae432d9641b9"
+ }
+ Frame {
+ msec: 3600
+ hash: "40f333072bb9f1d334d5ae432d9641b9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 58; y: 210
+ modifiers: 0
+ sendToViewport: true
+ }
+ Key {
+ type: 6
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3616
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 60; y: 209
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 61; y: 207
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3632
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 62; y: 205
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3648
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 62; y: 204
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 63; y: 203
+ modifiers: 0
+ sendToViewport: true
+ }
+ Key {
+ type: 7
+ key: 83
+ modifiers: 0
+ text: "73"
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3664
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 63; y: 202
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 64; y: 200
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3680
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Frame {
+ msec: 3696
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 65; y: 198
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 66; y: 197
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 67; y: 195
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3712
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 68; y: 194
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 69; y: 192
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3728
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 70; y: 190
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 70; y: 188
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3744
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 70; y: 186
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 70; y: 185
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3760
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 71; y: 183
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 71; y: 181
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3776
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 72; y: 179
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 73; y: 178
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3792
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 73; y: 176
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 73; y: 175
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3808
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 74; y: 174
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 74; y: 173
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3824
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 74; y: 172
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3840
+ image: "windowObjects.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Frame {
+ msec: 3872
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Frame {
+ msec: 3888
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Frame {
+ msec: 3904
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Frame {
+ msec: 3920
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 75; y: 171
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 76; y: 171
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3936
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Frame {
+ msec: 3952
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Frame {
+ msec: 3968
+ hash: "96f727ef0dacfda9ea77fb5651493030"
+ }
+ Frame {
+ msec: 3984
+ hash: "ed7b3d93d690df73be5cbee8c41a1931"
+ }
+ Frame {
+ msec: 4000
+ hash: "ed7b3d93d690df73be5cbee8c41a1931"
+ }
+ Frame {
+ msec: 4016
+ hash: "ed7b3d93d690df73be5cbee8c41a1931"
+ }
+ Frame {
+ msec: 4032
+ hash: "ed7b3d93d690df73be5cbee8c41a1931"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 76; y: 170
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4048
+ hash: "ed7b3d93d690df73be5cbee8c41a1931"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 77; y: 169
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 78; y: 168
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4064
+ hash: "ed7b3d93d690df73be5cbee8c41a1931"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 79; y: 168
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4080
+ hash: "ed7b3d93d690df73be5cbee8c41a1931"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 81; y: 167
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 81; y: 166
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4096
+ hash: "ed7b3d93d690df73be5cbee8c41a1931"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 82; y: 165
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4112
+ hash: "ed7b3d93d690df73be5cbee8c41a1931"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 83; y: 164
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4128
+ hash: "ed7b3d93d690df73be5cbee8c41a1931"
+ }
+ Frame {
+ msec: 4144
+ hash: "ed7b3d93d690df73be5cbee8c41a1931"
+ }
+ Frame {
+ msec: 4160
+ hash: "ed7b3d93d690df73be5cbee8c41a1931"
+ }
+ Frame {
+ msec: 4176
+ hash: "ed7b3d93d690df73be5cbee8c41a1931"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 83; y: 164
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4192
+ hash: "5b3505be865f704640e81cea092d35ba"
+ }
+ Frame {
+ msec: 4208
+ hash: "5b3505be865f704640e81cea092d35ba"
+ }
+ Frame {
+ msec: 4224
+ hash: "5b3505be865f704640e81cea092d35ba"
+ }
+ Frame {
+ msec: 4240
+ hash: "5b3505be865f704640e81cea092d35ba"
+ }
+ Frame {
+ msec: 4256
+ hash: "5b3505be865f704640e81cea092d35ba"
+ }
+ Frame {
+ msec: 4272
+ hash: "5b3505be865f704640e81cea092d35ba"
+ }
+ Frame {
+ msec: 4288
+ hash: "5b3505be865f704640e81cea092d35ba"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 83; y: 164
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4304
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4320
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4336
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4352
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4368
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4384
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4400
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4416
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4432
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4448
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4464
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 85; y: 158
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 85; y: 156
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4480
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 86; y: 154
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 86; y: 152
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4496
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 87; y: 150
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 89; y: 144
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4512
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 93; y: 138
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 99; y: 134
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4528
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 101; y: 128
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 105; y: 122
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4544
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 109; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 113; y: 108
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4560
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 114; y: 106
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 114; y: 105
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4576
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 115; y: 104
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 115; y: 102
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4592
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 115; y: 100
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 116; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4608
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 120; y: 92
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 122; y: 86
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4624
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 126; y: 76
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 130; y: 66
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4640
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 132; y: 56
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 134; y: 46
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4656
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 136; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 138; y: 30
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4672
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 140; y: 22
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 141; y: 20
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4688
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 143; y: 14
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 144; y: 12
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4704
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 144; y: 11
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 144; y: 9
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4720
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 144; y: 7
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 144; y: 6
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4736
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 143; y: 4
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 143; y: 2
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4752
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 143; y: 1
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 4768
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4784
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4800
+ image: "windowObjects.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4832
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4848
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4864
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4880
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4896
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4912
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4928
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4944
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4960
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4976
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 4992
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5008
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5024
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5040
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5056
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5072
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5088
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5104
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5120
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5136
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5152
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5168
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5184
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5200
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5216
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5232
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5248
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5264
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5280
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5296
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5312
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5328
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5344
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5360
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5376
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5392
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5408
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5424
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5440
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5456
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5472
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5488
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5504
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5520
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5536
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5552
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5568
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+ Frame {
+ msec: 5584
+ hash: "cb5a42e7ab70e05a8bbecabb587f9e5e"
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/javascript/evaluateJavaScript.qml b/tests/auto/declarative/visual/webview/javascript/evaluateJavaScript.qml
new file mode 100644
index 0000000000..6c013827ab
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/evaluateJavaScript.qml
@@ -0,0 +1,32 @@
+import Qt 4.6
+import org.webkit 1.0
+
+Column {
+ WebView {
+ id: webview
+ width: 200
+ height: 200
+ url: "test-objects.html"
+ javaScriptWindowObjects:
+ QtObject {
+ property string text: btntext.text
+ WebView.windowObjectName: "qmltext"
+ onTextChanged: {
+ webview.evaluateJavaScript("{document.getElementById('button').value=window.qmltext.text}")
+ }
+ }
+ }
+ Row {
+ Text { text: "Input:" }
+ Rectangle {
+ width: btntext.width+10
+ height: btntext.height+10
+ border.color: "black"
+ TextInput {
+ id: btntext
+ text: "Blah"
+ cursorDelegate: Rectangle { width: 1; color: "red" }
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/javascript/test-objects.html b/tests/auto/declarative/visual/webview/javascript/test-objects.html
new file mode 100644
index 0000000000..ed7d2ea4f3
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/test-objects.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+</head>
+<body>
+<h1>Boring Document</h1>
+<p>
+This is a boring document.
+It gets the text on this button:
+<input id=button type=button value="click me"
+ onClick="{document.getElementById('button').value=window.qmltext.text}">
+from QML.
+<p>
diff --git a/tests/auto/declarative/visual/webview/javascript/windowObjects.qml b/tests/auto/declarative/visual/webview/javascript/windowObjects.qml
new file mode 100644
index 0000000000..8c52aff756
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/javascript/windowObjects.qml
@@ -0,0 +1,27 @@
+import Qt 4.6
+import org.webkit 1.0
+
+Column {
+ WebView {
+ width: 200
+ height: 200
+ url: "test-objects.html"
+ javaScriptWindowObjects:
+ QtObject {
+ property string text: btntext.text
+ WebView.windowObjectName: "qmltext"
+ }
+ }
+ Row {
+ Text { text: "Input:" }
+ Rectangle {
+ width: btntext.width+10
+ height: btntext.height+10
+ border.color: "black"
+ TextInput {
+ id: btntext
+ text: "Blah"
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/settings/data/fontFamily.0.png b/tests/auto/declarative/visual/webview/settings/data/fontFamily.0.png
new file mode 100644
index 0000000000..7721e75533
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/settings/data/fontFamily.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/settings/data/fontFamily.qml b/tests/auto/declarative/visual/webview/settings/data/fontFamily.qml
new file mode 100644
index 0000000000..195c3bad07
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/settings/data/fontFamily.qml
@@ -0,0 +1,395 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 32
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 48
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 64
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 80
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 96
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 112
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 128
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 144
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 160
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 176
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 192
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 208
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 224
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 240
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 256
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 272
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 288
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 304
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 320
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 336
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 352
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 368
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 384
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 400
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 416
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 432
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 448
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 464
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 480
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 496
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 512
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 528
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 544
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 560
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 576
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 592
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 608
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 624
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 640
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 656
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 672
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 688
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 196; y: 25
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 194; y: 19
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 190; y: 13
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 704
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 720
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 736
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 752
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 768
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 784
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 800
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 816
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 832
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 848
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 864
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 880
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 896
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 912
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 928
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 944
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 960
+ image: "fontFamily.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 992
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1008
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1024
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1040
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1056
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1072
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1088
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1104
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1120
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1136
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1152
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1168
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1184
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1200
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1216
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1232
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1248
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1264
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1280
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1296
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1312
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1328
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1344
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1360
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1376
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1392
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1408
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1424
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1440
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+ Frame {
+ msec: 1456
+ hash: "5d66fdee6a0a96bb24e89244f02eacc9"
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/settings/data/fontSize.0.png b/tests/auto/declarative/visual/webview/settings/data/fontSize.0.png
new file mode 100644
index 0000000000..95196a1b59
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/settings/data/fontSize.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/settings/data/fontSize.qml b/tests/auto/declarative/visual/webview/settings/data/fontSize.qml
new file mode 100644
index 0000000000..438ffa5660
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/settings/data/fontSize.qml
@@ -0,0 +1,339 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 32
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 48
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 64
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 80
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 96
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 112
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 128
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 144
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 160
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 176
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 192
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 208
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 224
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 240
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 256
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 272
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 288
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 304
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 320
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 336
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 352
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 368
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 384
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 400
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 416
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 432
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 448
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 464
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 480
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 496
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 512
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 528
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 544
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 560
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 576
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 592
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 608
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 624
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 640
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 656
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 672
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 688
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 704
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 720
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 736
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 752
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 768
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 784
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 800
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 816
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 832
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 848
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 864
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 880
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 896
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 912
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 928
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 944
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 960
+ image: "fontSize.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 992
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1008
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1024
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1040
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1056
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1072
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1088
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1104
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1120
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1136
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1152
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1168
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1184
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1200
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1216
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1232
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1248
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1264
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1280
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1296
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1312
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+ Frame {
+ msec: 1328
+ hash: "962e77f522956d38f3b1b890df749f0a"
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/settings/data/noAutoLoadImages.0.png b/tests/auto/declarative/visual/webview/settings/data/noAutoLoadImages.0.png
new file mode 100644
index 0000000000..48920a23c5
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/settings/data/noAutoLoadImages.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/settings/data/noAutoLoadImages.1.png b/tests/auto/declarative/visual/webview/settings/data/noAutoLoadImages.1.png
new file mode 100644
index 0000000000..48920a23c5
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/settings/data/noAutoLoadImages.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/settings/data/noAutoLoadImages.qml b/tests/auto/declarative/visual/webview/settings/data/noAutoLoadImages.qml
new file mode 100644
index 0000000000..ead5c3b2e4
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/settings/data/noAutoLoadImages.qml
@@ -0,0 +1,595 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 32
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 48
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 64
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 80
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 96
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 112
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 128
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 144
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 160
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 176
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 192
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 208
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 224
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 240
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 256
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 272
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 288
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 304
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 320
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 336
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 352
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 368
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 384
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 400
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 416
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 432
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 448
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 464
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 480
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 496
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 512
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 528
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 544
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 560
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 576
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 592
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 608
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 624
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 640
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 656
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 672
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 688
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 704
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 720
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 736
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 752
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 768
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 784
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 800
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 816
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 832
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 848
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 864
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 880
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 896
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 912
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 928
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 944
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 960
+ image: "noAutoLoadImages.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 992
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1008
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1024
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1040
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1056
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1072
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1088
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1104
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1120
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1136
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1152
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1168
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1184
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1200
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1216
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1232
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1248
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1264
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1280
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1296
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1312
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1328
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1344
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1360
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1376
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1392
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1408
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1424
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1440
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1456
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1472
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1488
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1504
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1520
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1536
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1552
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1568
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1584
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1600
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1616
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1632
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1648
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1664
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1680
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1696
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1712
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1728
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1744
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1760
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1776
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1792
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1808
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1824
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1840
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1856
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1872
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1888
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1904
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1920
+ image: "noAutoLoadImages.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1952
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1968
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 1984
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2000
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2016
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2032
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2048
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2064
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2080
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2096
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2112
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2128
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2144
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2160
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2176
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2192
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2208
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2224
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2240
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2256
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2272
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2288
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2304
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2320
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2336
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+ Frame {
+ msec: 2352
+ hash: "5146cfbeefc51268eca7717d84775750"
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/settings/data/setFontFamily.0.png b/tests/auto/declarative/visual/webview/settings/data/setFontFamily.0.png
new file mode 100644
index 0000000000..f3c621af99
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/settings/data/setFontFamily.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/settings/data/setFontFamily.qml b/tests/auto/declarative/visual/webview/settings/data/setFontFamily.qml
new file mode 100644
index 0000000000..cf74d42f88
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/settings/data/setFontFamily.qml
@@ -0,0 +1,351 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 32
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 48
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 64
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 80
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 96
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 112
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 128
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 144
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 160
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 176
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 192
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 208
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 224
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 240
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 256
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 272
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 288
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 304
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 320
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 336
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 352
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 368
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 384
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 400
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 416
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 432
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 448
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 464
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 480
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 496
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 512
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 528
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 544
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 560
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 576
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 592
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 608
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 624
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 640
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 656
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 672
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 688
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 704
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 720
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 736
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 752
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 768
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 784
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 800
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 816
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 832
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 848
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 864
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 880
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 896
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 912
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 928
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 944
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 960
+ image: "setFontFamily.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 992
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1008
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1024
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1040
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1056
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1072
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1088
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1104
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1120
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1136
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1152
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1168
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1184
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1200
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1216
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1232
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1248
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1264
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1280
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1296
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1312
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1328
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1344
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1360
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+ Frame {
+ msec: 1376
+ hash: "7ef8bb83c146898bd75de8951a932b58"
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/settings/fontFamily.qml b/tests/auto/declarative/visual/webview/settings/fontFamily.qml
new file mode 100644
index 0000000000..f547b0edb0
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/settings/fontFamily.qml
@@ -0,0 +1,17 @@
+import Qt 4.6
+import org.webkit 1.0
+
+WebView {
+ id: web
+ width: 200
+ height: 200
+ Column {
+ anchors.fill: parent
+ Text { text: "standard: " + web.settings.standardFontFamily }
+ Text { text: "fixed: " + web.settings.fixedFontFamily }
+ Text { text: "serif: " + web.settings.serifFontFamily }
+ Text { text: "sansserif: " + web.settings.sansSerifFontFamily }
+ Text { text: "cursive: " + web.settings.cursiveFontFamily }
+ Text { text: "fantasy: " + web.settings.fantasyFontFamily }
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/settings/fontSize.qml b/tests/auto/declarative/visual/webview/settings/fontSize.qml
new file mode 100644
index 0000000000..7eaa96b971
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/settings/fontSize.qml
@@ -0,0 +1,71 @@
+import Qt 4.6
+import org.webkit 1.0
+
+Grid {
+ columns: 3
+ Rectangle {
+ Text { color: "green"; text: "Normal" }
+ border.color: "black"
+ width: 200
+ height: 200
+ WebView {
+ anchors.fill: parent
+ url: "test.html"
+ }
+ }
+ Rectangle {
+ Text { color: "green"; text: "Big" }
+ border.color: "black"
+ width: 200
+ height: 200
+ WebView {
+ anchors.fill: parent
+ url: "test.html"
+ settings.minimumFontSize: 20
+ }
+ }
+ Rectangle {
+ Text { color: "green"; text: "Big (logical)" }
+ border.color: "black"
+ width: 200
+ height: 200
+ WebView {
+ anchors.fill: parent
+ url: "test.html"
+ settings.minimumLogicalFontSize: 20
+ }
+ }
+ Rectangle {
+ Text { color: "green"; text: "Bigger" }
+ border.color: "black"
+ width: 200
+ height: 200
+ WebView {
+ anchors.fill: parent
+ url: "test.html"
+ settings.minimumFontSize: 30
+ }
+ }
+ Rectangle {
+ Text { color: "green"; text: "Small (except fixed)" }
+ border.color: "black"
+ width: 200
+ height: 200
+ WebView {
+ anchors.fill: parent
+ url: "test.html"
+ settings.defaultFontSize: 8
+ }
+ }
+ Rectangle {
+ Text { color: "green"; text: "Small fixed" }
+ border.color: "black"
+ width: 200
+ height: 200
+ WebView {
+ anchors.fill: parent
+ url: "test.html"
+ settings.defaultFixedFontSize: 8
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/settings/noAutoLoadImages.qml b/tests/auto/declarative/visual/webview/settings/noAutoLoadImages.qml
new file mode 100644
index 0000000000..67f163390b
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/settings/noAutoLoadImages.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+import org.webkit 1.0
+
+Grid {
+ columns: 2
+ Rectangle {
+ Text { id: label; x:10; y:170; color: "green"; text: "No image" }
+ border.color: "black"
+ width: 200
+ height: 200
+ WebView {
+ anchors.fill: parent
+ settings.autoLoadImages: false
+ url: "test-img.html"
+ MouseArea {
+ anchors.fill: parent
+ onClicked: { parent.settings.autoLoadImages=true; label.text=""; parent.reload.trigger() }
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/settings/qtlogo.png b/tests/auto/declarative/visual/webview/settings/qtlogo.png
new file mode 100644
index 0000000000..399bd0b1d9
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/settings/qtlogo.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/settings/setFontFamily.qml b/tests/auto/declarative/visual/webview/settings/setFontFamily.qml
new file mode 100644
index 0000000000..823469ff8f
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/settings/setFontFamily.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+import org.webkit 1.0
+
+WebView {
+ url: "test.html"
+ width: 300
+ height: 300
+ settings.standardFontFamily: font.name
+ // WebKit doesn't seem to honour any other FontFamily settings
+ FontLoader { id: font; source: "tarzeau_ocr_a.ttf" }
+}
diff --git a/tests/auto/declarative/visual/webview/settings/tarzeau_ocr_a.ttf b/tests/auto/declarative/visual/webview/settings/tarzeau_ocr_a.ttf
new file mode 100644
index 0000000000..cf93f9651f
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/settings/tarzeau_ocr_a.ttf
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/settings/test-img.html b/tests/auto/declarative/visual/webview/settings/test-img.html
new file mode 100644
index 0000000000..cdd63ace5b
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/settings/test-img.html
@@ -0,0 +1,6 @@
+<html>
+<body>
+<h1>Boring Document</h1>
+<p>
+This is a boring document.
+With a picture: <img src="qtlogo.png">
diff --git a/tests/auto/declarative/visual/webview/settings/test.html b/tests/auto/declarative/visual/webview/settings/test.html
new file mode 100644
index 0000000000..3265e205fc
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/settings/test.html
@@ -0,0 +1,9 @@
+<html>
+<body>
+<h1>Boring Document</h1>
+<p>
+This is a boring document.
+</p>
+<i>This is italic.</i>
+<b>This is bold.</b>
+<tt>This is fixed.</tt>
diff --git a/tests/auto/declarative/visual/webview/zooming/data/pageWidth.qml b/tests/auto/declarative/visual/webview/zooming/data/pageWidth.qml
new file mode 100644
index 0000000000..1a993e10ac
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/data/pageWidth.qml
@@ -0,0 +1,227 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 32
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 48
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 64
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 80
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 96
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 112
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 128
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 144
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 160
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 176
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 192
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 208
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 224
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 240
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 256
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 272
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 288
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 304
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 320
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 336
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 352
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 368
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 384
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 400
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 416
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 432
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 448
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 464
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 480
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 496
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 512
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 528
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 544
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 560
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 576
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 592
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 608
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 624
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 640
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 656
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 672
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 688
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 704
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 720
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 736
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 752
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 768
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 784
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 800
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 816
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 832
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 848
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 864
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+ Frame {
+ msec: 880
+ hash: "9a2554b1b322ea71115fa91d0100d2ff"
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/zooming/data/renderControl.0.png b/tests/auto/declarative/visual/webview/zooming/data/renderControl.0.png
new file mode 100644
index 0000000000..38df70e1a5
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/data/renderControl.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/zooming/data/renderControl.qml b/tests/auto/declarative/visual/webview/zooming/data/renderControl.qml
new file mode 100644
index 0000000000..d3c5890af1
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/data/renderControl.qml
@@ -0,0 +1,415 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "4f999826cd5ebe4f58bfd255e1c22be0"
+ }
+ Frame {
+ msec: 32
+ hash: "3aa9bd1bd75219f82578689ac6d81c7e"
+ }
+ Frame {
+ msec: 48
+ hash: "19d5f48f1c73d52483be96c887d3fd76"
+ }
+ Frame {
+ msec: 64
+ hash: "9b85eef4e0746cc43aaefd442efdd824"
+ }
+ Frame {
+ msec: 80
+ hash: "fca0034fb720e40198ede95a0ab0fadb"
+ }
+ Frame {
+ msec: 96
+ hash: "9f63ddbd927a4b08242f3410a9ed7283"
+ }
+ Frame {
+ msec: 112
+ hash: "4f5804c3c3ee195470a462293307cfd5"
+ }
+ Frame {
+ msec: 128
+ hash: "d0434f08a8097b97b76c1194317a38ba"
+ }
+ Frame {
+ msec: 144
+ hash: "921880d300e56f9605923a13fcd8b967"
+ }
+ Frame {
+ msec: 160
+ hash: "f5dc87abf36332c68fd4450a6236dcb4"
+ }
+ Frame {
+ msec: 176
+ hash: "c54f220cd5768afa1c12579007e17eff"
+ }
+ Frame {
+ msec: 192
+ hash: "e1c70c3896d5a937296f205b09991b31"
+ }
+ Frame {
+ msec: 208
+ hash: "d135f70f761add1358062a0386c62d18"
+ }
+ Frame {
+ msec: 224
+ hash: "53cb2ed2b65e77cf0cd70530f32854ad"
+ }
+ Frame {
+ msec: 240
+ hash: "2ff4feb61d958a800b38b282c3400293"
+ }
+ Frame {
+ msec: 256
+ hash: "59f5585ec472efa29c5eba8b972ab3bd"
+ }
+ Frame {
+ msec: 272
+ hash: "3aef5e1ff6da15e0e9f2e620dbabbab2"
+ }
+ Frame {
+ msec: 288
+ hash: "2931299f667752efe9fca727534385e1"
+ }
+ Frame {
+ msec: 304
+ hash: "2ed90e61c41b994ccea924191b66fc71"
+ }
+ Frame {
+ msec: 320
+ hash: "1424c634067c896973c2c10793957933"
+ }
+ Frame {
+ msec: 336
+ hash: "c4d30d511053a7caeefdae753236cf5b"
+ }
+ Frame {
+ msec: 352
+ hash: "32300e07e34e8f316770c790a5ef9f6d"
+ }
+ Frame {
+ msec: 368
+ hash: "95312dc2a4d88a48605fea170712354d"
+ }
+ Frame {
+ msec: 384
+ hash: "3d146357d1532640cefb64fbae75bc0d"
+ }
+ Frame {
+ msec: 400
+ hash: "5b78740511a456a3647d8392b2008f7f"
+ }
+ Frame {
+ msec: 416
+ hash: "dddb065cefa27a862d108429c9984191"
+ }
+ Frame {
+ msec: 432
+ hash: "0857067a0ee381e0f462ef8aceb0b696"
+ }
+ Frame {
+ msec: 448
+ hash: "1f5e7e064cc62ff2e0585c98875351df"
+ }
+ Frame {
+ msec: 464
+ hash: "c7f6bb852bdb2b99cbb5a8ca34f1585a"
+ }
+ Frame {
+ msec: 480
+ hash: "f2284dea5812f167cae08c687fc1a3e9"
+ }
+ Frame {
+ msec: 496
+ hash: "deec54bc32c46921e5032bce7daa1dad"
+ }
+ Frame {
+ msec: 512
+ hash: "1271d3704de17bfe463c76fd73c3132b"
+ }
+ Frame {
+ msec: 528
+ hash: "0568b0ecd47cd1c34b9de477e68e5751"
+ }
+ Frame {
+ msec: 544
+ hash: "f070dd88e42697a9e43573f9f41b3540"
+ }
+ Frame {
+ msec: 560
+ hash: "f5ced2827b06ea514f05866f1e4099f0"
+ }
+ Frame {
+ msec: 576
+ hash: "59f5585ec472efa29c5eba8b972ab3bd"
+ }
+ Frame {
+ msec: 592
+ hash: "2ff4feb61d958a800b38b282c3400293"
+ }
+ Frame {
+ msec: 608
+ hash: "53cb2ed2b65e77cf0cd70530f32854ad"
+ }
+ Frame {
+ msec: 624
+ hash: "d135f70f761add1358062a0386c62d18"
+ }
+ Frame {
+ msec: 640
+ hash: "e1c70c3896d5a937296f205b09991b31"
+ }
+ Frame {
+ msec: 656
+ hash: "c54f220cd5768afa1c12579007e17eff"
+ }
+ Frame {
+ msec: 672
+ hash: "f5dc87abf36332c68fd4450a6236dcb4"
+ }
+ Frame {
+ msec: 688
+ hash: "921880d300e56f9605923a13fcd8b967"
+ }
+ Frame {
+ msec: 704
+ hash: "d0434f08a8097b97b76c1194317a38ba"
+ }
+ Frame {
+ msec: 720
+ hash: "4f5804c3c3ee195470a462293307cfd5"
+ }
+ Frame {
+ msec: 736
+ hash: "9f63ddbd927a4b08242f3410a9ed7283"
+ }
+ Frame {
+ msec: 752
+ hash: "fca0034fb720e40198ede95a0ab0fadb"
+ }
+ Frame {
+ msec: 768
+ hash: "9b85eef4e0746cc43aaefd442efdd824"
+ }
+ Frame {
+ msec: 784
+ hash: "19d5f48f1c73d52483be96c887d3fd76"
+ }
+ Frame {
+ msec: 800
+ hash: "3aa9bd1bd75219f82578689ac6d81c7e"
+ }
+ Frame {
+ msec: 816
+ hash: "4f999826cd5ebe4f58bfd255e1c22be0"
+ }
+ Frame {
+ msec: 832
+ hash: "3aa9bd1bd75219f82578689ac6d81c7e"
+ }
+ Frame {
+ msec: 848
+ hash: "19d5f48f1c73d52483be96c887d3fd76"
+ }
+ Frame {
+ msec: 864
+ hash: "9b85eef4e0746cc43aaefd442efdd824"
+ }
+ Frame {
+ msec: 880
+ hash: "fca0034fb720e40198ede95a0ab0fadb"
+ }
+ Frame {
+ msec: 896
+ hash: "9f63ddbd927a4b08242f3410a9ed7283"
+ }
+ Frame {
+ msec: 912
+ hash: "4f5804c3c3ee195470a462293307cfd5"
+ }
+ Frame {
+ msec: 928
+ hash: "d0434f08a8097b97b76c1194317a38ba"
+ }
+ Frame {
+ msec: 944
+ hash: "921880d300e56f9605923a13fcd8b967"
+ }
+ Frame {
+ msec: 960
+ image: "renderControl.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "c54f220cd5768afa1c12579007e17eff"
+ }
+ Frame {
+ msec: 992
+ hash: "e1c70c3896d5a937296f205b09991b31"
+ }
+ Frame {
+ msec: 1008
+ hash: "d135f70f761add1358062a0386c62d18"
+ }
+ Frame {
+ msec: 1024
+ hash: "53cb2ed2b65e77cf0cd70530f32854ad"
+ }
+ Frame {
+ msec: 1040
+ hash: "2ff4feb61d958a800b38b282c3400293"
+ }
+ Frame {
+ msec: 1056
+ hash: "59f5585ec472efa29c5eba8b972ab3bd"
+ }
+ Frame {
+ msec: 1072
+ hash: "3aef5e1ff6da15e0e9f2e620dbabbab2"
+ }
+ Frame {
+ msec: 1088
+ hash: "2931299f667752efe9fca727534385e1"
+ }
+ Frame {
+ msec: 1104
+ hash: "2ed90e61c41b994ccea924191b66fc71"
+ }
+ Frame {
+ msec: 1120
+ hash: "1424c634067c896973c2c10793957933"
+ }
+ Frame {
+ msec: 1136
+ hash: "c4d30d511053a7caeefdae753236cf5b"
+ }
+ Frame {
+ msec: 1152
+ hash: "32300e07e34e8f316770c790a5ef9f6d"
+ }
+ Frame {
+ msec: 1168
+ hash: "95312dc2a4d88a48605fea170712354d"
+ }
+ Frame {
+ msec: 1184
+ hash: "3d146357d1532640cefb64fbae75bc0d"
+ }
+ Frame {
+ msec: 1200
+ hash: "5b78740511a456a3647d8392b2008f7f"
+ }
+ Frame {
+ msec: 1216
+ hash: "dddb065cefa27a862d108429c9984191"
+ }
+ Frame {
+ msec: 1232
+ hash: "0857067a0ee381e0f462ef8aceb0b696"
+ }
+ Frame {
+ msec: 1248
+ hash: "1f5e7e064cc62ff2e0585c98875351df"
+ }
+ Frame {
+ msec: 1264
+ hash: "c7f6bb852bdb2b99cbb5a8ca34f1585a"
+ }
+ Frame {
+ msec: 1280
+ hash: "f2284dea5812f167cae08c687fc1a3e9"
+ }
+ Frame {
+ msec: 1296
+ hash: "deec54bc32c46921e5032bce7daa1dad"
+ }
+ Frame {
+ msec: 1312
+ hash: "1271d3704de17bfe463c76fd73c3132b"
+ }
+ Frame {
+ msec: 1328
+ hash: "0568b0ecd47cd1c34b9de477e68e5751"
+ }
+ Frame {
+ msec: 1344
+ hash: "f070dd88e42697a9e43573f9f41b3540"
+ }
+ Frame {
+ msec: 1360
+ hash: "f5ced2827b06ea514f05866f1e4099f0"
+ }
+ Frame {
+ msec: 1376
+ hash: "59f5585ec472efa29c5eba8b972ab3bd"
+ }
+ Frame {
+ msec: 1392
+ hash: "2ff4feb61d958a800b38b282c3400293"
+ }
+ Frame {
+ msec: 1408
+ hash: "53cb2ed2b65e77cf0cd70530f32854ad"
+ }
+ Frame {
+ msec: 1424
+ hash: "d135f70f761add1358062a0386c62d18"
+ }
+ Frame {
+ msec: 1440
+ hash: "e1c70c3896d5a937296f205b09991b31"
+ }
+ Frame {
+ msec: 1456
+ hash: "c54f220cd5768afa1c12579007e17eff"
+ }
+ Frame {
+ msec: 1472
+ hash: "f5dc87abf36332c68fd4450a6236dcb4"
+ }
+ Frame {
+ msec: 1488
+ hash: "921880d300e56f9605923a13fcd8b967"
+ }
+ Frame {
+ msec: 1504
+ hash: "d0434f08a8097b97b76c1194317a38ba"
+ }
+ Frame {
+ msec: 1520
+ hash: "4f5804c3c3ee195470a462293307cfd5"
+ }
+ Frame {
+ msec: 1536
+ hash: "9f63ddbd927a4b08242f3410a9ed7283"
+ }
+ Frame {
+ msec: 1552
+ hash: "fca0034fb720e40198ede95a0ab0fadb"
+ }
+ Frame {
+ msec: 1568
+ hash: "9b85eef4e0746cc43aaefd442efdd824"
+ }
+ Frame {
+ msec: 1584
+ hash: "19d5f48f1c73d52483be96c887d3fd76"
+ }
+ Frame {
+ msec: 1600
+ hash: "3aa9bd1bd75219f82578689ac6d81c7e"
+ }
+ Frame {
+ msec: 1616
+ hash: "4f999826cd5ebe4f58bfd255e1c22be0"
+ }
+ Frame {
+ msec: 1632
+ hash: "3aa9bd1bd75219f82578689ac6d81c7e"
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/zooming/data/resolution.0.png b/tests/auto/declarative/visual/webview/zooming/data/resolution.0.png
new file mode 100644
index 0000000000..7e989c62e7
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/data/resolution.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/zooming/data/resolution.1.png b/tests/auto/declarative/visual/webview/zooming/data/resolution.1.png
new file mode 100644
index 0000000000..60ccc0b5e2
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/data/resolution.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/zooming/data/resolution.2.png b/tests/auto/declarative/visual/webview/zooming/data/resolution.2.png
new file mode 100644
index 0000000000..6c22494b08
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/data/resolution.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/zooming/data/resolution.3.png b/tests/auto/declarative/visual/webview/zooming/data/resolution.3.png
new file mode 100644
index 0000000000..71dd56fee0
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/data/resolution.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/zooming/data/resolution.4.png b/tests/auto/declarative/visual/webview/zooming/data/resolution.4.png
new file mode 100644
index 0000000000..ce03cb684f
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/data/resolution.4.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/zooming/data/resolution.qml b/tests/auto/declarative/visual/webview/zooming/data/resolution.qml
new file mode 100644
index 0000000000..0a2b8db476
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/data/resolution.qml
@@ -0,0 +1,1319 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "ac1d9c1cc13813b5e94c692a209a4e36"
+ }
+ Frame {
+ msec: 32
+ hash: "1f189a436cf74ae83a03c3bb63c24ec2"
+ }
+ Frame {
+ msec: 48
+ hash: "369f761053d5910e00672aa866f698ba"
+ }
+ Frame {
+ msec: 64
+ hash: "30a191ae899121ae22d10acee6593415"
+ }
+ Frame {
+ msec: 80
+ hash: "7af041898748bb5950643b057ca59eea"
+ }
+ Frame {
+ msec: 96
+ hash: "e0a2ed91e78ff9a994deb9649a8afc16"
+ }
+ Frame {
+ msec: 112
+ hash: "649ad1a3fb57fb088e4e5cfd749bf2e5"
+ }
+ Frame {
+ msec: 128
+ hash: "9053a92e343ebb79bd2831f5ab94a1b5"
+ }
+ Frame {
+ msec: 144
+ hash: "dc78b09e27bbc0a2cfec83436eef4446"
+ }
+ Frame {
+ msec: 160
+ hash: "2aaa3749f93734dd203e1fea91a9f24a"
+ }
+ Frame {
+ msec: 176
+ hash: "8df8dd33eada434231332b81e03430ce"
+ }
+ Frame {
+ msec: 192
+ hash: "b5b1beb4dd4720eaa8b888fbef1ba875"
+ }
+ Frame {
+ msec: 208
+ hash: "e531d33ef14b58ad843a6be6d7cb0961"
+ }
+ Frame {
+ msec: 224
+ hash: "011c0bcca7717b08bc53738718203f7e"
+ }
+ Frame {
+ msec: 240
+ hash: "412a630348aa44d56f36f04982035e36"
+ }
+ Frame {
+ msec: 256
+ hash: "45528cdc62622b6d01e44466cd85bd38"
+ }
+ Frame {
+ msec: 272
+ hash: "0901c99f959d6c10a0b6ea46a282d8fd"
+ }
+ Frame {
+ msec: 288
+ hash: "3f200fca4815d555f22912d9fcdc20ee"
+ }
+ Frame {
+ msec: 304
+ hash: "5e3c58e2f3a57f4ea48f4315d37ed813"
+ }
+ Frame {
+ msec: 320
+ hash: "e8d98ec2d13ef4324feba11be95d0735"
+ }
+ Frame {
+ msec: 336
+ hash: "4f3b79b341b63499a20f1e1e2cd979f9"
+ }
+ Frame {
+ msec: 352
+ hash: "5ddbc3bc10292bec41531e83c0921c59"
+ }
+ Frame {
+ msec: 368
+ hash: "9bc9801e83267689cd2750226f2b08ce"
+ }
+ Frame {
+ msec: 384
+ hash: "f87195f2393914a0bbed9a454de01ff5"
+ }
+ Frame {
+ msec: 400
+ hash: "4e0fd7f45e53a8d44c416eb9235ec877"
+ }
+ Frame {
+ msec: 416
+ hash: "a579d6324fb4bf9ac5ceaba2aa708764"
+ }
+ Frame {
+ msec: 432
+ hash: "b9f3f08168fb55ba01e56e670db565de"
+ }
+ Frame {
+ msec: 448
+ hash: "cbd63ec868578e295a83170f42b23678"
+ }
+ Frame {
+ msec: 464
+ hash: "2ed9d0e09b61dee8b2703e580007d7a5"
+ }
+ Frame {
+ msec: 480
+ hash: "92fa2d9ef05140eb9d0fcf78b55f202e"
+ }
+ Frame {
+ msec: 496
+ hash: "9a3f9dc04a900020f0e488309d7b4757"
+ }
+ Frame {
+ msec: 512
+ hash: "93b4876c3e185ff4875a7447b0bf4f0f"
+ }
+ Frame {
+ msec: 528
+ hash: "41b40e36f77d04e62f72ad34aa50709a"
+ }
+ Frame {
+ msec: 544
+ hash: "2ea69aeb32fee61b61aa9c4efb2834bf"
+ }
+ Frame {
+ msec: 560
+ hash: "0971ac1e05ea2ba387c78d4d103f5ea1"
+ }
+ Frame {
+ msec: 576
+ hash: "98e46dff678f293fd6a4e9313ab3aec7"
+ }
+ Frame {
+ msec: 592
+ hash: "82b94393071d6c32dd8028e1ee69e7fb"
+ }
+ Frame {
+ msec: 608
+ hash: "240df67aa72a24546eb6e043e0d3d205"
+ }
+ Frame {
+ msec: 624
+ hash: "56c4113cc341c254ccab66f3bc313154"
+ }
+ Frame {
+ msec: 640
+ hash: "20d758c1537ed1a9aff657414b50926c"
+ }
+ Frame {
+ msec: 656
+ hash: "ae252d835a05e01c2a12ae820335049a"
+ }
+ Frame {
+ msec: 672
+ hash: "4d53256fbb012e738ba3868e2482250d"
+ }
+ Frame {
+ msec: 688
+ hash: "261a341cab38986fb2f53b8e430f04a3"
+ }
+ Frame {
+ msec: 704
+ hash: "1030f795d310f742ba491a2a90ff52d8"
+ }
+ Frame {
+ msec: 720
+ hash: "59d24ebfedd2a87bdbd755d06c4361d2"
+ }
+ Frame {
+ msec: 736
+ hash: "a6eaa480b3f93d33ae23bb36b7691b92"
+ }
+ Frame {
+ msec: 752
+ hash: "cb6cf1e6e89da3fcbad323f744aef18d"
+ }
+ Frame {
+ msec: 768
+ hash: "33a4f07cf7f5d16f006541c61ae2e4ee"
+ }
+ Frame {
+ msec: 784
+ hash: "6e857b106486ea0aaa5321d4a7a07eae"
+ }
+ Frame {
+ msec: 800
+ hash: "0f80edaf3eecf7a8c015d3fcecc0a494"
+ }
+ Frame {
+ msec: 816
+ hash: "24b45d00d70904694c30ebd422c739ce"
+ }
+ Frame {
+ msec: 832
+ hash: "c0ca66fefb19294852b9be0c4ba36481"
+ }
+ Frame {
+ msec: 848
+ hash: "047846d243e7613193a8ddd526c4268e"
+ }
+ Frame {
+ msec: 864
+ hash: "ca85f90e450ccda6b76e6a29a3187a63"
+ }
+ Frame {
+ msec: 880
+ hash: "fcd803f5640d054190c2ddc9a6406bb9"
+ }
+ Frame {
+ msec: 896
+ hash: "f81152b8a464bfa8343f52efcb0c8b8c"
+ }
+ Frame {
+ msec: 912
+ hash: "e86be73d83699584dca986dfdb030b36"
+ }
+ Frame {
+ msec: 928
+ hash: "d9798e4ebaf72c35b19a56b336d2ea93"
+ }
+ Frame {
+ msec: 944
+ hash: "460f13d8e05b529c0e4fba39b1449ff1"
+ }
+ Frame {
+ msec: 960
+ image: "resolution.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "8b2f13580c6de9ec231809330d2d0362"
+ }
+ Frame {
+ msec: 992
+ hash: "94a2cc520340573557e6a310f2ea125e"
+ }
+ Frame {
+ msec: 1008
+ hash: "a8df78ab2e800349ec887ea6b1f5dcb8"
+ }
+ Frame {
+ msec: 1024
+ hash: "0f3a56dbe26d453847ed4847c0e81d1a"
+ }
+ Frame {
+ msec: 1040
+ hash: "96c89325862a982235b4b75922ec4669"
+ }
+ Frame {
+ msec: 1056
+ hash: "ead6352a4ca47da59422e8d6a5844aa4"
+ }
+ Frame {
+ msec: 1072
+ hash: "b50a6b14f15882e2c1ae6e3babeecdf8"
+ }
+ Frame {
+ msec: 1088
+ hash: "2f32245c3388b86194e8183a290e99b8"
+ }
+ Frame {
+ msec: 1104
+ hash: "2b54d49d30ccbf11ccb5ba8d62ba7d83"
+ }
+ Frame {
+ msec: 1120
+ hash: "495b25d87cb6d1d4bdea4d5ec62c698e"
+ }
+ Frame {
+ msec: 1136
+ hash: "3d45b061939783b6359fa4cdb908ecc0"
+ }
+ Frame {
+ msec: 1152
+ hash: "e9e601c2a65a09b6354fff2c162106d6"
+ }
+ Frame {
+ msec: 1168
+ hash: "8cfba8a724e85403b573caf7bbac9d83"
+ }
+ Frame {
+ msec: 1184
+ hash: "5910765354645b724e14681cbdea227e"
+ }
+ Frame {
+ msec: 1200
+ hash: "4358af7f2ccfc0919614351bfd5a7405"
+ }
+ Frame {
+ msec: 1216
+ hash: "032e064336b458a6de03fdc98684cc34"
+ }
+ Frame {
+ msec: 1232
+ hash: "c81d87bf83ee7e834a4b15dd103f7082"
+ }
+ Frame {
+ msec: 1248
+ hash: "9d4416b55ed3b9e45a2314e9be5a5f2d"
+ }
+ Frame {
+ msec: 1264
+ hash: "5b96da1a52a0413f9e8edbc9291a2502"
+ }
+ Frame {
+ msec: 1280
+ hash: "aaa4008281ebc60b15616c818816e195"
+ }
+ Frame {
+ msec: 1296
+ hash: "81ebf882aeb89648300dfc2e8e2cf11b"
+ }
+ Frame {
+ msec: 1312
+ hash: "4e686e6cee12902f92e0ece915386fb3"
+ }
+ Frame {
+ msec: 1328
+ hash: "6ff8d9bd6ec4dce414cdc7330646156e"
+ }
+ Frame {
+ msec: 1344
+ hash: "dac6334e8b221527ef74b4f93eeef7c3"
+ }
+ Frame {
+ msec: 1360
+ hash: "e58dbf419d1831e001e802600803aaa5"
+ }
+ Frame {
+ msec: 1376
+ hash: "e8685f9b12c9ccb9d0e471946f1f6f9c"
+ }
+ Frame {
+ msec: 1392
+ hash: "0936715ff8d38c2c813ebef0683a3246"
+ }
+ Frame {
+ msec: 1408
+ hash: "37ad0a5532af8b083a7d4c4b044075ca"
+ }
+ Frame {
+ msec: 1424
+ hash: "52ae25414d353d994cba36918644949a"
+ }
+ Frame {
+ msec: 1440
+ hash: "07719485f9a7d0012eb0f3f211f0f21b"
+ }
+ Frame {
+ msec: 1456
+ hash: "2d1a4f2c8d4a8d6316a31a81a2d20c61"
+ }
+ Frame {
+ msec: 1472
+ hash: "3b279fb9e7b3efe05becc1651ba59493"
+ }
+ Frame {
+ msec: 1488
+ hash: "4b9c126dcdf499f9de4e09d4f6ab86bf"
+ }
+ Frame {
+ msec: 1504
+ hash: "6a1b8d8ea46949cb65e8f4155ab94819"
+ }
+ Frame {
+ msec: 1520
+ hash: "6dbd2106b91ffbbb8a845e6cddbd47d7"
+ }
+ Frame {
+ msec: 1536
+ hash: "8244eda92302f2b5cff01f05d438bf20"
+ }
+ Frame {
+ msec: 1552
+ hash: "f939bd80ae865e365e554a532ade38f5"
+ }
+ Frame {
+ msec: 1568
+ hash: "92d135616eee6737333b3d86d0aa5956"
+ }
+ Frame {
+ msec: 1584
+ hash: "ca75854d6e5a77c8e609d65971b5671a"
+ }
+ Frame {
+ msec: 1600
+ hash: "b0a113800cd05768b57bac6b9a338b1d"
+ }
+ Frame {
+ msec: 1616
+ hash: "7af1a2aa6a201e36c3a969be4330af04"
+ }
+ Frame {
+ msec: 1632
+ hash: "e54e8a2cfb0e6678b2a7cc64b8ae08bc"
+ }
+ Frame {
+ msec: 1648
+ hash: "5d212c7efd9cf7d3eb5219b0bbe766d7"
+ }
+ Frame {
+ msec: 1664
+ hash: "f4f2c95380c0f76c9e89820cdbeb5b31"
+ }
+ Frame {
+ msec: 1680
+ hash: "b8eefbf5ade1a6b9eef9608f66a46474"
+ }
+ Frame {
+ msec: 1696
+ hash: "d699ace9babbb152aad2fa852114c099"
+ }
+ Frame {
+ msec: 1712
+ hash: "ceb3dea0d2b93cc5882a2b38ab3d1b95"
+ }
+ Frame {
+ msec: 1728
+ hash: "08175810bfb80e1c5816b0d0aebbac4a"
+ }
+ Frame {
+ msec: 1744
+ hash: "86abce93f50e7e7ebbd90690cfb20dd2"
+ }
+ Frame {
+ msec: 1760
+ hash: "2918979f2682bd32beb5eaf7ecb3e463"
+ }
+ Frame {
+ msec: 1776
+ hash: "b165ab96b0d51d41578bf99cbf7f6d02"
+ }
+ Frame {
+ msec: 1792
+ hash: "d56cfdb2c65372cb36aeb13fd9c73deb"
+ }
+ Frame {
+ msec: 1808
+ hash: "c53f0e4dc8204e5892ed4f367a6bade3"
+ }
+ Frame {
+ msec: 1824
+ hash: "b3ae62e13149160f3695ed5c116411aa"
+ }
+ Frame {
+ msec: 1840
+ hash: "057e4a0428ea2ff9893becd40e6d2977"
+ }
+ Frame {
+ msec: 1856
+ hash: "10c050131093cc0d3f4b80c44eb1218b"
+ }
+ Frame {
+ msec: 1872
+ hash: "17ce5a6dace37f4eb316f37ea26a8a2c"
+ }
+ Frame {
+ msec: 1888
+ hash: "6e00c7e74bfaed5cf06aba54c8b73e57"
+ }
+ Frame {
+ msec: 1904
+ hash: "5a03b1b698ca28d2afd9c67aef3bc2e9"
+ }
+ Frame {
+ msec: 1920
+ image: "resolution.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "0fab102a33521e8893afdb6a11a3c5c9"
+ }
+ Frame {
+ msec: 1952
+ hash: "232e8f1b060ef55e37a372bec4435d11"
+ }
+ Frame {
+ msec: 1968
+ hash: "2107724eac0d1b8735060876f80d303a"
+ }
+ Frame {
+ msec: 1984
+ hash: "cf5d12d2707975ad364750d5ba787944"
+ }
+ Frame {
+ msec: 2000
+ hash: "2457c88828c2cb39feb1d34556077139"
+ }
+ Frame {
+ msec: 2016
+ hash: "5f08d6dab8199b3f0f57d32cf2da4d67"
+ }
+ Frame {
+ msec: 2032
+ hash: "2457c88828c2cb39feb1d34556077139"
+ }
+ Frame {
+ msec: 2048
+ hash: "cf5d12d2707975ad364750d5ba787944"
+ }
+ Frame {
+ msec: 2064
+ hash: "2107724eac0d1b8735060876f80d303a"
+ }
+ Frame {
+ msec: 2080
+ hash: "232e8f1b060ef55e37a372bec4435d11"
+ }
+ Frame {
+ msec: 2096
+ hash: "0a93c515cd328978ebd8103539a2fd63"
+ }
+ Frame {
+ msec: 2112
+ hash: "63d6c7beac12e3bd83f9ef58c233c7d2"
+ }
+ Frame {
+ msec: 2128
+ hash: "5a03b1b698ca28d2afd9c67aef3bc2e9"
+ }
+ Frame {
+ msec: 2144
+ hash: "6e00c7e74bfaed5cf06aba54c8b73e57"
+ }
+ Frame {
+ msec: 2160
+ hash: "17ce5a6dace37f4eb316f37ea26a8a2c"
+ }
+ Frame {
+ msec: 2176
+ hash: "10c050131093cc0d3f4b80c44eb1218b"
+ }
+ Frame {
+ msec: 2192
+ hash: "057e4a0428ea2ff9893becd40e6d2977"
+ }
+ Frame {
+ msec: 2208
+ hash: "b3ae62e13149160f3695ed5c116411aa"
+ }
+ Frame {
+ msec: 2224
+ hash: "c53f0e4dc8204e5892ed4f367a6bade3"
+ }
+ Frame {
+ msec: 2240
+ hash: "d56cfdb2c65372cb36aeb13fd9c73deb"
+ }
+ Frame {
+ msec: 2256
+ hash: "b165ab96b0d51d41578bf99cbf7f6d02"
+ }
+ Frame {
+ msec: 2272
+ hash: "2918979f2682bd32beb5eaf7ecb3e463"
+ }
+ Frame {
+ msec: 2288
+ hash: "86abce93f50e7e7ebbd90690cfb20dd2"
+ }
+ Frame {
+ msec: 2304
+ hash: "08175810bfb80e1c5816b0d0aebbac4a"
+ }
+ Frame {
+ msec: 2320
+ hash: "ceb3dea0d2b93cc5882a2b38ab3d1b95"
+ }
+ Frame {
+ msec: 2336
+ hash: "d699ace9babbb152aad2fa852114c099"
+ }
+ Frame {
+ msec: 2352
+ hash: "b8eefbf5ade1a6b9eef9608f66a46474"
+ }
+ Frame {
+ msec: 2368
+ hash: "f4f2c95380c0f76c9e89820cdbeb5b31"
+ }
+ Frame {
+ msec: 2384
+ hash: "5d212c7efd9cf7d3eb5219b0bbe766d7"
+ }
+ Frame {
+ msec: 2400
+ hash: "e54e8a2cfb0e6678b2a7cc64b8ae08bc"
+ }
+ Frame {
+ msec: 2416
+ hash: "d9408487f747ffb8eff5e1da92207285"
+ }
+ Frame {
+ msec: 2432
+ hash: "e6b3fa1829535ac90d1548f45aadb9be"
+ }
+ Frame {
+ msec: 2448
+ hash: "ca75854d6e5a77c8e609d65971b5671a"
+ }
+ Frame {
+ msec: 2464
+ hash: "92d135616eee6737333b3d86d0aa5956"
+ }
+ Frame {
+ msec: 2480
+ hash: "f939bd80ae865e365e554a532ade38f5"
+ }
+ Frame {
+ msec: 2496
+ hash: "8244eda92302f2b5cff01f05d438bf20"
+ }
+ Frame {
+ msec: 2512
+ hash: "6dbd2106b91ffbbb8a845e6cddbd47d7"
+ }
+ Frame {
+ msec: 2528
+ hash: "6a1b8d8ea46949cb65e8f4155ab94819"
+ }
+ Frame {
+ msec: 2544
+ hash: "4b9c126dcdf499f9de4e09d4f6ab86bf"
+ }
+ Frame {
+ msec: 2560
+ hash: "3b279fb9e7b3efe05becc1651ba59493"
+ }
+ Frame {
+ msec: 2576
+ hash: "bb40b884b56defb61ad86757fd51b9e6"
+ }
+ Frame {
+ msec: 2592
+ hash: "07719485f9a7d0012eb0f3f211f0f21b"
+ }
+ Frame {
+ msec: 2608
+ hash: "52ae25414d353d994cba36918644949a"
+ }
+ Frame {
+ msec: 2624
+ hash: "37ad0a5532af8b083a7d4c4b044075ca"
+ }
+ Frame {
+ msec: 2640
+ hash: "0936715ff8d38c2c813ebef0683a3246"
+ }
+ Frame {
+ msec: 2656
+ hash: "e8685f9b12c9ccb9d0e471946f1f6f9c"
+ }
+ Frame {
+ msec: 2672
+ hash: "e58dbf419d1831e001e802600803aaa5"
+ }
+ Frame {
+ msec: 2688
+ hash: "dac6334e8b221527ef74b4f93eeef7c3"
+ }
+ Frame {
+ msec: 2704
+ hash: "6ff8d9bd6ec4dce414cdc7330646156e"
+ }
+ Frame {
+ msec: 2720
+ hash: "4e686e6cee12902f92e0ece915386fb3"
+ }
+ Frame {
+ msec: 2736
+ hash: "81ebf882aeb89648300dfc2e8e2cf11b"
+ }
+ Frame {
+ msec: 2752
+ hash: "aaa4008281ebc60b15616c818816e195"
+ }
+ Frame {
+ msec: 2768
+ hash: "5b96da1a52a0413f9e8edbc9291a2502"
+ }
+ Frame {
+ msec: 2784
+ hash: "9d4416b55ed3b9e45a2314e9be5a5f2d"
+ }
+ Frame {
+ msec: 2800
+ hash: "c81d87bf83ee7e834a4b15dd103f7082"
+ }
+ Frame {
+ msec: 2816
+ hash: "9fdf30d57c49a6644377ba40140b1969"
+ }
+ Frame {
+ msec: 2832
+ hash: "4358af7f2ccfc0919614351bfd5a7405"
+ }
+ Frame {
+ msec: 2848
+ hash: "5910765354645b724e14681cbdea227e"
+ }
+ Frame {
+ msec: 2864
+ hash: "8cfba8a724e85403b573caf7bbac9d83"
+ }
+ Frame {
+ msec: 2880
+ image: "resolution.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "3d45b061939783b6359fa4cdb908ecc0"
+ }
+ Frame {
+ msec: 2912
+ hash: "495b25d87cb6d1d4bdea4d5ec62c698e"
+ }
+ Frame {
+ msec: 2928
+ hash: "2b54d49d30ccbf11ccb5ba8d62ba7d83"
+ }
+ Frame {
+ msec: 2944
+ hash: "2f32245c3388b86194e8183a290e99b8"
+ }
+ Frame {
+ msec: 2960
+ hash: "b50a6b14f15882e2c1ae6e3babeecdf8"
+ }
+ Frame {
+ msec: 2976
+ hash: "ead6352a4ca47da59422e8d6a5844aa4"
+ }
+ Frame {
+ msec: 2992
+ hash: "96c89325862a982235b4b75922ec4669"
+ }
+ Frame {
+ msec: 3008
+ hash: "0f3a56dbe26d453847ed4847c0e81d1a"
+ }
+ Frame {
+ msec: 3024
+ hash: "a8df78ab2e800349ec887ea6b1f5dcb8"
+ }
+ Frame {
+ msec: 3040
+ hash: "94a2cc520340573557e6a310f2ea125e"
+ }
+ Frame {
+ msec: 3056
+ hash: "8b2f13580c6de9ec231809330d2d0362"
+ }
+ Frame {
+ msec: 3072
+ hash: "5f76ef4f6b8e703fd0822859cd9a1353"
+ }
+ Frame {
+ msec: 3088
+ hash: "460f13d8e05b529c0e4fba39b1449ff1"
+ }
+ Frame {
+ msec: 3104
+ hash: "d9798e4ebaf72c35b19a56b336d2ea93"
+ }
+ Frame {
+ msec: 3120
+ hash: "e86be73d83699584dca986dfdb030b36"
+ }
+ Frame {
+ msec: 3136
+ hash: "f81152b8a464bfa8343f52efcb0c8b8c"
+ }
+ Frame {
+ msec: 3152
+ hash: "fcd803f5640d054190c2ddc9a6406bb9"
+ }
+ Frame {
+ msec: 3168
+ hash: "ca85f90e450ccda6b76e6a29a3187a63"
+ }
+ Frame {
+ msec: 3184
+ hash: "047846d243e7613193a8ddd526c4268e"
+ }
+ Frame {
+ msec: 3200
+ hash: "c0ca66fefb19294852b9be0c4ba36481"
+ }
+ Frame {
+ msec: 3216
+ hash: "d4a075656790c4f2c50addcd2cc660b5"
+ }
+ Frame {
+ msec: 3232
+ hash: "0f80edaf3eecf7a8c015d3fcecc0a494"
+ }
+ Frame {
+ msec: 3248
+ hash: "6e857b106486ea0aaa5321d4a7a07eae"
+ }
+ Frame {
+ msec: 3264
+ hash: "33a4f07cf7f5d16f006541c61ae2e4ee"
+ }
+ Frame {
+ msec: 3280
+ hash: "cb6cf1e6e89da3fcbad323f744aef18d"
+ }
+ Frame {
+ msec: 3296
+ hash: "a6eaa480b3f93d33ae23bb36b7691b92"
+ }
+ Frame {
+ msec: 3312
+ hash: "59d24ebfedd2a87bdbd755d06c4361d2"
+ }
+ Frame {
+ msec: 3328
+ hash: "1030f795d310f742ba491a2a90ff52d8"
+ }
+ Frame {
+ msec: 3344
+ hash: "261a341cab38986fb2f53b8e430f04a3"
+ }
+ Frame {
+ msec: 3360
+ hash: "4d53256fbb012e738ba3868e2482250d"
+ }
+ Frame {
+ msec: 3376
+ hash: "ae252d835a05e01c2a12ae820335049a"
+ }
+ Frame {
+ msec: 3392
+ hash: "20d758c1537ed1a9aff657414b50926c"
+ }
+ Frame {
+ msec: 3408
+ hash: "56c4113cc341c254ccab66f3bc313154"
+ }
+ Frame {
+ msec: 3424
+ hash: "240df67aa72a24546eb6e043e0d3d205"
+ }
+ Frame {
+ msec: 3440
+ hash: "82b94393071d6c32dd8028e1ee69e7fb"
+ }
+ Frame {
+ msec: 3456
+ hash: "98e46dff678f293fd6a4e9313ab3aec7"
+ }
+ Frame {
+ msec: 3472
+ hash: "0971ac1e05ea2ba387c78d4d103f5ea1"
+ }
+ Frame {
+ msec: 3488
+ hash: "2ea69aeb32fee61b61aa9c4efb2834bf"
+ }
+ Frame {
+ msec: 3504
+ hash: "41b40e36f77d04e62f72ad34aa50709a"
+ }
+ Frame {
+ msec: 3520
+ hash: "93b4876c3e185ff4875a7447b0bf4f0f"
+ }
+ Frame {
+ msec: 3536
+ hash: "9a3f9dc04a900020f0e488309d7b4757"
+ }
+ Frame {
+ msec: 3552
+ hash: "92fa2d9ef05140eb9d0fcf78b55f202e"
+ }
+ Frame {
+ msec: 3568
+ hash: "2ed9d0e09b61dee8b2703e580007d7a5"
+ }
+ Frame {
+ msec: 3584
+ hash: "cbd63ec868578e295a83170f42b23678"
+ }
+ Frame {
+ msec: 3600
+ hash: "b9f3f08168fb55ba01e56e670db565de"
+ }
+ Frame {
+ msec: 3616
+ hash: "a579d6324fb4bf9ac5ceaba2aa708764"
+ }
+ Frame {
+ msec: 3632
+ hash: "4e0fd7f45e53a8d44c416eb9235ec877"
+ }
+ Frame {
+ msec: 3648
+ hash: "f87195f2393914a0bbed9a454de01ff5"
+ }
+ Frame {
+ msec: 3664
+ hash: "9bc9801e83267689cd2750226f2b08ce"
+ }
+ Frame {
+ msec: 3680
+ hash: "5ddbc3bc10292bec41531e83c0921c59"
+ }
+ Frame {
+ msec: 3696
+ hash: "4f3b79b341b63499a20f1e1e2cd979f9"
+ }
+ Frame {
+ msec: 3712
+ hash: "e8d98ec2d13ef4324feba11be95d0735"
+ }
+ Frame {
+ msec: 3728
+ hash: "5e3c58e2f3a57f4ea48f4315d37ed813"
+ }
+ Frame {
+ msec: 3744
+ hash: "3f200fca4815d555f22912d9fcdc20ee"
+ }
+ Frame {
+ msec: 3760
+ hash: "0901c99f959d6c10a0b6ea46a282d8fd"
+ }
+ Frame {
+ msec: 3776
+ hash: "a186b8e984c999e8609472a7a5fa0610"
+ }
+ Frame {
+ msec: 3792
+ hash: "412a630348aa44d56f36f04982035e36"
+ }
+ Frame {
+ msec: 3808
+ hash: "011c0bcca7717b08bc53738718203f7e"
+ }
+ Frame {
+ msec: 3824
+ hash: "e531d33ef14b58ad843a6be6d7cb0961"
+ }
+ Frame {
+ msec: 3840
+ image: "resolution.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "8df8dd33eada434231332b81e03430ce"
+ }
+ Frame {
+ msec: 3872
+ hash: "2aaa3749f93734dd203e1fea91a9f24a"
+ }
+ Frame {
+ msec: 3888
+ hash: "dc78b09e27bbc0a2cfec83436eef4446"
+ }
+ Frame {
+ msec: 3904
+ hash: "9053a92e343ebb79bd2831f5ab94a1b5"
+ }
+ Frame {
+ msec: 3920
+ hash: "649ad1a3fb57fb088e4e5cfd749bf2e5"
+ }
+ Frame {
+ msec: 3936
+ hash: "3579849956c1101000ef09949aa4c0f9"
+ }
+ Frame {
+ msec: 3952
+ hash: "7af041898748bb5950643b057ca59eea"
+ }
+ Frame {
+ msec: 3968
+ hash: "30a191ae899121ae22d10acee6593415"
+ }
+ Frame {
+ msec: 3984
+ hash: "369f761053d5910e00672aa866f698ba"
+ }
+ Frame {
+ msec: 4000
+ hash: "1f189a436cf74ae83a03c3bb63c24ec2"
+ }
+ Frame {
+ msec: 4016
+ hash: "ac1d9c1cc13813b5e94c692a209a4e36"
+ }
+ Frame {
+ msec: 4032
+ hash: "f0e0b5c041bcf38d8d9144d466ad74a9"
+ }
+ Frame {
+ msec: 4048
+ hash: "38a35c94ebcf33f6720fea33821a54e1"
+ }
+ Frame {
+ msec: 4064
+ hash: "061d139f43a3dd63daf887b82721f42f"
+ }
+ Frame {
+ msec: 4080
+ hash: "623747b5fe99e5ffaa62f4daa3f840ef"
+ }
+ Frame {
+ msec: 4096
+ hash: "4dd5081a387ffda296811b64b9235d7d"
+ }
+ Frame {
+ msec: 4112
+ hash: "1598cf2fe996f99ab4c15f84d89cd7bd"
+ }
+ Frame {
+ msec: 4128
+ hash: "30cac85bf1a622d438a64b6ccb59a8ca"
+ }
+ Frame {
+ msec: 4144
+ hash: "114e54ae3e1493750a022f1c019e7f77"
+ }
+ Frame {
+ msec: 4160
+ hash: "a585efc3aae3a426e6af5f4a8cc23b10"
+ }
+ Frame {
+ msec: 4176
+ hash: "c0f315549baad93dd885d58b185e7ed7"
+ }
+ Frame {
+ msec: 4192
+ hash: "3a00f5f034bef58ca341bf9e1056f46f"
+ }
+ Frame {
+ msec: 4208
+ hash: "b3022d07dee989499a35aea21e07e4c1"
+ }
+ Frame {
+ msec: 4224
+ hash: "e722464809e94fb7d8c752506f0d3ac2"
+ }
+ Frame {
+ msec: 4240
+ hash: "82ea3d06367ce9dc582dbdbc186cc70a"
+ }
+ Frame {
+ msec: 4256
+ hash: "359040facbe531c7f6b805b8bfc5b17a"
+ }
+ Frame {
+ msec: 4272
+ hash: "264c7b65bae7e3945d87c17edfda6889"
+ }
+ Frame {
+ msec: 4288
+ hash: "d941ec8e363942af02f36d4672521801"
+ }
+ Frame {
+ msec: 4304
+ hash: "e46e145b4d07d1697c1d9efce80c80de"
+ }
+ Frame {
+ msec: 4320
+ hash: "d8bed5c42bc5725d811db4dacdab1581"
+ }
+ Frame {
+ msec: 4336
+ hash: "aa221160b4a11b30cb73eaa8ccaa9dfd"
+ }
+ Frame {
+ msec: 4352
+ hash: "f411483477906d83f872b306cd021406"
+ }
+ Frame {
+ msec: 4368
+ hash: "d9c52e4f99416fa1043a9c34a1c29f5a"
+ }
+ Frame {
+ msec: 4384
+ hash: "ec2890446f34b8a5d47ae97ba2853d0f"
+ }
+ Frame {
+ msec: 4400
+ hash: "6a3e6ef7d832fa7ec813b38171cb3602"
+ }
+ Frame {
+ msec: 4416
+ hash: "6dfd75b6cb780f7d80466f3450d0b255"
+ }
+ Frame {
+ msec: 4432
+ hash: "170774843dc6f28f51f07c445e046bd8"
+ }
+ Frame {
+ msec: 4448
+ hash: "eab348bef656739d9723d3bd659c43ff"
+ }
+ Frame {
+ msec: 4464
+ hash: "f06e546bb710002cdf1cefd51ffa47c4"
+ }
+ Frame {
+ msec: 4480
+ hash: "52f7ff1348d9aa7cdf43cd81f0a71625"
+ }
+ Frame {
+ msec: 4496
+ hash: "55a5b1befa3b7a4674a62d492b5527ea"
+ }
+ Frame {
+ msec: 4512
+ hash: "699c093fddc6b9293a011d8d6eccd36d"
+ }
+ Frame {
+ msec: 4528
+ hash: "b988e1ad7dc7d26ffeea8f71a69a9abf"
+ }
+ Frame {
+ msec: 4544
+ hash: "8dea2b47492f83f961a47536a10aad0c"
+ }
+ Frame {
+ msec: 4560
+ hash: "925ea8105779ffd801a3c62129d64bed"
+ }
+ Frame {
+ msec: 4576
+ hash: "aa5d957c4f452b1f1c70ea672ce4a0b9"
+ }
+ Frame {
+ msec: 4592
+ hash: "85d3ea97a1fb152ae8ad65a17693a16d"
+ }
+ Frame {
+ msec: 4608
+ hash: "069b2bc8b86f822c5e7ceca3664e78a6"
+ }
+ Frame {
+ msec: 4624
+ hash: "209071b7f72d8c25b9ce27c05397fe56"
+ }
+ Frame {
+ msec: 4640
+ hash: "068dea708612620d34bd57c6affb44b1"
+ }
+ Frame {
+ msec: 4656
+ hash: "36b53a0845220645059fed803a6ffcbc"
+ }
+ Frame {
+ msec: 4672
+ hash: "2c84e15006a39a554eb2047bae9d4f6f"
+ }
+ Frame {
+ msec: 4688
+ hash: "1bdab31534f4b5a7e9d27ede3e9acb57"
+ }
+ Frame {
+ msec: 4704
+ hash: "688689eeb584b0c74f0322af35857dd5"
+ }
+ Frame {
+ msec: 4720
+ hash: "024939fea5b6c6f9d3e26a0abf42ae3c"
+ }
+ Frame {
+ msec: 4736
+ hash: "2efb2f47c6f0be3743f0f4dc7a66b08e"
+ }
+ Frame {
+ msec: 4752
+ hash: "4631f3756af880693d3654c16cbe47bb"
+ }
+ Frame {
+ msec: 4768
+ hash: "2fd77649c1e1ade97534ef530ad05612"
+ }
+ Frame {
+ msec: 4784
+ hash: "5d13517bac111c8af49c444d41a42ea1"
+ }
+ Frame {
+ msec: 4800
+ image: "resolution.4.png"
+ }
+ Frame {
+ msec: 4816
+ hash: "8bd8efe405a42730304dcc120a6e718c"
+ }
+ Frame {
+ msec: 4832
+ hash: "a83c543977e3f1dd4c020375eb3273fd"
+ }
+ Frame {
+ msec: 4848
+ hash: "c52f38469fec77afc7f0a44b992e3d0d"
+ }
+ Frame {
+ msec: 4864
+ hash: "af645449d6ec3f42449ffc59193aaaa4"
+ }
+ Frame {
+ msec: 4880
+ hash: "2eb982cf754c77c109158076957775ae"
+ }
+ Frame {
+ msec: 4896
+ hash: "9bf2fd4a4e45f302b34b7f038937d3d7"
+ }
+ Frame {
+ msec: 4912
+ hash: "5520e309d68c8eedf76a9392714a6150"
+ }
+ Frame {
+ msec: 4928
+ hash: "9dcd043a25e33b788729c0a0531301e7"
+ }
+ Frame {
+ msec: 4944
+ hash: "1475b9bcfe08c66135673f4284c9bbcd"
+ }
+ Frame {
+ msec: 4960
+ hash: "9af1f355bcf4d5f05b42040ebba75e09"
+ }
+ Frame {
+ msec: 4976
+ hash: "8b6e04980ea60ca2ff06053d35c06881"
+ }
+ Frame {
+ msec: 4992
+ hash: "def466e377a44afc4b2a9a9ebb258f86"
+ }
+ Frame {
+ msec: 5008
+ hash: "18f6d6f5a3fdaee0037580df0f4f9ef0"
+ }
+ Frame {
+ msec: 5024
+ hash: "ae2579498558f6f93489999c7c82cbcd"
+ }
+ Frame {
+ msec: 5040
+ hash: "623d8e756c2c131150554272df231bf9"
+ }
+ Frame {
+ msec: 5056
+ hash: "c13146576229848b8a1e1b382fbf749d"
+ }
+ Frame {
+ msec: 5072
+ hash: "f963a399aeea1d34ec3bd30a5b991035"
+ }
+ Frame {
+ msec: 5088
+ hash: "45a4db021ba0a53ad783c14a3b66aa38"
+ }
+ Frame {
+ msec: 5104
+ hash: "2031618470e3bb3a3435fe0e270a15d4"
+ }
+ Frame {
+ msec: 5120
+ hash: "f7cc01c301f29110db8364fecc8751f1"
+ }
+ Frame {
+ msec: 5136
+ hash: "2d366fa500257ec0a12863f3637d0c47"
+ }
+ Frame {
+ msec: 5152
+ hash: "4ba700e7f9ffba4889ca26d903a63029"
+ }
+ Frame {
+ msec: 5168
+ hash: "329bec5e3d6a131b4bd9a056659bdb3e"
+ }
+ Frame {
+ msec: 5184
+ hash: "48f7356707cdbcb401c135207ee38821"
+ }
+ Frame {
+ msec: 5200
+ hash: "5314e448affe60d193d07a784035ecce"
+ }
+ Frame {
+ msec: 5216
+ hash: "c87e98becdf99c214ad4987985b4af07"
+ }
+ Frame {
+ msec: 5232
+ hash: "ea81d2a967b619980d7e42937ec74668"
+ }
+ Frame {
+ msec: 5248
+ hash: "845319d4e0f6ee97697e59c606220e7a"
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/zooming/data/zoomTextOnly.0.png b/tests/auto/declarative/visual/webview/zooming/data/zoomTextOnly.0.png
new file mode 100644
index 0000000000..4b9abb4f38
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/data/zoomTextOnly.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/zooming/data/zoomTextOnly.1.png b/tests/auto/declarative/visual/webview/zooming/data/zoomTextOnly.1.png
new file mode 100644
index 0000000000..5ce9787160
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/data/zoomTextOnly.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/zooming/data/zoomTextOnly.qml b/tests/auto/declarative/visual/webview/zooming/data/zoomTextOnly.qml
new file mode 100644
index 0000000000..aaa758365f
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/data/zoomTextOnly.qml
@@ -0,0 +1,655 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "4e401b5ebff6e442fa108e94a5dba668"
+ }
+ Frame {
+ msec: 32
+ hash: "c2f8551d0442d0736b71c54fc965562b"
+ }
+ Frame {
+ msec: 48
+ hash: "4fc1ef611b24ec5737310859b12c83d3"
+ }
+ Frame {
+ msec: 64
+ hash: "7df07aea83bc5c3213e7871854661820"
+ }
+ Frame {
+ msec: 80
+ hash: "0ae4ee18cc675749f008b897fe35cc40"
+ }
+ Frame {
+ msec: 96
+ hash: "0ae4ee18cc675749f008b897fe35cc40"
+ }
+ Frame {
+ msec: 112
+ hash: "f5c917c7ca26bb916dd4df84eafc8e94"
+ }
+ Frame {
+ msec: 128
+ hash: "0696257de0441666bd264f8db6383d15"
+ }
+ Frame {
+ msec: 144
+ hash: "0b43fdee23346c30c60b822a20131cc3"
+ }
+ Frame {
+ msec: 160
+ hash: "98dbd004cf4809dbc90bfa9272378644"
+ }
+ Frame {
+ msec: 176
+ hash: "32d0e9005ebb9dfd410d348e336bcd93"
+ }
+ Frame {
+ msec: 192
+ hash: "8a64b18006ad0bd2c373a2a9395ce52e"
+ }
+ Frame {
+ msec: 208
+ hash: "7dc26fd658f626b8fe18545cf93dc4ec"
+ }
+ Frame {
+ msec: 224
+ hash: "6712be93cf1ed2b7b202367418b6d2d7"
+ }
+ Frame {
+ msec: 240
+ hash: "524840a3453af4e97ac82b559308cce3"
+ }
+ Frame {
+ msec: 256
+ hash: "11436091b24c02af94dfa75a5fd1a001"
+ }
+ Frame {
+ msec: 272
+ hash: "d3689b53474b4b26630d70ba01c057b4"
+ }
+ Frame {
+ msec: 288
+ hash: "16e2b66f28ed80d80d9b5264d89624d5"
+ }
+ Frame {
+ msec: 304
+ hash: "87636076959de7e5a0a8bd8b31354ed4"
+ }
+ Frame {
+ msec: 320
+ hash: "a6916da6bfac27aa87d75da2bbb73f31"
+ }
+ Frame {
+ msec: 336
+ hash: "58cfba3aae4bf54a5b445e0e34571d2d"
+ }
+ Frame {
+ msec: 352
+ hash: "1475ae722afd169cc0c8e1fde39eb6b7"
+ }
+ Frame {
+ msec: 368
+ hash: "14d08c2ca430631af8ede1013f4f4da0"
+ }
+ Frame {
+ msec: 384
+ hash: "ace9db9112d147569dc0cf1a1b680d6c"
+ }
+ Frame {
+ msec: 400
+ hash: "08bc6815601417f3731eaae398d0861d"
+ }
+ Frame {
+ msec: 416
+ hash: "809870dfd9b05ce07170edd945348ddf"
+ }
+ Frame {
+ msec: 432
+ hash: "5784deb0f3270cf7a0d0964cd9d31458"
+ }
+ Frame {
+ msec: 448
+ hash: "2f06ee407e5175d4b954e31c39c9522c"
+ }
+ Frame {
+ msec: 464
+ hash: "48a7dbed293fbbd5ea202190837a411f"
+ }
+ Frame {
+ msec: 480
+ hash: "abf3d90803cfa12d35d2752be7ea02d8"
+ }
+ Frame {
+ msec: 496
+ hash: "a60edcf8d792f93a839e6ddbafbf993f"
+ }
+ Frame {
+ msec: 512
+ hash: "7e8dfe86ea0849022355b12578d4cb1a"
+ }
+ Frame {
+ msec: 528
+ hash: "3c84122b0933ee870f178d39469e51e2"
+ }
+ Frame {
+ msec: 544
+ hash: "25f463e91febf5b6d8819fd5010bc1c2"
+ }
+ Frame {
+ msec: 560
+ hash: "d423a9bc912237d0f20b924849ba0cb1"
+ }
+ Frame {
+ msec: 576
+ hash: "5bd3cc309a5fce6183654975543250b2"
+ }
+ Frame {
+ msec: 592
+ hash: "4e401b5ebff6e442fa108e94a5dba668"
+ }
+ Frame {
+ msec: 608
+ hash: "9a4bf1400da038f2088dd4c49403d852"
+ }
+ Frame {
+ msec: 624
+ hash: "a37024356613bd5d678e0b2f7b8f5959"
+ }
+ Frame {
+ msec: 640
+ hash: "4f37d72c10e51f68a2359086094da249"
+ }
+ Frame {
+ msec: 656
+ hash: "6093bcb7673f8e58fe5a7b0143638822"
+ }
+ Frame {
+ msec: 672
+ hash: "c272aeea2b9c450fbd732305ccc01b93"
+ }
+ Frame {
+ msec: 688
+ hash: "6a4e2ee45b26037421e2a5f2d6ee517e"
+ }
+ Frame {
+ msec: 704
+ hash: "d912afcbce6c9d879a07ffc3c51b36d1"
+ }
+ Frame {
+ msec: 720
+ hash: "2578335ac6f21c8aec2c87515562c321"
+ }
+ Frame {
+ msec: 736
+ hash: "5b77af55f0a723ba762d283f41e91c98"
+ }
+ Frame {
+ msec: 752
+ hash: "b420fc71b22fa608a9c0cdbbbc61c447"
+ }
+ Frame {
+ msec: 768
+ hash: "3f7a9cecf2a590e8728137fabfd3f5f3"
+ }
+ Frame {
+ msec: 784
+ hash: "c51f12a2f438f137785c70e3af4922fd"
+ }
+ Frame {
+ msec: 800
+ hash: "5d97175fc4d986e5b21758d4ac785025"
+ }
+ Frame {
+ msec: 816
+ hash: "94f922f3460ad76cd05cb5b321977a94"
+ }
+ Frame {
+ msec: 832
+ hash: "5747adbc4f0b22ed359793d72d3e7d1f"
+ }
+ Frame {
+ msec: 848
+ hash: "255d1d45d3343972f156dfab7d13ce41"
+ }
+ Frame {
+ msec: 864
+ hash: "e5b54132ffb83acad30622e969405bc0"
+ }
+ Frame {
+ msec: 880
+ hash: "2c05cf00e3417883e789f58c2728dc97"
+ }
+ Frame {
+ msec: 896
+ hash: "9d66290b1aae1de3025d24d3efc4ca1c"
+ }
+ Frame {
+ msec: 912
+ hash: "5e9b0783b1b4221145a4febbae56b30f"
+ }
+ Frame {
+ msec: 928
+ hash: "21eea497c26600b03d868661232b3ebe"
+ }
+ Frame {
+ msec: 944
+ hash: "2383c415170ac6444f1c193ed698f682"
+ }
+ Frame {
+ msec: 960
+ image: "zoomTextOnly.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "4ed0f85dec4eb0bb740ac3780b6872c0"
+ }
+ Frame {
+ msec: 992
+ hash: "0a18bccca4efeadfced8e5cb1715a1f3"
+ }
+ Frame {
+ msec: 1008
+ hash: "823e65df9075eb0e9a3aad6b15ec3342"
+ }
+ Frame {
+ msec: 1024
+ hash: "823e65df9075eb0e9a3aad6b15ec3342"
+ }
+ Frame {
+ msec: 1040
+ hash: "0a18bccca4efeadfced8e5cb1715a1f3"
+ }
+ Frame {
+ msec: 1056
+ hash: "4ed0f85dec4eb0bb740ac3780b6872c0"
+ }
+ Frame {
+ msec: 1072
+ hash: "fae77663566351fa3bb506b459496a9d"
+ }
+ Frame {
+ msec: 1088
+ hash: "2383c415170ac6444f1c193ed698f682"
+ }
+ Frame {
+ msec: 1104
+ hash: "2e05365256bebbdf3229f99b94263b6c"
+ }
+ Frame {
+ msec: 1120
+ hash: "5e9b0783b1b4221145a4febbae56b30f"
+ }
+ Frame {
+ msec: 1136
+ hash: "9d66290b1aae1de3025d24d3efc4ca1c"
+ }
+ Frame {
+ msec: 1152
+ hash: "2c05cf00e3417883e789f58c2728dc97"
+ }
+ Frame {
+ msec: 1168
+ hash: "e5b54132ffb83acad30622e969405bc0"
+ }
+ Frame {
+ msec: 1184
+ hash: "255d1d45d3343972f156dfab7d13ce41"
+ }
+ Frame {
+ msec: 1200
+ hash: "5747adbc4f0b22ed359793d72d3e7d1f"
+ }
+ Frame {
+ msec: 1216
+ hash: "94f922f3460ad76cd05cb5b321977a94"
+ }
+ Frame {
+ msec: 1232
+ hash: "5d97175fc4d986e5b21758d4ac785025"
+ }
+ Frame {
+ msec: 1248
+ hash: "c51f12a2f438f137785c70e3af4922fd"
+ }
+ Frame {
+ msec: 1264
+ hash: "3f7a9cecf2a590e8728137fabfd3f5f3"
+ }
+ Frame {
+ msec: 1280
+ hash: "b420fc71b22fa608a9c0cdbbbc61c447"
+ }
+ Frame {
+ msec: 1296
+ hash: "5b77af55f0a723ba762d283f41e91c98"
+ }
+ Frame {
+ msec: 1312
+ hash: "2578335ac6f21c8aec2c87515562c321"
+ }
+ Frame {
+ msec: 1328
+ hash: "a9b5438bd48dbafd307d571877416003"
+ }
+ Frame {
+ msec: 1344
+ hash: "6a4e2ee45b26037421e2a5f2d6ee517e"
+ }
+ Frame {
+ msec: 1360
+ hash: "c272aeea2b9c450fbd732305ccc01b93"
+ }
+ Frame {
+ msec: 1376
+ hash: "37c7e50c270e8feb4dd9018580284a85"
+ }
+ Frame {
+ msec: 1392
+ hash: "4f37d72c10e51f68a2359086094da249"
+ }
+ Frame {
+ msec: 1408
+ hash: "a37024356613bd5d678e0b2f7b8f5959"
+ }
+ Frame {
+ msec: 1424
+ hash: "9a4bf1400da038f2088dd4c49403d852"
+ }
+ Frame {
+ msec: 1440
+ hash: "4e401b5ebff6e442fa108e94a5dba668"
+ }
+ Frame {
+ msec: 1456
+ hash: "5bd3cc309a5fce6183654975543250b2"
+ }
+ Frame {
+ msec: 1472
+ hash: "d423a9bc912237d0f20b924849ba0cb1"
+ }
+ Frame {
+ msec: 1488
+ hash: "25f463e91febf5b6d8819fd5010bc1c2"
+ }
+ Frame {
+ msec: 1504
+ hash: "3c84122b0933ee870f178d39469e51e2"
+ }
+ Frame {
+ msec: 1520
+ hash: "7e8dfe86ea0849022355b12578d4cb1a"
+ }
+ Frame {
+ msec: 1536
+ hash: "a60edcf8d792f93a839e6ddbafbf993f"
+ }
+ Frame {
+ msec: 1552
+ hash: "abf3d90803cfa12d35d2752be7ea02d8"
+ }
+ Frame {
+ msec: 1568
+ hash: "48a7dbed293fbbd5ea202190837a411f"
+ }
+ Frame {
+ msec: 1584
+ hash: "2f06ee407e5175d4b954e31c39c9522c"
+ }
+ Frame {
+ msec: 1600
+ hash: "5784deb0f3270cf7a0d0964cd9d31458"
+ }
+ Frame {
+ msec: 1616
+ hash: "809870dfd9b05ce07170edd945348ddf"
+ }
+ Frame {
+ msec: 1632
+ hash: "08bc6815601417f3731eaae398d0861d"
+ }
+ Frame {
+ msec: 1648
+ hash: "ace9db9112d147569dc0cf1a1b680d6c"
+ }
+ Frame {
+ msec: 1664
+ hash: "14d08c2ca430631af8ede1013f4f4da0"
+ }
+ Frame {
+ msec: 1680
+ hash: "1475ae722afd169cc0c8e1fde39eb6b7"
+ }
+ Frame {
+ msec: 1696
+ hash: "58cfba3aae4bf54a5b445e0e34571d2d"
+ }
+ Frame {
+ msec: 1712
+ hash: "a6916da6bfac27aa87d75da2bbb73f31"
+ }
+ Frame {
+ msec: 1728
+ hash: "87636076959de7e5a0a8bd8b31354ed4"
+ }
+ Frame {
+ msec: 1744
+ hash: "16e2b66f28ed80d80d9b5264d89624d5"
+ }
+ Frame {
+ msec: 1760
+ hash: "d3689b53474b4b26630d70ba01c057b4"
+ }
+ Frame {
+ msec: 1776
+ hash: "11436091b24c02af94dfa75a5fd1a001"
+ }
+ Frame {
+ msec: 1792
+ hash: "524840a3453af4e97ac82b559308cce3"
+ }
+ Frame {
+ msec: 1808
+ hash: "6712be93cf1ed2b7b202367418b6d2d7"
+ }
+ Frame {
+ msec: 1824
+ hash: "7dc26fd658f626b8fe18545cf93dc4ec"
+ }
+ Frame {
+ msec: 1840
+ hash: "8a64b18006ad0bd2c373a2a9395ce52e"
+ }
+ Frame {
+ msec: 1856
+ hash: "32d0e9005ebb9dfd410d348e336bcd93"
+ }
+ Frame {
+ msec: 1872
+ hash: "98dbd004cf4809dbc90bfa9272378644"
+ }
+ Frame {
+ msec: 1888
+ hash: "0b43fdee23346c30c60b822a20131cc3"
+ }
+ Frame {
+ msec: 1904
+ hash: "0696257de0441666bd264f8db6383d15"
+ }
+ Frame {
+ msec: 1920
+ image: "zoomTextOnly.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "0ae4ee18cc675749f008b897fe35cc40"
+ }
+ Frame {
+ msec: 1952
+ hash: "0ae4ee18cc675749f008b897fe35cc40"
+ }
+ Frame {
+ msec: 1968
+ hash: "7df07aea83bc5c3213e7871854661820"
+ }
+ Frame {
+ msec: 1984
+ hash: "4fc1ef611b24ec5737310859b12c83d3"
+ }
+ Frame {
+ msec: 2000
+ hash: "c2f8551d0442d0736b71c54fc965562b"
+ }
+ Frame {
+ msec: 2016
+ hash: "4ec29787e437f9619ce0f0a0f4889d0f"
+ }
+ Frame {
+ msec: 2032
+ hash: "c2f8551d0442d0736b71c54fc965562b"
+ }
+ Frame {
+ msec: 2048
+ hash: "4fc1ef611b24ec5737310859b12c83d3"
+ }
+ Frame {
+ msec: 2064
+ hash: "7df07aea83bc5c3213e7871854661820"
+ }
+ Frame {
+ msec: 2080
+ hash: "0ae4ee18cc675749f008b897fe35cc40"
+ }
+ Frame {
+ msec: 2096
+ hash: "0ae4ee18cc675749f008b897fe35cc40"
+ }
+ Frame {
+ msec: 2112
+ hash: "f5c917c7ca26bb916dd4df84eafc8e94"
+ }
+ Frame {
+ msec: 2128
+ hash: "0696257de0441666bd264f8db6383d15"
+ }
+ Frame {
+ msec: 2144
+ hash: "0b43fdee23346c30c60b822a20131cc3"
+ }
+ Frame {
+ msec: 2160
+ hash: "98dbd004cf4809dbc90bfa9272378644"
+ }
+ Frame {
+ msec: 2176
+ hash: "32d0e9005ebb9dfd410d348e336bcd93"
+ }
+ Frame {
+ msec: 2192
+ hash: "8a64b18006ad0bd2c373a2a9395ce52e"
+ }
+ Frame {
+ msec: 2208
+ hash: "7dc26fd658f626b8fe18545cf93dc4ec"
+ }
+ Frame {
+ msec: 2224
+ hash: "6712be93cf1ed2b7b202367418b6d2d7"
+ }
+ Frame {
+ msec: 2240
+ hash: "524840a3453af4e97ac82b559308cce3"
+ }
+ Frame {
+ msec: 2256
+ hash: "11436091b24c02af94dfa75a5fd1a001"
+ }
+ Frame {
+ msec: 2272
+ hash: "d3689b53474b4b26630d70ba01c057b4"
+ }
+ Frame {
+ msec: 2288
+ hash: "16e2b66f28ed80d80d9b5264d89624d5"
+ }
+ Frame {
+ msec: 2304
+ hash: "87636076959de7e5a0a8bd8b31354ed4"
+ }
+ Frame {
+ msec: 2320
+ hash: "a6916da6bfac27aa87d75da2bbb73f31"
+ }
+ Frame {
+ msec: 2336
+ hash: "58cfba3aae4bf54a5b445e0e34571d2d"
+ }
+ Frame {
+ msec: 2352
+ hash: "1475ae722afd169cc0c8e1fde39eb6b7"
+ }
+ Frame {
+ msec: 2368
+ hash: "14d08c2ca430631af8ede1013f4f4da0"
+ }
+ Frame {
+ msec: 2384
+ hash: "ace9db9112d147569dc0cf1a1b680d6c"
+ }
+ Frame {
+ msec: 2400
+ hash: "08bc6815601417f3731eaae398d0861d"
+ }
+ Frame {
+ msec: 2416
+ hash: "809870dfd9b05ce07170edd945348ddf"
+ }
+ Frame {
+ msec: 2432
+ hash: "5784deb0f3270cf7a0d0964cd9d31458"
+ }
+ Frame {
+ msec: 2448
+ hash: "2f06ee407e5175d4b954e31c39c9522c"
+ }
+ Frame {
+ msec: 2464
+ hash: "48a7dbed293fbbd5ea202190837a411f"
+ }
+ Frame {
+ msec: 2480
+ hash: "abf3d90803cfa12d35d2752be7ea02d8"
+ }
+ Frame {
+ msec: 2496
+ hash: "a60edcf8d792f93a839e6ddbafbf993f"
+ }
+ Frame {
+ msec: 2512
+ hash: "7e8dfe86ea0849022355b12578d4cb1a"
+ }
+ Frame {
+ msec: 2528
+ hash: "3c84122b0933ee870f178d39469e51e2"
+ }
+ Frame {
+ msec: 2544
+ hash: "25f463e91febf5b6d8819fd5010bc1c2"
+ }
+ Frame {
+ msec: 2560
+ hash: "d423a9bc912237d0f20b924849ba0cb1"
+ }
+ Frame {
+ msec: 2576
+ hash: "5bd3cc309a5fce6183654975543250b2"
+ }
+ Frame {
+ msec: 2592
+ hash: "4e401b5ebff6e442fa108e94a5dba668"
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/zooming/data/zooming.0.png b/tests/auto/declarative/visual/webview/zooming/data/zooming.0.png
new file mode 100644
index 0000000000..aaab35d4f2
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/data/zooming.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/zooming/data/zooming.1.png b/tests/auto/declarative/visual/webview/zooming/data/zooming.1.png
new file mode 100644
index 0000000000..aaab35d4f2
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/data/zooming.1.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/zooming/data/zooming.2.png b/tests/auto/declarative/visual/webview/zooming/data/zooming.2.png
new file mode 100644
index 0000000000..aaab35d4f2
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/data/zooming.2.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/zooming/data/zooming.3.png b/tests/auto/declarative/visual/webview/zooming/data/zooming.3.png
new file mode 100644
index 0000000000..aaab35d4f2
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/data/zooming.3.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/zooming/data/zooming.qml b/tests/auto/declarative/visual/webview/zooming/data/zooming.qml
new file mode 100644
index 0000000000..ad83800acf
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/data/zooming.qml
@@ -0,0 +1,2115 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 32
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 48
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 64
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 80
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 96
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 112
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 128
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 144
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 160
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 176
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 192
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 208
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 224
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 240
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 256
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 272
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 288
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 304
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 320
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 336
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 352
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 197; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 185; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 368
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 169; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 384
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 161; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 400
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 155; y: 44
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 147; y: 46
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 416
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 141; y: 48
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 138; y: 48
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 432
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 130; y: 48
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 127; y: 48
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 448
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 125; y: 48
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 123; y: 48
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 464
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 480
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 121; y: 49
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 496
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 512
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 117; y: 53
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 116; y: 53
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 528
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 115; y: 54
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 544
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 113; y: 54
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 560
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 111; y: 53
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 111; y: 52
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 576
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 110; y: 50
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 592
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 109; y: 48
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 608
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 108; y: 46
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 624
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 108; y: 45
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 107; y: 44
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 640
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 106; y: 43
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 656
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 105; y: 42
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 672
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 105; y: 41
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 688
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 704
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 720
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 736
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 105; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 752
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 105; y: 39
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 768
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 105; y: 37
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 105; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 784
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 105; y: 35
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 105; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 800
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 816
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 106; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 832
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 848
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 864
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 880
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 896
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 106; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 912
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 928
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 944
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 960
+ image: "zooming.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 106; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 992
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1008
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1024
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1040
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1056
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 4
+ button: 1
+ buttons: 1
+ x: 106; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1072
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1088
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1104
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1120
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 106; y: 33
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1136
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1152
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1168
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1184
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 106; y: 34
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 106; y: 36
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1200
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 105; y: 38
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1216
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 103; y: 44
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1232
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 102; y: 46
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 98; y: 50
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1248
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 94; y: 56
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 90; y: 62
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1264
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 88; y: 70
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 84; y: 78
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1280
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 84; y: 86
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 84; y: 94
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1296
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 84; y: 104
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 86; y: 114
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1312
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 88; y: 124
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 92; y: 136
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1328
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 94; y: 146
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 96; y: 156
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1344
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 96; y: 164
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 96; y: 172
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1360
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 96; y: 180
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 96; y: 188
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1376
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 96; y: 190
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 96; y: 193
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1392
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 95; y: 195
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 95; y: 197
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1408
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 95; y: 198
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 95; y: 200
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1424
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 94; y: 201
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 94; y: 202
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1440
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 94; y: 204
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1456
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 93; y: 205
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1472
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 92; y: 206
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1488
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 92; y: 208
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1504
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 92; y: 210
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1520
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 92; y: 211
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 91; y: 212
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1536
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1552
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1568
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1584
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1600
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1616
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1632
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 91; y: 213
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1648
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1664
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1680
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1696
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1712
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 91; y: 214
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 91; y: 214
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1728
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1744
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1760
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1776
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 91; y: 214
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1792
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1808
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1824
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1840
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 4
+ button: 1
+ buttons: 1
+ x: 91; y: 214
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1856
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1872
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1888
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1904
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1920
+ image: "zooming.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 91; y: 214
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1952
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1968
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 1984
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2000
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2016
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2032
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2048
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2064
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2080
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2096
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2112
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2128
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 91; y: 212
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2144
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2160
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2176
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2192
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 89; y: 211
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2208
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 88; y: 211
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2224
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2240
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 86; y: 211
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2256
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 85; y: 211
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 84; y: 211
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2272
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 82; y: 211
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 80; y: 211
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2288
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 77; y: 211
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 75; y: 211
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2304
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 69; y: 213
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 66; y: 213
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2320
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 64; y: 213
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 62; y: 213
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2336
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 60; y: 213
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 58; y: 213
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2352
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 56; y: 213
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 55; y: 212
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2368
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2384
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2400
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2416
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2432
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2448
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2464
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2480
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 56; y: 213
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2496
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 58; y: 214
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 59; y: 214
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2512
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 61; y: 215
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 62; y: 216
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2528
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 63; y: 216
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2544
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2560
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2576
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2592
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 64; y: 216
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 64; y: 216
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2608
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2624
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2640
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2656
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2672
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 63; y: 216
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 63; y: 216
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2688
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 62; y: 216
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2704
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2720
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2736
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2752
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 4
+ button: 1
+ buttons: 1
+ x: 62; y: 216
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2768
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2784
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2800
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2816
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 62; y: 216
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2832
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2848
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 2864
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 62; y: 215
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2880
+ image: "zooming.2.png"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 62; y: 214
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2896
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 62; y: 213
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2912
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 62; y: 212
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 63; y: 211
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2928
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 63; y: 209
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 64; y: 208
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2944
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 66; y: 202
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 70; y: 198
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2960
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 72; y: 192
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 74; y: 186
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2976
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 76; y: 180
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 80; y: 170
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2992
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 84; y: 162
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 88; y: 152
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3008
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 94; y: 142
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 98; y: 130
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3024
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 102; y: 118
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 108; y: 108
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3040
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 112; y: 98
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 114; y: 90
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3056
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 120; y: 80
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 122; y: 72
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3072
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 126; y: 66
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 128; y: 58
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3088
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 132; y: 52
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 134; y: 46
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3104
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 136; y: 40
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 140; y: 32
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3120
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 144; y: 24
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 150; y: 18
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3136
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 154; y: 10
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 0
+ x: 160; y: 4
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 3152
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3168
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3184
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3200
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3216
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3232
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3248
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3264
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3280
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3296
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3312
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3328
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3344
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3360
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3376
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3392
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3408
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3424
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3440
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3456
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3472
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3488
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3504
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3520
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3536
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3552
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3568
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3584
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3600
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3616
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3632
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3648
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3664
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3680
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3696
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3712
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3728
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3744
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3760
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3776
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+ Frame {
+ msec: 3792
+ hash: "c98df558c41f1837398eead42392b780"
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/zooming/pageWidth.qml b/tests/auto/declarative/visual/webview/zooming/pageWidth.qml
new file mode 100644
index 0000000000..4a876dd670
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/pageWidth.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+import org.webkit 1.0
+
+WebView {
+ width: 200
+ height: 250
+ url: "resolution.html"
+ webPageWidth: 400
+ preferredWidth: 200
+}
diff --git a/tests/auto/declarative/visual/webview/zooming/qtlogo.png b/tests/auto/declarative/visual/webview/zooming/qtlogo.png
new file mode 100644
index 0000000000..399bd0b1d9
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/qtlogo.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/zooming/renderControl.html b/tests/auto/declarative/visual/webview/zooming/renderControl.html
new file mode 100644
index 0000000000..1a01a33997
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/renderControl.html
@@ -0,0 +1,7 @@
+<html>
+<body>
+<h1>Render Control</h1>
+<p>
+This test shows how zooming and panning can be
+optimized for speed over quality by delaying rendering.
+<img src="qtlogo.png">
diff --git a/tests/auto/declarative/visual/webview/zooming/renderControl.qml b/tests/auto/declarative/visual/webview/zooming/renderControl.qml
new file mode 100644
index 0000000000..49eb91b952
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/renderControl.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+import org.webkit 1.0
+
+Rectangle {
+ width: 200
+ height: 250
+ clip: true
+ WebView {
+ id: webview
+ width: 400
+ url: "renderControl.html"
+ x: SequentialAnimation {
+ repeat: true
+ NumberAnimation { from: 100; to: 0; duration: 200 }
+ PropertyAction { target: webview; property: "renderingEnabled"; value: false }
+ NumberAnimation { from: 0; to: -100; duration: 200 }
+ PropertyAction { target: webview; property: "renderingEnabled"; value: true }
+ NumberAnimation { from: -100; to: 100; duration: 400 }
+ }
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/zooming/resolution.html b/tests/auto/declarative/visual/webview/zooming/resolution.html
new file mode 100644
index 0000000000..75b1e3f59d
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/resolution.html
@@ -0,0 +1,6 @@
+<html>
+<body>
+<h1>Resolution</h1>
+<p>
+This test shows how zooming can include different resolutions.
+<img src="qtlogo.png">
diff --git a/tests/auto/declarative/visual/webview/zooming/resolution.qml b/tests/auto/declarative/visual/webview/zooming/resolution.qml
new file mode 100644
index 0000000000..854276839c
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/resolution.qml
@@ -0,0 +1,17 @@
+import Qt 4.6
+import org.webkit 1.0
+
+WebView {
+ width: 200 * zoomFactor
+ height: 250 * zoomFactor
+ scale: 1/zoomFactor
+ url: "resolution.html"
+ zoomFactor:
+ SequentialAnimation {
+ repeat: true
+ NumberAnimation { from: 1; to: 0.25; duration: 2000 }
+ NumberAnimation { from: 0.25; to: 1; duration: 2000 }
+ NumberAnimation { from: 1; to: 5; duration: 2000 }
+ NumberAnimation { from: 5; to: 1; duration: 2000 }
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/zooming/zoomTextOnly.html b/tests/auto/declarative/visual/webview/zooming/zoomTextOnly.html
new file mode 100644
index 0000000000..4997712fd5
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/zoomTextOnly.html
@@ -0,0 +1,7 @@
+<html>
+<body>
+<h1>Zoom Text Only</h1>
+<p>
+This test shows how zooming can be done just
+on text, not images.
+<img src="qtlogo.png">
diff --git a/tests/auto/declarative/visual/webview/zooming/zoomTextOnly.qml b/tests/auto/declarative/visual/webview/zooming/zoomTextOnly.qml
new file mode 100644
index 0000000000..c2e9348ff0
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/zoomTextOnly.qml
@@ -0,0 +1,15 @@
+import Qt 4.6
+import org.webkit 1.0
+
+WebView {
+ width: 200
+ height: 250
+ url: "zoomTextOnly.html"
+ settings.zoomTextOnly: true
+ zoomFactor:
+ SequentialAnimation {
+ repeat: true
+ NumberAnimation { from: 2; to: 0.25; duration: 1000 }
+ NumberAnimation { from: 0.25; to: 2; duration: 1000 }
+ }
+}
diff --git a/tests/auto/declarative/visual/webview/zooming/zooming.html b/tests/auto/declarative/visual/webview/zooming/zooming.html
new file mode 100644
index 0000000000..4e91035341
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/zooming.html
@@ -0,0 +1,6 @@
+<html>
+<body>
+<h1>Zooming</h1>
+<p>
+This test shows how zooming can be to HTML elements.</p>
+<img src="qtlogo.png">
diff --git a/tests/auto/declarative/visual/webview/zooming/zooming.qml b/tests/auto/declarative/visual/webview/zooming/zooming.qml
new file mode 100644
index 0000000000..9f0b8656f4
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/zooming/zooming.qml
@@ -0,0 +1,18 @@
+import Qt 4.6
+import org.webkit 1.0
+
+// Note that zooming is better done using zoomFactor and careful
+// control of rendering to avoid excessive re-rendering during
+// zoom animations. This test is written for simplicity.
+WebView {
+ width: 200
+ height: 250
+ x: Behavior { NumberAnimation { } }
+ y: Behavior { NumberAnimation { } }
+ scale: Behavior { NumberAnimation { } }
+ url: "zooming.html"
+ preferredWidth: width
+ preferredHeight: height
+ onDoubleClick: {console.log(clickX,clickY);heuristicZoom(clickX,clickY,2)}
+ onZoomTo: {console.log(zoom);scale=zoom;x=width/2-centerX;y=height/2-centerY}
+}
diff --git a/tests/auto/gestures/tst_gestures.cpp b/tests/auto/gestures/tst_gestures.cpp
index 986227ddd2..f8ecca3b95 100644
--- a/tests/auto/gestures/tst_gestures.cpp
+++ b/tests/auto/gestures/tst_gestures.cpp
@@ -58,7 +58,7 @@
static QPointF mapToGlobal(const QPointF &pt, QGraphicsItem *item, QGraphicsView *view)
{
- return view->mapToGlobal(view->mapFromScene(item->mapToScene(pt)));
+ return view->viewport()->mapToGlobal(view->mapFromScene(item->mapToScene(pt)));
}
class CustomGesture : public QGesture
@@ -261,15 +261,19 @@ protected:
eventsPtr->all << g->gestureType();
switch(g->state()) {
case Qt::GestureStarted:
+ emit gestureStarted(e->type(), g);
eventsPtr->started << g->gestureType();
break;
case Qt::GestureUpdated:
+ emit gestureUpdated(e->type(), g);
eventsPtr->updated << g->gestureType();
break;
case Qt::GestureFinished:
+ emit gestureFinished(e->type(), g);
eventsPtr->finished << g->gestureType();
break;
case Qt::GestureCanceled:
+ emit gestureCanceled(e->type(), g);
eventsPtr->canceled << g->gestureType();
break;
default:
@@ -283,13 +287,23 @@ protected:
}
return true;
}
+
+Q_SIGNALS:
+ void gestureStarted(QEvent::Type, QGesture *);
+ void gestureUpdated(QEvent::Type, QGesture *);
+ void gestureFinished(QEvent::Type, QGesture *);
+ void gestureCanceled(QEvent::Type, QGesture *);
+
+public Q_SLOTS:
+ void deleteThis() { delete this; }
};
// TODO rename to sendGestureSequence
static void sendCustomGesture(CustomEvent *event, QObject *object, QGraphicsScene *scene = 0)
{
+ QWeakPointer<QObject> receiver(object);
for (int i = CustomGesture::SerialMaybeThreshold;
- i <= CustomGesture::SerialFinishedThreshold; ++i) {
+ i <= CustomGesture::SerialFinishedThreshold && receiver; ++i) {
event->serial = i;
if (scene)
scene->sendEvent(qobject_cast<QGraphicsObject *>(object), event);
@@ -333,8 +347,14 @@ private slots:
void unregisterRecognizer();
void autoCancelGestures();
void autoCancelGestures2();
+ void graphicsViewParentPropagation();
void panelPropagation();
void panelStacksBehindParent();
+ void deleteGestureTargetWidget();
+ void deleteGestureTargetItem_data();
+ void deleteGestureTargetItem();
+ void viewportCoordinates();
+ void partialGesturePropagation();
};
tst_Gestures::tst_Gestures()
@@ -656,14 +676,16 @@ static const QColor InstanceColors[] = {
class GestureItem : public QGraphicsObject
{
+ Q_OBJECT
static int InstanceCount;
-
public:
GestureItem(const char *name = 0)
{
instanceNumber = InstanceCount++;
- if (name)
+ if (name) {
setObjectName(QLatin1String(name));
+ setToolTip(name);
+ }
size = QRectF(0, 0, 100, 100);
customEventsReceived = 0;
gestureEventsReceived = 0;
@@ -671,6 +693,8 @@ public:
events.clear();
overrideEvents.clear();
acceptGestureOverride = false;
+
+ scene = 0;
}
~GestureItem()
{
@@ -700,6 +724,9 @@ public:
bool acceptGestureOverride;
QSet<Qt::GestureType> ignoredGestures;
+ QSet<Qt::GestureType> ignoredStartedGestures;
+ QSet<Qt::GestureType> ignoredUpdatedGestures;
+ QSet<Qt::GestureType> ignoredFinishedGestures;
QRectF size;
int instanceNumber;
@@ -712,9 +739,11 @@ public:
events.clear();
overrideEvents.clear();
ignoredGestures.clear();
+ ignoredStartedGestures.clear();
+ ignoredUpdatedGestures.clear();
+ ignoredFinishedGestures.clear();
}
-protected:
QRectF boundingRect() const
{
return size;
@@ -734,6 +763,24 @@ protected:
QGestureEvent *e = static_cast<QGestureEvent *>(event);
foreach(Qt::GestureType type, ignoredGestures)
e->ignore(e->gesture(type));
+ foreach(QGesture *g, e->gestures()) {
+ switch (g->state()) {
+ case Qt::GestureStarted:
+ if (ignoredStartedGestures.contains(g->gestureType()))
+ e->ignore(g);
+ break;
+ case Qt::GestureUpdated:
+ if (ignoredUpdatedGestures.contains(g->gestureType()))
+ e->ignore(g);
+ break;
+ case Qt::GestureFinished:
+ if (ignoredFinishedGestures.contains(g->gestureType()))
+ e->ignore(g);
+ break;
+ default:
+ break;
+ }
+ }
} else if (event->type() == QEvent::GestureOverride) {
++gestureOverrideEventsReceived;
eventsPtr = &overrideEvents;
@@ -748,15 +795,19 @@ protected:
switch(g->state()) {
case Qt::GestureStarted:
eventsPtr->started << g->gestureType();
+ emit gestureStarted(e->type(), g);
break;
case Qt::GestureUpdated:
eventsPtr->updated << g->gestureType();
+ emit gestureUpdated(e->type(), g);
break;
case Qt::GestureFinished:
eventsPtr->finished << g->gestureType();
+ emit gestureFinished(e->type(), g);
break;
case Qt::GestureCanceled:
eventsPtr->canceled << g->gestureType();
+ emit gestureCanceled(e->type(), g);
break;
default:
Q_ASSERT(false);
@@ -769,6 +820,26 @@ protected:
}
return true;
}
+
+Q_SIGNALS:
+ void gestureStarted(QEvent::Type, QGesture *);
+ void gestureUpdated(QEvent::Type, QGesture *);
+ void gestureFinished(QEvent::Type, QGesture *);
+ void gestureCanceled(QEvent::Type, QGesture *);
+
+public:
+ // some arguments for the slots below:
+ QGraphicsScene *scene;
+
+public Q_SLOTS:
+ void deleteThis() { delete this; }
+ void addSelfToScene(QEvent::Type eventType, QGesture *)
+ {
+ if (eventType == QEvent::Gesture) {
+ disconnect(sender(), 0, this, SLOT(addSelfToScene(QEvent::Type,QGesture*)));
+ scene->addItem(this);
+ }
+ }
};
int GestureItem::InstanceCount = 0;
@@ -1471,6 +1542,67 @@ void tst_Gestures::autoCancelGestures2()
QCOMPARE(parent->events.all.count(), 2);
}
+void tst_Gestures::graphicsViewParentPropagation()
+{
+ QGraphicsScene scene;
+ QGraphicsView view(&scene);
+ view.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ GestureItem *item0 = new GestureItem("item0");
+ scene.addItem(item0);
+ item0->setPos(0, 0);
+ item0->grabGesture(CustomGesture::GestureType);
+ item0->setZValue(1);
+
+ GestureItem *item1 = new GestureItem("item1");
+ scene.addItem(item1);
+ item1->setPos(0, 0);
+ item1->setZValue(5);
+
+ GestureItem *item1_c1 = new GestureItem("item1_child1");
+ item1_c1->setParentItem(item1);
+ item1_c1->setPos(0, 0);
+
+ GestureItem *item1_c1_c1 = new GestureItem("item1_child1_child1");
+ item1_c1_c1->setParentItem(item1_c1);
+ item1_c1_c1->setPos(0, 0);
+
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+ view.ensureVisible(scene.sceneRect());
+
+ view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
+ item0->grabGesture(CustomGesture::GestureType, Qt::ReceivePartialGestures | Qt::IgnoredGesturesPropagateToParent);
+ item1->grabGesture(CustomGesture::GestureType, Qt::ReceivePartialGestures | Qt::IgnoredGesturesPropagateToParent);
+ item1_c1->grabGesture(CustomGesture::GestureType, Qt::IgnoredGesturesPropagateToParent);
+ item1_c1_c1->grabGesture(CustomGesture::GestureType, Qt::ReceivePartialGestures | Qt::IgnoredGesturesPropagateToParent);
+
+ item0->ignoredUpdatedGestures << CustomGesture::GestureType;
+ item0->ignoredFinishedGestures << CustomGesture::GestureType;
+ item1->ignoredUpdatedGestures << CustomGesture::GestureType;
+ item1->ignoredFinishedGestures << CustomGesture::GestureType;
+ item1_c1->ignoredUpdatedGestures << CustomGesture::GestureType;
+ item1_c1->ignoredFinishedGestures << CustomGesture::GestureType;
+ item1_c1_c1->ignoredUpdatedGestures << CustomGesture::GestureType;
+ item1_c1_c1->ignoredFinishedGestures << CustomGesture::GestureType;
+
+ static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1;
+
+ CustomEvent event;
+ event.hotSpot = mapToGlobal(QPointF(10, 10), item1_c1, &view);
+ event.hasHotSpot = true;
+ sendCustomGesture(&event, item0, &scene);
+
+ QCOMPARE(item1_c1_c1->gestureEventsReceived, TotalGestureEventsCount);
+ QCOMPARE(item1_c1_c1->gestureOverrideEventsReceived, 1);
+ QCOMPARE(item1_c1->gestureEventsReceived, TotalGestureEventsCount-1);
+ QCOMPARE(item1_c1->gestureOverrideEventsReceived, 1);
+ QCOMPARE(item1->gestureEventsReceived, TotalGestureEventsCount-1);
+ QCOMPARE(item1->gestureOverrideEventsReceived, 1);
+ QCOMPARE(item0->gestureEventsReceived, 0);
+ QCOMPARE(item0->gestureOverrideEventsReceived, 1);
+}
+
void tst_Gestures::panelPropagation()
{
QGraphicsScene scene;
@@ -1638,5 +1770,184 @@ void tst_Gestures::panelStacksBehindParent()
QCOMPARE(panel->gestureOverrideEventsReceived, 0);
}
+void tst_Gestures::deleteGestureTargetWidget()
+{
+}
+
+void tst_Gestures::deleteGestureTargetItem_data()
+{
+ QTest::addColumn<bool>("propagateUpdateGesture");
+ QTest::addColumn<QString>("emitter");
+ QTest::addColumn<QString>("receiver");
+ QTest::addColumn<QByteArray>("signalName");
+ QTest::addColumn<QByteArray>("slotName");
+
+ QByteArray gestureUpdated = SIGNAL(gestureUpdated(QEvent::Type,QGesture*));
+ QByteArray gestureFinished = SIGNAL(gestureFinished(QEvent::Type,QGesture*));
+ QByteArray deleteThis = SLOT(deleteThis());
+ QByteArray deleteLater = SLOT(deleteLater());
+
+ QTest::newRow("delete1")
+ << false << "item1" << "item1" << gestureUpdated << deleteThis;
+ QTest::newRow("delete2")
+ << false << "item2" << "item2" << gestureUpdated << deleteThis;
+ QTest::newRow("delete3")
+ << false << "item1" << "item2" << gestureUpdated << deleteThis;
+
+ QTest::newRow("deleteLater1")
+ << false << "item1" << "item1" << gestureUpdated << deleteLater;
+ QTest::newRow("deleteLater2")
+ << false << "item2" << "item2" << gestureUpdated << deleteLater;
+ QTest::newRow("deleteLater3")
+ << false << "item1" << "item2" << gestureUpdated << deleteLater;
+ QTest::newRow("deleteLater4")
+ << false << "item2" << "item1" << gestureUpdated << deleteLater;
+
+ QTest::newRow("delete-self-and-propagate")
+ << true << "item2" << "item2" << gestureUpdated << deleteThis;
+ QTest::newRow("deleteLater-self-and-propagate")
+ << true << "item2" << "item2" << gestureUpdated << deleteLater;
+ QTest::newRow("propagate-to-deletedLater")
+ << true << "item2" << "item1" << gestureUpdated << deleteLater;
+}
+
+void tst_Gestures::deleteGestureTargetItem()
+{
+ QFETCH(bool, propagateUpdateGesture);
+ QFETCH(QString, emitter);
+ QFETCH(QString, receiver);
+ QFETCH(QByteArray, signalName);
+ QFETCH(QByteArray, slotName);
+
+ QGraphicsScene scene;
+ QGraphicsView view(&scene);
+ view.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ GestureItem *item1 = new GestureItem("item1");
+ item1->grabGesture(CustomGesture::GestureType);
+ item1->setZValue(2);
+ scene.addItem(item1);
+
+ GestureItem *item2 = new GestureItem("item2");
+ item2->grabGesture(CustomGesture::GestureType);
+ item2->setZValue(5);
+ scene.addItem(item2);
+
+ QMap<QString, GestureItem *> items;
+ items.insert(item1->objectName(), item1);
+ items.insert(item2->objectName(), item2);
+
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+ view.ensureVisible(scene.sceneRect());
+
+ view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
+
+ if (propagateUpdateGesture)
+ item2->ignoredUpdatedGestures << CustomGesture::GestureType;
+ connect(items.value(emitter, 0), signalName, items.value(receiver, 0), slotName);
+
+ // some debug output to see the current test data tag, so if we crash
+ // we know which one caused the crash.
+ qDebug() << "<-- testing";
+
+ CustomEvent event;
+ event.hotSpot = mapToGlobal(QPointF(5, 5), item2, &view);
+ event.hasHotSpot = true;
+ sendCustomGesture(&event, item1, &scene);
+}
+
+class GraphicsView : public QGraphicsView
+{
+public:
+ GraphicsView(QGraphicsScene *scene, QWidget *parent = 0)
+ : QGraphicsView(scene, parent)
+ {
+ }
+
+ using QGraphicsView::setViewportMargins;
+};
+
+// just making sure that even if the graphicsview has margins hotspot still
+// works properly. It should use viewport for converting global coordinates to
+// scene coordinates.
+void tst_Gestures::viewportCoordinates()
+{
+ QGraphicsScene scene;
+ GraphicsView view(&scene);
+ view.setViewportMargins(10,20,15,25);
+ view.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ GestureItem *item1 = new GestureItem("item1");
+ item1->grabGesture(CustomGesture::GestureType);
+ item1->size = QRectF(0, 0, 3, 3);
+ item1->setZValue(2);
+ scene.addItem(item1);
+
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+ view.ensureVisible(scene.sceneRect());
+
+ view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
+
+ CustomEvent event;
+ event.hotSpot = mapToGlobal(item1->boundingRect().center(), item1, &view);
+ event.hasHotSpot = true;
+ sendCustomGesture(&event, item1, &scene);
+ QVERIFY(item1->gestureEventsReceived != 0);
+}
+
+void tst_Gestures::partialGesturePropagation()
+{
+ QGraphicsScene scene;
+ QGraphicsView view(&scene);
+ view.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ GestureItem *item1 = new GestureItem("item1");
+ item1->grabGesture(CustomGesture::GestureType);
+ item1->setZValue(8);
+ scene.addItem(item1);
+
+ GestureItem *item2 = new GestureItem("item2[partial]");
+ item2->grabGesture(CustomGesture::GestureType, Qt::ReceivePartialGestures);
+ item2->setZValue(6);
+ scene.addItem(item2);
+
+ GestureItem *item3 = new GestureItem("item3");
+ item3->grabGesture(CustomGesture::GestureType);
+ item3->setZValue(4);
+ scene.addItem(item3);
+
+ GestureItem *item4 = new GestureItem("item4[partial]");
+ item4->grabGesture(CustomGesture::GestureType, Qt::ReceivePartialGestures);
+ item4->setZValue(2);
+ scene.addItem(item4);
+
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+ view.ensureVisible(scene.sceneRect());
+
+ view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
+
+ item1->ignoredUpdatedGestures << CustomGesture::GestureType;
+
+ CustomEvent event;
+ event.hotSpot = mapToGlobal(QPointF(5, 5), item1, &view);
+ event.hasHotSpot = true;
+ sendCustomGesture(&event, item1, &scene);
+
+ static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1;
+
+ QCOMPARE(item1->gestureOverrideEventsReceived, 1);
+ QCOMPARE(item2->gestureOverrideEventsReceived, 1);
+ QCOMPARE(item3->gestureOverrideEventsReceived, 1);
+ QCOMPARE(item4->gestureOverrideEventsReceived, 1);
+
+ QCOMPARE(item1->gestureEventsReceived, TotalGestureEventsCount);
+ QCOMPARE(item2->gestureEventsReceived, TotalGestureEventsCount-2); // except for started and finished
+ QCOMPARE(item3->gestureEventsReceived, 0);
+ QCOMPARE(item4->gestureEventsReceived, 0);
+}
+
QTEST_MAIN(tst_Gestures)
#include "tst_gestures.moc"
diff --git a/tests/auto/gui.pro b/tests/auto/gui.pro
index a4ed04a577..10a760c086 100644
--- a/tests/auto/gui.pro
+++ b/tests/auto/gui.pro
@@ -159,6 +159,7 @@ SUBDIRS=\
qstandarditem \
qstandarditemmodel \
qstatemachine \
+ qstatictext \
qstatusbar \
qstringlistmodel \
qstyle \
diff --git a/tests/auto/headers/headers.pro b/tests/auto/headers/headers.pro
index 703da7c91b..74e1a02d6e 100644
--- a/tests/auto/headers/headers.pro
+++ b/tests/auto/headers/headers.pro
@@ -1,3 +1,3 @@
load(qttest_p4)
-SOURCES += tst_headers.cpp
+SOURCES += tst_headers.cpp headersclean.cpp
QT = core
diff --git a/tests/auto/headers/headersclean.cpp b/tests/auto/headers/headersclean.cpp
new file mode 100644
index 0000000000..b932b9f907
--- /dev/null
+++ b/tests/auto/headers/headersclean.cpp
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#define QT_NO_KEYWORDS
+#define signals int
+#define slots int
+#define emit public:;
+#define foreach public:;
+#define forever public:;
+
+// include all of Qt here
+
+// core Qt
+#include <QtCore/QtCore>
+#include <QtGui/QtGui>
+#include <QtNetwork/QtNetwork>
+
+// extra
+#include <QtDBus/QtDBus>
+//#include <QtDeclarative/QtDeclarative>
+#include <QtHelp/QtHelp>
+#include <QtMultimedia/QtMultimedia>
+#include <QtOpenGL/QtOpenGL>
+#include <QtScript/QtScript>
+#include <QtScriptTools/QtScriptTools>
+#include <QtSql/QtSql>
+#include <QtSvg/QtSvg>
+#include <QtTest/QtTest>
+#include <QtXml/QtXml>
+#include <QtXmlPatterns/QtXmlPatterns>
+
+// webkit:
+#include <QtWebKit/QtWebKit>
+
+// designer:
+#include <QtDesigner/QtDesigner>
+#include <QtUiTools/QtUiTools>
+
+// feature dependent:
+#ifndef QT_NO_OPENVG
+#include <QtOpenVG/QtOpenVG>
+#endif
+
+// removed in 4.7:
+//#include <QtAssistant/QtAssistant>
+
+// can't include this since it causes a linker error
+//#include <Qt3Support/Qt3Support>
diff --git a/tests/auto/headers/tst_headers.cpp b/tests/auto/headers/tst_headers.cpp
index 5f79923b7d..12c5843740 100644
--- a/tests/auto/headers/tst_headers.cpp
+++ b/tests/auto/headers/tst_headers.cpp
@@ -65,6 +65,7 @@ private:
const QRegExp &exclude);
static QStringList getHeaders(const QString &path);
static QStringList getSourceFiles(const QString &path);
+ static QStringList getQDocFiles(const QString &path);
void allSourceFilesData();
void allHeadersData();
@@ -111,6 +112,11 @@ QStringList tst_Headers::getSourceFiles(const QString &path)
return getFiles(path, QStringList("*.cpp"), QRegExp("^(?!(moc_|qrc_))"));
}
+QStringList tst_Headers::getQDocFiles(const QString &path)
+{
+ return getFiles(path, QStringList("*.qdoc"), QRegExp("."));
+}
+
void tst_Headers::initTestCase()
{
qtSrcDir = QString::fromLocal8Bit(qgetenv("QTSRCDIR").isEmpty()
@@ -149,6 +155,7 @@ void tst_Headers::allSourceFilesData()
for (int i = 0; i < sizeof(subdirs) / sizeof(subdirs[0]); ++i) {
sourceFiles << getSourceFiles(qtSrcDir + subdirs[i]);
sourceFiles << getHeaders(qtSrcDir + subdirs[i]);
+ sourceFiles << getQDocFiles(qtSrcDir + subdirs[i]);
}
foreach (QString sourceFile, sourceFiles) {
@@ -192,22 +199,28 @@ void tst_Headers::licenseCheck()
QByteArray data = f.readAll();
data.replace("\r\n", "\n"); // Windows
data.replace('\r', '\n'); // Mac OS9
- QStringList content = QString::fromLocal8Bit(data).split("\n");
+ QStringList content = QString::fromLocal8Bit(data).split("\n", QString::SkipEmptyParts);
+
+ if (content.count() <= 2) // likely a #include line and empty line only. Not a copyright issue.
+ return;
if (content.first().contains("generated")) {
content.takeFirst();
- if (content.first().isEmpty())
- content.takeFirst();
}
if (sourceFile.endsWith("/tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp")
|| sourceFile.endsWith("/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp"))
{
// These files are meant to start with empty lines.
- while (content.first().isEmpty() || content.first().startsWith("//"))
+ while (content.first().startsWith("//"))
content.takeFirst();
}
+ if (sourceFile.endsWith("/doc/src/classes/phonon-api.qdoc")) {
+ // This is an external file
+ return;
+ }
+
QVERIFY(licensePattern.exactMatch(content.value(8)) ||
licensePattern.exactMatch(content.value(5)));
QString licenseType = licensePattern.cap(1);
@@ -258,6 +271,7 @@ void tst_Headers::macros()
if (header.endsWith("_p.h") || header.endsWith("_pch.h")
|| header.contains("global/qconfig-") || header.endsWith("/qconfig.h")
|| header.contains("/src/tools/") || header.contains("/src/plugins/")
+ || header.contains("/src/imports/")
|| header.endsWith("/qiconset.h") || header.endsWith("/qfeatures.h")
|| header.endsWith("qt_windows.h"))
return;
diff --git a/tests/auto/linguist/lupdate/testdata/good/respfile/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/respfile/lupdatecmd
new file mode 100644
index 0000000000..6f198ab839
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/respfile/lupdatecmd
@@ -0,0 +1,2 @@
+# Add the command that lupdate should run here. If it can't find anything it will default to
+lupdate -silent @sources.lst -ts @tsfiles.lst
diff --git a/tests/auto/linguist/lupdate/testdata/good/respfile/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/respfile/project.ts.result
new file mode 100644
index 0000000000..3a864a2149
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/respfile/project.ts.result
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<context>
+ <name>Dialog2</name>
+ <message>
+ <location filename="source1.cpp" line="47"/>
+ <source>func1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="source2.cpp" line="47"/>
+ <source>func2</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/respfile/source1.cpp b/tests/auto/linguist/lupdate/testdata/good/respfile/source1.cpp
new file mode 100644
index 0000000000..3327d1ea04
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/respfile/source1.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// IMPORTANT!!!! If you want to add testdata to this file,
+// always add it to the end in order to not change the linenumbers of translations!!!
+
+void Dialog2::func3()
+{
+ tr("func1");
+}
+
diff --git a/tests/auto/linguist/lupdate/testdata/good/respfile/source2.cpp b/tests/auto/linguist/lupdate/testdata/good/respfile/source2.cpp
new file mode 100644
index 0000000000..f284a61f28
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/respfile/source2.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// IMPORTANT!!!! If you want to add testdata to this file,
+// always add it to the end in order to not change the linenumbers of translations!!!
+
+void Dialog2::func3()
+{
+ tr("func2");
+}
+
diff --git a/tests/auto/linguist/lupdate/testdata/good/respfile/sources.lst b/tests/auto/linguist/lupdate/testdata/good/respfile/sources.lst
new file mode 100644
index 0000000000..430937e495
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/respfile/sources.lst
@@ -0,0 +1,2 @@
+source1.cpp
+source2.cpp
diff --git a/tests/auto/linguist/lupdate/testdata/good/respfile/tsfiles.lst b/tests/auto/linguist/lupdate/testdata/good/respfile/tsfiles.lst
new file mode 100644
index 0000000000..f3eb71f1cb
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/respfile/tsfiles.lst
@@ -0,0 +1 @@
+project.ts
diff --git a/tests/auto/modeltest/dynamictreemodel.cpp b/tests/auto/modeltest/dynamictreemodel.cpp
index 24d3ab3ce6..b572eb16a1 100644
--- a/tests/auto/modeltest/dynamictreemodel.cpp
+++ b/tests/auto/modeltest/dynamictreemodel.cpp
@@ -160,10 +160,11 @@ QVariant DynamicTreeModel::data(const QModelIndex &index, int role) const
void DynamicTreeModel::clear()
{
+ beginResetModel();
m_items.clear();
m_childItems.clear();
nextId = 1;
- reset();
+ endResetModel();
}
diff --git a/tests/auto/modeltest/tst_modeltest.cpp b/tests/auto/modeltest/tst_modeltest.cpp
index 95326d4b73..da5cd6af0d 100644
--- a/tests/auto/modeltest/tst_modeltest.cpp
+++ b/tests/auto/modeltest/tst_modeltest.cpp
@@ -67,6 +67,7 @@ private slots:
void standardItemModel();
void testInsertThroughProxy();
void moveSourceItems();
+ void testResetThroughProxy();
};
@@ -225,8 +226,9 @@ public slots:
void storePersistent()
{
- m_persistentSourceIndexes.clear();
- m_persistentProxyIndexes.clear();
+ foreach(const QModelIndex &idx, m_persistentProxyIndexes)
+ Q_ASSERT(idx.isValid()); // This is called from layoutAboutToBeChanged. Persistent indexes should be valid
+
Q_ASSERT(m_proxy->persistent().isEmpty());
storePersistent(QModelIndex());
Q_ASSERT(!m_proxy->persistent().isEmpty());
@@ -243,6 +245,8 @@ public slots:
QModelIndex updatedSource = m_persistentSourceIndexes.at(row);
QCOMPARE(m_proxy->mapToSource(updatedProxy), updatedSource);
}
+ m_persistentSourceIndexes.clear();
+ m_persistentProxyIndexes.clear();
}
private:
@@ -278,6 +282,28 @@ void tst_ModelTest::moveSourceItems()
moveCommand->doCommand();
}
+void tst_ModelTest::testResetThroughProxy()
+{
+ DynamicTreeModel *model = new DynamicTreeModel(this);
+
+ ModelInsertCommand *insertCommand = new ModelInsertCommand(model, this);
+ insertCommand->setStartRow(0);
+ insertCommand->setEndRow(2);
+ insertCommand->doCommand();
+
+ QPersistentModelIndex persistent = model->index(0, 0);
+
+ AccessibleProxyModel *proxy = new AccessibleProxyModel(this);
+ proxy->setSourceModel(model);
+
+ ObservingObject observer(proxy);
+ observer.storePersistent();
+
+ ModelResetCommand *resetCommand = new ModelResetCommand(model, this);
+ resetCommand->setNumCols(0);
+ resetCommand->doCommand();
+}
+
QTEST_MAIN(tst_ModelTest)
#include "tst_modeltest.moc"
diff --git a/tests/auto/multimedia.pro b/tests/auto/multimedia.pro
index 20d1f7f70f..f55d6e4a5e 100644
--- a/tests/auto/multimedia.pro
+++ b/tests/auto/multimedia.pro
@@ -6,6 +6,21 @@ SUBDIRS=\
qaudioformat \
qaudioinput \
qaudiooutput \
+ qsoundeffect \
+ qdeclarativeaudio \
+ qdeclarativevideo \
+ qgraphicsvideoitem \
+ qmediacontent \
+ qmediaobject \
+ qmediaplayer \
+ qmediaplaylist \
+ qmediaplaylistnavigator \
+ qmediapluginloader \
+ qmediaresource \
+ qmediaservice \
+ qmediaserviceprovider \
+ qmediatimerange \
qvideoframe \
qvideosurfaceformat \
+ qvideowidget \
diff --git a/tests/auto/network.pro b/tests/auto/network.pro
index bda03d3dd7..6b24850808 100644
--- a/tests/auto/network.pro
+++ b/tests/auto/network.pro
@@ -17,11 +17,14 @@ SUBDIRS=\
qhttpsocketengine \
qnativesocketengine \
qnetworkaddressentry \
+ qnetworkconfigmanager \
+ qnetworkconfiguration \
qnetworkcookie \
qnetworkcookiejar \
qnetworkinterface \
qnetworkproxy \
qnetworkrequest \
+ qnetworksession \
qobjectperformance \
qsocketnotifier \
qsocks5socketengine \
diff --git a/tests/auto/opengl.pro b/tests/auto/opengl.pro
index 0d2321932c..7220c45b3c 100644
--- a/tests/auto/opengl.pro
+++ b/tests/auto/opengl.pro
@@ -1,4 +1,6 @@
TEMPLATE=subdirs
SUBDIRS=\
qgl \
+ qgl_threads \
+ qglbuffer \
diff --git a/tests/auto/q3listview/tst_q3listview.cpp b/tests/auto/q3listview/tst_q3listview.cpp
index 4de6f9558a..56fa25f2a9 100644
--- a/tests/auto/q3listview/tst_q3listview.cpp
+++ b/tests/auto/q3listview/tst_q3listview.cpp
@@ -39,6 +39,7 @@
**
****************************************************************************/
+#include <iostream>
#include <QtTest/QtTest>
@@ -87,6 +88,8 @@ public slots:
private slots:
void getSetCheck();
void sortchild();
+ void sortchild2(); // item -> item -> 3 items
+ void sortchild3(); // item -> 3 items
void takeItem_data();
void takeItem();
void selections_mouseClick_data();
@@ -262,7 +265,7 @@ void tst_Q3ListView::sortchild()
QVERIFY( item == item1 );
listview->setSorting( 0, FALSE );
-
+
item = listview->firstChild();
QVERIFY( item == item1 );
item = item->itemBelow();
@@ -291,6 +294,127 @@ void tst_Q3ListView::sortchild()
delete listview;
}
+void tst_Q3ListView::sortchild2()
+{
+ Q3ListView* listview = new Q3ListView( 0 );
+
+ listview->addColumn( "" );
+
+ Q3ListViewItem* item1 = new Q3ListViewItem( listview, "zzz" );
+ Q3ListViewItem* item2 = new Q3ListViewItem( listview, "hhh" );
+ Q3ListViewItem* item3 = new Q3ListViewItem( listview, "bbb" );
+ Q3ListViewItem* item4 = new Q3ListViewItem( listview, "jjj" );
+ Q3ListViewItem* item5 = new Q3ListViewItem( listview, "ddd" );
+ Q3ListViewItem* item6 = new Q3ListViewItem( listview, "lll" );
+
+ Q3ListViewItem* item31 = new Q3ListViewItem( item3, "bbb-level2" );
+
+ Q3ListViewItem* item31b = new Q3ListViewItem( item31, "234" );
+ Q3ListViewItem* item31c = new Q3ListViewItem( item31, "345" );
+ Q3ListViewItem* item31a = new Q3ListViewItem( item31, "123" );
+
+ listview->setOpen( item3, TRUE );
+ listview->setOpen( item31, TRUE );
+
+ listview->setSorting( 0, TRUE );
+ listview->show();
+
+ Q3ListViewItem *item = listview->firstChild();
+ QVERIFY( item == item3 );
+ item = item->itemBelow();
+ QVERIFY( item == item31 );
+ item = item->itemBelow();
+ QVERIFY( item == item31a );
+ item = item->itemBelow();
+ QVERIFY( item == item31b );
+ item = item->itemBelow();
+ QVERIFY( item == item31c );
+ item = item->itemBelow();
+ QVERIFY( item == item5 );
+ item = item->itemBelow();
+ QVERIFY( item == item2 );
+ item = item->itemBelow();
+ QVERIFY( item == item4 );
+ item = item->itemBelow();
+ QVERIFY( item == item6 );
+ item = item->itemBelow();
+ QVERIFY( item == item1 );
+
+ listview->setSorting( 0, FALSE );
+
+ item = listview->firstChild();
+ QVERIFY( item == item1 );
+ item = item->itemBelow();
+ QVERIFY( item == item6 );
+ item = item->itemBelow();
+ QVERIFY( item == item4 );
+ item = item->itemBelow();
+ QVERIFY( item == item2 );
+ item = item->itemBelow();
+ QVERIFY( item == item5 );
+ item = item->itemBelow();
+ QVERIFY( item == item3 );
+ item = item->itemBelow();
+ QVERIFY( item == item31 );
+ item = item->itemBelow();
+ QVERIFY( item == item31c );
+ item = item->itemBelow();
+ QVERIFY( item == item31b );
+ item = item->itemBelow();
+ QVERIFY( item == item31a );
+
+ item = listview->firstChild();
+ item->moveItem( item->itemBelow() );
+
+ listview->setSorting( 0, FALSE );
+ QVERIFY( item == listview->firstChild() );
+
+ delete listview;
+}
+
+void tst_Q3ListView::sortchild3()
+{
+ Q3ListView* listview = new Q3ListView( 0 );
+
+ listview->addColumn( "" );
+
+ Q3ListViewItem* item3 = new Q3ListViewItem( listview, "bbb" );
+
+
+ Q3ListViewItem* item31b = new Q3ListViewItem( item3, "234" );
+ Q3ListViewItem* item31c = new Q3ListViewItem( item3, "345" );
+ Q3ListViewItem* item31a = new Q3ListViewItem( item3, "123" );
+
+ listview->setOpen( item3, TRUE );
+
+ listview->setSorting( 0, TRUE );
+ listview->show();
+
+ Q3ListViewItem *item = listview->firstChild();
+ QVERIFY( item == item3 );
+ item = item->itemBelow();
+ QVERIFY( item == item31a );
+ item = item->itemBelow();
+ QVERIFY( item == item31b );
+ item = item->itemBelow();
+ QVERIFY( item == item31c );
+ item = item->itemBelow();
+
+ listview->setSorting( 0, FALSE );
+
+ item = listview->firstChild();
+ QVERIFY( item == item3 );
+ item = item->itemBelow();
+ QVERIFY( item == item31c );
+ item = item->itemBelow();
+ QVERIFY( item == item31b );
+ item = item->itemBelow();
+ QVERIFY( item == item31a );
+
+ delete listview;
+}
+
+
void tst_Q3ListView::takeItem_data()
{
QTest::addColumn<Q3ListView::SelectionMode>("selectionMode");
diff --git a/tests/auto/qapplication/desktopsettingsaware/desktopsettingsaware.pro b/tests/auto/qapplication/desktopsettingsaware/desktopsettingsaware.pro
index 93a03db7ae..e8b1ce95ef 100644
--- a/tests/auto/qapplication/desktopsettingsaware/desktopsettingsaware.pro
+++ b/tests/auto/qapplication/desktopsettingsaware/desktopsettingsaware.pro
@@ -13,8 +13,3 @@ wince*|symbian*:TARGET = ../desktopsettingsaware
SOURCES += main.cpp
CONFIG += qt warn_on create_prl link_prl
CONFIG -= app_bundle
-
-!symbian*: {
-OBJECTS_DIR=.obj/debug-shared
-MOC_DIR=.moc/debug-shared
-}
diff --git a/tests/auto/qapplication/tst_qapplication.cpp b/tests/auto/qapplication/tst_qapplication.cpp
index b464867072..459ac2ba13 100644
--- a/tests/auto/qapplication/tst_qapplication.cpp
+++ b/tests/auto/qapplication/tst_qapplication.cpp
@@ -706,36 +706,6 @@ void tst_QApplication::quitOnLastWindowClosed()
QSignalSpy spy(&app, SIGNAL(aboutToQuit()));
QSignalSpy spy2(&timer, SIGNAL(timeout()));
- QPointer<QMainWindow> mainWindow = new QMainWindow;
- QPointer<QWidget> invisibleTopLevelWidget = new QWidget;
- invisibleTopLevelWidget->setAttribute(Qt::WA_DontShowOnScreen);
-
- QVERIFY(app.quitOnLastWindowClosed());
- QVERIFY(mainWindow->testAttribute(Qt::WA_QuitOnClose));
- QVERIFY(invisibleTopLevelWidget->testAttribute(Qt::WA_QuitOnClose));
- QVERIFY(invisibleTopLevelWidget->testAttribute(Qt::WA_DontShowOnScreen));
-
- mainWindow->show();
- invisibleTopLevelWidget->show();
-
- timer.start();
- QTimer::singleShot(1000, mainWindow, SLOT(close())); // This should quit the application
- QTimer::singleShot(2000, &app, SLOT(quit())); // This makes sure we quit even if it didn't
-
- app.exec();
-
- QCOMPARE(spy.count(), 1);
- QVERIFY(spy2.count() < 15); // Should be around 10 if closing caused the quit
- }
- {
- int argc = 0;
- QApplication app(argc, 0, QApplication::GuiServer);
- QTimer timer;
- timer.setInterval(100);
-
- QSignalSpy spy(&app, SIGNAL(aboutToQuit()));
- QSignalSpy spy2(&timer, SIGNAL(timeout()));
-
QPointer<CloseEventTestWindow> mainWindow = new CloseEventTestWindow;
QVERIFY(app.quitOnLastWindowClosed());
diff --git a/tests/auto/qbearertestcommon.h b/tests/auto/qbearertestcommon.h
new file mode 100644
index 0000000000..c9df249afe
--- /dev/null
+++ b/tests/auto/qbearertestcommon.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QBEARERTESTCOMMON_H
+#define QBEARERTESTCOMMON_H
+
+// Wait for __expr to happen, while still allowing events to be processed.
+#define QTRY_NOOP(__expr) \
+ do { \
+ const int __step = 50; \
+ const int __timeout = 15000; \
+ if (!(__expr)) { \
+ QTest::qWait(0); \
+ } \
+ for (int __i = 0; __i < __timeout && !(__expr); __i+=__step) { \
+ QTest::qWait(__step); \
+ } \
+ } while(0)
+
+// Will try to wait for the condition while allowing event processing
+#define QTRY_VERIFY(__expr) \
+ do { \
+ const int __step = 50; \
+ const int __timeout = 90000; \
+ if (!(__expr)) { \
+ QTest::qWait(0); \
+ } \
+ for (int __i = 0; __i < __timeout && !(__expr); __i+=__step) { \
+ QTest::qWait(__step); \
+ } \
+ QVERIFY(__expr); \
+ } while(0)
+
+// Will try to wait for the condition while allowing event processing
+#define QTRY_COMPARE(__expr, __expected) \
+ do { \
+ const int __step = 50; \
+ const int __timeout = 90000; \
+ if ((__expr) != (__expected)) { \
+ QTest::qWait(0); \
+ } \
+ for (int __i = 0; __i < __timeout && ((__expr) != (__expected)); __i+=__step) { \
+ QTest::qWait(__step); \
+ } \
+ QCOMPARE(__expr, __expected); \
+ } while(0)
+
+#endif
+
diff --git a/tests/auto/qbrush/tst_qbrush.cpp b/tests/auto/qbrush/tst_qbrush.cpp
index bc2bc60e63..628e8598e9 100644
--- a/tests/auto/qbrush/tst_qbrush.cpp
+++ b/tests/auto/qbrush/tst_qbrush.cpp
@@ -108,6 +108,15 @@ void tst_QBrush::operator_eq_eq_data()
<< false;
QTest::newRow("rad vs con") << QBrush(QRadialGradient(0, 0, 0, 0, 0)) << QBrush(QConicalGradient(0, 0, 0)) << false;
+
+ QBrush b1(lg);
+ QBrush b2(lg);
+ b1.setTransform(QTransform().scale(2, 2));
+ QTest::newRow("lg with transform vs same lg") << b1 << b2 << false;
+
+ b2.setTransform(QTransform().scale(2, 2));
+ QTest::newRow("lg w/transform vs same lg w/same transform") << b1 << b2 << true;
+
}
void tst_QBrush::operator_eq_eq()
diff --git a/tests/auto/qbytearray/tst_qbytearray.cpp b/tests/auto/qbytearray/tst_qbytearray.cpp
index 5c72c7a572..07fdbc3e62 100644
--- a/tests/auto/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/qbytearray/tst_qbytearray.cpp
@@ -111,6 +111,7 @@ private slots:
void remove();
void replace_data();
void replace();
+ void replaceWithSpecifiedLength();
void indexOf_data();
void indexOf();
void lastIndexOf_data();
@@ -840,6 +841,18 @@ void tst_QByteArray::replace()
QCOMPARE(str2.replace(pos, len, after.data()), expected);
}
+void tst_QByteArray::replaceWithSpecifiedLength()
+{
+ const char after[] = "zxc\0vbnmqwert";
+ int lenAfter = 6;
+ QByteArray ba("abcdefghjk");
+ ba.replace(0,2,after,lenAfter);
+
+ const char _expected[] = "zxc\0vbcdefghjk";
+ QByteArray expected(_expected,sizeof(_expected)-1);
+ QCOMPARE(ba,expected);
+}
+
void tst_QByteArray::indexOf_data()
{
QTest::addColumn<QByteArray>("haystack");
diff --git a/tests/auto/qchar/qchar.pro b/tests/auto/qchar/qchar.pro
index fca4ef687c..0a3fcc32e5 100644
--- a/tests/auto/qchar/qchar.pro
+++ b/tests/auto/qchar/qchar.pro
@@ -8,3 +8,4 @@ deploy.sources += NormalizationTest.txt
DEPLOYMENT = deploy
}
+DEFINES += SRCDIR=\\\"$$PWD/\\\"
diff --git a/tests/auto/qchar/tst_qchar.cpp b/tests/auto/qchar/tst_qchar.cpp
index 241b9a57e5..6227c2ed75 100644
--- a/tests/auto/qchar/tst_qchar.cpp
+++ b/tests/auto/qchar/tst_qchar.cpp
@@ -72,6 +72,7 @@ private slots:
void toLower();
void toTitle();
void toCaseFolded();
+ void isPrint();
void isUpper();
void isLower();
void category();
@@ -218,6 +219,12 @@ void tst_QChar::toCaseFolded()
QVERIFY(QChar::toCaseFolded((ushort)0xb5) == 0x3bc);
}
+void tst_QChar::isPrint()
+{
+ QVERIFY(QChar('A').isPrint());
+ QVERIFY(!QChar(0x1aff).isPrint()); // General_Gategory =Cn
+}
+
void tst_QChar::isUpper()
{
QVERIFY(QChar('A').isUpper());
@@ -259,6 +266,12 @@ void tst_QChar::category()
QVERIFY(QChar::category(0xd900u) == QChar::Other_Surrogate);
QVERIFY(QChar::category(0xdc00u) == QChar::Other_Surrogate);
QVERIFY(QChar::category(0xdc01u) == QChar::Other_Surrogate);
+
+ QVERIFY(QChar::category((uint)0x10fffdu) == QChar::Other_PrivateUse);
+ QVERIFY(QChar::category((uint)0x110000u) == QChar::NoCategory);
+
+ QVERIFY(QChar::category((uint)0x1aff) == QChar::Other_NotAssigned);
+ QVERIFY(QChar::category((uint)0x10ffffu) == QChar::Other_NotAssigned);
}
void tst_QChar::direction()
@@ -499,10 +512,7 @@ void tst_QChar::normalization()
QVERIFY(composed.normalized(QString::NormalizationForm_KC) == decomposed);
}
- QFile f("NormalizationTest.txt");
- // Windows - current directory is the debug/release subdirectory where the executable is located
- if (!f.exists())
- f.setFileName("../NormalizationTest.txt");;
+ QFile f(SRCDIR "NormalizationTest.txt");
if (!f.exists()) {
QFAIL("Couldn't find NormalizationTest.txt");
return;
diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp
index fbaa824ef5..1fcea9e034 100644
--- a/tests/auto/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/qcombobox/tst_qcombobox.cpp
@@ -156,6 +156,7 @@ private slots:
void resetModel();
void keyBoardNavigationWithMouse();
void task_QTBUG_1071_changingFocusEmitsActivated();
+ void maxVisibleItems();
protected slots:
void onEditTextChanged( const QString &newString );
@@ -2529,5 +2530,34 @@ void tst_QComboBox::task_QTBUG_1071_changingFocusEmitsActivated()
QTRY_COMPARE(spy.count(), 1);
}
+void tst_QComboBox::maxVisibleItems()
+{
+ QComboBox comboBox;
+ QCOMPARE(comboBox.maxVisibleItems(), 10); //default value.
+
+ QStringList content;
+ for(int i = 1; i < 50; i++)
+ content += QString::number(i);
+
+ comboBox.addItems(content);
+ comboBox.show();
+ comboBox.resize(200, comboBox.height());
+ QTRY_VERIFY(comboBox.isVisible());
+
+ comboBox.setMaxVisibleItems(5);
+ QCOMPARE(comboBox.maxVisibleItems(), 5);
+
+ comboBox.showPopup();
+ QTRY_VERIFY(comboBox.view());
+ QTRY_VERIFY(comboBox.view()->isVisible());
+
+ QAbstractItemView *v = comboBox.view();
+ int itemHeight = v->visualRect(v->model()->index(0,0)).height();
+ if (v->style()->styleHint(QStyle::SH_ComboBox_Popup))
+ QCOMPARE(v->viewport()->height(), itemHeight * comboBox.maxVisibleItems());
+ // QCombobox without a popup does not work, see QTBUG-760
+}
+
+
QTEST_MAIN(tst_QComboBox)
#include "tst_qcombobox.moc"
diff --git a/tests/auto/qdatastream/tst_qdatastream.cpp b/tests/auto/qdatastream/tst_qdatastream.cpp
index c94ea7b29d..31e12fe27f 100644
--- a/tests/auto/qdatastream/tst_qdatastream.cpp
+++ b/tests/auto/qdatastream/tst_qdatastream.cpp
@@ -162,6 +162,9 @@ private slots:
void stream_QIcon_data();
void stream_QIcon();
+ void stream_QEasingCurve_data();
+ void stream_QEasingCurve();
+
void stream_atEnd_data();
void stream_atEnd();
@@ -243,6 +246,7 @@ private:
void writeqint64(QDataStream *s);
void writeQWMatrix(QDataStream *s);
void writeQIcon(QDataStream *s);
+ void writeQEasingCurve(QDataStream *s);
void readbool(QDataStream *s);
void readQBool(QDataStream *s);
@@ -272,6 +276,7 @@ private:
void readqint64(QDataStream *s);
void readQWMatrix(QDataStream *s);
void readQIcon(QDataStream *s);
+ void readQEasingCurve(QDataStream *s);
private:
QString svgFile;
@@ -687,6 +692,70 @@ void tst_QDataStream::readHash(QDataStream *s)
// ************************************
+static QEasingCurve QEasingCurveData(int index)
+{
+ QEasingCurve easing;
+
+ switch (index) {
+ case 0:
+ default:
+ break;
+ case 1:
+ easing.setType(QEasingCurve::Linear);
+ break;
+ case 2:
+ easing.setType(QEasingCurve::OutCubic);
+ break;
+ case 3:
+ easing.setType(QEasingCurve::InOutSine);
+ break;
+ case 4:
+ easing.setType(QEasingCurve::InOutElastic);
+ easing.setPeriod(1.5);
+ easing.setAmplitude(2.0);
+ break;
+ case 5:
+ easing.setType(QEasingCurve::OutInBack);
+ break;
+ case 6:
+ easing.setType(QEasingCurve::OutCurve);
+ break;
+ case 7:
+ easing.setType(QEasingCurve::InOutBack);
+ easing.setOvershoot(0.5);
+ break;
+ }
+ return easing;
+}
+#define MAX_EASING_DATA 8
+
+void tst_QDataStream::stream_QEasingCurve_data()
+{
+ stream_data(MAX_EASING_DATA);
+}
+
+void tst_QDataStream::stream_QEasingCurve()
+{
+ STREAM_IMPL(QEasingCurve);
+}
+
+void tst_QDataStream::writeQEasingCurve(QDataStream* s)
+{
+ QEasingCurve test(QEasingCurveData(dataIndex(QTest::currentDataTag())));
+ *s << test;
+}
+
+void tst_QDataStream::readQEasingCurve(QDataStream *s)
+{
+ QEasingCurve S;
+ QEasingCurve expected(QEasingCurveData(dataIndex(QTest::currentDataTag())));
+
+ *s >> S;
+ QCOMPARE(S, expected);
+}
+
+// ************************************
+
// contains some quint64 testing as well
#define MAX_qint64_DATA 4
diff --git a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp
index b92b873a7e..558d4de3b7 100644
--- a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp
+++ b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp
@@ -3357,6 +3357,8 @@ void tst_QDateTimeEdit::keypadAutoAdvance_data()
QTest::addColumn<Qt::KeyboardModifiers>("modifiers");
QTest::newRow("None") << (Qt::KeyboardModifiers)Qt::NoModifier;
QTest::newRow("Keypad") << (Qt::KeyboardModifiers)Qt::KeypadModifier;
+ // QTBUG-7842: Using KeyPad with shift (numlock off)
+ QTest::newRow("Keypad+Shift") << (Qt::KeyboardModifiers)(Qt::KeypadModifier|Qt::ShiftModifier);
}
diff --git a/tests/auto/qdbuspendingcall/tst_qdbuspendingcall.cpp b/tests/auto/qdbuspendingcall/tst_qdbuspendingcall.cpp
index 7208383f41..a55a4275c4 100644
--- a/tests/auto/qdbuspendingcall/tst_qdbuspendingcall.cpp
+++ b/tests/auto/qdbuspendingcall/tst_qdbuspendingcall.cpp
@@ -41,6 +41,7 @@
#include <QtCore/QObject>
#include <QtCore/QVariant>
#include <QtCore/QList>
+#include <QtCore/QThread>
#include <QtCore/QVector>
#include <QtTest/QtTest>
#ifndef QT_NO_DBUS
@@ -90,6 +91,7 @@ private Q_SLOTS:
void watcher();
void watcher_error();
void watcher_waitForFinished();
+ void watcher_waitForFinished_threaded();
void watcher_waitForFinished_alreadyFinished();
void watcher_waitForFinished_alreadyFinished_eventLoop();
void watcher_waitForFinished_error();
@@ -124,7 +126,8 @@ void tst_QDBusPendingCall::finished(QDBusPendingCallWatcher *call)
slotCalled = FinishCalled;
++callCount;
watchArgument = call;
- QTestEventLoop::instance().exitLoop();
+ if (QThread::currentThread() == thread())
+ QTestEventLoop::instance().exitLoop();
}
void tst_QDBusPendingCall::callback(const QStringList &list)
@@ -377,6 +380,56 @@ void tst_QDBusPendingCall::watcher_waitForFinished()
QVERIFY(args2.at(0).toStringList().contains(conn.baseService()));
}
+void tst_QDBusPendingCall::watcher_waitForFinished_threaded()
+{
+ callCount = 0;
+ watchArgument = 0;
+ slotCalled = 0;
+
+ class WorkerThread: public QThread {
+ public:
+ tst_QDBusPendingCall *tst;
+ WorkerThread(tst_QDBusPendingCall *tst) : tst(tst) {}
+ void run()
+ {
+ QDBusPendingCall ac = tst->sendMessage();
+// QVERIFY(!ac.isFinished());
+// QVERIFY(!ac.isError());
+// QVERIFY(ac.reply().type() == QDBusMessage::InvalidMessage);
+
+ QDBusPendingCallWatcher watch(ac);
+ tst->connect(&watch, SIGNAL(finished(QDBusPendingCallWatcher*)),
+ SLOT(finished(QDBusPendingCallWatcher*)), Qt::DirectConnection);
+
+ QTest::qSleep(100); // don't process events in this thread
+
+// QVERIFY(!ac.isFinished());
+// QVERIFY(!ac.isError());
+// QVERIFY(ac.reply().type() == QDBusMessage::InvalidMessage);
+ QCOMPARE(tst->callCount, 0);
+ QCOMPARE(tst->slotCalled, 0);
+
+ watch.waitForFinished();
+ QVERIFY(ac.isFinished());
+ QVERIFY(!ac.isError());
+
+ QCOMPARE(tst->callCount, 1);
+ QCOMPARE(tst->slotCalled, (int)FinishCalled);
+ QCOMPARE(tst->watchArgument, &watch);
+ QVERIFY(!watch.isError());
+
+ const QVariantList args2 = ac.reply().arguments();
+ QVERIFY(!args2.isEmpty());
+ QVERIFY(args2.at(0).toStringList().contains(tst->conn.baseService()));
+ }
+ } thread(this);
+ QTestEventLoop::instance().connect(&thread, SIGNAL(finished()), SLOT(exitLoop()));
+ thread.start();
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!thread.isRunning());
+ QVERIFY(!QTestEventLoop::instance().timeout());
+}
+
void tst_QDBusPendingCall::watcher_waitForFinished_alreadyFinished()
{
QDBusPendingCall ac = sendMessage();
diff --git a/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro b/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro
new file mode 100644
index 0000000000..7779efce89
--- /dev/null
+++ b/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro
@@ -0,0 +1,14 @@
+load(qttest_p4)
+
+HEADERS += \
+ $$PWD/../../../src/imports/multimedia/qdeclarativeaudio_p.h \
+ $$PWD/../../../src/imports/multimedia/qdeclarativemediabase_p.h \
+ $$PWD/../../../src/imports/multimedia/qmetadatacontrolmetaobject_p.h
+
+SOURCES += \
+ tst_qdeclarativeaudio.cpp \
+ $$PWD/../../../src/imports/multimedia/qdeclarativeaudio.cpp \
+ $$PWD/../../../src/imports/multimedia/qdeclarativemediabase.cpp \
+ $$PWD/../../../src/imports/multimedia/qmetadatacontrolmetaobject.cpp
+
+QT += multimedia declarative
diff --git a/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp b/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
new file mode 100644
index 0000000000..d750c69995
--- /dev/null
+++ b/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
@@ -0,0 +1,1200 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include "../../../src/imports/multimedia/qdeclarativeaudio_p.h"
+
+#include <QtGui/qapplication.h>
+#include <QtMultimedia/qmediaplayercontrol.h>
+#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/qmetadatacontrol.h>
+
+
+class tst_QmlAudio : public QObject
+{
+ Q_OBJECT
+public slots:
+ void initTestCase();
+
+private slots:
+ void nullPlayerControl();
+ void nullMetaDataControl();
+ void nullService();
+
+ void source();
+ void playing();
+ void paused();
+ void duration();
+ void position();
+ void volume();
+ void muted();
+ void bufferProgress();
+ void seekable();
+ void playbackRate();
+ void status();
+ void metaData_data();
+ void metaData();
+ void error();
+};
+
+Q_DECLARE_METATYPE(QtMultimedia::MetaData);
+Q_DECLARE_METATYPE(QDeclarativeAudio::Error);
+
+class QtTestMediaPlayerControl : public QMediaPlayerControl
+{
+ Q_OBJECT
+public:
+ QtTestMediaPlayerControl(QObject *parent = 0)
+ : QMediaPlayerControl(parent)
+ , m_state(QMediaPlayer::StoppedState)
+ , m_mediaStatus(QMediaPlayer::NoMedia)
+ , m_duration(0)
+ , m_position(0)
+ , m_playbackRate(1.0)
+ , m_volume(50)
+ , m_bufferStatus(0)
+ , m_muted(false)
+ , m_audioAvailable(false)
+ , m_videoAvailable(false)
+ , m_seekable(false)
+ {
+ }
+
+ QMediaPlayer::State state() const { return m_state; }
+ void updateState(QMediaPlayer::State state) { emit stateChanged(m_state = state); }
+
+ QMediaPlayer::MediaStatus mediaStatus() const { return m_mediaStatus; }
+ void updateMediaStatus(QMediaPlayer::MediaStatus status) {
+ emit mediaStatusChanged(m_mediaStatus = status); }
+ void updateMediaStatus(QMediaPlayer::MediaStatus status, QMediaPlayer::State state)
+ {
+ m_mediaStatus = status;
+ m_state = state;
+
+ emit mediaStatusChanged(m_mediaStatus);
+ emit stateChanged(m_state);
+ }
+
+ qint64 duration() const { return m_duration; }
+ void setDuration(qint64 duration) { emit durationChanged(m_duration = duration); }
+
+ qint64 position() const { return m_position; }
+ void setPosition(qint64 position) { emit positionChanged(m_position = position); }
+
+ int volume() const { return m_volume; }
+ void setVolume(int volume) { emit volumeChanged(m_volume = volume); }
+
+ bool isMuted() const { return m_muted; }
+ void setMuted(bool muted) { emit mutedChanged(m_muted = muted); }
+
+ int bufferStatus() const { return m_bufferStatus; }
+ void setBufferStatus(int status) { emit bufferStatusChanged(m_bufferStatus = status); }
+
+ bool isAudioAvailable() const { return m_audioAvailable; }
+ void setAudioAvailable(bool available) {
+ emit audioAvailableChanged(m_audioAvailable = available); }
+ bool isVideoAvailable() const { return m_videoAvailable; }
+ void setVideoAvailable(bool available) {
+ emit videoAvailableChanged(m_videoAvailable = available); }
+
+ bool isSeekable() const { return m_seekable; }
+ void setSeekable(bool seekable) { emit seekableChanged(m_seekable = seekable); }
+
+ QMediaTimeRange availablePlaybackRanges() const { return QMediaTimeRange(); }
+
+ qreal playbackRate() const { return m_playbackRate; }
+ void setPlaybackRate(qreal rate) { emit playbackRateChanged(m_playbackRate = rate); }
+
+ QMediaContent media() const { return m_media; }
+ const QIODevice *mediaStream() const { return 0; }
+ void setMedia(const QMediaContent &media, QIODevice *)
+ {
+ m_media = media;
+
+ m_mediaStatus = m_media.isNull()
+ ? QMediaPlayer::NoMedia
+ : QMediaPlayer::LoadingMedia;
+
+ emit mediaChanged(m_media);
+ emit mediaStatusChanged(m_mediaStatus);
+ }
+
+ void play() { emit stateChanged(m_state = QMediaPlayer::PlayingState); }
+ void pause() { emit stateChanged(m_state = QMediaPlayer::PausedState); }
+ void stop() { emit stateChanged(m_state = QMediaPlayer::StoppedState); }
+
+ void emitError(QMediaPlayer::Error err, const QString &errorString) {
+ emit error(err, errorString); }
+
+private:
+ QMediaPlayer::State m_state;
+ QMediaPlayer::MediaStatus m_mediaStatus;
+ qint64 m_duration;
+ qint64 m_position;
+ qreal m_playbackRate;
+ int m_volume;
+ int m_bufferStatus;
+ bool m_muted;
+ bool m_audioAvailable;
+ bool m_videoAvailable;
+ bool m_seekable;
+ QMediaContent m_media;
+};
+
+class QtTestMetaDataControl : public QMetaDataControl
+{
+ Q_OBJECT
+public:
+ QtTestMetaDataControl(QObject *parent = 0)
+ : QMetaDataControl(parent)
+ {
+ }
+
+ bool isWritable() const { return true; }
+ bool isMetaDataAvailable() const { return true; }
+
+ QVariant metaData(QtMultimedia::MetaData key) const { return m_metaData.value(key); }
+ void setMetaData(QtMultimedia::MetaData key, const QVariant &value) {
+ m_metaData.insert(key, value); emit metaDataChanged(); }
+ void setMetaData(const QMap<QtMultimedia::MetaData, QVariant> &metaData) {
+ m_metaData = metaData; emit metaDataChanged(); }
+
+ QList<QtMultimedia::MetaData> availableMetaData() const { return m_metaData.keys(); }
+
+ QVariant extendedMetaData(const QString &) const { return QVariant(); }
+ void setExtendedMetaData(const QString &, const QVariant &) {}
+ QStringList availableExtendedMetaData() const { return QStringList(); }
+
+private:
+ QMap<QtMultimedia::MetaData, QVariant> m_metaData;
+};
+
+class QtTestMediaService : public QMediaService
+{
+ Q_OBJECT
+public:
+ QtTestMediaService(
+ QtTestMediaPlayerControl *playerControl,
+ QtTestMetaDataControl *metaDataControl,
+ QObject *parent)
+ : QMediaService(parent)
+ , playerControl(playerControl)
+ , metaDataControl(metaDataControl)
+ {
+ }
+
+ QMediaControl *control(const char *name) const
+ {
+ if (qstrcmp(name, QMediaPlayerControl_iid) == 0)
+ return playerControl;
+ else if (qstrcmp(name, QMetaDataControl_iid) == 0)
+ return metaDataControl;
+ else
+ return 0;
+ }
+
+ QtTestMediaPlayerControl *playerControl;
+ QtTestMetaDataControl *metaDataControl;
+};
+
+class QtTestMediaServiceProvider : public QMediaServiceProvider
+{
+ Q_OBJECT
+public:
+ QtTestMediaServiceProvider()
+ : service(new QtTestMediaService(
+ new QtTestMediaPlayerControl(this), new QtTestMetaDataControl(this), this))
+ {
+ setDefaultServiceProvider(this);
+ }
+
+ QtTestMediaServiceProvider(QtTestMediaService *service)
+ : service(service)
+ {
+ setDefaultServiceProvider(this);
+ }
+
+ QtTestMediaServiceProvider(
+ QtTestMediaPlayerControl *playerControl, QtTestMetaDataControl *metaDataControl)
+ : service(new QtTestMediaService(playerControl, metaDataControl, this))
+ {
+ setDefaultServiceProvider(this);
+ }
+
+ ~QtTestMediaServiceProvider()
+ {
+ setDefaultServiceProvider(0);
+ }
+
+ QMediaService *requestService(
+ const QByteArray &type,
+ const QMediaServiceProviderHint & = QMediaServiceProviderHint())
+ {
+ requestedService = type;
+
+ return service;
+ }
+
+ void releaseService(QMediaService *) {}
+
+ inline QtTestMediaPlayerControl *playerControl() { return service->playerControl; }
+ inline QtTestMetaDataControl *metaDataControl() { return service->metaDataControl; }
+
+ QtTestMediaService *service;
+ QByteArray requestedService;
+};
+
+
+void tst_QmlAudio::initTestCase()
+{
+ qRegisterMetaType<QDeclarativeAudio::Error>();
+}
+
+void tst_QmlAudio::nullPlayerControl()
+{
+ QtTestMetaDataControl metaDataControl;
+ QtTestMediaServiceProvider provider(0, &metaDataControl);
+
+ QDeclarativeAudio audio;
+
+ QCOMPARE(audio.source(), QUrl());
+ audio.setSource(QUrl("http://example.com"));
+ QCOMPARE(audio.source(), QUrl());
+
+ QCOMPARE(audio.isPlaying(), false);
+ audio.setPlaying(true);
+ QCOMPARE(audio.isPlaying(), false);
+ audio.play();
+ QCOMPARE(audio.isPlaying(), false);
+
+ QCOMPARE(audio.isPaused(), false);
+ audio.pause();
+ QCOMPARE(audio.isPaused(), false);
+ audio.setPaused(true);
+ QCOMPARE(audio.isPaused(), true);
+
+ QCOMPARE(audio.duration(), 0);
+
+ QCOMPARE(audio.position(), 0);
+ audio.setPosition(10000);
+ QCOMPARE(audio.position(), 0);
+
+ QCOMPARE(audio.volume(), qreal(0));
+ audio.setVolume(50);
+ QCOMPARE(audio.volume(), qreal(0));
+
+ QCOMPARE(audio.isMuted(), false);
+ audio.setMuted(true);
+ QCOMPARE(audio.isMuted(), false);
+
+ QCOMPARE(audio.bufferProgress(), qreal(0));
+
+ QCOMPARE(audio.isSeekable(), false);
+
+ QCOMPARE(audio.playbackRate(), qreal(1.0));
+
+ QCOMPARE(audio.status(), QDeclarativeAudio::NoMedia);
+
+ QCOMPARE(audio.error(), QDeclarativeAudio::ServiceMissing);
+}
+
+void tst_QmlAudio::nullMetaDataControl()
+{
+ QtTestMediaPlayerControl playerControl;
+ QtTestMediaServiceProvider provider(&playerControl, 0);
+
+ QDeclarativeAudio audio;
+
+ QCOMPARE(audio.metaObject()->indexOfProperty("title"), -1);
+ QCOMPARE(audio.metaObject()->indexOfProperty("genre"), -1);
+ QCOMPARE(audio.metaObject()->indexOfProperty("description"), -1);
+}
+
+void tst_QmlAudio::nullService()
+{
+ QtTestMediaServiceProvider provider(0);
+
+ QDeclarativeAudio audio;
+
+ QCOMPARE(audio.source(), QUrl());
+ audio.setSource(QUrl("http://example.com"));
+ QCOMPARE(audio.source(), QUrl());
+
+ QCOMPARE(audio.isPlaying(), false);
+ audio.setPlaying(true);
+ QCOMPARE(audio.isPlaying(), false);
+ audio.play();
+ QCOMPARE(audio.isPlaying(), false);
+
+ QCOMPARE(audio.isPaused(), false);
+ audio.pause();
+ QCOMPARE(audio.isPaused(), false);
+ audio.setPaused(true);
+ QCOMPARE(audio.isPaused(), true);
+
+ QCOMPARE(audio.duration(), 0);
+
+ QCOMPARE(audio.position(), 0);
+ audio.setPosition(10000);
+ QCOMPARE(audio.position(), 0);
+
+ QCOMPARE(audio.volume(), qreal(0));
+ audio.setVolume(50);
+ QCOMPARE(audio.volume(), qreal(0));
+
+ QCOMPARE(audio.isMuted(), false);
+ audio.setMuted(true);
+ QCOMPARE(audio.isMuted(), false);
+
+ QCOMPARE(audio.bufferProgress(), qreal(0));
+
+ QCOMPARE(audio.isSeekable(), false);
+
+ QCOMPARE(audio.playbackRate(), qreal(1.0));
+
+ QCOMPARE(audio.status(), QDeclarativeAudio::NoMedia);
+
+ QCOMPARE(audio.error(), QDeclarativeAudio::ServiceMissing);
+
+ QCOMPARE(audio.metaObject()->indexOfProperty("title"), -1);
+ QCOMPARE(audio.metaObject()->indexOfProperty("genre"), -1);
+ QCOMPARE(audio.metaObject()->indexOfProperty("description"), -1);
+}
+
+void tst_QmlAudio::source()
+{
+ const QUrl url1("http://example.com");
+ const QUrl url2("file:///local/path");
+ const QUrl url3;
+
+ QtTestMediaServiceProvider provider;
+ QDeclarativeAudio audio;
+
+ QSignalSpy spy(&audio, SIGNAL(sourceChanged()));
+
+ audio.setSource(url1);
+ QCOMPARE(audio.source(), url1);
+ QCOMPARE(provider.playerControl()->media().canonicalUrl(), url1);
+ QCOMPARE(spy.count(), 1);
+
+ audio.setSource(url2);
+ QCOMPARE(audio.source(), url2);
+ QCOMPARE(provider.playerControl()->media().canonicalUrl(), url2);
+ QCOMPARE(spy.count(), 2);
+
+ audio.setSource(url3);
+ QCOMPARE(audio.source(), url3);
+ QCOMPARE(provider.playerControl()->media().canonicalUrl(), url3);
+ QCOMPARE(spy.count(), 3);
+}
+
+void tst_QmlAudio::playing()
+{
+ QtTestMediaServiceProvider provider;
+ QDeclarativeAudio audio;
+
+ QSignalSpy playingChangedSpy(&audio, SIGNAL(playingChanged()));
+ QSignalSpy startedSpy(&audio, SIGNAL(started()));
+ QSignalSpy stoppedSpy(&audio, SIGNAL(stopped()));
+
+ int playingChanged = 0;
+ int started = 0;
+ int stopped = 0;
+
+ QCOMPARE(audio.isPlaying(), false);
+
+ // setPlaying(true) when stopped.
+ audio.setPlaying(true);
+ QCOMPARE(audio.isPlaying(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(startedSpy.count(), ++started);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPlaying(false) when playing.
+ audio.setPlaying(false);
+ QCOMPARE(audio.isPlaying(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(stoppedSpy.count(), ++stopped);
+
+ // play() when stopped.
+ audio.play();
+ QCOMPARE(audio.isPlaying(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(startedSpy.count(), ++started);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // stop() when playing.
+ audio.stop();
+ QCOMPARE(audio.isPlaying(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(stoppedSpy.count(), ++stopped);
+
+ // stop() when stopped.
+ audio.stop();
+ QCOMPARE(audio.isPlaying(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPlaying(false) when stopped.
+ audio.setPlaying(false);
+ QCOMPARE(audio.isPlaying(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ audio.setPlaying(true);
+ QCOMPARE(audio.isPlaying(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(startedSpy.count(), ++started);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPlaying(true) when playing.
+ audio.setPlaying(true);
+ QCOMPARE(audio.isPlaying(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // play() when playing.
+ audio.play();
+ QCOMPARE(audio.isPlaying(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(stoppedSpy.count(), stopped);
+}
+
+void tst_QmlAudio::paused()
+{
+ QtTestMediaServiceProvider provider;
+ QDeclarativeAudio audio;
+
+ QSignalSpy playingChangedSpy(&audio, SIGNAL(playingChanged()));
+ QSignalSpy pausedChangedSpy(&audio, SIGNAL(pausedChanged()));
+ QSignalSpy startedSpy(&audio, SIGNAL(started()));
+ QSignalSpy pausedSpy(&audio, SIGNAL(paused()));
+ QSignalSpy resumedSpy(&audio, SIGNAL(resumed()));
+ QSignalSpy stoppedSpy(&audio, SIGNAL(stopped()));
+
+ int playingChanged = 0;
+ int pausedChanged = 0;
+ int started = 0;
+ int paused = 0;
+ int resumed = 0;
+ int stopped = 0;
+
+ QCOMPARE(audio.isPlaying(), false);
+ QCOMPARE(audio.isPaused(), false);
+
+ // setPlaying(true) when stopped.
+ audio.setPlaying(true);
+ QCOMPARE(audio.isPlaying(), true);
+ QCOMPARE(audio.isPaused(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), ++started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPaused(true) when playing.
+ audio.setPaused(true);
+ QCOMPARE(audio.isPlaying(), true);
+ QCOMPARE(audio.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), ++paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPaused(true) when paused.
+ audio.setPaused(true);
+ QCOMPARE(audio.isPlaying(), true);
+ QCOMPARE(audio.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // pause() when paused.
+ audio.pause();
+ QCOMPARE(audio.isPlaying(), true);
+ QCOMPARE(audio.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPaused(false) when paused.
+ audio.setPaused(false);
+ QCOMPARE(audio.isPlaying(), true);
+ QCOMPARE(audio.isPaused(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), ++resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPaused(false) when playing.
+ audio.setPaused(false);
+ QCOMPARE(audio.isPlaying(), true);
+ QCOMPARE(audio.isPaused(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // pause() when playing.
+ audio.pause();
+ QCOMPARE(audio.isPlaying(), true);
+ QCOMPARE(audio.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), ++paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPlaying(false) when paused.
+ audio.setPlaying(false);
+ QCOMPARE(audio.isPlaying(), false);
+ QCOMPARE(audio.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), ++stopped);
+
+ // setPaused(true) when stopped and paused.
+ audio.setPaused(true);
+ QCOMPARE(audio.isPlaying(), false);
+ QCOMPARE(audio.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPaused(false) when stopped and paused.
+ audio.setPaused(false);
+ QCOMPARE(audio.isPlaying(), false);
+ QCOMPARE(audio.isPaused(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPaused(true) when stopped.
+ audio.setPaused(true);
+ QCOMPARE(audio.isPlaying(), false);
+ QCOMPARE(audio.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPlaying(true) when stopped and paused.
+ audio.setPlaying(true);
+ QCOMPARE(audio.isPlaying(), true);
+ QCOMPARE(audio.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), ++started);
+ QCOMPARE(pausedSpy.count(), ++paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // play() when paused.
+ audio.play();
+ QCOMPARE(audio.isPlaying(), true);
+ QCOMPARE(audio.isPaused(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), ++resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPaused(true) when playing.
+ audio.setPaused(true);
+ QCOMPARE(audio.isPlaying(), true);
+ QCOMPARE(audio.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), ++paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // stop() when paused.
+ audio.stop();
+ QCOMPARE(audio.isPlaying(), false);
+ QCOMPARE(audio.isPaused(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), ++stopped);
+
+ // setPaused(true) when stopped.
+ audio.setPaused(true);
+ QCOMPARE(audio.isPlaying(), false);
+ QCOMPARE(audio.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // stop() when stopped and paused.
+ audio.stop();
+ QCOMPARE(audio.isPlaying(), false);
+ QCOMPARE(audio.isPaused(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // pause() when stopped.
+ audio.pause();
+ QCOMPARE(audio.isPlaying(), true);
+ QCOMPARE(audio.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), ++started);
+ QCOMPARE(pausedSpy.count(), ++paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPlaying(false) when paused.
+ audio.setPlaying(false);
+ QCOMPARE(audio.isPlaying(), false);
+ QCOMPARE(audio.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), ++stopped);
+
+ // pause() when stopped and paused.
+ audio.pause();
+ QCOMPARE(audio.isPlaying(), true);
+ QCOMPARE(audio.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), ++started);
+ QCOMPARE(pausedSpy.count(), ++paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPlaying(false) when paused.
+ audio.setPlaying(false);
+ QCOMPARE(audio.isPlaying(), false);
+ QCOMPARE(audio.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), ++stopped);
+
+ // play() when stopped and paused.
+ audio.play();
+ QCOMPARE(audio.isPlaying(), true);
+ QCOMPARE(audio.isPaused(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), ++started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+}
+
+void tst_QmlAudio::duration()
+{
+ QtTestMediaServiceProvider provider;
+ QDeclarativeAudio audio;
+
+ QSignalSpy spy(&audio, SIGNAL(durationChanged()));
+
+ QCOMPARE(audio.duration(), 0);
+
+ provider.playerControl()->setDuration(4040);
+ QCOMPARE(audio.duration(), 4040);
+ QCOMPARE(spy.count(), 1);
+
+ provider.playerControl()->setDuration(-129);
+ QCOMPARE(audio.duration(), -129);
+ QCOMPARE(spy.count(), 2);
+
+ provider.playerControl()->setDuration(0);
+ QCOMPARE(audio.duration(), 0);
+ QCOMPARE(spy.count(), 3);
+
+ // Unnecessary duration changed signals aren't filtered.
+ provider.playerControl()->setDuration(0);
+ QCOMPARE(audio.duration(), 0);
+ QCOMPARE(spy.count(), 4);
+}
+
+void tst_QmlAudio::position()
+{
+ QtTestMediaServiceProvider provider;
+ QDeclarativeAudio audio;
+
+ QSignalSpy spy(&audio, SIGNAL(positionChanged()));
+
+ QCOMPARE(audio.position(), 0);
+
+ // QDeclarativeAudio won't bound set positions to the duration. A media service may though.
+ QCOMPARE(audio.duration(), 0);
+
+ audio.setPosition(450);
+ QCOMPARE(audio.position(), 450);
+ QCOMPARE(provider.playerControl()->position(), qint64(450));
+ QCOMPARE(spy.count(), 1);
+
+ audio.setPosition(-5403);
+ QCOMPARE(audio.position(), -5403);
+ QCOMPARE(provider.playerControl()->position(), qint64(-5403));
+ QCOMPARE(spy.count(), 2);
+
+ audio.setPosition(-5403);
+ QCOMPARE(audio.position(), -5403);
+ QCOMPARE(provider.playerControl()->position(), qint64(-5403));
+ QCOMPARE(spy.count(), 3);
+
+ // Check the signal change signal is emitted if the change originates from the media service.
+ provider.playerControl()->setPosition(0);
+ QCOMPARE(audio.position(), 0);
+ QCOMPARE(spy.count(), 4);
+
+ connect(&audio, SIGNAL(positionChanged()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+
+ provider.playerControl()->updateState(QMediaPlayer::PlayingState);
+ QTestEventLoop::instance().enterLoop(1);
+ QVERIFY(spy.count() > 4 && spy.count() < 7); // 5 or 6
+
+ provider.playerControl()->updateState(QMediaPlayer::PausedState);
+ QTestEventLoop::instance().enterLoop(1);
+ QVERIFY(spy.count() < 7);
+}
+
+void tst_QmlAudio::volume()
+{
+ QtTestMediaServiceProvider provider;
+ QDeclarativeAudio audio;
+
+ QSignalSpy spy(&audio, SIGNAL(volumeChanged()));
+
+ QCOMPARE(audio.volume(), qreal(0.5));
+
+ audio.setVolume(0.7);
+ QCOMPARE(audio.volume(), qreal(0.7));
+ QCOMPARE(provider.playerControl()->volume(), 70);
+ QCOMPARE(spy.count(), 1);
+
+ audio.setVolume(0.7);
+ QCOMPARE(audio.volume(), qreal(0.7));
+ QCOMPARE(provider.playerControl()->volume(), 70);
+ QCOMPARE(spy.count(), 2);
+
+ provider.playerControl()->setVolume(30);
+ QCOMPARE(audio.volume(), qreal(0.3));
+ QCOMPARE(spy.count(), 3);
+}
+
+void tst_QmlAudio::muted()
+{
+ QtTestMediaServiceProvider provider;
+ QDeclarativeAudio audio;
+
+ QSignalSpy spy(&audio, SIGNAL(mutedChanged()));
+
+ QCOMPARE(audio.isMuted(), false);
+
+ audio.setMuted(true);
+ QCOMPARE(audio.isMuted(), true);
+ QCOMPARE(provider.playerControl()->isMuted(), true);
+ QCOMPARE(spy.count(), 1);
+
+ provider.playerControl()->setMuted(false);
+ QCOMPARE(audio.isMuted(), false);
+ QCOMPARE(spy.count(), 2);
+
+ audio.setMuted(false);
+ QCOMPARE(audio.isMuted(), false);
+ QCOMPARE(provider.playerControl()->isMuted(), false);
+ QCOMPARE(spy.count(), 3);
+}
+
+void tst_QmlAudio::bufferProgress()
+{
+ QtTestMediaServiceProvider provider;
+ QDeclarativeAudio audio;
+
+ QSignalSpy spy(&audio, SIGNAL(bufferProgressChanged()));
+
+ QCOMPARE(audio.bufferProgress(), qreal(0.0));
+
+ provider.playerControl()->setBufferStatus(20);
+ QCOMPARE(audio.bufferProgress(), qreal(0.2));
+ QCOMPARE(spy.count(), 1);
+
+ provider.playerControl()->setBufferStatus(20);
+ QCOMPARE(audio.bufferProgress(), qreal(0.2));
+ QCOMPARE(spy.count(), 2);
+
+ provider.playerControl()->setBufferStatus(40);
+ QCOMPARE(audio.bufferProgress(), qreal(0.4));
+ QCOMPARE(spy.count(), 3);
+
+ connect(&audio, SIGNAL(positionChanged()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+
+ provider.playerControl()->updateMediaStatus(
+ QMediaPlayer::BufferingMedia, QMediaPlayer::PlayingState);
+ QTestEventLoop::instance().enterLoop(1);
+ QVERIFY(spy.count() > 3 && spy.count() < 6); // 4 or 5
+
+ provider.playerControl()->updateMediaStatus(QMediaPlayer::BufferedMedia);
+ QTestEventLoop::instance().enterLoop(1);
+ QVERIFY(spy.count() < 6);
+}
+
+void tst_QmlAudio::seekable()
+{
+ QtTestMediaServiceProvider provider;
+ QDeclarativeAudio audio;
+
+ QSignalSpy spy(&audio, SIGNAL(seekableChanged()));
+
+ QCOMPARE(audio.isSeekable(), false);
+
+ provider.playerControl()->setSeekable(true);
+ QCOMPARE(audio.isSeekable(), true);
+ QCOMPARE(spy.count(), 1);
+
+ provider.playerControl()->setSeekable(true);
+ QCOMPARE(audio.isSeekable(), true);
+ QCOMPARE(spy.count(), 2);
+
+ provider.playerControl()->setSeekable(false);
+ QCOMPARE(audio.isSeekable(), false);
+ QCOMPARE(spy.count(), 3);
+}
+
+void tst_QmlAudio::playbackRate()
+{
+ QtTestMediaServiceProvider provider;
+ QDeclarativeAudio audio;
+
+ QSignalSpy spy(&audio, SIGNAL(playbackRateChanged()));
+
+ QCOMPARE(audio.playbackRate(), qreal(1.0));
+
+ audio.setPlaybackRate(0.5);
+ QCOMPARE(audio.playbackRate(), qreal(0.5));
+ QCOMPARE(provider.playerControl()->playbackRate(), qreal(0.5));
+ QCOMPARE(spy.count(), 1);
+
+ provider.playerControl()->setPlaybackRate(2.0);
+ QCOMPARE(provider.playerControl()->playbackRate(), qreal(2.0));
+ QCOMPARE(spy.count(), 2);
+
+ audio.setPlaybackRate(2.0);
+ QCOMPARE(audio.playbackRate(), qreal(2.0));
+ QCOMPARE(provider.playerControl()->playbackRate(), qreal(2.0));
+ QCOMPARE(spy.count(), 3);
+}
+
+void tst_QmlAudio::status()
+{
+ QtTestMediaServiceProvider provider;
+ QDeclarativeAudio audio;
+
+ QSignalSpy statusChangedSpy(&audio, SIGNAL(statusChanged()));
+ QSignalSpy loadedSpy(&audio, SIGNAL(loaded()));
+ QSignalSpy bufferingSpy(&audio, SIGNAL(buffering()));
+ QSignalSpy stalledSpy(&audio, SIGNAL(stalled()));
+ QSignalSpy bufferedSpy(&audio, SIGNAL(buffered()));
+ QSignalSpy endOfMediaSpy(&audio, SIGNAL(endOfMedia()));
+
+ QCOMPARE(audio.status(), QDeclarativeAudio::NoMedia);
+
+ // Set media, start loading.
+ provider.playerControl()->updateMediaStatus(QMediaPlayer::LoadingMedia);
+ QCOMPARE(audio.status(), QDeclarativeAudio::Loading);
+ QCOMPARE(statusChangedSpy.count(), 1);
+ QCOMPARE(loadedSpy.count(), 0);
+ QCOMPARE(bufferingSpy.count(), 0);
+ QCOMPARE(stalledSpy.count(), 0);
+ QCOMPARE(bufferedSpy.count(), 0);
+ QCOMPARE(endOfMediaSpy.count(), 0);
+
+ // Finish loading.
+ provider.playerControl()->updateMediaStatus(QMediaPlayer::LoadedMedia);
+ QCOMPARE(audio.status(), QDeclarativeAudio::Loaded);
+ QCOMPARE(statusChangedSpy.count(), 2);
+ QCOMPARE(loadedSpy.count(), 1);
+ QCOMPARE(bufferingSpy.count(), 0);
+ QCOMPARE(stalledSpy.count(), 0);
+ QCOMPARE(bufferedSpy.count(), 0);
+ QCOMPARE(endOfMediaSpy.count(), 0);
+
+ // Play, start buffering.
+ provider.playerControl()->updateMediaStatus(
+ QMediaPlayer::StalledMedia, QMediaPlayer::PlayingState);
+ QCOMPARE(audio.status(), QDeclarativeAudio::Stalled);
+ QCOMPARE(statusChangedSpy.count(), 3);
+ QCOMPARE(loadedSpy.count(), 1);
+ QCOMPARE(bufferingSpy.count(), 0);
+ QCOMPARE(stalledSpy.count(), 1);
+ QCOMPARE(bufferedSpy.count(), 0);
+ QCOMPARE(endOfMediaSpy.count(), 0);
+
+ // Enough data buffered to proceed.
+ provider.playerControl()->updateMediaStatus(QMediaPlayer::BufferingMedia);
+ QCOMPARE(audio.status(), QDeclarativeAudio::Buffering);
+ QCOMPARE(statusChangedSpy.count(), 4);
+ QCOMPARE(loadedSpy.count(), 1);
+ QCOMPARE(bufferingSpy.count(), 1);
+ QCOMPARE(stalledSpy.count(), 1);
+ QCOMPARE(bufferedSpy.count(), 0);
+ QCOMPARE(endOfMediaSpy.count(), 0);
+
+ // Errant second buffering status changed.
+ provider.playerControl()->updateMediaStatus(QMediaPlayer::BufferingMedia);
+ QCOMPARE(audio.status(), QDeclarativeAudio::Buffering);
+ QCOMPARE(statusChangedSpy.count(), 4);
+ QCOMPARE(loadedSpy.count(), 1);
+ QCOMPARE(bufferingSpy.count(), 1);
+ QCOMPARE(stalledSpy.count(), 1);
+ QCOMPARE(bufferedSpy.count(), 0);
+ QCOMPARE(endOfMediaSpy.count(), 0);
+
+ // Buffer full.
+ provider.playerControl()->updateMediaStatus(QMediaPlayer::BufferedMedia);
+ QCOMPARE(audio.status(), QDeclarativeAudio::Buffered);
+ QCOMPARE(statusChangedSpy.count(), 5);
+ QCOMPARE(loadedSpy.count(), 1);
+ QCOMPARE(bufferingSpy.count(), 1);
+ QCOMPARE(stalledSpy.count(), 1);
+ QCOMPARE(bufferedSpy.count(), 1);
+ QCOMPARE(endOfMediaSpy.count(), 0);
+
+ // Buffer getting low.
+ provider.playerControl()->updateMediaStatus(QMediaPlayer::BufferingMedia);
+ QCOMPARE(audio.status(), QDeclarativeAudio::Buffering);
+ QCOMPARE(statusChangedSpy.count(), 6);
+ QCOMPARE(loadedSpy.count(), 1);
+ QCOMPARE(bufferingSpy.count(), 2);
+ QCOMPARE(stalledSpy.count(), 1);
+ QCOMPARE(bufferedSpy.count(), 1);
+ QCOMPARE(endOfMediaSpy.count(), 0);
+
+ // Buffer full.
+ provider.playerControl()->updateMediaStatus(QMediaPlayer::BufferedMedia);
+ QCOMPARE(audio.status(), QDeclarativeAudio::Buffered);
+ QCOMPARE(statusChangedSpy.count(), 7);
+ QCOMPARE(loadedSpy.count(), 1);
+ QCOMPARE(bufferingSpy.count(), 2);
+ QCOMPARE(stalledSpy.count(), 1);
+ QCOMPARE(bufferedSpy.count(), 2);
+ QCOMPARE(endOfMediaSpy.count(), 0);
+
+ // Finished.
+ provider.playerControl()->updateMediaStatus(
+ QMediaPlayer::EndOfMedia, QMediaPlayer::StoppedState);
+ QCOMPARE(audio.status(), QDeclarativeAudio::EndOfMedia);
+ QCOMPARE(statusChangedSpy.count(), 8);
+ QCOMPARE(loadedSpy.count(), 1);
+ QCOMPARE(bufferingSpy.count(), 2);
+ QCOMPARE(stalledSpy.count(), 1);
+ QCOMPARE(bufferedSpy.count(), 2);
+ QCOMPARE(endOfMediaSpy.count(), 1);
+}
+
+void tst_QmlAudio::metaData_data()
+{
+ QTest::addColumn<QByteArray>("propertyName");
+ QTest::addColumn<QtMultimedia::MetaData>("propertyKey");
+ QTest::addColumn<QVariant>("value1");
+ QTest::addColumn<QVariant>("value2");
+
+ QTest::newRow("title")
+ << QByteArray("title")
+ << QtMultimedia::Title
+ << QVariant(QString::fromLatin1("This is a title"))
+ << QVariant(QString::fromLatin1("This is another title"));
+
+ QTest::newRow("genre")
+ << QByteArray("genre")
+ << QtMultimedia::Genre
+ << QVariant(QString::fromLatin1("rock"))
+ << QVariant(QString::fromLatin1("pop"));
+
+ QTest::newRow("trackNumber")
+ << QByteArray("trackNumber")
+ << QtMultimedia::TrackNumber
+ << QVariant(8)
+ << QVariant(12);
+}
+
+void tst_QmlAudio::metaData()
+{
+ QFETCH(QByteArray, propertyName);
+ QFETCH(QtMultimedia::MetaData, propertyKey);
+ QFETCH(QVariant, value1);
+ QFETCH(QVariant, value2);
+
+ QtTestMediaServiceProvider provider;
+ QDeclarativeAudio audio;
+
+ QSignalSpy spy(&audio, SIGNAL(__metaDataChanged()));
+
+ const int index = audio.metaObject()->indexOfProperty(propertyName.constData());
+ QVERIFY(index != -1);
+
+ QMetaProperty property = audio.metaObject()->property(index);
+ QCOMPARE(property.read(&audio), QVariant());
+
+ property.write(&audio, value1);
+ QCOMPARE(property.read(&audio), value1);
+ QCOMPARE(provider.metaDataControl()->metaData(propertyKey), value1);
+ QCOMPARE(spy.count(), 1);
+
+ provider.metaDataControl()->setMetaData(propertyKey, value2);
+ QCOMPARE(property.read(&audio), value2);
+ QCOMPARE(spy.count(), 2);
+}
+
+void tst_QmlAudio::error()
+{
+ const QString errorString = QLatin1String("Failed to open device.");
+
+ QtTestMediaServiceProvider provider;
+ QDeclarativeAudio audio;
+
+ QSignalSpy errorSpy(&audio, SIGNAL(error(QDeclarativeAudio::Error,QString)));
+ QSignalSpy errorChangedSpy(&audio, SIGNAL(errorChanged()));
+
+ QCOMPARE(audio.error(), QDeclarativeAudio::NoError);
+ QCOMPARE(audio.errorString(), QString());
+
+ provider.playerControl()->emitError(QMediaPlayer::ResourceError, errorString);
+
+ QCOMPARE(audio.error(), QDeclarativeAudio::ResourceError);
+ QCOMPARE(audio.errorString(), errorString);
+ QCOMPARE(errorSpy.count(), 1);
+ QCOMPARE(errorChangedSpy.count(), 1);
+
+ // Changing the source resets the error properties.
+ audio.setSource(QUrl("http://example.com"));
+ QCOMPARE(audio.error(), QDeclarativeAudio::NoError);
+ QCOMPARE(audio.errorString(), QString());
+ QCOMPARE(errorSpy.count(), 1);
+ QCOMPARE(errorChangedSpy.count(), 2);
+
+ // But isn't noisy.
+ audio.setSource(QUrl("file:///file/path"));
+ QCOMPARE(audio.error(), QDeclarativeAudio::NoError);
+ QCOMPARE(audio.errorString(), QString());
+ QCOMPARE(errorSpy.count(), 1);
+ QCOMPARE(errorChangedSpy.count(), 2);
+}
+
+
+QTEST_MAIN(tst_QmlAudio)
+
+#include "tst_qdeclarativeaudio.moc"
diff --git a/tests/auto/qdeclarativevideo/qdeclarativevideo.pro b/tests/auto/qdeclarativevideo/qdeclarativevideo.pro
new file mode 100644
index 0000000000..4cd4c719fc
--- /dev/null
+++ b/tests/auto/qdeclarativevideo/qdeclarativevideo.pro
@@ -0,0 +1,14 @@
+load(qttest_p4)
+
+HEADERS += \
+ $$PWD/../../../src/imports/multimedia/qdeclarativevideo_p.h \
+ $$PWD/../../../src/imports/multimedia/qdeclarativemediabase_p.h \
+ $$PWD/../../../src/imports/multimedia/qmetadatacontrolmetaobject_p.h
+
+SOURCES += \
+ tst_qdeclarativevideo.cpp \
+ $$PWD/../../../src/imports/multimedia/qdeclarativevideo.cpp \
+ $$PWD/../../../src/imports/multimedia/qdeclarativemediabase.cpp \
+ $$PWD/../../../src/imports/multimedia/qmetadatacontrolmetaobject.cpp
+
+QT += multimedia declarative
diff --git a/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp b/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp
new file mode 100644
index 0000000000..5fd36758b3
--- /dev/null
+++ b/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp
@@ -0,0 +1,911 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include "../../../src/imports/multimedia/qdeclarativevideo_p.h"
+
+#include <QtGui/qapplication.h>
+#include <QtMultimedia/qabstractvideosurface.h>
+#include <QtMultimedia/qgraphicsvideoitem.h>
+#include <QtMultimedia/qmediaplayercontrol.h>
+#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/qvideooutputcontrol.h>
+#include <QtMultimedia/qvideorenderercontrol.h>
+#include <QtMultimedia/qvideosurfaceformat.h>
+
+
+class tst_QmlGraphicsVideo : public QObject
+{
+ Q_OBJECT
+public slots:
+ void initTestCase();
+
+private slots:
+ void nullPlayerControl();
+ void nullService();
+
+ void playing();
+ void paused();
+ void error();
+
+ void hasAudio();
+ void hasVideo();
+ void fillMode();
+ void geometry();
+};
+
+Q_DECLARE_METATYPE(QtMultimedia::MetaData);
+Q_DECLARE_METATYPE(QDeclarativeVideo::Error);
+
+class QtTestMediaPlayerControl : public QMediaPlayerControl
+{
+ Q_OBJECT
+public:
+ QtTestMediaPlayerControl(QObject *parent = 0)
+ : QMediaPlayerControl(parent)
+ , m_state(QMediaPlayer::StoppedState)
+ , m_mediaStatus(QMediaPlayer::NoMedia)
+ , m_duration(0)
+ , m_position(0)
+ , m_playbackRate(1.0)
+ , m_volume(50)
+ , m_bufferStatus(0)
+ , m_muted(false)
+ , m_audioAvailable(false)
+ , m_videoAvailable(false)
+ , m_seekable(false)
+ {
+ }
+
+ QMediaPlayer::State state() const { return m_state; }
+ void updateState(QMediaPlayer::State state) { emit stateChanged(m_state = state); }
+
+ QMediaPlayer::MediaStatus mediaStatus() const { return m_mediaStatus; }
+ void updateMediaStatus(QMediaPlayer::MediaStatus status) {
+ emit mediaStatusChanged(m_mediaStatus = status); }
+ void updateMediaStatus(QMediaPlayer::MediaStatus status, QMediaPlayer::State state)
+ {
+ m_mediaStatus = status;
+ m_state = state;
+
+ emit mediaStatusChanged(m_mediaStatus);
+ emit stateChanged(m_state);
+ }
+
+ qint64 duration() const { return m_duration; }
+ void setDuration(qint64 duration) { emit durationChanged(m_duration = duration); }
+
+ qint64 position() const { return m_position; }
+ void setPosition(qint64 position) { emit positionChanged(m_position = position); }
+
+ int volume() const { return m_volume; }
+ void setVolume(int volume) { emit volumeChanged(m_volume = volume); }
+
+ bool isMuted() const { return m_muted; }
+ void setMuted(bool muted) { emit mutedChanged(m_muted = muted); }
+
+ int bufferStatus() const { return m_bufferStatus; }
+ void setBufferStatus(int status) { emit bufferStatusChanged(m_bufferStatus = status); }
+
+ bool isAudioAvailable() const { return m_audioAvailable; }
+ void setAudioAvailable(bool available) {
+ emit audioAvailableChanged(m_audioAvailable = available); }
+ bool isVideoAvailable() const { return m_videoAvailable; }
+ void setVideoAvailable(bool available) {
+ emit videoAvailableChanged(m_videoAvailable = available); }
+
+ bool isSeekable() const { return m_seekable; }
+ void setSeekable(bool seekable) { emit seekableChanged(m_seekable = seekable); }
+
+ QMediaTimeRange availablePlaybackRanges() const { return QMediaTimeRange(); }
+
+ qreal playbackRate() const { return m_playbackRate; }
+ void setPlaybackRate(qreal rate) { emit playbackRateChanged(m_playbackRate = rate); }
+
+ QMediaContent media() const { return m_media; }
+ const QIODevice *mediaStream() const { return 0; }
+ void setMedia(const QMediaContent &media, QIODevice *)
+ {
+ m_media = media;
+
+ m_mediaStatus = m_media.isNull()
+ ? QMediaPlayer::NoMedia
+ : QMediaPlayer::LoadingMedia;
+
+ emit mediaChanged(m_media);
+ emit mediaStatusChanged(m_mediaStatus);
+ }
+
+ void play() { emit stateChanged(m_state = QMediaPlayer::PlayingState); }
+ void pause() { emit stateChanged(m_state = QMediaPlayer::PausedState); }
+ void stop() { emit stateChanged(m_state = QMediaPlayer::StoppedState); }
+
+ void emitError(QMediaPlayer::Error err, const QString &errorString) {
+ emit error(err, errorString); }
+
+private:
+ QMediaPlayer::State m_state;
+ QMediaPlayer::MediaStatus m_mediaStatus;
+ qint64 m_duration;
+ qint64 m_position;
+ qreal m_playbackRate;
+ int m_volume;
+ int m_bufferStatus;
+ bool m_muted;
+ bool m_audioAvailable;
+ bool m_videoAvailable;
+ bool m_seekable;
+ QMediaContent m_media;
+};
+
+class QtTestOutputControl : public QVideoOutputControl
+{
+public:
+ QtTestOutputControl(QObject *parent) : QVideoOutputControl(parent), m_output(NoOutput) {}
+
+ QList<Output> availableOutputs() const { return m_outputs; }
+ void setAvailableOutputs(const QList<Output> outputs) { m_outputs = outputs; }
+
+ Output output() const { return m_output; }
+ virtual void setOutput(Output output) { m_output = output; }
+
+private:
+ Output m_output;
+ QList<Output> m_outputs;
+};
+
+class QtTestRendererControl : public QVideoRendererControl
+{
+public:
+ QtTestRendererControl(QObject *parent ) : QVideoRendererControl(parent), m_surface(0) {}
+
+ QAbstractVideoSurface *surface() const { return m_surface; }
+ void setSurface(QAbstractVideoSurface *surface) { m_surface = surface; }
+
+private:
+ QAbstractVideoSurface *m_surface;
+};
+
+class QtTestMediaService : public QMediaService
+{
+ Q_OBJECT
+public:
+ QtTestMediaService(
+ QtTestMediaPlayerControl *playerControl,
+ QtTestOutputControl *outputControl,
+ QtTestRendererControl *rendererControl,
+ QObject *parent)
+ : QMediaService(parent)
+ , playerControl(playerControl)
+ , outputControl(outputControl)
+ , rendererControl(rendererControl)
+ {
+ }
+
+ QMediaControl *control(const char *name) const
+ {
+ if (qstrcmp(name, QMediaPlayerControl_iid) == 0)
+ return playerControl;
+ else if (qstrcmp(name, QVideoOutputControl_iid) == 0)
+ return outputControl;
+ else if (qstrcmp(name, QVideoRendererControl_iid) == 0)
+ return rendererControl;
+ else
+ return 0;
+ }
+
+ QtTestMediaPlayerControl *playerControl;
+ QtTestOutputControl *outputControl;
+ QtTestRendererControl *rendererControl;
+};
+
+class QtTestMediaServiceProvider : public QMediaServiceProvider
+{
+ Q_OBJECT
+public:
+ QtTestMediaServiceProvider()
+ : service(new QtTestMediaService(
+ new QtTestMediaPlayerControl(this),
+ new QtTestOutputControl(this),
+ new QtTestRendererControl(this),
+ this))
+ {
+ setDefaultServiceProvider(this);
+ }
+
+ QtTestMediaServiceProvider(QtTestMediaService *service)
+ : service(service)
+ {
+ setDefaultServiceProvider(this);
+ }
+
+ QtTestMediaServiceProvider(
+ QtTestMediaPlayerControl *playerControl,
+ QtTestOutputControl *outputControl,
+ QtTestRendererControl *rendererControl)
+ : service(new QtTestMediaService(playerControl, outputControl, rendererControl, this))
+ {
+ setDefaultServiceProvider(this);
+ }
+
+ ~QtTestMediaServiceProvider()
+ {
+ setDefaultServiceProvider(0);
+ }
+
+ QMediaService *requestService(
+ const QByteArray &type,
+ const QMediaServiceProviderHint & = QMediaServiceProviderHint())
+ {
+ requestedService = type;
+
+ return service;
+ }
+
+ void releaseService(QMediaService *) {}
+
+ inline QtTestMediaPlayerControl *playerControl() { return service->playerControl; }
+ inline QtTestRendererControl *rendererControl() { return service->rendererControl; }
+
+ QtTestMediaService *service;
+ QByteArray requestedService;
+};
+
+
+void tst_QmlGraphicsVideo::initTestCase()
+{
+ qRegisterMetaType<QDeclarativeVideo::Error>();
+}
+
+void tst_QmlGraphicsVideo::nullPlayerControl()
+{
+ QtTestMediaServiceProvider provider(0, 0, 0);
+
+ QDeclarativeVideo video;
+
+ QCOMPARE(video.source(), QUrl());
+ video.setSource(QUrl("http://example.com"));
+ QCOMPARE(video.source(), QUrl());
+
+ QCOMPARE(video.isPlaying(), false);
+ video.setPlaying(true);
+ QCOMPARE(video.isPlaying(), false);
+ video.play();
+ QCOMPARE(video.isPlaying(), false);
+
+ QCOMPARE(video.isPaused(), false);
+ video.pause();
+ QCOMPARE(video.isPaused(), false);
+ video.setPaused(true);
+ QCOMPARE(video.isPaused(), true);
+
+ QCOMPARE(video.duration(), 0);
+
+ QCOMPARE(video.position(), 0);
+ video.setPosition(10000);
+ QCOMPARE(video.position(), 0);
+
+ QCOMPARE(video.volume(), qreal(0));
+ video.setVolume(50);
+ QCOMPARE(video.volume(), qreal(0));
+
+ QCOMPARE(video.isMuted(), false);
+ video.setMuted(true);
+ QCOMPARE(video.isMuted(), false);
+
+ QCOMPARE(video.bufferProgress(), qreal(0));
+
+ QCOMPARE(video.isSeekable(), false);
+
+ QCOMPARE(video.playbackRate(), qreal(1.0));
+
+ QCOMPARE(video.hasAudio(), false);
+ QCOMPARE(video.hasVideo(), false);
+
+ QCOMPARE(video.status(), QDeclarativeVideo::NoMedia);
+
+ QCOMPARE(video.error(), QDeclarativeVideo::ServiceMissing);
+}
+
+void tst_QmlGraphicsVideo::nullService()
+{
+ QtTestMediaServiceProvider provider(0);
+
+ QDeclarativeVideo video;
+
+ QCOMPARE(video.source(), QUrl());
+ video.setSource(QUrl("http://example.com"));
+ QCOMPARE(video.source(), QUrl());
+
+ QCOMPARE(video.isPlaying(), false);
+ video.setPlaying(true);
+ QCOMPARE(video.isPlaying(), false);
+ video.play();
+ QCOMPARE(video.isPlaying(), false);
+
+ QCOMPARE(video.isPaused(), false);
+ video.pause();
+ QCOMPARE(video.isPaused(), false);
+ video.setPaused(true);
+ QCOMPARE(video.isPaused(), true);
+
+ QCOMPARE(video.duration(), 0);
+
+ QCOMPARE(video.position(), 0);
+ video.setPosition(10000);
+ QCOMPARE(video.position(), 0);
+
+ QCOMPARE(video.volume(), qreal(0));
+ video.setVolume(50);
+ QCOMPARE(video.volume(), qreal(0));
+
+ QCOMPARE(video.isMuted(), false);
+ video.setMuted(true);
+ QCOMPARE(video.isMuted(), false);
+
+ QCOMPARE(video.bufferProgress(), qreal(0));
+
+ QCOMPARE(video.isSeekable(), false);
+
+ QCOMPARE(video.playbackRate(), qreal(1.0));
+
+ QCOMPARE(video.hasAudio(), false);
+ QCOMPARE(video.hasVideo(), false);
+
+ QCOMPARE(video.status(), QDeclarativeVideo::NoMedia);
+
+ QCOMPARE(video.error(), QDeclarativeVideo::ServiceMissing);
+
+ QCOMPARE(video.metaObject()->indexOfProperty("title"), -1);
+ QCOMPARE(video.metaObject()->indexOfProperty("genre"), -1);
+ QCOMPARE(video.metaObject()->indexOfProperty("description"), -1);
+}
+
+void tst_QmlGraphicsVideo::playing()
+{
+ QtTestMediaServiceProvider provider;
+ QDeclarativeVideo video;
+
+ QSignalSpy playingChangedSpy(&video, SIGNAL(playingChanged()));
+ QSignalSpy startedSpy(&video, SIGNAL(started()));
+ QSignalSpy stoppedSpy(&video, SIGNAL(stopped()));
+
+ int playingChanged = 0;
+ int started = 0;
+ int stopped = 0;
+
+ QCOMPARE(video.isPlaying(), false);
+
+ // setPlaying(true) when stopped.
+ video.setPlaying(true);
+ QCOMPARE(video.isPlaying(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(startedSpy.count(), ++started);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPlaying(false) when playing.
+ video.setPlaying(false);
+ QCOMPARE(video.isPlaying(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(stoppedSpy.count(), ++stopped);
+
+ // play() when stopped.
+ video.play();
+ QCOMPARE(video.isPlaying(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(startedSpy.count(), ++started);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // stop() when playing.
+ video.stop();
+ QCOMPARE(video.isPlaying(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(stoppedSpy.count(), ++stopped);
+
+ // stop() when stopped.
+ video.stop();
+ QCOMPARE(video.isPlaying(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPlaying(false) when stopped.
+ video.setPlaying(false);
+ QCOMPARE(video.isPlaying(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ video.setPlaying(true);
+ QCOMPARE(video.isPlaying(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(startedSpy.count(), ++started);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPlaying(true) when playing.
+ video.setPlaying(true);
+ QCOMPARE(video.isPlaying(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // play() when playing.
+ video.play();
+ QCOMPARE(video.isPlaying(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(stoppedSpy.count(), stopped);
+}
+
+void tst_QmlGraphicsVideo::paused()
+{
+ QtTestMediaServiceProvider provider;
+ QDeclarativeVideo video;
+
+ QSignalSpy playingChangedSpy(&video, SIGNAL(playingChanged()));
+ QSignalSpy pausedChangedSpy(&video, SIGNAL(pausedChanged()));
+ QSignalSpy startedSpy(&video, SIGNAL(started()));
+ QSignalSpy pausedSpy(&video, SIGNAL(paused()));
+ QSignalSpy resumedSpy(&video, SIGNAL(resumed()));
+ QSignalSpy stoppedSpy(&video, SIGNAL(stopped()));
+
+ int playingChanged = 0;
+ int pausedChanged = 0;
+ int started = 0;
+ int paused = 0;
+ int resumed = 0;
+ int stopped = 0;
+
+ QCOMPARE(video.isPlaying(), false);
+ QCOMPARE(video.isPaused(), false);
+
+ // setPlaying(true) when stopped.
+ video.setPlaying(true);
+ QCOMPARE(video.isPlaying(), true);
+ QCOMPARE(video.isPaused(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), ++started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPaused(true) when playing.
+ video.setPaused(true);
+ QCOMPARE(video.isPlaying(), true);
+ QCOMPARE(video.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), ++paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPaused(true) when paused.
+ video.setPaused(true);
+ QCOMPARE(video.isPlaying(), true);
+ QCOMPARE(video.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // pause() when paused.
+ video.pause();
+ QCOMPARE(video.isPlaying(), true);
+ QCOMPARE(video.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPaused(false) when paused.
+ video.setPaused(false);
+ QCOMPARE(video.isPlaying(), true);
+ QCOMPARE(video.isPaused(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), ++resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPaused(false) when playing.
+ video.setPaused(false);
+ QCOMPARE(video.isPlaying(), true);
+ QCOMPARE(video.isPaused(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // pause() when playing.
+ video.pause();
+ QCOMPARE(video.isPlaying(), true);
+ QCOMPARE(video.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), ++paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPlaying(false) when paused.
+ video.setPlaying(false);
+ QCOMPARE(video.isPlaying(), false);
+ QCOMPARE(video.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), ++stopped);
+
+ // setPaused(true) when stopped and paused.
+ video.setPaused(true);
+ QCOMPARE(video.isPlaying(), false);
+ QCOMPARE(video.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPaused(false) when stopped and paused.
+ video.setPaused(false);
+ QCOMPARE(video.isPlaying(), false);
+ QCOMPARE(video.isPaused(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPaused(true) when stopped.
+ video.setPaused(true);
+ QCOMPARE(video.isPlaying(), false);
+ QCOMPARE(video.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPlaying(true) when stopped and paused.
+ video.setPlaying(true);
+ QCOMPARE(video.isPlaying(), true);
+ QCOMPARE(video.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), ++started);
+ QCOMPARE(pausedSpy.count(), ++paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // play() when paused.
+ video.play();
+ QCOMPARE(video.isPlaying(), true);
+ QCOMPARE(video.isPaused(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), ++resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPaused(true) when playing.
+ video.setPaused(true);
+ QCOMPARE(video.isPlaying(), true);
+ QCOMPARE(video.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), ++paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // stop() when paused.
+ video.stop();
+ QCOMPARE(video.isPlaying(), false);
+ QCOMPARE(video.isPaused(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), ++stopped);
+
+ // setPaused(true) when stopped.
+ video.setPaused(true);
+ QCOMPARE(video.isPlaying(), false);
+ QCOMPARE(video.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // stop() when stopped and paused.
+ video.stop();
+ QCOMPARE(video.isPlaying(), false);
+ QCOMPARE(video.isPaused(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // pause() when stopped.
+ video.pause();
+ QCOMPARE(video.isPlaying(), true);
+ QCOMPARE(video.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), ++started);
+ QCOMPARE(pausedSpy.count(), ++paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPlaying(false) when paused.
+ video.setPlaying(false);
+ QCOMPARE(video.isPlaying(), false);
+ QCOMPARE(video.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), ++stopped);
+
+ // pause() when stopped and paused.
+ video.pause();
+ QCOMPARE(video.isPlaying(), true);
+ QCOMPARE(video.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), ++started);
+ QCOMPARE(pausedSpy.count(), ++paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+
+ // setPlaying(false) when paused.
+ video.setPlaying(false);
+ QCOMPARE(video.isPlaying(), false);
+ QCOMPARE(video.isPaused(), true);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), pausedChanged);
+ QCOMPARE(startedSpy.count(), started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), ++stopped);
+
+ // play() when stopped and paused.
+ video.play();
+ QCOMPARE(video.isPlaying(), true);
+ QCOMPARE(video.isPaused(), false);
+ QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(playingChangedSpy.count(), ++playingChanged);
+ QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
+ QCOMPARE(startedSpy.count(), ++started);
+ QCOMPARE(pausedSpy.count(), paused);
+ QCOMPARE(resumedSpy.count(), resumed);
+ QCOMPARE(stoppedSpy.count(), stopped);
+}
+
+void tst_QmlGraphicsVideo::error()
+{
+ const QString errorString = QLatin1String("Failed to open device.");
+
+ QtTestMediaServiceProvider provider;
+ QDeclarativeVideo video;
+
+ QSignalSpy errorSpy(&video, SIGNAL(error(QDeclarativeVideo::Error,QString)));
+ QSignalSpy errorChangedSpy(&video, SIGNAL(errorChanged()));
+
+ QCOMPARE(video.error(), QDeclarativeVideo::NoError);
+ QCOMPARE(video.errorString(), QString());
+
+ provider.playerControl()->emitError(QMediaPlayer::ResourceError, errorString);
+
+ QCOMPARE(video.error(), QDeclarativeVideo::ResourceError);
+ QCOMPARE(video.errorString(), errorString);
+ QCOMPARE(errorSpy.count(), 1);
+ QCOMPARE(errorChangedSpy.count(), 1);
+
+ // Changing the source resets the error properties.
+ video.setSource(QUrl("http://example.com"));
+ QCOMPARE(video.error(), QDeclarativeVideo::NoError);
+ QCOMPARE(video.errorString(), QString());
+ QCOMPARE(errorSpy.count(), 1);
+ QCOMPARE(errorChangedSpy.count(), 2);
+
+ // But isn't noisy.
+ video.setSource(QUrl("file:///file/path"));
+ QCOMPARE(video.error(), QDeclarativeVideo::NoError);
+ QCOMPARE(video.errorString(), QString());
+ QCOMPARE(errorSpy.count(), 1);
+ QCOMPARE(errorChangedSpy.count(), 2);
+}
+
+
+void tst_QmlGraphicsVideo::hasAudio()
+{
+ QtTestMediaServiceProvider provider;
+ QDeclarativeVideo video;
+
+ QSignalSpy spy(&video, SIGNAL(hasAudioChanged()));
+
+ QCOMPARE(video.hasAudio(), false);
+
+ provider.playerControl()->setAudioAvailable(true);
+ QCOMPARE(video.hasAudio(), true);
+ QCOMPARE(spy.count(), 1);
+
+ provider.playerControl()->setAudioAvailable(true);
+ QCOMPARE(video.hasAudio(), true);
+ QCOMPARE(spy.count(), 2);
+
+ provider.playerControl()->setAudioAvailable(false);
+ QCOMPARE(video.hasAudio(), false);
+ QCOMPARE(spy.count(), 3);
+}
+
+void tst_QmlGraphicsVideo::hasVideo()
+{
+ QtTestMediaServiceProvider provider;
+ QDeclarativeVideo video;
+
+ QSignalSpy spy(&video, SIGNAL(hasVideoChanged()));
+
+ QCOMPARE(video.hasVideo(), false);
+
+ provider.playerControl()->setVideoAvailable(true);
+ QCOMPARE(video.hasVideo(), true);
+ QCOMPARE(spy.count(), 1);
+
+ provider.playerControl()->setVideoAvailable(true);
+ QCOMPARE(video.hasVideo(), true);
+ QCOMPARE(spy.count(), 2);
+
+ provider.playerControl()->setVideoAvailable(false);
+ QCOMPARE(video.hasVideo(), false);
+ QCOMPARE(spy.count(), 3);
+}
+
+void tst_QmlGraphicsVideo::fillMode()
+{
+ QtTestMediaServiceProvider provider;
+ QDeclarativeVideo video;
+
+ QList<QGraphicsItem *> children = video.childItems();
+ QCOMPARE(children.count(), 1);
+ QGraphicsVideoItem *videoItem = qgraphicsitem_cast<QGraphicsVideoItem *>(children.first());
+ QVERIFY(videoItem != 0);
+
+ QCOMPARE(video.fillMode(), QDeclarativeVideo::PreserveAspectFit);
+
+ video.setFillMode(QDeclarativeVideo::PreserveAspectCrop);
+ QCOMPARE(video.fillMode(), QDeclarativeVideo::PreserveAspectCrop);
+ QCOMPARE(videoItem->aspectRatioMode(), Qt::KeepAspectRatioByExpanding);
+
+ video.setFillMode(QDeclarativeVideo::Stretch);
+ QCOMPARE(video.fillMode(), QDeclarativeVideo::Stretch);
+ QCOMPARE(videoItem->aspectRatioMode(), Qt::IgnoreAspectRatio);
+
+ video.setFillMode(QDeclarativeVideo::PreserveAspectFit);
+ QCOMPARE(video.fillMode(), QDeclarativeVideo::PreserveAspectFit);
+ QCOMPARE(videoItem->aspectRatioMode(), Qt::KeepAspectRatio);
+}
+
+void tst_QmlGraphicsVideo::geometry()
+{
+ QtTestMediaServiceProvider provider;
+ QDeclarativeVideo video;
+
+ QAbstractVideoSurface *surface = provider.rendererControl()->surface();
+ QVERIFY(surface != 0);
+
+ QList<QGraphicsItem *> children = video.childItems();
+ QCOMPARE(children.count(), 1);
+ QGraphicsVideoItem *videoItem = qgraphicsitem_cast<QGraphicsVideoItem *>(children.first());
+ QVERIFY(videoItem != 0);
+
+ QVideoSurfaceFormat format(QSize(640, 480), QVideoFrame::Format_RGB32);
+
+ QVERIFY(surface->start(format));
+
+ QCOMPARE(video.implicitWidth(), qreal(640));
+ QCOMPARE(video.implicitHeight(), qreal(480));
+
+ video.setWidth(560);
+ video.setHeight(328);
+
+ QCOMPARE(videoItem->size().width(), qreal(560));
+ QCOMPARE(videoItem->size().height(), qreal(328));
+}
+
+QTEST_MAIN(tst_QmlGraphicsVideo)
+
+#include "tst_qdeclarativevideo.moc"
diff --git a/tests/auto/qdir/tst_qdir.cpp b/tests/auto/qdir/tst_qdir.cpp
index c7f9b6bf8d..ba18bbbad5 100644
--- a/tests/auto/qdir/tst_qdir.cpp
+++ b/tests/auto/qdir/tst_qdir.cpp
@@ -49,6 +49,7 @@
#include <qregexp.h>
#include <qstringlist.h>
#include "../network-settings.h"
+#include "../../shared/filesystem.h"
#if defined(Q_OS_SYMBIAN)
# define STRINGIFY(x) #x
@@ -164,6 +165,8 @@ private slots:
void longFileName_data();
void longFileName();
+
+ void updateFileLists();
};
// Testing get/set functions
@@ -982,6 +985,13 @@ tst_QDir::cleanPath_data()
QTest::newRow("data7") << ".//file1.txt" << "file1.txt";
QTest::newRow("data8") << "/foo/bar/..//file1.txt" << "/foo/file1.txt";
QTest::newRow("data9") << "//" << "/";
+#if !defined(Q_OS_WINCE)
+#if defined Q_OS_WIN
+ QTest::newRow("data10") << "c:\\" << "c:/";
+#else
+ QTest::newRow("data10") << "/:/" << "/:";
+#endif
+#endif
}
@@ -1435,6 +1445,95 @@ void tst_QDir::longFileName()
QFile::remove(fileName);
}
+void tst_QDir::updateFileLists()
+{
+ // Test setup
+
+ FileSystem fs;
+
+ QVERIFY( fs.createDirectory("update-file-lists") );
+ QVERIFY( fs.createFile("update-file-lists/file1.txt") );
+ QVERIFY( fs.createFile("update-file-lists/file2.doc") );
+
+ QVERIFY( fs.createDirectory("update-file-lists/sub-dir1") );
+ QVERIFY( fs.createFile("update-file-lists/sub-dir1/file3.txt") );
+ QVERIFY( fs.createFile("update-file-lists/sub-dir1/file4.doc") );
+ QVERIFY( fs.createFile("update-file-lists/sub-dir1/file5.txt") );
+
+ QVERIFY( fs.createDirectory("update-file-lists/sub-dir2") );
+ QVERIFY( fs.createFile("update-file-lists/sub-dir2/file6.txt") );
+ QVERIFY( fs.createFile("update-file-lists/sub-dir2/file7.txt") );
+ QVERIFY( fs.createFile("update-file-lists/sub-dir2/file8.doc") );
+ QVERIFY( fs.createFile("update-file-lists/sub-dir2/file9.doc") );
+
+ // Actual test
+
+ QDir dir("update-file-lists");
+
+ QCOMPARE(dir.count(), uint(6));
+ QCOMPARE(dir.entryList().size(), 6);
+ QCOMPARE(dir.entryInfoList().size(), 6);
+
+ dir.setFilter(QDir::AllEntries | QDir::NoDotAndDotDot);
+
+ QCOMPARE(dir.entryList().size(), 4);
+ QCOMPARE(dir.count(), uint(4));
+ QCOMPARE(dir.entryInfoList().size(), 4);
+
+ dir.setPath("update-file-lists/sub-dir1");
+
+ QCOMPARE(dir.entryInfoList().size(), 3);
+ QCOMPARE(dir.count(), uint(3));
+ QCOMPARE(dir.entryList().size(), 3);
+
+ dir.setNameFilters(QStringList("*.txt"));
+
+ QCOMPARE(dir.entryInfoList().size(), 2);
+ QCOMPARE(dir.entryList().size(), 2);
+ QCOMPARE(dir.count(), uint(2));
+
+ dir.setPath("update-file-lists");
+ dir = QDir(dir.path(),
+ "*.txt",
+ QDir::Name | QDir::DirsLast,
+ QDir::AllEntries | QDir::AllDirs | QDir::NoDotAndDotDot);
+
+ QCOMPARE(dir.count(), uint(3));
+ QCOMPARE(dir.entryList().size(), 3);
+ QCOMPARE(dir.entryInfoList().size(), 3);
+ QCOMPARE(dir.entryList(), QStringList() << "file1.txt" << "sub-dir1" << "sub-dir2");
+
+ dir.setSorting(QDir::Name | QDir::DirsFirst);
+
+ QCOMPARE(dir.count(), uint(3));
+ QCOMPARE(dir.entryList().size(), 3);
+ QCOMPARE(dir.entryInfoList().size(), 3);
+ QCOMPARE(dir.entryList(), QStringList() << "sub-dir1" << "sub-dir2" << "file1.txt");
+
+ {
+ QVERIFY( fs.createFile("update-file-lists/extra-file.txt") );
+
+ QDir dir2(dir);
+
+ QCOMPARE(dir2.count(), uint(3));
+ QCOMPARE(dir2.entryList().size(), 3);
+ QCOMPARE(dir2.entryInfoList().size(), 3);
+ QCOMPARE(dir2.entryList(), QStringList() << "sub-dir1" << "sub-dir2" << "file1.txt");
+
+ dir2.refresh();
+
+ QCOMPARE(dir2.count(), uint(4));
+ QCOMPARE(dir2.entryList().size(), 4);
+ QCOMPARE(dir2.entryInfoList().size(), 4);
+ QCOMPARE(dir2.entryList(), QStringList() << "sub-dir1" << "sub-dir2" << "extra-file.txt" << "file1.txt");
+ }
+
+ QCOMPARE(dir.count(), uint(3));
+ QCOMPARE(dir.entryList().size(), 3);
+ QCOMPARE(dir.entryInfoList().size(), 3);
+ QCOMPARE(dir.entryList(), QStringList() << "sub-dir1" << "sub-dir2" << "file1.txt");
+}
+
QTEST_MAIN(tst_QDir)
#include "tst_qdir.moc"
diff --git a/tests/auto/qdiriterator/recursiveDirs/dir1/aPage.html b/tests/auto/qdiriterator/recursiveDirs/dir1/aPage.html
deleted file mode 100644
index 51a226153e..0000000000
--- a/tests/auto/qdiriterator/recursiveDirs/dir1/aPage.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml/">
- <head>
- <title>A title</title>
- </head>
- <body>
- <p>Some text</p>
- </body>
-</html>
diff --git a/tests/auto/qdiriterator/recursiveDirs/dir1/textFileB.txt b/tests/auto/qdiriterator/recursiveDirs/dir1/textFileB.txt
deleted file mode 100644
index 5b1dd02ff2..0000000000
--- a/tests/auto/qdiriterator/recursiveDirs/dir1/textFileB.txt
+++ /dev/null
@@ -1 +0,0 @@
-Some Text
diff --git a/tests/auto/qdiriterator/recursiveDirs/textFileA.txt b/tests/auto/qdiriterator/recursiveDirs/textFileA.txt
deleted file mode 100644
index 5b1dd02ff2..0000000000
--- a/tests/auto/qdiriterator/recursiveDirs/textFileA.txt
+++ /dev/null
@@ -1 +0,0 @@
-Some Text
diff --git a/tests/auto/qdiriterator/tst_qdiriterator.cpp b/tests/auto/qdiriterator/tst_qdiriterator.cpp
index 6cdd1f70fb..f6fce3219b 100644
--- a/tests/auto/qdiriterator/tst_qdiriterator.cpp
+++ b/tests/auto/qdiriterator/tst_qdiriterator.cpp
@@ -71,6 +71,39 @@ public:
tst_QDirIterator();
virtual ~tst_QDirIterator();
+private: // convenience functions
+ QStringList createdDirectories;
+ QStringList createdFiles;
+
+ QDir currentDir;
+ bool createDirectory(const QString &dirName)
+ {
+ if (currentDir.mkdir(dirName)) {
+ createdDirectories.prepend(dirName);
+ return true;
+ }
+ return false;
+ }
+
+ bool createFile(const QString &fileName)
+ {
+ QFile file(fileName);
+ if (file.open(QIODevice::WriteOnly)) {
+ createdFiles << fileName;
+ return true;
+ }
+ return false;
+ }
+
+ bool createLink(const QString &destination, const QString &linkName)
+ {
+ if (QFile::link(destination, linkName)) {
+ createdFiles << linkName;
+ return true;
+ }
+ return false;
+ }
+
private slots:
void iterateRelativeDirectory_data();
void iterateRelativeDirectory();
@@ -96,41 +129,47 @@ tst_QDirIterator::tst_QDirIterator()
QFile::remove("entrylist/directory/entrylist3.lnk");
QFile::remove("entrylist/directory/entrylist4.lnk");
+ createDirectory("entrylist");
+ createDirectory("entrylist/directory");
+ createFile("entrylist/file");
+ createFile("entrylist/writable");
+ createFile("entrylist/directory/dummy");
+
+ createDirectory("recursiveDirs");
+ createDirectory("recursiveDirs/dir1");
+ createFile("recursiveDirs/textFileA.txt");
+ createFile("recursiveDirs/dir1/aPage.html");
+ createFile("recursiveDirs/dir1/textFileB.txt");
+
+ createDirectory("foo");
+ createDirectory("foo/bar");
+ createFile("foo/bar/readme.txt");
+
#ifndef Q_NO_SYMLINKS
# if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
// ### Sadly, this is a platform difference right now.
- QFile::link("entrylist/file", "entrylist/linktofile.lnk");
+ createLink("entrylist/file", "entrylist/linktofile.lnk");
# ifndef Q_NO_SYMLINKS_TO_DIRS
- QFile::link("entrylist/directory", "entrylist/linktodirectory.lnk");
+ createLink("entrylist/directory", "entrylist/linktodirectory.lnk");
# endif
- QFile::link("entrylist/nothing", "entrylist/brokenlink.lnk");
+ createLink("entrylist/nothing", "entrylist/brokenlink.lnk");
# else
- QFile::link("file", "entrylist/linktofile.lnk");
+ createLink("file", "entrylist/linktofile.lnk");
# ifndef Q_NO_SYMLINKS_TO_DIRS
- QFile::link("directory", "entrylist/linktodirectory.lnk");
+ createLink("directory", "entrylist/linktodirectory.lnk");
# endif
- QFile::link("nothing", "entrylist/brokenlink.lnk");
+ createLink("nothing", "entrylist/brokenlink.lnk");
# endif
#endif
- QFile("entrylist/writable").open(QIODevice::ReadWrite);
}
tst_QDirIterator::~tst_QDirIterator()
{
- QFile::remove("entrylist/directory");
- QFile::remove("entrylist/linktofile.lnk");
- QFile::remove("entrylist/linktodirectory.lnk");
- QFile::remove("entrylist/brokenlink.lnk");
- QFile::remove("entrylist/brokenlink");
- QFile::remove("entrylist/writable");
- QFile::remove("entrylist/entrylist1.lnk");
- QFile::remove("entrylist/entrylist2.lnk");
- QFile::remove("entrylist/entrylist3.lnk");
- QFile::remove("entrylist/entrylist4.lnk");
- QFile::remove("entrylist/directory/entrylist1.lnk");
- QFile::remove("entrylist/directory/entrylist2.lnk");
- QFile::remove("entrylist/directory/entrylist3.lnk");
- QFile::remove("entrylist/directory/entrylist4.lnk");
+ Q_FOREACH(QString fileName, createdFiles)
+ QFile::remove(fileName);
+
+ Q_FOREACH(QString dirName, createdDirectories)
+ currentDir.rmdir(dirName);
}
void tst_QDirIterator::iterateRelativeDirectory_data()
@@ -298,23 +337,23 @@ void tst_QDirIterator::stopLinkLoop()
{
#ifdef Q_OS_WIN
// ### Sadly, this is a platform difference right now.
- QFile::link(QDir::currentPath() + QLatin1String("/entrylist"), "entrylist/entrylist1.lnk");
- QFile::link("entrylist/.", "entrylist/entrylist2.lnk");
- QFile::link("entrylist/../entrylist/.", "entrylist/entrylist3.lnk");
- QFile::link("entrylist/..", "entrylist/entrylist4.lnk");
- QFile::link(QDir::currentPath() + QLatin1String("/entrylist"), "entrylist/directory/entrylist1.lnk");
- QFile::link("entrylist/.", "entrylist/directory/entrylist2.lnk");
- QFile::link("entrylist/../directory/.", "entrylist/directory/entrylist3.lnk");
- QFile::link("entrylist/..", "entrylist/directory/entrylist4.lnk");
+ createLink(QDir::currentPath() + QLatin1String("/entrylist"), "entrylist/entrylist1.lnk");
+ createLink("entrylist/.", "entrylist/entrylist2.lnk");
+ createLink("entrylist/../entrylist/.", "entrylist/entrylist3.lnk");
+ createLink("entrylist/..", "entrylist/entrylist4.lnk");
+ createLink(QDir::currentPath() + QLatin1String("/entrylist"), "entrylist/directory/entrylist1.lnk");
+ createLink("entrylist/.", "entrylist/directory/entrylist2.lnk");
+ createLink("entrylist/../directory/.", "entrylist/directory/entrylist3.lnk");
+ createLink("entrylist/..", "entrylist/directory/entrylist4.lnk");
#else
- QFile::link(QDir::currentPath() + QLatin1String("/entrylist"), "entrylist/entrylist1.lnk");
- QFile::link(".", "entrylist/entrylist2.lnk");
- QFile::link("../entrylist/.", "entrylist/entrylist3.lnk");
- QFile::link("..", "entrylist/entrylist4.lnk");
- QFile::link(QDir::currentPath() + QLatin1String("/entrylist"), "entrylist/directory/entrylist1.lnk");
- QFile::link(".", "entrylist/directory/entrylist2.lnk");
- QFile::link("../directory/.", "entrylist/directory/entrylist3.lnk");
- QFile::link("..", "entrylist/directory/entrylist4.lnk");
+ createLink(QDir::currentPath() + QLatin1String("/entrylist"), "entrylist/entrylist1.lnk");
+ createLink(".", "entrylist/entrylist2.lnk");
+ createLink("../entrylist/.", "entrylist/entrylist3.lnk");
+ createLink("..", "entrylist/entrylist4.lnk");
+ createLink(QDir::currentPath() + QLatin1String("/entrylist"), "entrylist/directory/entrylist1.lnk");
+ createLink(".", "entrylist/directory/entrylist2.lnk");
+ createLink("../directory/.", "entrylist/directory/entrylist3.lnk");
+ createLink("..", "entrylist/directory/entrylist4.lnk");
#endif
QDirIterator it(QLatin1String("entrylist"), QDirIterator::Subdirectories | QDirIterator::FollowSymlinks);
@@ -325,22 +364,6 @@ void tst_QDirIterator::stopLinkLoop()
QVERIFY(max);
// The goal of this test is only to ensure that the test above don't malfunction
-
-#ifdef Q_OS_WIN
- // ### Sadly, this is a platform difference right now.
- QFile::link(QDir::currentPath() + QLatin1String("/entrylist"), "entrylist/entrylist1.lnk");
- QFile::link("../../entrylist/.", "entrylist/entrylist2.lnk");
- QFile::link("entrylist/..", "entrylist/entrylist3.lnk");
-#else
- QFile::remove("entrylist/entrylist1.lnk");
- QFile::remove("entrylist/entrylist2.lnk");
- QFile::remove("entrylist/entrylist3.lnk");
- QFile::remove("entrylist/entrylist4.lnk");
- QFile::remove("entrylist/directory/entrylist1.lnk");
- QFile::remove("entrylist/directory/entrylist2.lnk");
- QFile::remove("entrylist/directory/entrylist3.lnk");
- QFile::remove("entrylist/directory/entrylist4.lnk");
-#endif
}
class EngineWithNoIterator : public QFSFileEngine
diff --git a/tests/auto/qdom/tst_qdom.cpp b/tests/auto/qdom/tst_qdom.cpp
index caf08d6628..0f6cdaa76f 100644
--- a/tests/auto/qdom/tst_qdom.cpp
+++ b/tests/auto/qdom/tst_qdom.cpp
@@ -477,10 +477,6 @@ void tst_QDom::save()
void tst_QDom::initTestCase()
{
-#ifdef Q_CC_MINGW
- QSKIP("Our current test machine, arsia, is too slow for this auto test.", SkipAll);
-#endif
-
QFile file(SRCDIR "testdata/excludedCodecs.txt");
QVERIFY(file.open(QIODevice::ReadOnly|QIODevice::Text));
@@ -1677,7 +1673,7 @@ void tst_QDom::appendDocumentNode() const
doc.appendChild(elem);
- Q_ASSERT(!xml.isNull());
+ QVERIFY(!xml.isNull());
const QString expected(QLatin1String("<document>\n<test_elem name=\"value\"/>\n</document>\n"));
elem.appendChild(xml);
diff --git a/tests/auto/qdoublevalidator/tst_qdoublevalidator.cpp b/tests/auto/qdoublevalidator/tst_qdoublevalidator.cpp
index 37dd6d886a..26890b3424 100644
--- a/tests/auto/qdoublevalidator/tst_qdoublevalidator.cpp
+++ b/tests/auto/qdoublevalidator/tst_qdoublevalidator.cpp
@@ -68,7 +68,7 @@ void tst_QDoubleValidator::validateThouSep_data()
QTest::addColumn<QString>("value");
QTest::addColumn<QValidator::State>("result");
- QTest::newRow("1,000C") << "C" << QString("1,000") << INV;
+ QTest::newRow("1,000C") << "C" << QString("1,000") << ACC;
QTest::newRow("1.000C") << "C" << QString("1.000") << ACC;
QTest::newRow("1,000de") << "de" << QString("1,000") << ACC;
@@ -160,9 +160,9 @@ void tst_QDoubleValidator::validate_data()
QTest::newRow("data_de0") << "de" << 0.0 << 100.0 << 1 << QString("50,0") << ACC << ACC;
QTest::newRow("data_de1") << "de" << 00.0 << 100.0 << 1 << QString("500,0") << ITM << ITM;
QTest::newRow("data_de1a") << "de" << 00.0 << 100.0 << 1 << QString("5001,0") << ITM << INV;
- QTest::newRow("data_de0C") << "de" << 0.0 << 100.0 << 1 << QString("50.0") << ACC << ACC;
- QTest::newRow("data_de1C") << "de" << 00.0 << 100.0 << 1 << QString("500.0") << ITM << ITM;
- QTest::newRow("data_de1aC") << "de" << 00.0 << 100.0 << 1 << QString("5001.0") << ITM << INV;
+ QTest::newRow("data_de0C") << "de" << 0.0 << 100.0 << 1 << QString("50,0") << ACC << ACC;
+ QTest::newRow("data_de1C") << "de" << 00.0 << 100.0 << 1 << QString("500,0") << ITM << ITM;
+ QTest::newRow("data_de1aC") << "de" << 00.0 << 100.0 << 1 << QString("5001,0") << ITM << INV;
QTest::newRow("data_de2") << "de" << 00.0 << 100.0 << 1 << QString("-35,0") << INV << INV;
QTest::newRow("data_de3") << "de" << 00.0 << 100.0 << 1 << QString("a") << INV << INV;
QTest::newRow("data_de4") << "de" << 0.0 << 100.0 << 1 << QString("-") << INV << INV;
@@ -172,7 +172,7 @@ void tst_QDoubleValidator::validate_data()
QTest::newRow("data_de8") << "de" << -100.0 << 100.0 << 1 << QString("-100") << ACC << ACC;
QTest::newRow("data_de9") << "de" << -100.0 << -10.0 << 1 << QString("10") << ITM << ITM;
QTest::newRow("data_de10") << "de" << 0.3 << 0.5 << 5 << QString("0,34567") << ACC << ACC;
- QTest::newRow("data_de11") << "de" << -0.3 << -0.5 << 5 << QString("-0,345678") << INV << INV;
+ QTest::newRow("data_de11") << "de" << -0.3 << -0.5 << 5 << QString("-0,345678") << ITM << INV;
QTest::newRow("data_de12") << "de" << -0.32 << 0.32 << 1 << QString("0") << ACC << ACC;
QTest::newRow("data_de13") << "de" << 0.0 << 100.0 << 1 << QString("3456a") << INV << INV;
QTest::newRow("data_de14") << "de" << -100.0 << 100.0 << 1 << QString("-3456a") << INV << INV;
diff --git a/tests/auto/qeasingcurve/tst_qeasingcurve.cpp b/tests/auto/qeasingcurve/tst_qeasingcurve.cpp
index 0122d43d98..124f900ff1 100644
--- a/tests/auto/qeasingcurve/tst_qeasingcurve.cpp
+++ b/tests/auto/qeasingcurve/tst_qeasingcurve.cpp
@@ -69,6 +69,8 @@ private slots:
void valueForProgress();
void setCustomType();
void operators();
+ void properties();
+ void metaTypes();
protected:
};
@@ -193,186 +195,208 @@ void tst_QEasingCurve::valueForProgress_data()
// integer values and avoid fp inaccuracies
QTest::newRow("Linear") << int(QEasingCurve::Linear)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.1 << 0.2 << 0.3 << 0.4 << 0.5 << 0.6 << 0.7 << 0.8 << 0.9 << 1);
+ << (RealList() << 0.0000 << 0.1000 << 0.2000 << 0.3000 << 0.4000 << 0.5000 << 0.6000 << 0.7000 << 0.8000 << 0.9000 << 1.0000);
QTest::newRow("InQuad") << int(QEasingCurve::InQuad)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.01 << 0.04 << 0.09 << 0.16 << 0.25 << 0.36 << 0.49 << 0.64 << 0.81 << 1);
+ << (RealList() << 0.0000 << 0.0100 << 0.0400 << 0.0900 << 0.1600 << 0.2500 << 0.3600 << 0.4900 << 0.6400 << 0.8100 << 1.0000);
QTest::newRow("OutQuad") << int(QEasingCurve::OutQuad)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.19 << 0.36 << 0.51 << 0.64 << 0.75 << 0.84 << 0.91 << 0.96 << 0.99 << 1);
+ << (RealList() << 0.0000 << 0.1900 << 0.3600 << 0.5100 << 0.6400 << 0.7500 << 0.8400 << 0.9100 << 0.9600 << 0.9900 << 1.0000);
QTest::newRow("InOutQuad") << int(QEasingCurve::InOutQuad)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.02 << 0.08 << 0.18 << 0.32 << 0.5 << 0.68 << 0.82 << 0.92 << 0.98 << 1);
+ << (RealList() << 0.0000 << 0.0200 << 0.0800 << 0.1800 << 0.3200 << 0.5000 << 0.6800 << 0.8200 << 0.9200 << 0.9800 << 1.0000);
QTest::newRow("OutInQuad") << int(QEasingCurve::OutInQuad)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.18 << 0.32 << 0.42 << 0.48 << 0.5 << 0.52 << 0.58 << 0.68 << 0.82 << 1);
+ << (RealList() << 0.0000 << 0.1800 << 0.3200 << 0.4200 << 0.4800 << 0.5000 << 0.5200 << 0.5800 << 0.6800 << 0.8200 << 1.0000);
QTest::newRow("InCubic") << int(QEasingCurve::InCubic)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.001 << 0.008 << 0.027 << 0.064 << 0.125 << 0.216 << 0.343 << 0.512 << 0.729 << 1);
+ << (RealList() << 0.0000 << 0.0010 << 0.0080 << 0.0270 << 0.0640 << 0.1250 << 0.2160 << 0.3430 << 0.5120 << 0.7290 << 1.0000);
QTest::newRow("OutCubic") << int(QEasingCurve::OutCubic)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.271 << 0.488 << 0.657 << 0.784 << 0.875 << 0.936 << 0.973 << 0.992 << 0.999 << 1);
+ << (RealList() << 0.0000 << 0.2710 << 0.4880 << 0.6570 << 0.7840 << 0.8750 << 0.9360 << 0.9730 << 0.9920 << 0.9990 << 1.0000);
QTest::newRow("InOutCubic") << int(QEasingCurve::InOutCubic)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.004 << 0.032 << 0.108 << 0.256 << 0.5 << 0.744 << 0.892 << 0.968 << 0.996 << 1);
+ << (RealList() << 0.0000 << 0.0040 << 0.0320 << 0.1080 << 0.2560 << 0.5000 << 0.7440 << 0.8920 << 0.9680 << 0.9960 << 1.0000);
QTest::newRow("OutInCubic") << int(QEasingCurve::OutInCubic)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.244 << 0.392 << 0.468 << 0.496 << 0.5 << 0.504 << 0.532 << 0.608 << 0.756 << 1);
+ << (RealList() << 0.0000 << 0.2440 << 0.3920 << 0.4680 << 0.4960 << 0.5000 << 0.5040 << 0.5320 << 0.6080 << 0.7560 << 1.0000);
QTest::newRow("InQuart") << int(QEasingCurve::InQuart)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.0001 << 0.0016 << 0.0081 << 0.0256 << 0.0625 << 0.1296 << 0.2401 << 0.4096 << 0.6561 << 1);
+ << (RealList() << 0.0000 << 0.0001 << 0.0016 << 0.0081 << 0.0256 << 0.0625 << 0.1296 << 0.2401 << 0.4096 << 0.6561 << 1.0000);
QTest::newRow("OutQuart") << int(QEasingCurve::OutQuart)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.3439 << 0.5904 << 0.7599 << 0.8704 << 0.9375 << 0.9744 << 0.9919 << 0.9984 << 0.9999 << 1);
+ << (RealList() << 0.0000 << 0.3439 << 0.5904 << 0.7599 << 0.8704 << 0.9375 << 0.9744 << 0.9919 << 0.9984 << 0.9999 << 1.0000);
QTest::newRow("InOutQuart") << int(QEasingCurve::InOutQuart)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.0008 << 0.0128 << 0.0648 << 0.2048 << 0.5 << 0.7952 << 0.9352 << 0.9872 << 0.9992 << 1);
+ << (RealList() << 0.0000 << 0.0008 << 0.0128 << 0.0648 << 0.2048 << 0.5000 << 0.7952 << 0.9352 << 0.9872 << 0.9992 << 1.0000);
QTest::newRow("OutInQuart") << int(QEasingCurve::OutInQuart)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.2952 << 0.4352 << 0.4872 << 0.4992 << 0.5 << 0.5008 << 0.5128 << 0.5648 << 0.7048 << 1);
+ << (RealList() << 0.0000 << 0.2952 << 0.4352 << 0.4872 << 0.4992 << 0.5000 << 0.5008 << 0.5128 << 0.5648 << 0.7048 << 1.0000);
QTest::newRow("InQuint") << int(QEasingCurve::InQuint)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 1e-05 << 0.00032 << 0.00243 << 0.01024 << 0.03125 << 0.07776 << 0.1681 << 0.3277 << 0.5905 << 1);
+ << (RealList() << 0.0000 << 0.0000 << 0.0003 << 0.0024 << 0.0102 << 0.0313 << 0.0778 << 0.1681 << 0.3277 << 0.5905 << 1.0000);
QTest::newRow("OutQuint") << int(QEasingCurve::OutQuint)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.4095 << 0.6723 << 0.8319 << 0.9222 << 0.9688 << 0.9898 << 0.9976 << 0.9997 << 1 << 1);
+ << (RealList() << 0.0000 << 0.4095 << 0.6723 << 0.8319 << 0.9222 << 0.9688 << 0.9898 << 0.9976 << 0.9997 << 1.0000 << 1.0000);
QTest::newRow("InOutQuint") << int(QEasingCurve::InOutQuint)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.00016 << 0.00512 << 0.03888 << 0.1638 << 0.5 << 0.8362 << 0.9611 << 0.9949 << 0.9998 << 1);
+ << (RealList() << 0.0000 << 0.0002 << 0.0051 << 0.0389 << 0.1638 << 0.5000 << 0.8362 << 0.9611 << 0.9949 << 0.9998 << 1.0000);
QTest::newRow("OutInQuint") << int(QEasingCurve::OutInQuint)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.3362 << 0.4611 << 0.4949 << 0.4998 << 0.5 << 0.5002 << 0.5051 << 0.5389 << 0.6638 << 1);
+ << (RealList() << 0.0000 << 0.3362 << 0.4611 << 0.4949 << 0.4998 << 0.5000 << 0.5002 << 0.5051 << 0.5389 << 0.6638 << 1.0000);
QTest::newRow("InSine") << int(QEasingCurve::InSine)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.01231 << 0.04894 << 0.109 << 0.191 << 0.2929 << 0.4122 << 0.546 << 0.691 << 0.8436 << 1);
+ << (RealList() << 0.0000 << 0.0123 << 0.0489 << 0.1090 << 0.1910 << 0.2929 << 0.4122 << 0.5460 << 0.6910 << 0.8436 << 1.0000);
QTest::newRow("OutSine") << int(QEasingCurve::OutSine)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.1564 << 0.309 << 0.454 << 0.5878 << 0.7071 << 0.809 << 0.891 << 0.9511 << 0.9877 << 1);
+ << (RealList() << 0.0000 << 0.1564 << 0.3090 << 0.4540 << 0.5878 << 0.7071 << 0.8090 << 0.8910 << 0.9511 << 0.9877 << 1.0000);
QTest::newRow("InOutSine") << int(QEasingCurve::InOutSine)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.02447 << 0.09549 << 0.2061 << 0.3455 << 0.5 << 0.6545 << 0.7939 << 0.9045 << 0.9755 << 1);
+ << (RealList() << 0.0000 << 0.0245 << 0.0955 << 0.2061 << 0.3455 << 0.5000 << 0.6545 << 0.7939 << 0.9045 << 0.9755 << 1.0000);
QTest::newRow("OutInSine") << int(QEasingCurve::OutInSine)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.1545 << 0.2939 << 0.4045 << 0.4755 << 0.5 << 0.5245 << 0.5955 << 0.7061 << 0.8455 << 1);
+ << (RealList() << 0.0000 << 0.1545 << 0.2939 << 0.4045 << 0.4755 << 0.5000 << 0.5245 << 0.5955 << 0.7061 << 0.8455 << 1.0000);
QTest::newRow("InExpo") << int(QEasingCurve::InExpo)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.0009531 << 0.002906 << 0.006812 << 0.01462 << 0.03025 << 0.0615 << 0.124 << 0.249 << 0.499 << 1);
+ << (RealList() << 0.0000 << 0.0010 << 0.0029 << 0.0068 << 0.0146 << 0.0303 << 0.0615 << 0.1240 << 0.2490 << 0.4990 << 1.0000);
QTest::newRow("OutExpo") << int(QEasingCurve::OutExpo)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.5005 << 0.7507 << 0.8759 << 0.9384 << 0.9697 << 0.9854 << 0.9932 << 0.9971 << 0.999 << 1);
+ << (RealList() << 0.0000 << 0.5005 << 0.7507 << 0.8759 << 0.9384 << 0.9697 << 0.9854 << 0.9932 << 0.9971 << 0.9990 << 1.0000);
QTest::newRow("InOutExpo") << int(QEasingCurve::InOutExpo)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.001453 << 0.007312 << 0.03075 << 0.1245 << 0.5002 << 0.8754 << 0.9692 << 0.9927 << 0.9985 << 1);
+ << (RealList() << 0.0000 << 0.0015 << 0.0073 << 0.0308 << 0.1245 << 0.5003 << 0.8754 << 0.9692 << 0.9927 << 0.9985 << 1.0000);
QTest::newRow("OutInExpo") << int(QEasingCurve::OutInExpo)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.3754 << 0.4692 << 0.4927 << 0.4985 << 0.5 << 0.5015 << 0.5073 << 0.5308 << 0.6245 << 1);
+ << (RealList() << 0.0000 << 0.3754 << 0.4692 << 0.4927 << 0.4985 << 0.5000 << 0.5015 << 0.5073 << 0.5308 << 0.6245 << 1.0000);
QTest::newRow("InCirc") << int(QEasingCurve::InCirc)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.005013 << 0.0202 << 0.04606 << 0.08348 << 0.134 << 0.2 << 0.2859 << 0.4 << 0.5641 << 1);
+ << (RealList() << 0.0000 << 0.0050 << 0.0202 << 0.0461 << 0.0835 << 0.1340 << 0.2000 << 0.2859 << 0.4000 << 0.5641 << 1.0000);
QTest::newRow("OutCirc") << int(QEasingCurve::OutCirc)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.4359 << 0.6 << 0.7141 << 0.8 << 0.866 << 0.9165 << 0.9539 << 0.9798 << 0.995 << 1);
+ << (RealList() << 0.0000 << 0.4359 << 0.6000 << 0.7141 << 0.8000 << 0.8660 << 0.9165 << 0.9539 << 0.9798 << 0.9950 << 1.0000);
QTest::newRow("InOutCirc") << int(QEasingCurve::InOutCirc)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.0101 << 0.04174 << 0.1 << 0.2 << 0.5 << 0.8 << 0.9 << 0.9583 << 0.9899 << 1);
+ << (RealList() << 0.0000 << 0.0101 << 0.0417 << 0.1000 << 0.2000 << 0.5000 << 0.8000 << 0.9000 << 0.9583 << 0.9899 << 1.0000);
QTest::newRow("OutInCirc") << int(QEasingCurve::OutInCirc)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.3 << 0.4 << 0.4583 << 0.4899 << 0.5 << 0.5101 << 0.5417 << 0.6 << 0.7 << 1);
+ << (RealList() << 0.0000 << 0.3000 << 0.4000 << 0.4583 << 0.4899 << 0.5000 << 0.5101 << 0.5417 << 0.6000 << 0.7000 << 1.0000);
QTest::newRow("InElastic") << int(QEasingCurve::InElastic)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.001953 << -0.001953 << -0.003906 << 0.01562 << -0.01562 << -0.03125 << 0.125 << -0.125 << -0.25 << 1);
+ << (RealList() << 0.0000 << 0.0020 << -0.0020 << -0.0039 << 0.0156 << -0.0156 << -0.0313 << 0.1250 << -0.1250 << -0.2500 << 1.0000);
QTest::newRow("OutElastic") << int(QEasingCurve::OutElastic)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 1.25 << 1.125 << 0.875 << 1.031 << 1.016 << 0.9844 << 1.004 << 1.002 << 0.998 << 1);
+ << (RealList() << 0.0000 << 1.2500 << 1.1250 << 0.8750 << 1.0313 << 1.0156 << 0.9844 << 1.0039 << 1.0020 << 0.9980 << 1.0000);
QTest::newRow("InOutElastic") << int(QEasingCurve::InOutElastic)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << -0.0009766 << 0.007812 << -0.01563 << -0.0625 << 0.5 << 1.062 << 1.016 << 0.9922 << 1.001 << 1);
+ << (RealList() << 0.0000 << -0.0010 << 0.0078 << -0.0156 << -0.0625 << 0.5000 << 1.0625 << 1.0156 << 0.9922 << 1.0010 << 1.0000);
QTest::newRow("OutInElastic") << int(QEasingCurve::OutInElastic)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.375 << 0.5625 << 0.4922 << 0.498 << 0.5 << 0.4961 << 0.5078 << 0.5313 << 0.25 << 1);
+ << (RealList() << 0.0000 << 0.3750 << 0.5625 << 0.4922 << 0.4980 << 0.5000 << 0.4961 << 0.5078 << 0.5313 << 0.2500 << 1.0000);
QTest::newRow("InBack") << int(QEasingCurve::InBack)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << -0.01431 << -0.04645 << -0.0802 << -0.09935 << -0.0877 << -0.02903 << 0.09287 << 0.2942 << 0.5912 << 1);
+ << (RealList() << 0.0000 << -0.0143 << -0.0465 << -0.0802 << -0.0994 << -0.0877 << -0.0290 << 0.0929 << 0.2942 << 0.5912 << 1.0000);
QTest::newRow("OutBack") << int(QEasingCurve::OutBack)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.4088 << 0.7058 << 0.9071 << 1.029 << 1.088 << 1.099 << 1.08 << 1.046 << 1.014 << 1);
+ << (RealList() << 0.0000 << 0.4088 << 0.7058 << 0.9071 << 1.0290 << 1.0877 << 1.0994 << 1.0802 << 1.0465 << 1.0143 << 1.0000);
QTest::newRow("InOutBack") << int(QEasingCurve::InOutBack)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << -0.03752 << -0.09256 << -0.07883 << 0.08993 << 0.5 << 0.9101 << 1.079 << 1.093 << 1.038 << 1);
+ << (RealList() << 0.0000 << -0.0375 << -0.0926 << -0.0788 << 0.0899 << 0.5000 << 0.9101 << 1.0788 << 1.0926 << 1.0375 << 1.0000);
QTest::newRow("OutInBack") << int(QEasingCurve::OutInBack)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.3529 << 0.5145 << 0.5497 << 0.5232 << 0.5 << 0.4768 << 0.4503 << 0.4855 << 0.6471 << 1);
+ << (RealList() << 0.0000 << 0.3529 << 0.5145 << 0.5497 << 0.5232 << 0.5000 << 0.4768 << 0.4503 << 0.4855 << 0.6471 << 1.0000);
QTest::newRow("InBounce") << int(QEasingCurve::InBounce)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.01188 << 0.06 << 0.06937 << 0.2275 << 0.2344 << 0.09 << 0.3194 << 0.6975 << 0.9244 << 1);
+ << (RealList() << 0.0000 << 0.0119 << 0.0600 << 0.0694 << 0.2275 << 0.2344 << 0.0900 << 0.3194 << 0.6975 << 0.9244 << 1.0000);
QTest::newRow("OutBounce") << int(QEasingCurve::OutBounce)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.07563 << 0.3025 << 0.6806 << 0.91 << 0.7656 << 0.7725 << 0.9306 << 0.94 << 0.9881 << 1);
+ << (RealList() << 0.0000 << 0.0756 << 0.3025 << 0.6806 << 0.9100 << 0.7656 << 0.7725 << 0.9306 << 0.9400 << 0.9881 << 1.0000);
QTest::newRow("InOutBounce") << int(QEasingCurve::InOutBounce)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.03 << 0.1138 << 0.045 << 0.3488 << 0.5 << 0.6512 << 0.955 << 0.8862 << 0.97 << 1);
+ << (RealList() << 0.0000 << 0.0300 << 0.1138 << 0.0450 << 0.3488 << 0.5000 << 0.6512 << 0.9550 << 0.8863 << 0.9700 << 1.0000);
QTest::newRow("OutInBounce") << int(QEasingCurve::OutInBounce)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.1513 << 0.41 << 0.2725 << 0.44 << 0.5 << 0.56 << 0.7275 << 0.59 << 0.8488 << 1);
+ << (RealList() << 0.0000 << 0.1513 << 0.4100 << 0.2725 << 0.4400 << 0.5000 << 0.5600 << 0.7275 << 0.5900 << 0.8488 << 1.0000);
QTest::newRow("InCurve") << int(QEasingCurve::InCurve)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.02447 << 0.1059 << 0.2343 << 0.3727 << 0.5 << 0.6055 << 0.7 << 0.8 << 0.9 << 1);
+ << (RealList() << 0.0000 << 0.0245 << 0.1059 << 0.2343 << 0.3727 << 0.5000 << 0.6055 << 0.7000 << 0.8000 << 0.9000 << 1.0000);
QTest::newRow("OutCurve") << int(QEasingCurve::OutCurve)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.1 << 0.2 << 0.3 << 0.3945 << 0.5 << 0.6273 << 0.7657 << 0.8941 << 0.9755 << 1);
+ << (RealList() << 0.0000 << 0.1000 << 0.2000 << 0.3000 << 0.3945 << 0.5000 << 0.6273 << 0.7657 << 0.8941 << 0.9755 << 1.0000);
QTest::newRow("SineCurve") << int(QEasingCurve::SineCurve)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.09549 << 0.3455 << 0.6545 << 0.9045 << 1 << 0.9045 << 0.6545 << 0.3455 << 0.09549 << 0);
+ << (RealList() << 0.0000 << 0.0955 << 0.3455 << 0.6545 << 0.9045 << 1.0000 << 0.9045 << 0.6545 << 0.3455 << 0.0955 << 0.0000);
QTest::newRow("CosineCurve") << int(QEasingCurve::CosineCurve)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0.5 << 0.7939 << 0.9755 << 0.9755 << 0.7939 << 0.5 << 0.2061 << 0.02447 << 0.02447 << 0.2061 << 0.5);
+ << (RealList() << 0.5000 << 0.7939 << 0.9755 << 0.9755 << 0.7939 << 0.5000 << 0.2061 << 0.0245 << 0.0245 << 0.2061 << 0.5000);
}
+/*
+ "fixedpoint" number that is scaled up by 10000.
+ This is to work around two bugs (precision and rounding error) in QString::setNum().
+ It does not trim off trailing zeros. This is good, just to emphasize the precision.
+*/
+QString fixedToString(int value)
+{
+ QString str;
+ if (value < 0) {
+ str+= QLatin1Char('-');
+ value = -value;
+ }
+
+ QString digitArg(QLatin1String("%1."));
+ for (int i = 10000; i >= 1; i/=10) {
+ int digit = value/i;
+ value -= digit*i;
+ str.append(digitArg.arg(digit));
+ digitArg = QLatin1String("%1");
+ }
+ return str;
+}
void tst_QEasingCurve::valueForProgress()
{
@@ -390,7 +414,7 @@ void tst_QEasingCurve::valueForProgress()
for (int t = 0; t <= 100; t+= 10) {
qreal ease = curve.valueForProgress(t/qreal(100));
strInputs += QString::fromAscii(" << %1").arg(t);
- strOutputs += " << " + QString().setNum(ease, 'g', 4);
+ strOutputs += " << " + fixedToString(qRound(ease*10000));
}
QString str = QString::fromAscii(" QTest::newRow(\"%1\") << int(QEasingCurve::%2)\n"
" << (IntList() %3)\n"
@@ -409,26 +433,13 @@ void tst_QEasingCurve::valueForProgress()
QFETCH(RealList, expected);
QEasingCurve curve((QEasingCurve::Type)type);
+ // in theory the baseline should't have an error of more than 0.00005 due to how its rounded,
+ // but due to FP imprecision, we have to adjust the error a bit more.
+ const qreal errorBound = 0.00006;
for (int i = 0; i < at.count(); ++i) {
- qreal ease = curve.valueForProgress(at.at(i)/qreal(100));
- // converting ease to 4 precision qreal to match the generated samples
- qreal easeConv = qreal(QString().setNum(ease, 'g', 4).toDouble());
- qreal ex = expected.at(i);
-
- // the least significant digit it is still subject to rounding errors
- qreal error = easeConv - ex;
- qreal errorbound = 0.00001;
-#if defined( Q_OS_WINCE ) || defined( Q_OS_SYMBIAN )
- // exception values for WINCE(this test should be rewritten, as it only freezes the status quo of QEasingCurve
- // The failing (2) values are explicitly excepted here:
- // The source values for the comparison table should remain untruncated double and the
- // error bound checking function dynamic. Also the source values should come from a "trusted" source and not
- // from QEasingCurve itself.
- if ((type == int(QEasingCurve::InOutBounce) && (i == 8 || i == 6) ) || (type == int(QEasingCurve::OutExpo) && i == 2))
- errorbound = 0.0002;
-#endif
- // accept the potential rounding error in the least significant digit
- QVERIFY(error <= errorbound );
+ const qreal ex = expected.at(i);
+ const qreal error = qAbs(ex - curve.valueForProgress(at.at(i)/qreal(100)));
+ QVERIFY(error <= errorBound);
}
#endif
}
@@ -496,6 +507,65 @@ void tst_QEasingCurve::operators()
QVERIFY(curve2 == curve);
}
+class tst_QEasingProperties : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing)
+public:
+ tst_QEasingProperties(QObject *parent = 0) : QObject(parent) {}
+
+ QEasingCurve easing() const { return e; }
+ void setEasing(const QEasingCurve& value) { e = value; }
+
+private:
+ QEasingCurve e;
+};
+
+// Test getting and setting easing properties via the metaobject system.
+void tst_QEasingCurve::properties()
+{
+ tst_QEasingProperties obj;
+
+ QEasingCurve inOutBack(QEasingCurve::InOutBack);
+ qreal overshoot = 1.5f;
+ inOutBack.setOvershoot(overshoot);
+ qreal amplitude = inOutBack.amplitude();
+ qreal period = inOutBack.period();
+
+ obj.setEasing(inOutBack);
+
+ QEasingCurve easing = qVariantValue<QEasingCurve>(obj.property("easing"));
+ QCOMPARE(easing.type(), QEasingCurve::InOutBack);
+ QCOMPARE(easing.overshoot(), overshoot);
+ QCOMPARE(easing.amplitude(), amplitude);
+ QCOMPARE(easing.period(), period);
+
+ QEasingCurve linear(QEasingCurve::Linear);
+ overshoot = linear.overshoot();
+ amplitude = linear.amplitude();
+ period = linear.period();
+
+ obj.setProperty("easing",
+ qVariantFromValue(QEasingCurve(QEasingCurve::Linear)));
+
+ easing = qVariantValue<QEasingCurve>(obj.property("easing"));
+ QCOMPARE(easing.type(), QEasingCurve::Linear);
+ QCOMPARE(easing.overshoot(), overshoot);
+ QCOMPARE(easing.amplitude(), amplitude);
+ QCOMPARE(easing.period(), period);
+}
+
+void tst_QEasingCurve::metaTypes()
+{
+ QVERIFY(QMetaType::type("QEasingCurve") == QMetaType::QEasingCurve);
+
+ QCOMPARE(QByteArray(QMetaType::typeName(QMetaType::QEasingCurve)),
+ QByteArray("QEasingCurve"));
+
+ QVERIFY(QMetaType::isRegistered(QMetaType::QEasingCurve));
+
+ QVERIFY(qMetaTypeId<QEasingCurve>() == QMetaType::QEasingCurve);
+}
QTEST_MAIN(tst_QEasingCurve)
#include "tst_qeasingcurve.moc"
diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp
index fdc629aba0..42e7250ac0 100644
--- a/tests/auto/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp
@@ -828,6 +828,17 @@ void tst_QFileInfo::compare_data()
QTest::addColumn<QString>("file2");
QTest::addColumn<bool>("same");
+#if defined(Q_OS_MAC)
+ // Since 10.6 we use realpath() in qfsfileengine, and it properly handles
+ // file system case sensitivity. However here in the autotest we don't
+ // check if the file system is case sensitive, so to make it pass in the
+ // default OS X installation we assume we are running on a case insensitive
+ // file system if on 10.6 and on a case sensitive file system if on 10.5
+ bool caseSensitiveOnMac = true;
+ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6)
+ caseSensitiveOnMac = false;
+#endif
+
QTest::newRow("data0")
<< QString::fromLatin1(SRCDIR "tst_qfileinfo.cpp")
<< QString::fromLatin1(SRCDIR "tst_qfileinfo.cpp")
@@ -845,6 +856,8 @@ void tst_QFileInfo::compare_data()
<< QString::fromLatin1(SRCDIR "tst_qfileinfo.cpp")
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
<< true;
+#elif defined(Q_OS_MAC)
+ << !caseSensitiveOnMac;
#else
<< false;
#endif
@@ -856,7 +869,7 @@ void tst_QFileInfo::compare()
QFETCH(QString, file2);
QFETCH(bool, same);
QFileInfo fi1(file1), fi2(file2);
- QCOMPARE(same, fi1 == fi2);
+ QCOMPARE(fi1 == fi2, same);
}
void tst_QFileInfo::consistent_data()
diff --git a/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp
index 287f472853..9f67a5e425 100644
--- a/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp
+++ b/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp
@@ -236,6 +236,26 @@ void tst_QFileSystemModel::rootPath()
QCOMPARE(model->rootPath(), QString(QDir::homePath()));
QCOMPARE(rootChanged.count(), oldRootPath == model->rootPath() ? 0 : 1);
QCOMPARE(model->rootDirectory().absolutePath(), QDir::homePath());
+
+ model->setRootPath(QDir::rootPath());
+ int oldCount = rootChanged.count();
+ oldRootPath = model->rootPath();
+ root = model->setRootPath(QDir::homePath() + QLatin1String("/."));
+ QTRY_VERIFY(model->rowCount(root) >= 0);
+ QCOMPARE(model->rootPath(), QDir::homePath());
+ QCOMPARE(rootChanged.count(), oldRootPath == model->rootPath() ? oldCount : oldCount + 1);
+ QCOMPARE(model->rootDirectory().absolutePath(), QDir::homePath());
+
+ QDir newdir = QDir::home();
+ if (newdir.cdUp()) {
+ oldCount = rootChanged.count();
+ oldRootPath = model->rootPath();
+ root = model->setRootPath(QDir::homePath() + QLatin1String("/.."));
+ QTRY_VERIFY(model->rowCount(root) >= 0);
+ QCOMPARE(model->rootPath(), newdir.path());
+ QCOMPARE(rootChanged.count(), oldCount + 1);
+ QCOMPARE(model->rootDirectory().absolutePath(), newdir.path());
+ }
}
void tst_QFileSystemModel::naturalCompare_data()
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index 101e3615b0..8ee494f08e 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -227,12 +227,12 @@ void tst_QGL::getSetCheck()
QCOMPARE(false, obj1.alpha());
QVERIFY(!obj1.testOption(QGL::AlphaChannel));
QVERIFY(obj1.testOption(QGL::NoAlphaChannel));
- obj1.setAlphaBufferSize(0);
+ obj1.setAlphaBufferSize(1);
QCOMPARE(true, obj1.alpha()); // setAlphaBufferSize() enables alpha.
- QCOMPARE(0, obj1.alphaBufferSize());
+ QCOMPARE(1, obj1.alphaBufferSize());
QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setAlphaBufferSize: Cannot set negative alpha buffer size -2147483648");
obj1.setAlphaBufferSize(TEST_INT_MIN);
- QCOMPARE(0, obj1.alphaBufferSize()); // Makes no sense with a negative buffer size
+ QCOMPARE(1, obj1.alphaBufferSize()); // Makes no sense with a negative buffer size
obj1.setAlphaBufferSize(3);
QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setAlphaBufferSize: Cannot set negative alpha buffer size -1");
obj1.setAlphaBufferSize(-1);
@@ -243,11 +243,11 @@ void tst_QGL::getSetCheck()
// int QGLFormat::stencilBufferSize()
// void QGLFormat::setStencilBufferSize(int)
QCOMPARE(-1, obj1.stencilBufferSize());
- obj1.setStencilBufferSize(0);
- QCOMPARE(0, obj1.stencilBufferSize());
+ obj1.setStencilBufferSize(1);
+ QCOMPARE(1, obj1.stencilBufferSize());
QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setStencilBufferSize: Cannot set negative stencil buffer size -2147483648");
obj1.setStencilBufferSize(TEST_INT_MIN);
- QCOMPARE(0, obj1.stencilBufferSize()); // Makes no sense with a negative buffer size
+ QCOMPARE(1, obj1.stencilBufferSize()); // Makes no sense with a negative buffer size
obj1.setStencilBufferSize(3);
QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setStencilBufferSize: Cannot set negative stencil buffer size -1");
obj1.setStencilBufferSize(-1);
@@ -352,6 +352,7 @@ void tst_QGL::getSetCheck()
// bool QGLFormat::accum()
// void QGLFormat::setAccum(bool)
+ obj1.setAccumBufferSize(0);
QCOMPARE(false, obj1.accum());
QVERIFY(!obj1.testOption(QGL::AccumBuffer));
QVERIFY(obj1.testOption(QGL::NoAccumBuffer));
@@ -430,6 +431,26 @@ void tst_QGL::getSetCheck()
obj1.setPlane(TEST_INT_MAX);
QCOMPARE(TEST_INT_MAX, obj1.plane());
+ // int QGLFormat::major/minorVersion()
+ // void QGLFormat::setVersion(int, int)
+ QCOMPARE(obj1.majorVersion(), 1);
+ QCOMPARE(obj1.minorVersion(), 0);
+ obj1.setVersion(3, 2);
+ QCOMPARE(obj1.majorVersion(), 3);
+ QCOMPARE(obj1.minorVersion(), 2);
+ QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setVersion: Cannot set zero or negative version number 0.1");
+ obj1.setVersion(0, 1);
+ QCOMPARE(obj1.majorVersion(), 3);
+ QCOMPARE(obj1.minorVersion(), 2);
+ QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setVersion: Cannot set zero or negative version number 3.-1");
+ obj1.setVersion(3, -1);
+ QCOMPARE(obj1.majorVersion(), 3);
+ QCOMPARE(obj1.minorVersion(), 2);
+ obj1.setVersion(TEST_INT_MAX, TEST_INT_MAX - 1);
+ QCOMPARE(obj1.majorVersion(), TEST_INT_MAX);
+ QCOMPARE(obj1.minorVersion(), TEST_INT_MAX - 1);
+
+
// operator== and operator!= for QGLFormat
QGLFormat format1;
QGLFormat format2;
@@ -513,6 +534,27 @@ void tst_QGL::getSetCheck()
QVERIFY(format1 == format2);
QVERIFY(!(format1 != format2));
+ format1.setVersion(3, 2);
+ QVERIFY(!(format1 == format2));
+ QVERIFY(format1 != format2);
+ format2.setVersion(3, 2);
+ QVERIFY(format1 == format2);
+ QVERIFY(!(format1 != format2));
+
+ format1.setProfile(QGLFormat::CoreProfile);
+ QVERIFY(!(format1 == format2));
+ QVERIFY(format1 != format2);
+ format2.setProfile(QGLFormat::CoreProfile);
+ QVERIFY(format1 == format2);
+ QVERIFY(!(format1 != format2));
+
+ format1.setOption(QGL::NoDeprecatedFunctions);
+ QVERIFY(!(format1 == format2));
+ QVERIFY(format1 != format2);
+ format2.setOption(QGL::NoDeprecatedFunctions);
+ QVERIFY(format1 == format2);
+ QVERIFY(!(format1 != format2));
+
// Copy constructor and assignment for QGLFormat.
QGLFormat format3(format1);
QGLFormat format4;
@@ -703,8 +745,6 @@ void tst_QGL::openGLVersionCheck()
#if defined(QT_OPENGL_ES_1)
QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Common_Version_1_0);
-#elif defined(QT_OPENGL_ES_1_CL)
- QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_CommonLite_Version_1_0);
#elif defined(QT_OPENGL_ES_2)
QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0);
#else
@@ -939,6 +979,47 @@ void tst_QGL::glWidgetWithAlpha()
delete w;
}
+
+void qt_opengl_draw_test_pattern(QPainter* painter, int width, int height)
+{
+ QPainterPath intersectingPath;
+ intersectingPath.moveTo(0, 0);
+ intersectingPath.lineTo(100, 0);
+ intersectingPath.lineTo(0, 100);
+ intersectingPath.lineTo(100, 100);
+ intersectingPath.closeSubpath();
+
+ QPainterPath trianglePath;
+ trianglePath.moveTo(50, 0);
+ trianglePath.lineTo(100, 100);
+ trianglePath.lineTo(0, 100);
+ trianglePath.closeSubpath();
+
+ painter->setTransform(QTransform()); // reset xform
+ painter->fillRect(-1, -1, width+2, height+2, Qt::red); // Background
+ painter->translate(14, 14);
+ painter->fillPath(intersectingPath, Qt::blue); // Test stencil buffer works
+ painter->translate(128, 0);
+ painter->setClipPath(trianglePath); // Test depth buffer works
+ painter->setTransform(QTransform()); // reset xform ready for fill
+ painter->fillRect(-1, -1, width+2, height+2, Qt::green);
+}
+
+void qt_opengl_check_test_pattern(const QImage& img)
+{
+ // As we're doing more than trivial painting, we can't just compare to
+ // an image rendered with raster. Instead, we sample at well-defined
+ // test-points:
+ QFUZZY_COMPARE_PIXELS(img.pixel(39, 64), QColor(Qt::red).rgb());
+ QFUZZY_COMPARE_PIXELS(img.pixel(89, 64), QColor(Qt::red).rgb());
+ QFUZZY_COMPARE_PIXELS(img.pixel(64, 39), QColor(Qt::blue).rgb());
+ QFUZZY_COMPARE_PIXELS(img.pixel(64, 89), QColor(Qt::blue).rgb());
+
+ QFUZZY_COMPARE_PIXELS(img.pixel(167, 39), QColor(Qt::red).rgb());
+ QFUZZY_COMPARE_PIXELS(img.pixel(217, 39), QColor(Qt::red).rgb());
+ QFUZZY_COMPARE_PIXELS(img.pixel(192, 64), QColor(Qt::green).rgb());
+}
+
class GLWidget : public QGLWidget
{
public:
@@ -953,9 +1034,7 @@ public:
QPaintEngine* pe = p.paintEngine();
engineType = pe->type();
- // This test only ensures it's possible to paint onto a QGLWidget. Full
- // paint engine feature testing is way out of scope!
- p.fillRect(-1, -1, width()+2, height()+2, Qt::red);
+ qt_opengl_draw_test_pattern(&p, width(), height());
// No p.end() or swap buffers, should be done automatically
}
@@ -968,7 +1047,7 @@ void tst_QGL::glWidgetRendering()
#ifdef Q_WS_QWS
w.setWindowFlags(Qt::FramelessWindowHint);
#endif
- w.setGeometry(100, 100, 200, 200);
+ w.resize(256, 128);
w.show();
#ifdef Q_WS_X11
@@ -979,11 +1058,8 @@ void tst_QGL::glWidgetRendering()
QVERIFY(w.beginOk);
QVERIFY(w.engineType == QPaintEngine::OpenGL || w.engineType == QPaintEngine::OpenGL2);
- QImage fb = w.grabFrameBuffer(false).convertToFormat(QImage::Format_RGB32);
- QImage reference(fb.size(), QImage::Format_RGB32);
- reference.fill(0xffff0000);
-
- QFUZZY_COMPARE_IMAGES(fb, reference);
+ QImage fb = w.grabFrameBuffer(false);
+ qt_opengl_check_test_pattern(fb);
}
void tst_QGL::glFBOSimpleRendering()
@@ -1044,42 +1120,14 @@ void tst_QGL::glFBORendering()
bool painterBegun = fboPainter.begin(fbo);
QVERIFY(painterBegun);
- QPainterPath intersectingPath;
- intersectingPath.moveTo(0, 0);
- intersectingPath.lineTo(100, 0);
- intersectingPath.lineTo(0, 100);
- intersectingPath.lineTo(100, 100);
- intersectingPath.closeSubpath();
+ qt_opengl_draw_test_pattern(&fboPainter, fbo->width(), fbo->height());
- QPainterPath trianglePath;
- trianglePath.moveTo(50, 0);
- trianglePath.lineTo(100, 100);
- trianglePath.lineTo(0, 100);
- trianglePath.closeSubpath();
-
- fboPainter.fillRect(0, 0, fbo->width(), fbo->height(), Qt::red); // Background
- fboPainter.translate(14, 14);
- fboPainter.fillPath(intersectingPath, Qt::blue); // Test stencil buffer works
- fboPainter.translate(128, 0);
- fboPainter.setClipPath(trianglePath); // Test depth buffer works
- fboPainter.setTransform(QTransform()); // reset xform
- fboPainter.fillRect(0, 0, fbo->width(), fbo->height(), Qt::green);
fboPainter.end();
QImage fb = fbo->toImage().convertToFormat(QImage::Format_RGB32);
delete fbo;
- // As we're doing more than trivial painting, we can't just compare to
- // an image rendered with raster. Instead, we sample at well-defined
- // test-points:
- QFUZZY_COMPARE_PIXELS(fb.pixel(39, 64), QColor(Qt::red).rgb());
- QFUZZY_COMPARE_PIXELS(fb.pixel(89, 64), QColor(Qt::red).rgb());
- QFUZZY_COMPARE_PIXELS(fb.pixel(64, 39), QColor(Qt::blue).rgb());
- QFUZZY_COMPARE_PIXELS(fb.pixel(64, 89), QColor(Qt::blue).rgb());
-
- QFUZZY_COMPARE_PIXELS(fb.pixel(167, 39), QColor(Qt::red).rgb());
- QFUZZY_COMPARE_PIXELS(fb.pixel(217, 39), QColor(Qt::red).rgb());
- QFUZZY_COMPARE_PIXELS(fb.pixel(192, 64), QColor(Qt::green).rgb());
+ qt_opengl_check_test_pattern(fb);
}
@@ -1354,8 +1402,8 @@ void tst_QGL::glWidgetRenderPixmap()
QImage reference(fb.size(), QImage::Format_RGB32);
reference.fill(0xffff0000);
-#ifdef QGL_EGL
- QSKIP("renderPixmap() not yet supported under EGL", SkipAll);
+#if defined(QGL_EGL) && !defined(Q_WS_X11)
+ QSKIP("renderPixmap() not yet supported under EGL on your platform", SkipAll);
#endif
QFUZZY_COMPARE_IMAGES(fb, reference);
diff --git a/tests/auto/qgl_threads/qgl_threads.pro b/tests/auto/qgl_threads/qgl_threads.pro
new file mode 100644
index 0000000000..9312c05139
--- /dev/null
+++ b/tests/auto/qgl_threads/qgl_threads.pro
@@ -0,0 +1,11 @@
+############################################################
+# Project file for autotest for file qgl.h
+############################################################
+
+load(qttest_p4)
+requires(contains(QT_CONFIG,opengl))
+QT += opengl
+
+HEADERS += tst_openglthreading.h
+SOURCES += tst_openglthreading.cpp
+
diff --git a/tests/auto/qgl_threads/tst_openglthreading.cpp b/tests/auto/qgl_threads/tst_openglthreading.cpp
new file mode 100644
index 0000000000..cf100cb20e
--- /dev/null
+++ b/tests/auto/qgl_threads/tst_openglthreading.cpp
@@ -0,0 +1,480 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QtCore/QtCore>
+#include <QtGui/QtGui>
+#include <QtOpenGL/QtOpenGL>
+#include "tst_openglthreading.h"
+
+#ifdef Q_WS_X11
+#include <private/qt_x11_p.h>
+#endif
+
+#define RUNNING_TIME 5000
+
+tst_OpenGLThreading::tst_OpenGLThreading(QObject *parent)
+ : QObject(parent)
+{
+}
+
+
+
+/*
+
+ swapInThread
+
+ The purpose of this testcase is to verify that it is possible to do rendering into
+ a GL context from the GUI thread, then swap the contents in from a background thread.
+
+ The usecase for this is to have the background thread do the waiting for vertical
+ sync while the GUI thread is idle.
+
+ Currently the locking is handled directly in the paintEvent(). For the actual usecase
+ in Qt, the locking is done in the windowsurface before starting any drawing while
+ unlocking is done after all drawing has been done.
+ */
+
+
+class SwapThread : public QThread
+{
+ Q_OBJECT
+public:
+ SwapThread(QGLWidget *widget)
+ : m_widget(widget)
+ {
+ moveToThread(this);
+ }
+
+ void run() {
+ QTime time;
+ time.start();
+ while (time.elapsed() < RUNNING_TIME) {
+ lock();
+ wait();
+
+ m_widget->makeCurrent();
+ m_widget->swapBuffers();
+ m_widget->doneCurrent();
+ unlock();
+ }
+ }
+
+ void lock() { m_mutex.lock(); }
+ void unlock() { m_mutex.unlock(); }
+
+ void wait() { m_wait_condition.wait(&m_mutex); }
+ void notify() { m_wait_condition.wakeAll(); }
+
+private:
+ QGLWidget *m_widget;
+ QMutex m_mutex;
+ QWaitCondition m_wait_condition;
+};
+
+class ForegroundWidget : public QGLWidget
+{
+public:
+ ForegroundWidget(const QGLFormat &format)
+ : QGLWidget(format), m_thread(0)
+ {
+ setAutoBufferSwap(false);
+ }
+
+ void paintEvent(QPaintEvent *)
+ {
+ m_thread->lock();
+ makeCurrent();
+ QPainter p(this);
+ p.fillRect(rect(), QColor(rand() % 256, rand() % 256, rand() % 256));
+ p.setPen(Qt::red);
+ p.setFont(QFont("SansSerif", 24));
+ p.drawText(rect(), Qt::AlignCenter, "This is an autotest");
+ p.end();
+ doneCurrent();
+ m_thread->notify();
+ m_thread->unlock();
+
+ update();
+ }
+
+ void setThread(SwapThread *thread) {
+ m_thread = thread;
+ }
+
+ SwapThread *m_thread;
+};
+
+void tst_OpenGLThreading::swapInThread()
+{
+#ifdef Q_OS_MAC
+ QSKIP("OpenGL threading tests are currently disabled on mac as they were causing reboots", SkipAll);
+#endif
+
+ QGLFormat format;
+ format.setSwapInterval(1);
+ ForegroundWidget widget(format);
+ SwapThread thread(&widget);
+ widget.setThread(&thread);
+ widget.show();
+
+ QTest::qWaitForWindowShown(&widget);
+ thread.start();
+
+ while (thread.isRunning()) {
+ qApp->processEvents();
+ }
+
+ widget.hide();
+
+ QVERIFY(true);
+}
+
+
+
+
+
+
+
+/*
+ textureUploadInThread
+
+ The purpose of this testcase is to verify that doing texture uploads in a background
+ thread is possible and that it works.
+ */
+
+class CreateAndUploadThread : public QThread
+{
+ Q_OBJECT
+public:
+ CreateAndUploadThread(QGLWidget *shareWidget)
+ {
+ m_gl = new QGLWidget(0, shareWidget);
+ moveToThread(this);
+ }
+
+ ~CreateAndUploadThread()
+ {
+ delete m_gl;
+ }
+
+ void run() {
+ m_gl->makeCurrent();
+ QTime time;
+ time.start();
+ while (time.elapsed() < RUNNING_TIME) {
+ QImage image(400, 300, QImage::Format_RGB32);
+ QPainter p(&image);
+ p.fillRect(image.rect(), QColor(rand() % 256, rand() % 256, rand() % 256));
+ p.setPen(Qt::red);
+ p.setFont(QFont("SansSerif", 24));
+ p.drawText(image.rect(), Qt::AlignCenter, "This is an autotest");
+ p.end();
+ m_gl->bindTexture(image, GL_TEXTURE_2D, GL_RGBA, QGLContext::InternalBindOption);
+ createdAndUploaded(image);
+ }
+ }
+
+signals:
+ void createdAndUploaded(const QImage &image);
+
+private:
+ QGLWidget *m_gl;
+};
+
+class TextureDisplay : public QGLWidget
+{
+ Q_OBJECT
+public:
+ void paintEvent(QPaintEvent *) {
+ QPainter p(this);
+ for (int i=0; i<m_images.size(); ++i) {
+ p.drawImage(m_positions.at(i), m_images.at(i));
+ m_positions[i] += QPoint(1, 1);
+ }
+ update();
+ }
+
+public slots:
+ void receiveImage(const QImage &image) {
+ m_images << image;
+ m_positions << QPoint(-rand() % width() / 2, -rand() % height() / 2);
+
+ if (m_images.size() > 100) {
+ m_images.takeFirst();
+ m_positions.takeFirst();
+ }
+ }
+
+private:
+ QList <QImage> m_images;
+ QList <QPoint> m_positions;
+};
+
+void tst_OpenGLThreading::textureUploadInThread()
+{
+#ifdef Q_OS_MAC
+ QSKIP("OpenGL threading tests are currently disabled on mac as they were causing reboots", SkipAll);
+#endif
+
+ TextureDisplay display;
+ CreateAndUploadThread thread(&display);
+
+ connect(&thread, SIGNAL(createdAndUploaded(QImage)), &display, SLOT(receiveImage(QImage)));
+
+ display.show();
+ QTest::qWaitForWindowShown(&display);
+
+ thread.start();
+
+ while (thread.isRunning()) {
+ qApp->processEvents();
+ }
+
+ QVERIFY(true);
+}
+
+
+
+
+
+
+/*
+ renderInThread
+
+ This test sets up a scene and renders it in a different thread.
+ For simplicity, the scene is simply a bunch of rectangles, but
+ if that works, we're in good shape..
+ */
+
+static inline float qrandom() { return (rand() % 100) / 100.f; }
+
+void renderAScene(int w, int h)
+{
+#ifdef QT_OPENGL_ES_2
+ QGLShaderProgram program;
+ program.addShaderFromSourceCode(QGLShader::Vertex, "attribute highp vec2 pos; void main() { gl_Position = vec4(pos.xy, 1.0, 1.0); }");
+ program.addShaderFromSourceCode(QGLShader::Fragment, "uniform lowp vec4 color; void main() { gl_FragColor = color; }");
+ program.bindAttributeLocation("pos", 0);
+ program.bind();
+ int colorId = program.uniformLocation("color");
+
+ glEnableVertexAttribArray(0);
+
+ for (int i=0; i<1000; ++i) {
+ GLfloat pos[] = {
+ (rand() % 100) / 100.,
+ (rand() % 100) / 100.,
+ (rand() % 100) / 100.,
+ (rand() % 100) / 100.,
+ (rand() % 100) / 100.,
+ (rand() % 100) / 100.
+ };
+
+ glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, pos);
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);
+ }
+#else
+ glViewport(0, 0, w, h);
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glFrustum(0, w, h, 0, 1, 100);
+ glTranslated(0, 0, -1);
+
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+
+ for (int i=0;i<1000; ++i) {
+ glBegin(GL_TRIANGLES);
+ glColor3f(qrandom(), qrandom(), qrandom());
+ glVertex2f(qrandom() * w, qrandom() * h);
+ glColor3f(qrandom(), qrandom(), qrandom());
+ glVertex2f(qrandom() * w, qrandom() * h);
+ glColor3f(qrandom(), qrandom(), qrandom());
+ glVertex2f(qrandom() * w, qrandom() * h);
+ glEnd();
+ }
+#endif
+}
+
+class ThreadSafeGLWidget : public QGLWidget
+{
+public:
+ void paintEvent(QPaintEvent *)
+ {
+ // ignored as we're anyway swapping as fast as we can
+ };
+
+ void resizeEvent(QResizeEvent *e)
+ {
+ mutex.lock();
+ newSize = e->size();
+ mutex.unlock();
+ };
+
+ QMutex mutex;
+ QSize newSize;
+};
+
+class SceneRenderingThread : public QThread
+{
+ Q_OBJECT
+public:
+ SceneRenderingThread(ThreadSafeGLWidget *widget)
+ : m_widget(widget)
+ {
+ moveToThread(this);
+ m_size = widget->size();
+ }
+
+ void run() {
+ QTime time;
+ time.start();
+ failure = false;
+
+ m_widget->makeCurrent();
+
+ while (time.elapsed() < RUNNING_TIME && !failure) {
+
+
+ m_widget->mutex.lock();
+ QSize s = m_widget->newSize;
+ m_widget->mutex.unlock();
+
+ if (s != m_size) {
+ glViewport(0, 0, s.width(), s.height());
+ }
+
+ if (QGLContext::currentContext() != m_widget->context()) {
+ failure = true;
+ break;
+ }
+
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ int w = m_widget->width();
+ int h = m_widget->height();
+
+ renderAScene(w, h);
+
+ int color;
+ glReadPixels(w / 2, h / 2, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &color);
+
+ m_widget->swapBuffers();
+ }
+
+ m_widget->doneCurrent();
+ }
+
+ bool failure;
+
+private:
+ ThreadSafeGLWidget *m_widget;
+ QSize m_size;
+};
+
+void tst_OpenGLThreading::renderInThread_data()
+{
+ QTest::addColumn<bool>("resize");
+ QTest::addColumn<bool>("update");
+
+ QTest::newRow("basic") << false << false;
+ QTest::newRow("with-resize") << true << false;
+ QTest::newRow("with-update") << false << true;
+ QTest::newRow("with-resize-and-update") << true << true;
+}
+
+void tst_OpenGLThreading::renderInThread()
+{
+#ifdef Q_OS_MAC
+ QSKIP("OpenGL threading tests are currently disabled on mac as they were causing reboots", SkipAll);
+#endif
+
+ QFETCH(bool, resize);
+ QFETCH(bool, update);
+
+ ThreadSafeGLWidget widget;
+ widget.resize(200, 200);
+ SceneRenderingThread thread(&widget);
+
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+ widget.doneCurrent();
+
+ thread.start();
+
+ int value = 10;
+ while (thread.isRunning()) {
+ if (resize)
+ widget.resize(200 + value, 200 + value);
+ if (update)
+ widget.update(100 + value, 100 + value, 20, 20);
+ qApp->processEvents();
+ value = -value;
+
+#ifdef Q_WS_WIN
+ Sleep(100);
+#else
+ usleep(100 * 1000);
+#endif
+ }
+
+ QVERIFY(!thread.failure);
+}
+
+
+
+
+int main(int argc, char **argv)
+{
+#ifdef Q_WS_X11
+ XInitThreads();
+#endif
+
+ QApplication app(argc, argv);
+ QTEST_DISABLE_KEYPAD_NAVIGATION \
+
+ tst_OpenGLThreading tc;
+ return QTest::qExec(&tc, argc, argv);
+}
+
+#include "tst_openglthreading.moc"
diff --git a/tests/auto/qgl_threads/tst_openglthreading.h b/tests/auto/qgl_threads/tst_openglthreading.h
new file mode 100644
index 0000000000..c4b55cdcc3
--- /dev/null
+++ b/tests/auto/qgl_threads/tst_openglthreading.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TST_OPENGLTHREADING_H
+#define TST_OPENGLTHREADING_H
+
+#include <QObject>
+
+class tst_OpenGLThreading : public QObject
+{
+Q_OBJECT
+public:
+ explicit tst_OpenGLThreading(QObject *parent = 0);
+
+private slots:
+ void swapInThread();
+ void textureUploadInThread();
+
+ void renderInThread_data();
+ void renderInThread();
+};
+
+#endif // TST_OPENGLTHREADING_H
diff --git a/tests/auto/qglbuffer/qglbuffer.pro b/tests/auto/qglbuffer/qglbuffer.pro
new file mode 100644
index 0000000000..07d05bb9db
--- /dev/null
+++ b/tests/auto/qglbuffer/qglbuffer.pro
@@ -0,0 +1,9 @@
+############################################################
+# Project file for autotest for file qglbuffer.h
+############################################################
+
+load(qttest_p4)
+requires(contains(QT_CONFIG,opengl))
+QT += opengl
+
+SOURCES += tst_qglbuffer.cpp
diff --git a/tests/auto/qglbuffer/tst_qglbuffer.cpp b/tests/auto/qglbuffer/tst_qglbuffer.cpp
new file mode 100644
index 0000000000..b7d58213ad
--- /dev/null
+++ b/tests/auto/qglbuffer/tst_qglbuffer.cpp
@@ -0,0 +1,261 @@
+/****************************************************************************
+**
+** 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 QtOpenGL module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QtOpenGL/qgl.h>
+#include <QtOpenGL/qglbuffer.h>
+
+class tst_QGLBuffer : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QGLBuffer() {}
+ ~tst_QGLBuffer() {}
+
+private slots:
+ void vertexBuffer_data();
+ void vertexBuffer();
+ void indexBuffer_data();
+ void indexBuffer();
+ void bufferSharing();
+
+private:
+ void testBuffer(QGLBuffer::Type type);
+};
+
+void tst_QGLBuffer::vertexBuffer_data()
+{
+ QTest::addColumn<int>("usagePattern");
+
+ QTest::newRow("StreamDraw") << int(QGLBuffer::StreamDraw);
+ QTest::newRow("StaticDraw") << int(QGLBuffer::StaticDraw);
+ QTest::newRow("DynamicDraw") << int(QGLBuffer::DynamicDraw);
+}
+
+void tst_QGLBuffer::vertexBuffer()
+{
+ testBuffer(QGLBuffer::VertexBuffer);
+}
+
+void tst_QGLBuffer::indexBuffer_data()
+{
+ vertexBuffer_data();
+}
+
+void tst_QGLBuffer::indexBuffer()
+{
+ testBuffer(QGLBuffer::IndexBuffer);
+}
+
+void tst_QGLBuffer::testBuffer(QGLBuffer::Type type)
+{
+ QFETCH(int, usagePattern);
+
+ QGLWidget w;
+ w.makeCurrent();
+
+ // Create the local object, but not the buffer in the server.
+ QGLBuffer buffer(type);
+ QVERIFY(buffer.usagePattern() == QGLBuffer::StaticDraw);
+ buffer.setUsagePattern(QGLBuffer::UsagePattern(usagePattern));
+
+ // Check the initial state.
+ QVERIFY(buffer.type() == type);
+ QVERIFY(!buffer.isCreated());
+ QVERIFY(buffer.bufferId() == 0);
+ QVERIFY(buffer.usagePattern() == QGLBuffer::UsagePattern(usagePattern));
+ QCOMPARE(buffer.size(), -1);
+
+ // Should not be able to bind it yet because it isn't created.
+ QVERIFY(!buffer.bind());
+
+ // Create the buffer - if this fails, then assume that the
+ // GL implementation does not support buffers at all.
+ if (!buffer.create())
+ QSKIP("Buffers are not supported on this platform", SkipAll);
+
+ // Should now have a buffer id.
+ QVERIFY(buffer.bufferId() != 0);
+
+ // Bind the buffer and upload some data.
+ QVERIFY(buffer.bind());
+ static GLfloat const data[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
+ buffer.allocate(data, sizeof(data));
+
+ // Check the buffer size.
+ QCOMPARE(buffer.size(), int(sizeof(data)));
+
+ // Map the buffer and read back its contents.
+ bool haveMap = false;
+ GLfloat *mapped = reinterpret_cast<GLfloat *>
+ (buffer.map(QGLBuffer::ReadOnly));
+ if (mapped) {
+ for (int index = 0; index < 9; ++index)
+ QCOMPARE(mapped[index], data[index]);
+ buffer.unmap();
+ haveMap = true;
+ } else {
+ qWarning("QGLBuffer::map() is not supported on this platform");
+ }
+
+ // Read back the buffer contents using read().
+ bool haveRead = false;
+ GLfloat readdata[9];
+ if (buffer.read(0, readdata, sizeof(readdata))) {
+ for (int index = 0; index < 9; ++index)
+ QCOMPARE(readdata[index], data[index]);
+ haveRead = true;
+ } else {
+ qWarning("QGLBuffer::read() is not supported on this platform");
+ }
+
+ // Write some different data to a specific location and check it.
+ static GLfloat const diffdata[] = {11, 12, 13};
+ buffer.write(sizeof(GLfloat) * 3, diffdata, sizeof(diffdata));
+ if (haveMap) {
+ mapped = reinterpret_cast<GLfloat *>(buffer.map(QGLBuffer::ReadOnly));
+ QVERIFY(mapped != 0);
+ for (int index = 0; index < 9; ++index) {
+ if (index >= 3 && index <= 5)
+ QCOMPARE(mapped[index], diffdata[index - 3]);
+ else
+ QCOMPARE(mapped[index], data[index]);
+ }
+ buffer.unmap();
+ }
+ if (haveRead) {
+ QVERIFY(buffer.read(0, readdata, sizeof(readdata)));
+ for (int index = 0; index < 9; ++index) {
+ if (index >= 3 && index <= 5)
+ QCOMPARE(readdata[index], diffdata[index - 3]);
+ else
+ QCOMPARE(readdata[index], data[index]);
+ }
+ }
+
+ // Write to the buffer using the return value from map.
+ if (haveMap) {
+ mapped = reinterpret_cast<GLfloat *>(buffer.map(QGLBuffer::WriteOnly));
+ QVERIFY(mapped != 0);
+ mapped[6] = 14;
+ buffer.unmap();
+
+ mapped = reinterpret_cast<GLfloat *>(buffer.map(QGLBuffer::ReadOnly));
+ QVERIFY(mapped != 0);
+ static GLfloat const diff2data[] = {11, 12, 13, 14};
+ for (int index = 0; index < 9; ++index) {
+ if (index >= 3 && index <= 6)
+ QCOMPARE(mapped[index], diff2data[index - 3]);
+ else
+ QCOMPARE(mapped[index], data[index]);
+ }
+ buffer.unmap();
+ }
+
+ // Resize the buffer.
+ buffer.allocate(sizeof(GLfloat) * 20);
+ QCOMPARE(buffer.size(), int(sizeof(GLfloat) * 20));
+ buffer.allocate(0, sizeof(GLfloat) * 32);
+ QCOMPARE(buffer.size(), int(sizeof(GLfloat) * 32));
+
+ // Release the buffer.
+ buffer.release();
+}
+
+void tst_QGLBuffer::bufferSharing()
+{
+ QGLWidget *w1 = new QGLWidget();
+ w1->makeCurrent();
+
+ QGLWidget *w2 = new QGLWidget(0, w1);
+ if (!w2->isSharing()) {
+ delete w2;
+ delete w1;
+ QSKIP("Context sharing is not supported on this platform", SkipSingle);
+ }
+
+ // Bind the buffer in the first context and write some data to it.
+ QGLBuffer buffer(QGLBuffer::VertexBuffer);
+ if (!buffer.create())
+ QSKIP("Buffers are not supported on this platform", SkipSingle);
+ QVERIFY(buffer.isCreated());
+ QVERIFY(buffer.bind());
+ static GLfloat const data[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
+ buffer.allocate(data, sizeof(data));
+ QCOMPARE(buffer.size(), int(sizeof(data)));
+ buffer.release();
+
+ // Bind the buffer in the second context and read back the data.
+ w2->makeCurrent();
+ QVERIFY(buffer.bind());
+ QCOMPARE(buffer.size(), int(sizeof(data)));
+ GLfloat readdata[9];
+ if (buffer.read(0, readdata, sizeof(readdata))) {
+ for (int index = 0; index < 9; ++index)
+ QCOMPARE(readdata[index], data[index]);
+ }
+ buffer.release();
+
+ // Delete the first context.
+ delete w1;
+
+ // Make the second context current again because deleting the first
+ // one will call doneCurrent() even though it wasn't current!
+ w2->makeCurrent();
+
+ // The buffer should still be valid in the second context.
+ QVERIFY(buffer.bufferId() != 0);
+ QVERIFY(buffer.isCreated());
+ QVERIFY(buffer.bind());
+ QCOMPARE(buffer.size(), int(sizeof(data)));
+ buffer.release();
+
+ // Delete the second context.
+ delete w2;
+
+ // The buffer should now be invalid.
+ QVERIFY(buffer.bufferId() == 0);
+ QVERIFY(!buffer.isCreated());
+}
+
+QTEST_MAIN(tst_QGLBuffer)
+
+#include "tst_qglbuffer.moc"
diff --git a/tests/auto/qgraphicsitem/nestedClipping_reference.png b/tests/auto/qgraphicsitem/nestedClipping_reference.png
deleted file mode 100644
index 3bd4fe7f34..0000000000
--- a/tests/auto/qgraphicsitem/nestedClipping_reference.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
index 9d437d60ba..d37ff768b1 100644
--- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -50,6 +50,7 @@
#include <private/qgraphicssceneindex_p.h>
#include <math.h>
#include "../../shared/util.h"
+#include "../qpathclipper/pathcompare.h"
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
#include <windows.h>
@@ -3596,7 +3597,7 @@ void tst_QGraphicsScene::task250680_childClip()
QPainterPath path;
path.addRect(-25, -25, 50, 50);
- QCOMPARE(rect->clipPath(), path);
+ QVERIFY(QPathCompare::comparePaths(rect->clipPath().simplified(), path));
QCOMPARE(scene.items(QRectF(320, 240, 5, 5)).size(), 2);
rect->rotate(45);
diff --git a/tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro b/tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro
new file mode 100644
index 0000000000..da00baf283
--- /dev/null
+++ b/tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro
@@ -0,0 +1,5 @@
+load(qttest_p4)
+SOURCES += tst_qgraphicsvideoitem.cpp
+
+QT += multimedia
+requires(contains(QT_CONFIG, multimedia))
diff --git a/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp b/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp
new file mode 100644
index 0000000000..7fb6005160
--- /dev/null
+++ b/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp
@@ -0,0 +1,670 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include <QtMultimedia/qgraphicsvideoitem.h>
+
+#include <QtGui/qapplication.h>
+#include <QtGui/qgraphicsscene.h>
+#include <QtGui/qgraphicsview.h>
+#include <QtMultimedia/qabstractvideosurface.h>
+#include <QtMultimedia/qmediaobject.h>
+#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/qvideooutputcontrol.h>
+#include <QtMultimedia/qvideorenderercontrol.h>
+#include <QtMultimedia/qvideosurfaceformat.h>
+
+#include <QtMultimedia/private/qpaintervideosurface_p.h>
+
+class tst_QGraphicsVideoItem : public QObject
+{
+ Q_OBJECT
+public slots:
+ void initTestCase();
+
+private slots:
+ void nullObject();
+ void nullService();
+ void nullOutputControl();
+ void noOutputs();
+ void serviceDestroyed();
+ void mediaObjectDestroyed();
+ void setMediaObject();
+
+ void show();
+
+ void aspectRatioMode();
+ void offset();
+ void size();
+ void nativeSize_data();
+ void nativeSize();
+
+ void boundingRect_data();
+ void boundingRect();
+
+ void paint();
+};
+
+Q_DECLARE_METATYPE(const uchar *)
+Q_DECLARE_METATYPE(Qt::AspectRatioMode)
+
+class QtTestOutputControl : public QVideoOutputControl
+{
+public:
+ QtTestOutputControl() : m_output(NoOutput) {}
+
+ QList<Output> availableOutputs() const { return m_outputs; }
+ void setAvailableOutputs(const QList<Output> outputs) { m_outputs = outputs; }
+
+ Output output() const { return m_output; }
+ virtual void setOutput(Output output) { m_output = output; }
+
+private:
+ Output m_output;
+ QList<Output> m_outputs;
+};
+
+class QtTestRendererControl : public QVideoRendererControl
+{
+public:
+ QtTestRendererControl()
+ : m_surface(0)
+ {
+ }
+
+ QAbstractVideoSurface *surface() const { return m_surface; }
+ void setSurface(QAbstractVideoSurface *surface) { m_surface = surface; }
+
+private:
+ QAbstractVideoSurface *m_surface;
+};
+
+class QtTestVideoService : public QMediaService
+{
+ Q_OBJECT
+public:
+ QtTestVideoService(
+ QtTestOutputControl *output,
+ QtTestRendererControl *renderer)
+ : QMediaService(0)
+ , outputControl(output)
+ , rendererControl(renderer)
+ {
+ }
+
+ ~QtTestVideoService()
+ {
+ delete outputControl;
+ delete rendererControl;
+ }
+
+ QMediaControl *control(const char *name) const
+ {
+ if (qstrcmp(name, QVideoOutputControl_iid) == 0)
+ return outputControl;
+ else if (qstrcmp(name, QVideoRendererControl_iid) == 0)
+ return rendererControl;
+ else
+ return 0;
+ }
+
+ QtTestOutputControl *outputControl;
+ QtTestRendererControl *rendererControl;
+};
+
+class QtTestVideoObject : public QMediaObject
+{
+ Q_OBJECT
+public:
+ QtTestVideoObject(QtTestRendererControl *renderer):
+ QMediaObject(0, new QtTestVideoService(new QtTestOutputControl, renderer))
+ {
+ testService = qobject_cast<QtTestVideoService*>(service());
+ QList<QVideoOutputControl::Output> outputs;
+
+ if (renderer)
+ outputs.append(QVideoOutputControl::RendererOutput);
+
+ testService->outputControl->setAvailableOutputs(outputs);
+ }
+
+ QtTestVideoObject(QtTestVideoService *service):
+ QMediaObject(0, service),
+ testService(service)
+ {
+ }
+
+ ~QtTestVideoObject()
+ {
+ delete testService;
+ }
+
+ QtTestVideoService *testService;
+};
+
+class QtTestGraphicsVideoItem : public QGraphicsVideoItem
+{
+public:
+ QtTestGraphicsVideoItem(QGraphicsItem *parent = 0)
+ : QGraphicsVideoItem(parent)
+ , m_paintCount(0)
+ {
+ }
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+ {
+ ++m_paintCount;
+
+ QTestEventLoop::instance().exitLoop();
+
+ QGraphicsVideoItem::paint(painter, option, widget);
+ }
+
+ bool waitForPaint(int secs)
+ {
+ const int paintCount = m_paintCount;
+
+ QTestEventLoop::instance().enterLoop(secs);
+
+ return m_paintCount != paintCount;
+ }
+
+ int paintCount() const
+ {
+ return m_paintCount;
+ }
+
+private:
+ int m_paintCount;
+};
+
+void tst_QGraphicsVideoItem::initTestCase()
+{
+ qRegisterMetaType<Qt::AspectRatioMode>();
+}
+
+void tst_QGraphicsVideoItem::nullObject()
+{
+ QGraphicsVideoItem item(0);
+
+ QVERIFY(item.boundingRect().isEmpty());
+}
+
+void tst_QGraphicsVideoItem::nullService()
+{
+ QtTestVideoService *service = 0;
+
+ QtTestVideoObject object(service);
+
+ QtTestGraphicsVideoItem *item = new QtTestGraphicsVideoItem;
+ item->setMediaObject(&object);
+
+ QVERIFY(item->boundingRect().isEmpty());
+
+ item->hide();
+ item->show();
+
+ QGraphicsScene graphicsScene;
+ graphicsScene.addItem(item);
+ QGraphicsView graphicsView(&graphicsScene);
+ graphicsView.show();
+}
+
+void tst_QGraphicsVideoItem::nullOutputControl()
+{
+ QtTestVideoObject object(new QtTestVideoService(0, 0));
+
+ QtTestGraphicsVideoItem *item = new QtTestGraphicsVideoItem;
+ item->setMediaObject(&object);
+
+ QVERIFY(item->boundingRect().isEmpty());
+
+ item->hide();
+ item->show();
+
+ QGraphicsScene graphicsScene;
+ graphicsScene.addItem(item);
+ QGraphicsView graphicsView(&graphicsScene);
+ graphicsView.show();
+}
+
+void tst_QGraphicsVideoItem::noOutputs()
+{
+ QtTestRendererControl *control = 0;
+ QtTestVideoObject object(control);
+
+ QtTestGraphicsVideoItem *item = new QtTestGraphicsVideoItem;
+ item->setMediaObject(&object);
+
+ QVERIFY(item->boundingRect().isEmpty());
+
+ item->hide();
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
+ item->show();
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
+
+ QGraphicsScene graphicsScene;
+ graphicsScene.addItem(item);
+ QGraphicsView graphicsView(&graphicsScene);
+ graphicsView.show();
+}
+
+void tst_QGraphicsVideoItem::serviceDestroyed()
+{
+ QtTestVideoObject object(new QtTestRendererControl);
+
+ QGraphicsVideoItem item;
+ item.setMediaObject(&object);
+
+ QtTestVideoService *service = object.testService;
+ object.testService = 0;
+
+ delete service;
+
+ QCOMPARE(item.mediaObject(), static_cast<QMediaObject *>(&object));
+ QVERIFY(item.boundingRect().isEmpty());
+}
+
+void tst_QGraphicsVideoItem::mediaObjectDestroyed()
+{
+ QtTestVideoObject *object = new QtTestVideoObject(new QtTestRendererControl);
+
+ QGraphicsVideoItem item;
+ item.setMediaObject(object);
+
+ delete object;
+ object = 0;
+
+ QCOMPARE(item.mediaObject(), static_cast<QMediaObject *>(object));
+ QVERIFY(item.boundingRect().isEmpty());
+}
+
+void tst_QGraphicsVideoItem::setMediaObject()
+{
+ QMediaObject *nullObject = 0;
+ QtTestVideoObject object(new QtTestRendererControl);
+
+ QGraphicsVideoItem item;
+
+ QCOMPARE(item.mediaObject(), nullObject);
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
+
+ item.setMediaObject(&object);
+ QCOMPARE(item.mediaObject(), static_cast<QMediaObject *>(&object));
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::RendererOutput);
+ QVERIFY(object.testService->rendererControl->surface() != 0);
+
+ item.setMediaObject(0);
+ QCOMPARE(item.mediaObject(), nullObject);
+
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
+
+ item.setVisible(false);
+
+ item.setMediaObject(&object);
+ QCOMPARE(item.mediaObject(), static_cast<QMediaObject *>(&object));
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
+ QVERIFY(object.testService->rendererControl->surface() != 0);
+}
+
+void tst_QGraphicsVideoItem::show()
+{
+ QtTestVideoObject object(new QtTestRendererControl);
+ QtTestGraphicsVideoItem *item = new QtTestGraphicsVideoItem;
+ item->setMediaObject(&object);
+
+ // Graphics items are visible by default
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::RendererOutput);
+ QVERIFY(object.testService->rendererControl->surface() != 0);
+
+ item->hide();
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::RendererOutput);
+
+ item->show();
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::RendererOutput);
+ QVERIFY(object.testService->rendererControl->surface() != 0);
+
+ QVERIFY(item->boundingRect().isEmpty());
+
+ QVideoSurfaceFormat format(QSize(320,240),QVideoFrame::Format_RGB32);
+ QVERIFY(object.testService->rendererControl->surface()->start(format));
+
+ QVERIFY(!item->boundingRect().isEmpty());
+
+ QGraphicsScene graphicsScene;
+ graphicsScene.addItem(item);
+ QGraphicsView graphicsView(&graphicsScene);
+ graphicsView.show();
+
+ QVERIFY(item->paintCount() || item->waitForPaint(1));
+}
+
+void tst_QGraphicsVideoItem::aspectRatioMode()
+{
+ QGraphicsVideoItem item;
+
+ QCOMPARE(item.aspectRatioMode(), Qt::KeepAspectRatio);
+
+ item.setAspectRatioMode(Qt::IgnoreAspectRatio);
+ QCOMPARE(item.aspectRatioMode(), Qt::IgnoreAspectRatio);
+
+ item.setAspectRatioMode(Qt::KeepAspectRatioByExpanding);
+ QCOMPARE(item.aspectRatioMode(), Qt::KeepAspectRatioByExpanding);
+
+ item.setAspectRatioMode(Qt::KeepAspectRatio);
+ QCOMPARE(item.aspectRatioMode(), Qt::KeepAspectRatio);
+}
+
+void tst_QGraphicsVideoItem::offset()
+{
+ QGraphicsVideoItem item;
+
+ QCOMPARE(item.offset(), QPointF(0, 0));
+
+ item.setOffset(QPointF(-32.4, 43.0));
+ QCOMPARE(item.offset(), QPointF(-32.4, 43.0));
+
+ item.setOffset(QPointF(1, 1));
+ QCOMPARE(item.offset(), QPointF(1, 1));
+
+ item.setOffset(QPointF(12, -30.4));
+ QCOMPARE(item.offset(), QPointF(12, -30.4));
+
+ item.setOffset(QPointF(-90.4, -75));
+ QCOMPARE(item.offset(), QPointF(-90.4, -75));
+}
+
+void tst_QGraphicsVideoItem::size()
+{
+ QGraphicsVideoItem item;
+
+ QCOMPARE(item.size(), QSizeF(320, 240));
+
+ item.setSize(QSizeF(542.5, 436.3));
+ QCOMPARE(item.size(), QSizeF(542.5, 436.3));
+
+ item.setSize(QSizeF(-43, 12));
+ QCOMPARE(item.size(), QSizeF(0, 0));
+
+ item.setSize(QSizeF(54, -9));
+ QCOMPARE(item.size(), QSizeF(0, 0));
+
+ item.setSize(QSizeF(-90, -65));
+ QCOMPARE(item.size(), QSizeF(0, 0));
+
+ item.setSize(QSizeF(1000, 1000));
+ QCOMPARE(item.size(), QSizeF(1000, 1000));
+}
+
+void tst_QGraphicsVideoItem::nativeSize_data()
+{
+ QTest::addColumn<QSize>("frameSize");
+ QTest::addColumn<QRect>("viewport");
+ QTest::addColumn<QSize>("pixelAspectRatio");
+ QTest::addColumn<QSizeF>("nativeSize");
+
+ QTest::newRow("640x480")
+ << QSize(640, 480)
+ << QRect(0, 0, 640, 480)
+ << QSize(1, 1)
+ << QSizeF(640, 480);
+
+ QTest::newRow("800x600, (80,60, 640x480) viewport")
+ << QSize(800, 600)
+ << QRect(80, 60, 640, 480)
+ << QSize(1, 1)
+ << QSizeF(640, 480);
+
+ QTest::newRow("800x600, (80,60, 640x480) viewport, 4:3")
+ << QSize(800, 600)
+ << QRect(80, 60, 640, 480)
+ << QSize(4, 3)
+ << QSizeF(853, 480);
+}
+
+void tst_QGraphicsVideoItem::nativeSize()
+{
+ QFETCH(QSize, frameSize);
+ QFETCH(QRect, viewport);
+ QFETCH(QSize, pixelAspectRatio);
+ QFETCH(QSizeF, nativeSize);
+
+ QtTestVideoObject object(new QtTestRendererControl);
+ QGraphicsVideoItem item;
+ item.setMediaObject(&object);
+
+ QCOMPARE(item.nativeSize(), QSizeF());
+
+ QSignalSpy spy(&item, SIGNAL(nativeSizeChanged(QSizeF)));
+
+ QVideoSurfaceFormat format(frameSize, QVideoFrame::Format_ARGB32);
+ format.setViewport(viewport);
+ format.setPixelAspectRatio(pixelAspectRatio);
+
+ QVERIFY(object.testService->rendererControl->surface()->start(format));
+
+ QCOMPARE(item.nativeSize(), nativeSize);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.last().first().toSizeF(), nativeSize);
+
+ object.testService->rendererControl->surface()->stop();
+
+ QCOMPARE(item.nativeSize(), QSizeF(0, 0));
+ QCOMPARE(spy.count(), 2);
+ QCOMPARE(spy.last().first().toSizeF(), QSizeF(0, 0));
+}
+
+void tst_QGraphicsVideoItem::boundingRect_data()
+{
+ QTest::addColumn<QSize>("frameSize");
+ QTest::addColumn<QPointF>("offset");
+ QTest::addColumn<QSizeF>("size");
+ QTest::addColumn<Qt::AspectRatioMode>("aspectRatioMode");
+ QTest::addColumn<QRectF>("expectedRect");
+
+
+ QTest::newRow("640x480: (0,0 640x480), Keep")
+ << QSize(640, 480)
+ << QPointF(0, 0)
+ << QSizeF(640, 480)
+ << Qt::KeepAspectRatio
+ << QRectF(0, 0, 640, 480);
+
+ QTest::newRow("800x600, (0,0, 640x480), Keep")
+ << QSize(800, 600)
+ << QPointF(0, 0)
+ << QSizeF(640, 480)
+ << Qt::KeepAspectRatio
+ << QRectF(0, 0, 640, 480);
+
+ QTest::newRow("800x600, (0,0, 640x480), KeepByExpanding")
+ << QSize(800, 600)
+ << QPointF(0, 0)
+ << QSizeF(640, 480)
+ << Qt::KeepAspectRatioByExpanding
+ << QRectF(0, 0, 640, 480);
+
+ QTest::newRow("800x600, (0,0, 640x480), Ignore")
+ << QSize(800, 600)
+ << QPointF(0, 0)
+ << QSizeF(640, 480)
+ << Qt::IgnoreAspectRatio
+ << QRectF(0, 0, 640, 480);
+
+ QTest::newRow("800x600, (100,100, 640x480), Keep")
+ << QSize(800, 600)
+ << QPointF(100, 100)
+ << QSizeF(640, 480)
+ << Qt::KeepAspectRatio
+ << QRectF(100, 100, 640, 480);
+
+ QTest::newRow("800x600, (100,-100, 640x480), KeepByExpanding")
+ << QSize(800, 600)
+ << QPointF(100, -100)
+ << QSizeF(640, 480)
+ << Qt::KeepAspectRatioByExpanding
+ << QRectF(100, -100, 640, 480);
+
+ QTest::newRow("800x600, (-100,-100, 640x480), Ignore")
+ << QSize(800, 600)
+ << QPointF(-100, -100)
+ << QSizeF(640, 480)
+ << Qt::IgnoreAspectRatio
+ << QRectF(-100, -100, 640, 480);
+
+ QTest::newRow("800x600, (0,0, 1920x1024), Keep")
+ << QSize(800, 600)
+ << QPointF(0, 0)
+ << QSizeF(1920, 1024)
+ << Qt::KeepAspectRatio
+ << QRectF(832.0 / 3, 0, 4096.0 / 3, 1024);
+
+ QTest::newRow("800x600, (0,0, 1920x1024), KeepByExpanding")
+ << QSize(800, 600)
+ << QPointF(0, 0)
+ << QSizeF(1920, 1024)
+ << Qt::KeepAspectRatioByExpanding
+ << QRectF(0, 0, 1920, 1024);
+
+ QTest::newRow("800x600, (0,0, 1920x1024), Ignore")
+ << QSize(800, 600)
+ << QPointF(0, 0)
+ << QSizeF(1920, 1024)
+ << Qt::IgnoreAspectRatio
+ << QRectF(0, 0, 1920, 1024);
+
+ QTest::newRow("800x600, (100,100, 1920x1024), Keep")
+ << QSize(800, 600)
+ << QPointF(100, 100)
+ << QSizeF(1920, 1024)
+ << Qt::KeepAspectRatio
+ << QRectF(100 + 832.0 / 3, 100, 4096.0 / 3, 1024);
+
+ QTest::newRow("800x600, (100,-100, 1920x1024), KeepByExpanding")
+ << QSize(800, 600)
+ << QPointF(100, -100)
+ << QSizeF(1920, 1024)
+ << Qt::KeepAspectRatioByExpanding
+ << QRectF(100, -100, 1920, 1024);
+
+ QTest::newRow("800x600, (-100,-100, 1920x1024), Ignore")
+ << QSize(800, 600)
+ << QPointF(-100, -100)
+ << QSizeF(1920, 1024)
+ << Qt::IgnoreAspectRatio
+ << QRectF(-100, -100, 1920, 1024);
+}
+
+void tst_QGraphicsVideoItem::boundingRect()
+{
+ QFETCH(QSize, frameSize);
+ QFETCH(QPointF, offset);
+ QFETCH(QSizeF, size);
+ QFETCH(Qt::AspectRatioMode, aspectRatioMode);
+ QFETCH(QRectF, expectedRect);
+
+ QtTestVideoObject object(new QtTestRendererControl);
+ QGraphicsVideoItem item;
+ item.setMediaObject(&object);
+
+ item.setOffset(offset);
+ item.setSize(size);
+ item.setAspectRatioMode(aspectRatioMode);
+
+ QVideoSurfaceFormat format(frameSize, QVideoFrame::Format_ARGB32);
+
+ QVERIFY(object.testService->rendererControl->surface()->start(format));
+
+ QCOMPARE(item.boundingRect(), expectedRect);
+}
+
+static const uchar rgb32ImageData[] =
+{
+ 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00,
+ 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00
+};
+
+void tst_QGraphicsVideoItem::paint()
+{
+ QtTestVideoObject object(new QtTestRendererControl);
+ QtTestGraphicsVideoItem *item = new QtTestGraphicsVideoItem;
+ item->setMediaObject(&object);
+
+ QGraphicsScene graphicsScene;
+ graphicsScene.addItem(item);
+ QGraphicsView graphicsView(&graphicsScene);
+ graphicsView.show();
+
+ QPainterVideoSurface *surface = qobject_cast<QPainterVideoSurface *>(
+ object.testService->rendererControl->surface());
+
+ QVideoSurfaceFormat format(QSize(2, 2), QVideoFrame::Format_RGB32);
+
+ QVERIFY(surface->start(format));
+ QCOMPARE(surface->isActive(), true);
+ QCOMPARE(surface->isReady(), true);
+
+ QVERIFY(item->waitForPaint(1));
+
+ QCOMPARE(surface->isActive(), true);
+ QCOMPARE(surface->isReady(), true);
+
+ QVideoFrame frame(sizeof(rgb32ImageData), QSize(2, 2), 8, QVideoFrame::Format_RGB32);
+
+ frame.map(QAbstractVideoBuffer::WriteOnly);
+ memcpy(frame.bits(), rgb32ImageData, frame.mappedBytes());
+ frame.unmap();
+
+ QVERIFY(surface->present(frame));
+ QCOMPARE(surface->isActive(), true);
+ QCOMPARE(surface->isReady(), false);
+
+ QVERIFY(item->waitForPaint(1));
+
+ QCOMPARE(surface->isActive(), true);
+ QCOMPARE(surface->isReady(), true);
+}
+
+
+QTEST_MAIN(tst_QGraphicsVideoItem)
+
+#include "tst_qgraphicsvideoitem.moc"
diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
index 00bf144b7b..6941d23561 100644
--- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -163,6 +163,7 @@ private slots:
void addChildInpolishEvent();
void polishEvent();
void polishEvent2();
+ void autoFillBackground();
void initialShow();
void initialShow2();
@@ -2858,6 +2859,32 @@ void tst_QGraphicsWidget::polishEvent2()
QVERIFY(widget->events.contains(QEvent::Polish));
}
+void tst_QGraphicsWidget::autoFillBackground()
+{
+ QGraphicsWidget *widget = new QGraphicsWidget;
+ QCOMPARE(widget->autoFillBackground(), false);
+ widget->setAutoFillBackground(true);
+ QCOMPARE(widget->autoFillBackground(), true);
+
+ const QColor color(Qt::red);
+ const QRect rect(0, 0, 1, 1);
+
+ QGraphicsScene scene;
+ scene.addItem(widget);
+ widget->setGeometry(rect);
+
+ QPalette palette = widget->palette();
+ palette.setColor(QPalette::Window, color);
+ widget->setPalette(palette);
+
+ QImage image(rect.size(), QImage::Format_RGB32);
+ QPainter painter;
+ painter.begin(&image);
+ scene.render(&painter, rect, rect);
+ painter.end();
+ QCOMPARE(image.pixel(0, 0), color.rgb());
+}
+
void tst_QGraphicsWidget::initialShow()
{
class MyGraphicsWidget : public QGraphicsWidget
diff --git a/tests/auto/qheaderview/tst_qheaderview.cpp b/tests/auto/qheaderview/tst_qheaderview.cpp
index 857e7e3413..4642830f81 100644
--- a/tests/auto/qheaderview/tst_qheaderview.cpp
+++ b/tests/auto/qheaderview/tst_qheaderview.cpp
@@ -44,6 +44,7 @@
#include <QStandardItemModel>
#include <QStringListModel>
#include <QSortFilterProxyModel>
+#include <QTableView>
#include <qabstractitemmodel.h>
#include <qapplication.h>
@@ -190,6 +191,7 @@ private slots:
void task236450_hidden();
void task248050_hideRow();
void QTBUG6058_reset();
+ void QTBUG7833_sectionClicked();
protected:
QHeaderView *view;
@@ -1992,6 +1994,68 @@ void tst_QHeaderView::QTBUG6058_reset()
QCOMPARE(checkHeaderViewOrder(&view, QVector<int>() << 2 << 0 << 1 << 3 << 4 << 5 ) , 0);
}
+void tst_QHeaderView::QTBUG7833_sectionClicked()
+{
+
+
+
+
+ QTableView tv;
+ QStandardItemModel *sim = new QStandardItemModel(&tv);
+ QSortFilterProxyModel *proxyModel = new QSortFilterProxyModel(&tv);
+ proxyModel->setSourceModel(sim);
+ proxyModel->setDynamicSortFilter(true);
+ proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
+
+ QList<QStandardItem *> row;
+ for (int i = 0; i < 12; i++)
+ row.append(new QStandardItem(QString(QLatin1Char('A' + i))));
+ sim->appendRow(row);
+ row.clear();
+ for (int i = 12; i > 0; i--)
+ row.append(new QStandardItem(QString(QLatin1Char('A' + i))));
+ sim->appendRow(row);
+
+ tv.setSortingEnabled(true);
+ tv.horizontalHeader()->setSortIndicatorShown(true);
+ tv.horizontalHeader()->setClickable(true);
+ tv.horizontalHeader()->setStretchLastSection(true);
+ tv.horizontalHeader()->setResizeMode(QHeaderView::Interactive);
+
+ tv.setModel(proxyModel);
+ tv.setColumnHidden(5, true);
+ tv.setColumnHidden(6, true);
+ tv.horizontalHeader()->swapSections(8, 10);
+ tv.sortByColumn(1, Qt::AscendingOrder);
+
+ QSignalSpy clickedSpy(tv.horizontalHeader(), SIGNAL(sectionClicked(int)));
+ QSignalSpy pressedSpy(tv.horizontalHeader(), SIGNAL(sectionPressed(int)));
+
+
+ QTest::mouseClick(tv.horizontalHeader()->viewport(), Qt::LeftButton, Qt::NoModifier,
+ QPoint(tv.horizontalHeader()->sectionViewportPosition(11) + 5, 5));
+ QCOMPARE(clickedSpy.count(), 1);
+ QCOMPARE(pressedSpy.count(), 1);
+ QCOMPARE(clickedSpy.at(0).at(0).toInt(), 11);
+ QCOMPARE(pressedSpy.at(0).at(0).toInt(), 11);
+
+ QTest::mouseClick(tv.horizontalHeader()->viewport(), Qt::LeftButton, Qt::NoModifier,
+ QPoint(tv.horizontalHeader()->sectionViewportPosition(8) + 5, 5));
+
+ QCOMPARE(clickedSpy.count(), 2);
+ QCOMPARE(pressedSpy.count(), 2);
+ QCOMPARE(clickedSpy.at(1).at(0).toInt(), 8);
+ QCOMPARE(pressedSpy.at(1).at(0).toInt(), 8);
+
+ QTest::mouseClick(tv.horizontalHeader()->viewport(), Qt::LeftButton, Qt::NoModifier,
+ QPoint(tv.horizontalHeader()->sectionViewportPosition(0) + 5, 5));
+
+ QCOMPARE(clickedSpy.count(), 3);
+ QCOMPARE(pressedSpy.count(), 3);
+ QCOMPARE(clickedSpy.at(2).at(0).toInt(), 0);
+ QCOMPARE(pressedSpy.at(2).at(0).toInt(), 0);
+}
+
QTEST_MAIN(tst_QHeaderView)
#include "tst_qheaderview.moc"
diff --git a/tests/auto/qhttp/tst_qhttp.cpp b/tests/auto/qhttp/tst_qhttp.cpp
index 59bfb15016..320225d410 100644
--- a/tests/auto/qhttp/tst_qhttp.cpp
+++ b/tests/auto/qhttp/tst_qhttp.cpp
@@ -114,9 +114,6 @@ private slots:
void abortInReadyRead();
void abortInResponseHeaderReceived();
void nestedEventLoop();
-
-
- // manual tests
void connectionClose();
protected slots:
@@ -175,6 +172,23 @@ private:
bool proxyAuthCalled;
};
+class ClosingServer: public QTcpServer
+{
+ Q_OBJECT
+public:
+ ClosingServer()
+ {
+ connect(this, SIGNAL(newConnection()), SLOT(handleConnection()));
+ listen();
+ }
+
+public slots:
+ void handleConnection()
+ {
+ delete nextPendingConnection();
+ }
+};
+
//#define DUMP_SIGNALS
const int bytesTotal_init = -10;
@@ -1491,20 +1505,14 @@ void tst_QHttp::abortInResponseHeaderReceived()
void tst_QHttp::connectionClose()
{
- // This test tries to connect to a client's server, so it is disabled.
- // Every now and then, someone please run it to make sure it's not broken.
- // Note: the servers might change too...
- //
// This was added in response to bug 176822
-#ifndef Q_OS_SYMBIAN
- QSKIP("This test is manual - read comments in the source code", SkipAll);
-#endif
QFETCH_GLOBAL(bool, setProxy);
if (setProxy)
return;
QHttp http;
- http.setHost("www.fon.com", QHttp::ConnectionModeHttps);
+ ClosingServer server;
+ http.setHost("localhost", QHttp::ConnectionModeHttps, server.serverPort());
http.get("/login/gateway/processLogin");
// another possibility:
diff --git a/tests/auto/qintvalidator/tst_qintvalidator.cpp b/tests/auto/qintvalidator/tst_qintvalidator.cpp
index 72e7f7aaa3..46ad0ddc15 100644
--- a/tests/auto/qintvalidator/tst_qintvalidator.cpp
+++ b/tests/auto/qintvalidator/tst_qintvalidator.cpp
@@ -50,6 +50,7 @@ private slots:
void validate_data();
void validate();
void validateArabic();
+ void validateFrench();
};
Q_DECLARE_METATYPE(QValidator::State);
@@ -182,6 +183,30 @@ void tst_QIntValidator::validateArabic()
}
+
+void tst_QIntValidator::validateFrench()
+{
+ QIntValidator validator(-2000, 2000, 0);
+ validator.setLocale(QLocale::French);
+ int i;
+
+ QString s = QLatin1String("1 ");
+ QCOMPARE(validator.validate(s, i), QValidator::Acceptable);
+ validator.fixup(s);
+ QCOMPARE(s, s);
+
+ s = QLatin1String("1 000");
+ QCOMPARE(validator.validate(s, i), QValidator::Acceptable);
+ validator.fixup(s);
+ QCOMPARE(s, s);
+
+
+ s = QLatin1String("1 0 00");
+ QCOMPARE(validator.validate(s, i), QValidator::Intermediate);
+ validator.fixup(s);
+ QCOMPARE(s, validator.locale().toString(1000));
+}
+
void tst_QIntValidator::validate()
{
QFETCH(int, minimum);
@@ -190,6 +215,7 @@ void tst_QIntValidator::validate()
QFETCH(QValidator::State, state);
QIntValidator iv(minimum, maximum, 0);
+ iv.setLocale(QLocale::C);
int dummy;
QCOMPARE((int)iv.validate(value, dummy), (int)state);
}
diff --git a/tests/auto/qkeysequence/tst_qkeysequence.cpp b/tests/auto/qkeysequence/tst_qkeysequence.cpp
index 3e3f20222b..b1ef223c03 100644
--- a/tests/auto/qkeysequence/tst_qkeysequence.cpp
+++ b/tests/auto/qkeysequence/tst_qkeysequence.cpp
@@ -119,6 +119,7 @@ private slots:
void symetricConstructors_data();
void symetricConstructors();
void checkMultipleNames();
+ void checkMultipleCodes();
void mnemonic_data();
void mnemonic();
void toString_data();
@@ -265,6 +266,18 @@ void tst_QKeySequence::checkMultipleNames()
QVERIFY( oldK == newK );
}
+//TODO: could test third constructor, or test fromString on all constructor-data
+void tst_QKeySequence::checkMultipleCodes()
+{
+ QKeySequence seq1("Alt+d, l");
+ QKeySequence seq2 = QKeySequence::fromString("Alt+d, l");
+ QVERIFY( seq1 == seq2 );
+
+ QKeySequence seq3("Alt+d,l");
+ QKeySequence seq4 = QKeySequence::fromString("Alt+d,l");
+ QVERIFY( seq3 == seq4 );
+}
+
/*
* We must ensure that the keyBindings data is allways sorted
* so that we can safely perform binary searches.
diff --git a/tests/auto/qlabel/tst_qlabel.cpp b/tests/auto/qlabel/tst_qlabel.cpp
index c3af495f1c..153149e70e 100644
--- a/tests/auto/qlabel/tst_qlabel.cpp
+++ b/tests/auto/qlabel/tst_qlabel.cpp
@@ -119,6 +119,11 @@ private slots:
void mnemonic_data();
void mnemonic();
+ void selection();
+
+#ifndef QT_NO_CONTEXTMENU
+ void taskQTBUG_7902_contextMenuCrash();
+#endif
private:
QLabel *testWidget;
@@ -559,6 +564,47 @@ void tst_QLabel::mnemonic()
QCOMPARE(d->shortcutCursor.selectedText(), expectedShortcutCursor);
}
+void tst_QLabel::selection()
+{
+ QLabel label;
+ label.setText("Hello world");
+
+ label.setTextInteractionFlags(Qt::TextSelectableByMouse);
+
+ QVERIFY(!label.hasSelectedText());
+ QCOMPARE(label.selectedText(), QString());
+ QCOMPARE(label.selectionStart(), -1);
+
+ label.setSelection(0, 4);
+ QVERIFY(label.hasSelectedText());
+ QCOMPARE(label.selectedText(), QString::fromLatin1("Hell"));
+ QCOMPARE(label.selectionStart(), 0);
+
+ label.setSelection(6, 5);
+ QVERIFY(label.hasSelectedText());
+ QCOMPARE(label.selectedText(), QString::fromLatin1("world"));
+ QCOMPARE(label.selectionStart(), 6);
+}
+
+#ifndef QT_NO_CONTEXTMENU
+void tst_QLabel::taskQTBUG_7902_contextMenuCrash()
+{
+ QLabel *w = new QLabel("Test or crash?");
+ w->setTextInteractionFlags(Qt::TextSelectableByMouse);
+ w->show();
+ QTest::qWaitForWindowShown(w);
+
+ QTimer ti;
+ w->connect(&ti, SIGNAL(timeout()), w, SLOT(deleteLater()));
+ ti.start(300);
+
+ QContextMenuEvent *cme = new QContextMenuEvent(QContextMenuEvent::Mouse, w->rect().center());
+ qApp->postEvent(w, cme);
+
+ QTest::qWait(350);
+ // No crash, it's allright.
+}
+#endif
QTEST_MAIN(tst_QLabel)
#include "tst_qlabel.moc"
diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp
index ca84b38814..6dc2c82022 100644
--- a/tests/auto/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/qlineedit/tst_qlineedit.cpp
@@ -271,6 +271,9 @@ private slots:
void taskQTBUG_4401_enterKeyClearsPassword();
void taskQTBUG_4679_moveToStartEndOfBlock();
void taskQTBUG_4679_selectToStartEndOfBlock();
+#ifndef QT_NO_CONTEXTMENU
+ void taskQTBUG_7902_contextMenuCrash();
+#endif
void taskQTBUG_7395_readOnlyShortcut();
protected slots:
@@ -3637,6 +3640,26 @@ void tst_QLineEdit::taskQTBUG_4679_selectToStartEndOfBlock()
#endif // Q_OS_MAC
}
+#ifndef QT_NO_CONTEXTMENU
+void tst_QLineEdit::taskQTBUG_7902_contextMenuCrash()
+{
+ // Would pass before the associated commit, but left as a guard.
+ QLineEdit *w = new QLineEdit;
+ w->show();
+ QTest::qWaitForWindowShown(w);
+
+ QTimer ti;
+ w->connect(&ti, SIGNAL(timeout()), w, SLOT(deleteLater()));
+ ti.start(200);
+
+ QContextMenuEvent *cme = new QContextMenuEvent(QContextMenuEvent::Mouse, w->rect().center());
+ qApp->postEvent(w, cme);
+
+ QTest::qWait(300);
+ // No crash, it's allright.
+}
+#endif
+
void tst_QLineEdit::taskQTBUG_7395_readOnlyShortcut()
{
//ReadOnly QLineEdit should not intercept shortcut.
diff --git a/tests/auto/qlist/tst_qlist.cpp b/tests/auto/qlist/tst_qlist.cpp
index 59b2c7b274..e2944cccdc 100644
--- a/tests/auto/qlist/tst_qlist.cpp
+++ b/tests/auto/qlist/tst_qlist.cpp
@@ -60,6 +60,8 @@ private slots:
void length() const;
void lengthSignature() const;
void append() const;
+ void prepend() const;
+ void mid() const;
};
void tst_QList::length() const
@@ -129,5 +131,47 @@ void tst_QList::append() const
}
+void tst_QList::prepend() const
+{
+ QList<QString *> list;
+ QString *str1 = new QString;
+ list.prepend(str1);
+ QVERIFY(list.size() == 1);
+ QVERIFY(list.at(0) == str1);
+ QString *str2 = new QString;
+ list.prepend(str2);
+ QVERIFY(list.size() == 2);
+ QVERIFY(list.at(0) == str2);
+ QVERIFY(list.at(1) == str1);
+ QString *str3 = new QString;
+ list.prepend(str3);
+ QVERIFY(list.size() == 3);
+ QVERIFY(list.at(0) == str3);
+ QVERIFY(list.at(1) == str2);
+ QVERIFY(list.at(2) == str1);
+ list.removeAll(str2);
+ delete str2;
+ QVERIFY(list.size() == 2);
+ QVERIFY(list.at(0) == str3);
+ QVERIFY(list.at(1) == str1);
+ QString *str4 = new QString;
+ list.prepend(str4);
+ QVERIFY(list.size() == 3);
+ QVERIFY(list.at(0) == str4);
+ QVERIFY(list.at(1) == str3);
+ QVERIFY(list.at(2) == str1);
+ qDeleteAll(list);
+ list.clear();
+}
+
+void tst_QList::mid() const
+{
+ QList<QString> list;
+ list << "foo" << "bar" << "baz" << "bak" << "buck" << "hello" << "kitty";
+
+ QCOMPARE(list.mid(3, 3),
+ QList<QString>() << "bak" << "buck" << "hello");
+}
+
QTEST_APPLESS_MAIN(tst_QList)
#include "tst_qlist.moc"
diff --git a/tests/auto/qlocale/tst_qlocale.cpp b/tests/auto/qlocale/tst_qlocale.cpp
index 3dc4dadc59..5a87154ea6 100644
--- a/tests/auto/qlocale/tst_qlocale.cpp
+++ b/tests/auto/qlocale/tst_qlocale.cpp
@@ -1017,6 +1017,9 @@ void tst_QLocale::toDateTime_data()
QTest::newRow("RFC-1123") << "C" << QDateTime(QDate(2007, 11, 1), QTime(18, 8, 30))
<< "ddd, dd MMM yyyy hh:mm:ss 'GMT'" << "Thu, 01 Nov 2007 18:08:30 GMT";
+
+ QTest::newRow("longFormat") << "en_US" << QDateTime(QDate(2009, 1, 5), QTime(11, 48, 32))
+ << "dddd, MMMM d, yyyy h:mm:ss AP " << "Monday, January 5, 2009 11:48:32 AM ";
}
void tst_QLocale::toDateTime()
@@ -1028,6 +1031,8 @@ void tst_QLocale::toDateTime()
QLocale l(localeName);
QCOMPARE(l.toDateTime(string, format), result);
+ if (l.dateTimeFormat(QLocale::LongFormat) == format)
+ QCOMPARE(l.toDateTime(string, QLocale::LongFormat), result);
}
void tst_QLocale::macDefaultLocale()
diff --git a/tests/auto/qmainwindow/tst_qmainwindow.cpp b/tests/auto/qmainwindow/tst_qmainwindow.cpp
index b1c44beaad..1273e85603 100644
--- a/tests/auto/qmainwindow/tst_qmainwindow.cpp
+++ b/tests/auto/qmainwindow/tst_qmainwindow.cpp
@@ -108,6 +108,7 @@ private slots:
void addToolbarAfterShow();
void centralWidgetSize();
void dockWidgetSize();
+ void QTBUG2774_stylechange();
};
// Testing get/set functions
@@ -1709,6 +1710,45 @@ void tst_QMainWindow::dockWidgetSize()
}
}
+void tst_QMainWindow::QTBUG2774_stylechange()
+{
+
+ QMainWindow mw;
+ QDockWidget *dockw = new QDockWidget();
+ mw.addDockWidget(Qt::LeftDockWidgetArea, dockw);
+ mw.addDockWidget(Qt::LeftDockWidgetArea, new QDockWidget());
+ QTextEdit *central = new QTextEdit(&mw);
+ mw.setCentralWidget(central);
+ dockw->resize(10,10);
+ mw.show();
+ QTest::qWaitForWindowShown(&mw);
+ int centralOriginalWidth = central->width();
+
+ QVERIFY(!mw.isSeparator(QPoint(4, dockw->pos().y() + dockw->size().height() - 3)));
+ QVERIFY( mw.isSeparator(QPoint(4, dockw->pos().y() + dockw->size().height())));
+ QVERIFY(!mw.isSeparator(QPoint(4, dockw->pos().y() + dockw->size().height() + 30)));
+
+
+ {
+ QTest::qWait(1000);
+ mw.setStyleSheet("QMainWindow::separator { width: 50px; height:50px; }");
+ QTest::qWait(5000);
+ QApplication::processEvents();
+ QVERIFY(central->width() < centralOriginalWidth);
+ QVERIFY( mw.isSeparator(QPoint(4, dockw->pos().y() + dockw->size().height())));
+ QVERIFY( mw.isSeparator(QPoint(4, dockw->pos().y() + dockw->size().height() + 49)));
+ }
+
+ {
+ mw.setStyleSheet("QMainWindow::separator { width: 0px; height: 0px; }");
+ QApplication::processEvents();
+ QVERIFY(central->width() > centralOriginalWidth);
+ QVERIFY(!mw.isSeparator(QPoint(4, dockw->pos().y() + dockw->size().height())));
+ QVERIFY(!mw.isSeparator(QPoint(4, dockw->pos().y() + dockw->size().height() + 1)));
+ }
+}
+
+
QTEST_MAIN(tst_QMainWindow)
#include "tst_qmainwindow.moc"
diff --git a/tests/auto/qmediacontent/qmediacontent.pro b/tests/auto/qmediacontent/qmediacontent.pro
new file mode 100644
index 0000000000..6c13c8b713
--- /dev/null
+++ b/tests/auto/qmediacontent/qmediacontent.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+
+SOURCES += tst_qmediacontent.cpp
+
+QT = core network multimedia
+
diff --git a/tests/auto/qmediacontent/tst_qmediacontent.cpp b/tests/auto/qmediacontent/tst_qmediacontent.cpp
new file mode 100644
index 0000000000..a0a9bdb1dc
--- /dev/null
+++ b/tests/auto/qmediacontent/tst_qmediacontent.cpp
@@ -0,0 +1,174 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include <QtMultimedia/qmediacontent.h>
+
+
+class tst_QMediaContent : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void testNull();
+ void testUrlCtor();
+ void testRequestCtor();
+ void testResourceCtor();
+ void testResourceListCtor();
+ void testCopy();
+ void testAssignment();
+ void testEquality();
+ void testResources();
+};
+
+void tst_QMediaContent::testNull()
+{
+ QMediaContent media;
+
+ QCOMPARE(media.isNull(), true);
+ QCOMPARE(media.canonicalUrl(), QUrl());
+ QCOMPARE(media.canonicalResource(), QMediaResource());
+ QCOMPARE(media.resources(), QMediaResourceList());
+}
+
+void tst_QMediaContent::testUrlCtor()
+{
+ QMediaContent media(QUrl("http://example.com/movie.mov"));
+
+ QCOMPARE(media.canonicalUrl(), QUrl("http://example.com/movie.mov"));
+ QCOMPARE(media.canonicalResource().url(), QUrl("http://example.com/movie.mov"));
+}
+
+void tst_QMediaContent::testRequestCtor()
+{
+ QNetworkRequest request(QUrl("http://example.com/movie.mov"));
+ request.setAttribute(QNetworkRequest::User, QVariant(1234));
+
+ QMediaContent media(request);
+
+ QCOMPARE(media.canonicalRequest(), request);
+ QCOMPARE(media.canonicalUrl(), QUrl("http://example.com/movie.mov"));
+ QCOMPARE(media.canonicalResource().request(), request);
+ QCOMPARE(media.canonicalResource().url(), QUrl("http://example.com/movie.mov"));
+}
+
+void tst_QMediaContent::testResourceCtor()
+{
+ QMediaContent media(QMediaResource(QUrl("http://example.com/movie.mov")));
+
+ QCOMPARE(media.canonicalResource(), QMediaResource(QUrl("http://example.com/movie.mov")));
+}
+
+void tst_QMediaContent::testResourceListCtor()
+{
+ QMediaResourceList resourceList;
+ resourceList << QMediaResource(QUrl("http://example.com/movie.mov"));
+
+ QMediaContent media(resourceList);
+
+ QCOMPARE(media.canonicalUrl(), QUrl("http://example.com/movie.mov"));
+ QCOMPARE(media.canonicalResource().url(), QUrl("http://example.com/movie.mov"));
+}
+
+void tst_QMediaContent::testCopy()
+{
+ QMediaContent media1(QMediaResource(QUrl("http://example.com/movie.mov")));
+ QMediaContent media2(media1);
+
+ QVERIFY(media1 == media2);
+}
+
+void tst_QMediaContent::testAssignment()
+{
+ QMediaContent media1(QMediaResource(QUrl("http://example.com/movie.mov")));
+ QMediaContent media2;
+ QMediaContent media3;
+
+ media2 = media1;
+ QVERIFY(media2 == media1);
+
+ media2 = media3;
+ QVERIFY(media2 == media3);
+}
+
+void tst_QMediaContent::testEquality()
+{
+ QMediaContent media1;
+ QMediaContent media2;
+ QMediaContent media3(QMediaResource(QUrl("http://example.com/movie.mov")));
+ QMediaContent media4(QMediaResource(QUrl("http://example.com/movie.mov")));
+ QMediaContent media5(QMediaResource(QUrl("file:///some/where/over/the/rainbow.mp3")));
+
+ // null == null
+ QCOMPARE(media1 == media2, true);
+ QCOMPARE(media1 != media2, false);
+
+ // null != something
+ QCOMPARE(media1 == media3, false);
+ QCOMPARE(media1 != media3, true);
+
+ // equiv
+ QCOMPARE(media3 == media4, true);
+ QCOMPARE(media3 != media4, false);
+
+ // not equiv
+ QCOMPARE(media4 == media5, false);
+ QCOMPARE(media4 != media5, true);
+}
+
+void tst_QMediaContent::testResources()
+{
+ QMediaResourceList resourceList;
+
+ resourceList << QMediaResource(QUrl("http://example.com/movie-main.mov"));
+ resourceList << QMediaResource(QUrl("http://example.com/movie-big.mov"));
+ QMediaContent media(resourceList);
+
+ QMediaResourceList res = media.resources();
+ QCOMPARE(res.size(), 2);
+ QCOMPARE(res[0], QMediaResource(QUrl("http://example.com/movie-main.mov")));
+ QCOMPARE(res[1], QMediaResource(QUrl("http://example.com/movie-big.mov")));
+}
+
+QTEST_MAIN(tst_QMediaContent)
+
+#include "tst_qmediacontent.moc"
diff --git a/tests/auto/qmediaobject/qmediaobject.pro b/tests/auto/qmediaobject/qmediaobject.pro
new file mode 100644
index 0000000000..e59bfdcc54
--- /dev/null
+++ b/tests/auto/qmediaobject/qmediaobject.pro
@@ -0,0 +1,4 @@
+load(qttest_p4)
+
+SOURCES += tst_qmediaobject.cpp
+QT = core multimedia
diff --git a/tests/auto/qmediaobject/tst_qmediaobject.cpp b/tests/auto/qmediaobject/tst_qmediaobject.cpp
new file mode 100644
index 0000000000..2128b35f1a
--- /dev/null
+++ b/tests/auto/qmediaobject/tst_qmediaobject.cpp
@@ -0,0 +1,549 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include <QtCore/qtimer.h>
+
+#include <QtMultimedia/qmediaobject.h>
+#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/qmetadatacontrol.h>
+
+
+class tst_QMediaObject : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void propertyWatch();
+ void notifySignals_data();
+ void notifySignals();
+ void notifyInterval_data();
+ void notifyInterval();
+
+ void nullMetaDataControl();
+ void isMetaDataAvailable();
+ void isWritable();
+ void metaDataChanged();
+ void metaData_data();
+ void metaData();
+ void setMetaData_data();
+ void setMetaData();
+ void extendedMetaData_data() { metaData_data(); }
+ void extendedMetaData();
+ void setExtendedMetaData_data() { extendedMetaData_data(); }
+ void setExtendedMetaData();
+
+
+private:
+ void setupNotifyTests();
+};
+
+class QtTestMetaDataProvider : public QMetaDataControl
+{
+ Q_OBJECT
+public:
+ QtTestMetaDataProvider(QObject *parent = 0)
+ : QMetaDataControl(parent)
+ , m_available(false)
+ , m_writable(false)
+ {
+ }
+
+ bool isMetaDataAvailable() const { return m_available; }
+ void setMetaDataAvailable(bool available) {
+ if (m_available != available)
+ emit metaDataAvailableChanged(m_available = available);
+ }
+ QList<QtMultimedia::MetaData> availableMetaData() const { return m_data.keys(); }
+
+ bool isWritable() const { return m_writable; }
+ void setWritable(bool writable) { emit writableChanged(m_writable = writable); }
+
+ QVariant metaData(QtMultimedia::MetaData key) const { return m_data.value(key); }
+ void setMetaData(QtMultimedia::MetaData key, const QVariant &value) {
+ m_data.insert(key, value); }
+
+ QVariant extendedMetaData(const QString &key) const { return m_extendedData.value(key); }
+ void setExtendedMetaData(const QString &key, const QVariant &value) {
+ m_extendedData.insert(key, value); }
+
+ QStringList availableExtendedMetaData() const { return m_extendedData.keys(); }
+
+ using QMetaDataControl::metaDataChanged;
+
+ void populateMetaData()
+ {
+ m_available = true;
+ }
+
+ bool m_available;
+ bool m_writable;
+ QMap<QtMultimedia::MetaData, QVariant> m_data;
+ QMap<QString, QVariant> m_extendedData;
+};
+
+class QtTestMetaDataService : public QMediaService
+{
+ Q_OBJECT
+public:
+ QtTestMetaDataService(QObject *parent = 0):QMediaService(parent), hasMetaData(true)
+ {
+ }
+
+ QMediaControl *control(const char *iid) const
+ {
+ if (hasMetaData && qstrcmp(iid, QMetaDataControl_iid) == 0)
+ return const_cast<QtTestMetaDataProvider *>(&metaData);
+ else
+ return 0;
+ }
+
+ QtTestMetaDataProvider metaData;
+ bool hasMetaData;
+};
+
+
+class QtTestMediaObject : public QMediaObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int a READ a WRITE setA NOTIFY aChanged)
+ Q_PROPERTY(int b READ b WRITE setB NOTIFY bChanged)
+ Q_PROPERTY(int c READ c WRITE setC NOTIFY cChanged)
+ Q_PROPERTY(int d READ d WRITE setD)
+public:
+ QtTestMediaObject(QMediaService *service = 0): QMediaObject(0, service), m_a(0), m_b(0), m_c(0), m_d(0) {}
+
+ using QMediaObject::addPropertyWatch;
+ using QMediaObject::removePropertyWatch;
+
+ int a() const { return m_a; }
+ void setA(int a) { m_a = a; }
+
+ int b() const { return m_b; }
+ void setB(int b) { m_b = b; }
+
+ int c() const { return m_c; }
+ void setC(int c) { m_c = c; }
+
+ int d() const { return m_d; }
+ void setD(int d) { m_d = d; }
+
+Q_SIGNALS:
+ void aChanged(int a);
+ void bChanged(int b);
+ void cChanged(int c);
+
+private:
+ int m_a;
+ int m_b;
+ int m_c;
+ int m_d;
+};
+
+void tst_QMediaObject::propertyWatch()
+{
+ QtTestMediaObject object;
+ object.setNotifyInterval(0);
+
+ QEventLoop loop;
+ connect(&object, SIGNAL(aChanged(int)), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ connect(&object, SIGNAL(bChanged(int)), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ connect(&object, SIGNAL(cChanged(int)), &QTestEventLoop::instance(), SLOT(exitLoop()));
+
+ QSignalSpy aSpy(&object, SIGNAL(aChanged(int)));
+ QSignalSpy bSpy(&object, SIGNAL(bChanged(int)));
+ QSignalSpy cSpy(&object, SIGNAL(cChanged(int)));
+
+ QTestEventLoop::instance().enterLoop(1);
+
+ QCOMPARE(aSpy.count(), 0);
+ QCOMPARE(bSpy.count(), 0);
+ QCOMPARE(cSpy.count(), 0);
+
+ int aCount = 0;
+ int bCount = 0;
+ int cCount = 0;
+
+ object.addPropertyWatch("a");
+
+ QTestEventLoop::instance().enterLoop(1);
+
+ QVERIFY(aSpy.count() > aCount);
+ QCOMPARE(bSpy.count(), 0);
+ QCOMPARE(cSpy.count(), 0);
+ QCOMPARE(aSpy.last().value(0).toInt(), 0);
+
+ aCount = aSpy.count();
+
+ object.setA(54);
+ object.setB(342);
+ object.setC(233);
+
+ QTestEventLoop::instance().enterLoop(1);
+
+ QVERIFY(aSpy.count() > aCount);
+ QCOMPARE(bSpy.count(), 0);
+ QCOMPARE(cSpy.count(), 0);
+ QCOMPARE(aSpy.last().value(0).toInt(), 54);
+
+ aCount = aSpy.count();
+
+ object.addPropertyWatch("b");
+ object.addPropertyWatch("d");
+ object.removePropertyWatch("e");
+ object.setA(43);
+ object.setB(235);
+ object.setC(90);
+
+ QTestEventLoop::instance().enterLoop(1);
+
+ QVERIFY(aSpy.count() > aCount);
+ QVERIFY(bSpy.count() > bCount);
+ QCOMPARE(cSpy.count(), 0);
+ QCOMPARE(aSpy.last().value(0).toInt(), 43);
+ QCOMPARE(bSpy.last().value(0).toInt(), 235);
+
+ aCount = aSpy.count();
+ bCount = bSpy.count();
+
+ object.removePropertyWatch("a");
+ object.addPropertyWatch("c");
+ object.addPropertyWatch("e");
+
+ QTestEventLoop::instance().enterLoop(1);
+
+ QCOMPARE(aSpy.count(), aCount);
+ QVERIFY(bSpy.count() > bCount);
+ QVERIFY(cSpy.count() > cCount);
+ QCOMPARE(bSpy.last().value(0).toInt(), 235);
+ QCOMPARE(cSpy.last().value(0).toInt(), 90);
+
+ bCount = bSpy.count();
+ cCount = cSpy.count();
+
+ object.setA(435);
+ object.setC(9845);
+
+ QTestEventLoop::instance().enterLoop(1);
+
+ QCOMPARE(aSpy.count(), aCount);
+ QVERIFY(bSpy.count() > bCount);
+ QVERIFY(cSpy.count() > cCount);
+ QCOMPARE(bSpy.last().value(0).toInt(), 235);
+ QCOMPARE(cSpy.last().value(0).toInt(), 9845);
+
+ bCount = bSpy.count();
+ cCount = cSpy.count();
+
+ object.setA(8432);
+ object.setB(324);
+ object.setC(443);
+ object.removePropertyWatch("c");
+ object.removePropertyWatch("d");
+
+ QTestEventLoop::instance().enterLoop(1);
+
+ QCOMPARE(aSpy.count(), aCount);
+ QVERIFY(bSpy.count() > bCount);
+ QCOMPARE(cSpy.count(), cCount);
+ QCOMPARE(bSpy.last().value(0).toInt(), 324);
+ QCOMPARE(cSpy.last().value(0).toInt(), 9845);
+
+ bCount = bSpy.count();
+
+ object.removePropertyWatch("b");
+
+ QTestEventLoop::instance().enterLoop(1);
+
+ QCOMPARE(aSpy.count(), aCount);
+ QCOMPARE(bSpy.count(), bCount);
+ QCOMPARE(cSpy.count(), cCount);
+}
+
+void tst_QMediaObject::setupNotifyTests()
+{
+ QTest::addColumn<int>("interval");
+ QTest::addColumn<int>("count");
+
+ QTest::newRow("single 750ms")
+ << 750
+ << 1;
+ QTest::newRow("single 600ms")
+ << 600
+ << 1;
+ QTest::newRow("x3 300ms")
+ << 300
+ << 3;
+ QTest::newRow("x5 180ms")
+ << 180
+ << 5;
+}
+
+void tst_QMediaObject::notifySignals_data()
+{
+ setupNotifyTests();
+}
+
+void tst_QMediaObject::notifySignals()
+{
+ QFETCH(int, interval);
+ QFETCH(int, count);
+
+ QtTestMediaObject object;
+ object.setNotifyInterval(interval);
+ object.addPropertyWatch("a");
+
+ QSignalSpy spy(&object, SIGNAL(aChanged(int)));
+
+ QTestEventLoop::instance().enterLoop(1);
+
+ QCOMPARE(spy.count(), count);
+}
+
+void tst_QMediaObject::notifyInterval_data()
+{
+ setupNotifyTests();
+}
+
+void tst_QMediaObject::notifyInterval()
+{
+ QFETCH(int, interval);
+
+ QtTestMediaObject object;
+ QSignalSpy spy(&object, SIGNAL(notifyIntervalChanged(int)));
+
+ object.setNotifyInterval(interval);
+ QCOMPARE(object.notifyInterval(), interval);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.last().value(0).toInt(), interval);
+
+ object.setNotifyInterval(interval);
+ QCOMPARE(object.notifyInterval(), interval);
+ QCOMPARE(spy.count(), 1);
+}
+
+void tst_QMediaObject::nullMetaDataControl()
+{
+ const QString titleKey(QLatin1String("Title"));
+ const QString title(QLatin1String("Host of Seraphim"));
+
+ QtTestMetaDataService service;
+ service.hasMetaData = false;
+
+ QtTestMediaObject object(&service);
+
+ QSignalSpy spy(&object, SIGNAL(metaDataChanged()));
+
+ QCOMPARE(object.isMetaDataAvailable(), false);
+ QCOMPARE(object.isMetaDataWritable(), false);
+
+ object.setMetaData(QtMultimedia::Title, title);
+ object.setExtendedMetaData(titleKey, title);
+
+ QCOMPARE(object.metaData(QtMultimedia::Title).toString(), QString());
+ QCOMPARE(object.extendedMetaData(titleKey).toString(), QString());
+ QCOMPARE(object.availableMetaData(), QList<QtMultimedia::MetaData>());
+ QCOMPARE(object.availableExtendedMetaData(), QStringList());
+ QCOMPARE(spy.count(), 0);
+}
+
+void tst_QMediaObject::isMetaDataAvailable()
+{
+ QtTestMetaDataService service;
+ service.metaData.setMetaDataAvailable(false);
+
+ QtTestMediaObject object(&service);
+ QCOMPARE(object.isMetaDataAvailable(), false);
+
+ QSignalSpy spy(&object, SIGNAL(metaDataAvailableChanged(bool)));
+ service.metaData.setMetaDataAvailable(true);
+
+ QCOMPARE(object.isMetaDataAvailable(), true);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.at(0).at(0).toBool(), true);
+
+ service.metaData.setMetaDataAvailable(false);
+
+ QCOMPARE(object.isMetaDataAvailable(), false);
+ QCOMPARE(spy.count(), 2);
+ QCOMPARE(spy.at(1).at(0).toBool(), false);
+}
+
+void tst_QMediaObject::isWritable()
+{
+ QtTestMetaDataService service;
+ service.metaData.setWritable(false);
+
+ QtTestMediaObject object(&service);
+
+ QSignalSpy spy(&object, SIGNAL(metaDataWritableChanged(bool)));
+
+ QCOMPARE(object.isMetaDataWritable(), false);
+
+ service.metaData.setWritable(true);
+
+ QCOMPARE(object.isMetaDataWritable(), true);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.at(0).at(0).toBool(), true);
+
+ service.metaData.setWritable(false);
+
+ QCOMPARE(object.isMetaDataWritable(), false);
+ QCOMPARE(spy.count(), 2);
+ QCOMPARE(spy.at(1).at(0).toBool(), false);
+}
+
+void tst_QMediaObject::metaDataChanged()
+{
+ QtTestMetaDataService service;
+ QtTestMediaObject object(&service);
+
+ QSignalSpy spy(&object, SIGNAL(metaDataChanged()));
+
+ service.metaData.metaDataChanged();
+ QCOMPARE(spy.count(), 1);
+
+ service.metaData.metaDataChanged();
+ QCOMPARE(spy.count(), 2);
+}
+
+void tst_QMediaObject::metaData_data()
+{
+ QTest::addColumn<QString>("artist");
+ QTest::addColumn<QString>("title");
+ QTest::addColumn<QString>("genre");
+
+ QTest::newRow("")
+ << QString::fromLatin1("Dead Can Dance")
+ << QString::fromLatin1("Host of Seraphim")
+ << QString::fromLatin1("Awesome");
+}
+
+void tst_QMediaObject::metaData()
+{
+ QFETCH(QString, artist);
+ QFETCH(QString, title);
+ QFETCH(QString, genre);
+
+ QtTestMetaDataService service;
+ service.metaData.populateMetaData();
+
+ QtTestMediaObject object(&service);
+ QVERIFY(object.availableMetaData().isEmpty());
+
+ service.metaData.m_data.insert(QtMultimedia::AlbumArtist, artist);
+ service.metaData.m_data.insert(QtMultimedia::Title, title);
+ service.metaData.m_data.insert(QtMultimedia::Genre, genre);
+
+ QCOMPARE(object.metaData(QtMultimedia::AlbumArtist).toString(), artist);
+ QCOMPARE(object.metaData(QtMultimedia::Title).toString(), title);
+
+ QList<QtMultimedia::MetaData> metaDataKeys = object.availableMetaData();
+ QCOMPARE(metaDataKeys.size(), 3);
+ QVERIFY(metaDataKeys.contains(QtMultimedia::AlbumArtist));
+ QVERIFY(metaDataKeys.contains(QtMultimedia::Title));
+ QVERIFY(metaDataKeys.contains(QtMultimedia::Genre));
+}
+
+void tst_QMediaObject::setMetaData_data()
+{
+ QTest::addColumn<QString>("title");
+
+ QTest::newRow("")
+ << QString::fromLatin1("In the Kingdom of the Blind the One eyed are Kings");
+}
+
+void tst_QMediaObject::setMetaData()
+{
+ QFETCH(QString, title);
+
+ QtTestMetaDataService service;
+ service.metaData.populateMetaData();
+
+ QtTestMediaObject object(&service);
+
+ object.setMetaData(QtMultimedia::Title, title);
+ QCOMPARE(object.metaData(QtMultimedia::Title).toString(), title);
+ QCOMPARE(service.metaData.m_data.value(QtMultimedia::Title).toString(), title);
+}
+
+void tst_QMediaObject::extendedMetaData()
+{
+ QFETCH(QString, artist);
+ QFETCH(QString, title);
+ QFETCH(QString, genre);
+
+ QtTestMetaDataService service;
+ QtTestMediaObject object(&service);
+ QVERIFY(object.availableExtendedMetaData().isEmpty());
+
+ service.metaData.m_extendedData.insert(QLatin1String("Artist"), artist);
+ service.metaData.m_extendedData.insert(QLatin1String("Title"), title);
+ service.metaData.m_extendedData.insert(QLatin1String("Genre"), genre);
+
+ QCOMPARE(object.extendedMetaData(QLatin1String("Artist")).toString(), artist);
+ QCOMPARE(object.extendedMetaData(QLatin1String("Title")).toString(), title);
+
+ QStringList extendedKeys = object.availableExtendedMetaData();
+ QCOMPARE(extendedKeys.size(), 3);
+ QVERIFY(extendedKeys.contains(QLatin1String("Artist")));
+ QVERIFY(extendedKeys.contains(QLatin1String("Title")));
+ QVERIFY(extendedKeys.contains(QLatin1String("Genre")));
+}
+
+void tst_QMediaObject::setExtendedMetaData()
+{
+ QtTestMetaDataService service;
+ service.metaData.populateMetaData();
+
+ QtTestMediaObject object(&service);
+
+ QString title(QLatin1String("In the Kingdom of the Blind the One eyed are Kings"));
+
+ object.setExtendedMetaData(QLatin1String("Title"), title);
+ QCOMPARE(object.extendedMetaData(QLatin1String("Title")).toString(), title);
+ QCOMPARE(service.metaData.m_extendedData.value(QLatin1String("Title")).toString(), title);
+}
+
+QTEST_MAIN(tst_QMediaObject)
+
+#include "tst_qmediaobject.moc"
diff --git a/tests/auto/qmediaplayer/qmediaplayer.pro b/tests/auto/qmediaplayer/qmediaplayer.pro
new file mode 100644
index 0000000000..21008f97c5
--- /dev/null
+++ b/tests/auto/qmediaplayer/qmediaplayer.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+
+SOURCES += tst_qmediaplayer.cpp
+
+QT = core multimedia
+
diff --git a/tests/auto/qmediaplayer/tst_qmediaplayer.cpp b/tests/auto/qmediaplayer/tst_qmediaplayer.cpp
new file mode 100644
index 0000000000..a96e08df9a
--- /dev/null
+++ b/tests/auto/qmediaplayer/tst_qmediaplayer.cpp
@@ -0,0 +1,986 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QtCore/qdebug.h>
+#include <QtCore/qbuffer.h>
+
+#include <QtMultimedia/qmediaplayer.h>
+#include <QtMultimedia/qmediaplayercontrol.h>
+#include <QtMultimedia/qmediaplaylist.h>
+#include <QtMultimedia/qmediaservice.h>
+
+
+
+class AutoConnection
+{
+public:
+ AutoConnection(QObject *sender, const char *signal, QObject *receiver, const char *method)
+ : sender(sender), signal(signal), receiver(receiver), method(method)
+ {
+ QObject::connect(sender, signal, receiver, method);
+ }
+
+ ~AutoConnection()
+ {
+ QObject::disconnect(sender, signal, receiver, method);
+ }
+
+private:
+ QObject *sender;
+ const char *signal;
+ QObject *receiver;
+ const char *method;
+};
+
+
+class MockPlayerControl : public QMediaPlayerControl
+{
+ friend class MockPlayerService;
+
+public:
+ MockPlayerControl():QMediaPlayerControl(0) {}
+
+ QMediaPlayer::State state() const { return _state; }
+ QMediaPlayer::MediaStatus mediaStatus() const { return _mediaStatus; }
+
+ qint64 duration() const { return _duration; }
+
+ qint64 position() const { return _position; }
+
+ void setPosition(qint64 position) { if (position != _position) emit positionChanged(_position = position); }
+
+ int volume() const { return _volume; }
+ void setVolume(int volume) { emit volumeChanged(_volume = volume); }
+
+ bool isMuted() const { return _muted; }
+ void setMuted(bool muted) { if (muted != _muted) emit mutedChanged(_muted = muted); }
+
+ int bufferStatus() const { return _bufferStatus; }
+
+ bool isAudioAvailable() const { return _audioAvailable; }
+ bool isVideoAvailable() const { return _videoAvailable; }
+
+ bool isSeekable() const { return _isSeekable; }
+ QMediaTimeRange availablePlaybackRanges() const { return QMediaTimeRange(_seekRange.first, _seekRange.second); }
+ void setSeekRange(qint64 minimum, qint64 maximum) { _seekRange = qMakePair(minimum, maximum); }
+
+ qreal playbackRate() const { return _playbackRate; }
+ void setPlaybackRate(qreal rate) { if (rate != _playbackRate) emit playbackRateChanged(_playbackRate = rate); }
+
+ QMediaContent media() const { return _media; }
+ void setMedia(const QMediaContent &content, QIODevice *stream)
+ {
+ _stream = stream;
+ _media = content;
+ if (_state != QMediaPlayer::StoppedState) {
+ _mediaStatus = _media.isNull() ? QMediaPlayer::NoMedia : QMediaPlayer::LoadingMedia;
+ emit stateChanged(_state = QMediaPlayer::StoppedState);
+ emit mediaStatusChanged(_mediaStatus);
+ }
+ emit mediaChanged(_media = content);
+ }
+ QIODevice *mediaStream() const { return _stream; }
+
+ void play() { if (_isValid && !_media.isNull() && _state != QMediaPlayer::PlayingState) emit stateChanged(_state = QMediaPlayer::PlayingState); }
+ void pause() { if (_isValid && !_media.isNull() && _state != QMediaPlayer::PausedState) emit stateChanged(_state = QMediaPlayer::PausedState); }
+ void stop() { if (_state != QMediaPlayer::StoppedState) emit stateChanged(_state = QMediaPlayer::StoppedState); }
+
+ QMediaPlayer::State _state;
+ QMediaPlayer::MediaStatus _mediaStatus;
+ QMediaPlayer::Error _error;
+ qint64 _duration;
+ qint64 _position;
+ int _volume;
+ bool _muted;
+ int _bufferStatus;
+ bool _audioAvailable;
+ bool _videoAvailable;
+ bool _isSeekable;
+ QPair<qint64, qint64> _seekRange;
+ qreal _playbackRate;
+ QMediaContent _media;
+ QIODevice *_stream;
+ bool _isValid;
+ QString _errorString;
+};
+
+
+class MockPlayerService : public QMediaService
+{
+ Q_OBJECT
+
+public:
+ MockPlayerService():QMediaService(0)
+ {
+ mockControl = new MockPlayerControl;
+ }
+
+ ~MockPlayerService()
+ {
+ delete mockControl;
+ }
+
+ QMediaControl* control(const char *iid) const
+ {
+ if (qstrcmp(iid, QMediaPlayerControl_iid) == 0)
+ return mockControl;
+
+ return 0;
+ }
+
+ void setState(QMediaPlayer::State state) { emit mockControl->stateChanged(mockControl->_state = state); }
+ void setState(QMediaPlayer::State state, QMediaPlayer::MediaStatus status) {
+ mockControl->_state = state;
+ mockControl->_mediaStatus = status;
+ emit mockControl->mediaStatusChanged(status);
+ emit mockControl->stateChanged(state);
+ }
+ void setMediaStatus(QMediaPlayer::MediaStatus status) { emit mockControl->mediaStatusChanged(mockControl->_mediaStatus = status); }
+ void setIsValid(bool isValid) { mockControl->_isValid = isValid; }
+ void setMedia(QMediaContent media) { mockControl->_media = media; }
+ void setDuration(qint64 duration) { mockControl->_duration = duration; }
+ void setPosition(qint64 position) { mockControl->_position = position; }
+ void setSeekable(bool seekable) { mockControl->_isSeekable = seekable; }
+ void setVolume(int volume) { mockControl->_volume = volume; }
+ void setMuted(bool muted) { mockControl->_muted = muted; }
+ void setVideoAvailable(bool videoAvailable) { mockControl->_videoAvailable = videoAvailable; }
+ void setBufferStatus(int bufferStatus) { mockControl->_bufferStatus = bufferStatus; }
+ void setPlaybackRate(qreal playbackRate) { mockControl->_playbackRate = playbackRate; }
+ void setError(QMediaPlayer::Error error) { mockControl->_error = error; emit mockControl->error(mockControl->_error, mockControl->_errorString); }
+ void setErrorString(QString errorString) { mockControl->_errorString = errorString; emit mockControl->error(mockControl->_error, mockControl->_errorString); }
+
+ void reset()
+ {
+ mockControl->_state = QMediaPlayer::StoppedState;
+ mockControl->_mediaStatus = QMediaPlayer::UnknownMediaStatus;
+ mockControl->_error = QMediaPlayer::NoError;
+ mockControl->_duration = 0;
+ mockControl->_position = 0;
+ mockControl->_volume = 0;
+ mockControl->_muted = false;
+ mockControl->_bufferStatus = 0;
+ mockControl->_videoAvailable = false;
+ mockControl->_isSeekable = false;
+ mockControl->_playbackRate = 0.0;
+ mockControl->_media = QMediaContent();
+ mockControl->_stream = 0;
+ mockControl->_isValid = false;
+ mockControl->_errorString = QString();
+ }
+
+ MockPlayerControl *mockControl;
+};
+
+class MockProvider : public QMediaServiceProvider
+{
+public:
+ MockProvider(MockPlayerService *service):mockService(service) {}
+ QMediaService *requestService(const QByteArray &, const QMediaServiceProviderHint &)
+ {
+ return mockService;
+ }
+
+ void releaseService(QMediaService *service) { delete service; }
+
+ MockPlayerService *mockService;
+};
+
+class tst_QMediaPlayer: public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void initTestCase_data();
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+private slots:
+ void testNullService();
+ void testValid();
+ void testMedia();
+ void testDuration();
+ void testPosition();
+ void testVolume();
+ void testMuted();
+ void testVideoAvailable();
+ void testBufferStatus();
+ void testSeekable();
+ void testPlaybackRate();
+ void testError();
+ void testErrorString();
+ void testService();
+ void testPlay();
+ void testPause();
+ void testStop();
+ void testMediaStatus();
+ void testPlaylist();
+
+private:
+ MockProvider *mockProvider;
+ MockPlayerService *mockService;
+ QMediaPlayer *player;
+};
+
+void tst_QMediaPlayer::initTestCase_data()
+{
+ QTest::addColumn<bool>("valid");
+ QTest::addColumn<QMediaPlayer::State>("state");
+ QTest::addColumn<QMediaPlayer::MediaStatus>("status");
+ QTest::addColumn<QMediaContent>("mediaContent");
+ QTest::addColumn<qint64>("duration");
+ QTest::addColumn<qint64>("position");
+ QTest::addColumn<bool>("seekable");
+ QTest::addColumn<int>("volume");
+ QTest::addColumn<bool>("muted");
+ QTest::addColumn<bool>("videoAvailable");
+ QTest::addColumn<int>("bufferStatus");
+ QTest::addColumn<qreal>("playbackRate");
+ QTest::addColumn<QMediaPlayer::Error>("error");
+ QTest::addColumn<QString>("errorString");
+
+ QTest::newRow("invalid") << false << QMediaPlayer::StoppedState << QMediaPlayer::UnknownMediaStatus <<
+ QMediaContent() << qint64(0) << qint64(0) << false << 0 << false << false << 0 <<
+ qreal(0) << QMediaPlayer::NoError << QString();
+ QTest::newRow("valid+null") << true << QMediaPlayer::StoppedState << QMediaPlayer::UnknownMediaStatus <<
+ QMediaContent() << qint64(0) << qint64(0) << false << 0 << false << false << 50 <<
+ qreal(0) << QMediaPlayer::NoError << QString();
+ QTest::newRow("valid+content+stopped") << true << QMediaPlayer::StoppedState << QMediaPlayer::UnknownMediaStatus <<
+ QMediaContent(QUrl("file:///some.mp3")) << qint64(0) << qint64(0) << false << 50 << false << false << 0 <<
+ qreal(1) << QMediaPlayer::NoError << QString();
+ QTest::newRow("valid+content+playing") << true << QMediaPlayer::PlayingState << QMediaPlayer::LoadedMedia <<
+ QMediaContent(QUrl("file:///some.mp3")) << qint64(10000) << qint64(10) << true << 50 << true << false << 0 <<
+ qreal(1) << QMediaPlayer::NoError << QString();
+ QTest::newRow("valid+content+paused") << true << QMediaPlayer::PausedState << QMediaPlayer::LoadedMedia <<
+ QMediaContent(QUrl("file:///some.mp3")) << qint64(10000) << qint64(10) << true << 50 << true << false << 0 <<
+ qreal(1) << QMediaPlayer::NoError << QString();
+ QTest::newRow("valud+streaming") << true << QMediaPlayer::PlayingState << QMediaPlayer::LoadedMedia <<
+ QMediaContent(QUrl("http://example.com/stream")) << qint64(10000) << qint64(10000) << false << 50 << false << true << 0 <<
+ qreal(1) << QMediaPlayer::NoError << QString();
+ QTest::newRow("valid+error") << true << QMediaPlayer::StoppedState << QMediaPlayer::UnknownMediaStatus <<
+ QMediaContent(QUrl("http://example.com/stream")) << qint64(0) << qint64(0) << false << 50 << false << false << 0 <<
+ qreal(0) << QMediaPlayer::ResourceError << QString("Resource unavailable");
+}
+
+void tst_QMediaPlayer::initTestCase()
+{
+ qRegisterMetaType<QMediaContent>();
+
+ mockService = new MockPlayerService;
+ mockProvider = new MockProvider(mockService);
+ player = new QMediaPlayer(0, 0, mockProvider);
+}
+
+void tst_QMediaPlayer::cleanupTestCase()
+{
+ delete player;
+}
+
+void tst_QMediaPlayer::init()
+{
+ mockService->reset();
+}
+
+void tst_QMediaPlayer::cleanup()
+{
+}
+
+void tst_QMediaPlayer::testNullService()
+{
+ MockProvider provider(0);
+ QMediaPlayer player(0, 0, &provider);
+
+ const QIODevice *nullDevice = 0;
+
+ QCOMPARE(player.media(), QMediaContent());
+ QCOMPARE(player.mediaStream(), nullDevice);
+ QCOMPARE(player.state(), QMediaPlayer::StoppedState);
+ QCOMPARE(player.mediaStatus(), QMediaPlayer::UnknownMediaStatus);
+ QCOMPARE(player.duration(), qint64(-1));
+ QCOMPARE(player.position(), qint64(0));
+ QCOMPARE(player.volume(), 0);
+ QCOMPARE(player.isMuted(), false);
+ QCOMPARE(player.isVideoAvailable(), false);
+ QCOMPARE(player.bufferStatus(), 0);
+ QCOMPARE(player.isSeekable(), false);
+ QCOMPARE(player.playbackRate(), qreal(0));
+ QCOMPARE(player.error(), QMediaPlayer::ServiceMissingError);
+
+ {
+ QFETCH_GLOBAL(QMediaContent, mediaContent);
+
+ QSignalSpy spy(&player, SIGNAL(mediaChanged(QMediaContent)));
+ QFile file;
+
+ player.setMedia(mediaContent, &file);
+ QCOMPARE(player.media(), QMediaContent());
+ QCOMPARE(player.mediaStream(), nullDevice);
+ QCOMPARE(spy.count(), 0);
+ } {
+ QSignalSpy stateSpy(&player, SIGNAL(stateChanged(QMediaPlayer::State)));
+ QSignalSpy statusSpy(&player, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)));
+
+ player.play();
+ QCOMPARE(player.state(), QMediaPlayer::StoppedState);
+ QCOMPARE(player.mediaStatus(), QMediaPlayer::UnknownMediaStatus);
+ QCOMPARE(stateSpy.count(), 0);
+ QCOMPARE(statusSpy.count(), 0);
+
+ player.pause();
+ QCOMPARE(player.state(), QMediaPlayer::StoppedState);
+ QCOMPARE(player.mediaStatus(), QMediaPlayer::UnknownMediaStatus);
+ QCOMPARE(stateSpy.count(), 0);
+ QCOMPARE(statusSpy.count(), 0);
+
+ player.stop();
+ QCOMPARE(player.state(), QMediaPlayer::StoppedState);
+ QCOMPARE(player.mediaStatus(), QMediaPlayer::UnknownMediaStatus);
+ QCOMPARE(stateSpy.count(), 0);
+ QCOMPARE(statusSpy.count(), 0);
+ } {
+ QFETCH_GLOBAL(int, volume);
+ QFETCH_GLOBAL(bool, muted);
+
+ QSignalSpy volumeSpy(&player, SIGNAL(volumeChanged(int)));
+ QSignalSpy mutingSpy(&player, SIGNAL(mutedChanged(bool)));
+
+ player.setVolume(volume);
+ QCOMPARE(player.volume(), 0);
+ QCOMPARE(volumeSpy.count(), 0);
+
+ player.setMuted(muted);
+ QCOMPARE(player.isMuted(), false);
+ QCOMPARE(mutingSpy.count(), 0);
+ } {
+ QFETCH_GLOBAL(qint64, position);
+
+ QSignalSpy spy(&player, SIGNAL(positionChanged(qint64)));
+
+ player.setPosition(position);
+ QCOMPARE(player.position(), qint64(0));
+ QCOMPARE(spy.count(), 0);
+ } {
+ QFETCH_GLOBAL(qreal, playbackRate);
+
+ QSignalSpy spy(&player, SIGNAL(playbackRateChanged(qreal)));
+
+ player.setPlaybackRate(playbackRate);
+ QCOMPARE(player.playbackRate(), qreal(0));
+ QCOMPARE(spy.count(), 0);
+ } {
+ QMediaPlaylist playlist;
+ playlist.setMediaObject(&player);
+
+ QSignalSpy mediaSpy(&player, SIGNAL(mediaChanged(QMediaContent)));
+ QSignalSpy statusSpy(&player, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)));
+
+ playlist.addMedia(QUrl("http://example.com/stream"));
+ playlist.addMedia(QUrl("file:///some.mp3"));
+
+ playlist.setCurrentIndex(0);
+ QCOMPARE(playlist.currentIndex(), 0);
+ QCOMPARE(player.media(), QMediaContent());
+ QCOMPARE(mediaSpy.count(), 0);
+ QCOMPARE(statusSpy.count(), 0);
+
+ playlist.next();
+ QCOMPARE(playlist.currentIndex(), 1);
+ QCOMPARE(player.media(), QMediaContent());
+ QCOMPARE(mediaSpy.count(), 0);
+ QCOMPARE(statusSpy.count(), 0);
+ }
+}
+
+void tst_QMediaPlayer::testValid()
+{
+ /*
+ QFETCH_GLOBAL(bool, valid);
+
+ mockService->setIsValid(valid);
+ QCOMPARE(player->isValid(), valid);
+ */
+}
+
+void tst_QMediaPlayer::testMedia()
+{
+ QFETCH_GLOBAL(QMediaContent, mediaContent);
+
+ mockService->setMedia(mediaContent);
+ QCOMPARE(player->media(), mediaContent);
+
+ QBuffer stream;
+ player->setMedia(mediaContent, &stream);
+ QCOMPARE(player->media(), mediaContent);
+ QCOMPARE((QBuffer*)player->mediaStream(), &stream);
+}
+
+void tst_QMediaPlayer::testDuration()
+{
+ QFETCH_GLOBAL(qint64, duration);
+
+ mockService->setDuration(duration);
+ QVERIFY(player->duration() == duration);
+}
+
+void tst_QMediaPlayer::testPosition()
+{
+ QFETCH_GLOBAL(bool, valid);
+ QFETCH_GLOBAL(bool, seekable);
+ QFETCH_GLOBAL(qint64, position);
+ QFETCH_GLOBAL(qint64, duration);
+
+ mockService->setIsValid(valid);
+ mockService->setSeekable(seekable);
+ mockService->setPosition(position);
+ mockService->setDuration(duration);
+ QVERIFY(player->isSeekable() == seekable);
+ QVERIFY(player->position() == position);
+ QVERIFY(player->duration() == duration);
+
+ if (seekable) {
+ { QSignalSpy spy(player, SIGNAL(positionChanged(qint64)));
+ player->setPosition(position);
+ QCOMPARE(player->position(), position);
+ QCOMPARE(spy.count(), 0); }
+
+ mockService->setPosition(position);
+ { QSignalSpy spy(player, SIGNAL(positionChanged(qint64)));
+ player->setPosition(0);
+ QCOMPARE(player->position(), qint64(0));
+ QCOMPARE(spy.count(), position == 0 ? 0 : 1); }
+
+ mockService->setPosition(position);
+ { QSignalSpy spy(player, SIGNAL(positionChanged(qint64)));
+ player->setPosition(duration);
+ QCOMPARE(player->position(), duration);
+ QCOMPARE(spy.count(), position == duration ? 0 : 1); }
+
+ mockService->setPosition(position);
+ { QSignalSpy spy(player, SIGNAL(positionChanged(qint64)));
+ player->setPosition(-1);
+ QCOMPARE(player->position(), qint64(0));
+ QCOMPARE(spy.count(), position == 0 ? 0 : 1); }
+
+ mockService->setPosition(position);
+ { QSignalSpy spy(player, SIGNAL(positionChanged(qint64)));
+ player->setPosition(duration + 1);
+ QCOMPARE(player->position(), duration);
+ QCOMPARE(spy.count(), position == duration ? 0 : 1); }
+ }
+ else {
+ QSignalSpy spy(player, SIGNAL(positionChanged(qint64)));
+ player->setPosition(position);
+
+ QCOMPARE(player->position(), position);
+ QCOMPARE(spy.count(), 0);
+ }
+}
+
+void tst_QMediaPlayer::testVolume()
+{
+ QFETCH_GLOBAL(bool, valid);
+ QFETCH_GLOBAL(int, volume);
+
+ mockService->setVolume(volume);
+ QVERIFY(player->volume() == volume);
+
+ if (valid) {
+ { QSignalSpy spy(player, SIGNAL(volumeChanged(int)));
+ player->setVolume(10);
+ QCOMPARE(player->volume(), 10);
+ QCOMPARE(spy.count(), 1); }
+
+ { QSignalSpy spy(player, SIGNAL(volumeChanged(int)));
+ player->setVolume(-1000);
+ QCOMPARE(player->volume(), 0);
+ QCOMPARE(spy.count(), 1); }
+
+ { QSignalSpy spy(player, SIGNAL(volumeChanged(int)));
+ player->setVolume(100);
+ QCOMPARE(player->volume(), 100);
+ QCOMPARE(spy.count(), 1); }
+
+ { QSignalSpy spy(player, SIGNAL(volumeChanged(int)));
+ player->setVolume(1000);
+ QCOMPARE(player->volume(), 100);
+ QCOMPARE(spy.count(), 0); }
+ }
+}
+
+void tst_QMediaPlayer::testMuted()
+{
+ QFETCH_GLOBAL(bool, valid);
+ QFETCH_GLOBAL(bool, muted);
+ QFETCH_GLOBAL(int, volume);
+
+ if (valid) {
+ mockService->setMuted(muted);
+ mockService->setVolume(volume);
+ QVERIFY(player->isMuted() == muted);
+
+ QSignalSpy spy(player, SIGNAL(mutedChanged(bool)));
+ player->setMuted(!muted);
+ QCOMPARE(player->isMuted(), !muted);
+ QCOMPARE(player->volume(), volume);
+ QCOMPARE(spy.count(), 1);
+ }
+}
+
+void tst_QMediaPlayer::testVideoAvailable()
+{
+ QFETCH_GLOBAL(bool, videoAvailable);
+
+ mockService->setVideoAvailable(videoAvailable);
+ QVERIFY(player->isVideoAvailable() == videoAvailable);
+}
+
+void tst_QMediaPlayer::testBufferStatus()
+{
+ QFETCH_GLOBAL(int, bufferStatus);
+
+ mockService->setBufferStatus(bufferStatus);
+ QVERIFY(player->bufferStatus() == bufferStatus);
+}
+
+void tst_QMediaPlayer::testSeekable()
+{
+ QFETCH_GLOBAL(bool, seekable);
+
+ mockService->setSeekable(seekable);
+ QVERIFY(player->isSeekable() == seekable);
+}
+
+void tst_QMediaPlayer::testPlaybackRate()
+{
+ QFETCH_GLOBAL(bool, valid);
+ QFETCH_GLOBAL(qreal, playbackRate);
+
+ if (valid) {
+ mockService->setPlaybackRate(playbackRate);
+ QVERIFY(player->playbackRate() == playbackRate);
+
+ QSignalSpy spy(player, SIGNAL(playbackRateChanged(qreal)));
+ player->setPlaybackRate(playbackRate + 0.5f);
+ QCOMPARE(player->playbackRate(), playbackRate + 0.5f);
+ QCOMPARE(spy.count(), 1);
+ }
+}
+
+void tst_QMediaPlayer::testError()
+{
+ QFETCH_GLOBAL(QMediaPlayer::Error, error);
+
+ mockService->setError(error);
+ QVERIFY(player->error() == error);
+}
+
+void tst_QMediaPlayer::testErrorString()
+{
+ QFETCH_GLOBAL(QString, errorString);
+
+ mockService->setErrorString(errorString);
+ QVERIFY(player->errorString() == errorString);
+}
+
+void tst_QMediaPlayer::testService()
+{
+ /*
+ QFETCH_GLOBAL(bool, valid);
+
+ mockService->setIsValid(valid);
+
+ if (valid)
+ QVERIFY(player->service() != 0);
+ else
+ QVERIFY(player->service() == 0);
+ */
+}
+
+void tst_QMediaPlayer::testPlay()
+{
+ QFETCH_GLOBAL(bool, valid);
+ QFETCH_GLOBAL(QMediaContent, mediaContent);
+ QFETCH_GLOBAL(QMediaPlayer::State, state);
+
+ mockService->setIsValid(valid);
+ mockService->setState(state);
+ mockService->setMedia(mediaContent);
+ QVERIFY(player->state() == state);
+ QVERIFY(player->media() == mediaContent);
+
+ QSignalSpy spy(player, SIGNAL(stateChanged(QMediaPlayer::State)));
+
+ player->play();
+
+ if (!valid || mediaContent.isNull()) {
+ QCOMPARE(player->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(spy.count(), 0);
+ }
+ else {
+ QCOMPARE(player->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(spy.count(), state == QMediaPlayer::PlayingState ? 0 : 1);
+ }
+}
+
+void tst_QMediaPlayer::testPause()
+{
+ QFETCH_GLOBAL(bool, valid);
+ QFETCH_GLOBAL(QMediaContent, mediaContent);
+ QFETCH_GLOBAL(QMediaPlayer::State, state);
+
+ mockService->setIsValid(valid);
+ mockService->setState(state);
+ mockService->setMedia(mediaContent);
+ QVERIFY(player->state() == state);
+ QVERIFY(player->media() == mediaContent);
+
+ QSignalSpy spy(player, SIGNAL(stateChanged(QMediaPlayer::State)));
+
+ player->pause();
+
+ if (!valid || mediaContent.isNull()) {
+ QCOMPARE(player->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(spy.count(), 0);
+ }
+ else {
+ QCOMPARE(player->state(), QMediaPlayer::PausedState);
+ QCOMPARE(spy.count(), state == QMediaPlayer::PausedState ? 0 : 1);
+ }
+}
+
+void tst_QMediaPlayer::testStop()
+{
+ QFETCH_GLOBAL(QMediaContent, mediaContent);
+ QFETCH_GLOBAL(QMediaPlayer::State, state);
+
+ mockService->setState(state);
+ mockService->setMedia(mediaContent);
+ QVERIFY(player->state() == state);
+ QVERIFY(player->media() == mediaContent);
+
+ QSignalSpy spy(player, SIGNAL(stateChanged(QMediaPlayer::State)));
+
+ player->stop();
+
+ if (mediaContent.isNull() || state == QMediaPlayer::StoppedState) {
+ QCOMPARE(player->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(spy.count(), 0);
+ }
+ else {
+ QCOMPARE(player->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(spy.count(), 1);
+ }
+}
+
+void tst_QMediaPlayer::testMediaStatus()
+{
+ QFETCH_GLOBAL(int, bufferStatus);
+ int bufferSignals = 0;
+
+ player->setNotifyInterval(10);
+
+ mockService->setMediaStatus(QMediaPlayer::NoMedia);
+ mockService->setBufferStatus(bufferStatus);
+
+ AutoConnection connection(
+ player, SIGNAL(bufferStatusChanged(int)),
+ &QTestEventLoop::instance(), SLOT(exitLoop()));
+
+ QSignalSpy statusSpy(player, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)));
+ QSignalSpy bufferSpy(player, SIGNAL(bufferStatusChanged(int)));
+
+ QCOMPARE(player->mediaStatus(), QMediaPlayer::NoMedia);
+
+ mockService->setMediaStatus(QMediaPlayer::LoadingMedia);
+ QCOMPARE(player->mediaStatus(), QMediaPlayer::LoadingMedia);
+ QCOMPARE(statusSpy.count(), 1);
+
+ QCOMPARE(qvariant_cast<QMediaPlayer::MediaStatus>(statusSpy.last().value(0)),
+ QMediaPlayer::LoadingMedia);
+
+ mockService->setMediaStatus(QMediaPlayer::LoadedMedia);
+ QCOMPARE(player->mediaStatus(), QMediaPlayer::LoadedMedia);
+ QCOMPARE(statusSpy.count(), 2);
+
+ QCOMPARE(qvariant_cast<QMediaPlayer::MediaStatus>(statusSpy.last().value(0)),
+ QMediaPlayer::LoadedMedia);
+
+ // Verify the bufferStatusChanged() signal isn't being emitted.
+ QTestEventLoop::instance().enterLoop(1);
+ QCOMPARE(bufferSpy.count(), 0);
+
+ mockService->setMediaStatus(QMediaPlayer::StalledMedia);
+ QCOMPARE(player->mediaStatus(), QMediaPlayer::StalledMedia);
+ QCOMPARE(statusSpy.count(), 3);
+
+ QCOMPARE(qvariant_cast<QMediaPlayer::MediaStatus>(statusSpy.last().value(0)),
+ QMediaPlayer::StalledMedia);
+
+ // Verify the bufferStatusChanged() signal is being emitted.
+ QTestEventLoop::instance().enterLoop(1);
+ QVERIFY(bufferSpy.count() > bufferSignals);
+ QCOMPARE(bufferSpy.last().value(0).toInt(), bufferStatus);
+ bufferSignals = bufferSpy.count();
+
+ mockService->setMediaStatus(QMediaPlayer::BufferingMedia);
+ QCOMPARE(player->mediaStatus(), QMediaPlayer::BufferingMedia);
+ QCOMPARE(statusSpy.count(), 4);
+
+ QCOMPARE(qvariant_cast<QMediaPlayer::MediaStatus>(statusSpy.last().value(0)),
+ QMediaPlayer::BufferingMedia);
+
+ // Verify the bufferStatusChanged() signal is being emitted.
+ QTestEventLoop::instance().enterLoop(1);
+ QVERIFY(bufferSpy.count() > bufferSignals);
+ QCOMPARE(bufferSpy.last().value(0).toInt(), bufferStatus);
+ bufferSignals = bufferSpy.count();
+
+ mockService->setMediaStatus(QMediaPlayer::BufferedMedia);
+ QCOMPARE(player->mediaStatus(), QMediaPlayer::BufferedMedia);
+ QCOMPARE(statusSpy.count(), 5);
+
+ QCOMPARE(qvariant_cast<QMediaPlayer::MediaStatus>(statusSpy.last().value(0)),
+ QMediaPlayer::BufferedMedia);
+
+ // Verify the bufferStatusChanged() signal isn't being emitted.
+ QTestEventLoop::instance().enterLoop(1);
+ QCOMPARE(bufferSpy.count(), bufferSignals);
+
+ mockService->setMediaStatus(QMediaPlayer::EndOfMedia);
+ QCOMPARE(player->mediaStatus(), QMediaPlayer::EndOfMedia);
+ QCOMPARE(statusSpy.count(), 6);
+
+ QCOMPARE(qvariant_cast<QMediaPlayer::MediaStatus>(statusSpy.last().value(0)),
+ QMediaPlayer::EndOfMedia);
+}
+
+void tst_QMediaPlayer::testPlaylist()
+{
+ QMediaContent content0(QUrl(QLatin1String("test://audio/song1.mp3")));
+ QMediaContent content1(QUrl(QLatin1String("test://audio/song2.mp3")));
+ QMediaContent content2(QUrl(QLatin1String("test://video/movie1.mp4")));
+ QMediaContent content3(QUrl(QLatin1String("test://video/movie2.mp4")));
+ QMediaContent content4(QUrl(QLatin1String("test://image/photo.jpg")));
+
+ mockService->setIsValid(true);
+ mockService->setState(QMediaPlayer::StoppedState, QMediaPlayer::NoMedia);
+
+ QMediaPlaylist *playlist = new QMediaPlaylist;
+ playlist->setMediaObject(player);
+
+ QSignalSpy stateSpy(player, SIGNAL(stateChanged(QMediaPlayer::State)));
+ QSignalSpy mediaSpy(player, SIGNAL(mediaChanged(QMediaContent)));
+
+ // Test the player does nothing with an empty playlist attached.
+ player->play();
+ QCOMPARE(player->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(player->media(), QMediaContent());
+ QCOMPARE(stateSpy.count(), 0);
+ QCOMPARE(mediaSpy.count(), 0);
+
+ playlist->addMedia(content0);
+ playlist->addMedia(content1);
+ playlist->addMedia(content2);
+ playlist->addMedia(content3);
+
+ // Test changing the playlist position, changes the current media, but not the playing state.
+ playlist->setCurrentIndex(1);
+ QCOMPARE(player->media(), content1);
+ QCOMPARE(player->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(stateSpy.count(), 0);
+ QCOMPARE(mediaSpy.count(), 1);
+
+ // Test playing starts with the current media.
+ player->play();
+ QCOMPARE(player->media(), content1);
+ QCOMPARE(player->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(stateSpy.count(), 1);
+ QCOMPARE(mediaSpy.count(), 1);
+
+ // Test pausing doesn't change the current media.
+ player->pause();
+ QCOMPARE(player->media(), content1);
+ QCOMPARE(player->state(), QMediaPlayer::PausedState);
+ QCOMPARE(stateSpy.count(), 2);
+ QCOMPARE(mediaSpy.count(), 1);
+
+ // Test stopping doesn't change the current media.
+ player->stop();
+ QCOMPARE(player->media(), content1);
+ QCOMPARE(player->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(stateSpy.count(), 3);
+ QCOMPARE(mediaSpy.count(), 1);
+
+ // Test when the player service reaches the end of the current media, the player moves onto
+ // the next item without stopping.
+ player->play();
+ QCOMPARE(player->media(), content1);
+ QCOMPARE(player->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(stateSpy.count(), 4);
+ QCOMPARE(mediaSpy.count(), 1);
+
+ mockService->setState(QMediaPlayer::StoppedState, QMediaPlayer::EndOfMedia);
+ QCOMPARE(player->media(), content2);
+ QCOMPARE(player->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(stateSpy.count(), 4);
+ QCOMPARE(mediaSpy.count(), 2);
+
+ // Test skipping the current media doesn't change the state.
+ playlist->next();
+ QCOMPARE(player->media(), content3);
+ QCOMPARE(player->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(stateSpy.count(), 4);
+ QCOMPARE(mediaSpy.count(), 3);
+
+ // Test changing the current media while paused doesn't change the state.
+ player->pause();
+ mockService->setMediaStatus(QMediaPlayer::BufferedMedia);
+ QCOMPARE(player->media(), content3);
+ QCOMPARE(player->state(), QMediaPlayer::PausedState);
+ QCOMPARE(stateSpy.count(), 5);
+ QCOMPARE(mediaSpy.count(), 3);
+
+ playlist->previous();
+ QCOMPARE(player->media(), content2);
+ QCOMPARE(player->state(), QMediaPlayer::PausedState);
+ QCOMPARE(stateSpy.count(), 5);
+ QCOMPARE(mediaSpy.count(), 4);
+
+ // Test changing the current media while stopped doesn't change the state.
+ player->stop();
+ mockService->setMediaStatus(QMediaPlayer::LoadedMedia);
+ QCOMPARE(player->media(), content2);
+ QCOMPARE(player->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(stateSpy.count(), 6);
+ QCOMPARE(mediaSpy.count(), 4);
+
+ playlist->next();
+ QCOMPARE(player->media(), content3);
+ QCOMPARE(player->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(stateSpy.count(), 6);
+ QCOMPARE(mediaSpy.count(), 5);
+
+ // Test the player is stopped and the current media cleared when it reaches the end of the last
+ // item in the playlist.
+ player->play();
+ QCOMPARE(player->media(), content3);
+ QCOMPARE(player->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(stateSpy.count(), 7);
+ QCOMPARE(mediaSpy.count(), 5);
+
+ // Double up the signals to ensure some noise doesn't destabalize things.
+ mockService->setState(QMediaPlayer::StoppedState, QMediaPlayer::EndOfMedia);
+ mockService->setState(QMediaPlayer::StoppedState, QMediaPlayer::EndOfMedia);
+ QCOMPARE(player->media(), QMediaContent());
+ QCOMPARE(player->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(stateSpy.count(), 8);
+ QCOMPARE(mediaSpy.count(), 6);
+
+ // Test starts playing from the start of the playlist if there is no current media selected.
+ player->play();
+ QCOMPARE(player->media(), content0);
+ QCOMPARE(player->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(stateSpy.count(), 9);
+ QCOMPARE(mediaSpy.count(), 7);
+
+ // Test deleting the playlist stops the player and clears the media it set.
+ delete playlist;
+ QCOMPARE(player->media(), QMediaContent());
+ QCOMPARE(player->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(stateSpy.count(), 10);
+ QCOMPARE(mediaSpy.count(), 8);
+
+ // Test the player works as normal with the playlist removed.
+ player->play();
+ QCOMPARE(player->media(), QMediaContent());
+ QCOMPARE(player->state(), QMediaPlayer::StoppedState);
+ QCOMPARE(stateSpy.count(), 10);
+ QCOMPARE(mediaSpy.count(), 8);
+
+ player->setMedia(content1);
+ player->play();
+
+ QCOMPARE(player->media(), content1);
+ QCOMPARE(player->state(), QMediaPlayer::PlayingState);
+ QCOMPARE(stateSpy.count(), 11);
+ QCOMPARE(mediaSpy.count(), 9);
+
+ // Test the player can bind to playlist again
+ playlist = new QMediaPlaylist;
+ playlist->setMediaObject(player);
+ QCOMPARE(playlist->mediaObject(), qobject_cast<QMediaObject*>(player));
+
+ QCOMPARE(player->media(), QMediaContent());
+ QCOMPARE(player->state(), QMediaPlayer::StoppedState);
+
+ playlist->addMedia(content0);
+ playlist->addMedia(content1);
+ playlist->addMedia(content2);
+ playlist->addMedia(content3);
+
+ playlist->setCurrentIndex(1);
+ QCOMPARE(player->media(), content1);
+ QCOMPARE(player->state(), QMediaPlayer::StoppedState);
+
+ // Test attaching the new playlist,
+ // player should detach the current one
+ QMediaPlaylist *playlist2 = new QMediaPlaylist;
+ playlist2->addMedia(content1);
+ playlist2->addMedia(content2);
+ playlist2->addMedia(content3);
+ playlist2->setCurrentIndex(2);
+
+ player->play();
+ playlist2->setMediaObject(player);
+ QCOMPARE(playlist2->mediaObject(), qobject_cast<QMediaObject*>(player));
+ QVERIFY(playlist->mediaObject() == 0);
+ QCOMPARE(player->media(), playlist2->currentMedia());
+ QCOMPARE(player->state(), QMediaPlayer::StoppedState);
+
+ playlist2->setCurrentIndex(1);
+ QCOMPARE(player->media(), playlist2->currentMedia());
+}
+
+QTEST_MAIN(tst_QMediaPlayer)
+
+#include "tst_qmediaplayer.moc"
diff --git a/tests/auto/qmediaplaylist/qmediaplaylist.pro b/tests/auto/qmediaplaylist/qmediaplaylist.pro
new file mode 100644
index 0000000000..b114bda778
--- /dev/null
+++ b/tests/auto/qmediaplaylist/qmediaplaylist.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+
+SOURCES = tst_qmediaplaylist.cpp
+
+QT = core multimedia
+
diff --git a/tests/auto/qmediaplaylist/tmp.unsupported_format b/tests/auto/qmediaplaylist/tmp.unsupported_format
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/qmediaplaylist/tmp.unsupported_format
diff --git a/tests/auto/qmediaplaylist/tst_qmediaplaylist.cpp b/tests/auto/qmediaplaylist/tst_qmediaplaylist.cpp
new file mode 100644
index 0000000000..383a407321
--- /dev/null
+++ b/tests/auto/qmediaplaylist/tst_qmediaplaylist.cpp
@@ -0,0 +1,593 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QDebug>
+#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/qmediaplaylist.h>
+#include <QtMultimedia/qmediaplaylistcontrol.h>
+#include <QtMultimedia/qmediaplaylistnavigator.h>
+#include <QtMultimedia/private/qmediapluginloader_p.h>
+
+
+class MockReadOnlyPlaylistProvider : public QMediaPlaylistProvider
+{
+ Q_OBJECT
+public:
+ MockReadOnlyPlaylistProvider(QObject *parent)
+ :QMediaPlaylistProvider(parent)
+ {
+ m_items.append(QMediaContent(QUrl(QLatin1String("file:///1"))));
+ m_items.append(QMediaContent(QUrl(QLatin1String("file:///2"))));
+ m_items.append(QMediaContent(QUrl(QLatin1String("file:///3"))));
+ }
+
+ int mediaCount() const { return m_items.size(); }
+ QMediaContent media(int index) const
+ {
+ return index >=0 && index < mediaCount() ? m_items.at(index) : QMediaContent();
+ }
+
+private:
+ QList<QMediaContent> m_items;
+};
+
+class MockPlaylistControl : public QMediaPlaylistControl
+{
+ Q_OBJECT
+public:
+ MockPlaylistControl(QObject *parent) : QMediaPlaylistControl(parent)
+ {
+ m_navigator = new QMediaPlaylistNavigator(new MockReadOnlyPlaylistProvider(this), this);
+ }
+
+ ~MockPlaylistControl()
+ {
+ }
+
+ QMediaPlaylistProvider* playlistProvider() const { return m_navigator->playlist(); }
+ bool setPlaylistProvider(QMediaPlaylistProvider *playlist) { m_navigator->setPlaylist(playlist); return true; }
+
+ int currentIndex() const { return m_navigator->currentIndex(); }
+ void setCurrentIndex(int position) { m_navigator->jump(position); }
+ int nextIndex(int steps) const { return m_navigator->nextIndex(steps); }
+ int previousIndex(int steps) const { return m_navigator->previousIndex(steps); }
+
+ void next() { m_navigator->next(); }
+ void previous() { m_navigator->previous(); }
+
+ QMediaPlaylist::PlaybackMode playbackMode() const { return m_navigator->playbackMode(); }
+ void setPlaybackMode(QMediaPlaylist::PlaybackMode mode) { m_navigator->setPlaybackMode(mode); }
+
+private:
+ QMediaPlaylistNavigator *m_navigator;
+};
+
+class MockPlaylistService : public QMediaService
+{
+ Q_OBJECT
+
+public:
+ MockPlaylistService():QMediaService(0)
+ {
+ mockControl = new MockPlaylistControl(this);
+ }
+
+ ~MockPlaylistService()
+ {
+ }
+
+ QMediaControl* control(const char *iid) const
+ {
+ if (qstrcmp(iid, QMediaPlaylistControl_iid) == 0)
+ return mockControl;
+ return 0;
+ }
+
+ MockPlaylistControl *mockControl;
+};
+
+class MockReadOnlyPlaylistObject : public QMediaObject
+{
+ Q_OBJECT
+public:
+ MockReadOnlyPlaylistObject(QObject *parent = 0)
+ :QMediaObject(parent, new MockPlaylistService)
+ {
+ }
+};
+
+
+class tst_QMediaPlaylist : public QObject
+{
+ Q_OBJECT
+public slots:
+ void init();
+ void cleanup();
+ void initTestCase();
+
+private slots:
+ void construction();
+ void append();
+ void insert();
+ void clear();
+ void removeMedia();
+ void currentItem();
+ void saveAndLoad();
+ void playbackMode();
+ void playbackMode_data();
+ void shuffle();
+ void readOnlyPlaylist();
+ void setMediaObject();
+
+private:
+ QMediaContent content1;
+ QMediaContent content2;
+ QMediaContent content3;
+};
+
+void tst_QMediaPlaylist::init()
+{
+}
+
+void tst_QMediaPlaylist::initTestCase()
+{
+ content1 = QMediaContent(QUrl(QLatin1String("file:///1")));
+ content2 = QMediaContent(QUrl(QLatin1String("file:///2")));
+ content3 = QMediaContent(QUrl(QLatin1String("file:///3")));
+}
+
+void tst_QMediaPlaylist::cleanup()
+{
+}
+
+void tst_QMediaPlaylist::construction()
+{
+ QMediaPlaylist playlist;
+ QCOMPARE(playlist.mediaCount(), 0);
+ QVERIFY(playlist.isEmpty());
+}
+
+void tst_QMediaPlaylist::append()
+{
+ QMediaPlaylist playlist;
+ QVERIFY(!playlist.isReadOnly());
+
+ playlist.addMedia(content1);
+ QCOMPARE(playlist.mediaCount(), 1);
+ QCOMPARE(playlist.media(0), content1);
+
+ QSignalSpy aboutToBeInsertedSignalSpy(&playlist, SIGNAL(mediaAboutToBeInserted(int,int)));
+ QSignalSpy insertedSignalSpy(&playlist, SIGNAL(mediaInserted(int,int)));
+ playlist.addMedia(content2);
+ QCOMPARE(playlist.mediaCount(), 2);
+ QCOMPARE(playlist.media(1), content2);
+
+ QCOMPARE(aboutToBeInsertedSignalSpy.count(), 1);
+ QCOMPARE(aboutToBeInsertedSignalSpy.first()[0].toInt(), 1);
+ QCOMPARE(aboutToBeInsertedSignalSpy.first()[1].toInt(), 1);
+
+ QCOMPARE(insertedSignalSpy.count(), 1);
+ QCOMPARE(insertedSignalSpy.first()[0].toInt(), 1);
+ QCOMPARE(insertedSignalSpy.first()[1].toInt(), 1);
+
+ aboutToBeInsertedSignalSpy.clear();
+ insertedSignalSpy.clear();
+
+ QMediaContent content4(QUrl(QLatin1String("file:///4")));
+ QMediaContent content5(QUrl(QLatin1String("file:///5")));
+ playlist.addMedia(QList<QMediaContent>() << content3 << content4 << content5);
+ QCOMPARE(playlist.mediaCount(), 5);
+ QCOMPARE(playlist.media(2), content3);
+ QCOMPARE(playlist.media(3), content4);
+ QCOMPARE(playlist.media(4), content5);
+
+ QCOMPARE(aboutToBeInsertedSignalSpy.count(), 1);
+ QCOMPARE(aboutToBeInsertedSignalSpy[0][0].toInt(), 2);
+ QCOMPARE(aboutToBeInsertedSignalSpy[0][1].toInt(), 4);
+
+ QCOMPARE(insertedSignalSpy.count(), 1);
+ QCOMPARE(insertedSignalSpy[0][0].toInt(), 2);
+ QCOMPARE(insertedSignalSpy[0][1].toInt(), 4);
+
+ aboutToBeInsertedSignalSpy.clear();
+ insertedSignalSpy.clear();
+
+ playlist.addMedia(QList<QMediaContent>());
+ QCOMPARE(aboutToBeInsertedSignalSpy.count(), 0);
+ QCOMPARE(insertedSignalSpy.count(), 0);
+}
+
+void tst_QMediaPlaylist::insert()
+{
+ QMediaPlaylist playlist;
+ QVERIFY(!playlist.isReadOnly());
+
+ playlist.addMedia(content1);
+ QCOMPARE(playlist.mediaCount(), 1);
+ QCOMPARE(playlist.media(0), content1);
+
+ playlist.addMedia(content2);
+ QCOMPARE(playlist.mediaCount(), 2);
+ QCOMPARE(playlist.media(1), content2);
+
+ QSignalSpy aboutToBeInsertedSignalSpy(&playlist, SIGNAL(mediaAboutToBeInserted(int,int)));
+ QSignalSpy insertedSignalSpy(&playlist, SIGNAL(mediaInserted(int,int)));
+
+ playlist.insertMedia(1, content3);
+ QCOMPARE(playlist.mediaCount(), 3);
+ QCOMPARE(playlist.media(0), content1);
+ QCOMPARE(playlist.media(1), content3);
+ QCOMPARE(playlist.media(2), content2);
+
+ QCOMPARE(aboutToBeInsertedSignalSpy.count(), 1);
+ QCOMPARE(aboutToBeInsertedSignalSpy.first()[0].toInt(), 1);
+ QCOMPARE(aboutToBeInsertedSignalSpy.first()[1].toInt(), 1);
+
+ QCOMPARE(insertedSignalSpy.count(), 1);
+ QCOMPARE(insertedSignalSpy.first()[0].toInt(), 1);
+ QCOMPARE(insertedSignalSpy.first()[1].toInt(), 1);
+
+ aboutToBeInsertedSignalSpy.clear();
+ insertedSignalSpy.clear();
+
+ QMediaContent content4(QUrl(QLatin1String("file:///4")));
+ QMediaContent content5(QUrl(QLatin1String("file:///5")));
+ playlist.insertMedia(1, QList<QMediaContent>() << content4 << content5);
+
+ QCOMPARE(playlist.media(0), content1);
+ QCOMPARE(playlist.media(1), content4);
+ QCOMPARE(playlist.media(2), content5);
+ QCOMPARE(playlist.media(3), content3);
+ QCOMPARE(playlist.media(4), content2);
+ QCOMPARE(aboutToBeInsertedSignalSpy.count(), 1);
+ QCOMPARE(aboutToBeInsertedSignalSpy[0][0].toInt(), 1);
+ QCOMPARE(aboutToBeInsertedSignalSpy[0][1].toInt(), 2);
+
+ QCOMPARE(insertedSignalSpy.count(), 1);
+ QCOMPARE(insertedSignalSpy[0][0].toInt(), 1);
+ QCOMPARE(insertedSignalSpy[0][1].toInt(), 2);
+
+ aboutToBeInsertedSignalSpy.clear();
+ insertedSignalSpy.clear();
+
+ playlist.insertMedia(1, QList<QMediaContent>());
+ QCOMPARE(aboutToBeInsertedSignalSpy.count(), 0);
+ QCOMPARE(insertedSignalSpy.count(), 0);
+}
+
+
+void tst_QMediaPlaylist::currentItem()
+{
+ QMediaPlaylist playlist;
+ playlist.addMedia(content1);
+ playlist.addMedia(content2);
+
+ QCOMPARE(playlist.currentIndex(), -1);
+ QCOMPARE(playlist.currentMedia(), QMediaContent());
+
+ QCOMPARE(playlist.nextIndex(), 0);
+ QCOMPARE(playlist.nextIndex(2), 1);
+ QCOMPARE(playlist.previousIndex(), 1);
+ QCOMPARE(playlist.previousIndex(2), 0);
+
+ playlist.setCurrentIndex(0);
+ QCOMPARE(playlist.currentIndex(), 0);
+ QCOMPARE(playlist.currentMedia(), content1);
+
+ QCOMPARE(playlist.nextIndex(), 1);
+ QCOMPARE(playlist.nextIndex(2), -1);
+ QCOMPARE(playlist.previousIndex(), -1);
+ QCOMPARE(playlist.previousIndex(2), -1);
+
+ playlist.setCurrentIndex(1);
+ QCOMPARE(playlist.currentIndex(), 1);
+ QCOMPARE(playlist.currentMedia(), content2);
+
+ QCOMPARE(playlist.nextIndex(), -1);
+ QCOMPARE(playlist.nextIndex(2), -1);
+ QCOMPARE(playlist.previousIndex(), 0);
+ QCOMPARE(playlist.previousIndex(2), -1);
+
+ QTest::ignoreMessage(QtWarningMsg, "QMediaPlaylistNavigator: Jump outside playlist range ");
+ playlist.setCurrentIndex(2);
+
+ QCOMPARE(playlist.currentIndex(), -1);
+ QCOMPARE(playlist.currentMedia(), QMediaContent());
+}
+
+void tst_QMediaPlaylist::clear()
+{
+ QMediaPlaylist playlist;
+ playlist.addMedia(content1);
+ playlist.addMedia(content2);
+
+ playlist.clear();
+ QVERIFY(playlist.isEmpty());
+ QCOMPARE(playlist.mediaCount(), 0);
+}
+
+void tst_QMediaPlaylist::removeMedia()
+{
+ QMediaPlaylist playlist;
+ playlist.addMedia(content1);
+ playlist.addMedia(content2);
+ playlist.addMedia(content3);
+
+ QSignalSpy aboutToBeRemovedSignalSpy(&playlist, SIGNAL(mediaAboutToBeRemoved(int,int)));
+ QSignalSpy removedSignalSpy(&playlist, SIGNAL(mediaRemoved(int,int)));
+ playlist.removeMedia(1);
+ QCOMPARE(playlist.mediaCount(), 2);
+ QCOMPARE(playlist.media(1), content3);
+
+ QCOMPARE(aboutToBeRemovedSignalSpy.count(), 1);
+ QCOMPARE(aboutToBeRemovedSignalSpy.first()[0].toInt(), 1);
+ QCOMPARE(aboutToBeRemovedSignalSpy.first()[1].toInt(), 1);
+
+ QCOMPARE(removedSignalSpy.count(), 1);
+ QCOMPARE(removedSignalSpy.first()[0].toInt(), 1);
+ QCOMPARE(removedSignalSpy.first()[1].toInt(), 1);
+
+ aboutToBeRemovedSignalSpy.clear();
+ removedSignalSpy.clear();
+
+ playlist.removeMedia(0,1);
+ QVERIFY(playlist.isEmpty());
+
+ QCOMPARE(aboutToBeRemovedSignalSpy.count(), 1);
+ QCOMPARE(aboutToBeRemovedSignalSpy.first()[0].toInt(), 0);
+ QCOMPARE(aboutToBeRemovedSignalSpy.first()[1].toInt(), 1);
+
+ QCOMPARE(removedSignalSpy.count(), 1);
+ QCOMPARE(removedSignalSpy.first()[0].toInt(), 0);
+ QCOMPARE(removedSignalSpy.first()[1].toInt(), 1);
+
+
+ playlist.addMedia(content1);
+ playlist.addMedia(content2);
+ playlist.addMedia(content3);
+
+ playlist.removeMedia(0,1);
+ QCOMPARE(playlist.mediaCount(), 1);
+ QCOMPARE(playlist.media(0), content3);
+}
+
+void tst_QMediaPlaylist::saveAndLoad()
+{
+ QMediaPlaylist playlist;
+ playlist.addMedia(content1);
+ playlist.addMedia(content2);
+ playlist.addMedia(content3);
+
+ QCOMPARE(playlist.error(), QMediaPlaylist::NoError);
+ QVERIFY(playlist.errorString().isEmpty());
+
+ QBuffer buffer;
+ buffer.open(QBuffer::ReadWrite);
+
+ bool res = playlist.save(&buffer, "unsupported_format");
+ QVERIFY(!res);
+ QVERIFY(playlist.error() != QMediaPlaylist::NoError);
+ QVERIFY(!playlist.errorString().isEmpty());
+
+ QSignalSpy errorSignal(&playlist, SIGNAL(loadFailed()));
+ playlist.load(&buffer, "unsupported_format");
+ QCOMPARE(errorSignal.size(), 1);
+ QVERIFY(playlist.error() != QMediaPlaylist::NoError);
+ QVERIFY(!playlist.errorString().isEmpty());
+
+ res = playlist.save(QUrl(QLatin1String("tmp.unsupported_format")), "unsupported_format");
+ QVERIFY(!res);
+ QVERIFY(playlist.error() != QMediaPlaylist::NoError);
+ QVERIFY(!playlist.errorString().isEmpty());
+
+ errorSignal.clear();
+ playlist.load(QUrl(QLatin1String("tmp.unsupported_format")), "unsupported_format");
+ QCOMPARE(errorSignal.size(), 1);
+ QVERIFY(playlist.error() != QMediaPlaylist::NoError);
+ QVERIFY(!playlist.errorString().isEmpty());
+}
+
+void tst_QMediaPlaylist::playbackMode_data()
+{
+ QTest::addColumn<QMediaPlaylist::PlaybackMode>("playbackMode");
+ QTest::addColumn<int>("expectedPrevious");
+ QTest::addColumn<int>("pos");
+ QTest::addColumn<int>("expectedNext");
+
+ QTest::newRow("Linear, 0") << QMediaPlaylist::Linear << -1 << 0 << 1;
+ QTest::newRow("Linear, 1") << QMediaPlaylist::Linear << 0 << 1 << 2;
+ QTest::newRow("Linear, 2") << QMediaPlaylist::Linear << 1 << 2 << -1;
+
+ QTest::newRow("Loop, 0") << QMediaPlaylist::Loop << 2 << 0 << 1;
+ QTest::newRow("Loop, 1") << QMediaPlaylist::Loop << 0 << 1 << 2;
+ QTest::newRow("Lopp, 2") << QMediaPlaylist::Loop << 1 << 2 << 0;
+
+ QTest::newRow("ItemOnce, 1") << QMediaPlaylist::CurrentItemOnce << -1 << 1 << -1;
+ QTest::newRow("ItemInLoop, 1") << QMediaPlaylist::CurrentItemInLoop << 1 << 1 << 1;
+
+}
+
+void tst_QMediaPlaylist::playbackMode()
+{
+ QFETCH(QMediaPlaylist::PlaybackMode, playbackMode);
+ QFETCH(int, expectedPrevious);
+ QFETCH(int, pos);
+ QFETCH(int, expectedNext);
+
+ QMediaPlaylist playlist;
+ playlist.addMedia(content1);
+ playlist.addMedia(content2);
+ playlist.addMedia(content3);
+
+ QCOMPARE(playlist.playbackMode(), QMediaPlaylist::Linear);
+ QCOMPARE(playlist.currentIndex(), -1);
+
+ playlist.setPlaybackMode(playbackMode);
+ QCOMPARE(playlist.playbackMode(), playbackMode);
+
+ playlist.setCurrentIndex(pos);
+ QCOMPARE(playlist.currentIndex(), pos);
+ QCOMPARE(playlist.nextIndex(), expectedNext);
+ QCOMPARE(playlist.previousIndex(), expectedPrevious);
+
+ playlist.next();
+ QCOMPARE(playlist.currentIndex(), expectedNext);
+
+ playlist.setCurrentIndex(pos);
+ playlist.previous();
+ QCOMPARE(playlist.currentIndex(), expectedPrevious);
+}
+
+void tst_QMediaPlaylist::shuffle()
+{
+ QMediaPlaylist playlist;
+ QList<QMediaContent> contentList;
+
+ for (int i=0; i<100; i++) {
+ QMediaContent content(QUrl(QString::number(i)));
+ contentList.append(content);
+ playlist.addMedia(content);
+ }
+
+ playlist.shuffle();
+
+ QList<QMediaContent> shuffledContentList;
+ for (int i=0; i<playlist.mediaCount(); i++)
+ shuffledContentList.append(playlist.media(i));
+
+ QVERIFY(contentList != shuffledContentList);
+
+}
+
+void tst_QMediaPlaylist::readOnlyPlaylist()
+{
+ MockReadOnlyPlaylistObject mediaObject;
+ QMediaPlaylist playlist;
+ playlist.setMediaObject(&mediaObject);
+
+ QVERIFY(playlist.isReadOnly());
+ QVERIFY(!playlist.isEmpty());
+ QCOMPARE(playlist.mediaCount(), 3);
+
+ QCOMPARE(playlist.media(0), content1);
+ QCOMPARE(playlist.media(1), content2);
+ QCOMPARE(playlist.media(2), content3);
+ QCOMPARE(playlist.media(3), QMediaContent());
+
+ //it's a read only playlist, so all the modification should fail
+ QVERIFY(!playlist.addMedia(content1));
+ QCOMPARE(playlist.mediaCount(), 3);
+ QVERIFY(!playlist.addMedia(QList<QMediaContent>() << content1 << content2));
+ QCOMPARE(playlist.mediaCount(), 3);
+ QVERIFY(!playlist.insertMedia(1, content1));
+ QCOMPARE(playlist.mediaCount(), 3);
+ QVERIFY(!playlist.insertMedia(1, QList<QMediaContent>() << content1 << content2));
+ QCOMPARE(playlist.mediaCount(), 3);
+ QVERIFY(!playlist.removeMedia(1));
+ QCOMPARE(playlist.mediaCount(), 3);
+ QVERIFY(!playlist.removeMedia(0,2));
+ QCOMPARE(playlist.mediaCount(), 3);
+ QVERIFY(!playlist.clear());
+ QCOMPARE(playlist.mediaCount(), 3);
+
+ //but it is still allowed to append/insert an empty list
+ QVERIFY(playlist.addMedia(QList<QMediaContent>()));
+ QVERIFY(playlist.insertMedia(1, QList<QMediaContent>()));
+
+ playlist.shuffle();
+ //it's still the same
+ QCOMPARE(playlist.media(0), content1);
+ QCOMPARE(playlist.media(1), content2);
+ QCOMPARE(playlist.media(2), content3);
+ QCOMPARE(playlist.media(3), QMediaContent());
+
+
+ //load to read only playlist should fail,
+ //unless underlaying provider supports it
+ QBuffer buffer;
+ buffer.open(QBuffer::ReadWrite);
+ buffer.write(QByteArray("file:///1\nfile:///2"));
+ buffer.seek(0);
+
+ QSignalSpy errorSignal(&playlist, SIGNAL(loadFailed()));
+ playlist.load(&buffer, "m3u");
+ QCOMPARE(errorSignal.size(), 1);
+ QCOMPARE(playlist.error(), QMediaPlaylist::AccessDeniedError);
+ QVERIFY(!playlist.errorString().isEmpty());
+ QCOMPARE(playlist.mediaCount(), 3);
+
+ errorSignal.clear();
+ playlist.load(QUrl(QLatin1String("tmp.m3u")), "m3u");
+
+ QCOMPARE(errorSignal.size(), 1);
+ QCOMPARE(playlist.error(), QMediaPlaylist::AccessDeniedError);
+ QVERIFY(!playlist.errorString().isEmpty());
+ QCOMPARE(playlist.mediaCount(), 3);
+}
+
+void tst_QMediaPlaylist::setMediaObject()
+{
+ MockReadOnlyPlaylistObject mediaObject;
+
+ QMediaPlaylist playlist;
+ QVERIFY(playlist.mediaObject() == 0);
+ QVERIFY(!playlist.isReadOnly());
+
+ playlist.setMediaObject(&mediaObject);
+ QCOMPARE(playlist.mediaObject(), qobject_cast<QMediaObject*>(&mediaObject));
+ QCOMPARE(playlist.mediaCount(), 3);
+ QVERIFY(playlist.isReadOnly());
+
+ playlist.setMediaObject(0);
+ QVERIFY(playlist.mediaObject() == 0);
+ QCOMPARE(playlist.mediaCount(), 0);
+ QVERIFY(!playlist.isReadOnly());
+
+ playlist.setMediaObject(&mediaObject);
+ QCOMPARE(playlist.mediaObject(), qobject_cast<QMediaObject*>(&mediaObject));
+ QCOMPARE(playlist.mediaCount(), 3);
+ QVERIFY(playlist.isReadOnly());
+}
+
+QTEST_MAIN(tst_QMediaPlaylist)
+#include "tst_qmediaplaylist.moc"
+
diff --git a/tests/auto/qmediaplaylistnavigator/qmediaplaylistnavigator.pro b/tests/auto/qmediaplaylistnavigator/qmediaplaylistnavigator.pro
new file mode 100644
index 0000000000..ea9bc0fbf3
--- /dev/null
+++ b/tests/auto/qmediaplaylistnavigator/qmediaplaylistnavigator.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+
+SOURCES = tst_qmediaplaylistnavigator.cpp
+
+QT = core multimedia
+
diff --git a/tests/auto/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp b/tests/auto/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp
new file mode 100644
index 0000000000..9130db0bcd
--- /dev/null
+++ b/tests/auto/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp
@@ -0,0 +1,316 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QDebug>
+#include <QtMultimedia/qlocalmediaplaylistprovider.h>
+#include <QtMultimedia/qmediaplaylistnavigator.h>
+
+
+class tst_QMediaPlaylistNavigator : public QObject
+{
+ Q_OBJECT
+public slots:
+ void init();
+ void cleanup();
+
+private slots:
+ void construction();
+ void setPlaylist();
+ void linearPlayback();
+ void loopPlayback();
+ void currentItemOnce();
+ void currentItemInLoop();
+ void randomPlayback();
+};
+
+void tst_QMediaPlaylistNavigator::init()
+{
+}
+
+void tst_QMediaPlaylistNavigator::cleanup()
+{
+}
+
+void tst_QMediaPlaylistNavigator::construction()
+{
+ QLocalMediaPlaylistProvider playlist;
+ QCOMPARE(playlist.mediaCount(), 0);
+
+ QMediaPlaylistNavigator navigator(&playlist);
+ QVERIFY(navigator.currentItem().isNull());
+ QCOMPARE(navigator.currentIndex(), -1);
+}
+
+void tst_QMediaPlaylistNavigator::setPlaylist()
+{
+ QMediaPlaylistNavigator navigator(0);
+ QVERIFY(navigator.playlist() != 0);
+ QCOMPARE(navigator.playlist()->mediaCount(), 0);
+ QCOMPARE(navigator.playlist()->media(0), QMediaContent());
+ QVERIFY(navigator.playlist()->isReadOnly() );
+
+ QLocalMediaPlaylistProvider playlist;
+ QCOMPARE(playlist.mediaCount(), 0);
+
+ navigator.setPlaylist(&playlist);
+ QCOMPARE(navigator.playlist(), (QMediaPlaylistProvider*)&playlist);
+ QCOMPARE(navigator.playlist()->mediaCount(), 0);
+ QVERIFY(!navigator.playlist()->isReadOnly() );
+}
+
+void tst_QMediaPlaylistNavigator::linearPlayback()
+{
+ QLocalMediaPlaylistProvider playlist;
+ QMediaPlaylistNavigator navigator(&playlist);
+
+ navigator.setPlaybackMode(QMediaPlaylist::Linear);
+ QTest::ignoreMessage(QtWarningMsg, "QMediaPlaylistNavigator: Jump outside playlist range ");
+ navigator.jump(0);//it's ok to have warning here
+ QVERIFY(navigator.currentItem().isNull());
+ QCOMPARE(navigator.currentIndex(), -1);
+
+ QMediaContent content1(QUrl(QLatin1String("file:///1")));
+ playlist.addMedia(content1);
+ navigator.jump(0);
+ QVERIFY(!navigator.currentItem().isNull());
+
+ QCOMPARE(navigator.currentIndex(), 0);
+ QCOMPARE(navigator.currentItem(), content1);
+ QCOMPARE(navigator.nextItem(), QMediaContent());
+ QCOMPARE(navigator.nextItem(2), QMediaContent());
+ QCOMPARE(navigator.previousItem(), QMediaContent());
+ QCOMPARE(navigator.previousItem(2), QMediaContent());
+
+ QMediaContent content2(QUrl(QLatin1String("file:///2")));
+ playlist.addMedia(content2);
+ QCOMPARE(navigator.currentIndex(), 0);
+ QCOMPARE(navigator.currentItem(), content1);
+ QCOMPARE(navigator.nextItem(), content2);
+ QCOMPARE(navigator.nextItem(2), QMediaContent());
+ QCOMPARE(navigator.previousItem(), QMediaContent());
+ QCOMPARE(navigator.previousItem(2), QMediaContent());
+
+ navigator.jump(1);
+ QCOMPARE(navigator.currentIndex(), 1);
+ QCOMPARE(navigator.currentItem(), content2);
+ QCOMPARE(navigator.nextItem(), QMediaContent());
+ QCOMPARE(navigator.nextItem(2), QMediaContent());
+ QCOMPARE(navigator.previousItem(), content1);
+ QCOMPARE(navigator.previousItem(2), QMediaContent());
+
+ navigator.jump(0);
+ navigator.next();
+ QCOMPARE(navigator.currentIndex(), 1);
+ navigator.next();
+ QCOMPARE(navigator.currentIndex(), -1);
+ navigator.next();//jump to the first item
+ QCOMPARE(navigator.currentIndex(), 0);
+
+ navigator.previous();
+ QCOMPARE(navigator.currentIndex(), -1);
+ navigator.previous();//jump to the last item
+ QCOMPARE(navigator.currentIndex(), 1);
+}
+
+void tst_QMediaPlaylistNavigator::loopPlayback()
+{
+ QLocalMediaPlaylistProvider playlist;
+ QMediaPlaylistNavigator navigator(&playlist);
+
+ navigator.setPlaybackMode(QMediaPlaylist::Loop);
+ QTest::ignoreMessage(QtWarningMsg, "QMediaPlaylistNavigator: Jump outside playlist range ");
+ navigator.jump(0);
+ QVERIFY(navigator.currentItem().isNull());
+ QCOMPARE(navigator.currentIndex(), -1);
+
+ QMediaContent content1(QUrl(QLatin1String("file:///1")));
+ playlist.addMedia(content1);
+ navigator.jump(0);
+ QVERIFY(!navigator.currentItem().isNull());
+
+ QCOMPARE(navigator.currentIndex(), 0);
+ QCOMPARE(navigator.currentItem(), content1);
+ QCOMPARE(navigator.nextItem(), content1);
+ QCOMPARE(navigator.nextItem(2), content1);
+ QCOMPARE(navigator.previousItem(), content1);
+ QCOMPARE(navigator.previousItem(2), content1);
+
+ QMediaContent content2(QUrl(QLatin1String("file:///2")));
+ playlist.addMedia(content2);
+ QCOMPARE(navigator.currentIndex(), 0);
+ QCOMPARE(navigator.currentItem(), content1);
+ QCOMPARE(navigator.nextItem(), content2);
+ QCOMPARE(navigator.nextItem(2), content1); //loop over end of the list
+ QCOMPARE(navigator.previousItem(), content2);
+ QCOMPARE(navigator.previousItem(2), content1);
+
+ navigator.jump(1);
+ QCOMPARE(navigator.currentIndex(), 1);
+ QCOMPARE(navigator.currentItem(), content2);
+ QCOMPARE(navigator.nextItem(), content1);
+ QCOMPARE(navigator.nextItem(2), content2);
+ QCOMPARE(navigator.previousItem(), content1);
+ QCOMPARE(navigator.previousItem(2), content2);
+
+ navigator.jump(0);
+ navigator.next();
+ QCOMPARE(navigator.currentIndex(), 1);
+ navigator.next();
+ QCOMPARE(navigator.currentIndex(), 0);
+ navigator.previous();
+ QCOMPARE(navigator.currentIndex(), 1);
+ navigator.previous();
+ QCOMPARE(navigator.currentIndex(), 0);
+}
+
+void tst_QMediaPlaylistNavigator::currentItemOnce()
+{
+ QLocalMediaPlaylistProvider playlist;
+ QMediaPlaylistNavigator navigator(&playlist);
+
+ navigator.setPlaybackMode(QMediaPlaylist::CurrentItemOnce);
+
+ QCOMPARE(navigator.playbackMode(), QMediaPlaylist::CurrentItemOnce);
+ QCOMPARE(navigator.currentIndex(), -1);
+
+ playlist.addMedia(QMediaContent(QUrl(QLatin1String("file:///1"))));
+ playlist.addMedia(QMediaContent(QUrl(QLatin1String("file:///2"))));
+ playlist.addMedia(QMediaContent(QUrl(QLatin1String("file:///3"))));
+
+ QCOMPARE(navigator.currentIndex(), -1);
+ navigator.next();
+ QCOMPARE(navigator.currentIndex(), -1);
+
+ navigator.jump(1);
+ QCOMPARE(navigator.currentIndex(), 1);
+ navigator.next();
+ QCOMPARE(navigator.currentIndex(), -1);
+ navigator.next();
+ QCOMPARE(navigator.currentIndex(), -1);
+ navigator.previous();
+ QCOMPARE(navigator.currentIndex(), -1);
+ navigator.jump(1);
+ navigator.previous();
+ QCOMPARE(navigator.currentIndex(), -1);
+}
+
+void tst_QMediaPlaylistNavigator::currentItemInLoop()
+{
+ QLocalMediaPlaylistProvider playlist;
+ QMediaPlaylistNavigator navigator(&playlist);
+
+ navigator.setPlaybackMode(QMediaPlaylist::CurrentItemInLoop);
+
+ QCOMPARE(navigator.playbackMode(), QMediaPlaylist::CurrentItemInLoop);
+ QCOMPARE(navigator.currentIndex(), -1);
+
+ playlist.addMedia(QMediaContent(QUrl(QLatin1String("file:///1"))));
+ playlist.addMedia(QMediaContent(QUrl(QLatin1String("file:///2"))));
+ playlist.addMedia(QMediaContent(QUrl(QLatin1String("file:///3"))));
+
+ QCOMPARE(navigator.currentIndex(), -1);
+ navigator.next();
+ QCOMPARE(navigator.currentIndex(), -1);
+ navigator.jump(1);
+ navigator.next();
+ QCOMPARE(navigator.currentIndex(), 1);
+ navigator.next();
+ QCOMPARE(navigator.currentIndex(), 1);
+ navigator.previous();
+ QCOMPARE(navigator.currentIndex(), 1);
+ navigator.previous();
+ QCOMPARE(navigator.currentIndex(), 1);
+}
+
+void tst_QMediaPlaylistNavigator::randomPlayback()
+{
+ QLocalMediaPlaylistProvider playlist;
+ QMediaPlaylistNavigator navigator(&playlist);
+
+ navigator.setPlaybackMode(QMediaPlaylist::Random);
+
+ QCOMPARE(navigator.playbackMode(), QMediaPlaylist::Random);
+ QCOMPARE(navigator.currentIndex(), -1);
+
+ playlist.addMedia(QMediaContent(QUrl(QLatin1String("file:///1"))));
+ playlist.addMedia(QMediaContent(QUrl(QLatin1String("file:///2"))));
+ playlist.addMedia(QMediaContent(QUrl(QLatin1String("file:///3"))));
+
+ playlist.shuffle();
+
+ QCOMPARE(navigator.currentIndex(), -1);
+ navigator.next();
+ int pos1 = navigator.currentIndex();
+ navigator.next();
+ int pos2 = navigator.currentIndex();
+ navigator.next();
+ int pos3 = navigator.currentIndex();
+
+ QVERIFY(pos1 != -1);
+ QVERIFY(pos2 != -1);
+ QVERIFY(pos3 != -1);
+
+ navigator.previous();
+ QCOMPARE(navigator.currentIndex(), pos2);
+ navigator.next();
+ QCOMPARE(navigator.currentIndex(), pos3);
+ navigator.next();
+ int pos4 = navigator.currentIndex();
+ navigator.previous();
+ QCOMPARE(navigator.currentIndex(), pos3);
+ navigator.previous();
+ QCOMPARE(navigator.currentIndex(), pos2);
+ navigator.previous();
+ QCOMPARE(navigator.currentIndex(), pos1);
+ navigator.previous();
+ int pos0 = navigator.currentIndex();
+ QVERIFY(pos0 != -1);
+ navigator.next();
+ navigator.next();
+ navigator.next();
+ navigator.next();
+ QCOMPARE(navigator.currentIndex(), pos4);
+
+}
+
+QTEST_MAIN(tst_QMediaPlaylistNavigator)
+#include "tst_qmediaplaylistnavigator.moc"
diff --git a/tests/auto/qmediapluginloader/qmediapluginloader.pro b/tests/auto/qmediapluginloader/qmediapluginloader.pro
new file mode 100644
index 0000000000..66950e988c
--- /dev/null
+++ b/tests/auto/qmediapluginloader/qmediapluginloader.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+
+SOURCES = tst_qmediapluginloader.cpp
+
+QT = core multimedia
+
diff --git a/tests/auto/qmediapluginloader/tst_qmediapluginloader.cpp b/tests/auto/qmediapluginloader/tst_qmediapluginloader.cpp
new file mode 100644
index 0000000000..0d35b059dc
--- /dev/null
+++ b/tests/auto/qmediapluginloader/tst_qmediapluginloader.cpp
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QDebug>
+
+#include <QtMultimedia/private/qmediapluginloader_p.h>
+#include <QtMultimedia/qmediaserviceproviderplugin.h>
+
+
+
+class tst_QMediaPluginLoader : public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void initTestCase();
+ void cleanupTestCase();
+
+private slots:
+ void testInstance();
+ void testInstances();
+ void testInvalidKey();
+
+private:
+ QMediaPluginLoader *loader;
+};
+
+void tst_QMediaPluginLoader::initTestCase()
+{
+ loader = new QMediaPluginLoader(QMediaServiceProviderFactoryInterface_iid,
+ QLatin1String("/mediaservice"),
+ Qt::CaseInsensitive);
+}
+
+void tst_QMediaPluginLoader::cleanupTestCase()
+{
+ delete loader;
+}
+
+void tst_QMediaPluginLoader::testInstance()
+{
+ const QStringList keys = loader->keys();
+
+ if (keys.isEmpty()) // Test is invalidated, skip.
+ QSKIP("No plug-ins available", SkipAll);
+
+ foreach (const QString &key, keys)
+ QVERIFY(loader->instance(key) != 0);
+}
+
+void tst_QMediaPluginLoader::testInstances()
+{
+ const QStringList keys = loader->keys();
+
+ if (keys.isEmpty()) // Test is invalidated, skip.
+ QSKIP("No plug-ins available", SkipAll);
+
+ foreach (const QString &key, keys)
+ QVERIFY(loader->instances(key).size() > 0);
+}
+
+// Last so as to not interfere with the other tests if there is a failure.
+void tst_QMediaPluginLoader::testInvalidKey()
+{
+ const QString key(QLatin1String("invalid-key"));
+
+ // This test assumes there is no 'invalid-key' in the key list, verify that.
+ if (loader->keys().contains(key))
+ QSKIP("a plug-in includes the invalid key", SkipAll);
+
+ QVERIFY(loader->instance(key) == 0);
+
+ // Test looking up the key hasn't inserted it into the list. See QMap::operator[].
+ QVERIFY(!loader->keys().contains(key));
+
+ QVERIFY(loader->instances(key).isEmpty());
+ QVERIFY(!loader->keys().contains(key));
+}
+
+QTEST_MAIN(tst_QMediaPluginLoader)
+
+#include "tst_qmediapluginloader.moc"
diff --git a/tests/auto/qmediaresource/qmediaresource.pro b/tests/auto/qmediaresource/qmediaresource.pro
new file mode 100644
index 0000000000..c8e3d9cada
--- /dev/null
+++ b/tests/auto/qmediaresource/qmediaresource.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+
+SOURCES = tst_qmediaresource.cpp
+
+QT = core multimedia network
+
diff --git a/tests/auto/qmediaresource/tst_qmediaresource.cpp b/tests/auto/qmediaresource/tst_qmediaresource.cpp
new file mode 100644
index 0000000000..546c4152c7
--- /dev/null
+++ b/tests/auto/qmediaresource/tst_qmediaresource.cpp
@@ -0,0 +1,516 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include <QtMultimedia/qmediaresource.h>
+
+
+class tst_QMediaResource : public QObject
+{
+ Q_OBJECT
+private slots:
+ void constructNull();
+ void construct_data();
+ void construct();
+ void setResolution();
+ void equality();
+ void copy();
+ void assign();
+};
+
+void tst_QMediaResource::constructNull()
+{
+ QMediaResource resource;
+
+ QCOMPARE(resource.isNull(), true);
+ QCOMPARE(resource.url(), QUrl());
+ QCOMPARE(resource.request(), QNetworkRequest());
+ QCOMPARE(resource.mimeType(), QString());
+ QCOMPARE(resource.language(), QString());
+ QCOMPARE(resource.audioCodec(), QString());
+ QCOMPARE(resource.videoCodec(), QString());
+ QCOMPARE(resource.dataSize(), qint64(0));
+ QCOMPARE(resource.audioBitRate(), 0);
+ QCOMPARE(resource.sampleRate(), 0);
+ QCOMPARE(resource.channelCount(), 0);
+ QCOMPARE(resource.videoBitRate(), 0);
+ QCOMPARE(resource.resolution(), QSize());
+}
+
+void tst_QMediaResource::construct_data()
+{
+ QTest::addColumn<QUrl>("url");
+ QTest::addColumn<QNetworkRequest>("request");
+ QTest::addColumn<QString>("mimeType");
+ QTest::addColumn<QString>("language");
+ QTest::addColumn<QString>("audioCodec");
+ QTest::addColumn<QString>("videoCodec");
+ QTest::addColumn<qint64>("dataSize");
+ QTest::addColumn<int>("audioBitRate");
+ QTest::addColumn<int>("sampleRate");
+ QTest::addColumn<int>("channelCount");
+ QTest::addColumn<int>("videoBitRate");
+ QTest::addColumn<QSize>("resolution");
+
+ QTest::newRow("audio content")
+ << QUrl(QString::fromLatin1("http:://test.com/test.mp3"))
+ << QNetworkRequest(QUrl(QString::fromLatin1("http:://test.com/test.mp3")))
+ << QString::fromLatin1("audio/mpeg")
+ << QString::fromLatin1("eng")
+ << QString::fromLatin1("mp3")
+ << QString()
+ << qint64(5465433)
+ << 128000
+ << 44100
+ << 2
+ << 0
+ << QSize();
+ QTest::newRow("image content")
+ << QUrl(QString::fromLatin1("http:://test.com/test.jpg"))
+ << QNetworkRequest(QUrl(QString::fromLatin1("http:://test.com/test.jpg")))
+ << QString::fromLatin1("image/jpeg")
+ << QString()
+ << QString()
+ << QString()
+ << qint64(23600)
+ << 0
+ << 0
+ << 0
+ << 0
+ << QSize(640, 480);
+ QTest::newRow("video content")
+ << QUrl(QString::fromLatin1("http:://test.com/test.mp4"))
+ << QNetworkRequest(QUrl(QString::fromLatin1("http:://test.com/test.mp4")))
+ << QString::fromLatin1("video/mp4")
+ << QString()
+ << QString::fromLatin1("aac")
+ << QString::fromLatin1("h264")
+ << qint64(36245851)
+ << 96000
+ << 44000
+ << 5
+ << 750000
+ << QSize(720, 576);
+ QTest::newRow("thumbnail")
+ << QUrl(QString::fromLatin1("file::///thumbs/test.png"))
+ << QNetworkRequest(QUrl(QString::fromLatin1("file::///thumbs/test.png")))
+ << QString::fromLatin1("image/png")
+ << QString()
+ << QString()
+ << QString()
+ << qint64(2360)
+ << 0
+ << 0
+ << 0
+ << 0
+ << QSize(128, 128);
+}
+
+void tst_QMediaResource::construct()
+{
+ QFETCH(QUrl, url);
+ QFETCH(QNetworkRequest, request);
+ QFETCH(QString, mimeType);
+ QFETCH(QString, language);
+ QFETCH(QString, audioCodec);
+ QFETCH(QString, videoCodec);
+ QFETCH(qint64, dataSize);
+ QFETCH(int, audioBitRate);
+ QFETCH(int, sampleRate);
+ QFETCH(int, channelCount);
+ QFETCH(int, videoBitRate);
+ QFETCH(QSize, resolution);
+
+ {
+ QMediaResource resource(url);
+
+ QCOMPARE(resource.isNull(), false);
+ QCOMPARE(resource.url(), url);
+ QCOMPARE(resource.mimeType(), QString());
+ QCOMPARE(resource.language(), QString());
+ QCOMPARE(resource.audioCodec(), QString());
+ QCOMPARE(resource.videoCodec(), QString());
+ QCOMPARE(resource.dataSize(), qint64(0));
+ QCOMPARE(resource.audioBitRate(), 0);
+ QCOMPARE(resource.sampleRate(), 0);
+ QCOMPARE(resource.channelCount(), 0);
+ QCOMPARE(resource.videoBitRate(), 0);
+ QCOMPARE(resource.resolution(), QSize());
+ }
+ {
+ QMediaResource resource(url, mimeType);
+
+ QCOMPARE(resource.isNull(), false);
+ QCOMPARE(resource.url(), url);
+ QCOMPARE(resource.request(), request);
+ QCOMPARE(resource.mimeType(), mimeType);
+ QCOMPARE(resource.language(), QString());
+ QCOMPARE(resource.audioCodec(), QString());
+ QCOMPARE(resource.videoCodec(), QString());
+ QCOMPARE(resource.dataSize(), qint64(0));
+ QCOMPARE(resource.audioBitRate(), 0);
+ QCOMPARE(resource.sampleRate(), 0);
+ QCOMPARE(resource.channelCount(), 0);
+ QCOMPARE(resource.videoBitRate(), 0);
+ QCOMPARE(resource.resolution(), QSize());
+
+ resource.setLanguage(language);
+ resource.setAudioCodec(audioCodec);
+ resource.setVideoCodec(videoCodec);
+ resource.setDataSize(dataSize);
+ resource.setAudioBitRate(audioBitRate);
+ resource.setSampleRate(sampleRate);
+ resource.setChannelCount(channelCount);
+ resource.setVideoBitRate(videoBitRate);
+ resource.setResolution(resolution);
+
+ QCOMPARE(resource.language(), language);
+ QCOMPARE(resource.audioCodec(), audioCodec);
+ QCOMPARE(resource.videoCodec(), videoCodec);
+ QCOMPARE(resource.dataSize(), dataSize);
+ QCOMPARE(resource.audioBitRate(), audioBitRate);
+ QCOMPARE(resource.sampleRate(), sampleRate);
+ QCOMPARE(resource.channelCount(), channelCount);
+ QCOMPARE(resource.videoBitRate(), videoBitRate);
+ QCOMPARE(resource.resolution(), resolution);
+ }
+ {
+ QMediaResource resource(request, mimeType);
+
+ QCOMPARE(resource.isNull(), false);
+ QCOMPARE(resource.url(), url);
+ QCOMPARE(resource.request(), request);
+ QCOMPARE(resource.mimeType(), mimeType);
+ QCOMPARE(resource.language(), QString());
+ QCOMPARE(resource.audioCodec(), QString());
+ QCOMPARE(resource.videoCodec(), QString());
+ QCOMPARE(resource.dataSize(), qint64(0));
+ QCOMPARE(resource.audioBitRate(), 0);
+ QCOMPARE(resource.sampleRate(), 0);
+ QCOMPARE(resource.channelCount(), 0);
+ QCOMPARE(resource.videoBitRate(), 0);
+ QCOMPARE(resource.resolution(), QSize());
+
+ resource.setLanguage(language);
+ resource.setAudioCodec(audioCodec);
+ resource.setVideoCodec(videoCodec);
+ resource.setDataSize(dataSize);
+ resource.setAudioBitRate(audioBitRate);
+ resource.setSampleRate(sampleRate);
+ resource.setChannelCount(channelCount);
+ resource.setVideoBitRate(videoBitRate);
+ resource.setResolution(resolution);
+
+ QCOMPARE(resource.language(), language);
+ QCOMPARE(resource.audioCodec(), audioCodec);
+ QCOMPARE(resource.videoCodec(), videoCodec);
+ QCOMPARE(resource.dataSize(), dataSize);
+ QCOMPARE(resource.audioBitRate(), audioBitRate);
+ QCOMPARE(resource.sampleRate(), sampleRate);
+ QCOMPARE(resource.channelCount(), channelCount);
+ QCOMPARE(resource.videoBitRate(), videoBitRate);
+ QCOMPARE(resource.resolution(), resolution);
+ }
+}
+
+void tst_QMediaResource::setResolution()
+{
+ QMediaResource resource(
+ QUrl(QString::fromLatin1("file::///thumbs/test.png")),
+ QString::fromLatin1("image/png"));
+
+ QCOMPARE(resource.resolution(), QSize());
+
+ resource.setResolution(QSize(120, 80));
+ QCOMPARE(resource.resolution(), QSize(120, 80));
+
+ resource.setResolution(QSize(-1, 23));
+ QCOMPARE(resource.resolution(), QSize(-1, 23));
+
+ resource.setResolution(QSize(-43, 34));
+ QCOMPARE(resource.resolution(), QSize(-43, 34));
+
+ resource.setResolution(QSize(64, -1));
+ QCOMPARE(resource.resolution(), QSize(64, -1));
+
+ resource.setResolution(QSize(64, -83));
+ QCOMPARE(resource.resolution(), QSize(64, -83));
+
+ resource.setResolution(QSize(-12, -83));
+ QCOMPARE(resource.resolution(), QSize(-12, -83));
+
+ resource.setResolution(QSize());
+ QCOMPARE(resource.resolution(), QSize(-1, -1));
+
+ resource.setResolution(120, 80);
+ QCOMPARE(resource.resolution(), QSize(120, 80));
+
+ resource.setResolution(-1, 23);
+ QCOMPARE(resource.resolution(), QSize(-1, 23));
+
+ resource.setResolution(-43, 34);
+ QCOMPARE(resource.resolution(), QSize(-43, 34));
+
+ resource.setResolution(64, -1);
+ QCOMPARE(resource.resolution(), QSize(64, -1));
+
+ resource.setResolution(64, -83);
+ QCOMPARE(resource.resolution(), QSize(64, -83));
+
+ resource.setResolution(-12, -83);
+ QCOMPARE(resource.resolution(), QSize(-12, -83));
+
+ resource.setResolution(-1, -1);
+ QCOMPARE(resource.resolution(), QSize());
+}
+
+void tst_QMediaResource::equality()
+{
+ QMediaResource resource1(
+ QUrl(QString::fromLatin1("http://test.com/test.mp4")),
+ QString::fromLatin1("video/mp4"));
+ QMediaResource resource2(
+ QUrl(QString::fromLatin1("http://test.com/test.mp4")),
+ QString::fromLatin1("video/mp4"));
+ QMediaResource resource3(
+ QUrl(QString::fromLatin1("file:///thumbs/test.jpg")));
+ QMediaResource resource4(
+ QUrl(QString::fromLatin1("file:///thumbs/test.jpg")));
+ QMediaResource resource5(
+ QUrl(QString::fromLatin1("http://test.com/test.mp3")),
+ QString::fromLatin1("audio/mpeg"));
+
+ QCOMPARE(resource1 == resource2, true);
+ QCOMPARE(resource1 != resource2, false);
+
+ QCOMPARE(resource3 == resource4, true);
+ QCOMPARE(resource3 != resource4, false);
+
+ QCOMPARE(resource1 == resource3, false);
+ QCOMPARE(resource1 != resource3, true);
+
+ QCOMPARE(resource1 == resource5, false);
+ QCOMPARE(resource1 != resource5, true);
+
+ resource1.setAudioCodec(QString::fromLatin1("mp3"));
+ resource2.setAudioCodec(QString::fromLatin1("aac"));
+
+ // Not equal differing audio codecs.
+ QCOMPARE(resource1 == resource2, false);
+ QCOMPARE(resource1 != resource2, true);
+
+ resource1.setAudioCodec(QString::fromLatin1("aac"));
+
+ // Equal.
+ QCOMPARE(resource1 == resource2, true);
+ QCOMPARE(resource1 != resource2, false);
+
+ resource1.setVideoCodec(QString());
+
+ // Equal.
+ QCOMPARE(resource1 == resource2, true);
+ QCOMPARE(resource1 != resource2, false);
+
+ resource1.setVideoCodec(QString::fromLatin1("h264"));
+
+ // Not equal differing video codecs.
+ QCOMPARE(resource1 == resource2, false);
+ QCOMPARE(resource1 != resource2, true);
+
+ resource2.setVideoCodec(QString::fromLatin1("h264"));
+
+ // Equal.
+ QCOMPARE(resource1 == resource2, true);
+ QCOMPARE(resource1 != resource2, false);
+
+ resource2.setDataSize(0);
+
+ // Equal.
+ QCOMPARE(resource1 == resource2, true);
+ QCOMPARE(resource1 != resource2, false);
+
+ resource1.setDataSize(546423);
+
+ // Not equal differing video codecs.
+ QCOMPARE(resource1 == resource2, false);
+ QCOMPARE(resource1 != resource2, true);
+
+ resource2.setDataSize(546423);
+
+ // Equal.
+ QCOMPARE(resource1 == resource2, true);
+ QCOMPARE(resource1 != resource2, false);
+
+ resource1.setAudioBitRate(96000);
+ resource1.setSampleRate(48000);
+ resource2.setSampleRate(44100);
+ resource1.setChannelCount(0);
+ resource1.setVideoBitRate(900000);
+ resource2.setLanguage(QString::fromLatin1("eng"));
+
+ // Not equal, audio bit rate, sample rate, video bit rate, and
+ // language.
+ QCOMPARE(resource1 == resource2, false);
+ QCOMPARE(resource1 != resource2, true);
+
+ resource2.setAudioBitRate(96000);
+ resource1.setSampleRate(44100);
+
+ // Not equal, differing video bit rate, and language.
+ QCOMPARE(resource1 == resource2, false);
+ QCOMPARE(resource1 != resource2, true);
+
+ resource2.setVideoBitRate(900000);
+ resource1.setLanguage(QString::fromLatin1("eng"));
+
+ // Equal
+ QCOMPARE(resource1 == resource2, true);
+ QCOMPARE(resource1 != resource2, false);
+
+ resource1.setResolution(QSize());
+
+ // Equal
+ QCOMPARE(resource1 == resource2, true);
+ QCOMPARE(resource1 != resource2, false);
+
+ resource2.setResolution(-1, -1);
+
+ // Equal
+ QCOMPARE(resource1 == resource2, true);
+ QCOMPARE(resource1 != resource2, false);
+
+ resource1.setResolution(QSize(-640, -480));
+
+ // Not equal, differing resolution.
+ QCOMPARE(resource1 == resource2, false);
+ QCOMPARE(resource1 != resource2, true);
+ resource1.setResolution(QSize(640, 480));
+ resource2.setResolution(QSize(800, 600));
+
+ // Not equal, differing resolution.
+ QCOMPARE(resource1 == resource2, false);
+ QCOMPARE(resource1 != resource2, true);
+
+ resource1.setResolution(800, 600);
+
+ // Equal
+ QCOMPARE(resource1 == resource2, true);
+ QCOMPARE(resource1 != resource2, false);
+}
+
+void tst_QMediaResource::copy()
+{
+ const QUrl url(QString::fromLatin1("http://test.com/test.mp4"));
+ const QString mimeType(QLatin1String("video/mp4"));
+ const QString amrCodec(QLatin1String("amr"));
+ const QString mp3Codec(QLatin1String("mp3"));
+ const QString aacCodec(QLatin1String("aac"));
+ const QString h264Codec(QLatin1String("h264"));
+
+ QMediaResource original(url, mimeType);
+ original.setAudioCodec(amrCodec);
+
+ QMediaResource copy(original);
+
+ QCOMPARE(copy.url(), url);
+ QCOMPARE(copy.mimeType(), mimeType);
+ QCOMPARE(copy.audioCodec(), amrCodec);
+
+ QCOMPARE(original == copy, true);
+ QCOMPARE(original != copy, false);
+
+ original.setAudioCodec(mp3Codec);
+
+ QCOMPARE(copy.audioCodec(), amrCodec);
+ QCOMPARE(original == copy, false);
+ QCOMPARE(original != copy, true);
+
+ copy.setAudioCodec(aacCodec);
+ copy.setVideoCodec(h264Codec);
+
+ QCOMPARE(copy.url(), url);
+ QCOMPARE(copy.mimeType(), mimeType);
+
+ QCOMPARE(original.audioCodec(), mp3Codec);
+}
+
+void tst_QMediaResource::assign()
+{
+ const QUrl url(QString::fromLatin1("http://test.com/test.mp4"));
+ const QString mimeType(QLatin1String("video/mp4"));
+ const QString amrCodec(QLatin1String("amr"));
+ const QString mp3Codec(QLatin1String("mp3"));
+ const QString aacCodec(QLatin1String("aac"));
+ const QString h264Codec(QLatin1String("h264"));
+
+ QMediaResource copy(QUrl(QString::fromLatin1("file:///thumbs/test.jpg")));
+
+ QMediaResource original(url, mimeType);
+ original.setAudioCodec(amrCodec);
+
+ copy = original;
+
+ QCOMPARE(copy.url(), url);
+ QCOMPARE(copy.mimeType(), mimeType);
+ QCOMPARE(copy.audioCodec(), amrCodec);
+
+ QCOMPARE(original == copy, true);
+ QCOMPARE(original != copy, false);
+
+ original.setAudioCodec(mp3Codec);
+
+ QCOMPARE(copy.audioCodec(), amrCodec);
+ QCOMPARE(original == copy, false);
+ QCOMPARE(original != copy, true);
+
+ copy.setAudioCodec(aacCodec);
+ copy.setVideoCodec(h264Codec);
+
+ QCOMPARE(copy.url(), url);
+ QCOMPARE(copy.mimeType(), mimeType);
+
+ QCOMPARE(original.audioCodec(), mp3Codec);
+}
+
+QTEST_MAIN(tst_QMediaResource)
+
+#include "tst_qmediaresource.moc"
diff --git a/tests/auto/qmediaservice/qmediaservice.pro b/tests/auto/qmediaservice/qmediaservice.pro
new file mode 100644
index 0000000000..f87766569e
--- /dev/null
+++ b/tests/auto/qmediaservice/qmediaservice.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+
+SOURCES = tst_qmediaservice.cpp
+
+QT = core gui multimedia
+
diff --git a/tests/auto/qmediaservice/tst_qmediaservice.cpp b/tests/auto/qmediaservice/tst_qmediaservice.cpp
new file mode 100644
index 0000000000..a0cb69d623
--- /dev/null
+++ b/tests/auto/qmediaservice/tst_qmediaservice.cpp
@@ -0,0 +1,219 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include <QtMultimedia/qvideodevicecontrol.h>
+#include <QtMultimedia/qmediacontrol.h>
+#include <QtMultimedia/qmediaservice.h>
+
+#include <QtGui/qapplication.h>
+#include <QtGui/qstyle.h>
+
+class QtTestMediaService;
+
+
+class tst_QMediaService : public QObject
+{
+ Q_OBJECT
+private slots:
+ void initTestCase();
+
+ void control_iid();
+ void control();
+};
+
+
+class QtTestMediaControlA : public QMediaControl
+{
+ Q_OBJECT
+};
+
+
+#define QtTestMediaControlA_iid "com.nokia.QtTestMediaControlA"
+QT_BEGIN_NAMESPACE
+Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlA, QtTestMediaControlA_iid)
+QT_END_NAMESPACE
+
+
+class QtTestMediaControlB : public QMediaControl
+{
+ Q_OBJECT
+};
+
+#define QtTestMediaControlB_iid "com.nokia.QtTestMediaControlB"
+QT_BEGIN_NAMESPACE
+Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlB, QtTestMediaControlB_iid)
+QT_END_NAMESPACE
+
+
+class QtTestMediaControlC : public QMediaControl
+{
+ Q_OBJECT
+};
+
+#define QtTestMediaControlC_iid "com.nokia.QtTestMediaControlC"
+QT_BEGIN_NAMESPACE
+Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlC, QtTestMediaControlA_iid) // Yes A.
+QT_END_NAMESPACE
+
+class QtTestMediaControlD : public QMediaControl
+{
+ Q_OBJECT
+};
+
+#define QtTestMediaControlD_iid "com.nokia.QtTestMediaControlD"
+QT_BEGIN_NAMESPACE
+Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlD, QtTestMediaControlD_iid)
+QT_END_NAMESPACE
+
+class QtTestMediaControlE : public QMediaControl
+{
+ Q_OBJECT
+};
+
+struct QtTestDevice
+{
+ QtTestDevice() {}
+ QtTestDevice(const QString &name, const QString &description, const QIcon &icon)
+ : name(name), description(description), icon(icon)
+ {
+ }
+
+ QString name;
+ QString description;
+ QIcon icon;
+};
+
+class QtTestVideoDeviceControl : public QVideoDeviceControl
+{
+public:
+ QtTestVideoDeviceControl(QObject *parent = 0)
+ : QVideoDeviceControl(parent)
+ , m_selectedDevice(-1)
+ , m_defaultDevice(-1)
+ {
+ }
+
+ int deviceCount() const { return devices.count(); }
+
+ QString deviceName(int index) const { return devices.value(index).name; }
+ QString deviceDescription(int index) const { return devices.value(index).description; }
+ QIcon deviceIcon(int index) const { return devices.value(index).icon; }
+
+ int defaultDevice() const { return m_defaultDevice; }
+ void setDefaultDevice(int index) { m_defaultDevice = index; }
+
+ int selectedDevice() const { return m_selectedDevice; }
+ void setSelectedDevice(int index)
+ {
+ emit selectedDeviceChanged(m_selectedDevice = index);
+ emit selectedDeviceChanged(devices.value(index).name);
+ }
+
+ QList<QtTestDevice> devices;
+
+private:
+ int m_selectedDevice;
+ int m_defaultDevice;
+};
+
+class QtTestMediaService : public QMediaService
+{
+ Q_OBJECT
+public:
+ QtTestMediaService()
+ : QMediaService(0)
+ , hasDeviceControls(false)
+ {
+ }
+
+ QMediaControl* control(const char *name) const
+ {
+ if (strcmp(name, QtTestMediaControlA_iid) == 0)
+ return const_cast<QtTestMediaControlA *>(&controlA);
+ else if (strcmp(name, QtTestMediaControlB_iid) == 0)
+ return const_cast<QtTestMediaControlB *>(&controlB);
+ else if (strcmp(name, QtTestMediaControlC_iid) == 0)
+ return const_cast<QtTestMediaControlC *>(&controlC);
+ else if (hasDeviceControls && strcmp(name, QVideoDeviceControl_iid) == 0)
+ return const_cast<QtTestVideoDeviceControl *>(&videoDeviceControl);
+ else
+ return 0;
+ }
+
+ using QMediaService::control;
+
+ QtTestMediaControlA controlA;
+ QtTestMediaControlB controlB;
+ QtTestMediaControlC controlC;
+ QtTestVideoDeviceControl videoDeviceControl;
+ bool hasDeviceControls;
+};
+
+void tst_QMediaService::initTestCase()
+{
+}
+
+void tst_QMediaService::control_iid()
+{
+ const char *nullString = 0;
+
+ // Default implementation.
+ QCOMPARE(qmediacontrol_iid<QtTestMediaControlE *>(), nullString);
+
+ // Partial template.
+ QVERIFY(qstrcmp(qmediacontrol_iid<QtTestMediaControlA *>(), QtTestMediaControlA_iid) == 0);
+}
+
+void tst_QMediaService::control()
+{
+ QtTestMediaService service;
+
+ QCOMPARE(service.control<QtTestMediaControlA *>(), &service.controlA);
+ QCOMPARE(service.control<QtTestMediaControlB *>(), &service.controlB);
+ QVERIFY(!service.control<QtTestMediaControlC *>()); // Faulty implementation returns A.
+ QVERIFY(!service.control<QtTestMediaControlD *>()); // No control of that type.
+}
+
+QTEST_MAIN(tst_QMediaService)
+
+#include "tst_qmediaservice.moc"
diff --git a/tests/auto/qmediaserviceprovider/qmediaserviceprovider.pro b/tests/auto/qmediaserviceprovider/qmediaserviceprovider.pro
new file mode 100644
index 0000000000..9aaa9e5d2d
--- /dev/null
+++ b/tests/auto/qmediaserviceprovider/qmediaserviceprovider.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+
+SOURCES = tst_qmediaserviceprovider.cpp
+
+QT = core gui multimedia
+
diff --git a/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp b/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp
new file mode 100644
index 0000000000..06a8f603e3
--- /dev/null
+++ b/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp
@@ -0,0 +1,481 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QDebug>
+#include <QStringList>
+
+#include <QtMultimedia/qmediaserviceprovider.h>
+#include <QtMultimedia/qmediaserviceproviderplugin.h>
+#include <QtMultimedia/private/qmediapluginloader_p.h>
+#include <QtMultimedia/qmediaobject.h>
+#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/qmediaplayer.h>
+
+class MockMediaService : public QMediaService
+{
+ Q_OBJECT
+public:
+ MockMediaService(const QString& name, QObject *parent = 0) : QMediaService(parent)
+ { setObjectName(name); }
+ ~MockMediaService() {}
+
+ QMediaControl* control(const char *) const {return 0;}
+};
+
+class MockServicePlugin1 : public QMediaServiceProviderPlugin,
+ public QMediaServiceSupportedFormatsInterface,
+ public QMediaServiceSupportedDevicesInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QMediaServiceSupportedFormatsInterface)
+ Q_INTERFACES(QMediaServiceSupportedDevicesInterface)
+public:
+ QStringList keys() const
+ {
+ return QStringList() <<
+ QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER);
+ }
+
+ QMediaService* create(QString const& key)
+ {
+ if (keys().contains(key))
+ return new MockMediaService("MockServicePlugin1");
+ else
+ return 0;
+ }
+
+ void release(QMediaService *service)
+ {
+ delete service;
+ }
+
+ QtMultimedia::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const
+ {
+ if (codecs.contains(QLatin1String("mpeg4")))
+ return QtMultimedia::NotSupported;
+
+ if (mimeType == "audio/ogg") {
+ return QtMultimedia::ProbablySupported;
+ }
+
+ return QtMultimedia::MaybeSupported;
+ }
+
+ QStringList supportedMimeTypes() const
+ {
+ return QStringList("audio/ogg");
+ }
+
+ QList<QByteArray> devices(const QByteArray &service) const
+ {
+ Q_UNUSED(service);
+ QList<QByteArray> res;
+ return res;
+ }
+
+ QString deviceDescription(const QByteArray &service, const QByteArray &device)
+ {
+ if (devices(service).contains(device))
+ return QString(device)+" description";
+ else
+ return QString();
+ }
+};
+
+class MockServicePlugin2 : public QMediaServiceProviderPlugin,
+ public QMediaServiceSupportedFormatsInterface,
+ public QMediaServiceFeaturesInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QMediaServiceSupportedFormatsInterface)
+ Q_INTERFACES(QMediaServiceFeaturesInterface)
+public:
+ QStringList keys() const
+ {
+ return QStringList() << QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER);
+ }
+
+ QMediaService* create(QString const& key)
+ {
+ if (keys().contains(key))
+ return new MockMediaService("MockServicePlugin2");
+ else
+ return 0;
+ }
+
+ void release(QMediaService *service)
+ {
+ delete service;
+ }
+
+ QtMultimedia::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const
+ {
+ Q_UNUSED(codecs);
+
+ if (mimeType == "audio/wav")
+ return QtMultimedia::PreferredService;
+
+ return QtMultimedia::NotSupported;
+ }
+
+ QStringList supportedMimeTypes() const
+ {
+ return QStringList("audio/wav");
+ }
+
+ QMediaServiceProviderHint::Features supportedFeatures(const QByteArray &service) const
+ {
+ if (service == QByteArray(Q_MEDIASERVICE_MEDIAPLAYER))
+ return QMediaServiceProviderHint::LowLatencyPlayback;
+ else
+ return 0;
+ }
+};
+
+
+class MockServicePlugin3 : public QMediaServiceProviderPlugin,
+ public QMediaServiceSupportedDevicesInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QMediaServiceSupportedDevicesInterface)
+public:
+ QStringList keys() const
+ {
+ return QStringList() <<
+ QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER);
+ }
+
+ QMediaService* create(QString const& key)
+ {
+ if (keys().contains(key))
+ return new MockMediaService("MockServicePlugin3");
+ else
+ return 0;
+ }
+
+ void release(QMediaService *service)
+ {
+ delete service;
+ }
+
+ QList<QByteArray> devices(const QByteArray &service) const
+ {
+ Q_UNUSED(service);
+ QList<QByteArray> res;
+ return res;
+ }
+
+ QString deviceDescription(const QByteArray &service, const QByteArray &device)
+ {
+ if (devices(service).contains(device))
+ return QString(device)+" description";
+ else
+ return QString();
+ }
+};
+
+class MockServicePlugin4 : public QMediaServiceProviderPlugin,
+ public QMediaServiceSupportedFormatsInterface,
+ public QMediaServiceFeaturesInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QMediaServiceSupportedFormatsInterface)
+ Q_INTERFACES(QMediaServiceFeaturesInterface)
+public:
+ QStringList keys() const
+ {
+ return QStringList() << QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER);
+ }
+
+ QMediaService* create(QString const& key)
+ {
+ if (keys().contains(key))
+ return new MockMediaService("MockServicePlugin4");
+ else
+ return 0;
+ }
+
+ void release(QMediaService *service)
+ {
+ delete service;
+ }
+
+ QtMultimedia::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const
+ {
+ if (codecs.contains(QLatin1String("jpeg2000")))
+ return QtMultimedia::NotSupported;
+
+ if (supportedMimeTypes().contains(mimeType))
+ return QtMultimedia::ProbablySupported;
+
+ return QtMultimedia::MaybeSupported;
+ }
+
+ QStringList supportedMimeTypes() const
+ {
+ return QStringList() << "video/mp4" << "video/quicktime";
+ }
+
+ QMediaServiceProviderHint::Features supportedFeatures(const QByteArray &service) const
+ {
+ if (service == QByteArray(Q_MEDIASERVICE_MEDIAPLAYER))
+ return QMediaServiceProviderHint::StreamPlayback;
+ else
+ return 0;
+ }
+};
+
+
+
+class MockMediaServiceProvider : public QMediaServiceProvider
+{
+ QMediaService* requestService(const QByteArray &type, const QMediaServiceProviderHint &)
+ {
+ Q_UNUSED(type);
+ return 0;
+ }
+
+ void releaseService(QMediaService *service)
+ {
+ Q_UNUSED(service);
+ }
+};
+
+
+class tst_QMediaServiceProvider : public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void initTestCase();
+
+private slots:
+ void testDefaultProviderAvailable();
+ void testObtainService();
+ void testHasSupport();
+ void testSupportedMimeTypes();
+ void testProviderHints();
+
+private:
+ QObjectList plugins;
+};
+
+void tst_QMediaServiceProvider::initTestCase()
+{
+ plugins << new MockServicePlugin1;
+ plugins << new MockServicePlugin2;
+ plugins << new MockServicePlugin3;
+ plugins << new MockServicePlugin4;
+
+ QMediaPluginLoader::setStaticPlugins(QLatin1String("/mediaservices"), plugins);
+}
+
+void tst_QMediaServiceProvider::testDefaultProviderAvailable()
+{
+ // Must always be a default provider available
+ QVERIFY(QMediaServiceProvider::defaultServiceProvider() != 0);
+}
+
+void tst_QMediaServiceProvider::testObtainService()
+{
+ QMediaServiceProvider *provider = QMediaServiceProvider::defaultServiceProvider();
+
+ if (provider == 0)
+ QSKIP("No default provider", SkipSingle);
+
+ QMediaService *service = 0;
+
+ // Player
+ service = provider->requestService(Q_MEDIASERVICE_MEDIAPLAYER);
+ QVERIFY(service != 0);
+ provider->releaseService(service);
+}
+
+void tst_QMediaServiceProvider::testHasSupport()
+{
+ MockMediaServiceProvider mockProvider;
+ QCOMPARE(mockProvider.hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "video/ogv", QStringList()),
+ QtMultimedia::MaybeSupported);
+
+ QMediaServiceProvider *provider = QMediaServiceProvider::defaultServiceProvider();
+
+ if (provider == 0)
+ QSKIP("No default provider", SkipSingle);
+
+ QCOMPARE(provider->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "video/ogv", QStringList()),
+ QtMultimedia::MaybeSupported);
+
+ QCOMPARE(provider->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "audio/ogg", QStringList()),
+ QtMultimedia::ProbablySupported);
+
+ //while the service returns PreferredService, provider should return ProbablySupported
+ QCOMPARE(provider->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "audio/wav", QStringList()),
+ QtMultimedia::ProbablySupported);
+
+ //even while all the plugins with "hasSupport" returned NotSupported,
+ //MockServicePlugin3 has no "hasSupport" interface, so MaybeSupported
+ QCOMPARE(provider->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "video/avi",
+ QStringList() << "mpeg4"),
+ QtMultimedia::MaybeSupported);
+
+ QCOMPARE(provider->hasSupport(QByteArray("non existing service"), "video/ogv", QStringList()),
+ QtMultimedia::NotSupported);
+
+ QCOMPARE(QMediaPlayer::hasSupport("video/ogv"), QtMultimedia::MaybeSupported);
+ QCOMPARE(QMediaPlayer::hasSupport("audio/ogg"), QtMultimedia::ProbablySupported);
+ QCOMPARE(QMediaPlayer::hasSupport("audio/wav"), QtMultimedia::ProbablySupported);
+
+ //test low latency flag support
+ QCOMPARE(QMediaPlayer::hasSupport("audio/wav", QStringList(), QMediaPlayer::LowLatency),
+ QtMultimedia::ProbablySupported);
+ //plugin1 probably supports audio/ogg, it checked because it doesn't provide features iface
+ QCOMPARE(QMediaPlayer::hasSupport("audio/ogg", QStringList(), QMediaPlayer::LowLatency),
+ QtMultimedia::ProbablySupported);
+ //Plugin4 is not checked here, sine it's known not support low latency
+ QCOMPARE(QMediaPlayer::hasSupport("video/quicktime", QStringList(), QMediaPlayer::LowLatency),
+ QtMultimedia::MaybeSupported);
+
+ //test streaming flag support
+ QCOMPARE(QMediaPlayer::hasSupport("video/quicktime", QStringList(), QMediaPlayer::StreamPlayback),
+ QtMultimedia::ProbablySupported);
+ //Plugin2 is not checked here, sine it's known not support streaming
+ QCOMPARE(QMediaPlayer::hasSupport("audio/wav", QStringList(), QMediaPlayer::StreamPlayback),
+ QtMultimedia::MaybeSupported);
+
+ //ensure the correct media player plugin is choosen for mime type
+ QMediaPlayer simplePlayer(0, QMediaPlayer::LowLatency);
+ QCOMPARE(simplePlayer.service()->objectName(), QLatin1String("MockServicePlugin2"));
+
+ QMediaPlayer mediaPlayer;
+ QVERIFY(mediaPlayer.service()->objectName() != QLatin1String("MockServicePlugin2"));
+
+ QMediaPlayer streamPlayer(0, QMediaPlayer::StreamPlayback);
+ QCOMPARE(streamPlayer.service()->objectName(), QLatin1String("MockServicePlugin4"));
+}
+
+void tst_QMediaServiceProvider::testSupportedMimeTypes()
+{
+ QMediaServiceProvider *provider = QMediaServiceProvider::defaultServiceProvider();
+
+ if (provider == 0)
+ QSKIP("No default provider", SkipSingle);
+
+ QVERIFY(provider->supportedMimeTypes(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER)).contains("audio/ogg"));
+ QVERIFY(!provider->supportedMimeTypes(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER)).contains("audio/mp3"));
+}
+
+void tst_QMediaServiceProvider::testProviderHints()
+{
+ {
+ QMediaServiceProviderHint hint;
+ QVERIFY(hint.isNull());
+ QCOMPARE(hint.type(), QMediaServiceProviderHint::Null);
+ QVERIFY(hint.device().isEmpty());
+ QVERIFY(hint.mimeType().isEmpty());
+ QVERIFY(hint.codecs().isEmpty());
+ QCOMPARE(hint.features(), 0);
+ }
+
+ {
+ QByteArray deviceName(QByteArray("testDevice"));
+ QMediaServiceProviderHint hint(deviceName);
+ QVERIFY(!hint.isNull());
+ QCOMPARE(hint.type(), QMediaServiceProviderHint::Device);
+ QCOMPARE(hint.device(), deviceName);
+ QVERIFY(hint.mimeType().isEmpty());
+ QVERIFY(hint.codecs().isEmpty());
+ QCOMPARE(hint.features(), 0);
+ }
+
+ {
+ QMediaServiceProviderHint hint(QMediaServiceProviderHint::LowLatencyPlayback);
+ QVERIFY(!hint.isNull());
+ QCOMPARE(hint.type(), QMediaServiceProviderHint::SupportedFeatures);
+ QVERIFY(hint.device().isEmpty());
+ QVERIFY(hint.mimeType().isEmpty());
+ QVERIFY(hint.codecs().isEmpty());
+ QCOMPARE(hint.features(), QMediaServiceProviderHint::LowLatencyPlayback);
+ }
+
+ {
+ QString mimeType(QLatin1String("video/ogg"));
+ QStringList codecs;
+ codecs << "theora" << "vorbis";
+
+ QMediaServiceProviderHint hint(mimeType,codecs);
+ QVERIFY(!hint.isNull());
+ QCOMPARE(hint.type(), QMediaServiceProviderHint::ContentType);
+ QVERIFY(hint.device().isEmpty());
+ QCOMPARE(hint.mimeType(), mimeType);
+ QCOMPARE(hint.codecs(), codecs);
+
+ QMediaServiceProviderHint hint2(hint);
+
+ QVERIFY(!hint2.isNull());
+ QCOMPARE(hint2.type(), QMediaServiceProviderHint::ContentType);
+ QVERIFY(hint2.device().isEmpty());
+ QCOMPARE(hint2.mimeType(), mimeType);
+ QCOMPARE(hint2.codecs(), codecs);
+
+ QMediaServiceProviderHint hint3;
+ QVERIFY(hint3.isNull());
+ hint3 = hint;
+ QVERIFY(!hint3.isNull());
+ QCOMPARE(hint3.type(), QMediaServiceProviderHint::ContentType);
+ QVERIFY(hint3.device().isEmpty());
+ QCOMPARE(hint3.mimeType(), mimeType);
+ QCOMPARE(hint3.codecs(), codecs);
+
+ QCOMPARE(hint, hint2);
+ QCOMPARE(hint3, hint2);
+
+ QMediaServiceProviderHint hint4(mimeType,codecs);
+ QCOMPARE(hint, hint4);
+
+ QMediaServiceProviderHint hint5(mimeType,QStringList());
+ QVERIFY(hint != hint5);
+ }
+}
+
+QTEST_MAIN(tst_QMediaServiceProvider)
+
+#include "tst_qmediaserviceprovider.moc"
diff --git a/tests/auto/qmediatimerange/qmediatimerange.pro b/tests/auto/qmediatimerange/qmediatimerange.pro
new file mode 100644
index 0000000000..b1b436ed9b
--- /dev/null
+++ b/tests/auto/qmediatimerange/qmediatimerange.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+
+SOURCES = tst_qmediatimerange.cpp
+
+QT = core multimedia
+
diff --git a/tests/auto/qmediatimerange/tst_qmediatimerange.cpp b/tests/auto/qmediatimerange/tst_qmediatimerange.cpp
new file mode 100644
index 0000000000..54de3f1748
--- /dev/null
+++ b/tests/auto/qmediatimerange/tst_qmediatimerange.cpp
@@ -0,0 +1,735 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QtCore/qdebug.h>
+
+#include <QtMultimedia/qmediatimerange.h>
+
+class tst_QMediaTimeRange: public QObject
+{
+ Q_OBJECT
+
+public slots:
+
+private slots:
+ void testCtor();
+ void testGetters();
+ void testAssignment();
+ void testNormalize();
+ void testTranslated();
+ void testEarliestLatest();
+ void testContains();
+ void testAddInterval();
+ void testAddTimeRange();
+ void testRemoveInterval();
+ void testRemoveTimeRange();
+ void testClear();
+ void testComparisons();
+ void testArithmetic();
+};
+
+void tst_QMediaTimeRange::testCtor()
+{
+ // Default Ctor
+ QMediaTimeRange a;
+ QVERIFY(a.isEmpty());
+
+ // (qint, qint) Ctor
+ QMediaTimeRange b(10, 20);
+
+ QVERIFY(!b.isEmpty());
+ QVERIFY(b.isContinuous());
+ QVERIFY(b.earliestTime() == 10);
+ QVERIFY(b.latestTime() == 20);
+
+ // Interval Ctor
+ QMediaTimeRange c(QMediaTimeInterval(30, 40));
+
+ QVERIFY(!c.isEmpty());
+ QVERIFY(c.isContinuous());
+ QVERIFY(c.earliestTime() == 30);
+ QVERIFY(c.latestTime() == 40);
+
+ // Abnormal Interval Ctor
+ QMediaTimeRange d(QMediaTimeInterval(20, 10));
+
+ QVERIFY(d.isEmpty());
+
+ // Copy Ctor
+ QMediaTimeRange e(b);
+
+ QVERIFY(!e.isEmpty());
+ QVERIFY(e.isContinuous());
+ QVERIFY(e.earliestTime() == 10);
+ QVERIFY(e.latestTime() == 20);
+}
+
+void tst_QMediaTimeRange::testGetters()
+{
+ QMediaTimeRange x;
+
+ // isEmpty
+ QVERIFY(x.isEmpty());
+
+ x.addInterval(10, 20);
+
+ // isEmpty + isContinuous
+ QVERIFY(!x.isEmpty());
+ QVERIFY(x.isContinuous());
+
+ x.addInterval(30, 40);
+
+ // isEmpty + isContinuous + intervals + start + end
+ QVERIFY(!x.isEmpty());
+ QVERIFY(!x.isContinuous());
+ QVERIFY(x.intervals().count() == 2);
+ QVERIFY(x.intervals()[0].start() == 10);
+ QVERIFY(x.intervals()[0].end() == 20);
+ QVERIFY(x.intervals()[1].start() == 30);
+ QVERIFY(x.intervals()[1].end() == 40);
+}
+
+void tst_QMediaTimeRange::testAssignment()
+{
+ QMediaTimeRange x;
+
+ // Range Assignment
+ x = QMediaTimeRange(10, 20);
+
+ QVERIFY(!x.isEmpty());
+ QVERIFY(x.isContinuous());
+ QVERIFY(x.earliestTime() == 10);
+ QVERIFY(x.latestTime() == 20);
+
+ // Interval Assignment
+ x = QMediaTimeInterval(30, 40);
+
+ QVERIFY(!x.isEmpty());
+ QVERIFY(x.isContinuous());
+ QVERIFY(x.earliestTime() == 30);
+ QVERIFY(x.latestTime() == 40);
+
+ // Shared Data Check
+ QMediaTimeRange y;
+
+ y = x;
+ y.addInterval(10, 20);
+
+ QVERIFY(!x.isEmpty());
+ QVERIFY(x.isContinuous());
+ QVERIFY(x.earliestTime() == 30);
+ QVERIFY(x.latestTime() == 40);
+}
+
+void tst_QMediaTimeRange::testNormalize()
+{
+ QMediaTimeInterval x(20, 10);
+
+ QVERIFY(!x.isNormal());
+
+ x = x.normalized();
+
+ QVERIFY(x.isNormal());
+ QVERIFY(x.start() == 10);
+ QVERIFY(x.end() == 20);
+}
+
+void tst_QMediaTimeRange::testTranslated()
+{
+ QMediaTimeInterval x(10, 20);
+ x = x.translated(10);
+
+ QVERIFY(x.start() == 20);
+ QVERIFY(x.end() == 30);
+}
+
+void tst_QMediaTimeRange::testEarliestLatest()
+{
+ // Test over a single interval
+ QMediaTimeRange x(30, 40);
+
+ QVERIFY(x.earliestTime() == 30);
+ QVERIFY(x.latestTime() == 40);
+
+ // Test over multiple intervals
+ x.addInterval(50, 60);
+
+ QVERIFY(x.earliestTime() == 30);
+ QVERIFY(x.latestTime() == 60);
+}
+
+void tst_QMediaTimeRange::testContains()
+{
+ // Test over a single interval
+ QMediaTimeRange x(10, 20);
+
+ QVERIFY(!x.isEmpty());
+ QVERIFY(x.isContinuous());
+ QVERIFY(x.contains(15));
+ QVERIFY(x.contains(10));
+ QVERIFY(x.contains(20));
+ QVERIFY(!x.contains(25));
+
+ // Test over multiple intervals
+ x.addInterval(40, 50);
+
+ QVERIFY(!x.isEmpty());
+ QVERIFY(!x.isContinuous());
+ QVERIFY(x.contains(15));
+ QVERIFY(x.contains(45));
+ QVERIFY(!x.contains(30));
+
+ // Test over a concrete interval
+ QMediaTimeInterval y(10, 20);
+ QVERIFY(y.contains(15));
+ QVERIFY(y.contains(10));
+ QVERIFY(y.contains(20));
+ QVERIFY(!y.contains(25));
+}
+
+void tst_QMediaTimeRange::testAddInterval()
+{
+ // All intervals Overlap
+ QMediaTimeRange x;
+ x.addInterval(10, 40);
+ x.addInterval(30, 50);
+ x.addInterval(20, 60);
+
+ QVERIFY(!x.isEmpty());
+ QVERIFY(x.isContinuous());
+ QVERIFY(x.earliestTime() == 10);
+ QVERIFY(x.latestTime() == 60);
+
+ // 1 adjacent interval, 1 encompassed interval
+ x = QMediaTimeRange();
+ x.addInterval(10, 40);
+ x.addInterval(20, 30);
+ x.addInterval(41, 50);
+
+ QVERIFY(!x.isEmpty());
+ QVERIFY(x.isContinuous());
+ QVERIFY(x.earliestTime() == 10);
+ QVERIFY(x.latestTime() == 50);
+
+ // 1 overlapping interval, 1 disjoint interval
+ x = QMediaTimeRange();
+ x.addInterval(10, 30);
+ x.addInterval(20, 40);
+ x.addInterval(50, 60);
+
+ QVERIFY(!x.isEmpty());
+ QVERIFY(!x.isContinuous());
+ QVERIFY(x.intervals().count() == 2);
+ QVERIFY(x.intervals()[0].start() == 10);
+ QVERIFY(x.intervals()[0].end() == 40);
+ QVERIFY(x.intervals()[1].start() == 50);
+ QVERIFY(x.intervals()[1].end() == 60);
+
+ // Identical Add
+ x = QMediaTimeRange();
+ x.addInterval(10, 20);
+ x.addInterval(10, 20);
+
+ QVERIFY(!x.isEmpty());
+ QVERIFY(x.isContinuous());
+ QVERIFY(x.earliestTime() == 10);
+ QVERIFY(x.latestTime() == 20);
+
+ // Multi-Merge
+ x = QMediaTimeRange();
+ x.addInterval(10, 20);
+ x.addInterval(30, 40);
+ x.addInterval(50, 60);
+ x.addInterval(15, 55);
+
+ QVERIFY(!x.isEmpty());
+ QVERIFY(x.isContinuous());
+ QVERIFY(x.earliestTime() == 10);
+ QVERIFY(x.latestTime() == 60);
+
+ // Interval Parameter - All intervals Overlap
+ x = QMediaTimeRange();
+ x.addInterval(QMediaTimeInterval(10, 40));
+ x.addInterval(QMediaTimeInterval(30, 50));
+ x.addInterval(QMediaTimeInterval(20, 60));
+
+ QVERIFY(!x.isEmpty());
+ QVERIFY(x.isContinuous());
+ QVERIFY(x.earliestTime() == 10);
+ QVERIFY(x.latestTime() == 60);
+
+ // Interval Parameter - Abnormal Interval
+ x = QMediaTimeRange();
+ x.addInterval(QMediaTimeInterval(20, 10));
+
+ QVERIFY(x.isEmpty());
+}
+
+void tst_QMediaTimeRange::testAddTimeRange()
+{
+ // Add Time Range uses Add Interval internally,
+ // so in this test the focus is on combinations of number
+ // of intervals added, rather than the different types of
+ // merges which can occur.
+ QMediaTimeRange a, b;
+
+ // Add Single into Single
+ a = QMediaTimeRange(10, 30);
+ b = QMediaTimeRange(20, 40);
+
+ b.addTimeRange(a);
+
+ QVERIFY(!b.isEmpty());
+ QVERIFY(b.isContinuous());
+ QVERIFY(b.earliestTime() == 10);
+ QVERIFY(b.latestTime() == 40);
+
+ // Add Multiple into Single
+ a = QMediaTimeRange();
+ a.addInterval(10, 30);
+ a.addInterval(40, 60);
+
+ b = QMediaTimeRange(20, 50);
+
+ b.addTimeRange(a);
+
+ QVERIFY(!b.isEmpty());
+ QVERIFY(b.isContinuous());
+ QVERIFY(b.earliestTime() == 10);
+ QVERIFY(b.latestTime() == 60);
+
+ // Add Single into Multiple
+ a = QMediaTimeRange(20, 50);
+
+ b = QMediaTimeRange();
+ b.addInterval(10, 30);
+ b.addInterval(40, 60);
+
+ b.addTimeRange(a);
+
+ QVERIFY(!b.isEmpty());
+ QVERIFY(b.isContinuous());
+ QVERIFY(b.earliestTime() == 10);
+ QVERIFY(b.latestTime() == 60);
+
+ // Add Multiple into Multiple
+ a = QMediaTimeRange();
+ a.addInterval(10, 30);
+ a.addInterval(40, 70);
+ a.addInterval(80, 100);
+
+ b = QMediaTimeRange();
+ b.addInterval(20, 50);
+ b.addInterval(60, 90);
+
+ b.addTimeRange(a);
+
+ QVERIFY(!b.isEmpty());
+ QVERIFY(b.isContinuous());
+ QVERIFY(b.earliestTime() == 10);
+ QVERIFY(b.latestTime() == 100);
+
+ // Add Nothing to Single
+ a = QMediaTimeRange();
+ b = QMediaTimeRange(10, 20);
+
+ b.addTimeRange(a);
+
+ QVERIFY(!b.isEmpty());
+ QVERIFY(b.isContinuous());
+ QVERIFY(b.earliestTime() == 10);
+ QVERIFY(b.latestTime() == 20);
+
+ // Add Single to Nothing
+ a = QMediaTimeRange(10, 20);
+ b = QMediaTimeRange();
+
+ b.addTimeRange(a);
+
+ QVERIFY(!b.isEmpty());
+ QVERIFY(b.isContinuous());
+ QVERIFY(b.earliestTime() == 10);
+ QVERIFY(b.latestTime() == 20);
+
+ // Add Nothing to Nothing
+ a = QMediaTimeRange();
+ b = QMediaTimeRange();
+
+ b.addTimeRange(a);
+
+ QVERIFY(b.isEmpty());
+}
+
+void tst_QMediaTimeRange::testRemoveInterval()
+{
+ // Removing an interval, causing a split
+ QMediaTimeRange x;
+ x.addInterval(10, 50);
+ x.removeInterval(20, 40);
+
+ QVERIFY(!x.isEmpty());
+ QVERIFY(!x.isContinuous());
+ QVERIFY(x.intervals().count() == 2);
+ QVERIFY(x.intervals()[0].start() == 10);
+ QVERIFY(x.intervals()[0].end() == 19);
+ QVERIFY(x.intervals()[1].start() == 41);
+ QVERIFY(x.intervals()[1].end() == 50);
+
+ // Removing an interval, causing a deletion
+ x = QMediaTimeRange();
+ x.addInterval(20, 30);
+ x.removeInterval(10, 40);
+
+ QVERIFY(x.isEmpty());
+
+ // Removing an interval, causing a tail trim
+ x = QMediaTimeRange();
+ x.addInterval(20, 40);
+ x.removeInterval(30, 50);
+
+ QVERIFY(!x.isEmpty());
+ QVERIFY(x.isContinuous());
+ QVERIFY(x.earliestTime() == 20);
+ QVERIFY(x.latestTime() == 29);
+
+ // Removing an interval, causing a head trim
+ x = QMediaTimeRange();
+ x.addInterval(20, 40);
+ x.removeInterval(10, 30);
+
+ QVERIFY(!x.isEmpty());
+ QVERIFY(x.isContinuous());
+ QVERIFY(x.earliestTime() == 31);
+ QVERIFY(x.latestTime() == 40);
+
+ // Identical Remove
+ x = QMediaTimeRange();
+ x.addInterval(10, 20);
+ x.removeInterval(10, 20);
+
+ QVERIFY(x.isEmpty());
+
+ // Multi-Trim
+ x = QMediaTimeRange();
+ x.addInterval(10, 20);
+ x.addInterval(30, 40);
+ x.removeInterval(15, 35);
+
+ QVERIFY(!x.isEmpty());
+ QVERIFY(!x.isContinuous());
+ QVERIFY(x.intervals().count() == 2);
+ QVERIFY(x.intervals()[0].start() == 10);
+ QVERIFY(x.intervals()[0].end() == 14);
+ QVERIFY(x.intervals()[1].start() == 36);
+ QVERIFY(x.intervals()[1].end() == 40);
+
+ // Multi-Delete
+ x = QMediaTimeRange();
+ x.addInterval(10, 20);
+ x.addInterval(30, 40);
+ x.addInterval(50, 60);
+ x.removeInterval(10, 60);
+
+ QVERIFY(x.isEmpty());
+
+ // Interval Parameter - Removing an interval, causing a split
+ x = QMediaTimeRange();
+ x.addInterval(10, 50);
+ x.removeInterval(QMediaTimeInterval(20, 40));
+
+ QVERIFY(!x.isEmpty());
+ QVERIFY(!x.isContinuous());
+ QVERIFY(x.intervals().count() == 2);
+ QVERIFY(x.intervals()[0].start() == 10);
+ QVERIFY(x.intervals()[0].end() == 19);
+ QVERIFY(x.intervals()[1].start() == 41);
+ QVERIFY(x.intervals()[1].end() == 50);
+
+ // Interval Parameter - Abnormal Interval
+ x = QMediaTimeRange();
+ x.addInterval(10, 40);
+ x.removeInterval(QMediaTimeInterval(30, 20));
+
+ QVERIFY(!x.isEmpty());
+ QVERIFY(x.isContinuous());
+ QVERIFY(x.earliestTime() == 10);
+ QVERIFY(x.latestTime() == 40);
+}
+
+void tst_QMediaTimeRange::testRemoveTimeRange()
+{
+ // Remove Time Range uses Remove Interval internally,
+ // so in this test the focus is on combinations of number
+ // of intervals removed, rather than the different types of
+ // deletions which can occur.
+ QMediaTimeRange a, b;
+
+ // Remove Single from Single
+ a = QMediaTimeRange(10, 30);
+ b = QMediaTimeRange(20, 40);
+
+ b.removeTimeRange(a);
+
+ QVERIFY(!b.isEmpty());
+ QVERIFY(b.isContinuous());
+ QVERIFY(b.earliestTime() == 31);
+ QVERIFY(b.latestTime() == 40);
+
+ // Remove Multiple from Single
+ a = QMediaTimeRange();
+ a.addInterval(10, 30);
+ a.addInterval(40, 60);
+
+ b = QMediaTimeRange(20, 50);
+
+ b.removeTimeRange(a);
+
+ QVERIFY(!b.isEmpty());
+ QVERIFY(b.isContinuous());
+ QVERIFY(b.earliestTime() == 31);
+ QVERIFY(b.latestTime() == 39);
+
+ // Remove Single from Multiple
+ a = QMediaTimeRange(20, 50);
+
+ b = QMediaTimeRange();
+ b.addInterval(10, 30);
+ b.addInterval(40, 60);
+
+ b.removeTimeRange(a);
+
+ QVERIFY(!b.isEmpty());
+ QVERIFY(!b.isContinuous());
+ QVERIFY(b.intervals().count() == 2);
+ QVERIFY(b.intervals()[0].start() == 10);
+ QVERIFY(b.intervals()[0].end() == 19);
+ QVERIFY(b.intervals()[1].start() == 51);
+ QVERIFY(b.intervals()[1].end() == 60);
+
+ // Remove Multiple from Multiple
+ a = QMediaTimeRange();
+ a.addInterval(20, 50);
+ a.addInterval(50, 90);
+
+
+ b = QMediaTimeRange();
+ b.addInterval(10, 30);
+ b.addInterval(40, 70);
+ b.addInterval(80, 100);
+
+ b.removeTimeRange(a);
+
+ QVERIFY(!b.isEmpty());
+ QVERIFY(!b.isContinuous());
+ QVERIFY(b.intervals().count() == 2);
+ QVERIFY(b.intervals()[0].start() == 10);
+ QVERIFY(b.intervals()[0].end() == 19);
+ QVERIFY(b.intervals()[1].start() == 91);
+ QVERIFY(b.intervals()[1].end() == 100);
+
+ // Remove Nothing from Single
+ a = QMediaTimeRange();
+ b = QMediaTimeRange(10, 20);
+
+ b.removeTimeRange(a);
+
+ QVERIFY(!b.isEmpty());
+ QVERIFY(b.isContinuous());
+ QVERIFY(b.earliestTime() == 10);
+ QVERIFY(b.latestTime() == 20);
+
+ // Remove Single from Nothing
+ a = QMediaTimeRange(10, 20);
+ b = QMediaTimeRange();
+
+ b.removeTimeRange(a);
+
+ QVERIFY(b.isEmpty());
+
+ // Remove Nothing from Nothing
+ a = QMediaTimeRange();
+ b = QMediaTimeRange();
+
+ b.removeTimeRange(a);
+
+ QVERIFY(b.isEmpty());
+}
+
+void tst_QMediaTimeRange::testClear()
+{
+ QMediaTimeRange x;
+
+ // Clear Nothing
+ x.clear();
+
+ QVERIFY(x.isEmpty());
+
+ // Clear Single
+ x = QMediaTimeRange(10, 20);
+ x.clear();
+
+ QVERIFY(x.isEmpty());
+
+ // Clear Multiple
+ x = QMediaTimeRange();
+ x.addInterval(10, 20);
+ x.addInterval(30, 40);
+ x.clear();
+
+ QVERIFY(x.isEmpty());
+}
+
+void tst_QMediaTimeRange::testComparisons()
+{
+ // Interval equality
+ QVERIFY(QMediaTimeInterval(10, 20) == QMediaTimeInterval(10, 20));
+ QVERIFY(QMediaTimeInterval(10, 20) != QMediaTimeInterval(10, 30));
+ QVERIFY(!(QMediaTimeInterval(10, 20) != QMediaTimeInterval(10, 20)));
+ QVERIFY(!(QMediaTimeInterval(10, 20) == QMediaTimeInterval(10, 30)));
+
+ // Time range equality - Single Interval
+ QMediaTimeRange a(10, 20), b(20, 30), c(10, 20);
+
+ QVERIFY(a == c);
+ QVERIFY(!(a == b));
+ QVERIFY(a != b);
+ QVERIFY(!(a != c));
+
+ // Time Range Equality - Multiple Intervals
+ QMediaTimeRange x, y, z;
+
+ x.addInterval(10, 20);
+ x.addInterval(30, 40);
+ x.addInterval(50, 60);
+
+ y.addInterval(10, 20);
+ y.addInterval(35, 45);
+ y.addInterval(50, 60);
+
+ z.addInterval(10, 20);
+ z.addInterval(30, 40);
+ z.addInterval(50, 60);
+
+ QVERIFY(x == z);
+ QVERIFY(!(x == y));
+ QVERIFY(x != y);
+ QVERIFY(!(x != z));
+}
+
+void tst_QMediaTimeRange::testArithmetic()
+{
+ QMediaTimeRange a(10, 20), b(20, 30);
+
+ // Test +=
+ a += b;
+
+ QVERIFY(a.isContinuous());
+ QVERIFY(a.earliestTime() == 10);
+ QVERIFY(a.latestTime() == 30);
+
+ // Test -=
+ a -= b;
+
+ QVERIFY(a.isContinuous());
+ QVERIFY(a.earliestTime() == 10);
+ QVERIFY(a.latestTime() == 19);
+
+ // Test += and -= on intervals
+ a -= QMediaTimeInterval(10, 20);
+ a += QMediaTimeInterval(40, 50);
+
+ QVERIFY(a.isContinuous());
+ QVERIFY(a.earliestTime() == 40);
+ QVERIFY(a.latestTime() == 50);
+
+ // Test Interval + Interval
+ a = QMediaTimeInterval(10, 20) + QMediaTimeInterval(20, 30);
+ QVERIFY(a.isContinuous());
+ QVERIFY(a.earliestTime() == 10);
+ QVERIFY(a.latestTime() == 30);
+
+ // Test Range + Interval
+ a = a + QMediaTimeInterval(30, 40);
+ QVERIFY(a.isContinuous());
+ QVERIFY(a.earliestTime() == 10);
+ QVERIFY(a.latestTime() == 40);
+
+ // Test Interval + Range
+ a = QMediaTimeInterval(40, 50) + a;
+ QVERIFY(a.isContinuous());
+ QVERIFY(a.earliestTime() == 10);
+ QVERIFY(a.latestTime() == 50);
+
+ // Test Range + Range
+ a = a + QMediaTimeRange(50, 60);
+ QVERIFY(a.isContinuous());
+ QVERIFY(a.earliestTime() == 10);
+ QVERIFY(a.latestTime() == 60);
+
+ // Test Range - Interval
+ a = a - QMediaTimeInterval(50, 60);
+ QVERIFY(a.isContinuous());
+ QVERIFY(a.earliestTime() == 10);
+ QVERIFY(a.latestTime() == 49);
+
+ // Test Range - Range
+ a = a - QMediaTimeRange(40, 50);
+ QVERIFY(a.isContinuous());
+ QVERIFY(a.earliestTime() == 10);
+ QVERIFY(a.latestTime() == 39);
+
+ // Test Interval - Range
+ b = QMediaTimeInterval(0, 20) - a;
+ QVERIFY(b.isContinuous());
+ QVERIFY(b.earliestTime() == 0);
+ QVERIFY(b.latestTime() == 9);
+
+ // Test Interval - Interval
+ a = QMediaTimeInterval(10, 20) - QMediaTimeInterval(15, 30);
+ QVERIFY(a.isContinuous());
+ QVERIFY(a.earliestTime() == 10);
+ QVERIFY(a.latestTime() == 14);
+}
+
+QTEST_MAIN(tst_QMediaTimeRange)
+
+#include "tst_qmediatimerange.moc"
diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp
index 9dc18e0f3f..e10d7ee69a 100644
--- a/tests/auto/qmenu/tst_qmenu.cpp
+++ b/tests/auto/qmenu/tst_qmenu.cpp
@@ -104,6 +104,8 @@ private slots:
void setFixedWidth();
void deleteActionInTriggered();
void pushButtonPopulateOnAboutToShow();
+ void QTBUG7907_submenus_autoselect();
+ void QTBUG7411_submenus_activate();
protected slots:
void onActivated(QAction*);
void onHighlighted(QAction*);
@@ -930,6 +932,41 @@ void tst_QMenu::pushButtonPopulateOnAboutToShow()
QVERIFY(!lastMenu->geometry().intersects(b.geometry()));
}
+void tst_QMenu::QTBUG7907_submenus_autoselect()
+{
+ QMenu menu("Test Menu");
+ QMenu set1("Setting1");
+ QMenu set2("Setting2");
+ QMenu subset("Subsetting");
+ subset.addAction("Values");
+ set1.addMenu(&subset);
+ menu.addMenu(&set1);
+ menu.addMenu(&set2);
+ menu.show();
+ QTest::qWaitForWindowShown(&menu);
+ QTest::mouseClick(&menu, Qt::LeftButton, Qt::NoModifier, QPoint(5,5) );
+ QTest::qWait(500);
+ QVERIFY(!subset.isVisible());
+}
+
+void tst_QMenu::QTBUG7411_submenus_activate()
+{
+ QMenu menu("Test Menu");
+ QAction *act = menu.addAction("foo");
+ QMenu sub1("&sub1");
+ sub1.addAction("foo");
+ sub1.setTitle("&sub1");
+ QAction *act1 = menu.addMenu(&sub1);
+ menu.show();
+ QTest::qWaitForWindowShown(&menu);
+ menu.setActiveAction(act);
+ QTest::keyPress(&menu, Qt::Key_Down);
+ QCOMPARE(menu.activeAction(), act1);
+ QVERIFY(!sub1.isVisible());
+ QTest::keyPress(&menu, Qt::Key_S);
+ QTRY_VERIFY(sub1.isVisible());
+}
+
QTEST_MAIN(tst_QMenu)
diff --git a/tests/auto/qmetaobject/tst_qmetaobject.cpp b/tests/auto/qmetaobject/tst_qmetaobject.cpp
index 286e793ed3..bb4a0d2dd3 100644
--- a/tests/auto/qmetaobject/tst_qmetaobject.cpp
+++ b/tests/auto/qmetaobject/tst_qmetaobject.cpp
@@ -157,6 +157,7 @@ private slots:
void invokeQueuedMetaMember();
void invokeCustomTypes();
void invokeMetaConstructor();
+ void invokeTypedefTypes();
void qtMetaObjectInheritance();
void normalizedSignature_data();
void normalizedSignature();
@@ -513,6 +514,19 @@ void tst_QMetaObject::invokeMetaMember()
QVERIFY(QMetaObject::invokeMethod(&obj, "sig1", Q_RETURN_ARG(QString, exp), Q_ARG(QString, "hehe")));
QCOMPARE(exp, QString("yessir"));
QCOMPARE(obj.slotResult, QString("sl1:hehe"));
+
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::doesNotExist()");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "doesNotExist"));
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl1(QString)(QString)");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "sl1(QString)", Q_ARG(QString, "arg")));
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl3(QString)");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "sl3", Q_ARG(QString, "arg")));
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl1(QString,QString,QString)");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "sl1", Q_ARG(QString, "arg"), Q_ARG(QString, "arg"), Q_ARG(QString, "arg")));
+
+ //should not have changed since last test.
+ QCOMPARE(exp, QString("yessir"));
+ QCOMPARE(obj.slotResult, QString("sl1:hehe"));
}
void tst_QMetaObject::invokeQueuedMetaMember()
@@ -585,6 +599,8 @@ struct MyType
int i1, i2, i3;
};
+typedef QString CustomString;
+
class QtTestCustomObject: public QObject
{
Q_OBJECT
@@ -594,6 +610,9 @@ public:
public slots:
void sl1(MyType myType);
+signals:
+ void sig_custom(const CustomString &string);
+
public:
int sum;
};
@@ -651,6 +670,20 @@ void tst_QMetaObject::invokeMetaConstructor()
}
}
+void tst_QMetaObject::invokeTypedefTypes()
+{
+ qRegisterMetaType<CustomString>("CustomString");
+ QtTestCustomObject obj;
+ QSignalSpy spy(&obj, SIGNAL(sig_custom(CustomString)));
+
+ QCOMPARE(spy.count(), 0);
+ CustomString arg("hello");
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sig_custom", Q_ARG(CustomString, arg)));
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.at(0).count(), 1);
+ QCOMPARE(spy.at(0).at(0), QVariant(arg));
+}
+
void tst_QMetaObject::normalizedSignature_data()
{
QTest::addColumn<QString>("signature");
@@ -664,7 +697,7 @@ void tst_QMetaObject::normalizedSignature_data()
QTest::newRow("const rettype") << "const QString *foo()" << "const QString*foo()";
QTest::newRow("const ref") << "const QString &foo()" << "const QString&foo()";
QTest::newRow("reference") << "QString &foo()" << "QString&foo()";
- QTest::newRow("const2") << "void foo(QString const *)" << "void foo(const QString*)";
+ QTest::newRow("const1") << "void foo(QString const *)" << "void foo(const QString*)";
QTest::newRow("const2") << "void foo(QString * const)" << "void foo(QString*const)";
QTest::newRow("const3") << "void foo(QString const &)" << "void foo(QString)";
QTest::newRow("const4") << "void foo(const int)" << "void foo(int)";
@@ -672,7 +705,7 @@ void tst_QMetaObject::normalizedSignature_data()
<< "void foo(int,int,int,int)";
QTest::newRow("const6") << "void foo(QList<const int>)" << "void foo(QList<const int>)";
QTest::newRow("const7") << "void foo(QList<const int*>)" << "void foo(QList<const int*>)";
- QTest::newRow("const7") << "void foo(QList<int const*>)" << "void foo(QList<const int*>)";
+ QTest::newRow("const8") << "void foo(QList<int const*>)" << "void foo(QList<const int*>)";
}
void tst_QMetaObject::normalizedSignature()
diff --git a/tests/auto/qmetatype/tst_qmetatype.cpp b/tests/auto/qmetatype/tst_qmetatype.cpp
index 943b05b3ca..f4e122f3c4 100644
--- a/tests/auto/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/qmetatype/tst_qmetatype.cpp
@@ -241,6 +241,9 @@ void tst_QMetaType::construct()
QMetaType::destroy(QMetaType::QSize, size);
}
+typedef QString CustomString;
+Q_DECLARE_METATYPE(CustomString) //this line is useless
+
void tst_QMetaType::typedefs()
{
QCOMPARE(QMetaType::type("long long"), int(QMetaType::LongLong));
@@ -256,6 +259,13 @@ void tst_QMetaType::typedefs()
// make sure the qreal typeId is the type id of the type it's defined to
QCOMPARE(QMetaType::type("qreal"), ::qMetaTypeId<qreal>());
+
+ qRegisterMetaType<CustomString>("CustomString");
+ QCOMPARE(QMetaType::type("CustomString"), ::qMetaTypeId<CustomString>());
+
+ typedef Whity<double> WhityDouble;
+ qRegisterMetaType<WhityDouble>("WhityDouble");
+ QCOMPARE(QMetaType::type("WhityDouble"), ::qMetaTypeId<WhityDouble>());
}
class IsRegisteredDummyType { };
@@ -286,9 +296,9 @@ void tst_QMetaType::isRegistered()
QCOMPARE(QMetaType::isRegistered(typeId), registered);
}
-class RegUnreg
+class RegUnreg
{
-public:
+public:
RegUnreg() {};
RegUnreg(const RegUnreg &) {};
~RegUnreg() {};
diff --git a/tests/auto/qnetworkconfigmanager/qnetworkconfigmanager.pro b/tests/auto/qnetworkconfigmanager/qnetworkconfigmanager.pro
new file mode 100644
index 0000000000..30eb5f05cf
--- /dev/null
+++ b/tests/auto/qnetworkconfigmanager/qnetworkconfigmanager.pro
@@ -0,0 +1,15 @@
+load(qttest_p4)
+SOURCES += tst_qnetworkconfigmanager.cpp
+HEADERS += ../qbearertestcommon.h
+
+QT = core network
+
+symbian {
+ TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData
+}
+
+maemo6 {
+ CONFIG += link_pkgconfig
+
+ PKGCONFIG += conninet
+}
diff --git a/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp b/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp
new file mode 100644
index 0000000000..305233094f
--- /dev/null
+++ b/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp
@@ -0,0 +1,335 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include "../qbearertestcommon.h"
+#include "qnetworkconfiguration.h"
+#include "qnetworkconfigmanager.h"
+
+#ifdef Q_WS_MAEMO_6
+#include <stdio.h>
+#include <iapconf.h>
+#endif
+
+QT_USE_NAMESPACE
+class tst_QNetworkConfigurationManager : public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+private slots:
+ void allConfigurations();
+ void defaultConfiguration();
+ void configurationFromIdentifier();
+
+private:
+#ifdef Q_WS_MAEMO_6
+ Maemo::IAPConf *iapconf;
+ Maemo::IAPConf *iapconf2;
+ Maemo::IAPConf *gprsiap;
+#define MAX_IAPS 50
+ Maemo::IAPConf *iaps[MAX_IAPS];
+ QProcess *icd_stub;
+#endif
+};
+
+void tst_QNetworkConfigurationManager::initTestCase()
+{
+#ifdef Q_WS_MAEMO_6
+ iapconf = new Maemo::IAPConf("007");
+ iapconf->setValue("ipv4_type", "AUTO");
+ iapconf->setValue("wlan_wepkey1", "connt");
+ iapconf->setValue("wlan_wepdefkey", 1);
+ iapconf->setValue("wlan_ssid", QByteArray("JamesBond"));
+ iapconf->setValue("name", "James Bond");
+ iapconf->setValue("type", "WLAN_INFRA");
+
+ gprsiap = new Maemo::IAPConf("This-is-GPRS-IAP");
+ gprsiap->setValue("ask_password", false);
+ gprsiap->setValue("gprs_accesspointname", "internet");
+ gprsiap->setValue("gprs_password", "");
+ gprsiap->setValue("gprs_username", "");
+ gprsiap->setValue("ipv4_autodns", true);
+ gprsiap->setValue("ipv4_type", "AUTO");
+ gprsiap->setValue("sim_imsi", "244070123456789");
+ gprsiap->setValue("name", "MI6");
+ gprsiap->setValue("type", "GPRS");
+
+ iapconf2 = new Maemo::IAPConf("osso.net");
+ iapconf2->setValue("ipv4_type", "AUTO");
+ iapconf2->setValue("wlan_wepkey1", "osso.net");
+ iapconf2->setValue("wlan_wepdefkey", 1);
+ iapconf2->setValue("wlan_ssid", QByteArray("osso.net"));
+ iapconf2->setValue("name", "osso.net");
+ iapconf2->setValue("type", "WLAN_INFRA");
+ iapconf2->setValue("wlan_security", "WEP");
+
+ /* Create large number of IAPs in the gconf and see what happens */
+ fflush(stdout);
+ printf("Creating %d IAPS: ", MAX_IAPS);
+ for (int i=0; i<MAX_IAPS; i++) {
+ QString num = QString().sprintf("%d", i);
+ QString iap = "iap-" + num;
+ iaps[i] = new Maemo::IAPConf(iap);
+ iaps[i]->setValue("name", QString("test-iap-")+num);
+ iaps[i]->setValue("type", "WLAN_INFRA");
+ iaps[i]->setValue("wlan_ssid", QString(QString("test-ssid-")+num).toAscii());
+ iaps[i]->setValue("wlan_security", "WPA_PSK");
+ iaps[i]->setValue("EAP_wpa_preshared_passphrase", QString("test-passphrase-")+num);
+ printf(".");
+ fflush(stdout);
+ }
+ printf("\n");
+ fflush(stdout);
+
+ icd_stub = new QProcess(this);
+ icd_stub->start("/usr/bin/icd2_stub.py");
+ QTest::qWait(1000);
+
+ // Add a known network to scan list that icd2 stub returns
+ QProcess dbus_send;
+ // 007 network
+ dbus_send.start("dbus-send --type=method_call --system "
+ "--dest=com.nokia.icd2 /com/nokia/icd2 "
+ "com.nokia.icd2.testing.add_available_network "
+ "string:'' uint32:0 string:'' "
+ "string:WLAN_INFRA uint32:5000011 array:byte:48,48,55");
+ dbus_send.waitForFinished();
+
+ // osso.net network
+ dbus_send.start("dbus-send --type=method_call --system "
+ "--dest=com.nokia.icd2 /com/nokia/icd2 "
+ "com.nokia.icd2.testing.add_available_network "
+ "string:'' uint32:0 string:'' "
+ "string:WLAN_INFRA uint32:83886097 array:byte:111,115,115,111,46,110,101,116");
+ dbus_send.waitForFinished();
+#endif
+}
+
+
+void tst_QNetworkConfigurationManager::cleanupTestCase()
+{
+#ifdef Q_WS_MAEMO_6
+ iapconf->clear();
+ delete iapconf;
+ iapconf2->clear();
+ delete iapconf2;
+ gprsiap->clear();
+ delete gprsiap;
+
+ printf("Deleting %d IAPS : ", MAX_IAPS);
+ for (int i=0; i<MAX_IAPS; i++) {
+ iaps[i]->clear();
+ delete iaps[i];
+ printf(".");
+ fflush(stdout);
+ }
+ printf("\n");
+ qDebug() << "Deleted" << MAX_IAPS << "IAPs";
+
+ icd_stub->terminate();
+ icd_stub->waitForFinished();
+#endif
+}
+
+void tst_QNetworkConfigurationManager::init()
+{
+}
+
+void tst_QNetworkConfigurationManager::cleanup()
+{
+}
+
+void printConfigurationDetails(const QNetworkConfiguration& p)
+{
+ qDebug() << p.name() <<": isvalid->" <<p.isValid() << " type->"<< p.type() <<
+ " roaming->" << p.isRoamingAvailable() << "identifier->" << p.identifier() <<
+ " purpose->" << p.purpose() << " state->" << p.state();
+}
+
+void tst_QNetworkConfigurationManager::allConfigurations()
+{
+ QNetworkConfigurationManager manager;
+ QList<QNetworkConfiguration> preScanConfigs = manager.allConfigurations();
+
+ foreach(QNetworkConfiguration c, preScanConfigs)
+ {
+ QVERIFY2(c.type()!=QNetworkConfiguration::UserChoice, "allConfiguration must not return UserChoice configs");
+ }
+
+ QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
+ manager.updateConfigurations(); //initiate scans
+ QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
+
+ QList<QNetworkConfiguration> configs = manager.allConfigurations();
+
+ int all = configs.count();
+ qDebug() << "All configurations:" << all;
+ QVERIFY(all);
+ foreach(QNetworkConfiguration p, configs) {
+ QVERIFY(p.isValid());
+ printConfigurationDetails(p);
+ QVERIFY(p.type() != QNetworkConfiguration::Invalid);
+ QVERIFY(p.type() != QNetworkConfiguration::UserChoice);
+ }
+
+ configs = manager.allConfigurations(QNetworkConfiguration::Undefined);
+ int undefined = configs.count();
+ QVERIFY(undefined <= all);
+ qDebug() << "Undefined configurations:" << undefined;
+ foreach( const QNetworkConfiguration p, configs) {
+ printConfigurationDetails(p);
+ QVERIFY(p.state() & QNetworkConfiguration::Undefined);
+ QVERIFY(!(p.state() & QNetworkConfiguration::Defined));
+ }
+
+ //get defined configs only (same as all)
+ configs = manager.allConfigurations(QNetworkConfiguration::Defined);
+ int defined = configs.count();
+ qDebug() << "Defined configurations:" << defined;
+ QVERIFY(defined <= all);
+ foreach( const QNetworkConfiguration p, configs) {
+ printConfigurationDetails(p);
+ QVERIFY(p.state() & QNetworkConfiguration::Defined);
+ QVERIFY(!(p.state() & QNetworkConfiguration::Undefined));
+ }
+
+ //get discovered configurations only
+ configs = manager.allConfigurations(QNetworkConfiguration::Discovered);
+ int discovered = configs.count();
+ //QVERIFY(discovered);
+ qDebug() << "Discovered configurations:" << discovered;
+ foreach(const QNetworkConfiguration p, configs) {
+ printConfigurationDetails(p);
+ QVERIFY(p.isValid());
+ QVERIFY(!(p.state() & QNetworkConfiguration::Undefined));
+ QVERIFY(p.state() & QNetworkConfiguration::Defined);
+ QVERIFY(p.state() & QNetworkConfiguration::Discovered);
+ }
+
+ //getactive configurations only
+ configs = manager.allConfigurations(QNetworkConfiguration::Active);
+ int active = configs.count();
+ if (active)
+ QVERIFY(manager.isOnline());
+ else
+ QVERIFY(!manager.isOnline());
+
+ //QVERIFY(active);
+ qDebug() << "Active configurations:" << active;
+ foreach(const QNetworkConfiguration p, configs) {
+ printConfigurationDetails(p);
+ QVERIFY(p.isValid());
+ QVERIFY(!(p.state() & QNetworkConfiguration::Undefined));
+ QVERIFY(p.state() & QNetworkConfiguration::Active);
+ QVERIFY(p.state() & QNetworkConfiguration::Discovered);
+ QVERIFY(p.state() & QNetworkConfiguration::Defined);
+ }
+
+ QVERIFY(all >= discovered);
+ QVERIFY(discovered >= active);
+}
+
+
+void tst_QNetworkConfigurationManager::defaultConfiguration()
+{
+ QNetworkConfigurationManager manager;
+ QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
+ manager.updateConfigurations(); //initiate scans
+ QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
+
+ QList<QNetworkConfiguration> configs = manager.allConfigurations();
+ QNetworkConfiguration defaultConfig = manager.defaultConfiguration();
+
+ bool confirm = configs.contains(defaultConfig);
+ bool isUserChoice = (defaultConfig.type() == QNetworkConfiguration::UserChoice);
+
+ //user choice config is not part of allConfigurations()
+ QVERIFY(isUserChoice != confirm);
+ if (!isUserChoice) {
+ QVERIFY(confirm || !defaultConfig.isValid());
+ QVERIFY(!(confirm && !defaultConfig.isValid()));
+ } else {
+ QVERIFY(defaultConfig.isValid());
+ QCOMPARE(defaultConfig.name(), QString("UserChoice"));
+ QCOMPARE(defaultConfig.children().count(), 0);
+ QVERIFY(!defaultConfig.isRoamingAvailable());
+ QCOMPARE(defaultConfig.state(), QNetworkConfiguration::Discovered);
+ QNetworkConfiguration copy = manager.configurationFromIdentifier(defaultConfig.identifier());
+ QVERIFY(copy == defaultConfig);
+ }
+}
+
+void tst_QNetworkConfigurationManager::configurationFromIdentifier()
+{
+ QNetworkConfigurationManager manager;
+ QSet<QString> allIdentifier;
+
+ //force an update to get maximum number of configs
+ QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
+ manager.updateConfigurations(); //initiate scans
+ QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
+
+ QList<QNetworkConfiguration> configs = manager.allConfigurations();
+
+ foreach(QNetworkConfiguration c, configs) {
+ QVERIFY(!allIdentifier.contains(c.identifier()));
+ allIdentifier.insert(c.identifier());
+
+ QNetworkConfiguration direct = manager.configurationFromIdentifier(c.identifier());
+ QVERIFY(direct.isValid());
+ QVERIFY(direct == c);
+ }
+
+ //assume that there is no item with identifier 'FooBar'
+ QVERIFY(!allIdentifier.contains("FooBar"));
+ QNetworkConfiguration invalid = manager.configurationFromIdentifier("FooBar");
+ QVERIFY(!invalid.isValid());
+}
+
+
+QTEST_MAIN(tst_QNetworkConfigurationManager)
+#include "tst_qnetworkconfigmanager.moc"
diff --git a/tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro b/tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro
new file mode 100644
index 0000000000..df2d2d926e
--- /dev/null
+++ b/tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro
@@ -0,0 +1,15 @@
+load(qttest_p4)
+SOURCES += tst_qnetworkconfiguration.cpp
+HEADERS += ../qbearertestcommon.h
+
+QT = core network
+
+symbian {
+ TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData
+}
+
+maemo6 {
+ CONFIG += link_pkgconfig
+
+ PKGCONFIG += conninet
+}
diff --git a/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp b/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
new file mode 100644
index 0000000000..70f44478ea
--- /dev/null
+++ b/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
@@ -0,0 +1,303 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include "../qbearertestcommon.h"
+#include "qnetworkconfiguration.h"
+#include "qnetworkconfigmanager.h"
+
+#ifdef Q_WS_MAEMO_6
+#include <stdio.h>
+#include <iapconf.h>
+#endif
+
+QT_USE_NAMESPACE
+class tst_QNetworkConfiguration : public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void initTestCase();
+ void cleanupTestCase();
+
+private slots:
+ void invalidPoint();
+ void comparison();
+ void children();
+ void isRoamingAvailable();
+
+private:
+#ifdef Q_WS_MAEMO_6
+ Maemo::IAPConf *iapconf;
+ Maemo::IAPConf *iapconf2;
+ Maemo::IAPConf *gprsiap;
+#define MAX_IAPS 50
+ Maemo::IAPConf *iaps[MAX_IAPS];
+ QProcess *icd_stub;
+#endif
+};
+
+void tst_QNetworkConfiguration::initTestCase()
+{
+#ifdef Q_WS_MAEMO_6
+ iapconf = new Maemo::IAPConf("007");
+ iapconf->setValue("ipv4_type", "AUTO");
+ iapconf->setValue("wlan_wepkey1", "connt");
+ iapconf->setValue("wlan_wepdefkey", 1);
+ iapconf->setValue("wlan_ssid", QByteArray("JamesBond"));
+ iapconf->setValue("name", "James Bond");
+ iapconf->setValue("type", "WLAN_INFRA");
+
+ iapconf2 = new Maemo::IAPConf("osso.net");
+ iapconf2->setValue("ipv4_type", "AUTO");
+ iapconf2->setValue("wlan_wepkey1", "osso.net");
+ iapconf2->setValue("wlan_wepdefkey", 1);
+ iapconf2->setValue("wlan_ssid", QByteArray("osso.net"));
+ iapconf2->setValue("name", "osso.net");
+ iapconf2->setValue("type", "WLAN_INFRA");
+ iapconf2->setValue("wlan_security", "WEP");
+
+ gprsiap = new Maemo::IAPConf("This-is-GPRS-IAP");
+ gprsiap->setValue("ask_password", false);
+ gprsiap->setValue("gprs_accesspointname", "internet");
+ gprsiap->setValue("gprs_password", "");
+ gprsiap->setValue("gprs_username", "");
+ gprsiap->setValue("ipv4_autodns", true);
+ gprsiap->setValue("ipv4_type", "AUTO");
+ gprsiap->setValue("sim_imsi", "244070123456789");
+ gprsiap->setValue("name", "MI6");
+ gprsiap->setValue("type", "GPRS");
+
+ /* Create large number of IAPs in the gconf and see what happens */
+ fflush(stdout);
+ printf("Creating %d IAPS: ", MAX_IAPS);
+ for (int i=0; i<MAX_IAPS; i++) {
+ QString num = QString().sprintf("%d", i);
+ QString iap = "iap-" + num;
+ iaps[i] = new Maemo::IAPConf(iap);
+ iaps[i]->setValue("name", QString("test-iap-")+num);
+ iaps[i]->setValue("type", "WLAN_INFRA");
+ iaps[i]->setValue("wlan_ssid", QString(QString("test-ssid-")+num).toAscii());
+ iaps[i]->setValue("wlan_security", "WPA_PSK");
+ iaps[i]->setValue("EAP_wpa_preshared_passphrase", QString("test-passphrase-")+num);
+ printf(".");
+ fflush(stdout);
+ }
+ printf("\n");
+ fflush(stdout);
+
+ icd_stub = new QProcess(this);
+ icd_stub->start("/usr/bin/icd2_stub.py");
+ QTest::qWait(1000);
+
+ // Add a known network to scan list that icd2 stub returns
+ QProcess dbus_send;
+ // 007 network
+ dbus_send.start("dbus-send --type=method_call --system "
+ "--dest=com.nokia.icd2 /com/nokia/icd2 "
+ "com.nokia.icd2.testing.add_available_network "
+ "string:'' uint32:0 string:'' "
+ "string:WLAN_INFRA uint32:5000011 array:byte:48,48,55");
+ dbus_send.waitForFinished();
+
+ // osso.net network
+ dbus_send.start("dbus-send --type=method_call --system "
+ "--dest=com.nokia.icd2 /com/nokia/icd2 "
+ "com.nokia.icd2.testing.add_available_network "
+ "string:'' uint32:0 string:'' "
+ "string:WLAN_INFRA uint32:83886097 array:byte:111,115,115,111,46,110,101,116");
+ dbus_send.waitForFinished();
+#endif
+}
+
+void tst_QNetworkConfiguration::cleanupTestCase()
+{
+#ifdef Q_WS_MAEMO_6
+ iapconf->clear();
+ delete iapconf;
+ iapconf2->clear();
+ delete iapconf2;
+ gprsiap->clear();
+ delete gprsiap;
+
+ printf("Deleting %d IAPS : ", MAX_IAPS);
+ for (int i=0; i<MAX_IAPS; i++) {
+ iaps[i]->clear();
+ delete iaps[i];
+ printf(".");
+ fflush(stdout);
+ }
+ printf("\n");
+ qDebug() << "Deleted" << MAX_IAPS << "IAPs";
+
+ // Terminate icd2 stub
+ icd_stub->terminate();
+ icd_stub->waitForFinished();
+#endif
+}
+
+void tst_QNetworkConfiguration::invalidPoint()
+{
+ QNetworkConfiguration pt;
+
+ QVERIFY(pt.name().isEmpty());
+ QVERIFY(!pt.isValid());
+ QVERIFY(pt.type() == QNetworkConfiguration::Invalid);
+ QVERIFY(!(pt.state() & QNetworkConfiguration::Defined));
+ QVERIFY(!(pt.state() & QNetworkConfiguration::Discovered));
+ QVERIFY(!(pt.state() & QNetworkConfiguration::Active));
+ QVERIFY(!pt.isRoamingAvailable());
+
+ QNetworkConfiguration pt2(pt);
+ QVERIFY(pt2.name().isEmpty());
+ QVERIFY(!pt2.isValid());
+ QVERIFY(pt2.type() == QNetworkConfiguration::Invalid);
+ QVERIFY(!(pt2.state() & QNetworkConfiguration::Defined));
+ QVERIFY(!(pt2.state() & QNetworkConfiguration::Discovered));
+ QVERIFY(!(pt2.state() & QNetworkConfiguration::Active));
+ QVERIFY(!pt2.isRoamingAvailable());
+
+}
+
+void tst_QNetworkConfiguration::comparison()
+{
+ //test copy constructor and assignment operator
+ //compare invalid connection points
+ QNetworkConfiguration pt1;
+ QVERIFY(!pt1.isValid());
+ QVERIFY(pt1.type() == QNetworkConfiguration::Invalid);
+
+ QNetworkConfiguration pt2(pt1);
+ QVERIFY(pt1==pt2);
+ QVERIFY(!(pt1!=pt2));
+ QVERIFY(pt1.name() == pt2.name());
+ QVERIFY(pt1.isValid() == pt2.isValid());
+ QVERIFY(pt1.type() == pt2.type());
+ QVERIFY(pt1.state() == pt2.state());
+ QVERIFY(pt1.purpose() == pt2.purpose());
+
+
+ QNetworkConfiguration pt3;
+ pt3 = pt1;
+ QVERIFY(pt1==pt3);
+ QVERIFY(!(pt1!=pt3));
+ QVERIFY(pt1.name() == pt3.name());
+ QVERIFY(pt1.isValid() == pt3.isValid());
+ QVERIFY(pt1.type() == pt3.type());
+ QVERIFY(pt1.state() == pt3.state());
+ QVERIFY(pt1.purpose() == pt3.purpose());
+
+ //test case must run on machine that has valid connection points
+ QNetworkConfigurationManager manager;
+ QList<QNetworkConfiguration> preScanConfigs = manager.allConfigurations();
+
+ QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
+ manager.updateConfigurations(); //initiate scans
+ QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
+
+ QList<QNetworkConfiguration> configs = manager.allConfigurations(QNetworkConfiguration::Discovered);
+ QVERIFY(configs.count());
+ QNetworkConfiguration defaultConfig = manager.defaultConfiguration();
+ QVERIFY(defaultConfig.isValid());
+ QVERIFY(defaultConfig.type() != QNetworkConfiguration::Invalid);
+ QVERIFY(!defaultConfig.name().isEmpty());
+
+ pt3 = defaultConfig;
+ QVERIFY(defaultConfig==pt3);
+ QVERIFY(!(defaultConfig!=pt3));
+ QVERIFY(defaultConfig.name() == pt3.name());
+ QVERIFY(defaultConfig.isValid() == pt3.isValid());
+ QVERIFY(defaultConfig.type() == pt3.type());
+ QVERIFY(defaultConfig.state() == pt3.state());
+ QVERIFY(defaultConfig.purpose() == pt3.purpose());
+}
+
+void tst_QNetworkConfiguration::children()
+{
+ QNetworkConfigurationManager manager;
+ QList<QNetworkConfiguration> configs = manager.allConfigurations();
+
+ foreach(QNetworkConfiguration c, configs)
+ {
+ if ( c.type() == QNetworkConfiguration::ServiceNetwork ) {
+ qDebug() << "found service network" << c.name() << c.children().count();
+ QVERIFY(c.isValid());
+ QList<QNetworkConfiguration> members = c.children();
+ foreach(QNetworkConfiguration child, members) {
+ QVERIFY(child.isValid());
+ QVERIFY(configs.contains(child));
+ qDebug() << "\t" << child.name();
+ }
+ }
+ }
+}
+
+void tst_QNetworkConfiguration::isRoamingAvailable()
+{
+ QNetworkConfigurationManager manager;
+ QList<QNetworkConfiguration> configs = manager.allConfigurations();
+
+ //force update to get maximum list
+ QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
+ manager.updateConfigurations(); //initiate scans
+ QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
+
+ foreach(QNetworkConfiguration c, configs)
+ {
+ QVERIFY(QNetworkConfiguration::UserChoice != c.type());
+ QVERIFY(QNetworkConfiguration::Invalid != c.type());
+ if ( c.type() == QNetworkConfiguration::ServiceNetwork ) {
+ //cannot test flag as some SNAPs may not support roaming anyway
+ //QVERIFY(c.roamingavailable())
+ if ( c.children().count() <= 1 )
+ QVERIFY(!c.isRoamingAvailable());
+ foreach(QNetworkConfiguration child, c.children()) {
+ QVERIFY(QNetworkConfiguration::InternetAccessPoint == child.type());
+ QCOMPARE(child.children().count(), 0);
+ }
+ } else {
+ QVERIFY(!c.isRoamingAvailable());
+ }
+ }
+}
+
+QTEST_MAIN(tst_QNetworkConfiguration)
+#include "tst_qnetworkconfiguration.moc"
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index 78b4d98e05..cafeef0fe2 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -82,6 +82,7 @@ Q_DECLARE_METATYPE(QNetworkProxy)
Q_DECLARE_METATYPE(QNetworkProxyQuery)
Q_DECLARE_METATYPE(QList<QNetworkProxy>)
Q_DECLARE_METATYPE(QNetworkReply::NetworkError)
+Q_DECLARE_METATYPE(QBuffer*)
class QNetworkReplyPtr: public QSharedPointer<QNetworkReply>
{
@@ -129,6 +130,9 @@ public:
QString runSimpleRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request,
QNetworkReplyPtr &reply, const QByteArray &data = QByteArray());
+ QString runCustomRequest(const QNetworkRequest &request, QNetworkReplyPtr &reply,
+ const QByteArray &verb, QIODevice *data);
+
public Q_SLOTS:
void finished();
void gotError();
@@ -175,6 +179,8 @@ private Q_SLOTS:
void deleteFromHttp();
void putGetDeleteGetFromHttp_data();
void putGetDeleteGetFromHttp();
+ void sendCustomRequestToHttp_data();
+ void sendCustomRequestToHttp();
void ioGetFromData_data();
void ioGetFromData();
@@ -793,6 +799,32 @@ QString tst_QNetworkReply::runSimpleRequest(QNetworkAccessManager::Operation op,
return QString();
}
+QString tst_QNetworkReply::runCustomRequest(const QNetworkRequest &request,
+ QNetworkReplyPtr &reply,
+ const QByteArray &verb,
+ QIODevice *data)
+{
+ reply = manager.sendCustomRequest(request, verb, data);
+ reply->setParent(this);
+ connect(reply, SIGNAL(finished()), SLOT(finished()));
+ connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), SLOT(gotError()));
+
+ returnCode = Timeout;
+ loop = new QEventLoop;
+ QTimer::singleShot(20000, loop, SLOT(quit()));
+ int code = returnCode == Timeout ? loop->exec() : returnCode;
+ delete loop;
+ loop = 0;
+
+ switch (code) {
+ case Failure:
+ return "Request failed: " + reply->errorString();
+ case Timeout:
+ return "Network timeout";
+ }
+ return QString();
+}
+
void tst_QNetworkReply::finished()
{
loop->exit(returnCode = Success);
@@ -1451,6 +1483,57 @@ void tst_QNetworkReply::putGetDeleteGetFromHttp()
}
+void tst_QNetworkReply::sendCustomRequestToHttp_data()
+{
+ QTest::addColumn<QUrl>("url");
+ QTest::addColumn<QByteArray>("verb");
+ QTest::addColumn<QBuffer *>("device");
+ QTest::addColumn<int>("resultCode");
+ QTest::addColumn<QNetworkReply::NetworkError>("error");
+ QTest::addColumn<QByteArray>("expectedContent");
+
+ QTest::newRow("options") << QUrl("http://" + QtNetworkSettings::serverName()) <<
+ QByteArray("OPTIONS") << (QBuffer *) 0 << 200 << QNetworkReply::NoError << QByteArray();
+ QTest::newRow("trace") << QUrl("http://" + QtNetworkSettings::serverName()) <<
+ QByteArray("TRACE") << (QBuffer *) 0 << 200 << QNetworkReply::NoError << QByteArray();
+ QTest::newRow("connect") << QUrl("http://" + QtNetworkSettings::serverName()) <<
+ QByteArray("CONNECT") << (QBuffer *) 0 << 400 << QNetworkReply::UnknownContentError << QByteArray(); // 400 = Bad Request
+ QTest::newRow("nonsense") << QUrl("http://" + QtNetworkSettings::serverName()) <<
+ QByteArray("NONSENSE") << (QBuffer *) 0 << 501 << QNetworkReply::ProtocolUnknownError << QByteArray(); // 501 = Method Not Implemented
+
+ QByteArray ba("test");
+ QBuffer *buffer = new QBuffer;
+ buffer->setData(ba);
+ buffer->open(QIODevice::ReadOnly);
+ QTest::newRow("post") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/cgi-bin/md5sum.cgi") << QByteArray("POST")
+ << buffer << 200 << QNetworkReply::NoError << QByteArray("098f6bcd4621d373cade4e832627b4f6\n");
+
+ QByteArray ba2("test");
+ QBuffer *buffer2 = new QBuffer;
+ buffer2->setData(ba2);
+ buffer2->open(QIODevice::ReadOnly);
+ QTest::newRow("put") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/cgi-bin/md5sum.cgi") << QByteArray("PUT")
+ << buffer2 << 200 << QNetworkReply::NoError << QByteArray("098f6bcd4621d373cade4e832627b4f6\n");
+}
+
+void tst_QNetworkReply::sendCustomRequestToHttp()
+{
+ QFETCH(QUrl, url);
+ QNetworkRequest request(url);
+ QNetworkReplyPtr reply;
+ QFETCH(QByteArray, verb);
+ QFETCH(QBuffer *, device);
+ runCustomRequest(request, reply, verb, device);
+ QCOMPARE(reply->url(), url);
+ QFETCH(QNetworkReply::NetworkError, error);
+ QCOMPARE(reply->error(), error);
+ QFETCH(int, resultCode);
+ QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), resultCode);
+ QFETCH(QByteArray, expectedContent);
+ if (! expectedContent.isEmpty())
+ QCOMPARE(reply->readAll(), expectedContent);
+}
+
void tst_QNetworkReply::ioGetFromData_data()
{
QTest::addColumn<QString>("urlStr");
diff --git a/tests/auto/qnetworksession/lackey/lackey.pro b/tests/auto/qnetworksession/lackey/lackey.pro
new file mode 100644
index 0000000000..5db6743c65
--- /dev/null
+++ b/tests/auto/qnetworksession/lackey/lackey.pro
@@ -0,0 +1,15 @@
+SOURCES += main.cpp
+TARGET = lackey
+
+QT = core network
+
+DESTDIR = ./
+
+win32:CONFIG += console
+mac:CONFIG -= app_bundle
+
+symbian {
+ # Needed for interprocess communication and opening QNetworkSession
+ TARGET.CAPABILITY = NetworkControl NetworkServices
+}
+
diff --git a/tests/auto/qnetworksession/lackey/main.cpp b/tests/auto/qnetworksession/lackey/main.cpp
new file mode 100644
index 0000000000..66d6dd4fa1
--- /dev/null
+++ b/tests/auto/qnetworksession/lackey/main.cpp
@@ -0,0 +1,146 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QCoreApplication>
+#include <QStringList>
+#include <QLocalSocket>
+#include <qnetworkconfigmanager.h>
+#include <qnetworkconfiguration.h>
+#include <qnetworksession.h>
+
+#include <QDebug>
+
+QT_USE_NAMESPACE
+
+
+#define NO_DISCOVERED_CONFIGURATIONS_ERROR 1
+#define SESSION_OPEN_ERROR 2
+
+
+int main(int argc, char** argv)
+{
+ QCoreApplication app(argc, argv);
+
+ // Cannot read/write to processes on WinCE or Symbian.
+ // Easiest alternative is to use sockets for IPC.
+
+ QLocalSocket oopSocket;
+
+ oopSocket.connectToServer("tst_qnetworksession");
+ oopSocket.waitForConnected(-1);
+
+ QNetworkConfigurationManager manager;
+ QList<QNetworkConfiguration> discovered =
+ manager.allConfigurations(QNetworkConfiguration::Discovered);
+
+ foreach(QNetworkConfiguration config, discovered) {
+ qDebug() << "Lackey: Name of the config enumerated: " << config.name();
+ qDebug() << "Lackey: State of the config enumerated: " << config.state();
+ }
+
+ if (discovered.isEmpty()) {
+ qDebug("Lackey: no discovered configurations, returning empty error.");
+ return NO_DISCOVERED_CONFIGURATIONS_ERROR;
+ }
+
+ qDebug() << "Lackey started";
+
+ QNetworkSession *session = 0;
+ do {
+ if (session) {
+ delete session;
+ session = 0;
+ }
+
+ qDebug() << "Discovered configurations:" << discovered.count();
+
+ if (discovered.isEmpty()) {
+ qDebug() << "No more discovered configurations";
+ break;
+ }
+
+ qDebug() << "Taking first configuration";
+
+ QNetworkConfiguration config = discovered.takeFirst();
+
+ if ((config.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
+ qDebug() << config.name() << "is active, therefore skipping it (looking for configs in 'discovered' state).";
+ continue;
+ }
+
+ qDebug() << "Creating session for" << config.name() << config.identifier();
+
+ session = new QNetworkSession(config);
+
+ QString output = QString("Starting session for %1\n").arg(config.identifier());
+ oopSocket.write(output.toAscii());
+ oopSocket.waitForBytesWritten();
+ session->open();
+ session->waitForOpened();
+ } while (!(session && session->isOpen()));
+
+ qDebug() << "lackey: loop done";
+
+ if (!session) {
+ qDebug() << "Could not start session";
+
+ oopSocket.disconnectFromServer();
+ oopSocket.waitForDisconnected(-1);
+
+ return SESSION_OPEN_ERROR;
+ }
+
+ QString output = QString("Started session for %1\n").arg(session->configuration().identifier());
+ oopSocket.write(output.toAscii());
+ oopSocket.waitForBytesWritten();
+
+ oopSocket.waitForReadyRead();
+ oopSocket.readLine();
+
+ session->stop();
+
+ delete session;
+
+ oopSocket.disconnectFromServer();
+ oopSocket.waitForDisconnected(-1);
+
+ return 0;
+}
diff --git a/tests/auto/qnetworksession/qnetworksession.pro b/tests/auto/qnetworksession/qnetworksession.pro
new file mode 100644
index 0000000000..a85925bc17
--- /dev/null
+++ b/tests/auto/qnetworksession/qnetworksession.pro
@@ -0,0 +1,2 @@
+TEMPLATE = subdirs
+SUBDIRS = lackey test
diff --git a/tests/auto/qnetworksession/test/test.pro b/tests/auto/qnetworksession/test/test.pro
new file mode 100644
index 0000000000..d248b10b74
--- /dev/null
+++ b/tests/auto/qnetworksession/test/test.pro
@@ -0,0 +1,26 @@
+load(qttest_p4)
+SOURCES += tst_qnetworksession.cpp
+HEADERS += ../../qbearertestcommon.h
+
+QT = core network
+
+TARGET = tst_qnetworksession
+CONFIG(debug_and_release) {
+ CONFIG(debug, debug|release) {
+ DESTDIR = ../debug
+ } else {
+ DESTDIR = ../release
+ }
+} else {
+ DESTDIR = ..
+}
+
+symbian {
+ TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData PowerMgmt
+}
+
+maemo6 {
+ CONFIG += link_pkgconfig
+
+ PKGCONFIG += conninet
+}
diff --git a/tests/auto/qnetworksession/test/tst_qnetworksession.cpp b/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
new file mode 100644
index 0000000000..4b56f77315
--- /dev/null
+++ b/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
@@ -0,0 +1,1273 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QLocalServer>
+#include <QLocalSocket>
+#include "../../qbearertestcommon.h"
+#include <qnetworkconfigmanager.h>
+#include <qnetworksession.h>
+
+#ifdef Q_WS_MAEMO_6
+#include <stdio.h>
+#include <iapconf.h>
+#endif
+
+QT_USE_NAMESPACE
+
+Q_DECLARE_METATYPE(QNetworkConfiguration)
+Q_DECLARE_METATYPE(QNetworkConfiguration::Type);
+Q_DECLARE_METATYPE(QNetworkSession::State);
+Q_DECLARE_METATYPE(QNetworkSession::SessionError);
+
+class tst_QNetworkSession : public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void initTestCase();
+ void cleanupTestCase();
+
+private slots:
+
+ void outOfProcessSession();
+ void invalidSession();
+
+ void repeatedOpenClose_data();
+ void repeatedOpenClose();
+
+ void roamingErrorCodes();
+
+ void sessionProperties_data();
+ void sessionProperties();
+
+ void userChoiceSession_data();
+ void userChoiceSession();
+
+ void sessionOpenCloseStop_data();
+ void sessionOpenCloseStop();
+
+ void sessionAutoClose_data();
+ void sessionAutoClose();
+
+private:
+ QNetworkConfigurationManager manager;
+
+ int inProcessSessionManagementCount;
+
+#ifdef Q_WS_MAEMO_6
+ Maemo::IAPConf *iapconf;
+ Maemo::IAPConf *iapconf2;
+ Maemo::IAPConf *gprsiap;
+#define MAX_IAPS 10
+ Maemo::IAPConf *iaps[MAX_IAPS];
+ QProcess *icd_stub;
+#endif
+};
+
+// Helper functions
+bool openSession(QNetworkSession *session);
+bool closeSession(QNetworkSession *session, bool lastSessionOnConfiguration = true);
+QNetworkConfiguration suitableConfiguration(QString bearerType, QNetworkConfiguration::Type configType);
+
+void tst_QNetworkSession::initTestCase()
+{
+ qRegisterMetaType<QNetworkSession::State>("QNetworkSession::State");
+ qRegisterMetaType<QNetworkSession::SessionError>("QNetworkSession::SessionError");
+ qRegisterMetaType<QNetworkConfiguration>("QNetworkConfiguration");
+ qRegisterMetaType<QNetworkConfiguration::Type>("QNetworkConfiguration::Type");
+
+#ifdef Q_WS_MAEMO_6
+ iapconf = new Maemo::IAPConf("007");
+ iapconf->setValue("ipv4_type", "AUTO");
+ iapconf->setValue("wlan_wepkey1", "connt");
+ iapconf->setValue("wlan_wepdefkey", 1);
+ iapconf->setValue("wlan_ssid", QByteArray("JamesBond"));
+ iapconf->setValue("name", "James Bond");
+ iapconf->setValue("type", "WLAN_INFRA");
+
+ gprsiap = new Maemo::IAPConf("This-is-GPRS-IAP");
+ gprsiap->setValue("ask_password", false);
+ gprsiap->setValue("gprs_accesspointname", "internet");
+ gprsiap->setValue("gprs_password", "");
+ gprsiap->setValue("gprs_username", "");
+ gprsiap->setValue("ipv4_autodns", true);
+ gprsiap->setValue("ipv4_type", "AUTO");
+ gprsiap->setValue("sim_imsi", "244070123456789");
+ gprsiap->setValue("name", "MI6");
+ gprsiap->setValue("type", "GPRS");
+
+ iapconf2 = new Maemo::IAPConf("osso.net");
+ iapconf2->setValue("ipv4_type", "AUTO");
+ iapconf2->setValue("wlan_wepkey1", "osso.net");
+ iapconf2->setValue("wlan_wepdefkey", 1);
+ iapconf2->setValue("wlan_ssid", QByteArray("osso.net"));
+ iapconf2->setValue("name", "osso.net");
+ iapconf2->setValue("type", "WLAN_INFRA");
+ iapconf2->setValue("wlan_security", "WEP");
+
+ /* Create large number of IAPs in the gconf and see what happens */
+ fflush(stdout);
+ printf("Creating %d IAPS: ", MAX_IAPS);
+ for (int i=0; i<MAX_IAPS; i++) {
+ QString num = QString().sprintf("%d", i);
+ QString iap = "iap-" + num;
+ iaps[i] = new Maemo::IAPConf(iap);
+ iaps[i]->setValue("name", QString("test-iap-")+num);
+ iaps[i]->setValue("type", "WLAN_INFRA");
+ iaps[i]->setValue("wlan_ssid", QString(QString("test-ssid-")+num).toAscii());
+ iaps[i]->setValue("wlan_security", "WPA_PSK");
+ iaps[i]->setValue("EAP_wpa_preshared_passphrase", QString("test-passphrase-")+num);
+ printf(".");
+ fflush(stdout);
+ }
+ printf("\n");
+ fflush(stdout);
+
+ icd_stub = new QProcess(this);
+ icd_stub->start("/usr/bin/icd2_stub.py");
+ QTest::qWait(1000);
+
+ // Add a known network to scan list that icd2 stub returns
+ QProcess dbus_send;
+ // 007 network
+ dbus_send.start("dbus-send --type=method_call --system "
+ "--dest=com.nokia.icd2 /com/nokia/icd2 "
+ "com.nokia.icd2.testing.add_available_network "
+ "string:'' uint32:0 string:'' "
+ "string:WLAN_INFRA uint32:5000011 array:byte:48,48,55");
+ dbus_send.waitForFinished();
+
+ // osso.net network
+ dbus_send.start("dbus-send --type=method_call --system "
+ "--dest=com.nokia.icd2 /com/nokia/icd2 "
+ "com.nokia.icd2.testing.add_available_network "
+ "string:'' uint32:0 string:'' "
+ "string:WLAN_INFRA uint32:83886097 array:byte:111,115,115,111,46,110,101,116");
+ dbus_send.waitForFinished();
+#endif
+
+ inProcessSessionManagementCount = -1;
+
+ QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
+ manager.updateConfigurations();
+ QTRY_VERIFY(spy.count() == 1);
+}
+
+void tst_QNetworkSession::cleanupTestCase()
+{
+ if (!(manager.capabilities() & QNetworkConfigurationManager::SystemSessionSupport) &&
+ (manager.capabilities() & QNetworkConfigurationManager::CanStartAndStopInterfaces) &&
+ inProcessSessionManagementCount == 0) {
+ qWarning("No usable configurations found to complete all possible tests in "
+ "inProcessSessionManagement()");
+ }
+
+#ifdef Q_WS_MAEMO_6
+ iapconf->clear();
+ delete iapconf;
+ iapconf2->clear();
+ delete iapconf2;
+ gprsiap->clear();
+ delete gprsiap;
+
+ printf("Deleting %d IAPS : ", MAX_IAPS);
+ for (int i=0; i<MAX_IAPS; i++) {
+ iaps[i]->clear();
+ delete iaps[i];
+ printf(".");
+ fflush(stdout);
+ }
+ printf("\n");
+ qDebug() << "Deleted" << MAX_IAPS << "IAPs";
+
+ icd_stub->terminate();
+ icd_stub->waitForFinished();
+#endif
+}
+
+void tst_QNetworkSession::invalidSession()
+{
+ // Verify that session created with invalid configuration remains in invalid state
+ QNetworkSession session(QNetworkConfiguration(), 0);
+ QVERIFY(!session.isOpen());
+ QVERIFY(session.state() == QNetworkSession::Invalid);
+ QVERIFY(session.error() == QNetworkSession::InvalidConfigurationError);
+
+ // Verify that opening session with invalid configuration both 1) emits invalidconfigurationerror
+ // and 2) sets session's state as invalid.
+ QSignalSpy errorSpy(&session, SIGNAL(error(QNetworkSession::SessionError)));
+ session.open();
+ session.waitForOpened(1000); // Should bail out right away
+ QVERIFY(errorSpy.count() == 1);
+ QNetworkSession::SessionError error =
+ qvariant_cast<QNetworkSession::SessionError> (errorSpy.first().at(0));
+ QVERIFY(error == QNetworkSession::InvalidConfigurationError);
+ QVERIFY(session.error() == QNetworkSession::InvalidConfigurationError);
+ QVERIFY(session.state() == QNetworkSession::Invalid);
+
+ // Check same thing with a config from platform (there are subtle differences
+ // because emtpy configuration does not have private pointer). Test with config
+ // in '(un)defined' state
+ QList<QNetworkConfiguration> allConfigs = manager.allConfigurations();
+ foreach(QNetworkConfiguration config, allConfigs) {
+ if ((config.state() & QNetworkConfiguration::Discovered) != QNetworkConfiguration::Discovered) {
+ QNetworkSession session2(config);
+ QSignalSpy errorSpy2(&session2, SIGNAL(error(QNetworkSession::SessionError)));
+ session2.open();
+ session2.waitForOpened(1000); // Should bail out right away
+ QVERIFY(errorSpy2.count() == 1);
+ QNetworkSession::SessionError error2 =
+ qvariant_cast<QNetworkSession::SessionError> (errorSpy2.first().at(0));
+ QVERIFY(error2 == QNetworkSession::InvalidConfigurationError);
+ QVERIFY(session2.state() == QNetworkSession::Invalid);
+ break; // Once is enough
+ }
+ }
+}
+
+void tst_QNetworkSession::sessionProperties_data()
+{
+ QTest::addColumn<QNetworkConfiguration>("configuration");
+
+ QTest::newRow("invalid configuration") << QNetworkConfiguration();
+
+ foreach (const QNetworkConfiguration &config, manager.allConfigurations()) {
+ const QString name = config.name().isEmpty() ? QString("<Hidden>") : config.name();
+ QTest::newRow(name.toLocal8Bit().constData()) << config;
+ }
+}
+
+void tst_QNetworkSession::sessionProperties()
+{
+ QFETCH(QNetworkConfiguration, configuration);
+
+ QNetworkSession session(configuration);
+
+ QVERIFY(session.configuration() == configuration);
+
+ QStringList validBearerNames = QStringList() << QLatin1String("Unknown")
+ << QLatin1String("Ethernet")
+ << QLatin1String("WLAN")
+ << QLatin1String("2G")
+ << QLatin1String("CDMA2000")
+ << QLatin1String("WCDMA")
+ << QLatin1String("HSPA")
+ << QLatin1String("Bluetooth")
+ << QLatin1String("WiMAX");
+
+ if (!configuration.isValid()) {
+ QVERIFY(configuration.bearerName().isEmpty());
+ } else {
+ qDebug() << "Type:" << configuration.type()
+ << "Bearer:" << configuration.bearerName();
+
+ switch (configuration.type())
+ {
+ case QNetworkConfiguration::ServiceNetwork:
+ case QNetworkConfiguration::UserChoice:
+ default:
+ QVERIFY(configuration.bearerName().isEmpty());
+ break;
+ case QNetworkConfiguration::InternetAccessPoint:
+ QVERIFY(validBearerNames.contains(configuration.bearerName()));
+ break;
+ }
+ }
+
+ // QNetworkSession::interface() should return an invalid interface unless
+ // session is in the connected state.
+ qDebug() << "Session state:" << session.state();
+ qDebug() << "Session iface:" << session.interface().isValid() << session.interface().name();
+#if !(defined(Q_OS_SYMBIAN) && defined(__WINS__))
+ // On Symbian emulator, the support for data bearers is limited
+ QCOMPARE(session.state() == QNetworkSession::Connected, session.interface().isValid());
+#endif
+
+ if (!configuration.isValid()) {
+ QVERIFY(configuration.state() == QNetworkConfiguration::Undefined &&
+ session.state() == QNetworkSession::Invalid);
+ } else {
+ switch (configuration.state()) {
+ case QNetworkConfiguration::Undefined:
+ QVERIFY(session.state() == QNetworkSession::NotAvailable);
+ break;
+ case QNetworkConfiguration::Defined:
+ QVERIFY(session.state() == QNetworkSession::NotAvailable);
+ break;
+ case QNetworkConfiguration::Discovered:
+ QVERIFY(session.state() == QNetworkSession::Connecting ||
+ session.state() == QNetworkSession::Disconnected);
+ break;
+ case QNetworkConfiguration::Active:
+ QVERIFY(session.state() == QNetworkSession::Connected ||
+ session.state() == QNetworkSession::Closing ||
+ session.state() == QNetworkSession::Roaming);
+ break;
+ default:
+ QFAIL("Invalid configuration state");
+ };
+ }
+}
+
+void tst_QNetworkSession::repeatedOpenClose_data() {
+ QTest::addColumn<QString>("bearerType");
+ QTest::addColumn<QNetworkConfiguration::Type>("configurationType");
+ QTest::addColumn<int>("repeatTimes");
+
+ QTest::newRow("WLAN_IAP") << "WLAN" << QNetworkConfiguration::InternetAccessPoint << 3;
+ // QTest::newRow("Cellular_IAP") << "cellular" << QNetworkConfiguration::InternetAccessPoint << 3;
+ // QTest::newRow("SNAP") << "bearer_type_not_relevant_with_SNAPs" << QNetworkConfiguration::ServiceNetwork << 3;
+}
+
+// Tests repeated-open close.
+void tst_QNetworkSession::repeatedOpenClose() {
+ QFETCH(QString, bearerType);
+ QFETCH(QNetworkConfiguration::Type, configurationType);
+ QFETCH(int, repeatTimes);
+
+ // First check that opening once succeeds and determine if repeatable testing is doable
+ QNetworkConfiguration config = suitableConfiguration(bearerType, configurationType);
+ if (!config.isValid()) {
+ QSKIP("No suitable configurations, skipping this round of repeated open-close test.", SkipSingle);
+ }
+ qDebug() << "Using following configuratio to repeatedly open and close: " << config.name();
+ QNetworkSession permanentSession(config);
+ if (!openSession(&permanentSession) ||
+ !closeSession(&permanentSession)) {
+ QSKIP("Unable to open/close session, skipping this round of repeated open-close test.", SkipSingle);
+ }
+ for (int i = repeatTimes; i > 0; i--) {
+ QVERIFY(openSession(&permanentSession));
+ QVERIFY(closeSession(&permanentSession));
+ }
+}
+
+void tst_QNetworkSession::roamingErrorCodes() {
+
+#ifndef Q_OS_SYMBIAN
+ QSKIP("Roaming supported on Symbian.", SkipAll);
+#else
+ QNetworkConfiguration wlanIapConfig = suitableConfiguration("WLAN", QNetworkConfiguration::InternetAccessPoint);
+ if (!wlanIapConfig.isValid()) {
+ QSKIP("No WLAN IAP accessible, skipping test.", SkipAll);
+ }
+ // Check that opening and closing two sessions on same config work gracefully:
+ QNetworkSession iapSession(wlanIapConfig);
+ QVERIFY(openSession(&iapSession));
+ QNetworkSession adminIapSession(wlanIapConfig);
+ QVERIFY(openSession(&adminIapSession));
+ QVERIFY(closeSession(&iapSession, false)); // false == not a last session based on the configuration
+ QVERIFY(closeSession(&adminIapSession));
+
+ // Open configurations again, force close bearer and check that errors are emitted correctly
+ // on the other session
+ QVERIFY(openSession(&iapSession));
+ QVERIFY(openSession(&adminIapSession));
+ QSignalSpy errorSpy(&iapSession, SIGNAL(error(QNetworkSession::SessionError)));
+ adminIapSession.stop(); // requires NetworkControl capabilities
+ QTRY_VERIFY(!errorSpy.isEmpty()); // wait for error signals
+ QNetworkSession::SessionError error = qvariant_cast<QNetworkSession::SessionError>(errorSpy.first().at(0));
+ QVERIFY(error == QNetworkSession::SessionAbortedError);
+ QVERIFY(iapSession.state() == QNetworkSession::Disconnected);
+ QVERIFY(adminIapSession.state() == QNetworkSession::Disconnected);
+#endif // Q_OS_SYMBIAN
+ /*
+ // Check for roaming error. Challenging to automate, therefore commented out.
+ // Case requires that you have controllable WLAN in Internet SNAP (only).
+ QNetworkConfiguration snapConfig = suitableConfiguration("bearer_not_relevant_with_snaps", QNetworkConfiguration::ServiceNetwork);
+ if (!snapConfig.isValid()) {
+ QSKIP("No SNAP accessible, skipping test.", SkipAll);
+ }
+ QNetworkSession snapSession(snapConfig);
+ QVERIFY(openSession(&snapSession));
+ QSignalSpy errorSpySnap(&snapSession, SIGNAL(error(QNetworkSession::SessionError)));
+ qDebug("Disconnect the WLAN now");
+ QTRY_VERIFY(!errorSpySnap.isEmpty()); // wait for error signals
+ QVERIFY(errorSpySnap.count() == 1);
+ error = qvariant_cast<QNetworkSession::SessionError>(errorSpySnap.first().at(0));
+ qDebug() << "Error received when turning off wlan on SNAP: " << error;
+ QVERIFY(error == QNetworkSession::RoamingError);
+
+ qDebug("Connect the WLAN now");
+ QTest::qWait(60000); // Wait for WLAN to get up
+ QNetworkConfiguration wlanIapConfig2 = suitableConfiguration("WLAN", QNetworkConfiguration::InternetAccessPoint);
+ QNetworkSession iapSession2(wlanIapConfig2);
+ QVERIFY(openSession(&iapSession2));
+ QSignalSpy errorSpy2(&iapSession2, SIGNAL(error(QNetworkSession::SessionError)));
+ qDebug("Disconnect the WLAN now");
+ QTRY_VERIFY(!errorSpy2.isEmpty()); // wait for error signals
+ QVERIFY(errorSpy2.count() == 1);
+ error = qvariant_cast<QNetworkSession::SessionError>(errorSpy2.first().at(0));
+ QVERIFY(error == QNetworkSession::SessionAbortedError);
+ QVERIFY(iapSession2.state() == QNetworkSession::Disconnected);
+ */
+}
+
+void tst_QNetworkSession::userChoiceSession_data()
+{
+ QTest::addColumn<QNetworkConfiguration>("configuration");
+
+ QNetworkConfiguration config = manager.defaultConfiguration();
+ if (config.type() == QNetworkConfiguration::UserChoice)
+ QTest::newRow("UserChoice") << config;
+ else
+ QSKIP("Default configuration is not a UserChoice configuration.", SkipAll);
+}
+
+void tst_QNetworkSession::userChoiceSession()
+{
+ QFETCH(QNetworkConfiguration, configuration);
+
+ QVERIFY(configuration.type() == QNetworkConfiguration::UserChoice);
+
+ QNetworkSession session(configuration);
+
+ // Check that configuration was really set
+ QVERIFY(session.configuration() == configuration);
+
+ QVERIFY(!session.isOpen());
+
+ // Check that session is not active
+ QVERIFY(session.sessionProperty("ActiveConfiguration").toString().isEmpty());
+
+ // The remaining tests require the session to be not NotAvailable.
+ if (session.state() == QNetworkSession::NotAvailable)
+ QSKIP("Network is not available.", SkipSingle);
+
+ QSignalSpy sessionOpenedSpy(&session, SIGNAL(opened()));
+ QSignalSpy sessionClosedSpy(&session, SIGNAL(closed()));
+ QSignalSpy stateChangedSpy(&session, SIGNAL(stateChanged(QNetworkSession::State)));
+ QSignalSpy errorSpy(&session, SIGNAL(error(QNetworkSession::SessionError)));
+
+ // Test opening the session.
+ {
+ bool expectStateChange = session.state() != QNetworkSession::Connected;
+
+ session.open();
+
+ session.waitForOpened();
+
+ if (session.isOpen())
+ QVERIFY(!sessionOpenedSpy.isEmpty() || !errorSpy.isEmpty());
+ if (!errorSpy.isEmpty()) {
+ QNetworkSession::SessionError error =
+ qvariant_cast<QNetworkSession::SessionError>(errorSpy.first().at(0));
+ if (error == QNetworkSession::OperationNotSupportedError) {
+ // The session needed to bring up the interface,
+ // but the operation is not supported.
+ QSKIP("Configuration does not support open().", SkipSingle);
+ } else if (error == QNetworkSession::InvalidConfigurationError) {
+ // The session needed to bring up the interface, but it is not possible for the
+ // specified configuration.
+ if ((session.configuration().state() & QNetworkConfiguration::Discovered) ==
+ QNetworkConfiguration::Discovered) {
+ QFAIL("Failed to open session for Discovered configuration.");
+ } else {
+ QSKIP("Cannot test session for non-Discovered configuration.", SkipSingle);
+ }
+ } else if (error == QNetworkSession::UnknownSessionError) {
+ QSKIP("Unknown session error.", SkipSingle);
+ } else {
+ QFAIL("Error opening session.");
+ }
+ } else if (!sessionOpenedSpy.isEmpty()) {
+ QCOMPARE(sessionOpenedSpy.count(), 1);
+ QVERIFY(sessionClosedSpy.isEmpty());
+ QVERIFY(errorSpy.isEmpty());
+
+ if (expectStateChange)
+ QTRY_VERIFY(!stateChangedSpy.isEmpty());
+
+ QVERIFY(session.state() == QNetworkSession::Connected);
+#if !(defined(Q_OS_SYMBIAN) && defined(__WINS__))
+ // On Symbian emulator, the support for data bearers is limited
+ QVERIFY(session.interface().isValid());
+#endif
+
+ const QString userChoiceIdentifier =
+ session.sessionProperty("UserChoiceConfiguration").toString();
+
+ QVERIFY(!userChoiceIdentifier.isEmpty());
+ QVERIFY(userChoiceIdentifier != configuration.identifier());
+
+ QNetworkConfiguration userChoiceConfiguration =
+ manager.configurationFromIdentifier(userChoiceIdentifier);
+
+ QVERIFY(userChoiceConfiguration.isValid());
+ QVERIFY(userChoiceConfiguration.type() != QNetworkConfiguration::UserChoice);
+
+ const QString testIdentifier("abc");
+ //resetting UserChoiceConfiguration is ignored (read only property)
+ session.setSessionProperty("UserChoiceConfiguration", testIdentifier);
+ QVERIFY(session.sessionProperty("UserChoiceConfiguration").toString() != testIdentifier);
+
+ const QString activeIdentifier =
+ session.sessionProperty("ActiveConfiguration").toString();
+
+ QVERIFY(!activeIdentifier.isEmpty());
+ QVERIFY(activeIdentifier != configuration.identifier());
+
+ QNetworkConfiguration activeConfiguration =
+ manager.configurationFromIdentifier(activeIdentifier);
+
+ QVERIFY(activeConfiguration.isValid());
+ QVERIFY(activeConfiguration.type() == QNetworkConfiguration::InternetAccessPoint);
+
+ //resetting ActiveConfiguration is ignored (read only property)
+ session.setSessionProperty("ActiveConfiguration", testIdentifier);
+ QVERIFY(session.sessionProperty("ActiveConfiguration").toString() != testIdentifier);
+
+ if (userChoiceConfiguration.type() == QNetworkConfiguration::InternetAccessPoint) {
+ QVERIFY(userChoiceConfiguration == activeConfiguration);
+ } else {
+ QVERIFY(userChoiceConfiguration.type() == QNetworkConfiguration::ServiceNetwork);
+ QVERIFY(userChoiceConfiguration.children().contains(activeConfiguration));
+ }
+ } else {
+ QFAIL("Timeout waiting for session to open.");
+ }
+ }
+}
+
+void tst_QNetworkSession::sessionOpenCloseStop_data()
+{
+ QTest::addColumn<QNetworkConfiguration>("configuration");
+ QTest::addColumn<bool>("forceSessionStop");
+
+ foreach (const QNetworkConfiguration &config, manager.allConfigurations()) {
+ const QString name = config.name().isEmpty() ? QString("<Hidden>") : config.name();
+ QTest::newRow((name + QLatin1String(" close")).toLocal8Bit().constData())
+ << config << false;
+ QTest::newRow((name + QLatin1String(" stop")).toLocal8Bit().constData())
+ << config << true;
+ }
+
+ inProcessSessionManagementCount = 0;
+}
+
+void tst_QNetworkSession::sessionOpenCloseStop()
+{
+ QFETCH(QNetworkConfiguration, configuration);
+ QFETCH(bool, forceSessionStop);
+
+ QNetworkSession session(configuration);
+
+ // Test initial state of the session.
+ {
+ QVERIFY(session.configuration() == configuration);
+ QVERIFY(!session.isOpen());
+ // session may be invalid if configuration is removed between when
+ // sessionOpenCloseStop_data() is called and here.
+ QVERIFY((configuration.isValid() && (session.state() != QNetworkSession::Invalid)) ||
+ (!configuration.isValid() && (session.state() == QNetworkSession::Invalid)));
+ QVERIFY(session.error() == QNetworkSession::UnknownSessionError);
+ }
+
+ // The remaining tests require the session to be not NotAvailable.
+ if (session.state() == QNetworkSession::NotAvailable)
+ QSKIP("Network is not available.", SkipSingle);
+
+ QSignalSpy sessionOpenedSpy(&session, SIGNAL(opened()));
+ QSignalSpy sessionClosedSpy(&session, SIGNAL(closed()));
+ QSignalSpy stateChangedSpy(&session, SIGNAL(stateChanged(QNetworkSession::State)));
+ QSignalSpy errorSpy(&session, SIGNAL(error(QNetworkSession::SessionError)));
+
+ // Test opening the session.
+ {
+ QNetworkSession::State previousState = session.state();
+ bool expectStateChange = previousState != QNetworkSession::Connected;
+
+ session.open();
+
+ session.waitForOpened();
+
+ if (session.isOpen())
+ QVERIFY(!sessionOpenedSpy.isEmpty() || !errorSpy.isEmpty());
+ if (!errorSpy.isEmpty()) {
+ QNetworkSession::SessionError error =
+ qvariant_cast<QNetworkSession::SessionError>(errorSpy.first().at(0));
+
+ QVERIFY(session.state() == previousState);
+
+ if (error == QNetworkSession::OperationNotSupportedError) {
+ // The session needed to bring up the interface,
+ // but the operation is not supported.
+ QSKIP("Configuration does not support open().", SkipSingle);
+ } else if (error == QNetworkSession::InvalidConfigurationError) {
+ // The session needed to bring up the interface, but it is not possible for the
+ // specified configuration.
+ if ((session.configuration().state() & QNetworkConfiguration::Discovered) ==
+ QNetworkConfiguration::Discovered) {
+ QFAIL("Failed to open session for Discovered configuration.");
+ } else {
+ QSKIP("Cannot test session for non-Discovered configuration.", SkipSingle);
+ }
+ } else if (error == QNetworkSession::UnknownSessionError) {
+ QSKIP("Unknown Session error.", SkipSingle);
+ } else {
+ QFAIL("Error opening session.");
+ }
+ } else if (!sessionOpenedSpy.isEmpty()) {
+ QCOMPARE(sessionOpenedSpy.count(), 1);
+ QVERIFY(sessionClosedSpy.isEmpty());
+ QVERIFY(errorSpy.isEmpty());
+
+ if (expectStateChange) {
+ QTRY_VERIFY(stateChangedSpy.count() >= 2);
+
+ QNetworkSession::State state =
+ qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(0).at(0));
+ QVERIFY(state == QNetworkSession::Connecting);
+
+ state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(1).at(0));
+ QVERIFY(state == QNetworkSession::Connected);
+ }
+
+ QVERIFY(session.state() == QNetworkSession::Connected);
+#if !(defined(Q_OS_SYMBIAN) && defined(__WINS__))
+ // On Symbian emulator, the support for data bearers is limited
+ QVERIFY(session.interface().isValid());
+#endif
+ } else {
+ QFAIL("Timeout waiting for session to open.");
+ }
+ }
+
+ sessionOpenedSpy.clear();
+ sessionClosedSpy.clear();
+ stateChangedSpy.clear();
+ errorSpy.clear();
+
+ QNetworkSession session2(configuration);
+
+ QSignalSpy sessionOpenedSpy2(&session2, SIGNAL(opened()));
+ QSignalSpy sessionClosedSpy2(&session2, SIGNAL(closed()));
+ QSignalSpy stateChangedSpy2(&session2, SIGNAL(stateChanged(QNetworkSession::State)));
+ QSignalSpy errorSpy2(&session2, SIGNAL(error(QNetworkSession::SessionError)));
+
+ // Test opening a second session.
+ {
+ QVERIFY(session2.configuration() == configuration);
+ QVERIFY(!session2.isOpen());
+ QVERIFY(session2.state() == QNetworkSession::Connected);
+ QVERIFY(session.error() == QNetworkSession::UnknownSessionError);
+
+ session2.open();
+
+ QTRY_VERIFY(!sessionOpenedSpy2.isEmpty() || !errorSpy2.isEmpty());
+
+ QVERIFY(session.isOpen());
+ QVERIFY(session2.isOpen());
+ QVERIFY(session.state() == QNetworkSession::Connected);
+ QVERIFY(session2.state() == QNetworkSession::Connected);
+#if !(defined(Q_OS_SYMBIAN) && defined(__WINS__))
+ // On Symbian emulator, the support for data bearers is limited
+ QVERIFY(session.interface().isValid());
+#endif
+ QCOMPARE(session.interface().hardwareAddress(), session2.interface().hardwareAddress());
+ QCOMPARE(session.interface().index(), session2.interface().index());
+ }
+
+ sessionOpenedSpy2.clear();
+
+ if (forceSessionStop) {
+ // Test forcing the second session to stop the interface.
+ QNetworkSession::State previousState = session.state();
+#ifdef Q_CC_NOKIAX86
+ // For S60 emulator builds: RConnection::Stop does not work on all Emulators
+ bool expectStateChange = false;
+#else
+ bool expectStateChange = previousState != QNetworkSession::Disconnected;
+#endif
+
+ session2.stop();
+
+ QTRY_VERIFY(!sessionClosedSpy2.isEmpty() || !errorSpy2.isEmpty());
+
+ QVERIFY(!session2.isOpen());
+
+ if (!errorSpy2.isEmpty()) {
+ QVERIFY(!errorSpy.isEmpty());
+
+ // check for SessionAbortedError
+ QNetworkSession::SessionError error =
+ qvariant_cast<QNetworkSession::SessionError>(errorSpy.first().at(0));
+ QNetworkSession::SessionError error2 =
+ qvariant_cast<QNetworkSession::SessionError>(errorSpy2.first().at(0));
+
+ QVERIFY(error == QNetworkSession::SessionAbortedError);
+ QVERIFY(error2 == QNetworkSession::SessionAbortedError);
+
+ QCOMPARE(errorSpy.count(), 1);
+ QCOMPARE(errorSpy2.count(), 1);
+
+ errorSpy.clear();
+ errorSpy2.clear();
+ }
+
+ QVERIFY(errorSpy.isEmpty());
+ QVERIFY(errorSpy2.isEmpty());
+
+ if (expectStateChange)
+ QTRY_VERIFY(stateChangedSpy2.count() >= 2 || !errorSpy2.isEmpty());
+
+ if (!errorSpy2.isEmpty()) {
+ QVERIFY(session2.state() == previousState);
+ QVERIFY(session.state() == previousState);
+
+ QNetworkSession::SessionError error =
+ qvariant_cast<QNetworkSession::SessionError>(errorSpy2.first().at(0));
+ if (error == QNetworkSession::OperationNotSupportedError) {
+ // The session needed to bring down the interface,
+ // but the operation is not supported.
+ QSKIP("Configuration does not support stop().", SkipSingle);
+ } else if (error == QNetworkSession::InvalidConfigurationError) {
+ // The session needed to bring down the interface, but it is not possible for the
+ // specified configuration.
+ if ((session.configuration().state() & QNetworkConfiguration::Discovered) ==
+ QNetworkConfiguration::Discovered) {
+ QFAIL("Failed to stop session for Discovered configuration.");
+ } else {
+ QSKIP("Cannot test session for non-Discovered configuration.", SkipSingle);
+ }
+ } else {
+ QFAIL("Error stopping session.");
+ }
+ } else if (!sessionClosedSpy2.isEmpty()) {
+ if (expectStateChange) {
+ if (configuration.type() == QNetworkConfiguration::ServiceNetwork) {
+ bool roamedSuccessfully = false;
+
+ QCOMPARE(stateChangedSpy2.count(), 4);
+
+ QNetworkSession::State state =
+ qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(0).at(0));
+ QVERIFY(state == QNetworkSession::Connecting);
+
+ state = qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(1).at(0));
+ QVERIFY(state == QNetworkSession::Connected);
+
+ state = qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(2).at(0));
+ QVERIFY(state == QNetworkSession::Closing);
+
+ state = qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(3).at(0));
+ QVERIFY(state == QNetworkSession::Disconnected);
+
+ QTRY_VERIFY(stateChangedSpy.count() > 0);
+ state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(0).at(0));
+ if (state == QNetworkSession::Roaming) {
+ QTRY_VERIFY(!errorSpy.isEmpty() || stateChangedSpy.count() > 1);
+ if (stateChangedSpy.count() > 1) {
+ state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(1).at(0));
+ if (state == QNetworkSession::Connected) {
+ roamedSuccessfully = true;
+ QTRY_VERIFY(session2.state() == QNetworkSession::Disconnected);
+ }
+ }
+ }
+ if (roamedSuccessfully) {
+ QString configId = session.sessionProperty("ActiveConfiguration").toString();
+ QNetworkConfiguration config = manager.configurationFromIdentifier(configId);
+ QNetworkSession session3(config);
+ QSignalSpy errorSpy3(&session3, SIGNAL(error(QNetworkSession::SessionError)));
+ QSignalSpy sessionOpenedSpy3(&session3, SIGNAL(opened()));
+
+ session3.open();
+ session3.waitForOpened();
+
+ if (session.isOpen())
+ QVERIFY(!sessionOpenedSpy3.isEmpty() || !errorSpy3.isEmpty());
+
+ session.stop();
+
+ QTRY_VERIFY(session.state() == QNetworkSession::Disconnected);
+ QTRY_VERIFY(session3.state() == QNetworkSession::Disconnected);
+ }
+#ifndef Q_CC_NOKIAX86
+ if (!roamedSuccessfully)
+ QVERIFY(!errorSpy.isEmpty());
+#endif
+ } else {
+ QCOMPARE(stateChangedSpy2.count(), 2);
+
+ QNetworkSession::State state =
+ qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(0).at(0));
+ QVERIFY(state == QNetworkSession::Closing);
+
+ state = qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(1).at(0));
+ QVERIFY(state == QNetworkSession::Disconnected);
+ }
+
+ QTRY_VERIFY(!sessionClosedSpy.isEmpty());
+ QVERIFY(session.state() == QNetworkSession::Disconnected);
+ QVERIFY(session2.state() == QNetworkSession::Disconnected);
+ }
+
+ QVERIFY(errorSpy2.isEmpty());
+
+ ++inProcessSessionManagementCount;
+ } else {
+ QFAIL("Timeout waiting for session to stop.");
+ }
+
+#ifndef Q_CC_NOKIAX86
+ QVERIFY(!sessionClosedSpy.isEmpty());
+#endif
+ QVERIFY(!sessionClosedSpy2.isEmpty());
+
+#ifndef Q_CC_NOKIAX86
+ QVERIFY(!session.isOpen());
+#endif
+ QVERIFY(!session2.isOpen());
+ } else {
+ // Test closing the second session.
+ {
+ int stateChangedCountBeforeClose = stateChangedSpy2.count();
+ session2.close();
+
+ QTRY_VERIFY(!sessionClosedSpy2.isEmpty());
+#ifndef Q_CC_NOKIAX86
+ QVERIFY(stateChangedSpy2.count() == stateChangedCountBeforeClose);
+#endif
+
+ QVERIFY(sessionClosedSpy.isEmpty());
+
+ QVERIFY(session.isOpen());
+ QVERIFY(!session2.isOpen());
+ QVERIFY(session.state() == QNetworkSession::Connected);
+ QVERIFY(session2.state() == QNetworkSession::Connected);
+#if !(defined(Q_OS_SYMBIAN) && defined(__WINS__))
+ // On Symbian emulator, the support for data bearers is limited
+ QVERIFY(session.interface().isValid());
+#endif
+ QCOMPARE(session.interface().hardwareAddress(), session2.interface().hardwareAddress());
+ QCOMPARE(session.interface().index(), session2.interface().index());
+ }
+
+ sessionClosedSpy2.clear();
+
+ // Test closing the first session.
+ {
+#ifdef Q_CC_NOKIAX86
+ // For S60 emulator builds: RConnection::Close does not actually
+ // close network connection on all Emulators
+ bool expectStateChange = false;
+#else
+ bool expectStateChange = session.state() != QNetworkSession::Disconnected &&
+ manager.capabilities() & QNetworkConfigurationManager::SystemSessionSupport;
+#endif
+
+ session.close();
+
+ QTRY_VERIFY(!sessionClosedSpy.isEmpty() || !errorSpy.isEmpty());
+
+ QVERIFY(!session.isOpen());
+
+ if (expectStateChange)
+ QTRY_VERIFY(!stateChangedSpy.isEmpty() || !errorSpy.isEmpty());
+
+ if (!errorSpy.isEmpty()) {
+ QNetworkSession::SessionError error =
+ qvariant_cast<QNetworkSession::SessionError>(errorSpy.first().at(0));
+ if (error == QNetworkSession::OperationNotSupportedError) {
+ // The session needed to bring down the interface,
+ // but the operation is not supported.
+ QSKIP("Configuration does not support close().", SkipSingle);
+ } else if (error == QNetworkSession::InvalidConfigurationError) {
+ // The session needed to bring down the interface, but it is not possible for the
+ // specified configuration.
+ if ((session.configuration().state() & QNetworkConfiguration::Discovered) ==
+ QNetworkConfiguration::Discovered) {
+ QFAIL("Failed to close session for Discovered configuration.");
+ } else {
+ QSKIP("Cannot test session for non-Discovered configuration.", SkipSingle);
+ }
+ } else {
+ QFAIL("Error closing session.");
+ }
+ } else if (!sessionClosedSpy.isEmpty()) {
+ QVERIFY(sessionOpenedSpy.isEmpty());
+ QCOMPARE(sessionClosedSpy.count(), 1);
+ if (expectStateChange)
+ QVERIFY(!stateChangedSpy.isEmpty());
+ QVERIFY(errorSpy.isEmpty());
+
+ if (expectStateChange)
+ QTRY_VERIFY(session.state() == QNetworkSession::Disconnected);
+
+ ++inProcessSessionManagementCount;
+ } else {
+ QFAIL("Timeout waiting for session to close.");
+ }
+ }
+ }
+}
+
+QDebug operator<<(QDebug debug, const QList<QNetworkConfiguration> &list)
+{
+ debug.nospace() << "( ";
+ foreach (const QNetworkConfiguration &config, list)
+ debug.nospace() << config.identifier() << ", ";
+ debug.nospace() << ")\n";
+ return debug;
+}
+
+// Note: outOfProcessSession requires that at least one configuration is
+// at Discovered -state.
+void tst_QNetworkSession::outOfProcessSession()
+{
+ qDebug() << "START";
+
+#if defined(Q_OS_SYMBIAN) && defined(__WINS__)
+ QSKIP("Symbian emulator does not support two [QR]PRocesses linking a dll (QtBearer.dll) with global writeable static data.", SkipAll);
+#endif
+ QNetworkConfigurationManager manager;
+ // Create a QNetworkConfigurationManager to detect configuration changes made in Lackey. This
+ // is actually the essence of this testcase - to check that platform mediates/reflects changes
+ // regardless of process boundaries. The interprocess communication is more like a way to get
+ // this test-case act correctly and timely.
+ QList<QNetworkConfiguration> before = manager.allConfigurations(QNetworkConfiguration::Active);
+ QSignalSpy spy(&manager, SIGNAL(configurationChanged(QNetworkConfiguration)));
+
+ // Cannot read/write to processes on WinCE or Symbian.
+ // Easiest alternative is to use sockets for IPC.
+ QLocalServer oopServer;
+ // First remove possible earlier listening address which would cause listen to fail
+ // (e.g. previously abruptly ended unit test might cause this)
+ QLocalServer::removeServer("tst_qnetworksession");
+ oopServer.listen("tst_qnetworksession");
+
+ qDebug() << "starting lackey";
+ QProcess lackey;
+ lackey.start("lackey/lackey");
+ qDebug() << lackey.error() << lackey.errorString();
+ QVERIFY(lackey.waitForStarted());
+
+ qDebug() << "waiting for connection";
+ QVERIFY(oopServer.waitForNewConnection(-1));
+ QLocalSocket *oopSocket = oopServer.nextPendingConnection();
+ qDebug() << "got connection";
+ do {
+ QByteArray output;
+
+ if (oopSocket->waitForReadyRead())
+ output = oopSocket->readLine().trimmed();
+
+ if (output.startsWith("Started session ")) {
+ QString identifier = QString::fromLocal8Bit(output.mid(20).constData());
+ QNetworkConfiguration changed;
+
+ do {
+ QTRY_VERIFY(!spy.isEmpty());
+ changed = qvariant_cast<QNetworkConfiguration>(spy.takeFirst().at(0));
+ } while (changed.identifier() != identifier);
+
+ QVERIFY((changed.state() & QNetworkConfiguration::Active) ==
+ QNetworkConfiguration::Active);
+
+ QVERIFY(!before.contains(changed));
+
+ QList<QNetworkConfiguration> after =
+ manager.allConfigurations(QNetworkConfiguration::Active);
+
+ QVERIFY(after.contains(changed));
+
+ spy.clear();
+
+ oopSocket->write("stop\n");
+ oopSocket->waitForBytesWritten();
+
+ do {
+ QTRY_VERIFY(!spy.isEmpty());
+
+ changed = qvariant_cast<QNetworkConfiguration>(spy.takeFirst().at(0));
+ } while (changed.identifier() != identifier);
+
+ QVERIFY((changed.state() & QNetworkConfiguration::Active) !=
+ QNetworkConfiguration::Active);
+
+ QList<QNetworkConfiguration> afterStop =
+ manager.allConfigurations(QNetworkConfiguration::Active);
+
+ QVERIFY(!afterStop.contains(changed));
+
+ oopSocket->disconnectFromServer();
+ oopSocket->waitForDisconnected(-1);
+
+ lackey.waitForFinished();
+ }
+ // This is effected by QTBUG-4903, process will always report as running
+ //} while (lackey.state() == QProcess::Running);
+
+ // Workaround: the socket in the lackey will disconnect on exit
+ } while (oopSocket->state() == QLocalSocket::ConnectedState);
+
+ switch (lackey.exitCode()) {
+ case 0:
+ qDebug("Lackey returned exit success (0)");
+ break;
+ case 1:
+ QSKIP("No discovered configurations found.", SkipAll);
+ case 2:
+ QSKIP("Lackey could not start session.", SkipAll);
+ default:
+ QSKIP("Lackey failed", SkipAll);
+ }
+ qDebug("STOP");
+}
+
+// A convinience / helper function for testcases. Return the first matching configuration.
+// Ignores configurations in other than 'discovered' -state. Returns invalid (QNetworkConfiguration())
+// if none found.
+QNetworkConfiguration suitableConfiguration(QString bearerType, QNetworkConfiguration::Type configType) {
+ // Refresh configurations and derive configurations matching given parameters.
+ QNetworkConfigurationManager mgr;
+ QSignalSpy updateSpy(&mgr, SIGNAL(updateCompleted()));
+ mgr.updateConfigurations();
+ QTRY_NOOP(updateSpy.count() == 1);
+ if (updateSpy.count() != 1) {
+ qDebug("tst_QNetworkSession::suitableConfiguration() failure: unable to update configurations");
+ return QNetworkConfiguration();
+ }
+ QList<QNetworkConfiguration> discoveredConfigs = mgr.allConfigurations(QNetworkConfiguration::Discovered);
+ foreach(QNetworkConfiguration config, discoveredConfigs) {
+ if ((config.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
+ // qDebug() << "Dumping config because is active: " << config.name();
+ discoveredConfigs.removeOne(config);
+ } else if (config.type() != configType) {
+ // qDebug() << "Dumping config because type (IAP/SNAP) mismatches: " << config.name();
+ discoveredConfigs.removeOne(config);
+ } else if ((config.type() == QNetworkConfiguration::InternetAccessPoint) &&
+ bearerType == "cellular") { // 'cellular' bearertype is for convinience
+ if (config.bearerName() != "2G" &&
+ config.bearerName() != "CDMA2000" &&
+ config.bearerName() != "WCDMA" &&
+ config.bearerName() != "HSPA") {
+ // qDebug() << "Dumping config because bearer mismatches (cellular): " << config.name();
+ discoveredConfigs.removeOne(config);
+ }
+ } else if ((config.type() == QNetworkConfiguration::InternetAccessPoint) &&
+ bearerType != config.bearerName()) {
+ // qDebug() << "Dumping config because bearer mismatches (WLAN): " << config.name();
+ discoveredConfigs.removeOne(config);
+ }
+ }
+ if (discoveredConfigs.isEmpty()) {
+ qDebug("tst_QNetworkSession::suitableConfiguration() failure: no suitable configurations present.");
+ return QNetworkConfiguration();
+ } else {
+ return discoveredConfigs.first();
+ }
+}
+
+// A convinience function for test-cases: opens the given configuration and return
+// true if it was done gracefully.
+bool openSession(QNetworkSession *session) {
+ QNetworkConfigurationManager mgr;
+ QSignalSpy openedSpy(session, SIGNAL(opened()));
+ QSignalSpy stateChangeSpy(session, SIGNAL(stateChanged(QNetworkSession::State)));
+ QSignalSpy errorSpy(session, SIGNAL(error(QNetworkSession::SessionError)));
+ QSignalSpy configChangeSpy(&mgr, SIGNAL(configurationChanged(QNetworkConfiguration)));
+ // Store some initial statuses, because expected signals differ if the config is already
+ // active by some other session
+ QNetworkConfiguration::StateFlags configInitState = session->configuration().state();
+ QNetworkSession::State sessionInitState = session->state();
+
+ if (session->isOpen() ||
+ !session->sessionProperty("ActiveConfiguration").toString().isEmpty()) {
+ qDebug("tst_QNetworkSession::openSession() failure: session was already open / active.");
+ return false;
+ } else {
+ session->open();
+ session->waitForOpened(120000); // Bringing interfaces up and down may take time at platform
+ }
+ // Check that connection opening went by the book. Add checks here if more strictness needed.
+ if (!session->isOpen()) {
+ qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::open() failed.");
+ return false;
+ }
+ if (openedSpy.count() != 1) {
+ qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::opened() - signal not received.");
+ return false;
+ }
+ if (!errorSpy.isEmpty()) {
+ qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::error() - signal was detected.");
+ return false;
+ }
+ if (sessionInitState != QNetworkSession::Connected &&
+ stateChangeSpy.isEmpty()) {
+ qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::stateChanged() - signals not detected.");
+ return false;
+ }
+ if (configInitState != QNetworkConfiguration::Active &&
+ configChangeSpy.isEmpty()) {
+ qDebug("tst_QNetworkSession::openSession() failure: QNetworkConfigurationManager::configurationChanged() - signals not detected.");
+ return false;
+ }
+ if (session->configuration().state() != QNetworkConfiguration::Active) {
+ qDebug("tst_QNetworkSession::openSession() failure: session's configuration is not in 'Active' -state.");
+ return false;
+ }
+ return true;
+}
+
+// Helper function for closing opened session. Performs checks that
+// session is closed gradefully (e.g. signals). Function does not delete
+// the session. The lastSessionOnConfiguration (true by default) is used to
+// tell if there are more sessions open, basing on same configration. This
+// impacts the checks made.
+bool closeSession(QNetworkSession *session, bool lastSessionOnConfiguration) {
+ if (!session) {
+ qDebug("tst_QNetworkSession::closeSession() failure: NULL session given");
+ return false;
+ }
+ if (session->state() != QNetworkSession::Connected ||
+ !session->isOpen()) {
+ qDebug("tst_QNetworkSession::closeSession() failure: session is not opened.");
+ return false;
+ }
+ QNetworkConfigurationManager mgr;
+ QSignalSpy sessionClosedSpy(session, SIGNAL(closed()));
+ QSignalSpy sessionStateChangedSpy(session, SIGNAL(stateChanged(QNetworkSession::State)));
+ QSignalSpy sessionErrorSpy(session, SIGNAL(error(QNetworkSession::SessionError)));
+ QSignalSpy configChangeSpy(&mgr, SIGNAL(configurationChanged(QNetworkConfiguration)));
+
+ session->close();
+
+ if (!sessionErrorSpy.isEmpty()) {
+ qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession::error() received.");
+ return false;
+ }
+ if (sessionClosedSpy.count() != 1) {
+ qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession::closed() signal not received.");
+ return false;
+ }
+ if (lastSessionOnConfiguration &&
+ sessionStateChangedSpy.isEmpty()) {
+ qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession::stateChanged() signals not received.");
+ return false;
+ }
+ if (lastSessionOnConfiguration &&
+ session->state() != QNetworkSession::Disconnected) {
+ qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession is not in Disconnected -state");
+ return false;
+ }
+ QTRY_NOOP(!configChangeSpy.isEmpty());
+ if (lastSessionOnConfiguration &&
+ configChangeSpy.isEmpty()) {
+ qDebug("tst_QNetworkSession::closeSession() failure: QNetworkConfigurationManager::configurationChanged() - signal not detected.");
+ return false;
+ }
+ if (lastSessionOnConfiguration &&
+ session->configuration().state() != QNetworkConfiguration::Discovered) {
+ qDebug("tst_QNetworkSession::closeSession() failure: session's configuration is not back in 'Discovered' -state.");
+ return false;
+ }
+ return true;
+}
+
+void tst_QNetworkSession::sessionAutoClose_data()
+{
+ QTest::addColumn<QNetworkConfiguration>("configuration");
+
+ bool testData = false;
+ foreach (const QNetworkConfiguration &config,
+ manager.allConfigurations(QNetworkConfiguration::Discovered)) {
+ QNetworkSession session(config);
+ if (!session.sessionProperty(QLatin1String("AutoCloseSessionTimeout")).isValid())
+ continue;
+
+ testData = true;
+
+ const QString name = config.name().isEmpty() ? QString("<Hidden>") : config.name();
+ QTest::newRow(name.toLocal8Bit().constData()) << config;
+ }
+
+ if (!testData)
+ QSKIP("No applicable configurations to test", SkipAll);
+}
+
+void tst_QNetworkSession::sessionAutoClose()
+{
+ QFETCH(QNetworkConfiguration, configuration);
+
+ QNetworkSession session(configuration);
+
+ QVERIFY(session.configuration() == configuration);
+
+ QVariant autoCloseSession = session.sessionProperty(QLatin1String("AutoCloseSessionTimeout"));
+
+ QVERIFY(autoCloseSession.isValid());
+
+ // property defaults to false
+ QCOMPARE(autoCloseSession.toInt(), -1);
+
+ QSignalSpy closeSpy(&session, SIGNAL(closed()));
+
+ session.open();
+ session.waitForOpened();
+
+ if (!session.isOpen())
+ QSKIP("Session not open", SkipSingle);
+
+ // set session to auto close at next polling interval.
+ session.setSessionProperty(QLatin1String("AutoCloseSessionTimeout"), 0);
+
+ QTRY_VERIFY(!closeSpy.isEmpty());
+
+ QCOMPARE(session.state(), QNetworkSession::Connected);
+
+ QVERIFY(!session.isOpen());
+
+ QVERIFY(session.configuration() == configuration);
+
+ autoCloseSession = session.sessionProperty(QLatin1String("AutoCloseSessionTimeout"));
+
+ QVERIFY(autoCloseSession.isValid());
+
+ QCOMPARE(autoCloseSession.toInt(), -1);
+}
+
+QTEST_MAIN(tst_QNetworkSession)
+
+#include "tst_qnetworksession.moc"
+
diff --git a/tests/auto/qobject/moc_oldnormalizeobject.cpp b/tests/auto/qobject/moc_oldnormalizeobject.cpp
new file mode 100644
index 0000000000..3b1e6583ec
--- /dev/null
+++ b/tests/auto/qobject/moc_oldnormalizeobject.cpp
@@ -0,0 +1,154 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+** Meta object code from reading C++ file 'oldnormalizeobject.h'
+**
+** Created: Wed Nov 18 11:43:05 2009
+** by: The Qt Meta Object Compiler version 62 (Qt 4.6.0)
+**
+*****************************************************************************/
+
+// Yhis file was generated from moc version 4.6 to test binary compatibility
+// It should *not* be generated by the current moc
+
+#include "oldnormalizeobject.h"
+
+QT_BEGIN_MOC_NAMESPACE
+static const uint qt_meta_data_OldNormalizeObject[] = {
+
+ // content:
+ 4, // revision
+ 0, // classname
+ 0, 0, // classinfo
+ 6, 14, // methods
+ 0, 0, // properties
+ 0, 0, // enums/sets
+ 0, 0, // constructors
+ 0, // flags
+ 3, // signalCount
+
+ // signals: signature, parameters, type, tag, flags
+ 24, 20, 19, 19, 0x05,
+ 57, 20, 19, 19, 0x05,
+ 100, 20, 19, 19, 0x05,
+
+ // slots: signature, parameters, type, tag, flags
+ 149, 20, 19, 19, 0x0a,
+ 180, 20, 19, 19, 0x0a,
+ 221, 20, 19, 19, 0x0a,
+
+ 0 // eod
+};
+
+static const char qt_meta_stringdata_OldNormalizeObject[] = {
+ "OldNormalizeObject\0\0ref\0"
+ "typeRefSignal(Template<Class&>&)\0"
+ "constTypeRefSignal(Template<const Class&>)\0"
+ "typeConstRefSignal(Template<const Class&>const&)\0"
+ "typeRefSlot(Template<Class&>&)\0"
+ "constTypeRefSlot(Template<const Class&>)\0"
+ "typeConstRefSlot(Template<const Class&>const&)\0"
+};
+
+const QMetaObject OldNormalizeObject::staticMetaObject = {
+ { &QObject::staticMetaObject, qt_meta_stringdata_OldNormalizeObject,
+ qt_meta_data_OldNormalizeObject, 0 }
+};
+
+#ifdef Q_NO_DATA_RELOCATION
+const QMetaObject &OldNormalizeObject::getStaticMetaObject() { return staticMetaObject; }
+#endif //Q_NO_DATA_RELOCATION
+
+const QMetaObject *OldNormalizeObject::metaObject() const
+{
+ return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
+}
+
+void *OldNormalizeObject::qt_metacast(const char *_clname)
+{
+ if (!_clname) return 0;
+ if (!strcmp(_clname, qt_meta_stringdata_OldNormalizeObject))
+ return static_cast<void*>(const_cast< OldNormalizeObject*>(this));
+ return QObject::qt_metacast(_clname);
+}
+
+int OldNormalizeObject::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
+{
+ _id = QObject::qt_metacall(_c, _id, _a);
+ if (_id < 0)
+ return _id;
+ if (_c == QMetaObject::InvokeMetaMethod) {
+ switch (_id) {
+ case 0: typeRefSignal((*reinterpret_cast< Template<Class&>(*)>(_a[1]))); break;
+ case 1: constTypeRefSignal((*reinterpret_cast< const Template<const Class&>(*)>(_a[1]))); break;
+ case 2: typeConstRefSignal((*reinterpret_cast< Template<const Class&>const(*)>(_a[1]))); break;
+ case 3: typeRefSlot((*reinterpret_cast< Template<Class&>(*)>(_a[1]))); break;
+ case 4: constTypeRefSlot((*reinterpret_cast< const Template<const Class&>(*)>(_a[1]))); break;
+ case 5: typeConstRefSlot((*reinterpret_cast< Template<const Class&>const(*)>(_a[1]))); break;
+ default: ;
+ }
+ _id -= 6;
+ }
+ return _id;
+}
+
+// SIGNAL 0
+void OldNormalizeObject::typeRefSignal(Template<Class&> & _t1)
+{
+ void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
+ QMetaObject::activate(this, &staticMetaObject, 0, _a);
+}
+
+// SIGNAL 1
+void OldNormalizeObject::constTypeRefSignal(const Template<const Class&> & _t1)
+{
+ void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
+ QMetaObject::activate(this, &staticMetaObject, 1, _a);
+}
+
+// SIGNAL 2
+void OldNormalizeObject::typeConstRefSignal(Template<Class const&> const & _t1)
+{
+ void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
+ QMetaObject::activate(this, &staticMetaObject, 2, _a);
+}
+QT_END_MOC_NAMESPACE
diff --git a/tests/auto/qobject/oldnormalizeobject.h b/tests/auto/qobject/oldnormalizeobject.h
new file mode 100644
index 0000000000..3adf04d102
--- /dev/null
+++ b/tests/auto/qobject/oldnormalizeobject.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** 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 QtTest module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef OLDNORMALIZEOBJECT_H
+#define OLDNORMALIZEOBJECT_H
+
+#include <QObject>
+
+struct Struct;
+class Class;
+template <typename T> class Template;
+
+// An object with old moc output that incorrectly normalizes 'T<C> const &' in the function
+// signatures
+class OldNormalizeObject : public QObject
+{
+ /* tmake ignore Q_OBJECT */
+ Q_OBJECT
+
+signals:
+ void typeRefSignal(Template<Class &> &ref);
+ void constTypeRefSignal(const Template<const Class &> &ref);
+ void typeConstRefSignal(Template<Class const &> const &ref);
+
+public slots:
+ void typeRefSlot(Template<Class &> &) {}
+ void constTypeRefSlot(const Template<const Class &> &) {}
+ void typeConstRefSlot(Template<Class const &> const &) {}
+};
+
+#endif // OLDNORMALIZEOBJECT_H
diff --git a/tests/auto/qobject/tst_qobject.cpp b/tests/auto/qobject/tst_qobject.cpp
index 985dfa43da..0161a68987 100644
--- a/tests/auto/qobject/tst_qobject.cpp
+++ b/tests/auto/qobject/tst_qobject.cpp
@@ -1112,6 +1112,8 @@ void tst_QObject::streamCustomTypes()
QCOMPARE(instanceCount, 0);
}
+typedef QString CustomString;
+
class PropertyObject : public QObject
{
Q_OBJECT
@@ -1125,6 +1127,7 @@ class PropertyObject : public QObject
Q_PROPERTY(CustomType* custom READ custom WRITE setCustom)
Q_PROPERTY(float myFloat READ myFloat WRITE setMyFloat)
Q_PROPERTY(qreal myQReal READ myQReal WRITE setMyQReal)
+ Q_PROPERTY(CustomString customString READ customString WRITE setCustomString )
public:
enum Alpha {
@@ -1163,6 +1166,9 @@ public:
void setMyQReal(qreal value) { m_qreal = value; }
qreal myQReal() const { return m_qreal; }
+ CustomString customString() const { return m_customString; }
+ void setCustomString(const QString &string) { m_customString = string; }
+
private:
Alpha m_alpha;
Priority m_priority;
@@ -1172,6 +1178,7 @@ private:
CustomType *m_custom;
float m_float;
qreal m_qreal;
+ CustomString m_customString;
};
Q_DECLARE_METATYPE(PropertyObject::Priority)
@@ -1626,6 +1633,15 @@ void tst_QObject::property()
QCOMPARE(qVariantValue<PropertyObject::Priority>(object.property("priority")), PropertyObject::Low);
object.setProperty("priority", var);
QCOMPARE(qVariantValue<PropertyObject::Priority>(object.property("priority")), PropertyObject::High);
+
+ qRegisterMetaType<CustomString>("CustomString");
+ QVERIFY(mo->indexOfProperty("customString") != -1);
+ QCOMPARE(object.property("customString").toString(), QString());
+ object.setCustomString("String1");
+ QCOMPARE(object.property("customString"), QVariant("String1"));
+ QVERIFY(object.setProperty("customString", "String2"));
+ QCOMPARE(object.property("customString"), QVariant("String2"));
+ QVERIFY(!object.setProperty("customString", QVariant()));
}
void tst_QObject::metamethod()
@@ -2024,6 +2040,7 @@ enum Enum { };
struct Struct { };
class Class { };
+template <typename T> class Template { };
class NormalizeObject : public QObject
{
@@ -2061,6 +2078,12 @@ signals:
void unsignedshortSignal(unsigned short);
void unsignedcharSignal(unsigned char);
+ void typeRefSignal(Template<Class &> &ref);
+ void constTypeRefSignal(const Template<Class const &> &ref);
+ void typeConstRefSignal(Template<Class const &> const &ref);
+
+ void typePointerConstRefSignal(Class * const &);
+
public slots:
void uintPointerSlot(uint *) { }
void ulongPointerSlot(ulong *) { }
@@ -2092,8 +2115,15 @@ public slots:
void unsignedshortSlot(unsigned short) {};
void unsignedcharSlot(unsigned char) {};
+ void typeRefSlot(Template<Class &> &) {}
+ void constTypeRefSlot(const Template<const Class &> &) {}
+ void typeConstRefSlot(Template<Class const &> const &) {}
+
+ void typePointerConstRefSlot(Class * const &) {}
};
+#include "oldnormalizeobject.h"
+
void tst_QObject::normalize()
{
NormalizeObject object;
@@ -2333,7 +2363,165 @@ void tst_QObject::normalize()
SIGNAL(unsignedcharSignal(unsigned char)),
SLOT(unsignedcharSlot(unsigned char))));
+ // connect when original template signature and mixed usage of 'T<C const &> const &',
+ // 'const T<const C &> &', and 'T<const C &>'
+
+ QVERIFY(object.connect(&object,
+ SIGNAL(typeRefSignal(Template<Class &> &)),
+ SLOT(typeRefSlot(Template<Class &> &))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(constTypeRefSignal(const Template<const Class &> &)),
+ SLOT(constTypeRefSlot(const Template<const Class &> &))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(constTypeRefSignal(const Template<const Class &> &)),
+ SLOT(constTypeRefSlot(const Template<Class const &> &))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(constTypeRefSignal(const Template<const Class &> &)),
+ SLOT(constTypeRefSlot(Template<Class const &> const &))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(constTypeRefSignal(Template<const Class &> const &)),
+ SLOT(constTypeRefSlot(Template<Class const &> const &))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(constTypeRefSignal(Template<Class const &> const &)),
+ SLOT(constTypeRefSlot(Template<Class const &> const &))));
+
+ QVERIFY(object.connect(&object,
+ SIGNAL(constTypeRefSignal(const Template<const Class &> &)),
+ SLOT(typeConstRefSlot(const Template<const Class &> &))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(constTypeRefSignal(const Template<const Class &> &)),
+ SLOT(typeConstRefSlot(const Template<Class const &> &))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(constTypeRefSignal(const Template<const Class &> &)),
+ SLOT(typeConstRefSlot(Template<Class const &> const &))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(constTypeRefSignal(Template<const Class &> const &)),
+ SLOT(typeConstRefSlot(Template<Class const &> const &))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(constTypeRefSignal(Template<Class const &> const &)),
+ SLOT(typeConstRefSlot(Template<Class const &> const &))));
+
+ QVERIFY(object.connect(&object,
+ SIGNAL(typeConstRefSignal(const Template<const Class &> &)),
+ SLOT(constTypeRefSlot(const Template<const Class &> &))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(typeConstRefSignal(const Template<const Class &> &)),
+ SLOT(constTypeRefSlot(const Template<Class const &> &))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(typeConstRefSignal(const Template<const Class &> &)),
+ SLOT(constTypeRefSlot(Template<Class const &> const &))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(typeConstRefSignal(Template<const Class &> const &)),
+ SLOT(constTypeRefSlot(Template<Class const &> const &))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(typeConstRefSignal(Template<Class const &> const &)),
+ SLOT(constTypeRefSlot(Template<Class const &> const &))));
+
+ QVERIFY(object.connect(&object,
+ SIGNAL(typeConstRefSignal(const Template<const Class &> &)),
+ SLOT(typeConstRefSlot(const Template<const Class &> &))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(typeConstRefSignal(const Template<const Class &> &)),
+ SLOT(typeConstRefSlot(const Template<Class const &> &))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(typeConstRefSignal(const Template<const Class &> &)),
+ SLOT(typeConstRefSlot(Template<Class const &> const &))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(typeConstRefSignal(Template<const Class &> const &)),
+ SLOT(typeConstRefSlot(Template<Class const &> const &))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(typeConstRefSignal(Template<Class const &> const &)),
+ SLOT(typeConstRefSlot(Template<Class const &> const &))));
+
+ // same test again, this time with an object compiled with old moc output... we know that
+ // it is not possible to connect everything, whic is the purpose for this test
+ OldNormalizeObject oldobject;
+
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(constTypeRefSignal(const Template<const Class &> &)),
+ SLOT(constTypeRefSlot(const Template<const Class &> &))));
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(constTypeRefSignal(const Template<const Class &> &)),
+ SLOT(constTypeRefSlot(const Template<Class const &> &))));
+ // this fails in older versions, but passes now due to proper normalizing
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(constTypeRefSignal(const Template<const Class &> &)),
+ SLOT(constTypeRefSlot(Template<Class const &> const &))));
+ // this fails in older versions, but passes now due to proper normalizing
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(constTypeRefSignal(Template<const Class &> const &)),
+ SLOT(constTypeRefSlot(Template<Class const &> const &))));
+ // this fails in older versions, but passes now due to proper normalizing
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(constTypeRefSignal(Template<Class const &> const &)),
+ SLOT(constTypeRefSlot(Template<Class const &> const &))));
+
+ // these fail in older Qt versions, but pass now due to proper normalizing
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(constTypeRefSignal(const Template<const Class &> &)),
+ SLOT(typeConstRefSlot(const Template<const Class &> &))));
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(constTypeRefSignal(const Template<const Class &> &)),
+ SLOT(typeConstRefSlot(const Template<Class const &> &))));
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(constTypeRefSignal(const Template<const Class &> &)),
+ SLOT(typeConstRefSlot(Template<Class const &> const &))));
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(constTypeRefSignal(Template<const Class &> const &)),
+ SLOT(typeConstRefSlot(Template<Class const &> const &))));
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(constTypeRefSignal(Template<Class const &> const &)),
+ SLOT(typeConstRefSlot(Template<Class const &> const &))));
+
+ // these also fail in older Qt versions, but pass now due to proper normalizing
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(typeConstRefSignal(const Template<const Class &> &)),
+ SLOT(constTypeRefSlot(const Template<const Class &> &))));
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(typeConstRefSignal(const Template<const Class &> &)),
+ SLOT(constTypeRefSlot(const Template<Class const &> &))));
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(typeConstRefSignal(const Template<const Class &> &)),
+ SLOT(constTypeRefSlot(Template<Class const &> const &))));
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(typeConstRefSignal(Template<const Class &> const &)),
+ SLOT(constTypeRefSlot(Template<Class const &> const &))));
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(typeConstRefSignal(Template<Class const &> const &)),
+ SLOT(constTypeRefSlot(Template<Class const &> const &))));
+
+ // this fails in older versions, but passes now due to proper normalizing
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(typeConstRefSignal(const Template<const Class &> &)),
+ SLOT(typeConstRefSlot(const Template<const Class &> &))));
+ // this fails in older versions, but passes now due to proper normalizing
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(typeConstRefSignal(const Template<const Class &> &)),
+ SLOT(typeConstRefSlot(const Template<Class const &> &))));
+ // this fails in older versions, but passes now due to proper normalizing
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(typeConstRefSignal(const Template<const Class &> &)),
+ SLOT(typeConstRefSlot(Template<Class const &> const &))));
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(typeConstRefSignal(Template<const Class &> const &)),
+ SLOT(typeConstRefSlot(Template<Class const &> const &))));
+ QVERIFY(oldobject.connect(&oldobject,
+ SIGNAL(typeConstRefSignal(Template<Class const &> const &)),
+ SLOT(typeConstRefSlot(Template<Class const &> const &))));
+
+ QVERIFY(object.connect(&object,
+ SIGNAL(typePointerConstRefSignal(Class*const&)),
+ SLOT(typePointerConstRefSlot(Class*const&))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(typePointerConstRefSignal(Class*const&)),
+ SLOT(typePointerConstRefSlot(Class*))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(typePointerConstRefSignal(Class*)),
+ SLOT(typePointerConstRefSlot(Class*const&))));
+ QVERIFY(object.connect(&object,
+ SIGNAL(typePointerConstRefSignal(Class*)),
+ SLOT(typePointerConstRefSlot(Class*))));
}
class SiblingDeleter : public QObject
diff --git a/tests/auto/qobject/tst_qobject.pro b/tests/auto/qobject/tst_qobject.pro
index 003ee985e3..0200f3ef08 100644
--- a/tests/auto/qobject/tst_qobject.pro
+++ b/tests/auto/qobject/tst_qobject.pro
@@ -1,16 +1,20 @@
load(qttest_p4)
-SOURCES += tst_qobject.cpp
+SOURCES += tst_qobject.cpp
-QT = core network gui
-contains(QT_CONFIG, qt3support):DEFINES+=QT_HAS_QT3SUPPORT
+# this is here for a reason, moc_oldnormalizedobject.cpp is not auto-generated, it was generated by
+# moc from Qt 4.6, and should *not* be generated by the current moc
+SOURCES += moc_oldnormalizeobject.cpp
-wince*: {
- addFiles.sources = signalbug.exe
- addFiles.path = .
- DEPLOYMENT += addFiles
+QT = core \
+ network \
+ gui
+contains(QT_CONFIG, qt3support):DEFINES += QT_HAS_QT3SUPPORT
+wince*: {
+ addFiles.sources = signalbug.exe
+ addFiles.path = .
+ DEPLOYMENT += addFiles
}
-
-symbian: {
+symbian: {
addFiles.sources = signalbug.exe
addFiles.path = \sys\bin
DEPLOYMENT += addFiles
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp
index beb83a195d..701dc2ed0e 100644
--- a/tests/auto/qpainter/tst_qpainter.cpp
+++ b/tests/auto/qpainter/tst_qpainter.cpp
@@ -107,6 +107,7 @@ private slots:
void saveAndRestore();
void drawBorderPixmap();
+ void drawPixmapFragments();
void drawLine_data();
void drawLine();
@@ -994,6 +995,49 @@ void tst_QPainter::drawBorderPixmap()
QTileRules(Qt::StretchTile,Qt::StretchTile), 0);
}
+void tst_QPainter::drawPixmapFragments()
+{
+ QPixmap origPixmap(20, 20);
+ QPixmap resPixmap(20, 20);
+ QPainter::PixmapFragment fragments[4] = { {15, 15, 0, 0, 10, 10, 1, 1, 0, 1},
+ { 5, 15, 10, 0, 10, 10, 1, 1, 0, 1},
+ {15, 5, 0, 10, 10, 10, 1, 1, 0, 1},
+ { 5, 5, 10, 10, 10, 10, 1, 1, 0, 1} };
+ {
+ QPainter p(&origPixmap);
+ p.fillRect(0, 0, 10, 10, Qt::red);
+ p.fillRect(10, 0, 10, 10, Qt::green);
+ p.fillRect(0, 10, 10, 10, Qt::blue);
+ p.fillRect(10, 10, 10, 10, Qt::yellow);
+ }
+ {
+ QPainter p(&resPixmap);
+ p.drawPixmapFragments(fragments, 4, origPixmap);
+ }
+
+ QImage origImage = origPixmap.toImage().convertToFormat(QImage::Format_ARGB32);
+ QImage resImage = resPixmap.toImage().convertToFormat(QImage::Format_ARGB32);
+
+ QVERIFY(resImage.size() == resPixmap.size());
+ QVERIFY(resImage.pixel(5, 5) == origImage.pixel(15, 15));
+ QVERIFY(resImage.pixel(5, 15) == origImage.pixel(15, 5));
+ QVERIFY(resImage.pixel(15, 5) == origImage.pixel(5, 15));
+ QVERIFY(resImage.pixel(15, 15) == origImage.pixel(5, 5));
+
+
+ QPainter::PixmapFragment fragment = QPainter::PixmapFragment::create(QPointF(20, 20), QRectF(30, 30, 2, 2));
+ QVERIFY(fragment.x == 20);
+ QVERIFY(fragment.y == 20);
+ QVERIFY(fragment.sourceLeft == 30);
+ QVERIFY(fragment.sourceTop == 30);
+ QVERIFY(fragment.width == 2);
+ QVERIFY(fragment.height == 2);
+ QVERIFY(fragment.scaleX == 1);
+ QVERIFY(fragment.scaleY == 1);
+ QVERIFY(fragment.rotation == 0);
+ QVERIFY(fragment.opacity == 1);
+}
+
void tst_QPainter::drawLine_data()
{
QTest::addColumn<QLine>("line");
@@ -3443,8 +3487,8 @@ bool verifyOutlineFillConsistency(const QImage &img, QRgb outside, QRgb inside,
if ((dx == 0) == (dy == 0))
continue;
QRgb neighbor = img.pixel(p.x() + dx, p.y() + dy);
- if (pixel == inside && neighbor == outside ||
- pixel == outside && neighbor == inside)
+ if ((pixel == inside && neighbor == outside) ||
+ (pixel == outside && neighbor == inside))
return false;
}
}
diff --git a/tests/auto/qpathclipper/pathcompare.h b/tests/auto/qpathclipper/pathcompare.h
new file mode 100644
index 0000000000..eb25e4c637
--- /dev/null
+++ b/tests/auto/qpathclipper/pathcompare.h
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef PATHCOMPARE_H
+#define PATHCOMPARE_H
+
+#include <qmath.h>
+
+namespace QPathCompare {
+
+static const int precision = 8;
+static const qreal epsilon = qPow(0.1, precision);
+
+static inline bool fuzzyIsZero(qreal x, qreal relative)
+{
+ if (qAbs(relative) < epsilon)
+ return qAbs(x) < epsilon;
+ else
+ return qAbs(x / relative) < epsilon;
+}
+
+static bool fuzzyCompare(const QPointF &a, const QPointF &b)
+{
+ const QPointF delta = a - b;
+
+ const qreal x = qMax(qAbs(a.x()), qAbs(b.x()));
+ const qreal y = qMax(qAbs(a.y()), qAbs(b.y()));
+
+ return fuzzyIsZero(delta.x(), x) && fuzzyIsZero(delta.y(), y);
+}
+
+static bool isClosed(const QPainterPath &path)
+{
+ if (path.elementCount() == 0)
+ return false;
+
+ QPointF first = path.elementAt(0);
+ QPointF last = path.elementAt(path.elementCount() - 1);
+
+ return fuzzyCompare(first, last);
+}
+
+// rotation and direction independent path comparison
+// allows paths to be shifted or reversed relative to each other
+static bool comparePaths(const QPainterPath &actual, const QPainterPath &expected)
+{
+ const int endActual = isClosed(actual) ? actual.elementCount() - 1 : actual.elementCount();
+ const int endExpected = isClosed(expected) ? expected.elementCount() - 1 : expected.elementCount();
+
+ if (endActual != endExpected)
+ return false;
+
+ for (int i = 0; i < endActual; ++i) {
+ int k = 0;
+ for (k = 0; k < endActual; ++k) {
+ int i1 = k;
+ int i2 = (i + k) % endActual;
+
+ QPointF a = actual.elementAt(i1);
+ QPointF b = expected.elementAt(i2);
+
+ if (!fuzzyCompare(a, b))
+ break;
+ }
+
+ if (k == endActual)
+ return true;
+
+ for (k = 0; k < endActual; ++k) {
+ int i1 = k;
+ int i2 = (i + endActual - k) % endActual;
+
+ QPointF a = actual.elementAt(i1);
+ QPointF b = expected.elementAt(i2);
+
+ if (!fuzzyCompare(a, b))
+ break;
+ }
+
+ if (k == endActual)
+ return true;
+ }
+
+ return false;
+}
+
+}
+
+#endif
diff --git a/tests/auto/qpathclipper/tst_qpathclipper.cpp b/tests/auto/qpathclipper/tst_qpathclipper.cpp
index 5b49545b06..38d253a314 100644
--- a/tests/auto/qpathclipper/tst_qpathclipper.cpp
+++ b/tests/auto/qpathclipper/tst_qpathclipper.cpp
@@ -40,6 +40,7 @@
****************************************************************************/
#include "private/qpathclipper_p.h"
#include "paths.h"
+#include "pathcompare.h"
#include <QtTest/QtTest>
@@ -336,13 +337,17 @@ static QPainterPath samplePath13()
static QPainterPath samplePath14()
{
QPainterPath path;
- path.moveTo(QPointF(100, 180));
- path.lineTo(QPointF(100, 80));
- path.lineTo(QPointF(120, 80));
- path.lineTo(QPointF(120, 100));
- path.lineTo(QPointF(160, 100));
- path.lineTo(QPointF(160, 180));
- path.lineTo(QPointF(100, 180));
+
+ path.moveTo(160, 80);
+ path.lineTo(160, 180);
+ path.lineTo(100, 180);
+ path.lineTo(100, 80);
+ path.lineTo(160, 80);
+ path.moveTo(160, 80);
+ path.lineTo(160, 100);
+ path.lineTo(120, 100);
+ path.lineTo(120, 80);
+
return path;
}
@@ -426,82 +431,6 @@ void tst_QPathClipper::clip_data()
<< samplePath14();
}
-static const int precision = 8;
-static const qreal epsilon = pow(0.1, precision);
-
-static inline bool fuzzyIsZero(qreal x, qreal relative)
-{
- if (qAbs(relative) < epsilon)
- return qAbs(x) < epsilon;
- else
- return qAbs(x / relative) < epsilon;
-}
-
-static bool fuzzyCompare(const QPointF &a, const QPointF &b)
-{
- const QPointF delta = a - b;
-
- const qreal x = qMax(qAbs(a.x()), qAbs(b.x()));
- const qreal y = qMax(qAbs(a.y()), qAbs(b.y()));
-
- return fuzzyIsZero(delta.x(), x) && fuzzyIsZero(delta.y(), y);
-}
-
-static bool isClosed(const QPainterPath &path)
-{
- if (path.elementCount() == 0)
- return false;
-
- QPointF first = path.elementAt(0);
- QPointF last = path.elementAt(path.elementCount() - 1);
-
- return fuzzyCompare(first, last);
-}
-
-// rotation and direction independent path comparison
-// allows paths to be shifted or reversed relative to each other
-static bool comparePaths(const QPainterPath &actual, const QPainterPath &expected)
-{
- const int endActual = isClosed(actual) ? actual.elementCount() - 1 : actual.elementCount();
- const int endExpected = isClosed(expected) ? expected.elementCount() - 1 : expected.elementCount();
-
- if (endActual != endExpected)
- return false;
-
- for (int i = 0; i < endActual; ++i) {
- int k = 0;
- for (k = 0; k < endActual; ++k) {
- int i1 = k;
- int i2 = (i + k) % endActual;
-
- QPointF a = actual.elementAt(i1);
- QPointF b = expected.elementAt(i2);
-
- if (!fuzzyCompare(a, b))
- break;
- }
-
- if (k == endActual)
- return true;
-
- for (k = 0; k < endActual; ++k) {
- int i1 = k;
- int i2 = (i + endActual - k) % endActual;
-
- QPointF a = actual.elementAt(i1);
- QPointF b = expected.elementAt(i2);
-
- if (!fuzzyCompare(a, b))
- break;
- }
-
- if (k == endActual)
- return true;
- }
-
- return false;
-}
-
// sanity check to make sure comparePaths declared above works
void tst_QPathClipper::testComparePaths()
{
@@ -511,12 +440,12 @@ void tst_QPathClipper::testComparePaths()
a.addRect(0, 0, 10, 10);
b.addRect(0, 0, 10.00001, 10.00001);
- QVERIFY(!comparePaths(a, b));
+ QVERIFY(!QPathCompare::comparePaths(a, b));
b = QPainterPath();
b.addRect(0, 0, 10.00000000001, 10.00000000001);
- QVERIFY(comparePaths(a, b));
+ QVERIFY(QPathCompare::comparePaths(a, b));
b = QPainterPath();
b.moveTo(10, 0);
@@ -524,9 +453,9 @@ void tst_QPathClipper::testComparePaths()
b.lineTo(0, 10);
b.lineTo(10, 10);
- QVERIFY(comparePaths(a, b));
+ QVERIFY(QPathCompare::comparePaths(a, b));
b.lineTo(10, 0);
- QVERIFY(comparePaths(a, b));
+ QVERIFY(QPathCompare::comparePaths(a, b));
b = QPainterPath();
b.moveTo(10, 0);
@@ -534,7 +463,7 @@ void tst_QPathClipper::testComparePaths()
b.lineTo(0, 0);
b.lineTo(10, 10);
- QVERIFY(!comparePaths(a, b));
+ QVERIFY(!QPathCompare::comparePaths(a, b));
}
void tst_QPathClipper::clip()
@@ -549,7 +478,7 @@ void tst_QPathClipper::clip()
QPathClipper clipper(subject, clip);
QPainterPath x = clipper.clip(op);
- QVERIFY(comparePaths(x, result));
+ QVERIFY(QPathCompare::comparePaths(x, result));
}
static inline QPointF randomPointInRect(const QRectF &rect)
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index d7c6ad33fb..49b1e52977 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -47,6 +47,7 @@
#include <qmatrix.h>
#include <qdesktopwidget.h>
#include <qpaintengine.h>
+#include <qtreewidget.h>
#include <qsplashscreen.h>
#include <private/qpixmapdata_p.h>
@@ -797,14 +798,32 @@ void tst_QPixmap::drawBitmap()
void tst_QPixmap::grabWidget()
{
QWidget widget;
- widget.setPalette(Qt::green);
- widget.resize(128, 128);
+ QImage image(128, 128, QImage::Format_ARGB32_Premultiplied);
+ for (int row = 0; row < image.height(); ++row) {
+ QRgb *line = reinterpret_cast<QRgb *>(image.scanLine(row));
+ for (int col = 0; col < image.width(); ++col)
+ line[col] = qRgb(rand() & 255, row, col);
+ }
- QPixmap expected(64, 64);
- expected.fill(Qt::green);
+ QPalette pal = widget.palette();
+ pal.setBrush(QPalette::Window, QBrush(image));
+ widget.setPalette(pal);
+ widget.resize(128, 128);
+ QPixmap expected = QPixmap::fromImage(QImage(image.scanLine(64) + 64 * 4, 64, 64, image.bytesPerLine(), image.format()));
QPixmap actual = QPixmap::grabWidget(&widget, QRect(64, 64, 64, 64));
QVERIFY(lenientCompare(actual, expected));
+
+ actual = QPixmap::grabWidget(&widget, 64, 64);
+ QVERIFY(lenientCompare(actual, expected));
+
+ // Make sure a widget that is not yet shown is grabbed correctly.
+ QTreeWidget widget2;
+ actual = QPixmap::grabWidget(&widget2);
+ widget2.show();
+ expected = QPixmap::grabWidget(&widget2);
+
+ QVERIFY(lenientCompare(actual, expected));
}
void tst_QPixmap::grabWindow()
diff --git a/tests/auto/qprinter/tst_qprinter.cpp b/tests/auto/qprinter/tst_qprinter.cpp
index b1ff425e3f..49bddb2a0c 100644
--- a/tests/auto/qprinter/tst_qprinter.cpp
+++ b/tests/auto/qprinter/tst_qprinter.cpp
@@ -106,7 +106,8 @@ private slots:
void testCustomPageSizes();
void printDialogCompleter();
- void testActualNumCopies();
+ void testCopyCount();
+ void testCurrentPage();
void taskQTBUG4497_reusePrinterOnDifferentFiles();
@@ -455,7 +456,7 @@ void tst_QPrinter::testNonExistentPrinter()
printer.pageSize();
printer.orientation();
printer.fullPage();
- printer.setNumCopies(1);
+ printer.setCopyCount(1);
printer.printerName();
// nor metrics
@@ -966,11 +967,11 @@ void tst_QPrinter::printDialogCompleter()
#endif
}
-void tst_QPrinter::testActualNumCopies()
+void tst_QPrinter::testCopyCount()
{
QPrinter p;
- p.setNumCopies(15);
- QCOMPARE(p.actualNumCopies(), 15);
+ p.setCopyCount(15);
+ QCOMPARE(p.copyCount(), 15);
}
static void printPage(QPainter *painter)
@@ -1005,5 +1006,27 @@ void tst_QPrinter::taskQTBUG4497_reusePrinterOnDifferentFiles()
QCOMPARE(file1.readAll(), file2.readAll());
}
+void tst_QPrinter::testCurrentPage()
+{
+ QPrinter printer;
+ printer.setFromTo(1, 10);
+
+ // Test set print range
+ printer.setPrintRange(QPrinter::CurrentPage);
+ QCOMPARE(printer.printRange(), QPrinter::CurrentPage);
+ QCOMPARE(printer.fromPage(), 1);
+ QCOMPARE(printer.toPage(), 10);
+
+ QPrintDialog dialog(&printer);
+
+ // Test default Current Page option to off
+ QCOMPARE(dialog.isOptionEnabled(QPrintDialog::PrintCurrentPage), false);
+
+ // Test enable Current Page option
+ dialog.setOption(QPrintDialog::PrintCurrentPage);
+ QCOMPARE(dialog.isOptionEnabled(QPrintDialog::PrintCurrentPage), true);
+
+}
+
QTEST_MAIN(tst_QPrinter)
#include "tst_qprinter.moc"
diff --git a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
index 0c444fca6f..849b8b2b2e 100644
--- a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
+++ b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
@@ -45,6 +45,7 @@
#include <QtCore/qpropertyanimation.h>
#include <QtCore/qvariantanimation.h>
#include <QtGui/qwidget.h>
+#include "../../shared/util.h"
//TESTED_CLASS=QPropertyAnimation
//TESTED_FILES=
diff --git a/tests/auto/qregexp/tst_qregexp.cpp b/tests/auto/qregexp/tst_qregexp.cpp
index 4d16ab503c..ea07323f3b 100644
--- a/tests/auto/qregexp/tst_qregexp.cpp
+++ b/tests/auto/qregexp/tst_qregexp.cpp
@@ -102,6 +102,9 @@ private slots:
void reentrancy();
void threadsafeEngineCache();
+
+ void QTBUG_7049_data();
+ void QTBUG_7049();
};
// Testing get/set functions
@@ -1333,5 +1336,95 @@ void tst_QRegExp::operator_eq()
}
}
+void tst_QRegExp::QTBUG_7049_data()
+{
+ QTest::addColumn<QString>("reStr");
+ QTest::addColumn<QString>("text");
+ QTest::addColumn<int>("matchIndex");
+
+ QTest::addColumn<int>("pos0");
+ QTest::addColumn<int>("pos1");
+ QTest::addColumn<int>("pos2");
+
+ QTest::addColumn<QString>("cap0");
+ QTest::addColumn<QString>("cap1");
+ QTest::addColumn<QString>("cap2");
+
+ QTest::newRow("no match")
+ << QString("(a) (b)") << QString("b a") << -1
+ << -1 << -1 << -1 << QString() << QString() << QString();
+
+ QTest::newRow("both captures match")
+ << QString("(a) (b)") << QString("a b") << 0
+ << 0 << 0 << 2 << QString("a b") << QString("a") << QString("b");
+
+ QTest::newRow("first capture matches @0")
+ << QString("(a*)|(b*)") << QString("axx") << 0
+ << 0 << 0 << -1 << QString("a") << QString("a") << QString();
+ QTest::newRow("second capture matches @0")
+ << QString("(a*)|(b*)") << QString("bxx") << 0
+ << 0 << -1 << 0 << QString("b") << QString() << QString("b");
+ QTest::newRow("first capture empty match @0")
+ << QString("(a*)|(b*)") << QString("xx") << 0
+ << 0 << -1 << -1 << QString("") << QString() << QString();
+ QTest::newRow("second capture empty match @0")
+ << QString("(a)|(b*)") << QString("xx") << 0
+ << 0 << -1 << -1 << QString("") << QString() << QString();
+
+ QTest::newRow("first capture matches @1")
+ << QString("x(?:(a*)|(b*))") << QString("-xa") << 1
+ << 1 << 2 << -1 << QString("xa") << QString("a") << QString();
+ QTest::newRow("second capture matches @1")
+ << QString("x(?:(a*)|(b*))") << QString("-xb") << 1
+ << 1 << -1 << 2 << QString("xb") << QString() << QString("b");
+ QTest::newRow("first capture empty match @1")
+ << QString("x(?:(a*)|(b*))") << QString("-xx") << 1
+ << 1 << -1 << -1 << QString("x") << QString() << QString();
+ QTest::newRow("second capture empty match @1")
+ << QString("x(?:(a)|(b*))") << QString("-xx") << 1
+ << 1 << -1 << -1 << QString("x") << QString() << QString();
+
+ QTest::newRow("first capture matches @2")
+ << QString("(a)|(b)") << QString("xxa") << 2
+ << 2 << 2 << -1 << QString("a") << QString("a") << QString();
+ QTest::newRow("second capture matches @2")
+ << QString("(a)|(b)") << QString("xxb") << 2
+ << 2 << -1 << 2 << QString("b") << QString() << QString("b");
+ QTest::newRow("no match - with options")
+ << QString("(a)|(b)") << QString("xx") << -1
+ << -1 << -1 << -1 << QString() << QString() << QString();
+
+}
+
+void tst_QRegExp::QTBUG_7049()
+{
+ QFETCH( QString, reStr );
+ QFETCH( QString, text );
+ QFETCH( int, matchIndex );
+ QFETCH( int, pos0 );
+ QFETCH( int, pos1 );
+ QFETCH( int, pos2 );
+ QFETCH( QString, cap0 );
+ QFETCH( QString, cap1 );
+ QFETCH( QString, cap2 );
+
+ QRegExp re(reStr);
+ QCOMPARE(re.numCaptures(), 2);
+ QCOMPARE(re.capturedTexts().size(), 3);
+
+ QCOMPARE(re.indexIn(text), matchIndex);
+
+ QCOMPARE( re.pos(0), pos0 );
+ QCOMPARE( re.pos(1), pos1 );
+ QCOMPARE( re.pos(2), pos2 );
+
+ QCOMPARE( re.cap(0).isNull(), cap0.isNull() );
+ QCOMPARE( re.cap(0), cap0 );
+ QCOMPARE( re.cap(1).isNull(), cap1.isNull() );
+ QCOMPARE( re.cap(1), cap1 );
+ QCOMPARE( re.cap(2).isNull(), cap2.isNull() );
+ QCOMPARE( re.cap(2), cap2 );
+}
+
QTEST_APPLESS_MAIN(tst_QRegExp)
#include "tst_qregexp.moc"
diff --git a/tests/auto/qscriptvalue/qscriptvalue.pro b/tests/auto/qscriptvalue/qscriptvalue.pro
index 191cd4a73a..c3e9912f69 100644
--- a/tests/auto/qscriptvalue/qscriptvalue.pro
+++ b/tests/auto/qscriptvalue/qscriptvalue.pro
@@ -4,8 +4,12 @@ SOURCES += tst_qscriptvalue.cpp
HEADERS += tst_qscriptvalue.h
# Generated by testgen
-SOURCES += tst_qscriptvalue_generated.cpp
-
+SOURCES += \
+ tst_qscriptvalue_generated_init.cpp \
+ tst_qscriptvalue_generated_cast.cpp \
+ tst_qscriptvalue_generated_comparison.cpp \
+ tst_qscriptvalue_generated_isXXX.cpp \
+ tst_qscriptvalue_generated_toXXX.cpp
win32-msvc* {
# With -O2, MSVC takes up to 24 minutes to compile this test!
diff --git a/tests/auto/qscriptvalue/testgen/data.txt b/tests/auto/qscriptvalue/testgen/data.txt
index a041c9b70b..73677ec0fb 100644
--- a/tests/auto/qscriptvalue/testgen/data.txt
+++ b/tests/auto/qscriptvalue/testgen/data.txt
@@ -34,6 +34,7 @@ QScriptValue(QString())
QScriptValue(QString("0"))
QScriptValue(QString("123"))
QScriptValue(QString("12.4"))
+#QScriptValue(QString::fromUtf8("ąśćżźółńę"))
#Unbound values (bound to a null engine)
QScriptValue(0, QScriptValue::UndefinedValue)
@@ -64,6 +65,7 @@ QScriptValue(0, QString())
QScriptValue(0, QString("0"))
QScriptValue(0, QString("123"))
QScriptValue(0, QString("12.3"))
+#QScriptValue(0, QString::fromUtf8("ąśćżźółńę"))
#Bound values
QScriptValue(engine, QScriptValue::UndefinedValue)
@@ -114,7 +116,46 @@ engine->evaluate("/foo/")
engine->evaluate("new Object()")
engine->evaluate("new Array()")
engine->evaluate("new Error()")
+engine->evaluate("a = new Object(); a.foo = 22; a.foo")
+engine->evaluate("Undefined")
+engine->evaluate("Null")
+engine->evaluate("True")
+engine->evaluate("False")
+
+engine->evaluate("undefined")
+engine->evaluate("null")
+engine->evaluate("true")
+engine->evaluate("false")
+engine->evaluate("122")
+engine->evaluate("124")
+engine->evaluate("0")
+engine->evaluate("0.0")
+engine->evaluate("123.0")
+engine->evaluate("6.37e-8")
+engine->evaluate("-6.37e-8")
+engine->evaluate("0x43211234")
+engine->evaluate("0x10000")
+engine->evaluate("0x10001")
+engine->evaluate("NaN")
+engine->evaluate("Infinity")
+engine->evaluate("-Infinity")
+engine->evaluate("'ciao'")
+engine->evaluate("''")
+engine->evaluate("'0'")
+engine->evaluate("'123'")
+engine->evaluate("'12.4'")
+#engine->evaluate(QString::fromUtf8("'ąśćżźółńę'"))
#other
engine->nullValue()
-engine->undefinedValue() \ No newline at end of file
+engine->undefinedValue()
+engine->newObject()
+engine->newArray()
+engine->newArray(10)
+engine->newDate(QDateTime())
+engine->newQMetaObject(&QObject::staticMetaObject)
+engine->newVariant(QVariant())
+engine->newVariant(QVariant(123))
+engine->newVariant(QVariant(false))
+engine->newQObject(0)
+engine->newQObject(engine) \ No newline at end of file
diff --git a/tests/auto/qscriptvalue/testgen/gen.py b/tests/auto/qscriptvalue/testgen/gen.py
index b3c81b98bd..6e48f46d67 100755
--- a/tests/auto/qscriptvalue/testgen/gen.py
+++ b/tests/auto/qscriptvalue/testgen/gen.py
@@ -70,8 +70,7 @@ class Options():
return getattr(self._o, attr)
-mainTempl = Template("""/*
-/****************************************************************************
+mainTempl = Template("""/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
diff --git a/tests/auto/qscriptvalue/testgen/main.cpp b/tests/auto/qscriptvalue/testgen/main.cpp
index fe35de9350..06726352aa 100644
--- a/tests/auto/qscriptvalue/testgen/main.cpp
+++ b/tests/auto/qscriptvalue/testgen/main.cpp
@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
QCoreApplication a(argc, argv);
if (argc != 2) {
- qWarning() << "./prog outputfile";
+ qWarning() << "./prog outputdir";
exit(1);
}
diff --git a/tests/auto/qscriptvalue/testgen/testgenerator.cpp b/tests/auto/qscriptvalue/testgen/testgenerator.cpp
index d852ea5b05..a291110562 100644
--- a/tests/auto/qscriptvalue/testgen/testgenerator.cpp
+++ b/tests/auto/qscriptvalue/testgen/testgenerator.cpp
@@ -50,10 +50,17 @@
#include <QtCore/qvariant.h>
#include <QtScript/qscriptvalue.h>
-void TestGenerator::save(const QString& data)
+void TestGenerator::save(const QHash<QString, QString>& data)
{
- QTextStream out(&m_ofile);
- out << data;
+ foreach(const QString& name, data.keys()) {
+ QFile ofile(m_opath + "tst_qscriptvalue_generated_" + name + ".cpp");
+ if (!ofile.open(QIODevice::WriteOnly | QIODevice::Text)) {
+ qWarning() << "Can't open output file: " << ofile.fileName();
+ exit(2);
+ }
+ QTextStream out(&ofile);
+ out << data[name];
+ }
}
static QString escape(QString txt)
@@ -98,6 +105,55 @@ QString typeName<bool>() {return "bool";}
template<>
QString typeName<QString>() {return "QString";}
+static QString generateLicence()
+{
+ return "/****************************************************************************\n"
+ "**\n"
+ "** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).\n"
+ "** All rights reserved.\n"
+ "** Contact: Nokia Corporation (qt-info@nokia.com)\n"
+ "**\n"
+ "** This file is part of the test suite of the Qt Toolkit.\n"
+ "**\n"
+ "** $QT_BEGIN_LICENSE:LGPL$\n"
+ "** No Commercial Usage\n"
+ "** This file contains pre-release code and may not be distributed.\n"
+ "** You may use this file in accordance with the terms and conditions\n"
+ "** contained in the Technology Preview License Agreement accompanying\n"
+ "** this package.\n"
+ "**\n"
+ "** GNU Lesser General Public License Usage\n"
+ "** Alternatively, this file may be used under the terms of the GNU Lesser\n"
+ "** General Public License version 2.1 as published by the Free Software\n"
+ "** Foundation and appearing in the file LICENSE.LGPL included in the\n"
+ "** packaging of this file. Please review the following information to\n"
+ "** ensure the GNU Lesser General Public License version 2.1 requirements\n"
+ "** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n"
+ "**\n"
+ "** In addition, as a special exception, Nokia gives you certain additional\n"
+ "** rights. These rights are described in the Nokia Qt LGPL Exception\n"
+ "** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n"
+ "**\n"
+ "** If you have questions regarding the use of this file, please contact\n"
+ "** Nokia at qt-info@nokia.com.\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "** $QT_END_LICENSE$\n"
+ "**\n"
+ "****************************************************************************/\n"
+ "\n"\
+ "/****************************************************************************\n"\
+ "*************** This file has been generated. DO NOT MODIFY! ****************\n"
+ "****************************************************************************/\n\n"\
+ "#include \"tst_qscriptvalue.h\"\n\n";
+}
+
static QString generateIsXXXDef(const QString& name, const QList<QString>& list)
{
static const QString templ("void tst_QScriptValue::%1_initData()\n"\
@@ -106,11 +162,14 @@ static QString generateIsXXXDef(const QString& name, const QList<QString>& list)
" initScriptValues();\n"\
"}\n"\
"\n"\
+ "static QString %1_array [] = {%2};\n\n"\
"void tst_QScriptValue::%1_makeData(const char* expr)\n"\
"{\n"\
" static QSet<QString> %1;\n"\
" if (%1.isEmpty()) {\n"\
- " %1%2\n"\
+ " %1.reserve(%3);\n"\
+ " for (unsigned i = 0; i < %3; ++i)\n"\
+ " %1.insert(%1_array[i]);\n"\
" }\n"\
" newRow(expr) << %1.contains(expr);\n"\
"}\n"\
@@ -119,6 +178,7 @@ static QString generateIsXXXDef(const QString& name, const QList<QString>& list)
"{\n"\
" QFETCH(bool, expected);\n"\
" QCOMPARE(value.%1(), expected);\n"\
+ " QCOMPARE(value.%1(), expected);\n"\
"}\n"\
"\n"\
"DEFINE_TEST_FUNCTION(%1)\n"\
@@ -131,16 +191,14 @@ static QString generateIsXXXDef(const QString& name, const QList<QString>& list)
QString result = templ;
QStringList set;
- foreach(QString t, list) {
- t = escape(t);
- t.append('\"');
- t.prepend('\"');
- set.append(QString(" << "));
- set.append(t);
- set.append("\n ");
+ set.reserve(3 * list.count());
+ foreach(const QString& t, list) {
+ set.append("\n \"");
+ set.append(escape(t));
+ set.append("\",");
}
- set.append(";");
- return result.arg(name, set.join(QString()));
+
+ return result.arg(name, set.join(QString()), QString::number(list.count()));
}
template<typename T>
@@ -153,11 +211,15 @@ static QString generateToXXXDef(const QString& name, const QList<QPair<QString,
" initScriptValues();\n"\
"}\n"\
"\n"\
+ "static QString %1_tagArray [] = {%4};\n\n"\
+ "static %2 %1_valueArray [] = {%5};\n\n"\
"void tst_QScriptValue::%1_makeData(const char* expr)\n"\
"{\n"\
" static QHash<QString, %2> %1;\n"\
" if (%1.isEmpty()) {\n"\
- "%3"\
+ " %1.reserve(%3);\n"\
+ " for (unsigned i = 0; i < %3; ++i)\n"\
+ " %1.insert(%1_tagArray[i], %1_valueArray[i]);\n"\
" }\n"\
" newRow(expr) << %1.value(expr);\n"\
"}\n"\
@@ -166,25 +228,33 @@ static QString generateToXXXDef(const QString& name, const QList<QPair<QString,
"{\n"\
" QFETCH(%2, expected);\n"\
" QCOMPARE(value.%1(), expected);\n"\
+ " QCOMPARE(value.%1(), expected);\n"\
"}\n"\
"\n"\
"DEFINE_TEST_FUNCTION(%1)\n";
QString result = templ;
typename QList<QPair<QString, T> >::const_iterator i = list.constBegin();
- QStringList set;
+ QStringList tagSet, valueSet;
+ tagSet.reserve(list.count());
+ valueSet.reserve(list.count());
+ int tmp = -1;
for(; i != list.constEnd(); ++i) {
QPair<QString, T> t = *i;
t.first = escape(t.first);
- set.append(QString(" "));
- set.append(name);
- set.append(".insert(\"");
- set.append(t.first);
- set.append(QString::fromAscii("\", "));
- set.append(prepareToInsert<T>(t.second));
- set.append(QString::fromAscii(");\n"));
+ tagSet.append(QString("\n \""));
+ tagSet.append(t.first);
+ tagSet.append(QString::fromAscii("\","));
+ if (!((++tmp)%2))
+ valueSet.append(QString("\n "));
+ valueSet.append(prepareToInsert<T>(t.second));
+ valueSet.append(QString::fromAscii(", "));
}
- return result.arg(name, typeName<T>(), set.join(QString()));
+ return result.arg(name,
+ typeName<T>(),
+ QString::number(list.count()),
+ tagSet.join(QString()),
+ valueSet.join(QString()));
}
@@ -198,11 +268,15 @@ QString generateToXXXDef<qsreal>(const QString& name, const QList<QPair<QString,
" initScriptValues();\n"\
"}\n"\
"\n"\
+ "static QString %1_tagArray [] = {%3};\n"\
+ "static %2 %1_valueArray [] = {%4};\n"\
"void tst_QScriptValue::%1_makeData(const char* expr)\n"\
"{\n"\
" static QHash<QString, %2> %1;\n"\
" if (%1.isEmpty()) {\n"\
- "%3"\
+ " %1.reserve(%5);\n"\
+ " for (unsigned i = 0; i < %5; ++i)\n"\
+ " %1.insert(%1_tagArray[i], %1_valueArray[i]);\n"\
" }\n"\
" newRow(expr) << %1.value(expr);\n"\
"}\n"\
@@ -213,26 +287,31 @@ QString generateToXXXDef<qsreal>(const QString& name, const QList<QPair<QString,
"%666"
" if (qIsInf(expected)) {\n"\
" QVERIFY(qIsInf(value.%1()));\n"\
+ " QVERIFY(qIsInf(value.%1()));\n"\
" return;\n"\
" }\n"\
" QCOMPARE(value.%1(), expected);\n"\
+ " QCOMPARE(value.%1(), expected);\n"\
"}\n"\
"\n"\
"DEFINE_TEST_FUNCTION(%1)\n";
QString result = templ;
QList<QPair<QString, qsreal> >::const_iterator i = list.constBegin();
- QStringList set;
+ QStringList tagSet, valueSet;
+ tagSet.reserve(list.count());
+ valueSet.reserve(list.count());
+ int tmp = -1;
for(; i != list.constEnd(); ++i) {
QPair<QString, qsreal> t = *i;
t.first = escape(t.first);
- set.append(QString(" "));
- set.append(name);
- set.append(".insert(\"");
- set.append(t.first);
- set.append(QString::fromAscii("\", "));
- set.append(prepareToInsert<qsreal>(t.second));
- set.append(QString::fromAscii(");\n"));
+ tagSet.append(QString("\n \""));
+ tagSet.append(t.first);
+ tagSet.append(QString::fromAscii("\","));
+ if (!((++tmp)%10))
+ valueSet.append(QString("\n "));
+ valueSet.append(prepareToInsert<qsreal>(t.second));
+ valueSet.append(QString::fromAscii(", "));
}
// toInteger shouldn't return NaN, so it would be nice to catch the case.
QString hook;
@@ -243,101 +322,129 @@ QString generateToXXXDef<qsreal>(const QString& name, const QList<QPair<QString,
" return;\n"\
" }\n";
}
- return result.arg(name, typeName<qsreal>(), set.join(QString()), hook);
+ return result.arg(name,
+ typeName<qsreal>(),
+ tagSet.join(QString()),
+ valueSet.join(QString()),
+ QString::number(list.count()),
+ hook);
}
template<typename T>
static QString generateCastDef(const QList<QPair<QString, T> >& list)
{
static const QString templ = "\n"\
- "void tst_QScriptValue::qscriptvalue_cast%2_initData()\n"\
+ "void tst_QScriptValue::qscriptvalue_cast%1_initData()\n"\
"{\n"\
- " QTest::addColumn<%2>(\"expected\");\n"\
+ " QTest::addColumn<%1>(\"expected\");\n"\
" initScriptValues();\n"\
"}\n"\
"\n"\
- "void tst_QScriptValue::qscriptvalue_cast%2_makeData(const char* expr)\n"\
+ "static QString qscriptvalue_cast%1_tagArray [] = {%2};\n"\
+ "static %1 qscriptvalue_cast%1_valueArray [] = {%3};\n"\
+ "void tst_QScriptValue::qscriptvalue_cast%1_makeData(const char* expr)\n"\
"{\n"\
- " static QHash<QString, %2> value;\n"\
+ " static QHash<QString, %1> value;\n"\
" if (value.isEmpty()) {\n"\
- "%3"\
+ " value.reserve(%4);\n"\
+ " for (unsigned i = 0; i < %4; ++i)\n"\
+ " value.insert(qscriptvalue_cast%1_tagArray[i], qscriptvalue_cast%1_valueArray[i]);\n"\
" }\n"\
" newRow(expr) << value.value(expr);\n"\
"}\n"\
"\n"\
- "void tst_QScriptValue::qscriptvalue_cast%2_test(const char*, const QScriptValue& value)\n"\
+ "void tst_QScriptValue::qscriptvalue_cast%1_test(const char*, const QScriptValue& value)\n"\
"{\n"\
- " QFETCH(%2, expected);\n"\
- " QCOMPARE(qscriptvalue_cast<%2>(value), expected);\n"\
+ " QFETCH(%1, expected);\n"\
+ " QCOMPARE(qscriptvalue_cast<%1>(value), expected);\n"\
+ " QCOMPARE(qscriptvalue_cast<%1>(value), expected);\n"\
"}\n"\
"\n"\
- "DEFINE_TEST_FUNCTION(qscriptvalue_cast%2)\n";
+ "DEFINE_TEST_FUNCTION(qscriptvalue_cast%1)\n";
QString result = templ;
typename QList<QPair<QString, T> >::const_iterator i = list.constBegin();
- QStringList set;
+ QStringList tagSet, valueSet;
+ tagSet.reserve(list.count());
+ valueSet.reserve(list.count());
+ int tmp = -1;
for(; i != list.constEnd(); ++i) {
QPair<QString, T> t = *i;
t.first = escape(t.first);
- set.append(QString(" "));
- set.append("value.insert(\"");
- set.append(t.first);
- set.append(QString::fromAscii("\", "));
- set.append(prepareToInsert<T>(t.second));
- set.append(QString::fromAscii(");\n"));
+ tagSet.append(QString("\n \""));
+ tagSet.append(t.first);
+ tagSet.append(QString::fromAscii("\","));
+ if (!((++tmp)%2))
+ valueSet.append(QString("\n "));
+ valueSet.append(prepareToInsert<T>(t.second));
+ valueSet.append(QString::fromAscii(", "));
}
- return result.arg(typeName<T>(), set.join(QString()));
+ return result.arg(typeName<T>(), tagSet.join(QString()), valueSet.join(QString()), QString::number(list.count()));
}
template<>
QString generateCastDef<qsreal>(const QList<QPair<QString, qsreal> >& list)
{
static const QString templ = "\n"\
- "void tst_QScriptValue::qscriptvalue_cast%2_initData()\n"\
+ "void tst_QScriptValue::qscriptvalue_cast%1_initData()\n"\
"{\n"\
- " QTest::addColumn<%2>(\"expected\");\n"\
+ " QTest::addColumn<%1>(\"expected\");\n"\
" initScriptValues();\n"\
"}\n"\
"\n"\
- "void tst_QScriptValue::qscriptvalue_cast%2_makeData(const char* expr)\n"\
+ "static QString qscriptvalue_cast%1_tagArray [] = {%2};\n"\
+ "static %1 qscriptvalue_cast%1_valueArray [] = {%3};\n"\
+ "void tst_QScriptValue::qscriptvalue_cast%1_makeData(const char* expr)\n"\
"{\n"\
- " static QHash<QString, %2> value;\n"\
+ " static QHash<QString, %1> value;\n"\
" if (value.isEmpty()) {\n"\
- "%3"\
+ " value.reserve(%4);\n"\
+ " for (unsigned i = 0; i < %4; ++i)\n"\
+ " value.insert(qscriptvalue_cast%1_tagArray[i], qscriptvalue_cast%1_valueArray[i]);\n"\
" }\n"\
" newRow(expr) << value.value(expr);\n"\
"}\n"\
"\n"\
- "void tst_QScriptValue::qscriptvalue_cast%2_test(const char*, const QScriptValue& value)\n"\
+ "void tst_QScriptValue::qscriptvalue_cast%1_test(const char*, const QScriptValue& value)\n"\
"{\n"\
- " QFETCH(%2, expected);\n"\
+ " QFETCH(%1, expected);\n"\
" if (qIsNaN(expected)) {\n"
- " QVERIFY(qIsNaN(qscriptvalue_cast<%2>(value)));\n"
+ " QVERIFY(qIsNaN(qscriptvalue_cast<%1>(value)));\n"
+ " QVERIFY(qIsNaN(qscriptvalue_cast<%1>(value)));\n"
" return;\n"
" }\n"\
" if (qIsInf(expected)) {\n"
- " QVERIFY(qIsInf(qscriptvalue_cast<%2>(value)));\n"
+ " QVERIFY(qIsInf(qscriptvalue_cast<%1>(value)));\n"
+ " QVERIFY(qIsInf(qscriptvalue_cast<%1>(value)));\n"
" return;\n"
" }\n"
- " QCOMPARE(qscriptvalue_cast<%2>(value), expected);\n"\
+ " QCOMPARE(qscriptvalue_cast<%1>(value), expected);\n"\
+ " QCOMPARE(qscriptvalue_cast<%1>(value), expected);\n"\
"}\n"\
"\n"\
- "DEFINE_TEST_FUNCTION(qscriptvalue_cast%2)\n";
+ "DEFINE_TEST_FUNCTION(qscriptvalue_cast%1)\n";
QString result = templ;
QList<QPair<QString, qsreal> >::const_iterator i = list.constBegin();
- QStringList set;
+ QStringList tagSet, valueSet;
+ tagSet.reserve(list.count());
+ valueSet.reserve(list.count());
+ int tmp = -1;
for(; i != list.constEnd(); ++i) {
QPair<QString, qsreal> t = *i;
t.first = escape(t.first);
- set.append(QString(" "));
- set.append("value.insert(\"");
- set.append(t.first);
- set.append(QString::fromAscii("\", "));
- set.append(prepareToInsert<qsreal>(t.second));
- set.append(QString::fromAscii(");\n"));
+ tagSet.append(QString("\n \""));
+ tagSet.append(t.first);
+ tagSet.append(QString::fromAscii("\","));
+ if (!((++tmp)%10))
+ valueSet.append(QString("\n "));
+ valueSet.append(prepareToInsert<qsreal>(t.second));
+ valueSet.append(QString::fromAscii(", "));
}
- return result.arg(typeName<qsreal>(), set.join(QString()));
+ return result.arg(typeName<qsreal>(),
+ tagSet.join(QString()),
+ valueSet.join(QString()),
+ QString::number(list.count()));
}
static QString generateCompareDef(const QString& comparisionType, const QList<QString> tags)
@@ -350,11 +457,14 @@ static QString generateCompareDef(const QString& comparisionType, const QList<QS
" initScriptValues();\n"\
"}\n"\
"\n"\
+ "static QString %1_array [] = {%2};\n\n"\
"void tst_QScriptValue::%1_makeData(const char *expr)\n"\
"{\n"\
" static QSet<QString> equals;\n"\
" if (equals.isEmpty()) {\n"\
- "%2\n"\
+ " equals.reserve(%3);\n"\
+ " for (unsigned i = 0; i < %3; ++i)\n"\
+ " equals.insert(%1_array[i]);\n"\
" }\n"\
" QHash<QString, QScriptValue>::const_iterator it;\n"\
" for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {\n"\
@@ -378,59 +488,16 @@ static QString generateCompareDef(const QString& comparisionType, const QList<QS
QString result = templ;
QStringList set;
+ set.reserve(tags.count());
foreach(const QString& tmp, tags) {
- set.append(" equals.insert(\"" + escape(tmp) + "\");");
+ set.append("\n \"" + escape(tmp) + "\",");
}
- return result.arg(comparisionType, set.join("\n"));
+ return result.arg(comparisionType, set.join(""), QString::number(tags.count()));
}
static QString generateInitDef(const QVector<QString>& allDataTags)
{
- static const QString templ = "/****************************************************************************\n"
- "**\n"
- "** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).\n"
- "** All rights reserved.\n"
- "** Contact: Nokia Corporation (qt-info@nokia.com)\n"
- "**\n"
- "** This file is part of the test suite of the Qt Toolkit.\n"
- "**\n"
- "** $QT_BEGIN_LICENSE:LGPL$\n"
- "** No Commercial Usage\n"
- "** This file contains pre-release code and may not be distributed.\n"
- "** You may use this file in accordance with the terms and conditions\n"
- "** contained in the Technology Preview License Agreement accompanying\n"
- "** this package.\n"
- "**\n"
- "** GNU Lesser General Public License Usage\n"
- "** Alternatively, this file may be used under the terms of the GNU Lesser\n"
- "** General Public License version 2.1 as published by the Free Software\n"
- "** Foundation and appearing in the file LICENSE.LGPL included in the\n"
- "** packaging of this file. Please review the following information to\n"
- "** ensure the GNU Lesser General Public License version 2.1 requirements\n"
- "** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n"
- "**\n"
- "** In addition, as a special exception, Nokia gives you certain additional\n"
- "** rights. These rights are described in the Nokia Qt LGPL Exception\n"
- "** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n"
- "**\n"
- "** If you have questions regarding the use of this file, please contact\n"
- "** Nokia at qt-info@nokia.com.\n"
- "**\n"
- "**\n"
- "**\n"
- "**\n"
- "**\n"
- "**\n"
- "**\n"
- "**\n"
- "** $QT_END_LICENSE$\n"
- "**\n"
- "****************************************************************************/\n"
- "\n"\
- "#include \"tst_qscriptvalue.h\"\n\n"\
- "#define DEFINE_TEST_VALUE(expr) m_values.insert(QString::fromLatin1(#expr), expr)\n"\
- "\n"\
- "void tst_QScriptValue::initScriptValues()\n"\
+ static const QString templ = "void tst_QScriptValue::initScriptValues()\n"\
"{\n"\
" m_values.clear();\n"\
" if (engine) \n"\
@@ -455,7 +522,7 @@ static void squashTags(QString dataTag, const QVector<bool>& results, QList<QStr
}
-QString TestGenerator::generateTest()
+QHash<QString, QString> TestGenerator::generateTest()
{
// All data tags keept in one place.
QVector<QString> dataTags;
@@ -635,47 +702,63 @@ QString TestGenerator::generateTest()
Q_ASSERT(in.atEnd());
// Generate.
- QStringList result;
- result.append(generateInitDef(dataTags));
- result.append(generateIsXXXDef("isValid", isValidList));
- result.append(generateIsXXXDef("isBool", isBoolList));
- result.append(generateIsXXXDef("isBoolean", isBooleanList));
- result.append(generateIsXXXDef("isNumber", isNumberList));
- result.append(generateIsXXXDef("isFunction", isFunctionList));
- result.append(generateIsXXXDef("isNull", isNullList));
- result.append(generateIsXXXDef("isString", isStringList));
- result.append(generateIsXXXDef("isUndefined", isUndefinedList));
- result.append(generateIsXXXDef("isVariant", isVariantList));
- result.append(generateIsXXXDef("isQObject", isQObjectList));
- result.append(generateIsXXXDef("isQMetaObject", isQMetaObjectList));
- result.append(generateIsXXXDef("isObject", isObjectList));
- result.append(generateIsXXXDef("isDate", isDateList));
- result.append(generateIsXXXDef("isRegExp", isRegExpList));
- result.append(generateIsXXXDef("isArray", isArrayList));
- result.append(generateIsXXXDef("isError", isErrorList));
-
- result.append(generateToXXXDef<QString>("toString", toStringList));
- result.append(generateToXXXDef<qsreal>("toNumber", toNumberList));
- result.append(generateToXXXDef<bool>("toBool", toBoolList));
- result.append(generateToXXXDef<bool>("toBoolean", toBooleanList));
- result.append(generateToXXXDef<qsreal>("toInteger", toIntegerList));
- result.append(generateToXXXDef<qint32>("toInt32", toInt32List));
- result.append(generateToXXXDef<quint32>("toUInt32", toUInt32List));
- result.append(generateToXXXDef<quint16>("toUInt16", toUInt16List));
-
- result.append(generateCompareDef("equals", equalsList));
- result.append(generateCompareDef("strictlyEquals", strictlyEqualsList));
- result.append(generateCompareDef("lessThan", lessThanList));
- result.append(generateCompareDef("instanceOf", instanceOfList));
-
- result.append(generateCastDef(castStringList));
- result.append(generateCastDef(castSRealList));
- result.append(generateCastDef(castBoolList));
- result.append(generateCastDef(castInt32List));
- result.append(generateCastDef(castUInt32List));
- result.append(generateCastDef(castUInt16List));
-
- return result.join("\n");
+ QHash<QString, QString> result;
+ QStringList tmp;
+ tmp.append(generateLicence());
+ tmp.append(generateInitDef(dataTags));
+ result.insert("init", tmp.join("\n"));
+ tmp.clear();
+
+ tmp.append(generateLicence());
+ tmp.append(generateIsXXXDef("isValid", isValidList));
+ tmp.append(generateIsXXXDef("isBool", isBoolList));
+ tmp.append(generateIsXXXDef("isBoolean", isBooleanList));
+ tmp.append(generateIsXXXDef("isNumber", isNumberList));
+ tmp.append(generateIsXXXDef("isFunction", isFunctionList));
+ tmp.append(generateIsXXXDef("isNull", isNullList));
+ tmp.append(generateIsXXXDef("isString", isStringList));
+ tmp.append(generateIsXXXDef("isUndefined", isUndefinedList));
+ tmp.append(generateIsXXXDef("isVariant", isVariantList));
+ tmp.append(generateIsXXXDef("isQObject", isQObjectList));
+ tmp.append(generateIsXXXDef("isQMetaObject", isQMetaObjectList));
+ tmp.append(generateIsXXXDef("isObject", isObjectList));
+ tmp.append(generateIsXXXDef("isDate", isDateList));
+ tmp.append(generateIsXXXDef("isRegExp", isRegExpList));
+ tmp.append(generateIsXXXDef("isArray", isArrayList));
+ tmp.append(generateIsXXXDef("isError", isErrorList));
+ result.insert("isXXX", tmp.join("\n"));
+ tmp.clear();
+
+ tmp.append(generateLicence());
+ tmp.append(generateToXXXDef<QString>("toString", toStringList));
+ tmp.append(generateToXXXDef<qsreal>("toNumber", toNumberList));
+ tmp.append(generateToXXXDef<bool>("toBool", toBoolList));
+ tmp.append(generateToXXXDef<bool>("toBoolean", toBooleanList));
+ tmp.append(generateToXXXDef<qsreal>("toInteger", toIntegerList));
+ tmp.append(generateToXXXDef<qint32>("toInt32", toInt32List));
+ tmp.append(generateToXXXDef<quint32>("toUInt32", toUInt32List));
+ tmp.append(generateToXXXDef<quint16>("toUInt16", toUInt16List));
+ result.insert("toXXX", tmp.join("\n"));
+ tmp.clear();
+
+ tmp.append(generateLicence());
+ tmp.append(generateCompareDef("equals", equalsList));
+ tmp.append(generateCompareDef("strictlyEquals", strictlyEqualsList));
+ tmp.append(generateCompareDef("lessThan", lessThanList));
+ tmp.append(generateCompareDef("instanceOf", instanceOfList));
+ result.insert("comparison", tmp.join("\n"));
+ tmp.clear();
+
+ tmp.append(generateLicence());
+ tmp.append(generateCastDef(castStringList));
+ tmp.append(generateCastDef(castSRealList));
+ tmp.append(generateCastDef(castBoolList));
+ tmp.append(generateCastDef(castInt32List));
+ tmp.append(generateCastDef(castUInt32List));
+ tmp.append(generateCastDef(castUInt16List));
+ result.insert("cast", tmp.join("\n"));
+
+ return result;
}
diff --git a/tests/auto/qscriptvalue/testgen/testgenerator.h b/tests/auto/qscriptvalue/testgen/testgenerator.h
index 8f4a357656..1c61fc55dd 100644
--- a/tests/auto/qscriptvalue/testgen/testgenerator.h
+++ b/tests/auto/qscriptvalue/testgen/testgenerator.h
@@ -49,13 +49,10 @@
class TestGenerator {
public:
TestGenerator(QString& outputpath)
- : m_ofile(outputpath)
+ : m_opath(outputpath)
{
- // Open output file
- if (!m_ofile.open(QIODevice::WriteOnly | QIODevice::Text)) {
- qWarning() << "Can't open output file: " << outputpath;
- exit(2);
- }
+ if (!m_opath.endsWith('/'))
+ m_opath.append('/');
m_tempFile.open();
}
@@ -67,10 +64,10 @@ public:
}
void prepareData();
- QString generateTest();
- void save(const QString& data);
+ QHash<QString, QString> generateTest();
+ void save(const QHash<QString, QString>& data);
private:
- QFile m_ofile;
+ QString m_opath;
QTemporaryFile m_tempFile;
};
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.h b/tests/auto/qscriptvalue/tst_qscriptvalue.h
index 6215506c83..aae35b22ee 100644
--- a/tests/auto/qscriptvalue/tst_qscriptvalue.h
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue.h
@@ -49,6 +49,8 @@
#include <QtScript/qscriptvalue.h>
#include <QtTest/QtTest>
+#define DEFINE_TEST_VALUE(expr) m_values.insert(QString::fromLatin1(#expr), expr)
+
Q_DECLARE_METATYPE(QVariant)
Q_DECLARE_METATYPE(QScriptValue)
@@ -89,11 +91,11 @@ private slots:
void isObject_data();
void isObject();
-// void isQMetaObject_data();
-// void isQMetaObject();
+ void isQMetaObject_data();
+ void isQMetaObject();
-// void isQObject_data();
-// void isQObject();
+ void isQObject_data();
+ void isQObject();
void isRegExp_data();
void isRegExp();
@@ -107,8 +109,8 @@ private slots:
void isValid_data();
void isValid();
-// void isVariant_data();
-// void isVariant();
+ void isVariant_data();
+ void isVariant();
void toBool_data();
void toBool();
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp
deleted file mode 100644
index 4e621b346e..0000000000
--- a/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp
+++ /dev/null
@@ -1,6496 +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 test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "tst_qscriptvalue.h"
-
-#define DEFINE_TEST_VALUE(expr) m_values.insert(QString::fromLatin1(#expr), expr)
-
-void tst_QScriptValue::initScriptValues()
-{
- m_values.clear();
- if (engine)
- delete engine;
- engine = new QScriptEngine;
- DEFINE_TEST_VALUE(QScriptValue());
- DEFINE_TEST_VALUE(QScriptValue(QScriptValue::UndefinedValue));
- DEFINE_TEST_VALUE(QScriptValue(QScriptValue::NullValue));
- DEFINE_TEST_VALUE(QScriptValue(true));
- DEFINE_TEST_VALUE(QScriptValue(false));
- DEFINE_TEST_VALUE(QScriptValue(int(122)));
- DEFINE_TEST_VALUE(QScriptValue(uint(124)));
- DEFINE_TEST_VALUE(QScriptValue(0));
- DEFINE_TEST_VALUE(QScriptValue(0.0));
- DEFINE_TEST_VALUE(QScriptValue(123.0));
- DEFINE_TEST_VALUE(QScriptValue(6.37e-8));
- DEFINE_TEST_VALUE(QScriptValue(-6.37e-8));
- DEFINE_TEST_VALUE(QScriptValue(0x43211234));
- DEFINE_TEST_VALUE(QScriptValue(0x10000));
- DEFINE_TEST_VALUE(QScriptValue(0x10001));
- DEFINE_TEST_VALUE(QScriptValue(qSNaN()));
- DEFINE_TEST_VALUE(QScriptValue(qQNaN()));
- DEFINE_TEST_VALUE(QScriptValue(qInf()));
- DEFINE_TEST_VALUE(QScriptValue(-qInf()));
- DEFINE_TEST_VALUE(QScriptValue("NaN"));
- DEFINE_TEST_VALUE(QScriptValue("Infinity"));
- DEFINE_TEST_VALUE(QScriptValue("-Infinity"));
- DEFINE_TEST_VALUE(QScriptValue("ciao"));
- DEFINE_TEST_VALUE(QScriptValue(QString::fromLatin1("ciao")));
- DEFINE_TEST_VALUE(QScriptValue(QString("")));
- DEFINE_TEST_VALUE(QScriptValue(QString()));
- DEFINE_TEST_VALUE(QScriptValue(QString("0")));
- DEFINE_TEST_VALUE(QScriptValue(QString("123")));
- DEFINE_TEST_VALUE(QScriptValue(QString("12.4")));
- DEFINE_TEST_VALUE(QScriptValue(0, QScriptValue::UndefinedValue));
- DEFINE_TEST_VALUE(QScriptValue(0, QScriptValue::NullValue));
- DEFINE_TEST_VALUE(QScriptValue(0, true));
- DEFINE_TEST_VALUE(QScriptValue(0, false));
- DEFINE_TEST_VALUE(QScriptValue(0, int(122)));
- DEFINE_TEST_VALUE(QScriptValue(0, uint(124)));
- DEFINE_TEST_VALUE(QScriptValue(0, 0));
- DEFINE_TEST_VALUE(QScriptValue(0, 0.0));
- DEFINE_TEST_VALUE(QScriptValue(0, 123.0));
- DEFINE_TEST_VALUE(QScriptValue(0, 6.37e-8));
- DEFINE_TEST_VALUE(QScriptValue(0, -6.37e-8));
- DEFINE_TEST_VALUE(QScriptValue(0, 0x43211234));
- DEFINE_TEST_VALUE(QScriptValue(0, 0x10000));
- DEFINE_TEST_VALUE(QScriptValue(0, 0x10001));
- DEFINE_TEST_VALUE(QScriptValue(0, qSNaN()));
- DEFINE_TEST_VALUE(QScriptValue(0, qQNaN()));
- DEFINE_TEST_VALUE(QScriptValue(0, qInf()));
- DEFINE_TEST_VALUE(QScriptValue(0, -qInf()));
- DEFINE_TEST_VALUE(QScriptValue(0, "NaN"));
- DEFINE_TEST_VALUE(QScriptValue(0, "Infinity"));
- DEFINE_TEST_VALUE(QScriptValue(0, "-Infinity"));
- DEFINE_TEST_VALUE(QScriptValue(0, "ciao"));
- DEFINE_TEST_VALUE(QScriptValue(0, QString::fromLatin1("ciao")));
- DEFINE_TEST_VALUE(QScriptValue(0, QString("")));
- DEFINE_TEST_VALUE(QScriptValue(0, QString()));
- DEFINE_TEST_VALUE(QScriptValue(0, QString("0")));
- DEFINE_TEST_VALUE(QScriptValue(0, QString("123")));
- DEFINE_TEST_VALUE(QScriptValue(0, QString("12.3")));
- DEFINE_TEST_VALUE(QScriptValue(engine, QScriptValue::UndefinedValue));
- DEFINE_TEST_VALUE(QScriptValue(engine, QScriptValue::NullValue));
- DEFINE_TEST_VALUE(QScriptValue(engine, true));
- DEFINE_TEST_VALUE(QScriptValue(engine, false));
- DEFINE_TEST_VALUE(QScriptValue(engine, int(122)));
- DEFINE_TEST_VALUE(QScriptValue(engine, uint(124)));
- DEFINE_TEST_VALUE(QScriptValue(engine, 0));
- DEFINE_TEST_VALUE(QScriptValue(engine, 0.0));
- DEFINE_TEST_VALUE(QScriptValue(engine, 123.0));
- DEFINE_TEST_VALUE(QScriptValue(engine, 6.37e-8));
- DEFINE_TEST_VALUE(QScriptValue(engine, -6.37e-8));
- DEFINE_TEST_VALUE(QScriptValue(engine, 0x43211234));
- DEFINE_TEST_VALUE(QScriptValue(engine, 0x10000));
- DEFINE_TEST_VALUE(QScriptValue(engine, 0x10001));
- DEFINE_TEST_VALUE(QScriptValue(engine, qSNaN()));
- DEFINE_TEST_VALUE(QScriptValue(engine, qQNaN()));
- DEFINE_TEST_VALUE(QScriptValue(engine, qInf()));
- DEFINE_TEST_VALUE(QScriptValue(engine, -qInf()));
- DEFINE_TEST_VALUE(QScriptValue(engine, "NaN"));
- DEFINE_TEST_VALUE(QScriptValue(engine, "Infinity"));
- DEFINE_TEST_VALUE(QScriptValue(engine, "-Infinity"));
- DEFINE_TEST_VALUE(QScriptValue(engine, "ciao"));
- DEFINE_TEST_VALUE(QScriptValue(engine, QString::fromLatin1("ciao")));
- DEFINE_TEST_VALUE(QScriptValue(engine, QString("")));
- DEFINE_TEST_VALUE(QScriptValue(engine, QString()));
- DEFINE_TEST_VALUE(QScriptValue(engine, QString("0")));
- DEFINE_TEST_VALUE(QScriptValue(engine, QString("123")));
- DEFINE_TEST_VALUE(QScriptValue(engine, QString("1.23")));
- DEFINE_TEST_VALUE(engine->evaluate("[]"));
- DEFINE_TEST_VALUE(engine->evaluate("{}"));
- DEFINE_TEST_VALUE(engine->evaluate("Object.prototype"));
- DEFINE_TEST_VALUE(engine->evaluate("Date.prototype"));
- DEFINE_TEST_VALUE(engine->evaluate("Array.prototype"));
- DEFINE_TEST_VALUE(engine->evaluate("Function.prototype"));
- DEFINE_TEST_VALUE(engine->evaluate("Error.prototype"));
- DEFINE_TEST_VALUE(engine->evaluate("Object"));
- DEFINE_TEST_VALUE(engine->evaluate("Array"));
- DEFINE_TEST_VALUE(engine->evaluate("Number"));
- DEFINE_TEST_VALUE(engine->evaluate("Function"));
- DEFINE_TEST_VALUE(engine->evaluate("(function() { return 1; })"));
- DEFINE_TEST_VALUE(engine->evaluate("(function() { return 'ciao'; })"));
- DEFINE_TEST_VALUE(engine->evaluate("(function() { throw new Error('foo'); })"));
- DEFINE_TEST_VALUE(engine->evaluate("/foo/"));
- DEFINE_TEST_VALUE(engine->evaluate("new Object()"));
- DEFINE_TEST_VALUE(engine->evaluate("new Array()"));
- DEFINE_TEST_VALUE(engine->evaluate("new Error()"));
- DEFINE_TEST_VALUE(engine->nullValue());
- DEFINE_TEST_VALUE(engine->undefinedValue());
-}
-
-
-void tst_QScriptValue::isValid_initData()
-{
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::isValid_makeData(const char* expr)
-{
- static QSet<QString> isValid;
- if (isValid.isEmpty()) {
- isValid << "QScriptValue(QScriptValue::UndefinedValue)"
- << "QScriptValue(QScriptValue::NullValue)"
- << "QScriptValue(true)"
- << "QScriptValue(false)"
- << "QScriptValue(int(122))"
- << "QScriptValue(uint(124))"
- << "QScriptValue(0)"
- << "QScriptValue(0.0)"
- << "QScriptValue(123.0)"
- << "QScriptValue(6.37e-8)"
- << "QScriptValue(-6.37e-8)"
- << "QScriptValue(0x43211234)"
- << "QScriptValue(0x10000)"
- << "QScriptValue(0x10001)"
- << "QScriptValue(qSNaN())"
- << "QScriptValue(qQNaN())"
- << "QScriptValue(qInf())"
- << "QScriptValue(-qInf())"
- << "QScriptValue(\"NaN\")"
- << "QScriptValue(\"Infinity\")"
- << "QScriptValue(\"-Infinity\")"
- << "QScriptValue(\"ciao\")"
- << "QScriptValue(QString::fromLatin1(\"ciao\"))"
- << "QScriptValue(QString(\"\"))"
- << "QScriptValue(QString())"
- << "QScriptValue(QString(\"0\"))"
- << "QScriptValue(QString(\"123\"))"
- << "QScriptValue(QString(\"12.4\"))"
- << "QScriptValue(0, QScriptValue::UndefinedValue)"
- << "QScriptValue(0, QScriptValue::NullValue)"
- << "QScriptValue(0, true)"
- << "QScriptValue(0, false)"
- << "QScriptValue(0, int(122))"
- << "QScriptValue(0, uint(124))"
- << "QScriptValue(0, 0)"
- << "QScriptValue(0, 0.0)"
- << "QScriptValue(0, 123.0)"
- << "QScriptValue(0, 6.37e-8)"
- << "QScriptValue(0, -6.37e-8)"
- << "QScriptValue(0, 0x43211234)"
- << "QScriptValue(0, 0x10000)"
- << "QScriptValue(0, 0x10001)"
- << "QScriptValue(0, qSNaN())"
- << "QScriptValue(0, qQNaN())"
- << "QScriptValue(0, qInf())"
- << "QScriptValue(0, -qInf())"
- << "QScriptValue(0, \"NaN\")"
- << "QScriptValue(0, \"Infinity\")"
- << "QScriptValue(0, \"-Infinity\")"
- << "QScriptValue(0, \"ciao\")"
- << "QScriptValue(0, QString::fromLatin1(\"ciao\"))"
- << "QScriptValue(0, QString(\"\"))"
- << "QScriptValue(0, QString())"
- << "QScriptValue(0, QString(\"0\"))"
- << "QScriptValue(0, QString(\"123\"))"
- << "QScriptValue(0, QString(\"12.3\"))"
- << "QScriptValue(engine, QScriptValue::UndefinedValue)"
- << "QScriptValue(engine, QScriptValue::NullValue)"
- << "QScriptValue(engine, true)"
- << "QScriptValue(engine, false)"
- << "QScriptValue(engine, int(122))"
- << "QScriptValue(engine, uint(124))"
- << "QScriptValue(engine, 0)"
- << "QScriptValue(engine, 0.0)"
- << "QScriptValue(engine, 123.0)"
- << "QScriptValue(engine, 6.37e-8)"
- << "QScriptValue(engine, -6.37e-8)"
- << "QScriptValue(engine, 0x43211234)"
- << "QScriptValue(engine, 0x10000)"
- << "QScriptValue(engine, 0x10001)"
- << "QScriptValue(engine, qSNaN())"
- << "QScriptValue(engine, qQNaN())"
- << "QScriptValue(engine, qInf())"
- << "QScriptValue(engine, -qInf())"
- << "QScriptValue(engine, \"NaN\")"
- << "QScriptValue(engine, \"Infinity\")"
- << "QScriptValue(engine, \"-Infinity\")"
- << "QScriptValue(engine, \"ciao\")"
- << "QScriptValue(engine, QString::fromLatin1(\"ciao\"))"
- << "QScriptValue(engine, QString(\"\"))"
- << "QScriptValue(engine, QString())"
- << "QScriptValue(engine, QString(\"0\"))"
- << "QScriptValue(engine, QString(\"123\"))"
- << "QScriptValue(engine, QString(\"1.23\"))"
- << "engine->evaluate(\"[]\")"
- << "engine->evaluate(\"{}\")"
- << "engine->evaluate(\"Object.prototype\")"
- << "engine->evaluate(\"Date.prototype\")"
- << "engine->evaluate(\"Array.prototype\")"
- << "engine->evaluate(\"Function.prototype\")"
- << "engine->evaluate(\"Error.prototype\")"
- << "engine->evaluate(\"Object\")"
- << "engine->evaluate(\"Array\")"
- << "engine->evaluate(\"Number\")"
- << "engine->evaluate(\"Function\")"
- << "engine->evaluate(\"(function() { return 1; })\")"
- << "engine->evaluate(\"(function() { return 'ciao'; })\")"
- << "engine->evaluate(\"(function() { throw new Error('foo'); })\")"
- << "engine->evaluate(\"/foo/\")"
- << "engine->evaluate(\"new Object()\")"
- << "engine->evaluate(\"new Array()\")"
- << "engine->evaluate(\"new Error()\")"
- << "engine->nullValue()"
- << "engine->undefinedValue()"
- ;
- }
- newRow(expr) << isValid.contains(expr);
-}
-
-void tst_QScriptValue::isValid_test(const char*, const QScriptValue& value)
-{
- QFETCH(bool, expected);
- QCOMPARE(value.isValid(), expected);
-}
-
-DEFINE_TEST_FUNCTION(isValid)
-
-
-void tst_QScriptValue::isBool_initData()
-{
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::isBool_makeData(const char* expr)
-{
- static QSet<QString> isBool;
- if (isBool.isEmpty()) {
- isBool << "QScriptValue(true)"
- << "QScriptValue(false)"
- << "QScriptValue(0, true)"
- << "QScriptValue(0, false)"
- << "QScriptValue(engine, true)"
- << "QScriptValue(engine, false)"
- ;
- }
- newRow(expr) << isBool.contains(expr);
-}
-
-void tst_QScriptValue::isBool_test(const char*, const QScriptValue& value)
-{
- QFETCH(bool, expected);
- QCOMPARE(value.isBool(), expected);
-}
-
-DEFINE_TEST_FUNCTION(isBool)
-
-
-void tst_QScriptValue::isBoolean_initData()
-{
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::isBoolean_makeData(const char* expr)
-{
- static QSet<QString> isBoolean;
- if (isBoolean.isEmpty()) {
- isBoolean << "QScriptValue(true)"
- << "QScriptValue(false)"
- << "QScriptValue(0, true)"
- << "QScriptValue(0, false)"
- << "QScriptValue(engine, true)"
- << "QScriptValue(engine, false)"
- ;
- }
- newRow(expr) << isBoolean.contains(expr);
-}
-
-void tst_QScriptValue::isBoolean_test(const char*, const QScriptValue& value)
-{
- QFETCH(bool, expected);
- QCOMPARE(value.isBoolean(), expected);
-}
-
-DEFINE_TEST_FUNCTION(isBoolean)
-
-
-void tst_QScriptValue::isNumber_initData()
-{
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::isNumber_makeData(const char* expr)
-{
- static QSet<QString> isNumber;
- if (isNumber.isEmpty()) {
- isNumber << "QScriptValue(int(122))"
- << "QScriptValue(uint(124))"
- << "QScriptValue(0)"
- << "QScriptValue(0.0)"
- << "QScriptValue(123.0)"
- << "QScriptValue(6.37e-8)"
- << "QScriptValue(-6.37e-8)"
- << "QScriptValue(0x43211234)"
- << "QScriptValue(0x10000)"
- << "QScriptValue(0x10001)"
- << "QScriptValue(qSNaN())"
- << "QScriptValue(qQNaN())"
- << "QScriptValue(qInf())"
- << "QScriptValue(-qInf())"
- << "QScriptValue(0, int(122))"
- << "QScriptValue(0, uint(124))"
- << "QScriptValue(0, 0)"
- << "QScriptValue(0, 0.0)"
- << "QScriptValue(0, 123.0)"
- << "QScriptValue(0, 6.37e-8)"
- << "QScriptValue(0, -6.37e-8)"
- << "QScriptValue(0, 0x43211234)"
- << "QScriptValue(0, 0x10000)"
- << "QScriptValue(0, 0x10001)"
- << "QScriptValue(0, qSNaN())"
- << "QScriptValue(0, qQNaN())"
- << "QScriptValue(0, qInf())"
- << "QScriptValue(0, -qInf())"
- << "QScriptValue(engine, int(122))"
- << "QScriptValue(engine, uint(124))"
- << "QScriptValue(engine, 0)"
- << "QScriptValue(engine, 0.0)"
- << "QScriptValue(engine, 123.0)"
- << "QScriptValue(engine, 6.37e-8)"
- << "QScriptValue(engine, -6.37e-8)"
- << "QScriptValue(engine, 0x43211234)"
- << "QScriptValue(engine, 0x10000)"
- << "QScriptValue(engine, 0x10001)"
- << "QScriptValue(engine, qSNaN())"
- << "QScriptValue(engine, qQNaN())"
- << "QScriptValue(engine, qInf())"
- << "QScriptValue(engine, -qInf())"
- ;
- }
- newRow(expr) << isNumber.contains(expr);
-}
-
-void tst_QScriptValue::isNumber_test(const char*, const QScriptValue& value)
-{
- QFETCH(bool, expected);
- QCOMPARE(value.isNumber(), expected);
-}
-
-DEFINE_TEST_FUNCTION(isNumber)
-
-
-void tst_QScriptValue::isFunction_initData()
-{
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::isFunction_makeData(const char* expr)
-{
- static QSet<QString> isFunction;
- if (isFunction.isEmpty()) {
- isFunction << "engine->evaluate(\"Function.prototype\")"
- << "engine->evaluate(\"Object\")"
- << "engine->evaluate(\"Array\")"
- << "engine->evaluate(\"Number\")"
- << "engine->evaluate(\"Function\")"
- << "engine->evaluate(\"(function() { return 1; })\")"
- << "engine->evaluate(\"(function() { return 'ciao'; })\")"
- << "engine->evaluate(\"(function() { throw new Error('foo'); })\")"
- << "engine->evaluate(\"/foo/\")"
- ;
- }
- newRow(expr) << isFunction.contains(expr);
-}
-
-void tst_QScriptValue::isFunction_test(const char*, const QScriptValue& value)
-{
- QFETCH(bool, expected);
- QCOMPARE(value.isFunction(), expected);
-}
-
-DEFINE_TEST_FUNCTION(isFunction)
-
-
-void tst_QScriptValue::isNull_initData()
-{
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::isNull_makeData(const char* expr)
-{
- static QSet<QString> isNull;
- if (isNull.isEmpty()) {
- isNull << "QScriptValue(QScriptValue::NullValue)"
- << "QScriptValue(0, QScriptValue::NullValue)"
- << "QScriptValue(engine, QScriptValue::NullValue)"
- << "engine->nullValue()"
- ;
- }
- newRow(expr) << isNull.contains(expr);
-}
-
-void tst_QScriptValue::isNull_test(const char*, const QScriptValue& value)
-{
- QFETCH(bool, expected);
- QCOMPARE(value.isNull(), expected);
-}
-
-DEFINE_TEST_FUNCTION(isNull)
-
-
-void tst_QScriptValue::isString_initData()
-{
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::isString_makeData(const char* expr)
-{
- static QSet<QString> isString;
- if (isString.isEmpty()) {
- isString << "QScriptValue(\"NaN\")"
- << "QScriptValue(\"Infinity\")"
- << "QScriptValue(\"-Infinity\")"
- << "QScriptValue(\"ciao\")"
- << "QScriptValue(QString::fromLatin1(\"ciao\"))"
- << "QScriptValue(QString(\"\"))"
- << "QScriptValue(QString())"
- << "QScriptValue(QString(\"0\"))"
- << "QScriptValue(QString(\"123\"))"
- << "QScriptValue(QString(\"12.4\"))"
- << "QScriptValue(0, \"NaN\")"
- << "QScriptValue(0, \"Infinity\")"
- << "QScriptValue(0, \"-Infinity\")"
- << "QScriptValue(0, \"ciao\")"
- << "QScriptValue(0, QString::fromLatin1(\"ciao\"))"
- << "QScriptValue(0, QString(\"\"))"
- << "QScriptValue(0, QString())"
- << "QScriptValue(0, QString(\"0\"))"
- << "QScriptValue(0, QString(\"123\"))"
- << "QScriptValue(0, QString(\"12.3\"))"
- << "QScriptValue(engine, \"NaN\")"
- << "QScriptValue(engine, \"Infinity\")"
- << "QScriptValue(engine, \"-Infinity\")"
- << "QScriptValue(engine, \"ciao\")"
- << "QScriptValue(engine, QString::fromLatin1(\"ciao\"))"
- << "QScriptValue(engine, QString(\"\"))"
- << "QScriptValue(engine, QString())"
- << "QScriptValue(engine, QString(\"0\"))"
- << "QScriptValue(engine, QString(\"123\"))"
- << "QScriptValue(engine, QString(\"1.23\"))"
- ;
- }
- newRow(expr) << isString.contains(expr);
-}
-
-void tst_QScriptValue::isString_test(const char*, const QScriptValue& value)
-{
- QFETCH(bool, expected);
- QCOMPARE(value.isString(), expected);
-}
-
-DEFINE_TEST_FUNCTION(isString)
-
-
-void tst_QScriptValue::isUndefined_initData()
-{
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::isUndefined_makeData(const char* expr)
-{
- static QSet<QString> isUndefined;
- if (isUndefined.isEmpty()) {
- isUndefined << "QScriptValue(QScriptValue::UndefinedValue)"
- << "QScriptValue(0, QScriptValue::UndefinedValue)"
- << "QScriptValue(engine, QScriptValue::UndefinedValue)"
- << "engine->evaluate(\"{}\")"
- << "engine->undefinedValue()"
- ;
- }
- newRow(expr) << isUndefined.contains(expr);
-}
-
-void tst_QScriptValue::isUndefined_test(const char*, const QScriptValue& value)
-{
- QFETCH(bool, expected);
- QCOMPARE(value.isUndefined(), expected);
-}
-
-DEFINE_TEST_FUNCTION(isUndefined)
-
-
-
-
-
-void tst_QScriptValue::isObject_initData()
-{
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::isObject_makeData(const char* expr)
-{
- static QSet<QString> isObject;
- if (isObject.isEmpty()) {
- isObject << "engine->evaluate(\"[]\")"
- << "engine->evaluate(\"Object.prototype\")"
- << "engine->evaluate(\"Date.prototype\")"
- << "engine->evaluate(\"Array.prototype\")"
- << "engine->evaluate(\"Function.prototype\")"
- << "engine->evaluate(\"Error.prototype\")"
- << "engine->evaluate(\"Object\")"
- << "engine->evaluate(\"Array\")"
- << "engine->evaluate(\"Number\")"
- << "engine->evaluate(\"Function\")"
- << "engine->evaluate(\"(function() { return 1; })\")"
- << "engine->evaluate(\"(function() { return 'ciao'; })\")"
- << "engine->evaluate(\"(function() { throw new Error('foo'); })\")"
- << "engine->evaluate(\"/foo/\")"
- << "engine->evaluate(\"new Object()\")"
- << "engine->evaluate(\"new Array()\")"
- << "engine->evaluate(\"new Error()\")"
- ;
- }
- newRow(expr) << isObject.contains(expr);
-}
-
-void tst_QScriptValue::isObject_test(const char*, const QScriptValue& value)
-{
- QFETCH(bool, expected);
- QCOMPARE(value.isObject(), expected);
-}
-
-DEFINE_TEST_FUNCTION(isObject)
-
-
-void tst_QScriptValue::isDate_initData()
-{
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::isDate_makeData(const char* expr)
-{
- static QSet<QString> isDate;
- if (isDate.isEmpty()) {
- isDate << "engine->evaluate(\"Date.prototype\")"
- ;
- }
- newRow(expr) << isDate.contains(expr);
-}
-
-void tst_QScriptValue::isDate_test(const char*, const QScriptValue& value)
-{
- QFETCH(bool, expected);
- QCOMPARE(value.isDate(), expected);
-}
-
-DEFINE_TEST_FUNCTION(isDate)
-
-
-void tst_QScriptValue::isRegExp_initData()
-{
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::isRegExp_makeData(const char* expr)
-{
- static QSet<QString> isRegExp;
- if (isRegExp.isEmpty()) {
- isRegExp << "engine->evaluate(\"/foo/\")"
- ;
- }
- newRow(expr) << isRegExp.contains(expr);
-}
-
-void tst_QScriptValue::isRegExp_test(const char*, const QScriptValue& value)
-{
- QFETCH(bool, expected);
- QCOMPARE(value.isRegExp(), expected);
-}
-
-DEFINE_TEST_FUNCTION(isRegExp)
-
-
-void tst_QScriptValue::isArray_initData()
-{
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::isArray_makeData(const char* expr)
-{
- static QSet<QString> isArray;
- if (isArray.isEmpty()) {
- isArray << "engine->evaluate(\"[]\")"
- << "engine->evaluate(\"Array.prototype\")"
- << "engine->evaluate(\"new Array()\")"
- ;
- }
- newRow(expr) << isArray.contains(expr);
-}
-
-void tst_QScriptValue::isArray_test(const char*, const QScriptValue& value)
-{
- QFETCH(bool, expected);
- QCOMPARE(value.isArray(), expected);
-}
-
-DEFINE_TEST_FUNCTION(isArray)
-
-
-void tst_QScriptValue::isError_initData()
-{
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::isError_makeData(const char* expr)
-{
- static QSet<QString> isError;
- if (isError.isEmpty()) {
- isError << "engine->evaluate(\"Error.prototype\")"
- << "engine->evaluate(\"new Error()\")"
- ;
- }
- newRow(expr) << isError.contains(expr);
-}
-
-void tst_QScriptValue::isError_test(const char*, const QScriptValue& value)
-{
- QFETCH(bool, expected);
- QCOMPARE(value.isError(), expected);
-}
-
-DEFINE_TEST_FUNCTION(isError)
-
-
-
-void tst_QScriptValue::toString_initData()
-{
- QTest::addColumn<QString>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::toString_makeData(const char* expr)
-{
- static QHash<QString, QString> toString;
- if (toString.isEmpty()) {
- toString.insert("QScriptValue()", "");
- toString.insert("QScriptValue(QScriptValue::UndefinedValue)", "undefined");
- toString.insert("QScriptValue(QScriptValue::NullValue)", "null");
- toString.insert("QScriptValue(true)", "true");
- toString.insert("QScriptValue(false)", "false");
- toString.insert("QScriptValue(int(122))", "122");
- toString.insert("QScriptValue(uint(124))", "124");
- toString.insert("QScriptValue(0)", "0");
- toString.insert("QScriptValue(0.0)", "0");
- toString.insert("QScriptValue(123.0)", "123");
- toString.insert("QScriptValue(6.37e-8)", "6.37e-8");
- toString.insert("QScriptValue(-6.37e-8)", "-6.37e-8");
- toString.insert("QScriptValue(0x43211234)", "1126240820");
- toString.insert("QScriptValue(0x10000)", "65536");
- toString.insert("QScriptValue(0x10001)", "65537");
- toString.insert("QScriptValue(qSNaN())", "NaN");
- toString.insert("QScriptValue(qQNaN())", "NaN");
- toString.insert("QScriptValue(qInf())", "Infinity");
- toString.insert("QScriptValue(-qInf())", "-Infinity");
- toString.insert("QScriptValue(\"NaN\")", "NaN");
- toString.insert("QScriptValue(\"Infinity\")", "Infinity");
- toString.insert("QScriptValue(\"-Infinity\")", "-Infinity");
- toString.insert("QScriptValue(\"ciao\")", "ciao");
- toString.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", "ciao");
- toString.insert("QScriptValue(QString(\"\"))", "");
- toString.insert("QScriptValue(QString())", "");
- toString.insert("QScriptValue(QString(\"0\"))", "0");
- toString.insert("QScriptValue(QString(\"123\"))", "123");
- toString.insert("QScriptValue(QString(\"12.4\"))", "12.4");
- toString.insert("QScriptValue(0, QScriptValue::UndefinedValue)", "undefined");
- toString.insert("QScriptValue(0, QScriptValue::NullValue)", "null");
- toString.insert("QScriptValue(0, true)", "true");
- toString.insert("QScriptValue(0, false)", "false");
- toString.insert("QScriptValue(0, int(122))", "122");
- toString.insert("QScriptValue(0, uint(124))", "124");
- toString.insert("QScriptValue(0, 0)", "0");
- toString.insert("QScriptValue(0, 0.0)", "0");
- toString.insert("QScriptValue(0, 123.0)", "123");
- toString.insert("QScriptValue(0, 6.37e-8)", "6.37e-8");
- toString.insert("QScriptValue(0, -6.37e-8)", "-6.37e-8");
- toString.insert("QScriptValue(0, 0x43211234)", "1126240820");
- toString.insert("QScriptValue(0, 0x10000)", "65536");
- toString.insert("QScriptValue(0, 0x10001)", "65537");
- toString.insert("QScriptValue(0, qSNaN())", "NaN");
- toString.insert("QScriptValue(0, qQNaN())", "NaN");
- toString.insert("QScriptValue(0, qInf())", "Infinity");
- toString.insert("QScriptValue(0, -qInf())", "-Infinity");
- toString.insert("QScriptValue(0, \"NaN\")", "NaN");
- toString.insert("QScriptValue(0, \"Infinity\")", "Infinity");
- toString.insert("QScriptValue(0, \"-Infinity\")", "-Infinity");
- toString.insert("QScriptValue(0, \"ciao\")", "ciao");
- toString.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", "ciao");
- toString.insert("QScriptValue(0, QString(\"\"))", "");
- toString.insert("QScriptValue(0, QString())", "");
- toString.insert("QScriptValue(0, QString(\"0\"))", "0");
- toString.insert("QScriptValue(0, QString(\"123\"))", "123");
- toString.insert("QScriptValue(0, QString(\"12.3\"))", "12.3");
- toString.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", "undefined");
- toString.insert("QScriptValue(engine, QScriptValue::NullValue)", "null");
- toString.insert("QScriptValue(engine, true)", "true");
- toString.insert("QScriptValue(engine, false)", "false");
- toString.insert("QScriptValue(engine, int(122))", "122");
- toString.insert("QScriptValue(engine, uint(124))", "124");
- toString.insert("QScriptValue(engine, 0)", "0");
- toString.insert("QScriptValue(engine, 0.0)", "0");
- toString.insert("QScriptValue(engine, 123.0)", "123");
- toString.insert("QScriptValue(engine, 6.37e-8)", "6.37e-8");
- toString.insert("QScriptValue(engine, -6.37e-8)", "-6.37e-8");
- toString.insert("QScriptValue(engine, 0x43211234)", "1126240820");
- toString.insert("QScriptValue(engine, 0x10000)", "65536");
- toString.insert("QScriptValue(engine, 0x10001)", "65537");
- toString.insert("QScriptValue(engine, qSNaN())", "NaN");
- toString.insert("QScriptValue(engine, qQNaN())", "NaN");
- toString.insert("QScriptValue(engine, qInf())", "Infinity");
- toString.insert("QScriptValue(engine, -qInf())", "-Infinity");
- toString.insert("QScriptValue(engine, \"NaN\")", "NaN");
- toString.insert("QScriptValue(engine, \"Infinity\")", "Infinity");
- toString.insert("QScriptValue(engine, \"-Infinity\")", "-Infinity");
- toString.insert("QScriptValue(engine, \"ciao\")", "ciao");
- toString.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", "ciao");
- toString.insert("QScriptValue(engine, QString(\"\"))", "");
- toString.insert("QScriptValue(engine, QString())", "");
- toString.insert("QScriptValue(engine, QString(\"0\"))", "0");
- toString.insert("QScriptValue(engine, QString(\"123\"))", "123");
- toString.insert("QScriptValue(engine, QString(\"1.23\"))", "1.23");
- toString.insert("engine->evaluate(\"[]\")", "");
- toString.insert("engine->evaluate(\"{}\")", "undefined");
- toString.insert("engine->evaluate(\"Object.prototype\")", "[object Object]");
- toString.insert("engine->evaluate(\"Date.prototype\")", "Invalid Date");
- toString.insert("engine->evaluate(\"Array.prototype\")", "");
- toString.insert("engine->evaluate(\"Function.prototype\")", "function () {\n [native code]\n}");
- toString.insert("engine->evaluate(\"Error.prototype\")", "Error: Unknown error");
- toString.insert("engine->evaluate(\"Object\")", "function Object() {\n [native code]\n}");
- toString.insert("engine->evaluate(\"Array\")", "function Array() {\n [native code]\n}");
- toString.insert("engine->evaluate(\"Number\")", "function Number() {\n [native code]\n}");
- toString.insert("engine->evaluate(\"Function\")", "function Function() {\n [native code]\n}");
- toString.insert("engine->evaluate(\"(function() { return 1; })\")", "function () { return 1; }");
- toString.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", "function () { return 'ciao'; }");
- toString.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", "function () { throw new Error('foo'); }");
- toString.insert("engine->evaluate(\"/foo/\")", "/foo/");
- toString.insert("engine->evaluate(\"new Object()\")", "[object Object]");
- toString.insert("engine->evaluate(\"new Array()\")", "");
- toString.insert("engine->evaluate(\"new Error()\")", "Error: Unknown error");
- toString.insert("engine->nullValue()", "null");
- toString.insert("engine->undefinedValue()", "undefined");
- }
- newRow(expr) << toString.value(expr);
-}
-
-void tst_QScriptValue::toString_test(const char*, const QScriptValue& value)
-{
- QFETCH(QString, expected);
- QCOMPARE(value.toString(), expected);
-}
-
-DEFINE_TEST_FUNCTION(toString)
-
-
-void tst_QScriptValue::toNumber_initData()
-{
- QTest::addColumn<qsreal>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::toNumber_makeData(const char* expr)
-{
- static QHash<QString, qsreal> toNumber;
- if (toNumber.isEmpty()) {
- toNumber.insert("QScriptValue()", 0);
- toNumber.insert("QScriptValue(QScriptValue::UndefinedValue)", qQNaN());
- toNumber.insert("QScriptValue(QScriptValue::NullValue)", 0);
- toNumber.insert("QScriptValue(true)", 1);
- toNumber.insert("QScriptValue(false)", 0);
- toNumber.insert("QScriptValue(int(122))", 122);
- toNumber.insert("QScriptValue(uint(124))", 124);
- toNumber.insert("QScriptValue(0)", 0);
- toNumber.insert("QScriptValue(0.0)", 0);
- toNumber.insert("QScriptValue(123.0)", 123);
- toNumber.insert("QScriptValue(6.37e-8)", 6.369999999999999e-08);
- toNumber.insert("QScriptValue(-6.37e-8)", -6.369999999999999e-08);
- toNumber.insert("QScriptValue(0x43211234)", 1126240820);
- toNumber.insert("QScriptValue(0x10000)", 65536);
- toNumber.insert("QScriptValue(0x10001)", 65537);
- toNumber.insert("QScriptValue(qSNaN())", qQNaN());
- toNumber.insert("QScriptValue(qQNaN())", qQNaN());
- toNumber.insert("QScriptValue(qInf())", qInf());
- toNumber.insert("QScriptValue(-qInf())", qInf());
- toNumber.insert("QScriptValue(\"NaN\")", qQNaN());
- toNumber.insert("QScriptValue(\"Infinity\")", qInf());
- toNumber.insert("QScriptValue(\"-Infinity\")", qInf());
- toNumber.insert("QScriptValue(\"ciao\")", qQNaN());
- toNumber.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", qQNaN());
- toNumber.insert("QScriptValue(QString(\"\"))", 0);
- toNumber.insert("QScriptValue(QString())", 0);
- toNumber.insert("QScriptValue(QString(\"0\"))", 0);
- toNumber.insert("QScriptValue(QString(\"123\"))", 123);
- toNumber.insert("QScriptValue(QString(\"12.4\"))", 12.4);
- toNumber.insert("QScriptValue(0, QScriptValue::UndefinedValue)", qQNaN());
- toNumber.insert("QScriptValue(0, QScriptValue::NullValue)", 0);
- toNumber.insert("QScriptValue(0, true)", 1);
- toNumber.insert("QScriptValue(0, false)", 0);
- toNumber.insert("QScriptValue(0, int(122))", 122);
- toNumber.insert("QScriptValue(0, uint(124))", 124);
- toNumber.insert("QScriptValue(0, 0)", 0);
- toNumber.insert("QScriptValue(0, 0.0)", 0);
- toNumber.insert("QScriptValue(0, 123.0)", 123);
- toNumber.insert("QScriptValue(0, 6.37e-8)", 6.369999999999999e-08);
- toNumber.insert("QScriptValue(0, -6.37e-8)", -6.369999999999999e-08);
- toNumber.insert("QScriptValue(0, 0x43211234)", 1126240820);
- toNumber.insert("QScriptValue(0, 0x10000)", 65536);
- toNumber.insert("QScriptValue(0, 0x10001)", 65537);
- toNumber.insert("QScriptValue(0, qSNaN())", qQNaN());
- toNumber.insert("QScriptValue(0, qQNaN())", qQNaN());
- toNumber.insert("QScriptValue(0, qInf())", qInf());
- toNumber.insert("QScriptValue(0, -qInf())", qInf());
- toNumber.insert("QScriptValue(0, \"NaN\")", qQNaN());
- toNumber.insert("QScriptValue(0, \"Infinity\")", qInf());
- toNumber.insert("QScriptValue(0, \"-Infinity\")", qInf());
- toNumber.insert("QScriptValue(0, \"ciao\")", qQNaN());
- toNumber.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", qQNaN());
- toNumber.insert("QScriptValue(0, QString(\"\"))", 0);
- toNumber.insert("QScriptValue(0, QString())", 0);
- toNumber.insert("QScriptValue(0, QString(\"0\"))", 0);
- toNumber.insert("QScriptValue(0, QString(\"123\"))", 123);
- toNumber.insert("QScriptValue(0, QString(\"12.3\"))", 12.3);
- toNumber.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", qQNaN());
- toNumber.insert("QScriptValue(engine, QScriptValue::NullValue)", 0);
- toNumber.insert("QScriptValue(engine, true)", 1);
- toNumber.insert("QScriptValue(engine, false)", 0);
- toNumber.insert("QScriptValue(engine, int(122))", 122);
- toNumber.insert("QScriptValue(engine, uint(124))", 124);
- toNumber.insert("QScriptValue(engine, 0)", 0);
- toNumber.insert("QScriptValue(engine, 0.0)", 0);
- toNumber.insert("QScriptValue(engine, 123.0)", 123);
- toNumber.insert("QScriptValue(engine, 6.37e-8)", 6.369999999999999e-08);
- toNumber.insert("QScriptValue(engine, -6.37e-8)", -6.369999999999999e-08);
- toNumber.insert("QScriptValue(engine, 0x43211234)", 1126240820);
- toNumber.insert("QScriptValue(engine, 0x10000)", 65536);
- toNumber.insert("QScriptValue(engine, 0x10001)", 65537);
- toNumber.insert("QScriptValue(engine, qSNaN())", qQNaN());
- toNumber.insert("QScriptValue(engine, qQNaN())", qQNaN());
- toNumber.insert("QScriptValue(engine, qInf())", qInf());
- toNumber.insert("QScriptValue(engine, -qInf())", qInf());
- toNumber.insert("QScriptValue(engine, \"NaN\")", qQNaN());
- toNumber.insert("QScriptValue(engine, \"Infinity\")", qInf());
- toNumber.insert("QScriptValue(engine, \"-Infinity\")", qInf());
- toNumber.insert("QScriptValue(engine, \"ciao\")", qQNaN());
- toNumber.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", qQNaN());
- toNumber.insert("QScriptValue(engine, QString(\"\"))", 0);
- toNumber.insert("QScriptValue(engine, QString())", 0);
- toNumber.insert("QScriptValue(engine, QString(\"0\"))", 0);
- toNumber.insert("QScriptValue(engine, QString(\"123\"))", 123);
- toNumber.insert("QScriptValue(engine, QString(\"1.23\"))", 1.23);
- toNumber.insert("engine->evaluate(\"[]\")", 0);
- toNumber.insert("engine->evaluate(\"{}\")", qQNaN());
- toNumber.insert("engine->evaluate(\"Object.prototype\")", qQNaN());
- toNumber.insert("engine->evaluate(\"Date.prototype\")", qQNaN());
- toNumber.insert("engine->evaluate(\"Array.prototype\")", 0);
- toNumber.insert("engine->evaluate(\"Function.prototype\")", qQNaN());
- toNumber.insert("engine->evaluate(\"Error.prototype\")", qQNaN());
- toNumber.insert("engine->evaluate(\"Object\")", qQNaN());
- toNumber.insert("engine->evaluate(\"Array\")", qQNaN());
- toNumber.insert("engine->evaluate(\"Number\")", qQNaN());
- toNumber.insert("engine->evaluate(\"Function\")", qQNaN());
- toNumber.insert("engine->evaluate(\"(function() { return 1; })\")", qQNaN());
- toNumber.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", qQNaN());
- toNumber.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", qQNaN());
- toNumber.insert("engine->evaluate(\"/foo/\")", qQNaN());
- toNumber.insert("engine->evaluate(\"new Object()\")", qQNaN());
- toNumber.insert("engine->evaluate(\"new Array()\")", 0);
- toNumber.insert("engine->evaluate(\"new Error()\")", qQNaN());
- toNumber.insert("engine->nullValue()", 0);
- toNumber.insert("engine->undefinedValue()", qQNaN());
- }
- newRow(expr) << toNumber.value(expr);
-}
-
-void tst_QScriptValue::toNumber_test(const char*, const QScriptValue& value)
-{
- QFETCH(qsreal, expected);
- if (qIsNaN(expected)) {
- QVERIFY(qIsNaN(value.toNumber()));
- return;
- }
- if (qIsInf(expected)) {
- QVERIFY(qIsInf(value.toNumber()));
- return;
- }
- QCOMPARE(value.toNumber(), expected);
-}
-
-DEFINE_TEST_FUNCTION(toNumber)
-
-
-void tst_QScriptValue::toBool_initData()
-{
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::toBool_makeData(const char* expr)
-{
- static QHash<QString, bool> toBool;
- if (toBool.isEmpty()) {
- toBool.insert("QScriptValue()", false);
- toBool.insert("QScriptValue(QScriptValue::UndefinedValue)", false);
- toBool.insert("QScriptValue(QScriptValue::NullValue)", false);
- toBool.insert("QScriptValue(true)", true);
- toBool.insert("QScriptValue(false)", false);
- toBool.insert("QScriptValue(int(122))", true);
- toBool.insert("QScriptValue(uint(124))", true);
- toBool.insert("QScriptValue(0)", false);
- toBool.insert("QScriptValue(0.0)", false);
- toBool.insert("QScriptValue(123.0)", true);
- toBool.insert("QScriptValue(6.37e-8)", true);
- toBool.insert("QScriptValue(-6.37e-8)", true);
- toBool.insert("QScriptValue(0x43211234)", true);
- toBool.insert("QScriptValue(0x10000)", true);
- toBool.insert("QScriptValue(0x10001)", true);
- toBool.insert("QScriptValue(qSNaN())", false);
- toBool.insert("QScriptValue(qQNaN())", false);
- toBool.insert("QScriptValue(qInf())", true);
- toBool.insert("QScriptValue(-qInf())", true);
- toBool.insert("QScriptValue(\"NaN\")", true);
- toBool.insert("QScriptValue(\"Infinity\")", true);
- toBool.insert("QScriptValue(\"-Infinity\")", true);
- toBool.insert("QScriptValue(\"ciao\")", true);
- toBool.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", true);
- toBool.insert("QScriptValue(QString(\"\"))", false);
- toBool.insert("QScriptValue(QString())", false);
- toBool.insert("QScriptValue(QString(\"0\"))", true);
- toBool.insert("QScriptValue(QString(\"123\"))", true);
- toBool.insert("QScriptValue(QString(\"12.4\"))", true);
- toBool.insert("QScriptValue(0, QScriptValue::UndefinedValue)", false);
- toBool.insert("QScriptValue(0, QScriptValue::NullValue)", false);
- toBool.insert("QScriptValue(0, true)", true);
- toBool.insert("QScriptValue(0, false)", false);
- toBool.insert("QScriptValue(0, int(122))", true);
- toBool.insert("QScriptValue(0, uint(124))", true);
- toBool.insert("QScriptValue(0, 0)", false);
- toBool.insert("QScriptValue(0, 0.0)", false);
- toBool.insert("QScriptValue(0, 123.0)", true);
- toBool.insert("QScriptValue(0, 6.37e-8)", true);
- toBool.insert("QScriptValue(0, -6.37e-8)", true);
- toBool.insert("QScriptValue(0, 0x43211234)", true);
- toBool.insert("QScriptValue(0, 0x10000)", true);
- toBool.insert("QScriptValue(0, 0x10001)", true);
- toBool.insert("QScriptValue(0, qSNaN())", false);
- toBool.insert("QScriptValue(0, qQNaN())", false);
- toBool.insert("QScriptValue(0, qInf())", true);
- toBool.insert("QScriptValue(0, -qInf())", true);
- toBool.insert("QScriptValue(0, \"NaN\")", true);
- toBool.insert("QScriptValue(0, \"Infinity\")", true);
- toBool.insert("QScriptValue(0, \"-Infinity\")", true);
- toBool.insert("QScriptValue(0, \"ciao\")", true);
- toBool.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", true);
- toBool.insert("QScriptValue(0, QString(\"\"))", false);
- toBool.insert("QScriptValue(0, QString())", false);
- toBool.insert("QScriptValue(0, QString(\"0\"))", true);
- toBool.insert("QScriptValue(0, QString(\"123\"))", true);
- toBool.insert("QScriptValue(0, QString(\"12.3\"))", true);
- toBool.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", false);
- toBool.insert("QScriptValue(engine, QScriptValue::NullValue)", false);
- toBool.insert("QScriptValue(engine, true)", true);
- toBool.insert("QScriptValue(engine, false)", false);
- toBool.insert("QScriptValue(engine, int(122))", true);
- toBool.insert("QScriptValue(engine, uint(124))", true);
- toBool.insert("QScriptValue(engine, 0)", false);
- toBool.insert("QScriptValue(engine, 0.0)", false);
- toBool.insert("QScriptValue(engine, 123.0)", true);
- toBool.insert("QScriptValue(engine, 6.37e-8)", true);
- toBool.insert("QScriptValue(engine, -6.37e-8)", true);
- toBool.insert("QScriptValue(engine, 0x43211234)", true);
- toBool.insert("QScriptValue(engine, 0x10000)", true);
- toBool.insert("QScriptValue(engine, 0x10001)", true);
- toBool.insert("QScriptValue(engine, qSNaN())", false);
- toBool.insert("QScriptValue(engine, qQNaN())", false);
- toBool.insert("QScriptValue(engine, qInf())", true);
- toBool.insert("QScriptValue(engine, -qInf())", true);
- toBool.insert("QScriptValue(engine, \"NaN\")", true);
- toBool.insert("QScriptValue(engine, \"Infinity\")", true);
- toBool.insert("QScriptValue(engine, \"-Infinity\")", true);
- toBool.insert("QScriptValue(engine, \"ciao\")", true);
- toBool.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", true);
- toBool.insert("QScriptValue(engine, QString(\"\"))", false);
- toBool.insert("QScriptValue(engine, QString())", false);
- toBool.insert("QScriptValue(engine, QString(\"0\"))", true);
- toBool.insert("QScriptValue(engine, QString(\"123\"))", true);
- toBool.insert("QScriptValue(engine, QString(\"1.23\"))", true);
- toBool.insert("engine->evaluate(\"[]\")", true);
- toBool.insert("engine->evaluate(\"{}\")", false);
- toBool.insert("engine->evaluate(\"Object.prototype\")", true);
- toBool.insert("engine->evaluate(\"Date.prototype\")", true);
- toBool.insert("engine->evaluate(\"Array.prototype\")", true);
- toBool.insert("engine->evaluate(\"Function.prototype\")", true);
- toBool.insert("engine->evaluate(\"Error.prototype\")", true);
- toBool.insert("engine->evaluate(\"Object\")", true);
- toBool.insert("engine->evaluate(\"Array\")", true);
- toBool.insert("engine->evaluate(\"Number\")", true);
- toBool.insert("engine->evaluate(\"Function\")", true);
- toBool.insert("engine->evaluate(\"(function() { return 1; })\")", true);
- toBool.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", true);
- toBool.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", true);
- toBool.insert("engine->evaluate(\"/foo/\")", true);
- toBool.insert("engine->evaluate(\"new Object()\")", true);
- toBool.insert("engine->evaluate(\"new Array()\")", true);
- toBool.insert("engine->evaluate(\"new Error()\")", true);
- toBool.insert("engine->nullValue()", false);
- toBool.insert("engine->undefinedValue()", false);
- }
- newRow(expr) << toBool.value(expr);
-}
-
-void tst_QScriptValue::toBool_test(const char*, const QScriptValue& value)
-{
- QFETCH(bool, expected);
- QCOMPARE(value.toBool(), expected);
-}
-
-DEFINE_TEST_FUNCTION(toBool)
-
-
-void tst_QScriptValue::toBoolean_initData()
-{
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::toBoolean_makeData(const char* expr)
-{
- static QHash<QString, bool> toBoolean;
- if (toBoolean.isEmpty()) {
- toBoolean.insert("QScriptValue()", false);
- toBoolean.insert("QScriptValue(QScriptValue::UndefinedValue)", false);
- toBoolean.insert("QScriptValue(QScriptValue::NullValue)", false);
- toBoolean.insert("QScriptValue(true)", true);
- toBoolean.insert("QScriptValue(false)", false);
- toBoolean.insert("QScriptValue(int(122))", true);
- toBoolean.insert("QScriptValue(uint(124))", true);
- toBoolean.insert("QScriptValue(0)", false);
- toBoolean.insert("QScriptValue(0.0)", false);
- toBoolean.insert("QScriptValue(123.0)", true);
- toBoolean.insert("QScriptValue(6.37e-8)", true);
- toBoolean.insert("QScriptValue(-6.37e-8)", true);
- toBoolean.insert("QScriptValue(0x43211234)", true);
- toBoolean.insert("QScriptValue(0x10000)", true);
- toBoolean.insert("QScriptValue(0x10001)", true);
- toBoolean.insert("QScriptValue(qSNaN())", false);
- toBoolean.insert("QScriptValue(qQNaN())", false);
- toBoolean.insert("QScriptValue(qInf())", true);
- toBoolean.insert("QScriptValue(-qInf())", true);
- toBoolean.insert("QScriptValue(\"NaN\")", true);
- toBoolean.insert("QScriptValue(\"Infinity\")", true);
- toBoolean.insert("QScriptValue(\"-Infinity\")", true);
- toBoolean.insert("QScriptValue(\"ciao\")", true);
- toBoolean.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", true);
- toBoolean.insert("QScriptValue(QString(\"\"))", false);
- toBoolean.insert("QScriptValue(QString())", false);
- toBoolean.insert("QScriptValue(QString(\"0\"))", true);
- toBoolean.insert("QScriptValue(QString(\"123\"))", true);
- toBoolean.insert("QScriptValue(QString(\"12.4\"))", true);
- toBoolean.insert("QScriptValue(0, QScriptValue::UndefinedValue)", false);
- toBoolean.insert("QScriptValue(0, QScriptValue::NullValue)", false);
- toBoolean.insert("QScriptValue(0, true)", true);
- toBoolean.insert("QScriptValue(0, false)", false);
- toBoolean.insert("QScriptValue(0, int(122))", true);
- toBoolean.insert("QScriptValue(0, uint(124))", true);
- toBoolean.insert("QScriptValue(0, 0)", false);
- toBoolean.insert("QScriptValue(0, 0.0)", false);
- toBoolean.insert("QScriptValue(0, 123.0)", true);
- toBoolean.insert("QScriptValue(0, 6.37e-8)", true);
- toBoolean.insert("QScriptValue(0, -6.37e-8)", true);
- toBoolean.insert("QScriptValue(0, 0x43211234)", true);
- toBoolean.insert("QScriptValue(0, 0x10000)", true);
- toBoolean.insert("QScriptValue(0, 0x10001)", true);
- toBoolean.insert("QScriptValue(0, qSNaN())", false);
- toBoolean.insert("QScriptValue(0, qQNaN())", false);
- toBoolean.insert("QScriptValue(0, qInf())", true);
- toBoolean.insert("QScriptValue(0, -qInf())", true);
- toBoolean.insert("QScriptValue(0, \"NaN\")", true);
- toBoolean.insert("QScriptValue(0, \"Infinity\")", true);
- toBoolean.insert("QScriptValue(0, \"-Infinity\")", true);
- toBoolean.insert("QScriptValue(0, \"ciao\")", true);
- toBoolean.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", true);
- toBoolean.insert("QScriptValue(0, QString(\"\"))", false);
- toBoolean.insert("QScriptValue(0, QString())", false);
- toBoolean.insert("QScriptValue(0, QString(\"0\"))", true);
- toBoolean.insert("QScriptValue(0, QString(\"123\"))", true);
- toBoolean.insert("QScriptValue(0, QString(\"12.3\"))", true);
- toBoolean.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", false);
- toBoolean.insert("QScriptValue(engine, QScriptValue::NullValue)", false);
- toBoolean.insert("QScriptValue(engine, true)", true);
- toBoolean.insert("QScriptValue(engine, false)", false);
- toBoolean.insert("QScriptValue(engine, int(122))", true);
- toBoolean.insert("QScriptValue(engine, uint(124))", true);
- toBoolean.insert("QScriptValue(engine, 0)", false);
- toBoolean.insert("QScriptValue(engine, 0.0)", false);
- toBoolean.insert("QScriptValue(engine, 123.0)", true);
- toBoolean.insert("QScriptValue(engine, 6.37e-8)", true);
- toBoolean.insert("QScriptValue(engine, -6.37e-8)", true);
- toBoolean.insert("QScriptValue(engine, 0x43211234)", true);
- toBoolean.insert("QScriptValue(engine, 0x10000)", true);
- toBoolean.insert("QScriptValue(engine, 0x10001)", true);
- toBoolean.insert("QScriptValue(engine, qSNaN())", false);
- toBoolean.insert("QScriptValue(engine, qQNaN())", false);
- toBoolean.insert("QScriptValue(engine, qInf())", true);
- toBoolean.insert("QScriptValue(engine, -qInf())", true);
- toBoolean.insert("QScriptValue(engine, \"NaN\")", true);
- toBoolean.insert("QScriptValue(engine, \"Infinity\")", true);
- toBoolean.insert("QScriptValue(engine, \"-Infinity\")", true);
- toBoolean.insert("QScriptValue(engine, \"ciao\")", true);
- toBoolean.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", true);
- toBoolean.insert("QScriptValue(engine, QString(\"\"))", false);
- toBoolean.insert("QScriptValue(engine, QString())", false);
- toBoolean.insert("QScriptValue(engine, QString(\"0\"))", true);
- toBoolean.insert("QScriptValue(engine, QString(\"123\"))", true);
- toBoolean.insert("QScriptValue(engine, QString(\"1.23\"))", true);
- toBoolean.insert("engine->evaluate(\"[]\")", true);
- toBoolean.insert("engine->evaluate(\"{}\")", false);
- toBoolean.insert("engine->evaluate(\"Object.prototype\")", true);
- toBoolean.insert("engine->evaluate(\"Date.prototype\")", true);
- toBoolean.insert("engine->evaluate(\"Array.prototype\")", true);
- toBoolean.insert("engine->evaluate(\"Function.prototype\")", true);
- toBoolean.insert("engine->evaluate(\"Error.prototype\")", true);
- toBoolean.insert("engine->evaluate(\"Object\")", true);
- toBoolean.insert("engine->evaluate(\"Array\")", true);
- toBoolean.insert("engine->evaluate(\"Number\")", true);
- toBoolean.insert("engine->evaluate(\"Function\")", true);
- toBoolean.insert("engine->evaluate(\"(function() { return 1; })\")", true);
- toBoolean.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", true);
- toBoolean.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", true);
- toBoolean.insert("engine->evaluate(\"/foo/\")", true);
- toBoolean.insert("engine->evaluate(\"new Object()\")", true);
- toBoolean.insert("engine->evaluate(\"new Array()\")", true);
- toBoolean.insert("engine->evaluate(\"new Error()\")", true);
- toBoolean.insert("engine->nullValue()", false);
- toBoolean.insert("engine->undefinedValue()", false);
- }
- newRow(expr) << toBoolean.value(expr);
-}
-
-void tst_QScriptValue::toBoolean_test(const char*, const QScriptValue& value)
-{
- QFETCH(bool, expected);
- QCOMPARE(value.toBoolean(), expected);
-}
-
-DEFINE_TEST_FUNCTION(toBoolean)
-
-
-void tst_QScriptValue::toInteger_initData()
-{
- QTest::addColumn<qsreal>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::toInteger_makeData(const char* expr)
-{
- static QHash<QString, qsreal> toInteger;
- if (toInteger.isEmpty()) {
- toInteger.insert("QScriptValue()", 0);
- toInteger.insert("QScriptValue(QScriptValue::UndefinedValue)", 0);
- toInteger.insert("QScriptValue(QScriptValue::NullValue)", 0);
- toInteger.insert("QScriptValue(true)", 1);
- toInteger.insert("QScriptValue(false)", 0);
- toInteger.insert("QScriptValue(int(122))", 122);
- toInteger.insert("QScriptValue(uint(124))", 124);
- toInteger.insert("QScriptValue(0)", 0);
- toInteger.insert("QScriptValue(0.0)", 0);
- toInteger.insert("QScriptValue(123.0)", 123);
- toInteger.insert("QScriptValue(6.37e-8)", 0);
- toInteger.insert("QScriptValue(-6.37e-8)", 0);
- toInteger.insert("QScriptValue(0x43211234)", 1126240820);
- toInteger.insert("QScriptValue(0x10000)", 65536);
- toInteger.insert("QScriptValue(0x10001)", 65537);
- toInteger.insert("QScriptValue(qSNaN())", 0);
- toInteger.insert("QScriptValue(qQNaN())", 0);
- toInteger.insert("QScriptValue(qInf())", qInf());
- toInteger.insert("QScriptValue(-qInf())", qInf());
- toInteger.insert("QScriptValue(\"NaN\")", 0);
- toInteger.insert("QScriptValue(\"Infinity\")", qInf());
- toInteger.insert("QScriptValue(\"-Infinity\")", qInf());
- toInteger.insert("QScriptValue(\"ciao\")", 0);
- toInteger.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0);
- toInteger.insert("QScriptValue(QString(\"\"))", 0);
- toInteger.insert("QScriptValue(QString())", 0);
- toInteger.insert("QScriptValue(QString(\"0\"))", 0);
- toInteger.insert("QScriptValue(QString(\"123\"))", 123);
- toInteger.insert("QScriptValue(QString(\"12.4\"))", 12);
- toInteger.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0);
- toInteger.insert("QScriptValue(0, QScriptValue::NullValue)", 0);
- toInteger.insert("QScriptValue(0, true)", 1);
- toInteger.insert("QScriptValue(0, false)", 0);
- toInteger.insert("QScriptValue(0, int(122))", 122);
- toInteger.insert("QScriptValue(0, uint(124))", 124);
- toInteger.insert("QScriptValue(0, 0)", 0);
- toInteger.insert("QScriptValue(0, 0.0)", 0);
- toInteger.insert("QScriptValue(0, 123.0)", 123);
- toInteger.insert("QScriptValue(0, 6.37e-8)", 0);
- toInteger.insert("QScriptValue(0, -6.37e-8)", 0);
- toInteger.insert("QScriptValue(0, 0x43211234)", 1126240820);
- toInteger.insert("QScriptValue(0, 0x10000)", 65536);
- toInteger.insert("QScriptValue(0, 0x10001)", 65537);
- toInteger.insert("QScriptValue(0, qSNaN())", 0);
- toInteger.insert("QScriptValue(0, qQNaN())", 0);
- toInteger.insert("QScriptValue(0, qInf())", qInf());
- toInteger.insert("QScriptValue(0, -qInf())", qInf());
- toInteger.insert("QScriptValue(0, \"NaN\")", 0);
- toInteger.insert("QScriptValue(0, \"Infinity\")", qInf());
- toInteger.insert("QScriptValue(0, \"-Infinity\")", qInf());
- toInteger.insert("QScriptValue(0, \"ciao\")", 0);
- toInteger.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0);
- toInteger.insert("QScriptValue(0, QString(\"\"))", 0);
- toInteger.insert("QScriptValue(0, QString())", 0);
- toInteger.insert("QScriptValue(0, QString(\"0\"))", 0);
- toInteger.insert("QScriptValue(0, QString(\"123\"))", 123);
- toInteger.insert("QScriptValue(0, QString(\"12.3\"))", 12);
- toInteger.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0);
- toInteger.insert("QScriptValue(engine, QScriptValue::NullValue)", 0);
- toInteger.insert("QScriptValue(engine, true)", 1);
- toInteger.insert("QScriptValue(engine, false)", 0);
- toInteger.insert("QScriptValue(engine, int(122))", 122);
- toInteger.insert("QScriptValue(engine, uint(124))", 124);
- toInteger.insert("QScriptValue(engine, 0)", 0);
- toInteger.insert("QScriptValue(engine, 0.0)", 0);
- toInteger.insert("QScriptValue(engine, 123.0)", 123);
- toInteger.insert("QScriptValue(engine, 6.37e-8)", 0);
- toInteger.insert("QScriptValue(engine, -6.37e-8)", 0);
- toInteger.insert("QScriptValue(engine, 0x43211234)", 1126240820);
- toInteger.insert("QScriptValue(engine, 0x10000)", 65536);
- toInteger.insert("QScriptValue(engine, 0x10001)", 65537);
- toInteger.insert("QScriptValue(engine, qSNaN())", 0);
- toInteger.insert("QScriptValue(engine, qQNaN())", 0);
- toInteger.insert("QScriptValue(engine, qInf())", qInf());
- toInteger.insert("QScriptValue(engine, -qInf())", qInf());
- toInteger.insert("QScriptValue(engine, \"NaN\")", 0);
- toInteger.insert("QScriptValue(engine, \"Infinity\")", qInf());
- toInteger.insert("QScriptValue(engine, \"-Infinity\")", qInf());
- toInteger.insert("QScriptValue(engine, \"ciao\")", 0);
- toInteger.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0);
- toInteger.insert("QScriptValue(engine, QString(\"\"))", 0);
- toInteger.insert("QScriptValue(engine, QString())", 0);
- toInteger.insert("QScriptValue(engine, QString(\"0\"))", 0);
- toInteger.insert("QScriptValue(engine, QString(\"123\"))", 123);
- toInteger.insert("QScriptValue(engine, QString(\"1.23\"))", 1);
- toInteger.insert("engine->evaluate(\"[]\")", 0);
- toInteger.insert("engine->evaluate(\"{}\")", 0);
- toInteger.insert("engine->evaluate(\"Object.prototype\")", 0);
- toInteger.insert("engine->evaluate(\"Date.prototype\")", 0);
- toInteger.insert("engine->evaluate(\"Array.prototype\")", 0);
- toInteger.insert("engine->evaluate(\"Function.prototype\")", 0);
- toInteger.insert("engine->evaluate(\"Error.prototype\")", 0);
- toInteger.insert("engine->evaluate(\"Object\")", 0);
- toInteger.insert("engine->evaluate(\"Array\")", 0);
- toInteger.insert("engine->evaluate(\"Number\")", 0);
- toInteger.insert("engine->evaluate(\"Function\")", 0);
- toInteger.insert("engine->evaluate(\"(function() { return 1; })\")", 0);
- toInteger.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0);
- toInteger.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0);
- toInteger.insert("engine->evaluate(\"/foo/\")", 0);
- toInteger.insert("engine->evaluate(\"new Object()\")", 0);
- toInteger.insert("engine->evaluate(\"new Array()\")", 0);
- toInteger.insert("engine->evaluate(\"new Error()\")", 0);
- toInteger.insert("engine->nullValue()", 0);
- toInteger.insert("engine->undefinedValue()", 0);
- }
- newRow(expr) << toInteger.value(expr);
-}
-
-void tst_QScriptValue::toInteger_test(const char*, const QScriptValue& value)
-{
- QFETCH(qsreal, expected);
- if (qIsInf(expected)) {
- QVERIFY(qIsInf(value.toInteger()));
- return;
- }
- QCOMPARE(value.toInteger(), expected);
-}
-
-DEFINE_TEST_FUNCTION(toInteger)
-
-
-void tst_QScriptValue::toInt32_initData()
-{
- QTest::addColumn<qint32>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::toInt32_makeData(const char* expr)
-{
- static QHash<QString, qint32> toInt32;
- if (toInt32.isEmpty()) {
- toInt32.insert("QScriptValue()", 0);
- toInt32.insert("QScriptValue(QScriptValue::UndefinedValue)", 0);
- toInt32.insert("QScriptValue(QScriptValue::NullValue)", 0);
- toInt32.insert("QScriptValue(true)", 1);
- toInt32.insert("QScriptValue(false)", 0);
- toInt32.insert("QScriptValue(int(122))", 122);
- toInt32.insert("QScriptValue(uint(124))", 124);
- toInt32.insert("QScriptValue(0)", 0);
- toInt32.insert("QScriptValue(0.0)", 0);
- toInt32.insert("QScriptValue(123.0)", 123);
- toInt32.insert("QScriptValue(6.37e-8)", 0);
- toInt32.insert("QScriptValue(-6.37e-8)", 0);
- toInt32.insert("QScriptValue(0x43211234)", 1126240820);
- toInt32.insert("QScriptValue(0x10000)", 65536);
- toInt32.insert("QScriptValue(0x10001)", 65537);
- toInt32.insert("QScriptValue(qSNaN())", 0);
- toInt32.insert("QScriptValue(qQNaN())", 0);
- toInt32.insert("QScriptValue(qInf())", 0);
- toInt32.insert("QScriptValue(-qInf())", 0);
- toInt32.insert("QScriptValue(\"NaN\")", 0);
- toInt32.insert("QScriptValue(\"Infinity\")", 0);
- toInt32.insert("QScriptValue(\"-Infinity\")", 0);
- toInt32.insert("QScriptValue(\"ciao\")", 0);
- toInt32.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0);
- toInt32.insert("QScriptValue(QString(\"\"))", 0);
- toInt32.insert("QScriptValue(QString())", 0);
- toInt32.insert("QScriptValue(QString(\"0\"))", 0);
- toInt32.insert("QScriptValue(QString(\"123\"))", 123);
- toInt32.insert("QScriptValue(QString(\"12.4\"))", 12);
- toInt32.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0);
- toInt32.insert("QScriptValue(0, QScriptValue::NullValue)", 0);
- toInt32.insert("QScriptValue(0, true)", 1);
- toInt32.insert("QScriptValue(0, false)", 0);
- toInt32.insert("QScriptValue(0, int(122))", 122);
- toInt32.insert("QScriptValue(0, uint(124))", 124);
- toInt32.insert("QScriptValue(0, 0)", 0);
- toInt32.insert("QScriptValue(0, 0.0)", 0);
- toInt32.insert("QScriptValue(0, 123.0)", 123);
- toInt32.insert("QScriptValue(0, 6.37e-8)", 0);
- toInt32.insert("QScriptValue(0, -6.37e-8)", 0);
- toInt32.insert("QScriptValue(0, 0x43211234)", 1126240820);
- toInt32.insert("QScriptValue(0, 0x10000)", 65536);
- toInt32.insert("QScriptValue(0, 0x10001)", 65537);
- toInt32.insert("QScriptValue(0, qSNaN())", 0);
- toInt32.insert("QScriptValue(0, qQNaN())", 0);
- toInt32.insert("QScriptValue(0, qInf())", 0);
- toInt32.insert("QScriptValue(0, -qInf())", 0);
- toInt32.insert("QScriptValue(0, \"NaN\")", 0);
- toInt32.insert("QScriptValue(0, \"Infinity\")", 0);
- toInt32.insert("QScriptValue(0, \"-Infinity\")", 0);
- toInt32.insert("QScriptValue(0, \"ciao\")", 0);
- toInt32.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0);
- toInt32.insert("QScriptValue(0, QString(\"\"))", 0);
- toInt32.insert("QScriptValue(0, QString())", 0);
- toInt32.insert("QScriptValue(0, QString(\"0\"))", 0);
- toInt32.insert("QScriptValue(0, QString(\"123\"))", 123);
- toInt32.insert("QScriptValue(0, QString(\"12.3\"))", 12);
- toInt32.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0);
- toInt32.insert("QScriptValue(engine, QScriptValue::NullValue)", 0);
- toInt32.insert("QScriptValue(engine, true)", 1);
- toInt32.insert("QScriptValue(engine, false)", 0);
- toInt32.insert("QScriptValue(engine, int(122))", 122);
- toInt32.insert("QScriptValue(engine, uint(124))", 124);
- toInt32.insert("QScriptValue(engine, 0)", 0);
- toInt32.insert("QScriptValue(engine, 0.0)", 0);
- toInt32.insert("QScriptValue(engine, 123.0)", 123);
- toInt32.insert("QScriptValue(engine, 6.37e-8)", 0);
- toInt32.insert("QScriptValue(engine, -6.37e-8)", 0);
- toInt32.insert("QScriptValue(engine, 0x43211234)", 1126240820);
- toInt32.insert("QScriptValue(engine, 0x10000)", 65536);
- toInt32.insert("QScriptValue(engine, 0x10001)", 65537);
- toInt32.insert("QScriptValue(engine, qSNaN())", 0);
- toInt32.insert("QScriptValue(engine, qQNaN())", 0);
- toInt32.insert("QScriptValue(engine, qInf())", 0);
- toInt32.insert("QScriptValue(engine, -qInf())", 0);
- toInt32.insert("QScriptValue(engine, \"NaN\")", 0);
- toInt32.insert("QScriptValue(engine, \"Infinity\")", 0);
- toInt32.insert("QScriptValue(engine, \"-Infinity\")", 0);
- toInt32.insert("QScriptValue(engine, \"ciao\")", 0);
- toInt32.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0);
- toInt32.insert("QScriptValue(engine, QString(\"\"))", 0);
- toInt32.insert("QScriptValue(engine, QString())", 0);
- toInt32.insert("QScriptValue(engine, QString(\"0\"))", 0);
- toInt32.insert("QScriptValue(engine, QString(\"123\"))", 123);
- toInt32.insert("QScriptValue(engine, QString(\"1.23\"))", 1);
- toInt32.insert("engine->evaluate(\"[]\")", 0);
- toInt32.insert("engine->evaluate(\"{}\")", 0);
- toInt32.insert("engine->evaluate(\"Object.prototype\")", 0);
- toInt32.insert("engine->evaluate(\"Date.prototype\")", 0);
- toInt32.insert("engine->evaluate(\"Array.prototype\")", 0);
- toInt32.insert("engine->evaluate(\"Function.prototype\")", 0);
- toInt32.insert("engine->evaluate(\"Error.prototype\")", 0);
- toInt32.insert("engine->evaluate(\"Object\")", 0);
- toInt32.insert("engine->evaluate(\"Array\")", 0);
- toInt32.insert("engine->evaluate(\"Number\")", 0);
- toInt32.insert("engine->evaluate(\"Function\")", 0);
- toInt32.insert("engine->evaluate(\"(function() { return 1; })\")", 0);
- toInt32.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0);
- toInt32.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0);
- toInt32.insert("engine->evaluate(\"/foo/\")", 0);
- toInt32.insert("engine->evaluate(\"new Object()\")", 0);
- toInt32.insert("engine->evaluate(\"new Array()\")", 0);
- toInt32.insert("engine->evaluate(\"new Error()\")", 0);
- toInt32.insert("engine->nullValue()", 0);
- toInt32.insert("engine->undefinedValue()", 0);
- }
- newRow(expr) << toInt32.value(expr);
-}
-
-void tst_QScriptValue::toInt32_test(const char*, const QScriptValue& value)
-{
- QFETCH(qint32, expected);
- QCOMPARE(value.toInt32(), expected);
-}
-
-DEFINE_TEST_FUNCTION(toInt32)
-
-
-void tst_QScriptValue::toUInt32_initData()
-{
- QTest::addColumn<quint32>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::toUInt32_makeData(const char* expr)
-{
- static QHash<QString, quint32> toUInt32;
- if (toUInt32.isEmpty()) {
- toUInt32.insert("QScriptValue()", 0);
- toUInt32.insert("QScriptValue(QScriptValue::UndefinedValue)", 0);
- toUInt32.insert("QScriptValue(QScriptValue::NullValue)", 0);
- toUInt32.insert("QScriptValue(true)", 1);
- toUInt32.insert("QScriptValue(false)", 0);
- toUInt32.insert("QScriptValue(int(122))", 122);
- toUInt32.insert("QScriptValue(uint(124))", 124);
- toUInt32.insert("QScriptValue(0)", 0);
- toUInt32.insert("QScriptValue(0.0)", 0);
- toUInt32.insert("QScriptValue(123.0)", 123);
- toUInt32.insert("QScriptValue(6.37e-8)", 0);
- toUInt32.insert("QScriptValue(-6.37e-8)", 0);
- toUInt32.insert("QScriptValue(0x43211234)", 1126240820);
- toUInt32.insert("QScriptValue(0x10000)", 65536);
- toUInt32.insert("QScriptValue(0x10001)", 65537);
- toUInt32.insert("QScriptValue(qSNaN())", 0);
- toUInt32.insert("QScriptValue(qQNaN())", 0);
- toUInt32.insert("QScriptValue(qInf())", 0);
- toUInt32.insert("QScriptValue(-qInf())", 0);
- toUInt32.insert("QScriptValue(\"NaN\")", 0);
- toUInt32.insert("QScriptValue(\"Infinity\")", 0);
- toUInt32.insert("QScriptValue(\"-Infinity\")", 0);
- toUInt32.insert("QScriptValue(\"ciao\")", 0);
- toUInt32.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0);
- toUInt32.insert("QScriptValue(QString(\"\"))", 0);
- toUInt32.insert("QScriptValue(QString())", 0);
- toUInt32.insert("QScriptValue(QString(\"0\"))", 0);
- toUInt32.insert("QScriptValue(QString(\"123\"))", 123);
- toUInt32.insert("QScriptValue(QString(\"12.4\"))", 12);
- toUInt32.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0);
- toUInt32.insert("QScriptValue(0, QScriptValue::NullValue)", 0);
- toUInt32.insert("QScriptValue(0, true)", 1);
- toUInt32.insert("QScriptValue(0, false)", 0);
- toUInt32.insert("QScriptValue(0, int(122))", 122);
- toUInt32.insert("QScriptValue(0, uint(124))", 124);
- toUInt32.insert("QScriptValue(0, 0)", 0);
- toUInt32.insert("QScriptValue(0, 0.0)", 0);
- toUInt32.insert("QScriptValue(0, 123.0)", 123);
- toUInt32.insert("QScriptValue(0, 6.37e-8)", 0);
- toUInt32.insert("QScriptValue(0, -6.37e-8)", 0);
- toUInt32.insert("QScriptValue(0, 0x43211234)", 1126240820);
- toUInt32.insert("QScriptValue(0, 0x10000)", 65536);
- toUInt32.insert("QScriptValue(0, 0x10001)", 65537);
- toUInt32.insert("QScriptValue(0, qSNaN())", 0);
- toUInt32.insert("QScriptValue(0, qQNaN())", 0);
- toUInt32.insert("QScriptValue(0, qInf())", 0);
- toUInt32.insert("QScriptValue(0, -qInf())", 0);
- toUInt32.insert("QScriptValue(0, \"NaN\")", 0);
- toUInt32.insert("QScriptValue(0, \"Infinity\")", 0);
- toUInt32.insert("QScriptValue(0, \"-Infinity\")", 0);
- toUInt32.insert("QScriptValue(0, \"ciao\")", 0);
- toUInt32.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0);
- toUInt32.insert("QScriptValue(0, QString(\"\"))", 0);
- toUInt32.insert("QScriptValue(0, QString())", 0);
- toUInt32.insert("QScriptValue(0, QString(\"0\"))", 0);
- toUInt32.insert("QScriptValue(0, QString(\"123\"))", 123);
- toUInt32.insert("QScriptValue(0, QString(\"12.3\"))", 12);
- toUInt32.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0);
- toUInt32.insert("QScriptValue(engine, QScriptValue::NullValue)", 0);
- toUInt32.insert("QScriptValue(engine, true)", 1);
- toUInt32.insert("QScriptValue(engine, false)", 0);
- toUInt32.insert("QScriptValue(engine, int(122))", 122);
- toUInt32.insert("QScriptValue(engine, uint(124))", 124);
- toUInt32.insert("QScriptValue(engine, 0)", 0);
- toUInt32.insert("QScriptValue(engine, 0.0)", 0);
- toUInt32.insert("QScriptValue(engine, 123.0)", 123);
- toUInt32.insert("QScriptValue(engine, 6.37e-8)", 0);
- toUInt32.insert("QScriptValue(engine, -6.37e-8)", 0);
- toUInt32.insert("QScriptValue(engine, 0x43211234)", 1126240820);
- toUInt32.insert("QScriptValue(engine, 0x10000)", 65536);
- toUInt32.insert("QScriptValue(engine, 0x10001)", 65537);
- toUInt32.insert("QScriptValue(engine, qSNaN())", 0);
- toUInt32.insert("QScriptValue(engine, qQNaN())", 0);
- toUInt32.insert("QScriptValue(engine, qInf())", 0);
- toUInt32.insert("QScriptValue(engine, -qInf())", 0);
- toUInt32.insert("QScriptValue(engine, \"NaN\")", 0);
- toUInt32.insert("QScriptValue(engine, \"Infinity\")", 0);
- toUInt32.insert("QScriptValue(engine, \"-Infinity\")", 0);
- toUInt32.insert("QScriptValue(engine, \"ciao\")", 0);
- toUInt32.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0);
- toUInt32.insert("QScriptValue(engine, QString(\"\"))", 0);
- toUInt32.insert("QScriptValue(engine, QString())", 0);
- toUInt32.insert("QScriptValue(engine, QString(\"0\"))", 0);
- toUInt32.insert("QScriptValue(engine, QString(\"123\"))", 123);
- toUInt32.insert("QScriptValue(engine, QString(\"1.23\"))", 1);
- toUInt32.insert("engine->evaluate(\"[]\")", 0);
- toUInt32.insert("engine->evaluate(\"{}\")", 0);
- toUInt32.insert("engine->evaluate(\"Object.prototype\")", 0);
- toUInt32.insert("engine->evaluate(\"Date.prototype\")", 0);
- toUInt32.insert("engine->evaluate(\"Array.prototype\")", 0);
- toUInt32.insert("engine->evaluate(\"Function.prototype\")", 0);
- toUInt32.insert("engine->evaluate(\"Error.prototype\")", 0);
- toUInt32.insert("engine->evaluate(\"Object\")", 0);
- toUInt32.insert("engine->evaluate(\"Array\")", 0);
- toUInt32.insert("engine->evaluate(\"Number\")", 0);
- toUInt32.insert("engine->evaluate(\"Function\")", 0);
- toUInt32.insert("engine->evaluate(\"(function() { return 1; })\")", 0);
- toUInt32.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0);
- toUInt32.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0);
- toUInt32.insert("engine->evaluate(\"/foo/\")", 0);
- toUInt32.insert("engine->evaluate(\"new Object()\")", 0);
- toUInt32.insert("engine->evaluate(\"new Array()\")", 0);
- toUInt32.insert("engine->evaluate(\"new Error()\")", 0);
- toUInt32.insert("engine->nullValue()", 0);
- toUInt32.insert("engine->undefinedValue()", 0);
- }
- newRow(expr) << toUInt32.value(expr);
-}
-
-void tst_QScriptValue::toUInt32_test(const char*, const QScriptValue& value)
-{
- QFETCH(quint32, expected);
- QCOMPARE(value.toUInt32(), expected);
-}
-
-DEFINE_TEST_FUNCTION(toUInt32)
-
-
-void tst_QScriptValue::toUInt16_initData()
-{
- QTest::addColumn<quint16>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::toUInt16_makeData(const char* expr)
-{
- static QHash<QString, quint16> toUInt16;
- if (toUInt16.isEmpty()) {
- toUInt16.insert("QScriptValue()", 0);
- toUInt16.insert("QScriptValue(QScriptValue::UndefinedValue)", 0);
- toUInt16.insert("QScriptValue(QScriptValue::NullValue)", 0);
- toUInt16.insert("QScriptValue(true)", 1);
- toUInt16.insert("QScriptValue(false)", 0);
- toUInt16.insert("QScriptValue(int(122))", 122);
- toUInt16.insert("QScriptValue(uint(124))", 124);
- toUInt16.insert("QScriptValue(0)", 0);
- toUInt16.insert("QScriptValue(0.0)", 0);
- toUInt16.insert("QScriptValue(123.0)", 123);
- toUInt16.insert("QScriptValue(6.37e-8)", 0);
- toUInt16.insert("QScriptValue(-6.37e-8)", 0);
- toUInt16.insert("QScriptValue(0x43211234)", 4660);
- toUInt16.insert("QScriptValue(0x10000)", 0);
- toUInt16.insert("QScriptValue(0x10001)", 1);
- toUInt16.insert("QScriptValue(qSNaN())", 0);
- toUInt16.insert("QScriptValue(qQNaN())", 0);
- toUInt16.insert("QScriptValue(qInf())", 0);
- toUInt16.insert("QScriptValue(-qInf())", 0);
- toUInt16.insert("QScriptValue(\"NaN\")", 0);
- toUInt16.insert("QScriptValue(\"Infinity\")", 0);
- toUInt16.insert("QScriptValue(\"-Infinity\")", 0);
- toUInt16.insert("QScriptValue(\"ciao\")", 0);
- toUInt16.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0);
- toUInt16.insert("QScriptValue(QString(\"\"))", 0);
- toUInt16.insert("QScriptValue(QString())", 0);
- toUInt16.insert("QScriptValue(QString(\"0\"))", 0);
- toUInt16.insert("QScriptValue(QString(\"123\"))", 123);
- toUInt16.insert("QScriptValue(QString(\"12.4\"))", 12);
- toUInt16.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0);
- toUInt16.insert("QScriptValue(0, QScriptValue::NullValue)", 0);
- toUInt16.insert("QScriptValue(0, true)", 1);
- toUInt16.insert("QScriptValue(0, false)", 0);
- toUInt16.insert("QScriptValue(0, int(122))", 122);
- toUInt16.insert("QScriptValue(0, uint(124))", 124);
- toUInt16.insert("QScriptValue(0, 0)", 0);
- toUInt16.insert("QScriptValue(0, 0.0)", 0);
- toUInt16.insert("QScriptValue(0, 123.0)", 123);
- toUInt16.insert("QScriptValue(0, 6.37e-8)", 0);
- toUInt16.insert("QScriptValue(0, -6.37e-8)", 0);
- toUInt16.insert("QScriptValue(0, 0x43211234)", 4660);
- toUInt16.insert("QScriptValue(0, 0x10000)", 0);
- toUInt16.insert("QScriptValue(0, 0x10001)", 1);
- toUInt16.insert("QScriptValue(0, qSNaN())", 0);
- toUInt16.insert("QScriptValue(0, qQNaN())", 0);
- toUInt16.insert("QScriptValue(0, qInf())", 0);
- toUInt16.insert("QScriptValue(0, -qInf())", 0);
- toUInt16.insert("QScriptValue(0, \"NaN\")", 0);
- toUInt16.insert("QScriptValue(0, \"Infinity\")", 0);
- toUInt16.insert("QScriptValue(0, \"-Infinity\")", 0);
- toUInt16.insert("QScriptValue(0, \"ciao\")", 0);
- toUInt16.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0);
- toUInt16.insert("QScriptValue(0, QString(\"\"))", 0);
- toUInt16.insert("QScriptValue(0, QString())", 0);
- toUInt16.insert("QScriptValue(0, QString(\"0\"))", 0);
- toUInt16.insert("QScriptValue(0, QString(\"123\"))", 123);
- toUInt16.insert("QScriptValue(0, QString(\"12.3\"))", 12);
- toUInt16.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0);
- toUInt16.insert("QScriptValue(engine, QScriptValue::NullValue)", 0);
- toUInt16.insert("QScriptValue(engine, true)", 1);
- toUInt16.insert("QScriptValue(engine, false)", 0);
- toUInt16.insert("QScriptValue(engine, int(122))", 122);
- toUInt16.insert("QScriptValue(engine, uint(124))", 124);
- toUInt16.insert("QScriptValue(engine, 0)", 0);
- toUInt16.insert("QScriptValue(engine, 0.0)", 0);
- toUInt16.insert("QScriptValue(engine, 123.0)", 123);
- toUInt16.insert("QScriptValue(engine, 6.37e-8)", 0);
- toUInt16.insert("QScriptValue(engine, -6.37e-8)", 0);
- toUInt16.insert("QScriptValue(engine, 0x43211234)", 4660);
- toUInt16.insert("QScriptValue(engine, 0x10000)", 0);
- toUInt16.insert("QScriptValue(engine, 0x10001)", 1);
- toUInt16.insert("QScriptValue(engine, qSNaN())", 0);
- toUInt16.insert("QScriptValue(engine, qQNaN())", 0);
- toUInt16.insert("QScriptValue(engine, qInf())", 0);
- toUInt16.insert("QScriptValue(engine, -qInf())", 0);
- toUInt16.insert("QScriptValue(engine, \"NaN\")", 0);
- toUInt16.insert("QScriptValue(engine, \"Infinity\")", 0);
- toUInt16.insert("QScriptValue(engine, \"-Infinity\")", 0);
- toUInt16.insert("QScriptValue(engine, \"ciao\")", 0);
- toUInt16.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0);
- toUInt16.insert("QScriptValue(engine, QString(\"\"))", 0);
- toUInt16.insert("QScriptValue(engine, QString())", 0);
- toUInt16.insert("QScriptValue(engine, QString(\"0\"))", 0);
- toUInt16.insert("QScriptValue(engine, QString(\"123\"))", 123);
- toUInt16.insert("QScriptValue(engine, QString(\"1.23\"))", 1);
- toUInt16.insert("engine->evaluate(\"[]\")", 0);
- toUInt16.insert("engine->evaluate(\"{}\")", 0);
- toUInt16.insert("engine->evaluate(\"Object.prototype\")", 0);
- toUInt16.insert("engine->evaluate(\"Date.prototype\")", 0);
- toUInt16.insert("engine->evaluate(\"Array.prototype\")", 0);
- toUInt16.insert("engine->evaluate(\"Function.prototype\")", 0);
- toUInt16.insert("engine->evaluate(\"Error.prototype\")", 0);
- toUInt16.insert("engine->evaluate(\"Object\")", 0);
- toUInt16.insert("engine->evaluate(\"Array\")", 0);
- toUInt16.insert("engine->evaluate(\"Number\")", 0);
- toUInt16.insert("engine->evaluate(\"Function\")", 0);
- toUInt16.insert("engine->evaluate(\"(function() { return 1; })\")", 0);
- toUInt16.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0);
- toUInt16.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0);
- toUInt16.insert("engine->evaluate(\"/foo/\")", 0);
- toUInt16.insert("engine->evaluate(\"new Object()\")", 0);
- toUInt16.insert("engine->evaluate(\"new Array()\")", 0);
- toUInt16.insert("engine->evaluate(\"new Error()\")", 0);
- toUInt16.insert("engine->nullValue()", 0);
- toUInt16.insert("engine->undefinedValue()", 0);
- }
- newRow(expr) << toUInt16.value(expr);
-}
-
-void tst_QScriptValue::toUInt16_test(const char*, const QScriptValue& value)
-{
- QFETCH(quint16, expected);
- QCOMPARE(value.toUInt16(), expected);
-}
-
-DEFINE_TEST_FUNCTION(toUInt16)
-
-
-void tst_QScriptValue::equals_initData()
-{
- QTest::addColumn<QScriptValue>("other");
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::equals_makeData(const char *expr)
-{
- static QSet<QString> equals;
- if (equals.isEmpty()) {
- equals.insert("QScriptValue() <=> QScriptValue()");
- equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")");
- equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->nullValue()");
- equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->undefinedValue()");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"{}\")");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->nullValue()");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->undefinedValue()");
- equals.insert("QScriptValue(true) <=> QScriptValue(true)");
- equals.insert("QScriptValue(true) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(true) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(false) <=> QScriptValue(false)");
- equals.insert("QScriptValue(false) <=> QScriptValue(0)");
- equals.insert("QScriptValue(false) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(false) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(false) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(false) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(false) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0) <=> QScriptValue(false)");
- equals.insert("QScriptValue(0) <=> QScriptValue(0)");
- equals.insert("QScriptValue(0) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(0) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(0) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(0) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(0) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(false)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(-6.37e-8)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, -6.37e-8)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, -6.37e-8)");
- equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(qInf()) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(qInf()) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(qInf()) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(qInf()) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(qInf()) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(qInf()) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(-qInf())");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(\"-Infinity\")");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, -qInf())");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, \"-Infinity\")");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, -qInf())");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, \"-Infinity\")");
- equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(-qInf())");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"-Infinity\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, -qInf())");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"-Infinity\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, -qInf())");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")");
- equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(false)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(false)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(false)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")");
- equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->nullValue()");
- equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->undefinedValue()");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"{}\")");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->nullValue()");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->undefinedValue()");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(true)");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(false)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(false)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(false)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(-6.37e-8)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, -6.37e-8)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)");
- equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(-qInf())");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(\"-Infinity\")");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, -qInf())");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, \"-Infinity\")");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, -qInf())");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, \"-Infinity\")");
- equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(-qInf())");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"-Infinity\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, -qInf())");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, -qInf())");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")");
- equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(false)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(false)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(false)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")");
- equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->nullValue()");
- equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->undefinedValue()");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"{}\")");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->nullValue()");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->undefinedValue()");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(true)");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(false)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(false)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(false)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(-6.37e-8)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, -6.37e-8)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)");
- equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(-qInf())");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(\"-Infinity\")");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, -qInf())");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, \"-Infinity\")");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -qInf())");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, \"-Infinity\")");
- equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(-qInf())");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"-Infinity\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, -qInf())");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, -qInf())");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")");
- equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(false)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(false)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(false)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(false)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0.0)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString(\"\"))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString())");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, false)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0.0)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"\"))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString())");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, false)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0.0)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString())");
- equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"[]\")");
- equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::UndefinedValue)");
- equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::UndefinedValue)");
- equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
- equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"{}\")");
- equals.insert("engine->evaluate(\"{}\") <=> engine->nullValue()");
- equals.insert("engine->evaluate(\"{}\") <=> engine->undefinedValue()");
- equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Date.prototype\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(false)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0.0)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"\"))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString())");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, false)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0.0)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"\"))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString())");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, false)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0.0)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString())");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Array\")");
- equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Number\")");
- equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"/foo/\")");
- equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"new Object()\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(false)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0.0)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"\"))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString())");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, false)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0.0)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"\"))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString())");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, false)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0.0)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString())");
- equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")");
- equals.insert("engine->nullValue() <=> QScriptValue(QScriptValue::UndefinedValue)");
- equals.insert("engine->nullValue() <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("engine->nullValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)");
- equals.insert("engine->nullValue() <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("engine->nullValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
- equals.insert("engine->nullValue() <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("engine->nullValue() <=> engine->evaluate(\"{}\")");
- equals.insert("engine->nullValue() <=> engine->nullValue()");
- equals.insert("engine->nullValue() <=> engine->undefinedValue()");
- equals.insert("engine->undefinedValue() <=> QScriptValue(QScriptValue::UndefinedValue)");
- equals.insert("engine->undefinedValue() <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("engine->undefinedValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)");
- equals.insert("engine->undefinedValue() <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
- equals.insert("engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("engine->undefinedValue() <=> engine->evaluate(\"{}\")");
- equals.insert("engine->undefinedValue() <=> engine->nullValue()");
- equals.insert("engine->undefinedValue() <=> engine->undefinedValue()");
- }
- QHash<QString, QScriptValue>::const_iterator it;
- for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {
- QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key());
- newRow(tag.toLatin1()) << it.value() << equals.contains(tag);
- }
-}
-
-void tst_QScriptValue::equals_test(const char *, const QScriptValue& value)
-{
- QFETCH(QScriptValue, other);
- QFETCH(bool, expected);
- QCOMPARE(value.equals(other), expected);
-}
-
-DEFINE_TEST_FUNCTION(equals)
-
-
-void tst_QScriptValue::strictlyEquals_initData()
-{
- QTest::addColumn<QScriptValue>("other");
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::strictlyEquals_makeData(const char *expr)
-{
- static QSet<QString> equals;
- if (equals.isEmpty()) {
- equals.insert("QScriptValue() <=> QScriptValue()");
- equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")");
- equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->undefinedValue()");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->nullValue()");
- equals.insert("QScriptValue(true) <=> QScriptValue(true)");
- equals.insert("QScriptValue(true) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(true) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(false) <=> QScriptValue(false)");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0) <=> QScriptValue(0)");
- equals.insert("QScriptValue(0) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(-6.37e-8)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, -6.37e-8)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, -6.37e-8)");
- equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(qInf()) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(qInf()) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(qInf()) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(-qInf())");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, -qInf())");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, -qInf())");
- equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"-Infinity\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"-Infinity\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")");
- equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")");
- equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->undefinedValue()");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->nullValue()");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(true)");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(false)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(-6.37e-8)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, -6.37e-8)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)");
- equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(-qInf())");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, -qInf())");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, -qInf())");
- equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"-Infinity\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")");
- equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
- equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")");
- equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->undefinedValue()");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->nullValue()");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(true)");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(false)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(-6.37e-8)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, -6.37e-8)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)");
- equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(-qInf())");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, -qInf())");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -qInf())");
- equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"-Infinity\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")");
- equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"[]\")");
- equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::UndefinedValue)");
- equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::UndefinedValue)");
- equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
- equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"{}\")");
- equals.insert("engine->evaluate(\"{}\") <=> engine->undefinedValue()");
- equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Date.prototype\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Array\")");
- equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Number\")");
- equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"/foo/\")");
- equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"new Object()\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")");
- equals.insert("engine->nullValue() <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("engine->nullValue() <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("engine->nullValue() <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("engine->nullValue() <=> engine->nullValue()");
- equals.insert("engine->undefinedValue() <=> QScriptValue(QScriptValue::UndefinedValue)");
- equals.insert("engine->undefinedValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)");
- equals.insert("engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
- equals.insert("engine->undefinedValue() <=> engine->evaluate(\"{}\")");
- equals.insert("engine->undefinedValue() <=> engine->undefinedValue()");
- }
- QHash<QString, QScriptValue>::const_iterator it;
- for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {
- QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key());
- newRow(tag.toLatin1()) << it.value() << equals.contains(tag);
- }
-}
-
-void tst_QScriptValue::strictlyEquals_test(const char *, const QScriptValue& value)
-{
- QFETCH(QScriptValue, other);
- QFETCH(bool, expected);
- QCOMPARE(value.strictlyEquals(other), expected);
-}
-
-DEFINE_TEST_FUNCTION(strictlyEquals)
-
-
-void tst_QScriptValue::lessThan_initData()
-{
- QTest::addColumn<QScriptValue>("other");
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::lessThan_makeData(const char *expr)
-{
- static QSet<QString> equals;
- if (equals.isEmpty()) {
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(true)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(true) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(true) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(true) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(true) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(true) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(true) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(true) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(true) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(true) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(true) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(true) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(true) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(true) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(true) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(true) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(true) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(true) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(true) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(true) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(true) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(true) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(true) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(true) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(true) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(true) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(true) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(true) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(true) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(true) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(true) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(false) <=> QScriptValue(true)");
- equals.insert("QScriptValue(false) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(false) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(false) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(false) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(false) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(false) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(false) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(false) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(false) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0) <=> QScriptValue(true)");
- equals.insert("QScriptValue(0) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(0) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(0) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(true)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(true)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(true)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(false)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(-6.37e-8) <=> engine->nullValue()");
- equals.insert("QScriptValue(0x43211234) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0x43211234) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0x10000) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0x10000) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0x10001) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0x10001) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(true)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(false)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(-6.37e-8)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, -6.37e-8)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, -6.37e-8)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(-qInf()) <=> engine->nullValue()");
- equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(true)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(false)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(-6.37e-8)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, -6.37e-8)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, -6.37e-8)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"/foo/\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Error()\")");
- equals.insert("QScriptValue(\"-Infinity\") <=> engine->nullValue()");
- equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(true)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"-Infinity\")");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"-Infinity\")");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"/foo/\")");
- equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Error()\")");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(true)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(\"-Infinity\")");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"-Infinity\")");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"-Infinity\")");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"/foo/\")");
- equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"new Error()\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(true)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Error()\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"new Error()\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"new Error()\")");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(true)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(true)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(true)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(true)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(true)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(true)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(false)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(0, -6.37e-8) <=> engine->nullValue()");
- equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(true)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(false)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(-6.37e-8)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, -6.37e-8)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, -6.37e-8)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(0, -qInf()) <=> engine->nullValue()");
- equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(true)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(false)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(-6.37e-8)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, -6.37e-8)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, -6.37e-8)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"/foo/\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Error()\")");
- equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->nullValue()");
- equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(true)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"-Infinity\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"-Infinity\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"/foo/\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Error()\")");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(true)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"-Infinity\")");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"-Infinity\")");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"-Infinity\")");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"/foo/\")");
- equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"new Error()\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(true)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Error()\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"new Error()\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"new Error()\")");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(true)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(true)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(true)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(true)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(true)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(true)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(false)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->nullValue()");
- equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(true)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(false)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(-6.37e-8)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"\"))");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString())");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, -6.37e-8)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"\"))");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString())");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -6.37e-8)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"\"))");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString())");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"[]\")");
- equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"Array.prototype\")");
- equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"new Array()\")");
- equals.insert("QScriptValue(engine, -qInf()) <=> engine->nullValue()");
- equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(true)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(false)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0.0)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(-6.37e-8)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, false)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0.0)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, -6.37e-8)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, false)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0.0)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, -6.37e-8)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"/foo/\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Error()\")");
- equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->nullValue()");
- equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(true)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"-Infinity\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"-Infinity\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"/foo/\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Error()\")");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(true)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"-Infinity\")");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"0\"))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"-Infinity\")");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"-Infinity\")");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"/foo/\")");
- equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"new Error()\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(true)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(6.37e-8)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, true)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 6.37e-8)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, true)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Error()\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"new Error()\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(int(122))");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(uint(124))");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(123.0)");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x43211234)");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x10000)");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x10001)");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(qInf())");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"NaN\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"Infinity\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"ciao\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString(\"123\"))");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, int(122))");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, uint(124))");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 123.0)");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x43211234)");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x10000)");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x10001)");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, qInf())");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"NaN\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"Infinity\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"ciao\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, int(122))");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, uint(124))");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 123.0)");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x43211234)");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x10000)");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x10001)");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, qInf())");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"NaN\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"ciao\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Object\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Array\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Number\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Function\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"new Object()\")");
- equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"new Error()\")");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(true)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(int(122))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(uint(124))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(123.0)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(6.37e-8)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0x43211234)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0x10000)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0x10001)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(qInf())");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(\"NaN\")");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(\"Infinity\")");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(\"-Infinity\")");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(\"ciao\")");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString(\"0\"))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString(\"123\"))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, true)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, int(122))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, uint(124))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 123.0)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 6.37e-8)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0x43211234)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0x10000)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0x10001)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, qInf())");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, \"NaN\")");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, \"Infinity\")");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, \"-Infinity\")");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, true)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, int(122))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, uint(124))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 123.0)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0x43211234)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0x10000)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0x10001)");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, qInf())");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, \"NaN\")");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, \"-Infinity\")");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Array\")");
- equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Number\")");
- equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"/foo/\")");
- equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"new Object()\")");
- equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"new Error()\")");
- equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(\"ciao\")");
- equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Array\")");
- equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Number\")");
- equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(true)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(int(122))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(uint(124))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(123.0)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(6.37e-8)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x43211234)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x10000)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x10001)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(qInf())");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"NaN\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"Infinity\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"-Infinity\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"ciao\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"0\"))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"123\"))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, true)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, int(122))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, uint(124))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 123.0)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 6.37e-8)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x43211234)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x10000)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x10001)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, qInf())");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"NaN\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"Infinity\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"-Infinity\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, true)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, int(122))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, uint(124))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 123.0)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x43211234)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x10000)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x10001)");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, qInf())");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"NaN\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"-Infinity\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Number\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"/foo/\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new Object()\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new Error()\")");
- equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Array\")");
- equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Number\")");
- equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"NaN\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"Infinity\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"ciao\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"NaN\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"Infinity\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"NaN\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Array\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Number\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"new Object()\")");
- equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Number\")");
- equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Number\")");
- equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Array\")");
- equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Number\")");
- equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Array\")");
- equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Number\")");
- equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Array\")");
- equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Number\")");
- equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(\"NaN\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(\"Infinity\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(\"ciao\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"0\"))");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"123\"))");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"NaN\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"Infinity\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"NaN\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Array\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Number\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"new Object()\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"new Error()\")");
- equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(\"ciao\")");
- equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Array\")");
- equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Number\")");
- equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(true)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(int(122))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(uint(124))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(123.0)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(6.37e-8)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0x43211234)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0x10000)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0x10001)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(qInf())");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"NaN\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"Infinity\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"-Infinity\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"ciao\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"0\"))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"123\"))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, true)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, int(122))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, uint(124))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 123.0)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 6.37e-8)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x43211234)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x10000)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x10001)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, qInf())");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"NaN\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"Infinity\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"-Infinity\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"0\"))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, true)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, int(122))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, uint(124))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 123.0)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x43211234)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x10000)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x10001)");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, qInf())");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"NaN\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"-Infinity\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"0\"))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"1.23\"))");
- equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Error.prototype\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Array\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Number\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"/foo/\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Object()\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Error()\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(\"NaN\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(\"Infinity\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(\"ciao\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"NaN\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"Infinity\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"ciao\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"NaN\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"ciao\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
- equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object.prototype\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Function.prototype\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Array\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Number\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { return 1; })\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Object()\")");
- equals.insert("engine->nullValue() <=> QScriptValue(true)");
- equals.insert("engine->nullValue() <=> QScriptValue(int(122))");
- equals.insert("engine->nullValue() <=> QScriptValue(uint(124))");
- equals.insert("engine->nullValue() <=> QScriptValue(123.0)");
- equals.insert("engine->nullValue() <=> QScriptValue(6.37e-8)");
- equals.insert("engine->nullValue() <=> QScriptValue(0x43211234)");
- equals.insert("engine->nullValue() <=> QScriptValue(0x10000)");
- equals.insert("engine->nullValue() <=> QScriptValue(0x10001)");
- equals.insert("engine->nullValue() <=> QScriptValue(qInf())");
- equals.insert("engine->nullValue() <=> QScriptValue(\"Infinity\")");
- equals.insert("engine->nullValue() <=> QScriptValue(QString(\"123\"))");
- equals.insert("engine->nullValue() <=> QScriptValue(QString(\"12.4\"))");
- equals.insert("engine->nullValue() <=> QScriptValue(0, true)");
- equals.insert("engine->nullValue() <=> QScriptValue(0, int(122))");
- equals.insert("engine->nullValue() <=> QScriptValue(0, uint(124))");
- equals.insert("engine->nullValue() <=> QScriptValue(0, 123.0)");
- equals.insert("engine->nullValue() <=> QScriptValue(0, 6.37e-8)");
- equals.insert("engine->nullValue() <=> QScriptValue(0, 0x43211234)");
- equals.insert("engine->nullValue() <=> QScriptValue(0, 0x10000)");
- equals.insert("engine->nullValue() <=> QScriptValue(0, 0x10001)");
- equals.insert("engine->nullValue() <=> QScriptValue(0, qInf())");
- equals.insert("engine->nullValue() <=> QScriptValue(0, \"Infinity\")");
- equals.insert("engine->nullValue() <=> QScriptValue(0, QString(\"123\"))");
- equals.insert("engine->nullValue() <=> QScriptValue(0, QString(\"12.3\"))");
- equals.insert("engine->nullValue() <=> QScriptValue(engine, true)");
- equals.insert("engine->nullValue() <=> QScriptValue(engine, int(122))");
- equals.insert("engine->nullValue() <=> QScriptValue(engine, uint(124))");
- equals.insert("engine->nullValue() <=> QScriptValue(engine, 123.0)");
- equals.insert("engine->nullValue() <=> QScriptValue(engine, 6.37e-8)");
- equals.insert("engine->nullValue() <=> QScriptValue(engine, 0x43211234)");
- equals.insert("engine->nullValue() <=> QScriptValue(engine, 0x10000)");
- equals.insert("engine->nullValue() <=> QScriptValue(engine, 0x10001)");
- equals.insert("engine->nullValue() <=> QScriptValue(engine, qInf())");
- equals.insert("engine->nullValue() <=> QScriptValue(engine, \"Infinity\")");
- equals.insert("engine->nullValue() <=> QScriptValue(engine, QString(\"123\"))");
- equals.insert("engine->nullValue() <=> QScriptValue(engine, QString(\"1.23\"))");
- }
- QHash<QString, QScriptValue>::const_iterator it;
- for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {
- QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key());
- newRow(tag.toLatin1()) << it.value() << equals.contains(tag);
- }
-}
-
-void tst_QScriptValue::lessThan_test(const char *, const QScriptValue& value)
-{
- QFETCH(QScriptValue, other);
- QFETCH(bool, expected);
- QCOMPARE(value.lessThan(other), expected);
-}
-
-DEFINE_TEST_FUNCTION(lessThan)
-
-
-void tst_QScriptValue::instanceOf_initData()
-{
- QTest::addColumn<QScriptValue>("other");
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::instanceOf_makeData(const char *expr)
-{
- static QSet<QString> equals;
- if (equals.isEmpty()) {
- equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Array\")");
- equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Function\")");
- equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object\")");
- equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Array\")");
- equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object\")");
- }
- QHash<QString, QScriptValue>::const_iterator it;
- for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {
- QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key());
- newRow(tag.toLatin1()) << it.value() << equals.contains(tag);
- }
-}
-
-void tst_QScriptValue::instanceOf_test(const char *, const QScriptValue& value)
-{
- QFETCH(QScriptValue, other);
- QFETCH(bool, expected);
- QCOMPARE(value.instanceOf(other), expected);
-}
-
-DEFINE_TEST_FUNCTION(instanceOf)
-
-
-void tst_QScriptValue::qscriptvalue_castQString_initData()
-{
- QTest::addColumn<QString>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::qscriptvalue_castQString_makeData(const char* expr)
-{
- static QHash<QString, QString> value;
- if (value.isEmpty()) {
- value.insert("QScriptValue()", "");
- value.insert("QScriptValue(QScriptValue::UndefinedValue)", "");
- value.insert("QScriptValue(QScriptValue::NullValue)", "");
- value.insert("QScriptValue(true)", "true");
- value.insert("QScriptValue(false)", "false");
- value.insert("QScriptValue(int(122))", "122");
- value.insert("QScriptValue(uint(124))", "124");
- value.insert("QScriptValue(0)", "0");
- value.insert("QScriptValue(0.0)", "0");
- value.insert("QScriptValue(123.0)", "123");
- value.insert("QScriptValue(6.37e-8)", "6.37e-8");
- value.insert("QScriptValue(-6.37e-8)", "-6.37e-8");
- value.insert("QScriptValue(0x43211234)", "1126240820");
- value.insert("QScriptValue(0x10000)", "65536");
- value.insert("QScriptValue(0x10001)", "65537");
- value.insert("QScriptValue(qSNaN())", "NaN");
- value.insert("QScriptValue(qQNaN())", "NaN");
- value.insert("QScriptValue(qInf())", "Infinity");
- value.insert("QScriptValue(-qInf())", "-Infinity");
- value.insert("QScriptValue(\"NaN\")", "NaN");
- value.insert("QScriptValue(\"Infinity\")", "Infinity");
- value.insert("QScriptValue(\"-Infinity\")", "-Infinity");
- value.insert("QScriptValue(\"ciao\")", "ciao");
- value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", "ciao");
- value.insert("QScriptValue(QString(\"\"))", "");
- value.insert("QScriptValue(QString())", "");
- value.insert("QScriptValue(QString(\"0\"))", "0");
- value.insert("QScriptValue(QString(\"123\"))", "123");
- value.insert("QScriptValue(QString(\"12.4\"))", "12.4");
- value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", "");
- value.insert("QScriptValue(0, QScriptValue::NullValue)", "");
- value.insert("QScriptValue(0, true)", "true");
- value.insert("QScriptValue(0, false)", "false");
- value.insert("QScriptValue(0, int(122))", "122");
- value.insert("QScriptValue(0, uint(124))", "124");
- value.insert("QScriptValue(0, 0)", "0");
- value.insert("QScriptValue(0, 0.0)", "0");
- value.insert("QScriptValue(0, 123.0)", "123");
- value.insert("QScriptValue(0, 6.37e-8)", "6.37e-8");
- value.insert("QScriptValue(0, -6.37e-8)", "-6.37e-8");
- value.insert("QScriptValue(0, 0x43211234)", "1126240820");
- value.insert("QScriptValue(0, 0x10000)", "65536");
- value.insert("QScriptValue(0, 0x10001)", "65537");
- value.insert("QScriptValue(0, qSNaN())", "NaN");
- value.insert("QScriptValue(0, qQNaN())", "NaN");
- value.insert("QScriptValue(0, qInf())", "Infinity");
- value.insert("QScriptValue(0, -qInf())", "-Infinity");
- value.insert("QScriptValue(0, \"NaN\")", "NaN");
- value.insert("QScriptValue(0, \"Infinity\")", "Infinity");
- value.insert("QScriptValue(0, \"-Infinity\")", "-Infinity");
- value.insert("QScriptValue(0, \"ciao\")", "ciao");
- value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", "ciao");
- value.insert("QScriptValue(0, QString(\"\"))", "");
- value.insert("QScriptValue(0, QString())", "");
- value.insert("QScriptValue(0, QString(\"0\"))", "0");
- value.insert("QScriptValue(0, QString(\"123\"))", "123");
- value.insert("QScriptValue(0, QString(\"12.3\"))", "12.3");
- value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", "");
- value.insert("QScriptValue(engine, QScriptValue::NullValue)", "");
- value.insert("QScriptValue(engine, true)", "true");
- value.insert("QScriptValue(engine, false)", "false");
- value.insert("QScriptValue(engine, int(122))", "122");
- value.insert("QScriptValue(engine, uint(124))", "124");
- value.insert("QScriptValue(engine, 0)", "0");
- value.insert("QScriptValue(engine, 0.0)", "0");
- value.insert("QScriptValue(engine, 123.0)", "123");
- value.insert("QScriptValue(engine, 6.37e-8)", "6.37e-8");
- value.insert("QScriptValue(engine, -6.37e-8)", "-6.37e-8");
- value.insert("QScriptValue(engine, 0x43211234)", "1126240820");
- value.insert("QScriptValue(engine, 0x10000)", "65536");
- value.insert("QScriptValue(engine, 0x10001)", "65537");
- value.insert("QScriptValue(engine, qSNaN())", "NaN");
- value.insert("QScriptValue(engine, qQNaN())", "NaN");
- value.insert("QScriptValue(engine, qInf())", "Infinity");
- value.insert("QScriptValue(engine, -qInf())", "-Infinity");
- value.insert("QScriptValue(engine, \"NaN\")", "NaN");
- value.insert("QScriptValue(engine, \"Infinity\")", "Infinity");
- value.insert("QScriptValue(engine, \"-Infinity\")", "-Infinity");
- value.insert("QScriptValue(engine, \"ciao\")", "ciao");
- value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", "ciao");
- value.insert("QScriptValue(engine, QString(\"\"))", "");
- value.insert("QScriptValue(engine, QString())", "");
- value.insert("QScriptValue(engine, QString(\"0\"))", "0");
- value.insert("QScriptValue(engine, QString(\"123\"))", "123");
- value.insert("QScriptValue(engine, QString(\"1.23\"))", "1.23");
- value.insert("engine->evaluate(\"[]\")", "");
- value.insert("engine->evaluate(\"{}\")", "");
- value.insert("engine->evaluate(\"Object.prototype\")", "[object Object]");
- value.insert("engine->evaluate(\"Date.prototype\")", "Invalid Date");
- value.insert("engine->evaluate(\"Array.prototype\")", "");
- value.insert("engine->evaluate(\"Function.prototype\")", "function () {\n [native code]\n}");
- value.insert("engine->evaluate(\"Error.prototype\")", "Error: Unknown error");
- value.insert("engine->evaluate(\"Object\")", "function Object() {\n [native code]\n}");
- value.insert("engine->evaluate(\"Array\")", "function Array() {\n [native code]\n}");
- value.insert("engine->evaluate(\"Number\")", "function Number() {\n [native code]\n}");
- value.insert("engine->evaluate(\"Function\")", "function Function() {\n [native code]\n}");
- value.insert("engine->evaluate(\"(function() { return 1; })\")", "function () { return 1; }");
- value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", "function () { return 'ciao'; }");
- value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", "function () { throw new Error('foo'); }");
- value.insert("engine->evaluate(\"/foo/\")", "/foo/");
- value.insert("engine->evaluate(\"new Object()\")", "[object Object]");
- value.insert("engine->evaluate(\"new Array()\")", "");
- value.insert("engine->evaluate(\"new Error()\")", "Error: Unknown error");
- value.insert("engine->nullValue()", "");
- value.insert("engine->undefinedValue()", "");
- }
- newRow(expr) << value.value(expr);
-}
-
-void tst_QScriptValue::qscriptvalue_castQString_test(const char*, const QScriptValue& value)
-{
- QFETCH(QString, expected);
- QCOMPARE(qscriptvalue_cast<QString>(value), expected);
-}
-
-DEFINE_TEST_FUNCTION(qscriptvalue_castQString)
-
-
-void tst_QScriptValue::qscriptvalue_castqsreal_initData()
-{
- QTest::addColumn<qsreal>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::qscriptvalue_castqsreal_makeData(const char* expr)
-{
- static QHash<QString, qsreal> value;
- if (value.isEmpty()) {
- value.insert("QScriptValue()", 0);
- value.insert("QScriptValue(QScriptValue::UndefinedValue)", qQNaN());
- value.insert("QScriptValue(QScriptValue::NullValue)", 0);
- value.insert("QScriptValue(true)", 1);
- value.insert("QScriptValue(false)", 0);
- value.insert("QScriptValue(int(122))", 122);
- value.insert("QScriptValue(uint(124))", 124);
- value.insert("QScriptValue(0)", 0);
- value.insert("QScriptValue(0.0)", 0);
- value.insert("QScriptValue(123.0)", 123);
- value.insert("QScriptValue(6.37e-8)", 6.369999999999999e-08);
- value.insert("QScriptValue(-6.37e-8)", -6.369999999999999e-08);
- value.insert("QScriptValue(0x43211234)", 1126240820);
- value.insert("QScriptValue(0x10000)", 65536);
- value.insert("QScriptValue(0x10001)", 65537);
- value.insert("QScriptValue(qSNaN())", qQNaN());
- value.insert("QScriptValue(qQNaN())", qQNaN());
- value.insert("QScriptValue(qInf())", qInf());
- value.insert("QScriptValue(-qInf())", qInf());
- value.insert("QScriptValue(\"NaN\")", qQNaN());
- value.insert("QScriptValue(\"Infinity\")", qInf());
- value.insert("QScriptValue(\"-Infinity\")", qInf());
- value.insert("QScriptValue(\"ciao\")", qQNaN());
- value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", qQNaN());
- value.insert("QScriptValue(QString(\"\"))", 0);
- value.insert("QScriptValue(QString())", 0);
- value.insert("QScriptValue(QString(\"0\"))", 0);
- value.insert("QScriptValue(QString(\"123\"))", 123);
- value.insert("QScriptValue(QString(\"12.4\"))", 12.4);
- value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", qQNaN());
- value.insert("QScriptValue(0, QScriptValue::NullValue)", 0);
- value.insert("QScriptValue(0, true)", 1);
- value.insert("QScriptValue(0, false)", 0);
- value.insert("QScriptValue(0, int(122))", 122);
- value.insert("QScriptValue(0, uint(124))", 124);
- value.insert("QScriptValue(0, 0)", 0);
- value.insert("QScriptValue(0, 0.0)", 0);
- value.insert("QScriptValue(0, 123.0)", 123);
- value.insert("QScriptValue(0, 6.37e-8)", 6.369999999999999e-08);
- value.insert("QScriptValue(0, -6.37e-8)", -6.369999999999999e-08);
- value.insert("QScriptValue(0, 0x43211234)", 1126240820);
- value.insert("QScriptValue(0, 0x10000)", 65536);
- value.insert("QScriptValue(0, 0x10001)", 65537);
- value.insert("QScriptValue(0, qSNaN())", qQNaN());
- value.insert("QScriptValue(0, qQNaN())", qQNaN());
- value.insert("QScriptValue(0, qInf())", qInf());
- value.insert("QScriptValue(0, -qInf())", qInf());
- value.insert("QScriptValue(0, \"NaN\")", qQNaN());
- value.insert("QScriptValue(0, \"Infinity\")", qInf());
- value.insert("QScriptValue(0, \"-Infinity\")", qInf());
- value.insert("QScriptValue(0, \"ciao\")", qQNaN());
- value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", qQNaN());
- value.insert("QScriptValue(0, QString(\"\"))", 0);
- value.insert("QScriptValue(0, QString())", 0);
- value.insert("QScriptValue(0, QString(\"0\"))", 0);
- value.insert("QScriptValue(0, QString(\"123\"))", 123);
- value.insert("QScriptValue(0, QString(\"12.3\"))", 12.3);
- value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", qQNaN());
- value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0);
- value.insert("QScriptValue(engine, true)", 1);
- value.insert("QScriptValue(engine, false)", 0);
- value.insert("QScriptValue(engine, int(122))", 122);
- value.insert("QScriptValue(engine, uint(124))", 124);
- value.insert("QScriptValue(engine, 0)", 0);
- value.insert("QScriptValue(engine, 0.0)", 0);
- value.insert("QScriptValue(engine, 123.0)", 123);
- value.insert("QScriptValue(engine, 6.37e-8)", 6.369999999999999e-08);
- value.insert("QScriptValue(engine, -6.37e-8)", -6.369999999999999e-08);
- value.insert("QScriptValue(engine, 0x43211234)", 1126240820);
- value.insert("QScriptValue(engine, 0x10000)", 65536);
- value.insert("QScriptValue(engine, 0x10001)", 65537);
- value.insert("QScriptValue(engine, qSNaN())", qQNaN());
- value.insert("QScriptValue(engine, qQNaN())", qQNaN());
- value.insert("QScriptValue(engine, qInf())", qInf());
- value.insert("QScriptValue(engine, -qInf())", qInf());
- value.insert("QScriptValue(engine, \"NaN\")", qQNaN());
- value.insert("QScriptValue(engine, \"Infinity\")", qInf());
- value.insert("QScriptValue(engine, \"-Infinity\")", qInf());
- value.insert("QScriptValue(engine, \"ciao\")", qQNaN());
- value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", qQNaN());
- value.insert("QScriptValue(engine, QString(\"\"))", 0);
- value.insert("QScriptValue(engine, QString())", 0);
- value.insert("QScriptValue(engine, QString(\"0\"))", 0);
- value.insert("QScriptValue(engine, QString(\"123\"))", 123);
- value.insert("QScriptValue(engine, QString(\"1.23\"))", 1.23);
- value.insert("engine->evaluate(\"[]\")", 0);
- value.insert("engine->evaluate(\"{}\")", qQNaN());
- value.insert("engine->evaluate(\"Object.prototype\")", qQNaN());
- value.insert("engine->evaluate(\"Date.prototype\")", qQNaN());
- value.insert("engine->evaluate(\"Array.prototype\")", 0);
- value.insert("engine->evaluate(\"Function.prototype\")", qQNaN());
- value.insert("engine->evaluate(\"Error.prototype\")", qQNaN());
- value.insert("engine->evaluate(\"Object\")", qQNaN());
- value.insert("engine->evaluate(\"Array\")", qQNaN());
- value.insert("engine->evaluate(\"Number\")", qQNaN());
- value.insert("engine->evaluate(\"Function\")", qQNaN());
- value.insert("engine->evaluate(\"(function() { return 1; })\")", qQNaN());
- value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", qQNaN());
- value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", qQNaN());
- value.insert("engine->evaluate(\"/foo/\")", qQNaN());
- value.insert("engine->evaluate(\"new Object()\")", qQNaN());
- value.insert("engine->evaluate(\"new Array()\")", 0);
- value.insert("engine->evaluate(\"new Error()\")", qQNaN());
- value.insert("engine->nullValue()", 0);
- value.insert("engine->undefinedValue()", qQNaN());
- }
- newRow(expr) << value.value(expr);
-}
-
-void tst_QScriptValue::qscriptvalue_castqsreal_test(const char*, const QScriptValue& value)
-{
- QFETCH(qsreal, expected);
- if (qIsNaN(expected)) {
- QVERIFY(qIsNaN(qscriptvalue_cast<qsreal>(value)));
- return;
- }
- if (qIsInf(expected)) {
- QVERIFY(qIsInf(qscriptvalue_cast<qsreal>(value)));
- return;
- }
- QCOMPARE(qscriptvalue_cast<qsreal>(value), expected);
-}
-
-DEFINE_TEST_FUNCTION(qscriptvalue_castqsreal)
-
-
-void tst_QScriptValue::qscriptvalue_castbool_initData()
-{
- QTest::addColumn<bool>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::qscriptvalue_castbool_makeData(const char* expr)
-{
- static QHash<QString, bool> value;
- if (value.isEmpty()) {
- value.insert("QScriptValue()", false);
- value.insert("QScriptValue(QScriptValue::UndefinedValue)", false);
- value.insert("QScriptValue(QScriptValue::NullValue)", false);
- value.insert("QScriptValue(true)", true);
- value.insert("QScriptValue(false)", false);
- value.insert("QScriptValue(int(122))", true);
- value.insert("QScriptValue(uint(124))", true);
- value.insert("QScriptValue(0)", false);
- value.insert("QScriptValue(0.0)", false);
- value.insert("QScriptValue(123.0)", true);
- value.insert("QScriptValue(6.37e-8)", true);
- value.insert("QScriptValue(-6.37e-8)", true);
- value.insert("QScriptValue(0x43211234)", true);
- value.insert("QScriptValue(0x10000)", true);
- value.insert("QScriptValue(0x10001)", true);
- value.insert("QScriptValue(qSNaN())", false);
- value.insert("QScriptValue(qQNaN())", false);
- value.insert("QScriptValue(qInf())", true);
- value.insert("QScriptValue(-qInf())", true);
- value.insert("QScriptValue(\"NaN\")", true);
- value.insert("QScriptValue(\"Infinity\")", true);
- value.insert("QScriptValue(\"-Infinity\")", true);
- value.insert("QScriptValue(\"ciao\")", true);
- value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", true);
- value.insert("QScriptValue(QString(\"\"))", false);
- value.insert("QScriptValue(QString())", false);
- value.insert("QScriptValue(QString(\"0\"))", true);
- value.insert("QScriptValue(QString(\"123\"))", true);
- value.insert("QScriptValue(QString(\"12.4\"))", true);
- value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", false);
- value.insert("QScriptValue(0, QScriptValue::NullValue)", false);
- value.insert("QScriptValue(0, true)", true);
- value.insert("QScriptValue(0, false)", false);
- value.insert("QScriptValue(0, int(122))", true);
- value.insert("QScriptValue(0, uint(124))", true);
- value.insert("QScriptValue(0, 0)", false);
- value.insert("QScriptValue(0, 0.0)", false);
- value.insert("QScriptValue(0, 123.0)", true);
- value.insert("QScriptValue(0, 6.37e-8)", true);
- value.insert("QScriptValue(0, -6.37e-8)", true);
- value.insert("QScriptValue(0, 0x43211234)", true);
- value.insert("QScriptValue(0, 0x10000)", true);
- value.insert("QScriptValue(0, 0x10001)", true);
- value.insert("QScriptValue(0, qSNaN())", false);
- value.insert("QScriptValue(0, qQNaN())", false);
- value.insert("QScriptValue(0, qInf())", true);
- value.insert("QScriptValue(0, -qInf())", true);
- value.insert("QScriptValue(0, \"NaN\")", true);
- value.insert("QScriptValue(0, \"Infinity\")", true);
- value.insert("QScriptValue(0, \"-Infinity\")", true);
- value.insert("QScriptValue(0, \"ciao\")", true);
- value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", true);
- value.insert("QScriptValue(0, QString(\"\"))", false);
- value.insert("QScriptValue(0, QString())", false);
- value.insert("QScriptValue(0, QString(\"0\"))", true);
- value.insert("QScriptValue(0, QString(\"123\"))", true);
- value.insert("QScriptValue(0, QString(\"12.3\"))", true);
- value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", false);
- value.insert("QScriptValue(engine, QScriptValue::NullValue)", false);
- value.insert("QScriptValue(engine, true)", true);
- value.insert("QScriptValue(engine, false)", false);
- value.insert("QScriptValue(engine, int(122))", true);
- value.insert("QScriptValue(engine, uint(124))", true);
- value.insert("QScriptValue(engine, 0)", false);
- value.insert("QScriptValue(engine, 0.0)", false);
- value.insert("QScriptValue(engine, 123.0)", true);
- value.insert("QScriptValue(engine, 6.37e-8)", true);
- value.insert("QScriptValue(engine, -6.37e-8)", true);
- value.insert("QScriptValue(engine, 0x43211234)", true);
- value.insert("QScriptValue(engine, 0x10000)", true);
- value.insert("QScriptValue(engine, 0x10001)", true);
- value.insert("QScriptValue(engine, qSNaN())", false);
- value.insert("QScriptValue(engine, qQNaN())", false);
- value.insert("QScriptValue(engine, qInf())", true);
- value.insert("QScriptValue(engine, -qInf())", true);
- value.insert("QScriptValue(engine, \"NaN\")", true);
- value.insert("QScriptValue(engine, \"Infinity\")", true);
- value.insert("QScriptValue(engine, \"-Infinity\")", true);
- value.insert("QScriptValue(engine, \"ciao\")", true);
- value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", true);
- value.insert("QScriptValue(engine, QString(\"\"))", false);
- value.insert("QScriptValue(engine, QString())", false);
- value.insert("QScriptValue(engine, QString(\"0\"))", true);
- value.insert("QScriptValue(engine, QString(\"123\"))", true);
- value.insert("QScriptValue(engine, QString(\"1.23\"))", true);
- value.insert("engine->evaluate(\"[]\")", true);
- value.insert("engine->evaluate(\"{}\")", false);
- value.insert("engine->evaluate(\"Object.prototype\")", true);
- value.insert("engine->evaluate(\"Date.prototype\")", true);
- value.insert("engine->evaluate(\"Array.prototype\")", true);
- value.insert("engine->evaluate(\"Function.prototype\")", true);
- value.insert("engine->evaluate(\"Error.prototype\")", true);
- value.insert("engine->evaluate(\"Object\")", true);
- value.insert("engine->evaluate(\"Array\")", true);
- value.insert("engine->evaluate(\"Number\")", true);
- value.insert("engine->evaluate(\"Function\")", true);
- value.insert("engine->evaluate(\"(function() { return 1; })\")", true);
- value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", true);
- value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", true);
- value.insert("engine->evaluate(\"/foo/\")", true);
- value.insert("engine->evaluate(\"new Object()\")", true);
- value.insert("engine->evaluate(\"new Array()\")", true);
- value.insert("engine->evaluate(\"new Error()\")", true);
- value.insert("engine->nullValue()", false);
- value.insert("engine->undefinedValue()", false);
- }
- newRow(expr) << value.value(expr);
-}
-
-void tst_QScriptValue::qscriptvalue_castbool_test(const char*, const QScriptValue& value)
-{
- QFETCH(bool, expected);
- QCOMPARE(qscriptvalue_cast<bool>(value), expected);
-}
-
-DEFINE_TEST_FUNCTION(qscriptvalue_castbool)
-
-
-void tst_QScriptValue::qscriptvalue_castqint32_initData()
-{
- QTest::addColumn<qint32>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::qscriptvalue_castqint32_makeData(const char* expr)
-{
- static QHash<QString, qint32> value;
- if (value.isEmpty()) {
- value.insert("QScriptValue()", 0);
- value.insert("QScriptValue(QScriptValue::UndefinedValue)", 0);
- value.insert("QScriptValue(QScriptValue::NullValue)", 0);
- value.insert("QScriptValue(true)", 1);
- value.insert("QScriptValue(false)", 0);
- value.insert("QScriptValue(int(122))", 122);
- value.insert("QScriptValue(uint(124))", 124);
- value.insert("QScriptValue(0)", 0);
- value.insert("QScriptValue(0.0)", 0);
- value.insert("QScriptValue(123.0)", 123);
- value.insert("QScriptValue(6.37e-8)", 0);
- value.insert("QScriptValue(-6.37e-8)", 0);
- value.insert("QScriptValue(0x43211234)", 1126240820);
- value.insert("QScriptValue(0x10000)", 65536);
- value.insert("QScriptValue(0x10001)", 65537);
- value.insert("QScriptValue(qSNaN())", 0);
- value.insert("QScriptValue(qQNaN())", 0);
- value.insert("QScriptValue(qInf())", 0);
- value.insert("QScriptValue(-qInf())", 0);
- value.insert("QScriptValue(\"NaN\")", 0);
- value.insert("QScriptValue(\"Infinity\")", 0);
- value.insert("QScriptValue(\"-Infinity\")", 0);
- value.insert("QScriptValue(\"ciao\")", 0);
- value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0);
- value.insert("QScriptValue(QString(\"\"))", 0);
- value.insert("QScriptValue(QString())", 0);
- value.insert("QScriptValue(QString(\"0\"))", 0);
- value.insert("QScriptValue(QString(\"123\"))", 123);
- value.insert("QScriptValue(QString(\"12.4\"))", 12);
- value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0);
- value.insert("QScriptValue(0, QScriptValue::NullValue)", 0);
- value.insert("QScriptValue(0, true)", 1);
- value.insert("QScriptValue(0, false)", 0);
- value.insert("QScriptValue(0, int(122))", 122);
- value.insert("QScriptValue(0, uint(124))", 124);
- value.insert("QScriptValue(0, 0)", 0);
- value.insert("QScriptValue(0, 0.0)", 0);
- value.insert("QScriptValue(0, 123.0)", 123);
- value.insert("QScriptValue(0, 6.37e-8)", 0);
- value.insert("QScriptValue(0, -6.37e-8)", 0);
- value.insert("QScriptValue(0, 0x43211234)", 1126240820);
- value.insert("QScriptValue(0, 0x10000)", 65536);
- value.insert("QScriptValue(0, 0x10001)", 65537);
- value.insert("QScriptValue(0, qSNaN())", 0);
- value.insert("QScriptValue(0, qQNaN())", 0);
- value.insert("QScriptValue(0, qInf())", 0);
- value.insert("QScriptValue(0, -qInf())", 0);
- value.insert("QScriptValue(0, \"NaN\")", 0);
- value.insert("QScriptValue(0, \"Infinity\")", 0);
- value.insert("QScriptValue(0, \"-Infinity\")", 0);
- value.insert("QScriptValue(0, \"ciao\")", 0);
- value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0);
- value.insert("QScriptValue(0, QString(\"\"))", 0);
- value.insert("QScriptValue(0, QString())", 0);
- value.insert("QScriptValue(0, QString(\"0\"))", 0);
- value.insert("QScriptValue(0, QString(\"123\"))", 123);
- value.insert("QScriptValue(0, QString(\"12.3\"))", 12);
- value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0);
- value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0);
- value.insert("QScriptValue(engine, true)", 1);
- value.insert("QScriptValue(engine, false)", 0);
- value.insert("QScriptValue(engine, int(122))", 122);
- value.insert("QScriptValue(engine, uint(124))", 124);
- value.insert("QScriptValue(engine, 0)", 0);
- value.insert("QScriptValue(engine, 0.0)", 0);
- value.insert("QScriptValue(engine, 123.0)", 123);
- value.insert("QScriptValue(engine, 6.37e-8)", 0);
- value.insert("QScriptValue(engine, -6.37e-8)", 0);
- value.insert("QScriptValue(engine, 0x43211234)", 1126240820);
- value.insert("QScriptValue(engine, 0x10000)", 65536);
- value.insert("QScriptValue(engine, 0x10001)", 65537);
- value.insert("QScriptValue(engine, qSNaN())", 0);
- value.insert("QScriptValue(engine, qQNaN())", 0);
- value.insert("QScriptValue(engine, qInf())", 0);
- value.insert("QScriptValue(engine, -qInf())", 0);
- value.insert("QScriptValue(engine, \"NaN\")", 0);
- value.insert("QScriptValue(engine, \"Infinity\")", 0);
- value.insert("QScriptValue(engine, \"-Infinity\")", 0);
- value.insert("QScriptValue(engine, \"ciao\")", 0);
- value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0);
- value.insert("QScriptValue(engine, QString(\"\"))", 0);
- value.insert("QScriptValue(engine, QString())", 0);
- value.insert("QScriptValue(engine, QString(\"0\"))", 0);
- value.insert("QScriptValue(engine, QString(\"123\"))", 123);
- value.insert("QScriptValue(engine, QString(\"1.23\"))", 1);
- value.insert("engine->evaluate(\"[]\")", 0);
- value.insert("engine->evaluate(\"{}\")", 0);
- value.insert("engine->evaluate(\"Object.prototype\")", 0);
- value.insert("engine->evaluate(\"Date.prototype\")", 0);
- value.insert("engine->evaluate(\"Array.prototype\")", 0);
- value.insert("engine->evaluate(\"Function.prototype\")", 0);
- value.insert("engine->evaluate(\"Error.prototype\")", 0);
- value.insert("engine->evaluate(\"Object\")", 0);
- value.insert("engine->evaluate(\"Array\")", 0);
- value.insert("engine->evaluate(\"Number\")", 0);
- value.insert("engine->evaluate(\"Function\")", 0);
- value.insert("engine->evaluate(\"(function() { return 1; })\")", 0);
- value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0);
- value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0);
- value.insert("engine->evaluate(\"/foo/\")", 0);
- value.insert("engine->evaluate(\"new Object()\")", 0);
- value.insert("engine->evaluate(\"new Array()\")", 0);
- value.insert("engine->evaluate(\"new Error()\")", 0);
- value.insert("engine->nullValue()", 0);
- value.insert("engine->undefinedValue()", 0);
- }
- newRow(expr) << value.value(expr);
-}
-
-void tst_QScriptValue::qscriptvalue_castqint32_test(const char*, const QScriptValue& value)
-{
- QFETCH(qint32, expected);
- QCOMPARE(qscriptvalue_cast<qint32>(value), expected);
-}
-
-DEFINE_TEST_FUNCTION(qscriptvalue_castqint32)
-
-
-void tst_QScriptValue::qscriptvalue_castquint32_initData()
-{
- QTest::addColumn<quint32>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::qscriptvalue_castquint32_makeData(const char* expr)
-{
- static QHash<QString, quint32> value;
- if (value.isEmpty()) {
- value.insert("QScriptValue()", 0);
- value.insert("QScriptValue(QScriptValue::UndefinedValue)", 0);
- value.insert("QScriptValue(QScriptValue::NullValue)", 0);
- value.insert("QScriptValue(true)", 1);
- value.insert("QScriptValue(false)", 0);
- value.insert("QScriptValue(int(122))", 122);
- value.insert("QScriptValue(uint(124))", 124);
- value.insert("QScriptValue(0)", 0);
- value.insert("QScriptValue(0.0)", 0);
- value.insert("QScriptValue(123.0)", 123);
- value.insert("QScriptValue(6.37e-8)", 0);
- value.insert("QScriptValue(-6.37e-8)", 0);
- value.insert("QScriptValue(0x43211234)", 1126240820);
- value.insert("QScriptValue(0x10000)", 65536);
- value.insert("QScriptValue(0x10001)", 65537);
- value.insert("QScriptValue(qSNaN())", 0);
- value.insert("QScriptValue(qQNaN())", 0);
- value.insert("QScriptValue(qInf())", 0);
- value.insert("QScriptValue(-qInf())", 0);
- value.insert("QScriptValue(\"NaN\")", 0);
- value.insert("QScriptValue(\"Infinity\")", 0);
- value.insert("QScriptValue(\"-Infinity\")", 0);
- value.insert("QScriptValue(\"ciao\")", 0);
- value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0);
- value.insert("QScriptValue(QString(\"\"))", 0);
- value.insert("QScriptValue(QString())", 0);
- value.insert("QScriptValue(QString(\"0\"))", 0);
- value.insert("QScriptValue(QString(\"123\"))", 123);
- value.insert("QScriptValue(QString(\"12.4\"))", 12);
- value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0);
- value.insert("QScriptValue(0, QScriptValue::NullValue)", 0);
- value.insert("QScriptValue(0, true)", 1);
- value.insert("QScriptValue(0, false)", 0);
- value.insert("QScriptValue(0, int(122))", 122);
- value.insert("QScriptValue(0, uint(124))", 124);
- value.insert("QScriptValue(0, 0)", 0);
- value.insert("QScriptValue(0, 0.0)", 0);
- value.insert("QScriptValue(0, 123.0)", 123);
- value.insert("QScriptValue(0, 6.37e-8)", 0);
- value.insert("QScriptValue(0, -6.37e-8)", 0);
- value.insert("QScriptValue(0, 0x43211234)", 1126240820);
- value.insert("QScriptValue(0, 0x10000)", 65536);
- value.insert("QScriptValue(0, 0x10001)", 65537);
- value.insert("QScriptValue(0, qSNaN())", 0);
- value.insert("QScriptValue(0, qQNaN())", 0);
- value.insert("QScriptValue(0, qInf())", 0);
- value.insert("QScriptValue(0, -qInf())", 0);
- value.insert("QScriptValue(0, \"NaN\")", 0);
- value.insert("QScriptValue(0, \"Infinity\")", 0);
- value.insert("QScriptValue(0, \"-Infinity\")", 0);
- value.insert("QScriptValue(0, \"ciao\")", 0);
- value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0);
- value.insert("QScriptValue(0, QString(\"\"))", 0);
- value.insert("QScriptValue(0, QString())", 0);
- value.insert("QScriptValue(0, QString(\"0\"))", 0);
- value.insert("QScriptValue(0, QString(\"123\"))", 123);
- value.insert("QScriptValue(0, QString(\"12.3\"))", 12);
- value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0);
- value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0);
- value.insert("QScriptValue(engine, true)", 1);
- value.insert("QScriptValue(engine, false)", 0);
- value.insert("QScriptValue(engine, int(122))", 122);
- value.insert("QScriptValue(engine, uint(124))", 124);
- value.insert("QScriptValue(engine, 0)", 0);
- value.insert("QScriptValue(engine, 0.0)", 0);
- value.insert("QScriptValue(engine, 123.0)", 123);
- value.insert("QScriptValue(engine, 6.37e-8)", 0);
- value.insert("QScriptValue(engine, -6.37e-8)", 0);
- value.insert("QScriptValue(engine, 0x43211234)", 1126240820);
- value.insert("QScriptValue(engine, 0x10000)", 65536);
- value.insert("QScriptValue(engine, 0x10001)", 65537);
- value.insert("QScriptValue(engine, qSNaN())", 0);
- value.insert("QScriptValue(engine, qQNaN())", 0);
- value.insert("QScriptValue(engine, qInf())", 0);
- value.insert("QScriptValue(engine, -qInf())", 0);
- value.insert("QScriptValue(engine, \"NaN\")", 0);
- value.insert("QScriptValue(engine, \"Infinity\")", 0);
- value.insert("QScriptValue(engine, \"-Infinity\")", 0);
- value.insert("QScriptValue(engine, \"ciao\")", 0);
- value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0);
- value.insert("QScriptValue(engine, QString(\"\"))", 0);
- value.insert("QScriptValue(engine, QString())", 0);
- value.insert("QScriptValue(engine, QString(\"0\"))", 0);
- value.insert("QScriptValue(engine, QString(\"123\"))", 123);
- value.insert("QScriptValue(engine, QString(\"1.23\"))", 1);
- value.insert("engine->evaluate(\"[]\")", 0);
- value.insert("engine->evaluate(\"{}\")", 0);
- value.insert("engine->evaluate(\"Object.prototype\")", 0);
- value.insert("engine->evaluate(\"Date.prototype\")", 0);
- value.insert("engine->evaluate(\"Array.prototype\")", 0);
- value.insert("engine->evaluate(\"Function.prototype\")", 0);
- value.insert("engine->evaluate(\"Error.prototype\")", 0);
- value.insert("engine->evaluate(\"Object\")", 0);
- value.insert("engine->evaluate(\"Array\")", 0);
- value.insert("engine->evaluate(\"Number\")", 0);
- value.insert("engine->evaluate(\"Function\")", 0);
- value.insert("engine->evaluate(\"(function() { return 1; })\")", 0);
- value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0);
- value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0);
- value.insert("engine->evaluate(\"/foo/\")", 0);
- value.insert("engine->evaluate(\"new Object()\")", 0);
- value.insert("engine->evaluate(\"new Array()\")", 0);
- value.insert("engine->evaluate(\"new Error()\")", 0);
- value.insert("engine->nullValue()", 0);
- value.insert("engine->undefinedValue()", 0);
- }
- newRow(expr) << value.value(expr);
-}
-
-void tst_QScriptValue::qscriptvalue_castquint32_test(const char*, const QScriptValue& value)
-{
- QFETCH(quint32, expected);
- QCOMPARE(qscriptvalue_cast<quint32>(value), expected);
-}
-
-DEFINE_TEST_FUNCTION(qscriptvalue_castquint32)
-
-
-void tst_QScriptValue::qscriptvalue_castquint16_initData()
-{
- QTest::addColumn<quint16>("expected");
- initScriptValues();
-}
-
-void tst_QScriptValue::qscriptvalue_castquint16_makeData(const char* expr)
-{
- static QHash<QString, quint16> value;
- if (value.isEmpty()) {
- value.insert("QScriptValue()", 0);
- value.insert("QScriptValue(QScriptValue::UndefinedValue)", 0);
- value.insert("QScriptValue(QScriptValue::NullValue)", 0);
- value.insert("QScriptValue(true)", 1);
- value.insert("QScriptValue(false)", 0);
- value.insert("QScriptValue(int(122))", 122);
- value.insert("QScriptValue(uint(124))", 124);
- value.insert("QScriptValue(0)", 0);
- value.insert("QScriptValue(0.0)", 0);
- value.insert("QScriptValue(123.0)", 123);
- value.insert("QScriptValue(6.37e-8)", 0);
- value.insert("QScriptValue(-6.37e-8)", 0);
- value.insert("QScriptValue(0x43211234)", 4660);
- value.insert("QScriptValue(0x10000)", 0);
- value.insert("QScriptValue(0x10001)", 1);
- value.insert("QScriptValue(qSNaN())", 0);
- value.insert("QScriptValue(qQNaN())", 0);
- value.insert("QScriptValue(qInf())", 0);
- value.insert("QScriptValue(-qInf())", 0);
- value.insert("QScriptValue(\"NaN\")", 0);
- value.insert("QScriptValue(\"Infinity\")", 0);
- value.insert("QScriptValue(\"-Infinity\")", 0);
- value.insert("QScriptValue(\"ciao\")", 0);
- value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0);
- value.insert("QScriptValue(QString(\"\"))", 0);
- value.insert("QScriptValue(QString())", 0);
- value.insert("QScriptValue(QString(\"0\"))", 0);
- value.insert("QScriptValue(QString(\"123\"))", 123);
- value.insert("QScriptValue(QString(\"12.4\"))", 12);
- value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0);
- value.insert("QScriptValue(0, QScriptValue::NullValue)", 0);
- value.insert("QScriptValue(0, true)", 1);
- value.insert("QScriptValue(0, false)", 0);
- value.insert("QScriptValue(0, int(122))", 122);
- value.insert("QScriptValue(0, uint(124))", 124);
- value.insert("QScriptValue(0, 0)", 0);
- value.insert("QScriptValue(0, 0.0)", 0);
- value.insert("QScriptValue(0, 123.0)", 123);
- value.insert("QScriptValue(0, 6.37e-8)", 0);
- value.insert("QScriptValue(0, -6.37e-8)", 0);
- value.insert("QScriptValue(0, 0x43211234)", 4660);
- value.insert("QScriptValue(0, 0x10000)", 0);
- value.insert("QScriptValue(0, 0x10001)", 1);
- value.insert("QScriptValue(0, qSNaN())", 0);
- value.insert("QScriptValue(0, qQNaN())", 0);
- value.insert("QScriptValue(0, qInf())", 0);
- value.insert("QScriptValue(0, -qInf())", 0);
- value.insert("QScriptValue(0, \"NaN\")", 0);
- value.insert("QScriptValue(0, \"Infinity\")", 0);
- value.insert("QScriptValue(0, \"-Infinity\")", 0);
- value.insert("QScriptValue(0, \"ciao\")", 0);
- value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0);
- value.insert("QScriptValue(0, QString(\"\"))", 0);
- value.insert("QScriptValue(0, QString())", 0);
- value.insert("QScriptValue(0, QString(\"0\"))", 0);
- value.insert("QScriptValue(0, QString(\"123\"))", 123);
- value.insert("QScriptValue(0, QString(\"12.3\"))", 12);
- value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0);
- value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0);
- value.insert("QScriptValue(engine, true)", 1);
- value.insert("QScriptValue(engine, false)", 0);
- value.insert("QScriptValue(engine, int(122))", 122);
- value.insert("QScriptValue(engine, uint(124))", 124);
- value.insert("QScriptValue(engine, 0)", 0);
- value.insert("QScriptValue(engine, 0.0)", 0);
- value.insert("QScriptValue(engine, 123.0)", 123);
- value.insert("QScriptValue(engine, 6.37e-8)", 0);
- value.insert("QScriptValue(engine, -6.37e-8)", 0);
- value.insert("QScriptValue(engine, 0x43211234)", 4660);
- value.insert("QScriptValue(engine, 0x10000)", 0);
- value.insert("QScriptValue(engine, 0x10001)", 1);
- value.insert("QScriptValue(engine, qSNaN())", 0);
- value.insert("QScriptValue(engine, qQNaN())", 0);
- value.insert("QScriptValue(engine, qInf())", 0);
- value.insert("QScriptValue(engine, -qInf())", 0);
- value.insert("QScriptValue(engine, \"NaN\")", 0);
- value.insert("QScriptValue(engine, \"Infinity\")", 0);
- value.insert("QScriptValue(engine, \"-Infinity\")", 0);
- value.insert("QScriptValue(engine, \"ciao\")", 0);
- value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0);
- value.insert("QScriptValue(engine, QString(\"\"))", 0);
- value.insert("QScriptValue(engine, QString())", 0);
- value.insert("QScriptValue(engine, QString(\"0\"))", 0);
- value.insert("QScriptValue(engine, QString(\"123\"))", 123);
- value.insert("QScriptValue(engine, QString(\"1.23\"))", 1);
- value.insert("engine->evaluate(\"[]\")", 0);
- value.insert("engine->evaluate(\"{}\")", 0);
- value.insert("engine->evaluate(\"Object.prototype\")", 0);
- value.insert("engine->evaluate(\"Date.prototype\")", 0);
- value.insert("engine->evaluate(\"Array.prototype\")", 0);
- value.insert("engine->evaluate(\"Function.prototype\")", 0);
- value.insert("engine->evaluate(\"Error.prototype\")", 0);
- value.insert("engine->evaluate(\"Object\")", 0);
- value.insert("engine->evaluate(\"Array\")", 0);
- value.insert("engine->evaluate(\"Number\")", 0);
- value.insert("engine->evaluate(\"Function\")", 0);
- value.insert("engine->evaluate(\"(function() { return 1; })\")", 0);
- value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0);
- value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0);
- value.insert("engine->evaluate(\"/foo/\")", 0);
- value.insert("engine->evaluate(\"new Object()\")", 0);
- value.insert("engine->evaluate(\"new Array()\")", 0);
- value.insert("engine->evaluate(\"new Error()\")", 0);
- value.insert("engine->nullValue()", 0);
- value.insert("engine->undefinedValue()", 0);
- }
- newRow(expr) << value.value(expr);
-}
-
-void tst_QScriptValue::qscriptvalue_castquint16_test(const char*, const QScriptValue& value)
-{
- QFETCH(quint16, expected);
- QCOMPARE(qscriptvalue_cast<quint16>(value), expected);
-}
-
-DEFINE_TEST_FUNCTION(qscriptvalue_castquint16)
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated_cast.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_cast.cpp
new file mode 100644
index 0000000000..e6518100bc
--- /dev/null
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_cast.cpp
@@ -0,0 +1,1453 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+*************** This file has been generated. DO NOT MODIFY! ****************
+****************************************************************************/
+
+#include "tst_qscriptvalue.h"
+
+
+
+void tst_QScriptValue::qscriptvalue_castQString_initData()
+{
+ QTest::addColumn<QString>("expected");
+ initScriptValues();
+}
+
+static QString qscriptvalue_castQString_tagArray [] = {
+ "QScriptValue()",
+ "QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(true)",
+ "QScriptValue(false)",
+ "QScriptValue(int(122))",
+ "QScriptValue(uint(124))",
+ "QScriptValue(0)",
+ "QScriptValue(0.0)",
+ "QScriptValue(123.0)",
+ "QScriptValue(6.37e-8)",
+ "QScriptValue(-6.37e-8)",
+ "QScriptValue(0x43211234)",
+ "QScriptValue(0x10000)",
+ "QScriptValue(0x10001)",
+ "QScriptValue(qSNaN())",
+ "QScriptValue(qQNaN())",
+ "QScriptValue(qInf())",
+ "QScriptValue(-qInf())",
+ "QScriptValue(\"NaN\")",
+ "QScriptValue(\"Infinity\")",
+ "QScriptValue(\"-Infinity\")",
+ "QScriptValue(\"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\"))",
+ "QScriptValue(QString())",
+ "QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, true)",
+ "QScriptValue(0, false)",
+ "QScriptValue(0, int(122))",
+ "QScriptValue(0, uint(124))",
+ "QScriptValue(0, 0)",
+ "QScriptValue(0, 0.0)",
+ "QScriptValue(0, 123.0)",
+ "QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0x10001)",
+ "QScriptValue(0, qSNaN())",
+ "QScriptValue(0, qQNaN())",
+ "QScriptValue(0, qInf())",
+ "QScriptValue(0, -qInf())",
+ "QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString())",
+ "QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, true)",
+ "QScriptValue(engine, false)",
+ "QScriptValue(engine, int(122))",
+ "QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, qSNaN())",
+ "QScriptValue(engine, qQNaN())",
+ "QScriptValue(engine, qInf())",
+ "QScriptValue(engine, -qInf())",
+ "QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"[]\")",
+ "engine->evaluate(\"{}\")",
+ "engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Date.prototype\")",
+ "engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\")",
+ "engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"null\")",
+ "engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\")",
+ "engine->evaluate(\"122\")",
+ "engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\")",
+ "engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"NaN\")",
+ "engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\")",
+ "engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\")",
+ "engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'12.4'\")",
+ "engine->nullValue()",
+ "engine->undefinedValue()",
+ "engine->newObject()",
+ "engine->newArray()",
+ "engine->newArray(10)",
+ "engine->newDate(QDateTime())",
+ "engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false))",
+ "engine->newQObject(0)",
+ "engine->newQObject(engine)",};
+static QString qscriptvalue_castQString_valueArray [] = {
+ "", "",
+ "", "true",
+ "false", "122",
+ "124", "0",
+ "0", "123",
+ "6.37e-8", "-6.37e-8",
+ "1126240820", "65536",
+ "65537", "NaN",
+ "NaN", "Infinity",
+ "-Infinity", "NaN",
+ "Infinity", "-Infinity",
+ "ciao", "ciao",
+ "", "",
+ "0", "123",
+ "12.4", "",
+ "", "true",
+ "false", "122",
+ "124", "0",
+ "0", "123",
+ "6.37e-8", "-6.37e-8",
+ "1126240820", "65536",
+ "65537", "NaN",
+ "NaN", "Infinity",
+ "-Infinity", "NaN",
+ "Infinity", "-Infinity",
+ "ciao", "ciao",
+ "", "",
+ "0", "123",
+ "12.3", "",
+ "", "true",
+ "false", "122",
+ "124", "0",
+ "0", "123",
+ "6.37e-8", "-6.37e-8",
+ "1126240820", "65536",
+ "65537", "NaN",
+ "NaN", "Infinity",
+ "-Infinity", "NaN",
+ "Infinity", "-Infinity",
+ "ciao", "ciao",
+ "", "",
+ "0", "123",
+ "1.23", "",
+ "", "[object Object]",
+ "Invalid Date", "",
+ "function () {\n [native code]\n}", "Error: Unknown error",
+ "function Object() {\n [native code]\n}", "function Array() {\n [native code]\n}",
+ "function Number() {\n [native code]\n}", "function Function() {\n [native code]\n}",
+ "function () { return 1; }", "function () { return 'ciao'; }",
+ "function () { throw new Error('foo'); }", "/foo/",
+ "[object Object]", "",
+ "Error: Unknown error", "22",
+ "ReferenceError: Can't find variable: Undefined", "ReferenceError: Can't find variable: Null",
+ "ReferenceError: Can't find variable: True", "ReferenceError: Can't find variable: False",
+ "", "",
+ "true", "false",
+ "122", "124",
+ "0", "0",
+ "123", "6.37e-8",
+ "-6.37e-8", "1126240820",
+ "65536", "65537",
+ "NaN", "Infinity",
+ "-Infinity", "ciao",
+ "", "0",
+ "123", "12.4",
+ "", "",
+ "[object Object]", "",
+ ",,,,,,,,,", "Invalid Date",
+ "[object QMetaObject]", "undefined",
+ "123", "false",
+ "", "QScriptEngine(name = \"\")", };
+void tst_QScriptValue::qscriptvalue_castQString_makeData(const char* expr)
+{
+ static QHash<QString, QString> value;
+ if (value.isEmpty()) {
+ value.reserve(142);
+ for (unsigned i = 0; i < 142; ++i)
+ value.insert(qscriptvalue_castQString_tagArray[i], qscriptvalue_castQString_valueArray[i]);
+ }
+ newRow(expr) << value.value(expr);
+}
+
+void tst_QScriptValue::qscriptvalue_castQString_test(const char*, const QScriptValue& value)
+{
+ QFETCH(QString, expected);
+ QCOMPARE(qscriptvalue_cast<QString>(value), expected);
+ QCOMPARE(qscriptvalue_cast<QString>(value), expected);
+}
+
+DEFINE_TEST_FUNCTION(qscriptvalue_castQString)
+
+
+void tst_QScriptValue::qscriptvalue_castqsreal_initData()
+{
+ QTest::addColumn<qsreal>("expected");
+ initScriptValues();
+}
+
+static QString qscriptvalue_castqsreal_tagArray [] = {
+ "QScriptValue()",
+ "QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(true)",
+ "QScriptValue(false)",
+ "QScriptValue(int(122))",
+ "QScriptValue(uint(124))",
+ "QScriptValue(0)",
+ "QScriptValue(0.0)",
+ "QScriptValue(123.0)",
+ "QScriptValue(6.37e-8)",
+ "QScriptValue(-6.37e-8)",
+ "QScriptValue(0x43211234)",
+ "QScriptValue(0x10000)",
+ "QScriptValue(0x10001)",
+ "QScriptValue(qSNaN())",
+ "QScriptValue(qQNaN())",
+ "QScriptValue(qInf())",
+ "QScriptValue(-qInf())",
+ "QScriptValue(\"NaN\")",
+ "QScriptValue(\"Infinity\")",
+ "QScriptValue(\"-Infinity\")",
+ "QScriptValue(\"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\"))",
+ "QScriptValue(QString())",
+ "QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, true)",
+ "QScriptValue(0, false)",
+ "QScriptValue(0, int(122))",
+ "QScriptValue(0, uint(124))",
+ "QScriptValue(0, 0)",
+ "QScriptValue(0, 0.0)",
+ "QScriptValue(0, 123.0)",
+ "QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0x10001)",
+ "QScriptValue(0, qSNaN())",
+ "QScriptValue(0, qQNaN())",
+ "QScriptValue(0, qInf())",
+ "QScriptValue(0, -qInf())",
+ "QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString())",
+ "QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, true)",
+ "QScriptValue(engine, false)",
+ "QScriptValue(engine, int(122))",
+ "QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, qSNaN())",
+ "QScriptValue(engine, qQNaN())",
+ "QScriptValue(engine, qInf())",
+ "QScriptValue(engine, -qInf())",
+ "QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"[]\")",
+ "engine->evaluate(\"{}\")",
+ "engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Date.prototype\")",
+ "engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\")",
+ "engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"null\")",
+ "engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\")",
+ "engine->evaluate(\"122\")",
+ "engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\")",
+ "engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"NaN\")",
+ "engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\")",
+ "engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\")",
+ "engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'12.4'\")",
+ "engine->nullValue()",
+ "engine->undefinedValue()",
+ "engine->newObject()",
+ "engine->newArray()",
+ "engine->newArray(10)",
+ "engine->newDate(QDateTime())",
+ "engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false))",
+ "engine->newQObject(0)",
+ "engine->newQObject(engine)",};
+static qsreal qscriptvalue_castqsreal_valueArray [] = {
+ 0, qQNaN(), 0, 1, 0, 122, 124, 0, 0, 123,
+ 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, 65536, 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(),
+ qInf(), qInf(), qQNaN(), qQNaN(), 0, 0, 0, 123, 12.4, qQNaN(),
+ 0, 1, 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08,
+ 1126240820, 65536, 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(), qInf(), qInf(),
+ qQNaN(), qQNaN(), 0, 0, 0, 123, 12.3, qQNaN(), 0, 1,
+ 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, 65536,
+ 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(), qInf(), qInf(), qQNaN(), qQNaN(),
+ 0, 0, 0, 123, 1.23, 0, qQNaN(), qQNaN(), qQNaN(), 0,
+ qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(),
+ qQNaN(), 0, qQNaN(), 22, qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), 0,
+ 1, 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08, 1126240820,
+ 65536, 65537, qQNaN(), qInf(), qInf(), qQNaN(), 0, 0, 123, 12.4,
+ 0, qQNaN(), qQNaN(), 0, qQNaN(), qQNaN(), qQNaN(), qQNaN(), 123, 0,
+ 0, qQNaN(), };
+void tst_QScriptValue::qscriptvalue_castqsreal_makeData(const char* expr)
+{
+ static QHash<QString, qsreal> value;
+ if (value.isEmpty()) {
+ value.reserve(142);
+ for (unsigned i = 0; i < 142; ++i)
+ value.insert(qscriptvalue_castqsreal_tagArray[i], qscriptvalue_castqsreal_valueArray[i]);
+ }
+ newRow(expr) << value.value(expr);
+}
+
+void tst_QScriptValue::qscriptvalue_castqsreal_test(const char*, const QScriptValue& value)
+{
+ QFETCH(qsreal, expected);
+ if (qIsNaN(expected)) {
+ QVERIFY(qIsNaN(qscriptvalue_cast<qsreal>(value)));
+ QVERIFY(qIsNaN(qscriptvalue_cast<qsreal>(value)));
+ return;
+ }
+ if (qIsInf(expected)) {
+ QVERIFY(qIsInf(qscriptvalue_cast<qsreal>(value)));
+ QVERIFY(qIsInf(qscriptvalue_cast<qsreal>(value)));
+ return;
+ }
+ QCOMPARE(qscriptvalue_cast<qsreal>(value), expected);
+ QCOMPARE(qscriptvalue_cast<qsreal>(value), expected);
+}
+
+DEFINE_TEST_FUNCTION(qscriptvalue_castqsreal)
+
+
+void tst_QScriptValue::qscriptvalue_castbool_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString qscriptvalue_castbool_tagArray [] = {
+ "QScriptValue()",
+ "QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(true)",
+ "QScriptValue(false)",
+ "QScriptValue(int(122))",
+ "QScriptValue(uint(124))",
+ "QScriptValue(0)",
+ "QScriptValue(0.0)",
+ "QScriptValue(123.0)",
+ "QScriptValue(6.37e-8)",
+ "QScriptValue(-6.37e-8)",
+ "QScriptValue(0x43211234)",
+ "QScriptValue(0x10000)",
+ "QScriptValue(0x10001)",
+ "QScriptValue(qSNaN())",
+ "QScriptValue(qQNaN())",
+ "QScriptValue(qInf())",
+ "QScriptValue(-qInf())",
+ "QScriptValue(\"NaN\")",
+ "QScriptValue(\"Infinity\")",
+ "QScriptValue(\"-Infinity\")",
+ "QScriptValue(\"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\"))",
+ "QScriptValue(QString())",
+ "QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, true)",
+ "QScriptValue(0, false)",
+ "QScriptValue(0, int(122))",
+ "QScriptValue(0, uint(124))",
+ "QScriptValue(0, 0)",
+ "QScriptValue(0, 0.0)",
+ "QScriptValue(0, 123.0)",
+ "QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0x10001)",
+ "QScriptValue(0, qSNaN())",
+ "QScriptValue(0, qQNaN())",
+ "QScriptValue(0, qInf())",
+ "QScriptValue(0, -qInf())",
+ "QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString())",
+ "QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, true)",
+ "QScriptValue(engine, false)",
+ "QScriptValue(engine, int(122))",
+ "QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, qSNaN())",
+ "QScriptValue(engine, qQNaN())",
+ "QScriptValue(engine, qInf())",
+ "QScriptValue(engine, -qInf())",
+ "QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"[]\")",
+ "engine->evaluate(\"{}\")",
+ "engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Date.prototype\")",
+ "engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\")",
+ "engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"null\")",
+ "engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\")",
+ "engine->evaluate(\"122\")",
+ "engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\")",
+ "engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"NaN\")",
+ "engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\")",
+ "engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\")",
+ "engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'12.4'\")",
+ "engine->nullValue()",
+ "engine->undefinedValue()",
+ "engine->newObject()",
+ "engine->newArray()",
+ "engine->newArray(10)",
+ "engine->newDate(QDateTime())",
+ "engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false))",
+ "engine->newQObject(0)",
+ "engine->newQObject(engine)",};
+static bool qscriptvalue_castbool_valueArray [] = {
+ false, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, true,
+ true, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, true,
+ true, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, true,
+ true, true,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, false,
+ true, true,
+ false, false,
+ true, true,
+ true, true,
+ true, true,
+ false, true,
+ true, true,
+ false, true,
+ true, true,
+ false, false,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ false, true, };
+void tst_QScriptValue::qscriptvalue_castbool_makeData(const char* expr)
+{
+ static QHash<QString, bool> value;
+ if (value.isEmpty()) {
+ value.reserve(142);
+ for (unsigned i = 0; i < 142; ++i)
+ value.insert(qscriptvalue_castbool_tagArray[i], qscriptvalue_castbool_valueArray[i]);
+ }
+ newRow(expr) << value.value(expr);
+}
+
+void tst_QScriptValue::qscriptvalue_castbool_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(qscriptvalue_cast<bool>(value), expected);
+ QCOMPARE(qscriptvalue_cast<bool>(value), expected);
+}
+
+DEFINE_TEST_FUNCTION(qscriptvalue_castbool)
+
+
+void tst_QScriptValue::qscriptvalue_castqint32_initData()
+{
+ QTest::addColumn<qint32>("expected");
+ initScriptValues();
+}
+
+static QString qscriptvalue_castqint32_tagArray [] = {
+ "QScriptValue()",
+ "QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(true)",
+ "QScriptValue(false)",
+ "QScriptValue(int(122))",
+ "QScriptValue(uint(124))",
+ "QScriptValue(0)",
+ "QScriptValue(0.0)",
+ "QScriptValue(123.0)",
+ "QScriptValue(6.37e-8)",
+ "QScriptValue(-6.37e-8)",
+ "QScriptValue(0x43211234)",
+ "QScriptValue(0x10000)",
+ "QScriptValue(0x10001)",
+ "QScriptValue(qSNaN())",
+ "QScriptValue(qQNaN())",
+ "QScriptValue(qInf())",
+ "QScriptValue(-qInf())",
+ "QScriptValue(\"NaN\")",
+ "QScriptValue(\"Infinity\")",
+ "QScriptValue(\"-Infinity\")",
+ "QScriptValue(\"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\"))",
+ "QScriptValue(QString())",
+ "QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, true)",
+ "QScriptValue(0, false)",
+ "QScriptValue(0, int(122))",
+ "QScriptValue(0, uint(124))",
+ "QScriptValue(0, 0)",
+ "QScriptValue(0, 0.0)",
+ "QScriptValue(0, 123.0)",
+ "QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0x10001)",
+ "QScriptValue(0, qSNaN())",
+ "QScriptValue(0, qQNaN())",
+ "QScriptValue(0, qInf())",
+ "QScriptValue(0, -qInf())",
+ "QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString())",
+ "QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, true)",
+ "QScriptValue(engine, false)",
+ "QScriptValue(engine, int(122))",
+ "QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, qSNaN())",
+ "QScriptValue(engine, qQNaN())",
+ "QScriptValue(engine, qInf())",
+ "QScriptValue(engine, -qInf())",
+ "QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"[]\")",
+ "engine->evaluate(\"{}\")",
+ "engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Date.prototype\")",
+ "engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\")",
+ "engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"null\")",
+ "engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\")",
+ "engine->evaluate(\"122\")",
+ "engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\")",
+ "engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"NaN\")",
+ "engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\")",
+ "engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\")",
+ "engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'12.4'\")",
+ "engine->nullValue()",
+ "engine->undefinedValue()",
+ "engine->newObject()",
+ "engine->newArray()",
+ "engine->newArray(10)",
+ "engine->newDate(QDateTime())",
+ "engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false))",
+ "engine->newQObject(0)",
+ "engine->newQObject(engine)",};
+static qint32 qscriptvalue_castqint32_valueArray [] = {
+ 0, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 22,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 1, 0,
+ 122, 124,
+ 0, 0,
+ 123, 0,
+ 0, 1126240820,
+ 65536, 65537,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 123, 12,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 123, 0,
+ 0, 0, };
+void tst_QScriptValue::qscriptvalue_castqint32_makeData(const char* expr)
+{
+ static QHash<QString, qint32> value;
+ if (value.isEmpty()) {
+ value.reserve(142);
+ for (unsigned i = 0; i < 142; ++i)
+ value.insert(qscriptvalue_castqint32_tagArray[i], qscriptvalue_castqint32_valueArray[i]);
+ }
+ newRow(expr) << value.value(expr);
+}
+
+void tst_QScriptValue::qscriptvalue_castqint32_test(const char*, const QScriptValue& value)
+{
+ QFETCH(qint32, expected);
+ QCOMPARE(qscriptvalue_cast<qint32>(value), expected);
+ QCOMPARE(qscriptvalue_cast<qint32>(value), expected);
+}
+
+DEFINE_TEST_FUNCTION(qscriptvalue_castqint32)
+
+
+void tst_QScriptValue::qscriptvalue_castquint32_initData()
+{
+ QTest::addColumn<quint32>("expected");
+ initScriptValues();
+}
+
+static QString qscriptvalue_castquint32_tagArray [] = {
+ "QScriptValue()",
+ "QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(true)",
+ "QScriptValue(false)",
+ "QScriptValue(int(122))",
+ "QScriptValue(uint(124))",
+ "QScriptValue(0)",
+ "QScriptValue(0.0)",
+ "QScriptValue(123.0)",
+ "QScriptValue(6.37e-8)",
+ "QScriptValue(-6.37e-8)",
+ "QScriptValue(0x43211234)",
+ "QScriptValue(0x10000)",
+ "QScriptValue(0x10001)",
+ "QScriptValue(qSNaN())",
+ "QScriptValue(qQNaN())",
+ "QScriptValue(qInf())",
+ "QScriptValue(-qInf())",
+ "QScriptValue(\"NaN\")",
+ "QScriptValue(\"Infinity\")",
+ "QScriptValue(\"-Infinity\")",
+ "QScriptValue(\"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\"))",
+ "QScriptValue(QString())",
+ "QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, true)",
+ "QScriptValue(0, false)",
+ "QScriptValue(0, int(122))",
+ "QScriptValue(0, uint(124))",
+ "QScriptValue(0, 0)",
+ "QScriptValue(0, 0.0)",
+ "QScriptValue(0, 123.0)",
+ "QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0x10001)",
+ "QScriptValue(0, qSNaN())",
+ "QScriptValue(0, qQNaN())",
+ "QScriptValue(0, qInf())",
+ "QScriptValue(0, -qInf())",
+ "QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString())",
+ "QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, true)",
+ "QScriptValue(engine, false)",
+ "QScriptValue(engine, int(122))",
+ "QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, qSNaN())",
+ "QScriptValue(engine, qQNaN())",
+ "QScriptValue(engine, qInf())",
+ "QScriptValue(engine, -qInf())",
+ "QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"[]\")",
+ "engine->evaluate(\"{}\")",
+ "engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Date.prototype\")",
+ "engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\")",
+ "engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"null\")",
+ "engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\")",
+ "engine->evaluate(\"122\")",
+ "engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\")",
+ "engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"NaN\")",
+ "engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\")",
+ "engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\")",
+ "engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'12.4'\")",
+ "engine->nullValue()",
+ "engine->undefinedValue()",
+ "engine->newObject()",
+ "engine->newArray()",
+ "engine->newArray(10)",
+ "engine->newDate(QDateTime())",
+ "engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false))",
+ "engine->newQObject(0)",
+ "engine->newQObject(engine)",};
+static quint32 qscriptvalue_castquint32_valueArray [] = {
+ 0, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 22,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 1, 0,
+ 122, 124,
+ 0, 0,
+ 123, 0,
+ 0, 1126240820,
+ 65536, 65537,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 123, 12,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 123, 0,
+ 0, 0, };
+void tst_QScriptValue::qscriptvalue_castquint32_makeData(const char* expr)
+{
+ static QHash<QString, quint32> value;
+ if (value.isEmpty()) {
+ value.reserve(142);
+ for (unsigned i = 0; i < 142; ++i)
+ value.insert(qscriptvalue_castquint32_tagArray[i], qscriptvalue_castquint32_valueArray[i]);
+ }
+ newRow(expr) << value.value(expr);
+}
+
+void tst_QScriptValue::qscriptvalue_castquint32_test(const char*, const QScriptValue& value)
+{
+ QFETCH(quint32, expected);
+ QCOMPARE(qscriptvalue_cast<quint32>(value), expected);
+ QCOMPARE(qscriptvalue_cast<quint32>(value), expected);
+}
+
+DEFINE_TEST_FUNCTION(qscriptvalue_castquint32)
+
+
+void tst_QScriptValue::qscriptvalue_castquint16_initData()
+{
+ QTest::addColumn<quint16>("expected");
+ initScriptValues();
+}
+
+static QString qscriptvalue_castquint16_tagArray [] = {
+ "QScriptValue()",
+ "QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(true)",
+ "QScriptValue(false)",
+ "QScriptValue(int(122))",
+ "QScriptValue(uint(124))",
+ "QScriptValue(0)",
+ "QScriptValue(0.0)",
+ "QScriptValue(123.0)",
+ "QScriptValue(6.37e-8)",
+ "QScriptValue(-6.37e-8)",
+ "QScriptValue(0x43211234)",
+ "QScriptValue(0x10000)",
+ "QScriptValue(0x10001)",
+ "QScriptValue(qSNaN())",
+ "QScriptValue(qQNaN())",
+ "QScriptValue(qInf())",
+ "QScriptValue(-qInf())",
+ "QScriptValue(\"NaN\")",
+ "QScriptValue(\"Infinity\")",
+ "QScriptValue(\"-Infinity\")",
+ "QScriptValue(\"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\"))",
+ "QScriptValue(QString())",
+ "QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, true)",
+ "QScriptValue(0, false)",
+ "QScriptValue(0, int(122))",
+ "QScriptValue(0, uint(124))",
+ "QScriptValue(0, 0)",
+ "QScriptValue(0, 0.0)",
+ "QScriptValue(0, 123.0)",
+ "QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0x10001)",
+ "QScriptValue(0, qSNaN())",
+ "QScriptValue(0, qQNaN())",
+ "QScriptValue(0, qInf())",
+ "QScriptValue(0, -qInf())",
+ "QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString())",
+ "QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, true)",
+ "QScriptValue(engine, false)",
+ "QScriptValue(engine, int(122))",
+ "QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, qSNaN())",
+ "QScriptValue(engine, qQNaN())",
+ "QScriptValue(engine, qInf())",
+ "QScriptValue(engine, -qInf())",
+ "QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"[]\")",
+ "engine->evaluate(\"{}\")",
+ "engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Date.prototype\")",
+ "engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\")",
+ "engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"null\")",
+ "engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\")",
+ "engine->evaluate(\"122\")",
+ "engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\")",
+ "engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"NaN\")",
+ "engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\")",
+ "engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\")",
+ "engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'12.4'\")",
+ "engine->nullValue()",
+ "engine->undefinedValue()",
+ "engine->newObject()",
+ "engine->newArray()",
+ "engine->newArray(10)",
+ "engine->newDate(QDateTime())",
+ "engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false))",
+ "engine->newQObject(0)",
+ "engine->newQObject(engine)",};
+static quint16 qscriptvalue_castquint16_valueArray [] = {
+ 0, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 4660, 0,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 4660, 0,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 4660, 0,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 22,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 1, 0,
+ 122, 124,
+ 0, 0,
+ 123, 0,
+ 0, 4660,
+ 0, 1,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 123, 12,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 123, 0,
+ 0, 0, };
+void tst_QScriptValue::qscriptvalue_castquint16_makeData(const char* expr)
+{
+ static QHash<QString, quint16> value;
+ if (value.isEmpty()) {
+ value.reserve(142);
+ for (unsigned i = 0; i < 142; ++i)
+ value.insert(qscriptvalue_castquint16_tagArray[i], qscriptvalue_castquint16_valueArray[i]);
+ }
+ newRow(expr) << value.value(expr);
+}
+
+void tst_QScriptValue::qscriptvalue_castquint16_test(const char*, const QScriptValue& value)
+{
+ QFETCH(quint16, expected);
+ QCOMPARE(qscriptvalue_cast<quint16>(value), expected);
+ QCOMPARE(qscriptvalue_cast<quint16>(value), expected);
+}
+
+DEFINE_TEST_FUNCTION(qscriptvalue_castquint16)
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp
new file mode 100644
index 0000000000..6e1f8ee8db
--- /dev/null
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp
@@ -0,0 +1,7026 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+*************** This file has been generated. DO NOT MODIFY! ****************
+****************************************************************************/
+
+#include "tst_qscriptvalue.h"
+
+
+
+void tst_QScriptValue::equals_initData()
+{
+ QTest::addColumn<QScriptValue>("other");
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString equals_array [] = {
+ "QScriptValue() <=> QScriptValue()",
+ "QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")",
+ "QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")",
+ "QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"null\")",
+ "QScriptValue(QScriptValue::UndefinedValue) <=> engine->nullValue()",
+ "QScriptValue(QScriptValue::UndefinedValue) <=> engine->undefinedValue()",
+ "QScriptValue(QScriptValue::UndefinedValue) <=> engine->newQObject(0)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"{}\")",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"undefined\")",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"null\")",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->nullValue()",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->undefinedValue()",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->newQObject(0)",
+ "QScriptValue(true) <=> QScriptValue(true)",
+ "QScriptValue(true) <=> QScriptValue(0, true)",
+ "QScriptValue(true) <=> QScriptValue(engine, true)",
+ "QScriptValue(true) <=> engine->evaluate(\"true\")",
+ "QScriptValue(false) <=> QScriptValue(false)",
+ "QScriptValue(false) <=> QScriptValue(0)",
+ "QScriptValue(false) <=> QScriptValue(0.0)",
+ "QScriptValue(false) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(false) <=> QScriptValue(QString())",
+ "QScriptValue(false) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(false) <=> QScriptValue(0, false)",
+ "QScriptValue(false) <=> QScriptValue(0, 0)",
+ "QScriptValue(false) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(false) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(false) <=> QScriptValue(0, QString())",
+ "QScriptValue(false) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(false) <=> QScriptValue(engine, false)",
+ "QScriptValue(false) <=> QScriptValue(engine, 0)",
+ "QScriptValue(false) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(false) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(false) <=> QScriptValue(engine, QString())",
+ "QScriptValue(false) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(false) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(false) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(false) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(false) <=> engine->evaluate(\"false\")",
+ "QScriptValue(false) <=> engine->evaluate(\"0\")",
+ "QScriptValue(false) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(false) <=> engine->evaluate(\"''\")",
+ "QScriptValue(false) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(false) <=> engine->newArray()",
+ "QScriptValue(false) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(int(122)) <=> QScriptValue(int(122))",
+ "QScriptValue(int(122)) <=> QScriptValue(0, int(122))",
+ "QScriptValue(int(122)) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(int(122)) <=> engine->evaluate(\"122\")",
+ "QScriptValue(uint(124)) <=> QScriptValue(uint(124))",
+ "QScriptValue(uint(124)) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(uint(124)) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(uint(124)) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0) <=> QScriptValue(false)",
+ "QScriptValue(0) <=> QScriptValue(0)",
+ "QScriptValue(0) <=> QScriptValue(0.0)",
+ "QScriptValue(0) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(0) <=> QScriptValue(QString())",
+ "QScriptValue(0) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(0) <=> QScriptValue(0, false)",
+ "QScriptValue(0) <=> QScriptValue(0, 0)",
+ "QScriptValue(0) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(0) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0) <=> QScriptValue(0, QString())",
+ "QScriptValue(0) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0) <=> QScriptValue(engine, false)",
+ "QScriptValue(0) <=> QScriptValue(engine, 0)",
+ "QScriptValue(0) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(0) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(0) <=> QScriptValue(engine, QString())",
+ "QScriptValue(0) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(0) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(0) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(0) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(0) <=> engine->evaluate(\"false\")",
+ "QScriptValue(0) <=> engine->evaluate(\"0\")",
+ "QScriptValue(0) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(0) <=> engine->evaluate(\"''\")",
+ "QScriptValue(0) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(0) <=> engine->newArray()",
+ "QScriptValue(0) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(0.0) <=> QScriptValue(false)",
+ "QScriptValue(0.0) <=> QScriptValue(0)",
+ "QScriptValue(0.0) <=> QScriptValue(0.0)",
+ "QScriptValue(0.0) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(0.0) <=> QScriptValue(QString())",
+ "QScriptValue(0.0) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(0.0) <=> QScriptValue(0, false)",
+ "QScriptValue(0.0) <=> QScriptValue(0, 0)",
+ "QScriptValue(0.0) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(0.0) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0.0) <=> QScriptValue(0, QString())",
+ "QScriptValue(0.0) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0.0) <=> QScriptValue(engine, false)",
+ "QScriptValue(0.0) <=> QScriptValue(engine, 0)",
+ "QScriptValue(0.0) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(0.0) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(0.0) <=> QScriptValue(engine, QString())",
+ "QScriptValue(0.0) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(0.0) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"false\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"0\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"''\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(0.0) <=> engine->newArray()",
+ "QScriptValue(0.0) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(123.0) <=> QScriptValue(123.0)",
+ "QScriptValue(123.0) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(123.0) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(123.0) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(123.0) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(123.0) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(123.0) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(123.0) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(123.0) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(6.37e-8) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(6.37e-8) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(-6.37e-8)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, -6.37e-8)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"-6.37e-8\")",
+ "QScriptValue(0x43211234) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0x43211234) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0x43211234) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0x43211234) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0x10000) <=> QScriptValue(0x10000)",
+ "QScriptValue(0x10000) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0x10000) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0x10000) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0x10001) <=> QScriptValue(0x10001)",
+ "QScriptValue(0x10001) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0x10001) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0x10001) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(qInf()) <=> QScriptValue(qInf())",
+ "QScriptValue(qInf()) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(qInf()) <=> QScriptValue(0, qInf())",
+ "QScriptValue(qInf()) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(qInf()) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(qInf()) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(qInf()) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(-qInf()) <=> QScriptValue(-qInf())",
+ "QScriptValue(-qInf()) <=> QScriptValue(\"-Infinity\")",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, -qInf())",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, -qInf())",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"-Infinity\")",
+ "QScriptValue(\"NaN\") <=> QScriptValue(\"NaN\")",
+ "QScriptValue(\"NaN\") <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(\"NaN\") <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(\"Infinity\") <=> QScriptValue(qInf())",
+ "QScriptValue(\"Infinity\") <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(\"Infinity\") <=> QScriptValue(0, qInf())",
+ "QScriptValue(\"Infinity\") <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(\"Infinity\") <=> QScriptValue(engine, qInf())",
+ "QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(\"Infinity\") <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(-qInf())",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(\"-Infinity\")",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, -qInf())",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, -qInf())",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"-Infinity\")",
+ "QScriptValue(\"ciao\") <=> QScriptValue(\"ciao\")",
+ "QScriptValue(\"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(\"ciao\") <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(\"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(\"ciao\") <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(\"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(\"ciao\") <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(false)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0.0)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(QString())",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, false)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, 0)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, QString())",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, false)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString())",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"false\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"0\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"''\")",
+ "QScriptValue(QString(\"\")) <=> engine->newArray()",
+ "QScriptValue(QString(\"\")) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(QString()) <=> QScriptValue(false)",
+ "QScriptValue(QString()) <=> QScriptValue(0)",
+ "QScriptValue(QString()) <=> QScriptValue(0.0)",
+ "QScriptValue(QString()) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(QString()) <=> QScriptValue(QString())",
+ "QScriptValue(QString()) <=> QScriptValue(0, false)",
+ "QScriptValue(QString()) <=> QScriptValue(0, 0)",
+ "QScriptValue(QString()) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(QString()) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(QString()) <=> QScriptValue(0, QString())",
+ "QScriptValue(QString()) <=> QScriptValue(engine, false)",
+ "QScriptValue(QString()) <=> QScriptValue(engine, 0)",
+ "QScriptValue(QString()) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(QString()) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(QString()) <=> QScriptValue(engine, QString())",
+ "QScriptValue(QString()) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"false\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"0\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"''\")",
+ "QScriptValue(QString()) <=> engine->newArray()",
+ "QScriptValue(QString()) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(false)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0.0)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, false)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, false)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"false\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(QString(\"0\")) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(123.0)",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(QString(\"123\")) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")",
+ "QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")",
+ "QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"null\")",
+ "QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->nullValue()",
+ "QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->undefinedValue()",
+ "QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->newQObject(0)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"{}\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"undefined\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"null\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->nullValue()",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->undefinedValue()",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->newQObject(0)",
+ "QScriptValue(0, true) <=> QScriptValue(true)",
+ "QScriptValue(0, true) <=> QScriptValue(0, true)",
+ "QScriptValue(0, true) <=> QScriptValue(engine, true)",
+ "QScriptValue(0, true) <=> engine->evaluate(\"true\")",
+ "QScriptValue(0, false) <=> QScriptValue(false)",
+ "QScriptValue(0, false) <=> QScriptValue(0)",
+ "QScriptValue(0, false) <=> QScriptValue(0.0)",
+ "QScriptValue(0, false) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(0, false) <=> QScriptValue(QString())",
+ "QScriptValue(0, false) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(0, false) <=> QScriptValue(0, false)",
+ "QScriptValue(0, false) <=> QScriptValue(0, 0)",
+ "QScriptValue(0, false) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(0, false) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, false) <=> QScriptValue(0, QString())",
+ "QScriptValue(0, false) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, false) <=> QScriptValue(engine, false)",
+ "QScriptValue(0, false) <=> QScriptValue(engine, 0)",
+ "QScriptValue(0, false) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(0, false) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(0, false) <=> QScriptValue(engine, QString())",
+ "QScriptValue(0, false) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(0, false) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"false\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"0\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"''\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(0, false) <=> engine->newArray()",
+ "QScriptValue(0, false) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(0, int(122)) <=> QScriptValue(int(122))",
+ "QScriptValue(0, int(122)) <=> QScriptValue(0, int(122))",
+ "QScriptValue(0, int(122)) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(0, int(122)) <=> engine->evaluate(\"122\")",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(uint(124))",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0, uint(124)) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0, 0) <=> QScriptValue(false)",
+ "QScriptValue(0, 0) <=> QScriptValue(0)",
+ "QScriptValue(0, 0) <=> QScriptValue(0.0)",
+ "QScriptValue(0, 0) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(0, 0) <=> QScriptValue(QString())",
+ "QScriptValue(0, 0) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(0, 0) <=> QScriptValue(0, false)",
+ "QScriptValue(0, 0) <=> QScriptValue(0, 0)",
+ "QScriptValue(0, 0) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(0, 0) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, 0) <=> QScriptValue(0, QString())",
+ "QScriptValue(0, 0) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, false)",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, 0)",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, QString())",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"false\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"0\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"''\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(0, 0) <=> engine->newArray()",
+ "QScriptValue(0, 0) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(0, 0.0) <=> QScriptValue(false)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0.0)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(0, 0.0) <=> QScriptValue(QString())",
+ "QScriptValue(0, 0.0) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, false)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, 0)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, QString())",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, false)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, 0)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, QString())",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"false\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"0\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"''\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(0, 0.0) <=> engine->newArray()",
+ "QScriptValue(0, 0.0) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(0, 123.0) <=> QScriptValue(123.0)",
+ "QScriptValue(0, 123.0) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0, 123.0) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0, 123.0) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, 123.0) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0, 123.0) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, 123.0) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0, 123.0) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0, 123.0) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(-6.37e-8)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"-6.37e-8\")",
+ "QScriptValue(0, 0x43211234) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, 0x43211234) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x43211234) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, 0x43211234) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, 0x10000) <=> QScriptValue(0x10000)",
+ "QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, 0x10000) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, 0x10001) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, 0x10001) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, qInf()) <=> QScriptValue(qInf())",
+ "QScriptValue(0, qInf()) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, qInf()) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, qInf()) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, qInf()) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, qInf()) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, qInf()) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(-qInf())",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(\"-Infinity\")",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, -qInf())",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, -qInf())",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"-Infinity\")",
+ "QScriptValue(0, \"NaN\") <=> QScriptValue(\"NaN\")",
+ "QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(0, \"Infinity\") <=> QScriptValue(qInf())",
+ "QScriptValue(0, \"Infinity\") <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, \"Infinity\") <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(-qInf())",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"-Infinity\")",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, -qInf())",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, -qInf())",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"-Infinity\")",
+ "QScriptValue(0, \"ciao\") <=> QScriptValue(\"ciao\")",
+ "QScriptValue(0, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, \"ciao\") <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, \"ciao\") <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(0, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(false)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0.0)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(QString())",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, false)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString())",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, false)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString())",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"false\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"''\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->newArray()",
+ "QScriptValue(0, QString(\"\")) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(0, QString()) <=> QScriptValue(false)",
+ "QScriptValue(0, QString()) <=> QScriptValue(0)",
+ "QScriptValue(0, QString()) <=> QScriptValue(0.0)",
+ "QScriptValue(0, QString()) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(0, QString()) <=> QScriptValue(QString())",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, false)",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, 0)",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, QString())",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, false)",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, 0)",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, QString())",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"false\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"0\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"''\")",
+ "QScriptValue(0, QString()) <=> engine->newArray()",
+ "QScriptValue(0, QString()) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(false)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0.0)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, false)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, false)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"false\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(123.0)",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")",
+ "QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")",
+ "QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"null\")",
+ "QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->nullValue()",
+ "QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->undefinedValue()",
+ "QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->newQObject(0)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"{}\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"undefined\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"null\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->nullValue()",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->undefinedValue()",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->newQObject(0)",
+ "QScriptValue(engine, true) <=> QScriptValue(true)",
+ "QScriptValue(engine, true) <=> QScriptValue(0, true)",
+ "QScriptValue(engine, true) <=> QScriptValue(engine, true)",
+ "QScriptValue(engine, true) <=> engine->evaluate(\"true\")",
+ "QScriptValue(engine, false) <=> QScriptValue(false)",
+ "QScriptValue(engine, false) <=> QScriptValue(0)",
+ "QScriptValue(engine, false) <=> QScriptValue(0.0)",
+ "QScriptValue(engine, false) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(engine, false) <=> QScriptValue(QString())",
+ "QScriptValue(engine, false) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(engine, false) <=> QScriptValue(0, false)",
+ "QScriptValue(engine, false) <=> QScriptValue(0, 0)",
+ "QScriptValue(engine, false) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(engine, false) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(engine, false) <=> QScriptValue(0, QString())",
+ "QScriptValue(engine, false) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, false)",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, 0)",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, QString())",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"false\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"0\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"''\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(engine, false) <=> engine->newArray()",
+ "QScriptValue(engine, false) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(int(122))",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(0, int(122))",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(engine, int(122)) <=> engine->evaluate(\"122\")",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(uint(124))",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, uint(124)) <=> engine->evaluate(\"124\")",
+ "QScriptValue(engine, 0) <=> QScriptValue(false)",
+ "QScriptValue(engine, 0) <=> QScriptValue(0)",
+ "QScriptValue(engine, 0) <=> QScriptValue(0.0)",
+ "QScriptValue(engine, 0) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(engine, 0) <=> QScriptValue(QString())",
+ "QScriptValue(engine, 0) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, false)",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, 0)",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, QString())",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, false)",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, QString())",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"false\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"0\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"''\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(engine, 0) <=> engine->newArray()",
+ "QScriptValue(engine, 0) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(false)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0.0)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(QString())",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, false)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, 0)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, QString())",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, false)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString())",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"false\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"0\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"''\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(engine, 0.0) <=> engine->newArray()",
+ "QScriptValue(engine, 0.0) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(123.0)",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, 123.0) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(engine, 123.0) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(engine, 123.0) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(-6.37e-8)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, -6.37e-8)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"-6.37e-8\")",
+ "QScriptValue(engine, 0x43211234) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, 0x43211234) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x43211234) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, 0x10000) <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0x10000) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, 0x10001) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, 0x10001) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, qInf()) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, qInf()) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, qInf()) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, qInf()) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, qInf()) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, qInf()) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, qInf()) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(-qInf())",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(\"-Infinity\")",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, -qInf())",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -qInf())",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"-Infinity\")",
+ "QScriptValue(engine, \"NaN\") <=> QScriptValue(\"NaN\")",
+ "QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\") <=> QScriptValue(qInf())",
+ "QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(-qInf())",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"-Infinity\")",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, -qInf())",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, -qInf())",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"-Infinity\")",
+ "QScriptValue(engine, \"ciao\") <=> QScriptValue(\"ciao\")",
+ "QScriptValue(engine, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, \"ciao\") <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(engine, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(false)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0.0)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString())",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, false)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString())",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, false)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"false\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"''\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->newArray()",
+ "QScriptValue(engine, QString(\"\")) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(false)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0.0)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(QString())",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, false)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, 0)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, QString())",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, false)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, 0)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"false\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"0\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"''\")",
+ "QScriptValue(engine, QString()) <=> engine->newArray()",
+ "QScriptValue(engine, QString()) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(false)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0.0)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, false)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, false)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"false\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(123.0)",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(false)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0.0)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(QString(\"\"))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(QString())",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, false)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, 0)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, 0.0)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"\"))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, QString())",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, false)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, 0)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, 0.0)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"\"))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, QString())",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"[]\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"false\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"0\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"''\")",
+ "engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::UndefinedValue)",
+ "engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::NullValue)",
+ "engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::UndefinedValue)",
+ "engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::NullValue)",
+ "engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "engine->evaluate(\"{}\") <=> engine->evaluate(\"{}\")",
+ "engine->evaluate(\"{}\") <=> engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"{}\") <=> engine->evaluate(\"null\")",
+ "engine->evaluate(\"{}\") <=> engine->nullValue()",
+ "engine->evaluate(\"{}\") <=> engine->undefinedValue()",
+ "engine->evaluate(\"{}\") <=> engine->newQObject(0)",
+ "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Date.prototype\")",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(false)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0.0)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"\"))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString())",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, false)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0.0)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"\"))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString())",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, false)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0.0)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"\"))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString())",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"false\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"''\")",
+ "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(false)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0.0)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"\"))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(QString())",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, false)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0.0)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"\"))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString())",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, false)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0.0)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"\"))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString())",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"false\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"''\")",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\") <=> engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\") <=> engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\") <=> engine->evaluate(\"False\")",
+ "engine->evaluate(\"undefined\") <=> QScriptValue(QScriptValue::UndefinedValue)",
+ "engine->evaluate(\"undefined\") <=> QScriptValue(QScriptValue::NullValue)",
+ "engine->evaluate(\"undefined\") <=> QScriptValue(0, QScriptValue::UndefinedValue)",
+ "engine->evaluate(\"undefined\") <=> QScriptValue(0, QScriptValue::NullValue)",
+ "engine->evaluate(\"undefined\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "engine->evaluate(\"undefined\") <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "engine->evaluate(\"undefined\") <=> engine->evaluate(\"{}\")",
+ "engine->evaluate(\"undefined\") <=> engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"undefined\") <=> engine->evaluate(\"null\")",
+ "engine->evaluate(\"undefined\") <=> engine->nullValue()",
+ "engine->evaluate(\"undefined\") <=> engine->undefinedValue()",
+ "engine->evaluate(\"undefined\") <=> engine->newQObject(0)",
+ "engine->evaluate(\"null\") <=> QScriptValue(QScriptValue::UndefinedValue)",
+ "engine->evaluate(\"null\") <=> QScriptValue(QScriptValue::NullValue)",
+ "engine->evaluate(\"null\") <=> QScriptValue(0, QScriptValue::UndefinedValue)",
+ "engine->evaluate(\"null\") <=> QScriptValue(0, QScriptValue::NullValue)",
+ "engine->evaluate(\"null\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "engine->evaluate(\"null\") <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "engine->evaluate(\"null\") <=> engine->evaluate(\"{}\")",
+ "engine->evaluate(\"null\") <=> engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"null\") <=> engine->evaluate(\"null\")",
+ "engine->evaluate(\"null\") <=> engine->nullValue()",
+ "engine->evaluate(\"null\") <=> engine->undefinedValue()",
+ "engine->evaluate(\"null\") <=> engine->newQObject(0)",
+ "engine->evaluate(\"true\") <=> QScriptValue(true)",
+ "engine->evaluate(\"true\") <=> QScriptValue(0, true)",
+ "engine->evaluate(\"true\") <=> QScriptValue(engine, true)",
+ "engine->evaluate(\"true\") <=> engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\") <=> QScriptValue(false)",
+ "engine->evaluate(\"false\") <=> QScriptValue(0)",
+ "engine->evaluate(\"false\") <=> QScriptValue(0.0)",
+ "engine->evaluate(\"false\") <=> QScriptValue(QString(\"\"))",
+ "engine->evaluate(\"false\") <=> QScriptValue(QString())",
+ "engine->evaluate(\"false\") <=> QScriptValue(QString(\"0\"))",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, false)",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, 0)",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, 0.0)",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, QString(\"\"))",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, QString())",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, QString(\"0\"))",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, false)",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, 0)",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, 0.0)",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, QString(\"\"))",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, QString())",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"[]\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"false\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"0\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"''\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"false\") <=> engine->newArray()",
+ "engine->evaluate(\"false\") <=> engine->newVariant(QVariant(false))",
+ "engine->evaluate(\"122\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"122\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"122\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"122\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"124\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"124\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"124\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"124\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\") <=> QScriptValue(false)",
+ "engine->evaluate(\"0\") <=> QScriptValue(0)",
+ "engine->evaluate(\"0\") <=> QScriptValue(0.0)",
+ "engine->evaluate(\"0\") <=> QScriptValue(QString(\"\"))",
+ "engine->evaluate(\"0\") <=> QScriptValue(QString())",
+ "engine->evaluate(\"0\") <=> QScriptValue(QString(\"0\"))",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, false)",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, 0)",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, 0.0)",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, QString(\"\"))",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, QString())",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, QString(\"0\"))",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, false)",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, 0)",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, 0.0)",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, QString(\"\"))",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, QString())",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"[]\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"false\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"0\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"''\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"0\") <=> engine->newArray()",
+ "engine->evaluate(\"0\") <=> engine->newVariant(QVariant(false))",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(false)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0.0)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(QString(\"\"))",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(QString())",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(QString(\"0\"))",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, false)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, 0)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, 0.0)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, QString(\"\"))",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, QString())",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, QString(\"0\"))",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, false)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0.0)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString(\"\"))",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString())",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"[]\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"false\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"0\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"''\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"0.0\") <=> engine->newArray()",
+ "engine->evaluate(\"0.0\") <=> engine->newVariant(QVariant(false))",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"123.0\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"123.0\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"123.0\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(6.37e-8)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 6.37e-8)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 6.37e-8)",
+ "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(-6.37e-8)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, -6.37e-8)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, -6.37e-8)",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"0x43211234\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"0x43211234\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"0x43211234\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"0x43211234\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"0x10000\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"0x10000\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"0x10000\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0x10001\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"0x10001\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"0x10001\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"0x10001\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"Infinity\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"Infinity\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"Infinity\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"Infinity\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"Infinity\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"Infinity\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"Infinity\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(-qInf())",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(\"-Infinity\")",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, -qInf())",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, \"-Infinity\")",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, -qInf())",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"-Infinity\")",
+ "engine->evaluate(\"'ciao'\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"'ciao'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"'ciao'\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"'ciao'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"'ciao'\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"'ciao'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\") <=> QScriptValue(false)",
+ "engine->evaluate(\"''\") <=> QScriptValue(0)",
+ "engine->evaluate(\"''\") <=> QScriptValue(0.0)",
+ "engine->evaluate(\"''\") <=> QScriptValue(QString(\"\"))",
+ "engine->evaluate(\"''\") <=> QScriptValue(QString())",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, false)",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, 0)",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, 0.0)",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"\"))",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, QString())",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, false)",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, 0)",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, 0.0)",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"\"))",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, QString())",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"[]\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"false\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"0\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"''\")",
+ "engine->evaluate(\"''\") <=> engine->newArray()",
+ "engine->evaluate(\"''\") <=> engine->newVariant(QVariant(false))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(false)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0.0)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(QString(\"0\"))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, false)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, 0)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, 0.0)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, QString(\"0\"))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, false)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0.0)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"false\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"0\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"'0'\") <=> engine->newVariant(QVariant(false))",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'123'\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->nullValue() <=> QScriptValue(QScriptValue::UndefinedValue)",
+ "engine->nullValue() <=> QScriptValue(QScriptValue::NullValue)",
+ "engine->nullValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)",
+ "engine->nullValue() <=> QScriptValue(0, QScriptValue::NullValue)",
+ "engine->nullValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "engine->nullValue() <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "engine->nullValue() <=> engine->evaluate(\"{}\")",
+ "engine->nullValue() <=> engine->evaluate(\"undefined\")",
+ "engine->nullValue() <=> engine->evaluate(\"null\")",
+ "engine->nullValue() <=> engine->nullValue()",
+ "engine->nullValue() <=> engine->undefinedValue()",
+ "engine->nullValue() <=> engine->newQObject(0)",
+ "engine->undefinedValue() <=> QScriptValue(QScriptValue::UndefinedValue)",
+ "engine->undefinedValue() <=> QScriptValue(QScriptValue::NullValue)",
+ "engine->undefinedValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)",
+ "engine->undefinedValue() <=> QScriptValue(0, QScriptValue::NullValue)",
+ "engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "engine->undefinedValue() <=> engine->evaluate(\"{}\")",
+ "engine->undefinedValue() <=> engine->evaluate(\"undefined\")",
+ "engine->undefinedValue() <=> engine->evaluate(\"null\")",
+ "engine->undefinedValue() <=> engine->nullValue()",
+ "engine->undefinedValue() <=> engine->undefinedValue()",
+ "engine->undefinedValue() <=> engine->newQObject(0)",
+ "engine->newObject() <=> engine->newObject()",
+ "engine->newArray() <=> QScriptValue(false)",
+ "engine->newArray() <=> QScriptValue(0)",
+ "engine->newArray() <=> QScriptValue(0.0)",
+ "engine->newArray() <=> QScriptValue(QString(\"\"))",
+ "engine->newArray() <=> QScriptValue(QString())",
+ "engine->newArray() <=> QScriptValue(0, false)",
+ "engine->newArray() <=> QScriptValue(0, 0)",
+ "engine->newArray() <=> QScriptValue(0, 0.0)",
+ "engine->newArray() <=> QScriptValue(0, QString(\"\"))",
+ "engine->newArray() <=> QScriptValue(0, QString())",
+ "engine->newArray() <=> QScriptValue(engine, false)",
+ "engine->newArray() <=> QScriptValue(engine, 0)",
+ "engine->newArray() <=> QScriptValue(engine, 0.0)",
+ "engine->newArray() <=> QScriptValue(engine, QString(\"\"))",
+ "engine->newArray() <=> QScriptValue(engine, QString())",
+ "engine->newArray() <=> engine->evaluate(\"false\")",
+ "engine->newArray() <=> engine->evaluate(\"0\")",
+ "engine->newArray() <=> engine->evaluate(\"0.0\")",
+ "engine->newArray() <=> engine->evaluate(\"''\")",
+ "engine->newArray() <=> engine->newArray()",
+ "engine->newArray(10) <=> engine->newArray(10)",
+ "engine->newDate(QDateTime()) <=> engine->newDate(QDateTime())",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newVariant(QVariant()) <=> engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(123.0)",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(QString(\"123\"))",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(0, 123.0)",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(0, QString(\"123\"))",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(engine, 123.0)",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->newVariant(QVariant(123)) <=> engine->evaluate(\"123.0\")",
+ "engine->newVariant(QVariant(123)) <=> engine->evaluate(\"'123'\")",
+ "engine->newVariant(QVariant(123)) <=> engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(false)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0.0)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(QString(\"\"))",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(QString())",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(QString(\"0\"))",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0, false)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0, 0)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0, 0.0)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0, QString(\"\"))",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0, QString())",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0, QString(\"0\"))",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, false)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 0)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 0.0)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, QString(\"\"))",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, QString())",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"false\")",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"0\")",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"0.0\")",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"''\")",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"'0'\")",
+ "engine->newVariant(QVariant(false)) <=> engine->newVariant(QVariant(false))",
+ "engine->newQObject(0) <=> QScriptValue(QScriptValue::UndefinedValue)",
+ "engine->newQObject(0) <=> QScriptValue(QScriptValue::NullValue)",
+ "engine->newQObject(0) <=> QScriptValue(0, QScriptValue::UndefinedValue)",
+ "engine->newQObject(0) <=> QScriptValue(0, QScriptValue::NullValue)",
+ "engine->newQObject(0) <=> QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "engine->newQObject(0) <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "engine->newQObject(0) <=> engine->evaluate(\"{}\")",
+ "engine->newQObject(0) <=> engine->evaluate(\"undefined\")",
+ "engine->newQObject(0) <=> engine->evaluate(\"null\")",
+ "engine->newQObject(0) <=> engine->nullValue()",
+ "engine->newQObject(0) <=> engine->undefinedValue()",
+ "engine->newQObject(0) <=> engine->newQObject(0)",
+ "engine->newQObject(engine) <=> engine->newQObject(engine)",};
+
+void tst_QScriptValue::equals_makeData(const char *expr)
+{
+ static QSet<QString> equals;
+ if (equals.isEmpty()) {
+ equals.reserve(1217);
+ for (unsigned i = 0; i < 1217; ++i)
+ equals.insert(equals_array[i]);
+ }
+ QHash<QString, QScriptValue>::const_iterator it;
+ for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {
+ QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key());
+ newRow(tag.toLatin1()) << it.value() << equals.contains(tag);
+ }
+}
+
+void tst_QScriptValue::equals_test(const char *, const QScriptValue& value)
+{
+ QFETCH(QScriptValue, other);
+ QFETCH(bool, expected);
+ QCOMPARE(value.equals(other), expected);
+}
+
+DEFINE_TEST_FUNCTION(equals)
+
+
+void tst_QScriptValue::strictlyEquals_initData()
+{
+ QTest::addColumn<QScriptValue>("other");
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString strictlyEquals_array [] = {
+ "QScriptValue() <=> QScriptValue()",
+ "QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")",
+ "QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")",
+ "QScriptValue(QScriptValue::UndefinedValue) <=> engine->undefinedValue()",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"null\")",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->nullValue()",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->newQObject(0)",
+ "QScriptValue(true) <=> QScriptValue(true)",
+ "QScriptValue(true) <=> QScriptValue(0, true)",
+ "QScriptValue(true) <=> QScriptValue(engine, true)",
+ "QScriptValue(true) <=> engine->evaluate(\"true\")",
+ "QScriptValue(false) <=> QScriptValue(false)",
+ "QScriptValue(false) <=> QScriptValue(0, false)",
+ "QScriptValue(false) <=> QScriptValue(engine, false)",
+ "QScriptValue(false) <=> engine->evaluate(\"false\")",
+ "QScriptValue(int(122)) <=> QScriptValue(int(122))",
+ "QScriptValue(int(122)) <=> QScriptValue(0, int(122))",
+ "QScriptValue(int(122)) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(int(122)) <=> engine->evaluate(\"122\")",
+ "QScriptValue(uint(124)) <=> QScriptValue(uint(124))",
+ "QScriptValue(uint(124)) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(uint(124)) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(uint(124)) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0) <=> QScriptValue(0)",
+ "QScriptValue(0) <=> QScriptValue(0.0)",
+ "QScriptValue(0) <=> QScriptValue(0, 0)",
+ "QScriptValue(0) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(0) <=> QScriptValue(engine, 0)",
+ "QScriptValue(0) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(0) <=> engine->evaluate(\"0\")",
+ "QScriptValue(0) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(0.0) <=> QScriptValue(0)",
+ "QScriptValue(0.0) <=> QScriptValue(0.0)",
+ "QScriptValue(0.0) <=> QScriptValue(0, 0)",
+ "QScriptValue(0.0) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(0.0) <=> QScriptValue(engine, 0)",
+ "QScriptValue(0.0) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(0.0) <=> engine->evaluate(\"0\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(123.0) <=> QScriptValue(123.0)",
+ "QScriptValue(123.0) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(123.0) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(123.0) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(6.37e-8) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(6.37e-8) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(-6.37e-8)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, -6.37e-8)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"-6.37e-8\")",
+ "QScriptValue(0x43211234) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0x43211234) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0x43211234) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0x43211234) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0x10000) <=> QScriptValue(0x10000)",
+ "QScriptValue(0x10000) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0x10000) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0x10000) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0x10001) <=> QScriptValue(0x10001)",
+ "QScriptValue(0x10001) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0x10001) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0x10001) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(qInf()) <=> QScriptValue(qInf())",
+ "QScriptValue(qInf()) <=> QScriptValue(0, qInf())",
+ "QScriptValue(qInf()) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(qInf()) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(-qInf()) <=> QScriptValue(-qInf())",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, -qInf())",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, -qInf())",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"-Infinity\")",
+ "QScriptValue(\"NaN\") <=> QScriptValue(\"NaN\")",
+ "QScriptValue(\"NaN\") <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(\"NaN\") <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(\"Infinity\") <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(\"Infinity\") <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(\"-Infinity\")",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(\"ciao\") <=> QScriptValue(\"ciao\")",
+ "QScriptValue(\"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(\"ciao\") <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(\"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(\"ciao\") <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(\"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(\"ciao\") <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(QString())",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, QString())",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString())",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"''\")",
+ "QScriptValue(QString()) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(QString()) <=> QScriptValue(QString())",
+ "QScriptValue(QString()) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(QString()) <=> QScriptValue(0, QString())",
+ "QScriptValue(QString()) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(QString()) <=> QScriptValue(engine, QString())",
+ "QScriptValue(QString()) <=> engine->evaluate(\"''\")",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")",
+ "QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")",
+ "QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->undefinedValue()",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"null\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->nullValue()",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->newQObject(0)",
+ "QScriptValue(0, true) <=> QScriptValue(true)",
+ "QScriptValue(0, true) <=> QScriptValue(0, true)",
+ "QScriptValue(0, true) <=> QScriptValue(engine, true)",
+ "QScriptValue(0, true) <=> engine->evaluate(\"true\")",
+ "QScriptValue(0, false) <=> QScriptValue(false)",
+ "QScriptValue(0, false) <=> QScriptValue(0, false)",
+ "QScriptValue(0, false) <=> QScriptValue(engine, false)",
+ "QScriptValue(0, false) <=> engine->evaluate(\"false\")",
+ "QScriptValue(0, int(122)) <=> QScriptValue(int(122))",
+ "QScriptValue(0, int(122)) <=> QScriptValue(0, int(122))",
+ "QScriptValue(0, int(122)) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(0, int(122)) <=> engine->evaluate(\"122\")",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(uint(124))",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0, uint(124)) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0, 0) <=> QScriptValue(0)",
+ "QScriptValue(0, 0) <=> QScriptValue(0.0)",
+ "QScriptValue(0, 0) <=> QScriptValue(0, 0)",
+ "QScriptValue(0, 0) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, 0)",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"0\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0.0)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, 0)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, 0)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"0\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(0, 123.0) <=> QScriptValue(123.0)",
+ "QScriptValue(0, 123.0) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0, 123.0) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0, 123.0) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(-6.37e-8)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"-6.37e-8\")",
+ "QScriptValue(0, 0x43211234) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, 0x43211234) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x43211234) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, 0x43211234) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, 0x10000) <=> QScriptValue(0x10000)",
+ "QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, 0x10000) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, 0x10001) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, 0x10001) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, qInf()) <=> QScriptValue(qInf())",
+ "QScriptValue(0, qInf()) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, qInf()) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, qInf()) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(-qInf())",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, -qInf())",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, -qInf())",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"-Infinity\")",
+ "QScriptValue(0, \"NaN\") <=> QScriptValue(\"NaN\")",
+ "QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(0, \"Infinity\") <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"-Infinity\")",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(0, \"ciao\") <=> QScriptValue(\"ciao\")",
+ "QScriptValue(0, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, \"ciao\") <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, \"ciao\") <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(0, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(QString())",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString())",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString())",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"''\")",
+ "QScriptValue(0, QString()) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(0, QString()) <=> QScriptValue(QString())",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, QString())",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, QString())",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"''\")",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")",
+ "QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")",
+ "QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->undefinedValue()",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"null\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->nullValue()",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->newQObject(0)",
+ "QScriptValue(engine, true) <=> QScriptValue(true)",
+ "QScriptValue(engine, true) <=> QScriptValue(0, true)",
+ "QScriptValue(engine, true) <=> QScriptValue(engine, true)",
+ "QScriptValue(engine, true) <=> engine->evaluate(\"true\")",
+ "QScriptValue(engine, false) <=> QScriptValue(false)",
+ "QScriptValue(engine, false) <=> QScriptValue(0, false)",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, false)",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"false\")",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(int(122))",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(0, int(122))",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(engine, int(122)) <=> engine->evaluate(\"122\")",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(uint(124))",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, uint(124)) <=> engine->evaluate(\"124\")",
+ "QScriptValue(engine, 0) <=> QScriptValue(0)",
+ "QScriptValue(engine, 0) <=> QScriptValue(0.0)",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, 0)",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"0\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0.0)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, 0)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"0\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(123.0)",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 123.0) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(-6.37e-8)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, -6.37e-8)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"-6.37e-8\")",
+ "QScriptValue(engine, 0x43211234) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, 0x43211234) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x43211234) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, 0x10000) <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0x10000) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, 0x10001) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, 0x10001) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, qInf()) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, qInf()) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, qInf()) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, qInf()) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(-qInf())",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, -qInf())",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -qInf())",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"-Infinity\")",
+ "QScriptValue(engine, \"NaN\") <=> QScriptValue(\"NaN\")",
+ "QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"-Infinity\")",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, \"ciao\") <=> QScriptValue(\"ciao\")",
+ "QScriptValue(engine, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, \"ciao\") <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(engine, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString())",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString())",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"''\")",
+ "QScriptValue(engine, QString()) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(QString())",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, QString())",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"''\")",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"[]\")",
+ "engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::UndefinedValue)",
+ "engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::UndefinedValue)",
+ "engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "engine->evaluate(\"{}\") <=> engine->evaluate(\"{}\")",
+ "engine->evaluate(\"{}\") <=> engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"{}\") <=> engine->undefinedValue()",
+ "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Date.prototype\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\") <=> engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\") <=> engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\") <=> engine->evaluate(\"False\")",
+ "engine->evaluate(\"undefined\") <=> QScriptValue(QScriptValue::UndefinedValue)",
+ "engine->evaluate(\"undefined\") <=> QScriptValue(0, QScriptValue::UndefinedValue)",
+ "engine->evaluate(\"undefined\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "engine->evaluate(\"undefined\") <=> engine->evaluate(\"{}\")",
+ "engine->evaluate(\"undefined\") <=> engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"undefined\") <=> engine->undefinedValue()",
+ "engine->evaluate(\"null\") <=> QScriptValue(QScriptValue::NullValue)",
+ "engine->evaluate(\"null\") <=> QScriptValue(0, QScriptValue::NullValue)",
+ "engine->evaluate(\"null\") <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "engine->evaluate(\"null\") <=> engine->evaluate(\"null\")",
+ "engine->evaluate(\"null\") <=> engine->nullValue()",
+ "engine->evaluate(\"null\") <=> engine->newQObject(0)",
+ "engine->evaluate(\"true\") <=> QScriptValue(true)",
+ "engine->evaluate(\"true\") <=> QScriptValue(0, true)",
+ "engine->evaluate(\"true\") <=> QScriptValue(engine, true)",
+ "engine->evaluate(\"true\") <=> engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\") <=> QScriptValue(false)",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, false)",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, false)",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"false\")",
+ "engine->evaluate(\"122\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"122\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"122\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"122\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"124\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"124\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"124\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"124\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\") <=> QScriptValue(0)",
+ "engine->evaluate(\"0\") <=> QScriptValue(0.0)",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, 0)",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, 0.0)",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, 0)",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, 0.0)",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"0\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0.0)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, 0)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, 0.0)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0.0)",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"0\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"123.0\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(6.37e-8)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 6.37e-8)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 6.37e-8)",
+ "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(-6.37e-8)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, -6.37e-8)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, -6.37e-8)",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"0x43211234\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"0x43211234\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"0x43211234\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"0x43211234\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"0x10000\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"0x10000\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"0x10000\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0x10001\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"0x10001\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"0x10001\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"0x10001\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"Infinity\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"Infinity\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"Infinity\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"Infinity\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(-qInf())",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, -qInf())",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, -qInf())",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"-Infinity\")",
+ "engine->evaluate(\"'ciao'\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"'ciao'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"'ciao'\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"'ciao'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"'ciao'\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"'ciao'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\") <=> QScriptValue(QString(\"\"))",
+ "engine->evaluate(\"''\") <=> QScriptValue(QString())",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"\"))",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, QString())",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"\"))",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, QString())",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"''\")",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(QString(\"0\"))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, QString(\"0\"))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->nullValue() <=> QScriptValue(QScriptValue::NullValue)",
+ "engine->nullValue() <=> QScriptValue(0, QScriptValue::NullValue)",
+ "engine->nullValue() <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "engine->nullValue() <=> engine->evaluate(\"null\")",
+ "engine->nullValue() <=> engine->nullValue()",
+ "engine->nullValue() <=> engine->newQObject(0)",
+ "engine->undefinedValue() <=> QScriptValue(QScriptValue::UndefinedValue)",
+ "engine->undefinedValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)",
+ "engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "engine->undefinedValue() <=> engine->evaluate(\"{}\")",
+ "engine->undefinedValue() <=> engine->evaluate(\"undefined\")",
+ "engine->undefinedValue() <=> engine->undefinedValue()",
+ "engine->newObject() <=> engine->newObject()",
+ "engine->newArray() <=> engine->newArray()",
+ "engine->newArray(10) <=> engine->newArray(10)",
+ "engine->newDate(QDateTime()) <=> engine->newDate(QDateTime())",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newVariant(QVariant()) <=> engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123)) <=> engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false)) <=> engine->newVariant(QVariant(false))",
+ "engine->newQObject(0) <=> QScriptValue(QScriptValue::NullValue)",
+ "engine->newQObject(0) <=> QScriptValue(0, QScriptValue::NullValue)",
+ "engine->newQObject(0) <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "engine->newQObject(0) <=> engine->evaluate(\"null\")",
+ "engine->newQObject(0) <=> engine->nullValue()",
+ "engine->newQObject(0) <=> engine->newQObject(0)",
+ "engine->newQObject(engine) <=> engine->newQObject(engine)",};
+
+void tst_QScriptValue::strictlyEquals_makeData(const char *expr)
+{
+ static QSet<QString> equals;
+ if (equals.isEmpty()) {
+ equals.reserve(523);
+ for (unsigned i = 0; i < 523; ++i)
+ equals.insert(strictlyEquals_array[i]);
+ }
+ QHash<QString, QScriptValue>::const_iterator it;
+ for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {
+ QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key());
+ newRow(tag.toLatin1()) << it.value() << equals.contains(tag);
+ }
+}
+
+void tst_QScriptValue::strictlyEquals_test(const char *, const QScriptValue& value)
+{
+ QFETCH(QScriptValue, other);
+ QFETCH(bool, expected);
+ QCOMPARE(value.strictlyEquals(other), expected);
+}
+
+DEFINE_TEST_FUNCTION(strictlyEquals)
+
+
+void tst_QScriptValue::lessThan_initData()
+{
+ QTest::addColumn<QScriptValue>("other");
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString lessThan_array [] = {
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(true)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(int(122))",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(uint(124))",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(123.0)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x43211234)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x10000)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x10001)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(qInf())",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, true)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, int(122))",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, qInf())",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, true)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"true\")",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"122\")",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"124\")",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(true) <=> QScriptValue(int(122))",
+ "QScriptValue(true) <=> QScriptValue(uint(124))",
+ "QScriptValue(true) <=> QScriptValue(123.0)",
+ "QScriptValue(true) <=> QScriptValue(0x43211234)",
+ "QScriptValue(true) <=> QScriptValue(0x10000)",
+ "QScriptValue(true) <=> QScriptValue(0x10001)",
+ "QScriptValue(true) <=> QScriptValue(qInf())",
+ "QScriptValue(true) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(true) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(true) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(true) <=> QScriptValue(0, int(122))",
+ "QScriptValue(true) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(true) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(true) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(true) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(true) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(true) <=> QScriptValue(0, qInf())",
+ "QScriptValue(true) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(true) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(true) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(true) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(true) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(true) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(true) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(true) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(true) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(true) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(true) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(true) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(true) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(true) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(true) <=> engine->evaluate(\"122\")",
+ "QScriptValue(true) <=> engine->evaluate(\"124\")",
+ "QScriptValue(true) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(true) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(true) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(true) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(true) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(true) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(true) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(true) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(false) <=> QScriptValue(true)",
+ "QScriptValue(false) <=> QScriptValue(int(122))",
+ "QScriptValue(false) <=> QScriptValue(uint(124))",
+ "QScriptValue(false) <=> QScriptValue(123.0)",
+ "QScriptValue(false) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(false) <=> QScriptValue(0x43211234)",
+ "QScriptValue(false) <=> QScriptValue(0x10000)",
+ "QScriptValue(false) <=> QScriptValue(0x10001)",
+ "QScriptValue(false) <=> QScriptValue(qInf())",
+ "QScriptValue(false) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(false) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(false) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(false) <=> QScriptValue(0, true)",
+ "QScriptValue(false) <=> QScriptValue(0, int(122))",
+ "QScriptValue(false) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(false) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(false) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(false) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(false) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(false) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(false) <=> QScriptValue(0, qInf())",
+ "QScriptValue(false) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(false) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(false) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(false) <=> QScriptValue(engine, true)",
+ "QScriptValue(false) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(false) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(false) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(false) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(false) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(false) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(false) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(false) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(false) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(false) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(false) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(false) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(false) <=> engine->evaluate(\"true\")",
+ "QScriptValue(false) <=> engine->evaluate(\"122\")",
+ "QScriptValue(false) <=> engine->evaluate(\"124\")",
+ "QScriptValue(false) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(false) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(false) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(false) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(false) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(false) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(false) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(false) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(false) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(int(122)) <=> QScriptValue(uint(124))",
+ "QScriptValue(int(122)) <=> QScriptValue(123.0)",
+ "QScriptValue(int(122)) <=> QScriptValue(0x43211234)",
+ "QScriptValue(int(122)) <=> QScriptValue(0x10000)",
+ "QScriptValue(int(122)) <=> QScriptValue(0x10001)",
+ "QScriptValue(int(122)) <=> QScriptValue(qInf())",
+ "QScriptValue(int(122)) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(int(122)) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(int(122)) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(int(122)) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(int(122)) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(int(122)) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(int(122)) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(int(122)) <=> QScriptValue(0, qInf())",
+ "QScriptValue(int(122)) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(int(122)) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(int(122)) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(int(122)) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(int(122)) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(int(122)) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(int(122)) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(int(122)) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(int(122)) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(int(122)) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(int(122)) <=> engine->evaluate(\"124\")",
+ "QScriptValue(int(122)) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(int(122)) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(int(122)) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(int(122)) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(int(122)) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(int(122)) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(int(122)) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(uint(124)) <=> QScriptValue(0x43211234)",
+ "QScriptValue(uint(124)) <=> QScriptValue(0x10000)",
+ "QScriptValue(uint(124)) <=> QScriptValue(0x10001)",
+ "QScriptValue(uint(124)) <=> QScriptValue(qInf())",
+ "QScriptValue(uint(124)) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(uint(124)) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(uint(124)) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(uint(124)) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(uint(124)) <=> QScriptValue(0, qInf())",
+ "QScriptValue(uint(124)) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(uint(124)) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(uint(124)) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(uint(124)) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(uint(124)) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(uint(124)) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(uint(124)) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(uint(124)) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(uint(124)) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(uint(124)) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0) <=> QScriptValue(true)",
+ "QScriptValue(0) <=> QScriptValue(int(122))",
+ "QScriptValue(0) <=> QScriptValue(uint(124))",
+ "QScriptValue(0) <=> QScriptValue(123.0)",
+ "QScriptValue(0) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(0) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0) <=> QScriptValue(0x10000)",
+ "QScriptValue(0) <=> QScriptValue(0x10001)",
+ "QScriptValue(0) <=> QScriptValue(qInf())",
+ "QScriptValue(0) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0) <=> QScriptValue(0, true)",
+ "QScriptValue(0) <=> QScriptValue(0, int(122))",
+ "QScriptValue(0) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(0) <=> QScriptValue(engine, true)",
+ "QScriptValue(0) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(0) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(0) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(0) <=> engine->evaluate(\"true\")",
+ "QScriptValue(0) <=> engine->evaluate(\"122\")",
+ "QScriptValue(0) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(0) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(0) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(0.0) <=> QScriptValue(true)",
+ "QScriptValue(0.0) <=> QScriptValue(int(122))",
+ "QScriptValue(0.0) <=> QScriptValue(uint(124))",
+ "QScriptValue(0.0) <=> QScriptValue(123.0)",
+ "QScriptValue(0.0) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(0.0) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0.0) <=> QScriptValue(0x10000)",
+ "QScriptValue(0.0) <=> QScriptValue(0x10001)",
+ "QScriptValue(0.0) <=> QScriptValue(qInf())",
+ "QScriptValue(0.0) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0.0) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0.0) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0.0) <=> QScriptValue(0, true)",
+ "QScriptValue(0.0) <=> QScriptValue(0, int(122))",
+ "QScriptValue(0.0) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0.0) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0.0) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0.0) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0.0) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0.0) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0.0) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0.0) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0.0) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0.0) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(0.0) <=> QScriptValue(engine, true)",
+ "QScriptValue(0.0) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(0.0) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0.0) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0.0) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(0.0) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0.0) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0.0) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0.0) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0.0) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0.0) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0.0) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0.0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"true\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"122\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(0.0) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(123.0) <=> QScriptValue(uint(124))",
+ "QScriptValue(123.0) <=> QScriptValue(0x43211234)",
+ "QScriptValue(123.0) <=> QScriptValue(0x10000)",
+ "QScriptValue(123.0) <=> QScriptValue(0x10001)",
+ "QScriptValue(123.0) <=> QScriptValue(qInf())",
+ "QScriptValue(123.0) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(123.0) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(123.0) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(123.0) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(123.0) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(123.0) <=> QScriptValue(0, qInf())",
+ "QScriptValue(123.0) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(123.0) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(123.0) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(123.0) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(123.0) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(123.0) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(123.0) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(123.0) <=> engine->evaluate(\"124\")",
+ "QScriptValue(123.0) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(123.0) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(123.0) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(123.0) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(6.37e-8) <=> QScriptValue(true)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(int(122))",
+ "QScriptValue(6.37e-8) <=> QScriptValue(uint(124))",
+ "QScriptValue(6.37e-8) <=> QScriptValue(123.0)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(0x43211234)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(0x10000)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(0x10001)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(qInf())",
+ "QScriptValue(6.37e-8) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(6.37e-8) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(6.37e-8) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(6.37e-8) <=> QScriptValue(0, true)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(0, int(122))",
+ "QScriptValue(6.37e-8) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(6.37e-8) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(0, qInf())",
+ "QScriptValue(6.37e-8) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(6.37e-8) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(6.37e-8) <=> QScriptValue(engine, true)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(6.37e-8) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(6.37e-8) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(6.37e-8) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(6.37e-8) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(6.37e-8) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(6.37e-8) <=> engine->evaluate(\"true\")",
+ "QScriptValue(6.37e-8) <=> engine->evaluate(\"122\")",
+ "QScriptValue(6.37e-8) <=> engine->evaluate(\"124\")",
+ "QScriptValue(6.37e-8) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(6.37e-8) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(6.37e-8) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(6.37e-8) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(6.37e-8) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(6.37e-8) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(6.37e-8) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(6.37e-8) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(true)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(false)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(int(122))",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(uint(124))",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0.0)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(123.0)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0x43211234)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0x10000)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0x10001)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(qInf())",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(QString())",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, true)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, false)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, int(122))",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, 0)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, qInf())",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, QString())",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, true)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, false)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString())",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"null\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"true\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"false\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"122\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"124\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"0\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"''\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(-6.37e-8) <=> engine->nullValue()",
+ "QScriptValue(-6.37e-8) <=> engine->newArray()",
+ "QScriptValue(-6.37e-8) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(-6.37e-8) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(-6.37e-8) <=> engine->newQObject(0)",
+ "QScriptValue(0x43211234) <=> QScriptValue(qInf())",
+ "QScriptValue(0x43211234) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0x43211234) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0x43211234) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0x43211234) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0x43211234) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0x43211234) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0x10000) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0x10000) <=> QScriptValue(0x10001)",
+ "QScriptValue(0x10000) <=> QScriptValue(qInf())",
+ "QScriptValue(0x10000) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0x10000) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0x10000) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0x10000) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0x10000) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0x10000) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0x10000) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0x10000) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0x10000) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0x10000) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0x10000) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0x10000) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0x10001) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0x10001) <=> QScriptValue(qInf())",
+ "QScriptValue(0x10001) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0x10001) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0x10001) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0x10001) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0x10001) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0x10001) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0x10001) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0x10001) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0x10001) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(-qInf()) <=> QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(-qInf()) <=> QScriptValue(true)",
+ "QScriptValue(-qInf()) <=> QScriptValue(false)",
+ "QScriptValue(-qInf()) <=> QScriptValue(int(122))",
+ "QScriptValue(-qInf()) <=> QScriptValue(uint(124))",
+ "QScriptValue(-qInf()) <=> QScriptValue(0)",
+ "QScriptValue(-qInf()) <=> QScriptValue(0.0)",
+ "QScriptValue(-qInf()) <=> QScriptValue(123.0)",
+ "QScriptValue(-qInf()) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(-qInf()) <=> QScriptValue(-6.37e-8)",
+ "QScriptValue(-qInf()) <=> QScriptValue(0x43211234)",
+ "QScriptValue(-qInf()) <=> QScriptValue(0x10000)",
+ "QScriptValue(-qInf()) <=> QScriptValue(0x10001)",
+ "QScriptValue(-qInf()) <=> QScriptValue(qInf())",
+ "QScriptValue(-qInf()) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(-qInf()) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(-qInf()) <=> QScriptValue(QString())",
+ "QScriptValue(-qInf()) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(-qInf()) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(-qInf()) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, true)",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, false)",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, int(122))",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, 0)",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, -6.37e-8)",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, qInf())",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, QString())",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, true)",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, false)",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, 0)",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, QString())",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"null\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"true\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"false\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"122\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"124\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"0\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"-6.37e-8\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"''\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(-qInf()) <=> engine->nullValue()",
+ "QScriptValue(-qInf()) <=> engine->newArray()",
+ "QScriptValue(-qInf()) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(-qInf()) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(-qInf()) <=> engine->newQObject(0)",
+ "QScriptValue(\"NaN\") <=> QScriptValue(\"ciao\")",
+ "QScriptValue(\"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(\"NaN\") <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(\"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(\"NaN\") <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(\"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(\"NaN\") <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(\"NaN\") <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(\"NaN\") <=> engine->evaluate(\"Object\")",
+ "QScriptValue(\"NaN\") <=> engine->evaluate(\"Array\")",
+ "QScriptValue(\"NaN\") <=> engine->evaluate(\"Number\")",
+ "QScriptValue(\"NaN\") <=> engine->evaluate(\"Function\")",
+ "QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(\"NaN\") <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(\"NaN\") <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(\"NaN\") <=> engine->evaluate(\"Null\")",
+ "QScriptValue(\"NaN\") <=> engine->evaluate(\"True\")",
+ "QScriptValue(\"NaN\") <=> engine->evaluate(\"False\")",
+ "QScriptValue(\"NaN\") <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(\"NaN\") <=> engine->newObject()",
+ "QScriptValue(\"NaN\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(\"NaN\") <=> engine->newQObject(engine)",
+ "QScriptValue(\"Infinity\") <=> QScriptValue(\"NaN\")",
+ "QScriptValue(\"Infinity\") <=> QScriptValue(\"ciao\")",
+ "QScriptValue(\"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(\"Infinity\") <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(\"Infinity\") <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(\"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(\"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(\"Infinity\") <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(\"Infinity\") <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(\"Infinity\") <=> engine->evaluate(\"Object\")",
+ "QScriptValue(\"Infinity\") <=> engine->evaluate(\"Array\")",
+ "QScriptValue(\"Infinity\") <=> engine->evaluate(\"Number\")",
+ "QScriptValue(\"Infinity\") <=> engine->evaluate(\"Function\")",
+ "QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(\"Infinity\") <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(\"Infinity\") <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(\"Infinity\") <=> engine->evaluate(\"Null\")",
+ "QScriptValue(\"Infinity\") <=> engine->evaluate(\"True\")",
+ "QScriptValue(\"Infinity\") <=> engine->evaluate(\"False\")",
+ "QScriptValue(\"Infinity\") <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(\"Infinity\") <=> engine->newObject()",
+ "QScriptValue(\"Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(\"Infinity\") <=> engine->newQObject(engine)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(true)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(false)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(int(122))",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(uint(124))",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0.0)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(123.0)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(6.37e-8)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(-6.37e-8)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0x43211234)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0x10000)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0x10001)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(qInf())",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(\"NaN\")",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(\"ciao\")",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, true)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, false)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, int(122))",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, uint(124))",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0.0)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, 123.0)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, -6.37e-8)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, qInf())",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, true)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, false)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, int(122))",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, qInf())",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Error.prototype\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Object\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Array\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Number\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Function\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"/foo/\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Null\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"True\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"False\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"null\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"true\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"false\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"122\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"124\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"-6.37e-8\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(\"-Infinity\") <=> engine->nullValue()",
+ "QScriptValue(\"-Infinity\") <=> engine->newObject()",
+ "QScriptValue(\"-Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(\"-Infinity\") <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(\"-Infinity\") <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(\"-Infinity\") <=> engine->newQObject(0)",
+ "QScriptValue(\"-Infinity\") <=> engine->newQObject(engine)",
+ "QScriptValue(\"ciao\") <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(\"ciao\") <=> engine->evaluate(\"Object\")",
+ "QScriptValue(\"ciao\") <=> engine->evaluate(\"Array\")",
+ "QScriptValue(\"ciao\") <=> engine->evaluate(\"Number\")",
+ "QScriptValue(\"ciao\") <=> engine->evaluate(\"Function\")",
+ "QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(true)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(int(122))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(uint(124))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(123.0)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0x43211234)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0x10000)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0x10001)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(qInf())",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(\"NaN\")",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(\"-Infinity\")",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, true)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, int(122))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, qInf())",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, true)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Error.prototype\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Object\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Array\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Number\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Function\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"/foo/\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Null\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"True\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"False\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"true\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"122\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"124\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(QString(\"\")) <=> engine->newObject()",
+ "QScriptValue(QString(\"\")) <=> engine->newArray(10)",
+ "QScriptValue(QString(\"\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(QString(\"\")) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(QString(\"\")) <=> engine->newQObject(engine)",
+ "QScriptValue(QString()) <=> QScriptValue(true)",
+ "QScriptValue(QString()) <=> QScriptValue(int(122))",
+ "QScriptValue(QString()) <=> QScriptValue(uint(124))",
+ "QScriptValue(QString()) <=> QScriptValue(123.0)",
+ "QScriptValue(QString()) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(QString()) <=> QScriptValue(0x43211234)",
+ "QScriptValue(QString()) <=> QScriptValue(0x10000)",
+ "QScriptValue(QString()) <=> QScriptValue(0x10001)",
+ "QScriptValue(QString()) <=> QScriptValue(qInf())",
+ "QScriptValue(QString()) <=> QScriptValue(\"NaN\")",
+ "QScriptValue(QString()) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(QString()) <=> QScriptValue(\"-Infinity\")",
+ "QScriptValue(QString()) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString()) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString()) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString()) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(QString()) <=> QScriptValue(0, true)",
+ "QScriptValue(QString()) <=> QScriptValue(0, int(122))",
+ "QScriptValue(QString()) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(QString()) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(QString()) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(QString()) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(QString()) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(QString()) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(QString()) <=> QScriptValue(0, qInf())",
+ "QScriptValue(QString()) <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(QString()) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(QString()) <=> QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(QString()) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString()) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(QString()) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(QString()) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(QString()) <=> QScriptValue(engine, true)",
+ "QScriptValue(QString()) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(QString()) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(QString()) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(QString()) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(QString()) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(QString()) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(QString()) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(QString()) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(QString()) <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(QString()) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(QString()) <=> QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(QString()) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString()) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(QString()) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(QString()) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(QString()) <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"Error.prototype\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"Object\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"Array\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"Number\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"Function\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"/foo/\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"Null\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"True\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"False\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"true\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"122\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"124\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(QString()) <=> engine->newObject()",
+ "QScriptValue(QString()) <=> engine->newArray(10)",
+ "QScriptValue(QString()) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(QString()) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(QString()) <=> engine->newQObject(engine)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(true)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(int(122))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(uint(124))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(123.0)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0x43211234)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0x10000)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0x10001)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(qInf())",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(\"NaN\")",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, true)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, int(122))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, qInf())",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, true)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Object\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Array\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Number\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Function\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Null\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"True\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"False\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"true\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"122\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"124\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(QString(\"0\")) <=> engine->newObject()",
+ "QScriptValue(QString(\"0\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(QString(\"0\")) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(QString(\"0\")) <=> engine->newQObject(engine)",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(uint(124))",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(0x43211234)",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(0x10000)",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(0x10001)",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(qInf())",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(\"NaN\")",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(0, qInf())",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Object\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Array\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Number\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Function\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Null\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"True\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"False\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"124\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(QString(\"123\")) <=> engine->newObject()",
+ "QScriptValue(QString(\"123\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(QString(\"123\")) <=> engine->newQObject(engine)",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(int(122))",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(uint(124))",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(123.0)",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x43211234)",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x10000)",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x10001)",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(qInf())",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"NaN\")",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, int(122))",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, qInf())",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Error.prototype\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Object\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Array\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Number\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Function\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Null\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"True\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"False\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"122\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"124\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->newObject()",
+ "QScriptValue(QString(\"12.4\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(QString(\"12.4\")) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(QString(\"12.4\")) <=> engine->newQObject(engine)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(true)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(int(122))",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(uint(124))",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(123.0)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x10000)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(qInf())",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, true)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, int(122))",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, true)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"true\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"122\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(0, true) <=> QScriptValue(int(122))",
+ "QScriptValue(0, true) <=> QScriptValue(uint(124))",
+ "QScriptValue(0, true) <=> QScriptValue(123.0)",
+ "QScriptValue(0, true) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, true) <=> QScriptValue(0x10000)",
+ "QScriptValue(0, true) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, true) <=> QScriptValue(qInf())",
+ "QScriptValue(0, true) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, true) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0, true) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, true) <=> QScriptValue(0, int(122))",
+ "QScriptValue(0, true) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0, true) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0, true) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, true) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, true) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, true) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, true) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, true) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, true) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(0, true) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(0, true) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0, true) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0, true) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, true) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, true) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, true) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, true) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, true) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, true) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0, true) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(0, true) <=> engine->evaluate(\"122\")",
+ "QScriptValue(0, true) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0, true) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0, true) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, true) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, true) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, true) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, true) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0, true) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(0, true) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(0, false) <=> QScriptValue(true)",
+ "QScriptValue(0, false) <=> QScriptValue(int(122))",
+ "QScriptValue(0, false) <=> QScriptValue(uint(124))",
+ "QScriptValue(0, false) <=> QScriptValue(123.0)",
+ "QScriptValue(0, false) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(0, false) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, false) <=> QScriptValue(0x10000)",
+ "QScriptValue(0, false) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, false) <=> QScriptValue(qInf())",
+ "QScriptValue(0, false) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, false) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0, false) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, false) <=> QScriptValue(0, true)",
+ "QScriptValue(0, false) <=> QScriptValue(0, int(122))",
+ "QScriptValue(0, false) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0, false) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0, false) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, false) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, false) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, false) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, false) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, false) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, false) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, false) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(0, false) <=> QScriptValue(engine, true)",
+ "QScriptValue(0, false) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(0, false) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0, false) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0, false) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(0, false) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, false) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, false) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, false) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, false) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, false) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, false) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0, false) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"true\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"122\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(0, false) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(0, int(122)) <=> QScriptValue(uint(124))",
+ "QScriptValue(0, int(122)) <=> QScriptValue(123.0)",
+ "QScriptValue(0, int(122)) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, int(122)) <=> QScriptValue(0x10000)",
+ "QScriptValue(0, int(122)) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, int(122)) <=> QScriptValue(qInf())",
+ "QScriptValue(0, int(122)) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, int(122)) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0, int(122)) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0, int(122)) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0, int(122)) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, int(122)) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, int(122)) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, int(122)) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, int(122)) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, int(122)) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, int(122)) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0, int(122)) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, int(122)) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, int(122)) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, int(122)) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, int(122)) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0, int(122)) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0, int(122)) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, int(122)) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, int(122)) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, int(122)) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, int(122)) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0, int(122)) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(0x10000)",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(qInf())",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, uint(124)) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, uint(124)) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, uint(124)) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, uint(124)) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, uint(124)) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, 0) <=> QScriptValue(true)",
+ "QScriptValue(0, 0) <=> QScriptValue(int(122))",
+ "QScriptValue(0, 0) <=> QScriptValue(uint(124))",
+ "QScriptValue(0, 0) <=> QScriptValue(123.0)",
+ "QScriptValue(0, 0) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(0, 0) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, 0) <=> QScriptValue(0x10000)",
+ "QScriptValue(0, 0) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, 0) <=> QScriptValue(qInf())",
+ "QScriptValue(0, 0) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, 0) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0, 0) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, 0) <=> QScriptValue(0, true)",
+ "QScriptValue(0, 0) <=> QScriptValue(0, int(122))",
+ "QScriptValue(0, 0) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0, 0) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0, 0) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, 0) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, 0) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, 0) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, 0) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, 0) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, true)",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"true\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"122\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(0, 0) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(0, 0.0) <=> QScriptValue(true)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(int(122))",
+ "QScriptValue(0, 0.0) <=> QScriptValue(uint(124))",
+ "QScriptValue(0, 0.0) <=> QScriptValue(123.0)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0x10000)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(qInf())",
+ "QScriptValue(0, 0.0) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, 0.0) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0, 0.0) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, true)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, int(122))",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, true)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"true\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"122\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(0, 0.0) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(0, 123.0) <=> QScriptValue(uint(124))",
+ "QScriptValue(0, 123.0) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, 123.0) <=> QScriptValue(0x10000)",
+ "QScriptValue(0, 123.0) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, 123.0) <=> QScriptValue(qInf())",
+ "QScriptValue(0, 123.0) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, 123.0) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0, 123.0) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 123.0) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 123.0) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, 123.0) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, 123.0) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, 123.0) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, 123.0) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, 123.0) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, 123.0) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0, 123.0) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, 123.0) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, 123.0) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, 123.0) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(true)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(int(122))",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(uint(124))",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(123.0)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(0x10000)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(qInf())",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, true)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, int(122))",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, true)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"true\")",
+ "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"122\")",
+ "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(0, 6.37e-8) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(true)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(false)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(int(122))",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(uint(124))",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0.0)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(123.0)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0x10000)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(qInf())",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(QString())",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, true)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, false)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, int(122))",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString())",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, true)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, false)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString())",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"null\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"true\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"false\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"122\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"''\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->nullValue()",
+ "QScriptValue(0, -6.37e-8) <=> engine->newArray()",
+ "QScriptValue(0, -6.37e-8) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(0, -6.37e-8) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(0, -6.37e-8) <=> engine->newQObject(0)",
+ "QScriptValue(0, 0x43211234) <=> QScriptValue(qInf())",
+ "QScriptValue(0, 0x43211234) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, 0x43211234) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, 0x43211234) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, 0x43211234) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, 0x43211234) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, 0x43211234) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, 0x10000) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, 0x10000) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, 0x10000) <=> QScriptValue(qInf())",
+ "QScriptValue(0, 0x10000) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, 0x10000) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, 0x10000) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, 0x10000) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, 0x10000) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, 0x10000) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, 0x10000) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, 0x10000) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, 0x10001) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, 0x10001) <=> QScriptValue(qInf())",
+ "QScriptValue(0, 0x10001) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x10001) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, 0x10001) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, 0x10001) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, 0x10001) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, 0x10001) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, 0x10001) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(true)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(false)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(int(122))",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(uint(124))",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0.0)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(123.0)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(-6.37e-8)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0x10000)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(qInf())",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(QString())",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, true)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, false)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, int(122))",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, 0)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, QString())",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, true)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, false)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString())",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"null\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"true\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"false\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"122\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"0\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"-6.37e-8\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"''\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(0, -qInf()) <=> engine->nullValue()",
+ "QScriptValue(0, -qInf()) <=> engine->newArray()",
+ "QScriptValue(0, -qInf()) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(0, -qInf()) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(0, -qInf()) <=> engine->newQObject(0)",
+ "QScriptValue(0, \"NaN\") <=> QScriptValue(\"ciao\")",
+ "QScriptValue(0, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, \"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(0, \"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Object\")",
+ "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Array\")",
+ "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Number\")",
+ "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Function\")",
+ "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Null\")",
+ "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"True\")",
+ "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"False\")",
+ "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(0, \"NaN\") <=> engine->newObject()",
+ "QScriptValue(0, \"NaN\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(0, \"NaN\") <=> engine->newQObject(engine)",
+ "QScriptValue(0, \"Infinity\") <=> QScriptValue(\"NaN\")",
+ "QScriptValue(0, \"Infinity\") <=> QScriptValue(\"ciao\")",
+ "QScriptValue(0, \"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, \"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Object\")",
+ "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Array\")",
+ "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Number\")",
+ "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Function\")",
+ "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Null\")",
+ "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"True\")",
+ "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"False\")",
+ "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(0, \"Infinity\") <=> engine->newObject()",
+ "QScriptValue(0, \"Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(0, \"Infinity\") <=> engine->newQObject(engine)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(true)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(false)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(int(122))",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(uint(124))",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0.0)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(123.0)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(6.37e-8)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(-6.37e-8)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x10000)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x10001)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(qInf())",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"NaN\")",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"ciao\")",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, true)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, false)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, int(122))",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0.0)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, true)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, false)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, int(122))",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Error.prototype\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Object\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Array\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Number\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Function\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"/foo/\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Null\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"True\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"False\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"null\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"true\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"false\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"122\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"124\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"-6.37e-8\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->nullValue()",
+ "QScriptValue(0, \"-Infinity\") <=> engine->newObject()",
+ "QScriptValue(0, \"-Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(0, \"-Infinity\") <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(0, \"-Infinity\") <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(0, \"-Infinity\") <=> engine->newQObject(0)",
+ "QScriptValue(0, \"-Infinity\") <=> engine->newQObject(engine)",
+ "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Object\")",
+ "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Array\")",
+ "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Number\")",
+ "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Function\")",
+ "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(true)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(int(122))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(uint(124))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(123.0)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0x10000)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(qInf())",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(\"NaN\")",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(\"-Infinity\")",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, true)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, int(122))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, true)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Error.prototype\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Object\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Array\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Number\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Function\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"/foo/\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Null\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"True\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"False\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"true\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"122\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->newObject()",
+ "QScriptValue(0, QString(\"\")) <=> engine->newArray(10)",
+ "QScriptValue(0, QString(\"\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(0, QString(\"\")) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(0, QString(\"\")) <=> engine->newQObject(engine)",
+ "QScriptValue(0, QString()) <=> QScriptValue(true)",
+ "QScriptValue(0, QString()) <=> QScriptValue(int(122))",
+ "QScriptValue(0, QString()) <=> QScriptValue(uint(124))",
+ "QScriptValue(0, QString()) <=> QScriptValue(123.0)",
+ "QScriptValue(0, QString()) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(0, QString()) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, QString()) <=> QScriptValue(0x10000)",
+ "QScriptValue(0, QString()) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, QString()) <=> QScriptValue(qInf())",
+ "QScriptValue(0, QString()) <=> QScriptValue(\"NaN\")",
+ "QScriptValue(0, QString()) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, QString()) <=> QScriptValue(\"-Infinity\")",
+ "QScriptValue(0, QString()) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(0, QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString()) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(0, QString()) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0, QString()) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, true)",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, int(122))",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, true)",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"Error.prototype\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"Object\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"Array\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"Number\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"Function\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"/foo/\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"Null\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"True\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"False\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"true\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"122\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(0, QString()) <=> engine->newObject()",
+ "QScriptValue(0, QString()) <=> engine->newArray(10)",
+ "QScriptValue(0, QString()) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(0, QString()) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(0, QString()) <=> engine->newQObject(engine)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(true)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(int(122))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(uint(124))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(123.0)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x10000)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(qInf())",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"NaN\")",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, true)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, int(122))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, true)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Object\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Array\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Number\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Function\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Null\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"True\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"False\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"true\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"122\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->newObject()",
+ "QScriptValue(0, QString(\"0\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(0, QString(\"0\")) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(0, QString(\"0\")) <=> engine->newQObject(engine)",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(uint(124))",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x10000)",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(qInf())",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"NaN\")",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Object\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Array\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Number\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Function\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Null\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"True\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"False\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->newObject()",
+ "QScriptValue(0, QString(\"123\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(0, QString(\"123\")) <=> engine->newQObject(engine)",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(int(122))",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(uint(124))",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(123.0)",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x43211234)",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x10000)",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x10001)",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(qInf())",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"NaN\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, int(122))",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, qInf())",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Error.prototype\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Object\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Array\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Number\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Function\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Null\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"True\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"False\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"122\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"124\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->newObject()",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->newQObject(engine)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(true)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(int(122))",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(uint(124))",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(123.0)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, true)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, int(122))",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, true)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"true\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"122\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"124\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(engine, true) <=> QScriptValue(int(122))",
+ "QScriptValue(engine, true) <=> QScriptValue(uint(124))",
+ "QScriptValue(engine, true) <=> QScriptValue(123.0)",
+ "QScriptValue(engine, true) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, true) <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, true) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, true) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, true) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, true) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(engine, true) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(engine, true) <=> QScriptValue(0, int(122))",
+ "QScriptValue(engine, true) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(engine, true) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(engine, true) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, true) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, true) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, true) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, true) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, true) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(engine, true) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, true) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(engine, true) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, true) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, true) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, true) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, true) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, true) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, true) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, true) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, true) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(engine, true) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(engine, true) <=> engine->evaluate(\"122\")",
+ "QScriptValue(engine, true) <=> engine->evaluate(\"124\")",
+ "QScriptValue(engine, true) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(engine, true) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, true) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, true) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, true) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, true) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(engine, true) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(engine, true) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(engine, false) <=> QScriptValue(true)",
+ "QScriptValue(engine, false) <=> QScriptValue(int(122))",
+ "QScriptValue(engine, false) <=> QScriptValue(uint(124))",
+ "QScriptValue(engine, false) <=> QScriptValue(123.0)",
+ "QScriptValue(engine, false) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(engine, false) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, false) <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, false) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, false) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, false) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, false) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(engine, false) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(engine, false) <=> QScriptValue(0, true)",
+ "QScriptValue(engine, false) <=> QScriptValue(0, int(122))",
+ "QScriptValue(engine, false) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(engine, false) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(engine, false) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(engine, false) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, false) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, false) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, false) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, false) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, false) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(engine, false) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, true)",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"true\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"122\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"124\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(engine, false) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(uint(124))",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(123.0)",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, int(122)) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, int(122)) <=> engine->evaluate(\"124\")",
+ "QScriptValue(engine, int(122)) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(engine, int(122)) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, int(122)) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, int(122)) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, int(122)) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, int(122)) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(engine, int(122)) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, uint(124)) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, uint(124)) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, uint(124)) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, uint(124)) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, uint(124)) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, 0) <=> QScriptValue(true)",
+ "QScriptValue(engine, 0) <=> QScriptValue(int(122))",
+ "QScriptValue(engine, 0) <=> QScriptValue(uint(124))",
+ "QScriptValue(engine, 0) <=> QScriptValue(123.0)",
+ "QScriptValue(engine, 0) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(engine, 0) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, 0) <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, 0) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, 0) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, 0) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, 0) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(engine, 0) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, true)",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, int(122))",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, true)",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"true\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"122\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"124\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(engine, 0) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(true)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(int(122))",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(uint(124))",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(123.0)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, true)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, int(122))",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, true)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"true\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"122\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"124\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(engine, 0.0) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(uint(124))",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, 123.0) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, 123.0) <=> engine->evaluate(\"124\")",
+ "QScriptValue(engine, 123.0) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, 123.0) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, 123.0) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, 123.0) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(true)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(int(122))",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(uint(124))",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(123.0)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, true)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, int(122))",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, true)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"true\")",
+ "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"122\")",
+ "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"124\")",
+ "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(engine, 6.37e-8) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(true)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(false)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(int(122))",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(uint(124))",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0.0)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(123.0)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString())",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, true)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, false)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, int(122))",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString())",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, true)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, false)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString())",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"null\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"true\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"false\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"122\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"124\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"''\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->nullValue()",
+ "QScriptValue(engine, -6.37e-8) <=> engine->newArray()",
+ "QScriptValue(engine, -6.37e-8) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(engine, -6.37e-8) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(engine, -6.37e-8) <=> engine->newQObject(0)",
+ "QScriptValue(engine, 0x43211234) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, 0x43211234) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, 0x43211234) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, 0x43211234) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, 0x43211234) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, 0x10000) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, 0x10000) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, 0x10000) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, 0x10000) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, 0x10000) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, 0x10000) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, 0x10000) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, 0x10000) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, 0x10000) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, 0x10000) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, 0x10000) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, 0x10001) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, 0x10001) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, 0x10001) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, 0x10001) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, 0x10001) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x10001) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, 0x10001) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, 0x10001) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, 0x10001) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(true)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(false)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(int(122))",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(uint(124))",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0.0)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(123.0)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(-6.37e-8)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"\"))",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(QString())",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, true)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, false)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, int(122))",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0.0)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, -6.37e-8)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"\"))",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString())",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, true)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, false)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString())",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"[]\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"Array.prototype\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"null\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"true\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"false\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"122\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"124\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"-6.37e-8\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"''\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(engine, -qInf()) <=> engine->nullValue()",
+ "QScriptValue(engine, -qInf()) <=> engine->newArray()",
+ "QScriptValue(engine, -qInf()) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(engine, -qInf()) <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(engine, -qInf()) <=> engine->newQObject(0)",
+ "QScriptValue(engine, \"NaN\") <=> QScriptValue(\"ciao\")",
+ "QScriptValue(engine, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(engine, \"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Object\")",
+ "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Array\")",
+ "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Number\")",
+ "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Function\")",
+ "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Null\")",
+ "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"True\")",
+ "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"False\")",
+ "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(engine, \"NaN\") <=> engine->newObject()",
+ "QScriptValue(engine, \"NaN\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(engine, \"NaN\") <=> engine->newQObject(engine)",
+ "QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"NaN\")",
+ "QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"ciao\")",
+ "QScriptValue(engine, \"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Object\")",
+ "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Array\")",
+ "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Number\")",
+ "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Function\")",
+ "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Null\")",
+ "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"True\")",
+ "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"False\")",
+ "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(engine, \"Infinity\") <=> engine->newObject()",
+ "QScriptValue(engine, \"Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(engine, \"Infinity\") <=> engine->newQObject(engine)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(true)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(false)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(int(122))",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(uint(124))",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0.0)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(123.0)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(6.37e-8)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(-6.37e-8)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(qInf())",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"NaN\")",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"ciao\")",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, true)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, false)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, int(122))",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, uint(124))",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0.0)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 123.0)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, -6.37e-8)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, true)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, false)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, int(122))",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Error.prototype\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Object\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Array\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Number\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Function\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"/foo/\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Null\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"True\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"False\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"null\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"true\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"false\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"122\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"124\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0.0\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"-6.37e-8\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->nullValue()",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->newObject()",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->newVariant(QVariant(false))",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->newQObject(0)",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->newQObject(engine)",
+ "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Object\")",
+ "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Array\")",
+ "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Number\")",
+ "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Function\")",
+ "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(true)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(int(122))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(uint(124))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(123.0)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"NaN\")",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"-Infinity\")",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, true)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, int(122))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, true)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Error.prototype\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Object\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Array\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Number\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Function\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"/foo/\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Null\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"True\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"False\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"true\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"122\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"124\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->newObject()",
+ "QScriptValue(engine, QString(\"\")) <=> engine->newArray(10)",
+ "QScriptValue(engine, QString(\"\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(engine, QString(\"\")) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(engine, QString(\"\")) <=> engine->newQObject(engine)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(true)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(int(122))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(uint(124))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(123.0)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, QString()) <=> QScriptValue(\"NaN\")",
+ "QScriptValue(engine, QString()) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, QString()) <=> QScriptValue(\"-Infinity\")",
+ "QScriptValue(engine, QString()) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(engine, QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(QString(\"0\"))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, true)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, int(122))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, true)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"Error.prototype\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"Object\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"Array\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"Number\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"Function\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"/foo/\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"Null\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"True\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"False\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"true\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"122\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"124\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"'0'\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(engine, QString()) <=> engine->newObject()",
+ "QScriptValue(engine, QString()) <=> engine->newArray(10)",
+ "QScriptValue(engine, QString()) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(engine, QString()) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(engine, QString()) <=> engine->newQObject(engine)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(true)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(int(122))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(uint(124))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(123.0)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(6.37e-8)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"NaN\")",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, true)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, int(122))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 6.37e-8)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, true)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Object\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Array\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Number\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Function\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Null\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"True\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"False\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"true\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"122\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"124\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"6.37e-8\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->newObject()",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->newQObject(engine)",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(uint(124))",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"NaN\")",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Object\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Array\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Number\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Function\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Null\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"True\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"False\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"124\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->newObject()",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->newQObject(engine)",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(int(122))",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(uint(124))",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(123.0)",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x43211234)",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x10000)",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x10001)",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(qInf())",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"NaN\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"Infinity\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"ciao\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, int(122))",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, uint(124))",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 123.0)",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x43211234)",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x10000)",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x10001)",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, qInf())",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"NaN\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"Infinity\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"ciao\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, int(122))",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, qInf())",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Object.prototype\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Function.prototype\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Error.prototype\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Object\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Array\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Number\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Function\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Undefined\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Null\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"True\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"False\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"122\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"124\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"123.0\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"0x43211234\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"0x10000\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"0x10001\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Infinity\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"'ciao'\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"'123'\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"'12.4'\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->newObject()",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->newVariant(QVariant(123))",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->newQObject(engine)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(true)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(6.37e-8)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"[]\") <=> QScriptValue(\"NaN\")",
+ "engine->evaluate(\"[]\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"[]\") <=> QScriptValue(\"-Infinity\")",
+ "engine->evaluate(\"[]\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"[]\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(QString(\"0\"))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, true)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, 6.37e-8)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, \"NaN\")",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, \"-Infinity\")",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"0\"))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, true)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, 6.37e-8)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, \"NaN\")",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, \"-Infinity\")",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"Null\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"True\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"False\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"true\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->evaluate(\"[]\") <=> engine->newObject()",
+ "engine->evaluate(\"[]\") <=> engine->newArray(10)",
+ "engine->evaluate(\"[]\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"[]\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"[]\") <=> engine->newQObject(engine)",
+ "engine->evaluate(\"Object.prototype\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"Object.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"Object.prototype\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"Object.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"Object.prototype\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"Object.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"Object.prototype\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(true)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(6.37e-8)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"NaN\")",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"-Infinity\")",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"0\"))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, true)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 6.37e-8)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"NaN\")",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"-Infinity\")",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"0\"))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, true)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 6.37e-8)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"NaN\")",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"-Infinity\")",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Null\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"True\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"False\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"true\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->newObject()",
+ "engine->evaluate(\"Array.prototype\") <=> engine->newArray(10)",
+ "engine->evaluate(\"Array.prototype\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"Array.prototype\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"Array.prototype\") <=> engine->newQObject(engine)",
+ "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"NaN\")",
+ "engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"Error.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"NaN\")",
+ "engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"NaN\")",
+ "engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Null\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"True\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"False\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->newObject()",
+ "engine->evaluate(\"Error.prototype\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"Error.prototype\") <=> engine->newQObject(engine)",
+ "engine->evaluate(\"Array\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Array\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"Number\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Function\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Function\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(\"NaN\")",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"0\"))",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"NaN\")",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"0\"))",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"NaN\")",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Null\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"True\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"False\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->evaluate(\"/foo/\") <=> engine->newObject()",
+ "engine->evaluate(\"/foo/\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"/foo/\") <=> engine->newQObject(engine)",
+ "engine->evaluate(\"new Object()\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"new Object()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"new Object()\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"new Object()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"new Object()\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"new Object()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"new Object()\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(true)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(6.37e-8)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(\"NaN\")",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(\"-Infinity\")",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"0\"))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, true)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, 6.37e-8)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"NaN\")",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"-Infinity\")",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"0\"))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, true)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 6.37e-8)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"NaN\")",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"-Infinity\")",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Null\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"True\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"False\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"true\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->evaluate(\"new Array()\") <=> engine->newObject()",
+ "engine->evaluate(\"new Array()\") <=> engine->newArray(10)",
+ "engine->evaluate(\"new Array()\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"new Array()\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"new Array()\") <=> engine->newQObject(engine)",
+ "engine->evaluate(\"new Error()\") <=> QScriptValue(\"NaN\")",
+ "engine->evaluate(\"new Error()\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"new Error()\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"new Error()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"NaN\")",
+ "engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"new Error()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"NaN\")",
+ "engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"new Error()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Null\")",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"True\")",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"False\")",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"new Error()\") <=> engine->newObject()",
+ "engine->evaluate(\"new Error()\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"new Error()\") <=> engine->newQObject(engine)",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"Undefined\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"Undefined\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"Undefined\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"Undefined\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"Undefined\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"Undefined\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"Undefined\") <=> engine->newObject()",
+ "engine->evaluate(\"Undefined\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"Null\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"Null\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"Null\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"Null\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"Null\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"Null\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"Null\") <=> engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Null\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Null\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Null\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Null\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Null\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"Null\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"Null\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"Null\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"Null\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"Null\") <=> engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\") <=> engine->evaluate(\"True\")",
+ "engine->evaluate(\"Null\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"Null\") <=> engine->newObject()",
+ "engine->evaluate(\"Null\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"True\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"True\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"True\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"True\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"True\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"True\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"True\") <=> engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"True\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"True\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"True\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"True\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"True\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"True\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"True\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"True\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"True\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"True\") <=> engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"True\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"True\") <=> engine->newObject()",
+ "engine->evaluate(\"True\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"False\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"False\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"False\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"False\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"False\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"False\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"False\") <=> engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"False\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"False\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"False\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"False\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"False\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"False\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"False\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"False\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"False\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"False\") <=> engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"False\") <=> engine->evaluate(\"Null\")",
+ "engine->evaluate(\"False\") <=> engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"False\") <=> engine->newObject()",
+ "engine->evaluate(\"False\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"null\") <=> QScriptValue(true)",
+ "engine->evaluate(\"null\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"null\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"null\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"null\") <=> QScriptValue(6.37e-8)",
+ "engine->evaluate(\"null\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"null\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"null\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"null\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"null\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"null\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"null\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"null\") <=> QScriptValue(0, true)",
+ "engine->evaluate(\"null\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"null\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"null\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"null\") <=> QScriptValue(0, 6.37e-8)",
+ "engine->evaluate(\"null\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"null\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"null\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"null\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"null\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"null\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"null\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->evaluate(\"null\") <=> QScriptValue(engine, true)",
+ "engine->evaluate(\"null\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"null\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"null\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"null\") <=> QScriptValue(engine, 6.37e-8)",
+ "engine->evaluate(\"null\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"null\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"null\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"null\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"null\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"null\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"null\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"null\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"null\") <=> engine->evaluate(\"true\")",
+ "engine->evaluate(\"null\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"null\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"null\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"null\") <=> engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"null\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"null\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"null\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"null\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"null\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"null\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->evaluate(\"null\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"true\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"true\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"true\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"true\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"true\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"true\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"true\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"true\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"true\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"true\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"true\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"true\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"true\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"true\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"true\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"true\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"true\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"true\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"true\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"true\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->evaluate(\"true\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"true\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"true\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"true\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"true\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"true\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"true\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"true\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"true\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"true\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"true\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"true\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"true\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"true\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"true\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"true\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"true\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"true\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"true\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"true\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->evaluate(\"true\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"false\") <=> QScriptValue(true)",
+ "engine->evaluate(\"false\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"false\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"false\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"false\") <=> QScriptValue(6.37e-8)",
+ "engine->evaluate(\"false\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"false\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"false\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"false\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"false\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"false\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"false\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, true)",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, 6.37e-8)",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"false\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, true)",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, 6.37e-8)",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"false\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->evaluate(\"false\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"122\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"122\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"122\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"122\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"122\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"122\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"122\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"122\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"122\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"122\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"122\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"122\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"122\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"122\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"122\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"122\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"122\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"122\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"122\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"122\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"122\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"122\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"122\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"122\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"122\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"122\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"122\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"122\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"122\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"122\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"122\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"122\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"124\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"124\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"124\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"124\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"124\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"124\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"124\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"124\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"124\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"124\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"124\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"124\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"124\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"124\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"124\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"124\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"124\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"124\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"124\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"0\") <=> QScriptValue(true)",
+ "engine->evaluate(\"0\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"0\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"0\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"0\") <=> QScriptValue(6.37e-8)",
+ "engine->evaluate(\"0\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"0\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"0\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"0\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"0\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"0\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"0\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, true)",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, 6.37e-8)",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"0\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, true)",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, 6.37e-8)",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"0\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"true\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->evaluate(\"0\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(true)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(6.37e-8)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, true)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, 6.37e-8)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, true)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, 6.37e-8)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"true\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->evaluate(\"0.0\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"123.0\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"123.0\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"123.0\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"123.0\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"123.0\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"123.0\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(true)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, true)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, true)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"true\")",
+ "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->evaluate(\"6.37e-8\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QScriptValue::NullValue)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(true)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(false)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0.0)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(6.37e-8)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString(\"\"))",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString())",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString(\"0\"))",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QScriptValue::NullValue)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, true)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, false)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0.0)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 6.37e-8)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString(\"\"))",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString())",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString(\"0\"))",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, true)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, false)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0.0)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 6.37e-8)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString(\"\"))",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString())",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"[]\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"null\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"true\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"false\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"''\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->nullValue()",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->newArray()",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->newVariant(QVariant(false))",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->newQObject(0)",
+ "engine->evaluate(\"0x43211234\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"0x43211234\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"0x43211234\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"0x43211234\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"0x43211234\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"0x43211234\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"0x43211234\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"0x10000\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"0x10000\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"0x10000\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"0x10000\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"0x10000\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"0x10000\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"0x10000\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"0x10000\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"0x10000\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"0x10000\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"0x10000\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"0x10000\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"0x10000\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"0x10000\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"0x10001\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"0x10001\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"0x10001\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"0x10001\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"0x10001\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"0x10001\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"0x10001\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"0x10001\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"0x10001\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"0x10001\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10001\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(true)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(false)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0.0)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(6.37e-8)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(-6.37e-8)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(QString(\"\"))",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(QString())",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(QString(\"0\"))",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, true)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, false)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0.0)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 6.37e-8)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, -6.37e-8)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString(\"\"))",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString())",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString(\"0\"))",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, true)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, false)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0.0)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 6.37e-8)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, -6.37e-8)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString(\"\"))",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString())",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"[]\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"null\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"true\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"false\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"''\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->nullValue()",
+ "engine->evaluate(\"-Infinity\") <=> engine->newArray()",
+ "engine->evaluate(\"-Infinity\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"-Infinity\") <=> engine->newVariant(QVariant(false))",
+ "engine->evaluate(\"-Infinity\") <=> engine->newQObject(0)",
+ "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"''\") <=> QScriptValue(true)",
+ "engine->evaluate(\"''\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"''\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"''\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"''\") <=> QScriptValue(6.37e-8)",
+ "engine->evaluate(\"''\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"''\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"''\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"''\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"''\") <=> QScriptValue(\"NaN\")",
+ "engine->evaluate(\"''\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"''\") <=> QScriptValue(\"-Infinity\")",
+ "engine->evaluate(\"''\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"''\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"''\") <=> QScriptValue(QString(\"0\"))",
+ "engine->evaluate(\"''\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"''\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, true)",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, 6.37e-8)",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, \"NaN\")",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, \"-Infinity\")",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"0\"))",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, true)",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, 6.37e-8)",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, \"NaN\")",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, \"-Infinity\")",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"Null\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"True\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"False\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"true\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->evaluate(\"''\") <=> engine->newObject()",
+ "engine->evaluate(\"''\") <=> engine->newArray(10)",
+ "engine->evaluate(\"''\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"''\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"''\") <=> engine->newQObject(engine)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(true)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(6.37e-8)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(\"NaN\")",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, true)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, 6.37e-8)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, \"NaN\")",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, true)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, 6.37e-8)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, \"NaN\")",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Null\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"True\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"False\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"true\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->evaluate(\"'0'\") <=> engine->newObject()",
+ "engine->evaluate(\"'0'\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"'0'\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"'0'\") <=> engine->newQObject(engine)",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(\"NaN\")",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(0, \"NaN\")",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(engine, \"NaN\")",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"'123'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Null\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"True\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"False\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"'123'\") <=> engine->newObject()",
+ "engine->evaluate(\"'123'\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"'123'\") <=> engine->newQObject(engine)",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(\"NaN\")",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, \"NaN\")",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, \"NaN\")",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Null\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"True\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"False\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->newObject()",
+ "engine->evaluate(\"'12.4'\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"'12.4'\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"'12.4'\") <=> engine->newQObject(engine)",
+ "engine->nullValue() <=> QScriptValue(true)",
+ "engine->nullValue() <=> QScriptValue(int(122))",
+ "engine->nullValue() <=> QScriptValue(uint(124))",
+ "engine->nullValue() <=> QScriptValue(123.0)",
+ "engine->nullValue() <=> QScriptValue(6.37e-8)",
+ "engine->nullValue() <=> QScriptValue(0x43211234)",
+ "engine->nullValue() <=> QScriptValue(0x10000)",
+ "engine->nullValue() <=> QScriptValue(0x10001)",
+ "engine->nullValue() <=> QScriptValue(qInf())",
+ "engine->nullValue() <=> QScriptValue(\"Infinity\")",
+ "engine->nullValue() <=> QScriptValue(QString(\"123\"))",
+ "engine->nullValue() <=> QScriptValue(QString(\"12.4\"))",
+ "engine->nullValue() <=> QScriptValue(0, true)",
+ "engine->nullValue() <=> QScriptValue(0, int(122))",
+ "engine->nullValue() <=> QScriptValue(0, uint(124))",
+ "engine->nullValue() <=> QScriptValue(0, 123.0)",
+ "engine->nullValue() <=> QScriptValue(0, 6.37e-8)",
+ "engine->nullValue() <=> QScriptValue(0, 0x43211234)",
+ "engine->nullValue() <=> QScriptValue(0, 0x10000)",
+ "engine->nullValue() <=> QScriptValue(0, 0x10001)",
+ "engine->nullValue() <=> QScriptValue(0, qInf())",
+ "engine->nullValue() <=> QScriptValue(0, \"Infinity\")",
+ "engine->nullValue() <=> QScriptValue(0, QString(\"123\"))",
+ "engine->nullValue() <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->nullValue() <=> QScriptValue(engine, true)",
+ "engine->nullValue() <=> QScriptValue(engine, int(122))",
+ "engine->nullValue() <=> QScriptValue(engine, uint(124))",
+ "engine->nullValue() <=> QScriptValue(engine, 123.0)",
+ "engine->nullValue() <=> QScriptValue(engine, 6.37e-8)",
+ "engine->nullValue() <=> QScriptValue(engine, 0x43211234)",
+ "engine->nullValue() <=> QScriptValue(engine, 0x10000)",
+ "engine->nullValue() <=> QScriptValue(engine, 0x10001)",
+ "engine->nullValue() <=> QScriptValue(engine, qInf())",
+ "engine->nullValue() <=> QScriptValue(engine, \"Infinity\")",
+ "engine->nullValue() <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->nullValue() <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->nullValue() <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->nullValue() <=> engine->evaluate(\"true\")",
+ "engine->nullValue() <=> engine->evaluate(\"122\")",
+ "engine->nullValue() <=> engine->evaluate(\"124\")",
+ "engine->nullValue() <=> engine->evaluate(\"123.0\")",
+ "engine->nullValue() <=> engine->evaluate(\"6.37e-8\")",
+ "engine->nullValue() <=> engine->evaluate(\"0x43211234\")",
+ "engine->nullValue() <=> engine->evaluate(\"0x10000\")",
+ "engine->nullValue() <=> engine->evaluate(\"0x10001\")",
+ "engine->nullValue() <=> engine->evaluate(\"Infinity\")",
+ "engine->nullValue() <=> engine->evaluate(\"'123'\")",
+ "engine->nullValue() <=> engine->evaluate(\"'12.4'\")",
+ "engine->nullValue() <=> engine->newVariant(QVariant(123))",
+ "engine->newObject() <=> QScriptValue(\"ciao\")",
+ "engine->newObject() <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->newObject() <=> QScriptValue(0, \"ciao\")",
+ "engine->newObject() <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->newObject() <=> QScriptValue(engine, \"ciao\")",
+ "engine->newObject() <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->newObject() <=> engine->evaluate(\"Function.prototype\")",
+ "engine->newObject() <=> engine->evaluate(\"Object\")",
+ "engine->newObject() <=> engine->evaluate(\"Array\")",
+ "engine->newObject() <=> engine->evaluate(\"Number\")",
+ "engine->newObject() <=> engine->evaluate(\"Function\")",
+ "engine->newObject() <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->newObject() <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->newObject() <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->newObject() <=> engine->evaluate(\"'ciao'\")",
+ "engine->newObject() <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newArray() <=> QScriptValue(true)",
+ "engine->newArray() <=> QScriptValue(int(122))",
+ "engine->newArray() <=> QScriptValue(uint(124))",
+ "engine->newArray() <=> QScriptValue(123.0)",
+ "engine->newArray() <=> QScriptValue(6.37e-8)",
+ "engine->newArray() <=> QScriptValue(0x43211234)",
+ "engine->newArray() <=> QScriptValue(0x10000)",
+ "engine->newArray() <=> QScriptValue(0x10001)",
+ "engine->newArray() <=> QScriptValue(qInf())",
+ "engine->newArray() <=> QScriptValue(\"NaN\")",
+ "engine->newArray() <=> QScriptValue(\"Infinity\")",
+ "engine->newArray() <=> QScriptValue(\"-Infinity\")",
+ "engine->newArray() <=> QScriptValue(\"ciao\")",
+ "engine->newArray() <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->newArray() <=> QScriptValue(QString(\"0\"))",
+ "engine->newArray() <=> QScriptValue(QString(\"123\"))",
+ "engine->newArray() <=> QScriptValue(QString(\"12.4\"))",
+ "engine->newArray() <=> QScriptValue(0, true)",
+ "engine->newArray() <=> QScriptValue(0, int(122))",
+ "engine->newArray() <=> QScriptValue(0, uint(124))",
+ "engine->newArray() <=> QScriptValue(0, 123.0)",
+ "engine->newArray() <=> QScriptValue(0, 6.37e-8)",
+ "engine->newArray() <=> QScriptValue(0, 0x43211234)",
+ "engine->newArray() <=> QScriptValue(0, 0x10000)",
+ "engine->newArray() <=> QScriptValue(0, 0x10001)",
+ "engine->newArray() <=> QScriptValue(0, qInf())",
+ "engine->newArray() <=> QScriptValue(0, \"NaN\")",
+ "engine->newArray() <=> QScriptValue(0, \"Infinity\")",
+ "engine->newArray() <=> QScriptValue(0, \"-Infinity\")",
+ "engine->newArray() <=> QScriptValue(0, \"ciao\")",
+ "engine->newArray() <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->newArray() <=> QScriptValue(0, QString(\"0\"))",
+ "engine->newArray() <=> QScriptValue(0, QString(\"123\"))",
+ "engine->newArray() <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->newArray() <=> QScriptValue(engine, true)",
+ "engine->newArray() <=> QScriptValue(engine, int(122))",
+ "engine->newArray() <=> QScriptValue(engine, uint(124))",
+ "engine->newArray() <=> QScriptValue(engine, 123.0)",
+ "engine->newArray() <=> QScriptValue(engine, 6.37e-8)",
+ "engine->newArray() <=> QScriptValue(engine, 0x43211234)",
+ "engine->newArray() <=> QScriptValue(engine, 0x10000)",
+ "engine->newArray() <=> QScriptValue(engine, 0x10001)",
+ "engine->newArray() <=> QScriptValue(engine, qInf())",
+ "engine->newArray() <=> QScriptValue(engine, \"NaN\")",
+ "engine->newArray() <=> QScriptValue(engine, \"Infinity\")",
+ "engine->newArray() <=> QScriptValue(engine, \"-Infinity\")",
+ "engine->newArray() <=> QScriptValue(engine, \"ciao\")",
+ "engine->newArray() <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->newArray() <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->newArray() <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->newArray() <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->newArray() <=> engine->evaluate(\"Object.prototype\")",
+ "engine->newArray() <=> engine->evaluate(\"Function.prototype\")",
+ "engine->newArray() <=> engine->evaluate(\"Error.prototype\")",
+ "engine->newArray() <=> engine->evaluate(\"Object\")",
+ "engine->newArray() <=> engine->evaluate(\"Array\")",
+ "engine->newArray() <=> engine->evaluate(\"Number\")",
+ "engine->newArray() <=> engine->evaluate(\"Function\")",
+ "engine->newArray() <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->newArray() <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->newArray() <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->newArray() <=> engine->evaluate(\"/foo/\")",
+ "engine->newArray() <=> engine->evaluate(\"new Object()\")",
+ "engine->newArray() <=> engine->evaluate(\"new Error()\")",
+ "engine->newArray() <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->newArray() <=> engine->evaluate(\"Undefined\")",
+ "engine->newArray() <=> engine->evaluate(\"Null\")",
+ "engine->newArray() <=> engine->evaluate(\"True\")",
+ "engine->newArray() <=> engine->evaluate(\"False\")",
+ "engine->newArray() <=> engine->evaluate(\"true\")",
+ "engine->newArray() <=> engine->evaluate(\"122\")",
+ "engine->newArray() <=> engine->evaluate(\"124\")",
+ "engine->newArray() <=> engine->evaluate(\"123.0\")",
+ "engine->newArray() <=> engine->evaluate(\"6.37e-8\")",
+ "engine->newArray() <=> engine->evaluate(\"0x43211234\")",
+ "engine->newArray() <=> engine->evaluate(\"0x10000\")",
+ "engine->newArray() <=> engine->evaluate(\"0x10001\")",
+ "engine->newArray() <=> engine->evaluate(\"Infinity\")",
+ "engine->newArray() <=> engine->evaluate(\"'ciao'\")",
+ "engine->newArray() <=> engine->evaluate(\"'0'\")",
+ "engine->newArray() <=> engine->evaluate(\"'123'\")",
+ "engine->newArray() <=> engine->evaluate(\"'12.4'\")",
+ "engine->newArray() <=> engine->newObject()",
+ "engine->newArray() <=> engine->newArray(10)",
+ "engine->newArray() <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newArray() <=> engine->newVariant(QVariant(123))",
+ "engine->newArray() <=> engine->newQObject(engine)",
+ "engine->newArray(10) <=> QScriptValue(\"NaN\")",
+ "engine->newArray(10) <=> QScriptValue(\"Infinity\")",
+ "engine->newArray(10) <=> QScriptValue(\"-Infinity\")",
+ "engine->newArray(10) <=> QScriptValue(\"ciao\")",
+ "engine->newArray(10) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->newArray(10) <=> QScriptValue(QString(\"0\"))",
+ "engine->newArray(10) <=> QScriptValue(QString(\"123\"))",
+ "engine->newArray(10) <=> QScriptValue(QString(\"12.4\"))",
+ "engine->newArray(10) <=> QScriptValue(0, \"NaN\")",
+ "engine->newArray(10) <=> QScriptValue(0, \"Infinity\")",
+ "engine->newArray(10) <=> QScriptValue(0, \"-Infinity\")",
+ "engine->newArray(10) <=> QScriptValue(0, \"ciao\")",
+ "engine->newArray(10) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->newArray(10) <=> QScriptValue(0, QString(\"0\"))",
+ "engine->newArray(10) <=> QScriptValue(0, QString(\"123\"))",
+ "engine->newArray(10) <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->newArray(10) <=> QScriptValue(engine, \"NaN\")",
+ "engine->newArray(10) <=> QScriptValue(engine, \"Infinity\")",
+ "engine->newArray(10) <=> QScriptValue(engine, \"-Infinity\")",
+ "engine->newArray(10) <=> QScriptValue(engine, \"ciao\")",
+ "engine->newArray(10) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->newArray(10) <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->newArray(10) <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->newArray(10) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->newArray(10) <=> engine->evaluate(\"Object.prototype\")",
+ "engine->newArray(10) <=> engine->evaluate(\"Function.prototype\")",
+ "engine->newArray(10) <=> engine->evaluate(\"Error.prototype\")",
+ "engine->newArray(10) <=> engine->evaluate(\"Object\")",
+ "engine->newArray(10) <=> engine->evaluate(\"Array\")",
+ "engine->newArray(10) <=> engine->evaluate(\"Number\")",
+ "engine->newArray(10) <=> engine->evaluate(\"Function\")",
+ "engine->newArray(10) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->newArray(10) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->newArray(10) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->newArray(10) <=> engine->evaluate(\"/foo/\")",
+ "engine->newArray(10) <=> engine->evaluate(\"new Object()\")",
+ "engine->newArray(10) <=> engine->evaluate(\"new Error()\")",
+ "engine->newArray(10) <=> engine->evaluate(\"Undefined\")",
+ "engine->newArray(10) <=> engine->evaluate(\"Null\")",
+ "engine->newArray(10) <=> engine->evaluate(\"True\")",
+ "engine->newArray(10) <=> engine->evaluate(\"False\")",
+ "engine->newArray(10) <=> engine->evaluate(\"'ciao'\")",
+ "engine->newArray(10) <=> engine->evaluate(\"'0'\")",
+ "engine->newArray(10) <=> engine->evaluate(\"'123'\")",
+ "engine->newArray(10) <=> engine->evaluate(\"'12.4'\")",
+ "engine->newArray(10) <=> engine->newObject()",
+ "engine->newArray(10) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newArray(10) <=> engine->newQObject(engine)",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(\"ciao\")",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(0, \"ciao\")",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(engine, \"ciao\")",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Function.prototype\")",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Object\")",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Array\")",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Number\")",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Function\")",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"'ciao'\")",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(uint(124))",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(0x43211234)",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(0x10000)",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(0x10001)",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(qInf())",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(\"Infinity\")",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(0, uint(124))",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(0, 0x43211234)",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(0, 0x10000)",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(0, 0x10001)",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(0, qInf())",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(0, \"Infinity\")",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(engine, uint(124))",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(engine, 0x43211234)",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(engine, 0x10000)",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(engine, 0x10001)",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(engine, qInf())",
+ "engine->newVariant(QVariant(123)) <=> QScriptValue(engine, \"Infinity\")",
+ "engine->newVariant(QVariant(123)) <=> engine->evaluate(\"124\")",
+ "engine->newVariant(QVariant(123)) <=> engine->evaluate(\"0x43211234\")",
+ "engine->newVariant(QVariant(123)) <=> engine->evaluate(\"0x10000\")",
+ "engine->newVariant(QVariant(123)) <=> engine->evaluate(\"0x10001\")",
+ "engine->newVariant(QVariant(123)) <=> engine->evaluate(\"Infinity\")",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(true)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(int(122))",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(uint(124))",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(123.0)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(6.37e-8)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0x43211234)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0x10000)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0x10001)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(qInf())",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(\"Infinity\")",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(QString(\"123\"))",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(QString(\"12.4\"))",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0, true)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0, int(122))",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0, uint(124))",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0, 123.0)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0, 6.37e-8)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0, 0x43211234)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0, 0x10000)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0, 0x10001)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0, qInf())",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0, \"Infinity\")",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0, QString(\"123\"))",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, true)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, int(122))",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, uint(124))",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 123.0)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 6.37e-8)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 0x43211234)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 0x10000)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 0x10001)",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, qInf())",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, \"Infinity\")",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"true\")",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"122\")",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"124\")",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"123.0\")",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"6.37e-8\")",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"0x43211234\")",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"0x10000\")",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"0x10001\")",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"Infinity\")",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"'123'\")",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"'12.4'\")",
+ "engine->newVariant(QVariant(false)) <=> engine->newVariant(QVariant(123))",
+ "engine->newQObject(0) <=> QScriptValue(true)",
+ "engine->newQObject(0) <=> QScriptValue(int(122))",
+ "engine->newQObject(0) <=> QScriptValue(uint(124))",
+ "engine->newQObject(0) <=> QScriptValue(123.0)",
+ "engine->newQObject(0) <=> QScriptValue(6.37e-8)",
+ "engine->newQObject(0) <=> QScriptValue(0x43211234)",
+ "engine->newQObject(0) <=> QScriptValue(0x10000)",
+ "engine->newQObject(0) <=> QScriptValue(0x10001)",
+ "engine->newQObject(0) <=> QScriptValue(qInf())",
+ "engine->newQObject(0) <=> QScriptValue(\"Infinity\")",
+ "engine->newQObject(0) <=> QScriptValue(QString(\"123\"))",
+ "engine->newQObject(0) <=> QScriptValue(QString(\"12.4\"))",
+ "engine->newQObject(0) <=> QScriptValue(0, true)",
+ "engine->newQObject(0) <=> QScriptValue(0, int(122))",
+ "engine->newQObject(0) <=> QScriptValue(0, uint(124))",
+ "engine->newQObject(0) <=> QScriptValue(0, 123.0)",
+ "engine->newQObject(0) <=> QScriptValue(0, 6.37e-8)",
+ "engine->newQObject(0) <=> QScriptValue(0, 0x43211234)",
+ "engine->newQObject(0) <=> QScriptValue(0, 0x10000)",
+ "engine->newQObject(0) <=> QScriptValue(0, 0x10001)",
+ "engine->newQObject(0) <=> QScriptValue(0, qInf())",
+ "engine->newQObject(0) <=> QScriptValue(0, \"Infinity\")",
+ "engine->newQObject(0) <=> QScriptValue(0, QString(\"123\"))",
+ "engine->newQObject(0) <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->newQObject(0) <=> QScriptValue(engine, true)",
+ "engine->newQObject(0) <=> QScriptValue(engine, int(122))",
+ "engine->newQObject(0) <=> QScriptValue(engine, uint(124))",
+ "engine->newQObject(0) <=> QScriptValue(engine, 123.0)",
+ "engine->newQObject(0) <=> QScriptValue(engine, 6.37e-8)",
+ "engine->newQObject(0) <=> QScriptValue(engine, 0x43211234)",
+ "engine->newQObject(0) <=> QScriptValue(engine, 0x10000)",
+ "engine->newQObject(0) <=> QScriptValue(engine, 0x10001)",
+ "engine->newQObject(0) <=> QScriptValue(engine, qInf())",
+ "engine->newQObject(0) <=> QScriptValue(engine, \"Infinity\")",
+ "engine->newQObject(0) <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->newQObject(0) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->newQObject(0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->newQObject(0) <=> engine->evaluate(\"true\")",
+ "engine->newQObject(0) <=> engine->evaluate(\"122\")",
+ "engine->newQObject(0) <=> engine->evaluate(\"124\")",
+ "engine->newQObject(0) <=> engine->evaluate(\"123.0\")",
+ "engine->newQObject(0) <=> engine->evaluate(\"6.37e-8\")",
+ "engine->newQObject(0) <=> engine->evaluate(\"0x43211234\")",
+ "engine->newQObject(0) <=> engine->evaluate(\"0x10000\")",
+ "engine->newQObject(0) <=> engine->evaluate(\"0x10001\")",
+ "engine->newQObject(0) <=> engine->evaluate(\"Infinity\")",
+ "engine->newQObject(0) <=> engine->evaluate(\"'123'\")",
+ "engine->newQObject(0) <=> engine->evaluate(\"'12.4'\")",
+ "engine->newQObject(0) <=> engine->newVariant(QVariant(123))",
+ "engine->newQObject(engine) <=> QScriptValue(\"ciao\")",
+ "engine->newQObject(engine) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->newQObject(engine) <=> QScriptValue(0, \"ciao\")",
+ "engine->newQObject(engine) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->newQObject(engine) <=> QScriptValue(engine, \"ciao\")",
+ "engine->newQObject(engine) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->newQObject(engine) <=> engine->evaluate(\"Object.prototype\")",
+ "engine->newQObject(engine) <=> engine->evaluate(\"Function.prototype\")",
+ "engine->newQObject(engine) <=> engine->evaluate(\"Object\")",
+ "engine->newQObject(engine) <=> engine->evaluate(\"Array\")",
+ "engine->newQObject(engine) <=> engine->evaluate(\"Number\")",
+ "engine->newQObject(engine) <=> engine->evaluate(\"Function\")",
+ "engine->newQObject(engine) <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->newQObject(engine) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->newQObject(engine) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->newQObject(engine) <=> engine->evaluate(\"new Object()\")",
+ "engine->newQObject(engine) <=> engine->evaluate(\"Undefined\")",
+ "engine->newQObject(engine) <=> engine->evaluate(\"Null\")",
+ "engine->newQObject(engine) <=> engine->evaluate(\"True\")",
+ "engine->newQObject(engine) <=> engine->evaluate(\"False\")",
+ "engine->newQObject(engine) <=> engine->evaluate(\"'ciao'\")",
+ "engine->newQObject(engine) <=> engine->newObject()",
+ "engine->newQObject(engine) <=> engine->newQMetaObject(&QObject::staticMetaObject)",};
+
+void tst_QScriptValue::lessThan_makeData(const char *expr)
+{
+ static QSet<QString> equals;
+ if (equals.isEmpty()) {
+ equals.reserve(5063);
+ for (unsigned i = 0; i < 5063; ++i)
+ equals.insert(lessThan_array[i]);
+ }
+ QHash<QString, QScriptValue>::const_iterator it;
+ for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {
+ QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key());
+ newRow(tag.toLatin1()) << it.value() << equals.contains(tag);
+ }
+}
+
+void tst_QScriptValue::lessThan_test(const char *, const QScriptValue& value)
+{
+ QFETCH(QScriptValue, other);
+ QFETCH(bool, expected);
+ QCOMPARE(value.lessThan(other), expected);
+}
+
+DEFINE_TEST_FUNCTION(lessThan)
+
+
+void tst_QScriptValue::instanceOf_initData()
+{
+ QTest::addColumn<QScriptValue>("other");
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString instanceOf_array [] = {
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Object\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"Array\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"Number\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Number\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"Function\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Null\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"True\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"False\") <=> engine->evaluate(\"Object\")",
+ "engine->newObject() <=> engine->evaluate(\"Object\")",
+ "engine->newArray() <=> engine->evaluate(\"Object\")",
+ "engine->newArray() <=> engine->evaluate(\"Array\")",
+ "engine->newArray(10) <=> engine->evaluate(\"Object\")",
+ "engine->newArray(10) <=> engine->evaluate(\"Array\")",
+ "engine->newDate(QDateTime()) <=> engine->evaluate(\"Object\")",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Object\")",
+ "engine->newVariant(QVariant()) <=> engine->evaluate(\"Object\")",
+ "engine->newVariant(QVariant(123)) <=> engine->evaluate(\"Object\")",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"Object\")",
+ "engine->newQObject(engine) <=> engine->evaluate(\"Object\")",};
+
+void tst_QScriptValue::instanceOf_makeData(const char *expr)
+{
+ static QSet<QString> equals;
+ if (equals.isEmpty()) {
+ equals.reserve(40);
+ for (unsigned i = 0; i < 40; ++i)
+ equals.insert(instanceOf_array[i]);
+ }
+ QHash<QString, QScriptValue>::const_iterator it;
+ for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {
+ QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key());
+ newRow(tag.toLatin1()) << it.value() << equals.contains(tag);
+ }
+}
+
+void tst_QScriptValue::instanceOf_test(const char *, const QScriptValue& value)
+{
+ QFETCH(QScriptValue, other);
+ QFETCH(bool, expected);
+ QCOMPARE(value.instanceOf(other), expected);
+}
+
+DEFINE_TEST_FUNCTION(instanceOf)
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated_init.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_init.cpp
new file mode 100644
index 0000000000..a9eb2cad87
--- /dev/null
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_init.cpp
@@ -0,0 +1,198 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+*************** This file has been generated. DO NOT MODIFY! ****************
+****************************************************************************/
+
+#include "tst_qscriptvalue.h"
+
+
+void tst_QScriptValue::initScriptValues()
+{
+ m_values.clear();
+ if (engine)
+ delete engine;
+ engine = new QScriptEngine;
+ DEFINE_TEST_VALUE(QScriptValue());
+ DEFINE_TEST_VALUE(QScriptValue(QScriptValue::UndefinedValue));
+ DEFINE_TEST_VALUE(QScriptValue(QScriptValue::NullValue));
+ DEFINE_TEST_VALUE(QScriptValue(true));
+ DEFINE_TEST_VALUE(QScriptValue(false));
+ DEFINE_TEST_VALUE(QScriptValue(int(122)));
+ DEFINE_TEST_VALUE(QScriptValue(uint(124)));
+ DEFINE_TEST_VALUE(QScriptValue(0));
+ DEFINE_TEST_VALUE(QScriptValue(0.0));
+ DEFINE_TEST_VALUE(QScriptValue(123.0));
+ DEFINE_TEST_VALUE(QScriptValue(6.37e-8));
+ DEFINE_TEST_VALUE(QScriptValue(-6.37e-8));
+ DEFINE_TEST_VALUE(QScriptValue(0x43211234));
+ DEFINE_TEST_VALUE(QScriptValue(0x10000));
+ DEFINE_TEST_VALUE(QScriptValue(0x10001));
+ DEFINE_TEST_VALUE(QScriptValue(qSNaN()));
+ DEFINE_TEST_VALUE(QScriptValue(qQNaN()));
+ DEFINE_TEST_VALUE(QScriptValue(qInf()));
+ DEFINE_TEST_VALUE(QScriptValue(-qInf()));
+ DEFINE_TEST_VALUE(QScriptValue("NaN"));
+ DEFINE_TEST_VALUE(QScriptValue("Infinity"));
+ DEFINE_TEST_VALUE(QScriptValue("-Infinity"));
+ DEFINE_TEST_VALUE(QScriptValue("ciao"));
+ DEFINE_TEST_VALUE(QScriptValue(QString::fromLatin1("ciao")));
+ DEFINE_TEST_VALUE(QScriptValue(QString("")));
+ DEFINE_TEST_VALUE(QScriptValue(QString()));
+ DEFINE_TEST_VALUE(QScriptValue(QString("0")));
+ DEFINE_TEST_VALUE(QScriptValue(QString("123")));
+ DEFINE_TEST_VALUE(QScriptValue(QString("12.4")));
+ DEFINE_TEST_VALUE(QScriptValue(0, QScriptValue::UndefinedValue));
+ DEFINE_TEST_VALUE(QScriptValue(0, QScriptValue::NullValue));
+ DEFINE_TEST_VALUE(QScriptValue(0, true));
+ DEFINE_TEST_VALUE(QScriptValue(0, false));
+ DEFINE_TEST_VALUE(QScriptValue(0, int(122)));
+ DEFINE_TEST_VALUE(QScriptValue(0, uint(124)));
+ DEFINE_TEST_VALUE(QScriptValue(0, 0));
+ DEFINE_TEST_VALUE(QScriptValue(0, 0.0));
+ DEFINE_TEST_VALUE(QScriptValue(0, 123.0));
+ DEFINE_TEST_VALUE(QScriptValue(0, 6.37e-8));
+ DEFINE_TEST_VALUE(QScriptValue(0, -6.37e-8));
+ DEFINE_TEST_VALUE(QScriptValue(0, 0x43211234));
+ DEFINE_TEST_VALUE(QScriptValue(0, 0x10000));
+ DEFINE_TEST_VALUE(QScriptValue(0, 0x10001));
+ DEFINE_TEST_VALUE(QScriptValue(0, qSNaN()));
+ DEFINE_TEST_VALUE(QScriptValue(0, qQNaN()));
+ DEFINE_TEST_VALUE(QScriptValue(0, qInf()));
+ DEFINE_TEST_VALUE(QScriptValue(0, -qInf()));
+ DEFINE_TEST_VALUE(QScriptValue(0, "NaN"));
+ DEFINE_TEST_VALUE(QScriptValue(0, "Infinity"));
+ DEFINE_TEST_VALUE(QScriptValue(0, "-Infinity"));
+ DEFINE_TEST_VALUE(QScriptValue(0, "ciao"));
+ DEFINE_TEST_VALUE(QScriptValue(0, QString::fromLatin1("ciao")));
+ DEFINE_TEST_VALUE(QScriptValue(0, QString("")));
+ DEFINE_TEST_VALUE(QScriptValue(0, QString()));
+ DEFINE_TEST_VALUE(QScriptValue(0, QString("0")));
+ DEFINE_TEST_VALUE(QScriptValue(0, QString("123")));
+ DEFINE_TEST_VALUE(QScriptValue(0, QString("12.3")));
+ DEFINE_TEST_VALUE(QScriptValue(engine, QScriptValue::UndefinedValue));
+ DEFINE_TEST_VALUE(QScriptValue(engine, QScriptValue::NullValue));
+ DEFINE_TEST_VALUE(QScriptValue(engine, true));
+ DEFINE_TEST_VALUE(QScriptValue(engine, false));
+ DEFINE_TEST_VALUE(QScriptValue(engine, int(122)));
+ DEFINE_TEST_VALUE(QScriptValue(engine, uint(124)));
+ DEFINE_TEST_VALUE(QScriptValue(engine, 0));
+ DEFINE_TEST_VALUE(QScriptValue(engine, 0.0));
+ DEFINE_TEST_VALUE(QScriptValue(engine, 123.0));
+ DEFINE_TEST_VALUE(QScriptValue(engine, 6.37e-8));
+ DEFINE_TEST_VALUE(QScriptValue(engine, -6.37e-8));
+ DEFINE_TEST_VALUE(QScriptValue(engine, 0x43211234));
+ DEFINE_TEST_VALUE(QScriptValue(engine, 0x10000));
+ DEFINE_TEST_VALUE(QScriptValue(engine, 0x10001));
+ DEFINE_TEST_VALUE(QScriptValue(engine, qSNaN()));
+ DEFINE_TEST_VALUE(QScriptValue(engine, qQNaN()));
+ DEFINE_TEST_VALUE(QScriptValue(engine, qInf()));
+ DEFINE_TEST_VALUE(QScriptValue(engine, -qInf()));
+ DEFINE_TEST_VALUE(QScriptValue(engine, "NaN"));
+ DEFINE_TEST_VALUE(QScriptValue(engine, "Infinity"));
+ DEFINE_TEST_VALUE(QScriptValue(engine, "-Infinity"));
+ DEFINE_TEST_VALUE(QScriptValue(engine, "ciao"));
+ DEFINE_TEST_VALUE(QScriptValue(engine, QString::fromLatin1("ciao")));
+ DEFINE_TEST_VALUE(QScriptValue(engine, QString("")));
+ DEFINE_TEST_VALUE(QScriptValue(engine, QString()));
+ DEFINE_TEST_VALUE(QScriptValue(engine, QString("0")));
+ DEFINE_TEST_VALUE(QScriptValue(engine, QString("123")));
+ DEFINE_TEST_VALUE(QScriptValue(engine, QString("1.23")));
+ DEFINE_TEST_VALUE(engine->evaluate("[]"));
+ DEFINE_TEST_VALUE(engine->evaluate("{}"));
+ DEFINE_TEST_VALUE(engine->evaluate("Object.prototype"));
+ DEFINE_TEST_VALUE(engine->evaluate("Date.prototype"));
+ DEFINE_TEST_VALUE(engine->evaluate("Array.prototype"));
+ DEFINE_TEST_VALUE(engine->evaluate("Function.prototype"));
+ DEFINE_TEST_VALUE(engine->evaluate("Error.prototype"));
+ DEFINE_TEST_VALUE(engine->evaluate("Object"));
+ DEFINE_TEST_VALUE(engine->evaluate("Array"));
+ DEFINE_TEST_VALUE(engine->evaluate("Number"));
+ DEFINE_TEST_VALUE(engine->evaluate("Function"));
+ DEFINE_TEST_VALUE(engine->evaluate("(function() { return 1; })"));
+ DEFINE_TEST_VALUE(engine->evaluate("(function() { return 'ciao'; })"));
+ DEFINE_TEST_VALUE(engine->evaluate("(function() { throw new Error('foo'); })"));
+ DEFINE_TEST_VALUE(engine->evaluate("/foo/"));
+ DEFINE_TEST_VALUE(engine->evaluate("new Object()"));
+ DEFINE_TEST_VALUE(engine->evaluate("new Array()"));
+ DEFINE_TEST_VALUE(engine->evaluate("new Error()"));
+ DEFINE_TEST_VALUE(engine->evaluate("a = new Object(); a.foo = 22; a.foo"));
+ DEFINE_TEST_VALUE(engine->evaluate("Undefined"));
+ DEFINE_TEST_VALUE(engine->evaluate("Null"));
+ DEFINE_TEST_VALUE(engine->evaluate("True"));
+ DEFINE_TEST_VALUE(engine->evaluate("False"));
+ DEFINE_TEST_VALUE(engine->evaluate("undefined"));
+ DEFINE_TEST_VALUE(engine->evaluate("null"));
+ DEFINE_TEST_VALUE(engine->evaluate("true"));
+ DEFINE_TEST_VALUE(engine->evaluate("false"));
+ DEFINE_TEST_VALUE(engine->evaluate("122"));
+ DEFINE_TEST_VALUE(engine->evaluate("124"));
+ DEFINE_TEST_VALUE(engine->evaluate("0"));
+ DEFINE_TEST_VALUE(engine->evaluate("0.0"));
+ DEFINE_TEST_VALUE(engine->evaluate("123.0"));
+ DEFINE_TEST_VALUE(engine->evaluate("6.37e-8"));
+ DEFINE_TEST_VALUE(engine->evaluate("-6.37e-8"));
+ DEFINE_TEST_VALUE(engine->evaluate("0x43211234"));
+ DEFINE_TEST_VALUE(engine->evaluate("0x10000"));
+ DEFINE_TEST_VALUE(engine->evaluate("0x10001"));
+ DEFINE_TEST_VALUE(engine->evaluate("NaN"));
+ DEFINE_TEST_VALUE(engine->evaluate("Infinity"));
+ DEFINE_TEST_VALUE(engine->evaluate("-Infinity"));
+ DEFINE_TEST_VALUE(engine->evaluate("'ciao'"));
+ DEFINE_TEST_VALUE(engine->evaluate("''"));
+ DEFINE_TEST_VALUE(engine->evaluate("'0'"));
+ DEFINE_TEST_VALUE(engine->evaluate("'123'"));
+ DEFINE_TEST_VALUE(engine->evaluate("'12.4'"));
+ DEFINE_TEST_VALUE(engine->nullValue());
+ DEFINE_TEST_VALUE(engine->undefinedValue());
+ DEFINE_TEST_VALUE(engine->newObject());
+ DEFINE_TEST_VALUE(engine->newArray());
+ DEFINE_TEST_VALUE(engine->newArray(10));
+ DEFINE_TEST_VALUE(engine->newDate(QDateTime()));
+ DEFINE_TEST_VALUE(engine->newQMetaObject(&QObject::staticMetaObject));
+ DEFINE_TEST_VALUE(engine->newVariant(QVariant()));
+ DEFINE_TEST_VALUE(engine->newVariant(QVariant(123)));
+ DEFINE_TEST_VALUE(engine->newVariant(QVariant(false)));
+ DEFINE_TEST_VALUE(engine->newQObject(0));
+ DEFINE_TEST_VALUE(engine->newQObject(engine));
+}
+
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated_isXXX.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_isXXX.cpp
new file mode 100644
index 0000000000..106043b19f
--- /dev/null
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_isXXX.cpp
@@ -0,0 +1,830 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+*************** This file has been generated. DO NOT MODIFY! ****************
+****************************************************************************/
+
+#include "tst_qscriptvalue.h"
+
+
+void tst_QScriptValue::isValid_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString isValid_array [] = {
+ "QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(true)",
+ "QScriptValue(false)",
+ "QScriptValue(int(122))",
+ "QScriptValue(uint(124))",
+ "QScriptValue(0)",
+ "QScriptValue(0.0)",
+ "QScriptValue(123.0)",
+ "QScriptValue(6.37e-8)",
+ "QScriptValue(-6.37e-8)",
+ "QScriptValue(0x43211234)",
+ "QScriptValue(0x10000)",
+ "QScriptValue(0x10001)",
+ "QScriptValue(qSNaN())",
+ "QScriptValue(qQNaN())",
+ "QScriptValue(qInf())",
+ "QScriptValue(-qInf())",
+ "QScriptValue(\"NaN\")",
+ "QScriptValue(\"Infinity\")",
+ "QScriptValue(\"-Infinity\")",
+ "QScriptValue(\"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\"))",
+ "QScriptValue(QString())",
+ "QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, true)",
+ "QScriptValue(0, false)",
+ "QScriptValue(0, int(122))",
+ "QScriptValue(0, uint(124))",
+ "QScriptValue(0, 0)",
+ "QScriptValue(0, 0.0)",
+ "QScriptValue(0, 123.0)",
+ "QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0x10001)",
+ "QScriptValue(0, qSNaN())",
+ "QScriptValue(0, qQNaN())",
+ "QScriptValue(0, qInf())",
+ "QScriptValue(0, -qInf())",
+ "QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString())",
+ "QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, true)",
+ "QScriptValue(engine, false)",
+ "QScriptValue(engine, int(122))",
+ "QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, qSNaN())",
+ "QScriptValue(engine, qQNaN())",
+ "QScriptValue(engine, qInf())",
+ "QScriptValue(engine, -qInf())",
+ "QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"[]\")",
+ "engine->evaluate(\"{}\")",
+ "engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Date.prototype\")",
+ "engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\")",
+ "engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"null\")",
+ "engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\")",
+ "engine->evaluate(\"122\")",
+ "engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\")",
+ "engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"NaN\")",
+ "engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\")",
+ "engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\")",
+ "engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'12.4'\")",
+ "engine->nullValue()",
+ "engine->undefinedValue()",
+ "engine->newObject()",
+ "engine->newArray()",
+ "engine->newArray(10)",
+ "engine->newDate(QDateTime())",
+ "engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false))",
+ "engine->newQObject(0)",
+ "engine->newQObject(engine)",};
+
+void tst_QScriptValue::isValid_makeData(const char* expr)
+{
+ static QSet<QString> isValid;
+ if (isValid.isEmpty()) {
+ isValid.reserve(141);
+ for (unsigned i = 0; i < 141; ++i)
+ isValid.insert(isValid_array[i]);
+ }
+ newRow(expr) << isValid.contains(expr);
+}
+
+void tst_QScriptValue::isValid_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isValid(), expected);
+ QCOMPARE(value.isValid(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isValid)
+
+
+void tst_QScriptValue::isBool_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString isBool_array [] = {
+ "QScriptValue(true)",
+ "QScriptValue(false)",
+ "QScriptValue(0, true)",
+ "QScriptValue(0, false)",
+ "QScriptValue(engine, true)",
+ "QScriptValue(engine, false)",
+ "engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\")",};
+
+void tst_QScriptValue::isBool_makeData(const char* expr)
+{
+ static QSet<QString> isBool;
+ if (isBool.isEmpty()) {
+ isBool.reserve(8);
+ for (unsigned i = 0; i < 8; ++i)
+ isBool.insert(isBool_array[i]);
+ }
+ newRow(expr) << isBool.contains(expr);
+}
+
+void tst_QScriptValue::isBool_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isBool(), expected);
+ QCOMPARE(value.isBool(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isBool)
+
+
+void tst_QScriptValue::isBoolean_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString isBoolean_array [] = {
+ "QScriptValue(true)",
+ "QScriptValue(false)",
+ "QScriptValue(0, true)",
+ "QScriptValue(0, false)",
+ "QScriptValue(engine, true)",
+ "QScriptValue(engine, false)",
+ "engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\")",};
+
+void tst_QScriptValue::isBoolean_makeData(const char* expr)
+{
+ static QSet<QString> isBoolean;
+ if (isBoolean.isEmpty()) {
+ isBoolean.reserve(8);
+ for (unsigned i = 0; i < 8; ++i)
+ isBoolean.insert(isBoolean_array[i]);
+ }
+ newRow(expr) << isBoolean.contains(expr);
+}
+
+void tst_QScriptValue::isBoolean_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isBoolean(), expected);
+ QCOMPARE(value.isBoolean(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isBoolean)
+
+
+void tst_QScriptValue::isNumber_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString isNumber_array [] = {
+ "QScriptValue(int(122))",
+ "QScriptValue(uint(124))",
+ "QScriptValue(0)",
+ "QScriptValue(0.0)",
+ "QScriptValue(123.0)",
+ "QScriptValue(6.37e-8)",
+ "QScriptValue(-6.37e-8)",
+ "QScriptValue(0x43211234)",
+ "QScriptValue(0x10000)",
+ "QScriptValue(0x10001)",
+ "QScriptValue(qSNaN())",
+ "QScriptValue(qQNaN())",
+ "QScriptValue(qInf())",
+ "QScriptValue(-qInf())",
+ "QScriptValue(0, int(122))",
+ "QScriptValue(0, uint(124))",
+ "QScriptValue(0, 0)",
+ "QScriptValue(0, 0.0)",
+ "QScriptValue(0, 123.0)",
+ "QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0x10001)",
+ "QScriptValue(0, qSNaN())",
+ "QScriptValue(0, qQNaN())",
+ "QScriptValue(0, qInf())",
+ "QScriptValue(0, -qInf())",
+ "QScriptValue(engine, int(122))",
+ "QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, qSNaN())",
+ "QScriptValue(engine, qQNaN())",
+ "QScriptValue(engine, qInf())",
+ "QScriptValue(engine, -qInf())",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"122\")",
+ "engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\")",
+ "engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"NaN\")",
+ "engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\")",};
+
+void tst_QScriptValue::isNumber_makeData(const char* expr)
+{
+ static QSet<QString> isNumber;
+ if (isNumber.isEmpty()) {
+ isNumber.reserve(56);
+ for (unsigned i = 0; i < 56; ++i)
+ isNumber.insert(isNumber_array[i]);
+ }
+ newRow(expr) << isNumber.contains(expr);
+}
+
+void tst_QScriptValue::isNumber_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isNumber(), expected);
+ QCOMPARE(value.isNumber(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isNumber)
+
+
+void tst_QScriptValue::isFunction_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString isFunction_array [] = {
+ "engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\")",
+ "engine->newQMetaObject(&QObject::staticMetaObject)",};
+
+void tst_QScriptValue::isFunction_makeData(const char* expr)
+{
+ static QSet<QString> isFunction;
+ if (isFunction.isEmpty()) {
+ isFunction.reserve(10);
+ for (unsigned i = 0; i < 10; ++i)
+ isFunction.insert(isFunction_array[i]);
+ }
+ newRow(expr) << isFunction.contains(expr);
+}
+
+void tst_QScriptValue::isFunction_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isFunction(), expected);
+ QCOMPARE(value.isFunction(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isFunction)
+
+
+void tst_QScriptValue::isNull_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString isNull_array [] = {
+ "QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(engine, QScriptValue::NullValue)",
+ "engine->evaluate(\"null\")",
+ "engine->nullValue()",
+ "engine->newQObject(0)",};
+
+void tst_QScriptValue::isNull_makeData(const char* expr)
+{
+ static QSet<QString> isNull;
+ if (isNull.isEmpty()) {
+ isNull.reserve(6);
+ for (unsigned i = 0; i < 6; ++i)
+ isNull.insert(isNull_array[i]);
+ }
+ newRow(expr) << isNull.contains(expr);
+}
+
+void tst_QScriptValue::isNull_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isNull(), expected);
+ QCOMPARE(value.isNull(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isNull)
+
+
+void tst_QScriptValue::isString_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString isString_array [] = {
+ "QScriptValue(\"NaN\")",
+ "QScriptValue(\"Infinity\")",
+ "QScriptValue(\"-Infinity\")",
+ "QScriptValue(\"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\"))",
+ "QScriptValue(QString())",
+ "QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString())",
+ "QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\")",
+ "engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'12.4'\")",};
+
+void tst_QScriptValue::isString_makeData(const char* expr)
+{
+ static QSet<QString> isString;
+ if (isString.isEmpty()) {
+ isString.reserve(35);
+ for (unsigned i = 0; i < 35; ++i)
+ isString.insert(isString_array[i]);
+ }
+ newRow(expr) << isString.contains(expr);
+}
+
+void tst_QScriptValue::isString_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isString(), expected);
+ QCOMPARE(value.isString(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isString)
+
+
+void tst_QScriptValue::isUndefined_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString isUndefined_array [] = {
+ "QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "engine->evaluate(\"{}\")",
+ "engine->evaluate(\"undefined\")",
+ "engine->undefinedValue()",};
+
+void tst_QScriptValue::isUndefined_makeData(const char* expr)
+{
+ static QSet<QString> isUndefined;
+ if (isUndefined.isEmpty()) {
+ isUndefined.reserve(6);
+ for (unsigned i = 0; i < 6; ++i)
+ isUndefined.insert(isUndefined_array[i]);
+ }
+ newRow(expr) << isUndefined.contains(expr);
+}
+
+void tst_QScriptValue::isUndefined_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isUndefined(), expected);
+ QCOMPARE(value.isUndefined(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isUndefined)
+
+
+void tst_QScriptValue::isVariant_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString isVariant_array [] = {
+ "engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false))",};
+
+void tst_QScriptValue::isVariant_makeData(const char* expr)
+{
+ static QSet<QString> isVariant;
+ if (isVariant.isEmpty()) {
+ isVariant.reserve(3);
+ for (unsigned i = 0; i < 3; ++i)
+ isVariant.insert(isVariant_array[i]);
+ }
+ newRow(expr) << isVariant.contains(expr);
+}
+
+void tst_QScriptValue::isVariant_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isVariant(), expected);
+ QCOMPARE(value.isVariant(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isVariant)
+
+
+void tst_QScriptValue::isQObject_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString isQObject_array [] = {
+ "engine->newQObject(engine)",};
+
+void tst_QScriptValue::isQObject_makeData(const char* expr)
+{
+ static QSet<QString> isQObject;
+ if (isQObject.isEmpty()) {
+ isQObject.reserve(1);
+ for (unsigned i = 0; i < 1; ++i)
+ isQObject.insert(isQObject_array[i]);
+ }
+ newRow(expr) << isQObject.contains(expr);
+}
+
+void tst_QScriptValue::isQObject_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isQObject(), expected);
+ QCOMPARE(value.isQObject(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isQObject)
+
+
+void tst_QScriptValue::isQMetaObject_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString isQMetaObject_array [] = {
+ "engine->newQMetaObject(&QObject::staticMetaObject)",};
+
+void tst_QScriptValue::isQMetaObject_makeData(const char* expr)
+{
+ static QSet<QString> isQMetaObject;
+ if (isQMetaObject.isEmpty()) {
+ isQMetaObject.reserve(1);
+ for (unsigned i = 0; i < 1; ++i)
+ isQMetaObject.insert(isQMetaObject_array[i]);
+ }
+ newRow(expr) << isQMetaObject.contains(expr);
+}
+
+void tst_QScriptValue::isQMetaObject_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isQMetaObject(), expected);
+ QCOMPARE(value.isQMetaObject(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isQMetaObject)
+
+
+void tst_QScriptValue::isObject_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString isObject_array [] = {
+ "engine->evaluate(\"[]\")",
+ "engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Date.prototype\")",
+ "engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\")",
+ "engine->newObject()",
+ "engine->newArray()",
+ "engine->newArray(10)",
+ "engine->newDate(QDateTime())",
+ "engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false))",
+ "engine->newQObject(engine)",};
+
+void tst_QScriptValue::isObject_makeData(const char* expr)
+{
+ static QSet<QString> isObject;
+ if (isObject.isEmpty()) {
+ isObject.reserve(30);
+ for (unsigned i = 0; i < 30; ++i)
+ isObject.insert(isObject_array[i]);
+ }
+ newRow(expr) << isObject.contains(expr);
+}
+
+void tst_QScriptValue::isObject_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isObject(), expected);
+ QCOMPARE(value.isObject(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isObject)
+
+
+void tst_QScriptValue::isDate_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString isDate_array [] = {
+ "engine->evaluate(\"Date.prototype\")",
+ "engine->newDate(QDateTime())",};
+
+void tst_QScriptValue::isDate_makeData(const char* expr)
+{
+ static QSet<QString> isDate;
+ if (isDate.isEmpty()) {
+ isDate.reserve(2);
+ for (unsigned i = 0; i < 2; ++i)
+ isDate.insert(isDate_array[i]);
+ }
+ newRow(expr) << isDate.contains(expr);
+}
+
+void tst_QScriptValue::isDate_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isDate(), expected);
+ QCOMPARE(value.isDate(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isDate)
+
+
+void tst_QScriptValue::isRegExp_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString isRegExp_array [] = {
+ "engine->evaluate(\"/foo/\")",};
+
+void tst_QScriptValue::isRegExp_makeData(const char* expr)
+{
+ static QSet<QString> isRegExp;
+ if (isRegExp.isEmpty()) {
+ isRegExp.reserve(1);
+ for (unsigned i = 0; i < 1; ++i)
+ isRegExp.insert(isRegExp_array[i]);
+ }
+ newRow(expr) << isRegExp.contains(expr);
+}
+
+void tst_QScriptValue::isRegExp_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isRegExp(), expected);
+ QCOMPARE(value.isRegExp(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isRegExp)
+
+
+void tst_QScriptValue::isArray_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString isArray_array [] = {
+ "engine->evaluate(\"[]\")",
+ "engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"new Array()\")",
+ "engine->newArray()",
+ "engine->newArray(10)",};
+
+void tst_QScriptValue::isArray_makeData(const char* expr)
+{
+ static QSet<QString> isArray;
+ if (isArray.isEmpty()) {
+ isArray.reserve(5);
+ for (unsigned i = 0; i < 5; ++i)
+ isArray.insert(isArray_array[i]);
+ }
+ newRow(expr) << isArray.contains(expr);
+}
+
+void tst_QScriptValue::isArray_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isArray(), expected);
+ QCOMPARE(value.isArray(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isArray)
+
+
+void tst_QScriptValue::isError_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString isError_array [] = {
+ "engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\")",};
+
+void tst_QScriptValue::isError_makeData(const char* expr)
+{
+ static QSet<QString> isError;
+ if (isError.isEmpty()) {
+ isError.reserve(6);
+ for (unsigned i = 0; i < 6; ++i)
+ isError.insert(isError_array[i]);
+ }
+ newRow(expr) << isError.contains(expr);
+}
+
+void tst_QScriptValue::isError_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isError(), expected);
+ QCOMPARE(value.isError(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isError)
+
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated_toXXX.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_toXXX.cpp
new file mode 100644
index 0000000000..754f4e0b25
--- /dev/null
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_toXXX.cpp
@@ -0,0 +1,1897 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+*************** This file has been generated. DO NOT MODIFY! ****************
+****************************************************************************/
+
+#include "tst_qscriptvalue.h"
+
+
+
+void tst_QScriptValue::toString_initData()
+{
+ QTest::addColumn<QString>("expected");
+ initScriptValues();
+}
+
+static QString toString_tagArray [] = {
+ "QScriptValue()",
+ "QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(true)",
+ "QScriptValue(false)",
+ "QScriptValue(int(122))",
+ "QScriptValue(uint(124))",
+ "QScriptValue(0)",
+ "QScriptValue(0.0)",
+ "QScriptValue(123.0)",
+ "QScriptValue(6.37e-8)",
+ "QScriptValue(-6.37e-8)",
+ "QScriptValue(0x43211234)",
+ "QScriptValue(0x10000)",
+ "QScriptValue(0x10001)",
+ "QScriptValue(qSNaN())",
+ "QScriptValue(qQNaN())",
+ "QScriptValue(qInf())",
+ "QScriptValue(-qInf())",
+ "QScriptValue(\"NaN\")",
+ "QScriptValue(\"Infinity\")",
+ "QScriptValue(\"-Infinity\")",
+ "QScriptValue(\"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\"))",
+ "QScriptValue(QString())",
+ "QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, true)",
+ "QScriptValue(0, false)",
+ "QScriptValue(0, int(122))",
+ "QScriptValue(0, uint(124))",
+ "QScriptValue(0, 0)",
+ "QScriptValue(0, 0.0)",
+ "QScriptValue(0, 123.0)",
+ "QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0x10001)",
+ "QScriptValue(0, qSNaN())",
+ "QScriptValue(0, qQNaN())",
+ "QScriptValue(0, qInf())",
+ "QScriptValue(0, -qInf())",
+ "QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString())",
+ "QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, true)",
+ "QScriptValue(engine, false)",
+ "QScriptValue(engine, int(122))",
+ "QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, qSNaN())",
+ "QScriptValue(engine, qQNaN())",
+ "QScriptValue(engine, qInf())",
+ "QScriptValue(engine, -qInf())",
+ "QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"[]\")",
+ "engine->evaluate(\"{}\")",
+ "engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Date.prototype\")",
+ "engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\")",
+ "engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"null\")",
+ "engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\")",
+ "engine->evaluate(\"122\")",
+ "engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\")",
+ "engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"NaN\")",
+ "engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\")",
+ "engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\")",
+ "engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'12.4'\")",
+ "engine->nullValue()",
+ "engine->undefinedValue()",
+ "engine->newObject()",
+ "engine->newArray()",
+ "engine->newArray(10)",
+ "engine->newDate(QDateTime())",
+ "engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false))",
+ "engine->newQObject(0)",
+ "engine->newQObject(engine)",};
+
+static QString toString_valueArray [] = {
+ "", "undefined",
+ "null", "true",
+ "false", "122",
+ "124", "0",
+ "0", "123",
+ "6.37e-8", "-6.37e-8",
+ "1126240820", "65536",
+ "65537", "NaN",
+ "NaN", "Infinity",
+ "-Infinity", "NaN",
+ "Infinity", "-Infinity",
+ "ciao", "ciao",
+ "", "",
+ "0", "123",
+ "12.4", "undefined",
+ "null", "true",
+ "false", "122",
+ "124", "0",
+ "0", "123",
+ "6.37e-8", "-6.37e-8",
+ "1126240820", "65536",
+ "65537", "NaN",
+ "NaN", "Infinity",
+ "-Infinity", "NaN",
+ "Infinity", "-Infinity",
+ "ciao", "ciao",
+ "", "",
+ "0", "123",
+ "12.3", "undefined",
+ "null", "true",
+ "false", "122",
+ "124", "0",
+ "0", "123",
+ "6.37e-8", "-6.37e-8",
+ "1126240820", "65536",
+ "65537", "NaN",
+ "NaN", "Infinity",
+ "-Infinity", "NaN",
+ "Infinity", "-Infinity",
+ "ciao", "ciao",
+ "", "",
+ "0", "123",
+ "1.23", "",
+ "undefined", "[object Object]",
+ "Invalid Date", "",
+ "function () {\n [native code]\n}", "Error: Unknown error",
+ "function Object() {\n [native code]\n}", "function Array() {\n [native code]\n}",
+ "function Number() {\n [native code]\n}", "function Function() {\n [native code]\n}",
+ "function () { return 1; }", "function () { return 'ciao'; }",
+ "function () { throw new Error('foo'); }", "/foo/",
+ "[object Object]", "",
+ "Error: Unknown error", "22",
+ "ReferenceError: Can't find variable: Undefined", "ReferenceError: Can't find variable: Null",
+ "ReferenceError: Can't find variable: True", "ReferenceError: Can't find variable: False",
+ "undefined", "null",
+ "true", "false",
+ "122", "124",
+ "0", "0",
+ "123", "6.37e-8",
+ "-6.37e-8", "1126240820",
+ "65536", "65537",
+ "NaN", "Infinity",
+ "-Infinity", "ciao",
+ "", "0",
+ "123", "12.4",
+ "null", "undefined",
+ "[object Object]", "",
+ ",,,,,,,,,", "Invalid Date",
+ "[object QMetaObject]", "undefined",
+ "123", "false",
+ "null", "QScriptEngine(name = \"\")", };
+
+void tst_QScriptValue::toString_makeData(const char* expr)
+{
+ static QHash<QString, QString> toString;
+ if (toString.isEmpty()) {
+ toString.reserve(142);
+ for (unsigned i = 0; i < 142; ++i)
+ toString.insert(toString_tagArray[i], toString_valueArray[i]);
+ }
+ newRow(expr) << toString.value(expr);
+}
+
+void tst_QScriptValue::toString_test(const char*, const QScriptValue& value)
+{
+ QFETCH(QString, expected);
+ QCOMPARE(value.toString(), expected);
+ QCOMPARE(value.toString(), expected);
+}
+
+DEFINE_TEST_FUNCTION(toString)
+
+
+void tst_QScriptValue::toNumber_initData()
+{
+ QTest::addColumn<qsreal>("expected");
+ initScriptValues();
+}
+
+static QString toNumber_tagArray [] = {
+ "QScriptValue()",
+ "QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(true)",
+ "QScriptValue(false)",
+ "QScriptValue(int(122))",
+ "QScriptValue(uint(124))",
+ "QScriptValue(0)",
+ "QScriptValue(0.0)",
+ "QScriptValue(123.0)",
+ "QScriptValue(6.37e-8)",
+ "QScriptValue(-6.37e-8)",
+ "QScriptValue(0x43211234)",
+ "QScriptValue(0x10000)",
+ "QScriptValue(0x10001)",
+ "QScriptValue(qSNaN())",
+ "QScriptValue(qQNaN())",
+ "QScriptValue(qInf())",
+ "QScriptValue(-qInf())",
+ "QScriptValue(\"NaN\")",
+ "QScriptValue(\"Infinity\")",
+ "QScriptValue(\"-Infinity\")",
+ "QScriptValue(\"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\"))",
+ "QScriptValue(QString())",
+ "QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, true)",
+ "QScriptValue(0, false)",
+ "QScriptValue(0, int(122))",
+ "QScriptValue(0, uint(124))",
+ "QScriptValue(0, 0)",
+ "QScriptValue(0, 0.0)",
+ "QScriptValue(0, 123.0)",
+ "QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0x10001)",
+ "QScriptValue(0, qSNaN())",
+ "QScriptValue(0, qQNaN())",
+ "QScriptValue(0, qInf())",
+ "QScriptValue(0, -qInf())",
+ "QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString())",
+ "QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, true)",
+ "QScriptValue(engine, false)",
+ "QScriptValue(engine, int(122))",
+ "QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, qSNaN())",
+ "QScriptValue(engine, qQNaN())",
+ "QScriptValue(engine, qInf())",
+ "QScriptValue(engine, -qInf())",
+ "QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"[]\")",
+ "engine->evaluate(\"{}\")",
+ "engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Date.prototype\")",
+ "engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\")",
+ "engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"null\")",
+ "engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\")",
+ "engine->evaluate(\"122\")",
+ "engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\")",
+ "engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"NaN\")",
+ "engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\")",
+ "engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\")",
+ "engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'12.4'\")",
+ "engine->nullValue()",
+ "engine->undefinedValue()",
+ "engine->newObject()",
+ "engine->newArray()",
+ "engine->newArray(10)",
+ "engine->newDate(QDateTime())",
+ "engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false))",
+ "engine->newQObject(0)",
+ "engine->newQObject(engine)",};
+static qsreal toNumber_valueArray [] = {
+ 0, qQNaN(), 0, 1, 0, 122, 124, 0, 0, 123,
+ 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, 65536, 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(),
+ qInf(), qInf(), qQNaN(), qQNaN(), 0, 0, 0, 123, 12.4, qQNaN(),
+ 0, 1, 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08,
+ 1126240820, 65536, 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(), qInf(), qInf(),
+ qQNaN(), qQNaN(), 0, 0, 0, 123, 12.3, qQNaN(), 0, 1,
+ 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, 65536,
+ 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(), qInf(), qInf(), qQNaN(), qQNaN(),
+ 0, 0, 0, 123, 1.23, 0, qQNaN(), qQNaN(), qQNaN(), 0,
+ qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(),
+ qQNaN(), 0, qQNaN(), 22, qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), 0,
+ 1, 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08, 1126240820,
+ 65536, 65537, qQNaN(), qInf(), qInf(), qQNaN(), 0, 0, 123, 12.4,
+ 0, qQNaN(), qQNaN(), 0, qQNaN(), qQNaN(), qQNaN(), qQNaN(), 123, 0,
+ 0, qQNaN(), };
+void tst_QScriptValue::toNumber_makeData(const char* expr)
+{
+ static QHash<QString, qsreal> toNumber;
+ if (toNumber.isEmpty()) {
+ toNumber.reserve(142);
+ for (unsigned i = 0; i < 142; ++i)
+ toNumber.insert(toNumber_tagArray[i], toNumber_valueArray[i]);
+ }
+ newRow(expr) << toNumber.value(expr);
+}
+
+void tst_QScriptValue::toNumber_test(const char*, const QScriptValue& value)
+{
+ QFETCH(qsreal, expected);
+ if (qIsNaN(expected)) {
+ QVERIFY(qIsNaN(value.toNumber()));
+ return;
+ }
+ if (qIsInf(expected)) {
+ QVERIFY(qIsInf(value.toNumber()));
+ QVERIFY(qIsInf(value.toNumber()));
+ return;
+ }
+ QCOMPARE(value.toNumber(), expected);
+ QCOMPARE(value.toNumber(), expected);
+}
+
+DEFINE_TEST_FUNCTION(toNumber)
+
+
+void tst_QScriptValue::toBool_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString toBool_tagArray [] = {
+ "QScriptValue()",
+ "QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(true)",
+ "QScriptValue(false)",
+ "QScriptValue(int(122))",
+ "QScriptValue(uint(124))",
+ "QScriptValue(0)",
+ "QScriptValue(0.0)",
+ "QScriptValue(123.0)",
+ "QScriptValue(6.37e-8)",
+ "QScriptValue(-6.37e-8)",
+ "QScriptValue(0x43211234)",
+ "QScriptValue(0x10000)",
+ "QScriptValue(0x10001)",
+ "QScriptValue(qSNaN())",
+ "QScriptValue(qQNaN())",
+ "QScriptValue(qInf())",
+ "QScriptValue(-qInf())",
+ "QScriptValue(\"NaN\")",
+ "QScriptValue(\"Infinity\")",
+ "QScriptValue(\"-Infinity\")",
+ "QScriptValue(\"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\"))",
+ "QScriptValue(QString())",
+ "QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, true)",
+ "QScriptValue(0, false)",
+ "QScriptValue(0, int(122))",
+ "QScriptValue(0, uint(124))",
+ "QScriptValue(0, 0)",
+ "QScriptValue(0, 0.0)",
+ "QScriptValue(0, 123.0)",
+ "QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0x10001)",
+ "QScriptValue(0, qSNaN())",
+ "QScriptValue(0, qQNaN())",
+ "QScriptValue(0, qInf())",
+ "QScriptValue(0, -qInf())",
+ "QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString())",
+ "QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, true)",
+ "QScriptValue(engine, false)",
+ "QScriptValue(engine, int(122))",
+ "QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, qSNaN())",
+ "QScriptValue(engine, qQNaN())",
+ "QScriptValue(engine, qInf())",
+ "QScriptValue(engine, -qInf())",
+ "QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"[]\")",
+ "engine->evaluate(\"{}\")",
+ "engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Date.prototype\")",
+ "engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\")",
+ "engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"null\")",
+ "engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\")",
+ "engine->evaluate(\"122\")",
+ "engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\")",
+ "engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"NaN\")",
+ "engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\")",
+ "engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\")",
+ "engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'12.4'\")",
+ "engine->nullValue()",
+ "engine->undefinedValue()",
+ "engine->newObject()",
+ "engine->newArray()",
+ "engine->newArray(10)",
+ "engine->newDate(QDateTime())",
+ "engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false))",
+ "engine->newQObject(0)",
+ "engine->newQObject(engine)",};
+
+static bool toBool_valueArray [] = {
+ false, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, true,
+ true, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, true,
+ true, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, true,
+ true, true,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, false,
+ true, true,
+ false, false,
+ true, true,
+ true, true,
+ true, true,
+ false, true,
+ true, true,
+ false, true,
+ true, true,
+ false, false,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ false, true, };
+
+void tst_QScriptValue::toBool_makeData(const char* expr)
+{
+ static QHash<QString, bool> toBool;
+ if (toBool.isEmpty()) {
+ toBool.reserve(142);
+ for (unsigned i = 0; i < 142; ++i)
+ toBool.insert(toBool_tagArray[i], toBool_valueArray[i]);
+ }
+ newRow(expr) << toBool.value(expr);
+}
+
+void tst_QScriptValue::toBool_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.toBool(), expected);
+ QCOMPARE(value.toBool(), expected);
+}
+
+DEFINE_TEST_FUNCTION(toBool)
+
+
+void tst_QScriptValue::toBoolean_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+static QString toBoolean_tagArray [] = {
+ "QScriptValue()",
+ "QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(true)",
+ "QScriptValue(false)",
+ "QScriptValue(int(122))",
+ "QScriptValue(uint(124))",
+ "QScriptValue(0)",
+ "QScriptValue(0.0)",
+ "QScriptValue(123.0)",
+ "QScriptValue(6.37e-8)",
+ "QScriptValue(-6.37e-8)",
+ "QScriptValue(0x43211234)",
+ "QScriptValue(0x10000)",
+ "QScriptValue(0x10001)",
+ "QScriptValue(qSNaN())",
+ "QScriptValue(qQNaN())",
+ "QScriptValue(qInf())",
+ "QScriptValue(-qInf())",
+ "QScriptValue(\"NaN\")",
+ "QScriptValue(\"Infinity\")",
+ "QScriptValue(\"-Infinity\")",
+ "QScriptValue(\"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\"))",
+ "QScriptValue(QString())",
+ "QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, true)",
+ "QScriptValue(0, false)",
+ "QScriptValue(0, int(122))",
+ "QScriptValue(0, uint(124))",
+ "QScriptValue(0, 0)",
+ "QScriptValue(0, 0.0)",
+ "QScriptValue(0, 123.0)",
+ "QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0x10001)",
+ "QScriptValue(0, qSNaN())",
+ "QScriptValue(0, qQNaN())",
+ "QScriptValue(0, qInf())",
+ "QScriptValue(0, -qInf())",
+ "QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString())",
+ "QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, true)",
+ "QScriptValue(engine, false)",
+ "QScriptValue(engine, int(122))",
+ "QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, qSNaN())",
+ "QScriptValue(engine, qQNaN())",
+ "QScriptValue(engine, qInf())",
+ "QScriptValue(engine, -qInf())",
+ "QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"[]\")",
+ "engine->evaluate(\"{}\")",
+ "engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Date.prototype\")",
+ "engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\")",
+ "engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"null\")",
+ "engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\")",
+ "engine->evaluate(\"122\")",
+ "engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\")",
+ "engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"NaN\")",
+ "engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\")",
+ "engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\")",
+ "engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'12.4'\")",
+ "engine->nullValue()",
+ "engine->undefinedValue()",
+ "engine->newObject()",
+ "engine->newArray()",
+ "engine->newArray(10)",
+ "engine->newDate(QDateTime())",
+ "engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false))",
+ "engine->newQObject(0)",
+ "engine->newQObject(engine)",};
+
+static bool toBoolean_valueArray [] = {
+ false, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, true,
+ true, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, true,
+ true, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, true,
+ true, true,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, false,
+ true, true,
+ false, false,
+ true, true,
+ true, true,
+ true, true,
+ false, true,
+ true, true,
+ false, true,
+ true, true,
+ false, false,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ false, true, };
+
+void tst_QScriptValue::toBoolean_makeData(const char* expr)
+{
+ static QHash<QString, bool> toBoolean;
+ if (toBoolean.isEmpty()) {
+ toBoolean.reserve(142);
+ for (unsigned i = 0; i < 142; ++i)
+ toBoolean.insert(toBoolean_tagArray[i], toBoolean_valueArray[i]);
+ }
+ newRow(expr) << toBoolean.value(expr);
+}
+
+void tst_QScriptValue::toBoolean_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.toBoolean(), expected);
+ QCOMPARE(value.toBoolean(), expected);
+}
+
+DEFINE_TEST_FUNCTION(toBoolean)
+
+
+void tst_QScriptValue::toInteger_initData()
+{
+ QTest::addColumn<qsreal>("expected");
+ initScriptValues();
+}
+
+static QString toInteger_tagArray [] = {
+ "QScriptValue()",
+ "QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(true)",
+ "QScriptValue(false)",
+ "QScriptValue(int(122))",
+ "QScriptValue(uint(124))",
+ "QScriptValue(0)",
+ "QScriptValue(0.0)",
+ "QScriptValue(123.0)",
+ "QScriptValue(6.37e-8)",
+ "QScriptValue(-6.37e-8)",
+ "QScriptValue(0x43211234)",
+ "QScriptValue(0x10000)",
+ "QScriptValue(0x10001)",
+ "QScriptValue(qSNaN())",
+ "QScriptValue(qQNaN())",
+ "QScriptValue(qInf())",
+ "QScriptValue(-qInf())",
+ "QScriptValue(\"NaN\")",
+ "QScriptValue(\"Infinity\")",
+ "QScriptValue(\"-Infinity\")",
+ "QScriptValue(\"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\"))",
+ "QScriptValue(QString())",
+ "QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, true)",
+ "QScriptValue(0, false)",
+ "QScriptValue(0, int(122))",
+ "QScriptValue(0, uint(124))",
+ "QScriptValue(0, 0)",
+ "QScriptValue(0, 0.0)",
+ "QScriptValue(0, 123.0)",
+ "QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0x10001)",
+ "QScriptValue(0, qSNaN())",
+ "QScriptValue(0, qQNaN())",
+ "QScriptValue(0, qInf())",
+ "QScriptValue(0, -qInf())",
+ "QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString())",
+ "QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, true)",
+ "QScriptValue(engine, false)",
+ "QScriptValue(engine, int(122))",
+ "QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, qSNaN())",
+ "QScriptValue(engine, qQNaN())",
+ "QScriptValue(engine, qInf())",
+ "QScriptValue(engine, -qInf())",
+ "QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"[]\")",
+ "engine->evaluate(\"{}\")",
+ "engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Date.prototype\")",
+ "engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\")",
+ "engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"null\")",
+ "engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\")",
+ "engine->evaluate(\"122\")",
+ "engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\")",
+ "engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"NaN\")",
+ "engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\")",
+ "engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\")",
+ "engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'12.4'\")",
+ "engine->nullValue()",
+ "engine->undefinedValue()",
+ "engine->newObject()",
+ "engine->newArray()",
+ "engine->newArray(10)",
+ "engine->newDate(QDateTime())",
+ "engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false))",
+ "engine->newQObject(0)",
+ "engine->newQObject(engine)",};
+static qsreal toInteger_valueArray [] = {
+ 0, 0, 0, 1, 0, 122, 124, 0, 0, 123,
+ 0, 0, 1126240820, 65536, 65537, 0, 0, qInf(), qInf(), 0,
+ qInf(), qInf(), 0, 0, 0, 0, 0, 123, 12, 0,
+ 0, 1, 0, 122, 124, 0, 0, 123, 0, 0,
+ 1126240820, 65536, 65537, 0, 0, qInf(), qInf(), 0, qInf(), qInf(),
+ 0, 0, 0, 0, 0, 123, 12, 0, 0, 1,
+ 0, 122, 124, 0, 0, 123, 0, 0, 1126240820, 65536,
+ 65537, 0, 0, qInf(), qInf(), 0, qInf(), qInf(), 0, 0,
+ 0, 0, 0, 123, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 22, 0, 0, 0, 0, 0, 0,
+ 1, 0, 122, 124, 0, 0, 123, 0, 0, 1126240820,
+ 65536, 65537, 0, qInf(), qInf(), 0, 0, 0, 123, 12,
+ 0, 0, 0, 0, 0, 0, 0, 0, 123, 0,
+ 0, 0, };
+void tst_QScriptValue::toInteger_makeData(const char* expr)
+{
+ static QHash<QString, qsreal> toInteger;
+ if (toInteger.isEmpty()) {
+ toInteger.reserve(142);
+ for (unsigned i = 0; i < 142; ++i)
+ toInteger.insert(toInteger_tagArray[i], toInteger_valueArray[i]);
+ }
+ newRow(expr) << toInteger.value(expr);
+}
+
+void tst_QScriptValue::toInteger_test(const char*, const QScriptValue& value)
+{
+ QFETCH(qsreal, expected);
+ if (qIsInf(expected)) {
+ QVERIFY(qIsInf(value.toInteger()));
+ QVERIFY(qIsInf(value.toInteger()));
+ return;
+ }
+ QCOMPARE(value.toInteger(), expected);
+ QCOMPARE(value.toInteger(), expected);
+}
+
+DEFINE_TEST_FUNCTION(toInteger)
+
+
+void tst_QScriptValue::toInt32_initData()
+{
+ QTest::addColumn<qint32>("expected");
+ initScriptValues();
+}
+
+static QString toInt32_tagArray [] = {
+ "QScriptValue()",
+ "QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(true)",
+ "QScriptValue(false)",
+ "QScriptValue(int(122))",
+ "QScriptValue(uint(124))",
+ "QScriptValue(0)",
+ "QScriptValue(0.0)",
+ "QScriptValue(123.0)",
+ "QScriptValue(6.37e-8)",
+ "QScriptValue(-6.37e-8)",
+ "QScriptValue(0x43211234)",
+ "QScriptValue(0x10000)",
+ "QScriptValue(0x10001)",
+ "QScriptValue(qSNaN())",
+ "QScriptValue(qQNaN())",
+ "QScriptValue(qInf())",
+ "QScriptValue(-qInf())",
+ "QScriptValue(\"NaN\")",
+ "QScriptValue(\"Infinity\")",
+ "QScriptValue(\"-Infinity\")",
+ "QScriptValue(\"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\"))",
+ "QScriptValue(QString())",
+ "QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, true)",
+ "QScriptValue(0, false)",
+ "QScriptValue(0, int(122))",
+ "QScriptValue(0, uint(124))",
+ "QScriptValue(0, 0)",
+ "QScriptValue(0, 0.0)",
+ "QScriptValue(0, 123.0)",
+ "QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0x10001)",
+ "QScriptValue(0, qSNaN())",
+ "QScriptValue(0, qQNaN())",
+ "QScriptValue(0, qInf())",
+ "QScriptValue(0, -qInf())",
+ "QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString())",
+ "QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, true)",
+ "QScriptValue(engine, false)",
+ "QScriptValue(engine, int(122))",
+ "QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, qSNaN())",
+ "QScriptValue(engine, qQNaN())",
+ "QScriptValue(engine, qInf())",
+ "QScriptValue(engine, -qInf())",
+ "QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"[]\")",
+ "engine->evaluate(\"{}\")",
+ "engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Date.prototype\")",
+ "engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\")",
+ "engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"null\")",
+ "engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\")",
+ "engine->evaluate(\"122\")",
+ "engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\")",
+ "engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"NaN\")",
+ "engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\")",
+ "engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\")",
+ "engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'12.4'\")",
+ "engine->nullValue()",
+ "engine->undefinedValue()",
+ "engine->newObject()",
+ "engine->newArray()",
+ "engine->newArray(10)",
+ "engine->newDate(QDateTime())",
+ "engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false))",
+ "engine->newQObject(0)",
+ "engine->newQObject(engine)",};
+
+static qint32 toInt32_valueArray [] = {
+ 0, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 22,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 1, 0,
+ 122, 124,
+ 0, 0,
+ 123, 0,
+ 0, 1126240820,
+ 65536, 65537,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 123, 12,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 123, 0,
+ 0, 0, };
+
+void tst_QScriptValue::toInt32_makeData(const char* expr)
+{
+ static QHash<QString, qint32> toInt32;
+ if (toInt32.isEmpty()) {
+ toInt32.reserve(142);
+ for (unsigned i = 0; i < 142; ++i)
+ toInt32.insert(toInt32_tagArray[i], toInt32_valueArray[i]);
+ }
+ newRow(expr) << toInt32.value(expr);
+}
+
+void tst_QScriptValue::toInt32_test(const char*, const QScriptValue& value)
+{
+ QFETCH(qint32, expected);
+ QCOMPARE(value.toInt32(), expected);
+ QCOMPARE(value.toInt32(), expected);
+}
+
+DEFINE_TEST_FUNCTION(toInt32)
+
+
+void tst_QScriptValue::toUInt32_initData()
+{
+ QTest::addColumn<quint32>("expected");
+ initScriptValues();
+}
+
+static QString toUInt32_tagArray [] = {
+ "QScriptValue()",
+ "QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(true)",
+ "QScriptValue(false)",
+ "QScriptValue(int(122))",
+ "QScriptValue(uint(124))",
+ "QScriptValue(0)",
+ "QScriptValue(0.0)",
+ "QScriptValue(123.0)",
+ "QScriptValue(6.37e-8)",
+ "QScriptValue(-6.37e-8)",
+ "QScriptValue(0x43211234)",
+ "QScriptValue(0x10000)",
+ "QScriptValue(0x10001)",
+ "QScriptValue(qSNaN())",
+ "QScriptValue(qQNaN())",
+ "QScriptValue(qInf())",
+ "QScriptValue(-qInf())",
+ "QScriptValue(\"NaN\")",
+ "QScriptValue(\"Infinity\")",
+ "QScriptValue(\"-Infinity\")",
+ "QScriptValue(\"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\"))",
+ "QScriptValue(QString())",
+ "QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, true)",
+ "QScriptValue(0, false)",
+ "QScriptValue(0, int(122))",
+ "QScriptValue(0, uint(124))",
+ "QScriptValue(0, 0)",
+ "QScriptValue(0, 0.0)",
+ "QScriptValue(0, 123.0)",
+ "QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0x10001)",
+ "QScriptValue(0, qSNaN())",
+ "QScriptValue(0, qQNaN())",
+ "QScriptValue(0, qInf())",
+ "QScriptValue(0, -qInf())",
+ "QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString())",
+ "QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, true)",
+ "QScriptValue(engine, false)",
+ "QScriptValue(engine, int(122))",
+ "QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, qSNaN())",
+ "QScriptValue(engine, qQNaN())",
+ "QScriptValue(engine, qInf())",
+ "QScriptValue(engine, -qInf())",
+ "QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"[]\")",
+ "engine->evaluate(\"{}\")",
+ "engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Date.prototype\")",
+ "engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\")",
+ "engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"null\")",
+ "engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\")",
+ "engine->evaluate(\"122\")",
+ "engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\")",
+ "engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"NaN\")",
+ "engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\")",
+ "engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\")",
+ "engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'12.4'\")",
+ "engine->nullValue()",
+ "engine->undefinedValue()",
+ "engine->newObject()",
+ "engine->newArray()",
+ "engine->newArray(10)",
+ "engine->newDate(QDateTime())",
+ "engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false))",
+ "engine->newQObject(0)",
+ "engine->newQObject(engine)",};
+
+static quint32 toUInt32_valueArray [] = {
+ 0, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 22,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 1, 0,
+ 122, 124,
+ 0, 0,
+ 123, 0,
+ 0, 1126240820,
+ 65536, 65537,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 123, 12,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 123, 0,
+ 0, 0, };
+
+void tst_QScriptValue::toUInt32_makeData(const char* expr)
+{
+ static QHash<QString, quint32> toUInt32;
+ if (toUInt32.isEmpty()) {
+ toUInt32.reserve(142);
+ for (unsigned i = 0; i < 142; ++i)
+ toUInt32.insert(toUInt32_tagArray[i], toUInt32_valueArray[i]);
+ }
+ newRow(expr) << toUInt32.value(expr);
+}
+
+void tst_QScriptValue::toUInt32_test(const char*, const QScriptValue& value)
+{
+ QFETCH(quint32, expected);
+ QCOMPARE(value.toUInt32(), expected);
+ QCOMPARE(value.toUInt32(), expected);
+}
+
+DEFINE_TEST_FUNCTION(toUInt32)
+
+
+void tst_QScriptValue::toUInt16_initData()
+{
+ QTest::addColumn<quint16>("expected");
+ initScriptValues();
+}
+
+static QString toUInt16_tagArray [] = {
+ "QScriptValue()",
+ "QScriptValue(QScriptValue::UndefinedValue)",
+ "QScriptValue(QScriptValue::NullValue)",
+ "QScriptValue(true)",
+ "QScriptValue(false)",
+ "QScriptValue(int(122))",
+ "QScriptValue(uint(124))",
+ "QScriptValue(0)",
+ "QScriptValue(0.0)",
+ "QScriptValue(123.0)",
+ "QScriptValue(6.37e-8)",
+ "QScriptValue(-6.37e-8)",
+ "QScriptValue(0x43211234)",
+ "QScriptValue(0x10000)",
+ "QScriptValue(0x10001)",
+ "QScriptValue(qSNaN())",
+ "QScriptValue(qQNaN())",
+ "QScriptValue(qInf())",
+ "QScriptValue(-qInf())",
+ "QScriptValue(\"NaN\")",
+ "QScriptValue(\"Infinity\")",
+ "QScriptValue(\"-Infinity\")",
+ "QScriptValue(\"ciao\")",
+ "QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString(\"\"))",
+ "QScriptValue(QString())",
+ "QScriptValue(QString(\"0\"))",
+ "QScriptValue(QString(\"123\"))",
+ "QScriptValue(QString(\"12.4\"))",
+ "QScriptValue(0, QScriptValue::UndefinedValue)",
+ "QScriptValue(0, QScriptValue::NullValue)",
+ "QScriptValue(0, true)",
+ "QScriptValue(0, false)",
+ "QScriptValue(0, int(122))",
+ "QScriptValue(0, uint(124))",
+ "QScriptValue(0, 0)",
+ "QScriptValue(0, 0.0)",
+ "QScriptValue(0, 123.0)",
+ "QScriptValue(0, 6.37e-8)",
+ "QScriptValue(0, -6.37e-8)",
+ "QScriptValue(0, 0x43211234)",
+ "QScriptValue(0, 0x10000)",
+ "QScriptValue(0, 0x10001)",
+ "QScriptValue(0, qSNaN())",
+ "QScriptValue(0, qQNaN())",
+ "QScriptValue(0, qInf())",
+ "QScriptValue(0, -qInf())",
+ "QScriptValue(0, \"NaN\")",
+ "QScriptValue(0, \"Infinity\")",
+ "QScriptValue(0, \"-Infinity\")",
+ "QScriptValue(0, \"ciao\")",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString(\"\"))",
+ "QScriptValue(0, QString())",
+ "QScriptValue(0, QString(\"0\"))",
+ "QScriptValue(0, QString(\"123\"))",
+ "QScriptValue(0, QString(\"12.3\"))",
+ "QScriptValue(engine, QScriptValue::UndefinedValue)",
+ "QScriptValue(engine, QScriptValue::NullValue)",
+ "QScriptValue(engine, true)",
+ "QScriptValue(engine, false)",
+ "QScriptValue(engine, int(122))",
+ "QScriptValue(engine, uint(124))",
+ "QScriptValue(engine, 0)",
+ "QScriptValue(engine, 0.0)",
+ "QScriptValue(engine, 123.0)",
+ "QScriptValue(engine, 6.37e-8)",
+ "QScriptValue(engine, -6.37e-8)",
+ "QScriptValue(engine, 0x43211234)",
+ "QScriptValue(engine, 0x10000)",
+ "QScriptValue(engine, 0x10001)",
+ "QScriptValue(engine, qSNaN())",
+ "QScriptValue(engine, qQNaN())",
+ "QScriptValue(engine, qInf())",
+ "QScriptValue(engine, -qInf())",
+ "QScriptValue(engine, \"NaN\")",
+ "QScriptValue(engine, \"Infinity\")",
+ "QScriptValue(engine, \"-Infinity\")",
+ "QScriptValue(engine, \"ciao\")",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString(\"\"))",
+ "QScriptValue(engine, QString())",
+ "QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"[]\")",
+ "engine->evaluate(\"{}\")",
+ "engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"Date.prototype\")",
+ "engine->evaluate(\"Array.prototype\")",
+ "engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"Object\")",
+ "engine->evaluate(\"Array\")",
+ "engine->evaluate(\"Number\")",
+ "engine->evaluate(\"Function\")",
+ "engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"Null\")",
+ "engine->evaluate(\"True\")",
+ "engine->evaluate(\"False\")",
+ "engine->evaluate(\"undefined\")",
+ "engine->evaluate(\"null\")",
+ "engine->evaluate(\"true\")",
+ "engine->evaluate(\"false\")",
+ "engine->evaluate(\"122\")",
+ "engine->evaluate(\"124\")",
+ "engine->evaluate(\"0\")",
+ "engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"-6.37e-8\")",
+ "engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"NaN\")",
+ "engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"-Infinity\")",
+ "engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"''\")",
+ "engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"'12.4'\")",
+ "engine->nullValue()",
+ "engine->undefinedValue()",
+ "engine->newObject()",
+ "engine->newArray()",
+ "engine->newArray(10)",
+ "engine->newDate(QDateTime())",
+ "engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newVariant(QVariant())",
+ "engine->newVariant(QVariant(123))",
+ "engine->newVariant(QVariant(false))",
+ "engine->newQObject(0)",
+ "engine->newQObject(engine)",};
+
+static quint16 toUInt16_valueArray [] = {
+ 0, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 4660, 0,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 4660, 0,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 4660, 0,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 22,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 1, 0,
+ 122, 124,
+ 0, 0,
+ 123, 0,
+ 0, 4660,
+ 0, 1,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 123, 12,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 123, 0,
+ 0, 0, };
+
+void tst_QScriptValue::toUInt16_makeData(const char* expr)
+{
+ static QHash<QString, quint16> toUInt16;
+ if (toUInt16.isEmpty()) {
+ toUInt16.reserve(142);
+ for (unsigned i = 0; i < 142; ++i)
+ toUInt16.insert(toUInt16_tagArray[i], toUInt16_valueArray[i]);
+ }
+ newRow(expr) << toUInt16.value(expr);
+}
+
+void tst_QScriptValue::toUInt16_test(const char*, const QScriptValue& value)
+{
+ QFETCH(quint16, expected);
+ QCOMPARE(value.toUInt16(), expected);
+ QCOMPARE(value.toUInt16(), expected);
+}
+
+DEFINE_TEST_FUNCTION(toUInt16)
diff --git a/tests/auto/qsharedpointer/externaltests.cpp b/tests/auto/qsharedpointer/externaltests.cpp
index eb2f27dd2f..7eae3c14ad 100644
--- a/tests/auto/qsharedpointer/externaltests.cpp
+++ b/tests/auto/qsharedpointer/externaltests.cpp
@@ -671,14 +671,9 @@ namespace QTest {
make.setProcessChannelMode(channelMode);
-#if defined(Q_OS_WIN) && !defined(Q_CC_MINGW)
- make.start(QLatin1String("nmake.exe"), args);
- make.waitForStarted();
-#else
static const char makes[] =
-# ifdef Q_CC_MINGW
- "mingw32-make.exe\0"
-# endif
+ "nmake.exe\0" //for visual c++
+ "mingw32-make.exe\0" //for mingw
"gmake\0"
"make\0";
for (const char *p = makes; *p; p += strlen(p) + 1) {
@@ -686,7 +681,6 @@ namespace QTest {
if (make.waitForStarted())
break;
}
-#endif
if (make.state() != QProcess::Running) {
exitCode = 255;
diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
index 7cfa86871e..07df707707 100644
--- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
@@ -42,6 +42,8 @@
#define QT_SHAREDPOINTER_TRACK_POINTERS
#include "qsharedpointer.h"
#include <QtTest/QtTest>
+#include <QtCore/QHash>
+#include <QtCore/QMap>
#include <QtCore/QThread>
#include <QtCore/QVector>
@@ -68,6 +70,7 @@ class tst_QSharedPointer: public QObject
private slots:
void basics_data();
void basics();
+ void operators();
void swap();
void forwardDeclaration1();
void forwardDeclaration2();
@@ -94,6 +97,8 @@ private slots:
void mixTrackingPointerCode();
void threadStressTest_data();
void threadStressTest();
+ void map();
+ void hash();
void validConstructs();
void invalidConstructs_data();
void invalidConstructs();
@@ -271,6 +276,35 @@ void tst_QSharedPointer::basics()
// aData is deleted here
}
+void tst_QSharedPointer::operators()
+{
+ QSharedPointer<char> p1;
+ QSharedPointer<char> p2(new char);
+ qptrdiff diff = p2.data() - p1.data();
+ Q_ASSERT(p1.data() < p2.data());
+ Q_ASSERT(diff > 0);
+
+ // operator-
+ QCOMPARE(p2 - p1.data(), diff);
+ QCOMPARE(p2.data() - p1, diff);
+ QCOMPARE(p2 - p1, diff);
+ QCOMPARE(p1 - p2, -diff);
+ QCOMPARE(p1 - p1, qptrdiff(0));
+ QCOMPARE(p2 - p2, qptrdiff(0));
+
+ // operator<
+ QVERIFY(p1 < p2.data());
+ QVERIFY(p1.data() < p2);
+ QVERIFY(p1 < p2);
+ QVERIFY(!(p2 < p1));
+ QVERIFY(!(p2 < p2));
+ QVERIFY(!(p1 < p1));
+
+ // qHash
+ QCOMPARE(qHash(p1), qHash(p1.data()));
+ QCOMPARE(qHash(p2), qHash(p2.data()));
+}
+
void tst_QSharedPointer::swap()
{
QSharedPointer<int> p1, p2(new int(42)), control = p2;
@@ -1544,6 +1578,72 @@ void tst_QSharedPointer::threadStressTest()
}
}
+template<typename Container, bool Ordered>
+void hashAndMapTest()
+{
+ typedef typename Container::key_type Key;
+ typedef typename Container::mapped_type Value;
+
+ Container c;
+ QVERIFY(c.isEmpty());
+
+ Key k0;
+ c.insert(k0, Value(0));
+ QVERIFY(!c.isEmpty());
+
+ typename Container::iterator it;
+ it = c.find(k0);
+ QVERIFY(it != c.end());
+ it = c.find(Key());
+ QVERIFY(it != c.end());
+ it = c.find(Key(0));
+ QVERIFY(it != c.end());
+
+ Key k1(new typename Key::value_type(42));
+ it = c.find(k1);
+ QVERIFY(it == c.end());
+
+ c.insert(k1, Value(42));
+ it = c.find(k1);
+ QVERIFY(it != c.end());
+ QVERIFY(it != c.find(Key()));
+
+ if (Ordered) {
+ Q_ASSERT(k0 < k1);
+
+ it = c.begin();
+ QCOMPARE(it.key(), k0);
+ QCOMPARE(it.value(), Value(0));
+
+ ++it;
+ QCOMPARE(it.key(), k1);
+ QCOMPARE(it.value(), Value(42));
+
+ ++it;
+ QVERIFY(it == c.end());
+ }
+
+ c.insertMulti(k1, Value(47));
+ it = c.find(k1);
+ QVERIFY(it != c.end());
+ QCOMPARE(it.key(), k1);
+ ++it;
+ QVERIFY(it != c.end());
+ QCOMPARE(it.key(), k1);
+ ++it;
+ QVERIFY(it == c.end());
+}
+
+void tst_QSharedPointer::map()
+{
+ hashAndMapTest<QMap<QSharedPointer<int>, int>, true>();
+}
+
+void tst_QSharedPointer::hash()
+{
+ hashAndMapTest<QHash<QSharedPointer<int>, int>, false>();
+}
+
void tst_QSharedPointer::validConstructs()
{
{
diff --git a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
index 8abf3c0f89..56eaf25e5d 100644
--- a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
+++ b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
@@ -136,6 +136,8 @@ private slots:
void task252507_mapFromToSource();
void task255652_removeRowsRecursive();
void taskQTBUG_6205_doubleProxySelectionSetSourceModel();
+ void taskQTBUG_7537_appearsAndSort();
+ void taskQTBUG_7716_unnecessaryDynamicSorting();
protected:
void buildHierarchy(const QStringList &data, QAbstractItemModel *model);
@@ -917,15 +919,16 @@ void tst_QSortFilterProxyModel::removeRows()
QStandardItemModel model;
QSortFilterProxyModel proxy;
proxy.setSourceModel(&model);
- if (sortOrder != -1)
- proxy.sort(0, static_cast<Qt::SortOrder>(sortOrder));
- if (!filter.isEmpty())
- proxy.setFilterRegExp(QRegExp(filter));
// prepare model
foreach (QString s, initial)
model.appendRow(new QStandardItem(s));
+ if (sortOrder != -1)
+ proxy.sort(0, static_cast<Qt::SortOrder>(sortOrder));
+ if (!filter.isEmpty())
+ proxy.setFilterRegExp(QRegExp(filter));
+
// remove the rows
QCOMPARE(proxy.removeRows(position, count, QModelIndex()), success);
QCOMPARE(model.rowCount(QModelIndex()), expectedSource.count());
@@ -2418,6 +2421,7 @@ void tst_QSortFilterProxyModel::sortColumnTracking2()
{
QStandardItemModel model;
QSortFilterProxyModel proxyModel;
+ proxyModel.setDynamicSortFilter(true);
proxyModel.setSourceModel(&model);
proxyModel.sort(0);
@@ -2852,5 +2856,100 @@ void tst_QSortFilterProxyModel::taskQTBUG_6205_doubleProxySelectionSetSourceMode
QVERIFY(ism.selection().isEmpty());
}
+void tst_QSortFilterProxyModel::taskQTBUG_7537_appearsAndSort()
+{
+ class PModel : public QSortFilterProxyModel
+ {
+ public:
+ PModel() : mVisible(false) {};
+ protected:
+ bool filterAcceptsRow(int, const QModelIndex &) const
+ {
+ return mVisible;
+ }
+
+ public:
+ void updateXX()
+ {
+ mVisible = true;
+ invalidate();
+ }
+ private:
+ bool mVisible;
+ } proxyModel;
+
+
+ QStringListModel sourceModel;
+ QStringList list;
+ list << "b" << "a" << "c";
+ sourceModel.setStringList(list);
+
+ proxyModel.setSourceModel(&sourceModel);
+ proxyModel.setDynamicSortFilter(true);
+ proxyModel.sort(0, Qt::AscendingOrder);
+
+ QApplication::processEvents();
+ QCOMPARE(sourceModel.rowCount(), 3);
+ QCOMPARE(proxyModel.rowCount(), 0); //all rows are hidden at first;
+
+ QSignalSpy spyAbout1(&proxyModel, SIGNAL(layoutAboutToBeChanged()));
+ QSignalSpy spyChanged1(&proxyModel, SIGNAL(layoutChanged()));
+
+ //introducing secondProxyModel to test the layoutChange when many items appears at once
+ QSortFilterProxyModel secondProxyModel;
+ secondProxyModel.setSourceModel(&proxyModel);
+ secondProxyModel.setDynamicSortFilter(true);
+ secondProxyModel.sort(0, Qt::DescendingOrder);
+ QCOMPARE(secondProxyModel.rowCount(), 0); //all rows are hidden at first;
+ QSignalSpy spyAbout2(&secondProxyModel, SIGNAL(layoutAboutToBeChanged()));
+ QSignalSpy spyChanged2(&secondProxyModel, SIGNAL(layoutChanged()));
+
+ proxyModel.updateXX();
+ QApplication::processEvents();
+ //now rows should be visible, and sorted
+ QCOMPARE(proxyModel.rowCount(), 3);
+ QCOMPARE(proxyModel.data(proxyModel.index(0,0), Qt::DisplayRole).toString(), QString::fromLatin1("a"));
+ QCOMPARE(proxyModel.data(proxyModel.index(1,0), Qt::DisplayRole).toString(), QString::fromLatin1("b"));
+ QCOMPARE(proxyModel.data(proxyModel.index(2,0), Qt::DisplayRole).toString(), QString::fromLatin1("c"));
+
+ //now rows should be visible, and sorted
+ QCOMPARE(secondProxyModel.rowCount(), 3);
+ QCOMPARE(secondProxyModel.data(secondProxyModel.index(0,0), Qt::DisplayRole).toString(), QString::fromLatin1("c"));
+ QCOMPARE(secondProxyModel.data(secondProxyModel.index(1,0), Qt::DisplayRole).toString(), QString::fromLatin1("b"));
+ QCOMPARE(secondProxyModel.data(secondProxyModel.index(2,0), Qt::DisplayRole).toString(), QString::fromLatin1("a"));
+
+ QCOMPARE(spyAbout1.count(), 1);
+ QCOMPARE(spyChanged1.count(), 1);
+ QCOMPARE(spyAbout2.count(), 1);
+ QCOMPARE(spyChanged2.count(), 1);
+}
+
+void tst_QSortFilterProxyModel::taskQTBUG_7716_unnecessaryDynamicSorting()
+{
+ QStringListModel model;
+ const QStringList initial = QString("bravo charlie delta echo").split(" ");
+ model.setStringList(initial);
+ QSortFilterProxyModel proxy;
+ proxy.setDynamicSortFilter(false);
+ proxy.setSourceModel(&model);
+ proxy.sort(Qt::AscendingOrder);
+
+ //append two rows
+ int maxrows = proxy.rowCount(QModelIndex());
+ model.insertRows(maxrows, 2);
+ model.setData(model.index(maxrows, 0), QString("alpha"));
+ model.setData(model.index(maxrows + 1, 0), QString("fondue"));
+
+ //append new items to the initial string list and compare with model
+ QStringList expected = initial;
+ expected << QString("alpha") << QString("fondue");
+
+ //if bug 7716 is present, new rows were prepended, when they should have been appended
+ for (int row = 0; row < proxy.rowCount(QModelIndex()); ++row) {
+ QModelIndex index = proxy.index(row, 0, QModelIndex());
+ QCOMPARE(proxy.data(index, Qt::DisplayRole).toString(), expected.at(row));
+ }
+}
+
QTEST_MAIN(tst_QSortFilterProxyModel)
#include "tst_qsortfilterproxymodel.moc"
diff --git a/tests/auto/qsoundeffect/qsoundeffect.pro b/tests/auto/qsoundeffect/qsoundeffect.pro
new file mode 100644
index 0000000000..eaa35b2a01
--- /dev/null
+++ b/tests/auto/qsoundeffect/qsoundeffect.pro
@@ -0,0 +1,20 @@
+load(qttest_p4)
+
+SOURCES += tst_qsoundeffect.cpp
+
+QT = core multimedia
+
+wince* {
+ deploy.sources += 4.wav
+ DEPLOYMENT = deploy
+ DEFINES += SRCDIR=\\\"\\\"
+ QT += gui
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD/\\\"
+}
+
+unix:!mac {
+ !contains(QT_CONFIG, pulseaudio) {
+ DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER
+ }
+}
diff --git a/tests/auto/qsoundeffect/test.wav b/tests/auto/qsoundeffect/test.wav
new file mode 100644
index 0000000000..e4088a973a
--- /dev/null
+++ b/tests/auto/qsoundeffect/test.wav
Binary files differ
diff --git a/tests/auto/qsoundeffect/tst_qsoundeffect.cpp b/tests/auto/qsoundeffect/tst_qsoundeffect.cpp
new file mode 100644
index 0000000000..b9188166d6
--- /dev/null
+++ b/tests/auto/qsoundeffect/tst_qsoundeffect.cpp
@@ -0,0 +1,144 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+
+#include <QtTest/QtTest>
+#include <QtCore/qlocale.h>
+#include <qaudiooutput.h>
+#include <qaudiodeviceinfo.h>
+#include <qaudio.h>
+#include <private/qsoundeffect_p.h>
+
+
+class tst_QSoundEffect : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QSoundEffect(QObject* parent=0) : QObject(parent) {}
+
+private slots:
+ void initTestCase();
+ void testSource();
+ void testLooping();
+ void testVolume();
+ void testMuting();
+
+private:
+ QSoundEffect* sound;
+};
+
+void tst_QSoundEffect::initTestCase()
+{
+#ifndef QT_MULTIMEDIA_QMEDIAPLAYER
+ sound = new QSoundEffect;
+
+ QVERIFY(sound->source().isEmpty());
+ QVERIFY(sound->loopCount() == 1);
+ QVERIFY(sound->volume() == 100);
+ QVERIFY(sound->isMuted() == false);
+#endif
+}
+
+void tst_QSoundEffect::testSource()
+{
+#ifndef QT_MULTIMEDIA_QMEDIAPLAYER
+ QSignalSpy readSignal(sound, SIGNAL(sourceChanged()));
+
+ QUrl url = QUrl::fromLocalFile(QString("%1%2").arg(SRCDIR).arg("test.wav"));
+ sound->setSource(url);
+
+ QCOMPARE(sound->source(),url);
+ QCOMPARE(readSignal.count(),1);
+
+ QTestEventLoop::instance().enterLoop(1);
+ sound->play();
+
+ QTest::qWait(3000);
+#endif
+}
+
+void tst_QSoundEffect::testLooping()
+{
+#ifndef QT_MULTIMEDIA_QMEDIAPLAYER
+ QSignalSpy readSignal(sound, SIGNAL(loopCountChanged()));
+
+ sound->setLoopCount(5);
+ QCOMPARE(sound->loopCount(),5);
+
+ sound->play();
+
+ // test.wav is about 200ms, wait until it has finished playing 5 times
+ QTest::qWait(3000);
+#endif
+}
+
+void tst_QSoundEffect::testVolume()
+{
+#ifndef QT_MULTIMEDIA_QMEDIAPLAYER
+ QSignalSpy readSignal(sound, SIGNAL(volumeChanged()));
+
+ sound->setVolume(50);
+ QCOMPARE(sound->volume(),50);
+
+ QTest::qWait(20);
+ QCOMPARE(readSignal.count(),1);
+#endif
+}
+
+void tst_QSoundEffect::testMuting()
+{
+#ifndef QT_MULTIMEDIA_QMEDIAPLAYER
+ QSignalSpy readSignal(sound, SIGNAL(mutedChanged()));
+
+ sound->setMuted(true);
+ QCOMPARE(sound->isMuted(),true);
+
+ QTest::qWait(20);
+ QCOMPARE(readSignal.count(),1);
+
+ delete sound;
+#endif
+}
+
+QTEST_MAIN(tst_QSoundEffect)
+
+#include "tst_qsoundeffect.moc"
diff --git a/tests/auto/qstatictext/qstatictext.pro b/tests/auto/qstatictext/qstatictext.pro
new file mode 100644
index 0000000000..0f1ca68595
--- /dev/null
+++ b/tests/auto/qstatictext/qstatictext.pro
@@ -0,0 +1,4 @@
+load(qttest_p4)
+QT = core gui
+SOURCES += tst_qstatictext.cpp
+
diff --git a/tests/auto/qstatictext/tst_qstatictext.cpp b/tests/auto/qstatictext/tst_qstatictext.cpp
new file mode 100644
index 0000000000..16832ade53
--- /dev/null
+++ b/tests/auto/qstatictext/tst_qstatictext.cpp
@@ -0,0 +1,486 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QtGui/QApplication>
+#include <QtGui/QPainter>
+#include <QtGui/QImage>
+
+#include <qstatictext.h>
+#include <qpaintengine.h>
+
+#include <private/qstatictext_p.h>
+#include <private/qapplication_p.h>
+
+// #define DEBUG_SAVE_IMAGE
+
+class tst_QStaticText: public QObject
+{
+ Q_OBJECT
+
+private:
+ bool supportsTransformations() const;
+
+private slots:
+ void init();
+ void cleanup();
+
+ void constructionAndDestruction();
+ void drawToPoint_data();
+ void drawToPoint();
+ void drawToRect_data();
+ void drawToRect();
+ void setFont();
+ void setMaximumSize();
+ void prepareToCorrectData();
+ void prepareToWrongData();
+
+ void translatedPainter();
+ void rotatedPainter();
+ void scaledPainter();
+ void projectedPainter();
+ void rotatedScaledAndTranslatedPainter();
+ void transformationChanged();
+};
+
+void tst_QStaticText::init()
+{
+}
+
+void tst_QStaticText::cleanup()
+{
+}
+
+void tst_QStaticText::constructionAndDestruction()
+{
+ QStaticText text("My text");
+}
+
+Q_DECLARE_METATYPE(QStaticText::PerformanceHint)
+void tst_QStaticText::drawToPoint_data()
+{
+ QTest::addColumn<QStaticText::PerformanceHint>("performanceHint");
+
+ QTest::newRow("Moderate caching") << QStaticText::ModerateCaching;
+ QTest::newRow("Aggressive caching") << QStaticText::AggressiveCaching;
+}
+
+void tst_QStaticText::drawToPoint()
+{
+ QFETCH(QStaticText::PerformanceHint, performanceHint);
+
+ QPixmap imageDrawText(1000, 1000);
+ imageDrawText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawText);
+ p.drawText(11, 12, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ }
+
+ QPixmap imageDrawStaticText(1000, 1000);
+ imageDrawStaticText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawStaticText);
+ QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ text.setTextFormat(Qt::PlainText);
+ text.setPerformanceHint(performanceHint);
+ p.drawStaticText(QPointF(11, 12), text);
+ }
+
+ QCOMPARE(imageDrawStaticText, imageDrawText);
+}
+
+void tst_QStaticText::drawToRect_data()
+{
+ QTest::addColumn<QStaticText::PerformanceHint>("performanceHint");
+
+ QTest::newRow("Moderate caching") << QStaticText::ModerateCaching;
+ QTest::newRow("Aggressive caching") << QStaticText::AggressiveCaching;
+}
+
+void tst_QStaticText::drawToRect()
+{
+ QFETCH(QStaticText::PerformanceHint, performanceHint);
+
+ QPixmap imageDrawText(1000, 1000);
+ imageDrawText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawText);
+ p.drawText(QRectF(11, 12, 10, 500), "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ }
+
+ QPixmap imageDrawStaticText(1000, 1000);
+ imageDrawStaticText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawStaticText);
+ QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", QSizeF(10, 500));
+ text.setPerformanceHint(performanceHint);
+ text.setTextFormat(Qt::PlainText);
+ p.drawStaticText(QPointF(11, 12), text);
+ }
+
+ QCOMPARE(imageDrawStaticText, imageDrawText);
+}
+
+void tst_QStaticText::prepareToCorrectData()
+{
+ QTransform transform;
+ transform.scale(2.0, 2.0);
+ transform.rotate(90, Qt::ZAxis);
+
+ QPixmap imageDrawText(1000, 1000);
+ imageDrawText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawText);
+ p.setTransform(transform);
+ p.drawText(11, 12, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ }
+
+ QPixmap imageDrawStaticText(1000, 1000);
+ imageDrawStaticText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawStaticText);
+ p.setTransform(transform);
+ QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ text.prepare(transform, p.font());
+ text.setTextFormat(Qt::PlainText);
+ p.drawStaticText(QPointF(11, 12), text);
+ }
+
+ if (!supportsTransformations())
+ QEXPECT_FAIL("", "Graphics system does not support transformed text on this platform", Abort);
+ QCOMPARE(imageDrawStaticText, imageDrawText);
+}
+
+void tst_QStaticText::prepareToWrongData()
+{
+ QTransform transform;
+ transform.scale(2.0, 2.0);
+ transform.rotate(90, Qt::ZAxis);
+
+ QPixmap imageDrawText(1000, 1000);
+ imageDrawText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawText);
+ p.drawText(11, 12, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ }
+
+ QPixmap imageDrawStaticText(1000, 1000);
+ imageDrawStaticText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawStaticText);
+ QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ text.prepare(transform, p.font());
+ text.setTextFormat(Qt::PlainText);
+ p.drawStaticText(QPointF(11, 12), text);
+ }
+
+ QCOMPARE(imageDrawStaticText, imageDrawText);
+}
+
+
+void tst_QStaticText::setFont()
+{
+ QFont font = QApplication::font();
+ font.setBold(true);
+ font.setPointSize(28);
+
+ QPixmap imageDrawText(1000, 1000);
+ imageDrawText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawText);
+ p.drawText(0, 0, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+
+ p.setFont(font);
+ p.drawText(11, 120, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ }
+
+ QPixmap imageDrawStaticText(1000, 1000);
+ imageDrawStaticText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawStaticText);
+
+ QStaticText text;
+ text.setText("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ text.setTextFormat(Qt::PlainText);
+
+ p.drawStaticText(0, 0, text);
+
+ p.setFont(font);
+ p.drawStaticText(11, 120, text);
+ }
+
+ QCOMPARE(imageDrawStaticText, imageDrawText);
+}
+
+void tst_QStaticText::setMaximumSize()
+{
+ QPixmap imageDrawText(1000, 1000);
+ imageDrawText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawText);
+ p.drawText(QRectF(11, 12, 10, 500), "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ }
+
+ QPixmap imageDrawStaticText(1000, 1000);
+ imageDrawStaticText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawStaticText);
+ QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ text.setMaximumSize(QSizeF(10, 500));
+ p.drawStaticText(QPointF(11, 12), text);
+ }
+
+ QCOMPARE(imageDrawStaticText, imageDrawText);
+}
+
+void tst_QStaticText::translatedPainter()
+{
+ QPixmap imageDrawText(1000, 1000);
+ imageDrawText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawText);
+ p.translate(100, 200);
+
+ p.drawText(11, 12, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ }
+
+ QPixmap imageDrawStaticText(1000, 1000);
+ imageDrawStaticText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawStaticText);
+ p.translate(100, 200);
+
+ QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ text.setTextFormat(Qt::PlainText);
+
+ p.drawStaticText(QPointF(11, 12), text);
+ }
+
+ QCOMPARE(imageDrawStaticText, imageDrawText);
+}
+
+bool tst_QStaticText::supportsTransformations() const
+{
+ QPixmap pm(10, 10);
+ QPainter p(&pm);
+ QPaintEngine *engine = p.paintEngine();
+
+ QPaintEngine::Type type = engine->type();
+
+ if (type == QPaintEngine::OpenGL2
+ || type == QPaintEngine::OpenGL
+#if !defined Q_WS_WIN
+ || type == QPaintEngine::Raster
+#endif
+ )
+ return false;
+
+ return true;
+}
+
+void tst_QStaticText::rotatedPainter()
+{
+ QPixmap imageDrawText(1000, 1000);
+ imageDrawText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawText);
+ p.rotate(30.0);
+ p.drawText(0, 0, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ }
+
+ QPixmap imageDrawStaticText(1000, 1000);
+ imageDrawStaticText.fill(Qt::white);
+ {
+ QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ text.setTextFormat(Qt::PlainText);
+
+ QPainter p(&imageDrawStaticText);
+ p.rotate(30.0);
+ p.drawStaticText(QPoint(0, 0), text);
+ }
+
+#if defined(DEBUG_SAVE_IMAGE)
+ imageDrawText.save("rotatedPainter_imageDrawText.png");
+ imageDrawStaticText.save("rotatedPainter_imageDrawStaticText.png");
+#endif
+
+ if (!supportsTransformations())
+ QEXPECT_FAIL("", "Graphics system does not support transformed text on this platform", Abort);
+ QCOMPARE(imageDrawStaticText, imageDrawText);
+}
+
+void tst_QStaticText::scaledPainter()
+{
+ QPixmap imageDrawText(1000, 1000);
+ imageDrawText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawText);
+ p.scale(2.0, 0.2);
+
+ p.drawText(11, 12, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ }
+
+ QPixmap imageDrawStaticText(1000, 1000);
+ imageDrawStaticText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawStaticText);
+ p.scale(2.0, 0.2);
+
+ QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ text.setTextFormat(Qt::PlainText);
+
+ p.drawStaticText(QPointF(11, 12), text);
+ }
+
+ if (!supportsTransformations())
+ QEXPECT_FAIL("", "Graphics system does not support transformed text on this platform", Abort);
+ QCOMPARE(imageDrawStaticText, imageDrawText);
+}
+
+void tst_QStaticText::projectedPainter()
+{
+ QTransform transform;
+ transform.rotate(90, Qt::XAxis);
+
+ QPixmap imageDrawText(1000, 1000);
+ imageDrawText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawText);
+ p.setTransform(transform);
+
+ p.drawText(11, 12, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ }
+
+ QPixmap imageDrawStaticText(1000, 1000);
+ imageDrawStaticText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawStaticText);
+ p.setTransform(transform);
+
+ QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ text.setTextFormat(Qt::PlainText);
+
+ p.drawStaticText(QPointF(11, 12), text);
+ }
+
+ QCOMPARE(imageDrawStaticText, imageDrawText);
+}
+
+void tst_QStaticText::rotatedScaledAndTranslatedPainter()
+{
+ QPixmap imageDrawText(1000, 1000);
+ imageDrawText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawText);
+ p.rotate(45.0);
+ p.scale(2.0, 2.0);
+ p.translate(100, 200);
+
+ p.drawText(11, 12, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ }
+
+ QPixmap imageDrawStaticText(1000, 1000);
+ imageDrawStaticText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawStaticText);
+ p.rotate(45.0);
+ p.scale(2.0, 2.0);
+ p.translate(100, 200);
+
+ QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ text.setTextFormat(Qt::PlainText);
+
+ p.drawStaticText(QPointF(11, 12), text);
+ }
+
+#if defined(DEBUG_SAVE_IMAGE)
+ imageDrawText.save("rotatedScaledAndPainter_imageDrawText.png");
+ imageDrawStaticText.save("rotatedScaledAndPainter_imageDrawStaticText.png");
+#endif
+
+ if (!supportsTransformations())
+ QEXPECT_FAIL("", "Graphics system does not support transformed text on this platform", Abort);
+ QCOMPARE(imageDrawStaticText, imageDrawText);
+}
+
+void tst_QStaticText::transformationChanged()
+{
+ QPixmap imageDrawText(1000, 1000);
+ imageDrawText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawText);
+ p.rotate(33.0);
+ p.scale(0.5, 0.7);
+
+ p.drawText(0, 0, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+
+ p.scale(7.0, 5.0);
+ p.drawText(0, 0, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ }
+
+ QPixmap imageDrawStaticText(1000, 1000);
+ imageDrawStaticText.fill(Qt::white);
+ {
+ QPainter p(&imageDrawStaticText);
+ p.rotate(33.0);
+ p.scale(0.5, 0.7);
+
+ QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ text.setTextFormat(Qt::PlainText);
+
+ p.drawStaticText(QPointF(0, 0), text);
+
+ p.scale(7.0, 5.0);
+ p.drawStaticText(QPointF(0, 0), text);
+ }
+
+#if defined(DEBUG_SAVE_IMAGE)
+ imageDrawText.save("transformationChanged_imageDrawText.png");
+ imageDrawStaticText.save("transformationChanged_imageDrawStaticText.png");
+#endif
+
+ if (!supportsTransformations())
+ QEXPECT_FAIL("", "Graphics system does not support transformed text on this platform", Abort);
+ QCOMPARE(imageDrawStaticText, imageDrawText);
+}
+
+QTEST_MAIN(tst_QStaticText)
+#include "tst_qstatictext.moc"
diff --git a/tests/auto/qstring/tst_qstring.cpp b/tests/auto/qstring/tst_qstring.cpp
index 4ebcade752..d79ebb9c55 100644
--- a/tests/auto/qstring/tst_qstring.cpp
+++ b/tests/auto/qstring/tst_qstring.cpp
@@ -120,6 +120,7 @@ private slots:
void operator_eqeq_nullstring();
void operator_smaller();
void insert();
+ void simplified_data();
void simplified();
void trimmed();
void toLower();
@@ -164,6 +165,10 @@ private slots:
void fromLocal8Bit();
void local8Bit_data();
void local8Bit();
+ void fromLatin1Roundtrip_data();
+ void fromLatin1Roundtrip();
+ void toLatin1Roundtrip_data();
+ void toLatin1Roundtrip();
void fromLatin1();
void fromAscii();
void arg();
@@ -1592,16 +1597,51 @@ void tst_QString::trimmed()
QCOMPARE(a.trimmed(),(QString)"a");
}
+void tst_QString::simplified_data()
+{
+ QTest::addColumn<QString>("full" );
+ QTest::addColumn<QString>("simple" );
+
+ QTest::newRow("null") << QString() << QString();
+ QTest::newRow("empty") << "" << "";
+ QTest::newRow("one char") << "a" << "a";
+ QTest::newRow("one word") << "foo" << "foo";
+ QTest::newRow("chars trivial") << "a b" << "a b";
+ QTest::newRow("words trivial") << "foo bar" << "foo bar";
+ QTest::newRow("allspace") << " \t\v " << "";
+ QTest::newRow("char trailing") << "a " << "a";
+ QTest::newRow("char trailing tab") << "a\t" << "a";
+ QTest::newRow("char multitrailing") << "a " << "a";
+ QTest::newRow("char multitrailing tab") << "a \t" << "a";
+ QTest::newRow("char leading") << " a" << "a";
+ QTest::newRow("char leading tab") << "\ta" << "a";
+ QTest::newRow("char multileading") << " a" << "a";
+ QTest::newRow("char multileading tab") << "\t a" << "a";
+ QTest::newRow("chars apart") << "a b" << "a b";
+ QTest::newRow("words apart") << "foo bar" << "foo bar";
+ QTest::newRow("enclosed word") << " foo \t " << "foo";
+ QTest::newRow("enclosed chars apart") << " a b " << "a b";
+ QTest::newRow("enclosed words apart") << " foo bar " << "foo bar";
+ QTest::newRow("chars apart posttab") << "a \tb" << "a b";
+ QTest::newRow("chars apart pretab") << "a\t b" << "a b";
+ QTest::newRow("many words") << " just some random\ttext here" << "just some random text here";
+}
+
void tst_QString::simplified()
{
- QString j;
- j.simplified();
+ QFETCH(QString, full);
+ QFETCH(QString, simple);
- QString a;
- a = "a ";
- QCOMPARE(a.simplified(),(QString)"a");
- a=" a b ";
- QCOMPARE(a.simplified(),(QString)"a b");
+ QString result = full.simplified();
+ if (simple.isNull()) {
+ QVERIFY2(result.isNull(), qPrintable("'" + full + "' did not yield null: " + result));
+ } else if (simple.isEmpty()) {
+ QVERIFY2(result.isEmpty() && !result.isNull(), qPrintable("'" + full + "' did not yield empty: " + result));
+ } else {
+ QCOMPARE(result, simple);
+ if (full == simple)
+ QVERIFY(result.isSharedWith(full));
+ }
}
void tst_QString::insert()
@@ -3188,6 +3228,109 @@ void tst_QString::local8Bit()
QCOMPARE(local8Bit.toLocal8Bit(), QByteArray(result));
}
+void tst_QString::fromLatin1Roundtrip_data()
+{
+ QTest::addColumn<QByteArray>("latin1");
+ QTest::addColumn<QString>("unicode");
+
+ QTest::newRow("null") << QByteArray() << QString();
+ QTest::newRow("empty") << QByteArray("") << "";
+
+ static const ushort unicode1[] = { 'H', 'e', 'l', 'l', 'o', 1, '\r', '\n', 0x7f };
+ QTest::newRow("ascii-only") << QByteArray("Hello") << QString::fromUtf16(unicode1, 5);
+ QTest::newRow("ascii+control") << QByteArray("Hello\1\r\n\x7f") << QString::fromUtf16(unicode1, 9);
+
+ static const ushort unicode3[] = { 'a', 0, 'z' };
+ QTest::newRow("ascii+nul") << QByteArray("a\0z", 3) << QString::fromUtf16(unicode3, 3);
+
+ static const ushort unicode4[] = { 0x80, 0xc0, 0xff };
+ QTest::newRow("non-ascii") << QByteArray("\x80\xc0\xff") << QString::fromUtf16(unicode4, 3);
+}
+
+void tst_QString::fromLatin1Roundtrip()
+{
+ QFETCH(QByteArray, latin1);
+ QFETCH(QString, unicode);
+
+ // QtTest safety check:
+ Q_ASSERT(latin1.isNull() == unicode.isNull());
+ Q_ASSERT(latin1.isEmpty() == unicode.isEmpty());
+ Q_ASSERT(latin1.length() == unicode.length());
+
+ if (!latin1.isEmpty())
+ while (latin1.length() < 128) {
+ latin1 += latin1;
+ unicode += unicode;
+ }
+
+ // fromLatin1
+ QCOMPARE(QString::fromLatin1(latin1, latin1.length()).length(), unicode.length());
+ QCOMPARE(QString::fromLatin1(latin1, latin1.length()), unicode);
+
+ // and back:
+ QCOMPARE(unicode.toLatin1().length(), latin1.length());
+ QCOMPARE(unicode.toLatin1(), latin1);
+}
+
+void tst_QString::toLatin1Roundtrip_data()
+{
+ QTest::addColumn<QByteArray>("latin1");
+ QTest::addColumn<QString>("unicodesrc");
+ QTest::addColumn<QString>("unicodedst");
+
+ QTest::newRow("null") << QByteArray() << QString() << QString();
+ QTest::newRow("empty") << QByteArray("") << "" << "";
+
+ static const ushort unicode1[] = { 'H', 'e', 'l', 'l', 'o', 1, '\r', '\n', 0x7f };
+ QTest::newRow("ascii-only") << QByteArray("Hello") << QString::fromUtf16(unicode1, 5) << QString::fromUtf16(unicode1, 5);
+ QTest::newRow("ascii+control") << QByteArray("Hello\1\r\n\x7f") << QString::fromUtf16(unicode1, 9) << QString::fromUtf16(unicode1, 9);
+
+ static const ushort unicode3[] = { 'a', 0, 'z' };
+ QTest::newRow("ascii+nul") << QByteArray("a\0z", 3) << QString::fromUtf16(unicode3, 3) << QString::fromUtf16(unicode3, 3);
+
+ static const ushort unicode4[] = { 0x80, 0xc0, 0xff };
+ QTest::newRow("non-ascii") << QByteArray("\x80\xc0\xff") << QString::fromUtf16(unicode4, 3) << QString::fromUtf16(unicode4, 3);
+
+ static const ushort unicodeq[] = { '?', '?', '?', '?', '?' };
+ const QString questionmarks = QString::fromUtf16(unicodeq, 5);
+
+ static const ushort unicode5[] = { 0x100, 0x101, 0x17f, 0x7f00, 0x7f7f };
+ QTest::newRow("non-latin1a") << QByteArray("?????") << QString::fromUtf16(unicode5, 5) << questionmarks;
+
+ static const ushort unicode6[] = { 0x180, 0x1ff, 0x8001, 0x8080, 0xfffc };
+ QTest::newRow("non-latin1b") << QByteArray("?????") << QString::fromUtf16(unicode6, 5) << questionmarks;
+}
+
+void tst_QString::toLatin1Roundtrip()
+{
+ QFETCH(QByteArray, latin1);
+ QFETCH(QString, unicodesrc);
+ QFETCH(QString, unicodedst);
+
+ // QtTest safety check:
+ Q_ASSERT(latin1.isNull() == unicodesrc.isNull());
+ Q_ASSERT(latin1.isEmpty() == unicodesrc.isEmpty());
+ Q_ASSERT(latin1.length() == unicodesrc.length());
+ Q_ASSERT(latin1.isNull() == unicodedst.isNull());
+ Q_ASSERT(latin1.isEmpty() == unicodedst.isEmpty());
+ Q_ASSERT(latin1.length() == unicodedst.length());
+
+ if (!latin1.isEmpty())
+ while (latin1.length() < 128) {
+ latin1 += latin1;
+ unicodesrc += unicodesrc;
+ unicodedst += unicodedst;
+ }
+
+ // toLatin1
+ QCOMPARE(unicodesrc.toLatin1().length(), latin1.length());
+ QCOMPARE(unicodesrc.toLatin1(), latin1);
+
+ // and back:
+ QCOMPARE(QString::fromLatin1(latin1, latin1.length()).length(), unicodedst.length());
+ QCOMPARE(QString::fromLatin1(latin1, latin1.length()), unicodedst);
+}
+
void tst_QString::fromLatin1()
{
QString a;
diff --git a/tests/auto/qstringbuilder1/stringbuilder.cpp b/tests/auto/qstringbuilder1/stringbuilder.cpp
index 8e95818d55..e9ae7a6bec 100644
--- a/tests/auto/qstringbuilder1/stringbuilder.cpp
+++ b/tests/auto/qstringbuilder1/stringbuilder.cpp
@@ -44,6 +44,14 @@
// "some literal", but replacing all vocals by their umlauted UTF-8 string :)
#define UTF8_LITERAL "s\xc3\xb6m\xc3\xab l\xc3\xaft\xc3\xabr\xc3\xa4l"
+
+//fix for gcc4.0: if the operator+ does not exist without QT_USE_FAST_OPERATOR_PLUS
+#ifndef QT_USE_FAST_CONCATENATION
+#define Q %
+#else
+#define Q P
+#endif
+
void runScenario()
{
// set codec for C strings to 0, enforcing Latin1
@@ -59,13 +67,13 @@ void runScenario()
QString r;
QByteArray ba(LITERAL);
- r = l1literal P l1literal;
+ r = l1literal Q l1literal;
QCOMPARE(r, r2);
r = string P string;
QCOMPARE(r, r2);
- r = stringref P stringref;
+ r = stringref Q stringref;
QCOMPARE(r, QString(stringref.toString() + stringref.toString()));
- r = string P l1literal;
+ r = string Q l1literal;
QCOMPARE(r, r2);
r = string P l1string;
QCOMPARE(r, r2);
diff --git a/tests/auto/qsvggenerator/referenceSvgs/fileName_output.svg b/tests/auto/qsvggenerator/referenceSvgs/fileName_output.svg
index 99926b329b..f1f9e354be 100644
--- a/tests/auto/qsvggenerator/referenceSvgs/fileName_output.svg
+++ b/tests/auto/qsvggenerator/referenceSvgs/fileName_output.svg
@@ -4,12 +4,12 @@
<desc>Generated with Qt</desc>
<defs>
</defs>
-<g fill="none" stroke="black" vector-effect="non-scaling-stroke" stroke-width="1" fill-rule="evenodd" stroke-linecap="square" stroke-linejoin="bevel" >
+<g fill="none" stroke="black" stroke-width="1" fill-rule="evenodd" stroke-linecap="square" stroke-linejoin="bevel" >
<g fill="#ff0000" fill-opacity="1" stroke="none" transform="matrix(1,0,0,1,0,0)"
-font-family="Arial" font-size="11pt" font-weight="400" font-style="normal"
+font-family="Sans Serif" font-size="8.25" font-weight="400" font-style="normal"
>
-<path fill-rule="evenodd" d="M0,0 L100,0 L100,100 L0,100 L0,0"/>
+<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M0,0 L100,0 L100,100 L0,100 L0,0"/>
</g>
</g>
</svg>
diff --git a/tests/auto/qsvggenerator/referenceSvgs/radial_gradient.svg b/tests/auto/qsvggenerator/referenceSvgs/radial_gradient.svg
index f61dd40457..84afbf37c8 100644
--- a/tests/auto/qsvggenerator/referenceSvgs/radial_gradient.svg
+++ b/tests/auto/qsvggenerator/referenceSvgs/radial_gradient.svg
@@ -13,18 +13,18 @@
<stop offset="1" stop-color="#0000ff" stop-opacity="1" />
</radialGradient>
</defs>
-<g fill="none" stroke="black" vector-effect="non-scaling-stroke" stroke-width="1" fill-rule="evenodd" stroke-linecap="square" stroke-linejoin="bevel" >
+<g fill="none" stroke="black" stroke-width="1" fill-rule="evenodd" stroke-linecap="square" stroke-linejoin="bevel" >
<g fill="url(#gradient1)" stroke="none" transform="matrix(1,0,0,1,0,0)"
-font-family="Sans Serif" font-size="9pt" font-weight="400" font-style="normal"
+font-family="Sans Serif" font-size="8.25" font-weight="400" font-style="normal"
>
-<path fill-rule="evenodd" d="M0,0 L100,0 L100,100 L0,100 L0,0"/>
+<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M0,0 L100,0 L100,100 L0,100 L0,0"/>
</g>
<g fill="url(#gradient2)" stroke="none" transform="matrix(1,0,0,1,0,0)"
-font-family="Sans Serif" font-size="9pt" font-weight="400" font-style="normal"
+font-family="Sans Serif" font-size="8.25" font-weight="400" font-style="normal"
>
-<path fill-rule="evenodd" d="M100,0 L200,0 L200,100 L100,100 L100,0"/>
+<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M100,0 L200,0 L200,100 L100,100 L100,0"/>
</g>
</g>
</svg>
diff --git a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp
index 16dd2b4e11..106fd8c8c0 100644
--- a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp
+++ b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp
@@ -74,6 +74,7 @@ private slots:
void nestedQXmlStreamReader() const;
void stylePropagation() const;
void matrixForElement() const;
+ void boundsOnElement() const;
void gradientStops() const;
void gradientRefs();
void fillRule();
@@ -470,6 +471,36 @@ void tst_QSvgRenderer::matrixForElement() const
compareTransforms(QTransform(painter.worldMatrix()), QTransform(renderer.matrixForElement(QLatin1String("firkant"))));
}
+void tst_QSvgRenderer::boundsOnElement() const
+{
+ QByteArray data("<svg>"
+ "<g id=\"prim\" transform=\"translate(-3,1)\">"
+ "<g id=\"sjokade\" stroke=\"none\" stroke-width=\"10\">"
+ "<rect id=\"kaviar\" transform=\"rotate(45)\" x=\"-10\" y=\"-10\" width=\"20\" height=\"20\"/>"
+ "</g>"
+ "<g id=\"nugatti\" stroke=\"black\" stroke-width=\"2\">"
+ "<use x=\"0\" y=\"0\" transform=\"rotate(45)\" xlink:href=\"#kaviar\"/>"
+ "</g>"
+ "<g id=\"nutella\" stroke=\"none\" stroke-width=\"10\">"
+ "<path id=\"baconost\" transform=\"rotate(45)\" d=\"M-10 -10 L10 -10 L10 10 L-10 10 Z\"/>"
+ "</g>"
+ "<g id=\"hapaa\" transform=\"translate(-2,2)\" stroke=\"black\" stroke-width=\"2\">"
+ "<use x=\"0\" y=\"0\" transform=\"rotate(45)\" xlink:href=\"#baconost\"/>"
+ "</g>"
+ "</g>"
+ "</svg>");
+
+ qreal sqrt2 = qSqrt(2);
+ QSvgRenderer renderer(data);
+ QCOMPARE(renderer.boundsOnElement(QLatin1String("sjokade")), QRectF(-10 * sqrt2, -10 * sqrt2, 20 * sqrt2, 20 * sqrt2));
+ QCOMPARE(renderer.boundsOnElement(QLatin1String("kaviar")), QRectF(-10 * sqrt2, -10 * sqrt2, 20 * sqrt2, 20 * sqrt2));
+ QCOMPARE(renderer.boundsOnElement(QLatin1String("nugatti")), QRectF(-11, -11, 22, 22));
+ QCOMPARE(renderer.boundsOnElement(QLatin1String("nutella")), QRectF(-10 * sqrt2, -10 * sqrt2, 20 * sqrt2, 20 * sqrt2));
+ QCOMPARE(renderer.boundsOnElement(QLatin1String("baconost")), QRectF(-10 * sqrt2, -10 * sqrt2, 20 * sqrt2, 20 * sqrt2));
+ QCOMPARE(renderer.boundsOnElement(QLatin1String("hapaa")), QRectF(-13, -9, 22, 22));
+ QCOMPARE(renderer.boundsOnElement(QLatin1String("prim")), QRectF(-10 * sqrt2 - 3, -10 * sqrt2 + 1, 20 * sqrt2, 20 * sqrt2));
+}
+
void tst_QSvgRenderer::gradientStops() const
{
{
diff --git a/tests/auto/qtabbar/tst_qtabbar.cpp b/tests/auto/qtabbar/tst_qtabbar.cpp
index d980efa60f..72f9dd3454 100644
--- a/tests/auto/qtabbar/tst_qtabbar.cpp
+++ b/tests/auto/qtabbar/tst_qtabbar.cpp
@@ -273,6 +273,9 @@ void tst_QTabBar::setElideMode()
if (tabElideMode != -128)
tabBar.setElideMode(Qt::TextElideMode(tabElideMode));
QTEST(int(tabBar.elideMode()), "expectedMode");
+ // Make sure style sheet does not override user set mode
+ tabBar.setStyleSheet("QWidget { background-color: #ABA8A6;}");
+ QTEST(int(tabBar.elideMode()), "expectedMode");
}
void tst_QTabBar::setUsesScrollButtons_data()
diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
index ef7ff83165..5a209c2027 100644
--- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
@@ -193,6 +193,7 @@ private slots:
void increaseReadBufferSize();
void taskQtBug5799ConnectionErrorWaitForConnected();
void taskQtBug5799ConnectionErrorEventLoop();
+ void taskQtBug7054TimeoutErrorResetting();
void invalidProxy_data();
void invalidProxy();
@@ -2245,6 +2246,30 @@ void tst_QTcpSocket::taskQtBug5799ConnectionErrorEventLoop()
QString("Could not reach server: %1").arg(socket.errorString()).toLocal8Bit());
}
+void tst_QTcpSocket::taskQtBug7054TimeoutErrorResetting()
+{
+ QTcpSocket *socket = newSocket();
+
+ socket->connectToHost(QtNetworkSettings::serverName(), 443);
+ QVERIFY(socket->waitForConnected(5*1000));
+ QVERIFY(socket->error() == QAbstractSocket::UnknownSocketError);
+
+ // We connected to the HTTPS port. Wait two seconds to receive data. We will receive
+ // nothing because we would need to start the SSL handshake
+ QVERIFY(!socket->waitForReadyRead(2*1000));
+ QVERIFY(socket->error() == QAbstractSocket::SocketTimeoutError);
+
+ // Now write some crap to make the server disconnect us. 4 lines are enough.
+ socket->write("a\r\nb\r\nc\r\nd\r\n");
+ socket->waitForBytesWritten(2*1000);
+
+ // we try to waitForReadyRead another time, but this time instead of a timeout we
+ // should get a better error since the server disconnected us
+ QVERIFY(!socket->waitForReadyRead(2*1000));
+ // It must NOT be the SocketTimeoutError that had been set before
+ QVERIFY(socket->error() == QAbstractSocket::RemoteHostClosedError);
+}
+
void tst_QTcpSocket::invalidProxy_data()
{
QTest::addColumn<int>("type");
diff --git a/tests/auto/qtextcodec/test/test.pro b/tests/auto/qtextcodec/test/test.pro
index afd7f5e536..efa2e856b3 100644
--- a/tests/auto/qtextcodec/test/test.pro
+++ b/tests/auto/qtextcodec/test/test.pro
@@ -27,6 +27,7 @@ wince*: {
DEFINES += SRCDIR=\\\"\\\"
}else:symbian {
# Symbian can't define SRCDIR meaningfully here
+ LIBS += -lcharconv -lconvnames -lgb2312_shared -ljisx0201 -ljisx0208 -lefsrv
} else {
DEFINES += SRCDIR=\\\"$$PWD/../\\\"
}
diff --git a/tests/auto/qtextcodec/tst_qtextcodec.cpp b/tests/auto/qtextcodec/tst_qtextcodec.cpp
index aa97e8706a..1c64ade6e1 100644
--- a/tests/auto/qtextcodec/tst_qtextcodec.cpp
+++ b/tests/auto/qtextcodec/tst_qtextcodec.cpp
@@ -99,6 +99,13 @@ private slots:
#ifdef Q_OS_UNIX
void toLocal8Bit();
#endif
+
+ void invalidNames();
+ void checkAliases_data();
+ void checkAliases();
+
+ void moreToFromUnicode_data();
+ void moreToFromUnicode();
};
void tst_QTextCodec::toUnicode_data()
@@ -119,6 +126,7 @@ void tst_QTextCodec::toUnicode()
if ( file.open( QIODevice::ReadOnly ) ) {
QByteArray ba = file.readAll();
+ QVERIFY(!ba.isEmpty());
QTextCodec *c = QTextCodec::codecForName( codecName.toLatin1() );
QVERIFY(c != 0);
QString uniString = c->toUnicode( ba );
@@ -126,6 +134,7 @@ void tst_QTextCodec::toUnicode()
QCOMPARE(uniString, QString::fromUtf8(ba));
QCOMPARE(ba, uniString.toUtf8());
}
+ QVERIFY(!uniString.isEmpty());
QCOMPARE( ba, c->fromUnicode( uniString ) );
if (codecName == QLatin1String("eucKR")) {
@@ -185,7 +194,9 @@ void tst_QTextCodec::fromUnicode_data()
QTest::newRow("data16") << "ISO-8859-16" << true;
QTest::newRow("data18") << "IBM850" << true;
+#ifndef Q_OS_SYMBIAN //symbian implementation will return empty string if all char are invalid
QTest::newRow("data19") << "IBM874" << true;
+#endif
QTest::newRow("data20") << "IBM866" << true;
QTest::newRow("data21") << "windows-1250" << true;
@@ -193,7 +204,9 @@ void tst_QTextCodec::fromUnicode_data()
QTest::newRow("data23") << "windows-1252" << true;
QTest::newRow("data24") << "windows-1253" << true;
QTest::newRow("data25") << "windows-1254" << true;
+#ifndef Q_OS_SYMBIAN //symbian implementation will return empty string if all char are invalid
QTest::newRow("data26") << "windows-1255" << true;
+#endif
QTest::newRow("data27") << "windows-1256" << true;
QTest::newRow("data28") << "windows-1257" << true;
QTest::newRow("data28") << "windows-1258" << true;
@@ -205,6 +218,39 @@ void tst_QTextCodec::fromUnicode_data()
QTest::newRow("data32") << "SJIS" << false;
QTest::newRow("data33") << "EUC-KR" << false;
+
+ // all codecs from documentation
+ QTest::newRow("doc2") << "Big5" << false;
+ QTest::newRow("doc3") << "Big5-HKSCS" << false;
+ QTest::newRow("doc4") << "CP949" << false;
+ QTest::newRow("doc5") << "EUC-JP" << false;
+ QTest::newRow("doc6") << "EUC-KR" << false;
+ //QTest::newRow("doc7") << "GB18030-0" << false; // only GB18030 works
+ QTest::newRow("doc7-bis") << "GB18030" << false;
+ QTest::newRow("doc8") << "IBM 850" << false;
+ QTest::newRow("doc9") << "IBM 866" << false;
+ QTest::newRow("doc10") << "IBM 874" << false;
+ QTest::newRow("doc11") << "ISO 2022-JP" << false;
+ //ISO 8859-1 to 10 and ISO 8859-13 to 16 tested previously
+ // Iscii-Bng, Dev, Gjr, Knd, Mlm, Ori, Pnj, Tlg, and Tml tested in Iscii test
+ //QTest::newRow("doc12") << "JIS X 0201" << false; //actually not there
+ //QTest::newRow("doc13") << "JIS X 0208" << false; // actually not there
+ QTest::newRow("doc14") << "KOI8-R" << false;
+ QTest::newRow("doc15") << "KOI8-U" << false;
+ //QTest::newRow("doc16") << "MuleLao-1" << false; //only on x11
+ QTest::newRow("doc17") << "ROMAN8" << false;
+ QTest::newRow("doc18") << "Shift-JIS" << false;
+ QTest::newRow("doc19") << "TIS-620" << false;
+ QTest::newRow("doc20") << "TSCII" << false;
+ QTest::newRow("doc21") << "UTF-8" << false;
+ QTest::newRow("doc22") << "UTF-16" << false;
+ QTest::newRow("doc23") << "UTF-16BE" << false;
+ QTest::newRow("doc24") << "UTF-16LE" << false;
+ QTest::newRow("doc25") << "UTF-32" << false;
+ QTest::newRow("doc26") << "UTF-32BE" << false;
+ QTest::newRow("doc27") << "UTF-32LE" << false;
+ //Windows-1250 to 1258 tested previously
+ QTest::newRow("doc3") << "WINSAMI2" << false;
}
void tst_QTextCodec::fromUnicode()
@@ -222,6 +268,7 @@ void tst_QTextCodec::fromUnicode()
chars[i] = i + 128;
QString s = codec->toUnicode(chars, 128);
QByteArray c = codec->fromUnicode(s);
+ QCOMPARE(c.size(), 128);
int numberOfQuestionMarks = 0;
for (int i = 0; i < 128; ++i) {
@@ -360,7 +407,7 @@ void tst_QTextCodec::asciiToIscii() const
/* For each codec. */
const QTextCodec *const textCodec = QTextCodec::codecForName(isciiCodecs[i]);
- Q_ASSERT(textCodec);
+ QVERIFY(textCodec);
for(int i2 = 0; i2 < len; ++i2) {
/* For each character in ascii. */
@@ -384,9 +431,12 @@ void tst_QTextCodec::flagCodepointFFFF() const
Q_ASSERT(codec);
const QByteArray asDecoded(codec->fromUnicode(input));
+ QCOMPARE(asDecoded, QByteArray("?"));
+
+ QByteArray ffff("\357\277\277");
QTextCodec::ConverterState state(QTextCodec::ConvertInvalidToNull);
- QVERIFY(codec->toUnicode(asDecoded.constData(), asDecoded.length(), &state) == QChar(0));
- QVERIFY(codec->toUnicode(asDecoded) == QChar(0xfffd));
+ QVERIFY(codec->toUnicode(ffff.constData(), ffff.length(), &state) == QChar(0));
+ QVERIFY(codec->toUnicode(ffff) == QChar(0xfffd));
}
void tst_QTextCodec::flagF7808080() const
@@ -447,12 +497,11 @@ void tst_QTextCodec::flagEFBFBF() const
/* When 0xEFBFBF is preceeded by what seems to be an arbitrary character,
* QTextCodec fails to flag it. */
{
- QEXPECT_FAIL("", "This is a bug and needs to be fixed.", Continue);
QByteArray start("B");
start.append(invalidInput);
QTextCodec::ConverterState state(QTextCodec::ConvertInvalidToNull);
- QVERIFY(codec->toUnicode(start.constData(), start.length(), &state) == QChar(0));
+ QVERIFY(codec->toUnicode(start.constData(), start.length(), &state) == QString::fromLatin1("B\0", 2));
}
}
@@ -478,7 +527,9 @@ void tst_QTextCodec::aliasForUTF16() const
void tst_QTextCodec::mibForTSCII() const
{
- QCOMPARE(QTextCodec::codecForName("TSCII")->mibEnum(), 2107);
+ QTextCodec *codec = QTextCodec::codecForName("TSCII");
+ QVERIFY(codec);
+ QCOMPARE(codec->mibEnum(), 2107);
}
static QString fromInvalidUtf8Sequence(const QByteArray &ba)
@@ -695,15 +746,15 @@ void tst_QTextCodec::utf8Codec_data()
str = QChar(QChar::ReplacementCharacter);
QTest::newRow("http://www.w3.org/2001/06/utf-8-wrong/UTF-8-test.html 2.3.3") << utf8 << str << -1;
- // 2.3.4 U+0010FFFF
+ // 2.3.4 U+0010FFFD
utf8.clear();
utf8 += char(0xf4);
utf8 += char(0x8f);
utf8 += char(0xbf);
- utf8 += char(0xbf);
+ utf8 += char(0xbd);
str.clear();
str += QChar(0xdbff);
- str += QChar(0xdfff);
+ str += QChar(0xdffd);
QTest::newRow("http://www.w3.org/2001/06/utf-8-wrong/UTF-8-test.html 2.3.4") << utf8 << str << -1;
// 2.3.5 U+00110000
@@ -1938,17 +1989,210 @@ static int loadAndConvertMIB(int mib)
void tst_QTextCodec::threadSafety()
{
+ QList<QByteArray> codecList = QTextCodec::availableCodecs();
+ QList<int> mibList = QTextCodec::availableMibs();
+#ifndef QT_NO_CONCURRENT
QThreadPool::globalInstance()->setMaxThreadCount(12);
- QList<QByteArray> codecList = QTextCodec::availableCodecs();
QFuture<QByteArray> res = QtConcurrent::mapped(codecList, loadAndConvert);
- QList<int> mibList = QTextCodec::availableMibs();
+
QFuture<int> res2 = QtConcurrent::mapped(mibList, loadAndConvertMIB);
QCOMPARE(res.results(), codecList);
QCOMPARE(res2.results(), mibList);
+#endif
+}
+
+void tst_QTextCodec::invalidNames()
+{
+ QVERIFY(!QTextCodec::codecForName(""));
+ QVERIFY(!QTextCodec::codecForName(QByteArray()));
+ QVERIFY(!QTextCodec::codecForName("-"));
+ QVERIFY(!QTextCodec::codecForName("\1a\2b\3a\4d\5c\6s\7a\xffr\xec_\x9c_"));
+ QVERIFY(!QTextCodec::codecForName("\n"));
+ QVERIFY(!QTextCodec::codecForName("don't exist"));
+ QByteArray huge = "azertyuiop^$qsdfghjklm<wxcvbn,;:=1234567890°_";
+ huge = huge + huge + huge + huge + huge + huge + huge + huge;
+ huge = huge + huge + huge + huge + huge + huge + huge + huge;
+ huge = huge + huge + huge + huge + huge + huge + huge + huge;
+ huge = huge + huge + huge + huge + huge + huge + huge + huge;
+ QVERIFY(!QTextCodec::codecForName(huge));
+}
+
+void tst_QTextCodec::checkAliases_data()
+{
+ QTest::addColumn<QByteArray>("codecName");
+ QList<QByteArray> codecList = QTextCodec::availableCodecs();
+ foreach (const QByteArray &a, codecList) {
+ QTest::newRow( a.constData() ) << a;
+ }
+}
+
+void tst_QTextCodec::checkAliases()
+{
+ QFETCH( QByteArray, codecName );
+ QTextCodec *c = QTextCodec::codecForName(codecName);
+ QVERIFY(c);
+ QCOMPARE(QTextCodec::codecForName(codecName), c);
+ QCOMPARE(QTextCodec::codecForName(c->name()), c);
+
+ foreach(const QByteArray &a, c->aliases()) {
+ QCOMPARE(QTextCodec::codecForName(a), c);
+ }
+}
+
+
+void tst_QTextCodec::moreToFromUnicode_data() {
+ QTest::addColumn<QByteArray>("codecName");
+ QTest::addColumn<QByteArray>("testData");
+
+ QTest::newRow("russian") << QByteArray("ISO-8859-5")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF\x00");
+
+ QTest::newRow("arabic") << QByteArray("ISO-8859-6")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA4\xAC\xAD\xBB\xBF\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2");
+
+ QTest::newRow("greek") << QByteArray("ISO-8859-7")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA6\xA7\xA8\xA9\xAB\xAC\xAD\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE");
+
+ QTest::newRow("turkish") << QByteArray("ISO-8859-9")
+ << QByteArray("\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+#ifdef Q_OS_SYMBIAN
+ QTest::newRow("thai") << QByteArray("TIS-620")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB");
+#endif
+
+ QTest::newRow("latin1") << QByteArray("ISO-8859-1")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+ QByteArray sms7bit_ba;
+ for (int i=1; i <= 0x7f; ++i) {
+ if (i!='\x1b') {
+ sms7bit_ba.append(i);
+ }
+ }
+#ifdef Q_OS_SYMBIAN
+ QTest::newRow("sms7bit") << QByteArray("SMS 7-bit") << sms7bit_ba;
+#endif
+
+ QTest::newRow("latin2") << QByteArray("ISO-8859-2")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+ QTest::newRow("latin3") << QByteArray("ISO-8859-3")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBF\xC0\xC1\xC2\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+ QTest::newRow("latin4") << QByteArray("ISO-8859-4")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+ QTest::newRow("russian 2") << QByteArray("ISO-8859-5")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+ QTest::newRow("arabic 2") << QByteArray("ISO-8859-6")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA4\xAC\xAD\xBB\xBF\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2");
+
+ QTest::newRow("greek 2") << QByteArray("ISO-8859-7")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA6\xA7\xA8\xA9\xAB\xAC\xAD\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE");
+
+#ifdef Q_OS_SYMBIAN
+ QTest::newRow("hebriew") << QByteArray("ISO-8859-8")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFD\xFE");
+#endif
+
+ QTest::newRow("latin5") << QByteArray("ISO-8859-9")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+ QTest::newRow("latin6") << QByteArray("ISO-8859-10")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+#if 0
+ QByteArray iso8859_11_ba;
+ for (int x=0x20; x<=0x7f; ++x) {
+ iso8859_11_ba.append(x);
+ }
+ for (int x=0xa0; x<0xff; ++x) {
+ if ((x>=0xdb && x<0xdf) || x>0xfb){
+ continue;
+ }
+ iso8859_11_ba.append(x);
+ }
+ QTest::newRow("latin-thai") << QByteArray("ISO-8859-11") << iso8859_11_ba;
+#endif
+
+ QTest::newRow("latin7") << QByteArray("ISO-8859-13")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+ QTest::newRow("celtic") << QByteArray("ISO-8859-14")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+ QTest::newRow("latin9") << QByteArray("ISO-8859-15")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+ QTest::newRow("latin10") << QByteArray("ISO-8859-16")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+ QTest::newRow("cp850") << QByteArray("CP850")
+ << QByteArray("\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff");
+
+ QTest::newRow("cp874") << QByteArray("CP874")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x85\x91\x92\x93\x94\x95\x96\x97\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB");
+
+ QTest::newRow("cp1250") << QByteArray("CP1250")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x82\x84\x85\x86\x87\x89\x8A\x8B\x8C\x8D\x8E\x8F\x91\x92\x93\x94\x95\x96\x97\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+ QTest::newRow("cp1251") << QByteArray("CP1251")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+ QTest::newRow("cp1252") << QByteArray("CP1252")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8E\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+ QTest::newRow("cp1253") << QByteArray("CP1253")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x82\x83\x84\x85\x86\x87\x89\x8B\x91\x92\x93\x94\x95\x96\x97\x99\x9B\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE");
+
+ QTest::newRow("cp1254") << QByteArray("CP1254")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+ QTest::newRow("cp1255") << QByteArray("CP1255")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x82\x83\x84\x85\x86\x87\x88\x89,x8B\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9B\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFD\xFE");
+
+ QTest::newRow("cp1256") << QByteArray("CP1256")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+ QTest::newRow("cp1257") << QByteArray("CP1257")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x82\x84\x85\x86\x87\x89\x8B\x8D\x8E\x8F\x91\x92\x93\x94\x95\x96\x97\x99\x9B\x9D\x9E\xA0\xA2\xA3\xA4\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+ QTest::newRow("cp1258") << QByteArray("CP1258")
+ << QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x82\x83\x84\x85\x86\x87\x88\x89\x8B\x8C\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9B\x9C\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+
+ QByteArray koi8_r_ba;
+ for (int x=0x20; x<=0xff; ++x) {
+ if (x!=0x9A && x!=0xbf) {
+ koi8_r_ba.append(x);
+ }
+ }
+ QTest::newRow("KOI8-R") << QByteArray("KOI8-R") << koi8_r_ba;
+
+ QByteArray koi8_u_ba;
+ for (int x=0x20; x<=0xff; ++x) {
+ koi8_u_ba.append(x);
+ }
+ QTest::newRow("KOI8-U") << QByteArray("KOI8-U") << koi8_u_ba;
}
+void tst_QTextCodec::moreToFromUnicode()
+{
+ QFETCH( QByteArray, codecName );
+ QFETCH( QByteArray, testData );
+
+ QTextCodec *c = QTextCodec::codecForName( codecName.data() );
+ QVERIFY(c);
+
+ QString uStr = c->toUnicode(testData);
+ QByteArray cStr = c->fromUnicode(uStr);
+ QCOMPARE(testData, cStr);
+}
+
+
QTEST_MAIN(tst_QTextCodec)
#include "tst_qtextcodec.moc"
diff --git a/tests/auto/qtextedit/tst_qtextedit.cpp b/tests/auto/qtextedit/tst_qtextedit.cpp
index deb9379b5a..101baa53b5 100644
--- a/tests/auto/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/qtextedit/tst_qtextedit.cpp
@@ -201,6 +201,9 @@ private slots:
void noWrapBackgrounds();
void preserveCharFormatAfterUnchangingSetPosition();
void twoSameInputMethodEvents();
+#ifndef QT_NO_CONTEXTMENU
+ void taskQTBUG_7902_contextMenuCrash();
+#endif
private:
void createSelection();
@@ -2202,5 +2205,24 @@ void tst_QTextEdit::twoSameInputMethodEvents()
QCOMPARE(ed->document()->firstBlock().layout()->lineCount(), 1);
}
+#ifndef QT_NO_CONTEXTMENU
+void tst_QTextEdit::taskQTBUG_7902_contextMenuCrash()
+{
+ QTextEdit *w = new QTextEdit;
+ w->show();
+ QTest::qWaitForWindowShown(w);
+
+ QTimer ti;
+ w->connect(&ti, SIGNAL(timeout()), w, SLOT(deleteLater()));
+ ti.start(200);
+
+ QContextMenuEvent *cme = new QContextMenuEvent(QContextMenuEvent::Mouse, w->rect().center());
+ qApp->postEvent(w->viewport(), cme);
+
+ QTest::qWait(300);
+ // No crash, it's allright.
+}
+#endif
+
QTEST_MAIN(tst_QTextEdit)
#include "tst_qtextedit.moc"
diff --git a/tests/auto/qtextstream/tst_qtextstream.cpp b/tests/auto/qtextstream/tst_qtextstream.cpp
index 9146be2c93..4c78ef0510 100644
--- a/tests/auto/qtextstream/tst_qtextstream.cpp
+++ b/tests/auto/qtextstream/tst_qtextstream.cpp
@@ -221,6 +221,7 @@ private slots:
void nanInf();
void utf8IncompleteAtBufferBoundary_data();
void utf8IncompleteAtBufferBoundary();
+ void writeSeekWriteNoBOM();
// status
void status_real_read_data();
@@ -1847,6 +1848,63 @@ void tst_QTextStream::utf8IncompleteAtBufferBoundary()
}
// ------------------------------------------------------------------------------
+
+// Make sure we don't write a BOM after seek()ing
+
+void tst_QTextStream::writeSeekWriteNoBOM()
+{
+
+ //First with the default codec (normally either latin-1 or UTF-8)
+
+ QBuffer out;
+ out.open(QIODevice::WriteOnly);
+ QTextStream stream(&out);
+
+ int number = 0;
+ QString sizeStr = QLatin1String("Size=")
+ + QString::number(number).rightJustified(10, QLatin1Char('0'));
+ stream << sizeStr << endl;
+ stream << "Version=" << QString::number(14) << endl;
+ stream << "blah blah blah" << endl;
+ stream.flush();
+
+ QCOMPARE(out.buffer().constData(), "Size=0000000000\nVersion=14\nblah blah blah\n");
+
+ // Now overwrite the size header item
+ number = 42;
+ stream.seek(0);
+ sizeStr = QLatin1String("Size=")
+ + QString::number(number).rightJustified(10, QLatin1Char('0'));
+ stream << sizeStr << endl;
+ stream.flush();
+
+ // Check buffer is still OK
+ QCOMPARE(out.buffer().constData(), "Size=0000000042\nVersion=14\nblah blah blah\n");
+
+
+ //Then UTF-16
+
+ QBuffer out16;
+ out16.open(QIODevice::WriteOnly);
+ QTextStream stream16(&out16);
+ stream16.setCodec("UTF-16");
+
+ stream16 << "one" << "two" << QLatin1String("three");
+ stream16.flush();
+
+ // save that output
+ QByteArray first = out16.buffer();
+
+ stream16.seek(0);
+ stream16 << "one";
+ stream16.flush();
+
+ QCOMPARE(out16.buffer(), first);
+}
+
+
+
+// ------------------------------------------------------------------------------
void tst_QTextStream::generateOperatorCharData(bool for_QString)
{
QTest::addColumn<QByteArray>("input");
diff --git a/tests/auto/qtimer/tst_qtimer.cpp b/tests/auto/qtimer/tst_qtimer.cpp
index cc97e4e2b8..a0408ef509 100644
--- a/tests/auto/qtimer/tst_qtimer.cpp
+++ b/tests/auto/qtimer/tst_qtimer.cpp
@@ -85,6 +85,7 @@ private slots:
void timerFiresOnlyOncePerProcessEvents();
void timerIdPersistsAfterThreadExit();
void cancelLongTimer();
+ void singleShotStaticFunctionZeroTimeout();
};
class TimerHelper : public QObject
@@ -611,5 +612,16 @@ void tst_QTimer::cancelLongTimer()
QVERIFY(!timer.isActive());
}
+void tst_QTimer::singleShotStaticFunctionZeroTimeout()
+{
+ TimerHelper helper;
+
+ QTimer::singleShot(0, &helper, SLOT(timeout()));
+ QTest::qWait(500);
+ QCOMPARE(helper.count, 1);
+ QTest::qWait(500);
+ QCOMPARE(helper.count, 1);
+}
+
QTEST_MAIN(tst_QTimer)
#include "tst_qtimer.moc"
diff --git a/tests/auto/qtoolbar/tst_qtoolbar.cpp b/tests/auto/qtoolbar/tst_qtoolbar.cpp
index e00597d4c9..07e81c1ab8 100644
--- a/tests/auto/qtoolbar/tst_qtoolbar.cpp
+++ b/tests/auto/qtoolbar/tst_qtoolbar.cpp
@@ -102,6 +102,7 @@ private slots:
void orientationChanged();
void iconSizeChanged();
void toolButtonStyleChanged();
+ void visibilityChanged();
void actionOwnership();
void widgetAction();
void accel();
@@ -998,6 +999,36 @@ void tst_QToolBar::iconSizeChanged()
void tst_QToolBar::toolButtonStyleChanged()
{ DEPENDS_ON("toolButtonStyle()"); }
+void tst_QToolBar::visibilityChanged()
+{
+ QMainWindow mw;
+ QToolBar tb;
+ QSignalSpy spy(&tb, SIGNAL(visibilityChanged(bool)));
+
+ mw.addToolBar(&tb);
+ mw.show();
+
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.at(0).at(0).toBool(), true);
+ spy.clear();
+
+ tb.hide();
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.at(0).at(0).toBool(), false);
+ spy.clear();
+
+ tb.hide();
+ QCOMPARE(spy.count(), 0);
+
+ tb.show();
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.at(0).at(0).toBool(), true);
+ spy.clear();
+
+ tb.show();
+ QCOMPARE(spy.count(), 0);
+}
+
void tst_QToolBar::actionOwnership()
{
{
diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp
index 83109b5cea..b7cbdb8439 100644
--- a/tests/auto/qurl/tst_qurl.cpp
+++ b/tests/auto/qurl/tst_qurl.cpp
@@ -193,6 +193,7 @@ private slots:
void fromUserInput();
void task_199967();
void task_240612();
+ void taskQTBUG_6962();
#ifdef QT3_SUPPORT
void dirPath();
@@ -3860,5 +3861,13 @@ void tst_QUrl::resolvedWithAbsoluteSchemes_data() const
<< QUrl::fromEncoded("http://www.foo.com:8080/newfile.html");
}
+void tst_QUrl::taskQTBUG_6962()
+{
+ //bug 6962: empty authority ignored by setAuthority
+ QUrl url("http://example.com/something");
+ url.setAuthority(QString());
+ QCOMPARE(url.authority(), QString());
+}
+
QTEST_MAIN(tst_QUrl)
#include "tst_qurl.moc"
diff --git a/tests/auto/qvariant/tst_qvariant.cpp b/tests/auto/qvariant/tst_qvariant.cpp
index 1fd656441e..98d74361b6 100644
--- a/tests/auto/qvariant/tst_qvariant.cpp
+++ b/tests/auto/qvariant/tst_qvariant.cpp
@@ -2522,15 +2522,23 @@ void tst_QVariant::variant_to()
QCOMPARE(qVariantFromValue(0.25f).toDouble(), 0.25);
}
+struct Blah { int i; };
+
+QDataStream& operator>>(QDataStream& s, Blah& c)
+{ return (s >> c.i); }
+
+QDataStream& operator<<(QDataStream& s, const Blah& c)
+{ return (s << c.i); }
+
void tst_QVariant::saveLoadCustomTypes()
{
QByteArray data;
- int i = 42;
- int tp = qRegisterMetaType<int>("Blah");
+ Blah i = { 42 };
+ int tp = qRegisterMetaType<Blah>("Blah");
QVariant v = QVariant(tp, &i);
- qRegisterMetaTypeStreamOperators<int>("Blah");
+ qRegisterMetaTypeStreamOperators<Blah>("Blah");
QCOMPARE(v.userType(), tp);
QVERIFY(v.type() == QVariant::UserType);
diff --git a/tests/auto/qvideowidget/qvideowidget.pro b/tests/auto/qvideowidget/qvideowidget.pro
new file mode 100644
index 0000000000..ca0fc24688
--- /dev/null
+++ b/tests/auto/qvideowidget/qvideowidget.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+
+SOURCES = tst_qvideowidget.cpp
+
+QT = core gui multimedia
+
diff --git a/tests/auto/qvideowidget/tst_qvideowidget.cpp b/tests/auto/qvideowidget/tst_qvideowidget.cpp
new file mode 100644
index 0000000000..f703055afb
--- /dev/null
+++ b/tests/auto/qvideowidget/tst_qvideowidget.cpp
@@ -0,0 +1,1600 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include <QtMultimedia/qvideowidget.h>
+
+#include <QtMultimedia/qmediaobject.h>
+#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/private/qpaintervideosurface_p.h>
+#include <QtMultimedia/qvideooutputcontrol.h>
+#include <QtMultimedia/qvideowindowcontrol.h>
+#include <QtMultimedia/qvideowidgetcontrol.h>
+#include <QtMultimedia/qvideorenderercontrol.h>
+#include <QtMultimedia/qabstractvideosurface.h>
+#include <QtMultimedia/qvideosurfaceformat.h>
+
+#include <QtGui/qapplication.h>
+
+
+class tst_QVideoWidget : public QObject
+{
+ Q_OBJECT
+private slots:
+ void nullObject();
+ void nullService();
+ void nullOutputControl();
+ void noOutputs();
+ void serviceDestroyed();
+ void objectDestroyed();
+ void setMediaObject();
+
+ void showWindowControl();
+ void aspectRatioWindowControl();
+ void sizeHintWindowControl_data() { sizeHint_data(); }
+ void sizeHintWindowControl();
+ void brightnessWindowControl_data() { color_data(); }
+ void brightnessWindowControl();
+ void contrastWindowControl_data() { color_data(); }
+ void contrastWindowControl();
+ void hueWindowControl_data() { color_data(); }
+ void hueWindowControl();
+ void saturationWindowControl_data() { color_data(); }
+ void saturationWindowControl();
+
+ void showWidgetControl();
+ void aspectRatioWidgetControl();
+ void sizeHintWidgetControl_data() { sizeHint_data(); }
+ void sizeHintWidgetControl();
+ void brightnessWidgetControl_data() { color_data(); }
+ void brightnessWidgetControl();
+ void contrastWidgetControl_data() { color_data(); }
+ void contrastWidgetControl();
+ void hueWidgetControl_data() { color_data(); }
+ void hueWidgetControl();
+ void saturationWidgetControl_data() { color_data(); }
+ void saturationWidgetControl();
+
+ void showRendererControl();
+ void aspectRatioRendererControl();
+ void sizeHintRendererControl_data();
+ void sizeHintRendererControl();
+ void brightnessRendererControl_data() { color_data(); }
+ void brightnessRendererControl();
+ void contrastRendererControl_data() { color_data(); }
+ void contrastRendererControl();
+ void hueRendererControl_data() { color_data(); }
+ void hueRendererControl();
+ void saturationRendererControl_data() { color_data(); }
+ void saturationRendererControl();
+
+ void paintRendererControl();
+
+#ifndef Q_WS_X11
+ void fullScreenWindowControl();
+ void fullScreenWidgetControl();
+ void fullScreenRendererControl();
+#endif
+
+private:
+ void sizeHint_data();
+ void color_data();
+};
+
+Q_DECLARE_METATYPE(QVideoWidget::AspectRatioMode)
+Q_DECLARE_METATYPE(const uchar *)
+
+class QtTestOutputControl : public QVideoOutputControl
+{
+public:
+ QtTestOutputControl() : m_output(NoOutput) {}
+
+ QList<Output> availableOutputs() const { return m_outputs; }
+ void setAvailableOutputs(const QList<Output> outputs) { m_outputs = outputs; }
+
+ Output output() const { return m_output; }
+ virtual void setOutput(Output output) { m_output = output; }
+
+private:
+ Output m_output;
+ QList<Output> m_outputs;
+};
+
+class QtTestWindowControl : public QVideoWindowControl
+{
+public:
+ QtTestWindowControl()
+ : m_winId(0)
+ , m_repaintCount(0)
+ , m_brightness(0)
+ , m_contrast(0)
+ , m_saturation(0)
+ , m_aspectRatioMode(QVideoWidget::KeepAspectRatio)
+ , m_fullScreen(0)
+ {
+ }
+
+ WId winId() const { return m_winId; }
+ void setWinId(WId id) { m_winId = id; }
+
+ QRect displayRect() const { return m_displayRect; }
+ void setDisplayRect(const QRect &rect) { m_displayRect = rect; }
+
+ bool isFullScreen() const { return m_fullScreen; }
+ void setFullScreen(bool fullScreen) { emit fullScreenChanged(m_fullScreen = fullScreen); }
+
+ int repaintCount() const { return m_repaintCount; }
+ void setRepaintCount(int count) { m_repaintCount = count; }
+ void repaint() { ++m_repaintCount; }
+
+ QSize nativeSize() const { return m_nativeSize; }
+ void setNativeSize(const QSize &size) { m_nativeSize = size; emit nativeSizeChanged(); }
+
+ QVideoWidget::AspectRatioMode aspectRatioMode() const { return m_aspectRatioMode; }
+ void setAspectRatioMode(QVideoWidget::AspectRatioMode mode) { m_aspectRatioMode = mode; }
+
+ int brightness() const { return m_brightness; }
+ void setBrightness(int brightness) { emit brightnessChanged(m_brightness = brightness); }
+
+ int contrast() const { return m_contrast; }
+ void setContrast(int contrast) { emit contrastChanged(m_contrast = contrast); }
+
+ int hue() const { return m_hue; }
+ void setHue(int hue) { emit hueChanged(m_hue = hue); }
+
+ int saturation() const { return m_saturation; }
+ void setSaturation(int saturation) { emit saturationChanged(m_saturation = saturation); }
+
+private:
+ WId m_winId;
+ int m_repaintCount;
+ int m_brightness;
+ int m_contrast;
+ int m_hue;
+ int m_saturation;
+ QVideoWidget::AspectRatioMode m_aspectRatioMode;
+ QRect m_displayRect;
+ QSize m_nativeSize;
+ bool m_fullScreen;
+};
+
+class QtTestWidgetControl : public QVideoWidgetControl
+{
+public:
+ QtTestWidgetControl()
+ : m_brightness(1.0)
+ , m_contrast(1.0)
+ , m_hue(1.0)
+ , m_saturation(1.0)
+ , m_aspectRatioMode(QVideoWidget::KeepAspectRatio)
+ , m_fullScreen(false)
+ {
+ }
+
+ bool isFullScreen() const { return m_fullScreen; }
+ void setFullScreen(bool fullScreen) { emit fullScreenChanged(m_fullScreen = fullScreen); }
+
+ QVideoWidget::AspectRatioMode aspectRatioMode() const { return m_aspectRatioMode; }
+ void setAspectRatioMode(QVideoWidget::AspectRatioMode mode) { m_aspectRatioMode = mode; }
+
+ int brightness() const { return m_brightness; }
+ void setBrightness(int brightness) { emit brightnessChanged(m_brightness = brightness); }
+
+ int contrast() const { return m_contrast; }
+ void setContrast(int contrast) { emit contrastChanged(m_contrast = contrast); }
+
+ int hue() const { return m_hue; }
+ void setHue(int hue) { emit hueChanged(m_hue = hue); }
+
+ int saturation() const { return m_saturation; }
+ void setSaturation(int saturation) { emit saturationChanged(m_saturation = saturation); }
+
+ void setSizeHint(const QSize &size) { m_widget.setSizeHint(size); }
+
+ QWidget *videoWidget() { return &m_widget; }
+
+private:
+ class Widget : public QWidget
+ {
+ public:
+ QSize sizeHint() const { return m_sizeHint; }
+ void setSizeHint(const QSize &size) { m_sizeHint = size; updateGeometry(); }
+ private:
+ QSize m_sizeHint;
+ } m_widget;
+ int m_brightness;
+ int m_contrast;
+ int m_hue;
+ int m_saturation;
+ QVideoWidget::AspectRatioMode m_aspectRatioMode;
+ QSize m_sizeHint;
+ bool m_fullScreen;
+};
+
+class QtTestRendererControl : public QVideoRendererControl
+{
+public:
+ QtTestRendererControl()
+ : m_surface(0)
+ {
+ }
+
+ QAbstractVideoSurface *surface() const { return m_surface; }
+ void setSurface(QAbstractVideoSurface *surface) { m_surface = surface; }
+
+private:
+ QAbstractVideoSurface *m_surface;
+};
+
+class QtTestVideoService : public QMediaService
+{
+ Q_OBJECT
+public:
+ QtTestVideoService(
+ QtTestOutputControl *output,
+ QtTestWindowControl *window,
+ QtTestWidgetControl *widget,
+ QtTestRendererControl *renderer)
+ : QMediaService(0)
+ , outputControl(output)
+ , windowControl(window)
+ , widgetControl(widget)
+ , rendererControl(renderer)
+ {
+ }
+
+ ~QtTestVideoService()
+ {
+ delete outputControl;
+ delete windowControl;
+ delete widgetControl;
+ delete rendererControl;
+ }
+
+ QMediaControl *control(const char *name) const
+ {
+ if (qstrcmp(name, QVideoOutputControl_iid) == 0)
+ return outputControl;
+ else if (qstrcmp(name, QVideoWindowControl_iid) == 0)
+ return windowControl;
+ else if (qstrcmp(name, QVideoWidgetControl_iid) == 0)
+ return widgetControl;
+ else if (qstrcmp(name, QVideoRendererControl_iid) == 0)
+ return rendererControl;
+ else
+ return 0;
+ }
+
+ QtTestOutputControl *outputControl;
+ QtTestWindowControl *windowControl;
+ QtTestWidgetControl *widgetControl;
+ QtTestRendererControl *rendererControl;
+};
+
+class QtTestVideoObject : public QMediaObject
+{
+ Q_OBJECT
+public:
+ QtTestVideoObject(
+ QtTestWindowControl *window,
+ QtTestWidgetControl *widget,
+ QtTestRendererControl *renderer):
+ QMediaObject(0, new QtTestVideoService(new QtTestOutputControl, window, widget, renderer))
+ {
+ testService = qobject_cast<QtTestVideoService*>(service());
+ QList<QVideoOutputControl::Output> outputs;
+
+ if (window)
+ outputs.append(QVideoOutputControl::WindowOutput);
+ if (widget)
+ outputs.append(QVideoOutputControl::WidgetOutput);
+ if (renderer)
+ outputs.append(QVideoOutputControl::RendererOutput);
+
+ testService->outputControl->setAvailableOutputs(outputs);
+ }
+
+ QtTestVideoObject(QtTestVideoService *service):
+ QMediaObject(0, service),
+ testService(service)
+ {
+ }
+
+ ~QtTestVideoObject()
+ {
+ delete testService;
+ }
+
+ QtTestVideoService *testService;
+};
+
+void tst_QVideoWidget::nullObject()
+{
+ QVideoWidget widget;
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ QVERIFY(widget.sizeHint().isEmpty());
+
+ widget.setFullScreen(true);
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(widget.isFullScreen(), true);
+
+ widget.setAspectRatioMode(QVideoWidget::IgnoreAspectRatio);
+ QCOMPARE(widget.aspectRatioMode(), QVideoWidget::IgnoreAspectRatio);
+
+ {
+ QSignalSpy spy(&widget, SIGNAL(brightnessChanged(int)));
+
+ widget.setBrightness(100);
+ QCOMPARE(widget.brightness(), 100);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toInt(), 100);
+
+ widget.setBrightness(100);
+ QCOMPARE(widget.brightness(), 100);
+ QCOMPARE(spy.count(), 1);
+
+ widget.setBrightness(-120);
+ QCOMPARE(widget.brightness(), -100);
+ QCOMPARE(spy.count(), 2);
+ QCOMPARE(spy.value(1).value(0).toInt(), -100);
+ } {
+ QSignalSpy spy(&widget, SIGNAL(contrastChanged(int)));
+
+ widget.setContrast(100);
+ QCOMPARE(widget.contrast(), 100);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toInt(), 100);
+
+ widget.setContrast(100);
+ QCOMPARE(widget.contrast(), 100);
+ QCOMPARE(spy.count(), 1);
+
+ widget.setContrast(-120);
+ QCOMPARE(widget.contrast(), -100);
+ QCOMPARE(spy.count(), 2);
+ QCOMPARE(spy.value(1).value(0).toInt(), -100);
+ } {
+ QSignalSpy spy(&widget, SIGNAL(hueChanged(int)));
+
+ widget.setHue(100);
+ QCOMPARE(widget.hue(), 100);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toInt(), 100);
+
+ widget.setHue(100);
+ QCOMPARE(widget.hue(), 100);
+ QCOMPARE(spy.count(), 1);
+
+ widget.setHue(-120);
+ QCOMPARE(widget.hue(), -100);
+ QCOMPARE(spy.count(), 2);
+ QCOMPARE(spy.value(1).value(0).toInt(), -100);
+ } {
+ QSignalSpy spy(&widget, SIGNAL(saturationChanged(int)));
+
+ widget.setSaturation(100);
+ QCOMPARE(widget.saturation(), 100);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toInt(), 100);
+
+ widget.setSaturation(100);
+ QCOMPARE(widget.saturation(), 100);
+ QCOMPARE(spy.count(), 1);
+
+ widget.setSaturation(-120);
+ QCOMPARE(widget.saturation(), -100);
+ QCOMPARE(spy.count(), 2);
+ QCOMPARE(spy.value(1).value(0).toInt(), -100);
+ }
+}
+
+void tst_QVideoWidget::nullService()
+{
+ QtTestVideoObject object(0);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ QVERIFY(widget.sizeHint().isEmpty());
+
+ widget.setFullScreen(true);
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(widget.isFullScreen(), true);
+
+ widget.setAspectRatioMode(QVideoWidget::IgnoreAspectRatio);
+ QCOMPARE(widget.aspectRatioMode(), QVideoWidget::IgnoreAspectRatio);
+
+ widget.setBrightness(100);
+ QCOMPARE(widget.brightness(), 100);
+
+ widget.setContrast(100);
+ QCOMPARE(widget.contrast(), 100);
+
+ widget.setHue(100);
+ QCOMPARE(widget.hue(), 100);
+
+ widget.setSaturation(100);
+ QCOMPARE(widget.saturation(), 100);
+}
+
+void tst_QVideoWidget::nullOutputControl()
+{
+ QtTestVideoObject object(new QtTestVideoService(0, 0, 0, 0));
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ QVERIFY(widget.sizeHint().isEmpty());
+
+ widget.setFullScreen(true);
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(widget.isFullScreen(), true);
+
+ widget.setBrightness(100);
+ QCOMPARE(widget.brightness(), 100);
+
+ widget.setContrast(100);
+ QCOMPARE(widget.contrast(), 100);
+
+ widget.setHue(100);
+ QCOMPARE(widget.hue(), 100);
+
+ widget.setSaturation(100);
+ QCOMPARE(widget.saturation(), 100);
+}
+
+void tst_QVideoWidget::noOutputs()
+{
+ QtTestVideoObject object(0, 0, 0);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ QVERIFY(widget.sizeHint().isEmpty());
+
+ widget.setFullScreen(true);
+ QCOMPARE(widget.isFullScreen(), true);
+
+ widget.setBrightness(100);
+ QCOMPARE(widget.brightness(), 100);
+
+ widget.setContrast(100);
+ QCOMPARE(widget.contrast(), 100);
+
+ widget.setHue(100);
+ QCOMPARE(widget.hue(), 100);
+
+ widget.setSaturation(100);
+ QCOMPARE(widget.saturation(), 100);
+}
+
+void tst_QVideoWidget::serviceDestroyed()
+{
+ QtTestVideoObject object(new QtTestWindowControl, new QtTestWidgetControl, 0);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ widget.setBrightness(100);
+ widget.setContrast(100);
+ widget.setHue(100);
+ widget.setSaturation(100);
+
+ delete object.testService;
+ object.testService = 0;
+
+ QCOMPARE(widget.mediaObject(), static_cast<QMediaObject *>(&object));
+
+ QCOMPARE(widget.brightness(), 100);
+ QCOMPARE(widget.contrast(), 100);
+ QCOMPARE(widget.hue(), 100);
+ QCOMPARE(widget.saturation(), 100);
+
+ widget.setFullScreen(true);
+ QCOMPARE(widget.isFullScreen(), true);
+}
+
+void tst_QVideoWidget::objectDestroyed()
+{
+ QtTestVideoObject *object = new QtTestVideoObject(
+ new QtTestWindowControl,
+ new QtTestWidgetControl,
+ 0);
+
+ QVideoWidget widget;
+ widget.setMediaObject(object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ widget.setBrightness(100);
+ widget.setContrast(100);
+ widget.setHue(100);
+ widget.setSaturation(100);
+
+ // Delete the media object without deleting the service.
+ QtTestVideoService *service = object->testService;
+ object->testService = 0;
+
+ delete object;
+ object = 0;
+
+ QCOMPARE(widget.mediaObject(), static_cast<QMediaObject *>(object));
+
+ QCOMPARE(service->outputControl->output(), QVideoOutputControl::NoOutput);
+
+ QCOMPARE(widget.brightness(), 100);
+ QCOMPARE(widget.contrast(), 100);
+ QCOMPARE(widget.hue(), 100);
+ QCOMPARE(widget.saturation(), 100);
+
+ widget.setFullScreen(true);
+ QCOMPARE(widget.isFullScreen(), true);
+
+ delete service;
+}
+
+void tst_QVideoWidget::setMediaObject()
+{
+ QMediaObject *nullObject = 0;
+ QtTestVideoObject windowObject(new QtTestWindowControl, 0, 0);
+ QtTestVideoObject widgetObject(0, new QtTestWidgetControl, 0);
+ QtTestVideoObject rendererObject(0, 0, new QtTestRendererControl);
+
+ QVideoWidget widget;
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ QCOMPARE(widget.mediaObject(), nullObject);
+ QCOMPARE(windowObject.testService->outputControl->output(), QVideoOutputControl::NoOutput);
+ QCOMPARE(widgetObject.testService->outputControl->output(), QVideoOutputControl::NoOutput);
+ QCOMPARE(rendererObject.testService->outputControl->output(), QVideoOutputControl::NoOutput);
+
+ widget.setMediaObject(&windowObject);
+ QCOMPARE(widget.mediaObject(), static_cast<QMediaObject *>(&windowObject));
+ QCOMPARE(windowObject.testService->outputControl->output(), QVideoOutputControl::WindowOutput);
+ QVERIFY(windowObject.testService->windowControl->winId() != 0);
+
+
+ widget.setMediaObject(&widgetObject);
+ QCOMPARE(widget.mediaObject(), static_cast<QMediaObject *>(&widgetObject));
+ QCOMPARE(widgetObject.testService->outputControl->output(), QVideoOutputControl::WidgetOutput);
+
+ QCoreApplication::processEvents(QEventLoop::AllEvents);
+ QCOMPARE(widgetObject.testService->widgetControl->videoWidget()->isVisible(), true);
+
+ QCOMPARE(windowObject.testService->outputControl->output(), QVideoOutputControl::NoOutput);
+
+ widget.setMediaObject(&rendererObject);
+ QCOMPARE(widget.mediaObject(), static_cast<QMediaObject *>(&rendererObject));
+ QCOMPARE(rendererObject.testService->outputControl->output(), QVideoOutputControl::RendererOutput);
+ QVERIFY(rendererObject.testService->rendererControl->surface() != 0);
+
+ QCOMPARE(widgetObject.testService->outputControl->output(), QVideoOutputControl::NoOutput);
+
+ widget.setMediaObject(0);
+ QCOMPARE(widget.mediaObject(), nullObject);
+
+ QCOMPARE(rendererObject.testService->outputControl->output(), QVideoOutputControl::NoOutput);
+}
+
+void tst_QVideoWidget::showWindowControl()
+{
+ QtTestVideoObject object(new QtTestWindowControl, 0, 0);
+ object.testService->windowControl->setNativeSize(QSize(240, 180));
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
+
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::WindowOutput);
+ QVERIFY(object.testService->windowControl->winId() != 0);
+
+ QVERIFY(object.testService->windowControl->repaintCount() > 0);
+
+ widget.resize(640, 480);
+ QCOMPARE(object.testService->windowControl->displayRect(), QRect(0, 0, 640, 480));
+
+ widget.move(10, 10);
+ QCOMPARE(object.testService->windowControl->displayRect(), QRect(0, 0, 640, 480));
+
+ widget.hide();
+
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::WindowOutput);
+}
+
+void tst_QVideoWidget::showWidgetControl()
+{
+ QtTestVideoObject object(0, new QtTestWidgetControl, 0);
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
+
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::WidgetOutput);
+ QCOMPARE(object.testService->widgetControl->videoWidget()->isVisible(), true);
+
+ widget.resize(640, 480);
+
+ widget.move(10, 10);
+
+ widget.hide();
+
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::WidgetOutput);
+ QCOMPARE(object.testService->widgetControl->videoWidget()->isVisible(), false);
+}
+
+void tst_QVideoWidget::showRendererControl()
+{
+ QtTestVideoObject object(0, 0, new QtTestRendererControl);
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
+
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::RendererOutput);
+ QVERIFY(object.testService->rendererControl->surface() != 0);
+
+ widget.resize(640, 480);
+
+ widget.move(10, 10);
+
+ widget.hide();
+
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::RendererOutput);
+}
+
+void tst_QVideoWidget::aspectRatioWindowControl()
+{
+ QtTestVideoObject object(new QtTestWindowControl, 0, 0);
+ object.testService->windowControl->setAspectRatioMode(QVideoWidget::IgnoreAspectRatio);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ // Test the aspect ratio defaults to keeping the aspect ratio.
+ QCOMPARE(widget.aspectRatioMode(), QVideoWidget::KeepAspectRatio);
+
+ // Test the control has been informed of the aspect ratio change, post show.
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(widget.aspectRatioMode(), QVideoWidget::KeepAspectRatio);
+ QCOMPARE(object.testService->windowControl->aspectRatioMode(), QVideoWidget::KeepAspectRatio);
+
+ // Test an aspect ratio change is enforced immediately while visible.
+ widget.setAspectRatioMode(QVideoWidget::IgnoreAspectRatio);
+ QCOMPARE(widget.aspectRatioMode(), QVideoWidget::IgnoreAspectRatio);
+ QCOMPARE(object.testService->windowControl->aspectRatioMode(), QVideoWidget::IgnoreAspectRatio);
+
+ // Test an aspect ratio set while not visible is respected.
+ widget.hide();
+ widget.setAspectRatioMode(QVideoWidget::KeepAspectRatio);
+ QCOMPARE(widget.aspectRatioMode(), QVideoWidget::KeepAspectRatio);
+ widget.show();
+ QCOMPARE(widget.aspectRatioMode(), QVideoWidget::KeepAspectRatio);
+ QCOMPARE(object.testService->windowControl->aspectRatioMode(), QVideoWidget::KeepAspectRatio);
+}
+
+void tst_QVideoWidget::aspectRatioWidgetControl()
+{
+ QtTestVideoObject object(0, new QtTestWidgetControl, 0);
+ object.testService->widgetControl->setAspectRatioMode(QVideoWidget::IgnoreAspectRatio);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ // Test the aspect ratio defaults to keeping the aspect ratio.
+ QCOMPARE(widget.aspectRatioMode(), QVideoWidget::KeepAspectRatio);
+
+ // Test the control has been informed of the aspect ratio change, post show.
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(widget.aspectRatioMode(), QVideoWidget::KeepAspectRatio);
+ QCOMPARE(object.testService->widgetControl->aspectRatioMode(), QVideoWidget::KeepAspectRatio);
+
+ // Test an aspect ratio change is enforced immediately while visible.
+ widget.setAspectRatioMode(QVideoWidget::IgnoreAspectRatio);
+ QCOMPARE(widget.aspectRatioMode(), QVideoWidget::IgnoreAspectRatio);
+ QCOMPARE(object.testService->widgetControl->aspectRatioMode(), QVideoWidget::IgnoreAspectRatio);
+
+ // Test an aspect ratio set while not visible is respected.
+ widget.hide();
+ widget.setAspectRatioMode(QVideoWidget::KeepAspectRatio);
+ QCOMPARE(widget.aspectRatioMode(), QVideoWidget::KeepAspectRatio);
+ widget.show();
+ QCOMPARE(widget.aspectRatioMode(), QVideoWidget::KeepAspectRatio);
+ QCOMPARE(object.testService->widgetControl->aspectRatioMode(), QVideoWidget::KeepAspectRatio);
+}
+
+void tst_QVideoWidget::aspectRatioRendererControl()
+{
+ QtTestVideoObject object(0, 0, new QtTestRendererControl);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ // Test the aspect ratio defaults to keeping the aspect ratio.
+ QCOMPARE(widget.aspectRatioMode(), QVideoWidget::KeepAspectRatio);
+
+ // Test the control has been informed of the aspect ratio change, post show.
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(widget.aspectRatioMode(), QVideoWidget::KeepAspectRatio);
+
+ // Test an aspect ratio change is enforced immediately while visible.
+ widget.setAspectRatioMode(QVideoWidget::IgnoreAspectRatio);
+ QCOMPARE(widget.aspectRatioMode(), QVideoWidget::IgnoreAspectRatio);
+
+ // Test an aspect ratio set while not visible is respected.
+ widget.hide();
+ widget.setAspectRatioMode(QVideoWidget::KeepAspectRatio);
+ QCOMPARE(widget.aspectRatioMode(), QVideoWidget::KeepAspectRatio);
+ widget.show();
+ QCOMPARE(widget.aspectRatioMode(), QVideoWidget::KeepAspectRatio);
+}
+
+void tst_QVideoWidget::sizeHint_data()
+{
+ QTest::addColumn<QSize>("size");
+
+ QTest::newRow("720x576")
+ << QSize(720, 576);
+}
+
+void tst_QVideoWidget::sizeHintWindowControl()
+{
+ QFETCH(QSize, size);
+
+ QtTestVideoObject object(new QtTestWindowControl, 0, 0);
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ QVERIFY(widget.sizeHint().isEmpty());
+
+ object.testService->windowControl->setNativeSize(size);
+ QCOMPARE(widget.sizeHint(), size);
+}
+
+void tst_QVideoWidget::sizeHintWidgetControl()
+{
+ QFETCH(QSize, size);
+
+ QtTestVideoObject object(0, new QtTestWidgetControl, 0);
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ QVERIFY(widget.sizeHint().isEmpty());
+
+ object.testService->widgetControl->setSizeHint(size);
+ QCOMPARE(widget.sizeHint(), size);
+}
+
+void tst_QVideoWidget::sizeHintRendererControl_data()
+{
+ QTest::addColumn<QSize>("frameSize");
+ QTest::addColumn<QRect>("viewport");
+ QTest::addColumn<QSize>("pixelAspectRatio");
+ QTest::addColumn<QSize>("expectedSize");
+
+ QTest::newRow("640x480")
+ << QSize(640, 480)
+ << QRect(0, 0, 640, 480)
+ << QSize(1, 1)
+ << QSize(640, 480);
+
+ QTest::newRow("800x600, (80,60, 640x480) viewport")
+ << QSize(800, 600)
+ << QRect(80, 60, 640, 480)
+ << QSize(1, 1)
+ << QSize(640, 480);
+
+ QTest::newRow("800x600, (80,60, 640x480) viewport, 4:3")
+ << QSize(800, 600)
+ << QRect(80, 60, 640, 480)
+ << QSize(4, 3)
+ << QSize(853, 480);
+
+}
+
+void tst_QVideoWidget::sizeHintRendererControl()
+{
+ QFETCH(QSize, frameSize);
+ QFETCH(QRect, viewport);
+ QFETCH(QSize, pixelAspectRatio);
+ QFETCH(QSize, expectedSize);
+
+ QtTestVideoObject object(0, 0, new QtTestRendererControl);
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ QVideoSurfaceFormat format(frameSize, QVideoFrame::Format_ARGB32);
+ format.setViewport(viewport);
+ format.setPixelAspectRatio(pixelAspectRatio);
+
+ QVERIFY(object.testService->rendererControl->surface()->start(format));
+
+ QCOMPARE(widget.sizeHint(), expectedSize);
+}
+
+#ifndef Q_WS_X11
+
+void tst_QVideoWidget::fullScreenWindowControl()
+{
+ QtTestVideoObject object(new QtTestWindowControl, 0, 0);
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ Qt::WindowFlags windowFlags = widget.windowFlags();
+
+ QSignalSpy spy(&widget, SIGNAL(fullScreenChanged(bool)));
+
+ // Test showing full screen with setFullScreen(true).
+ widget.setFullScreen(true);
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(object.testService->windowControl->isFullScreen(), true);
+ QCOMPARE(widget.isFullScreen(), true);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toBool(), true);
+
+ // Test returning to normal with setFullScreen(false).
+ widget.setFullScreen(false);
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(object.testService->windowControl->isFullScreen(), false);
+ QCOMPARE(widget.isFullScreen(), false);
+ QCOMPARE(spy.count(), 2);
+ QCOMPARE(spy.value(1).value(0).toBool(), false);
+ QCOMPARE(widget.windowFlags(), windowFlags);
+
+ // Test showing full screen with showFullScreen().
+ widget.showFullScreen();
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(object.testService->windowControl->isFullScreen(), true);
+ QCOMPARE(widget.isFullScreen(), true);
+ QCOMPARE(spy.count(), 3);
+ QCOMPARE(spy.value(2).value(0).toBool(), true);
+
+ // Test returning to normal with showNormal().
+ widget.showNormal();
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(object.testService->windowControl->isFullScreen(), false);
+ QCOMPARE(widget.isFullScreen(), false);
+ QCOMPARE(spy.count(), 4);
+ QCOMPARE(spy.value(3).value(0).toBool(), false);
+ QCOMPARE(widget.windowFlags(), windowFlags);
+
+ // Test setFullScreen(false) and showNormal() do nothing when isFullScreen() == false.
+ widget.setFullScreen(false);
+ QCOMPARE(object.testService->windowControl->isFullScreen(), false);
+ QCOMPARE(widget.isFullScreen(), false);
+ QCOMPARE(spy.count(), 4);
+ widget.showNormal();
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(object.testService->windowControl->isFullScreen(), false);
+ QCOMPARE(widget.isFullScreen(), false);
+ QCOMPARE(spy.count(), 4);
+
+ // Test setFullScreen(true) and showFullScreen() do nothing when isFullScreen() == true.
+ widget.showFullScreen();
+ QTest::qWaitForWindowShown(&widget);
+ widget.setFullScreen(true);
+ QCOMPARE(object.testService->windowControl->isFullScreen(), true);
+ QCOMPARE(widget.isFullScreen(), true);
+ QCOMPARE(spy.count(), 5);
+ widget.showFullScreen();
+ QCOMPARE(object.testService->windowControl->isFullScreen(), true);
+ QCOMPARE(widget.isFullScreen(), true);
+ QCOMPARE(spy.count(), 5);
+
+ // Test if the window control exits full screen mode, the widget follows suit.
+ object.testService->windowControl->setFullScreen(false);
+ QCOMPARE(widget.isFullScreen(), false);
+ QCOMPARE(spy.count(), 6);
+ QCOMPARE(spy.value(5).value(0).toBool(), false);
+
+ // Test if the window control enters full screen mode, the widget does nothing.
+ object.testService->windowControl->setFullScreen(false);
+ QCOMPARE(widget.isFullScreen(), false);
+ QCOMPARE(spy.count(), 6);
+}
+
+void tst_QVideoWidget::fullScreenWidgetControl()
+{
+ QtTestVideoObject object(0, new QtTestWidgetControl, 0);
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ Qt::WindowFlags windowFlags = widget.windowFlags();
+
+ QSignalSpy spy(&widget, SIGNAL(fullScreenChanged(bool)));
+
+ // Test showing full screen with setFullScreen(true).
+ widget.setFullScreen(true);
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(object.testService->widgetControl->isFullScreen(), true);
+ QCOMPARE(widget.isFullScreen(), true);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toBool(), true);
+
+ // Test returning to normal with setFullScreen(false).
+ widget.setFullScreen(false);
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(object.testService->widgetControl->isFullScreen(), false);
+ QCOMPARE(widget.isFullScreen(), false);
+ QCOMPARE(spy.count(), 2);
+ QCOMPARE(spy.value(1).value(0).toBool(), false);
+ QCOMPARE(widget.windowFlags(), windowFlags);
+
+ // Test showing full screen with showFullScreen().
+ widget.showFullScreen();
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(object.testService->widgetControl->isFullScreen(), true);
+ QCOMPARE(widget.isFullScreen(), true);
+ QCOMPARE(spy.count(), 3);
+ QCOMPARE(spy.value(2).value(0).toBool(), true);
+
+ // Test returning to normal with showNormal().
+ widget.showNormal();
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(object.testService->widgetControl->isFullScreen(), false);
+ QCOMPARE(widget.isFullScreen(), false);
+ QCOMPARE(spy.count(), 4);
+ QCOMPARE(spy.value(3).value(0).toBool(), false);
+ QCOMPARE(widget.windowFlags(), windowFlags);
+
+ // Test setFullScreen(false) and showNormal() do nothing when isFullScreen() == false.
+ widget.setFullScreen(false);
+ QCOMPARE(object.testService->widgetControl->isFullScreen(), false);
+ QCOMPARE(widget.isFullScreen(), false);
+ QCOMPARE(spy.count(), 4);
+ widget.showNormal();
+ QCOMPARE(object.testService->widgetControl->isFullScreen(), false);
+ QCOMPARE(widget.isFullScreen(), false);
+ QCOMPARE(spy.count(), 4);
+
+ // Test setFullScreen(true) and showFullScreen() do nothing when isFullScreen() == true.
+ widget.showFullScreen();
+ QTest::qWaitForWindowShown(&widget);
+ widget.setFullScreen(true);
+ QCOMPARE(object.testService->widgetControl->isFullScreen(), true);
+ QCOMPARE(widget.isFullScreen(), true);
+ QCOMPARE(spy.count(), 5);
+ widget.showFullScreen();
+ QCOMPARE(object.testService->widgetControl->isFullScreen(), true);
+ QCOMPARE(widget.isFullScreen(), true);
+ QCOMPARE(spy.count(), 5);
+
+ // Test if the window control exits full screen mode, the widget follows suit.
+ object.testService->widgetControl->setFullScreen(false);
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(widget.isFullScreen(), false);
+ QCOMPARE(spy.count(), 6);
+ QCOMPARE(spy.value(5).value(0).toBool(), false);
+
+ // Test if the window control enters full screen mode, the widget does nothing.
+ object.testService->widgetControl->setFullScreen(false);
+ QCOMPARE(widget.isFullScreen(), false);
+ QCOMPARE(spy.count(), 6);
+}
+
+
+void tst_QVideoWidget::fullScreenRendererControl()
+{
+ QtTestVideoObject object(0, 0, new QtTestRendererControl);
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ Qt::WindowFlags windowFlags = widget.windowFlags();
+
+ QSignalSpy spy(&widget, SIGNAL(fullScreenChanged(bool)));
+
+ // Test showing full screen with setFullScreen(true).
+ widget.setFullScreen(true);
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(widget.isFullScreen(), true);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toBool(), true);
+
+ // Test returning to normal with setFullScreen(false).
+ widget.setFullScreen(false);
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(widget.isFullScreen(), false);
+ QCOMPARE(spy.count(), 2);
+ QCOMPARE(spy.value(1).value(0).toBool(), false);
+ QCOMPARE(widget.windowFlags(), windowFlags);
+
+ // Test showing full screen with showFullScreen().
+ widget.showFullScreen();
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(widget.isFullScreen(), true);
+ QCOMPARE(spy.count(), 3);
+ QCOMPARE(spy.value(2).value(0).toBool(), true);
+
+ // Test returning to normal with showNormal().
+ widget.showNormal();
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(widget.isFullScreen(), false);
+ QCOMPARE(spy.count(), 4);
+ QCOMPARE(spy.value(3).value(0).toBool(), false);
+ QCOMPARE(widget.windowFlags(), windowFlags);
+
+ // Test setFullScreen(false) and showNormal() do nothing when isFullScreen() == false.
+ widget.setFullScreen(false);
+ QCOMPARE(widget.isFullScreen(), false);
+ QCOMPARE(spy.count(), 4);
+ widget.showNormal();
+ QCOMPARE(widget.isFullScreen(), false);
+ QCOMPARE(spy.count(), 4);
+
+ // Test setFullScreen(true) and showFullScreen() do nothing when isFullScreen() == true.
+ widget.showFullScreen();
+ QTest::qWaitForWindowShown(&widget);
+ widget.setFullScreen(true);
+ QCOMPARE(widget.isFullScreen(), true);
+ QCOMPARE(spy.count(), 5);
+ widget.showFullScreen();
+ QCOMPARE(widget.isFullScreen(), true);
+ QCOMPARE(spy.count(), 5);
+}
+
+#endif
+
+void tst_QVideoWidget::color_data()
+{
+ QTest::addColumn<int>("controlValue");
+ QTest::addColumn<int>("value");
+ QTest::addColumn<int>("expectedValue");
+
+ QTest::newRow("12")
+ << 0
+ << 12
+ << 12;
+ QTest::newRow("-56")
+ << 87
+ << -56
+ << -56;
+ QTest::newRow("100")
+ << 32
+ << 100
+ << 100;
+ QTest::newRow("1294")
+ << 0
+ << 1294
+ << 100;
+ QTest::newRow("-102")
+ << 34
+ << -102
+ << -100;
+}
+
+void tst_QVideoWidget::brightnessWindowControl()
+{
+ QFETCH(int, controlValue);
+ QFETCH(int, value);
+ QFETCH(int, expectedValue);
+
+ QtTestVideoObject object(new QtTestWindowControl, 0, 0);
+ object.testService->windowControl->setBrightness(controlValue);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ // Test the video widget resets the controls starting brightness to the default.
+ QCOMPARE(widget.brightness(), 0);
+
+ QSignalSpy spy(&widget, SIGNAL(brightnessChanged(int)));
+
+ // Test the video widget sets the brightness value, bounded if necessary and emits a changed
+ // signal.
+ widget.setBrightness(value);
+ QCOMPARE(widget.brightness(), expectedValue);
+ QCOMPARE(object.testService->windowControl->brightness(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
+
+ // Test the changed signal isn't emitted if the value is unchanged.
+ widget.setBrightness(value);
+ QCOMPARE(widget.brightness(), expectedValue);
+ QCOMPARE(object.testService->windowControl->brightness(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+
+ // Test the changed signal is emitted if the brightness is changed internally.
+ object.testService->windowControl->setBrightness(controlValue);
+ QCOMPARE(widget.brightness(), controlValue);
+ QCOMPARE(spy.count(), 2);
+ QCOMPARE(spy.value(1).value(0).toInt(), controlValue);
+}
+
+void tst_QVideoWidget::brightnessWidgetControl()
+{
+ QFETCH(int, controlValue);
+ QFETCH(int, value);
+ QFETCH(int, expectedValue);
+
+ QtTestVideoObject object(0, new QtTestWidgetControl, 0);
+ object.testService->widgetControl->setBrightness(controlValue);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ QCOMPARE(widget.brightness(), 0);
+
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ QSignalSpy spy(&widget, SIGNAL(brightnessChanged(int)));
+
+ widget.setBrightness(value);
+ QCOMPARE(widget.brightness(), expectedValue);
+ QCOMPARE(object.testService->widgetControl->brightness(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
+
+ widget.setBrightness(value);
+ QCOMPARE(widget.brightness(), expectedValue);
+ QCOMPARE(object.testService->widgetControl->brightness(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+
+ object.testService->widgetControl->setBrightness(controlValue);
+ QCOMPARE(widget.brightness(), controlValue);
+ QCOMPARE(spy.count(), 2);
+ QCOMPARE(spy.value(1).value(0).toInt(), controlValue);
+}
+
+void tst_QVideoWidget::brightnessRendererControl()
+{
+ QFETCH(int, value);
+ QFETCH(int, expectedValue);
+
+ QtTestVideoObject object(0, 0, new QtTestRendererControl);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ QSignalSpy spy(&widget, SIGNAL(brightnessChanged(int)));
+
+ widget.setBrightness(value);
+ QCOMPARE(widget.brightness(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
+
+ widget.setBrightness(value);
+ QCOMPARE(widget.brightness(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+}
+
+void tst_QVideoWidget::contrastWindowControl()
+{
+ QFETCH(int, controlValue);
+ QFETCH(int, value);
+ QFETCH(int, expectedValue);
+
+ QtTestVideoObject object(new QtTestWindowControl, 0, 0);
+ object.testService->windowControl->setContrast(controlValue);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ QCOMPARE(widget.contrast(), 0);
+
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(widget.contrast(), 0);
+
+ QSignalSpy spy(&widget, SIGNAL(contrastChanged(int)));
+
+ widget.setContrast(value);
+ QCOMPARE(widget.contrast(), expectedValue);
+ QCOMPARE(object.testService->windowControl->contrast(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
+
+ widget.setContrast(value);
+ QCOMPARE(widget.contrast(), expectedValue);
+ QCOMPARE(object.testService->windowControl->contrast(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+
+ object.testService->windowControl->setContrast(controlValue);
+ QCOMPARE(widget.contrast(), controlValue);
+ QCOMPARE(spy.count(), 2);
+ QCOMPARE(spy.value(1).value(0).toInt(), controlValue);
+}
+
+void tst_QVideoWidget::contrastWidgetControl()
+{
+ QFETCH(int, controlValue);
+ QFETCH(int, value);
+ QFETCH(int, expectedValue);
+
+ QtTestVideoObject object(0, new QtTestWidgetControl, 0);
+ object.testService->widgetControl->setContrast(controlValue);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+ QCOMPARE(widget.contrast(), 0);
+
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(widget.contrast(), 0);
+
+ QSignalSpy spy(&widget, SIGNAL(contrastChanged(int)));
+
+ widget.setContrast(value);
+ QCOMPARE(widget.contrast(), expectedValue);
+ QCOMPARE(object.testService->widgetControl->contrast(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
+
+ widget.setContrast(value);
+ QCOMPARE(widget.contrast(), expectedValue);
+ QCOMPARE(object.testService->widgetControl->contrast(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+
+ object.testService->widgetControl->setContrast(controlValue);
+ QCOMPARE(widget.contrast(), controlValue);
+ QCOMPARE(spy.count(), 2);
+ QCOMPARE(spy.value(1).value(0).toInt(), controlValue);
+}
+
+void tst_QVideoWidget::contrastRendererControl()
+{
+ QFETCH(int, value);
+ QFETCH(int, expectedValue);
+
+ QtTestVideoObject object(0, 0, new QtTestRendererControl);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ QSignalSpy spy(&widget, SIGNAL(contrastChanged(int)));
+
+ widget.setContrast(value);
+ QCOMPARE(widget.contrast(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
+
+ widget.setContrast(value);
+ QCOMPARE(widget.contrast(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+}
+
+void tst_QVideoWidget::hueWindowControl()
+{
+ QFETCH(int, controlValue);
+ QFETCH(int, value);
+ QFETCH(int, expectedValue);
+
+ QtTestVideoObject object(new QtTestWindowControl, 0, 0);
+ object.testService->windowControl->setHue(controlValue);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+ QCOMPARE(widget.hue(), 0);
+
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(widget.hue(), 0);
+
+ QSignalSpy spy(&widget, SIGNAL(hueChanged(int)));
+
+ widget.setHue(value);
+ QCOMPARE(widget.hue(), expectedValue);
+ QCOMPARE(object.testService->windowControl->hue(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
+
+ widget.setHue(value);
+ QCOMPARE(widget.hue(), expectedValue);
+ QCOMPARE(object.testService->windowControl->hue(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+
+ object.testService->windowControl->setHue(controlValue);
+ QCOMPARE(widget.hue(), controlValue);
+ QCOMPARE(spy.count(), 2);
+ QCOMPARE(spy.value(1).value(0).toInt(), controlValue);
+}
+
+void tst_QVideoWidget::hueWidgetControl()
+{
+ QFETCH(int, controlValue);
+ QFETCH(int, value);
+ QFETCH(int, expectedValue);
+
+ QtTestVideoObject object(0, new QtTestWidgetControl, 0);
+ object.testService->widgetControl->setHue(controlValue);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+ QCOMPARE(widget.hue(), 0);
+
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(widget.hue(), 0);
+
+ QSignalSpy spy(&widget, SIGNAL(hueChanged(int)));
+
+ widget.setHue(value);
+ QCOMPARE(widget.hue(), expectedValue);
+ QCOMPARE(object.testService->widgetControl->hue(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
+
+ widget.setHue(value);
+ QCOMPARE(widget.hue(), expectedValue);
+ QCOMPARE(object.testService->widgetControl->hue(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+
+ object.testService->widgetControl->setHue(controlValue);
+ QCOMPARE(widget.hue(), controlValue);
+ QCOMPARE(spy.count(), 2);
+ QCOMPARE(spy.value(1).value(0).toInt(), controlValue);
+}
+
+void tst_QVideoWidget::hueRendererControl()
+{
+ QFETCH(int, value);
+ QFETCH(int, expectedValue);
+
+ QtTestVideoObject object(0, 0, new QtTestRendererControl);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ QSignalSpy spy(&widget, SIGNAL(hueChanged(int)));
+
+ widget.setHue(value);
+ QCOMPARE(widget.hue(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
+
+ widget.setHue(value);
+ QCOMPARE(widget.hue(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+}
+
+void tst_QVideoWidget::saturationWindowControl()
+{
+ QFETCH(int, controlValue);
+ QFETCH(int, value);
+ QFETCH(int, expectedValue);
+
+ QtTestVideoObject object(new QtTestWindowControl, 0, 0);
+ object.testService->windowControl->setSaturation(controlValue);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+ QCOMPARE(widget.saturation(), 0);
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(widget.saturation(), 0);
+
+ QSignalSpy spy(&widget, SIGNAL(saturationChanged(int)));
+
+ widget.setSaturation(value);
+ QCOMPARE(widget.saturation(), expectedValue);
+ QCOMPARE(object.testService->windowControl->saturation(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
+
+ widget.setSaturation(value);
+ QCOMPARE(widget.saturation(), expectedValue);
+ QCOMPARE(object.testService->windowControl->saturation(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+
+ object.testService->windowControl->setSaturation(controlValue);
+ QCOMPARE(widget.saturation(), controlValue);
+ QCOMPARE(spy.count(), 2);
+ QCOMPARE(spy.value(1).value(0).toInt(), controlValue);
+}
+
+void tst_QVideoWidget::saturationWidgetControl()
+{
+ QFETCH(int, controlValue);
+ QFETCH(int, value);
+ QFETCH(int, expectedValue);
+
+ QtTestVideoObject object(0, new QtTestWidgetControl, 0);
+ object.testService->widgetControl->setSaturation(controlValue);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ QCOMPARE(widget.saturation(), 0);
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+ QCOMPARE(widget.saturation(), 0);
+
+ QSignalSpy spy(&widget, SIGNAL(saturationChanged(int)));
+
+ widget.setSaturation(value);
+ QCOMPARE(widget.saturation(), expectedValue);
+ QCOMPARE(object.testService->widgetControl->saturation(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
+
+ widget.setSaturation(value);
+ QCOMPARE(widget.saturation(), expectedValue);
+ QCOMPARE(object.testService->widgetControl->saturation(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+
+ object.testService->widgetControl->setSaturation(controlValue);
+ QCOMPARE(widget.saturation(), controlValue);
+ QCOMPARE(spy.count(), 2);
+ QCOMPARE(spy.value(1).value(0).toInt(), controlValue);
+
+}
+
+void tst_QVideoWidget::saturationRendererControl()
+{
+ QFETCH(int, value);
+ QFETCH(int, expectedValue);
+
+ QtTestVideoObject object(0, 0, new QtTestRendererControl);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+ QSignalSpy spy(&widget, SIGNAL(saturationChanged(int)));
+
+ widget.setSaturation(value);
+ QCOMPARE(widget.saturation(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
+
+ widget.setSaturation(value);
+ QCOMPARE(widget.saturation(), expectedValue);
+ QCOMPARE(spy.count(), 1);
+}
+
+static const uchar rgb32ImageData[] =
+{
+ 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00,
+ 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00
+};
+
+void tst_QVideoWidget::paintRendererControl()
+{
+ QtTestVideoObject object(0, 0, new QtTestRendererControl);
+
+ QVideoWidget widget;
+ widget.setMediaObject(&object);
+ widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ QPainterVideoSurface *surface = qobject_cast<QPainterVideoSurface *>(
+ object.testService->rendererControl->surface());
+
+ QVideoSurfaceFormat format(QSize(2, 2), QVideoFrame::Format_RGB32);
+
+ QVERIFY(surface->start(format));
+ QCOMPARE(surface->isActive(), true);
+ QCOMPARE(surface->isReady(), true);
+
+ QCoreApplication::processEvents(QEventLoop::AllEvents);
+
+ QCOMPARE(surface->isActive(), true);
+ QCOMPARE(surface->isReady(), true);
+
+ QVideoFrame frame(sizeof(rgb32ImageData), QSize(2, 2), 8, QVideoFrame::Format_RGB32);
+
+ frame.map(QAbstractVideoBuffer::WriteOnly);
+ memcpy(frame.bits(), rgb32ImageData, frame.mappedBytes());
+ frame.unmap();
+
+ QVERIFY(surface->present(frame));
+ QCOMPARE(surface->isActive(), true);
+ QCOMPARE(surface->isReady(), false);
+
+ QCoreApplication::processEvents(QEventLoop::AllEvents);
+
+ QCOMPARE(surface->isActive(), true);
+ QCOMPARE(surface->isReady(), true);
+}
+
+QTEST_MAIN(tst_QVideoWidget)
+
+#include "tst_qvideowidget.moc"
diff --git a/tests/auto/qxmlsimplereader/tst_qxmlsimplereader.cpp b/tests/auto/qxmlsimplereader/tst_qxmlsimplereader.cpp
index e38a2bc182..0e57306d3f 100644
--- a/tests/auto/qxmlsimplereader/tst_qxmlsimplereader.cpp
+++ b/tests/auto/qxmlsimplereader/tst_qxmlsimplereader.cpp
@@ -580,7 +580,7 @@ void tst_QXmlSimpleReader::inputFromSocket()
QSKIP("Symbian: Skipped due to problems in Open C and QtNetwork", SkipAll);
#endif
-#if defined(Q_OS_WIN32) && (defined(Q_CC_INTEL) || defined(Q_CC_MINGW) || defined(Q_CC_MSVC_NET))
+#if defined(Q_OS_WIN32) && (defined(Q_CC_INTEL) || defined(Q_CC_MSVC_NET))
QSKIP("Regression caused by QHOstInfo change 294548, see task 202231.", SkipAll);
#endif
QTcpSocket sock;
diff --git a/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P02/ibm02v01.xml b/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P02/ibm02v01.xml
index 60479f4af1..2363b97fe7 100644
--- a/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P02/ibm02v01.xml
+++ b/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P02/ibm02v01.xml
@@ -5,6 +5,6 @@
discrete legal characters for production 02. -->
<?NAME_09- _0A-
_0D-
-_20- _D7FF-퟿_6c0f-æ°_E000-_FFFD-�_effe-_010000-ð€€_10FFFF-ô¿¿_08ffff-ò¿¿ This is a PI target ?>
+_20- _D7FF-퟿_6c0f-æ°_E000-_FFFD-�_effd-_010000-ð€€_10FFFD-ô¿½_08fffd-ò¿½ This is a PI target ?>
]>
<book/>
diff --git a/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P66/ibm66v01.xml b/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P66/ibm66v01.xml
index 7ac675ec29..d7f7722da3 100644
--- a/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P66/ibm66v01.xml
+++ b/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P66/ibm66v01.xml
@@ -11,6 +11,6 @@ Test all valid Charater references for P66:
&#67; &#x43; &#x5f;
&#x20; &#xD7A3; &#xAC00;
&#xF900; &#xFFFD;
-&#x10000; &#x10FFFF;
+&#x10000; &#x10FFFD;
</root>
<!--* a valid test for P66 *-->
diff --git a/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P66/out/ibm66v01.xml b/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P66/out/ibm66v01.xml
index 1b04b6ddf9..ed05e61ad6 100644
--- a/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P66/out/ibm66v01.xml
+++ b/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P66/out/ibm66v01.xml
@@ -1 +1 @@
-<root>&#10;Test all valid Charater references for P66:&#10;&#9;&#9;&#9;&#10;&#10;&#10;&#10;&#10;&#10;&#13;&#10;« « à à ï ï&#10;C C _&#10; 힣 ê°€&#10;豈 �&#10;ð€€ ô¿¿&#10;</root> \ No newline at end of file
+<root>&#10;Test all valid Charater references for P66:&#10;&#9;&#9;&#9;&#10;&#10;&#10;&#10;&#10;&#10;&#13;&#10;« « à à ï ï&#10;C C _&#10; 힣 ê°€&#10;豈 �&#10;ð€€ ô¿½&#10;</root> \ No newline at end of file
diff --git a/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/089.xml b/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/089.xml
index 2d80c8f3fb..42ffcb6782 100644
--- a/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/089.xml
+++ b/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/089.xml
@@ -1,5 +1,5 @@
<!DOCTYPE doc [
-<!ENTITY e "&#x10000;&#x10FFFD;&#x10FFFF;">
+<!ENTITY e "&#x10000;&#x10FFFD;">
<!ELEMENT doc (#PCDATA)>
]>
<doc>&e;</doc>
diff --git a/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/089.xml b/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/089.xml
index e01d86e8d3..f5a0484791 100644
--- a/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/089.xml
+++ b/tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/089.xml
@@ -1 +1 @@
-<doc>ð€€ô¿½ô¿¿</doc> \ No newline at end of file
+<doc>ð€€ô¿½</doc> \ No newline at end of file
diff --git a/tests/auto/selftests/expected_benchlibcallgrind.txt b/tests/auto/selftests/expected_benchlibcallgrind.txt
index caf2424405..f1727114b5 100644
--- a/tests/auto/selftests/expected_benchlibcallgrind.txt
+++ b/tests/auto/selftests/expected_benchlibcallgrind.txt
@@ -2,7 +2,7 @@
Config: Using QTest library 4.5.0, Qt 4.5.0
PASS : tst_BenchlibCallgrind::initTestCase()
RESULT : tst_BenchlibCallgrind::twoHundredMillionInstructions():
- 200,000,000 instr. loads per iteration (total: 200000000, iterations: 1)
+ 200,000,000 instruction reads per iteration (total: 200000000, iterations: 1)
PASS : tst_BenchlibCallgrind::twoHundredMillionInstructions()
PASS : tst_BenchlibCallgrind::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
diff --git a/tests/auto/selftests/expected_cmptest.txt b/tests/auto/selftests/expected_cmptest.txt
index b7c56651c0..e9f94c9629 100644
--- a/tests/auto/selftests/expected_cmptest.txt
+++ b/tests/auto/selftests/expected_cmptest.txt
@@ -1,5 +1,5 @@
********* Start testing of tst_Cmptest *********
-Config: Using QTest library 4.6.3, Qt 4.6.3
+Config: Using QTest library 4.7.0, Qt 4.7.0
PASS : tst_Cmptest::initTestCase()
PASS : tst_Cmptest::compare_boolfuncs()
PASS : tst_Cmptest::compare_pointerfuncs()
diff --git a/tests/auto/selftests/expected_crashes_3.txt b/tests/auto/selftests/expected_crashes_3.txt
index 71d79ca43d..3aced25296 100644
--- a/tests/auto/selftests/expected_crashes_3.txt
+++ b/tests/auto/selftests/expected_crashes_3.txt
@@ -1,5 +1,5 @@
********* Start testing of tst_Crashes *********
-Config: Using QTest library 4.6.3, Qt 4.6.3
+Config: Using QTest library 4.7.0, Qt 4.7.0
PASS : tst_Crashes::initTestCase()
QFATAL : tst_Crashes::crash() Received signal 11
FAIL! : tst_Crashes::crash() Received a fatal error.
diff --git a/tests/auto/selftests/expected_longstring.txt b/tests/auto/selftests/expected_longstring.txt
index 5d94e231ea..a6ad5d00a1 100644
--- a/tests/auto/selftests/expected_longstring.txt
+++ b/tests/auto/selftests/expected_longstring.txt
@@ -1,5 +1,5 @@
********* Start testing of tst_LongString *********
-Config: Using QTest library 4.6.3, Qt 4.6.3
+Config: Using QTest library 4.7.0, Qt 4.7.0
PASS : tst_LongString::initTestCase()
FAIL! : tst_LongString::failWithLongString() Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui.
diff --git a/tests/auto/selftests/expected_maxwarnings.txt b/tests/auto/selftests/expected_maxwarnings.txt
index 0da17991b3..908bd5de33 100644
--- a/tests/auto/selftests/expected_maxwarnings.txt
+++ b/tests/auto/selftests/expected_maxwarnings.txt
@@ -1,5 +1,5 @@
********* Start testing of MaxWarnings *********
-Config: Using QTest library 4.6.3, Qt 4.6.3
+Config: Using QTest library 4.7.0, Qt 4.7.0
PASS : MaxWarnings::initTestCase()
QWARN : MaxWarnings::warn() 0
QWARN : MaxWarnings::warn() 1
diff --git a/tests/auto/selftests/expected_skip.txt b/tests/auto/selftests/expected_skip.txt
index c603913955..4345a6c6c8 100644
--- a/tests/auto/selftests/expected_skip.txt
+++ b/tests/auto/selftests/expected_skip.txt
@@ -1,5 +1,5 @@
********* Start testing of tst_Skip *********
-Config: Using QTest library 4.6.3, Qt 4.6.3
+Config: Using QTest library 4.7.0, Qt 4.7.0
PASS : tst_Skip::initTestCase()
SKIP : tst_Skip::test() skipping all
Loc: [/home/rmcgover/depot/qt-git/mainline/tests/auto/selftests/skip/tst_skip.cpp(68)]
diff --git a/tests/auto/selftests/tst_selftests.cpp b/tests/auto/selftests/tst_selftests.cpp
index 0b9cee0347..3d58c156c6 100644
--- a/tests/auto/selftests/tst_selftests.cpp
+++ b/tests/auto/selftests/tst_selftests.cpp
@@ -97,7 +97,7 @@ inline bool qCompare
if (r1.unit == "msec") {
variance = 0.1;
}
- else if (r1.unit == "instr. loads") {
+ else if (r1.unit == "instruction reads") {
variance = 0.001;
}
else if (r1.unit == "ticks") {
@@ -434,7 +434,7 @@ BenchmarkResult BenchmarkResult::parse(QString const& line, QString* error)
/* This code avoids using a QRegExp because QRegExp might be broken. */
- /* Sample format: 4,000 msec per iteration (total: 4000, iterations: 1) */
+ /* Sample format: 4,000 msec per iteration (total: 4,000, iterations: 1) */
QString sFirstNumber;
while (!remaining.isEmpty() && !remaining.at(0).isSpace()) {
@@ -468,7 +468,7 @@ BenchmarkResult BenchmarkResult::parse(QString const& line, QString* error)
remaining = remaining.mid(sizeof(periterbit)-1);
- /* Remaining: 4000, iterations: 1) */
+ /* Remaining: 4,000, iterations: 1) */
static const char itersbit[] = ", iterations: ";
QString sTotal;
while (!remaining.startsWith(itersbit) && !remaining.isEmpty()) {
@@ -482,9 +482,12 @@ BenchmarkResult BenchmarkResult::parse(QString const& line, QString* error)
remaining = remaining.mid(sizeof(itersbit)-1);
- qint64 total = sTotal.toLongLong(&ok);
+ /* 4,000 -> 4000 */
+ sTotal.remove(',');
+
+ double total = sTotal.toDouble(&ok);
if (!ok) {
- if (error) *error = sTotal + " (total) is not a valid integer";
+ if (error) *error = sTotal + " (total) is not a valid number";
return out;
}
diff --git a/tests/auto/selftests/xunit/tst_xunit b/tests/auto/selftests/xunit/tst_xunit
deleted file mode 100755
index 31d03a8986..0000000000
--- a/tests/auto/selftests/xunit/tst_xunit
+++ /dev/null
Binary files differ
diff --git a/tests/auto/symbols/tst_symbols.cpp b/tests/auto/symbols/tst_symbols.cpp
index d6fb65ac3f..28970eba41 100644
--- a/tests/auto/symbols/tst_symbols.cpp
+++ b/tests/auto/symbols/tst_symbols.cpp
@@ -100,7 +100,6 @@ void tst_Symbols::globalObjects()
#ifndef Q_OS_LINUX
QSKIP("Linux-specific test", SkipAll);
#endif
- QSKIP("Test disabled, we're not fixing these issues in this Qt version", SkipAll);
// these are regexps for global objects that are allowed in Qt
QStringList whitelist = QStringList()
diff --git a/tests/auto/uiloader/baseline/css_buttons_background.ui b/tests/auto/uiloader/baseline/css_buttons_background.ui
index f1fa0bc9b0..3d80aeb4b4 100644
--- a/tests/auto/uiloader/baseline/css_buttons_background.ui
+++ b/tests/auto/uiloader/baseline/css_buttons_background.ui
@@ -89,6 +89,19 @@ color: yellow;
</property>
</widget>
</item>
+ <item row="5" column="0">
+ <widget class="QPushButton" name="pushButton_4">
+ <property name="text">
+ <string>Checked</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
@@ -149,6 +162,19 @@ color: yellow;
</property>
</widget>
</item>
+ <item row="5" column="0">
+ <widget class="QPushButton" name="pushButton_5">
+ <property name="text">
+ <string>Checked</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
@@ -209,6 +235,19 @@ color: yellow;
</property>
</widget>
</item>
+ <item row="5" column="0">
+ <widget class="QPushButton" name="pushButton_6">
+ <property name="text">
+ <string>Checked</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
diff --git a/tests/auto/uiloader/baseline/css_qtbug6855.ui b/tests/auto/uiloader/baseline/css_qtbug6855.ui
new file mode 100644
index 0000000000..0727f6ba99
--- /dev/null
+++ b/tests/auto/uiloader/baseline/css_qtbug6855.ui
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Form</class>
+ <widget class="QWidget" name="Form">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>212</width>
+ <height>108</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">QPushButton { padding: 20px; }</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QPushButton" name="pushButton">
+ <property name="text">
+ <string>Text not cropped</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>258</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="0">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>218</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/tests/auto/utf8/tst_utf8.cpp b/tests/auto/utf8/tst_utf8.cpp
index 1183b8190b..7bbbfabe4f 100644
--- a/tests/auto/utf8/tst_utf8.cpp
+++ b/tests/auto/utf8/tst_utf8.cpp
@@ -73,6 +73,9 @@ private slots:
void invalidUtf8_data();
void invalidUtf8();
+
+ void nonCharacters_data();
+ void nonCharacters();
};
void tst_Utf8::initTestCase()
@@ -134,8 +137,8 @@ void tst_Utf8::roundTrip_data()
static const uint utf32_5[] = { 0x010203 };
QTest::newRow("utf8_5") << QByteArray(utf8_5) << QString::fromUcs4(utf32_5, 1);
- static const char utf8_6[] = "\364\217\277\277"; // U+10FFFF
- static const uint utf32_6[] = { 0x10FFFF };
+ static const char utf8_6[] = "\364\217\277\275"; // U+10FFFD
+ static const uint utf32_6[] = { 0x10FFFD };
QTest::newRow("utf8_6") << QByteArray(utf8_6) << QString::fromUcs4(utf32_6, 1);
static const char utf8_7[] = "abc\302\240\303\241\303\251\307\275 \342\202\254def";
@@ -144,10 +147,10 @@ void tst_Utf8::roundTrip_data()
' ', 0x20AC, 'd', 'e', 'f', 0 };
QTest::newRow("utf8_7") << QByteArray(utf8_7) << QString::fromUtf16(utf16_7);
- static const char utf8_8[] = "abc\302\240\303\241\303\251\307\275 \364\217\277\277 \342\202\254def";
+ static const char utf8_8[] = "abc\302\240\303\241\303\251\307\275 \364\217\277\275 \342\202\254def";
static const uint utf32_8[] = { 'a', 'b', 'c', 0x00A0,
0x00E1, 0x00E9, 0x01FD,
- ' ', 0x10FFFF, ' ',
+ ' ', 0x10FFFD, ' ',
0x20AC, 'd', 'e', 'f', 0 };
QTest::newRow("utf8_8") << QByteArray(utf8_8) << QString::fromUcs4(utf32_8);
}
@@ -214,14 +217,6 @@ void tst_Utf8::invalidUtf8_data()
QTest::newRow("4chars-2") << QByteArray("\xF0\x90\xC0\x80");
QTest::newRow("4chars-3") << QByteArray("\xF0\xC0\x80\x80");
- // U+FFFE and U+FFFF are non-characters and must not be present
- // U+FFFE: 1111 11 1111 11 1110
- // encoding: xxxz:1111 xz11:1111 xz11:1110
- QTest::newRow("fffe") << QByteArray("\xEF\xBF\xBE");
- // U+FFFF: 1111 11 1111 11 1111
- // encoding: xxxz:1111 xz11:1111 xz11:1111
- QTest::newRow("ffff") << QByteArray("\xEF\xBF\xBF");
-
// Surrogate pairs must now be present either
// U+D800: 1101 10 0000 00 0000
// encoding: xxxz:1101 xz10:0000 xz00:0000
@@ -302,7 +297,7 @@ void tst_Utf8::invalidUtf8()
QFETCH_GLOBAL(bool, useLocale);
QSharedPointer<QTextDecoder> decoder = QSharedPointer<QTextDecoder>(codec->makeDecoder());
- QString decoded = decoder->toUnicode(utf8);
+ decoder->toUnicode(utf8);
// Only enforce correctness on our UTF-8 decoder
// The system's UTF-8 codec is sometimes buggy
@@ -314,5 +309,69 @@ void tst_Utf8::invalidUtf8()
qWarning("System codec does not report failure when it should. Should report bug upstream.");
}
+void tst_Utf8::nonCharacters_data()
+{
+ QTest::addColumn<QByteArray>("utf8");
+ QTest::addColumn<QString>("utf16");
+
+ // Unicode has a couple of "non-characters" that one can use internally,
+ // but are not allowed to be used for text interchange.
+ //
+ // Those are the last two entries each Unicode Plane (U+FFFE, U+FFFF,
+ // U+1FFFE, U+1FFFF, etc.) as well as the entries between U+FDD0 and
+ // U+FDEF (inclusive)
+
+ // U+FDD0 through U+FDEF
+ for (int i = 0; i < 16; ++i) {
+ char utf8[] = { 0357, 0267, 0220 + i, 0 };
+ QString utf16 = QChar(0xfdd0 + i);
+ QTest::newRow(qPrintable(QString::number(0xfdd0 + i, 16))) << QByteArray(utf8) << utf16;
+ }
+
+ // the last two in Planes 1 through 16
+ for (uint plane = 1; plane <= 16; ++plane) {
+ for (uint lower = 0xfffe; lower < 0x10000; ++lower) {
+ uint ucs4 = (plane << 16) | lower;
+ char utf8[] = { 0xf0 | uchar(ucs4 >> 18),
+ 0x80 | (uchar(ucs4 >> 12) & 0x3f),
+ 0x80 | (uchar(ucs4 >> 6) & 0x3f),
+ 0x80 | (uchar(ucs4) & 0x3f),
+ 0 };
+ ushort utf16[] = { QChar::highSurrogate(ucs4), QChar::lowSurrogate(ucs4), 0 };
+
+ QTest::newRow(qPrintable(QString::number(ucs4, 16))) << QByteArray(utf8) << QString::fromUtf16(utf16);
+ }
+ }
+
+ QTest::newRow("fffe") << QByteArray("\xEF\xBF\xBE") << QString(QChar(0xfffe));
+ QTest::newRow("ffff") << QByteArray("\xEF\xBF\xBF") << QString(QChar(0xffff));
+}
+
+void tst_Utf8::nonCharacters()
+{
+ QFETCH(QByteArray, utf8);
+ QFETCH(QString, utf16);
+ QFETCH_GLOBAL(bool, useLocale);
+
+ QSharedPointer<QTextDecoder> decoder = QSharedPointer<QTextDecoder>(codec->makeDecoder());
+ decoder->toUnicode(utf8);
+
+ // Only enforce correctness on our UTF-8 decoder
+ // The system's UTF-8 codec is sometimes buggy
+ // GNU libc's iconv is known to accept U+FFFF and U+FFFE encoded as UTF-8
+ // OS X's iconv is known to accept those, plus surrogates and codepoints above U+10FFFF
+ if (!useLocale)
+ QVERIFY(decoder->hasFailure());
+ else if (!decoder->hasFailure())
+ qWarning("System codec does not report failure when it should. Should report bug upstream.");
+
+ QSharedPointer<QTextEncoder> encoder(codec->makeEncoder());
+ encoder->fromUnicode(utf16);
+ if (!useLocale)
+ QVERIFY(encoder->hasFailure());
+ else if (!encoder->hasFailure())
+ qWarning("System codec does not report failure when it should. Should report bug upstream.");
+}
+
QTEST_MAIN(tst_Utf8)
#include "tst_utf8.moc"
diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro
index c406d54b11..01d5cd5c98 100644
--- a/tests/benchmarks/benchmarks.pro
+++ b/tests/benchmarks/benchmarks.pro
@@ -6,3 +6,4 @@ SUBDIRS = \
script \
svg
contains(QT_CONFIG, opengl): SUBDIRS += opengl
+contains(QT_CONFIG, declarative): SUBDIRS += declarative
diff --git a/tests/benchmarks/corelib/kernel/kernel.pro b/tests/benchmarks/corelib/kernel/kernel.pro
index 91cf3c5d34..da3f0d609f 100644
--- a/tests/benchmarks/corelib/kernel/kernel.pro
+++ b/tests/benchmarks/corelib/kernel/kernel.pro
@@ -2,5 +2,6 @@ TEMPLATE = subdirs
SUBDIRS = \
events \
qmetaobject \
+ qmetatype \
qobject \
qvariant
diff --git a/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp b/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp
index c375a168d2..eef6020891 100644
--- a/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp
+++ b/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp
@@ -42,6 +42,84 @@
#include <QtGui>
#include <qtest.h>
+class LotsOfSignals : public QObject
+{
+ Q_OBJECT
+public:
+ LotsOfSignals() {}
+
+signals:
+ void extraSignal1();
+ void extraSignal2();
+ void extraSignal3();
+ void extraSignal4();
+ void extraSignal5();
+ void extraSignal6();
+ void extraSignal7();
+ void extraSignal8();
+ void extraSignal9();
+ void extraSignal10();
+ void extraSignal12();
+ void extraSignal13();
+ void extraSignal14();
+ void extraSignal15();
+ void extraSignal16();
+ void extraSignal17();
+ void extraSignal18();
+ void extraSignal19();
+ void extraSignal20();
+ void extraSignal21();
+ void extraSignal22();
+ void extraSignal23();
+ void extraSignal24();
+ void extraSignal25();
+ void extraSignal26();
+ void extraSignal27();
+ void extraSignal28();
+ void extraSignal29();
+ void extraSignal30();
+ void extraSignal31();
+ void extraSignal32();
+ void extraSignal33();
+ void extraSignal34();
+ void extraSignal35();
+ void extraSignal36();
+ void extraSignal37();
+ void extraSignal38();
+ void extraSignal39();
+ void extraSignal40();
+ void extraSignal41();
+ void extraSignal42();
+ void extraSignal43();
+ void extraSignal44();
+ void extraSignal45();
+ void extraSignal46();
+ void extraSignal47();
+ void extraSignal48();
+ void extraSignal49();
+ void extraSignal50();
+ void extraSignal51();
+ void extraSignal52();
+ void extraSignal53();
+ void extraSignal54();
+ void extraSignal55();
+ void extraSignal56();
+ void extraSignal57();
+ void extraSignal58();
+ void extraSignal59();
+ void extraSignal60();
+ void extraSignal61();
+ void extraSignal62();
+ void extraSignal63();
+ void extraSignal64();
+ void extraSignal65();
+ void extraSignal66();
+ void extraSignal67();
+ void extraSignal68();
+ void extraSignal69();
+ void extraSignal70();
+};
+
class tst_qmetaobject: public QObject
{
Q_OBJECT
@@ -57,6 +135,9 @@ private slots:
void indexOfSignal();
void indexOfSlot_data();
void indexOfSlot();
+
+ void unconnected_data();
+ void unconnected();
};
void tst_qmetaobject::initTestCase()
@@ -154,6 +235,30 @@ void tst_qmetaobject::indexOfSlot()
}
}
+void tst_qmetaobject::unconnected_data()
+{
+ QTest::addColumn<int>("signal_index");
+ QTest::newRow("signal--9") << 9;
+ QTest::newRow("signal--32") << 32;
+ QTest::newRow("signal--33") << 33;
+ QTest::newRow("signal--64") << 64;
+ QTest::newRow("signal--65") << 65;
+ QTest::newRow("signal--70") << 70;
+}
+
+void tst_qmetaobject::unconnected()
+{
+ LotsOfSignals *obj = new LotsOfSignals;
+ QFETCH(int, signal_index);
+ QVERIFY(obj->metaObject()->methodCount() == 73);
+ void *v;
+ QBENCHMARK {
+ //+1 because QObject has one slot
+ QMetaObject::metacall(obj, QMetaObject::InvokeMetaMethod, signal_index+1, &v);
+ }
+ delete obj;
+}
+
QTEST_MAIN(tst_qmetaobject)
#include "main.moc"
diff --git a/tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro b/tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro
new file mode 100644
index 0000000000..80f9a2a398
--- /dev/null
+++ b/tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+QT = core
+TEMPLATE = app
+TARGET = tst_qmetatype
+
+SOURCES += tst_qmetatype.cpp
+
diff --git a/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp
new file mode 100644
index 0000000000..36399af15a
--- /dev/null
+++ b/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -0,0 +1,233 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QtCore/qmetatype.h>
+
+//TESTED_FILES=
+
+class tst_QMetaType : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QMetaType();
+ virtual ~tst_QMetaType();
+
+private slots:
+ void typeBuiltin_data();
+ void typeBuiltin();
+ void typeBuiltinNotNormalized_data();
+ void typeBuiltinNotNormalized();
+ void typeCustom();
+ void typeCustomNotNormalized();
+ void typeNotRegistered();
+ void typeNotRegisteredNotNormalized();
+
+ void typeNameBuiltin_data();
+ void typeNameBuiltin();
+ void typeNameCustom();
+ void typeNameNotRegistered();
+
+ void isRegisteredBuiltin_data();
+ void isRegisteredBuiltin();
+ void isRegisteredCustom();
+ void isRegisteredNotRegistered();
+};
+
+tst_QMetaType::tst_QMetaType()
+{
+}
+
+tst_QMetaType::~tst_QMetaType()
+{
+}
+
+void tst_QMetaType::typeBuiltin_data()
+{
+ QTest::addColumn<QByteArray>("typeName");
+ for (int i = 0; i < QMetaType::User; ++i) {
+ const char *name = QMetaType::typeName(i);
+ if (name)
+ QTest::newRow(name) << QByteArray(name);
+ }
+}
+
+void tst_QMetaType::typeBuiltin()
+{
+ QFETCH(QByteArray, typeName);
+ const char *nm = typeName.constData();
+ QBENCHMARK {
+ for (int i = 0; i < 100000; ++i)
+ QMetaType::type(nm);
+ }
+}
+
+void tst_QMetaType::typeBuiltinNotNormalized_data()
+{
+ QTest::addColumn<QByteArray>("typeName");
+ for (int i = 0; i < QMetaType::User; ++i) {
+ const char *name = QMetaType::typeName(i);
+ if (name)
+ QTest::newRow(name) << QByteArray(name).append(" ");
+ }
+}
+
+void tst_QMetaType::typeBuiltinNotNormalized()
+{
+ QFETCH(QByteArray, typeName);
+ const char *nm = typeName.constData();
+ QBENCHMARK {
+ for (int i = 0; i < 10000; ++i)
+ QMetaType::type(nm);
+ }
+}
+
+struct Foo { int i; };
+
+void tst_QMetaType::typeCustom()
+{
+ qRegisterMetaType<Foo>("Foo");
+ QBENCHMARK {
+ for (int i = 0; i < 10000; ++i)
+ QMetaType::type("Foo");
+ }
+}
+
+void tst_QMetaType::typeCustomNotNormalized()
+{
+ qRegisterMetaType<Foo>("Foo");
+ QBENCHMARK {
+ for (int i = 0; i < 10000; ++i)
+ QMetaType::type("Foo ");
+ }
+}
+
+void tst_QMetaType::typeNotRegistered()
+{
+ Q_ASSERT(QMetaType::type("Bar") == 0);
+ QBENCHMARK {
+ for (int i = 0; i < 10000; ++i)
+ QMetaType::type("Bar");
+ }
+}
+
+void tst_QMetaType::typeNotRegisteredNotNormalized()
+{
+ Q_ASSERT(QMetaType::type("Bar") == 0);
+ QBENCHMARK {
+ for (int i = 0; i < 10000; ++i)
+ QMetaType::type("Bar ");
+ }
+}
+
+void tst_QMetaType::typeNameBuiltin_data()
+{
+ QTest::addColumn<int>("type");
+ for (int i = 0; i < QMetaType::User; ++i) {
+ const char *name = QMetaType::typeName(i);
+ if (name)
+ QTest::newRow(name) << i;
+ }
+}
+
+void tst_QMetaType::typeNameBuiltin()
+{
+ QFETCH(int, type);
+ QBENCHMARK {
+ for (int i = 0; i < 500000; ++i)
+ QMetaType::typeName(type);
+ }
+}
+
+void tst_QMetaType::typeNameCustom()
+{
+ int type = qRegisterMetaType<Foo>("Foo");
+ QBENCHMARK {
+ for (int i = 0; i < 100000; ++i)
+ QMetaType::typeName(type);
+ }
+}
+
+void tst_QMetaType::typeNameNotRegistered()
+{
+ // We don't care much about this case, but test it anyway.
+ Q_ASSERT(QMetaType::typeName(-1) == 0);
+ QBENCHMARK {
+ for (int i = 0; i < 500000; ++i)
+ QMetaType::typeName(-1);
+ }
+}
+
+void tst_QMetaType::isRegisteredBuiltin_data()
+{
+ typeNameBuiltin_data();
+}
+
+void tst_QMetaType::isRegisteredBuiltin()
+{
+ QFETCH(int, type);
+ QBENCHMARK {
+ for (int i = 0; i < 500000; ++i)
+ QMetaType::isRegistered(type);
+ }
+}
+
+void tst_QMetaType::isRegisteredCustom()
+{
+ int type = qRegisterMetaType<Foo>("Foo");
+ QBENCHMARK {
+ for (int i = 0; i < 100000; ++i)
+ QMetaType::isRegistered(type);
+ }
+}
+
+void tst_QMetaType::isRegisteredNotRegistered()
+{
+ Q_ASSERT(QMetaType::typeName(-1) == 0);
+ QBENCHMARK {
+ for (int i = 0; i < 100000; ++i)
+ QMetaType::isRegistered(-1);
+ }
+}
+
+QTEST_MAIN(tst_QMetaType)
+#include "tst_qmetatype.moc"
diff --git a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro
new file mode 100644
index 0000000000..9c6b16be12
--- /dev/null
+++ b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro
@@ -0,0 +1,11 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = qtimer_vs_qmetaobject
+DEPENDPATH += .
+INCLUDEPATH += .
+
+CONFIG += release
+#CONFIG += debug
+
+
+SOURCES += tst_qtimer_vs_qmetaobject.cpp
diff --git a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/tst_qtimer_vs_qmetaobject.cpp b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/tst_qtimer_vs_qmetaobject.cpp
new file mode 100644
index 0000000000..2f265bf7bf
--- /dev/null
+++ b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/tst_qtimer_vs_qmetaobject.cpp
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore>
+#include <QtTest/QtTest>
+
+#define INVOKE_COUNT 10000
+
+class qtimer_vs_qmetaobject : public QObject
+{
+ Q_OBJECT
+private slots:
+ void testZeroTimerSingleShot();
+ void testQueuedInvokeMethod();
+};
+
+class InvokeCounter : public QObject {
+ Q_OBJECT
+public:
+ InvokeCounter() : count(0) { };
+public slots:
+ void invokeSlot() {
+ count++;
+ if (count == INVOKE_COUNT)
+ QTestEventLoop::instance().exitLoop();
+ }
+protected:
+ int count;
+};
+
+void qtimer_vs_qmetaobject::testZeroTimerSingleShot()
+{
+ QBENCHMARK {
+ InvokeCounter invokeCounter;
+ for(int i = 0; i < INVOKE_COUNT; ++i) {
+ QTimer::singleShot(0, &invokeCounter, SLOT(invokeSlot()));
+ }
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+ }
+}
+
+void qtimer_vs_qmetaobject::testQueuedInvokeMethod()
+{
+ QBENCHMARK {
+ InvokeCounter invokeCounter;
+ for(int i = 0; i < INVOKE_COUNT; ++i) {
+ QMetaObject::invokeMethod(&invokeCounter, "invokeSlot", Qt::QueuedConnection);
+ }
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+ }
+}
+
+
+QTEST_MAIN(qtimer_vs_qmetaobject)
+
+#include "tst_qtimer_vs_qmetaobject.moc"
diff --git a/tests/benchmarks/corelib/tools/qstringlist/main.cpp b/tests/benchmarks/corelib/tools/qstringlist/main.cpp
index 81ecd11fe9..a4969bf191 100644
--- a/tests/benchmarks/corelib/tools/qstringlist/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstringlist/main.cpp
@@ -54,17 +54,21 @@ private slots:
void join() const;
void join_data() const;
- void split() const;
+ void split_qlist_qbytearray() const;
+ void split_qlist_qbytearray_data() const { return split_data(); }
+
void split_data() const;
+ void split_qlist_qstring() const;
+ void split_qlist_qstring_data() const { return split_data(); }
- void split_std() const;
- void split_std_data() const { return split_data(); }
+ void split_stdvector_stdstring() const;
+ void split_stdvector_stdstring_data() const { return split_data(); }
- void split_stdw() const;
- void split_stdw_data() const { return split_data(); }
+ void split_stdvector_stdwstring() const;
+ void split_stdvector_stdwstring_data() const { return split_data(); }
- void split_ba() const;
- void split_ba_data() const { return split_data(); }
+ void split_stdlist_stdstring() const;
+ void split_stdlist_stdstring_data() const { return split_data(); }
private:
static QStringList populateList(const int count, const QString &unit);
@@ -125,27 +129,39 @@ void tst_QStringList::join_data() const
<< QString();
}
-void tst_QStringList::split() const
+void tst_QStringList::split_data() const
+{
+ QTest::addColumn<QString>("input");
+ QString unit = QLatin1String("unit") + QString(100, QLatin1Char('s'));
+ //QTest::newRow("") << populateString(10, unit);
+ QTest::newRow("") << populateString(100, unit);
+ //QTest::newRow("") << populateString(100, unit);
+ //QTest::newRow("") << populateString(1000, unit);
+ //QTest::newRow("") << populateString(10000, unit);
+}
+
+void tst_QStringList::split_qlist_qbytearray() const
{
QFETCH(QString, input);
- const QChar splitChar = ':';
+ const char splitChar = ':';
+ QByteArray ba = input.toLatin1();
QBENCHMARK {
- input.split(splitChar);
+ ba.split(splitChar);
}
}
-void tst_QStringList::split_data() const
+void tst_QStringList::split_qlist_qstring() const
{
- QTest::addColumn<QString>("input");
- QString unit = QLatin1String("unit");
- QTest::newRow("") << populateString(10, unit);
- QTest::newRow("") << populateString(100, unit);
- QTest::newRow("") << populateString(1000, unit);
- QTest::newRow("") << populateString(10000, unit);
+ QFETCH(QString, input);
+ const QChar splitChar = ':';
+
+ QBENCHMARK {
+ input.split(splitChar);
+ }
}
-void tst_QStringList::split_std() const
+void tst_QStringList::split_stdvector_stdstring() const
{
#ifndef QT_NO_STL
QFETCH(QString, input);
@@ -163,7 +179,7 @@ void tst_QStringList::split_std() const
#endif
}
-void tst_QStringList::split_stdw() const
+void tst_QStringList::split_stdvector_stdwstring() const
{
#ifndef QT_NO_STL
QFETCH(QString, input);
@@ -181,14 +197,19 @@ void tst_QStringList::split_stdw() const
#endif
}
-void tst_QStringList::split_ba() const
+void tst_QStringList::split_stdlist_stdstring() const
{
QFETCH(QString, input);
- const char splitChar = ':';
- QByteArray ba = input.toLatin1();
+ const char split_char = ':';
+ std::string stdinput = input.toStdString();
QBENCHMARK {
- ba.split(splitChar);
+ std::istringstream split(stdinput);
+ std::list<std::string> token;
+ for (std::string each;
+ std::getline(split, each, split_char);
+ token.push_back(each))
+ ;
}
}
diff --git a/tests/benchmarks/corelib/tools/qstringlist/qstringlist.pro b/tests/benchmarks/corelib/tools/qstringlist/qstringlist.pro
index 21007d1782..06a5836aa1 100644
--- a/tests/benchmarks/corelib/tools/qstringlist/qstringlist.pro
+++ b/tests/benchmarks/corelib/tools/qstringlist/qstringlist.pro
@@ -1,5 +1,7 @@
load(qttest_p4)
TARGET = tst_bench_qstringlist
+CONFIG -= debug
+CONFIG += release
QT -= gui
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/tools/qvector/main.cpp b/tests/benchmarks/corelib/tools/qvector/main.cpp
new file mode 100644
index 0000000000..6393edafe2
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qvector/main.cpp
@@ -0,0 +1,426 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QVector>
+#include <QDebug>
+#include <QtTest>
+
+#include "qrawvector.h"
+
+#include <vector>
+
+/*
+
+Code generated by g++ 4.3.3. The lines marked with '!' are the ones that get
+executed inside the loop. Using the external 's' causes some load making the
+loop resembling a 'simple inner loop' in 'real' applications.
+
+
+qvector_mutable_read_access:
+
+.L166:
+! movl -16(%ebp), %edx
+! movl (%edx), %eax
+! subl $1, %eax
+! je .L165
+ movl 4(%edx), %eax
+ movl %eax, 8(%esp)
+ movl 8(%edx), %eax
+ movl %esi, (%esp)
+ movl %eax, 4(%esp)
+ call _ZN4myns7QVectorIdE7reallocEii
+.L165:
+! movl -16(%ebp), %eax
+! fldl s
+! faddl 16(%eax,%ebx,8)
+! addl $1, %ebx
+! cmpl $10000, %ebx
+! fstpl s
+! jne .L166
+
+
+qvector_const_read_access:
+
+ movl -16(%ebp), %edx
+ xorl %eax, %eax
+.L183:
+! fldl s
+! faddl 16(%edx,%eax,8)
+! addl $1, %eax
+! cmpl $10000, %eax
+! fstpl s
+! jne .L183
+
+
+stdvector_const_read_access and stdvector_mutable_read_access and
+qrawvector_const_read_access and qrawvector_mutable_read_access:
+
+ xorl %eax, %eax
+.L64:
+! fldl s
+! faddl (%ebx,%eax,8)
+! addl $1, %eax
+! cmpl $10000, %eax
+! fstpl s
+! jne .L64
+
+
+
+Behaviour varies with small modifications, but total is more or
+less stable:
+
+qrawvector_mutable_read_access, using size() instead of N:
+
+.L145:
+! faddl (%edx,%eax,8)
+! addl $1, %eax
+! cmpl %ecx, %eax
+! fstl s
+! jne .L145
+! fstp %st(0)
+
+
+qrawvector_mutable_read_access, counting backward:
+
+.L145:
+! faddl (%edx,%eax,8)
+! subl $1, %eax
+! cmpl $-1, %eax
+! fstl s
+! jne .L145
+
+
+qrawvector_mutable_read_access, counting backward, using size():
+
+.L146:
+! faddl (%edx)
+! addl $1, %eax
+! subl $8, %edx
+! cmpl %ecx, %eax
+! fstl s
+! jne .L146
+
+
+
+*/
+
+
+/*
+
+////////////////////////////////////////////////////////////////////
+
+time ./tst_vector qvector_const_read_access
+real 0m12.912s
+user 0m12.401s
+sys 0m0.016s
+
+time ./tst_vector qvector_mutable_read_access
+real 0m38.566s
+user 0m36.754s
+sys 0m0.008s
+
+
+time ./tst_vector stdvector_mutable_read_access
+real 0m12.736s
+user 0m12.665s
+sys 0m0.004s
+
+
+////////////////////////////////////////////////////////////////////
+
+time ./tst_vector qvector_fill_and_return
+real 0m28.778s
+user 0m28.522s
+sys 0m0.012s
+
+time ./tst_vector stdvector_fill_and_return
+real 0m26.675s
+user 0m26.558s
+sys 0m0.012s
+
+time ./tst_vector qrawvector_fill_and_return
+real 0m23.370s
+user 0m23.269s
+sys 0m0.008s
+
+
+
+*/
+
+
+
+#define TEST_RETURN 1
+
+// For some reason, both 'plain' and '-callgrind' create strange results
+// (like varying instruction count for the same assembly code)
+// So replace it by a plain loop and measure wall clock time.
+//#undef QBENCHMARK
+//#define QBENCHMARK for (int j = 0; j != 10000; ++j)
+
+class tst_QVector: public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void calibration();
+
+ // Pure Qt solution
+ void qvector_separator() { qWarning() << "QVector results: "; }
+ void qvector_const_read_access();
+ void qvector_mutable_read_access();
+ #ifdef TEST_RETURN
+ void qvector_fill_and_return();
+ void qvector_fill_and_return2();
+ #endif
+
+ // Purre Standard solution
+ void stdvector() { qWarning() << "std::vector results: "; }
+ void stdvector_const_read_access();
+ void stdvector_mutable_read_access();
+ #ifdef TEST_RETURN
+ void stdvector_fill_and_return();
+ void stdvector_fill_and_return2();
+ #endif
+
+ // Build using std, pass as QVector
+ void mixedvector() { qWarning() << "mixed results: "; }
+ #ifdef TEST_RETURN
+ void mixedvector_fill_and_return();
+ void mixedvector_fill_and_return2();
+ #endif
+
+ // Alternative implementation
+ void qrawvector_separator() { qWarning() << "QRawVector results: "; }
+ void qrawvector_const_read_access();
+ void qrawvector_mutable_read_access();
+ #ifdef TEST_RETURN
+ void qrawvector_fill_and_return();
+ void qrawvector_fill_and_return2();
+ #endif
+};
+
+const int N = 1000000;
+extern double s;
+
+void tst_QVector::calibration()
+{
+ QVector<double> v(N);
+ for (int i = 0; i != N; ++i)
+ v[i] = i;
+ QBENCHMARK {
+ for (int i = 0; i != N; ++i)
+ s += i;
+ }
+}
+
+///////////////////// QVector /////////////////////
+
+void tst_QVector::qvector_const_read_access()
+{
+ QVector<double> v(N);
+ for (int i = 0; i != N; ++i)
+ v[i] = i;
+
+ const QVector<double> &vc = v;
+ QBENCHMARK {
+ for (int i = 0; i != N; ++i)
+ s += vc[i];
+ }
+}
+
+void tst_QVector::qvector_mutable_read_access()
+{
+ QVector<double> v(N);
+ for (int i = 0; i != N; ++i)
+ v[i] = i;
+
+ QBENCHMARK {
+ for (int i = 0; i != N; ++i)
+ s += v[i];
+ }
+}
+
+#ifdef TEST_RETURN
+extern QVector<double> qvector_fill_and_return_helper();
+extern QVector<double> qvector_fill_and_return_helper2();
+
+void tst_QVector::qvector_fill_and_return()
+{
+ QBENCHMARK {
+ QVector<double> v = qvector_fill_and_return_helper();
+ s += v[1];
+ }
+}
+
+void tst_QVector::qvector_fill_and_return2()
+{
+ QBENCHMARK {
+ QVector<double> v = qvector_fill_and_return_helper2();
+ s += v[1];
+ }
+}
+#endif
+
+
+///////////////////// QRawVector /////////////////////
+
+void tst_QVector::qrawvector_const_read_access()
+{
+ QRawVector<double> v(N);
+ for (int i = 0; i != N; ++i)
+ v[i] = i;
+
+ const QRawVector<double> &vc = v;
+ QBENCHMARK {
+ for (int i = vc.size(); --i >= 0;)
+ s += vc[i];
+ }
+}
+
+void tst_QVector::qrawvector_mutable_read_access()
+{
+ QRawVector<double> v(N);
+ for (int i = 0; i != N; ++i)
+ v[i] = i;
+
+ QBENCHMARK {
+ for (int i = 0; i != N; ++i)
+ s += v[i];
+ }
+}
+
+#ifdef TEST_RETURN
+extern QVector<double> qrawvector_fill_and_return_helper();
+extern QVector<double> qrawvector_fill_and_return_helper2();
+
+void tst_QVector::qrawvector_fill_and_return()
+{
+ QBENCHMARK {
+ QVector<double> v = qrawvector_fill_and_return_helper();
+ s += v[1];
+ }
+}
+
+void tst_QVector::qrawvector_fill_and_return2()
+{
+ QBENCHMARK {
+ QVector<double> v = qrawvector_fill_and_return_helper();
+ s += v[1];
+ }
+}
+#endif
+
+
+///////////////////// std::vector /////////////////////
+
+void tst_QVector::stdvector_const_read_access()
+{
+ std::vector<double> v(N);
+ for (int i = 0; i != N; ++i)
+ v[i] = i;
+
+ const std::vector<double> &vc = v;
+ QBENCHMARK {
+ for (int i = 0; i != N; ++i)
+ s += vc[i];
+ }
+}
+
+void tst_QVector::stdvector_mutable_read_access()
+{
+ std::vector<double> v(N);
+ for (int i = 0; i != N; ++i)
+ v[i] = i;
+
+ QBENCHMARK {
+ for (int i = 0; i != N; ++i)
+ s += v[i];
+ }
+}
+
+#ifdef TEST_RETURN
+extern std::vector<double> stdvector_fill_and_return_helper();
+extern std::vector<double> stdvector_fill_and_return_helper2();
+
+void tst_QVector::stdvector_fill_and_return()
+{
+ QBENCHMARK {
+ std::vector<double> v = stdvector_fill_and_return_helper();
+ s += v[1];
+ }
+}
+
+void tst_QVector::stdvector_fill_and_return2()
+{
+ QBENCHMARK {
+ std::vector<double> v = stdvector_fill_and_return_helper2();
+ s += v[1];
+ }
+}
+#endif
+
+///////////////////// mixed vector /////////////////////
+
+
+#ifdef TEST_RETURN
+extern QVector<double> mixedvector_fill_and_return_helper();
+extern QVector<double> mixedvector_fill_and_return_helper2();
+
+void tst_QVector::mixedvector_fill_and_return()
+{
+ QBENCHMARK {
+ std::vector<double> v = stdvector_fill_and_return_helper();
+ s += v[1];
+ }
+}
+
+void tst_QVector::mixedvector_fill_and_return2()
+{
+ QBENCHMARK {
+ std::vector<double> v = stdvector_fill_and_return_helper2();
+ s += v[1];
+ }
+}
+#endif
+
+QTEST_MAIN(tst_QVector)
+
+#include "main.moc"
diff --git a/tests/benchmarks/corelib/tools/qvector/outofline.cpp b/tests/benchmarks/corelib/tools/qvector/outofline.cpp
new file mode 100644
index 0000000000..e8d036e85a
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qvector/outofline.cpp
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** 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 QtTest module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QVector>
+#include <vector>
+#include "qrawvector.h"
+
+const int N = 1000000;
+double s = 0;
+
+QVector<double> qvector_fill_and_return_helper()
+{
+ QVector<double> v(N);
+ for (int i = 0; i != N; ++i)
+ v[i] = i;
+ return v;
+}
+
+QVector<double> qrawvector_fill_and_return_helper()
+{
+ QRawVector<double> v(N);
+ for (int i = 0; i != N; ++i)
+ v[i] = i;
+ return v.mutateToVector();
+}
+
+QVector<double> mixedvector_fill_and_return_helper()
+{
+ std::vector<double> v(N);
+ for (int i = 0; i != N; ++i)
+ v[i] = i;
+ return QVector<double>::fromStdVector(v);
+}
+
+
+std::vector<double> stdvector_fill_and_return_helper()
+{
+ std::vector<double> v(N);
+ for (int i = 0; i != N; ++i)
+ v[i] = i;
+ return v;
+}
+
diff --git a/tests/benchmarks/corelib/tools/qvector/qrawvector.h b/tests/benchmarks/corelib/tools/qvector/qrawvector.h
new file mode 100644
index 0000000000..1824d206bf
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qvector/qrawvector.h
@@ -0,0 +1,742 @@
+/****************************************************************************
+**
+** 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 QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QRAWVECTOR_H
+#define QRAWVECTOR_H
+
+#include <QtCore/qiterator.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qatomic.h>
+#include <QtCore/qalgorithms.h>
+#include <QtCore/qlist.h>
+
+#ifndef QT_NO_STL
+#include <iterator>
+#include <vector>
+#endif
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Core)
+
+
+
+template <typename T>
+class QRawVector
+{
+ struct Data : QVectorData { T array[1]; };
+
+ T *m_begin;
+ int m_size;
+ int m_alloc;
+
+public:
+ //static Data dummy;
+ //int headerOffset() { return (char*)&dummy.array - (char*)&dummy; }
+ inline int headerOffset() const {
+ // gcc complains about: return offsetof(Data, array); and also
+ // does not like '0' in the expression below.
+ return (char *)&(((Data *)(1))->array) - (char *)1;
+ }
+ inline Data *toBase(T *begin) const
+ { return (Data*)((char*)begin - headerOffset()); }
+ inline T *fromBase(void *d) const
+ { return (T*)((char*)d + headerOffset()); }
+ inline QRawVector()
+ { m_begin = fromBase(0); m_alloc = m_size = 0; realloc(m_size, m_alloc, true); }
+ explicit QRawVector(int size);
+ QRawVector(int size, const T &t);
+ inline QRawVector(const QRawVector<T> &v)
+ { m_begin = v.m_begin; m_alloc = v.m_alloc; m_size = v.m_size; realloc(m_size, m_alloc, true); }
+ inline ~QRawVector() { free(m_begin, m_size); }
+ QRawVector<T> &operator=(const QRawVector<T> &v);
+ bool operator==(const QRawVector<T> &v) const;
+ inline bool operator!=(const QRawVector<T> &v) const { return !(*this == v); }
+
+ inline int size() const { return m_size; }
+
+ inline bool isEmpty() const { return m_size == 0; }
+
+ void resize(int size);
+
+ inline int capacity() const { return m_alloc; }
+ void reserve(int size);
+ inline void squeeze() { realloc(m_size, m_size, false); }
+
+ inline T *data() { return m_begin; }
+ inline const T *data() const { return m_begin; }
+ inline const T *constData() const { return m_begin; }
+ void clear();
+
+ const T &at(int i) const;
+ T &operator[](int i);
+ const T &operator[](int i) const;
+ void append(const T &t);
+ void prepend(const T &t);
+ void insert(int i, const T &t);
+ void insert(int i, int n, const T &t);
+ void replace(int i, const T &t);
+ void remove(int i);
+ void remove(int i, int n);
+
+ QRawVector<T> &fill(const T &t, int size = -1);
+
+ int indexOf(const T &t, int from = 0) const;
+ int lastIndexOf(const T &t, int from = -1) const;
+ bool contains(const T &t) const;
+ int count(const T &t) const;
+
+#ifdef QT_STRICT_ITERATORS
+ class iterator {
+ public:
+ T *i;
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef ptrdiff_t difference_type;
+ typedef T value_type;
+ typedef T *pointer;
+ typedef T &reference;
+
+ inline iterator() : i(0) {}
+ inline iterator(T *n) : i(n) {}
+ inline iterator(const iterator &o): i(o.i){}
+ inline T &operator*() const { return *i; }
+ inline T *operator->() const { return i; }
+ inline T &operator[](int j) const { return *(i + j); }
+ inline bool operator==(const iterator &o) const { return i == o.i; }
+ inline bool operator!=(const iterator &o) const { return i != o.i; }
+ inline bool operator<(const iterator& other) const { return i < other.i; }
+ inline bool operator<=(const iterator& other) const { return i <= other.i; }
+ inline bool operator>(const iterator& other) const { return i > other.i; }
+ inline bool operator>=(const iterator& other) const { return i >= other.i; }
+ inline iterator &operator++() { ++i; return *this; }
+ inline iterator operator++(int) { T *n = i; ++i; return n; }
+ inline iterator &operator--() { i--; return *this; }
+ inline iterator operator--(int) { T *n = i; i--; return n; }
+ inline iterator &operator+=(int j) { i+=j; return *this; }
+ inline iterator &operator-=(int j) { i-=j; return *this; }
+ inline iterator operator+(int j) const { return iterator(i+j); }
+ inline iterator operator-(int j) const { return iterator(i-j); }
+ inline int operator-(iterator j) const { return i - j.i; }
+ };
+ friend class iterator;
+
+ class const_iterator {
+ public:
+ T *i;
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef ptrdiff_t difference_type;
+ typedef T value_type;
+ typedef const T *pointer;
+ typedef const T &reference;
+
+ inline const_iterator() : i(0) {}
+ inline const_iterator(T *n) : i(n) {}
+ inline const_iterator(const const_iterator &o): i(o.i) {}
+ inline explicit const_iterator(const iterator &o): i(o.i) {}
+ inline const T &operator*() const { return *i; }
+ inline const T *operator->() const { return i; }
+ inline const T &operator[](int j) const { return *(i + j); }
+ inline bool operator==(const const_iterator &o) const { return i == o.i; }
+ inline bool operator!=(const const_iterator &o) const { return i != o.i; }
+ inline bool operator<(const const_iterator& other) const { return i < other.i; }
+ inline bool operator<=(const const_iterator& other) const { return i <= other.i; }
+ inline bool operator>(const const_iterator& other) const { return i > other.i; }
+ inline bool operator>=(const const_iterator& other) const { return i >= other.i; }
+ inline const_iterator &operator++() { ++i; return *this; }
+ inline const_iterator operator++(int) { T *n = i; ++i; return n; }
+ inline const_iterator &operator--() { i--; return *this; }
+ inline const_iterator operator--(int) { T *n = i; i--; return n; }
+ inline const_iterator &operator+=(int j) { i+=j; return *this; }
+ inline const_iterator &operator-=(int j) { i+=j; return *this; }
+ inline const_iterator operator+(int j) const { return const_iterator(i+j); }
+ inline const_iterator operator-(int j) const { return const_iterator(i-j); }
+ inline int operator-(const_iterator j) const { return i - j.i; }
+ };
+ friend class const_iterator;
+#else
+ // STL-style
+ typedef T *iterator;
+ typedef const T *const_iterator;
+#endif
+ inline iterator begin() { return m_begin; }
+ inline const_iterator begin() const { return m_begin; }
+ inline const_iterator constBegin() const { return m_begin; }
+ inline iterator end() { return m_begin + m_size; }
+ inline const_iterator end() const { return m_begin + m_size; }
+ inline const_iterator constEnd() const { return m_begin + m_size; }
+ iterator insert(iterator before, int n, const T &x);
+ inline iterator insert(iterator before, const T &x) { return insert(before, 1, x); }
+ iterator erase(iterator begin, iterator end);
+ inline iterator erase(iterator pos) { return erase(pos, pos+1); }
+
+ // more Qt
+ inline int count() const { return m_size; }
+ inline T& first() { Q_ASSERT(!isEmpty()); return *begin(); }
+ inline const T &first() const { Q_ASSERT(!isEmpty()); return *begin(); }
+ inline T& last() { Q_ASSERT(!isEmpty()); return *(end()-1); }
+ inline const T &last() const { Q_ASSERT(!isEmpty()); return *(end()-1); }
+ inline bool startsWith(const T &t) const { return !isEmpty() && first() == t; }
+ inline bool endsWith(const T &t) const { return !isEmpty() && last() == t; }
+ QRawVector<T> mid(int pos, int length = -1) const;
+
+ T value(int i) const;
+ T value(int i, const T &defaultValue) const;
+
+ // STL compatibility
+ typedef T value_type;
+ typedef value_type *pointer;
+ typedef const value_type *const_pointer;
+ typedef value_type &reference;
+ typedef const value_type &const_reference;
+ typedef ptrdiff_t difference_type;
+ typedef iterator Iterator;
+ typedef const_iterator ConstIterator;
+ typedef int size_type;
+ inline void push_back(const T &t) { append(t); }
+ inline void push_front(const T &t) { prepend(t); }
+ void pop_back() { Q_ASSERT(!isEmpty()); erase(end()-1); }
+ void pop_front() { Q_ASSERT(!isEmpty()); erase(begin()); }
+ inline bool empty() const { return m_size == 0; }
+ inline T &front() { return first(); }
+ inline const_reference front() const { return first(); }
+ inline reference back() { return last(); }
+ inline const_reference back() const { return last(); }
+
+ // comfort
+ QRawVector<T> &operator+=(const QRawVector<T> &l);
+ inline QRawVector<T> operator+(const QRawVector<T> &l) const
+ { QRawVector n = *this; n += l; return n; }
+ inline QRawVector<T> &operator+=(const T &t)
+ { append(t); return *this; }
+ inline QRawVector<T> &operator<< (const T &t)
+ { append(t); return *this; }
+ inline QRawVector<T> &operator<<(const QRawVector<T> &l)
+ { *this += l; return *this; }
+
+ QList<T> toList() const;
+
+ //static QRawVector<T> fromList(const QList<T> &list);
+
+#ifndef QT_NO_STL
+ static inline QRawVector<T> fromStdVector(const std::vector<T> &vector)
+ { QRawVector<T> tmp; qCopy(vector.begin(), vector.end(), std::back_inserter(tmp)); return tmp; }
+ inline std::vector<T> toStdVector() const
+ { std::vector<T> tmp; qCopy(constBegin(), constEnd(), std::back_inserter(tmp)); return tmp; }
+#endif
+
+private:
+ T *allocate(int alloc);
+ void realloc(int size, int alloc, bool ref);
+ void free(T *begin, int size);
+ int sizeOfTypedData() {
+ // this is more or less the same as sizeof(Data), except that it doesn't
+ // count the padding at the end
+ return reinterpret_cast<const char *>(&(reinterpret_cast<const Data *>(this))->array[1]) - reinterpret_cast<const char *>(this);
+ }
+ static inline int alignOfTypedData()
+ {
+#ifdef Q_ALIGNOF
+ return qMax<int>(sizeof(void*), Q_ALIGNOF(Data));
+#else
+ return 0;
+#endif
+ }
+
+public:
+ QVector<T> mutateToVector()
+ {
+ Data *d = toBase(m_begin);
+ d->ref = 1;
+ d->alloc = m_alloc;
+ d->size = m_size;
+ d->sharable = 0;
+ d->capacity = 0;
+
+ QVector<T> v;
+ *reinterpret_cast<QVectorData **>(&v) = d;
+ m_begin = fromBase(0);
+ m_size = m_alloc = 0;
+ return v;
+ }
+};
+
+
+template <typename T>
+void QRawVector<T>::reserve(int asize)
+{ if (asize > m_alloc) realloc(m_size, asize, false); }
+template <typename T>
+void QRawVector<T>::resize(int asize)
+{ realloc(asize, (asize > m_alloc || (asize < m_size && asize < (m_alloc >> 1)))
+ ? QVectorData::grow(sizeOfTypedData(), asize, sizeof(T), QTypeInfo<T>::isStatic)
+ : m_alloc, false); }
+template <typename T>
+inline void QRawVector<T>::clear()
+{ *this = QRawVector<T>(); }
+template <typename T>
+inline const T &QRawVector<T>::at(int i) const
+{ Q_ASSERT_X(i >= 0 && i < m_size, "QRawVector<T>::at", "index out of range");
+ return m_begin[i]; }
+template <typename T>
+inline const T &QRawVector<T>::operator[](int i) const
+{ Q_ASSERT_X(i >= 0 && i < m_size, "QRawVector<T>::operator[]", "index out of range");
+ return m_begin[i]; }
+template <typename T>
+inline T &QRawVector<T>::operator[](int i)
+{ Q_ASSERT_X(i >= 0 && i < m_size, "QRawVector<T>::operator[]", "index out of range");
+ return data()[i]; }
+template <typename T>
+inline void QRawVector<T>::insert(int i, const T &t)
+{ Q_ASSERT_X(i >= 0 && i <= m_size, "QRawVector<T>::insert", "index out of range");
+ insert(begin() + i, 1, t); }
+template <typename T>
+inline void QRawVector<T>::insert(int i, int n, const T &t)
+{ Q_ASSERT_X(i >= 0 && i <= m_size, "QRawVector<T>::insert", "index out of range");
+ insert(begin() + i, n, t); }
+template <typename T>
+inline void QRawVector<T>::remove(int i, int n)
+{ Q_ASSERT_X(i >= 0 && n >= 0 && i + n <= m_size, "QRawVector<T>::remove", "index out of range");
+ erase(begin() + i, begin() + i + n); }
+template <typename T>
+inline void QRawVector<T>::remove(int i)
+{ Q_ASSERT_X(i >= 0 && i < m_size, "QRawVector<T>::remove", "index out of range");
+ erase(begin() + i, begin() + i + 1); }
+template <typename T>
+inline void QRawVector<T>::prepend(const T &t)
+{ insert(begin(), 1, t); }
+
+template <typename T>
+inline void QRawVector<T>::replace(int i, const T &t)
+{
+ Q_ASSERT_X(i >= 0 && i < m_size, "QRawVector<T>::replace", "index out of range");
+ const T copy(t);
+ data()[i] = copy;
+}
+
+template <typename T>
+QRawVector<T> &QRawVector<T>::operator=(const QRawVector<T> &v)
+{
+ if (this != &v) {
+ free(m_begin, m_size);
+ m_alloc = v.m_alloc;
+ m_size = v.m_size;
+ m_begin = v.m_begin;
+ realloc(m_size, m_alloc, true);
+ }
+ return *this;
+}
+
+template <typename T>
+inline T *QRawVector<T>::allocate(int aalloc)
+{
+ QVectorData *d = QVectorData::allocate(sizeOfTypedData() + (aalloc - 1) * sizeof(T), alignOfTypedData());
+ Q_CHECK_PTR(d);
+ return fromBase(d);
+}
+
+template <typename T>
+QRawVector<T>::QRawVector(int asize)
+{
+ m_size = m_alloc = asize;
+ m_begin = allocate(asize);
+ if (QTypeInfo<T>::isComplex) {
+ T *b = m_begin;
+ T *i = m_begin + m_size;
+ while (i != b)
+ new (--i) T;
+ } else {
+ qMemSet(m_begin, 0, asize * sizeof(T));
+ }
+}
+
+template <typename T>
+QRawVector<T>::QRawVector(int asize, const T &t)
+{
+ m_size = m_alloc = asize;
+ m_begin = allocate(asize);
+ T *i = m_begin + m_size;
+ while (i != m_begin)
+ new (--i) T(t);
+}
+
+template <typename T>
+void QRawVector<T>::free(T *begin, int size)
+{
+ if (QTypeInfo<T>::isComplex) {
+ T *i = begin + size;
+ while (i-- != begin)
+ i->~T();
+ }
+ Data *x = toBase(begin);
+ x->free(x, alignOfTypedData());
+}
+
+template <typename T>
+void QRawVector<T>::realloc(int asize, int aalloc, bool ref)
+{
+ if (QTypeInfo<T>::isComplex && asize < m_size && !ref) {
+ // call the destructor on all objects that need to be
+ // destroyed when shrinking
+ T *pOld = m_begin + m_size;
+ while (asize < m_size) {
+ (--pOld)->~T();
+ --m_size;
+ }
+ }
+
+ int xalloc = m_alloc;
+ int xsize = m_size;
+ bool changed = false;
+ T *xbegin = m_begin;
+ if (aalloc != xalloc || ref) {
+ // (re)allocate memory
+ if (QTypeInfo<T>::isStatic) {
+ xbegin = allocate(aalloc);
+ xsize = 0;
+ changed = true;
+ } else if (ref) {
+ xbegin = allocate(aalloc);
+ if (QTypeInfo<T>::isComplex) {
+ xsize = 0;
+ } else {
+ ::memcpy(xbegin, m_begin, qMin(aalloc, xalloc) * sizeof(T));
+ xsize = m_size;
+ }
+ changed = true;
+ } else {
+ QT_TRY {
+ QVectorData *mem = QVectorData::reallocate(
+ toBase(m_begin), sizeOfTypedData() + (aalloc - 1) * sizeof(T),
+ sizeOfTypedData()
++ (xalloc - 1) * sizeof(T), alignOfTypedData());
+ Q_CHECK_PTR(mem);
+ xbegin = fromBase(mem);
+ xsize = m_size;
+ } QT_CATCH (const std::bad_alloc &) {
+ if (aalloc > xalloc) // ignore the error in case we are just shrinking.
+ QT_RETHROW;
+ }
+ }
+ xalloc = aalloc;
+ }
+
+ if (QTypeInfo<T>::isComplex) {
+ QT_TRY {
+ T *pOld = m_begin + xsize;
+ T *pNew = xbegin + xsize;
+ // copy objects from the old array into the new array
+ while (xsize < qMin(asize, m_size)) {
+ new (pNew++) T(*pOld++);
+ ++xsize;
+ }
+ // construct all new objects when growing
+ while (xsize < asize) {
+ new (pNew++) T;
+ ++xsize;
+ }
+ } QT_CATCH (...) {
+ free(xbegin, xsize);
+ QT_RETHROW;
+ }
+
+ } else if (asize > xsize) {
+ // initialize newly allocated memory to 0
+ qMemSet(xbegin + xsize, 0, (asize - xsize) * sizeof(T));
+ }
+ xsize = asize;
+
+ if (changed) {
+ if (!ref)
+ free(m_begin, m_size);
+ }
+ m_alloc = xalloc;
+ m_size = xsize;
+ m_begin = xbegin;
+}
+
+template<typename T>
+Q_OUTOFLINE_TEMPLATE T QRawVector<T>::value(int i) const
+{
+ return (i < 0 || i >= m_size) ? T() : m_begin[i];
+}
+template<typename T>
+Q_OUTOFLINE_TEMPLATE T QRawVector<T>::value(int i, const T &defaultValue) const
+{
+ return (i < 0 || i >= m_size) ? defaultValue : m_begin[i];
+}
+
+template <typename T>
+void QRawVector<T>::append(const T &t)
+{
+ if (m_size + 1 > m_alloc) {
+ const T copy(t);
+ realloc(m_size, QVectorData::grow(sizeOfTypedData(), m_size + 1, sizeof(T),
+ QTypeInfo<T>::isStatic), false);
+ if (QTypeInfo<T>::isComplex)
+ new (m_begin + m_size) T(copy);
+ else
+ m_begin[m_size] = copy;
+ } else {
+ if (QTypeInfo<T>::isComplex)
+ new (m_begin + m_size) T(t);
+ else
+ m_begin[m_size] = t;
+ }
+ ++m_size;
+}
+
+template <typename T>
+Q_TYPENAME QRawVector<T>::iterator QRawVector<T>::insert(iterator before, size_type n, const T &t)
+{
+ int offset = int(before - m_begin);
+ if (n != 0) {
+ const T copy(t);
+ if (m_size + n > m_alloc)
+ realloc(m_size, QVectorData::grow(sizeOfTypedData(), m_size + n, sizeof(T),
+ QTypeInfo<T>::isStatic), false);
+ if (QTypeInfo<T>::isStatic) {
+ T *b = m_begin + m_size;
+ T *i = m_begin + m_size + n;
+ while (i != b)
+ new (--i) T;
+ i = m_begin + m_size;
+ T *j = i + n;
+ b = m_begin + offset;
+ while (i != b)
+ *--j = *--i;
+ i = b+n;
+ while (i != b)
+ *--i = copy;
+ } else {
+ T *b = m_begin + offset;
+ T *i = b + n;
+ memmove(i, b, (m_size - offset) * sizeof(T));
+ while (i != b)
+ new (--i) T(copy);
+ }
+ m_size += n;
+ }
+ return m_begin + offset;
+}
+
+template <typename T>
+Q_TYPENAME QRawVector<T>::iterator QRawVector<T>::erase(iterator abegin, iterator aend)
+{
+ int f = int(abegin - m_begin);
+ int l = int(aend - m_begin);
+ int n = l - f;
+ if (QTypeInfo<T>::isComplex) {
+ qCopy(m_begin + l, m_begin + m_size, m_begin + f);
+ T *i = m_begin + m_size;
+ T *b = m_begin + m_size - n;
+ while (i != b) {
+ --i;
+ i->~T();
+ }
+ } else {
+ memmove(m_begin + f, m_begin + l, (m_size - l) * sizeof(T));
+ }
+ m_size -= n;
+ return m_begin + f;
+}
+
+template <typename T>
+bool QRawVector<T>::operator==(const QRawVector<T> &v) const
+{
+ if (m_size != v.m_size)
+ return false;
+ T* b = m_begin;
+ T* i = b + m_size;
+ T* j = v.m_begin + m_size;
+ while (i != b)
+ if (!(*--i == *--j))
+ return false;
+ return true;
+}
+
+template <typename T>
+QRawVector<T> &QRawVector<T>::fill(const T &from, int asize)
+{
+ const T copy(from);
+ resize(asize < 0 ? m_size : asize);
+ if (m_size) {
+ T *i = m_begin + m_size;
+ T *b = m_begin;
+ while (i != b)
+ *--i = copy;
+ }
+ return *this;
+}
+
+template <typename T>
+QRawVector<T> &QRawVector<T>::operator+=(const QRawVector &l)
+{
+ int newSize = m_size + l.m_size;
+ realloc(m_size, newSize, false);
+
+ T *w = m_begin + newSize;
+ T *i = l.m_begin + l.m_size;
+ T *b = l.m_begin;
+ while (i != b) {
+ if (QTypeInfo<T>::isComplex)
+ new (--w) T(*--i);
+ else
+ *--w = *--i;
+ }
+ m_size = newSize;
+ return *this;
+}
+
+template <typename T>
+int QRawVector<T>::indexOf(const T &t, int from) const
+{
+ if (from < 0)
+ from = qMax(from + m_size, 0);
+ if (from < m_size) {
+ T* n = m_begin + from - 1;
+ T* e = m_begin + m_size;
+ while (++n != e)
+ if (*n == t)
+ return n - m_begin;
+ }
+ return -1;
+}
+
+template <typename T>
+int QRawVector<T>::lastIndexOf(const T &t, int from) const
+{
+ if (from < 0)
+ from += m_size;
+ else if (from >= m_size)
+ from = m_size-1;
+ if (from >= 0) {
+ T* b = m_begin;
+ T* n = m_begin + from + 1;
+ while (n != b) {
+ if (*--n == t)
+ return n - b;
+ }
+ }
+ return -1;
+}
+
+template <typename T>
+bool QRawVector<T>::contains(const T &t) const
+{
+ T* b = m_begin;
+ T* i = m_begin + m_size;
+ while (i != b)
+ if (*--i == t)
+ return true;
+ return false;
+}
+
+template <typename T>
+int QRawVector<T>::count(const T &t) const
+{
+ int c = 0;
+ T* b = m_begin;
+ T* i = m_begin + m_size;
+ while (i != b)
+ if (*--i == t)
+ ++c;
+ return c;
+}
+
+template <typename T>
+Q_OUTOFLINE_TEMPLATE QRawVector<T> QRawVector<T>::mid(int pos, int length) const
+{
+ if (length < 0)
+ length = size() - pos;
+ if (pos == 0 && length == size())
+ return *this;
+ QRawVector<T> copy;
+ if (pos + length > size())
+ length = size() - pos;
+ for (int i = pos; i < pos + length; ++i)
+ copy += at(i);
+ return copy;
+}
+
+template <typename T>
+Q_OUTOFLINE_TEMPLATE QList<T> QRawVector<T>::toList() const
+{
+ QList<T> result;
+ for (int i = 0; i < size(); ++i)
+ result.append(at(i));
+ return result;
+}
+
+
+/*template <typename T>
+Q_OUTOFLINE_TEMPLATE QRawVector<T> QList<T>::toVector() const
+{
+ QRawVector<T> result(size());
+ for (int i = 0; i < size(); ++i)
+ result[i] = at(i);
+ return result;
+}
+
+template <typename T>
+QRawVector<T> QRawVector<T>::fromList(const QList<T> &list)
+{
+ return list.toVector();
+}
+
+template <typename T>
+QList<T> QList<T>::fromVector(const QRawVector<T> &vector)
+{
+ return vector.toList();
+}
+*/
+
+Q_DECLARE_SEQUENTIAL_ITERATOR(RawVector)
+Q_DECLARE_MUTABLE_SEQUENTIAL_ITERATOR(RawVector)
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QRAWVECTOR_H
diff --git a/tests/benchmarks/corelib/tools/qvector/qvector.pro b/tests/benchmarks/corelib/tools/qvector/qvector.pro
new file mode 100644
index 0000000000..adb30c95cd
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qvector/qvector.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+TARGET = tst_vector
+QT = core
+INCLUDEPATH += .
+SOURCES += main.cpp outofline.cpp outofline2.cpp
+CONFIG += release
diff --git a/tests/benchmarks/corelib/tools/tools.pro b/tests/benchmarks/corelib/tools/tools.pro
index 12c23fc1de..681a6c6e74 100644
--- a/tests/benchmarks/corelib/tools/tools.pro
+++ b/tests/benchmarks/corelib/tools/tools.pro
@@ -7,4 +7,5 @@ SUBDIRS = \
qregexp \
qstring \
qstringbuilder \
- qstringlist
+ qstringlist \
+ qvector
diff --git a/tests/benchmarks/declarative/binding/binding.pro b/tests/benchmarks/declarative/binding/binding.pro
new file mode 100644
index 0000000000..5ceaf34aa1
--- /dev/null
+++ b/tests/benchmarks/declarative/binding/binding.pro
@@ -0,0 +1,18 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = tst_binding
+QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_binding.cpp testtypes.cpp
+HEADERS += testtypes.h
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+symbian* {
+ data.sources = data/*
+ data.path = data
+ DEPLOYMENT = data
+}
+
diff --git a/tests/benchmarks/declarative/binding/data/idproperty.txt b/tests/benchmarks/declarative/binding/data/idproperty.txt
new file mode 100644
index 0000000000..4e474ba49a
--- /dev/null
+++ b/tests/benchmarks/declarative/binding/data/idproperty.txt
@@ -0,0 +1,9 @@
+import Test 1.0
+
+MyQmlObject {
+ id: myObject
+
+ MyQmlObject {
+ result: ###
+ }
+}
diff --git a/tests/benchmarks/declarative/binding/data/localproperty.txt b/tests/benchmarks/declarative/binding/data/localproperty.txt
new file mode 100644
index 0000000000..c7ca0efdb4
--- /dev/null
+++ b/tests/benchmarks/declarative/binding/data/localproperty.txt
@@ -0,0 +1,5 @@
+import Test 1.0
+
+MyQmlObject {
+ result: ###
+}
diff --git a/tests/benchmarks/declarative/binding/data/objectproperty.txt b/tests/benchmarks/declarative/binding/data/objectproperty.txt
new file mode 100644
index 0000000000..6133dd648b
--- /dev/null
+++ b/tests/benchmarks/declarative/binding/data/objectproperty.txt
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyQmlObject {
+ id: myObject
+
+ result: ###
+}
diff --git a/tests/benchmarks/declarative/binding/testtypes.cpp b/tests/benchmarks/declarative/binding/testtypes.cpp
new file mode 100644
index 0000000000..043c8ab945
--- /dev/null
+++ b/tests/benchmarks/declarative/binding/testtypes.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "testtypes.h"
+
+void registerTypes()
+{
+ QML_REGISTER_TYPE(Test, 1, 0, MyQmlObject, MyQmlObject);
+}
diff --git a/tests/benchmarks/declarative/binding/testtypes.h b/tests/benchmarks/declarative/binding/testtypes.h
new file mode 100644
index 0000000000..523f94dd09
--- /dev/null
+++ b/tests/benchmarks/declarative/binding/testtypes.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef TESTTYPES_H
+#define TESTTYPES_H
+
+#include <QtCore/qobject.h>
+#include <QtDeclarative/qdeclarative.h>
+
+class MyQmlObject : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int result READ result WRITE setResult);
+ Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged);
+ Q_PROPERTY(MyQmlObject *object READ object WRITE setObject NOTIFY objectChanged);
+ Q_PROPERTY(QDeclarativeListProperty<QObject> data READ data);
+ Q_CLASSINFO("DefaultProperty", "data");
+public:
+ MyQmlObject() : m_result(0), m_value(0), m_object(0) {}
+
+ int result() const { return m_result; }
+ void setResult(int r) { m_result = r; }
+
+ int value() const { return m_value; }
+ void setValue(int v) { m_value = v; emit valueChanged(); }
+
+ QDeclarativeListProperty<QObject> data() { return QDeclarativeListProperty<QObject>(this, m_data); }
+
+ MyQmlObject *object() const { return m_object; }
+ void setObject(MyQmlObject *o) { m_object = o; emit objectChanged(); }
+
+signals:
+ void valueChanged();
+ void objectChanged();
+
+private:
+ QList<QObject *> m_data;
+ int m_result;
+ int m_value;
+ MyQmlObject *m_object;
+};
+QML_DECLARE_TYPE(MyQmlObject);
+
+void registerTypes();
+
+#endif // TESTTYPES_H
diff --git a/tests/benchmarks/declarative/binding/tst_binding.cpp b/tests/benchmarks/declarative/binding/tst_binding.cpp
new file mode 100644
index 0000000000..dbddac39df
--- /dev/null
+++ b/tests/benchmarks/declarative/binding/tst_binding.cpp
@@ -0,0 +1,161 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QFile>
+#include <QDebug>
+#include "testtypes.h"
+
+//TESTED_FILES=
+
+class tst_binding : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_binding();
+ virtual ~tst_binding();
+
+public slots:
+ void initTestCase();
+ void cleanupTestCase();
+
+private slots:
+ void objectproperty_data();
+ void objectproperty();
+ void basicproperty_data();
+ void basicproperty();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+tst_binding::tst_binding()
+{
+}
+
+tst_binding::~tst_binding()
+{
+}
+
+void tst_binding::initTestCase()
+{
+ registerTypes();
+}
+
+void tst_binding::cleanupTestCase()
+{
+}
+
+#define COMPONENT(filename, binding) \
+ QDeclarativeComponent c(&engine); \
+ { \
+ QFile f(filename); \
+ QVERIFY(f.open(QIODevice::ReadOnly)); \
+ QByteArray data = f.readAll(); \
+ data.replace("###", binding.toUtf8()); \
+ c.setData(data, QUrl()); \
+ QVERIFY(c.isReady()); \
+ }
+
+void tst_binding::objectproperty_data()
+{
+ QTest::addColumn<QString>("file");
+ QTest::addColumn<QString>("binding");
+
+ QTest::newRow("object.value") << SRCDIR "/data/objectproperty.txt" << "object.value";
+ QTest::newRow("object.value + 10") << SRCDIR "/data/objectproperty.txt" << "object.value + 10";
+}
+
+void tst_binding::objectproperty()
+{
+ QFETCH(QString, file);
+ QFETCH(QString, binding);
+
+ COMPONENT(file, binding);
+
+ MyQmlObject object1;
+ MyQmlObject object2;
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(c.create());
+ QVERIFY(object != 0);
+ object->setObject(&object2);
+
+ QBENCHMARK {
+ object->setObject(&object1);
+ object->setObject(&object2);
+ }
+}
+
+void tst_binding::basicproperty_data()
+{
+ QTest::addColumn<QString>("file");
+ QTest::addColumn<QString>("binding");
+
+ QTest::newRow("value") << SRCDIR "/data/localproperty.txt" << "value";
+ QTest::newRow("value + 10") << SRCDIR "/data/localproperty.txt" << "value + 10";
+ QTest::newRow("value + value + 10") << SRCDIR "/data/localproperty.txt" << "value + value + 10";
+
+ QTest::newRow("myObject.value") << SRCDIR "/data/idproperty.txt" << "myObject.value";
+ QTest::newRow("myObject.value + 10") << SRCDIR "/data/idproperty.txt" << "myObject.value + 10";
+ QTest::newRow("myObject.value + myObject.value + 10") << SRCDIR "/data/idproperty.txt" << "myObject.value + myObject.value + 10";
+}
+
+void tst_binding::basicproperty()
+{
+ QFETCH(QString, file);
+ QFETCH(QString, binding);
+
+ COMPONENT(file, binding);
+
+ MyQmlObject *object = qobject_cast<MyQmlObject *>(c.create());
+ QVERIFY(object != 0);
+ object->setValue(10);
+
+ QBENCHMARK {
+ object->setValue(1);
+ }
+}
+
+QTEST_MAIN(tst_binding)
+#include "tst_binding.moc"
diff --git a/tests/benchmarks/declarative/creation/creation.pro b/tests/benchmarks/declarative/creation/creation.pro
new file mode 100644
index 0000000000..3e0caf6988
--- /dev/null
+++ b/tests/benchmarks/declarative/creation/creation.pro
@@ -0,0 +1,15 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = tst_creation
+QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_creation.cpp
+
+symbian* {
+ data.sources = data/*
+ data.path = data
+ DEPLOYMENT += addFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+} \ No newline at end of file
diff --git a/tests/benchmarks/declarative/creation/data/item.qml b/tests/benchmarks/declarative/creation/data/item.qml
new file mode 100644
index 0000000000..74d2f27fcf
--- /dev/null
+++ b/tests/benchmarks/declarative/creation/data/item.qml
@@ -0,0 +1,34 @@
+import Qt 4.6
+
+Item {
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+ Item {}
+}
diff --git a/tests/benchmarks/declarative/creation/data/qobject.qml b/tests/benchmarks/declarative/creation/data/qobject.qml
new file mode 100644
index 0000000000..99d010f02f
--- /dev/null
+++ b/tests/benchmarks/declarative/creation/data/qobject.qml
@@ -0,0 +1,4 @@
+import Qt 4.6
+
+QtObject {
+}
diff --git a/tests/benchmarks/declarative/creation/tst_creation.cpp b/tests/benchmarks/declarative/creation/tst_creation.cpp
new file mode 100644
index 0000000000..5b0004ff50
--- /dev/null
+++ b/tests/benchmarks/declarative/creation/tst_creation.cpp
@@ -0,0 +1,384 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <private/qdeclarativemetatype_p.h>
+#include <QDebug>
+#include <QGraphicsScene>
+#include <QGraphicsItem>
+#include <QDeclarativeItem>
+#include <private/qobject_p.h>
+
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+// Application private dir is default serach path for files, so SRCDIR can be set to empty
+#define SRCDIR ""
+#endif
+
+class tst_creation : public QObject
+{
+ Q_OBJECT
+public:
+ tst_creation() {}
+
+private slots:
+ void qobject_cpp();
+ void qobject_qml();
+ void qobject_qmltype();
+ void qobject_alloc();
+
+ void objects_qmltype_data();
+ void objects_qmltype();
+
+ void qgraphicsitem();
+ void qgraphicsobject();
+ void qgraphicsitem14();
+ void qgraphicsitem_tree14();
+
+ void itemtree_notree_cpp();
+ void itemtree_objtree_cpp();
+ void itemtree_cpp();
+ void itemtree_data_cpp();
+ void itemtree_qml();
+ void itemtree_scene_cpp();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+inline QUrl TEST_FILE(const QString &filename)
+{
+ return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename);
+}
+
+void tst_creation::qobject_cpp()
+{
+ QBENCHMARK {
+ QObject *obj = new QObject;
+ delete obj;
+ }
+}
+
+void tst_creation::qobject_qml()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("qobject.qml"));
+ QObject *obj = component.create();
+ delete obj;
+
+ QBENCHMARK {
+ QObject *obj = component.create();
+ delete obj;
+ }
+}
+
+void tst_creation::qobject_qmltype()
+{
+ QDeclarativeType *t = QDeclarativeMetaType::qmlType("Qt/QtObject", 4, 6);
+
+ QBENCHMARK {
+ QObject *obj = t->create();
+ delete obj;
+ }
+}
+
+struct QObjectFakeData {
+ char data[sizeof(QObjectPrivate)];
+};
+
+struct QObjectFake {
+ QObjectFake();
+ virtual ~QObjectFake();
+private:
+ QObjectFakeData *d;
+};
+
+QObjectFake::QObjectFake()
+{
+ d = new QObjectFakeData;
+}
+
+QObjectFake::~QObjectFake()
+{
+ delete d;
+}
+
+void tst_creation::qobject_alloc()
+{
+ QBENCHMARK {
+ QObjectFake *obj = new QObjectFake;
+ delete obj;
+ }
+}
+
+void tst_creation::objects_qmltype_data()
+{
+ QTest::addColumn<QByteArray>("type");
+
+ QList<QByteArray> types = QDeclarativeMetaType::qmlTypeNames();
+ foreach (QByteArray type, types)
+ QTest::newRow(type.constData()) << type;
+}
+
+void tst_creation::objects_qmltype()
+{
+ QFETCH(QByteArray, type);
+ QDeclarativeType *t = QDeclarativeMetaType::qmlType(type, 4, 6);
+ if (!t || !t->isCreatable())
+ QSKIP("Non-creatable type", SkipSingle);
+
+ QBENCHMARK {
+ QObject *obj = t->create();
+ delete obj;
+ }
+}
+
+class QGraphicsItemDummy : public QGraphicsItem
+{
+public:
+ virtual QRectF boundingRect() const { return QRectF(); }
+ virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) {}
+};
+
+class QGraphicsObjectDummy : public QGraphicsObject
+{
+public:
+ virtual QRectF boundingRect() const { return QRectF(); }
+ virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) {}
+};
+
+void tst_creation::qgraphicsitem()
+{
+ QBENCHMARK {
+ QGraphicsItemDummy *i = new QGraphicsItemDummy();
+ delete i;
+ }
+}
+
+void tst_creation::qgraphicsobject()
+{
+ QBENCHMARK {
+ QGraphicsObjectDummy *i = new QGraphicsObjectDummy();
+ delete i;
+ }
+}
+
+void tst_creation::qgraphicsitem14()
+{
+ QBENCHMARK {
+ QGraphicsItemDummy *i1 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i2 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i3 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i4 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i5 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i6 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i7 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i8 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i9 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i10 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i11 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i12 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i13 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i14 = new QGraphicsItemDummy();
+
+ delete i1;
+ delete i2;
+ delete i3;
+ delete i4;
+ delete i5;
+ delete i6;
+ delete i7;
+ delete i8;
+ delete i9;
+ delete i10;
+ delete i11;
+ delete i12;
+ delete i13;
+ delete i14;
+ }
+}
+
+void tst_creation::qgraphicsitem_tree14()
+{
+ QBENCHMARK {
+ // i1
+ // +-------------------------+
+ // i2 i3
+ // +-----------+ +-----+-----+
+ // i4 i5 i6 i7
+ // +----+ +--+ +--+--+ +----+
+ // i8 i9 i10 i11 i12 i13 i14
+
+ QGraphicsItemDummy *i1 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i2 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i3 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i4 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i5 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i6 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i7 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i8 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i9 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i10 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i11 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i12 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i13 = new QGraphicsItemDummy();
+ QGraphicsItemDummy *i14 = new QGraphicsItemDummy();
+
+ i14->setParentItem(i7);
+ i13->setParentItem(i7);
+ i12->setParentItem(i6);
+ i11->setParentItem(i6);
+ i10->setParentItem(i5);
+ i9->setParentItem(i4);
+ i8->setParentItem(i4);
+
+ i7->setParentItem(i3);
+ i6->setParentItem(i3);
+ i5->setParentItem(i2);
+ i4->setParentItem(i2);
+
+ i3->setParentItem(i1);
+ i2->setParentItem(i1);
+
+ delete i1;
+ }
+}
+
+struct QDeclarativeGraphics_DerivedObject : public QObject
+{
+ void setParent_noEvent(QObject *parent) {
+ bool sce = d_ptr->sendChildEvents;
+ d_ptr->sendChildEvents = false;
+ setParent(parent);
+ d_ptr->sendChildEvents = sce;
+ }
+};
+
+inline void QDeclarativeGraphics_setParent_noEvent(QObject *object, QObject *parent)
+{
+ static_cast<QDeclarativeGraphics_DerivedObject *>(object)->setParent_noEvent(parent);
+}
+
+void tst_creation::itemtree_notree_cpp()
+{
+ QBENCHMARK {
+ QDeclarativeItem *item = new QDeclarativeItem;
+ for (int i = 0; i < 30; ++i) {
+ QDeclarativeItem *child = new QDeclarativeItem;
+ }
+ delete item;
+ }
+}
+
+void tst_creation::itemtree_objtree_cpp()
+{
+ QBENCHMARK {
+ QDeclarativeItem *item = new QDeclarativeItem;
+ for (int i = 0; i < 30; ++i) {
+ QDeclarativeItem *child = new QDeclarativeItem;
+ QDeclarativeGraphics_setParent_noEvent(child,item);
+ }
+ delete item;
+ }
+}
+
+void tst_creation::itemtree_cpp()
+{
+ QBENCHMARK {
+ QDeclarativeItem *item = new QDeclarativeItem;
+ for (int i = 0; i < 30; ++i) {
+ QDeclarativeItem *child = new QDeclarativeItem;
+ QDeclarativeGraphics_setParent_noEvent(child,item);
+ child->setParentItem(item);
+ }
+ delete item;
+ }
+}
+
+void tst_creation::itemtree_data_cpp()
+{
+ QBENCHMARK {
+ QDeclarativeItem *item = new QDeclarativeItem;
+ for (int i = 0; i < 30; ++i) {
+ QDeclarativeItem *child = new QDeclarativeItem;
+ QDeclarativeGraphics_setParent_noEvent(child,item);
+ QDeclarativeListReference ref(item, "data");
+ ref.append(child);
+ }
+ delete item;
+ }
+}
+
+void tst_creation::itemtree_qml()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("item.qml"));
+ QObject *obj = component.create();
+ delete obj;
+
+ QBENCHMARK {
+ QObject *obj = component.create();
+ delete obj;
+ }
+}
+
+void tst_creation::itemtree_scene_cpp()
+{
+ QGraphicsScene scene;
+ QDeclarativeItem *root = new QDeclarativeItem;
+ scene.addItem(root);
+ QBENCHMARK {
+ QDeclarativeItem *item = new QDeclarativeItem;
+ for (int i = 0; i < 30; ++i) {
+ QDeclarativeItem *child = new QDeclarativeItem;
+ QDeclarativeGraphics_setParent_noEvent(child,item);
+ child->setParentItem(item);
+ }
+ item->setParentItem(root);
+ delete item;
+ }
+ delete root;
+}
+
+
+QTEST_MAIN(tst_creation)
+
+#include "tst_creation.moc"
diff --git a/tests/benchmarks/declarative/declarative.pro b/tests/benchmarks/declarative/declarative.pro
new file mode 100644
index 0000000000..8c0ed4210b
--- /dev/null
+++ b/tests/benchmarks/declarative/declarative.pro
@@ -0,0 +1,10 @@
+TEMPLATE = subdirs
+SUBDIRS += \
+ binding \
+ creation \
+ pointers \
+ qdeclarativecomponent \
+ qdeclarativeimage \
+ qdeclarativemetaproperty \
+ script \
+# qdeclarativetime
diff --git a/tests/benchmarks/declarative/painting/data/63x63.png b/tests/benchmarks/declarative/painting/data/63x63.png
new file mode 100644
index 0000000000..d9efda8a7a
--- /dev/null
+++ b/tests/benchmarks/declarative/painting/data/63x63.png
Binary files differ
diff --git a/tests/benchmarks/declarative/painting/data/63x63_opaque.png b/tests/benchmarks/declarative/painting/data/63x63_opaque.png
new file mode 100644
index 0000000000..d1429080db
--- /dev/null
+++ b/tests/benchmarks/declarative/painting/data/63x63_opaque.png
Binary files differ
diff --git a/tests/benchmarks/declarative/painting/data/64x64.png b/tests/benchmarks/declarative/painting/data/64x64.png
new file mode 100644
index 0000000000..b149f33c3d
--- /dev/null
+++ b/tests/benchmarks/declarative/painting/data/64x64.png
Binary files differ
diff --git a/tests/benchmarks/declarative/painting/data/64x64_opaque.png b/tests/benchmarks/declarative/painting/data/64x64_opaque.png
new file mode 100644
index 0000000000..94c07f3b3e
--- /dev/null
+++ b/tests/benchmarks/declarative/painting/data/64x64_opaque.png
Binary files differ
diff --git a/tests/benchmarks/declarative/painting/paintbenchmark.cpp b/tests/benchmarks/declarative/painting/paintbenchmark.cpp
new file mode 100644
index 0000000000..073e14ef86
--- /dev/null
+++ b/tests/benchmarks/declarative/painting/paintbenchmark.cpp
@@ -0,0 +1,417 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QPixmap>
+#include <QImage>
+#include <QPainter>
+#include <QPainterPath>
+#include <QGLWidget>
+#include <QTextLayout>
+#include <QVBoxLayout>
+#include <QTime>
+#include <QDebug>
+#include <QStaticText>
+
+int iterations = 20;
+const int count = 600;
+const int lines = 12;
+const int spacing = 36;
+QSizeF size(1000, 800);
+const qreal lineWidth = 1000;
+QString strings[lines];
+QGLWidget *testWidget = 0;
+
+void paint_QTextLayout(QPainter &p, bool useCache)
+{
+ static bool first = true;
+ static QTextLayout *textLayout[lines];
+ if (first) {
+ for (int i = 0; i < lines; ++i) {
+ textLayout[i] = new QTextLayout(strings[i]);
+ int leading = p.fontMetrics().leading();
+ qreal height = 0;
+ qreal widthUsed = 0;
+ textLayout[i]->setCacheEnabled(useCache);
+ textLayout[i]->beginLayout();
+ while (1) {
+ QTextLine line = textLayout[i]->createLine();
+ if (!line.isValid())
+ break;
+
+ line.setLineWidth(lineWidth);
+ height += leading;
+ line.setPosition(QPointF(0, height));
+ height += line.height();
+ widthUsed = qMax(widthUsed, line.naturalTextWidth());
+ }
+ textLayout[i]->endLayout();
+ }
+ first = false;
+ }
+ for (int i = 0; i < count; ++i) {
+ for (int j = 0; j < lines; ++j) {
+ textLayout[j]->draw(&p, QPoint(0, j*spacing));
+ }
+ }
+}
+
+void paint_QTextLayout_noCache(QPainter &p)
+{
+ paint_QTextLayout(p, false);
+}
+
+void paint_QTextLayout_cache(QPainter &p)
+{
+ paint_QTextLayout(p, true);
+}
+
+void paint_QStaticText(QPainter &p, bool useOptimizations)
+{
+ static QStaticText *staticText[lines];
+ static bool first = true;
+ if (first) {
+ for (int i = 0; i < lines; ++i) {
+ staticText[i] = new QStaticText(strings[i]);
+ if (useOptimizations)
+ staticText[i]->setPerformanceHint(QStaticText::AggressiveCaching);
+ else
+ staticText[i]->setPerformanceHint(QStaticText::ModerateCaching);
+ }
+ first = false;
+ }
+ for (int i = 0; i < count; ++i) {
+ for (int j = 0; j < lines; ++j) {
+ p.drawStaticText(QPointF(0, 30 + j*spacing), *staticText[j]);
+ }
+ }
+}
+
+void paint_QStaticText_noOptimizations(QPainter &p)
+{
+ paint_QStaticText(p, false);
+}
+
+void paint_QStaticText_optimizations(QPainter &p)
+{
+ paint_QStaticText(p, true);
+}
+
+void paint_QPixmapCachedText(QPainter &p)
+{
+ static bool first = true;
+ static QPixmap cacheText[lines];
+ if (first) {
+ for (int i = 0; i < lines; ++i) {
+ QRectF trueSize;
+ trueSize = p.boundingRect(QRectF(QPointF(0,0), size), 0, strings[i]);
+ cacheText[i] = QPixmap(trueSize.size().toSize());
+ cacheText[i].fill(Qt::transparent);
+ QPainter paint(&cacheText[i]);
+ paint.setPen(Qt::black);
+ paint.drawText(QRectF(QPointF(0,0), trueSize.size().toSize()), strings[i]);
+ }
+ first = false;
+ }
+ for (int i = 0; i < count; i++) {
+ for (int j = 0; j < lines; ++j) {
+ p.drawPixmap(0,j*spacing,cacheText[j]);
+ }
+ }
+}
+
+void paint_RoundedRect(QPainter &p)
+{
+ static bool first = true;
+ if (first) {
+ if (testWidget) {
+ QGLFormat format = testWidget->format();
+ if (!format.sampleBuffers())
+ qWarning() << "Cannot paint antialiased rounded rect without sampleBuffers";
+ }
+ first = false;
+ }
+ p.setRenderHint(QPainter::Antialiasing, true);
+ p.setPen(Qt::black);
+ p.setBrush(Qt::red);
+ for (int i = 0; i < count; i++) {
+ for (int j = 0; j < lines; ++j) {
+ QSize size((j+1)*50, spacing-1);
+ p.drawRoundedRect(QRectF(QPointF(0,j*spacing), size), 8, 8);
+ }
+ }
+}
+
+void paint_QPixmapCachedRoundedRect(QPainter &p)
+{
+ static bool first = true;
+ static QPixmap cacheRect;
+ if (first) {
+ const int pw = 0;
+ const int radius = 8;
+ cacheRect = QPixmap(radius*2 + 3 + pw*2, radius*2 + 3 + pw*2);
+ cacheRect.fill(Qt::transparent);
+ QPainter paint(&cacheRect);
+ paint.setRenderHint(QPainter::Antialiasing);
+ paint.setPen(Qt::black);
+ paint.setBrush(Qt::red);
+ if (pw%2)
+ paint.drawRoundedRect(QRectF(qreal(pw)/2+1, qreal(pw)/2+1, cacheRect.width()-(pw+1), cacheRect.height()-(pw+1)), radius, radius);
+ else
+ paint.drawRoundedRect(QRectF(qreal(pw)/2, qreal(pw)/2, cacheRect.width()-pw, cacheRect.height()-pw), radius, radius);
+
+ first = false;
+ }
+ for (int i = 0; i < count; i++) {
+ for (int j = 0; j < lines; ++j) {
+ QSize size((j+1)*50, spacing-1);
+
+ p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, true);
+
+ const int pw = 0;
+
+ int xOffset = (cacheRect.width()-1)/2;
+ int yOffset = (cacheRect.height()-1)/2;
+
+ QMargins margins(xOffset, yOffset, xOffset, yOffset);
+ QTileRules rules(Qt::StretchTile, Qt::StretchTile);
+ //NOTE: even though our item may have qreal-based width and height, qDrawBorderPixmap only supports QRects
+ qDrawBorderPixmap(&p, QRect(-pw/2, j*spacing-pw/2, size.width()+pw, size.height()+pw), margins, cacheRect, cacheRect.rect(), margins, rules);
+ }
+ }
+}
+
+void paint_pathCacheRoundedRect(QPainter &p)
+{
+ static bool first = true;
+ static QPainterPath path[lines];
+ if (first) {
+ for (int j = 0; j < lines; ++j) {
+ path[j].addRoundedRect(QRectF(0,0,(j+1)*50, spacing-1), 8, 8);
+ }
+ first = false;
+ }
+ p.setRenderHint(QPainter::Antialiasing, true);
+ p.setPen(Qt::black);
+ p.setBrush(Qt::red);
+ for (int i = 0; i < count; i++) {
+ for (int j = 0; j < lines; ++j) {
+ p.translate(0,j*spacing);
+ p.drawPath(path[j]);
+ p.translate(0,-j*spacing);
+ }
+ }
+}
+
+void paint_QPixmap63x63_opaque(QPainter &p)
+{
+ static bool first = true;
+ static QPixmap pm;
+ if (first) {
+ pm.load("data/63x63_opaque.png");
+ first = false;
+ }
+ for (int i = 0; i < count; i++) {
+ for (int j = 0; j < lines; ++j) {
+ p.drawPixmap((i%10) * 64,j*spacing, pm);
+ }
+ }
+}
+
+void paint_QPixmap64x64_opaque(QPainter &p)
+{
+ static bool first = true;
+ static QPixmap pm;
+ if (first) {
+ pm.load("data/64x64_opaque.png");
+ first = false;
+ }
+ for (int i = 0; i < count; i++) {
+ for (int j = 0; j < lines; ++j) {
+ p.drawPixmap((i%10) * 64,j*spacing, pm);
+ }
+ }
+}
+
+void paint_QPixmap63x63(QPainter &p)
+{
+ static bool first = true;
+ static QPixmap pm;
+ if (first) {
+ pm.load("data/63x63.png");
+ first = false;
+ }
+ for (int i = 0; i < count; i++) {
+ for (int j = 0; j < lines; ++j) {
+ p.drawPixmap((i%10) * 64,j*spacing, pm);
+ }
+ }
+}
+
+void paint_QPixmap64x64(QPainter &p)
+{
+ static bool first = true;
+ static QPixmap pm;
+ if (first) {
+ pm.load("data/64x64.png");
+ first = false;
+ }
+ for (int i = 0; i < count; i++) {
+ for (int j = 0; j < lines; ++j) {
+ p.drawPixmap((i%10) * 64,j*spacing, pm);
+ }
+ }
+}
+typedef void(*PaintFunc)(QPainter &);
+
+struct {
+ const char *name;
+ PaintFunc func;
+} funcs[] = {
+ { "QTextLayoutNoCache", &paint_QTextLayout_noCache },
+ { "QTextLayoutWithCache", &paint_QTextLayout_cache },
+ { "QStaticTextNoBackendOptimizations", &paint_QStaticText_noOptimizations },
+ { "QStaticTextWithBackendOptimizations", &paint_QStaticText_optimizations },
+ { "CachedText", &paint_QPixmapCachedText },
+ { "RoundedRect", &paint_RoundedRect },
+ { "CachedRoundedRect", &paint_QPixmapCachedRoundedRect },
+ { "PathCacheRoundedRect", &paint_pathCacheRoundedRect },
+ { "QPixmap63x63_opaque", &paint_QPixmap63x63_opaque },
+ { "QPixmap64x64_opaque", &paint_QPixmap64x64_opaque },
+ { "QPixmap63x63", &paint_QPixmap63x63 },
+ { "QPixmap64x64", &paint_QPixmap64x64 },
+ { 0, 0 }
+};
+
+PaintFunc testFunc = 0;
+
+class MyGLWidget : public QGLWidget
+{
+public:
+ MyGLWidget(const QGLFormat &format) : QGLWidget(format), frames(0) {
+ const char chars[] = "abcd efgh ijkl mnop qrst uvwx yz!$. ABCD 1234";
+ int len = strlen(chars);
+ for (int i = 0; i < lines; ++i) {
+ for (int j = 0; j < 60; j++) {
+ strings[i] += QChar(chars[rand() % len]);
+ }
+ }
+ }
+
+ void paintEvent(QPaintEvent *) {
+ static int last = 0;
+ static bool firstRun = true;
+ if (firstRun) {
+ timer.start();
+ firstRun = false;
+ } else {
+ int elapsed = timer.elapsed();
+ qDebug() << "frame elapsed:" << elapsed - last;
+ last = elapsed;
+ }
+ QPainter p(this);
+ p.fillRect(rect(), Qt::white);
+ p.setPen(Qt::black);
+ QTime drawTimer;
+ drawTimer.start();
+ testFunc(p);
+ qDebug() << "draw time" << drawTimer.elapsed();
+ if (iterations--)
+ update();
+ else
+ qApp->quit();
+ }
+
+ QTime timer;
+ int frames;
+};
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ bool sampleBuffers = false;
+
+ for (int i = 1; i < argc; ++i) {
+ QString arg = argv[i];
+ if (arg == "-test") {
+ arg = argv[++i];
+ int j = 0;
+ while (funcs[j].name) {
+ if (arg == funcs[j].name) {
+ testFunc = funcs[j].func;
+ qDebug() << "Running test" << arg;
+ break;
+ }
+ ++j;
+ }
+ } else if (arg == "-iterations") {
+ arg = argv[++i];
+ iterations = arg.toInt();
+ } else if (arg == "-sampleBuffers") {
+ sampleBuffers = true;
+ }
+ }
+
+ if (testFunc == 0) {
+ qDebug() << "Usage: textspeed -test <test> [-sampleBuffers] [-iterations n]";
+ qDebug() << "where <test> can be:";
+ int j = 0;
+ while (funcs[j].name) {
+ qDebug() << " " << funcs[j].name;
+ ++j;
+ }
+ exit(1);
+ }
+
+ QWidget w;
+ QGLFormat format = QGLFormat::defaultFormat();
+ format.setSampleBuffers(sampleBuffers);
+ testWidget = new MyGLWidget(format);
+ testWidget->setAutoFillBackground(false);
+ QVBoxLayout *layout = new QVBoxLayout(&w);
+ w.setLayout(layout);
+ layout->addWidget(testWidget);
+ w.showFullScreen();
+ app.exec();
+
+ return 0;
+}
diff --git a/tests/benchmarks/declarative/painting/paintbenchmark.pro b/tests/benchmarks/declarative/painting/paintbenchmark.pro
new file mode 100644
index 0000000000..2f98e8bc28
--- /dev/null
+++ b/tests/benchmarks/declarative/painting/paintbenchmark.pro
@@ -0,0 +1,13 @@
+######################################################################
+# Automatically generated by qmake (2.01a) fr 29. jan 13:57:52 2010
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += paintbenchmark.cpp
+QT += opengl
+CONFIG += console
diff --git a/tests/benchmarks/declarative/pointers/pointers.pro b/tests/benchmarks/declarative/pointers/pointers.pro
new file mode 100644
index 0000000000..5180a2a9d1
--- /dev/null
+++ b/tests/benchmarks/declarative/pointers/pointers.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+QT += declarative
+TEMPLATE = app
+TARGET = tst_pointers
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_pointers.cpp
+
diff --git a/tests/benchmarks/declarative/pointers/tst_pointers.cpp b/tests/benchmarks/declarative/pointers/tst_pointers.cpp
new file mode 100644
index 0000000000..7257bee118
--- /dev/null
+++ b/tests/benchmarks/declarative/pointers/tst_pointers.cpp
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include "private/qdeclarativeguard_p.h"
+#include <QWeakPointer>
+
+class tst_pointers : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_pointers() {}
+
+private slots:
+ void qmlguard();
+ void weakPointer();
+};
+
+void tst_pointers::qmlguard()
+{
+ QObject *obj = new QObject;
+ QBENCHMARK {
+ QDeclarativeGuard<QObject> guardedObject;
+ guardedObject = obj;
+ }
+}
+
+void tst_pointers::weakPointer()
+{
+ QObject *obj = new QObject;
+ QBENCHMARK {
+ QWeakPointer<QObject> guardedObject;
+ guardedObject = obj;
+ }
+}
+
+QTEST_MAIN(tst_pointers)
+#include "tst_pointers.moc"
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject.qml
new file mode 100644
index 0000000000..9c3f7f8281
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject.qml
@@ -0,0 +1,3 @@
+import Qt.test 4.6
+
+MyQmlObject {}
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject_binding.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject_binding.qml
new file mode 100644
index 0000000000..e6cc4cf473
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject_binding.qml
@@ -0,0 +1,6 @@
+import Qt.test 4.6
+
+MyQmlObject {
+ result: value
+}
+
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml
new file mode 100644
index 0000000000..0d2d49b75c
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml
@@ -0,0 +1,3 @@
+import Qt 4.6
+
+QtObject {}
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml
new file mode 100644
index 0000000000..dc29f151b8
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+QtObject {
+ id: blah
+}
+
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml
new file mode 100644
index 0000000000..e48194a7e3
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml
@@ -0,0 +1,55 @@
+import Qt 4.6
+
+Item { id:block
+ property bool dying: false
+ property bool spawned: false
+ property int type: 0
+ property int targetX: 0
+ property int targetY: 0
+
+ SpringFollow on x { enabled: spawned; source: targetX; spring: 2; damping: 0.2 }
+ SpringFollow on y { source: targetY; spring: 2; damping: 0.2 }
+
+ Image { id: img
+ source: {
+ if(type == 0){
+ "pics/redStone.png";
+ } else if(type == 1) {
+ "pics/blueStone.png";
+ } else {
+ "pics/greenStone.png";
+ }
+ }
+ opacity: 0
+ Behavior on opacity { NumberAnimation { duration: 200 } }
+ anchors.fill: parent
+ }
+
+ Particles { id: particles
+ width:1; height:1; anchors.centerIn: parent;
+ emissionRate: 0;
+ lifeSpan: 700; lifeSpanDeviation: 600;
+ angle: 0; angleDeviation: 360;
+ velocity: 100; velocityDeviation:30;
+ source: {
+ if(type == 0){
+ "pics/redStar.png";
+ } else if (type == 1) {
+ "pics/blueStar.png";
+ } else {
+ "pics/greenStar.png";
+ }
+ }
+ }
+
+ states: [
+ State{ name: "AliveState"; when: spawned == true && dying == false
+ PropertyChanges { target: img; opacity: 1 }
+ },
+ State{ name: "DeathState"; when: dying == true
+ StateChangeScript { script: particles.burst(50); }
+ PropertyChanges { target: img; opacity: 0 }
+ StateChangeScript { script: block.destroy(1000); }
+ }
+ ]
+}
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/blueStar.png b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/blueStar.png
new file mode 100644
index 0000000000..ff9588f80a
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/blueStar.png
Binary files differ
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/blueStone.png b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/blueStone.png
new file mode 100644
index 0000000000..bf342e0362
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/blueStone.png
Binary files differ
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/greenStar.png b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/greenStar.png
new file mode 100644
index 0000000000..cd06854719
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/greenStar.png
Binary files differ
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/greenStone.png b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/greenStone.png
new file mode 100644
index 0000000000..5ac14a5a81
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/greenStone.png
Binary files differ
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/redStar.png b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/redStar.png
new file mode 100644
index 0000000000..0a4dffe583
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/redStar.png
Binary files differ
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/redStone.png b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/redStone.png
new file mode 100644
index 0000000000..b099f6007a
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/redStone.png
Binary files differ
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/yellowStone.png b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/yellowStone.png
new file mode 100644
index 0000000000..c56124a895
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/yellowStone.png
Binary files differ
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml
new file mode 100644
index 0000000000..27c5646f63
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml
@@ -0,0 +1,15 @@
+import Qt 4.6
+
+QtObject {
+ property int a
+ property bool b
+ property double c
+ property real d
+ property string e
+ property url f
+ property color g
+ property date h
+ property var i
+ property variant j
+}
+
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml
new file mode 100644
index 0000000000..d08f35bb54
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+QtObject {
+ property int a
+}
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro b/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
new file mode 100644
index 0000000000..30ef23572e
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
@@ -0,0 +1,22 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = tst_qdeclarativecomponent
+QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativecomponent.cpp testtypes.cpp
+HEADERS += testtypes.h
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
+
+symbian* {
+ data.sources = data/*
+ data.path = data
+ samegame.sources = data/samegame/*
+ samegame.path = data/samegame
+ samegame_pics.sources = data/samegame/pics/*
+ samegame_pics.path = data/samegame/pics
+ DEPLOYMENT += data samegame samegame_pics
+}
+
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.cpp b/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.cpp
new file mode 100644
index 0000000000..acdc395f5f
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "testtypes.h"
+
+void registerTypes()
+{
+ QML_REGISTER_TYPE(Qt.test, 4, 6, MyQmlObject, MyQmlObject);
+}
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.h b/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.h
new file mode 100644
index 0000000000..523f94dd09
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef TESTTYPES_H
+#define TESTTYPES_H
+
+#include <QtCore/qobject.h>
+#include <QtDeclarative/qdeclarative.h>
+
+class MyQmlObject : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int result READ result WRITE setResult);
+ Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged);
+ Q_PROPERTY(MyQmlObject *object READ object WRITE setObject NOTIFY objectChanged);
+ Q_PROPERTY(QDeclarativeListProperty<QObject> data READ data);
+ Q_CLASSINFO("DefaultProperty", "data");
+public:
+ MyQmlObject() : m_result(0), m_value(0), m_object(0) {}
+
+ int result() const { return m_result; }
+ void setResult(int r) { m_result = r; }
+
+ int value() const { return m_value; }
+ void setValue(int v) { m_value = v; emit valueChanged(); }
+
+ QDeclarativeListProperty<QObject> data() { return QDeclarativeListProperty<QObject>(this, m_data); }
+
+ MyQmlObject *object() const { return m_object; }
+ void setObject(MyQmlObject *o) { m_object = o; emit objectChanged(); }
+
+signals:
+ void valueChanged();
+ void objectChanged();
+
+private:
+ QList<QObject *> m_data;
+ int m_result;
+ int m_value;
+ MyQmlObject *m_object;
+};
+QML_DECLARE_TYPE(MyQmlObject);
+
+void registerTypes();
+
+#endif // TESTTYPES_H
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
new file mode 100644
index 0000000000..4b1456ed31
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
@@ -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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QFile>
+#include <QDebug>
+#include "testtypes.h"
+
+//TESTED_FILES=
+
+
+class tst_qmlcomponent : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_qmlcomponent();
+ virtual ~tst_qmlcomponent();
+
+public slots:
+ void initTestCase();
+ void cleanupTestCase();
+
+private slots:
+ void creation_data();
+ void creation();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+tst_qmlcomponent::tst_qmlcomponent()
+{
+}
+
+tst_qmlcomponent::~tst_qmlcomponent()
+{
+}
+
+void tst_qmlcomponent::initTestCase()
+{
+ registerTypes();
+}
+
+void tst_qmlcomponent::cleanupTestCase()
+{
+}
+
+void tst_qmlcomponent::creation_data()
+{
+ QTest::addColumn<QString>("file");
+
+ QTest::newRow("Object") << SRCDIR "/data/object.qml";
+ QTest::newRow("Object - Id") << SRCDIR "/data/object_id.qml";
+ QTest::newRow("MyQmlObject") << SRCDIR "/data/myqmlobject.qml";
+ QTest::newRow("MyQmlObject: basic binding") << SRCDIR "/data/myqmlobject_binding.qml";
+ QTest::newRow("Synthesized properties") << SRCDIR "/data/synthesized_properties.qml";
+ QTest::newRow("Synthesized properties.2") << SRCDIR "/data/synthesized_properties.2.qml";
+ QTest::newRow("SameGame - BoomBlock") << SRCDIR "/data/samegame/BoomBlock.qml";
+}
+
+void tst_qmlcomponent::creation()
+{
+ QFETCH(QString, file);
+
+ QDeclarativeComponent c(&engine, file);
+ QVERIFY(c.isReady());
+
+ QObject *obj = c.create();
+ delete obj;
+
+ QBENCHMARK {
+ QObject *obj = c.create();
+ delete obj;
+ }
+}
+
+QTEST_MAIN(tst_qmlcomponent)
+#include "tst_qdeclarativecomponent.moc"
diff --git a/tests/benchmarks/declarative/qdeclarativeimage/image.png b/tests/benchmarks/declarative/qdeclarativeimage/image.png
new file mode 100644
index 0000000000..623d36233d
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativeimage/image.png
Binary files differ
diff --git a/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro b/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro
new file mode 100644
index 0000000000..bbe4e8d012
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro
@@ -0,0 +1,16 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = tst_qdeclarativeimage
+QT += declarative
+macx:CONFIG -= app_bundle
+CONFIG += release
+
+SOURCES += tst_qdeclarativeimage.cpp
+
+symbian* {
+ data.sources = image.png
+ data.path = .
+ DEPLOYMENT += data
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
diff --git a/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
new file mode 100644
index 0000000000..4bba022659
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <private/qdeclarativeimage_p.h>
+
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+// Application private dir is default serach path for files, so SRCDIR can be set to empty
+#define SRCDIR ""
+#endif
+
+class tst_qmlgraphicsimage : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qmlgraphicsimage() {}
+
+private slots:
+ void qmlgraphicsimage();
+ void qmlgraphicsimage_file();
+ void qmlgraphicsimage_url();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+void tst_qmlgraphicsimage::qmlgraphicsimage()
+{
+ int x = 0;
+ QUrl url("image.png");
+ QBENCHMARK {
+ QUrl url2("http://localhost/image" + QString::number(x++) + ".png");
+ QDeclarativeImage *image = new QDeclarativeImage;
+ QDeclarativeEngine::setContextForObject(image, engine.rootContext());
+ delete image;
+ }
+}
+
+void tst_qmlgraphicsimage::qmlgraphicsimage_file()
+{
+ int x = 0;
+ QUrl url("image.png");
+ QBENCHMARK {
+ QUrl url2("http://localhost/image" + QString::number(x++) + ".png");
+ QDeclarativeImage *image = new QDeclarativeImage;
+ QDeclarativeEngine::setContextForObject(image, engine.rootContext());
+ image->setSource(url);
+ delete image;
+ }
+}
+
+void tst_qmlgraphicsimage::qmlgraphicsimage_url()
+{
+ int x = 0;
+ QUrl url("image.png");
+ QBENCHMARK {
+ QUrl url2("http://localhost/image" + QString::number(x++) + ".png");
+ QDeclarativeImage *image = new QDeclarativeImage;
+ QDeclarativeEngine::setContextForObject(image, engine.rootContext());
+ image->setSource(url2);
+ delete image;
+ }
+}
+
+QTEST_MAIN(tst_qmlgraphicsimage)
+
+#include "tst_qdeclarativeimage.moc"
diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml b/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml
new file mode 100644
index 0000000000..11b95e1a06
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml
@@ -0,0 +1,3 @@
+import Qt 4.6
+
+Item {}
diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml b/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml
new file mode 100644
index 0000000000..a923a0af4d
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+Item {
+ property int blah
+}
+
diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro b/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro
new file mode 100644
index 0000000000..79fdd262cd
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro
@@ -0,0 +1,10 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = tst_qdeclarativemetaproperty
+QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativemetaproperty.cpp
+
+# Define SRCDIR equal to test's source directory
+DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp b/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp
new file mode 100644
index 0000000000..8a5f4aea73
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QDeclarativeProperty>
+#include <QFile>
+#include <QDebug>
+
+//TESTED_FILES=
+
+
+class tst_qmlmetaproperty : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_qmlmetaproperty();
+ virtual ~tst_qmlmetaproperty();
+
+public slots:
+ void init();
+ void cleanup();
+
+private slots:
+ void lookup_data();
+ void lookup();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+tst_qmlmetaproperty::tst_qmlmetaproperty()
+{
+}
+
+tst_qmlmetaproperty::~tst_qmlmetaproperty()
+{
+}
+
+void tst_qmlmetaproperty::init()
+{
+}
+
+void tst_qmlmetaproperty::cleanup()
+{
+}
+
+void tst_qmlmetaproperty::lookup_data()
+{
+ QTest::addColumn<QString>("file");
+
+ QTest::newRow("Simple Object") << SRCDIR "/data/object.qml";
+ QTest::newRow("Synthesized Object") << SRCDIR "/data/synthesized_object.qml";
+}
+
+void tst_qmlmetaproperty::lookup()
+{
+ QFETCH(QString, file);
+
+ QDeclarativeComponent c(&engine, file);
+ QVERIFY(c.isReady());
+
+ QObject *obj = c.create();
+
+ QBENCHMARK {
+ QDeclarativeProperty p(obj, "x");
+ }
+
+ delete obj;
+}
+
+QTEST_MAIN(tst_qmlmetaproperty)
+#include "tst_qdeclarativemetaproperty.moc"
diff --git a/tests/benchmarks/declarative/qdeclarativetime/example.qml b/tests/benchmarks/declarative/qdeclarativetime/example.qml
new file mode 100644
index 0000000000..dd6185d8b8
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/example.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+
+ property string name: "Bob Smith"
+
+ QDeclarativeTime.Timer {
+ component: Item {
+ Text { text: name }
+ }
+ }
+}
+
diff --git a/tests/benchmarks/declarative/qdeclarativetime/qdeclarativetime.cpp b/tests/benchmarks/declarative/qdeclarativetime/qdeclarativetime.cpp
new file mode 100644
index 0000000000..a9243373c4
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/qdeclarativetime.cpp
@@ -0,0 +1,231 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QDebug>
+#include <QApplication>
+#include <QTime>
+#include <QDeclarativeContext>
+#include <QGraphicsScene>
+#include <QGraphicsRectItem>
+
+class Timer : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QDeclarativeComponent *component READ component WRITE setComponent);
+
+public:
+ Timer();
+
+ QDeclarativeComponent *component() const;
+ void setComponent(QDeclarativeComponent *);
+
+ static Timer *timerInstance();
+
+ void run(uint);
+
+ bool willParent() const;
+ void setWillParent(bool p);
+
+private:
+ void runTest(QDeclarativeContext *, uint);
+
+ QDeclarativeComponent *m_component;
+ static Timer *m_timer;
+
+ bool m_willparent;
+ QGraphicsScene m_scene;
+ QGraphicsRectItem m_item;
+};
+QML_DECLARE_TYPE(Timer);
+
+Timer *Timer::m_timer = 0;
+
+Timer::Timer()
+: m_component(0), m_willparent(false)
+{
+ if (m_timer)
+ qWarning("Timer: Timer already registered");
+ m_timer = this;
+
+ m_scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+ m_scene.addItem(&m_item);
+}
+
+QDeclarativeComponent *Timer::component() const
+{
+ return m_component;
+}
+
+void Timer::setComponent(QDeclarativeComponent *c)
+{
+ m_component = c;
+}
+
+Timer *Timer::timerInstance()
+{
+ return m_timer;
+}
+
+void Timer::run(uint iterations)
+{
+ QDeclarativeContext context(qmlContext(this));
+
+ QObject *o = m_component->create(&context);
+ QGraphicsObject *go = qobject_cast<QGraphicsObject *>(o);
+ if (m_willparent && go)
+ go->setParentItem(&m_item);
+ delete o;
+
+ runTest(&context, iterations);
+}
+
+bool Timer::willParent() const
+{
+ return m_willparent;
+}
+
+void Timer::setWillParent(bool p)
+{
+ m_willparent = p;
+}
+
+void Timer::runTest(QDeclarativeContext *context, uint iterations)
+{
+ QTime t;
+ t.start();
+ for (uint ii = 0; ii < iterations; ++ii) {
+ QObject *o = m_component->create(context);
+ QGraphicsObject *go = qobject_cast<QGraphicsObject *>(o);
+ if (m_willparent && go)
+ go->setParentItem(&m_item);
+ delete o;
+ }
+
+ int e = t.elapsed();
+
+ qWarning() << "Total:" << e << "ms, Per iteration:" << qreal(e) / qreal(iterations) << "ms";
+
+}
+
+void usage(const char *name)
+{
+ qWarning("Usage: %s [-iterations <count>] [-parent] <qml file>", name);
+ exit(-1);
+}
+
+int main(int argc, char ** argv)
+{
+ QApplication app(argc, argv);
+
+ QML_REGISTER_TYPE(QDeclarativeTime, 1, 0, Timer, Timer);
+
+ uint iterations = 1024;
+ QString filename;
+ bool willParent = false;
+
+ for (int ii = 1; ii < argc; ++ii) {
+ QByteArray arg(argv[ii]);
+
+ if (arg == "-iterations") {
+ if (ii + 1 < argc) {
+ ++ii;
+ QByteArray its(argv[ii]);
+ bool ok = false;
+ iterations = its.toUInt(&ok);
+ if (!ok)
+ usage(argv[0]);
+ } else {
+ usage(argv[0]);
+ }
+ } else if (arg == "-parent") {
+ willParent = true;
+ } else {
+ filename = QLatin1String(argv[ii]);
+ }
+ }
+
+ if (filename.isEmpty())
+#ifdef Q_OS_SYMBIAN
+ filename = QLatin1String("./tests/item_creation/data.qml");
+#else
+ usage(argv[0]);
+#endif
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, filename);
+ if (component.isError()) {
+ qWarning() << component.errors();
+ return -1;
+ }
+
+ QObject *obj = component.create();
+ if (!obj) {
+ qWarning() << component.errors();
+ return -1;
+ }
+
+ Timer *timer = Timer::timerInstance();
+ if (!timer) {
+ qWarning() << "A Tester.Timer instance is required.";
+ return -1;
+ }
+
+#ifdef Q_OS_SYMBIAN
+ willParent = true;
+#endif
+ timer->setWillParent(willParent);
+
+ if (!timer->component()) {
+ qWarning() << "The timer has no component";
+ return -1;
+ }
+
+#ifdef Q_OS_SYMBIAN
+ iterations = 1024;
+#endif
+
+ timer->run(iterations);
+
+ return 0;
+}
+
+#include "qdeclarativetime.moc"
diff --git a/tests/benchmarks/declarative/qdeclarativetime/qdeclarativetime.pro b/tests/benchmarks/declarative/qdeclarativetime/qdeclarativetime.pro
new file mode 100644
index 0000000000..7902ee1d8c
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/qdeclarativetime.pro
@@ -0,0 +1,23 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = qdeclarativetime
+QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += qdeclarativetime.cpp
+
+symbian* {
+ TARGET.CAPABILITY = "All -TCB"
+ example.sources = example.qml
+ esample.path = .
+ tests.sources = tests/*
+ tests.path = tests
+ anshors.sources = tests/anchors/*
+ anchors.path = tests/anchors
+ item_creation.sources = tests/item_creation/*
+ item_creation.path = tests/item_creation
+ positioner_creation.sources = tests/positioner_creation/*
+ positioner_creation.path = tests/positioner_creation
+ DEPLOYMENT += example tests anchors item_creation positioner_creation
+}
+
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/anchors/empty.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/anchors/empty.qml
new file mode 100644
index 0000000000..8d93594989
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/anchors/empty.qml
@@ -0,0 +1,34 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+
+ QDeclarativeTime.Timer {
+ component: Component {
+ Item {
+ Item {
+ anchors.leftMargin: 0
+ }
+ Item {
+ anchors.leftMargin: 0
+ }
+ Item {
+ anchors.leftMargin: 0
+ }
+ Item {
+ anchors.leftMargin: 0
+ }
+ Item {
+ anchors.leftMargin: 0
+ }
+ Item {
+ anchors.leftMargin: 0
+ }
+ Item {
+ anchors.leftMargin: 0
+ }
+ }
+ }
+ }
+}
+
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/anchors/fill.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/anchors/fill.qml
new file mode 100644
index 0000000000..918c48ae80
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/anchors/fill.qml
@@ -0,0 +1,41 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+
+ QDeclarativeTime.Timer {
+ component: Component {
+ Item {
+ Item {
+ anchors.fill: parent
+ anchors.leftMargin: 0
+ }
+ Item {
+ anchors.fill: parent
+ anchors.leftMargin: 0
+ }
+ Item {
+ anchors.fill: parent
+ anchors.leftMargin: 0
+ }
+ Item {
+ anchors.fill: parent
+ anchors.leftMargin: 0
+ }
+ Item {
+ anchors.fill: parent
+ anchors.leftMargin: 0
+ }
+ Item {
+ anchors.fill: parent
+ anchors.leftMargin: 0
+ }
+ Item {
+ anchors.fill: parent
+ anchors.leftMargin: 0
+ }
+ }
+ }
+ }
+}
+
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/anchors/null.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/anchors/null.qml
new file mode 100644
index 0000000000..bb845382ef
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/anchors/null.qml
@@ -0,0 +1,27 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+
+ QDeclarativeTime.Timer {
+ component: Component {
+ Item {
+ Item {
+ }
+ Item {
+ }
+ Item {
+ }
+ Item {
+ }
+ Item {
+ }
+ Item {
+ }
+ Item {
+ }
+ }
+ }
+ }
+}
+
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/item_creation/children.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/item_creation/children.qml
new file mode 100644
index 0000000000..3387a32833
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/item_creation/children.qml
@@ -0,0 +1,34 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+
+ QDeclarativeTime.Timer {
+ component: Component {
+ Item {
+ children: [
+ Rectangle { },
+ Rectangle { },
+ Item { },
+ Image { },
+ Text { },
+ Item { },
+ Item { },
+ Image { },
+ Image { },
+ Row { },
+ Image { },
+ Image { },
+ Column { },
+ Row { },
+ Text { },
+ Text { },
+ Text { },
+ MouseArea { }
+ ]
+
+ }
+ }
+ }
+
+}
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/item_creation/data.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/item_creation/data.qml
new file mode 100644
index 0000000000..a8b653cfa9
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/item_creation/data.qml
@@ -0,0 +1,34 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+
+ QDeclarativeTime.Timer {
+ component: Component {
+ Item {
+ data: [
+ Rectangle { },
+ Rectangle { },
+ Item { },
+ Image { },
+ Text { },
+ Item { },
+ Item { },
+ Image { },
+ Image { },
+ Row { },
+ Image { },
+ Image { },
+ Column { },
+ Row { },
+ Text { },
+ Text { },
+ Text { },
+ MouseArea { }
+ ]
+
+ }
+ }
+ }
+
+}
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/item_creation/no_creation.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/item_creation/no_creation.qml
new file mode 100644
index 0000000000..0a507d4413
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/item_creation/no_creation.qml
@@ -0,0 +1,12 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+
+ QDeclarativeTime.Timer {
+ component: Component {
+ Item {
+ }
+ }
+ }
+}
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/item_creation/resources.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/item_creation/resources.qml
new file mode 100644
index 0000000000..227d8ad594
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/item_creation/resources.qml
@@ -0,0 +1,34 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+
+ QDeclarativeTime.Timer {
+ component: Component {
+ Item {
+ resources: [
+ Rectangle { },
+ Rectangle { },
+ Item { },
+ Image { },
+ Text { },
+ Item { },
+ Item { },
+ Image { },
+ Image { },
+ Row { },
+ Image { },
+ Image { },
+ Column { },
+ Row { },
+ Text { },
+ Text { },
+ Text { },
+ MouseArea { }
+ ]
+
+ }
+ }
+ }
+
+}
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/positioner_creation/no_positioner.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/positioner_creation/no_positioner.qml
new file mode 100644
index 0000000000..c1f54a41e7
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/positioner_creation/no_positioner.qml
@@ -0,0 +1,37 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+ QDeclarativeTime.Timer {
+ component: Component {
+ Item {
+ Rectangle { }
+ Rectangle { }
+ Item {
+ Image { }
+ Text { }
+ }
+
+ Item {
+ Item {
+ Image { }
+ Image { }
+ Item {
+ Image { }
+ Image { }
+ }
+ }
+
+ Item {
+ Item {
+ Text { }
+ Text { }
+ }
+ Text { }
+ }
+ }
+ MouseArea { }
+ }
+ }
+ }
+}
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/positioner_creation/null_positioner.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/positioner_creation/null_positioner.qml
new file mode 100644
index 0000000000..d49ff78024
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/positioner_creation/null_positioner.qml
@@ -0,0 +1,34 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+ QDeclarativeTime.Timer {
+ component: Component {
+ Item {
+ Rectangle { }
+ Rectangle { }
+ Item {
+ Image { }
+ Text { }
+ }
+
+ Item {
+ Item {
+ Image { }
+ Image { }
+ Row { }
+ Image { }
+ Image { }
+ }
+
+ Column { }
+ Row { }
+ Text { }
+ Text { }
+ Text { }
+ }
+ MouseArea { }
+ }
+ }
+ }
+}
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/positioner_creation/positioner.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/positioner_creation/positioner.qml
new file mode 100644
index 0000000000..05ca8044de
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/positioner_creation/positioner.qml
@@ -0,0 +1,37 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+ QDeclarativeTime.Timer {
+ component: Component {
+ Item {
+ Rectangle { }
+ Rectangle { }
+ Item {
+ Image { }
+ Text { }
+ }
+
+ Item {
+ Item {
+ Image { }
+ Image { }
+ Row {
+ Image { }
+ Image { }
+ }
+ }
+
+ Column {
+ Row {
+ Text { }
+ Text { }
+ }
+ Text { }
+ }
+ }
+ MouseArea { }
+ }
+ }
+ }
+}
diff --git a/tests/benchmarks/declarative/script/data/CustomObject.qml b/tests/benchmarks/declarative/script/data/CustomObject.qml
new file mode 100644
index 0000000000..22b7be7bbf
--- /dev/null
+++ b/tests/benchmarks/declarative/script/data/CustomObject.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+QtObject {
+ property real prop1: 0
+ property real prop2: 1
+ property real prop3: 0
+}
diff --git a/tests/benchmarks/declarative/script/data/block.qml b/tests/benchmarks/declarative/script/data/block.qml
new file mode 100644
index 0000000000..bb03d8d409
--- /dev/null
+++ b/tests/benchmarks/declarative/script/data/block.qml
@@ -0,0 +1,34 @@
+import Qt 4.6
+
+Rectangle {
+ width: 200; height: 200
+ CustomObject { id: theObject }
+ function doSomethingDirect() {
+ theObject.prop1 = 0;
+
+ for (var i = 0; i < 60; ++i)
+ theObject.prop1 += theObject.prop2;
+
+ theObject.prop3 = theObject.prop1;
+ }
+
+ function doSomethingLocalObj() {
+ theObject.prop1 = 0;
+
+ var incrementObj = theObject;
+ for (var i = 0; i < 60; ++i)
+ incrementObj.prop1 += incrementObj.prop2;
+
+ incrementObj.prop3 = incrementObj.prop1;
+ }
+
+ function doSomethingLocal() {
+ theObject.prop1 = 0;
+
+ var increment = theObject.prop2;
+ for (var i = 0; i < 60; ++i)
+ theObject.prop1 += increment;
+
+ theObject.prop3 = theObject.prop1;
+ }
+}
diff --git a/tests/benchmarks/declarative/script/data/signal_args.qml b/tests/benchmarks/declarative/script/data/signal_args.qml
new file mode 100644
index 0000000000..f02acc08ca
--- /dev/null
+++ b/tests/benchmarks/declarative/script/data/signal_args.qml
@@ -0,0 +1,6 @@
+import Qt.test 1.0
+
+TestObject {
+ onMySignalWithArgs: { var a = n; return a; }
+}
+
diff --git a/tests/benchmarks/declarative/script/data/signal_qml.qml b/tests/benchmarks/declarative/script/data/signal_qml.qml
new file mode 100644
index 0000000000..ba53603542
--- /dev/null
+++ b/tests/benchmarks/declarative/script/data/signal_qml.qml
@@ -0,0 +1,6 @@
+import Qt.test 1.0
+
+TestObject {
+ onMySignal: { var a = 1; return a; }
+}
+
diff --git a/tests/benchmarks/declarative/script/data/signal_unconnected.qml b/tests/benchmarks/declarative/script/data/signal_unconnected.qml
new file mode 100644
index 0000000000..53d06d5421
--- /dev/null
+++ b/tests/benchmarks/declarative/script/data/signal_unconnected.qml
@@ -0,0 +1,4 @@
+import Qt.test 1.0
+
+TestObject {
+}
diff --git a/tests/benchmarks/declarative/script/data/signal_unusedArgs.qml b/tests/benchmarks/declarative/script/data/signal_unusedArgs.qml
new file mode 100644
index 0000000000..3ff9071cab
--- /dev/null
+++ b/tests/benchmarks/declarative/script/data/signal_unusedArgs.qml
@@ -0,0 +1,6 @@
+import Qt.test 1.0
+
+TestObject {
+ onMySignalWithArgs: { var a = 1; return a; }
+}
+
diff --git a/tests/benchmarks/declarative/script/data/slot_complex.qml b/tests/benchmarks/declarative/script/data/slot_complex.qml
new file mode 100644
index 0000000000..d71120dff1
--- /dev/null
+++ b/tests/benchmarks/declarative/script/data/slot_complex.qml
@@ -0,0 +1,16 @@
+import Qt.test 1.0
+
+TestObject {
+ function myCustomFunction(b) {
+ var n = b;
+ var a = 1;
+ while (n > 0) {
+ a = a * n;
+ n--;
+ }
+ return a;
+ }
+
+ onMySignal: { for (var ii = 0; ii < 10000; ++ii) { myCustomFunction(10); } }
+}
+
diff --git a/tests/benchmarks/declarative/script/data/slot_complex_js.qml b/tests/benchmarks/declarative/script/data/slot_complex_js.qml
new file mode 100644
index 0000000000..ed4f78b92a
--- /dev/null
+++ b/tests/benchmarks/declarative/script/data/slot_complex_js.qml
@@ -0,0 +1,18 @@
+import Qt.test 1.0
+
+TestObject {
+ Script {
+ function myCustomFunction(n) {
+ var a = 1;
+ while (n > 0) {
+ a = a * n;
+ n--;
+ }
+ return a;
+ }
+ }
+
+ onMySignal: { for (var ii = 0; ii < 10000; ++ii) { myCustomFunction(10); } }
+}
+
+
diff --git a/tests/benchmarks/declarative/script/data/slot_simple.qml b/tests/benchmarks/declarative/script/data/slot_simple.qml
new file mode 100644
index 0000000000..4ba98d72c2
--- /dev/null
+++ b/tests/benchmarks/declarative/script/data/slot_simple.qml
@@ -0,0 +1,9 @@
+import Qt.test 1.0
+
+TestObject {
+ function myCustomFunction() {
+ return 0;
+ }
+
+ onMySignal: { for (var ii = 0; ii < 10000; ++ii) { myCustomFunction(); } }
+}
diff --git a/tests/benchmarks/declarative/script/data/slot_simple_js.qml b/tests/benchmarks/declarative/script/data/slot_simple_js.qml
new file mode 100644
index 0000000000..a88265c074
--- /dev/null
+++ b/tests/benchmarks/declarative/script/data/slot_simple_js.qml
@@ -0,0 +1,13 @@
+import Qt.test 1.0
+
+TestObject {
+
+ Script {
+ function myCustomFunction() {
+ return 0;
+ }
+ }
+
+ onMySignal: { for (var ii = 0; ii < 10000; ++ii) { myCustomFunction(); } }
+}
+
diff --git a/tests/benchmarks/declarative/script/script.pro b/tests/benchmarks/declarative/script/script.pro
new file mode 100644
index 0000000000..6255acc27e
--- /dev/null
+++ b/tests/benchmarks/declarative/script/script.pro
@@ -0,0 +1,20 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = tst_script
+QT += declarative script
+macx:CONFIG -= app_bundle
+CONFIG += release
+
+SOURCES += tst_script.cpp
+
+symbian* {
+ data.sources = data/*
+ data.path = data
+ DEPLOYMENT += data
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
+
+
+
+
diff --git a/tests/benchmarks/declarative/script/tst_script.cpp b/tests/benchmarks/declarative/script/tst_script.cpp
new file mode 100644
index 0000000000..9dd40761d7
--- /dev/null
+++ b/tests/benchmarks/declarative/script/tst_script.cpp
@@ -0,0 +1,631 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <private/qdeclarativeengine_p.h>
+#include <private/qdeclarativeobjectscriptclass_p.h>
+#include <private/qdeclarativerectangle_p.h>
+#include <QScriptEngine>
+#include <QScriptValue>
+
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+// Application private dir is default serach path for files, so SRCDIR can be set to empty
+#define SRCDIR "."
+#endif
+
+class tst_script : public QObject
+{
+ Q_OBJECT
+public:
+ tst_script() {}
+
+private slots:
+ void initTestCase();
+
+ void property_js();
+ void property_getter();
+ void property_getter_js();
+ void property_getter_qobject();
+ void property_getter_qmetaproperty();
+ void property_qobject();
+ void property_qmlobject();
+
+ void function_js();
+ void function_cpp();
+ void function_qobject();
+ void function_qmlobject();
+
+ void function_args_js();
+ void function_args_cpp();
+ void function_args_qobject();
+ void function_args_qmlobject();
+
+ void signal_unconnected();
+ void signal_qml();
+ void signal_args();
+ void signal_unusedArgs();
+
+ void slot_simple();
+ void slot_simple_js();
+ void slot_complex();
+ void slot_complex_js();
+
+ void block_data();
+ void block();
+private:
+};
+
+inline QUrl TEST_FILE(const QString &filename)
+{
+ return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename);
+}
+
+class TestObject : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int x READ x)
+
+public:
+ TestObject(QObject *parent = 0);
+
+ int x();
+
+ void emitMySignal() { emit mySignal(); }
+ void emitMySignalWithArgs(int n) { emit mySignalWithArgs(n); }
+
+signals:
+ void mySignal();
+ void mySignalWithArgs(int n);
+
+public slots:
+ int method() {
+ return x();
+ }
+
+ int methodArgs(int val) {
+ return val + x();
+ }
+
+private:
+ int m_x;
+};
+QML_DECLARE_TYPE(TestObject);
+
+TestObject::TestObject(QObject *parent)
+: QObject(parent), m_x(0)
+{
+}
+
+int TestObject::x()
+{
+ return m_x++;
+}
+
+void tst_script::initTestCase()
+{
+ QML_REGISTER_TYPE(Qt.test, 1, 0, TestObject, TestObject);
+}
+
+
+#define PROPERTY_PROGRAM \
+ "(function(testObject) { return (function() { " \
+ " var test = 0; " \
+ " for (var ii = 0; ii < 10000; ++ii) { " \
+ " test += testObject.x; " \
+ " } " \
+ " return test; " \
+ "}); })"
+
+void tst_script::property_js()
+{
+ QScriptEngine engine;
+
+ QScriptValue v = engine.newObject();
+ v.setProperty(QLatin1String("x"), 10);
+
+ QScriptValueList args;
+ args << v;
+ QScriptValue prog = engine.evaluate(PROPERTY_PROGRAM).call(engine.globalObject(), args);
+ prog.call();
+
+ QBENCHMARK {
+ prog.call().toNumber();
+ }
+}
+
+static QScriptValue property_getter_method(QScriptContext *, QScriptEngine *engine)
+{
+ static int x = 0;
+ return QScriptValue(engine,x++);
+}
+
+void tst_script::property_getter()
+{
+ QScriptEngine engine;
+
+ QScriptValue v = engine.newObject();
+ v.setProperty(QLatin1String("x"), engine.newFunction(property_getter_method),
+ QScriptValue::PropertyGetter);
+
+ QScriptValueList args;
+ args << v;
+ QScriptValue prog = engine.evaluate(PROPERTY_PROGRAM).call(engine.globalObject(), args);
+ prog.call();
+
+ QBENCHMARK {
+ prog.call();
+ }
+}
+
+static TestObject *property_getter_qobject_object = 0;
+static QScriptValue property_getter_qobject_method(QScriptContext *, QScriptEngine *)
+{
+ static int idx = -1;
+ if (idx == -1)
+ idx = TestObject::staticMetaObject.indexOfProperty("x");
+
+ int value = 0;
+ void *args[] = { &value, 0 };
+ QMetaObject::metacall(property_getter_qobject_object, QMetaObject::ReadProperty, idx, args);
+
+ return QScriptValue(value);
+}
+
+static QScriptValue property_getter_qmetaproperty_method(QScriptContext *, QScriptEngine *)
+{
+ static int idx = -1;
+ if (idx == -1)
+ idx = TestObject::staticMetaObject.indexOfProperty("x");
+
+ int value = 0;
+ value = property_getter_qobject_object->metaObject()->property(idx).read(property_getter_qobject_object).toInt();
+
+ return QScriptValue(value);
+}
+
+void tst_script::property_getter_qobject()
+{
+ QScriptEngine engine;
+
+ TestObject to;
+ property_getter_qobject_object = &to;
+ QScriptValue v = engine.newObject();
+ v.setProperty(QLatin1String("x"), engine.newFunction(property_getter_qobject_method),
+ QScriptValue::PropertyGetter);
+
+ QScriptValueList args;
+ args << v;
+ QScriptValue prog = engine.evaluate(PROPERTY_PROGRAM).call(engine.globalObject(), args);
+ prog.call();
+
+ QBENCHMARK {
+ prog.call();
+ }
+ property_getter_qobject_object = 0;
+}
+
+void tst_script::property_getter_qmetaproperty()
+{
+ QScriptEngine engine;
+
+ TestObject to;
+ property_getter_qobject_object = &to;
+ QScriptValue v = engine.newObject();
+ v.setProperty(QLatin1String("x"), engine.newFunction(property_getter_qmetaproperty_method),
+ QScriptValue::PropertyGetter);
+
+ QScriptValueList args;
+ args << v;
+ QScriptValue prog = engine.evaluate(PROPERTY_PROGRAM).call(engine.globalObject(), args);
+ prog.call();
+
+ QBENCHMARK {
+ prog.call();
+ }
+ property_getter_qobject_object = 0;
+}
+
+
+void tst_script::property_getter_js()
+{
+ QScriptEngine engine;
+
+ QScriptValue v = engine.evaluate("(function() { var o = new Object; o._x = 0; o.__defineGetter__(\"x\", function() { return this._x++; }); return o; })").call();
+
+ QScriptValueList args;
+ args << v;
+ QScriptValue prog = engine.evaluate(PROPERTY_PROGRAM).call(engine.globalObject(), args);
+ prog.call();
+
+ QBENCHMARK {
+ prog.call();
+ }
+}
+
+void tst_script::property_qobject()
+{
+ QScriptEngine engine;
+
+ TestObject to;
+ QScriptValue v = engine.newQObject(&to);
+
+ QScriptValueList args;
+ args << v;
+ QScriptValue prog = engine.evaluate(PROPERTY_PROGRAM).call(engine.globalObject(), args);
+ prog.call();
+
+ QBENCHMARK {
+ prog.call();
+ }
+}
+
+void tst_script::property_qmlobject()
+{
+ QDeclarativeEngine qmlengine;
+
+ QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(&qmlengine);
+ TestObject to;
+
+ QScriptValue v = QDeclarativeEnginePrivate::get(&qmlengine)->objectClass->newQObject(&to);
+
+ QScriptValueList args;
+ args << v;
+ QScriptValue prog = engine->evaluate(PROPERTY_PROGRAM).call(engine->globalObject(), args);
+ prog.call();
+
+ QBENCHMARK {
+ prog.call();
+ }
+}
+
+#define FUNCTION_PROGRAM \
+ "(function(testObject) { return (function() { " \
+ " var test = 0; " \
+ " for (var ii = 0; ii < 10000; ++ii) { " \
+ " test += testObject.method(); " \
+ " } " \
+ " return test; " \
+ "}); })"
+
+void tst_script::function_js()
+{
+ QScriptEngine engine;
+
+ QScriptValue v = engine.evaluate("(function() { var o = new Object; o._x = 0; o.method = (function() { return this._x++; }); return o; })").call();
+
+ QScriptValueList args;
+ args << v;
+ QScriptValue prog = engine.evaluate(FUNCTION_PROGRAM).call(engine.globalObject(), args);
+ prog.call();
+
+ QBENCHMARK {
+ prog.call();
+ }
+}
+
+static QScriptValue function_method(QScriptContext *, QScriptEngine *)
+{
+ static int x = 0;
+ return QScriptValue(x++);
+}
+
+void tst_script::function_cpp()
+{
+ QScriptEngine engine;
+
+ QScriptValue v = engine.newObject();
+ v.setProperty(QLatin1String("method"), engine.newFunction(function_method));
+
+ QScriptValueList args;
+ args << v;
+ QScriptValue prog = engine.evaluate(FUNCTION_PROGRAM).call(engine.globalObject(), args);
+ prog.call();
+
+ QBENCHMARK {
+ prog.call();
+ }
+}
+
+void tst_script::function_qobject()
+{
+ QScriptEngine engine;
+
+ TestObject to;
+ QScriptValue v = engine.newQObject(&to);
+
+ QScriptValueList args;
+ args << v;
+ QScriptValue prog = engine.evaluate(FUNCTION_PROGRAM).call(engine.globalObject(), args);
+ prog.call();
+
+ QBENCHMARK {
+ prog.call();
+ }
+}
+
+void tst_script::function_qmlobject()
+{
+ QDeclarativeEngine qmlengine;
+
+ QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(&qmlengine);
+ TestObject to;
+
+ QScriptValue v = QDeclarativeEnginePrivate::get(&qmlengine)->objectClass->newQObject(&to);
+
+ QScriptValueList args;
+ args << v;
+ QScriptValue prog = engine->evaluate(FUNCTION_PROGRAM).call(engine->globalObject(), args);
+ prog.call();
+
+ QBENCHMARK {
+ prog.call();
+ }
+}
+
+#define FUNCTION_ARGS_PROGRAM \
+ "(function(testObject) { return (function() { " \
+ " var test = 0; " \
+ " for (var ii = 0; ii < 10000; ++ii) { " \
+ " test += testObject.methodArgs(ii); " \
+ " } " \
+ " return test; " \
+ "}); })"
+
+void tst_script::function_args_js()
+{
+ QScriptEngine engine;
+
+ QScriptValue v = engine.evaluate("(function() { var o = new Object; o._x = 0; o.methodArgs = (function(a) { return a + this._x++; }); return o; })").call();
+
+ QScriptValueList args;
+ args << v;
+ QScriptValue prog = engine.evaluate(FUNCTION_ARGS_PROGRAM).call(engine.globalObject(), args);
+ prog.call();
+
+ QBENCHMARK {
+ prog.call();
+ }
+}
+
+static QScriptValue function_args_method(QScriptContext *ctxt, QScriptEngine *)
+{
+ static int x = 0;
+ return QScriptValue(ctxt->argument(0).toNumber() + x++);
+}
+
+void tst_script::function_args_cpp()
+{
+ QScriptEngine engine;
+
+ QScriptValue v = engine.newObject();
+ v.setProperty(QLatin1String("methodArgs"), engine.newFunction(function_args_method));
+
+ QScriptValueList args;
+ args << v;
+ QScriptValue prog = engine.evaluate(FUNCTION_ARGS_PROGRAM).call(engine.globalObject(), args);
+ prog.call();
+
+ QBENCHMARK {
+ prog.call();
+ }
+}
+
+void tst_script::function_args_qobject()
+{
+ QScriptEngine engine;
+
+ TestObject to;
+ QScriptValue v = engine.newQObject(&to);
+
+ QScriptValueList args;
+ args << v;
+ QScriptValue prog = engine.evaluate(FUNCTION_ARGS_PROGRAM).call(engine.globalObject(), args);
+ prog.call();
+
+ QBENCHMARK {
+ prog.call();
+ }
+}
+
+void tst_script::function_args_qmlobject()
+{
+ QDeclarativeEngine qmlengine;
+
+ QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(&qmlengine);
+ TestObject to;
+
+ QScriptValue v = QDeclarativeEnginePrivate::get(&qmlengine)->objectClass->newQObject(&to);
+
+ QScriptValueList args;
+ args << v;
+ QScriptValue prog = engine->evaluate(FUNCTION_ARGS_PROGRAM).call(engine->globalObject(), args);
+ prog.call();
+
+ QBENCHMARK {
+ prog.call();
+ }
+}
+
+void tst_script::signal_unconnected()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, TEST_FILE("signal_unconnected.qml"));
+ TestObject *object = qobject_cast<TestObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QBENCHMARK {
+ object->emitMySignal();
+ }
+
+ delete object;
+}
+
+void tst_script::signal_qml()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, TEST_FILE("signal_qml.qml"));
+ TestObject *object = qobject_cast<TestObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QBENCHMARK {
+ object->emitMySignal();
+ }
+
+ delete object;
+}
+
+void tst_script::signal_args()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, TEST_FILE("signal_args.qml"));
+ TestObject *object = qobject_cast<TestObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QBENCHMARK {
+ object->emitMySignalWithArgs(11);
+ }
+
+ delete object;
+}
+
+void tst_script::signal_unusedArgs()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, TEST_FILE("signal_unusedArgs.qml"));
+ TestObject *object = qobject_cast<TestObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QBENCHMARK {
+ object->emitMySignalWithArgs(11);
+ }
+
+ delete object;
+}
+
+void tst_script::slot_simple()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, TEST_FILE("slot_simple.qml"));
+ TestObject *object = qobject_cast<TestObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QBENCHMARK {
+ object->emitMySignal();
+ }
+
+ delete object;
+}
+
+void tst_script::slot_simple_js()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, TEST_FILE("slot_simple_js.qml"));
+ TestObject *object = qobject_cast<TestObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QBENCHMARK {
+ object->emitMySignal();
+ }
+
+ delete object;
+}
+
+void tst_script::slot_complex()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, TEST_FILE("slot_complex.qml"));
+ TestObject *object = qobject_cast<TestObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QBENCHMARK {
+ object->emitMySignal();
+ }
+
+ delete object;
+}
+
+void tst_script::slot_complex_js()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, TEST_FILE("slot_complex_js.qml"));
+ TestObject *object = qobject_cast<TestObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QBENCHMARK {
+ object->emitMySignal();
+ }
+
+ delete object;
+}
+
+void tst_script::block_data()
+{
+ QTest::addColumn<QString>("methodName");
+ QTest::newRow("direct") << "doSomethingDirect()";
+ QTest::newRow("localObj") << "doSomethingLocalObj()";
+ QTest::newRow("local") << "doSomethingLocal()";
+}
+
+void tst_script::block()
+{
+ QFETCH(QString, methodName);
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, TEST_FILE("block.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle *>(component.create());
+ QVERIFY(rect != 0);
+
+ int index = rect->metaObject()->indexOfMethod(methodName.toUtf8());
+ QVERIFY(index != -1);
+ QMetaMethod method = rect->metaObject()->method(index);
+
+ QBENCHMARK {
+ method.invoke(rect, Qt::DirectConnection);
+ }
+
+ delete rect;
+}
+
+QTEST_MAIN(tst_script)
+
+#include "tst_script.moc"
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
index faacec4506..01285d1bc4 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
diff --git a/tests/benchmarks/gui/painting/painting.pro b/tests/benchmarks/gui/painting/painting.pro
index 878567d4d3..76c26c1627 100644
--- a/tests/benchmarks/gui/painting/painting.pro
+++ b/tests/benchmarks/gui/painting/painting.pro
@@ -2,4 +2,6 @@ TEMPLATE = subdirs
SUBDIRS = \
qpainter \
qregion \
- qtransform
+ qtransform \
+ qtracebench \
+ qtbench
diff --git a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
index 39b2244eaf..d570bb3aa8 100644
--- a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
@@ -1395,7 +1395,7 @@ void tst_QPainter::drawTransformedImageRoundedRect()
}
}
-//code from QmlGraphicsRectangle for drawing rounded rects
+//code from QDeclarativeRectangle for drawing rounded rects
void tst_QPainter::drawBorderPixmapRoundedRect()
{
//setup image
@@ -1446,7 +1446,7 @@ void tst_QPainter::drawScaledBorderPixmapRoundedRect_data()
// QTest::newRow(QString(QLatin1String("scale=%1; imagetype=ARGB8565_Pre")).arg(i).toLatin1()) << i << (int)QImage::Format_ARGB8565_Premultiplied;
}
-//code from QmlGraphicsRectangle for drawing rounded rects
+//code from QDeclarativeRectangle for drawing rounded rects
void tst_QPainter::drawScaledBorderPixmapRoundedRect()
{
QFETCH(float, scale);
@@ -1502,7 +1502,7 @@ void tst_QPainter::drawTransformedBorderPixmapRoundedRect_data()
}
-//code from QmlGraphicsRectangle for drawing rounded rects
+//code from QDeclarativeRectangle for drawing rounded rects
void tst_QPainter::drawTransformedBorderPixmapRoundedRect()
{
QFETCH(QTransform, transform);
diff --git a/tests/benchmarks/gui/painting/qtbench/benchmarktests.h b/tests/benchmarks/gui/painting/qtbench/benchmarktests.h
new file mode 100644
index 0000000000..362d121262
--- /dev/null
+++ b/tests/benchmarks/gui/painting/qtbench/benchmarktests.h
@@ -0,0 +1,841 @@
+/****************************************************************************
+**
+** 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 FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BENCHMARKTESTS_H
+#define BENCHMARKTESTS_H
+
+#include <QApplication>
+#include <QTextDocument>
+#include <QDesktopWidget>
+#include <QTextLayout>
+#include <QFontMetrics>
+#include <QDebug>
+
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
+# include <QStaticText>
+#endif
+
+class Benchmark
+{
+public:
+ virtual ~Benchmark() {}
+
+ Benchmark(const QSize &size)
+ : m_size(size)
+ {
+ for (int i=0; i<16; ++i) {
+ m_colors[i] = QColor::fromRgbF((rand() % 4) / 3.0,
+ (rand() % 4) / 3.0,
+ (rand() % 4) / 3.0,
+ 1);
+ }
+ }
+
+ virtual void draw(QPainter *p, const QRect &rect, int iteration) = 0;
+ virtual QString name() const = 0;
+
+ inline const QSize &size() const
+ {
+ return m_size;
+ }
+ virtual void begin(QPainter *, int iterations = 1) { Q_UNUSED(iterations); }
+ virtual void end(QPainter *) { }
+
+ inline const QColor &randomColor(int i) { return m_colors[i % 16]; }
+
+protected:
+ QColor m_colors[16];
+ QSize m_size;
+};
+
+class PaintingRectAdjuster
+{
+public:
+ PaintingRectAdjuster()
+ : m_benchmark(0),
+ m_bounds(),
+ m_screen_filled(false)
+ {
+ }
+
+ const QRect &newPaintingRect() {
+ m_rect.translate(m_rect.width(), 0);
+
+ if (m_rect.right() > m_bounds.width()) {
+ m_rect.moveLeft(m_bounds.left());
+ m_rect.translate(0,m_rect.height());
+ if (m_rect.bottom() > m_bounds.height()) {
+ m_screen_filled = true;
+ m_rect.moveTo(m_bounds.topLeft());
+ }
+ }
+ return m_rect;
+ }
+
+ inline bool isScreenFilled() const
+ { return m_screen_filled; }
+
+ void reset(const QRect &bounds)
+ {
+ m_bounds = bounds;
+ m_rect.moveTo(m_bounds.topLeft());
+ m_rect = QRect(m_bounds.topLeft(),m_benchmark->size());
+ m_rect.translate(-m_rect.width(),0);
+ m_screen_filled = false;
+ }
+
+ inline void setNewBenchmark( Benchmark *benchmark )
+ {
+ m_benchmark = benchmark;
+ }
+
+protected:
+ Benchmark *m_benchmark;
+ QRect m_rect;
+ QRect m_bounds;
+ bool m_screen_filled;
+};
+
+class FillRectBenchmark : public Benchmark
+{
+public:
+ FillRectBenchmark(int size)
+ : Benchmark(QSize(size, size))
+ {
+ }
+
+ virtual void draw(QPainter *p, const QRect &rect, int iterationCount) {
+ p->fillRect(rect, randomColor(iterationCount));
+ }
+
+ virtual QString name() const {
+ return QString::fromLatin1("fillRect(%1)").arg(m_size.width());
+ }
+};
+
+class ImageFillRectBenchmark : public Benchmark
+{
+public:
+ ImageFillRectBenchmark(int size)
+ : Benchmark(QSize(size, size))
+ {
+ int s = rand() % 24 + 8;
+ m_content = QImage(s, s, QImage::Format_ARGB32_Premultiplied);
+ QPainter p(&m_content);
+ p.fillRect(0, 0, s, s, Qt::white);
+ p.fillRect(s/2, 0, s/2, s/2, Qt::gray);
+ p.fillRect(0, s/2, s/2, s/2, Qt::gray);
+ p.end();
+
+ m_brush = QBrush(m_content);
+ }
+
+ virtual void draw(QPainter *p, const QRect &rect, int) {
+ p->fillRect(rect, m_brush);
+ }
+
+ virtual QString name() const {
+ return QString::fromLatin1("fillRect with image(%1)").arg(m_size.width());
+ }
+
+private:
+ QImage m_content;
+ QBrush m_brush;
+};
+
+
+class DrawRectBenchmark : public Benchmark
+{
+public:
+ DrawRectBenchmark(int size)
+ : Benchmark(QSize(size, size))
+ {
+ }
+
+ virtual void begin(QPainter *p, int) {
+ p->setPen(Qt::NoPen);
+ p->setBrush(randomColor(m_size.width()));
+ }
+
+
+ virtual void draw(QPainter *p, const QRect &rect, int) {
+ p->drawRect(rect);
+ }
+
+ virtual QString name() const {
+ return QString::fromLatin1("drawRect(%1)").arg(m_size.width());
+ }
+};
+
+
+class DrawRectWithBrushChangeBenchmark : public Benchmark
+{
+public:
+ DrawRectWithBrushChangeBenchmark(int size)
+ : Benchmark(QSize(size, size))
+ {
+ }
+
+ virtual void begin(QPainter *p, int) {
+ p->setPen(Qt::NoPen);
+ }
+
+
+ virtual void draw(QPainter *p, const QRect &rect, int i) {
+ p->setBrush(randomColor(i));
+ p->drawRect(rect);
+ }
+
+ virtual QString name() const {
+ return QString::fromLatin1("drawRect with brushchange(%1)").arg(m_size.width());
+ }
+};
+
+class RoundRectBenchmark : public Benchmark
+{
+public:
+ RoundRectBenchmark(int size)
+ : Benchmark(QSize(size, size))
+ {
+ m_roundness = size / 4.;
+ }
+
+ virtual void begin(QPainter *p, int) {
+ p->setPen(Qt::NoPen);
+ p->setBrush(Qt::red);
+ }
+
+ virtual void draw(QPainter *p, const QRect &rect, int) {
+ p->drawRoundedRect(rect, m_roundness, m_roundness);
+ }
+
+ virtual QString name() const {
+ return QString::fromLatin1("drawRoundedRect(%1)").arg(m_size.width());
+ }
+
+ qreal m_roundness;
+};
+
+
+class ArcsBenchmark : public Benchmark
+{
+public:
+ enum Type {
+ Stroked = 0x0001,
+ Filled = 0x0002,
+
+ ArcShape = 0x0010,
+ ChordShape = 0x0020,
+ PieShape = 0x0040,
+ CircleShape = 0x0080,
+ Shapes = 0x00f0
+
+ };
+
+ ArcsBenchmark(int size, uint type)
+ : Benchmark(QSize(size, size)),
+ m_type(type)
+ {
+ }
+
+ virtual void begin(QPainter *p, int) {
+ if (m_type & Stroked)
+ p->setPen(Qt::black);
+ else
+ p->setPen(Qt::NoPen);
+
+ if (m_type & Filled)
+ p->setBrush(Qt::red);
+ else
+ p->setBrush(Qt::NoBrush);
+ }
+
+ virtual void draw(QPainter *p, const QRect &rect, int) {
+ switch (m_type & Shapes) {
+ case ArcShape:
+ p->drawArc(rect, 45*16, 120*16);
+ break;
+ case ChordShape:
+ p->drawChord(rect, 45*16, 120*16);
+ break;
+ case PieShape:
+ p->drawPie(rect, 45*16, 120*16);
+ break;
+ case CircleShape:
+ p->drawEllipse(rect);
+ break;
+ }
+ }
+
+ virtual QString name() const {
+ QString fillStroke;
+
+ if ((m_type & (Stroked|Filled)) == (Stroked|Filled)) {
+ fillStroke = QLatin1String("Fill & Outline");
+ } else if (m_type & Stroked) {
+ fillStroke = QLatin1String("Outline");
+ } else if (m_type & Filled) {
+ fillStroke = QLatin1String("Fill");
+ }
+
+ QString shape;
+ if (m_type & PieShape) shape = QLatin1String("drawPie");
+ else if (m_type & ChordShape) shape = QLatin1String("drawChord");
+ else if (m_type & ArcShape) shape = QLatin1String("drawArc");
+ else if (m_type & CircleShape) shape = QLatin1String("drawEllipse");
+
+ return QString::fromLatin1("%1(%2) %3").arg(shape).arg(m_size.width()).arg(fillStroke);
+ }
+
+ uint m_type;
+};
+
+
+class DrawScaledImage : public Benchmark
+{
+public:
+ DrawScaledImage(const QImage &image, qreal scale, bool asPixmap)
+ : Benchmark(QSize(image.width(), image.height())),
+ m_image(image),
+ m_type(m_as_pixmap ? "Pixmap" : "Image"),
+ m_scale(scale),
+ m_as_pixmap(asPixmap)
+ {
+ m_pixmap = QPixmap::fromImage(m_image);
+ }
+ DrawScaledImage(const QString& type, const QPixmap &pixmap, qreal scale)
+ : Benchmark(QSize(pixmap.width(), pixmap.height())),
+ m_type(type),
+ m_scale(scale),
+ m_as_pixmap(true),
+ m_pixmap(pixmap)
+ {
+ }
+
+ virtual void begin(QPainter *p, int) {
+ p->scale(m_scale, m_scale);
+ }
+
+ virtual void draw(QPainter *p, const QRect &rect, int) {
+ if (m_as_pixmap)
+ p->drawPixmap(rect.topLeft(), m_pixmap);
+ else
+ p->drawImage(rect.topLeft(), m_image);
+ }
+
+ virtual QString name() const {
+ return QString::fromLatin1("draw%4(%1) at scale=%2, depth=%3")
+ .arg(m_size.width())
+ .arg(m_scale)
+ .arg(m_as_pixmap ? m_pixmap.depth() : m_image.depth())
+ .arg(m_type);
+ }
+
+private:
+ QImage m_image;
+ QString m_type;
+ qreal m_scale;
+ bool m_as_pixmap;
+ QPixmap m_pixmap;
+};
+
+class DrawTransformedImage : public Benchmark
+{
+public:
+ DrawTransformedImage(const QImage &image, bool asPixmap)
+ : Benchmark(QSize(image.width(), image.height())),
+ m_image(image),
+ m_type(m_as_pixmap ? "Pixmap" : "Image"),
+ m_as_pixmap(asPixmap)
+ {
+ m_pixmap = QPixmap::fromImage(m_image);
+ }
+ DrawTransformedImage(const QString& type, const QPixmap &pixmap)
+ : Benchmark(QSize(pixmap.width(), pixmap.height())),
+ m_type(type),
+ m_as_pixmap(true),
+ m_pixmap(pixmap)
+ {
+ }
+
+ virtual void draw(QPainter *p, const QRect &rect, int) {
+ QTransform oldTransform = p->transform();
+ p->translate(0.5 * rect.width() + rect.left(), 0.5 * rect.height() + rect.top());
+ p->shear(0.25, 0.0);
+ p->rotate(5.0);
+ if (m_as_pixmap)
+ p->drawPixmap(-0.5 * rect.width(), -0.5 * rect.height(), m_pixmap);
+ else
+ p->drawImage(-0.5 * rect.width(), -0.5 * rect.height(), m_image);
+ p->setTransform(oldTransform);
+ }
+
+ virtual QString name() const {
+ return QString::fromLatin1("draw%3(%1) w/transform, depth=%2")
+ .arg(m_size.width())
+ .arg(m_as_pixmap ? m_pixmap.depth() : m_image.depth())
+ .arg(m_type);
+ }
+
+private:
+ QImage m_image;
+ QString m_type;
+ bool m_as_pixmap;
+ QPixmap m_pixmap;
+};
+
+
+class DrawImage : public Benchmark
+{
+public:
+ DrawImage(const QImage &image, bool asPixmap)
+ : Benchmark(QSize(image.width(), image.height())),
+ m_image(image),
+ m_type(m_as_pixmap ? "Pixmap" : "Image"),
+ m_as_pixmap(asPixmap)
+ {
+ m_pixmap = QPixmap::fromImage(image);
+ }
+ DrawImage(const QString& type, const QPixmap &pixmap)
+ : Benchmark(QSize(pixmap.width(), pixmap.height())),
+ m_type(type),
+ m_as_pixmap(true),
+ m_pixmap(pixmap)
+ {
+ }
+
+ virtual void draw(QPainter *p, const QRect &rect, int) {
+ if (m_as_pixmap)
+ p->drawPixmap(rect.topLeft(), m_pixmap);
+ else
+ p->drawImage(rect.topLeft(), m_image);
+ }
+
+ virtual QString name() const {
+ return QString::fromLatin1("draw%2(%1), depth=%3")
+ .arg(m_size.width())
+ .arg(m_type)
+ .arg(m_as_pixmap ? m_pixmap.depth() : m_image.depth());
+ }
+
+private:
+ QImage m_image;
+ QString m_type;
+ bool m_as_pixmap;
+ QPixmap m_pixmap;
+};
+
+
+class DrawText : public Benchmark
+{
+public:
+ enum Mode {
+ PainterMode,
+ PainterQPointMode,
+ LayoutMode,
+ DocumentMode,
+ PixmapMode
+
+#if QT_VERSION >= 0x040700
+ , StaticTextMode,
+ StaticTextWithMaximumSizeMode,
+ StaticTextBackendOptimizations
+#endif
+ };
+
+ DrawText(const QString &text, Mode mode)
+ : Benchmark(QSize()), m_mode(mode), m_text(text), m_document(text), m_layout(text)
+ {
+ }
+
+ virtual void begin(QPainter *p, int iterations) {
+#if QT_VERSION >= 0x040700
+ m_staticTexts.clear();
+ m_currentStaticText = 0;
+#else
+ Q_UNUSED(iterations);
+#endif
+ m_pixmaps.clear();
+ m_currentPixmap = 0;
+ QRect m_bounds = QRect(0,0,p->device()->width(), p->device()->height());
+ switch (m_mode) {
+ case PainterMode:
+ m_size = (p->boundingRect(m_bounds, 0, m_text)).size();
+// m_rect = m_rect.translated(-m_rect.topLeft());
+ break;
+ case DocumentMode:
+ m_size = QSize(m_document.size().toSize());
+ break;
+ case PixmapMode:
+ for (int i=0; i<4; ++i) {
+ m_size = (p->boundingRect(m_bounds, 0, m_text)).size();
+ QPixmap pixmap = QPixmap(m_size);
+ pixmap.fill(Qt::transparent);
+ {
+ QPainter p(&pixmap);
+ p.drawText(pixmap.rect(), m_text);
+ }
+ m_pixmaps.append(pixmap);
+ }
+ break;
+
+ case LayoutMode: {
+ QRect r = p->boundingRect(m_bounds, 0, m_text);
+ QStringList lines = m_text.split('\n');
+ int height = 0;
+ int leading = p->fontMetrics().leading();
+ m_layout.beginLayout();
+ for (int i=0; i<lines.size(); ++i) {
+ QTextLine textLine = m_layout.createLine();
+ if (textLine.isValid()) {
+ textLine.setLineWidth(r.width());
+ textLine.setPosition(QPointF(0, height));
+ height += leading + textLine.height();
+ }
+ }
+ m_layout.endLayout();
+ m_layout.setCacheEnabled(true);
+ m_size = m_layout.boundingRect().toRect().size();
+ break; }
+
+#if QT_VERSION >= 0x040700
+ case StaticTextWithMaximumSizeMode: {
+ QStaticText staticText;
+ m_size = (p->boundingRect(m_bounds, 0, m_text)).size();
+ staticText.setMaximumSize(m_size + QSize(10, 10));
+ staticText.setText(m_text);
+ staticText.prepare(p->transform(), p->font());
+ m_staticTexts.append(staticText);
+ break;
+ }
+ case StaticTextBackendOptimizations: {
+ m_size = (p->boundingRect(m_bounds, 0, m_text)).size();
+ for (int i=0; i<iterations; ++i) {
+ QStaticText staticText;
+ staticText.setPerformanceHint(QStaticText::AggressiveCaching);
+ staticText.setMaximumSize(m_size + QSize(10, 10));
+ staticText.setText(m_text);
+ staticText.prepare(p->transform(), p->font());
+ m_staticTexts.append(staticText);
+ }
+
+ break;
+ }
+ case StaticTextMode: {
+ QStaticText staticText;
+ staticText.setText(m_text);
+ staticText.prepare(p->transform(), p->font());
+ m_staticTexts.append(staticText);
+
+ QFontMetrics fm(p->font());
+ m_size = QSize(fm.width(m_text, m_text.length()), fm.height());
+
+ break;
+ }
+#endif
+
+ case PainterQPointMode: {
+ QFontMetrics fm(p->font());
+ m_size = QSize(fm.width(m_text, m_text.length()), fm.height());
+ break;
+ }
+
+ }
+ }
+
+ virtual void draw(QPainter *p, const QRect &rect, int)
+ {
+ switch (m_mode) {
+ case PainterMode:
+ p->drawText(rect, 0, m_text);
+ break;
+ case PainterQPointMode:
+ p->drawText(rect.topLeft(), m_text);
+ break;
+ case PixmapMode:
+ p->drawPixmap(rect.topLeft(), m_pixmaps.at(m_currentPixmap));
+ m_currentPixmap = (m_currentPixmap + 1) % m_pixmaps.size();
+ break;
+ case DocumentMode:
+ p->translate(rect.topLeft());
+ m_document.drawContents(p);
+ p->translate(-rect.topLeft());
+ break;
+ case LayoutMode:
+ m_layout.draw(p, rect.topLeft());
+ break;
+
+#if QT_VERSION >= 0x040700
+ case StaticTextWithMaximumSizeMode:
+ case StaticTextMode:
+ p->drawStaticText(rect.topLeft(), m_staticTexts.at(0));
+ break;
+ case StaticTextBackendOptimizations:
+ p->drawStaticText(rect.topLeft(), m_staticTexts.at(m_currentStaticText));
+ m_currentStaticText = (m_currentStaticText + 1) % m_staticTexts.size();
+ break;
+#endif
+ }
+ }
+
+ virtual QString name() const {
+ int letters = m_text.length();
+ int lines = m_text.count('\n');
+ if (lines == 0)
+ lines = 1;
+ QString type;
+ switch (m_mode) {
+ case PainterMode: type = "drawText(rect)"; break;
+ case PainterQPointMode: type = "drawText(point)"; break;
+ case LayoutMode: type = "layout.draw()"; break;
+ case DocumentMode: type = "doc.drawContents()"; break;
+ case PixmapMode: type = "pixmap cached text"; break;
+
+#if QT_VERSION >= 0x040700
+ case StaticTextMode: type = "drawStaticText()"; break;
+ case StaticTextWithMaximumSizeMode: type = "drawStaticText() w/ maxsize"; break;
+ case StaticTextBackendOptimizations: type = "drawStaticText() w/ backend optimizations"; break;
+#endif
+ }
+
+ return QString::fromLatin1("%3, len=%1, lines=%2")
+ .arg(letters)
+ .arg(lines)
+ .arg(type);
+ }
+
+private:
+ Mode m_mode;
+ QString m_text;
+ QTextDocument m_document;
+ QTextLayout m_layout;
+
+ QList<QPixmap> m_pixmaps;
+ int m_currentPixmap;
+
+#if QT_VERSION >= 0x040700
+ int m_currentStaticText;
+ QList<QStaticText> m_staticTexts;
+#endif
+};
+
+
+
+
+class ClippedDrawRectBenchmark : public Benchmark
+{
+public:
+ enum ClipType {
+ RectClip,
+ TwoRectRegionClip,
+ EllipseRegionClip,
+ TwoRectPathClip,
+ EllipsePathClip,
+ AAEllipsePathClip,
+ EllipseRegionThenRectClip,
+ EllipsePathThenRectClip
+ };
+
+ ClippedDrawRectBenchmark(int size, ClipType type)
+ : Benchmark(QSize(size, size)), m_type(type)
+ {
+ }
+
+ virtual void begin(QPainter *p, int) {
+ QRect m_bounds = QRect(0,0,p->device()->width(), p->device()->height());
+ p->setPen(Qt::NoPen);
+ p->setBrush(Qt::red);
+
+ switch (m_type) {
+ case RectClip:
+ p->setClipRect(m_bounds.adjusted(1, 1, -1, -1));
+ break;
+ case TwoRectRegionClip:
+ p->setClipRegion(QRegion(m_bounds.adjusted(0, 0, -1, -1))
+ | QRegion(m_bounds.adjusted(1, 1, 0, 0)));
+ break;
+ case EllipseRegionClip:
+ p->setClipRegion(QRegion(m_bounds, QRegion::Ellipse));
+ break;
+ case TwoRectPathClip:
+ {
+ QPainterPath path;
+ path.addRect(m_bounds.adjusted(0, 0, -1, -1));
+ path.addRect(m_bounds.adjusted(1, 1, 0, 0));
+ path.setFillRule(Qt::WindingFill);
+ p->setClipPath(path);
+ }
+ break;
+ case EllipsePathClip:
+ {
+ QPainterPath path;
+ path.addEllipse(m_bounds);
+ p->setClipPath(path);
+ }
+ break;
+ case AAEllipsePathClip:
+ {
+ QPainterPath path;
+ path.addEllipse(m_bounds);
+ p->setRenderHint(QPainter::Antialiasing);
+ p->setClipPath(path);
+ p->setRenderHint(QPainter::Antialiasing, false);
+ }
+ break;
+ case EllipseRegionThenRectClip:
+ p->setClipRegion(QRegion(m_bounds, QRegion::Ellipse));
+ p->setClipRegion(QRegion(m_bounds.width() / 4,
+ m_bounds.height() / 4,
+ m_bounds.width() / 2,
+ m_bounds.height() / 2), Qt::IntersectClip);
+ break;
+ case EllipsePathThenRectClip:
+ {
+ QPainterPath path;
+ path.addEllipse(m_bounds);
+ p->setClipPath(path);
+ p->setClipRegion(QRegion(m_bounds.width() / 4,
+ m_bounds.height() / 4,
+ m_bounds.width() / 2,
+ m_bounds.height() / 2), Qt::IntersectClip);
+ }
+ break;
+ }
+ }
+
+ virtual void draw(QPainter *p, const QRect &rect, int) {
+ p->drawRect(rect);
+ }
+
+ virtual QString name() const {
+ QString namedType;
+ switch (m_type) {
+ case RectClip:
+ namedType = "rect";
+ break;
+ case TwoRectRegionClip:
+ namedType = "two-rect-region";
+ break;
+ case EllipseRegionClip:
+ namedType = "ellipse-region";
+ break;
+ case TwoRectPathClip:
+ namedType = "two-rect-path";
+ break;
+ case EllipsePathClip:
+ namedType = "ellipse-path";
+ break;
+ case AAEllipsePathClip:
+ namedType = "aa-ellipse-path";
+ break;
+ case EllipseRegionThenRectClip:
+ namedType = "ellipseregion&rect";
+ break;
+ case EllipsePathThenRectClip:
+ namedType = "ellipsepath&rect";
+ break;
+ }
+ return QString::fromLatin1("%1-clipped-drawRect(%2)").arg(namedType).arg(m_size.width());
+ }
+
+ ClipType m_type;
+};
+
+class LinesBenchmark : public Benchmark
+{
+public:
+ enum LineType {
+ Horizontal_Integer,
+ Diagonal_Integer,
+ Vertical_Integer,
+ Horizontal_Float,
+ Diagonal_Float,
+ Vertical_Float
+ };
+
+ LinesBenchmark(int length, LineType type)
+ : Benchmark(QSize(qAbs(length), qAbs(length))),
+ m_type(type),
+ m_length(length)
+ {
+
+ }
+
+ virtual void draw(QPainter *p, const QRect &rect, int) {
+ switch (m_type) {
+ case Horizontal_Integer:
+ p->drawLine(QLine(rect.x(), rect.y(), rect.x() + m_length, rect.y()));
+ break;
+ case Diagonal_Integer:
+ p->drawLine(QLine(rect.x(), rect.y(), rect.x() + m_length, rect.y() + m_length));
+ break;
+ case Vertical_Integer:
+ p->drawLine(QLine(rect.x() + 4, rect.y(), rect.x() + 4, rect.y() + m_length));
+ break;
+ case Horizontal_Float:
+ p->drawLine(QLineF(rect.x(), rect.y(), rect.x() + m_length, rect.y()));
+ break;
+ case Diagonal_Float:
+ p->drawLine(QLineF(rect.x(), rect.y(), rect.x() + m_length, rect.y() + m_length));
+ break;
+ case Vertical_Float:
+ p->drawLine(QLineF(rect.x() + 4, rect.y(), rect.x() + 4, rect.y() + m_length));
+ break;
+ }
+ }
+
+ virtual QString name() const {
+ const char *names[] = {
+ "Hor_I",
+ "Diag_I",
+ "Ver_I",
+ "Hor_F",
+ "Diag_F",
+ "Ver_F"
+ };
+ return QString::fromLatin1("drawLine(size=%1,type=%2)").arg(m_length).arg(names[m_type]);
+ }
+
+ LineType m_type;
+ int m_length;
+};
+
+#endif // BENCHMARKTESTS_H
diff --git a/tests/benchmarks/gui/painting/qtbench/qtbench.pro b/tests/benchmarks/gui/painting/qtbench/qtbench.pro
new file mode 100644
index 0000000000..91f416de79
--- /dev/null
+++ b/tests/benchmarks/gui/painting/qtbench/qtbench.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = tst_qtbench
+
+SOURCES += tst_qtbench.cpp
+
diff --git a/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp b/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp
new file mode 100644
index 0000000000..8eef472891
--- /dev/null
+++ b/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp
@@ -0,0 +1,254 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+
+#include <QtGui>
+
+#include "benchmarktests.h"
+
+//TESTED_FILES=
+
+class BenchWidget : public QWidget
+{
+public:
+ BenchWidget(Benchmark *benchmark);
+
+ void paintEvent(QPaintEvent *event);
+
+ bool done() const { return m_done; }
+ qreal result() const { return m_result; }
+
+public:
+ QTime timer;
+
+ Benchmark *m_benchmark;
+
+ bool m_done;
+ qreal m_result;
+
+ uint m_total;
+ uint m_iteration;
+
+ QVector<uint> iterationTimes;
+};
+
+void BenchWidget::paintEvent(QPaintEvent *)
+{
+ if (m_done)
+ return;
+
+ QPainter p(this);
+
+ m_benchmark->begin(&p, 100);
+
+ PaintingRectAdjuster adjuster;
+ adjuster.setNewBenchmark(m_benchmark);
+ adjuster.reset(rect());
+
+ for (int i = 0; i < 100; ++i)
+ m_benchmark->draw(&p, adjuster.newPaintingRect(), i);
+
+ m_benchmark->end(&p);
+
+ ++m_iteration;
+
+ uint currentElapsed = timer.isNull() ? 0 : timer.elapsed();
+ timer.restart();
+
+ m_total += currentElapsed;
+
+ // warm up for at most 5 iterations or half a second
+ if (m_iteration >= 5 || m_total >= 500) {
+ iterationTimes << currentElapsed;
+
+ if (iterationTimes.size() >= 5) {
+ qreal mean = 0;
+ qreal stddev = 0;
+ uint min = INT_MAX;
+
+ for (int i = 0; i < iterationTimes.size(); ++i) {
+ mean += iterationTimes.at(i);
+ min = qMin(min, iterationTimes.at(i));
+ }
+
+ mean /= qreal(iterationTimes.size());
+
+ for (int i = 0; i < iterationTimes.size(); ++i) {
+ qreal delta = iterationTimes.at(i) - mean;
+ stddev += delta * delta;
+ }
+
+ stddev = qSqrt(stddev / iterationTimes.size());
+
+ stddev = 100 * stddev / mean;
+ // do 50 iterations, break earlier if we spend more than 5 seconds or have a low std deviation after 2 seconds
+ if (iterationTimes.size() >= 50 || m_total >= 5000 || (m_total >= 2000 && stddev < 4)) {
+ m_result = min;
+ m_done = true;
+ return;
+ }
+ }
+ }
+}
+
+BenchWidget::BenchWidget(Benchmark *benchmark)
+ : m_benchmark(benchmark)
+ , m_done(false)
+ , m_result(0)
+ , m_total(0)
+ , m_iteration(0)
+{
+ setWindowTitle(benchmark->name());
+ resize(640, 480);
+}
+
+class tst_QtBench : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void qtBench();
+ void qtBench_data();
+};
+
+QString makeString(int length)
+{
+ const char chars[] = "abcd efgh ijkl mnop qrst uvwx yz!$. ABCD 1234";
+ int len = strlen(chars);
+
+ QString ret;
+ for (int j = 0; j < length; j++) {
+ ret += QChar(chars[(j * 97) % len]);
+ }
+
+ return ret;
+}
+
+void tst_QtBench::qtBench_data()
+{
+ QTest::addColumn<void *>("benchmark");
+
+ QString shortString = makeString(5);
+ QString middleString = makeString(50);
+ QString longString = makeString(35) + "\n"
+ + makeString(45) + "\n"
+ + makeString(75);
+ QString superLongString = "Lorem ipsum dolor sit am\n"
+ "et, consectetur adipisci\n"
+ "ng elit. Integer mi leo,\n"
+ "interdum ut congue at, p\n"
+ "ulvinar et tellus. Quisq\n"
+ "ue pretium eleifend laci\n"
+ "nia. Ut semper gravida l\n"
+ "ectus in commodo. Vestib\n"
+ "ulum pharetra arcu in en\n"
+ "im ultrices hendrerit. P\n"
+ "ellentesque habitant mor\n"
+ "bi tristique senectus et\n"
+ "netus et malesuada fames\n"
+ "ac turpis egestas. Ut er\n"
+ "os sem, feugiat in eleme\n"
+ "ntum in, porta sit amet \n"
+ "neque. Fusce mi tellus, \n"
+ "congue non dapibus eget,\n"
+ "pharetra quis quam. Duis\n"
+ "dui massa, pulvinar ac s\n"
+ "odales pharetra, dictum \n"
+ "in enim. Phasellus a nis\n"
+ "i erat, sed pellentesque\n"
+ "mi. Curabitur sed.";
+
+ QList<Benchmark *> benchmarks;
+ benchmarks << (new DrawText(shortString, DrawText::PainterMode));
+ benchmarks << (new DrawText(middleString, DrawText::PainterMode));
+ benchmarks << (new DrawText(longString, DrawText::PainterMode));
+ benchmarks << (new DrawText(superLongString, DrawText::PainterMode));
+
+ benchmarks << (new DrawText(shortString, DrawText::PainterQPointMode));
+ benchmarks << (new DrawText(middleString, DrawText::PainterQPointMode));
+ benchmarks << (new DrawText(longString, DrawText::PainterQPointMode));
+ benchmarks << (new DrawText(superLongString, DrawText::PainterQPointMode));
+
+ benchmarks << (new DrawText(shortString, DrawText::PixmapMode));
+ benchmarks << (new DrawText(middleString, DrawText::PixmapMode));
+ benchmarks << (new DrawText(longString, DrawText::PixmapMode));
+ benchmarks << (new DrawText(superLongString, DrawText::PixmapMode));
+
+#if QT_VERSION >= 0x040700
+ benchmarks << (new DrawText(shortString, DrawText::StaticTextMode));
+ benchmarks << (new DrawText(middleString, DrawText::StaticTextMode));
+ benchmarks << (new DrawText(longString, DrawText::StaticTextMode));
+ benchmarks << (new DrawText(superLongString, DrawText::StaticTextMode));
+
+ benchmarks << (new DrawText(shortString, DrawText::StaticTextWithMaximumSizeMode));
+ benchmarks << (new DrawText(middleString, DrawText::StaticTextWithMaximumSizeMode));
+ benchmarks << (new DrawText(longString, DrawText::StaticTextWithMaximumSizeMode));
+ benchmarks << (new DrawText(superLongString, DrawText::StaticTextWithMaximumSizeMode));
+
+ benchmarks << (new DrawText(shortString, DrawText::StaticTextBackendOptimizations));
+ benchmarks << (new DrawText(middleString, DrawText::StaticTextBackendOptimizations));
+ benchmarks << (new DrawText(longString, DrawText::StaticTextBackendOptimizations));
+ benchmarks << (new DrawText(superLongString, DrawText::StaticTextBackendOptimizations));
+#endif
+
+ foreach (Benchmark *benchmark, benchmarks)
+ QTest::newRow(qPrintable(benchmark->name())) << reinterpret_cast<void *>(benchmark);
+}
+
+void tst_QtBench::qtBench()
+{
+ QFETCH(void *, benchmark);
+
+ BenchWidget widget(reinterpret_cast<Benchmark *>(benchmark));
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ while (!widget.done()) {
+ widget.update();
+ QApplication::processEvents();
+ }
+
+ QTest::setBenchmarkResult(widget.result(), QTest::WalltimeMilliseconds);
+}
+
+QTEST_MAIN(tst_QtBench)
+#include "tst_qtbench.moc"
diff --git a/tests/benchmarks/gui/painting/qtracebench/qtracebench.pro b/tests/benchmarks/gui/painting/qtracebench/qtracebench.pro
new file mode 100644
index 0000000000..56ec8bbe4e
--- /dev/null
+++ b/tests/benchmarks/gui/painting/qtracebench/qtracebench.pro
@@ -0,0 +1,10 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = tst_qtracebench
+
+INCLUDEPATH += . $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src
+
+RESOURCES += qtracebench.qrc
+
+SOURCES += tst_qtracebench.cpp
+
diff --git a/tests/benchmarks/gui/painting/qtracebench/qtracebench.qrc b/tests/benchmarks/gui/painting/qtracebench/qtracebench.qrc
new file mode 100644
index 0000000000..5569550bc5
--- /dev/null
+++ b/tests/benchmarks/gui/painting/qtracebench/qtracebench.qrc
@@ -0,0 +1,10 @@
+<RCC>
+ <qresource>
+ <file>traces/basicdrawing.trace</file>
+ <file>traces/webkit.trace</file>
+ <file>traces/textedit.trace</file>
+ <file>traces/creator.trace</file>
+ <file>traces/qmlphoneconcept.trace</file>
+ <file>traces/qmlsamegame.trace</file>
+ </qresource>
+</RCC>
diff --git a/tests/benchmarks/gui/painting/qtracebench/traces/basicdrawing.trace b/tests/benchmarks/gui/painting/qtracebench/traces/basicdrawing.trace
new file mode 100644
index 0000000000..0241d08a97
--- /dev/null
+++ b/tests/benchmarks/gui/painting/qtracebench/traces/basicdrawing.trace
Binary files differ
diff --git a/tests/benchmarks/gui/painting/qtracebench/traces/creator.trace b/tests/benchmarks/gui/painting/qtracebench/traces/creator.trace
new file mode 100644
index 0000000000..55ee9e183e
--- /dev/null
+++ b/tests/benchmarks/gui/painting/qtracebench/traces/creator.trace
Binary files differ
diff --git a/tests/benchmarks/gui/painting/qtracebench/traces/qmlphoneconcept.trace b/tests/benchmarks/gui/painting/qtracebench/traces/qmlphoneconcept.trace
new file mode 100644
index 0000000000..835ebfa8fb
--- /dev/null
+++ b/tests/benchmarks/gui/painting/qtracebench/traces/qmlphoneconcept.trace
Binary files differ
diff --git a/tests/benchmarks/gui/painting/qtracebench/traces/qmlsamegame.trace b/tests/benchmarks/gui/painting/qtracebench/traces/qmlsamegame.trace
new file mode 100644
index 0000000000..1d76195443
--- /dev/null
+++ b/tests/benchmarks/gui/painting/qtracebench/traces/qmlsamegame.trace
Binary files differ
diff --git a/tests/benchmarks/gui/painting/qtracebench/traces/textedit.trace b/tests/benchmarks/gui/painting/qtracebench/traces/textedit.trace
new file mode 100644
index 0000000000..998716d6c1
--- /dev/null
+++ b/tests/benchmarks/gui/painting/qtracebench/traces/textedit.trace
Binary files differ
diff --git a/tests/benchmarks/gui/painting/qtracebench/traces/webkit.trace b/tests/benchmarks/gui/painting/qtracebench/traces/webkit.trace
new file mode 100644
index 0000000000..43e752d193
--- /dev/null
+++ b/tests/benchmarks/gui/painting/qtracebench/traces/webkit.trace
Binary files differ
diff --git a/tests/benchmarks/gui/painting/qtracebench/tst_qtracebench.cpp b/tests/benchmarks/gui/painting/qtracebench/tst_qtracebench.cpp
new file mode 100644
index 0000000000..ff2633dabf
--- /dev/null
+++ b/tests/benchmarks/gui/painting/qtracebench/tst_qtracebench.cpp
@@ -0,0 +1,262 @@
+/****************************************************************************
+**
+** 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 test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+
+#include <QtGui>
+
+#include <private/qpaintengineex_p.h>
+#include <private/qpaintbuffer_p.h>
+
+//TESTED_FILES=
+
+class ReplayWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ ReplayWidget(const QString &filename);
+
+ void paintEvent(QPaintEvent *event);
+ void resizeEvent(QResizeEvent *event);
+
+ bool done() const { return m_done; }
+ qreal result() const { return m_result; }
+
+public slots:
+ void updateRect();
+
+public:
+ QList<QRegion> updates;
+ QPaintBuffer buffer;
+
+ int currentFrame;
+ int currentIteration;
+ QTime timer;
+
+ QList<uint> visibleUpdates;
+ QList<uint> iterationTimes;
+ QString filename;
+
+ bool m_done;
+ qreal m_result;
+
+ uint m_total;
+};
+
+void ReplayWidget::updateRect()
+{
+ if (!visibleUpdates.isEmpty())
+ update(updates.at(visibleUpdates.at(currentFrame)));
+}
+
+void ReplayWidget::paintEvent(QPaintEvent *)
+{
+ if (m_done)
+ return;
+
+ QPainter p(this);
+
+ // if partial updates don't work
+ // p.setClipRegion(frames.at(currentFrame).updateRegion);
+
+ buffer.draw(&p, visibleUpdates.at(currentFrame));
+
+ ++currentFrame;
+ if (currentFrame >= visibleUpdates.size()) {
+ currentFrame = 0;
+ ++currentIteration;
+
+ uint currentElapsed = timer.isNull() ? 0 : timer.elapsed();
+ timer.restart();
+
+ m_total += currentElapsed;
+
+ // warm up for at most 5 iterations or half a second
+ if (currentIteration >= 5 || m_total >= 500) {
+ iterationTimes << currentElapsed;
+
+ if (iterationTimes.size() >= 5) {
+ qreal mean = 0;
+ qreal stddev = 0;
+ uint min = INT_MAX;
+
+ for (int i = 0; i < iterationTimes.size(); ++i) {
+ mean += iterationTimes.at(i);
+ min = qMin(min, iterationTimes.at(i));
+ }
+
+ mean /= qreal(iterationTimes.size());
+
+ for (int i = 0; i < iterationTimes.size(); ++i) {
+ qreal delta = iterationTimes.at(i) - mean;
+ stddev += delta * delta;
+ }
+
+ stddev = qSqrt(stddev / iterationTimes.size());
+
+ qSort(iterationTimes.begin(), iterationTimes.end());
+ uint median = iterationTimes.at(iterationTimes.size() / 2);
+
+ stddev = 100 * stddev / mean;
+ // do 100 iterations, break earlier if we spend more than 5 seconds or have a low std deviation after 2 seconds
+ if (iterationTimes.size() >= 100 || m_total >= 5000 || (m_total >= 2000 && stddev < 4)) {
+ printf("%s, iterations: %d, frames: %d, min(ms): %d, median(ms): %d, stddev: %f %%, max(fps): %f\n", qPrintable(filename),
+ iterationTimes.size(), visibleUpdates.size(), min, median, stddev, 1000. * visibleUpdates.size() / min);
+ m_result = min;
+ m_done = true;
+ return;
+ }
+ }
+ }
+ }
+}
+
+void ReplayWidget::resizeEvent(QResizeEvent *event)
+{
+ visibleUpdates.clear();
+
+ QRect bounds = rect();
+ for (int i = 0; i < updates.size(); ++i) {
+ if (updates.at(i).intersects(bounds))
+ visibleUpdates << i;
+ }
+
+ if (visibleUpdates.size() != updates.size())
+ printf("Warning: skipped %d frames due to limited resolution\n", updates.size() - visibleUpdates.size());
+
+}
+
+ReplayWidget::ReplayWidget(const QString &filename_)
+ : currentFrame(0)
+ , currentIteration(0)
+ , filename(filename_)
+ , m_done(false)
+ , m_result(0)
+ , m_total(0)
+{
+ setWindowTitle(filename);
+ QFile file(filename);
+
+ if (!file.open(QIODevice::ReadOnly)) {
+ printf("Failed to load input file '%s'\n", qPrintable(filename_));
+ return;
+ }
+
+ QDataStream in(&file);
+
+ char *data;
+ uint size;
+ in.readBytes(data, size);
+ bool isTraceFile = size >= 7 && qstrncmp(data, "qttrace", 7) == 0;
+ uint version = 0;
+ if (size == 9 && qstrncmp(data, "qttraceV2", 9) == 0) {
+ in.setFloatingPointPrecision(QDataStream::SinglePrecision);
+ in >> version;
+ }
+
+ delete [] data;
+ if (!isTraceFile) {
+ printf("File '%s' is not a trace file\n", qPrintable(filename_));
+ return;
+ }
+
+ in >> buffer >> updates;
+
+ resize(buffer.boundingRect().size().toSize());
+
+ setAutoFillBackground(false);
+ setAttribute(Qt::WA_NoSystemBackground);
+}
+
+
+class tst_QTraceBench : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void trace();
+ void trace_data();
+};
+
+static const QLatin1String prefix(":/traces/");
+
+void tst_QTraceBench::trace_data()
+{
+ QTest::addColumn<QString>("filename");
+
+ QTest::newRow("basicdrawing") << (prefix + "basicdrawing.trace");
+ QTest::newRow("webkit") << (prefix + "webkit.trace");
+ QTest::newRow("creator") << (prefix + "creator.trace");
+ QTest::newRow("textedit") << (prefix + "textedit.trace");
+ QTest::newRow("qmlphoneconcept") << (prefix + "qmlphoneconcept.trace");
+ QTest::newRow("qmlsamegame") << (prefix + "qmlsamegame.trace");
+}
+
+void tst_QTraceBench::trace()
+{
+ QFETCH(QString, filename);
+
+ QFile file(filename);
+ if (!file.exists()) {
+ qWarning() << "Missing file" << filename;
+ return;
+ }
+
+ ReplayWidget widget(filename);
+
+ if (widget.updates.isEmpty()) {
+ qWarning() << "No trace updates" << filename;
+ return;
+ }
+
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
+ while (!widget.done()) {
+ widget.updateRect();
+ QApplication::processEvents();
+ }
+
+ QTest::setBenchmarkResult(widget.result(), QTest::WalltimeMilliseconds);
+}
+
+QTEST_MAIN(tst_QTraceBench)
+#include "tst_qtracebench.moc"
diff --git a/tests/manual/bearerex/bearerex.cpp b/tests/manual/bearerex/bearerex.cpp
new file mode 100644
index 0000000000..19246a2931
--- /dev/null
+++ b/tests/manual/bearerex/bearerex.cpp
@@ -0,0 +1,561 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "bearerex.h"
+
+#include <QtNetwork>
+
+Q_DECLARE_METATYPE(QNetworkConfiguration)
+
+BearerEx::BearerEx(QWidget* parent)
+ : QMainWindow(parent)
+{
+ setupUi(this);
+
+ createMenus();
+
+ connect(&m_NetworkConfigurationManager, SIGNAL(updateCompleted()), this, SLOT(configurationsUpdateCompleted()));
+ connect(&m_NetworkConfigurationManager, SIGNAL(configurationAdded(const QNetworkConfiguration&)),
+ this, SLOT(configurationAdded(const QNetworkConfiguration&)));
+ connect(&m_NetworkConfigurationManager, SIGNAL(configurationRemoved(const QNetworkConfiguration&)),
+ this, SLOT(configurationRemoved(const QNetworkConfiguration&)));
+ connect(&m_NetworkConfigurationManager, SIGNAL(onlineStateChanged(bool)),
+ this, SLOT(onlineStateChanged(bool)));
+ connect(&m_NetworkConfigurationManager, SIGNAL(configurationChanged(const QNetworkConfiguration&)),
+ this, SLOT(configurationChanged(const QNetworkConfiguration&)));
+ showConfigurations();
+}
+
+void BearerEx::createMenus()
+{
+ QAction* act1 = new QAction(tr("Show Details"), this);
+ menuBar()->addAction(act1);
+ connect(act1, SIGNAL(triggered()), this, SLOT(on_showDetailsButton_clicked()));
+
+ QAction* exitAct = new QAction(tr("Exit"), this);
+ menuBar()->addAction(exitAct);
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+}
+
+void BearerEx::showConfigurations()
+{
+ listWidget->clear();
+ QListWidgetItem* listItem;
+
+ QNetworkConfiguration defaultConfig = m_NetworkConfigurationManager.defaultConfiguration();
+ if (defaultConfig.type() == QNetworkConfiguration::UserChoice) {
+ listItem = new QListWidgetItem();
+ QFont font = listItem->font();
+ font.setBold(true);
+ font.setUnderline(true);
+ listItem->setFont(font);
+ listItem->setText(" UserChoice");
+ listItem->setData(Qt::UserRole, qVariantFromValue(defaultConfig));
+ listWidget->addItem(listItem);
+ }
+
+ QList<QNetworkConfiguration> configurations = m_NetworkConfigurationManager.allConfigurations();
+ for (int i=0; i<configurations.count(); i++)
+ {
+ listItem = new QListWidgetItem();
+ QString text;
+ if (configurations[i].type() == QNetworkConfiguration::InternetAccessPoint) {
+ text.append("(IAP,");
+ } else if (configurations[i].type() == QNetworkConfiguration::ServiceNetwork) {
+ text.append("(SNAP,");
+ }
+
+ if ((configurations[i].state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
+ text.append("Act) ");
+ } else if ((configurations[i].state() & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered) {
+ text.append("Disc) ");
+ } else {
+ text.append("Def) ");
+ }
+ text.append(configurations[i].name());
+
+ if (defaultConfig.isValid() && defaultConfig == configurations[i]) {
+ QFont font = listItem->font();
+ font.setBold(true);
+ font.setUnderline(true);
+ listItem->setFont(font);
+ }
+ listItem->setText(text);
+ listItem->setData(Qt::UserRole, qVariantFromValue(configurations[i]));
+ listWidget->addItem(listItem);
+ }
+}
+
+void BearerEx::on_updateConfigurationsButton_clicked()
+{
+ m_NetworkConfigurationManager.updateConfigurations();
+}
+
+void BearerEx::on_updateListButton_clicked()
+{
+ showConfigurations();
+}
+
+void BearerEx::on_showDetailsButton_clicked()
+{
+ QListWidgetItem* item = listWidget->currentItem();
+ if (!item) {
+ return;
+ }
+
+ QNetworkConfiguration networkConfiguration = qVariantValue<QNetworkConfiguration>(item->data(Qt::UserRole));
+ DetailedInfoDialog infoDialog(&networkConfiguration,this);
+ infoDialog.exec();
+}
+
+void BearerEx::on_createSessionButton_clicked()
+{
+ QListWidgetItem* item = listWidget->currentItem();
+ if (!item) {
+ return;
+ }
+ QNetworkConfiguration networkConfiguration = qVariantValue<QNetworkConfiguration>(item->data(Qt::UserRole));
+ int newTabIndex = mainTabWidget->count();
+ SessionTab* newTab = new SessionTab(&networkConfiguration,&m_NetworkConfigurationManager,eventListWidget,newTabIndex-1);
+ QString label = QString("S")+QString::number(newTabIndex-1);
+ mainTabWidget->insertTab(newTabIndex,newTab,label);
+ mainTabWidget->setCurrentIndex(newTabIndex);
+}
+
+void BearerEx::on_clearEventListButton_clicked()
+{
+ eventListWidget->clear();
+}
+
+void BearerEx::configurationAdded(const QNetworkConfiguration& config)
+{
+ QListWidgetItem* listItem = new QListWidgetItem();
+ listItem->setText(QString("Added: ")+config.name());
+ eventListWidget->addItem(listItem);
+}
+
+void BearerEx::configurationRemoved(const QNetworkConfiguration& config)
+{
+ QListWidgetItem* listItem = new QListWidgetItem();
+ listItem->setText(QString("Removed: ")+config.name());
+ eventListWidget->addItem(listItem);
+}
+
+void BearerEx::onlineStateChanged(bool isOnline)
+{
+ QListWidgetItem* listItem = new QListWidgetItem();
+ QFont font = listItem->font();
+ font.setBold(true);
+ listItem->setFont(font);
+ if (isOnline) {
+ listItem->setText(QString("> Online"));
+ } else {
+ listItem->setText(QString("< Offline"));
+ }
+ eventListWidget->addItem(listItem);
+}
+
+void BearerEx::configurationChanged(const QNetworkConfiguration & config)
+{
+ QListWidgetItem* listItem = new QListWidgetItem();
+ QString state;
+ switch (config.state())
+ {
+ case QNetworkConfiguration::Undefined:
+ state = "Undef : ";
+ break;
+ case QNetworkConfiguration::Defined:
+ state = "Def : ";
+ break;
+ case QNetworkConfiguration::Discovered:
+ state = "Disc : ";
+ break;
+ case QNetworkConfiguration::Active:
+ state = "Act : ";
+ break;
+ }
+ listItem->setText(state+config.name());
+ eventListWidget->addItem(listItem);
+}
+
+void BearerEx::configurationsUpdateCompleted()
+{
+ QMessageBox msgBox;
+ msgBox.setStandardButtons(QMessageBox::Close);
+ msgBox.setText("Configurations update completed.");
+ msgBox.exec();
+}
+
+DetailedInfoDialog::DetailedInfoDialog(QNetworkConfiguration* apNetworkConfiguration, QWidget * parent)
+ : QDialog(parent)
+{
+ setupUi(this);
+
+ tableWidget->setColumnCount(2);
+ int rowCount = 2;
+
+ if (apNetworkConfiguration->type() == QNetworkConfiguration::ServiceNetwork) {
+ rowCount = rowCount + apNetworkConfiguration->children().count();
+ }
+
+ tableWidget->setRowCount(rowCount);
+ tableWidget->setColumnWidth(1,250);
+ tableWidget->setItem(0, 0, new QTableWidgetItem(tr("Name")));
+ tableWidget->setItem(0, 1, new QTableWidgetItem(apNetworkConfiguration->name()));
+ tableWidget->setItem(1, 0, new QTableWidgetItem(tr("Id")));
+ tableWidget->setItem(1, 1, new QTableWidgetItem(apNetworkConfiguration->identifier()));
+ if (apNetworkConfiguration->type() == QNetworkConfiguration::ServiceNetwork) {
+ for (int i=0; i<apNetworkConfiguration->children().count(); i++) {
+ tableWidget->setItem(i+2, 0, new QTableWidgetItem(QString("IAP")+QString::number(i+1)));
+ tableWidget->setItem(i+2, 1, new QTableWidgetItem(apNetworkConfiguration->children()[i].name()));
+ }
+ }
+
+ tableWidget->setFocusPolicy(Qt::NoFocus);
+
+#ifdef Q_OS_SYMBIAN
+ this->showMaximized();
+#endif
+}
+
+SessionTab::SessionTab(QNetworkConfiguration* apNetworkConfiguration,
+ QNetworkConfigurationManager* configManager,
+ QListWidget* eventListWidget,
+ int index,
+ BearerEx * parent)
+ : QWidget(parent), m_http(0), m_eventListWidget(eventListWidget),
+ m_index(index), m_httpRequestOngoing(false), m_alrEnabled (false)
+{
+ setupUi(this);
+
+ m_ConfigManager = configManager;
+ m_NetworkSession = new QNetworkSession(*apNetworkConfiguration);
+
+ // Update initial Session state to UI
+ newState(m_NetworkSession->state());
+
+ connect(m_NetworkSession, SIGNAL(newConfigurationActivated()), this, SLOT(newConfigurationActivated()));
+ connect(m_NetworkSession, SIGNAL(stateChanged(QNetworkSession::State)),
+ this, SLOT(stateChanged(QNetworkSession::State)));
+ connect(m_NetworkSession, SIGNAL(opened()), this, SLOT(opened()));
+ connect(m_NetworkSession, SIGNAL(closed()), this, SLOT(closed()));
+ connect(m_NetworkSession, SIGNAL(error(QNetworkSession::SessionError)), this, SLOT(error(QNetworkSession::SessionError)));
+
+ if (apNetworkConfiguration->type() == QNetworkConfiguration::InternetAccessPoint) {
+ snapLabel->hide();
+ snapLineEdit->hide();
+ alrButton->hide();
+ iapLineEdit->setText(apNetworkConfiguration->name()+" ("+apNetworkConfiguration->identifier()+")");
+ } else if (apNetworkConfiguration->type() == QNetworkConfiguration::ServiceNetwork) {
+ snapLineEdit->setText(apNetworkConfiguration->name()+" ("+apNetworkConfiguration->identifier()+")");
+ }
+ bearerLineEdit->setText(apNetworkConfiguration->bearerName());
+ sentRecDataLineEdit->setText(QString::number(m_NetworkSession->bytesWritten())+
+ QString(" / ")+
+ QString::number(m_NetworkSession->bytesReceived()));
+ snapLineEdit->setFocusPolicy(Qt::NoFocus);
+ iapLineEdit->setFocusPolicy(Qt::NoFocus);
+ bearerLineEdit->setFocusPolicy(Qt::NoFocus);
+ sentRecDataLineEdit->setFocusPolicy(Qt::NoFocus);
+ stateLineEdit->setFocusPolicy(Qt::NoFocus);
+}
+
+SessionTab::~SessionTab()
+{
+ delete m_NetworkSession;
+ delete m_http;
+}
+
+void SessionTab::on_createQHttpButton_clicked()
+{
+ if (m_httpRequestOngoing) {
+ return;
+ }
+
+ if (m_http) {
+ disconnect(m_http, 0, 0, 0);
+ delete m_http;
+ }
+ m_http = new QHttp(this);
+ createQHttpButton->setText("Recreate QHttp");
+ connect(m_http, SIGNAL(done(bool)), this, SLOT(done(bool)));
+}
+
+void SessionTab::on_sendRequestButton_clicked()
+{
+ if (m_http) {
+ QString urlstring("http://www.google.com");
+ QUrl url(urlstring);
+ m_http->setHost(url.host(), QHttp::ConnectionModeHttp, url.port() == -1 ? 0 : url.port());
+ m_http->get(urlstring);
+ m_httpRequestOngoing = true;
+ } else {
+ QMessageBox msgBox;
+ msgBox.setStandardButtons(QMessageBox::Close);
+ msgBox.setText("QHttp not created.\nCreate QHttp First.");
+ msgBox.exec();
+ }
+}
+
+void SessionTab::on_openSessionButton_clicked()
+{
+ m_NetworkSession->open();
+ if (m_NetworkSession->isOpen()) {
+ newState(m_NetworkSession->state());
+ }
+}
+
+void SessionTab::on_closeSessionButton_clicked()
+{
+ m_NetworkSession->close();
+ if (!m_NetworkSession->isOpen()) {
+ newState(m_NetworkSession->state());
+ }
+}
+
+void SessionTab::on_stopConnectionButton_clicked()
+{
+ m_NetworkSession->stop();
+}
+
+void SessionTab::on_alrButton_clicked()
+{
+ if (!m_alrEnabled) {
+ connect(m_NetworkSession, SIGNAL(preferredConfigurationChanged(const QNetworkConfiguration&, bool)),
+ this, SLOT(preferredConfigurationChanged(const QNetworkConfiguration&, bool)));
+ alrButton->setText("Disable ALR");
+ m_alrEnabled = true;
+ } else {
+ disconnect(m_NetworkSession, SIGNAL(preferredConfigurationChanged(const QNetworkConfiguration&, bool)), 0, 0);
+ alrButton->setText("Enable ALR");
+ m_alrEnabled = false;
+ }
+}
+
+void SessionTab::on_deleteSessionButton_clicked()
+{
+ setWindowTitle("Bearer Example");
+ delete this;
+}
+
+void SessionTab::newConfigurationActivated()
+{
+ QMessageBox msgBox;
+ msgBox.setText("New configuration activated.");
+ msgBox.setInformativeText("Do you want to accept new configuration?");
+ msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
+ msgBox.setDefaultButton(QMessageBox::Yes);
+ if (msgBox.exec() == QMessageBox::Yes) {
+ m_NetworkSession->accept();
+ iapLineEdit->setText(m_config.name()+" ("+m_config.identifier()+")");
+ } else {
+ m_NetworkSession->reject();
+ }
+}
+
+void SessionTab::preferredConfigurationChanged(const QNetworkConfiguration& config, bool /*isSeamless*/)
+{
+ m_config = config;
+ QMessageBox msgBox;
+ msgBox.setText("Roaming to new configuration.");
+ msgBox.setInformativeText("Do you want to migrate to "+config.name()+"?");
+ msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
+ msgBox.setDefaultButton(QMessageBox::Yes);
+ if (msgBox.exec() == QMessageBox::Yes) {
+ m_NetworkSession->migrate();
+ } else {
+ m_NetworkSession->ignore();
+ }
+}
+
+void SessionTab::opened()
+{
+ QListWidgetItem* listItem = new QListWidgetItem();
+ QFont font = listItem->font();
+ font.setBold(true);
+ listItem->setFont(font);
+ listItem->setText(QString("S")+QString::number(m_index)+QString(" - ")+QString("Opened"));
+ m_eventListWidget->addItem(listItem);
+
+ QVariant identifier = m_NetworkSession->property("ActiveConfiguration");
+ if (!identifier.isNull()) {
+ QString configId = identifier.toString();
+ QNetworkConfiguration config = m_ConfigManager->configurationFromIdentifier(configId);
+ if (config.isValid()) {
+ iapLineEdit->setText(config.name()+" ("+config.identifier()+")");
+ }
+ }
+
+ if (m_NetworkSession->configuration().type() == QNetworkConfiguration::UserChoice) {
+ QVariant identifier = m_NetworkSession->property("UserChoiceConfiguration");
+ if (!identifier.isNull()) {
+ QString configId = identifier.toString();
+ QNetworkConfiguration config = m_ConfigManager->configurationFromIdentifier(configId);
+ if (config.isValid() && (config.type() == QNetworkConfiguration::ServiceNetwork)) {
+ snapLineEdit->setText(config.name());
+ }
+ }
+ }
+}
+
+void SessionTab::closed()
+{
+ QListWidgetItem* listItem = new QListWidgetItem();
+ QFont font = listItem->font();
+ font.setBold(true);
+ listItem->setFont(font);
+ listItem->setText(QString("S")+QString::number(m_index)+QString(" - ")+QString("Closed"));
+ m_eventListWidget->addItem(listItem);
+}
+
+QString SessionTab::stateString(QNetworkSession::State state)
+{
+ QString stateString;
+ switch (state)
+ {
+ case QNetworkSession::Invalid:
+ stateString = "Invalid";
+ break;
+ case QNetworkSession::NotAvailable:
+ stateString = "NotAvailable";
+ break;
+ case QNetworkSession::Connecting:
+ stateString = "Connecting";
+ break;
+ case QNetworkSession::Connected:
+ stateString = "Connected";
+ break;
+ case QNetworkSession::Closing:
+ stateString = "Closing";
+ break;
+ case QNetworkSession::Disconnected:
+ stateString = "Disconnected";
+ break;
+ case QNetworkSession::Roaming:
+ stateString = "Roaming";
+ break;
+ }
+ return stateString;
+}
+
+void SessionTab::stateChanged(QNetworkSession::State state)
+{
+ newState(state);
+
+ QListWidgetItem* listItem = new QListWidgetItem();
+ listItem->setText(QString("S")+QString::number(m_index)+QString(" - ")+stateString(state));
+ m_eventListWidget->addItem(listItem);
+}
+
+void SessionTab::newState(QNetworkSession::State state)
+{
+ QVariant identifier = m_NetworkSession->property("ActiveConfiguration");
+ if (state == QNetworkSession::Connected && !identifier.isNull()) {
+ QString configId = identifier.toString();
+ QNetworkConfiguration config = m_ConfigManager->configurationFromIdentifier(configId);
+ if (config.isValid()) {
+ iapLineEdit->setText(config.name()+" ("+config.identifier()+")");
+ bearerLineEdit->setText(config.bearerName());
+ }
+ } else {
+ bearerLineEdit->setText(m_NetworkSession->configuration().bearerName());
+ }
+
+ QString active;
+ if (m_NetworkSession->isOpen()) {
+ active = " (O)";
+ }
+ stateLineEdit->setText(stateString(state)+active);
+}
+
+void SessionTab::error(QNetworkSession::SessionError error)
+{
+ QListWidgetItem* listItem = new QListWidgetItem();
+ QMessageBox msgBox;
+ msgBox.setStandardButtons(QMessageBox::Close);
+
+ QString errorString;
+ switch (error)
+ {
+ case QNetworkSession::UnknownSessionError:
+ errorString = "UnknownSessionError";
+ break;
+ case QNetworkSession::SessionAbortedError:
+ errorString = "SessionAbortedError";
+ break;
+ case QNetworkSession::RoamingError:
+ errorString = "RoamingError";
+ break;
+ case QNetworkSession::OperationNotSupportedError:
+ errorString = "OperationNotSupportedError";
+ break;
+ case QNetworkSession::InvalidConfigurationError:
+ errorString = "InvalidConfigurationError";
+ break;
+ }
+ listItem->setText(QString("S")+QString::number(m_index)+QString(" - ")+errorString);
+ m_eventListWidget->addItem(listItem);
+
+ msgBox.setText(errorString);
+ msgBox.exec();
+}
+
+void SessionTab::done(bool error)
+{
+ m_httpRequestOngoing = false;
+
+ QMessageBox msgBox;
+ msgBox.setStandardButtons(QMessageBox::Close);
+ if (error) {
+ msgBox.setText("HTTP request failed.");
+ } else {
+ QString result(m_http->readAll());
+ msgBox.setText(QString("HTTP request finished successfully.\nReceived ")+QString::number(result.length())+QString(" bytes."));
+ }
+ msgBox.exec();
+
+ sentRecDataLineEdit->setText(QString::number(m_NetworkSession->bytesWritten())+
+ QString(" / ")+
+ QString::number(m_NetworkSession->bytesReceived()));
+}
+
+// End of file
+
diff --git a/tests/manual/bearerex/bearerex.h b/tests/manual/bearerex/bearerex.h
new file mode 100644
index 0000000000..2875d6a151
--- /dev/null
+++ b/tests/manual/bearerex/bearerex.h
@@ -0,0 +1,142 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ACCESSPOINTMANAGEREX_H
+#define ACCESSPOINTMANAGEREX_H
+
+#include <QtGui>
+
+#include "ui_bearerex.h"
+#include "ui_detailedinfodialog.h"
+#include "ui_sessiondialog.h"
+
+#include "qnetworkconfigmanager.h"
+#include "qnetworksession.h"
+#include "xqlistwidget.h"
+
+QT_BEGIN_NAMESPACE
+class QHttp;
+QT_END_NAMESPACE
+
+class SessionTab;
+
+QT_USE_NAMESPACE
+
+class BearerEx : public QMainWindow, public Ui::BearerExMainWindow
+{
+ Q_OBJECT
+
+public:
+ BearerEx(QWidget* parent = 0);
+ void createMenus();
+ void showConfigurations();
+
+private Q_SLOTS:
+ void on_updateConfigurationsButton_clicked();
+ void on_updateListButton_clicked();
+ void on_showDetailsButton_clicked();
+ void on_createSessionButton_clicked();
+ void on_clearEventListButton_clicked();
+
+ void configurationsUpdateCompleted();
+ void configurationAdded(const QNetworkConfiguration& config);
+ void configurationRemoved(const QNetworkConfiguration& config);
+ void onlineStateChanged(bool isOnline);
+ void configurationChanged(const QNetworkConfiguration & config);
+
+private:
+ QNetworkConfigurationManager m_NetworkConfigurationManager;
+ QAction* m_openAction;
+};
+
+class DetailedInfoDialog : public QDialog, public Ui::DetailedInfoDialog
+{
+ Q_OBJECT
+
+public:
+ DetailedInfoDialog(QNetworkConfiguration* apNetworkConfiguration = 0, QWidget* parent = 0);
+};
+
+
+class SessionTab : public QWidget, public Ui::SessionTab
+{
+ Q_OBJECT
+
+public:
+ SessionTab(QNetworkConfiguration* apNetworkConfiguration = 0, QNetworkConfigurationManager* configManager = 0,
+ QListWidget* eventListWidget = 0, int index = 0, BearerEx* parent = 0);
+ ~SessionTab();
+
+ QString stateString(QNetworkSession::State state);
+
+private Q_SLOTS:
+ void on_createQHttpButton_clicked();
+ void on_sendRequestButton_clicked();
+ void on_openSessionButton_clicked();
+ void on_closeSessionButton_clicked();
+ void on_stopConnectionButton_clicked();
+ void on_deleteSessionButton_clicked();
+ void on_alrButton_clicked();
+ void done(bool error);
+
+ void newConfigurationActivated();
+ void preferredConfigurationChanged(const QNetworkConfiguration& config, bool isSeamless);
+ void stateChanged(QNetworkSession::State state);
+ void newState(QNetworkSession::State state);
+ void opened();
+ void closed();
+ void error(QNetworkSession::SessionError error);
+
+private: //data
+ QHttp* m_http;
+ QNetworkSession* m_NetworkSession;
+ QNetworkConfigurationManager* m_ConfigManager;
+ QListWidget* m_eventListWidget;
+ QNetworkConfiguration m_config;
+ int m_index;
+ bool m_httpRequestOngoing;
+ bool m_alrEnabled;
+};
+
+#endif // ACCESSPOINTMANAGEREX_H
+
+// End of file
+
diff --git a/tests/manual/bearerex/bearerex.pro b/tests/manual/bearerex/bearerex.pro
new file mode 100644
index 0000000000..927f98242a
--- /dev/null
+++ b/tests/manual/bearerex/bearerex.pro
@@ -0,0 +1,20 @@
+TEMPLATE = app
+TARGET = BearerEx
+
+QT += core \
+ gui \
+ network
+
+FORMS += sessiondialog.ui \
+ bearerex.ui \
+ detailedinfodialog.ui
+
+# Example headers and sources
+HEADERS += bearerex.h \
+ xqlistwidget.h
+
+SOURCES += bearerex.cpp \
+ main.cpp \
+ xqlistwidget.cpp
+
+symbian:TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData \ No newline at end of file
diff --git a/tests/manual/bearerex/bearerex.ui b/tests/manual/bearerex/bearerex.ui
new file mode 100644
index 0000000000..e5ab62f5b3
--- /dev/null
+++ b/tests/manual/bearerex/bearerex.ui
@@ -0,0 +1,95 @@
+<ui version="4.0" >
+ <class>BearerExMainWindow</class>
+ <widget class="QMainWindow" name="BearerExMainWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>360</width>
+ <height>640</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Bearer Example</string>
+ </property>
+ <widget class="QWidget" name="centralwidget" >
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <item>
+ <widget class="QTabWidget" name="mainTabWidget" >
+ <widget class="QWidget" name="tab" >
+ <attribute name="title" >
+ <string>Main</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_2" >
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Network Configurations</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QListWidget" name="listWidget" />
+ </item>
+ <item>
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" >
+ <widget class="QPushButton" name="updateConfigurationsButton" >
+ <property name="text" >
+ <string>Update Configs</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QPushButton" name="updateListButton" >
+ <property name="text" >
+ <string>Update List</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QPushButton" name="createSessionButton" >
+ <property name="text" >
+ <string>Create Session</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QPushButton" name="showDetailsButton" >
+ <property name="text" >
+ <string>Show Details</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tab_2" >
+ <attribute name="title" >
+ <string>Events</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_3" >
+ <item>
+ <widget class="QListWidget" name="eventListWidget" />
+ </item>
+ <item>
+ <widget class="QPushButton" name="clearEventListButton" >
+ <property name="text" >
+ <string>Clear</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/tests/manual/bearerex/detailedinfodialog.ui b/tests/manual/bearerex/detailedinfodialog.ui
new file mode 100644
index 0000000000..c4a21faf39
--- /dev/null
+++ b/tests/manual/bearerex/detailedinfodialog.ui
@@ -0,0 +1,54 @@
+<ui version="4.0" >
+ <class>DetailedInfoDialog</class>
+ <widget class="QDialog" name="DetailedInfoDialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>308</width>
+ <height>396</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Bearer Example</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Detailed information</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QTableWidget" name="tableWidget" />
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>DetailedInfoDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>205</x>
+ <y>371</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>223</x>
+ <y>8</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/tests/manual/bearerex/main.cpp b/tests/manual/bearerex/main.cpp
new file mode 100644
index 0000000000..20b167eb4b
--- /dev/null
+++ b/tests/manual/bearerex/main.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "bearerex.h"
+
+int main(int argc, char* argv[])
+{
+ QApplication app(argc, argv);
+ BearerEx bearerEx;
+#ifdef Q_OS_SYMBIAN
+ bearerEx.showMaximized();
+#else
+ bearerEx.show();
+#endif
+ return app.exec();
+}
+
+// End of file
+
diff --git a/tests/manual/bearerex/sessiondialog.ui b/tests/manual/bearerex/sessiondialog.ui
new file mode 100644
index 0000000000..fcf21368b2
--- /dev/null
+++ b/tests/manual/bearerex/sessiondialog.ui
@@ -0,0 +1,139 @@
+<ui version="4.0" >
+ <class>SessionTab</class>
+ <widget class="QWidget" name="SessionTab" >
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <item>
+ <layout class="QFormLayout" name="formLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="snapLabel" >
+ <property name="text" >
+ <string>SNAP</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="snapLineEdit" >
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="iapLabel" >
+ <property name="text" >
+ <string>IAP</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QLineEdit" name="iapLineEdit" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="bearerLabel" >
+ <property name="text" >
+ <string>Bearer</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QLineEdit" name="bearerLineEdit" >
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="sentRecDataLabel" >
+ <property name="text" >
+ <string>Sent/Rec.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" >
+ <widget class="QLineEdit" name="sentRecDataLineEdit" >
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" >
+ <widget class="QLabel" name="stateLabel" >
+ <property name="text" >
+ <string>State</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1" >
+ <widget class="QLineEdit" name="stateLineEdit" >
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" >
+ <widget class="QPushButton" name="openSessionButton" >
+ <property name="text" >
+ <string>Open Session</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QPushButton" name="closeSessionButton" >
+ <property name="text" >
+ <string>Close Session</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QPushButton" name="stopConnectionButton" >
+ <property name="text" >
+ <string>Stop Conn.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QPushButton" name="createQHttpButton" >
+ <property name="text" >
+ <string>Create QHttp</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QPushButton" name="sendRequestButton" >
+ <property name="text" >
+ <string>Send Test Req.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QPushButton" name="alrButton" >
+ <property name="text" >
+ <string>Enable ALR</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" >
+ <widget class="QPushButton" name="deleteSessionButton" >
+ <property name="text" >
+ <string>Delete Session</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/tests/manual/bearerex/xqlistwidget.cpp b/tests/manual/bearerex/xqlistwidget.cpp
new file mode 100644
index 0000000000..8104779d1d
--- /dev/null
+++ b/tests/manual/bearerex/xqlistwidget.cpp
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "xqlistwidget.h"
+
+XQListWidget::XQListWidget(QWidget* parent) : QListWidget(parent)
+{
+}
+
+void XQListWidget::keyPressEvent(QKeyEvent* event)
+{
+ switch (event->key())
+ {
+ case Qt::Key_Left:
+ {
+ focusPreviousChild();
+ break;
+ }
+ case Qt::Key_Right:
+ {
+ focusNextChild();
+ break;
+ }
+ default:
+ {
+ QListWidget::keyPressEvent(event);
+ }
+ }
+}
diff --git a/tests/manual/bearerex/xqlistwidget.h b/tests/manual/bearerex/xqlistwidget.h
new file mode 100644
index 0000000000..0649c2b8d3
--- /dev/null
+++ b/tests/manual/bearerex/xqlistwidget.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef XQLISTWIDGET_H
+#define XQLISTWIDGET_H
+
+#include <QListWidget>
+#include <QKeyEvent>
+
+class XQListWidget: public QListWidget
+{
+public:
+ XQListWidget(QWidget* parent = 0);
+
+protected:
+ void keyPressEvent(QKeyEvent* event);
+};
+
+#endif // XQLISTWIDGET_H
+
+
diff --git a/tests/manual/networkmanager/README b/tests/manual/networkmanager/README
new file mode 100644
index 0000000000..4bc7171954
--- /dev/null
+++ b/tests/manual/networkmanager/README
@@ -0,0 +1,2 @@
+This application serves as prototype/test-bed for NetworkManager development. The excellent (non-existing) documentation
+for the various NetworkManager interfaces makes this harder than it should be.
diff --git a/tests/manual/networkmanager/dialog.ui b/tests/manual/networkmanager/dialog.ui
new file mode 100644
index 0000000000..13019086b6
--- /dev/null
+++ b/tests/manual/networkmanager/dialog.ui
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>919</width>
+ <height>657</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Dialog</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Connections</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QTreeWidget" name="cons">
+ <column>
+ <property name="text">
+ <string>Path</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>State</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Id</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Settings</string>
+ </property>
+ </column>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Devices:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QTreeWidget" name="devicesTreeWidget">
+ <column>
+ <property name="text">
+ <string>Path</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Managed</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Interface</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Driver</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Type</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>State</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>IP4 Address</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>IP4 Config</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Hostname</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Domains</string>
+ </property>
+ </column>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="0">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>908</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="3" column="0">
+ <widget class="QTreeWidget" name="accessPointsTreeWidget">
+ <property name="sortingEnabled">
+ <bool>true</bool>
+ </property>
+ <column>
+ <property name="text">
+ <string>SSID</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Strength</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Wpa</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Rsn</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Freq</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Hardware Address</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Mode</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Max Bitrate</string>
+ </property>
+ </column>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QPushButton" name="startButton">
+ <property name="text">
+ <string>Start</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="stopButton">
+ <property name="text">
+ <string>Stop</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="scanButton">
+ <property name="text">
+ <string>Scan</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="updateButton">
+ <property name="text">
+ <string>Update</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/tests/manual/networkmanager/networkmanager.pro b/tests/manual/networkmanager/networkmanager.pro
new file mode 100644
index 0000000000..84289d3978
--- /dev/null
+++ b/tests/manual/networkmanager/networkmanager.pro
@@ -0,0 +1,9 @@
+SOURCES += networkmanagertest.cpp nmview.cpp
+HEADERS += nmview.h
+TARGET = tst_networkmanagertest
+
+QT = core network dbus gui
+
+requires(contains(QT_CONFIG,dbus))
+
+FORMS += dialog.ui
diff --git a/tests/manual/networkmanager/networkmanagertest.cpp b/tests/manual/networkmanager/networkmanagertest.cpp
new file mode 100644
index 0000000000..8a6c5fa145
--- /dev/null
+++ b/tests/manual/networkmanager/networkmanagertest.cpp
@@ -0,0 +1,287 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QDBusConnection>
+#include <QDBusError>
+#include <QDBusInterface>
+#include <QDBusMessage>
+#include <QDBusReply>
+#include <QtDBus>
+#include <QHostAddress>
+#include <QDebug>
+#include <NetworkManager/NetworkManager.h>
+#include <QApplication>
+#include <QMainWindow>
+#include "nmview.h"
+
+#include <arpa/inet.h>
+
+typedef QMap< QString, QMap<QString,QVariant> > SettingsMap;
+Q_DECLARE_METATYPE(SettingsMap)
+
+void printConnectionDetails(const QString& service)
+{
+ QDBusConnection dbc = QDBusConnection::systemBus();
+ if (!dbc.isConnected()) {
+ qWarning() << "Unable to connect to D-Bus:" << dbc.lastError();
+ return;
+ }
+ QDBusInterface allCons(service, NM_DBUS_PATH_SETTINGS, NM_DBUS_IFACE_SETTINGS, dbc);
+ if (allCons.isValid()) {
+ QDBusReply<QList<QDBusObjectPath> > reply = allCons.call("ListConnections");
+ if ( reply.isValid() ) {
+ qWarning() << "Known connections:";
+ QList<QDBusObjectPath> list = reply.value();
+ foreach(QDBusObjectPath path, list) {
+ qWarning() << " " << path.path();
+ QDBusInterface sysIface(NM_DBUS_SERVICE_SYSTEM_SETTINGS, path.path(), NM_DBUS_IFACE_SETTINGS_CONNECTION, dbc);
+ if (sysIface.isValid()) {
+ QDBusMessage r = sysIface.call("GetSettings");
+ QDBusReply< SettingsMap > rep = sysIface.call("GetSettings");
+ qWarning() << " GetSettings:" << r.arguments() << r.signature() << rep.isValid() << sysIface.lastError();
+ QMap< QString, QMap<QString,QVariant> > map = rep.value();
+ QList<QString> list = map.keys();
+ foreach (QString key, list) {
+ QMap<QString,QVariant> innerMap = map[key];
+ qWarning() << " Key: " << key;
+ QMap<QString,QVariant>::const_iterator i = innerMap.constBegin();
+ while (i != innerMap.constEnd()) {
+ QString k = i.key();
+ qWarning() << " Key: " << k << " Entry: " << i.value();
+ if (k == "addresses" && i.value().canConvert<QDBusArgument>()) {
+ QDBusArgument arg = i.value().value<QDBusArgument>();
+ arg.beginArray();
+ while (!arg.atEnd()) {
+ QDBusVariant addr;
+ arg >> addr;
+ uint ip = addr.variant().toUInt();
+ qWarning() << ip;
+ qWarning() << " " << QHostAddress(htonl(ip)).toString();
+ }
+
+ }
+ i++;
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+}
+
+void readConnectionManagerDetails()
+{
+ qDBusRegisterMetaType<SettingsMap>();
+ QDBusConnection dbc = QDBusConnection::systemBus();
+ if (!dbc.isConnected()) {
+ qWarning() << "Unable to connect to D-Bus:" << dbc.lastError();
+ return;
+ }
+
+ QDBusInterface iface(NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, dbc);
+ if (!iface.isValid()) {
+ qWarning() << "Could not find NetworkManager";
+ return;
+ }
+
+ uint state = iface.property("State").toUInt();
+ switch(state) {
+ case NM_STATE_UNKNOWN:
+ qWarning() << "State: Unknown"; break;
+ case NM_STATE_ASLEEP:
+ qWarning() << "State: Asleep"; break;
+ case NM_STATE_CONNECTING:
+ qWarning() << "State: Connecting"; break;
+ case NM_STATE_CONNECTED:
+ qWarning() << "State: Connected"; break;
+ case NM_STATE_DISCONNECTED:
+ qWarning() << "State: Disconnected"; break;
+ }
+ //get list of network devices
+ QDBusReply<QList<QDBusObjectPath> > reply = iface.call("GetDevices");
+ if ( reply.isValid() ) {
+ qWarning() << "Current devices:";
+ QList<QDBusObjectPath> list = reply.value();
+ foreach(QDBusObjectPath path, list) {
+ qWarning() << " " << path.path();
+ QDBusInterface devIface(NM_DBUS_SERVICE, path.path(), NM_DBUS_INTERFACE_DEVICE, dbc);
+ if (devIface.isValid()) {
+ qWarning() << " Managed: " << devIface.property("Managed").toBool();
+ qWarning() << " Interface: " << devIface.property("Interface").toString();
+ qWarning() << " HAL UDI: " << devIface.property("Udi").toString();
+ qWarning() << " Driver: " << devIface.property("Driver").toString();
+ QVariant v = devIface.property("DeviceType");
+ switch(v.toUInt()) {
+ case DEVICE_TYPE_UNKNOWN:
+ qWarning() << " DeviceType: Unknown" ;
+ break;
+ case DEVICE_TYPE_802_3_ETHERNET:
+ qWarning() << " DeviceType: Ethernet" ;
+ break;
+ case DEVICE_TYPE_802_11_WIRELESS:
+ qWarning() << " DeviceType: Wireless" ;
+ break;
+ case DEVICE_TYPE_GSM:
+ qWarning() << " DeviceType: GSM" ;
+ break;
+ case DEVICE_TYPE_CDMA:
+ qWarning() << " DeviceType: CDMA" ;
+ break;
+
+ }
+ v = devIface.property("State");
+ switch(v.toUInt()) {
+ case NM_DEVICE_STATE_UNKNOWN:
+ qWarning() << " State: Unknown" ; break;
+ case NM_DEVICE_STATE_UNMANAGED:
+ qWarning() << " State: Unmanaged" ; break;
+ case NM_DEVICE_STATE_UNAVAILABLE:
+ qWarning() << " State: Unavailable" ; break;
+ case NM_DEVICE_STATE_DISCONNECTED:
+ qWarning() << " State: Disconnected" ; break;
+ case NM_DEVICE_STATE_PREPARE:
+ qWarning() << " State: Preparing" ; break;
+ case NM_DEVICE_STATE_CONFIG:
+ qWarning() << " State: Being configured" ; break;
+ case NM_DEVICE_STATE_NEED_AUTH:
+ qWarning() << " State: Awaiting secrets" ; break;
+ case NM_DEVICE_STATE_IP_CONFIG:
+ qWarning() << " State: IP requested" ; break;
+ case NM_DEVICE_STATE_ACTIVATED:
+ qWarning() << " State: Activated" ; break;
+ case NM_DEVICE_STATE_FAILED:
+ qWarning() << " State: FAILED" ; break;
+ }
+ quint32 ip = devIface.property("Ip4Address").toUInt();
+ qWarning() << " IP4Address: " << QHostAddress(htonl(ip)).toString();
+ if (v.toUInt() == NM_DEVICE_STATE_ACTIVATED) {
+ QString path = devIface.property("Ip4Config").value<QDBusObjectPath>().path();
+ qWarning() << " IP4Config: " << path;
+ QDBusInterface ipIface(NM_DBUS_SERVICE, path, NM_DBUS_INTERFACE_IP4_CONFIG, dbc);
+ if (ipIface.isValid()) {
+ qWarning() << " Hostname: " << ipIface.property("Hostname").toString();
+ qWarning() << " Domains: " << ipIface.property("Domains").toStringList();
+ qWarning() << " NisDomain: " << ipIface.property("NisDomain").toString();
+ QDBusArgument arg= ipIface.property("Addresses").value<QDBusArgument>();
+ //qWarning() << " " << arg.currentType();
+ qWarning() << " Addresses: " << ipIface.property("Addresses");
+ qWarning() << " Nameservers: " << ipIface.property("Nameservers");
+ qWarning() << " NisServers: " << ipIface.property("NisServers");
+ }
+
+ }
+
+ }
+ }
+ }
+
+ //get list of active connections
+ QVariant prop = iface.property("ActiveConnections");
+ QList<QDBusObjectPath> connections = prop.value<QList<QDBusObjectPath> >();
+ QString activePath;
+ if ( connections.count() )
+ qWarning() << "Active connections:";
+ foreach(QDBusObjectPath path, connections) {
+ qWarning() << " " << path.path();
+ activePath = path.path();
+ QString serviceName;
+ QDBusInterface conIface(NM_DBUS_SERVICE, path.path(), NM_DBUS_INTERFACE_ACTIVE_CONNECTION, dbc);
+ if (conIface.isValid()) {
+ qWarning() << " default connection: " << conIface.property("Default").toBool();
+ serviceName = conIface.property("ServiceName").toString();
+ qWarning() << " service name: " << serviceName;
+ qWarning() << " connection path: " << conIface.property("Connection").value<QDBusObjectPath>().path();
+ qWarning() << " specific object:" << conIface.property("SpecificObject").value<QDBusObjectPath>().path();
+ qWarning() << " sharedServiceName: " << conIface.property("SharedServiceName").toString();
+ QList<QDBusObjectPath> devs = conIface.property("Devices").value<QList<QDBusObjectPath> >();
+ qWarning() << " devices: ";
+ foreach(QDBusObjectPath p, devs)
+ qWarning() << " " << path.path();
+ QVariant v = conIface.property("State");
+ switch (v.toInt()) {
+ case NM_ACTIVE_CONNECTION_STATE_UNKNOWN:
+ qWarning()<< " State: unknown"; break;
+ case NM_ACTIVE_CONNECTION_STATE_ACTIVATING:
+ qWarning()<< " State: activating"; break;
+ case NM_ACTIVE_CONNECTION_STATE_ACTIVATED:
+ qWarning()<< " State: activated"; break;
+ }
+ } else {
+ qWarning() << conIface.lastError();
+ }
+
+ }
+
+ printConnectionDetails(NM_DBUS_SERVICE_SYSTEM_SETTINGS);
+ printConnectionDetails(NM_DBUS_SERVICE_USER_SETTINGS);
+
+
+ //turn active connection off
+ /*QDBusObjectPath dbop("/org/freedesktop/NetworkManager/ActiveConnection/1");
+ QVariant asd = QVariant::fromValue(dbop);
+ iface.call(QLatin1String("DeactivateConnection"), asd);
+ qWarning() << iface.lastError();*/
+
+ /*QDBusObjectPath p1device("/org/freedesktop/Hal/devices/net_00_60_6e_82_02_65");
+ QVariant p1v = QVariant::fromValue(p1device);
+ QDBusObjectPath p1con("/org/freedesktop/NetworkManagerSettings/0");
+ QVariant p1c = QVariant::fromValue(p1con);
+ QDBusObjectPath p1sp("");
+ QVariant p1sp1 = QVariant::fromValue(p1sp);
+ iface.call(QLatin1String("ActivateConnection"),
+ QString("/org/freedesktop/NetworkManagerSystemSettings"), p1c,p1v, p1v );
+ qWarning() << iface.lastError();
+ */
+}
+
+int main( int argc, char** argv)
+{
+ QApplication app(argc, argv);
+ //readConnectionManagerDetails();
+ QMainWindow main;
+ NMView view;
+ main.setCentralWidget(&view);
+ main.show();
+ return app.exec();
+
+}
diff --git a/tests/manual/networkmanager/nmview.cpp b/tests/manual/networkmanager/nmview.cpp
new file mode 100644
index 0000000000..9e28ff0469
--- /dev/null
+++ b/tests/manual/networkmanager/nmview.cpp
@@ -0,0 +1,1028 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "nmview.h"
+
+#include <QLabel>
+#include <QLayout>
+#include <QListWidget>
+#include <QDebug>
+#include <QPushButton>
+
+#include <QtDBus>
+#include <QtNetwork>
+#include <NetworkManager/NetworkManager.h>
+#include <arpa/inet.h>
+
+#include <QDBusConnection>
+#include <QDBusError>
+#include <QDBusInterface>
+#include <QDBusMessage>
+#include <QDBusReply>
+
+#include <QHostAddress>
+#include <QNetworkInterface>
+#include <QTreeWidgetItem>
+#include <QMessageBox>
+
+//#include "ui_dialog.h"
+
+#include <qnetworkconfiguration.h>
+#include <qnetworkconfigmanager.h>
+#include <qnetworksession.h>
+#include <QtNetwork/private/qnetworkmanagerservice_p.h>
+
+//static QDBusConnection dbc = QDBusConnection::systemBus();
+//typedef QMap< QString, QMap<QString,QVariant> > SettingsMap;
+//Q_DECLARE_METATYPE(SettingsMap)
+
+
+NMView::NMView(QDialog* parent)
+ : QDialog(parent, 0), dbc(QDBusConnection::systemBus())
+{
+ init();
+
+ if (!dbc.isConnected()) {
+ qWarning() << "Unable to connect to D-Bus:" << dbc.lastError();
+ return;
+ }
+ updateConnections();
+ getDevices();
+}
+
+NMView::~NMView()
+{
+}
+void NMView::init()
+{
+ setupUi(this);
+ sess = 0;
+// readSettings();
+ connect(startButton, SIGNAL(clicked()), this, SLOT(activate()));
+ connect(stopButton, SIGNAL(clicked()), this, SLOT(deactivate()));
+ connect(scanButton, SIGNAL(clicked()), this, SLOT(findAccessPoints()));
+ connect(updateButton, SIGNAL(clicked()), this, SLOT(update()));
+
+ connect(cons, SIGNAL(itemActivated(QTreeWidgetItem*, int)),
+ this,SLOT(connectionItemActivated(QTreeWidgetItem*, int)));
+
+
+ connect(devicesTreeWidget, SIGNAL(itemActivated(QTreeWidgetItem*, int)),
+ this, SLOT(deviceItemActivated(QTreeWidgetItem*, int)));
+
+ cons->header()->setResizeMode(QHeaderView::ResizeToContents);
+ devicesTreeWidget->header()->setResizeMode(QHeaderView::ResizeToContents);
+ accessPointsTreeWidget->header()->setResizeMode(QHeaderView::ResizeToContents);
+// accessPointsTreeWidget->header()->setResizeMode(QHeaderView::ResizeToContents);
+
+ manager = new QNetworkConfigurationManager(this);
+
+ connect(manager, SIGNAL(updateCompleted()), this, SLOT(updateCompleted()));
+
+ connect(manager, SIGNAL(configurationAdded(const QNetworkConfiguration &)),
+ this, SLOT(configurationAdded(const QNetworkConfiguration&)));
+
+ devicesTreeWidget->header()->hideSection(0);
+ devicesTreeWidget->header()->hideSection(1);
+ devicesTreeWidget->header()->hideSection(3);
+ devicesTreeWidget->header()->hideSection(5);
+ devicesTreeWidget->header()->hideSection(6);
+ devicesTreeWidget->header()->hideSection(7);
+ devicesTreeWidget->header()->hideSection(8);
+ devicesTreeWidget->header()->hideSection(9);
+}
+
+void NMView::updateConnections()
+{
+ cons->clear();
+ manager->updateConfigurations();
+ QList<QNetworkConfiguration> configs = manager->allConfigurations();
+ foreach(QNetworkConfiguration p, configs) {
+ QStringList strlist;
+ strlist << p.name();
+ strlist << stateToString(p.state());
+ strlist << p.identifier();
+ strlist << typeToString(p.type());
+ QTreeWidgetItem *item;
+ item = new QTreeWidgetItem(strlist);
+ cons->insertTopLevelItem(0, item);
+ }
+ cons->sortItems ( 1, Qt::AscendingOrder);
+}
+
+void NMView::getActiveConnections()
+{
+ QList<QNetworkConfiguration> configs = manager->allConfigurations(QNetworkConfiguration::Active);
+ foreach(QNetworkConfiguration p, configs) {
+ qWarning() << __FUNCTION__ << p.name() << p.identifier();
+ }
+
+// QDBusInterface iface(NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, dbc);
+// if (!iface.isValid()) {
+// qWarning() << "Could not find NetworkManager";
+// return;
+// }
+
+// QVariant prop = iface.property("ActiveConnections");
+// QList<QDBusObjectPath> connections = prop.value<QList<QDBusObjectPath> >();
+// foreach(QDBusObjectPath path, connections) {
+// QDBusInterface conDetails(NM_DBUS_SERVICE, path.path(), NM_DBUS_INTERFACE_ACTIVE_CONNECTION, dbc);
+// if (conDetails.isValid()) {
+// QString desc = path.path();
+// conDetails.property("Connection Path").value<QDBusObjectPath>().path();
+
+// QList<QDBusObjectPath> devices = conDetails.property("Devices").value<QList<QDBusObjectPath> >();
+//
+// foreach(QDBusObjectPath devpath, devices) {
+// QDBusInterface devIface(NM_DBUS_SERVICE, devpath.path(), NM_DBUS_INTERFACE_DEVICE, dbc);
+// desc += " "+devIface.property("Interface").toString();
+// desc += " "+QHostAddress(htonl(devIface.property("Ip4Address").toUInt())).toString();
+
+// }
+
+// qWarning() << conDetails.property("Connection").value<QDBusObjectPath>().path() << path.path();
+
+// QListWidgetItem* item = new QListWidgetItem(desc, activeCons);
+// item->setData(Qt::UserRole, path.path());
+// }
+// }
+}
+
+void NMView::update()
+{
+// QNetworkManagerInterface *dbIface;
+// dbIface = new QNetworkManagerInterface;
+// QList <QDBusObjectPath> connections = dbIface->activeConnections();
+//
+// foreach(QDBusObjectPath conpath, connections) {
+// QNetworkManagerConnectionActive *aConn;
+// aConn = new QNetworkManagerConnectionActive(conpath.path());
+// // in case of accesspoint, specificObject will hold the accessPOintObjectPath
+// qWarning() << aConn->connection().path() << aConn->specificObject().path() << aConn->devices().count();
+// QList <QDBusObjectPath> devs = aConn->devices();
+// foreach(QDBusObjectPath device, devs) {
+// qWarning() << " " << device.path();
+// }
+// }
+
+ QStringList connectionServices;
+ connectionServices << NM_DBUS_SERVICE_SYSTEM_SETTINGS;
+ connectionServices << NM_DBUS_SERVICE_USER_SETTINGS;
+ foreach (QString service, connectionServices) {
+ QDBusInterface allCons(service,
+ NM_DBUS_PATH_SETTINGS,
+ NM_DBUS_IFACE_SETTINGS,
+ dbc);
+ if (allCons.isValid()) {
+ QDBusReply<QList<QDBusObjectPath> > reply = allCons.call("ListConnections");
+ if ( reply.isValid() ) {
+ QList<QDBusObjectPath> list = reply.value();
+ foreach(QDBusObjectPath path, list) {
+ QDBusInterface sysIface(service,
+ path.path(),
+ NM_DBUS_IFACE_SETTINGS_CONNECTION,
+ dbc);
+ if (sysIface.isValid()) {
+ qWarning() << "";
+ qWarning() << path.path();
+
+ // QDBusMessage r = sysIface.call("GetSettings");
+ QDBusReply< QNmSettingsMap > rep = sysIface.call("GetSettings");
+
+ QMap< QString, QMap<QString,QVariant> > map = rep.value();
+ QList<QString> list = map.keys();
+ foreach (QString key, list) {
+ QMap<QString,QVariant> innerMap = map[key];
+ qWarning() << " Key: " << key;
+ QMap<QString,QVariant>::const_iterator i = innerMap.constBegin();
+
+ while (i != innerMap.constEnd()) {
+ QString k = i.key();
+ qWarning() << " Key: " << k << " Entry: " << i.value();
+ i++;
+ }//end innerMap
+ }//end foreach key
+ }//end settings connection
+ } // foreach path
+ } //end ListConnections
+ } //end settingsInterface
+ }// end services
+ QDBusInterface iface(NM_DBUS_SERVICE,
+ NM_DBUS_PATH,
+ NM_DBUS_INTERFACE,
+ dbc);
+ if (iface.isValid()) {
+ QVariant prop = iface.property("ActiveConnections");
+ QList<QDBusObjectPath> connections = prop.value<QList<QDBusObjectPath> >();
+ foreach(QDBusObjectPath conpath, connections) {
+ qWarning() << "Active connection" << conpath.path();
+ QDBusInterface conDetails(NM_DBUS_SERVICE,
+ conpath.path(),
+ NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
+ dbc);
+ if (conDetails.isValid()) {
+
+ QVariant prop = conDetails.property("Connection");
+ QDBusObjectPath connection = prop.value<QDBusObjectPath>();
+ qWarning() << conDetails.property("Default").toBool() << connection.path();
+
+// QVariant Sprop = conDetails.property("Devices");
+// QList<QDBusObjectPath> so = Sprop.value<QList<QDBusObjectPath> >();
+// foreach(QDBusObjectPath device, so) {
+// if(device.path() == devicePath) {
+// path = connection.path();
+// }
+// break;
+// }
+ }
+ }
+ }
+qWarning() << "";
+}
+
+void NMView::deactivate()
+{
+ QList<QNetworkConfiguration> configs = manager->allConfigurations(QNetworkConfiguration::Active);
+ foreach(QNetworkConfiguration p, configs) {
+ qWarning() << "Active cons" << p.name();
+ if(p.name() == cons->currentItem()->text(0)
+ && p.identifier() == cons->currentItem()->text(2)) {
+ qWarning() <<__FUNCTION__<< p.name();
+ if(!sess) {
+ sess = new QNetworkSession(p);
+
+ connect(sess, SIGNAL(stateChanged(QNetworkSession::State)),
+ this, SLOT(stateChanged(QNetworkSession::State)));
+
+ connect(sess, SIGNAL(error(QNetworkSession::SessionError)),
+ this, SLOT(networkSessionError(QNetworkSession::SessionError)));
+ }
+ sess->close();
+ delete sess;
+ sess = 0;
+ }
+ }
+}
+
+void NMView::activate()
+{
+ qWarning() << __FUNCTION__ << cons->currentItem()->text(0);
+
+ QList<QNetworkConfiguration> configs = manager->allConfigurations();
+ foreach(QNetworkConfiguration p, configs) {
+ if(p.name() == cons->currentItem()->text(0)) {
+
+ sess = new QNetworkSession(p);
+
+ connect(sess, SIGNAL(newConfigurationActivated()),
+ this, SLOT(getActiveConnections()));
+
+ connect(sess, SIGNAL(stateChanged(QNetworkSession::State)),
+ this, SLOT(stateChanged(QNetworkSession::State)));
+
+ connect(sess, SIGNAL(error(QNetworkSession::SessionError)),
+ this, SLOT(networkSessionError(QNetworkSession::SessionError)));
+
+ sess->open();
+ }
+ }
+}
+
+void NMView::getDevices()
+{
+ qWarning() << "";
+ qWarning() << __FUNCTION__;
+ devicesTreeWidget->clear();
+ //qDBusRegisterMetaType<SettingsMap>();
+
+ if (!dbc.isConnected()) {
+ qWarning() << "Unable to connect to D-Bus:" << dbc.lastError();
+ return;
+ }
+ QDBusInterface iface(NM_DBUS_SERVICE,
+ NM_DBUS_PATH,
+ NM_DBUS_INTERFACE,
+ dbc);
+//NetworkManager interface
+ if (!iface.isValid()) {
+ qWarning() << "Could not find NetworkManager";
+ return;
+ }
+
+// uint state = iface.property("State").toUInt();
+// switch(state) {
+// case NM_STATE_UNKNOWN:
+// qWarning() << "State: Unknown"; break;
+// case NM_STATE_ASLEEP:
+// qWarning() << "State: Asleep"; break;
+// case NM_STATE_CONNECTING:
+// qWarning() << "State: Connecting"; break;
+// case NM_STATE_CONNECTED:
+// qWarning() << "State: Connected"; break;
+// case NM_STATE_DISCONNECTED:
+// qWarning() << "State: Disconnected"; break;
+// }
+
+ //get list of network devices
+ QTreeWidgetItem *item;
+ QDBusReply<QList<QDBusObjectPath> > reply = iface.call("GetDevices");
+ if ( reply.isValid() ) {
+// qWarning() << "Current devices:";
+ QList<QDBusObjectPath> list = reply.value();
+ foreach(QDBusObjectPath path, list) {
+ QStringList devicesList;
+ qWarning() << " " << path.path();
+ devicesList << path.path();
+
+ QDBusInterface devIface(NM_DBUS_SERVICE,
+ path.path(),
+ NM_DBUS_INTERFACE_DEVICE,
+ dbc);
+ if (devIface.isValid()) {
+
+
+
+ ////// connect the dbus signal
+// /*if(*/dbc.connect(NM_DBUS_SERVICE,
+// path.path(),
+// NM_DBUS_INTERFACE_DEVICE,
+// "StateChanged",
+// this,SLOT(deviceStateChanged(quint32)));
+// {
+// qWarning() << "XXXXXXXXXX dbus connect successful" << path.path();
+// }
+
+
+ // qWarning() << " Managed: " << devIface.property("Managed").toBool();
+ devicesList << devIface.property("Managed").toString();
+ // qWarning() << " Interface: " << devIface.property("Interface").toString();
+ devicesList << devIface.property("Interface").toString();
+ // qWarning() << " HAL UDI: " << devIface.property("Udi").toString();
+ // qWarning() << " Driver: " << devIface.property("Driver").toString();
+ devicesList << devIface.property("Driver").toString();
+
+ QString x = deviceTypeToString(devIface.property("DeviceType").toUInt());
+ // qWarning() << " Type:" << x;
+ devicesList << x;
+
+ if( devIface.property("DeviceType").toUInt() == DEVICE_TYPE_802_11_WIRELESS) {
+ qWarning() << "Device is WIFI";
+ // // findAccessPoints(path.path());
+ }
+
+ QVariant v = devIface.property("State");
+ x = deviceStateToString(v.toUInt());
+// qWarning() << " State:" << x;
+ devicesList << x;
+
+ quint32 ip = devIface.property("Ip4Address").toUInt();
+// qWarning() << " IP4Address: " << QHostAddress(htonl(ip)).toString();
+ devicesList << QHostAddress(htonl(ip)).toString();
+
+
+ if (v.toUInt() == NM_DEVICE_STATE_ACTIVATED) {
+ QString path = devIface.property("Ip4Config").value<QDBusObjectPath>().path();
+// qWarning() << " IP4Config: " << path;
+ devicesList << path;
+ QDBusInterface ipIface(NM_DBUS_SERVICE,
+ path,
+ NM_DBUS_INTERFACE_IP4_CONFIG,
+ dbc);
+ if (ipIface.isValid()) {
+ // qWarning() << " Hostname: " << ipIface.property("Hostname").toString();
+ devicesList << ipIface.property("Hostname").toString();
+// qWarning() << " Domains: " << ipIface.property("Domains").toStringList();
+ devicesList << ipIface.property("Domains").toStringList().join(", ");
+// qWarning() << " NisDomain: " << ipIface.property("NisDomain").toString();
+ QDBusArgument arg= ipIface.property("Addresses").value<QDBusArgument>();
+// qWarning() << " Addresses: " << ipIface.property("Addresses");
+// qWarning() << " Nameservers: " << ipIface.property("Nameservers");
+// qWarning() << " NisServers: " << ipIface.property("NisServers");
+ }
+
+ }
+
+ }
+ item = new QTreeWidgetItem(devicesList);
+ devicesTreeWidget->insertTopLevelItem(0, item);
+ }
+ }
+
+
+// netconfig();
+
+}
+
+void NMView::readSettings()
+{
+ QDBusInterface settingsiface(NM_DBUS_SERVICE_SYSTEM_SETTINGS,
+ NM_DBUS_PATH_SETTINGS,
+ NM_DBUS_IFACE_SETTINGS,
+ dbc);
+ //NetworkManagerSettings interface
+ if (settingsiface.isValid()) {
+ QDBusReply<QList<QDBusObjectPath> > reply = settingsiface.call("ListConnections");
+ if ( reply.isValid() ) {
+ QList<QDBusObjectPath> list = reply.value();
+ foreach(QDBusObjectPath path, list) {
+ qWarning() <<__FUNCTION__ << path.path();
+
+ }
+ }
+ }
+
+ QDBusInterface iface(NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, dbc);
+ if (!iface.isValid()) {
+ qWarning() << "Could not find NetworkManager";
+ return;
+ }
+
+ // QStringList list = item->text().split(" -> ");
+
+ QVariant prop = iface.property("ActiveConnections");
+ QList<QDBusObjectPath> connections = prop.value<QList<QDBusObjectPath> >();
+ foreach(QDBusObjectPath path, connections) {
+ QDBusInterface conDetails(NM_DBUS_SERVICE,
+ path.path(),
+ NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
+ dbc);
+
+ if (conDetails.isValid()) {
+ QString desc = path.path();
+ qWarning() << desc;
+ //if ( item->text(0) == conDetails.property("Connection").value<QDBusObjectPath>().path() ) {
+ // QListWidgetItem* item = new QTreeWidgetItem( desc,
+ // cons);
+ // item->setData(Qt::UserRole, desc);
+ // activeItemActivated( item );
+ //}
+ }
+ }
+}
+
+void NMView::printConnectionDetails(const QString& service)
+{
+ Q_UNUSED(service);
+
+//
+// qWarning() << __FUNCTION__ << service;
+//
+// QDBusConnection dbc = QDBusConnection::systemBus();
+// if (!dbc.isConnected()) {
+// qWarning() << "Unable to connect to D-Bus:" << dbc.lastError();
+// return;
+// }
+// QDBusInterface allCons(service,
+// NM_DBUS_PATH_SETTINGS,
+// NM_DBUS_IFACE_SETTINGS,
+// dbc);
+//
+// if (allCons.isValid()) {
+// QDBusReply<QList<QDBusObjectPath> > reply = allCons.call("ListConnections");
+//
+// if ( reply.isValid() ) {
+// qWarning() << "Known connections:";
+// QList<QDBusObjectPath> list = reply.value();
+//
+// foreach(QDBusObjectPath path, list) {
+// qWarning() << " " << path.path();
+//
+// QDBusInterface sysIface(NM_DBUS_SERVICE_SYSTEM_SETTINGS,
+// path.path(),
+// NM_DBUS_IFACE_SETTINGS_CONNECTION,
+// dbc);
+//
+// if (sysIface.isValid()) {
+// QDBusMessage r = sysIface.call("GetSettings");
+// QDBusReply< QSettingsMap > rep = sysIface.call("GetSettings");
+//
+// qWarning() << " GetSettings:" << r.arguments() << r.signature() << rep.isValid() << sysIface.lastError();
+//
+// QMap< QString, QMap<QString,QVariant> > map = rep.value();
+// QList<QString> list = map.keys();
+//
+// foreach (QString key, list) {
+// QMap<QString,QVariant> innerMap = map[key];
+// qWarning() << " Key: " << key;
+// QMap<QString,QVariant>::const_iterator i = innerMap.constBegin();
+//
+// while (i != innerMap.constEnd()) {
+// QString k = i.key();
+// qWarning() << " Key: " << k << " Entry: " << i.value();
+//
+// if (k == "addresses" && i.value().canConvert<QDBusArgument>()) {
+// QDBusArgument arg = i.value().value<QDBusArgument>();
+// arg.beginArray();
+//
+// while (!arg.atEnd()) {
+// QDBusVariant addr;
+// arg >> addr;
+// uint ip = addr.variant().toUInt();
+// qWarning() << ip;
+// qWarning() << " " << QHostAddress(htonl(ip)).toString();
+// }
+//
+// }
+// i++;
+// }
+// }
+// }
+// }
+// }
+// }
+ qWarning() << "";
+}
+
+void NMView::getNetworkDevices()
+{
+
+}
+
+void NMView::connectionItemActivated( QTreeWidgetItem * item, int col )
+{
+ Q_UNUSED(col);
+
+ qWarning() <<__FUNCTION__<< item->text(0);
+ QDBusInterface iface(NM_DBUS_SERVICE,
+ NM_DBUS_PATH,
+ NM_DBUS_INTERFACE,
+ dbc);
+ if (!iface.isValid()) {
+ qWarning() << "Could not find NetworkManager";
+ return;
+ }
+ QVariant prop = iface.property("ActiveConnections");
+ QList<QDBusObjectPath> connections = prop.value<QList<QDBusObjectPath> >();
+ foreach(QDBusObjectPath path, connections) {
+ QDBusInterface conDetails(NM_DBUS_SERVICE,
+ path.path(),
+ NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
+ dbc);
+
+ if (conDetails.isValid()) {
+ QString desc = path.path();
+ qWarning() << desc;
+ if ( item->text(0) == conDetails.property("Connection").value<QDBusObjectPath>().path() ) {
+// QListWidgetItem* item = new QTreeWidgetItem( desc,
+// cons);
+// item->setData(Qt::UserRole, desc);
+// activeItemActivated( item );
+ }
+ }
+ }
+}
+
+
+
+void NMView::deviceItemActivated( QTreeWidgetItem * item , int section)
+{
+ Q_UNUSED(item);
+ Q_UNUSED(section);
+
+ // qWarning() << item->text(section) << item->text(4);
+ //if(item->text(4) == "Wireless") findAccessPoints(item->text(0));
+}
+
+
+void NMView::netconfig()
+{
+// qWarning() << __FUNCTION__;
+
+// qDBusRegisterMetaType<SettingsMap>();
+ QDBusConnection dbc = QDBusConnection::systemBus();
+ if (!dbc.isConnected()) {
+ qWarning() << "Unable to connect to D-Bus:" << dbc.lastError();
+ return;
+ }
+
+ QDBusInterface iface(NM_DBUS_SERVICE,
+ NM_DBUS_PATH,
+ NM_DBUS_IFACE_SETTINGS_CONNECTION,
+ dbc);
+ if (!iface.isValid()) {
+ qWarning() << "Could not find NetworkManager Settings";
+ return;
+ } else {
+ QDBusReply<QList<QDBusObjectPath> > reply = iface.call("ListConnections");
+ QList<QDBusObjectPath> list = reply.value();
+// qWarning() << reply.value();
+ foreach(QDBusObjectPath path, list) {
+ qWarning() << " " << path.path();
+ }
+ }
+}
+
+
+void NMView::findAccessPoints()
+{
+ accessPointsTreeWidget->clear();
+
+ QDBusInterface iface(NM_DBUS_SERVICE,
+ NM_DBUS_PATH,
+ NM_DBUS_INTERFACE,
+ dbc);
+
+ QDBusReply<QList<QDBusObjectPath> > reply = iface.call("GetDevices");
+ if ( reply.isValid() ) {
+ QList<QDBusObjectPath> list = reply.value();
+ foreach(QDBusObjectPath path, list) {
+ QDBusInterface devIface(NM_DBUS_SERVICE,
+ path.path(),
+ NM_DBUS_INTERFACE_DEVICE,
+ dbc);
+ if (devIface.isValid()) {
+
+ if( devIface.property("DeviceType").toUInt() == DEVICE_TYPE_802_11_WIRELESS) {
+
+// qWarning() <<"deviface"<< devIface.path();
+ QDBusInterface wififace(NM_DBUS_SERVICE,
+ devIface.path(),
+ NM_DBUS_INTERFACE_DEVICE_WIRELESS,
+ dbc);
+ if (!wififace.isValid()) {
+ qWarning() << "Could not find NetworkManager wireless interface";
+ return;
+ }
+
+/////////////////////////
+// if(dbc.connect(NM_DBUS_SERVICE,
+// path.path(),
+// NM_DBUS_INTERFACE_DEVICE_WIRELESS,
+// "PropertiesChanged",
+// this,SLOT(aPPropertiesChanged( QMap<QString,QVariant>))) ) {
+// qWarning() << "PropertiesChanged connect";
+// } else {
+// qWarning() << "NOT connect";
+
+// }
+/////////////////////////
+ qWarning() <<"wififace"<< wififace.path();
+ QDBusReply<QList<QDBusObjectPath> > reply2 = wififace.call("GetAccessPoints");
+ if ( reply2.isValid() ) {
+ QTreeWidgetItem *item;
+ QList<QDBusObjectPath> list2 = reply2.value();
+ foreach(QDBusObjectPath path2, list2) {
+ QDBusInterface accessPointIface(NM_DBUS_SERVICE,
+ path2.path(),
+ NM_DBUS_INTERFACE_ACCESS_POINT,
+ dbc);
+ if (accessPointIface.isValid()) {
+//// qWarning() <<"path2" << path2.path();
+
+// if(dbc.connect(NM_DBUS_SERVICE, //signal strength
+// path2.path(),
+// NM_DBUS_INTERFACE_ACCESS_POINT,
+// "PropertiesChanged",
+// this,SLOT(aPPropertiesChanged( QMap<QString,QVariant>))) ) {
+// qWarning() << "PropertiesChanged connect";
+// } else {
+// qWarning() << "NOT connect";
+//
+// }
+
+ QStringList accessPoints;
+ accessPoints << accessPointIface.property("Ssid").toString();
+ accessPoints << QString::number(accessPointIface.property("Strength").toInt());
+ accessPoints << securityCapabilitiesToString(accessPointIface.property("WpaFlags" ).toInt());
+ accessPoints << securityCapabilitiesToString(accessPointIface.property("RsnFlags" ).toInt());
+ accessPoints << accessPointIface.property("Frequency" ).toString();
+ accessPoints << accessPointIface.property("HwAddress" ).toString();
+ accessPoints << deviceModeToString(accessPointIface.property("Mode" ).toInt());
+ accessPoints << accessPointIface.property("MaxBitrate" ).toString();
+ //HwAddress
+ // if(accessPointIface.property("Flags" ).toInt() == NM_802_11_AP_FLAGS_PRIVACY ) {
+ // qWarning() << "Secure";
+ // }
+ item = new QTreeWidgetItem(accessPoints);
+ accessPointsTreeWidget->insertTopLevelItem(0, item);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+QString NMView::deviceStateToString(int state)
+{
+ QString ret;
+ switch(state) {
+ case NM_DEVICE_STATE_UNKNOWN:
+ ret = "Unknown";
+ break;
+ case NM_DEVICE_STATE_UNMANAGED:
+ ret = "Unmanaged";
+ break;
+ case NM_DEVICE_STATE_UNAVAILABLE:
+ ret = "Unavailable";
+ break;
+ case NM_DEVICE_STATE_DISCONNECTED:
+ ret = "Disconnected";
+ break;
+ case NM_DEVICE_STATE_PREPARE:
+ ret = "Preparing to connect";
+ break;
+ case NM_DEVICE_STATE_CONFIG:
+ ret = "Being configured";
+ break;
+ case NM_DEVICE_STATE_NEED_AUTH:
+ ret = "Awaiting secrets";
+ break;
+ case NM_DEVICE_STATE_IP_CONFIG:
+ ret = "IP requested";
+ break;
+ case NM_DEVICE_STATE_ACTIVATED:
+ ret = "Activated";
+ break;
+ case NM_DEVICE_STATE_FAILED:
+ ret = "FAILED";
+ break;
+ };
+ return ret;
+}
+
+QString NMView::deviceTypeToString(int device)
+{
+ QString ret;
+ switch(device) {
+ case DEVICE_TYPE_UNKNOWN:
+ ret = "Unknown";
+ break;
+ case DEVICE_TYPE_802_3_ETHERNET:
+ ret = "Ethernet";
+ break;
+ case DEVICE_TYPE_802_11_WIRELESS:
+ ret = "Wireless";
+ break;
+ case DEVICE_TYPE_GSM:
+ ret = "GSM";
+ break;
+ case DEVICE_TYPE_CDMA:
+ ret = "CDMA";
+ break;
+ };
+ return ret;
+}
+
+QString NMView::securityCapabilitiesToString(int caps)
+{
+ int check = caps;
+// qWarning() << __FUNCTION__<< caps;
+ QString ret;
+ if( check == 0 )
+ ret += "None.";
+ if( (check & NM_802_11_AP_SEC_PAIR_WEP40))
+ ret += " 40-bit WEP encryption. ";
+ if( (check & NM_802_11_AP_SEC_PAIR_WEP104) )
+ ret += " 104-bit WEP encryption. ";
+ if( (check & NM_802_11_AP_SEC_PAIR_TKIP) )
+ ret += " TKIP encryption. ";
+ if( (check & NM_802_11_AP_SEC_PAIR_CCMP) )
+ ret += " CCMP encryption. ";
+ if( (check & NM_802_11_AP_SEC_GROUP_WEP40))
+ ret += " 40-bit WEP cipher. ";
+ if( (check & NM_802_11_AP_SEC_GROUP_WEP104))
+ ret += " 104-bit WEP cipher. ";
+ if( (check & NM_802_11_AP_SEC_GROUP_TKIP) )
+ ret += " TKIP cipher. ";
+ if( (check & NM_802_11_AP_SEC_GROUP_CCMP) )
+ ret += " CCMP cipher. ";
+ if( (check & NM_802_11_AP_SEC_KEY_MGMT_PSK))
+ ret += " PSK key management. ";
+ if( (check & NM_802_11_AP_SEC_KEY_MGMT_802_1X) )
+ ret += " 802.1x key management. ";
+ return ret;
+}
+
+QString NMView::deviceModeToString(int mode)
+{
+ QString ret;
+ switch (mode) {
+ case NM_802_11_MODE_UNKNOWN:
+ ret = "Unknown";
+ break;
+ case NM_802_11_MODE_ADHOC:
+ ret = " (Adhoc).";
+ break;
+ case NM_802_11_MODE_INFRA:
+ ret = " (Infrastructure)";
+ };
+ return ret;
+}
+
+void NMView::netManagerState(quint32 state)
+{
+ qWarning() << __FUNCTION__ << state;// << old << reason;
+ switch(state) {
+ case NM_STATE_UNKNOWN:
+ qWarning() << "The NetworkManager daemon is in an unknown state. ";
+ break;
+ case NM_STATE_ASLEEP:
+ qWarning() << "The NetworkManager daemon is asleep and all interfaces managed by it are inactive. ";
+ break;
+ case NM_STATE_CONNECTING:
+ qWarning() << "The NetworkManager daemon is connecting a device. FIXME: What does this mean when one device is active and another is connecting? ";
+ break;
+ case NM_STATE_CONNECTED:
+ qWarning() <<"The NetworkManager daemon is connected. ";
+ break;
+ case NM_STATE_DISCONNECTED:
+ qWarning() << "The NetworkManager daemon is disconnected.";
+ break;
+
+ };
+}
+
+void NMView::deviceStateChanged(quint32 state)
+{
+ qWarning() << __FUNCTION__ << state;
+ switch(state) {
+ case NM_DEVICE_STATE_UNKNOWN :
+ qWarning() <<"The device is in an unknown state. ";
+ break;
+ case NM_DEVICE_STATE_UNMANAGED:
+ qWarning() <<"The device is not managed by NetworkManager.";
+ break;
+ case NM_DEVICE_STATE_UNAVAILABLE:
+ qWarning() <<"The device cannot be used (carrier off, rfkill, etc).";
+ break;
+ case NM_DEVICE_STATE_DISCONNECTED:
+ qWarning() <<"The device is not connected.";
+ break;
+ case NM_DEVICE_STATE_PREPARE:
+ qWarning() <<"The device is preparing to connect.";
+ break;
+ case NM_DEVICE_STATE_CONFIG:
+ qWarning() <<"The device is being configured.";
+ break;
+ case NM_DEVICE_STATE_NEED_AUTH:
+ qWarning() <<"The device is awaiting secrets necessary to continue connection.";
+ break;
+ case NM_DEVICE_STATE_IP_CONFIG:
+ qWarning() <<"The IP settings of the device are being requested and configured.";
+ break;
+ case NM_DEVICE_STATE_ACTIVATED:
+ qWarning() <<"The device is active.";
+ break;
+ case NM_DEVICE_STATE_FAILED:
+ qWarning() <<"The device is in a failure state following an attempt to activate it.";
+ break;
+ };
+}
+
+void NMView::updateCompleted()
+{
+ qWarning() << __FUNCTION__;
+}
+
+void NMView::newConfigurationActivated()
+{
+ qWarning() << __FUNCTION__;
+ getActiveConnections();
+}
+
+void NMView::stateChanged(QNetworkSession::State state)
+{
+ // QString stateStringstr;
+ switch (state) {
+ case QNetworkSession::Invalid:
+ stateString = "Invalid session";
+ break;
+ case QNetworkSession::NotAvailable:
+ stateString = "Session is defined but not yet discovered";
+ break;
+ case QNetworkSession::Connecting:
+ stateString = "Session is being established";
+ break;
+ case QNetworkSession::Connected:
+ stateString = "Session is active and can be used for socket operations";
+ cons->currentItem()->setText(1, "Active");
+ break;
+ case QNetworkSession::Closing:
+ stateString = "Session is being shutdown";
+ break;
+ case QNetworkSession::Disconnected:
+ qWarning() << __FUNCTION__;
+ manager->updateConfigurations();
+ stateString = "Session disconnected";
+ cons->currentItem()->setText(1,"Discovered") ;
+ break;
+ case QNetworkSession::Roaming:
+ stateString = "session is roaming from one AP to another";
+ break;
+ };
+ qWarning() << __FUNCTION__ << state << stateString;
+}
+
+QString NMView::stateToString(int state)
+{
+ switch (state) {
+ case QNetworkConfiguration::Undefined:
+ return "Undefined";
+ break;
+ case QNetworkConfiguration::Defined:
+ return "Defined";
+ break;
+ case QNetworkConfiguration::Discovered:
+ return "Discovered";
+ break;
+ case QNetworkConfiguration::Active:
+ return "Active";
+ break;
+ };
+ return "";
+}
+
+void NMView::configurationAdded(const QNetworkConfiguration &config)
+{
+ qWarning() << __FUNCTION__<< config.name() << config.identifier();
+}
+
+QString NMView::typeToString(int type)
+{
+ switch(type) {
+ case QNetworkConfiguration::InternetAccessPoint:
+ return "Internet AccessPoint";
+ break;
+ case QNetworkConfiguration::ServiceNetwork:
+ return "Service Network";
+ break;
+ };
+ return QString();
+}
+
+void NMView::aPPropertiesChanged( QMap<QString,QVariant> map)
+{
+ //QMap<QString, QVariant>::const_iterator iterator = d->values.find(type + QLatin1String("Path"))
+ QMapIterator<QString, QVariant> i(map);
+ while (i.hasNext()) {
+ i.next();
+ if( i.key() == "State") {
+ qWarning() << __FUNCTION__ << i.key() << ": " << i.value().toUInt();
+// deviceStateChanged(i.value().toUInt());
+ } else if( i.key() == "ActiveAccessPoint") {
+ qWarning() << __FUNCTION__ << i.key() << ": " << i.value().value<QDBusObjectPath>().path();
+ } else if( i.key() == "Strength")
+ qWarning() << __FUNCTION__ << i.key() << ": " << i.value().toUInt();
+ else
+ qWarning() << __FUNCTION__ << i.key() << ": " << i.value();
+ }
+}
+
+void NMView::networkSessionError(QNetworkSession::SessionError error)
+{
+ QString errorStr;
+ switch(error) {
+ case QNetworkSession::RoamingError:
+ errorStr = "Roaming error";
+ break;
+ case QNetworkSession::SessionAbortedError:
+ errorStr = "Session aborted by user or system";
+ break;
+ default:
+ case QNetworkSession::UnknownSessionError:
+ errorStr = "Unidentified Error";
+ break;
+ };
+
+ QMessageBox::warning(this, tr("NMView"), errorStr, QMessageBox::Ok);
+}
diff --git a/tests/manual/networkmanager/nmview.h b/tests/manual/networkmanager/nmview.h
new file mode 100644
index 0000000000..41ee04f5bf
--- /dev/null
+++ b/tests/manual/networkmanager/nmview.h
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QWidget>
+#include <QDBusConnection>
+#include <qnetworkconfigmanager.h>
+#include <qnetworksession.h>
+#include <qnetworkconfiguration.h>
+
+#include "ui_dialog.h"
+
+QT_USE_NAMESPACE
+
+QT_BEGIN_NAMESPACE
+class QListWidget;
+class QTreeWidget;
+class QTreeWidgetItem;
+QT_END_NAMESPACE
+
+class NMView : public QDialog, private Ui::Dialog
+{
+ Q_OBJECT
+public:
+ NMView(QDialog* parent = 0);
+ virtual ~NMView();
+
+private:
+ void init();
+ QString stateString;
+
+ QDBusConnection dbc;
+ void printConnectionDetails(const QString&);
+
+ QString deviceStateToString(int state);
+ QString deviceTypeToString(int device);
+ QString securityCapabilitiesToString(int caps);
+ QString deviceModeToString(int mode);
+//QDBusInterface getInterface();
+ QNetworkConfigurationManager *manager;
+ QNetworkSession *sess;
+ QString stateToString(int state);
+ QString typeToString(int type);
+
+private slots:
+ void update();
+ void deactivate();
+ void activate();
+ void getActiveConnections();
+ void updateConnections();
+ void getDevices();
+ // void readConnectionManagerDetails();
+ void getNetworkDevices();
+ void connectionItemActivated( QTreeWidgetItem *, int);
+// void activeItemActivated( QListWidgetItem *);
+ void deviceItemActivated( QTreeWidgetItem *, int);
+ void netconfig();
+ void findAccessPoints();
+
+ void netManagerState(quint32);
+ void readSettings();
+ void updateCompleted();
+ void newConfigurationActivated();
+
+ void stateChanged(QNetworkSession::State);
+ void deviceStateChanged(quint32 state);
+
+ void configurationAdded(const QNetworkConfiguration &config);
+ void aPPropertiesChanged( QMap<QString,QVariant> map);
+ void networkSessionError(QNetworkSession::SessionError);
+
+};
diff --git a/tests/manual/networkmanager/startdlg.cpp b/tests/manual/networkmanager/startdlg.cpp
new file mode 100644
index 0000000000..e34b5e9c05
--- /dev/null
+++ b/tests/manual/networkmanager/startdlg.cpp
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "startdlg.h"
+#include <NetworkManager/NetworkManager.h>
+
+
+StartDialog::StartDialog(QWidget * parent)
+ :QDialog(parent)
+{
+ QVBoxLayout *layout = new QVBoxLayout(this);
+ box = new QComboBox();
+ layout->addWidget(box);
+
+ QHBoxLayout* hbox = new QHBoxLayout();
+ QPushButton* start = new QPushButton("Start");
+ connect(start, SIGNAL(clicked()), this, SLOT(accept()));
+ QPushButton* cancel = new QPushButton("Cancel");
+ connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));
+
+
+ hbox->addWidget(start);
+ hbox->addWidget(cancel);
+
+ layout->addLayout(hbox);
+
+ QDBusConnection dbc = QDBusConnection::systemBus();
+ if (!dbc.isConnected()) {
+ qWarning() << "Unable to connect to D-Bus:" << dbc.lastError();
+ return;
+ }
+ QDBusInterface iface(NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, dbc);
+ if (!iface.isValid()) {
+ qWarning() << "Could not find NetworkManager";
+ return;
+ }
+ QDBusReply<QList<QDBusObjectPath> > reply = iface.call("GetDevices");
+ if ( reply.isValid() ) {
+ QList<QDBusObjectPath> list = reply.value();
+ foreach(QDBusObjectPath path, list) {
+ QDBusInterface devIface(NM_DBUS_SERVICE, path.path(), NM_DBUS_INTERFACE_DEVICE, dbc);
+ if ( devIface.isValid() ) {
+ box->addItem(devIface.property("Interface").toString(), QVariant(path.path()));
+ }
+ }
+ }
+}
+
+QString StartDialog::device() const
+{
+ return dev;
+}
+
+void StartDialog::accept()
+{
+ dev = box->itemData(box->currentIndex(), Qt::UserRole).toString();
+ QDialog::accept();
+}
diff --git a/tests/manual/networkmanager/startdlg.h b/tests/manual/networkmanager/startdlg.h
new file mode 100644
index 0000000000..32c8557c98
--- /dev/null
+++ b/tests/manual/networkmanager/startdlg.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QDialog>
+#include <QtDBus>
+#include <QtGui>
+
+class StartDialog : public QDialog
+{
+ Q_OBJECT
+public:
+ StartDialog(QWidget* parent = 0);
+
+ QString device() const;
+
+public slots:
+ void accept();
+private:
+ QString dev;
+ QComboBox* box;
+};
diff --git a/tools/assistant/assistant.pro b/tools/assistant/assistant.pro
index 08d0d4b8f1..97196b2532 100644
--- a/tools/assistant/assistant.pro
+++ b/tools/assistant/assistant.pro
@@ -3,6 +3,4 @@ CONFIG += ordered
SUBDIRS += lib/fulltextsearch \
lib \
- tools \
- compat \
- compat/lib \ \ No newline at end of file
+ tools
diff --git a/tools/assistant/compat/Info_mac.plist b/tools/assistant/compat/Info_mac.plist
deleted file mode 100644
index b1e6336fb0..0000000000
--- a/tools/assistant/compat/Info_mac.plist
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
-<plist version="0.9">
-<dict>
- <key>CFBundleIconFile</key>
- <string>@ICON@</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleIdentifier</key>
- <string>com.trolltech.assistant-compat</string>
- <key>CFBundleExecutable</key>
- <string>@EXECUTABLE@</string>
-</dict>
-</plist>
diff --git a/tools/assistant/compat/assistant.icns b/tools/assistant/compat/assistant.icns
deleted file mode 100644
index 6291dd3975..0000000000
--- a/tools/assistant/compat/assistant.icns
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/assistant.ico b/tools/assistant/compat/assistant.ico
deleted file mode 100644
index 9e1b83f1b6..0000000000
--- a/tools/assistant/compat/assistant.ico
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/assistant.pro b/tools/assistant/compat/assistant.pro
deleted file mode 100644
index e865d6b7a6..0000000000
--- a/tools/assistant/compat/assistant.pro
+++ /dev/null
@@ -1,84 +0,0 @@
-include($$QT_SOURCE_TREE/tools/shared/fontpanel/fontpanel.pri)
-
-TEMPLATE = app
-LANGUAGE = C++
-TARGET = assistant_adp
-
-CONFIG += qt warn_on
-
-unix:contains(QT_CONFIG, dbus):QT += dbus
-
-build_all:!build_pass {
- CONFIG -= build_all
- CONFIG += release
-}
-QT += xml network
-
-PROJECTNAME = Assistant
-DESTDIR = ../../../bin
-
-FORMS += helpdialog.ui \
- mainwindow.ui \
- tabbedbrowser.ui \
- topicchooser.ui
-
-SOURCES += main.cpp \
- helpwindow.cpp \
- topicchooser.cpp \
- docuparser.cpp \
- index.cpp \
- profile.cpp \
- config.cpp \
- helpdialog.cpp \
- mainwindow.cpp \
- tabbedbrowser.cpp \
- fontsettingsdialog.cpp
-
-HEADERS += helpwindow.h \
- topicchooser.h \
- docuparser.h \
- index.h \
- profile.h \
- helpdialog.h \
- mainwindow.h \
- tabbedbrowser.h \
- config.h \
- fontsettingsdialog.h
-
-RESOURCES += assistant.qrc
-
-contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE
-DEFINES += QT_KEYWORDS
-#DEFINES += QT_PALMTOPCENTER_DOCS
-
-win32 {
- !wince*:LIBS += -lshell32
- RC_FILE = assistant.rc
-}
-
-mac {
- ICON = assistant.icns
- TARGET = Assistant_adp
- QMAKE_INFO_PLIST = Info_mac.plist
-}
-
-target.path=$$[QT_INSTALL_BINS]
-INSTALLS += target
-
-TRANSLATIONS = assistant_de.ts
-
-unix:!contains(QT_CONFIG, zlib):LIBS += -lz
-
-contains(CONFIG, static): {
- win32 {
- exists($$[QT_INSTALL_PLUGINS]/imageformats/qjpeg.lib) {
- QTPLUGIN += qjpeg
- DEFINES += USE_STATIC_JPEG_PLUGIN
- }
- } else {
- exists($$[QT_INSTALL_PLUGINS]/imageformats/qjpeg.a) {
- QTPLUGIN += qjpeg
- DEFINES += USE_STATIC_JPEG_PLUGIN
- }
- }
-}
diff --git a/tools/assistant/compat/assistant.qrc b/tools/assistant/compat/assistant.qrc
deleted file mode 100644
index dae1f48ad0..0000000000
--- a/tools/assistant/compat/assistant.qrc
+++ /dev/null
@@ -1,37 +0,0 @@
-<RCC>
- <qresource prefix="/trolltech/assistant" >
- <file>images/assistant-128.png</file>
- <file>images/assistant.png</file>
- <file>images/close.png</file>
- <file>images/designer.png</file>
- <file>images/linguist.png</file>
- <file>images/mac/addtab.png</file>
- <file>images/mac/book.png</file>
- <file>images/mac/closetab.png</file>
- <file>images/mac/editcopy.png</file>
- <file>images/mac/find.png</file>
- <file>images/mac/home.png</file>
- <file>images/mac/next.png</file>
- <file>images/mac/prev.png</file>
- <file>images/mac/print.png</file>
- <file>images/mac/synctoc.png</file>
- <file>images/mac/whatsthis.png</file>
- <file>images/mac/zoomin.png</file>
- <file>images/mac/zoomout.png</file>
- <file>images/qt.png</file>
- <file>images/win/addtab.png</file>
- <file>images/win/book.png</file>
- <file>images/win/closetab.png</file>
- <file>images/win/editcopy.png</file>
- <file>images/win/find.png</file>
- <file>images/win/home.png</file>
- <file>images/win/next.png</file>
- <file>images/win/previous.png</file>
- <file>images/win/print.png</file>
- <file>images/win/synctoc.png</file>
- <file>images/win/whatsthis.png</file>
- <file>images/win/zoomin.png</file>
- <file>images/win/zoomout.png</file>
- <file>images/wrap.png</file>
- </qresource>
-</RCC>
diff --git a/tools/assistant/compat/assistant.rc b/tools/assistant/compat/assistant.rc
deleted file mode 100644
index b4786ceaaf..0000000000
--- a/tools/assistant/compat/assistant.rc
+++ /dev/null
@@ -1 +0,0 @@
-IDI_ICON1 ICON DISCARDABLE "assistant.ico"
diff --git a/tools/assistant/compat/compat.pro b/tools/assistant/compat/compat.pro
deleted file mode 100644
index 1086f4c825..0000000000
--- a/tools/assistant/compat/compat.pro
+++ /dev/null
@@ -1,84 +0,0 @@
-include($$QT_SOURCE_TREE/tools/shared/fontpanel/fontpanel.pri)
-
-TEMPLATE = app
-LANGUAGE = C++
-TARGET = assistant_adp
-
-CONFIG += qt warn_on
-
-unix:contains(QT_CONFIG, dbus):QT += dbus
-
-build_all:!build_pass {
- CONFIG -= build_all
- CONFIG += release
-}
-QT += xml network
-
-PROJECTNAME = Assistant
-DESTDIR = ../../../bin
-
-FORMS += helpdialog.ui \
- mainwindow.ui \
- tabbedbrowser.ui \
- topicchooser.ui
-
-SOURCES += main.cpp \
- helpwindow.cpp \
- topicchooser.cpp \
- docuparser.cpp \
- index.cpp \
- profile.cpp \
- config.cpp \
- helpdialog.cpp \
- mainwindow.cpp \
- tabbedbrowser.cpp \
- fontsettingsdialog.cpp
-
-HEADERS += helpwindow.h \
- topicchooser.h \
- docuparser.h \
- index.h \
- profile.h \
- helpdialog.h \
- mainwindow.h \
- tabbedbrowser.h \
- config.h \
- fontsettingsdialog.h
-
-RESOURCES += assistant.qrc
-
-contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE
-DEFINES += QT_KEYWORDS
-#DEFINES += QT_PALMTOPCENTER_DOCS
-
-win32 {
- LIBS += -lshell32
- RC_FILE = assistant.rc
-}
-
-mac {
- ICON = assistant.icns
- TARGET = Assistant_adp
-# QMAKE_INFO_PLIST = Info_mac.plist
-}
-
-target.path=$$[QT_INSTALL_BINS]
-INSTALLS += target
-
-TRANSLATIONS = assistant_de.ts
-
-unix:!contains(QT_CONFIG, zlib):LIBS += -lz
-
-contains(CONFIG, static): {
- win32 {
- exists($$[QT_INSTALL_PLUGINS]/imageformats/qjpeg.lib) {
- QTPLUGIN += qjpeg
- DEFINES += USE_STATIC_JPEG_PLUGIN
- }
- } else {
- exists($$[QT_INSTALL_PLUGINS]/imageformats/qjpeg.a) {
- QTPLUGIN += qjpeg
- DEFINES += USE_STATIC_JPEG_PLUGIN
- }
- }
-}
diff --git a/tools/assistant/compat/config.cpp b/tools/assistant/compat/config.cpp
deleted file mode 100644
index 1faef423ef..0000000000
--- a/tools/assistant/compat/config.cpp
+++ /dev/null
@@ -1,438 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "config.h"
-#include "profile.h"
-#include "docuparser.h"
-
-#include <QApplication>
-#include <QDesktopWidget>
-#include <QLibraryInfo>
-#include <QFont>
-#include <QFontInfo>
-#include <QDir>
-#include <QFile>
-#include <QFileInfo>
-#include <QSettings>
-#include <QList>
-
-QT_BEGIN_NAMESPACE
-
-static Config *static_configuration = 0;
-
-inline QString getVersionString()
-{
- return QString::number( (QT_VERSION >> 16) & 0xff )
- + QLatin1String(".") + QString::number( (QT_VERSION >> 8) & 0xff );
-}
-
-Config::Config()
- : profil( 0 ), hideSidebar( false ), rebuildDocs(true)
-{
- if( !static_configuration ) {
- static_configuration = this;
- } else {
- qWarning( "Multiple configurations not allowed!" );
- }
-}
-
-Config *Config::loadConfig(const QString &profileFileName)
-{
- Config *config = new Config();
-
- if (profileFileName.isEmpty()) { // no profile
- if (!config->defaultProfileExists()) {
- config->profil = Profile::createDefaultProfile();
- config->saveProfile(config->profil);
- } else {
- config->profil = new Profile();
- }
- config->loadDefaultProfile();
- config->load();
- return config;
- }
-
- QFile file(profileFileName);
- if (!file.exists()) {
- qWarning( "File does not exist: %s", qPrintable(profileFileName) );
- return 0;
- }
- DocuParser *parser = DocuParser::createParser( profileFileName );
- if (!parser) {
- qWarning( "Failed to create parser for file: %s", qPrintable(profileFileName) );
- return 0;
- }
- if (parser->parserVersion() < DocuParser::Qt320) {
- qWarning( "File does not contain profile information" );
- return 0;
- }
- DocuParser320 *profileParser = static_cast<DocuParser320*>(parser);
- parser->parse(&file);
- config->profil = profileParser->profile();
- if (!config->profil) {
- qWarning( "Config::loadConfig(), no profile in: %s", qPrintable(profileFileName) );
- return 0;
- }
- config->profil->setProfileType(Profile::UserProfile);
- config->profil->setDocuParser(profileParser);
- config->load();
- return config;
-}
-
-Config *Config::configuration()
-{
- Q_ASSERT( static_configuration );
- return static_configuration;
-}
-
-void Config::load()
-{
- const QString key = getVersionString() + QLatin1String("/");
-
- bool isDefaultProfile = profil->props[QLatin1String("name")] == QLatin1String("default");
- const QString pKey = isDefaultProfile ? QString::fromLatin1(QT_VERSION_STR)
- : getVersionString();
-
- const QString profkey = pKey + QLatin1String("/Profile/") + profil->props[QLatin1String("name")] + QLatin1String("/");
-
- QSettings settings;
-
- home = profil->props[QLatin1String("startpage")];;
- if (home.isEmpty() && isDefaultProfile)
- home = QLibraryInfo::location(QLibraryInfo::DocumentationPath) + QLatin1String("/html/index.html");
- src = settings.value( profkey + QLatin1String("Source") ).toStringList();
- sideBar = settings.value( key + QLatin1String("SideBarPage") ).toInt();
- if (qApp->type() != QApplication::Tty)
- winGeometry = settings.value(key + QLatin1String("windowGeometry")).toByteArray();
-
- mainWinState = settings.value(key + QLatin1String("MainWindowState")).toByteArray();
- pointFntSize = settings.value(key + QLatin1String("FontSize"), qApp->font().pointSizeF()).toDouble();
- rebuildDocs = settings.value( key + QLatin1String("RebuildDocDB"), true ).toBool();
-
- profileNames = settings.value( key + QLatin1String("Profile") ).toStringList();
-
- m_fontSettings.windowFont = qVariantValue<QFont>(settings.value(key + QLatin1String("windowfont"), qApp->font()));
- m_fontSettings.browserFont = qVariantValue<QFont>(settings.value(key + QLatin1String("browserfont"), qApp->font()));
- m_fontSettings.useWindowFont = settings.value(key + QLatin1String("usewindowfont"), false).toBool();
- m_fontSettings.useBrowserFont = settings.value(key + QLatin1String("usebrowserfont"), false).toBool();
- m_fontSettings.windowWritingSystem = static_cast<QFontDatabase::WritingSystem>(
- settings.value(key + QLatin1String("windowwritingsystem"), QFontDatabase::Latin).toInt());
- m_fontSettings.browserWritingSystem = static_cast<QFontDatabase::WritingSystem>(
- settings.value(key + QLatin1String("browserwritingsystem"), QFontDatabase::Latin).toInt());
-
- m_fontSettings.browserFont.setPointSizeF(pointFntSize);
-}
-
-void Config::save()
-{
- saveSettings();
- saveProfile( profil );
-}
-
-void Config::saveSettings()
-{
- const QString key = getVersionString() + QLatin1String("/");
-
- const QString pKey = (profil->props[QLatin1String("name")] == QLatin1String("default"))
- ? QString::fromLatin1(QT_VERSION_STR)
- : getVersionString();
-
- const QString profkey = pKey + QLatin1String("/Profile/") + profil->props[QLatin1String("name")] + QLatin1String("/");
-
- QSettings settings;
-
- settings.setValue( profkey + QLatin1String("Source"), src );
- settings.setValue( key + QLatin1String("SideBarPage"), sideBarPage() );
- if (qApp->type() != QApplication::Tty)
- settings.setValue(key + QLatin1String("windowGeometry"), winGeometry);
-
- settings.setValue( key + QLatin1String("MainWindowState"), mainWinState );
- settings.setValue( key + QLatin1String("FontSize"), pointFntSize);
- settings.setValue( key + QLatin1String("RebuildDocDB"), rebuildDocs );
-
- settings.setValue(key + QLatin1String("windowfont"), m_fontSettings.windowFont);
- settings.setValue(key + QLatin1String("browserfont"), m_fontSettings.browserFont);
- settings.setValue(key + QLatin1String("usewindowfont"), m_fontSettings.useWindowFont);
- settings.setValue(key + QLatin1String("usebrowserfont"), m_fontSettings.useBrowserFont);
- settings.setValue(key + QLatin1String("windowwritingsystem"), m_fontSettings.windowWritingSystem);
- settings.setValue(key + QLatin1String("browserwritingsystem"), m_fontSettings.browserWritingSystem);
-}
-
-#ifdef ASSISTANT_DEBUG
-static void dumpmap( const QMap<QString,QString> &m, const QString &header )
-{
- qDebug( header );
- QMap<QString,QString>::ConstIterator it = m.begin();
- while (it != m.end()) {
- qDebug( " " + it.key() + ":\t\t" + *it );
- ++it;
- }
-}
-#endif
-
-bool Config::defaultProfileExists()
-{
- QSettings settings;
- const QString profKey = QLatin1String(QT_VERSION_STR) + QLatin1String("/Profile/default/");
-
- if (settings.contains(profKey + QLatin1String("DocFiles"))
- && settings.contains(profKey + QLatin1String("Titles"))
- && settings.contains(profKey + QLatin1String("ImageDirs"))) {
- QStringList dcfs = settings.value(profKey + QLatin1String("DocFiles") ).toStringList();
- foreach (QString file, dcfs) {
- if (file == Profile::storableFilePath(file))
- return true;
- }
- }
- return false;
-}
-
-void Config::loadDefaultProfile()
-{
- QSettings settings;
- const QString profKey = QLatin1String(QT_VERSION_STR) + QLatin1String("/Profile/default/");
-
- if (!defaultProfileExists())
- return;
-
- // Override the defaults with settings in registry.
- profil->icons.clear();
- profil->indexPages.clear();
- profil->imageDirs.clear();
- profil->docs.clear();
- profil->dcfTitles.clear();
-
- QStringList titles = settings.value( profKey + QLatin1String("Titles") ).toStringList();
- QStringList iconLst = settings.value( profKey + QLatin1String("DocIcons") ).toStringList();
- QStringList indexLst = settings.value( profKey + QLatin1String("IndexPages") ).toStringList();
- QStringList imgDirLst = settings.value( profKey + QLatin1String("ImageDirs") ).toStringList();
- QStringList dcfs = settings.value( profKey + QLatin1String("DocFiles") ).toStringList();
- profil->props[QLatin1String("name")] = QLatin1String("default");
-
- QString filePath;
- QStringList::ConstIterator it = titles.constBegin();
- QStringList::ConstIterator iconIt = iconLst.constBegin();
- QStringList::ConstIterator indexIt = indexLst.constBegin();
- QStringList::ConstIterator imageIt = imgDirLst.constBegin();
- QStringList::ConstIterator dcfIt = dcfs.constBegin();
- while((it != titles.constEnd())
- && (iconIt != iconLst.constEnd())
- && (indexIt != indexLst.constEnd())
- && (imageIt != imgDirLst.constEnd())
- && (dcfIt != dcfs.constEnd())) {
- profil->addDCFIcon( *it, *iconIt );
- profil->addDCFIndexPage(*it, Profile::loadableFilePath(*indexIt));
- profil->addDCFImageDir( *it, *imageIt );
- profil->addDCFTitle(Profile::loadableFilePath(*dcfIt), *it);
- ++it, ++iconIt, ++indexIt, ++imageIt, ++dcfIt;
- }
-#if ASSISTANT_DEBUG
- dumpmap( profil->icons, QLatin1String("Icons") );
- dumpmap( profil->indexPages, QLatin1String("IndexPages") );
- dumpmap( profil->imageDirs, QLatin1String("ImageDirs") );
- dumpmap( profil->dcfTitles, QLatin1String("dcfTitles") );
- qDebug( "Docfiles: \n " + profil->docs.join( "\n " ) );
-#endif
-}
-
-void Config::saveProfile( Profile *profile )
-{
- if (profil->profileType() == Profile::UserProfile)
- return;
-
- const QString key = (profile->props[QLatin1String("name")] == QLatin1String("default"))
- ? QString::fromLatin1(QT_VERSION_STR)
- : getVersionString();
-
- const QString profKey = key + QLatin1String("/Profile/") + profile->props[QLatin1String("name")] + QLatin1String("/");
-
- QString path = QLibraryInfo::location(QLibraryInfo::DocumentationPath).replace(QLatin1String("\\"), QLatin1String("/"));
- QStringList indexes, icons, imgDirs, dcfs;
- QStringList titles = profile->dcfTitles.keys();
- QStringList::ConstIterator it = titles.constBegin();
- QString filePath;
- for ( ; it != titles.constEnd(); ++it ) {
-
- indexes << Profile::storableFilePath(profile->indexPages[*it]);
- icons << profile->icons[*it];
- imgDirs << profile->imageDirs[*it];
- dcfs << Profile::storableFilePath(profile->dcfTitles[*it]);
- }
-
- QSettings settings;
- settings.setValue( profKey + QLatin1String("Titles"), titles );
- settings.setValue( profKey + QLatin1String("DocFiles"), dcfs );
- settings.setValue( profKey + QLatin1String("IndexPages"), indexes );
- settings.setValue( profKey + QLatin1String("DocIcons"), icons );
- settings.setValue( profKey + QLatin1String("ImageDirs"), imgDirs );
-
-#if ASSISTANT_DEBUG
- qDebug() << "Titles:\n - " << ((QStringList*)&titles)->join("\n - ");
- qDebug() << "Docfiles:\n - " << dcfs.join("\n - " );
- qDebug() << "IndexPages:\n - " << indexes.join("\n - ");
- qDebug() << "DocIcons:\n - " << icons.join("\n - " );
- qDebug() << "ImageDirs:\n - " << imgDirs.join("\n - " );
-#endif
-}
-
-QStringList Config::mimePaths()
-{
- static QStringList lst;
-
- if( lst.count() > 0 )
- return lst;
-
- for (QMap<QString,QString>::ConstIterator it = profil->dcfTitles.constBegin();
- it != profil->dcfTitles.constEnd(); ++it ) {
-
- // Mime source for .dcf file path
- QFileInfo info( *it );
- QString dcfPath = info.absolutePath();
- if (!lst.contains(dcfPath))
- lst << dcfPath;
-
- // Image dir for .dcf
- QString imgDir = QDir::toNativeSeparators( dcfPath + QDir::separator()
- + profil->imageDirs[it.key()] );
- if (!lst.contains(imgDir))
- lst << imgDir;
- }
- return lst;
-}
-
-QStringList Config::profiles() const
-{
- return profileNames;
-}
-
-QString Config::title() const
-{
- QString s = profil->props[QLatin1String("title")];
- if (s.isEmpty())
- s = QObject::tr("Qt Assistant by Nokia");
- return s;
-}
-
-QString Config::aboutApplicationMenuText() const
-{
- return profil->props[QLatin1String("aboutmenutext")];
-}
-
-QString Config::aboutURL() const
-{
- return profil->props[QLatin1String("abouturl")];
-}
-
-QString Config::homePage() const
-{
- return home.isEmpty() ? profil->props[QLatin1String("startpage")] : home;
-}
-
-QStringList Config::source() const
-{
- return src.size() == 0 ? QStringList(profil->props[QLatin1String("startpage")]) : src;
-}
-
-QStringList Config::docFiles() const
-{
- return profil->docs;
-}
-
-QPixmap Config::docIcon( const QString &title ) const
-{
- // ### To allow qdoc generated dcf files to reference the doc icons from qmake_image_col
- QString name = profil->icons[title];
- QString resName = QLatin1String(":/trolltech/assistant/images/") + name;
-
- if (QFile::exists(resName))
- return QPixmap(resName);
-
- if (name.startsWith(QLatin1String("file:")))
- name = name.mid(5);
- return QPixmap(name);
-}
-
-QPixmap Config::applicationIcon() const
-{
- QString name = profil->props[QLatin1String("applicationicon")];
- QString resName = QLatin1String(":/trolltech/assistant/images/") + name;
-
- if (QFile::exists(resName))
- return QPixmap(resName);
-
- if (name.startsWith(QLatin1String("file:")))
- name = name.mid(5);
- return QPixmap(name);
-}
-
-QStringList Config::docTitles() const
-{
- return QStringList(profil->indexPages.keys());
-}
-
-QString Config::docImageDir( const QString &docfile ) const
-{
- return profil->imageDirs[docfile];
-}
-
-QString Config::indexPage( const QString &title ) const
-{
- return profil->indexPages[title];
-}
-
-void Config::hideSideBar( bool b )
-{
- hideSidebar = b;
-}
-
-bool Config::sideBarHidden() const
-{
- return hideSidebar;
-}
-
-QString Config::assistantDocPath() const
-{
- return profil->props[QLatin1String("assistantdocs")].isEmpty()
- ? QLibraryInfo::location(QLibraryInfo::DocumentationPath) + QLatin1String("/html")
- : profil->props[QLatin1String("assistantdocs")];
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/config.h b/tools/assistant/compat/config.h
deleted file mode 100644
index 498e6bb639..0000000000
--- a/tools/assistant/compat/config.h
+++ /dev/null
@@ -1,165 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef CONFIG_H
-#define CONFIG_H
-
-#include "profile.h"
-
-#include <QString>
-#include <QStringList>
-#include <QPixmap>
-#include <QMap>
-
-#include <QtGui/QFont>
-#include <QtGui/QFontDatabase>
-
-QT_BEGIN_NAMESPACE
-
-class Profile;
-
-struct FontSettings
-{
- FontSettings() : useWindowFont(false), useBrowserFont(false),
- windowWritingSystem(QFontDatabase::Latin), browserWritingSystem(QFontDatabase::Latin)
- { }
-
- QFont windowFont;
- QFont browserFont;
-
- bool useWindowFont;
- bool useBrowserFont;
-
- QFontDatabase::WritingSystem windowWritingSystem;
- QFontDatabase::WritingSystem browserWritingSystem;
-};
-
-class Config
-{
-public:
-
- Config();
-
- void load();
- void save();
- Profile *profile() const { return profil; }
- QString profileName() const { return profil->props[QLatin1String("name")]; }
- bool validProfileName() const;
- void hideSideBar( bool b );
- bool sideBarHidden() const;
- QStringList mimePaths();
-
- // From profile, read only
- QStringList docFiles() const;
- QStringList docTitles() const;
- QString indexPage( const QString &title ) const;
- QString docImageDir( const QString &title ) const;
- QPixmap docIcon( const QString &title ) const;
-
- QStringList profiles() const;
- QString title() const;
- QString aboutApplicationMenuText() const;
- QString aboutURL() const;
- QPixmap applicationIcon() const;
-
- // From QSettings, read / write
- QString homePage() const;
- void setHomePage( const QString &hom ) { home = hom; }
-
- QStringList source() const;
- void setSource( const QStringList &s ) { src = s; }
-
- int sideBarPage() const { return sideBar; }
- void setSideBarPage( int sbp ) { sideBar = sbp; }
-
- QByteArray windowGeometry() const { return winGeometry; }
- void setWindowGeometry( const QByteArray &geometry ) { winGeometry = geometry; }
-
- QByteArray mainWindowState() const { return mainWinState; }
- void setMainWindowState( const QByteArray &state ) { mainWinState = state; }
-
- qreal fontPointSize() const { return pointFntSize; }
- void setFontPointSize(qreal size)
- {
- pointFntSize = size;
- m_fontSettings.useBrowserFont = true;
- m_fontSettings.browserFont.setPointSizeF(size);
- }
-
- FontSettings fontSettings() { return m_fontSettings; }
- void setFontSettings(const FontSettings &settings) { m_fontSettings = settings; }
-
- QString assistantDocPath() const;
-
- bool docRebuild() const { return rebuildDocs; }
- void setDocRebuild( bool rb ) { rebuildDocs = rb; }
-
- void saveProfile( Profile *profile );
- void loadDefaultProfile();
- bool defaultProfileExists();
-
- static Config *configuration();
- static Config *loadConfig(const QString &profileFileName);
-
-private:
- Config( const Config &c );
- Config& operator=( const Config &c );
-
- void saveSettings();
-
-private:
- Profile *profil;
-
- QStringList profileNames;
- QString home;
- QStringList src;
- QByteArray mainWinState;
- QByteArray winGeometry;
- qreal pointFntSize;
- int sideBar;
- bool hideSidebar;
- bool rebuildDocs;
- FontSettings m_fontSettings;
-};
-
-QT_END_NAMESPACE
-
-#endif // CONFIG_H
diff --git a/tools/assistant/compat/docuparser.cpp b/tools/assistant/compat/docuparser.cpp
deleted file mode 100644
index db2f824fde..0000000000
--- a/tools/assistant/compat/docuparser.cpp
+++ /dev/null
@@ -1,433 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "docuparser.h"
-#include "profile.h"
-
-#include <QDir>
-#include <QFile>
-#include <QFileInfo>
-#include <QRegExp>
-#include <QString>
-#include <QDataStream>
-
-QT_BEGIN_NAMESPACE
-
-QDataStream &operator>>(QDataStream &s, ContentItem &ci)
-{
- s >> ci.title;
- s >> ci.reference;
- s >> ci.depth;
- return s;
-}
-
-QDataStream &operator<<(QDataStream &s, const ContentItem &ci)
-{
- s << ci.title;
- s << ci.reference;
- s << ci.depth;
- return s;
-}
-
-const QString DocuParser::DocumentKey = QLatin1String("/Qt Assistant/") + QLatin1String(QT_VERSION_STR) + QLatin1String("/");
-
-DocuParser *DocuParser::createParser(const QString &fileName)
-{
- QFile file(fileName);
- if(!file.open(QFile::ReadOnly)) {
- return 0;
- }
-
- QString str;
- int maxlen = 1024;
- int majVer = 0, minVer = 0, serVer = 0;
- static QRegExp re(QLatin1String("assistantconfig +version=\"(\\d)\\.(\\d)\\.(\\d)\""), Qt::CaseInsensitive);
- Q_ASSERT(re.isValid());
- while(!(str = QLatin1String(file.readLine(maxlen))).isEmpty()) {
- if(re.indexIn(str) >= 0) {
- majVer = re.cap(1).toInt();
- minVer = re.cap(2).toInt();
- serVer = re.cap(3).toInt();
- break;
- }
- }
-
- if (majVer < 3 || (majVer == 3 && minVer < 2)) {
- return new DocuParser310;
- }
-
- return new DocuParser320;
-}
-
-
-bool DocuParser::parse(QFile *file)
-{
- QXmlInputSource source(file);
- QXmlSimpleReader reader;
- reader.setContentHandler(this);
- reader.setErrorHandler(this);
- setFileName(QFileInfo(*file).absoluteFilePath());
- return reader.parse(source);
-}
-
-
-QString DocuParser::errorProtocol() const
-{
- return errorProt;
-}
-
-
-QList<ContentItem> DocuParser::getContentItems()
-{
- return contentList;
-}
-
-
-QList<IndexItem*> DocuParser::getIndexItems()
-{
- return indexList;
-}
-
-QString DocuParser::absolutify(const QString &name, bool makeUrl) const
-{
- if (!name.isEmpty()) {
- QString s = name;
- s.replace(QLatin1String("\\"), QLatin1String("/"));
- QFileInfo orgPath(name);
- if(orgPath.isRelative())
- s = QFileInfo(fname).path() + QLatin1Char('/') + name;
- if (makeUrl)
- s.prepend(QLatin1String("file:"));
- return s;
- }
- return name;
-}
-
-
-void DocuParser310::addTo(Profile *p)
-{
- p->addDCFTitle(fname, docTitle);
- p->addDCFIcon(docTitle, iconName);
- p->addDCFIndexPage(docTitle, conURL);
-}
-
-
-bool DocuParser310::startDocument()
-{
- state = StateInit;
- errorProt = QLatin1String("");
-
- contentRef = QLatin1String("");
- indexRef = QLatin1String("");
- depth = 0;
-
- contentList.clear();
- qDeleteAll(indexList);
- indexList.clear();
-
- return true;
-}
-
-
-bool DocuParser310::startElement(const QString &, const QString &,
- const QString &qname,
- const QXmlAttributes &attr)
-{
- if (qname == QLatin1String("DCF") && state == StateInit) {
- state = StateContent;
- contentRef = absolutify(attr.value(QLatin1String("ref")), false);
- conURL = contentRef;
- docTitle = attr.value(QLatin1String("title"));
- iconName = absolutify(attr.value(QLatin1String("icon")), false);
- contentList.append(ContentItem(docTitle, absolutify(contentRef), depth));
- } else if (qname == QLatin1String("section") && (state == StateContent || state == StateSect)) {
- state = StateSect;
- contentRef = absolutify(attr.value(QLatin1String("ref")));
- title = attr.value(QLatin1String("title"));
- depth++;
- contentList.append(ContentItem(title, contentRef, depth));
- } else if (qname == QLatin1String("keyword") && state == StateSect) {
- state = StateKeyword;
- indexRef = absolutify(attr.value(QLatin1String("ref")));
- } else
- return false;
- return true;
-}
-
-bool DocuParser310::endElement(const QString &nameSpace, const QString &localName,
- const QString &qName)
-{
- Q_UNUSED(nameSpace);
- Q_UNUSED(localName);
- Q_UNUSED(qName);
-
- switch(state) {
- case StateInit:
- break;
- case StateContent:
- state = StateInit;
- break;
- case StateSect:
- state = --depth ? StateSect : StateContent;
- break;
- case StateKeyword:
- state = StateSect;
- break;
- default:
- break;
- }
- return true;
-}
-
-
-bool DocuParser310::characters(const QString& ch)
-{
- QString str = ch.simplified();
- if (str.isEmpty())
- return true;
-
- switch (state) {
- case StateInit:
- case StateContent:
- case StateSect:
- return false;
- break;
- case StateKeyword:
- indexList.append(new IndexItem(str, indexRef));
- break;
- default:
- return false;
- }
- return true;
-}
-
-
-bool DocuParser310::fatalError(const QXmlParseException& exception)
-{
- errorProt += QString::fromLatin1("fatal parsing error: %1 in line %2, column %3\n")
- .arg(exception.message())
- .arg(exception.lineNumber())
- .arg(exception.columnNumber());
-
- return QXmlDefaultHandler::fatalError(exception);
-}
-
-
-DocuParser320::DocuParser320()
- : prof(new Profile)
-{
-}
-
-
-void DocuParser320::addTo(Profile *p)
-{
- QMap<QString,QString>::ConstIterator it;
-
- for (it = prof->dcfTitles.constBegin(); it != prof->dcfTitles.constEnd(); ++it)
- p->dcfTitles[it.key()] = *it;
-
- for (it = prof->icons.constBegin(); it != prof->icons.constEnd(); ++it)
- p->icons[it.key()] = *it;
-
- for (it = prof->indexPages.constBegin(); it != prof->indexPages.constEnd(); ++it)
- p->indexPages[it.key()] = *it;
-}
-
-
-bool DocuParser320::startDocument()
-{
- state = StateInit;
- errorProt = QLatin1String("");
-
- contentRef = QLatin1String("");
- indexRef = QLatin1String("");
- depth = 0;
- contentList.clear();
- indexList.clear();
-
- prof->addDCF(fname);
-
- return true;
-}
-
-bool DocuParser320::startElement(const QString &, const QString &,
- const QString &qname,
- const QXmlAttributes &attr)
-{
- QString lower = qname.toLower();
-
- switch(state) {
-
- case StateInit:
- if(lower == QLatin1String("assistantconfig"))
- state = StateDocRoot;
- break;
-
- case StateDocRoot:
- if(lower == QLatin1String("dcf")) {
- state = StateContent;
- contentRef = absolutify(attr.value(QLatin1String("ref")));
- conURL = contentRef;
- docTitle = attr.value(QLatin1String("title"));
- iconName = absolutify(attr.value(QLatin1String("icon")));
- contentList.append(ContentItem(docTitle, contentRef, depth));
- } else if(lower == QLatin1String("profile")) {
- state = StateProfile;
- }
- break;
-
- case StateSect:
- if (lower == QLatin1String("keyword") && state == StateSect) {
- state = StateKeyword;
- indexRef = absolutify(attr.value(QLatin1String("ref")));
- break;
- } // else if (lower == "section")
- case StateContent:
- if(lower == QLatin1String("section")) {
- state = StateSect;
- contentRef = absolutify(attr.value(QLatin1String("ref")));
- title = attr.value(QLatin1String("title"));
- depth++;
- contentList.append(ContentItem(title, contentRef, depth));
- }
- break;
-
- case StateProfile:
- if(lower == QLatin1String("property")) {
- state = StateProperty;
- propertyName = attr.value(QLatin1String("name"));
- }
- break;
-
- case StateProperty:
- break;
-
- default:
- break;
- }
-
- return true;
-}
-
-bool DocuParser320::endElement(const QString &nameSpace,
- const QString &localName,
- const QString &qName)
-{
- Q_UNUSED(nameSpace);
- Q_UNUSED(localName);
- Q_UNUSED(qName);
-
- switch(state) {
- case StateInit:
- break;
- case StateDocRoot:
- state = StateInit;
- break;
- case StateProfile:
- state = StateDocRoot;
- break;
- case StateProperty:
- state = StateProfile;
- if(propertyName.isEmpty() || propertyValue.isEmpty())
- return false;
- {
- static const QStringList lst = QStringList()
- << QLatin1String("startpage") << QLatin1String("abouturl")
- << QLatin1String("applicationicon") << QLatin1String("assistantdocs");
-
- if (lst.contains(propertyName))
- propertyValue = absolutify(propertyValue);
- }
- prof->addProperty(propertyName, propertyValue);
- break;
- case StateContent:
- if(!iconName.isEmpty())
- prof->addDCFIcon(docTitle, iconName);
- if(contentRef.isEmpty())
- return false;
- prof->addDCFIndexPage(docTitle, conURL);
- prof->addDCFTitle(fname, docTitle);
- state = StateDocRoot;
- break;
- case StateSect:
- state = --depth ? StateSect : StateContent;
- break;
- case StateKeyword:
- state = StateSect;
- break;
- }
- return true;
-}
-
-bool DocuParser320::characters(const QString& ch)
-{
- QString str = ch.simplified();
- if (str.isEmpty())
- return true;
-
- switch (state) {
- case StateInit:
- case StateContent:
- case StateSect:
- return false;
- break;
- case StateKeyword:
- indexList.append(new IndexItem(str, indexRef));
- break;
- case StateProperty:
- propertyValue = ch;
- break;
- default:
- return false;
- }
- return true;
-}
-
-bool DocuParser320::fatalError(const QXmlParseException& exception)
-{
- errorProt += QString::fromLatin1("fatal parsing error: %1 in line %2, column %3\n")
- .arg(exception.message())
- .arg(exception.lineNumber())
- .arg(exception.columnNumber());
- return QXmlDefaultHandler::fatalError(exception);
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/docuparser.h b/tools/assistant/compat/docuparser.h
deleted file mode 100644
index 7c7692e449..0000000000
--- a/tools/assistant/compat/docuparser.h
+++ /dev/null
@@ -1,166 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef DOCUPARSER_H
-#define DOCUPARSER_H
-
-#include <QList>
-#include <QMap>
-#include <QXmlDefaultHandler>
-#include <QXmlAttributes>
-#include <QXmlParseException>
-
-QT_BEGIN_NAMESPACE
-
-class Profile;
-
-struct ContentItem {
- ContentItem()
- : title( QString() ), reference( QString() ), depth( 0 ) {}
- ContentItem( const QString &t, const QString &r, int d )
- : title( t ), reference( r ), depth( d ) {}
- QString title;
- QString reference;
- int depth;
- Q_DUMMY_COMPARISON_OPERATOR(ContentItem)
-};
-
-QDataStream &operator>>( QDataStream &s, ContentItem &ci );
-QDataStream &operator<<( QDataStream &s, const ContentItem &ci );
-
-struct IndexItem {
- IndexItem( const QString &k, const QString &r )
- : keyword( k ), reference( r ) {}
- QString keyword;
- QString reference;
-};
-
-
-
-class DocuParser : public QXmlDefaultHandler
-{
-public:
- enum ParserVersion { Qt310, Qt320 };
- // Since We don't want problems with documentation
- // from version to version, this string stores the correct
- // version string to save documents.
- static const QString DocumentKey;
-
- static DocuParser *createParser( const QString &fileName );
-
- virtual bool parse( QFile *file );
-
- QList<ContentItem> getContentItems();
- QList<IndexItem*> getIndexItems();
-
- QString errorProtocol() const;
- QString contentsURL() const { return conURL; }
-
- virtual ParserVersion parserVersion() const = 0;
- virtual void addTo( Profile *p ) = 0;
-
- QString fileName() const { return fname; }
- void setFileName( const QString &file ) { fname = file; }
-
-protected:
- QString absolutify( const QString &input, bool makeUrl = true ) const;
-
- QString contentRef, indexRef, errorProt, conURL;
- QString docTitle, title, iconName;
- QList<ContentItem> contentList;
- QList<IndexItem*> indexList;
- QString fname;
-};
-
-
-class DocuParser310 : public DocuParser
-{
-public:
- enum States{ StateInit, StateContent, StateSect, StateKeyword };
-
- bool startDocument();
- bool startElement( const QString&, const QString&, const QString& ,
- const QXmlAttributes& );
- bool endElement( const QString&, const QString&, const QString& );
- bool characters( const QString & );
- bool fatalError( const QXmlParseException& exception );
-
- virtual ParserVersion parserVersion() const { return Qt310; }
- virtual void addTo( Profile *p );
-
-private:
- States state;
- int depth;
-};
-
-
-class DocuParser320 : public DocuParser
-{
-public:
- enum States { StateInit, StateDocRoot, StateProfile, StateProperty,
- StateContent, StateSect, StateKeyword };
-
- DocuParser320();
-
- bool startDocument();
- bool startElement( const QString&, const QString&, const QString& ,
- const QXmlAttributes& );
- bool endElement( const QString&, const QString&, const QString& );
- bool characters( const QString & );
- bool fatalError( const QXmlParseException& exception );
-
- virtual ParserVersion parserVersion() const { return Qt320; }
- virtual void addTo( Profile *p );
- Profile *profile() const { return prof; }
-
-private:
-
- States state;
- int depth;
- int docfileCounter;
- QString propertyValue;
- QString propertyName;
- Profile *prof;
-};
-
-QT_END_NAMESPACE
-
-#endif // DOCUPARSER_H
diff --git a/tools/assistant/compat/fontsettingsdialog.cpp b/tools/assistant/compat/fontsettingsdialog.cpp
deleted file mode 100644
index 31a32418fc..0000000000
--- a/tools/assistant/compat/fontsettingsdialog.cpp
+++ /dev/null
@@ -1,137 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "fontsettingsdialog.h"
-#include "fontpanel.h"
-#include "config.h"
-
-#include <QtGui/QLabel>
-#include <QtGui/QComboBox>
-#include <QtGui/QHBoxLayout>
-#include <QtGui/QVBoxLayout>
-#include <QtGui/QApplication>
-#include <QtGui/QStackedWidget>
-#include <QtGui/QDialogButtonBox>
-
-QT_BEGIN_NAMESPACE
-
-FontSettingsDialog::FontSettingsDialog(QWidget *parent)
- : QDialog(parent)
- , m_windowFontPanel(new FontPanel(this))
- , m_browserFontPanel(new FontPanel(this))
- , m_dialogButtonBox(new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel))
-{
- setModal(true);
- setWindowTitle(tr("Font Settings"));
- setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
-
- QVBoxLayout *mainVLayout = new QVBoxLayout(this);
- QHBoxLayout *hboxLayout = new QHBoxLayout;
- mainVLayout->addLayout(hboxLayout);
-
- QLabel *label = new QLabel(tr("Font settings for:"), this);
- label->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
- hboxLayout->addWidget(label);
- QComboBox *comboBox = new QComboBox(this);
- comboBox->addItem(tr("Browser"));
- comboBox->addItem(tr("Application"));
- hboxLayout->addWidget(comboBox);
-
- m_windowFontPanel->setCheckable(true);
- m_browserFontPanel->setCheckable(true);
-
- const QString customSettings(tr("Use custom settings"));
- m_windowFontPanel->setTitle(customSettings);
- m_browserFontPanel->setTitle(customSettings);
-
- QStackedWidget *stackWidget = new QStackedWidget(this);
- stackWidget->addWidget(m_browserFontPanel);
- stackWidget->addWidget(m_windowFontPanel);
-
- mainVLayout->addWidget(stackWidget);
- mainVLayout->addWidget(m_dialogButtonBox);
-
- connect(m_dialogButtonBox , SIGNAL(rejected()), this, SLOT(reject()));
- connect(m_dialogButtonBox , SIGNAL(accepted()), this, SLOT(accept()));
- connect(comboBox, SIGNAL(activated(int)), stackWidget, SLOT(setCurrentIndex(int)));
-}
-
-FontSettingsDialog::~FontSettingsDialog()
-{
- // nothing todo
-}
-
-bool FontSettingsDialog::showDialog(FontSettings *settings)
-{
- setupFontSettingsDialog(settings);
-
- if (exec() != Accepted)
- return false;
-
- updateFontSettings(settings);
- return true;
-}
-
-void FontSettingsDialog::updateFontSettings(FontSettings *settings)
-{
- settings->useWindowFont = m_windowFontPanel->isChecked();
- settings->useBrowserFont = m_browserFontPanel->isChecked();
-
- settings->windowFont = settings->useWindowFont ? m_windowFontPanel->selectedFont() : qApp->font();
- settings->browserFont = settings->useBrowserFont ? m_browserFontPanel->selectedFont() : qApp->font();
-
- settings->windowWritingSystem = settings->useWindowFont ? m_windowFontPanel->writingSystem() : QFontDatabase::Latin;
- settings->browserWritingSystem = settings->useBrowserFont ? m_browserFontPanel->writingSystem() : QFontDatabase::Latin;
-}
-
-void FontSettingsDialog::setupFontSettingsDialog(const FontSettings *settings)
-{
- m_windowFontPanel->setSelectedFont(settings->windowFont);
- m_browserFontPanel->setSelectedFont(settings->browserFont);
-
- m_windowFontPanel->setWritingSystem(settings->windowWritingSystem);
- m_browserFontPanel->setWritingSystem(settings->browserWritingSystem);
-
- m_windowFontPanel->setChecked(settings->useWindowFont);
- m_browserFontPanel->setChecked(settings->useBrowserFont);
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/fontsettingsdialog.h b/tools/assistant/compat/fontsettingsdialog.h
deleted file mode 100644
index 6599d2aacc..0000000000
--- a/tools/assistant/compat/fontsettingsdialog.h
+++ /dev/null
@@ -1,77 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef _FONT_SETTINGS_DIALOG_H_
-#define _FONT_SETTINGS_DIALOG_H_
-
-#include <QtCore/QObject>
-#include <QtGui/QDialog>
-
-QT_BEGIN_NAMESPACE
-
-class FontPanel;
-struct FontSettings;
-class QDialogButtonBox;
-
-class FontSettingsDialog : public QDialog
-{
- Q_OBJECT
-
-public:
- FontSettingsDialog(QWidget *parent = 0);
- ~FontSettingsDialog();
-
- bool showDialog(FontSettings *settings);
-
-private:
- void updateFontSettings(FontSettings *settings);
- void setupFontSettingsDialog(const FontSettings *settings);
-
-private:
- FontPanel *m_windowFontPanel;
- FontPanel *m_browserFontPanel;
- QDialogButtonBox *m_dialogButtonBox;
-};
-
-#endif // _FONT_SETTINGS_DIALOG_H_
-
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/helpdialog.cpp b/tools/assistant/compat/helpdialog.cpp
deleted file mode 100644
index 23c1bfcded..0000000000
--- a/tools/assistant/compat/helpdialog.cpp
+++ /dev/null
@@ -1,1331 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "helpdialog.h"
-#include "helpwindow.h"
-#include "topicchooser.h"
-#include "docuparser.h"
-#include "mainwindow.h"
-#include "config.h"
-#include "tabbedbrowser.h"
-
-#include <QtGui>
-#include <QtDebug>
-#include <QtCore/QVarLengthArray>
-
-#include <stdlib.h>
-#include <limits.h>
-
-QT_BEGIN_NAMESPACE
-
-enum
-{
- LinkRole = Qt::UserRole + 1000
-};
-
-static bool verifyDirectory(const QString &str)
-{
- QFileInfo dirInfo(str);
- if (!dirInfo.exists())
- return QDir().mkdir(str);
- if (!dirInfo.isDir()) {
- qWarning("'%s' exists but is not a directory", str.toLatin1().constData());
- return false;
- }
- return true;
-}
-
-struct IndexKeyword {
- IndexKeyword(const QString &kw, const QString &l)
- : keyword(kw), link(l) {}
- IndexKeyword() : keyword(QString()), link(QString()) {}
- bool operator<(const IndexKeyword &ik) const {
- return keyword.toLower() < ik.keyword.toLower();
- }
- bool operator<=(const IndexKeyword &ik) const {
- return keyword.toLower() <= ik.keyword.toLower();
- }
- bool operator>(const IndexKeyword &ik) const {
- return keyword.toLower() > ik.keyword.toLower();
- }
- Q_DUMMY_COMPARISON_OPERATOR(IndexKeyword)
- QString keyword;
- QString link;
-};
-
-QDataStream &operator>>(QDataStream &s, IndexKeyword &ik)
-{
- s >> ik.keyword;
- s >> ik.link;
- return s;
-}
-
-QDataStream &operator<<(QDataStream &s, const IndexKeyword &ik)
-{
- s << ik.keyword;
- s << ik.link;
- return s;
-}
-
-QValidator::State SearchValidator::validate(QString &str, int &) const
-{
- for (int i = 0; i < (int) str.length(); ++i) {
- QChar c = str[i];
- if (!c.isLetterOrNumber() && c != QLatin1Char('\'') && c != QLatin1Char('`')
- && c != QLatin1Char('\"') && c != QLatin1Char(' ') && c != QLatin1Char('-') && c != QLatin1Char('_')
- && c!= QLatin1Char('*'))
- return QValidator::Invalid;
- }
- return QValidator::Acceptable;
-}
-
-class IndexListModel: public QStringListModel
-{
-public:
- IndexListModel(QObject *parent = 0)
- : QStringListModel(parent) {}
-
- void clear() { contents.clear(); setStringList(QStringList()); }
-
- QString description(int index) const { return stringList().at(index); }
- QStringList links(int index) const { return contents.values(stringList().at(index)); }
- void addLink(const QString &description, const QString &link) { contents.insert(description, link); }
-
- void publish() { filter(QString(), QString()); }
-
- QModelIndex filter(const QString &s, const QString &real);
-
- virtual Qt::ItemFlags flags(const QModelIndex &index) const
- { return QStringListModel::flags(index) & ~Qt::ItemIsEditable; }
-
-private:
- QMultiMap<QString, QString> contents;
-};
-
-bool caseInsensitiveLessThan(const QString &as, const QString &bs)
-{
- const QChar *a = as.unicode();
- const QChar *b = bs.unicode();
- if (a == 0)
- return true;
- if (b == 0)
- return false;
- if (a == b)
- return false;
- int l=qMin(as.length(),bs.length());
- while (l-- && QChar::toLower(a->unicode()) == QChar::toLower(b->unicode()))
- a++,b++;
- if (l==-1)
- return (as.length() < bs.length());
- return QChar::toLower(a->unicode()) < QChar::toLower(b->unicode());
-}
-
-/**
- * \a real is kinda a hack for the smart search, need a way to match a regexp to an item
- * How would you say the best match for Q.*Wiget is QWidget?
- */
-QModelIndex IndexListModel::filter(const QString &s, const QString &real)
-{
- QStringList list;
-
- int goodMatch = -1;
- int perfectMatch = -1;
- if (s.isEmpty())
- perfectMatch = 0;
-
- const QRegExp regExp(s, Qt::CaseInsensitive);
- QMultiMap<QString, QString>::iterator it = contents.begin();
- QString lastKey;
- for (; it != contents.end(); ++it) {
- if (it.key() == lastKey)
- continue;
- lastKey = it.key();
- const QString key = it.key();
- if (key.contains(regExp) || key.contains(s, Qt::CaseInsensitive)) {
- list.append(key);
- if (perfectMatch == -1 && (key.startsWith(real, Qt::CaseInsensitive))) {
- if (goodMatch == -1)
- goodMatch = list.count() - 1;
- if (real.length() == key.length()){
- perfectMatch = list.count() - 1;
- }
- } else if (perfectMatch > -1 && s == key) {
- perfectMatch = list.count() - 1;
- }
- }
- }
-
- int bestMatch = perfectMatch;
- if (bestMatch == -1)
- bestMatch = goodMatch;
- bestMatch = qMax(0, bestMatch);
-
- // sort the new list
- QString match;
- if (bestMatch >= 0 && list.count() > bestMatch)
- match = list[bestMatch];
- qSort(list.begin(), list.end(), caseInsensitiveLessThan);
- setStringList(list);
- for (int i = 0; i < list.size(); ++i) {
- if (list.at(i) == match){
- bestMatch = i;
- break;
- }
- }
- return index(bestMatch, 0, QModelIndex());
-}
-
-HelpNavigationListItem::HelpNavigationListItem(QListWidget *ls, const QString &txt)
- : QListWidgetItem(txt, ls)
-{
-}
-
-void HelpNavigationListItem::addLink(const QString &link)
-{
- QString lnk = HelpDialog::removeAnchorFromLink(link);
- if (linkList.filter(lnk, Qt::CaseInsensitive).count() > 0)
- return;
- linkList << link;
-}
-
-HelpDialog::HelpDialog(QWidget *parent, MainWindow *h)
- : QWidget(parent), lwClosed(false), help(h)
-{
- ui.setupUi(this);
- ui.listContents->setUniformRowHeights(true);
- ui.listContents->header()->setStretchLastSection(false);
- ui.listContents->header()->setResizeMode(QHeaderView::ResizeToContents);
- ui.listBookmarks->setUniformRowHeights(true);
- ui.listBookmarks->header()->setStretchLastSection(false);
- ui.listBookmarks->header()->setResizeMode(QHeaderView::ResizeToContents);
-
- indexModel = new IndexListModel(this);
- ui.listIndex->setModel(indexModel);
- ui.listIndex->setLayoutMode(QListView::Batched);
- ui.listBookmarks->setItemHidden(ui.listBookmarks->headerItem(), true);
- ui.listContents->setItemHidden(ui.listContents->headerItem(), true);
- ui.searchButton->setShortcut(QKeySequence(Qt::ALT|Qt::SHIFT|Qt::Key_S));
-}
-
-void HelpDialog::initialize()
-{
- connect(ui.tabWidget, SIGNAL(currentChanged(int)), this, SLOT(currentTabChanged(int)));
-
- connect(ui.listContents, SIGNAL(itemActivated(QTreeWidgetItem*,int)), this, SLOT(showTopic(QTreeWidgetItem*)));
- connect(ui.listContents, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showTreeItemMenu(QPoint)));
- ui.listContents->viewport()->installEventFilter(this);
-
- connect(ui.editIndex, SIGNAL(returnPressed()), this, SLOT(showTopic()));
- connect(ui.editIndex, SIGNAL(textEdited(QString)), this, SLOT(searchInIndex(QString)));
-
- connect(ui.listIndex, SIGNAL(activated(QModelIndex)), this, SLOT(showTopic()));
- connect(ui.listIndex, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showIndexItemMenu(QPoint)));
-
- connect(ui.listBookmarks, SIGNAL(itemActivated(QTreeWidgetItem*,int)), this, SLOT(showTopic(QTreeWidgetItem*)));
- connect(ui.listBookmarks, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showTreeItemMenu(QPoint)));
-
- connect(ui.termsEdit, SIGNAL(textChanged(QString)), this, SLOT(updateSearchButton(QString)));
-
- connect(ui.resultBox, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showListItemMenu(QPoint)));
-
- cacheFilesPath = QDir::homePath() + QLatin1String("/.assistant"); //### Find a better location for the dbs
-
- ui.editIndex->installEventFilter(this);
-
- ui.framePrepare->hide();
- connect(qApp, SIGNAL(lastWindowClosed()), SLOT(lastWinClosed()));
-
- ui.termsEdit->setValidator(new SearchValidator(ui.termsEdit));
-
- actionOpenCurrentTab = new QAction(this);
- actionOpenCurrentTab->setText(tr("Open Link in Current Tab"));
-
- actionOpenLinkInNewWindow = new QAction(this);
- actionOpenLinkInNewWindow->setText(tr("Open Link in New Window"));
-
- actionOpenLinkInNewTab = new QAction(this);
- actionOpenLinkInNewTab->setText(tr("Open Link in New Tab"));
-
- itemPopup = new QMenu(this);
- itemPopup->addAction(actionOpenCurrentTab);
- itemPopup->addAction(actionOpenLinkInNewWindow);
- itemPopup->addAction(actionOpenLinkInNewTab);
-
- ui.tabWidget->setElideMode(Qt::ElideNone);
-
- contentList.clear();
-
- initDoneMsgShown = false;
- fullTextIndex = 0;
- indexDone = false;
- titleMapDone = false;
- contentsInserted = false;
- bookmarksInserted = false;
- setupTitleMap();
-
-}
-
-void HelpDialog::processEvents()
-{
- qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
-}
-
-
-void HelpDialog::lastWinClosed()
-{
- lwClosed = true;
-}
-
-void HelpDialog::removeOldCacheFiles(bool onlyFulltextSearchIndex)
-{
- if (!verifyDirectory(cacheFilesPath)) {
- qWarning("Failed to created assistant directory");
- return;
- }
- QString pname = QLatin1String(".") + Config::configuration()->profileName();
-
- QStringList fileList;
- fileList << QLatin1String("indexdb40.dict")
- << QLatin1String("indexdb40.doc");
-
- if (!onlyFulltextSearchIndex)
- fileList << QLatin1String("indexdb40") << QLatin1String("contentdb40");
-
- QStringList::iterator it = fileList.begin();
- for (; it != fileList.end(); ++it) {
- if (QFile::exists(cacheFilesPath + QDir::separator() + *it + pname)) {
- QFile f(cacheFilesPath + QDir::separator() + *it + pname);
- f.remove();
- }
- }
-}
-
-void HelpDialog::timerEvent(QTimerEvent *e)
-{
- Q_UNUSED(e);
- static int opacity = 255;
- help->setWindowOpacity((opacity-=4)/255.0);
- if (opacity<=0)
- qApp->quit();
-}
-
-
-void HelpDialog::loadIndexFile()
-{
- if (indexDone)
- return;
-
- setCursor(Qt::WaitCursor);
- indexDone = true;
- ui.labelPrepare->setText(tr("Prepare..."));
- ui.framePrepare->show();
- processEvents();
-
- QProgressBar *bar = ui.progressPrepare;
- bar->setMaximum(100);
- bar->setValue(0);
-
- keywordDocuments.clear();
- QList<IndexKeyword> lst;
- QFile indexFile(cacheFilesPath + QDir::separator() + QLatin1String("indexdb40.") +
- Config::configuration()->profileName());
- if (!indexFile.open(QFile::ReadOnly)) {
- buildKeywordDB();
- processEvents();
- if (lwClosed)
- return;
- if (!indexFile.open(QFile::ReadOnly)) {
- QMessageBox::warning(help, tr("Qt Assistant"), tr("Failed to load keyword index file\n"
- "Assistant will not work!"));
-#if defined Q_WS_WIN || defined Q_WS_MACX
- startTimer(50);
-#endif
- return;
- }
- }
-
- QDataStream ds(&indexFile);
- quint32 fileAges;
- ds >> fileAges;
- if (fileAges != getFileAges()) {
- indexFile.close();
- buildKeywordDB();
- if (!indexFile.open(QFile::ReadOnly)) {
- QMessageBox::warning(help, tr("Qt Assistant"),
- tr("Cannot open the index file %1").arg(QFileInfo(indexFile).absoluteFilePath()));
- return;
- }
- ds.setDevice(&indexFile);
- ds >> fileAges;
- }
- ds >> lst;
- indexFile.close();
-
- bar->setValue(bar->maximum());
- processEvents();
-
- for (int i=0; i<lst.count(); ++i) {
- const IndexKeyword &idx = lst.at(i);
- indexModel->addLink(idx.keyword, idx.link);
-
- keywordDocuments << HelpDialog::removeAnchorFromLink(idx.link);
- }
-
- indexModel->publish();
-
- ui.framePrepare->hide();
- showInitDoneMessage();
- setCursor(Qt::ArrowCursor);
-}
-
-quint32 HelpDialog::getFileAges()
-{
- QStringList addDocuFiles = Config::configuration()->docFiles();
- QStringList::const_iterator i = addDocuFiles.constBegin();
-
- quint32 fileAges = 0;
- for (; i != addDocuFiles.constEnd(); ++i) {
- QFileInfo fi(*i);
- if (fi.exists())
- fileAges += fi.lastModified().toTime_t();
- }
-
- return fileAges;
-}
-
-void HelpDialog::buildKeywordDB()
-{
- QStringList addDocuFiles = Config::configuration()->docFiles();
- QStringList::iterator i = addDocuFiles.begin();
-
- // Set up an indeterminate progress bar.
- ui.labelPrepare->setText(tr("Prepare..."));
- ui.progressPrepare->setMaximum(0);
- ui.progressPrepare->setMinimum(0);
- ui.progressPrepare->setValue(0);
- processEvents();
-
- QList<IndexKeyword> lst;
- quint32 fileAges = 0;
- for (i = addDocuFiles.begin(); i != addDocuFiles.end(); ++i) {
- QFile file(*i);
- if (!file.exists()) {
- QMessageBox::warning(this, tr("Warning"),
- tr("Documentation file %1 does not exist!\n"
- "Skipping file.").arg(QFileInfo(file).absoluteFilePath()));
- continue;
- }
- fileAges += QFileInfo(file).lastModified().toTime_t();
- DocuParser *handler = DocuParser::createParser(*i);
- bool ok = handler->parse(&file);
- file.close();
- if (!ok){
- QString msg = QString::fromLatin1("In file %1:\n%2")
- .arg(QFileInfo(file).absoluteFilePath())
- .arg(handler->errorProtocol());
- QMessageBox::critical(this, tr("Parse Error"), tr(msg.toUtf8()));
- delete handler;
- continue;
- }
-
- QList<IndexItem*> indLst = handler->getIndexItems();
- int counter = 0;
- foreach (IndexItem *indItem, indLst) {
- QFileInfo fi(indItem->reference);
- lst.append(IndexKeyword(indItem->keyword, indItem->reference));
-
- if (++counter%100 == 0) {
- if (ui.progressPrepare)
- ui.progressPrepare->setValue(counter);
- processEvents();
- if (lwClosed) {
- return;
- }
- }
- }
- delete handler;
- }
- if (!lst.isEmpty())
- qSort(lst);
-
- QFile indexout(cacheFilesPath + QDir::separator() + QLatin1String("indexdb40.")
- + Config::configuration()->profileName());
- if (verifyDirectory(cacheFilesPath) && indexout.open(QFile::WriteOnly)) {
- QDataStream s(&indexout);
- s << fileAges;
- s << lst;
- indexout.close();
- }
-}
-
-void HelpDialog::setupTitleMap()
-{
- if (titleMapDone)
- return;
-
- bool needRebuild = false;
- if (Config::configuration()->profileName() == QLatin1String("default")) {
- const QStringList docuFiles = Config::configuration()->docFiles();
- for (QStringList::ConstIterator it = docuFiles.begin(); it != docuFiles.end(); ++it) {
- if (!QFile::exists(*it)) {
- Config::configuration()->saveProfile(Profile::createDefaultProfile());
- Config::configuration()->loadDefaultProfile();
- needRebuild = true;
- break;
- }
- }
- }
-
- if (Config::configuration()->docRebuild() || needRebuild) {
- removeOldCacheFiles();
- Config::configuration()->setDocRebuild(false);
- Config::configuration()->saveProfile(Config::configuration()->profile());
- }
- if (contentList.isEmpty())
- getAllContents();
-
- titleMapDone = true;
- titleMap.clear();
- for (QList<QPair<QString, ContentList> >::Iterator it = contentList.begin(); it != contentList.end(); ++it) {
- ContentList lst = (*it).second;
- foreach (ContentItem item, lst) {
- titleMap[item.reference] = item.title.trimmed();
- }
- }
- processEvents();
-}
-
-void HelpDialog::getAllContents()
-{
- QFile contentFile(cacheFilesPath + QDir::separator() + QLatin1String("contentdb40.")
- + Config::configuration()->profileName());
- contentList.clear();
- if (!contentFile.open(QFile::ReadOnly)) {
- buildContentDict();
- return;
- }
-
- QDataStream ds(&contentFile);
- quint32 fileAges;
- ds >> fileAges;
- if (fileAges != getFileAges()) {
- contentFile.close();
- removeOldCacheFiles(true);
- buildContentDict();
- return;
- }
- QString key;
- QList<ContentItem> lst;
- while (!ds.atEnd()) {
- ds >> key;
- ds >> lst;
- contentList += qMakePair(key, QList<ContentItem>(lst));
- }
- contentFile.close();
- processEvents();
-
-}
-
-void HelpDialog::buildContentDict()
-{
- QStringList docuFiles = Config::configuration()->docFiles();
-
- quint32 fileAges = 0;
- for (QStringList::iterator it = docuFiles.begin(); it != docuFiles.end(); ++it) {
- QFile file(*it);
- if (!file.exists()) {
- QMessageBox::warning(this, tr("Warning"),
- tr("Documentation file %1 does not exist!\n"
- "Skipping file.").arg(QFileInfo(file).absoluteFilePath()));
- continue;
- }
- fileAges += QFileInfo(file).lastModified().toTime_t();
- DocuParser *handler = DocuParser::createParser(*it);
- if (!handler) {
- QMessageBox::warning(this, tr("Warning"),
- tr("Documentation file %1 is not compatible!\n"
- "Skipping file.").arg(QFileInfo(file).absoluteFilePath()));
- continue;
- }
- bool ok = handler->parse(&file);
- file.close();
- if (ok) {
- contentList += qMakePair(*it, QList<ContentItem>(handler->getContentItems()));
- delete handler;
- } else {
- QString msg = QString::fromLatin1("In file %1:\n%2")
- .arg(QFileInfo(file).absoluteFilePath())
- .arg(handler->errorProtocol());
- QMessageBox::critical(this, tr("Parse Error"), tr(msg.toUtf8()));
- continue;
- }
- }
-
- QFile contentOut(cacheFilesPath + QDir::separator() + QLatin1String("contentdb40.")
- + Config::configuration()->profileName());
- if (contentOut.open(QFile::WriteOnly)) {
- QDataStream s(&contentOut);
- s << fileAges;
- for (QList<QPair<QString, ContentList> >::Iterator it = contentList.begin(); it != contentList.end(); ++it) {
- s << *it;
- }
- contentOut.close();
- }
-}
-
-void HelpDialog::currentTabChanged(int index)
-{
- QString s = ui.tabWidget->widget(index)->objectName();
- if (s == QLatin1String("indexPage"))
- QTimer::singleShot(0, this, SLOT(loadIndexFile()));
- else if (s == QLatin1String("bookmarkPage"))
- insertBookmarks();
- else if (s == QLatin1String("contentPage"))
- QTimer::singleShot(0, this, SLOT(insertContents()));
- else if (s == QLatin1String("searchPage"))
- QTimer::singleShot(0, this, SLOT(setupFullTextIndex()));
-}
-
-void HelpDialog::showInitDoneMessage()
-{
- if (initDoneMsgShown)
- return;
- initDoneMsgShown = true;
- help->statusBar()->showMessage(tr("Done"), 3000);
-}
-
-void HelpDialog::showTopic(QTreeWidgetItem *item)
-{
- if (item)
- showTopic();
-}
-
-void HelpDialog::showTopic()
-{
- QString tabName = ui.tabWidget->currentWidget()->objectName();
-
- if (tabName == QLatin1String("indexPage"))
- showIndexTopic();
- else if (tabName == QLatin1String("bookmarkPage"))
- showBookmarkTopic();
- else if (tabName == QLatin1String("contentPage"))
- showContentsTopic();
-}
-
-void HelpDialog::showIndexTopic()
-{
- int row = ui.listIndex->currentIndex().row();
- if (row == -1 || row >= indexModel->rowCount())
- return;
-
- QString description = indexModel->description(row);
- QStringList links = indexModel->links(row);
-
- bool blocked = ui.editIndex->blockSignals(true);
- ui.editIndex->setText(description);
- ui.editIndex->blockSignals(blocked);
-
- if (links.count() == 1) {
- emit showLink(links.first());
- } else {
- qSort(links);
- QStringList::Iterator it = links.begin();
- QStringList linkList;
- QStringList linkNames;
- for (; it != links.end(); ++it) {
- linkList << *it;
- linkNames << titleOfLink(*it);
- }
- QString link = TopicChooser::getLink(this, linkNames, linkList, description);
- if (!link.isEmpty())
- emit showLink(link);
- }
-
- ui.listIndex->setCurrentIndex(indexModel->index(indexModel->stringList().indexOf(description)));
- ui.listIndex->scrollTo(ui.listIndex->currentIndex(), QAbstractItemView::PositionAtTop);
-}
-
-void HelpDialog::searchInIndex(const QString &searchString)
-{
- QRegExp atoz(QLatin1String("[A-Z]"));
- int matches = searchString.count(atoz);
- if (matches > 0 && !searchString.contains(QLatin1String(".*")))
- {
- int start = 0;
- QString newSearch;
- for (; matches > 0; --matches) {
- int match = searchString.indexOf(atoz, start+1);
- if (match <= start)
- continue;
- newSearch += searchString.mid(start, match-start);
- newSearch += QLatin1String(".*");
- start = match;
- }
- newSearch += searchString.mid(start);
- ui.listIndex->setCurrentIndex(indexModel->filter(newSearch, searchString));
- }
- else
- ui.listIndex->setCurrentIndex(indexModel->filter(searchString, searchString));
-}
-
-QString HelpDialog::titleOfLink(const QString &link)
-{
- QString s = HelpDialog::removeAnchorFromLink(link);
- s = titleMap[s];
- if (s.isEmpty())
- return link;
- return s;
-}
-
-bool HelpDialog::eventFilter(QObject * o, QEvent * e)
-{
- if (o == ui.editIndex && e->type() == QEvent::KeyPress) {
- switch (static_cast<QKeyEvent*>(e)->key()) {
- case Qt::Key_Up:
- case Qt::Key_Down:
- case Qt::Key_PageDown:
- case Qt::Key_PageUp:
- QApplication::sendEvent(ui.listIndex, e);
- break;
-
- default:
- break;
- }
- } else if (o == ui.listContents->viewport()) {
- if (e->type() == QEvent::MouseButtonRelease) {
- QMouseEvent *me = static_cast<QMouseEvent*>(e);
- if (me->button() == Qt::LeftButton) {
- QTreeWidgetItem *item = ui.listContents->itemAt(me->pos());
- QRect vRect = ui.listContents->visualItemRect(item);
-
- // only show topic if we clicked an item
- if (item && vRect.contains(me->pos()))
- showTopic(item);
- }
- }
- }
-
- return QWidget::eventFilter(o, e);
-}
-
-void HelpDialog::addBookmark()
-{
- if (!bookmarksInserted)
- insertBookmarks();
- QString link = help->browsers()->currentBrowser()->source().toString();
- QString title = help->browsers()->currentBrowser()->documentTitle();
- if (title.isEmpty())
- title = titleOfLink(link);
-
- QTreeWidgetItem *i = new QTreeWidgetItem(ui.listBookmarks, 0);
- i->setText(0, title);
- i->setData(0, LinkRole, link);
- ui.buttonRemove->setEnabled(true);
- saveBookmarks();
- help->updateBookmarkMenu();
-}
-
-void HelpDialog::on_buttonAdd_clicked()
-{
- addBookmark();
-}
-
-void HelpDialog::on_buttonRemove_clicked()
-{
- if (!ui.listBookmarks->currentItem())
- return;
-
- delete ui.listBookmarks->currentItem();
- saveBookmarks();
- if (ui.listBookmarks->topLevelItemCount() != 0) {
- ui.listBookmarks->setCurrentItem(ui.listBookmarks->topLevelItem(0));
- }
- ui.buttonRemove->setEnabled(ui.listBookmarks->topLevelItemCount() > 0);
- help->updateBookmarkMenu();
-}
-
-void HelpDialog::insertBookmarks()
-{
- if (bookmarksInserted)
- return;
- bookmarksInserted = true;
- ui.listBookmarks->clear();
- QFile f(cacheFilesPath + QDir::separator() + QLatin1String("bookmarks.")
- + Config::configuration()->profileName());
- if (!f.open(QFile::ReadOnly))
- return;
- QTextStream ts(&f);
- while (!ts.atEnd()) {
- QTreeWidgetItem *i = new QTreeWidgetItem(ui.listBookmarks, 0);
- i->setText(0, ts.readLine());
- i->setData(0, LinkRole, ts.readLine());
- }
- ui.buttonRemove->setEnabled(ui.listBookmarks->topLevelItemCount() > 0);
- help->updateBookmarkMenu();
- showInitDoneMessage();
-}
-
-void HelpDialog::showBookmarkTopic()
-{
- if (!ui.listBookmarks->currentItem())
- return;
-
- QTreeWidgetItem *i = (QTreeWidgetItem*)ui.listBookmarks->currentItem();
- emit showLink(i->data(0, LinkRole).toString());
-}
-
-static void store(QTreeWidgetItem *i, QTextStream &ts)
-{
- ts << i->text(0) << endl;
- ts << i->data(0, LinkRole).toString() << endl;
-
- for (int index = 0; index < i->childCount(); ++index)
- store(i->child(index), ts);
-}
-
-static void store(QTreeWidget *tw, QTextStream &ts)
-{
- for (int index = 0; index < tw->topLevelItemCount(); ++index)
- store(tw->topLevelItem(index), ts);
-}
-
-void HelpDialog::saveBookmarks()
-{
- QFile f(cacheFilesPath + QDir::separator() + QLatin1String("bookmarks.")
- + Config::configuration()->profileName());
- if (!f.open(QFile::WriteOnly))
- return;
-
- QTextStream ts(&f);
- store(ui.listBookmarks, ts);
- f.close();
-}
-
-void HelpDialog::insertContents()
-{
-#ifdef Q_WS_MAC
- static const QLatin1String IconPath(":/trolltech/assistant/images/mac/book.png");
-#else
- static const QLatin1String IconPath(":/trolltech/assistant/images/win/book.png");
-#endif
- if (contentsInserted)
- return;
-
- if (contentList.isEmpty())
- getAllContents();
-
- contentsInserted = true;
- ui.listContents->clear();
- setCursor(Qt::WaitCursor);
- if (!titleMapDone)
- setupTitleMap();
-
-#if 0 // ### port me
- ui.listContents->setSorting(-1);
-#endif
-
- for (QList<QPair<QString, ContentList> >::Iterator it = contentList.begin(); it != contentList.end(); ++it) {
- QTreeWidgetItem *newEntry = 0;
-
- QTreeWidgetItem *contentEntry = 0;
- QStack<QTreeWidgetItem*> stack;
- stack.clear();
- int depth = 0;
- bool root = false;
-
- const int depthSize = 32;
- QVarLengthArray<QTreeWidgetItem*, depthSize> lastItem(depthSize);
-
- ContentList lst = (*it).second;
- for (ContentList::ConstIterator it = lst.constBegin(); it != lst.constEnd(); ++it) {
- ContentItem item = *it;
- if (item.depth == 0) {
- lastItem[0] = 0;
- newEntry = new QTreeWidgetItem(ui.listContents, 0);
- newEntry->setIcon(0, QIcon(IconPath));
- newEntry->setText(0, item.title);
- newEntry->setData(0, LinkRole, item.reference);
- stack.push(newEntry);
- depth = 1;
- root = true;
- }
- else{
- if ((item.depth > depth) && root) {
- depth = item.depth;
- stack.push(contentEntry);
- }
- if (item.depth == depth) {
- if (lastItem.capacity() == depth)
- lastItem.resize(depth + depthSize);
- contentEntry = new QTreeWidgetItem(stack.top(), lastItem[ depth ]);
- lastItem[ depth ] = contentEntry;
- contentEntry->setText(0, item.title);
- contentEntry->setData(0, LinkRole, item.reference);
- }
- else if (item.depth < depth) {
- stack.pop();
- depth--;
- item = *(--it);
- }
- }
- }
- processEvents();
- }
- setCursor(Qt::ArrowCursor);
- showInitDoneMessage();
-}
-
-void HelpDialog::showContentsTopic()
-{
- QTreeWidgetItem *i = (QTreeWidgetItem*)ui.listContents->currentItem();
- if (!i)
- return;
- emit showLink(i->data(0, LinkRole).toString());
-}
-
-QTreeWidgetItem * HelpDialog::locateLink(QTreeWidgetItem *item, const QString &link)
-{
- QTreeWidgetItem *child = 0;
-#ifdef Q_OS_WIN
- Qt::CaseSensitivity checkCase = Qt::CaseInsensitive;
-#else
- Qt::CaseSensitivity checkCase = Qt::CaseSensitive;
-#endif
- for (int i = 0, childCount = item->childCount(); i<childCount; i++) {
- child = item->child(i);
- ///check whether it is this item
- if (link.startsWith(child->data(0, LinkRole).toString(), checkCase))
- break;
- //check if the link is a child of this item
- else if (child->childCount()) {
- child = locateLink(child, link);
- if (child)
- break;
- }
- child = 0;
- }
- return child;
-}
-
-void HelpDialog::locateContents(const QString &link)
-{
- //ensure the TOC is filled
- if (!contentsInserted)
- insertContents();
-#ifdef Q_OS_WIN
- Qt::CaseSensitivity checkCase = Qt::CaseInsensitive;
-#else
- Qt::CaseSensitivity checkCase = Qt::CaseSensitive;
-#endif
- QString findLink(link);
- //Installations on a windows local drive will give the 'link' as <file:///C:/xxx>
- //and the contents in the TOC will be <file:C:/xxx>.
- //But on others the 'link' of format <file:///root/xxx>
- //and the contents in the TOC will be <file:/root/xxx>.
- if (findLink.contains(QLatin1String("file:///"))) {
- if (findLink[9] == QLatin1Char(':')) //on windows drives
- findLink.replace(0, 8, QLatin1String("file:"));
- else
- findLink.replace(0, 8, QLatin1String("file:/"));
- }
-
- bool topLevel = false;
- QTreeWidgetItem *item = 0;
- int totalItems = ui.listContents->topLevelItemCount();
-
- for (int i = 0; i < totalItems; i++ ) {
- // first see if we are one of the top level items
- item = (QTreeWidgetItem*)ui.listContents->topLevelItem(i);
- if (findLink.startsWith(item->data(0, LinkRole).toString(), checkCase)) {
- topLevel = true;
- break;
- }
- }
-
- if (!topLevel) {
- // now try to find it in the sublevel items
- for (int n = 0; n < totalItems; ++n) {
- item = (QTreeWidgetItem*)ui.listContents->topLevelItem(n);
- item = locateLink(item, findLink);
- if (item)
- break;
- }
- }
-
- //remove the old selection
- QList<QTreeWidgetItem *> selected = ui.listContents->selectedItems();
- foreach(QTreeWidgetItem *sel, selected)
- ui.listContents->setItemSelected(sel, false);
-
- //set the TOC item and show
- ui.listContents->setCurrentItem(item);
- ui.listContents->setItemSelected(item, true);
- ui.listContents->scrollToItem(item);
-}
-
-void HelpDialog::toggleContents()
-{
- if (!isVisible() || ui.tabWidget->currentIndex() != 0) {
- ui.tabWidget->setCurrentIndex(0);
- parentWidget()->show();
- }
- else
- parentWidget()->hide();
-}
-
-void HelpDialog::toggleIndex()
-{
- if (!isVisible() || ui.tabWidget->currentIndex() != 1 || !ui.editIndex->hasFocus()) {
- ui.tabWidget->setCurrentIndex(1);
- parentWidget()->show();
- ui.editIndex->setFocus();
- }
- else
- parentWidget()->hide();
-}
-
-void HelpDialog::toggleBookmarks()
-{
- if (!isVisible() || ui.tabWidget->currentIndex() != 2) {
- ui.tabWidget->setCurrentIndex(2);
- parentWidget()->show();
- }
- else
- parentWidget()->hide();
-}
-
-void HelpDialog::toggleSearch()
-{
- if (!isVisible() || ui.tabWidget->currentIndex() != 3) {
- ui.tabWidget->setCurrentIndex(3);
- parentWidget()->show();
- }
- else
- parentWidget()->hide();
-}
-
-void HelpDialog::setupFullTextIndex()
-{
- if (fullTextIndex)
- return;
-
- QString pname = Config::configuration()->profileName();
- fullTextIndex = new Index(QStringList(), QDir::homePath()); // ### Is this correct ?
- if (!verifyDirectory(cacheFilesPath)) {
- QMessageBox::warning(help, tr("Qt Assistant"),
- tr("Failed to save fulltext search index\n"
- "Assistant will not work!"));
- return;
- }
- fullTextIndex->setDictionaryFile(cacheFilesPath + QDir::separator() + QLatin1String("indexdb40.dict.") + pname);
- fullTextIndex->setDocListFile(cacheFilesPath + QDir::separator() + QLatin1String("indexdb40.doc.") + pname);
- processEvents();
-
- connect(fullTextIndex, SIGNAL(indexingProgress(int)),
- this, SLOT(setIndexingProgress(int)));
- QFile f(cacheFilesPath + QDir::separator() + QLatin1String("indexdb40.dict.") + pname);
- if (!f.exists()) {
- QString doc;
- QSet<QString> documentSet;
- QMap<QString, QString>::ConstIterator it = titleMap.constBegin();
- for (; it != titleMap.constEnd(); ++it) {
- doc = HelpDialog::removeAnchorFromLink(it.key());
- if (!doc.isEmpty())
- documentSet.insert(doc);
- }
- loadIndexFile();
- for ( QStringList::Iterator it = keywordDocuments.begin(); it != keywordDocuments.end(); ++it ) {
- if (!(*it).isEmpty())
- documentSet.insert(*it);
- }
- fullTextIndex->setDocList( documentSet.toList() );
-
- help->statusBar()->clearMessage();
- setCursor(Qt::WaitCursor);
- ui.labelPrepare->setText(tr("Indexing files..."));
- ui.progressPrepare->setMaximum(100);
- ui.progressPrepare->reset();
- ui.progressPrepare->show();
- ui.framePrepare->show();
- processEvents();
- if (fullTextIndex->makeIndex() == -1)
- return;
- fullTextIndex->writeDict();
- ui.progressPrepare->setValue(100);
- ui.framePrepare->hide();
- setCursor(Qt::ArrowCursor);
- showInitDoneMessage();
- } else {
- setCursor(Qt::WaitCursor);
- help->statusBar()->showMessage(tr("Reading dictionary..."));
- processEvents();
- fullTextIndex->readDict();
- help->statusBar()->showMessage(tr("Done"), 3000);
- setCursor(Qt::ArrowCursor);
- }
- keywordDocuments.clear();
-}
-
-void HelpDialog::setIndexingProgress(int prog)
-{
- ui.progressPrepare->setValue(prog);
- processEvents();
-}
-
-void HelpDialog::startSearch()
-{
- QString str = ui.termsEdit->text();
- str = str.simplified();
- str = str.replace(QLatin1String("\'"), QLatin1String("\""));
- str = str.replace(QLatin1String("`"), QLatin1String("\""));
- QString buf = str;
- str = str.replace(QLatin1String("-"), QLatin1String(" "));
- str = str.replace(QRegExp(QLatin1String("\\s[\\S]?\\s")), QLatin1String(" "));
- terms = str.split(QLatin1Char(' '));
- QStringList termSeq;
- QStringList seqWords;
- QStringList::iterator it = terms.begin();
- for (; it != terms.end(); ++it) {
- (*it) = (*it).simplified();
- (*it) = (*it).toLower();
- (*it) = (*it).replace(QLatin1String("\""), QLatin1String(""));
- }
- if (str.contains(QLatin1Char('\"'))) {
- if ((str.count(QLatin1Char('\"')))%2 == 0) {
- int beg = 0;
- int end = 0;
- QString s;
- beg = str.indexOf(QLatin1Char('\"'), beg);
- while (beg != -1) {
- beg++;
- end = str.indexOf(QLatin1Char('\"'), beg);
- s = str.mid(beg, end - beg);
- s = s.toLower();
- s = s.simplified();
- if (s.contains(QLatin1Char('*'))) {
- QMessageBox::warning(this, tr("Full Text Search"),
- tr("Using a wildcard within phrases is not allowed."));
- return;
- }
- seqWords += s.split(QLatin1Char(' '));
- termSeq << s;
- beg = str.indexOf(QLatin1Char('\"'), end + 1);
- }
- } else {
- QMessageBox::warning(this, tr("Full Text Search"),
- tr("The closing quotation mark is missing."));
- return;
- }
- }
- setCursor(Qt::WaitCursor);
- foundDocs.clear();
- foundDocs = fullTextIndex->query(terms, termSeq, seqWords);
- QString msg = tr("%n document(s) found.", "", foundDocs.count());
- help->statusBar()->showMessage(tr(msg.toUtf8()), 3000);
- ui.resultBox->clear();
- for (it = foundDocs.begin(); it != foundDocs.end(); ++it)
- ui.resultBox->addItem(fullTextIndex->getDocumentTitle(*it));
-
- terms.clear();
- bool isPhrase = false;
- QString s;
- for (int i = 0; i < (int)buf.length(); ++i) {
- if (buf[i] == QLatin1Char('\"')) {
- isPhrase = !isPhrase;
- s = s.simplified();
- if (!s.isEmpty())
- terms << s;
- s = QLatin1String("");
- } else if (buf[i] == QLatin1Char(' ') && !isPhrase) {
- s = s.simplified();
- if (!s.isEmpty())
- terms << s;
- s = QLatin1String("");
- } else
- s += buf[i];
- }
- if (!s.isEmpty())
- terms << s;
-
- setCursor(Qt::ArrowCursor);
-}
-
-void HelpDialog::on_helpButton_clicked()
-{
- emit showLink(MainWindow::urlifyFileName(
- Config::configuration()->assistantDocPath() +
- QLatin1String("/assistant-manual.html#full-text-searching")));
-}
-
-void HelpDialog::on_resultBox_itemActivated(QListWidgetItem *item)
-{
- showResultPage(item);
-}
-
-void HelpDialog::showResultPage(QListWidgetItem *item)
-{
- if (item)
- emit showSearchLink(foundDocs[ui.resultBox->row(item)], terms);
-}
-
-void HelpDialog::showIndexItemMenu(const QPoint &pos)
-{
- QListView *listView = qobject_cast<QListView*>(sender());
- if (!listView)
- return;
-
- QModelIndex idx = listView->indexAt(pos);
- if (!idx.isValid())
- return;
-
- QAction *action = itemPopup->exec(listView->viewport()->mapToGlobal(pos));
- if (action == actionOpenCurrentTab) {
- showTopic();
- } else if (action) {
- HelpWindow *hw = help->browsers()->currentBrowser();
- QString itemName = idx.data().toString();
- ui.editIndex->setText(itemName);
- QStringList links = indexModel->links(idx.row());
- if (links.count() == 1) {
- if (action == actionOpenLinkInNewWindow)
- hw->openLinkInNewWindow(links.first());
- else
- hw->openLinkInNewPage(links.first());
- } else {
- QStringList::Iterator it = links.begin();
- QStringList linkList;
- QStringList linkNames;
- for (; it != links.end(); ++it) {
- linkList << *it;
- linkNames << titleOfLink(*it);
- }
- QString link = TopicChooser::getLink(this, linkNames, linkList, itemName);
- if (!link.isEmpty()) {
- if (action == actionOpenLinkInNewWindow)
- hw->openLinkInNewWindow(link);
- else
- hw->openLinkInNewPage(link);
- }
- }
- }
-}
-
-void HelpDialog::showListItemMenu(const QPoint &pos)
-{
- QListWidget *listWidget = qobject_cast<QListWidget*>(sender());
- if (!listWidget)
- return;
- QListWidgetItem *item = listWidget->itemAt(pos);
- if (!item)
- return;
-
- QAction *action = itemPopup->exec(listWidget->viewport()->mapToGlobal(pos));
- if (action == actionOpenCurrentTab) {
- showResultPage(item);
- } else if (action) {
- HelpWindow *hw = help->browsers()->currentBrowser();
- QString link = foundDocs[ui.resultBox->row(item)];
- if (action == actionOpenLinkInNewWindow)
- hw->openLinkInNewWindow(link);
- else
- hw->openLinkInNewPage(link);
- }
-}
-
-void HelpDialog::showTreeItemMenu(const QPoint &pos)
-{
- QTreeWidget *treeWidget = qobject_cast<QTreeWidget*>(sender());
-
- if (!treeWidget)
- return;
-
- QTreeWidgetItem *item = treeWidget->itemAt(pos);
-
- if (!item)
- return;
-
- QAction *action = itemPopup->exec(treeWidget->viewport()->mapToGlobal(pos));
- if (action == actionOpenCurrentTab) {
- if (ui.tabWidget->currentWidget()->objectName() == QLatin1String("contentPage"))
- showContentsTopic();
- else
- showBookmarkTopic();
- } else if (action) {
- QTreeWidgetItem *i = (QTreeWidgetItem*)item;
- if (action == actionOpenLinkInNewWindow)
- help->browsers()->currentBrowser()->openLinkInNewWindow(i->data(0, LinkRole).toString());
- else
- help->browsers()->currentBrowser()->openLinkInNewPage(i->data(0, LinkRole).toString());
- }
-}
-
-void HelpDialog::on_termsEdit_returnPressed()
-{
- startSearch();
-}
-
-void HelpDialog::updateSearchButton(const QString &txt)
-{
- ui.searchButton->setDisabled(txt.isEmpty());
-}
-
-void HelpDialog::on_searchButton_clicked()
-{
- startSearch();
-}
-
-QString HelpDialog::removeAnchorFromLink(const QString &link)
-{
- int i = link.length();
- int j = link.lastIndexOf(QLatin1Char('/'));
- int l = link.lastIndexOf(QDir::separator());
- if (l > j)
- j = l;
- if (j > -1) {
- QString fileName = link.mid(j+1);
- int k = fileName.lastIndexOf(QLatin1Char('#'));
- if (k > -1)
- i = j + k + 1;
- }
- return link.left(i);
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/helpdialog.h b/tools/assistant/compat/helpdialog.h
deleted file mode 100644
index 4e1bac28e6..0000000000
--- a/tools/assistant/compat/helpdialog.h
+++ /dev/null
@@ -1,184 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef HELPDIALOG_H
-#define HELPDIALOG_H
-
-#include "ui_helpdialog.h"
-#include "index.h"
-#include "helpwindow.h"
-#include "docuparser.h"
-
-#include <QList>
-#include <QPair>
-#include <QListWidget>
-#include <QTreeWidget>
-#include <QMap>
-#include <QStringList>
-#include <QValidator>
-#include <qmenu.h>
-#include <QHash>
-
-QT_BEGIN_NAMESPACE
-
-class QProgressBar;
-class MainWindow;
-class QTextBrowser;
-class IndexListModel;
-
-class HelpNavigationListItem : public QListWidgetItem
-{
-public:
- HelpNavigationListItem(QListWidget *ls, const QString &txt);
-
- void addLink(const QString &link);
- QStringList links() const { return linkList; }
-private:
- QStringList linkList;
-
-};
-
-class SearchValidator : public QValidator
-{
- Q_OBJECT
-public:
- SearchValidator(QObject *parent)
- : QValidator(parent) {}
- ~SearchValidator() {}
- QValidator::State validate(QString &str, int &) const;
-};
-
-class HelpDialog : public QWidget
-{
- Q_OBJECT
-public:
- HelpDialog(QWidget *parent, MainWindow *h);
-
- inline QTabWidget *tabWidget() const
- { return ui.tabWidget; }
-
- QString titleOfLink(const QString &link);
- bool eventFilter(QObject *, QEvent *);
- bool lastWindowClosed() { return lwClosed; }
-
- void timerEvent(QTimerEvent *e);
- static QString removeAnchorFromLink(const QString &link);
-
-signals:
- void showLink(const QString &s);
- void showSearchLink(const QString &s, const QStringList &terms);
-
-public slots:
- void initialize();
- void startSearch();
- void addBookmark();
- void currentTabChanged(int index);
- void locateContents(const QString &link);
-
-private slots:
- void on_buttonAdd_clicked();
- void on_buttonRemove_clicked();
- void on_termsEdit_returnPressed();
- void on_helpButton_clicked();
- void on_searchButton_clicked();
- void on_resultBox_itemActivated(QListWidgetItem*);
- void updateSearchButton(const QString &txt);
-
- void showResultPage(QListWidgetItem *);
-
- void showTopic(QTreeWidgetItem *);
- void loadIndexFile();
- void insertContents();
- void setupFullTextIndex();
- void showTopic();
- void searchInIndex(const QString &s);
- void toggleContents();
- void toggleIndex();
- void toggleBookmarks();
- void toggleSearch();
- void lastWinClosed();
- void setIndexingProgress(int prog);
- void showListItemMenu(const QPoint &pos);
- void showIndexItemMenu(const QPoint &pos);
- void showTreeItemMenu(const QPoint &pos);
- void insertBookmarks();
- void processEvents();
-
-private:
- typedef QList<ContentItem> ContentList;
- void removeOldCacheFiles(bool onlyFulltextSearchIndex = false);
- void buildKeywordDB();
- quint32 getFileAges();
- void showIndexTopic();
- void showBookmarkTopic();
- void setupTitleMap();
- void saveBookmarks();
- void showContentsTopic();
- void showInitDoneMessage();
- void buildContentDict();
- QTreeWidgetItem * locateLink(QTreeWidgetItem *item, const QString &link);
-
-private:
- Ui::HelpDialog ui;
-
- IndexListModel *indexModel;
- QMap<QString, QString> titleMap;
- bool indexDone, bookmarksInserted, titleMapDone, contentsInserted;
- bool lwClosed;
- MainWindow *help;
- QString documentationPath;
- Index *fullTextIndex;
- QStringList terms, foundDocs;
- bool initDoneMsgShown;
- void getAllContents();
- QList<QPair<QString, ContentList> > contentList;
- QMenu *itemPopup;
- QString cacheFilesPath;
- QStringList keywordDocuments;
-
- QAction *actionOpenCurrentTab;
- QAction *actionOpenLinkInNewWindow;
- QAction *actionOpenLinkInNewTab;
-};
-
-QT_END_NAMESPACE
-
-#endif // HELPDIALOG_H
diff --git a/tools/assistant/compat/helpdialog.ui b/tools/assistant/compat/helpdialog.ui
deleted file mode 100644
index 0fc8817743..0000000000
--- a/tools/assistant/compat/helpdialog.ui
+++ /dev/null
@@ -1,404 +0,0 @@
-<ui version="4.0" >
- <author></author>
- <comment>*********************************************************************
-**
-** 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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-*********************************************************************</comment>
- <exportmacro></exportmacro>
- <class>HelpDialog</class>
- <widget class="QWidget" name="HelpDialog" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>274</width>
- <height>417</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Help</string>
- </property>
- <property name="whatsThis" >
- <string>&lt;b>Help&lt;/b>&lt;p>Choose the topic you want help on from the contents list, or search the index for keywords.&lt;/p></string>
- </property>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QTabWidget" name="tabWidget" >
- <property name="whatsThis" >
- <string>Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.</string>
- </property>
- <widget class="QWidget" name="contentPage" >
- <attribute name="title" >
- <string>Con&amp;tents</string>
- </attribute>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>5</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QTreeWidget" name="listContents" >
- <property name="contextMenuPolicy" >
- <enum>Qt::CustomContextMenu</enum>
- </property>
- <property name="whatsThis" >
- <string>&lt;b>Help topics organized by category.&lt;/b>&lt;p>Double-click an item to see the topics in that category. To view a topic, just double-click it.&lt;/p></string>
- </property>
- <property name="rootIsDecorated" >
- <bool>true</bool>
- </property>
- <property name="uniformRowHeights" >
- <bool>true</bool>
- </property>
- <column>
- <property name="text" >
- <string>column 1</string>
- </property>
- </column>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="indexPage" >
- <attribute name="title" >
- <string>&amp;Index</string>
- </attribute>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>5</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QLabel" name="TextLabel1" >
- <property name="text" >
- <string>&amp;Look For:</string>
- </property>
- <property name="buddy" >
- <cstring>editIndex</cstring>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="editIndex" >
- <property name="toolTip" >
- <string>Enter keyword</string>
- </property>
- <property name="whatsThis" >
- <string>&lt;b>Enter a keyword.&lt;/b>&lt;p>The list will select an item that matches the entered string best.&lt;/p></string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QListView" name="listIndex" >
- <property name="contextMenuPolicy" >
- <enum>Qt::CustomContextMenu</enum>
- </property>
- <property name="whatsThis" >
- <string>&lt;b>List of available help topics.&lt;/b>&lt;p>Double-click on an item to open its help page. If more than one is found, you must specify which page you want.&lt;/p></string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="bookmarkPage" >
- <attribute name="title" >
- <string>&amp;Bookmarks</string>
- </attribute>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>5</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QTreeWidget" name="listBookmarks" >
- <property name="contextMenuPolicy" >
- <enum>Qt::CustomContextMenu</enum>
- </property>
- <property name="whatsThis" >
- <string>Displays the list of bookmarks.</string>
- </property>
- <property name="uniformRowHeights" >
- <bool>true</bool>
- </property>
- <column>
- <property name="text" >
- <string>column 1</string>
- </property>
- </column>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="buttonAdd" >
- <property name="toolTip" >
- <string>Add new bookmark</string>
- </property>
- <property name="whatsThis" >
- <string>Add the currently displayed page as a new bookmark.</string>
- </property>
- <property name="text" >
- <string>&amp;New</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="buttonRemove" >
- <property name="toolTip" >
- <string>Delete bookmark</string>
- </property>
- <property name="whatsThis" >
- <string>Delete the selected bookmark.</string>
- </property>
- <property name="text" >
- <string>&amp;Delete</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="searchPage" >
- <attribute name="title" >
- <string>&amp;Search</string>
- </attribute>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>5</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="3" column="0" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="0" column="0" >
- <widget class="QLabel" name="TextLabel1_2" >
- <property name="text" >
- <string>Searching f&amp;or:</string>
- </property>
- <property name="buddy" >
- <cstring>termsEdit</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLineEdit" name="termsEdit" >
- <property name="toolTip" >
- <string>Enter searchword(s)</string>
- </property>
- <property name="whatsThis" >
- <string>&lt;b>Enter search word(s).&lt;/b>&lt;p>Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.&lt;/p></string>
- </property>
- </widget>
- </item>
- <item row="5" column="0" >
- <widget class="QListWidget" name="resultBox" >
- <property name="contextMenuPolicy" >
- <enum>Qt::CustomContextMenu</enum>
- </property>
- <property name="whatsThis" >
- <string>&lt;b>Found documents&lt;/b>&lt;p>This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.&lt;/p></string>
- </property>
- </widget>
- </item>
- <item row="4" column="0" >
- <widget class="QLabel" name="TextLabel2" >
- <property name="text" >
- <string>Found &amp;Documents:</string>
- </property>
- <property name="buddy" >
- <cstring>resultBox</cstring>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QPushButton" name="helpButton" >
- <property name="toolTip" >
- <string>Display the help page</string>
- </property>
- <property name="whatsThis" >
- <string>Display the help page for the full text search.</string>
- </property>
- <property name="text" >
- <string>He&amp;lp</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>61</width>
- <height>21</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="searchButton" >
- <property name="toolTip" >
- <string>Start searching</string>
- </property>
- <property name="whatsThis" >
- <string>Pressing this button starts the search.</string>
- </property>
- <property name="text" >
- <string>&amp;Search</string>
- </property>
- <property name="enabled" >
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- <item>
- <widget class="QFrame" name="framePrepare" >
- <property name="frameShape" >
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>3</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QLabel" name="labelPrepare" >
- <property name="text" >
- <string>Preparing...</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QProgressBar" name="progressPrepare" />
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <pixmapfunction></pixmapfunction>
- <tabstops>
- <tabstop>tabWidget</tabstop>
- <tabstop>listContents</tabstop>
- <tabstop>editIndex</tabstop>
- <tabstop>listIndex</tabstop>
- <tabstop>listBookmarks</tabstop>
- <tabstop>buttonAdd</tabstop>
- <tabstop>buttonRemove</tabstop>
- <tabstop>termsEdit</tabstop>
- <tabstop>searchButton</tabstop>
- <tabstop>helpButton</tabstop>
- <tabstop>resultBox</tabstop>
- </tabstops>
- <resources/>
- <connections/>
-</ui>
diff --git a/tools/assistant/compat/helpwindow.cpp b/tools/assistant/compat/helpwindow.cpp
deleted file mode 100644
index 6674342650..0000000000
--- a/tools/assistant/compat/helpwindow.cpp
+++ /dev/null
@@ -1,247 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "helpwindow.h"
-#include "mainwindow.h"
-#include "tabbedbrowser.h"
-#include "helpdialog.h"
-#include "config.h"
-
-#include <QApplication>
-#include <QClipboard>
-#include <QUrl>
-#include <QMessageBox>
-#include <QDir>
-#include <QFile>
-#include <QProcess>
-#include <QAction>
-#include <QFileInfo>
-#include <QFont>
-#include <QtEvents>
-#include <QTextStream>
-#include <QTextCodec>
-#include <QStatusBar>
-#include <QTextCursor>
-#include <QTextObject>
-#include <QTextLayout>
-#include <QtDebug>
-#include <qdesktopservices.h>
-
-#include <QtGui/QClipboard>
-#include <QtGui/QApplication>
-
-#if defined(Q_OS_WIN32)
-# include <windows.h>
-#endif
-
-QT_BEGIN_NAMESPACE
-
-HelpWindow::HelpWindow(MainWindow *w, QWidget *parent)
- : QTextBrowser(parent)
- , mw(w)
- , blockScroll(false)
- , shiftPressed(false)
- , newWindow(false)
-{
- FontSettings settings = Config::configuration()->fontSettings();
- setFont(settings.browserFont);
-
- connect(this, SIGNAL(copyAvailable(bool)), w, SLOT(copyAvailable(bool)));
-}
-
-void HelpWindow::setSource(const QUrl &name)
-{
- if (name.isValid()) {
- if (name.scheme() == QLatin1String("http") || name.scheme() == QLatin1String("ftp")
- || name.scheme() == QLatin1String("mailto") || name.path().endsWith(QLatin1String("pdf"))) {
- bool launched = QDesktopServices::openUrl(name);
- if (!launched) {
- QMessageBox::information(mw, tr("Help"),
- tr("Unable to launch web browser.\n"),
- tr("OK"));
- }
- return;
- }
-
- QFileInfo fi(name.toLocalFile());
- if (name.scheme() == QLatin1String("file") && fi.exists()) {
- if (newWindow || (shiftPressed && hasFocus())) {
- shiftPressed = false;
- mw->saveSettings();
- MainWindow *nmw = new MainWindow;
- nmw->move(mw->geometry().topLeft());
- nmw->show();
-
- if (mw->isMaximized())
- nmw->showMaximized();
-
- nmw->setup();
- nmw->showLink(name.toString());
- } else {
- QTextBrowser::setSource(name);
- QTextBrowser::scrollToAnchor(name.fragment());
- }
- return;
- }
- }
-
- mw->statusBar()->showMessage(tr("Failed to open link: '%1'").arg(name.toString()), 5000);
- setHtml(tr("<div align=\"center\"><h1>The page could not be found</h1><br>"
- "<h3>'%1'</h3></div>").arg(name.toString()));
- mw->browsers()->updateTitle(tr("Error..."));
-}
-
-void HelpWindow::openLinkInNewWindow()
-{
- if (lastAnchor.isEmpty())
- return;
- newWindow = true;
- setSource(lastAnchor);
- newWindow = false;
-}
-
-void HelpWindow::openLinkInNewWindow(const QString &link)
-{
- lastAnchor = link;
- openLinkInNewWindow();
-}
-
-void HelpWindow::openLinkInNewPage()
-{
- if(lastAnchor.isEmpty())
- return;
- mw->browsers()->newTab(lastAnchor);
- lastAnchor.clear();
-}
-
-void HelpWindow::openLinkInNewPage(const QString &link)
-{
- lastAnchor = link;
- openLinkInNewPage();
-}
-
-bool HelpWindow::hasAnchorAt(const QPoint& pos)
-{
- lastAnchor = anchorAt(pos);
- if (lastAnchor.isEmpty())
- return false;
- lastAnchor = source().resolved(lastAnchor).toString();
- if (lastAnchor.at(0) == QLatin1Char('#')) {
- QString src = source().toString();
- int hsh = src.indexOf(QLatin1Char('#'));
- lastAnchor = (hsh>=0 ? src.left(hsh) : src) + lastAnchor;
- }
- return true;
-}
-
-void HelpWindow::contextMenuEvent(QContextMenuEvent *e)
-{
- QMenu menu(QLatin1String(""), 0);
-
- QUrl link;
- QAction *copyAnchorAction = 0;
- if (hasAnchorAt(e->pos())) {
- link = anchorAt(e->pos());
- if (link.isRelative())
- link = source().resolved(link);
- copyAnchorAction = menu.addAction(tr("Copy &Link Location"));
- copyAnchorAction->setEnabled(!link.isEmpty() && link.isValid());
-
- menu.addAction(tr("Open Link in New Tab"),
- this, SLOT(openLinkInNewPage()));
- menu.addAction(tr("Open Link in New Window\tShift+LMB"),
- this, SLOT(openLinkInNewWindow()));
- }
- mw->setupPopupMenu(&menu);
- QAction *action = menu.exec(e->globalPos());
- if (action == copyAnchorAction)
- QApplication::clipboard()->setText(link.toString());
-}
-
-void HelpWindow::mouseReleaseEvent(QMouseEvent *e)
-{
- if (e->button() == Qt::XButton1) {
- QTextBrowser::backward();
- return;
- }
-
- if (e->button() == Qt::XButton2) {
- QTextBrowser::forward();
- return;
- }
-
- if (e->button() == Qt::MidButton && hasAnchorAt(e->pos())) {
- openLinkInNewPage();
- return;
- }
- QTextBrowser::mouseReleaseEvent(e);
-}
-
-void HelpWindow::blockScrolling(bool b)
-{
- blockScroll = b;
-}
-
-void HelpWindow::ensureCursorVisible()
-{
- if (!blockScroll)
- QTextBrowser::ensureCursorVisible();
-}
-
-void HelpWindow::mousePressEvent(QMouseEvent *e)
-{
- shiftPressed = e->modifiers() & Qt::ShiftModifier;
- if (!(shiftPressed && hasAnchorAt(e->pos())))
- QTextBrowser::mousePressEvent(e);
-}
-
-void HelpWindow::keyPressEvent(QKeyEvent *e)
-{
- shiftPressed = e->modifiers() & Qt::ShiftModifier;
- QTextBrowser::keyPressEvent(e);
-}
-
-bool HelpWindow::isKDERunning() const
-{
- return !qgetenv("KDE_FULL_SESSION").isEmpty();
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/helpwindow.h b/tools/assistant/compat/helpwindow.h
deleted file mode 100644
index c20a21f451..0000000000
--- a/tools/assistant/compat/helpwindow.h
+++ /dev/null
@@ -1,100 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef HELPWINDOW_H
-#define HELPWINDOW_H
-
-#include <QTextBrowser>
-
-QT_BEGIN_NAMESPACE
-
-class MainWindow;
-class QKeyEvent;
-class QMime;
-class QMouseEvent;
-class QMenu;
-
-class HelpWindow : public QTextBrowser
-{
- Q_OBJECT
-public:
- HelpWindow( MainWindow *m, QWidget *parent = 0);
- void setSource( const QUrl &name );
- void blockScrolling( bool b );
- void openLinkInNewWindow( const QString &link );
- void openLinkInNewPage( const QString &link );
- void addMimePath( const QString &path );
-
- void mousePressEvent(QMouseEvent *e);
- void keyPressEvent(QKeyEvent *);
-
-signals:
- void chooseWebBrowser();
- void choosePDFReader();
-
-protected:
- virtual void contextMenuEvent(QContextMenuEvent *e);
- virtual void mouseReleaseEvent(QMouseEvent *e);
-
-protected slots:
- void ensureCursorVisible();
-
-private slots:
- void openLinkInNewWindow();
- void openLinkInNewPage();
-
- bool isKDERunning() const;
-
-private:
- bool hasAnchorAt(const QPoint& pos);
-
- MainWindow *mw;
- QString lastAnchor;
- bool blockScroll;
- bool shiftPressed;
- bool newWindow;
- bool fwdAvail;
- bool backAvail;
-};
-
-QT_END_NAMESPACE
-
-#endif // HELPWINDOW_H
diff --git a/tools/assistant/compat/images/assistant-128.png b/tools/assistant/compat/images/assistant-128.png
deleted file mode 100644
index f05949f6d8..0000000000
--- a/tools/assistant/compat/images/assistant-128.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/assistant.png b/tools/assistant/compat/images/assistant.png
deleted file mode 100644
index ea4d1e70c1..0000000000
--- a/tools/assistant/compat/images/assistant.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/close.png b/tools/assistant/compat/images/close.png
deleted file mode 100644
index 540694eae3..0000000000
--- a/tools/assistant/compat/images/close.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/designer.png b/tools/assistant/compat/images/designer.png
deleted file mode 100644
index 72c42e73e4..0000000000
--- a/tools/assistant/compat/images/designer.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/linguist.png b/tools/assistant/compat/images/linguist.png
deleted file mode 100644
index d388cbd0ba..0000000000
--- a/tools/assistant/compat/images/linguist.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/addtab.png b/tools/assistant/compat/images/mac/addtab.png
deleted file mode 100644
index 20928fb402..0000000000
--- a/tools/assistant/compat/images/mac/addtab.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/book.png b/tools/assistant/compat/images/mac/book.png
deleted file mode 100644
index 7a3204c870..0000000000
--- a/tools/assistant/compat/images/mac/book.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/closetab.png b/tools/assistant/compat/images/mac/closetab.png
deleted file mode 100644
index ab9d669eee..0000000000
--- a/tools/assistant/compat/images/mac/closetab.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/editcopy.png b/tools/assistant/compat/images/mac/editcopy.png
deleted file mode 100644
index f551364464..0000000000
--- a/tools/assistant/compat/images/mac/editcopy.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/find.png b/tools/assistant/compat/images/mac/find.png
deleted file mode 100644
index 3561745f01..0000000000
--- a/tools/assistant/compat/images/mac/find.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/home.png b/tools/assistant/compat/images/mac/home.png
deleted file mode 100644
index 78d94da18d..0000000000
--- a/tools/assistant/compat/images/mac/home.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/next.png b/tools/assistant/compat/images/mac/next.png
deleted file mode 100644
index a585cab80c..0000000000
--- a/tools/assistant/compat/images/mac/next.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/prev.png b/tools/assistant/compat/images/mac/prev.png
deleted file mode 100644
index 612fb34dce..0000000000
--- a/tools/assistant/compat/images/mac/prev.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/print.png b/tools/assistant/compat/images/mac/print.png
deleted file mode 100644
index 10ca56c82a..0000000000
--- a/tools/assistant/compat/images/mac/print.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/synctoc.png b/tools/assistant/compat/images/mac/synctoc.png
deleted file mode 100644
index 067fa941b5..0000000000
--- a/tools/assistant/compat/images/mac/synctoc.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/whatsthis.png b/tools/assistant/compat/images/mac/whatsthis.png
deleted file mode 100644
index 5b7078fffd..0000000000
--- a/tools/assistant/compat/images/mac/whatsthis.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/zoomin.png b/tools/assistant/compat/images/mac/zoomin.png
deleted file mode 100644
index d46f5aff0d..0000000000
--- a/tools/assistant/compat/images/mac/zoomin.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/zoomout.png b/tools/assistant/compat/images/mac/zoomout.png
deleted file mode 100644
index 46326566d1..0000000000
--- a/tools/assistant/compat/images/mac/zoomout.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/qt.png b/tools/assistant/compat/images/qt.png
deleted file mode 100644
index 2dc67161c1..0000000000
--- a/tools/assistant/compat/images/qt.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/addtab.png b/tools/assistant/compat/images/win/addtab.png
deleted file mode 100644
index 4bb0feb92d..0000000000
--- a/tools/assistant/compat/images/win/addtab.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/book.png b/tools/assistant/compat/images/win/book.png
deleted file mode 100644
index 09ec4d33f7..0000000000
--- a/tools/assistant/compat/images/win/book.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/closetab.png b/tools/assistant/compat/images/win/closetab.png
deleted file mode 100644
index ef9e02086c..0000000000
--- a/tools/assistant/compat/images/win/closetab.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/editcopy.png b/tools/assistant/compat/images/win/editcopy.png
deleted file mode 100644
index 1121b47d8b..0000000000
--- a/tools/assistant/compat/images/win/editcopy.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/find.png b/tools/assistant/compat/images/win/find.png
deleted file mode 100644
index 6ea35e930d..0000000000
--- a/tools/assistant/compat/images/win/find.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/home.png b/tools/assistant/compat/images/win/home.png
deleted file mode 100644
index b1c6ae1913..0000000000
--- a/tools/assistant/compat/images/win/home.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/next.png b/tools/assistant/compat/images/win/next.png
deleted file mode 100644
index 8df4127a00..0000000000
--- a/tools/assistant/compat/images/win/next.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/previous.png b/tools/assistant/compat/images/win/previous.png
deleted file mode 100644
index 0780bc23dd..0000000000
--- a/tools/assistant/compat/images/win/previous.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/print.png b/tools/assistant/compat/images/win/print.png
deleted file mode 100644
index ba7c02dc18..0000000000
--- a/tools/assistant/compat/images/win/print.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/synctoc.png b/tools/assistant/compat/images/win/synctoc.png
deleted file mode 100644
index da301bc599..0000000000
--- a/tools/assistant/compat/images/win/synctoc.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/whatsthis.png b/tools/assistant/compat/images/win/whatsthis.png
deleted file mode 100644
index 623cad6876..0000000000
--- a/tools/assistant/compat/images/win/whatsthis.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/zoomin.png b/tools/assistant/compat/images/win/zoomin.png
deleted file mode 100644
index 2e586fc7bf..0000000000
--- a/tools/assistant/compat/images/win/zoomin.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/zoomout.png b/tools/assistant/compat/images/win/zoomout.png
deleted file mode 100644
index a736d39343..0000000000
--- a/tools/assistant/compat/images/win/zoomout.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/wrap.png b/tools/assistant/compat/images/wrap.png
deleted file mode 100644
index 90f18d9f77..0000000000
--- a/tools/assistant/compat/images/wrap.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/index.cpp b/tools/assistant/compat/index.cpp
deleted file mode 100644
index ff54626ea4..0000000000
--- a/tools/assistant/compat/index.cpp
+++ /dev/null
@@ -1,581 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "index.h"
-
-#include <QFile>
-#include <QDir>
-#include <QStringList>
-#include <QApplication>
-#include <QByteArray>
-#include <QTextStream>
-#include <QtAlgorithms>
-#include <QUrl>
-#include <QTextCodec>
-#include <ctype.h>
-#include <QTextDocument>
-
-QT_BEGIN_NAMESPACE
-
-struct Term {
- Term() : frequency(-1) {}
- Term( const QString &t, int f, QVector<Document> l ) : term( t ), frequency( f ), documents( l ) {}
- QString term;
- int frequency;
- QVector<Document>documents;
- bool operator<( const Term &i2 ) const { return frequency < i2.frequency; }
-};
-
-QDataStream &operator>>( QDataStream &s, Document &l )
-{
- s >> l.docNumber;
- s >> l.frequency;
- return s;
-}
-
-QDataStream &operator<<( QDataStream &s, const Document &l )
-{
- s << (qint16)l.docNumber;
- s << (qint16)l.frequency;
- return s;
-}
-
-Index::Index( const QString &dp, const QString &hp )
- : QObject( 0 ), docPath( dp )
-{
- Q_UNUSED(hp);
-
- alreadyHaveDocList = false;
- lastWindowClosed = false;
- connect( qApp, SIGNAL(lastWindowClosed()),
- this, SLOT(setLastWinClosed()) );
-}
-
-Index::Index( const QStringList &dl, const QString &hp )
- : QObject( 0 )
-{
- Q_UNUSED(hp);
- docList = dl;
- alreadyHaveDocList = true;
- lastWindowClosed = false;
- connect( qApp, SIGNAL(lastWindowClosed()),
- this, SLOT(setLastWinClosed()) );
-}
-
-void Index::setLastWinClosed()
-{
- lastWindowClosed = true;
-}
-
-void Index::setDictionaryFile( const QString &f )
-{
- dictFile = f;
-}
-
-void Index::setDocListFile( const QString &f )
-{
- docListFile = f;
-}
-
-void Index::setDocList( const QStringList &lst )
-{
- docList = lst;
-}
-
-int Index::makeIndex()
-{
- if ( !alreadyHaveDocList )
- setupDocumentList();
- if ( docList.isEmpty() )
- return 1;
- QStringList::Iterator it = docList.begin();
- int steps = docList.count() / 100;
- if ( !steps )
- steps++;
- int prog = 0;
- for ( int i = 0; it != docList.end(); ++it, ++i ) {
- if ( lastWindowClosed ) {
- return -1;
- }
- QUrl url(*it);
- parseDocument( url.toLocalFile(), i );
- if ( i%steps == 0 ) {
- prog++;
- emit indexingProgress( prog );
- }
- }
- return 0;
-}
-
-void Index::setupDocumentList()
-{
- QDir d( docPath );
- QStringList filters;
- filters.append(QLatin1String("*.html"));
- QStringList lst = d.entryList(filters);
- QStringList::ConstIterator it = lst.constBegin();
- for ( ; it != lst.constEnd(); ++it )
- docList.append( QLatin1String("file:") + docPath + QLatin1String("/") + *it );
-}
-
-void Index::insertInDict( const QString &str, int docNum )
-{
- if ( str == QLatin1String("amp") || str == QLatin1String("nbsp"))
- return;
- Entry *e = 0;
- if ( dict.count() )
- e = dict[ str ];
-
- if ( e ) {
- if ( e->documents.last().docNumber != docNum )
- e->documents.append( Document(docNum, 1 ) );
- else
- e->documents.last().frequency++;
- } else {
- dict.insert( str, new Entry( docNum ) );
- }
-}
-
-QString Index::getCharsetForDocument(QFile *file)
-{
- QTextStream s(file);
- QString contents = s.readAll();
-
- QString encoding;
- int start = contents.indexOf(QLatin1String("<meta"), 0, Qt::CaseInsensitive);
- if (start > 0) {
- int end = contents.indexOf(QLatin1String(">"), start);
- QString meta = contents.mid(start+5, end-start);
- meta = meta.toLower();
- QRegExp r(QLatin1String("charset=([^\"\\s]+)"));
- if (r.indexIn(meta) != -1) {
- encoding = r.cap(1);
- }
- }
-
- file->seek(0);
- if (encoding.isEmpty())
- return QLatin1String("utf-8");
- return encoding;
-}
-
-void Index::parseDocument( const QString &filename, int docNum )
-{
- QFile file( filename );
- if ( !file.open(QFile::ReadOnly) ) {
- qWarning( "can not open file %s", qPrintable(filename) );
- return;
- }
-
- QTextStream s(&file);
- QString en = getCharsetForDocument(&file);
- s.setCodec(QTextCodec::codecForName(en.toLatin1().constData()));
-
- QString text = s.readAll();
- if (text.isNull())
- return;
-
- bool valid = true;
- const QChar *buf = text.unicode();
- QChar str[64];
- QChar c = buf[0];
- int j = 0;
- int i = 0;
- while ( j < text.length() ) {
- if ( c == QLatin1Char('<') || c == QLatin1Char('&') ) {
- valid = false;
- if ( i > 1 )
- insertInDict( QString(str,i), docNum );
- i = 0;
- c = buf[++j];
- continue;
- }
- if ( ( c == QLatin1Char('>') || c == QLatin1Char(';') ) && !valid ) {
- valid = true;
- c = buf[++j];
- continue;
- }
- if ( !valid ) {
- c = buf[++j];
- continue;
- }
- if ( ( c.isLetterOrNumber() || c == QLatin1Char('_') ) && i < 63 ) {
- str[i] = c.toLower();
- ++i;
- } else {
- if ( i > 1 )
- insertInDict( QString(str,i), docNum );
- i = 0;
- }
- c = buf[++j];
- }
- if ( i > 1 )
- insertInDict( QString(str,i), docNum );
- file.close();
-}
-
-void Index::writeDict()
-{
- QFile f( dictFile );
- if ( !f.open(QFile::WriteOnly ) )
- return;
- QDataStream s( &f );
- for(QHash<QString, Entry *>::Iterator it = dict.begin(); it != dict.end(); ++it) {
- s << it.key();
- s << it.value()->documents.count();
- s << it.value()->documents;
- }
- f.close();
- writeDocumentList();
-}
-
-void Index::writeDocumentList()
-{
- QFile f( docListFile );
- if ( !f.open(QFile::WriteOnly ) )
- return;
- QDataStream s( &f );
- s << docList;
-}
-
-void Index::readDict()
-{
- QFile f( dictFile );
- if ( !f.open(QFile::ReadOnly ) )
- return;
-
- dict.clear();
- QDataStream s( &f );
- QString key;
- int numOfDocs;
- QVector<Document> docs;
- while ( !s.atEnd() ) {
- s >> key;
- s >> numOfDocs;
- docs.resize(numOfDocs);
- s >> docs;
- dict.insert( key, new Entry( docs ) );
- }
- f.close();
- readDocumentList();
-}
-
-void Index::readDocumentList()
-{
- QFile f( docListFile );
- if ( !f.open(QFile::ReadOnly ) )
- return;
- QDataStream s( &f );
- s >> docList;
-}
-
-QStringList Index::query( const QStringList &terms, const QStringList &termSeq, const QStringList &seqWords )
-{
- QList<Term> termList;
- for (QStringList::ConstIterator it = terms.begin(); it != terms.end(); ++it ) {
- Entry *e = 0;
- if ( (*it).contains(QLatin1Char('*')) ) {
- QVector<Document> wcts = setupDummyTerm( getWildcardTerms( *it ) );
- termList.append( Term(QLatin1String("dummy"), wcts.count(), wcts ) );
- } else if ( dict[ *it ] ) {
- e = dict[ *it ];
- termList.append( Term( *it, e->documents.count(), e->documents ) );
- } else {
- return QStringList();
- }
- }
- if ( !termList.count() )
- return QStringList();
- qSort(termList);
-
- QVector<Document> minDocs = termList.takeFirst().documents;
- for(QList<Term>::Iterator it = termList.begin(); it != termList.end(); ++it) {
- Term *t = &(*it);
- QVector<Document> docs = t->documents;
- for(QVector<Document>::Iterator minDoc_it = minDocs.begin(); minDoc_it != minDocs.end(); ) {
- bool found = false;
- for (QVector<Document>::ConstIterator doc_it = docs.constBegin(); doc_it != docs.constEnd(); ++doc_it ) {
- if ( (*minDoc_it).docNumber == (*doc_it).docNumber ) {
- (*minDoc_it).frequency += (*doc_it).frequency;
- found = true;
- break;
- }
- }
- if ( !found )
- minDoc_it = minDocs.erase( minDoc_it );
- else
- ++minDoc_it;
- }
- }
-
- QStringList results;
- qSort( minDocs );
- if ( termSeq.isEmpty() ) {
- for(QVector<Document>::Iterator it = minDocs.begin(); it != minDocs.end(); ++it)
- results << docList.at((int)(*it).docNumber);
- return results;
- }
-
- QString fileName;
- for(QVector<Document>::Iterator it = minDocs.begin(); it != minDocs.end(); ++it) {
- fileName = docList[ (int)(*it).docNumber ];
- if ( searchForPattern( termSeq, seqWords, fileName ) )
- results << fileName;
- }
- return results;
-}
-
-QString Index::getDocumentTitle( const QString &fullFileName )
-{
- QUrl url(fullFileName);
- QString fileName = url.toLocalFile();
-
- if (documentTitleCache.contains(fileName))
- return documentTitleCache.value(fileName);
-
- QFile file( fileName );
- if ( !file.open( QFile::ReadOnly ) ) {
- qWarning( "cannot open file %s", qPrintable(fileName) );
- return fileName;
- }
- QTextStream s( &file );
- QString text = s.readAll();
-
- int start = text.indexOf(QLatin1String("<title>"), 0, Qt::CaseInsensitive) + 7;
- int end = text.indexOf(QLatin1String("</title>"), 0, Qt::CaseInsensitive);
-
- QString title = tr("Untitled");
- if (end - start > 0) {
- title = text.mid(start, end - start);
- if (Qt::mightBeRichText(title)) {
- QTextDocument doc;
- doc.setHtml(title);
- title = doc.toPlainText();
- }
- }
- documentTitleCache.insert(fileName, title);
- return title;
-}
-
-QStringList Index::getWildcardTerms( const QString &term )
-{
- QStringList lst;
- QStringList terms = split( term );
- QStringList::Iterator iter;
-
- for(QHash<QString, Entry*>::Iterator it = dict.begin(); it != dict.end(); ++it) {
- int index = 0;
- bool found = false;
- QString text( it.key() );
- for ( iter = terms.begin(); iter != terms.end(); ++iter ) {
- if ( *iter == QLatin1String("*") ) {
- found = true;
- continue;
- }
- if ( iter == terms.begin() && (*iter)[0] != text[0] ) {
- found = false;
- break;
- }
- index = text.indexOf( *iter, index );
- if ( *iter == terms.last() && index != (int)text.length()-1 ) {
- index = text.lastIndexOf( *iter );
- if ( index != (int)text.length() - (int)(*iter).length() ) {
- found = false;
- break;
- }
- }
- if ( index != -1 ) {
- found = true;
- index += (*iter).length();
- continue;
- } else {
- found = false;
- break;
- }
- }
- if ( found )
- lst << text;
- }
-
- return lst;
-}
-
-QStringList Index::split( const QString &str )
-{
- QStringList lst;
- int j = 0;
- int i = str.indexOf(QLatin1Char('*'), j );
-
- if (str.startsWith(QLatin1String("*")))
- lst << QLatin1String("*");
-
- while ( i != -1 ) {
- if ( i > j && i <= (int)str.length() ) {
- lst << str.mid( j, i - j );
- lst << QLatin1String("*");
- }
- j = i + 1;
- i = str.indexOf(QLatin1Char('*'), j );
- }
-
- int l = str.length() - 1;
- if ( str.mid( j, l - j + 1 ).length() > 0 )
- lst << str.mid( j, l - j + 1 );
-
- return lst;
-}
-
-QVector<Document> Index::setupDummyTerm( const QStringList &terms )
-{
- QList<Term> termList;
- for (QStringList::ConstIterator it = terms.begin(); it != terms.end(); ++it) {
- Entry *e = 0;
- if ( dict[ *it ] ) {
- e = dict[ *it ];
- termList.append( Term( *it, e->documents.count(), e->documents ) );
- }
- }
- QVector<Document> maxList(0);
- if ( !termList.count() )
- return maxList;
- qSort(termList);
-
- maxList = termList.takeLast().documents;
- for(QList<Term>::Iterator it = termList.begin(); it != termList.end(); ++it) {
- Term *t = &(*it);
- QVector<Document> docs = t->documents;
- for (QVector<Document>::iterator docIt = docs.begin(); docIt != docs.end(); ++docIt ) {
- if ( maxList.indexOf( *docIt ) == -1 )
- maxList.append( *docIt );
- }
- }
- return maxList;
-}
-
-void Index::buildMiniDict( const QString &str )
-{
- if ( miniDict[ str ] )
- miniDict[ str ]->positions.append( wordNum );
- ++wordNum;
-}
-
-bool Index::searchForPattern( const QStringList &patterns, const QStringList &words, const QString &fileName )
-{
- QUrl url(fileName);
- QString fName = url.toLocalFile();
- QFile file( fName );
- if ( !file.open( QFile::ReadOnly ) ) {
- qWarning( "cannot open file %s", qPrintable(fName) );
- return false;
- }
-
- wordNum = 3;
- miniDict.clear();
- QStringList::ConstIterator cIt = words.begin();
- for ( ; cIt != words.end(); ++cIt )
- miniDict.insert( *cIt, new PosEntry( 0 ) );
-
- QTextStream s( &file );
- QString text = s.readAll();
- bool valid = true;
- const QChar *buf = text.unicode();
- QChar str[64];
- QChar c = buf[0];
- int j = 0;
- int i = 0;
- while ( j < text.length() ) {
- if ( c == QLatin1Char('<') || c == QLatin1Char('&') ) {
- valid = false;
- if ( i > 1 )
- buildMiniDict( QString(str,i) );
- i = 0;
- c = buf[++j];
- continue;
- }
- if ( ( c == QLatin1Char('>') || c == QLatin1Char(';') ) && !valid ) {
- valid = true;
- c = buf[++j];
- continue;
- }
- if ( !valid ) {
- c = buf[++j];
- continue;
- }
- if ( ( c.isLetterOrNumber() || c == QLatin1Char('_') ) && i < 63 ) {
- str[i] = c.toLower();
- ++i;
- } else {
- if ( i > 1 )
- buildMiniDict( QString(str,i) );
- i = 0;
- }
- c = buf[++j];
- }
- if ( i > 1 )
- buildMiniDict( QString(str,i) );
- file.close();
-
- QStringList::ConstIterator patIt = patterns.begin();
- QStringList wordLst;
- QList<uint> a, b;
- QList<uint>::iterator aIt;
- for ( ; patIt != patterns.end(); ++patIt ) {
- wordLst = (*patIt).split(QLatin1Char(' '));
- a = miniDict[ wordLst[0] ]->positions;
- for ( int j = 1; j < (int)wordLst.count(); ++j ) {
- b = miniDict[ wordLst[j] ]->positions;
- aIt = a.begin();
- while ( aIt != a.end() ) {
- if ( b.contains( *aIt + 1 )) {
- (*aIt)++;
- ++aIt;
- } else {
- aIt = a.erase( aIt );
- }
- }
- }
- }
- if ( a.count() )
- return true;
- return false;
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/index.h b/tools/assistant/compat/index.h
deleted file mode 100644
index 9dd6d548af..0000000000
--- a/tools/assistant/compat/index.h
+++ /dev/null
@@ -1,133 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef INDEX_H
-#define INDEX_H
-
-#include <QStringList>
-#include <QHash>
-#include <QDataStream>
-#include <QObject>
-#include <QList>
-#include <QFile>
-#include <QVector>
-
-QT_BEGIN_NAMESPACE
-
-struct Document {
- Document( int d, int f ) : docNumber( d ), frequency( f ) {}
- Document() : docNumber( -1 ), frequency( 0 ) {}
- bool operator==( const Document &doc ) const {
- return docNumber == doc.docNumber;
- }
- bool operator<( const Document &doc ) const {
- return frequency > doc.frequency;
- }
- bool operator<=( const Document &doc ) const {
- return frequency >= doc.frequency;
- }
- bool operator>( const Document &doc ) const {
- return frequency < doc.frequency;
- }
- qint16 docNumber;
- qint16 frequency;
-};
-
-QDataStream &operator>>( QDataStream &s, Document &l );
-QDataStream &operator<<( QDataStream &s, const Document &l );
-
-class Index : public QObject
-{
- Q_OBJECT
-public:
- struct Entry {
- Entry( int d ) { documents.append( Document( d, 1 ) ); }
- Entry( QVector<Document> l ) : documents( l ) {}
- QVector<Document> documents;
- };
- struct PosEntry {
- PosEntry( int p ) { positions.append( p ); }
- QList<uint> positions;
- };
-
- Index( const QString &dp, const QString &hp );
- Index( const QStringList &dl, const QString &hp );
- void writeDict();
- void readDict();
- int makeIndex();
- QStringList query( const QStringList&, const QStringList&, const QStringList& );
- QString getDocumentTitle( const QString& );
- void setDictionaryFile( const QString& );
- void setDocListFile( const QString& );
- void setDocList( const QStringList & );
-
-signals:
- void indexingProgress( int );
-
-private slots:
- void setLastWinClosed();
-
-private:
- void setupDocumentList();
- void parseDocument( const QString&, int );
- void insertInDict( const QString&, int );
- void writeDocumentList();
- void readDocumentList();
- QStringList getWildcardTerms( const QString& );
- QStringList split( const QString& );
- QVector<Document> setupDummyTerm( const QStringList& );
- bool searchForPattern( const QStringList&, const QStringList&, const QString& );
- void buildMiniDict( const QString& );
- QString getCharsetForDocument(QFile *);
- QStringList docList;
- QHash<QString, Entry*> dict;
- QHash<QString, PosEntry*> miniDict;
- uint wordNum;
- QString docPath;
- QString dictFile, docListFile;
- bool alreadyHaveDocList;
- bool lastWindowClosed;
- QHash<QString, QString> documentTitleCache;
-};
-
-#endif
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/lib/lib.pro b/tools/assistant/compat/lib/lib.pro
deleted file mode 100644
index e50d4702c1..0000000000
--- a/tools/assistant/compat/lib/lib.pro
+++ /dev/null
@@ -1,78 +0,0 @@
-TEMPLATE = lib
-QT += network
-TARGET = QtAssistantClient
-isEmpty(QT_MAJOR_VERSION) {
- VERSION=4.3.0
-} else {
- VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
-}
-
-CONFIG += qt warn_on
-mac|win32:CONFIG += debug_and_release
-mac:unix:CONFIG += explicitlib
-CONFIG -= dll
-
-HEADERS = qassistantclient.h \
- qassistantclient_global.h
-SOURCES = qassistantclient.cpp
-
-DESTDIR = ../../../../lib
-DLLDESTDIR = ../../../../bin
-
-unix {
- QMAKE_CFLAGS += $$QMAKE_CFLAGS_SHLIB
- QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_SHLIB
-}
-
-DEFINES += QT_ASSISTANT_CLIENT_LIBRARY
-contains(CONFIG, static) {
- DEFINES += QT_ASSISTANT_CLIENT_STATIC
-}
-
-#load up the headers info
-CONFIG += qt_install_headers
-HEADERS_PRI = $$QT_BUILD_TREE/include/QtAssistant/headers.pri
-include($$HEADERS_PRI, "", true)|clear(HEADERS_PRI)
-
-#mac frameworks
-mac:!static:contains(QT_CONFIG, qt_framework) {
- TARGET = QtAssistant # Change the name to match the headers
- QMAKE_FRAMEWORK_BUNDLE_NAME = $$TARGET
- CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework
- CONFIG(debug, debug|release) {
- !build_pass:CONFIG += build_all
- } else { #release
- !debug_and_release|build_pass {
- CONFIG -= qt_install_headers #no need to install these as well
- FRAMEWORK_HEADERS.version = Versions
- FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
- FRAMEWORK_HEADERS.path = Headers
- }
- QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
- }
-}
-
-TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #done towards the end
-
-target.path=$$[QT_INSTALL_LIBS]
-INSTALLS += target
-win32 {
- dlltarget.path=$$[QT_INSTALL_BINS]
- INSTALLS += dlltarget
-}
-
-qt_install_headers {
- assistant_headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
- assistant_headers.path = $$[QT_INSTALL_HEADERS]/QtAssistant
- INSTALLS += assistant_headers
-}
-
-unix {
- CONFIG += create_pc
- QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS]
- QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS]/QtAssistant
- QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_INSTALL_HEADERS]
- QMAKE_PKGCONFIG_DESTDIR = pkgconfig
- QMAKE_PKGCONFIG_REQUIRES += QtNetwork
-}
-
diff --git a/tools/assistant/compat/lib/qassistantclient.cpp b/tools/assistant/compat/lib/qassistantclient.cpp
deleted file mode 100644
index 72d0a92b79..0000000000
--- a/tools/assistant/compat/lib/qassistantclient.cpp
+++ /dev/null
@@ -1,446 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qassistantclient.h"
-
-#include <qtcpsocket.h>
-#include <qtextstream.h>
-#include <qtimer.h>
-#include <qfileinfo.h>
-#include <qmap.h>
-
-QT_BEGIN_NAMESPACE
-
-class QAssistantClientPrivate
-{
- friend class QAssistantClient;
- QStringList arguments;
-};
-
-static QMap<const QAssistantClient*,QAssistantClientPrivate*> *dpointers = 0;
-
-static QAssistantClientPrivate *data( const QAssistantClient *client, bool create=false )
-{
- if( !dpointers )
- dpointers = new QMap<const QAssistantClient*,QAssistantClientPrivate*>;
- QAssistantClientPrivate *d = (*dpointers)[client];
- if( !d && create ) {
- d = new QAssistantClientPrivate;
- dpointers->insert( client, d );
- }
- return d;
-}
-
-/*!
- \class QAssistantClient
- \obsolete
- \brief The QAssistantClient class provides a means of using Qt
- Assistant as an application's help tool.
-
- \ingroup helpsystem
-
- \bold{Note:} \e{This class is obsolete and only required when using
- the old Qt Assistant, now called assistant_adp. If you want to use
- the new Qt Assistant as a remote help viewer, simple create a
- QProcess instance and specify \tt{assistant} as its executable.
- The following code shows how to start Qt Assistant and request a
- certain page to be shown:}
-
- \snippet doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp 0
-
- \e{For a complete example using the Qt Assistant remotely, see the \l
- {help/remotecontrol}{Remote Control} example.}
-
- In order to make Qt Assistant act as a customized help tool for
- your application, you must provide your application with a
- QAssistantClient object in addition to a \l
- {assistant-manual.html} {Qt Assistant Document Profile} (\c .adp
- file) and the associated documentation.
-
- Note that the QAssistantClient class is not included in the Qt
- library. To use it you must add the following line to your pro
- file:
-
- \snippet doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp 1
-
- A QAssistantClient instance can open or close Qt Assistant
- whenever it is required.
-
- Once you have created a QAssistantClient instance, specifying the
- path to the Qt Assistant executable, using Qt Assistant is
- simple: You can either call the openAssistant() slot to show the
- defined start page of the documentation, or you can call the
- showPage() slot to show a particular help page. When you call
- openAssistant() and showPage(), Qt Assistant will be launched if
- it isn't already running. When Qt Assistant is running, the
- isOpen() function returns true.
-
- When calling showPage() the Qt Assistant instance will also be
- brought to the foreground if its hidden. The showPage() slot can
- be called multiple times, while calling openAssistant() several
- times without closing the application in between, will have no
- effect.
-
- You can close Qt Assistant at any time using the closeAssistant()
- slot. When you call openAssistant(), or you call showPage()
- without a previous call to openAssistant(), the assistantOpened()
- signal is emitted. Similarly when closeAssistant() is called,
- assistantClosed() is emitted. In either case, if an error occurs,
- error() is emitted.
-
- One QAssistantClient instance interacts with one Qt Assistant
- instance, so every time you call openAssistant(), showPage() or
- closeAssistant() they are applied to the particular Qt Assistant
- instance associated with the QAssistantClient.
-
- Qt Assistant's documentation set can be altered using the command
- line arguments that are passed to the application when it is
- launched. When started without any options, Qt Assistant displays
- a default set of documentation. When Qt is installed, the default
- documentation set in Qt Assistant contains the Qt reference
- documentation as well as the tools that come with Qt, such as \QD
- and \c qmake.
-
- Use the setArguments() function to specify the command line
- arguments. You can add or remove documentation from Qt Assistant
- by adding and removing the relevant content files: The command
- line arguments are \c {-addContentFile file.dcf} and \c
- {-removeContentFile file.dcf} respectively. You can make Qt
- Assistant run customized documentation sets that are separate from
- the Qt documentation, by specifying a profile: \c {-profile
- myapplication.adp}. The profile format can also be used to alter
- several of Qt Assistant's properties such as its title and
- startpage.
-
- The Documentation Content File (\c .dcf) and Qt Assistant
- Documentation Profile (\c .adp) formats are documented in the \l
- {assistant-manual.html}{Qt Assistant Manual}.
-
- For a complete example using the QAssistantClient class, see the
- \e{Simple Text Viewer} example. The example shows how you can make
- Qt Assistant act as a customized help tool for your application
- using the QAssistantClient class combined with a Qt Assistant
- Document Profile.
-
- \sa {Qt Assistant Manual}, {Simple Text Viewer Example}
-*/
-
-/*!
- \fn void QAssistantClient::assistantOpened()
-
- This signal is emitted when Qt Assistant is opened and the
- client-server communication is set up.
-
- \sa openAssistant(), showPage()
-*/
-
-/*!
- \fn void QAssistantClient::assistantClosed()
-
- This signal is emitted when the connection to Qt Assistant is
- closed. This happens when the user exits Qt Assistant, if an
- error in the server or client occurs, or if closeAssistant() is
- called.
-
- \sa closeAssistant()
-*/
-
-/*!
- \fn void QAssistantClient::error( const QString &message )
-
- This signal is emitted if Qt Assistant cannot be started, or if an
- error occurs during the initialization of the connection between
- Qt Assistant and the calling application. The \a message provides an
- explanation of the error.
-*/
-
-/*!
- Constructs an assistant client with the specified \a parent. For
- systems other than Mac OS, \a path specifies the path to the Qt
- Assistant executable. For Mac OS, \a path specifies a directory
- containing a valid assistant.app bundle. If \a path is the empty
- string, the system path (\c{%PATH%} or \c $PATH) is used.
-*/
-QAssistantClient::QAssistantClient( const QString &path, QObject *parent )
- : QObject( parent ), host ( QLatin1String("localhost") )
-{
-#if defined(Q_OS_MAC)
- const QString assistant = QLatin1String("Assistant_adp");
-#else
- const QString assistant = QLatin1String("assistant_adp");
-#endif
-
- if ( path.isEmpty() )
- assistantCommand = assistant;
- else {
- QFileInfo fi( path );
- if ( fi.isDir() )
- assistantCommand = path + QLatin1String("/") + assistant;
- else
- assistantCommand = path;
- }
-
-#if defined(Q_OS_MAC)
- assistantCommand += QLatin1String(".app/Contents/MacOS/Assistant_adp");
-#endif
-
- socket = new QTcpSocket( this );
- connect( socket, SIGNAL(connected()),
- SLOT(socketConnected()) );
- connect( socket, SIGNAL(disconnected()),
- SLOT(socketConnectionClosed()) );
- connect( socket, SIGNAL(error(QAbstractSocket::SocketError)),
- SLOT(socketError()) );
- opened = false;
- proc = new QProcess( this );
- port = 0;
- pageBuffer = QLatin1String("");
- connect( proc, SIGNAL(readyReadStandardError()),
- this, SLOT(readStdError()) );
- connect( proc, SIGNAL(error(QProcess::ProcessError)),
- this, SLOT(procError(QProcess::ProcessError)) );
-}
-
-/*!
- Destroys the assistant client object.
-*/
-QAssistantClient::~QAssistantClient()
-{
- if ( proc->state() == QProcess::Running )
- proc->terminate();
-
- if( dpointers ) {
- QAssistantClientPrivate *d = (*dpointers)[ this ];
- if ( d ) {
- dpointers->remove(this);
- delete d;
- if( dpointers->isEmpty() ) {
- delete dpointers;
- dpointers = 0;
- }
- }
- }
-}
-
-/*!
- Opens Qt Assistant, i.e. sets up the client-server communication
- between the application and Qt Assistant, and shows the start page
- specified by the current \l {assistant-manual.html}
- {Qt Assistant Document Profile}. If there is no specfied profile,
- and Qt is installed, the default start page is the Qt Reference
- Documentation's index page.
-
- If the connection is already established, this function does
- nothing. Use the showPage() function to show another page. If an
- error occurs, the error() signal is emitted.
-
- \sa showPage(), assistantOpened()
-*/
-void QAssistantClient::openAssistant()
-{
- if ( proc->state() == QProcess::Running )
- return;
-
- QStringList args;
- args.append(QLatin1String("-server"));
- if( !pageBuffer.isEmpty() ) {
- args.append( QLatin1String("-file") );
- args.append( pageBuffer );
- }
-
- QAssistantClientPrivate *d = data( this );
- if( d ) {
- QStringList::ConstIterator it = d->arguments.constBegin();
- while( it!=d->arguments.constEnd() ) {
- args.append( *it );
- ++it;
- }
- }
-
- connect( proc, SIGNAL(readyReadStandardOutput()),
- this, SLOT(readPort()) );
-
- proc->start(assistantCommand, args);
-}
-
-void QAssistantClient::procError(QProcess::ProcessError err)
-{
- switch (err)
- {
- case QProcess::FailedToStart:
- emit error( tr( "Failed to start Qt Assistant." ) );
- break;
- case QProcess::Crashed:
- emit error( tr( "Qt Assistant crashed." ) );
- break;
- default:
- emit error( tr( "Error while running Qt Assistant." ) );
- }
-}
-
-void QAssistantClient::readPort()
-{
- QString p(QString::fromLatin1(proc->readAllStandardOutput()));
- quint16 port = p.toUShort();
- if ( port == 0 ) {
- emit error( tr( "Cannot connect to Qt Assistant." ) );
- return;
- }
- socket->connectToHost( host, port );
- disconnect( proc, SIGNAL(readyReadStandardOutput()),
- this, SLOT(readPort()) );
-}
-
-/*!
- Closes the Qt Assistant instance.
-
- \sa openAssistant(), assistantClosed()
-*/
-void QAssistantClient::closeAssistant()
-{
- if ( !opened )
- return;
-
- bool blocked = proc->blockSignals(true);
- proc->terminate();
- if (!proc->waitForFinished(2000)) {
- // If the process hasn't died after 2 seconds,
- // we kill it, causing it to exit immediately.
- proc->kill();
- }
- proc->blockSignals(blocked);
-}
-
-/*!
- Brings Qt Assistant to the foreground showing the given \a page.
- The \a page parameter is a path to an HTML file
- (e.g., QLatin1String("/home/pasquale/superproduct/docs/html/intro.html")).
-
- If Qt Assistant hasn't been opened yet, this function will call
- the openAssistant() slot with the specified page as the start
- page.
-
- \note The first time Qt Assistant is started, its window will open
- in front of the application's windows. Subsequent calls to this function
- will only load the specified pages in Qt Assistant and will not display
- its window in front of the application's windows.
-
- \sa openAssistant()
-*/
-void QAssistantClient::showPage( const QString &page )
-{
- if (opened) {
- QTextStream os( socket );
- os << page << QLatin1String("\n");
- } else {
- pageBuffer = page;
-
- if (proc->state() == QProcess::NotRunning) {
- openAssistant();
- pageBuffer.clear();
- return;
- }
- }
-}
-
-/*!
- \property QAssistantClient::open
- \brief whether Qt Assistant is open
-
-*/
-bool QAssistantClient::isOpen() const
-{
- return opened;
-}
-
-void QAssistantClient::socketConnected()
-{
- opened = true;
- if ( !pageBuffer.isEmpty() )
- showPage( pageBuffer );
- emit assistantOpened();
-}
-
-void QAssistantClient::socketConnectionClosed()
-{
- opened = false;
- emit assistantClosed();
-}
-
-void QAssistantClient::socketError()
-{
- QAbstractSocket::SocketError err = socket->error();
- if (err == QTcpSocket::ConnectionRefusedError)
- emit error( tr( "Could not connect to Assistant: Connection refused" ) );
- else if (err == QTcpSocket::HostNotFoundError)
- emit error( tr( "Could not connect to Assistant: Host not found" ) );
- else if (err != QTcpSocket::RemoteHostClosedError)
- emit error( tr( "Communication error" ) );
-}
-
-void QAssistantClient::readStdError()
-{
- QString errmsg = QString::fromLatin1(proc->readAllStandardError());
-
- if (!errmsg.isEmpty())
- emit error( errmsg.simplified() );
-}
-
-/*!
- \fn void QAssistantClient::setArguments(const QStringList &arguments)
-
- Sets the command line \a arguments that are passed to Qt Assistant
- when it is launched.
-
- The command line arguments can be used to alter Qt Assistant's
- documentation set. When started without any options, Qt Assistant
- displays a default set of documentation. When Qt is installed, the
- default documentation set in Qt Assistant contains the Qt
- reference documentation as well as the tools that come with Qt,
- such as Qt Designer and qmake.
-*/
-void QAssistantClient::setArguments( const QStringList &args )
-{
- QAssistantClientPrivate *d = data( this, true );
- d->arguments = args;
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/lib/qassistantclient.h b/tools/assistant/compat/lib/qassistantclient.h
deleted file mode 100644
index fc8bb5b007..0000000000
--- a/tools/assistant/compat/lib/qassistantclient.h
+++ /dev/null
@@ -1,100 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QASSISTANTCLIENT_H
-#define QASSISTANTCLIENT_H
-
-#include <QtCore/QObject>
-#include <QtCore/QStringList>
-#include <QtCore/QProcess>
-#include <QtCore/qglobal.h>
-#include <QtAssistant/qassistantclient_global.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QTcpSocket;
-
-class QT_ASSISTANT_CLIENT_EXPORT QAssistantClient : public QObject
-{
- Q_OBJECT
- Q_PROPERTY( bool open READ isOpen )
-
-public:
- QAssistantClient( const QString &path, QObject *parent = 0);
- ~QAssistantClient();
-
- bool isOpen() const;
-
- void setArguments( const QStringList &args );
-
-public Q_SLOTS:
- virtual void openAssistant();
- virtual void closeAssistant();
- virtual void showPage( const QString &page );
-
-Q_SIGNALS:
- void assistantOpened();
- void assistantClosed();
- void error( const QString &msg );
-
-private Q_SLOTS:
- void socketConnected();
- void socketConnectionClosed();
- void readPort();
- void procError(QProcess::ProcessError err);
- void socketError();
- void readStdError();
-
-private:
- QTcpSocket *socket;
- QProcess *proc;
- quint16 port;
- QString host, assistantCommand, pageBuffer;
- bool opened;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/tools/assistant/compat/lib/qassistantclient_global.h b/tools/assistant/compat/lib/qassistantclient_global.h
deleted file mode 100644
index 6b58736111..0000000000
--- a/tools/assistant/compat/lib/qassistantclient_global.h
+++ /dev/null
@@ -1,63 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QASSISTANTCLIENT_GLOBAL_H
-#define QASSISTANTCLIENT_GLOBAL_H
-
-#include <QtCore/qglobal.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-#if defined(QT_ASSISTANT_CLIENT_STATIC) || (!defined(QT_SHARED) && !defined(QT_DLL))
-# define QT_ASSISTANT_CLIENT_EXPORT
-#elif defined(QT_ASSISTANT_CLIENT_LIBRARY)
-# define QT_ASSISTANT_CLIENT_EXPORT Q_DECL_EXPORT
-#else
-# define QT_ASSISTANT_CLIENT_EXPORT Q_DECL_IMPORT
-#endif
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/tools/assistant/compat/main.cpp b/tools/assistant/compat/main.cpp
deleted file mode 100644
index c16c52e118..0000000000
--- a/tools/assistant/compat/main.cpp
+++ /dev/null
@@ -1,465 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "mainwindow.h"
-#include "helpdialog.h"
-#include "config.h"
-
-#include <QTcpServer>
-#include <QTcpSocket>
-#include <QApplication>
-#include <QPixmap>
-#include <QStringList>
-#include <QDir>
-#include <QMessageBox>
-#include <QPointer>
-#include <QTranslator>
-#include <QLibraryInfo>
-#include <QLocale>
-#include <stdlib.h>
-#include <stdio.h>
-
-#if defined(USE_STATIC_JPEG_PLUGIN)
- #include <QtPlugin>
- Q_IMPORT_PLUGIN(qjpeg)
-#endif
-
-#define INDEX_CHECK( text ) if( i+1 >= argc ) { fprintf(stderr, "%s\n", text); return 1; }
-
-QT_BEGIN_NAMESPACE
-
-#if !defined(QT_NO_DBUS) && defined(Q_OS_UNIX)
-QT_BEGIN_INCLUDE_NAMESPACE
-#include <QtDBus/QDBusConnection>
-#include <QtDBus/QDBusAbstractAdaptor>
-#include <QtDBus/QDBusObjectPath>
-#include "tabbedbrowser.h"
-QT_END_INCLUDE_NAMESPACE
-
-class HelpWindowAdaptor : public QDBusAbstractAdaptor
-{
- Q_OBJECT
- Q_CLASSINFO("D-Bus Interface", "com.trolltech.Assistant.HelpWindow")
-
- Q_PROPERTY(QString source READ source WRITE setSource)
-
-public:
- HelpWindowAdaptor(HelpWindow *w) : QDBusAbstractAdaptor(w), helpWindow(w)
- {
- setAutoRelaySignals(true);
- }
-
-public Q_SLOTS:
- inline QString source() const { return helpWindow->source().toString(); }
- inline void setSource(const QString &src) { helpWindow->setSource(src); }
-
- inline void clearHistory() { helpWindow->clearHistory(); }
- inline void backward() { helpWindow->backward(); }
- inline void forward() { helpWindow->forward(); }
- inline void reload() { helpWindow->reload(); }
- inline void home() { helpWindow->home(); }
-
-private:
- HelpWindow *helpWindow;
-};
-
-class AssistantAdaptor : public QDBusAbstractAdaptor
-{
- Q_OBJECT
- Q_CLASSINFO("D-Bus Interface", "com.trolltech.Assistant.HelpViewer")
-
-public:
- AssistantAdaptor(MainWindow *mw) : QDBusAbstractAdaptor(mw), mw(mw)
- {
- QDBusConnection connection = QDBusConnection::sessionBus();
- connection.registerService(QLatin1String("com.trolltech.Assistant"));
- connection.registerObject(QLatin1String("/Assistant"), mw);
- }
-
-public slots:
- void showLink(const QString &link) { mw->showLink(link); }
- QDBusObjectPath createNewTab();
- QDBusObjectPath currentTab();
-
-private:
- QDBusObjectPath pathForBrowser(HelpWindow *window);
- MainWindow *mw;
-};
-
-QDBusObjectPath AssistantAdaptor::createNewTab()
-{
- HelpWindow *window = mw->browsers()->newBackgroundTab();
- return pathForBrowser(window);
-}
-
-QDBusObjectPath AssistantAdaptor::currentTab()
-{
- HelpWindow *window = mw->browsers()->currentBrowser();
- return pathForBrowser(window);
-}
-
-QDBusObjectPath AssistantAdaptor::pathForBrowser(HelpWindow *window)
-{
- int index = mw->browsers()->browsers().indexOf(window);
- if (index == -1)
- return QDBusObjectPath();
-
- QString name(QLatin1String("/Assistant/Tabs/"));
- name += QString::number(index);
- QDBusObjectPath path(name);
-
- if (!window->findChild<HelpWindowAdaptor *>()) {
- (void)new HelpWindowAdaptor(window);
- QDBusConnection::sessionBus().registerObject(name, window);
- }
-
- return path;
-}
-
-#endif // QT_NO_DBUS
-
-class AssistantSocket : public QTcpSocket
-{
- Q_OBJECT
-public:
- AssistantSocket( int sock, QObject *parent = 0 );
- ~AssistantSocket() {}
-
-signals:
- void showLinkRequest( const QString& );
-
-private slots:
- void readClient();
- void connectionClosed();
-};
-
-
-class AssistantServer : public QTcpServer
-{
- Q_OBJECT
-public:
- AssistantServer( QObject* parent = 0 );
- quint16 getPort() const;
-
-signals:
- void showLinkRequest( const QString& );
- void newConnect();
-
-public slots:
- virtual void incomingConnection( int socket );
-
-private:
- quint16 p;
-};
-
-AssistantSocket::AssistantSocket( int sock, QObject *parent )
- : QTcpSocket( parent )
-{
- connect( this, SIGNAL(readyRead()), SLOT(readClient()) );
- connect( this, SIGNAL(disconnected()), SLOT(connectionClosed()) );
- setSocketDescriptor( sock );
-}
-
-void AssistantSocket::readClient()
-{
- QString link = QString();
- while ( canReadLine() )
- link = QLatin1String(readLine());
- if ( !link.isNull() ) {
- link = link.replace(QLatin1String("\n"), QLatin1String(""));
- link = link.replace(QLatin1String("\r"), QLatin1String(""));
- QFileInfo fi(link);
- link = fi.absoluteFilePath();
- emit showLinkRequest( link );
- }
-}
-
-void AssistantSocket::connectionClosed()
-{
- deleteLater();
-}
-
-AssistantServer::AssistantServer( QObject *parent )
- : QTcpServer( parent )
-{
- listen(QHostAddress::LocalHost, 0);
- if ( !isListening() ) {
- QMessageBox::critical( 0, tr( "Qt Assistant" ),
- tr( "Failed to bind to port %1" ).arg( serverPort() ) );
- exit( 1 );
- }
- p = serverPort();
-}
-
-quint16 AssistantServer::getPort() const
-{
- return p;
-}
-
-void AssistantServer::incomingConnection( int socket )
-{
- AssistantSocket *as = new AssistantSocket( socket, this );
- connect( as, SIGNAL(showLinkRequest(QString)),
- this, SIGNAL(showLinkRequest(QString)) );
- emit newConnect();
-}
-
-int runAssistant( int argc, char ** argv )
-{
- bool withGUI = true;
-#ifndef Q_WS_WIN
- if ( argc > 1 ) {
- QString arg = QString::fromLocal8Bit(argv[1]);
- arg = arg.toLower();
- if ( arg == QLatin1String("-addcontentfile")
- || arg == QLatin1String("-removecontentfile")
- || arg == QLatin1String("-help")
- || arg == QLatin1String("/?")
- )
- withGUI = false;
- }
-#endif
- QApplication a(argc, argv, withGUI);
- a.setOrganizationName(QLatin1String("Trolltech"));
- a.setApplicationName(QLatin1String("Assistant"));
-
- QString resourceDir;
- AssistantServer *as = 0;
- QStringList catlist;
- QString file, profileName, aDocPath;
- bool server = false;
- bool hideSidebar = false;
- bool configLoaded = false;
- if ( argc == 2 ) {
- file = QString::fromLocal8Bit(argv[1]);
- if (file.startsWith(QLatin1String("-")) || file == QLatin1String("/?")) {
- file.clear();
- } else {
- QFileInfo fi(file);
- file = fi.absoluteFilePath();
- file = MainWindow::urlifyFileName(file);
- }
- }
- if ( file.isEmpty() ) {
- for ( int i = 1; i < argc; i++ ) {
- QString opt = QString::fromLocal8Bit(argv[i]).toLower();
- if ( opt == QLatin1String("-file") ) {
- INDEX_CHECK( "Missing file argument!" );
- i++;
- file = QFile::decodeName(argv[i]);
- } else if ( opt == QLatin1String("-server") ) {
- server = true;
- } else if ( opt == QLatin1String("-profile") ) {
- INDEX_CHECK( "Missing profile argument!" );
- profileName = QFile::decodeName(argv[++i]);
- } else if ( opt == QLatin1String("-addcontentfile") ) {
- INDEX_CHECK( "Missing content file!" );
- Config *c = Config::loadConfig(QString());
- QFileInfo file( QFile::decodeName(argv[i+1]) );
- if( !file.exists() ) {
- fprintf(stderr, "Could not locate content file: %s\n", qPrintable(file.absoluteFilePath()));
- return 1;
- }
- DocuParser *parser = DocuParser::createParser( file.absoluteFilePath() );
- if( parser ) {
- QFile f( QFile::decodeName(argv[i+1]) );
- if( !parser->parse( &f ) ) {
- fprintf(stderr, "Failed to parse file: %s\n", qPrintable(file.absoluteFilePath()));
- return 1;
- }
- parser->addTo( c->profile() );
- c->setDocRebuild( true );
- c->save();
- }
- return 0;
- } else if ( opt == QLatin1String("-removecontentfile") ) {
- INDEX_CHECK("Missing content file!");
- Config *c = Config::loadConfig(QString());
- Profile *profile = c->profile();
- QString contentFile = QString::fromLocal8Bit(argv[i+i]);
- QStringList entries;
-#ifdef Q_WS_WIN
- contentFile.replace(QLatin1Char('\\'), QLatin1Char('/'));
- entries = profile->docs.filter(contentFile, Qt::CaseInsensitive);
-#else
- entries = profile->docs.filter(contentFile);
-#endif
- if (entries.count() == 0) {
- fprintf(stderr, "Could not locate content file: %s\n", qPrintable(contentFile));
- return 1;
- } else if (entries.count() > 1) {
- fprintf(stderr, "More than one entry matching file name found, "
- "please specify full path to file");
- return 1;
- } else {
- QFileInfo file(entries[0]);
- if( !file.exists() ) {
- fprintf(stderr, "Could not locate content file: %s\n", qPrintable(file.absoluteFilePath()));
- return 1;
- }
- profile->removeDocFileEntry( file.absoluteFilePath() );
- c->setDocRebuild( true );
- c->save();
- }
- return 0;
- } else if ( QString( QLatin1String(argv[i]) ).toLower() == QLatin1String("-docpath") ) {
- INDEX_CHECK( "Missing path!" );
- QDir dir(QString::fromLocal8Bit(argv[i+1]));
- if ( dir.exists() ) {
- Config *c = Config::loadConfig(QString());
- c->saveProfile(Profile::createDefaultProfile(dir.absolutePath()));
- c->loadDefaultProfile();
- c->setDocRebuild(true);
- c->save();
- configLoaded = true;
- ++i;
- } else {
- fprintf(stderr, "The specified path does not exist!\n");
- return 1;
- }
- } else if ( opt == QLatin1String("-hidesidebar") ) {
- hideSidebar = true;
- } else if ( opt == QLatin1String("-help") || opt == QLatin1String("/?") ) {
- QString helpText = QLatin1String( "Usage: assistant [option]\n"
- "Options:\n"
- " -file Filename assistant opens the specified file\n"
- " -server reads commands from a socket after\n"
- " assistant has started\n"
- " -profile fileName starts assistant and displays the\n"
- " profile specified in the file fileName.\n"
- " -addContentFile file adds the content file 'file' to the set of\n"
- " documentation available by default\n"
- " -removeContentFile file removes the content file 'file' from the\n"
- " documentation available by default\n"
- " -docPath path sets the Qt documentation root path to\n"
- " 'path' and starts assistant\n"
- " -hideSidebar assistant will hide the sidebar.\n"
- " -resourceDir assistant will load translations from\n"
- " this directory.\n"
- " -help shows this help.");
-#ifdef Q_WS_WIN
- QMessageBox::information( 0, QLatin1String("Qt Assistant"),
- QLatin1String("<pre>") + helpText + QLatin1String("</pre>") );
-#else
- fprintf(stdout, "%s\n", qPrintable(helpText));
-#endif
- exit( 0 );
- } else if ( opt == QLatin1String("-resourcedir") ) {
- INDEX_CHECK( "Missing resource directory argument!" );
- resourceDir = QFile::decodeName( argv[++i] );
- } else {
- fprintf(stderr, "Unrecognized option %s. Try -help to get help.\n", qPrintable(opt));
- return 1;
- }
- }
- }
-
- if( resourceDir.isNull() )
- resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
-
- QTranslator translator( 0 );
- translator.load( QLatin1String("assistant_adp_") + QLocale::system().name(), resourceDir );
- a.installTranslator( &translator );
-
- QTranslator qtTranslator( 0 );
- qtTranslator.load( QLatin1String("qt_") + QLocale::system().name(), resourceDir );
- a.installTranslator( &qtTranslator );
-
- Config *conf = 0;
- if (configLoaded)
- conf = Config::configuration();
- else
- conf = Config::loadConfig( profileName );
- if (!conf) {
- fprintf( stderr, "Profile '%s' does not exist!\n", profileName.toLatin1().constData() );
- fflush( stderr );
- return -1;
- }
-
- QStringList links = conf->source();
- conf->hideSideBar( hideSidebar );
-
- QPointer<MainWindow> mw = new MainWindow();
- mw->setObjectName(QLatin1String("Assistant"));
-
- if ( server ) {
- as = new AssistantServer();
- printf("%d\n", as->serverPort() );
- fflush( stdout );
- as->connect( as, SIGNAL(showLinkRequest(QString)),
- mw, SLOT(showLinkFromClient(QString)) );
- }
-
-#if !defined(QT_NO_DBUS) && defined(Q_OS_UNIX)
- new AssistantAdaptor(mw);
-#endif // QT_NO_DBUS
-
- FontSettings settings = conf->fontSettings();
- if (mw->font() != settings.windowFont)
- a.setFont(settings.windowFont, "QWidget");
-
-#ifdef Q_WS_MAC
- // Make sure AssitantClient shows the window in front.
- mw->raise();
-#endif
- mw->show();
-
- if (!file.isEmpty())
- mw->showLink( MainWindow::urlifyFileName(file) );
- else if (file.isEmpty())
- mw->showLinks( links );
-
- a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );
-
- int appExec = a.exec();
- delete (MainWindow*)mw;
- return appExec;
-}
-
-QT_END_NAMESPACE
-
-int main( int argc, char ** argv )
-{
- Q_INIT_RESOURCE(assistant);
- return QT_PREPEND_NAMESPACE(runAssistant)(argc, argv);
-}
-
-#include "main.moc"
diff --git a/tools/assistant/compat/mainwindow.cpp b/tools/assistant/compat/mainwindow.cpp
deleted file mode 100644
index 76143a56e7..0000000000
--- a/tools/assistant/compat/mainwindow.cpp
+++ /dev/null
@@ -1,885 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "mainwindow.h"
-#include "tabbedbrowser.h"
-#include "helpdialog.h"
-#include "config.h"
-#include "fontsettingsdialog.h"
-
-#include <QDockWidget>
-#include <QDir>
-#include <QTimer>
-#include <QStatusBar>
-#include <QShortcut>
-#include <QMessageBox>
-#include <QPainter>
-#include <QEventLoop>
-#include <QtEvents>
-#include <QFontDatabase>
-#include <QWhatsThis>
-#include <QTextDocumentFragment>
-#include <QLibraryInfo>
-#include <QPrinter>
-#include <QPrintDialog>
-#include <QAbstractTextDocumentLayout>
-#include <QTextDocument>
-#include <QTextObject>
-#include <QFileDialog>
-#include <QThread>
-
-QT_BEGIN_NAMESPACE
-
-QList<MainWindow*> MainWindow::windows;
-
-#if defined(Q_WS_WIN)
-extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
-#endif
-
-MainWindow::MainWindow()
-{
- setUnifiedTitleAndToolBarOnMac(true);
- ui.setupUi(this);
-
-#if defined(Q_WS_WIN)
- // Workaround for QMimeSourceFactory failing in QFileInfo::isReadable() for
- // certain user configs. See task: 34372
- qt_ntfs_permission_lookup = 0;
-#endif
- setupCompleted = false;
-
- goActions = QList<QAction*>();
- goActionDocFiles = new QMap<QAction*,QString>;
-
- windows.append(this);
- tabs = new TabbedBrowser(this);
- connect(tabs, SIGNAL(tabCountChanged(int)), this, SLOT(updateTabActions(int)));
- setCentralWidget(tabs);
-
- Config *config = Config::configuration();
-
- updateProfileSettings();
-
- dw = new QDockWidget(this);
- dw->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
- dw->setWindowTitle(tr("Sidebar"));
- dw->setObjectName(QLatin1String("sidebar"));
- helpDock = new HelpDialog(dw, this);
- dw->setWidget(helpDock);
-
- addDockWidget(Qt::LeftDockWidgetArea, dw);
-
- // read geometry configuration
- setupGoActions();
-
- restoreGeometry(config->windowGeometry());
- restoreState(config->mainWindowState());
- if (config->sideBarHidden())
- dw->hide();
-
- tabs->setup();
- QTimer::singleShot(0, this, SLOT(setup()));
-#if defined(Q_WS_MAC)
- QMenu *windowMenu = new QMenu(tr("&Window"), this);
- menuBar()->insertMenu(ui.helpMenu->menuAction(), windowMenu);
- windowMenu->addAction(tr("Minimize"), this,
- SLOT(showMinimized()), QKeySequence(tr("Ctrl+M")));
- // Use the same forward and backward browser shortcuts as Safari and Internet Explorer do
- // on the Mac. This means that if you have access to one of those cool Intellimice, the thing
- // works just fine, since that's how Microsoft hacked it.
- ui.actionGoPrevious->setShortcut(QKeySequence(Qt::CTRL|Qt::Key_Left));
- ui.actionGoNext->setShortcut(QKeySequence(Qt::CTRL|Qt::Key_Right));
-
- static const QLatin1String MacIconPath(":/trolltech/assistant/images/mac");
- ui.actionGoNext->setIcon(QIcon(MacIconPath + QLatin1String("/next.png")));
- ui.actionGoPrevious->setIcon(QIcon(MacIconPath + QLatin1String("/prev.png")));
- ui.actionGoHome->setIcon(QIcon(MacIconPath + QLatin1String("/home.png")));
- ui.actionEditCopy->setIcon(QIcon(MacIconPath + QLatin1String("/editcopy.png")));
- ui.actionEditCopy->setIcon(QIcon(MacIconPath + QLatin1String("/editcopy.png")));
- ui.actionEditFind->setIcon(QIcon(MacIconPath + QLatin1String("/find.png")));
- ui.actionFilePrint->setIcon(QIcon(MacIconPath + QLatin1String("/print.png")));
- ui.actionZoomOut->setIcon(QIcon(MacIconPath + QLatin1String("/zoomout.png")));
- ui.actionZoomIn->setIcon(QIcon(MacIconPath + QLatin1String("/zoomin.png")));
- ui.actionSyncToc->setIcon(QIcon(MacIconPath + QLatin1String("/synctoc.png")));
- ui.actionHelpWhatsThis->setIcon(QIcon(MacIconPath + QLatin1String("/whatsthis.png")));
-#elif defined(Q_WS_X11)
- ui.actionGoNext->setIcon(QIcon::fromTheme("go-next" , ui.actionGoNext->icon()));
- ui.actionGoPrevious->setIcon(QIcon::fromTheme("go-previous" , ui.actionGoPrevious->icon()));
- ui.actionGoHome->setIcon(QIcon::fromTheme("user-home" , ui.actionGoHome->icon()));
- ui.actionEditCopy->setIcon(QIcon::fromTheme("edit-copy" , ui.actionEditCopy->icon()));
- ui.actionEditFind->setIcon(QIcon::fromTheme("edit-find" , ui.actionEditFind->icon()));
- ui.actionFilePrint->setIcon(QIcon::fromTheme("document-print" , ui.actionFilePrint->icon()));
- ui.actionZoomOut->setIcon(QIcon::fromTheme("zoom-out" , ui.actionZoomOut->icon()));
- ui.actionZoomIn->setIcon(QIcon::fromTheme("zoom-in" , ui.actionZoomIn->icon()));
- ui.actionSyncToc->setIcon(QIcon::fromTheme("view-refresh" , ui.actionSyncToc->icon()));
-#endif
-}
-
-MainWindow::~MainWindow()
-{
- windows.removeAll(this);
- delete goActionDocFiles;
-}
-
-void MainWindow::setup()
-{
- if(setupCompleted)
- return;
-
- qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
- statusBar()->showMessage(tr("Initializing Qt Assistant..."));
- setupCompleted = true;
- helpDock->initialize();
- connect(ui.actionGoPrevious, SIGNAL(triggered()), tabs, SLOT(backward()));
- connect(ui.actionGoNext, SIGNAL(triggered()), tabs, SLOT(forward()));
- connect(ui.actionEditCopy, SIGNAL(triggered()), tabs, SLOT(copy()));
- connect(ui.actionFileExit, SIGNAL(triggered()), qApp, SLOT(closeAllWindows()));
- connect(ui.actionAddBookmark, SIGNAL(triggered()),
- helpDock, SLOT(addBookmark()));
- connect(helpDock, SIGNAL(showLink(QString)),
- this, SLOT(showLink(QString)));
- connect(helpDock, SIGNAL(showSearchLink(QString,QStringList)),
- this, SLOT(showSearchLink(QString,QStringList)));
-
- connect(ui.bookmarkMenu, SIGNAL(triggered(QAction*)),
- this, SLOT(showBookmark(QAction*)));
- connect(ui.actionZoomIn, SIGNAL(triggered()), tabs, SLOT(zoomIn()));
- connect(ui.actionZoomOut, SIGNAL(triggered()), tabs, SLOT(zoomOut()));
-
- connect(ui.actionOpenPage, SIGNAL(triggered()), tabs, SLOT(newTab()));
- connect(ui.actionClosePage, SIGNAL(triggered()), tabs, SLOT(closeTab()));
- connect(ui.actionNextPage, SIGNAL(triggered()), tabs, SLOT(nextTab()));
- connect(ui.actionPrevPage, SIGNAL(triggered()), tabs, SLOT(previousTab()));
-
-
-#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
- QShortcut *acc = new QShortcut(tr("SHIFT+CTRL+="), this);
- connect(acc, SIGNAL(activated()), ui.actionZoomIn, SIGNAL(triggered()));
-#endif
-
- connect(new QShortcut(tr("Ctrl+T"), this), SIGNAL(activated()), helpDock, SLOT(toggleContents()));
- connect(new QShortcut(tr("Ctrl+I"), this), SIGNAL(activated()), helpDock, SLOT(toggleIndex()));
- connect(new QShortcut(tr("Ctrl+B"), this), SIGNAL(activated()), helpDock, SLOT(toggleBookmarks()));
- connect(new QShortcut(tr("Ctrl+S"), this), SIGNAL(activated()), helpDock, SLOT(toggleSearch()));
- connect(new QShortcut(tr("Ctrl+]"), this), SIGNAL(activated()), tabs, SLOT(nextTab()));
- connect(new QShortcut(tr("Ctrl+["), this), SIGNAL(activated()), tabs, SLOT(previousTab()));
-
- Config *config = Config::configuration();
-
- setupBookmarkMenu();
-
- QAction *viewsAction = createPopupMenu()->menuAction();
- viewsAction->setText(tr("Views"));
- ui.viewMenu->addAction(viewsAction);
-
- const int tabIndex = config->sideBarPage();
- helpDock->tabWidget()->setCurrentIndex(tabIndex);
- // The tab index is 0 by default, so we need to force an upate
- // to poulate the contents in this case.
- if (tabIndex == 0)
- helpDock->currentTabChanged(tabIndex);
-
- ui.actionEditFind->setShortcut(QKeySequence::Find);
- ui.actionEditFindNext->setShortcut(QKeySequence::FindNext);
- ui.actionEditFindPrev->setShortcut(QKeySequence::FindPrevious);
-
- QObject::connect(ui.actionEditFind, SIGNAL(triggered()), tabs, SLOT(find()));
- QObject::connect(ui.actionEditFindNext, SIGNAL(triggered()), tabs, SLOT(findNext()));
- QObject::connect(ui.actionEditFindPrev, SIGNAL(triggered()), tabs, SLOT(findPrevious()));
- connect(ui.actionEditFont_Settings, SIGNAL(triggered()), this, SLOT(showFontSettingsDialog()));
-
- qApp->restoreOverrideCursor();
- ui.actionGoPrevious->setEnabled(false);
- ui.actionGoNext->setEnabled(false);
- ui.actionEditCopy->setEnabled(false);
-
- // set the current selected item in the treeview
- helpDialog()->locateContents(tabs->currentBrowser()->source().toString());
- connect(tabs, SIGNAL(browserUrlChanged(QString)), helpDock, SLOT(locateContents(QString)));
-}
-
-void MainWindow::browserTabChanged()
-{
- HelpWindow *win = tabs->currentBrowser();
- if (win) {
- QTextCursor cursor(win->textCursor());
- ui.actionEditCopy->setEnabled(cursor.hasSelection());
- ui.actionGoPrevious->setEnabled(win->isBackwardAvailable());
- ui.actionGoNext->setEnabled(win->isForwardAvailable());
- }
-}
-
-void MainWindow::copyAvailable(bool yes)
-{
- ui.actionEditCopy->setEnabled(yes);
-}
-
-void MainWindow::updateTabActions(int index)
-{
- bool enabled = (index > 1) ? true : false;
- ui.actionPrevPage->setEnabled(enabled);
- ui.actionNextPage->setEnabled(enabled);
- ui.actionClosePage->setEnabled(enabled);
-}
-
-void MainWindow::setupGoActions()
-{
- Config *config = Config::configuration();
- QStringList titles = config->docTitles();
- QAction *action = 0;
-
- static bool separatorInserted = false;
-
- foreach (QAction *a, goActions) {
- ui.goMenu->removeAction(a);
- ui.goActionToolbar->removeAction(a);
- }
- qDeleteAll(goActions);
- goActions.clear();
- goActionDocFiles->clear();
-
- int addCount = 0;
-
- foreach (QString title, titles) {
- QPixmap pix = config->docIcon(title);
- if(!pix.isNull()) {
- if(!separatorInserted) {
- ui.goMenu->addSeparator();
- separatorInserted = true;
- }
- action = new QAction(this);
- action->setText(title);
- action->setWhatsThis(tr("Displays the main page of a specific documentation set."));
- action->setIcon(QIcon(pix));
- ui.goMenu->addAction(action);
- ui.goActionToolbar->addAction(action);
- goActions.append(action);
- goActionDocFiles->insert(action, config->indexPage(title));
- connect(action, SIGNAL(triggered()),
- this, SLOT(showGoActionLink()));
- ++addCount;
- }
- }
- if(!addCount)
- ui.goActionToolbar->hide();
- else
- ui.goActionToolbar->show();
-
-}
-
-bool MainWindow::insertActionSeparator()
-{
- ui.goMenu->addSeparator();
- ui.Toolbar->addSeparator();
- return true;
-}
-
-void MainWindow::closeEvent(QCloseEvent *e)
-{
- saveSettings();
- e->accept();
-}
-
-void MainWindow::about()
-{
- QMessageBox box(this);
-
- box.setText(QString::fromLatin1("<center><img src=\":/trolltech/assistant/images/assistant-128.png\">"
- "<h3>%1</h3>"
- "<p>Version %2</p></center>"
- "<p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p>")
- .arg(tr("Qt Assistant")).arg(QLatin1String(QT_VERSION_STR)));
- box.setWindowTitle(tr("Qt Assistant"));
- box.setIcon(QMessageBox::NoIcon);
- box.exec();
-}
-
-void MainWindow::on_actionAboutApplication_triggered()
-{
- QString url = Config::configuration()->aboutURL();
- if (url == QLatin1String("about_qt")) {
- QMessageBox::aboutQt(this, QLatin1String("Qt Assistant"));
- return;
- }
- QString text;
- if (url.startsWith(QLatin1String("file:")))
- url = url.mid(5);
- QFile file(url);
- if(file.exists() && file.open(QFile::ReadOnly))
- text = QString::fromUtf8(file.readAll());
- if(text.isNull())
- text = tr("Failed to open about application contents in file: '%1'").arg(url);
-
- QFileInfo fi(file);
- QString path = QDir::cleanPath(fi.absolutePath());
- if (!QDir::searchPaths(QLatin1String("aboutImages")).contains(path))
- QDir::addSearchPath(QLatin1String("aboutImages"), path);
-
- QMessageBox box(this);
- box.setText(text);
- box.setWindowTitle(Config::configuration()->aboutApplicationMenuText());
- box.setIcon(QMessageBox::NoIcon);
- box.exec();
-}
-
-void MainWindow::on_actionAboutAssistant_triggered()
-{
- about();
-}
-
-void MainWindow::on_actionGoHome_triggered()
-{
- QString home = MainWindow::urlifyFileName(Config::configuration()->homePage());
- showLink(home);
-}
-
-QString MainWindow::urlifyFileName(const QString &fileName)
-{
- QString name = fileName;
- QUrl url(name);
-
-#if defined(Q_OS_WIN32)
- if (!url.isValid() || url.scheme().isEmpty() || url.scheme().toLower() != QLatin1String("file:")) {
- int i = name.indexOf(QLatin1Char('#'));
- QString anchor = name.mid(i);
- name = name.toLower();
- if (i > -1)
- name.replace(i, anchor.length(), anchor);
- name.replace(QLatin1Char('\\'), QLatin1Char('/'));
- foreach (QFileInfo drive, QDir::drives()) {
- if (name.startsWith(drive.absolutePath().toLower())) {
- name = QLatin1String("file:") + name;
- break;
- }
- }
- }
-#else
- if (!url.isValid() || url.scheme().isEmpty())
- name.prepend(QLatin1String("file:"));
-#endif
- return name;
-}
-
-#ifndef QT_NO_PRINTER
-class PrintThread : public QThread
-{
- QPrinter _printer;
- QTextDocument *_document;
-
-public:
- PrintThread(QObject *parent)
- : QThread(parent), _printer(QPrinter::HighResolution), _document(0)
- {
- }
- ~PrintThread()
- {
- wait();
- }
-
- QPrinter *printer()
- {
- return &_printer;
- }
-
- void start(QTextDocument *document)
- {
- _document = document->clone();
- _document->moveToThread(this);
- QThread::start();
- }
-
-protected:
- void run()
- {
- _document->print(printer());
- delete _document;
- _document = 0;
- }
-};
-#endif //QT_NO_PRINTER
-
-void MainWindow::on_actionFilePrint_triggered()
-{
-#ifndef QT_NO_PRINTER
- if (!QFontDatabase::supportsThreadedFontRendering()) {
- QPrinter printer(QPrinter::HighResolution);
-
- QPrintDialog dlg(&printer, this);
- if (dlg.exec() == QDialog::Accepted) {
- qApp->setOverrideCursor(Qt::WaitCursor);
- tabs->currentBrowser()->document()->print(&printer);
- qApp->restoreOverrideCursor();
- }
- return;
- }
-
- PrintThread *thread = new PrintThread(this);
-
- QPrintDialog dlg(thread->printer(), this);
- if (dlg.exec() == QDialog::Accepted) {
- connect(thread, SIGNAL(finished()), SLOT(printingFinished()));
- connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
-
- qApp->setOverrideCursor(Qt::BusyCursor);
- thread->start(tabs->currentBrowser()->document());
- } else {
- delete thread;
- }
-#else
- Q_ASSERT("No printing support");
-#endif
-}
-
-void MainWindow::printingFinished()
-{
- qApp->restoreOverrideCursor();
-}
-
-void MainWindow::updateBookmarkMenu()
-{
- for(QList<MainWindow*>::Iterator it = windows.begin(); it != windows.end(); ++it)
- (*it)->setupBookmarkMenu();
-}
-
-void MainWindow::setupBookmarkMenu()
-{
- ui.bookmarkMenu->clear();
- bookmarks.clear();
- ui.bookmarkMenu->addAction(ui.actionAddBookmark);
-
- QFile f(QDir::homePath() + QLatin1String("/.assistant/bookmarks.") +
- Config::configuration()->profileName());
- if (!f.open(QFile::ReadOnly))
- return;
- QTextStream ts(&f);
- ui.bookmarkMenu->addSeparator();
- while (!ts.atEnd()) {
- QString title = ts.readLine();
- QString link = ts.readLine();
- bookmarks.insert(ui.bookmarkMenu->addAction(title), link);
- }
-}
-
-void MainWindow::showBookmark(QAction *action)
-{
- if (bookmarks.contains(action))
- showLink(bookmarks.value(action));
-}
-
-void MainWindow::showLinkFromClient(const QString &link)
-{
- setWindowState(windowState() & ~Qt::WindowMinimized);
- raise();
- activateWindow();
- QString l = MainWindow::urlifyFileName(link);
- showLink(l);
- if (isMinimized())
- showNormal();
-}
-
-void MainWindow::showLink(const QString &link)
-{
- if(link.isEmpty())
- qWarning("The link is empty!");
-
- // don't fill the history with the same url more then once
- if (link == tabs->currentBrowser()->source().toString())
- return;
-
- QUrl url(link);
- QFileInfo fi(url.toLocalFile());
- tabs->setSource(url.toString());
- tabs->currentBrowser()->setFocus();
-}
-
-void MainWindow::showLinks(const QStringList &links)
-{
- if (links.size() == 0) {
- qWarning("MainWindow::showLinks() - Empty link");
- return;
- }
-
- if (links.size() == 1) {
- showLink(MainWindow::urlifyFileName(links.first()));
- return;
- }
-
- QStringList::ConstIterator it = links.begin();
- // Initial showing, The tab is empty so update that without creating it first
- if (!tabs->currentBrowser()->source().isValid()) {
- QPair<HelpWindow*, QString> browser;
- browser.first = tabs->currentBrowser();
- browser.second = links.first();
- pendingBrowsers.append(browser);
- tabs->setTitle(tabs->currentBrowser(), tr("..."));
- }
- ++it;
-
- while(it != links.end()) {
- QPair<HelpWindow*, QString> browser;
- browser.first = tabs->newBackgroundTab();
- browser.second = *it;
- pendingBrowsers.append(browser);
- ++it;
- }
-
- startTimer(50);
- return;
-}
-
-void MainWindow::removePendingBrowser(HelpWindow *win)
-{
- if (!pendingBrowsers.count())
- return;
-
- QMutableListIterator<QPair<HelpWindow*, QString> > it(pendingBrowsers);
- while (it.hasNext()) {
- QPair<HelpWindow*, QString> browser = it.next();
- if (browser.first == win) {
- it.remove();
- break;
- }
- }
-}
-
-void MainWindow::timerEvent(QTimerEvent *e)
-{
- QPair<HelpWindow*, QString> browser = pendingBrowsers.first();
- pendingBrowsers.pop_front();
-
- if (pendingBrowsers.size() == 0)
- killTimer(e->timerId());
-
- browser.first->setSource(MainWindow::urlifyFileName(browser.second));
-}
-
-void MainWindow::showQtHelp()
-{
- showLink(QLibraryInfo::location(QLibraryInfo::DocumentationPath) +
- QLatin1String("/html/index.html"));
-}
-
-MainWindow* MainWindow::newWindow()
-{
- saveSettings();
- MainWindow *mw = new MainWindow;
- mw->move(geometry().topLeft());
- if (isMaximized())
- mw->showMaximized();
- else
- mw->show();
- mw->on_actionGoHome_triggered();
- return mw;
-}
-
-void MainWindow::saveSettings()
-{
- Config *config = Config::configuration();
-
- config->setSideBarPage(helpDock->tabWidget()->currentIndex());
- config->setWindowGeometry(saveGeometry());
- config->setMainWindowState(saveState());
-
- // Create list of the tab urls
- QStringList lst;
- QList<HelpWindow*> browsers = tabs->browsers();
- foreach (HelpWindow *browser, browsers)
- lst << browser->source().toString();
- config->setSource(lst);
- config->save();
-}
-
-TabbedBrowser* MainWindow::browsers() const
-{
- return tabs;
-}
-
-void MainWindow::showSearchLink(const QString &link, const QStringList &terms)
-{
- HelpWindow * hw = tabs->currentBrowser();
- hw->blockScrolling(true);
- hw->setCursor(Qt::WaitCursor);
- if (hw->source() == link)
- hw->reload();
- else
- showLink(link);
- hw->setCursor(Qt::ArrowCursor);
-
- hw->viewport()->setUpdatesEnabled(false);
-
- QTextCharFormat marker;
- marker.setForeground(Qt::red);
-
- QTextCursor firstHit;
-
- QTextCursor c = hw->textCursor();
- c.beginEditBlock();
- foreach (QString term, terms) {
- c.movePosition(QTextCursor::Start);
- hw->setTextCursor(c);
-
- bool found = hw->find(term, QTextDocument::FindWholeWords);
- while (found) {
- QTextCursor hit = hw->textCursor();
- if (firstHit.isNull() || hit.position() < firstHit.position())
- firstHit = hit;
-
- hit.mergeCharFormat(marker);
- found = hw->find(term, QTextDocument::FindWholeWords);
- }
- }
-
- if (firstHit.isNull()) {
- firstHit = hw->textCursor();
- firstHit.movePosition(QTextCursor::Start);
- }
- firstHit.clearSelection();
- c.endEditBlock();
- hw->setTextCursor(firstHit);
-
- hw->blockScrolling(false);
- hw->viewport()->setUpdatesEnabled(true);
-}
-
-
-void MainWindow::showGoActionLink()
-{
- const QObject *origin = sender();
- if(!origin ||
- QString::fromLatin1(origin->metaObject()->className()) != QString::fromLatin1("QAction"))
- return;
-
- QAction *action = (QAction*) origin;
- QString docfile = *(goActionDocFiles->find(action));
- showLink(MainWindow::urlifyFileName(docfile));
-}
-
-void MainWindow::on_actionHelpAssistant_triggered()
-{
- showLink(Config::configuration()->assistantDocPath() + QLatin1String("/assistant-manual.html"));
-}
-
-HelpDialog* MainWindow::helpDialog() const
-{
- return helpDock;
-}
-
-void MainWindow::backwardAvailable(bool enable)
-{
- ui.actionGoPrevious->setEnabled(enable);
-}
-
-void MainWindow::forwardAvailable(bool enable)
-{
- ui.actionGoNext->setEnabled(enable);
-}
-
-void MainWindow::updateProfileSettings()
-{
- Config *config = Config::configuration();
-#ifndef Q_WS_MAC
- setWindowIcon(config->applicationIcon());
-#endif
- ui.helpMenu->clear();
- //ui.helpMenu->addAction(ui.actionHelpAssistant);
- //ui.helpMenu->addSeparator();
- ui.helpMenu->addAction(ui.actionAboutAssistant);
- if (!config->aboutApplicationMenuText().isEmpty())
- ui.helpMenu->addAction(ui.actionAboutApplication);
- ui.helpMenu->addSeparator();
- ui.helpMenu->addAction(ui.actionHelpWhatsThis);
-
- ui.actionAboutApplication->setText(config->aboutApplicationMenuText());
-
- if(!config->title().isNull())
- setWindowTitle(config->title());
-}
-
-void MainWindow::setupPopupMenu(QMenu *m)
-{
- m->addAction(ui.actionNewWindow);
- m->addAction(ui.actionOpenPage);
- m->addAction(ui.actionClosePage);
- m->addSeparator();
- m->addAction(ui.actionSaveAs);
- m->addSeparator();
- m->addAction(ui.actionGoPrevious);
- m->addAction(ui.actionGoNext);
- m->addAction(ui.actionGoHome);
- m->addSeparator();
- m->addAction(ui.actionZoomIn);
- m->addAction(ui.actionZoomOut);
- m->addSeparator();
- m->addAction(ui.actionEditCopy);
- m->addAction(ui.actionEditFind);
-}
-
-void MainWindow::on_actionSyncToc_triggered()
-{
- HelpWindow *w = tabs->currentBrowser();
- if(w) {
- qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
- QString link = w->source().toString();
- helpDock->locateContents(link);
- helpDock->tabWidget()->setCurrentIndex(0);
- qApp->restoreOverrideCursor();
- }
-}
-
-void MainWindow::on_actionNewWindow_triggered()
-{
- newWindow()->show();
-}
-
-void MainWindow::on_actionClose_triggered()
-{
- close();
-}
-
-void MainWindow::on_actionHelpWhatsThis_triggered()
-{
- QWhatsThis::enterWhatsThisMode();
-}
-
-void MainWindow::on_actionSaveAs_triggered()
-{
- QString fileName;
- QUrl url = tabs->currentBrowser()->source();
- if (url.isValid()) {
- QFileInfo fi(url.toLocalFile());
- fileName = fi.fileName();
- }
- fileName = QFileDialog::getSaveFileName(this, tr("Save Page"), fileName);
- if (fileName.isEmpty())
- return;
-
- QFile file(fileName);
- if (!file.open(QIODevice::WriteOnly)) {
- QMessageBox::critical(this, tr("Save Page"), tr("Cannot open file for writing!"));
- return;
- }
-
- QFileInfo fi(fileName);
- QString fn = fi.fileName();
- int i = fn.lastIndexOf(QLatin1Char('.'));
- if (i > -1)
- fn = fn.left(i);
- QString relativeDestPath = fn + QLatin1String("_images");
- QDir destDir(fi.absolutePath() + QDir::separator() + relativeDestPath);
- bool imgDirAvailable = destDir.exists();
- if (!imgDirAvailable)
- imgDirAvailable = destDir.mkdir(destDir.absolutePath());
-
- // save images
- QTextDocument *doc = tabs->currentBrowser()->document()->clone();
- if (url.isValid() && imgDirAvailable) {
- QTextBlock::iterator it;
- for (QTextBlock block = doc->begin(); block != doc->end(); block = block.next()) {
- for (it = block.begin(); !(it.atEnd()); ++it) {
- QTextFragment fragment = it.fragment();
- if (fragment.isValid()) {
- QTextImageFormat fm = fragment.charFormat().toImageFormat();
- if (fm.isValid() && !fm.name().isEmpty()) {
- QUrl imagePath = tabs->currentBrowser()->source().resolved(fm.name());
- if (!imagePath.isValid())
- continue;
- QString from = imagePath.toLocalFile();
- QString destName = fm.name();
- int j = destName.lastIndexOf(QLatin1Char('/'));
- if (j > -1)
- destName = destName.mid(j+1);
- QFileInfo info(from);
- if (info.exists()) {
- if (!QFile::copy(from, destDir.absolutePath()
- + QDir::separator() + destName))
- continue;
- fm.setName(QLatin1String("./") + relativeDestPath + QLatin1String("/") + destName);
- QTextCursor cursor(doc);
- cursor.setPosition(fragment.position());
- cursor.setPosition(fragment.position() + fragment.length(),
- QTextCursor::KeepAnchor);
- cursor.setCharFormat(fm);
- }
- }
- }
- }
- }
- }
- QString src = doc->toHtml(QByteArray("utf-8"));
- QTextStream s(&file);
- s.setCodec("utf-8");
- s << src;
- s.flush();
- file.close();
-}
-
-void MainWindow::showFontSettingsDialog()
-{
- Config *config = Config::configuration();
- FontSettings settings = config->fontSettings();
-
- { // It is important that the dialog be deleted before UI mode changes.
- FontSettingsDialog dialog;
- if (!dialog.showDialog(&settings))
- return;
- }
-
- config->setFontPointSize(settings.browserFont.pointSizeF());
- config->setFontSettings(settings);
-
- updateApplicationFontSettings(settings);
-}
-
-void MainWindow::updateApplicationFontSettings(FontSettings &settings)
-{
- QFont font = settings.windowFont;
- if (this->font() != font)
- qApp->setFont(font, "QWidget");
-
- font = settings.browserFont;
- QList<HelpWindow*> browsers = tabs->browsers();
- foreach (HelpWindow *browser, browsers) {
- if (browser->font() != font)
- browser->setFont(font);
- }
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/mainwindow.h b/tools/assistant/compat/mainwindow.h
deleted file mode 100644
index a08064dd83..0000000000
--- a/tools/assistant/compat/mainwindow.h
+++ /dev/null
@@ -1,137 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include "ui_mainwindow.h"
-#include "config.h"
-
-#include <QPointer>
-#include <QMap>
-
-QT_BEGIN_NAMESPACE
-
-class TabbedBrowser;
-class HelpDialog;
-class HelpWindow;
-class QMenu;
-class QDockWidget;
-
-class MainWindow : public QMainWindow
-{
- Q_OBJECT
-public:
- MainWindow();
- virtual ~MainWindow();
-
- TabbedBrowser *browsers() const;
- HelpDialog *helpDialog() const;
-
- void setupPopupMenu(QMenu *menu);
- static QString urlifyFileName(const QString &fileName);
-
- void removePendingBrowser(HelpWindow *win);
-
-public slots:
- MainWindow *newWindow();
-
- void setup();
- void showLink(const QString &link);
- void showLinks(const QStringList &links);
- void saveSettings();
- void updateBookmarkMenu();
- void printingFinished();
-
-private slots:
- void on_actionNewWindow_triggered();
- void on_actionGoHome_triggered();
- void on_actionFilePrint_triggered();
- void on_actionClose_triggered();
- void on_actionHelpWhatsThis_triggered();
- void on_actionHelpAssistant_triggered();
- void on_actionAboutApplication_triggered();
- void on_actionAboutAssistant_triggered();
- void on_actionSaveAs_triggered();
- void on_actionSyncToc_triggered();
-
- void about();
- void setupBookmarkMenu();
- void showBookmark(QAction *action);
- void showLinkFromClient(const QString &link);
- void showQtHelp();
- void showSearchLink(const QString &link, const QStringList &terms);
- void showGoActionLink();
- void updateProfileSettings();
- void backwardAvailable(bool);
- void forwardAvailable(bool);
-
- void browserTabChanged();
- void copyAvailable(bool yes);
- void updateTabActions(int index);
- void showFontSettingsDialog();
-
-protected:
- void closeEvent(QCloseEvent *);
- void timerEvent(QTimerEvent *);
-
-private:
- void setupGoActions();
- bool insertActionSeparator();
- void updateApplicationFontSettings(FontSettings &settings);
-
-private:
- Ui::MainWindow ui;
-
- QList<QAction*> goActions;
- uint setupCompleted:1;
- TabbedBrowser *tabs;
- QMap<QAction*, QString> bookmarks;
- HelpDialog *helpDock;
- QDockWidget *dw;
- static QList<MainWindow*> windows;
- QMap<QAction*,QString> *goActionDocFiles;
- QList<QPair<HelpWindow*,QString> > pendingBrowsers;
-};
-
-#endif // MAINWINDOW_H
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/mainwindow.ui b/tools/assistant/compat/mainwindow.ui
deleted file mode 100644
index 535e27e5a4..0000000000
--- a/tools/assistant/compat/mainwindow.ui
+++ /dev/null
@@ -1,457 +0,0 @@
-<ui version="4.0" >
- <comment>*********************************************************************
-**
-** 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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-*********************************************************************</comment>
- <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>949</width>
- <height>670</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Qt Assistant by Nokia</string>
- </property>
- <widget class="QWidget" name="__qt_central_widget" />
- <widget class="QToolBar" name="Toolbar" >
- <property name="windowTitle" >
- <string>Toolbar</string>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <attribute name="toolBarArea" >
- <enum>TopToolBarArea</enum>
- </attribute>
- <attribute name="toolBarBreak" >
- <bool>false</bool>
- </attribute>
- <addaction name="actionGoPrevious" />
- <addaction name="actionGoNext" />
- <addaction name="actionGoHome" />
- <addaction name="actionSyncToc" />
- <addaction name="separator" />
- <addaction name="actionEditCopy" />
- <addaction name="actionEditFind" />
- <addaction name="actionFilePrint" />
- <addaction name="separator" />
- <addaction name="actionZoomIn" />
- <addaction name="actionZoomOut" />
- <addaction name="separator" />
- <addaction name="actionHelpWhatsThis" />
- </widget>
- <widget class="QToolBar" name="goActionToolbar" >
- <property name="windowTitle" >
- <string>Go</string>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <attribute name="toolBarArea" >
- <enum>TopToolBarArea</enum>
- </attribute>
- <attribute name="toolBarBreak" >
- <bool>false</bool>
- </attribute>
- </widget>
- <widget class="QMenuBar" name="menubar" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>949</width>
- <height>29</height>
- </rect>
- </property>
- <widget class="QMenu" name="helpMenu" >
- <property name="title" >
- <string>&amp;Help</string>
- </property>
- <addaction name="actionHelpAssistant" />
- <addaction name="separator" />
- <addaction name="actionAboutAssistant" />
- <addaction name="actionAboutApplication" />
- <addaction name="separator" />
- <addaction name="actionHelpWhatsThis" />
- </widget>
- <widget class="QMenu" name="fileMenu" >
- <property name="title" >
- <string>&amp;File</string>
- </property>
- <addaction name="actionNewWindow" />
- <addaction name="actionOpenPage" />
- <addaction name="actionClosePage" />
- <addaction name="separator" />
- <addaction name="actionSaveAs" />
- <addaction name="separator" />
- <addaction name="actionFilePrint" />
- <addaction name="separator" />
- <addaction name="actionClose" />
- <addaction name="actionFileExit" />
- </widget>
- <widget class="QMenu" name="bookmarkMenu" >
- <property name="title" >
- <string>Boo&amp;kmarks</string>
- </property>
- </widget>
- <widget class="QMenu" name="goMenu" >
- <property name="title" >
- <string>&amp;Go</string>
- </property>
- <addaction name="actionGoPrevious" />
- <addaction name="actionGoNext" />
- <addaction name="actionGoHome" />
- <addaction name="actionSyncToc" />
- <addaction name="separator" />
- <addaction name="actionNextPage" />
- <addaction name="actionPrevPage" />
- </widget>
- <widget class="QMenu" name="viewMenu" >
- <property name="title" >
- <string>&amp;View</string>
- </property>
- <addaction name="actionZoomIn" />
- <addaction name="actionZoomOut" />
- </widget>
- <widget class="QMenu" name="editMenu" >
- <property name="title" >
- <string>&amp;Edit</string>
- </property>
- <addaction name="actionEditCopy" />
- <addaction name="actionEditFind" />
- <addaction name="actionEditFindNext" />
- <addaction name="actionEditFindPrev" />
- <addaction name="separator" />
- <addaction name="actionEditFont_Settings" />
- </widget>
- <addaction name="fileMenu" />
- <addaction name="editMenu" />
- <addaction name="viewMenu" />
- <addaction name="goMenu" />
- <addaction name="bookmarkMenu" />
- <addaction name="helpMenu" />
- </widget>
- <action name="actionFilePrint" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/print.png</iconset>
- </property>
- <property name="text" >
- <string>&amp;Print...</string>
- </property>
- <property name="whatsThis" >
- <string>Print the currently displayed page.</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+P</string>
- </property>
- </action>
- <action name="actionFileExit" >
- <property name="text" >
- <string>E&amp;xit</string>
- </property>
- <property name="whatsThis" >
- <string>Quit Qt Assistant.</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+Q</string>
- </property>
- <property name="menuRole" >
- <enum>QAction::QuitRole</enum>
- </property>
- </action>
- <action name="actionEditCopy" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/editcopy.png</iconset>
- </property>
- <property name="text" >
- <string>&amp;Copy</string>
- </property>
- <property name="whatsThis" >
- <string>Copy the selected text to the clipboard.</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+C</string>
- </property>
- </action>
- <action name="actionEditFind" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/find.png</iconset>
- </property>
- <property name="text" >
- <string>&amp;Find in Text...</string>
- </property>
- <property name="whatsThis" >
- <string>Open the Find dialog. Qt Assistant will search the currently displayed page for the text you enter.</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+F</string>
- </property>
- </action>
- <action name="actionEditFindNext" >
- <property name="text" >
- <string>Find &amp;Next</string>
- </property>
- <property name="shortcut" >
- <string>F3</string>
- </property>
- </action>
- <action name="actionEditFindPrev" >
- <property name="text" >
- <string>Find &amp;Previous</string>
- </property>
- <property name="shortcut" >
- <string>Shift+F3</string>
- </property>
- </action>
- <action name="actionGoHome" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/home.png</iconset>
- </property>
- <property name="text" >
- <string>&amp;Home</string>
- </property>
- <property name="whatsThis" >
- <string>Go to the home page. Qt Assistant's home page is the Qt Reference Documentation.</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+Home</string>
- </property>
- </action>
- <action name="actionGoPrevious" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/previous.png</iconset>
- </property>
- <property name="text" >
- <string>&amp;Previous</string>
- </property>
- <property name="whatsThis" >
- <string>Go to the previous page.</string>
- </property>
- <property name="shortcut" >
- <string>Alt+Left</string>
- </property>
- </action>
- <action name="actionGoNext" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/next.png</iconset>
- </property>
- <property name="text" >
- <string>&amp;Next</string>
- </property>
- <property name="whatsThis" >
- <string>Go to the next page.</string>
- </property>
- <property name="shortcut" >
- <string>Alt+Right</string>
- </property>
- </action>
- <action name="actionAboutAssistant" >
- <property name="text" >
- <string>About Qt Assistant</string>
- </property>
- <property name="whatsThis" >
- <string>Display further information about Qt Assistant.</string>
- </property>
- <property name="menuRole" >
- <enum>QAction::AboutRole</enum>
- </property>
- </action>
- <action name="actionAboutApplication" >
- <property name="text" >
- <string>About Qt</string>
- </property>
- <property name="menuRole" >
- <enum>QAction::AboutQtRole</enum>
- </property>
- </action>
- <action name="actionZoomIn" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/zoomin.png</iconset>
- </property>
- <property name="text" >
- <string>Zoom &amp;in</string>
- </property>
- <property name="whatsThis" >
- <string>Zoom in on the document, i.e. increase the font size.</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl++</string>
- </property>
- </action>
- <action name="actionZoomOut" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/zoomout.png</iconset>
- </property>
- <property name="text" >
- <string>Zoom &amp;out</string>
- </property>
- <property name="whatsThis" >
- <string>Zoom out on the document, i.e. decrease the font size.</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+-</string>
- </property>
- </action>
- <action name="actionNewWindow" >
- <property name="text" >
- <string>New Window</string>
- </property>
- <property name="whatsThis" >
- <string>Open a new window.</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+N</string>
- </property>
- </action>
- <action name="actionClose" >
- <property name="text" >
- <string>&amp;Close</string>
- </property>
- <property name="whatsThis" >
- <string>Close the current window.</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+W</string>
- </property>
- </action>
- <action name="actionAddBookmark" >
- <property name="text" >
- <string>&amp;Add Bookmark</string>
- </property>
- <property name="whatsThis" >
- <string>Add the currently displayed page as a new bookmark.</string>
- </property>
- </action>
- <action name="actionHelpWhatsThis" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/whatsthis.png</iconset>
- </property>
- <property name="text" >
- <string>What's This?</string>
- </property>
- <property name="statusTip" >
- <string>"What's This?" context sensitive help.</string>
- </property>
- <property name="whatsThis" >
- <string>"What's This?" context sensitive help.</string>
- </property>
- <property name="shortcut" >
- <string>Shift+F1</string>
- </property>
- </action>
- <action name="actionOpenPage" >
- <property name="text" >
- <string>Add Tab</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+Alt+N</string>
- </property>
- </action>
- <action name="actionNextPage" >
- <property name="text" >
- <string>Next Tab</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+Alt+Right</string>
- </property>
- </action>
- <action name="actionPrevPage" >
- <property name="text" >
- <string>Previous Tab</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+Alt+Left</string>
- </property>
- </action>
- <action name="actionClosePage" >
- <property name="text" >
- <string>Close Tab</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+Alt+Q</string>
- </property>
- </action>
- <action name="actionHelpAssistant" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/assistant.png</iconset>
- </property>
- <property name="text" >
- <string>Qt Assistant Manual</string>
- </property>
- <property name="shortcut" >
- <string>F1</string>
- </property>
- </action>
- <action name="actionSaveAs" >
- <property name="text" >
- <string>Save Page As...</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+Alt+S</string>
- </property>
- </action>
- <action name="actionSyncToc" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/synctoc.png</iconset>
- </property>
- <property name="text" >
- <string>Sync with Table of Contents</string>
- </property>
- <property name="whatsThis" >
- <string>Select the page in contents tab.</string>
- </property>
- </action>
- <action name="actionEditFont_Settings" >
- <property name="text" >
- <string>Font Settings...</string>
- </property>
- <property name="menuRole" >
- <enum>QAction::PreferencesRole</enum>
- </property>
- </action>
- </widget>
- <resources>
- <include location="assistant.qrc" />
- </resources>
- <connections/>
-</ui>
diff --git a/tools/assistant/compat/profile.cpp b/tools/assistant/compat/profile.cpp
deleted file mode 100644
index 2878a20b29..0000000000
--- a/tools/assistant/compat/profile.cpp
+++ /dev/null
@@ -1,196 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "profile.h"
-#include <QTextCodec>
-#include <QFileInfo>
-#include <QRegExp>
-#include <QDir>
-#include <QList>
-#include <QLibraryInfo>
-
-QT_BEGIN_NAMESPACE
-
-#define QT_TITLE QLatin1String("Qt Reference Documentation")
-#define DESIGNER_TITLE QLatin1String("Qt Designer Manual")
-#define ASSISTANT_TITLE QLatin1String("Qt Assistant Manual")
-#define LINGUIST_TITLE QLatin1String("Qt Linguist Manual")
-#define QMAKE_TITLE QLatin1String("qmake Manual")
-
-Profile *Profile::createDefaultProfile(const QString &docPath)
-{
- QString path = QLibraryInfo::location(QLibraryInfo::DocumentationPath);
- if (!docPath.isEmpty())
- path = docPath;
- path = QDir::cleanPath(path) + QLatin1String("/html/");
-
- Profile *profile = new Profile;
- profile->valid = true;
- profile->type = DefaultProfile;
- profile->props[QLatin1String("name")] = QLatin1String("default");
- profile->props[QLatin1String("applicationicon")] = QLatin1String("assistant.png");
- profile->props[QLatin1String("aboutmenutext")] = QLatin1String("About Qt");
- profile->props[QLatin1String("abouturl")] = QLatin1String("about_qt");
- profile->props[QLatin1String("basepath")] = path;
- profile->props[QLatin1String("startpage")] = path + QLatin1String("index.html");
-
- profile->addDCFTitle( path + QLatin1String("qt.dcf"), QT_TITLE );
- profile->addDCFTitle( path + QLatin1String("designer.dcf"), DESIGNER_TITLE );
- profile->addDCFTitle( path + QLatin1String("assistant.dcf"), ASSISTANT_TITLE );
- profile->addDCFTitle( path + QLatin1String("linguist.dcf"), LINGUIST_TITLE );
- profile->addDCFTitle( path + QLatin1String("qmake.dcf"), QMAKE_TITLE );
-
- profile->addDCFIcon( QT_TITLE, QLatin1String("qt.png") );
- profile->addDCFIcon( DESIGNER_TITLE, QLatin1String("designer.png") );
- profile->addDCFIcon( ASSISTANT_TITLE, QLatin1String("assistant.png") );
- profile->addDCFIcon( LINGUIST_TITLE, QLatin1String("linguist.png") );
-
- profile->addDCFIndexPage( QT_TITLE, path + QLatin1String("index.html") );
- profile->addDCFIndexPage( DESIGNER_TITLE, path + QLatin1String("designer-manual.html") );
- profile->addDCFIndexPage( ASSISTANT_TITLE, path + QLatin1String("assistant-manual.html") );
- profile->addDCFIndexPage( LINGUIST_TITLE, path + QLatin1String("linguist-manual.html") );
- profile->addDCFIndexPage( QMAKE_TITLE, path + QLatin1String("qmake-manual.html") );
-
- profile->addDCFImageDir( QT_TITLE, QLatin1String("../../gif/") );
- profile->addDCFImageDir( DESIGNER_TITLE, QLatin1String("../../gif/") );
- profile->addDCFImageDir( ASSISTANT_TITLE, QLatin1String("../../gif/") );
- profile->addDCFImageDir( LINGUIST_TITLE, QLatin1String("../../gif/") );
- profile->addDCFImageDir( QMAKE_TITLE, QLatin1String("../../gif/") );
-
- return profile;
-}
-
-Profile::Profile()
- : valid( true ), dparser( 0 )
-{
- type = DefaultProfile;
-}
-
-bool Profile::isValid() const
-{
- return valid;
-}
-
-void Profile::addDCFTitle(const QString &dcf, const QString &title)
-{
- QString absdcf = QFileInfo(dcf).absoluteFilePath();
- dcfTitles[title] = absdcf;
- if (!docs.contains(absdcf))
- docs << absdcf;
-}
-
-void Profile::addDCF(const QString &docfile)
-{
- if( !docs.contains( docfile ) == 0 )
- docs << docfile;
-}
-
-void Profile::addDCFIcon(const QString docfile, const QString &icon)
-{
- icons[docfile] = icon;
-}
-
-void Profile::addDCFIndexPage(const QString title, const QString &indexPage)
-{
- indexPages[title] = indexPage;
-}
-
-void Profile::addDCFImageDir(const QString docfile, const QString &imgDir)
-{
- imageDirs[docfile] = imgDir;
-}
-
-void Profile::addProperty(const QString &name, const QString &value)
-{
- props[name] = value;
-}
-
-bool Profile::hasDocFile(const QString &name)
-{
- return docs.contains( name );
-}
-
-void Profile::removeDocFileEntry(const QString &docfile)
-{
- docs.removeAll(docfile);
- QStringList titles;
-
- for( QMap<QString,QString>::Iterator it = dcfTitles.begin();
- it != dcfTitles.end(); ++it ) {
- if( (*it) == docfile ) {
- indexPages.remove( *it );
- icons.remove( *it );
- imageDirs.remove( *it );
- titles << it.key();
- }
- }
-
- for( QStringList::ConstIterator title = titles.constBegin();
- title != titles.constEnd(); ++title )
- dcfTitles.remove( *title );
-
-#ifdef ASSISTANT_DEBUG
- qDebug() << "docs:\n - " << docs.join("\n - ");
- qDebug() << "titles:\n - " << titles.join("\n - ");
- qDebug() << "keys:\n - " << ((QStringList*)&(dcfTitles.keys()))->join("\n - ");
- qDebug() << "values:\n - " << ((QStringList*)&(dcfTitles.values()))->join("\n - ");
-#endif
-}
-
-QString Profile::storableFilePath(const QString &fileName)
-{
- QString path = QLibraryInfo::location(QLibraryInfo::DocumentationPath).replace(QLatin1String("\\"), QLatin1String("/"));
- QString fName = fileName;
- if (fName.startsWith(path))
- fName.replace(0, path.length(), QLatin1String("$DOCPATH$"));
- return fName;
-}
-
-QString Profile::loadableFilePath(const QString &fileName)
-{
- QString path = QLibraryInfo::location(QLibraryInfo::DocumentationPath).replace(QLatin1String("\\"), QLatin1String("/"));
- QString fName = fileName;
- if (fName.startsWith(QLatin1String("$DOCPATH$")))
- fName.replace(0, 9, path);
- return fName;
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/profile.h b/tools/assistant/compat/profile.h
deleted file mode 100644
index 1aa9719664..0000000000
--- a/tools/assistant/compat/profile.h
+++ /dev/null
@@ -1,95 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef PROFILE_H
-#define PROFILE_H
-
-#include <QFileInfo>
-#include <QString>
-#include <QStringList>
-#include <QMap>
-
-QT_BEGIN_NAMESPACE
-
-class DocuParser;
-
-class Profile
-{
-public:
- enum ProfileType { DefaultProfile, UserProfile };
- Profile();
-
- bool isValid() const;
-
- void addDCF( const QString &docfile );
- void addDCFIcon( const QString title, const QString &icon );
- void addDCFIndexPage( const QString title, const QString &indexPage );
- void addDCFImageDir( const QString title, const QString &imgDir );
- void addDCFTitle( const QString &dcf, const QString &title );
- void addProperty( const QString &name, const QString &value );
- bool hasDocFile( const QString &docFile );
- void removeDocFileEntry( const QString &title );
-
- ProfileType profileType() const { return type; }
- void setProfileType( ProfileType t ) { type = t; }
-
- DocuParser *docuParser() const { return dparser; }
- void setDocuParser( DocuParser *dp ) { dparser = dp; }
-
- static Profile* createDefaultProfile(const QString &docPath = QString());
- static QString makeRelativePath(const QString &base, const QString &path);
- static QString storableFilePath(const QString &fileName);
- static QString loadableFilePath(const QString &fileName);
-
- uint valid:1;
- ProfileType type;
- DocuParser *dparser;
- QMap<QString,QString> props;
- QMap<QString,QString> icons;
- QMap<QString,QString> indexPages;
- QMap<QString,QString> imageDirs;
- QMap<QString,QString> dcfTitles;
- QStringList docs;
-};
-
-QT_END_NAMESPACE
-
-#endif // PROFILE_H
diff --git a/tools/assistant/compat/tabbedbrowser.cpp b/tools/assistant/compat/tabbedbrowser.cpp
deleted file mode 100644
index c3c1572ba3..0000000000
--- a/tools/assistant/compat/tabbedbrowser.cpp
+++ /dev/null
@@ -1,530 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "tabbedbrowser.h"
-#include "mainwindow.h"
-#include "helpwindow.h"
-#include "config.h"
-
-#include <QStyleOptionTab>
-#include <QToolTip>
-#include <QFileInfo>
-#include <QToolButton>
-#include <QPixmap>
-#include <QIcon>
-#include <QStyle>
-#include <QTimer>
-#include <QStackedWidget>
-#include <QTimer>
-#include <QTextBlock>
-#include <QKeyEvent>
-
-QT_BEGIN_NAMESPACE
-
-#ifdef Q_WS_MAC
-const QLatin1String ImageLocation(":trolltech/assistant/images/mac/");
-#else
-const QLatin1String ImageLocation(":trolltech/assistant/images/win/");
-#endif
-
-TabbedBrowser::TabbedBrowser(MainWindow *parent)
- : QWidget(parent)
-{
- ui.setupUi(this);
- init();
-
- QStackedWidget *stack = qFindChild<QStackedWidget*>(ui.tab);
- Q_ASSERT(stack);
- stack->setContentsMargins(0, 0, 0, 0);
- connect(stack, SIGNAL(currentChanged(int)), parent, SLOT(browserTabChanged()));
-
- QPalette p = palette();
- p.setColor(QPalette::Inactive, QPalette::Highlight,
- p.color(QPalette::Active, QPalette::Highlight));
- p.setColor(QPalette::Inactive, QPalette::HighlightedText,
- p.color(QPalette::Active, QPalette::HighlightedText));
- setPalette(p);
-}
-
-TabbedBrowser::~TabbedBrowser()
-{
-}
-
-MainWindow *TabbedBrowser::mainWindow() const
-{
- return static_cast<MainWindow*>(parentWidget());
-}
-
-void TabbedBrowser::forward()
-{
- currentBrowser()->forward();
- emit browserUrlChanged(currentBrowser()->source().toString());
-}
-
-void TabbedBrowser::backward()
-{
- currentBrowser()->backward();
- emit browserUrlChanged(currentBrowser()->source().toString());
-}
-
-void TabbedBrowser::setSource( const QString &ref )
-{
- HelpWindow * win = currentBrowser();
- win->setSource(ref);
-}
-
-void TabbedBrowser::reload()
-{
- currentBrowser()->reload();
-}
-
-void TabbedBrowser::home()
-{
- currentBrowser()->home();
-}
-
-HelpWindow *TabbedBrowser::currentBrowser() const
-{
- return static_cast<HelpWindow*>(ui.tab->currentWidget());
-}
-
-void TabbedBrowser::nextTab()
-{
- if(ui.tab->currentIndex()<=ui.tab->count()-1)
- ui.tab->setCurrentIndex(ui.tab->currentIndex()+1);
-}
-
-void TabbedBrowser::previousTab()
-{
- int idx = ui.tab->currentIndex()-1;
- if(idx>=0)
- ui.tab->setCurrentIndex(idx);
-}
-
-HelpWindow *TabbedBrowser::createHelpWindow()
-{
- MainWindow *mainWin = mainWindow();
- HelpWindow *win = new HelpWindow(mainWin, 0);
- win->setFrameStyle(QFrame::NoFrame);
- win->setPalette(palette());
- win->setSearchPaths(Config::configuration()->mimePaths());
- ui.tab->addTab(win, tr("..."));
- connect(win, SIGNAL(highlighted(QString)),
- (const QObject*) (mainWin->statusBar()), SLOT(showMessage(QString)));
- connect(win, SIGNAL(backwardAvailable(bool)),
- mainWin, SLOT(backwardAvailable(bool)));
- connect(win, SIGNAL(forwardAvailable(bool)),
- mainWin, SLOT(forwardAvailable(bool)));
- connect(win, SIGNAL(sourceChanged(QUrl)), this, SLOT(sourceChanged()));
-
- ui.tab->cornerWidget(Qt::TopRightCorner)->setEnabled(ui.tab->count() > 1);
- win->installEventFilter(this);
- win->viewport()->installEventFilter(this);
- ui.editFind->installEventFilter(this);
- return win;
-}
-
-HelpWindow *TabbedBrowser::newBackgroundTab()
-{
- HelpWindow *win = createHelpWindow();
- emit tabCountChanged(ui.tab->count());
- return win;
-}
-
-void TabbedBrowser::newTab(const QString &lnk)
-{
- QString link(lnk);
- if(link.isNull()) {
- HelpWindow *w = currentBrowser();
- if(w)
- link = w->source().toString();
- }
- HelpWindow *win = createHelpWindow();
- ui.tab->setCurrentIndex(ui.tab->indexOf(win));
- if(!link.isNull()) {
- win->setSource(link);
- }
-
- emit tabCountChanged(ui.tab->count());
-}
-
-void TabbedBrowser::zoomIn()
-{
- currentBrowser()->zoomIn();
- Config::configuration()->setFontPointSize(currentBrowser()->font().pointSizeF());
-}
-
-void TabbedBrowser::zoomOut()
-{
- currentBrowser()->zoomOut();
- Config::configuration()->setFontPointSize(currentBrowser()->font().pointSizeF());
-}
-
-void TabbedBrowser::init()
-{
-
- lastCurrentTab = 0;
- while(ui.tab->count()) {
- QWidget *page = ui.tab->widget(0);
- ui.tab->removeTab(0);
- delete page;
- }
-
- connect(ui.tab, SIGNAL(currentChanged(int)),
- this, SLOT(transferFocus()));
-
- QTabBar *tabBar = qFindChild<QTabBar*>(ui.tab);
- QStyleOptionTab opt;
- if (tabBar) {
- opt.init(tabBar);
- opt.shape = tabBar->shape();
- tabBar->setContextMenuPolicy(Qt::CustomContextMenu);
- connect(tabBar, SIGNAL(customContextMenuRequested(QPoint)), SLOT(openTabMenu(QPoint)));
- }
-
- // workaround for sgi style
- QPalette pal = palette();
- pal.setColor(QPalette::Active, QPalette::Button, pal.color(QPalette::Active, QPalette::Window));
- pal.setColor(QPalette::Disabled, QPalette::Button, pal.color(QPalette::Disabled, QPalette::Window));
- pal.setColor(QPalette::Inactive, QPalette::Button, pal.color(QPalette::Inactive, QPalette::Window));
-
- QToolButton *newTabButton = new QToolButton(this);
- ui.tab->setCornerWidget(newTabButton, Qt::TopLeftCorner);
- newTabButton->setCursor(Qt::ArrowCursor);
- newTabButton->setAutoRaise(true);
- newTabButton->setIcon(QIcon(ImageLocation + QLatin1String("addtab.png")));
- QObject::connect(newTabButton, SIGNAL(clicked()), this, SLOT(newTab()));
- newTabButton->setToolTip(tr("Add page"));
-
- QToolButton *closeTabButton = new QToolButton(this);
- closeTabButton->setPalette(pal);
- ui.tab->setCornerWidget(closeTabButton, Qt::TopRightCorner);
- closeTabButton->setCursor(Qt::ArrowCursor);
- closeTabButton->setAutoRaise(true);
- closeTabButton->setIcon(QIcon(ImageLocation + QLatin1String("closetab.png")));
- QObject::connect(closeTabButton, SIGNAL(clicked()), this, SLOT(closeTab()));
- closeTabButton->setToolTip(tr("Close page"));
- closeTabButton->setEnabled(false);
-
- QObject::connect(ui.toolClose, SIGNAL(clicked()), ui.frameFind, SLOT(hide()));
- QObject::connect(ui.toolPrevious, SIGNAL(clicked()), this, SLOT(findPrevious()));
- QObject::connect(ui.toolNext, SIGNAL(clicked()), this, SLOT(findNext()));
- QObject::connect(ui.editFind, SIGNAL(returnPressed()), this, SLOT(findNext()));
- QObject::connect(ui.editFind, SIGNAL(textEdited(QString)),
- this, SLOT(find(QString)));
- ui.frameFind->setVisible(false);
- ui.labelWrapped->setVisible(false);
- autoHideTimer = new QTimer(this);
- autoHideTimer->setInterval(5000);
- autoHideTimer->setSingleShot(true);
- QObject::connect(autoHideTimer, SIGNAL(timeout()), ui.frameFind, SLOT(hide()));
-}
-
-void TabbedBrowser::updateTitle(const QString &title)
-{
- ui.tab->setTabText(ui.tab->indexOf(currentBrowser()), title.trimmed());
-}
-
-void TabbedBrowser::newTab()
-{
- newTab(QString());
-}
-
-void TabbedBrowser::transferFocus()
-{
- if(currentBrowser()) {
- currentBrowser()->setFocus();
- }
- mainWindow()->setWindowTitle(Config::configuration()->title()
- + QLatin1String(" - ")
- + currentBrowser()->documentTitle());
-}
-
-void TabbedBrowser::initHelpWindow(HelpWindow * /*win*/)
-{
-}
-
-void TabbedBrowser::setup()
-{
- newTab(QString());
-}
-
-void TabbedBrowser::copy()
-{
- currentBrowser()->copy();
-}
-
-void TabbedBrowser::closeTab()
-{
- if(ui.tab->count()==1)
- return;
- HelpWindow *win = currentBrowser();
- mainWindow()->removePendingBrowser(win);
- ui.tab->removeTab(ui.tab->indexOf(win));
- QTimer::singleShot(0, win, SLOT(deleteLater()));
- ui.tab->cornerWidget(Qt::TopRightCorner)->setEnabled(ui.tab->count() > 1);
- emit tabCountChanged(ui.tab->count());
-}
-
-QStringList TabbedBrowser::sources() const
-{
- QStringList lst;
- int cnt = ui.tab->count();
- for(int i=0; i<cnt; i++) {
- lst.append(((QTextBrowser*) ui.tab->widget(i))->source().toString());
- }
- return lst;
-}
-
-QList<HelpWindow*> TabbedBrowser::browsers() const
-{
- QList<HelpWindow*> list;
- for (int i=0; i<ui.tab->count(); ++i) {
- Q_ASSERT(qobject_cast<HelpWindow*>(ui.tab->widget(i)));
- list.append(static_cast<HelpWindow*>(ui.tab->widget(i)));
- }
- return list;
-}
-
-void TabbedBrowser::sourceChanged()
-{
- HelpWindow *win = qobject_cast<HelpWindow *>(QObject::sender());
- Q_ASSERT(win);
- QString docTitle(win->documentTitle());
- if (docTitle.isEmpty())
- docTitle = QLatin1String("...");
- // Make the classname in the title a bit more visible (otherwise
- // we just see the "Qt 4.0 : Q..." which isn't really helpful ;-)
- QString qtTitle = QLatin1String("Qt ") + QString::number( (QT_VERSION >> 16) & 0xff )
- + QLatin1String(".") + QString::number( (QT_VERSION >> 8) & 0xff )
- + QLatin1String(": ");
- if (docTitle.startsWith(qtTitle))
- docTitle = docTitle.mid(qtTitle.length());
- setTitle(win, docTitle);
- ui.frameFind->hide();
- ui.labelWrapped->hide();
- win->setTextCursor(win->cursorForPosition(QPoint(0, 0)));
-}
-
-void TabbedBrowser::setTitle(HelpWindow *win, const QString &title)
-{
- const QString tt = title.trimmed();
- ui.tab->setTabText(ui.tab->indexOf(win), tt);
- if (win == currentBrowser())
- mainWindow()->setWindowTitle(Config::configuration()->title() + QLatin1String(" - ") + tt);
-}
-
-void TabbedBrowser::keyPressEvent(QKeyEvent *e)
-{
- int key = e->key();
- QString ttf = ui.editFind->text();
- QString text = e->text();
-
- if (ui.frameFind->isVisible()) {
- switch (key) {
- case Qt::Key_Escape:
- ui.frameFind->hide();
- ui.labelWrapped->hide();
- return;
- case Qt::Key_Backspace:
- ttf.chop(1);
- break;
- case Qt::Key_Return:
- case Qt::Key_Enter:
- // Return/Enter key events are not accepted by QLineEdit
- return;
- default:
- if (text.isEmpty()) {
- QWidget::keyPressEvent(e);
- return;
- }
- ttf += text;
- }
- } else {
- if (text.isEmpty() || text[0].isSpace() || !text[0].isPrint()) {
- QWidget::keyPressEvent(e);
- return;
- }
- if (text.startsWith(QLatin1Char('/'))) {
- ui.editFind->clear();
- find();
- return;
- }
- ttf = text;
- ui.frameFind->show();
- }
-
- ui.editFind->setText(ttf);
- find(ttf, false, false);
-}
-
-void TabbedBrowser::findNext()
-{
- find(ui.editFind->text(), true, false);
-}
-
-void TabbedBrowser::findPrevious()
-{
- find(ui.editFind->text(), false, true);
-}
-
-void TabbedBrowser::find()
-{
- ui.frameFind->show();
- ui.editFind->setFocus(Qt::ShortcutFocusReason);
- ui.editFind->selectAll();
- autoHideTimer->stop();
-}
-
-void TabbedBrowser::find(QString ttf, bool forward, bool backward)
-{
- HelpWindow *browser = currentBrowser();
- QTextDocument *doc = browser->document();
- QString oldText = ui.editFind->text();
- QTextCursor c = browser->textCursor();
- QTextDocument::FindFlags options;
- QPalette p = ui.editFind->palette();
- p.setColor(QPalette::Active, QPalette::Base, Qt::white);
-
- if (c.hasSelection())
- c.setPosition(forward ? c.position() : c.anchor(), QTextCursor::MoveAnchor);
-
- QTextCursor newCursor = c;
-
- if (!ttf.isEmpty()) {
- if (backward)
- options |= QTextDocument::FindBackward;
-
- if (ui.checkCase->isChecked())
- options |= QTextDocument::FindCaseSensitively;
-
- if (ui.checkWholeWords->isChecked())
- options |= QTextDocument::FindWholeWords;
-
- newCursor = doc->find(ttf, c, options);
- ui.labelWrapped->hide();
-
- if (newCursor.isNull()) {
- QTextCursor ac(doc);
- ac.movePosition(options & QTextDocument::FindBackward
- ? QTextCursor::End : QTextCursor::Start);
- newCursor = doc->find(ttf, ac, options);
- if (newCursor.isNull()) {
- p.setColor(QPalette::Active, QPalette::Base, QColor(255, 102, 102));
- newCursor = c;
- } else
- ui.labelWrapped->show();
- }
- }
-
- if (!ui.frameFind->isVisible())
- ui.frameFind->show();
- browser->setTextCursor(newCursor);
- ui.editFind->setPalette(p);
- if (!ui.editFind->hasFocus())
- autoHideTimer->start();
-}
-
-bool TabbedBrowser::eventFilter(QObject *o, QEvent *e)
-{
- if (o == ui.editFind) {
- if (e->type() == QEvent::FocusIn && autoHideTimer->isActive())
- autoHideTimer->stop();
- } else if (e->type() == QEvent::KeyPress && ui.frameFind->isVisible()) { // assume textbrowser
- QKeyEvent *ke = static_cast<QKeyEvent *>(e);
- if (ke->key() == Qt::Key_Space) {
- keyPressEvent(ke);
- return true;
- }
- }
-
- return QWidget::eventFilter(o, e);
-}
-
-void TabbedBrowser::openTabMenu(const QPoint& pos)
-{
- QTabBar *tabBar = qFindChild<QTabBar*>(ui.tab);
-
- QMenu m(QLatin1String(""), tabBar);
- QAction *new_action = m.addAction(tr("New Tab"));
- QAction *close_action = m.addAction(tr("Close Tab"));
- QAction *close_others_action = m.addAction(tr("Close Other Tabs"));
-
- if (tabBar->count() == 1) {
- close_action->setEnabled(false);
- close_others_action->setEnabled(false);
- }
-
- QAction *action_picked = m.exec(tabBar->mapToGlobal(pos));
- if (!action_picked)
- return;
-
- if (action_picked == new_action) {
- newTab();
- return;
- }
-
- QList<HelpWindow*> windowList = browsers();
- for (int i = 0; i < tabBar->count(); ++i) {
- if (tabBar->tabRect(i).contains(pos)) {
- HelpWindow *win = static_cast<HelpWindow*>(ui.tab->widget(i));
- if (action_picked == close_action) {
- mainWindow()->removePendingBrowser(win);
- QTimer::singleShot(0, win, SLOT(deleteLater()));
- }
- windowList.removeOne(win);
- break;
- }
- }
-
- if (action_picked == close_others_action) {
- foreach (HelpWindow* win, windowList) {
- mainWindow()->removePendingBrowser(win);
- QTimer::singleShot(0, win, SLOT(deleteLater()));
- windowList.removeOne(win);
- }
- }
-
- ui.tab->cornerWidget(Qt::TopRightCorner)->setEnabled(windowList.count() > 1);
- emit tabCountChanged(windowList.count());
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/tabbedbrowser.h b/tools/assistant/compat/tabbedbrowser.h
deleted file mode 100644
index 0e325052f9..0000000000
--- a/tools/assistant/compat/tabbedbrowser.h
+++ /dev/null
@@ -1,122 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef TABBEDBROWSER_H
-#define TABBEDBROWSER_H
-
-#include "ui_tabbedbrowser.h"
-
-QT_BEGIN_NAMESPACE
-
-class MainWindow;
-class HelpWindow;
-class QStyleSheet;
-class QMimeSourceFactory;
-class QTimer;
-
-class TabbedBrowser : public QWidget
-{
- Q_OBJECT
-public:
- TabbedBrowser(MainWindow *parent);
- virtual ~TabbedBrowser();
-
- MainWindow *mainWindow() const;
- HelpWindow *currentBrowser() const;
- QStringList sources() const;
- QList<HelpWindow*> browsers() const;
-
- HelpWindow* newBackgroundTab();
- HelpWindow* createHelpWindow();
-
- void setTitle(HelpWindow*, const QString &);
-
-signals:
- void tabCountChanged(int count);
- void browserUrlChanged(const QString &link);
-
-protected:
- void keyPressEvent(QKeyEvent *);
- bool eventFilter(QObject *o, QEvent *e);
-
-public slots:
- void init();
- void forward();
- void backward();
- void setSource(const QString &ref);
- void reload();
- void home();
- void nextTab();
- void previousTab();
- void newTab(const QString &lnk);
- void zoomIn();
- void zoomOut();
- void updateTitle(const QString &title);
- void newTab();
- void transferFocus();
- void initHelpWindow(HelpWindow *win);
- void setup();
- void copy();
- void closeTab();
- void sourceChanged();
-
- void find();
- void findNext();
- void findPrevious();
-
-private slots:
- void find(QString, bool forward = false, bool backward = false);
- void openTabMenu(const QPoint& pos);
-
-private:
- Ui::TabbedBrowser ui;
- QWidget *lastCurrentTab;
- QFont tabFont;
-
- QString fixedFontFam;
- QColor lnkColor;
- bool underlineLnk;
- QTimer *autoHideTimer;
-};
-
-QT_END_NAMESPACE
-
-#endif // TABBEDBROWSER_H
diff --git a/tools/assistant/compat/tabbedbrowser.ui b/tools/assistant/compat/tabbedbrowser.ui
deleted file mode 100644
index 411f14531d..0000000000
--- a/tools/assistant/compat/tabbedbrowser.ui
+++ /dev/null
@@ -1,233 +0,0 @@
-<ui version="4.0" >
- <author></author>
- <comment>*********************************************************************
-**
-** 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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-*********************************************************************</comment>
- <exportmacro></exportmacro>
- <class>TabbedBrowser</class>
- <widget class="QWidget" name="TabbedBrowser" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>710</width>
- <height>664</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>TabbedBrowser</string>
- </property>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>0</number>
- </property>
- <item>
- <widget class="QTabWidget" name="tab" >
- <widget class="QWidget" name="frontpage" >
- <attribute name="title" >
- <string>Untitled</string>
- </attribute>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>8</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- </layout>
- </widget>
- </widget>
- </item>
- <item>
- <widget class="QFrame" name="frameFind" >
- <property name="frameShape" >
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QToolButton" name="toolClose" >
- <property name="text" >
- <string/>
- </property>
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/close.png</iconset>
- </property>
- <property name="autoRaise" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="editFind" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>150</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="toolPrevious" >
- <property name="text" >
- <string>Previous</string>
- </property>
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/previous.png</iconset>
- </property>
- <property name="toolButtonStyle" >
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
- <property name="autoRaise" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="toolNext" >
- <property name="minimumSize" >
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text" >
- <string>Next</string>
- </property>
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/next.png</iconset>
- </property>
- <property name="toolButtonStyle" >
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
- <property name="autoRaise" >
- <bool>true</bool>
- </property>
- <property name="arrowType" >
- <enum>Qt::NoArrow</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="checkCase" >
- <property name="text" >
- <string>Case Sensitive</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="checkWholeWords" >
- <property name="text" >
- <string>Whole words</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="labelWrapped" >
- <property name="minimumSize" >
- <size>
- <width>0</width>
- <height>20</height>
- </size>
- </property>
- <property name="maximumSize" >
- <size>
- <width>105</width>
- <height>20</height>
- </size>
- </property>
- <property name="text" >
- <string>&lt;img src=":/trolltech/assistant/images/wrap.png">&amp;nbsp;Search wrapped</string>
- </property>
- <property name="textFormat" >
- <enum>Qt::RichText</enum>
- </property>
- <property name="scaledContents" >
- <bool>true</bool>
- </property>
- <property name="alignment" >
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>81</width>
- <height>21</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <pixmapfunction></pixmapfunction>
- <resources>
- <include location="assistant.qrc" />
- </resources>
- <connections/>
-</ui>
diff --git a/tools/assistant/compat/topicchooser.cpp b/tools/assistant/compat/topicchooser.cpp
deleted file mode 100644
index b2e7e98786..0000000000
--- a/tools/assistant/compat/topicchooser.cpp
+++ /dev/null
@@ -1,101 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "topicchooser.h"
-
-#include <QLabel>
-#include <QListWidget>
-#include <QPushButton>
-
-QT_BEGIN_NAMESPACE
-
-TopicChooser::TopicChooser(QWidget *parent, const QStringList &lnkNames,
- const QStringList &lnks, const QString &title)
- : QDialog(parent), links(lnks), linkNames(lnkNames)
-{
- ui.setupUi(this);
-
- ui.label->setText(tr("Choose a topic for <b>%1</b>").arg(title));
- ui.listbox->addItems(linkNames);
- if (ui.listbox->count() != 0)
- ui.listbox->setCurrentRow(0);
- ui.listbox->setFocus();
-}
-
-QString TopicChooser::link() const
-{
- if (ui.listbox->currentRow() == -1)
- return QString();
- QString s = ui.listbox->item(ui.listbox->currentRow())->text();
- if (s.isEmpty())
- return s;
- int i = linkNames.indexOf(s);
- return links[i];
-}
-
-QString TopicChooser::getLink(QWidget *parent, const QStringList &lnkNames,
- const QStringList &lnks, const QString &title)
-{
- TopicChooser *dlg = new TopicChooser(parent, lnkNames, lnks, title);
- QString lnk;
- if (dlg->exec() == QDialog::Accepted)
- lnk = dlg->link();
- delete dlg;
- return lnk;
-}
-
-void TopicChooser::on_buttonDisplay_clicked()
-{
- accept();
-}
-
-void TopicChooser::on_buttonCancel_clicked()
-{
- reject();
-}
-
-void TopicChooser::on_listbox_itemActivated(QListWidgetItem *item)
-{
- Q_UNUSED(item);
- accept();
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/topicchooser.h b/tools/assistant/compat/topicchooser.h
deleted file mode 100644
index fef57dfe4b..0000000000
--- a/tools/assistant/compat/topicchooser.h
+++ /dev/null
@@ -1,77 +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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef TOPICCHOOSER_H
-#define TOPICCHOOSER_H
-
-#include "ui_topicchooser.h"
-
-#include <QDialog>
-#include <QStringList>
-
-QT_BEGIN_NAMESPACE
-
-class TopicChooser : public QDialog
-{
- Q_OBJECT
-public:
- TopicChooser(QWidget *parent, const QStringList &lnkNames,
- const QStringList &lnks, const QString &title);
-
- QString link() const;
-
- static QString getLink(QWidget *parent, const QStringList &lnkNames,
- const QStringList &lnks, const QString &title);
-
-private slots:
- void on_buttonDisplay_clicked();
- void on_buttonCancel_clicked();
- void on_listbox_itemActivated(QListWidgetItem *item);
-
-private:
- Ui::TopicChooser ui;
- QString theLink;
- QStringList links, linkNames;
-};
-
-#endif // TOPICCHOOSER_H
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/topicchooser.ui b/tools/assistant/compat/topicchooser.ui
deleted file mode 100644
index 18ff61b554..0000000000
--- a/tools/assistant/compat/topicchooser.ui
+++ /dev/null
@@ -1,162 +0,0 @@
-<ui version="4.0" >
- <comment>*********************************************************************
-**
-** 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 Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-*********************************************************************</comment>
- <class>TopicChooser</class>
- <widget class="QDialog" name="TopicChooser" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>391</width>
- <height>223</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Choose Topic</string>
- </property>
- <property name="whatsThis" >
- <string>Select a topic from the list and click the &lt;b>Display&lt;/b>-button to open the online help.</string>
- </property>
- <property name="sizeGripEnabled" >
- <bool>true</bool>
- </property>
- <layout class="QVBoxLayout" >
- <property name="spacing" >
- <number>6</number>
- </property>
- <property name="leftMargin" >
- <number>11</number>
- </property>
- <property name="topMargin" >
- <number>11</number>
- </property>
- <property name="rightMargin" >
- <number>11</number>
- </property>
- <property name="bottomMargin" >
- <number>11</number>
- </property>
- <item>
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string>&amp;Topics</string>
- </property>
- <property name="buddy" >
- <cstring>listbox</cstring>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QListWidget" name="listbox" >
- <property name="whatsThis" >
- <string>Displays a list of available help topics for the keyword.</string>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="spacing" >
- <number>6</number>
- </property>
- <property name="leftMargin" >
- <number>0</number>
- </property>
- <property name="topMargin" >
- <number>0</number>
- </property>
- <property name="rightMargin" >
- <number>0</number>
- </property>
- <property name="bottomMargin" >
- <number>0</number>
- </property>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="buttonDisplay" >
- <property name="whatsThis" >
- <string>Open the topic selected in the list.</string>
- </property>
- <property name="text" >
- <string>&amp;Display</string>
- </property>
- <property name="autoDefault" >
- <bool>true</bool>
- </property>
- <property name="default" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="buttonCancel" >
- <property name="whatsThis" >
- <string>Close the Dialog.</string>
- </property>
- <property name="text" >
- <string>&amp;Close</string>
- </property>
- <property name="autoDefault" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/tools/assistant/lib/lib.pro b/tools/assistant/lib/lib.pro
index 51933def95..26d34562cf 100644
--- a/tools/assistant/lib/lib.pro
+++ b/tools/assistant/lib/lib.pro
@@ -23,7 +23,6 @@ unix:QMAKE_PKGCONFIG_REQUIRES += QtNetwork \
QtSql \
QtXml
LIBS_PRIVATE += -l$$qclucene
-
RESOURCES += helpsystem.qrc
SOURCES += qhelpenginecore.cpp \
qhelpengine.cpp \
@@ -41,6 +40,7 @@ SOURCES += qhelpenginecore.cpp \
qhelpsearchindexwriter_default.cpp \
qhelpsearchindexreader_default.cpp \
qhelpsearchindexreader.cpp \
+ qclucenefieldnames.cpp \
qhelp_global.cpp
# access to clucene
@@ -63,7 +63,8 @@ HEADERS += qhelpenginecore.h \
qhelpsearchindex_default_p.h \
qhelpsearchindexwriter_default_p.h \
qhelpsearchindexreader_default_p.h \
- qhelpsearchindexreader_p.h
+ qhelpsearchindexreader_p.h \
+ qclucenefieldnames_p.h
# access to clucene
HEADERS += qhelpsearchindexwriter_clucene_p.h \
diff --git a/tools/assistant/lib/qclucenefieldnames.cpp b/tools/assistant/lib/qclucenefieldnames.cpp
new file mode 100644
index 0000000000..5c3a474ef2
--- /dev/null
+++ b/tools/assistant/lib/qclucenefieldnames.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qclucenefieldnames_p.h"
+
+QT_BEGIN_NAMESPACE
+
+namespace fulltextsearch {
+namespace clucene {
+const QString AttributeField(QLatin1String("attribute"));
+const QString ContentField(QLatin1String("content"));
+const QString NamespaceField(QLatin1String("namespace"));
+const QString PathField(QLatin1String("path"));
+const QString TitleField(QLatin1String("title"));
+const QString TitleTokenizedField(QLatin1String("titleTokenized"));
+} // namespace clucene
+} // namespace fulltextsearch
+
+QT_END_NAMESPACE
diff --git a/tools/assistant/lib/qclucenefieldnames_p.h b/tools/assistant/lib/qclucenefieldnames_p.h
new file mode 100644
index 0000000000..a61138270d
--- /dev/null
+++ b/tools/assistant/lib/qclucenefieldnames_p.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QCLUCENEFIELDNAMES_P_H
+#define QCLUCENEFIELDNAMES_P_H
+
+#include <QtCore/QtGlobal>
+#include <QtCore/QString>
+
+QT_BEGIN_NAMESPACE
+
+namespace fulltextsearch {
+namespace clucene {
+ extern const QString AttributeField;
+ extern const QString ContentField;
+ extern const QString NamespaceField;
+ extern const QString PathField;
+ extern const QString TitleField;
+ extern const QString TitleTokenizedField;
+} // namespace clucene
+} // namespace fulltextsearch
+
+QT_END_NAMESPACE
+
+#endif // QCLUCENEFIELDNAMES_P_H
diff --git a/tools/assistant/lib/qhelp_global.cpp b/tools/assistant/lib/qhelp_global.cpp
index 539b504e06..c2c916b04e 100644
--- a/tools/assistant/lib/qhelp_global.cpp
+++ b/tools/assistant/lib/qhelp_global.cpp
@@ -39,6 +39,7 @@
**
****************************************************************************/
+#include <QtCore/QCoreApplication>
#include <QtCore/QRegExp>
#include <QtCore/QMutexLocker>
#include <QtGui/QTextDocument>
@@ -55,12 +56,12 @@ QString QHelpGlobal::uniquifyConnectionName(const QString &name, void *pointer)
counter = 0;
return QString::fromLatin1("%1-%2-%3").
- arg(name).arg(long(pointer)).arg(counter);
+ arg(name).arg(quintptr(pointer)).arg(counter);
}
QString QHelpGlobal::documentTitle(const QString &content)
{
- QString title = QObject::tr("Untitled");
+ QString title = QCoreApplication::translate("QHelp", "Untitled");
if (!content.isEmpty()) {
int start = content.indexOf(QLatin1String("<title>"), 0, Qt::CaseInsensitive) + 7;
int end = content.indexOf(QLatin1String("</title>"), 0, Qt::CaseInsensitive);
@@ -86,17 +87,18 @@ QString QHelpGlobal::codecFromData(const QByteArray &data)
QString QHelpGlobal::codecFromHtmlData(const QByteArray &data)
{
- QString content = QString::fromUtf8(data.constData(), data.size());
- int start = content.indexOf(QLatin1String("<meta"), 0, Qt::CaseInsensitive);
+ QString head = QString::fromUtf8(data.constData(), qMin(1000, data.size()));
+ int start = head.indexOf(QLatin1String("<meta"), 0, Qt::CaseInsensitive);
if (start > 0) {
- int end;
QRegExp r(QLatin1String("charset=([^\"\\s]+)"));
while (start != -1) {
- end = content.indexOf(QLatin1Char('>'), start) + 1;
- const QString &meta = content.mid(start, end - start).toLower();
+ const int end = head.indexOf(QLatin1Char('>'), start) + 1;
+ if (end <= start)
+ break;
+ const QString &meta = head.mid(start, end - start).toLower();
if (r.indexIn(meta) != -1)
return r.cap(1);
- start = content.indexOf(QLatin1String("<meta"), end,
+ start = head.indexOf(QLatin1String("<meta"), end,
Qt::CaseInsensitive);
}
}
@@ -105,8 +107,8 @@ QString QHelpGlobal::codecFromHtmlData(const QByteArray &data)
QString QHelpGlobal::codecFromXmlData(const QByteArray &data)
{
- QString content = QString::fromUtf8(data.constData(), data.size());
+ QString head = QString::fromUtf8(data.constData(), qMin(1000, data.size()));
const QRegExp encodingExp(QLatin1String("^\\s*<\\?xml version="
"\"\\d\\.\\d\" encoding=\"([^\"]+)\"\\?>.*"));
- return encodingExp.exactMatch(content) ? encodingExp.cap(1) : QString();
+ return encodingExp.exactMatch(head) ? encodingExp.cap(1) : QString();
}
diff --git a/tools/assistant/lib/qhelpcollectionhandler.cpp b/tools/assistant/lib/qhelpcollectionhandler.cpp
index cb7e457b91..bd8dc20375 100644
--- a/tools/assistant/lib/qhelpcollectionhandler.cpp
+++ b/tools/assistant/lib/qhelpcollectionhandler.cpp
@@ -114,6 +114,9 @@ bool QHelpCollectionHandler::openCollectionFile()
return false;
}
+ m_query.exec(QLatin1String("PRAGMA synchronous=OFF"));
+ m_query.exec(QLatin1String("PRAGMA cache_size=3000"));
+
m_query.exec(QLatin1String("SELECT COUNT(*) FROM sqlite_master WHERE TYPE=\'table\'"
"AND Name=\'NamespaceTable\'"));
m_query.next();
@@ -163,6 +166,9 @@ bool QHelpCollectionHandler::copyCollectionFile(const QString &fileName)
return false;
}
+ copyQuery->exec(QLatin1String("PRAGMA synchronous=OFF"));
+ copyQuery->exec(QLatin1String("PRAGMA cache_size=3000"));
+
if (!createTables(copyQuery)) {
emit error(tr("Cannot copy collection file: %1").arg(colFile));
return false;
@@ -308,10 +314,8 @@ bool QHelpCollectionHandler::addCustomFilter(const QString &filterName,
m_query.prepare(QLatin1String("SELECT Id FROM FilterNameTable WHERE Name=?"));
m_query.bindValue(0, filterName);
m_query.exec();
- while (m_query.next()) {
+ if (m_query.next())
nameId = m_query.value(0).toInt();
- break;
- }
m_query.exec(QLatin1String("SELECT Id, Name FROM FilterAttributeTable"));
QStringList idsToInsert = attributes;
@@ -584,6 +588,8 @@ void QHelpCollectionHandler::optimizeDatabase(const QString &fileName)
}
QSqlQuery query(db);
+ db.exec(QLatin1String("PRAGMA synchronous=OFF"));
+ db.exec(QLatin1String("PRAGMA cache_size=3000"));
db.exec(QLatin1String("CREATE INDEX IF NOT EXISTS NameIndex ON IndexTable(Name)"));
db.exec(QLatin1String("CREATE INDEX IF NOT EXISTS FileNameIndex ON FileNameTable(Name)"));
db.exec(QLatin1String("CREATE INDEX IF NOT EXISTS FileIdIndex ON FileNameTable(FileId)"));
diff --git a/tools/assistant/lib/qhelpdbreader.cpp b/tools/assistant/lib/qhelpdbreader.cpp
index 6dd949afc2..5c0f595d72 100644
--- a/tools/assistant/lib/qhelpdbreader.cpp
+++ b/tools/assistant/lib/qhelpdbreader.cpp
@@ -205,7 +205,7 @@ QByteArray QHelpDBReader::fileData(const QString &virtualFolder,
"NamespaceTable d WHERE a.Id=b.FileId AND (b.Name=? OR b.Name=?) AND b.FolderId=c.Id "
"AND c.Name=? AND c.NamespaceId=d.Id AND d.Name=?"));
m_query->bindValue(0, filePath);
- m_query->bindValue(1, QLatin1String("./") + filePath);
+ m_query->bindValue(1, QString(QLatin1String("./") + filePath));
m_query->bindValue(2, virtualFolder);
m_query->bindValue(3, m_namespace);
m_query->exec();
diff --git a/tools/assistant/lib/qhelpenginecore.cpp b/tools/assistant/lib/qhelpenginecore.cpp
index 066e4d50d2..71306af38a 100644
--- a/tools/assistant/lib/qhelpenginecore.cpp
+++ b/tools/assistant/lib/qhelpenginecore.cpp
@@ -119,7 +119,7 @@ bool QHelpEngineCorePrivate::setup()
QHelpDBReader *reader = new QHelpDBReader(absFileName,
QHelpGlobal::uniquifyConnectionName(info.fileName, this), this);
if (!reader->init()) {
- emit q->warning(tr("Cannot open documentation file %1: %2!")
+ emit q->warning(QHelpEngineCore::tr("Cannot open documentation file %1: %2!")
.arg(absFileName, reader->errorMessage()));
continue;
}
@@ -406,8 +406,9 @@ QStringList QHelpEngineCore::customFilters() const
/*!
Adds the new custom filter \a filterName. The filter attributes
- are specified by \a attributes. The function returns false if
- the filter can not be added, e.g. when the filter already exists.
+ are specified by \a attributes. If the filter already exists,
+ its attribute set is replaced. The function returns true if
+ the operation succeeded, otherwise it returns false.
\sa customFilters(), removeCustomFilter()
*/
diff --git a/tools/assistant/lib/qhelpgenerator.cpp b/tools/assistant/lib/qhelpgenerator.cpp
index 4b94ebfff0..85bdd75e4f 100644
--- a/tools/assistant/lib/qhelpgenerator.cpp
+++ b/tools/assistant/lib/qhelpgenerator.cpp
@@ -47,6 +47,7 @@
#include <QtCore/QFileInfo>
#include <QtCore/QDir>
#include <QtCore/QDebug>
+#include <QtCore/QSet>
#include <QtCore/QVariant>
#include <QtCore/QDateTime>
#include <QtCore/QTextCodec>
@@ -190,6 +191,9 @@ bool QHelpGenerator::generate(QHelpDataInterface *helpData,
return false;
}
+ d->query->exec(QLatin1String("PRAGMA synchronous=OFF"));
+ d->query->exec(QLatin1String("PRAGMA cache_size=3000"));
+
addProgress(1.0);
createTables();
insertFileNotFoundFile();
@@ -537,7 +541,8 @@ bool QHelpGenerator::insertFiles(const QStringList &files, const QString &rootPa
}
int fileId = -1;
- if (!d->fileMap.contains(fileName)) {
+ QMap<QString, int>::Iterator fileMapIt = d->fileMap.find(fileName);
+ if (fileMapIt == d->fileMap.end()) {
fileDataList.append(qCompress(data));
fileNameData.name = fileName;
@@ -551,18 +556,20 @@ bool QHelpGenerator::insertFiles(const QStringList &files, const QString &rootPa
++tableFileId;
} else {
- fileId = d->fileMap.value(fileName);
+ fileId = fileMapIt.value();
+ QSet<int> &fileFilterSet = d->fileFilterMap[fileId];
+ QSet<int> &tmpFileFilterSet = tmpFileFilterMap[fileId];
foreach (const int &filter, filterAtts) {
- if (!d->fileFilterMap.value(fileId).contains(filter)
- && !tmpFileFilterMap.value(fileId).contains(filter)) {
- d->fileFilterMap[fileId].insert(filter);
- tmpFileFilterMap[fileId].insert(filter);
+ if (!fileFilterSet.contains(filter)
+ && !tmpFileFilterSet.contains(filter)) {
+ fileFilterSet.insert(filter);
+ tmpFileFilterSet.insert(filter);
}
}
}
}
- if (tmpFileFilterMap.count()) {
+ if (!tmpFileFilterMap.isEmpty()) {
d->query->exec(QLatin1String("BEGIN"));
QMap<int, QSet<int> >::const_iterator it = tmpFileFilterMap.constBegin();
while (it != tmpFileFilterMap.constEnd()) {
@@ -625,8 +632,7 @@ bool QHelpGenerator::registerCustomFilter(const QString &filterName,
while (d->query->next()) {
attributeMap.insert(d->query->value(1).toString(),
d->query->value(0).toInt());
- if (idsToInsert.contains(d->query->value(1).toString()))
- idsToInsert.removeAll(d->query->value(1).toString());
+ idsToInsert.removeAll(d->query->value(1).toString());
}
foreach (const QString &id, idsToInsert) {
@@ -674,7 +680,7 @@ bool QHelpGenerator::registerCustomFilter(const QString &filterName,
return true;
}
-bool QHelpGenerator::insertKeywords(const QList<QHelpDataIndexItem> keywords,
+bool QHelpGenerator::insertKeywords(const QList<QHelpDataIndexItem> &keywords,
const QStringList &filterAttributes)
{
if (!d->query)
@@ -704,7 +710,17 @@ bool QHelpGenerator::insertKeywords(const QList<QHelpDataIndexItem> keywords,
int i = 0;
d->query->exec(QLatin1String("BEGIN"));
+ QSet<QString> indices;
foreach (const QHelpDataIndexItem &itm, keywords) {
+
+ /*
+ * Identical ids make no sense and just confuse the Assistant user,
+ * so we ignore all repetitions.
+ */
+ if (indices.contains(itm.identifier))
+ continue;
+ indices.insert(itm.identifier);
+
pos = itm.reference.indexOf(QLatin1Char('#'));
fileName = itm.reference.left(pos);
if (pos > -1)
@@ -716,8 +732,9 @@ bool QHelpGenerator::insertKeywords(const QList<QHelpDataIndexItem> keywords,
if (fName.startsWith(QLatin1String("./")))
fName = fName.mid(2);
- if (d->fileMap.contains(fName))
- fileId = d->fileMap.value(fName);
+ QMap<QString, int>::ConstIterator it = d->fileMap.find(fName);
+ if (it != d->fileMap.end())
+ fileId = it.value();
else
fileId = 1;
@@ -749,7 +766,7 @@ bool QHelpGenerator::insertKeywords(const QList<QHelpDataIndexItem> keywords,
d->query->exec(QLatin1String("COMMIT"));
d->query->exec(QLatin1String("SELECT COUNT(Id) FROM IndexTable"));
- if (d->query->next() && d->query->value(0).toInt() >= keywords.count())
+ if (d->query->next() && d->query->value(0).toInt() >= indices.count())
return true;
return false;
}
@@ -824,4 +841,68 @@ bool QHelpGenerator::insertMetaData(const QMap<QString, QVariant> &metaData)
return true;
}
+bool QHelpGenerator::checkLinks(const QHelpDataInterface &helpData)
+{
+ /*
+ * Step 1: Gather the canoncal file paths of all files in the project.
+ * We use a set, because there will be a lot of look-ups.
+ */
+ QSet<QString> files;
+ foreach (const QHelpDataFilterSection &filterSection, helpData.filterSections()) {
+ foreach (const QString &file, filterSection.files()) {
+ QFileInfo fileInfo(helpData.rootPath() + QDir::separator() + file);
+ const QString &canonicalFileName = fileInfo.canonicalFilePath();
+ if (!fileInfo.exists())
+ emit warning(tr("File '%1' does not exist.").arg(file));
+ else
+ files.insert(canonicalFileName);
+ }
+ }
+
+ /*
+ * Step 2: Check the hypertext and image references of all HTML files.
+ * Note that we don't parse the files, but simply grep for the
+ * respective HTML elements. Therefore. contents that are e.g.
+ * commented out can cause false warning.
+ */
+ bool allLinksOk = true;
+ foreach (const QString &fileName, files) {
+ if (!fileName.endsWith(QLatin1String("html"))
+ && !fileName.endsWith(QLatin1String("htm")))
+ continue;
+ QFile htmlFile(fileName);
+ if (!htmlFile.open(QIODevice::ReadOnly)) {
+ emit warning(tr("File '%1' cannot be opened.").arg(fileName));
+ continue;
+ }
+ const QRegExp linkPattern(QLatin1String("<(?:a href|img src)=\"?([^#\">]+)[#\">]"));
+ QTextStream stream(&htmlFile);
+ const QString codec = QHelpGlobal::codecFromData(htmlFile.read(1000));
+ stream.setCodec(QTextCodec::codecForName(codec.toLatin1().constData()));
+ const QString &content = stream.readAll();
+ QStringList invalidLinks;
+ for (int pos = linkPattern.indexIn(content); pos != -1;
+ pos = linkPattern.indexIn(content, pos + 1)) {
+ const QString& linkedFileName = linkPattern.cap(1);
+ if (linkedFileName.contains(QLatin1String("://")))
+ continue;
+ const QString curDir = QFileInfo(fileName).dir().path();
+ const QString &canonicalLinkedFileName =
+ QFileInfo(curDir + QDir::separator() + linkedFileName).canonicalFilePath();
+ if (!files.contains(canonicalLinkedFileName)
+ && !invalidLinks.contains(canonicalLinkedFileName)) {
+ emit warning(tr("File '%1' contains an invalid link to file '%2'").
+ arg(fileName).arg(linkedFileName));
+ allLinksOk = false;
+ invalidLinks.append(canonicalLinkedFileName);
+ }
+ }
+ }
+
+ if (!allLinksOk)
+ d->error = tr("Invalid links in HTML files.");
+ return allLinksOk;
+}
+
QT_END_NAMESPACE
+
diff --git a/tools/assistant/lib/qhelpgenerator_p.h b/tools/assistant/lib/qhelpgenerator_p.h
index c589e25223..823a07a68a 100644
--- a/tools/assistant/lib/qhelpgenerator_p.h
+++ b/tools/assistant/lib/qhelpgenerator_p.h
@@ -74,6 +74,7 @@ public:
bool generate(QHelpDataInterface *helpData,
const QString &outputFileName);
+ bool checkLinks(const QHelpDataInterface &helpData);
QString error() const;
Q_SIGNALS:
@@ -96,7 +97,7 @@ private:
const QStringList &filterAttribs, bool forceUpdate = false);
bool registerVirtualFolder(const QString &folderName, const QString &ns);
bool insertFilterAttributes(const QStringList &attributes);
- bool insertKeywords(const QList<QHelpDataIndexItem> keywords,
+ bool insertKeywords(const QList<QHelpDataIndexItem> &keywords,
const QStringList &filterAttributes);
bool insertFiles(const QStringList &files, const QString &rootPath,
const QStringList &filterAttributes);
diff --git a/tools/assistant/lib/qhelpprojectdata.cpp b/tools/assistant/lib/qhelpprojectdata.cpp
index 869a44658d..83491a0713 100644
--- a/tools/assistant/lib/qhelpprojectdata.cpp
+++ b/tools/assistant/lib/qhelpprojectdata.cpp
@@ -41,6 +41,7 @@
#include "qhelpprojectdata_p.h"
+#include <QtCore/QCoreApplication>
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
#include <QtCore/QStack>
@@ -82,7 +83,7 @@ private:
void QHelpProjectDataPrivate::raiseUnknownTokenError()
{
- raiseError(QObject::tr("Unknown token."));
+ raiseError(QCoreApplication::translate("QHelpProject", "Unknown token."));
}
void QHelpProjectDataPrivate::readData(const QByteArray &contents)
@@ -95,12 +96,14 @@ void QHelpProjectDataPrivate::readData(const QByteArray &contents)
&& attributes().value(QLatin1String("version")) == QLatin1String("1.0"))
readProject();
else
- raiseError(QObject::tr("Unknown token. Expected \"QtHelpProject\"!"));
+ raiseError(QCoreApplication::translate("QHelpProject",
+ "Unknown token. Expected \"QtHelpProject\"!"));
}
}
if (hasError()) {
- raiseError(QObject::tr("Error in line %1: %2").arg(lineNumber())
+ raiseError(QCoreApplication::translate("QHelpProject",
+ "Error in line %1: %2").arg(lineNumber())
.arg(errorString()));
}
}
@@ -113,11 +116,15 @@ void QHelpProjectDataPrivate::readProject()
if (name() == QLatin1String("virtualFolder")) {
virtualFolder = readElementText();
if (virtualFolder.contains(QLatin1String("/")))
- raiseError(QObject::tr("A virtual folder must not contain a \'/\' character!"));
+ raiseError(QCoreApplication::translate("QHelpProject",
+ "A virtual folder must not contain "
+ "a \'/\' character!"));
} else if (name() == QLatin1String("namespace")) {
namespaceName = readElementText();
if (namespaceName.contains(QLatin1String("/")))
- raiseError(QObject::tr("A namespace must not contain a \'/\' character!"));
+ raiseError(QCoreApplication::translate("QHelpProject",
+ "A namespace must not contain a "
+ "\'/\' character!"));
} else if (name() == QLatin1String("customFilter")) {
readCustomFilter();
} else if (name() == QLatin1String("filterSection")) {
@@ -125,17 +132,21 @@ void QHelpProjectDataPrivate::readProject()
} else if (name() == QLatin1String("metaData")) {
QString n = attributes().value(QLatin1String("name")).toString();
if (!metaData.contains(n))
- metaData[n] = attributes().value(QLatin1String("value")).toString();
+ metaData[n]
+ = attributes().value(QLatin1String("value")).toString();
else
- metaData.insert(n, attributes().value(QLatin1String("value")).toString());
+ metaData.insert(n, attributes().
+ value(QLatin1String("value")).toString());
} else {
raiseUnknownTokenError();
}
} else if (isEndElement() && name() == QLatin1String("QtHelpProject")) {
if (namespaceName.isEmpty())
- raiseError(QObject::tr("Missing namespace in QtHelpProject."));
+ raiseError(QCoreApplication::translate("QHelpProject",
+ "Missing namespace in QtHelpProject."));
else if (virtualFolder.isEmpty())
- raiseError(QObject::tr("Missing virtual folder in QtHelpProject"));
+ raiseError(QCoreApplication::translate("QHelpProject",
+ "Missing virtual folder in QtHelpProject"));
break;
}
}
@@ -223,12 +234,14 @@ void QHelpProjectDataPrivate::readKeywords()
if (attributes().value(QLatin1String("ref")).toString().isEmpty()
|| (attributes().value(QLatin1String("name")).toString().isEmpty()
&& attributes().value(QLatin1String("id")).toString().isEmpty()))
- raiseError(QObject::tr("Missing attribute in keyword at line %1.")
- .arg(lineNumber()));
- filterSectionList.last().addIndex(
- QHelpDataIndexItem(attributes().value(QLatin1String("name")).toString(),
- attributes().value(QLatin1String("id")).toString(),
- attributes().value(QLatin1String("ref")).toString()));
+ raiseError(QCoreApplication::translate("QHelpProject",
+ "Missing attribute in keyword at line %1.")
+ .arg(lineNumber()));
+ filterSectionList.last()
+ .addIndex(QHelpDataIndexItem(attributes().
+ value(QLatin1String("name")).toString(),
+ attributes().value(QLatin1String("id")).toString(),
+ attributes().value(QLatin1String("ref")).toString()));
} else {
raiseUnknownTokenError();
}
@@ -346,8 +359,8 @@ bool QHelpProjectData::readData(const QString &fileName)
d->rootPath = QFileInfo(fileName).absolutePath();
QFile file(fileName);
if (!file.open(QIODevice::ReadOnly)) {
- d->errorMsg = QObject::tr("The input file %1 could not be opened!")
- .arg(fileName);
+ d->errorMsg = QCoreApplication::translate("QHelpProject",
+ "The input file %1 could not be opened!").arg(fileName);
return false;
}
diff --git a/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp b/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
index b0503617f0..c2274c4b00 100644
--- a/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
+++ b/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
@@ -39,16 +39,19 @@
**
****************************************************************************/
-#include "qhelpenginecore.h"
-#include "fulltextsearch/qsearchable_p.h"
-#include "fulltextsearch/qqueryparser_p.h"
#include "fulltextsearch/qindexreader_p.h"
+#include "fulltextsearch/qqueryparser_p.h"
+#include "fulltextsearch/qsearchable_p.h"
+#include "qclucenefieldnames_p.h"
+#include "qhelpenginecore.h"
+
#include "qhelpsearchindexreader_clucene_p.h"
#include <QtCore/QDir>
#include <QtCore/QSet>
#include <QtCore/QString>
#include <QtCore/QFileInfo>
+#include <QtCore/QSharedPointer>
#include <QtCore/QStringList>
#include <QtCore/QTextStream>
#include <QtCore/QMutexLocker>
@@ -107,64 +110,88 @@ void QHelpSearchIndexReaderClucene::run()
#if !defined(QT_NO_EXCEPTIONS)
try {
#endif
- QCLuceneBooleanQuery booleanQuery;
+ QCLuceneBooleanQuery booleanQueryTitle;
+ QCLuceneBooleanQuery booleanQueryContent;
QCLuceneStandardAnalyzer analyzer;
- if (!buildQuery(booleanQuery, queryList, analyzer)) {
+ const QStringList& attribList =
+ engine.filterAttributes(engine.currentFilter());
+ bool titleQueryIsValid = buildQuery(queryList, TitleTokenizedField,
+ attribList, booleanQueryTitle, analyzer);
+ bool contentQueryIsValid = buildQuery(queryList, ContentField,
+ attribList, booleanQueryContent, analyzer);
+ if (!titleQueryIsValid && !contentQueryIsValid) {
emit searchingFinished(0);
return;
}
- const QStringList attribList = engine.filterAttributes(engine.currentFilter());
- if (!attribList.isEmpty()) {
- QCLuceneQuery* query = QCLuceneQueryParser::parse(QLatin1String("+")
- + attribList.join(QLatin1String(" +")), QLatin1String("attribute"), analyzer);
+ QCLuceneIndexSearcher indexSearcher(indexPath);
- if (!query) {
+ // QCLuceneHits object must be allocated on the heap, because
+ // there is no default constructor.
+ QSharedPointer<QCLuceneHits> titleHits;
+ QSharedPointer<QCLuceneHits> contentHits;
+ if (titleQueryIsValid) {
+ titleHits = QSharedPointer<QCLuceneHits>(new QCLuceneHits(
+ indexSearcher.search(booleanQueryTitle)));
+ }
+ if (contentQueryIsValid) {
+ contentHits = QSharedPointer<QCLuceneHits>(new QCLuceneHits(
+ indexSearcher.search(booleanQueryContent)));
+ }
+ bool boost = true;
+ if ((titleHits.isNull() || titleHits->length() == 0)
+ && (contentHits.isNull() || contentHits->length() == 0)) {
+ booleanQueryTitle = QCLuceneBooleanQuery();
+ booleanQueryContent = QCLuceneBooleanQuery();
+ titleQueryIsValid =
+ buildTryHarderQuery(queryList, TitleTokenizedField,
+ attribList, booleanQueryTitle, analyzer);
+ contentQueryIsValid =
+ buildTryHarderQuery(queryList, ContentField, attribList,
+ booleanQueryContent, analyzer);
+ if (!titleQueryIsValid && !contentQueryIsValid) {
emit searchingFinished(0);
return;
}
- booleanQuery.add(query, true, true, false);
- }
-
- QCLuceneIndexSearcher indexSearcher(indexPath);
- QCLuceneHits hits = indexSearcher.search(booleanQuery);
-
- bool boost = true;
- QCLuceneBooleanQuery tryHarderQuery;
- if (hits.length() == 0) {
- if (buildTryHarderQuery(tryHarderQuery, queryList, analyzer)) {
- if (!attribList.isEmpty()) {
- QCLuceneQuery* query = QCLuceneQueryParser::parse(QLatin1String("+")
- + attribList.join(QLatin1String(" +")), QLatin1String("attribute"),
- analyzer);
- tryHarderQuery.add(query, true, true, false);
- }
- hits = indexSearcher.search(tryHarderQuery);
- boost = (hits.length() == 0);
+ if (titleQueryIsValid) {
+ titleHits = QSharedPointer<QCLuceneHits>(new QCLuceneHits(
+ indexSearcher.search(booleanQueryTitle)));
+ }
+ if (contentQueryIsValid) {
+ contentHits = QSharedPointer<QCLuceneHits>(new QCLuceneHits(
+ indexSearcher.search(booleanQueryContent)));
}
+ boost = false;
}
+ QList<QSharedPointer<QCLuceneHits> > cluceneHitsList;
+ if (!titleHits.isNull())
+ cluceneHitsList.append(titleHits);
+ if (!contentHits.isNull())
+ cluceneHitsList.append(contentHits);
QSet<QString> pathSet;
QCLuceneDocument document;
const QStringList namespaceList = engine.registeredDocumentations();
- for (qint32 i = 0; i < hits.length(); i++) {
- document = hits.document(i);
- const QString path = document.get(QLatin1String("path"));
- if (!pathSet.contains(path) && namespaceList.contains(
- document.get(QLatin1String("namespace")), Qt::CaseInsensitive)) {
- pathSet.insert(path);
- hitList.append(qMakePair(path, document.get(QLatin1String("title"))));
- }
- document.clear();
+ foreach (QSharedPointer<QCLuceneHits> hits, cluceneHitsList) {
+ for (qint32 i = 0; i < hits->length(); i++) {
+ document = hits->document(i);
+ const QString path = document.get(PathField);
+ if (!pathSet.contains(path) && namespaceList.contains(
+ document.get(NamespaceField), Qt::CaseInsensitive)) {
+ pathSet.insert(path);
+ hitList.append(qMakePair(path, document.get(TitleField)));
+ }
+ document.clear();
- mutex.lock();
- if (m_cancel) {
+ mutex.lock();
+ if (m_cancel) {
+ mutex.unlock();
+ emit searchingFinished(0);
+ return;
+ }
mutex.unlock();
- emit searchingFinished(0);
- return;
}
- mutex.unlock();
}
indexSearcher.close();
@@ -184,144 +211,205 @@ void QHelpSearchIndexReaderClucene::run()
}
}
-bool QHelpSearchIndexReaderClucene::defaultQuery(const QString &term, QCLuceneBooleanQuery &booleanQuery,
- QCLuceneStandardAnalyzer &analyzer)
+bool QHelpSearchIndexReaderClucene::buildQuery(
+ const QList<QHelpSearchQuery> &queries, const QString &fieldName,
+ const QStringList &filterAttributes, QCLuceneBooleanQuery &booleanQuery,
+ QCLuceneAnalyzer &analyzer)
{
- const QLatin1String c("content");
- const QLatin1String t("titleTokenized");
-
- QCLuceneQuery *query = QCLuceneQueryParser::parse(term, c, analyzer);
- QCLuceneQuery *query2 = QCLuceneQueryParser::parse(term, t, analyzer);
- if (query && query2) {
- booleanQuery.add(query, true, false, false);
- booleanQuery.add(query2, true, false, false);
- return true;
+ bool queryIsValid = false;
+ foreach (const QHelpSearchQuery &query, queries) {
+ if (fieldName != ContentField && isNegativeQuery(query)) {
+ queryIsValid = false;
+ break;
+ }
+ switch (query.fieldName) {
+ case QHelpSearchQuery::FUZZY:
+ if (addFuzzyQuery(query, fieldName, booleanQuery, analyzer))
+ queryIsValid = true;
+ break;
+ case QHelpSearchQuery::WITHOUT:
+ if (fieldName != ContentField)
+ return false;
+ if (addWithoutQuery(query, fieldName, booleanQuery))
+ queryIsValid = true;
+ break;
+ case QHelpSearchQuery::PHRASE:
+ if (addPhraseQuery(query, fieldName, booleanQuery))
+ queryIsValid = true;
+ break;
+ case QHelpSearchQuery::ALL:
+ if (addAllQuery(query, fieldName, booleanQuery))
+ queryIsValid = true;
+ break;
+ case QHelpSearchQuery::DEFAULT:
+ if (addDefaultQuery(query, fieldName, true, booleanQuery, analyzer))
+ queryIsValid = true;
+ break;
+ case QHelpSearchQuery::ATLEAST:
+ if (addAtLeastQuery(query, fieldName, booleanQuery, analyzer))
+ queryIsValid = true;
+ break;
+ default:
+ Q_ASSERT(!"Invalid field name");
+ }
}
- return false;
+ if (queryIsValid && !filterAttributes.isEmpty()) {
+ queryIsValid =
+ addAttributesQuery(filterAttributes, booleanQuery, analyzer);
+ }
+
+ return queryIsValid;
}
-bool QHelpSearchIndexReaderClucene::buildQuery(QCLuceneBooleanQuery &booleanQuery,
- const QList<QHelpSearchQuery> &queryList, QCLuceneStandardAnalyzer &analyzer)
+bool QHelpSearchIndexReaderClucene::buildTryHarderQuery(
+ const QList<QHelpSearchQuery> &queries, const QString &fieldName,
+ const QStringList &filterAttributes, QCLuceneBooleanQuery &booleanQuery,
+ QCLuceneAnalyzer &analyzer)
{
- foreach (const QHelpSearchQuery query, queryList) {
- switch (query.fieldName) {
- case QHelpSearchQuery::FUZZY: {
- const QLatin1String fuzzy("~");
- foreach (const QString &term, query.wordList) {
- if (term.isEmpty()
- || !defaultQuery(term.toLower() + fuzzy, booleanQuery, analyzer)) {
- return false;
- }
- }
- } break;
-
- case QHelpSearchQuery::WITHOUT: {
- QStringList stopWords = QCLuceneStopAnalyzer().englishStopWords();
- foreach (const QString &term, query.wordList) {
- if (stopWords.contains(term, Qt::CaseInsensitive))
- continue;
-
- QCLuceneQuery *query = new QCLuceneTermQuery(QCLuceneTerm(
- QLatin1String("content"), term.toLower()));
- QCLuceneQuery *query2 = new QCLuceneTermQuery(QCLuceneTerm(
- QLatin1String("titleTokenized"), term.toLower()));
-
- if (query && query2) {
- booleanQuery.add(query, true, false, true);
- booleanQuery.add(query2, true, false, true);
- } else {
- return false;
- }
- }
- } break;
-
- case QHelpSearchQuery::PHRASE: {
- const QString &term = query.wordList.at(0).toLower();
- if (term.contains(QLatin1Char(' '))) {
- QStringList termList = term.split(QLatin1String(" "));
- QCLucenePhraseQuery *q = new QCLucenePhraseQuery();
- QStringList stopWords = QCLuceneStopAnalyzer().englishStopWords();
- foreach (const QString &term, termList) {
- if (!stopWords.contains(term, Qt::CaseInsensitive))
- q->addTerm(QCLuceneTerm(QLatin1String("content"), term.toLower()));
- }
- booleanQuery.add(q, true, true, false);
- } else {
- QCLuceneQuery *query = new QCLuceneTermQuery(QCLuceneTerm(
- QLatin1String("content"), term.toLower()));
- QCLuceneQuery *query2 = new QCLuceneTermQuery(QCLuceneTerm(
- QLatin1String("titleTokenized"), term.toLower()));
-
- if (query && query2) {
- booleanQuery.add(query, true, true, false);
- booleanQuery.add(query2, true, false, false);
- } else {
- return false;
- }
- }
- } break;
+ if (queries.isEmpty())
+ return false;
+ const QHelpSearchQuery &query = queries.front();
+ if (query.fieldName != QHelpSearchQuery::DEFAULT)
+ return false;
+ if (isNegativeQuery(query))
+ return false;
+ if (!addDefaultQuery(query, fieldName, false, booleanQuery, analyzer))
+ return false;
+ if (filterAttributes.isEmpty())
+ return true;
+ return addAttributesQuery(filterAttributes, booleanQuery, analyzer);
+}
- case QHelpSearchQuery::ALL: {
- QStringList stopWords = QCLuceneStopAnalyzer().englishStopWords();
- foreach (const QString &term, query.wordList) {
- if (stopWords.contains(term, Qt::CaseInsensitive))
- continue;
+bool QHelpSearchIndexReaderClucene::isNegativeQuery(const QHelpSearchQuery &query) const
+{
+ const QString &search = query.wordList.join(" ");
+ return search.contains('!') || search.contains('-')
+ || search.contains(QLatin1String(" NOT "));
+}
- QCLuceneQuery *query = new QCLuceneTermQuery(QCLuceneTerm(
- QLatin1String("content"), term.toLower()));
+bool QHelpSearchIndexReaderClucene::addFuzzyQuery(const QHelpSearchQuery &query,
+ const QString &fieldName, QCLuceneBooleanQuery &booleanQuery,
+ QCLuceneAnalyzer &analyzer)
+{
+ bool queryIsValid = false;
+ const QLatin1String fuzzy("~");
+ foreach (const QString &term, query.wordList) {
+ if (!term.isEmpty()) {
+ QCLuceneQuery *lQuery =
+ QCLuceneQueryParser::parse(term + fuzzy, fieldName, analyzer);
+ if (lQuery != 0) {
+ booleanQuery.add(lQuery, true, false, false);
+ queryIsValid = true;
+ }
+ }
+ }
+ return queryIsValid;
+}
- if (query) {
- booleanQuery.add(query, true, true, false);
- } else {
- return false;
- }
- }
- } break;
+bool QHelpSearchIndexReaderClucene::addWithoutQuery(const QHelpSearchQuery &query,
+ const QString &fieldName, QCLuceneBooleanQuery &booleanQuery)
+{
+ bool queryIsValid = false;
+ const QStringList &stopWords = QCLuceneStopAnalyzer().englishStopWords();
+ foreach (const QString &term, query.wordList) {
+ if (stopWords.contains(term, Qt::CaseInsensitive))
+ continue;
+ QCLuceneQuery *lQuery = new QCLuceneTermQuery(QCLuceneTerm(
+ fieldName, term.toLower()));
+ booleanQuery.add(lQuery, true, false, true);
+ queryIsValid = true;
+ }
+ return queryIsValid;
+}
- case QHelpSearchQuery::DEFAULT: {
- foreach (const QString &term, query.wordList) {
- QCLuceneQuery *query = QCLuceneQueryParser::parse(term.toLower(),
- QLatin1String("content"), analyzer);
+bool QHelpSearchIndexReaderClucene::addPhraseQuery(const QHelpSearchQuery &query,
+ const QString &fieldName, QCLuceneBooleanQuery &booleanQuery)
+{
+ bool queryIsValid = false;
+ const QString &term = query.wordList.at(0).toLower();
+ if (term.contains(QLatin1Char(' '))) {
+ const QStringList termList = term.split(QLatin1String(" "));
+ QCLucenePhraseQuery *q = new QCLucenePhraseQuery();
+ const QStringList stopWords = QCLuceneStopAnalyzer().englishStopWords();
+ foreach (const QString &term, termList) {
+ if (!stopWords.contains(term, Qt::CaseInsensitive))
+ q->addTerm(QCLuceneTerm(fieldName, term.toLower()));
+ }
+ if (!q->getTerms().isEmpty()) {
+ booleanQuery.add(q, true, true, false);
+ queryIsValid = true;
+ }
+ } else {
+ QCLuceneQuery *lQuery = new QCLuceneTermQuery(QCLuceneTerm(
+ fieldName, term.toLower()));
+ booleanQuery.add(lQuery, true, true, false);
+ queryIsValid = true;
+ }
+ return queryIsValid;
+}
- if (query)
- booleanQuery.add(query, true, true, false);
- }
- } break;
+bool QHelpSearchIndexReaderClucene::addAllQuery(const QHelpSearchQuery &query,
+ const QString &fieldName, QCLuceneBooleanQuery &booleanQuery)
+{
+ bool queryIsValid = false;
+ const QStringList &stopWords = QCLuceneStopAnalyzer().englishStopWords();
+ foreach (const QString &term, query.wordList) {
+ if (stopWords.contains(term, Qt::CaseInsensitive))
+ continue;
+ QCLuceneQuery *lQuery = new QCLuceneTermQuery(QCLuceneTerm(
+ fieldName, term.toLower()));
+ booleanQuery.add(lQuery, true, true, false);
+ queryIsValid = true;
+ }
+ return queryIsValid;
+}
- case QHelpSearchQuery::ATLEAST: {
- foreach (const QString &term, query.wordList) {
- if (term.isEmpty() || !defaultQuery(term.toLower(), booleanQuery, analyzer))
- return false;
- }
- }
+bool QHelpSearchIndexReaderClucene::addDefaultQuery(const QHelpSearchQuery &query,
+ const QString &fieldName, bool allTermsRequired,
+ QCLuceneBooleanQuery &booleanQuery,
+ QCLuceneAnalyzer &analyzer)
+{
+ bool queryIsValid = false;
+ foreach (const QString &term, query.wordList) {
+ QCLuceneQuery *lQuery =
+ QCLuceneQueryParser::parse(term.toLower(), fieldName, analyzer);
+ if (lQuery) {
+ booleanQuery.add(lQuery, true, allTermsRequired, false);
+ queryIsValid = true;
}
}
-
- return true;
+ return queryIsValid;
}
-bool QHelpSearchIndexReaderClucene::buildTryHarderQuery(QCLuceneBooleanQuery &booleanQuery,
- const QList<QHelpSearchQuery> &queryList, QCLuceneStandardAnalyzer &analyzer)
+bool QHelpSearchIndexReaderClucene::addAtLeastQuery(
+ const QHelpSearchQuery &query, const QString &fieldName,
+ QCLuceneBooleanQuery &booleanQuery, QCLuceneAnalyzer &analyzer)
{
- bool retVal = false;
- foreach (const QHelpSearchQuery query, queryList) {
- switch (query.fieldName) {
- default: break;
- case QHelpSearchQuery::DEFAULT: {
- foreach (const QString &term, query.wordList) {
- QCLuceneQuery *query = QCLuceneQueryParser::parse(term.toLower(),
- QLatin1String("content"), analyzer);
-
- if (query) {
- retVal = true;
- booleanQuery.add(query, true, false, false);
- }
- }
- } break;
+ bool queryIsValid = false;
+ foreach (const QString &term, query.wordList) {
+ if (!term.isEmpty()) {
+ QCLuceneQuery *lQuery =
+ QCLuceneQueryParser::parse(term, fieldName, analyzer);
+ if (lQuery) {
+ booleanQuery.add(lQuery, true, false, false);
+ queryIsValid = true;
+ }
}
}
- return retVal;
+ return queryIsValid;
+}
+
+bool QHelpSearchIndexReaderClucene::addAttributesQuery(
+ const QStringList &filterAttributes, QCLuceneBooleanQuery &booleanQuery,
+ QCLuceneAnalyzer &analyzer)
+{
+ QCLuceneQuery* lQuery = QCLuceneQueryParser::parse(QLatin1String("+")
+ + filterAttributes.join(QLatin1String(" +")), AttributeField, analyzer);
+ if (!lQuery)
+ return false;
+ booleanQuery.add(lQuery, true, true, false);
+ return true;
}
void QHelpSearchIndexReaderClucene::boostSearchHits(const QHelpEngineCore &engine,
@@ -335,21 +423,22 @@ void QHelpSearchIndexReaderClucene::boostSearchHits(const QHelpEngineCore &engin
QCLuceneStandardAnalyzer analyzer;
QCLuceneQuery *parsedQuery = QCLuceneQueryParser::parse(
- joinedQuery, QLatin1String("content"), analyzer);
+ joinedQuery, ContentField, analyzer);
if (parsedQuery) {
joinedQuery = parsedQuery->toString();
delete parsedQuery;
}
- int length = QString(QLatin1String("content:")).length();
- int index = joinedQuery.indexOf(QLatin1String("content:"));
+ const QString contentString(ContentField + QLatin1String(":"));
+ int length = contentString.length();
+ int index = joinedQuery.indexOf(contentString);
QString term;
int nextIndex = 0;
QStringList searchTerms;
while (index != -1) {
- nextIndex = joinedQuery.indexOf(QLatin1String("content:"), index + 1);
+ nextIndex = joinedQuery.indexOf(contentString, index + 1);
term = joinedQuery.mid(index + length, nextIndex - (length + index)).simplified();
if (term.startsWith(QLatin1String("\""))
&& term.endsWith(QLatin1String("\""))) {
diff --git a/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h b/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h
index 8f51cb115e..7f537338ce 100644
--- a/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h
+++ b/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h
@@ -53,10 +53,13 @@
// We mean it.
//
-#include "qhelpsearchindexreader_p.h"
+#include <QtCore/QList>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
#include "fulltextsearch/qanalyzer_p.h"
#include "fulltextsearch/qquery_p.h"
+#include "qhelpsearchindexreader_p.h"
QT_BEGIN_NAMESPACE
@@ -73,14 +76,34 @@ public:
private:
void run();
- bool defaultQuery(const QString &term, QCLuceneBooleanQuery &booleanQuery,
- QCLuceneStandardAnalyzer &analyzer);
- bool buildQuery(QCLuceneBooleanQuery &booleanQuery, const QList<QHelpSearchQuery> &queryList,
- QCLuceneStandardAnalyzer &analyzer);
- bool buildTryHarderQuery(QCLuceneBooleanQuery &booleanQuery,
- const QList<QHelpSearchQuery> &queryList, QCLuceneStandardAnalyzer &analyzer);
void boostSearchHits(const QHelpEngineCore &engine, QList<QHelpSearchEngine::SearchHit> &hitList,
const QList<QHelpSearchQuery> &queryList);
+ bool buildQuery(const QList<QHelpSearchQuery> &queries,
+ const QString &fieldName,
+ const QStringList &filterAttributes,
+ QCLuceneBooleanQuery &booleanQuery,
+ QCLuceneAnalyzer &analyzer);
+ bool buildTryHarderQuery(const QList<QHelpSearchQuery> &queries,
+ const QString &fieldName,
+ const QStringList &filterAttributes,
+ QCLuceneBooleanQuery &booleanQuery,
+ QCLuceneAnalyzer &analyzer);
+ bool addFuzzyQuery(const QHelpSearchQuery &query, const QString &fieldName,
+ QCLuceneBooleanQuery &booleanQuery, QCLuceneAnalyzer &analyzer);
+ bool addWithoutQuery(const QHelpSearchQuery &query, const QString &fieldName,
+ QCLuceneBooleanQuery &booleanQuery);
+ bool addPhraseQuery(const QHelpSearchQuery &query, const QString &fieldName,
+ QCLuceneBooleanQuery &booleanQuery);
+ bool addAllQuery(const QHelpSearchQuery &query, const QString &fieldName,
+ QCLuceneBooleanQuery &booleanQuery);
+ bool addDefaultQuery(const QHelpSearchQuery &query, const QString &fieldName,
+ bool allTermsRequired, QCLuceneBooleanQuery &booleanQuery,
+ QCLuceneAnalyzer &analyzer);
+ bool addAtLeastQuery(const QHelpSearchQuery &query, const QString &fieldName,
+ QCLuceneBooleanQuery &booleanQuery, QCLuceneAnalyzer &analyzer);
+ bool addAttributesQuery(const QStringList &filterAttributes,
+ QCLuceneBooleanQuery &booleanQuery, QCLuceneAnalyzer &analyzer);
+ bool isNegativeQuery(const QHelpSearchQuery &query) const;
};
} // namespace clucene
diff --git a/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp b/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
index 4f9fa3fbea..4baa376800 100644
--- a/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
+++ b/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
@@ -39,6 +39,7 @@
**
****************************************************************************/
+#include "qclucenefieldnames_p.h"
#include "qhelpenginecore.h"
#include "qhelp_global.h"
#include "fulltextsearch/qhits_p.h"
@@ -406,17 +407,17 @@ public:
QString parsedTitle = QHelpGlobal::documentTitle(data);
if(!parsedData.isEmpty()) {
- document->add(new QCLuceneField(QLatin1String("content"),
+ document->add(new QCLuceneField(ContentField,
parsedData,QCLuceneField::INDEX_TOKENIZED));
- document->add(new QCLuceneField(QLatin1String("path"), fileName,
+ document->add(new QCLuceneField(PathField, fileName,
QCLuceneField::STORE_YES | QCLuceneField::INDEX_UNTOKENIZED));
- document->add(new QCLuceneField(QLatin1String("title"), parsedTitle,
+ document->add(new QCLuceneField(TitleField, parsedTitle,
QCLuceneField::STORE_YES | QCLuceneField::INDEX_UNTOKENIZED));
- document->add(new QCLuceneField(QLatin1String("titleTokenized"), parsedTitle,
+ document->add(new QCLuceneField(TitleTokenizedField, parsedTitle,
QCLuceneField::STORE_YES | QCLuceneField::INDEX_TOKENIZED));
- document->add(new QCLuceneField(QLatin1String("namespace"), namespaceName,
+ document->add(new QCLuceneField(NamespaceField, namespaceName,
QCLuceneField::STORE_YES | QCLuceneField::INDEX_UNTOKENIZED));
- document->add(new QCLuceneField(QLatin1String("attribute"), attributes,
+ document->add(new QCLuceneField(AttributeField, attributes,
QCLuceneField::STORE_YES | QCLuceneField::INDEX_TOKENIZED));
return true;
}
@@ -715,9 +716,7 @@ void QHelpSearchIndexWriter::run()
if (indexMap.contains(namespaceName)) {
// make sure we really have content indexed for namespace
- // NOTE: Extra variable just for GCC 3.3.5
- QLatin1String key("namespace");
- QCLuceneTermQuery query(QCLuceneTerm(key, namespaceName));
+ QCLuceneTermQuery query(QCLuceneTerm(NamespaceField, namespaceName));
QCLuceneIndexSearcher indexSearcher(indexPath);
QCLuceneHits hits = indexSearcher.search(query);
if (hits.length() <= 0)
@@ -851,8 +850,7 @@ void QHelpSearchIndexWriter::removeDocuments(const QString &indexPath,
return;
QCLuceneIndexReader reader = QCLuceneIndexReader::open(indexPath);
- reader.deleteDocuments(QCLuceneTerm(QLatin1String("namespace"),
- namespaceName));
+ reader.deleteDocuments(QCLuceneTerm(NamespaceField, namespaceName));
reader.close();
}
diff --git a/tools/assistant/lib/qhelpsearchquerywidget.cpp b/tools/assistant/lib/qhelpsearchquerywidget.cpp
index 3c3919e660..1634a0dd7f 100644
--- a/tools/assistant/lib/qhelpsearchquerywidget.cpp
+++ b/tools/assistant/lib/qhelpsearchquerywidget.cpp
@@ -41,8 +41,6 @@
#include "qhelpsearchquerywidget.h"
-#include <QtCore/QDebug>
-
#include <QtCore/QAbstractListModel>
#include <QtCore/QObject>
#include <QtCore/QStringList>
@@ -101,8 +99,9 @@ private:
};
QHelpSearchQueryWidgetPrivate()
- : QObject(), simpleSearch(true),
- searchCompleter(new CompleterModel(this), this)
+ : QObject()
+ , simpleSearch(true)
+ , searchCompleter(new CompleterModel(this), this)
{
searchButton = 0;
advancedSearchWidget = 0;
@@ -136,33 +135,6 @@ private:
#endif
}
- QString escapeString(const QString &text)
- {
- QString retValue = text;
- const QString escape(QLatin1String("\\"));
- QStringList escapableCharsList;
- escapableCharsList << QLatin1String("\\") << QLatin1String("+")
- << QLatin1String("-") << QLatin1String("!") << QLatin1String("(")
- << QLatin1String(")") << QLatin1String(":") << QLatin1String("^")
- << QLatin1String("[") << QLatin1String("]") << QLatin1String("{")
- << QLatin1String("}") << QLatin1String("~");
-
- // make sure we won't end up with an empty string
- foreach (const QString &escapeChar, escapableCharsList) {
- if (retValue.contains(escapeChar))
- retValue.replace(escapeChar, QLatin1String(""));
- }
- if (retValue.trimmed().isEmpty())
- return retValue;
-
- retValue = text; // now really escape the string...
- foreach (const QString &escapeChar, escapableCharsList) {
- if (retValue.contains(escapeChar))
- retValue.replace(escapeChar, escape + escapeChar);
- }
- return retValue;
- }
-
QStringList buildTermList(const QString query)
{
bool s = false;
@@ -222,8 +194,8 @@ private:
}
}
- void nextOrPrevQuery(int maxOrMinIndex, int addend,
- QToolButton *thisButton, QToolButton *otherButton)
+ void nextOrPrevQuery(int maxOrMinIndex, int addend, QToolButton *thisButton,
+ QToolButton *otherButton)
{
QueryHistory *queryHist;
QList<QLineEdit *> lineEdits;
@@ -233,7 +205,7 @@ private:
} else {
queryHist = &complexQueries;
lineEdits << allQuery << atLeastQuery << similarQuery
- << withoutQuery << exactQuery;
+ << withoutQuery << exactQuery;
}
foreach (QLineEdit *lineEdit, lineEdits)
lineEdit->clear();
@@ -278,11 +250,11 @@ private:
void enableOrDisableToolButtons()
{
- const QueryHistory &queryHist =
- simpleSearch ? simpleQueries : complexQueries;
+ const QueryHistory &queryHist = simpleSearch ? simpleQueries
+ : complexQueries;
prevQueryButton->setEnabled(queryHist.curQuery > 0);
- nextQueryButton->setEnabled(queryHist.curQuery <
- queryHist.queries.size() - 1);
+ nextQueryButton->setEnabled(queryHist.curQuery
+ < queryHist.queries.size() - 1);
}
private slots:
@@ -306,41 +278,45 @@ private slots:
QList<QHelpSearchQuery> queryList;
#if !defined(QT_CLUCENE_SUPPORT)
queryList.append(QHelpSearchQuery(QHelpSearchQuery::DEFAULT,
- QStringList(defaultQuery->text())));
+ QStringList(defaultQuery->text())));
#else
if (defaultQuery->isEnabled()) {
queryList.append(QHelpSearchQuery(QHelpSearchQuery::DEFAULT,
- buildTermList(escapeString(defaultQuery->text()))));
+ buildTermList(defaultQuery->text())));
} else {
const QRegExp exp(QLatin1String("\\s+"));
- QStringList lst = similarQuery->text().split(exp, QString::SkipEmptyParts);
+ QStringList lst = similarQuery->text().split(exp,
+ QString::SkipEmptyParts);
if (!lst.isEmpty()) {
QStringList fuzzy;
foreach (const QString &term, lst)
- fuzzy += buildTermList(escapeString(term));
- queryList.append(QHelpSearchQuery(QHelpSearchQuery::FUZZY, fuzzy));
+ fuzzy += buildTermList(term);
+ queryList.append(QHelpSearchQuery(QHelpSearchQuery::FUZZY,
+ fuzzy));
}
lst = withoutQuery->text().split(exp, QString::SkipEmptyParts);
if (!lst.isEmpty()) {
QStringList without;
foreach (const QString &term, lst)
- without.append(escapeString(term));
- queryList.append(QHelpSearchQuery(QHelpSearchQuery::WITHOUT, without));
+ without.append(term);
+ queryList.append(QHelpSearchQuery(QHelpSearchQuery::WITHOUT,
+ without));
}
if (!exactQuery->text().isEmpty()) {
QString phrase = exactQuery->text().remove(QLatin1Char('\"'));
- phrase = escapeString(phrase.simplified());
- queryList.append(QHelpSearchQuery(QHelpSearchQuery::PHRASE, QStringList(phrase)));
+ phrase = phrase.simplified();
+ queryList.append(QHelpSearchQuery(QHelpSearchQuery::PHRASE,
+ QStringList(phrase)));
}
lst = allQuery->text().split(exp, QString::SkipEmptyParts);
if (!lst.isEmpty()) {
QStringList all;
foreach (const QString &term, lst)
- all.append(escapeString(term));
+ all.append(term);
queryList.append(QHelpSearchQuery(QHelpSearchQuery::ALL, all));
}
@@ -348,8 +324,9 @@ private slots:
if (!lst.isEmpty()) {
QStringList atLeast;
foreach (const QString &term, lst)
- atLeast += buildTermList(escapeString(term));
- queryList.append(QHelpSearchQuery(QHelpSearchQuery::ATLEAST, atLeast));
+ atLeast += buildTermList(term);
+ queryList.append(QHelpSearchQuery(QHelpSearchQuery::ATLEAST,
+ atLeast));
}
}
#endif
@@ -363,8 +340,9 @@ private slots:
void nextQuery()
{
- nextOrPrevQuery((simpleSearch ? simpleQueries : complexQueries).queries.size() - 1,
- 1, nextQueryButton, prevQueryButton);
+ nextOrPrevQuery((simpleSearch ? simpleQueries
+ : complexQueries).queries.size() - 1, 1, nextQueryButton,
+ prevQueryButton);
}
void prevQuery()
@@ -415,8 +393,9 @@ private:
\fn void QHelpSearchQueryWidget::search()
This signal is emitted when a the user has the search button invoked.
- After reciving the signal you can ask the QHelpSearchQueryWidget for the build list
- of QHelpSearchQuery's that you may pass to the QHelpSearchEngine's search() function.
+ After reciving the signal you can ask the QHelpSearchQueryWidget for the
+ build list of QHelpSearchQuery's that you may pass to the QHelpSearchEngine's
+ search() function.
*/
/*!
@@ -544,7 +523,8 @@ QList<QHelpSearchQuery> QHelpSearchQueryWidget::query() const
QList<QHelpSearchQuery>() : queryHist.queries.last();
}
-/*! \reimp
+/*!
+ \reimp
*/
void QHelpSearchQueryWidget::focusInEvent(QFocusEvent *focusEvent)
{
diff --git a/tools/assistant/lib/qhelpsearchresultwidget.cpp b/tools/assistant/lib/qhelpsearchresultwidget.cpp
index ad540c601b..2f5489b37c 100644
--- a/tools/assistant/lib/qhelpsearchresultwidget.cpp
+++ b/tools/assistant/lib/qhelpsearchresultwidget.cpp
@@ -304,7 +304,7 @@ private:
last = resultLastToShow > count ? count : resultLastToShow;
}
}
- hitsLabel->setText(tr("%1 - %2 of %3 Hits").arg(first).arg(last).arg(count));
+ hitsLabel->setText(QHelpSearchResultWidget::tr("%1 - %2 of %n Hits", 0, count).arg(first).arg(last));
}
private:
diff --git a/tools/assistant/tools/assistant/aboutdialog.cpp b/tools/assistant/tools/assistant/aboutdialog.cpp
index 0ab8659c01..a9bc352806 100644
--- a/tools/assistant/tools/assistant/aboutdialog.cpp
+++ b/tools/assistant/tools/assistant/aboutdialog.cpp
@@ -38,6 +38,8 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include "helpviewer.h"
+#include "tracer.h"
#include <QtCore/QBuffer>
@@ -56,6 +58,7 @@ QT_BEGIN_NAMESPACE
AboutLabel::AboutLabel(QWidget *parent)
: QTextBrowser(parent)
{
+ TRACE_OBJ
setFrameStyle(QFrame::NoFrame);
QPalette p;
p.setColor(QPalette::Base, p.color(QPalette::Background));
@@ -64,14 +67,16 @@ AboutLabel::AboutLabel(QWidget *parent)
void AboutLabel::setText(const QString &text, const QByteArray &resources)
{
+ TRACE_OBJ
QDataStream in(resources);
in >> m_resourceMap;
-
+
QTextBrowser::setText(text);
}
QSize AboutLabel::minimumSizeHint() const
{
+ TRACE_OBJ
QTextDocument *doc = document();
doc->adjustSize();
return QSize(int(doc->size().width()), int(doc->size().height()));
@@ -79,6 +84,7 @@ QSize AboutLabel::minimumSizeHint() const
QVariant AboutLabel::loadResource(int type, const QUrl &name)
{
+ TRACE_OBJ
if (type == 2 || type == 3) {
if (m_resourceMap.contains(name.toString())) {
return m_resourceMap.value(name.toString());
@@ -89,44 +95,47 @@ QVariant AboutLabel::loadResource(int type, const QUrl &name)
void AboutLabel::setSource(const QUrl &url)
{
- if (url.isValid()
- && (url.scheme() == QLatin1String("http") || url.scheme() == QLatin1String("ftp")
- || url.scheme() == QLatin1String("mailto") || url.path().endsWith(QLatin1String("pdf")))) {
+ TRACE_OBJ
+ if (url.isValid() && (!AbstractHelpViewer::isLocalUrl(url)
+ || !AbstractHelpViewer::canOpenPage(url.path()))) {
if (!QDesktopServices::openUrl(url)) {
QMessageBox::warning(this, tr("Warning"),
- tr("Unable to launch external application.\n"),
- tr("OK"));
+ tr("Unable to launch external application.\n"), tr("OK"));
}
}
}
AboutDialog::AboutDialog(QWidget *parent)
- : QDialog(parent, Qt::MSWindowsFixedSizeDialogHint|Qt::WindowTitleHint|Qt::WindowSystemMenuHint)
+ : QDialog(parent, Qt::MSWindowsFixedSizeDialogHint |
+ Qt::WindowTitleHint|Qt::WindowSystemMenuHint)
{
+ TRACE_OBJ
m_pixmapLabel = 0;
m_aboutLabel = new AboutLabel();
-
+
m_closeButton = new QPushButton();
m_closeButton->setText(tr("&Close"));
- connect(m_closeButton, SIGNAL(clicked()),
- this, SLOT(close()));
+ connect(m_closeButton, SIGNAL(clicked()), this, SLOT(close()));
m_layout = new QGridLayout(this);
m_layout->addWidget(m_aboutLabel, 1, 0, 1, -1);
- m_layout->addItem(new QSpacerItem(20, 10, QSizePolicy::Minimum, QSizePolicy::Fixed), 2, 1, 1, 1);
+ m_layout->addItem(new QSpacerItem(20, 10, QSizePolicy::Minimum,
+ QSizePolicy::Fixed), 2, 1, 1, 1);
m_layout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding), 3, 0, 1, 1);
m_layout->addWidget(m_closeButton, 3, 1, 1, 1);
- m_layout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding), 3, 2, 1, 1);
+ m_layout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding), 3, 2, 1, 1);
}
void AboutDialog::setText(const QString &text, const QByteArray &resources)
{
+ TRACE_OBJ
m_aboutLabel->setText(text, resources);
updateSize();
}
void AboutDialog::setPixmap(const QPixmap &pixmap)
{
+ TRACE_OBJ
if (!m_pixmapLabel) {
m_pixmapLabel = new QLabel();
m_layout->addWidget(m_pixmapLabel, 0, 0, 1, -1, Qt::AlignCenter);
@@ -137,12 +146,15 @@ void AboutDialog::setPixmap(const QPixmap &pixmap)
QString AboutDialog::documentTitle() const
{
+ TRACE_OBJ
return m_aboutLabel->documentTitle();
}
void AboutDialog::updateSize()
{
- QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size();
+ TRACE_OBJ
+ QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos())
+ .size();
int limit = qMin(screenSize.width()/2, 500);
#ifdef Q_WS_MAC
@@ -154,7 +166,7 @@ void AboutDialog::updateSize()
if (width > limit)
width = limit;
-
+
QFontMetrics fm(qApp->font("QWorkspaceTitleBar"));
int windowTitleWidth = qMin(fm.width(windowTitle()) + 50, limit);
if (windowTitleWidth > width)
@@ -162,8 +174,8 @@ void AboutDialog::updateSize()
layout()->activate();
int height = (layout()->hasHeightForWidth())
- ? layout()->totalHeightForWidth(width)
- : layout()->totalMinimumSize().height();
+ ? layout()->totalHeightForWidth(width)
+ : layout()->totalMinimumSize().height();
setFixedSize(width, height);
QCoreApplication::removePostedEvents(this, QEvent::LayoutRequest);
}
diff --git a/tools/assistant/tools/assistant/assistant.pro b/tools/assistant/tools/assistant/assistant.pro
index 1a7e874b02..bc4d495d5a 100644
--- a/tools/assistant/tools/assistant/assistant.pro
+++ b/tools/assistant/tools/assistant/assistant.pro
@@ -1,71 +1,94 @@
include($$QT_SOURCE_TREE/tools/shared/fontpanel/fontpanel.pri)
-
TEMPLATE = app
LANGUAGE = C++
TARGET = assistant
-
-contains(QT_CONFIG, webkit) {
- QT += webkit
-}
-
-CONFIG += qt warn_on help
-
+contains(QT_CONFIG, webkit):QT += webkit
+CONFIG += qt \
+ warn_on \
+ help
QT += network
-
PROJECTNAME = Assistant
DESTDIR = ../../../../bin
-
-target.path=$$[QT_INSTALL_BINS]
+target.path = $$[QT_INSTALL_BINS]
INSTALLS += target
+DEPENDPATH += ../shared
-### Work around a qmake issue when statically linking to
-### not-yet-installed plugins
+# ## Work around a qmake issue when statically linking to
+# ## not-yet-installed plugins
LIBS += -L$$QT_BUILD_TREE/plugins/sqldrivers
+HEADERS += aboutdialog.h \
+ bookmarkdialog.h \
+ bookmarkfiltermodel.h \
+ bookmarkitem.h \
+ bookmarkmanager.h \
+ bookmarkmanagerwidget.h \
+ bookmarkmodel.h \
+ centralwidget.h \
+ cmdlineparser.h \
+ contentwindow.h \
+ findwidget.h \
+ filternamedialog.h \
+ helpenginewrapper.h \
+ helpviewer.h \
+ indexwindow.h \
+ installdialog.h \
+ mainwindow.h \
+ preferencesdialog.h \
+ qtdocinstaller.h \
+ remotecontrol.h \
+ searchwidget.h \
+ topicchooser.h \
+ tracer.h \
+ xbelsupport.h \
+ ../shared/collectionconfiguration.h
+contains(QT_CONFIG, webkit) {
+ HEADERS += helpviewer_qwv.h
+} else {
+ HEADERS += helpviewer_qtb.h
+ }
+win32:HEADERS += remotecontrol_win.h
-HEADERS += helpviewer.h \
- mainwindow.h \
- indexwindow.h \
- topicchooser.h \
- contentwindow.h \
- searchwidget.h \
- preferencesdialog.h \
- filternamedialog.h \
- centralwidget.h \
- installdialog.h \
- bookmarkmanager.h \
- remotecontrol.h \
- cmdlineparser.h \
- aboutdialog.h \
- qtdocinstaller.h
-
-win32 {
- HEADERS += remotecontrol_win.h
+SOURCES += aboutdialog.cpp \
+ bookmarkdialog.cpp \
+ bookmarkfiltermodel.cpp \
+ bookmarkitem.cpp \
+ bookmarkmanager.cpp \
+ bookmarkmanagerwidget.cpp \
+ bookmarkmodel.cpp \
+ centralwidget.cpp \
+ cmdlineparser.cpp \
+ contentwindow.cpp \
+ findwidget.cpp \
+ filternamedialog.cpp \
+ helpenginewrapper.cpp \
+ helpviewer.cpp \
+ indexwindow.cpp \
+ installdialog.cpp \
+ main.cpp \
+ mainwindow.cpp \
+ preferencesdialog.cpp \
+ qtdocinstaller.cpp \
+ remotecontrol.cpp \
+ searchwidget.cpp \
+ topicchooser.cpp \
+ xbelsupport.cpp \
+ ../shared/collectionconfiguration.cpp
+ contains(QT_CONFIG, webkit) {
+ SOURCES += helpviewer_qwv.cpp
+} else {
+ SOURCES += helpviewer_qtb.cpp
}
-SOURCES += helpviewer.cpp \
- main.cpp \
- mainwindow.cpp \
- indexwindow.cpp \
- topicchooser.cpp \
- contentwindow.cpp \
- searchwidget.cpp \
- preferencesdialog.cpp \
- filternamedialog.cpp \
- centralwidget.cpp \
- installdialog.cpp \
- bookmarkmanager.cpp \
- remotecontrol.cpp \
- cmdlineparser.cpp \
- aboutdialog.cpp \
- qtdocinstaller.cpp
-
-FORMS += topicchooser.ui \
- preferencesdialog.ui \
- filternamedialog.ui \
- installdialog.ui \
- bookmarkdialog.ui
+FORMS += bookmarkdialog.ui \
+ bookmarkmanagerwidget.ui \
+ bookmarkwidget.ui \
+ filternamedialog.ui \
+ installdialog.ui \
+ preferencesdialog.ui \
+ topicchooser.ui
-RESOURCES += assistant.qrc assistant_images.qrc
+RESOURCES += assistant.qrc \
+ assistant_images.qrc
win32 {
!wince*:LIBS += -lshell32
diff --git a/tools/assistant/tools/assistant/assistant.qch b/tools/assistant/tools/assistant/assistant.qch
index 78fe9f3172..e6d52997b2 100644
--- a/tools/assistant/tools/assistant/assistant.qch
+++ b/tools/assistant/tools/assistant/assistant.qch
Binary files differ
diff --git a/tools/assistant/tools/assistant/assistant_images.qrc b/tools/assistant/tools/assistant/assistant_images.qrc
index 58e03b54dd..34918c0bfb 100644
--- a/tools/assistant/tools/assistant/assistant_images.qrc
+++ b/tools/assistant/tools/assistant/assistant_images.qrc
@@ -4,6 +4,7 @@
<file>images/assistant-128.png</file>
<file>images/assistant.png</file>
<file>images/wrap.png</file>
+ <file>images/bookmark.png</file>
#mac
<file>images/mac/addtab.png</file>
<file>images/mac/book.png</file>
diff --git a/tools/assistant/tools/assistant/bookmarkdialog.cpp b/tools/assistant/tools/assistant/bookmarkdialog.cpp
new file mode 100644
index 0000000000..8b195c1b2a
--- /dev/null
+++ b/tools/assistant/tools/assistant/bookmarkdialog.cpp
@@ -0,0 +1,238 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "bookmarkdialog.h"
+#include "bookmarkfiltermodel.h"
+#include "bookmarkitem.h"
+#include "bookmarkmodel.h"
+#include "helpenginewrapper.h"
+#include "tracer.h"
+
+#include <QtGui/QKeyEvent>
+#include <QtGui/QMenu>
+
+QT_BEGIN_NAMESPACE
+
+BookmarkDialog::BookmarkDialog(BookmarkModel *sourceModel, const QString &title,
+ const QString &url, QWidget *parent)
+ : QDialog(parent)
+ , m_url(url)
+ , m_title(title)
+ , bookmarkModel(sourceModel)
+{
+ TRACE_OBJ
+ ui.setupUi(this);
+
+ ui.bookmarkEdit->setText(m_title);
+ ui.newFolderButton->setVisible(false);
+ ui.buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
+
+ connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(accepted()));
+ connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(rejected()));
+ connect(ui.newFolderButton, SIGNAL(clicked()), this, SLOT(addFolder()));
+ connect(ui.toolButton, SIGNAL(clicked()), this, SLOT(toolButtonClicked()));
+ connect(ui.bookmarkEdit, SIGNAL(textChanged(QString)), this,
+ SLOT(textChanged(QString)));
+
+ bookmarkProxyModel = new BookmarkFilterModel(this);
+ bookmarkProxyModel->setSourceModel(bookmarkModel);
+ ui.bookmarkFolders->setModel(bookmarkProxyModel);
+ connect(ui.bookmarkFolders, SIGNAL(currentIndexChanged(int)), this,
+ SLOT(currentIndexChanged(int)));
+
+ bookmarkTreeModel = new BookmarkTreeModel(this);
+ bookmarkTreeModel->setSourceModel(bookmarkModel);
+ ui.treeView->setModel(bookmarkTreeModel);
+
+ ui.treeView->expandAll();
+ ui.treeView->setVisible(false);
+ ui.treeView->installEventFilter(this);
+ ui.treeView->viewport()->installEventFilter(this);
+ ui.treeView->setContextMenuPolicy(Qt::CustomContextMenu);
+
+ connect(ui.treeView, SIGNAL(customContextMenuRequested(QPoint)), this,
+ SLOT(customContextMenuRequested(QPoint)));
+ connect(ui.treeView->selectionModel(), SIGNAL(currentChanged(QModelIndex,
+ QModelIndex)), this, SLOT(currentIndexChanged(QModelIndex)));
+
+ ui.bookmarkFolders->setCurrentIndex(0);
+ ui.treeView->setCurrentIndex(ui.treeView->indexAt(QPoint(2, 2)));
+
+ const HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
+ if (helpEngine.usesAppFont())
+ setFont(helpEngine.appFont());
+}
+
+BookmarkDialog::~BookmarkDialog()
+{
+ TRACE_OBJ
+}
+
+bool BookmarkDialog::isRootItem(const QModelIndex &index) const
+{
+ return !bookmarkTreeModel->parent(index).isValid();
+}
+
+bool BookmarkDialog::eventFilter(QObject *object, QEvent *event)
+{
+ TRACE_OBJ
+ if (object != ui.treeView && object != ui.treeView->viewport())
+ return QWidget::eventFilter(object, event);
+
+ if (event->type() == QEvent::KeyPress) {
+ QKeyEvent *ke = static_cast<QKeyEvent*>(event);
+ switch (ke->key()) {
+ case Qt::Key_F2: {
+ const QModelIndex &index = ui.treeView->currentIndex();
+ if (!isRootItem(index)) {
+ bookmarkModel->setItemsEditable(true);
+ ui.treeView->edit(index);
+ bookmarkModel->setItemsEditable(false);
+ }
+ } break;
+ default: break;
+ }
+ }
+
+ return QObject::eventFilter(object, event);
+}
+
+void BookmarkDialog::currentIndexChanged(int row)
+{
+ TRACE_OBJ
+ QModelIndex next = bookmarkProxyModel->index(row, 0, QModelIndex());
+ if (next.isValid()) {
+ next = bookmarkProxyModel->mapToSource(next);
+ ui.treeView->setCurrentIndex(bookmarkTreeModel->mapFromSource(next));
+ }
+}
+
+void BookmarkDialog::currentIndexChanged(const QModelIndex &index)
+{
+ TRACE_OBJ
+ const QModelIndex current = bookmarkTreeModel->mapToSource(index);
+ if (current.isValid()) {
+ const int row = bookmarkProxyModel->mapFromSource(current).row();
+ ui.bookmarkFolders->setCurrentIndex(row);
+ }
+}
+
+void BookmarkDialog::accepted()
+{
+ TRACE_OBJ
+ QModelIndex index = ui.treeView->currentIndex();
+ if (index.isValid()) {
+ index = bookmarkModel->addItem(bookmarkTreeModel->mapToSource(index));
+ if (BookmarkItem *item = bookmarkModel->itemFromIndex(index))
+ item->setData(DataVector() << m_title << m_url << false);
+ } else
+ rejected();
+
+ accept();
+}
+
+void BookmarkDialog::rejected()
+{
+ TRACE_OBJ
+ foreach (const QPersistentModelIndex &index, cache)
+ bookmarkModel->removeItem(index);
+ reject();
+}
+
+void BookmarkDialog::addFolder()
+{
+ TRACE_OBJ
+ QModelIndex index = ui.treeView->currentIndex();
+ if (index.isValid()) {
+ index = bookmarkModel->addItem(bookmarkTreeModel->mapToSource(index),
+ true);
+ cache.append(index);
+
+ index = bookmarkTreeModel->mapFromSource(index);
+ if (index.isValid()) {
+ bookmarkModel->setItemsEditable(true);
+ ui.treeView->edit(index);
+ ui.treeView->expand(index);
+ ui.treeView->setCurrentIndex(index);
+ bookmarkModel->setItemsEditable(false);
+ }
+ }
+}
+
+void BookmarkDialog::toolButtonClicked()
+{
+ TRACE_OBJ
+ const bool visible = !ui.treeView->isVisible();
+ ui.treeView->setVisible(visible);
+ ui.newFolderButton->setVisible(visible);
+
+ if (visible) {
+ resize(QSize(width(), 400));
+ ui.toolButton->setText(QLatin1String("-"));
+ } else {
+ resize(width(), minimumHeight());
+ ui.toolButton->setText(QLatin1String("+"));
+ }
+}
+
+void BookmarkDialog::textChanged(const QString& text)
+{
+ m_title = text;
+}
+
+void BookmarkDialog::customContextMenuRequested(const QPoint &point)
+{
+ TRACE_OBJ
+ const QModelIndex &index = ui.treeView->currentIndex();
+ if (isRootItem(index))
+ return; // check if we go to rename the "Bookmarks Menu", bail
+
+ QMenu menu(QLatin1String(""), this);
+ QAction *renameItem = menu.addAction(tr("Rename Folder"));
+
+ QAction *picked = menu.exec(ui.treeView->mapToGlobal(point));
+ if (picked == renameItem) {
+ bookmarkModel->setItemsEditable(true);
+ ui.treeView->edit(index);
+ bookmarkModel->setItemsEditable(false);
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/bookmarkdialog.h b/tools/assistant/tools/assistant/bookmarkdialog.h
new file mode 100644
index 0000000000..e177af6d97
--- /dev/null
+++ b/tools/assistant/tools/assistant/bookmarkdialog.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef BOOKMARKDIALOG_H
+#define BOOKMARKDIALOG_H
+
+#include "ui_bookmarkdialog.h"
+
+QT_BEGIN_NAMESPACE
+
+class BookmarkModel;
+class BookmarkFilterModel;
+class BookmarkTreeModel;
+
+class BookmarkDialog : public QDialog
+{
+ Q_OBJECT
+public:
+ BookmarkDialog(BookmarkModel *bookmarkModel, const QString &title,
+ const QString &url, QWidget *parent = 0);
+ ~BookmarkDialog();
+
+private:
+ bool isRootItem(const QModelIndex &index) const;
+ bool eventFilter(QObject *object, QEvent *event);
+
+private slots:
+ void currentIndexChanged(int index);
+ void currentIndexChanged(const QModelIndex &index);
+
+ void accepted();
+ void rejected();
+
+ void addFolder();
+ void toolButtonClicked();
+ void textChanged(const QString& text);
+ void customContextMenuRequested(const QPoint &point);
+
+private:
+ QString m_url;
+ QString m_title;
+ Ui::BookmarkDialog ui;
+ QList<QPersistentModelIndex> cache;
+
+ BookmarkModel *bookmarkModel;
+ BookmarkTreeModel *bookmarkTreeModel;
+ BookmarkFilterModel *bookmarkProxyModel;
+};
+
+QT_END_NAMESPACE
+
+#endif // BOOKMARKDIALOG_H
diff --git a/tools/assistant/tools/assistant/bookmarkdialog.ui b/tools/assistant/tools/assistant/bookmarkdialog.ui
index 7a878f9656..51315317b1 100644
--- a/tools/assistant/tools/assistant/bookmarkdialog.ui
+++ b/tools/assistant/tools/assistant/bookmarkdialog.ui
@@ -1,38 +1,39 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>BookmarkDialog</class>
- <widget class="QDialog" name="BookmarkDialog" >
- <property name="geometry" >
+ <widget class="QDialog" name="BookmarkDialog">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>450</width>
- <height>135</height>
+ <height>133</height>
</rect>
</property>
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>Add Bookmark</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_3" >
+ <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <layout class="QHBoxLayout" name="horizontalLayout" >
+ <layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <layout class="QVBoxLayout" name="verticalLayout_2" >
+ <layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="QLabel" name="label" >
- <property name="text" >
+ <widget class="QLabel" name="label">
+ <property name="text">
<string>Bookmark:</string>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="label_2" >
- <property name="text" >
+ <widget class="QLabel" name="label_2">
+ <property name="text">
<string>Add in Folder:</string>
</property>
</widget>
@@ -40,35 +41,35 @@
</layout>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout" >
+ <layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="QLineEdit" name="bookmarkEdit" />
+ <widget class="QLineEdit" name="bookmarkEdit"/>
</item>
<item>
- <widget class="QComboBox" name="bookmarkFolders" />
+ <widget class="QComboBox" name="bookmarkFolders"/>
</item>
</layout>
</item>
</layout>
</item>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_3" >
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
- <widget class="QToolButton" name="toolButton" >
- <property name="minimumSize" >
+ <widget class="QToolButton" name="toolButton">
+ <property name="minimumSize">
<size>
<width>25</width>
<height>20</height>
</size>
</property>
- <property name="text" >
+ <property name="text">
<string>+</string>
</property>
</widget>
</item>
<item>
- <widget class="Line" name="line" >
- <property name="orientation" >
+ <widget class="Line" name="line">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
@@ -76,30 +77,39 @@
</layout>
</item>
<item>
- <widget class="QTreeView" name="treeView" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Ignored" hsizetype="Expanding" >
+ <widget class="QTreeView" name="treeView">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Ignored">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="uniformRowHeights">
+ <bool>true</bool>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <property name="headerHidden">
+ <bool>true</bool>
+ </property>
</widget>
</item>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_4" >
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
- <widget class="QPushButton" name="newFolderButton" >
- <property name="text" >
+ <widget class="QPushButton" name="newFolderButton">
+ <property name="text">
<string>New Folder</string>
</property>
</widget>
</item>
<item>
- <widget class="QDialogButtonBox" name="buttonBox" >
- <property name="orientation" >
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="standardButtons" >
+ <property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
@@ -116,11 +126,11 @@
<receiver>BookmarkDialog</receiver>
<slot>accept()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
@@ -132,11 +142,11 @@
<receiver>BookmarkDialog</receiver>
<slot>reject()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
diff --git a/tools/assistant/tools/assistant/bookmarkfiltermodel.cpp b/tools/assistant/tools/assistant/bookmarkfiltermodel.cpp
new file mode 100644
index 0000000000..58744937ea
--- /dev/null
+++ b/tools/assistant/tools/assistant/bookmarkfiltermodel.cpp
@@ -0,0 +1,322 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "bookmarkfiltermodel.h"
+
+#include "bookmarkitem.h"
+#include "bookmarkmodel.h"
+
+BookmarkFilterModel::BookmarkFilterModel(QObject *parent)
+ : QAbstractProxyModel(parent)
+ , hideBookmarks(true)
+ , sourceModel(0)
+{
+}
+
+void
+BookmarkFilterModel::setSourceModel(QAbstractItemModel *_sourceModel)
+{
+ beginResetModel();
+
+ QAbstractProxyModel::setSourceModel(sourceModel);
+ sourceModel = qobject_cast<BookmarkModel*> (_sourceModel);
+
+ connect(sourceModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this,
+ SLOT(changed(QModelIndex, QModelIndex)));
+
+ connect(sourceModel, SIGNAL(rowsInserted(QModelIndex, int, int)),
+ this, SLOT(rowsInserted(QModelIndex, int, int)));
+
+ connect(sourceModel, SIGNAL(rowsAboutToBeRemoved(QModelIndex, int, int)),
+ this, SLOT(rowsAboutToBeRemoved(QModelIndex, int, int)));
+ connect(sourceModel, SIGNAL(rowsRemoved(QModelIndex, int, int)), this,
+ SLOT(rowsRemoved(QModelIndex, int, int)));
+
+ connect(sourceModel, SIGNAL(layoutAboutToBeChanged()), this,
+ SLOT(layoutAboutToBeChanged()));
+ connect(sourceModel, SIGNAL(layoutChanged()), this,
+ SLOT(layoutChanged()));
+
+ connect(sourceModel, SIGNAL(modelAboutToBeReset()), this,
+ SLOT(modelAboutToBeReset()));
+ connect(sourceModel, SIGNAL(modelReset()), this, SLOT(modelReset()));
+
+ if (sourceModel)
+ setupCache(sourceModel->index(0, 0, QModelIndex()));
+
+ endResetModel();
+}
+
+int
+BookmarkFilterModel::rowCount(const QModelIndex &index) const
+{
+ Q_UNUSED(index)
+ return cache.count();
+}
+
+int
+BookmarkFilterModel::columnCount(const QModelIndex &index) const
+{
+ Q_UNUSED(index)
+ if (sourceModel)
+ return sourceModel->columnCount();
+ return 0;
+}
+
+QModelIndex
+BookmarkFilterModel::mapToSource(const QModelIndex &proxyIndex) const
+{
+ const int row = proxyIndex.row();
+ if (proxyIndex.isValid() && row >= 0 && row < cache.count())
+ return cache[row];
+ return QModelIndex();
+}
+
+QModelIndex
+BookmarkFilterModel::mapFromSource(const QModelIndex &sourceIndex) const
+{
+ return index(cache.indexOf(sourceIndex), 0, QModelIndex());
+}
+
+QModelIndex
+BookmarkFilterModel::parent(const QModelIndex &child) const
+{
+ Q_UNUSED(child)
+ return QModelIndex();
+}
+
+QModelIndex
+BookmarkFilterModel::index(int row, int column, const QModelIndex &index) const
+{
+ Q_UNUSED(index)
+ if (row < 0 || column < 0 || cache.count() <= row
+ || !sourceModel || sourceModel->columnCount() <= column) {
+ return QModelIndex();
+ }
+ return createIndex(row, 0);
+}
+
+Qt::DropActions
+BookmarkFilterModel::supportedDropActions () const
+{
+ if (sourceModel)
+ return sourceModel->supportedDropActions();
+ return Qt::IgnoreAction;
+}
+
+Qt::ItemFlags
+BookmarkFilterModel::flags(const QModelIndex &index) const
+{
+ if (sourceModel)
+ return sourceModel->flags(index);
+ return Qt::NoItemFlags;
+}
+
+QVariant
+BookmarkFilterModel::data(const QModelIndex &index, int role) const
+{
+ if (sourceModel)
+ return sourceModel->data(mapToSource(index), role);
+ return QVariant();
+}
+
+bool
+BookmarkFilterModel::setData(const QModelIndex &index, const QVariant &value,
+ int role)
+{
+ if (sourceModel)
+ return sourceModel->setData(mapToSource(index), value, role);
+ return false;
+}
+
+void
+BookmarkFilterModel::filterBookmarks()
+{
+ if (sourceModel) {
+ beginResetModel();
+ hideBookmarks = true;
+ setupCache(sourceModel->index(0, 0, QModelIndex()));
+ endResetModel();
+ }
+}
+
+void
+BookmarkFilterModel::filterBookmarkFolders()
+{
+ if (sourceModel) {
+ beginResetModel();
+ hideBookmarks = false;
+ setupCache(sourceModel->index(0, 0, QModelIndex()));
+ endResetModel();
+ }
+}
+
+void
+BookmarkFilterModel::changed(const QModelIndex &topLeft,
+ const QModelIndex &bottomRight)
+{
+ emit dataChanged(mapFromSource(topLeft), mapFromSource(bottomRight));
+}
+
+void
+BookmarkFilterModel::rowsInserted(const QModelIndex &parent, int start, int end)
+{
+ if (!sourceModel)
+ return;
+
+ QModelIndex cachePrevious = parent;
+ if (BookmarkItem *parentItem = sourceModel->itemFromIndex(parent)) {
+ BookmarkItem *newItem = parentItem->child(start);
+
+ // iterate over tree hirarchie to find the previous folder
+ for (int i = 0; i < parentItem->childCount(); ++i) {
+ if (BookmarkItem *child = parentItem->child(i)) {
+ const QModelIndex &tmp = sourceModel->indexFromItem(child);
+ if (tmp.data(UserRoleFolder).toBool() && child != newItem)
+ cachePrevious = tmp;
+ }
+ }
+
+ const QModelIndex &newIndex = sourceModel->indexFromItem(newItem);
+ const bool isFolder = newIndex.data(UserRoleFolder).toBool();
+ if ((isFolder && hideBookmarks) || (!isFolder && !hideBookmarks)) {
+ beginInsertRows(mapFromSource(parent), start, end);
+ cache.insert(cache.indexOf(cachePrevious) + 1, newIndex);
+ endInsertRows();
+ }
+ }
+}
+
+void
+BookmarkFilterModel::rowsAboutToBeRemoved(const QModelIndex &parent, int start,
+ int end)
+{
+ if (!sourceModel)
+ return;
+
+ if (BookmarkItem *parentItem = sourceModel->itemFromIndex(parent)) {
+ if (BookmarkItem *child = parentItem->child(start)) {
+ indexToRemove = sourceModel->indexFromItem(child);
+ if (cache.contains(indexToRemove))
+ beginRemoveRows(mapFromSource(parent), start, end);
+ }
+ }
+}
+
+void
+BookmarkFilterModel::rowsRemoved(const QModelIndex &/*parent*/, int, int)
+{
+ if (cache.contains(indexToRemove)) {
+ cache.removeAll(indexToRemove);
+ endRemoveRows();
+ }
+}
+
+void
+BookmarkFilterModel::layoutAboutToBeChanged()
+{
+ // TODO: ???
+}
+
+void
+BookmarkFilterModel::layoutChanged()
+{
+ // TODO: ???
+}
+
+void
+BookmarkFilterModel::modelAboutToBeReset()
+{
+ beginResetModel();
+}
+
+void
+BookmarkFilterModel::modelReset()
+{
+ if (sourceModel)
+ setupCache(sourceModel->index(0, 0, QModelIndex()));
+ endResetModel();
+}
+
+void
+BookmarkFilterModel::setupCache(const QModelIndex &parent)
+{
+ cache.clear();
+ collectItems(parent);
+}
+
+void
+BookmarkFilterModel::collectItems(const QModelIndex &parent)
+{
+ if (parent.isValid()) {
+ bool isFolder = sourceModel->data(parent, UserRoleFolder).toBool();
+ if ((isFolder && hideBookmarks) || (!isFolder && !hideBookmarks))
+ cache.append(parent);
+
+ if (sourceModel->hasChildren(parent)) {
+ for (int i = 0; i < sourceModel->rowCount(parent); ++i)
+ collectItems(sourceModel->index(i, 0, parent));
+ }
+ }
+}
+
+// -- BookmarkTreeModel
+
+BookmarkTreeModel::BookmarkTreeModel(QObject *parent)
+ : QSortFilterProxyModel(parent)
+{
+}
+
+int
+BookmarkTreeModel::columnCount(const QModelIndex &parent) const
+{
+ return qMin(1, QSortFilterProxyModel::columnCount(parent));
+}
+
+bool
+BookmarkTreeModel::filterAcceptsRow(int row, const QModelIndex &parent) const
+{
+ Q_UNUSED(row)
+ BookmarkModel *model = qobject_cast<BookmarkModel*> (sourceModel());
+ if (model->rowCount(parent) > 0
+ && model->data(model->index(row, 0, parent), UserRoleFolder).toBool())
+ return true;
+ return false;
+} \ No newline at end of file
diff --git a/tools/assistant/tools/assistant/bookmarkfiltermodel.h b/tools/assistant/tools/assistant/bookmarkfiltermodel.h
new file mode 100644
index 0000000000..4ea7ab9c7d
--- /dev/null
+++ b/tools/assistant/tools/assistant/bookmarkfiltermodel.h
@@ -0,0 +1,118 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef BOOKMARKFILTERMODEL_H
+#define BOOKMARKFILTERMODEL_H
+
+#include <QtCore/QPersistentModelIndex>
+
+#include <QtGui/QAbstractProxyModel>
+#include <QtGui/QSortFilterProxyModel>
+
+QT_BEGIN_NAMESPACE
+
+class BookmarkItem;
+class BookmarkModel;
+
+typedef QList<QPersistentModelIndex> PersistentModelIndexCache;
+
+class BookmarkFilterModel : public QAbstractProxyModel
+{
+ Q_OBJECT
+public:
+ explicit BookmarkFilterModel(QObject *parent = 0);
+
+ void setSourceModel(QAbstractItemModel *sourceModel);
+
+ int rowCount(const QModelIndex &index) const;
+ int columnCount(const QModelIndex &index) const;
+
+ QModelIndex mapToSource(const QModelIndex &proxyIndex) const;
+ QModelIndex mapFromSource(const QModelIndex &sourceIndex) const;
+
+ QModelIndex parent(const QModelIndex &child) const;
+ QModelIndex index(int row, int column, const QModelIndex &parent) const;
+
+ Qt::DropActions supportedDropActions () const;
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+
+ QVariant data(const QModelIndex &index, int role) const;
+ bool setData(const QModelIndex &index, const QVariant &value, int role);
+
+ void filterBookmarks();
+ void filterBookmarkFolders();
+
+private slots:
+ void changed(const QModelIndex &topLeft, const QModelIndex &bottomRight);
+ void rowsInserted(const QModelIndex &parent, int start, int end);
+ void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
+ void rowsRemoved(const QModelIndex &parent, int start, int end);
+ void layoutAboutToBeChanged();
+ void layoutChanged();
+ void modelAboutToBeReset();
+ void modelReset();
+
+private:
+ void setupCache(const QModelIndex &parent);
+ void collectItems(const QModelIndex &parent);
+
+private:
+ bool hideBookmarks;
+ BookmarkModel *sourceModel;
+ PersistentModelIndexCache cache;
+ QPersistentModelIndex indexToRemove;
+};
+
+// -- BookmarkTreeModel
+
+class BookmarkTreeModel : public QSortFilterProxyModel
+{
+ Q_OBJECT
+public:
+ BookmarkTreeModel(QObject *parent = 0);
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+
+protected:
+ bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
+};
+
+QT_END_NAMESPACE
+
+#endif // BOOKMARKFILTERMODEL_H
diff --git a/tools/assistant/tools/assistant/bookmarkitem.cpp b/tools/assistant/tools/assistant/bookmarkitem.cpp
new file mode 100644
index 0000000000..2e81e38286
--- /dev/null
+++ b/tools/assistant/tools/assistant/bookmarkitem.cpp
@@ -0,0 +1,181 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "bookmarkitem.h"
+
+#include <QtCore/QDebug>
+
+QT_BEGIN_NAMESPACE
+
+BookmarkItem::BookmarkItem(const DataVector &data, BookmarkItem *parent)
+ : m_data(data)
+ , m_parent(parent)
+{
+}
+
+BookmarkItem::~BookmarkItem()
+{
+ qDeleteAll(m_children);
+}
+
+BookmarkItem*
+BookmarkItem::parent() const
+{
+ return m_parent;
+}
+
+void
+BookmarkItem::setParent(BookmarkItem *parent)
+{
+ m_parent = parent;
+}
+
+void
+BookmarkItem::addChild(BookmarkItem *child)
+{
+ child->setParent(this);
+ m_children.append(child);
+}
+
+BookmarkItem*
+BookmarkItem::child(int number) const
+{
+ if (number >= 0 && number < m_children.count())
+ return m_children[number];
+ return 0;
+}
+
+int BookmarkItem::childCount() const
+{
+ return m_children.count();
+}
+
+int BookmarkItem::childNumber() const
+{
+ if (m_parent)
+ return m_parent->m_children.indexOf(const_cast<BookmarkItem*>(this));
+ return 0;
+}
+
+QVariant
+BookmarkItem::data(int column) const
+{
+ if (column == 0)
+ return m_data[0];
+
+ if (column == 1 || column == UserRoleUrl)
+ return m_data[1];
+
+ if (column == UserRoleFolder)
+ return m_data[1].toString() == QLatin1String("Folder");
+
+ if (column == UserRoleExpanded)
+ return m_data[2];
+
+ return QVariant();
+}
+
+void
+BookmarkItem::setData(const DataVector &data)
+{
+ m_data = data;
+}
+
+bool
+BookmarkItem::setData(int column, const QVariant &newValue)
+{
+ int index = -1;
+ if (column == 0 || column == 1)
+ index = column;
+
+ if (column == UserRoleUrl || column == UserRoleFolder)
+ index = 1;
+
+ if (column == UserRoleExpanded)
+ index = 2;
+
+ if (index < 0)
+ return false;
+
+ m_data[index] = newValue;
+ return true;
+}
+
+bool
+BookmarkItem::insertChildren(bool isFolder, int position, int count)
+{
+ if (position < 0 || position > m_children.size())
+ return false;
+
+ for (int row = 0; row < count; ++row) {
+ m_children.insert(position, new BookmarkItem(DataVector()
+ << QObject::tr(isFolder ? "New Folder" : "Untitled")
+ << (isFolder ? "Folder" : "about:blank") << false, this));
+ }
+
+ return true;
+}
+
+bool
+BookmarkItem::removeChildren(int position, int count)
+{
+ if (position < 0 || position > m_children.size())
+ return false;
+
+ for (int row = 0; row < count; ++row)
+ delete m_children.takeAt(position);
+
+ return true;
+}
+
+void
+BookmarkItem::dumpTree(int indent) const
+{
+ const QString tree(indent, ' ');
+ qDebug() << tree + (data(UserRoleFolder).toBool() ? "Folder" : "Bookmark")
+ << "Label:" << data(0).toString() << "parent:" << m_parent << "this:"
+ << this;
+
+ foreach (BookmarkItem *item, m_children)
+ item->dumpTree(indent + 4);
+}
+
+QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/bookmarkitem.h b/tools/assistant/tools/assistant/bookmarkitem.h
new file mode 100644
index 0000000000..924a762b80
--- /dev/null
+++ b/tools/assistant/tools/assistant/bookmarkitem.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BOOKMARKITEM_H
+#define BOOKMARKITEM_H
+
+#include <QtCore/QVariant>
+#include <QtCore/QVector>
+
+QT_BEGIN_NAMESPACE
+
+enum {
+ UserRoleUrl = Qt::UserRole + 50,
+ UserRoleFolder = Qt::UserRole + 100,
+ UserRoleExpanded = Qt::UserRole + 150
+};
+
+typedef QVector<QVariant> DataVector;
+
+class BookmarkItem
+{
+public:
+ BookmarkItem(const DataVector &data, BookmarkItem *parent = 0);
+ ~BookmarkItem();
+
+ BookmarkItem *parent() const;
+ void setParent(BookmarkItem *parent);
+
+ void addChild(BookmarkItem *child);
+ BookmarkItem *child(int number) const;
+
+ int childCount() const;
+ int childNumber() const;
+
+ QVariant data(int column) const;
+ void setData(const DataVector &data);
+ bool setData(int column, const QVariant &value);
+
+ bool insertChildren(bool isFolder, int position, int count);
+ bool removeChildren(int position, int count);
+
+ void dumpTree(int indent) const;
+
+private:
+ DataVector m_data;
+
+ BookmarkItem *m_parent;
+ QList<BookmarkItem*> m_children;
+};
+
+QT_END_NAMESPACE
+
+#endif // BOOKMARKITEM_H
diff --git a/tools/assistant/tools/assistant/bookmarkmanager.cpp b/tools/assistant/tools/assistant/bookmarkmanager.cpp
index 0ce1b9d4f2..b9a1b0e1c1 100644
--- a/tools/assistant/tools/assistant/bookmarkmanager.cpp
+++ b/tools/assistant/tools/assistant/bookmarkmanager.cpp
@@ -38,549 +38,214 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include "tracer.h"
#include "bookmarkmanager.h"
+#include "bookmarkmanagerwidget.h"
+#include "bookmarkdialog.h"
+#include "bookmarkfiltermodel.h"
+#include "bookmarkitem.h"
+#include "bookmarkmodel.h"
#include "centralwidget.h"
+#include "helpenginewrapper.h"
#include <QtGui/QMenu>
-#include <QtGui/QIcon>
-#include <QtGui/QStyle>
-#include <QtGui/QLabel>
-#include <QtGui/QLayout>
-#include <QtCore/QEvent>
-#include <QtGui/QComboBox>
#include <QtGui/QKeyEvent>
-#include <QtGui/QLineEdit>
#include <QtGui/QMessageBox>
-#include <QtGui/QHeaderView>
-#include <QtGui/QToolButton>
-#include <QtGui/QPushButton>
-#include <QtGui/QApplication>
-#include <QtHelp/QHelpEngineCore>
-#include <QtGui/QDialogButtonBox>
#include <QtGui/QSortFilterProxyModel>
QT_BEGIN_NAMESPACE
-BookmarkDialog::BookmarkDialog(BookmarkManager *manager, const QString &title,
- const QString &url, QWidget *parent)
- : QDialog(parent)
- , m_url(url)
- , m_title(title)
- , bookmarkManager(manager)
-{
- ui.setupUi(this);
-
- installEventFilter(this);
- ui.treeView->installEventFilter(this);
- ui.treeView->viewport()->installEventFilter(this);
-
- ui.bookmarkEdit->setText(title);
- ui.newFolderButton->setVisible(false);
- ui.buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
- ui.bookmarkFolders->addItems(bookmarkManager->bookmarkFolders());
-
- proxyModel = new QSortFilterProxyModel(this);
- proxyModel->setFilterKeyColumn(0);
- proxyModel->setDynamicSortFilter(true);
- proxyModel->setFilterRole(Qt::UserRole + 10);
- proxyModel->setSourceModel(bookmarkManager->treeBookmarkModel());
- proxyModel->setFilterRegExp(QRegExp(QLatin1String("Folder"),
- Qt::CaseSensitive, QRegExp::FixedString));
- ui.treeView->setModel(proxyModel);
-
- ui.treeView->expandAll();
- ui.treeView->setVisible(false);
- ui.treeView->header()->setVisible(false);
- ui.treeView->setContextMenuPolicy(Qt::CustomContextMenu);
-
- connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
- connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(addAccepted()));
- connect(ui.newFolderButton, SIGNAL(clicked()), this, SLOT(addNewFolder()));
- connect(ui.toolButton, SIGNAL(clicked()), this, SLOT(toolButtonClicked()));
- connect(ui.bookmarkEdit, SIGNAL(textChanged(QString)), this,
- SLOT(textChanged(QString)));
-
- connect(bookmarkManager->treeBookmarkModel(),
- SIGNAL(itemChanged(QStandardItem*)),
- this, SLOT(itemChanged(QStandardItem*)));
-
- connect(ui.bookmarkFolders, SIGNAL(currentIndexChanged(QString)), this,
- SLOT(selectBookmarkFolder(QString)));
-
- connect(ui.treeView, SIGNAL(customContextMenuRequested(QPoint)), this,
- SLOT(customContextMenuRequested(QPoint)));
-
- connect(ui.treeView->selectionModel(), SIGNAL(currentChanged(QModelIndex,
- QModelIndex)), this, SLOT(currentChanged(QModelIndex)));
-}
-
-BookmarkDialog::~BookmarkDialog()
-{
-}
+// -- BookmarkManager::BookmarkWidget
-void BookmarkDialog::addAccepted()
+void BookmarkManager::BookmarkWidget::focusInEvent(QFocusEvent *event)
{
- QItemSelectionModel *model = ui.treeView->selectionModel();
- const QModelIndexList &list = model->selection().indexes();
+ TRACE_OBJ
+ if (event->reason() != Qt::MouseFocusReason) {
+ ui.lineEdit->selectAll();
+ ui.lineEdit->setFocus();
- QModelIndex index;
- if (!list.isEmpty())
- index = proxyModel->mapToSource(list.at(0));
-
- bookmarkManager->addNewBookmark(index, ui.bookmarkEdit->text(), m_url);
- accept();
-}
-
-void BookmarkDialog::addNewFolder()
-{
- QItemSelectionModel *model = ui.treeView->selectionModel();
- const QModelIndexList &list = model->selection().indexes();
-
- QModelIndex index;
- if (!list.isEmpty())
- index = list.at(0);
-
- QModelIndex newFolder =
- bookmarkManager->addNewFolder(proxyModel->mapToSource(index));
- if (newFolder.isValid()) {
- ui.treeView->expand(index);
- const QModelIndex &index = proxyModel->mapFromSource(newFolder);
- model->setCurrentIndex(index, QItemSelectionModel::ClearAndSelect);
-
- ui.bookmarkFolders->clear();
- ui.bookmarkFolders->addItems(bookmarkManager->bookmarkFolders());
-
- const QString &name = index.data().toString();
- ui.bookmarkFolders->setCurrentIndex(ui.bookmarkFolders->findText(name));
+ // force the focus in event on bookmark manager
+ emit focusInEvent();
}
- ui.treeView->setFocus();
}
-void BookmarkDialog::toolButtonClicked()
-{
- bool visible = !ui.treeView->isVisible();
- ui.treeView->setVisible(visible);
- ui.newFolderButton->setVisible(visible);
+// -- BookmarkManager::BookmarkTreeView
- if (visible) {
- resize(QSize(width(), 400));
- ui.toolButton->setText(QLatin1String("-"));
- } else {
- resize(width(), minimumHeight());
- ui.toolButton->setText(QLatin1String("+"));
- }
-}
-
-void BookmarkDialog::itemChanged(QStandardItem *item)
+BookmarkManager::BookmarkTreeView::BookmarkTreeView(QWidget *parent)
+ : QTreeView(parent)
{
- if (renameItem != item) {
- renameItem = item;
- oldText = item->text();
- return;
- }
+ TRACE_OBJ
+ setAcceptDrops(true);
+ setDragEnabled(true);
+ setAutoExpandDelay(1000);
+ setUniformRowHeights(true);
+ setDropIndicatorShown(true);
+ setExpandsOnDoubleClick(true);
- if (item->text() != oldText) {
- ui.bookmarkFolders->clear();
- ui.bookmarkFolders->addItems(bookmarkManager->bookmarkFolders());
+ connect(this, SIGNAL(expanded(QModelIndex)), this,
+ SLOT(setExpandedData(QModelIndex)));
+ connect(this, SIGNAL(collapsed(QModelIndex)), this,
+ SLOT(setExpandedData(QModelIndex)));
- QString name = tr("Bookmarks");
- const QModelIndex &index = ui.treeView->currentIndex();
- if (index.isValid())
- name = index.data().toString();
- ui.bookmarkFolders->setCurrentIndex(ui.bookmarkFolders->findText(name));
- }
}
-void BookmarkDialog::textChanged(const QString &string)
+void BookmarkManager::BookmarkTreeView::subclassKeyPressEvent(QKeyEvent *event)
{
- ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!string.isEmpty());
+ TRACE_OBJ
+ QTreeView::keyPressEvent(event);
}
-void BookmarkDialog::selectBookmarkFolder(const QString &folderName)
+void BookmarkManager::BookmarkTreeView::setExpandedData(const QModelIndex &index)
{
- if (folderName.isEmpty())
- return;
-
- if (folderName == tr("Bookmarks")) {
- ui.treeView->clearSelection();
- return;
- }
-
- QStandardItemModel *model = bookmarkManager->treeBookmarkModel();
- QList<QStandardItem*> list = model->findItems(folderName,
- Qt::MatchCaseSensitive | Qt::MatchRecursive, 0);
- if (!list.isEmpty()) {
- const QModelIndex &index = model->indexFromItem(list.at(0));
- QItemSelectionModel *model = ui.treeView->selectionModel();
- if (model) {
- model->setCurrentIndex(proxyModel->mapFromSource(index),
- QItemSelectionModel::ClearAndSelect);
- }
- }
+ TRACE_OBJ
+ if (BookmarkModel *treeModel = qobject_cast<BookmarkModel*> (model()))
+ treeModel->setData(index, isExpanded(index), UserRoleExpanded);
}
-void BookmarkDialog::customContextMenuRequested(const QPoint &point)
-{
- QModelIndex index = ui.treeView->indexAt(point);
- if (!index.isValid())
- return;
-
- QMenu menu(QLatin1String(""), this);
+// -- BookmarkManager
- QAction *removeItem = menu.addAction(tr("Delete Folder"));
- QAction *renameItem = menu.addAction(tr("Rename Folder"));
-
- QAction *picked = menu.exec(ui.treeView->mapToGlobal(point));
- if (!picked)
- return;
-
- const QModelIndex &proxyIndex = proxyModel->mapToSource(index);
- if (picked == removeItem) {
- bookmarkManager->removeBookmarkItem(ui.treeView, proxyIndex);
- ui.bookmarkFolders->clear();
- ui.bookmarkFolders->addItems(bookmarkManager->bookmarkFolders());
-
- QString name = tr("Bookmarks");
- index = ui.treeView->currentIndex();
- if (index.isValid())
- name = index.data().toString();
- ui.bookmarkFolders->setCurrentIndex(ui.bookmarkFolders->findText(name));
- }
- else if (picked == renameItem) {
- BookmarkModel *model = bookmarkManager->treeBookmarkModel();
- if (QStandardItem *item = model->itemFromIndex(proxyIndex)) {
- item->setEditable(true);
- ui.treeView->edit(index);
- item->setEditable(false);
- }
- }
-}
+QMutex BookmarkManager::mutex;
+BookmarkManager* BookmarkManager::bookmarkManager = 0;
-void BookmarkDialog::currentChanged(const QModelIndex &current)
-{
- QString text = tr("Bookmarks");
- if (current.isValid())
- text = current.data().toString();
- ui.bookmarkFolders->setCurrentIndex(ui.bookmarkFolders->findText(text));
-}
+// -- public
-bool BookmarkDialog::eventFilter(QObject *object, QEvent *e)
+BookmarkManager* BookmarkManager::instance()
{
- if (object != ui.treeView && object != ui.treeView->viewport())
- return QWidget::eventFilter(object, e);
-
- if (e->type() == QEvent::KeyPress) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
- switch (ke->key()) {
- case Qt::Key_F2: {
- const QModelIndex &index = ui.treeView->currentIndex();
- const QModelIndex &source = proxyModel->mapToSource(index);
- QStandardItem *item =
- bookmarkManager->treeBookmarkModel()->itemFromIndex(source);
- if (item) {
- item->setEditable(true);
- ui.treeView->edit(index);
- item->setEditable(false);
- }
- } break;
-
- case Qt::Key_Delete: {
- const QModelIndex &index = ui.treeView->currentIndex();
- bookmarkManager->removeBookmarkItem(ui.treeView,
- proxyModel->mapToSource(index));
- ui.bookmarkFolders->clear();
- ui.bookmarkFolders->addItems(bookmarkManager->bookmarkFolders());
-
- QString name = tr("Bookmarks");
- if (index.isValid())
- name = index.data().toString();
- ui.bookmarkFolders->setCurrentIndex(ui.bookmarkFolders->findText(name));
- } break;
-
- default:
- break;
- }
+ TRACE_OBJ
+ if (!bookmarkManager) {
+ QMutexLocker _(&mutex);
+ if (!bookmarkManager)
+ bookmarkManager = new BookmarkManager();
}
-
- return QObject::eventFilter(object, e);
+ return bookmarkManager;
}
-
-// #pragma mark -- BookmarkWidget
-
-
-BookmarkWidget::BookmarkWidget(BookmarkManager *manager, QWidget *parent,
- bool showButtons)
- : QWidget(parent)
- , addButton(0)
- , removeButton(0)
- , bookmarkManager(manager)
+void BookmarkManager::destroy()
{
- setup(showButtons);
-
- installEventFilter(this);
- treeView->installEventFilter(this);
- treeView->viewport()->installEventFilter(this);
+ TRACE_OBJ
+ delete bookmarkManager;
+ bookmarkManager = 0;
}
-BookmarkWidget::~BookmarkWidget()
+QWidget* BookmarkManager::bookmarkDockWidget() const
{
+ TRACE_OBJ
+ if (bookmarkWidget)
+ return bookmarkWidget;
+ return 0;
}
-void BookmarkWidget::removeClicked()
+void BookmarkManager::takeBookmarksMenu(QMenu* menu)
{
- const QModelIndex &index = treeView->currentIndex();
- if (searchField->text().isEmpty()) {
- bookmarkManager->removeBookmarkItem(treeView,
- filterBookmarkModel->mapToSource(index));
- }
+ TRACE_OBJ
+ bookmarkMenu = menu;
+ refeshBookmarkMenu();
}
-void BookmarkWidget::filterChanged()
-{
- bool searchBookmarks = searchField->text().isEmpty();
- if (!searchBookmarks) {
- regExp.setPattern(searchField->text());
- filterBookmarkModel->setSourceModel(bookmarkManager->listBookmarkModel());
- } else {
- regExp.setPattern(QLatin1String(""));
- filterBookmarkModel->setSourceModel(bookmarkManager->treeBookmarkModel());
- }
+// -- public slots
- if (addButton)
- addButton->setEnabled(searchBookmarks);
-
- if (removeButton)
- removeButton->setEnabled(searchBookmarks);
-
- filterBookmarkModel->setFilterRegExp(regExp);
-
- const QModelIndex &index = treeView->indexAt(QPoint(1, 1));
- if (index.isValid())
- treeView->setCurrentIndex(index);
-
- if (searchBookmarks)
- expandItems();
-}
-
-void BookmarkWidget::expand(const QModelIndex &index)
+void BookmarkManager::addBookmark(const QString &title, const QString &url)
{
- const QModelIndex &source = filterBookmarkModel->mapToSource(index);
- QStandardItem *item =
- bookmarkManager->treeBookmarkModel()->itemFromIndex(source);
- if (item)
- item->setData(treeView->isExpanded(index), Qt::UserRole + 11);
+ TRACE_OBJ
+ showBookmarkDialog(title.isEmpty() ? tr("Untitled") : title,
+ url.isEmpty() ? QLatin1String("about:blank") : url);
}
-void BookmarkWidget::activated(const QModelIndex &index)
-{
- if (!index.isValid())
- return;
+// -- private
- QString data = index.data(Qt::UserRole + 10).toString();
- if (data != QLatin1String("Folder"))
- emit requestShowLink(data);
-}
-
-void BookmarkWidget::customContextMenuRequested(const QPoint &point)
+BookmarkManager::BookmarkManager()
+ : typeAndSearch(false)
+ , bookmarkMenu(0)
+ , bookmarkModel(new BookmarkModel)
+ , bookmarkWidget(new BookmarkWidget)
+ , bookmarkTreeView(new BookmarkTreeView)
+ , bookmarkManagerWidget(0)
{
- QModelIndex index = treeView->indexAt(point);
- if (!index.isValid())
- return;
+ TRACE_OBJ
+ bookmarkWidget->installEventFilter(this);
+ connect(bookmarkWidget->ui.add, SIGNAL(clicked()), this,
+ SLOT(addBookmark()));
+ connect(bookmarkWidget->ui.remove, SIGNAL(clicked()), this,
+ SLOT(removeBookmark()));
+ connect(bookmarkWidget->ui.lineEdit, SIGNAL(textChanged(QString)), this,
+ SLOT(textChanged(QString)));
+ connect(bookmarkWidget, SIGNAL(focusInEvent()), this, SLOT(focusInEvent()));
- QAction *showItem = 0;
- QAction *removeItem = 0;
- QAction *renameItem = 0;
- QAction *showItemNewTab = 0;
-
- QMenu menu(QLatin1String(""), this);
- QString data = index.data(Qt::UserRole + 10).toString();
- if (data == QLatin1String("Folder")) {
- removeItem = menu.addAction(tr("Delete Folder"));
- renameItem = menu.addAction(tr("Rename Folder"));
- } else {
- showItem = menu.addAction(tr("Show Bookmark"));
- showItemNewTab = menu.addAction(tr("Show Bookmark in New Tab"));
- if (searchField->text().isEmpty()) {
- menu.addSeparator();
- removeItem = menu.addAction(tr("Delete Bookmark"));
- renameItem = menu.addAction(tr("Rename Bookmark"));
- }
- }
+ bookmarkTreeView->setModel(bookmarkModel);
+ bookmarkTreeView->installEventFilter(this);
+ bookmarkTreeView->viewport()->installEventFilter(this);
+ bookmarkTreeView->setContextMenuPolicy(Qt::CustomContextMenu);
+ bookmarkWidget->ui.stackedWidget->addWidget(bookmarkTreeView);
- QAction *pickedAction = menu.exec(treeView->mapToGlobal(point));
- if (!pickedAction)
- return;
+ connect(bookmarkTreeView, SIGNAL(activated(QModelIndex)), this,
+ SLOT(setSourceFromIndex(QModelIndex)));
+ connect(bookmarkTreeView, SIGNAL(customContextMenuRequested(QPoint)), this,
+ SLOT(customContextMenuRequested(QPoint)));
- if (pickedAction == showItem) {
- emit requestShowLink(data);
- }
- else if (pickedAction == showItemNewTab) {
- CentralWidget::instance()->setSourceInNewTab(data);
- }
- else if (pickedAction == removeItem) {
- bookmarkManager->removeBookmarkItem(treeView,
- filterBookmarkModel->mapToSource(index));
- }
- else if (pickedAction == renameItem) {
- const QModelIndex &source = filterBookmarkModel->mapToSource(index);
- QStandardItem *item =
- bookmarkManager->treeBookmarkModel()->itemFromIndex(source);
- if (item) {
- item->setEditable(true);
- treeView->edit(index);
- item->setEditable(false);
- }
- }
+ connect(&HelpEngineWrapper::instance(), SIGNAL(setupFinished()), this,
+ SLOT(setupFinished()));
+ connect(bookmarkModel, SIGNAL(rowsRemoved(QModelIndex, int, int)), this,
+ SLOT(refeshBookmarkMenu()));
+ connect(bookmarkModel, SIGNAL(rowsInserted(QModelIndex, int, int)), this,
+ SLOT(refeshBookmarkMenu()));
+ connect(bookmarkModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this,
+ SLOT(refeshBookmarkMenu()));
}
-void BookmarkWidget::setup(bool showButtons)
+BookmarkManager::~BookmarkManager()
{
- regExp.setPatternSyntax(QRegExp::FixedString);
- regExp.setCaseSensitivity(Qt::CaseInsensitive);
-
- QLayout *vlayout = new QVBoxLayout(this);
- vlayout->setMargin(4);
-
- QLabel *label = new QLabel(tr("Filter:"), this);
- vlayout->addWidget(label);
-
- searchField = new QLineEdit(this);
- vlayout->addWidget(searchField);
- connect(searchField, SIGNAL(textChanged(QString)), this,
- SLOT(filterChanged()));
-
- treeView = new TreeView(this);
- vlayout->addWidget(treeView);
-
-#ifdef Q_OS_MAC
-# define SYSTEM "mac"
-#else
-# define SYSTEM "win"
-#endif
-
- if (showButtons) {
- QLayout *hlayout = new QHBoxLayout();
- vlayout->addItem(hlayout);
-
- hlayout->addItem(new QSpacerItem(40, 20, QSizePolicy::Expanding));
-
- addButton = new QToolButton(this);
- addButton->setText(tr("Add"));
- addButton->setIcon(QIcon(QLatin1String(":/trolltech/assistant/images/"
- SYSTEM "/addtab.png")));
- addButton->setAutoRaise(true);
- addButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
- hlayout->addWidget(addButton);
- connect(addButton, SIGNAL(clicked()), this, SIGNAL(addBookmark()));
-
- removeButton = new QToolButton(this);
- removeButton->setText(tr("Remove"));
- removeButton->setIcon(QIcon(QLatin1String(":/trolltech/assistant/images/"
- SYSTEM "/closetab.png")));
- removeButton->setAutoRaise(true);
- removeButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
- hlayout->addWidget(removeButton);
- connect(removeButton, SIGNAL(clicked()), this, SLOT(removeClicked()));
- }
-
- filterBookmarkModel = new QSortFilterProxyModel(this);
- treeView->setModel(filterBookmarkModel);
-
- treeView->setDragEnabled(true);
- treeView->setAcceptDrops(true);
- treeView->setAutoExpandDelay(1000);
- treeView->setDropIndicatorShown(true);
- treeView->header()->setVisible(false);
- treeView->setContextMenuPolicy(Qt::CustomContextMenu);
-
- connect(treeView, SIGNAL(expanded(QModelIndex)), this,
- SLOT(expand(QModelIndex)));
- connect(treeView, SIGNAL(collapsed(QModelIndex)), this,
- SLOT(expand(QModelIndex)));
- connect(treeView, SIGNAL(activated(QModelIndex)), this,
- SLOT(activated(QModelIndex)));
- connect(treeView, SIGNAL(customContextMenuRequested(QPoint)),
- this, SLOT(customContextMenuRequested(QPoint)));
-
- filterBookmarkModel->setFilterKeyColumn(0);
- filterBookmarkModel->setDynamicSortFilter(true);
- filterBookmarkModel->setSourceModel(bookmarkManager->treeBookmarkModel());
-
- expandItems();
+ TRACE_OBJ
+ delete bookmarkManagerWidget;
+ HelpEngineWrapper::instance().setBookmarks(bookmarkModel->bookmarks());
+ delete bookmarkModel;
}
-void BookmarkWidget::expandItems()
+void BookmarkManager::removeItem(const QModelIndex &index)
{
- QStandardItemModel *model = bookmarkManager->treeBookmarkModel();
- QList<QStandardItem*>list = model->findItems(QLatin1String("*"),
- Qt::MatchWildcard | Qt::MatchRecursive, 0);
- foreach (const QStandardItem *item, list) {
- const QModelIndex &index = model->indexFromItem(item);
- treeView->setExpanded(filterBookmarkModel->mapFromSource(index),
- item->data(Qt::UserRole + 11).toBool());
+ TRACE_OBJ
+ QModelIndex current = index;
+ if (typeAndSearch) { // need to map because of proxy
+ current = typeAndSearchModel->mapToSource(current);
+ current = bookmarkFilterModel->mapToSource(current);
+ } else if (!bookmarkModel->parent(index).isValid()) {
+ return; // check if we should delete the "Bookmarks Menu", bail
}
-}
-
-void BookmarkWidget::focusInEvent(QFocusEvent *e)
-{
- if (e->reason() != Qt::MouseFocusReason) {
- searchField->selectAll();
- searchField->setFocus();
-
- QModelIndex index = treeView->indexAt(QPoint(1, 1));
- if (index.isValid())
- treeView->setCurrentIndex(index);
+ if (bookmarkModel->hasChildren(current)) {
+ int value = QMessageBox::question(bookmarkTreeView, tr("Remove"),
+ tr("You are going to delete a Folder, this will also<br>"
+ "remove it's content. Are you sure to continue?"),
+ QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
+ if (value == QMessageBox::Cancel)
+ return;
}
+ bookmarkModel->removeItem(current);
}
-bool BookmarkWidget::eventFilter(QObject *object, QEvent *e)
+bool BookmarkManager::eventFilter(QObject *object, QEvent *event)
{
- if (object != this && object != treeView
- && object != treeView->viewport()) {
- return QWidget::eventFilter(object, e);
- }
+ if (object != bookmarkTreeView && object != bookmarkTreeView->viewport()
+ && object != bookmarkWidget)
+ return QObject::eventFilter(object, event);
- if (e->type() == QEvent::KeyPress) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
- const bool tree = object == treeView || object == treeView->viewport();
+ TRACE_OBJ
+ const bool isWidget = object == bookmarkWidget;
+ if (event->type() == QEvent::KeyPress) {
+ QKeyEvent *ke = static_cast<QKeyEvent*>(event);
switch (ke->key()) {
case Qt::Key_F2: {
- const QModelIndex &index = treeView->currentIndex();
- const QModelIndex &src = filterBookmarkModel->mapToSource(index);
- if (tree && searchField->text().isEmpty()) {
- if (QStandardItem *item = bookmarkManager->treeBookmarkModel()
- ->itemFromIndex(src)) {
- item->setEditable(true);
- treeView->edit(index);
- item->setEditable(false);
- }
- }
- } break;
-
- case Qt::Key_Enter: {
- case Qt::Key_Return:
- if (tree) {
- const QString &data = treeView->selectionModel()->currentIndex()
- .data(Qt::UserRole + 10).toString();
- if (!data.isEmpty() && data != QLatin1String("Folder"))
- emit requestShowLink(data);
- }
+ renameBookmark(bookmarkTreeView->currentIndex());
} break;
case Qt::Key_Delete: {
- const QModelIndex &index = treeView->currentIndex();
- const QModelIndex &src = filterBookmarkModel->mapToSource(index);
- if (tree && searchField->text().isEmpty())
- bookmarkManager->removeBookmarkItem(treeView, src);
+ removeItem(bookmarkTreeView->currentIndex());
} break;
- case Qt::Key_Up: {
+ case Qt::Key_Up: { // needs event filter on widget
case Qt::Key_Down:
- if (!tree)
- treeView->subclassKeyPressEvent(ke);
+ if (isWidget)
+ bookmarkTreeView->subclassKeyPressEvent(ke);
} break;
case Qt::Key_Escape: {
@@ -591,324 +256,232 @@ bool BookmarkWidget::eventFilter(QObject *object, QEvent *e)
}
}
- if (e->type() == QEvent::MouseButtonRelease) {
- QMouseEvent *me = static_cast<QMouseEvent*>(e);
- bool controlPressed = me->modifiers() & Qt::ControlModifier;
- if(((me->button() == Qt::LeftButton) && controlPressed)
- || (me->button() == Qt::MidButton)) {
- const QModelIndex &index = treeView->currentIndex();
- const QString &data = index.data(Qt::UserRole + 10).toString();
- if (!data.isEmpty() && data != QLatin1String("Folder"))
- CentralWidget::instance()->setSourceInNewTab(data);
+ if (event->type() == QEvent::MouseButtonRelease && !isWidget) {
+ QMouseEvent *me = static_cast<QMouseEvent*>(event);
+ switch (me->button()) {
+ case Qt::LeftButton: {
+ if (me->modifiers() & Qt::ControlModifier)
+ setSourceFromIndex(bookmarkTreeView->currentIndex(), true);
+ } break;
+
+ case Qt::MidButton: {
+ setSourceFromIndex(bookmarkTreeView->currentIndex(), true);
+ } break;
+
+ default: break;
}
}
- return QWidget::eventFilter(object, e);
+ return QObject::eventFilter(object, event);
}
-
-// #pragma mark -- BookmarkModel
-
-
-BookmarkModel::BookmarkModel(int rows, int columns, QObject *parent)
- : QStandardItemModel(rows, columns, parent)
+void BookmarkManager::buildBookmarksMenu(const QModelIndex &index, QMenu* menu)
{
-}
+ TRACE_OBJ
+ if (!index.isValid())
+ return;
-BookmarkModel::~BookmarkModel()
-{
+ const QString &text = index.data().toString();
+ const QIcon &icon = qVariantValue<QIcon>(index.data(Qt::DecorationRole));
+ if (index.data(UserRoleFolder).toBool()) {
+ if (QMenu* subMenu = menu->addMenu(icon, text)) {
+ for (int i = 0; i < bookmarkModel->rowCount(index); ++i)
+ buildBookmarksMenu(bookmarkModel->index(i, 0, index), subMenu);
+ }
+ } else {
+ QAction *action = menu->addAction(icon, text);
+ action->setData(index.data(UserRoleUrl).toString());
+ }
}
-Qt::DropActions BookmarkModel::supportedDropActions() const
+void BookmarkManager::showBookmarkDialog(const QString &name, const QString &url)
{
- return Qt::MoveAction;
+ TRACE_OBJ
+ BookmarkDialog dialog(bookmarkModel, name, url, bookmarkTreeView);
+ dialog.exec();
}
-Qt::ItemFlags BookmarkModel::flags(const QModelIndex &index) const
-{
- Qt::ItemFlags defaultFlags = QStandardItemModel::flags(index);
- if ((!index.isValid()) // can only happen for the invisible root item
- || index.data(Qt::UserRole + 10).toString() == QLatin1String("Folder"))
- return (Qt::ItemIsDropEnabled | defaultFlags) &~ Qt::ItemIsDragEnabled;
+// -- private slots
- return (Qt::ItemIsDragEnabled | defaultFlags) &~ Qt::ItemIsDropEnabled;
-}
+void BookmarkManager::setupFinished()
+{
+ TRACE_OBJ
+ bookmarkModel->setBookmarks(HelpEngineWrapper::instance().bookmarks());
+ bookmarkModel->expandFoldersIfNeeeded(bookmarkTreeView);
+ refeshBookmarkMenu();
-// #pragma mark -- BookmarkManager
+ bookmarkTreeView->hideColumn(1);
+ bookmarkTreeView->header()->setVisible(false);
+ bookmarkTreeView->header()->setStretchLastSection(true);
+ bookmarkFilterModel = new BookmarkFilterModel(this);
+ bookmarkFilterModel->setSourceModel(bookmarkModel);
+ bookmarkFilterModel->filterBookmarkFolders();
-BookmarkManager::BookmarkManager(QHelpEngineCore *_helpEngine)
- : treeModel(new BookmarkModel(0, 1, this))
- , listModel(new BookmarkModel(0, 1, this))
- , renameItem(0)
- , helpEngine(_helpEngine)
-{
- folderIcon = QApplication::style()->standardIcon(QStyle::SP_DirClosedIcon);
-
- connect(treeModel, SIGNAL(itemChanged(QStandardItem*)), this,
- SLOT(itemChanged(QStandardItem*)));
- connect(treeModel, SIGNAL(itemChanged(QStandardItem*)), this,
- SIGNAL(bookmarksChanged()));
- connect(treeModel, SIGNAL(rowsRemoved(QModelIndex,int,int)),
- this, SIGNAL(bookmarksChanged()));
+ typeAndSearchModel = new QSortFilterProxyModel(this);
+ typeAndSearchModel->setDynamicSortFilter(true);
+ typeAndSearchModel->setSourceModel(bookmarkFilterModel);
}
-BookmarkManager::~BookmarkManager()
+void BookmarkManager::addBookmark()
{
- treeModel->clear();
- listModel->clear();
+ TRACE_OBJ
+ if (CentralWidget *widget = CentralWidget::instance())
+ addBookmark(widget->currentTitle(), widget->currentSource().toString());
}
-BookmarkModel* BookmarkManager::treeBookmarkModel()
+void BookmarkManager::removeBookmark()
{
- return treeModel;
+ TRACE_OBJ
+ removeItem(bookmarkTreeView->currentIndex());
}
-BookmarkModel* BookmarkManager::listBookmarkModel()
+void BookmarkManager::manageBookmarks()
{
- return listModel;
+ TRACE_OBJ
+ if (bookmarkManagerWidget == 0) {
+ bookmarkManagerWidget = new BookmarkManagerWidget(bookmarkModel);
+ connect(bookmarkManagerWidget, SIGNAL(setSource(QUrl)), this,
+ SIGNAL(setSource(QUrl)));
+ connect(bookmarkManagerWidget, SIGNAL(setSourceInNewTab(QUrl))
+ , this, SIGNAL(setSourceInNewTab(QUrl)));
+ connect(bookmarkManagerWidget, SIGNAL(managerWidgetAboutToClose())
+ , this, SLOT(managerWidgetAboutToClose()));
+ }
+ bookmarkManagerWidget->show();
+ bookmarkManagerWidget->raise();
}
-void BookmarkManager::saveBookmarks()
+void BookmarkManager::refeshBookmarkMenu()
{
- QByteArray bookmarks;
- QDataStream stream(&bookmarks, QIODevice::WriteOnly);
+ TRACE_OBJ
+ if (!bookmarkMenu)
+ return;
- readBookmarksRecursive(treeModel->invisibleRootItem(), stream, 0);
- helpEngine->setCustomValue(QLatin1String("Bookmarks"), bookmarks);
-}
+ bookmarkMenu->clear();
-QStringList BookmarkManager::bookmarkFolders() const
-{
- QStringList folders(tr("Bookmarks"));
+ bookmarkMenu->addAction(tr("Manage Bookmarks..."), this,
+ SLOT(manageBookmarks()));
+ bookmarkMenu->addAction(tr("Add Bookmark..."), this, SLOT(addBookmark()),
+ QKeySequence(tr("Ctrl+D")));
+ bookmarkMenu->addSeparator();
- QList<QStandardItem*>list = treeModel->findItems(QLatin1String("*"),
- Qt::MatchWildcard | Qt::MatchRecursive, 0);
-
- QString data;
- foreach (const QStandardItem *item, list) {
- data = item->data(Qt::UserRole + 10).toString();
- if (data == QLatin1String("Folder"))
- folders << item->data(Qt::DisplayRole).toString();
- }
- return folders;
-}
+ const QModelIndex &root = bookmarkModel->index(0, 0, QModelIndex());
+ for (int i = 0; i < bookmarkModel->rowCount(root); ++i)
+ buildBookmarksMenu(bookmarkModel->index(i, 0, root), bookmarkMenu);
-QModelIndex BookmarkManager::addNewFolder(const QModelIndex &index)
-{
- QStandardItem *item = new QStandardItem(uniqueFolderName());
- item->setEditable(false);
- item->setData(false, Qt::UserRole + 11);
- item->setData(QLatin1String("Folder"), Qt::UserRole + 10);
- item->setIcon(QApplication::style()->standardIcon(QStyle::SP_DirClosedIcon));
-
- if (index.isValid()) {
- treeModel->itemFromIndex(index)->appendRow(item);
- } else {
- treeModel->appendRow(item);
- }
- return treeModel->indexFromItem(item);
+ connect(bookmarkMenu, SIGNAL(triggered(QAction*)), this,
+ SLOT(setSourceFromAction(QAction*)));
}
-void BookmarkManager::removeBookmarkItem(QTreeView *treeView,
- const QModelIndex &index)
+void BookmarkManager::renameBookmark(const QModelIndex &index)
{
- QStandardItem *item = treeModel->itemFromIndex(index);
- if (item) {
- QString data = index.data(Qt::UserRole + 10).toString();
- if (data == QLatin1String("Folder") && item->rowCount() > 0) {
- int value = QMessageBox::question(treeView, tr("Remove"),
- tr("You are going to delete a Folder, this will also<br>"
- "remove it's content. Are you sure to continue?"),
- QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
-
- if (value == QMessageBox::Cancel)
- return;
- }
-
- if (data != QLatin1String("Folder")) {
- QList<QStandardItem*>itemList = listModel->findItems(item->text());
- foreach (const QStandardItem *i, itemList) {
- if (i->data(Qt::UserRole + 10) == data) {
- listModel->removeRow(i->row());
- break;
- }
- }
- } else {
- removeBookmarkFolderItems(item);
- }
- treeModel->removeRow(item->row(), index.parent());
- }
-}
+ // check if we should rename the "Bookmarks Menu", bail
+ if (!typeAndSearch && !bookmarkModel->parent(index).isValid())
+ return;
-void BookmarkManager::showBookmarkDialog(QWidget *parent, const QString &name,
- const QString &url)
-{
- BookmarkDialog dialog(this, name, url, parent);
- dialog.exec();
+ bookmarkModel->setItemsEditable(true);
+ bookmarkTreeView->edit(index);
+ bookmarkModel->setItemsEditable(false);
}
-void BookmarkManager::addNewBookmark(const QModelIndex &index,
- const QString &name, const QString &url)
+void BookmarkManager::setSourceFromAction(QAction *action)
{
- QStandardItem *item = new QStandardItem(name);
- item->setEditable(false);
- item->setData(false, Qt::UserRole + 11);
- item->setData(url, Qt::UserRole + 10);
+ TRACE_OBJ
+ const QVariant &data = action->data();
- if (index.isValid())
- treeModel->itemFromIndex(index)->appendRow(item);
- else
- treeModel->appendRow(item);
- listModel->appendRow(item->clone());
- emit bookmarksChanged();
+ if (data.canConvert<QUrl>())
+ emit setSource(data.toUrl());
}
-void BookmarkManager::fillBookmarkMenu(QMenu *menu)
+void BookmarkManager::setSourceFromIndex(const QModelIndex &index, bool newTab)
{
- if (!menu || !treeModel)
- return;
+ TRACE_OBJ
+ QAbstractItemModel *base = bookmarkModel;
+ if (typeAndSearch)
+ base = typeAndSearchModel;
- map.clear();
- fillBookmarkMenu(menu, treeModel->invisibleRootItem());
-}
-
-void BookmarkManager::fillBookmarkMenu(QMenu *menu, QStandardItem *root)
-{
- for (int i = 0; i < root->rowCount(); ++i) {
- QStandardItem *item = root->child(i);
- if (item && item->data(Qt::UserRole + 10)
- .toString() == QLatin1String("Folder")) {
- QMenu* newMenu = menu->addMenu(folderIcon, item->text());
- if (item->rowCount() > 0)
- fillBookmarkMenu(newMenu, item);
- } else {
- map.insert(menu->addAction(item->text()), item->index());
- }
- }
-}
+ if (base->data(index, UserRoleFolder).toBool())
+ return;
-QUrl BookmarkManager::urlForAction(QAction* action) const
-{
- if (map.contains(action)) {
- const QModelIndex &index = map.value(action);
- if (QStandardItem* item = treeModel->itemFromIndex(index))
- return QUrl(item->data(Qt::UserRole + 10).toString());
+ const QVariant &data = base->data(index, UserRoleUrl);
+ if (data.canConvert<QUrl>()) {
+ if (newTab)
+ emit setSourceInNewTab(data.toUrl());
+ else
+ emit setSource(data.toUrl());
}
- return QUrl();
}
-void BookmarkManager::itemChanged(QStandardItem *item)
+void BookmarkManager::customContextMenuRequested(const QPoint &point)
{
- if (renameItem != item) {
- renameItem = item;
- oldText = item->text();
+ TRACE_OBJ
+ QModelIndex index = bookmarkTreeView->indexAt(point);
+ if (!index.isValid())
return;
- }
- if (item->text() != oldText) {
- if (item->data(Qt::UserRole + 10).toString() != QLatin1String("Folder")) {
- QList<QStandardItem*>itemList = listModel->findItems(oldText);
- if (itemList.count() > 0)
- itemList.at(0)->setText(item->text());
- }
- }
-}
+ // check if we should open the menu on "Bookmarks Menu", bail
+ if (!typeAndSearch && !bookmarkModel->parent(index).isValid())
+ return;
-void BookmarkManager::setupBookmarkModels()
-{
- treeModel->clear();
- listModel->clear();
-
- qint32 depth;
- bool expanded;
- QString name, type;
- QList<int> lastDepths;
- QList<QStandardItem*> parents;
-
- QByteArray ba =
- helpEngine->customValue(QLatin1String("Bookmarks")).toByteArray();
- QDataStream stream(ba);
- while (!stream.atEnd()) {
- stream >> depth >> name >> type >> expanded;
-
- QStandardItem *item = new QStandardItem(name);
- item->setEditable(false);
- item->setData(type, Qt::UserRole + 10);
- item->setData(expanded, Qt::UserRole + 11);
- if (depth == 0) {
- parents.clear(); lastDepths.clear();
- treeModel->appendRow(item);
- parents << item; lastDepths << depth;
- } else {
- if (depth <= lastDepths.last()) {
- while (depth <= lastDepths.last() && parents.count() > 0) {
- parents.pop_back(); lastDepths.pop_back();
- }
- }
- parents.last()->appendRow(item);
- if (type == QLatin1String("Folder")) {
- parents << item; lastDepths << depth;
- }
- }
+ QAction *remove = 0;
+ QAction *rename = 0;
+ QAction *showItem = 0;
+ QAction *showItemInNewTab = 0;
- if (type == QLatin1String("Folder"))
- item->setIcon(folderIcon);
- else
- listModel->appendRow(item->clone());
+ QMenu menu(QLatin1String(""));
+ if (!typeAndSearch && bookmarkModel->data(index, UserRoleFolder).toBool()) {
+ remove = menu.addAction(tr("Delete Folder"));
+ rename = menu.addAction(tr("Rename Folder"));
+ } else {
+ showItem = menu.addAction(tr("Show Bookmark"));
+ showItemInNewTab = menu.addAction(tr("Show Bookmark in New Tab"));
+ menu.addSeparator();
+ remove = menu.addAction(tr("Delete Bookmark"));
+ rename = menu.addAction(tr("Rename Bookmark"));
}
+
+ QAction *pickedAction = menu.exec(bookmarkTreeView->mapToGlobal(point));
+ if (pickedAction == rename)
+ renameBookmark(index);
+ else if (pickedAction == remove)
+ removeItem(index);
+ else if (pickedAction == showItem || pickedAction == showItemInNewTab)
+ setSourceFromIndex(index, pickedAction == showItemInNewTab);
}
-QString BookmarkManager::uniqueFolderName() const
+void BookmarkManager::focusInEvent()
{
- QString folderName = tr("New Folder");
- QList<QStandardItem*> list = treeModel->findItems(folderName,
- Qt::MatchContains | Qt::MatchRecursive, 0);
- if (!list.isEmpty()) {
- QStringList names;
- foreach (const QStandardItem *item, list)
- names << item->text();
-
- for (int i = 1; i <= names.count(); ++i) {
- folderName = (tr("New Folder") + QLatin1String(" %1")).arg(i);
- if (!names.contains(folderName))
- break;
- }
- }
- return folderName;
+ TRACE_OBJ
+ const QModelIndex &index = bookmarkTreeView->indexAt(QPoint(2, 2));
+ if (index.isValid())
+ bookmarkTreeView->setCurrentIndex(index);
}
-void BookmarkManager::removeBookmarkFolderItems(QStandardItem *item)
+void BookmarkManager::managerWidgetAboutToClose()
{
- for (int j = 0; j < item->rowCount(); ++j) {
- QStandardItem *child = item->child(j);
- if (child->rowCount() > 0)
- removeBookmarkFolderItems(child);
-
- QString data = child->data(Qt::UserRole + 10).toString();
- QList<QStandardItem*>itemList = listModel->findItems(child->text());
- foreach (const QStandardItem *i, itemList) {
- if (i->data(Qt::UserRole + 10) == data) {
- listModel->removeRow(i->row());
- break;
- }
- }
- }
+ delete bookmarkManagerWidget;
+ bookmarkManagerWidget = 0;
}
-void BookmarkManager::readBookmarksRecursive(const QStandardItem *item,
- QDataStream &stream, const qint32 depth) const
+void BookmarkManager::textChanged(const QString &text)
{
- for (int j = 0; j < item->rowCount(); ++j) {
- const QStandardItem *child = item->child(j);
- stream << depth;
- stream << child->data(Qt::DisplayRole).toString();
- stream << child->data(Qt::UserRole + 10).toString();
- stream << child->data(Qt::UserRole + 11).toBool();
-
- if (child->rowCount() > 0)
- readBookmarksRecursive(child, stream, (depth +1));
+ TRACE_OBJ
+ if (!bookmarkWidget->ui.lineEdit->text().isEmpty()) {
+ if (!typeAndSearch) {
+ typeAndSearch = true;
+ bookmarkTreeView->setItemsExpandable(false);
+ bookmarkTreeView->setRootIsDecorated(false);
+ bookmarkTreeView->setModel(typeAndSearchModel);
+ }
+ typeAndSearchModel->setFilterRegExp(QRegExp(text));
+ } else {
+ typeAndSearch = false;
+ bookmarkTreeView->setModel(bookmarkModel);
+ bookmarkTreeView->setItemsExpandable(true);
+ bookmarkTreeView->setRootIsDecorated(true);
+ bookmarkModel->expandFoldersIfNeeeded(bookmarkTreeView);
}
}
diff --git a/tools/assistant/tools/assistant/bookmarkmanager.h b/tools/assistant/tools/assistant/bookmarkmanager.h
index da36833337..c26dad8b65 100644
--- a/tools/assistant/tools/assistant/bookmarkmanager.h
+++ b/tools/assistant/tools/assistant/bookmarkmanager.h
@@ -38,178 +38,118 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
#ifndef BOOKMARKMANAGER_H
#define BOOKMARKMANAGER_H
-#include "ui_bookmarkdialog.h"
-
-#include <QtCore/QUrl>
-#include <QtCore/QObject>
-#include <QtCore/QString>
-#include <QtCore/QByteArray>
-#include <QtCore/QDataStream>
-
-#include <QtGui/QIcon>
-#include <QtGui/QDialog>
-#include <QtGui/QWidget>
+#include <QtCore/QMutex>
#include <QtGui/QTreeView>
-#include <QtGui/QStandardItemModel>
+
+#include "ui_bookmarkwidget.h"
QT_BEGIN_NAMESPACE
-class QEvent;
-class QLineEdit;
-class QTreeView;
-class QToolButton;
-class QStandardItem;
-class QHelpEngineCore;
-class QAbstractItemModel;
+class BookmarkManagerWidget;
+class BookmarkModel;
+class BookmarkFilterModel;
+class QKeyEvent;
class QSortFilterProxyModel;
-class BookmarkManager;
-
-class BookmarkDialog : public QDialog
+class BookmarkManager : public QObject
{
Q_OBJECT
+ class BookmarkWidget;
+ class BookmarkTreeView;
+ class BookmarkListView;
+ Q_DISABLE_COPY(BookmarkManager);
public:
- BookmarkDialog(BookmarkManager *manager, const QString &title,
- const QString &url, QWidget *parent = 0);
- ~BookmarkDialog();
+ static BookmarkManager* instance();
+ static void destroy();
-private slots:
- void addAccepted();
- void addNewFolder();
- void toolButtonClicked();
- void itemChanged(QStandardItem *item);
- void textChanged(const QString& string);
- void selectBookmarkFolder(const QString &folderName);
- void customContextMenuRequested(const QPoint &point);
- void currentChanged(const QModelIndex& current);
-
-private:
- bool eventFilter(QObject *object, QEvent *e);
+ QWidget* bookmarkDockWidget() const;
+ void takeBookmarksMenu(QMenu* menu);
-private:
- QString m_url;
- QString m_title;
-
- QString oldText;
- QStandardItem *renameItem;
+public slots:
+ void addBookmark(const QString &title, const QString &url);
- Ui::BookmarkDialog ui;
- BookmarkManager *bookmarkManager;
- QSortFilterProxyModel *proxyModel;
-};
+signals:
+ void escapePressed();
+ void setSource(const QUrl &url);
+ void setSourceInNewTab(const QUrl &url);
-class TreeView : public QTreeView {
- Q_OBJECT
-public:
- TreeView(QWidget* parent = 0) : QTreeView(parent) {}
- void subclassKeyPressEvent(QKeyEvent* event)
- {
- QTreeView::keyPressEvent(event);
- }
-};
+private:
+ BookmarkManager();
+ ~BookmarkManager();
-class BookmarkWidget : public QWidget
-{
- Q_OBJECT
+ void removeItem(const QModelIndex &index);
+ bool eventFilter(QObject *object, QEvent *event);
+ void buildBookmarksMenu(const QModelIndex &index, QMenu *menu);
+ void showBookmarkDialog(const QString &name, const QString &url);
-public:
- BookmarkWidget(BookmarkManager *manager, QWidget *parent = 0,
- bool showButtons = true);
- ~BookmarkWidget();
+private slots:
+ void setupFinished();
-signals:
void addBookmark();
- void requestShowLink(const QUrl &url);
- void escapePressed();
+ void removeBookmark();
+ void manageBookmarks();
+ void refeshBookmarkMenu();
+ void renameBookmark(const QModelIndex &index);
-private slots:
- void removeClicked();
- void filterChanged();
- void expand(const QModelIndex& index);
- void activated(const QModelIndex &index);
+ void setSourceFromAction(QAction *action);
+ void setSourceFromIndex(const QModelIndex &index, bool newTab = false);
+
+ void focusInEvent();
+ void managerWidgetAboutToClose();
+ void textChanged(const QString &text);
void customContextMenuRequested(const QPoint &point);
private:
- void setup(bool showButtons);
- void expandItems();
- void focusInEvent(QFocusEvent *e);
- bool eventFilter(QObject *object, QEvent *event);
+ bool typeAndSearch;
-private:
- QRegExp regExp;
- TreeView *treeView;
- QLineEdit *searchField;
- QToolButton *addButton;
- QToolButton *removeButton;
- BookmarkManager *bookmarkManager;
- QSortFilterProxyModel* filterBookmarkModel;
-};
+ static QMutex mutex;
+ static BookmarkManager *bookmarkManager;
-class BookmarkModel : public QStandardItemModel
-{
- Q_OBJECT
+ QMenu *bookmarkMenu;
-public:
- BookmarkModel(int rows, int columns, QObject *parent = 0);
- ~BookmarkModel();
+ BookmarkModel *bookmarkModel;
+ BookmarkFilterModel *bookmarkFilterModel;
+ QSortFilterProxyModel *typeAndSearchModel;
- Qt::DropActions supportedDropActions() const;
- Qt::ItemFlags flags(const QModelIndex &index) const;
+ BookmarkWidget *bookmarkWidget;
+ BookmarkTreeView *bookmarkTreeView;
+ BookmarkManagerWidget *bookmarkManagerWidget;
};
-class BookmarkManager : public QObject
+class BookmarkManager::BookmarkWidget : public QWidget
{
Q_OBJECT
-
public:
- BookmarkManager(QHelpEngineCore* helpEngine);
- ~BookmarkManager();
+ BookmarkWidget(QWidget *parent = 0)
+ : QWidget(parent) { ui.setupUi(this); }
+ virtual ~BookmarkWidget() {}
- BookmarkModel* treeBookmarkModel();
- BookmarkModel* listBookmarkModel();
-
- void saveBookmarks();
- QStringList bookmarkFolders() const;
- QModelIndex addNewFolder(const QModelIndex& index);
- void removeBookmarkItem(QTreeView *treeView, const QModelIndex& index);
- void showBookmarkDialog(QWidget* parent, const QString &name,
- const QString &url);
- void addNewBookmark(const QModelIndex& index, const QString &name,
- const QString &url);
- void setupBookmarkModels();
-
- void fillBookmarkMenu(QMenu *menu);
- QUrl urlForAction(QAction* action) const;
+ Ui::BookmarkWidget ui;
signals:
- void bookmarksChanged();
-
-private slots:
- void itemChanged(QStandardItem *item);
+ void focusInEvent();
private:
- QString uniqueFolderName() const;
- void removeBookmarkFolderItems(QStandardItem *item);
- void readBookmarksRecursive(const QStandardItem *item, QDataStream &stream,
- const qint32 depth) const;
- void fillBookmarkMenu(QMenu *menu, QStandardItem *root);
+ void focusInEvent(QFocusEvent *event);
+};
-private:
- QString oldText;
- QIcon folderIcon;
-
- BookmarkModel *treeModel;
- BookmarkModel *listModel;
- QStandardItem *renameItem;
- QHelpEngineCore *helpEngine;
- QMap<QAction*, QModelIndex> map;
+class BookmarkManager::BookmarkTreeView : public QTreeView
+{
+ Q_OBJECT
+public:
+ BookmarkTreeView(QWidget *parent = 0);
+ ~BookmarkTreeView() {}
+
+ void subclassKeyPressEvent(QKeyEvent *event);
+
+private slots:
+ void setExpandedData(const QModelIndex &index);
};
QT_END_NAMESPACE
-#endif
+#endif // BOOKMARKMANAGER_H
diff --git a/tools/assistant/tools/assistant/bookmarkmanagerwidget.cpp b/tools/assistant/tools/assistant/bookmarkmanagerwidget.cpp
new file mode 100644
index 0000000000..65df6be422
--- /dev/null
+++ b/tools/assistant/tools/assistant/bookmarkmanagerwidget.cpp
@@ -0,0 +1,321 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "bookmarkmanagerwidget.h"
+#include "bookmarkitem.h"
+#include "bookmarkmodel.h"
+#include "tracer.h"
+#include "xbelsupport.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtCore/QFile>
+#include <QtCore/QUrl>
+
+#include <QtGui/QCloseEvent>
+#include <QtGui/QFileDialog>
+#include <QtGui/QKeySequence>
+#include <QtGui/QMessageBox>
+#include <QtGui/QShortcut>
+
+QT_BEGIN_NAMESPACE
+
+namespace {
+ #define TR(x) QCoreApplication::translate("BookmarkManager", x)
+}
+
+BookmarkManagerWidget::BookmarkManagerWidget(BookmarkModel *sourceModel,
+ QWidget *parent)
+ : QWidget(parent)
+ , bookmarkModel(sourceModel)
+{
+ TRACE_OBJ
+ ui.setupUi(this);
+
+ ui.treeView->setModel(bookmarkModel);
+
+ ui.treeView->expandAll();
+ ui.treeView->installEventFilter(this);
+ ui.treeView->viewport()->installEventFilter(this);
+ ui.treeView->setContextMenuPolicy(Qt::CustomContextMenu);
+
+ connect(ui.treeView, SIGNAL(customContextMenuRequested(QPoint)), this,
+ SLOT(customContextMenuRequested(QPoint)));
+
+ connect(ui.remove, SIGNAL(clicked()), this, SLOT(removeItem()));
+ connect(ui.lineEdit, SIGNAL(textChanged(QString)), this,
+ SLOT(textChanged(QString)));
+ new QShortcut(QKeySequence::Find, ui.lineEdit, SLOT(setFocus()));
+
+ importExportMenu.addAction(tr("Import..."), this, SLOT(importBookmarks()));
+ importExportMenu.addAction(tr("Export..."), this, SLOT(exportBookmarks()));
+ ui.importExport->setMenu(&importExportMenu);
+
+ new QShortcut(QKeySequence::FindNext, this, SLOT(findNext()));
+ new QShortcut(QKeySequence::FindPrevious, this, SLOT(findPrevious()));
+
+ connect(bookmarkModel, SIGNAL(rowsRemoved(QModelIndex, int, int)), this,
+ SLOT(refeshBookmarkCache()));
+ connect(bookmarkModel, SIGNAL(rowsInserted(QModelIndex, int, int)), this,
+ SLOT(refeshBookmarkCache()));
+ connect(bookmarkModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this,
+ SLOT(refeshBookmarkCache()));
+
+ ui.treeView->setCurrentIndex(ui.treeView->indexAt(QPoint(2, 2)));
+}
+
+BookmarkManagerWidget::~BookmarkManagerWidget()
+{
+ TRACE_OBJ
+}
+
+void BookmarkManagerWidget::closeEvent(QCloseEvent *event)
+{
+ TRACE_OBJ
+ event->accept();
+ emit managerWidgetAboutToClose();
+}
+
+void BookmarkManagerWidget::renameItem(const QModelIndex &index)
+{
+ TRACE_OBJ
+ // check if we should rename the "Bookmarks Menu", bail
+ if (!bookmarkModel->parent(index).isValid())
+ return;
+
+ bookmarkModel->setItemsEditable(true);
+ ui.treeView->edit(index);
+ bookmarkModel->setItemsEditable(false);
+}
+
+static int nextIndex(int current, int count, bool forward)
+{
+ TRACE_OBJ
+ if (current >= 0)
+ return (forward ? (current + 1) : ((current - 1) + count)) % count;
+ return 0;
+}
+
+void BookmarkManagerWidget::selectNextIndex(bool direction) const
+{
+ QModelIndex current = ui.treeView->currentIndex();
+ if (current.isValid() && !cache.isEmpty()) {
+ current = cache.at(nextIndex(cache.indexOf(current), cache.count(),
+ direction));
+ }
+ ui.treeView->setCurrentIndex(current);
+}
+
+bool BookmarkManagerWidget::eventFilter(QObject *object, QEvent *event)
+{
+ TRACE_OBJ
+ if (object != ui.treeView && object != ui.treeView->viewport())
+ return QWidget::eventFilter(object, event);
+
+ if (event->type() == QEvent::KeyPress) {
+ QKeyEvent *ke = static_cast<QKeyEvent*>(event);
+ switch (ke->key()) {
+ case Qt::Key_F2: {
+ renameItem(ui.treeView->currentIndex());
+ } break;
+
+ case Qt::Key_Delete: {
+ removeItem(ui.treeView->currentIndex());
+ } break;
+
+ default: break;
+ }
+ }
+
+ if (event->type() == QEvent::MouseButtonRelease) {
+ QMouseEvent *me = static_cast<QMouseEvent*>(event);
+ switch (me->button()) {
+ case Qt::LeftButton: {
+ if (me->modifiers() & Qt::ControlModifier)
+ setSourceFromIndex(ui.treeView->currentIndex(), true);
+ } break;
+
+ case Qt::MidButton: {
+ setSourceFromIndex(ui.treeView->currentIndex(), true);
+ } break;
+
+ default: break;
+ }
+ }
+ return QObject::eventFilter(object, event);
+}
+
+void BookmarkManagerWidget::findNext()
+{
+ TRACE_OBJ
+ selectNextIndex(true);
+}
+
+void BookmarkManagerWidget::findPrevious()
+{
+ TRACE_OBJ
+ selectNextIndex(false);
+}
+
+void BookmarkManagerWidget::importBookmarks()
+{
+ TRACE_OBJ
+ const QString &fileName = QFileDialog::getOpenFileName(0, TR("Open File"),
+ QDir::currentPath(), TR("Files (*.xbel)"));
+
+ if (fileName.isEmpty())
+ return;
+
+ QFile file(fileName);
+ if (file.open(QIODevice::ReadOnly)) {
+ XbelReader reader(bookmarkModel);
+ reader.readFromFile(&file);
+ }
+}
+
+void BookmarkManagerWidget::exportBookmarks()
+{
+ TRACE_OBJ
+ QString fileName = QFileDialog::getSaveFileName(0, TR("Save File"),
+ QLatin1String("untitled.xbel"), TR("Files (*.xbel)"));
+
+ const QLatin1String suffix(".xbel");
+ if (!fileName.endsWith(suffix))
+ fileName.append(suffix);
+
+ QFile file(fileName);
+ if (file.open(QIODevice::WriteOnly)) {
+ XbelWriter writer(bookmarkModel);
+ writer.writeToFile(&file);
+ } else {
+ QMessageBox::information(this, TR("Qt Assistant"),
+ TR("Unable to save bookmarks."), TR("OK"));
+ }
+}
+
+void BookmarkManagerWidget::refeshBookmarkCache()
+{
+ TRACE_OBJ
+ cache.clear();
+
+ const QString &text = ui.lineEdit->text();
+ if (!text.isEmpty())
+ cache = bookmarkModel->indexListFor(text);
+}
+
+void BookmarkManagerWidget::textChanged(const QString &/*text*/)
+{
+ TRACE_OBJ
+ refeshBookmarkCache();
+ if (!cache.isEmpty())
+ ui.treeView->setCurrentIndex(cache.at(0));
+}
+
+void BookmarkManagerWidget::removeItem(const QModelIndex &index)
+{
+ TRACE_OBJ
+ QModelIndex current = index.isValid() ? index : ui.treeView->currentIndex();
+ if (!bookmarkModel->parent(current).isValid())
+ return; // check if we should delete the "Bookmarks Menu", bail
+
+ if (bookmarkModel->hasChildren(current)) {
+ int value = QMessageBox::question(this, TR("Remove"), TR("You are going"
+ "to delete a Folder, this will also<br> remove it's content. Are "
+ "you sure to continue?"),
+ QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
+ if (value == QMessageBox::Cancel)
+ return;
+ }
+ bookmarkModel->removeItem(current);
+}
+
+void BookmarkManagerWidget::customContextMenuRequested(const QPoint &point)
+{
+ TRACE_OBJ
+ const QModelIndex &index = ui.treeView->indexAt(point);
+ if (!index.isValid())
+ return;
+
+ // check if we should open the menu on "Bookmarks Menu", bail
+ if (!bookmarkModel->parent(index).isValid())
+ return;
+
+ QAction *remove = 0;
+ QAction *rename = 0;
+ QAction *showItem = 0;
+ QAction *showItemInNewTab = 0;
+
+ QMenu menu(QLatin1String(""));
+ if (bookmarkModel->data(index, UserRoleFolder).toBool()) {
+ remove = menu.addAction(TR("Delete Folder"));
+ rename = menu.addAction(TR("Rename Folder"));
+ } else {
+ showItem = menu.addAction(TR("Show Bookmark"));
+ showItemInNewTab = menu.addAction(TR("Show Bookmark in New Tab"));
+ menu.addSeparator();
+ remove = menu.addAction(TR("Delete Bookmark"));
+ rename = menu.addAction(TR("Rename Bookmark"));
+ }
+
+ QAction *pickedAction = menu.exec(ui.treeView->mapToGlobal(point));
+ if (pickedAction == rename)
+ renameItem(index);
+ else if (pickedAction == remove)
+ removeItem(index);
+ else if (pickedAction == showItem || pickedAction == showItemInNewTab)
+ setSourceFromIndex(index, pickedAction == showItemInNewTab);
+}
+
+void
+BookmarkManagerWidget::setSourceFromIndex(const QModelIndex &index, bool newTab)
+{
+ TRACE_OBJ
+ if (bookmarkModel->data(index, UserRoleFolder).toBool())
+ return;
+
+ const QVariant &data = bookmarkModel->data(index, UserRoleUrl);
+ if (data.canConvert<QUrl>()) {
+ if (newTab)
+ emit setSourceInNewTab(data.toUrl());
+ else
+ emit setSource(data.toUrl());
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/bookmarkmanagerwidget.h b/tools/assistant/tools/assistant/bookmarkmanagerwidget.h
new file mode 100644
index 0000000000..94384a6ed9
--- /dev/null
+++ b/tools/assistant/tools/assistant/bookmarkmanagerwidget.h
@@ -0,0 +1,102 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef BOOKMARKMANAGERWIDGET_H
+#define BOOKMARKMANAGERWIDGET_H
+
+#include "ui_bookmarkmanagerwidget.h"
+
+#include <QtCore/QPersistentModelIndex>
+
+#include <QtGui/QMenu>
+
+QT_BEGIN_NAMESPACE
+
+class BookmarkModel;
+class QCloseEvent;
+class QString;
+
+class BookmarkManagerWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ BookmarkManagerWidget(BookmarkModel *bookmarkModel, QWidget *parent = 0);
+ ~BookmarkManagerWidget();
+
+protected:
+ void closeEvent(QCloseEvent *event);
+
+signals:
+ void setSource(const QUrl &url);
+ void setSourceInNewTab(const QUrl &url);
+
+ void managerWidgetAboutToClose();
+
+private:
+ void renameItem(const QModelIndex &index);
+ void selectNextIndex(bool direction) const;
+ bool eventFilter(QObject *object, QEvent *event);
+
+private slots:
+ void findNext();
+ void findPrevious();
+
+ void importBookmarks();
+ void exportBookmarks();
+
+ void refeshBookmarkCache();
+ void textChanged(const QString &text);
+
+ void removeItem(const QModelIndex &index = QModelIndex());
+
+ void customContextMenuRequested(const QPoint &point);
+ void setSourceFromIndex(const QModelIndex &index, bool newTab = false);
+
+private:
+ QMenu importExportMenu;
+ Ui::BookmarkManagerWidget ui;
+ QList<QPersistentModelIndex> cache;
+
+ BookmarkModel *bookmarkModel;
+};
+
+QT_END_NAMESPACE
+
+#endif // BOOKMARKMANAGERWIDGET_H \ No newline at end of file
diff --git a/tools/assistant/tools/assistant/bookmarkmanagerwidget.ui b/tools/assistant/tools/assistant/bookmarkmanagerwidget.ui
new file mode 100644
index 0000000000..dc965d94e6
--- /dev/null
+++ b/tools/assistant/tools/assistant/bookmarkmanagerwidget.ui
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>BookmarkManagerWidget</class>
+ <widget class="QWidget" name="BookmarkManagerWidget">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>517</width>
+ <height>348</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Manage Bookmarks</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Search:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="lineEdit"/>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QTreeView" name="treeView">
+ <property name="acceptDrops">
+ <bool>true</bool>
+ </property>
+ <property name="showDropIndicator" stdset="0">
+ <bool>true</bool>
+ </property>
+ <property name="dragEnabled">
+ <bool>true</bool>
+ </property>
+ <property name="autoExpandDelay">
+ <number>1000</number>
+ </property>
+ <property name="uniformRowHeights">
+ <bool>true</bool>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <attribute name="headerDefaultSectionSize">
+ <number>225</number>
+ </attribute>
+ <attribute name="headerMinimumSectionSize">
+ <number>50</number>
+ </attribute>
+ <attribute name="headerDefaultSectionSize">
+ <number>225</number>
+ </attribute>
+ <attribute name="headerMinimumSectionSize">
+ <number>50</number>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QPushButton" name="remove">
+ <property name="text">
+ <string>Remove</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="importExport">
+ <property name="text">
+ <string>Import and Backup</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pushButton_5">
+ <property name="text">
+ <string>OK</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>pushButton_5</sender>
+ <signal>clicked()</signal>
+ <receiver>BookmarkManagerWidget</receiver>
+ <slot>close()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>445</x>
+ <y>328</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>340</x>
+ <y>313</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/tools/assistant/tools/assistant/bookmarkmodel.cpp b/tools/assistant/tools/assistant/bookmarkmodel.cpp
new file mode 100644
index 0000000000..e446ff062f
--- /dev/null
+++ b/tools/assistant/tools/assistant/bookmarkmodel.cpp
@@ -0,0 +1,444 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "bookmarkmodel.h"
+#include "bookmarkitem.h"
+
+#include <QtCore/QMimeData>
+#include <QtCore/QStack>
+
+#include <QtGui/QApplication>
+#include <QtGui/QStyle>
+#include <QtGui/QTreeView>
+
+const QLatin1String MIMETYPE("application/bookmarks.assistant");
+
+BookmarkModel::BookmarkModel()
+ : QAbstractItemModel()
+ , m_folder(false)
+ , m_editable(false)
+ , rootItem(0)
+{
+}
+
+BookmarkModel::~BookmarkModel()
+{
+ delete rootItem;
+}
+
+QByteArray
+BookmarkModel::bookmarks() const
+{
+ QByteArray ba;
+ QDataStream stream(&ba, QIODevice::WriteOnly);
+
+ const QModelIndex &root = index(0,0, QModelIndex());
+ for (int i = 0; i < rowCount(root); ++i)
+ collectItems(index(i, 0, root), 0, &stream);
+
+ return ba;
+}
+
+void
+BookmarkModel::setBookmarks(const QByteArray &bookmarks)
+{
+ beginResetModel();
+
+ delete rootItem;
+ folderIcon = QApplication::style()->standardIcon(QStyle::SP_DirClosedIcon);
+ bookmarkIcon = QIcon(QLatin1String(":/trolltech/assistant/images/bookmark.png"));
+
+ rootItem = new BookmarkItem(DataVector() << tr("Name") << tr("Address")
+ << true);
+ BookmarkItem* item = new BookmarkItem(DataVector() << tr("Bookmarks Menu")
+ << QLatin1String("Folder") << true);
+ rootItem->addChild(item);
+
+ QStack<BookmarkItem*> parents;
+ parents.push(item);
+
+ qint32 depth;
+ bool expanded;
+ QString name, url;
+ QDataStream stream(bookmarks);
+ while (!stream.atEnd()) {
+ stream >> depth >> name >> url >> expanded;
+
+ while ((parents.count() - 1) != depth)
+ parents.pop();
+
+ item = new BookmarkItem(DataVector() << name << url << expanded);
+ if (url == QLatin1String("Folder")) {
+ parents.top()->addChild(item);
+ parents.push(item);
+ } else {
+ parents.top()->addChild(item);
+ }
+ }
+
+ cache.clear();
+ const QModelIndex &root = index(0,0, QModelIndex());
+
+ setupCache(root);
+ cache.insert(static_cast<BookmarkItem*> (root.internalPointer()), root);
+
+ endResetModel();
+}
+
+void
+BookmarkModel::setItemsEditable(bool editable)
+{
+ m_editable = editable;
+}
+
+void
+BookmarkModel::expandFoldersIfNeeeded(QTreeView *treeView)
+{
+ foreach (const QModelIndex &index, cache)
+ treeView->setExpanded(index, index.data(UserRoleExpanded).toBool());
+}
+
+QModelIndex
+BookmarkModel::addItem(const QModelIndex &parent, bool isFolder)
+{
+ m_folder = isFolder;
+ QModelIndex next;
+ if (insertRow(rowCount(parent), parent))
+ next = index(rowCount(parent) - 1, 0, parent);
+ m_folder = false;
+
+ return next;
+}
+
+bool
+BookmarkModel::removeItem(const QModelIndex &index)
+{
+ if (!index.isValid())
+ return false;
+
+ QModelIndexList indexes;
+ if (rowCount(index) > 0)
+ indexes = collectItems(index);
+ indexes.append(index);
+
+ foreach (const QModelIndex &itemToRemove, indexes) {
+ if (!removeRow(itemToRemove.row(), itemToRemove.parent()))
+ return false;
+ cache.remove(itemFromIndex(itemToRemove));
+ }
+ return true;
+}
+
+int
+BookmarkModel::rowCount(const QModelIndex &index) const
+{
+ if (BookmarkItem *item = itemFromIndex(index))
+ return item->childCount();
+ return 0;
+}
+
+int
+BookmarkModel::columnCount(const QModelIndex &/*index*/) const
+{
+ return 2;
+}
+
+QModelIndex
+BookmarkModel::parent(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return QModelIndex();
+
+ if (BookmarkItem *childItem = itemFromIndex(index)) {
+ if (BookmarkItem *parent = childItem->parent()) {
+ if (parent != rootItem)
+ return createIndex(parent->childNumber(), 0, parent);
+ }
+ }
+ return QModelIndex();
+}
+
+QModelIndex
+BookmarkModel::index(int row, int column, const QModelIndex &index) const
+{
+ if (index.isValid() && (index.column() != 0 && index.column() != 1))
+ return QModelIndex();
+
+ if (BookmarkItem *parent = itemFromIndex(index)) {
+ if (BookmarkItem *childItem = parent->child(row))
+ return createIndex(row, column, childItem);
+ }
+ return QModelIndex();
+}
+
+Qt::DropActions
+BookmarkModel::supportedDropActions () const
+{
+ return /* Qt::CopyAction | */Qt::MoveAction;
+}
+
+Qt::ItemFlags
+BookmarkModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return Qt::NoItemFlags;
+
+ Qt::ItemFlags defaultFlags = Qt::ItemIsEnabled | Qt::ItemIsSelectable;
+
+ if (m_editable)
+ defaultFlags |= Qt::ItemIsEditable;
+
+ if (itemFromIndex(index) && index.data(UserRoleFolder).toBool()) {
+ if (index.column() > 0)
+ return defaultFlags &~ Qt::ItemIsEditable;
+ return defaultFlags | Qt::ItemIsDropEnabled;
+ }
+
+ return defaultFlags | Qt::ItemIsDragEnabled;
+}
+
+QVariant
+BookmarkModel::data(const QModelIndex &index, int role) const
+{
+ if (index.isValid()) {
+ if (BookmarkItem *item = itemFromIndex(index)) {
+ switch (role) {
+ case Qt::EditRole: {
+ case Qt::DisplayRole:
+ if (index.data(UserRoleFolder).toBool() && index.column() == 1)
+ return QLatin1String("");
+ return item->data(index.column());
+ } break;
+
+ case Qt::DecorationRole: {
+ if (index.column() == 0)
+ return index.data(UserRoleFolder).toBool()
+ ? folderIcon : bookmarkIcon;
+ } break;
+
+ default:;
+ return item->data(role);
+ }
+ }
+ }
+ return QVariant();
+}
+
+bool
+BookmarkModel::setData(const QModelIndex &index, const QVariant &value, int role)
+{
+ bool result = false;
+ if (role != Qt::EditRole && role != UserRoleExpanded)
+ return result;
+
+ if (BookmarkItem *item = itemFromIndex(index)) {
+ if (role == Qt::EditRole) {
+ const bool isFolder = index.data(UserRoleFolder).toBool();
+ if (!isFolder || (isFolder && index.column() == 0))
+ result = item->setData(index.column(), value);
+ } else if (role == UserRoleExpanded) {
+ result = item->setData(UserRoleExpanded, value);
+ }
+ }
+
+ if (result)
+ emit dataChanged(index, index);
+ return result;
+}
+
+QVariant
+BookmarkModel::headerData(int section, Qt::Orientation orientation,
+ int role) const
+{
+ if (rootItem && orientation == Qt::Horizontal && role == Qt::DisplayRole)
+ return rootItem->data(section);
+ return QVariant();
+}
+
+QModelIndex
+BookmarkModel::indexFromItem(BookmarkItem *item) const
+{
+ return cache.value(item, QModelIndex());
+}
+
+BookmarkItem*
+BookmarkModel::itemFromIndex(const QModelIndex &index) const
+{
+ if (index.isValid())
+ return static_cast<BookmarkItem*>(index.internalPointer());
+ return rootItem;
+}
+
+QList<QPersistentModelIndex>
+BookmarkModel::indexListFor(const QString &label) const
+{
+ QList<QPersistentModelIndex> hits;
+ const QModelIndexList &list = collectItems(QModelIndex());
+ foreach(const QModelIndex &index, list) {
+ if (index.data().toString().contains(label, Qt::CaseInsensitive))
+ hits.prepend(index); // list is reverse sorted
+ }
+ return hits;
+}
+
+bool
+BookmarkModel::insertRows(int position, int rows, const QModelIndex &parent)
+{
+ if (!parent.data(UserRoleFolder).toBool())
+ return false;
+
+ bool success = false;
+ if (BookmarkItem *parentItem = itemFromIndex(parent)) {
+ beginInsertRows(parent, position, position + rows - 1);
+ success = parentItem->insertChildren(m_folder, position, rows);
+ if (success) {
+ const QModelIndex &current = index(position, 0, parent);
+ cache.insert(itemFromIndex(current), current);
+ }
+ endInsertRows();
+ }
+ return success;
+}
+
+bool
+BookmarkModel::removeRows(int position, int rows, const QModelIndex &index)
+{
+ bool success = false;
+ if (BookmarkItem *parent = itemFromIndex(index)) {
+ beginRemoveRows(index, position, position + rows - 1);
+ success = parent->removeChildren(position, rows);
+ endRemoveRows();
+ }
+ return success;
+}
+
+QStringList
+BookmarkModel::mimeTypes() const
+{
+ return QStringList() << MIMETYPE;
+}
+
+QMimeData*
+BookmarkModel::mimeData(const QModelIndexList &indexes) const
+{
+ if (indexes.isEmpty())
+ return 0;
+
+ QByteArray data;
+ QDataStream stream(&data, QIODevice::WriteOnly);
+
+ foreach (const QModelIndex &index, indexes) {
+ if (index.column() == 0)
+ collectItems(index, 0, &stream);
+ }
+
+ QMimeData *mimeData = new QMimeData();
+ mimeData->setData(MIMETYPE, data);
+ return mimeData;
+}
+
+bool
+BookmarkModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
+ int row, int column, const QModelIndex &parent)
+{
+ if (action == Qt::IgnoreAction)
+ return true;
+
+ if (!data->hasFormat(MIMETYPE) || column > 0)
+ return false;
+
+ QByteArray ba = data->data(MIMETYPE);
+ QDataStream stream(&ba, QIODevice::ReadOnly);
+ while (stream.atEnd())
+ return false;
+
+ qint32 depth;
+ bool expanded;
+ QString name, url;
+ while (!stream.atEnd()) {
+ stream >> depth >> name >> url >> expanded;
+ if (insertRow(qMax(0, row), parent)) {
+ const QModelIndex &current = index(qMax(0, row), 0, parent);
+ if (current.isValid()) {
+ BookmarkItem* item = itemFromIndex(current);
+ item->setData(DataVector() << name << url << expanded);
+ }
+ }
+ }
+ return true;
+}
+
+void
+BookmarkModel::setupCache(const QModelIndex &parent)
+{
+ const QModelIndexList &list = collectItems(parent);
+ foreach (const QModelIndex &index, list)
+ cache.insert(itemFromIndex(index), index);
+}
+
+QModelIndexList
+BookmarkModel::collectItems(const QModelIndex &parent) const
+{
+ QModelIndexList list;
+ for (int i = rowCount(parent) - 1; i >= 0 ; --i) {
+ const QModelIndex &next = index(i, 0, parent);
+ if (data(next, UserRoleFolder).toBool())
+ list += collectItems(next);
+ list.append(next);
+ }
+ return list;
+}
+
+void
+BookmarkModel::collectItems(const QModelIndex &parent, qint32 depth,
+ QDataStream *stream) const
+{
+ if (parent.isValid()) {
+ *stream << depth;
+ *stream << parent.data().toString();
+ *stream << parent.data(UserRoleUrl).toString();
+ *stream << parent.data(UserRoleExpanded).toBool();
+
+ for (int i = 0; i < rowCount(parent); ++i) {
+ if (parent.data(UserRoleFolder).toBool())
+ collectItems(index(i, 0 , parent), depth + 1, stream);
+ }
+ }
+}
diff --git a/tools/assistant/tools/assistant/bookmarkmodel.h b/tools/assistant/tools/assistant/bookmarkmodel.h
new file mode 100644
index 0000000000..6469258dbf
--- /dev/null
+++ b/tools/assistant/tools/assistant/bookmarkmodel.h
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef BOOKMARKMODEL_H
+#define BOOKMARKMODEL_H
+
+#include <QtCore/QAbstractItemModel>
+
+#include <QtGui/QIcon>
+
+QT_BEGIN_NAMESPACE
+
+class BookmarkItem;
+class QMimeData;
+class QTreeView;
+
+typedef QMap<BookmarkItem*, QPersistentModelIndex> ItemModelIndexCache;
+
+class BookmarkModel : public QAbstractItemModel
+{
+ Q_OBJECT
+public:
+ BookmarkModel();
+ ~BookmarkModel();
+
+ QByteArray bookmarks() const;
+ void setBookmarks(const QByteArray &bookmarks);
+
+ void setItemsEditable(bool editable);
+ void expandFoldersIfNeeeded(QTreeView *treeView);
+
+ QModelIndex addItem(const QModelIndex &parent, bool isFolder = false);
+ bool removeItem(const QModelIndex &index);
+
+ int rowCount(const QModelIndex &index = QModelIndex()) const;
+ int columnCount(const QModelIndex &index = QModelIndex()) const;
+
+ QModelIndex parent(const QModelIndex &index) const;
+ QModelIndex index(int row, int column, const QModelIndex &index) const;
+
+ Qt::DropActions supportedDropActions () const;
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+
+ QVariant data(const QModelIndex &index, int role) const;
+ bool setData(const QModelIndex &index, const QVariant &value, int role);
+ QVariant headerData(int section, Qt::Orientation orientation, int role) const;
+
+ QModelIndex indexFromItem(BookmarkItem *item) const;
+ BookmarkItem *itemFromIndex(const QModelIndex &index) const;
+ QList<QPersistentModelIndex> indexListFor(const QString &label) const;
+
+ bool insertRows(int position, int rows, const QModelIndex &parent);
+ bool removeRows(int position, int rows, const QModelIndex &parent);
+
+ QStringList mimeTypes() const;
+ QMimeData* mimeData(const QModelIndexList &indexes) const;
+ bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row,
+ int column, const QModelIndex &parent);
+
+private:
+ void setupCache(const QModelIndex &parent);
+ QModelIndexList collectItems(const QModelIndex &parent) const;
+ void collectItems(const QModelIndex &parent, qint32 depth,
+ QDataStream *stream) const;
+
+private:
+ int columns;
+ bool m_folder;
+ bool m_editable;
+ QIcon folderIcon;
+ QIcon bookmarkIcon;
+ QTreeView *treeView;
+ BookmarkItem *rootItem;
+ ItemModelIndexCache cache;
+};
+
+QT_END_NAMESPACE
+
+#endif // BOOKMARKMODEL_H
diff --git a/tools/assistant/tools/assistant/bookmarkwidget.ui b/tools/assistant/tools/assistant/bookmarkwidget.ui
new file mode 100644
index 0000000000..a31a2779c2
--- /dev/null
+++ b/tools/assistant/tools/assistant/bookmarkwidget.ui
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>BookmarkWidget</class>
+ <widget class="QWidget" name="BookmarkWidget">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>235</width>
+ <height>606</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Bookmarks</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <property name="margin">
+ <number>4</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Filter:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="lineEdit"/>
+ </item>
+ <item>
+ <widget class="QStackedWidget" name="stackedWidget"/>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="add">
+ <property name="text">
+ <string>Add</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="remove">
+ <property name="text">
+ <string>Remove</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp
index 0e4096b0c8..2359479505 100644
--- a/tools/assistant/tools/assistant/centralwidget.cpp
+++ b/tools/assistant/tools/assistant/centralwidget.cpp
@@ -38,36 +38,36 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include "tracer.h"
#include "centralwidget.h"
-#include "helpviewer.h"
+#include "findwidget.h"
+#include "helpenginewrapper.h"
#include "searchwidget.h"
#include "mainwindow.h"
-#include "preferencesdialog.h"
+#include "../shared/collectionconfiguration.h"
+
+#if defined(QT_NO_WEBKIT)
+#include "helpviewer_qtb.h"
+#else
+#include "helpviewer_qwv.h"
+#endif // QT_NO_WEBKIT
-#include <QtCore/QDir>
-#include <QtCore/QEvent>
#include <QtCore/QTimer>
-#include <QtGui/QMenu>
-#include <QtGui/QLabel>
+#include <QtGui/QApplication>
+#include <QtGui/QKeyEvent>
#include <QtGui/QLayout>
+#include <QtGui/QMenu>
#include <QtGui/QPrinter>
-#include <QtGui/QLineEdit>
-#include <QtGui/QCheckBox>
#include <QtGui/QTabBar>
#include <QtGui/QTabWidget>
+#include <QtGui/QTextBrowser>
#include <QtGui/QToolButton>
-#include <QtGui/QMouseEvent>
-#include <QtGui/QSpacerItem>
-#include <QtGui/QTextCursor>
+#include <QtGui/QPageSetupDialog>
#include <QtGui/QPrintDialog>
-#include <QtGui/QApplication>
-#include <QtGui/QTextDocumentFragment>
#include <QtGui/QPrintPreviewDialog>
-#include <QtGui/QPageSetupDialog>
-#include <QtHelp/QHelpEngine>
#include <QtHelp/QHelpSearchEngine>
QT_BEGIN_NAMESPACE
@@ -76,6 +76,7 @@ namespace {
HelpViewer* helpViewerFromTabPosition(const QTabWidget *widget,
const QPoint &point)
{
+ TRACE_OBJ
QTabBar *tabBar = qFindChild<QTabBar*>(widget);
for (int i = 0; i < tabBar->count(); ++i) {
if (tabBar->tabRect(i).contains(point))
@@ -86,137 +87,18 @@ namespace {
CentralWidget *staticCentralWidget = 0;
}
-FindWidget::FindWidget(QWidget *parent)
- : QWidget(parent)
- , appPalette(qApp->palette())
-{
- QHBoxLayout *hboxLayout = new QHBoxLayout(this);
- QString resourcePath = QLatin1String(":/trolltech/assistant/images/");
-
-#ifndef Q_OS_MAC
- hboxLayout->setMargin(0);
- hboxLayout->setSpacing(6);
- resourcePath.append(QLatin1String("win"));
-#else
- resourcePath.append(QLatin1String("mac"));
-#endif
-
- toolClose = setupToolButton(QLatin1String(""),
- resourcePath + QLatin1String("/closetab.png"));
- hboxLayout->addWidget(toolClose);
-
- editFind = new QLineEdit(this);
- hboxLayout->addWidget(editFind);
- editFind->setMinimumSize(QSize(150, 0));
- connect(editFind, SIGNAL(textChanged(QString)), this, SLOT(updateButtons()));
-
- toolPrevious = setupToolButton(tr("Previous"),
- resourcePath + QLatin1String("/previous.png"));
- hboxLayout->addWidget(toolPrevious);
-
- toolNext = setupToolButton(tr("Next"),
- resourcePath + QLatin1String("/next.png"));
- hboxLayout->addWidget(toolNext);
-
- checkCase = new QCheckBox(tr("Case Sensitive"), this);
- hboxLayout->addWidget(checkCase);
-
- checkWholeWords = new QCheckBox(tr("Whole words"), this);
- hboxLayout->addWidget(checkWholeWords);
-#if !defined(QT_NO_WEBKIT)
- checkWholeWords->hide();
-#endif
-
- labelWrapped = new QLabel(this);
- labelWrapped->setScaledContents(true);
- labelWrapped->setTextFormat(Qt::RichText);
- labelWrapped->setMinimumSize(QSize(0, 20));
- labelWrapped->setMaximumSize(QSize(105, 20));
- labelWrapped->setAlignment(Qt::AlignLeading | Qt::AlignLeft | Qt::AlignVCenter);
- labelWrapped->setText(tr("<img src=\":/trolltech/assistant/images/wrap.png\""
- ">&nbsp;Search wrapped"));
- hboxLayout->addWidget(labelWrapped);
-
- QSpacerItem *spacerItem = new QSpacerItem(20, 20, QSizePolicy::Expanding,
- QSizePolicy::Minimum);
- hboxLayout->addItem(spacerItem);
- setMinimumWidth(minimumSizeHint().width());
- labelWrapped->hide();
-
- updateButtons();
-}
-
-FindWidget::~FindWidget()
-{
-}
+// -- CentralWidget
-void FindWidget::hideEvent(QHideEvent* event)
-{
-#if !defined(QT_NO_WEBKIT)
- // TODO: remove this once webkit supports setting the palette
- if (!event->spontaneous())
- qApp->setPalette(appPalette);
-#else
- Q_UNUSED(event);
-#endif
-}
-
-void FindWidget::showEvent(QShowEvent* event)
-{
-#if !defined(QT_NO_WEBKIT)
- // TODO: remove this once webkit supports setting the palette
- if (!event->spontaneous()) {
- QPalette p = appPalette;
- p.setColor(QPalette::Inactive, QPalette::Highlight,
- p.color(QPalette::Active, QPalette::Highlight));
- p.setColor(QPalette::Inactive, QPalette::HighlightedText,
- p.color(QPalette::Active, QPalette::HighlightedText));
- qApp->setPalette(p);
- }
-#else
- Q_UNUSED(event);
-#endif
-}
-
-void FindWidget::updateButtons()
-{
- if (editFind->text().isEmpty()) {
- toolPrevious->setEnabled(false);
- toolNext->setEnabled(false);
- } else {
- toolPrevious->setEnabled(true);
- toolNext->setEnabled(true);
- }
-}
-
-QToolButton* FindWidget::setupToolButton(const QString &text, const QString &icon)
-{
- QToolButton *toolButton = new QToolButton(this);
-
- toolButton->setText(text);
- toolButton->setAutoRaise(true);
- toolButton->setIcon(QIcon(icon));
- toolButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
-
- return toolButton;
-}
-
-
-// --
-
-
-CentralWidget::CentralWidget(QHelpEngine *engine, MainWindow *parent)
+CentralWidget::CentralWidget(MainWindow *parent)
: QWidget(parent)
, lastTabPage(0)
- , collectionFile(engine->collectionFile())
- , findBar(0)
, tabWidget(0)
, findWidget(0)
- , helpEngine(engine)
, printer(0)
, usesDefaultCollection(parent->usesDefaultCollection())
, m_searchWidget(0)
{
+ TRACE_OBJ
globalActionList.clear();
staticCentralWidget = this;
QVBoxLayout *vboxLayout = new QVBoxLayout(this);
@@ -253,20 +135,15 @@ CentralWidget::CentralWidget(QHelpEngine *engine, MainWindow *parent)
vboxLayout->addWidget(tabWidget);
- findBar = new QWidget(this);
- findWidget = new FindWidget(findBar);
- findBar->setMinimumHeight(findWidget->minimumSizeHint().height());
- findWidget->move(0, 0);
- vboxLayout->addWidget(findBar);
- findBar->hide();
- findWidget->editFind->installEventFilter(this);
-
- connect(findWidget->toolClose, SIGNAL(clicked()), findBar, SLOT(hide()));
- connect(findWidget->toolNext, SIGNAL(clicked()), this, SLOT(findNext()));
- connect(findWidget->editFind, SIGNAL(returnPressed()), this, SLOT(findNext()));
- connect(findWidget->editFind, SIGNAL(textChanged(QString)), this,
- SLOT(findCurrentText(QString)));
- connect(findWidget->toolPrevious, SIGNAL(clicked()), this, SLOT(findPrevious()));
+ findWidget = new FindWidget(this);
+ vboxLayout->addWidget(findWidget);
+ findWidget->hide();
+
+ connect(findWidget, SIGNAL(findNext()), this, SLOT(findNext()));
+ connect(findWidget, SIGNAL(findPrevious()), this, SLOT(findPrevious()));
+ connect(findWidget, SIGNAL(find(QString, bool)), this,
+ SLOT(find(QString, bool)));
+ connect(findWidget, SIGNAL(escapePressed()), this, SLOT(activateTab()));
QTabBar *tabBar = qFindChild<QTabBar*>(tabWidget);
if (tabBar) {
@@ -288,45 +165,40 @@ CentralWidget::CentralWidget(QHelpEngine *engine, MainWindow *parent)
CentralWidget::~CentralWidget()
{
+ TRACE_OBJ
#ifndef QT_NO_PRINTER
delete printer;
#endif
- QHelpEngineCore engine(collectionFile, 0);
- if (!engine.setupData())
- return;
-
- QString zoomCount;
- QString currentPages;
- QLatin1Char separator('|');
+ QStringList zoomFactors;
+ QStringList currentPages;
bool searchAttached = m_searchWidget->isAttached();
int i = searchAttached ? 1 : 0;
for (; i < tabWidget->count(); ++i) {
HelpViewer *viewer = qobject_cast<HelpViewer*>(tabWidget->widget(i));
if (viewer && viewer->source().isValid()) {
- currentPages += viewer->source().toString() + separator;
- zoomCount += QString::number(viewer->zoom()) + separator;
+ currentPages << viewer->source().toString();
+ zoomFactors << QString::number(viewer->scale());
}
}
- engine.setCustomValue(QLatin1String("LastTabPage"), lastTabPage);
- engine.setCustomValue(QLatin1String("LastShownPages"), currentPages);
- engine.setCustomValue(QLatin1String("SearchWasAttached"), searchAttached);
-#if !defined(QT_NO_WEBKIT)
- engine.setCustomValue(QLatin1String("LastPagesZoomWebView"), zoomCount);
-#else
- engine.setCustomValue(QLatin1String("LastPagesZoomTextBrowser"), zoomCount);
-#endif
+ HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
+ helpEngine.setLastTabPage(tabWidget->currentIndex());
+ helpEngine.setLastShownPages(currentPages);
+ helpEngine.setSearchWasAttached(searchAttached);
+ helpEngine.setLastZoomFactors(zoomFactors);
}
CentralWidget *CentralWidget::instance()
{
+ TRACE_OBJ
return staticCentralWidget;
}
void CentralWidget::newTab()
{
+ TRACE_OBJ
HelpViewer *viewer = currentHelpViewer();
#if !defined(QT_NO_WEBKIT)
if (viewer && viewer->hasLoadFinished())
@@ -338,9 +210,10 @@ void CentralWidget::newTab()
void CentralWidget::zoomIn()
{
+ TRACE_OBJ
HelpViewer *viewer = currentHelpViewer();
if (viewer)
- viewer->zoomIn();
+ viewer->scaleUp();
if (tabWidget->currentWidget() == m_searchWidget)
m_searchWidget->zoomIn();
@@ -348,21 +221,18 @@ void CentralWidget::zoomIn()
void CentralWidget::zoomOut()
{
+ TRACE_OBJ
HelpViewer *viewer = currentHelpViewer();
if (viewer)
- viewer->zoomOut();
+ viewer->scaleDown();
if (tabWidget->currentWidget() == m_searchWidget)
m_searchWidget->zoomOut();
}
-void CentralWidget::findNext()
-{
- find(findWidget->editFind->text(), true);
-}
-
void CentralWidget::nextPage()
{
+ TRACE_OBJ
int index = tabWidget->currentIndex() + 1;
if (index >= tabWidget->count())
index = 0;
@@ -371,9 +241,9 @@ void CentralWidget::nextPage()
void CentralWidget::resetZoom()
{
- HelpViewer *viewer = currentHelpViewer();
- if (viewer)
- viewer->resetZoom();
+ TRACE_OBJ
+ if (HelpViewer *viewer = currentHelpViewer())
+ viewer->resetScale();
if (tabWidget->currentWidget() == m_searchWidget)
m_searchWidget->resetZoom();
@@ -381,19 +251,16 @@ void CentralWidget::resetZoom()
void CentralWidget::previousPage()
{
+ TRACE_OBJ
int index = tabWidget->currentIndex() -1;
if (index < 0)
index = tabWidget->count() -1;
tabWidget->setCurrentIndex(index);
}
-void CentralWidget::findPrevious()
-{
- find(findWidget->editFind->text(), false);
-}
-
void CentralWidget::closeTab()
{
+ TRACE_OBJ
HelpViewer *viewer = currentHelpViewer();
if (!viewer|| tabWidget->count() == 1)
return;
@@ -404,12 +271,13 @@ void CentralWidget::closeTab()
void CentralWidget::setSource(const QUrl &url)
{
+ TRACE_OBJ
HelpViewer *viewer = currentHelpViewer();
HelpViewer *lastViewer =
qobject_cast<HelpViewer*>(tabWidget->widget(lastTabPage));
if (!viewer && !lastViewer) {
- viewer = new HelpViewer(helpEngine, this);
+ viewer = new HelpViewer(this);
viewer->installEventFilter(this);
lastTabPage = tabWidget->addTab(viewer, QString());
tabWidget->setCurrentIndex(lastTabPage);
@@ -427,18 +295,14 @@ void CentralWidget::setSource(const QUrl &url)
void CentralWidget::setupWidget()
{
- int option = helpEngine->customValue(QLatin1String("StartOption"),
- ShowLastPages).toInt();
-
+ TRACE_OBJ
+ HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
+ int option = helpEngine.startOption();
if (option != ShowLastPages) {
QString homePage;
- if (option == ShowHomePage) {
- homePage = helpEngine->customValue(QLatin1String("defaultHomepage"),
- QLatin1String("help")).toString();
- homePage = helpEngine->customValue(QLatin1String("homepage"),
- homePage).toString();
- }
- if (option == ShowBlankPage)
+ if (option == ShowHomePage)
+ homePage = helpEngine.homePage();
+ else if (option == ShowBlankPage)
homePage = QLatin1String("about:blank");
setSource(homePage);
} else {
@@ -448,11 +312,9 @@ void CentralWidget::setupWidget()
void CentralWidget::setLastShownPages()
{
- const QLatin1String key("LastShownPages");
- QString value = helpEngine->customValue(key, QString()).toString();
- const QStringList lastShownPageList = value.split(QLatin1Char('|'),
- QString::SkipEmptyParts);
-
+ TRACE_OBJ
+ HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
+ const QStringList &lastShownPageList = helpEngine.lastShownPages();
const int pageCount = lastShownPageList.count();
if (pageCount == 0) {
if (usesDefaultCollection)
@@ -461,48 +323,40 @@ void CentralWidget::setLastShownPages()
setSource(QUrl(QLatin1String("about:blank")));
return;
}
+ QStringList zoomFactors = helpEngine.lastZoomFactors();
+ while (zoomFactors.count() < pageCount)
+ zoomFactors.append(CollectionConfiguration::DefaultZoomFactor);
-#if !defined(QT_NO_WEBKIT)
- const QLatin1String zoom("LastPagesZoomWebView");
-#else
- const QLatin1String zoom("LastPagesZoomTextBrowser");
-#endif
-
- value = helpEngine->customValue(zoom, QString()).toString();
- QVector<QString> zoomVector = value.split(QLatin1Char('|'),
- QString::SkipEmptyParts).toVector();
-
- const int zoomCount = zoomVector.count();
- zoomVector.insert(zoomCount, pageCount - zoomCount, QLatin1String("0.0"));
-
- QVector<QString>::const_iterator zIt = zoomVector.constBegin();
- QStringList::const_iterator it = lastShownPageList.constBegin();
- for (; it != lastShownPageList.constEnd(); ++it, ++zIt)
- setSourceInNewTab((*it), (*zIt).toFloat());
-
- const QLatin1String lastTab("LastTabPage");
- int tab = helpEngine->customValue(lastTab, 1).toInt();
-
- const QLatin1String searchKey("SearchWasAttached");
const bool searchIsAttached = m_searchWidget->isAttached();
- const bool searchWasAttached = helpEngine->customValue(searchKey).toBool();
-
- if (searchWasAttached && !searchIsAttached)
- tabWidget->setCurrentIndex(--tab);
+ const bool searchWasAttached = helpEngine.searchWasAttached();
+ int tabToShow = helpEngine.lastTabPage();
+ if (searchWasAttached && !searchIsAttached && tabToShow != 0)
+ --tabToShow;
else if (!searchWasAttached && searchIsAttached)
- tabWidget->setCurrentIndex(++tab);
- else
- tabWidget->setCurrentIndex(tab);
+ ++tabToShow;
+
+ for (int curTab = 0; curTab < pageCount; ++curTab) {
+ const QString &curFile = lastShownPageList.at(curTab);
+ if (helpEngine.findFile(curFile).isValid()
+ || curFile == QLatin1String("about:blank")) {
+ setSourceInNewTab(curFile, zoomFactors.at(curTab).toFloat());
+ } else if (curTab + searchIsAttached <= tabToShow)
+ --tabToShow;
+ }
+
+ tabWidget->setCurrentIndex(tabToShow);
}
bool CentralWidget::hasSelection() const
{
+ TRACE_OBJ
const HelpViewer *viewer = currentHelpViewer();
return viewer ? viewer->hasSelection() : false;
}
QUrl CentralWidget::currentSource() const
{
+ TRACE_OBJ
const HelpViewer *viewer = currentHelpViewer();
if (viewer)
return viewer->source();
@@ -512,6 +366,7 @@ QUrl CentralWidget::currentSource() const
QString CentralWidget::currentTitle() const
{
+ TRACE_OBJ
const HelpViewer *viewer = currentHelpViewer();
if (viewer)
return viewer->documentTitle();
@@ -521,6 +376,7 @@ QString CentralWidget::currentTitle() const
void CentralWidget::copySelection()
{
+ TRACE_OBJ
HelpViewer *viewer = currentHelpViewer();
if (viewer)
viewer->copy();
@@ -528,13 +384,13 @@ void CentralWidget::copySelection()
void CentralWidget::showTextSearch()
{
- findBar->show();
- findWidget->editFind->selectAll();
- findWidget->editFind->setFocus(Qt::ShortcutFocusReason);
+ TRACE_OBJ
+ findWidget->show();
}
void CentralWidget::initPrinter()
{
+ TRACE_OBJ
#ifndef QT_NO_PRINTER
if (!printer)
printer = new QPrinter(QPrinter::HighResolution);
@@ -543,6 +399,7 @@ void CentralWidget::initPrinter()
void CentralWidget::print()
{
+ TRACE_OBJ
#ifndef QT_NO_PRINTER
HelpViewer *viewer = currentHelpViewer();
if (!viewer)
@@ -550,23 +407,23 @@ void CentralWidget::print()
initPrinter();
- QPrintDialog *dlg = new QPrintDialog(printer, this);
+ QPrintDialog dlg(printer, this);
#if defined(QT_NO_WEBKIT)
if (viewer->textCursor().hasSelection())
- dlg->addEnabledOption(QAbstractPrintDialog::PrintSelection);
+ dlg.addEnabledOption(QAbstractPrintDialog::PrintSelection);
#endif
- dlg->addEnabledOption(QAbstractPrintDialog::PrintPageRange);
- dlg->addEnabledOption(QAbstractPrintDialog::PrintCollateCopies);
- dlg->setWindowTitle(tr("Print Document"));
- if (dlg->exec() == QDialog::Accepted) {
+ dlg.addEnabledOption(QAbstractPrintDialog::PrintPageRange);
+ dlg.addEnabledOption(QAbstractPrintDialog::PrintCollateCopies);
+ dlg.setWindowTitle(tr("Print Document"));
+ if (dlg.exec() == QDialog::Accepted) {
viewer->print(printer);
}
- delete dlg;
#endif
}
void CentralWidget::printPreview()
{
+ TRACE_OBJ
#ifndef QT_NO_PRINTER
initPrinter();
QPrintPreviewDialog preview(printer, this);
@@ -578,6 +435,7 @@ void CentralWidget::printPreview()
void CentralWidget::printPreview(QPrinter *p)
{
+ TRACE_OBJ
#ifndef QT_NO_PRINTER
HelpViewer *viewer = currentHelpViewer();
if (viewer)
@@ -587,6 +445,7 @@ void CentralWidget::printPreview(QPrinter *p)
void CentralWidget::pageSetup()
{
+ TRACE_OBJ
#ifndef QT_NO_PRINTER
initPrinter();
QPageSetupDialog dlg(printer);
@@ -596,11 +455,13 @@ void CentralWidget::pageSetup()
bool CentralWidget::isHomeAvailable() const
{
+ TRACE_OBJ
return currentHelpViewer() ? true : false;
}
void CentralWidget::home()
{
+ TRACE_OBJ
HelpViewer *viewer = currentHelpViewer();
if (viewer)
viewer->home();
@@ -608,6 +469,7 @@ void CentralWidget::home()
bool CentralWidget::isForwardAvailable() const
{
+ TRACE_OBJ
const HelpViewer *viewer = currentHelpViewer();
if (viewer)
return viewer->isForwardAvailable();
@@ -617,6 +479,7 @@ bool CentralWidget::isForwardAvailable() const
void CentralWidget::forward()
{
+ TRACE_OBJ
HelpViewer *viewer = currentHelpViewer();
if (viewer)
viewer->forward();
@@ -624,6 +487,7 @@ void CentralWidget::forward()
bool CentralWidget::isBackwardAvailable() const
{
+ TRACE_OBJ
const HelpViewer *viewer = currentHelpViewer();
if (viewer)
return viewer->isBackwardAvailable();
@@ -633,6 +497,7 @@ bool CentralWidget::isBackwardAvailable() const
void CentralWidget::backward()
{
+ TRACE_OBJ
HelpViewer *viewer = currentHelpViewer();
if (viewer)
viewer->backward();
@@ -641,49 +506,37 @@ void CentralWidget::backward()
QList<QAction*> CentralWidget::globalActions() const
{
+ TRACE_OBJ
return globalActionList;
}
void CentralWidget::setGlobalActions(const QList<QAction*> &actions)
{
+ TRACE_OBJ
globalActionList = actions;
}
void CentralWidget::setSourceInNewTab(const QUrl &url, qreal zoom)
{
- HelpViewer *viewer;
-
-#if defined(QT_NO_WEBKIT)
- viewer = currentHelpViewer();
- if (viewer && viewer->launchedWithExternalApp(url))
- return;
-#endif
+ TRACE_OBJ
+ if (HelpViewer *viewer = currentHelpViewer()) {
+ if (viewer->launchWithExternalApp(url))
+ return;
+ }
- viewer = new HelpViewer(helpEngine, this);
+ HelpViewer *viewer = new HelpViewer(this, zoom);
viewer->installEventFilter(this);
viewer->setSource(url);
viewer->setFocus(Qt::OtherFocusReason);
tabWidget->setCurrentIndex(tabWidget->addTab(viewer,
quoteTabTitle(viewer->documentTitle())));
-
- QFont font;
- getBrowserFontFor(viewer, &font);
-
-#if defined(QT_NO_WEBKIT)
- font.setPointSize((int)(font.pointSize() + zoom));
- setBrowserFontFor(viewer, font);
- viewer->setZoom((int)zoom);
-#else
- setBrowserFontFor(viewer, font);
- viewer->setTextSizeMultiplier(zoom == 0.0 ? 1.0 : zoom);
-#endif
-
connectSignals();
}
HelpViewer *CentralWidget::newEmptyTab()
{
- HelpViewer *viewer = new HelpViewer(helpEngine, this);
+ TRACE_OBJ
+ HelpViewer *viewer = new HelpViewer(this);
viewer->installEventFilter(this);
viewer->setFocus(Qt::OtherFocusReason);
#if defined(QT_NO_WEBKIT)
@@ -695,13 +548,9 @@ HelpViewer *CentralWidget::newEmptyTab()
return viewer;
}
-void CentralWidget::findCurrentText(const QString &text)
-{
- find(text, true);
-}
-
void CentralWidget::connectSignals()
{
+ TRACE_OBJ
const HelpViewer *viewer = currentHelpViewer();
if (viewer) {
connect(viewer, SIGNAL(copyAvailable(bool)), this,
@@ -719,13 +568,21 @@ void CentralWidget::connectSignals()
}
}
-HelpViewer *CentralWidget::currentHelpViewer() const
+HelpViewer* CentralWidget::viewerAt(int index) const
+{
+ TRACE_OBJ
+ return qobject_cast<HelpViewer*>(tabWidget->widget(index));
+}
+
+HelpViewer* CentralWidget::currentHelpViewer() const
{
+ TRACE_OBJ
return qobject_cast<HelpViewer*>(tabWidget->currentWidget());
}
void CentralWidget::activateTab(bool onlyHelpViewer)
{
+ TRACE_OBJ
if (currentHelpViewer()) {
currentHelpViewer()->setFocus();
} else {
@@ -739,6 +596,7 @@ void CentralWidget::activateTab(bool onlyHelpViewer)
void CentralWidget::setTabTitle(const QUrl &url)
{
+ TRACE_OBJ
Q_UNUSED(url)
#if !defined(QT_NO_WEBKIT)
QTabBar *tabBar = qFindChild<QTabBar*>(tabWidget);
@@ -760,6 +618,7 @@ void CentralWidget::setTabTitle(const QUrl &url)
void CentralWidget::currentPageChanged(int index)
{
+ TRACE_OBJ
const HelpViewer *viewer = currentHelpViewer();
if (viewer)
lastTabPage = index;
@@ -775,6 +634,7 @@ void CentralWidget::currentPageChanged(int index)
void CentralWidget::showTabBarContextMenu(const QPoint &point)
{
+ TRACE_OBJ
HelpViewer *viewer = helpViewerFromTabPosition(tabWidget, point);
if (!viewer)
return;
@@ -822,11 +682,12 @@ void CentralWidget::showTabBarContextMenu(const QPoint &point)
}
if (pickedAction == newBookmark)
- emit addNewBookmark(viewer->documentTitle(), viewer->source().toString());
+ emit addBookmark(viewer->documentTitle(), viewer->source().toString());
}
bool CentralWidget::eventFilter(QObject *object, QEvent *e)
{
+ TRACE_OBJ
if (e->type() == QEvent::KeyPress) {
QKeyEvent *ke = static_cast<QKeyEvent*>(e);
switch (ke->key()) {
@@ -834,14 +695,6 @@ bool CentralWidget::eventFilter(QObject *object, QEvent *e)
return QWidget::eventFilter(object, e);
} break;
- case Qt::Key_Escape: {
- if (findWidget->editFind == object) {
- findBar->hide();
- if (HelpViewer *viewer = currentHelpViewer())
- viewer->setFocus();
- }
- } break;
-
case Qt::Key_Backspace: {
HelpViewer *viewer = currentHelpViewer();
if (viewer == object) {
@@ -882,43 +735,52 @@ bool CentralWidget::eventFilter(QObject *object, QEvent *e)
void CentralWidget::keyPressEvent(QKeyEvent *e)
{
+ TRACE_OBJ
const QString &text = e->text();
if (text.startsWith(QLatin1Char('/'))) {
- if (!findBar->isVisible()) {
- findBar->show();
- findWidget->editFind->clear();
+ if (!findWidget->isVisible()) {
+ findWidget->showAndClear();
} else {
- findWidget->editFind->selectAll();
+ findWidget->show();
}
- findWidget->editFind->setFocus();
- return;
+ } else {
+ QWidget::keyPressEvent(e);
}
- QWidget::keyPressEvent(e);
}
-void CentralWidget::find(const QString &ttf, bool forward)
+void CentralWidget::findNext()
{
- QPalette p = findWidget->editFind->palette();
- p.setColor(QPalette::Active, QPalette::Base, Qt::white);
+ TRACE_OBJ
+ find(findWidget->text(), true);
+}
- bool found = false;
+void CentralWidget::findPrevious()
+{
+ TRACE_OBJ
+ find(findWidget->text(), false);
+}
+void CentralWidget::find(const QString &ttf, bool forward)
+{
+ TRACE_OBJ
+ bool found = false;
#if defined(QT_NO_WEBKIT)
found = findInTextBrowser(ttf, forward);
#else
found = findInWebPage(ttf, forward);
#endif
- if (!found && !ttf.isEmpty())
- p.setColor(QPalette::Active, QPalette::Base, QColor(255, 102, 102));
+ if (!found && ttf.isEmpty())
+ found = true; // the line edit is empty, no need to mark it red...
if (!findWidget->isVisible())
findWidget->show();
- findWidget->editFind->setPalette(p);
+ findWidget->setPalette(found);
}
bool CentralWidget::findInWebPage(const QString &ttf, bool forward)
{
+ TRACE_OBJ
#if !defined(QT_NO_WEBKIT)
if (HelpViewer *viewer = currentHelpViewer()) {
bool found = false;
@@ -927,21 +789,23 @@ bool CentralWidget::findInWebPage(const QString &ttf, bool forward)
if (!forward)
options |= QWebPage::FindBackward;
- if (findWidget->checkCase->isChecked())
+ if (findWidget->caseSensitive())
options |= QWebPage::FindCaseSensitively;
found = viewer->findText(ttf, options);
- findWidget->labelWrapped->hide();
+ findWidget->setTextWrappedVisible(false);
if (!found) {
options |= QWebPage::FindWrapsAroundDocument;
found = viewer->findText(ttf, options);
if (found)
- findWidget->labelWrapped->show();
+ findWidget->setTextWrappedVisible(true);
}
}
// force highlighting of all other matches, also when empty (clear)
options = QWebPage::HighlightAllOccurrences;
+ if (findWidget->caseSensitive())
+ options |= QWebPage::FindCaseSensitively;
viewer->findText(QLatin1String(""), options);
viewer->findText(ttf, options);
return found;
@@ -949,12 +813,16 @@ bool CentralWidget::findInWebPage(const QString &ttf, bool forward)
// this needs to stay, case for active search results page
return findInTextBrowser(ttf, forward);
+#else
+ Q_UNUSED(ttf);
+ Q_UNUSED(forward);
#endif
return false;
}
bool CentralWidget::findInTextBrowser(const QString &ttf, bool forward)
{
+ TRACE_OBJ
QTextBrowser *browser = qobject_cast<QTextBrowser*>(currentHelpViewer());
if (tabWidget->currentWidget() == m_searchWidget)
browser = qFindChild<QTextBrowser*>(m_searchWidget);
@@ -978,13 +846,10 @@ bool CentralWidget::findInTextBrowser(const QString &ttf, bool forward)
if (!forward)
options |= QTextDocument::FindBackward;
- if (findWidget->checkCase->isChecked())
+ if (findWidget->caseSensitive())
options |= QTextDocument::FindCaseSensitively;
- if (findWidget->checkWholeWords->isChecked())
- options |= QTextDocument::FindWholeWords;
-
- findWidget->labelWrapped->hide();
+ findWidget->setTextWrappedVisible(false);
bool found = true;
QTextCursor newCursor = doc->find(ttf, cursor, options);
@@ -997,7 +862,7 @@ bool CentralWidget::findInTextBrowser(const QString &ttf, bool forward)
found = false;
newCursor = cursor;
} else {
- findWidget->labelWrapped->show();
+ findWidget->setTextWrappedVisible(true);
}
}
browser->setTextCursor(newCursor);
@@ -1006,21 +871,31 @@ bool CentralWidget::findInTextBrowser(const QString &ttf, bool forward)
void CentralWidget::updateBrowserFont()
{
- QFont font;
- bool searchAttached = searchWidgetAttached();
+ TRACE_OBJ
+ const bool searchAttached = searchWidgetAttached();
if (searchAttached) {
- getBrowserFontFor(m_searchWidget, &font);
- setBrowserFontFor(m_searchWidget, font);
+ HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
+ m_searchWidget->setFont(helpEngine.usesBrowserFont()
+ ? helpEngine.browserFont() : qApp->font());
}
- int i = searchAttached ? 1 : 0;
- getBrowserFontFor(tabWidget->widget(i), &font);
- for ( ; i < tabWidget->count(); ++i)
- setBrowserFontFor(tabWidget->widget(i), font);
+ const int count = tabWidget->count();
+ if (HelpViewer* viewer = viewerAt(count - 1)) {
+ const QFont &font = viewer->viewerFont();
+ for (int i = searchAttached ? 1 : 0; i < count; ++i)
+ viewerAt(i)->setViewerFont(font);
+ }
+}
+
+bool CentralWidget::searchWidgetAttached() const
+{
+ TRACE_OBJ
+ return m_searchWidget && m_searchWidget->isAttached();
}
void CentralWidget::createSearchWidget(QHelpSearchEngine *searchEngine)
{
+ TRACE_OBJ
if (m_searchWidget)
return;
@@ -1030,15 +905,16 @@ void CentralWidget::createSearchWidget(QHelpSearchEngine *searchEngine)
connect(m_searchWidget, SIGNAL(requestShowLinkInNewTab(QUrl)), this,
SLOT(setSourceFromSearchInNewTab(QUrl)));
- QFont font;
- getBrowserFontFor(m_searchWidget, &font);
- setBrowserFontFor(m_searchWidget, font);
+ HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
+ m_searchWidget->setFont(!helpEngine.usesBrowserFont() ? qApp->font()
+ : helpEngine.browserFont());
}
void CentralWidget::activateSearchWidget(bool updateLastTabPage)
{
+ TRACE_OBJ
if (!m_searchWidget)
- createSearchWidget(helpEngine->searchEngine());
+ createSearchWidget(HelpEngineWrapper::instance().searchEngine());
if (!m_searchWidget->isAttached()) {
tabWidget->insertTab(0, m_searchWidget, tr("Search"));
@@ -1054,6 +930,7 @@ void CentralWidget::activateSearchWidget(bool updateLastTabPage)
void CentralWidget::removeSearchWidget()
{
+ TRACE_OBJ
if (searchWidgetAttached()) {
tabWidget->removeTab(0);
m_searchWidget->setAttached(false);
@@ -1062,6 +939,7 @@ void CentralWidget::removeSearchWidget()
int CentralWidget::availableHelpViewer() const
{
+ TRACE_OBJ
int count = tabWidget->count();
if (searchWidgetAttached())
count--;
@@ -1070,6 +948,7 @@ int CentralWidget::availableHelpViewer() const
bool CentralWidget::enableTabCloseAction() const
{
+ TRACE_OBJ
int minTabCount = 1;
if (searchWidgetAttached())
minTabCount = 2;
@@ -1079,6 +958,7 @@ bool CentralWidget::enableTabCloseAction() const
QString CentralWidget::quoteTabTitle(const QString &title) const
{
+ TRACE_OBJ
QString s = title;
return s.replace(QLatin1Char('&'), QLatin1String("&&"));
}
@@ -1086,6 +966,7 @@ QString CentralWidget::quoteTabTitle(const QString &title) const
void
CentralWidget::setSourceFromSearch(const QUrl &url)
{
+ TRACE_OBJ
setSource(url);
#if defined(QT_NO_WEBKIT)
highlightSearchTerms();
@@ -1098,6 +979,7 @@ CentralWidget::setSourceFromSearch(const QUrl &url)
void
CentralWidget::setSourceFromSearchInNewTab(const QUrl &url)
{
+ TRACE_OBJ
setSourceInNewTab(url);
#if defined(QT_NO_WEBKIT)
highlightSearchTerms();
@@ -1110,11 +992,13 @@ CentralWidget::setSourceFromSearchInNewTab(const QUrl &url)
void
CentralWidget::highlightSearchTerms()
{
+ TRACE_OBJ
HelpViewer *viewer = currentHelpViewer();
if (!viewer)
return;
- QHelpSearchEngine *searchEngine = helpEngine->searchEngine();
+ QHelpSearchEngine *searchEngine =
+ HelpEngineWrapper::instance().searchEngine();
QList<QHelpSearchQuery> queryList = searchEngine->query();
QStringList terms;
@@ -1174,8 +1058,33 @@ CentralWidget::highlightSearchTerms()
#endif
}
+
+void CentralWidget::closeOrReloadTabs(const QList<int> &indices, bool tryReload)
+{
+ TRACE_OBJ
+ QList<int> sortedIndices = indices;
+ qSort(sortedIndices);
+ for (int i = sortedIndices.count(); --i >= 0;) {
+ const int tab = sortedIndices.at(i);
+ bool close = true;
+ if (tryReload) {
+ HelpViewer *viewer =
+ qobject_cast<HelpViewer*>(tabWidget->widget(tab));
+ if (HelpEngineWrapper::instance().findFile(viewer->source()).isValid()) {
+ viewer->reload();
+ close = false;
+ }
+ }
+ if (close)
+ closeTabAt(tab);
+ }
+ if (availableHelpViewer() == 0)
+ setSource(QUrl(QLatin1String("about:blank")));
+}
+
void CentralWidget::closeTabAt(int index)
{
+ TRACE_OBJ
HelpViewer *viewer = qobject_cast<HelpViewer*>(tabWidget->widget(index));
tabWidget->removeTab(index);
QTimer::singleShot(0, viewer, SLOT(deleteLater()));
@@ -1183,8 +1092,9 @@ void CentralWidget::closeTabAt(int index)
QMap<int, QString> CentralWidget::currentSourceFileList() const
{
+ TRACE_OBJ
QMap<int, QString> sourceList;
- for (int i = 1; i < tabWidget->count(); ++i) {
+ for (int i = 0; i < tabWidget->count(); ++i) {
HelpViewer *viewer = qobject_cast<HelpViewer*>(tabWidget->widget(i));
if (viewer && viewer->source().isValid())
sourceList.insert(i, viewer->source().host());
@@ -1192,40 +1102,4 @@ QMap<int, QString> CentralWidget::currentSourceFileList() const
return sourceList;
}
-void CentralWidget::getBrowserFontFor(QWidget *viewer, QFont *font)
-{
- const QLatin1String key("useBrowserFont");
- if (!helpEngine->customValue(key, false).toBool()) {
- *font = qApp->font(); // case for QTextBrowser and SearchWidget
-#if !defined(QT_NO_WEBKIT)
- QWebView *view = qobject_cast<QWebView*> (viewer);
- if (view) {
- QWebSettings *settings = QWebSettings::globalSettings();
- *font = QFont(settings->fontFamily(QWebSettings::StandardFont),
- settings->fontSize(QWebSettings::DefaultFontSize));
- }
-#endif
- } else {
- *font = qVariantValue<QFont>(helpEngine->customValue(
- QLatin1String("browserFont")));
- }
-}
-
-void CentralWidget::setBrowserFontFor(QWidget *widget, const QFont &font)
-{
-#if !defined(QT_NO_WEBKIT)
- QWebView *view = qobject_cast<QWebView*> (widget);
- if (view) {
- QWebSettings *settings = view->settings();
- settings->setFontFamily(QWebSettings::StandardFont, font.family());
- settings->setFontSize(QWebSettings::DefaultFontSize, font.pointSize());
- } else if (widget && widget->font() != font) {
- widget->setFont(font);
- }
-#else
- if (widget && widget->font() != font)
- widget->setFont(font);
-#endif
-}
-
QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/centralwidget.h b/tools/assistant/tools/assistant/centralwidget.h
index 9e32985aaa..f286ff75db 100644
--- a/tools/assistant/tools/assistant/centralwidget.h
+++ b/tools/assistant/tools/assistant/centralwidget.h
@@ -38,78 +38,27 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
#ifndef CENTRALWIDGET_H
#define CENTRALWIDGET_H
#include <QtCore/QUrl>
-#include <QtCore/QPoint>
-#include <QtCore/QObject>
-
#include <QtGui/QWidget>
-#include "searchwidget.h"
-
QT_BEGIN_NAMESPACE
-class QEvent;
-class QLabel;
-class QAction;
-class QCheckBox;
-class QLineEdit;
-class QTextBrowser;
-class QToolButton;
-
+class FindWidget;
class HelpViewer;
-class QTabWidget;
-class QHelpEngine;
-class CentralWidget;
-class PrintHelper;
class MainWindow;
-
class QHelpSearchEngine;
-
-class FindWidget : public QWidget
-{
- Q_OBJECT
-
-public:
- FindWidget(QWidget *parent = 0);
- ~FindWidget();
-
-signals:
- void findNext();
- void findPrevious();
-
-protected:
- void hideEvent(QHideEvent* event);
- void showEvent(QShowEvent * event);
-
-private slots:
- void updateButtons();
-
-private:
- QToolButton* setupToolButton(const QString &text, const QString &icon);
-
-private:
- QLineEdit *editFind;
- QCheckBox *checkCase;
- QLabel *labelWrapped;
- QToolButton *toolNext;
- QToolButton *toolClose;
- QToolButton *toolPrevious;
- QCheckBox *checkWholeWords;
-
- QPalette appPalette;
- friend class CentralWidget;
-};
+class QTabWidget;
+class SearchWidget;
class CentralWidget : public QWidget
{
Q_OBJECT
public:
- CentralWidget(QHelpEngine *engine, MainWindow *parent);
+ CentralWidget(MainWindow *parent);
~CentralWidget();
void setupWidget();
@@ -121,12 +70,11 @@ public:
bool isBackwardAvailable() const;
QList<QAction*> globalActions() const;
void setGlobalActions(const QList<QAction*> &actions);
+
+ HelpViewer *viewerAt(int index) const;
HelpViewer *currentHelpViewer() const;
- void activateTab(bool onlyHelpViewer = false);
- bool searchWidgetAttached() const {
- return m_searchWidget && m_searchWidget->isAttached();
- }
+ bool searchWidgetAttached() const;
void createSearchWidget(QHelpSearchEngine *searchEngine);
void activateSearchWidget(bool updateLastTabPage = false);
void removeSearchWidget();
@@ -134,6 +82,7 @@ public:
int availableHelpViewer() const;
bool enableTabCloseAction() const;
+ void closeOrReloadTabs(const QList<int> &indices, bool tryReload);
void closeTabAt(int index);
QMap<int, QString> currentSourceFileList() const;
@@ -142,11 +91,9 @@ public:
public slots:
void zoomIn();
void zoomOut();
- void findNext();
void nextPage();
void resetZoom();
void previousPage();
- void findPrevious();
void copySelection();
void showTextSearch();
void print();
@@ -155,12 +102,17 @@ public slots:
void updateBrowserFont();
void setSource(const QUrl &url);
void setSourceInNewTab(const QUrl &url, qreal zoom = 0.0);
- void findCurrentText(const QString &text);
HelpViewer *newEmptyTab();
void home();
void forward();
void backward();
+ void activateTab(bool onlyHelpViewer = false);
+
+ void findNext();
+ void findPrevious();
+ void find(const QString &text, bool forward);
+
signals:
void currentViewerChanged();
void copyAvailable(bool yes);
@@ -168,7 +120,7 @@ signals:
void highlighted(const QString &link);
void forwardAvailable(bool available);
void backwardAvailable(bool available);
- void addNewBookmark(const QString &title, const QString &url);
+ void addBookmark(const QString &title, const QString &url);
protected:
void keyPressEvent(QKeyEvent *);
@@ -187,25 +139,18 @@ private slots:
private:
void connectSignals();
bool eventFilter(QObject *object, QEvent *e);
- void find(const QString &ttf, bool forward);
bool findInWebPage(const QString &ttf, bool forward);
bool findInTextBrowser(const QString &ttf, bool forward);
void initPrinter();
QString quoteTabTitle(const QString &title) const;
void setLastShownPages();
- void getBrowserFontFor(QWidget* viewer, QFont *font);
- void setBrowserFontFor(QWidget *widget, const QFont &font);
-
private:
int lastTabPage;
- QString collectionFile;
QList<QAction*> globalActionList;
- QWidget *findBar;
QTabWidget *tabWidget;
FindWidget *findWidget;
- QHelpEngine *helpEngine;
QPrinter *printer;
bool usesDefaultCollection;
diff --git a/tools/assistant/tools/assistant/cmdlineparser.cpp b/tools/assistant/tools/assistant/cmdlineparser.cpp
index 38814a5bd2..b6c0beba0f 100644
--- a/tools/assistant/tools/assistant/cmdlineparser.cpp
+++ b/tools/assistant/tools/assistant/cmdlineparser.cpp
@@ -38,29 +38,17 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include "tracer.h"
#include <QtCore/QFileInfo>
+#include <QtCore/QStringBuilder>
#include <QtGui/QMessageBox>
#include "cmdlineparser.h"
QT_BEGIN_NAMESPACE
-#define CHECK_NEXT_ARG \
- ++i < arguments.count() && !arguments.at(i).startsWith(QLatin1String("-"))
-
-CmdLineParser::CmdLineParser()
- : m_enableRemoteControl(false),
- m_contents(Untouched),
- m_index(Untouched),
- m_bookmarks(Untouched),
- m_search(Untouched),
- m_register(None),
- m_removeSearchIndex(false),
- m_copy(false),
- m_quiet(false)
-{
- m_helpMessage = QLatin1String(
+const QString CmdLineParser::m_helpMessage = QLatin1String(
"Usage: assistant [Options]\n\n"
"-collectionFile file Uses the specified collection\n"
" file instead of the default one\n"
@@ -85,156 +73,72 @@ CmdLineParser::CmdLineParser()
" file.\n"
"-setCurrentFilter filter Set the filter as the active filter.\n"
"-remove-search-index Removes the full text search index.\n"
+ "-rebuild-search-index Re-builds the full text search index (potentially slow).\n"
"-quiet Does not display any error or\n"
" status message.\n"
"-help Displays this help.\n"
);
-}
-CmdLineParser::Result CmdLineParser::parse(const QStringList &arguments)
-{
- QString error;
- bool showHelp = false;
- for (int j=1; j<arguments.count(); ++j) {
- if (arguments.at(j).toLower() == QLatin1String("-quiet")) {
+CmdLineParser::CmdLineParser(const QStringList &arguments)
+ : m_pos(0),
+ m_enableRemoteControl(false),
+ m_contents(Untouched),
+ m_index(Untouched),
+ m_bookmarks(Untouched),
+ m_search(Untouched),
+ m_register(None),
+ m_removeSearchIndex(false),
+ m_rebuildSearchIndex(false),
+ m_quiet(false)
+{
+ TRACE_OBJ
+ for (int i = 1; i < arguments.count(); ++i) {
+ const QString &arg = arguments.at(i);
+ if (arg.toLower() == "-quiet")
m_quiet = true;
- break;
- }
+ else
+ m_arguments.append(arg);
}
+}
- for (int i=1; i<arguments.count(); ++i) {
- QString arg = arguments.at(i).toLower();
- if (arg == QLatin1String("-collectionfile")) {
- if (CHECK_NEXT_ARG) {
- m_collectionFile = getFileName(arguments.at(i));
- if (m_collectionFile.isEmpty()) {
- error = QObject::tr("The specified collection file does not exist!");
- break;
- }
- } else {
- error = QObject::tr("Missing collection file!");
- break;
- }
- } else if (arg == QLatin1String("-showurl")) {
- if (CHECK_NEXT_ARG) {
- QUrl url(arguments.at(i));
- if (url.isValid()) {
- m_url = url;
- } else {
- error = QObject::tr("Invalid URL!");
- break;
- }
- } else {
- error = QObject::tr("Missing URL!");
- break;
- }
- } else if (arg == QLatin1String("-enableremotecontrol")) {
+CmdLineParser::Result CmdLineParser::parse()
+{
+ TRACE_OBJ
+ bool showHelp = false;
+
+ while (m_error.isEmpty() && hasMoreArgs()) {
+ const QString &arg = nextArg().toLower();
+ if (arg == QLatin1String("-collectionfile"))
+ handleCollectionFileOption();
+ else if (arg == QLatin1String("-showurl"))
+ handleShowUrlOption();
+ else if (arg == QLatin1String("-enableremotecontrol"))
m_enableRemoteControl = true;
- } else if (arg == QLatin1String("-show")) {
- if (CHECK_NEXT_ARG) {
- arg = arguments.at(i).toLower();
- if (arg == QLatin1String("contents")) {
- m_contents = Show;
- } else if (arg == QLatin1String("index")) {
- m_index = Show;
- } else if (arg == QLatin1String("bookmarks")) {
- m_bookmarks = Show;
- } else if (arg == QLatin1String("search")) {
- m_search = Show;
- } else {
- error = QObject::tr("Unknown widget: %1").arg(arg);
- break;
- }
- } else {
- error = QObject::tr("Missing widget!");
- break;
- }
- } else if (arg == QLatin1String("-hide")) {
- if (CHECK_NEXT_ARG) {
- arg = arguments.at(i).toLower();
- if (arg == QLatin1String("contents")) {
- m_contents = Hide;
- } else if (arg == QLatin1String("index")) {
- m_index = Hide;
- } else if (arg == QLatin1String("bookmarks")) {
- m_bookmarks = Hide;
- } else if (arg == QLatin1String("search")) {
- m_search = Hide;
- } else {
- error = QObject::tr("Unknown widget: %1").arg(arg);
- break;
- }
- } else {
- error = QObject::tr("Missing widget!");
- break;
- }
- } else if (arg == QLatin1String("-activate")) {
- if (CHECK_NEXT_ARG) {
- arg = arguments.at(i).toLower();
- if (arg == QLatin1String("contents")) {
- m_contents = Activate;
- } else if (arg == QLatin1String("index")) {
- m_index = Activate;
- } else if (arg == QLatin1String("bookmarks")) {
- m_bookmarks = Activate;
- } else if (arg == QLatin1String("search")) {
- m_search = Activate;
- } else {
- error = QObject::tr("Unknown widget: %1").arg(arg);
- break;
- }
- } else {
- error = QObject::tr("Missing widget!");
- break;
- }
- } else if (arg == QLatin1String("-register")) {
- if (CHECK_NEXT_ARG) {
- m_helpFile = getFileName(arguments.at(i));
- if (m_helpFile.isEmpty()) {
- error = QObject::tr("The specified Qt help file does not exist!");
- break;
- }
- m_register = Register;
- } else {
- error = QObject::tr("Missing help file!");
- break;
- }
- } else if (arg == QLatin1String("-unregister")) {
- if (CHECK_NEXT_ARG) {
- m_helpFile = getFileName(arguments.at(i));
- if (m_helpFile.isEmpty()) {
- error = QObject::tr("The specified Qt help file does not exist!");
- break;
- }
- m_register = Unregister;
- } else {
- error = QObject::tr("Missing help file!");
- break;
- }
- } else if (arg == QLatin1String("-setcurrentfilter")) {
- if (CHECK_NEXT_ARG) {
- m_currentFilter = arguments.at(i);
- } else {
- error = QObject::tr("Missing filter argument!");
- break;
- }
- } else if (arg == QLatin1String("-remove-search-index")) {
+ else if (arg == QLatin1String("-show"))
+ handleShowOption();
+ else if (arg == QLatin1String("-hide"))
+ handleHideOption();
+ else if (arg == QLatin1String("-activate"))
+ handleActivateOption();
+ else if (arg == QLatin1String("-register"))
+ handleRegisterOption();
+ else if (arg == QLatin1String("-unregister"))
+ handleUnregisterOption();
+ else if (arg == QLatin1String("-setcurrentfilter"))
+ handleSetCurrentFilterOption();
+ else if (arg == QLatin1String("-remove-search-index"))
m_removeSearchIndex = true;
- } else if (arg == QLatin1String("-quiet")) {
- continue;
- } else if (arg == QLatin1String("-help")) {
+ else if (arg == QLatin1String("-rebuild-search-index"))
+ m_rebuildSearchIndex = true;
+ else if (arg == QLatin1String("-help"))
showHelp = true;
- } else if (arg == QLatin1String("-copy")) {
- m_copy = true;
- } else {
- error = QObject::tr("Unknown option: %1").arg(arg);
- break;
- }
+ else
+ m_error = tr("Unknown option: %1").arg(arg);
}
- if (!error.isEmpty()) {
- showMessage(error + QLatin1String("\n\n\n") + m_helpMessage, true);
+ if (!m_error.isEmpty()) {
+ showMessage(m_error + QLatin1String("\n\n\n") + m_helpMessage, true);
return Error;
} else if (showHelp) {
showMessage(m_helpMessage, false);
@@ -243,8 +147,125 @@ CmdLineParser::Result CmdLineParser::parse(const QStringList &arguments)
return Ok;
}
+bool CmdLineParser::hasMoreArgs() const
+{
+ TRACE_OBJ
+ return m_pos < m_arguments.count();
+}
+
+const QString &CmdLineParser::nextArg()
+{
+ TRACE_OBJ
+ Q_ASSERT(hasMoreArgs());
+ return m_arguments.at(m_pos++);
+}
+
+void CmdLineParser::handleCollectionFileOption()
+{
+ TRACE_OBJ
+ if (hasMoreArgs()) {
+ const QString &fileName = nextArg();
+ m_collectionFile = getFileName(fileName);
+ if (m_collectionFile.isEmpty())
+ m_error = tr("The collection file '%1' does not exist.").
+ arg(fileName);
+ } else {
+ m_error = tr("Missing collection file.");
+ }
+}
+
+void CmdLineParser::handleShowUrlOption()
+{
+ TRACE_OBJ
+ if (hasMoreArgs()) {
+ const QString &urlString = nextArg();
+ QUrl url(urlString);
+ if (url.isValid()) {
+ m_url = url;
+ } else
+ m_error = tr("Invalid URL '%1'.").arg(urlString);
+ } else {
+ m_error = tr("Missing URL.");
+ }
+}
+
+void CmdLineParser::handleShowOption()
+{
+ TRACE_OBJ
+ handleShowOrHideOrActivateOption(Show);
+}
+
+void CmdLineParser::handleHideOption()
+{
+ TRACE_OBJ
+ handleShowOrHideOrActivateOption(Hide);
+}
+
+void CmdLineParser::handleActivateOption()
+{
+ TRACE_OBJ
+ handleShowOrHideOrActivateOption(Activate);
+}
+
+void CmdLineParser::handleShowOrHideOrActivateOption(ShowState state)
+{
+ TRACE_OBJ
+ if (hasMoreArgs()) {
+ const QString &widget = nextArg().toLower();
+ if (widget == QLatin1String("contents"))
+ m_contents = state;
+ else if (widget == QLatin1String("index"))
+ m_index = state;
+ else if (widget == QLatin1String("bookmarks"))
+ m_bookmarks = state;
+ else if (widget == QLatin1String("search"))
+ m_search = state;
+ else
+ m_error = tr("Unknown widget: %1").arg(widget);
+ } else {
+ m_error = tr("Missing widget.");
+ }
+}
+
+void CmdLineParser::handleRegisterOption()
+{
+ TRACE_OBJ
+ handleRegisterOrUnregisterOption(Register);
+}
+
+void CmdLineParser::handleUnregisterOption()
+{
+ TRACE_OBJ
+ handleRegisterOrUnregisterOption(Unregister);
+}
+
+void CmdLineParser::handleRegisterOrUnregisterOption(RegisterState state)
+{
+ TRACE_OBJ
+ if (hasMoreArgs()) {
+ const QString &fileName = nextArg();
+ m_helpFile = getFileName(fileName);
+ if (m_helpFile.isEmpty())
+ m_error = tr("The Qt help file '%1' does not exist.").arg(fileName);
+ else
+ m_register = state;
+ } else {
+ m_error = tr("Missing help file.");
+ }
+}
+
+void CmdLineParser::handleSetCurrentFilterOption()
+{
+ TRACE_OBJ
+ if (hasMoreArgs())
+ m_currentFilter = nextArg();
+ else
+ m_error = tr("Missing filter argument.");
+}
+
QString CmdLineParser::getFileName(const QString &fileName)
{
+ TRACE_OBJ
QFileInfo fi(fileName);
if (!fi.exists())
return QString();
@@ -253,14 +274,15 @@ QString CmdLineParser::getFileName(const QString &fileName)
void CmdLineParser::showMessage(const QString &msg, bool error)
{
+ TRACE_OBJ
if (m_quiet)
return;
#ifdef Q_OS_WIN
- QString s = QLatin1String("<pre>") + msg + QLatin1String("</pre>");
+ QString message = QLatin1String("<pre>") % msg % QLatin1String("</pre>");
if (error)
- QMessageBox::critical(0, QObject::tr("Qt Assistant"), s);
+ QMessageBox::critical(0, tr("Error"), message);
else
- QMessageBox::information(0, QObject::tr("Qt Assistant"), s);
+ QMessageBox::information(0, tr("Notice"), message);
#else
fprintf(error ? stderr : stdout, "%s\n", qPrintable(msg));
#endif
@@ -268,61 +290,79 @@ void CmdLineParser::showMessage(const QString &msg, bool error)
void CmdLineParser::setCollectionFile(const QString &file)
{
+ TRACE_OBJ
m_collectionFile = file;
}
QString CmdLineParser::collectionFile() const
{
+ TRACE_OBJ
return m_collectionFile;
}
QUrl CmdLineParser::url() const
{
+ TRACE_OBJ
return m_url;
}
bool CmdLineParser::enableRemoteControl() const
{
+ TRACE_OBJ
return m_enableRemoteControl;
}
CmdLineParser::ShowState CmdLineParser::contents() const
{
+ TRACE_OBJ
return m_contents;
}
CmdLineParser::ShowState CmdLineParser::index() const
{
+ TRACE_OBJ
return m_index;
}
CmdLineParser::ShowState CmdLineParser::bookmarks() const
{
+ TRACE_OBJ
return m_bookmarks;
}
CmdLineParser::ShowState CmdLineParser::search() const
{
+ TRACE_OBJ
return m_search;
}
QString CmdLineParser::currentFilter() const
{
+ TRACE_OBJ
return m_currentFilter;
}
bool CmdLineParser::removeSearchIndex() const
{
+ TRACE_OBJ
return m_removeSearchIndex;
}
+bool CmdLineParser::rebuildSearchIndex() const
+{
+ TRACE_OBJ
+ return m_rebuildSearchIndex;
+}
+
CmdLineParser::RegisterState CmdLineParser::registerRequest() const
{
+ TRACE_OBJ
return m_register;
}
QString CmdLineParser::helpFile() const
{
+ TRACE_OBJ
return m_helpFile;
}
diff --git a/tools/assistant/tools/assistant/cmdlineparser.h b/tools/assistant/tools/assistant/cmdlineparser.h
index 17707cb2ae..5573081ec6 100644
--- a/tools/assistant/tools/assistant/cmdlineparser.h
+++ b/tools/assistant/tools/assistant/cmdlineparser.h
@@ -42,6 +42,7 @@
#ifndef CMDLINEPARSER_H
#define CMDLINEPARSER_H
+#include <QtCore/QCoreApplication>
#include <QtCore/QStringList>
#include <QtCore/QUrl>
@@ -49,13 +50,14 @@ QT_BEGIN_NAMESPACE
class CmdLineParser
{
+ Q_DECLARE_TR_FUNCTIONS(CmdLineParser)
public:
enum Result {Ok, Help, Error};
enum ShowState {Untouched, Show, Hide, Activate};
enum RegisterState {None, Register, Unregister};
- CmdLineParser();
- Result parse(const QStringList &arguments);
+ CmdLineParser(const QStringList &arguments);
+ Result parse();
void setCollectionFile(const QString &file);
QString collectionFile() const;
@@ -68,17 +70,30 @@ public:
ShowState search() const;
QString currentFilter() const;
bool removeSearchIndex() const;
+ bool rebuildSearchIndex() const;
RegisterState registerRequest() const;
QString helpFile() const;
- bool copy() const { return m_copy; }
-
void showMessage(const QString &msg, bool error);
private:
QString getFileName(const QString &fileName);
+ bool hasMoreArgs() const;
+ const QString &nextArg();
+ void handleCollectionFileOption();
+ void handleShowUrlOption();
+ void handleShowOption();
+ void handleHideOption();
+ void handleActivateOption();
+ void handleShowOrHideOrActivateOption(ShowState state);
+ void handleRegisterOption();
+ void handleUnregisterOption();
+ void handleRegisterOrUnregisterOption(RegisterState state);
+ void handleSetCurrentFilterOption();
- QString m_helpMessage;
+ QStringList m_arguments;
+ int m_pos;
+ static const QString m_helpMessage;
QString m_collectionFile;
QString m_cloneFile;
QString m_helpFile;
@@ -92,8 +107,9 @@ private:
RegisterState m_register;
QString m_currentFilter;
bool m_removeSearchIndex;
- bool m_copy;
+ bool m_rebuildSearchIndex;
bool m_quiet;
+ QString m_error;
};
QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/contentwindow.cpp b/tools/assistant/tools/assistant/contentwindow.cpp
index 4640673309..e0347c861d 100644
--- a/tools/assistant/tools/assistant/contentwindow.cpp
+++ b/tools/assistant/tools/assistant/contentwindow.cpp
@@ -38,25 +38,26 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include "tracer.h"
#include "contentwindow.h"
#include "centralwidget.h"
+#include "helpenginewrapper.h"
+#include "helpviewer.h"
#include <QtGui/QLayout>
#include <QtGui/QFocusEvent>
#include <QtGui/QMenu>
-#include <QtHelp/QHelpEngine>
#include <QtHelp/QHelpContentWidget>
QT_BEGIN_NAMESPACE
-ContentWindow::ContentWindow(QHelpEngine *helpEngine)
- : m_helpEngine(helpEngine)
- , m_contentWidget(0)
+ContentWindow::ContentWindow()
+ : m_contentWidget(HelpEngineWrapper::instance().contentWidget())
, m_expandDepth(-2)
{
- m_contentWidget = m_helpEngine->contentWidget();
+ TRACE_OBJ
m_contentWidget->viewport()->installEventFilter(this);
m_contentWidget->setContextMenuPolicy(Qt::CustomContextMenu);
@@ -76,10 +77,12 @@ ContentWindow::ContentWindow(QHelpEngine *helpEngine)
ContentWindow::~ContentWindow()
{
+ TRACE_OBJ
}
bool ContentWindow::syncToContent(const QUrl& url)
{
+ TRACE_OBJ
QModelIndex idx = m_contentWidget->indexOf(url);
if (!idx.isValid())
return false;
@@ -89,6 +92,8 @@ bool ContentWindow::syncToContent(const QUrl& url)
void ContentWindow::expandTOC()
{
+ TRACE_OBJ
+ Q_ASSERT(m_expandDepth >= -2);
if (m_expandDepth > -2) {
expandToDepth(m_expandDepth);
m_expandDepth = -2;
@@ -97,27 +102,34 @@ void ContentWindow::expandTOC()
void ContentWindow::expandToDepth(int depth)
{
+ TRACE_OBJ
+ Q_ASSERT(depth >= -2);
m_expandDepth = depth;
if (depth == -1)
m_contentWidget->expandAll();
+ else if (depth == 0)
+ m_contentWidget->collapseAll();
else
- m_contentWidget->expandToDepth(depth);
+ m_contentWidget->expandToDepth(depth - 1);
}
void ContentWindow::focusInEvent(QFocusEvent *e)
{
+ TRACE_OBJ
if (e->reason() != Qt::MouseFocusReason)
m_contentWidget->setFocus();
}
void ContentWindow::keyPressEvent(QKeyEvent *e)
{
+ TRACE_OBJ
if (e->key() == Qt::Key_Escape)
emit escapePressed();
}
bool ContentWindow::eventFilter(QObject *o, QEvent *e)
{
+ TRACE_OBJ
if (m_contentWidget && o == m_contentWidget->viewport()
&& e->type() == QEvent::MouseButtonRelease) {
QMouseEvent *me = static_cast<QMouseEvent*>(e);
@@ -132,7 +144,7 @@ bool ContentWindow::eventFilter(QObject *o, QEvent *e)
qobject_cast<QHelpContentModel*>(m_contentWidget->model());
if (contentModel) {
QHelpContentItem *itm = contentModel->contentItemAt(index);
- if (itm && !isPdfFile(itm))
+ if (itm && AbstractHelpViewer::canOpenPage(itm->url().path()))
CentralWidget::instance()->setSourceInNewTab(itm->url());
}
} else if (button == Qt::LeftButton) {
@@ -146,6 +158,7 @@ bool ContentWindow::eventFilter(QObject *o, QEvent *e)
void ContentWindow::showContextMenu(const QPoint &pos)
{
+ TRACE_OBJ
if (!m_contentWidget->indexAt(pos).isValid())
return;
@@ -157,7 +170,7 @@ void ContentWindow::showContextMenu(const QPoint &pos)
QMenu menu;
QAction *curTab = menu.addAction(tr("Open Link"));
QAction *newTab = menu.addAction(tr("Open Link in New Tab"));
- if (isPdfFile(itm))
+ if (!AbstractHelpViewer::canOpenPage(itm->url().path()))
newTab->setEnabled(false);
menu.move(m_contentWidget->mapToGlobal(pos));
@@ -171,6 +184,7 @@ void ContentWindow::showContextMenu(const QPoint &pos)
void ContentWindow::itemClicked(const QModelIndex &index)
{
+ TRACE_OBJ
QHelpContentModel *contentModel =
qobject_cast<QHelpContentModel*>(m_contentWidget->model());
@@ -181,10 +195,4 @@ void ContentWindow::itemClicked(const QModelIndex &index)
}
}
-bool ContentWindow::isPdfFile(QHelpContentItem *item) const
-{
- const QString &path = item->url().path();
- return path.endsWith(QLatin1String(".pdf"), Qt::CaseInsensitive);
-}
-
QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/contentwindow.h b/tools/assistant/tools/assistant/contentwindow.h
index f3bf0602ca..62855ddda1 100644
--- a/tools/assistant/tools/assistant/contentwindow.h
+++ b/tools/assistant/tools/assistant/contentwindow.h
@@ -57,7 +57,7 @@ class ContentWindow : public QWidget
Q_OBJECT
public:
- ContentWindow(QHelpEngine *helpEngine);
+ ContentWindow();
~ContentWindow();
bool syncToContent(const QUrl &url);
@@ -78,8 +78,7 @@ private:
bool eventFilter(QObject *o, QEvent *e);
bool isPdfFile(QHelpContentItem *item) const;
- QHelpEngine *m_helpEngine;
- QHelpContentWidget *m_contentWidget;
+ QHelpContentWidget * const m_contentWidget;
int m_expandDepth;
};
diff --git a/tools/assistant/tools/assistant/doc/assistant.qdocconf b/tools/assistant/tools/assistant/doc/assistant.qdocconf
index 365613bf58..3b4b5f8087 100644
--- a/tools/assistant/tools/assistant/doc/assistant.qdocconf
+++ b/tools/assistant/tools/assistant/doc/assistant.qdocconf
@@ -12,5 +12,5 @@ HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
"<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \
"<td width=\"30%\" align=\"left\">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>\n" \
"<td width=\"40%\" align=\"center\">Trademarks</td>\n" \
- "<td width=\"30%\" align=\"right\"><div align=\"right\">Qt 4.6.3</div></td>\n" \
+ "<td width=\"30%\" align=\"right\"><div align=\"right\">Qt 4.7.0</div></td>\n" \
"</tr></table></div></address>"
diff --git a/tools/assistant/tools/assistant/filternamedialog.cpp b/tools/assistant/tools/assistant/filternamedialog.cpp
index 1560e041a5..f75f9995d6 100644
--- a/tools/assistant/tools/assistant/filternamedialog.cpp
+++ b/tools/assistant/tools/assistant/filternamedialog.cpp
@@ -38,6 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include "tracer.h"
#include <QtGui/QPushButton>
@@ -48,6 +49,7 @@ QT_BEGIN_NAMESPACE
FilterNameDialog::FilterNameDialog(QWidget *parent)
: QDialog(parent)
{
+ TRACE_OBJ
m_ui.setupUi(this);
connect(m_ui.buttonBox->button(QDialogButtonBox::Ok),
SIGNAL(clicked()), this, SLOT(accept()));
@@ -61,11 +63,13 @@ FilterNameDialog::FilterNameDialog(QWidget *parent)
QString FilterNameDialog::filterName() const
{
+ TRACE_OBJ
return m_ui.lineEdit->text();
}
void FilterNameDialog::updateOkButton()
{
+ TRACE_OBJ
m_ui.buttonBox->button(QDialogButtonBox::Ok)
->setDisabled(m_ui.lineEdit->text().isEmpty());
}
diff --git a/tools/assistant/tools/assistant/findwidget.cpp b/tools/assistant/tools/assistant/findwidget.cpp
new file mode 100644
index 0000000000..60318d4a53
--- /dev/null
+++ b/tools/assistant/tools/assistant/findwidget.cpp
@@ -0,0 +1,234 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "tracer.h"
+#include "findwidget.h"
+
+#include <QtGui/QApplication>
+#include <QtGui/QCheckBox>
+#include <QtGui/QHideEvent>
+#include <QtGui/QKeyEvent>
+#include <QtGui/QLabel>
+#include <QtGui/QLayout>
+#include <QtGui/QLineEdit>
+#include <QtGui/QToolButton>
+
+QT_BEGIN_NAMESPACE
+
+FindWidget::FindWidget(QWidget *parent)
+ : QWidget(parent)
+ , appPalette(qApp->palette())
+{
+ TRACE_OBJ
+ installEventFilter(this);
+ QHBoxLayout *hboxLayout = new QHBoxLayout(this);
+ QString resourcePath = QLatin1String(":/trolltech/assistant/images/");
+
+#ifndef Q_OS_MAC
+ hboxLayout->setMargin(0);
+ hboxLayout->setSpacing(6);
+ resourcePath.append(QLatin1String("win"));
+#else
+ resourcePath.append(QLatin1String("mac"));
+#endif
+
+ toolClose = setupToolButton(QLatin1String(""),
+ resourcePath + QLatin1String("/closetab.png"));
+ hboxLayout->addWidget(toolClose);
+ connect(toolClose, SIGNAL(clicked()), SLOT(hide()));
+
+ editFind = new QLineEdit(this);
+ hboxLayout->addWidget(editFind);
+ editFind->setMinimumSize(QSize(150, 0));
+ connect(editFind, SIGNAL(textChanged(QString)), this,
+ SLOT(textChanged(QString)));
+ connect(editFind, SIGNAL(returnPressed()), this, SIGNAL(findNext()));
+ connect(editFind, SIGNAL(textChanged(QString)), this, SLOT(updateButtons()));
+
+ toolPrevious = setupToolButton(tr("Previous"),
+ resourcePath + QLatin1String("/previous.png"));
+ connect(toolPrevious, SIGNAL(clicked()), this, SIGNAL(findPrevious()));
+
+ hboxLayout->addWidget(toolPrevious);
+
+ toolNext = setupToolButton(tr("Next"),
+ resourcePath + QLatin1String("/next.png"));
+ hboxLayout->addWidget(toolNext);
+ connect(toolNext, SIGNAL(clicked()), this, SIGNAL(findNext()));
+
+ checkCase = new QCheckBox(tr("Case Sensitive"), this);
+ hboxLayout->addWidget(checkCase);
+
+ labelWrapped = new QLabel(this);
+ labelWrapped->setScaledContents(true);
+ labelWrapped->setTextFormat(Qt::RichText);
+ labelWrapped->setMinimumSize(QSize(0, 20));
+ labelWrapped->setMaximumSize(QSize(105, 20));
+ labelWrapped->setAlignment(Qt::AlignLeading | Qt::AlignLeft | Qt::AlignVCenter);
+ labelWrapped->setText(tr("<img src=\":/trolltech/assistant/images/wrap.png\""
+ ">&nbsp;Search wrapped"));
+ hboxLayout->addWidget(labelWrapped);
+
+ QSpacerItem *spacerItem = new QSpacerItem(20, 20, QSizePolicy::Expanding,
+ QSizePolicy::Minimum);
+ hboxLayout->addItem(spacerItem);
+ setMinimumWidth(minimumSizeHint().width());
+ labelWrapped->hide();
+
+ updateButtons();
+}
+
+FindWidget::~FindWidget()
+{
+ TRACE_OBJ
+}
+
+void FindWidget::show()
+{
+ TRACE_OBJ
+ QWidget::show();
+ editFind->selectAll();
+ editFind->setFocus(Qt::ShortcutFocusReason);
+}
+
+void FindWidget::showAndClear()
+{
+ TRACE_OBJ
+ show();
+ editFind->clear();
+}
+
+QString FindWidget::text() const
+{
+ TRACE_OBJ
+ return editFind->text();
+}
+
+bool FindWidget::caseSensitive() const
+{
+ TRACE_OBJ
+ return checkCase->isChecked();
+}
+
+void FindWidget::setPalette(bool found)
+{
+ TRACE_OBJ
+ QPalette palette = editFind->palette();
+ palette.setColor(QPalette::Active, QPalette::Base, found ? Qt::white
+ : QColor(255, 102, 102));
+ editFind->setPalette(palette);
+}
+
+void FindWidget::setTextWrappedVisible(bool visible)
+{
+ TRACE_OBJ
+ labelWrapped->setVisible(visible);
+}
+
+void FindWidget::hideEvent(QHideEvent* event)
+{
+ TRACE_OBJ
+#if !defined(QT_NO_WEBKIT)
+ // TODO: remove this once webkit supports setting the palette
+ if (!event->spontaneous())
+ qApp->setPalette(appPalette);
+#else
+ Q_UNUSED(event);
+#endif
+}
+
+void FindWidget::showEvent(QShowEvent* event)
+{
+ TRACE_OBJ
+#if !defined(QT_NO_WEBKIT)
+ // TODO: remove this once webkit supports setting the palette
+ if (!event->spontaneous()) {
+ QPalette p = appPalette;
+ p.setColor(QPalette::Inactive, QPalette::Highlight,
+ p.color(QPalette::Active, QPalette::Highlight));
+ p.setColor(QPalette::Inactive, QPalette::HighlightedText,
+ p.color(QPalette::Active, QPalette::HighlightedText));
+ qApp->setPalette(p);
+ }
+#else
+ Q_UNUSED(event);
+#endif
+}
+
+void FindWidget::updateButtons()
+{
+ TRACE_OBJ
+ const bool enable = !editFind->text().isEmpty();
+ toolNext->setEnabled(enable);
+ toolPrevious->setEnabled(enable);
+}
+
+void FindWidget::textChanged(const QString &text)
+{
+ TRACE_OBJ
+ emit find(text, true);
+}
+
+bool FindWidget::eventFilter(QObject *object, QEvent *e)
+{
+ TRACE_OBJ
+ if (e->type() == QEvent::KeyPress) {
+ if ((static_cast<QKeyEvent*>(e))->key() == Qt::Key_Escape) {
+ hide();
+ emit escapePressed();
+ }
+ }
+ return QWidget::eventFilter(object, e);
+}
+
+QToolButton* FindWidget::setupToolButton(const QString &text, const QString &icon)
+{
+ TRACE_OBJ
+ QToolButton *toolButton = new QToolButton(this);
+
+ toolButton->setText(text);
+ toolButton->setAutoRaise(true);
+ toolButton->setIcon(QIcon(icon));
+ toolButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+
+ return toolButton;
+}
+
+QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/findwidget.h b/tools/assistant/tools/assistant/findwidget.h
new file mode 100644
index 0000000000..cf780035ee
--- /dev/null
+++ b/tools/assistant/tools/assistant/findwidget.h
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef FINDWIDGET_H
+#define FINDWIDGET_H
+
+#include <QtGui/QWidget>
+
+QT_BEGIN_NAMESPACE
+
+class QCheckBox;
+class QLabel;
+class QLineEdit;
+class QToolButton;
+
+class FindWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ FindWidget(QWidget *parent = 0);
+ ~FindWidget();
+
+ void show();
+ void showAndClear();
+
+ QString text() const;
+ bool caseSensitive() const;
+
+ void setPalette(bool found);
+ void setTextWrappedVisible(bool visible);
+
+signals:
+ void escapePressed();
+
+ void findNext();
+ void findPrevious();
+ void find(const QString &text, bool forward);
+
+protected:
+ void hideEvent(QHideEvent* event);
+ void showEvent(QShowEvent * event);
+
+private slots:
+ void updateButtons();
+ void textChanged(const QString &text);
+
+private:
+ bool eventFilter(QObject *object, QEvent *e);
+ QToolButton* setupToolButton(const QString &text, const QString &icon);
+
+private:
+ QPalette appPalette;
+
+ QLineEdit *editFind;
+ QCheckBox *checkCase;
+ QLabel *labelWrapped;
+ QToolButton *toolNext;
+ QToolButton *toolClose;
+ QToolButton *toolPrevious;
+};
+
+QT_END_NAMESPACE
+
+#endif // FINDWIDGET_H
diff --git a/tools/assistant/tools/assistant/helpenginewrapper.cpp b/tools/assistant/tools/assistant/helpenginewrapper.cpp
new file mode 100644
index 0000000000..41ad633744
--- /dev/null
+++ b/tools/assistant/tools/assistant/helpenginewrapper.cpp
@@ -0,0 +1,841 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "tracer.h"
+
+#include "helpenginewrapper.h"
+#include "../shared/collectionconfiguration.h"
+
+#include <QtCore/QDateTime>
+#include <QtCore/QFileInfo>
+#include <QtCore/QFileSystemWatcher>
+#include <QtCore/QPair>
+#include <QtCore/QSharedPointer>
+#include <QtCore/QTimer>
+#include <QtHelp/QHelpContentModel>
+#include <QtHelp/QHelpEngine>
+#include <QtHelp/QHelpIndexModel>
+#include <QtHelp/QHelpSearchEngine>
+
+QT_BEGIN_NAMESPACE
+
+namespace {
+ const QString Unfiltered;
+ const QString AppFontKey(QLatin1String("appFont"));
+ const QString AppWritingSystemKey(QLatin1String("appWritingSystem"));
+ const QString BookmarksKey(QLatin1String("Bookmarks"));
+ const QString BrowserFontKey(QLatin1String("browserFont"));
+ const QString BrowserWritingSystemKey(QLatin1String("browserWritingSystem"));
+ const QString HomePageKey(QLatin1String("homepage"));
+ const QString MainWindowKey(QLatin1String("MainWindow"));
+ const QString MainWindowGeometryKey(QLatin1String("MainWindowGeometry"));
+ const QString SearchWasAttachedKey(QLatin1String("SearchWasAttached"));
+ const QString StartOptionKey(QLatin1String("StartOption"));
+ const QString UseAppFontKey(QLatin1String("useAppFont"));
+ const QString UseBrowserFontKey(QLatin1String("useBrowserFont"));
+ const QString VersionKey(QString(QLatin1String("qtVersion%1$$$%2")).
+ arg(QLatin1String(QT_VERSION_STR)));
+} // anonymous namespace
+
+class TimeoutForwarder : public QObject
+{
+ Q_OBJECT
+public:
+ TimeoutForwarder(const QString &fileName);
+private slots:
+ void forward();
+private:
+ friend class HelpEngineWrapperPrivate;
+
+ const QString m_fileName;
+};
+
+class HelpEngineWrapperPrivate : public QObject
+{
+ Q_OBJECT
+ friend class HelpEngineWrapper;
+ friend class TimeoutForwarder;
+private slots:
+ void qchFileChanged(const QString &fileName);
+
+signals:
+ void documentationRemoved(const QString &namespaceName);
+ void documentationUpdated(const QString &namespaceName);
+
+private:
+ HelpEngineWrapperPrivate(const QString &collectionFile);
+
+ void initFileSystemWatchers();
+ void checkDocFilesWatched();
+ void qchFileChanged(const QString &fileName, bool fromTimeout);
+
+ static const int UpdateGracePeriod = 2000;
+
+ QHelpEngine * const m_helpEngine;
+ QFileSystemWatcher * const m_qchWatcher;
+ typedef QPair<QDateTime, QSharedPointer<TimeoutForwarder> > RecentSignal;
+ QMap<QString, RecentSignal> m_recentQchUpdates;
+ bool m_initialReindexingNeeded;
+};
+
+const QString HelpEngineWrapper::TrUnfiltered = tr("Unfiltered");
+
+HelpEngineWrapper *HelpEngineWrapper::helpEngineWrapper = 0;
+
+HelpEngineWrapper &HelpEngineWrapper::instance(const QString &collectionFile)
+{
+ TRACE_OBJ
+ /*
+ * Note that this Singleton cannot be static, because it has to be
+ * deleted before the QApplication.
+ */
+ if (helpEngineWrapper == 0)
+ helpEngineWrapper = new HelpEngineWrapper(collectionFile);
+ return *helpEngineWrapper;
+}
+
+void HelpEngineWrapper::removeInstance()
+{
+ TRACE_OBJ
+ delete helpEngineWrapper;
+ helpEngineWrapper = 0;
+}
+
+HelpEngineWrapper::HelpEngineWrapper(const QString &collectionFile)
+ : d(new HelpEngineWrapperPrivate(collectionFile))
+{
+ TRACE_OBJ
+
+ /*
+ * Otherwise we will waste time if several new docs are found,
+ * because we will start to index them, only to be interupted
+ * by the next request. Also, there is a nasty SQLITE bug that will
+ * cause the application to hang for minutes in that case.
+ * This call is reverted by initalDocSetupDone(), which must be
+ * called after the new docs have been installed.
+ */
+ disconnect(d->m_helpEngine, SIGNAL(setupFinished()),
+ searchEngine(), SLOT(indexDocumentation()));
+
+ connect(d, SIGNAL(documentationRemoved(QString)),
+ this, SIGNAL(documentationRemoved(QString)));
+ connect(d, SIGNAL(documentationUpdated(QString)),
+ this, SIGNAL(documentationUpdated(QString)));
+ connect(d->m_helpEngine, SIGNAL(currentFilterChanged(QString)),
+ this, SLOT(handleCurrentFilterChanged(QString)));
+ connect(d->m_helpEngine, SIGNAL(setupFinished()),
+ this, SIGNAL(setupFinished()));
+}
+
+HelpEngineWrapper::~HelpEngineWrapper()
+{
+ TRACE_OBJ
+ const QStringList &namespaces = d->m_helpEngine->registeredDocumentations();
+ foreach (const QString &nameSpace, namespaces) {
+ const QString &docFile
+ = d->m_helpEngine->documentationFileName(nameSpace);
+ d->m_qchWatcher->removePath(docFile);
+ }
+
+ delete d;
+}
+
+void HelpEngineWrapper::initialDocSetupDone()
+{
+ TRACE_OBJ
+ connect(d->m_helpEngine, SIGNAL(setupFinished()),
+ searchEngine(), SLOT(indexDocumentation()));
+ if (d->m_initialReindexingNeeded)
+ setupData();
+}
+
+QHelpSearchEngine *HelpEngineWrapper::searchEngine() const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->searchEngine();
+}
+
+QHelpContentModel *HelpEngineWrapper::contentModel() const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->contentModel();
+}
+
+QHelpIndexModel *HelpEngineWrapper::indexModel() const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->indexModel();
+}
+
+QHelpContentWidget *HelpEngineWrapper::contentWidget()
+{
+ TRACE_OBJ
+ return d->m_helpEngine->contentWidget();
+}
+
+QHelpIndexWidget *HelpEngineWrapper::indexWidget()
+{
+ TRACE_OBJ
+ return d->m_helpEngine->indexWidget();
+}
+
+const QStringList HelpEngineWrapper::registeredDocumentations() const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->registeredDocumentations();
+}
+
+const QString HelpEngineWrapper::collectionFile() const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->collectionFile();
+}
+
+bool HelpEngineWrapper::registerDocumentation(const QString &docFile)
+{
+ TRACE_OBJ
+ d->checkDocFilesWatched();
+ if (!d->m_helpEngine->registerDocumentation(docFile))
+ return false;
+ d->m_qchWatcher->addPath(docFile);
+ d->checkDocFilesWatched();
+ d->m_initialReindexingNeeded = true;
+ return true;
+}
+
+bool HelpEngineWrapper::unregisterDocumentation(const QString &namespaceName)
+{
+ TRACE_OBJ
+ d->checkDocFilesWatched();
+ const QString &file = d->m_helpEngine->documentationFileName(namespaceName);
+ if (!d->m_helpEngine->unregisterDocumentation(namespaceName))
+ return false;
+ d->m_qchWatcher->removePath(file);
+ d->checkDocFilesWatched();
+ d->m_initialReindexingNeeded = true;
+ return true;
+}
+
+bool HelpEngineWrapper::setupData()
+{
+ TRACE_OBJ
+ return d->m_helpEngine->setupData();
+}
+
+bool HelpEngineWrapper::addCustomFilter(const QString &filterName,
+ const QStringList &attributes)
+{
+ TRACE_OBJ
+ return d->m_helpEngine->addCustomFilter(filterName, attributes);
+}
+
+bool HelpEngineWrapper::removeCustomFilter(const QString &filterName)
+{
+ TRACE_OBJ
+ return d->m_helpEngine->removeCustomFilter(filterName);
+}
+
+void HelpEngineWrapper::setCurrentFilter(const QString &currentFilter)
+{
+ TRACE_OBJ
+ const QString &filter
+ = currentFilter == TrUnfiltered ? Unfiltered : currentFilter;
+ d->m_helpEngine->setCurrentFilter(filter);
+}
+
+const QString HelpEngineWrapper::currentFilter() const
+{
+ TRACE_OBJ
+ const QString &filter = d->m_helpEngine->currentFilter();
+ return filter == Unfiltered ? TrUnfiltered : filter;
+}
+
+const QStringList HelpEngineWrapper::customFilters() const
+{
+ TRACE_OBJ
+ QStringList filters = d->m_helpEngine->customFilters();
+ filters.removeOne(Unfiltered);
+ filters.prepend(TrUnfiltered);
+ return filters;
+}
+
+QUrl HelpEngineWrapper::findFile(const QUrl &url) const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->findFile(url);
+}
+
+QByteArray HelpEngineWrapper::fileData(const QUrl &url) const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->fileData(url);
+}
+
+QMap<QString, QUrl> HelpEngineWrapper::linksForIdentifier(const QString &id) const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->linksForIdentifier(id);
+}
+
+const QStringList HelpEngineWrapper::filterAttributes() const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->filterAttributes();
+}
+
+const QStringList HelpEngineWrapper::filterAttributes(const QString &filterName) const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->filterAttributes(filterName);
+}
+
+QString HelpEngineWrapper::error() const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->error();
+}
+
+const QStringList HelpEngineWrapper::qtDocInfo(const QString &component) const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->customValue(VersionKey.arg(component)).toString().
+ split(CollectionConfiguration::ListSeparator);
+}
+
+void HelpEngineWrapper::setQtDocInfo(const QString &component,
+ const QStringList &doc)
+{
+ TRACE_OBJ
+ d->m_helpEngine->setCustomValue(VersionKey.arg(component),
+ doc.join(CollectionConfiguration::ListSeparator));
+}
+
+const QStringList HelpEngineWrapper::lastShownPages() const
+{
+ TRACE_OBJ
+ return CollectionConfiguration::lastShownPages(*d->m_helpEngine);
+}
+
+void HelpEngineWrapper::setLastShownPages(const QStringList &lastShownPages)
+{
+ TRACE_OBJ
+ CollectionConfiguration::setLastShownPages(*d->m_helpEngine, lastShownPages);
+}
+
+const QStringList HelpEngineWrapper::lastZoomFactors() const
+{
+ TRACE_OBJ
+ return CollectionConfiguration::lastZoomFactors(*d->m_helpEngine);
+}
+
+void HelpEngineWrapper::setLastZoomFactors(const QStringList &lastZoomFactors)
+{
+ TRACE_OBJ
+ CollectionConfiguration::setLastZoomFactors(*d->m_helpEngine, lastZoomFactors);
+}
+
+const QString HelpEngineWrapper::cacheDir() const
+{
+ TRACE_OBJ
+ return CollectionConfiguration::cacheDir(*d->m_helpEngine);
+}
+
+bool HelpEngineWrapper::cacheDirIsRelativeToCollection() const
+{
+ TRACE_OBJ
+ return CollectionConfiguration::cacheDirIsRelativeToCollection(*d->m_helpEngine);
+}
+
+void HelpEngineWrapper::setCacheDir(const QString &cacheDir,
+ bool relativeToCollection)
+{
+ TRACE_OBJ
+ CollectionConfiguration::setCacheDir(*d->m_helpEngine, cacheDir,
+ relativeToCollection);
+}
+
+bool HelpEngineWrapper::filterFunctionalityEnabled() const
+{
+ TRACE_OBJ
+ return CollectionConfiguration::filterFunctionalityEnabled(*d->m_helpEngine);
+}
+
+void HelpEngineWrapper::setFilterFunctionalityEnabled(bool enabled)
+{
+ TRACE_OBJ
+ CollectionConfiguration::setFilterFunctionalityEnabled(*d->m_helpEngine,
+ enabled);
+}
+
+bool HelpEngineWrapper::filterToolbarVisible() const
+{
+ TRACE_OBJ
+ return CollectionConfiguration::filterToolbarVisible(*d->m_helpEngine);
+}
+
+void HelpEngineWrapper::setFilterToolbarVisible(bool visible)
+{
+ TRACE_OBJ
+ CollectionConfiguration::setFilterToolbarVisible(*d->m_helpEngine, visible);
+}
+
+bool HelpEngineWrapper::addressBarEnabled() const
+{
+ TRACE_OBJ
+ return CollectionConfiguration::addressBarEnabled(*d->m_helpEngine);
+}
+
+void HelpEngineWrapper::setAddressBarEnabled(bool enabled)
+{
+ TRACE_OBJ
+ CollectionConfiguration::setAddressBarEnabled(*d->m_helpEngine, enabled);
+}
+
+bool HelpEngineWrapper::addressBarVisible() const
+{
+ TRACE_OBJ
+ return CollectionConfiguration::addressBarVisible(*d->m_helpEngine);
+}
+
+void HelpEngineWrapper::setAddressBarVisible(bool visible)
+{
+ TRACE_OBJ
+ CollectionConfiguration::setAddressBarVisible(*d->m_helpEngine, visible);
+}
+
+bool HelpEngineWrapper::documentationManagerEnabled() const
+{
+ TRACE_OBJ
+ return CollectionConfiguration::documentationManagerEnabled(*d->m_helpEngine);
+}
+
+void HelpEngineWrapper::setDocumentationManagerEnabled(bool enabled)
+{
+ TRACE_OBJ
+ CollectionConfiguration::setDocumentationManagerEnabled(*d->m_helpEngine,
+ enabled);
+}
+
+const QByteArray HelpEngineWrapper::aboutMenuTexts() const
+{
+ TRACE_OBJ
+ return CollectionConfiguration::aboutMenuTexts(*d->m_helpEngine);
+}
+
+void HelpEngineWrapper::setAboutMenuTexts(const QByteArray &texts)
+{
+ TRACE_OBJ
+ CollectionConfiguration::setAboutMenuTexts(*d->m_helpEngine, texts);
+}
+
+const QByteArray HelpEngineWrapper::aboutIcon() const
+{
+ TRACE_OBJ
+ return CollectionConfiguration::aboutIcon(*d->m_helpEngine);
+}
+
+void HelpEngineWrapper::setAboutIcon(const QByteArray &icon)
+{
+ TRACE_OBJ
+ CollectionConfiguration::setAboutIcon(*d->m_helpEngine, icon);
+}
+
+const QByteArray HelpEngineWrapper::aboutImages() const
+{
+ TRACE_OBJ
+ return CollectionConfiguration::aboutImages(*d->m_helpEngine);
+}
+
+void HelpEngineWrapper::setAboutImages(const QByteArray &images)
+{
+ TRACE_OBJ
+ CollectionConfiguration::setAboutImages(*d->m_helpEngine, images);
+}
+
+const QByteArray HelpEngineWrapper::aboutTexts() const
+{
+ TRACE_OBJ
+ return CollectionConfiguration::aboutTexts(*d->m_helpEngine);
+}
+
+void HelpEngineWrapper::setAboutTexts(const QByteArray &texts)
+{
+ TRACE_OBJ
+ CollectionConfiguration::setAboutTexts(*d->m_helpEngine, texts);
+}
+
+const QString HelpEngineWrapper::windowTitle() const
+{
+ TRACE_OBJ
+ return CollectionConfiguration::windowTitle(*d->m_helpEngine);
+}
+
+void HelpEngineWrapper::setWindowTitle(const QString &windowTitle)
+{
+ TRACE_OBJ
+ CollectionConfiguration::setWindowTitle(*d->m_helpEngine, windowTitle);
+}
+
+const QByteArray HelpEngineWrapper::applicationIcon() const
+{
+ TRACE_OBJ
+ return CollectionConfiguration::applicationIcon(*d->m_helpEngine);
+}
+
+void HelpEngineWrapper::setApplicationIcon(const QByteArray &icon)
+{
+ TRACE_OBJ
+ CollectionConfiguration::setApplicationIcon(*d->m_helpEngine, icon);
+}
+
+const QByteArray HelpEngineWrapper::mainWindow() const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->customValue(MainWindowKey).toByteArray();
+}
+
+void HelpEngineWrapper::setMainWindow(const QByteArray &mainWindow)
+{
+ TRACE_OBJ
+ d->m_helpEngine->setCustomValue(MainWindowKey, mainWindow);
+}
+
+const QByteArray HelpEngineWrapper::mainWindowGeometry() const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->customValue(MainWindowGeometryKey).toByteArray();
+}
+
+void HelpEngineWrapper::setMainWindowGeometry(const QByteArray &geometry)
+{
+ TRACE_OBJ
+ d->m_helpEngine->setCustomValue(MainWindowGeometryKey, geometry);
+}
+
+const QByteArray HelpEngineWrapper::bookmarks() const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->customValue(BookmarksKey).toByteArray();
+}
+
+void HelpEngineWrapper::setBookmarks(const QByteArray &bookmarks)
+{
+ TRACE_OBJ
+ d->m_helpEngine->setCustomValue(BookmarksKey, bookmarks);
+}
+
+int HelpEngineWrapper::lastTabPage() const
+{
+ TRACE_OBJ
+ return CollectionConfiguration::lastTabPage(*d->m_helpEngine);
+}
+
+void HelpEngineWrapper::setLastTabPage(int lastPage)
+{
+ TRACE_OBJ
+ CollectionConfiguration::setLastTabPage(*d->m_helpEngine, lastPage);
+}
+
+bool HelpEngineWrapper::searchWasAttached() const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->customValue(SearchWasAttachedKey).toBool();
+}
+
+void HelpEngineWrapper::setSearchWasAttached(bool attached)
+{
+ TRACE_OBJ
+ d->m_helpEngine->setCustomValue(SearchWasAttachedKey, attached);
+}
+
+int HelpEngineWrapper::startOption() const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->customValue(StartOptionKey, ShowLastPages).toInt();
+}
+
+void HelpEngineWrapper::setStartOption(int option)
+{
+ TRACE_OBJ
+ d->m_helpEngine->setCustomValue(StartOptionKey, option);
+}
+
+const QString HelpEngineWrapper::homePage() const
+{
+ TRACE_OBJ
+ const QString &homePage
+ = d->m_helpEngine->customValue(HomePageKey).toString();
+ if (!homePage.isEmpty())
+ return homePage;
+ return defaultHomePage();
+}
+
+void HelpEngineWrapper::setHomePage(const QString &page)
+{
+ TRACE_OBJ
+ d->m_helpEngine->setCustomValue(HomePageKey, page);
+
+}
+
+const QString HelpEngineWrapper::defaultHomePage() const
+{
+ TRACE_OBJ
+ return CollectionConfiguration::defaultHomePage(*d->m_helpEngine);
+}
+
+void HelpEngineWrapper::setDefaultHomePage(const QString &page)
+{
+ TRACE_OBJ
+ CollectionConfiguration::setDefaultHomePage(*d->m_helpEngine, page);
+}
+
+bool HelpEngineWrapper::hasFontSettings() const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->customValue(UseAppFontKey).isValid();
+}
+
+bool HelpEngineWrapper::usesAppFont() const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->customValue(UseAppFontKey).toBool();
+}
+
+void HelpEngineWrapper::setUseAppFont(bool useAppFont)
+{
+ TRACE_OBJ
+ d->m_helpEngine->setCustomValue(UseAppFontKey, useAppFont);
+}
+
+bool HelpEngineWrapper::usesBrowserFont() const
+{
+ TRACE_OBJ
+ return d->m_helpEngine->customValue(UseBrowserFontKey, false).toBool();
+}
+
+void HelpEngineWrapper::setUseBrowserFont(bool useBrowserFont)
+{
+ TRACE_OBJ
+ d->m_helpEngine->setCustomValue(UseBrowserFontKey, useBrowserFont);
+}
+
+const QFont HelpEngineWrapper::appFont() const
+{
+ TRACE_OBJ
+ return qVariantValue<QFont>(d->m_helpEngine->customValue(AppFontKey));
+}
+
+void HelpEngineWrapper::setAppFont(const QFont &font)
+{
+ TRACE_OBJ
+ d->m_helpEngine->setCustomValue(AppFontKey, font);
+}
+
+QFontDatabase::WritingSystem HelpEngineWrapper::appWritingSystem() const
+{
+ TRACE_OBJ
+ return static_cast<QFontDatabase::WritingSystem>(
+ d->m_helpEngine->customValue(AppWritingSystemKey).toInt());
+}
+
+void HelpEngineWrapper::setAppWritingSystem(QFontDatabase::WritingSystem system)
+{
+ TRACE_OBJ
+ d->m_helpEngine->setCustomValue(AppWritingSystemKey, system);
+}
+
+const QFont HelpEngineWrapper::browserFont() const
+{
+ TRACE_OBJ
+ return qVariantValue<QFont>(d->m_helpEngine->customValue(BrowserFontKey));
+}
+
+void HelpEngineWrapper::setBrowserFont(const QFont &font)
+{
+ TRACE_OBJ
+ d->m_helpEngine->setCustomValue(BrowserFontKey, font);
+}
+
+QFontDatabase::WritingSystem HelpEngineWrapper::browserWritingSystem() const
+{
+ TRACE_OBJ
+ return static_cast<QFontDatabase::WritingSystem>(
+ d->m_helpEngine->customValue(BrowserWritingSystemKey).toInt());
+}
+
+void HelpEngineWrapper::setBrowserWritingSystem(QFontDatabase::WritingSystem system)
+{
+ TRACE_OBJ
+ d->m_helpEngine->setCustomValue(BrowserWritingSystemKey, system);
+}
+
+void HelpEngineWrapper::handleCurrentFilterChanged(const QString &filter)
+{
+ const QString &filterToReport
+ = filter == Unfiltered ? TrUnfiltered : filter;
+ emit currentFilterChanged(filterToReport);
+}
+
+
+TimeoutForwarder::TimeoutForwarder(const QString &fileName)
+ : m_fileName(fileName)
+{
+ TRACE_OBJ
+}
+
+void TimeoutForwarder::forward()
+{
+ TRACE_OBJ
+ HelpEngineWrapper::instance().d->qchFileChanged(m_fileName, true);
+}
+
+
+HelpEngineWrapperPrivate::HelpEngineWrapperPrivate(const QString &collectionFile)
+ : m_helpEngine(new QHelpEngine(collectionFile, this)),
+ m_qchWatcher(new QFileSystemWatcher(this)),
+ m_initialReindexingNeeded(false)
+{
+ TRACE_OBJ
+ if (!m_helpEngine->customFilters().contains(Unfiltered))
+ m_helpEngine->addCustomFilter(Unfiltered, QStringList());
+ initFileSystemWatchers();
+}
+
+void HelpEngineWrapperPrivate::initFileSystemWatchers()
+{
+ TRACE_OBJ
+ foreach(const QString &ns, m_helpEngine->registeredDocumentations()) {
+ const QString &docFile = m_helpEngine->documentationFileName(ns);
+ m_qchWatcher->addPath(docFile);
+ connect(m_qchWatcher, SIGNAL(fileChanged(QString)),
+ this, SLOT(qchFileChanged(QString)));
+ }
+ checkDocFilesWatched();
+}
+
+void HelpEngineWrapperPrivate::qchFileChanged(const QString &fileName)
+{
+ TRACE_OBJ
+ qchFileChanged(fileName, false);
+}
+
+void HelpEngineWrapperPrivate::checkDocFilesWatched()
+{
+ TRACE_OBJ
+ const int watchedFilesCount = m_qchWatcher->files().count();
+ const int docFilesCount = m_helpEngine->registeredDocumentations().count();
+ if (watchedFilesCount != docFilesCount) {
+ qWarning("Strange: Have %d docs, but %d are being watched",
+ watchedFilesCount, docFilesCount);
+ }
+}
+
+void HelpEngineWrapperPrivate::qchFileChanged(const QString &fileName,
+ bool fromTimeout)
+{
+ TRACE_OBJ
+
+ /*
+ * We don't use QHelpEngineCore::namespaceName(fileName), because the file
+ * may not exist anymore or contain a different namespace.
+ */
+ QString ns;
+ foreach (const QString &curNs, m_helpEngine->registeredDocumentations()) {
+ if (m_helpEngine->documentationFileName(curNs) == fileName) {
+ ns = curNs;
+ break;
+ }
+ }
+
+ /*
+ * We can't do an assertion here, because QFileSystemWatcher may send the
+ * signal more than once.
+ */
+ if (ns.isEmpty()) {
+ m_recentQchUpdates.remove(fileName);
+ return;
+ }
+
+ /*
+ * Since the QFileSystemWatcher typically sends the signal more than once,
+ * we repeatedly delay our reaction a bit until we think the last signal
+ * was sent.
+ */
+
+ QMap<QString, RecentSignal>::Iterator it = m_recentQchUpdates.find(fileName);
+ const QDateTime &now = QDateTime::currentDateTime();
+
+ // Case 1: This is the first recent signal for the file.
+ if (it == m_recentQchUpdates.end()) {
+ QSharedPointer<TimeoutForwarder> forwarder(new TimeoutForwarder(fileName));
+ m_recentQchUpdates.insert(fileName, RecentSignal(now, forwarder));
+ QTimer::singleShot(UpdateGracePeriod, forwarder.data(), SLOT(forward()));
+ return;
+ }
+
+ // Case 2: The last signal for this file has not expired yet.
+ if (it.value().first > now.addMSecs(-UpdateGracePeriod)) {
+ if (!fromTimeout)
+ it.value().first = now;
+ else
+ QTimer::singleShot(UpdateGracePeriod, it.value().second.data(),
+ SLOT(forward()));
+ return;
+ }
+
+ // Case 3: The last signal for this file has expired.
+ if (m_helpEngine->unregisterDocumentation(ns)) {
+ if (!QFileInfo(fileName).exists()
+ || !m_helpEngine->registerDocumentation(fileName)) {
+ m_qchWatcher->removePath(fileName);
+ emit documentationRemoved(ns);
+ } else {
+ emit documentationUpdated(ns);
+ }
+ m_initialReindexingNeeded = true;
+ m_helpEngine->setupData();
+ }
+ m_recentQchUpdates.erase(it);
+}
+
+
+QT_END_NAMESPACE
+
+#include "helpenginewrapper.moc"
diff --git a/tools/assistant/tools/assistant/helpenginewrapper.h b/tools/assistant/tools/assistant/helpenginewrapper.h
new file mode 100644
index 0000000000..c1041b65cc
--- /dev/null
+++ b/tools/assistant/tools/assistant/helpenginewrapper.h
@@ -0,0 +1,216 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef HELPENGINEWRAPPER_H
+#define HELPENGINEWRAPPER_H
+
+#include <QtCore/QMap>
+#include <QtCore/QObject>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QUrl>
+#include <QtGui/QFont>
+#include <QtGui/QFontDatabase>
+
+QT_BEGIN_NAMESPACE
+
+class QFileSystemWatcher;
+class QHelpContentModel;
+class QHelpContentWidget;
+class QHelpIndexModel;
+class QHelpIndexWidget;
+class QHelpSearchEngine;
+
+enum {
+ ShowHomePage = 0,
+ ShowBlankPage = 1,
+ ShowLastPages = 2
+};
+
+class HelpEngineWrapperPrivate;
+class TimeoutForwarder;
+
+class HelpEngineWrapper : public QObject
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(HelpEngineWrapper)
+ friend class TimeoutForwarder;
+public:
+ static HelpEngineWrapper &instance(const QString &collectionFile = QString());
+ static void removeInstance();
+
+ // Forwarded help engine member functions, possibly enriched.
+ QHelpSearchEngine *searchEngine() const;
+ QHelpContentModel *contentModel() const;
+ QHelpIndexModel *indexModel() const;
+ QHelpContentWidget *contentWidget();
+ QHelpIndexWidget *indexWidget();
+ bool setupData();
+ const QStringList registeredDocumentations() const;
+ const QString collectionFile() const;
+ bool registerDocumentation(const QString &docFile);
+ bool unregisterDocumentation(const QString &namespaceName);
+ bool addCustomFilter(const QString &filterName,
+ const QStringList &attributes);
+ bool removeCustomFilter(const QString &filterName);
+ void setCurrentFilter(const QString &filterName);
+ const QString currentFilter() const;
+ const QStringList customFilters() const;
+ QUrl findFile(const QUrl &url) const;
+ QByteArray fileData(const QUrl &url) const;
+ QMap<QString, QUrl> linksForIdentifier(const QString &id) const;
+ const QStringList filterAttributes() const;
+ const QStringList filterAttributes(const QString &filterName) const;
+ QString error() const;
+
+ /*
+ * To be called after assistant has finished looking for new documentation.
+ * This will mainly cause the search index to be updated, if necessary.
+ */
+ void initialDocSetupDone();
+
+ const QStringList qtDocInfo(const QString &component) const;
+ void setQtDocInfo(const QString &component, const QStringList &doc);
+
+ const QString homePage() const;
+ void setHomePage(const QString &page);
+ const QString defaultHomePage() const;
+ void setDefaultHomePage(const QString &page);
+
+ int lastTabPage() const;
+ void setLastTabPage(int lastPage);
+
+ // TODO: Don't allow last pages and zoom factors to be set in isolation
+ // Perhaps also fill up missing elements automatically or assert.
+ const QStringList lastShownPages() const;
+ void setLastShownPages(const QStringList &lastShownPages);
+ const QStringList lastZoomFactors() const;
+ void setLastZoomFactors(const QStringList &lastZoomFactors);
+
+ const QString cacheDir() const;
+ bool cacheDirIsRelativeToCollection() const;
+ void setCacheDir(const QString &cacheDir, bool relativeToCollection);
+
+ bool filterFunctionalityEnabled() const;
+ void setFilterFunctionalityEnabled(bool enabled);
+
+ bool filterToolbarVisible() const;
+ void setFilterToolbarVisible(bool visible);
+
+ bool addressBarEnabled() const;
+ void setAddressBarEnabled(bool enabled);
+
+ bool addressBarVisible() const;
+ void setAddressBarVisible(bool visible);
+
+ bool documentationManagerEnabled() const;
+ void setDocumentationManagerEnabled(bool enabled);
+
+ const QByteArray aboutMenuTexts() const;
+ void setAboutMenuTexts(const QByteArray &texts);
+ const QByteArray aboutTexts() const;
+ void setAboutTexts(const QByteArray &texts);
+ const QByteArray aboutIcon() const;
+ void setAboutIcon(const QByteArray &icon);
+ const QByteArray aboutImages() const;
+ void setAboutImages(const QByteArray &images);
+
+ const QString windowTitle() const;
+ void setWindowTitle(const QString &windowTitle);
+
+ const QByteArray applicationIcon() const;
+ void setApplicationIcon(const QByteArray &icon);
+
+ const QByteArray mainWindow() const;
+ void setMainWindow(const QByteArray &mainWindow);
+ const QByteArray mainWindowGeometry() const;
+ void setMainWindowGeometry(const QByteArray &geometry);
+
+ const QByteArray bookmarks() const;
+ void setBookmarks(const QByteArray &bookmarks);
+
+ int startOption() const;
+ void setStartOption(int option);
+
+ bool searchWasAttached() const;
+ void setSearchWasAttached(bool attached);
+
+ bool hasFontSettings() const;
+ bool usesAppFont() const;
+ void setUseAppFont(bool useAppFont);
+ bool usesBrowserFont() const;
+ void setUseBrowserFont(bool useBrowserFont);
+ const QFont appFont() const;
+ void setAppFont(const QFont &font);
+ QFontDatabase::WritingSystem appWritingSystem() const;
+ void setAppWritingSystem(QFontDatabase::WritingSystem system);
+ const QFont browserFont() const;
+ void setBrowserFont(const QFont &font);
+ QFontDatabase::WritingSystem browserWritingSystem() const;
+ void setBrowserWritingSystem(QFontDatabase::WritingSystem system);
+
+ static const QString TrUnfiltered;
+
+signals:
+
+ // For asynchronous doc updates triggered by external actions.
+ void documentationRemoved(const QString &namespaceName);
+ void documentationUpdated(const QString &namespaceName);
+
+ // Forwarded from QHelpEngineCore.
+ void currentFilterChanged(const QString &currentFilter);
+ void setupFinished();
+
+private slots:
+ void handleCurrentFilterChanged(const QString &filter);
+
+private:
+ HelpEngineWrapper(const QString &collectionFile);
+ ~HelpEngineWrapper();
+
+ static HelpEngineWrapper *helpEngineWrapper;
+
+ HelpEngineWrapperPrivate *d;
+};
+
+QT_END_NAMESPACE
+
+#endif // HELPENGINEWRAPPER_H
diff --git a/tools/assistant/tools/assistant/helpviewer.cpp b/tools/assistant/tools/assistant/helpviewer.cpp
index f22ab8a8e7..9b06400bd9 100644
--- a/tools/assistant/tools/assistant/helpviewer.cpp
+++ b/tools/assistant/tools/assistant/helpviewer.cpp
@@ -38,590 +38,88 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
#include "helpviewer.h"
-#include "centralwidget.h"
+#include "helpenginewrapper.h"
+#include "tracer.h"
-#include <QtCore/QDir>
-#include <QtCore/QEvent>
-#include <QtCore/QVariant>
-#include <QtCore/QByteArray>
-#include <QtCore/QTimer>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QFileInfo>
+#include <QtCore/QStringBuilder>
+#include <QtCore/QTemporaryFile>
+#include <QtCore/QUrl>
-#include <QtGui/QMenu>
-#include <QtGui/QKeyEvent>
-#include <QtGui/QClipboard>
-#include <QtGui/QApplication>
-#include <QtGui/QMessageBox>
#include <QtGui/QDesktopServices>
-#include <QtHelp/QHelpEngine>
-
-#include <QNetworkAccessManager>
-#include <QNetworkReply>
-#include <QNetworkRequest>
-
QT_BEGIN_NAMESPACE
-#if !defined(QT_NO_WEBKIT)
-
-class HelpNetworkReply : public QNetworkReply
-{
-public:
- HelpNetworkReply(const QNetworkRequest &request, const QByteArray &fileData,
- const QString &mimeType);
-
- virtual void abort();
-
- virtual qint64 bytesAvailable() const
- { return data.length() + QNetworkReply::bytesAvailable(); }
-
-protected:
- virtual qint64 readData(char *data, qint64 maxlen);
-
-private:
- QByteArray data;
- qint64 origLen;
-};
-
-HelpNetworkReply::HelpNetworkReply(const QNetworkRequest &request,
- const QByteArray &fileData, const QString& mimeType)
- : data(fileData), origLen(fileData.length())
-{
- setRequest(request);
- setOpenMode(QIODevice::ReadOnly);
+QString AbstractHelpViewer::AboutBlank =
+ QCoreApplication::translate("HelpViewer", "<title>about:blank</title>");
- setHeader(QNetworkRequest::ContentTypeHeader, mimeType);
- setHeader(QNetworkRequest::ContentLengthHeader, QByteArray::number(origLen));
- QTimer::singleShot(0, this, SIGNAL(metaDataChanged()));
- QTimer::singleShot(0, this, SIGNAL(readyRead()));
-}
+QString AbstractHelpViewer::LocalHelpFile = QLatin1String("qthelp://"
+ "com.trolltech.com.assistantinternal-1.0.0/assistant/assistant.html");
-void HelpNetworkReply::abort()
-{
- // nothing to do
-}
+QString AbstractHelpViewer::PageNotFoundMessage =
+ QCoreApplication::translate("HelpViewer", "<title>Error 404...</title><div "
+ "align=\"center\"><br><br><h1>The page could not be found</h1><br><h3>'%1'"
+ "</h3></div>");
-qint64 HelpNetworkReply::readData(char *buffer, qint64 maxlen)
+AbstractHelpViewer::AbstractHelpViewer()
{
- qint64 len = qMin(qint64(data.length()), maxlen);
- if (len) {
- qMemCopy(buffer, data.constData(), len);
- data.remove(0, len);
- }
- if (!data.length())
- QTimer::singleShot(0, this, SIGNAL(finished()));
- return len;
}
-class HelpNetworkAccessManager : public QNetworkAccessManager
-{
-public:
- HelpNetworkAccessManager(QHelpEngine *engine, QObject *parent);
-
-protected:
- virtual QNetworkReply *createRequest(Operation op,
- const QNetworkRequest &request, QIODevice *outgoingData = 0);
-
-private:
- QHelpEngine *helpEngine;
-};
-
-HelpNetworkAccessManager::HelpNetworkAccessManager(QHelpEngine *engine,
- QObject *parent)
- : QNetworkAccessManager(parent), helpEngine(engine)
+AbstractHelpViewer::~AbstractHelpViewer()
{
}
-QNetworkReply *HelpNetworkAccessManager::createRequest(Operation /*op*/,
- const QNetworkRequest &request, QIODevice* /*outgoingData*/)
+bool AbstractHelpViewer::isLocalUrl(const QUrl &url)
{
- const QUrl& url = request.url();
- QString mimeType = url.toString();
- if (mimeType.endsWith(QLatin1String(".svg"))
- || mimeType.endsWith(QLatin1String(".svgz"))) {
- mimeType = QLatin1String("image/svg+xml");
- } else if (mimeType.endsWith(QLatin1String(".css"))) {
- mimeType = QLatin1String("text/css");
- } else if (mimeType.endsWith(QLatin1String(".js"))) {
- mimeType = QLatin1String("text/javascript");
- } else if (mimeType.endsWith(QLatin1String(".txt"))) {
- mimeType = QLatin1String("text/plain");
- } else {
- mimeType = QLatin1String("text/html");
- }
-
- const QByteArray &data = helpEngine->findFile(url).isValid()
- ? helpEngine->fileData(url) : QByteArray("File not found!");
- return new HelpNetworkReply(request, data, mimeType);
-}
-
-class HelpPage : public QWebPage
-{
-public:
- HelpPage(CentralWidget *central, QHelpEngine *engine, QObject *parent);
-
-protected:
- virtual QWebPage *createWindow(QWebPage::WebWindowType);
- virtual void triggerAction(WebAction action, bool checked = false);
-
- virtual bool acceptNavigationRequest(QWebFrame *frame,
- const QNetworkRequest &request, NavigationType type);
-
-private:
- CentralWidget *centralWidget;
- QHelpEngine *helpEngine;
- bool closeNewTabIfNeeded;
-
- friend class HelpViewer;
- Qt::MouseButtons m_pressedButtons;
- Qt::KeyboardModifiers m_keyboardModifiers;
-};
-
-HelpPage::HelpPage(CentralWidget *central, QHelpEngine *engine, QObject *parent)
- : QWebPage(parent)
- , centralWidget(central)
- , helpEngine(engine)
- , closeNewTabIfNeeded(false)
- , m_pressedButtons(Qt::NoButton)
- , m_keyboardModifiers(Qt::NoModifier)
-{
-}
-
-QWebPage *HelpPage::createWindow(QWebPage::WebWindowType)
-{
- HelpPage* newPage = static_cast<HelpPage*>(centralWidget->newEmptyTab()->page());
- if (newPage)
- newPage->closeNewTabIfNeeded = closeNewTabIfNeeded;
- closeNewTabIfNeeded = false;
- return newPage;
-}
-
-static bool isLocalUrl(const QUrl &url)
-{
- const QString scheme = url.scheme();
- if (scheme.isEmpty()
+ TRACE_OBJ
+ const QString &scheme = url.scheme();
+ return scheme.isEmpty()
|| scheme == QLatin1String("file")
|| scheme == QLatin1String("qrc")
|| scheme == QLatin1String("data")
|| scheme == QLatin1String("qthelp")
- || scheme == QLatin1String("about"))
- return true;
- return false;
+ || scheme == QLatin1String("about");
}
-void HelpPage::triggerAction(WebAction action, bool checked)
+bool AbstractHelpViewer::canOpenPage(const QString &url)
{
- switch (action) {
- case OpenLinkInNewWindow:
- closeNewTabIfNeeded = true;
- default: // fall through
- QWebPage::triggerAction(action, checked);
- break;
- }
+ TRACE_OBJ
+ return url.endsWith(QLatin1String(".html"), Qt::CaseInsensitive)
+ || url.endsWith(QLatin1String(".htm"), Qt::CaseInsensitive)
+ || url == QLatin1String("about:blank");
}
-bool HelpPage::acceptNavigationRequest(QWebFrame *,
- const QNetworkRequest &request, QWebPage::NavigationType type)
+bool AbstractHelpViewer::launchWithExternalApp(const QUrl &url)
{
- const QUrl &url = request.url();
- const bool closeNewTab = closeNewTabIfNeeded;
- closeNewTabIfNeeded = false;
-
+ TRACE_OBJ
if (isLocalUrl(url)) {
- const QString& path = url.path();
- if (path.endsWith(QLatin1String(".pdf"))) {
- const int lastDash = path.lastIndexOf(QChar('/'));
- QString fileName = QDir::tempPath() + QDir::separator();
- if (lastDash < 0)
- fileName += path;
- else
- fileName += path.mid(lastDash + 1, path.length());
-
- QFile tmpFile(QDir::cleanPath(fileName));
- if (tmpFile.open(QIODevice::ReadWrite)) {
- tmpFile.write(helpEngine->fileData(url));
- tmpFile.close();
- }
- QDesktopServices::openUrl(QUrl(tmpFile.fileName()));
-
- if (closeNewTab)
- QMetaObject::invokeMethod(CentralWidget::instance(), "closeTab");
+ const HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
+ const QUrl &resolvedUrl = helpEngine.findFile(url);
+ if (!resolvedUrl.isValid())
return false;
- }
- if (type == QWebPage::NavigationTypeLinkClicked
- && (m_keyboardModifiers & Qt::ControlModifier
- || m_pressedButtons == Qt::MidButton)) {
- HelpViewer* viewer = centralWidget->newEmptyTab();
- if (viewer)
- CentralWidget::instance()->setSource(url);
- m_pressedButtons = Qt::NoButton;
- m_keyboardModifiers = Qt::NoModifier;
+ const QString& path = resolvedUrl.path();
+ if (!canOpenPage(path)) {
+ QTemporaryFile tmpTmpFile;
+ if (!tmpTmpFile.open())
return false;
- }
- return true;
- }
-
- QDesktopServices::openUrl(url);
- return false;
-}
-
-HelpViewer::HelpViewer(QHelpEngine *engine, CentralWidget *parent)
- : QWebView(parent)
- , helpEngine(engine)
- , parentWidget(parent)
- , loadFinished(false)
-{
- setAcceptDrops(false);
-
- setPage(new HelpPage(parent, helpEngine, this));
-
- page()->setNetworkAccessManager(new HelpNetworkAccessManager(engine, this));
-
- QAction* action = pageAction(QWebPage::OpenLinkInNewWindow);
- action->setText(tr("Open Link in New Tab"));
- if (!parent)
- action->setVisible(false);
-
- pageAction(QWebPage::DownloadLinkToDisk)->setVisible(false);
- pageAction(QWebPage::DownloadImageToDisk)->setVisible(false);
- pageAction(QWebPage::OpenImageInNewWindow)->setVisible(false);
-
- connect(pageAction(QWebPage::Copy), SIGNAL(changed()), this,
- SLOT(actionChanged()));
- connect(pageAction(QWebPage::Back), SIGNAL(changed()), this,
- SLOT(actionChanged()));
- connect(pageAction(QWebPage::Forward), SIGNAL(changed()), this,
- SLOT(actionChanged()));
- connect(page(), SIGNAL(linkHovered(QString,QString,QString)), this,
- SIGNAL(highlighted(QString)));
- connect(this, SIGNAL(urlChanged(QUrl)), this, SIGNAL(sourceChanged(QUrl)));
- connect(this, SIGNAL(loadFinished(bool)), this, SLOT(setLoadFinished(bool)));
-}
-
-void HelpViewer::setSource(const QUrl &url)
-{
- loadFinished = false;
- if (url.toString() == QLatin1String("help")) {
- load(QUrl(QLatin1String("qthelp://com.trolltech.com."
- "assistantinternal-1.0.0/assistant/assistant.html")));
- } else {
- load(url);
- }
-}
-
-void HelpViewer::resetZoom()
-{
- setTextSizeMultiplier(1.0);
-}
-
-void HelpViewer::zoomIn(qreal range)
-{
- setTextSizeMultiplier(textSizeMultiplier() + range / 10.0);
-}
-void HelpViewer::zoomOut(qreal range)
-{
- setTextSizeMultiplier(qMax(0.0, textSizeMultiplier() - range / 10.0));
-}
-
-void HelpViewer::home()
-{
- QString homepage = helpEngine->customValue(QLatin1String("homepage"),
- QLatin1String("")).toString();
-
- if (homepage.isEmpty()) {
- homepage = helpEngine->customValue(QLatin1String("defaultHomepage"),
- QLatin1String("help")).toString();
- }
-
- setSource(homepage);
-}
-
-void HelpViewer::wheelEvent(QWheelEvent *e)
-{
- if (e->modifiers() & Qt::ControlModifier) {
- const int delta = e->delta();
- if (delta > 0)
- zoomIn(delta / 120);
- else if (delta < 0)
- zoomOut(-delta / 120);
- e->accept();
- return;
- }
- QWebView::wheelEvent(e);
-}
-
-void HelpViewer::mouseReleaseEvent(QMouseEvent *e)
-{
- if (e->button() == Qt::XButton1) {
- triggerPageAction(QWebPage::Back);
- return;
- }
-
- if (e->button() == Qt::XButton2) {
- triggerPageAction(QWebPage::Forward);
- return;
- }
-
- QWebView::mouseReleaseEvent(e);
-}
-
-void HelpViewer::actionChanged()
-{
- QAction *a = qobject_cast<QAction *>(sender());
- if (a == pageAction(QWebPage::Copy))
- emit copyAvailable(a->isEnabled());
- else if (a == pageAction(QWebPage::Back))
- emit backwardAvailable(a->isEnabled());
- else if (a == pageAction(QWebPage::Forward))
- emit forwardAvailable(a->isEnabled());
-}
-
-void HelpViewer::mousePressEvent(QMouseEvent *event)
-{
- HelpPage *currentPage = static_cast<HelpPage*>(page());
- if (currentPage) {
- currentPage->m_pressedButtons = event->buttons();
- currentPage->m_keyboardModifiers = event->modifiers();
- }
- QWebView::mousePressEvent(event);
-}
-
-void HelpViewer::setLoadFinished(bool ok)
-{
- loadFinished = ok;
- emit sourceChanged(url());
-}
-
-#else // !defined(QT_NO_WEBKIT)
-
-HelpViewer::HelpViewer(QHelpEngine *engine, CentralWidget *parent)
- : QTextBrowser(parent)
- , zoomCount(0)
- , controlPressed(false)
- , lastAnchor(QString())
- , helpEngine(engine)
- , parentWidget(parent)
-{
- document()->setDocumentMargin(8);
-}
-
-void HelpViewer::setSource(const QUrl &url)
-{
- bool help = url.toString() == QLatin1String("help");
- if (url.isValid() && !help) {
- if (launchedWithExternalApp(url))
- return;
-
- QUrl u = helpEngine->findFile(url);
- if (u.isValid()) {
- QTextBrowser::setSource(u);
- return;
- }
- }
-
- if (help) {
- QTextBrowser::setSource(QUrl(QLatin1String("qthelp://com.trolltech.com."
- "assistantinternal-1.0.0/assistant/assistant.html")));
- } else {
- QTextBrowser::setSource(url);
- setHtml(tr("<title>Error 404...</title><div align=\"center\"><br><br>"
- "<h1>The page could not be found</h1><br><h3>'%1'</h3></div>")
- .arg(url.toString()));
- emit sourceChanged(url);
- }
-}
-
-void HelpViewer::resetZoom()
-{
- if (zoomCount == 0)
- return;
-
- QTextBrowser::zoomOut(zoomCount);
- zoomCount = 0;
-}
-
-void HelpViewer::zoomIn(int range)
-{
- if (zoomCount == 10)
- return;
-
- QTextBrowser::zoomIn(range);
- zoomCount++;
-}
-
-void HelpViewer::zoomOut(int range)
-{
- if (zoomCount == -5)
- return;
-
- QTextBrowser::zoomOut(range);
- zoomCount--;
-}
-
-bool HelpViewer::launchedWithExternalApp(const QUrl &url)
-{
- bool isPdf = url.path().endsWith(QLatin1String(".pdf"));
- if (url.scheme() == QLatin1String("http")
- || url.scheme() == QLatin1String("ftp")
- || url.scheme() == QLatin1String("mailto") || isPdf) {
- bool launched = false;
- if (isPdf && url.scheme() == QLatin1String("qthelp")) {
- const QString& path = url.path();
- const int lastDash = path.lastIndexOf(QChar('/'));
- QString fileName = QDir::tempPath() + QDir::separator();
- if (lastDash < 0)
- fileName += path;
- else
- fileName += path.mid(lastDash + 1, path.length());
-
- QFile tmpFile(QDir::cleanPath(fileName));
- if (tmpFile.open(QIODevice::ReadWrite)) {
- tmpFile.write(helpEngine->fileData(url));
- tmpFile.close();
- }
- launched = QDesktopServices::openUrl(QUrl(tmpFile.fileName()));
- } else {
- launched = QDesktopServices::openUrl(url);
- }
+ const QString &extension = QFileInfo(path).completeSuffix();
+ QFile actualTmpFile(tmpTmpFile.fileName() % QLatin1String(".")
+ % extension);
+ if (!actualTmpFile.open(QIODevice::ReadWrite | QIODevice::Truncate))
+ return false;
- if (!launched) {
- QMessageBox::information(this, tr("Help"),
- tr("Unable to launch external application.\n"), tr("OK"));
+ actualTmpFile.write(helpEngine.fileData(resolvedUrl));
+ actualTmpFile.close();
+ return QDesktopServices::openUrl(QUrl(actualTmpFile.fileName()));
}
- return true;
+ } else if (url.scheme() == QLatin1String("http")) {
+ return QDesktopServices::openUrl(url);
}
return false;
}
-QVariant HelpViewer::loadResource(int type, const QUrl &name)
-{
- QByteArray ba;
- if (type < 4) {
- ba = helpEngine->fileData(name);
- if (name.toString().endsWith(QLatin1String(".svg"), Qt::CaseInsensitive)) {
- QImage image;
- image.loadFromData(ba, "svg");
- if (!image.isNull())
- return image;
- }
- }
- return ba;
-}
-
-void HelpViewer::openLinkInNewTab()
-{
- if(lastAnchor.isEmpty())
- return;
-
- parentWidget->setSourceInNewTab(QUrl(lastAnchor));
- lastAnchor.clear();
-}
-
-void HelpViewer::openLinkInNewTab(const QString &link)
-{
- lastAnchor = link;
- openLinkInNewTab();
-}
-
-bool HelpViewer::hasAnchorAt(const QPoint& pos)
-{
- lastAnchor = anchorAt(pos);
- if (lastAnchor.isEmpty())
- return false;
-
- lastAnchor = source().resolved(lastAnchor).toString();
- if (lastAnchor.at(0) == QLatin1Char('#')) {
- QString src = source().toString();
- int hsh = src.indexOf(QLatin1Char('#'));
- lastAnchor = (hsh>=0 ? src.left(hsh) : src) + lastAnchor;
- }
-
- return true;
-}
-
-void HelpViewer::contextMenuEvent(QContextMenuEvent *e)
-{
- QMenu menu(QLatin1String(""), 0);
-
- QUrl link;
- QAction *copyAnchorAction = 0;
- if (hasAnchorAt(e->pos())) {
- link = anchorAt(e->pos());
- if (link.isRelative())
- link = source().resolved(link);
- copyAnchorAction = menu.addAction(tr("Copy &Link Location"));
- copyAnchorAction->setEnabled(!link.isEmpty() && link.isValid());
-
- menu.addAction(tr("Open Link in New Tab\tCtrl+LMB"), this,
- SLOT(openLinkInNewTab()));
- menu.addSeparator();
- }
- menu.addActions(parentWidget->globalActions());
- QAction *action = menu.exec(e->globalPos());
- if (action == copyAnchorAction)
- QApplication::clipboard()->setText(link.toString());
-}
-
-void HelpViewer::mouseReleaseEvent(QMouseEvent *e)
-{
- if (e->button() == Qt::XButton1) {
- QTextBrowser::backward();
- return;
- }
-
- if (e->button() == Qt::XButton2) {
- QTextBrowser::forward();
- return;
- }
-
- controlPressed = e->modifiers() & Qt::ControlModifier;
- if ((controlPressed && hasAnchorAt(e->pos())) ||
- (e->button() == Qt::MidButton && hasAnchorAt(e->pos()))) {
- openLinkInNewTab();
- return;
- }
-
- QTextBrowser::mouseReleaseEvent(e);
-}
-
-void HelpViewer::keyPressEvent(QKeyEvent *e)
-{
- if ((e->key() == Qt::Key_Home && e->modifiers() != Qt::NoModifier)
- || (e->key() == Qt::Key_End && e->modifiers() != Qt::NoModifier)) {
- QKeyEvent* event = new QKeyEvent(e->type(), e->key(), Qt::NoModifier,
- e->text(), e->isAutoRepeat(), e->count());
- e = event;
- }
- QTextBrowser::keyPressEvent(e);
-}
-
-void HelpViewer::home()
-{
- QString homepage = helpEngine->customValue(QLatin1String("homepage"),
- QLatin1String("")).toString();
-
- if (homepage.isEmpty()) {
- homepage = helpEngine->customValue(QLatin1String("defaultHomepage"),
- QLatin1String("help")).toString();
- }
-
- setSource(homepage);
-}
-
-void HelpViewer::wheelEvent(QWheelEvent *e)
-{
- if (e->modifiers() == Qt::CTRL) {
- e->accept();
- (e->delta() > 0) ? zoomIn() : zoomOut();
- } else {
- e->ignore();
- QTextBrowser::wheelEvent(e);
- }
-}
-
-#endif // !defined(QT_NO_WEBKIT)
-
QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/helpviewer.h b/tools/assistant/tools/assistant/helpviewer.h
index 3618a73133..9e8f5f45f0 100644
--- a/tools/assistant/tools/assistant/helpviewer.h
+++ b/tools/assistant/tools/assistant/helpviewer.h
@@ -38,139 +38,41 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
#ifndef HELPVIEWER_H
#define HELPVIEWER_H
-#include <QtCore/QUrl>
-#include <QtCore/QVariant>
-#include <QtGui/QTextBrowser>
-#include <QtGui/QAction>
+#include <QtCore/QString>
-#if !defined(QT_NO_WEBKIT)
-#include <QWebView>
-#endif
+#include <QtGui/QFont>
QT_BEGIN_NAMESPACE
-class QHelpEngine;
-class CentralWidget;
-
-class QPoint;
-class QString;
-class QKeyEvent;
-class QMouseEvent;
-class QContextMenuEvent;
-
-#if !defined(QT_NO_WEBKIT)
-
-class HelpViewer : public QWebView
-{
- Q_OBJECT
-
-public:
- HelpViewer(QHelpEngine *helpEngine, CentralWidget *parent);
- void setSource(const QUrl &url);
-
- inline QUrl source() const
- { return url(); }
-
- inline QString documentTitle() const
- { return title(); }
-
- inline bool hasSelection() const
- { return !selectedText().isEmpty(); } // ### this is suboptimal
-
- void resetZoom();
- void zoomIn(qreal range = 1);
- void zoomOut(qreal range = 1);
-
- inline void copy()
- { return triggerPageAction(QWebPage::Copy); }
-
- inline bool isForwardAvailable() const
- { return pageAction(QWebPage::Forward)->isEnabled(); }
- inline bool isBackwardAvailable() const
- { return pageAction(QWebPage::Back)->isEnabled(); }
- inline bool hasLoadFinished() const
- { return loadFinished; }
- inline qreal zoom() const
- { return textSizeMultiplier(); }
+class QUrl;
-public Q_SLOTS:
- void home();
- void backward() { back(); }
-
-Q_SIGNALS:
- void copyAvailable(bool enabled);
- void forwardAvailable(bool enabled);
- void backwardAvailable(bool enabled);
- void highlighted(const QString &);
- void sourceChanged(const QUrl &);
-
-protected:
- virtual void wheelEvent(QWheelEvent *);
- void mouseReleaseEvent(QMouseEvent *e);
- void mousePressEvent(QMouseEvent *event);
-
-private Q_SLOTS:
- void actionChanged();
- void setLoadFinished(bool ok);
-
-private:
- QHelpEngine *helpEngine;
- CentralWidget* parentWidget;
- bool loadFinished;
-};
-
-#else
-
-class HelpViewer : public QTextBrowser
+class AbstractHelpViewer
{
- Q_OBJECT
-
public:
- HelpViewer(QHelpEngine *helpEngine, CentralWidget *parent);
- void setSource(const QUrl &url);
-
- void resetZoom();
- void zoomIn(int range = 1);
- void zoomOut(int range = 1);
- int zoom() const { return zoomCount; }
- void setZoom(int zoom) { zoomCount = zoom; }
-
- inline bool hasSelection() const
- { return textCursor().hasSelection(); }
+ AbstractHelpViewer();
+ virtual ~AbstractHelpViewer();
- bool launchedWithExternalApp(const QUrl &url);
+ virtual QFont viewerFont() const = 0;
+ virtual void setViewerFont(const QFont &font) = 0;
-public Q_SLOTS:
- void home();
+ virtual void scaleUp() = 0;
+ virtual void scaleDown() = 0;
+
+ virtual void resetScale() = 0;
+ virtual qreal scale() const = 0;
-protected:
- void wheelEvent(QWheelEvent *e);
+ static QString AboutBlank;
+ static QString LocalHelpFile;
+ static QString PageNotFoundMessage;
-private:
- QVariant loadResource(int type, const QUrl &name);
- void openLinkInNewTab(const QString &link);
- bool hasAnchorAt(const QPoint& pos);
- void contextMenuEvent(QContextMenuEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
- void keyPressEvent(QKeyEvent *e);
-
-private slots:
- void openLinkInNewTab();
-
-private:
- int zoomCount;
- bool controlPressed;
- QString lastAnchor;
- QHelpEngine *helpEngine;
- CentralWidget* parentWidget;
+ static bool isLocalUrl(const QUrl &url);
+ static bool canOpenPage(const QString &url);
+ static bool launchWithExternalApp(const QUrl &url);
};
-#endif
-
QT_END_NAMESPACE
-#endif
+#endif // HELPVIEWER_H
diff --git a/tools/assistant/tools/assistant/helpviewer_qtb.cpp b/tools/assistant/tools/assistant/helpviewer_qtb.cpp
new file mode 100644
index 0000000000..07b89eb438
--- /dev/null
+++ b/tools/assistant/tools/assistant/helpviewer_qtb.cpp
@@ -0,0 +1,287 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "helpviewer_qtb.h"
+
+#include "centralwidget.h"
+#include "helpenginewrapper.h"
+#include "tracer.h"
+
+#include <QtCore/QStringBuilder>
+
+#include <QtGui/QContextMenuEvent>
+#include <QtGui/QMenu>
+#include <QtGui/QClipboard>
+#include <QtGui/QApplication>
+
+QT_BEGIN_NAMESPACE
+
+HelpViewer::HelpViewer(CentralWidget *parent, qreal zoom)
+ : QTextBrowser(parent)
+ , zoomCount(zoom)
+ , controlPressed(false)
+ , lastAnchor(QString())
+ , parentWidget(parent)
+ , helpEngine(HelpEngineWrapper::instance())
+ , forceFont(false)
+{
+ TRACE_OBJ
+ installEventFilter(this);
+ document()->setDocumentMargin(8);
+
+ QFont font = viewerFont();
+ font.setPointSize(int(font.pointSize() + zoom));
+ setViewerFont(font);
+}
+
+HelpViewer::~HelpViewer()
+{
+ TRACE_OBJ
+}
+
+QFont HelpViewer::viewerFont() const
+{
+ TRACE_OBJ
+ if (HelpEngineWrapper::instance().usesBrowserFont())
+ return helpEngine.browserFont();
+ return qApp->font();
+}
+
+void HelpViewer::setViewerFont(const QFont &newFont)
+{
+ TRACE_OBJ
+ if (font() != newFont) {
+ forceFont = true;
+ setFont(newFont);
+ forceFont = false;
+ }
+}
+
+void HelpViewer::scaleUp()
+{
+ TRACE_OBJ
+ if (zoomCount < 10) {
+ ++zoomCount;
+ forceFont = true;
+ zoomIn();
+ forceFont = false;
+ }
+}
+
+void HelpViewer::scaleDown()
+{
+ TRACE_OBJ
+ if (zoomCount > -5) {
+ --zoomCount;
+ forceFont = true;
+ zoomOut();
+ forceFont = false;
+ }
+}
+
+void HelpViewer::resetScale()
+{
+ TRACE_OBJ
+ if (zoomCount != 0) {
+ forceFont = true;
+ zoomOut(zoomCount);
+ forceFont = false;
+ }
+ zoomCount = 0;
+}
+
+void HelpViewer::setSource(const QUrl &url)
+{
+ TRACE_OBJ
+ const QString &string = url.toString();
+ if (url.isValid() && string != QLatin1String("help")) {
+ if (launchWithExternalApp(url))
+ return;
+
+ const QUrl &resolvedUrl = helpEngine.findFile(url);
+ if (resolvedUrl.isValid()) {
+ QTextBrowser::setSource(resolvedUrl);
+ return;
+ }
+ }
+
+ if (string != QLatin1String("help")) {
+ QTextBrowser::setSource(url);
+ setHtml(string == QLatin1String("about:blank") ? AboutBlank
+ : PageNotFoundMessage.arg(url.toString()));
+ emit sourceChanged(url);
+ } else {
+ QTextBrowser::setSource(LocalHelpFile);
+ }
+}
+
+QVariant HelpViewer::loadResource(int type, const QUrl &name)
+{
+ TRACE_OBJ
+ QByteArray ba;
+ if (type < 4) {
+ ba = helpEngine.fileData(name);
+ if (name.toString().endsWith(QLatin1String(".svg"), Qt::CaseInsensitive)) {
+ QImage image;
+ image.loadFromData(ba, "svg");
+ if (!image.isNull())
+ return image;
+ }
+ }
+ return ba;
+}
+
+void HelpViewer::openLinkInNewTab()
+{
+ TRACE_OBJ
+ if(lastAnchor.isEmpty())
+ return;
+
+ parentWidget->setSourceInNewTab(QUrl(lastAnchor));
+ lastAnchor.clear();
+}
+
+void HelpViewer::openLinkInNewTab(const QString &link)
+{
+ TRACE_OBJ
+ lastAnchor = link;
+ openLinkInNewTab();
+}
+
+bool HelpViewer::hasAnchorAt(const QPoint& pos)
+{
+ TRACE_OBJ
+ lastAnchor = anchorAt(pos);
+ if (lastAnchor.isEmpty())
+ return false;
+
+ lastAnchor = source().resolved(lastAnchor).toString();
+ if (lastAnchor.at(0) == QLatin1Char('#')) {
+ QString src = source().toString();
+ int hsh = src.indexOf(QLatin1Char('#'));
+ lastAnchor = (hsh>=0 ? src.left(hsh) : src) + lastAnchor;
+ }
+
+ return true;
+}
+
+void HelpViewer::contextMenuEvent(QContextMenuEvent *e)
+{
+ TRACE_OBJ
+ QMenu menu(QLatin1String(""), 0);
+
+ QUrl link;
+ QAction *copyAnchorAction = 0;
+ if (hasAnchorAt(e->pos())) {
+ link = anchorAt(e->pos());
+ if (link.isRelative())
+ link = source().resolved(link);
+ copyAnchorAction = menu.addAction(tr("Copy &Link Location"));
+ copyAnchorAction->setEnabled(!link.isEmpty() && link.isValid());
+
+ menu.addAction(tr("Open Link in New Tab\tCtrl+LMB"), this,
+ SLOT(openLinkInNewTab()));
+ menu.addSeparator();
+ }
+ menu.addActions(parentWidget->globalActions());
+ QAction *action = menu.exec(e->globalPos());
+ if (action == copyAnchorAction)
+ QApplication::clipboard()->setText(link.toString());
+}
+
+void HelpViewer::mouseReleaseEvent(QMouseEvent *e)
+{
+ TRACE_OBJ
+ if (e->button() == Qt::XButton1) {
+ QTextBrowser::backward();
+ return;
+ }
+
+ if (e->button() == Qt::XButton2) {
+ QTextBrowser::forward();
+ return;
+ }
+
+ controlPressed = e->modifiers() & Qt::ControlModifier;
+ if ((controlPressed && hasAnchorAt(e->pos())) ||
+ (e->button() == Qt::MidButton && hasAnchorAt(e->pos()))) {
+ openLinkInNewTab();
+ return;
+ }
+
+ QTextBrowser::mouseReleaseEvent(e);
+}
+
+void HelpViewer::keyPressEvent(QKeyEvent *e)
+{
+ TRACE_OBJ
+ if ((e->key() == Qt::Key_Home && e->modifiers() != Qt::NoModifier)
+ || (e->key() == Qt::Key_End && e->modifiers() != Qt::NoModifier)) {
+ QKeyEvent* event = new QKeyEvent(e->type(), e->key(), Qt::NoModifier,
+ e->text(), e->isAutoRepeat(), e->count());
+ e = event;
+ }
+ QTextBrowser::keyPressEvent(e);
+}
+
+void HelpViewer::home()
+{
+ TRACE_OBJ
+ setSource(helpEngine.homePage());
+}
+
+void HelpViewer::wheelEvent(QWheelEvent *e)
+{
+ TRACE_OBJ
+ if (e->modifiers() == Qt::ControlModifier) {
+ e->accept();
+ e->delta() > 0 ? scaleUp() : scaleDown();
+ } else {
+ QTextBrowser::wheelEvent(e);
+ }
+}
+
+bool HelpViewer::eventFilter(QObject *obj, QEvent *event)
+{
+ TRACE_OBJ
+ if (event->type() == QEvent::FontChange && !forceFont)
+ return true;
+ return QTextBrowser::eventFilter(obj, event);
+}
diff --git a/tools/assistant/tools/assistant/helpviewer_qtb.h b/tools/assistant/tools/assistant/helpviewer_qtb.h
new file mode 100644
index 0000000000..a05782c1ea
--- /dev/null
+++ b/tools/assistant/tools/assistant/helpviewer_qtb.h
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef HELPVIEWERQTB_H
+#define HELPVIEWERQTB_H
+
+#include "helpviewer.h"
+
+#include <QtCore/QUrl>
+#include <QtCore/QVariant>
+
+#include <QtGui/QTextBrowser>
+
+QT_BEGIN_NAMESPACE
+
+class CentralWidget;
+class HelpEngineWrapper;
+class QContextMenuEvent;
+class QKeyEvent;
+class QMouseEvent;
+
+class HelpViewer : public QTextBrowser, public AbstractHelpViewer
+{
+ Q_OBJECT
+
+public:
+ HelpViewer(CentralWidget *parent, qreal zoom = 0.0);
+ ~HelpViewer();
+
+ QFont viewerFont() const;
+ void setViewerFont(const QFont &font);
+
+ void scaleUp();
+ void scaleDown();
+ void resetScale();
+ qreal scale() const { return zoomCount; }
+
+ void setSource(const QUrl &url);
+
+ inline bool hasSelection() const
+ { return textCursor().hasSelection(); }
+
+public Q_SLOTS:
+ void home();
+
+protected:
+ void wheelEvent(QWheelEvent *e);
+ bool eventFilter(QObject *obj, QEvent *event);
+
+private:
+ QVariant loadResource(int type, const QUrl &name);
+ void openLinkInNewTab(const QString &link);
+ bool hasAnchorAt(const QPoint& pos);
+ void contextMenuEvent(QContextMenuEvent *e);
+ void mouseReleaseEvent(QMouseEvent *e);
+ void keyPressEvent(QKeyEvent *e);
+
+private slots:
+ void openLinkInNewTab();
+
+private:
+ int zoomCount;
+ bool controlPressed;
+ QString lastAnchor;
+ CentralWidget* parentWidget;
+ HelpEngineWrapper &helpEngine;
+
+ bool forceFont;
+};
+
+QT_END_NAMESPACE
+
+#endif // HELPVIEWERQTB_H
diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.cpp b/tools/assistant/tools/assistant/helpviewer_qwv.cpp
new file mode 100644
index 0000000000..582d013b2e
--- /dev/null
+++ b/tools/assistant/tools/assistant/helpviewer_qwv.cpp
@@ -0,0 +1,385 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "helpviewer_qwv.h"
+
+#include "centralwidget.h"
+#include "helpenginewrapper.h"
+#include "tracer.h"
+
+#include <QtCore/QFileInfo>
+#include <QtCore/QString>
+#include <QtCore/QStringBuilder>
+#include <QtCore/QTimer>
+
+#include <QtGui/QWheelEvent>
+
+#include <QtNetwork/QNetworkAccessManager>
+#include <QtNetwork/QNetworkReply>
+#include <QtNetwork/QNetworkRequest>
+
+QT_BEGIN_NAMESPACE
+
+class HelpNetworkReply : public QNetworkReply
+{
+public:
+ HelpNetworkReply(const QNetworkRequest &request, const QByteArray &fileData,
+ const QString &mimeType);
+
+ virtual void abort();
+
+ virtual qint64 bytesAvailable() const
+ { return data.length() + QNetworkReply::bytesAvailable(); }
+
+protected:
+ virtual qint64 readData(char *data, qint64 maxlen);
+
+private:
+ QByteArray data;
+ qint64 origLen;
+};
+
+HelpNetworkReply::HelpNetworkReply(const QNetworkRequest &request,
+ const QByteArray &fileData, const QString& mimeType)
+ : data(fileData), origLen(fileData.length())
+{
+ TRACE_OBJ
+ setRequest(request);
+ setOpenMode(QIODevice::ReadOnly);
+
+ setHeader(QNetworkRequest::ContentTypeHeader, mimeType);
+ setHeader(QNetworkRequest::ContentLengthHeader, QByteArray::number(origLen));
+ QTimer::singleShot(0, this, SIGNAL(metaDataChanged()));
+ QTimer::singleShot(0, this, SIGNAL(readyRead()));
+}
+
+void HelpNetworkReply::abort()
+{
+ TRACE_OBJ
+}
+
+qint64 HelpNetworkReply::readData(char *buffer, qint64 maxlen)
+{
+ TRACE_OBJ
+ qint64 len = qMin(qint64(data.length()), maxlen);
+ if (len) {
+ qMemCopy(buffer, data.constData(), len);
+ data.remove(0, len);
+ }
+ if (!data.length())
+ QTimer::singleShot(0, this, SIGNAL(finished()));
+ return len;
+}
+
+class HelpNetworkAccessManager : public QNetworkAccessManager
+{
+public:
+ HelpNetworkAccessManager(QObject *parent);
+
+protected:
+ virtual QNetworkReply *createRequest(Operation op,
+ const QNetworkRequest &request, QIODevice *outgoingData = 0);
+};
+
+HelpNetworkAccessManager::HelpNetworkAccessManager(QObject *parent)
+ : QNetworkAccessManager(parent)
+{
+ TRACE_OBJ
+}
+
+QNetworkReply *HelpNetworkAccessManager::createRequest(Operation /*op*/,
+ const QNetworkRequest &request, QIODevice* /*outgoingData*/)
+{
+ TRACE_OBJ
+ const QUrl& url = request.url();
+ QString mimeType = url.toString();
+ if (mimeType.endsWith(QLatin1String(".svg"))
+ || mimeType.endsWith(QLatin1String(".svgz"))) {
+ mimeType = QLatin1String("image/svg+xml");
+ } else if (mimeType.endsWith(QLatin1String(".css"))) {
+ mimeType = QLatin1String("text/css");
+ } else if (mimeType.endsWith(QLatin1String(".js"))) {
+ mimeType = QLatin1String("text/javascript");
+ } else if (mimeType.endsWith(QLatin1String(".txt"))) {
+ mimeType = QLatin1String("text/plain");
+ } else {
+ mimeType = QLatin1String("text/html");
+ }
+
+ HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
+ const QByteArray &data = helpEngine.findFile(url).isValid()
+ ? helpEngine.fileData(url)
+ : AbstractHelpViewer::PageNotFoundMessage.arg(url.toString()).toUtf8();
+ return new HelpNetworkReply(request, data, mimeType);
+}
+
+class HelpPage : public QWebPage
+{
+public:
+ HelpPage(CentralWidget *central, QObject *parent);
+
+protected:
+ virtual QWebPage *createWindow(QWebPage::WebWindowType);
+ virtual void triggerAction(WebAction action, bool checked = false);
+
+ virtual bool acceptNavigationRequest(QWebFrame *frame,
+ const QNetworkRequest &request, NavigationType type);
+
+private:
+ CentralWidget *centralWidget;
+ bool closeNewTabIfNeeded;
+
+ friend class HelpViewer;
+ Qt::MouseButtons m_pressedButtons;
+ Qt::KeyboardModifiers m_keyboardModifiers;
+};
+
+HelpPage::HelpPage(CentralWidget *central, QObject *parent)
+ : QWebPage(parent)
+ , centralWidget(central)
+ , closeNewTabIfNeeded(false)
+ , m_pressedButtons(Qt::NoButton)
+ , m_keyboardModifiers(Qt::NoModifier)
+{
+ TRACE_OBJ
+}
+
+QWebPage *HelpPage::createWindow(QWebPage::WebWindowType)
+{
+ TRACE_OBJ
+ HelpPage* newPage = static_cast<HelpPage*>(centralWidget->newEmptyTab()->page());
+ if (newPage)
+ newPage->closeNewTabIfNeeded = closeNewTabIfNeeded;
+ closeNewTabIfNeeded = false;
+ return newPage;
+}
+
+void HelpPage::triggerAction(WebAction action, bool checked)
+{
+ TRACE_OBJ
+ switch (action) {
+ case OpenLinkInNewWindow:
+ closeNewTabIfNeeded = true;
+ default: // fall through
+ QWebPage::triggerAction(action, checked);
+ break;
+ }
+}
+
+bool HelpPage::acceptNavigationRequest(QWebFrame *,
+ const QNetworkRequest &request, QWebPage::NavigationType type)
+{
+ TRACE_OBJ
+ const bool closeNewTab = closeNewTabIfNeeded;
+ closeNewTabIfNeeded = false;
+
+ const QUrl &url = request.url();
+ if (AbstractHelpViewer::launchWithExternalApp(url)) {
+ if (closeNewTab)
+ QMetaObject::invokeMethod(centralWidget, "closeTab");
+ return false;
+ }
+
+ if (type == QWebPage::NavigationTypeLinkClicked
+ && (m_keyboardModifiers & Qt::ControlModifier
+ || m_pressedButtons == Qt::MidButton)) {
+ if (centralWidget->newEmptyTab())
+ centralWidget->setSource(url);
+ m_pressedButtons = Qt::NoButton;
+ m_keyboardModifiers = Qt::NoModifier;
+ return false;
+ }
+
+ return true;
+}
+
+// -- HelpViewer
+
+HelpViewer::HelpViewer(CentralWidget *parent, qreal zoom)
+ : QWebView(parent)
+ , parentWidget(parent)
+ , loadFinished(false)
+ , helpEngine(HelpEngineWrapper::instance())
+{
+ TRACE_OBJ
+ setAcceptDrops(false);
+
+ setPage(new HelpPage(parent, this));
+
+ page()->setNetworkAccessManager(new HelpNetworkAccessManager(this));
+
+ QAction* action = pageAction(QWebPage::OpenLinkInNewWindow);
+ action->setText(tr("Open Link in New Tab"));
+ if (!parent)
+ action->setVisible(false);
+
+ pageAction(QWebPage::DownloadLinkToDisk)->setVisible(false);
+ pageAction(QWebPage::DownloadImageToDisk)->setVisible(false);
+ pageAction(QWebPage::OpenImageInNewWindow)->setVisible(false);
+
+ connect(pageAction(QWebPage::Copy), SIGNAL(changed()), this,
+ SLOT(actionChanged()));
+ connect(pageAction(QWebPage::Back), SIGNAL(changed()), this,
+ SLOT(actionChanged()));
+ connect(pageAction(QWebPage::Forward), SIGNAL(changed()), this,
+ SLOT(actionChanged()));
+ connect(page(), SIGNAL(linkHovered(QString,QString,QString)), this,
+ SIGNAL(highlighted(QString)));
+ connect(this, SIGNAL(urlChanged(QUrl)), this, SIGNAL(sourceChanged(QUrl)));
+ connect(this, SIGNAL(loadFinished(bool)), this, SLOT(setLoadFinished(bool)));
+
+ setFont(viewerFont());
+ setTextSizeMultiplier(zoom == 0.0 ? 1.0 : zoom);
+}
+
+HelpViewer::~HelpViewer()
+{
+ TRACE_OBJ
+}
+
+QFont HelpViewer::viewerFont() const
+{
+ TRACE_OBJ
+ if (helpEngine.usesBrowserFont())
+ return helpEngine.browserFont();
+
+ QWebSettings *webSettings = QWebSettings::globalSettings();
+ return QFont(webSettings->fontFamily(QWebSettings::StandardFont),
+ webSettings->fontSize(QWebSettings::DefaultFontSize));
+}
+
+void HelpViewer::setViewerFont(const QFont &font)
+{
+ TRACE_OBJ
+ QWebSettings *webSettings = settings();
+ webSettings->setFontFamily(QWebSettings::StandardFont, font.family());
+ webSettings->setFontSize(QWebSettings::DefaultFontSize, font.pointSize());
+}
+
+void HelpViewer::scaleUp()
+{
+ TRACE_OBJ
+ setTextSizeMultiplier(textSizeMultiplier() + 0.1);
+}
+
+void HelpViewer::scaleDown()
+{
+ TRACE_OBJ
+ setTextSizeMultiplier(qMax(0.0, textSizeMultiplier() - 0.1));
+}
+
+void HelpViewer::resetScale()
+{
+ TRACE_OBJ
+ setTextSizeMultiplier(1.0);
+}
+
+void HelpViewer::setSource(const QUrl &url)
+{
+ TRACE_OBJ
+ loadFinished = false;
+ load(url.toString() == QLatin1String("help") ? LocalHelpFile : url);
+}
+
+void HelpViewer::home()
+{
+ TRACE_OBJ
+ setSource(helpEngine.homePage());
+}
+
+void HelpViewer::wheelEvent(QWheelEvent *e)
+{
+ TRACE_OBJ
+ if (e->modifiers()& Qt::ControlModifier) {
+ e->accept();
+ e->delta() > 0 ? scaleUp() : scaleDown();
+ } else {
+ QWebView::wheelEvent(e);
+ }
+}
+
+void HelpViewer::mouseReleaseEvent(QMouseEvent *e)
+{
+ TRACE_OBJ
+ if (e->button() == Qt::XButton1) {
+ triggerPageAction(QWebPage::Back);
+ return;
+ }
+
+ if (e->button() == Qt::XButton2) {
+ triggerPageAction(QWebPage::Forward);
+ return;
+ }
+
+ QWebView::mouseReleaseEvent(e);
+}
+
+void HelpViewer::actionChanged()
+{
+ TRACE_OBJ
+ QAction *a = qobject_cast<QAction *>(sender());
+ if (a == pageAction(QWebPage::Copy))
+ emit copyAvailable(a->isEnabled());
+ else if (a == pageAction(QWebPage::Back))
+ emit backwardAvailable(a->isEnabled());
+ else if (a == pageAction(QWebPage::Forward))
+ emit forwardAvailable(a->isEnabled());
+}
+
+void HelpViewer::mousePressEvent(QMouseEvent *event)
+{
+ TRACE_OBJ
+ HelpPage *currentPage = static_cast<HelpPage*>(page());
+ if (currentPage) {
+ currentPage->m_pressedButtons = event->buttons();
+ currentPage->m_keyboardModifiers = event->modifiers();
+ }
+ QWebView::mousePressEvent(event);
+}
+
+void HelpViewer::setLoadFinished(bool ok)
+{
+ TRACE_OBJ
+ loadFinished = ok;
+ emit sourceChanged(url());
+}
+
+QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.h b/tools/assistant/tools/assistant/helpviewer_qwv.h
new file mode 100644
index 0000000000..41ee5531be
--- /dev/null
+++ b/tools/assistant/tools/assistant/helpviewer_qwv.h
@@ -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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef HELPVIEWERQWV_H
+#define HELPVIEWERQWV_H
+
+#include "helpviewer.h"
+
+#include <QtGui/QAction>
+#include <QtWebKit/QWebView>
+
+QT_BEGIN_NAMESPACE
+
+class CentralWidget;
+class HelpEngineWrapper;
+class QMouseEvent;
+
+class HelpViewer : public QWebView, public AbstractHelpViewer
+{
+ Q_OBJECT
+
+public:
+ HelpViewer(CentralWidget *parent, qreal zoom = 0.0);
+ ~HelpViewer();
+
+ QFont viewerFont() const;
+ void setViewerFont(const QFont &font);
+
+ void scaleUp();
+ void scaleDown();
+ void resetScale();
+ qreal scale() const { return textSizeMultiplier(); }
+
+ void setSource(const QUrl &url);
+ inline QUrl source() const { return url(); }
+
+ inline QString documentTitle() const
+ { return title(); }
+
+ inline bool hasSelection() const
+ { return !selectedText().isEmpty(); } // ### this is suboptimal
+
+ inline void copy()
+ { return triggerPageAction(QWebPage::Copy); }
+
+ inline bool isForwardAvailable() const
+ { return pageAction(QWebPage::Forward)->isEnabled(); }
+ inline bool isBackwardAvailable() const
+ { return pageAction(QWebPage::Back)->isEnabled(); }
+ inline bool hasLoadFinished() const
+ { return loadFinished; }
+
+public Q_SLOTS:
+ void home();
+ void backward() { back(); }
+
+Q_SIGNALS:
+ void copyAvailable(bool enabled);
+ void forwardAvailable(bool enabled);
+ void backwardAvailable(bool enabled);
+ void highlighted(const QString &);
+ void sourceChanged(const QUrl &);
+
+protected:
+ virtual void wheelEvent(QWheelEvent *);
+ void mouseReleaseEvent(QMouseEvent *e);
+ void mousePressEvent(QMouseEvent *event);
+
+private Q_SLOTS:
+ void actionChanged();
+ void setLoadFinished(bool ok);
+
+private:
+ CentralWidget* parentWidget;
+ bool loadFinished;
+ HelpEngineWrapper &helpEngine;
+};
+
+QT_END_NAMESPACE
+
+#endif // HELPVIEWERQWV_H
diff --git a/tools/assistant/tools/assistant/images/bookmark.png b/tools/assistant/tools/assistant/images/bookmark.png
new file mode 100644
index 0000000000..57e57e343b
--- /dev/null
+++ b/tools/assistant/tools/assistant/images/bookmark.png
Binary files differ
diff --git a/tools/assistant/tools/assistant/indexwindow.cpp b/tools/assistant/tools/assistant/indexwindow.cpp
index 24a212e034..63ddbe4020 100644
--- a/tools/assistant/tools/assistant/indexwindow.cpp
+++ b/tools/assistant/tools/assistant/indexwindow.cpp
@@ -38,9 +38,12 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include "tracer.h"
#include "indexwindow.h"
#include "centralwidget.h"
+#include "helpenginewrapper.h"
+#include "helpviewer.h"
#include "topicchooser.h"
#include <QtGui/QLayout>
@@ -51,22 +54,20 @@
#include <QtGui/QContextMenuEvent>
#include <QtGui/QListWidgetItem>
-#include <QtHelp/QHelpEngine>
#include <QtHelp/QHelpIndexWidget>
QT_BEGIN_NAMESPACE
-IndexWindow::IndexWindow(QHelpEngine *helpEngine, QWidget *parent)
+IndexWindow::IndexWindow(QWidget *parent)
: QWidget(parent)
- , m_searchLineEdit(0)
- , m_indexWidget(0)
- , m_helpEngine(helpEngine)
+ , m_searchLineEdit(new QLineEdit)
+ , m_indexWidget(HelpEngineWrapper::instance().indexWidget())
{
+ TRACE_OBJ
QVBoxLayout *layout = new QVBoxLayout(this);
QLabel *l = new QLabel(tr("&Look for:"));
layout->addWidget(l);
- m_searchLineEdit = new QLineEdit();
l->setBuddy(m_searchLineEdit);
connect(m_searchLineEdit, SIGNAL(textChanged(QString)), this,
SLOT(filterIndices(QString)));
@@ -74,11 +75,11 @@ IndexWindow::IndexWindow(QHelpEngine *helpEngine, QWidget *parent)
layout->setMargin(4);
layout->addWidget(m_searchLineEdit);
- m_indexWidget = m_helpEngine->indexWidget();
+ HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
m_indexWidget->installEventFilter(this);
- connect(m_helpEngine->indexModel(), SIGNAL(indexCreationStarted()), this,
+ connect(helpEngine.indexModel(), SIGNAL(indexCreationStarted()), this,
SLOT(disableSearchLineEdit()));
- connect(m_helpEngine->indexModel(), SIGNAL(indexCreated()), this,
+ connect(helpEngine.indexModel(), SIGNAL(indexCreated()), this,
SLOT(enableSearchLineEdit()));
connect(m_indexWidget, SIGNAL(linkActivated(QUrl,QString)), this,
SIGNAL(linkActivated(QUrl)));
@@ -93,10 +94,12 @@ IndexWindow::IndexWindow(QHelpEngine *helpEngine, QWidget *parent)
IndexWindow::~IndexWindow()
{
+ TRACE_OBJ
}
void IndexWindow::filterIndices(const QString &filter)
{
+ TRACE_OBJ
if (filter.contains(QLatin1Char('*')))
m_indexWidget->filterIndices(filter, filter);
else
@@ -105,6 +108,7 @@ void IndexWindow::filterIndices(const QString &filter)
bool IndexWindow::eventFilter(QObject *obj, QEvent *e)
{
+ TRACE_OBJ
if (obj == m_searchLineEdit && e->type() == QEvent::KeyPress) {
QKeyEvent *ke = static_cast<QKeyEvent*>(e);
QModelIndex idx = m_indexWidget->currentIndex();
@@ -170,22 +174,26 @@ bool IndexWindow::eventFilter(QObject *obj, QEvent *e)
void IndexWindow::enableSearchLineEdit()
{
+ TRACE_OBJ
m_searchLineEdit->setDisabled(false);
filterIndices(m_searchLineEdit->text());
}
void IndexWindow::disableSearchLineEdit()
{
+ TRACE_OBJ
m_searchLineEdit->setDisabled(true);
}
void IndexWindow::setSearchLineEditText(const QString &text)
{
+ TRACE_OBJ
m_searchLineEdit->setText(text);
}
void IndexWindow::focusInEvent(QFocusEvent *e)
{
+ TRACE_OBJ
if (e->reason() != Qt::MouseFocusReason) {
m_searchLineEdit->selectAll();
m_searchLineEdit->setFocus();
@@ -194,6 +202,7 @@ void IndexWindow::focusInEvent(QFocusEvent *e)
void IndexWindow::open(QHelpIndexWidget* indexWidget, const QModelIndex &index)
{
+ TRACE_OBJ
QHelpIndexModel *model = qobject_cast<QHelpIndexModel*>(indexWidget->model());
if (model) {
QString keyword = model->data(index, Qt::DisplayRole).toString();
@@ -210,7 +219,7 @@ void IndexWindow::open(QHelpIndexWidget* indexWidget, const QModelIndex &index)
return;
}
- if (url.path().endsWith(QLatin1String(".pdf"), Qt::CaseInsensitive))
+ if (!AbstractHelpViewer::canOpenPage(url.path()))
CentralWidget::instance()->setSource(url);
else
CentralWidget::instance()->setSourceInNewTab(url);
diff --git a/tools/assistant/tools/assistant/indexwindow.h b/tools/assistant/tools/assistant/indexwindow.h
index 4343d0e3bd..eb587b179b 100644
--- a/tools/assistant/tools/assistant/indexwindow.h
+++ b/tools/assistant/tools/assistant/indexwindow.h
@@ -49,7 +49,6 @@
QT_BEGIN_NAMESPACE
class QHelpIndexWidget;
-class QHelpEngine;
class QModelIndex;
class IndexWindow : public QWidget
@@ -57,7 +56,7 @@ class IndexWindow : public QWidget
Q_OBJECT
public:
- IndexWindow(QHelpEngine *helpEngine, QWidget *parent = 0);
+ IndexWindow(QWidget *parent = 0);
~IndexWindow();
void setSearchLineEditText(const QString &text);
@@ -84,7 +83,6 @@ private:
QLineEdit *m_searchLineEdit;
QHelpIndexWidget *m_indexWidget;
- QHelpEngine *m_helpEngine;
};
QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/installdialog.cpp b/tools/assistant/tools/assistant/installdialog.cpp
index 95a12268be..f3bf6f69a9 100644
--- a/tools/assistant/tools/assistant/installdialog.cpp
+++ b/tools/assistant/tools/assistant/installdialog.cpp
@@ -38,6 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include "tracer.h"
#include "installdialog.h"
@@ -66,6 +67,7 @@ InstallDialog::InstallDialog(QHelpEngineCore *helpEngine, QWidget *parent,
const QString &host, int port)
: QDialog(parent), m_helpEngine(helpEngine), m_host(host), m_port(port)
{
+ TRACE_OBJ
m_ui.setupUi(this);
m_ui.installButton->setEnabled(false);
@@ -94,15 +96,18 @@ InstallDialog::InstallDialog(QHelpEngineCore *helpEngine, QWidget *parent,
InstallDialog::~InstallDialog()
{
+ TRACE_OBJ
}
QStringList InstallDialog::installedDocumentations() const
{
+ TRACE_OBJ
return m_installedDocumentations;
}
void InstallDialog::init()
{
+ TRACE_OBJ
m_ui.statusLabel->setText(tr("Downloading documentation info..."));
m_ui.progressBar->show();
@@ -122,6 +127,7 @@ void InstallDialog::init()
void InstallDialog::updateInstallButton()
{
+ TRACE_OBJ
QListWidgetItem *item = 0;
for (int i=0; i<m_ui.listWidget->count(); ++i) {
item = m_ui.listWidget->item(i);
@@ -136,6 +142,7 @@ void InstallDialog::updateInstallButton()
void InstallDialog::updateDocItemList()
{
+ TRACE_OBJ
QStringList registeredDocs = m_helpEngine->registeredDocumentations();
QListWidgetItem *item = 0;
for (int i=0; i<m_ui.listWidget->count(); ++i) {
@@ -151,6 +158,7 @@ void InstallDialog::updateDocItemList()
void InstallDialog::cancelDownload()
{
+ TRACE_OBJ
m_ui.statusLabel->setText(tr("Download canceled."));
m_httpAborted = true;
m_itemsToInstall.clear();
@@ -162,6 +170,7 @@ void InstallDialog::cancelDownload()
void InstallDialog::install()
{
+ TRACE_OBJ
QListWidgetItem *item = 0;
for (int i=0; i<m_ui.listWidget->count(); ++i) {
item = m_ui.listWidget->item(i);
@@ -174,6 +183,7 @@ void InstallDialog::install()
void InstallDialog::downloadNextFile()
{
+ TRACE_OBJ
if (!m_itemsToInstall.count()) {
m_ui.cancelButton->setEnabled(false);
m_ui.closeButton->setEnabled(true);
@@ -226,6 +236,7 @@ void InstallDialog::downloadNextFile()
void InstallDialog::httpRequestFinished(int requestId, bool error)
{
+ TRACE_OBJ
if (requestId == m_docInfoId && m_buffer) {
m_ui.progressBar->hide();
if (error) {
@@ -296,6 +307,7 @@ void InstallDialog::httpRequestFinished(int requestId, bool error)
void InstallDialog::installFile(const QString &fileName)
{
+ TRACE_OBJ
if (m_helpEngine->registerDocumentation(fileName)) {
m_installedDocumentations
.append(QHelpEngineCore::namespaceName(fileName));
@@ -308,6 +320,7 @@ void InstallDialog::installFile(const QString &fileName)
void InstallDialog::readResponseHeader(const QHttpResponseHeader &responseHeader)
{
+ TRACE_OBJ
if (responseHeader.statusCode() != 200) {
QMessageBox::information(this, m_windowTitle,
tr("Download failed: %1.")
@@ -321,6 +334,7 @@ void InstallDialog::readResponseHeader(const QHttpResponseHeader &responseHeader
void InstallDialog::updateDataReadProgress(int bytesRead, int totalBytes)
{
+ TRACE_OBJ
if (m_httpAborted)
return;
@@ -330,6 +344,7 @@ void InstallDialog::updateDataReadProgress(int bytesRead, int totalBytes)
void InstallDialog::browseDirectories()
{
+ TRACE_OBJ
QString dir = QFileDialog::getExistingDirectory(this, m_windowTitle,
m_ui.pathLineEdit->text());
if (!dir.isEmpty())
diff --git a/tools/assistant/tools/assistant/main.cpp b/tools/assistant/tools/assistant/main.cpp
index 7a957e2a69..51ea9f9a53 100644
--- a/tools/assistant/tools/assistant/main.cpp
+++ b/tools/assistant/tools/assistant/main.cpp
@@ -38,27 +38,34 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include "tracer.h"
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
+#include <QtCore/QLibraryInfo>
#include <QtCore/QLocale>
+#include <QtCore/QScopedPointer>
+#include <QtCore/QStringList>
#include <QtCore/QTranslator>
-#include <QtCore/QLibraryInfo>
#include <QtCore/QUrl>
-#include <QtCore/QStringList>
#include <QtGui/QApplication>
#include <QtGui/QDesktopServices>
-#include <QtHelp/QHelpEngineCore>
+#include <QtHelp/QHelpEngine>
+#include <QtHelp/QHelpSearchEngine>
#include <QtNetwork/QLocalSocket>
#include <QtSql/QSqlDatabase>
+#include "../shared/collectionconfiguration.h"
+#include "helpenginewrapper.h"
#include "mainwindow.h"
#include "cmdlineparser.h"
+// #define TRACING_REQUESTED
+
QT_USE_NAMESPACE
#if defined(USE_STATIC_SQLITE_PLUGIN)
@@ -66,118 +73,57 @@ QT_USE_NAMESPACE
Q_IMPORT_PLUGIN(qsqlite)
#endif
+namespace {
+
void
updateLastPagesOnUnregister(QHelpEngineCore& helpEngine, const QString& nsName)
{
- int lastPage = helpEngine.customValue(QLatin1String("LastTabPage")).toInt();
-
- QLatin1String sep("|");
- QLatin1String pages("LastShownPages");
-#if !defined(QT_NO_WEBKIT)
- QLatin1String zoom("LastPagesZoomWebView");
-#else
- QLatin1String zoom("LastPagesZoomTextBrowser");
-#endif
-
- QStringList currentPages =
- helpEngine.customValue(pages).toString().
- split(QLatin1Char('|'), QString::SkipEmptyParts);
-
+ TRACE_OBJ
+ int lastPage = CollectionConfiguration::lastTabPage(helpEngine);
+ QStringList currentPages = CollectionConfiguration::lastShownPages(helpEngine);
if (!currentPages.isEmpty()) {
- QVector<QString>zoomList = helpEngine.customValue(zoom).toString().
- split(sep, QString::SkipEmptyParts).toVector();
- if (zoomList.isEmpty())
- zoomList.fill(QLatin1String("0.0"), currentPages.size());
- else if(zoomList.count() < currentPages.count()) {
- zoomList.insert(zoomList.count(),
- currentPages.count() - zoomList.count(), QLatin1String("0.0"));
- }
+ QStringList zoomList = CollectionConfiguration::lastZoomFactors(helpEngine);
+ while (zoomList.count() < currentPages.count())
+ zoomList.append(CollectionConfiguration::DefaultZoomFactor);
for (int i = currentPages.count(); --i >= 0;) {
if (QUrl(currentPages.at(i)).host() == nsName) {
- zoomList.remove(i);
+ zoomList.removeAt(i);
currentPages.removeAt(i);
lastPage = (lastPage == (i + 1)) ? 1 : lastPage;
}
}
- helpEngine.setCustomValue(pages, currentPages.join(sep));
- helpEngine.setCustomValue(QLatin1String("LastTabPage"), lastPage);
- helpEngine.setCustomValue(zoom, QStringList(zoomList.toList()).join(sep));
+ CollectionConfiguration::setLastShownPages(helpEngine, currentPages);
+ CollectionConfiguration::setLastTabPage(helpEngine, lastPage);
+ CollectionConfiguration::setLastZoomFactors(helpEngine, zoomList);
}
}
bool
updateUserCollection(QHelpEngineCore& user, const QHelpEngineCore& caller)
{
- const uint callerCollectionCreationTime = caller.
- customValue(QLatin1String("CreationTime"), 0).toUInt();
- const uint userCollectionCreationTime = user.
- customValue(QLatin1String("CreationTime"), 1).toUInt();
-
- if (callerCollectionCreationTime <= userCollectionCreationTime)
+ TRACE_OBJ
+ if (!CollectionConfiguration::isNewer(caller, user))
return false;
-
- user.setCustomValue(QLatin1String("CreationTime"),
- callerCollectionCreationTime);
- user.setCustomValue(QLatin1String("WindowTitle"),
- caller.customValue(QLatin1String("WindowTitle")));
- user.setCustomValue(QLatin1String("LastShownPages"),
- caller.customValue(QLatin1String("LastShownPages")));
-#if !defined(QT_NO_WEBKIT)
- const QLatin1String zoomKey("LastPagesZoomWebView");
-#else
- const QLatin1String zoomKey("LastPagesZoomTextBrowser");
-#endif
- user.setCustomValue(zoomKey, caller.customValue(zoomKey));
- user.setCustomValue(QLatin1String("CurrentFilter"),
- caller.customValue(QLatin1String("CurrentFilter")));
- user.setCustomValue(QLatin1String("CacheDirectory"),
- caller.customValue(QLatin1String("CacheDirectory")));
- user.setCustomValue(QLatin1String("EnableFilterFunctionality"),
- caller.customValue(QLatin1String("EnableFilterFunctionality")));
- user.setCustomValue(QLatin1String("HideFilterFunctionality"),
- caller.customValue(QLatin1String("HideFilterFunctionality")));
- user.setCustomValue(QLatin1String("EnableDocumentationManager"),
- caller.customValue(QLatin1String("EnableDocumentationManager")));
- user.setCustomValue(QLatin1String("EnableAddressBar"),
- caller.customValue(QLatin1String("EnableAddressBar")));
- user.setCustomValue(QLatin1String("HideAddressBar"),
- caller.customValue(QLatin1String("HideAddressBar")));
- user.setCustomValue(QLatin1String("ApplicationIcon"),
- caller.customValue(QLatin1String("ApplicationIcon")));
- user.setCustomValue(QLatin1String("AboutMenuTexts"),
- caller.customValue(QLatin1String("AboutMenuTexts")));
- user.setCustomValue(QLatin1String("AboutIcon"),
- caller.customValue(QLatin1String("AboutIcon")));
- user.setCustomValue(QLatin1String("AboutTexts"),
- caller.customValue(QLatin1String("AboutTexts")));
- user.setCustomValue(QLatin1String("AboutImages"),
- caller.customValue(QLatin1String("AboutImages")));
- user.setCustomValue(QLatin1String("defaultHomepage"),
- caller.customValue(QLatin1String("defaultHomepage")));
-
+ CollectionConfiguration::copyConfiguration(caller, user);
return true;
}
-bool
-referencedHelpFilesExistAll(QHelpEngineCore& user, QStringList& nameSpaces)
+void stripNonexistingDocs(QHelpEngineCore& collection)
{
- QFileInfo fi;
- int counter = nameSpaces.count();
- for (int i = counter; --i >= 0;) {
- const QString& nameSpace = nameSpaces.at(i);
- fi.setFile(user.documentationFileName(nameSpace));
- if (!fi.exists() || !fi.isFile()) {
- user.unregisterDocumentation(nameSpace);
- nameSpaces.removeAll(nameSpace);
- }
+ TRACE_OBJ
+ const QStringList &namespaces = collection.registeredDocumentations();
+ foreach (const QString &ns, namespaces) {
+ QFileInfo fi(collection.documentationFileName(ns));
+ if (!fi.exists() || !fi.isFile())
+ collection.unregisterDocumentation(ns);
}
- return (counter != nameSpaces.count()) ? false : true;
}
QString indexFilesFolder(const QString &collectionFile)
{
+ TRACE_OBJ
QString indexFilesFolder = QLatin1String(".fulltextsearch");
if (!collectionFile.isEmpty()) {
QFileInfo fi(collectionFile);
@@ -187,192 +133,306 @@ QString indexFilesFolder(const QString &collectionFile)
return indexFilesFolder;
}
-int main(int argc, char *argv[])
+/*
+ * Returns the expected absolute file path of the cached collection file
+ * correspondinging to the given collection's file.
+ * It may or may not exist yet.
+ */
+QString constructCachedCollectionFilePath(const QHelpEngineCore &collection)
+{
+ TRACE_OBJ
+ const QString &filePath = collection.collectionFile();
+ const QString &fileName = QFileInfo(filePath).fileName();
+ const QString &cacheDir = CollectionConfiguration::cacheDir(collection);
+ const QString &dir = !cacheDir.isEmpty()
+ && CollectionConfiguration::cacheDirIsRelativeToCollection(collection)
+ ? QFileInfo(filePath).dir().absolutePath()
+ + QDir::separator() + cacheDir
+ : MainWindow::collectionFileDirectory(false, cacheDir);
+ return dir + QDir::separator() + fileName;
+}
+
+bool synchronizeDocs(QHelpEngineCore &collection,
+ QHelpEngineCore &cachedCollection,
+ CmdLineParser &cmd)
{
-#ifndef Q_OS_WIN
- // First do a quick search for arguments that imply command-line mode.
+ TRACE_OBJ
+ const QDateTime &lastCollectionRegisterTime =
+ CollectionConfiguration::lastRegisterTime(collection);
+ if (!lastCollectionRegisterTime.isValid() || lastCollectionRegisterTime
+ < CollectionConfiguration::lastRegisterTime(cachedCollection))
+ return true;
+
+ const QStringList &docs = collection.registeredDocumentations();
+ const QStringList &cachedDocs = cachedCollection.registeredDocumentations();
+
+ /*
+ * Ensure that the cached collection contains all docs that
+ * the collection contains.
+ */
+ foreach (const QString &doc, docs) {
+ if (!cachedDocs.contains(doc)) {
+ const QString &docFile = collection.documentationFileName(doc);
+ if (!cachedCollection.registerDocumentation(docFile)) {
+ cmd.showMessage(QCoreApplication::translate("Assistant",
+ "Error registering documentation file '%1': %2").
+ arg(docFile).arg(cachedCollection.error()), true);
+ return false;
+ }
+ }
+ }
+
+ CollectionConfiguration::updateLastRegisterTime(cachedCollection);
+
+ return true;
+}
+
+bool removeSearchIndex(const QString &collectionFile)
+{
+ TRACE_OBJ
+ QString path = QFileInfo(collectionFile).path();
+ path += QLatin1Char('/') + indexFilesFolder(collectionFile);
+
+ QLocalSocket localSocket;
+ localSocket.connectToServer(QString(QLatin1String("QtAssistant%1"))
+ .arg(QLatin1String(QT_VERSION_STR)));
+
+ QDir dir(path); // check if there is no other instance ruinning
+ if (!dir.exists() || localSocket.waitForConnected())
+ return false;
+
+ QStringList lst = dir.entryList(QDir::Files | QDir::Hidden);
+ foreach (const QString &item, lst)
+ dir.remove(item);
+ return true;
+}
+
+bool rebuildSearchIndex(QCoreApplication &app, const QString &collectionFile,
+ CmdLineParser &cmd)
+{
+ TRACE_OBJ
+ QHelpEngine engine(collectionFile);
+ if (!engine.setupData()) {
+ cmd.showMessage(QCoreApplication::translate("Assistant", "Error: %1")
+ .arg(engine.error()), true);
+ return false;
+ }
+
+ QHelpSearchEngine * const searchEngine = engine.searchEngine();
+ QObject::connect(searchEngine, SIGNAL(indexingFinished()), &app,
+ SLOT(quit()));
+ searchEngine->reindexDocumentation();
+ return app.exec() == 0;
+}
+
+bool useGui(int argc, char *argv[])
+{
+ TRACE_OBJ
+ bool gui = true;
+#ifndef Q_OS_WIN
+ // Look for arguments that imply command-line mode.
const char * cmdModeArgs[] = {
- "-help", "-register", "-unregister", "-remove-search-index"
+ "-help", "-register", "-unregister", "-remove-search-index",
+ "-rebuild-search-index"
};
- bool useGui = true;
for (int i = 1; i < argc; ++i) {
for (size_t j = 0; j < sizeof cmdModeArgs/sizeof *cmdModeArgs; ++j) {
if(strcmp(argv[i], cmdModeArgs[j]) == 0) {
- useGui = false;
+ gui = false;
break;
}
}
}
- QApplication a(argc, argv, useGui);
#else
- QApplication a(argc, argv);
+ Q_UNUSED(argc)
+ Q_UNUSED(argv)
#endif
+ return gui;
+}
+
+bool registerDocumentation(QHelpEngineCore &collection, CmdLineParser &cmd,
+ bool printSuccess)
+{
+ TRACE_OBJ
+ if (!collection.registerDocumentation(cmd.helpFile())) {
+ cmd.showMessage(QCoreApplication::translate("Assistant",
+ "Could not register documentation file\n%1\n\nReason:\n%2")
+ .arg(cmd.helpFile()).arg(collection.error()), true);
+ return false;
+ }
+ if (printSuccess)
+ cmd.showMessage(QCoreApplication::translate("Assistant",
+ "Documentation successfully registered."),
+ false);
+ CollectionConfiguration::updateLastRegisterTime(collection);
+ return true;
+}
+
+bool unregisterDocumentation(QHelpEngineCore &collection,
+ const QString &namespaceName, CmdLineParser &cmd, bool printSuccess)
+{
+ TRACE_OBJ
+ if (!collection.unregisterDocumentation(namespaceName)) {
+ cmd.showMessage(QCoreApplication::translate("Assistant",
+ "Could not unregister documentation"
+ " file\n%1\n\nReason:\n%2").
+ arg(cmd.helpFile()).arg(collection.error()), true);
+ return false;
+ }
+ updateLastPagesOnUnregister(collection, namespaceName);
+ if (printSuccess)
+ cmd.showMessage(QCoreApplication::translate("Assistant",
+ "Documentation successfully unregistered."),
+ false);
+ return true;
+}
+
+void setupTranslation(const QString &fileName, const QString &dir)
+{
+ QTranslator *translator = new QTranslator(QCoreApplication::instance());
+ if (translator->load(fileName, dir)) {
+ QCoreApplication::installTranslator(translator);
+ } else if (!fileName.endsWith(QLatin1String("en_US"))) {
+ qWarning("Could not load translation file %s in directory %s.",
+ qPrintable(fileName), qPrintable(dir));
+ }
+}
+
+void setupTranslations()
+{
+ TRACE_OBJ
+ const QString& locale = QLocale::system().name();
+ const QString &resourceDir
+ = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+ setupTranslation(QLatin1String("assistant_") + locale, resourceDir);
+ setupTranslation(QLatin1String("qt_") + locale, resourceDir);
+ setupTranslation(QLatin1String("qt_help_") + locale, resourceDir);
+}
+
+} // Anonymous namespace.
+
+int main(int argc, char *argv[])
+{
+ TRACE_OBJ
+ QApplication a(argc, argv, useGui(argc, argv));
a.addLibraryPath(a.applicationDirPath() + QLatin1String("/plugins"));
- CmdLineParser cmd;
- CmdLineParser::Result res = cmd.parse(a.arguments());
+ // Parse arguments.
+ CmdLineParser cmd(a.arguments());
+ CmdLineParser::Result res = cmd.parse();
if (res == CmdLineParser::Help)
return 0;
else if (res == CmdLineParser::Error)
return -1;
- QString cmdCollectionFile = cmd.collectionFile();
- if (cmd.registerRequest() != CmdLineParser::None) {
- if (cmdCollectionFile.isEmpty())
- cmdCollectionFile = MainWindow::defaultHelpCollectionFileName();
- QHelpEngineCore help(cmdCollectionFile);
- help.setupData();
- if (cmd.registerRequest() == CmdLineParser::Register) {
- if (!help.registerDocumentation(cmd.helpFile())) {
- cmd.showMessage(
- QObject::tr("Could not register documentation file\n%1\n\nReason:\n%2")
- .arg(cmd.helpFile()).arg(help.error()), true);
- return -1;
- } else {
- cmd.showMessage(QObject::tr("Documentation successfully registered."),
- false);
- }
- } else {
- QString nsName = QHelpEngineCore::namespaceName(cmd.helpFile());
- if (help.unregisterDocumentation(nsName)) {
- updateLastPagesOnUnregister(help, nsName);
- cmd.showMessage(
- QObject::tr("Documentation successfully unregistered."),
- false);
- } else {
- cmd.showMessage(QObject::tr("Could not unregister documentation"
- " file\n%1\n\nReason:\n%2").arg(cmd.helpFile()).
- arg(help.error()), true);
- return -1;
- }
+ /*
+ * Create the collection objects that we need. We always have the
+ * cached collection file. Depending on whether the user specified
+ * one, we also may have an input collection file.
+ */
+ const QString collectionFile = cmd.collectionFile();
+ const bool collectionFileGiven = !collectionFile.isEmpty();
+ QScopedPointer<QHelpEngineCore> collection;
+ if (collectionFileGiven) {
+ collection.reset(new QHelpEngineCore(collectionFile));
+ if (!collection->setupData()) {
+ cmd.showMessage(QCoreApplication::translate("Assistant",
+ "Error reading collection file '%1': %2.").
+ arg(collectionFile).arg(collection->error()), true);
+ return EXIT_FAILURE;
}
- help.setCustomValue(QLatin1String("DocUpdate"), true);
- return 0;
}
-
- if (cmd.removeSearchIndex()) {
- QString file = cmdCollectionFile;
- if (file.isEmpty())
- file = MainWindow::defaultHelpCollectionFileName();
- QString path = QFileInfo(file).path();
- path += QLatin1Char('/') + indexFilesFolder(file);
-
- QLocalSocket localSocket;
- localSocket.connectToServer(QString(QLatin1String("QtAssistant%1"))
- .arg(QLatin1String(QT_VERSION_STR)));
-
- QDir dir(path); // check if there is no other instance ruinning
- if (!localSocket.waitForConnected() && dir.exists()) {
- QStringList lst = dir.entryList(QDir::Files | QDir::Hidden);
- foreach (const QString &item, lst)
- dir.remove(item);
- return 0;
- } else {
- return -1;
- }
+ const QString &cachedCollectionFile = collectionFileGiven
+ ? constructCachedCollectionFilePath(*collection)
+ : MainWindow::defaultHelpCollectionFileName();
+ if (collectionFileGiven && !QFileInfo(cachedCollectionFile).exists()
+ && !collection->copyCollectionFile(cachedCollectionFile)) {
+ cmd.showMessage(QCoreApplication::translate("Assistant",
+ "Error creating collection file '%1': %2.").
+ arg(cachedCollectionFile).arg(collection->error()), true);
+ return EXIT_FAILURE;
}
-
- {
- QSqlDatabase db;
- QStringList sqlDrivers(db.drivers());
- if (sqlDrivers.isEmpty()
- || !sqlDrivers.contains(QLatin1String("QSQLITE"))) {
- cmd.showMessage(QObject::tr("Cannot load sqlite database driver!"),
- true);
- return -1;
- }
+ QHelpEngineCore cachedCollection(cachedCollectionFile);
+ if (!cachedCollection.setupData()) {
+ cmd.showMessage(QCoreApplication::translate("Assistant",
+ "Error reading collection file '%1': %2").
+ arg(cachedCollectionFile).
+ arg(cachedCollection.error()), true);
+ return EXIT_FAILURE;
}
- if (!cmdCollectionFile.isEmpty()) {
- QHelpEngineCore caller(cmdCollectionFile);
- if (!caller.setupData()) {
- cmd.showMessage(QObject::tr("The specified collection file could "
- "not be read!"), true);
- return -1;
- }
+ stripNonexistingDocs(cachedCollection);
+ if (collectionFileGiven) {
+ if (CollectionConfiguration::isNewer(*collection, cachedCollection))
+ CollectionConfiguration::copyConfiguration(*collection,
+ cachedCollection);
+ if (!synchronizeDocs(*collection, cachedCollection, cmd))
+ return EXIT_FAILURE;
+ }
- QString fileName = QFileInfo(cmdCollectionFile).fileName();
- QString dir = MainWindow::collectionFileDirectory(false,
- caller.customValue(QLatin1String("CacheDirectory"),
- QString()).toString());
-
- bool collectionFileExists = true;
- QFileInfo fi(dir + QDir::separator() + fileName);
- if (!fi.exists()) {
- collectionFileExists = false;
- if (!caller.copyCollectionFile(fi.absoluteFilePath())) {
- cmd.showMessage(caller.error(), true);
- return -1;
- }
+ if (cmd.registerRequest() != CmdLineParser::None) {
+ const QStringList &cachedDocs =
+ cachedCollection.registeredDocumentations();
+ const QString &namespaceName =
+ QHelpEngineCore::namespaceName(cmd.helpFile());
+ if (cmd.registerRequest() == CmdLineParser::Register) {
+ if (collectionFileGiven
+ && !registerDocumentation(*collection, cmd, true))
+ return EXIT_FAILURE;
+ if (!cachedDocs.contains(namespaceName)
+ && !registerDocumentation(cachedCollection, cmd, !collectionFileGiven))
+ return EXIT_FAILURE;
+ return EXIT_SUCCESS;
}
-
- if (collectionFileExists) {
- QHelpEngineCore user(fi.absoluteFilePath());
- if (user.setupData()) {
- // some docs might have been un/registered
- bool docUpdate = caller.
- customValue(QLatin1String("DocUpdate"), false).toBool();
-
- // update in case the passed collection file changed
- if (updateUserCollection(user, caller))
- docUpdate = true;
-
- QStringList userDocs = user.registeredDocumentations();
- // update user collection file, docs might have been (re)moved
- if (!referencedHelpFilesExistAll(user, userDocs))
- docUpdate = true;
-
- if (docUpdate) {
- QStringList callerDocs = caller.registeredDocumentations();
- foreach (const QString &doc, callerDocs) {
- if (!userDocs.contains(doc)) {
- user.registerDocumentation(
- caller.documentationFileName(doc));
- }
- }
-
- QLatin1String intern("com.trolltech.com.assistantinternal-");
- foreach (const QString &doc, userDocs) {
- if (!callerDocs.contains(doc) && !doc.startsWith(intern))
- user.unregisterDocumentation(doc);
- }
-
- caller.setCustomValue(QLatin1String("DocUpdate"), false);
- }
- }
+ if (cmd.registerRequest() == CmdLineParser::Unregister) {
+ if (collectionFileGiven
+ && !unregisterDocumentation(*collection, namespaceName, cmd, true))
+ return EXIT_FAILURE;
+ if (cachedDocs.contains(namespaceName)
+ && !unregisterDocumentation(cachedCollection, namespaceName,
+ cmd, !collectionFileGiven))
+ return EXIT_FAILURE;
+ return EXIT_SUCCESS;
}
- cmd.setCollectionFile(fi.absoluteFilePath());
}
- if (!cmd.currentFilter().isEmpty()) {
- QString collectionFile;
- if (cmdCollectionFile.isEmpty()) {
- MainWindow::collectionFileDirectory(true);
- cmdCollectionFile = MainWindow::defaultHelpCollectionFileName();
- }
-
- QHelpEngineCore user(cmdCollectionFile);
- if (user.setupData())
- user.setCurrentFilter(cmd.currentFilter());
+ if (cmd.removeSearchIndex()) {
+ return removeSearchIndex(cachedCollectionFile)
+ ? EXIT_SUCCESS : EXIT_FAILURE;
}
- const QString& locale = QLocale::system().name();
- QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
-
- QTranslator translator(0);
- translator.load(QLatin1String("assistant_") + locale, resourceDir);
- a.installTranslator(&translator);
+ if (cmd.rebuildSearchIndex()) {
+ return rebuildSearchIndex(a, cachedCollectionFile, cmd)
+ ? EXIT_SUCCESS : EXIT_FAILURE;
+ }
- QTranslator qtTranslator(0);
- qtTranslator.load(QLatin1String("qt_") + locale, resourceDir);
- a.installTranslator(&qtTranslator);
+ if (!QSqlDatabase::isDriverAvailable(QLatin1String("QSQLITE"))) {
+ cmd.showMessage(QCoreApplication::translate("Assistant",
+ "Cannot load sqlite database driver!"),
+ true);
+ return EXIT_FAILURE;
+ }
- QTranslator qtHelpTranslator(0);
- qtHelpTranslator.load(QLatin1String("qt_help_") + locale, resourceDir);
- a.installTranslator(&qtHelpTranslator);
+ if (!cmd.currentFilter().isEmpty()) {
+ if (collectionFileGiven)
+ collection->setCurrentFilter(cmd.currentFilter());
+ cachedCollection.setCurrentFilter(cmd.currentFilter());
+ }
- MainWindow w(&cmd);
- w.show();
+ setupTranslations();
+
+ /*
+ * We need to be careful here: The main window has to be deleted before
+ * the help engine wrapper, which has to be deleted before the
+ * QApplication.
+ */
+ if (collectionFileGiven)
+ cmd.setCollectionFile(cachedCollectionFile);
+ MainWindow *w = new MainWindow(&cmd);
+ w->show();
a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
- return a.exec();
+ const int retval = a.exec();
+ delete w;
+ HelpEngineWrapper::removeInstance();
+ return retval;
}
diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp
index 0dbf81395d..687e6bcefa 100644
--- a/tools/assistant/tools/assistant/mainwindow.cpp
+++ b/tools/assistant/tools/assistant/mainwindow.cpp
@@ -38,24 +38,31 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include "tracer.h"
#include "mainwindow.h"
+
+#include "bookmarkmanager.h"
#include "centralwidget.h"
-#include "helpviewer.h"
#include "indexwindow.h"
#include "topicchooser.h"
#include "contentwindow.h"
#include "preferencesdialog.h"
-#include "bookmarkmanager.h"
+#include "helpenginewrapper.h"
#include "remotecontrol.h"
#include "cmdlineparser.h"
#include "aboutdialog.h"
#include "searchwidget.h"
#include "qtdocinstaller.h"
+// #define TRACING_REQUESTED
+
#include <QtCore/QDir>
#include <QtCore/QTimer>
+#include <QtCore/QDateTime>
#include <QtCore/QDebug>
+#include <QtCore/QFileSystemWatcher>
+#include <QtCore/QPair>
#include <QtCore/QResource>
#include <QtCore/QByteArray>
#include <QtCore/QTextStream>
@@ -76,8 +83,9 @@
#include <QtGui/QProgressBar>
#include <QtGui/QDesktopServices>
#include <QtGui/QToolButton>
+#include <QtGui/QFileDialog>
-#include <QtHelp/QHelpEngine>
+#include <QtHelp/QHelpEngineCore>
#include <QtHelp/QHelpSearchEngine>
#include <QtHelp/QHelpContentModel>
#include <QtHelp/QHelpIndexModel>
@@ -86,6 +94,7 @@ QT_BEGIN_NAMESPACE
MainWindow::MainWindow(CmdLineParser *cmdLine, QWidget *parent)
: QMainWindow(parent)
+ , m_bookmarkWidget(0)
, m_filterCombo(0)
, m_toolBarMenu(0)
, m_cmdLine(cmdLine)
@@ -93,37 +102,53 @@ MainWindow::MainWindow(CmdLineParser *cmdLine, QWidget *parent)
, m_qtDocInstaller(0)
, m_connectedInitSignals(false)
{
+ TRACE_OBJ
+
setToolButtonStyle(Qt::ToolButtonFollowStyle);
+ QString collectionFile;
if (usesDefaultCollection()) {
MainWindow::collectionFileDirectory(true);
- m_helpEngine = new QHelpEngine(MainWindow::defaultHelpCollectionFileName(),
- this);
+ collectionFile = MainWindow::defaultHelpCollectionFileName();
} else {
- m_helpEngine = new QHelpEngine(cmdLine->collectionFile(), this);
+ collectionFile = cmdLine->collectionFile();
}
+ HelpEngineWrapper &helpEngineWrapper =
+ HelpEngineWrapper::instance(collectionFile);
- m_centralWidget = new CentralWidget(m_helpEngine, this);
+ m_centralWidget = new CentralWidget(this);
setCentralWidget(m_centralWidget);
- m_indexWindow = new IndexWindow(m_helpEngine);
+ m_indexWindow = new IndexWindow(this);
QDockWidget *indexDock = new QDockWidget(tr("Index"), this);
indexDock->setObjectName(QLatin1String("IndexWindow"));
indexDock->setWidget(m_indexWindow);
addDockWidget(Qt::LeftDockWidgetArea, indexDock);
- m_contentWindow = new ContentWindow(m_helpEngine);
+ m_contentWindow = new ContentWindow;
QDockWidget *contentDock = new QDockWidget(tr("Contents"), this);
contentDock->setObjectName(QLatin1String("ContentWindow"));
contentDock->setWidget(m_contentWindow);
addDockWidget(Qt::LeftDockWidgetArea, contentDock);
- QDockWidget *bookmarkDock = new QDockWidget(tr("Bookmarks"), this);
- bookmarkDock->setObjectName(QLatin1String("BookmarkWindow"));
- bookmarkDock->setWidget(setupBookmarkWidget());
- addDockWidget(Qt::LeftDockWidgetArea, bookmarkDock);
+ QDockWidget *bookmarkDock = 0;
+ if (BookmarkManager *manager = BookmarkManager::instance()) {
+ bookmarkDock = new QDockWidget(tr("Bookmarks"), this);
+ bookmarkDock->setObjectName(QLatin1String("BookmarkWindow"));
+ bookmarkDock->setWidget(m_bookmarkWidget = manager->bookmarkDockWidget());
+ addDockWidget(Qt::LeftDockWidgetArea, bookmarkDock);
+
+ connect(manager, SIGNAL(escapePressed()), this,
+ SLOT(activateCurrentCentralWidgetTab()));
+ connect(manager, SIGNAL(setSource(QUrl)), m_centralWidget,
+ SLOT(setSource(QUrl)));
+ connect(manager, SIGNAL(setSourceInNewTab(QUrl)), m_centralWidget,
+ SLOT(setSourceInNewTab(QUrl)));
+ connect(m_centralWidget, SIGNAL(addBookmark(QString, QString)), manager,
+ SLOT(addBookmark(QString, QString)));
+ }
- QHelpSearchEngine *searchEngine = m_helpEngine->searchEngine();
+ QHelpSearchEngine *searchEngine = helpEngineWrapper.searchEngine();
connect(searchEngine, SIGNAL(indexingStarted()), this, SLOT(indexingStarted()));
connect(searchEngine, SIGNAL(indexingFinished()), this, SLOT(indexingFinished()));
@@ -140,18 +165,9 @@ MainWindow::MainWindow(CmdLineParser *cmdLine, QWidget *parent)
setupFilterToolbar();
setupAddressToolbar();
- m_bookmarkManager->setupBookmarkModels();
- m_bookmarkMenu->addSeparator();
- m_bookmarkManager->fillBookmarkMenu(m_bookmarkMenu);
- connect(m_bookmarkMenu, SIGNAL(triggered(QAction*)), this,
- SLOT(showBookmark(QAction*)));
- connect(m_bookmarkManager, SIGNAL(bookmarksChanged()), this,
- SLOT(updateBookmarkMenu()));
-
- setWindowTitle(m_helpEngine->customValue(QLatin1String("WindowTitle"),
- defWindowTitle).toString());
- QByteArray iconArray = m_helpEngine->customValue(QLatin1String("ApplicationIcon"),
- QByteArray()).toByteArray();
+ const QString windowTitle = helpEngineWrapper.windowTitle();
+ setWindowTitle(windowTitle.isEmpty() ? defWindowTitle : windowTitle);
+ QByteArray iconArray = helpEngineWrapper.applicationIcon();
if (iconArray.size() > 0) {
QPixmap pix;
pix.loadFromData(iconArray);
@@ -165,29 +181,28 @@ MainWindow::MainWindow(CmdLineParser *cmdLine, QWidget *parent)
// Show the widget here, otherwise the restore geometry and state won't work
// on x11.
show();
- QByteArray ba(m_helpEngine->customValue(QLatin1String("MainWindow")).toByteArray());
+ QByteArray ba(helpEngineWrapper.mainWindow());
if (!ba.isEmpty())
restoreState(ba);
- ba = m_helpEngine->customValue(QLatin1String("MainWindowGeometry")).toByteArray();
+ ba = helpEngineWrapper.mainWindowGeometry();
if (!ba.isEmpty()) {
restoreGeometry(ba);
} else {
tabifyDockWidget(contentDock, indexDock);
- tabifyDockWidget(indexDock, bookmarkDock);
+ if (bookmarkDock)
+ tabifyDockWidget(indexDock, bookmarkDock);
contentDock->raise();
resize(QSize(800, 600));
}
- if (!m_helpEngine->customValue(QLatin1String("useAppFont")).isValid()) {
- m_helpEngine->setCustomValue(QLatin1String("useAppFont"), false);
- m_helpEngine->setCustomValue(QLatin1String("useBrowserFont"), false);
- m_helpEngine->setCustomValue(QLatin1String("appFont"), qApp->font());
- m_helpEngine->setCustomValue(QLatin1String("appWritingSystem"),
- QFontDatabase::Latin);
- m_helpEngine->setCustomValue(QLatin1String("browserFont"), qApp->font());
- m_helpEngine->setCustomValue(QLatin1String("browserWritingSystem"),
- QFontDatabase::Latin);
+ if (!helpEngineWrapper.hasFontSettings()) {
+ helpEngineWrapper.setUseAppFont(false);
+ helpEngineWrapper.setUseBrowserFont(false);
+ helpEngineWrapper.setAppFont(qApp->font());
+ helpEngineWrapper.setAppWritingSystem(QFontDatabase::Latin);
+ helpEngineWrapper.setBrowserFont(qApp->font());
+ helpEngineWrapper.setBrowserWritingSystem(QFontDatabase::Latin);
} else {
updateApplicationFont();
}
@@ -196,7 +211,7 @@ MainWindow::MainWindow(CmdLineParser *cmdLine, QWidget *parent)
QTimer::singleShot(0, this, SLOT(insertLastPages()));
if (m_cmdLine->enableRemoteControl())
- (void)new RemoteControl(this, m_helpEngine);
+ (void)new RemoteControl(this);
if (m_cmdLine->contents() == CmdLineParser::Show)
showContents();
@@ -209,9 +224,9 @@ MainWindow::MainWindow(CmdLineParser *cmdLine, QWidget *parent)
hideIndex();
if (m_cmdLine->bookmarks() == CmdLineParser::Show)
- showBookmarks();
+ showBookmarksDockWidget();
else if (m_cmdLine->bookmarks() == CmdLineParser::Hide)
- hideBookmarks();
+ hideBookmarksDockWidget();
if (m_cmdLine->search() == CmdLineParser::Show)
showSearch();
@@ -223,51 +238,59 @@ MainWindow::MainWindow(CmdLineParser *cmdLine, QWidget *parent)
else if (m_cmdLine->index() == CmdLineParser::Activate)
showIndex();
else if (m_cmdLine->bookmarks() == CmdLineParser::Activate)
- showBookmarks();
+ showBookmarksDockWidget();
if (!m_cmdLine->currentFilter().isEmpty()) {
const QString &curFilter = m_cmdLine->currentFilter();
- if (m_helpEngine->customFilters().contains(curFilter))
- m_helpEngine->setCurrentFilter(curFilter);
+ if (helpEngineWrapper.customFilters().contains(curFilter))
+ helpEngineWrapper.setCurrentFilter(curFilter);
}
if (usesDefaultCollection())
QTimer::singleShot(0, this, SLOT(lookForNewQtDocumentation()));
else
checkInitState();
+
+ connect(&helpEngineWrapper, SIGNAL(documentationRemoved(QString)),
+ this, SLOT(documentationRemoved(QString)));
+ connect(&helpEngineWrapper, SIGNAL(documentationUpdated(QString)),
+ this, SLOT(documentationUpdated(QString)));
}
setTabPosition(Qt::AllDockWidgetAreas, QTabWidget::North);
}
MainWindow::~MainWindow()
{
+ TRACE_OBJ
if (m_qtDocInstaller)
delete m_qtDocInstaller;
}
bool MainWindow::usesDefaultCollection() const
{
+ TRACE_OBJ
return m_cmdLine->collectionFile().isEmpty();
}
void MainWindow::closeEvent(QCloseEvent *e)
{
- m_bookmarkManager->saveBookmarks();
- m_helpEngine->setCustomValue(QLatin1String("MainWindow"), saveState());
- m_helpEngine->setCustomValue(QLatin1String("MainWindowGeometry"),
- saveGeometry());
-
+ TRACE_OBJ
+ BookmarkManager::destroy();
+ HelpEngineWrapper::instance().setMainWindow(saveState());
+ HelpEngineWrapper::instance().setMainWindowGeometry(saveGeometry());
QMainWindow::closeEvent(e);
}
bool MainWindow::initHelpDB()
{
- if (!m_helpEngine->setupData())
+ TRACE_OBJ
+ HelpEngineWrapper &helpEngineWrapper = HelpEngineWrapper::instance();
+ if (!helpEngineWrapper.setupData())
return false;
bool assistantInternalDocRegistered = false;
QString intern(QLatin1String("com.trolltech.com.assistantinternal-"));
- foreach (const QString &ns, m_helpEngine->registeredDocumentations()) {
+ foreach (const QString &ns, helpEngineWrapper.registeredDocumentations()) {
if (ns.startsWith(intern)) {
intern = ns;
assistantInternalDocRegistered = true;
@@ -275,8 +298,7 @@ bool MainWindow::initHelpDB()
}
}
- const QString &collectionFile = m_helpEngine->collectionFile();
-
+ const QString &collectionFile = helpEngineWrapper.collectionFile();
QFileInfo fi(collectionFile);
QString helpFile;
QTextStream(&helpFile) << fi.absolutePath() << QDir::separator()
@@ -293,109 +315,78 @@ bool MainWindow::initHelpDB()
file.close();
}
- QHelpEngineCore hc(fi.absoluteFilePath());
- hc.setupData();
- hc.unregisterDocumentation(intern);
- hc.registerDocumentation(helpFile);
- needsSetup = true;
- }
-
- const QLatin1String unfiltered("UnfilteredFilterInserted");
- if (1 != m_helpEngine->customValue(unfiltered).toInt()) {
- {
- QHelpEngineCore hc(collectionFile);
- hc.setupData();
- hc.addCustomFilter(tr("Unfiltered"), QStringList());
- hc.setCustomValue(unfiltered, 1);
- }
-
- m_helpEngine->blockSignals(true);
- m_helpEngine->setCurrentFilter(tr("Unfiltered"));
- m_helpEngine->blockSignals(false);
+ helpEngineWrapper.unregisterDocumentation(intern);
+ helpEngineWrapper.registerDocumentation(helpFile);
needsSetup = true;
}
if (needsSetup)
- m_helpEngine->setupData();
+ helpEngineWrapper.setupData();
return true;
}
void MainWindow::lookForNewQtDocumentation()
{
- m_qtDocInstaller = new QtDocInstaller(m_helpEngine->collectionFile());
- connect(m_qtDocInstaller, SIGNAL(errorMessage(QString)), this,
- SLOT(displayInstallationError(QString)));
+ TRACE_OBJ
+ HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
+ QStringList docs;
+ docs << QLatin1String("assistant")
+ << QLatin1String("designer")
+ << QLatin1String("linguist")
+ << QLatin1String("qmake")
+ << QLatin1String("qt");
+ QList<QtDocInstaller::DocInfo> qtDocInfos;
+ foreach (const QString &doc, docs)
+ qtDocInfos.append(QtDocInstaller::DocInfo(doc, helpEngine.qtDocInfo(doc)));
+
+ m_qtDocInstaller = new QtDocInstaller(qtDocInfos);
connect(m_qtDocInstaller, SIGNAL(docsInstalled(bool)), this,
- SLOT(qtDocumentationInstalled(bool)));
-
- QString versionKey = QString(QLatin1String("qtVersion%1$$$qt")).
- arg(QLatin1String(QT_VERSION_STR));
- if (m_helpEngine->customValue(versionKey, 0).toInt() != 1)
+ SLOT(qtDocumentationInstalled()));
+ connect(m_qtDocInstaller, SIGNAL(qchFileNotFound(QString)), this,
+ SLOT(resetQtDocInfo(QString)));
+ connect(m_qtDocInstaller, SIGNAL(registerDocumentation(QString, QString)),
+ this, SLOT(registerDocumentation(QString, QString)));
+ if (helpEngine.qtDocInfo(QLatin1String("qt")).count() != 2)
statusBar()->showMessage(tr("Looking for Qt Documentation..."));
m_qtDocInstaller->installDocs();
}
-void MainWindow::displayInstallationError(const QString &errorMessage)
-{
- QMessageBox::warning(this, tr("Qt Assistant"), errorMessage);
-}
-
-void MainWindow::qtDocumentationInstalled(bool newDocsInstalled)
+void MainWindow::qtDocumentationInstalled()
{
- if (newDocsInstalled)
- m_helpEngine->setupData();
+ TRACE_OBJ
statusBar()->clearMessage();
checkInitState();
}
void MainWindow::checkInitState()
{
+ TRACE_OBJ
if (!m_cmdLine->enableRemoteControl())
return;
- if (m_helpEngine->contentModel()->isCreatingContents()
- || m_helpEngine->indexModel()->isCreatingIndex()) {
+ HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
+ if (helpEngine.contentModel()->isCreatingContents()
+ || helpEngine.indexModel()->isCreatingIndex()) {
if (!m_connectedInitSignals) {
- connect(m_helpEngine->contentModel(), SIGNAL(contentsCreated()),
+ connect(helpEngine.contentModel(), SIGNAL(contentsCreated()),
this, SLOT(checkInitState()));
- connect(m_helpEngine->indexModel(), SIGNAL(indexCreated()), this,
+ connect(helpEngine.indexModel(), SIGNAL(indexCreated()), this,
SLOT(checkInitState()));
m_connectedInitSignals = true;
}
} else {
if (m_connectedInitSignals) {
- disconnect(m_helpEngine->contentModel(), 0, this, 0);
- disconnect(m_helpEngine->indexModel(), 0, this, 0);
+ disconnect(helpEngine.contentModel(), 0, this, 0);
+ disconnect(helpEngine.indexModel(), 0, this, 0);
}
emit initDone();
}
-}
-
-void MainWindow::updateBookmarkMenu()
-{
- if (m_bookmarkManager) {
- m_bookmarkMenu->removeAction(m_bookmarkMenuAction);
-
- m_bookmarkMenu->clear();
-
- m_bookmarkMenu->addAction(m_bookmarkMenuAction);
- m_bookmarkMenu->addSeparator();
-
- m_bookmarkManager->fillBookmarkMenu(m_bookmarkMenu);
- }
-}
-
-void MainWindow::showBookmark(QAction *action)
-{
- if (m_bookmarkManager) {
- const QUrl &url = m_bookmarkManager->urlForAction(action);
- if (url.isValid())
- m_centralWidget->setSource(url);
- }
+ HelpEngineWrapper::instance().initialDocSetupDone();
}
void MainWindow::insertLastPages()
{
+ TRACE_OBJ
if (m_cmdLine->url().isValid())
m_centralWidget->setSource(m_cmdLine->url());
else
@@ -407,6 +398,7 @@ void MainWindow::insertLastPages()
void MainWindow::setupActions()
{
+ TRACE_OBJ
QString resourcePath = QLatin1String(":/trolltech/assistant/images/");
#ifdef Q_OS_MAC
setUnifiedTitleAndToolBarOnMac(true);
@@ -437,8 +429,12 @@ void MainWindow::setupActions()
m_closeTabAction->setShortcuts(QKeySequence::Close);
QAction *tmp = menu->addAction(tr("&Quit"), this, SLOT(close()));
- tmp->setShortcut(QKeySequence::Quit);
tmp->setMenuRole(QAction::QuitRole);
+#ifdef Q_OS_WIN
+ tmp->setShortcut(QKeySequence(tr("CTRL+Q")));
+#else
+ tmp->setShortcut(QKeySequence::Quit);
+#endif
menu = menuBar()->addMenu(tr("&Edit"));
m_copyAction = menu->addAction(tr("&Copy selected Text"), m_centralWidget,
@@ -492,7 +488,7 @@ void MainWindow::setupActions()
QKeySequence(tr("ALT+C")));
m_viewMenu->addAction(tr("Index"), this, SLOT(showIndex()),
QKeySequence(tr("ALT+I")));
- m_viewMenu->addAction(tr("Bookmarks"), this, SLOT(showBookmarks()),
+ m_viewMenu->addAction(tr("Bookmarks"), this, SLOT(showBookmarksDockWidget()),
QKeySequence(tr("ALT+O")));
m_viewMenu->addAction(tr("Search"), this, SLOT(showSearchWidget()),
QKeySequence(tr("ALT+S")));
@@ -528,10 +524,8 @@ void MainWindow::setupActions()
tmp->setShortcuts(QList<QKeySequence>() << QKeySequence(tr("Ctrl+Alt+Left"))
<< QKeySequence(Qt::CTRL + Qt::Key_PageUp));
- m_bookmarkMenu = menuBar()->addMenu(tr("&Bookmarks"));
- m_bookmarkMenuAction = m_bookmarkMenu->addAction(tr("Add Bookmark..."),
- this, SLOT(addBookmark()));
- m_bookmarkMenuAction->setShortcut(tr("CTRL+D"));
+ if (BookmarkManager *manager = BookmarkManager::instance())
+ manager->takeBookmarksMenu(menuBar()->addMenu(tr("&Bookmarks")));
menu = menuBar()->addMenu(tr("&Help"));
m_aboutAction = menu->addAction(tr("About..."), this, SLOT(showAboutDialog()));
@@ -592,14 +586,6 @@ void MainWindow::setupActions()
SLOT(updateNavigationItems()));
connect(m_centralWidget, SIGNAL(highlighted(QString)), statusBar(),
SLOT(showMessage(QString)));
- connect(m_centralWidget, SIGNAL(addNewBookmark(QString,QString)), this,
- SLOT(addNewBookmark(QString,QString)));
-
- // bookmarks
- connect(m_bookmarkWidget, SIGNAL(requestShowLink(QUrl)), m_centralWidget,
- SLOT(setSource(QUrl)));
- connect(m_bookmarkWidget, SIGNAL(escapePressed()), this,
- SLOT(activateCurrentCentralWidgetTab()));
// index window
connect(m_indexWindow, SIGNAL(linkActivated(QUrl)), m_centralWidget,
@@ -624,6 +610,7 @@ void MainWindow::setupActions()
QMenu *MainWindow::toolBarMenu()
{
+ TRACE_OBJ
if (!m_toolBarMenu) {
m_viewMenu->addSeparator();
m_toolBarMenu = m_viewMenu->addMenu(tr("Toolbars"));
@@ -633,8 +620,9 @@ QMenu *MainWindow::toolBarMenu()
void MainWindow::setupFilterToolbar()
{
- if (!m_helpEngine->
- customValue(QLatin1String("EnableFilterFunctionality"), true).toBool())
+ TRACE_OBJ
+ HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
+ if (!helpEngine.filterFunctionalityEnabled())
return;
m_filterCombo = new QComboBox(this);
@@ -647,16 +635,15 @@ void MainWindow::setupFilterToolbar()
this));
filterToolBar->addWidget(m_filterCombo);
- const QLatin1String hideFilter("HideFilterFunctionality");
- if (m_helpEngine->customValue(hideFilter, true).toBool())
+ if (!helpEngine.filterToolbarVisible())
filterToolBar->hide();
toolBarMenu()->addAction(filterToolBar->toggleViewAction());
- connect(m_helpEngine, SIGNAL(setupFinished()), this,
- SLOT(setupFilterCombo()));
+ connect(&helpEngine, SIGNAL(setupFinished()), this,
+ SLOT(setupFilterCombo()), Qt::QueuedConnection);
connect(m_filterCombo, SIGNAL(activated(QString)), this,
SLOT(filterDocumentation(QString)));
- connect(m_helpEngine, SIGNAL(currentFilterChanged(QString)), this,
+ connect(&helpEngine, SIGNAL(currentFilterChanged(QString)), this,
SLOT(currentFilterChanged(QString)));
setupFilterCombo();
@@ -664,7 +651,9 @@ void MainWindow::setupFilterToolbar()
void MainWindow::setupAddressToolbar()
{
- if (!m_helpEngine->customValue(QLatin1String("EnableAddressBar"), true).toBool())
+ TRACE_OBJ
+ HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
+ if (!helpEngine.addressBarEnabled())
return;
m_addressLineEdit = new QLineEdit(this);
@@ -676,7 +665,7 @@ void MainWindow::setupAddressToolbar()
this));
addressToolBar->addWidget(m_addressLineEdit);
- if (m_helpEngine->customValue(QLatin1String("HideAddressBar"), true).toBool())
+ if (!helpEngine.addressBarVisible())
addressToolBar->hide();
toolBarMenu()->addAction(addressToolBar->toggleViewAction());
@@ -691,57 +680,53 @@ void MainWindow::setupAddressToolbar()
void MainWindow::updateAboutMenuText()
{
- if (m_helpEngine) {
- QByteArray ba = m_helpEngine->customValue(QLatin1String("AboutMenuTexts"),
- QByteArray()).toByteArray();
- if (ba.size() > 0) {
- QString lang;
- QString str;
- QString trStr;
- QString currentLang = QLocale::system().name();
- int i = currentLang.indexOf(QLatin1Char('_'));
- if (i > -1)
- currentLang = currentLang.left(i);
- QDataStream s(&ba, QIODevice::ReadOnly);
- while (!s.atEnd()) {
- s >> lang;
- s >> str;
- if (lang == QLatin1String("default") && trStr.isEmpty()) {
- trStr = str;
- } else if (lang == currentLang) {
- trStr = str;
- break;
- }
+ TRACE_OBJ
+ QByteArray ba = HelpEngineWrapper::instance().aboutMenuTexts();
+ if (ba.size() > 0) {
+ QString lang;
+ QString str;
+ QString trStr;
+ QString currentLang = QLocale::system().name();
+ int i = currentLang.indexOf(QLatin1Char('_'));
+ if (i > -1)
+ currentLang = currentLang.left(i);
+ QDataStream s(&ba, QIODevice::ReadOnly);
+ while (!s.atEnd()) {
+ s >> lang;
+ s >> str;
+ if (lang == QLatin1String("default") && trStr.isEmpty()) {
+ trStr = str;
+ } else if (lang == currentLang) {
+ trStr = str;
+ break;
}
- if (!trStr.isEmpty())
- m_aboutAction->setText(trStr);
}
+ if (!trStr.isEmpty())
+ m_aboutAction->setText(trStr);
}
}
void MainWindow::showNewAddress()
{
+ TRACE_OBJ
showNewAddress(m_centralWidget->currentSource());
}
void MainWindow::showNewAddress(const QUrl &url)
{
+ TRACE_OBJ
m_addressLineEdit->setText(url.toString());
}
-void MainWindow::addBookmark()
-{
- addNewBookmark(m_centralWidget->currentTitle(),
- m_centralWidget->currentSource().toString());
-}
-
void MainWindow::gotoAddress()
{
+ TRACE_OBJ
m_centralWidget->setSource(m_addressLineEdit->text());
}
void MainWindow::updateNavigationItems()
{
+ TRACE_OBJ
bool hasCurrentViewer = m_centralWidget->isHomeAvailable();
m_copyAction->setEnabled(m_centralWidget->hasSelection());
m_homeAction->setEnabled(hasCurrentViewer);
@@ -755,12 +740,14 @@ void MainWindow::updateNavigationItems()
void MainWindow::updateTabCloseAction()
{
+ TRACE_OBJ
m_closeTabAction->setEnabled(m_centralWidget->enableTabCloseAction());
}
void MainWindow::showTopicChooser(const QMap<QString, QUrl> &links,
const QString &keyword)
{
+ TRACE_OBJ
TopicChooser tc(this, keyword, links);
if (tc.exec() == QDialog::Accepted) {
m_centralWidget->setSource(tc.link());
@@ -769,18 +756,18 @@ void MainWindow::showTopicChooser(const QMap<QString, QUrl> &links,
void MainWindow::showPreferences()
{
- PreferencesDialog dia(m_helpEngine, this);
-
+ TRACE_OBJ
+ PreferencesDialog dia(this);
connect(&dia, SIGNAL(updateApplicationFont()), this,
SLOT(updateApplicationFont()));
connect(&dia, SIGNAL(updateBrowserFont()), m_centralWidget,
SLOT(updateBrowserFont()));
-
dia.showDialog();
}
void MainWindow::syncContents()
{
+ TRACE_OBJ
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
const QUrl url = m_centralWidget->currentSource();
showContents();
@@ -792,40 +779,32 @@ void MainWindow::syncContents()
void MainWindow::copyAvailable(bool yes)
{
+ TRACE_OBJ
m_copyAction->setEnabled(yes);
}
-void MainWindow::addNewBookmark(const QString &title, const QString &url)
-{
- if (url.isEmpty() || url == QLatin1String("about:blank"))
- return;
-
- m_bookmarkManager->showBookmarkDialog(this, title, url);
-}
-
void MainWindow::showAboutDialog()
{
+ TRACE_OBJ
+ HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
QByteArray contents;
- if (m_helpEngine) {
- QByteArray ba = m_helpEngine->customValue(QLatin1String("AboutTexts"),
- QByteArray()).toByteArray();
- if (!ba.isEmpty()) {
- QString lang;
- QByteArray cba;
- QString currentLang = QLocale::system().name();
- int i = currentLang.indexOf(QLatin1Char('_'));
- if (i > -1)
- currentLang = currentLang.left(i);
- QDataStream s(&ba, QIODevice::ReadOnly);
- while (!s.atEnd()) {
- s >> lang;
- s >> cba;
- if (lang == QLatin1String("default") && contents.isEmpty()) {
- contents = cba;
- } else if (lang == currentLang) {
- contents = cba;
- break;
- }
+ QByteArray ba = helpEngine.aboutTexts();
+ if (!ba.isEmpty()) {
+ QString lang;
+ QByteArray cba;
+ QString currentLang = QLocale::system().name();
+ int i = currentLang.indexOf(QLatin1Char('_'));
+ if (i > -1)
+ currentLang = currentLang.left(i);
+ QDataStream s(&ba, QIODevice::ReadOnly);
+ while (!s.atEnd()) {
+ s >> lang;
+ s >> cba;
+ if (lang == QLatin1String("default") && contents.isEmpty()) {
+ contents = cba;
+ } else if (lang == currentLang) {
+ contents = cba;
+ break;
}
}
}
@@ -834,11 +813,8 @@ void MainWindow::showAboutDialog()
QByteArray iconArray;
if (!contents.isEmpty()) {
- iconArray = m_helpEngine->customValue(QLatin1String("AboutIcon"),
- QByteArray()).toByteArray();
- QByteArray resources =
- m_helpEngine->customValue(QLatin1String("AboutImages"),
- QByteArray()).toByteArray();
+ iconArray = helpEngine.aboutIcon();
+ QByteArray resources = helpEngine.aboutImages();
QPixmap pix;
pix.loadFromData(iconArray);
aboutDia.setText(QString::fromUtf8(contents), resources);
@@ -861,50 +837,109 @@ void MainWindow::showAboutDialog()
aboutDia.exec();
}
+void MainWindow::setContentsVisible(bool visible)
+{
+ TRACE_OBJ
+ if (visible)
+ showContents();
+ else
+ hideContents();
+}
+
void MainWindow::showContents()
{
+ TRACE_OBJ
activateDockWidget(m_contentWindow);
}
+void MainWindow::hideContents()
+{
+ TRACE_OBJ
+ m_contentWindow->parentWidget()->hide();
+}
+
+void MainWindow::setIndexVisible(bool visible)
+{
+ TRACE_OBJ
+ if (visible)
+ showIndex();
+ else
+ hideIndex();
+}
+
void MainWindow::showIndex()
{
+ TRACE_OBJ
activateDockWidget(m_indexWindow);
}
-void MainWindow::showBookmarks()
+void MainWindow::hideIndex()
{
- activateDockWidget(m_bookmarkWidget);
+ TRACE_OBJ
+ m_indexWindow->parentWidget()->hide();
}
-void MainWindow::activateDockWidget(QWidget *w)
+void MainWindow::setBookmarksVisible(bool visible)
{
- w->parentWidget()->show();
- w->parentWidget()->raise();
- w->setFocus();
+ TRACE_OBJ
+ if (visible)
+ showBookmarksDockWidget();
+ else
+ hideBookmarksDockWidget();
}
-void MainWindow::hideContents()
+void MainWindow::showBookmarksDockWidget()
{
- m_contentWindow->parentWidget()->hide();
+ TRACE_OBJ
+ if (m_bookmarkWidget)
+ activateDockWidget(m_bookmarkWidget);
}
-void MainWindow::hideIndex()
+void MainWindow::hideBookmarksDockWidget()
{
- m_indexWindow->parentWidget()->hide();
+ TRACE_OBJ
+ if (m_bookmarkWidget)
+ m_bookmarkWidget->parentWidget()->hide();
}
-void MainWindow::hideBookmarks()
+void MainWindow::setSearchVisible(bool visible)
{
- m_bookmarkWidget->parentWidget()->hide();
+ TRACE_OBJ
+ if (visible)
+ showSearch();
+ else
+ hideSearch();
+}
+
+void MainWindow::showSearch()
+{
+ TRACE_OBJ
+ m_centralWidget->activateSearchWidget();
+}
+
+void MainWindow::hideSearch()
+{
+ TRACE_OBJ
+ m_centralWidget->removeSearchWidget();
+}
+
+void MainWindow::activateDockWidget(QWidget *w)
+{
+ TRACE_OBJ
+ w->parentWidget()->show();
+ w->parentWidget()->raise();
+ w->setFocus();
}
void MainWindow::setIndexString(const QString &str)
{
+ TRACE_OBJ
m_indexWindow->setSearchLineEditText(str);
}
void MainWindow::activateCurrentBrowser()
{
+ TRACE_OBJ
CentralWidget *cw = CentralWidget::instance();
if (cw) {
cw->activateTab(true);
@@ -913,40 +948,38 @@ void MainWindow::activateCurrentBrowser()
void MainWindow::activateCurrentCentralWidgetTab()
{
+ TRACE_OBJ
m_centralWidget->activateTab();
}
-void MainWindow::showSearch()
-{
- m_centralWidget->activateSearchWidget();
-}
-
void MainWindow::showSearchWidget()
{
+ TRACE_OBJ
m_centralWidget->activateSearchWidget(true);
}
-void MainWindow::hideSearch()
-{
- m_centralWidget->removeSearchWidget();
-}
-
void MainWindow::updateApplicationFont()
{
+ TRACE_OBJ
+ HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
QFont font = qApp->font();
- if (m_helpEngine->customValue(QLatin1String("useAppFont")).toBool())
- font = qVariantValue<QFont>(m_helpEngine->customValue(QLatin1String("appFont")));
+ if (helpEngine.usesAppFont())
+ font = helpEngine.appFont();
- qApp->setFont(font, "QWidget");
+ const QWidgetList &widgets = qApp->allWidgets();
+ foreach (QWidget* widget, widgets)
+ widget->setFont(font);
}
void MainWindow::setupFilterCombo()
{
+ TRACE_OBJ
+ HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
QString curFilter = m_filterCombo->currentText();
if (curFilter.isEmpty())
- curFilter = m_helpEngine->currentFilter();
+ curFilter = helpEngine.currentFilter();
m_filterCombo->clear();
- m_filterCombo->addItems(m_helpEngine->customFilters());
+ m_filterCombo->addItems(helpEngine.customFilters());
int idx = m_filterCombo->findText(curFilter);
if (idx < 0)
idx = 0;
@@ -955,16 +988,20 @@ void MainWindow::setupFilterCombo()
void MainWindow::filterDocumentation(const QString &customFilter)
{
- m_helpEngine->setCurrentFilter(customFilter);
+ TRACE_OBJ
+ HelpEngineWrapper::instance().setCurrentFilter(customFilter);
}
void MainWindow::expandTOC(int depth)
{
+ TRACE_OBJ
+ Q_ASSERT(depth >= -1);
m_contentWindow->expandToDepth(depth);
}
void MainWindow::indexingStarted()
{
+ TRACE_OBJ
if (!m_progressWidget) {
m_progressWidget = new QWidget();
QLayout* hlayout = new QHBoxLayout(m_progressWidget);
@@ -990,21 +1027,15 @@ void MainWindow::indexingStarted()
void MainWindow::indexingFinished()
{
+ TRACE_OBJ
statusBar()->removeWidget(m_progressWidget);
delete m_progressWidget;
m_progressWidget = 0;
}
-QWidget* MainWindow::setupBookmarkWidget()
-{
- m_bookmarkManager = new BookmarkManager(m_helpEngine);
- m_bookmarkWidget = new BookmarkWidget(m_bookmarkManager, this);
- connect(m_bookmarkWidget, SIGNAL(addBookmark()), this, SLOT(addBookmark()));
- return m_bookmarkWidget;
-}
-
QString MainWindow::collectionFileDirectory(bool createDir, const QString &cacheDir)
{
+ TRACE_OBJ
QString collectionPath =
QDesktopServices::storageLocation(QDesktopServices::DataLocation);
if (collectionPath.isEmpty()) {
@@ -1030,16 +1061,65 @@ QString MainWindow::collectionFileDirectory(bool createDir, const QString &cache
QString MainWindow::defaultHelpCollectionFileName()
{
- return collectionFileDirectory() + QDir::separator() +
+ TRACE_OBJ
+ // forces creation of the default collection file path
+ return collectionFileDirectory(true) + QDir::separator() +
QString(QLatin1String("qthelpcollection_%1.qhc")).
arg(QLatin1String(QT_VERSION_STR));
}
void MainWindow::currentFilterChanged(const QString &filter)
{
+ TRACE_OBJ
const int index = m_filterCombo->findText(filter);
Q_ASSERT(index != -1);
m_filterCombo->setCurrentIndex(index);
}
+void MainWindow::documentationRemoved(const QString &namespaceName)
+{
+ TRACE_OBJ
+ CentralWidget* widget = CentralWidget::instance();
+ widget->closeOrReloadTabs(widget->currentSourceFileList().
+ keys(namespaceName), false);
+}
+
+void MainWindow::documentationUpdated(const QString &namespaceName)
+{
+ TRACE_OBJ
+ CentralWidget* widget = CentralWidget::instance();
+ widget->closeOrReloadTabs(widget->currentSourceFileList().
+ keys(namespaceName), true);
+}
+
+void MainWindow::resetQtDocInfo(const QString &component)
+{
+ TRACE_OBJ
+ HelpEngineWrapper::instance().setQtDocInfo(component,
+ QStringList(QDateTime().toString(Qt::ISODate)));
+}
+
+void MainWindow::registerDocumentation(const QString &component,
+ const QString &absFileName)
+{
+ TRACE_OBJ
+ QString ns = QHelpEngineCore::namespaceName(absFileName);
+ if (ns.isEmpty())
+ return;
+
+ HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance();
+ if (helpEngine.registeredDocumentations().contains(ns))
+ helpEngine.unregisterDocumentation(ns);
+ if (!helpEngine.registerDocumentation(absFileName)) {
+ QMessageBox::warning(this, tr("Qt Assistant"),
+ tr("Could not register file '%1': %2").
+ arg(absFileName).arg(helpEngine.error()));
+ } else {
+ QStringList docInfo;
+ docInfo << QFileInfo(absFileName).lastModified().toString(Qt::ISODate)
+ << absFileName;
+ helpEngine.setQtDocInfo(component, docInfo);
+ }
+}
+
QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/mainwindow.h b/tools/assistant/tools/assistant/mainwindow.h
index 8a9b572ec9..8e4276dce4 100644
--- a/tools/assistant/tools/assistant/mainwindow.h
+++ b/tools/assistant/tools/assistant/mainwindow.h
@@ -48,6 +48,7 @@
QT_BEGIN_NAMESPACE
class QAction;
+class QFileSystemWatcher;
class QLineEdit;
class QComboBox;
class QMenu;
@@ -57,8 +58,6 @@ class QHelpEngineCore;
class QHelpEngine;
class CentralWidget;
class ContentWindow;
-class BookmarkManager;
-class BookmarkWidget;
class CmdLineParser;
class QtDocInstaller;
@@ -76,10 +75,6 @@ public:
static QString defaultHelpCollectionFileName();
public:
- void hideContents();
- void hideIndex();
- void hideBookmarks();
- void hideSearch();
void setIndexString(const QString &str);
void expandTOC(int depth);
bool usesDefaultCollection() const;
@@ -88,18 +83,20 @@ signals:
void initDone();
public slots:
- void showContents();
- void showIndex();
- void showBookmarks();
- void showSearch();
+ void setContentsVisible(bool visible);
+ void setIndexVisible(bool visible);
+ void setBookmarksVisible(bool visible);
+ void setSearchVisible(bool visible);
void showSearchWidget();
void syncContents();
void activateCurrentCentralWidgetTab();
void currentFilterChanged(const QString &filter);
private slots:
+ void showContents();
+ void showIndex();
+ void showSearch();
void insertLastPages();
- void addBookmark();
void gotoAddress();
void showPreferences();
void showNewAddress();
@@ -108,7 +105,6 @@ private slots:
void updateNavigationItems();
void updateTabCloseAction();
void showNewAddress(const QUrl &url);
- void addNewBookmark(const QString &title, const QString &url);
void showTopicChooser(const QMap<QString, QUrl> &links, const QString &keyword);
void updateApplicationFont();
void filterDocumentation(const QString &customFilter);
@@ -116,12 +112,13 @@ private slots:
void lookForNewQtDocumentation();
void indexingStarted();
void indexingFinished();
- void displayInstallationError(const QString &errorMessage);
- void qtDocumentationInstalled(bool newDocsInstalled);
+ void qtDocumentationInstalled();
+ void registerDocumentation(const QString &component,
+ const QString &absFileName);
+ void resetQtDocInfo(const QString &component);
void checkInitState();
-
- void updateBookmarkMenu();
- void showBookmark(QAction *action);
+ void documentationRemoved(const QString &namespaceName);
+ void documentationUpdated(const QString &namespaceName);
private:
bool initHelpDB();
@@ -132,14 +129,21 @@ private:
void setupFilterToolbar();
void setupAddressToolbar();
QMenu *toolBarMenu();
- QWidget *setupBookmarkWidget();
+ void hideContents();
+ void hideIndex();
+ void hideSearch();
- QHelpEngine *m_helpEngine;
+private slots:
+ void showBookmarksDockWidget();
+ void hideBookmarksDockWidget();
+
+private:
+ QWidget *m_bookmarkWidget;
+
+private:
CentralWidget *m_centralWidget;
IndexWindow *m_indexWindow;
ContentWindow *m_contentWindow;
- BookmarkWidget *m_bookmarkWidget;
- BookmarkManager *m_bookmarkManager;
QLineEdit *m_addressLineEdit;
QComboBox *m_filterCombo;
@@ -161,8 +165,6 @@ private:
QMenu *m_viewMenu;
QMenu *m_toolBarMenu;
- QMenu *m_bookmarkMenu;
- QAction *m_bookmarkMenuAction;
CmdLineParser *m_cmdLine;
diff --git a/tools/assistant/tools/assistant/preferencesdialog.cpp b/tools/assistant/tools/assistant/preferencesdialog.cpp
index ca12d8fbd4..0e1d719e5b 100644
--- a/tools/assistant/tools/assistant/preferencesdialog.cpp
+++ b/tools/assistant/tools/assistant/preferencesdialog.cpp
@@ -38,34 +38,36 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
#include "preferencesdialog.h"
+
+#include "centralwidget.h"
#include "filternamedialog.h"
-#include "installdialog.h"
#include "fontpanel.h"
-#include "centralwidget.h"
-#include "aboutdialog.h"
+#include "helpenginewrapper.h"
+#include "installdialog.h"
+#include "tracer.h"
-#include <QtAlgorithms>
+#include <QtCore/QtAlgorithms>
+#include <QtCore/QFileSystemWatcher>
-#include <QtGui/QHeaderView>
+#include <QtGui/QDesktopWidget>
#include <QtGui/QFileDialog>
-#include <QtGui/QMessageBox>
-#include <QtGui/QMenu>
#include <QtGui/QFontDatabase>
-#include <QtGui/QApplication>
-#include <QtGui/QDesktopWidget>
+#include <QtGui/QHeaderView>
+#include <QtGui/QMenu>
+#include <QtGui/QMessageBox>
#include <QtHelp/QHelpEngineCore>
QT_BEGIN_NAMESPACE
-PreferencesDialog::PreferencesDialog(QHelpEngineCore *helpEngine, QWidget *parent)
+PreferencesDialog::PreferencesDialog(QWidget *parent)
: QDialog(parent)
- , m_helpEngine(helpEngine)
, m_appFontChanged(false)
, m_browserFontChanged(false)
+ , helpEngine(HelpEngineWrapper::instance())
{
+ TRACE_OBJ
m_ui.setupUi(this);
connect(m_ui.buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
@@ -73,11 +75,8 @@ PreferencesDialog::PreferencesDialog(QHelpEngineCore *helpEngine, QWidget *paren
connect(m_ui.buttonBox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()),
this, SLOT(reject()));
- QLatin1String key("EnableFilterFunctionality");
- m_hideFiltersTab = !m_helpEngine->customValue(key, true).toBool();
-
- key = QLatin1String("EnableDocumentationManager");
- m_hideDocsTab = !m_helpEngine->customValue(key, true).toBool();
+ m_hideFiltersTab = !helpEngine.filterFunctionalityEnabled();
+ m_hideDocsTab = !helpEngine.documentationManagerEnabled();
if (!m_hideFiltersTab) {
m_ui.attributeWidget->header()->hide();
@@ -106,7 +105,7 @@ PreferencesDialog::PreferencesDialog(QHelpEngineCore *helpEngine, QWidget *paren
connect(m_ui.docRemoveButton, SIGNAL(clicked()), this,
SLOT(removeDocumentation()));
- m_docsBackup = m_helpEngine->registeredDocumentations();
+ m_docsBackup = helpEngine.registeredDocumentations();
m_ui.registeredDocsListWidget->addItems(m_docsBackup);
} else {
m_ui.tabWidget->removeTab(m_ui.tabWidget->indexOf(m_ui.docsTab));
@@ -114,67 +113,56 @@ PreferencesDialog::PreferencesDialog(QHelpEngineCore *helpEngine, QWidget *paren
updateFontSettingsPage();
updateOptionsPage();
+
+ if (helpEngine.usesAppFont())
+ setFont(helpEngine.appFont());
}
PreferencesDialog::~PreferencesDialog()
{
- QLatin1String key("");
+ TRACE_OBJ
if (m_appFontChanged) {
- key = QLatin1String("appFont");
- m_helpEngine->setCustomValue(key, m_appFontPanel->selectedFont());
-
- key = QLatin1String("useAppFont");
- m_helpEngine->setCustomValue(key, m_appFontPanel->isChecked());
-
- key = QLatin1String("appWritingSystem");
- m_helpEngine->setCustomValue(key, m_appFontPanel->writingSystem());
+ helpEngine.setAppFont(m_appFontPanel->selectedFont());
+ helpEngine.setUseAppFont(m_appFontPanel->isChecked());
+ helpEngine.setAppWritingSystem(m_appFontPanel->writingSystem());
+ emit updateApplicationFont();
}
if (m_browserFontChanged) {
- key = QLatin1String("browserFont");
- m_helpEngine->setCustomValue(key, m_browserFontPanel->selectedFont());
-
- key = QLatin1String("useBrowserFont");
- m_helpEngine->setCustomValue(key, m_browserFontPanel->isChecked());
-
- key = QLatin1String("browserWritingSystem");
- m_helpEngine->setCustomValue(key, m_browserFontPanel->writingSystem());
- }
-
- if (m_appFontChanged || m_browserFontChanged) {
- emit updateApplicationFont();
+ helpEngine.setBrowserFont(m_browserFontPanel->selectedFont());
+ helpEngine.setUseBrowserFont(m_browserFontPanel->isChecked());
+ helpEngine.setBrowserWritingSystem(m_browserFontPanel->writingSystem());
emit updateBrowserFont();
}
QString homePage = m_ui.homePageLineEdit->text();
if (homePage.isEmpty())
homePage = QLatin1String("help");
- m_helpEngine->setCustomValue(QLatin1String("homepage"), homePage);
+ helpEngine.setHomePage(homePage);
int option = m_ui.helpStartComboBox->currentIndex();
- m_helpEngine->setCustomValue(QLatin1String("StartOption"), option);
+ helpEngine.setStartOption(option);
}
void PreferencesDialog::showDialog()
{
+ TRACE_OBJ
if (exec() != Accepted)
m_appFontChanged = m_browserFontChanged = false;
}
void PreferencesDialog::updateFilterPage()
{
- if (!m_helpEngine)
- return;
-
+ TRACE_OBJ
m_ui.filterWidget->clear();
m_ui.attributeWidget->clear();
- QHelpEngineCore help(m_helpEngine->collectionFile(), 0);
- help.setupData();
m_filterMapBackup.clear();
- const QStringList filters = help.customFilters();
+ const QStringList &filters = helpEngine.customFilters();
foreach (const QString &filter, filters) {
- QStringList atts = help.filterAttributes(filter);
+ if (filter == HelpEngineWrapper::TrUnfiltered)
+ continue;
+ QStringList atts = helpEngine.filterAttributes(filter);
m_filterMapBackup.insert(filter, atts);
if (!m_filterMap.contains(filter))
m_filterMap.insert(filter, atts);
@@ -182,15 +170,16 @@ void PreferencesDialog::updateFilterPage()
m_ui.filterWidget->addItems(m_filterMap.keys());
- foreach (const QString &a, help.filterAttributes())
+ foreach (const QString &a, helpEngine.filterAttributes())
new QTreeWidgetItem(m_ui.attributeWidget, QStringList() << a);
- if (m_filterMap.keys().count())
+ if (!m_filterMap.keys().isEmpty())
m_ui.filterWidget->setCurrentRow(0);
}
void PreferencesDialog::updateAttributes(QListWidgetItem *item)
{
+ TRACE_OBJ
QStringList checkedList;
if (item)
checkedList = m_filterMap.value(item->text());
@@ -206,6 +195,7 @@ void PreferencesDialog::updateAttributes(QListWidgetItem *item)
void PreferencesDialog::updateFilterMap()
{
+ TRACE_OBJ
if (!m_ui.filterWidget->currentItem())
return;
QString filter = m_ui.filterWidget->currentItem()->text();
@@ -224,6 +214,7 @@ void PreferencesDialog::updateFilterMap()
void PreferencesDialog::addFilter()
{
+ TRACE_OBJ
FilterNameDialog dia(this);
if (dia.exec() == QDialog::Rejected)
return;
@@ -241,6 +232,7 @@ void PreferencesDialog::addFilter()
void PreferencesDialog::removeFilter()
{
+ TRACE_OBJ
QListWidgetItem *item =
m_ui.filterWidget ->takeItem(m_ui.filterWidget->currentRow());
if (!item)
@@ -255,6 +247,7 @@ void PreferencesDialog::removeFilter()
void PreferencesDialog::addDocumentationLocal()
{
+ TRACE_OBJ
const QStringList fileNames = QFileDialog::getOpenFileNames(this,
tr("Add Documentation"), QString(), tr("Qt Compressed Help Files (*.qch)"));
if (fileNames.isEmpty())
@@ -275,10 +268,11 @@ void PreferencesDialog::addDocumentationLocal()
continue;
}
- m_helpEngine->registerDocumentation(fileName);
- m_ui.registeredDocsListWidget->addItem(nameSpace);
- m_regDocs.append(nameSpace);
- m_unregDocs.removeAll(nameSpace);
+ if (helpEngine.registerDocumentation(fileName)) {
+ m_ui.registeredDocsListWidget->addItem(nameSpace);
+ m_regDocs.append(nameSpace);
+ m_unregDocs.removeAll(nameSpace);
+ }
}
if (!invalidFiles.isEmpty() || !alreadyRegistered.isEmpty()) {
@@ -307,6 +301,7 @@ void PreferencesDialog::addDocumentationLocal()
void PreferencesDialog::removeDocumentation()
{
+ TRACE_OBJ
bool foundBefore = false;
CentralWidget* widget = CentralWidget::instance();
QMap<int, QString> openedDocList = widget->currentSourceFileList();
@@ -338,6 +333,7 @@ void PreferencesDialog::removeDocumentation()
void PreferencesDialog::applyChanges()
{
+ TRACE_OBJ
bool filtersWereChanged = false;
if (!m_hideFiltersTab) {
if (m_filterMap.count() != m_filterMapBackup.count()) {
@@ -370,34 +366,28 @@ void PreferencesDialog::applyChanges()
if (filtersWereChanged) {
foreach (const QString &filter, m_removedFilters)
- m_helpEngine->removeCustomFilter(filter);
+ helpEngine.removeCustomFilter(filter);
QMapIterator<QString, QStringList> it(m_filterMap);
while (it.hasNext()) {
it.next();
- m_helpEngine->addCustomFilter(it.key(), it.value());
+ helpEngine.addCustomFilter(it.key(), it.value());
}
}
- qSort(m_TabsToClose);
- CentralWidget* widget = CentralWidget::instance();
- for (int i = m_TabsToClose.count(); --i >= 0;)
- widget->closeTabAt(m_TabsToClose.at(i));
- if (widget->availableHelpViewer()== 0)
- widget->setSource(QUrl(QLatin1String("about:blank")));
-
- if (m_unregDocs.count()) {
- foreach (const QString &doc, m_unregDocs)
- m_helpEngine->unregisterDocumentation(doc);
- }
+ CentralWidget::instance()->closeOrReloadTabs(m_TabsToClose, false);
+
+ foreach (const QString &doc, m_unregDocs)
+ helpEngine.unregisterDocumentation(doc);
- if (filtersWereChanged || m_regDocs.count() || m_unregDocs.count())
- m_helpEngine->setupData();
+ if (filtersWereChanged || !m_regDocs.isEmpty() || !m_unregDocs.isEmpty())
+ helpEngine.setupData();
accept();
}
void PreferencesDialog::updateFontSettingsPage()
{
+ TRACE_OBJ
m_browserFontPanel = new FontPanel(this);
m_browserFontPanel->setCheckable(true);
m_ui.stackedWidget_2->insertWidget(0, m_browserFontPanel);
@@ -411,31 +401,23 @@ void PreferencesDialog::updateFontSettingsPage()
const QString customSettings(tr("Use custom settings"));
m_appFontPanel->setTitle(customSettings);
- QLatin1String key = QLatin1String("appFont");
- QFont font = qVariantValue<QFont>(m_helpEngine->customValue(key));
+ QFont font = helpEngine.appFont();
m_appFontPanel->setSelectedFont(font);
- key = QLatin1String("appWritingSystem");
- QFontDatabase::WritingSystem system = static_cast<QFontDatabase::WritingSystem>
- (m_helpEngine->customValue(key).toInt());
+ QFontDatabase::WritingSystem system = helpEngine.appWritingSystem();
m_appFontPanel->setWritingSystem(system);
- key = QLatin1String("useAppFont");
- m_appFontPanel->setChecked(m_helpEngine->customValue(key).toBool());
+ m_appFontPanel->setChecked(helpEngine.usesAppFont());
m_browserFontPanel->setTitle(customSettings);
- key = QLatin1String("browserFont");
- font = qVariantValue<QFont>(m_helpEngine->customValue(key));
+ font = helpEngine.browserFont();
m_browserFontPanel->setSelectedFont(font);
- key = QLatin1String("browserWritingSystem");
- system = static_cast<QFontDatabase::WritingSystem>
- (m_helpEngine->customValue(key).toInt());
+ system = helpEngine.browserWritingSystem();
m_browserFontPanel->setWritingSystem(system);
- key = QLatin1String("useBrowserFont");
- m_browserFontPanel->setChecked(m_helpEngine->customValue(key).toBool());
+ m_browserFontPanel->setChecked(helpEngine.usesBrowserFont());
connect(m_appFontPanel, SIGNAL(toggled(bool)), this,
SLOT(appFontSettingToggled(bool)));
@@ -457,41 +439,38 @@ void PreferencesDialog::updateFontSettingsPage()
void PreferencesDialog::appFontSettingToggled(bool on)
{
+ TRACE_OBJ
Q_UNUSED(on)
m_appFontChanged = true;
}
void PreferencesDialog::appFontSettingChanged(int index)
{
+ TRACE_OBJ
Q_UNUSED(index)
m_appFontChanged = true;
}
void PreferencesDialog::browserFontSettingToggled(bool on)
{
+ TRACE_OBJ
Q_UNUSED(on)
m_browserFontChanged = true;
}
void PreferencesDialog::browserFontSettingChanged(int index)
{
+ TRACE_OBJ
Q_UNUSED(index)
m_browserFontChanged = true;
}
void PreferencesDialog::updateOptionsPage()
{
- QString homepage = m_helpEngine->customValue(QLatin1String("homepage"),
- QLatin1String("")).toString();
+ TRACE_OBJ
+ m_ui.homePageLineEdit->setText(helpEngine.homePage());
- if (homepage.isEmpty()) {
- homepage = m_helpEngine->customValue(QLatin1String("defaultHomepage"),
- QLatin1String("help")).toString();
- }
- m_ui.homePageLineEdit->setText(homepage);
-
- int option = m_helpEngine->customValue(QLatin1String("StartOption"),
- ShowLastPages).toInt();
+ int option = helpEngine.startOption();
m_ui.helpStartComboBox->setCurrentIndex(option);
connect(m_ui.blankPageButton, SIGNAL(clicked()), this, SLOT(setBlankPage()));
@@ -501,11 +480,13 @@ void PreferencesDialog::updateOptionsPage()
void PreferencesDialog::setBlankPage()
{
+ TRACE_OBJ
m_ui.homePageLineEdit->setText(QLatin1String("about:blank"));
}
void PreferencesDialog::setCurrentPage()
{
+ TRACE_OBJ
QString homepage = CentralWidget::instance()->currentSource().toString();
if (homepage.isEmpty())
homepage = QLatin1String("help");
@@ -515,9 +496,8 @@ void PreferencesDialog::setCurrentPage()
void PreferencesDialog::setDefaultPage()
{
- QString homepage = m_helpEngine->customValue(QLatin1String("defaultHomepage"),
- QLatin1String("help")).toString();
- m_ui.homePageLineEdit->setText(homepage);
+ TRACE_OBJ
+ m_ui.homePageLineEdit->setText(helpEngine.defaultHomePage());
}
QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/preferencesdialog.h b/tools/assistant/tools/assistant/preferencesdialog.h
index 9ad6b6a70c..2894494017 100644
--- a/tools/assistant/tools/assistant/preferencesdialog.h
+++ b/tools/assistant/tools/assistant/preferencesdialog.h
@@ -48,20 +48,15 @@
QT_BEGIN_NAMESPACE
class FontPanel;
-class QHelpEngineCore;
-
-enum {
- ShowHomePage = 0,
- ShowBlankPage = 1,
- ShowLastPages = 2
-};
+class HelpEngineWrapper;
+class QFileSystemWatcher;
class PreferencesDialog : public QDialog
{
Q_OBJECT
public:
- PreferencesDialog(QHelpEngineCore *helpEngine, QWidget *parent = 0);
+ PreferencesDialog(QWidget *parent = 0);
~PreferencesDialog();
void showDialog();
@@ -93,7 +88,6 @@ private:
void updateOptionsPage();
Ui::PreferencesDialogClass m_ui;
- QHelpEngineCore *m_helpEngine;
bool m_hideFiltersTab;
bool m_hideDocsTab;
QMap<QString, QStringList> m_filterMapBackup;
@@ -107,6 +101,7 @@ private:
FontPanel *m_browserFontPanel;
bool m_appFontChanged;
bool m_browserFontChanged;
+ HelpEngineWrapper &helpEngine;
};
QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/qtdocinstaller.cpp b/tools/assistant/tools/assistant/qtdocinstaller.cpp
index 652f630b32..5a501bff5b 100644
--- a/tools/assistant/tools/assistant/qtdocinstaller.cpp
+++ b/tools/assistant/tools/assistant/qtdocinstaller.cpp
@@ -38,23 +38,27 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include "tracer.h"
#include <QtCore/QDir>
#include <QtCore/QLibraryInfo>
#include <QtCore/QDateTime>
+#include <QtCore/QFileSystemWatcher>
#include <QtHelp/QHelpEngineCore>
+#include "helpenginewrapper.h"
#include "qtdocinstaller.h"
QT_BEGIN_NAMESPACE
-QtDocInstaller::QtDocInstaller(const QString &collectionFile)
+QtDocInstaller::QtDocInstaller(const QList<DocInfo> &docInfos)
+ : m_abort(false), m_docInfos(docInfos)
{
- m_abort = false;
- m_collectionFile = collectionFile;
+ TRACE_OBJ
}
QtDocInstaller::~QtDocInstaller()
{
+ TRACE_OBJ
if (!isRunning())
return;
m_mutex.lock();
@@ -65,86 +69,59 @@ QtDocInstaller::~QtDocInstaller()
void QtDocInstaller::installDocs()
{
+ TRACE_OBJ
start(LowPriority);
}
void QtDocInstaller::run()
{
- QHelpEngineCore *helpEngine = new QHelpEngineCore(m_collectionFile);
- helpEngine->setupData();
- bool changes = false;
-
- QStringList docs;
- docs << QLatin1String("assistant")
- << QLatin1String("designer")
- << QLatin1String("linguist")
- << QLatin1String("qmake")
- << QLatin1String("qt");
+ TRACE_OBJ
+ m_qchDir = QLibraryInfo::location(QLibraryInfo::DocumentationPath)
+ + QDir::separator() + QLatin1String("qch");
+ m_qchFiles = m_qchDir.entryList(QStringList() << QLatin1String("*.qch"));
- foreach (const QString &doc, docs) {
- changes |= installDoc(doc, helpEngine);
+ bool changes = false;
+ foreach (const DocInfo &docInfo, m_docInfos) {
+ changes |= installDoc(docInfo);
m_mutex.lock();
if (m_abort) {
- delete helpEngine;
m_mutex.unlock();
return;
}
m_mutex.unlock();
}
- delete helpEngine;
emit docsInstalled(changes);
}
-bool QtDocInstaller::installDoc(const QString &name, QHelpEngineCore *helpEngine)
+bool QtDocInstaller::installDoc(const DocInfo &docInfo)
{
- QString versionKey = QString(QLatin1String("qtVersion%1$$$%2")).
- arg(QLatin1String(QT_VERSION_STR)).arg(name);
-
- QString info = helpEngine->customValue(versionKey, QString()).toString();
- QStringList lst = info.split(QLatin1String("|"));
-
+ TRACE_OBJ
+ const QString &component = docInfo.first;
+ const QStringList &info = docInfo.second;
QDateTime dt;
- if (lst.count() && !lst.first().isEmpty())
- dt = QDateTime::fromString(lst.first(), Qt::ISODate);
+ if (!info.isEmpty() && !info.first().isEmpty())
+ dt = QDateTime::fromString(info.first(), Qt::ISODate);
QString qchFile;
- if (lst.count() == 2)
- qchFile = lst.last();
-
- QDir dir(QLibraryInfo::location(QLibraryInfo::DocumentationPath)
- + QDir::separator() + QLatin1String("qch"));
+ if (info.count() == 2)
+ qchFile = info.last();
- const QStringList files = dir.entryList(QStringList() << QLatin1String("*.qch"));
- if (files.isEmpty()) {
- helpEngine->setCustomValue(versionKey, QDateTime().toString(Qt::ISODate)
- + QLatin1String("|"));
+ if (m_qchFiles.isEmpty()) {
+ emit qchFileNotFound(component);
return false;
}
- foreach (const QString &f, files) {
- if (f.startsWith(name)) {
- QFileInfo fi(dir.absolutePath() + QDir::separator() + f);
- if (dt.isValid() && fi.lastModified().toString(Qt::ISODate) == dt.toString(Qt::ISODate)
+ foreach (const QString &f, m_qchFiles) {
+ if (f.startsWith(component)) {
+ QFileInfo fi(m_qchDir.absolutePath() + QDir::separator() + f);
+ if (dt.isValid() && fi.lastModified().toTime_t() == dt.toTime_t()
&& qchFile == fi.absoluteFilePath())
return false;
-
- QString namespaceName = QHelpEngineCore::namespaceName(fi.absoluteFilePath());
- if (namespaceName.isEmpty())
- continue;
-
- if (helpEngine->registeredDocumentations().contains(namespaceName))
- helpEngine->unregisterDocumentation(namespaceName);
-
- if (!helpEngine->registerDocumentation(fi.absoluteFilePath())) {
- emit errorMessage(
- tr("The file %1 could not be registered successfully!\n\nReason: %2")
- .arg(fi.absoluteFilePath()).arg(helpEngine->error()));
- }
-
- helpEngine->setCustomValue(versionKey, fi.lastModified().toString(Qt::ISODate)
- + QLatin1String("|") + fi.absoluteFilePath());
+ emit registerDocumentation(component, fi.absoluteFilePath());
return true;
}
}
+
+ emit qchFileNotFound(component);
return false;
}
diff --git a/tools/assistant/tools/assistant/qtdocinstaller.h b/tools/assistant/tools/assistant/qtdocinstaller.h
index 05606f9c42..92a707b7b5 100644
--- a/tools/assistant/tools/assistant/qtdocinstaller.h
+++ b/tools/assistant/tools/assistant/qtdocinstaller.h
@@ -42,34 +42,41 @@
#ifndef QTDOCINSTALLER
#define QTDOCINSTALLER
-#include <QtCore/QThread>
+#include <QtCore/QDir>
#include <QtCore/QMutex>
+#include <QtCore/QPair>
+#include <QtCore/QStringList>
+#include <QtCore/QThread>
QT_BEGIN_NAMESPACE
-class QHelpEngineCore;
+class HelpEngineWrapper;
class QtDocInstaller : public QThread
{
Q_OBJECT
public:
- QtDocInstaller(const QString &collectionFile);
+ typedef QPair<QString, QStringList> DocInfo;
+ QtDocInstaller(const QList<DocInfo> &docInfos);
~QtDocInstaller();
void installDocs();
signals:
- void errorMessage(const QString &msg);
+ void qchFileNotFound(const QString &component);
+ void registerDocumentation(const QString &component,
+ const QString &absFileName);
void docsInstalled(bool newDocsInstalled);
private:
void run();
- bool installDoc(const QString &name,
- QHelpEngineCore *helpEngine);
+ bool installDoc(const DocInfo &docInfo);
bool m_abort;
- QString m_collectionFile;
QMutex m_mutex;
+ QStringList m_qchFiles;
+ QDir m_qchDir;
+ QList<DocInfo> m_docInfos;
};
QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/remotecontrol.cpp b/tools/assistant/tools/assistant/remotecontrol.cpp
index 5fa74324f0..5ecdd693f1 100644
--- a/tools/assistant/tools/assistant/remotecontrol.cpp
+++ b/tools/assistant/tools/assistant/remotecontrol.cpp
@@ -38,12 +38,16 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include "tracer.h"
#include "remotecontrol.h"
#include "mainwindow.h"
#include "centralwidget.h"
+#include "helpenginewrapper.h"
#include <QtCore/QFile>
+#include <QtCore/QFileInfo>
+#include <QtCore/QFileSystemWatcher>
#include <QtCore/QThread>
#include <QtCore/QTextStream>
#include <QtCore/QSocketNotifier>
@@ -65,16 +69,19 @@ QT_BEGIN_NAMESPACE
StdInListenerWin::StdInListenerWin(QObject *parent)
: QThread(parent)
{
+ TRACE_OBJ
}
StdInListenerWin::~StdInListenerWin()
{
+ TRACE_OBJ
terminate();
wait();
}
void StdInListenerWin::run()
{
+ TRACE_OBJ
bool ok = true;
char chBuf[4096];
DWORD dwRead;
@@ -97,23 +104,24 @@ void StdInListenerWin::run()
#endif
while (ok) {
- ok = ReadFile(hStdinDup, chBuf, 4096, &dwRead, NULL);
+ ok = ReadFile(hStdinDup, chBuf, sizeof(chBuf), &dwRead, NULL);
if (ok && dwRead != 0)
- emit receivedCommand(QString::fromLocal8Bit(chBuf));
+ emit receivedCommand(QString::fromLocal8Bit(chBuf, dwRead));
}
}
#endif
-RemoteControl::RemoteControl(MainWindow *mainWindow, QHelpEngine *helpEngine)
+RemoteControl::RemoteControl(MainWindow *mainWindow)
: QObject(mainWindow)
, m_mainWindow(mainWindow)
- , m_helpEngine(helpEngine)
, m_debug(false)
, m_caching(true)
, m_syncContents(false)
- , m_expandTOC(-3)
+ , m_expandTOC(-2)
+ , helpEngine(HelpEngineWrapper::instance())
{
+ TRACE_OBJ
connect(m_mainWindow, SIGNAL(initDone()), this, SLOT(applyCache()));
#ifdef Q_OS_WIN
StdInListenerWin *l = new StdInListenerWin(this);
@@ -130,6 +138,7 @@ RemoteControl::RemoteControl(MainWindow *mainWindow, QHelpEngine *helpEngine)
void RemoteControl::receivedData()
{
+ TRACE_OBJ
QByteArray ba;
while (true) {
char c = getc(stdin);
@@ -145,135 +154,204 @@ void RemoteControl::receivedData()
void RemoteControl::handleCommandString(const QString &cmdString)
{
+ TRACE_OBJ
QStringList cmds = cmdString.split(QLatin1Char(';'));
QStringList::const_iterator it = cmds.constBegin();
- QString cmdLine, cmd, arg;
while (it != cmds.constEnd()) {
- cmdLine = (*it).trimmed();
- cmd = cmdLine;
- arg.clear();
- int i = cmdLine.indexOf(QLatin1Char(' '));
- if (i > 0) {
- cmd = cmdLine.left(i);
- arg = cmdLine.mid(i+1);
- }
- cmd = cmd.toLower();
+ QString cmd, arg;
+ splitInputString(*it, cmd, arg);
if (m_debug)
QMessageBox::information(0, tr("Debugging Remote Control"),
tr("Received Command: %1 %2").arg(cmd).arg(arg));
- if (cmd == QLatin1String("debug")) {
- if (arg == QLatin1String("on"))
- m_debug = true;
- else
- m_debug = false;
- } else if (cmd == QLatin1String("show")) {
- if (arg.toLower() == QLatin1String("contents")) {
- m_mainWindow->showContents();
- } else if (arg.toLower() == QLatin1String("index")) {
- m_mainWindow->showIndex();
- } else if (arg.toLower() == QLatin1String("bookmarks")) {
- m_mainWindow->showBookmarks();
- } else if (arg.toLower() == QLatin1String("search")) {
- m_mainWindow->showSearch();
- }
- } else if (cmd == QLatin1String("hide")) {
- if (arg.toLower() == QLatin1String("contents")) {
- m_mainWindow->hideContents();
- } else if (arg.toLower() == QLatin1String("index")) {
- m_mainWindow->hideIndex();
- } else if (arg.toLower() == QLatin1String("bookmarks")) {
- m_mainWindow->hideBookmarks();
- } else if (arg.toLower() == QLatin1String("search")) {
- m_mainWindow->hideSearch();
- }
- } else if (cmd == QLatin1String("setsource")) {
- QUrl url(arg);
- if (url.isValid()) {
- if (url.isRelative())
- url = CentralWidget::instance()->currentSource().resolved(url);
- if (m_caching) {
- clearCache();
- m_setSource = url;
- } else {
- CentralWidget::instance()->setSource(url);
- }
- }
- } else if (cmd == QLatin1String("synccontents")) {
- if (m_caching)
- m_syncContents = true;
- else
- m_mainWindow->syncContents();
- } else if (cmd == QLatin1String("activatekeyword")) {
- if (m_caching) {
- clearCache();
- m_activateKeyword = arg;
- } else {
- m_mainWindow->setIndexString(arg);
- if (!arg.isEmpty())
- m_helpEngine->indexWidget()->activateCurrentItem();
- }
- } else if (cmd == QLatin1String("activateidentifier")) {
- if (m_caching) {
- clearCache();
- m_activateIdentifier = arg;
- } else {
- QMap<QString, QUrl> links =
- m_helpEngine->linksForIdentifier(arg);
- if (links.count())
- CentralWidget::instance()->setSource(links.constBegin().value());
- }
- } else if (cmd == QLatin1String("expandtoc")) {
- bool ok = false;
- int depth = -1;
- if (!arg.isEmpty())
- depth = arg.toInt(&ok);
- if (!ok)
- depth = -1;
-
- if (m_caching)
- m_expandTOC = depth;
- else
- m_mainWindow->expandTOC(depth);
- } else if (cmd == QLatin1String("setcurrentfilter")) {
- if (!m_helpEngine->customFilters().contains(arg))
- return;
- if (m_caching) {
- clearCache();
- m_currentFilter = arg;
- } else {
- m_helpEngine->setCurrentFilter(arg);
- }
- } else {
+ if (cmd == QLatin1String("debug"))
+ handleDebugCommand(arg);
+ else if (cmd == QLatin1String("show"))
+ handleShowOrHideCommand(arg, true);
+ else if (cmd == QLatin1String("hide"))
+ handleShowOrHideCommand(arg, false);
+ else if (cmd == QLatin1String("setsource"))
+ handleSetSourceCommand(arg);
+ else if (cmd == QLatin1String("synccontents"))
+ handleSyncContentsCommand();
+ else if (cmd == QLatin1String("activatekeyword"))
+ handleActivateKeywordCommand(arg);
+ else if (cmd == QLatin1String("activateidentifier"))
+ handleActivateIdentifierCommand(arg);
+ else if (cmd == QLatin1String("expandtoc"))
+ handleExpandTocCommand(arg);
+ else if (cmd == QLatin1String("setcurrentfilter"))
+ handleSetCurrentFilterCommand(arg);
+ else if (cmd == QLatin1String("register"))
+ handleRegisterCommand(arg);
+ else if (cmd == QLatin1String("unregister"))
+ handleUnregisterCommand(arg);
+ else
return;
- }
+
++it;
}
m_mainWindow->raise();
m_mainWindow->activateWindow();
}
+void RemoteControl::splitInputString(const QString &input, QString &cmd,
+ QString &arg)
+{
+ TRACE_OBJ
+ QString cmdLine = input.trimmed();
+ int i = cmdLine.indexOf(QLatin1Char(' '));
+ cmd = cmdLine.left(i);
+ arg = cmdLine.mid(i+1);
+ cmd = cmd.toLower();
+}
+
+void RemoteControl::handleDebugCommand(const QString &arg)
+{
+ TRACE_OBJ
+ m_debug = arg == QLatin1String("on");
+}
+
+void RemoteControl::handleShowOrHideCommand(const QString &arg, bool show)
+{
+ TRACE_OBJ
+ if (arg.toLower() == QLatin1String("contents"))
+ m_mainWindow->setContentsVisible(show);
+ else if (arg.toLower() == QLatin1String("index"))
+ m_mainWindow->setIndexVisible(show);
+ else if (arg.toLower() == QLatin1String("bookmarks"))
+ m_mainWindow->setBookmarksVisible(show);
+ else if (arg.toLower() == QLatin1String("search"))
+ m_mainWindow->setSearchVisible(show);
+}
+
+void RemoteControl::handleSetSourceCommand(const QString &arg)
+{
+ TRACE_OBJ
+ QUrl url(arg);
+ if (url.isValid()) {
+ if (url.isRelative())
+ url = CentralWidget::instance()->currentSource().resolved(url);
+ if (m_caching) {
+ clearCache();
+ m_setSource = url;
+ } else {
+ CentralWidget::instance()->setSource(url);
+ }
+ }
+}
+
+void RemoteControl::handleSyncContentsCommand()
+{
+ TRACE_OBJ
+ if (m_caching)
+ m_syncContents = true;
+ else
+ m_mainWindow->syncContents();
+}
+
+void RemoteControl::handleActivateKeywordCommand(const QString &arg)
+{
+ TRACE_OBJ
+ if (m_caching) {
+ clearCache();
+ m_activateKeyword = arg;
+ } else {
+ m_mainWindow->setIndexString(arg);
+ if (!arg.isEmpty())
+ helpEngine.indexWidget()->activateCurrentItem();
+ }
+}
+
+void RemoteControl::handleActivateIdentifierCommand(const QString &arg)
+{
+ TRACE_OBJ
+ if (m_caching) {
+ clearCache();
+ m_activateIdentifier = arg;
+ } else {
+ const QMap<QString, QUrl> &links = helpEngine.linksForIdentifier(arg);
+ if (!links.isEmpty())
+ CentralWidget::instance()->setSource(links.constBegin().value());
+ }
+}
+
+void RemoteControl::handleExpandTocCommand(const QString &arg)
+{
+ TRACE_OBJ
+ bool ok = false;
+ int depth = -2;
+ if (!arg.isEmpty())
+ depth = arg.toInt(&ok);
+ if (!ok || depth < -2)
+ depth = -2;
+
+ if (m_caching)
+ m_expandTOC = depth;
+ else if (depth != -2)
+ m_mainWindow->expandTOC(depth);
+}
+
+void RemoteControl::handleSetCurrentFilterCommand(const QString &arg)
+{
+ TRACE_OBJ
+ if (helpEngine.customFilters().contains(arg)) {
+ if (m_caching) {
+ clearCache();
+ m_currentFilter = arg;
+ } else {
+ helpEngine.setCurrentFilter(arg);
+ }
+ }
+}
+
+void RemoteControl::handleRegisterCommand(const QString &arg)
+{
+ TRACE_OBJ
+ const QString &absFileName = QFileInfo(arg).absoluteFilePath();
+ if (helpEngine.registeredDocumentations().
+ contains(QHelpEngineCore::namespaceName(absFileName)))
+ return;
+ if (helpEngine.registerDocumentation(absFileName))
+ helpEngine.setupData();
+}
+
+void RemoteControl::handleUnregisterCommand(const QString &arg)
+{
+ TRACE_OBJ
+ const QString &absFileName = QFileInfo(arg).absoluteFilePath();
+ const QString &ns = QHelpEngineCore::namespaceName(absFileName);
+ if (helpEngine.registeredDocumentations().contains(ns)) {
+ CentralWidget* widget = CentralWidget::instance();
+ widget->closeOrReloadTabs(widget->currentSourceFileList().keys(ns), false);
+ if (helpEngine.unregisterDocumentation(ns))
+ helpEngine.setupData();
+ }
+}
+
void RemoteControl::applyCache()
{
+ TRACE_OBJ
if (m_setSource.isValid()) {
CentralWidget::instance()->setSource(m_setSource);
} else if (!m_activateKeyword.isEmpty()) {
m_mainWindow->setIndexString(m_activateKeyword);
- m_helpEngine->indexWidget()->activateCurrentItem();
+ helpEngine.indexWidget()->activateCurrentItem();
} else if (!m_activateIdentifier.isEmpty()) {
QMap<QString, QUrl> links =
- m_helpEngine->linksForIdentifier(m_activateIdentifier);
- if (links.count())
+ helpEngine.linksForIdentifier(m_activateIdentifier);
+ if (!links.isEmpty())
CentralWidget::instance()->setSource(links.constBegin().value());
} else if (!m_currentFilter.isEmpty()) {
- m_helpEngine->setCurrentFilter(m_currentFilter);
+ helpEngine.setCurrentFilter(m_currentFilter);
}
if (m_syncContents)
m_mainWindow->syncContents();
- if (m_expandTOC != -3)
+ Q_ASSERT(m_expandTOC >= -2);
+ if (m_expandTOC != -2)
m_mainWindow->expandTOC(m_expandTOC);
m_caching = false;
@@ -281,6 +359,7 @@ void RemoteControl::applyCache()
void RemoteControl::clearCache()
{
+ TRACE_OBJ
m_currentFilter.clear();
m_setSource.clear();
m_syncContents = false;
diff --git a/tools/assistant/tools/assistant/remotecontrol.h b/tools/assistant/tools/assistant/remotecontrol.h
index b888b40e88..0777878dd2 100644
--- a/tools/assistant/tools/assistant/remotecontrol.h
+++ b/tools/assistant/tools/assistant/remotecontrol.h
@@ -43,19 +43,20 @@
#define REMOTECONTROL_H
#include <QtCore/QObject>
+#include <QtCore/QString>
#include <QtCore/QUrl>
QT_BEGIN_NAMESPACE
+class HelpEngineWrapper;
class MainWindow;
-class QHelpEngine;
class RemoteControl : public QObject
{
Q_OBJECT
public:
- RemoteControl(MainWindow *mainWindow, QHelpEngine *helpEngine);
+ RemoteControl(MainWindow *mainWindow);
private slots:
void receivedData();
@@ -64,10 +65,20 @@ private slots:
private:
void clearCache();
+ void splitInputString(const QString &input, QString &cmd, QString &arg);
+ void handleDebugCommand(const QString &arg);
+ void handleShowOrHideCommand(const QString &arg, bool show);
+ void handleSetSourceCommand(const QString &arg);
+ void handleSyncContentsCommand();
+ void handleActivateKeywordCommand(const QString &arg);
+ void handleActivateIdentifierCommand(const QString &arg);
+ void handleExpandTocCommand(const QString &arg);
+ void handleSetCurrentFilterCommand(const QString &arg);
+ void handleRegisterCommand(const QString &arg);
+ void handleUnregisterCommand(const QString &arg);
private:
MainWindow *m_mainWindow;
- QHelpEngine *m_helpEngine;
bool m_debug;
bool m_caching;
@@ -77,6 +88,7 @@ private:
QString m_activateIdentifier;
int m_expandTOC;
QString m_currentFilter;
+ HelpEngineWrapper &helpEngine;
};
QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/searchwidget.cpp b/tools/assistant/tools/assistant/searchwidget.cpp
index ad24231fa4..d83790d67f 100644
--- a/tools/assistant/tools/assistant/searchwidget.cpp
+++ b/tools/assistant/tools/assistant/searchwidget.cpp
@@ -38,6 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include "tracer.h"
#include "mainwindow.h"
#include "searchwidget.h"
@@ -65,6 +66,7 @@ SearchWidget::SearchWidget(QHelpSearchEngine *engine, QWidget *parent)
, attached(false)
, searchEngine(engine)
{
+ TRACE_OBJ
QVBoxLayout *vLayout = new QVBoxLayout(this);
resultWidget = searchEngine->resultWidget();
@@ -91,11 +93,13 @@ SearchWidget::SearchWidget(QHelpSearchEngine *engine, QWidget *parent)
SearchWidget::~SearchWidget()
{
+ TRACE_OBJ
// nothing todo
}
void SearchWidget::zoomIn()
{
+ TRACE_OBJ
QTextBrowser* browser = qFindChild<QTextBrowser*>(resultWidget);
if (browser && zoomCount != 10) {
zoomCount++;
@@ -105,6 +109,7 @@ void SearchWidget::zoomIn()
void SearchWidget::zoomOut()
{
+ TRACE_OBJ
QTextBrowser* browser = qFindChild<QTextBrowser*>(resultWidget);
if (browser && zoomCount != -5) {
zoomCount--;
@@ -114,6 +119,7 @@ void SearchWidget::zoomOut()
void SearchWidget::resetZoom()
{
+ TRACE_OBJ
if (zoomCount == 0)
return;
@@ -126,33 +132,39 @@ void SearchWidget::resetZoom()
bool SearchWidget::isAttached() const
{
+ TRACE_OBJ
return attached;
}
void SearchWidget::setAttached(bool state)
{
+ TRACE_OBJ
attached = state;
}
void SearchWidget::search() const
{
+ TRACE_OBJ
QList<QHelpSearchQuery> query = searchEngine->queryWidget()->query();
searchEngine->search(query);
}
void SearchWidget::searchingStarted()
{
+ TRACE_OBJ
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
}
void SearchWidget::searchingFinished(int hits)
{
+ TRACE_OBJ
Q_UNUSED(hits)
qApp->restoreOverrideCursor();
}
bool SearchWidget::eventFilter(QObject* o, QEvent *e)
{
+ TRACE_OBJ
QTextBrowser* browser = qFindChild<QTextBrowser*>(resultWidget);
if (browser && o == browser->viewport()
&& e->type() == QEvent::MouseButtonRelease){
@@ -171,6 +183,7 @@ bool SearchWidget::eventFilter(QObject* o, QEvent *e)
void SearchWidget::keyPressEvent(QKeyEvent *keyEvent)
{
+ TRACE_OBJ
if (keyEvent->key() == Qt::Key_Escape)
MainWindow::activateCurrentBrowser();
else
@@ -179,6 +192,7 @@ void SearchWidget::keyPressEvent(QKeyEvent *keyEvent)
void SearchWidget::contextMenuEvent(QContextMenuEvent *contextMenuEvent)
{
+ TRACE_OBJ
QMenu menu;
QPoint point = contextMenuEvent->globalPos();
diff --git a/tools/assistant/tools/assistant/topicchooser.cpp b/tools/assistant/tools/assistant/topicchooser.cpp
index 5c04244c61..262fea839b 100644
--- a/tools/assistant/tools/assistant/topicchooser.cpp
+++ b/tools/assistant/tools/assistant/topicchooser.cpp
@@ -38,9 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
-#include <QtCore/QMap>
-#include <QtCore/QUrl>
+#include "tracer.h"
#include "topicchooser.h"
@@ -50,37 +48,40 @@ TopicChooser::TopicChooser(QWidget *parent, const QString &keyword,
const QMap<QString, QUrl> &links)
: QDialog(parent)
{
+ TRACE_OBJ
ui.setupUi(this);
ui.label->setText(tr("Choose a topic for <b>%1</b>:").arg(keyword));
- m_links = links;
- QMap<QString, QUrl>::const_iterator it = m_links.constBegin();
- for (; it != m_links.constEnd(); ++it)
+ QMap<QString, QUrl>::const_iterator it = links.constBegin();
+ for (; it != links.constEnd(); ++it) {
ui.listWidget->addItem(it.key());
+ m_links.append(it.value());
+ }
if (ui.listWidget->count() != 0)
ui.listWidget->setCurrentRow(0);
ui.listWidget->setFocus();
- connect(ui.buttonDisplay, SIGNAL(clicked()),
- this, SLOT(accept()));
- connect(ui.buttonCancel, SIGNAL(clicked()),
- this, SLOT(reject()));
- connect(ui.listWidget, SIGNAL(itemActivated(QListWidgetItem*)),
- this, SLOT(accept()));
+ connect(ui.buttonDisplay, SIGNAL(clicked()), this, SLOT(accept()));
+ connect(ui.buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
+ connect(ui.listWidget, SIGNAL(itemActivated(QListWidgetItem*)), this,
+ SLOT(accept()));
}
QUrl TopicChooser::link() const
{
+ TRACE_OBJ
QListWidgetItem *item = ui.listWidget->currentItem();
if (!item)
return QUrl();
QString title = item->text();
- if (title.isEmpty() || !m_links.contains(title))
+ if (title.isEmpty())
return QUrl();
- return m_links.value(title);
+ const int row = ui.listWidget->row(item);
+ Q_ASSERT(row < m_links.count());
+ return m_links.at(row);
}
QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/topicchooser.h b/tools/assistant/tools/assistant/topicchooser.h
index 4dba726548..4113ceea6e 100644
--- a/tools/assistant/tools/assistant/topicchooser.h
+++ b/tools/assistant/tools/assistant/topicchooser.h
@@ -44,9 +44,10 @@
#include "ui_topicchooser.h"
-#include <QUrl>
-#include <QMap>
-#include <QString>
+#include <QtCore/QList>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+#include <QtCore/QUrl>
#include <QtGui/QDialog>
@@ -64,7 +65,7 @@ public:
private:
Ui::TopicChooser ui;
- QMap<QString, QUrl> m_links;
+ QList<QUrl> m_links;
};
QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/tracer.h b/tools/assistant/tools/assistant/tracer.h
new file mode 100644
index 0000000000..66d450af7d
--- /dev/null
+++ b/tools/assistant/tools/assistant/tracer.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TRACER_H
+#define TRACER_H
+
+#include <QtCore/QtGlobal>
+
+QT_BEGIN_NAMESPACE
+
+class Tracer
+{
+public:
+ Tracer(const char *func) : m_func(func)
+ {
+ qDebug("Entering function %s.", m_func);
+ }
+
+ ~Tracer()
+ {
+ qDebug("Leaving function %s.", m_func);
+ }
+
+private:
+ const char * const m_func;
+};
+
+QT_END_NAMESPACE
+
+// #define TRACING_REQUESTED
+#ifdef TRACING_REQUESTED
+#define TRACE_OBJ Tracer traceObj__(Q_FUNC_INFO);
+#else
+#define TRACE_OBJ
+#endif
+
+#endif // TRACER_H
diff --git a/tools/assistant/tools/assistant/xbelsupport.cpp b/tools/assistant/tools/assistant/xbelsupport.cpp
new file mode 100644
index 0000000000..ce49230091
--- /dev/null
+++ b/tools/assistant/tools/assistant/xbelsupport.cpp
@@ -0,0 +1,233 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "tracer.h"
+
+#include "xbelsupport.h"
+
+#include "bookmarkitem.h"
+#include "bookmarkmodel.h"
+
+#include <QtCore/QDate>
+#include <QtCore/QModelIndex>
+
+QT_BEGIN_NAMESPACE
+
+struct Bookmark {
+ QString title;
+ QString url;
+ bool folded;
+};
+
+XbelWriter::XbelWriter(BookmarkModel *model)
+ : QXmlStreamWriter()
+ , bookmarkModel(model)
+{
+ TRACE_OBJ
+ setAutoFormatting(true);
+}
+
+void XbelWriter::writeToFile(QIODevice *device)
+{
+ TRACE_OBJ
+ setDevice(device);
+
+ writeStartDocument();
+ writeDTD(QLatin1String("<!DOCTYPE xbel>"));
+ writeStartElement(QLatin1String("xbel"));
+ writeAttribute(QLatin1String("version"), QLatin1String("1.0"));
+
+ const QModelIndex &root = bookmarkModel->index(0,0, QModelIndex());
+ for (int i = 0; i < bookmarkModel->rowCount(root); ++i)
+ writeData(bookmarkModel->index(i, 0, root));
+ writeEndDocument();
+}
+
+void XbelWriter::writeData(const QModelIndex &index)
+{
+ TRACE_OBJ
+ if (index.isValid()) {
+ Bookmark entry;
+ entry.title = index.data().toString();
+ entry.url = index.data(UserRoleUrl).toString();
+
+ if (index.data(UserRoleFolder).toBool()) {
+ writeStartElement(QLatin1String("folder"));
+ entry.folded = !index.data(UserRoleExpanded).toBool();
+ writeAttribute(QLatin1String("folded"), entry.folded
+ ? QLatin1String("yes") : QLatin1String("no"));
+ writeTextElement(QLatin1String("title"), entry.title);
+
+ for (int i = 0; i < bookmarkModel->rowCount(index); ++i)
+ writeData(bookmarkModel->index(i, 0 , index));
+ writeEndElement();
+ } else {
+ writeStartElement(QLatin1String("bookmark"));
+ writeAttribute(QLatin1String("href"), entry.url);
+ writeTextElement(QLatin1String("title"), entry.title);
+ writeEndElement();
+ }
+ }
+}
+
+// -- XbelReader
+
+XbelReader::XbelReader(BookmarkModel *model)
+ : QXmlStreamReader()
+ , bookmarkModel(model)
+{
+ TRACE_OBJ
+}
+
+bool XbelReader::readFromFile(QIODevice *device)
+{
+ TRACE_OBJ
+ setDevice(device);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isStartElement()) {
+ if (name() == QLatin1String("xbel")
+ && attributes().value(QLatin1String("version"))
+ == QLatin1String("1.0")) {
+ const QModelIndex &root = bookmarkModel->index(0,0, QModelIndex());
+ parents.append(bookmarkModel->addItem(root, true));
+ readXBEL();
+ bookmarkModel->setData(parents.first(),
+ QDate::currentDate().toString(Qt::ISODate), Qt::EditRole);
+ } else {
+ raiseError(QLatin1String("The file is not an XBEL version 1.0 file."));
+ }
+ }
+ }
+
+ return !error();
+}
+
+void XbelReader::readXBEL()
+{
+ TRACE_OBJ
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ if (name() == QLatin1String("folder"))
+ readFolder();
+ else if (name() == QLatin1String("bookmark"))
+ readBookmark();
+ else
+ readUnknownElement();
+ }
+ }
+}
+
+void XbelReader::readFolder()
+{
+ TRACE_OBJ
+ parents.append(bookmarkModel->addItem(parents.last(), true));
+ bookmarkModel->setData(parents.last(),
+ attributes().value(QLatin1String("folded")) == QLatin1String("no"),
+ UserRoleExpanded);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ if (name() == QLatin1String("title")) {
+ bookmarkModel->setData(parents.last(), readElementText(),
+ Qt::EditRole);
+ } else if (name() == QLatin1String("folder"))
+ readFolder();
+ else if (name() == QLatin1String("bookmark"))
+ readBookmark();
+ else
+ readUnknownElement();
+ }
+ }
+
+ parents.removeLast();
+}
+
+void XbelReader::readBookmark()
+{
+ TRACE_OBJ
+ const QModelIndex &index = bookmarkModel->addItem(parents.last(), false);
+ if (BookmarkItem* item = bookmarkModel->itemFromIndex(index)) {
+ item->setData(UserRoleUrl, attributes().value(QLatin1String("href"))
+ .toString());
+ }
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ if (name() == QLatin1String("title"))
+ bookmarkModel->setData(index, readElementText(), Qt::EditRole);
+ else
+ readUnknownElement();
+ }
+ }
+}
+
+void XbelReader::readUnknownElement()
+{
+ TRACE_OBJ
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement())
+ readUnknownElement();
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/xbelsupport.h b/tools/assistant/tools/assistant/xbelsupport.h
new file mode 100644
index 0000000000..037415f389
--- /dev/null
+++ b/tools/assistant/tools/assistant/xbelsupport.h
@@ -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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef XBELSUPPORT_H
+#define XBELSUPPORT_H
+
+#include <QtXml/QXmlStreamReader>
+#include <QtCore/QPersistentModelIndex>
+
+QT_FORWARD_DECLARE_CLASS(QIODevice)
+QT_FORWARD_DECLARE_CLASS(QModelIndex)
+
+QT_BEGIN_NAMESPACE
+
+class BookmarkModel;
+
+class XbelWriter : public QXmlStreamWriter
+{
+public:
+ XbelWriter(BookmarkModel *model);
+ void writeToFile(QIODevice *device);
+
+private:
+ void writeData(const QModelIndex &index);
+
+private:
+ BookmarkModel *bookmarkModel;
+};
+
+class XbelReader : public QXmlStreamReader
+{
+public:
+ XbelReader(BookmarkModel *model);
+ bool readFromFile(QIODevice *device);
+
+private:
+ void readXBEL();
+ void readFolder();
+ void readBookmark();
+ void readUnknownElement();
+
+private:
+ BookmarkModel *bookmarkModel;
+ QList<QPersistentModelIndex> parents;
+};
+
+QT_END_NAMESPACE
+
+#endif // XBELSUPPORT_H
diff --git a/tools/assistant/tools/qcollectiongenerator/main.cpp b/tools/assistant/tools/qcollectiongenerator/main.cpp
index 2339c500eb..7fcb4e111a 100644
--- a/tools/assistant/tools/qcollectiongenerator/main.cpp
+++ b/tools/assistant/tools/qcollectiongenerator/main.cpp
@@ -39,21 +39,23 @@
**
****************************************************************************/
+#include "../shared/collectionconfiguration.h"
#include "../shared/helpgenerator.h"
+#include <private/qhelpgenerator_p.h>
+#include <private/qhelpprojectdata_p.h>
+
+#include <QtCore/QCoreApplication>
#include <QtCore/QDir>
#include <QtCore/QMap>
#include <QtCore/QFileInfo>
#include <QtCore/QCoreApplication>
#include <QtCore/QDateTime>
#include <QtCore/QBuffer>
-
-#include <private/qhelpgenerator_p.h>
-#include <private/qhelpprojectdata_p.h>
#include <QtHelp/QHelpEngineCore>
-
#include <QtXml/QXmlStreamReader>
+
QT_USE_NAMESPACE
class CollectionConfigReader : public QXmlStreamReader
@@ -87,6 +89,7 @@ public:
QStringList filesToRegister() const { return m_filesToRegister; }
QString cacheDirectory() const { return m_cacheDirectory; }
+ bool cacheDirRelativeToCollection() const { return m_cacheDirRelativeToCollection; }
private:
void raiseErrorWithLine();
@@ -115,11 +118,13 @@ private:
QMap<QString, QString> m_filesToGenerate;
QStringList m_filesToRegister;
QString m_cacheDirectory;
+ bool m_cacheDirRelativeToCollection;
};
void CollectionConfigReader::raiseErrorWithLine()
{
- raiseError(QObject::tr("Unknown token at line %1.")
+ raiseError(QCoreApplication::translate("QCollectionGenerator",
+ "Unknown token at line %1.")
.arg(lineNumber()));
}
@@ -139,8 +144,10 @@ void CollectionConfigReader::readData(const QByteArray &contents)
&& attributes().value(QLatin1String("version")) == QLatin1String("1.0"))
readConfig();
else
- raiseError(QObject::tr("Unknown token at line %1. Expected \"QtHelpCollectionProject\"!")
- .arg(lineNumber()));
+ raiseError(QCoreApplication::translate("QCollectionGenerator",
+ "Unknown token at line %1. "
+ "Expected \"QtHelpCollectionProject\"!")
+ .arg(lineNumber()));
}
}
}
@@ -198,6 +205,9 @@ void CollectionConfigReader::readAssistantSettings()
} else if (name() == QLatin1String("aboutDialog")) {
readAboutDialog();
} else if (name() == "cacheDirectory") {
+ m_cacheDirRelativeToCollection =
+ attributes().value(QLatin1String("base"))
+ == QLatin1String("collection");
m_cacheDirectory = readElementText();
} else {
raiseErrorWithLine();
@@ -322,6 +332,14 @@ void CollectionConfigReader::readRegister()
}
}
+namespace {
+ QString absoluteFileName(const QString &basePath, const QString &fileName)
+ {
+ return QFileInfo(fileName).isAbsolute() ?
+ fileName : basePath + QDir::separator() + fileName;
+ }
+}
+
int main(int argc, char *argv[])
{
QString error;
@@ -339,7 +357,8 @@ int main(int argc, char *argv[])
QFileInfo fi(QString::fromLocal8Bit(argv[i]));
collectionFile = fi.absoluteFilePath();
} else {
- error = QObject::tr("Missing output file name!");
+ error = QCoreApplication::translate("QCollectionGenerator",
+ "Missing output file name!");
}
} else if (arg == QLatin1String("-h")) {
showHelp = true;
@@ -353,14 +372,16 @@ int main(int argc, char *argv[])
}
if (showVersion) {
- fprintf(stdout, "Qt Collection Generator version 1.0 (Qt %s)\n", QT_VERSION_STR);
+ fprintf(stdout, "Qt Collection Generator version 1.0 (Qt %s)\n",
+ QT_VERSION_STR);
return 0;
}
if (configFile.isEmpty() && !showHelp)
- error = QObject::tr("Missing collection config file!");
+ error = QCoreApplication::translate("QCollectionGenerator",
+ "Missing collection config file!");
- QString help = QObject::tr("\nUsage:\n\n"
+ QString help = QCoreApplication::translate("QCollectionGenerator", "\nUsage:\n\n"
"qcollectiongenerator <collection-config-file> [options]\n\n"
" -o <collection-file> Generates a collection file\n"
" called <collection-file>. If\n"
@@ -403,13 +424,13 @@ int main(int argc, char *argv[])
while (it != config.filesToGenerate().constEnd()) {
fprintf(stdout, "Generating help for %s...\n", qPrintable(it.key()));
QHelpProjectData helpData;
- if (!helpData.readData(basePath + QDir::separator() + it.key())) {
+ if (!helpData.readData(absoluteFileName(basePath, it.key()))) {
fprintf(stderr, "%s\n", qPrintable(helpData.errorMessage()));
return -1;
}
HelpGenerator helpGenerator;
- if (!helpGenerator.generate(&helpData, basePath + QDir::separator() + it.value())) {
+ if (!helpGenerator.generate(&helpData, absoluteFileName(basePath, it.value()))) {
fprintf(stderr, "%s\n", qPrintable(helpGenerator.error()));
return -1;
}
@@ -433,49 +454,54 @@ int main(int argc, char *argv[])
}
foreach (const QString &file, config.filesToRegister()) {
- if (!helpEngine.registerDocumentation(basePath + QDir::separator() + file)) {
+ if (!helpEngine.registerDocumentation(absoluteFileName(basePath, file))) {
fprintf(stderr, "%s\n", qPrintable(helpEngine.error()));
return -1;
}
}
if (!config.title().isEmpty())
- helpEngine.setCustomValue(QLatin1String("WindowTitle"), config.title());
+ CollectionConfiguration::setWindowTitle(helpEngine, config.title());
if (!config.homePage().isEmpty()) {
- helpEngine.setCustomValue(QLatin1String("defaultHomepage"),
- config.homePage());
+ CollectionConfiguration::setDefaultHomePage(helpEngine,
+ config.homePage());
}
- if (!config.startPage().isEmpty())
- helpEngine.setCustomValue(QLatin1String("LastShownPages"), config.startPage());
+ if (!config.startPage().isEmpty()) {
+ CollectionConfiguration::setLastShownPages(helpEngine,
+ QStringList(config.startPage()));
+ }
- if (!config.currentFilter().isEmpty())
- helpEngine.setCustomValue(QLatin1String("CurrentFilter"), config.currentFilter());
+ if (!config.currentFilter().isEmpty()) {
+ helpEngine.setCurrentFilter(config.currentFilter());
+ }
- if (!config.cacheDirectory().isEmpty())
- helpEngine.setCustomValue(QLatin1String("CacheDirectory"), config.cacheDirectory());
+ if (!config.cacheDirectory().isEmpty()) {
+ CollectionConfiguration::setCacheDir(helpEngine, config.cacheDirectory(),
+ config.cacheDirRelativeToCollection());
+ }
- helpEngine.setCustomValue(QLatin1String("EnableFilterFunctionality"),
+ CollectionConfiguration::setFilterFunctionalityEnabled(helpEngine,
config.enableFilterFunctionality());
- helpEngine.setCustomValue(QLatin1String("HideFilterFunctionality"),
- config.hideFilterFunctionality());
- helpEngine.setCustomValue(QLatin1String("EnableDocumentationManager"),
+ CollectionConfiguration::setFilterToolbarVisible(helpEngine,
+ !config.hideFilterFunctionality());
+ CollectionConfiguration::setDocumentationManagerEnabled(helpEngine,
config.enableDocumentationManager());
- helpEngine.setCustomValue(QLatin1String("EnableAddressBar"),
+ CollectionConfiguration::setAddressBarEnabled(helpEngine,
config.enableAddressBar());
- helpEngine.setCustomValue(QLatin1String("HideAddressBar"),
- config.hideAddressBar());
- helpEngine.setCustomValue(QLatin1String("CreationTime"),
+ CollectionConfiguration::setAddressBarVisible(helpEngine,
+ !config.hideAddressBar());
+ CollectionConfiguration::setCreationTime(helpEngine,
QDateTime::currentDateTime().toTime_t());
if (!config.applicationIcon().isEmpty()) {
- QFile icon(basePath + QDir::separator() + config.applicationIcon());
+ QFile icon(absoluteFileName(basePath, config.applicationIcon()));
if (!icon.open(QIODevice::ReadOnly)) {
fprintf(stderr, "Cannot open %s!\n", qPrintable(icon.fileName()));
return -1;
}
- helpEngine.setCustomValue(QLatin1String("ApplicationIcon"), icon.readAll());
+ CollectionConfiguration::setApplicationIcon(helpEngine, icon.readAll());
}
if (config.aboutMenuTexts().count()) {
@@ -487,16 +513,16 @@ int main(int argc, char *argv[])
s << it.value();
++it;
}
- helpEngine.setCustomValue(QLatin1String("AboutMenuTexts"), ba);
+ CollectionConfiguration::setAboutMenuTexts(helpEngine, ba);
}
if (!config.aboutIcon().isEmpty()) {
- QFile icon(basePath + QDir::separator() + config.aboutIcon());
+ QFile icon(absoluteFileName(basePath, config.aboutIcon()));
if (!icon.open(QIODevice::ReadOnly)) {
fprintf(stderr, "Cannot open %s!\n", qPrintable(icon.fileName()));
return -1;
}
- helpEngine.setCustomValue(QLatin1String("AboutIcon"), icon.readAll());
+ CollectionConfiguration::setAboutIcon(helpEngine, icon.readAll());
}
if (config.aboutTextFiles().count()) {
@@ -512,7 +538,7 @@ int main(int argc, char *argv[])
while (it != config.aboutTextFiles().constEnd()) {
s << it.key();
- QFileInfo fi(basePath + QDir::separator() + it.value());
+ QFileInfo fi(absoluteFileName(basePath, it.value()));
QFile f(fi.absoluteFilePath());
if (!f.open(QIODevice::ReadOnly)) {
fprintf(stderr, "Cannot open %s!\n", qPrintable(f.fileName()));
@@ -544,14 +570,14 @@ int main(int argc, char *argv[])
}
++it;
}
- helpEngine.setCustomValue(QLatin1String("AboutTexts"), ba);
+ CollectionConfiguration::setAboutTexts(helpEngine, ba);
if (imgData.count()) {
QByteArray imageData;
QBuffer buffer(&imageData);
buffer.open(QIODevice::WriteOnly);
QDataStream out(&buffer);
out << imgData;
- helpEngine.setCustomValue(QLatin1String("AboutImages"), imageData);
+ CollectionConfiguration::setAboutImages(helpEngine, imageData);
}
}
diff --git a/tools/assistant/tools/qcollectiongenerator/qcollectiongenerator.pro b/tools/assistant/tools/qcollectiongenerator/qcollectiongenerator.pro
index cf70e48b9b..98e6a31937 100644
--- a/tools/assistant/tools/qcollectiongenerator/qcollectiongenerator.pro
+++ b/tools/assistant/tools/qcollectiongenerator/qcollectiongenerator.pro
@@ -1,14 +1,17 @@
-QT += xml network
+QT += xml \
+ network
TEMPLATE = app
DESTDIR = ../../../../bin
TARGET = qcollectiongenerator
-CONFIG += qt warn_on help console
+CONFIG += qt \
+ warn_on \
+ help \
+ console
CONFIG -= app_bundle
-
-target.path=$$[QT_INSTALL_BINS]
+target.path = $$[QT_INSTALL_BINS]
INSTALLS += target
-
SOURCES += ../shared/helpgenerator.cpp \
- main.cpp
-
-HEADERS += ../shared/helpgenerator.h
+ main.cpp \
+ ../shared/collectionconfiguration.cpp
+HEADERS += ../shared/helpgenerator.h \
+ ../shared/collectionconfiguration.h
diff --git a/tools/assistant/tools/qhelpgenerator/main.cpp b/tools/assistant/tools/qhelpgenerator/main.cpp
index 6245e33b2b..a309f424d2 100644
--- a/tools/assistant/tools/qhelpgenerator/main.cpp
+++ b/tools/assistant/tools/qhelpgenerator/main.cpp
@@ -58,6 +58,7 @@ int main(int argc, char *argv[])
QString basePath;
bool showHelp = false;
bool showVersion = false;
+ bool checkLinks = false;
for (int i = 1; i < argc; ++i) {
arg = QString::fromLocal8Bit(argv[i]);
@@ -66,12 +67,15 @@ int main(int argc, char *argv[])
QFileInfo fi(QString::fromLocal8Bit(argv[i]));
compressedFile = fi.absoluteFilePath();
} else {
- error = QObject::tr("Missing output file name!");
+ error = QCoreApplication::translate("QHelpGenerator",
+ "Missing output file name!");
}
} else if (arg == QLatin1String("-v")) {
showVersion = true;
} else if (arg == QLatin1String("-h")) {
showHelp = true;
+ } else if (arg == QLatin1String("-c")) {
+ checkLinks = true;
} else {
QFileInfo fi(arg);
projectFile = fi.absoluteFilePath();
@@ -80,19 +84,23 @@ int main(int argc, char *argv[])
}
if (showVersion) {
- fprintf(stdout, "Qt Help Generator version 1.0 (Qt %s)\n", QT_VERSION_STR);
+ fprintf(stdout, "Qt Help Generator version 1.0 (Qt %s)\n",
+ QT_VERSION_STR);
return 0;
}
if (projectFile.isEmpty() && !showHelp)
- error = QObject::tr("Missing Qt help project file!");
+ error = QCoreApplication::translate("QHelpGenerator",
+ "Missing Qt help project file!");
- QString help = QObject::tr("\nUsage:\n\n"
+ QString help = QCoreApplication::translate("QHelpGenerator", "\nUsage:\n\n"
"qhelpgenerator <help-project-file> [options]\n\n"
" -o <compressed-file> Generates a Qt compressed help\n"
" file called <compressed-file>.\n"
" If this option is not specified\n"
" a default name will be used.\n"
+ " -c Checks whether all links in HTML files\n"
+ " point to files in this help project.\n"
" -v Displays the version of \n"
" qhelpgenerator.\n\n");
@@ -111,9 +119,11 @@ int main(int argc, char *argv[])
}
if (compressedFile.isEmpty()) {
- QFileInfo fi(projectFile);
- compressedFile = basePath + QDir::separator()
- + fi.baseName() + QLatin1String(".qch");
+ if (!checkLinks) {
+ QFileInfo fi(projectFile);
+ compressedFile = basePath + QDir::separator()
+ + fi.baseName() + QLatin1String(".qch");
+ }
} else {
// check if the output dir exists -- create if it doesn't
QFileInfo fi(compressedFile);
@@ -134,7 +144,11 @@ int main(int argc, char *argv[])
QCoreApplication app(argc, argv);
HelpGenerator generator;
- bool success = generator.generate(helpData, compressedFile);
+ bool success = true;
+ if (checkLinks)
+ success = generator.checkLinks(*helpData);
+ if (success && !compressedFile.isEmpty())
+ success = generator.generate(helpData, compressedFile);
delete helpData;
if (!success) {
fprintf(stderr, "%s\n", qPrintable(generator.error()));
diff --git a/tools/assistant/tools/shared/collectionconfiguration.cpp b/tools/assistant/tools/shared/collectionconfiguration.cpp
new file mode 100644
index 0000000000..e3944b6457
--- /dev/null
+++ b/tools/assistant/tools/shared/collectionconfiguration.cpp
@@ -0,0 +1,313 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "collectionconfiguration.h"
+
+#include <QtHelp/QHelpEngineCore>
+
+QT_BEGIN_NAMESPACE
+
+namespace {
+ const QString AboutIconKey(QLatin1String("AboutIcon"));
+ const QString AboutImagesKey(QLatin1String("AboutImages"));
+ const QString AboutMenuTextsKey(QLatin1String("AboutMenuTexts"));
+ const QString AboutTextsKey(QLatin1String("AboutTexts"));
+ const QString ApplicationIconKey(QLatin1String("ApplicationIcon"));
+ const QString CacheDirKey(QLatin1String("CacheDirectory"));
+ const QString CacheDirRelativeToCollectionKey(QLatin1String("CacheDirRelativeToCollection"));
+ const QString CreationTimeKey(QLatin1String("CreationTime"));
+ const QString DefaultHomePageKey(QLatin1String("defaultHomepage"));
+ const QString EnableAddressBarKey(QLatin1String("EnableAddressBar"));
+ const QString EnableDocManagerKey(QLatin1String("EnableDocumentationManager"));
+ const QString EnableFilterKey(QLatin1String("EnableFilterFunctionality"));
+ const QString HideAddressBarKey(QLatin1String("HideAddressBar"));
+ const QString FilterToolbarHiddenKey(QLatin1String("HideFilterFunctionality"));
+ const QString LastPageKey(QLatin1String("LastTabPage"));
+ const QString LastRegisterTime(QLatin1String("LastRegisterTime"));
+ const QString LastShownPagesKey(QLatin1String("LastShownPages"));
+ const QString LastZoomFactorsKey(QLatin1String(
+#if !defined(QT_NO_WEBKIT)
+ "LastPagesZoomWebView"
+#else
+ "LastPagesZoomTextBrowser"
+#endif
+ ));
+ const QString WindowTitleKey(QLatin1String("WindowTitle"));
+} // anonymous namespace
+
+const QString CollectionConfiguration::DefaultZoomFactor(QLatin1String("0.0"));
+const QString CollectionConfiguration::ListSeparator(QLatin1String("|"));
+
+uint CollectionConfiguration::creationTime(const QHelpEngineCore &helpEngine)
+{
+ return helpEngine.customValue(CreationTimeKey, 0).toUInt();
+}
+
+void CollectionConfiguration::setCreationTime(QHelpEngineCore &helpEngine, uint time)
+{
+ helpEngine.setCustomValue(CreationTimeKey, time);
+}
+
+const QString CollectionConfiguration::windowTitle(const QHelpEngineCore &helpEngine)
+{
+ return helpEngine.customValue(WindowTitleKey).toString();
+}
+
+void CollectionConfiguration::setWindowTitle(QHelpEngineCore &helpEngine,
+ const QString &windowTitle)
+{
+ helpEngine.setCustomValue(WindowTitleKey, windowTitle);
+}
+
+bool CollectionConfiguration::filterFunctionalityEnabled(const QHelpEngineCore &helpEngine)
+{
+ return helpEngine.customValue(EnableFilterKey, true).toBool();
+}
+
+void CollectionConfiguration::setFilterFunctionalityEnabled(QHelpEngineCore &helpEngine,
+ bool enabled)
+{
+ helpEngine.setCustomValue(EnableFilterKey, enabled);
+}
+
+bool CollectionConfiguration::filterToolbarVisible(const QHelpEngineCore &helpEngine)
+{
+ return !helpEngine.customValue(FilterToolbarHiddenKey, true).toBool();
+}
+
+void CollectionConfiguration::setFilterToolbarVisible(QHelpEngineCore &helpEngine,
+ bool visible)
+{
+ helpEngine.setCustomValue(FilterToolbarHiddenKey, !visible);
+}
+
+bool CollectionConfiguration::addressBarEnabled(const QHelpEngineCore &helpEngine)
+{
+ return helpEngine.customValue(EnableAddressBarKey, true).toBool();
+}
+
+void CollectionConfiguration::setAddressBarEnabled(QHelpEngineCore &helpEngine,
+ bool enabled)
+{
+ helpEngine.setCustomValue(EnableAddressBarKey, enabled);
+}
+
+bool CollectionConfiguration::addressBarVisible(const QHelpEngineCore &helpEngine)
+{
+ return !helpEngine.customValue(HideAddressBarKey, true).toBool();
+}
+
+void CollectionConfiguration::setAddressBarVisible(QHelpEngineCore &helpEngine,
+ bool visible)
+{
+ helpEngine.setCustomValue(HideAddressBarKey, !visible);
+}
+
+const QString CollectionConfiguration::cacheDir(const QHelpEngineCore &helpEngine)
+{
+ return helpEngine.customValue(CacheDirKey).toString();
+}
+
+bool CollectionConfiguration::cacheDirIsRelativeToCollection(const QHelpEngineCore &helpEngine)
+{
+ return helpEngine.customValue(CacheDirRelativeToCollectionKey).toBool();
+}
+
+void CollectionConfiguration::setCacheDir(QHelpEngineCore &helpEngine,
+ const QString &cacheDir, bool relativeToCollection)
+{
+ helpEngine.setCustomValue(CacheDirKey, cacheDir);
+ helpEngine.setCustomValue(CacheDirRelativeToCollectionKey,
+ relativeToCollection);
+}
+
+bool CollectionConfiguration::documentationManagerEnabled(const QHelpEngineCore &helpEngine)
+{
+ return helpEngine.customValue(EnableDocManagerKey, true).toBool();
+}
+
+void CollectionConfiguration::setDocumentationManagerEnabled(QHelpEngineCore &helpEngine,
+ bool enabled)
+{
+ helpEngine.setCustomValue(EnableDocManagerKey, enabled);
+}
+
+const QByteArray CollectionConfiguration::applicationIcon(const QHelpEngineCore &helpEngine)
+{
+ return helpEngine.customValue(ApplicationIconKey).toByteArray();
+}
+
+void CollectionConfiguration::setApplicationIcon(QHelpEngineCore &helpEngine,
+ const QByteArray &icon)
+{
+ helpEngine.setCustomValue(ApplicationIconKey, icon);
+}
+
+const QByteArray CollectionConfiguration::aboutMenuTexts(const QHelpEngineCore &helpEngine)
+{
+ return helpEngine.customValue(AboutMenuTextsKey).toByteArray();
+}
+
+void CollectionConfiguration::setAboutMenuTexts(QHelpEngineCore &helpEngine,
+ const QByteArray &texts)
+{
+ helpEngine.setCustomValue(AboutMenuTextsKey, texts);
+}
+
+const QByteArray CollectionConfiguration::aboutIcon(const QHelpEngineCore &helpEngine)
+{
+ return helpEngine.customValue(AboutIconKey).toByteArray();
+}
+
+void CollectionConfiguration::setAboutIcon(QHelpEngineCore &helpEngine,
+ const QByteArray &icon)
+{
+ helpEngine.setCustomValue(AboutIconKey, icon);
+}
+
+const QByteArray CollectionConfiguration::aboutTexts(const QHelpEngineCore &helpEngine)
+{
+ return helpEngine.customValue(AboutTextsKey).toByteArray();
+}
+
+void CollectionConfiguration::setAboutTexts(QHelpEngineCore &helpEngine,
+ const QByteArray &texts)
+{
+ helpEngine.setCustomValue(AboutTextsKey, texts);
+}
+
+const QByteArray CollectionConfiguration::aboutImages(const QHelpEngineCore &helpEngine)
+{
+ return helpEngine.customValue(AboutImagesKey).toByteArray();
+}
+
+void CollectionConfiguration::setAboutImages(QHelpEngineCore &helpEngine,
+ const QByteArray &images)
+{
+ helpEngine.setCustomValue(AboutImagesKey, images);
+}
+
+const QString CollectionConfiguration::defaultHomePage(const QHelpEngineCore &helpEngine)
+{
+ return helpEngine.customValue(DefaultHomePageKey, QLatin1String("help")).
+ toString();
+}
+
+void CollectionConfiguration::setDefaultHomePage(QHelpEngineCore &helpEngine,
+ const QString &page)
+{
+ helpEngine.setCustomValue(DefaultHomePageKey, page);
+}
+
+const QStringList CollectionConfiguration::lastShownPages(const QHelpEngineCore &helpEngine)
+{
+ return helpEngine.customValue(LastShownPagesKey).toString().
+ split(ListSeparator, QString::SkipEmptyParts);
+}
+
+void CollectionConfiguration::setLastShownPages(QHelpEngineCore &helpEngine,
+ const QStringList &lastShownPages)
+{
+ helpEngine.setCustomValue(LastShownPagesKey,
+ lastShownPages.join(ListSeparator));
+}
+
+const QStringList CollectionConfiguration::lastZoomFactors(const QHelpEngineCore &helpEngine)
+{
+ return helpEngine.customValue(LastZoomFactorsKey).toString().
+ split(ListSeparator, QString::SkipEmptyParts);
+}
+
+void CollectionConfiguration::setLastZoomFactors(QHelpEngineCore &helpEngine,
+ const QStringList &lastZoomFactors)
+{
+ helpEngine.setCustomValue(LastZoomFactorsKey,
+ lastZoomFactors.join(ListSeparator));
+}
+
+int CollectionConfiguration::lastTabPage(const QHelpEngineCore &helpEngine)
+{
+ return helpEngine.customValue(LastPageKey, 1).toInt();
+}
+
+void CollectionConfiguration::setLastTabPage(QHelpEngineCore &helpEngine,
+ int lastPage)
+{
+ helpEngine.setCustomValue(LastPageKey, lastPage);
+}
+
+const QDateTime CollectionConfiguration::lastRegisterTime(const QHelpEngineCore &helpEngine)
+{
+ return helpEngine.customValue(LastRegisterTime, QDateTime()).toDateTime();
+}
+
+void CollectionConfiguration::updateLastRegisterTime(QHelpEngineCore &helpEngine)
+{
+ helpEngine.setCustomValue(LastRegisterTime, QDateTime::currentDateTime());
+}
+
+bool CollectionConfiguration::isNewer(const QHelpEngineCore &newer,
+ const QHelpEngineCore &older)
+{
+ return creationTime(newer) > creationTime(older);
+}
+
+void CollectionConfiguration::copyConfiguration(const QHelpEngineCore &source,
+ QHelpEngineCore &target)
+{
+ setCreationTime(target, creationTime(source));
+ setWindowTitle(target, windowTitle(source));
+ target.setCurrentFilter(source.currentFilter());
+ setCacheDir(target, cacheDir(source), cacheDirIsRelativeToCollection(source));
+ setFilterFunctionalityEnabled(target, filterFunctionalityEnabled(source));
+ setFilterToolbarVisible(target, filterToolbarVisible(source));
+ setAddressBarEnabled(target, addressBarEnabled(source));
+ setAddressBarVisible(target, addressBarVisible(source));
+ setDocumentationManagerEnabled(target, documentationManagerEnabled(source));
+ setApplicationIcon(target, applicationIcon(source));
+ setAboutMenuTexts(target, aboutMenuTexts(source));
+ setAboutIcon(target, aboutIcon(source));
+ setAboutTexts(target, aboutTexts(source));
+ setAboutImages(target, aboutImages(source));
+ setDefaultHomePage(target, defaultHomePage(source));
+}
+
+QT_END_NAMESPACE
diff --git a/tools/assistant/tools/shared/collectionconfiguration.h b/tools/assistant/tools/shared/collectionconfiguration.h
new file mode 100644
index 0000000000..b7bf2478f1
--- /dev/null
+++ b/tools/assistant/tools/shared/collectionconfiguration.h
@@ -0,0 +1,145 @@
+/****************************************************************************
+**
+** 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 Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef COLLECTIONCONFIGURATION_H
+#define COLLECTIONCONFIGURATION_H
+
+#include <QtCore/QByteArray>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDateTime>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+
+QT_BEGIN_NAMESPACE
+
+class QHelpEngineCore;
+
+class CollectionConfiguration
+{
+public:
+ static const QString windowTitle(const QHelpEngineCore &helpEngine);
+ static void setWindowTitle(QHelpEngineCore &helpEngine,
+ const QString &windowTitle);
+
+ static const QString cacheDir(const QHelpEngineCore &helpEngine);
+ static bool cacheDirIsRelativeToCollection(const QHelpEngineCore &helpEngine);
+ static void setCacheDir(QHelpEngineCore &helpEngine,
+ const QString &cacheDir, bool relativeToCollection);
+
+ static uint creationTime(const QHelpEngineCore &helpEngine);
+ static void setCreationTime(QHelpEngineCore &helpEngine, uint time);
+
+ static bool filterFunctionalityEnabled(const QHelpEngineCore &helpEngine);
+ static void setFilterFunctionalityEnabled(QHelpEngineCore &helpEngine,
+ bool enabled);
+
+ static bool filterToolbarVisible(const QHelpEngineCore &helpEngine);
+ static void setFilterToolbarVisible(QHelpEngineCore &helpEngine,
+ bool visible);
+
+ static bool addressBarEnabled(const QHelpEngineCore &helpEngine);
+ static void setAddressBarEnabled(QHelpEngineCore &helpEngine, bool enabled);
+
+ static bool addressBarVisible(const QHelpEngineCore &helpEngine);
+ static void setAddressBarVisible(QHelpEngineCore &helpEngine, bool visible);
+
+
+ static bool documentationManagerEnabled(const QHelpEngineCore &helpEngine);
+ static void setDocumentationManagerEnabled(QHelpEngineCore &helpEngine,
+ bool enabled);
+
+ static const QByteArray applicationIcon(const QHelpEngineCore &helpEngine);
+ static void setApplicationIcon(QHelpEngineCore &helpEngine,
+ const QByteArray &icon);
+
+ // TODO: Encapsulate encoding from/to QByteArray here
+ static const QByteArray aboutMenuTexts(const QHelpEngineCore &helpEngine);
+ static void setAboutMenuTexts(QHelpEngineCore &helpEngine,
+ const QByteArray &texts);
+
+ static const QByteArray aboutIcon(const QHelpEngineCore &helpEngine);
+ static void setAboutIcon(QHelpEngineCore &helpEngine,
+ const QByteArray &icon);
+
+ // TODO: Encapsulate encoding from/to QByteArray here
+ static const QByteArray aboutTexts(const QHelpEngineCore &helpEngine);
+ static void setAboutTexts(QHelpEngineCore &helpEngine,
+ const QByteArray &texts);
+
+ static const QByteArray aboutImages(const QHelpEngineCore &helpEngine);
+ static void setAboutImages(QHelpEngineCore &helpEngine,
+ const QByteArray &images);
+
+ static const QString defaultHomePage(const QHelpEngineCore &helpEngine);
+ static void setDefaultHomePage(QHelpEngineCore &helpEngine,
+ const QString &page);
+
+ // TODO: Don't allow last pages and zoom factors to be set in isolation
+ // Perhaps also fill up missing elements automatically or assert.
+ static const QStringList lastShownPages(const QHelpEngineCore &helpEngine);
+ static void setLastShownPages(QHelpEngineCore &helpEngine,
+ const QStringList &lastShownPages);
+ static const QStringList lastZoomFactors(const QHelpEngineCore &helpEngine);
+ static void setLastZoomFactors(QHelpEngineCore &helPEngine,
+ const QStringList &lastZoomFactors);
+
+ static int lastTabPage(const QHelpEngineCore &helpEngine);
+ static void setLastTabPage(QHelpEngineCore &helpEngine, int lastPage);
+
+ static bool isNewer(const QHelpEngineCore &newer,
+ const QHelpEngineCore &older);
+ static void copyConfiguration(const QHelpEngineCore &source,
+ QHelpEngineCore &target);
+
+ /*
+ * Note that this only reflects register actions caused by the
+ * "-register" command line switch, not GUI or remote control actions.
+ */
+ static const QDateTime lastRegisterTime(const QHelpEngineCore &helpEngine);
+ static void updateLastRegisterTime(QHelpEngineCore &helpEngine);
+
+ static const QString DefaultZoomFactor;
+ static const QString ListSeparator;
+};
+
+QT_END_NAMESPACE
+
+#endif // COLLECTIONCONFIGURATION_H
diff --git a/tools/assistant/tools/shared/helpgenerator.cpp b/tools/assistant/tools/shared/helpgenerator.cpp
index fa183cd0ff..12008e6940 100644
--- a/tools/assistant/tools/shared/helpgenerator.cpp
+++ b/tools/assistant/tools/shared/helpgenerator.cpp
@@ -61,6 +61,11 @@ bool HelpGenerator::generate(QHelpDataInterface *helpData,
return generator->generate(helpData, outputFileName);
}
+bool HelpGenerator::checkLinks(const QHelpDataInterface &helpData)
+{
+ return generator->checkLinks(helpData);
+}
+
QString HelpGenerator::error() const
{
return generator->error();
diff --git a/tools/assistant/tools/shared/helpgenerator.h b/tools/assistant/tools/shared/helpgenerator.h
index 903d5883e1..6da1c2b79a 100644
--- a/tools/assistant/tools/shared/helpgenerator.h
+++ b/tools/assistant/tools/shared/helpgenerator.h
@@ -57,6 +57,7 @@ public:
HelpGenerator();
bool generate(QHelpDataInterface *helpData,
const QString &outputFileName);
+ bool checkLinks(const QHelpDataInterface &helpData);
QString error() const;
private slots:
diff --git a/tools/assistant/translations/qt_help.pro b/tools/assistant/translations/qt_help.pro
index 1012f3fcf1..6f66876325 100644
--- a/tools/assistant/translations/qt_help.pro
+++ b/tools/assistant/translations/qt_help.pro
@@ -44,6 +44,7 @@ TRANSLATIONS = \
$$TR_DIR/qt_help_cs.ts \
$$TR_DIR/qt_help_da.ts \
$$TR_DIR/qt_help_de.ts \
+ $$TR_DIR/qt_help_hu.ts \
$$TR_DIR/qt_help_ja.ts \
$$TR_DIR/qt_help_pl.ts \
$$TR_DIR/qt_help_ru.ts \
diff --git a/tools/assistant/translations/translations.pro b/tools/assistant/translations/translations.pro
index d29ffc312b..c692262fea 100644
--- a/tools/assistant/translations/translations.pro
+++ b/tools/assistant/translations/translations.pro
@@ -46,6 +46,7 @@ TRANSLATIONS = \
$$TR_DIR/assistant_da.ts \
$$TR_DIR/assistant_de.ts \
$$TR_DIR/assistant_fr.ts \
+ $$TR_DIR/assistant_hu.ts \
$$TR_DIR/assistant_ja.ts \
$$TR_DIR/assistant_pl.ts \
$$TR_DIR/assistant_ru.ts \
diff --git a/tools/assistant/translations/translations_adp.pro b/tools/assistant/translations/translations_adp.pro
deleted file mode 100644
index f8da2e3c73..0000000000
--- a/tools/assistant/translations/translations_adp.pro
+++ /dev/null
@@ -1,41 +0,0 @@
-# Include those manually as they do not contain any directory specification
-
-FORMS += ../compat/helpdialog.ui \
- ../compat/mainwindow.ui \
- ../compat/tabbedbrowser.ui \
- ../compat/topicchooser.ui
-
-SOURCES += ../compat/main.cpp \
- ../compat/helpwindow.cpp \
- ../compat/topicchooser.cpp \
- ../compat/docuparser.cpp \
- ../compat/index.cpp \
- ../compat/profile.cpp \
- ../compat/config.cpp \
- ../compat/helpdialog.cpp \
- ../compat/mainwindow.cpp \
- ../compat/tabbedbrowser.cpp \
- ../compat/fontsettingsdialog.cpp
-
-SOURCES += ../../shared/fontpanel/fontpanel.cpp
-
-HEADERS += ../compat/helpwindow.h \
- ../compat/topicchooser.h \
- ../compat/docuparser.h \
- ../compat/index.h \
- ../compat/profile.h \
- ../compat/helpdialog.h \
- ../compat/mainwindow.h \
- ../compat/tabbedbrowser.h \
- ../compat/config.h \
- ../compat/fontsettingsdialog.h
-
-
-TR_DIR = $$PWD/../../../translations
-TRANSLATIONS = \
- $$TR_DIR/assistant_adp_de.ts \
- $$TR_DIR/assistant_adp_ja.ts \
- $$TR_DIR/assistant_adp_pl.ts \
- $$TR_DIR/assistant_adp_ru.ts \
- $$TR_DIR/assistant_adp_zh_CN.ts \
- $$TR_DIR/assistant_adp_zh_TW.ts
diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro
index 91de7c20a5..d926a76990 100644
--- a/tools/configure/configure.pro
+++ b/tools/configure/configure.pro
@@ -119,3 +119,4 @@ DEFINES += COMMERCIAL_VERSION
INCLUDEPATH += $$QT_SOURCE_TREE/src/corelib/arch/generic \
$$QT_SOURCE_TREE/include/QtCore \
+ $$QT_SOURCE_TREE/tools/shared
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 2555015b1b..dd68fcdb63 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -248,6 +248,8 @@ Configure::Configure( int& argc, char** argv )
dictionary[ "PHONON_BACKEND" ] = "yes";
dictionary[ "MULTIMEDIA" ] = "yes";
dictionary[ "AUDIO_BACKEND" ] = "auto";
+ dictionary[ "MEDIASERVICE"] = "auto";
+ dictionary[ "WMSDK" ] = "auto";
dictionary[ "DIRECTSHOW" ] = "no";
dictionary[ "WEBKIT" ] = "auto";
dictionary[ "DECLARATIVE" ] = "auto";
@@ -701,9 +703,6 @@ void Configure::parseCmdLine()
} else if ( configCmdLine.at(i) == "-opengl-es-cm" ) {
dictionary[ "OPENGL" ] = "yes";
dictionary[ "OPENGL_ES_CM" ] = "yes";
- } else if ( configCmdLine.at(i) == "-opengl-es-cl" ) {
- dictionary[ "OPENGL" ] = "yes";
- dictionary[ "OPENGL_ES_CL" ] = "yes";
} else if ( configCmdLine.at(i) == "-opengl-es-2" ) {
dictionary[ "OPENGL" ] = "yes";
dictionary[ "OPENGL_ES_2" ] = "yes";
@@ -910,6 +909,10 @@ void Configure::parseCmdLine()
dictionary[ "AUDIO_BACKEND" ] = "yes";
} else if( configCmdLine.at(i) == "-no-audio-backend" ) {
dictionary[ "AUDIO_BACKEND" ] = "no";
+ } else if( configCmdLine.at(i) == "-mediaservice") {
+ dictionary[ "MEDIASERVICE" ] = "yes";
+ } else if (configCmdLine.at(i) == "-no-mediaservice") {
+ dictionary[ "MEDIASERVICE" ] = "no";
} else if( configCmdLine.at(i) == "-no-phonon" ) {
dictionary[ "PHONON" ] = "no";
} else if( configCmdLine.at(i) == "-phonon" ) {
@@ -964,6 +967,7 @@ void Configure::parseCmdLine()
if(i==argCount)
break;
qmakeDefines += "QT_NAMESPACE="+configCmdLine.at(i);
+ dictionary[ "QT_NAMESPACE" ] = configCmdLine.at(i);
} else if( configCmdLine.at(i) == "-qtlibinfix" ) {
++i;
if(i==argCount)
@@ -1067,6 +1071,12 @@ void Configure::parseCmdLine()
dictionary[ "QT_INSTALL_PLUGINS" ] = configCmdLine.at(i);
}
+ else if( configCmdLine.at(i) == "-importdir" ) {
+ ++i;
+ if(i==argCount)
+ break;
+ dictionary[ "QT_INSTALL_IMPORTS" ] = configCmdLine.at(i);
+ }
else if( configCmdLine.at(i) == "-datadir" ) {
++i;
if(i==argCount)
@@ -1484,6 +1494,7 @@ void Configure::applySpecSpecifics()
dictionary[ "QT_HOST_PREFIX" ] = dictionary[ "QT_INSTALL_PREFIX" ];
dictionary[ "QT_INSTALL_PREFIX" ] = "";
dictionary[ "QT_INSTALL_PLUGINS" ] = "\\resource\\qt\\plugins";
+ dictionary[ "QT_INSTALL_IMPORTS" ] = "\\resource\\qt\\imports";
dictionary[ "QT_INSTALL_TRANSLATIONS" ] = "\\resource\\qt\\translations";
dictionary[ "ARM_FPU_TYPE" ] = "softvfp";
dictionary[ "SQL_SQLITE" ] = "yes";
@@ -1561,7 +1572,7 @@ bool Configure::displayHelp()
desc("Usage: configure [-buildkey <key>]\n"
// desc("Usage: configure [-prefix dir] [-bindir <dir>] [-libdir <dir>]\n"
// "[-docdir <dir>] [-headerdir <dir>] [-plugindir <dir>]\n"
-// "[-datadir <dir>] [-translationdir <dir>]\n"
+// "[-importdir <dir>] [-datadir <dir>] [-translationdir <dir>]\n"
// "[-examplesdir <dir>] [-demosdir <dir>][-buildkey <key>]\n"
"[-release] [-debug] [-debug-and-release] [-shared] [-static]\n"
"[-no-fast] [-fast] [-no-exceptions] [-exceptions]\n"
@@ -1583,6 +1594,7 @@ bool Configure::displayHelp()
"[-qtnamespace <namespace>] [-qtlibinfix <infix>] [-no-phonon]\n"
"[-phonon] [-no-phonon-backend] [-phonon-backend]\n"
"[-no-multimedia] [-multimedia] [-no-audio-backend] [-audio-backend]\n"
+ "[-no-mediaservice] [-mediaservice]\n"
"[-no-script] [-script] [-no-scripttools] [-scripttools]\n"
"[-no-webkit] [-webkit] [-graphicssystem raster|opengl|openvg]\n\n", 0, 7);
@@ -1601,6 +1613,7 @@ bool Configure::displayHelp()
desc( "-docdir <dir>", "Documentation will be installed to dir\n(default PREFIX/doc)");
desc( "-headerdir <dir>", "Headers will be installed to dir\n(default PREFIX/include)");
desc( "-plugindir <dir>", "Plugins will be installed to dir\n(default PREFIX/plugins)");
+ desc( "-importdir <dir>", "Imports for QML will be installed to dir\n(default PREFIX/imports)");
desc( "-datadir <dir>", "Data used by Qt programs will be installed to dir\n(default PREFIX)");
desc( "-translationdir <dir>","Translations of Qt programs will be installed to dir\n(default PREFIX/translations)\n");
desc( "-examplesdir <dir>", "Examples will be installed to dir\n(default PREFIX/examples)");
@@ -1766,6 +1779,8 @@ bool Configure::displayHelp()
desc("MULTIMEDIA", "yes","-multimedia", "Compile in multimedia module");
desc("AUDIO_BACKEND", "no","-no-audio-backend", "Do not compile in the platform audio backend into QtMultimedia");
desc("AUDIO_BACKEND", "yes","-audio-backend", "Compile in the platform audio backend into QtMultimedia");
+ desc("MEDIASERVICE", "no","-no-mediaservice", "Do not compile in the platform-specific QtMultimedia media service.");
+ desc("MEDIASERVICE", "yes","-mediaservice", "Compile in the platform-specific QtMultimedia media service.");
desc("WEBKIT", "no", "-no-webkit", "Do not compile in the WebKit module");
desc("WEBKIT", "yes", "-webkit", "Compile in the WebKit module (WebKit is built if a decent C++ compiler is used.)");
desc("SCRIPT", "no", "-no-script", "Do not build the QtScript module.");
@@ -1822,7 +1837,6 @@ bool Configure::displayHelp()
desc("CETEST", "yes", "-cetest", "Compile Windows CE remote test application");
desc( "-signature <file>", "Use file for signing the target project");
desc("OPENGL_ES_CM", "no", "-opengl-es-cm", "Enable support for OpenGL ES Common");
- desc("OPENGL_ES_CL", "no", "-opengl-es-cl", "Enable support for OpenGL ES Common Lite");
desc("OPENGL_ES_2", "no", "-opengl-es-2", "Enable support for OpenGL ES 2.0");
desc("DIRECTSHOW", "no", "-phonon-wince-ds9", "Enable Phonon Direct Show 9 backend for Windows CE");
@@ -1872,8 +1886,16 @@ bool Configure::findFile( const QString &fileName )
QString paths;
if (file.endsWith(".h")) {
- if (!mingwPath.isNull() && !findFileInPaths(file, mingwPath + QLatin1String("/../include")).isNull())
- return true;
+ if (!mingwPath.isNull()) {
+ if (!findFileInPaths(file, mingwPath + QLatin1String("/../include")).isNull())
+ return true;
+ //now let's try the additional compiler path
+ QDir mingwLibDir = mingwPath + QLatin1String("/../lib/gcc/mingw32");
+ foreach(const QFileInfo &version, mingwLibDir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot)) {
+ if (!findFileInPaths(file, version.absoluteFilePath() + QLatin1String("/include")).isNull())
+ return true;
+ }
+ }
paths = QString::fromLocal8Bit(getenv("INCLUDE"));
} else if ( file.endsWith( ".lib" ) || file.endsWith( ".a" ) ) {
if (!mingwPath.isNull() && !findFileInPaths(file, mingwPath + QLatin1String("/../lib")).isNull())
@@ -2003,18 +2025,16 @@ bool Configure::checkAvailability(const QString &part)
available = (dictionary[ "ARCHITECTURE" ] == "windowsce");
else if (part == "OPENGL_ES_CM")
available = (dictionary[ "ARCHITECTURE" ] == "windowsce");
- else if (part == "OPENGL_ES_CL")
- available = (dictionary[ "ARCHITECTURE" ] == "windowsce");
else if (part == "OPENGL_ES_2")
available = (dictionary[ "ARCHITECTURE" ] == "windowsce");
else if (part == "DIRECTSHOW")
available = (dictionary[ "ARCHITECTURE" ] == "windowsce");
else if (part == "SSE2")
- available = (dictionary.value("QMAKESPEC") != "win32-msvc") && (dictionary.value("QMAKESPEC") != "win32-g++");
+ available = (dictionary.value("QMAKESPEC") != "win32-msvc");
else if (part == "3DNOW" )
- available = (dictionary.value("QMAKESPEC") != "win32-msvc") && (dictionary.value("QMAKESPEC") != "win32-icc") && findFile("mm3dnow.h") && (dictionary.value("QMAKESPEC") != "win32-g++");
+ available = (dictionary.value("QMAKESPEC") != "win32-msvc") && (dictionary.value("QMAKESPEC") != "win32-icc") && findFile("mm3dnow.h");
else if (part == "MMX" || part == "SSE")
- available = (dictionary.value("QMAKESPEC") != "win32-msvc") && (dictionary.value("QMAKESPEC") != "win32-g++");
+ available = (dictionary.value("QMAKESPEC") != "win32-msvc");
else if (part == "OPENSSL")
available = findFile("openssl\\ssl.h");
else if (part == "DBUS")
@@ -2042,7 +2062,7 @@ bool Configure::checkAvailability(const QString &part)
&& dictionary.value("QMAKESPEC") != "win32-msvc.net" // Leave for now, since we can't be sure if they are using 2002 or 2003 with this spec
&& dictionary.value("QMAKESPEC") != "win32-msvc2002"
&& dictionary.value("EXCEPTIONS") == "yes";
- } else if (part == "PHONON") {
+ } else if (part == "PHONON" || part == "MEDIASERVICE") {
available = findFile("vmr9.h") && findFile("dshow.h") && findFile("dmo.h") && findFile("dmodshow.h")
&& (findFile("strmiids.lib") || findFile("libstrmiids.a"))
&& (findFile("dmoguids.lib") || findFile("libdmoguids.a"))
@@ -2060,12 +2080,14 @@ bool Configure::checkAvailability(const QString &part)
if (!findFile("msdmo.lib")) cout << "msdmo.lib not found" << endl;
if (!findFile("d3d9.h")) cout << "d3d9.h not found" << endl;
}
+ } else if (part == "WMSDK") {
+ available = findFile("wmsdk.h");
} else if (part == "MULTIMEDIA" || part == "SCRIPT" || part == "SCRIPTTOOLS") {
available = true;
} else if (part == "WEBKIT") {
available = (dictionary.value("QMAKESPEC") == "win32-msvc2005") || (dictionary.value("QMAKESPEC") == "win32-msvc2008") || (dictionary.value("QMAKESPEC") == "win32-g++");
} else if (part == "DECLARATIVE") {
- available = QFile::exists(sourcePath + "/src/declarative/qml/qmlcomponent.h");
+ available = QFile::exists(sourcePath + "/src/declarative/qml/qdeclarativecomponent.h");
} else if (part == "AUDIO_BACKEND") {
available = true;
if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) {
@@ -2202,6 +2224,10 @@ void Configure::autoDetection()
dictionary["DECLARATIVE"] = checkAvailability("DECLARATIVE") ? "yes" : "no";
if (dictionary["AUDIO_BACKEND"] == "auto")
dictionary["AUDIO_BACKEND"] = checkAvailability("AUDIO_BACKEND") ? "yes" : "no";
+ if (dictionary["MEDIASERVICE"] == "auto")
+ dictionary["MEDIASERVICE"] = checkAvailability("MEDIASERVICE") ? "yes" : "no";
+ if (dictionary["WMSDK"] == "auto")
+ dictionary["WMSDK"] = checkAvailability("WMSDK") ? "yes" : "no";
// Qt/WinCE remote test application
if (dictionary["CETEST"] == "auto")
@@ -2537,11 +2563,6 @@ void Configure::generateOutputVars()
qtConfig += "egl";
}
- if ( dictionary["OPENGL_ES_CL"] == "yes" ) {
- qtConfig += "opengles1cl";
- qtConfig += "egl";
- }
-
if ( dictionary["OPENVG"] == "yes" ) {
qtConfig += "openvg";
qtConfig += "egl";
@@ -2597,6 +2618,11 @@ void Configure::generateOutputVars()
qtConfig += "multimedia";
if (dictionary["AUDIO_BACKEND"] == "yes")
qtConfig += "audio-backend";
+ if (dictionary["MEDIASERVICE"] == "yes") {
+ qtConfig += "mediaservice";
+ if (dictionary["WMSDK"] == "yes")
+ qtConfig += "wmsdk";
+ }
}
if (dictionary["WEBKIT"] == "yes")
@@ -2649,6 +2675,8 @@ void Configure::generateOutputVars()
dictionary[ "QT_INSTALL_BINS" ] = qipempty ? "" : fixSeparators( dictionary[ "QT_INSTALL_PREFIX" ] + "/bin" );
if( !dictionary[ "QT_INSTALL_PLUGINS" ].size() )
dictionary[ "QT_INSTALL_PLUGINS" ] = qipempty ? "" : fixSeparators( dictionary[ "QT_INSTALL_PREFIX" ] + "/plugins" );
+ if( !dictionary[ "QT_INSTALL_IMPORTS" ].size() )
+ dictionary[ "QT_INSTALL_IMPORTS" ] = qipempty ? "" : fixSeparators( dictionary[ "QT_INSTALL_PREFIX" ] + "/imports" );
if( !dictionary[ "QT_INSTALL_DATA" ].size() )
dictionary[ "QT_INSTALL_DATA" ] = qipempty ? "" : fixSeparators( dictionary[ "QT_INSTALL_PREFIX" ] );
if( !dictionary[ "QT_INSTALL_TRANSLATIONS" ].size() )
@@ -2851,6 +2879,9 @@ void Configure::generateCachefile()
if(!dictionary["ARM_FPU_TYPE"].isEmpty()) {
configStream<<"MMP_RULES += \"ARMFPU "<< dictionary["ARM_FPU_TYPE"]<< "\"";
}
+ if (!dictionary["QT_NAMESPACE"].isEmpty()) {
+ configStream << "#namespaces" << endl << "QT_NAMESPACE = " << dictionary["QT_NAMESPACE"] << endl;
+ }
configStream.flush();
configFile.close();
@@ -2995,13 +3026,10 @@ void Configure::generateConfigfiles()
if(dictionary["NATIVE_GESTURES"] == "no") qconfigList += "QT_NO_NATIVE_GESTURES";
if(dictionary["OPENGL_ES_CM"] == "yes" ||
- dictionary["OPENGL_ES_CL"] == "yes" ||
dictionary["OPENGL_ES_2"] == "yes") qconfigList += "QT_OPENGL_ES";
if(dictionary["OPENGL_ES_CM"] == "yes") qconfigList += "QT_OPENGL_ES_1";
if(dictionary["OPENGL_ES_2"] == "yes") qconfigList += "QT_OPENGL_ES_2";
- if(dictionary["OPENGL_ES_CL"] == "yes") qconfigList += "QT_OPENGL_ES_1_CL";
-
if(dictionary["SQL_MYSQL"] == "yes") qconfigList += "QT_SQL_MYSQL";
if(dictionary["SQL_ODBC"] == "yes") qconfigList += "QT_SQL_ODBC";
if(dictionary["SQL_OCI"] == "yes") qconfigList += "QT_SQL_OCI";
@@ -3153,6 +3181,7 @@ void Configure::generateConfigfiles()
<< "static const char qt_configure_libraries_path_str [512 + 12] = \"qt_libspath=" << QString(dictionary["QT_INSTALL_LIBS"]).replace( "\\", "\\\\" ) << "\";" << endl
<< "static const char qt_configure_binaries_path_str [512 + 12] = \"qt_binspath=" << QString(dictionary["QT_INSTALL_BINS"]).replace( "\\", "\\\\" ) << "\";" << endl
<< "static const char qt_configure_plugins_path_str [512 + 12] = \"qt_plugpath=" << QString(dictionary["QT_INSTALL_PLUGINS"]).replace( "\\", "\\\\" ) << "\";" << endl
+ << "static const char qt_configure_imports_path_str [512 + 12] = \"qt_impspath=" << QString(dictionary["QT_INSTALL_IMPORTS"]).replace( "\\", "\\\\" ) << "\";" << endl
<< "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << QString(dictionary["QT_INSTALL_DATA"]).replace( "\\", "\\\\" ) << "\";" << endl
<< "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << QString(dictionary["QT_INSTALL_TRANSLATIONS"]).replace( "\\", "\\\\" ) << "\";" << endl
<< "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << QString(dictionary["QT_INSTALL_EXAMPLES"]).replace( "\\", "\\\\" ) << "\";" << endl
@@ -3167,6 +3196,7 @@ void Configure::generateConfigfiles()
<< "static const char qt_configure_libraries_path_str [512 + 12] = \"qt_libspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/lib").replace( "\\", "\\\\" ) <<"\";" << endl
<< "static const char qt_configure_binaries_path_str [512 + 12] = \"qt_binspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/bin").replace( "\\", "\\\\" ) <<"\";" << endl
<< "static const char qt_configure_plugins_path_str [512 + 12] = \"qt_plugpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/plugins").replace( "\\", "\\\\" ) <<"\";" << endl
+ << "static const char qt_configure_imports_path_str [512 + 12] = \"qt_impspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/imports").replace( "\\", "\\\\" ) <<"\";" << endl
<< "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ]).replace( "\\", "\\\\" ) <<"\";" << endl
<< "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/translations").replace( "\\", "\\\\" ) <<"\";" << endl
<< "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/example").replace( "\\", "\\\\" ) <<"\";" << endl
@@ -3182,6 +3212,7 @@ void Configure::generateConfigfiles()
<< "#define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;" << endl
<< "#define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;" << endl
<< "#define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;" << endl
+ << "#define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;" << endl
<< "#define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;" << endl
<< "#define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;" << endl
<< "#define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;" << endl
@@ -3328,6 +3359,7 @@ void Configure::displayConfig()
cout << "Headers installed to........" << dictionary[ "QT_INSTALL_HEADERS" ] << endl;
cout << "Libraries installed to......" << dictionary[ "QT_INSTALL_LIBS" ] << endl;
cout << "Plugins installed to........" << dictionary[ "QT_INSTALL_PLUGINS" ] << endl;
+ cout << "Imports installed to........" << dictionary[ "QT_INSTALL_IMPORTS" ] << endl;
cout << "Binaries installed to......." << dictionary[ "QT_INSTALL_BINS" ] << endl;
cout << "Docs installed to..........." << dictionary[ "QT_INSTALL_DOCS" ] << endl;
cout << "Data installed to..........." << dictionary[ "QT_INSTALL_DATA" ] << endl;
diff --git a/tools/designer/src/components/formeditor/formeditor.pri b/tools/designer/src/components/formeditor/formeditor.pri
index bbe96d5ca8..b1a93188a3 100644
--- a/tools/designer/src/components/formeditor/formeditor.pri
+++ b/tools/designer/src/components/formeditor/formeditor.pri
@@ -8,6 +8,7 @@ FORMS += $$PWD/deviceprofiledialog.ui \
$$PWD/templateoptionspage.ui
HEADERS += $$PWD/qdesigner_resource.h \
+ $$PWD/qdesignerundostack.h \
$$PWD/formwindow.h \
$$PWD/formwindow_widgetstack.h \
$$PWD/formwindow_dnditem.h \
@@ -41,6 +42,7 @@ HEADERS += $$PWD/qdesigner_resource.h \
$$PWD/templateoptionspage.h
SOURCES += $$PWD/qdesigner_resource.cpp \
+ $$PWD/qdesignerundostack.cpp \
$$PWD/formwindow.cpp \
$$PWD/formwindow_widgetstack.cpp \
$$PWD/formwindow_dnditem.cpp \
diff --git a/tools/designer/src/components/formeditor/formwindow.cpp b/tools/designer/src/components/formeditor/formwindow.cpp
index 9fd084d769..15775f611e 100644
--- a/tools/designer/src/components/formeditor/formwindow.cpp
+++ b/tools/designer/src/components/formeditor/formwindow.cpp
@@ -399,8 +399,7 @@ void FormWindow::setCursorToAll(const QCursor &c, QWidget *start)
void FormWindow::init()
{
if (FormWindowManager *manager = qobject_cast<FormWindowManager*> (core()->formWindowManager())) {
- m_commandHistory = new QUndoStack(this);
- manager->undoGroup()->addStack(m_commandHistory);
+ manager->undoGroup()->addStack(m_undoStack.qundoStack());
}
m_blockSelectionChanged = false;
@@ -429,9 +428,8 @@ void FormWindow::init()
m_mainContainer = 0;
m_currentWidget = 0;
- connect(m_commandHistory, SIGNAL(indexChanged(int)), this, SLOT(updateDirty()));
- connect(m_commandHistory, SIGNAL(indexChanged(int)), this, SIGNAL(changed()));
- connect(m_commandHistory, SIGNAL(indexChanged(int)), this, SLOT(checkSelection()));
+ connect(&m_undoStack, SIGNAL(changed()), this, SIGNAL(changed()));
+ connect(&m_undoStack, SIGNAL(changed()), this, SLOT(checkSelection()));
core()->metaDataBase()->add(this);
@@ -484,6 +482,7 @@ void FormWindow::setMainContainer(QWidget *w)
sheet->setVisible(sheet->indexOf(QLatin1String("windowTitle")), true);
sheet->setVisible(sheet->indexOf(QLatin1String("windowIcon")), true);
sheet->setVisible(sheet->indexOf(QLatin1String("windowModality")), true);
+ sheet->setVisible(sheet->indexOf(QLatin1String("windowOpacity")), true);
sheet->setVisible(sheet->indexOf(QLatin1String("windowFilePath")), true);
// ### generalize
}
@@ -1226,14 +1225,14 @@ void FormWindow::insertWidget(QWidget *w, const QRect &rect, QWidget *container,
if (w->parentWidget() != container) {
ReparentWidgetCommand *cmd = new ReparentWidgetCommand(this);
cmd->init(w, container);
- m_commandHistory->push(cmd);
+ m_undoStack.push(cmd);
}
- m_commandHistory->push(geom_cmd);
+ m_undoStack.push(geom_cmd);
InsertWidgetCommand *cmd = new InsertWidgetCommand(this);
cmd->init(w, already_in_form);
- m_commandHistory->push(cmd);
+ m_undoStack.push(cmd);
endCommand();
@@ -1276,12 +1275,10 @@ void FormWindow::resizeWidget(QWidget *widget, const QRect &geometry)
Q_ASSERT(isDescendant(this, widget));
QRect r = geometry;
- if (m_lastIndex > m_commandHistory->index())
- m_lastIndex = -1;
SetPropertyCommand *cmd = new SetPropertyCommand(this);
cmd->init(widget, QLatin1String("geometry"), r);
cmd->setText(tr("Resize"));
- m_commandHistory->push(cmd);
+ m_undoStack.push(cmd);
}
void FormWindow::raiseChildSelections(QWidget *w)
@@ -1427,26 +1424,125 @@ int FormWindow::calcValue(int val, bool forward, bool snap, int snapOffset) cons
return (forward ? val + 1 : val - 1);
}
-QRect FormWindow::applyValue(const QRect &rect, int val, int key, bool size) const
+// ArrowKeyOperation: Stores a keyboard move or resize (Shift pressed)
+// operation.
+struct ArrowKeyOperation {
+ ArrowKeyOperation() : resize(false), distance(0), arrowKey(Qt::Key_Left) {}
+
+ QRect apply(const QRect &in) const;
+
+ bool resize; // Resize: Shift-Key->drag bottom/right corner, else just move
+ int distance;
+ int arrowKey;
+};
+
+} // namespace
+
+QT_END_NAMESPACE
+Q_DECLARE_METATYPE(qdesigner_internal::ArrowKeyOperation)
+QT_BEGIN_NAMESPACE
+
+namespace qdesigner_internal {
+
+QRect ArrowKeyOperation::apply(const QRect &rect) const
{
QRect r = rect;
- if (size) {
- if (key == Qt::Key_Left || key == Qt::Key_Right)
- r.setWidth(val);
+ if (resize) {
+ if (arrowKey == Qt::Key_Left || arrowKey == Qt::Key_Right)
+ r.setWidth(r.width() + distance);
else
- r.setHeight(val);
+ r.setHeight(r.height() + distance);
} else {
- if (key == Qt::Key_Left || key == Qt::Key_Right)
- r.moveLeft(val);
+ if (arrowKey == Qt::Key_Left || arrowKey == Qt::Key_Right)
+ r.moveLeft(r.x() + distance);
else
- r.moveTop(val);
+ r.moveTop(r.y() + distance);
}
return r;
}
+QDebug operator<<(QDebug in, const ArrowKeyOperation &op)
+{
+ in.nospace() << "Resize=" << op.resize << " dist=" << op.distance << " Key=" << op.arrowKey << ' ';
+ return in;
+}
+
+// ArrowKeyPropertyHelper: Applies a struct ArrowKeyOperation
+// (stored as new value) to a list of widgets using to calculate the
+// changed geometry of the widget in setValue(). Thus, the 'newValue'
+// of the property command is the relative move distance, which is the same
+// for all widgets (although resulting in different geometries for the widgets).
+// The command merging can then work as it would when applying the same text
+// to all QLabels.
+
+class ArrowKeyPropertyHelper : public PropertyHelper {
+public:
+ ArrowKeyPropertyHelper(QObject* o, SpecialProperty sp,
+ QDesignerPropertySheetExtension *s, int i) :
+ PropertyHelper(o, sp, s, i) {}
+
+ virtual Value setValue(QDesignerFormWindowInterface *fw, const QVariant &value, bool changed, unsigned subPropertyMask);
+};
+
+PropertyHelper::Value ArrowKeyPropertyHelper::setValue(QDesignerFormWindowInterface *fw, const QVariant &value, bool changed, unsigned subPropertyMask)
+{
+ // Apply operation to obtain the new geometry value.
+ QWidget *w = qobject_cast<QWidget*>(object());
+ const ArrowKeyOperation operation = qvariant_cast<ArrowKeyOperation>(value);
+ const QRect newGeom = operation.apply(w->geometry());
+ return PropertyHelper::setValue(fw, QVariant(newGeom), changed, subPropertyMask);
+}
+
+// ArrowKeyPropertyCommand: Helper factory overwritten to create
+// ArrowKeyPropertyHelper and a merge operation that merges values of
+// the same direction.
+class ArrowKeyPropertyCommand: public SetPropertyCommand {
+public:
+ explicit ArrowKeyPropertyCommand(QDesignerFormWindowInterface *fw,
+ QUndoCommand *p = 0);
+
+ void init(QWidgetList &l, const ArrowKeyOperation &op);
+
+protected:
+ virtual PropertyHelper *createPropertyHelper(QObject *o, SpecialProperty sp,
+ QDesignerPropertySheetExtension *s, int i) const
+ { return new ArrowKeyPropertyHelper(o, sp, s, i); }
+ virtual QVariant mergeValue(const QVariant &newValue);
+};
+
+ArrowKeyPropertyCommand::ArrowKeyPropertyCommand(QDesignerFormWindowInterface *fw,
+ QUndoCommand *p) :
+ SetPropertyCommand(fw, p)
+{
+ static const int mid = qRegisterMetaType<qdesigner_internal::ArrowKeyOperation>();
+ Q_UNUSED(mid)
+}
+
+void ArrowKeyPropertyCommand::init(QWidgetList &l, const ArrowKeyOperation &op)
+{
+ QObjectList ol;
+ foreach(QWidget *w, l)
+ ol.push_back(w);
+ SetPropertyCommand::init(ol, QLatin1String("geometry"), qVariantFromValue(op));
+
+ setText(op.resize ? FormWindow::tr("Key Resize") : FormWindow::tr("Key Move"));
+}
+
+QVariant ArrowKeyPropertyCommand::mergeValue(const QVariant &newMergeValue)
+{
+ // Merge move operations of the same arrow key
+ if (!qVariantCanConvert<ArrowKeyOperation>(newMergeValue))
+ return QVariant();
+ ArrowKeyOperation mergedOperation = qvariant_cast<ArrowKeyOperation>(newValue());
+ const ArrowKeyOperation newMergeOperation = qvariant_cast<ArrowKeyOperation>(newMergeValue);
+ if (mergedOperation.resize != newMergeOperation.resize || mergedOperation.arrowKey != newMergeOperation.arrowKey)
+ return QVariant();
+ mergedOperation.distance += newMergeOperation.distance;
+ return qVariantFromValue(mergedOperation);
+}
+
void FormWindow::handleArrowKeyEvent(int key, Qt::KeyboardModifiers modifiers)
{
- bool startMacro = false;
const QDesignerFormWindowCursorInterface *c = cursor();
if (!c->hasSelection())
return;
@@ -1479,57 +1575,14 @@ void FormWindow::handleArrowKeyEvent(int key, Qt::KeyboardModifiers modifiers)
const int newValue = calcValue(oldValue, forward, snap, snapPoint);
- const int offset = newValue - oldValue;
-
- const int selCount = selection.count();
- // check if selection is the same as last time
- if (selCount != m_moveSelection.count() ||
- m_lastUndoIndex != m_commandHistory->index()) {
- m_moveSelection.clear();
- startMacro = true;
- } else {
- for (int index = 0; index < selCount; ++index) {
- if (m_moveSelection[index]->object() != selection.at(index)) {
- m_moveSelection.clear();
- startMacro = true;
- break;
- }
- }
- }
-
- if (startMacro)
- beginCommand(tr("Key Move"));
-
- for (int index = 0; index < selCount; ++index) {
- QWidget *w = selection.at(index);
- const QRect oldGeom = w->geometry();
- const QRect geom = applyValue(oldGeom, getValue(oldGeom, key, size) + offset, key, size);
-
- SetPropertyCommand *cmd = 0;
+ ArrowKeyOperation operation;
+ operation.resize = modifiers & Qt::ShiftModifier;
+ operation.distance = newValue - oldValue;
+ operation.arrowKey = key;
- if (m_moveSelection.count() > index)
- cmd = m_moveSelection[index];
-
- if (!cmd) {
- cmd = new SetPropertyCommand(this);
- cmd->init(w, QLatin1String("geometry"), geom);
- cmd->setText(tr("Key Move"));
- m_commandHistory->push(cmd);
-
- if (m_moveSelection.count() > index)
- m_moveSelection.replace(index, cmd);
- else
- m_moveSelection.append(cmd);
- } else {
- cmd->setNewValue(geom);
- cmd->redo();
- }
- }
-
- if (startMacro) {
- endCommand();
- m_lastUndoIndex = m_commandHistory->index();
- }
+ ArrowKeyPropertyCommand *cmd = new ArrowKeyPropertyCommand(this);
+ cmd->init(selection, operation);
+ m_undoStack.push(cmd);
}
bool FormWindow::handleKeyReleaseEvent(QWidget *, QWidget *, QKeyEvent *e)
@@ -1808,7 +1861,7 @@ void FormWindow::paste(PasteMode pasteMode)
foreach (QWidget *w, clipboard.m_widgets) {
InsertWidgetCommand *cmd = new InsertWidgetCommand(this);
cmd->init(w);
- m_commandHistory->push(cmd);
+ m_undoStack.push(cmd);
selectWidget(w);
}
}
@@ -1818,7 +1871,7 @@ void FormWindow::paste(PasteMode pasteMode)
ensureUniqueObjectName(a);
AddActionCommand *cmd = new AddActionCommand(this);
cmd->init(a);
- m_commandHistory->push(cmd);
+ m_undoStack.push(cmd);
}
endCommand();
} while (false);
@@ -1954,14 +2007,12 @@ void FormWindow::breakLayout(QWidget *w)
void FormWindow::beginCommand(const QString &description)
{
- if (m_lastIndex > m_commandHistory->index())
- m_lastIndex = -1;
- m_commandHistory->beginMacro(description);
+ m_undoStack.beginMacro(description);
}
void FormWindow::endCommand()
{
- m_commandHistory->endMacro();
+ m_undoStack.endMacro();
}
void FormWindow::raiseWidgets()
@@ -1976,7 +2027,7 @@ void FormWindow::raiseWidgets()
foreach (QWidget *widget, widgets) {
RaiseWidgetCommand *cmd = new RaiseWidgetCommand(this);
cmd->init(widget);
- m_commandHistory->push(cmd);
+ m_undoStack.push(cmd);
}
endCommand();
}
@@ -1993,7 +2044,7 @@ void FormWindow::lowerWidgets()
foreach (QWidget *widget, widgets) {
LowerWidgetCommand *cmd = new LowerWidgetCommand(this);
cmd->init(widget);
- m_commandHistory->push(cmd);
+ m_undoStack.push(cmd);
}
endCommand();
}
@@ -2374,20 +2425,12 @@ FormWindow *FormWindow::findFormWindow(QWidget *w)
bool FormWindow::isDirty() const
{
- return m_dirty;
+ return m_undoStack.isDirty();
}
void FormWindow::setDirty(bool dirty)
{
- m_dirty = dirty;
-
- if (!m_dirty)
- m_lastIndex = m_commandHistory->index();
-}
-
-void FormWindow::updateDirty()
-{
- m_dirty = m_commandHistory->index() != m_lastIndex;
+ m_undoStack.setDirty(dirty);
}
QWidget *FormWindow::containerAt(const QPoint &pos)
@@ -2756,7 +2799,7 @@ bool FormWindow::dropDockWidget(QDesignerDnDItemInterface *item, const QPoint &g
qVariantSetValue(v, e);
SetPropertyCommand *cmd = new SetPropertyCommand(this);
cmd->init(widget, dockWidgetAreaName, v);
- m_commandHistory->push(cmd);
+ m_undoStack.push(cmd);
}
endCommand();
@@ -2920,6 +2963,12 @@ QWidget *FormWindow::formContainer() const
return m_widgetStack->formContainer();
}
+QUndoStack *FormWindow::commandHistory() const
+{
+ return const_cast<QDesignerUndoStack &>(m_undoStack).qundoStack();
+}
+
} // namespace
QT_END_NAMESPACE
+
diff --git a/tools/designer/src/components/formeditor/formwindow.h b/tools/designer/src/components/formeditor/formwindow.h
index 3eee4762dd..dc0026f3a1 100644
--- a/tools/designer/src/components/formeditor/formwindow.h
+++ b/tools/designer/src/components/formeditor/formwindow.h
@@ -43,6 +43,7 @@
#define FORMWINDOW_H
#include "formeditor_global.h"
+#include "qdesignerundostack.h"
#include <formwindowbase_p.h>
// Qt
@@ -64,7 +65,6 @@ class QLabel;
class QTimer;
class QAction;
class QMenu;
-class QUndoStack;
class QRubberBand;
namespace qdesigner_internal {
@@ -165,9 +165,7 @@ public:
void manageWidget(QWidget *w);
void unmanageWidget(QWidget *w);
- inline QUndoStack *commandHistory() const
- { return m_commandHistory; }
-
+ virtual QUndoStack *commandHistory() const;
void beginCommand(const QString &description);
void endCommand();
@@ -238,7 +236,6 @@ protected:
private slots:
void selectionChangedTimerDone();
- void updateDirty();
void checkSelection();
void checkSelectionNow();
void slotSelectWidget(QAction *);
@@ -263,7 +260,6 @@ private:
int getValue(const QRect &rect, int key, bool size) const;
int calcValue(int val, bool forward, bool snap, int snapOffset) const;
- QRect applyValue(const QRect &rect, int val, int key, bool size) const;
void handleClickSelection(QWidget *managedWidget, unsigned mouseFlags);
bool frameNeeded(QWidget *w) const;
@@ -338,7 +334,7 @@ private:
QPoint m_startPos;
- QUndoStack *m_commandHistory;
+ QDesignerUndoStack m_undoStack;
QString m_fileName;
@@ -352,9 +348,6 @@ private:
QTimer *m_checkSelectionTimer;
QTimer *m_geometryChangedTimer;
- int m_dirty;
- int m_lastIndex;
-
FormWindowWidgetStack *m_widgetStack;
WidgetEditorTool *m_widgetEditor;
@@ -368,8 +361,6 @@ private:
QString m_exportMacro;
QStringList m_includeHints;
- QList<SetPropertyCommand*> m_moveSelection;
- int m_lastUndoIndex;
QPoint m_contextMenuPosition;
private:
diff --git a/tools/designer/src/components/formeditor/qdesignerundostack.cpp b/tools/designer/src/components/formeditor/qdesignerundostack.cpp
new file mode 100644
index 0000000000..007031d2c6
--- /dev/null
+++ b/tools/designer/src/components/formeditor/qdesignerundostack.cpp
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** 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 Qt Designer of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdesignerundostack.h"
+
+#include <QtGui/QUndoStack>
+#include <QtGui/QUndoCommand>
+
+QT_BEGIN_NAMESPACE
+
+namespace qdesigner_internal {
+
+QDesignerUndoStack::QDesignerUndoStack(QObject *parent) :
+ QObject(parent),
+ m_undoStack(new QUndoStack),
+ m_fakeDirty(false)
+{
+ connect(m_undoStack, SIGNAL(indexChanged(int)), this, SIGNAL(changed()));
+}
+
+QDesignerUndoStack::~QDesignerUndoStack()
+{ // QUndoStack is managed by the QUndoGroup
+}
+
+void QDesignerUndoStack::push(QUndoCommand * cmd)
+{
+ m_undoStack->push(cmd);
+}
+
+void QDesignerUndoStack::beginMacro(const QString &text)
+{
+ m_undoStack->beginMacro(text);
+}
+
+void QDesignerUndoStack::endMacro()
+{
+ m_undoStack->endMacro();
+}
+
+int QDesignerUndoStack::index() const
+{
+ return m_undoStack->index();
+}
+
+const QUndoStack *QDesignerUndoStack::qundoStack() const
+{
+ return m_undoStack;
+}
+QUndoStack *QDesignerUndoStack::qundoStack()
+{
+ return m_undoStack;
+}
+
+bool QDesignerUndoStack::isDirty() const
+{
+ return m_fakeDirty || !m_undoStack->isClean();
+}
+
+void QDesignerUndoStack::setDirty(bool v)
+{
+ if (isDirty() == v)
+ return;
+ if (v) {
+ m_fakeDirty = true;
+ emit changed();
+ } else {
+ m_fakeDirty = false;
+ m_undoStack->setClean();
+ }
+}
+
+} // namespace qdesigner_internal
+
+QT_END_NAMESPACE
diff --git a/tools/designer/src/components/formeditor/qdesignerundostack.h b/tools/designer/src/components/formeditor/qdesignerundostack.h
new file mode 100644
index 0000000000..5451ad83f8
--- /dev/null
+++ b/tools/designer/src/components/formeditor/qdesignerundostack.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** 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 Qt Designer of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDESIGNERUNDOSTACK_H
+#define QDESIGNERUNDOSTACK_H
+
+#include <QtCore/QObject>
+
+QT_BEGIN_NAMESPACE
+class QUndoStack;
+class QUndoCommand;
+
+namespace qdesigner_internal {
+
+/* QDesignerUndoStack: A QUndoStack extended by a way of setting it to
+ * "dirty" indepently of commands (by modifications without commands
+ * such as resizing). Accomplished via bool m_fakeDirty flag. The
+ * lifecycle of the QUndoStack is managed by the QUndoGroup. */
+class QDesignerUndoStack : public QObject
+{
+ Q_DISABLE_COPY(QDesignerUndoStack)
+ Q_OBJECT
+public:
+ explicit QDesignerUndoStack(QObject *parent = 0);
+ virtual ~QDesignerUndoStack();
+
+ void push(QUndoCommand * cmd);
+ void beginMacro(const QString &text);
+ void endMacro();
+ int index() const;
+
+ const QUndoStack *qundoStack() const;
+ QUndoStack *qundoStack();
+
+ bool isDirty() const;
+
+signals:
+ void changed();
+
+public slots:
+ void setDirty(bool);
+
+private:
+ QUndoStack *m_undoStack;
+ bool m_fakeDirty;
+};
+
+} // namespace qdesigner_internal
+
+QT_END_NAMESPACE
+
+#endif // QDESIGNERUNDOSTACK_H
diff --git a/tools/designer/src/components/propertyeditor/propertyeditor.cpp b/tools/designer/src/components/propertyeditor/propertyeditor.cpp
index b171ddca71..512cc82887 100644
--- a/tools/designer/src/components/propertyeditor/propertyeditor.cpp
+++ b/tools/designer/src/components/propertyeditor/propertyeditor.cpp
@@ -1175,11 +1175,11 @@ void PropertyEditor::slotValueChanged(QtProperty *property, const QVariant &valu
Q_ASSERT(ok);
QVariant v;
qVariantSetValue(v, e);
- emit propertyValueChanged(property->propertyName(), v, true);
+ emitPropertyValueChanged(property->propertyName(), v, true);
return;
}
- emit propertyValueChanged(property->propertyName(), value, enableSubPropertyHandling);
+ emitPropertyValueChanged(property->propertyName(), value, enableSubPropertyHandling);
}
bool PropertyEditor::isDynamicProperty(const QtBrowserItem* item) const
diff --git a/tools/designer/src/components/widgetbox/widgetboxcategorylistview.cpp b/tools/designer/src/components/widgetbox/widgetboxcategorylistview.cpp
index 674c3a8f08..1a8611c18d 100644
--- a/tools/designer/src/components/widgetbox/widgetboxcategorylistview.cpp
+++ b/tools/designer/src/components/widgetbox/widgetboxcategorylistview.cpp
@@ -88,11 +88,15 @@ namespace qdesigner_internal {
struct WidgetBoxCategoryEntry {
WidgetBoxCategoryEntry();
- explicit WidgetBoxCategoryEntry(const QDesignerWidgetBoxInterface::Widget &widget, const QIcon &icon, bool editable);
+ explicit WidgetBoxCategoryEntry(const QDesignerWidgetBoxInterface::Widget &widget,
+ const QString &filter,
+ const QIcon &icon,
+ bool editable);
QDesignerWidgetBoxInterface::Widget widget;
QString toolTip;
QString whatsThis;
+ QString filter;
QIcon icon;
bool editable;
};
@@ -103,8 +107,11 @@ WidgetBoxCategoryEntry::WidgetBoxCategoryEntry() :
{
}
-WidgetBoxCategoryEntry::WidgetBoxCategoryEntry(const QDesignerWidgetBoxInterface::Widget &w, const QIcon &i, bool e) :
+WidgetBoxCategoryEntry::WidgetBoxCategoryEntry(const QDesignerWidgetBoxInterface::Widget &w,
+ const QString &filterIn,
+ const QIcon &i, bool e) :
widget(w),
+ filter(filterIn),
icon(i),
editable(e)
{
@@ -142,6 +149,7 @@ public:
private:
typedef QList<WidgetBoxCategoryEntry> WidgetBoxCategoryEntrys;
+ QRegExp m_classNameRegExp;
QDesignerFormEditorInterface *m_core;
WidgetBoxCategoryEntrys m_items;
QListView::ViewMode m_viewMode;
@@ -149,9 +157,11 @@ private:
WidgetBoxCategoryModel::WidgetBoxCategoryModel(QDesignerFormEditorInterface *core, QObject *parent) :
QAbstractListModel(parent),
+ m_classNameRegExp(QLatin1String("<widget +class *= *\"([^\"]+)\"")),
m_core(core),
m_viewMode(QListView::ListMode)
{
+ Q_ASSERT(m_classNameRegExp.isValid());
}
QListView::ViewMode WidgetBoxCategoryModel::viewMode() const
@@ -205,8 +215,14 @@ bool WidgetBoxCategoryModel::removeCustomWidgets()
void WidgetBoxCategoryModel::addWidget(const QDesignerWidgetBoxInterface::Widget &widget, const QIcon &icon,bool editable)
{
- // build item
- WidgetBoxCategoryEntry item(widget, icon, editable);
+ // build item. Filter on name + class name if it is different and not a layout.
+ QString filter = widget.name();
+ if (!filter.contains(QLatin1String("Layout")) && m_classNameRegExp.indexIn(widget.domXml()) != -1) {
+ const QString className = m_classNameRegExp.cap(1);
+ if (!filter.contains(className))
+ filter += className;
+ }
+ WidgetBoxCategoryEntry item(widget, filter, icon, editable);
const QDesignerWidgetDataBaseInterface *db = m_core->widgetDataBase();
const int dbIndex = db->indexOfClassName(widget.name());
if (dbIndex != -1) {
@@ -255,7 +271,7 @@ QVariant WidgetBoxCategoryModel::data(const QModelIndex &index, int role) const
case Qt::WhatsThisRole:
return QVariant(item.whatsThis);
case FilterRole:
- return item.widget.name();
+ return item.filter;
}
return QVariant();
}
diff --git a/tools/designer/src/lib/shared/formwindowbase.cpp b/tools/designer/src/lib/shared/formwindowbase.cpp
index 2c5efbf94c..5292f5fa58 100644
--- a/tools/designer/src/lib/shared/formwindowbase.cpp
+++ b/tools/designer/src/lib/shared/formwindowbase.cpp
@@ -72,6 +72,7 @@
#include <QtGui/QStatusBar>
#include <QtGui/QMenu>
#include <QtGui/QAction>
+#include <QtGui/QLabel>
QT_BEGIN_NAMESPACE
@@ -181,7 +182,17 @@ void FormWindowBase::reloadProperties()
QMapIterator<int, bool> itIndex(itSheet.value());
while (itIndex.hasNext()) {
const int index = itIndex.next().key();
- sheet->setProperty(index, sheet->property(index));
+ const QVariant newValue = sheet->property(index);
+ if (qobject_cast<QLabel *>(sheet->object()) && sheet->propertyName(index) == QLatin1String("text")) {
+ const PropertySheetStringValue newString = qVariantValue<PropertySheetStringValue>(newValue);
+ // optimize a bit, reset only if the text value might contain a reference to qt resources
+ // (however reloading of icons other than taken from resources might not work here)
+ if (newString.value().contains(QLatin1String(":/"))) {
+ const QVariant resetValue = qVariantFromValue(PropertySheetStringValue());
+ sheet->setProperty(index, resetValue);
+ }
+ }
+ sheet->setProperty(index, newValue);
}
if (QTabWidget *tabWidget = qobject_cast<QTabWidget *>(sheet->object())) {
const int count = tabWidget->count();
diff --git a/tools/designer/src/lib/shared/qdesigner_formwindowcommand.cpp b/tools/designer/src/lib/shared/qdesigner_formwindowcommand.cpp
index 8c55d263b6..490373e13c 100644
--- a/tools/designer/src/lib/shared/qdesigner_formwindowcommand.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_formwindowcommand.cpp
@@ -62,8 +62,10 @@ QT_BEGIN_NAMESPACE
namespace qdesigner_internal {
// ---- QDesignerFormWindowCommand ----
-QDesignerFormWindowCommand::QDesignerFormWindowCommand(const QString &description, QDesignerFormWindowInterface *formWindow)
- : QUndoCommand(description),
+QDesignerFormWindowCommand::QDesignerFormWindowCommand(const QString &description,
+ QDesignerFormWindowInterface *formWindow,
+ QUndoCommand *parent)
+ : QUndoCommand(description, parent),
m_formWindow(formWindow)
{
}
diff --git a/tools/designer/src/lib/shared/qdesigner_formwindowcommand_p.h b/tools/designer/src/lib/shared/qdesigner_formwindowcommand_p.h
index d8cd018904..d73d70c382 100644
--- a/tools/designer/src/lib/shared/qdesigner_formwindowcommand_p.h
+++ b/tools/designer/src/lib/shared/qdesigner_formwindowcommand_p.h
@@ -70,7 +70,9 @@ class QDESIGNER_SHARED_EXPORT QDesignerFormWindowCommand: public QUndoCommand
{
public:
- QDesignerFormWindowCommand(const QString &description, QDesignerFormWindowInterface *formWindow);
+ QDesignerFormWindowCommand(const QString &description,
+ QDesignerFormWindowInterface *formWindow,
+ QUndoCommand *parent = 0);
virtual void undo();
virtual void redo();
diff --git a/tools/designer/src/lib/shared/qdesigner_propertycommand.cpp b/tools/designer/src/lib/shared/qdesigner_propertycommand.cpp
index 822c14bad2..6cc054c8b4 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertycommand.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_propertycommand.cpp
@@ -926,8 +926,9 @@ bool PropertyListCommand::PropertyDescription::equals(const PropertyDescription
// ---- PropertyListCommand
-PropertyListCommand::PropertyListCommand(QDesignerFormWindowInterface *formWindow) :
- QDesignerFormWindowCommand(QString(), formWindow)
+PropertyListCommand::PropertyListCommand(QDesignerFormWindowInterface *formWindow,
+ QUndoCommand *parent) :
+ QDesignerFormWindowCommand(QString(), formWindow, parent)
{
}
@@ -966,10 +967,17 @@ bool PropertyListCommand::add(QObject *object, const QString &propertyName)
if (!match || m_propertyDescription.m_specialProperty == SP_ObjectName)
return false;
}
- m_propertyHelperList.push_back(PropertyHelper(object, m_propertyDescription.m_specialProperty, sheet, index));
+
+ const PropertyHelperPtr ph(createPropertyHelper(object, m_propertyDescription.m_specialProperty, sheet, index));
+ m_propertyHelperList.push_back(ph);
return true;
}
+PropertyHelper *PropertyListCommand::createPropertyHelper(QObject *object, SpecialProperty sp,
+ QDesignerPropertySheetExtension *sheet, int sheetIndex) const
+{
+ return new PropertyHelper(object, sp, sheet, sheetIndex);
+}
// Init from a list and make sure referenceObject is added first to obtain the right property group
bool PropertyListCommand::initList(const ObjectList &list, const QString &apropertyName, QObject *referenceObject)
@@ -993,19 +1001,19 @@ bool PropertyListCommand::initList(const ObjectList &list, const QString &aprope
QObject* PropertyListCommand::object(int index) const
{
Q_ASSERT(index < m_propertyHelperList.size());
- return m_propertyHelperList[index].object();
+ return m_propertyHelperList.at(index)->object();
}
QVariant PropertyListCommand::oldValue(int index) const
{
Q_ASSERT(index < m_propertyHelperList.size());
- return m_propertyHelperList[index].oldValue();
+ return m_propertyHelperList.at(index)->oldValue();
}
void PropertyListCommand::setOldValue(const QVariant &oldValue, int index)
{
Q_ASSERT(index < m_propertyHelperList.size());
- m_propertyHelperList[index].setOldValue(oldValue);
+ m_propertyHelperList.at(index)->setOldValue(oldValue);
}
// ----- SetValueFunction: Set a new value when applied to a PropertyHelper.
class SetValueFunction {
@@ -1065,9 +1073,10 @@ template <class PropertyListIterator, class Function>
bool updatedPropertyEditor = false;
for (PropertyListIterator it = begin; it != end; ++it) {
- if (QObject* object = it->object()) { // Might have been deleted in the meantime
- const PropertyHelper::Value newValue = function(*it);
- updateMask |= it->updateMask();
+ PropertyHelper *ph = it->data();
+ if (QObject* object = ph->object()) { // Might have been deleted in the meantime
+ const PropertyHelper::Value newValue = function( *ph );
+ updateMask |= ph->updateMask();
// Update property editor if it is the current object
if (!updatedPropertyEditor && propertyEditor && object == propertyEditor->object()) {
propertyEditor->setPropertyValue(propertyName, newValue.first, newValue.second);
@@ -1084,9 +1093,11 @@ template <class PropertyListIterator, class Function>
unsigned PropertyListCommand::setValue(QVariant value, bool changed, unsigned subPropertyMask)
{
if(debugPropertyCommands)
- qDebug() << "PropertyListCommand::setValue(" << value << changed << subPropertyMask << ')';
+ qDebug() << "PropertyListCommand::setValue(" << value
+ << changed << subPropertyMask << ')';
return changePropertyList(formWindow()->core(),
- m_propertyDescription.m_propertyName, m_propertyHelperList.begin(), m_propertyHelperList.end(),
+ m_propertyDescription.m_propertyName,
+ m_propertyHelperList.begin(), m_propertyHelperList.end(),
SetValueFunction(formWindow(), PropertyHelper::Value(value, changed), subPropertyMask));
}
@@ -1146,15 +1157,16 @@ bool PropertyListCommand::canMergeLists(const PropertyHelperList& other) const
if (m_propertyHelperList.size() != other.size())
return false;
for (int i = 0; i < m_propertyHelperList.size(); i++) {
- if (!m_propertyHelperList[i].canMerge(other[i]))
+ if (!m_propertyHelperList.at(i)->canMerge(*other.at(i)))
return false;
}
return true;
}
// ---- SetPropertyCommand ----
-SetPropertyCommand::SetPropertyCommand(QDesignerFormWindowInterface *formWindow)
- : PropertyListCommand(formWindow),
+SetPropertyCommand::SetPropertyCommand(QDesignerFormWindowInterface *formWindow,
+ QUndoCommand *parent)
+ : PropertyListCommand(formWindow, parent),
m_subPropertyMask(SubPropertyAll)
{
}
@@ -1210,7 +1222,7 @@ unsigned SetPropertyCommand::subPropertyMask(const QVariant &newValue, QObject *
void SetPropertyCommand::setDescription()
{
if (propertyHelperList().size() == 1) {
- setText(QApplication::translate("Command", "Changed '%1' of '%2'").arg(propertyName()).arg(propertyHelperList()[0].object()->objectName()));
+ setText(QApplication::translate("Command", "Changed '%1' of '%2'").arg(propertyName()).arg(propertyHelperList().at(0)->object()->objectName()));
} else {
int count = propertyHelperList().size();
setText(QApplication::translate("Command", "Changed '%1' of %n objects", "", QCoreApplication::UnicodeUTF8, count).arg(propertyName()));
@@ -1231,6 +1243,11 @@ int SetPropertyCommand::id() const
return 1976;
}
+QVariant SetPropertyCommand::mergeValue(const QVariant &newValue)
+{
+ return newValue;
+}
+
bool SetPropertyCommand::mergeWith(const QUndoCommand *other)
{
if (id() != other->id() || !formWindow()->isDirty())
@@ -1248,7 +1265,10 @@ bool SetPropertyCommand::mergeWith(const QUndoCommand *other)
!canMergeLists(cmd->propertyHelperList()))
return false;
- m_newValue = cmd->newValue();
+ const QVariant newValue = mergeValue(cmd->newValue());
+ if (!newValue.isValid())
+ return false;
+ m_newValue = newValue;
m_subPropertyMask |= cmd->m_subPropertyMask;
if(debugPropertyCommands)
qDebug() << "SetPropertyCommand::mergeWith() succeeded " << propertyName();
@@ -1289,7 +1309,7 @@ bool ResetPropertyCommand::init(const ObjectList &list, const QString &aproperty
void ResetPropertyCommand::setDescription()
{
if (propertyHelperList().size() == 1) {
- setText(QApplication::translate("Command", "Reset '%1' of '%2'").arg(propertyName()).arg(propertyHelperList()[0].object()->objectName()));
+ setText(QApplication::translate("Command", "Reset '%1' of '%2'").arg(propertyName()).arg(propertyHelperList().at(0)->object()->objectName()));
} else {
int count = propertyHelperList().size();
setText(QApplication::translate("Command", "Reset '%1' of %n objects", "", QCoreApplication::UnicodeUTF8, count).arg(propertyName()));
diff --git a/tools/designer/src/lib/shared/qdesigner_propertycommand_p.h b/tools/designer/src/lib/shared/qdesigner_propertycommand_p.h
index f6b7262032..75b23ca820 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertycommand_p.h
+++ b/tools/designer/src/lib/shared/qdesigner_propertycommand_p.h
@@ -58,6 +58,7 @@
#include <QtCore/QVariant>
#include <QtCore/QList>
#include <QtCore/QPair>
+#include <QtCore/QSharedPointer>
QT_BEGIN_NAMESPACE
@@ -77,11 +78,12 @@ enum SpecialProperty {
//Determine special property
enum SpecialProperty getSpecialProperty(const QString& propertyName);
-
// A helper class for applying properties to objects.
// Can be used for Set commands (setValue(), restoreOldValue()) or
// Reset Commands restoreDefaultValue(), restoreOldValue()).
-class PropertyHelper {
+//
+class QDESIGNER_SHARED_EXPORT PropertyHelper {
+ Q_DISABLE_COPY(PropertyHelper)
public:
// A pair of Value and changed flag
typedef QPair<QVariant, bool> Value;
@@ -92,11 +94,13 @@ public:
SpecialProperty specialProperty,
QDesignerPropertySheetExtension *sheet,
int index);
+ virtual ~PropertyHelper() {}
QObject *object() const { return m_object; }
SpecialProperty specialProperty() const { return m_specialProperty; }
- // set a new value
- Value setValue(QDesignerFormWindowInterface *fw, const QVariant &value, bool changed, unsigned subPropertyMask);
+ // set a new value. Can be overwritten to perform a transformation (see
+ // handling of Arrow key move in FormWindow class).
+ virtual Value setValue(QDesignerFormWindowInterface *fw, const QVariant &value, bool changed, unsigned subPropertyMask);
// restore old value
Value restoreOldValue(QDesignerFormWindowInterface *fw);
@@ -147,7 +151,7 @@ class QDESIGNER_SHARED_EXPORT PropertyListCommand : public QDesignerFormWindowCo
public:
typedef QList<QObject *> ObjectList;
- explicit PropertyListCommand(QDesignerFormWindowInterface *formWindow);
+ explicit PropertyListCommand(QDesignerFormWindowInterface *formWindow, QUndoCommand *parent = 0);
QObject* object(int index = 0) const;
@@ -159,8 +163,8 @@ public:
virtual void undo();
protected:
- typedef QList<PropertyHelper> PropertyHelperList;
-
+ typedef QSharedPointer<PropertyHelper> PropertyHelperPtr;
+ typedef QList<PropertyHelperPtr> PropertyHelperList;
// add an object
bool add(QObject *object, const QString &propertyName);
@@ -204,6 +208,10 @@ protected:
};
const PropertyDescription &propertyDescription() const { return m_propertyDescription; }
+protected:
+ virtual PropertyHelper *createPropertyHelper(QObject *o, SpecialProperty sp,
+ QDesignerPropertySheetExtension *sheet, int sheetIndex) const;
+
private:
PropertyDescription m_propertyDescription;
PropertyHelperList m_propertyHelperList;
@@ -215,7 +223,7 @@ class QDESIGNER_SHARED_EXPORT SetPropertyCommand: public PropertyListCommand
public:
typedef QList<QObject *> ObjectList;
- explicit SetPropertyCommand(QDesignerFormWindowInterface *formWindow);
+ explicit SetPropertyCommand(QDesignerFormWindowInterface *formWindow, QUndoCommand *parent = 0);
bool init(QObject *object, const QString &propertyName, const QVariant &newValue);
bool init(const ObjectList &list, const QString &propertyName, const QVariant &newValue,
@@ -232,6 +240,10 @@ public:
bool mergeWith(const QUndoCommand *other);
virtual void redo();
+
+protected:
+ virtual QVariant mergeValue(const QVariant &newValue);
+
private:
unsigned subPropertyMask(const QVariant &newValue, QObject *referenceObject);
void setDescription();
diff --git a/tools/designer/src/lib/shared/qdesigner_propertyeditor.cpp b/tools/designer/src/lib/shared/qdesigner_propertyeditor.cpp
index e89c47caef..9a1739e07f 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertyeditor.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_propertyeditor.cpp
@@ -92,7 +92,8 @@ static const PropertyNameTypeMap &stringPropertyTypes()
}
QDesignerPropertyEditor::QDesignerPropertyEditor(QWidget *parent, Qt::WindowFlags flags) :
- QDesignerPropertyEditorInterface(parent, flags)
+ QDesignerPropertyEditorInterface(parent, flags),
+ m_propertyChangedForwardingBlocked(false)
{
// Make old signal work for compatibility
connect(this, SIGNAL(propertyChanged(QString,QVariant)), this, SLOT(slotPropertyChanged(QString,QVariant)));
@@ -147,9 +148,20 @@ QDesignerPropertyEditor::StringPropertyParameters QDesignerPropertyEditor::textP
return StringPropertyParameters(ValidationSingleLine, true);
}
+void QDesignerPropertyEditor::emitPropertyValueChanged(const QString &name, const QVariant &value, bool enableSubPropertyHandling)
+{
+ // Avoid duplicate signal emission - see below
+ m_propertyChangedForwardingBlocked = true;
+ emit propertyValueChanged(name, value, enableSubPropertyHandling);
+ emit propertyChanged(name, value);
+ m_propertyChangedForwardingBlocked = false;
+}
+
void QDesignerPropertyEditor::slotPropertyChanged(const QString &name, const QVariant &value)
{
- emit propertyValueChanged(name, value, true);
+ // Forward signal from Integration using the old interfaces.
+ if (!m_propertyChangedForwardingBlocked)
+ emit propertyValueChanged(name, value, true);
}
}
diff --git a/tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h b/tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h
index cdd53f07fa..27078f2987 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h
+++ b/tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h
@@ -79,7 +79,6 @@ public:
static StringPropertyParameters textPropertyValidationMode(QDesignerFormEditorInterface *core,
const QObject *object, const QString &propertyName, bool isMainContainer);
-
Q_SIGNALS:
void propertyValueChanged(const QString &name, const QVariant &value, bool enableSubPropertyHandling);
void resetProperty(const QString &name);
@@ -97,6 +96,13 @@ public Q_SLOTS:
private Q_SLOTS:
void slotPropertyChanged(const QString &name, const QVariant &value);
+
+protected:
+ void emitPropertyValueChanged(const QString &name, const QVariant &value, bool enableSubPropertyHandling);
+
+private:
+ bool m_propertyChangedForwardingBlocked;
+
};
} // namespace qdesigner_internal
diff --git a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
index b4b962c398..77ab2a6e34 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
@@ -271,6 +271,7 @@ bool QDesignerPropertySheetPrivate::isReloadableProperty(int index) const
{
return isResourceProperty(index)
|| propertyType(index) == QDesignerPropertySheet::PropertyStyleSheet
+ || propertyType(index) == QDesignerPropertySheet::PropertyText
|| q->property(index).type() == QVariant::Url;
}
@@ -549,6 +550,7 @@ QDesignerPropertySheet::PropertyType QDesignerPropertySheet::propertyTypeFromNam
propertyTypeHash.insert(QLatin1String("windowModality"), PropertyWindowModality);
propertyTypeHash.insert(QLatin1String("windowModified"), PropertyWindowModified);
propertyTypeHash.insert(QLatin1String("styleSheet"), PropertyStyleSheet);
+ propertyTypeHash.insert(QLatin1String("text"), PropertyText);
}
return propertyTypeHash.value(name, PropertyNone);
}
@@ -610,8 +612,9 @@ QDesignerPropertySheet::QDesignerPropertySheet(QObject *object, QObject *parent)
createFakeProperty(QLatin1String("whatsThis"));
createFakeProperty(QLatin1String("acceptDrops"));
createFakeProperty(QLatin1String("dragEnabled"));
- // windowModality is visible only for the main container, in which case the form windows enables it on loading
+ // windowModality/Opacity is visible only for the main container, in which case the form windows enables it on loading
setVisible(createFakeProperty(QLatin1String("windowModality")), false);
+ setVisible(createFakeProperty(QLatin1String("windowOpacity"), double(1.0)), false);
if (qobject_cast<const QToolBar *>(d->m_object)) { // prevent toolbars from being dragged off
createFakeProperty(QLatin1String("floatable"), QVariant(true));
} else {
@@ -1451,8 +1454,13 @@ bool QDesignerPropertySheet::isVisible(int index) const
}
if (isFakeProperty(index)) {
- if (type == PropertyWindowModality) // Hidden for child widgets
+ switch (type) {
+ case PropertyWindowModality: // Hidden for child widgets
+ case PropertyWindowOpacity:
return d->m_info.value(index).visible;
+ default:
+ break;
+ }
return true;
}
diff --git a/tools/designer/src/lib/shared/qdesigner_propertysheet_p.h b/tools/designer/src/lib/shared/qdesigner_propertysheet_p.h
index 9db7367bf8..0105eaca42 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertysheet_p.h
+++ b/tools/designer/src/lib/shared/qdesigner_propertysheet_p.h
@@ -176,7 +176,8 @@ public:
PropertyWindowIconText,
PropertyWindowModality,
PropertyWindowModified,
- PropertyStyleSheet
+ PropertyStyleSheet,
+ PropertyText
};
enum ObjectType { ObjectNone, ObjectLabel, ObjectLayout, ObjectLayoutWidget, ObjectQ3GroupBox };
diff --git a/tools/designer/src/lib/shared/qtresourceview.cpp b/tools/designer/src/lib/shared/qtresourceview.cpp
index c15942f9d5..859f239459 100644
--- a/tools/designer/src/lib/shared/qtresourceview.cpp
+++ b/tools/designer/src/lib/shared/qtresourceview.cpp
@@ -664,6 +664,8 @@ QString QtResourceView::selectedResource() const
void QtResourceView::selectResource(const QString &resource)
{
+ if (resource.isEmpty())
+ return;
QFileInfo fi(resource);
QDir dir = fi.absoluteDir();
if (fi.isDir())
diff --git a/tools/designer/src/plugins/plugins.pro b/tools/designer/src/plugins/plugins.pro
index baf5261139..cf4fa8a70c 100644
--- a/tools/designer/src/plugins/plugins.pro
+++ b/tools/designer/src/plugins/plugins.pro
@@ -7,3 +7,4 @@ win32:!contains(QT_EDITION, OpenSource):SUBDIRS += activeqt
# contains(QT_CONFIG, opengl): SUBDIRS += tools/view3d
contains(QT_CONFIG, webkit): SUBDIRS += qwebview
contains(QT_CONFIG, phonon): SUBDIRS += phononwidgets
+contains(QT_CONFIG, declarative): SUBDIRS += qdeclarativeview
diff --git a/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro
new file mode 100644
index 0000000000..b8abe87412
--- /dev/null
+++ b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro
@@ -0,0 +1,13 @@
+TEMPLATE = lib
+TARGET = qdeclarativeview
+CONFIG += qt warn_on plugin designer
+QT += declarative
+
+include(../plugins.pri)
+build_all:!build_pass {
+ CONFIG -= build_all
+ CONFIG += release
+}
+
+SOURCES += qdeclarativeview_plugin.cpp
+HEADERS += qdeclarativeview_plugin.h
diff --git a/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp
new file mode 100644
index 0000000000..b352a9b361
--- /dev/null
+++ b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp
@@ -0,0 +1,132 @@
+/****************************************************************************
+**
+** 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 Qt Designer of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeview_plugin.h"
+
+#include <QtDesigner/QExtensionFactory>
+#include <QtDesigner/QExtensionManager>
+
+#include <QtCore/qplugin.h>
+#include <QtDeclarative/QDeclarativeView>
+
+static const char toolTipC[] = "QtDeclarative view widget";
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeViewPlugin::QDeclarativeViewPlugin(QObject *parent) :
+ QObject(parent),
+ m_initialized(false)
+{
+}
+
+QString QDeclarativeViewPlugin::name() const
+{
+ return QLatin1String("QDeclarativeView");
+}
+
+QString QDeclarativeViewPlugin::group() const
+{
+ return QLatin1String("Display Widgets");
+}
+
+QString QDeclarativeViewPlugin::toolTip() const
+{
+ return QString(QLatin1String(toolTipC));
+}
+
+QString QDeclarativeViewPlugin::whatsThis() const
+{
+ return QString(QLatin1String(toolTipC));
+}
+
+QString QDeclarativeViewPlugin::includeFile() const
+{
+ return QLatin1String("QtDeclarative/QDeclarativeView");
+}
+
+QIcon QDeclarativeViewPlugin::icon() const
+{
+ return QIcon();
+}
+
+bool QDeclarativeViewPlugin::isContainer() const
+{
+ return false;
+}
+
+QWidget *QDeclarativeViewPlugin::createWidget(QWidget *parent)
+{
+ return new QDeclarativeView(parent);
+}
+
+bool QDeclarativeViewPlugin::isInitialized() const
+{
+ return m_initialized;
+}
+
+void QDeclarativeViewPlugin::initialize(QDesignerFormEditorInterface * /*core*/)
+{
+ if (m_initialized)
+ return;
+
+ m_initialized = true;
+}
+
+QString QDeclarativeViewPlugin::domXml() const
+{
+ return QLatin1String("\
+ <ui language=\"c++\">\
+ <widget class=\"QDeclarativeView\" name=\"declarativeView\">\
+ <property name=\"geometry\">\
+ <rect>\
+ <x>0</x>\
+ <y>0</y>\
+ <width>300</width>\
+ <height>200</height>\
+ </rect>\
+ </property>\
+ </widget>\
+ </ui>");
+}
+
+Q_EXPORT_PLUGIN2(customwidgetplugin, QDeclarativeViewPlugin)
+
+QT_END_NAMESPACE
diff --git a/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.h b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.h
new file mode 100644
index 0000000000..2f13f1615f
--- /dev/null
+++ b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.h
@@ -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 Qt Designer of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEVIEW_PLUGIN_H
+#define QDECLARATIVEVIEW_PLUGIN_H
+
+#include <QtDesigner/QDesignerCustomWidgetInterface>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeViewPlugin: public QObject, public QDesignerCustomWidgetInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerCustomWidgetInterface)
+public:
+ QDeclarativeViewPlugin(QObject *parent = 0);
+
+ virtual QString name() const;
+ virtual QString group() const;
+ virtual QString toolTip() const;
+ virtual QString whatsThis() const;
+ virtual QString includeFile() const;
+ virtual QIcon icon() const;
+ virtual bool isContainer() const;
+ virtual QWidget *createWidget(QWidget *parent);
+ virtual bool isInitialized() const;
+ virtual void initialize(QDesignerFormEditorInterface *core);
+ virtual QString domXml() const;
+
+private:
+ bool m_initialized;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEVIEW_PLUGIN_H
diff --git a/tools/designer/translations/translations.pro b/tools/designer/translations/translations.pro
index a1b99fd94a..103c1fe6c0 100644
--- a/tools/designer/translations/translations.pro
+++ b/tools/designer/translations/translations.pro
@@ -132,6 +132,7 @@ TRANSLATIONS = \
$$TR_DIR/designer_cs.ts \
$$TR_DIR/designer_de.ts \
$$TR_DIR/designer_fr.ts \
+ $$TR_DIR/designer_hu.ts \
$$TR_DIR/designer_ja.ts \
$$TR_DIR/designer_pl.ts \
$$TR_DIR/designer_ru.ts \
diff --git a/tools/linguist/lconvert/main.cpp b/tools/linguist/lconvert/main.cpp
index 3a30027b24..543c405f6f 100644
--- a/tools/linguist/lconvert/main.cpp
+++ b/tools/linguist/lconvert/main.cpp
@@ -48,6 +48,8 @@
#include <iostream>
+QT_USE_NAMESPACE
+
static int usage(const QStringList &args)
{
Q_UNUSED(args);
diff --git a/tools/linguist/linguist/linguist.pro b/tools/linguist/linguist/linguist.pro
index 693bc710ee..4f7ed8a77e 100644
--- a/tools/linguist/linguist/linguist.pro
+++ b/tools/linguist/linguist/linguist.pro
@@ -9,7 +9,7 @@ CONFIG += qt \
uitools
DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII
-build_all:!build_pass {
+build_all:!build_pass {
CONFIG -= build_all
CONFIG += release
}
@@ -42,7 +42,7 @@ SOURCES += \
statistics.cpp \
translatedialog.cpp \
translationsettingsdialog.cpp \
- ../shared/simtexth.cpp
+ ../shared/simtexth.cpp
HEADERS += \
batchtranslationdialog.h \
@@ -71,7 +71,7 @@ contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE
DEFINES += QT_KEYWORDS
TARGET = linguist
win32:RC_FILE = linguist.rc
-mac {
+mac {
static:CONFIG -= global_init_link_order
ICON = linguist.icns
TARGET = Linguist
@@ -100,6 +100,7 @@ TRANSLATIONS = \
$$TR_DIR/linguist_cs.ts \
$$TR_DIR/linguist_de.ts \
$$TR_DIR/linguist_fr.ts \
+ $$TR_DIR/linguist_hu.ts \
$$TR_DIR/linguist_ja.ts \
$$TR_DIR/linguist_pl.ts \
$$TR_DIR/linguist_ru.ts \
diff --git a/tools/linguist/linguist/mainwindow.ui b/tools/linguist/linguist/mainwindow.ui
index 450ce898e7..4edde5ef3b 100644
--- a/tools/linguist/linguist/mainwindow.ui
+++ b/tools/linguist/linguist/mainwindow.ui
@@ -679,7 +679,7 @@
<string>About Qt</string>
</property>
<property name="whatsThis">
- <string>Display information about the Qt toolkit by Trolltech.</string>
+ <string>Display information about the Qt toolkit by Nokia.</string>
</property>
<property name="menuRole">
<enum>QAction::AboutQtRole</enum>
diff --git a/tools/linguist/lupdate/lupdate.h b/tools/linguist/lupdate/lupdate.h
index 70332cd4bd..136884b718 100644
--- a/tools/linguist/lupdate/lupdate.h
+++ b/tools/linguist/lupdate/lupdate.h
@@ -79,6 +79,7 @@ void loadCPP(Translator &translator, const QStringList &filenames, ConversionDat
bool loadJava(Translator &translator, const QString &filename, ConversionData &cd);
bool loadQScript(Translator &translator, const QString &filename, ConversionData &cd);
bool loadUI(Translator &translator, const QString &filename, ConversionData &cd);
+bool loadQml(Translator &translator, const QString &filename, ConversionData &cd);
QT_END_NAMESPACE
diff --git a/tools/linguist/lupdate/lupdate.pro b/tools/linguist/lupdate/lupdate.pro
index ccc2d47461..1f8893139e 100644
--- a/tools/linguist/lupdate/lupdate.pro
+++ b/tools/linguist/lupdate/lupdate.pro
@@ -15,6 +15,9 @@ build_all:!build_pass {
include(../shared/formats.pri)
include(../shared/proparser.pri)
+include($$QT_SOURCE_TREE/src/declarative/qml/parser/parser.pri)
+INCLUDEPATH += $$QT_SOURCE_TREE/src/declarative/qml
+
SOURCES += \
main.cpp \
merge.cpp \
@@ -23,6 +26,7 @@ SOURCES += \
cpp.cpp \
java.cpp \
qscript.cpp \
+ qdeclarative.cpp \
ui.cpp
HEADERS += \
diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp
index b2bfd7c15b..0003baa60b 100644
--- a/tools/linguist/lupdate/main.cpp
+++ b/tools/linguist/lupdate/main.cpp
@@ -83,7 +83,7 @@ static void printUsage()
printOut(QObject::tr(
"Usage:\n"
" lupdate [options] [project-file]...\n"
- " lupdate [options] [source-file|path]... -ts ts-files\n\n"
+ " lupdate [options] [source-file|path|@lst-file]... -ts ts-files|@lst-file\n\n"
"lupdate is part of Qt's Linguist tool chain. It extracts translatable\n"
"messages from Qt UI files, C++, Java and JavaScript/QtScript source code.\n"
"Extracted messages are stored in textual translation source files (typically\n"
@@ -132,6 +132,8 @@ static void printUsage()
" Specify the codec assumed for tr() calls. Effective only with -ts.\n"
" -version\n"
" Display the version of lupdate and exit.\n"
+ " @lst-file\n"
+ " Read additional file names (one per line) from lst-file.\n"
).arg(m_defaultExtensions));
}
@@ -267,6 +269,8 @@ static void processSources(Translator &fetchedTor,
else if (it->endsWith(QLatin1String(".js"), Qt::CaseInsensitive)
|| it->endsWith(QLatin1String(".qs"), Qt::CaseInsensitive))
loadQScript(fetchedTor, *it, cd);
+ else if (it->endsWith(QLatin1String(".qml"), Qt::CaseInsensitive))
+ loadQml(fetchedTor, *it, cd);
else
sourceFilesCpp << *it;
}
@@ -560,73 +564,92 @@ int main(int argc, char **argv)
return 1;
}
+ QStringList files;
+ if (arg.startsWith(QLatin1String("@"))) {
+ QFile lstFile(arg.mid(1));
+ if (!lstFile.open(QIODevice::ReadOnly)) {
+ qWarning("lupdate error: List file '%s' is not readable",
+ qPrintable(lstFile.fileName()));
+ return 1;
+ }
+ while (!lstFile.atEnd())
+ files << QString::fromLocal8Bit(lstFile.readLine().trimmed());
+ } else {
+ files << arg;
+ }
if (metTsFlag) {
- bool found = false;
- foreach (const Translator::FileFormat &fmt, Translator::registeredFileFormats()) {
- if (arg.endsWith(QLatin1Char('.') + fmt.extension, Qt::CaseInsensitive)) {
- QFileInfo fi(arg);
- if (!fi.exists() || fi.isWritable()) {
- tsFileNames.append(QFileInfo(arg).absoluteFilePath());
- } else {
- qWarning("lupdate warning: For some reason, '%s' is not writable.\n",
- qPrintable(arg));
+ foreach (const QString &file, files) {
+ bool found = false;
+ foreach (const Translator::FileFormat &fmt, Translator::registeredFileFormats()) {
+ if (file.endsWith(QLatin1Char('.') + fmt.extension, Qt::CaseInsensitive)) {
+ QFileInfo fi(file);
+ if (!fi.exists() || fi.isWritable()) {
+ tsFileNames.append(QFileInfo(file).absoluteFilePath());
+ } else {
+ qWarning("lupdate warning: For some reason, '%s' is not writable.\n",
+ qPrintable(file));
+ }
+ found = true;
+ break;
}
- found = true;
- break;
+ }
+ if (!found) {
+ qWarning("lupdate error: File '%s' has no recognized extension\n",
+ qPrintable(file));
+ return 1;
}
}
- if (!found) {
- qWarning("lupdate error: File '%s' has no recognized extension\n",
- qPrintable(arg));
- return 1;
- }
- } else if (arg.endsWith(QLatin1String(".pro"), Qt::CaseInsensitive)
- || arg.endsWith(QLatin1String(".pri"), Qt::CaseInsensitive)) {
- proFiles << arg;
numFiles++;
} else {
- QFileInfo fi(arg);
- if (!fi.exists()) {
- qWarning("lupdate error: File '%s' does not exists\n", qPrintable(arg));
- return 1;
- } else if (fi.isDir()) {
- if (options & Verbose)
- printOut(QObject::tr("Scanning directory '%1'...").arg(arg));
- QDir dir = QDir(fi.filePath());
- projectRoots.insert(dir.absolutePath() + QLatin1Char('/'));
- if (extensionsNameFilters.isEmpty()) {
- foreach (QString ext, extensions.split(QLatin1Char(','))) {
- ext = ext.trimmed();
- if (ext.startsWith(QLatin1Char('.')))
- ext.remove(0, 1);
- extensionsNameFilters.insert(ext);
- }
+ foreach (const QString &file, files) {
+ QFileInfo fi(file);
+ if (!fi.exists()) {
+ qWarning("lupdate error: File '%s' does not exists\n", qPrintable(file));
+ return 1;
}
- QDir::Filters filters = QDir::Files | QDir::NoSymLinks;
- if (recursiveScan)
- filters |= QDir::AllDirs | QDir::NoDotAndDotDot;
- QFileInfoList fileinfolist;
- recursiveFileInfoList(dir, extensionsNameFilters, filters, &fileinfolist);
- int scanRootLen = dir.absolutePath().length();
- foreach (const QFileInfo &fi, fileinfolist) {
- QString fn = QDir::cleanPath(fi.absoluteFilePath());
- sourceFiles << fn;
-
- if (!fn.endsWith(QLatin1String(".java"))
- && !fn.endsWith(QLatin1String(".ui"))
- && !fn.endsWith(QLatin1String(".js"))
- && !fn.endsWith(QLatin1String(".qs"))) {
- int offset = 0;
- int depth = 0;
- do {
- offset = fn.lastIndexOf(QLatin1Char('/'), offset - 1);
- QString ffn = fn.mid(offset + 1);
- allCSources.insert(ffn, fn);
- } while (++depth < 3 && offset > scanRootLen);
+ if (file.endsWith(QLatin1String(".pro"), Qt::CaseInsensitive)
+ || file.endsWith(QLatin1String(".pri"), Qt::CaseInsensitive)) {
+ proFiles << file;
+ } else if (fi.isDir()) {
+ if (options & Verbose)
+ printOut(QObject::tr("Scanning directory '%1'...").arg(file));
+ QDir dir = QDir(fi.filePath());
+ projectRoots.insert(dir.absolutePath() + QLatin1Char('/'));
+ if (extensionsNameFilters.isEmpty()) {
+ foreach (QString ext, extensions.split(QLatin1Char(','))) {
+ ext = ext.trimmed();
+ if (ext.startsWith(QLatin1Char('.')))
+ ext.remove(0, 1);
+ extensionsNameFilters.insert(ext);
+ }
+ }
+ QDir::Filters filters = QDir::Files | QDir::NoSymLinks;
+ if (recursiveScan)
+ filters |= QDir::AllDirs | QDir::NoDotAndDotDot;
+ QFileInfoList fileinfolist;
+ recursiveFileInfoList(dir, extensionsNameFilters, filters, &fileinfolist);
+ int scanRootLen = dir.absolutePath().length();
+ foreach (const QFileInfo &fi, fileinfolist) {
+ QString fn = QDir::cleanPath(fi.absoluteFilePath());
+ sourceFiles << fn;
+
+ if (!fn.endsWith(QLatin1String(".java"))
+ && !fn.endsWith(QLatin1String(".ui"))
+ && !fn.endsWith(QLatin1String(".js"))
+ && !fn.endsWith(QLatin1String(".qs"))
+ && !fn.endsWith(QLatin1String(".qml"))) {
+ int offset = 0;
+ int depth = 0;
+ do {
+ offset = fn.lastIndexOf(QLatin1Char('/'), offset - 1);
+ QString ffn = fn.mid(offset + 1);
+ allCSources.insert(ffn, fn);
+ } while (++depth < 3 && offset > scanRootLen);
+ }
}
+ } else {
+ sourceFiles << QDir::cleanPath(fi.absoluteFilePath());;
}
- } else {
- sourceFiles << QDir::cleanPath(fi.absoluteFilePath());;
}
numFiles++;
}
diff --git a/tools/linguist/lupdate/qdeclarative.cpp b/tools/linguist/lupdate/qdeclarative.cpp
new file mode 100644
index 0000000000..a734e99431
--- /dev/null
+++ b/tools/linguist/lupdate/qdeclarative.cpp
@@ -0,0 +1,240 @@
+/****************************************************************************
+**
+** 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 Qt Linguist of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "lupdate.h"
+
+#include <translator.h>
+
+#include <QtCore/QDebug>
+#include <QtCore/QFile>
+#include <QtCore/QString>
+
+#include "parser/qdeclarativejsengine_p.h"
+#include "parser/qdeclarativejsparser_p.h"
+#include "parser/qdeclarativejslexer_p.h"
+#include "parser/qdeclarativejsnodepool_p.h"
+#include "parser/qdeclarativejsastvisitor_p.h"
+#include "parser/qdeclarativejsast_p.h"
+
+#include <QCoreApplication>
+#include <QFile>
+#include <QFileInfo>
+#include <QtDebug>
+#include <QStringList>
+
+#include <iostream>
+#include <cstdlib>
+
+QT_BEGIN_NAMESPACE
+
+using namespace QDeclarativeJS;
+
+class FindTrCalls: protected AST::Visitor
+{
+public:
+ void operator()(Translator *translator, const QString &fileName, AST::Node *node)
+ {
+ m_translator = translator;
+ m_fileName = fileName;
+ m_component = QFileInfo(fileName).baseName(); //matches qsTr usage in QScriptEngine
+ accept(node);
+ }
+
+protected:
+ using AST::Visitor::visit;
+ using AST::Visitor::endVisit;
+
+ void accept(AST::Node *node)
+ { AST::Node::acceptChild(node, this); }
+
+ virtual void endVisit(AST::CallExpression *node)
+ {
+ if (AST::IdentifierExpression *idExpr = AST::cast<AST::IdentifierExpression *>(node->base)) {
+ if (idExpr->name->asString() == QLatin1String("qsTr") ||
+ idExpr->name->asString() == QLatin1String("QT_TR_NOOP")) {
+ if (node->arguments && AST::cast<AST::StringLiteral *>(node->arguments->expression)) {
+ AST::StringLiteral *literal = AST::cast<AST::StringLiteral *>(node->arguments->expression);
+ const QString source = literal->value->asString();
+
+ QString comment;
+ bool plural = false;
+ AST::ArgumentList *commentNode = node->arguments->next;
+ if (commentNode) {
+ literal = AST::cast<AST::StringLiteral *>(commentNode->expression);
+ comment = literal->value->asString();
+
+ AST::ArgumentList *nNode = commentNode->next;
+ if (nNode) {
+ AST::NumericLiteral *numLiteral = AST::cast<AST::NumericLiteral *>(nNode->expression);
+ if (numLiteral) {
+ plural = true;
+ }
+ }
+ }
+
+ TranslatorMessage msg(m_component, source,
+ comment, QString(), m_fileName,
+ node->firstSourceLocation().startLine, QStringList(),
+ TranslatorMessage::Unfinished, plural);
+ m_translator->extend(msg);
+ }
+ } else if (idExpr->name->asString() == QLatin1String("qsTranslate") ||
+ idExpr->name->asString() == QLatin1String("QT_TRANSLATE_NOOP")) {
+ if (node->arguments && AST::cast<AST::StringLiteral *>(node->arguments->expression)) {
+ AST::StringLiteral *literal = AST::cast<AST::StringLiteral *>(node->arguments->expression);
+ const QString context = literal->value->asString();
+
+ QString source;
+ QString comment;
+ bool plural = false;
+ AST::ArgumentList *sourceNode = node->arguments->next;
+ if (sourceNode) {
+ literal = AST::cast<AST::StringLiteral *>(sourceNode->expression);
+ source = literal->value->asString();
+ AST::ArgumentList *commentNode = sourceNode->next;
+ if (commentNode) {
+ literal = AST::cast<AST::StringLiteral *>(commentNode->expression);
+ comment = literal->value->asString();
+
+ AST::ArgumentList *nNode = commentNode->next;
+ if (nNode) {
+ AST::NumericLiteral *numLiteral = AST::cast<AST::NumericLiteral *>(nNode->expression);
+ if (numLiteral) {
+ plural = true;
+ }
+ }
+ }
+ }
+
+ TranslatorMessage msg(context, source,
+ comment, QString(), m_fileName,
+ node->firstSourceLocation().startLine, QStringList(),
+ TranslatorMessage::Unfinished, plural);
+ m_translator->extend(msg);
+ }
+
+ }
+ }
+ }
+
+private:
+ Translator *m_translator;
+ QString m_fileName;
+ QString m_component;
+};
+
+QString createErrorString(const QString &filename, const QString &code, Parser &parser)
+{
+ // print out error
+ QStringList lines = code.split(QLatin1Char('\n'));
+ lines.append(QLatin1String("\n")); // sentinel.
+ QString errorString;
+
+ foreach (const DiagnosticMessage &m, parser.diagnosticMessages()) {
+
+ if (m.isWarning())
+ continue;
+
+ QString error = filename + QLatin1Char(':') + QString::number(m.loc.startLine)
+ + QLatin1Char(':') + QString::number(m.loc.startColumn) + QLatin1String(": error: ")
+ + m.message + QLatin1Char('\n');
+
+ int line = 0;
+ if (m.loc.startLine > 0)
+ line = m.loc.startLine - 1;
+
+ const QString textLine = lines.at(line);
+
+ error += textLine + QLatin1Char('\n');
+
+ int column = m.loc.startColumn - 1;
+ if (column < 0)
+ column = 0;
+
+ column = qMin(column, textLine.length());
+
+ for (int i = 0; i < column; ++i) {
+ const QChar ch = textLine.at(i);
+ if (ch.isSpace())
+ error += ch.unicode();
+ else
+ error += QLatin1Char(' ');
+ }
+ error += QLatin1String("^\n");
+ errorString += error;
+ }
+ return errorString;
+}
+
+bool loadQml(Translator &translator, const QString &filename, ConversionData &cd)
+{
+ cd.m_sourceFileName = filename;
+ QFile file(filename);
+ if (!file.open(QIODevice::ReadOnly)) {
+ cd.appendError(QString::fromLatin1("Cannot open %1: %2")
+ .arg(filename, file.errorString()));
+ return false;
+ }
+
+ const QString code = QTextStream(&file).readAll();
+
+ Engine driver;
+ Parser parser(&driver);
+
+ NodePool nodePool(filename, &driver);
+ driver.setNodePool(&nodePool);
+
+ Lexer lexer(&driver);
+ lexer.setCode(code, /*line = */ 1);
+ driver.setLexer(&lexer);
+
+ if (parser.parse()) {
+ FindTrCalls trCalls;
+ trCalls(&translator, filename, parser.ast());
+ } else {
+ QString error = createErrorString(filename, code, parser);
+ cd.appendError(error);
+ return false;
+ }
+ return true;
+}
+
+QT_END_NAMESPACE
diff --git a/tools/linguist/lupdate/qscript.cpp b/tools/linguist/lupdate/qscript.cpp
index 6f34c2b25e..33276e67aa 100644
--- a/tools/linguist/lupdate/qscript.cpp
+++ b/tools/linguist/lupdate/qscript.cpp
@@ -40,6 +40,26 @@
**
****************************************************************************/
+
+#define Q_SCRIPT_REGEXPLITERAL_RULE1 7
+
+#define Q_SCRIPT_REGEXPLITERAL_RULE2 8
+
+#include <translator.h>
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qnumeric.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qtextcodec.h>
+#include <QtCore/qvariant.h>
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+QT_BEGIN_NAMESPACE
+
class QScriptGrammar
{
public:
@@ -174,7 +194,6 @@ public:
}
};
-
const char *const QScriptGrammar::spell [] = {
"end of file", "&", "&&", "&=", "break", "case", "catch", ":", ";", "continue",
"default", "delete", "/", "/=", "do", ".", "else", "=", "==", "===",
@@ -747,26 +766,6 @@ const int QScriptGrammar::action_check [] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1};
-
-#define Q_SCRIPT_REGEXPLITERAL_RULE1 7
-
-#define Q_SCRIPT_REGEXPLITERAL_RULE2 8
-
-#include <translator.h>
-
-#include <QtCore/qdebug.h>
-#include <QtCore/qnumeric.h>
-#include <QtCore/qstring.h>
-#include <QtCore/qtextcodec.h>
-#include <QtCore/qvariant.h>
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-QT_BEGIN_NAMESPACE
-
static void recordMessage(
Translator *tor, const QString &context, const QString &text, const QString &comment,
const QString &extracomment, bool plural, const QString &fileName, int lineNo)
diff --git a/tools/porting/src/q3porting.xml b/tools/porting/src/q3porting.xml
index 7a31d6ea13..39f341f14d 100644
--- a/tools/porting/src/q3porting.xml
+++ b/tools/porting/src/q3porting.xml
@@ -1626,10 +1626,6 @@
<Name>Q3Wizard</Name>
</item>
<item Type="Qt4Class" >
- <Library>QtAssistant</Library>
- <Name>QAssistantClient</Name>
- </item>
- <item Type="Qt4Class" >
<Library>QtCore</Library>
<Name>QAbstractEventDispatcher</Name>
</item>
diff --git a/tools/qdbus/qdbus/qdbus.cpp b/tools/qdbus/qdbus/qdbus.cpp
index 48b0dad9dd..ce18cb9160 100644
--- a/tools/qdbus/qdbus/qdbus.cpp
+++ b/tools/qdbus/qdbus/qdbus.cpp
@@ -248,123 +248,153 @@ static QStringList readList(QStringList &args)
return retval;
}
-static void placeCall(const QString &service, const QString &path, const QString &interface,
- const QString &member, QStringList args)
+static int placeCall(const QString &service, const QString &path, const QString &interface,
+ const QString &member, const QStringList& arguments, bool try_prop=true)
{
QDBusInterface iface(service, path, interface, connection);
// Don't check whether the interface is valid to allow DBus try to
// activate the service if possible.
+ QList<int> knownIds;
+ bool matchFound = false;
+ QStringList args = arguments;
QVariantList params;
if (!args.isEmpty()) {
const QMetaObject *mo = iface.metaObject();
QByteArray match = member.toLatin1();
match += '(';
- int midx = -1;
for (int i = mo->methodOffset(); i < mo->methodCount(); ++i) {
QMetaMethod mm = mo->method(i);
QByteArray signature = mm.signature();
- if (signature.startsWith(match)) {
- midx = i;
- break;
- }
+ if (signature.startsWith(match))
+ knownIds += i;
}
- if (midx == -1) {
- fprintf(stderr, "Cannot find '%s.%s' in object %s at %s\n",
- qPrintable(interface), qPrintable(member), qPrintable(path),
- qPrintable(service));
- exit(1);
- }
- QMetaMethod mm = mo->method(midx);
- QList<QByteArray> types = mm.parameterTypes();
- for (int i = 0; i < types.count(); ++i) {
- if (types.at(i).endsWith('&')) {
- // reference (and not a reference to const): output argument
- // we're done with the inputs
- while (types.count() > i)
- types.removeLast();
- break;
+ while (!matchFound) {
+ args = arguments; // reset
+ params.clear();
+ if (knownIds.isEmpty()) {
+ // Failed to set property after falling back?
+ // Bail out without displaying an error
+ if (!try_prop)
+ return 1;
+ if (try_prop && args.size() == 1) {
+ QStringList proparg;
+ proparg += interface;
+ proparg += member;
+ proparg += args.first();
+ if (!placeCall(service, path, "org.freedesktop.DBus.Properties", "Set", proparg, false))
+ return 0;
+ }
+ fprintf(stderr, "Cannot find '%s.%s' in object %s at %s\n",
+ qPrintable(interface), qPrintable(member), qPrintable(path),
+ qPrintable(service));
+ return 1;
}
- }
- for (int i = 0; !args.isEmpty() && i < types.count(); ++i) {
- int id = QVariant::nameToType(types.at(i));
- if (id == QVariant::UserType)
- id = QMetaType::type(types.at(i));
- Q_ASSERT(id);
-
- QVariant p;
- QString argument;
- if ((id == QVariant::List || id == QVariant::StringList)
- && args.at(0) == QLatin1String("("))
- p = readList(args);
- else
- p = argument = args.takeFirst();
-
- if (id == int(QMetaType::UChar)) {
- // special case: QVariant::convert doesn't convert to/from
- // UChar because it can't decide if it's a character or a number
- p = qVariantFromValue<uchar>(p.toUInt());
- } else if (id < int(QMetaType::User) && id != int(QVariant::Map)) {
- p.convert(QVariant::Type(id));
- if (p.type() == QVariant::Invalid) {
- fprintf(stderr, "Could not convert '%s' to type '%s'.\n",
- qPrintable(argument), types.at(i).constData());
- exit(1);
- }
- } else if (id == qMetaTypeId<QDBusVariant>()) {
- QDBusVariant tmp(p);
- p = qVariantFromValue(tmp);
- } else if (id == qMetaTypeId<QDBusObjectPath>()) {
- QDBusObjectPath path(argument);
- if (path.path().isNull()) {
- fprintf(stderr, "Cannot pass argument '%s' because it is not a valid object path.\n",
- qPrintable(argument));
- exit(1);
+ QMetaMethod mm = mo->method(knownIds.takeFirst());
+ QList<QByteArray> types = mm.parameterTypes();
+ for (int i = 0; i < types.count(); ++i) {
+ if (types.at(i).endsWith('&')) {
+ // reference (and not a reference to const): output argument
+ // we're done with the inputs
+ while (types.count() > i)
+ types.removeLast();
+ break;
}
- p = qVariantFromValue(path);
- } else if (id == qMetaTypeId<QDBusSignature>()) {
- QDBusSignature sig(argument);
- if (sig.signature().isNull()) {
- fprintf(stderr, "Cannot pass argument '%s' because it is not a valid signature.\n",
- qPrintable(argument));
- exit(1);
+ }
+
+ for (int i = 0; !args.isEmpty() && i < types.count(); ++i) {
+ int id = QVariant::nameToType(types.at(i));
+ if (id == QVariant::UserType)
+ id = QMetaType::type(types.at(i));
+ Q_ASSERT(id);
+
+ QVariant p;
+ QString argument;
+ if ((id == QVariant::List || id == QVariant::StringList)
+ && args.at(0) == QLatin1String("("))
+ p = readList(args);
+ else
+ p = argument = args.takeFirst();
+
+ if (id == int(QMetaType::UChar)) {
+ // special case: QVariant::convert doesn't convert to/from
+ // UChar because it can't decide if it's a character or a number
+ p = qVariantFromValue<uchar>(p.toUInt());
+ } else if (id < int(QMetaType::User) && id != int(QVariant::Map)) {
+ p.convert(QVariant::Type(id));
+ if (p.type() == QVariant::Invalid) {
+ fprintf(stderr, "Could not convert '%s' to type '%s'.\n",
+ qPrintable(argument), types.at(i).constData());
+ return 1 ;
+ }
+ } else if (id == qMetaTypeId<QDBusVariant>()) {
+ QDBusVariant tmp(p);
+ p = qVariantFromValue(tmp);
+ } else if (id == qMetaTypeId<QDBusObjectPath>()) {
+ QDBusObjectPath path(argument);
+ if (path.path().isNull()) {
+ fprintf(stderr, "Cannot pass argument '%s' because it is not a valid object path.\n",
+ qPrintable(argument));
+ return 1;
+ }
+ p = qVariantFromValue(path);
+ } else if (id == qMetaTypeId<QDBusSignature>()) {
+ QDBusSignature sig(argument);
+ if (sig.signature().isNull()) {
+ fprintf(stderr, "Cannot pass argument '%s' because it is not a valid signature.\n",
+ qPrintable(argument));
+ return 1;
+ }
+ p = qVariantFromValue(sig);
+ } else {
+ fprintf(stderr, "Sorry, can't pass arg of type '%s'.\n",
+ types.at(i).constData());
+ return 1;
}
- p = qVariantFromValue(sig);
- } else {
- fprintf(stderr, "Sorry, can't pass arg of type '%s'.\n",
- types.at(i).constData());
- exit(1);
+ params += p;
}
- params += p;
- }
- if (params.count() != types.count() || !args.isEmpty()) {
- fprintf(stderr, "Invalid number of parameters\n");
- exit(1);
- }
- }
+ if (params.count() == types.count() && args.isEmpty())
+ matchFound = true;
+ else if (knownIds.isEmpty()) {
+ fprintf(stderr, "Invalid number of parameters\n");
+ return 1;
+ }
+ } // while (!matchFound)
+ } // if (!args.isEmpty()
QDBusMessage reply = iface.callWithArgumentList(QDBus::Block, member, params);
if (reply.type() == QDBusMessage::ErrorMessage) {
QDBusError err = reply;
+ // Failed to retrieve property after falling back?
+ // Bail out without displaying an error
+ if (!try_prop)
+ return 1;
+ if (err.type() == QDBusError::UnknownMethod && try_prop) {
+ QStringList proparg;
+ proparg += interface;
+ proparg += member;
+ if (!placeCall(service, path, "org.freedesktop.DBus.Properties", "Get", proparg, false))
+ return 0;
+ }
if (err.type() == QDBusError::ServiceUnknown)
fprintf(stderr, "Service '%s' does not exist.\n", qPrintable(service));
else
printf("Error: %s\n%s\n", qPrintable(err.name()), qPrintable(err.message()));
- exit(2);
+ return 2;
} else if (reply.type() != QDBusMessage::ReplyMessage) {
fprintf(stderr, "Invalid reply type %d\n", int(reply.type()));
- exit(1);
+ return 1;
}
foreach (QVariant v, reply.arguments())
printArg(v);
- exit(0);
+ return 0;
}
static bool globServices(QDBusConnectionInterface *bus, const QString &glob)
@@ -483,6 +513,7 @@ int main(int argc, char **argv)
exit(1);
}
- placeCall(service, path, interface, member, args);
+ int ret = placeCall(service, path, interface, member, args);
+ exit(ret);
}
diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp
index ee93080d41..15f2c2db8d 100644
--- a/tools/qdoc3/codemarker.cpp
+++ b/tools/qdoc3/codemarker.cpp
@@ -177,7 +177,7 @@ const Node *CodeMarker::nodeForString(const QString& string)
QString CodeMarker::stringForNode(const Node *node)
{
if (sizeof(const Node *) == sizeof(ulong)) {
- return QString::number(reinterpret_cast<ulong>(node));
+ return QString::number(reinterpret_cast<quintptr>(node));
}
else {
return QString::number(reinterpret_cast<qulonglong>(node));
diff --git a/tools/qdoc3/codeparser.cpp b/tools/qdoc3/codeparser.cpp
index 3ad3372326..042378e75a 100644
--- a/tools/qdoc3/codeparser.cpp
+++ b/tools/qdoc3/codeparser.cpp
@@ -43,7 +43,6 @@
codeparser.cpp
*/
-#include <QtCore>
#include "codeparser.h"
#include "node.h"
#include "tree.h"
@@ -59,6 +58,7 @@ QT_BEGIN_NAMESPACE
#define COMMAND_MAINCLASS Doc::alias(QLatin1String("mainclass"))
#define COMMAND_NONREENTRANT Doc::alias(QLatin1String("nonreentrant"))
#define COMMAND_OBSOLETE Doc::alias(QLatin1String("obsolete"))
+#define COMMAND_PAGEKEYWORDS Doc::alias(QLatin1String("pagekeywords"))
#define COMMAND_PRELIMINARY Doc::alias(QLatin1String("preliminary"))
#define COMMAND_INPUBLICGROUP Doc::alias(QLatin1String("inpublicgroup"))
#define COMMAND_REENTRANT Doc::alias(QLatin1String("reentrant"))
@@ -170,6 +170,7 @@ QSet<QString> CodeParser::commonMetaCommands()
<< COMMAND_MAINCLASS
<< COMMAND_NONREENTRANT
<< COMMAND_OBSOLETE
+ << COMMAND_PAGEKEYWORDS
<< COMMAND_PRELIMINARY
<< COMMAND_INPUBLICGROUP
<< COMMAND_REENTRANT
@@ -230,6 +231,9 @@ void CodeParser::processCommonMetaCommand(const Location &location,
else if (command == COMMAND_SINCE) {
node->setSince(arg);
}
+ else if (command == COMMAND_PAGEKEYWORDS) {
+ node->addPageKeywords(arg);
+ }
else if (command == COMMAND_SUBTITLE) {
if (node->type() == Node::Fake) {
FakeNode *fake = static_cast<FakeNode *>(node);
diff --git a/tools/qdoc3/command.cpp b/tools/qdoc3/command.cpp
index 76b483c301..b78ad07037 100644
--- a/tools/qdoc3/command.cpp
+++ b/tools/qdoc3/command.cpp
@@ -47,6 +47,8 @@
#include "command.h"
+#include <stdlib.h>
+
QT_BEGIN_NAMESPACE
void executeCommand(const Location& location,
@@ -69,6 +71,12 @@ void executeCommand(const Location& location,
if (space != -1)
toolName.truncate(space);
+#ifdef QT_BOOTSTRAPPED
+ int status = system(qPrintable(actualCommand));
+ int exitCode = WEXITSTATUS(status);
+ if (status == -1 || exitCode != EXIT_SUCCESS)
+ location.fatal(QString("Error executing '$1': $2").arg(toolName).arg(exitCode));
+#else
QProcess process;
process.start(QLatin1String("sh"),
QStringList() << QLatin1String("-c") << actualCommand);
@@ -89,6 +97,7 @@ void executeCommand(const Location& location,
tr("The tool was invoked like this:\n%1\n"
"It emitted these errors:\n%2")
.arg(actualCommand).arg(errors));
+#endif
}
QT_END_NAMESPACE
diff --git a/tools/qdoc3/config.cpp b/tools/qdoc3/config.cpp
index f62ec241da..3150f28a5b 100644
--- a/tools/qdoc3/config.cpp
+++ b/tools/qdoc3/config.cpp
@@ -43,7 +43,11 @@
config.cpp
*/
-#include <QtCore>
+#include <QDir>
+#include <QVariant>
+#include <QFile>
+#include <QTemporaryFile>
+#include <QTextStream>
#include "archiveextractor.h"
#include "config.h"
@@ -671,7 +675,9 @@ void Config::load(Location location, const QString& fileName)
location.fatal(tr("Cannot open file '%1': %2").arg(fileName).arg(fin.errorString()));
}
- QString text = fin.readAll();
+ QTextStream stream(&fin);
+ stream.setCodec("UTF-8");
+ QString text = stream.readAll();
text += QLatin1String("\n\n");
text += QChar('\0');
fin.close();
diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h
index 5e7e6f14a1..6f23469cd4 100644
--- a/tools/qdoc3/config.h
+++ b/tools/qdoc3/config.h
@@ -140,8 +140,10 @@ class Config
#define CONFIG_INDEXES "indexes"
#define CONFIG_LANGUAGE "language"
#define CONFIG_MACRO "macro"
+#define CONFIG_NATURALLANGUAGE "naturallanguage"
#define CONFIG_OBSOLETELINKS "obsoletelinks"
#define CONFIG_OUTPUTDIR "outputdir"
+#define CONFIG_OUTPUTENCODING "outputencoding"
#define CONFIG_OUTPUTLANGUAGE "outputlanguage"
#define CONFIG_OUTPUTFORMATS "outputformats"
#define CONFIG_PROJECT "project"
@@ -150,6 +152,7 @@ class Config
#define CONFIG_SLOW "slow"
#define CONFIG_SHOWINTERNAL "showinternal"
#define CONFIG_SOURCEDIRS "sourcedirs"
+#define CONFIG_SOURCEENCODING "sourceencoding"
#define CONFIG_SOURCES "sources"
#define CONFIG_SPURIOUS "spurious"
#define CONFIG_STYLESHEETS "stylesheets"
diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp
index 6c33054dbb..3ff6ebe34a 100644
--- a/tools/qdoc3/cppcodemarker.cpp
+++ b/tools/qdoc3/cppcodemarker.cpp
@@ -145,7 +145,7 @@ QString CppCodeMarker::plainFullName(const Node *node, const Node *relative)
}
else {
QString fullName;
- for (;;) {
+ while (node) {
fullName.prepend(plainName(node));
if (node->parent() == relative || node->parent()->name().isEmpty())
break;
@@ -881,7 +881,7 @@ QString CppCodeMarker::addMarkUp(const QString& protectedCode,
static QRegExp globalX("[\n{()=] *([a-zA-Z_][a-zA-Z_0-9]*)[ \n]*\\(");
static QRegExp multiLineComment("/(?:( )?\\*(?:[^*]+|\\*(?! /))*\\*\\1/)");
multiLineComment.setMinimal(true);
- static QRegExp singleLineComment("//(?!!)[^!\n]*");
+ static QRegExp singleLineComment("[^:]//(?!!)[^!\\n]*");
static QRegExp preprocessor("(?:^|\n)(#[ \t]*(?:include|if|elif|endif|error|pragma|define"
"|warning)(?:(?:\\\\\n|\\n#)[^\n]*)*)");
static QRegExp literals("&quot;(?:[^\\\\&]|\\\\[^\n]|&(?!quot;))*&quot;"
@@ -1067,13 +1067,13 @@ QString CppCodeMarker::addMarkUp(const QString& protectedCode,
len = multiLineComment.matchedLength();
}
else if (mlpos == -1) {
- pos = slpos;
- len = singleLineComment.matchedLength();
+ pos = slpos + 1;
+ len = singleLineComment.matchedLength() - 1;
}
else {
if (slpos < mlpos) {
- pos = slpos;
- len = singleLineComment.matchedLength();
+ pos = slpos + 1;
+ len = singleLineComment.matchedLength() - 1;
}
else {
pos = mlpos;
@@ -1127,7 +1127,7 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode,
"signal",
"signals");
FastSection qmlattachedsignals(qmlClassNode,
- "QML Attached Signals",
+ "Attached Signals",
"signal",
"signals");
FastSection qmlmethods(qmlClassNode,
@@ -1135,7 +1135,7 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode,
"method",
"methods");
FastSection qmlattachedmethods(qmlClassNode,
- "QML Attached Methods",
+ "Attached Methods",
"method",
"methods");
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index 9b6a516db5..688478155f 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -43,11 +43,11 @@
cppcodeparser.cpp
*/
-#include <QtCore>
#include <qfile.h>
#include <stdio.h>
#include <errno.h>
+#include <qdebug.h>
#include "codechunk.h"
#include "config.h"
@@ -95,6 +95,7 @@ QT_BEGIN_NAMESPACE
#define COMMAND_QMLMETHOD Doc::alias("qmlmethod")
#define COMMAND_QMLATTACHEDMETHOD Doc::alias("qmlattachedmethod")
#define COMMAND_QMLDEFAULT Doc::alias("default")
+#define COMMAND_QMLBASICTYPE Doc::alias("qmlbasictype")
#endif
QStringList CppCodeParser::exampleFiles;
@@ -280,8 +281,8 @@ void CppCodeParser::parseHeaderFile(const Location& location,
const QString& filePath,
Tree *tree)
{
- FILE *in = fopen(QFile::encodeName(filePath), "r");
- if (!in) {
+ QFile in(filePath);
+ if (!in.open(QIODevice::ReadOnly)) {
location.error(tr("Cannot open C++ header file '%1'").arg(filePath));
return;
}
@@ -294,7 +295,7 @@ void CppCodeParser::parseHeaderFile(const Location& location,
matchDeclList(tree->root());
if (!fileTokenizer.version().isEmpty())
tree->setVersion(fileTokenizer.version());
- fclose(in);
+ in.close();
if (fileLocation.fileName() == "qiterator.h")
parseQiteratorDotH(location, filePath);
@@ -311,8 +312,8 @@ void CppCodeParser::parseSourceFile(const Location& location,
const QString& filePath,
Tree *tree)
{
- FILE *in = fopen(QFile::encodeName(filePath), "r");
- if (!in) {
+ QFile in(filePath);
+ if (!in.open(QIODevice::ReadOnly)) {
location.error(tr("Cannot open C++ source file '%1' (%2)").arg(filePath).arg(strerror(errno)));
return;
}
@@ -324,7 +325,7 @@ void CppCodeParser::parseSourceFile(const Location& location,
readToken();
usedNamespaces.clear();
matchDocsAndStuff();
- fclose(in);
+ in.close();
}
/*!
@@ -536,7 +537,8 @@ QSet<QString> CppCodeParser::topicCommands()
<< COMMAND_QMLSIGNAL
<< COMMAND_QMLATTACHEDSIGNAL
<< COMMAND_QMLMETHOD
- << COMMAND_QMLATTACHEDMETHOD;
+ << COMMAND_QMLATTACHEDMETHOD
+ << COMMAND_QMLBASICTYPE;
#else
<< COMMAND_VARIABLE;
#endif
@@ -728,6 +730,20 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
}
return new QmlClassNode(tre->root(), names[0], classNode);
}
+ else if (command == COMMAND_QMLBASICTYPE) {
+#if 0
+ QStringList parts = arg.split(" ");
+ qDebug() << command << parts;
+ if (parts.size() > 1) {
+ FakeNode* pageNode = static_cast<FakeNode*>(tre->root()->findNode(parts[1], Node::Fake));
+ if (pageNode) {
+ qDebug() << "FOUND";
+ return new QmlBasicTypeNode(pageNode, parts[0]);
+ }
+ }
+#endif
+ return new QmlBasicTypeNode(tre->root(), arg);
+ }
else if ((command == COMMAND_QMLSIGNAL) ||
(command == COMMAND_QMLMETHOD) ||
(command == COMMAND_QMLATTACHEDSIGNAL) ||
@@ -1017,7 +1033,10 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc,
#ifdef QDOC_QML
else if (command == COMMAND_QMLINHERITS) {
setLink(node, Node::InheritsLink, arg);
- }
+ if (node->subType() == Node::QmlClass) {
+ QmlClassNode::addInheritedBy(arg,node);
+ }
+ }
else if (command == COMMAND_QMLDEFAULT) {
QmlPropGroupNode* qpgn = static_cast<QmlPropGroupNode*>(node);
qpgn->setDefault();
@@ -1632,8 +1651,9 @@ bool CppCodeParser::matchNamespaceDecl(InnerNode *parent)
*/
QString namespaceName = previousLexeme();
NamespaceNode *namespasse = 0;
- if (parent)
+ if (parent) {
namespasse = static_cast<NamespaceNode*>(parent->findNode(namespaceName, Node::Namespace));
+ }
if (!namespasse) {
namespasse = new NamespaceNode(parent, namespaceName);
namespasse->setAccess(access);
@@ -2283,14 +2303,6 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake)
QString imagesPath = fullPath + "/images";
QStringList imageFiles = Config::getFilesHere(imagesPath,exampleImageFilter);
-#if 0
- qDebug() << "examplePath:" << examplePath;
- qDebug() << " exampleFiles" << exampleFiles;
- qDebug() << "imagesPath:" << imagesPath;
- qDebug() << "fullPath:" << fullPath;
- qDebug() << " imageFiles" << imageFiles;
-#endif
-
if (!exampleFiles.isEmpty()) {
// move main.cpp and to the end, if it exists
QString mainCpp;
diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp
index 17a6efd0b6..ad4cdde879 100644
--- a/tools/qdoc3/doc.cpp
+++ b/tools/qdoc3/doc.cpp
@@ -3056,7 +3056,8 @@ QString Doc::canonicalTitle(const QString &title)
slurping = true;
}
else {
- // !alnum && slurping -> nothin
+ result += title[i];
+ lastAlnum = result.size();
}
}
result.truncate(lastAlnum);
diff --git a/tools/qdoc3/doc.h b/tools/qdoc3/doc.h
index e98bb26f20..3e764564fe 100644
--- a/tools/qdoc3/doc.h
+++ b/tools/qdoc3/doc.h
@@ -48,6 +48,7 @@
#include <QSet>
#include <QString>
+#include <QMap>
#include "location.h"
diff --git a/tools/qdoc3/doc/classic.css b/tools/qdoc3/doc/classic.css
new file mode 100644
index 0000000000..b8cae8e1ed
--- /dev/null
+++ b/tools/qdoc3/doc/classic.css
@@ -0,0 +1,284 @@
+BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
+ font-family: Arial, Geneva, Helvetica, sans-serif;
+}
+H1 {
+ text-align: center;
+ font-size: 160%;
+}
+H2 {
+ font-size: 120%;
+}
+H3 {
+ font-size: 100%;
+}
+
+h3.fn,span.fn
+{
+ background-color: #eee;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #ddd;
+ font-weight: bold;
+ padding: 6px 0px 6px 10px;
+ margin: 42px 0px 0px 0px;
+}
+
+hr {
+ border: 0;
+ color: #a0a0a0;
+ background-color: #ccc;
+ height: 1px;
+ width: 100%;
+ text-align: left;
+ margin: 34px 0px 34px 0px;
+}
+
+table.valuelist {
+ border-width: 1px 1px 1px 1px;
+ border-style: solid;
+ border-color: #dddddd;
+ border-collapse: collapse;
+ background-color: #f0f0f0;
+}
+
+table.indextable {
+ border-width: 1px 1px 1px 1px;
+ border-style: solid;
+ border-collapse: collapse;
+ background-color: #f0f0f0;
+ border-color:#555;
+ font-size: 100%;
+}
+
+table td.largeindex {
+ border-width: 1px 1px 1px 1px;
+ border-collapse: collapse;
+ background-color: #f0f0f0;
+ border-color:#555;
+ font-size: 120%;
+}
+
+table.valuelist th {
+ border-width: 1px 1px 1px 2px;
+ padding: 4px;
+ border-style: solid;
+ border-color: #666;
+ color:white;
+ background-color:#666;
+}
+
+th.titleheader {
+ border-width: 1px 0px 1px 0px;
+ padding: 2px;
+ border-style: solid;
+ border-color: #666;
+ color:white;
+ background-color:#555;
+ background-image:url('images/gradient.png')};
+ background-repeat: repeat-x;
+ font-size: 100%;
+}
+
+
+th.largeheader {
+ border-width: 1px 0px 1px 0px;
+ padding: 4px;
+ border-style: solid;
+ border-color: #444;
+ color:white;
+ background-color:#555555;
+ font-size: 120%;
+}
+
+p {
+
+ margin-left: 4px;
+ margin-top: 8px;
+ margin-bottom: 8px;
+}
+
+a:link
+{
+ color: #0046ad;
+ text-decoration: none
+}
+
+a:visited
+{
+ color: #672967;
+ text-decoration: none
+}
+
+a.obsolete
+{
+ color: #661100;
+ text-decoration: none
+}
+
+a.compat
+{
+ color: #661100;
+ text-decoration: none
+}
+
+a.obsolete:visited
+{
+ color: #995500;
+ text-decoration: none
+}
+
+a.compat:visited
+{
+ color: #995500;
+ text-decoration: none
+}
+
+body
+{
+ background: #ffffff;
+ color: black
+}
+
+table.generic, table.annotated
+{
+ border-width: 1px;
+ border-color:#bbb;
+ border-style:solid;
+ border-collapse:collapse;
+}
+
+table td.memItemLeft {
+ width: 180px;
+ padding: 2px 0px 0px 8px;
+ margin: 4px;
+ border-width: 1px;
+ border-color: #E0E0E0;
+ border-style: none;
+ font-size: 100%;
+ white-space: nowrap
+}
+
+table td.memItemRight {
+ padding: 2px 8px 0px 8px;
+ margin: 4px;
+ border-width: 1px;
+ border-color: #E0E0E0;
+ border-style: none;
+ font-size: 100%;
+}
+
+table tr.odd {
+ background: #f0f0f0;
+ color: black;
+}
+
+table tr.even {
+ background: #e4e4e4;
+ color: black;
+}
+
+table.annotated th {
+ padding: 3px;
+ text-align: left
+}
+
+table.annotated td {
+ padding: 3px;
+}
+
+table tr pre
+{
+ padding-top: 0px;
+ padding-bottom: 0px;
+ padding-left: 0px;
+ padding-right: 0px;
+ border: none;
+ background: none
+}
+
+tr.qt-style
+{
+ background: #96E066;
+ color: black
+}
+
+body pre
+{
+ padding: 0.2em;
+ border: #e7e7e7 1px solid;
+ background: #f1f1f1;
+ color: black
+}
+
+table tr.qt-code pre
+{
+ padding: 0.2em;
+ border: #e7e7e7 1px solid;
+ background: #f1f1f1;
+ color: black
+}
+
+span.preprocessor, span.preprocessor a
+{
+ color: darkblue;
+}
+
+span.comment
+{
+ color: darkred;
+ font-style: italic
+}
+
+span.string,span.char
+{
+ color: darkgreen;
+}
+
+.title
+{
+ text-align: center
+}
+
+.subtitle
+{
+ font-size: 0.8em
+}
+
+.small-subtitle
+{
+ font-size: 0.65em
+}
+
+.qmlitem {
+ padding: 0;
+}
+
+.qmlname {
+ white-space: nowrap;
+}
+
+.qmltype {
+ text-align: center;
+ font-size: 160%;
+}
+
+.qmlproto {
+ background-color: #eee;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #ddd;
+ font-weight: bold;
+ padding: 6px 10px 6px 10px;
+ margin: 42px 0px 0px 0px;
+}
+
+.qmlreadonly {
+ float: right;
+ color: red
+}
+
+.qmldoc {
+}
+
+*.qmlitem p {
+}
diff --git a/tools/qdoc3/doc/examples/layoutmanagement.qdocinc b/tools/qdoc3/doc/examples/layoutmanagement.qdocinc
new file mode 100644
index 0000000000..01f8acf363
--- /dev/null
+++ b/tools/qdoc3/doc/examples/layoutmanagement.qdocinc
@@ -0,0 +1,13 @@
+\section1 Layout Classes
+
+The Qt layout system provides a simple and powerful way of specifying
+the layout of child widgets.
+
+By specifying the logical layout once, you get the following benefits:
+
+\list
+ \o Positioning of child widgets.
+ \o Sensible default sizes for windows.
+ \o Sensible minimum sizes for windows.
+ \o ...
+\endlist
diff --git a/tools/qdoc3/doc/examples/main.cpp b/tools/qdoc3/doc/examples/main.cpp
new file mode 100644
index 0000000000..e2cf6c5e99
--- /dev/null
+++ b/tools/qdoc3/doc/examples/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** 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 tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QPushButton>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QPushButton *hello("Hello world!");
+ hello.resize(100, 30);
+
+ hello.show();
+ return app.exec();
+}
diff --git a/tools/qdoc3/doc/examples/minimum.qdocconf b/tools/qdoc3/doc/examples/minimum.qdocconf
new file mode 100644
index 0000000000..e5e9e67d59
--- /dev/null
+++ b/tools/qdoc3/doc/examples/minimum.qdocconf
@@ -0,0 +1,42 @@
+# QDoc is a tool that constantly evolves to suit our needs,
+# and there are some compatibility issues between old and new
+# practices. For that reason, any QDoc configuration file needs to
+# include compat.qdocconf.
+
+#include(compat.qdocconf)
+
+
+# The outputdir variable specifies the directory
+# where QDoc will put the generated documentation.
+
+outputdir = html
+
+
+# The headerdirs variable specifies the directories
+# containing the header files associated
+# with the .cpp source files used in the documentation.
+
+headerdirs = .
+
+
+# The sourcedirs variable specifies the
+# directories containing the .cpp or .qdoc
+# files used in the documentation.
+
+#sourcedirs = .
+
+
+# The exampledirs variable specifies the directories containing
+# the source code of the example files.
+
+exampledirs = .
+
+
+# The imagedirs variable specifies the
+# directories containing the images used in the documentation.
+
+imagedirs = ./images
+
+
+
+
diff --git a/tools/qdoc3/doc/examples/objectmodel.qdocinc b/tools/qdoc3/doc/examples/objectmodel.qdocinc
new file mode 100644
index 0000000000..02b5991c4d
--- /dev/null
+++ b/tools/qdoc3/doc/examples/objectmodel.qdocinc
@@ -0,0 +1,11 @@
+\section1 Qt Object Model
+
+The standard C++ object model provides very efficient runtime support
+for the object paradigm. But its static nature is inflexibile in
+certain problem domains. Graphical user interface programming is a
+domain that requires both runtime efficiency and a high level of
+flexibility. Qt provides this, by combining the speed of C++ with the
+flexibility of the Qt Object Model.
+
+...
+
diff --git a/tools/qdoc3/doc/examples/signalandslots.qdocinc b/tools/qdoc3/doc/examples/signalandslots.qdocinc
new file mode 100644
index 0000000000..cfae43ace5
--- /dev/null
+++ b/tools/qdoc3/doc/examples/signalandslots.qdocinc
@@ -0,0 +1,9 @@
+\section1 Signals and Slots
+
+Signals and slots are used for communication between objects. The signals and
+slots mechanism is a central feature of Qt and probably the part that differs
+most from the features provided by other frameworks.
+
+\section2 Introduction
+
+In GUI programming, when we ...
diff --git a/tools/qdoc3/doc/files/compat.qdocconf b/tools/qdoc3/doc/files/compat.qdocconf
new file mode 100644
index 0000000000..5745ed93b0
--- /dev/null
+++ b/tools/qdoc3/doc/files/compat.qdocconf
@@ -0,0 +1,31 @@
+alias.i = e
+alias.include = input
+
+macro.0 = "\\\\0"
+macro.b = "\\\\b"
+macro.n = "\\\\n"
+macro.r = "\\\\r"
+macro.i = "\\o"
+macro.i11 = "\\o{1,1}"
+macro.i12 = "\\o{1,2}"
+macro.i13 = "\\o{1,3}"
+macro.i14 = "\\o{1,4}"
+macro.i15 = "\\o{1,5}"
+macro.i16 = "\\o{1,6}"
+macro.i17 = "\\o{1,7}"
+macro.i18 = "\\o{1,8}"
+macro.i19 = "\\o{1,9}"
+macro.i21 = "\\o{2,1}"
+macro.i31 = "\\o{3,1}"
+macro.i41 = "\\o{4,1}"
+macro.i51 = "\\o{5,1}"
+macro.i61 = "\\o{6,1}"
+macro.i71 = "\\o{7,1}"
+macro.i81 = "\\o{8,1}"
+macro.i91 = "\\o{9,1}"
+macro.img = "\\image"
+macro.endquote = "\\endquotation"
+macro.relatesto = "\\relates"
+
+spurious = "Missing comma in .*" \
+ "Missing pattern .*"
diff --git a/tools/qdoc3/doc/files/qt.qdocconf b/tools/qdoc3/doc/files/qt.qdocconf
new file mode 100644
index 0000000000..942d02395f
--- /dev/null
+++ b/tools/qdoc3/doc/files/qt.qdocconf
@@ -0,0 +1,115 @@
+include(compat.qdocconf)
+include(macros.qdocconf)
+include(qt-cpp-ignore.qdocconf)
+include(qt-html-templates.qdocconf)
+include(qt-defines.qdocconf)
+
+project = Qt
+versionsym =
+version = %VERSION%
+description = Qt Reference Documentation
+url = http://qt.nokia.com/doc/4.6
+
+edition.Console.modules = QtCore QtDBus QtNetwork QtScript QtSql QtXml \
+ QtXmlPatterns QtTest
+edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg \
+ QtWebKit QtXml QtXmlPatterns Qt3Support QtHelp \
+ QtDesigner QtAssistant QAxContainer Phonon \
+ QAxServer QtUiTools QtTest QtDBus
+edition.DesktopLight.modules = QtCore QtDBus QtGui Qt3SupportLight QtTest
+edition.DesktopLight.groups = -graphicsview-api
+
+qhp.projects = Qt
+
+qhp.Qt.file = qt.qhp
+qhp.Qt.namespace = com.trolltech.qt.460
+qhp.Qt.virtualFolder = qdoc
+qhp.Qt.indexTitle = Qt Reference Documentation
+qhp.Qt.indexRoot =
+
+# Files not referenced in any qdoc file (last four are needed by qtdemo)
+# See also extraimages.HTML
+qhp.Qt.extraFiles = classic.css \
+ images/qt-logo.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ images/stylesheet-coffee-plastique.png
+
+qhp.Qt.filterAttributes = qt 4.6.0 qtrefdoc
+qhp.Qt.customFilters.Qt.name = Qt 4.6.0
+qhp.Qt.customFilters.Qt.filterAttributes = qt 4.6.0
+qhp.Qt.subprojects = classes overviews examples
+qhp.Qt.subprojects.classes.title = Classes
+qhp.Qt.subprojects.classes.indexTitle = Qt's Classes
+qhp.Qt.subprojects.classes.selectors = class fake:headerfile
+qhp.Qt.subprojects.classes.sortPages = true
+qhp.Qt.subprojects.overviews.title = Overviews
+qhp.Qt.subprojects.overviews.indexTitle = All Overviews and HOWTOs
+qhp.Qt.subprojects.overviews.selectors = fake:page,group,module
+qhp.Qt.subprojects.examples.title = Tutorials and Examples
+qhp.Qt.subprojects.examples.indexTitle = Qt Examples
+qhp.Qt.subprojects.examples.selectors = fake:example
+
+language = Cpp
+
+headerdirs = $QTDIR/src \
+ $QTDIR/extensions/activeqt \
+ $QTDIR/tools/assistant/lib \
+ $QTDIR/tools/assistant/compat/lib \
+ $QTDIR/tools/designer/src/uitools \
+ $QTDIR/tools/designer/src/lib/extension \
+ $QTDIR/tools/designer/src/lib/sdk \
+ $QTDIR/tools/designer/src/lib/uilib \
+ $QTDIR/tools/qtestlib/src \
+ $QTDIR/tools/qdbus/src
+sourcedirs = $QTDIR/src \
+ $QTDIR/doc/src \
+ $QTDIR/extensions/activeqt \
+ $QTDIR/tools/assistant/lib \
+ $QTDIR/tools/assistant/compat/lib \
+ $QTDIR/tools/designer/src/uitools \
+ $QTDIR/tools/designer/src/lib/extension \
+ $QTDIR/tools/designer/src/lib/sdk \
+ $QTDIR/tools/designer/src/lib/uilib \
+ $QTDIR/tools/qtestlib/src \
+ $QTDIR/tools/qdbus
+
+excludedirs = $QTDIR/src/3rdparty/clucene \
+ $QTDIR/src/3rdparty/des \
+ $QTDIR/src/3rdparty/freetype \
+ $QTDIR/src/3rdparty/harfbuzz \
+ $QTDIR/src/3rdparty/kdebase \
+ $QTDIR/src/3rdparty/libjpeg \
+ $QTDIR/src/3rdparty/libmng \
+ $QTDIR/src/3rdparty/libpng \
+ $QTDIR/src/3rdparty/libtiff \
+ $QTDIR/src/3rdparty/md4 \
+ $QTDIR/src/3rdparty/md5 \
+ $QTDIR/src/3rdparty/patches \
+ $QTDIR/src/3rdparty/sha1 \
+ $QTDIR/src/3rdparty/sqlite \
+ $QTDIR/src/3rdparty/webkit/JavaScriptCore \
+ $QTDIR/src/3rdparty/webkit/WebCore \
+ $QTDIR/src/3rdparty/wintab \
+ $QTDIR/src/3rdparty/zlib \
+ $QTDIR/doc/src/snippets \
+ $QTDIR/src/3rdparty/phonon/gstreamer \
+ $QTDIR/src/3rdparty/phonon/ds9 \
+ $QTDIR/src/3rdparty/phonon/qt7 \
+ $QTDIR/src/3rdparty/phonon/waveout
+
+sources.fileextensions = "*.cpp *.qdoc *.mm"
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp"
+
+exampledirs = $QTDIR/doc/src \
+ $QTDIR/examples \
+ $QTDIR/examples/tutorials \
+ $QTDIR \
+ $QTDIR/qmake/examples \
+ $QTDIR/src/3rdparty/webkit/WebKit/qt/docs
+imagedirs = $QTDIR/doc/src/images \
+ $QTDIR/examples
+outputdir = $QTDIR/doc/html
+tagfile = $QTDIR/doc/html/qt.tags
+base = file:$QTDIR/doc/html
diff --git a/tools/qdoc3/doc/images/happy.gif b/tools/qdoc3/doc/images/happy.gif
new file mode 100644
index 0000000000..a4597f6fa8
--- /dev/null
+++ b/tools/qdoc3/doc/images/happy.gif
Binary files differ
diff --git a/tools/qdoc3/doc/images/happyguy.jpg b/tools/qdoc3/doc/images/happyguy.jpg
new file mode 100644
index 0000000000..e8604793c2
--- /dev/null
+++ b/tools/qdoc3/doc/images/happyguy.jpg
Binary files differ
diff --git a/tools/qdoc3/doc/images/qt-logo.png b/tools/qdoc3/doc/images/qt-logo.png
new file mode 100644
index 0000000000..14ddf2a028
--- /dev/null
+++ b/tools/qdoc3/doc/images/qt-logo.png
Binary files differ
diff --git a/tools/qdoc3/doc/images/training.jpg b/tools/qdoc3/doc/images/training.jpg
new file mode 100644
index 0000000000..c2ce5c3b21
--- /dev/null
+++ b/tools/qdoc3/doc/images/training.jpg
Binary files differ
diff --git a/tools/qdoc3/doc/qdoc-manual.qdoc b/tools/qdoc3/doc/qdoc-manual.qdoc
new file mode 100644
index 0000000000..e2f670c0a0
--- /dev/null
+++ b/tools/qdoc3/doc/qdoc-manual.qdoc
@@ -0,0 +1,8695 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page index.html
+ \nextpage QDoc Manual
+
+ \title QDoc Manual - Table of Contents
+
+ \list
+ \o \l{QDoc Manual}
+ \o \l{QDoc Commands}
+ \list
+ \o \l{Markup Commands}
+ \o \l{Text Formatting Commands}
+ \o \l{Document Structuring Commands}
+ \o \l{Verbatim Code Commands}
+ \o \l{Quoting External Code Commands}
+ \list
+ \o \l{Example File}
+ \endlist
+ \o \l{Linking Commands}
+ \o \l{Graphic Commands}
+ \o \l{Container Commands}
+ \o \l{Document Contents Commands}
+ \o \l{Miscellaneous Commands}
+ \list
+ \o \l{signalandslots.qdocinc}
+ \o \l{objectmodel.qdocinc}
+ \o \l{layoutmanagement.qdocinc}
+ \endlist
+ \o \l{Topical Commands}
+ \o \l{Contextual Commands}
+ \o \l{Navigation Commands}
+ \o \l{Status Commands}
+ \o \l{Thread Support Commands}
+ \o \l{Relating Commands}
+ \o \l{Grouping Commands}
+ \o \l{Title Commands}
+ \endlist
+ \o \l{QDoc Configuration}
+ \list
+ \o \l{General Variables}
+ \o \l{Creating Help Project Files}
+ \o \l{C++ Specific Variables}
+ \o \l{HTML Specific Variables}
+ \o \l{Supporting Derived Projects}
+ \o \l{QDoc Compatibility}
+ \o \l{qt.qdocconf}
+ \o \l{minimum.qdocconf}
+ \endlist
+ \o \l{QDoc Commands - Alphabetical List}
+ \endlist
+*/
+
+/*!
+ \page 01-qdoc-manual.html
+ \contentspage QDoc Manual - Table of Contents
+ \previouspage QDoc Manual - Table of Contents
+ \nextpage QDoc Commands
+
+ \title QDoc Manual
+
+ QDoc is the internal tool used by Qt Development Frameworks for generating
+ documentation. This document is a reference for QDoc command syntax and
+ configuration.
+
+ \section1 Overview
+
+ \list I
+ \o \section2 \l {QDoc Commands}
+
+ \l {QDoc Commands - Alphabetical List}{A complete alphabetical
+ list}.
+
+ There are two main categories of commands for QDoc: markup
+ commands and meta-commands.
+
+ The markup commands indicate the generated documentation's
+ appearance and logical structure. The meta-commands provide
+ information about the document as well as the documented
+ item. The meta-commands can be further categorized as topical
+ commands and contextual commands.
+
+ \list
+ \o \l {Markup Commands}
+ \list
+ \o \l {Text Formatting Commands}{Text Formatting}
+ \o \l {Document Structuring Commands}{Document Structuring}
+ \o \l {Verbatim Code Commands}{Verbatim Code}
+ \o \l {Quoting External Code Commands}{Quoting External Code}
+ \o \l {Linking Commands}{Linking}
+ \o \l {Graphic Commands}{Graphic}
+ \o \l {Container Commands}{Container}
+ \o \l {Document Contents Commands}{Document Contents}
+ \o \l {Miscellaneous Commands}{Miscellaneous}
+ \endlist
+ \o \l {Topical Commands}
+ \o \l {Contextual Commands}
+ \list
+ \o \l {Navigation Commands}{Navigation}
+ \o \l {Status Commands}{Status}
+ \o \l {Thread Support Commands}{Thread Support}
+ \o \l {Relating Commands}{Relating}
+ \o \l {Grouping Commands}{Grouping}
+ \o \l {Title Commands}{Title}
+ \endlist
+ \endlist
+ \endlist
+
+ \list II
+ \o \section2 \l {QDoc Configuration}
+
+ When running QDoc to generate the documentation, you must
+ specify a configuration file on the command line. The
+ configuration file is a list of entries of entries of the form
+ "variable = value".
+
+ \list
+ \o \l {Configuration Variables}
+ \o \l {Configuration File Examples}
+ \endlist
+
+ Some particular configuration variables allow you to use QDoc
+ to support Qt-based projects; i.e to make projects, such as Qt
+ Solutions, contain references to the online Qt documentation.
+
+ \list
+ \o \l {Supporting Derived Projects}
+ \endlist
+
+ QDoc is a tool that constantly evolves to suit our needs, for
+ that reason there are some compatibility issues between old and
+ new practices.
+
+ \list
+ \o \l {QDoc Compatibility}
+ \endlist
+ \endlist
+*/
+
+/*!
+ \page 02-qdoc-commands.html
+ \previouspage QDoc Manual
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage Markup Commands
+
+ \title QDoc Commands
+
+ There are two main categories of commands for QDoc: markup
+ commands and meta-commands.
+
+ The markup commands indicate the generated documentation's visual
+ appearance and logical structure. The meta-commands provide
+ information about the documentation unit as well as the documented
+ item. The meta-commands can be further categorized as topical
+ commands and contextual commands.
+
+ \section1 Alphabetical List
+
+ A complete \l{QDoc Commands - Alphabetical List }
+ {alphabetical list of the QDoc commands}.
+
+ \section1 Categories
+
+ \list
+ \o \l {Markup Commands}
+ \o \l {Topical Commands}
+ \o \l {Contextual Commands}
+ \endlist
+*/
+
+/*!
+ \page 03-qdoc-commands-markup.html
+ \contentspage QDoc Manual - Table of Contents
+ \previouspage QDoc Commands
+ \nextpage Text Formatting Commands
+
+ \title Markup Commands
+
+ The markup commands indicate the generated documentation's visual
+ appearance and logical structure.
+
+ \section1 Alphabetical List
+
+ \l {04-qdoc-commands-textformatting.html#backslash}{\\\\},
+ \l {04-qdoc-commands-textformatting.html#a}{\\a},
+ \l {11-qdoc-commands-documentcontents.html#abstract}{\\abstract},
+ \l {06-qdoc-commands-verbatimcode.html#badcode}{\\badcode},
+ \l {04-qdoc-commands-textformatting.html#bold}{\\bold},
+ \l {11-qdoc-commands-documentcontents.html#brief}{\\brief},
+ \l {04-qdoc-commands-textformatting.html#c}{\\c},
+ \l {09-qdoc-commands-graphic.html#caption}{\\caption},
+ \l {05-qdoc-commands-documentstructuring.html#chapter}{\\chapter},
+ \l {06-qdoc-commands-verbatimcode.html#code}{\\code},
+ \l {07-0-qdoc-commands-quoting.html#codeline}{\\codeline},
+ \l {07-0-qdoc-commands-quoting.html#dots}{\\dots},
+ \l {12-0-qdoc-commands-miscellaneous.html#else}{\\else},
+ \l {12-0-qdoc-commands-miscellaneous.html#endif}{\\endif},
+ \l {12-0-qdoc-commands-miscellaneous.html#expire}{\\expire},
+ \l {11-qdoc-commands-documentcontents.html#footnote}{\\footnote},
+ \l {12-0-qdoc-commands-miscellaneous.html#generatelist}{\\generatelist},
+ \l {10-qdoc-commands-container.html#header}{\\header},
+ \l {04-qdoc-commands-textformatting.html#i}{\\i},
+ \l {12-0-qdoc-commands-miscellaneous.html#if}{\\if},
+ \l {09-qdoc-commands-graphic.html#image}{\\image},
+ \l {12-0-qdoc-commands-miscellaneous.html#include}{\\include},
+ \l {09-qdoc-commands-graphic.html#inlineimage}{\\inlineimage},
+ \l {08-qdoc-commands-linking.html#keyword}{\\keyword},
+ \l {08-qdoc-commands-linking.html#l}{\\l},
+ \l {11-qdoc-commands-documentcontents.html#legalese}{\\legalese},
+ \l {10-qdoc-commands-container.html#list}{\\list},
+ \l {12-0-qdoc-commands-miscellaneous.html#meta}{\\meta},
+ \l {06-qdoc-commands-verbatimcode.html#newcode}{\\newcode},
+ \l {10-qdoc-commands-container.html#o}{\\o},
+ \l {06-qdoc-commands-verbatimcode.html#oldcode}{\\oldcode},
+ \l {12-0-qdoc-commands-miscellaneous.html#omit}{\\omit},
+ \l {05-qdoc-commands-documentstructuring.html#part}{\\part},
+ \l {07-0-qdoc-commands-quoting.html#printline}{\\printline},
+ \l {07-0-qdoc-commands-quoting.html#printto}{\\printto},
+ \l {07-0-qdoc-commands-quoting.html#printuntil}{\\printuntil},
+ \l {11-qdoc-commands-documentcontents.html#quotation}{\\quotation},
+ \l {07-0-qdoc-commands-quoting.html#quotefile}{\\quotefile},
+ \l {07-0-qdoc-commands-quoting.html#quotefromfile}{\\quotefromfile},
+ \l {12-0-qdoc-commands-miscellaneous.html#raw}{\\raw},
+ \l {10-qdoc-commands-container.html#row}{\\row},
+ \l {08-qdoc-commands-linking.html#sa}{\\sa},
+ \l {05-qdoc-commands-documentstructuring.html#sectionOne}{\\section1},
+ \l {05-qdoc-commands-documentstructuring.html#sectionTwo}{\\section2},
+ \l {05-qdoc-commands-documentstructuring.html#sectionThree}{\\section3},
+ \l {05-qdoc-commands-documentstructuring.html#sectionFour}{\\section4},
+ \l {07-0-qdoc-commands-quoting.html#skipline}{\\skipline},
+ \l {07-0-qdoc-commands-quoting.html#skipto}{\\skipto},
+ \l {07-0-qdoc-commands-quoting.html#skipuntil}{\\skipuntil},
+ \l {07-0-qdoc-commands-quoting.html#snippet}{\\snippet},
+ \l {04-qdoc-commands-textformatting.html#sub}{\\sub},
+ \l {04-qdoc-commands-textformatting.html#sup}{\\sup},
+ \l {10-qdoc-commands-container.html#table}{\\table},
+ \l {11-qdoc-commands-documentcontents.html#tableofcontents}
+ {\\tableofcontents},
+ \l {08-qdoc-commands-linking.html#target}{\\target},
+ \l {04-qdoc-commands-textformatting.html#tt}{\\tt},
+ \l {04-qdoc-commands-textformatting.html#underline}{\\underline},
+ \l {12-0-qdoc-commands-miscellaneous.html#raw}{\\unicode},
+ \l {11-qdoc-commands-documentcontents.html#warning}{\\warning}
+
+ \section1 Categories
+ \list
+ \o \l {Text Formatting Commands}
+ \o \l {Document Structuring Commands}
+ \o \l {Verbatim Code Commands}
+ \o \l {Quoting External Code Commands}
+ \o \l {Linking Commands}
+ \o \l {Graphic Commands}
+ \o \l {Container Commands}
+ \o \l {Document Contents Commands}
+ \o \l {Miscellaneous Commands}
+ \endlist
+
+*/
+
+/*!
+ \page 04-qdoc-commands-textformatting.html
+ \contentspage QDoc Manual - Table of Contents
+ \previouspage Markup Commands
+ \nextpage Document Structuring Commands
+
+ \title Text Formatting Commands
+
+ The text formatting commands indicate how the regular text in the
+ documentation is rendered.
+
+ \section1 Alphabetical List
+
+ \l {04-qdoc-commands-textformatting.html#backslash}{\\\\},
+ \l {04-qdoc-commands-textformatting.html#a}{\\a},
+ \l {04-qdoc-commands-textformatting.html#bold}{\\bold},
+ \l {04-qdoc-commands-textformatting.html#c}{\\c},
+ \l {04-qdoc-commands-textformatting.html#i}{\\i},
+ \l {04-qdoc-commands-textformatting.html#sub}{\\sub},
+ \l {04-qdoc-commands-textformatting.html#sup}{\\sup},
+ \l {04-qdoc-commands-textformatting.html#tt}{\\tt},
+ \l {04-qdoc-commands-textformatting.html#underline}{\\underline}
+
+ \section1 Command Descriptions
+
+ \table
+ \header
+ \o Command
+ \o Description
+
+ \row
+
+ \o \bold \\\\ \target backslash
+ \o \bold {The \\\\ command expands to a single backslash.}
+
+ QDoc commands always start with a backslash alone. To
+ display an actual backslash in the text you need to type
+ two of the kind. If you want to display two backslashes,
+ you need to type four, and so forth. For example:
+
+ \code
+ / *!
+ The \\\\ command is useful if you want a
+ backslash to appear verbatim, for example,
+ writing C:\\windows\\home\\.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ The \\\\ command is useful if you want a
+ backslash to appear verbatim, for example,
+ writing C:\\windows\\home\\.
+ \endquotation
+
+ However, if you want your text to appear in a typewriter
+ font as well, you can use the \l {c}{\\c} command instead,
+ which accepts and renders the backslash as any other
+ character. For example:
+
+ \code
+ / *!
+ The \\c command is useful if you want a
+ backslash to appear verbatim, and the word
+ that contains it written in a typewriter font,
+ like this: \c {C:\windows\home\}.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ The \\c command is useful if you want a
+ backslash to appear verbatim, and the word
+ that contains it written in a typewriter font,
+ like this: \c {C:\windows\home\}.
+ \endquotation
+
+ \row
+ \o \bold \\a \target a
+ \o \bold {The \\a command indicates that the next word
+ is a parameter when documenting functions.}
+
+ Warnings are emitted when function parameters are
+ undocumented or misspelled, so whenever you write
+ documentation for functions you should make sure you
+ mention all the parameters and precede each of these by the
+ \\a command. The parameter is then rendered in italic. For
+ example:
+
+ \code
+ / *!
+ Constructs a line edit containing the text
+ \a contents.
+
+ The \a parent parameter is sent to the
+ QWidget constructor.
+ * /
+
+ QLineEdit::QLineEdit(const QString &contents, QWidget *parent)
+ :QWidget(parent)
+ {
+ ...
+ }
+
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \bold {QLineEdit::QLineEdit ( const QString &
+ contents, QWidget *parent )}
+
+ Constructs a line edit containing the text \a contents.
+
+ The \a parent parameter is sent to the QWidget
+ constructor.
+
+ \endquotation
+
+ The \\a command follows the same conventions as the \l
+ {i}{\\i} command for \l {argument}{punctuation, parentheses
+ and use of braces} for the argument. However, a parameter
+ is always a single word, so braces are rarely
+ necessary. And for the same reason, parentheses seldom
+ occur.
+
+ \row
+ \o \bold \\c \target c
+ \o \bold {The \\c command can be used to render variables,
+ user-defined classes and C++ keywords like \c int,
+ \c for, etc.}
+
+ The command renders its argument using a typewriter font. For
+ example:
+
+ \code
+ / *!
+ The \c AnalogClock class provides a clock widget with hour
+ and minute hands that is automatically updated every
+ few seconds.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ The \c AnalogClock class provides a clock widget with hour
+ and minute hands that is automatically updated every
+ few seconds.
+ \endquotation
+
+ The \\c command follows the same conventions as the \l
+ {i}{\\i} command for \l {argument}{punctuation, parentheses
+ and use of braces} for the argument.
+
+ The \\c command accepts the special character \c \ within
+ its argument, i.e. it renders it as a normal character. So
+ if you want to use nested commands, you must use the \l
+ {tt}{teletype (\\tt)} command instead.
+
+ See also \l {tt}{\\tt} and \l {code}{\\code}.
+
+ \row
+ \o \bold \\tt \target tt
+ \o \bold {The \\tt command can be used to render variables,
+ user-defined classes and C++ keywords like \c int, \c
+ for, etc.}
+
+ The \\tt command behaves just like the \l {c}{\\c} command,
+ except that \\tt parses QDoc commands (like \l {i}{\\i}, \l
+ {bold}{\\bold} and \l {underline}{\\underline}) contained
+ within its argument.
+
+ The command renders its argument using a monospace
+ font. For example:
+
+ \code
+ / *!
+ After \c setupUi() populates the main container with
+ child widgets it scans the main container's list of
+ slots for names with the form
+ \tt{on_\i{objectName}_\i{signalName}().}
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ After \c setupUi() populates the main container with
+ child widgets it scans the main container's list of
+ slots for names with the form
+ \tt{on_\i{objectName}_\i{signalName}().}
+ \endquotation
+
+ The \\tt command follows the same conventions as the \l
+ {i}{\\i} command for \l {argument}{punctuation, parentheses
+ and use of braces} for the argument.
+
+ See also \l {c}{\\c}.
+
+ \row
+ \o \bold \\bold \target bold
+ \o \bold {The \\bold command renders its argument using
+ a bold font.}
+
+ For example:
+
+ \code
+ / *!
+ This is regular text; \bold {this text is
+ rendered using the \\bold command}.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ This is regular text; \bold {this text is rendered using
+ the \\bold command}.
+ \endquotation
+
+ The command follows the same conventions as the \l {i}{\\i}
+ command for \l {argument}{punctuation, parentheses and use
+ of braces} for the argument.
+
+ \row
+ \o \bold \\i \target i
+ \o \bold {The \\i command renders its argument in italic.}
+
+ \warning This is preliminary functionality. For
+ more information, see the \l
+ {26-qdoc-commands-compatibility.html#i-versus-e}{compatibility}
+ section.
+
+ \target argument
+ Normally, a command argument ends at the next whitespace [1],
+ but braces can be used to group words [2]. For example:
+
+ \code
+ / *!
+ Here, we render \i {a few words} in italic.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ Here, we render \i {a few words} in italic.
+ \endquotation
+
+ If you want to use other QDoc commands within an argument
+ that contains spaces, you always need to enclose the
+ argument with braces. But QDoc is smart enough to count
+ parentheses [3], so you don't need braces in cases like this:
+
+ \code
+ / *!
+ An argument can sometimes contain whitespaces,
+ for example: \i QPushButton(tr("A Brand New Button"))
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ An argument can sometimes contain whitespaces,
+ for example: \i QPushButton(tr("A Brand New Button"))
+ \endquotation
+
+ Finally, trailing punctuation is not included in an
+ argument [4], nor is 's [5]
+
+ \raw HTML
+ <table align="center" cellpadding="2"
+ cellspacing="1" border="0">
+ <tr valign="top" bgcolor="#a2c511">
+ <th></th>
+ <th>QDoc Syntax</th>
+ <th>Generated Documentation</th>
+ </tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>1</td>
+ <td>A variation of a command button is a \i menu
+ button.</td>
+ <td>A variation of a command button is a <i>menu</i>
+ button.</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#c0c0c0">
+ <td>2</td>
+ <td>The QPushButton widget provides a
+ \i {command button}.</td>
+ <td>The QPushButton widget provides a
+ <i>command button</i>.</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>3</td>
+ <td>Another class of buttons are option buttons
+ \i (see QRadioButton).</td>
+ <td>Another class of buttons are option buttons
+ <i> (see QRadioButton)</i>.</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#c0c0c0">
+ <td>4</td>
+ <td>A push button emits the signal \i clicked().</td>
+ <td>A push button emits the signal <i>clicked</i>().</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>5</td>
+ <td>The \i QPushButton's checked property is
+ false by default.</td>
+ <td>The <i>QPushButton</i>'s checked property is
+ false by default.</td>
+ </tr>
+
+ </table>
+ \endraw
+
+ \row
+ \o \bold \\sub \target sub
+ \o \bold {The \\sub command renders its argument lower
+ than the baseline of the regular text, using a smaller font.}
+
+ For example:
+
+ \code
+ / *!
+ Definition (Range): Consider the sequence
+ {x\sub n}\sub {n > 1} . The set
+
+ {x\sub 2, x\sub 3, x\sub 4, ...} = {x\sub n ; n = 2, 3, 4, ...}
+
+ is called the range of the sequence.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ Definition (Range): Consider the sequence
+ {x\sub n}\sub {n > 1} . The set
+
+ {x\sub 2, x\sub 3, x\sub 4, ...} = {x\sub n ; n = 2, 3, 4, ...}
+
+ is called the range of the sequence.
+ \endquotation
+
+ The \\sub command follows the same conventions as the \l
+ {i}{\\i} command for \l {argument}{punctuation, parentheses
+ and use of braces} for the argument.
+
+ \row
+ \o \bold \\sup \target sup
+ \o \bold {The \\sup command renders its argument higher than
+ the baseline of the regular text, using a smaller font.}
+
+ For example:
+
+ \code
+ / *!
+ The series
+
+ 1 + a + a\sup 2 + a\sup 3 + a\sup 4 + ...
+
+ is called the \i {geometric series}.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ The series
+
+ 1 + a + a\sup 2 + a\sup 3 + a\sup 4 + ...
+
+ is called the \i {geometric series}.
+ \endquotation
+
+ The \\sup command follows the same conventions as the \l
+ {i}{\\i} command for \l {argument}{punctuation, parentheses
+ and use of braces} for the argument.
+
+ \row
+ \o \bold \\underline \target underline
+ \o \bold {The \\underline command renders its argument underlined.}
+
+ For example:
+
+ \code
+ / *!
+ The \underline {F}ile menu gives the users the possibility
+ to open, and edit, an existing file, save a new or modified
+ file, and exit the application.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ The \underline {F}ile menu gives the users the possibility
+ to open, and edit, an existing file, save a new or modified
+ file, and exit the application.
+ \endquotation
+
+ The \\underline command follows the same conventions as the
+ \l {i}{\\i} command for \l {argument}{punctuation,
+ parentheses and use of braces} for the argument. \endtable
+*/
+
+/*!
+ \page 05-qdoc-commands-documentstructuring.html
+ \previouspage Text Formatting Commands
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage Verbatim Code Commands
+
+ \title Document Structuring Commands
+
+ The document structuring commands divide the documentation into
+ sections. In total, there are six levels of sections in QDoc: \c
+ \part, \c \chapter, \c \section1, \c \section2, \c \section3 and
+ \c \section4. \c \section1 to \c \section4 correspond to the
+ traditional section, subsection, subsubsection and
+ subsubsubsection.
+
+ \section1 Alphabetical List
+
+ \l {05-qdoc-commands-documentstructuring.html#chapter}{\\chapter},
+ \l {05-qdoc-commands-documentstructuring.html#part}{\\part},
+ \l {05-qdoc-commands-documentstructuring.html#sectionOne}{\\section1},
+ \l {05-qdoc-commands-documentstructuring.html#sectionTwo}{\\section2},
+ \l {05-qdoc-commands-documentstructuring.html#sectionThree}{\\section3},
+ \l {05-qdoc-commands-documentstructuring.html#sectionFour}{\\section4}
+
+ \section1 Command Descriptions
+
+ \table
+ \header
+ \o Command
+ \o Description
+
+ \row
+ \o \bold \\part \target part
+ \o \bold {The \\part command is intended for use in
+ larger documents, and divides the document into parts.}
+
+ In general a document structuring command considers
+ everything that follows it until the first line break as
+ its argument. The argument is rendered as the unit's
+ title. If the title needs to be spanned over several lines,
+ make sure that each line (except the last one) is ended
+ with a backslash.
+
+ In total, there are six levels of sections in QDoc: \c
+ \part, \c \chapter, \c \section1, \c \section2, \c
+ \section3 and \c \section4. \c \section1 to \c \section4
+ correspond to the traditional section, subsection,
+ subsubsection and subsubsubsection.
+
+ There is a strict ordering of the section units:
+
+ \code
+ part
+ |
+ chapter
+ |
+ section1
+ |
+ section2
+ |
+ section3
+ |
+ section4
+ \endcode
+
+ For example, a \c section1 unit can only appear as the top
+ level section or inside a \c chapter unit. Skipping a
+ section unit, for example from \c part to \c section1, is
+ not allowed.
+
+ You can \i begin with either of the three: \c part, \c
+ chapter or \c section1. For example:
+
+
+ \code
+ / *!
+ \part Basic Qt
+
+ This is the first part.
+
+
+ \chapter Getting Started
+
+ This is the first part's first chapter.
+
+
+ \section1 Hello Qt
+
+ This is the first chapter's first section.
+
+
+ \section1 Making Connections
+
+ This is the first chapter's second section.
+
+
+ \section1 Using the Reference Documentation
+
+ This is the first chapter's third section.
+
+
+ \chapter Creating Dialogs
+
+ This is the first part's second chapter.
+
+
+ \section1 Subclassing QDialog
+
+ This is the second chapter's first section.
+
+ ...
+
+
+ \part Intermediate Qt
+
+ This is the second part.
+
+
+ \chapter Layout Management
+
+ This is the second part's first chapter.
+
+
+ \section1 Basic Layouts
+
+ This is the first chapter's first section.
+
+ ...
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <a name="Basic Qt">
+ <h1>Basic Qt</h1>
+ </a>
+ <p>This is the first part.</p>
+
+ <a name="Getting started">
+ <h2>Getting Started</h2>
+ </a>
+ This is the first part's first chapter.</p>
+
+ <a name="Hello Qt">
+ <h3>Hello Qt</h3>
+ </a>
+ <p>This is the first chapter's first section.</p>
+
+ <a name="Making Connections">
+ <h3>Making Connections</h3>
+ </a>
+ <p>This is the first chapter's second section.</p>
+
+ <a name="Using the Reference Documentation">
+ <h3>Using the Reference Documentation</h3>
+ </a>
+ <p>This is the first chapter's third section.</p>
+
+ <a name="Creating Dialogs">
+ <h2>Creating Dialogs</h2>
+ </a>
+ <p>This is the first part's second chapter.</p>
+
+ <a name="Subclassing QDialog">
+ <h3>Subclassing QDialog</h3>
+ </a>
+ <p>This is the second chapter's first section.</p>
+
+ ...
+
+ <a name="Intermediate Qt">
+ <h1>Intermediate Qt</h1>
+ </a>
+ <p>This is the second part.</p>
+
+ <a name="Layout Management">
+ <h2>Layout Management</h2>
+ </a>
+ <p>This is the second part's first chapter.</p>
+
+ <a name="Basic Layouts">
+ <h3>Basic Layouts</h3>
+ </a>
+ <p>This is the first chapter's first section.</p>
+
+ ...
+
+ \endraw
+ \endquotation
+
+ Each section level is a logical unit within the
+ document. Its title will appear on the table of contents
+ generated by the \l
+ {11-qdoc-commands-documentcontents.html#tableofcontents}
+ {\\tableofcontents} command. For example:
+
+ \code
+ / *!
+ Contents:
+
+ \tableofcontents
+
+ ...
+ * /
+ \endcode
+
+ will expand to
+
+ \quotation
+ \raw HTML
+ <p>Contents:</p>
+
+ <ul>
+ <li><a href="#Basic Qt">Basic Qt</a></li>
+ <ul>
+ <li><a href="#Getting Started">Getting Started</a></li>
+ <ul>
+ <li><a href="#Hello Qt">Hello Qt</a></li>
+ <li><a href="#Making Connections">
+ Making Connections</a></li>
+ <li><a href="#Using the Reference Documentation">
+ Using the Reference Documentation</a></li>
+ </ul>
+ <li><a href="#Creating Dialogs">Creating Dialogs</a></li>
+ <ul>
+ <li><a href="#Subclassing QDialog">
+ Subclassing QDialog</a></li>
+ </ul>
+ </ul>
+ <li><a href="#Intermediate Qt">Intermediate Qt</a></li>
+ <ul>
+ <li><a href="#Layout Management">
+ Layout Management</a></li>
+ <ul>
+ <li><a href="#Basic Layouts">Basic Layouts</a></li>
+ </ul>
+ </ul>
+ </ul>
+
+ ...
+ \endraw
+ \endquotation
+
+ \row
+ \o \bold \\chapter \target chapter
+ \o \bold {The \\chapter command is intended for use in
+ larger documents, and divides the document into chapters.}
+
+ See \l{part}{\\part} for an explanation of the various
+ section units, command argument and rendering.
+
+ \row
+ \o \bold \\section1 \target sectionOne
+ \o \bold {The \\section1 command starts a new section.}
+
+ See \l{part}{\\part} for an explanation of the various
+ section units, command argument and rendering.
+ \row
+ \o \bold \\section2 \target sectionTwo
+ \o \bold {The \\section2 command starts a new section.}
+
+ See \l{part}{\\part} for an explanation of the various
+ section units, command argument and rendering.
+
+ \row
+ \o \bold \\section3 \target sectionThree
+ \o \bold {The \\section3 command starts a new section.}
+
+ See \l{part}{\\part} for an explanation of the various
+ section units, command argument and rendering.
+
+ \row
+ \o \bold \\section4 \target sectionFour
+ \o \bold {The \\section4 command starts a new section.}
+
+ See \l{part}{\\part} for an explanation of the various
+ section units, command argument and rendering.
+
+ \endtable
+*/
+
+/*!
+ \page 06-qdoc-commands-verbatimcode.html
+ \previouspage Document Structuring Commands
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage Quoting External Code Commands
+
+ \title Verbatim Code Commands
+
+ The following commands are used to render verbatim code within the
+ documentation. The code is rendered on a new line, using a
+ typewriter font and the standard indentation.
+
+ \bold{Note:} Although all of these commands can be used to present
+ C++ code, the \l{07-0-qdoc-commands-quoting.html#snippet}{\\snippet}
+ and \l{07-0-qdoc-commands-quoting.html#codeline}{\\codeline} commands
+ should be used in preference to
+ the others when presenting valid code. This allows auxilliary tools
+ for Qt language bindings to substitute the relevant code snippets in
+ place of the C++ ones.
+
+ \section1 Alphabetical List
+
+ \l {06-qdoc-commands-verbatimcode.html#badcode}{\\badcode},
+ \l {06-qdoc-commands-verbatimcode.html#code}{\\code},
+ \l {06-qdoc-commands-verbatimcode.html#newcode}{\\newcode},
+ \l {06-qdoc-commands-verbatimcode.html#oldcode}{\\oldcode}
+
+ \section1 Command Descriptions
+
+ \table
+ \header
+ \o Command
+ \o Description
+
+ \row
+ \o \bold \\code \target code
+ \o \bold {The \\code command and the corresponding
+ \\endcode command delimit a piece of verbatim code.}
+
+ Whereas the \l {c}{\\c} command can be used for short code
+ fragments within a sentence, the \\code command is for
+ longer code snippets and renders the code verbatim in a
+ separate paragraph using a typewriter font and the standard
+ indentation.
+
+ When processing any of the \\code, \l {badcode}{\\badcode},
+ \l {newcode}{\\newcode} and \l {oldcode}{\\oldcode}
+ commands, QDoc basically removes all indentation that is
+ common for the verbatim code blocks within a \c{/}\c{*!} ...
+ \c{*}\c{/} comment before it adds the standard
+ indentation. For that reason the recommended style is to
+ use 8 spaces for the verbatim code contained within these
+ commands (note that this doesn't apply to externally
+ quoted code using the \l {quotefromfile}{\\quotefromfile}
+ or \l {quotefile}{\\quotefile} command).
+
+ For example:
+
+ \code
+ / *!
+ \code
+ #include <QApplication>
+ #include <QPushButton>
+
+ int main(int argc, char *argv[])
+ {
+ ...
+ }
+ \ endcode
+ * /
+ \endcode
+
+ will be rendered as
+
+ \code
+ #include <QApplication>
+ #include <QPushButton>
+
+ int main(int argc, char *argv[])
+ {
+ ...
+ }
+ \endcode
+
+ Other QDoc commands are disabled within
+ \\code... \\endcode, and the special character '\\' is
+ accepted and rendered like the rest of the code.
+
+ You need to type the code manually between the \\code and
+ \\endcode commands. If you want to include code snippets
+ from a particular file, use the \l
+ {07-0-qdoc-commands-quoting.html#quotefromfile}{\\quotefromfile}
+ command instead.
+
+ See also \l {c}{\\c}, \l
+ {07-0-qdoc-commands-quoting.html#quotefromfile}{\\quotefromfile},
+ \l {badcode}{\\badcode}, \l {newcode}{\\newcode} and \l
+ {oldcode}{\\oldcode}.
+
+ \row
+ \o \bold \\badcode \target badcode
+ \o \bold {The \\badcode command and the corresponding
+ \\endcode command delimit a piece of code that doesn't
+ compile or is wrong for some other reason.}
+
+ The \\badcode command is similar the \l {code}{\\code}
+ command, but renders the code using a grey font instead of
+ black (the default).
+
+ Like the \l {code}{\\code} command, it renders its code on
+ a new line in the documentation using a typewriter font and
+ the standard indentation. For example:
+
+ \code
+ / *!
+ The statement below is rendered using the
+ regular \\code command:
+
+ \code
+ statusbar()->message(tr("Host %1 found").arg(hostName));
+ \ endcode
+
+ While the following statement is rendered using
+ the \\badcode command:
+
+ \badcode
+ statusbar()->message(tr("Host" + hostName + " found"));
+ \ endcode
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ The statement below is rendered using the
+ regular \\code command:
+
+ \code
+ statusbar()->message(tr("Host %1 found").arg(hostName));
+ \endcode
+
+ While the following statement is rendered using
+ the \\badcode command:
+
+ \badcode
+ statusbar()->message(tr("Host" + hostName + " found"));
+ \endcode
+ \endquotation
+
+ Other QDoc commands are disabled within
+ \\badcode... \\endcode, and the special character '\\' is
+ accepted and rendered like the rest of the code.
+
+ See also \l {code}{\\code}, \l {newcode}{\\newcode} and \l
+ {oldcode}{\\oldcode}.
+
+ \row
+ \o \bold \\newcode \target newcode
+ \o \bold {The \\newcode command, and the associated \\oldcode
+ and \\endcode commands, indicate how to port a piece of
+ code to a new version of an API.}
+
+ The \\newcode command, and its companion the \\oldcode
+ command, is a convenience combination of the \l
+ {code}{\\code} and \l {badcode}{\\badcode} commands: The
+ combination provides a text relating the two code snippets
+ to each other. The command requires a preceding \\oldcode
+ statement.
+
+ Like the \l {code}{\\code} and \l {badcode}{\\badcode}
+ commands, the \\newcode command renders its code on a new
+ line in the documentation using a typewriter font and the
+ standard indentation. For example:
+
+ \code
+ / *!
+ \oldcode
+ if (printer->setup(parent))
+ ...
+ \newcode
+ QPrintDialog dialog(printer, parent);
+ if (dialog.exec())
+ ...
+ \ endcode
+ * /
+ \endcode
+
+ is rendered like this:
+
+ \quotation
+ \oldcode
+ if (printer->setup(parent))
+ ...
+ \newcode
+ QPrintDialog dialog(printer, parent);
+ if (dialog.exec())
+ ...
+ \endcode
+ \endquotation
+
+ Other QDoc commands are disabled within
+ \\oldcode ... \\endcode, and the '\\' character doesn't need
+ to be escaped.
+
+ \row
+ \o \bold \\oldcode \target oldcode
+ \o \bold {The \\oldcode command requires a corresponding
+ \\newcode statement; otherwise QDoc fails to parse the command
+ and emits a warning.}
+
+ See also \l {newcode}{\\newcode} and \l {badcode}{\\badcode}.
+ \endtable
+*/
+
+/*!
+ \page 07-0-qdoc-commands-quoting.html
+ \previouspage Verbatim Code Commands
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage Linking Commands
+
+ \title Quoting External Code Commands
+
+ The following commands enable quoting from files in the
+ documentation: You can make QDoc include the complete contents of
+ a file, or you can quote specific parts of the file and skip
+ others. The typical use of the latter is to quote a file chunk by
+ chunk.
+
+ \bold{Note:} Although all of these commands can be used to present
+ C++ code, the \l{#snippet}{\\snippet} and \l{#codeline}{\\codeline}
+ commands should be used in preference to
+ the others when presenting valid code. This allows auxilliary tools
+ for Qt language bindings to substitute the relevant code snippets in
+ place of the C++ ones.
+
+ \section1 Alphabetical List
+
+ \l {07-0-qdoc-commands-quoting.html#codeline}{\\codeline},
+ \l {07-0-qdoc-commands-quoting.html#dots}{\\dots},
+ \l {07-0-qdoc-commands-quoting.html#printline}{\\printline},
+ \l {07-0-qdoc-commands-quoting.html#printto}{\\printto},
+ \l {07-0-qdoc-commands-quoting.html#printuntil}{\\printuntil},
+ \l {07-0-qdoc-commands-quoting.html#quotefile}{\\quotefile},
+ \l {07-0-qdoc-commands-quoting.html#quotefromfile}{\\quotefromfile},
+ \l {07-0-qdoc-commands-quoting.html#skipline}{\\skipline},
+ \l {07-0-qdoc-commands-quoting.html#skipto}{\\skipto},
+ \l {07-0-qdoc-commands-quoting.html#skipuntil}{\\skipuntil},
+ \l {07-0-qdoc-commands-quoting.html#snippet}{\\snippet}
+
+ \section1 Command Descriptions
+
+ \table
+ \header
+ \o Command
+ \o Description
+
+ \row
+ \o \bold \\quotefile \target quotefile
+ \o \bold {The \\quotefile command expands to the complete
+ contents of the file given as argument.}
+
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the file name with a line
+ break.
+
+ The file's contents is rendered in a separate paragraph,
+ using a typewriter font and the standard indentation. The
+ code is shown verbatim.
+
+ For example:
+
+ \code
+ / *!
+ This is a simple "Hello world" example:
+
+ \quotefile examples/main.cpp
+
+ It contains only the bare minimum you need
+ to get a Qt application up and running.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ This is a simple "Hello world" example:
+
+ \quotefile examples/main.cpp
+
+ It contains only the bare minimum you need to get a Qt
+ application up and running.
+ \endquotation
+
+ \warning If you use the \l {QDoc
+ Compatibility}{compat.qdocconf} file this command is called
+ \\include.
+
+ See also \l {quotefromfile}{\\quotefromfile} and \l
+ {code}{\\code}.
+
+ \row
+ \o \bold \\quotefromfile \target quotefromfile
+ \o \bold {The \\quotefromfile command opens the file
+ given as argument for quoting.}
+
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the file name with a line
+ break.
+
+ The command is intended for use when quoting parts from
+ file with the walkthrough commands: \l
+ {printline}{\\printline}, \l {printto}{\\printto}, \l
+ {printuntil}{\\printuntil}, \l {skipline}{\\skipline}, \l
+ {skipto}{\\skipto}, \l {skipuntil}{\\skipuntil}. This
+ enables you to quote specific portions of a file. For
+ example:
+
+ \code
+ / *!
+ The whole application is contained within
+ the \c main() function:
+
+ \quotefromfile examples/main.cpp
+
+ \skipto main
+ \printuntil app(argc, argv)
+
+ First we create a QApplication object using
+ the \c argc and \c argv parameters.
+
+ \skipto QPushButton
+ \printuntil resize
+
+ Then we create a QPushButton, and give it a reasonable
+ size using the QWidget::resize() function.
+
+ ...
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ The whole application is contained within
+ the \c main() function:
+
+ \quotefromfile examples/main.cpp
+
+ \skipto main
+ \printuntil app(argc, argv)
+
+ First we create a QApplication object using the \c argc
+ and \c argv parameters.
+
+ \skipto QPushButton
+ \printuntil resize
+
+ Then we create a QPushButton, and give it a reasonable
+ size using the QWidget::resize() function.
+
+ ...
+ \endquotation
+
+ (\l {Example File}{The complete example file...})
+
+ QDoc remembers which file it's quoting, and the current
+ position within that file (see \l {file}{\\printline} for
+ more information). There is no need to "close" the file.
+
+ Earlier we called this command \\quotefile. For more
+ information, see the \l
+ {26-qdoc-commands-compatibility.html#quotefromfile-versus-quotefile}
+ {compatibility} section.
+
+ See also \l {quotefile}{\\quotefile}, \l {code}{\\code} and
+ \l {dots}{\\dots}.
+
+ \row
+ \o \bold \\printline \target printline
+ \o \bold {The \\printline command expands to the line
+ from the current position to the next non-blank line of
+ the current souce file.}
+
+ To ensure that the documentation always is synchronized
+ with the source file, a substring of the line must be
+ specified as an argument to the command. Note that the
+ command considers the rest of the line as part of its
+ argument, make sure to follow the substring with a line
+ break.
+
+ The line from the source file is rendered as a separate
+ paragraph, using a typewriter font and the standard
+ indentation. The code is shown verbatim.
+
+ For example:
+
+ \code
+ / *!
+ There has to be exactly one QApplication object
+ in every GUI application that uses Qt.
+
+ \quotefromfile examples/main.cpp
+
+ \printline QApplication
+
+ This line includes the QApplication class
+ definition. QApplication manages various
+ application-wide resources, such as the
+ default font and cursor.
+
+ \printline QPushButton
+
+ This line includes the QPushButton class
+ definition. The QPushButton widget provides a command
+ button.
+
+ \printline main
+
+ The main function...
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ There has to be exactly one QApplication object
+ in every GUI application that uses Qt.
+
+ \quotefromfile examples/main.cpp
+
+ \printline QApplication
+
+ This line includes the QApplication class
+ definition. QApplication manages various
+ application-wide resources, such as the
+ default font and cursor.
+
+ \printline QPushButton
+
+ This line includes the QPushButton class
+ definition. The QPushButton widget provides a command
+ button.
+
+ \printline main
+
+ The main function...
+ \endquotation
+
+ (\l {Example File}{The complete example file...})
+
+ \target file
+
+ QDoc reads the file sequentially. To move the current
+ position forward you can use either of the \l
+ {skipline}{\\skip...} commands. To move the current
+ position backward, you can use the \l
+ {quotefromfile}{\\quotefromfile} command again.
+
+ \target substring
+
+ If the substring argument is surrounded by slashes it is
+ interpreted as a \l {regular expression}.
+
+ For example:
+
+ \code
+ / *!
+ \quotefromfile widgets/scribble/mainwindow.cpp
+
+ \skipto closeEvent
+ \printuntil /^\}/
+
+ Close events are sent to widgets that the users want to
+ close, usually by clicking \c File|Exit or by clicking
+ the \c X title bar button. By reimplementing the event
+ handler, we can intercept attempts to close the
+ application.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \quotefromfile widgets/scribble/mainwindow.cpp
+
+ \skipto closeEvent
+ \printuntil /^\}/
+
+ Close events are sent to widgets that the users want to
+ close, usually by clicking \c File|Exit or by clicking
+ the \c X title bar button. By reimplementing the event
+ handler, we can intercept attempts to close the
+ application.
+ \endquotation
+
+ (\l {widgets/scribble}{The complete example file...})
+
+ The regular expression \c /^\}/ makes QDoc print until the
+ first '}' character occurring at the beginning of the line
+ without indentation. /.../ encloses the regular expression,
+ and '^' means the beginning of the line. The '}' character
+ must be escaped since it is a special character in regular
+ expressions.
+
+ QDoc will emit a warning if the specified substring or
+ regular expression cannot be located, i.e. if the source
+ code has changed.
+
+ See also \l {printto}{\\printto} and \l
+ {printuntil}{\\printuntil}.
+
+ \row
+ \o \bold \\printto \target printto
+ \o \bold {The \\printto command expands to all the lines
+ from the current position up to and \i excluding the
+ next line containing a given substring.}
+
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the substring with a line
+ break. The command also follows the same conventions for \l
+ {file}{positioning} and \l {substring}{argument} as the \l
+ {printline}{\\printline} command.
+
+ The lines from the source file are rendered in a separate
+ paragraph, using a typewriter font and the standard
+ indentation. The code is shown verbatim.
+
+ For example:
+
+ \code
+ / *!
+ The whole application is contained within the
+ \c main() function:
+
+ \quotefromfile examples/main.cpp
+ \printto hello
+
+ First we create a QApplication object using the \c argc and
+ \c argv parameters...
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ The whole application is contained within the
+ \c main() function:
+
+ \quotefromfile examples/main.cpp
+ \skipto main
+ \printto hello
+
+ First we create a QApplication object using the \c argc
+ and \c argv parameters...
+ \endquotation
+
+ (\l {Example File}{The complete example file...})
+
+ See also \l {printline}{\\printline} and \l
+ {printuntil}{\\printuntil}.
+
+ \row
+ \o \bold \\printuntil \target printuntil
+ \o \bold {The \\printuntil command expands to all the lines
+ from the current position up to and \i including the next line
+ containing a given substring.}
+
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the substring with a line
+ break. The command also follows the same conventions for \l
+ {file}{positioning} and \l {substring}{argument} as the \l
+ {printline}{\\printline} command.
+
+ The lines from the source file are rendered in a separate
+ paragraph, using a typewriter font and the standard
+ indentation. The code is shown verbatim.
+
+ For example:
+
+ \code
+ / *!
+ The whole application is contained within the
+ \c main() function:
+
+ \quotefromfile examples/main.cpp
+ \skipto main
+ \printuntil hello
+
+ First we create a QApplication object using the
+ \c argc and \c argv parameters, then we create
+ a QPushButton.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ The whole application is contained within the
+ \c main() function:
+
+ \quotefromfile examples/main.cpp
+ \skipto main
+ \printuntil hello
+
+ First we create a \l
+ {http://qt.nokia.com/doc/4.0/qapplication}{QApplication}
+ object using the \c argc and \c argv parameters, then we
+ create a \l
+ {http://qt.nokia.com/doc/4.0/qpushbutton}{QPushButton}.
+ \endquotation
+
+ (\l {Example File}{The complete example file...})
+
+ See also \l {printline}{\\printline} and \l
+ {printto}{\\printto}.
+
+ \row
+ \o \bold \\skipline \target skipline
+ \o \bold {The \\skipline command ignores the next non-blank
+ line in the current source file.}
+
+ Doc reads the file sequentially, and the \\skipline command
+ is used to move the current position (omitting a line of
+ the source file). See the remark about \l {file}{file
+ positioning} above.
+
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the substring with a line
+ break. The command also follows the same conventions for \l
+ {substring}{argument} as the \l {printline}{\\printline}
+ command, and it is used in conjunction with the \l
+ {quotefromfile}{\\quotefromfile} command. For example:
+
+ \code
+ / *!
+ QPushButton is a GUI push button that the user
+ can press and release.
+
+ \quotefromfile examples/main.cpp
+ \skipline QApplication
+ \printline QPushButton
+
+ This line includes the QPushButton class
+ definition. For each class that is part of the
+ public Qt API, there exists a header file of
+ the same name that contains its definition.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \l
+ QPushButton is a GUI push button that the user
+ can press and release.
+
+ \quotefromfile examples/main.cpp
+ \skipline QApplication
+ \printline QPushButton
+
+ This line includes the QPushButton class
+ definition. For each class that is part of the public
+ Qt API, there exists a header file of the same name
+ that contains its definition.
+ \endquotation
+
+ (\l {Example File}{The complete example file...})
+
+ See also \l {skipto}{\\skipto}, \l
+ {skipuntil}{\\skipuntil} and \l {dots}{\\dots}.
+
+ \row
+ \o \bold \\skipto \target skipto
+ \o \bold {The \\skipto command ignores all the lines from the
+ current position up to and \i excluding the next line
+ containing a given substring.}
+
+ QDoc reads the file sequentially, and the \\skipto command
+ is used to move the current position (omitting one or
+ several lines of the source file). See the remark about \l
+ {file}{file positioning} above.
+
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the substring with a line
+ break.
+
+ The command also follows the same conventions for \l
+ {substring}{argument} as the \l {printline}{\\printline}
+ command, and it is used in conjunction with the \l
+ {quotefromfile}{\\quotefromfile} command. For example:
+
+ \code
+ / *!
+ The whole application is contained within
+ the \c main() function:
+
+ \quotefromfile examples/main.cpp
+ \skipto main
+ \printuntil }
+
+ First we create a QApplication object. There
+ has to be exactly one such object in
+ every GUI application that uses Qt. Then
+ we create a QPushButton, resize it to a reasonable
+ size...
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ The whole application is contained within
+ the \c main() function:
+
+ \quotefromfile examples/main.cpp
+ \skipto main
+ \printuntil }
+
+ First we create a QApplication object. There has to be
+ exactly one such object in every GUI application that
+ uses Qt. Then we create a QPushButton, resize it to a
+ reasonable size ...
+ \endquotation
+
+ (\l {Example File}{The complete example file...})
+
+ See also \l {skipline}{\\skipline}, \l
+ {skipuntil}{\\skipuntil} and \l {dots}{\\dots}.
+
+ \row
+ \o \bold \\skipuntil \target skipuntil
+ \o \bold {The \\skipuntil command ignores all the lines from
+ the current position up to and \i including the next line
+ containing a given substring.}
+
+ QDoc reads the file sequentially, and the \\skipuntil
+ command is used to move the current position (omitting one
+ or several lines of the source file). See the remark about
+ \l {file}{file positioning} above.
+
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the substring with a line
+ break.
+
+ The command also follows the same conventions for \l
+ {substring}{argument} as the \l {printline}{\\printline}
+ command, and it is used in conjunction with the \l
+ {quotefromfile}{\\quotefromfile} command. For example:
+
+ \code
+ / *!
+ The first thing we did in the \c main() function
+ was to create a QApplication object \c app.
+
+ \quotefromfile examples/main.cpp
+ \skipuntil show
+ \dots
+ \printuntil }
+
+ In the end we must remember to make \c main() pass the
+ control to Qt. QCoreApplication::exec() will return when
+ the application exits...
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ The first thing we did in the \c main() function was to
+ create a QApplication object \c app.
+
+ \quotefromfile examples/main.cpp
+ \skipuntil show
+ \dots
+ \printuntil }
+
+ In the end we must remember to make \c main() pass the
+ control to Qt. QCoreApplication::exec()
+ will return when the application exits...
+ \endquotation
+
+ (\l {Example File}{The complete example file...})
+
+ See also \l {skipline}{\\skipline}, \l {skipto}{\\skipto}
+ and \l {dots}{\\dots}.
+
+ \row
+ \o \bold \\dots \target dots
+ \o \bold {The \\dots command indicates that parts of the
+ source file have been omitted when quoting a file.}
+
+ The command is used in conjunction with the \l
+ {quotefromfile}{\\quotefromfile} command, and should be
+ stated on its own line. The dots are rendered on a new
+ line, using a typewriter font. For example:
+
+ \code
+ / *!
+ \quotefromfile examples/main.cpp
+ \skipto main
+ \printuntil {
+ \dots
+ \skipuntil exec
+ \printline }
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotefromfile examples/main.cpp
+ \skipto main
+ \printuntil {
+ \dots
+ \skipuntil exec
+ \printline }
+
+ (\l {Example File}{The complete example file...})
+
+ The default indentation is 4 spaces, but this can be
+ adjusted using the command's optional argument. For
+ example:
+
+ \code
+ / *!
+ \dots 0
+ \dots
+ \dots 8
+ \dots 12
+ \dots 16
+ * /
+ \endcode
+
+ will be rendered as
+
+ \dots 0
+ \dots
+ \dots 8
+ \dots 12
+ \dots 16
+
+ See also \l {skipline}{\\skipline}, \l
+ {skipto}{\\skipto} and \l {skipuntil}{\\skipuntil}.
+
+ \row
+ \o \bold \\snippet \target snippet
+ \o \bold {The \\snippet command causes a code snippet to be included
+ verbatim as preformatted text, which may be syntax highlighted.}
+
+ Each code snippet are referenced by the file that holds it and by
+ a unique identifier for that file. Snippet files are typically
+ stored in a \c{snippets} directory inside the documentation
+ directory (e.g., \c{$QTDIR/doc/src/snippets}).
+
+ For example, the following documentation references a snippet in
+ a file residing in a subdirectory of the documentation directory:
+
+ \code
+ \snippet snippets/textdocument-resources/main.cpp Adding a resource
+ \endcode
+
+ The text following the file name is the unique identifier for the
+ snippet. This is used to delimit the quoted code in the relevant
+ snippet file as shown in the following example that corresponds to
+ the above \c{\\snippet} command:
+
+ \dots
+ \code
+ QImage image(64, 64, QImage::Format_RGB32);
+ image.fill(qRgb(255, 160, 128));
+
+ //! [Adding a resource]
+ document->addResource(QTextDocument::ImageResource,
+ QUrl("mydata://image.png"), QVariant(image));
+ //! [Adding a resource]
+ \endcode
+ \dots
+ \row
+ \o \bold \\codeline \target codeline
+ \o \bold{The \\codeline command inserts a blank line of preformatted
+ text. It is used to insert gaps between snippets without closing
+ the current preformatted text area and opening a new one.}
+ \endtable
+*/
+
+/*!
+ \page 07-1-example.html
+ \previouspage Quoting External Code Commands
+ \contentspage QDoc Manual - Table of Contents
+
+ \title Example File
+
+ \quotefile examples/main.cpp
+*/
+
+/*!
+ \page 08-qdoc-commands-linking.html
+ \previouspage Quoting External Code Commands
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage Graphic Commands
+
+ \title Linking Commands
+
+ The linking commands make it possible to create hyperlinks to
+ classes, functions, header files and examples. They also make it
+ possible to link to targets within a document, as well as to other
+ documents and URLs.
+
+ \section1 Alphabetical List
+
+ \l {08-qdoc-commands-linking.html#keyword}{\\keyword},
+ \l {08-qdoc-commands-linking.html#l}{\\l},
+ \l {08-qdoc-commands-linking.html#sa}{\\sa},
+ \l {08-qdoc-commands-linking.html#target}{\\target}
+
+ \section1 Command Descriptions
+
+ \table
+ \header
+ \o Command
+ \o Description
+
+ \row
+ \o \bold \\l \target l
+ \o \bold {The \\l command is used to create hyperlinks. }
+
+ The command's general syntax is
+
+ \code
+ \l {link target}{link text}
+ \endcode
+
+ For example:
+
+ \code
+ / *!
+ Read the \l {http://qt.nokia.com/doc/4.0/}
+ {Qt's Reference Documentation} carefully.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ Read the \l {http://qt.nokia.com/doc/4.0/}
+ {Qt's Reference Documentation} carefully.
+ \endquotation
+
+ If the link target is equivalent to the link text, the
+ second argument can be omitted.
+
+ For example, if you have documentation like:
+
+ \code
+ / *!
+ \target assertions
+
+ Assertions make some statement about the text at the
+ point where they occur in the regexp but they do not
+ match any characters.
+
+ ...
+
+ Regexps are built up from expressions, quantifiers, and
+ \l {assertions}{assertions}.
+ * /
+ \endcode
+
+ you can rewrite it as
+
+ \code
+ / *!
+ \target assertions
+
+ Assertions make some statement about the text at the
+ point where they occur in the regexp but they do not
+ match any characters.
+
+ ...
+
+ Regexps are built up from expressions, quantifiers, and
+ \l assertions.
+ * /
+ \endcode
+
+ For the one-parameter version the braces can often
+ be omitted. See the \l {i}{\\i} command for the \l
+ {argument}{argument conventions}.
+
+ The \\l command supports several kinds of links:
+
+ \list
+ \o \c {\l QWidget} - a defined \l {class}{\\class}
+ \o \c {\l QWidget::sizeHint()} - a defined member
+ function (\l {fn}{\\fn})
+ \o \c {\l <QtGlobal>} - a defined \l {headerfile}{\\headerfile}
+ \o \c {\l widgets/wiggly} - a defined
+ \l {example-command}{\\example}
+ \o \c {\l {QWidget Class Reference}} - a defined \l {title}{\\title}
+ \o \c {\l {Introduction}}- a defined \l{part}{\\part},
+ \l{chapter}{\\chapter} or \l {sectionOne}{\\section...}
+ \o \c {\l fontmatching} - a defined \l {target}{\\target}
+ \o \c {\l {Shared Classes}} - a defined \l {keyword}{\\keyword}
+ \o \c {\l network.html} - a defined \l {page}{\\page}
+ \o \c {\l http://www.trolltech.com/} - a URL
+ \endlist
+
+ QDoc also tries to make a link out of any words that don't
+ resemble any normal English words, for example Qt class
+ names or functions, like QWidget or QWidget::sizeHint(). In
+ these cases, the \\l command can actually be omitted, but
+ by using the command, you ensure that QDoc will emit a
+ warning if it cannot find the link target. In addition, if
+ you only want the function name to appear in the link, you
+ can use the following syntax:
+
+ \list
+ \o \c {\l {QWidget::}{sizeHint()}}
+ \endlist
+
+ See also \l {sa}{\\sa}, \l {target}{\\target} and \l
+ {keyword}{\\keyword}.
+
+ \row
+ \o \bold \\sa \target sa
+ \o \bold {The \\sa command defines a list of links that will
+ be rendered in a separate "See also" section at the bottom
+ of the documentation.}
+
+ The command takes a comma-separated list of links as its
+ argument. If the line ends with a comma, you can continue
+ on a second line. The general syntax is:
+
+ \code
+ \sa {the first link}, {the second link},
+ {the third link}, ...
+ \endcode
+
+ QDoc will automatically try to generate "See also" links
+ interconnecting a property's various functions. For
+ example, an setVisible() function will automatically get a
+ link to visible() and vice versa.
+
+ In general, QDoc will generate "See also" links that
+ interconnect the functions that access the same
+ property. It recognizes four different syntax versions:
+
+ \list
+ \o \c property()
+ \o \c setProperty()
+ \o \c isProperty()
+ \o \c hasProperty()
+ \endlist
+
+ The \\sa command supports the same kind
+ of links as the \l {l}{\\l} command. For example:
+
+ \code
+ / *!
+ Appends the actions \a actions to this widget's
+ list of actions.
+
+ \sa removeAction(), QMenu, addAction()
+ * /
+ void QWidget::addActions(QList<QAction *> actions)
+ {
+ ...
+ }
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \bold {void QWidget::addActions ( QList<QAction*>
+ \i actions )}
+
+ Appends the actions \i actions to this widget's
+ list of actions.
+
+ See also \l {QWidget::removeAction()}{removeAction()},
+ \l QMenu, and \l {QWidget::addAction()}{addAction()}.
+ \endquotation
+
+ See also \l {l}{\\l}, \l {target}{\\target} and \l
+ {keyword}{\\keyword}.
+
+ \row
+ \o \bold \\target \target target
+ \o \bold {The \\target command defines an explicit point in the
+ documentation that you can later link to using the \l {l}{\\l}
+ and \l {sa}{\\sa} commands.}
+
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the target name with a line
+ break.
+
+ For example:
+
+ \code
+ / *!
+ \target capturing parentheses
+ \section1 Capturing Text
+
+ Parentheses allow us to group elements together so that
+ we can quantify and capture them.
+
+ ...
+ * /
+ \endcode
+
+ can be referenced with
+
+ \list
+ \o \c {\l {capturing parentheses}}
+ (from elsewhere in the same comment)
+ \o \c {\l qregexp.html#capturing-parentheses}
+ (from anywhere else)
+ \endlist
+
+ within a documentation unit, and with
+
+ \list
+ \o \c {\l http://www.trolltech.com/4.0/doc/html/qregexp.html#capturing-parentheses}
+ \endlist
+
+ on a more global scale.
+
+ If the target name does't contain any spaces, the brackets can
+ be omitted as well.
+
+ See also \l {l}{\\l}, \l {sa}{\\sa} and \l
+ {keyword}{\\keyword}.
+
+ \row
+ \o \bold \\keyword \target keyword
+ \o \bold {The \\keyword command defines an explicit point in the
+ documentation that you can later link to using the \l {l}{\\l}
+ and \l {sa}{\\sa} commands.}
+
+ Keywords must be unique within the entire set of
+ documentation processed in on QDoc run. The command
+ considers the rest of the line as part of its argument,
+ make sure to follow the keyword with a line break.
+
+ The \\keyword command is similar to \l {target}{\\target},
+ but stronger. A keyword can be referenced from anywhere
+ using a simple syntax. For example:
+
+ \code
+ / *!
+ \class QRegExp
+ \reentrant
+ \brief The QRegExp class provides pattern
+ matching using regular expressions.
+ \ingroup tools
+ \ingroup misc
+ \ingroup shared
+ \mainclass
+
+ \keyword regular expression
+
+ Regular expressions, or "regexps", provide a way to
+ find patterns within text.
+
+ ...
+ * /
+ \endcode
+
+ can be referenced like this
+
+ \code
+ / *!
+ When a string is surrounded by slashes, it's
+ interpreted as a \l regular expression.
+ * /
+ \endcode
+
+ which will be rendered as
+
+ \quotation
+ When a string is surrounded by slashes, it's
+ interpreted as a \l {regular expression}.
+ \endquotation
+
+ If the keyword does't contain any spaces, the brackets can
+ be omitted as well.
+
+ See also \l {l}{\\l}, \l {sa}{\\sa} and \l
+ {target}{\\target}.
+ \endtable
+*/
+
+/*!
+ \page 09-qdoc-commands-graphic.html
+ \previouspage Linking Commands
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage Container Commands
+
+ \title Graphic Commands
+
+ The graphic commands makes it possible to include images in the
+ documentation. The images can be rendered as separate paragraphs,
+ or within running text.
+
+ \section1 Alphabetical List
+
+ \l {09-qdoc-commands-graphic.html#caption}{\\caption},
+ \l {09-qdoc-commands-graphic.html#image}{\\image},
+ \l {09-qdoc-commands-graphic.html#inlineimage}{\\inlineimage}
+
+ \section1 Command Descriptions
+
+ \table
+ \header
+ \o Command
+ \o Description
+
+ \row
+ \o \bold \\image \target image
+ \o \bold {The \\image command expands to the image specified by its
+ argument, and renders it centered as a separate paragraph.}
+
+ The \\image command replaces the old \\img command. For more
+ information, see the \l
+ {26-qdoc-commands-compatibility.html#image-versus-img}
+ {compatibility} section.
+
+ The command takes two arguments. The first is the name of
+ the image file. The second argument is optional and is a
+ simple description of the image equivalent to the HTML
+ alt="" in an image tag. The description is used for
+ tooltips, and when a browser doesn't support images like
+ the Lynx text browser.
+
+ The command considers the rest of the line after the file
+ name its second argument, make sure that you follow the
+ filename or description with a line break. Braces are only
+ necessary if the description spans several lines.
+
+ For example:
+
+ \code
+ / *!
+ Qt by Trolltech is a C++ toolkit for cross-platform GUI
+ application development.
+
+ \image happyguy.jpg "Happy guy"
+
+ Qt provides single-source portability across Microsoft
+ Windows, Mac OS X, Linux, and all major commercial Unix
+ variants. It is also available for embedded devices.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ Qt by Trolltech is a C++ toolkit for cross-platform GUI
+ application development.
+
+ \image happyguy.jpg image "Happy guy"
+
+ Qt provides single-source portability across Microsoft
+ Windows, Mac OS X, Linux, and all major commercial Unix
+ variants. It is also available for embedded devices.
+ \endquotation
+
+ See also \l {inlineimage}{\\inlineimage} and \l
+ {caption}{\\caption}.
+
+ \row
+ \o \bold \\inlineimage \target inlineimage
+ \o \bold {The \\inlineimage command expands to the image
+ specified by its argument; the image is rendered inline
+ with the rest of the text.}
+
+ The command takes two arguments. The first is the name of
+ the image file. The second argument is optional and is a
+ simple description of the image equivalent to the HTML
+ alt="" in an image tag. The description is used for
+ tooltips, and when a browser doesn't support images like
+ the Lynx text browser.
+
+ The most common use of the \\inlineimage command is in
+ lists and tables. For example:
+
+ \code
+ / *!
+ \list 1
+ \o \inlineimage happy.gif Oh so happy!
+ \o \inlineimage happy.gif Oh so happy!
+ \o \inlineimage happy.gif Oh so happy!
+ \endlist
+ * /
+ \endcode
+
+ will be rendered as
+
+ \list 1
+ \o \inlineimage happy.gif Oh so happy!
+ \o \inlineimage happy.gif Oh so happy!
+ \o \inlineimage happy.gif Oh so happy!
+ \endlist
+
+ And
+
+ \code
+ / *!
+ \table
+ \header
+ \o Trolltech
+ \o Trolltech
+ \row
+ \o \inlineimage happy.gif Oh so happy!
+ \o \inlineimage happy.gif Oh so happy!
+ \row
+ \o \inlineimage happy.gif Oh so happy!
+ \o \inlineimage happy.gif Oh so happy!
+ \endtable
+ * /
+ \endcode
+
+ will be rendered as
+
+ \raw HTML
+ <table align="center" cellpadding="2"
+ cellspacing="1" border="0">
+ <tr valign="top" bgcolor="#a2c511">
+ <th>Trolltech</th>
+ <th>Trolltech</th>
+ </tr>
+
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><img src="images/happy.gif" alt="Oh so happy!" />
+ </td>
+ <td><img src="images/happy.gif" alt="Oh so happy!" />
+ </td>
+ </tr>
+
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><img src="images/happy.gif" alt="Oh so happy!"/>
+ </td>
+ <td><img src="images/happy.gif" alt="Oh so happy!" />
+ </td>
+ </tr>
+
+ </table>
+ \endraw
+
+ The command can also be used to insert an image
+ inline with the regular text. For example:
+
+ \code
+ / *!
+ \inlineimage training.jpg Training by Trolltech
+ The Qt Programming course is offered as a
+ five day Open Enrollment Course. The classes
+ are open to the public.While the course is open
+ to anyone who wants to learn, attendees should
+ have significant experience in C++ development
+ to derive maximum benefit from the course.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \inlineimage training.jpg Training by Trolltech
+ The Qt Programming course is offered as a
+ five day Open Enrollment Course. The classes
+ are open to the public.While the course is open
+ to anyone who wants to learn, attendees should
+ have significant experience in C++ development
+ to derive maximum benefit from the course.
+ \endquotation
+
+ See also \l {image}{\\image} and \l {caption}{\\caption}.
+
+ \row
+ \o \bold \\caption \target caption
+ \o \bold {The \\caption command provides a caption for an image.}
+
+ The command follows the same conventions for parentheses and use
+ of braces for its \l argument as the \l {i}{\\i} command.
+
+ \warning This is preliminary functionality. The
+ command is not fully implemented.
+
+ See also \l {image}{\\image} and \l
+ {inlineimage}{\\inlineimage}
+
+ \endtable
+*/
+
+/*!
+ \page 10-qdoc-commands-container.html
+ \previouspage Graphic Commands
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage Document Contents Commands
+
+ \title Container Commands
+
+ The container commands create tables and lists with associated
+ items and contents. A list is rendered left aligned as a separate
+ paragraph. A table is rendered centered as a separate paragraph,
+ and its width depends on its content.
+
+ \section1 Alphabetical List
+
+ \l {10-qdoc-commands-container.html#header}{\\header},
+ \l {10-qdoc-commands-container.html#list}{\\list},
+ \l {10-qdoc-commands-container.html#o}{\\o},
+ \l {10-qdoc-commands-container.html#omitvalue}{\\omitvalue},
+ \l {10-qdoc-commands-container.html#row}{\\row},
+ \l {10-qdoc-commands-container.html#table}{\\table},
+ \l {10-qdoc-commands-container.html#value}{\\value}
+
+ \section1 Command Descriptions
+
+ \table
+ \header
+ \o Command
+ \o Description
+
+ \row
+ \o \bold \\table \target table
+ \o \bold {The \\table command and the corresponding \\endtable
+ command delimit the contents of a table.}
+
+ The command accepts a single argument specifying the
+ table's width in percentage:
+
+ \code
+ / *!
+ \table 100 %
+
+ ...
+
+ \endtable
+ * /
+ \endcode
+
+ The code above ensures that the table will fill all
+ available space. If the table's width is smaller than 100 %,
+ the table will be centered in the generated documentation.
+
+ A table can contain headers, rows and columns. A row starts
+ with a \l {row}{\\row} command and consists of cells, which
+ starts with a \l {o}{\\o} command. There is also a \l
+ {header}{\\header} command which is a special kind of row
+ with a special formatting. For example:
+
+ \code
+ / *!
+ \table
+ \header
+ \o Qt Core Feature
+ \o Brief Description
+ \row
+ \o \l {Signal and Slots}
+ \o Signals and slots are used for communication
+ between objects.
+ \row
+ \o \l {Layout Management}
+ \o The Qt layout system provides a simple
+ and powerful way of specifying the layout
+ of child widgets.
+ \row
+ \o \l {Drag and Drop}
+ \o Drag and drop provides a simple visual
+ mechanism which users can use to transfer
+ information between and within applications.
+ \endtable
+ * /
+ \endcode
+
+ will be rendered as
+
+ \raw HTML
+ <table align="center" cellpadding="2"
+ cellspacing="1" border="0">
+ <tr valign="top" bgcolor="#a2c511">
+ <th>Qt Core Feature</th>
+ <th>Brief Description</th>
+ </tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>
+ <a href="http://qt.nokia.com/doc/4.0/signalsandslots.html">
+ Signals and Slots</a>
+ </td>
+ <td>Signals and slots are used for communication
+ between objects.</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#c0c0c0">
+ <td>
+ <a href=http://qt.nokia.com/doc/4.0/layout.html">
+ Layout Management</a></td>
+ <td>The Qt layout system provides a simple
+ and powerful way of specifying the layout
+ of child widgets.</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>
+ <a href=http://qt.nokia.com/doc/4.0/dnd.html">
+ Drag and Drop</a></td>
+ <td>Drag and drop provides a simple visual
+ mechanism which users can use to transfer
+ information between and within applications.</td>
+ </tr>
+
+ </table>
+ \endraw
+
+ You can also make cells span several rows and columns. For
+ example:
+
+ \code
+ / *!
+ \table
+ \header
+ \o {3,1} This header cell spans three columns
+ but only one row.
+ \row
+ \o {2, 1} This table cell spans two columns
+ but only one row
+ \o {1, 2} This table cell spans only one column,
+ but two rows.
+ \row
+ \o A regular table cell
+ \o A regular table cell
+ \endtable
+ * /
+ \endcode
+
+ will be rendered as
+
+ \raw HTML
+ <table align="center" cellpadding="2" cellspacing="1"
+ border="0">
+
+ <tr valign="top" bgcolor="#a2c511">
+ <th colspan="3" rowspan=" 1">
+ This header cell spans three columns but only one row
+ </th>
+ </tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td colspan="2" rowspan=" 1">
+ This table cell spans two columns but only one row
+ </td>
+ <td rowspan=" 2">
+ This table cell spans only one column, but two rows.
+ </td>
+ </tr>
+
+ <tr valign="top" bgcolor="#c0c0c0">
+ <td>A regular table cell</td>
+ <td>A regular table cell</td>
+ </tr>
+
+ </table>
+ \endraw
+
+ See also \l {header}{\\header}, \l {row}{\\row} and \l {o}{\\o}.
+
+ \row
+ \o \bold \\header \target header
+ \o \bold {The \\header command indicates that the following
+ table cells are the current table's column headers.}
+
+ The command can only be used within the \l{table}
+ {\\table...\\endtable} commands. A header can contain
+ several cells. A cell is created with the \l {o}{\\o}
+ command.
+
+ A header cell's text is centered within the table cell and
+ rendered using a bold font. For example:
+
+ \code
+ / *!
+ \table
+ \header
+ \o Qt Core Feature
+ \o Brief Description
+ \row
+ \o \l {Signal and Slots}
+ \o Signals and slots are used for communication
+ between objects.
+ \endtable
+ * /
+ \endcode
+
+ will be rendered as
+
+ \raw HTML
+ <table align="center" cellpadding="2"
+ cellspacing="1" border="0">
+ <tr valign="top" bgcolor="#a2c511">
+ <th>Qt Core Feature</th>
+ <th>Brief Description</th>
+ </tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>
+ <a href="http://qt.nokia.com/doc/4.0/signalsandslots.html">
+ Signals and Slots</a>
+ </td>
+ <td>Signals and slots are used for communication
+ between objects.</td>
+ </tr>
+ </table>
+ \endraw
+
+ See also \l {table}{\\table}, \l {row}{\\row} and \l {o}{\\o}.
+
+ \row
+ \o \bold \\row \target row
+ \o \bold {The \\row command indicates that the following table
+ cells belong to the same row in the current table.}
+
+ The command can only be used within the \l{table}
+ {\\table...\\endtable} commands. A row can contain
+ several cells. A cell is created with the \l {o}{\\o}
+ command.
+
+ The background cell color of each row alternate between two
+ shades of grey, making it easier to distinguish the rows
+ from each other. The cells' contents is left aligned.
+
+ For example:
+
+ \code
+ / *!
+ \table
+ \header
+ \o Qt Core Feature
+ \o Brief Description
+ \row
+ \o \l {Signal and Slots}
+ \o Signals and slots are used for communication
+ between objects.
+ \row
+ \o \l {Layout Management}
+ \o The Qt layout system provides a simple
+ and powerful way of specifying the layout
+ of child widgets.
+ \row
+ \o \l {Drag and Drop}
+ \o Drag and drop provides a simple visual
+ mechanism which users can use to transfer
+ information between and within applications.
+ \endtable
+ * /
+ \endcode
+
+ will be rendered as
+
+ \raw HTML
+ <table align="center" cellpadding="2"
+ cellspacing="1" border="0">
+ <tr valign="top" bgcolor="#a2c511">
+ <th>Qt Core Feature</th>
+ <th>Brief Description</th>
+ </tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>
+ <a href="http://qt.nokia.com/doc/4.0/signalsandslots.html">
+ Signals and Slots</a>
+ </td>
+ <td>Signals and slots are used for communication
+ between objects.</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#c0c0c0">
+ <td>
+ <a href=http://qt.nokia.com/doc/4.0/layout.html">
+ Layout Management</a></td>
+ <td>The Qt layout system provides a simple
+ and powerful way of specifying the layout
+ of child widgets.</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>
+ <a href=http://qt.nokia.com/doc/4.0/dnd.html">
+ Drag and Drop</a></td>
+ <td>Drag and drop provides a simple visual
+ mechanism which users can use to transfer
+ information between and within applications.</td>
+ </tr>
+
+ </table>
+ \endraw
+
+ See also \l {table}{\\table}, \l {header}{\\header} and \l
+ {o}{\\o}.
+
+ \row
+ \o \bold \\value \target value
+ \o \bold {The \\value command starts the documentation of a C++ enum
+ item}.
+
+ The command's first argument is the enum item. Then follows
+ its associated description. The description argument ends
+ at the next blank line or \\value. The arguments are
+ rendered within a table.
+
+ The documentation will be located in the associated class,
+ header file or namespace documentation. See the \l
+ {enum}{\\enum} documentation for an example.
+
+ See also \l {enum}{\\enum} and \l {omitvalue}{\\omitvalue}.
+
+ \row
+ \o \bold \\omitvalue \target omitvalue
+ \o \bold {The \\omitvalue command excludes a C++ enum item
+ from the documentation}.
+
+ The command's only argument is the name of the enum item
+ that will be omitted. See the \l {enum}{\\enum}
+ documentation for an example.
+
+ See also \l {enum}{\\enum} and \l {value}{\\value}.
+
+ \row
+ \o \bold \\list \target list
+ \o \bold {The \\list command and the corresponding \\endlist
+ command delimit a list of items.}
+
+ You need to create each list item explicitly using the \l
+ {o}{\\o} command. A list can contain one or more items; it
+ can also be nested. For example:
+
+ \code
+ / *!
+ \list
+ \o Qt Reference Documentation: Getting Started
+ \list
+ \o How to Learn Qt
+ \o Installation
+ \list
+ \o Qt/X11
+ \o Qt/Windows
+ \o Qt/Mac
+ \o Qt/Embedded
+ \endlist
+ \o Tutorial and Examples
+ \endlist
+ \endlist
+ * /
+ \endcode
+
+ will be rendered as
+
+ \list
+ \o Qt Reference Documentation: Getting Started
+ \list
+ \o How to Learn Qt
+ \o Installation
+ \list
+ \o Qt/X11
+ \o Qt/Windows
+ \o Qt/Mac
+ \o Qt/Embedded
+ \endlist
+ \o Tutorial and Examples
+ \endlist
+ \endlist
+
+ The \\list command takes an optional argument providing
+ alternative appearances for the list items. For example:
+
+ \code
+ / *!
+ \list
+ \o How to Learn Qt
+ \o Installation
+ \o Tutorial and Examples
+ \endlist
+ * /
+ \endcode
+
+ will render the list items with bullets (the default):
+
+ \list
+ \o How to Learn Qt
+ \o Installation
+ \o Tutorial and Examples
+ \endlist
+
+ If you provide 'A' as an argument to the \\list command,
+ the bullets are replaced with characters following in
+ alphabetical order:
+
+ \list A
+ \o How to Learn Qt
+ \o Installation
+ \o Tutorial and Examples
+ \endlist
+
+ If you replace 'A' with '1', the list items are rendered
+ with numbers following in ascending order:
+
+ \list 1
+ \o How to Learn Qt
+ \o Installation
+ \o Tutorial and Examples
+
+ \endlist
+
+ If you provide 'i' as the argument, the default bullets are
+ replaced with roman numerals:
+
+ \list i
+ \o How to Learn Qt
+ \o Installation
+ \o Tutorial and Examples
+ \endlist
+
+ Or finally, you can make the list items appear with roman
+ numbers following in ascending order if you provide 'I' as
+ the optional argument:
+
+ \list I
+ \o How to Learn Qt
+ \o Installation
+ \o Tutorial and Examples
+ \endlist
+
+ You can also make the listing start at any character or
+ number by simply provide the number or character you want
+ to start at. For example:
+
+ \code
+ / *!
+ \list G
+ \o How to Learn Qt
+ \o Installation
+ \o Tutorial and Examples
+ \endlist
+ * /
+ \endcode
+
+ will be rendered as
+
+ \list G
+ \o How to Learn Qt
+ \o Installation
+ \o Tutorial and Examples
+ \endlist
+
+ See also \l {o}{\\o}.
+
+ \row
+ \o \bold \\o \target o
+ \o \bold {The \\o command announce a table or list item.}
+
+ Earlier we used the \l {i}{\\i} command for this purpose. For more
+ information see the \l
+ {26-qdoc-commands-compatibility.html#o-versus-i}{compatibility}
+ section.
+
+ The command can only be used within the \l{table}
+ {\\table...\\endtable} or \l{list}{\\list... \\endlist}
+ commands.
+
+ It considers everything until the next occurrence
+ of the \\o command, or the currently applicable \l
+ {table}{\\endtable} or \l {list}{\\endlist} command, as its
+ argument. For examples, see \l {table}{\\table} and \l
+ {list}{\\list}.
+
+ If the command is used within a table, you can in addition
+ specify how many rows or columns the item should span. For
+ example:
+
+ \code
+ / *!
+ \table
+ \header
+ \o {3,1} This header cell spans three columns
+ but only one row.
+ \row
+ \o {2, 1} This table item spans two columns
+ but only one row
+ \o {1, 2} This table item spans only one column,
+ but two rows.
+ \row
+ \o A regular table item
+ \o A regular table item
+ \endtable
+ * /
+ \endcode
+
+ will be rendered as
+
+ \raw HTML
+ <table align="center" cellpadding="2" cellspacing="1"
+ border="0">
+
+ <tr valign="top" bgcolor="#a2c511">
+ <th colspan="3" rowspan=" 1">
+ This header cell spans three columns but only one row
+ </th>
+ </tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td colspan="2" rowspan=" 1">
+ This table item spans two columns but only one row
+ </td>
+ <td rowspan=" 2">
+ This table item spans only one column, but two rows.
+ </td>
+ </tr>
+
+ <tr valign="top" bgcolor="#c0c0c0">
+ <td>A regular table item</td>
+ <td>A regular table item</td>
+ </tr>
+
+ </table>
+ \endraw
+
+ If not specified, the item will span one column and one row.
+
+ See also \l {table}{\\table}, \l {header}{\\header},
+ \l {list}{\\list} and \l {o}{\\o}.
+ \endtable
+*/
+
+/*!
+ \page 11-qdoc-commands-documentcontents.html
+ \previouspage Container Commands
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage Miscellaneous Commands
+
+ \title Document Contents Commands
+
+ The document contents commands identify parts of the documentation,
+ i.e. parts with a special rendering, conceptual meaning or
+ function.
+
+ \section1 Alphabetical List
+
+ \l {11-qdoc-commands-documentcontents.html#abstract}{\\abstract},
+ \l {11-qdoc-commands-documentcontents.html#brief}{\\brief},
+ \l {11-qdoc-commands-documentcontents.html#footnote}{\\footnote},
+ \l {11-qdoc-commands-documentcontents.html#legalese}{\\legalese},
+ \l {11-qdoc-commands-documentcontents.html#tableofcontents}
+ {\\tableofcontents},
+ \l {11-qdoc-commands-documentcontents.html#quotation}{\\quotation},
+ \l {11-qdoc-commands-documentcontents.html#warning}{\\warning}
+
+ \section1 Command Descriptions
+
+ \table
+ \header
+ \o Command
+ \o Description
+
+ \row
+ \o \bold \\abstract \target abstract
+ \o \bold {The \\abstract command and the corresponding \\endabstract
+ command delimit a document's abstract section.}
+
+ The abstract section is rendered as an indented italicized
+ paragraph.
+
+ \warning This is preliminary funcionality. The
+ command is not fully implemented. Currently, the abstract
+ section is rendered as a regular HTML paragraph. For
+ example:
+
+ \code
+ / *!
+ \abstract
+ Qt by Trolltech is a C++ toolkit for cross-platform
+ GUI application development. Qt provides
+ single-source portability across Microsoft Windows,
+ Mac OS X, Linux, and all major commercial Unix
+ variants. It is also available for embedded
+ devices.
+ \endabstract
+ * /
+ \endcode
+
+ will be rendered as
+
+ \abstract
+ Qt by Trolltech is a C++ toolkit for cross-platform GUI
+ application development. Qt provides single-source
+ portability across Microsoft Windows, Mac OS X, Linux,
+ and all major commercial Unix variants. It is also
+ available for embedded devices.
+ \endabstract
+
+ \row
+ \o \bold \\quotation \target quotation
+ \o \bold { The \\quotation command and the corresponding
+ \\endquotation command delimit a quotation remark.}
+
+ This command replaces the old \\quote command. For more
+ information see the \l
+ {26-qdoc-commands-compatibility.html#quotation-versus-quote}
+ {compatibility} section.
+
+ The remark is rendered as a separate centered
+ paragraph. For example:
+
+ \code
+ / *!
+ While the prospect of a significantly broader market is
+ good news for Firstlogic, the notion also posed some
+ challenges. Dave Dobson, director of technology for the La
+ Crosse, Wisconsin-based company, said:
+
+
+ \quotation
+ As our solutions were being adopted into new
+ environments, we saw an escalating need for easier
+ integration with a wider range of enterprise
+ applications.
+ \endquotation
+ * /
+ \endcode
+
+ will be rendered as
+
+ While the prospect of a significantly broader market is
+ good news for Firstlogic, the notion also posed some
+ challenges. Dave Dobson, director of technology for the La
+ Crosse, Wisconsin-based company, said:
+
+ \quotation
+ As our solutions were being adopted into new
+ environments, we saw an escalating need for easier
+ integration with a wider range of enterprise
+ applications.
+ \endquotation
+
+ \row
+ \o \bold \\footnote \target footnote
+ \o \bold {The \\footnote command and the corresponding
+ \\endfootnote command delimit a footnote.}
+
+ The footnote follows the standard conventions, rendered at the
+ bottom of the page.
+
+ \warning This is preliminary funcionality. The
+ command is not fully implemented.
+
+ For example:
+
+ \code
+ / *!
+ In Qt 4 we have tried to simplify the constructors of
+ QObject/QWidget subclasses. This makes subclassing
+ easier, at the same time as it helps make the Qt
+ library more efficient.
+
+ \footnote
+ Constructors no longer take a "const char *name"
+ parameter. If you want to specify a name for a QObject,
+ you must call QObject::setObjectName() after
+ construction. The object name is now a QString.
+ \endfootnote
+
+ QWidget's WFlags data type has been split in two:
+ Qt::WindowFlags specifies low-level window flags (the
+ type of window and the frame style), whereas
+ Qt::WidgetAttribute specifies various higher-level
+ attributes about the widget (e.g.,
+ WA_StaticContents).
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ In Qt 4 we have tried to simplify the constructors of
+ QObject/QWidget subclasses. This makes subclassing
+ easier, at the same time as it helps make the Qt
+ library more efficient.
+
+ \footnote
+ Constructors no longer take a "const char *name"
+ parameter. If you want to specify a name for a QObject,
+ you must call QObject::setObjectName() after
+ construction. The object name is now a QString.
+ \endfootnote
+
+ QWidget's WFlags data type has been split in two:
+ Qt::WindowFlags specifies low-level window flags (the
+ type of window and the frame style), whereas
+ Qt::WidgetAttribute specifies various higher-level
+ attributes about the widget (e.g.,
+ WA_StaticContents).
+ \endquotation
+
+ \row
+ \o \bold \\tableofcontents \target tableofcontents
+ \o \bold {The \\tableofcontents command generates a
+ table displaying the titles of the current documentation
+ unit's parts, chapters, sections, etc.}
+
+ The command accepts a single optional argument:
+
+ \code
+ \tableofcontents sectionN
+ \endcode
+
+ where \c sectionN is the deepest section to include (by
+ default all sections are included).
+
+ For example, it the documentation unit's structure looks
+ something like this:
+
+ \quotation
+ \raw HTML
+ <a name="Basic Qt">
+ <h1>Basic Qt</h1>
+ </a>
+ <p>This is the first part.</p>
+
+ <a name="Getting started">
+ <h2>Getting Started</h2>
+ </a>
+ This is the first part's first chapter.</p>
+
+ <a name="Hello Qt">
+ <h3>Hello Qt</h3>
+ </a>
+ <p>This is the first chapter's first section.</p>
+
+ <a name="Making Connections">
+ <h3>Making Connections</h3>
+ </a>
+ <p>This is the first chapter's second section.</p>
+
+ <a name="Using the Reference Documentation">
+ <h3>Using the Reference Documentation</h3>
+ </a>
+ <p>This is the first chapter's third section.</p>
+
+ <a name="Creating Dialogs">
+ <h2>Creating Dialogs</h2>
+ </a>
+ <p>This is the first part's second chapter.</p>
+
+ <a name="Subclassing QDialog">
+ <h3>Subclassing QDialog</h3>
+ </a>
+ <p>This is the second chapter's first section.</p>
+
+ ...
+
+ <a name="Intermediate Qt">
+ <h1>Intermediate Qt</h1>
+ </a>
+ <p>This is the second part.</p>
+
+ <a name="Layout Management">
+ <h2>Layout Management</h2>
+ </a>
+ <p>This is the second part's first chapter.</p>
+
+ <a name="Basic Layouts">
+ <h3>Basic Layouts</h3>
+ </a>
+ <p>This is the first chapter's first section.</p>
+
+ ...
+
+ \endraw
+ \endquotation
+
+ Then
+
+ \code
+ / *!
+ Contents:
+
+ \tableofcontents
+
+ ...
+ * /
+ \endcode
+
+ will expand to
+
+ \quotation
+ \raw HTML
+ <p>Contents:</p>
+
+ <ul>
+ <li><a href="#Basic Qt">Basic Qt</a></li>
+ <ul>
+ <li><a href="#Getting Started">Getting Started</a></li>
+ <ul>
+ <li><a href="#Hello Qt">Hello Qt</a></li>
+ <li><a href="#Making Connections">
+ Making Connections</a></li>
+ <li><a href="#Using the Reference Documentation">
+ Using the Reference Documentation</a></li>
+ </ul>
+ <li><a href="#Creating Dialogs">Creating Dialogs</a></li>
+ <ul>
+ <li><a href="#Subclassing QDialog">
+ Subclassing QDialog</a></li>
+ </ul>
+ </ul>
+ <li><a href="#Intermediate Qt">Intermediate Qt</a></li>
+ <ul>
+ <li><a href="#Layout Management">Layout Management</a></li>
+ <ul>
+ <li><a href="#Basic Layouts">Basic Layouts</a></li>
+ </ul>
+ </ul>
+ </ul>
+
+ ...
+ \endraw
+ \endquotation
+
+ Each table entry becomes a link to the corresponding part,
+ chapter or section.
+
+ \row
+ \o \bold \\brief \target brief
+ \o \bold {The \\brief command introduces a one-sentence
+ description of a class, namespace, header file, property
+ or variable.}
+
+ The brief text is used to introduce the documentation of
+ the associated object, and in lists generated using the \l
+ {generatelist}{\\generatelist} command.
+
+ The \\brief command can be used in two significant
+ different ways: \l {brief class}{One for classes,
+ namespaces and header files}, and \l {brief property}{one
+ for properties and variables}.
+
+ \target brief property
+
+ When the \\brief command is used to describe a property or
+ a variable, the brief text must only be a sentence fragment
+ and start with "whether" (for boolean properties and
+ variables) or "the" (for any other property or variable).
+
+ For example the boolean QWidget::isWindow property:
+
+ \code
+ / *!
+ \property QWidget::isActiveWindow
+ \brief whether this widget's window is the active window
+
+ The active window is the window that contains the widget that
+ has keyboard focus.
+
+ When popup windows are visible, this property is true
+ for both the active window \e and for the popup.
+
+ \sa activateWindow(), QApplication::activeWindow()
+ * /
+ \endcode
+
+ and the QWidget::geometry property
+
+ \code
+ / *!
+ \property QWidget::geometry
+ \brief the geometry of the widget relative to its parent and
+ excluding the window frame
+
+ When changing the geometry, the widget, if visible,
+ receives a move event (moveEvent()) and/or a resize
+ event (resizeEvent()) immediately.
+
+ ...
+
+ \sa frameGeometry(), rect(), ...
+ * /
+ \endcode
+
+ The latter will be rendered as
+
+ \quotation
+ \raw HTML
+ <h3>geometry :
+ <a href="http://qt.nokia.com/doc/4.0/qrect.html">QRect</a>
+ </h3>
+ \endraw
+
+ This property holds the geometry of the widget relative
+ to its parent and excluding the window frame.
+
+ ...
+
+ Access functions:
+ \list
+ \o \bold {const QRect & geometry () const}
+ \o \bold {void setGeometry ( int x, int y, int w, int h )}
+ \o \bold {void setGeometry ( const QRect & )}
+ \endlist
+
+ See also \l
+ {QWidget::frameGeometry()}{frameGeometry()}, \l
+ {QWidget::rect()}{rect()}, ...
+ \endquotation
+
+ \target brief class
+
+ When the \\brief command is used to describe a class, the
+ brief text should be a complete sentence and must start
+ like this:
+
+ \code
+ The <classname> class is|provides|contains|specifies...
+ \endcode
+
+ and likewise when the command is used for namespaces or
+ header files.
+
+ \warning The brief statement is used as the first
+ paragraph of the detailed description. Do not repeat the
+ sentence.
+
+ For example:
+
+ \code
+ / *!
+ \class PreviewWindow
+ \brief The PreviewWindow class is a custom widget
+ displaying the names of its currently set
+ window flags in a read-only text editor.
+
+ The PreviewWindow class inherits QWidget. The widget
+ displays the names of its window flags set with the
+ setWindowFlags() function. It is also provided with a
+ QPushButton that closes the window.
+
+ ...
+
+ \sa QWidget
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h1>PreviewWindow Class Reference</h1>
+ \endraw
+
+ The PreviewWindow class is a custom widget displaying
+ the names of its currently set window flags in a
+ read-only text editor. \l {preview window}{More...}
+
+ \raw HTML
+ <h3>Properties</h3>
+ \endraw
+
+ \list
+ \o 52 properties inherited from QWidget
+ \o 1 property inherited from QObject
+ \endlist
+
+ \raw HTML
+ <h3>Public Functions</h3>
+ \endraw
+
+ \list
+ \o \l {constructor}{PreviewWindow}(QWidget *parent = 0)
+ \o void \l {function}{setWindowFlags}(Qt::WindowFlags flags)
+ \endlist
+
+ \list
+ \o 183 public functions inherited from QWidget
+ \o 28 public functions inherited from QObject
+ \endlist
+
+ \raw HTML
+ <h3>Public Slots</h3>
+ \endraw
+
+ \list
+ \o 17 public slots inherited from QWidget
+ \o 1 public slot inherited from QObject
+ \endlist
+
+ \raw HTML
+ <h3>Additional Inherited Members</h3>
+ \endraw
+
+ \list
+ \o 1 signal inherited from QWidget
+ \o 1 signal inherited from QObject
+ \o 4 static public members inherited from QWidget
+ \o 4 static public members inherited from QObject
+ \o 39 protected functions inherited from QWidget
+ \o 7 protected functions inherited from QObject
+ \endlist
+
+ \target preview window
+
+ \raw HTML
+ <hr />
+ <h2>Detailed Description</h2>
+ \endraw
+ The PreviewWindow class is a custom widget displaying
+ the names of its currently set window flags in a
+ read-only text editor.
+
+ The PreviewWindow class inherits QWidget. The widget
+ displays the names of its window flags set with the \l
+ {function}{setWindowFlags()} function. It is also
+ provided with a QPushButton that closes the window.
+
+ ...
+
+ See also QWidget.
+
+ \raw HTML
+ <hr />
+ <h2>Member Function Documentation</h2>
+ \endraw
+
+ \target constructor
+ \raw HTML
+ <h3>PreviewWindow(QWidget *parent = 0)</h3>
+ \endraw
+
+ Constructs a preview window widget with \i parent.
+
+ \target function
+ \raw HTML
+ <h3>setWindowFlags(Qt::WindowFlags flags)</h3>
+ \endraw
+
+ Sets the widgets flags using the
+ QWidget::setWindowFlags() function.
+
+ Then runs through the available window flags,
+ creating a text that contains the names of the flags
+ that matches the flags parameter, displaying
+ the text in the widgets text editor.
+ \endquotation
+
+ Using \\brief with a namespace can for example look like this:
+
+ \code
+ / *!
+ \namespace Qt
+
+ \brief The Qt namespace contains miscellaneous identifiers
+ used throughout the Qt library.
+ * /
+ \endcode
+
+ and finally using \\brief with a header file can look
+ something like this:
+
+ \code
+ / *!
+ \headerfile <QtGlobal>
+ \title Global Qt Declarations
+
+ \brief The <QtGlobal> header file provides basic
+ declarations and is included by all other Qt headers.
+
+ \sa <QtAlgorithms>
+ * /
+ \endcode
+
+ See also \l{property}{\\property}, \l{class}{\\class},
+ \l{namespace}{\\namespace} and \l{headerfile}{\\headerfile}.
+
+ \row
+ \o \bold \\legalese \target legalese
+ \o \bold {The \\legalese command, and the corresponding \\endlegalese
+ command, delimit a licence agreement.}
+
+ If the \\endlegalese command is omitted, QDoc will still
+ process the \\legalese command but considers the rest of
+ the documentation page as the license agreement.
+
+ Ideally, the license documentation is located where the
+ licensed code is used.
+
+ Later the documentation identified by the \\legalese
+ command can be accumulated into a list using the \l
+ {generatelist}{\\generatelist} command with the \c legalese
+ argument. This is useful to generate an overview of all the
+ licenses associated with the source code.
+
+ For example:
+
+ \code
+ \ * !
+ ...
+
+ On X11, Qt also supports drops via the Motif Drag \&
+ Drop Protocol. The implementation incorporates some
+ code that was originally written by Daniel Dardailler,
+ and adapted for Qt by Matt Koss \<koss@napri.sk\> and
+ Trolltech. Here is the original copyright notice:
+
+ \legalese
+ \code
+
+ Copyright 1996 Daniel Dardailler.
+
+ Permission to use, copy, modify, distribute, and sell
+ this software for any purpose is hereby granted without
+ fee, provided that the above copyright notice appear in
+ all copies and that both that copyright notice and this
+ permission notice appear in supporting documentation,
+ and that the name of Daniel Dardailler not be used in
+ advertising or publicity pertaining to distribution of
+ the software without specific, written prior
+ permission. Daniel Dardailler makes no representations
+ about the suitability of this software for any
+ purpose. It is provided "as is" without express or
+ implied warranty.
+
+ Modifications Copyright 1999 Matt Koss, under the same
+ license as above.
+
+ \ endcode
+ \endlegalese
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ ...
+
+ On X11, Qt also supports drops via the Motif Drag \&
+ Drop Protocol. The implementation incorporates some
+ code that was originally written by Daniel Dardailler,
+ and adapted for Qt by Matt Koss \<koss@napri.sk\> and
+ Trolltech. Here is the original copyright notice:
+
+ \legalese
+ \code
+
+ Copyright 1996 Daniel Dardailler.
+
+ Permission to use, copy, modify, distribute, and sell
+ this software for any purpose is hereby granted without
+ fee, provided that the above copyright notice appear in
+ all copies and that both that copyright notice and this
+ permission notice appear in supporting documentation,
+ and that the name of Daniel Dardailler not be used in
+ advertising or publicity pertaining to distribution of
+ the software without specific, written prior
+ permission. Daniel Dardailler makes no representations
+ about the suitability of this software for any
+ purpose. It is provided "as is" without express or
+ implied warranty.
+
+ Modifications Copyright 1999 Matt Koss, under the same
+ license as above.
+
+ \endcode
+ \endlegalese
+ \endquotation
+
+ \row
+ \o \bold \\warning \target warning
+ \o \bold {The \\warning command renders a "Warning:" prefix to
+ the command's argument.}
+
+ For example:
+
+ \code
+ / *!
+ Qt::HANDLE is a platform-specific handle type
+ for system objects. This is equivalent to
+ \c{void *} on Windows and Mac OS X, and to
+ \c{unsigned long} on X11.
+
+ \warning Using this type is not portable.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ Qt::HANDLE is a platform-specific handle type
+ for system objects. This is equivalent to
+ \c{void *} on Windows and Mac OS X, and to
+ \c{unsigned long} on X11.
+
+ \warning Using this type is not portable.
+ \endquotation
+ \endtable
+*/
+
+/*!
+ \page 12-0-qdoc-commands-miscellaneous.html
+ \previouspage Document Contents Commands
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage Topical Commands
+
+ \title Miscellaneous Commands
+
+ These commands provide miscellaneous functions
+ connected to the visual appearance of the documentation, and to the
+ process of generating the documentation.
+
+ \section1 Alphabetical List
+
+ \l {12-0-qdoc-commands-miscellaneous.html#else}{\\else},
+ \l {12-0-qdoc-commands-miscellaneous.html#endif}{\\endif},
+ \l {12-0-qdoc-commands-miscellaneous.html#expire}{\\expire},
+ \l {12-0-qdoc-commands-miscellaneous.html#generatelist}{\\generatelist},
+ \l {12-0-qdoc-commands-miscellaneous.html#if}{\\if},
+ \l {12-0-qdoc-commands-miscellaneous.html#include}{\\include},
+ \l {12-0-qdoc-commands-miscellaneous.html#meta}{\\meta},
+ \l {12-0-qdoc-commands-miscellaneous.html#omit}{\\omit},
+ \l {12-0-qdoc-commands-miscellaneous.html#raw}{\\raw},
+ \l {12-0-qdoc-commands-miscellaneous.html#raw}{\\unicode}
+
+ \section1 Command Descriptions
+
+ \table
+ \header
+ \o Command
+ \o Description
+
+ \row
+ \o \bold \\expire \target expire
+ \o \bold {The \\expire command allows you to define an expiration
+ date for your documentation.}
+
+ When using the \\expire command, QDoc will emit a warning
+ when the current date is larger than the specified
+ date. The command accepts one argument; the argument's
+ format is yyyy-mm-dd. For example:
+
+ \code
+ / *!
+ \page porting.html
+
+ \title Porting to Qt 3.x
+
+ \expire 2004-12-31
+
+ This document describes porting applications from Qt
+ 2.x to Qt 3.x.
+
+ The Qt 3.x series is not binary compatible with the
+ 2.x series.
+ ...
+ * /
+ \endcode
+
+ If you run QDoc on 4 July 2005, it will emit the warning
+
+ \quotation
+ porting.qdoc:6: Documentation expired 185 days ago
+ \endquotation
+
+ \row
+ \o \bold \\generatelist \target generatelist
+ \o \bold {The \\generatelist command expands to a list of
+ various documentation or links to documentation.}
+
+ For example in the Qt Reference Documentation:
+
+ \code
+ / *!
+ \page classes.html
+ \title All Qt Classes (main index)
+
+ For a shorter list that only includes the most
+ frequently used classes, see \l{Qt's Main Classes}. For
+ a list of Qt 3 support classes, see \l{Qt3Support
+ Classes}.
+
+ \generatelist classes
+ * /
+ \endcode
+
+ is used to generate \l {All Qt Classes (main index)}.
+
+ The command accepts the following arguments:
+
+ \target table example
+
+ \list
+ \o \c annotatedclasses
+
+ The \c annotatedclasses argument provides a table
+ containing the names of all the classes, and a
+ description of each class. Each class name is a link to
+ the class's reference documentation.
+
+ For example:
+
+ \quotation
+ \raw HTML
+ <table align="center" cellpadding="2"
+ cellspacing="1" border="0">
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>
+ <a href="http://qt.nokia.com/doc/4.0/qdial.html">
+ QDial</a>
+ </td>
+ <td>Rounded range control (like a speedometer
+ or potentiometer)</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>
+ <a href="http://qt.nokia.com/doc/4.0/qdialog.html">
+ QDialog</a>
+ </td>
+ <td>The base class of dialog windows</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>
+ <a href="http://qt.nokia.com/doc/4.0/qdir.html">
+ QDir</a>
+ </td>
+ <td>Access to directory structures and their
+ contents</td>
+ </tr>
+ </table>
+ \endraw
+ \endquotation
+
+ A class is identified within the documentation by the
+ the \l {class}{\\class} command, and the descriptions
+ are based on the argument of the \l {brief}{\\brief}
+ commands in the class documentation.
+
+ \target list example
+
+ \o \c classes
+
+ The \c classes argument provides a complete alphabetical
+ list of the classes. Each class name is a link to the
+ class's reference documentation.
+
+ For example:
+
+ \quotation
+ \raw HTML
+ <p><table width="100%">
+
+ <tr>
+ <td align="right"><b>A&nbsp;</b></td>
+ <td><a href="http://qt.nokia.com/doc/4.0/qabstractbutton.html">QAbstractButton</a></td>
+
+ <td align="right"></td>
+ <td><a href="http://qt.nokia.com/doc/4.0/qabstractextensionmanager.html">QAbstractExtensionManager</a></td>
+
+ <td align="right"></td>
+ <td><a href="http://qt.nokia.com/doc/4.0/qabstractitemmodel.html">QAbstractItemModel</a></td>
+ </tr>
+
+ <tr>
+ <td align="right"></td>
+ <td><a href="http://qt.nokia.com/doc/4.0/qabstracteventdispatcher.html">QAbstractEventDispatcher</a></td>
+
+ <td align="right"></td>
+ <td><a href="http://qt.nokia.com/doc/4.0/qabstractformbuilder.html">QAbstractFormBuilder</a></td>
+
+ <td align="right"></td>
+ <td><a href="http://qt.nokia.com/doc/4.0/qabstractitemview.html">QAbstractItemView</a></td>
+ </tr>
+
+ <tr>
+ <td align="right"></td>
+ <td><a href="http://qt.nokia.com/doc/4.0/qabstractextensionfactory.html">QAbstractExtensionFactory</a></td>
+
+ <td align="right"></td>
+ <td><a href="http://qt.nokia.com/doc/4.0/qabstractitemdelegate.html">QAbstractItemDelegate</a></td>
+
+ <td align="right"></td>
+ <td><a href="http://qt.nokia.com/doc/4.0/qabstractlistmodel.html">QAbstractListModel</a></td>
+ </tr>
+ </table></p>
+ \endraw
+ \endquotation
+
+ A class is identified within the documentation by the
+ the \l {class}{\\class} command.
+
+ \o \c classesbymodule
+
+ This particular argument requests an additional argument,
+ i.e. a specification of the module.
+
+ For example:
+
+ \code
+ / *!
+ \page qtgui.html
+ \contentspage Qt Classes by Module
+ \previouspage QtCore Classes
+ \nextpage QtNetwork Classes
+
+ \title QtGui Classes
+
+ \keyword QtGui
+
+ \generatelist {classesbymodule QtGui}
+ * /
+ \endcode
+
+ Together, these arguments provide a table containing the
+ classes considered members of the specified module,
+ accompanied with a brief description. Each class name is
+ a link to the class's reference documentation.
+
+ The generated table is rendered similarily to the one
+ generated when using the \l {table example}{\c
+ annotatedclasses} argument.
+
+ For the basic classes in Qt, a class's module is
+ determined by its location, i.e. its directory. However,
+ for extensions, like ActiveQt and Qt Designer, a class
+ is related to a module with the \l
+ {inmodule}{\\inmodule} command.
+
+ \o \c classesbyedition
+
+ This particular argument requests an additional argument,
+ i.e. a specification of the edition.
+
+ For example:
+
+ \code
+ / *!
+ \page console-edition-classes.html
+ \title Qt Console Edition Classes
+
+ \generatelist{classesbyedition Console}
+ * /
+ \endcode
+
+ Together, these arguments provide a table containing the
+ classes considered members of the specified edition,
+ accompanied with a brief description. Each class name is
+ a link to the class's reference documentation.
+
+ The edition a given class can be found in is determined by
+ the module it belongs to.
+
+ \o \c compatclasses
+
+ The \c compatclasses argument provides a complete and
+ alphabetical list of the support classes. A support
+ class is identified within the documentation by the \l
+ {compat}{\\compat} command. Each class name is a link to
+ the class's reference documentation. The list is
+ rendered similarily to the list generated by the \l
+ {list example}{\c classes} argument.
+
+ \warning The \c classesbymodule argument will at some
+ point replace the this argument.
+
+ \o \c functionindex
+
+ The \c functionindex argument provides a complete
+ alphabetical list of all the documented member
+ functions.
+
+ For example:
+
+ \quotation
+ \raw HTML
+ <p><center><font size="+1"><b><a href="#a">A</a>&nbsp;<a href="#b">B</a>&nbsp;<a href="#c">C</a>&nbsp;<a href="#d">D</a>&nbsp;<a href="#e">E</a>&nbsp;<a href="#f">F</a>&nbsp;<a href="#g">G</a>&nbsp;<a href="#h">H</a>&nbsp;<a href="#i">I</a>&nbsp;<a href="#j">J</a>&nbsp;<a href="#k">K</a>&nbsp;<a href="#l">L</a>&nbsp;<a href="#m">M</a>&nbsp;<a href="#n">N</a>&nbsp;<a href="#o">O</a>&nbsp;<a href="#p">P</a>&nbsp;<a href="#q">Q</a>&nbsp;<a href="#r">R</a>&nbsp;<a href="#s">S</a>&nbsp;<a href="#t">T</a>&nbsp;<a href="#u">U</a>&nbsp;<a href="#v">V</a>&nbsp;<a href="#w">W</a>&nbsp;<a href="#x">X</a>&nbsp;<a href="#y">Y</a>&nbsp;<a href="#z">Z</a>&nbsp;</b></font></center></p>
+
+ <p>DTDHandler: <a href="http://qt.nokia.com/doc/4.0/qxmlreader.html#DTDHandler">QXmlReader</a></p>
+
+ <p>QAXCLASS: <a href="http://qt.nokia.com/doc/4.0/qaxfactory.html#QAXCLASS">global</a></p>
+
+ <p>QAXFACTORY_BEGIN: <a href="http://qt.nokia.com/doc/4.0/qaxfactory.html#QAXFACTORY_BEGIN">global</a></p>
+
+ <p>QAXFACTORY_DEFAULT: <a href="http://qt.nokia.com/doc/4.0/qaxfactory.html#QAXFACTORY_DEFAULT">global</a></p>
+
+ <p>QAXFACTORY_END: <a href="http://qt.nokia.com/doc/4.0/qaxfactory.html#QAXFACTORY_END">global</a></p>
+
+ \endraw
+
+ ...
+ \endquotation
+
+ \o \c legalese
+
+ The \c legalese argument provides a complete list of all
+ the licenses. The licenses are identified within the
+ documentation using the \l {legalese}{\\legalese}
+ command.
+
+ For example:
+
+ \quotation
+ \raw HTML
+ <hr />
+ <p>
+ Copyright (c) 1989 The Regents of the
+ University of California. All rights reserved.
+ </p>
+
+ <p>
+ Redistribution and use in source and binary
+ forms are permitted provided that the above
+ copyright notice and this paragraph are
+ duplicated in all such forms and that any
+ documentation, advertising materials, and other
+ materials related to such distribution and use
+ acknowledge that the software was developed by
+ the University of California, Berkeley...
+ </p>
+
+ <ul>
+ <li>
+ <a href="http://qt.nokia.com/doc/4.0/qdate.html#weekNumber">QDate::weekNumber()</a>
+ </li>
+ </ul>
+
+ <hr />
+ <p>
+ Copyright (c) 1991 by AT&amp;T.
+ </p>
+
+ <p>
+ Permission to use, copy, modify, and distribute
+ this software for any purpose without fee is
+ hereby granted, provided that this entire notice
+ is included in all copies of any software which
+ is or includes a copy or modification of this
+ software and in all copies of the supporting
+ documentation for such software...
+ </p>
+
+ <ul>
+ <li>
+ <a href="http://qt.nokia.com/doc/4.0/qlocale.html">QLocale</a>
+ </li>
+ </ul>
+ <hr />
+ \endraw
+ ...
+ \endquotation
+
+ \o \c mainclasses
+
+ The \c mainclasses argument provides a complete
+ alphabetical list of the main classes. Each class name
+ is a link to the class's reference documentation. A
+ class is related to the group of main classes by using
+ the \l {mainclass}{\\mainclass} command.
+
+ The list is rendered similarily to the list generated by
+ the \l {list example}{\c classes} argument.
+
+ \o \c overviews
+
+ The \c overviews argument provides a complete
+ alphabetical overview of the documentation. Each list
+ entry is a link to the respective documentation page.
+
+ The list includes pages declared using commands like \l
+ {page}{\\page} and \l {group}{\\group}. The list omits
+ examples and classes, and only lists the first page of
+ documentation that contains two or more pages using
+ commands like \l {nextpage}{\\nextpage}.
+
+ For example:
+
+ \quotation
+ \raw HTML
+ <ul>
+
+ <li>
+ <a href="http://qt.nokia.com/doc/4.0/qtalgorithms.html">
+ &lt;QtAlgorithms&gt; - Generic Algorithms
+ </a>
+ </li>
+
+ <li>
+ <a href="http://qt.nokia.com/doc/4.0/qtglobal.html">
+ &lt;QtGlobal&gt; - Global Qt Declarations
+ </a>
+ </li>
+
+ <li>
+ <a href="http://qt.nokia.com/doc/4.0/qaxserver-demo-simple.html">
+ A standard ActiveX and the &quot;simple&quot; ActiveQt widget
+ </a>
+ </li>
+
+ <li>
+ <a href="http://qt.nokia.com/doc/4.0/aboutqt.html">
+ About Qt
+ </a>
+ </li>
+
+ <li>
+ <a href="http://qt.nokia.com/doc/4.0/trolltech.html">
+ About Trolltech
+ </a>
+ </li>
+
+ <li>
+ <a href="http://qt.nokia.com/doc/4.0/abstractwidgets.html">
+ Abstract Widget Classes
+ </a>
+ </li>
+
+ <li>
+ <a href="http://qt.nokia.com/doc/4.0/accessibility.html">
+ Accessibility Classes
+ </a>
+ </li>
+ ...
+ </ul>
+ \endraw
+ \endquotation
+
+ \o \c related
+
+ The \c related argument is used in combination with the
+ \l {group}{\\group} command to list all the overviews
+ related to the given group. Each list entry is a link to
+ the respective documentation page.
+
+ \o \c relatedinline
+
+ The \c related argument is used in combination with the
+ \l {group}{\\group} command to collect all documentation
+ related to the given group. The various documentation
+ snippets are copied directly into the group page.
+
+ \o \c service
+
+ The \c service argument provides a complete alphabetical
+ list of the services. Each service name is a link to the
+ service's reference documentation.
+
+ A service is identified within the documentation by the
+ \l {service}{\\service} command.
+
+ \endlist
+
+
+ \row
+ \o \bold \\if \target if
+ \o \bold {The \\if command and the corresponding \\endif command
+ enclose parts of a QDoc comment that only will be included if
+ the condition specified by the command's argument is true.}
+
+ The command reads the rest of the line and parses it as an
+ C++ #if statement. For example:
+
+ \code
+ / *!
+ \if defined(opensourceedition)
+
+ \bold{Note:} This edition is for the development of
+ \l{Qt Open Source Edition}{Free and Open Source}
+ software only; see \l{Qt Commercial Editions}.
+
+ \endif
+ * /
+ \endcode
+
+ This QDoc comment will only be rendered if the \c
+ opensourceedition preprocessor symbol is defined, and
+ specified in the \l {definesvariable}{defines} variable in
+ the configuration file to make QDoc process
+ the code within #ifdef and #endif:
+
+ \code
+ defines = opensourceedition
+ \endcode
+
+ You can also define the preprocessor symbol manually on the
+ command line. For more information see the documentation of
+ the \l {definesvariable}{defines} variable.
+
+ See also \l{endif}{\\endif}, \l{else}{\\else}, \l
+ {definesvariable}{defines} and \l falsehoods.
+
+ \row
+ \o \bold \\endif \target endif
+ \o \bold {The \\endif command and the corresponding \\if command
+ enclose parts of a QDoc comment that will be included if
+ the condition specified by the \l {if}{\\if} command's
+ argument is true.}
+
+ For more information, see the documentation of the \l
+ {if}{\\if} command.
+
+ See also \l{if}{\\if}, \l{else}{\\else}, \l
+ {definesvariable}{defines} and \l falsehoods.
+
+ \row
+ \o \bold \\else \target else
+ \o \bold {The \\else command specifies an alternative if the
+ condition in the \l {if}{\\if} command is false.}
+
+ The \\else command can only be used within \l
+ {if}{\\if...\\endif} commands, but is useful when there is
+ only two alternatives. For example:
+
+ \code
+ / *!
+ The Qt 3 support library is provided to keep old
+ source code working.
+
+ In addition to the \c Qt3Support classes, Qt 4 provides
+ compatibility functions when it's possible for an old
+ API to cohabit with the new one.
+
+ \if !defined(QT3_SUPPORT)
+ \if defined(QT3_SUPPORTWARNINGS)
+ The compiler emits a warning when a
+ compatibility function is called. (This works
+ only with GCC 3.2+ and MSVC 7.)
+ \else
+ To use the Qt 3 support library, you need to
+ have the line QT += qt3support in your .pro
+ file (qmake automatically define the
+ QT3_SUPPORT symbol, turning on compatibility
+ function support).
+
+ You can also define the symbol manually (e.g.,
+ if you don't want to link against the \c
+ Qt3Support library), or you can define \c
+ QT3_SUPPORT_WARNINGS instead, telling the
+ compiler to emit a warning when a compatibility
+ function is called. (This works only with GCC
+ 3.2+ and MSVC 7.)
+ \endif
+ \endif
+ * /
+ \endcode
+
+ If the \c QT3_SUPPORT is defined, the comment will be rendered
+ as
+
+ \quotation
+ The Qt 3 support library is provided to keep old source
+ code working.
+
+ In addition to the Qt3Support classes, Qt 4 provides
+ compatibility functions when it's possible for an old
+ API to cohabit with the new one.
+ \endquotation
+
+ If \c QT3_SUPPORT isn't defined but \c QT3_SUPPORT_WARNINGS
+ is, the comment will be rendered as
+
+ \quotation
+ The Qt 3 support library is provided to keep old source
+ code working.
+
+ In addition to the Qt3Support classes, Qt 4 provides
+ compatibility functions when it's possible for an old
+ API to cohabit with the new one.
+
+ The compiler emits a warning when a compatibility
+ function is called. (This works only with GCC 3.2+ and
+ MSVC 7.)
+ \endquotation
+
+ If none of the symbols are defined, the comment will be
+ rendered as
+
+ \quotation
+ The Qt 3 support library is provided to keep old
+ source code working.
+
+ In addition to the \c Qt3Support classes, Qt 4 provides
+ compatibility functions when it's possible for an old
+ API to cohabit with the new one.
+
+ To use the Qt 3 support library, you need to have the
+ line QT += qt3support in your .pro file (qmake
+ automatically define the QT3_SUPPORT symbol, turning on
+ compatibility function support).
+
+ You can also define the symbol manually (e.g., if you
+ don't want to link against the \c Qt3Support library),
+ or you can define \c QT3_SUPPORT_WARNINGS instead,
+ telling the compiler to emit a warning when a
+ compatibility function is called. (This works only with
+ GCC 3.2+ and MSVC 7.)
+ \endquotation
+
+ See also \l{if}{\\if}, \l{endif}{\\endif}, \l
+ {definesvariable}{defines} and \l falsehoods.
+
+ \row
+ \o \bold \\include \target include
+ \o \bold {The \\include command expands to the contents of the
+ file specified by the command's argument.}
+
+ \warning This is preliminary functionality. For more
+ information, see the \l
+ {26-qdoc-commands-compatibility.html#include-versus-input}
+ {compatibility} section.
+
+ The command takes a file name as an argument, and is
+ useful when some piece of the documentation is used
+ repeatedly: Move the repetetive text into a separate file,
+ and use the \\include command whenever you want to insert
+ the separate documentation.
+
+ The contents of such a file should follow QDoc syntax,
+ excluding the enclosing \c{/}\c{*!} ... \c{*}\c{/} marks.
+ To ensure that QDoc won't attempt to read the file as a
+ stand-alone piece of documentation, we recommend that you
+ use the \c .qdocinc extension.
+
+ For example:
+
+ \code
+ / *!
+ \page corefeatures.html
+ \title Core Features
+
+ \include examples/signalandslots.qdocinc
+ \include examples/objectmodel.qdocinc
+ \include examples/layoutmanagement.qdocinc
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h1>Core Features</h1>
+ \endraw
+
+ \include examples/signalandslots.qdocinc
+ \include examples/objectmodel.qdocinc
+ \include examples/layoutmanagement.qdocinc
+ \endquotation
+
+ Here is the actual \c .qdocinc files: \l
+ signalandslots.qdocinc, \l objectmodel.qdocinc, \l
+ layoutmanagement.qdocinc
+
+ \row
+ \o \bold \\meta \target meta
+ \o \bold {The \\meta command is the QDoc equivalent to the HTML
+ \c meta tag.}
+
+ The command accepts two arguments: The first argument (the
+ following word) is equivalent to the HTML meta tag's \i
+ name variable, and the second argument (the rest of the
+ line) is equivalent to the tag's \i contents variable.
+
+ For example:
+
+ \code
+ / *!
+ \meta author Summerfield
+
+ \section1 Automatic Dialogs
+
+ \abstract
+ This article shows how to maintain sets of
+ "attributes" (QVariant values), and how to allow
+ users to view and edit them using dialogs that are
+ created dynamically based on the attributes and
+ their types.
+ \endabstract
+
+ The Attributes class described in this article holds a
+ set of QVariants, and can create a dialog to present
+ the QVariants to the user in an appropriate way.
+
+ ...
+ * /
+ \endcode
+
+ will be included in the generated HTML page as
+
+ \code
+ <head>
+ ...
+ <meta name="author" content="Summerfield" />
+ ...
+ </head>
+ \endcode
+
+ \row
+ \o \bold \\omit \target omit
+ \o \bold {The \\omit command and the correspondning \\endomit
+ command delimit parts of the documentation that
+ you want QDoc to skip.}
+
+ For example:
+
+ \code
+ / *!
+ \table
+ \row
+ \o Basic Widgets
+ \o Basic GUI widgets such as buttons, comboboxes
+ and scrollbars.
+
+ \omit
+ \row
+ \o Component Model
+ \o Interfaces and helper classes for the Qt
+ Component Model.
+ \endomit
+
+ \row
+ \o Database Classes
+ \o Database related classes, e.g. for SQL databases.
+ \endtable
+ * /
+ \endcode
+
+ will be rendered as
+
+ \raw HTML
+ <table align="center" cellpadding="2"
+ cellspacing="1" border="0">
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>Basic Widgets</td>
+ <td>Basic GUI widgets such as buttons, comboboxes
+ and scrollbars.</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#c0c0c0">
+ <td>Database Classes</td>
+ <td>Database related classes, e.g. for SQL databases.</td>
+ </tr>
+ </table>
+ \endraw
+
+
+ \row
+ \o \bold \\raw \target raw
+ \o \bold {The \\raw command and the corresponding
+ \\endraw command delimit a block of raw mark-up language code.}
+
+ The command takes an argument specifying the code's format;
+ currently the only supported format is HTML.
+
+ The \\raw command is useful if you want some special HTML
+ effects in your documentation. For example:
+
+ \code
+ / *!
+ Qt has some predefined QColor objects. For example:
+
+ \raw HTML
+ <style type="text/css" id="colorstyles">
+ #blue { background-color: #0000ff; color: #ffffff }
+ #darkBlue { background-color: #000080; color: #ffffff }
+ #cyan { background-color: #00ffff; color: #000000 }
+ </style>
+
+ <p>
+ <tt id="blue">Blue(#0000ff)</tt>,
+ <tt id="darkBlue">dark blue(#000080)</tt> and
+ <tt id="cyan">cyan(#00ffff)</tt>.
+ \endraw
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ Qt has some predefined QColor objects. For example:
+
+ \raw HTML
+ <style type="text/css" id="colorstyles">
+ #blue { background-color: #0000ff; color: #ffffff }
+ #darkBlue { background-color: #000080; color: #ffffff }
+ #cyan { background-color: #00ffff; color: #000000 }
+ </style>
+
+ <p>
+ <tt id="blue">Blue(#0000ff)</tt>,
+ <tt id="darkBlue">dark blue(#000080)</tt> and
+ <tt id="cyan">cyan(#00ffff)</tt>.
+ \endraw
+ \endquotation
+
+ \row
+ \o \bold \\unicode \target unicode
+ \o \bold {The \\unicode command allows you to insert an
+ arbitrary Unicode character in the document.}
+
+ The command takes an argument specifying the character as
+ an integer. By default, base 10 is assumed, unless a '0x'
+ or '0' prefix is specified (for base 16 and 8,
+ respectively). For example:
+
+ \code
+ O G\unicode{0xEA}nio e as Rosas
+
+ \unicode 0xC0 table en famille avec 15 \unicode 0x20AC par jour
+
+ \unicode 0x3A3 \i{a}\sub{\i{i}}
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ O G\unicode{0xEA}nio e as Rosas
+
+ \unicode 0xC0 table en famille avec 15 \unicode 0x20AC par jour
+
+ \unicode 0x3A3 \i{a}\sub{\i{i}}
+ \endquotation
+
+ The \\raw command follows the same conventions as the \l
+ {i}{\\i} command for \l {argument}{punctuation and use of
+ braces} for the argument.
+ \endtable
+*/
+
+/*!
+ \page 12-1-signalandslots.html
+ \previouspage Miscellaneous Commands
+ \contentspage QDoc Manual - Table of Contents
+
+ \title signalandslots.qdocinc
+
+ \quotefile examples/signalandslots.qdocinc
+*/
+
+/*!
+ \page 12-2-objectmodel.html
+ \previouspage Miscellaneous Commands
+ \contentspage QDoc Manual - Table of Contents
+
+ \title objectmodel.qdocinc
+
+ \quotefile examples/objectmodel.qdocinc
+*/
+
+/*!
+ \page 12-3-layoutmanagement.html
+ \previouspage Miscellaneous Commands
+ \contentspage QDoc Manual - Table of Contents
+
+ \title layoutmanagement.qdocinc
+
+ \quotefile examples/layoutmanagement.qdocinc
+*/
+
+/*!
+ \page 13-qdoc-commands-topical.html
+ \previouspage Miscellaneous Commands
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage Contextual Commands
+
+ \title Topical Commands
+
+ The topical commands tell QDoc what is being documented
+ (i.e. existing units like classes, functions and examples), and
+ some of the commands allows you to create extra pages.
+
+ \section1 Alphabetical List
+
+ \l {13-qdoc-commands-topical.html#class}{\\class},
+ \l {13-qdoc-commands-topical.html#enum}{\\enum},
+ \l {13-qdoc-commands-topical.html#example-command}{\\example},
+ \l {13-qdoc-commands-topical.html#externalpage}{\\externalpage},
+ \l {13-qdoc-commands-topical.html#fn}{\\fn},
+ \l {13-qdoc-commands-topical.html#group}{\\group},
+ \l {13-qdoc-commands-topical.html#headerfile}{\\headerfile},
+ \l {13-qdoc-commands-topical.html#macro}{\\macro},
+ \l {13-qdoc-commands-topical.html#module}{\\module},
+ \l {13-qdoc-commands-topical.html#namespace}{\\namespace},
+ \l {13-qdoc-commands-topical.html#page}{\\page},
+ \l {13-qdoc-commands-topical.html#property}{\\property},
+ \l {13-qdoc-commands-topical.html#service}{\\service},
+ \l {13-qdoc-commands-topical.html#typedef}{\\typedef},
+ \l {13-qdoc-commands-topical.html#variable}{\\variable},
+
+ \section1 General Description
+
+ When QDoc is processing a comment, it will try to connect the
+ documentation to the source code. For that reason it will first
+ look for the topical commands. If there is no such command, it
+ will try to tie the documentation to the immediately following
+ code. If there is no topical command, and the documentation cannot
+ be tied to following code, the documentation is simply lost.
+
+ \target topical argument
+
+ The documented unit's name is passed as the unique argument for
+ all the topical commands. The argument's naming convention is the
+ documented unit's complete name. For example:
+
+ \code
+ \enum QComboBox::InsertPolicy
+ \endcode
+
+ Functions is a special case, the argument's naming convention for
+ the \l {fn}{\\fn} command is that of the function's definition
+ outside the class definition. For example:
+
+ \code
+ \fn void PreviewWindow::setWindowFlags()
+ \endcode
+
+ A topical command can appear anywhere in a comment, but must stand
+ alone on its own line. If the argument spans several lines, make
+ sure that each line (except the last one) is ended with a
+ backslash. In addition QDoc counts parentheses, which means that
+ if it encounters a '(' it considers everything until the closing
+ ')' as its argument.
+
+ If a topical command is repeated with different arguments, the
+ same documentation will appear for both the units. For example:
+
+ \code
+ / *!
+ \fn void PreviewWindow::setWindowFlags()
+ \fn void ControllerWindow::setWindowFlags()
+
+ Sets the widgets flags using the QWidget::setWindowFlags()
+ function.
+
+ Then runs through the available window flags, creating a text
+ that contains the names of the flags that matches the flags
+ parameter, displaying the text in the widgets text editor.
+ * /
+ \endcode
+
+ The \c PreviewWindow::setWindowFlags() and \c
+ ControllerWindow::setWindowFlags() functions will get the same
+ documentation.
+
+ \section1 Command Descriptions
+
+ \table
+ \header
+ \o Command
+ \o Description
+
+ \row
+ \o \bold \\class \target class
+ \o \bold {The \\class command tells QDoc that a class is
+ part of the public API, and lets you enter a detailed
+ description.}
+
+ The command follows \l {topical argument}{the general
+ topical command convention} for the argument, and supports
+ nested classes, for example:
+
+ \code
+ / *!
+ \class QMap::iterator
+
+ \brief The QMap::iterator class provides an STL-style
+ non-const iterator for QMap and QMultiMap.
+
+ QMap features both \l{STL-style iterators} and
+ \l{Java-style iterators}. The STL-style iterators ...
+ * /
+ \endcode
+
+ The generated HTML documentation for the specified class is
+ put in \c <lower-case>classname.html. For example, the
+ documentation for the \c PreviewWindow class is located in
+ \c previewwindow.html.
+
+ \target framework
+
+ In addition to render the detailed description, the \\class
+ comand will generate the documentation framework, i.e. a
+ list of the class's types, properties, functions, signals
+ and slots with empty documentation.
+
+ The command is typically accompanied with a \l
+ {brief}{\\brief} command, a \l {mainclass}{\\mainclass}
+ command, an \l {ingroup}{\\ingroup} command and a \l
+ {sa}{\\sa} command. For example:
+
+ \code
+ / *!
+ \class PreviewWindow
+ \brief The PreviewWindow class is a custom widget
+ displaying the names of its currently set
+ window flags in a read-only text editor.
+
+ \mainclass
+ \ingroup miscellaneous
+
+ The PreviewWindow class inherits QWidget. The widget
+ displays the names of its window flags set with the \l
+ {function}{setWindowFlags()} function. It is also
+ provided with a QPushButton that closes the window.
+
+ ...
+
+ \sa QWidget
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h1>PreviewWindow Class Reference</h1>
+ \endraw
+
+ The PreviewWindow class is a custom widget displaying
+ the names of its currently set window flags in a
+ read-only text editor. \l {preview window}{More...}
+
+ \raw HTML
+ <h3>Properties</h3>
+ \endraw
+
+ \list
+ \o 52 properties inherited from QWidget
+ \o 1 property inherited from QObject
+ \endlist
+
+ \raw HTML
+ <h3>Public Functions</h3>
+ \endraw
+
+ \list
+ \o \l {constructor}{PreviewWindow}(QWidget *parent = 0)
+ \o void \l {function}{setWindowFlags}(Qt::WindowFlags flags)
+ \endlist
+
+ \list
+ \o 183 public functions inherited from QWidget
+ \o 28 public functions inherited from QObject
+ \endlist
+
+ \raw HTML
+ <h3>Public Slots</h3>
+ \endraw
+
+ \list
+ \o 17 public slots inherited from QWidget
+ \o 1 public slot inherited from QObject
+ \endlist
+
+ \raw HTML
+ <h3>Additional Inherited Members</h3>
+ \endraw
+
+ \list
+ \o 1 signal inherited from QWidget
+ \o 1 signal inherited from QObject
+ \o 4 static public members inherited from QWidget
+ \o 4 static public members inherited from QObject
+ \o 39 protected functions inherited from QWidget
+ \o 7 protected functions inherited from QObject
+ \endlist
+
+ \target preview window
+
+ \raw HTML
+ <hr />
+ <h2>Detailed Description</h2>
+ \endraw
+
+ The PreviewWindow class is a custom widget displaying
+ the names of its currently set window flags in a
+ read-only text editor.
+
+ The PreviewWindow class inherits QWidget. The widget
+ displays the names of its window flags set with the \l
+ {function}{setWindowFlags()} function. It is also
+ provided with a QPushButton that closes the window.
+
+ ...
+
+ See also QWidget.
+
+ \raw HTML
+ <hr />
+ <h2>Member Function Documentation</h2>
+ \endraw
+
+ \target constructor
+ \raw HTML
+ <h3>PreviewWindow(QWidget *parent = 0)</h3>
+ \endraw
+
+ Constructs a preview window widget with \i parent.
+
+ \target function
+ \raw HTML
+ <h3>setWindowFlags(Qt::WindowFlags flags)</h3>
+ \endraw
+
+ Sets the widgets flags using the
+ QWidget::setWindowFlags() function.
+
+ Then runs through the available window flags,
+ creating a text that contains the names of the flags
+ that matches the flags parameter, displaying
+ the text in the widgets text editor.
+ \endquotation
+
+ \row
+ \o \bold \\enum \target enum
+ \o \bold {The \\enum command allows you to document a C++ enum.}
+
+ The command follows \l {topical argument}{the general
+ topical command convention} for the argument.
+
+ The enum items are documented using the \l {value}{\\value}
+ command. If an item isn't documented, QDoc will emit a
+ warning. This can be avoided using the \l
+ {omitvalue}{\\omitvalue} command excluding an item from the
+ documentation. The enum documentation will be located in
+ the associated class, header file or namespace
+ documentation.
+
+ For example:
+
+ \code
+ enum Corner {
+ TopLeftCorner = 0x00000,
+ TopRightCorner = 0x00001,
+ BottomLeftCorner = 0x00002,
+ BottomRightCorner = 0x00003
+ #if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN)
+ ,TopLeft = TopLeftCorner,
+ TopRight = TopRightCorner,
+ BottomLeft = BottomLeftCorner,
+ BottomRight = BottomRightCorner
+ #endif
+ };
+ \endcode
+
+ In case of the Qt::Corner enum,
+
+ \code
+ / *!
+ \enum Qt::Corner
+
+ This enum type specifies a corner in a rectangle:
+
+ \value TopLeftCorner
+ The top-left corner of the rectangle.
+ \value TopRightCorner
+ The top-right corner of the rectangle.
+ \value BottomLeftCorner
+ The bottom-left corner of the rectangle.
+ \value BottomRightCorner
+ The bottom-right corner of the rectangle.
+
+ \omitvalue TopLeft
+ \omitvalue TopRight
+ \omitvalue BottomLeft
+ \omitvalue BottomRight
+ * /
+ \endcode
+
+ this associated QDoc comment will be rendered as
+
+ \quotation
+ \raw HTML
+ <h3 class="fn"><a name="Corner-enum"></a>enum Qt::Corner</h3>
+
+ <p>This enum type specifies a corner in a rectangle:</p>
+
+ <table border="1" cellpadding="2" cellspacing="1" width="100%">
+ <tr>
+ <th width="25%">Constant</th>
+ <th width="15%">Value</th>
+ <th width="60%">Description</th>
+ </tr>
+
+ <tr>
+ <td valign="top"><tt>Qt::TopLeftCorner</tt></td>
+ <td align="center" valign="top"><tt>0x00000</tt></td>
+ <td valign="top">The top-left corner of the rectangle.</td>
+ </tr>
+
+ <tr>
+ <td valign="top"><tt>Qt::TopRightCorner</tt></td>
+ <td align="center" valign="top"><tt>0x00001</tt></td>
+ <td valign="top">The top-right corner of the rectangle.</td>
+ </tr>
+
+ <tr>
+ <td valign="top"><tt>Qt::BottomLeftCorner</tt></td>
+ <td align="center" valign="top"><tt>0x00002</tt></td>
+ <td valign="top">The bottom-left corner of the rectangle.</td>
+ </tr>
+
+ <tr>
+ <td valign="top"><tt>Qt::BottomRightCorner</tt></td>
+ <td align="center" valign="top"><tt>0x00003</tt></td>
+ <td valign="top">The bottom-right corner of the rectangle.</td>
+ </tr>
+
+ </table>
+ \endraw
+ \endquotation
+
+ in qt.html.
+
+ See also \l {value}{\\value} and \l {omitvalue}{\\omitvalue}.
+
+ \row
+ \o \bold \\example \target example-command
+ \o \bold {The \\example command allows you to document an
+ example.}
+
+ The command follows \l {topical argument}{the general
+ topical command convention} for the argument. In particular
+ the command's argument is the example's path relative to
+ the paths listed in the \l exampledirs configuration
+ variable.
+
+ The documentation will be located in \i
+ {path-to-example}.html, and QDoc will add a list of all the
+ example files at the top of this documentation page.
+
+ For example, if \l exampledirs contain \c
+ $QTDIR/examples/widgets/imageviewer, then
+
+ \code
+ / *!
+ \example widgets/imageviewer
+ \title ImageViewer Example
+ \subtitle
+
+ The example shows how to combine QLabel and QScrollArea
+ to display an image.
+
+ ...
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <center><h1>Image Viewer Example</h1></center>
+ \endraw
+
+ Files:
+ \list
+ \o \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-imageviewer-cpp.html}
+ {widgets/imageviewer/imageviewer.cpp}
+ \o \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-imageviewer-h.html}
+ {widgets/imageviewer/imageviewer.h}
+ \o \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-main-cpp.html}
+ {widgets/imageviewer/main.cpp}
+ \endlist
+
+ The example shows how to combine QLabel and QScrollArea
+ to display an image.
+
+ ...
+ \endquotation
+
+ in widgets-imageviewer.html.
+
+ \row
+ \o \bold \\fn \target fn
+ \o \bold {The \\fn command allows you to document a function.}
+
+ The command follows \l {topical argument}{the general
+ topical command convention} for the argument. In particular
+ it is important that the return type of the function,
+ whether it is \c const or not and the complete set of
+ arguments with type are included in the argument. If the
+ referenced function doesn't exist, QDoc will emit a
+ warning.
+
+ Also, the \\fn command is QDoc's default command, i.e. when
+ no topical command can be found within a QDoc comment, QDoc
+ tries to tie the documentation to the following code as if
+ it was function documentation.
+
+ This means that the command normally isn't necessary since
+ the recommended style is to write the function
+ documentation directly before the function implementation
+ in the \c .cpp file. In fact, it should only be used for
+ inline functions implemented in the \c .h file.
+
+ For example:
+
+ \code
+ / *!
+ \fn bool QToolBar::isAreaAllowed(Qt::ToolBarArea area) const
+
+ Returns true if this toolbar is dockable in the given
+ \a area; otherwise returns false.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h3>bool QToolBar::isAreaAllowed(Qt::ToolBarArea area) const
+ </h3>
+ \endraw
+
+ Returns true if this toolbar is dockable in the given
+ \a area; otherwise returns false.
+ \endquotation
+
+ See also \l {overload}{\\overload}.
+
+ \row
+ \o \bold \\group \target group
+ \o \bold {The \\group command creates a separate page that
+ lists the classes belonging to the group specified by the
+ command's argument.}
+
+ The command follows \l {topical argument}{the general
+ topical command convention} for the argument. The \\group
+ command is typically followed by a \l {title}{\\title}
+ command and a short introduction to the group. The
+ generated HTML documentation for the specified group is put
+ in <lower-case>\i{group}.html.
+
+ A class can be related to a group by using the \l
+ {ingroup}{\\ingroup} command. In addition, overviews can be
+ related to a group using the same command, but these must
+ be listed explicitly using the \l
+ {generatelist}{\\generatelist} command (see example below).
+
+ Each class is listed with a link to the class reference
+ page and a brief description based on the classes' \l
+ {brief}{\\brief} texts. For example:
+
+ \code
+ / *!
+ \group io
+
+ \title Input/Output and Networking
+
+ These classes are used to handle input and output to
+ and from external devices, processes, files etc. as
+ well as manipulating files and directories.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+
+ <h1>Input/Output and Networking</h1>
+
+ <p>These classes are used to handle input and output
+ to and from external devices, processes, files etc. as
+ well as manipulating files and directories.</p>
+
+ <p>
+ <table width="100%">
+ <tr valign="top" bgcolor="#e0e0e0">
+ <td><b>
+ <a href="http://qt.nokia.com/doc/4.0/qabstractsocket.html">QAbstractSocket</a>
+ </b></td>
+ <td>
+ The base functionality common to all socket types
+ </td></tr>
+
+ <tr valign="top" bgcolor="#e0e0e0">
+ <td><b>
+ <a href="http://qt.nokia.com/doc/4.0/qbuffer.html">QBuffer</a>
+ </b></td>
+ <td>
+ QIODevice interface for a QByteArray
+ </td></tr>
+
+ <tr valign="top" bgcolor="#e0e0e0">
+ <td><b>
+ <a href="http://qt.nokia.com/doc/4.0/qclipboard.html">QClipboard</a>
+ </b></td>
+ <td>
+ Access to the window system clipboard
+ </td></tr>
+ </table>
+ \endraw
+ \endquotation
+
+ in io.html.
+
+ Note that overviews related to the given group, must be
+ listed explicitly using the \l
+ {generatelist}{\\generatelist} command with the \c related
+ argument. For example:
+
+ \code
+ / *!
+ \group architecture
+
+ \title Architecture
+
+ These documents describe aspects of Qt's architecture
+ and design, including overviews of core Qt features and
+ technologies.
+
+ \generatelist{related}
+ * /
+ \endcode
+
+ See also \l {ingroup}{\\ingroup} and \l
+ {generatelist}{\\generatelist}.
+
+ \row
+ \o \bold \\headerfile \target headerfile
+ \o \bold {The \\headerfile command allows you to document
+ global functions, types and macros declared in a header file.}
+
+ The command follows \l {topical argument}{the general
+ topical command convention} for the argument, and the
+ generated HTML documentation for the specified header file
+ is put in <lower-case>\i{headerfilename}.html.
+
+ A function, type or macro can be associated with a
+ headerfile using the \l {relates}{\\relates} command.
+
+ If the referenced header file doesn't exist, the
+ \\headerfile command will still create a documentation page
+ for a header file with the referenced file's name.
+
+ For example:
+
+ \code
+ / *!
+ \headerfile <QtAlgorithms>
+
+ \title Generic Algorithms
+
+ \brief The <QtAlgorithms> header file provides
+ generic template-based algorithms.
+
+ Qt provides a number of global template functions in \c
+ <QtAlgorithms> that work on containers and perform
+ well-know algorithms.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <center><h1>&lt;QtAlgorithms&gt; -
+ Generic Algorithms</h1></center>
+ <p>The <QtAlgorithms> header file provides generic
+ template-based algorithms.
+ <a href="13-qdoc-commands-topical.html#header">More...</a>
+ </p>
+
+ <h3>Functions</h3>
+ <ul>
+ <li>RandomAccessIterator
+ <a href="http://qt.nokia.com/doc/4.0/qlineedit.html#EchoMode-enum">qBinaryFind</a></b>
+ (RandomAccessIterator begin, RandomAccessIterator end,
+ const T & value)</li>
+ <li>...</li></ul>
+ <hr />
+ \endraw
+
+ \target header
+
+ \raw HTML
+ <h2>Detailed Description</h2>
+ <p>The <QtAlgorithms> header file provides generic
+ template-based algorithms. </p>
+ \endraw
+
+ Qt provides a number of global template functions in \c
+ <QtAlgorithms> that work on containers and perform
+ well-know algorithms.
+
+ ...
+ \endquotation
+
+ in qtalgorithms.html.
+
+ \row
+ \o \bold \\macro \target macro
+ \o \bold {The \\macro command allows you to document a C++ macro.}
+
+ The command follows \l {topical argument}{the general
+ topical command convention} for the argument.
+
+ QDoc recognizes three different macro syntax: function-like
+ macros like Q_ASSERT(), declaration-style macros like
+ Q_PROPERTY() and macros without parentheses like Q_OBJECT.
+
+ The \\macro command must be followed by a \l
+ {relates}{\\relates} command which attaches the
+ documentation to that of a related class, header file. or
+ namespace. Otherwise the documentation will be lost.
+
+ For example:
+
+ \code
+ / *!
+ \macro void Q_ASSERT(bool test)
+ \relates <QtGlobal>
+
+ Prints a warning message containing the source code
+ file name and line number if \a test is false.
+
+ ...
+
+ \sa Q_ASSERT_X(), qFatal(), {Debugging Techniques}
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h3>void Q_ASSERT ( bool <i>test</i> )</h3>
+ \endraw
+
+ Prints a warning message containing the source code
+ file name and line number if \a test is false.
+
+ ...
+
+ See also Q_ASSERT_X(), qFatal() and \l {Debugging
+ Techniques}.
+ \endquotation
+
+ in qtglobal.html. And
+
+ \code
+ / *!
+ \macro Q_PROPERTY(...)
+ \relates QObject
+
+ This macro declares a QObject property. The syntax is:
+
+ ...
+
+ \sa {Qt's Property System}
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h3>Q_PROPERTY ( ... )</h3>
+ \endraw
+
+ This macro declares a QObject property. The syntax is:
+
+ ...
+
+ See also \l {Qt's Property System}.
+ \endquotation
+
+ in qobject.html. And
+
+ \code
+ / *!
+ \macro Q_OBJECT
+ \relates QObject
+
+ The Q_OBJECT macro must appear in the private section
+ of a class definition that declares its own signals and
+ slots or that uses other services provided by Qt's
+ meta-object system.
+
+ ...
+
+ \sa {Meta-Object System}, {Signals and Slots}, {Qt's
+ Property System}
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h3>Q_OBJECT</h3>
+ \endraw
+
+ The Q_OBJECT macro must appear in the private section
+ of a class definition that declares its own signals and
+ slots or that uses other services provided by Qt's
+ meta-object system.
+
+ ...
+
+ See also \l {Meta-Object System}, \l {Signals and
+ Slots} and \l {Qt's Property System}.
+ \endquotation
+
+ in qobject.html.
+
+ \row
+ \o \bold \\module \target module
+ \o \bold {The \\module creates a separate page that lists the
+ classes belonging to the module specified by the command's
+ argument.}
+
+ The command follows \l {topical argument}{the general
+ topical command convention} for the argument.
+
+ A class can be related to a module using the \l
+ {inmodule}{\\inmodule} command.
+
+ The \\module command is typically followed by the \l
+ {title}{\\title} and \l {brief}{\\brief} commands. Each
+ class is listed with a link to the class reference page and
+ a brief description based on the classes' \l
+ {brief}{\\brief} texts.
+
+ For example:
+
+ \code
+ / *!
+ \module QtNetwork
+
+ \title QtNetwork Module
+
+ \brief The QtNetwork module offers classes that allow
+ you to write TCP/IP clients and servers.
+
+ The network module provides classes to make network
+ programming easier and portable. It offers both
+ high-level classes such as QHttp and QFtp that
+ implement specific application-level protocols, and
+ lower-level classes such as QTcpSocket, QTcpServer, and
+ QUdpSocket.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h1><center>QtNetwork Module</center></h1>
+ \endraw
+
+ The QtNetwork module offers classes that allow you to
+ write TCP/IP clients and servers.\l {module
+ details}{More...}
+
+ \raw HTML
+ <p>
+ <table width="100%">
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td><b>
+ <a href="http://qt.nokia.com/doc/4.0/qabstractsocket.html">QAbstractSocket</a>
+ </b></td>
+ <td>
+ The base functionality common to all socket types
+ </td></tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td><b>
+ <a href="http://qt.nokia.com/doc/4.0/qftp.html">QFtp</a>
+ </b></td>
+ <td>
+ Implementation of the FTP protocol
+ </td></tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>...</td>
+ <td>...</td>
+ </tr>
+ </table>
+
+ <p><hr /></p>
+ \endraw
+
+ \target module details
+
+ \raw HTML
+ <h2>Detailed Description</h2>
+
+ <p>
+ The QtNetwork module offers classes that allow you to
+ write TCP/IP clients and servers.
+ </p>
+
+ <p>
+ The network module provides classes to make network
+ programming easier and portable. It offers both
+ high-level classes such as QHttp and QFtp that
+ implement specific application-level protocols, and
+ lower-level classes such as QTcpSocket, QTcpServer, and
+ QUdpSocket.
+ </p>
+ \endraw
+
+ ...
+
+ \endquotation
+
+ in qtnetwork.html.
+
+ See also \l {inmodule}{\\inmodule}
+
+ \row
+ \o \bold \\namespace \target namespace
+ \o \bold {The \\namespace command allows you to document a C++
+ namespace.}
+
+ The command follows \l {topical argument}{the general
+ topical command convention} for the argument.
+
+ QDoc will generate the same additional links and
+ documentation for all the members of the namespace as it
+ does for \l {framework}{classes}. The documentation for
+ the specified namespace is put in <lower-case>\i
+ {namespace}.html.
+
+ For example:
+
+ \code
+ / *!
+ \namespace Qt
+
+ \brief The Qt namespace contains miscellaneous
+ identifiers used throughout the Qt library.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <center><h1>Qt Namespace Reference</h1></center>
+ <p>The Qt namespace contains miscellaneous
+ identifiers used throughout the Qt library.
+ <a href="13-qdoc-commands-topical.html#name">More...</a>
+ </p>
+
+ <pre>#include &lt;Qt&gt;</pre>
+ <ul>
+ <li>
+ <a href="http://qt.nokia.com/doc/4.0/qt-qt3.html">
+ Qt 3 support members</a></li>
+ </ul>
+
+
+ <h3>Types</h3>
+ <ul>
+ <li>flags
+ <a href="http://qt.nokia.com/doc/4.0/qt.html#AlignmentFlag-enum">Alignment</a></b></li>
+ <li>...</li></ul>
+ <hr />
+ \endraw
+
+ \target name
+
+ \raw HTML
+ <h2>Detailed Description</h2>
+ <p>The Qt namespace contains miscellaneous identifiers
+ used throughout the Qt library.</p>
+ \endraw
+
+ ...
+ \endquotation
+
+ in qt.html.
+
+ \row
+ \o \bold \\page \target page
+ \o \bold {The \\page command allows you to create a stand-alone
+ documentation page.}
+
+ The command follows \l {topical argument}{the general
+ topical command convention} for the argument.
+
+ The page's title can be set using the \l {title}{\\title}
+ command. For example:
+
+ \code
+ / *!
+ \page aboutqt.html
+
+ \title About Qt
+
+ Qt by Trolltech is a C++ toolkit for cross-platform GUI
+ application development. Qt provides single-source
+ portability across Microsoft Windows, Mac OS X, Linux,
+ and all major commercial Unix variants. (A version of
+ Qt 4 for embedded Linux will be available in
+ August/September 2005.)
+
+ Qt provides application developers with all the
+ functionality needed to build applications with
+ state-of-the-art graphical user interfaces. Qt is fully
+ object-oriented, easily extensible, and allows true
+ component programming.
+
+ ...
+ * /
+ \endcode
+
+ will be rendered in its own HTML file: \l{About Qt}.
+
+ \row
+ \o \bold {\\externalpage} \target externalpage
+ \o \bold {The \\externalpage command gives a title to
+ an external URL.}
+
+ The command follows \l {topical argument}{the general
+ topical command convention} for the argument.
+
+ For example:
+
+ \code
+ / *!
+ \externalpage http://www.trolltech.com/products/embedded/index.html
+ \title Qtopia Core
+ * /
+ \endcode
+
+ The QDoc comment above allows you to link to the Qtopia
+ Core webpage by simply linking to the given title. For
+ example:
+
+ \code
+ / *!
+ The broad scope of the \l {Qtopia Core} API enables it to
+ be used across a wide variety of development projects.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ The broad scope of the \l
+ {http://www.trolltech.com/products/embedded/index.html}{Qtopia
+ Core} API enables it to be used across a wide variety
+ of development projects.
+ \endquotation
+
+ To achieve the same result without using the
+ \\externalpage command, you would have to hard code the
+ adress into your documentation:
+
+ \code
+ / *!
+ The broad scope of the \l
+ {http://www.trolltech.com/products/embedded/index.html}{Qtopia
+ Core} API enables it to be used across a wide variety
+ of development projects.
+ * /
+ \endcode
+
+ The \\externalpage command makes it easier to maintain the
+ documentation. If the adress changes, you only need to change the
+ argument of the \\externalpage command.
+
+ \row
+ \o \bold \\property \target property
+ \o \bold {The \\property command allows you to document a Qt
+ property.}
+
+ The command follows \l {topical argument}{the general
+ topical command convention} for the argument.
+
+ A property is defined using the Q_PROPERTY() macro. The
+ macro takes as arguments the property's name and its set,
+ reset and get functions. For example:
+
+ \code
+ Q_PROPERTY(QString state READ state WRITE setState)
+ \endcode
+
+ The set, reset and get functions don't need to be
+ documented, documenting the property is sufficient. QDoc
+ will generate a list of the access function that will
+ appear in the property documentation which in turn will be
+ located in the documentation of the class that defines the
+ property.
+
+ The \\property command is typically accompanied with a \l
+ {brief}{\\brief} command. In the case of a property, the
+ \l {brief}{\\brief} command's argument is a sentence
+ fragment that will be included in a one-sentence
+ description of the property generated by QDoc. The command
+ follows the same rules for the \l {brief
+ property}{description} as the \l {variable}{\\variable}
+ command.
+
+ For example:
+
+ \code
+ / *!
+ \property QPushButton::flat
+ \brief whether the border is disabled
+
+ This property's default is false.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h3>flat : bool</h3>
+ \endraw
+
+ This property holds whether the border is disabled.
+
+ This property's default is false.
+
+ Access functions:
+
+ \list
+ \o \bold { bool isFlat () const}
+ \o \bold { void setFlat ( bool )}
+ \endlist
+
+ \endquotation
+
+ in qpushbutton.html. And
+
+ \code
+ / *!
+ \property QWidget::width
+ \brief the width of the widget excluding any window frame
+
+ See the \l {Window Geometry} documentation for an
+ overview of window geometry.
+
+ \sa geometry, height, size
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h3>width : const int</h3>
+ \endraw
+
+ This property holds the width of the widget excluding
+ any window frame.
+
+ See the \l {Window Geometry} documentation for an
+ overview of window geometry.
+
+ Access functions:
+
+ \list
+ \o \bold { int width () const}
+ \endlist
+
+ See also \l{QWidget::geometry}{geometry},
+ \l{QWidget::height}{height}, and \l{QWidget::size}{size}.
+ \endquotation
+
+ in qwidget.html.
+
+ \row
+ \o \bold \\service \target service
+
+ \o \bold {The \\service command tells QDoc that a class is a
+ service class and specifies its alias, i.e. the associated
+ service's name.}
+
+ The command takes two arguments, the service class's name
+ and the associated alias. For example:
+
+ \code
+ / *!
+ \service TimeService Time
+ ...
+ * /
+ class TimeService : public QCopObjectService
+ {
+ ...
+ }
+ \endcode
+
+ See also \l {class}{\\class} and \l
+ {generatelist}{\\generatelist}.
+
+ \row
+ \o \bold \\typedef \target typedef
+ \o \bold {The \\typedef command allows you to document a C++ type
+ definition.}
+
+ The command follows \l {topical argument}{the general
+ topical command convention} for the argument.
+
+ The documentation will be located in the associated class,
+ header file or namespace documentation. When documenting a
+ global type definition, the \\typedef command must be
+ accompanied with a \l {relates}{\\relates} command. For
+ example:
+
+ \code
+ / *!
+ \typedef QObjectList
+ \relates QObject
+
+ Synonym for QList<QObject>.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h3>typedef QObjectList</h3>
+ \endraw
+
+ Synonym for QList<QObject>.
+ \endquotation
+
+ in qobject.html. Another, although more rare, example is
+
+ \code
+ / *!
+ \typedef QMsgHandler
+ \relates QtGlobal
+
+ This is a typedef for a pointer to a function with the
+ following signature:
+
+ \code
+ void myMsgHandler(QtMsgType, const char *);
+ \ endcode
+
+ \sa QtMsgType, qInstallMsgHandler()
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h3>typedef QtMsgHandler</h3>
+ \endraw
+
+ This is a typedef for a pointer to a function with the
+ following signature:
+
+ \raw HTML
+ <tt>
+ <pre> void myMsgHandler(QtMsgType, const char *);</pre>
+ </tt>
+ \endraw
+
+ See also QtMsgType and qInstallMsgHandler().
+
+ \endquotation
+
+ in qtglobal.html. Other type definitions are located in the
+ documentation of the class that defines it, for example:
+
+ \code
+ / *!
+ \typedef QLinkedList::Iterator
+
+ Qt-style synonym for QList::iterator.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h3>typedef QLinkedList::Iterator</h3>
+ \endraw
+
+ Qt-style synonym for QList::iterator.
+ \endquotation
+
+ in qlinkedlist.html.
+
+ \row
+ \o \bold \\variable \target variable
+ \o \bold {The \\variable command allows you to document a
+ member variable or a constant.}
+
+ The command follows \l {topical argument}{the general
+ topical command convention} for the argument.
+
+ The \\variable command is typically followed by a \l
+ {brief}{\\brief} command; QDoc will generate the
+ documentation for the variable based on the brief
+ description. The command follows the same rules for the \l
+ {brief property}{description} as the \l
+ {property}{\\property} command.
+
+ The documentation will be located in the in the associated
+ class, header file or namespace documentation.
+
+ In case of a member variable:
+
+ \code
+ / *!
+ \variable QStyleOption::palette
+ \brief the palette that should be used when painting
+ the control
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h3>
+ <a href="http://qt.nokia.com/doc/4.0/qpalette.html">
+ QPalette
+ </a>
+ QStyleOption::palette
+ </h3>
+ \endraw
+
+ This variable holds the palette that should be used
+ when painting the control.
+ \endquotation
+
+ in qstyleoption.html.
+
+ But you can also use the \\variable command to document
+ constants like for example the \c Type and \c UserType
+ constants in the QTreeWidgetItem class:
+
+ \code
+ enum { Type = 0, UserType = 1000 };
+ \endcode
+
+ Then
+
+ \code
+ / *!
+ \variable QTreeWidgetItem::Type
+
+ The default type for tree widget items.
+
+ \sa UserType, type()
+ * /
+ \endcode
+
+ and
+
+ \code
+ / *!
+ \variable QTreeWidgetItem::UserType
+
+ The minimum value for custom types. Values below
+ UserType are reserved by Qt.
+
+ \sa Type, type()
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h3>
+ const int QTreeWidgetItem::Type
+ </h3>
+ \endraw
+
+ The default type for tree widget items.
+
+ See also \l {QTreeWidgetItem::UserType}{UserType} and
+ \l {QTreeWidgetItem::type()}{type()}.
+
+ \raw HTML
+ <h3>
+ const int QTreeWidgetItem::UserType
+ </h3>
+ \endraw
+
+ The minimum value for custom types. Values below
+ UserType are reserved by Qt.
+
+ See also \l {QTreeWidgetItem::Type}{Type} and
+ \l{QTreeWidgetItem::type()}{type()}.
+
+ \endquotation
+
+ in qtreewidget.html.
+ \endtable
+*/
+
+/*!
+ \page 14-qdoc-commands-contextualcommands.html
+ \previouspage Topical Commands
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage Navigation Commands
+
+ \title Contextual Commands
+
+ The contextual commands provide QDoc with information, that it
+ wouldn't figure out otherwise, about the documented object. For
+ example whether a class is thread-safe or not.
+
+ These commands can appear anywhere within a QDoc comment.
+
+ \section1 Alphabetical List
+
+ \l {16-qdoc-commands-status.html#compat}{\\compat},
+ \l {15-qdoc-commands-navigation.html#contentspage}{\\contentspage},
+ \l {15-qdoc-commands-navigation.html#indexpage}{\\indexpage},
+ \l {19-qdoc-commands-grouping.html#ingroup}{\\ingroup},
+ \l {19-qdoc-commands-grouping.html#inmodule}{\\inmodule},
+ \l {16-qdoc-commands-status.html#internal}{\\internal},
+ \l {19-qdoc-commands-grouping.html#mainclass}{\\mainclass},
+ \l {15-qdoc-commands-navigation.html#nextpage}{\\nextpage},
+ \l {17-qdoc-commands-thread.html#nonreentrant}{\\nonreentrant},
+ \l {16-qdoc-commands-status.html#obsolete}{\\obsolete},
+ \l {18-qdoc-commands-relating.html#overload}{\\overload},
+ \l {16-qdoc-commands-status.html#preliminary}{\\preliminary},
+ \l {15-qdoc-commands-navigation.html#previouspage}{\\previouspage},
+ \l {17-qdoc-commands-thread.html#reentrant}{\\reentrant},
+ \l {18-qdoc-commands-relating.html#reimp}{\\reimp},
+ \l {18-qdoc-commands-relating.html#relates}{\\relates},
+ \l {15-qdoc-commands-navigation.html#startpage}{\\startpage},
+ \l {17-qdoc-commands-thread.html#threadsafe}{\\threadsafe},
+ \l {20-qdoc-commands-title.html#title}{\\title}
+
+ \section1 Categories
+ \list
+ \o \l {Navigation Commands}
+ \o \l {Status Commands}
+ \o \l {Thread Support Commands}
+ \o \l {Relating Commands}
+ \o \l {Grouping Commands}
+ \o \l {Title Commands}
+ \endlist
+*/
+
+/*!
+ \page 15-qdoc-commands-navigation.html
+ \previouspage Contextual Commands
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage Status Commands
+
+ \title Navigation Commands
+
+ The navigation commands allow you to link the pages of a multipage
+ document together. They provide the components of a navigation bar
+ at the top and bottom of the document. They also provide browser
+ and search engine support.
+
+ \section1 Alphabetical List
+
+ \l {15-qdoc-commands-navigation.html#contentspage}{\\contentspage},
+ \l {15-qdoc-commands-navigation.html#indexpage}{\\indexpage},
+ \l {15-qdoc-commands-navigation.html#nextpage}{\\nextpage},
+ \l {15-qdoc-commands-navigation.html#previouspage}{\\previouspage},
+ \l {15-qdoc-commands-navigation.html#startpage}{\\startpage}
+
+ \section1 General Description
+
+ The QDoc comments below shows a typical example using the
+ navigation commands.
+
+ \code
+ / *!
+ \page basicqt.html
+ \contentspage {Basic Qt}{Contents}
+ \nextpage Getting Started
+
+ \indexpage Index
+ \startpage Basic Qt
+
+ \title Basic Qt
+
+ The Qt toolkit is a C++ class library and a set of tools for
+ building multiplatform GUI programs using a "write once,
+ compile anywhere approach".
+
+ Table of contents:
+
+ \list
+ \o \l {Getting Started}
+ \o \l {Creating Dialogs}
+ \o \l {Creating Main Windows}
+ \endlist
+ * /
+
+ / *!
+ \page gettingstarted.html
+ \previouspage Basic Qt
+ \contentspage {Basic Qt}{Contents}
+ \nextpage Creating Dialogs
+
+ \indexpage Index
+ \startpage Basic Qt
+
+ \title Getting Started
+
+ This chapter shows how to combine basic C++ with the
+ functionality provided by Qt to create a few small graphical
+ interface (GUI) applications.
+ * /
+
+ / *!
+ \page creatingdialogs.html
+ \previouspage Getting Started
+ \contentspage {Basic Qt}{Contents}
+
+ \indexpage Index
+ \startpage Basic Qt
+
+ \title Creating Dialogs
+
+ This chapter will teach you how to create dialog boxes using Qt.
+ * /
+
+ / *!
+ \page index.html
+
+ \indexpage Index
+ \startpage Basic Qt
+
+ \title Index
+
+ \list
+ \o \l {Basic Qt}
+ \o \l {Creating Dialogs}
+ \o \l {Getting Started}
+ \endlist
+ * /
+ \endcode
+
+ The second page of this multipage document, "Getting Started",
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <table border="0" cellpadding="0" cellspacing="5" width="100%">
+
+ <tr>
+ <p>
+ [Previous: <a href="15-qdoc-commands-navigation.html#deadlink">
+ Basic Qt</a>]
+ [<a href="15-qdoc-commands-navigation.html#deadlink">Contents</a>]
+ [Next: <a href="15-qdoc-commands-navigation.html#deadlink">
+ Creating Dialogs</a>]
+ </p>
+
+ <h1 align="center">Getting Started<br /></h1>
+
+ <p>
+ This chapter shows how to combine basic C++ with the
+ functionality provided by Qt to create a few small graphical
+ interface (GUI) applications.
+ </p>
+
+ <p>
+ [Previous: <a href="15-qdoc-commands-navigation.html#deadlink">
+ Basic Qt</a>]
+ [<a href="15-qdoc-commands-navigation.html#deadlink">Contents</a>]
+ [Next: <a href="15-qdoc-commands-navigation.html#deadlink">
+ Creating Dialogs</a>]
+ </p>
+
+ </table>
+ \endraw
+ \endquotation
+
+ in creatingdialogs.html.
+
+ In addition, the \l {indexpage}{\\indexpage} and \l
+ {startpage}{\\startpage} commands specifies links to the page's
+ index page and start page. These links are used by browsers and
+ search engines.
+
+ The index page is typically an alphabetical list of the document's
+ titles and topics, while the start page is the page considered by
+ the author to be the starting point of a multipage document.
+
+ The links are included in the generated HTML source code but has
+ no visual effect on the documentation:
+
+ \code
+ <head>
+ ...
+ <link rel="index" href="index.html" />
+ <link rel="start" href="basicqt.html" />
+ ...
+ </head>
+ \endcode
+
+ \section1 Command Descriptions
+
+ \table
+ \header
+ \o Command
+ \o Description
+
+ \row
+ \o \bold \\previouspage \target previouspage
+ \o \bold {The \\previouspage command links the current page
+ to the previous one in an ordered series of documents}.
+
+ The command has two arguments, each enclosed by curly
+ braces: The first is the link target, i.e. the title of the
+ previous page, the second is the link text. If the page's
+ title is equivalent to the link text, the second argument
+ can be omitted.
+
+ The command must stand alone on its own line.
+
+ In the end, the link is rendered at the top and bottom of
+ the current page. For an example, see the \l {General
+ Description} section.
+
+ \row
+ \o \bold \\nextpage \target nextpage
+ \o \bold {The \\nextpage command links the current
+ page to the next page in an ordered series of documents}.
+
+ The command follows the same syntax and argument convention
+ as the \l {previouspage}{\\previouspage} command.
+
+ For an example, see the \l {General Description} section.
+
+ \row
+ \o \bold \\startpage \target startpage
+ \o \bold {The \\startpage command specifies the first document
+ in a collection of documents.}
+
+ The command must stand alone on its own line, and its
+ unique argument is the title of the first document.
+
+ QDoc will generate a link to the specified document which
+ is included in the HTML file but has no visual effect on
+ the documentation. The generated link type tells browsers
+ and search engines which document is considered by the
+ author to be the starting point of the collection.
+
+ For an example, see the \l {General Description} section.
+
+ \row
+ \o \bold \\contentspage \target contentspage
+ \o \bold {The \\contentspage command links the current
+ page to a contents page}.
+
+ The command follows the same syntax and argument convention
+ as the \l {previouspage}{\\previouspage} command.
+
+ For an example, see the \l {General Description} section.
+
+ \row
+ \o \bold \\indexpage \target indexpage
+ \o \bold {The \\indexpage command specifies a document providing
+ an index for the current document}.
+
+ The command must stand alone on its own line, and its
+ unique argument is the title of the index document.
+
+ QDoc will generate a link to the specified document which
+ is included in the HTML file but has no visual effect on
+ the documentation. The generated link type tells browsers
+ and search engines which document is considered by the
+ author to be the index page for the current document.
+
+ For an example, see the \l {General Description} section.
+
+ \endtable
+*/
+
+/*!
+ \page 16-qdoc-commands-status.html
+ \previouspage Navigation Commands
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage Thread Support Commands
+
+ \title Status Commands
+
+ The usage commands can indicate whether a documented object is
+ under development, becoming obsolete, provided for compatibility
+ reasons or simply not part of the public interface. They can
+ describe the history of minor versions. And they can also describe
+ a documented object's ability to handle multithreaded programming.
+
+ \section1 Alphabetical List
+
+ \l {16-qdoc-commands-status.html#compat}{\\compat},
+ \l {16-qdoc-commands-status.html#internal}{\\internal},
+ \l {16-qdoc-commands-status.html#obsolete}{\\obsolete},
+ \l {16-qdoc-commands-status.html#preliminary}{\\preliminary},
+ \l {16-qdoc-commands-status.html#since}{\\since}
+
+ \section1 Command Description
+
+ \table
+ \header
+ \o Command
+ \o Description
+
+ \row
+ \o \bold \\preliminary \target preliminary
+ \o \bold {The \\preliminary command indicates that the
+ referenced function is under development.}
+
+ The command must stand on its own line.
+
+ The \\preliminary command expands to a notification in the
+ function documentation, and marks the function as
+ preliminary when it appears in lists. For example:
+
+ \code
+ / *!
+ \preliminary
+
+ Returns information about the joining properties of the
+ character (needed for certain languages such as
+ Arabic).
+ * /
+ QChar::Joining QChar::joining() const
+ {
+ return ::joining(*this);
+ }
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h3>
+ <a href="http://qt.nokia.com/doc/4.0/qchar.html#Joining-enum">Joining</a>
+ QChar::joining () const</h3>
+ \endraw
+
+ \bold {This function is under development and
+ is subject to change.}
+
+ Returns information about the joining properties of the
+ character (needed for certain languages such as
+ Arabic).
+ \endquotation
+
+ And the function's entry in QChar's list of functions will
+ be rendered as
+
+ \quotation
+ \list
+ \o ...
+ \o Joining
+ \l {http://qt.nokia.com/doc/4.0/qchar.html#Joining-enum}
+ {joining}()
+ const \c (preliminary)
+ \o ...
+ \endlist
+ \endquotation
+
+ \row
+ \o \bold \\obsolete \target obsolete
+ \o \bold {The \\obsolete command indicates that the referenced
+ function no longer should be used in new code;
+ there is no guarantee for how long it will remain in
+ the library.}
+
+ The command must stand on its own line.
+
+ When generating the reference documentation for a class,
+ QDoc will create and link to a separate page documenting
+ its obsolete functions. Usually an equivalent function is
+ provided as an alternative.
+
+ For example:
+
+ \code
+ / *!
+ \fn MyClass::MyObsoleteFunction
+ \obsolete
+
+ Use MyNewFunction() instead.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h1>Obsolete Members for MyClass</h1>
+ \endraw
+
+ \bold {The following class members are obsolete.} They
+ are provided to keep old source code working. We
+ strongly advise against using them in new code.
+
+ ...
+
+ \list
+ \o void MyObsoleteFunction() \c (obsolete)
+ \o ...
+ \endlist
+
+ \raw HTML
+ <hr />
+ <h2>Member Function Documentation</h2>
+ <h3>void MyObsoleteFunction ()</h3>
+ <p>Use MyNewFunction() instead.</p>
+ \endraw
+
+ ...
+ \endquotation
+
+ in myclass-obsolete.html
+
+
+ \row
+ \o \bold \\compat \target compat
+ \o \bold {The \\compat command indicates that the referenced class
+ or function is part of the support library provided to keep
+ old source code working.}
+
+ The command must stand on its own line.
+
+ Usually an equivalent function or class is provided as an
+ alternative.
+
+ If the command is used within the documentation of a class,
+ the command expands to a warning that the referenced class
+ is part of the support library. The warning is located on
+ top of the associated documentation. For example:
+
+ \code
+ / *!
+ \class MyQt3SupportClass
+ \compat
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \bold {This class is part of the Qt 3 support
+ library.} It is provided to keep old source code
+ working. We strongly advise against using it in new
+ code. See the \l
+ {http://qt.nokia.com/doc/4.0/porting4.html}{Porting
+ Guide} for more information.
+ \endquotation
+
+ on the top of the MyQt3SupportClass class reference.
+
+ If the command is used when documenting a function, QDoc
+ will create and link to a separate page documenting Qt 3
+ support members when generating the reference documentation
+ for the associated class. For example:
+
+ \code
+ / *!
+ \fn MyClass::MyQt3SupportMemberFunction
+ \compat
+
+ Use MyNewFunction() instead.
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h1>Qt 3 Support Members for MyClass</h1>
+ \endraw
+
+ \bold {The following class members are part of the Qt
+ 3 support layer.} They are provided to help you port
+ old code to Qt 4. We advise against using them in new
+ code.
+
+ ...
+
+ \list
+ \o void MyQt3SupportMemberFunction()
+ \o ...
+ \endlist
+
+ \raw HTML
+ <hr />
+ <h2>Member Function Documentation</h2>
+ <h3>void MyQt3SupportMemberFunction ()</h3>
+ <p>Use MyNewFunction() instead.</p>
+ \endraw
+
+ ...
+ \endquotation
+
+ in myclass-qt3.html
+
+
+ \row
+ \o \bold \\internal \target internal
+ \o \bold {The \\internal command indicates that the referenced
+ function is not part of the public interface.}
+
+ The command must stand on its own line.
+
+ QDoc ignores the documentation as well as the documented
+ item, when generating the associated class reference
+ documenation. For example:
+
+ \code
+ / *!
+ \internal
+
+ Tries to find the decimal separator. If it can't find
+ it and the thousand delimiter is != '.' it will try to
+ find a '.';
+ * /
+ int QDoubleSpinBoxPrivate::findDelimiter
+ (const QString &str, int index) const
+ {
+ int dotindex = str.indexOf(delimiter, index);
+ if (dotindex == -1 && thousand != dot && delimiter != dot)
+ dotindex = str.indexOf(dot, index);
+ return dotindex;
+ }
+ \endcode
+
+ in qspinbox.cpp, will not be rendered at all.
+
+ \row
+ \o \bold \\since \target since
+ \o \bold {The \\since command tells in which minor release
+ the associated functionality was added.}
+
+ For example:
+
+ \code
+ / *!
+ \since 4.1
+
+ Returns an icon for \a standardIcon.
+
+ ...
+
+ \sa standardIconImplementation(), standardPixmap()
+ * /
+ QIcon QStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const
+ {
+ }
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h3>QIcon QStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const</h3>
+ \endraw
+
+ This function was introduced in Qt version 4.1
+
+ Returns an icon for \a standardIcon.
+
+ ...
+
+ See also \l
+ {QStyle::standardIconImplementation()}{standardIconImplementation()}
+ and \l {QStyle::standardPixmap()}{standardPixmap()}.
+ \endquotation
+
+ QDoc generates the "Qt" reference from the \l
+ {25-qdoc-configuration-derivedprojects.html#project}{\c
+ project} configuration variable. For that reason this
+ reference will change according to the current
+ documentation project.
+
+ See also \l
+ {25-qdoc-configuration-derivedprojects.html#project}{\c
+ project}.
+
+ \endtable
+*/
+
+/*!
+ \page 17-qdoc-commands-thread.html
+ \previouspage Status Commands
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage Relating Commands
+
+ \title Thread Support Commands
+
+ The thread support commands specify the level of support for
+ multithreaded programming of a class or function.
+
+ \section1 Alphabetical List
+
+ \l {17-qdoc-commands-thread.html#nonreentrant}{\\nonreentrant},
+ \l {17-qdoc-commands-thread.html#reentrant}{\\reentrant},
+ \l {17-qdoc-commands-thread.html#threadsafe}{\\threadsafe}
+
+ \section1 General Description
+
+ There are three levels of support for multithreaded programming of
+ a class or function: \c threadsafe, \c reentrant and \c
+ nonreentrant.
+
+ The default is \c nonreentrant which means that the associated
+ class or function cannot be called by multiple threads. \c
+ Reentrant and \c threadsafe are levels primarily used for classes.
+
+ \c Reentrant means that all the functions in the referenced class
+ can be called simultaneously by multiple threads, provided that
+ each invocation of the functions reference unique data. While \c
+ threadsafe means that all the functions in the referenced class
+ can be called simultaneously by multiple threads even when each
+ invocation references shared data.
+
+ When a class is declared \c reentrant or \c threadsafe, using the
+ \l {reentrant}{\\reentrant} and \l {threadsafe}{\\threadsafe}
+ commands respectively, functions in the referenced class can be
+ declared \c nonreentrant, using the \l
+ {nonreentrant}{\\nonreentrant} command, excluding the functions
+ from the general view.
+
+ For example:
+
+ \code
+ / *!
+ \class QLocale
+ \brief The QLocale class converts between numbers and their
+ string representations in various languages.
+
+ \reentrant
+ \ingroup i18n
+ \ingroup text
+ \mainclass
+
+ QLocale is initialized with a language/country pair in its
+ constructor and offers number-to-string and string-to-number
+ conversion functions similar to those in QString.
+
+ ...
+ * /
+
+ / *!
+ \nonreentrant
+
+ Sets the global default locale to \a locale. These values are
+ used when a QLocale object is constructed with no
+ arguments. If this function is not called, the system's locale
+ is used.
+
+ \warning In a multithreaded application, the default locale
+ should be set at application startup, before any non-GUI
+ threads are created.
+
+ \sa system() c()
+ * /
+ void QLocale::setDefault(const QLocale &locale)
+ {
+ default_d = locale.d;
+ }
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h1><center>QLocale Class Reference</center></h1>
+ \endraw
+
+ The QLocale class converts between numbers and their string
+ representations in various languages. More...
+
+ \code
+ #include <QLocale>
+ \endcode
+
+ \bold {Note:} All the functions in this class are \l
+ {threads.html#reentrant}{reentrant}, except \l
+ {QLocale::setDefault()}{setDefault()}.
+
+ ...
+
+ \raw HTML
+ <hr />
+ <h2>Member Type Documentation</h2>
+ \endraw
+
+ ...
+
+ \raw HTML
+ <h3>void QLocale::setDefault ( const QLocale & locale ) </h3>
+ \endraw
+
+ Sets the global default locale to locale. These values are
+ used when a QLocale object is constructed with no
+ arguments. If this function is not called, the system's locale
+ is used.
+
+ \warning In a multithreaded application, the default locale
+ should be set at application startup, before any non-GUI
+ threads are created.
+
+ \warning This function is not reentrant.
+
+ See also \l {QLocale::system()}{system()} and \l
+ {QLocale::c()}{c()}.
+
+ ...
+ \endquotation
+
+ As shown above, QDoc generates a notification when a class is
+ declared reentrant, and lists the exceptions (the declared
+ nonreentrant functions). A link to the general documentation on \l
+ {threads.html#reentrant}{reentrancy and thread-safety} is
+ included. In addition a warning, "\bold Warning: This function is
+ not reentrant.", is generated in the nonreentrant functions'
+ documentation.
+
+ QDoc will generate the same notification and warnings when a class
+ is declared threadsafe.
+
+ For more information see the general documentation on \l
+ {threads.html#reentrant}{reentrancy and thread-safety}.
+
+ \section1 Command Descriptions
+
+ \table
+ \header
+ \o Command
+ \o Description
+
+ \row
+ \o \bold \\threadsafe \target threadsafe
+ \o \bold {The \\threadsafe command indicates that the
+ associated class or function can be called simultaneously by
+ multiple threads even when each invocation references
+ shared data.}
+
+ The command must stand on its own line.
+
+ The generated documentation resulting from using the
+ \\threadsafe command is similar to the result of using the
+ \l {reentrant}{\\reentrant} command. For an example, see
+ the \l {General Description} section.
+
+ See also \l{reentrant}{\\reentrant} and
+ \l{nonreentrant}{\\nonreentrant}.
+
+ \row
+ \o \bold \\reentrant \target reentrant
+ \o \bold {The \\reentrant command indicates that the associated
+ class or function can be called simultaneously
+ by multiple threads, provided that each invocation of the
+ functions reference unique data.}
+
+ The command must stand on its own line.
+
+ For an example, see the \l {General Description} section.
+
+ See also \l{nonreentrant}{\\nonreentrant} and
+ \l{threadsafe}{\\threadsafe}.
+
+ \row
+ \o \bold \\nonreentrant \target nonreentrant
+ \o \bold {The \\nonreentrant command indicates that the
+ associated class or function cannot be called by
+ multiple threads.}
+
+ The command must stand on its own line.
+
+ For an example, see the \l {General Description} section.
+
+ See also \l{reentrant}{\\reentrant} and
+ \l{threadsafe}{\\threadsafe}.
+
+ \endtable
+*/
+
+/*!
+ \page 18-qdoc-commands-relating.html
+ \previouspage Thread Support Commands
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage Grouping Commands
+
+ \title Relating Commands
+
+ The relation commands discribe how the documented object relates
+ to its context: Whether it is an overloaded function, a
+ reimplemented function or a global function related to a specified
+ class or header file.
+
+ \section1 Alphabetical List
+
+ \l {18-qdoc-commands-relating.html#overload}{\\overload},
+ \l {18-qdoc-commands-relating.html#reimp}{\\reimp},
+ \l {18-qdoc-commands-relating.html#relates}{\\relates},
+
+ \section1 Command Descriptions
+
+ \table
+ \header
+ \o Command
+ \o Description
+
+ \row
+ \o \bold \\overload \target overload
+ \o \bold {The \\overload command indicates that the
+ function is a secondary overload of its name.}
+
+ The command must stand on its own line.
+
+ For any overloaded function (except constructors), QDoc
+ expects one primary version of the function and all the
+ the overloads marked with the \bold{\\overload command}.
+ The primary version should be fully documented. Each
+ overload can have whatever extra documentation you want
+ to add for just that overload.
+
+ From Qt 4.5, you can include the function name plus '()'
+ as a parameter to the \bold{\\overload} command, which
+ will include a standard \i{This function overloads...}
+ line of text with a link to the documentation for the
+ primary version of the function.
+
+ For example:
+
+ \code
+ / *!
+ \overload addAction()
+
+ This convenience function creates a new action with an
+ \a icon and some \a text. The function adds the newly
+ created action to the menu's list of actions, and
+ returns it.
+
+ \sa QWidget::addAction()
+ * /
+ QAction *QMenu::addAction(const QIcon &icon, const QString &text)
+ {
+ QAction *ret = new QAction(icon, text, this);
+ addAction(ret);
+ return ret;
+ }
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h3><a href="http://qt.nokia.com/doc/4.0/qaction.html">QAction</a>
+ * QMenu::addAction ( const QIcon & <i>icon</i>,
+ const QString & <i>text</i> )
+ </h3>
+ \endraw
+
+ This function overloads \l {http://qt.nokia.com/doc/4.0/qwidget.html#addAction}{addAction()}
+
+ This convenience function creates a new action with an
+ \i icon and some \i text. The function adds the newly
+ created action to the menu's list of actions, and
+ returns it.
+
+ See also
+ \l {http://qt.nokia.com/doc/4.0/qwidget.html#addAction}
+ {QWidget::addAction}().
+ \endquotation
+
+ If you don't include the function name with the
+ \bold{\\overlaod} command, then instead of the "This
+ function overloads..." line with the link to the
+ documentation for the primary version, you get the old
+ standard line:
+
+ \quotation
+ This is an overloaded member function, provided for
+ convenience.
+ \endquotation.
+
+ \row
+ \o \bold \\reimp \target reimp
+ \o \bold {The \\reimp command indicates that the
+ referenced function is a reimplementation of a virtual function,
+ where the reimplementation has no effect on the interface.}
+
+ The command must stand on its own line.
+
+ QDoc will omit the reimplemented function from the class
+ reference. For example:
+
+ \code
+ / *!
+ \reimp
+ * /
+ void QToolButton::nextCheckState()
+ {
+ Q_D(QToolButton);
+ if (!d->defaultAction)
+ QAbstractButton::nextCheckState();
+ else
+ d->defaultAction->trigger();
+ }
+ \endcode
+
+ will not be rendered at all; only a link to the inherited
+ QAbstractButton::nextCheckState() will appear in the
+ documentation.
+
+ \row
+ \o \bold \\relates \target relates
+ \o \bold {The \\relates command attaches the documentation of
+ a global function to that of a related class or header file.}
+
+ The command's argument is a class name, an the command (and
+ its argument) must stand on its own line.
+
+ \code
+ / *!
+ \relates QChar
+
+ Reads a char from the stream \a in into char \a chr.
+
+ \sa {Format of the QDataStream operators}
+ * /
+ QDataStream &operator>>(QDataStream &in, QChar &chr)
+ {
+ quint16 u;
+ in >> u;
+ chr.unicode() = ushort(u);
+ return in;
+ }
+ \endcode
+
+ will be rendered with the QChar documentation.
+
+ \endtable
+*/
+
+/*!
+ \page 19-qdoc-commands-grouping.html
+ \previouspage Relating Commands
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage Title Commands
+
+ \title Grouping Commands
+
+ The grouping commands relate classes to defined groups and
+ modules. The groups are used when generating lists of related
+ classes in the documentation, while the modules are elements of
+ Qt's structure.
+
+ \section1 Alphabetical List
+
+ \l {19-qdoc-commands-grouping.html#ingroup}{\\ingroup},
+ \l {19-qdoc-commands-grouping.html#inmodule}{\\inmodule},
+ \l {19-qdoc-commands-grouping.html#mainclass}{\\mainclass},
+
+ \section1 Command Descriptions
+
+ \table
+ \header
+ \o Command
+ \o Description
+
+ \row
+ \o \bold \\mainclass \target mainclass
+ \o \bold {The \\mainclass command relates the documented class to
+ a group called mainclasses.}
+
+ The command must stand on its own line.
+
+ For example:
+
+ \code
+ / *!
+ \class QWidget qwidget.h
+ \brief The QWidget class is the base class of
+ all user interface objects.
+
+ \mainclass
+
+ ...
+ * /
+ \endcode
+
+ will ensure that the QWidget class is included in the \c
+ mainclasses group, which means, for example, that the class
+ will appear on the list created by calling the \l
+ {generatelist}{\\generatelist} command with the \c
+ mainclasses argument:
+
+ \l http://qt.nokia.com/doc/4.0/mainclasses.html
+
+ See also \l {generatelist}{\\generatelist}.
+
+ \row
+ \o \bold \\ingroup \target ingroup
+
+ \o \bold {The \\ingroup command indicates that the given
+ overview or documented class belongs to a certain group of
+ related docmentation.}
+
+ A class or overview may belong to many groups.
+
+ The \\ingroup command's argument is a group name, but note
+ that the command considers the rest of the line as part of
+ its argument. Make sure that the group name is followed by
+ a linebreak. For example:
+
+ \code
+ / *!
+ \class QDir
+ \brief The QDir class provides access to directory
+ structures and their contents.
+
+ \ingroup io
+ ...
+ * /
+ \endcode
+
+ will ensure that the QDir class is included in the \c io
+ group, which means, for example, that QDir will appear on
+ the list created by calling the \l {group}{\\group} command
+ with the \c io argument.
+
+ Note that to list overviews that are related to a given
+ group, you must generate the list exlicitly by using the \l
+ {generatelist}{\\generatelist} command with the \c related
+ argument.
+
+ See also \l {group}{\\group}.
+ \row
+ \o \bold \\inmodule \target inmodule
+ \o \bold {The \\inmodule command relates the documented class
+ to the module specified by the command's argument.}
+
+ For the basic classes in Qt, a class's module is determined
+ by its location, i.e. its directory. However, for
+ extensions, like ActiveQt and Qt Designer, a class needs to
+ be related to a module explicitly.
+
+ The command's argument is a module name, but note that the
+ command considers the rest of the line as part of its
+ argument. Make sure that the module name is followed by a
+ linebreak. For example:
+
+ \code
+ /*!
+ \class QDesignerTaskMenuExtension
+ \inmodule QtDesigner
+ * /
+ \endcode
+
+ will ensure that the QDesignerTaskMenuExtension class is
+ included in the \c QtDesigner module, which means, for
+ example, that the class will appear on the list created by
+ calling the \l {generatelist}{\\generatelist} command with
+ the \c {{classesbymodule QtDesigner}} argument.
+
+ See also \l {module}{\\module} and \l
+ {generatelist}{\\generatelist}.
+ \endtable
+*/
+
+/*!
+ \page 20-qdoc-commands-title.html
+ \previouspage Grouping Commands
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage QDoc Configuration
+
+ \title Title Commands
+
+ In general a title command considers everything that follows it
+ until the first line break as its argument. If the title needs to
+ be spanned over several lines, make sure to end each line (except
+ the last one) with a backslash.
+
+ \section1 Alphabetical List
+
+ \l {20-qdoc-commands-title.html#title}{\\title},
+ \l {20-qdoc-commands-title.html#subtitle}{\\subtitle}
+
+ \section1 Command Descriptions
+
+ \table
+ \header
+ \o Command
+ \o Description
+
+ \row
+ \o \bold \\title \target title
+ \o \bold {The \\title command sets the title for a
+ documentation page, or allows you to override it.}
+
+ For example:
+
+ \code
+ / *!
+ \page signalandslots.html
+
+ \title Signals and Slots
+
+ Signals and slots are used for communication between
+ objects. The signals and slots mechanism is a central
+ feature of Qt and probably the part that differs most
+ from the features provided by other frameworks.
+
+ ...
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h1><center>Signal and Slots</center></h1>
+ \endraw
+
+ Signals and slots are used for communication between
+ objects. The signals and slots mechanism is a central
+ feature of Qt and probably the part that differs most
+ from the features provided by other frameworks.
+
+ ...
+ \endquotation
+ See also \l {subtitle}{\\subtitle}.
+
+ \row
+ \o \bold \\subtitle \target subtitle
+ \o \bold {The \\subtitle command sets a subtitle for a
+ documentation page.}
+
+ For example:
+
+ \code
+ / *!
+ \page qtopiacore-overview.html
+
+ \title Qtopia Core
+ \subtitle Qt for Embedded Linux
+
+ Qt/Embedded, the embedded Linux port of Qt, is a
+ complete and self-contained C++ GUI and platform
+ development tool for Linux-based embedded development.
+
+ ...
+ * /
+ \endcode
+
+ will be rendered as
+
+ \quotation
+ \raw HTML
+ <h1><center>Qtopia Core</center></h1>
+ <h2><center>Qt for Embedded Linux</center></h2>
+ \endraw
+
+ Qt/Embedded, the embedded Linux port of Qt, is a
+ complete and self-contained C++ GUI and platform
+ development tool for Linux-based embedded development.
+
+ ...
+ \endquotation
+
+ See also \l {title}{\\title}.
+ \endtable
+*/
+
+/*!
+ \page 21-0-qdoc-configuration.html
+ \previouspage Title Commands
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage General Variables
+
+ \title QDoc Configuration
+
+ \tableofcontents
+
+ \list
+ \o \l {Supporting Derived Projects}
+ \o \l {QDoc Compatibility}
+ \endlist
+
+ When running QDoc to generate the documentation, you must specify
+ a configuration file on the command line:
+
+ \quotation
+ \bold {/currentdirectory$ qdoc3 my-documentation.qdocconf}
+ \endquotation
+
+ \section1 General Description
+
+ The configuration file is a list of entries of entries of the form
+ \i {"variable = value"}. Using the configuration variables, you
+ can define where QDoc should find the various source files, images
+ and examples, where to put generated documentation etc. The
+ configuration file can also contain directives like \c
+ include. For an example, see the \l minimum.qdocconf file.
+
+ In addition, you can use some particular configuration variables
+ to make QDoc support derived projects, i.e make the projects, for
+ example Qt Solutions, contain links to the online Qt
+ documentation. These variables are documented in the \l
+ {Supporting Derived projects} section. In this section you can
+ also find out how to use these variables to support your derived
+ projects.
+
+ If some of the variable keys have the same values, they can be set
+ at the same time. For example:
+
+ \code
+ {header, source}dirs = kernel
+ \endcode
+
+ is equivalent to
+
+ \code
+ headerdirs = kernel
+ sourcedirs = kernel
+ \endcode
+
+ A variable's value can be set using either '=' or '+='. The
+ difference is that '=' overrides any previously set value, while
+ '+=' only adds the value to the previously set ones.
+
+ In general, some of the variables accepts a list of strings as
+ their value, while others only accept a single string. If you
+ provide a variable of the latter type with several strings they
+ will simply be concatenated. The quotes around the value string
+ are optional. But applying them allows you to use special
+ characters like '=' and ' \" ' within the string. For example:
+
+ \code
+ HTML.postheader = "<a href=\"index.html\">Home</a>"
+ \endcode
+
+ If an entry spans many lines, use a backslash at the end of every
+ line but the last:
+
+ \code
+ sourcedirs = kernel \
+ tools \
+ widgets
+ \endcode
+
+ \section1 Configuration Variables
+
+ \section2 Alphabetical List
+
+ \l {22-qdoc-configuration-generalvariables.html#alias}{alias},
+ \l {23-qdoc-configuration-cppvariables.html#Cpp.ignoredirectives}
+ {Cpp.ignoredirectives},
+ \l {23-qdoc-configuration-cppvariables.html#Cpp.ignoretoken}
+ {Cpp.ignoretokens},
+ \l {22-qdoc-configuration-generalvariables.html#definesvariable}{defines},
+ \l {22-qdoc-configuration-generalvariables.html#edition}{edition},
+ \l {22-qdoc-configuration-generalvariables.html#exampledirs}{exampledirs},
+ \l {22-qdoc-configuration-generalvariables.html#examples}{examples},
+ \l {22-qdoc-configuration-generalvariables.html#examples.fileextensions}
+ {examples.fileextensions},
+ \l {22-qdoc-configuration-generalvariables.html#extraimages}{extraimages},
+ \l {22-qdoc-configuration-generalvariables.html#falsehoods}{falsehoods},
+ \l {22-qdoc-configuration-generalvariables.html#headerdirs}{headerdirs},
+ \l {22-qdoc-configuration-generalvariables.html#headers}{headers},
+ \l {22-qdoc-configuration-generalvariables.html#headers.fileextensions}
+ {headers.fileextensions},
+ \l {24-qdoc-configuration-htmlvariables.html#HTML.footer}{HTML.footer},
+ \l {24-qdoc-configuration-htmlvariables.html#HTML.postheader}
+ {HTML.postheader},
+ \l {24-qdoc-configuration-htmlvariables.html#HTML.style}{HTML.style},
+ \l {22-qdoc-configuration-generalvariables.html#imagedirs}{imagedirs},
+ \l {22-qdoc-configuration-generalvariables.html#images}{images},
+ \l {22-qdoc-configuration-generalvariables.html#images.fileextensions}
+ {images.fileextensions},
+ \l {22-qdoc-configuration-generalvariables.html#language}{language},
+ \l {22-qdoc-configuration-generalvariables.html#macro}{macro},
+ \l {22-qdoc-configuration-generalvariables.html#outputdir}{outputdir},
+ \l {22-qdoc-configuration-generalvariables.html#outputformats}
+ {outputformats},
+ \l {22-qdoc-configuration-generalvariables.html#slow}{slow},
+ \l {22-qdoc-configuration-generalvariables.html#sourcedirs}{sourcedirs},
+ \l {22-qdoc-configuration-generalvariables.html#sources}{sources},
+ \l {22-qdoc-configuration-generalvariables.html#sources.fileextensions}
+ {sources.fileextensions},
+ \l {22-qdoc-configuration-generalvariables.html#spurious}{spurious},
+ \l {22-qdoc-configuration-generalvariables.html#tabsize}{tabsize},
+ \l {22-qdoc-configuration-generalvariables.html#version}{version},
+ \l {22-qdoc-configuration-generalvariables.html#versionsym}{versionsym}
+
+ \section2 Categories
+
+ \list
+ \o \l {General Variables}
+ \o \l {C++ Specific Variables}
+ \o \l {HTML Specific Variables}
+ \endlist
+
+ \section1 Configuration File Examples
+
+ \list
+ \o A minimum configuration file: \l minimum.qdocconf
+ \o The Qt configuration file: \l qt.qdocconf
+ \endlist
+*/
+
+/*!
+ \page 21-1-minimum-qdocconf.html
+ \previouspage QDoc Configuration
+ \contentspage QDoc Manual - Table of Contents
+
+ \title minimum.qdocconf
+
+ \quotefile examples/minimum.qdocconf
+*/
+
+/*!
+ \page 21-2-qt-qdocconf.html
+ \previouspage QDoc Configuration
+ \contentspage QDoc Manual - Table of Contents
+
+ \title qt.qdocconf
+
+ \quotefile files/qt.qdocconf
+*/
+
+/*!
+ \page 22-qdoc-configuration-generalvariables.html
+ \previouspage QDoc Configuration
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage Creating Help Project Files
+
+ \title General Variables
+
+ With the general QDoc configuration variables, you can define
+ where QDoc will find the various source files it needs to generate
+ the documentation, as well as the directory to put the generated
+ documentation. You can also do some minor manipulation of QDoc
+ itself, controlling its output and processing behavior.
+
+ \section1 Alphabetical List
+
+ \l {22-qdoc-configuration-generalvariables.html#alias}{alias},
+ \l {22-qdoc-configuration-generalvariables.html#codeindent}{codeindent},
+ \l {22-qdoc-configuration-generalvariables.html#definesvariable}{defines},
+ \l {22-qdoc-configuration-generalvariables.html#edition}{edition},
+ \l {22-qdoc-configuration-generalvariables.html#exampledirs}{exampledirs},
+ \l {22-qdoc-configuration-generalvariables.html#examples}{examples},
+ \l {22-qdoc-configuration-generalvariables.html#examples.fileextensions}
+ {examples.fileextensions},
+ \l {22-qdoc-configuration-generalvariables.html#extraimages}{extraimages},
+ \l {22-qdoc-configuration-generalvariables.html#falsehoods}{falsehoods},
+ \l {22-qdoc-configuration-generalvariables.html#generateindex}{generateindex},
+ \l {22-qdoc-configuration-generalvariables.html#headerdirs}{headerdirs},
+ \l {22-qdoc-configuration-generalvariables.html#headers}{headers},
+ \l {22-qdoc-configuration-generalvariables.html#headers.fileextensions}
+ {headers.fileextensions},
+ \l {22-qdoc-configuration-generalvariables.html#imagedirs}{imagedirs},
+ \l {22-qdoc-configuration-generalvariables.html#images}{images},
+ \l {22-qdoc-configuration-generalvariables.html#images.fileextensions}
+ {images.fileextensions},
+ \l {22-qdoc-configuration-generalvariables.html#language}{language},
+ \l {22-qdoc-configuration-generalvariables.html#macro}{macro},
+ \l {22-qdoc-configuration-generalvariables.html#outputdir}{outputdir},
+ \l {22-qdoc-configuration-generalvariables.html#outputformats}
+ {outputformats},
+ \l {22-qdoc-configuration-generalvariables.html#slow}{slow},
+ \l {22-qdoc-configuration-generalvariables.html#sourcedirs}{sourcedirs},
+ \l {22-qdoc-configuration-generalvariables.html#sources}{sources},
+ \l {22-qdoc-configuration-generalvariables.html#sources.fileextensions}
+ {sources.fileextensions},
+ \l {22-qdoc-configuration-generalvariables.html#spurious}{spurious},
+ \l {22-qdoc-configuration-generalvariables.html#tabsize}{tabsize},
+ \l {22-qdoc-configuration-generalvariables.html#tagfile}{tagfile},
+ \l {22-qdoc-configuration-generalvariables.html#version}{version},
+ \l {22-qdoc-configuration-generalvariables.html#versionsym}{versionsym}
+
+ \section1 Variable Descriptions
+
+ \table
+
+ \header
+ \o Variable
+ \o Description
+
+ \row
+ \o \bold alias \target alias
+ \o \bold {The \c alias variable renames a QDoc command.}
+
+ The general syntax is \tt {alias.\i{original-command-name}
+ = \i temporary-command-name}.
+
+ For example:
+
+ \code
+ alias.i = e
+ \endcode
+
+ renames the built-in command \\i (italics) to \\e.
+
+ The \c alias variable is often used for compatibility
+ reasons; for more information see the \l {QDoc
+ Compatibility}{compatibility section}.
+
+ See also \l macro.
+
+ \row
+ \o \bold codeindent \target codeindent
+ \o \bold {The \c codeindent variable specifies the level of
+ indentation that QDoc uses when writing code snippets.}
+
+ QDoc originally used a hard-coded value of four spaces for
+ code indentation to ensure that code snippets could be easily
+ distinguished from surrounding text. Since we can use
+ \l{HTML Specific Variables#HTML.stylesheets}{stylesheets} to
+ adjust the appearance of certain types of HTML elements, this
+ level of indentation is not always required.
+
+ \row
+ \o \bold defines \target definesvariable
+ \o \bold {The \c defines variable specifies the C++ preprocessor
+ symbols that QDoc will recognize and respond to.}
+
+ When a preprocessor symbol is specified using the \c
+ defines variable, you can also use the \l {if}{\\if}
+ command to enclose documentation that only will be included
+ if the preprocessor symbol is defined.
+
+ The values of the variable are regular expressions (see
+ QRegExp for details). By default, no symbol is defined,
+ meaning that code protected with #ifdef...#endif will be
+ ignored.
+
+ For example:
+
+ \code
+ defines = Q_QDOC \
+ QT_.*_SUPPORT \
+ QT_.*_LIB \
+ QT_COMPAT \
+ QT3_SUPPORT \
+ Q_WS_.* \
+ Q_OS_.* \
+ Q_BYTE_ORDER \
+ __cplusplus
+ \endcode
+
+ ensures that QDoc will process the code that requires these
+ symbols to be defined. For example:
+
+ \code
+ #ifdef Q_WS_WIN
+ HDC getDC() const;
+ void releaseDC(HDC) const;
+ #endif
+ \endcode
+
+ Since the Q_WS_.* regular expression (specified using the
+ \c defines variable) matches Q_WS_WIN, QDoc will process
+ the code within #ifdef and #endif in our example.
+
+ You can also define preprocessor symbols manually on the
+ command line using the -D option. For example:
+
+ \code
+ currentdirectory$ qdoc3 -Dconsoleedition qt.qdocconf
+ \endcode
+
+ In this case the -D option ensures that the \c
+ consoleedition preprocessor symbol is defined when QDoc
+ processes the source files defined in the qt.qdocconf file.
+
+ See also \l falsehoods and \l {if}{\\if}.
+
+ \row
+ \o \bold edition \target edition
+ \o \bold {The \c edition variable specifies which modules are
+ included in each edition of a package, and provides QDoc
+ with information to provide class lists for each edition.}
+
+ This feature is mostly used when providing documentation
+ for Qt packages.
+
+ The \c edition variable is always used with a particular
+ edition name to define the modules for that edition:
+
+ \code
+ edition.Console = QtCore QtNetwork QtSql QtXml
+ edition.Desktop = QtCore QtGui QtNetwork QtOpenGL QtSql QtXml \
+ QtDesigner QtAssistant Qt3Support QAxContainer \
+ QAxServer
+ edition.DesktopLight = QtCore QtGui Qt3SupportLight
+ \endcode
+
+ In the above examples, the \c Console edition only includes
+ the contents of four modules. Only the classes from these
+ modules will be used when the
+ \l{Miscellaneous Commands#generatelist}{generatelist} command
+ is used to generate a list of classes for this edition:
+
+ \code
+ \generatelist{classesbyedition Console}
+ \endcode
+
+ \row
+ \o \bold exampledirs \target exampledirs
+ \o \bold {The \c exampledirs variable specifies the directories
+ containing the source code of the example files.}
+
+ The \l {examples}{\c examples} and \c exampledirs variables
+ are used by the \l {quotefromfile}{\\quotefromfile}, \l
+ {quotefile}{\\quotefile} and \l {example}{\\example}
+ commands. If both the \l {examples}{\c examples} and \c
+ exampledirs variables are defined, QDoc will search in
+ both, first in \l {examples}{\c examples} then in \c
+ exampledirs.
+
+ QDoc will search through the directories in the specified
+ order, and accept the first matching file it finds. It will
+ only search in the specified directories, \i not in
+ subdirectories.
+
+ For example:
+
+ \code
+ exampledirs = $QTDIR/doc/src \
+ $QTDIR/examples \
+ $QTDIR \
+ $QTDIR/qmake/examples
+
+ examples = $QTDIR/examples/widgets/analogclock/analogclock.cpp
+ \endcode
+
+ When processing
+
+ \code
+ \quotefromfile widgets/calculator/calculator.cpp
+ \endcode
+
+ QDoc will then see if there exists a file called \c
+ calculator.cpp listed as a value in the \l {examples}{\c
+ examples} variable. If it doesn't, it will search in the \c
+ exampledirs variable, and first see if there exists a file
+ called
+
+ \code
+ $QTDIR/doc/src/widgets/calculator/calculator.cpp
+ \endcode
+
+ If it doesn't, QDoc will continue looking for a file
+ called
+
+ \code
+ $QTDIR/examples/widgets/calculator/calculator.cpp
+ \endcode
+
+ and so forth.
+
+ See also \l examples.
+
+ \row
+ \o \bold examples \target examples
+ \o \bold {The \c examples variable allows you to specify individual
+ example files in addition to those located in the directories
+ specified by the \l {exampledirs}{\c exampledirs} variable.}
+
+ The \c examples and \l {exampledirs}{\c exampledirs}
+ variables are used by the \l
+ {quotefromfile}{\\quotefromfile}, \l
+ {quotefile}{\\quotefile} and \l {example}{\\example}
+ commands. If both the \c examples and \l {exampledirs}{\c
+ exampledirs} variables are defined, QDoc will search in
+ both, first in \c examples then in \l {exampledirs}{\c
+ exampledirs}.
+
+ QDoc will search through the values listed for the \c
+ examples variable, in the specified order, and accept
+ the first one it finds.
+
+ For an extensive example, see the \l {exampledirs}{\c
+ exampledirs} command. But note that if you know the file is
+ listed in the \c examples variable, you don't need to
+ specify its path:
+
+ \code
+ \quotefromfile calculator.cpp
+ \endcode
+
+ See also \l exampledirs.
+
+ \row
+ \o \bold examples.fileextensions \target examples.fileextensions
+ \o \bold {The \c examples.fileextensions variable specifies the
+ file extensions that qdoc will look for when collecting example
+ files for display in the documentation.}
+
+ The default extensions are *.cpp, *.h, *.js, *.xq, *.svg, *.xml
+ and *.ui. However, if
+
+ The extensions are given as standard wildcard expressions.
+ You can add a file extension to the filter using '+='. For
+ example:
+
+ \code
+ examples.fileextensions += *.qrc
+ \endcode
+
+ See also \l{headers.fileextensions}.
+
+ \row
+ \o \bold extraimages \target extraimages
+ \o \bold {The \c extraimages variable tells QDoc to incorporate
+ specific images in the generated documentation.}
+
+ QDoc will not recognize images used within HTML (or any
+ other markup language). If we want the images to be copied
+ from the directories specified by \l {imagedirs}{\c
+ imagedirs} (the images in question must be located in these
+ directories) to the output directory, we must specify the
+ images using the \c extraimages variable.
+
+ The general syntax is \tt {extraimages.\i{format} = \i
+ image}. The file extension is optional.
+
+ For example, in \l qt.qdocconf we use a couple of images
+ within the HTML.postheader variable which value is pure
+ HTML. For that reason, these images are specified using the
+ \c extraimages variable:
+
+ \code
+ extraimages.HTML = qt-logo
+ \endcode
+
+ See also \l images and \l imagedirs.
+
+ \row
+ \o \bold falsehoods \target falsehoods
+ \o \bold {The \c falsehoods variable defines the truth value of
+ specified preprocessor symbols as false.}
+
+ If this variable is not set for a preprocessor symbol, QDoc
+ assumes its truth value is true. The exception is '0',
+ which value always is false.
+
+ QDoc will recognize, and is able to evaluate, the following
+ preprocessor syntax:
+
+ \code
+ #ifdef NOTYET
+ ...
+ #endif
+
+ #if defined (NOTYET)
+ ...
+ #end if
+ \endcode
+
+ However, faced with unknown syntax like
+
+ \code
+ #if NOTYET
+ ...
+ #endif
+ \endcode
+
+ QDoc will evaluate it as true by default, \i unless the
+ preprocessor symbol is specified within the \c falsehoods
+ variable entry:
+
+ \code
+ falsehoods = NOTYET
+ \endcode
+
+ See also \l defines.
+
+ \row
+ \o \bold generateindex \target generateindex
+ \o \bold{The \c generateindex variable contains a boolean value that
+ specifies whether to generate an index file when HTML documentation
+ is generated.}
+
+ By default, an index file is always generated with HTML documentation,
+ so this variable is typically only used when disabling this feature
+ (by setting the value to \c false) or when enabling index generation
+ for the WebXML output (by setting the value to \c true).
+ \row
+ \o \bold headerdirs \target headerdirs
+ \o \bold {The \c headerdirs variable specifies the directories
+ containing the header files associated with the \c .cpp source
+ files used in the documentation.}
+
+ For example:
+
+ \code
+ headerdirs = $QTDIR/src \
+ $QTDIR/extensions/activeqt \
+ $QTDIR/extensions/motif \
+ $QTDIR/tools/designer/src/lib/extension \
+ $QTDIR/tools/designer/src/lib/sdk \
+ $QTDIR/tools/designer/src/lib/uilib
+ \endcode
+
+ When executed, the first QDoc will do is to read through
+ the headers specified in the \l {headers}{\c headers}
+ variable, and the ones located in the directories specified
+ in the \c headerdir variable (including all
+ subdirectories), building an internal structure of the
+ classes and their functions.
+
+ Then it will read through the sources specified in the \l
+ {sources}{\c sources}, and the ones located in the
+ directories specified in the \l {sourcedirs}{\c sourcedirs}
+ varible (including all subdirectories), merging the
+ documentation with the structure it retrieved from the
+ header files.
+
+ If both the \c headers and \c headerdirs variables are
+ defined, QDoc will read through both, first \l {headers}{\c
+ headers} then \c headerdirs.
+
+ In the specified directories, QDoc will only read the files
+ with the fileextensions specified in the \l
+ {headers.fileextensions}{\c headers.fileextensions}
+ variable. The default extensions are *.ch, *.h, *.h++,
+ *.hh, *.hpp and *.hxx". The files specified by \l
+ {headers}{\c headers} will be read independent of their
+ fileextensions.
+
+ See also \l headers and \l headers.fileextensions.
+
+ \row
+ \o \bold headers \target headers
+ \o \bold {The \c headers variable allows you to specify individual
+ header files in addition to those located in the directories
+ specified by the \l {headerdirs}{\c headerdirs} variable.}
+
+ For example:
+
+ \code
+ headers = $QTDIR/src/gui/widgets/qlineedit.h \
+ $QTDIR/src/gui/widgets/qpushbutton.h
+ \endcode
+
+ When processing the \c headers variable, QDoc behaves in the
+ same way as it does when processing the \l {headerdirs}{\c
+ headerdirs} variable. For more information, see the \l
+ {headerdirs}{\c headerdirs} variable.
+
+ See also \l headerdirs.
+
+ \row
+ \o \bold headers.fileextensions \target headers.fileextensions
+ \o \bold {The \c headers.fileextensions variable specify the
+ extension used by the headers.}
+
+ When processing the header files specified in the \l
+ {headerdirs}{\c headerdirs} variable, QDoc will only read
+ the files with the fileextensions specified in the \c
+ headers.fileextensions variable. In this way QDoc avoid
+ spending time reading irrelevant files.
+
+ The default extensions are *.ch, *.h, *.h++, *.hh, *.hpp
+ and *.hxx.
+
+ The extensions are given as standard wildcard expressions.
+ You can add a file extension to the filter using '+='. For
+ example:
+
+ \code
+ header.fileextensions += *.H
+ \endcode
+
+ \warning The above assignment may not work as described.
+
+ See also \l headerdirs.
+
+ \row
+ \o \bold imagedirs \target imagedirs
+ \o \bold {The \c imagedirs variable specifies the directories
+ containing the images used in the documentation.}
+
+ The \l {images}{\c images} and \c imagedirs variables are
+ used by the \l {image}{\\image} and \l
+ {inlineimage}{\\inlineimage} commands. If both the \l
+ {images}{\c images} and \c imagedirs variables are defined,
+ QDoc will search in both, first in \l {images}{\c images}
+ then in \c imagedirs.
+
+ QDoc will search through the directories in the specified
+ order, and accept the first matching file it finds. It will
+ only search in the specified directories, \i not in
+ subdirectories.
+
+ For example:
+
+ \code
+ imagedirs = $QTDIR/doc/src/images \
+ $QTDIR/examples
+
+ images = $QTDIR/doc/src/images/calculator-example.png
+ \endcode
+
+ When processing
+
+ \code
+ \image calculator-example.png
+ \endcode
+
+ QDoc will then see if there exists a file called
+ calculator-example.png listed as a value in the \c images
+ variable. If it doesn't, it will search in the \c imagedirs
+ variable, and first see if there exists a file called
+
+ \code
+ $QTDIR/doc/src/images/calculator-example.png
+ \endcode
+
+ If it doesn't, QDoc will look for a file called
+
+ \code
+ $QTDIR/examples/calculator-example.png
+ \endcode
+
+ You can filter the images in an image directory using the
+ \l {images.fileextensions}{\c images.fileextensions}
+ variable. The general idea behind the \l
+ {images.fileextensions}{\c images.fileextensions} variable
+ is to enable different image format for different output
+ format.
+
+ \warning The \l {images.fileextensions}{\c
+ images.fileextensions} variable's functionality is
+ preliminay since QDoc at this point only support HTML.
+
+ See also \l images and \l images.fileextensions.
+
+ \row
+ \o \bold images \target images
+ \o \bold {The \c images variable allows you to specify individual
+ image files in addition to those located in the directories
+ specified by the \l {imagedirs}{\c imagedirs} variable.}
+
+ For example:
+
+ \code
+ images = $QTDIR/doc/src/images/calculator-example.png
+ \endcode
+
+ When processing the \c images variable, QDoc behaves in the
+ same way as it does when processing the \l {imagedirs}{\c
+ imagedirs} variable. For more information, see the \l
+ {imagedirs}{\c imagedirs} variable.
+
+ See also \l imagedirs and \l images.fileextensions.
+
+ \row
+ \o \bold images.fileextensions \target images.fileextensions
+ \o \bold {The images.fileextensions variable filters the files within
+ an image directory.}
+
+ The variable's values (the extensions) are given as
+ standard wildcard expressions. The general syntax is: \tt
+ {images.fileextensions.\i{format} = *.\i{extension}}.
+
+ The idea is to enable different image format for different
+ output format. For example:
+
+ \code
+ images.fileextensions.HTML = *.png
+ images.fileextensions.LOUT = *.eps
+ \endcode
+
+ Then, when processing the \l {image}{\\image} and \l
+ {inlineimage}{\\inlineimage} commands, QDoc will only
+ search for files with extensions specified in the output
+ format's associated image extension variable.
+
+ \warning This is preliminary functionality since QDoc at
+ this point only support HTML.
+
+ The default extensions for HTML are *.png, *.jpg, *.jpeg
+ and *.gif.
+
+ You can add a file extension to the filter using '+='. For
+ example:
+
+ \code
+ images.fileextensions.HTML += *.eps
+ \endcode
+
+ See also \l imagedirs and \l images.
+
+ \row
+ \o \bold language \target language
+ \o \bold {The \c language variable specifies the language of the
+ source code that is used in the documentation.}
+
+ Currently, C++ is the only language that QDoc
+ understands. It is also the default language, and doesn't
+ really need to be specified. But for example in \l
+ qt.qdocconf:
+
+ \code
+ language = Cpp
+ \endcode
+
+ identifies the language of the Qt source code as C++.
+
+ \row
+ \o \bold macro \target macro
+ \o \bold {The \c macro variable can be used to create your
+ own QDoc commands.}
+
+ The general syntax is \tt {macro.\i{command} =
+ "\i{definition}}". The definition can be described using
+ QDoc syntax. In addition it is possible to provide an HTML
+ definition by appending .HTML to the variable.
+
+ For example in \l qt.qdocconf:
+
+ \code
+ macro.gui = "\\bold"
+ macro.raisedaster.HTML = "<sup>*</sup>"
+ \endcode
+
+ makes sure that the \\gui command renders its argument using a
+ bold font, and that \\raisedaster renders a '*'.
+
+ \row
+ \o \bold outputdir \target outputdir
+ \o \bold {The \c outputdir variable specifies the directory
+ where QDoc will put the generated documentation.}
+
+ In qt.qdocconf:
+
+ \code
+ outputdir = $QTDIR/doc/html
+ \endcode
+
+ locates the generated Qt reference documentation in
+ $QTDIR/doc/html. For example, the documentation of the
+ QWidget class is located in
+
+ \code
+ $QTDIR/doc/html/qwidget.html
+ \endcode
+
+ The associated images will be put in an \c images subdirectory.
+
+ \warning When running QDoc multiple times using the same output
+ directory, all files from the previous run will be lost.
+
+ \row
+ \o \bold outputformats \target outputformats
+ \o \bold {The \c outputformats variable specifies the format of
+ the generated documentation.}
+
+ Currently, QDoc only supports the HTML format. It is also
+ the default format, and doesn't need to be specified.
+
+ \row
+ \o \bold qhp \target qhp
+ \o \bold{The \c qhp variable is used to define the information to be
+ written out to Qt Help Project (\c{qhp}) files.}
+
+ See the \l{Creating Help Project Files} chapter for information
+ about this process.
+
+ \row
+ \o \bold slow \target slow
+ \o \bold {The \c slow variable specifies whether QDoc should do
+ time-consuming processing, such as syntax highlighting.}
+
+ By default, this setting is false.
+
+ Example:
+
+ \code
+ slow = true
+ \endcode
+
+ Another way to turn on "slowness" is to invoke QDoc with the
+ \c -slow command-line option.
+
+ \row
+ \o \bold sourcedirs \target sourcedirs
+ \o \bold {The \c sourcedirs variable specifies the directories
+ containing the \c .cpp or \c .qdoc files used in
+ the documentation.}
+
+ For example in \l qt.qdocconf
+
+ \code
+ sourcedirs = $QTDIR/src \
+ $QTDIR/doc/src \
+ $QTDIR/extensions/activeqt \
+ $QTDIR/extensions/motif \
+ $QTDIR/tools/designer/src/lib/extension \
+ $QTDIR/tools/designer/src/lib/sdk \
+ $QTDIR/tools/designer/src/lib/uilib
+ \endcode
+
+ When executed, the first QDoc will do is to read through
+ the headers specified in the \l {header}{\c header}
+ variable, and the ones located in the directories specified
+ in the \c headerdir variable (including all
+ subdirectories), building an internal structure of the
+ classes and their functions.
+
+ Then it will read through the sources specified in the \l
+ {sources}{\c sources}, and the ones located in the
+ directories specified in the \l {sourcedirs}{\c sourcedirs}
+ varible (including all subdirectories), merging the
+ documentation with the structure it retrieved from the
+ header files.
+
+ If both the \c sources and \c sourcedirs variables are
+ defined, QDoc will read through both, first \l {sources}{\c
+ sources} then \c sourcedirs.
+
+ In the specified directories, QDoc will only read the files
+ with the fileextensions specified in the \l
+ {sources.fileextensions}{\c sources.fileextensions}
+ variable. The default extensions are *.c++, *.cc, *.cpp and
+ *.cxx. The files specified by \l {sources}{\c sources} will
+ be read independent of their fileextensions.
+
+ See also \l sources and \l sources.fileextensions.
+
+ \row
+ \o \bold sources \target sources
+ \o \bold {The \c sources variable allows you to specify
+ individual source files in addition to those located in the
+ directories specified by the \l {sourcedir}{\c sourcedir}
+ variable.}
+
+ For example:
+
+ \code
+ sources = $QTDIR/src/gui/widgets/qlineedit.cpp \
+ $QTDIR/src/gui/widgets/qpushbutton.cpp
+ \endcode
+
+ When processing the \c sources variable, QDoc behaves in the
+ same way as it does when processing the \l {sourcedirs}{\c
+ sourcedirs} variable. For more information, see the \l
+ {sourcedirs}{\c sourcedirs} variable.
+
+ See also \l sourcedirs.
+
+ \row
+ \o \bold sources.fileextensions \target sources.fileextensions
+ \o \bold {The \c sources.fileextensions variable filters the
+ files within a source directory.}
+
+ When processing the source files specified in the \l
+ {sourcedirs}{\c sourcedirs} variable, QDoc will only read
+ the files with the fileextensions specified in the \c
+ sources.fileextensions variable. In this way QDoc avoid
+ spending time reading irrelevant files.
+
+ The default extensions are *.c++, *.cc, *.cpp and *.cxx.
+
+ The extensions are given as standard wildcard expressions.
+ You can add a file extension to the filter using '+='. For
+ example:
+
+ \code
+ sources.fileextensions += *.CC
+ \endcode
+
+ \warning The above assignment may not work as described.
+
+ See also \l sourcedirs and \l sources.
+
+ \row
+ \o \bold spurious \target spurious
+ \o \bold {The \c spurious variable excludes specified
+ QDoc warnings from the output.}
+
+ The warnings are specified using standard wildcard
+ expressions. For example:
+
+ \code
+ spurious = "Cannot find .*" \
+ "Missing .*"
+ \endcode
+
+ makes sure that warnings matching either of these
+ expressions, will not be part of the output when running
+ QDoc. For example would the following warning be omitted
+ from the output:
+
+ \code
+ qt-4.0/src/opengl/qgl_mac.cpp:156: Missing parameter name
+ \endcode
+
+ \row
+ \o \bold tabsize \target tabsize
+ \o \bold {The \c tabsize variable defines the size of a tab
+ character.}
+
+ For example:
+
+ \code
+ tabsize = 4
+ \endcode
+
+ will give the tab character the size of 4 spaces.
+
+ The default value of the variable is 8, and doesn't need to
+ be specified.
+
+ \row
+ \o \bold tagfile \target tagfile
+ \o \bold{The \c tagfile variable specifies the Doxygen tag file to be written
+ when HTML is generated.}
+ \row
+ \o \bold version \target version
+ \o \bold {The \c version variable specifies the version number of the
+ documented software.}
+
+ For example:
+
+ \code
+ version = 4.0.1
+ \endcode
+
+ When a version number is specified (using the \tt{\l
+ version} or \tt {\l versionsym} variables in a \c .qdocconf
+ file), it is accessible through the corresponding \\version
+ command for use in the documentation.
+
+ \warning The \\version command's functionality is not
+ fully implemented; currently it only works within raw HTML
+ code.
+
+ See also \l versionsym.
+
+ \row
+ \o \bold versionsym \target versionsym
+ \o \bold {The \c versionsym variable specifies a C++
+ preprocessor symbol that defines the version number
+ of the documented software.}
+
+ For example in \l qt.qdocconf:
+
+ \code
+ versionsym = QT_VERSION_STR
+ \endcode
+
+ QT_VERSION_STR is defined in qglobal.h as follows
+
+ \code
+ #define QT_VERSION_STR "4.0.1"
+ \endcode
+
+ When a version number is specified (using the \tt{\l
+ version} or \tt {\l versionsym} variables in a \c .qdocconf
+ file), it is accessible through the corresponding \\version
+ command for use in the documentation.
+
+ \warning The \\version command's functionality is not fully
+ implemented; currently it only works within raw HTML code.
+
+ See also \l {version}{\\version}.
+
+ \endtable
+*/
+
+/*!
+ \page 22-creating-help-project-files.html
+ \previouspage General Variables
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage C++ Specific Variables
+
+ \title Creating Help Project Files
+
+ \section1 Overview
+
+ Starting with Qt 4.4, Qt Assistant uses a different system for managing
+ Qt documentation that requires QDoc to generate inventories of files in a
+ format that is similar to the old style DCF format, but with additional
+ features.
+
+ Instead of hard-coding information about the documentation sets for Qt,
+ QDoc allows configuration variables to be used to specify which pages are
+ to be used in each documentation set it generates. These are specified as
+ subvariables of the \c qch variable with each set declared using a unique
+ identifier as a subvariable.
+
+ For example, the configuration file for the Qt documentation defines a
+ \c Qt documentation set by specifying information about the set as
+ subvariables with the \c{qhp.Qt} prefix:
+
+ \code
+ qhp.Qt.file = qt.qhp
+ qhp.Qt.namespace = com.trolltech.qt.440
+ qhp.Qt.virtualFolder = qdoc
+ qhp.Qt.indexTitle = Qt Reference Documentation
+ qhp.Qt.indexRoot =
+ qhp.Qt.extraFiles = classic.css images/qt-logo.png
+ qhp.Qt.filterAttributes = qt 4.4.0 qtrefdoc
+ qhp.Qt.customFilters.Qt.name = Qt 4.4.0
+ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.4.0
+ qhp.Qt.subprojects = classes overviews examples
+ qhp.Qt.subprojects.classes.title = Classes
+ qhp.Qt.subprojects.classes.indexTitle = Qt's Classes
+ qhp.Qt.subprojects.classes.selectors = class
+ qhp.Qt.subprojects.overviews.title = Overviews
+ qhp.Qt.subprojects.overviews.indexTitle = All Overviews and HOWTOs
+ qhp.Qt.subprojects.overviews.selectors = fake:page,group,module
+ qhp.Qt.subprojects.examples.title = Tutorials and Examples
+ qhp.Qt.subprojects.examples.indexTitle = Qt Examples
+ qhp.Qt.subprojects.examples.selectors = fake:example
+ \endcode
+*/
+
+/*!
+ \page 23-qdoc-configuration-cppvariables.html
+ \previouspage Creating Help Project Files
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage HTML Specific Variables
+
+ \title C++ Specific Variables
+
+ The C++ specific configuration variables are provided to avoid
+ erroneous documentation due to non-standard C++ constructs.
+
+ \section1 Alphabetical List
+
+ \l {23-qdoc-configuration-cppvariables.html#Cpp.ignoredirectives}
+ {Cpp.ignoredirectives},
+ \l {23-qdoc-configuration-cppvariables.html#Cpp.ignoretoken}
+ {Cpp.ignoretokens}
+
+ \section1 Variable Descriptions
+
+ \table
+
+ \header
+ \o Variable
+ \o Description
+
+ \row
+ \o \bold Cpp.ignoredirectives \target Cpp.ignoredirectives
+ \o \bold {The \c Cpp.ignoredirectives variable makes QDoc ignore
+ the specified non-standard constructs, within C++ source code.}
+
+ If not specified by the \tt {\l Cpp.ignoretokens} or \tt
+ {\l Cpp.ignoredirectives} variables, non-standard
+ constructs (typically macros) can result in erroneous
+ documentation.
+
+ In \l qt.qdocconf:
+
+ \code
+ Cpp.ignoredirectives = Q_DECLARE_INTERFACE \
+ Q_DECLARE_OPERATORS_FOR_FLAGS \
+ Q_DECLARE_PRIVATE \
+ Q_DECLARE_PUBLIC \
+ Q_DISABLE_COPY \
+ Q_DUMMY_COMPARISON_OPERATOR \
+ Q_ENUMS \
+ Q_FLAGS \
+ Q_INTERFACES \
+ __attribute__
+ \endcode
+
+ makes sure that when processing the code below, for
+ example, QDoc will simply ignore the 'Q_ENUMS' and
+ 'Q_FLAGS' expressions:
+
+ \code
+ class Q_CORE_EXPORT Qt {
+ Q_OBJECT
+ Q_ENUMS(Orientation TextFormat BackgroundMode
+ DateFormat ScrollBarPolicy FocusPolicy
+ ContextMenuPolicy CaseSensitivity
+ LayoutDirection ArrowType)
+ Q_ENUMS(ToolButtonStyle)
+ Q_FLAGS(Alignment)
+ Q_FLAGS(Orientations)
+ Q_FLAGS(DockWidgetAreas)
+
+ public:
+ ...
+ };
+ \endcode
+
+ The Q_OBJECT macro, however, is an exception: QDoc
+ recognizes this particular non-standard construct, so there
+ is no need specifying it using the \tt {\l
+ Cpp.ignoredirectives} variable.
+
+ Regarding the Q_CORE_EXPORT macro; see the documentation of
+ the \tt {\l Cpp.ignoretokens} variable.
+
+ See also \l Cpp.ignoretokens.
+
+ \row
+ \o \bold Cpp.ignoretokens \target Cpp.ignoretokens
+ \o \bold {The \c Cpp.ignoretokens variable makes QDoc ignore
+ the specified non-standard constructs, within C++ source code.}
+
+ If not specified by the \tt {\l Cpp.ignoretokens} or \tt
+ {\l Cpp.ignoredirectives} variables, non-standard
+ constructs (typically macros) can result in erroneous
+ documentation.
+
+ In \l qt.qdocconf:
+
+ \code
+ Cpp.ignoretokens = QAXFACTORY_EXPORT \
+ QM_EXPORT_CANVAS \
+ ...
+ Q_COMPAT_EXPORT \
+ Q_CORE_EXPORT \
+ Q_EXPLICIT \
+ Q_EXPORT \
+ ...
+ Q_TYPENAME \
+ Q_XML_EXPORT
+ \endcode
+
+ makes sure that when processing the code below, for
+ example, QDoc will simply ignore the 'Q_CORE_EXPORT'
+ expression:
+
+ \code
+ class Q_CORE_EXPORT Qt {
+ Q_OBJECT
+ Q_ENUMS(Orientation TextFormat BackgroundMode
+ DateFormat ScrollBarPolicy FocusPolicy
+ ContextMenuPolicy CaseSensitivity
+ LayoutDirection ArrowType)
+ Q_ENUMS(ToolButtonStyle)
+ Q_FLAGS(Alignment)
+ Q_FLAGS(Orientations)
+ Q_FLAGS(DockWidgetAreas)
+
+ public:
+ ...
+ };
+ \endcode
+
+ Regarding the Q_OBJECT, Q_ENUMS and Q_FLAGS macros; see the
+ documentation of the \tt {\l Cpp.ignoredirectives}
+ variable.
+
+ See also \l Cpp.ignoredirectives.
+
+ \endtable
+*/
+
+
+/*!
+ \page 24-qdoc-configuration-htmlvariables.html
+ \previouspage C++ Specific Variables
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage Supporting Derived Projects
+
+ \title HTML Specific Variables
+
+ The HTML specific configuration variables define the generated
+ documentation's style, or define the contents of the
+ documentation's footer or postheader. The format of the variable
+ values are raw HTML.
+
+ \section1 Alphabetical List
+
+ \l {24-qdoc-configuration-htmlvariables.html#HTML.footer}{HTML.footer},
+ \l {24-qdoc-configuration-htmlvariables.html#HTML.postheader}
+ {HTML.postheader},
+ \l {24-qdoc-configuration-htmlvariables.html#HTML.style}{HTML.style},
+ \l {24-qdoc-configuration-htmlvariables.html#HTML.stylesheets}{HTML.stylesheets}
+
+
+ \section1 Variable Descriptions
+
+ \table
+
+ \header
+ \o Variable
+ \o Description
+
+ \row
+ \o \bold HTML.footer \target HTML.footer
+ \o \bold {The \c HTML.footer variable defines the content
+ of the generated HTML documentation's footer.}
+
+ The footer is rendered at the bottom of the generated
+ documentation page.
+
+ The variable's value is given as raw HTML code enclosed by
+ quotation marks. Note that if the value spans several
+ lines, each line needs to be enclosed by quotation marks.
+
+ For example in \l qt.qdocconf:
+
+ \code
+ HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
+ ...
+ "</tr></table></div></address>"
+ \endcode
+
+ The complete variable entry in \l qt.qdocconf provides the
+ standard footer of the \l
+ {http://qt.nokia.com/doc/4.0/index.html}{Qt Reference
+ Documentation}.
+
+ \row
+ \o \bold HTML.postheader \target HTML.postheader
+ \o \bold {The \c HTML.postheader variable defines the content
+ of the generated HTML documentation's postheader.}
+
+ The header is rendered at the top of the generated
+ documentation page.
+
+ The variable's value is given as raw HTML enclosed by
+ quotation marks. Note that if the value spans several
+ lines, each line needs to be enclosed by quotation marks.
+
+ For example in \l qt.qdocconf:
+
+ \code
+ HTML.postheader = "<table border=\"0\"..." \
+ ...
+ "<img src=\"images/trolltech-logo.png\" \
+ "align=\"right\" width=\"203\" height=\"32\""\
+ "border=\"0\" />" \
+ "</td></tr>" \
+ "</table>"
+ \endcode
+
+ The complete variable entry in \l qt.qdocconf provides the
+ standard header of the \l
+ {http://qt.nokia.com/doc/4.0/index.html}{Qt Reference
+ Documentation}.
+
+ \row
+ \o \bold HTML.style \target HTML.style
+ \o \bold {The HTML.style variable defines the style for
+ the generated HTML documentation.}
+
+ The variable's value is given as raw HTML enclosed by
+ quotation marks. Note that if the value spans several
+ lines, each line needs to be enclosed by quotation marks.
+
+ For example in \l qt.qdocconf:
+
+ \code
+ HTML.style = "h3.fn,span.fn" \
+ "{ margin-left: 1cm; text-indent: -1cm; }\n" \
+ "a:link { color: #004faf; text-decoration: none }\n" \
+ "a:visited" \
+ "{ color: #672967; text-decoration: none }\n" \
+ "td.postheader { font-family: sans-serif }\n" \
+ "tr.address { font-family: sans-serif }\n" \
+ "body { background: #ffffff; color: black; }"
+ \endcode
+
+ provides the HTML style for the \l
+ {http://qt.nokia.com/doc/4.0/index.html}{Qt Reference
+ Documentation}.
+
+ \row
+ \o \bold HTML.stylesheets \target HTML.stylesheets
+ \o \bold {The HTML.stylesheets variable defines a list of stylesheets
+ to use for the generated HTML documentation.}
+
+ Using separate stylesheets for the documentation makes it easier to
+ customize and experiment with the style used once the contents has
+ been generated. Typically, it is only necessary to define a single
+ stylesheet for any set of documentation; for example:
+
+ \code
+ HTML.stylesheets = classic.css
+ \endcode
+
+ QDoc expects to find stylesheets in the directory containing the
+ \l qt.qdocconf file, and it will copy those specified to the output
+ directory alongside the HTML pages.
+ \endtable
+*/
+
+/*!
+ \page 25-qdoc-configuration-derivedprojects.html
+ \previouspage HTML Specific Variables
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage QDoc Compatibility
+
+ \title Supporting Derived Projects
+
+ \tableofcontents
+
+ Some particular configuration variables allow you to use QDoc to
+ support Qt-based projects; i.e to make projects, such as Qt Solutions,
+ contain references to the online Qt documentation. This
+ means that QDoc will be able to create links to the class reference
+ documentation, without any explicit linking command.
+
+ \section1 The Configuration Variables
+
+ \section2 Alphabetical List
+
+ \l{25-qdoc-configuration-derivedprojects.html#description}{description},
+ \l{25-qdoc-configuration-derivedprojects.html#indexes}{indexes},
+ \l{25-qdoc-configuration-derivedprojects.html#project}{project},
+ \l{25-qdoc-configuration-derivedprojects.html#url}{url}
+
+ \section2 Variable Descriptions
+
+ \table
+ \header
+ \o Variable
+ \o Description
+ \row
+ \o \bold description \target description
+ \o \bold {The description variable holds a short description of
+ the associated project.}
+
+ See also \l project.
+
+ \row
+ \o \bold indexes \target indexes
+ \o \bold {The \c indexes variable lists the index files
+ that will be used to generate references.}
+
+ For example. to make a derived Qt project contain links to
+ the Qt Reference documentation, you need to specify the
+ associated index file:
+
+ \code
+ indexes = $QTDIR/doc/html/qt.index
+ \endcode
+
+ See also \l project and \l url.
+
+ \row
+ \o \bold project \target project
+ \o \bold {The \c project variable provides a name for the project
+ associated with the \c .qdocconf file.}
+
+ The project's name is used to form a file name for the
+ associated project's \i index file. For example:
+
+ \code
+ project = QtMotif
+ \endcode
+
+ This will cause an index file called \c qtmotif.index to be
+ created.
+
+ See also \l description and \l indexes.
+ \row
+ \o \bold url \target url
+ \o \bold {The \c url variable holds the base URL for the
+ reference documentation associated with the current project.}
+
+ The URL is stored in the generated index file for the
+ project. When we use the index on its own, QDoc will use
+ this as the base URL when constructing links to classes,
+ functions, and other things listed in the index.
+
+ For example:
+
+ \code
+ project = Qt
+ description = Qt Reference Documentation
+ url = http://qt.nokia.com/doc/4.0
+
+ ...
+ \endcode
+
+ This makes sure that whenever \c qt.index is used to generate
+ references to for example Qt classes, the base URL is
+ \c http://qt.nokia.com/doc/4.0.
+
+ See also \l indexes.
+
+ \endtable
+
+ \target howto
+ \section1 How to Support Derived Projects
+
+ This feature makes use of the comprehensive indexes generated by
+ QDoc when it creates the Qt reference documentation.
+
+ For example, \l qt.qdocconf (the configuration file for Qt)
+ contains the following variable definitions:
+
+ \code
+ project = Qt
+ description = Qt Reference Documentation
+ url = http://qt.nokia.com/doc/4.0
+
+ ...
+ \endcode
+
+ The \l project variable name is used to form a file name for the
+ index file; in this case the \c qt.index file is created. The \l
+ url is stored in the index file. Later, when we use the index on
+ its own, QDoc will use this as the base URL when constructing
+ links to classes, functions, and other things listed in the index.
+
+ In a mini-project, you can use an index file by defining an \l
+ indexes configuration variable in your \c .qdocconf file.
+
+ For example, you can create a \c qtmotif.qdocconf file to help you
+ check the QtMotif documentation (which is part of Qt Solutions):
+
+ \code
+ include($QTDIR/tools/qdoc3/test/compat.qdocconf)
+
+ project = QtMotif
+ description = QtMotif Class Documentation
+ url = http://www.trolltech.com/products/solutions/catalog/4/Migration/qtmotifextension
+
+ indexes = $QTDIR/doc/html/qt.index
+
+ outputdir = html
+
+ headerdirs = src
+ sourcedirs = src \
+ examples
+ sources.fileextensions = "*.cpp *.qdoc *.doc"
+
+ exampledirs = examples
+ \endcode
+
+ The code above requires that you run QDoc from the directory that
+ contains this file. You need to include the compat.qdocconf
+ file for compatibility reasons; this is further explained in the
+ \l {QDoc Compatibility} section.
+
+ \bold {To resolve the actual links to Qt classes, the
+ mini-project's \c .qdocconf file needs to assign a value to the \l
+ indexes variable; \c $QTDIR/doc/html/qt.index makes sure that you
+ always use the updated index file for the Qt documentation.}
+
+ The only disadvantages with this approach are the extra file that
+ QDoc has to generate and the time it takes to do so. Reading the
+ index back again later isn't instantaneous either, but it's
+ quicker than processing all the Qt classes each time you need to
+ write a new document.
+*/
+
+/*!
+ \page 26-qdoc-commands-compatibility.html
+ \previouspage Supporting Derived Projects
+ \contentspage QDoc Manual - Table of Contents
+ \nextpage QDoc Commands - Alphabetical List
+
+ \title QDoc Compatibility
+
+ \tableofcontents
+
+ \section1 General Description
+
+ \target reason
+
+ QDoc is a tool that constantly evolves to suit our needs, for that
+ reason there are some compatibility issues in the transition
+ between old and new practices.
+
+ To make the transition as smooth and rapid as possible, the
+ general idea is to adopt the new commands and usage in new
+ documentation. While waiting for the occurrences of the old
+ practices to be eliminated from the old parts of the
+ documentation, you can map the new commands and usage to the old
+ ones using a compat.qdocconf file.
+
+ A compat.qdocconf file is a separate \c .qdocconf file which you
+ can include in your main configuration file. It typically contains
+ the mapping between old and new commands using the \l alias and \l
+ {22-qdoc-configuration-generalvariables.html#macro}{macro}
+ configuration variables.
+
+ \section1 Qt Compatibility
+
+ In Qt's documentation there still exist occurrences of old
+ commands, and the Qt \l {qt.qdocconf}{configuration file} needs to
+ include the compat.qdocconf file tailored for Qt. For more
+ detailed information about the commands creating compatibility
+ issues, see the \l {Command Comments}{command comments}.
+
+ \section2 Qt's current compat.qdocconf file
+
+ \quotefile files/compat.qdocconf
+
+ \section2 Command Comments
+
+ \table
+ \header
+ \o New Command
+ \o Old Command
+ \o Description
+
+ \row
+ \o \\i \target i-versus-e
+ \o \\e
+ \o Earlier we
+ used the \\i command to indicate a list or table item, and
+ the \\e command for rendering in italic. Now we want the
+ \\i command to render in italic discarding the
+ \\e command name.
+
+ \bold {We still need to use the \\e command to render in
+ italic in new documentation for \l {reason}{compatibility
+ reasons}}.
+
+ \row
+ \o \\include \target include-versus-input
+ \o \\input
+ \o The \\include command was previously used to quote the
+ complete contents of a source file, now we want to use the
+ command to include separate documentation.
+ That is the functionality of the old \\input command
+ which name we want to discard.
+
+ \bold {We still need to use the \\input command to include
+ plain text in new documentation for \l
+ {reason}{compatibility reasons}}.
+
+ \row
+ \o \\quotefile \target quotefile-versus-include
+ \o \\include
+ \o Earlier, we have used the \\quotefile command to
+ quote from file, i.e. quote parts from file, and the
+ \\include command to quote the entire file. Since we now want
+ \\include to include separate documentation, we change the use of
+ \\quotefile to quote a complete source file.
+
+ \bold {We still need to use the \\include command to quote
+ the entire contents of a source file in new documentation
+ for \l {reason}{compatibility reasons}}.
+
+ \row
+ \o \\quotefromfile \target quotefromfile-versus-quotefile
+ \o \\quotefile
+ \o Earlier, we have used the \\quotefile command to
+ quote from file, i.e. quote parts from file. Since we now want
+ that command to quote an entire file, we introduce the new
+ \\quotefromfile command to quote from file.
+
+ \bold {Use \l {quotefromfile}{\\quotefromfile} to quote
+ parts from a source file in new documentation}.
+
+ \row
+ \o \\o \target o-versus-i
+ \o \\i
+ \o Earlier we used the \\i command to indicate list items
+ and table items. Since we now want the \\i command to render
+ in italic instead, we introduce the new \\o command for
+ this purpose.
+
+ \bold {Use \l {o}{\\o} to indicate list and table items in
+ new documentation}.
+
+ \row
+ \o \\quotation \target quotation-versus-quote
+ \o \\quote
+ \o These commands are equivalent, and represent a simple name
+ change.
+
+ \bold {Use \l {quotation}{\\quotation} in new
+ documentation}.
+
+ \row
+ \o \\image \target image-versus-img
+ \o \\img
+ \o These commands are equivalent, and represent a simple name
+ change.
+
+ \bold {Use \l {image}{\\image} in new documentation}.
+
+ \endtable
+*/
+
+/*!
+ \page 27-qdoc-commmands-alphabetical.html
+ \previouspage QDoc Compatibility
+ \contentspage QDoc Manual - Table of Contents
+
+ \title QDoc Commands - Alphabetical List
+
+ \list
+
+ \o \l {04-qdoc-commands-textformatting.html#a}{\\a}
+ \o \l {11-qdoc-commands-documentcontents.html#abstract}{\\abstract}
+ \o \l {06-qdoc-commands-verbatimcode.html#badcode}{\\badcode}
+ \o \l {04-qdoc-commands-textformatting.html#bold}{\\bold}
+ \o \l {11-qdoc-commands-documentcontents.html#brief}{\\brief}
+ \o \l {04-qdoc-commands-textformatting.html#c}{\\c}
+ \o \l {09-qdoc-commands-graphic.html#caption}{\\caption}
+ \o \l {05-qdoc-commands-documentstructuring.html#chapter}{\\chapter}
+ \o \l {13-qdoc-commands-topical.html#class}{\\class}
+ \o \l {06-qdoc-commands-verbatimcode.html#code}{\\code}
+ \o \l {07-0-qdoc-commands-quoting.html#codeline}{\\codeline},
+ \o \l {16-qdoc-commands-status.html#compat}{\\compat}
+ \o \l {15-qdoc-commands-navigation.html#contentspage}{\\contentspage}
+ \o \l {07-0-qdoc-commands-quoting.html#dots}{\\dots}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#else}{\\else}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#endif}{\\endif}
+ \o \l {13-qdoc-commands-topical.html#enum}{\\enum}
+ \o \l {13-qdoc-commands-topical.html#example-command}{\\example}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#expire}{\\expire}
+ \o \l {13-qdoc-commands-topical.html#externalpage}{\\externalpage}
+ \o \l {13-qdoc-commands-topical.html#fn}{\\fn}
+ \o \l {11-qdoc-commands-documentcontents.html#footnote}{\\footnote}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#generatelist}{\\generatelist}
+ \o \l {13-qdoc-commands-topical.html#group}{\\group}
+ \o \l {10-qdoc-commands-container.html#header}{\\header}
+ \o \l {13-qdoc-commands-topical.html#headerfile}{\\headerfile}
+ \o \l {04-qdoc-commands-textformatting.html#i}{\\i}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#if}{\\if}
+ \o \l {09-qdoc-commands-graphic.html#image}{\\image}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#include}{\\include}
+ \o \l {15-qdoc-commands-navigation.html#indexpage}{\\indexpage}
+ \o \l {19-qdoc-commands-grouping.html#ingroup}{\\ingroup}
+ \o \l {19-qdoc-commands-grouping.html#inmodule}{\\inmodule}
+ \o \l {09-qdoc-commands-graphic.html#inlineimage}{\\inlineimage}
+ \o \l {16-qdoc-commands-status.html#internal}{\\internal}
+ \o \l {08-qdoc-commands-linking.html#keyword}{\\keyword}
+ \o \l {08-qdoc-commands-linking.html#l}{\\l}
+ \o \l {11-qdoc-commands-documentcontents.html#legalese}{\\legalese}
+ \o \l {10-qdoc-commands-container.html#list}{\\list}
+ \o \l {13-qdoc-commands-topical.html#macro}{\\macro}
+ \o \l {19-qdoc-commands-grouping.html#mainclass}{\\mainclass}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#meta}{\\meta}
+ \o \l {13-qdoc-commands-topical.html#module}{\\module}
+ \o \l {13-qdoc-commands-topical.html#namespace}{\\namespace}
+ \o \l {15-qdoc-commands-navigation.html#nextpage}{\\nextpage}
+ \o \l {06-qdoc-commands-verbatimcode.html#newcode}{\\newcode}
+ \o \l {17-qdoc-commands-thread.html#nonreentrant}{\\nonreentrant}
+ \o \l {10-qdoc-commands-container.html#o}{\\o}
+ \o \l {16-qdoc-commands-status.html#obsolete}{\\obsolete}
+ \o \l {06-qdoc-commands-verbatimcode.html#oldcode}{\\oldcode}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#omit}{\\omit}
+ \o \l {10-qdoc-commands-container.html#omitvalue}{\\omitvalue}
+ \o \l {18-qdoc-commands-relating.html#overload}{\\overload}
+ \o \l {13-qdoc-commands-topical.html#page}{\\page}
+ \o \l {05-qdoc-commands-documentstructuring.html#part}{\\part}
+ \o \l {16-qdoc-commands-status.html#preliminary}{\\preliminary}
+ \o \l {15-qdoc-commands-navigation.html#previouspage}{\\previouspage}
+ \o \l {07-0-qdoc-commands-quoting.html#printline}{\\printline}
+ \o \l {07-0-qdoc-commands-quoting.html#printto}{\\printto}
+ \o \l {07-0-qdoc-commands-quoting.html#printuntil}{\\printuntil}
+ \o \l {13-qdoc-commands-topical.html#property}{\\property}
+ \o \l {11-qdoc-commands-documentcontents.html#quotation}{\\quotation}
+ \o \l {07-0-qdoc-commands-quoting.html#quotefile}{\\quotefile}
+ \o \l {07-0-qdoc-commands-quoting.html#quotefromfile}{\\quotefromfile}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#raw}{\\raw}
+ \o \l {17-qdoc-commands-thread.html#reentrant}{\\reentrant}
+ \o \l {18-qdoc-commands-relating.html#reimp}{\\reimp}
+ \o \l {18-qdoc-commands-relating.html#relates}{\\relates}
+ \o \l {10-qdoc-commands-container.html#row}{\\row}
+ \o \l {08-qdoc-commands-linking.html#sa}{\\sa}
+ \o \l {05-qdoc-commands-documentstructuring.html#sectionOne}{\\section1}
+ \o \l {05-qdoc-commands-documentstructuring.html#sectionTwo}{\\section2}
+ \o \l {05-qdoc-commands-documentstructuring.html#sectionThree}{\\section3}
+ \o \l {05-qdoc-commands-documentstructuring.html#sectionFour}{\\section4}
+ \o \l {13-qdoc-commands-topical.html#service}{\\service}
+ \o \l {16-qdoc-commands-status.html#since}{\\since}
+ \o \l {07-0-qdoc-commands-quoting.html#skipline}{\\skipline}
+ \o \l {07-0-qdoc-commands-quoting.html#skipto}{\\skipto}
+ \o \l {07-0-qdoc-commands-quoting.html#skipuntil}{\\skipuntil}
+ \o \l {07-0-qdoc-commands-quoting.html#snippet}{\\snippet},
+ \o \l {15-qdoc-commands-navigation.html#startpage}{\\startpage}
+ \o \l {04-qdoc-commands-textformatting.html#sub}{\\sub}
+ \o \l {20-qdoc-commands-title.html#subtitle}{\\subtitle}
+ \o \l {04-qdoc-commands-textformatting.html#sup}{\\sup}
+ \o \l {10-qdoc-commands-container.html#table}{\\table}
+ \o \l {11-qdoc-commands-documentcontents.html#tableofcontents}
+ {\\tableofcontents}
+ \o \l {08-qdoc-commands-linking.html#target}{\\target}
+ \o \l {17-qdoc-commands-thread.html#threadsafe}{\\threadsafe}
+ \o \l {20-qdoc-commands-title.html#title}{\\title}
+ \o \l {04-qdoc-commands-textformatting.html#tt}{\\tt}
+ \o \l {13-qdoc-commands-topical.html#typedef}{\\typedef}
+ \o \l {04-qdoc-commands-textformatting.html#underline}{\\underline}
+ \o \l {13-qdoc-commands-topical.html#variable}{\\variable}
+ \o \l {10-qdoc-commands-container.html#value}{\\value}
+ \o \l {11-qdoc-commands-documentcontents.html#warning}{\\warning}
+ \endlist
+*/
+
+/*!
+ \externalpage http://qt.nokia.com/about
+ \title About Qt
+*/
diff --git a/tools/qdoc3/doc/qdoc-manual.qdocconf b/tools/qdoc3/doc/qdoc-manual.qdocconf
new file mode 100644
index 0000000000..26fd09c7e5
--- /dev/null
+++ b/tools/qdoc3/doc/qdoc-manual.qdocconf
@@ -0,0 +1,49 @@
+project = QDoc
+description = QDoc3 Manual
+
+indexes = $QTDIR/doc/html/qt.index
+
+outputdir = html
+
+sources = qdoc-manual.qdoc
+sourcedirs = $PWD
+
+exampledirs += $PWD \
+ $QTDIR/examples
+
+imagedirs += images
+
+extraimages.HTML = qt-logo
+
+HTML.stylesheets = classic.css
+
+HTML.style = "h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }\n" \
+ "a:link { color: #004faf; text-decoration: none }\n" \
+ "a:visited { color: #672967; text-decoration: none }\n" \
+ "td.postheader { font-family: sans-serif }\n" \
+ "tr.address { font-family: sans-serif }\n" \
+ "body { background: #ffffff; color: black; }"
+
+HTML.postheader = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"5\" width=\"100%\">\n" \
+ "<tr>\n" \
+ "<td align=\"left\" valign=\"top\" width=\"32\">" \
+ "<a href=\"http://qt.nokia.com/\"><img src=\"images/qt-logo.png\" align=\"left\" border=\"0\" /></a>" \
+ "</td>\n" \
+ "<td class=\"postheader\" valign=\"center\">" \
+ "<a href=\"01-qdoc-manual.html\">" \
+ "<font color=\"#004faf\">Home: QDoc Manual</font></a>&nbsp;&middot;" \
+ "<a href=\"http://qt.nokia.com/doc/4.7\">" \
+ "<font color=\"#004faf\"> Qt Reference Documentation</font></a>" \
+ "</td>\n" \
+ "</tr></table>"
+
+HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
+ "<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \
+ "<td width=\"40%\" align=\"left\">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>\n" \
+ "<td width=\"20%\" align=\"center\"><a href=\"trademarks.html\">Trademarks</a></td>\n" \
+ "<td width=\"40%\" align=\"right\"><div align=\"right\">Qt \\version</div></td>\n" \
+ "</tr></table></div></address>"
+
+spurious += "Missing '\\}'"
+spurious += "Cannot use .*"
+spurious += "Unexpected .*"
diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp
index 9b58d7f3d3..80f7e45b50 100644
--- a/tools/qdoc3/generator.cpp
+++ b/tools/qdoc3/generator.cpp
@@ -42,7 +42,6 @@
/*
generator.cpp
*/
-#include <QtCore>
#include <qdir.h>
#include <qdebug.h>
#include "codemarker.h"
@@ -227,6 +226,7 @@ void Generator::terminate()
imageFiles.clear();
imageDirs.clear();
outDir = "";
+ QmlClassNode::clear();
}
Generator *Generator::generatorForFormat(const QString& format)
@@ -641,33 +641,6 @@ void Generator::generateExampleFiles(const FakeNode *fake, CodeMarker *marker)
}
#endif
-void Generator::generateModuleWarning(const ClassNode *classe,
- CodeMarker *marker)
-{
- QString module = classe->moduleName();
- if (!module.isEmpty()) {
- Text text;
- if (!editionModuleMap["DesktopLight"].contains(module)) {
- text << Atom::ParaLeft
- << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD)
- << "This class is not part of the Qt GUI Framework Edition."
- << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD)
- << Atom::ParaRight;
- }
- else if (module == "Qt3Support") {
- text << Atom::ParaLeft
- << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD)
- << "Note to Qt GUI Framework Edition users:"
- << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD)
- << " This class is only available in the "
- << Atom(Atom::AutoLink, "Qt Full Framework Edition")
- << "." << Atom::ParaRight;
- }
-
- generateText(text, classe, marker);
- }
-}
-
QString Generator::indent(int level, const QString& markedCode)
{
if (level == 0)
@@ -1213,6 +1186,31 @@ void Generator::appendSortedNames(Text& text,
}
}
+void Generator::appendSortedQmlNames(Text& text,
+ const Node* base,
+ const NodeList& subs,
+ CodeMarker *marker)
+{
+ QMap<QString,Text> classMap;
+ int index = 0;
+
+ qDebug() << "Generator::appendSortedQmlNames():" << base->name() << "is inherited by...";
+ for (int i = 0; i < subs.size(); ++i) {
+ Text t;
+ qDebug() << " " << subs[i]->name();
+ appendFullName(t, subs[i], base, marker);
+ classMap[t.toString().toLower()] = t;
+ }
+
+ QStringList names = classMap.keys();
+ names.sort();
+
+ foreach (const QString &name, names) {
+ text << classMap[name];
+ text << separator(index++, names.count());
+ }
+}
+
int Generator::skipAtoms(const Atom *atom, Atom::Type type) const
{
int skipAhead = 0;
diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h
index 06f7f885a7..30d9af488b 100644
--- a/tools/qdoc3/generator.h
+++ b/tools/qdoc3/generator.h
@@ -124,7 +124,6 @@ class Generator
Node::SubType subtype,
const QString& tag);
void generateExampleFiles(const FakeNode *fake, CodeMarker *marker);
- void generateModuleWarning(const ClassNode *classe, CodeMarker *marker);
virtual int skipAtoms(const Atom *atom, Atom::Type type) const;
virtual QString fullName(const Node *node,
@@ -170,6 +169,13 @@ class Generator
const QList<RelatedClass> &classes,
CodeMarker *marker);
+ protected:
+ void appendSortedQmlNames(Text& text,
+ const Node* base,
+ const NodeList& subs,
+ CodeMarker *marker);
+
+ private:
QString amp;
QString lt;
QString gt;
diff --git a/tools/qdoc3/helpprojectwriter.cpp b/tools/qdoc3/helpprojectwriter.cpp
index 2189e02280..71810e458a 100644
--- a/tools/qdoc3/helpprojectwriter.cpp
+++ b/tools/qdoc3/helpprojectwriter.cpp
@@ -39,7 +39,6 @@
**
****************************************************************************/
-#include <QtXml>
#include <QHash>
#include <QMap>
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index a3cdae6314..411a886caf 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -54,10 +54,12 @@
#include <qdebug.h>
#include <qlist.h>
#include <qiterator.h>
+#include <qtextcodec.h>
QT_BEGIN_NAMESPACE
#define COMMAND_VERSION Doc::alias("version")
+int HtmlGenerator::id = 0;
QString HtmlGenerator::sinceTitles[] =
{
@@ -71,6 +73,7 @@ QString HtmlGenerator::sinceTitles[] =
" New Typedefs",
" New Properties",
" New Variables",
+ " New QML Elements",
" New Qml Properties",
" New Qml Signals",
" New Qml Methods",
@@ -266,6 +269,15 @@ void HtmlGenerator::initializeGenerator(const Config &config)
projectUrl = config.getString(CONFIG_URL);
+ outputEncoding = config.getString(CONFIG_OUTPUTENCODING);
+ if (outputEncoding.isEmpty())
+ outputEncoding = QLatin1String("ISO-8859-1");
+ outputCodec = QTextCodec::codecForName(outputEncoding.toLocal8Bit());
+
+ naturalLanguage = config.getString(CONFIG_NATURALLANGUAGE);
+ if (naturalLanguage.isEmpty())
+ naturalLanguage = QLatin1String("en");
+
QSet<QString> editionNames = config.subVars(CONFIG_EDITION);
QSet<QString>::ConstIterator edition = editionNames.begin();
while (edition != editionNames.end()) {
@@ -389,9 +401,9 @@ void HtmlGenerator::generateTree(const Tree *tree, CodeMarker *marker)
"qmake Manual",
dcfQmakeRoot);
- generateIndex(project.toLower().simplified().replace(" ", "-"),
- projectUrl,
- projectDescription);
+ QString fileBase = project.toLower().simplified().replace(" ", "-");
+ generateIndex(fileBase, projectUrl, projectDescription);
+ generatePageIndex(outputDir() + "/" + fileBase + ".pageindex", marker);
helpProjectWriter->generate(myTree);
}
@@ -431,11 +443,11 @@ int HtmlGenerator::generateAtom(const Atom *atom,
endLink();
}
else {
- out() << protect(atom->string());
+ out() << protectEnc(atom->string());
}
}
else {
- out() << protect(atom->string());
+ out() << protectEnc(atom->string());
}
break;
case Atom::BaseName:
@@ -483,7 +495,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
case Atom::C:
out() << formattingLeftMap()[ATOM_FORMATTING_TELETYPE];
if (inLink) {
- out() << protect(plainCode(atom->string()));
+ out() << protectEnc(plainCode(atom->string()));
}
else {
out() << highlightedCode(atom->string(), marker, relative);
@@ -516,7 +528,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
// fallthrough
case Atom::CodeBad:
out() << "<pre><font color=\"#404040\">"
- << trimmedTrailing(protect(plainCode(indent(codeIndent,atom->string()))))
+ << trimmedTrailing(protectEnc(plainCode(indent(codeIndent,atom->string()))))
<< "</font></pre>\n";
break;
case Atom::FootnoteLeft:
@@ -676,6 +688,8 @@ int HtmlGenerator::generateAtom(const Atom *atom,
nsmap = newSinceMaps.find(atom->string());
NewClassMaps::const_iterator ncmap;
ncmap = newClassMaps.find(atom->string());
+ NewClassMaps::const_iterator nqcmap;
+ nqcmap = newQmlClassMaps.find(atom->string());
if ((nsmap != newSinceMaps.constEnd()) && !nsmap.value().isEmpty()) {
QList<Section> sections;
QList<Section>::ConstIterator s;
@@ -686,6 +700,13 @@ int HtmlGenerator::generateAtom(const Atom *atom,
while (n != nsmap.value().constEnd()) {
const Node* node = n.value();
switch (node->type()) {
+ case Node::Fake:
+ if (node->subType() == Node::QmlClass) {
+ sections[QmlClass].appendMember((Node*)node);
+ //qDebug() << "HtmlGenerator::generateAtom(): Atom::SinceList, append"
+ // << node->name();
+ }
+ break;
case Node::Namespace:
sections[Namespace].appendMember((Node*)node);
break;
@@ -768,9 +789,11 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << "<a name=\""
<< Doc::canonicalTitle((*s).name)
<< "\"></a>\n";
- out() << "<h3>" << protect((*s).name) << "</h3>\n";
+ out() << "<h3>" << protectEnc((*s).name) << "</h3>\n";
if (idx == Class)
generateCompactList(0, marker, ncmap.value(), QString("Q"));
+ else if (idx == QmlClass)
+ generateCompactList(0, marker, nqcmap.value(), QString("Q"));
else if (idx == MemberFunction) {
ParentMaps parentmaps;
ParentMaps::iterator pmap;
@@ -792,7 +815,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
<< linkForNode(pmap.key(), 0)
<< "\">";
QStringList pieces = fullName(pmap.key(), 0, marker).split("::");
- out() << protect(pieces.last());
+ out() << protectEnc(pieces.last());
out() << "</a>" << ":</p>\n";
generateSection(nlist, 0, marker, CodeMarker::Summary);
@@ -820,12 +843,12 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << "<p align=\"center\">";
if (fileName.isEmpty()) {
out() << "<font color=\"red\">[Missing image "
- << protect(atom->string()) << "]</font>";
+ << protectEnc(atom->string()) << "]</font>";
}
else {
- out() << "<img src=\"" << protect(fileName) << "\"";
+ out() << "<img src=\"" << protectEnc(fileName) << "\"";
if (!text.isEmpty())
- out() << " alt=\"" << protect(text) << "\"";
+ out() << " alt=\"" << protectEnc(text) << "\"";
out() << " />";
helpProjectWriter->addExtraFile(fileName);
}
@@ -923,7 +946,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
// ### Trenton
out() << "<tr><td valign=\"top\"><tt>"
- << protect(plainCode(marker->markedUpEnumValue(atom->next()->string(),
+ << protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(),
relative)))
<< "</tt></td><td align=\"center\" valign=\"top\">";
@@ -936,7 +959,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
if (itemValue.isEmpty())
out() << "?";
else
- out() << "<tt>" << protect(itemValue) << "</tt>";
+ out() << "<tt>" << protectEnc(itemValue) << "</tt>";
skipAhead = 1;
}
@@ -1052,7 +1075,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
generateLink(atom, relative, marker);
}
else {
- out() << protect(atom->string());
+ out() << protectEnc(atom->string());
}
break;
case Atom::TableLeft:
@@ -1166,7 +1189,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << "<font color=\"red\"><b>&lt;Missing HTML&gt;</b></font>";
break;
case Atom::UnknownCommand:
- out() << "<font color=\"red\"><b><code>\\" << protect(atom->string())
+ out() << "<font color=\"red\"><b><code>\\" << protectEnc(atom->string())
<< "</code></b></font>";
break;
#ifdef QDOC_QML
@@ -1250,7 +1273,6 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
generateIncludes(inner, marker);
generateStatus(inner, marker);
if (classe) {
- generateModuleWarning(classe, marker);
generateInherits(classe, marker);
generateInheritedBy(classe, marker);
}
@@ -1295,7 +1317,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
out() << "<a name=\""
<< registerRef((*s).name.toLower())
<< "\"></a>\n";
- out() << "<h2>" << protect((*s).name) << "</h2>\n";
+ out() << "<h2>" << protectEnc((*s).name) << "</h2>\n";
generateSection(s->members, inner, marker, CodeMarker::Summary);
}
if (!s->reimpMembers.isEmpty()) {
@@ -1304,7 +1326,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
out() << "<a name=\""
<< registerRef(name.toLower())
<< "\"></a>\n";
- out() << "<h2>" << protect(name) << "</h2>\n";
+ out() << "<h2>" << protectEnc(name) << "</h2>\n";
generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary);
}
@@ -1343,7 +1365,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
s = sections.begin();
while (s != sections.end()) {
out() << "<hr />\n";
- out() << "<h2>" << protect((*s).name) << "</h2>\n";
+ out() << "<h2>" << protectEnc((*s).name) << "</h2>\n";
NodeList::ConstIterator m = (*s).members.begin();
while (m != (*s).members.end()) {
@@ -1428,14 +1450,19 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
QList<Section> sections;
QList<Section>::const_iterator s;
- QString htmlTitle = fake->fullTitle();
+ QString fullTitle = fake->fullTitle();
+ QString htmlTitle = fullTitle;
if (fake->subType() == Node::File && !fake->subTitle().isEmpty()) {
subTitleSize = SmallSubTitle;
htmlTitle += " (" + fake->subTitle() + ")";
}
+ else if (fake->subType() == Node::QmlBasicType) {
+ fullTitle = "QML Basic Type: " + fullTitle;
+ htmlTitle = fullTitle;
+ }
generateHeader(htmlTitle, fake, marker, true);
- generateTitle(fake->fullTitle(),
+ generateTitle(fullTitle,
Text() << fake->subTitle(),
subTitleSize,
fake,
@@ -1509,11 +1536,12 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
generateQmlInherits(qml_cn, marker);
generateQmlInstantiates(qml_cn, marker);
generateBrief(qml_cn, marker);
+ generateQmlInheritedBy(qml_cn, marker);
sections = marker->qmlSections(qml_cn,CodeMarker::Summary);
s = sections.begin();
while (s != sections.end()) {
out() << "<a name=\"" << registerRef((*s).name) << "\"></a>\n";
- out() << "<h2>" << protect((*s).name) << "</h2>\n";
+ out() << "<h2>" << protectEnc((*s).name) << "</h2>\n";
generateQmlSummary(*s,fake,marker);
++s;
}
@@ -1529,7 +1557,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
sections = marker->qmlSections(qml_cn,CodeMarker::Detailed);
s = sections.begin();
while (s != sections.end()) {
- out() << "<h2>" << protect((*s).name) << "</h2>\n";
+ out() << "<h2>" << protectEnc((*s).name) << "</h2>\n";
NodeList::ConstIterator m = (*s).members.begin();
while (m != (*s).members.end()) {
generateDetailedQmlMember(*m, fake, marker);
@@ -1549,7 +1577,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
s = sections.begin();
while (s != sections.end()) {
out() << "<a name=\"" << registerRef((*s).name) << "\"></a>\n";
- out() << "<h2>" << protect((*s).name) << "</h2>\n";
+ out() << "<h2>" << protectEnc((*s).name) << "</h2>\n";
generateSectionList(*s, fake, marker, CodeMarker::Summary);
++s;
}
@@ -1578,7 +1606,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
s = sections.begin();
while (s != sections.end()) {
out() << "<hr />\n";
- out() << "<h2>" << protect((*s).name) << "</h2>\n";
+ out() << "<h2>" << protectEnc((*s).name) << "</h2>\n";
NodeList::ConstIterator m = (*s).members.begin();
while (m != (*s).members.end()) {
@@ -1614,7 +1642,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
}
}
-QString HtmlGenerator::fileExtension(const Node * /* node */)
+QString HtmlGenerator::fileExtension(const Node * /* node */) const
{
return "html";
}
@@ -1624,11 +1652,11 @@ void HtmlGenerator::generateHeader(const QString& title,
CodeMarker *marker,
bool mainPage)
{
- out() << "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
+ out() << QString("<?xml version=\"1.0\" encoding=\"%1\"?>\n").arg(outputEncoding);
out() << "<!DOCTYPE html\n"
- " PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"DTD/xhtml1-strict.dtd\">\n"
- "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n";
+ " PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"DTD/xhtml1-strict.dtd\">\n";
+ out() << QString("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"%1\" lang=\"%1\">\n").arg(naturalLanguage);
QString shortVersion;
if ((project != "Qtopia") && (project != "Qt Extended")) {
@@ -1648,7 +1676,9 @@ void HtmlGenerator::generateHeader(const QString& title,
}
out() << "<head>\n"
- " <title>" << shortVersion << protect(title) << "</title>\n";
+ " <title>" << shortVersion << protectEnc(title) << "</title>\n";
+ out() << QString("<meta http-equiv=\"Content-type\" content=\"text/html; charset=%1\" />").arg(outputEncoding);
+
if (!style.isEmpty())
out() << " <style type=\"text/css\">" << style << "</style>\n";
@@ -1657,8 +1687,8 @@ void HtmlGenerator::generateHeader(const QString& title,
QMapIterator<QString, QString> i(metaMap);
while (i.hasNext()) {
i.next();
- out() << " <meta name=\"" << protect(i.key()) << "\" contents=\""
- << protect(i.value()) << "\" />\n";
+ out() << " <meta name=\"" << protectEnc(i.key()) << "\" contents=\""
+ << protectEnc(i.value()) << "\" />\n";
}
}
@@ -1682,9 +1712,9 @@ void HtmlGenerator::generateHeader(const QString& title,
navigationLinks += "[Previous: <a href=\"" + anchorPair.first + "\">";
if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty())
- navigationLinks += protect(anchorPair.second);
+ navigationLinks += protectEnc(anchorPair.second);
else
- navigationLinks += protect(linkPair.second);
+ navigationLinks += protectEnc(linkPair.second);
navigationLinks += "</a>]\n";
}
if (node->links().contains(Node::ContentsLink)) {
@@ -1700,9 +1730,9 @@ void HtmlGenerator::generateHeader(const QString& title,
navigationLinks += "[<a href=\"" + anchorPair.first + "\">";
if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty())
- navigationLinks += protect(anchorPair.second);
+ navigationLinks += protectEnc(anchorPair.second);
else
- navigationLinks += protect(linkPair.second);
+ navigationLinks += protectEnc(linkPair.second);
navigationLinks += "</a>]\n";
}
if (node->links().contains(Node::NextLink)) {
@@ -1718,9 +1748,9 @@ void HtmlGenerator::generateHeader(const QString& title,
navigationLinks += "[Next: <a href=\"" + anchorPair.first + "\">";
if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty())
- navigationLinks += protect(anchorPair.second);
+ navigationLinks += protectEnc(anchorPair.second);
else
- navigationLinks += protect(linkPair.second);
+ navigationLinks += protectEnc(linkPair.second);
navigationLinks += "</a>]\n";
}
if (node->links().contains(Node::IndexLink)) {
@@ -1771,7 +1801,7 @@ void HtmlGenerator::generateTitle(const QString& title,
const Node *relative,
CodeMarker *marker)
{
- out() << "<h1 class=\"title\">" << protect(title);
+ out() << "<h1 class=\"title\">" << protectEnc(title);
if (!subTitle.isEmpty()) {
out() << "<br />";
if (subTitleSize == SmallSubTitle)
@@ -2009,18 +2039,18 @@ QString HtmlGenerator::generateLowStatusMemberFile(const InnerNode *inner,
out() << "<p><ul><li><a href=\""
<< linkForNode(inner, 0) << "\">"
- << protect(inner->name())
+ << protectEnc(inner->name())
<< " class reference</a></li></ul></p>\n";
for (i = 0; i < sections.size(); ++i) {
- out() << "<h2>" << protect(sections.at(i).name) << "</h2>\n";
+ out() << "<h2>" << protectEnc(sections.at(i).name) << "</h2>\n";
generateSectionList(sections.at(i), inner, marker, CodeMarker::Summary);
}
sections = marker->sections(inner, CodeMarker::Detailed, status);
for (i = 0; i < sections.size(); ++i) {
out() << "<hr />\n";
- out() << "<h2>" << protect(sections.at(i).name) << "</h2>\n";
+ out() << "<h2>" << protectEnc(sections.at(i).name) << "</h2>\n";
NodeList::ConstIterator m = sections.at(i).members.begin();
while (m != sections.at(i).members.end()) {
@@ -2113,7 +2143,7 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative,
}
else {
out() << "<td>";
- out() << protect(node->doc().briefText().toString());
+ out() << protectEnc(node->doc().briefText().toString());
out() << "</td>";
}
out() << "</tr>\n";
@@ -2314,8 +2344,12 @@ void HtmlGenerator::generateCompactList(const Node *relative,
out() << "<a href=\""
<< linkForNode(it.value(), relative)
<< "\">";
- QStringList pieces = fullName(it.value(), relative, marker).split("::");
- out() << protect(pieces.last());
+ QStringList pieces;
+ if (it.value()->subType() == Node::QmlClass)
+ pieces << it.value()->name();
+ else
+ pieces = fullName(it.value(), relative, marker).split("::");
+ out() << protectEnc(pieces.last());
out() << "</a>";
if (pieces.size() > 1) {
out() << " (";
@@ -2357,7 +2391,7 @@ void HtmlGenerator::generateFunctionIndex(const Node *relative,
#else
out() << "<p>";
#endif
- out() << protect(f.key()) << ":";
+ out() << protectEnc(f.key()) << ":";
currentLetter = f.key()[0].unicode();
while (islower(currentLetter) && currentLetter >= nextLetter) {
@@ -2411,7 +2445,7 @@ void HtmlGenerator::generateLegaleseList(const Node *relative,
QString marked = marker->markedUpSynopsis(node, relative, style);
QRegExp templateTag("(<[^@>]*>)");
if (marked.indexOf(templateTag) != -1) {
- QString contents = protect(marked.mid(templateTag.pos(1),
+ QString contents = protectEnc(marked.mid(templateTag.pos(1),
templateTag.cap(1).length()));
marked.replace(templateTag.pos(1), templateTag.cap(1).length(),
contents);
@@ -2450,7 +2484,7 @@ void HtmlGenerator::generateQmlItem(const Node *node,
QString marked = marker->markedUpQmlItem(node,summary);
QRegExp templateTag("(<[^@>]*>)");
if (marked.indexOf(templateTag) != -1) {
- QString contents = protect(marked.mid(templateTag.pos(1),
+ QString contents = protectEnc(marked.mid(templateTag.pos(1),
templateTag.cap(1).length()));
marked.replace(templateTag.pos(1), templateTag.cap(1).length(),
contents);
@@ -2556,7 +2590,7 @@ void HtmlGenerator::generateOverviewList(const Node *relative, CodeMarker * /* m
const FakeNode *groupNode = groupTitlesMap[groupTitle];
out() << QString("<h3><a href=\"%1\">%2</a></h3>\n").arg(
linkForNode(groupNode, relative)).arg(
- protect(groupNode->fullTitle()));
+ protectEnc(groupNode->fullTitle()));
if (fakeNodeMap[groupNode].count() == 0)
continue;
@@ -2568,7 +2602,7 @@ void HtmlGenerator::generateOverviewList(const Node *relative, CodeMarker * /* m
if (title.startsWith("The "))
title.remove(0, 4);
out() << "<li><a href=\"" << linkForNode(fakeNode, relative) << "\">"
- << protect(title) << "</a></li>\n";
+ << protectEnc(title) << "</a></li>\n";
}
out() << "</ul>\n";
}
@@ -2582,7 +2616,7 @@ void HtmlGenerator::generateOverviewList(const Node *relative, CodeMarker * /* m
if (title.startsWith("The "))
title.remove(0, 4);
out() << "<li><a href=\"" << linkForNode(fakeNode, relative) << "\">"
- << protect(title) << "</a></li>\n";
+ << protectEnc(title) << "</a></li>\n";
}
out() << "</ul>\n";
}
@@ -2745,7 +2779,7 @@ void HtmlGenerator::generateSectionInheritedList(const Section& section,
}
out() << " inherited from <a href=\"" << fileName((*p).first)
<< "#" << HtmlGenerator::cleanRef(section.name.toLower()) << "\">"
- << protect(marker->plainFullName((*p).first, relative))
+ << protectEnc(marker->plainFullName((*p).first, relative))
<< "</a></li>\n";
++p;
}
@@ -2760,7 +2794,7 @@ void HtmlGenerator::generateSynopsis(const Node *node,
QString marked = marker->markedUpSynopsis(node, relative, style);
QRegExp templateTag("(<[^@>]*>)");
if (marked.indexOf(templateTag) != -1) {
- QString contents = protect(marked.mid(templateTag.pos(1),
+ QString contents = protectEnc(marked.mid(templateTag.pos(1),
templateTag.cap(1).length()));
marked.replace(templateTag.pos(1), templateTag.cap(1).length(),
contents);
@@ -3029,7 +3063,7 @@ void HtmlGenerator::generateSectionInheritedList(const Section& section,
}
out() << " inherited from <a href=\"" << fileName((*p).first)
<< "#" << HtmlGenerator::cleanRef(section.name.toLower()) << "\">"
- << protect(marker->plainFullName((*p).first, relative))
+ << protectEnc(marker->plainFullName((*p).first, relative))
<< "</a></li>\n";
++p;
}
@@ -3043,7 +3077,7 @@ void HtmlGenerator::generateSynopsis(const Node *node,
QString marked = marker->markedUpSynopsis(node, relative, style);
QRegExp templateTag("(<[^@>]*>)");
if (marked.indexOf(templateTag) != -1) {
- QString contents = protect(marked.mid(templateTag.pos(1),
+ QString contents = protectEnc(marked.mid(templateTag.pos(1),
templateTag.cap(1).length()));
marked.replace(templateTag.pos(1), templateTag.cap(1).length(),
contents);
@@ -3241,7 +3275,7 @@ void HtmlGenerator::generateLink(const Atom* atom,
if (funcLeftParen.indexIn(atom->string()) != -1 && marker->recognizeLanguage("Cpp")) {
// hack for C++: move () outside of link
int k = funcLeftParen.pos(1);
- out() << protect(atom->string().left(k));
+ out() << protectEnc(atom->string().left(k));
if (link.isEmpty()) {
if (showBrokenLinks)
out() << "</i>";
@@ -3249,7 +3283,7 @@ void HtmlGenerator::generateLink(const Atom* atom,
out() << "</a>";
}
inLink = false;
- out() << protect(atom->string().mid(k));
+ out() << protectEnc(atom->string().mid(k));
} else if (marker->recognizeLanguage("Java")) {
// hack for Java: remove () and use <tt> when appropriate
bool func = atom->string().endsWith("()");
@@ -3257,13 +3291,13 @@ void HtmlGenerator::generateLink(const Atom* atom,
if (tt)
out() << "<tt>";
if (func) {
- out() << protect(atom->string().left(atom->string().length() - 2));
+ out() << protectEnc(atom->string().left(atom->string().length() - 2));
} else {
- out() << protect(atom->string());
+ out() << protectEnc(atom->string());
}
out() << "</tt>";
} else {
- out() << protect(atom->string());
+ out() << protectEnc(atom->string());
}
}
@@ -3337,7 +3371,12 @@ QString HtmlGenerator::registerRef(const QString& ref)
return clean;
}
-QString HtmlGenerator::protect(const QString& string)
+QString HtmlGenerator::protectEnc(const QString &string)
+{
+ return protect(string, outputEncoding);
+}
+
+QString HtmlGenerator::protect(const QString &string, const QString &outputEncoding)
{
#define APPEND(x) \
if (html.isEmpty()) { \
@@ -3360,7 +3399,7 @@ QString HtmlGenerator::protect(const QString& string)
APPEND("&gt;");
} else if (ch == QLatin1Char('"')) {
APPEND("&quot;");
- } else if (ch.unicode() > 0x007F
+ } else if ((outputEncoding == "ISO-8859-1" && ch.unicode() > 0x007F)
|| (ch == QLatin1Char('*') && i + 1 < n && string.at(i) == QLatin1Char('/'))
|| (ch == QLatin1Char('.') && i > 2 && string.at(i - 2) == QLatin1Char('.'))) {
// we escape '*/' and the last dot in 'e.g.' and 'i.e.' for the Javadoc generator
@@ -3490,7 +3529,7 @@ QString HtmlGenerator::refForNode(const Node *node)
ref = node->name() + "-var";
break;
case Node::Target:
- return protect(node->name());
+ return protectEnc(node->name());
}
return registerRef(ref);
}
@@ -3564,7 +3603,7 @@ void HtmlGenerator::generateFullName(const Node *apparentNode,
}
}
out() << "\">";
- out() << protect(fullName(apparentNode, relative, marker));
+ out() << protectEnc(fullName(apparentNode, relative, marker));
out() << "</a>";
}
@@ -3625,12 +3664,12 @@ void HtmlGenerator::generateDetailedMember(const Node *node,
else if (node->type() == Node::Enum) {
const EnumNode *enume = static_cast<const EnumNode *>(node);
if (enume->flagsType()) {
- out() << "<p>The " << protect(enume->flagsType()->name())
+ out() << "<p>The " << protectEnc(enume->flagsType()->name())
<< " type is a typedef for "
<< "<a href=\"qflags.html\">QFlags</a>&lt;"
- << protect(enume->name())
+ << protectEnc(enume->name())
<< "&gt;. It stores an OR combination of "
- << protect(enume->name())
+ << protectEnc(enume->name())
<< " values.</p>\n";
}
}
@@ -3700,6 +3739,9 @@ void HtmlGenerator::findAllSince(const InnerNode *node)
NewClassMaps::iterator ncmap = newClassMaps.find(sinceVersion);
if (ncmap == newClassMaps.end())
ncmap = newClassMaps.insert(sinceVersion,NodeMap());
+ NewClassMaps::iterator nqcmap = newQmlClassMaps.find(sinceVersion);
+ if (nqcmap == newQmlClassMaps.end())
+ nqcmap = newQmlClassMaps.insert(sinceVersion,NodeMap());
if ((*child)->type() == Node::Function) {
FunctionNode *func = static_cast<FunctionNode *>(*child);
@@ -3719,6 +3761,16 @@ void HtmlGenerator::findAllSince(const InnerNode *node)
nsmap.value().insert(className,(*child));
ncmap.value().insert(className,(*child));
}
+ else if ((*child)->subType() == Node::QmlClass) {
+ QString className = (*child)->name();
+ if ((*child)->parent() &&
+ (*child)->parent()->type() == Node::Namespace &&
+ !(*child)->parent()->name().isEmpty())
+ className = (*child)->parent()->name()+"::"+className;
+ nsmap.value().insert(className,(*child));
+ nqcmap.value().insert(className,(*child));
+ //qDebug() << "findAllSince(): insert" << className << sinceVersion;
+ }
}
else {
QString name = (*child)->name();
@@ -4286,6 +4338,26 @@ void HtmlGenerator::generateQmlInherits(const QmlClassNode* cn,
}
/*!
+ Output the "Inherit by" list for the QML element,
+ if it is inherited by any other elements.
+ */
+void HtmlGenerator::generateQmlInheritedBy(const QmlClassNode* cn,
+ CodeMarker* marker)
+{
+ if (cn) {
+ NodeList subs;
+ QmlClassNode::subclasses(cn->name(),subs);
+ if (!subs.isEmpty()) {
+ Text text;
+ text << Atom::ParaLeft << "Inherited by ";
+ appendSortedQmlNames(text,cn,subs,marker);
+ text << Atom::ParaRight;
+ generateText(text, cn, marker);
+ }
+ }
+}
+
+/*!
Output the "[Xxx instantiates the C++ class QmlGraphicsXxx]"
line for the QML element, if there should be one.
@@ -4347,4 +4419,128 @@ void HtmlGenerator::generateInstantiatedBy(const ClassNode* cn,
}
}
+/*!
+ Generate the <page> element for the given \a node using the \a writer.
+ Return true if a <page> element was written; otherwise return false.
+ */
+bool HtmlGenerator::generatePageElement(QXmlStreamWriter& writer,
+ const Node* node,
+ CodeMarker* marker) const
+{
+ if (node->pageType() == Node::NoPageType)
+ return false;
+ if (node->name().isEmpty())
+ return true;
+ if (node->access() == Node::Private)
+ return false;
+ if (!node->isInnerNode())
+ return false;
+
+ QString title;
+ QString rawTitle;
+ QString fullTitle;
+ const InnerNode* inner = static_cast<const InnerNode*>(node);
+
+ writer.writeStartElement("page");
+ QXmlStreamAttributes attributes;
+ QString t;
+ t.setNum(id++);
+ switch (node->type()) {
+ case Node::Fake:
+ {
+ const FakeNode* fake = static_cast<const FakeNode*>(node);
+ title = fake->fullTitle();
+ break;
+ }
+ case Node::Class:
+ {
+ title = node->name() + " Class Reference";
+ break;
+ }
+ case Node::Namespace:
+ {
+ rawTitle = marker->plainName(inner);
+ fullTitle = marker->plainFullName(inner);
+ title = rawTitle + " Namespace Reference";
+ break;
+ }
+ default:
+ title = node->name();
+ break;
+ }
+ writer.writeAttribute("id",t);
+ writer.writeStartElement("pageWords");
+ writer.writeCharacters(title);
+ if (!inner->pageKeywords().isEmpty()) {
+ const QStringList& w = inner->pageKeywords();
+ for (int i = 0; i < w.size(); ++i) {
+ writer.writeCharacters(" ");
+ writer.writeCharacters(w.at(i).toLocal8Bit().constData());
+ }
+ }
+ writer.writeEndElement();
+ writer.writeStartElement("pageTitle");
+ writer.writeCharacters(title);
+ writer.writeEndElement();
+ writer.writeStartElement("pageUrl");
+ writer.writeCharacters(PageGenerator::fileName(node));
+ writer.writeEndElement();
+ writer.writeStartElement("pageType");
+ switch (node->pageType()) {
+ case Node::ApiPage:
+ writer.writeCharacters("APIPage");
+ break;
+ case Node::ArticlePage:
+ writer.writeCharacters("Article");
+ break;
+ case Node::ExamplePage:
+ writer.writeCharacters("Example");
+ break;
+ default:
+ break;
+ }
+ writer.writeEndElement();
+ writer.writeEndElement();
+ return true;
+}
+
+/*!
+ Traverse the tree recursively and generate the <keyword>
+ elements.
+ */
+void HtmlGenerator::generatePageElements(QXmlStreamWriter& writer, const Node* node, CodeMarker* marker) const
+{
+ if (generatePageElement(writer, node, marker)) {
+
+ if (node->isInnerNode()) {
+ const InnerNode *inner = static_cast<const InnerNode *>(node);
+
+ // Recurse to write an element for this child node and all its children.
+ foreach (const Node *child, inner->childNodes())
+ generatePageElements(writer, child, marker);
+ }
+ }
+}
+
+/*!
+ Outputs the file containing the index used for searching the html docs.
+ */
+void HtmlGenerator::generatePageIndex(const QString& fileName, CodeMarker* marker) const
+{
+ QFile file(fileName);
+ if (!file.open(QFile::WriteOnly | QFile::Text))
+ return ;
+
+ QXmlStreamWriter writer(&file);
+ writer.setAutoFormatting(true);
+ writer.writeStartDocument();
+ writer.writeStartElement("qtPageIndex");
+
+ generatePageElements(writer, myTree->root(), marker);
+
+ writer.writeEndElement(); // qtPageIndex
+ writer.writeEndDocument();
+ file.close();
+}
+
#endif
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index 19a7c78d32..8fe0331f18 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -50,6 +50,7 @@
#include <qmap.h>
#include <qregexp.h>
+#include <QXmlStreamWriter>
#include "codemarker.h"
#include "config.h"
@@ -89,6 +90,7 @@ class HtmlGenerator : public PageGenerator
Typedef,
Property,
Variable,
+ QmlClass,
QmlProperty,
QmlSignal,
QmlMethod,
@@ -104,7 +106,8 @@ class HtmlGenerator : public PageGenerator
virtual QString format();
virtual void generateTree(const Tree *tree, CodeMarker *marker);
- static QString protect(const QString& string);
+ QString protectEnc(const QString &string);
+ static QString protect(const QString &string, const QString &encoding = "ISO-8859-1");
static QString cleanRef(const QString& ref);
static QString sinceTitle(int i) { return sinceTitles[i]; }
@@ -115,7 +118,7 @@ class HtmlGenerator : public PageGenerator
CodeMarker *marker);
virtual void generateClassLikeNode(const InnerNode *inner, CodeMarker *marker);
virtual void generateFakeNode(const FakeNode *fake, CodeMarker *marker);
- virtual QString fileExtension(const Node *node);
+ virtual QString fileExtension(const Node *node) const;
virtual QString refForNode(const Node *node);
virtual QString linkForNode(const Node *node, const Node *relative);
virtual QString refForAtom(Atom *atom, const Node *node);
@@ -183,6 +186,7 @@ class HtmlGenerator : public PageGenerator
const InnerNode *relative,
CodeMarker *marker);
void generateQmlInherits(const QmlClassNode* cn, CodeMarker* marker);
+ void generateQmlInheritedBy(const QmlClassNode* cn, CodeMarker* marker);
void generateQmlInstantiates(const QmlClassNode* qcn, CodeMarker* marker);
void generateInstantiatedBy(const ClassNode* cn, CodeMarker* marker);
#endif
@@ -261,6 +265,14 @@ class HtmlGenerator : public PageGenerator
const Node *relative,
CodeMarker *marker);
void endLink();
+ bool generatePageElement(QXmlStreamWriter& writer,
+ const Node* node,
+ CodeMarker* marker) const;
+ void generatePageElements(QXmlStreamWriter& writer,
+ const Node* node,
+ CodeMarker* marker) const;
+ void generatePageIndex(const QString& fileName,
+ CodeMarker* marker) const;
#if 0
NavigationBar currentNavigationBar;
@@ -315,6 +327,8 @@ class HtmlGenerator : public PageGenerator
NewSinceMaps newSinceMaps;
static QString sinceTitles[];
NewClassMaps newClassMaps;
+ NewClassMaps newQmlClassMaps;
+ static int id;
};
#define HTMLGENERATOR_ADDRESS "address"
diff --git a/tools/qdoc3/jambiapiparser.cpp b/tools/qdoc3/jambiapiparser.cpp
index 3aba1b0997..23f271642f 100644
--- a/tools/qdoc3/jambiapiparser.cpp
+++ b/tools/qdoc3/jambiapiparser.cpp
@@ -43,8 +43,6 @@
jambiapiparser.cpp
*/
-#include <QtXml>
-
#include "cppcodeparser.h"
#include "jambiapiparser.h"
#include "node.h"
diff --git a/tools/qdoc3/javadocgenerator.cpp b/tools/qdoc3/javadocgenerator.cpp
index 001bd2759b..eb9c1c9f7e 100644
--- a/tools/qdoc3/javadocgenerator.cpp
+++ b/tools/qdoc3/javadocgenerator.cpp
@@ -145,7 +145,7 @@ void JavadocGenerator::generateTree(const Tree *tree, CodeMarker *marker)
HtmlGenerator::generateTree(tree, marker);
}
-QString JavadocGenerator::fileExtension(const Node *node)
+QString JavadocGenerator::fileExtension(const Node *node) const
{
if (node->type() == Node::Fake) {
return "html";
diff --git a/tools/qdoc3/javadocgenerator.h b/tools/qdoc3/javadocgenerator.h
index 73452cfc78..b485502f87 100644
--- a/tools/qdoc3/javadocgenerator.h
+++ b/tools/qdoc3/javadocgenerator.h
@@ -61,7 +61,7 @@ public:
QString imageFileName(const Node *relative, const QString &fileBase);
protected:
- QString fileExtension(const Node *node);
+ QString fileExtension(const Node *node) const;
void startText( const Node *relative, CodeMarker *marker );
void endText( const Node *relative, CodeMarker *marker );
int generateAtom( const Atom *atom, const Node *relative, CodeMarker *marker );
diff --git a/tools/qdoc3/linguistgenerator.cpp b/tools/qdoc3/linguistgenerator.cpp
index d1bd22dce0..702f0fb35d 100644
--- a/tools/qdoc3/linguistgenerator.cpp
+++ b/tools/qdoc3/linguistgenerator.cpp
@@ -82,14 +82,14 @@ QString LinguistGenerator::format()
return "Linguist";
}
-QString LinguistGenerator::fileExtension(const Node * /* node */)
+QString LinguistGenerator::fileExtension(const Node * /* node */) const
{
return "ts";
}
void LinguistGenerator::generateClassLikeNode(const InnerNode *inner, CodeMarker *marker)
{
- out().setCodec("utf-8");
+ out().setCodec("UTF-8");
QDomDocument document("TS");
QDomElement documentElement = document.createElement("TS");
@@ -100,7 +100,7 @@ void LinguistGenerator::generateClassLikeNode(const InnerNode *inner, CodeMarker
documentElement.appendChild(element);
QDomProcessingInstruction process = document.createProcessingInstruction(
- "xml", QString("version=\"1.0\" encoding=\"%1\"").arg("utf-8"));
+ "xml", QString("version=\"1.0\" encoding=\"%1\"").arg("UTF-8"));
document.appendChild(process);
document.appendChild(documentElement);
diff --git a/tools/qdoc3/linguistgenerator.h b/tools/qdoc3/linguistgenerator.h
index f7f0606190..979db021dd 100644
--- a/tools/qdoc3/linguistgenerator.h
+++ b/tools/qdoc3/linguistgenerator.h
@@ -70,7 +70,7 @@ protected:
virtual void generateClassLikeNode(const InnerNode *inner,
CodeMarker *marker);
virtual void generateFakeNode( const FakeNode *fake, CodeMarker *marker );
- virtual QString fileExtension(const Node *node);
+ virtual QString fileExtension(const Node *node) const;
QList<QDomElement> generateIndexSections(QDomDocument &document,
const Node *node, CodeMarker *marker);
diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp
index 3d0106d0f1..ea843bab41 100644
--- a/tools/qdoc3/main.cpp
+++ b/tools/qdoc3/main.cpp
@@ -44,7 +44,6 @@
*/
#include <qglobal.h>
-#include <QtCore>
#include <stdlib.h>
#include "apigenerator.h"
#include "codemarker.h"
@@ -72,6 +71,11 @@
#include "tokenizer.h"
#include "tree.h"
+#include "qtranslator.h"
+#ifndef QT_BOOTSTRAPPED
+# include "qcoreapplication.h"
+#endif
+
QT_BEGIN_NAMESPACE
/*
@@ -151,7 +155,9 @@ static void printVersion()
*/
static void processQdocconfFile(const QString &fileName)
{
+#ifndef QT_NO_TRANSLATION
QList<QTranslator *> translators;
+#endif
/*
The Config instance represents the configuration data for qdoc.
@@ -207,6 +213,7 @@ static void processQdocconfFile(const QString &fileName)
CodeParser::initialize(config);
Generator::initialize(config);
+#ifndef QT_NO_TRANSLATION
/*
Load the language translators, if the configuration specifies any.
*/
@@ -221,6 +228,7 @@ static void processQdocconfFile(const QString &fileName)
translators.append(translator);
++fn;
}
+#endif
//QSet<QString> outputLanguages = config.getStringSet(CONFIG_OUTPUTLANGUAGES);
@@ -337,8 +345,9 @@ static void processQdocconfFile(const QString &fileName)
Generate the XML tag file, if it was requested.
*/
QString tagFile = config.getString(CONFIG_TAGFILE);
- if (!tagFile.isEmpty())
+ if (!tagFile.isEmpty()) {
tree->generateTagFile(tagFile);
+ }
tree->setVersion("");
Generator::terminate();
@@ -350,8 +359,9 @@ static void processQdocconfFile(const QString &fileName)
Location::terminate();
QDir::setCurrent(prevCurrentDir);
- foreach (QTranslator *translator, translators)
- delete translator;
+#ifndef QT_NO_TRANSLATION
+ qDeleteAll(translators);
+#endif
delete tree;
}
@@ -361,7 +371,9 @@ int main(int argc, char **argv)
{
QT_USE_NAMESPACE
+#ifndef QT_BOOTSTRAPPED
QCoreApplication app(argc, argv);
+#endif
QString cf = "qsauncompress \1 \2";
PolyArchiveExtractor qsaExtractor(QStringList() << "qsa",cf);
cf = "tar -C \2 -xf \1";
diff --git a/tools/qdoc3/mangenerator.cpp b/tools/qdoc3/mangenerator.cpp
index c3b7780e8e..1e85b73160 100644
--- a/tools/qdoc3/mangenerator.cpp
+++ b/tools/qdoc3/mangenerator.cpp
@@ -187,7 +187,7 @@ void ManGenerator::generateFakeNode( const FakeNode *fake, CodeMarker *marker )
generateFooter();
}
-QString ManGenerator::fileExtension(const Node * /* node */)
+QString ManGenerator::fileExtension(const Node * /* node */) const
{
return "3qt";
}
diff --git a/tools/qdoc3/mangenerator.h b/tools/qdoc3/mangenerator.h
index 284517e6a1..0fca342584 100644
--- a/tools/qdoc3/mangenerator.h
+++ b/tools/qdoc3/mangenerator.h
@@ -63,7 +63,7 @@ protected:
CodeMarker *marker );
virtual void generateClassLikeNode(const InnerNode *node, CodeMarker *marker);
virtual void generateFakeNode( const FakeNode *fake, CodeMarker *marker );
- virtual QString fileExtension(const Node *node);
+ virtual QString fileExtension(const Node *node) const;
private:
void generateHeader( const QString& name );
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index 5796ea4eb8..d4e4196f2d 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -43,8 +43,8 @@
node.cpp
*/
-#include <QtCore>
#include "node.h"
+#include <qdebug.h>
QT_BEGIN_NAMESPACE
@@ -85,12 +85,16 @@ void Node::setDoc(const Doc& doc, bool replace)
}
/*!
+ Construct a node with the given \a type and having the
+ given \a parent and \a name. The new node is added to the
+ parent's child list.
*/
Node::Node(Type type, InnerNode *parent, const QString& name)
: typ(type),
acc(Public),
- sta(Commendable),
saf(UnspecifiedSafeness),
+ pageTyp(NoPageType),
+ sta(Commendable),
par(parent),
rel(0),
nam(name)
@@ -100,6 +104,7 @@ Node::Node(Type type, InnerNode *parent, const QString& name)
}
/*!
+ Returns the node's URL.
*/
QString Node::url() const
{
@@ -107,13 +112,25 @@ QString Node::url() const
}
/*!
+ Sets the node's URL to \a url
*/
void Node::setUrl(const QString &url)
{
u = url;
}
+void Node::setPageType(const QString& t)
+{
+ if ((t == "API") || (t == "api"))
+ pageTyp = ApiPage;
+ else if (t == "article")
+ pageTyp = ArticlePage;
+ else if (t == "example")
+ pageTyp = ExamplePage;
+}
+
/*!
+ Sets the pointer to the node that this node relates to.
*/
void Node::setRelates(InnerNode *pseudoParent)
{
@@ -398,7 +415,7 @@ void InnerNode::deleteChildren()
}
/*!
- Returns true.
+ Returns true because this is an inner node.
*/
bool InnerNode::isInnerNode() const
{
@@ -452,6 +469,9 @@ const EnumNode *InnerNode::findEnumNodeForValue(const QString &enumValue) const
}
/*!
+ Returnds the sequence number of the function node \a func
+ in the list of overloaded functions for a class, such that
+ all the functions have the same name as the \a func.
*/
int InnerNode::overloadNumber(const FunctionNode *func) const
{
@@ -465,6 +485,8 @@ int InnerNode::overloadNumber(const FunctionNode *func) const
}
/*!
+ Returns the number of member functions of a class such that
+ the functions are all named \a funcName.
*/
int InnerNode::numOverloads(const QString& funcName) const
{
@@ -477,6 +499,8 @@ int InnerNode::numOverloads(const QString& funcName) const
}
/*!
+ Returns a node list containing all the member functions of
+ some class such that the functions overload the name \a funcName.
*/
NodeList InnerNode::overloads(const QString &funcName) const
{
@@ -490,10 +514,14 @@ NodeList InnerNode::overloads(const QString &funcName) const
}
/*!
+ Construct an inner node (i.e., not a leaf node) of the
+ given \a type and having the given \a parent and \a name.
*/
InnerNode::InnerNode(Type type, InnerNode *parent, const QString& name)
: Node(type, parent, name)
{
+ if (type == Class)
+ setPageType(ApiPage);
}
/*!
@@ -547,6 +575,7 @@ bool InnerNode::isSameSignature(const FunctionNode *f1, const FunctionNode *f2)
}
/*!
+ Adds the \a child to this node's child list.
*/
void InnerNode::addChild(Node *child)
{
@@ -564,7 +593,7 @@ void InnerNode::addChild(Node *child)
else {
if (child->type() == Enum)
enumChildren.append(child);
- childMap.insert(child->name(), child);
+ childMap.insert(child->name(), child);
}
}
@@ -676,6 +705,8 @@ bool LeafNode::isInnerNode() const
}
/*!
+ Constructs a leaf node named \a name of the specified
+ \a type. The new leaf node becomes a child of \a parent.
*/
LeafNode::LeafNode(Type type, InnerNode *parent, const QString& name)
: Node(type, parent, name)
@@ -687,10 +718,12 @@ LeafNode::LeafNode(Type type, InnerNode *parent, const QString& name)
*/
/*!
+ Constructs a namespace node.
*/
NamespaceNode::NamespaceNode(InnerNode *parent, const QString& name)
: InnerNode(Namespace, parent, name)
{
+ setPageType(ApiPage);
}
/*!
@@ -698,11 +731,13 @@ NamespaceNode::NamespaceNode(InnerNode *parent, const QString& name)
*/
/*!
+ Constructs a class node. A class node will generate an API page.
*/
ClassNode::ClassNode(InnerNode *parent, const QString& name)
: InnerNode(Class, parent, name)
{
hidden = false;
+ setPageType(ApiPage);
}
/*!
@@ -759,11 +794,28 @@ void ClassNode::fixBaseClasses()
/*!
The type of a FakeNode is Fake, and it has a \a subtype,
- which specifies the type of FakeNode.
+ which specifies the type of FakeNode. The page type for
+ the page index is set here.
*/
FakeNode::FakeNode(InnerNode *parent, const QString& name, SubType subtype)
: InnerNode(Fake, parent, name), sub(subtype)
{
+ switch (subtype) {
+ case Module:
+ case Page:
+ case Group:
+ setPageType(ArticlePage);
+ break;
+ case QmlClass:
+ case QmlBasicType:
+ setPageType(ApiPage);
+ break;
+ case Example:
+ setPageType(ExamplePage);
+ break;
+ default:
+ break;
+ }
}
/*!
@@ -1109,7 +1161,8 @@ QString FunctionNode::signature(bool values) const
*/
void FunctionNode::debug() const
{
- qDebug() << "QML METHOD" << name() << "rt" << rt << "pp" << pp;
+ qDebug("QML METHOD %s rt %s pp %s",
+ qPrintable(name()), qPrintable(rt), qPrintable(pp.join(" ")));
}
/*!
@@ -1205,9 +1258,14 @@ bool TargetNode::isInnerNode() const
#ifdef QDOC_QML
bool QmlClassNode::qmlOnly = false;
+QMultiMap<QString,Node*> QmlClassNode::inheritedBy;
/*!
- Constructor for the Qml class node.
+ Constructs a Qml class node (i.e. a Fake node with the
+ subtype QmlClass. The new node has the given \a parent
+ and \a name and is associated with the C++ class node
+ specified by \a cn which may be null if the the Qml
+ class node is not associated with a C++ class node.
*/
QmlClassNode::QmlClassNode(InnerNode *parent,
const QString& name,
@@ -1218,6 +1276,23 @@ QmlClassNode::QmlClassNode(InnerNode *parent,
}
/*!
+ I made this so I could print a debug message here.
+ */
+QmlClassNode::~QmlClassNode()
+{
+ qDebug() << "Deleting QmlClassNode:" << name();
+}
+
+/*!
+ Clear the multimap so that subsequent runs don't try to use
+ nodes from a previous run.
+ */
+void QmlClassNode::clear()
+{
+ inheritedBy.clear();
+}
+
+/*!
The base file name for this kind of node has "qml_"
prepended to it.
@@ -1234,6 +1309,41 @@ QString QmlClassNode::fileBase() const
}
/*!
+ Record the fact that QML class \a base is inherited by
+ QML class \a sub.
+ */
+void QmlClassNode::addInheritedBy(const QString& base, Node* sub)
+{
+ inheritedBy.insert(base,sub);
+ qDebug() << "QmlClassNode::addInheritedBy(): insert" << base << sub->name() << inheritedBy.size();
+}
+
+/*!
+ Loads the list \a subs with the nodes of all the subclasses of \a base.
+ */
+void QmlClassNode::subclasses(const QString& base, NodeList& subs)
+{
+ subs.clear();
+ if (inheritedBy.count(base) > 0) {
+ subs = inheritedBy.values(base);
+ qDebug() << "QmlClassNode::subclasses():" << inheritedBy.count(base) << base
+ << "subs:" << subs.size() << "total size:" << inheritedBy.size();
+ }
+}
+
+/*!
+ Constructs a Qml basic type node (i.e. a Fake node with
+ the subtype QmlBasicType. The new node has the given
+ \a parent and \a name.
+ */
+QmlBasicTypeNode::QmlBasicTypeNode(InnerNode *parent,
+ const QString& name)
+ : FakeNode(parent, name, QmlBasicType)
+{
+ setTitle(name);
+}
+
+/*!
Constructor for the Qml property group node. \a parent is
always a QmlClassNode.
*/
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index c77fbeba6c..1017813f43 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -96,7 +96,8 @@ class Node
#ifdef QDOC_QML
ExternalPage,
QmlClass,
- QmlPropertyGroup
+ QmlPropertyGroup,
+ QmlBasicType
#else
ExternalPage
#endif
@@ -136,6 +137,13 @@ class Node
AppendixLink */
};
+ enum PageType {
+ NoPageType,
+ ApiPage,
+ ArticlePage,
+ ExamplePage
+ };
+
virtual ~Node();
void setAccess(Access access) { acc = access; }
@@ -149,6 +157,8 @@ class Node
void setLink(LinkType linkType, const QString &link, const QString &desc);
void setUrl(const QString &url);
void setTemplateStuff(const QString &templateStuff) { tpl = templateStuff; }
+ void setPageType(PageType t) { pageTyp = t; }
+ void setPageType(const QString& t);
virtual bool isInnerNode() const = 0;
virtual bool isReimp() const { return false; }
@@ -172,6 +182,8 @@ class Node
ThreadSafeness inheritedThreadSafeness() const;
QString since() const { return sinc; }
QString templateStuff() const { return tpl; }
+ PageType pageType() const { return pageTyp; }
+ virtual void addPageKeywords(const QString& ) { }
void clearRelated() { rel = 0; }
@@ -185,13 +197,15 @@ class Node
#ifdef Q_WS_WIN
Type typ;
Access acc;
- Status sta;
ThreadSafeness saf;
+ PageType pageTyp;
+ Status sta;
#else
Type typ : 4;
Access acc : 2;
- Status sta : 3;
ThreadSafeness saf : 2;
+ PageType pageTyp : 4;
+ Status sta : 3;
#endif
InnerNode *par;
InnerNode *rel;
@@ -243,6 +257,8 @@ class InnerNode : public Node
QStringList primaryKeys();
QStringList secondaryKeys();
+ const QStringList& pageKeywords() const { return pageKeywds; }
+ virtual void addPageKeywords(const QString& t) { pageKeywds << t; }
protected:
InnerNode(Type type, InnerNode *parent, const QString& name);
@@ -255,6 +271,7 @@ class InnerNode : public Node
void removeChild(Node *child);
void removeRelated(Node *pseudoChild);
+ QStringList pageKeywds;
QStringList inc;
NodeList children;
NodeList enumChildren;
@@ -362,15 +379,28 @@ class QmlClassNode : public FakeNode
QmlClassNode(InnerNode *parent,
const QString& name,
const ClassNode* cn);
- virtual ~QmlClassNode() { }
+ virtual ~QmlClassNode();
const ClassNode* classNode() const { return cnode; }
virtual QString fileBase() const;
+ static void addInheritedBy(const QString& base, Node* sub);
+ static void subclasses(const QString& base, NodeList& subs);
+ static void clear();
+ public:
static bool qmlOnly;
+ static QMultiMap<QString,Node*> inheritedBy;
private:
- const ClassNode* cnode;
+ const ClassNode* cnode;
+};
+
+class QmlBasicTypeNode : public FakeNode
+{
+ public:
+ QmlBasicTypeNode(InnerNode *parent,
+ const QString& name);
+ virtual ~QmlBasicTypeNode() { }
};
class QmlPropGroupNode : public FakeNode
diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp
index a001c10212..f0f14fedcd 100644
--- a/tools/qdoc3/pagegenerator.cpp
+++ b/tools/qdoc3/pagegenerator.cpp
@@ -43,7 +43,6 @@
pagegenerator.cpp
*/
-#include <QtCore>
#include <qfile.h>
#include <qfileinfo.h>
@@ -77,7 +76,7 @@ void PageGenerator::generateTree(const Tree *tree, CodeMarker *marker)
generateInnerNode(tree->root(), marker);
}
-QString PageGenerator::fileBase(const Node *node)
+QString PageGenerator::fileBase(const Node *node) const
{
if (node->relates())
node = node->relates();
@@ -104,7 +103,8 @@ QString PageGenerator::fileBase(const Node *node)
we prepend "qml-" to the file name of QML element doc
files.
*/
- if (p->subType() == Node::QmlClass) {
+ if ((p->subType() == Node::QmlClass) ||
+ (p->subType() == Node::QmlBasicType)) {
base.prepend("qml-");
}
#endif
@@ -152,7 +152,7 @@ QString PageGenerator::fileBase(const Node *node)
return res;
}
-QString PageGenerator::fileName(const Node *node)
+QString PageGenerator::fileName(const Node *node) const
{
if (!node->url().isEmpty())
return node->url();
@@ -176,7 +176,7 @@ void PageGenerator::beginSubPage(const Location& location,
location.fatal(tr("Cannot open output file '%1'")
.arg(outFile->fileName()));
QTextStream *out = new QTextStream(outFile);
- out->setCodec("ISO-8859-1");
+ out->setCodec(outputCodec);
outStreamStack.push(out);
}
@@ -209,6 +209,10 @@ void PageGenerator::generateInnerNode(const InnerNode *node,
if (fakeNode->subType() == Node::QmlPropertyGroup)
return;
#endif
+ if (fakeNode->subType() == Node::Page) {
+ if (node->count() > 0)
+ qDebug("PAGE %s HAS CHILDREN", qPrintable(fakeNode->title()));
+ }
}
if (node->parent() != 0) {
diff --git a/tools/qdoc3/pagegenerator.h b/tools/qdoc3/pagegenerator.h
index db24eddd60..7ab7e5e846 100644
--- a/tools/qdoc3/pagegenerator.h
+++ b/tools/qdoc3/pagegenerator.h
@@ -54,6 +54,8 @@
QT_BEGIN_NAMESPACE
+class QTextCodec;
+
class ClassNode;
class InnerNode;
class NamespaceNode;
@@ -67,15 +69,19 @@ class PageGenerator : public Generator
virtual void generateTree(const Tree *tree, CodeMarker *marker);
protected:
- virtual QString fileBase(const Node *node);
- virtual QString fileExtension(const Node *node) = 0;
- QString fileName(const Node *node);
+ virtual QString fileBase(const Node *node) const;
+ virtual QString fileExtension(const Node *node) const = 0;
+ QString fileName(const Node *node) const;
QString outFileName();
void beginSubPage(const Location& location, const QString& fileName);
void endSubPage();
virtual void generateInnerNode(const InnerNode *node, CodeMarker *marker);
QTextStream& out();
+ QString naturalLanguage;
+ QString outputEncoding;
+ QTextCodec *outputCodec;
+
private:
QStack<QTextStream *> outStreamStack;
};
diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro
index 441bf397df..e394799380 100644
--- a/tools/qdoc3/qdoc3.pro
+++ b/tools/qdoc3/qdoc3.pro
@@ -4,9 +4,16 @@ DEFINES += QT_NO_CAST_TO_ASCII
#DEFINES += QT_USE_FAST_OPERATOR_PLUS
#DEFINES += QT_USE_FAST_CONCATENATION
-QT = core xml
-CONFIG += console
-CONFIG -= debug_and_release_target
+qdoc_bootstrapped {
+ include(../../src/tools/bootstrap/bootstrap.pri)
+ DEFINES -= QT_NO_CAST_FROM_ASCII
+ DEFINES += QT_NO_TRANSLATION
+} else {
+ QT = core xml
+ CONFIG += console
+ CONFIG -= debug_and_release_target
+}
+
!isEmpty(QT_BUILD_TREE):DESTDIR = $$QT_BUILD_TREE/bin
#CONFIG += debug
build_all:!build_pass {
@@ -14,7 +21,8 @@ build_all:!build_pass {
CONFIG += release
# CONFIG += debug
}
-mac:CONFIG -= app_bundle
+
+CONFIG -= app_bundle
HEADERS += apigenerator.h \
archiveextractor.h \
atom.h \
@@ -105,5 +113,26 @@ SOURCES += apigenerator.cpp \
webxmlgenerator.cpp \
yyindent.cpp
+### Documentation for qdoc3 ###
+
+win32:!win32-g++ {
+ unixstyle = false
+} else :win32-g++:isEmpty(QMAKE_SH) {
+ unixstyle = false
+} else {
+ unixstyle = true
+}
+
+$$unixstyle {
+ QDOC = cd $$PWD/doc && $$[QT_INSTALL_BINS]/qdoc3
+} else {
+ QDOC = cd $$PWD/doc && $$[QT_INSTALL_BINS]/qdoc3.exe
+ QDOC = $$replace(QDOC, "/", "\\")
+}
+
+docs.commands = $$QDOC qdoc-manual.qdocconf
+
+QMAKE_EXTRA_TARGETS += docs
+
target.path = $$[QT_INSTALL_BINS]
INSTALLS += target
diff --git a/tools/qdoc3/qsakernelparser.cpp b/tools/qdoc3/qsakernelparser.cpp
index 9320a178cb..8f12eda956 100644
--- a/tools/qdoc3/qsakernelparser.cpp
+++ b/tools/qdoc3/qsakernelparser.cpp
@@ -70,8 +70,8 @@ void QsaKernelParser::parseSourceFile( const Location& location,
const QString& filePath,
Tree * /* tree */ )
{
- FILE *in = fopen( QFile::encodeName(filePath), "r" );
- if ( in == 0 ) {
+ QFile in(filePath);
+ if (!in.open(QIODevice::ReadOnly)) {
location.error( tr("Cannot open QSA kernel file '%1'").arg(filePath) );
return;
}
@@ -171,7 +171,7 @@ void QsaKernelParser::parseSourceFile( const Location& location,
readToken();
}
}
- fclose( in );
+ in.close();
}
void QsaKernelParser::doneParsingSourceFiles( Tree * /* tree */ )
diff --git a/tools/qdoc3/qscodeparser.cpp b/tools/qdoc3/qscodeparser.cpp
index 8b3bc989e7..3b8bc1a47e 100644
--- a/tools/qdoc3/qscodeparser.cpp
+++ b/tools/qdoc3/qscodeparser.cpp
@@ -151,8 +151,8 @@ void QsCodeParser::parseHeaderFile(const Location& location,
{
qsTre = tree;
- FILE *in = fopen(QFile::encodeName(filePath), "r");
- if (in == 0) {
+ QFile in(filePath);
+ if (!in.open(QIODevice::ReadOnly)) {
location.error(tr("Cannot open Qt Script class list '%1'")
.arg(filePath));
return;
@@ -175,7 +175,7 @@ void QsCodeParser::parseHeaderFile(const Location& location,
}
tok = fileTokenizer.getToken();
}
- fclose(in);
+ in.close();
}
void QsCodeParser::parseSourceFile(const Location& location,
diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf
index f03d970893..63455f10b7 100644
--- a/tools/qdoc3/test/assistant.qdocconf
+++ b/tools/qdoc3/test/assistant.qdocconf
@@ -6,18 +6,18 @@ include(qt-defines.qdocconf)
project = Qt Assistant
description = Qt Assistant Manual
-url = http://qt.nokia.com/doc/4.6
+url = http://qt.nokia.com/doc/4.7
indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = Assistant
qhp.Assistant.file = assistant.qhp
-qhp.Assistant.namespace = com.trolltech.assistant.460
+qhp.Assistant.namespace = com.trolltech.assistant.470
qhp.Assistant.virtualFolder = qdoc
qhp.Assistant.indexTitle = Qt Assistant Manual
qhp.Assistant.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png
-qhp.Assistant.filterAttributes = qt 4.6.3 tools assistant
+qhp.Assistant.filterAttributes = qt 4.7.0 tools assistant
qhp.Assistant.customFilters.Assistant.name = Qt Assistant Manual
qhp.Assistant.customFilters.Assistant.filterAttributes = qt tools assistant
qhp.Assistant.subprojects = manual examples
diff --git a/tools/qdoc3/test/designer.qdocconf b/tools/qdoc3/test/designer.qdocconf
index 0c3e05bb65..b0c88f109c 100644
--- a/tools/qdoc3/test/designer.qdocconf
+++ b/tools/qdoc3/test/designer.qdocconf
@@ -6,18 +6,18 @@ include(qt-defines.qdocconf)
project = Qt Designer
description = Qt Designer Manual
-url = http://qt.nokia.com/doc/4.6
+url = http://qt.nokia.com/doc/4.7
indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = Designer
qhp.Designer.file = designer.qhp
-qhp.Designer.namespace = com.trolltech.designer.460
+qhp.Designer.namespace = com.trolltech.designer.470
qhp.Designer.virtualFolder = qdoc
qhp.Designer.indexTitle = Qt Designer Manual
qhp.Designer.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png
-qhp.Designer.filterAttributes = qt 4.6.3 tools designer
+qhp.Designer.filterAttributes = qt 4.7.0 tools designer
qhp.Designer.customFilters.Designer.name = Qt Designer Manual
qhp.Designer.customFilters.Designer.filterAttributes = qt tools designer
qhp.Designer.subprojects = manual examples
diff --git a/tools/qdoc3/test/linguist.qdocconf b/tools/qdoc3/test/linguist.qdocconf
index 739f4af9e0..6acd2c68dd 100644
--- a/tools/qdoc3/test/linguist.qdocconf
+++ b/tools/qdoc3/test/linguist.qdocconf
@@ -6,18 +6,18 @@ include(qt-defines.qdocconf)
project = Qt Linguist
description = Qt Linguist Manual
-url = http://qt.nokia.com/doc/4.6
+url = http://qt.nokia.com/doc/4.7
indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = Linguist
qhp.Linguist.file = linguist.qhp
-qhp.Linguist.namespace = com.trolltech.linguist.460
+qhp.Linguist.namespace = com.trolltech.linguist.470
qhp.Linguist.virtualFolder = qdoc
qhp.Linguist.indexTitle = Qt Linguist Manual
qhp.Linguist.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png
-qhp.Linguist.filterAttributes = qt 4.6.3 tools linguist
+qhp.Linguist.filterAttributes = qt 4.7.0 tools linguist
qhp.Linguist.customFilters.Linguist.name = Qt Linguist Manual
qhp.Linguist.customFilters.Linguist.filterAttributes = qt tools linguist
qhp.Linguist.subprojects = manual examples
diff --git a/tools/qdoc3/test/qdeclarative.qdocconf b/tools/qdoc3/test/qdeclarative.qdocconf
new file mode 100644
index 0000000000..e5b883a1e4
--- /dev/null
+++ b/tools/qdoc3/test/qdeclarative.qdocconf
@@ -0,0 +1,80 @@
+include(compat.qdocconf)
+include(macros.qdocconf)
+include(qt-cpp-ignore.qdocconf)
+include(qt-html-templates.qdocconf)
+include(qt-defines.qdocconf)
+
+project = Qml
+description = Qml Reference Documentation
+url = http://qt.nokia.com/doc/4.6/
+qmlonly = true
+
+edition.Console.modules = QtCore QtDBus QtNetwork QtScript QtSql QtXml \
+ QtXmlPatterns QtTest
+edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript QtSql QtSvg \
+ QtWebKit QtXml QtXmlPatterns Qt3Support QtHelp \
+ QtDesigner QtAssistant QAxContainer Phonon \
+ QAxServer QtUiTools QtTest QtDBus
+edition.DesktopLight.modules = QtCore QtDBus QtGui Qt3SupportLight QtTest
+edition.DesktopLight.groups = -graphicsview-api
+
+qhp.projects = Qml
+
+qhp.Qml.file = qml.qhp
+qhp.Qml.namespace = com.trolltech.qml.460
+qhp.Qml.virtualFolder = qdoc
+qhp.Qml.indexTitle = Qml Reference
+
+# Files not referenced in any qdoc file
+# See also extraimages.HTML
+qhp.Qml.extraFiles = classic.css \
+ images/qt-logo.png
+
+qhp.Qml.filterAttributes = qt 4.6.0 qtrefdoc
+qhp.Qml.customFilters.Qt.name = Qt 4.6.0
+qhp.Qml.customFilters.Qt.filterAttributes = qt 4.6.0
+qhp.Qml.subprojects = classes
+qhp.Qml.subprojects.classes.title = Elements
+qhp.Qml.subprojects.classes.indexTitle = Qml Elements
+qhp.Qml.subprojects.classes.selectors = fake:qmlclass
+qhp.Qml.subprojects.classes.sortPages = true
+
+language = Cpp
+
+headerdirs = $QT_SOURCE_TREE/src/declarative
+sourcedirs = $QT_SOURCE_TREE/src/declarative \
+ $QT_SOURCE_TREE/doc/src/declarative
+
+sources += $QT_SOURCE_TREE/doc/src/tutorials/declarative.qdoc
+
+sources.fileextensions = "*.cpp *.qdoc"
+examples.fileextensions = "*.cpp *.h *.js *.qml"
+
+exampledirs = $QT_SOURCE_TREE/doc/src \
+ $QT_SOURCE_TREE/examples \
+ $QT_SOURCE_TREE/examples/tutorials \
+ $QT_SOURCE_TREE \
+ $QT_SOURCE_TREE/qmake/examples \
+ $QT_SOURCE_TREE/src/3rdparty/webkit/WebKit/qt/docs
+imagedirs = $QT_SOURCE_TREE/doc/src/images \
+ $QT_SOURCE_TREE/examples \
+ $QT_SOURCE_TREE/doc/src/declarative/pics
+outputdir = $QT_BUILD_TREE/doc-build/html-qml
+tagfile = $QT_BUILD_TREE/doc-build/html-qml/qt.tags
+base = file:$QT_BUILD_TREE/doc/html-qml
+
+HTML.stylesheets = classic.css
+
+HTML.postheader = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n" \
+ "<tr>\n" \
+ "<td align=\"left\" valign=\"top\">" \
+ "<img src=\"images/qt-logo.png\" align=\"left\" border=\"0\"/>" \
+ "</td>\n" \
+ "<td width=\"1\">&nbsp;&nbsp;</td>" \
+ "<td class=\"postheader\" valign=\"center\" align=\"left\">" \
+ "<a href=\"qmlreference.html\">" \
+ "<font color=\"#004faf\">Home</font></a>&nbsp;&middot;" \
+ " <a href=\"qmlelements.html\">" \
+ "<font color=\"#004faf\">Elements</font></a>" \
+ "</td>\n" \
+ "</tr></table>"
diff --git a/tools/qdoc3/test/qmake.qdocconf b/tools/qdoc3/test/qmake.qdocconf
index 696949e537..76e7012d78 100644
--- a/tools/qdoc3/test/qmake.qdocconf
+++ b/tools/qdoc3/test/qmake.qdocconf
@@ -6,18 +6,18 @@ include(qt-defines.qdocconf)
project = QMake
description = QMake Manual
-url = http://qt.nokia.com/doc/4.6
+url = http://qt.nokia.com/doc/4.7
indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = qmake
qhp.qmake.file = qmake.qhp
-qhp.qmake.namespace = com.trolltech.qmake.460
+qhp.qmake.namespace = com.trolltech.qmake.470
qhp.qmake.virtualFolder = qdoc
qhp.qmake.indexTitle = QMake Manual
qhp.qmake.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png
-qhp.qmake.filterAttributes = qt 4.6.3 tools qmake
+qhp.qmake.filterAttributes = qt 4.7.0 tools qmake
qhp.qmake.customFilters.qmake.name = qmake Manual
qhp.qmake.customFilters.qmake.filterAttributes = qt tools qmake
qhp.qmake.subprojects = manual
diff --git a/tools/qdoc3/test/qt-api-only_zh_CN.qdocconf b/tools/qdoc3/test/qt-api-only_zh_CN.qdocconf
new file mode 100644
index 0000000000..c722ee8874
--- /dev/null
+++ b/tools/qdoc3/test/qt-api-only_zh_CN.qdocconf
@@ -0,0 +1,30 @@
+include(qt-build-docs_zh_CN.qdocconf)
+
+# Ensures that the generated index contains a URL that can be used by the
+# tools documentation (assistant.qdocconf, designer.qdocconf, linguist.qdocconf,
+# qmake.qdocconf).
+
+url = ./
+
+# Ensures that the documentation for the tools is not included in the generated
+# .qhp file.
+
+qhp.Qt.excluded += $QT_SOURCE_TREE/doc/src/development/assistant-manual.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/simpletextviewer.qdoc \
+ $QT_SOURCE_TREE/doc/src/development/designer-manual.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/calculatorbuilder.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/calculatorform.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/customwidgetplugin.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/taskmenuextension.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/containerextension.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/worldtimeclockbuilder.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/worldtimeclockplugin.qdoc \
+ $QT_SOURCE_TREE/doc/src/internationalization/linguist-manual.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/hellotr.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/arrowpad.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/trollprint.qdoc \
+ $QT_SOURCE_TREE/doc/src/development/qmake-manual.qdoc
+
+outputdir = $QT_BUILD_TREE/doc-build/html-qt_zh_CN
+tagfile = $QT_BUILD_TREE/doc-build/html-qt_zh_CN/qt.tags
+base = file:$QT_BUILD_TREE/doc-build/html-qt_zh_CN
diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf
index d7a06b875c..fb2c3c1c5d 100644
--- a/tools/qdoc3/test/qt-build-docs.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs.qdocconf
@@ -6,19 +6,16 @@ include(qt-defines.qdocconf)
project = Qt
description = Qt Reference Documentation
-url = http://qt.nokia.com/doc/4.6
+url = http://qt.nokia.com/doc/4.7
-edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg \
- QtWebKit QtXml QtXmlPatterns Qt3Support QtHelp \
- QtDesigner QtAssistant QAxContainer Phonon \
- QAxServer QtUiTools QtTest QtDBus
-edition.DesktopLight.modules = QtCore QtDBus QtGui Qt3SupportLight QtTest
-edition.DesktopLight.groups = -graphicsview-api
+sourceencoding = UTF-8
+outputencoding = UTF-8
+naturallanguage = en_US
qhp.projects = Qt
qhp.Qt.file = qt.qhp
-qhp.Qt.namespace = com.trolltech.qt.460
+qhp.Qt.namespace = com.trolltech.qt.470
qhp.Qt.virtualFolder = qdoc
qhp.Qt.indexTitle = Qt Reference Documentation
qhp.Qt.indexRoot =
@@ -32,9 +29,9 @@ qhp.Qt.extraFiles = classic.css \
images/dynamiclayouts-example.png \
images/stylesheet-coffee-plastique.png
-qhp.Qt.filterAttributes = qt 4.6.3 qtrefdoc
-qhp.Qt.customFilters.Qt.name = Qt 4.6.3
-qhp.Qt.customFilters.Qt.filterAttributes = qt 4.6.3
+qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc
+qhp.Qt.customFilters.Qt.name = Qt 4.7.0
+qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0
qhp.Qt.subprojects = classes overviews examples
qhp.Qt.subprojects.classes.title = Classes
qhp.Qt.subprojects.classes.indexTitle = Qt's Classes
@@ -89,14 +86,16 @@ excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \
$QT_SOURCE_TREE/src/3rdparty/webkit/WebCore \
$QT_SOURCE_TREE/src/3rdparty/wintab \
$QT_SOURCE_TREE/src/3rdparty/zlib \
- $QT_SOURCE_TREE/doc/src/snippets \
$QT_SOURCE_TREE/src/3rdparty/phonon/gstreamer \
$QT_SOURCE_TREE/src/3rdparty/phonon/ds9 \
$QT_SOURCE_TREE/src/3rdparty/phonon/qt7 \
- $QT_SOURCE_TREE/src/3rdparty/phonon/waveout
+ $QT_SOURCE_TREE/src/3rdparty/phonon/mmf \
+ $QT_SOURCE_TREE/src/3rdparty/phonon/waveout \
+ $QT_SOURCE_TREE/doc/src/snippets \
+ $QT_SOURCE_TREE/doc/src/zh_CN
sources.fileextensions = "*.cpp *.qdoc *.mm"
-examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp"
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml"
examples.imageextensions = "*.png"
exampledirs = $QT_SOURCE_TREE/doc/src \
@@ -106,7 +105,8 @@ exampledirs = $QT_SOURCE_TREE/doc/src \
$QT_SOURCE_TREE/qmake/examples \
$QT_SOURCE_TREE/src/3rdparty/webkit/WebKit/qt/docs
imagedirs = $QT_SOURCE_TREE/doc/src/images \
- $QT_SOURCE_TREE/examples
+ $QT_SOURCE_TREE/examples \
+ $QT_SOURCE_TREE/doc/src/declarative/pics
outputdir = $QT_BUILD_TREE/doc/html
tagfile = $QT_BUILD_TREE/doc/html/qt.tags
base = file:$QT_BUILD_TREE/doc/html
diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
new file mode 100644
index 0000000000..7a77f54f9d
--- /dev/null
+++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
@@ -0,0 +1,84 @@
+include(compat.qdocconf)
+include(macros.qdocconf)
+include(qt-cpp-ignore.qdocconf)
+include(qt-html-templates_zh_CN.qdocconf)
+include(qt-defines.qdocconf)
+
+project = Qt
+description = Qt Reference Documentation
+url = http://qt.nokia.com/doc/zh_CN/4.7
+
+sourceencoding = UTF-8
+outputencoding = UTF-8
+naturallanguage = zh-Hans
+
+indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
+
+qhp.projects = Qt
+
+qhp.Qt.file = qt.qhp
+qhp.Qt.namespace = com.trolltech.qt.470
+qhp.Qt.virtualFolder = qdoc
+qhp.Qt.title = 教程
+qhp.Qt.indexTitle = 教程
+qhp.Qt.selectors = fake:example
+
+qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc zh_CN
+qhp.Qt.customFilters.Qt.name = Qt 4.7.0
+qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0
+
+# Files not referenced in any qdoc file (last four are needed by qtdemo)
+# See also extraimages.HTML
+qhp.Qt.extraFiles = classic.css \
+ images/qt-logo.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ images/stylesheet-coffee-plastique.png
+
+language = Cpp
+
+sourcedirs = $QT_SOURCE_TREE/doc/src/zh_CN
+
+excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \
+ $QT_SOURCE_TREE/src/3rdparty/des \
+ $QT_SOURCE_TREE/src/3rdparty/freetype \
+ $QT_SOURCE_TREE/src/3rdparty/harfbuzz \
+ $QT_SOURCE_TREE/src/3rdparty/kdebase \
+ $QT_SOURCE_TREE/src/3rdparty/libjpeg \
+ $QT_SOURCE_TREE/src/3rdparty/libmng \
+ $QT_SOURCE_TREE/src/3rdparty/libpng \
+ $QT_SOURCE_TREE/src/3rdparty/libtiff \
+ $QT_SOURCE_TREE/src/3rdparty/md4 \
+ $QT_SOURCE_TREE/src/3rdparty/md5 \
+ $QT_SOURCE_TREE/src/3rdparty/patches \
+ $QT_SOURCE_TREE/src/3rdparty/sha1 \
+ $QT_SOURCE_TREE/src/3rdparty/sqlite \
+ $QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore \
+ $QT_SOURCE_TREE/src/3rdparty/webkit/WebCore \
+ $QT_SOURCE_TREE/src/3rdparty/wintab \
+ $QT_SOURCE_TREE/src/3rdparty/zlib \
+ $QT_SOURCE_TREE/doc/src/snippets \
+ $QT_SOURCE_TREE/src/3rdparty/phonon/gstreamer \
+ $QT_SOURCE_TREE/src/3rdparty/phonon/ds9 \
+ $QT_SOURCE_TREE/src/3rdparty/phonon/qt7 \
+ $QT_SOURCE_TREE/src/3rdparty/phonon/mmf \
+ $QT_SOURCE_TREE/src/3rdparty/phonon/waveout
+
+sources.fileextensions = "*.cpp *.qdoc *.mm"
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp"
+examples.imageextensions = "*.png"
+
+exampledirs = $QT_SOURCE_TREE/doc/src \
+ $QT_SOURCE_TREE/examples \
+ $QT_SOURCE_TREE/examples/tutorials \
+ $QT_SOURCE_TREE \
+ $QT_SOURCE_TREE/qmake/examples \
+ $QT_SOURCE_TREE/src/3rdparty/webkit/WebKit/qt/docs
+imagedirs = $QT_SOURCE_TREE/doc/src/images \
+ $QT_SOURCE_TREE/examples
+outputdir = $QT_BUILD_TREE/doc/html_zh_CN
+tagfile = $QT_BUILD_TREE/doc/html_zh_CN/qt.tags
+base = file:$QT_BUILD_TREE/doc/html_zh_CN
+
+HTML.generatemacrefs = "true"
diff --git a/tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf b/tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf
new file mode 100644
index 0000000000..5fb68cff52
--- /dev/null
+++ b/tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf
@@ -0,0 +1,25 @@
+HTML.stylesheets = classic.css
+HTML.postheader = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n" \
+ "<tr>\n" \
+ "<td align=\"left\" valign=\"top\" width=\"32\">" \
+ "<a href=\"http://qt.nokia.com/\"><img src=\"images/qt-logo.png\" align=\"left\" border=\"0\" /></a>" \
+ "</td>\n" \
+ "<td width=\"1\">&nbsp;&nbsp;</td>" \
+ "<td class=\"postheader\" valign=\"center\">" \
+ "<a href=\"http://qt.nokia.com/doc/4.7/index.html\">" \
+ "<font color=\"#004faf\">主页</font></a>&nbsp;&middot;" \
+ " <a href=\"http://qt.nokia.com/doc/4.7/classes.html\">" \
+ "<font color=\"#004faf\">所有类</font></a>&nbsp;&middot;" \
+ " <a href=\"http://qt.nokia.com/doc/4.7/functions.html\">" \
+ "<font color=\"#004faf\">所有函数</font></a>&nbsp;&middot;" \
+ " <a href=\"http://qt.nokia.com/doc/4.7/overviews.html\">" \
+ "<font color=\"#004faf\">简介</font></a>" \
+ "</td>" \
+ "</tr></table>"
+
+HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
+ "<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \
+ "<td width=\"40%\" align=\"left\">版æƒæ‰€æœ‰ &copy; 2010 诺基亚公å¸å’Œ/或其å­å…¬å¸</td>\n" \
+ "<td width=\"20%\" align=\"center\"><a href=\"trademarks.html\">商标</a></td>\n" \
+ "<td width=\"40%\" align=\"right\"><div align=\"right\">Qt \\version</div></td>\n" \
+ "</tr></table></div></address>"
diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf
index d5a2995cdf..d8b913694a 100644
--- a/tools/qdoc3/test/qt.qdocconf
+++ b/tools/qdoc3/test/qt.qdocconf
@@ -8,19 +8,16 @@ project = Qt
versionsym =
version = %VERSION%
description = Qt Reference Documentation
-url = http://qt.nokia.com/doc/4.6
+url = http://qt.nokia.com/doc/4.7
-edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg \
- QtWebKit QtXml QtXmlPatterns Qt3Support QtHelp \
- QtDesigner QtAssistant QAxContainer Phonon \
- QAxServer QtUiTools QtTest QtDBus
-edition.DesktopLight.modules = QtCore QtDBus QtGui Qt3SupportLight QtTest
-edition.DesktopLight.groups = -graphicsview-api
+sourceencoding = UTF-8
+outputencoding = UTF-8
+naturallanguage = en_US
qhp.projects = Qt
qhp.Qt.file = qt.qhp
-qhp.Qt.namespace = com.trolltech.qt.460
+qhp.Qt.namespace = com.trolltech.qt.470
qhp.Qt.virtualFolder = qdoc
qhp.Qt.indexTitle = Qt Reference Documentation
qhp.Qt.indexRoot =
@@ -34,9 +31,9 @@ qhp.Qt.extraFiles = classic.css \
images/dynamiclayouts-example.png \
images/stylesheet-coffee-plastique.png
-qhp.Qt.filterAttributes = qt 4.6.3 qtrefdoc
-qhp.Qt.customFilters.Qt.name = Qt 4.6.3
-qhp.Qt.customFilters.Qt.filterAttributes = qt 4.6.3
+qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc
+qhp.Qt.customFilters.Qt.name = Qt 4.7.0
+qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0
qhp.Qt.subprojects = classes overviews examples
qhp.Qt.subprojects.classes.title = Classes
qhp.Qt.subprojects.classes.indexTitle = Qt's Classes
@@ -91,15 +88,16 @@ excludedirs = $QTDIR/src/3rdparty/clucene \
$QTDIR/src/3rdparty/webkit/WebCore \
$QTDIR/src/3rdparty/wintab \
$QTDIR/src/3rdparty/zlib \
- $QTDIR/doc/src/snippets \
$QTDIR/src/3rdparty/phonon/gstreamer \
$QTDIR/src/3rdparty/phonon/ds9 \
$QTDIR/src/3rdparty/phonon/qt7 \
$QTDIR/src/3rdparty/phonon/mmf \
- $QTDIR/src/3rdparty/phonon/waveout
+ $QTDIR/src/3rdparty/phonon/waveout \
+ $QTDIR/doc/src/snippets \
+ $QTDIR/doc/src/zh_CN
sources.fileextensions = "*.cpp *.qdoc *.mm"
-examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp"
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml"
examples.imageextensions = "*.png"
exampledirs = $QTDIR/doc/src \
@@ -109,7 +107,8 @@ exampledirs = $QTDIR/doc/src \
$QTDIR/qmake/examples \
$QTDIR/src/3rdparty/webkit/WebKit/qt/docs
imagedirs = $QTDIR/doc/src/images \
- $QTDIR/examples
+ $QTDIR/examples \
+ $QTDIR/doc/src/declarative/pics
outputdir = $QTDIR/doc/html
tagfile = $QTDIR/doc/html/qt.tags
base = file:$QTDIR/doc/html
diff --git a/tools/qdoc3/test/qt_zh_CN.qdocconf b/tools/qdoc3/test/qt_zh_CN.qdocconf
new file mode 100644
index 0000000000..8c7e64a163
--- /dev/null
+++ b/tools/qdoc3/test/qt_zh_CN.qdocconf
@@ -0,0 +1,86 @@
+include(compat.qdocconf)
+include(macros.qdocconf)
+include(qt-cpp-ignore.qdocconf)
+include(qt-html-templates_zh_CN.qdocconf)
+include(qt-defines.qdocconf)
+
+project = Qt
+versionsym =
+version = %VERSION%
+description = Qt Reference Documentation
+url = http://qt.nokia.com/doc/zh_CN/4.7
+
+sourceencoding = UTF-8
+outputencoding = UTF-8
+naturallanguage = zh-Hans
+
+indexes = $QTDIR/doc/html/qt.index
+
+qhp.projects = Qt
+
+qhp.Qt.file = qt.qhp
+qhp.Qt.namespace = com.trolltech.qt.470
+qhp.Qt.virtualFolder = qdoc
+qhp.Qt.title = 教程
+qhp.Qt.indexTitle = 教程
+qhp.Qt.selectors = fake:example
+
+qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc zh_CN
+qhp.Qt.customFilters.Qt.name = Qt 4.7.0
+qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0
+
+# Files not referenced in any qdoc file (last four are needed by qtdemo)
+# See also extraimages.HTML
+qhp.Qt.extraFiles = classic.css \
+ images/qt-logo.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ images/stylesheet-coffee-plastique.png
+
+language = Cpp
+
+sourcedirs = $QTDIR/doc/src/zh_CN
+
+excludedirs = $QTDIR/src/3rdparty/clucene \
+ $QTDIR/src/3rdparty/des \
+ $QTDIR/src/3rdparty/freetype \
+ $QTDIR/src/3rdparty/harfbuzz \
+ $QTDIR/src/3rdparty/kdebase \
+ $QTDIR/src/3rdparty/libjpeg \
+ $QTDIR/src/3rdparty/libmng \
+ $QTDIR/src/3rdparty/libpng \
+ $QTDIR/src/3rdparty/libtiff \
+ $QTDIR/src/3rdparty/md4 \
+ $QTDIR/src/3rdparty/md5 \
+ $QTDIR/src/3rdparty/patches \
+ $QTDIR/src/3rdparty/sha1 \
+ $QTDIR/src/3rdparty/sqlite \
+ $QTDIR/src/3rdparty/webkit/JavaScriptCore \
+ $QTDIR/src/3rdparty/webkit/WebCore \
+ $QTDIR/src/3rdparty/wintab \
+ $QTDIR/src/3rdparty/zlib \
+ $QTDIR/doc/src/snippets \
+ $QTDIR/src/3rdparty/phonon/gstreamer \
+ $QTDIR/src/3rdparty/phonon/ds9 \
+ $QTDIR/src/3rdparty/phonon/qt7 \
+ $QTDIR/src/3rdparty/phonon/mmf \
+ $QTDIR/src/3rdparty/phonon/waveout
+
+sources.fileextensions = "*.cpp *.qdoc *.mm"
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp"
+examples.imageextensions = "*.png"
+
+exampledirs = $QTDIR/doc/src \
+ $QTDIR/examples \
+ $QTDIR/examples/tutorials \
+ $QTDIR \
+ $QTDIR/qmake/examples \
+ $QTDIR/src/3rdparty/webkit/WebKit/qt/docs
+imagedirs = $QTDIR/doc/src/images \
+ $QTDIR/examples
+outputdir = $QTDIR/doc/html_zh_CN
+tagfile = $QTDIR/doc/html_zh_CN/qt.tags
+base = file:$QTDIR/doc/html_zh_CN
+
+HTML.generatemacrefs = "true"
diff --git a/tools/qdoc3/tokenizer.cpp b/tools/qdoc3/tokenizer.cpp
index b391759b37..7c10de65a6 100644
--- a/tools/qdoc3/tokenizer.cpp
+++ b/tools/qdoc3/tokenizer.cpp
@@ -47,6 +47,7 @@
#include <qhash.h>
#include <qregexp.h>
#include <qstring.h>
+#include <qtextcodec.h>
#include <ctype.h>
#include <string.h>
@@ -97,6 +98,8 @@ static QRegExp *definedX = 0;
static QRegExp *defines = 0;
static QRegExp *falsehoods = 0;
+static QTextCodec *sourceCodec = 0;
+
/*
This function is a perfect hash function for the 37 keywords of C99
(with a hash table size of 512). It should perform well on our
@@ -118,13 +121,10 @@ static void insertKwordIntoHash(const char *s, int number)
kwordHashTable[k] = number;
}
-Tokenizer::Tokenizer(const Location& loc, FILE *in)
+Tokenizer::Tokenizer(const Location& loc, QFile &in)
{
init();
- QFile file;
- file.open(in, QIODevice::ReadOnly);
- yyIn = file.readAll();
- file.close();
+ yyIn = in.readAll();
yyPos = 0;
start(loc);
}
@@ -483,6 +483,11 @@ void Tokenizer::initialize(const Config &config)
{
QString versionSym = config.getString(CONFIG_VERSIONSYM);
+ QString sourceEncoding = config.getString(CONFIG_SOURCEENCODING);
+ if (sourceEncoding.isEmpty())
+ sourceEncoding = QLatin1String("ISO-8859-1");
+ sourceCodec = QTextCodec::codecForName(sourceEncoding.toLocal8Bit());
+
comment = new QRegExp("/(?:\\*.*\\*/|/.*\n|/[^\n]*$)");
comment->setMinimal(true);
versionX = new QRegExp("$cannot possibly match^");
@@ -750,4 +755,14 @@ bool Tokenizer::isTrue(const QString &condition)
return !falsehoods->exactMatch(t);
}
+QString Tokenizer::lexeme() const
+{
+ return sourceCodec->toUnicode(yyLex);
+}
+
+QString Tokenizer::previousLexeme() const
+{
+ return sourceCodec->toUnicode(yyPrevLex);
+}
+
QT_END_NAMESPACE
diff --git a/tools/qdoc3/tokenizer.h b/tools/qdoc3/tokenizer.h
index 519cffbaee..f55d2ef048 100644
--- a/tools/qdoc3/tokenizer.h
+++ b/tools/qdoc3/tokenizer.h
@@ -46,11 +46,10 @@
#ifndef TOKENIZER_H
#define TOKENIZER_H
+#include <qfile.h>
#include <qstack.h>
#include <qstring.h>
-#include <stdio.h>
-
#include "location.h"
QT_BEGIN_NAMESPACE
@@ -99,7 +98,7 @@ class Tokenizer
{
public:
Tokenizer(const Location& loc, const QByteArray &in);
- Tokenizer(const Location& loc, FILE *in);
+ Tokenizer(const Location& loc, QFile &file);
~Tokenizer();
@@ -108,8 +107,8 @@ class Tokenizer
bool parsingFnOrMacro() const { return parsingMacro; }
const Location &location() const { return yyTokLoc; }
- QString previousLexeme() const { return QString(yyPrevLex); }
- QString lexeme() const { return QString(yyLex); }
+ QString previousLexeme() const;
+ QString lexeme() const;
QString version() const { return yyVersion; }
int braceDepth() const { return yyBraceDepth; }
int parenDepth() const { return yyParenDepth; }
diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp
index d46da95f2d..922c23e45a 100644
--- a/tools/qdoc3/tree.cpp
+++ b/tools/qdoc3/tree.cpp
@@ -43,7 +43,6 @@
tree.cpp
*/
-#include <QtCore>
#include <QDomDocument>
#include "atom.h"
@@ -54,6 +53,8 @@
#include "text.h"
#include "tree.h"
+#include <limits.h>
+
QT_BEGIN_NAMESPACE
struct InheritanceBound
@@ -1914,7 +1915,8 @@ QString Tree::fullDocumentLocation(const Node *node) const
}
else if (node->type() == Node::Fake) {
#ifdef QDOC_QML
- if (node->subType() == Node::QmlClass)
+ if ((node->subType() == Node::QmlClass) ||
+ (node->subType() == Node::QmlBasicType))
return "qml-" + node->fileBase() + ".html";
else
#endif
diff --git a/tools/qdoc3/webxmlgenerator.cpp b/tools/qdoc3/webxmlgenerator.cpp
index a3c92ce5fc..6020b1b581 100644
--- a/tools/qdoc3/webxmlgenerator.cpp
+++ b/tools/qdoc3/webxmlgenerator.cpp
@@ -43,8 +43,6 @@
webxmlgenerator.cpp
*/
-#include <QtXml>
-
#include "codemarker.h"
#include "pagegenerator.h"
#include "webxmlgenerator.h"
@@ -52,6 +50,8 @@
#include "separator.h"
#include "tree.h"
+#include <QtCore/qxmlstream.h>
+
QT_BEGIN_NAMESPACE
#define COMMAND_VERSION Doc::alias("version")
@@ -90,7 +90,7 @@ QString WebXMLGenerator::format()
return "WebXML";
}
-QString WebXMLGenerator::fileExtension(const Node * /* node */)
+QString WebXMLGenerator::fileExtension(const Node * /* node */) const
{
return "xml";
}
diff --git a/tools/qdoc3/webxmlgenerator.h b/tools/qdoc3/webxmlgenerator.h
index 3145d5040c..071896a36b 100644
--- a/tools/qdoc3/webxmlgenerator.h
+++ b/tools/qdoc3/webxmlgenerator.h
@@ -46,12 +46,17 @@
#ifndef WEBXMLGENERATOR_H
#define WEBXMLGENERATOR_H
+#include <QtCore/qxmlstream.h>
+
#include "codemarker.h"
#include "config.h"
#include "pagegenerator.h"
QT_BEGIN_NAMESPACE
+class QXmlStreamReader;
+class QXmlStreamWriter;
+
class WebXMLGenerator : public PageGenerator
{
public:
@@ -69,7 +74,7 @@ protected:
const Node *relative, CodeMarker *marker );
virtual void generateClassLikeNode(const InnerNode *inner, CodeMarker *marker);
virtual void generateFakeNode(const FakeNode *fake, CodeMarker *marker);
- virtual QString fileExtension(const Node *node);
+ virtual QString fileExtension(const Node *node) const;
virtual const Atom *addAtomElements(QXmlStreamWriter &writer, const Atom *atom,
const Node *relative, CodeMarker *marker);
diff --git a/tools/qev/qev.pro b/tools/qev/qev.pro
index 28383c605a..962b9faf2a 100644
--- a/tools/qev/qev.pro
+++ b/tools/qev/qev.pro
@@ -9,5 +9,3 @@ INCLUDEPATH += .
# Input
SOURCES += qev.cpp
CONFIG += qt warn_on create_prl link_prl
-OBJECTS_DIR=.obj/debug-shared
-MOC_DIR=.moc/debug-shared
diff --git a/tools/qml/content/Browser.qml b/tools/qml/content/Browser.qml
new file mode 100644
index 0000000000..35120bc621
--- /dev/null
+++ b/tools/qml/content/Browser.qml
@@ -0,0 +1,243 @@
+import Qt 4.6
+
+Rectangle {
+ id: root
+ property bool keyPressed: false
+ property var folders: folders1
+ property var view: view1
+ width: 320
+ height: 480
+ color: palette.window
+
+ FolderListModel {
+ id: folders1
+ nameFilters: [ "*.qml" ]
+ folder: qmlViewerFolder
+ }
+ FolderListModel {
+ id: folders2
+ nameFilters: [ "*.qml" ]
+ folder: qmlViewerFolder
+ }
+
+ SystemPalette { id: palette }
+
+ Script {
+ function down(path) {
+ if (folders == folders1) {
+ view = view2
+ folders = folders2;
+ view1.state = "exitLeft";
+ } else {
+ view = view1
+ folders = folders1;
+ view2.state = "exitLeft";
+ }
+ view.x = root.width;
+ view.state = "current";
+ view.focus = true;
+ folders.folder = path;
+ }
+ function up() {
+ var path = folders.parentFolder;
+ if (folders == folders1) {
+ view = view2
+ folders = folders2;
+ view1.state = "exitRight";
+ } else {
+ view = view1
+ folders = folders1;
+ view2.state = "exitRight";
+ }
+ view.x = -root.width;
+ view.state = "current";
+ view.focus = true;
+ folders.folder = path;
+ }
+ }
+
+ Component {
+ id: folderDelegate
+ Rectangle {
+ id: wrapper
+ function launch() {
+ if (folders.isFolder(index)) {
+ down(filePath);
+ } else {
+ qmlViewer.launch(filePath);
+ }
+ }
+ width: root.width
+ height: 52
+ color: "transparent"
+ Rectangle {
+ id: highlight; visible: false
+ anchors.fill: parent
+ gradient: Gradient {
+ GradientStop { id: t1; position: 0.0; color: palette.highlight }
+ GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) }
+ }
+ }
+ Item {
+ width: 48; height: 48
+ Image { source: "images/folder.png"; anchors.centerIn: parent; visible: folders.isFolder(index)}
+ }
+ Text {
+ id: nameText
+ anchors.fill: parent; verticalAlignment: Text.AlignVCenter
+ text: fileName
+ anchors.leftMargin: 54
+ font.pixelSize: 32
+ color: (wrapper.ListView.isCurrentItem && root.keyPressed) ? palette.highlightedText : palette.windowText
+ }
+ MouseArea {
+ id: mouseRegion
+ anchors.fill: parent
+ onClicked: { launch() }
+ }
+ states: [
+ State {
+ name: "pressed"
+ when: mouseRegion.pressed
+ PropertyChanges { target: highlight; visible: true }
+ PropertyChanges { target: nameText; color: palette.highlightedText }
+ }
+ ]
+ }
+ }
+
+ ListView {
+ id: view1
+ anchors.top: titleBar.bottom
+ anchors.bottom: parent.bottom
+ x: 0
+ width: parent.width
+ model: folders1
+ delegate: folderDelegate
+ highlight: Rectangle { color: palette.highlight; visible: root.keyPressed && view1.count != 0 }
+ highlightMoveSpeed: 1000
+ pressDelay: 100
+ focus: true
+ state: "current"
+ states: [
+ State {
+ name: "current"
+ PropertyChanges { target: view1; x: 0 }
+ },
+ State {
+ name: "exitLeft"
+ PropertyChanges { target: view1; x: -root.width }
+ },
+ State {
+ name: "exitRight"
+ PropertyChanges { target: view1; x: root.width }
+ }
+ ]
+ transitions: [
+ Transition {
+ to: "current"
+ SequentialAnimation {
+ NumberAnimation { matchProperties: "x"; duration: 250 }
+ }
+ },
+ Transition {
+ NumberAnimation { matchProperties: "x"; duration: 250 }
+ NumberAnimation { matchProperties: "x"; duration: 250 }
+ }
+ ]
+ Keys.onPressed: { root.keyPressed = true; }
+ }
+
+ ListView {
+ id: view2
+ anchors.top: titleBar.bottom
+ anchors.bottom: parent.bottom
+ x: parent.width
+ width: parent.width
+ model: folders2
+ delegate: folderDelegate
+ highlight: Rectangle { color: palette.highlight; visible: root.keyPressed && view2.count != 0 }
+ highlightMoveSpeed: 1000
+ pressDelay: 100
+ states: [
+ State {
+ name: "current"
+ PropertyChanges { target: view2; x: 0 }
+ },
+ State {
+ name: "exitLeft"
+ PropertyChanges { target: view2; x: -root.width }
+ },
+ State {
+ name: "exitRight"
+ PropertyChanges { target: view2; x: root.width }
+ }
+ ]
+ transitions: [
+ Transition {
+ to: "current"
+ SequentialAnimation {
+ NumberAnimation { matchProperties: "x"; duration: 250 }
+ }
+ },
+ Transition {
+ NumberAnimation { matchProperties: "x"; duration: 250 }
+ }
+ ]
+ Keys.onPressed: { root.keyPressed = true; }
+ }
+
+ Keys.onPressed: {
+ root.keyPressed = true;
+ if (event.key == Qt.Key_Return || event.key == Qt.Key_Select || event.key == Qt.Key_Right) {
+ view.currentItem.launch();
+ event.accepted = true;
+ } else if (event.key == Qt.Key_Left) {
+ up();
+ }
+ }
+
+ BorderImage {
+ source: "images/titlebar.sci";
+ width: parent.width;
+ height: 52
+ y: -7
+ id: titleBar
+
+ Rectangle {
+ id: upButton
+ width: 48
+ height: titleBar.height - 7
+ color: "transparent"
+
+ Image { anchors.centerIn: parent; source: "images/up.png" }
+ MouseArea { id: upRegion; anchors.centerIn: parent
+ width: 56
+ height: 56
+ onClicked: if (folders.parentFolder != "") up()
+ }
+ states: [
+ State {
+ name: "pressed"
+ when: upRegion.pressed
+ PropertyChanges { target: upButton; color: palette.highlight }
+ }
+ ]
+ }
+ Rectangle {
+ color: "gray"
+ x: 48
+ width: 1
+ height: 44
+ }
+
+ Text {
+ anchors.left: upButton.right; anchors.right: parent.right; height: parent.height
+ anchors.leftMargin: 4; anchors.rightMargin: 4
+ text: folders.folder
+ color: "white"
+ elide: Text.ElideLeft; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignVCenter
+ font.pixelSize: 32
+ }
+ }
+}
diff --git a/tools/qml/content/images/folder.png b/tools/qml/content/images/folder.png
new file mode 100644
index 0000000000..e53e2ad464
--- /dev/null
+++ b/tools/qml/content/images/folder.png
Binary files differ
diff --git a/tools/qml/content/images/titlebar.png b/tools/qml/content/images/titlebar.png
new file mode 100644
index 0000000000..51c90082d0
--- /dev/null
+++ b/tools/qml/content/images/titlebar.png
Binary files differ
diff --git a/tools/qml/content/images/titlebar.sci b/tools/qml/content/images/titlebar.sci
new file mode 100644
index 0000000000..0418d94cd6
--- /dev/null
+++ b/tools/qml/content/images/titlebar.sci
@@ -0,0 +1,5 @@
+border.left: 10
+border.top: 12
+border.bottom: 12
+border.right: 10
+source: titlebar.png
diff --git a/tools/qml/content/images/up.png b/tools/qml/content/images/up.png
new file mode 100644
index 0000000000..b05f8025d0
--- /dev/null
+++ b/tools/qml/content/images/up.png
Binary files differ
diff --git a/tools/qml/deviceorientation.cpp b/tools/qml/deviceorientation.cpp
new file mode 100644
index 0000000000..e7c70d5fde
--- /dev/null
+++ b/tools/qml/deviceorientation.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** 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 tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "deviceorientation.h"
+
+QT_USE_NAMESPACE
+
+class DefaultDeviceOrientation : public DeviceOrientation
+{
+ Q_OBJECT
+public:
+ DefaultDeviceOrientation() : DeviceOrientation(), m_orientation(DeviceOrientation::Portrait) {}
+
+ Orientation orientation() const {
+ return m_orientation;
+ }
+
+ void setOrientation(Orientation o) {
+ if (o != m_orientation) {
+ m_orientation = o;
+ emit orientationChanged();
+ }
+ }
+
+ Orientation m_orientation;
+};
+
+DeviceOrientation* DeviceOrientation::instance()
+{
+ static DefaultDeviceOrientation *o = 0;
+ if (!o)
+ o = new DefaultDeviceOrientation;
+ return o;
+}
+
+#include "deviceorientation.moc"
+
diff --git a/tools/qml/deviceorientation.h b/tools/qml/deviceorientation.h
new file mode 100644
index 0000000000..c8125cd830
--- /dev/null
+++ b/tools/qml/deviceorientation.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** 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 tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ORIENTATION_H
+#define ORIENTATION_H
+
+#include <QObject>
+
+QT_BEGIN_NAMESPACE
+
+class DeviceOrientationPrivate;
+class DeviceOrientation : public QObject
+{
+ Q_OBJECT
+public:
+ enum Orientation { UnknownOrientation, Portrait, Landscape };
+ virtual Orientation orientation() const = 0;
+ virtual void setOrientation(Orientation) = 0;
+
+ static DeviceOrientation *instance();
+
+signals:
+ void orientationChanged();
+
+protected:
+ DeviceOrientation() {}
+
+private:
+ DeviceOrientationPrivate *d_ptr;
+ friend class DeviceOrientationPrivate;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/qml/deviceorientation_maemo.cpp b/tools/qml/deviceorientation_maemo.cpp
new file mode 100644
index 0000000000..fa2c6e5776
--- /dev/null
+++ b/tools/qml/deviceorientation_maemo.cpp
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** 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 tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "deviceorientation.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+class MaemoOrientation : public DeviceOrientation
+{
+ Q_OBJECT
+public:
+ MaemoOrientation()
+ : DeviceOrientation(),m_current(Portrait), m_lastSeen(Portrait), m_lastSeenCount(0)
+ {
+ startTimer(100);
+ }
+
+ Orientation orientation() const {
+ return m_current;
+ }
+
+ void setOrientation(Orientation orient) {
+ //XXX maybe better to just ignore
+ if (orient != m_current) {
+ m_current = orient;
+ emit orientationChanged();
+ }
+ }
+
+
+protected:
+ virtual void timerEvent(QTimerEvent *)
+ {
+ Orientation c = get();
+
+ if (c == m_lastSeen) {
+ m_lastSeenCount++;
+ } else {
+ m_lastSeenCount = 0;
+ m_lastSeen = c;
+ }
+
+ if (m_lastSeen != UnknownOrientation && m_lastSeen != m_current && m_lastSeenCount > 4) {
+ m_current = m_lastSeen;
+ emit orientationChanged();
+ printf("%d\n", m_current);
+ }
+ }
+
+signals:
+ void changed();
+
+private:
+ Orientation m_current;
+ Orientation m_lastSeen;
+ int m_lastSeenCount;
+
+ Orientation get()
+ {
+ Orientation o = UnknownOrientation;
+
+ int ax, ay, az;
+
+ read(&ax, &ay, &az);
+
+ if (abs(az) > 850) {
+ o = UnknownOrientation;
+ } else if (ax < -750) {
+ o = Portrait;
+ } else if (ay < -750) {
+ o = Landscape;
+ }
+
+ return o;
+ }
+
+ int read(int *ax,int *ay,int *az)
+ {
+ static const char *accel_filename = "/sys/class/i2c-adapter/i2c-3/3-001d/coord";
+
+ FILE *fd;
+ int rs;
+ fd = fopen(accel_filename, "r");
+ if(fd==NULL){ printf("liqaccel, cannot open for reading\n"); return -1;}
+ rs=fscanf((FILE*) fd,"%i %i %i",ax,ay,az);
+ fclose(fd);
+ if(rs != 3){ printf("liqaccel, cannot read information\n"); return -2;}
+ return 0;
+ }
+};
+
+
+DeviceOrientation* DeviceOrientation::instance()
+{
+ static MaemoOrientation *o = 0;
+ if (!o)
+ o = new MaemoOrientation;
+ return o;
+}
+
+#include "deviceorientation_maemo.moc"
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
new file mode 100644
index 0000000000..a4de339c3d
--- /dev/null
+++ b/tools/qml/main.cpp
@@ -0,0 +1,359 @@
+/****************************************************************************
+**
+** 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 tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarative.h"
+#include "qmlruntime.h"
+#include <QWidget>
+#include <QDir>
+#include <QApplication>
+#include <QTranslator>
+#include <QDebug>
+#include "qfxtester.h"
+#include "qdeclarativefolderlistmodel.h"
+
+QT_USE_NAMESPACE
+
+#if defined (Q_OS_SYMBIAN)
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+void myMessageOutput(QtMsgType type, const char *msg)
+{
+ static int fd = -1;
+ if (fd == -1)
+ fd = ::open("E:\\qml.log", O_WRONLY | O_CREAT);
+
+ ::write(fd, msg, strlen(msg));
+ ::write(fd, "\n", 1);
+ ::fsync(fd);
+
+ switch (type) {
+ case QtFatalMsg:
+ abort();
+ }
+}
+#endif
+
+void usage()
+{
+ qWarning("Usage: qml [options] <filename>");
+ qWarning(" ");
+ qWarning(" options:");
+ qWarning(" -v, -version ............................. display version");
+ qWarning(" -frameless ............................... run with no window frame");
+ qWarning(" -maximized................................ run maximized");
+ qWarning(" -fullscreen............................... run fullscreen");
+ qWarning(" -stayontop................................ keep viewer window on top");
+ qWarning(" -skin <qvfbskindir> ...................... run with a skin window frame");
+ qWarning(" \"list\" for a list of built-ins");
+ qWarning(" -resizeview .............................. resize the view, not the skin");
+ qWarning(" -qmlbrowser .............................. use a QML-based file browser");
+ qWarning(" -recordfile <output> ..................... set video recording file");
+ qWarning(" - ImageMagick 'convert' for GIF)");
+ qWarning(" - png file for raw frames");
+ qWarning(" - 'ffmpeg' for other formats");
+ qWarning(" -recorddither ordered|threshold|floyd .... set GIF dither recording mode");
+ qWarning(" -recordrate <fps> ........................ set recording frame rate");
+ qWarning(" -record arg .............................. add a recording process argument");
+ qWarning(" -autorecord [from-]<tomilliseconds> ...... set recording to start and stop");
+ qWarning(" -devicekeys .............................. use numeric keys (see F1)");
+ qWarning(" -dragthreshold <size> .................... set mouse drag threshold size");
+ qWarning(" -netcache <size> ......................... set disk cache to size bytes");
+ qWarning(" -translation <translationfile> ........... set the language to run in");
+ qWarning(" -L <directory> ........................... prepend to the library search path");
+ qWarning(" -opengl .................................. use a QGLWidget for the viewport");
+ qWarning(" -script <path> ........................... set the script to use");
+ qWarning(" -scriptopts <options>|help ............... set the script options to use");
+
+ qWarning(" ");
+ qWarning(" Press F1 for interactive help");
+ exit(1);
+}
+
+void scriptOptsUsage()
+{
+ qWarning("Usage: qml -scriptopts <option>[,<option>...] ...");
+ qWarning(" options:");
+ qWarning(" record ................................... record a new script");
+ qWarning(" play ..................................... playback an existing script");
+ qWarning(" testimages ............................... record images or compare images on playback");
+ qWarning(" testerror ................................ test 'error' property of root item on playback");
+ qWarning(" exitoncomplete ........................... cleanly exit the viewer on script completion");
+ qWarning(" exitonfailure ............................ immediately exit the viewer on script failure");
+ qWarning(" saveonexit ............................... save recording on viewer exit");
+ qWarning(" ");
+ qWarning(" One of record, play or both must be specified.");
+ exit(1);
+}
+
+int main(int argc, char ** argv)
+{
+#if defined (Q_OS_SYMBIAN)
+ qInstallMsgHandler(myMessageOutput);
+#endif
+
+#if defined (Q_WS_X11)
+ //### default to using raster graphics backend for now
+ bool gsSpecified = false;
+ for (int i = 0; i < argc; ++i) {
+ QString arg = argv[i];
+ if (arg == "-graphicssystem") {
+ gsSpecified = true;
+ break;
+ }
+ }
+
+ if (!gsSpecified)
+ QApplication::setGraphicsSystem("raster");
+#endif
+
+ QApplication app(argc, argv);
+ app.setApplicationName("viewer");
+ app.setOrganizationName("Nokia");
+ app.setOrganizationDomain("nokia.com");
+
+ QDeclarativeViewer::registerTypes();
+ QDeclarativeTester::registerTypes();
+ QDeclarativeFolderListModel::registerTypes();
+
+ bool frameless = false;
+ bool resizeview = false;
+ QString fileName;
+ double fps = 0;
+ int autorecord_from = 0;
+ int autorecord_to = 0;
+ QString dither = "none";
+ QString recordfile;
+ QStringList recordargs;
+ QStringList libraries;
+ QString skin;
+ QString script;
+ QString scriptopts;
+ bool runScript = false;
+ bool devkeys = false;
+ int cache = 0;
+ QString translationFile;
+ bool useGL = false;
+ bool fullScreen = false;
+ bool stayOnTop = false;
+ bool maximized = false;
+ bool useNativeFileBrowser = true;
+
+#if defined(Q_OS_SYMBIAN)
+ maximized = true;
+ useNativeFileBrowser = false;
+#endif
+
+ for (int i = 1; i < argc; ++i) {
+ bool lastArg = (i == argc - 1);
+ QString arg = argv[i];
+ if (arg == "-frameless") {
+ frameless = true;
+ } else if (arg == "-maximized") {
+ maximized = true;
+ } else if (arg == "-fullscreen") {
+ fullScreen = true;
+ } else if (arg == "-stayontop") {
+ stayOnTop = true;
+ } else if (arg == "-skin") {
+ if (lastArg) usage();
+ skin = QString(argv[++i]);
+ } else if (arg == "-resizeview") {
+ resizeview = true;
+ } else if (arg == "-netcache") {
+ if (lastArg) usage();
+ cache = QString(argv[++i]).toInt();
+ } else if (arg == "-recordrate") {
+ if (lastArg) usage();
+ fps = QString(argv[++i]).toDouble();
+ } else if (arg == "-recordfile") {
+ if (lastArg) usage();
+ recordfile = QString(argv[++i]);
+ } else if (arg == "-record") {
+ if (lastArg) usage();
+ recordargs << QString(argv[++i]);
+ } else if (arg == "-recorddither") {
+ if (lastArg) usage();
+ dither = QString(argv[++i]);
+ } else if (arg == "-autorecord") {
+ if (lastArg) usage();
+ QString range = QString(argv[++i]);
+ int dash = range.indexOf('-');
+ if (dash > 0)
+ autorecord_from = range.left(dash).toInt();
+ autorecord_to = range.mid(dash+1).toInt();
+ } else if (arg == "-devicekeys") {
+ devkeys = true;
+ } else if (arg == "-dragthreshold") {
+ if (lastArg) usage();
+ app.setStartDragDistance(QString(argv[++i]).toInt());
+ } else if (arg == QLatin1String("-v") || arg == QLatin1String("-version")) {
+ fprintf(stderr, "Qt Declarative UI Viewer version %s\n", QT_VERSION_STR);
+ return 0;
+ } else if (arg == "-translation") {
+ if (lastArg) usage();
+ translationFile = argv[++i];
+ } else if (arg == "-opengl") {
+ useGL = true;
+ } else if (arg == "-qmlbrowser") {
+ useNativeFileBrowser = false;
+ } else if (arg == "-L") {
+ if (lastArg) usage();
+ libraries << QString(argv[++i]);
+ } else if (arg == "-script") {
+ if (lastArg) usage();
+ script = QString(argv[++i]);
+ } else if (arg == "-scriptopts") {
+ if (lastArg) usage();
+ scriptopts = QString(argv[++i]);
+ } else if (arg == "-savescript") {
+ if (lastArg) usage();
+ script = QString(argv[++i]);
+ runScript = false;
+ } else if (arg == "-playscript") {
+ if (lastArg) usage();
+ script = QString(argv[++i]);
+ runScript = true;
+ } else if (arg[0] != '-') {
+ fileName = arg;
+ } else if (1 || arg == "-help") {
+ usage();
+ }
+ }
+
+ QTranslator qmlTranslator;
+ if (!translationFile.isEmpty()) {
+ qmlTranslator.load(translationFile);
+ app.installTranslator(&qmlTranslator);
+ }
+
+ Qt::WFlags wflags = (frameless ? Qt::FramelessWindowHint : Qt::Widget);
+ if (stayOnTop)
+ wflags |= Qt::WindowStaysOnTopHint;
+
+ QDeclarativeViewer viewer(0, wflags);
+ if (!scriptopts.isEmpty()) {
+ QStringList options =
+ scriptopts.split(QLatin1Char(','), QString::SkipEmptyParts);
+
+ QDeclarativeViewer::ScriptOptions scriptOptions = 0;
+ for (int i = 0; i < options.count(); ++i) {
+ const QString &option = options.at(i);
+ if (option == QLatin1String("help")) {
+ scriptOptsUsage();
+ } else if (option == QLatin1String("play")) {
+ scriptOptions |= QDeclarativeViewer::Play;
+ } else if (option == QLatin1String("record")) {
+ scriptOptions |= QDeclarativeViewer::Record;
+ } else if (option == QLatin1String("testimages")) {
+ scriptOptions |= QDeclarativeViewer::TestImages;
+ } else if (option == QLatin1String("testerror")) {
+ scriptOptions |= QDeclarativeViewer::TestErrorProperty;
+ } else if (option == QLatin1String("exitoncomplete")) {
+ scriptOptions |= QDeclarativeViewer::ExitOnComplete;
+ } else if (option == QLatin1String("exitonfailure")) {
+ scriptOptions |= QDeclarativeViewer::ExitOnFailure;
+ } else if (option == QLatin1String("saveonexit")) {
+ scriptOptions |= QDeclarativeViewer::SaveOnExit;
+ } else {
+ scriptOptsUsage();
+ }
+ }
+
+ if (script.isEmpty())
+ usage();
+
+ if (!(scriptOptions & QDeclarativeViewer::Record) && !(scriptOptions & QDeclarativeViewer::Play))
+ scriptOptsUsage();
+ viewer.setScriptOptions(scriptOptions);
+ viewer.setScript(script);
+ } else if (!script.isEmpty()) {
+ usage();
+ }
+
+ viewer.addLibraryPath(QCoreApplication::applicationDirPath());
+
+ foreach (QString lib, libraries)
+ viewer.addLibraryPath(lib);
+
+ viewer.setNetworkCacheSize(cache);
+ viewer.setRecordFile(recordfile);
+ if (resizeview)
+ viewer.setScaleView();
+ if (fps>0)
+ viewer.setRecordRate(fps);
+ if (autorecord_to)
+ viewer.setAutoRecord(autorecord_from,autorecord_to);
+ if (!skin.isEmpty()) {
+ if (skin == "list") {
+ foreach (QString s, viewer.builtinSkins())
+ qWarning() << qPrintable(s);
+ exit(0);
+ } else {
+ viewer.setSkin(skin);
+ }
+ }
+ if (devkeys)
+ viewer.setDeviceKeys(true);
+ viewer.setRecordDither(dither);
+ if (recordargs.count())
+ viewer.setRecordArgs(recordargs);
+
+ viewer.setUseNativeFileBrowser(useNativeFileBrowser);
+ if (fullScreen && maximized)
+ qWarning() << "Both -fullscreen and -maximized specified. Using -fullscreen.";
+ if (!fileName.isEmpty()) {
+ viewer.open(fileName);
+ fullScreen ? viewer.showFullScreen() : maximized ? viewer.showMaximized() : viewer.show();
+ } else {
+ if (!useNativeFileBrowser)
+ viewer.openFile();
+ fullScreen ? viewer.showFullScreen() : maximized ? viewer.showMaximized() : viewer.show();
+ if (useNativeFileBrowser)
+ viewer.openFile();
+ }
+ viewer.setUseGL(useGL);
+ viewer.raise();
+
+ return app.exec();
+}
diff --git a/tools/qml/proxysettings.cpp b/tools/qml/proxysettings.cpp
new file mode 100644
index 0000000000..3255e42f5d
--- /dev/null
+++ b/tools/qml/proxysettings.cpp
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** 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 tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QIntValidator>
+#include <QSettings>
+
+#include "proxysettings.h"
+
+QT_BEGIN_NAMESPACE
+
+ProxySettings::ProxySettings (QWidget * parent)
+ : QDialog (parent), Ui::ProxySettings()
+{
+ setupUi (this);
+
+ proxyServerEdit->setInputMask ("000.000.000.000;_");
+ QIntValidator *validator = new QIntValidator (0, 9999, this);
+ proxyPortEdit->setValidator (validator);
+
+ QSettings settings;
+ proxyCheckBox->setChecked (settings.value ("http_proxy/use", 0).toBool ());
+ proxyServerEdit->insert (settings.value ("http_proxy/hostname", "").toString ());
+ proxyPortEdit->insert (settings.value ("http_proxy/port", "80").toString ());
+ usernameEdit->insert (settings.value ("http_proxy/username", "").toString ());
+ passwordEdit->insert (settings.value ("http_proxy/password", "").toString ());
+}
+
+ProxySettings::~ProxySettings()
+{
+}
+
+void ProxySettings::accept ()
+{
+ QSettings settings;
+
+ settings.setValue ("http_proxy/use", proxyCheckBox->isChecked ());
+ settings.setValue ("http_proxy/hostname", proxyServerEdit->text ());
+ settings.setValue ("http_proxy/port", proxyPortEdit->text ());
+ settings.setValue ("http_proxy/username", usernameEdit->text ());
+ settings.setValue ("http_proxy/password", passwordEdit->text ());
+
+ QDialog::accept ();
+}
+
+QNetworkProxy ProxySettings::httpProxy ()
+{
+ QSettings settings;
+ QNetworkProxy proxy;
+
+ bool proxyInUse = settings.value ("http_proxy/use", 0).toBool ();
+ if (proxyInUse) {
+ proxy.setType (QNetworkProxy::HttpProxy);
+ proxy.setHostName (settings.value ("http_proxy/hostname", "").toString ());// "192.168.220.5"
+ proxy.setPort (settings.value ("http_proxy/port", 80).toInt ()); // 8080
+ proxy.setUser (settings.value ("http_proxy/username", "").toString ());
+ proxy.setPassword (settings.value ("http_proxy/password", "").toString ());
+ //QNetworkProxy::setApplicationProxy (proxy);
+ }
+ else {
+ proxy.setType (QNetworkProxy::NoProxy);
+ }
+ return proxy;
+}
+
+bool ProxySettings::httpProxyInUse()
+{
+ QSettings settings;
+ return settings.value ("http_proxy/use", 0).toBool ();
+}
+
+QT_END_NAMESPACE
diff --git a/tools/qml/proxysettings.h b/tools/qml/proxysettings.h
new file mode 100644
index 0000000000..325929af7a
--- /dev/null
+++ b/tools/qml/proxysettings.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** 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 tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PROXYSETTINGS_H
+#define PROXYSETTINGS_H
+
+#include <QDialog>
+#include <QNetworkProxy>
+#include "ui_proxysettings.h"
+
+QT_BEGIN_NAMESPACE
+/**
+*/
+class ProxySettings : public QDialog, public Ui::ProxySettings
+{
+
+Q_OBJECT
+
+public:
+ ProxySettings(QWidget * parent = 0);
+
+ ~ProxySettings();
+
+ static QNetworkProxy httpProxy ();
+ static bool httpProxyInUse ();
+
+public slots:
+ virtual void accept ();
+};
+
+QT_END_NAMESPACE
+
+#endif // PROXYSETTINGS_H
diff --git a/tools/qml/proxysettings.ui b/tools/qml/proxysettings.ui
new file mode 100644
index 0000000000..84e39fe03d
--- /dev/null
+++ b/tools/qml/proxysettings.ui
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ProxySettings</class>
+ <widget class="QDialog" name="ProxySettings">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>318</width>
+ <height>199</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Dialog</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0" colspan="2">
+ <widget class="QCheckBox" name="proxyCheckBox">
+ <property name="text">
+ <string>Use http proxy</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="serverAddressLabel">
+ <property name="text">
+ <string>Server Address:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="proxyServerEdit"/>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Port:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="proxyPortEdit"/>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="usernameLabel">
+ <property name="text">
+ <string>Username:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QLineEdit" name="usernameEdit"/>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="passwordLabel">
+ <property name="text">
+ <string>Password:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QLineEdit" name="passwordEdit">
+ <property name="echoMode">
+ <enum>QLineEdit::Password</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0" colspan="2">
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>ProxySettings</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>ProxySettings</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/tools/qml/qdeclarativefolderlistmodel.cpp b/tools/qml/qdeclarativefolderlistmodel.cpp
new file mode 100644
index 0000000000..58bf59ba05
--- /dev/null
+++ b/tools/qml/qdeclarativefolderlistmodel.cpp
@@ -0,0 +1,420 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativefolderlistmodel.h"
+#include <QDirModel>
+#include <QDebug>
+#include <qdeclarativecontext.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeFolderListModelPrivate
+{
+public:
+ QDeclarativeFolderListModelPrivate()
+ : sortField(QDeclarativeFolderListModel::Name), sortReversed(false), count(0) {
+ nameFilters << QLatin1String("*");
+ }
+
+ void updateSorting() {
+ QDir::SortFlags flags = 0;
+ switch(sortField) {
+ case QDeclarativeFolderListModel::Unsorted:
+ flags |= QDir::Unsorted;
+ break;
+ case QDeclarativeFolderListModel::Name:
+ flags |= QDir::Name;
+ break;
+ case QDeclarativeFolderListModel::Time:
+ flags |= QDir::Time;
+ break;
+ case QDeclarativeFolderListModel::Size:
+ flags |= QDir::Size;
+ break;
+ case QDeclarativeFolderListModel::Type:
+ flags |= QDir::Type;
+ break;
+ }
+
+ if (sortReversed)
+ flags |= QDir::Reversed;
+
+ model.setSorting(flags);
+ }
+
+ QDirModel model;
+ QUrl folder;
+ QStringList nameFilters;
+ QModelIndex folderIndex;
+ QDeclarativeFolderListModel::SortField sortField;
+ bool sortReversed;
+ int count;
+};
+
+/*!
+ \qmlclass FolderListModel
+ \brief The FolderListModel provides a model of the contents of a folder in a filesystem.
+
+ FolderListModel provides access to the local filesystem. The \e folder property
+ specifies the folder to list.
+
+ Qt uses "/" as a universal directory separator in the same way that "/" is
+ used as a path separator in URLs. If you always use "/" as a directory
+ separator, Qt will translate your paths to conform to the underlying
+ operating system.
+
+ The roles available are:
+ \list
+ \o fileName
+ \o filePath
+ \endlist
+
+ Additionally a file entry can be differentiated from a folder entry
+ via the \l isFolder() method.
+*/
+
+QDeclarativeFolderListModel::QDeclarativeFolderListModel(QObject *parent)
+ : QListModelInterface(parent)
+{
+ d = new QDeclarativeFolderListModelPrivate;
+ d->model.setFilter(QDir::AllDirs | QDir::Files | QDir::Drives | QDir::NoDotAndDotDot);
+ connect(&d->model, SIGNAL(rowsInserted(const QModelIndex&,int,int))
+ , this, SLOT(inserted(const QModelIndex&,int,int)));
+ connect(&d->model, SIGNAL(rowsRemoved(const QModelIndex&,int,int))
+ , this, SLOT(removed(const QModelIndex&,int,int)));
+ connect(&d->model, SIGNAL(dataChanged(const QModelIndex&,const QModelIndex&))
+ , this, SLOT(dataChanged(const QModelIndex&,const QModelIndex&)));
+ connect(&d->model, SIGNAL(modelReset()), this, SLOT(refresh()));
+ connect(&d->model, SIGNAL(layoutChanged()), this, SLOT(refresh()));
+}
+
+QDeclarativeFolderListModel::~QDeclarativeFolderListModel()
+{
+ delete d;
+}
+
+QHash<int,QVariant> QDeclarativeFolderListModel::data(int index, const QList<int> &roles) const
+{
+ Q_UNUSED(roles);
+ QHash<int,QVariant> folderData;
+ QModelIndex modelIndex = d->model.index(index, 0, d->folderIndex);
+ if (modelIndex.isValid()) {
+ folderData[QDirModel::FileNameRole] = d->model.data(modelIndex, QDirModel::FileNameRole);
+ folderData[QDirModel::FilePathRole] = QUrl::fromLocalFile(d->model.data(modelIndex, QDirModel::FilePathRole).toString());
+ }
+
+ return folderData;
+}
+
+QVariant QDeclarativeFolderListModel::data(int index, int role) const
+{
+ QVariant rv;
+ QModelIndex modelIndex = d->model.index(index, 0, d->folderIndex);
+ if (modelIndex.isValid()) {
+ if (role == QDirModel::FileNameRole)
+ rv = d->model.data(modelIndex, QDirModel::FileNameRole);
+ else if (role == QDirModel::FilePathRole)
+ rv = QUrl::fromLocalFile(d->model.data(modelIndex, QDirModel::FilePathRole).toString());
+ }
+
+ return rv;
+}
+
+int QDeclarativeFolderListModel::count() const
+{
+ return d->count;
+}
+
+QList<int> QDeclarativeFolderListModel::roles() const
+{
+ QList<int> r;
+ r << QDirModel::FileNameRole;
+ r << QDirModel::FilePathRole;
+ return r;
+}
+
+QString QDeclarativeFolderListModel::toString(int role) const
+{
+ switch (role) {
+ case QDirModel::FileNameRole:
+ return QLatin1String("fileName");
+ case QDirModel::FilePathRole:
+ return QLatin1String("filePath");
+ }
+
+ return QString();
+}
+
+/*!
+ \qmlproperty string FolderListModel::folder
+
+ The \a folder property holds the folder the model is currently providing.
+
+ It is a URL, but must be a file: or qrc: URL (or relative to such a URL).
+*/
+QUrl QDeclarativeFolderListModel::folder() const
+{
+ return d->folder;
+}
+
+void QDeclarativeFolderListModel::setFolder(const QUrl &folder)
+{
+ if (folder == d->folder)
+ return;
+ QModelIndex index = d->model.index(folder.toLocalFile());
+ if (index.isValid() && d->model.isDir(index)) {
+ d->folder = folder;
+ QMetaObject::invokeMethod(this, "refresh", Qt::QueuedConnection);
+ emit folderChanged();
+ }
+}
+
+QUrl QDeclarativeFolderListModel::parentFolder() const
+{
+ QUrl r;
+ QString localFile = d->folder.toLocalFile();
+ if (!localFile.isEmpty()) {
+ QDir dir(localFile);
+#if defined(Q_OS_SYMBIAN)
+ if (dir.isRoot())
+ dir.setPath("");
+ else
+#endif
+ dir.cdUp();
+ r = d->folder;
+ r.setPath(dir.path());
+ } else {
+ int pos = d->folder.path().lastIndexOf(QLatin1Char('/'));
+ if (pos == -1)
+ return QUrl();
+ r = d->folder;
+ r.setPath(d->folder.path().left(pos));
+ }
+ return r;
+}
+
+/*!
+ \qmlproperty list<string> FolderListModel::nameFilters
+
+ The \a nameFilters property contains a list of filename filters.
+ The filters may include the ? and * wildcards.
+
+ The example below filters on PNG and JPEG files:
+
+ \code
+ FolderListModel {
+ nameFilters: [ "*.png", "*.jpg" ]
+ }
+ \endcode
+*/
+QStringList QDeclarativeFolderListModel::nameFilters() const
+{
+ return d->nameFilters;
+}
+
+void QDeclarativeFolderListModel::setNameFilters(const QStringList &filters)
+{
+ d->nameFilters = filters;
+ d->model.setNameFilters(d->nameFilters);
+}
+
+void QDeclarativeFolderListModel::componentComplete()
+{
+ if (!d->folder.isValid() || !QDir().exists(d->folder.toLocalFile()))
+ setFolder(QUrl(QLatin1String("file://")+QDir::currentPath()));
+
+ if (!d->folderIndex.isValid())
+ QMetaObject::invokeMethod(this, "refresh", Qt::QueuedConnection);
+}
+
+QDeclarativeFolderListModel::SortField QDeclarativeFolderListModel::sortField() const
+{
+ return d->sortField;
+}
+
+void QDeclarativeFolderListModel::setSortField(SortField field)
+{
+ if (field != d->sortField) {
+ d->sortField = field;
+ d->updateSorting();
+ }
+}
+
+bool QDeclarativeFolderListModel::sortReversed() const
+{
+ return d->sortReversed;
+}
+
+void QDeclarativeFolderListModel::setSortReversed(bool rev)
+{
+ if (rev != d->sortReversed) {
+ d->sortReversed = rev;
+ d->updateSorting();
+ }
+}
+
+/*!
+ \qmlmethod bool FolderListModel::isFolder(int index)
+
+ Returns true if the entry \a index is a folder; otherwise
+ returns false.
+*/
+bool QDeclarativeFolderListModel::isFolder(int index) const
+{
+ if (index != -1) {
+ QModelIndex idx = d->model.index(index, 0, d->folderIndex);
+ if (idx.isValid())
+ return d->model.isDir(idx);
+ }
+ return false;
+}
+
+void QDeclarativeFolderListModel::refresh()
+{
+ d->folderIndex = QModelIndex();
+ if (d->count) {
+ int tmpCount = d->count;
+ d->count = 0;
+ emit itemsRemoved(0, tmpCount);
+ }
+ d->folderIndex = d->model.index(d->folder.toLocalFile());
+ d->count = d->model.rowCount(d->folderIndex);
+ if (d->count) {
+ emit itemsInserted(0, d->count);
+ }
+}
+
+void QDeclarativeFolderListModel::inserted(const QModelIndex &index, int start, int end)
+{
+ if (index == d->folderIndex) {
+ d->count = d->model.rowCount(d->folderIndex);
+ emit itemsInserted(start, end - start + 1);
+ }
+}
+
+void QDeclarativeFolderListModel::removed(const QModelIndex &index, int start, int end)
+{
+ if (index == d->folderIndex) {
+ d->count = d->model.rowCount(d->folderIndex);
+ emit itemsRemoved(start, end - start + 1);
+ }
+}
+
+void QDeclarativeFolderListModel::dataChanged(const QModelIndex &start, const QModelIndex &end)
+{
+ qDebug() << "data changed";
+ if (start.parent() == d->folderIndex)
+ emit itemsChanged(start.row(), end.row() - start.row() + 1, roles());
+}
+
+/*!
+ \qmlproperty bool FolderListModel::showDirs
+
+ If true (the default), directories are included in the model.
+
+ Note that the nameFilters are ignored for directories.
+*/
+bool QDeclarativeFolderListModel::showDirs() const
+{
+ return d->model.filter() & QDir::AllDirs;
+}
+
+void QDeclarativeFolderListModel::setShowDirs(bool on)
+{
+ if (!(d->model.filter() & QDir::AllDirs) == !on)
+ return;
+ if (on)
+ d->model.setFilter(d->model.filter() | QDir::AllDirs | QDir::Drives);
+ else
+ d->model.setFilter(d->model.filter() & ~(QDir::AllDirs | QDir::Drives));
+}
+
+/*!
+ \qmlproperty bool FolderListModel::showDotAndDotDot
+
+ If true, the "." and ".." directories are included in the model.
+
+ The default is false.
+*/
+bool QDeclarativeFolderListModel::showDotAndDotDot() const
+{
+ return !(d->model.filter() & QDir::NoDotAndDotDot);
+}
+
+void QDeclarativeFolderListModel::setShowDotAndDotDot(bool on)
+{
+ if (!(d->model.filter() & QDir::NoDotAndDotDot) == on)
+ return;
+ if (on)
+ d->model.setFilter(d->model.filter() & ~QDir::NoDotAndDotDot);
+ else
+ d->model.setFilter(d->model.filter() | QDir::NoDotAndDotDot);
+}
+
+/*!
+ \qmlproperty bool FolderListModel::showOnlyReadable
+
+ If true, only readable files and directories are shown.
+
+ The default is false.
+*/
+bool QDeclarativeFolderListModel::showOnlyReadable() const
+{
+ return d->model.filter() & QDir::Readable;
+}
+
+void QDeclarativeFolderListModel::setShowOnlyReadable(bool on)
+{
+ if (!(d->model.filter() & QDir::Readable) == !on)
+ return;
+ if (on)
+ d->model.setFilter(d->model.filter() | QDir::Readable);
+ else
+ d->model.setFilter(d->model.filter() & ~QDir::Readable);
+}
+
+void QDeclarativeFolderListModel::registerTypes()
+{
+ QML_REGISTER_TYPE(Qt,4,6,FolderListModel,QDeclarativeFolderListModel);
+}
+
+QT_END_NAMESPACE
+
diff --git a/tools/qml/qdeclarativefolderlistmodel.h b/tools/qml/qdeclarativefolderlistmodel.h
new file mode 100644
index 0000000000..57b7fe5d62
--- /dev/null
+++ b/tools/qml/qdeclarativefolderlistmodel.h
@@ -0,0 +1,127 @@
+/****************************************************************************
+**
+** 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEFOLDERLISTMODEL_H
+#define QDECLARATIVEFOLDERLISTMODEL_H
+
+#include <qdeclarative.h>
+#include <QStringList>
+#include <QUrl>
+#include "../../src/declarative/3rdparty/qlistmodelinterface_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeContext;
+class QModelIndex;
+
+class QDeclarativeFolderListModelPrivate;
+class QDeclarativeFolderListModel : public QListModelInterface, public QDeclarativeParserStatus
+{
+ Q_OBJECT
+ Q_INTERFACES(QDeclarativeParserStatus)
+
+ Q_PROPERTY(QUrl folder READ folder WRITE setFolder NOTIFY folderChanged)
+ Q_PROPERTY(QUrl parentFolder READ parentFolder NOTIFY folderChanged)
+ Q_PROPERTY(QStringList nameFilters READ nameFilters WRITE setNameFilters)
+ Q_PROPERTY(SortField sortField READ sortField WRITE setSortField)
+ Q_PROPERTY(bool sortReversed READ sortReversed WRITE setSortReversed)
+ Q_PROPERTY(bool showDirs READ showDirs WRITE setShowDirs)
+ Q_PROPERTY(bool showDotAndDotDot READ showDotAndDotDot WRITE setShowDotAndDotDot)
+ Q_PROPERTY(bool showOnlyReadable READ showOnlyReadable WRITE setShowOnlyReadable)
+
+public:
+ QDeclarativeFolderListModel(QObject *parent = 0);
+ ~QDeclarativeFolderListModel();
+
+ static void registerTypes();
+
+ virtual QHash<int,QVariant> data(int index, const QList<int> &roles = (QList<int>())) const;
+ virtual QVariant data(int index, int role) const;
+ virtual int count() const;
+ virtual QList<int> roles() const;
+ virtual QString toString(int role) const;
+
+ QUrl folder() const;
+ void setFolder(const QUrl &folder);
+
+ QUrl parentFolder() const;
+
+ QStringList nameFilters() const;
+ void setNameFilters(const QStringList &filters);
+
+ virtual void componentComplete();
+
+ Q_INVOKABLE bool isFolder(int index) const;
+
+ enum SortField { Unsorted, Name, Time, Size, Type };
+ SortField sortField() const;
+ void setSortField(SortField field);
+ Q_ENUMS(SortField)
+
+ bool sortReversed() const;
+ void setSortReversed(bool rev);
+
+ bool showDirs() const;
+ void setShowDirs(bool);
+ bool showDotAndDotDot() const;
+ void setShowDotAndDotDot(bool);
+ bool showOnlyReadable() const;
+ void setShowOnlyReadable(bool);
+
+Q_SIGNALS:
+ void folderChanged();
+
+private Q_SLOTS:
+ void refresh();
+ void inserted(const QModelIndex &index, int start, int end);
+ void removed(const QModelIndex &index, int start, int end);
+ void dataChanged(const QModelIndex &start, const QModelIndex &end);
+
+private:
+ Q_DISABLE_COPY(QDeclarativeFolderListModel)
+ QDeclarativeFolderListModelPrivate *d;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeFolderListModel)
+
+#endif // QDECLARATIVEFOLDERLISTMODEL_H
diff --git a/tools/qml/qfxtester.cpp b/tools/qml/qfxtester.cpp
new file mode 100644
index 0000000000..638a3c92f3
--- /dev/null
+++ b/tools/qml/qfxtester.cpp
@@ -0,0 +1,381 @@
+/****************************************************************************
+**
+** 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 tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qfxtester.h>
+#include <QDebug>
+#include <QApplication>
+#include <qdeclarativeview.h>
+#include <QFile>
+#include <QDeclarativeComponent>
+#include <QDir>
+#include <QCryptographicHash>
+#include <private/qabstractanimation_p.h>
+#include <private/qdeclarativeitem_p.h>
+
+QT_BEGIN_NAMESPACE
+
+
+QDeclarativeTester::QDeclarativeTester(const QString &script, QDeclarativeViewer::ScriptOptions opts,
+ QDeclarativeView *parent)
+: QAbstractAnimation(parent), m_script(script), m_view(parent), filterEvents(true), options(opts),
+ testscript(0), hasCompleted(false), hasFailed(false)
+{
+ parent->viewport()->installEventFilter(this);
+ parent->installEventFilter(this);
+ QUnifiedTimer::instance()->setConsistentTiming(true);
+ if (options & QDeclarativeViewer::Play)
+ this->run();
+ start();
+}
+
+QDeclarativeTester::~QDeclarativeTester()
+{
+ if (!hasFailed &&
+ options & QDeclarativeViewer::Record &&
+ options & QDeclarativeViewer::SaveOnExit)
+ save();
+}
+
+int QDeclarativeTester::duration() const
+{
+ return -1;
+}
+
+void QDeclarativeTester::addMouseEvent(Destination dest, QMouseEvent *me)
+{
+ MouseEvent e(me);
+ e.destination = dest;
+ m_mouseEvents << e;
+}
+
+void QDeclarativeTester::addKeyEvent(Destination dest, QKeyEvent *ke)
+{
+ KeyEvent e(ke);
+ e.destination = dest;
+ m_keyEvents << e;
+}
+
+bool QDeclarativeTester::eventFilter(QObject *o, QEvent *e)
+{
+ if (!filterEvents)
+ return false;
+
+ Destination destination;
+ if (o == m_view) {
+ destination = View;
+ } else if (o == m_view->viewport()) {
+ destination = ViewPort;
+ } else {
+ return false;
+ }
+
+ switch (e->type()) {
+ case QEvent::KeyPress:
+ case QEvent::KeyRelease:
+ addKeyEvent(destination, (QKeyEvent *)e);
+ return true;
+ case QEvent::MouseButtonPress:
+ case QEvent::MouseButtonRelease:
+ case QEvent::MouseMove:
+ case QEvent::MouseButtonDblClick:
+ addMouseEvent(destination, (QMouseEvent *)e);
+ return true;
+ default:
+ break;
+ }
+ return false;
+}
+
+void QDeclarativeTester::executefailure()
+{
+ hasFailed = true;
+
+ if (options & QDeclarativeViewer::ExitOnFailure)
+ exit(-1);
+}
+
+void QDeclarativeTester::imagefailure()
+{
+ hasFailed = true;
+
+ if (options & QDeclarativeViewer::ExitOnFailure)
+ exit(-1);
+}
+
+void QDeclarativeTester::complete()
+{
+ if ((options & QDeclarativeViewer::TestErrorProperty) && !hasFailed) {
+ QString e = m_view->rootObject()->property("error").toString();
+ if (!e.isEmpty()) {
+ qWarning() << "Test failed:" << e;
+ hasFailed = true;
+ }
+ }
+ if (options & QDeclarativeViewer::ExitOnComplete)
+ QApplication::exit(hasFailed?-1:0);
+
+ if (hasCompleted)
+ return;
+ hasCompleted = true;
+
+ if (options & QDeclarativeViewer::Play)
+ qWarning("Script playback complete");
+}
+
+void QDeclarativeTester::run()
+{
+ QDeclarativeComponent c(m_view->engine(), m_script + QLatin1String(".qml"));
+
+ testscript = qobject_cast<QDeclarativeVisualTest *>(c.create());
+ if (testscript) testscript->setParent(this);
+ else { executefailure(); exit(-1); }
+ testscriptidx = 0;
+}
+
+void QDeclarativeTester::save()
+{
+ QString filename = m_script + QLatin1String(".qml");
+ QFileInfo filenameInfo(filename);
+ QDir saveDir = filenameInfo.absoluteDir();
+ saveDir.mkpath(".");
+
+ QFile file(filename);
+ file.open(QIODevice::WriteOnly);
+ QTextStream ts(&file);
+
+ ts << "import Qt.VisualTest 4.6\n\n";
+ ts << "VisualTest {\n";
+
+ int imgCount = 0;
+ QList<KeyEvent> keyevents = m_savedKeyEvents;
+ QList<MouseEvent> mouseevents = m_savedMouseEvents;
+ for (int ii = 0; ii < m_savedFrameEvents.count(); ++ii) {
+ const FrameEvent &fe = m_savedFrameEvents.at(ii);
+ ts << " Frame {\n";
+ ts << " msec: " << fe.msec << "\n";
+ if (!fe.hash.isEmpty()) {
+ ts << " hash: \"" << fe.hash.toHex() << "\"\n";
+ } else if (!fe.image.isNull()) {
+ QString filename = filenameInfo.baseName() + "." + QString::number(imgCount) + ".png";
+ fe.image.save(m_script + "." + QString::number(imgCount) + ".png");
+ imgCount++;
+ ts << " image: \"" << filename << "\"\n";
+ }
+ ts << " }\n";
+
+ while (!mouseevents.isEmpty() &&
+ mouseevents.first().msec == fe.msec) {
+ MouseEvent me = mouseevents.takeFirst();
+
+ ts << " Mouse {\n";
+ ts << " type: " << me.type << "\n";
+ ts << " button: " << me.button << "\n";
+ ts << " buttons: " << me.buttons << "\n";
+ ts << " x: " << me.pos.x() << "; y: " << me.pos.y() << "\n";
+ ts << " modifiers: " << me.modifiers << "\n";
+ if (me.destination == ViewPort)
+ ts << " sendToViewport: true\n";
+ ts << " }\n";
+ }
+
+ while (!keyevents.isEmpty() &&
+ keyevents.first().msec == fe.msec) {
+ KeyEvent ke = keyevents.takeFirst();
+
+ ts << " Key {\n";
+ ts << " type: " << ke.type << "\n";
+ ts << " key: " << ke.key << "\n";
+ ts << " modifiers: " << ke.modifiers << "\n";
+ ts << " text: \"" << ke.text.toUtf8().toHex() << "\"\n";
+ ts << " autorep: " << (ke.autorep?"true":"false") << "\n";
+ ts << " count: " << ke.count << "\n";
+ if (ke.destination == ViewPort)
+ ts << " sendToViewport: true\n";
+ ts << " }\n";
+ }
+ }
+
+ ts << "}\n";
+ file.close();
+}
+
+void QDeclarativeTester::updateCurrentTime(int msec)
+{
+ QDeclarativeItemPrivate::setConsistentTime(msec);
+
+ QImage img(m_view->width(), m_view->height(), QImage::Format_RGB32);
+
+ if (options & QDeclarativeViewer::TestImages) {
+ img.fill(qRgb(255,255,255));
+ QPainter p(&img);
+ m_view->render(&p);
+ }
+
+ FrameEvent fe;
+ fe.msec = msec;
+ if (msec == 0 || !(options & QDeclarativeViewer::TestImages)) {
+ // Skip first frame, skip if not doing images
+ } else if (0 == (m_savedFrameEvents.count() % 60)) {
+ fe.image = img;
+ } else {
+ QCryptographicHash hash(QCryptographicHash::Md5);
+ hash.addData((const char *)img.bits(), img.bytesPerLine() * img.height());
+ fe.hash = hash.result();
+ }
+ m_savedFrameEvents.append(fe);
+
+ // Deliver mouse events
+ filterEvents = false;
+
+ if (!testscript) {
+ for (int ii = 0; ii < m_mouseEvents.count(); ++ii) {
+ MouseEvent &me = m_mouseEvents[ii];
+ me.msec = msec;
+ QMouseEvent event(me.type, me.pos, me.button, me.buttons, me.modifiers);
+
+ if (me.destination == View) {
+ QCoreApplication::sendEvent(m_view, &event);
+ } else {
+ QCoreApplication::sendEvent(m_view->viewport(), &event);
+ }
+ }
+
+ for (int ii = 0; ii < m_keyEvents.count(); ++ii) {
+ KeyEvent &ke = m_keyEvents[ii];
+ ke.msec = msec;
+ QKeyEvent event(ke.type, ke.key, ke.modifiers, ke.text, ke.autorep, ke.count);
+
+ if (ke.destination == View) {
+ QCoreApplication::sendEvent(m_view, &event);
+ } else {
+ QCoreApplication::sendEvent(m_view->viewport(), &event);
+ }
+ }
+ m_savedMouseEvents.append(m_mouseEvents);
+ m_savedKeyEvents.append(m_keyEvents);
+ }
+
+ m_mouseEvents.clear();
+ m_keyEvents.clear();
+
+ // Advance test script
+ while (testscript && testscript->count() > testscriptidx) {
+
+ QObject *event = testscript->event(testscriptidx);
+
+ if (QDeclarativeVisualTestFrame *frame = qobject_cast<QDeclarativeVisualTestFrame *>(event)) {
+ if (frame->msec() < msec) {
+ if (options & QDeclarativeViewer::TestImages && !(options & QDeclarativeViewer::Record)) {
+ qWarning() << "QDeclarativeTester: Extra frame. Seen:"
+ << msec << "Expected:" << frame->msec();
+ imagefailure();
+ }
+ } else if (frame->msec() == msec) {
+ if (!frame->hash().isEmpty() && frame->hash().toUtf8() != fe.hash.toHex()) {
+ if (options & QDeclarativeViewer::TestImages && !(options & QDeclarativeViewer::Record)) {
+ qWarning() << "QDeclarativeTester: Mismatched frame hash. Seen:"
+ << fe.hash.toHex() << "Expected:"
+ << frame->hash().toUtf8();
+ imagefailure();
+ }
+ }
+ } else if (frame->msec() > msec) {
+ break;
+ }
+
+ if (options & QDeclarativeViewer::TestImages && !(options & QDeclarativeViewer::Record) && !frame->image().isEmpty()) {
+ QImage goodImage(frame->image().toLocalFile());
+ if (goodImage != img) {
+ QString reject(frame->image().toLocalFile() + ".reject.png");
+ qWarning() << "QDeclarativeTester: Image mismatch. Reject saved to:"
+ << reject;
+ img.save(reject);
+ imagefailure();
+ }
+ }
+ } else if (QDeclarativeVisualTestMouse *mouse = qobject_cast<QDeclarativeVisualTestMouse *>(event)) {
+ QPoint pos(mouse->x(), mouse->y());
+ QPoint globalPos = m_view->mapToGlobal(QPoint(0, 0)) + pos;
+ QMouseEvent event((QEvent::Type)mouse->type(), pos, globalPos, (Qt::MouseButton)mouse->button(), (Qt::MouseButtons)mouse->buttons(), (Qt::KeyboardModifiers)mouse->modifiers());
+
+ MouseEvent me(&event);
+ me.msec = msec;
+ if (!mouse->sendToViewport()) {
+ QCoreApplication::sendEvent(m_view, &event);
+ me.destination = View;
+ } else {
+ QCoreApplication::sendEvent(m_view->viewport(), &event);
+ me.destination = ViewPort;
+ }
+ m_savedMouseEvents.append(me);
+ } else if (QDeclarativeVisualTestKey *key = qobject_cast<QDeclarativeVisualTestKey *>(event)) {
+
+ QKeyEvent event((QEvent::Type)key->type(), key->key(), (Qt::KeyboardModifiers)key->modifiers(), QString::fromUtf8(QByteArray::fromHex(key->text().toUtf8())), key->autorep(), key->count());
+
+ KeyEvent ke(&event);
+ ke.msec = msec;
+ if (!key->sendToViewport()) {
+ QCoreApplication::sendEvent(m_view, &event);
+ ke.destination = View;
+ } else {
+ QCoreApplication::sendEvent(m_view->viewport(), &event);
+ ke.destination = ViewPort;
+ }
+ m_savedKeyEvents.append(ke);
+ }
+ testscriptidx++;
+ }
+
+ filterEvents = true;
+
+ if (testscript && testscript->count() <= testscriptidx)
+ complete();
+}
+
+void QDeclarativeTester::registerTypes()
+{
+ QML_REGISTER_TYPE(Qt.VisualTest, 4,6, VisualTest, QDeclarativeVisualTest);
+ QML_REGISTER_TYPE(Qt.VisualTest, 4,6, Frame, QDeclarativeVisualTestFrame);
+ QML_REGISTER_TYPE(Qt.VisualTest, 4,6, Mouse, QDeclarativeVisualTestMouse);
+ QML_REGISTER_TYPE(Qt.VisualTest, 4,6, Key, QDeclarativeVisualTestKey);
+}
+
+QT_END_NAMESPACE
diff --git a/tools/qml/qfxtester.h b/tools/qml/qfxtester.h
new file mode 100644
index 0000000000..6521409b34
--- /dev/null
+++ b/tools/qml/qfxtester.h
@@ -0,0 +1,286 @@
+/****************************************************************************
+**
+** 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 tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QFXTESTER_H
+#define QFXTESTER_H
+
+#include <QEvent>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <QImage>
+#include <QUrl>
+#include <qmlruntime.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeVisualTest : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QDeclarativeListProperty<QObject> events READ events CONSTANT)
+ Q_CLASSINFO("DefaultProperty", "events")
+public:
+ QDeclarativeVisualTest() {}
+
+ QDeclarativeListProperty<QObject> events() { return QDeclarativeListProperty<QObject>(this, m_events); }
+
+ int count() const { return m_events.count(); }
+ QObject *event(int idx) { return m_events.at(idx); }
+
+private:
+ QList<QObject *> m_events;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeVisualTest)
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeVisualTestFrame : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int msec READ msec WRITE setMsec)
+ Q_PROPERTY(QString hash READ hash WRITE setHash)
+ Q_PROPERTY(QUrl image READ image WRITE setImage)
+public:
+ QDeclarativeVisualTestFrame() : m_msec(-1) {}
+
+ int msec() const { return m_msec; }
+ void setMsec(int m) { m_msec = m; }
+
+ QString hash() const { return m_hash; }
+ void setHash(const QString &hash) { m_hash = hash; }
+
+ QUrl image() const { return m_image; }
+ void setImage(const QUrl &image) { m_image = image; }
+
+private:
+ int m_msec;
+ QString m_hash;
+ QUrl m_image;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeVisualTestFrame)
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeVisualTestMouse : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int type READ type WRITE setType)
+ Q_PROPERTY(int button READ button WRITE setButton)
+ Q_PROPERTY(int buttons READ buttons WRITE setButtons)
+ Q_PROPERTY(int x READ x WRITE setX)
+ Q_PROPERTY(int y READ y WRITE setY)
+ Q_PROPERTY(int modifiers READ modifiers WRITE setModifiers)
+ Q_PROPERTY(bool sendToViewport READ sendToViewport WRITE setSendToViewport)
+public:
+ QDeclarativeVisualTestMouse() : m_type(0), m_button(0), m_buttons(0), m_x(0), m_y(0), m_modifiers(0), m_viewport(false) {}
+
+ int type() const { return m_type; }
+ void setType(int t) { m_type = t; }
+
+ int button() const { return m_button; }
+ void setButton(int b) { m_button = b; }
+
+ int buttons() const { return m_buttons; }
+ void setButtons(int b) { m_buttons = b; }
+
+ int x() const { return m_x; }
+ void setX(int x) { m_x = x; }
+
+ int y() const { return m_y; }
+ void setY(int y) { m_y = y; }
+
+ int modifiers() const { return m_modifiers; }
+ void setModifiers(int modifiers) { m_modifiers = modifiers; }
+
+ bool sendToViewport() const { return m_viewport; }
+ void setSendToViewport(bool v) { m_viewport = v; }
+private:
+ int m_type;
+ int m_button;
+ int m_buttons;
+ int m_x;
+ int m_y;
+ int m_modifiers;
+ bool m_viewport;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeVisualTestMouse)
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeVisualTestKey : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int type READ type WRITE setType)
+ Q_PROPERTY(int key READ key WRITE setKey)
+ Q_PROPERTY(int modifiers READ modifiers WRITE setModifiers)
+ Q_PROPERTY(QString text READ text WRITE setText)
+ Q_PROPERTY(bool autorep READ autorep WRITE setAutorep)
+ Q_PROPERTY(int count READ count WRITE setCount)
+ Q_PROPERTY(bool sendToViewport READ sendToViewport WRITE setSendToViewport)
+public:
+ QDeclarativeVisualTestKey() : m_type(0), m_key(0), m_modifiers(0), m_autorep(false), m_count(0), m_viewport(false) {}
+
+ int type() const { return m_type; }
+ void setType(int t) { m_type = t; }
+
+ int key() const { return m_key; }
+ void setKey(int k) { m_key = k; }
+
+ int modifiers() const { return m_modifiers; }
+ void setModifiers(int m) { m_modifiers = m; }
+
+ QString text() const { return m_text; }
+ void setText(const QString &t) { m_text = t; }
+
+ bool autorep() const { return m_autorep; }
+ void setAutorep(bool a) { m_autorep = a; }
+
+ int count() const { return m_count; }
+ void setCount(int c) { m_count = c; }
+
+ bool sendToViewport() const { return m_viewport; }
+ void setSendToViewport(bool v) { m_viewport = v; }
+private:
+ int m_type;
+ int m_key;
+ int m_modifiers;
+ QString m_text;
+ bool m_autorep;
+ int m_count;
+ bool m_viewport;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QDeclarativeVisualTestKey)
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeTester : public QAbstractAnimation
+{
+public:
+ QDeclarativeTester(const QString &script, QDeclarativeViewer::ScriptOptions options, QDeclarativeView *parent);
+ ~QDeclarativeTester();
+
+ static void registerTypes();
+
+ virtual int duration() const;
+
+ void run();
+ void save();
+
+ void executefailure();
+protected:
+ virtual void updateCurrentTime(int msecs);
+ virtual bool eventFilter(QObject *, QEvent *);
+
+private:
+ QString m_script;
+
+ void imagefailure();
+ void complete();
+
+ enum Destination { View, ViewPort };
+ void addKeyEvent(Destination, QKeyEvent *);
+ void addMouseEvent(Destination, QMouseEvent *);
+ QDeclarativeView *m_view;
+
+ struct MouseEvent {
+ MouseEvent(QMouseEvent *e)
+ : type(e->type()), button(e->button()), buttons(e->buttons()),
+ pos(e->pos()), modifiers(e->modifiers()), destination(View) {}
+
+ QEvent::Type type;
+ Qt::MouseButton button;
+ Qt::MouseButtons buttons;
+ QPoint pos;
+ Qt::KeyboardModifiers modifiers;
+ Destination destination;
+
+ int msec;
+ };
+ struct KeyEvent {
+ KeyEvent(QKeyEvent *e)
+ : type(e->type()), key(e->key()), modifiers(e->modifiers()), text(e->text()),
+ autorep(e->isAutoRepeat()), count(e->count()), destination(View) {}
+ QEvent::Type type;
+ int key;
+ Qt::KeyboardModifiers modifiers;
+ QString text;
+ bool autorep;
+ ushort count;
+ Destination destination;
+
+ int msec;
+ };
+ struct FrameEvent {
+ QImage image;
+ QByteArray hash;
+ int msec;
+ };
+ QList<MouseEvent> m_mouseEvents;
+ QList<KeyEvent> m_keyEvents;
+
+ QList<MouseEvent> m_savedMouseEvents;
+ QList<KeyEvent> m_savedKeyEvents;
+ QList<FrameEvent> m_savedFrameEvents;
+ bool filterEvents;
+
+ QDeclarativeViewer::ScriptOptions options;
+ int testscriptidx;
+ QDeclarativeVisualTest *testscript;
+
+ bool hasCompleted;
+ bool hasFailed;
+};
+
+
+QT_END_NAMESPACE
+
+#endif // QFXTESTER_H
diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro
new file mode 100644
index 0000000000..9b68dbc8c6
--- /dev/null
+++ b/tools/qml/qml.pro
@@ -0,0 +1,60 @@
+TEMPLATE = app
+CONFIG += qt \
+ uic
+DESTDIR = ../../bin
+QT += declarative \
+ script \
+ network \
+ sql
+
+contains(QT_CONFIG, opengl) {
+ QT += opengl
+ DEFINES += GL_SUPPORTED
+}
+
+# Input
+HEADERS += qmlruntime.h \
+ proxysettings.h \
+ qfxtester.h \
+ deviceorientation.h \
+ qdeclarativefolderlistmodel.h
+SOURCES += main.cpp \
+ qmlruntime.cpp \
+ proxysettings.cpp \
+ qfxtester.cpp \
+ qdeclarativefolderlistmodel.cpp
+RESOURCES = qmlruntime.qrc
+maemo5 {
+ SOURCES += deviceorientation_maemo.cpp
+} else {
+ SOURCES += deviceorientation.cpp
+}
+FORMS = recopts.ui \
+ proxysettings.ui
+INCLUDEPATH += ../../include/QtDeclarative
+INCLUDEPATH += ../../src/declarative/util
+INCLUDEPATH += ../../src/declarative/graphicsitems
+include(../shared/deviceskin/deviceskin.pri)
+target.path = $$[QT_INSTALL_BINS]
+INSTALLS += target
+
+wince* {
+QT += scripttools \
+ xml \
+ phonon
+
+ contains(QT_CONFIG, xmlpatterns) {
+ QT += xmlpatterns
+ }
+ contains(QT_CONFIG, webkit) {
+ QT += webkit
+ }
+}
+symbian {
+# TARGET.UID3 =
+ include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+ TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
+ HEADERS += $$QT_SOURCE_TREE/examples/network/qftp/sym_iap_util.h
+ LIBS += -lesock -lconnmon -linsock
+ TARGET.CAPABILITY = "All -TCB"
+}
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
new file mode 100644
index 0000000000..7da3f5a54a
--- /dev/null
+++ b/tools/qml/qmlruntime.cpp
@@ -0,0 +1,1468 @@
+/****************************************************************************
+**
+** 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 tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qdeclarativeview.h>
+
+#ifdef hz
+#undef hz
+#endif
+#include "ui_recopts.h"
+
+#include "qmlruntime.h"
+#include <qdeclarativecontext.h>
+#include <qdeclarativeengine.h>
+#include <qdeclarativenetworkaccessmanagerfactory.h>
+#include "qdeclarative.h"
+#include <private/qperformancelog_p_p.h>
+#include <private/qabstractanimation_p.h>
+#include <QAbstractAnimation>
+#include "deviceskin.h"
+
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 3))
+#include <private/qzipreader_p.h>
+#define QDECLARATIVEVIEWER_ZIP_SUPPORT
+#endif
+
+#include <QSettings>
+#include <QXmlStreamReader>
+#include <QBuffer>
+#include <QNetworkReply>
+#include <QNetworkCookieJar>
+#include <QNetworkDiskCache>
+#include <QNetworkAccessManager>
+#include <QSignalMapper>
+#include <QDeclarativeComponent>
+#include <QWidget>
+#include <QApplication>
+#include <QDir>
+#include <QTextBrowser>
+#include <QFile>
+#include <QFileInfo>
+#include <QVBoxLayout>
+#include <QProgressDialog>
+#include <QProcess>
+#include <QMenuBar>
+#include <QMenu>
+#include <QAction>
+#include <QFileDialog>
+#include <QTimer>
+#include <QGraphicsObject>
+#include <QNetworkProxyFactory>
+#include <QKeyEvent>
+#include <QMutex>
+#include <QMutexLocker>
+#include "proxysettings.h"
+#include "deviceorientation.h"
+
+#ifdef GL_SUPPORTED
+#include <QGLWidget>
+#endif
+
+#include <qfxtester.h>
+
+#if defined (Q_OS_SYMBIAN)
+#define SYMBIAN_NETWORK_INIT
+#endif
+
+#if defined (SYMBIAN_NETWORK_INIT)
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <QTextCodec>
+#include "sym_iap_util.h"
+#endif
+
+QT_BEGIN_NAMESPACE
+
+class Screen : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(Orientation orientation READ orientation NOTIFY orientationChanged)
+ Q_ENUMS(Orientation)
+
+public:
+ Screen(QObject *parent=0) : QObject(parent) {
+ connect(DeviceOrientation::instance(), SIGNAL(orientationChanged()),
+ this, SIGNAL(orientationChanged()));
+ }
+
+ enum Orientation { UnknownOrientation = DeviceOrientation::UnknownOrientation,
+ Portrait = DeviceOrientation::Portrait,
+ Landscape = DeviceOrientation::Landscape };
+ Orientation orientation() const { return Orientation(DeviceOrientation::instance()->orientation()); }
+
+signals:
+ void orientationChanged();
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(Screen)
+
+QT_BEGIN_NAMESPACE
+
+class SizedMenuBar : public QMenuBar
+{
+ Q_OBJECT
+public:
+ SizedMenuBar(QWidget *parent, QWidget *referenceWidget)
+ : QMenuBar(parent), refWidget(referenceWidget)
+ {
+ }
+
+ virtual QSize sizeHint() const
+ {
+ return QSize(refWidget->sizeHint().width(), QMenuBar::sizeHint().height());
+ }
+
+private:
+ QWidget *refWidget;
+};
+
+
+class PreviewDeviceSkin : public DeviceSkin
+{
+ Q_OBJECT
+public:
+ explicit PreviewDeviceSkin(const DeviceSkinParameters &parameters, QWidget *parent);
+
+ void setPreview(QWidget *formWidget);
+ void setPreviewAndScale(QWidget *formWidget);
+
+ void setScreenSize(const QSize& size)
+ {
+ QMatrix fit;
+ fit = fit.scale(qreal(size.width())/m_screenSize.width(),
+ qreal(size.height())/m_screenSize.height());
+ setTransform(fit);
+ QApplication::syncX();
+ }
+
+ QSize standardScreenSize() const { return m_screenSize; }
+
+ QMenu* menu;
+
+private slots:
+ void slotSkinKeyPressEvent(int code, const QString& text, bool autorep);
+ void slotSkinKeyReleaseEvent(int code, const QString& text, bool autorep);
+ void slotPopupMenu();
+
+private:
+ const QSize m_screenSize;
+};
+
+
+PreviewDeviceSkin::PreviewDeviceSkin(const DeviceSkinParameters &parameters, QWidget *parent) :
+ DeviceSkin(parameters, parent),
+ m_screenSize(parameters.screenSize())
+{
+ menu = new QMenu(this);
+ connect(this, SIGNAL(skinKeyPressEvent(int,QString,bool)),
+ this, SLOT(slotSkinKeyPressEvent(int,QString,bool)));
+ connect(this, SIGNAL(skinKeyReleaseEvent(int,QString,bool)),
+ this, SLOT(slotSkinKeyReleaseEvent(int,QString,bool)));
+ connect(this, SIGNAL(popupMenu()), this, SLOT(slotPopupMenu()));
+}
+
+void PreviewDeviceSkin::setPreview(QWidget *formWidget)
+{
+ formWidget->setFixedSize(m_screenSize);
+ formWidget->setParent(this, Qt::SubWindow);
+ formWidget->setAutoFillBackground(true);
+ setView(formWidget);
+}
+
+void PreviewDeviceSkin::setPreviewAndScale(QWidget *formWidget)
+{
+ setScreenSize(formWidget->sizeHint());
+ formWidget->setParent(this, Qt::SubWindow);
+ formWidget->setAutoFillBackground(true);
+ setView(formWidget);
+}
+
+void PreviewDeviceSkin::slotSkinKeyPressEvent(int code, const QString& text, bool autorep)
+{
+ if (QWidget *focusWidget = QApplication::focusWidget()) {
+ QKeyEvent e(QEvent::KeyPress,code,0,text,autorep);
+ QApplication::sendEvent(focusWidget, &e);
+ }
+
+}
+
+void PreviewDeviceSkin::slotSkinKeyReleaseEvent(int code, const QString& text, bool autorep)
+{
+ if (QWidget *focusWidget = QApplication::focusWidget()) {
+ QKeyEvent e(QEvent::KeyRelease,code,0,text,autorep);
+ QApplication::sendEvent(focusWidget, &e);
+ }
+}
+
+void PreviewDeviceSkin::slotPopupMenu()
+{
+ menu->exec(QCursor::pos());
+}
+
+static struct { const char *name, *args; } ffmpegprofiles[] = {
+ {"Maximum Quality", "-sameq"},
+ {"High Quality", "-qmax 2"},
+ {"Medium Quality", "-qmax 6"},
+ {"Low Quality", "-qmax 16"},
+ {"Custom ffmpeg arguments", ""},
+ {0,0}
+};
+
+class RecordingDialog : public QDialog, public Ui::RecordingOptions {
+ Q_OBJECT
+
+public:
+ RecordingDialog(QWidget *parent) : QDialog(parent)
+ {
+ setupUi(this);
+ hz->setValidator(new QDoubleValidator(hz));
+ for (int i=0; ffmpegprofiles[i].name; ++i) {
+ profile->addItem(ffmpegprofiles[i].name);
+ }
+ }
+
+ void setArguments(QString a)
+ {
+ int i;
+ for (i=0; ffmpegprofiles[i].args[0]; ++i) {
+ if (ffmpegprofiles[i].args == a) {
+ profile->setCurrentIndex(i);
+ args->setText(QLatin1String(ffmpegprofiles[i].args));
+ return;
+ }
+ }
+ customargs = a;
+ args->setText(a);
+ profile->setCurrentIndex(i);
+ }
+
+ QString arguments() const
+ {
+ int i = profile->currentIndex();
+ return ffmpegprofiles[i].args[0] ? QLatin1String(ffmpegprofiles[i].args) : customargs;
+ }
+
+private slots:
+ void pickProfile(int i)
+ {
+ if (ffmpegprofiles[i].args[0]) {
+ args->setText(QLatin1String(ffmpegprofiles[i].args));
+ } else {
+ args->setText(customargs);
+ }
+ }
+
+ void storeCustomArgs(QString s)
+ {
+ setArguments(s);
+ }
+
+private:
+ QString customargs;
+};
+
+class PersistentCookieJar : public QNetworkCookieJar {
+public:
+ PersistentCookieJar(QObject *parent) : QNetworkCookieJar(parent) { load(); }
+ ~PersistentCookieJar() { save(); }
+
+ virtual QList<QNetworkCookie> cookiesForUrl(const QUrl &url) const
+ {
+ QMutexLocker lock(&mutex);
+ return QNetworkCookieJar::cookiesForUrl(url);
+ }
+
+ virtual bool setCookiesFromUrl(const QList<QNetworkCookie> &cookieList, const QUrl &url)
+ {
+ QMutexLocker lock(&mutex);
+ return QNetworkCookieJar::setCookiesFromUrl(cookieList, url);
+ }
+
+private:
+ void save()
+ {
+ QMutexLocker lock(&mutex);
+ QList<QNetworkCookie> list = allCookies();
+ QByteArray data;
+ foreach (QNetworkCookie cookie, list) {
+ if (!cookie.isSessionCookie()) {
+ data.append(cookie.toRawForm());
+ data.append("\n");
+ }
+ }
+ QSettings settings("Nokia", "QtQmlViewer");
+ settings.setValue("Cookies",data);
+ }
+
+ void load()
+ {
+ QMutexLocker lock(&mutex);
+ QSettings settings("Nokia", "QtQmlViewer");
+ QByteArray data = settings.value("Cookies").toByteArray();
+ setAllCookies(QNetworkCookie::parseCookies(data));
+ }
+
+ mutable QMutex mutex;
+};
+
+class NetworkAccessManagerFactory : public QDeclarativeNetworkAccessManagerFactory
+{
+public:
+ NetworkAccessManagerFactory() : cookieJar(0), cacheSize(0) {}
+ ~NetworkAccessManagerFactory() {
+ delete cookieJar;
+ }
+
+ QNetworkAccessManager *create(QObject *parent) {
+ QMutexLocker lock(&mutex);
+ QNetworkAccessManager *manager = new QNetworkAccessManager(parent);
+ if (!cookieJar)
+ cookieJar = new PersistentCookieJar(0);
+ manager->setCookieJar(cookieJar);
+ cookieJar->setParent(0);
+ setupProxy(manager);
+ if (cacheSize > 0) {
+ QNetworkDiskCache *cache = new QNetworkDiskCache;
+ cache->setCacheDirectory(QDir::tempPath()+QLatin1String("/qml-duiviewer-network-cache"));
+ cache->setMaximumCacheSize(cacheSize);
+ manager->setCache(cache);
+ } else {
+ manager->setCache(0);
+ }
+ qDebug() << "created new network access manager for" << parent;
+ return manager;
+ }
+
+ void setupProxy(QNetworkAccessManager *nam)
+ {
+ class SystemProxyFactory : public QNetworkProxyFactory
+ {
+ public:
+ virtual QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query)
+ {
+ QString protocolTag = query.protocolTag();
+ if (httpProxyInUse && (protocolTag == "http" || protocolTag == "https")) {
+ QList<QNetworkProxy> ret;
+ ret << httpProxy;
+ return ret;
+ }
+ return QNetworkProxyFactory::systemProxyForQuery(query);
+ }
+ void setHttpProxy (QNetworkProxy proxy)
+ {
+ httpProxy = proxy;
+ httpProxyInUse = true;
+ }
+ void unsetHttpProxy ()
+ {
+ httpProxyInUse = false;
+ }
+ private:
+ bool httpProxyInUse;
+ QNetworkProxy httpProxy;
+ };
+
+ SystemProxyFactory *proxyFactory = new SystemProxyFactory;
+ if (ProxySettings::httpProxyInUse())
+ proxyFactory->setHttpProxy(ProxySettings::httpProxy());
+ else
+ proxyFactory->unsetHttpProxy();
+ nam->setProxyFactory(proxyFactory);
+ }
+
+ void setCacheSize(int size) {
+ if (size != cacheSize) {
+ cacheSize = size;
+ }
+ }
+
+ PersistentCookieJar *cookieJar;
+ QMutex mutex;
+ int cacheSize;
+};
+
+
+QString QDeclarativeViewer::getVideoFileName()
+{
+ QString title = convertAvailable || ffmpegAvailable ? tr("Save Video File") : tr("Save PNG Frames");
+ QStringList types;
+ if (ffmpegAvailable) types += tr("Common Video files")+QLatin1String(" (*.avi *.mpeg *.mov)");
+ if (convertAvailable) types += tr("GIF Animation")+QLatin1String(" (*.gif)");
+ types += tr("Individual PNG frames")+QLatin1String(" (*.png)");
+ if (ffmpegAvailable) types += tr("All ffmpeg formats (*.*)");
+ return QFileDialog::getSaveFileName(this, title, "", types.join(";; "));
+}
+
+
+QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
+#if defined(Q_OS_SYMBIAN)
+ : QMainWindow(parent, flags)
+#else
+ : QWidget(parent, flags)
+#endif
+ , frame_stream(0), scaleSkin(true), mb(0)
+ , portraitOrientation(0), landscapeOrientation(0)
+ , m_scriptOptions(0), tester(0), useQmlFileBrowser(true)
+{
+ devicemode = false;
+ skin = 0;
+ canvas = 0;
+ record_autotime = 0;
+ record_rate = 50;
+ record_args += QLatin1String("-sameq");
+
+ recdlg = new RecordingDialog(this);
+ connect(recdlg->pickfile, SIGNAL(clicked()), this, SLOT(pickRecordingFile()));
+ senseFfmpeg();
+ senseImageMagick();
+ if (!ffmpegAvailable)
+ recdlg->ffmpegOptions->hide();
+ if (!ffmpegAvailable && !convertAvailable)
+ recdlg->rateOptions->hide();
+ QString warn;
+ if (!ffmpegAvailable) {
+ if (!convertAvailable)
+ warn = tr("ffmpeg and ImageMagick not available - no video output");
+ else
+ warn = tr("ffmpeg not available - GIF and PNG outputs only");
+ recdlg->warning->setText(warn);
+ } else {
+ recdlg->warning->hide();
+ }
+
+ canvas = new QDeclarativeView(this);
+ canvas->setAttribute(Qt::WA_OpaquePaintEvent);
+ canvas->setAttribute(Qt::WA_NoSystemBackground);
+ canvas->setResizeMode((!skin || !scaleSkin) ? QDeclarativeView::SizeRootObjectToView : QDeclarativeView::SizeViewToRootObject);
+ canvas->setFocus();
+
+ QObject::connect(canvas, SIGNAL(sceneResized(QSize)), this, SLOT(sceneResized(QSize)));
+ QObject::connect(canvas, SIGNAL(statusChanged(QDeclarativeView::Status)), this, SLOT(statusChanged()));
+ QObject::connect(canvas->engine(), SIGNAL(quit()), QCoreApplication::instance (), SLOT(quit()));
+
+ if (!(flags & Qt::FramelessWindowHint)) {
+ createMenu(menuBar(),0);
+ setPortrait();
+ }
+
+#if !defined(Q_OS_SYMBIAN)
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->setMargin(0);
+ layout->setSpacing(0);
+ setLayout(layout);
+ if (mb)
+ layout->addWidget(mb);
+ layout->addWidget(canvas);
+#else
+ setCentralWidget(canvas);
+#endif
+
+ namFactory = new NetworkAccessManagerFactory;
+ canvas->engine()->setNetworkAccessManagerFactory(namFactory);
+
+ connect(&autoStartTimer, SIGNAL(triggered()), this, SLOT(autoStartRecording()));
+ connect(&autoStopTimer, SIGNAL(triggered()), this, SLOT(autoStopRecording()));
+ connect(&recordTimer, SIGNAL(triggered()), this, SLOT(recordFrame()));
+ autoStartTimer.setRunning(false);
+ autoStopTimer.setRunning(false);
+ recordTimer.setRunning(false);
+ recordTimer.setRepeating(true);
+}
+
+QDeclarativeViewer::~QDeclarativeViewer()
+{
+ canvas->engine()->setNetworkAccessManagerFactory(0);
+ delete namFactory;
+}
+
+QMenuBar *QDeclarativeViewer::menuBar() const
+{
+#if !defined(Q_OS_SYMBIAN)
+ if (!mb)
+ mb = new SizedMenuBar((QWidget*)this, canvas);
+#else
+ mb = QMainWindow::menuBar();
+#endif
+
+ return mb;
+}
+
+void QDeclarativeViewer::createMenu(QMenuBar *menu, QMenu *flatmenu)
+{
+ QObject *parent = flatmenu ? (QObject*)flatmenu : (QObject*)menu;
+
+ QMenu *fileMenu = flatmenu ? flatmenu : menu->addMenu(tr("&File"));
+
+ QAction *openAction = new QAction(tr("&Open..."), parent);
+ openAction->setShortcut(QKeySequence("Ctrl+O"));
+ connect(openAction, SIGNAL(triggered()), this, SLOT(openFile()));
+ fileMenu->addAction(openAction);
+
+ QAction *reloadAction = new QAction(tr("&Reload"), parent);
+ reloadAction->setShortcut(QKeySequence("Ctrl+R"));
+ connect(reloadAction, SIGNAL(triggered()), this, SLOT(reload()));
+ fileMenu->addAction(reloadAction);
+
+#if defined(Q_OS_SYMBIAN)
+ QAction *networkAction = new QAction(tr("Start &Network"), parent);
+ connect(networkAction, SIGNAL(triggered()), this, SLOT(startNetwork()));
+ fileMenu->addAction(networkAction);
+#endif
+
+#if !defined(Q_OS_SYMBIAN)
+ if (flatmenu) flatmenu->addSeparator();
+
+ QMenu *recordMenu = flatmenu ? flatmenu : menu->addMenu(tr("&Recording"));
+
+ QAction *snapshotAction = new QAction(tr("&Take Snapshot\tF3"), parent);
+ connect(snapshotAction, SIGNAL(triggered()), this, SLOT(takeSnapShot()));
+ recordMenu->addAction(snapshotAction);
+
+ recordAction = new QAction(tr("Start Recording &Video\tF9"), parent);
+ connect(recordAction, SIGNAL(triggered()), this, SLOT(toggleRecordingWithSelection()));
+ recordMenu->addAction(recordAction);
+
+ QAction *recordOptions = new QAction(tr("Video &Options..."), parent);
+ connect(recordOptions, SIGNAL(triggered()), this, SLOT(chooseRecordingOptions()));
+
+ if (flatmenu)
+ flatmenu->addAction(recordOptions);
+
+ if (flatmenu) flatmenu->addSeparator();
+
+ QMenu *debugMenu = flatmenu ? flatmenu->addMenu(tr("&Debugging")) : menu->addMenu(tr("&Debugging"));
+
+ QAction *slowAction = new QAction(tr("&Slow Down Animations"), parent);
+ slowAction->setShortcut(QKeySequence("Ctrl+."));
+ slowAction->setCheckable(true);
+ connect(slowAction, SIGNAL(triggered(bool)), this, SLOT(setSlowMode(bool)));
+ debugMenu->addAction(slowAction);
+
+ if (flatmenu) flatmenu->addSeparator();
+
+ QMenu *skinMenu = flatmenu ? flatmenu->addMenu(tr("&Skin")) : menu->addMenu(tr("&Skin"));
+
+ QActionGroup *skinActions;
+ QAction *skinAction;
+
+ skinActions = new QActionGroup(parent);
+ skinAction = new QAction(tr("Scale skin"), parent);
+ skinAction->setCheckable(true);
+ skinAction->setChecked(scaleSkin);
+ skinActions->addAction(skinAction);
+ skinMenu->addAction(skinAction);
+ connect(skinAction, SIGNAL(triggered()), this, SLOT(setScaleSkin()));
+ skinAction = new QAction(tr("Resize view"), parent);
+ skinAction->setCheckable(true);
+ skinAction->setChecked(!scaleSkin);
+ skinActions->addAction(skinAction);
+ skinMenu->addAction(skinAction);
+ connect(skinAction, SIGNAL(triggered()), this, SLOT(setScaleView()));
+ skinMenu->addSeparator();
+
+ skinActions = new QActionGroup(parent);
+ QSignalMapper *mapper = new QSignalMapper(parent);
+ skinAction = new QAction(tr("None"), parent);
+ skinAction->setCheckable(true);
+ if (currentSkin.isEmpty())
+ skinAction->setChecked(true);
+ skinActions->addAction(skinAction);
+ skinMenu->addAction(skinAction);
+ mapper->setMapping(skinAction, "");
+ connect(skinAction, SIGNAL(triggered()), mapper, SLOT(map()));
+ skinMenu->addSeparator();
+
+ foreach (QString name, builtinSkins()) {
+ skinAction = new QAction(name, parent);
+ skinActions->addAction(skinAction);
+ skinMenu->addAction(skinAction);
+ skinAction->setCheckable(true);
+ if (":skin/"+name+".skin" == currentSkin)
+ skinAction->setChecked(true);
+ mapper->setMapping(skinAction, name);
+ connect(skinAction, SIGNAL(triggered()), mapper, SLOT(map()));
+ }
+ connect(mapper, SIGNAL(mapped(QString)), this, SLOT(setSkin(QString)));
+
+ if (flatmenu) flatmenu->addSeparator();
+#endif // Q_OS_SYMBIAN
+
+ QMenu *settingsMenu = flatmenu ? flatmenu : menu->addMenu(tr("S&ettings"));
+ QAction *proxyAction = new QAction(tr("Http &proxy..."), parent);
+ connect(proxyAction, SIGNAL(triggered()), this, SLOT(showProxySettings()));
+ settingsMenu->addAction(proxyAction);
+#if !defined(Q_OS_SYMBIAN)
+ if (!flatmenu)
+ settingsMenu->addAction(recordOptions);
+#else
+ QAction *fullscreenAction = new QAction(tr("Full Screen"), parent);
+ fullscreenAction->setCheckable(true);
+ connect(fullscreenAction, SIGNAL(triggered()), this, SLOT(toggleFullScreen()));
+ settingsMenu->addAction(fullscreenAction);
+#endif
+
+ QMenu *propertiesMenu = settingsMenu->addMenu(tr("Properties"));
+ QActionGroup *orientation = new QActionGroup(parent);
+
+ QAction *toggleOrientation = new QAction(tr("&Toggle Orientation"), parent);
+ toggleOrientation->setCheckable(true);
+ toggleOrientation->setShortcut(QKeySequence("Ctrl+T"));
+ settingsMenu->addAction(toggleOrientation);
+ connect(toggleOrientation, SIGNAL(triggered()), this, SLOT(toggleOrientation()));
+
+ orientation->setExclusive(true);
+ portraitOrientation = new QAction(tr("orientation: Portrait"), parent);
+ portraitOrientation->setCheckable(true);
+ connect(portraitOrientation, SIGNAL(triggered()), this, SLOT(setPortrait()));
+ orientation->addAction(portraitOrientation);
+ propertiesMenu->addAction(portraitOrientation);
+
+ landscapeOrientation = new QAction(tr("orientation: Landscape"), parent);
+ landscapeOrientation->setCheckable(true);
+ connect(landscapeOrientation, SIGNAL(triggered()), this, SLOT(setLandscape()));
+ orientation->addAction(landscapeOrientation);
+ propertiesMenu->addAction(landscapeOrientation);
+
+ if (flatmenu) flatmenu->addSeparator();
+
+ QMenu *helpMenu = flatmenu ? flatmenu : menu->addMenu(tr("&Help"));
+ QAction *aboutAction = new QAction(tr("&About Qt..."), parent);
+ connect(aboutAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+ helpMenu->addAction(aboutAction);
+
+ QAction *quitAction = new QAction(tr("&Quit"), parent);
+ quitAction->setShortcut(QKeySequence("Ctrl+Q"));
+ connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+ fileMenu->addSeparator();
+ fileMenu->addAction(quitAction);
+ if (menu) {
+ menu->setFixedHeight(menu->sizeHint().height());
+ menu->setMinimumWidth(10);
+ }
+}
+
+void QDeclarativeViewer::showProxySettings()
+{
+ ProxySettings settingsDlg (this);
+
+ connect (&settingsDlg, SIGNAL (accepted()), this, SLOT (proxySettingsChanged ()));
+
+ settingsDlg.exec();
+}
+
+void QDeclarativeViewer::proxySettingsChanged()
+{
+ reload ();
+}
+
+void QDeclarativeViewer::setPortrait()
+{
+ DeviceOrientation::instance()->setOrientation(DeviceOrientation::Portrait);
+ portraitOrientation->setChecked(true);
+}
+
+void QDeclarativeViewer::setLandscape()
+{
+ DeviceOrientation::instance()->setOrientation(DeviceOrientation::Landscape);
+ landscapeOrientation->setChecked(true);
+}
+
+void QDeclarativeViewer::toggleOrientation()
+{
+ DeviceOrientation::instance()->setOrientation(DeviceOrientation::instance()->orientation()==DeviceOrientation::Portrait?DeviceOrientation::Landscape:DeviceOrientation::Portrait);
+}
+
+void QDeclarativeViewer::toggleFullScreen()
+{
+ if (isFullScreen())
+ showMaximized();
+ else
+ showFullScreen();
+}
+
+void QDeclarativeViewer::setScaleSkin()
+{
+ if (scaleSkin)
+ return;
+ scaleSkin = true;
+ canvas->setResizeMode((!skin || !scaleSkin) ? QDeclarativeView::SizeRootObjectToView : QDeclarativeView::SizeViewToRootObject);
+ if (skin) {
+ canvas->setFixedSize(canvas->sizeHint());
+ skin->setScreenSize(canvas->sizeHint());
+ }
+}
+
+void QDeclarativeViewer::setScaleView()
+{
+ if (!scaleSkin)
+ return;
+ scaleSkin = false;
+ if (skin) {
+ canvas->setResizeMode((!skin || !scaleSkin) ? QDeclarativeView::SizeRootObjectToView : QDeclarativeView::SizeViewToRootObject);
+ canvas->setMinimumSize(QSize(0,0));
+ canvas->setMaximumSize(QSize(16777215,16777215));
+ canvas->resize(skin->standardScreenSize());
+ skin->setScreenSize(skin->standardScreenSize());
+ }
+}
+
+
+void QDeclarativeViewer::takeSnapShot()
+{
+ static int snapshotcount = 1;
+ QString snapFileName = QString(QLatin1String("snapshot%1.png")).arg(snapshotcount);
+ QPixmap::grabWidget(canvas).save(snapFileName);
+ qDebug() << "Wrote" << snapFileName;
+ ++snapshotcount;
+}
+
+void QDeclarativeViewer::pickRecordingFile()
+{
+ QString fileName = getVideoFileName();
+ if (!fileName.isEmpty())
+ recdlg->file->setText(fileName);
+}
+
+void QDeclarativeViewer::chooseRecordingOptions()
+{
+ // File
+ recdlg->file->setText(record_file);
+
+ // Size
+ recdlg->sizeOriginal->setText(tr("Original (%1x%2)").arg(canvas->width()).arg(canvas->height()));
+ if (recdlg->sizeWidth->value()<=1) {
+ recdlg->sizeWidth->setValue(canvas->width());
+ recdlg->sizeHeight->setValue(canvas->height());
+ }
+
+ // Rate
+ if (record_rate == 24)
+ recdlg->hz24->setChecked(true);
+ else if (record_rate == 25)
+ recdlg->hz25->setChecked(true);
+ else if (record_rate == 50)
+ recdlg->hz50->setChecked(true);
+ else if (record_rate == 60)
+ recdlg->hz60->setChecked(true);
+ else {
+ recdlg->hzCustom->setChecked(true);
+ recdlg->hz->setText(QString::number(record_rate));
+ }
+
+ // Profile
+ recdlg->setArguments(record_args.join(" "));
+ if (recdlg->exec()) {
+ // File
+ record_file = recdlg->file->text();
+ // Size
+ if (recdlg->sizeOriginal->isChecked())
+ record_outsize = QSize();
+ else if (recdlg->size720p->isChecked())
+ record_outsize = QSize(1280,720);
+ else if (recdlg->sizeVGA->isChecked())
+ record_outsize = QSize(640,480);
+ else if (recdlg->sizeQVGA->isChecked())
+ record_outsize = QSize(320,240);
+ else
+ record_outsize = QSize(recdlg->sizeWidth->value(),recdlg->sizeHeight->value());
+ // Rate
+ if (recdlg->hz24->isChecked())
+ record_rate = 24;
+ else if (recdlg->hz25->isChecked())
+ record_rate = 25;
+ else if (recdlg->hz50->isChecked())
+ record_rate = 50;
+ else if (recdlg->hz60->isChecked())
+ record_rate = 60;
+ else {
+ record_rate = recdlg->hz->text().toDouble();
+ }
+ // Profile
+ record_args = recdlg->arguments().split(" ",QString::SkipEmptyParts);
+ }
+}
+
+void QDeclarativeViewer::toggleRecordingWithSelection()
+{
+ if (!recordTimer.isRunning()) {
+ if (record_file.isEmpty()) {
+ QString fileName = getVideoFileName();
+ if (fileName.isEmpty())
+ return;
+ if (!fileName.contains(QRegExp(".[^\\/]*$")))
+ fileName += ".avi";
+ setRecordFile(fileName);
+ }
+ }
+ toggleRecording();
+}
+
+void QDeclarativeViewer::toggleRecording()
+{
+ if (record_file.isEmpty()) {
+ toggleRecordingWithSelection();
+ return;
+ }
+ bool recording = !recordTimer.isRunning();
+ recordAction->setText(recording ? tr("&Stop Recording Video\tF9") : tr("&Start Recording Video\tF9"));
+ setRecording(recording);
+}
+
+void QDeclarativeViewer::setSlowMode(bool enable)
+{
+ QUnifiedTimer::instance()->setSlowModeEnabled(enable);
+}
+
+void QDeclarativeViewer::addLibraryPath(const QString& lib)
+{
+ canvas->engine()->addImportPath(lib);
+}
+
+void QDeclarativeViewer::reload()
+{
+ openQml(currentFileOrUrl);
+}
+
+void QDeclarativeViewer::open(const QString& doc)
+{
+#ifdef QDECLARATIVEVIEWER_ZIP_SUPPORT
+ if (doc.endsWith(".wgt",Qt::CaseInsensitive)
+ || doc.endsWith(".wgz",Qt::CaseInsensitive)
+ || doc.endsWith(".zip",Qt::CaseInsensitive))
+ openWgt(doc);
+ else
+#endif
+ openQml(doc);
+}
+
+void QDeclarativeViewer::openWgt(const QString& doc)
+{
+#ifdef QDECLARATIVEVIEWER_ZIP_SUPPORT
+ // XXX This functionality could be migrated to QDeclarativeView once refined
+
+ QUrl url(doc);
+ if (url.isRelative())
+ url = QUrl::fromLocalFile(doc);
+ delete canvas->rootObject();
+ canvas->engine()->clearComponentCache();
+ QNetworkAccessManager * nam = canvas->engine()->networkAccessManager();
+ wgtreply = nam->get(QNetworkRequest(url));
+ connect(wgtreply,SIGNAL(finished()),this,SLOT(unpackWgt()));
+#endif
+}
+
+#ifdef QDECLARATIVEVIEWER_ZIP_SUPPORT
+static void removeRecursive(const QString& dirname)
+{
+ QDir dir(dirname);
+ QFileInfoList entries(dir.entryInfoList(QDir::Dirs|QDir::Files|QDir::NoDotAndDotDot));
+ for (int i = 0; i < entries.count(); ++i)
+ if (entries[i].isDir())
+ removeRecursive(entries[i].filePath());
+ else
+ dir.remove(entries[i].fileName());
+ QDir().rmdir(dirname);
+}
+#endif
+
+void QDeclarativeViewer::unpackWgt()
+{
+#ifdef QDECLARATIVEVIEWER_ZIP_SUPPORT
+ QByteArray all = wgtreply->readAll();
+ QBuffer buf(&all);
+ buf.open(QIODevice::ReadOnly);
+ QZipReader zip(&buf);
+ /*
+ for (int i=0; i<zip.count(); ++i) {
+ QZipReader::FileInfo info = zip.entryInfoAt(i);
+ qDebug() << "zip:" << info.filePath;
+ }
+ */
+ wgtdir = QDir::tempPath()+QDir::separator()+QLatin1String("qml-wgt");
+ removeRecursive(wgtdir);
+ QDir().mkpath(wgtdir);
+ zip.extractAll(wgtdir);
+
+ QString rootfile;
+
+ if (wgtreply->header(QNetworkRequest::ContentTypeHeader).toString() == "application/widget" || wgtreply->url().path().endsWith(".wgt",Qt::CaseInsensitive)) {
+ // W3C Draft http://www.w3.org/TR/2009/CR-widgets-20091201
+ QFile configfile(wgtdir+QDir::separator()+"config.xml");
+ if (configfile.open(QIODevice::ReadOnly)) {
+ QXmlStreamReader config(&configfile);
+ if (config.readNextStartElement() && config.name() == "widget") {
+ while (config.readNextStartElement()) {
+ if (config.name() == "content") {
+ rootfile = wgtdir + QDir::separator();
+ rootfile += config.attributes().value(QLatin1String("src"));
+ }
+ // XXX process other config
+
+ config.skipCurrentElement();
+ }
+ }
+ } else {
+ qWarning("No config.xml found - non-standard WGT file");
+ }
+ if (rootfile.isEmpty()) {
+ QString def = wgtdir+QDir::separator()+"index.qml";
+ if (QFile::exists(def))
+ rootfile = def;
+ }
+ } else {
+ // Just find index.qml, preferably at the root
+ for (int i=0; i<zip.count(); ++i) {
+ QZipReader::FileInfo info = zip.entryInfoAt(i);
+ if (info.filePath.compare(QLatin1String("index.qml"),Qt::CaseInsensitive)==0)
+ rootfile = wgtdir+QDir::separator()+info.filePath;
+ if (rootfile.isEmpty() && info.filePath.endsWith("/index.qml",Qt::CaseInsensitive))
+ rootfile = wgtdir+QDir::separator()+info.filePath;
+ }
+ }
+
+ openQml(rootfile);
+#endif
+}
+
+void QDeclarativeViewer::openFile()
+{
+ QString cur = canvas->source().toLocalFile();
+ if (useQmlFileBrowser) {
+ openQml("qrc:/content/Browser.qml");
+ } else {
+ QString fileName = QFileDialog::getOpenFileName(this, tr("Open QML file"), cur, tr("QML Files (*.qml)"));
+ if (!fileName.isEmpty()) {
+ QFileInfo fi(fileName);
+ openQml(fi.absoluteFilePath());
+ }
+ }
+}
+
+void QDeclarativeViewer::statusChanged()
+{
+ if (canvas->status() == QDeclarativeView::Error && tester)
+ tester->executefailure();
+
+ if (canvas->status() == QDeclarativeView::Ready)
+ resize(sizeHint());
+}
+
+void QDeclarativeViewer::launch(const QString& file_or_url)
+{
+ QMetaObject::invokeMethod(this, "openQml", Qt::QueuedConnection, Q_ARG(QString, file_or_url));
+}
+
+void QDeclarativeViewer::openQml(const QString& file_or_url)
+{
+ currentFileOrUrl = file_or_url;
+
+ QUrl url;
+ QFileInfo fi(file_or_url);
+ if (fi.exists())
+ url = QUrl::fromLocalFile(fi.absoluteFilePath());
+ else
+ url = QUrl(file_or_url);
+ setWindowTitle(tr("%1 - Qt Declarative UI Viewer").arg(file_or_url));
+
+ if (!m_script.isEmpty())
+ tester = new QDeclarativeTester(m_script, m_scriptOptions, canvas);
+
+ delete canvas->rootObject();
+ canvas->engine()->clearComponentCache();
+ QDeclarativeContext *ctxt = canvas->rootContext();
+ ctxt->setContextProperty("qmlViewer", this);
+#ifdef Q_OS_SYMBIAN
+ ctxt->setContextProperty("qmlViewerFolder", "E:\\"); // Documents on your S60 phone
+#else
+ ctxt->setContextProperty("qmlViewerFolder", QDir::currentPath());
+#endif
+
+ QString fileName = url.toLocalFile();
+ if (!fileName.isEmpty()) {
+ QFileInfo fi(fileName);
+ if (fi.exists()) {
+ if (fi.suffix().toLower() != QLatin1String("qml")) {
+ qWarning() << "qml cannot open non-QML file" << fileName;
+ return;
+ }
+
+ QDir dir(fi.path()+"/dummydata", "*.qml");
+ 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());
+ QObject *dummyData = comp.create();
+
+ if(comp.isError()) {
+ QList<QDeclarativeError> errors = comp.errors();
+ foreach (const QDeclarativeError &error, errors) {
+ qWarning() << error;
+ }
+ if (tester) tester->executefailure();
+ }
+
+ if (dummyData) {
+ qWarning() << "Loaded dummy data:" << dir.filePath(qml);
+ qml.truncate(qml.length()-4);
+ ctxt->setContextProperty(qml, dummyData);
+ dummyData->setParent(this);
+ }
+ }
+ } else {
+ qWarning() << "qml cannot find file:" << fileName;
+ return;
+ }
+ }
+
+ QTime t;
+ t.start();
+
+ canvas->setSource(url);
+
+ qWarning() << "Wall startup time:" << t.elapsed();
+
+ if (!skin) {
+ canvas->updateGeometry();
+ if (mb)
+ mb->updateGeometry();
+ if (!isFullScreen() && !isMaximized())
+ resize(sizeHint());
+ } else {
+ if (scaleSkin)
+ canvas->resize(canvas->sizeHint());
+ else {
+ canvas->setFixedSize(skin->standardScreenSize());
+ canvas->resize(skin->standardScreenSize());
+ }
+ }
+
+#ifdef QTOPIA
+ show();
+#endif
+}
+
+void QDeclarativeViewer::startNetwork()
+{
+#if defined(SYMBIAN_NETWORK_INIT)
+ qt_SetDefaultIap();
+#endif
+}
+
+QStringList QDeclarativeViewer::builtinSkins() const
+{
+ QDir dir(":/skins/","*.skin");
+ const QFileInfoList l = dir.entryInfoList();
+ QStringList r;
+ for (QFileInfoList::const_iterator it = l.begin(); it != l.end(); ++it) {
+ r += (*it).baseName();
+ }
+ return r;
+}
+
+void QDeclarativeViewer::setSkin(const QString& skinDirOrName)
+{
+ QString skinDirectory = skinDirOrName;
+
+ if (!QDir(skinDirOrName).exists() && QDir(":/skins/"+skinDirOrName+".skin").exists())
+ skinDirectory = ":/skins/"+skinDirOrName+".skin";
+
+ if (currentSkin == skinDirectory)
+ return;
+
+ currentSkin = skinDirectory;
+
+ // XXX QWidget::setMask does not handle changes well, and we may
+ // XXX have been signalled from an item in a menu we're replacing,
+ // XXX hence some rather convoluted resetting here...
+
+ QString err;
+ if (skin) {
+ skin->hide();
+ skin->deleteLater();
+ }
+
+ canvas->setResizeMode((!skin || !scaleSkin) ? QDeclarativeView::SizeRootObjectToView : QDeclarativeView::SizeViewToRootObject);
+
+ DeviceSkinParameters parameters;
+ if (!skinDirectory.isEmpty() && parameters.read(skinDirectory,DeviceSkinParameters::ReadAll,&err)) {
+ layout()->setEnabled(false);
+ //setMenuBar(0);
+ if (mb)
+ mb->hide();
+ if (!err.isEmpty())
+ qWarning() << err;
+ skin = new PreviewDeviceSkin(parameters,this);
+ canvas->resize(canvas->sizeHint());
+ if (scaleSkin)
+ skin->setPreviewAndScale(canvas);
+ else
+ skin->setPreview(canvas);
+ createMenu(0,skin->menu);
+ skin->show();
+ } else {
+ skin = 0;
+ clearMask();
+ menuBar()->clear();
+ canvas->setParent(this, Qt::SubWindow);
+ createMenu(menuBar(),0);
+ mb->show();
+ setMinimumSize(QSize(0,0));
+ setMaximumSize(QSize(16777215,16777215));
+ canvas->setMinimumSize(QSize(0,0));
+ canvas->setMaximumSize(QSize(16777215,16777215));
+ QRect g = geometry();
+ g.setSize(sizeHint());
+ setParent(0,windowFlags()); // recreate
+ canvas->move(0,menuBar()->sizeHint().height());
+ setGeometry(g);
+ layout()->setEnabled(true);
+ show();
+ }
+ canvas->show();
+}
+
+void QDeclarativeViewer::setAutoRecord(int from, int to)
+{
+ if (from==0) from=1; // ensure resized
+ record_autotime = to-from;
+ autoStartTimer.setInterval(from);
+ autoStartTimer.setRunning(true);
+}
+
+void QDeclarativeViewer::setRecordArgs(const QStringList& a)
+{
+ record_args = a;
+}
+
+void QDeclarativeViewer::setRecordFile(const QString& f)
+{
+ record_file = f;
+}
+
+void QDeclarativeViewer::setRecordRate(int fps)
+{
+ record_rate = fps;
+}
+
+void QDeclarativeViewer::sceneResized(QSize size)
+{
+ if (size.width() > 0 && size.height() > 0) {
+ if (skin && scaleSkin)
+ skin->setScreenSize(size);
+ }
+}
+
+void QDeclarativeViewer::keyPressEvent(QKeyEvent *event)
+{
+ if (event->key() == Qt::Key_0 && devicemode)
+ exit(0);
+ else if (event->key() == Qt::Key_F1 || (event->key() == Qt::Key_1 && devicemode)) {
+ qDebug() << "F1 - help\n"
+ << "F2 - save test script\n"
+ << "F3 - take PNG snapshot\n"
+ << "F4 - show items and state\n"
+ << "F5 - reload QML\n"
+ << "F6 - show object tree\n"
+ << "F7 - show timing\n"
+ << "F8 - show performance (if available)\n"
+ << "F9 - toggle video recording\n"
+ << "F10 - toggle orientation\n"
+ << "device keys: 0=quit, 1..8=F1..F8"
+ ;
+ } else if (event->key() == Qt::Key_F2 || (event->key() == Qt::Key_2 && devicemode)) {
+ if (tester && m_scriptOptions & Record)
+ tester->save();
+ } else if (event->key() == Qt::Key_F3 || (event->key() == Qt::Key_3 && devicemode)) {
+ takeSnapShot();
+ } else if (event->key() == Qt::Key_F5 || (event->key() == Qt::Key_5 && devicemode)) {
+ reload();
+ } else if (event->key() == Qt::Key_F8 || (event->key() == Qt::Key_8 && devicemode)) {
+ QPerformanceLog::displayData();
+ QPerformanceLog::clear();
+ } else if (event->key() == Qt::Key_F9 || (event->key() == Qt::Key_9 && devicemode)) {
+ toggleRecording();
+ } else if (event->key() == Qt::Key_F10) {
+ if (portraitOrientation) {
+ if (portraitOrientation->isChecked())
+ setLandscape();
+ else
+ setPortrait();
+ }
+ }
+
+ QWidget::keyPressEvent(event);
+}
+
+void QDeclarativeViewer::senseImageMagick()
+{
+ QProcess proc;
+ proc.start("convert", QStringList() << "-h");
+ proc.waitForFinished(2000);
+ QString help = proc.readAllStandardOutput();
+ convertAvailable = help.contains("ImageMagick");
+}
+
+void QDeclarativeViewer::senseFfmpeg()
+{
+ QProcess proc;
+ proc.start("ffmpeg", QStringList() << "-h");
+ proc.waitForFinished(2000);
+ QString ffmpegHelp = proc.readAllStandardOutput();
+ ffmpegAvailable = ffmpegHelp.contains("-s ");
+ ffmpegHelp = tr("Video recording uses ffmpeg:")+"\n\n"+ffmpegHelp;
+
+ QDialog *d = new QDialog(recdlg);
+ QVBoxLayout *l = new QVBoxLayout(d);
+ QTextBrowser *b = new QTextBrowser(d);
+ QFont f = b->font();
+ f.setFamily("courier");
+ b->setFont(f);
+ b->setText(ffmpegHelp);
+ l->addWidget(b);
+ d->setLayout(l);
+ ffmpegHelpWindow = d;
+ connect(recdlg->ffmpegHelp,SIGNAL(clicked()), ffmpegHelpWindow, SLOT(show()));
+}
+
+void QDeclarativeViewer::setRecording(bool on)
+{
+ if (on == recordTimer.isRunning())
+ return;
+
+ int period = int(1000/record_rate+0.5);
+ QUnifiedTimer::instance()->setTimingInterval(on ? period:16);
+ QUnifiedTimer::instance()->setConsistentTiming(on);
+ if (on) {
+ canvas->setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
+ recordTimer.setInterval(period);
+ recordTimer.setRunning(true);
+ frame_fmt = record_file.right(4).toLower();
+ frame = QImage(canvas->width(),canvas->height(),QImage::Format_RGB32);
+ if (frame_fmt != ".png" && (!convertAvailable || frame_fmt != ".gif")) {
+ // Stream video to ffmpeg
+
+ QProcess *proc = new QProcess(this);
+ connect(proc, SIGNAL(finished(int)), this, SLOT(ffmpegFinished(int)));
+ frame_stream = proc;
+
+ QStringList args;
+ args << "-y";
+ args << "-r" << QString::number(record_rate);
+ args << "-f" << "rawvideo";
+ args << "-pix_fmt" << (frame_fmt == ".gif" ? "rgb24" : "rgb32");
+ args << "-s" << QString("%1x%2").arg(canvas->width()).arg(canvas->height());
+ args << "-i" << "-";
+ if (record_outsize.isValid()) {
+ args << "-s" << QString("%1x%2").arg(record_outsize.width()).arg(record_outsize.height());
+ args << "-aspect" << QString::number(double(canvas->width())/canvas->height());
+ }
+ args += record_args;
+ args << record_file;
+ proc->start("ffmpeg",args);
+
+ } else {
+ // Store frames, save to GIF/PNG
+ frame_stream = 0;
+ }
+ } else {
+ canvas->setViewportUpdateMode(QGraphicsView::MinimalViewportUpdate);
+ recordTimer.setRunning(false);
+ if (frame_stream) {
+ qDebug() << "Saving video...";
+ frame_stream->close();
+ qDebug() << "Wrote" << record_file;
+ } else {
+ QProgressDialog progress(tr("Saving frames..."), tr("Cancel"), 0, frames.count()+10, this);
+ progress.setWindowModality(Qt::WindowModal);
+
+ int frame=0;
+ QStringList inputs;
+ qDebug() << "Saving frames...";
+
+ QString framename;
+ bool png_output = false;
+ if (record_file.right(4).toLower()==".png") {
+ if (record_file.contains('%'))
+ framename = record_file;
+ else
+ framename = record_file.left(record_file.length()-4)+"%04d"+record_file.right(4);
+ png_output = true;
+ } else {
+ framename = "tmp-frame%04d.png";
+ png_output = false;
+ }
+ foreach (QImage* img, frames) {
+ progress.setValue(progress.value()+1);
+ if (progress.wasCanceled())
+ break;
+ QString name;
+ name.sprintf(framename.toLocal8Bit(),frame++);
+ if (record_outsize.isValid())
+ *img = img->scaled(record_outsize,Qt::IgnoreAspectRatio,Qt::SmoothTransformation);
+ if (record_dither=="ordered")
+ img->convertToFormat(QImage::Format_Indexed8,Qt::PreferDither|Qt::OrderedDither).save(name);
+ else if (record_dither=="threshold")
+ img->convertToFormat(QImage::Format_Indexed8,Qt::PreferDither|Qt::ThresholdDither).save(name);
+ else if (record_dither=="floyd")
+ img->convertToFormat(QImage::Format_Indexed8,Qt::PreferDither).save(name);
+ else
+ img->save(name);
+ inputs << name;
+ delete img;
+ }
+
+ if (!progress.wasCanceled()) {
+ if (png_output) {
+ framename.replace(QRegExp("%\\d*."),"*");
+ qDebug() << "Wrote frames" << framename;
+ inputs.clear(); // don't remove them
+ } else {
+ // ImageMagick and gifsicle for GIF encoding
+ progress.setLabelText(tr("Converting frames to GIF file..."));
+ QStringList args;
+ args << "-delay" << QString::number(period/10);
+ args << inputs;
+ args << record_file;
+ qDebug() << "Converting..." << record_file << "(this may take a while)";
+ if (0!=QProcess::execute("convert", args)) {
+ qWarning() << "Cannot run ImageMagick 'convert' - recorded frames not converted";
+ inputs.clear(); // don't remove them
+ qDebug() << "Wrote frames tmp-frame*.png";
+ } else {
+ if (record_file.right(4).toLower() == ".gif") {
+ qDebug() << "Compressing..." << record_file;
+ if (0!=QProcess::execute("gifsicle", QStringList() << "-O2" << "-o" << record_file << record_file))
+ qWarning() << "Cannot run 'gifsicle' - not compressed";
+ }
+ qDebug() << "Wrote" << record_file;
+ }
+ }
+ }
+
+ progress.setValue(progress.maximum()-1);
+ foreach (QString name, inputs)
+ QFile::remove(name);
+
+ frames.clear();
+ }
+ }
+ qDebug() << "Recording: " << (recordTimer.isRunning()?"ON":"OFF");
+}
+
+void QDeclarativeViewer::ffmpegFinished(int code)
+{
+ qDebug() << "ffmpeg returned" << code << frame_stream->readAllStandardError();
+}
+
+void QDeclarativeViewer::autoStartRecording()
+{
+ setRecording(true);
+ autoStopTimer.setInterval(record_autotime);
+ autoStopTimer.setRunning(true);
+}
+
+void QDeclarativeViewer::autoStopRecording()
+{
+ setRecording(false);
+}
+
+void QDeclarativeViewer::recordFrame()
+{
+ canvas->QWidget::render(&frame);
+ if (frame_stream) {
+ if (frame_fmt == ".gif") {
+ // ffmpeg can't do 32bpp with gif
+ QImage rgb24 = frame.convertToFormat(QImage::Format_RGB888);
+ frame_stream->write((char*)rgb24.bits(),rgb24.numBytes());
+ } else {
+ frame_stream->write((char*)frame.bits(),frame.numBytes());
+ }
+ } else {
+ frames.append(new QImage(frame));
+ }
+}
+
+void QDeclarativeViewer::setDeviceKeys(bool on)
+{
+ devicemode = on;
+}
+
+void QDeclarativeViewer::setNetworkCacheSize(int size)
+{
+ namFactory->setCacheSize(size);
+}
+
+void QDeclarativeViewer::setUseGL(bool useGL)
+{
+#ifdef GL_SUPPORTED
+ if (useGL) {
+ QGLFormat format = QGLFormat::defaultFormat();
+ format.setSampleBuffers(false);
+
+ QGLWidget *glWidget = new QGLWidget(format);
+ glWidget->setAutoFillBackground(false);
+ canvas->setViewport(glWidget);
+ }
+#endif
+}
+
+void QDeclarativeViewer::setUseNativeFileBrowser(bool use)
+{
+ useQmlFileBrowser = !use;
+}
+
+void QDeclarativeViewer::registerTypes()
+{
+ QML_REGISTER_TYPE(QDeclarativeViewer, 1, 0, Screen, Screen);
+}
+
+QT_END_NAMESPACE
+
+#include "qmlruntime.moc"
diff --git a/tools/qml/qmlruntime.h b/tools/qml/qmlruntime.h
new file mode 100644
index 0000000000..01777bd416
--- /dev/null
+++ b/tools/qml/qmlruntime.h
@@ -0,0 +1,195 @@
+/****************************************************************************
+**
+** 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 tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEVIEWER_H
+#define QDECLARATIVEVIEWER_H
+
+#include <QMainWindow>
+#include <QMenuBar>
+#include <private/qdeclarativetimer_p.h>
+#include <QTime>
+#include <QList>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeView;
+class PreviewDeviceSkin;
+class QDeclarativeTestEngine;
+class QProcess;
+class RecordingDialog;
+class QDeclarativeTester;
+class QNetworkReply;
+class QNetworkCookieJar;
+class NetworkAccessManagerFactory;
+
+class QDeclarativeViewer
+#if defined(Q_OS_SYMBIAN)
+ : public QMainWindow
+#else
+ : public QWidget
+#endif
+{
+Q_OBJECT
+public:
+ QDeclarativeViewer(QWidget *parent=0, Qt::WindowFlags flags=0);
+ ~QDeclarativeViewer();
+
+ static void registerTypes();
+
+ enum ScriptOption {
+ Play = 0x00000001,
+ Record = 0x00000002,
+ TestImages = 0x00000004,
+ TestErrorProperty = 0x00000008,
+ SaveOnExit = 0x00000010,
+ ExitOnComplete = 0x00000020,
+ ExitOnFailure = 0x00000040
+ };
+ Q_DECLARE_FLAGS(ScriptOptions, ScriptOption)
+ void setScript(const QString &s) { m_script = s; }
+ void setScriptOptions(ScriptOptions opt) { m_scriptOptions = opt; }
+ void setRecordDither(const QString& s) { record_dither = s; }
+ void setRecordRate(int fps);
+ void setRecordFile(const QString&);
+ void setRecordArgs(const QStringList&);
+ void setRecording(bool on);
+ bool isRecording() const { return recordTimer.isRunning(); }
+ void setAutoRecord(int from, int to);
+ void setDeviceKeys(bool);
+ void setNetworkCacheSize(int size);
+ void addLibraryPath(const QString& lib);
+ void setUseGL(bool use);
+ void setUseNativeFileBrowser(bool);
+
+ QStringList builtinSkins() const;
+
+ QMenuBar *menuBar() const;
+
+public slots:
+ void sceneResized(QSize size);
+ void open(const QString&);
+ void openWgt(const QString&);
+ void openQml(const QString&);
+ void openFile();
+ void reload();
+ void takeSnapShot();
+ void toggleRecording();
+ void toggleRecordingWithSelection();
+ void ffmpegFinished(int code);
+ void setSkin(const QString& skinDirectory);
+ void showProxySettings ();
+ void proxySettingsChanged ();
+ void setScaleView();
+ void statusChanged();
+ void setSlowMode(bool);
+ void launch(const QString &);
+
+protected:
+ virtual void keyPressEvent(QKeyEvent *);
+
+ void createMenu(QMenuBar *menu, QMenu *flatmenu);
+
+private slots:
+ void autoStartRecording();
+ void autoStopRecording();
+ void recordFrame();
+ void chooseRecordingOptions();
+ void pickRecordingFile();
+ void setScaleSkin();
+ void setPortrait();
+ void setLandscape();
+ void toggleOrientation();
+ void startNetwork();
+ void toggleFullScreen();
+ void unpackWgt();
+
+private:
+ QString getVideoFileName();
+
+ PreviewDeviceSkin *skin;
+ QSize skinscreensize;
+ QDeclarativeView *canvas;
+ QString currentFileOrUrl;
+ QDeclarativeTimer recordTimer;
+ QString frame_fmt;
+ QImage frame;
+ QList<QImage*> frames;
+ QProcess* frame_stream;
+ QDeclarativeTimer autoStartTimer;
+ QDeclarativeTimer autoStopTimer;
+ QString record_dither;
+ QString record_file;
+ QSize record_outsize;
+ QStringList record_args;
+ int record_rate;
+ int record_autotime;
+ bool devicemode;
+ QAction *recordAction;
+ QString currentSkin;
+ bool scaleSkin;
+ mutable QMenuBar *mb;
+ RecordingDialog *recdlg;
+
+ void senseImageMagick();
+ void senseFfmpeg();
+ QWidget *ffmpegHelpWindow;
+ bool ffmpegAvailable;
+ bool convertAvailable;
+
+ QAction *portraitOrientation;
+ QAction *landscapeOrientation;
+
+ QString m_script;
+ ScriptOptions m_scriptOptions;
+ QDeclarativeTester *tester;
+
+ QNetworkReply *wgtreply;
+ QString wgtdir;
+
+ NetworkAccessManagerFactory *namFactory;
+
+ bool useQmlFileBrowser;
+};
+Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeViewer::ScriptOptions)
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/qml/qmlruntime.qrc b/tools/qml/qmlruntime.qrc
new file mode 100644
index 0000000000..3a9e6080e3
--- /dev/null
+++ b/tools/qml/qmlruntime.qrc
@@ -0,0 +1,9 @@
+<RCC>
+ <qresource prefix="/" >
+ <file>content/Browser.qml</file>
+ <file>content/images/up.png</file>
+ <file>content/images/folder.png</file>
+ <file>content/images/titlebar.sci</file>
+ <file>content/images/titlebar.png</file>
+ </qresource>
+</RCC>
diff --git a/tools/qml/recopts.ui b/tools/qml/recopts.ui
new file mode 100644
index 0000000000..ce2da30767
--- /dev/null
+++ b/tools/qml/recopts.ui
@@ -0,0 +1,513 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>RecordingOptions</class>
+ <widget class="QDialog" name="RecordingOptions">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>316</width>
+ <height>436</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Video options</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>File:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="file"/>
+ </item>
+ <item>
+ <widget class="QToolButton" name="pickfile">
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
+ <string>Size</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="0">
+ <widget class="QRadioButton" name="sizeOriginal">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QRadioButton" name="sizeVGA">
+ <property name="text">
+ <string>VGA</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QRadioButton" name="size720p">
+ <property name="text">
+ <string>720p</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QRadioButton" name="sizeQVGA">
+ <property name="text">
+ <string>QVGA</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" colspan="3">
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QRadioButton" name="sizeCustom">
+ <property name="text">
+ <string>Width:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="sizeWidth">
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>9999</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Height:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="sizeHeight">
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>9999</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="0" column="2">
+ <spacer name="horizontalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="rateOptions">
+ <property name="title">
+ <string>Rate</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_4">
+ <item row="0" column="0">
+ <widget class="QRadioButton" name="hz60">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>60Hz</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QRadioButton" name="hz50">
+ <property name="text">
+ <string>50Hz</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QRadioButton" name="hz25">
+ <property name="text">
+ <string>25Hz</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" colspan="4">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QRadioButton" name="hzCustom">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="hz">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Hz</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="2">
+ <widget class="QRadioButton" name="hz24">
+ <property name="text">
+ <string>24Hz</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="1">
+ <spacer name="horizontalSpacer_5">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="ffmpegOptions">
+ <property name="title">
+ <string>Profile</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0" colspan="3">
+ <widget class="QComboBox" name="profile"/>
+ </item>
+ <item row="1" column="0" colspan="2">
+ <widget class="QLineEdit" name="args"/>
+ </item>
+ <item row="1" column="2">
+ <widget class="QToolButton" name="ffmpegHelp">
+ <property name="text">
+ <string>Help</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="warning">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <tabstops>
+ <tabstop>file</tabstop>
+ <tabstop>pickfile</tabstop>
+ <tabstop>sizeOriginal</tabstop>
+ <tabstop>sizeVGA</tabstop>
+ <tabstop>size720p</tabstop>
+ <tabstop>sizeQVGA</tabstop>
+ <tabstop>sizeCustom</tabstop>
+ <tabstop>sizeWidth</tabstop>
+ <tabstop>sizeHeight</tabstop>
+ <tabstop>hz60</tabstop>
+ <tabstop>hz25</tabstop>
+ <tabstop>hz50</tabstop>
+ <tabstop>hz24</tabstop>
+ <tabstop>hzCustom</tabstop>
+ <tabstop>hz</tabstop>
+ <tabstop>profile</tabstop>
+ <tabstop>args</tabstop>
+ <tabstop>ffmpegHelp</tabstop>
+ <tabstop>buttonBox</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>hzCustom</sender>
+ <signal>clicked()</signal>
+ <receiver>hz</receiver>
+ <slot>setFocus()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>43</x>
+ <y>257</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>129</x>
+ <y>262</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>hz</sender>
+ <signal>textChanged(QString)</signal>
+ <receiver>hzCustom</receiver>
+ <slot>toggle()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>143</x>
+ <y>262</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>43</x>
+ <y>257</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>hz</sender>
+ <signal>selectionChanged()</signal>
+ <receiver>hzCustom</receiver>
+ <slot>toggle()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>143</x>
+ <y>262</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>43</x>
+ <y>257</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>RecordingOptions</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>258</x>
+ <y>424</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>60</x>
+ <y>219</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>RecordingOptions</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>258</x>
+ <y>424</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>92</x>
+ <y>219</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>profile</sender>
+ <signal>activated(int)</signal>
+ <receiver>RecordingOptions</receiver>
+ <slot>pickProfile(int)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>92</x>
+ <y>329</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>48</x>
+ <y>194</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>args</sender>
+ <signal>textEdited(QString)</signal>
+ <receiver>RecordingOptions</receiver>
+ <slot>storeCustomArgs(QString)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>128</x>
+ <y>357</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>102</x>
+ <y>189</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>sizeWidth</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>sizeCustom</receiver>
+ <slot>toggle()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>108</x>
+ <y>133</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>48</x>
+ <y>133</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>sizeHeight</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>sizeCustom</receiver>
+ <slot>toggle()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>212</x>
+ <y>133</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>64</x>
+ <y>129</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+ <slots>
+ <signal>filePicked(QString)</signal>
+ <signal>argumentsPicked(QString)</signal>
+ <slot>pickFile()</slot>
+ <slot>pickProfile(int)</slot>
+ <slot>storeCustomArgs(QString)</slot>
+ </slots>
+</ui>
diff --git a/tools/qtconfig/mainwindow.cpp b/tools/qtconfig/mainwindow.cpp
index 604b1f406e..0de4b4352f 100644
--- a/tools/qtconfig/mainwindow.cpp
+++ b/tools/qtconfig/mainwindow.cpp
@@ -68,6 +68,8 @@
#ifndef QT_NO_GSTREAMER
#include <gst/gst.h>
+#endif
+#ifdef HAVE_PHONON
#include <phonon/phononnamespace.h>
#endif
@@ -387,8 +389,10 @@ MainWindow::MainWindow()
audiosinkCombo->addItem(tr("aRts"), QLatin1String("artssink"));
audiosinkCombo->setItemData(audiosinkCombo->findText(tr("aRts")),
tr("Experimental aRts support for GStreamer."), Qt::ToolTipRole);
-#ifndef QT_NO_GSTREAMER
+#ifdef HAVE_PHONON
phononVersionLabel->setText(QLatin1String(Phonon::phononVersion()));
+#endif
+#ifndef QT_NO_GSTREAMER
if (gst_init_check(0, 0, 0)) {
gchar *versionString = gst_version_string();
gstversionLabel->setText(QLatin1String(versionString));
diff --git a/tools/qtconfig/qtconfig.pro b/tools/qtconfig/qtconfig.pro
index 8ab3f03593..d1fd32020d 100644
--- a/tools/qtconfig/qtconfig.pro
+++ b/tools/qtconfig/qtconfig.pro
@@ -9,7 +9,10 @@ QT += qt3support
contains(QT_CONFIG, gstreamer):LIBS += $$QT_LIBS_GSTREAMER -lgstinterfaces-0.10 -lgstvideo-0.10 -lgstbase-0.10
contains(QT_CONFIG, gstreamer):QMAKE_CXXFLAGS += $$QT_CFLAGS_GSTREAMER
-contains(QT_CONFIG, gstreamer):QT += phonon
+contains(QT_CONFIG, phonon) {
+ QT += phonon
+ DEFINES += HAVE_PHONON
+}
SOURCES += colorbutton.cpp main.cpp previewframe.cpp previewwidget.cpp mainwindow.cpp paletteeditoradvanced.cpp \
mainwindowbase.cpp paletteeditoradvancedbase.cpp previewwidgetbase.cpp
HEADERS += colorbutton.h previewframe.h previewwidget.h mainwindow.h paletteeditoradvanced.h \
diff --git a/tools/qtconfig/translations/translations.pro b/tools/qtconfig/translations/translations.pro
index bf8a1daae0..5d35b6aac9 100644
--- a/tools/qtconfig/translations/translations.pro
+++ b/tools/qtconfig/translations/translations.pro
@@ -9,6 +9,7 @@ FORMS = ../mainwindowbase.ui ../paletteeditoradvancedbase.ui ../previewwi
TR_DIR = $$PWD/../../../translations
TRANSLATIONS = \
+ $$TR_DIR/qtconfig_hu.ts \
$$TR_DIR/qtconfig_pl.ts \
$$TR_DIR/qtconfig_ru.ts \
$$TR_DIR/qtconfig_zh_CN.ts \
diff --git a/tools/qtestlib/chart/database.cpp b/tools/qtestlib/chart/database.cpp
index dfc0fc5fd6..1f1f7da800 100644
--- a/tools/qtestlib/chart/database.cpp
+++ b/tools/qtestlib/chart/database.cpp
@@ -42,6 +42,7 @@
#include <QtGui>
#include <QtXml>
+QT_BEGIN_NAMESPACE
// Database schema definition and open/create functions
QString resultsTable = QString("(TestName varchar, TestCaseName varchar, Series varchar, Idx varchar, ") +
@@ -319,3 +320,5 @@ void DataBaseWriter::addResult(const QString &series, const QString &index, cons
query.bindValue(":ChartType", "BarChart");
execQuery(query);
}
+
+QT_END_NAMESPACE
diff --git a/tools/qtestlib/chart/database.h b/tools/qtestlib/chart/database.h
index d9861adeb1..9a67490fd8 100644
--- a/tools/qtestlib/chart/database.h
+++ b/tools/qtestlib/chart/database.h
@@ -43,6 +43,9 @@
#include <QtCore>
#include <QtSql>
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
extern QString resultsTable;
QSqlDatabase openDataBase(const QString &databaseFile = "database");
@@ -57,6 +60,7 @@ void execQuery(const QString &spec, bool warnOnFail = true);
void printDataBase();
void displayTable(const QString &table);
+
class TempTable
{
public:
@@ -95,5 +99,7 @@ public:
QSqlDatabase db;
};
+QT_END_NAMESPACE
#endif
+
diff --git a/tools/qtestlib/chart/reportgenerator.cpp b/tools/qtestlib/chart/reportgenerator.cpp
index 1ce362c726..c3b42a0123 100644
--- a/tools/qtestlib/chart/reportgenerator.cpp
+++ b/tools/qtestlib/chart/reportgenerator.cpp
@@ -41,6 +41,7 @@
#include "reportgenerator.h"
// Report generator file utility functions
+QT_BEGIN_NAMESPACE
QList<QByteArray> readLines(const QString &fileName)
{
@@ -559,3 +560,4 @@ QByteArray ReportGenerator::printColors(const QString &tableName, const QString
return colors;
}
+QT_END_NAMESPACE
diff --git a/tools/qtestlib/chart/reportgenerator.h b/tools/qtestlib/chart/reportgenerator.h
index d44aea9ef9..1f075bdf15 100644
--- a/tools/qtestlib/chart/reportgenerator.h
+++ b/tools/qtestlib/chart/reportgenerator.h
@@ -42,6 +42,9 @@
#define REPORTGENERATOR_H
#include "database.h"
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
class ReportGenerator
{
@@ -59,5 +62,7 @@ private:
void printTestCaseResults(const QString &testCaseName);
+QT_END_NAMESPACE
+
#endif
diff --git a/tools/qttracereplay/main.cpp b/tools/qttracereplay/main.cpp
index a932d72a8c..be7906b97d 100644
--- a/tools/qttracereplay/main.cpp
+++ b/tools/qttracereplay/main.cpp
@@ -49,7 +49,7 @@ class ReplayWidget : public QWidget
{
Q_OBJECT
public:
- ReplayWidget(const QString &filename);
+ ReplayWidget(const QString &filename, int from, int to, bool single);
void paintEvent(QPaintEvent *event);
void resizeEvent(QResizeEvent *event);
@@ -68,6 +68,11 @@ public:
QList<uint> visibleUpdates;
QList<uint> iterationTimes;
QString filename;
+
+ int from;
+ int to;
+
+ bool single;
};
void ReplayWidget::updateRect()
@@ -89,6 +94,11 @@ void ReplayWidget::paintEvent(QPaintEvent *)
currentFrame = 0;
++currentIteration;
+ if (single) {
+ deleteLater();
+ return;
+ }
+
if (currentIteration == 3)
timer.start();
else if (currentIteration > 3) {
@@ -137,20 +147,28 @@ void ReplayWidget::resizeEvent(QResizeEvent *event)
visibleUpdates.clear();
QRect bounds = rect();
- for (int i = 0; i < updates.size(); ++i) {
+
+ int first = qMax(0, from);
+ int last = qMin(unsigned(to), unsigned(updates.size()));
+ for (int i = first; i < last; ++i) {
if (updates.at(i).intersects(bounds))
visibleUpdates << i;
}
- if (visibleUpdates.size() != updates.size())
- printf("Warning: skipped %d frames due to limited resolution\n", updates.size() - visibleUpdates.size());
+ int range = last - first;
+
+ if (visibleUpdates.size() != range)
+ printf("Warning: skipped %d frames due to limited resolution\n", range - visibleUpdates.size());
}
-ReplayWidget::ReplayWidget(const QString &filename_)
+ReplayWidget::ReplayWidget(const QString &filename_, int from_, int to_, bool single_)
: currentFrame(0)
, currentIteration(0)
, filename(filename_)
+ , from(from_)
+ , to(to_)
+ , single(single_)
{
setWindowTitle(filename);
QFile file(filename);
@@ -165,15 +183,21 @@ ReplayWidget::ReplayWidget(const QString &filename_)
char *data;
uint size;
in.readBytes(data, size);
- bool isTraceFile = size == 7 && qstrncmp(data, "qttrace", 7) == 0;
- delete [] data;
+ bool isTraceFile = size >= 7 && qstrncmp(data, "qttrace", 7) == 0;
+
+ uint version = 0;
+ if (size == 9 && qstrncmp(data, "qttraceV2", 9) == 0) {
+ in.setFloatingPointPrecision(QDataStream::SinglePrecision);
+ in >> version;
+ }
+
if (!isTraceFile) {
printf("File '%s' is not a trace file\n", qPrintable(filename_));
return;
}
in >> buffer >> updates;
- printf("Read paint buffer with %d frames\n", buffer.numFrames());
+ printf("Read paint buffer version %d with %d frames\n", version, buffer.numFrames());
resize(buffer.boundingRect().size().toSize());
@@ -189,17 +213,53 @@ int main(int argc, char **argv)
if (argc <= 1 || qstrcmp(argv[1], "-h") == 0 || qstrcmp(argv[1], "--help") == 0) {
printf("Replays a tracefile generated with '-graphicssystem trace'\n");
- printf("Usage:\n > %s [traceFile]\n", argv[0]);
+ printf("Usage:\n > %s [OPTIONS] [traceFile]\n", argv[0]);
+ printf("OPTIONS\n"
+ " --range=from-to to specify a frame range.\n"
+ " --singlerun to do only one run (without statistics)\n");
return 1;
}
- QFile file(argv[1]);
+ QFile file(app.arguments().last());
if (!file.exists()) {
- printf("%s does not exist\n", argv[1]);
+ printf("%s does not exist\n", qPrintable(app.arguments().last()));
return 1;
}
- ReplayWidget *widget = new ReplayWidget(argv[1]);
+ bool single = false;
+
+ int from = 0;
+ int to = -1;
+ for (int i = 1; i < app.arguments().size() - 1; ++i) {
+ QString arg = app.arguments().at(i);
+ if (arg.startsWith(QLatin1String("--range="))) {
+ QString rest = arg.mid(8);
+ QStringList components = rest.split(QLatin1Char('-'));
+
+ bool ok1 = false;
+ bool ok2 = false;
+ int fromCandidate = 0;
+ int toCandidate = 0;
+ if (components.size() == 2) {
+ fromCandidate = components.first().toInt(&ok1);
+ toCandidate = components.last().toInt(&ok2);
+ }
+
+ if (ok1 && ok2) {
+ from = fromCandidate;
+ to = toCandidate;
+ } else {
+ printf("ERROR: malformed syntax in argument %s\n", qPrintable(arg));
+ }
+ } else if (arg == QLatin1String("--singlerun")) {
+ single = true;
+ } else {
+ printf("Unrecognized argument: %s\n", qPrintable(arg));
+ return 1;
+ }
+ }
+
+ ReplayWidget *widget = new ReplayWidget(app.arguments().last(), from, to, single);
if (!widget->updates.isEmpty()) {
widget->show();
diff --git a/tools/qvfb/translations/translations.pro b/tools/qvfb/translations/translations.pro
index ef42063508..b0b1af4f43 100644
--- a/tools/qvfb/translations/translations.pro
+++ b/tools/qvfb/translations/translations.pro
@@ -28,6 +28,7 @@ SOURCES = ../qvfb.cpp \
TR_DIR = $$PWD/../../../translations
TRANSLATIONS = \
+ $$TR_DIR/qvfb_hu.ts \
$$TR_DIR/qvfb_pl.ts \
$$TR_DIR/qvfb_ru.ts \
$$TR_DIR/qvfb_zh_CN.ts \
diff --git a/tools/shared/fontpanel/fontpanel.cpp b/tools/shared/fontpanel/fontpanel.cpp
index ad297df516..fe221fdb63 100644
--- a/tools/shared/fontpanel/fontpanel.cpp
+++ b/tools/shared/fontpanel/fontpanel.cpp
@@ -96,8 +96,12 @@ QFont FontPanel::selectedFont() const
const QString family = rc.family();
rc.setPointSize(pointSize());
const QString styleDescription = styleString();
- rc.setItalic(m_fontDatabase.italic(family, styleDescription));
-
+ if (styleDescription.contains(QLatin1String("Italic")))
+ rc.setStyle(QFont::StyleItalic);
+ else if (styleDescription.contains(QLatin1String("Oblique")))
+ rc.setStyle(QFont::StyleOblique);
+ else
+ rc.setStyle(QFont::StyleNormal);
rc.setBold(m_fontDatabase.bold(family, styleDescription));
// Weight < 0 asserts...
diff --git a/tools/tools.pro b/tools/tools.pro
index 4cff507804..3ed07b1683 100644
--- a/tools/tools.pro
+++ b/tools/tools.pro
@@ -26,7 +26,7 @@ mac {
embedded:SUBDIRS += kmap2qmap
-contains(QT_CONFIG, declarative):SUBDIRS += qmlviewer qmldebugger
+contains(QT_CONFIG, declarative):SUBDIRS += qml
contains(QT_CONFIG, dbus):SUBDIRS += qdbus
!wince*:contains(QT_CONFIG, xmlpatterns): SUBDIRS += xmlpatterns xmlpatternsvalidator
embedded: SUBDIRS += makeqpf
diff --git a/translations/assistant_adp_de.ts b/translations/assistant_adp_de.ts
deleted file mode 100644
index 79c9c76d1f..0000000000
--- a/translations/assistant_adp_de.ts
+++ /dev/null
@@ -1,973 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="de">
-<context>
- <name>AssistantServer</name>
- <message>
- <location filename="../tools/assistant/compat/main.cpp" line="+225"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Failed to bind to port %1</source>
- <translation>Kann Port %1 nicht binden</translation>
- </message>
-</context>
-<context>
- <name>FontPanel</name>
- <message>
- <location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/>
- <source>Font</source>
- <translation>Schrift</translation>
- </message>
- <message>
- <location line="+11"/>
- <source>&amp;Writing system</source>
- <translation>S&amp;kript</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>&amp;Family</source>
- <translation>&amp;Schriftart</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Style</source>
- <translation>S&amp;chriftschnitt</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Point size</source>
- <translation>Schriftg&amp;rad</translation>
- </message>
-</context>
-<context>
- <name>FontSettingsDialog</name>
- <message>
- <location filename="../tools/assistant/compat/fontsettingsdialog.cpp" line="+63"/>
- <source>Font Settings</source>
- <translation>Schriftart</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Font settings for:</source>
- <translation>Schriftart für:</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Browser</source>
- <translation>Hilfeseiten</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Application</source>
- <translation>Anwendung</translation>
- </message>
- <message>
- <location line="+6"/>
- <source>Use custom settings</source>
- <translation>Erweitere Einstellungen nutzen</translation>
- </message>
-</context>
-<context>
- <name>HelpDialog</name>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Con&amp;tents</source>
- <translation>Inhal&amp;t</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+376"/>
- <location line="+16"/>
- <location line="+661"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location line="-771"/>
- <source>Open Link in New Window</source>
- <translation>Öffne Link in neuem Fenster</translation>
- </message>
- <message>
- <location line="+76"/>
- <location line="+82"/>
- <source>Prepare...</source>
- <translation>Initialisiere...</translation>
- </message>
- <message>
- <location line="-47"/>
- <source>Cannot open the index file %1</source>
- <translation>Kann Indexdatei %1 nicht öffnen</translation>
- </message>
- <message>
- <location line="+58"/>
- <location line="+124"/>
- <location line="+8"/>
- <source>Warning</source>
- <translation>Warnung</translation>
- </message>
- <message>
- <location line="-131"/>
- <location line="+124"/>
- <source>Documentation file %1 does not exist!
-Skipping file.</source>
- <translation>Dokumentation %1 existiert nicht!
-Ãœberspringe Datei.</translation>
- </message>
- <message>
- <location line="-112"/>
- <location line="+133"/>
- <source>Parse Error</source>
- <translation>Syntaxfehler</translation>
- </message>
- <message>
- <location line="+35"/>
- <location line="+469"/>
- <source>Done</source>
- <translation>Fertig</translation>
- </message>
- <message>
- <location line="-18"/>
- <source>Indexing files...</source>
- <translation>Indiziere Dokumentation...</translation>
- </message>
- <message>
- <location line="+15"/>
- <source>Reading dictionary...</source>
- <translation>Lese Suchindex...</translation>
- </message>
- <message>
- <location line="+46"/>
- <location line="+9"/>
- <source>Full Text Search</source>
- <translation>Volltextsuche</translation>
- </message>
- <message>
- <location line="-8"/>
- <source>Using a wildcard within phrases is not allowed.</source>
- <translation>Wildcards innerhalb von Phrasen sind nicht zugelassen.</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>The closing quotation mark is missing.</source>
- <translation>Das schließende Anführungszeichen fehlt.</translation>
- </message>
- <message numerus="yes">
- <location line="+7"/>
- <source>%n document(s) found.</source>
- <translation>
- <numerusform>%n Dokumente gefunden.</numerusform>
- <numerusform></numerusform>
- </translation>
- </message>
- <message>
- <location line="-882"/>
- <source>Open Link in Current Tab</source>
- <translation>Link im Aktuellen Tab öffnen</translation>
- </message>
- <message>
- <location line="+6"/>
- <source>Open Link in New Tab</source>
- <translation>Link in einem neuen Tab öffnen</translation>
- </message>
- <message>
- <location line="+91"/>
- <source>Failed to load keyword index file
-Assistant will not work!</source>
- <translation>Die Indexdatei konnte nicht geladen werden.
-Der Assistent ist nicht einsatzbereit!</translation>
- </message>
- <message>
- <location line="+208"/>
- <source>Documentation file %1 is not compatible!
-Skipping file.</source>
- <translation>Dokumentation %1 ist nicht kompatibel! Datei wird übersprungen.</translation>
- </message>
- <message>
- <location line="+470"/>
- <source>Failed to save fulltext search index
-Assistant will not work!</source>
- <translation>Der Index für die Volltextsuche konnte nicht gespeichert werden.
-Assistent ist nicht einsatzbereit!</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Help</source>
- <translation>Hilfe</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help&lt;/b&gt;&lt;p&gt;Choose the topic you want help on from the contents list, or search the index for keywords.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Hilfe&lt;/b&gt;&lt;p&gt;Wählen Sie ein Hilfethema aus dem Inhalt oder suchen Sie im Index nach Schlüsselwörtern.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.</source>
- <translation>Zeigt Hilfethemen geordnet nach Kategorie, Index oder Lesezeichen an. Ein weiterer Abschnitt enthält die Volltextsuche.</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help topics organized by category.&lt;/b&gt;&lt;p&gt;Double-click an item to see the topics in that category. To view a topic, just double-click it.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Hilfethemen geordnet nach Kategorie.&lt;/b&gt;&lt;p&gt;Doppelklicken Sie einen Eintrag, um die Themen dieser Kategorie zu sehen. Doppelklicken Sie ein Thema, um es angezeigt zu bekommen.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>column 1</source>
- <translation>Spalte 1</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Index</source>
- <translation>&amp;Index</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Look For:</source>
- <translation>Suchen &amp;nach:</translation>
- </message>
- <message>
- <location/>
- <source>Enter keyword</source>
- <translation>Geben Sie ein Schlüsselwort ein</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter a keyword.&lt;/b&gt;&lt;p&gt;The list will select an item that matches the entered string best.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Geben Sie ein Schlüsselwort ein.&lt;/b&gt;&lt;p&gt;Es wird dann der Eintrag aus der Liste ausgewählt, der am besten mit dem eingegebenen Begriff übereinstimmt.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;List of available help topics.&lt;/b&gt;&lt;p&gt;Double-click on an item to open its help page. If more than one is found, you must specify which page you want.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Liste aller verfügbaren Hilfethemen.&lt;/b&gt;&lt;p&gt;Doppelklicken Sie auf einen Eintrag, um die Hilfe zu öffnen. Wenn mehr als eine Seite gefunden wurde, wählen Sie die gewünschte Seite aus.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Bookmarks</source>
- <translation>L&amp;esezeichen</translation>
- </message>
- <message>
- <location/>
- <source>Displays the list of bookmarks.</source>
- <translation>Zeigt alle Lesezeichen an.</translation>
- </message>
- <message>
- <location/>
- <source>Add new bookmark</source>
- <translation>Füge neues Lesezeichen hinzu</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>Füge aktuelle Seite zu den Lesezeichen hinzu.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;New</source>
- <translation>&amp;Neu</translation>
- </message>
- <message>
- <location/>
- <source>Delete bookmark</source>
- <translation>Lösche Lesezeichen</translation>
- </message>
- <message>
- <location/>
- <source>Delete the selected bookmark.</source>
- <translation>Lösche markiertes Lesezeichen.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Delete</source>
- <translation>&amp;Löschen</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Search</source>
- <translation>&amp;Suche</translation>
- </message>
- <message>
- <location/>
- <source>Searching f&amp;or:</source>
- <translation>Suche &amp;nach:</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter search word(s).&lt;/b&gt;&lt;p&gt;Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Geben Sie Suchbegriffe ein.&lt;/b&gt;&lt;p&gt;Geben Sie hier die gesuchten Begriffe ein. Die Begriffe können Wildcards (*) enthalten. Eine Phrase muß in Anführungszeichen stehen.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Found documents&lt;/b&gt;&lt;p&gt;This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Gefundene Dokumente&lt;/b&gt;&lt;p&gt;Diese Liste beinhaltet alle gefundenen Dokumente der letzten Suche. Die Dokumente sind nach der Häufigkeit der Treffer geordnet.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Found &amp;Documents:</source>
- <translation>Gefundene &amp;Dokumente:</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page for the full text search.</source>
- <translation>Zeigt die Hilfeseite für die Volltextsuche an.</translation>
- </message>
- <message>
- <location/>
- <source>He&amp;lp</source>
- <translation>Hi&amp;lfe</translation>
- </message>
- <message>
- <location/>
- <source>Pressing this button starts the search.</source>
- <translation>Startet die Suche.</translation>
- </message>
- <message>
- <location/>
- <source>Preparing...</source>
- <translation>Initialisiere...</translation>
- </message>
- <message>
- <location/>
- <source>Enter searchword(s)</source>
- <translation>Geben Sie Suchbegriffe ein</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page</source>
- <translation>Hilfeseite anzeigen</translation>
- </message>
- <message>
- <location/>
- <source>Start searching</source>
- <translation>Suche beginnen</translation>
- </message>
-</context>
-<context>
- <name>HelpWindow</name>
- <message>
- <location filename="../tools/assistant/compat/helpwindow.cpp" line="+97"/>
- <source>Help</source>
- <translation>Hilfe</translation>
- </message>
- <message>
- <location line="+93"/>
- <source>Open Link in New Window Shift+LMB</source>
- <translation>Öffne Link in neuem Fenster</translation>
- </message>
- <message>
- <location line="-2"/>
- <source>Open Link in New Tab</source>
- <translation>Link in einem neuen Tab öffnen</translation>
- </message>
- <message>
- <location line="-90"/>
- <source>Unable to launch web browser.
-</source>
- <translation>Der Webbrowser konnte nicht gestartet werden.
-</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>OK</source>
- <translation>OK</translation>
- </message>
- <message>
- <location line="+27"/>
- <source>Failed to open link: &apos;%1&apos;</source>
- <translation>Der Link &apos;%1&apos; konnte nicht geöffnet werden</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
- <translation>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;Die Seite wurde nicht gefunden&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Error...</source>
- <translation>Fehler ...</translation>
- </message>
- <message>
- <location line="+56"/>
- <source>Copy &amp;Link Location</source>
- <translation>Link-Adresse kopieren</translation>
- </message>
-</context>
-<context>
- <name>Index</name>
- <message>
- <location filename="../tools/assistant/compat/index.cpp" line="+385"/>
- <source>Untitled</source>
- <translation>Unbenannt</translation>
- </message>
-</context>
-<context>
- <name>MainWindow</name>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Toolbar</source>
- <translation>Werkzeugleiste</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Print...</source>
- <translation>&amp;Drucken...</translation>
- </message>
- <message>
- <location/>
- <source>E&amp;xit</source>
- <translation>&amp;Beenden</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Copy</source>
- <translation>&amp;Kopieren</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Find in Text...</source>
- <translation>Text&amp;suche...</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Home</source>
- <translation>St&amp;artseite</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Previous</source>
- <translation>&amp;Vorherige</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Next</source>
- <translation>&amp;Nächste</translation>
- </message>
- <message>
- <location/>
- <source>About Qt</source>
- <translation>Ãœber Qt</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;in</source>
- <translation>Vergrößern</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;out</source>
- <translation>Ver&amp;kleinern</translation>
- </message>
- <message>
- <location/>
- <source>New Window</source>
- <translation>Neues Fenster...</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+198"/>
- <source>Ctrl+T</source>
- <translation>Strg+T
-</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+I</source>
- <translation>Strg+I</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+B</source>
- <translation>Strg+E</translation>
- </message>
- <message>
- <location line="+129"/>
- <location line="+1"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>&amp;Add Bookmark</source>
- <translation>&amp;Füge Lesezeichen hinzu</translation>
- </message>
- <message>
- <location/>
- <source>&amp;File</source>
- <translation>&amp;Datei</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Edit</source>
- <translation>&amp;Bearbeiten</translation>
- </message>
- <message>
- <location/>
- <source>&amp;View</source>
- <translation>&amp;Ansicht</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Go</source>
- <translation>&amp;Gehe zu</translation>
- </message>
- <message>
- <location/>
- <source>Boo&amp;kmarks</source>
- <translation>&amp;Lesezeichen</translation>
- </message>
- <message>
- <location/>
- <source>Qt Assistant by Nokia</source>
- <translation>Qt Assistant von Nokia</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Help</source>
- <translation>&amp;Hilfe</translation>
- </message>
- <message>
- <location/>
- <source>Print the currently displayed page.</source>
- <translation>Drucke aktuelle Seite.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+P</source>
- <translation>Strg+P</translation>
- </message>
- <message>
- <location/>
- <source>Quit Qt Assistant.</source>
- <translation>Qt Assistant beenden.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Q</source>
- <translation>Strg+Q</translation>
- </message>
- <message>
- <location/>
- <source>Copy the selected text to the clipboard.</source>
- <translation>Den markierten Text in die Zwischenablage kopieren.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+C</source>
- <translation>Strg+C</translation>
- </message>
- <message>
- <location/>
- <source>Open the Find dialog. Qt Assistant will search the currently displayed page for the text you enter.</source>
- <translation>Den Suchdialog öffnen. Qt Assistant sucht in der aktuellen Seite nach dem eingegebenen Text.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+F</source>
- <translation>Strg+F</translation>
- </message>
- <message>
- <location/>
- <source>Go to the home page. Qt Assistant&apos;s home page is the Qt Reference Documentation.</source>
- <translation>Zur Startseite gehen. Startseite im Qt Assistant ist die Qt-Referenzdokumentation.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Home</source>
- <translation>Strg+Pos1</translation>
- </message>
- <message>
- <location/>
- <source>Go to the previous page.</source>
- <translation>Gehe zur vorherigen Seite.</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Left</source>
- <translation>Alt+Links</translation>
- </message>
- <message>
- <location/>
- <source>Go to the next page.</source>
- <translation>Gehe zur nächsten Seite.</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Right</source>
- <translation>Alt+Rechts</translation>
- </message>
- <message>
- <location/>
- <source>Display further information about Qt Assistant.</source>
- <translation>Zeigt das Handbuch zum Qt Designer an.</translation>
- </message>
- <message>
- <location/>
- <source>Zoom in on the document, i.e. increase the font size.</source>
- <translation>Vergrößert die Schrift.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl++</source>
- <translation>Strg++</translation>
- </message>
- <message>
- <location/>
- <source>Zoom out on the document, i.e. decrease the font size.</source>
- <translation>Verkleinert die Schrift.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+-</source>
- <translation>Strg+-</translation>
- </message>
- <message>
- <location/>
- <source>Open a new window.</source>
- <translation>Öffnet ein neues Fenster.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+N</source>
- <translation>Strg+N</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>&amp;Schließen</translation>
- </message>
- <message>
- <location/>
- <source>Close the current window.</source>
- <translation>Schließt das aktuelle Fenster.</translation>
- </message>
- <message>
- <location/>
- <source>Qt Assistant Manual</source>
- <translation>Handbuch zu Qt Assistant</translation>
- </message>
- <message>
- <location/>
- <source>F1</source>
- <translation>F1</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>Aktuelle Seite zu den Lesezeichen hinzufügen.</translation>
- </message>
- <message>
- <location/>
- <source>What&apos;s This?</source>
- <translation>Direkthilfe</translation>
- </message>
- <message>
- <location/>
- <source>&quot;What&apos;s This?&quot; context sensitive help.</source>
- <translation>Kontextbezogene Direkthilfe.</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F1</source>
- <translation>Umschalt+F1</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="-129"/>
- <source>Ctrl+S</source>
- <translation>Strg+S</translation>
- </message>
- <message>
- <location line="-33"/>
- <source>Initializing Qt Assistant...</source>
- <translation>Qt Assistant wird initialisiert...</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Go</source>
- <translation>Gehe zu</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Next</source>
- <translation>Weitersuchen</translation>
- </message>
- <message>
- <location/>
- <source>F3</source>
- <translation>F3</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Previous</source>
- <translation>Vorheriges suchen</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F3</source>
- <translation>Umschalt+F3</translation>
- </message>
- <message>
- <location/>
- <source>About Qt Assistant</source>
- <translation>Ãœber Qt Assistent</translation>
- </message>
- <message>
- <location/>
- <source>Add Tab</source>
- <translation>Tab einfügen</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+N</source>
- <translation></translation>
- </message>
- <message>
- <location/>
- <source>Next Tab</source>
- <translation>Nächster Tab</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Right</source>
- <translation></translation>
- </message>
- <message>
- <location/>
- <source>Previous Tab</source>
- <translation>Voriger Tab</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Left</source>
- <translation></translation>
- </message>
- <message>
- <location/>
- <source>Close Tab</source>
- <translation>Tab schließen</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Q</source>
- <translation></translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+181"/>
- <source>Failed to open about application contents in file: &apos;%1&apos;</source>
- <translation>Fehler beim Öffnen des Inhalts in Datei: &apos;%1&apos;</translation>
- </message>
- <message>
- <location line="-246"/>
- <source>Sidebar</source>
- <translation>Sidebar</translation>
- </message>
- <message>
- <location line="+18"/>
- <source>&amp;Window</source>
- <translation>&amp;Fenster</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Minimize</source>
- <translation>Minimieren</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+M</source>
- <translation>Strg+M</translation>
- </message>
- <message>
- <location line="+70"/>
- <source>SHIFT+CTRL+=</source>
- <translation>Umschalt+Strg+=</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Ctrl+W</source>
- <translation>Strg+W</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+8"/>
- <source>Ctrl+]</source>
- <translation>Strg+AltGr+]</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+[</source>
- <translation>Strg+AltGr+[</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Views</source>
- <translation>Menüleisten/Sidebar</translation>
- </message>
- <message>
- <location line="+80"/>
- <source>Displays the main page of a specific documentation set.</source>
- <translation>Zeigt die Hauptseite eines Dokumentensets an.</translation>
- </message>
- <message>
- <location line="+262"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+238"/>
- <location line="+6"/>
- <source>Save Page</source>
- <translation>Seite speichern</translation>
- </message>
- <message>
- <location line="+0"/>
- <source>Cannot open file for writing!</source>
- <translation>Die Datei konnte nicht zum Schreiben geöffnet werden.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Save Page As...</source>
- <translation>Seite speichern als...</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+S</source>
- <translation>Strg+Alt+S</translation>
- </message>
- <message>
- <location/>
- <source>Sync with Table of Contents</source>
- <translation>Seite mit Inhalt-Tab syncronisieren</translation>
- </message>
- <message>
- <location/>
- <source>Select the page in contents tab.</source>
- <translation>Wählt die Seite im Inhalt-Tab aus.</translation>
- </message>
- <message>
- <location/>
- <source>Font Settings...</source>
- <translation>Schriftart...</translation>
- </message>
-</context>
-<context>
- <name>QObject</name>
- <message>
- <location filename="../tools/assistant/compat/config.cpp" line="+350"/>
- <source>Qt Assistant by Nokia</source>
- <translation>Qt Assistant von Nokia</translation>
- </message>
-</context>
-<context>
- <name>TabbedBrowser</name>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.ui"/>
- <source>TabbedBrowser</source>
- <translation></translation>
- </message>
- <message>
- <location/>
- <source>Untitled</source>
- <translation>Unbenannt</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+235"/>
- <source>Add page</source>
- <translation>Seite einfügen</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>Close page</source>
- <translation>Seite schließen</translation>
- </message>
- <message>
- <location line="-95"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+338"/>
- <source>New Tab</source>
- <translation>Neuer Tab</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Tab</source>
- <translation>Tab schließen</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Other Tabs</source>
- <translation>Andere Tabs schließen</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.ui"/>
- <source>Previous</source>
- <translation>Vorheriger</translation>
- </message>
- <message>
- <location/>
- <source>Next</source>
- <translation>Nächster</translation>
- </message>
- <message>
- <location/>
- <source>Case Sensitive</source>
- <translation>Groß-/Kleinschreibung beachten</translation>
- </message>
- <message>
- <location/>
- <source>Whole words</source>
- <translation>Ganze Wörter</translation>
- </message>
- <message>
- <location/>
- <source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
- <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Seitenende</translation>
- </message>
-</context>
-<context>
- <name>TopicChooser</name>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.cpp" line="+56"/>
- <source>Choose a topic for &lt;b&gt;%1&lt;/b&gt;</source>
- <translation>Wählen Sie ein Thema für &lt;b&gt;%1&lt;/b&gt;</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.ui"/>
- <source>Choose Topic</source>
- <translation>Thema wählen</translation>
- </message>
- <message>
- <location/>
- <source>Select a topic from the list and click the &lt;b&gt;Display&lt;/b&gt;-button to open the online help.</source>
- <translation>Wählen Sie ein Thema aus der Liste aus und klicken Sie &lt;b&gt;Anzeigen&lt;/b&gt; um die Hilfe zu öffnen.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Topics</source>
- <translation>&amp;Themen</translation>
- </message>
- <message>
- <location/>
- <source>Displays a list of available help topics for the keyword.</source>
- <translation>Zeigt eine Liste der verfügbaren Hilfethemen für diesen Begriff an.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Display</source>
- <translation>&amp;Anzeigen</translation>
- </message>
- <message>
- <location/>
- <source>Open the topic selected in the list.</source>
- <translation>Öffne das gewählte Thema aus der Liste.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>&amp;Schließen</translation>
- </message>
- <message>
- <location/>
- <source>Close the Dialog.</source>
- <translation>Schließt den Dialog.</translation>
- </message>
-</context>
-</TS>
diff --git a/translations/assistant_adp_ja.ts b/translations/assistant_adp_ja.ts
deleted file mode 100644
index f87beab2c1..0000000000
--- a/translations/assistant_adp_ja.ts
+++ /dev/null
@@ -1,1047 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="ja">
-<context>
- <name>AssistantServer</name>
- <message>
- <location filename="../tools/assistant/compat/main.cpp" line="+225"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Failed to bind to port %1</source>
- <translation>ãƒãƒ¼ãƒˆ %1 ã®ãƒã‚¤ãƒ³ãƒ‰ã«å¤±æ•—ã—ã¾ã—ãŸ</translation>
- </message>
-</context>
-<context>
- <name>FontPanel</name>
- <message>
- <location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/>
- <source>Font</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+11"/>
- <source>&amp;Writing system</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+3"/>
- <source>&amp;Family</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Style</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Point size</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>FontSettingsDialog</name>
- <message>
- <location filename="../tools/assistant/compat/fontsettingsdialog.cpp" line="+63"/>
- <source>Font Settings</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Font settings for:</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Browser</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Application</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+6"/>
- <source>Use custom settings</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>HelpDialog</name>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+279"/>
- <source>Open Link in Current Tab</source>
- <translation>リンクをç¾åœ¨ã®ã‚¿ãƒ–ã«é–‹ã</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Open Link in New Window</source>
- <translation>リンクを新ã—ã„ウィンドウã§é–‹ã</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Open Link in New Tab</source>
- <translation>リンクを新ã—ã„タブã§é–‹ã</translation>
- </message>
- <message>
- <location line="+73"/>
- <location line="+82"/>
- <source>Prepare...</source>
- <translation>準備中...</translation>
- </message>
- <message>
- <location line="-64"/>
- <location line="+16"/>
- <location line="+661"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location line="-677"/>
- <source>Failed to load keyword index file
-Assistant will not work!</source>
- <translation>キーワードインデックスファイルã®ãƒ­ãƒ¼ãƒ‰ã«å¤±æ•—ã—ã¾ã—ãŸ
-Assistant ã¯å‹•ãã¾ã›ã‚“!</translation>
- </message>
- <message>
- <location line="+17"/>
- <source>Cannot open the index file %1</source>
- <translation>インデックスファイル %1 をオープンã§ãã¾ã›ã‚“</translation>
- </message>
- <message>
- <location line="+58"/>
- <location line="+124"/>
- <location line="+8"/>
- <source>Warning</source>
- <translation>警告</translation>
- </message>
- <message>
- <location line="-131"/>
- <location line="+124"/>
- <source>Documentation file %1 does not exist!
-Skipping file.</source>
- <translation>ドキュメンテーションファイル %1 ã¯å­˜åœ¨ã—ã¾ã›ã‚“!
-スキップã—ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location line="-112"/>
- <location line="+133"/>
- <source>Parse Error</source>
- <translation>パースエラー</translation>
- </message>
- <message>
- <location line="-13"/>
- <source>Documentation file %1 is not compatible!
-Skipping file.</source>
- <translation>ドキュメンテーションファイル %1 ã¯äº’æ›æ€§ãŒã‚ã‚Šã¾ã›ã‚“!
-スキップã—ã¾ã™ã€‚</translation>
- </message>
- <message numerus="yes">
- <location line="+577"/>
- <source>%n document(s) found.</source>
- <translation type="unfinished">
- <numerusform></numerusform>
- </translation>
- </message>
- <message>
- <source>Index</source>
- <translation type="obsolete">インデックス</translation>
- </message>
- <message>
- <source>Bookmarks</source>
- <translation type="obsolete">ブックマーク</translation>
- </message>
- <message>
- <source>Contents</source>
- <translation type="obsolete">目次</translation>
- </message>
- <message>
- <source>Search</source>
- <translation type="obsolete">検索</translation>
- </message>
- <message>
- <location line="-529"/>
- <location line="+469"/>
- <source>Done</source>
- <translation>完了</translation>
- </message>
- <message>
- <location line="-47"/>
- <source>Failed to save fulltext search index
-Assistant will not work!</source>
- <translation>全文検索インデックスã®ã‚»ãƒ¼ãƒ–ã«å¤±æ•—ã—ã¾ã—ãŸ
-Assistant ã¯å‹•ãã¾ã›ã‚“!</translation>
- </message>
- <message>
- <location line="+29"/>
- <source>Indexing files...</source>
- <translation>インデックス作æˆä¸­...</translation>
- </message>
- <message>
- <location line="+15"/>
- <source>Reading dictionary...</source>
- <translation>ディレクトリを読ã¿è¾¼ã‚“ã§ã„ã¾ã™...</translation>
- </message>
- <message>
- <location line="+46"/>
- <location line="+9"/>
- <source>Full Text Search</source>
- <translation>全文検索</translation>
- </message>
- <message>
- <location line="-8"/>
- <source>Using a wildcard within phrases is not allowed.</source>
- <translation>フレーズ中ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã®ä½¿ç”¨ã¯èªã‚られã¦ã„ã¾ã›ã‚“。</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>The closing quotation mark is missing.</source>
- <translation>é–‰ã˜å¼•ç”¨ç¬¦ãŒã‚ã‚Šã¾ã›ã‚“。</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Help</source>
- <translation>ヘルプ</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help&lt;/b&gt;&lt;p&gt;Choose the topic you want help on from the contents list, or search the index for keywords.&lt;/p&gt;</source>
- <translation>&lt;b&gt;ヘルプ&lt;/b&gt;&lt;p&gt;目次ã®ãƒªã‚¹ãƒˆã‹ã‚‰ãƒ˜ãƒ«ãƒ—を希望ã™ã‚‹ãƒˆãƒ”ックをé¸æŠžã—ã¾ã™ã€ã‚ã‚‹ã„ã¯ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã‚’インデックスã‹ã‚‰æ¤œç´¢ã—ã¾ã™ã€‚&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.</source>
- <translation>カテゴリã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€ãƒ–ックマークã§ç·¨æˆã—ãŸãƒ˜ãƒ«ãƒ—トピックを表示ã—ã¾ã™ã€‚ã‚‚ã†ä¸€ã¤ã®ã‚¿ãƒ–ã¯å…¨æ–‡æ¤œç´¢ã‚’引ã継ã„ã§ã„ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Con&amp;tents</source>
- <translation>目次(&amp;T)</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help topics organized by category.&lt;/b&gt;&lt;p&gt;Double-click an item to see the topics in that category. To view a topic, just double-click it.&lt;/p&gt;</source>
- <translation>&lt;b&gt;カテゴリã§ç·¨æˆã—ãŸãƒ˜ãƒ«ãƒ—トピックã§ã™ã€‚&lt;/b&gt;&lt;p&gt;カテゴリ内ã®ãƒˆãƒ”ックを見るã«ã¯ã€é …目をダブルクリックã—ã¦ãã ã•ã„。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>column 1</source>
- <translation>コラム 1</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Index</source>
- <translation>インデックス(&amp;I)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Look For:</source>
- <translation>以下を検索(&amp;L):</translation>
- </message>
- <message>
- <location/>
- <source>Enter keyword</source>
- <translation>キーワードを入力ã—ã¦ãã ã•ã„</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter a keyword.&lt;/b&gt;&lt;p&gt;The list will select an item that matches the entered string best.&lt;/p&gt;</source>
- <translation>&lt;b&gt;キーワードを入力ã—ã¦ãã ã•ã„。&lt;/b&gt;&lt;p&gt;入力ã•ã‚ŒãŸæ–‡å­—列ã«ä¸€ç•ªè¿‘ã„ã‚‚ã®ã‚’é¸æŠžã—ã¾ã™ã€‚&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;List of available help topics.&lt;/b&gt;&lt;p&gt;Double-click on an item to open its help page. If more than one is found, you must specify which page you want.&lt;/p&gt;</source>
- <translation>&lt;b&gt;ヘルプトピック一覧&lt;/b&gt;&lt;p&gt;ヘルプページをオープンã™ã‚‹ã«ã¯ã€é …目をダブルクリックã—ã¦ãã ã•ã„。複数見ã¤ã‹ã£ãŸå ´åˆã¯ã€ãã®ä¸­ã‹ã‚‰é¸ã‚“ã§ãã ã•ã„。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Bookmarks</source>
- <translation>ブックマーク(&amp;B)</translation>
- </message>
- <message>
- <location/>
- <source>Displays the list of bookmarks.</source>
- <translation>ブックマーク一覧を表示ã—ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Add new bookmark</source>
- <translation>æ–°ã—ã„ブックマークを追加</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>ç¾åœ¨è¡¨ç¤ºã•ã‚Œã¦ã„るページを新ã—ã„ブックマークã¨ã—ã¦è¿½åŠ ã—ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>&amp;New</source>
- <translation>æ–°è¦(&amp;N)</translation>
- </message>
- <message>
- <location/>
- <source>Delete bookmark</source>
- <translation>ブックマークを削除</translation>
- </message>
- <message>
- <location/>
- <source>Delete the selected bookmark.</source>
- <translation>é¸æŠžã•ã‚ŒãŸãƒ–ックマークを削除ã—ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Delete</source>
- <translation>削除(&amp;D)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Search</source>
- <translation>検索(&amp;S)</translation>
- </message>
- <message>
- <location/>
- <source>Searching f&amp;or:</source>
- <translation>以下を検索(&amp;O):</translation>
- </message>
- <message>
- <location/>
- <source>Enter searchword(s).</source>
- <translation>検索ã™ã‚‹èªžï¼ˆãƒ•ãƒ¬ãƒ¼ã‚ºï¼‰ã‚’入力ã—ã¦ãã ã•ã„。</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter search word(s).&lt;/b&gt;&lt;p&gt;Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.&lt;/p&gt;</source>
- <translation>&lt;b&gt;検索ã™ã‚‹èªžï¼ˆãƒ•ãƒ¬ãƒ¼ã‚ºï¼‰ã‚’入力ã—ã¦ãã ã•ã„。&lt;/b&gt;&lt;p&gt;検索ã™ã‚‹èªžï¼ˆãƒ•ãƒ¬ãƒ¼ã‚ºï¼‰ã‚’入力ã—ã¦ãã ã•ã„。ワイルドカード(*)ã‚’å«ã‚ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚連続ã™ã‚‹èªžã‚’入力ã™ã‚‹å ´åˆã¯å¼•ç”¨ç¬¦ã§å›²ã‚“ã§ãã ã•ã„。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Found documents&lt;/b&gt;&lt;p&gt;This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.&lt;/p&gt;</source>
- <translation>&lt;b&gt;見ã¤ã‹ã£ãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ&lt;/b&gt;&lt;p&gt;ã“ã®ä¸€è¦§ã¯æœ€æ–°ã®æ¤œç´¢ã§è¦‹ã¤ã‹ã£ãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å…¨ã¦å«ã‚“ã§ã„ã¾ã™ã€‚該当項目ãŒå¤šã„é †ã«ä¸¦ã‚“ã§ã„ã¾ã™ã€‚&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Found &amp;Documents:</source>
- <translation>見ã¤ã‹ã£ãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ(&amp;D):</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page.</source>
- <translation>ヘルプページを表示ã—ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page for the full text search.</source>
- <translation>全文検索用ã«ãƒ˜ãƒ«ãƒ—ページを表示ã—ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>He&amp;lp</source>
- <translation>ヘルプ(&amp;L)</translation>
- </message>
- <message>
- <location/>
- <source>Start searching.</source>
- <translation>検索を開始ã—ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Pressing this button starts the search.</source>
- <translation>ã“ã®ãƒœã‚¿ãƒ³ã‚’押ã™ã¨æ¤œç´¢ãŒå§‹ã¾ã‚Šã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Preparing...</source>
- <translation>準備中...</translation>
- </message>
-</context>
-<context>
- <name>HelpWindow</name>
- <message>
- <location filename="../tools/assistant/compat/helpwindow.cpp" line="+97"/>
- <source>Help</source>
- <translation>ヘルプ</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>OK</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+27"/>
- <source>Failed to open link: &apos;%1&apos;</source>
- <translation>リンク開ã‘ã¾ã›ã‚“ã§ã—ãŸ: &apos;%1&apos;</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
- <translation>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;ページãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸ&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Error...</source>
- <translation>エラー...</translation>
- </message>
- <message>
- <location line="+56"/>
- <source>Copy &amp;Link Location</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+5"/>
- <source>Open Link in New Window Shift+LMB</source>
- <translation>リンクを新ã—ã„ウィンドウã§é–‹ã Shift+LMB</translation>
- </message>
- <message>
- <location line="-2"/>
- <source>Open Link in New Tab</source>
- <translation>リンクを新ã—ã„タブã§é–‹ã</translation>
- </message>
- <message>
- <location line="-90"/>
- <source>Unable to launch web browser.
-</source>
- <translation>ブラウザを起動ã§ãã¾ã›ã‚“。
-</translation>
- </message>
- <message>
- <source>Ok</source>
- <translation type="obsolete">Ok</translation>
- </message>
-</context>
-<context>
- <name>Index</name>
- <message>
- <location filename="../tools/assistant/compat/index.cpp" line="+385"/>
- <source>Untitled</source>
- <translation>タイトルãªã—</translation>
- </message>
-</context>
-<context>
- <name>MainWindow</name>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+103"/>
- <source>Sidebar</source>
- <translation>サイドãƒãƒ¼</translation>
- </message>
- <message>
- <location line="+55"/>
- <source>Initializing Qt Assistant...</source>
- <translation>Qt Assistant ã‚’åˆæœŸåŒ–中...</translation>
- </message>
- <message>
- <location line="+26"/>
- <source>SHIFT+CTRL+=</source>
- <translation>SHIFT+CTRL+=</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Ctrl+T</source>
- <translation>Ctrl+T</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+I</source>
- <translation>Ctrl+I</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+B</source>
- <translation>Ctrl+B</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+S</source>
- <translation>Ctrl+S</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Ctrl+W</source>
- <translation>Ctrl+W</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+1"/>
- <source>Ctrl+]</source>
- <translation>Ctrl+]</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+[</source>
- <translation>Ctrl+[</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Views</source>
- <translation>表示</translation>
- </message>
- <message>
- <location line="+80"/>
- <source>Displays the main page of a specific documentation set.</source>
- <translation>指定ã•ã‚ŒãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚»ãƒƒãƒˆã®ãƒ¡ã‚¤ãƒ³ãƒšãƒ¼ã‚¸ã‚’表示ã—ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location line="+49"/>
- <location line="+1"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location line="+19"/>
- <source>Failed to open about application contents in file: &apos;%1&apos;</source>
- <translation>&apos;%1&apos; ã¨ã„ã†ãƒ•ã‚¡ã‚¤ãƒ«å†…ã®ã€ã‚¢ãƒ—リケーションã«ã¤ã„ã¦ã®èª¬æ˜Žå†…容を開ã‘ã¾ã›ã‚“ã§ã—ãŸ</translation>
- </message>
- <message>
- <location line="+201"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+238"/>
- <location line="+6"/>
- <source>Save Page</source>
- <translation>ページをä¿å­˜</translation>
- </message>
- <message>
- <location line="+0"/>
- <source>Cannot open file for writing!</source>
- <translation>書ãè¾¼ã¿ã®ãŸã‚ã«ãƒ•ã‚¡ã‚¤ãƒ«ãŒé–‹ã‘ã¾ã›ã‚“!</translation>
- </message>
- <message>
- <source>Qt Assistant by Trolltech</source>
- <translation type="obsolete">Trolltech ã® Qt Assistant</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Toolbar</source>
- <translation>ツールãƒãƒ¼</translation>
- </message>
- <message>
- <location/>
- <source>Go</source>
- <translation>移動</translation>
- </message>
- <message>
- <location/>
- <source>&amp;File</source>
- <translation>ファイル(&amp;F)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Edit</source>
- <translation>編集(&amp;E)</translation>
- </message>
- <message>
- <location/>
- <source>Font Settings...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>&amp;View</source>
- <translation>表示(&amp;V)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Go</source>
- <translation>移動(&amp;G)</translation>
- </message>
- <message>
- <location/>
- <source>Boo&amp;kmarks</source>
- <translation>ブックマーク(&amp;K)</translation>
- </message>
- <message>
- <location/>
- <source>Qt Assistant by Nokia</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>&amp;Help</source>
- <translation>ヘルプ(&amp;H)</translation>
- </message>
- <message>
- <location/>
- <source>Print the currently displayed page.</source>
- <translation>ç¾åœ¨è¡¨ç¤ºã•ã‚Œã¦ã„るページをå°åˆ·ã—ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+P</source>
- <translation>Ctrl+P</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Print...</source>
- <translation>å°åˆ·(&amp;P)...</translation>
- </message>
- <message>
- <location/>
- <source>Quit Qt Assistant.</source>
- <translation>Qt Assistant を終了ã—ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Q</source>
- <translation>Ctrl+Q</translation>
- </message>
- <message>
- <location/>
- <source>E&amp;xit</source>
- <translation>終了(&amp;X)</translation>
- </message>
- <message>
- <location/>
- <source>Copy the selected text to the clipboard.</source>
- <translation>é¸æŠžã•ã‚Œã¦ã„るテキストをクリップボードã«ã‚³ãƒ”ーã—ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+C</source>
- <translation>Ctrl+C</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Copy</source>
- <translation>コピー(&amp;C)</translation>
- </message>
- <message>
- <location/>
- <source>Open the Find dialog. Qt Assistant will search the currently displayed page for the text you enter.</source>
- <translation>検索ダイアログを開ãã¾ã™ã€‚Qt Assistant ã¯å…¥åŠ›ã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã‚’ç¾åœ¨è¡¨ç¤ºã•ã‚Œã¦ã„るページã‹ã‚‰æ¤œç´¢ã—ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+F</source>
- <translation>Ctrl+F</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Find in Text...</source>
- <translation>テキスト内を検索(&amp;F)...</translation>
- </message>
- <message>
- <location/>
- <source>F3</source>
- <translation>F3</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Next</source>
- <translation>次を検索(&amp;N)</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F3</source>
- <translation>Shift+F3</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Previous</source>
- <translation>å‰ã‚’検索(&amp;P)</translation>
- </message>
- <message>
- <location/>
- <source>Go to the home page. Qt Assistant&apos;s home page is the Qt Reference Documentation.</source>
- <translation>ホームページã¸ç§»å‹•ã—ã¾ã™ã€‚Qt Assistant ã®ãƒ›ãƒ¼ãƒ ãƒšãƒ¼ã‚¸ã¯ Qt Reference Documentation ã§ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Home</source>
- <translation>Ctrl+Home</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Home</source>
- <translation>ホーム(&amp;H)</translation>
- </message>
- <message>
- <location/>
- <source>Go to the previous page.</source>
- <translation>一ã¤å‰ã®ãƒšãƒ¼ã‚¸ã¸æˆ»ã‚Šã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Left</source>
- <translation>Alt+左矢å°</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Previous</source>
- <translation>戻る(&amp;P)</translation>
- </message>
- <message>
- <location/>
- <source>Go to the next page.</source>
- <translation>一ã¤å…ˆã®ãƒšãƒ¼ã‚¸ã¸é€²ã¿ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Right</source>
- <translation>Alt+å³çŸ¢å°</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Next</source>
- <translation>進む(&amp;N)</translation>
- </message>
- <message>
- <location/>
- <source>Display further information about Qt Assistant.</source>
- <translation>Qt Assistant ã«ã¤ã„ã¦ã€ã•ã‚‰ã«è©³ã—ã„情報を表示ã—ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>About Qt Assistant</source>
- <translation>Qt Assistant ã«ã¤ã„ã¦</translation>
- </message>
- <message>
- <location/>
- <source>About Qt</source>
- <translation>Qt ã«ã¤ã„ã¦</translation>
- </message>
- <message>
- <location/>
- <source>Zoom in on the document, i.e. increase the font size.</source>
- <translation>文書をズームイン(フォントサイズを拡大)ã—ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl++</source>
- <translation>Ctrl++</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;in</source>
- <translation>拡大(&amp;I)</translation>
- </message>
- <message>
- <location/>
- <source>Zoom out on the document, i.e. decrease the font size.</source>
- <translation>文書をズームアウト(フォントサイズを縮å°)ã—ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+-</source>
- <translation>Ctrl+-</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;out</source>
- <translation>縮å°(&amp;O)</translation>
- </message>
- <message>
- <location/>
- <source>Open a new window.</source>
- <translation>æ–°è¦ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’é–‹ãã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+N</source>
- <translation>Ctrl+N</translation>
- </message>
- <message>
- <location/>
- <source>New Window</source>
- <translation>æ–°ã—ã„ウィンドウ</translation>
- </message>
- <message>
- <location/>
- <source>Close the current window.</source>
- <translation>ç¾åœ¨ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’é–‰ã˜ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>é–‰ã˜ã‚‹(&amp;C)</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>ç¾åœ¨è¡¨ç¤ºã•ã‚Œã¦ã„るページを新è¦ãƒ–ックマークã¨ã—ã¦è¿½åŠ ã—ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Add Bookmark</source>
- <translation>ブックマークã«è¿½åŠ (&amp;A)</translation>
- </message>
- <message>
- <location/>
- <source>&quot;What&apos;s This?&quot; context sensitive help.</source>
- <translation>文脈ä¾å­˜ã®ãƒ˜ãƒ«ãƒ—ã€ãƒ’ントã§ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F1</source>
- <translation>Shift+F1</translation>
- </message>
- <message>
- <location/>
- <source>What&apos;s This?</source>
- <translation>ヒント</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+N</source>
- <translation>Ctrl+Alt+N</translation>
- </message>
- <message>
- <location/>
- <source>Add Tab</source>
- <translation>タブを追加</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Right</source>
- <translation>Ctrl+Alt+å³çŸ¢å°</translation>
- </message>
- <message>
- <location/>
- <source>Next Tab</source>
- <translation>次ã®ã‚¿ãƒ–</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Left</source>
- <translation>Ctrl+Alt+左矢å°</translation>
- </message>
- <message>
- <location/>
- <source>Previous Tab</source>
- <translation>å‰ã®ã‚¿ãƒ–</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Q</source>
- <translation>Ctrl+Alt+Q</translation>
- </message>
- <message>
- <location/>
- <source>Close Tab</source>
- <translation>タブを閉ã˜ã‚‹</translation>
- </message>
- <message>
- <location/>
- <source>F1</source>
- <translation>F1</translation>
- </message>
- <message>
- <location/>
- <source>Qt Assistant Manual</source>
- <translation>Qt Assistant マニュアル</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+S</source>
- <translation>Ctrl+Alt+S</translation>
- </message>
- <message>
- <location/>
- <source>Save Page As...</source>
- <translation>åå‰ã‚’ã¤ã‘ã¦ãƒšãƒ¼ã‚¸ã‚’ä¿å­˜...</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="-673"/>
- <source>&amp;Window</source>
- <translation>ウィンドウ(&amp;W)</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Minimize</source>
- <translation>最å°åŒ–</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+M</source>
- <translation>Ctrl+M</translation>
- </message>
- <message>
- <source>Open Source Edition</source>
- <translation type="obsolete">オープンソース版</translation>
- </message>
- <message>
- <source>This version of Qt Assistant is part of the Qt Open Source Edition, for use in the development of Open Source applications. Qt is a comprehensive C++ framework for cross-platform application development.</source>
- <translation type="obsolete">ã“ã® Qt Assistant 㯠Qt オープンソース版ã®ä¸€éƒ¨ã§ã‚ã‚Šã€ã‚ªãƒ¼ãƒ—ンソースã®ã‚¢ãƒ—リケーションã®é–‹ç™ºã‚’目的ã¨ã—ãŸã‚‚ã®ã§ã™ã€‚Qt ã¯ã€è¤‡æ•°ã®ãƒ—ラットフォームã«å¯¾å¿œã™ã‚‹ã‚¢ãƒ—リケーションを開発ã™ã‚‹ãŸã‚ã® C++ ã®ã‚ã‹ã‚Šã‚„ã™ã„フレームワークã§ã™ã€‚</translation>
- </message>
- <message>
- <source>You need a commercial Qt license for development of proprietary (closed source) applications. Please see &lt;a href=&quot;http://qt.nokia.com/company/model.html&quot;&gt;qt.nokia.com/company/model.html&lt;/a&gt; for an overview of Qt licensing.</source>
- <translation type="obsolete">著作権ã®ã‚る(ソースを公開ã—ãªã„)アプリケーションを開発ã™ã‚‹ã«ã¯ã€Qt ã®å•†ç”¨ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãŒå¿…è¦ã§ã™ã€‚Qt ã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã®æ¦‚è¦ã«ã¤ã„ã¦ã¯ &lt;a href=&quot;http://qt.nokia.com/company/model.html&quot;&gt;qt.nokia.com/company/model.html&lt;/a&gt; ã‚’ã”覧ãã ã•ã„。</translation>
- </message>
- <message>
- <source>This program is licensed to you under the terms of the Qt Commercial License Agreement. For details, see the file LICENSE that came with this software distribution.</source>
- <translation type="obsolete">ã“ã®ãƒ—ログラム㯠Qt 商用版ライセンスè¦ç´„ã®å®šã‚ã‚‹æ¡ä»¶ã®ä¸‹ã§ã€ã‚ãªãŸã«ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã•ã‚Œã¦ã„ã¾ã™ã€‚詳細ã¯ã“ã®ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã¨ã¨ã‚‚ã«é…布ã•ã‚Œã‚‹ LICENSE ファイルをã”覧ãã ã•ã„。</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Sync with Table of Contents</source>
- <translation>目次ã®è©²å½“箇所を表示</translation>
- </message>
- <message>
- <location/>
- <source>Select the page in contents tab.</source>
- <translation>「目次ã€ã‚¿ãƒ–ã‹ã‚‰ãã®ãƒšãƒ¼ã‚¸ã‚’é¸æŠžã—ã¾ã™ã€‚</translation>
- </message>
-</context>
-<context>
- <name>QAssistantClient</name>
- <message>
- <source>Failed to start Qt Assistant.</source>
- <translation type="obsolete">Qt Assistant ã®èµ·å‹•ã«å¤±æ•—ã—ã¾ã—ãŸã€‚</translation>
- </message>
- <message>
- <source>Qt Assistant crashed.</source>
- <translation type="obsolete">Qt Assistant ãŒã‚¯ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã—ãŸã€‚</translation>
- </message>
- <message>
- <source>Error while running Qt Assistant.</source>
- <translation type="obsolete">Qt Assistant 実行中ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚</translation>
- </message>
- <message>
- <source>Cannot connect to Qt Assistant.</source>
- <translation type="obsolete">Qt Assistant ã«æŽ¥ç¶šã§ãã¾ã›ã‚“。</translation>
- </message>
- <message>
- <source>Could not connect to Assistant: Connection refused</source>
- <translation type="obsolete">Assistant ã«æŽ¥ç¶šã§ãã¾ã›ã‚“ã§ã—ãŸ: 接続を拒å¦ã•ã‚Œã¾ã—ãŸ</translation>
- </message>
- <message>
- <source>Could not connect to Assistant: Host not found</source>
- <translation type="obsolete">Assistant ã«æŽ¥ç¶šã§ãã¾ã›ã‚“ã§ã—ãŸ: ホストãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸ</translation>
- </message>
- <message>
- <source>Communication error</source>
- <translation type="obsolete">通信エラー</translation>
- </message>
-</context>
-<context>
- <name>QObject</name>
- <message>
- <source>Qt Assistant by Trolltech</source>
- <translation type="obsolete">Trolltech ã® Qt Assistant</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/config.cpp" line="+350"/>
- <source>Qt Assistant by Nokia</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>TabbedBrowser</name>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+149"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+86"/>
- <source>Add page</source>
- <translation>ページを追加</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>Close page</source>
- <translation>ページを閉ã˜ã‚‹</translation>
- </message>
- <message>
- <location line="+243"/>
- <source>New Tab</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Tab</source>
- <translation type="unfinished">タブを閉ã˜ã‚‹</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Other Tabs</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.ui"/>
- <source>TabbedBrowser</source>
- <translation>タブブラウザ</translation>
- </message>
- <message>
- <location/>
- <source>Untitled</source>
- <translation>タイトルãªã—</translation>
- </message>
- <message>
- <location/>
- <source>Previous</source>
- <translation>å‰</translation>
- </message>
- <message>
- <location/>
- <source>Next</source>
- <translation>次</translation>
- </message>
- <message>
- <location/>
- <source>Case Sensitive</source>
- <translation>大文字ã¨å°æ–‡å­—を区別ã™ã‚‹</translation>
- </message>
- <message>
- <location/>
- <source>Whole words</source>
- <translation>完全ã«ä¸€è‡´ã™ã‚‹å˜èªžã ã‘を検索ã™ã‚‹</translation>
- </message>
- <message>
- <location/>
- <source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
- <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;検索ãŒä¸€é€šã‚Šçµ‚ã‚ã‚Šã¾ã—ãŸ</translation>
- </message>
-</context>
-<context>
- <name>TopicChooser</name>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.cpp" line="+56"/>
- <source>Choose a topic for &lt;b&gt;%1&lt;/b&gt;</source>
- <translation>&lt;b&gt;%1&lt;/b&gt; ã®ãƒˆãƒ”ックをé¸æŠž</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.ui"/>
- <source>Choose Topic</source>
- <translation>トピックをé¸æŠž</translation>
- </message>
- <message>
- <location/>
- <source>Select a topic from the list and click the &lt;b&gt;Display&lt;/b&gt;-button to open the online help.</source>
- <translation>一覧ã‹ã‚‰ãƒˆãƒ”ックをé¸æŠžã—ã€&lt;b&gt;表示&lt;/b&gt;ボタンをクリックã—ã¦ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ãƒ˜ãƒ«ãƒ—ã‚’é–‹ã„ã¦ãã ã•ã„。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Topics</source>
- <translation>トピック(&amp;T)</translation>
- </message>
- <message>
- <location/>
- <source>Displays a list of available help topics for the keyword.</source>
- <translation>指定ã•ã‚ŒãŸã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã®ä½¿ç”¨ã§ãるヘルプトピックã®ä¸€è¦§ã‚’表示ã—ã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Display</source>
- <translation>表示(&amp;D)</translation>
- </message>
- <message>
- <location/>
- <source>Open the topic selected in the list.</source>
- <translation>一覧ã‹ã‚‰é¸æŠžã•ã‚ŒãŸãƒˆãƒ”ックを開ãã¾ã™ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>é–‰ã˜ã‚‹(&amp;C)</translation>
- </message>
- <message>
- <location/>
- <source>Close the Dialog.</source>
- <translation>ダイアログを閉ã˜ã¾ã™ã€‚</translation>
- </message>
-</context>
-</TS>
diff --git a/translations/assistant_adp_pl.ts b/translations/assistant_adp_pl.ts
deleted file mode 100644
index 17c2c5c75c..0000000000
--- a/translations/assistant_adp_pl.ts
+++ /dev/null
@@ -1,974 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="pl">
-<context>
- <name>AssistantServer</name>
- <message>
- <location filename="../tools/assistant/compat/main.cpp" line="+225"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Failed to bind to port %1</source>
- <translation>Błąd podłączenia do portu %1</translation>
- </message>
-</context>
-<context>
- <name>FontPanel</name>
- <message>
- <location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/>
- <source>Font</source>
- <translation>Czcionka</translation>
- </message>
- <message>
- <location line="+11"/>
- <source>&amp;Writing system</source>
- <translation>Sys&amp;tem pisania</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>&amp;Family</source>
- <translation>&amp;Rodzina</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Style</source>
- <translation>&amp;Styl</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Point size</source>
- <translation>&amp;Wielkość punktu</translation>
- </message>
-</context>
-<context>
- <name>FontSettingsDialog</name>
- <message>
- <location filename="../tools/assistant/compat/fontsettingsdialog.cpp" line="+63"/>
- <source>Font Settings</source>
- <translation>Ustawienia czcionki</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Font settings for:</source>
- <translation>Ustawienia czcionki</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Browser</source>
- <translation>przeglÄ…darki</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Application</source>
- <translation>aplikacji</translation>
- </message>
- <message>
- <location line="+6"/>
- <source>Use custom settings</source>
- <translation>Użyj własnych ustawień</translation>
- </message>
-</context>
-<context>
- <name>HelpDialog</name>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+279"/>
- <source>Open Link in Current Tab</source>
- <translation>Otwórz odsyłacz w bieżącej karcie</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Open Link in New Window</source>
- <translation>Otwórz odsyłacz w nowym oknie</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Open Link in New Tab</source>
- <translation>Otwórz odsyłacz w nowej karcie</translation>
- </message>
- <message>
- <location line="+73"/>
- <location line="+82"/>
- <source>Prepare...</source>
- <translation>Przygotuj...</translation>
- </message>
- <message>
- <location line="-64"/>
- <location line="+16"/>
- <location line="+661"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location line="-677"/>
- <source>Failed to load keyword index file
-Assistant will not work!</source>
- <translation>Nie można wczytać indeksu słów kluczowych
-Assistant nie będzie działał!</translation>
- </message>
- <message>
- <location line="+17"/>
- <source>Cannot open the index file %1</source>
- <translation>Nie można otworzyć indeksu %1</translation>
- </message>
- <message>
- <location line="+58"/>
- <location line="+124"/>
- <location line="+8"/>
- <source>Warning</source>
- <translation>Ostrzeżenie</translation>
- </message>
- <message>
- <location line="-131"/>
- <location line="+124"/>
- <source>Documentation file %1 does not exist!
-Skipping file.</source>
- <translation>Plik dokumentacji %1 nie istnieje!
-Plik zostaje pominięty.</translation>
- </message>
- <message>
- <location line="-112"/>
- <location line="+133"/>
- <source>Parse Error</source>
- <translation>BÅ‚Ä…d parsowania</translation>
- </message>
- <message>
- <location line="-13"/>
- <source>Documentation file %1 is not compatible!
-Skipping file.</source>
- <translation>Plik dokumentacji %1 jest nieodpowiedni!
-Plik zostaje pominięty.</translation>
- </message>
- <message>
- <location line="+48"/>
- <location line="+469"/>
- <source>Done</source>
- <translation>Zrobione</translation>
- </message>
- <message>
- <location line="-47"/>
- <source>Failed to save fulltext search index
-Assistant will not work!</source>
- <translation>Nie można zapisać indeksu dla pełnego wyszukiwania
-Assistant nie będzie działał!</translation>
- </message>
- <message>
- <location line="+29"/>
- <source>Indexing files...</source>
- <translation>Indeksowanie plików...</translation>
- </message>
- <message>
- <location line="+15"/>
- <source>Reading dictionary...</source>
- <translation>Czytanie katalogu...</translation>
- </message>
- <message>
- <location line="+46"/>
- <location line="+9"/>
- <source>Full Text Search</source>
- <translation>Pełne wyszukiwanie</translation>
- </message>
- <message>
- <location line="-8"/>
- <source>Using a wildcard within phrases is not allowed.</source>
- <translation>Używanie znacznika w wyrażeniu nie jest dozwolone.</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>The closing quotation mark is missing.</source>
- <translation>Brakuje kończącego znaku cudzysłowu.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Help</source>
- <translation>Pomoc</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help&lt;/b&gt;&lt;p&gt;Choose the topic you want help on from the contents list, or search the index for keywords.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Pomoc&lt;/b&gt;&lt;p&gt;Wybierz temat pomocy z listy dostępnych tematów bądź poszukaj słowa kluczowego w indeksie.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.</source>
- <translation>Pokazuje listę tematów pomocy zorganizowaną w kategorie, indeks lub zakładki. Kolejna karta pozwala na pełne wyszukiwanie.</translation>
- </message>
- <message>
- <location/>
- <source>Con&amp;tents</source>
- <translation>&amp;Spis treści</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help topics organized by category.&lt;/b&gt;&lt;p&gt;Double-click an item to see the topics in that category. To view a topic, just double-click it.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Tematy pomocy zorganizowane w kategorie.&lt;/b&gt;&lt;p&gt;Kliknij dwukrotnie na wybraną kategorię aby otworzyć listę jej tematów. Aby obejrzeć temat dwukrotnie kliknij go.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>column 1</source>
- <translation>kolumna 1</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Index</source>
- <translation>&amp;Indeks</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Look For:</source>
- <translation>&amp;Szukaj wyrażenia:</translation>
- </message>
- <message>
- <location/>
- <source>Enter keyword</source>
- <translation>Wprowadź słowo kluczowe</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter a keyword.&lt;/b&gt;&lt;p&gt;The list will select an item that matches the entered string best.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Wprowadź słowo kluczowe.&lt;/b&gt;&lt;p&gt;Lista wybierze temat który najbardziej odpowiada szukanemu wyrażeniu.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;List of available help topics.&lt;/b&gt;&lt;p&gt;Double-click on an item to open its help page. If more than one is found, you must specify which page you want.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Lista dostępnych tematów pomocy&lt;/b&gt;&lt;p&gt;Kliknij dwukrotnie na wybranym temacie aby otworzyć jego treść. Jeśli temat występuje w kilku kontekstach, dodatkowo należy wybrać kontekst z listy.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Bookmarks</source>
- <translation>&amp;Zakładki</translation>
- </message>
- <message>
- <location/>
- <source>Displays the list of bookmarks.</source>
- <translation>Pokazuje listę zakładek.</translation>
- </message>
- <message>
- <location/>
- <source>Add new bookmark</source>
- <translation>Dodaj nową zakładkę</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>Dodaj bieżącą stronę jako nową zakładkę.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;New</source>
- <translation>&amp;Nowa</translation>
- </message>
- <message>
- <location/>
- <source>Delete bookmark</source>
- <translation>Usuń zakładkę</translation>
- </message>
- <message>
- <location/>
- <source>Delete the selected bookmark.</source>
- <translation>Usuń zaznaczoną zakładkę.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Delete</source>
- <translation>&amp;Usuń</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Search</source>
- <translation>&amp;Szukaj</translation>
- </message>
- <message>
- <location/>
- <source>Searching f&amp;or:</source>
- <translation>&amp;Szukanie:</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter search word(s).&lt;/b&gt;&lt;p&gt;Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Wprowadź wyrażenie(a) do szukania.&lt;b&gt;&lt;p&gt;Wprowadź w tym okienku wyrażenia, których szukasz. Wyrażenia mogą zawierać znaczniki (*). Dla wyszukania ciągu wyrażeń umieść całość w cudzysłowie.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Found documents&lt;/b&gt;&lt;p&gt;This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Znalezione dokumenty&lt;/b&gt;&lt;p&gt;Lista zawiera wszystkie znalezione dokumenty związane z ostatnim wyszukiwaniem. Dokumenty są poukładane w kolejności pod względem ilości trafień szukanego wyrażenia.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Found &amp;Documents:</source>
- <translation>Znalezione &amp;dokumenty:</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page for the full text search.</source>
- <translation>Pokaż stronę pomocy dla pełnego wyszukiwania.</translation>
- </message>
- <message>
- <location/>
- <source>He&amp;lp</source>
- <translation>&amp;Pomoc</translation>
- </message>
- <message>
- <location/>
- <source>Pressing this button starts the search.</source>
- <translation>Naciśnięcie tego przycisku powoduje rozpoczęcie wyszukiwania.</translation>
- </message>
- <message>
- <location/>
- <source>Preparing...</source>
- <translation>Przygotowywanie...</translation>
- </message>
- <message numerus="yes">
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+7"/>
- <source>%n document(s) found.</source>
- <translation>
- <numerusform>Znaleziono %n dokument.</numerusform>
- <numerusform>Znaleziono %n dokumenty.</numerusform>
- <numerusform>Znaleziono %n dokumentów.</numerusform>
- </translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Enter searchword(s)</source>
- <translation>Wprowadź wyrażenie(a) do szukania</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page</source>
- <translation>Pokaż stronę pomocy</translation>
- </message>
- <message>
- <location/>
- <source>Start searching</source>
- <translation>Rozpocznij wyszukiwanie</translation>
- </message>
-</context>
-<context>
- <name>HelpWindow</name>
- <message>
- <location filename="../tools/assistant/compat/helpwindow.cpp" line="+97"/>
- <source>Help</source>
- <translation>Pomoc</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Unable to launch web browser.
-</source>
- <translation>Nie można uruchomić przeglądarki internetowej.
-</translation>
- </message>
- <message>
- <location line="+28"/>
- <source>Failed to open link: &apos;%1&apos;</source>
- <translation>Nie można otworzyć odsyłacza: &apos;%1&apos;</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
- <translation>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;Strona nie została znaleziona&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Error...</source>
- <translation>BÅ‚Ä…d...</translation>
- </message>
- <message>
- <location line="+61"/>
- <source>Open Link in New Window Shift+LMB</source>
- <translation>Otwórz odsyłacz w nowym oknie Shift+LMB</translation>
- </message>
- <message>
- <location line="-2"/>
- <source>Open Link in New Tab</source>
- <translation>Otwórz odsyłacz w nowej karcie</translation>
- </message>
- <message>
- <location line="-89"/>
- <source>OK</source>
- <translation>OK</translation>
- </message>
- <message>
- <location line="+86"/>
- <source>Copy &amp;Link Location</source>
- <translation>Skopiuj &amp;odsyłacz</translation>
- </message>
-</context>
-<context>
- <name>Index</name>
- <message>
- <location filename="../tools/assistant/compat/index.cpp" line="+385"/>
- <source>Untitled</source>
- <translation>Nienazwany</translation>
- </message>
-</context>
-<context>
- <name>MainWindow</name>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+103"/>
- <source>Sidebar</source>
- <translation>Panel</translation>
- </message>
- <message>
- <location line="+18"/>
- <source>&amp;Window</source>
- <translation>&amp;Okno</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Minimize</source>
- <translation>Minimalizuj</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+M</source>
- <translation>Ctrl+M</translation>
- </message>
- <message>
- <location line="+44"/>
- <source>Initializing Qt Assistant...</source>
- <translation>Inicjalizowanie Qt Assistant...</translation>
- </message>
- <message>
- <location line="+26"/>
- <source>SHIFT+CTRL+=</source>
- <translation>SHIFT+CTRL+=</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Ctrl+T</source>
- <translation>Ctrl+T</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+I</source>
- <translation>Ctrl+I</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+B</source>
- <translation>Ctrl+B</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+S</source>
- <translation>Ctrl+S</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Ctrl+W</source>
- <translation>Ctrl+W</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+1"/>
- <source>Ctrl+]</source>
- <translation>Ctrl+]</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+[</source>
- <translation>Ctrl+[</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Views</source>
- <translation>Widoki</translation>
- </message>
- <message>
- <location line="+80"/>
- <source>Displays the main page of a specific documentation set.</source>
- <translation>Pokazuje główną stronę wybranego zestawu dokumentacji.</translation>
- </message>
- <message>
- <location line="+39"/>
- <location line="+1"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location line="+19"/>
- <source>Failed to open about application contents in file: &apos;%1&apos;</source>
- <translation>Nie można otworzyć pliku: &apos;%1&apos; z informacjami o aplikacji</translation>
- </message>
- <message>
- <location line="+203"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+238"/>
- <location line="+6"/>
- <source>Save Page</source>
- <translation>Zapisz stronÄ™</translation>
- </message>
- <message>
- <location line="+0"/>
- <source>Cannot open file for writing!</source>
- <translation>Nie można otworzyć pliku do zapisu!</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Qt Assistant by Nokia</source>
- <translation>Qt Assistant Nokii</translation>
- </message>
- <message>
- <location/>
- <source>Toolbar</source>
- <translation>Pasek główny</translation>
- </message>
- <message>
- <location/>
- <source>Go</source>
- <translation>Pasek z odsyłaczami</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Help</source>
- <translation>&amp;Pomoc</translation>
- </message>
- <message>
- <location/>
- <source>&amp;File</source>
- <translation>&amp;Plik</translation>
- </message>
- <message>
- <location/>
- <source>Boo&amp;kmarks</source>
- <translation>&amp;Zakładki</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Go</source>
- <translation>&amp;Nawigacja</translation>
- </message>
- <message>
- <location/>
- <source>&amp;View</source>
- <translation>&amp;Widok</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Edit</source>
- <translation>&amp;Edycja</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Print...</source>
- <translation>Wy&amp;drukuj...</translation>
- </message>
- <message>
- <location/>
- <source>Print the currently displayed page.</source>
- <translation>Wydrukuj bieżącą stronę.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+P</source>
- <translation>Ctrl+P</translation>
- </message>
- <message>
- <location/>
- <source>E&amp;xit</source>
- <translation>&amp;Zakończ</translation>
- </message>
- <message>
- <location/>
- <source>Quit Qt Assistant.</source>
- <translation>Zakończ Qt Assistant.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Q</source>
- <translation>Ctrl+Q</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Copy</source>
- <translation>S&amp;kopiuj</translation>
- </message>
- <message>
- <location/>
- <source>Copy the selected text to the clipboard.</source>
- <translation>Skopiuj wybrany tekst do schowka.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+C</source>
- <translation>Ctrl+C</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Find in Text...</source>
- <translation>&amp;Znajdź w tekście...</translation>
- </message>
- <message>
- <location/>
- <source>Open the Find dialog. Qt Assistant will search the currently displayed page for the text you enter.</source>
- <translation>Otwórz okno szukania. Qt Assistant będzie przeszukiwał bieżącą stronę dla podanego tekstu.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+F</source>
- <translation>Ctrl+F</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Next</source>
- <translation>Znajdź &amp;następne</translation>
- </message>
- <message>
- <location/>
- <source>F3</source>
- <translation>F3</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Previous</source>
- <translation>Znajdź &amp;poprzednie</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F3</source>
- <translation>Shift+F3</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Home</source>
- <translation>Strona &amp;startowa</translation>
- </message>
- <message>
- <location/>
- <source>Go to the home page. Qt Assistant&apos;s home page is the Qt Reference Documentation.</source>
- <translation>Przejdź do strony startowej. Strona startowa Qt Assistant jest główną stroną dokumentacji Qt.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Home</source>
- <translation>Ctrl+Home</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Previous</source>
- <translation>&amp;Poprzednia strona</translation>
- </message>
- <message>
- <location/>
- <source>Go to the previous page.</source>
- <translation>Przejdź do poprzedniej strony.</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Left</source>
- <translation>Alt+Left</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Next</source>
- <translation>&amp;Następna strona</translation>
- </message>
- <message>
- <location/>
- <source>Go to the next page.</source>
- <translation>Przejdź do następnej strony.</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Right</source>
- <translation>Alt+Right</translation>
- </message>
- <message>
- <location/>
- <source>About Qt Assistant</source>
- <translation>Informacje o Qt Assistant</translation>
- </message>
- <message>
- <location/>
- <source>Display further information about Qt Assistant.</source>
- <translation>Pokaż dalsze informacje o Qt Assistant.</translation>
- </message>
- <message>
- <location/>
- <source>About Qt</source>
- <translation>Informacje o Qt</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;in</source>
- <translation>Po&amp;większ</translation>
- </message>
- <message>
- <location/>
- <source>Zoom in on the document, i.e. increase the font size.</source>
- <translation>Powiększ rozmiar czcionek w dokumencie.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl++</source>
- <translation>Ctrl++</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;out</source>
- <translation>Po&amp;mniejsz</translation>
- </message>
- <message>
- <location/>
- <source>Zoom out on the document, i.e. decrease the font size.</source>
- <translation>Pomniejsz rozmiar czcionek w dokumencie.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+-</source>
- <translation>Ctrl+-</translation>
- </message>
- <message>
- <location/>
- <source>New Window</source>
- <translation>Nowe okno</translation>
- </message>
- <message>
- <location/>
- <source>Open a new window.</source>
- <translation>Otwórz nowe okno.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+N</source>
- <translation>Ctrl+N</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>Za&amp;mknij</translation>
- </message>
- <message>
- <location/>
- <source>Close the current window.</source>
- <translation>Zamknij bieżące okno.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Add Bookmark</source>
- <translation>&amp;Dodaj zakładkę</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>Dodaj bieżącą stronę jako nową zakładkę.</translation>
- </message>
- <message>
- <location/>
- <source>What&apos;s This?</source>
- <translation>Co to jest?</translation>
- </message>
- <message>
- <location/>
- <source>&quot;What&apos;s This?&quot; context sensitive help.</source>
- <translation>&quot;Co to jest?&quot; jest pomocÄ… kontekstowÄ….</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F1</source>
- <translation>Shift+F1</translation>
- </message>
- <message>
- <location/>
- <source>Add Tab</source>
- <translation>Dodaj kartÄ™</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+N</source>
- <translation>Ctrl+Alt+N</translation>
- </message>
- <message>
- <location/>
- <source>Next Tab</source>
- <translation>Następna karta</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Right</source>
- <translation>Ctrl+Alt+Right</translation>
- </message>
- <message>
- <location/>
- <source>Previous Tab</source>
- <translation>Poprzednia karta</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Left</source>
- <translation>Ctrl+Alt+Left</translation>
- </message>
- <message>
- <location/>
- <source>Close Tab</source>
- <translation>Zamknij kartÄ™</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Q</source>
- <translation>Ctrl+Alt+Q</translation>
- </message>
- <message>
- <location/>
- <source>Qt Assistant Manual</source>
- <translation>Podręcznik Qt Assistant</translation>
- </message>
- <message>
- <location/>
- <source>F1</source>
- <translation>F1</translation>
- </message>
- <message>
- <location/>
- <source>Save Page As...</source>
- <translation>Zapisz stronÄ™ jako...</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+S</source>
- <translation>Ctrl+Alt+S</translation>
- </message>
- <message>
- <location/>
- <source>Sync with Table of Contents</source>
- <translation>Znajdź bieżącą stronę w spisie treści</translation>
- </message>
- <message>
- <location/>
- <source>Select the page in contents tab.</source>
- <translation>Wybierz stronę w karcie ze spisem treści.</translation>
- </message>
- <message>
- <location/>
- <source>Font Settings...</source>
- <translation>Ustawienia czcionki...</translation>
- </message>
-</context>
-<context>
- <name>QObject</name>
- <message>
- <location filename="../tools/assistant/compat/config.cpp" line="+350"/>
- <source>Qt Assistant by Nokia</source>
- <translation>Qt Assistant Nokii</translation>
- </message>
-</context>
-<context>
- <name>TabbedBrowser</name>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+149"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+86"/>
- <source>Add page</source>
- <translation>Dodaj kartÄ™</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>Close page</source>
- <translation>Zamknij kartÄ™</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.ui"/>
- <source>TabbedBrowser</source>
- <translation>PrzeglÄ…darka z kartami</translation>
- </message>
- <message>
- <location/>
- <source>Untitled</source>
- <translation>Nienazwany</translation>
- </message>
- <message>
- <location/>
- <source>Previous</source>
- <translation>Poprzedni</translation>
- </message>
- <message>
- <location/>
- <source>Next</source>
- <translation>Następny</translation>
- </message>
- <message>
- <location/>
- <source>Case Sensitive</source>
- <translation>Uwzględniaj wielkość liter</translation>
- </message>
- <message>
- <location/>
- <source>Whole words</source>
- <translation>Wszystkie wyrazy</translation>
- </message>
- <message>
- <location/>
- <source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
- <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Szukanie od poczÄ…tku</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+243"/>
- <source>New Tab</source>
- <translation>Nowa karta</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Tab</source>
- <translation>Zamknij kartÄ™</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Other Tabs</source>
- <translation>Zamknij pozostałe karty</translation>
- </message>
-</context>
-<context>
- <name>TopicChooser</name>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.cpp" line="+56"/>
- <source>Choose a topic for &lt;b&gt;%1&lt;/b&gt;</source>
- <translation>Wybierz temat dla &lt;b&gt;%1&lt;/b&gt;</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.ui"/>
- <source>Choose Topic</source>
- <translation>Wybierz temat</translation>
- </message>
- <message>
- <location/>
- <source>Select a topic from the list and click the &lt;b&gt;Display&lt;/b&gt;-button to open the online help.</source>
- <translation>Wybierz temat z listy i kliknij przycisk &lt;b&gt;Pokaż&lt;/b&gt; aby otworzyć pomoc (online).</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Topics</source>
- <translation>&amp;Tematy</translation>
- </message>
- <message>
- <location/>
- <source>Displays a list of available help topics for the keyword.</source>
- <translation>Pokazuje listę dostępnych tematów pomocy dla szukanego wyrażenia.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Display</source>
- <translation>Pok&amp;aż</translation>
- </message>
- <message>
- <location/>
- <source>Open the topic selected in the list.</source>
- <translation>Otwórz wybrany na liście temat.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>Za&amp;mknij</translation>
- </message>
- <message>
- <location/>
- <source>Close the Dialog.</source>
- <translation>Zamknij okno.</translation>
- </message>
-</context>
-</TS>
diff --git a/translations/assistant_adp_ru.ts b/translations/assistant_adp_ru.ts
deleted file mode 100644
index a421cd2d12..0000000000
--- a/translations/assistant_adp_ru.ts
+++ /dev/null
@@ -1,974 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="ru">
-<context>
- <name>AssistantServer</name>
- <message>
- <location filename="../tools/assistant/compat/main.cpp" line="+226"/>
- <source>Failed to bind to port %1</source>
- <translation>Ðе удалоÑÑŒ открыть порт %1</translation>
- </message>
- <message>
- <location line="-1"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
-</context>
-<context>
- <name>FontPanel</name>
- <message>
- <location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+77"/>
- <source>&amp;Family</source>
- <translation>&amp;Шрифт</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Style</source>
- <translation>&amp;Ðачертание</translation>
- </message>
- <message>
- <location line="-18"/>
- <source>Font</source>
- <translation>Шрифт</translation>
- </message>
- <message>
- <location line="+11"/>
- <source>&amp;Writing system</source>
- <translation>СиÑтема &amp;пиÑьма</translation>
- </message>
- <message>
- <location line="+11"/>
- <source>&amp;Point size</source>
- <translation>&amp;Размер</translation>
- </message>
-</context>
-<context>
- <name>FontSettingsDialog</name>
- <message>
- <location filename="../tools/assistant/compat/fontsettingsdialog.cpp" line="+75"/>
- <source>Application</source>
- <translation>Приложение</translation>
- </message>
- <message>
- <location line="-1"/>
- <source>Browser</source>
- <translation>Обозреватель</translation>
- </message>
- <message>
- <location line="-4"/>
- <source>Font settings for:</source>
- <translation>ÐаÑтройки шрифта длÑ:</translation>
- </message>
- <message>
- <location line="+11"/>
- <source>Use custom settings</source>
- <translation>ИÑпользование индивидуальных наÑтроек</translation>
- </message>
- <message>
- <location line="-18"/>
- <source>Font Settings</source>
- <translation>ÐаÑтройки шрифта</translation>
- </message>
-</context>
-<context>
- <name>HelpDialog</name>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>&amp;Index</source>
- <translation>&amp;Указатель</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Look For:</source>
- <translation>&amp;ИÑкать:</translation>
- </message>
- <message>
- <location/>
- <source>&amp;New</source>
- <translation>&amp;ÐоваÑ</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Search</source>
- <translation>&amp;ПоиÑк</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter a keyword.&lt;/b&gt;&lt;p&gt;The list will select an item that matches the entered string best.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;b&gt;Указание ключевого Ñлова.&lt;/b&gt;&lt;p&gt;СпиÑок заполнÑетÑÑ Ñлементами, лучше ÑоответÑтвующими указанному ключевому Ñлову.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter search word(s).&lt;/b&gt;&lt;p&gt;Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;b&gt;Указание Ñлов Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка.&lt;/b&gt;&lt;p&gt;Введите одно или неÑколько Ñлов, по которым требуетÑÑ Ð¾ÑущеÑтвить поиÑк. Слова могут Ñодержкать Ñимволы-заменители (*). ЕÑли требуетÑÑ Ð½Ð°Ð¹Ñ‚Ð¸ Ñочетание Ñлов, заключите иÑкомую фразу в кавычки.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Found documents&lt;/b&gt;&lt;p&gt;This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;b&gt;Ðайденные документы&lt;/b&gt;&lt;p&gt;Ð’ данном ÑпиÑке предÑтавлены вÑе найденные при поÑледнем поиÑке документы. Документы упорÑдочены по релевантноÑти, Ñ‚.е. чем выше в ÑпиÑке, тем чаще в нём вÑтречаютÑÑ Ð¸Ñкомые Ñлова.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help topics organized by category.&lt;/b&gt;&lt;p&gt;Double-click an item to see the topics in that category. To view a topic, just double-click it.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;b&gt;Разделы Ñправки, раÑпределённые по категориÑм.&lt;/b&gt;&lt;p&gt;Дважды щёлкните по одному из пунктов Ð´Ð»Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñ€Ð°Ð·Ð´ÐµÐ»Ð¾Ð² в данной категории. Ð”Ð»Ñ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ñ€Ð°Ð·Ð´ÐµÐ»Ð° дважды щёлкните по нему.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help&lt;/b&gt;&lt;p&gt;Choose the topic you want help on from the contents list, or search the index for keywords.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;b&gt;Справка&lt;/b&gt;&lt;p&gt;Выберите раздел Ñправки из Ð¾Ð³Ð»Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð¸Ð»Ð¸ воÑпользуйтеÑÑŒ поиÑком по предметному указателю.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;List of available help topics.&lt;/b&gt;&lt;p&gt;Double-click on an item to open its help page. If more than one is found, you must specify which page you want.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;b&gt;СпиÑок доÑтупных разделов Ñправки.&lt;/b&gt;&lt;p&gt;Дважды щёлкните по одному из пунктов Ð´Ð»Ñ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ñтраницы Ñправки. ЕÑли найдено более одной Ñтраницы, выберите желаемую.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Add new bookmark</source>
- <translation>Добавить закладку</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>Добавить отображаемую Ñтраницу в закладки.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+393"/>
- <source>Cannot open the index file %1</source>
- <translation>Ðе удаётÑÑ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚ÑŒ файл индекÑа %1</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Con&amp;tents</source>
- <translation>&amp;Оглавление</translation>
- </message>
- <message>
- <location/>
- <source>Delete bookmark</source>
- <translation>Удалить закладку</translation>
- </message>
- <message>
- <location/>
- <source>Delete the selected bookmark.</source>
- <translation>Удалить выбранную закладку.</translation>
- </message>
- <message>
- <location/>
- <source>Enter searchword(s)</source>
- <translation>Введите одно или неÑколько Ñлов Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page</source>
- <translation>Показать Ñтраницу Ñправки</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page for the full text search.</source>
- <translation>Показать Ñправку по полнотекÑтовому поиÑку.</translation>
- </message>
- <message>
- <location/>
- <source>Start searching</source>
- <translation>Ðачать поиÑк</translation>
- </message>
- <message>
- <location/>
- <source>Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.</source>
- <translation>Отображает ÑпиÑок разделов, раÑпредёленных по категориÑм, указатель или закладки. ПоÑледнÑÑ Ð²ÐºÐ»Ð°Ð´ÐºÐ° Ñодержит панель полнотекÑтового поиÑка.</translation>
- </message>
- <message>
- <location/>
- <source>Displays the list of bookmarks.</source>
- <translation>Отображает ÑпиÑок закладок.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+59"/>
- <location line="+124"/>
- <source>Documentation file %1 does not exist!
-Skipping file.</source>
- <translation>Файл документации %1 не ÑущеÑтвует!
-Пропущен.</translation>
- </message>
- <message>
- <location line="+8"/>
- <source>Documentation file %1 is not compatible!
-Skipping file.</source>
- <translation>ÐеÑовмеÑтимый файл документации %1!
-Пропущен.</translation>
- </message>
- <message>
- <location line="+48"/>
- <location line="+469"/>
- <source>Done</source>
- <translation>Готово</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Enter keyword</source>
- <translation>Введите ключевое Ñлово</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="-725"/>
- <source>Failed to load keyword index file
-Assistant will not work!</source>
- <translation>Ðе удалоÑÑŒ загрузить файл индекÑа ключевых Ñлов
-Qt Assistant не будет работать!</translation>
- </message>
- <message>
- <location line="+678"/>
- <source>Failed to save fulltext search index
-Assistant will not work!</source>
- <translation>Ðе удалоÑÑŒ Ñохранить Ð¸Ð½Ð´ÐµÐºÑ Ð¿Ð¾Ð»Ð½Ð¾Ñ‚ÐµÐºÑтового поиÑка
-Qt Assistant не будет работать!</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Found &amp;Documents:</source>
- <translation>Ðайденные &amp;документы:</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+90"/>
- <location line="+9"/>
- <source>Full Text Search</source>
- <translation>ПолнотекÑтовый поиÑк</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>He&amp;lp</source>
- <translation>&amp;Справка</translation>
- </message>
- <message>
- <location/>
- <source>Help</source>
- <translation>Справка</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="-70"/>
- <source>Indexing files...</source>
- <translation>ИндекÑирование файлов...</translation>
- </message>
- <message>
- <location line="-798"/>
- <source>Open Link in New Tab</source>
- <translation>Открыть ÑÑылку в новой вкладке</translation>
- </message>
- <message>
- <location line="-3"/>
- <source>Open Link in New Window</source>
- <translation>Открыть ÑÑылку в новом окне</translation>
- </message>
- <message>
- <location line="+182"/>
- <location line="+133"/>
- <source>Parse Error</source>
- <translation>Ошибка обработки</translation>
- </message>
- <message>
- <location line="-239"/>
- <location line="+82"/>
- <source>Prepare...</source>
- <translation>Подготовка...</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Preparing...</source>
- <translation>Подготовка...</translation>
- </message>
- <message>
- <location/>
- <source>Pressing this button starts the search.</source>
- <translation>Ðажатие на Ñту кнопку запуÑтит процеÑÑ Ð¿Ð¾Ð¸Ñка.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="-64"/>
- <location line="+16"/>
- <location line="+661"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location line="+45"/>
- <source>Reading dictionary...</source>
- <translation>Чтение каталога...</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Searching f&amp;or:</source>
- <translation>&amp;ИÑкать:</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+56"/>
- <source>The closing quotation mark is missing.</source>
- <translation>Пропущена Ð·Ð°ÐºÑ€Ñ‹Ð²Ð°ÑŽÑ‰Ð°Ñ ÐºÐ°Ð²Ñ‹Ñ‡ÐºÐ°.</translation>
- </message>
- <message>
- <location line="-9"/>
- <source>Using a wildcard within phrases is not allowed.</source>
- <translation>ИÑпользование Ñимволов-заменителей внутри фраз недопуÑтимо.</translation>
- </message>
- <message>
- <location line="-694"/>
- <location line="+124"/>
- <location line="+8"/>
- <source>Warning</source>
- <translation>Предупреждение</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>column 1</source>
- <translation>Ñтолбец 1</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="-304"/>
- <source>Open Link in Current Tab</source>
- <translation>Открыть ÑÑылку в текущей вкладке</translation>
- </message>
- <message numerus="yes">
- <location line="+882"/>
- <source>%n document(s) found.</source>
- <translation>
- <numerusform>Ðайден %n документ.</numerusform>
- <numerusform>Ðайдено %n документа.</numerusform>
- <numerusform>Ðайдено %n документов.</numerusform>
- </translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>&amp;Bookmarks</source>
- <translation>&amp;Закладки</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Delete</source>
- <translation>&amp;Удалить</translation>
- </message>
-</context>
-<context>
- <name>HelpWindow</name>
- <message>
- <location filename="../tools/assistant/compat/helpwindow.cpp" line="+127"/>
- <source>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
- <translation>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;Страница не найдена&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</translation>
- </message>
- <message>
- <location line="+58"/>
- <source>Copy &amp;Link Location</source>
- <translation>Копировать &amp;Ð°Ð´Ñ€ÐµÑ ÑÑылки</translation>
- </message>
- <message>
- <location line="-56"/>
- <source>Error...</source>
- <translation>Ошибка...</translation>
- </message>
- <message>
- <location line="-3"/>
- <source>Failed to open link: &apos;%1&apos;</source>
- <translation>Ðе удалоÑÑŒ открыть ÑÑылку: &apos;%1&apos;</translation>
- </message>
- <message>
- <location line="-29"/>
- <source>Help</source>
- <translation>Справка</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>OK</source>
- <translation>Закрыть</translation>
- </message>
- <message>
- <location line="+89"/>
- <source>Open Link in New Tab</source>
- <translation>Открыть ÑÑылку в новой вкладке</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Open Link in New Window Shift+LMB</source>
- <translation>Открыть ÑÑылку в новом окне Shift+LMB</translation>
- </message>
- <message>
- <location line="-92"/>
- <source>Unable to launch web browser.
-</source>
- <translation>Ðевозможно запуÑтить вÑб-браузер.
-</translation>
- </message>
-</context>
-<context>
- <name>Index</name>
- <message>
- <location filename="../tools/assistant/compat/index.cpp" line="+385"/>
- <source>Untitled</source>
- <translation>Ðеозаглавлено</translation>
- </message>
-</context>
-<context>
- <name>MainWindow</name>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>&quot;What&apos;s This?&quot; context sensitive help.</source>
- <translation>КонтекÑÑ‚Ð½Ð°Ñ Ñправка &quot;Что Ñто?&quot;.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Add Bookmark</source>
- <translation>&amp;Добавить закладку</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>&amp;Закрыть</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Copy</source>
- <translation>&amp;Копировать</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Edit</source>
- <translation>&amp;Правка</translation>
- </message>
- <message>
- <location/>
- <source>&amp;File</source>
- <translation>&amp;Файл</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Find in Text...</source>
- <translation>П&amp;оиÑк по текÑту...</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Go</source>
- <translation>&amp;Перейти</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Help</source>
- <translation>&amp;Справка</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Home</source>
- <translation>&amp;Домой</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Next</source>
- <translation>Сл&amp;едующий</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Previous</source>
- <translation>&amp;Предыдущий</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Print...</source>
- <translation>&amp;Печать...</translation>
- </message>
- <message>
- <location/>
- <source>&amp;View</source>
- <translation>&amp;Вид</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+121"/>
- <source>&amp;Window</source>
- <translation>&amp;Окно</translation>
- </message>
- <message>
- <location line="+431"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>About Qt</source>
- <translation>О Qt</translation>
- </message>
- <message>
- <location/>
- <source>About Qt Assistant</source>
- <translation>О Qt Assistant</translation>
- </message>
- <message>
- <location/>
- <source>Add Tab</source>
- <translation>Добавить вкладку</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>Добавить отображаемую Ñтраницу в закладки.</translation>
- </message>
- <message>
- <location/>
- <source>Boo&amp;kmarks</source>
- <translation>&amp;Закладки</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+244"/>
- <source>Cannot open file for writing!</source>
- <translation>Ðе удалоÑÑŒ открыть файл Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи!</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Close Tab</source>
- <translation>Закрыть вкладку</translation>
- </message>
- <message>
- <location/>
- <source>Close the current window.</source>
- <translation>Закрыть текущее окно.</translation>
- </message>
- <message>
- <location/>
- <source>Display further information about Qt Assistant.</source>
- <translation>Показать дополнительную информацию о Qt Assistant.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="-506"/>
- <source>Displays the main page of a specific documentation set.</source>
- <translation>Открывает Ñтартовую Ñтраницу выбранного набора документации.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>E&amp;xit</source>
- <translation>В&amp;ыход</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+59"/>
- <source>Failed to open about application contents in file: &apos;%1&apos;</source>
- <translation>Ðе удалоÑÑŒ получить информацию о приложении из файла: &apos;%1&apos;</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Find &amp;Next</source>
- <translation>Ðайти &amp;Ñледующее</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Previous</source>
- <translation>Ðайти &amp;предыдущее</translation>
- </message>
- <message>
- <location/>
- <source>Font Settings...</source>
- <translation>ÐаÑтройки шрифта...</translation>
- </message>
- <message>
- <location/>
- <source>Go</source>
- <translation>Перейти</translation>
- </message>
- <message>
- <location/>
- <source>Go to the home page. Qt Assistant&apos;s home page is the Qt Reference Documentation.</source>
- <translation>Перейти на домашнюю Ñтраницу. Ð”Ð¾Ð¼Ð°ÑˆÐ½Ð°Ñ Ñтраница Qt Assistant - Ð¡Ð¿Ñ€Ð°Ð²Ð¾Ñ‡Ð½Ð°Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ Ð¿Ð¾ Qt.</translation>
- </message>
- <message>
- <location/>
- <source>Go to the next page.</source>
- <translation>Переход на Ñледующую Ñтраницу.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="-181"/>
- <source>Initializing Qt Assistant...</source>
- <translation>Ð˜Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ Qt Assistant...</translation>
- </message>
- <message>
- <location line="-45"/>
- <source>Minimize</source>
- <translation>Свернуть</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>New Window</source>
- <translation>Ðовое окно</translation>
- </message>
- <message>
- <location/>
- <source>Next Tab</source>
- <translation>Ð¡Ð»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ Ð²ÐºÐ»Ð°Ð´ÐºÐ°</translation>
- </message>
- <message>
- <location/>
- <source>Open a new window.</source>
- <translation>Открыть новое окно.</translation>
- </message>
- <message>
- <location/>
- <source>Open the Find dialog. Qt Assistant will search the currently displayed page for the text you enter.</source>
- <translation>Открыть окно поиÑка. Qt Assistant произведёт поиÑк введённого текÑта на отображаемой Ñтранице.</translation>
- </message>
- <message>
- <location/>
- <source>Previous Tab</source>
- <translation>ÐŸÑ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð°Ñ Ð²ÐºÐ»Ð°Ð´ÐºÐ°</translation>
- </message>
- <message>
- <location/>
- <source>Print the currently displayed page.</source>
- <translation>Печатать отображаемую Ñтраницу.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+206"/>
- <location line="+1"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Qt Assistant Manual</source>
- <translation>РуководÑтво по Qt Assistant</translation>
- </message>
- <message>
- <location/>
- <source>Qt Assistant by Nokia</source>
- <translation>Qt Assistant от Nokia</translation>
- </message>
- <message>
- <location/>
- <source>Quit Qt Assistant.</source>
- <translation>Выйти из Qt Assistant.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+460"/>
- <location line="+6"/>
- <source>Save Page</source>
- <translation>Сохранить Ñтраницу</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Save Page As...</source>
- <translation>Сохранить Ñтраницу как...</translation>
- </message>
- <message>
- <location/>
- <source>Select the page in contents tab.</source>
- <translation>Выбрать Ñтраницу во вкладке оглавлениÑ.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="-693"/>
- <source>Sidebar</source>
- <translation>Ð‘Ð¾ÐºÐ¾Ð²Ð°Ñ Ð¿Ð°Ð½ÐµÐ»ÑŒ</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Sync with Table of Contents</source>
- <translation>Синхронизировать Ñ Ð¾Ð³Ð»Ð°Ð²Ð»ÐµÐ½Ð¸ÐµÐ¼</translation>
- </message>
- <message>
- <location/>
- <source>Toolbar</source>
- <translation>Панель инÑтрументов</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+107"/>
- <source>Views</source>
- <translation>Виды</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>What&apos;s This?</source>
- <translation>Что Ñто?</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;in</source>
- <translation>У&amp;величить</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;out</source>
- <translation>У&amp;меньшить</translation>
- </message>
- <message>
- <location/>
- <source>Zoom in on the document, i.e. increase the font size.</source>
- <translation>Увеличить размер шрифта.</translation>
- </message>
- <message>
- <location/>
- <source>Zoom out on the document, i.e. decrease the font size.</source>
- <translation>Уменьшить размер шрифта.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="-86"/>
- <source>Ctrl+M</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+70"/>
- <source>SHIFT+CTRL+=</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Ctrl+T</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+I</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+B</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+S</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+]</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+[</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Ctrl+P</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Q</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>Copy the selected text to the clipboard.</source>
- <translation>Скопировать выделенный текÑÑ‚ в буфер обмена.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+C</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+F</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>F3</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>Shift+F3</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Home</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>Go to the previous page.</source>
- <translation>Переход на предыдущую Ñтраницу.</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Left</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>Alt+Right</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>Ctrl++</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+-</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+N</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+W</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>Shift+F1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+N</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Right</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Left</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Q</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>F1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+S</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>QObject</name>
- <message>
- <location filename="../tools/assistant/compat/config.cpp" line="+350"/>
- <source>Qt Assistant by Nokia</source>
- <translation>Qt Assistant от Nokia</translation>
- </message>
-</context>
-<context>
- <name>TabbedBrowser</name>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+149"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.ui"/>
- <source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
- <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;ПоиÑк Ñ Ð½Ð°Ñ‡Ð°Ð»Ð°</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+86"/>
- <source>Add page</source>
- <translation>Добавить вкладку</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.ui"/>
- <source>Case Sensitive</source>
- <translation>Учитывать региÑÑ‚Ñ€</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+254"/>
- <source>Close Other Tabs</source>
- <translation>Закрыть оÑтальные вкладки</translation>
- </message>
- <message>
- <location line="-1"/>
- <source>Close Tab</source>
- <translation>Закрыть вкладку</translation>
- </message>
- <message>
- <location line="-244"/>
- <source>Close page</source>
- <translation>Закрыть вкладку</translation>
- </message>
- <message>
- <location line="+243"/>
- <source>New Tab</source>
- <translation>ÐÐ¾Ð²Ð°Ñ Ð²ÐºÐ»Ð°Ð´ÐºÐ°</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.ui"/>
- <source>Next</source>
- <translation>Следующее</translation>
- </message>
- <message>
- <location/>
- <source>Previous</source>
- <translation>Предыдущее</translation>
- </message>
- <message>
- <location/>
- <source>Untitled</source>
- <translation>БезымÑнный</translation>
- </message>
- <message>
- <location/>
- <source>Whole words</source>
- <translation>Слова целиком</translation>
- </message>
- <message>
- <location/>
- <source>TabbedBrowser</source>
- <translation>TabbedBrowser</translation>
- </message>
-</context>
-<context>
- <name>TopicChooser</name>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.ui"/>
- <source>&amp;Close</source>
- <translation>&amp;Закрыть</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Display</source>
- <translation>&amp;Показать</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Topics</source>
- <translation>&amp;Разделы</translation>
- </message>
- <message>
- <location/>
- <source>Choose Topic</source>
- <translation>Выбор раздела</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.cpp" line="+56"/>
- <source>Choose a topic for &lt;b&gt;%1&lt;/b&gt;</source>
- <translation>Выберите раздел Ð´Ð»Ñ &lt;b&gt;%1&lt;/b&gt;</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.ui"/>
- <source>Close the Dialog.</source>
- <translation>Закрыть диалог.</translation>
- </message>
- <message>
- <location/>
- <source>Displays a list of available help topics for the keyword.</source>
- <translation>Показывает ÑпиÑок доÑтупных разделов Ñправки, найденных по ключевому Ñлову.</translation>
- </message>
- <message>
- <location/>
- <source>Open the topic selected in the list.</source>
- <translation>Открыть выбранный раздел.</translation>
- </message>
- <message>
- <location/>
- <source>Select a topic from the list and click the &lt;b&gt;Display&lt;/b&gt;-button to open the online help.</source>
- <translation>Выберите раздел из ÑпиÑка и нажмите на кнопку &lt;b&gt;Показать&lt;/b&gt; Ð´Ð»Ñ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ð¾Ð½Ð»Ð°Ð¹Ð½ Ñправки.</translation>
- </message>
-</context>
-</TS>
diff --git a/translations/assistant_adp_zh_CN.ts b/translations/assistant_adp_zh_CN.ts
deleted file mode 100644
index 2d8d85c979..0000000000
--- a/translations/assistant_adp_zh_CN.ts
+++ /dev/null
@@ -1,999 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="zh_CN">
-<context>
- <name>AssistantServer</name>
- <message>
- <location filename="../tools/assistant/compat/main.cpp" line="+225"/>
- <source>Qt Assistant</source>
- <translation>Qt 助手</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Failed to bind to port %1</source>
- <translation>绑定到端å£%1失败</translation>
- </message>
-</context>
-<context>
- <name>FontPanel</name>
- <message>
- <location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/>
- <source>Font</source>
- <translation>字体</translation>
- </message>
- <message>
- <location line="+11"/>
- <source>&amp;Writing system</source>
- <translation>书写系统(&amp;W)</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>&amp;Family</source>
- <translation>字体æ—(&amp;F)</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Style</source>
- <translation>风格(&amp;S)</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Point size</source>
- <translation>点大å°(&amp;P)</translation>
- </message>
-</context>
-<context>
- <name>FontSettingsDialog</name>
- <message>
- <location filename="../tools/assistant/compat/fontsettingsdialog.cpp" line="+63"/>
- <source>Font Settings</source>
- <translation>字体设置</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Font settings for:</source>
- <translation>字体设置用于:</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Browser</source>
- <translation>æµè§ˆå™¨</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Application</source>
- <translation>应用程åº</translation>
- </message>
- <message>
- <location line="+6"/>
- <source>Use custom settings</source>
- <translation>使用自定义设置</translation>
- </message>
-</context>
-<context>
- <name>HelpDialog</name>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+279"/>
- <source>Open Link in Current Tab</source>
- <translation>在当å‰æ ‡ç­¾é¡µæ‰“开链接</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Open Link in New Window</source>
- <translation>在新窗å£ä¸­æ‰“开链接</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Open Link in New Tab</source>
- <translation>在新标签页中打开链接</translation>
- </message>
- <message>
- <location line="+73"/>
- <location line="+82"/>
- <source>Prepare...</source>
- <translation>准备...</translation>
- </message>
- <message>
- <location line="-64"/>
- <location line="+16"/>
- <location line="+661"/>
- <source>Qt Assistant</source>
- <translation>Qt 助手</translation>
- </message>
- <message>
- <location line="-677"/>
- <source>Failed to load keyword index file
-Assistant will not work!</source>
- <translation>加载关键è¯ç´¢å¼•æ–‡ä»¶å¤±è´¥
-Qt 助手将ä¸èƒ½å·¥ä½œï¼</translation>
- </message>
- <message>
- <location line="+17"/>
- <source>Cannot open the index file %1</source>
- <translation>无法打开索引文件 %1</translation>
- </message>
- <message>
- <location line="+58"/>
- <location line="+124"/>
- <location line="+8"/>
- <source>Warning</source>
- <translation>警告</translation>
- </message>
- <message>
- <location line="-131"/>
- <location line="+124"/>
- <source>Documentation file %1 does not exist!
-Skipping file.</source>
- <translation>文档文件 %1 ä¸å­˜åœ¨ï¼
-跳过文件。</translation>
- </message>
- <message>
- <location line="-112"/>
- <location line="+133"/>
- <source>Parse Error</source>
- <translation>解æžé”™è¯¯</translation>
- </message>
- <message>
- <location line="-13"/>
- <source>Documentation file %1 is not compatible!
-Skipping file.</source>
- <translation>%1 文档文件ä¸å…¼å®¹ï¼
-跳过文件ï¼</translation>
- </message>
- <message>
- <location line="+48"/>
- <location line="+469"/>
- <source>Done</source>
- <translation>完æˆ</translation>
- </message>
- <message>
- <location line="-47"/>
- <source>Failed to save fulltext search index
-Assistant will not work!</source>
- <translation>ä¿å­˜å…¨æ–‡æœç´¢ç´¢å¼•å¤±è´¥ Qt 助手将ä¸èƒ½å·¥ä½œï¼</translation>
- </message>
- <message>
- <location line="+29"/>
- <source>Indexing files...</source>
- <translation>正在索引文件...</translation>
- </message>
- <message>
- <location line="+15"/>
- <source>Reading dictionary...</source>
- <translation>正在读å–è¯å…¸...</translation>
- </message>
- <message>
- <location line="+46"/>
- <location line="+9"/>
- <source>Full Text Search</source>
- <translation>全文æœç´¢</translation>
- </message>
- <message>
- <location line="-8"/>
- <source>Using a wildcard within phrases is not allowed.</source>
- <translation>ä¸å…许在短语中使用通é…符。</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>The closing quotation mark is missing.</source>
- <translation>缺少关闭标点。</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Help</source>
- <translation>帮助</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help&lt;/b&gt;&lt;p&gt;Choose the topic you want help on from the contents list, or search the index for keywords.&lt;/p&gt;</source>
- <translation>&lt;b&gt;帮助&lt;/b&gt;&lt;p&gt;在内容列表中选择您需è¦å¸®åŠ©çš„主题,或者在索引中æœç´¢è¿™ä¸ªå…³é”®è¯ã€‚&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.</source>
- <translation>按ç§ç±»ã€ç´¢å¼•å’Œæ ‡ç­¾æ˜¾ç¤ºå¸®åŠ©ä¸»é¢˜ã€‚å¦ä¸€ä¸ªæ ‡ç­¾é¡µä¸­å¯ä»¥æ‰§è¡Œå…¨æ–‡æœç´¢ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Con&amp;tents</source>
- <translation>内容(&amp;T)</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help topics organized by category.&lt;/b&gt;&lt;p&gt;Double-click an item to see the topics in that category. To view a topic, just double-click it.&lt;/p&gt;</source>
- <translation>&lt;b&gt;按ç§ç±»ç»„织帮助主题。&lt;/b&gt;&lt;p&gt;åŒå‡»ä¸€é¡¹å¯ä»¥æŸ¥çœ‹é‚£ä¸ªç§ç±»ä¸­çš„主题。è¦æŸ¥çœ‹ä¸€ä¸ªä¸»é¢˜ï¼Œåªè¦åŒå‡»å®ƒå°±å¯ä»¥äº†ã€‚&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>column 1</source>
- <translation>列 1</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Index</source>
- <translation>索引(&amp;I)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Look For:</source>
- <translation>查找(&amp;L):</translation>
- </message>
- <message>
- <location/>
- <source>Enter keyword</source>
- <translation>输入关键è¯</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter a keyword.&lt;/b&gt;&lt;p&gt;The list will select an item that matches the entered string best.&lt;/p&gt;</source>
- <translation>&lt;b&gt;输入一个关键è¯ã€‚&lt;/b&gt;&lt;p&gt;这个列表将会选择一个和已输入字符串最匹é…的一项。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;List of available help topics.&lt;/b&gt;&lt;p&gt;Double-click on an item to open its help page. If more than one is found, you must specify which page you want.&lt;/p&gt;</source>
- <translation>&lt;b&gt;å¯ç”¨çš„帮助主题列表。&lt;/b&gt;&lt;p&gt;åŒå‡»ä¸€é¡¹æ‰“开它的帮助页é¢ã€‚如果找到一个以上的结果,你必须指定你想è¦æ‰“开哪一个。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Bookmarks</source>
- <translation>书签(&amp;B)</translation>
- </message>
- <message>
- <location/>
- <source>Displays the list of bookmarks.</source>
- <translation>显示书签列表。</translation>
- </message>
- <message>
- <location/>
- <source>Add new bookmark</source>
- <translation>添加新书签</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>把当å‰æ˜¾ç¤ºçš„页é¢æ·»åŠ ä¸ºä¸€ä¸ªæ–°ä¹¦ç­¾ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>&amp;New</source>
- <translation>新建(&amp;N)</translation>
- </message>
- <message>
- <location/>
- <source>Delete bookmark</source>
- <translation>删除书签</translation>
- </message>
- <message>
- <location/>
- <source>Delete the selected bookmark.</source>
- <translation>删除被选中的书签。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Delete</source>
- <translation>删除(&amp;D)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Search</source>
- <translation>æœç´¢(&amp;S)</translation>
- </message>
- <message>
- <location/>
- <source>Searching f&amp;or:</source>
- <translation>正在æœç´¢(&amp;O):</translation>
- </message>
- <message>
- <location/>
- <source>Enter searchword(s).</source>
- <translation>输入æœç´¢è¯ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter search word(s).&lt;/b&gt;&lt;p&gt;Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.&lt;/p&gt;</source>
- <translation>&lt;b&gt;输入æœç´¢è¯ã€‚&lt;b&gt;&lt;p&gt;在这里输入您è¦æŸ¥æ‰¾çš„è¯ã€‚这个è¯å¯ä»¥åŒ…å«é€šé…符(*)。如果是一个è¯çš„åºåˆ—,请把它们放在英文引å·å†…。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Found documents&lt;/b&gt;&lt;p&gt;This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.&lt;/p&gt;</source>
- <translation>&lt;b&gt;å‘现文档&lt;/b&gt;&lt;p&gt;这个列表包å«ä¸Šæ­¤æœç´¢å‘现的所有文档。这些文档已ç»æŽ’åºï¼Œä¾‹å¦‚,第一个文档最为匹é…。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Found &amp;Documents:</source>
- <translation>找到的文档(&amp;D):</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page.</source>
- <translation>显示帮助页é¢ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page for the full text search.</source>
- <translation>显示全文文本æœç´¢çš„帮助页é¢ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>He&amp;lp</source>
- <translation>帮助(&amp;L)</translation>
- </message>
- <message>
- <location/>
- <source>Start searching.</source>
- <translation>开始æœç´¢ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Pressing this button starts the search.</source>
- <translation>点击这个按钮开始æœç´¢ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Preparing...</source>
- <translation>正在准备...</translation>
- </message>
- <message numerus="yes">
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+7"/>
- <source>%n document(s) found.</source>
- <translation>
- <numerusform>%n 个文档已ç»æ‰¾åˆ°ã€‚</numerusform>
- </translation>
- </message>
-</context>
-<context>
- <name>HelpWindow</name>
- <message>
- <location filename="../tools/assistant/compat/helpwindow.cpp" line="+97"/>
- <source>Help</source>
- <translation>帮助</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Unable to launch web browser.
-</source>
- <translation>ä¸èƒ½å¯åŠ¨ç½‘页æµè§ˆå™¨ã€‚
-</translation>
- </message>
- <message>
- <location line="+28"/>
- <source>Failed to open link: &apos;%1&apos;</source>
- <translation>打开链接失败:“%1â€</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
- <translation>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;没有找到这个页é¢&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;“%1â€&lt;/h3&gt;&lt;/div&gt;</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Error...</source>
- <translation>错误...</translation>
- </message>
- <message>
- <location line="+61"/>
- <source>Open Link in New Window Shift+LMB</source>
- <translation>在新窗å£ä¸­æ‰“开链接 Shift+LMB</translation>
- </message>
- <message>
- <location line="-2"/>
- <source>Open Link in New Tab</source>
- <translation>在新标签页中打开链接</translation>
- </message>
- <message>
- <location line="-89"/>
- <source>OK</source>
- <translation>确定</translation>
- </message>
- <message>
- <location line="+86"/>
- <source>Copy &amp;Link Location</source>
- <translation>å¤åˆ¶é“¾æŽ¥åœ°å€(&amp;L)</translation>
- </message>
-</context>
-<context>
- <name>Index</name>
- <message>
- <location filename="../tools/assistant/compat/index.cpp" line="+385"/>
- <source>Untitled</source>
- <translation>未命åçš„</translation>
- </message>
-</context>
-<context>
- <name>MainWindow</name>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+103"/>
- <source>Sidebar</source>
- <translation>侧æ </translation>
- </message>
- <message>
- <location line="+18"/>
- <source>&amp;Window</source>
- <translation>窗å£(&amp;W)</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Minimize</source>
- <translation>最å°åŒ–</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+M</source>
- <translation>Ctrl+M</translation>
- </message>
- <message>
- <location line="+34"/>
- <source>Initializing Qt Assistant...</source>
- <translation>正在åˆå§‹åŒ– Qt 助手...</translation>
- </message>
- <message>
- <location line="+26"/>
- <source>SHIFT+CTRL+=</source>
- <translation>SHIFT+CTRL+=</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Ctrl+T</source>
- <translation>Ctrl+T</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+I</source>
- <translation>Ctrl+I</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+B</source>
- <translation>Ctrl+B</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+S</source>
- <translation>Ctrl+S</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Ctrl+W</source>
- <translation>Ctrl+W</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+1"/>
- <source>Ctrl+]</source>
- <translation>Ctrl+]</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+[</source>
- <translation>Ctrl+[</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Views</source>
- <translation>视图</translation>
- </message>
- <message>
- <location line="+80"/>
- <source>Displays the main page of a specific documentation set.</source>
- <translation>显示一个指定文档集的主页é¢ã€‚</translation>
- </message>
- <message>
- <source>Open Source Edition</source>
- <translation type="obsolete">å¼€æºç‰ˆæœ¬</translation>
- </message>
- <message>
- <source>This version of Qt Assistant is part of the Qt Open Source Edition, for use in the development of Open Source applications. Qt is a comprehensive C++ framework for cross-platform application development.</source>
- <translation type="obsolete">这个版本的 Qt 助手是 Qt å¼€æºç‰ˆæœ¬çš„一部分,用于开å‘å¼€æºåº”用程åºã€‚Qt 是一个用于跨平å°åº”用程åºå¼€å‘çš„ç»¼åˆ C++ 框架。</translation>
- </message>
- <message>
- <source>This program is licensed to you under the terms of the Qt Commercial License Agreement. For details, see the file LICENSE that came with this software distribution.</source>
- <translation type="obsolete">我们已ç»å…许您在 Qt 商业许å¯å议下使用本程åºã€‚有关细节,请阅读本软件å‘行中所带的 LICENSE 文件。</translation>
- </message>
- <message>
- <location line="+49"/>
- <location line="+1"/>
- <source>Qt Assistant</source>
- <translation>Qt 助手</translation>
- </message>
- <message>
- <location line="+19"/>
- <source>Failed to open about application contents in file: &apos;%1&apos;</source>
- <translation>在“%1â€æ–‡ä»¶ä¸­æ‰“开应用程åºå†…容失败</translation>
- </message>
- <message>
- <location line="+201"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+238"/>
- <location line="+6"/>
- <source>Save Page</source>
- <translation>ä¿å­˜é¡µé¢</translation>
- </message>
- <message>
- <location line="+0"/>
- <source>Cannot open file for writing!</source>
- <translation>ä¸èƒ½å†™æ‰“开文件ï¼</translation>
- </message>
- <message>
- <source>Qt Assistant by Trolltech</source>
- <translation type="obsolete">Trolltech 的 Qt 助手</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Qt Assistant by Nokia</source>
- <translation>Qt助手 - Nokia</translation>
- </message>
- <message>
- <location/>
- <source>Toolbar</source>
- <translation>工具æ </translation>
- </message>
- <message>
- <location/>
- <source>Go</source>
- <translation>å‰å¾€</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Help</source>
- <translation>帮助(&amp;H)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;File</source>
- <translation>文件(&amp;F)</translation>
- </message>
- <message>
- <location/>
- <source>Boo&amp;kmarks</source>
- <translation>书签(&amp;K)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Go</source>
- <translation>å‰å¾€(&amp;G)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;View</source>
- <translation>查看(&amp;V)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Edit</source>
- <translation>编辑(&amp;E)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Print...</source>
- <translation>打å°(&amp;P)...</translation>
- </message>
- <message>
- <location/>
- <source>Print the currently displayed page.</source>
- <translation>打å°å½“å‰æ˜¾ç¤ºé¡µé¢ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+P</source>
- <translation>Ctrl+P</translation>
- </message>
- <message>
- <location/>
- <source>E&amp;xit</source>
- <translation>退出(&amp;X)</translation>
- </message>
- <message>
- <location/>
- <source>Quit Qt Assistant.</source>
- <translation>退出 Qt 助手。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Q</source>
- <translation>Ctrl+Q</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Copy</source>
- <translation>å¤åˆ¶(&amp;C)</translation>
- </message>
- <message>
- <location/>
- <source>Copy the selected text to the clipboard.</source>
- <translation>å¤åˆ¶é€‰ä¸­çš„文本到剪贴æ¿ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+C</source>
- <translation>Ctrl+C</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Find in Text...</source>
- <translation>在文本中查找(&amp;F)...</translation>
- </message>
- <message>
- <location/>
- <source>Open the Find dialog. Qt Assistant will search the currently displayed page for the text you enter.</source>
- <translation>打开查找对è¯æ¡†ã€‚Qt 助手将会在当å‰æ˜¾ç¤ºé¡µé¢ä¸­æœç´¢æ‚¨è¾“入的文本。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+F</source>
- <translation>Ctrl+F</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Next</source>
- <translation>查找下一个(&amp;N)</translation>
- </message>
- <message>
- <location/>
- <source>F3</source>
- <translation>F3</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Previous</source>
- <translation>查找上一个(&amp;P)</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F3</source>
- <translation>Shift+F3</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Home</source>
- <translation>主页(&amp;H)</translation>
- </message>
- <message>
- <location/>
- <source>Go to the home page. Qt Assistant&apos;s home page is the Qt Reference Documentation.</source>
- <translation>å‰å¾€ä¸»é¡µã€‚Qt 助手的主页就是 Qt å‚考文档。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Home</source>
- <translation>Ctrl+Home</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Previous</source>
- <translation>上一页(&amp;P)</translation>
- </message>
- <message>
- <location/>
- <source>Go to the previous page.</source>
- <translation>å‰å¾€ä¸Šä¸€é¡µã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Left</source>
- <translation>Alt+Left</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Next</source>
- <translation>下一页(&amp;N)</translation>
- </message>
- <message>
- <location/>
- <source>Go to the next page.</source>
- <translation>å‰å¾€ä¸‹ä¸€é¡µã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Right</source>
- <translation>Alt+Right</translation>
- </message>
- <message>
- <location/>
- <source>About Qt Assistant</source>
- <translation>关于 Qt 助手</translation>
- </message>
- <message>
- <location/>
- <source>Display further information about Qt Assistant.</source>
- <translation>显示有关 Qt 助手的更多信æ¯ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>About Qt</source>
- <translation>关于 Qt</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;in</source>
- <translation>放大(&amp;I)</translation>
- </message>
- <message>
- <location/>
- <source>Zoom in on the document, i.e. increase the font size.</source>
- <translation>放大文档,也就是增大字体大å°ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl++</source>
- <translation>Ctrl++</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;out</source>
- <translation>缩å°(&amp;O)</translation>
- </message>
- <message>
- <location/>
- <source>Zoom out on the document, i.e. decrease the font size.</source>
- <translation>缩å°æ–‡æ¡£ï¼Œä¹Ÿå°±æ˜¯å‡å°å­—体大å°ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+-</source>
- <translation>Ctrl+-</translation>
- </message>
- <message>
- <location/>
- <source>New Window</source>
- <translation>新建窗å£</translation>
- </message>
- <message>
- <location/>
- <source>Open a new window.</source>
- <translation>打开一个新窗å£ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+N</source>
- <translation>Ctrl+N</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>关闭(&amp;C)</translation>
- </message>
- <message>
- <location/>
- <source>Close the current window.</source>
- <translation>关闭当å‰çª—å£ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Add Bookmark</source>
- <translation>添加书签(&amp;A)</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>把当å‰æ˜¾ç¤ºé¡µé¢æ·»åŠ ä¸ºä¸€ä¸ªæ–°ä¹¦ç­¾ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>What&apos;s This?</source>
- <translation>这是什么?</translation>
- </message>
- <message>
- <location/>
- <source>&quot;What&apos;s This?&quot; context sensitive help.</source>
- <translation>“这是什么?â€ä¸Šä¸‹æ–‡æ•æ„Ÿå¸®åŠ©ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F1</source>
- <translation>Shift+F1</translation>
- </message>
- <message>
- <location/>
- <source>Add Tab</source>
- <translation>添加标签页</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+N</source>
- <translation>Ctrl+Alt+N</translation>
- </message>
- <message>
- <location/>
- <source>Next Tab</source>
- <translation>下一个标签页</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Right</source>
- <translation>Ctrl+Alt+Right</translation>
- </message>
- <message>
- <location/>
- <source>Previous Tab</source>
- <translation>å‰ä¸€ä¸ªæ ‡ç­¾é¡µ</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Left</source>
- <translation>Ctrl+Alt+Left</translation>
- </message>
- <message>
- <location/>
- <source>Close Tab</source>
- <translation>关闭标签页</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Q</source>
- <translation>Ctrl+Alt+Q</translation>
- </message>
- <message>
- <location/>
- <source>Qt Assistant Manual</source>
- <translation>Qt 助手手册</translation>
- </message>
- <message>
- <location/>
- <source>F1</source>
- <translation>F1</translation>
- </message>
- <message>
- <location/>
- <source>Save Page As...</source>
- <translation>页é¢å¦å­˜ä¸º...</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+S</source>
- <translation>Ctrl+Alt+S</translation>
- </message>
- <message>
- <location/>
- <source>Sync with Table of Contents</source>
- <translation>åŒæ­¥ç›®å½•</translation>
- </message>
- <message>
- <location/>
- <source>Select the page in contents tab.</source>
- <translation>选择内容标签页中的页é¢ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Font Settings...</source>
- <translation>字体设置...</translation>
- </message>
- <message>
- <source>You need a commercial Qt license for development of proprietary (closed source) applications. Please see &lt;a href=&quot;http://qt.nokia.com/company/model&quot;&gt;qt.nokia.com/company/model&lt;/a&gt; for an overview of Qt licensing.</source>
- <translation type="obsolete">å¼€å‘商业(闭æºï¼‰åº”用程åºï¼Œä½ éœ€è¦å•†ä¸š Qt 许å¯ã€‚对于 Qt 许å¯çš„概览,请å‚考&lt;a href=&quot;http://qt.nokia.com/company/model&quot;&gt;qt.nokia.com/company/model&lt;/a&gt;。</translation>
- </message>
- <message>
- <source>This program is licensed to you under the terms of the Qt %1 License Agreement. For details, see the license file that came with this software distribution.</source>
- <translation type="obsolete">我们已ç»å…许您在 Qt %1 许å¯å议下使用本程åºã€‚有关细节,请阅读本软件å‘行中所带的许å¯å议文件。</translation>
- </message>
-</context>
-<context>
- <name>QObject</name>
- <message>
- <source>Qt Assistant by Trolltech</source>
- <translation type="obsolete">Trolltech 的 Qt 助手</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/config.cpp" line="+350"/>
- <source>Qt Assistant by Nokia</source>
- <translation>Qt助手 - Nokia</translation>
- </message>
-</context>
-<context>
- <name>TabbedBrowser</name>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+149"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+86"/>
- <source>Add page</source>
- <translation>添加页é¢</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>Close page</source>
- <translation>关闭页é¢</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.ui"/>
- <source>TabbedBrowser</source>
- <translation>标签页æµè§ˆå™¨</translation>
- </message>
- <message>
- <location/>
- <source>Untitled</source>
- <translation>未命åçš„</translation>
- </message>
- <message>
- <location/>
- <source>Previous</source>
- <translation>上一个</translation>
- </message>
- <message>
- <location/>
- <source>Next</source>
- <translation>下一个</translation>
- </message>
- <message>
- <location/>
- <source>Case Sensitive</source>
- <translation>区分大å°å†™</translation>
- </message>
- <message>
- <location/>
- <source>Whole words</source>
- <translation>æ•´è¯</translation>
- </message>
- <message>
- <location/>
- <source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
- <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;æœç´¢å·²ç»å›žçŽ¯</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+243"/>
- <source>New Tab</source>
- <translation>新标签页</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Tab</source>
- <translation>关闭标签页</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Other Tabs</source>
- <translation>关闭其它标签页</translation>
- </message>
-</context>
-<context>
- <name>TopicChooser</name>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.cpp" line="+56"/>
- <source>Choose a topic for &lt;b&gt;%1&lt;/b&gt;</source>
- <translation>为&lt;b&gt;%1&lt;/b&gt;选择一个主题</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.ui"/>
- <source>Choose Topic</source>
- <translation>选择主题</translation>
- </message>
- <message>
- <location/>
- <source>Select a topic from the list and click the &lt;b&gt;Display&lt;/b&gt;-button to open the online help.</source>
- <translation>从列表中选择一个主题并且点击&lt;b&gt;显示&lt;/b&gt;按钮打开在线帮助。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Topics</source>
- <translation>主题(&amp;T)</translation>
- </message>
- <message>
- <location/>
- <source>Displays a list of available help topics for the keyword.</source>
- <translation>为这个关键è¯æ˜¾ç¤ºä¸€ä¸ªå¯ç”¨å¸®åŠ©ä¸»é¢˜çš„列表。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Display</source>
- <translation>显示(&amp;D)</translation>
- </message>
- <message>
- <location/>
- <source>Open the topic selected in the list.</source>
- <translation>打开列表中选中的主题。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>关闭(&amp;C)</translation>
- </message>
- <message>
- <location/>
- <source>Close the Dialog.</source>
- <translation>关闭对è¯æ¡†ã€‚</translation>
- </message>
-</context>
-</TS>
diff --git a/translations/assistant_adp_zh_TW.ts b/translations/assistant_adp_zh_TW.ts
deleted file mode 100644
index d622d11b74..0000000000
--- a/translations/assistant_adp_zh_TW.ts
+++ /dev/null
@@ -1,1000 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="zh_TW">
-<context>
- <name>AssistantServer</name>
- <message>
- <location filename="../tools/assistant/compat/main.cpp" line="+225"/>
- <source>Qt Assistant</source>
- <translation>Qt å°å¹«æ‰‹</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Failed to bind to port %1</source>
- <translation>無法çµåˆé€£æŽ¥åŸ  %1</translation>
- </message>
-</context>
-<context>
- <name>FontPanel</name>
- <message>
- <location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/>
- <source>Font</source>
- <translation>å­—åž‹</translation>
- </message>
- <message>
- <location line="+11"/>
- <source>&amp;Writing system</source>
- <translation>寫入系統(&amp;W)</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>&amp;Family</source>
- <translation>家æ—(&amp;F)</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Style</source>
- <translation>風格(&amp;S)</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Point size</source>
- <translation>點大å°(&amp;P)</translation>
- </message>
-</context>
-<context>
- <name>FontSettingsDialog</name>
- <message>
- <location filename="../tools/assistant/compat/fontsettingsdialog.cpp" line="+63"/>
- <source>Font Settings</source>
- <translation>字型設定</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Font settings for:</source>
- <translation>字型設定用於:</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Browser</source>
- <translation>ç€è¦½å™¨</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Application</source>
- <translation>應用程å¼</translation>
- </message>
- <message>
- <location line="+6"/>
- <source>Use custom settings</source>
- <translation>使用者自訂設定</translation>
- </message>
-</context>
-<context>
- <name>HelpDialog</name>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Con&amp;tents</source>
- <translation>內容(&amp;T)</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+376"/>
- <location line="+16"/>
- <location line="+661"/>
- <source>Qt Assistant</source>
- <translation>Qt å°å¹«æ‰‹</translation>
- </message>
- <message>
- <location line="-774"/>
- <source>Open Link in Current Tab</source>
- <translation>在目å‰çš„分é é–‹å•Ÿé€£çµ</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Open Link in New Window</source>
- <translation>在新視窗開啟連çµ</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Open Link in New Tab</source>
- <translation>在新分é é–‹å•Ÿé€£çµ</translation>
- </message>
- <message>
- <location line="+73"/>
- <location line="+82"/>
- <source>Prepare...</source>
- <translation>準備中...</translation>
- </message>
- <message>
- <location line="-64"/>
- <source>Failed to load keyword index file
-Assistant will not work!</source>
- <translation>無法載入關éµå­—索引檔
-å°å¹«æ‰‹å°‡ç„¡æ³•é‹ä½œ!</translation>
- </message>
- <message>
- <location line="+17"/>
- <source>Cannot open the index file %1</source>
- <translation>無法開啟索引檔 %1</translation>
- </message>
- <message>
- <location line="+58"/>
- <location line="+124"/>
- <location line="+8"/>
- <source>Warning</source>
- <translation>警告</translation>
- </message>
- <message>
- <location line="-131"/>
- <location line="+124"/>
- <source>Documentation file %1 does not exist!
-Skipping file.</source>
- <translation>文件檔 %1 ä¸å­˜åœ¨
-將跳éŽæ­¤æª”案。</translation>
- </message>
- <message>
- <location line="-112"/>
- <location line="+133"/>
- <source>Parse Error</source>
- <translation>剖æžéŒ¯èª¤</translation>
- </message>
- <message>
- <location line="-13"/>
- <source>Documentation file %1 is not compatible!
-Skipping file.</source>
- <translation>文件檔 %1 ä¸ç›¸å®¹
-將跳éŽæ­¤æª”案。</translation>
- </message>
- <message>
- <location line="+48"/>
- <location line="+469"/>
- <source>Done</source>
- <translation>完æˆ</translation>
- </message>
- <message>
- <location line="-47"/>
- <source>Failed to save fulltext search index
-Assistant will not work!</source>
- <translation>無法儲存全文檢索æœå°‹ç´¢å¼•ã€‚
-å°å¹«æ‰‹å°‡ç„¡æ³•é‹ä½œ!</translation>
- </message>
- <message>
- <location line="+29"/>
- <source>Indexing files...</source>
- <translation>建立檔案索引中...</translation>
- </message>
- <message>
- <location line="+15"/>
- <source>Reading dictionary...</source>
- <translation>讀å–字典中...</translation>
- </message>
- <message>
- <location line="+46"/>
- <location line="+9"/>
- <source>Full Text Search</source>
- <translation>全文檢索</translation>
- </message>
- <message>
- <location line="-8"/>
- <source>Using a wildcard within phrases is not allowed.</source>
- <translation>在片語中ä¸èƒ½ä½¿ç”¨è¬ç”¨å­—元。</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>The closing quotation mark is missing.</source>
- <translation>沒有關閉引號。</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Help</source>
- <translation>說明</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help&lt;/b&gt;&lt;p&gt;Choose the topic you want help on from the contents list, or search the index for keywords.&lt;/p&gt;</source>
- <translation>&lt;b&gt;說明&lt;/b&gt;&lt;p&gt;請從內容清單中é¸æ“‡æ‚¨éœ€è¦èªªæ˜Žçš„主題,或是在索引中æœå°‹é—œéµå­—。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.</source>
- <translation>ä¾åˆ†é¡žã€ç´¢å¼•æˆ–書籤來顯示說明主題。å¦ä¸€å€‹åˆ†é æœƒç¹¼æ‰¿æ­¤å…¨æ–‡æª¢ç´¢ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help topics organized by category.&lt;/b&gt;&lt;p&gt;Double-click an item to see the topics in that category. To view a topic, just double-click it.&lt;/p&gt;</source>
- <translation>&lt;b&gt;ä¾é¡žåˆ¥çµ„織說明主題。&lt;/b&gt;&lt;p&gt;雙擊å¯ä»¥æŸ¥çœ‹è©²é¡žåˆ¥ä¸­æœ‰å“ªäº›ä¸»é¡Œã€‚雙擊該主題å¯ä»¥æŸ¥çœ‹å…§å®¹ã€‚&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>column 1</source>
- <translation>欄 1</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Index</source>
- <translation>索引(&amp;I)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Look For:</source>
- <translation>æœå°‹(&amp;L):</translation>
- </message>
- <message>
- <location/>
- <source>Enter keyword</source>
- <translation>輸入關éµå­—</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter a keyword.&lt;/b&gt;&lt;p&gt;The list will select an item that matches the entered string best.&lt;/p&gt;</source>
- <translation>&lt;b&gt;輸入關éµå­—。&lt;/b&gt;&lt;p&gt;此清單å¯ä»¥é¸æ“‡æœ€èƒ½ç¬¦åˆè¼¸å…¥å­—串的項目。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;List of available help topics.&lt;/b&gt;&lt;p&gt;Double-click on an item to open its help page. If more than one is found, you must specify which page you want.&lt;/p&gt;</source>
- <translation>&lt;b&gt;å¯ç”¨èªªæ˜Žä¸»é¡Œæ¸…單。&lt;/b&gt;&lt;p&gt;雙擊å¯ä»¥é–‹å•Ÿè©²èªªæ˜Žé é¢ã€‚如果找到一個以上,您必須指定您è¦çœ‹å“ªä¸€å€‹é é¢ã€‚&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Bookmarks</source>
- <translation>書籤(&amp;B)</translation>
- </message>
- <message>
- <location/>
- <source>Displays the list of bookmarks.</source>
- <translation>顯示書籤的清單。</translation>
- </message>
- <message>
- <location/>
- <source>Add new bookmark</source>
- <translation>新增書籤</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>將目å‰é¡¯ç¤ºçš„é é¢æ–°å¢žåˆ°æ›¸ç±¤ä¸­ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>&amp;New</source>
- <translation>新增(&amp;N)</translation>
- </message>
- <message>
- <location/>
- <source>Delete bookmark</source>
- <translation>刪除書籤</translation>
- </message>
- <message>
- <location/>
- <source>Delete the selected bookmark.</source>
- <translation>刪除é¸å–的書籤。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Delete</source>
- <translation>刪除(&amp;D)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Search</source>
- <translation>æœå°‹(&amp;S)</translation>
- </message>
- <message>
- <location/>
- <source>Searching f&amp;or:</source>
- <translation>æœå°‹å…§å®¹(&amp;O):</translation>
- </message>
- <message>
- <location/>
- <source>Enter searchword(s).</source>
- <translation>請輸入æœå°‹é—œéµå­—詞。</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter search word(s).&lt;/b&gt;&lt;p&gt;Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.&lt;/p&gt;</source>
- <translation>&lt;b&gt;輸入æœå°‹é—œéµå­—詞。&lt;/b&gt;&lt;p&gt;在此輸入您è¦æœå°‹çš„é—œéµå­—詞。å¯ä»¥ä½¿ç”¨è¬ç”¨å­—å…ƒ (*)。如果是一個片語,請用引號括起來。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Found documents&lt;/b&gt;&lt;p&gt;This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.&lt;/p&gt;</source>
- <translation>&lt;b&gt;找到的文件&lt;/b&gt;&lt;p&gt;這放清單包å«äº†æ‰€æœ‰ä¸Šæ¬¡æœå°‹æ‰¾åˆ°çš„文件。文件會ä¾ç¬¦åˆç¨‹åº¦æŽ’åºã€‚&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Found &amp;Documents:</source>
- <translation>找到的文件(&amp;D):</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page.</source>
- <translation>顯示說明é é¢ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page for the full text search.</source>
- <translation>顯示全文檢索的說明é é¢ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>He&amp;lp</source>
- <translation>說明(&amp;L)</translation>
- </message>
- <message>
- <location/>
- <source>Start searching.</source>
- <translation>開始æœå°‹ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Pressing this button starts the search.</source>
- <translation>按下此按éµé–‹å§‹æœå°‹ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Preparing...</source>
- <translation>準備中...</translation>
- </message>
- <message numerus="yes">
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+7"/>
- <source>%n document(s) found.</source>
- <translation>
- <numerusform>找到 %n 個文件。</numerusform>
- </translation>
- </message>
-</context>
-<context>
- <name>HelpWindow</name>
- <message>
- <location filename="../tools/assistant/compat/helpwindow.cpp" line="+97"/>
- <source>Help</source>
- <translation>說明</translation>
- </message>
- <message>
- <location line="+93"/>
- <source>Open Link in New Window Shift+LMB</source>
- <translation>åœ¨æ–°è¦–çª—é–‹å•Ÿé€£çµ Shift+滑鼠左éµ</translation>
- </message>
- <message>
- <location line="-92"/>
- <source>Unable to launch web browser.
-</source>
- <translation>無法啟動ç€è¦½å™¨ã€‚
-</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>OK</source>
- <translation>確定</translation>
- </message>
- <message>
- <location line="+27"/>
- <source>Failed to open link: &apos;%1&apos;</source>
- <translation>無法開啟連çµï¼š%1</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
- <translation>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;找ä¸åˆ°è©²é é¢&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;%1&lt;/h3&gt;&lt;/div&gt;</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Error...</source>
- <translation>錯誤...</translation>
- </message>
- <message>
- <location line="+59"/>
- <source>Open Link in New Tab</source>
- <translation>在新分é é–‹å•Ÿé€£çµ</translation>
- </message>
- <message>
- <location line="-3"/>
- <source>Copy &amp;Link Location</source>
- <translation>複製連çµä½ç½®(&amp;L)</translation>
- </message>
-</context>
-<context>
- <name>Index</name>
- <message>
- <location filename="../tools/assistant/compat/index.cpp" line="+385"/>
- <source>Untitled</source>
- <translation>未命å</translation>
- </message>
-</context>
-<context>
- <name>MainWindow</name>
- <message>
- <source>Qt Assistant by Trolltech</source>
- <translation type="obsolete">Qt å°å¹«æ‰‹ï¼ŒTrolltech å…¬å¸æä¾›</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Toolbar</source>
- <translation>工具列</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Print...</source>
- <translation>列å°(&amp;P)...</translation>
- </message>
- <message>
- <location/>
- <source>E&amp;xit</source>
- <translation>離開(&amp;X)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Copy</source>
- <translation>複製(&amp;C)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Find in Text...</source>
- <translation>在文字中尋找(&amp;F)...</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Home</source>
- <translation>首é (&amp;H)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Previous</source>
- <translation>å‰ä¸€å€‹(&amp;P)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Next</source>
- <translation>下一個(&amp;N)</translation>
- </message>
- <message>
- <location/>
- <source>About Qt</source>
- <translation>關於 Qt</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;in</source>
- <translation>放大(&amp;I)</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;out</source>
- <translation>縮å°(&amp;O)</translation>
- </message>
- <message>
- <location/>
- <source>New Window</source>
- <translation>新視窗</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+188"/>
- <source>Ctrl+T</source>
- <translation>Ctrl+T</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+I</source>
- <translation>Ctrl+I</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+B</source>
- <translation>Ctrl+B</translation>
- </message>
- <message>
- <location line="+139"/>
- <location line="+1"/>
- <source>Qt Assistant</source>
- <translation>Qt å°å¹«æ‰‹</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>&amp;Add Bookmark</source>
- <translation>新增書籤(&amp;A)</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="-227"/>
- <source>Sidebar</source>
- <translation>邊列</translation>
- </message>
- <message>
- <location line="+18"/>
- <source>&amp;Window</source>
- <translation>視窗(&amp;W)</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Minimize</source>
- <translation>最å°åŒ–</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+M</source>
- <translation>Ctrl+M</translation>
- </message>
- <message>
- <location line="+34"/>
- <source>Initializing Qt Assistant...</source>
- <translation>åˆå§‹åŒ– Qt å°å¹«æ‰‹ä¸­...</translation>
- </message>
- <message>
- <location line="+26"/>
- <source>SHIFT+CTRL+=</source>
- <translation>SHIFT+CTRL+=</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Ctrl+S</source>
- <translation>Ctrl+S</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Ctrl+W</source>
- <translation>Ctrl+W</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+1"/>
- <source>Ctrl+]</source>
- <translation>Ctrl+]</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+[</source>
- <translation>Ctrl+[</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Views</source>
- <translation>檢視</translation>
- </message>
- <message>
- <location line="+80"/>
- <source>Displays the main page of a specific documentation set.</source>
- <translation>顯示指定文件集的主é é¢ã€‚</translation>
- </message>
- <message>
- <source>Open Source Edition</source>
- <translation type="obsolete">開放æºç¢¼ç‰ˆæœ¬</translation>
- </message>
- <message>
- <source>This version of Qt Assistant is part of the Qt Open Source Edition, for use in the development of Open Source applications. Qt is a comprehensive C++ framework for cross-platform application development.</source>
- <translation type="obsolete">此版本的 Qt å°å¹«æ‰‹æ˜¯ Qt 開放æºç¢¼ç‰ˆæœ¬çš„一部份,åªèƒ½ç”¨æ–¼é–‹ç™¼é–‹æ”¾æºç¢¼çš„應用程å¼ã€‚Qt 為一個跨平å°çš„,強大的 C++ 應用程å¼é–‹ç™¼æ¡†æž¶ã€‚</translation>
- </message>
- <message>
- <source>This program is licensed to you under the terms of the Qt Commercial License Agreement. For details, see the file LICENSE that came with this software distribution.</source>
- <translation type="obsolete">此程å¼ä»¥ Qt 商業授權åŒæ„書(Qt Commerical License Agreement)授權給您。詳情請åƒç…§ LICENSE 檔。</translation>
- </message>
- <message>
- <location line="+69"/>
- <source>Failed to open about application contents in file: &apos;%1&apos;</source>
- <translation>無法開啟檔案中應用程å¼çš„「關於ã€å…§å®¹ï¼š%1</translation>
- </message>
- <message>
- <location line="+201"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+238"/>
- <location line="+6"/>
- <source>Save Page</source>
- <translation>儲存é é¢</translation>
- </message>
- <message>
- <location line="+0"/>
- <source>Cannot open file for writing!</source>
- <translation>無法開啟檔案以寫入!</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Qt Assistant by Nokia</source>
- <translation>Nokia æ供的 Qt å°å¹«æ‰‹</translation>
- </message>
- <message>
- <location/>
- <source>Go</source>
- <translation>èµ°</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Help</source>
- <translation>說明(&amp;H)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;File</source>
- <translation>檔案(&amp;F)</translation>
- </message>
- <message>
- <location/>
- <source>Boo&amp;kmarks</source>
- <translation>書籤(&amp;K)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Go</source>
- <translation>èµ°(&amp;G)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;View</source>
- <translation>檢視(&amp;V)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Edit</source>
- <translation>編輯(&amp;E)</translation>
- </message>
- <message>
- <location/>
- <source>Print the currently displayed page.</source>
- <translation>列å°ç›®å‰é¡¯ç¤ºçš„é é¢ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+P</source>
- <translation>Ctrl+P</translation>
- </message>
- <message>
- <location/>
- <source>Quit Qt Assistant.</source>
- <translation>離開 Qt å°å¹«æ‰‹ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Q</source>
- <translation>Ctrl+Q</translation>
- </message>
- <message>
- <location/>
- <source>Copy the selected text to the clipboard.</source>
- <translation>複製é¸å–的文字到剪貼簿中。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+C</source>
- <translation>Ctrl+C</translation>
- </message>
- <message>
- <location/>
- <source>Open the Find dialog. Qt Assistant will search the currently displayed page for the text you enter.</source>
- <translation>開啟「尋找ã€å°è©±æ¡†ã€‚Qt å°å¹«æ‰‹æœƒåœ¨ç›®å‰é¡¯ç¤ºçš„é é¢ä¸­æœå°‹æ‚¨æ‰€è¼¸å…¥çš„文字。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+F</source>
- <translation>Ctrl+F</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Next</source>
- <translation>尋找下一筆(&amp;N)</translation>
- </message>
- <message>
- <location/>
- <source>F3</source>
- <translation>F3</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Previous</source>
- <translation>尋找上一筆(&amp;P)</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F3</source>
- <translation>Shift+F3</translation>
- </message>
- <message>
- <location/>
- <source>Go to the home page. Qt Assistant&apos;s home page is the Qt Reference Documentation.</source>
- <translation>回到首é ã€‚Qt å°å¹«æ‰‹çš„首é ç‚º Qt åƒè€ƒæ–‡ä»¶ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Home</source>
- <translation>Ctrl+Home</translation>
- </message>
- <message>
- <location/>
- <source>Go to the previous page.</source>
- <translation>跳到上一é ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Left</source>
- <translation>Alt+Left</translation>
- </message>
- <message>
- <location/>
- <source>Go to the next page.</source>
- <translation>跳到下一é ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Right</source>
- <translation>Alt+Right</translation>
- </message>
- <message>
- <location/>
- <source>About Qt Assistant</source>
- <translation>關於 Qt å°å¹«æ‰‹</translation>
- </message>
- <message>
- <location/>
- <source>Display further information about Qt Assistant.</source>
- <translation>顯示關於 Qt å°å¹«æ‰‹çš„詳情。</translation>
- </message>
- <message>
- <location/>
- <source>Zoom in on the document, i.e. increase the font size.</source>
- <translation>放大文件,也就是加大字型。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl++</source>
- <translation>Ctrl++</translation>
- </message>
- <message>
- <location/>
- <source>Zoom out on the document, i.e. decrease the font size.</source>
- <translation>縮å°æ–‡ä»¶ï¼Œä¹Ÿå°±æ˜¯ç¸®å°å­—型。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+-</source>
- <translation>Ctrl+-</translation>
- </message>
- <message>
- <location/>
- <source>Open a new window.</source>
- <translation>開啟新視窗。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+N</source>
- <translation>Ctrl+N</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>關閉(&amp;C)</translation>
- </message>
- <message>
- <location/>
- <source>Close the current window.</source>
- <translation>關閉目å‰çš„視窗。</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>將目å‰é¡¯ç¤ºçš„é é¢æ–°å¢žåˆ°æ›¸ç±¤ä¸­ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>What&apos;s This?</source>
- <translation>這是什麼?</translation>
- </message>
- <message>
- <location/>
- <source>&quot;What&apos;s This?&quot; context sensitive help.</source>
- <translation>「這是什麼?ã€å…§æ–‡èªªæ˜Žã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F1</source>
- <translation>Shift+F1</translation>
- </message>
- <message>
- <location/>
- <source>Add Tab</source>
- <translation>新增分é </translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+N</source>
- <translation>Ctrl+Alt+N</translation>
- </message>
- <message>
- <location/>
- <source>Next Tab</source>
- <translation>下一個分é </translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Right</source>
- <translation>Ctrl+Alt+Right</translation>
- </message>
- <message>
- <location/>
- <source>Previous Tab</source>
- <translation>å‰ä¸€å€‹åˆ†é </translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Left</source>
- <translation>Ctrl+Alt+Left</translation>
- </message>
- <message>
- <location/>
- <source>Close Tab</source>
- <translation>關閉分é </translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Q</source>
- <translation>Ctrl+Alt+Q</translation>
- </message>
- <message>
- <location/>
- <source>Qt Assistant Manual</source>
- <translation>Qt å°å¹«æ‰‹æ‰‹å†Š</translation>
- </message>
- <message>
- <location/>
- <source>F1</source>
- <translation>F1</translation>
- </message>
- <message>
- <location/>
- <source>Save Page As...</source>
- <translation>å¦å­˜é é¢ç‚º...</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+S</source>
- <translation>Ctrl+Alt+S</translation>
- </message>
- <message>
- <location/>
- <source>Sync with Table of Contents</source>
- <translation>與目錄åŒæ­¥</translation>
- </message>
- <message>
- <location/>
- <source>Select the page in contents tab.</source>
- <translation>é¸æ“‡åœ¨å…§å®¹åˆ†é ä¸­çš„é é¢ã€‚</translation>
- </message>
- <message>
- <location/>
- <source>Font Settings...</source>
- <translation>字型設定...</translation>
- </message>
- <message>
- <source>You need a commercial Qt license for development of proprietary (closed source) applications. Please see &lt;a href=&quot;http://qt.nokia.com/company/model&quot;&gt;qt.nokia.com/company/model&lt;/a&gt; for an overview of Qt licensing.</source>
- <translation type="obsolete">您需è¦å•†æ¥­ç‰ˆçš„ Qt 授權æ‰èƒ½ç™¼å±•ç§æœ‰ï¼ˆå°é–‰ï¼‰æ‡‰ç”¨ç¨‹å¼è»Ÿé«”。關於 Qt 授權的概è¦ï¼Œè«‹åƒè€ƒ &lt;a href=&quot;http://qt.nokia.com/company/model&quot;&gt;qt.nokia.com/company/model&lt;/a&gt;。</translation>
- </message>
- <message>
- <source>This program is licensed to you under the terms of the Qt %1 License Agreement. For details, see the license file that came with this software distribution.</source>
- <translation type="obsolete">此程å¼ä»¥ Qt %1 授權åŒæ„書授權給您。詳情請åƒç…§å¥—件中的授權檔。</translation>
- </message>
-</context>
-<context>
- <name>QObject</name>
- <message>
- <source>Qt Assistant by Trolltech</source>
- <translation type="obsolete">Qt å°å¹«æ‰‹ï¼ŒTrolltech å…¬å¸æä¾›</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/config.cpp" line="+350"/>
- <source>Qt Assistant by Nokia</source>
- <translation>Nokia æ供的 Qt å°å¹«æ‰‹</translation>
- </message>
-</context>
-<context>
- <name>TabbedBrowser</name>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+149"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+86"/>
- <source>Add page</source>
- <translation>新增é é¢</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>Close page</source>
- <translation>關閉é é¢</translation>
- </message>
- <message>
- <location line="+243"/>
- <source>New Tab</source>
- <translation>新增分é </translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Tab</source>
- <translation>關閉分é </translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Other Tabs</source>
- <translation>關閉其他分é </translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.ui"/>
- <source>TabbedBrowser</source>
- <translation>分é å¼ç€è¦½å™¨</translation>
- </message>
- <message>
- <location/>
- <source>Untitled</source>
- <translation>未命å</translation>
- </message>
- <message>
- <location/>
- <source>Previous</source>
- <translation>å‰ä¸€å€‹</translation>
- </message>
- <message>
- <location/>
- <source>Next</source>
- <translation>下一個</translation>
- </message>
- <message>
- <location/>
- <source>Case Sensitive</source>
- <translation>å€åˆ†å¤§å°å¯«</translation>
- </message>
- <message>
- <location/>
- <source>Whole words</source>
- <translation>整個字詞</translation>
- </message>
- <message>
- <location/>
- <source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
- <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;æœå°‹å·²æŠ˜å›ž</translation>
- </message>
-</context>
-<context>
- <name>TopicChooser</name>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.cpp" line="+56"/>
- <source>Choose a topic for &lt;b&gt;%1&lt;/b&gt;</source>
- <translation>請為 &lt;b&gt;%1&lt;/b&gt; é¸æ“‡ä¸€å€‹ä¸»é¡Œ</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.ui"/>
- <source>Choose Topic</source>
- <translation>é¸æ“‡ä¸»é¡Œ</translation>
- </message>
- <message>
- <location/>
- <source>Select a topic from the list and click the &lt;b&gt;Display&lt;/b&gt;-button to open the online help.</source>
- <translation>請從清單中é¸å–一個主題,並按下「顯示ã€éµé–‹å•Ÿç·šä¸Šèªªæ˜Žã€‚</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Topics</source>
- <translation>主題(&amp;T)</translation>
- </message>
- <message>
- <location/>
- <source>Displays a list of available help topics for the keyword.</source>
- <translation>顯示此關éµå­—å¯ç”¨çš„說明主題。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Display</source>
- <translation>顯示(&amp;D)</translation>
- </message>
- <message>
- <location/>
- <source>Open the topic selected in the list.</source>
- <translation>開啟在清單中é¸å–的主題。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>關閉(&amp;C)</translation>
- </message>
- <message>
- <location/>
- <source>Close the Dialog.</source>
- <translation>關閉å°è©±æ¡†ã€‚</translation>
- </message>
-</context>
-</TS>
diff --git a/translations/assistant_de.ts b/translations/assistant_de.ts
index b020003568..0a0d37f5a9 100644
--- a/translations/assistant_de.ts
+++ b/translations/assistant_de.ts
@@ -4,7 +4,7 @@
<context>
<name>AboutDialog</name>
<message>
- <location filename="../tools/assistant/tools/assistant/aboutdialog.cpp" line="+110"/>
+ <location filename="../tools/assistant/tools/assistant/aboutdialog.cpp" line="+117"/>
<source>&amp;Close</source>
<translation>&amp;Schließen</translation>
</message>
@@ -12,7 +12,7 @@
<context>
<name>AboutLabel</name>
<message>
- <location line="-14"/>
+ <location line="-15"/>
<source>Warning</source>
<translation>Achtung</translation>
</message>
@@ -24,12 +24,79 @@
</translation>
</message>
<message>
- <location line="+1"/>
+ <location line="+0"/>
<source>OK</source>
<translation>OK</translation>
</message>
</context>
<context>
+ <name>Assistant</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/main.cpp" line="+177"/>
+ <source>Error registering documentation file &apos;%1&apos;: %2</source>
+ <translation>Beim Registrieren der Dokumentationsdatei &apos;%1&apos; trat ein Fehler auf: %2</translation>
+ </message>
+ <message>
+ <location line="+39"/>
+ <source>Error: %1</source>
+ <translation>Fehler: %1</translation>
+ </message>
+ <message>
+ <location line="+42"/>
+ <source>Could not register documentation file
+%1
+
+Reason:
+%2</source>
+ <translation>Dokumentationsdatei %1 kann nicht registriert werden
+
+Grund:
+%2</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Documentation successfully registered.</source>
+ <translation>Dokumentation erfolgreich registriert.</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Could not unregister documentation file
+%1
+
+Reason:
+%2</source>
+ <translation>Registrierung der Dokumentationsdatei %1 kann nicht aufgehoben werden
+
+Grund:
+%2</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Documentation successfully unregistered.</source>
+ <translation>Dokumentation erfolgreich entfernt.</translation>
+ </message>
+ <message>
+ <location line="+55"/>
+ <source>Error reading collection file &apos;%1&apos;: %2.</source>
+ <translation>Fehler beim Lesen der Katalogdatei &apos;%1&apos;: %2</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Error creating collection file &apos;%1&apos;: %2.</source>
+ <translation>Fehler beim Erstellen der Katalogdatei &apos;%1&apos;: %2.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Error reading collection file &apos;%1&apos;: %2</source>
+ <translation>Fehler beim Lesen der Katalogdatei &apos;%1&apos;: %2</translation>
+ </message>
+ <message>
+ <location line="+53"/>
+ <source>Cannot load sqlite database driver!</source>
+ <translation>Der Datenbanktreiber für SQLite kann nicht geladen werden.</translation>
+ </message>
+</context>
+<context>
<name>BookmarkDialog</name>
<message>
<location filename="../tools/assistant/tools/assistant/bookmarkdialog.ui"/>
@@ -52,39 +119,20 @@
<translation>Neuer Ordner</translation>
</message>
<message>
- <location filename="../tools/assistant/tools/assistant/bookmarkmanager.cpp" line="+184"/>
- <location line="+18"/>
- <location line="+39"/>
- <location line="+18"/>
- <location line="+30"/>
- <source>Bookmarks</source>
- <translation>Lesezeichen</translation>
- </message>
- <message>
- <location filename="../tools/assistant/tools/assistant/bookmarkdialog.ui"/>
+ <location/>
<source>+</source>
<translation>+</translation>
</message>
- <message>
- <location filename="../tools/assistant/tools/assistant/bookmarkmanager.cpp" line="-61"/>
- <source>Delete Folder</source>
- <translation>Ordner löschen</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Rename Folder</source>
- <translation>Ordner umbenennen</translation>
- </message>
</context>
<context>
<name>BookmarkManager</name>
<message>
- <location line="+435"/>
- <source>Bookmarks</source>
- <translation>Lesezeichen</translation>
+ <location filename="../tools/assistant/tools/assistant/bookmarkmanager.cpp" line="+151"/>
+ <source>Untitled</source>
+ <translation>Ohne Titel</translation>
</message>
<message>
- <location line="+37"/>
+ <location line="+65"/>
<source>Remove</source>
<translation>Entfernen</translation>
</message>
@@ -94,26 +142,22 @@
<translation>Wenn Sie diesen Ordner löschen, wird auch&lt;br&gt;dessen kompletter Inhalt gelöscht. Möchten Sie wirklich fortfahren?</translation>
</message>
<message>
- <location line="+143"/>
- <location line="+9"/>
- <source>New Folder</source>
- <translation>Neuer Ordner</translation>
+ <location line="+147"/>
+ <source>Manage Bookmarks...</source>
+ <translation>Lesezeichen verwalten...</translation>
</message>
-</context>
-<context>
- <name>BookmarkWidget</name>
<message>
- <location line="-417"/>
- <source>Filter:</source>
- <translation>Filter:</translation>
+ <location line="+2"/>
+ <source>Add Bookmark...</source>
+ <translation>Lesezeichen hinzufügen ...</translation>
</message>
<message>
- <location line="+33"/>
- <source>Remove</source>
- <translation>Entfernen</translation>
+ <location line="+1"/>
+ <source>Ctrl+D</source>
+ <translation>Ctrl+D</translation>
</message>
<message>
- <location line="-79"/>
+ <location line="+68"/>
<source>Delete Folder</source>
<translation>Ordner löschen</translation>
</message>
@@ -133,7 +177,7 @@
<translation>Lesezeichen in neuem Reiter öffnen</translation>
</message>
<message>
- <location line="+3"/>
+ <location line="+2"/>
<source>Delete Bookmark</source>
<translation>Lesezeichen löschen</translation>
</message>
@@ -142,16 +186,11 @@
<source>Rename Bookmark</source>
<translation>Lesezeichen umbenennen</translation>
</message>
- <message>
- <location line="+62"/>
- <source>Add</source>
- <translation>Hinzufügen</translation>
- </message>
</context>
<context>
<name>CentralWidget</name>
<message>
- <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="+239"/>
+ <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="+117"/>
<source>Add new page</source>
<translation>Neue Seite hinzufügen</translation>
</message>
@@ -161,18 +200,18 @@
<translation>Aktuelle Seite schließen</translation>
</message>
<message>
- <location line="+312"/>
+ <location line="+287"/>
<source>Print Document</source>
<translation>Drucken</translation>
</message>
<message>
- <location line="+130"/>
+ <location line="+126"/>
<location line="+2"/>
<source>unknown</source>
<translation>unbekannt</translation>
</message>
<message>
- <location line="+93"/>
+ <location line="+100"/>
<source>Add New Page</source>
<translation>Neue Seite hinzufügen</translation>
</message>
@@ -192,15 +231,78 @@
<translation>Lesezeichen für diese Seite hinzufügen ...</translation>
</message>
<message>
- <location line="+235"/>
+ <location line="+264"/>
<source>Search</source>
<translation>Suchen</translation>
</message>
</context>
<context>
+ <name>CmdLineParser</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/cmdlineparser.cpp" line="+137"/>
+ <source>Unknown option: %1</source>
+ <translation>Unbekannte Option: %1</translation>
+ </message>
+ <message>
+ <location line="+87"/>
+ <source>Unknown widget: %1</source>
+ <translation>Unbekanntes Widget-Objekt: %1</translation>
+ </message>
+ <message>
+ <location line="-54"/>
+ <source>The collection file &apos;%1&apos; does not exist.</source>
+ <translation>Die Katalogdatei &apos;%1&apos; existiert nicht.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Missing collection file.</source>
+ <translation>Fehlende Katalogdatei.</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Invalid URL &apos;%1&apos;.</source>
+ <translation>Ungültige URL &apos;%1&apos;.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Missing URL.</source>
+ <translation>Fehlende URL.</translation>
+ </message>
+ <message>
+ <location line="+38"/>
+ <source>Missing widget.</source>
+ <translation>Fehlendes Widget-Objekt.</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>The Qt help file &apos;%1&apos; does not exist.</source>
+ <translation>Die Hilfedatei &apos;%1&apos; existiert nicht.</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Missing help file.</source>
+ <translation>Fehlende Hilfedatei.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Missing filter argument.</source>
+ <translation>Das Filter-Argument fehlt.</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Error</source>
+ <translation>Fehler</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Notice</source>
+ <translation>Hinweis</translation>
+ </message>
+</context>
+<context>
<name>ContentWindow</name>
<message>
- <location filename="../tools/assistant/tools/assistant/contentwindow.cpp" line="+158"/>
+ <location filename="../tools/assistant/tools/assistant/contentwindow.cpp" line="+171"/>
<source>Open Link</source>
<translation>Link öffnen</translation>
</message>
@@ -224,34 +326,6 @@
</message>
</context>
<context>
- <name>FindWidget</name>
- <message>
- <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="-918"/>
- <source>Previous</source>
- <translation>Zurück</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Next</source>
- <translation>Weiter</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Case Sensitive</source>
- <translation>Groß-/Kleinschreibung beachten</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Whole words</source>
- <translation>Ganze Wörter</translation>
- </message>
- <message>
- <location line="+12"/>
- <source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
- <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Seitenende</translation>
- </message>
-</context>
-<context>
<name>FontPanel</name>
<message>
<location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/>
@@ -282,52 +356,25 @@
<context>
<name>HelpViewer</name>
<message>
- <location filename="../tools/assistant/tools/assistant/helpviewer.cpp" line="+489"/>
- <source>Help</source>
- <translation>Hilfe</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>OK</source>
- <translation>OK</translation>
+ <location filename="../tools/assistant/tools/assistant/helpviewer.cpp" line="+56"/>
+ <source>&lt;title&gt;about:blank&lt;/title&gt;</source>
+ <translation>&lt;title&gt;about:blank&lt;/title&gt;</translation>
</message>
<message>
- <location line="-62"/>
+ <location line="+6"/>
<source>&lt;title&gt;Error 404...&lt;/title&gt;&lt;div align=&quot;center&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
<translation>&lt;title&gt;Fehler 404 ...&lt;/title&gt;&lt;div align=&quot;center&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;h1&gt;Die Seite kann nicht gefunden werden.&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</translation>
</message>
- <message>
- <location line="+125"/>
- <source>Copy &amp;Link Location</source>
- <translation>&amp;Link-Adresse kopieren</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Open Link in New Tab Ctrl+LMB</source>
- <translation>Link in neuem Reiter öffnen </translation>
- </message>
- <message>
- <location line="-275"/>
- <source>Open Link in New Tab</source>
- <translation>Link in neuem Reiter öffnen</translation>
- </message>
- <message>
- <location line="+209"/>
- <source>Unable to launch external application.
-</source>
- <translation>Fehler beim Starten der externen Anwendung.
-</translation>
- </message>
</context>
<context>
<name>IndexWindow</name>
<message>
- <location filename="../tools/assistant/tools/assistant/indexwindow.cpp" line="+66"/>
+ <location filename="../tools/assistant/tools/assistant/indexwindow.cpp" line="+68"/>
<source>&amp;Look for:</source>
<translation>Suchen &amp;nach:</translation>
</message>
<message>
- <location line="+68"/>
+ <location line="+74"/>
<source>Open Link</source>
<translation>Link öffnen</translation>
</message>
@@ -341,29 +388,29 @@
<name>InstallDialog</name>
<message>
<location filename="../tools/assistant/tools/assistant/installdialog.ui"/>
- <location filename="../tools/assistant/tools/assistant/installdialog.cpp" line="+76"/>
+ <location filename="../tools/assistant/tools/assistant/installdialog.cpp" line="+78"/>
<source>Install Documentation</source>
<translation>Dokumentation installieren</translation>
</message>
<message>
- <location filename="../tools/assistant/tools/assistant/installdialog.cpp" line="+30"/>
+ <location filename="../tools/assistant/tools/assistant/installdialog.cpp" line="+33"/>
<source>Downloading documentation info...</source>
<translation>Dokumentationsinformation herunterladen ...</translation>
</message>
<message>
- <location line="+48"/>
+ <location line="+51"/>
<source>Download canceled.</source>
<translation>Herunterladen abgebrochen.</translation>
</message>
<message>
- <location line="+26"/>
- <location line="+78"/>
+ <location line="+28"/>
+ <location line="+79"/>
<location line="+27"/>
<source>Done.</source>
<translation>Fertig.</translation>
</message>
<message>
- <location line="-90"/>
+ <location line="-91"/>
<source>The file %1 already exists. Do you want to overwrite it?</source>
<translation>Die Datei %1 existiert bereits. Möchten Sie sie überschreiben?</translation>
</message>
@@ -378,14 +425,14 @@
<translation>Herunterladen der Datei %1 ...</translation>
</message>
<message>
- <location line="+19"/>
+ <location line="+20"/>
<location line="+42"/>
- <location line="+38"/>
+ <location line="+40"/>
<source>Download failed: %1.</source>
<translation>Herunterladen fehlgeschlagen: %1.</translation>
</message>
<message>
- <location line="-70"/>
+ <location line="-72"/>
<source>Documentation info file is corrupt!</source>
<translation>Die Dokumentationsdatei ist beschädigt.</translation>
</message>
@@ -400,7 +447,7 @@
<translation>Dokumentation %1 installieren ...</translation>
</message>
<message>
- <location line="+22"/>
+ <location line="+23"/>
<source>Error while installing documentation:
%1</source>
<translation>Fehler bei der Installation von:
@@ -440,20 +487,20 @@
<context>
<name>MainWindow</name>
<message>
- <location filename="../tools/assistant/tools/assistant/mainwindow.cpp" line="+110"/>
- <location line="+383"/>
+ <location filename="../tools/assistant/tools/assistant/mainwindow.cpp" line="+123"/>
+ <location line="+366"/>
<source>Index</source>
<translation>Index</translation>
</message>
<message>
- <location line="-377"/>
- <location line="+375"/>
+ <location line="-360"/>
+ <location line="+358"/>
<source>Contents</source>
<translation>Inhalt</translation>
</message>
<message>
- <location line="-370"/>
- <location line="+374"/>
+ <location line="-351"/>
+ <location line="+355"/>
<source>Bookmarks</source>
<translation>Lesezeichen</translation>
</message>
@@ -463,20 +510,14 @@
<translation>Suchen</translation>
</message>
<message>
- <location line="-364"/>
- <location line="+207"/>
- <location line="+514"/>
+ <location line="-335"/>
+ <location line="+672"/>
+ <location line="+284"/>
<source>Qt Assistant</source>
<translation>Qt Assistant</translation>
</message>
<message>
- <location line="-546"/>
- <location line="+5"/>
- <source>Unfiltered</source>
- <translation>Ohne Filter</translation>
- </message>
- <message>
- <location line="+107"/>
+ <location line="-702"/>
<source>Page Set&amp;up...</source>
<translation>S&amp;eite einrichten ...</translation>
</message>
@@ -506,7 +547,12 @@
<translation>&amp;Beenden</translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+3"/>
+ <source>CTRL+Q</source>
+ <translation>CTRL+Q</translation>
+ </message>
+ <message>
+ <location line="+6"/>
<source>&amp;Copy selected Text</source>
<translation>Ausgewählten Text &amp;kopieren</translation>
</message>
@@ -616,12 +662,12 @@
<translation>Ctrl+Alt+Left</translation>
</message>
<message>
- <location line="+4"/>
- <source>Add Bookmark...</source>
- <translation>Lesezeichen hinzufügen ...</translation>
+ <location line="+591"/>
+ <source>Could not register file &apos;%1&apos;: %2</source>
+ <translation>Die Datei &apos;%1&apos; konnte nicht registriert werden: %2</translation>
</message>
<message>
- <location line="+5"/>
+ <location line="-584"/>
<source>About...</source>
<translation>Ãœber ...</translation>
</message>
@@ -631,12 +677,12 @@
<translation>Navigationsleiste</translation>
</message>
<message>
- <location line="+76"/>
+ <location line="+69"/>
<source>Toolbars</source>
<translation>Werkzeugleisten</translation>
</message>
<message>
- <location line="+15"/>
+ <location line="+16"/>
<source>Filter Toolbar</source>
<translation>Filterleiste</translation>
</message>
@@ -646,7 +692,7 @@
<translation>Filter:</translation>
</message>
<message>
- <location line="+25"/>
+ <location line="+26"/>
<source>Address Toolbar</source>
<translation>Adressleiste</translation>
</message>
@@ -656,27 +702,27 @@
<translation>Adresse:</translation>
</message>
<message>
- <location line="+114"/>
+ <location line="+112"/>
<source>Could not find the associated content item.</source>
<translation>Der zugehörige Inhaltseintrag konnte nicht gefunden werden.</translation>
</message>
<message>
- <location line="+71"/>
+ <location line="+60"/>
<source>About %1</source>
<translation>Ãœber %1</translation>
</message>
<message>
- <location line="+114"/>
+ <location line="+175"/>
<source>Updating search index</source>
<translation>Suchindex wird aufgebaut</translation>
</message>
<message>
- <location line="-640"/>
+ <location line="-661"/>
<source>Looking for Qt Documentation...</source>
<translation>Suche nach Qt-Dokumentation ...</translation>
</message>
<message>
- <location line="+241"/>
+ <location line="+219"/>
<source>&amp;Window</source>
<translation>&amp;Fenster</translation>
</message>
@@ -696,12 +742,12 @@
<translation>Zoom</translation>
</message>
<message>
- <location line="-159"/>
+ <location line="-161"/>
<source>&amp;File</source>
<translation>&amp;Datei</translation>
</message>
<message>
- <location line="+25"/>
+ <location line="+29"/>
<source>&amp;Edit</source>
<translation>&amp;Bearbeiten</translation>
</message>
@@ -721,41 +767,36 @@
<translation>ALT+Home</translation>
</message>
<message>
- <location line="+29"/>
+ <location line="+30"/>
<source>&amp;Bookmarks</source>
<translation>&amp;Lesezeichen</translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+2"/>
<source>&amp;Help</source>
<translation>&amp;Hilfe</translation>
</message>
<message>
- <location line="-40"/>
+ <location line="-38"/>
<source>ALT+O</source>
<translation>ALT+O</translation>
</message>
- <message>
- <location line="+38"/>
- <source>CTRL+D</source>
- <translation>CTRL+D</translation>
- </message>
</context>
<context>
<name>PreferencesDialog</name>
<message>
- <location filename="../tools/assistant/tools/assistant/preferencesdialog.cpp" line="+259"/>
- <location line="+43"/>
+ <location filename="../tools/assistant/tools/assistant/preferencesdialog.cpp" line="+252"/>
+ <location line="+44"/>
<source>Add Documentation</source>
<translation>Dokumentation hinzufügen</translation>
</message>
<message>
- <location line="-43"/>
+ <location line="-44"/>
<source>Qt Compressed Help Files (*.qch)</source>
<translation>Komprimierte Hilfedateien (*.qch)</translation>
</message>
<message>
- <location line="+37"/>
+ <location line="+38"/>
<source>The specified file is not a valid Qt Help File!</source>
<translation>Die angegebene Datei ist keine Qt-Hilfedatei.</translation>
</message>
@@ -765,7 +806,7 @@
<translation>Der Namespace %1 ist bereits registriert.</translation>
</message>
<message>
- <location line="+31"/>
+ <location line="+32"/>
<source>Remove Documentation</source>
<translation>Dokumentation entfernen</translation>
</message>
@@ -785,7 +826,7 @@
<translation>OK</translation>
</message>
<message>
- <location line="+88"/>
+ <location line="+83"/>
<source>Use custom settings</source>
<translation>Benutzerdefinierte Einstellungen verwenden</translation>
</message>
@@ -909,118 +950,9 @@
</message>
</context>
<context>
- <name>QObject</name>
- <message>
- <location filename="../tools/assistant/tools/assistant/cmdlineparser.cpp" line="+112"/>
- <source>The specified collection file does not exist!</source>
- <translation>Die angegebene Katalogdatei (collection file) kann nicht gefunden werden.</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Missing collection file!</source>
- <translation>Fehlende Katalogdatei.</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>Invalid URL!</source>
- <translation>Ungültige URL.</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Missing URL!</source>
- <translation>Fehlende URL.</translation>
- </message>
- <message>
- <location line="+17"/>
- <location line="+19"/>
- <location line="+19"/>
- <source>Unknown widget: %1</source>
- <translation>Unbekanntes Objekt: %1</translation>
- </message>
- <message>
- <location line="-34"/>
- <location line="+19"/>
- <location line="+19"/>
- <source>Missing widget!</source>
- <translation>Fehlendes Objekt.</translation>
- </message>
- <message>
- <location line="+7"/>
- <location line="+12"/>
- <source>The specified Qt help file does not exist!</source>
- <translation>Die angegebene Hilfedatei kann nicht gefunden werden.</translation>
- </message>
- <message>
- <location line="-7"/>
- <location line="+12"/>
- <source>Missing help file!</source>
- <translation>Fehlende Hilfedatei.</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Missing filter argument!</source>
- <translation>Das Filter-Argument fehlt.</translation>
- </message>
- <message>
- <location line="+12"/>
- <source>Unknown option: %1</source>
- <translation>Unbekannte Option: %1</translation>
- </message>
- <message>
- <location line="+30"/>
- <location line="+2"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location filename="../tools/assistant/tools/assistant/main.cpp" line="+225"/>
- <source>Could not register documentation file
-%1
-
-Reason:
-%2</source>
- <translation>Dokumentationsdatei %1 kann nicht registriert werden
-
-Grund:
-%2</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Documentation successfully registered.</source>
- <translation>Dokumentation erfolgreich registriert.</translation>
- </message>
- <message>
- <location line="+11"/>
- <source>Could not unregister documentation file
-%1
-
-Reason:
-%2</source>
- <translation>Registrierung der Dokumentationsdatei %1 kann nicht aufgehoben werden
-
-Grund:
-%2</translation>
- </message>
- <message>
- <location line="-3"/>
- <source>Documentation successfully unregistered.</source>
- <translation>Dokumentation erfolgreich entfernt.</translation>
- </message>
- <message>
- <location line="+40"/>
- <source>Cannot load sqlite database driver!</source>
- <translation>Der Datenbanktreiber für SQLite kann nicht geladen werden.</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>The specified collection file could not be read!</source>
- <translation>Die angegebene Katalogdatei (collection file) kann nicht gelesen werden.</translation>
- </message>
-</context>
-<context>
<name>RemoteControl</name>
<message>
- <location filename="../tools/assistant/tools/assistant/remotecontrol.cpp" line="+163"/>
+ <location filename="../tools/assistant/tools/assistant/remotecontrol.cpp" line="+165"/>
<source>Debugging Remote Control</source>
<translation>Debugging Remote Control</translation>
</message>
@@ -1033,7 +965,7 @@ Grund:
<context>
<name>SearchWidget</name>
<message>
- <location filename="../tools/assistant/tools/assistant/searchwidget.cpp" line="+196"/>
+ <location filename="../tools/assistant/tools/assistant/searchwidget.cpp" line="+210"/>
<source>&amp;Copy</source>
<translation>&amp;Kopieren</translation>
</message>
@@ -1056,7 +988,7 @@ Grund:
<context>
<name>TopicChooser</name>
<message>
- <location filename="../tools/assistant/tools/assistant/topicchooser.cpp" line="+54"/>
+ <location filename="../tools/assistant/tools/assistant/topicchooser.cpp" line="+53"/>
<source>Choose a topic for &lt;b&gt;%1&lt;/b&gt;:</source>
<translation>Wählen Sie ein Thema für &lt;b&gt;%1&lt;/b&gt;:</translation>
</message>
diff --git a/translations/assistant_hu.ts b/translations/assistant_hu.ts
new file mode 100644
index 0000000000..e43070cc1c
--- /dev/null
+++ b/translations/assistant_hu.ts
@@ -0,0 +1,1083 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="hu">
+<context>
+ <name>AboutDialog</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/aboutdialog.cpp" line="+110"/>
+ <source>&amp;Close</source>
+ <translation>&amp;Bezárás</translation>
+ </message>
+</context>
+<context>
+ <name>AboutLabel</name>
+ <message>
+ <location line="-14"/>
+ <source>Warning</source>
+ <translation>Figyelmeztetés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Unable to launch external application.
+</source>
+ <translation>Nem lehet külső alkalmazást elindítani.</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>OK</source>
+ <translation>OK</translation>
+ </message>
+</context>
+<context>
+ <name>BookmarkDialog</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/bookmarkdialog.ui"/>
+ <source>Add Bookmark</source>
+ <translation>Könyvjelző hozzáadása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Bookmark:</source>
+ <translation>Könyvjelző:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Add in Folder:</source>
+ <translation>Hozzáadás dossziéban:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>New Folder</source>
+ <translation>Új dosszié</translation>
+ </message>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/bookmarkmanager.cpp" line="+184"/>
+ <location line="+18"/>
+ <location line="+39"/>
+ <location line="+18"/>
+ <location line="+30"/>
+ <source>Bookmarks</source>
+ <translation>Könyvjelzők</translation>
+ </message>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/bookmarkdialog.ui"/>
+ <source>+</source>
+ <translation>+</translation>
+ </message>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/bookmarkmanager.cpp" line="-61"/>
+ <source>Delete Folder</source>
+ <translation>Dosszié törlése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Rename Folder</source>
+ <translation>Dosszié átnevezése</translation>
+ </message>
+</context>
+<context>
+ <name>BookmarkManager</name>
+ <message>
+ <location line="+435"/>
+ <source>Bookmarks</source>
+ <translation>Könyvjelzők</translation>
+ </message>
+ <message>
+ <location line="+37"/>
+ <source>Remove</source>
+ <translation>Ãthelyezés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>You are going to delete a Folder, this will also&lt;br&gt;remove it&apos;s content. Are you sure to continue?</source>
+ <translation>Egy olyan dossziét fog törölni, ami &lt;br&gt; törli annak tartalmát is. Biztos benne, hogy folytatja?</translation>
+ </message>
+ <message>
+ <location line="+143"/>
+ <location line="+9"/>
+ <source>New Folder</source>
+ <translation>Új Dosszié</translation>
+ </message>
+</context>
+<context>
+ <name>BookmarkWidget</name>
+ <message>
+ <location line="-417"/>
+ <source>Filter:</source>
+ <translation>Szűrő:</translation>
+ </message>
+ <message>
+ <location line="+33"/>
+ <source>Remove</source>
+ <translation>Eltávolítás</translation>
+ </message>
+ <message>
+ <location line="-79"/>
+ <source>Delete Folder</source>
+ <translation>Dosszié törlése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Rename Folder</source>
+ <translation>Dosszié átnevezése</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Show Bookmark</source>
+ <translation>Könyvjelző megjelenítése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Show Bookmark in New Tab</source>
+ <translation>Könyvjelző megjelenítése új lapon</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Delete Bookmark</source>
+ <translation>Könyvjelző törlése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Rename Bookmark</source>
+ <translation>Könyvjelző átnevezése</translation>
+ </message>
+ <message>
+ <location line="+62"/>
+ <source>Add</source>
+ <translation>Hozzáadás</translation>
+ </message>
+</context>
+<context>
+ <name>CentralWidget</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="+239"/>
+ <source>Add new page</source>
+ <translation>Új lap hozzáadása</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Close current page</source>
+ <translation>Aktuális lap bezárása</translation>
+ </message>
+ <message>
+ <location line="+312"/>
+ <source>Print Document</source>
+ <translation>Dokumentum nyomtatása</translation>
+ </message>
+ <message>
+ <location line="+130"/>
+ <location line="+2"/>
+ <source>unknown</source>
+ <translation>ismeretlen</translation>
+ </message>
+ <message>
+ <location line="+93"/>
+ <source>Add New Page</source>
+ <translation>Új lap hozzáadása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Close This Page</source>
+ <translation>Lap bezárása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Close Other Pages</source>
+ <translation>Többi lap bezárása</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Add Bookmark for this Page...</source>
+ <translation>Könyvjelző hozzáadása ehhez a laphoz...</translation>
+ </message>
+ <message>
+ <location line="+235"/>
+ <source>Search</source>
+ <translation>Keresés</translation>
+ </message>
+</context>
+<context>
+ <name>ContentWindow</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/contentwindow.cpp" line="+158"/>
+ <source>Open Link</source>
+ <translation>Link megnyitása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Open Link in New Tab</source>
+ <translation>Link megnyitása új lapon</translation>
+ </message>
+</context>
+<context>
+ <name>FilterNameDialogClass</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/filternamedialog.ui"/>
+ <source>Add Filter Name</source>
+ <translation>Szűrő név hozzáadása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Filter Name:</source>
+ <translation>Szűrő név:</translation>
+ </message>
+</context>
+<context>
+ <name>FindWidget</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="-918"/>
+ <source>Previous</source>
+ <translation>Előző</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Next</source>
+ <translation>Következő</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Case Sensitive</source>
+ <translation>Kis és nagybetű érzékeny</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Whole words</source>
+ <translation>Egész szavakat</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
+ <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Keresés tördelése</translation>
+ </message>
+</context>
+<context>
+ <name>FontPanel</name>
+ <message>
+ <location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/>
+ <source>Font</source>
+ <translation>Betű</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>&amp;Writing system</source>
+ <translation>Rendszer &amp;írása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Family</source>
+ <translation>&amp;Család</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>&amp;Style</source>
+ <translation>&amp;Stílus</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>&amp;Point size</source>
+ <translation>&amp;Pont méret</translation>
+ </message>
+</context>
+<context>
+ <name>HelpViewer</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/helpviewer.cpp" line="+489"/>
+ <source>Help</source>
+ <translation>Segítség</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>OK</source>
+ <translation>OK</translation>
+ </message>
+ <message>
+ <location line="-62"/>
+ <source>&lt;title&gt;Error 404...&lt;/title&gt;&lt;div align=&quot;center&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
+ <translation>&lt;title&gt;404-es hiba...&lt;/title&gt;&lt;div align=&quot;center&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;h1&gt;A lap nem található &lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</translation>
+ </message>
+ <message>
+ <location line="+125"/>
+ <source>Copy &amp;Link Location</source>
+ <translation>&amp;Link címének másolása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Open Link in New Tab Ctrl+LMB</source>
+ <translation>Link megnyitása új lapon Ctrl+LMB</translation>
+ </message>
+ <message>
+ <location line="-275"/>
+ <source>Open Link in New Tab</source>
+ <translation>Link megnyitása új lapon</translation>
+ </message>
+ <message>
+ <location line="+209"/>
+ <source>Unable to launch external application.
+</source>
+ <translation>Nem lehet külső alkalmazást indítani.</translation>
+ </message>
+</context>
+<context>
+ <name>IndexWindow</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/indexwindow.cpp" line="+66"/>
+ <source>&amp;Look for:</source>
+ <translation>&amp;Keresés:</translation>
+ </message>
+ <message>
+ <location line="+68"/>
+ <source>Open Link</source>
+ <translation>Link megnyitása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Open Link in New Tab</source>
+ <translation>Link megnyitása új lapon</translation>
+ </message>
+</context>
+<context>
+ <name>InstallDialog</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/installdialog.ui"/>
+ <location filename="../tools/assistant/tools/assistant/installdialog.cpp" line="+76"/>
+ <source>Install Documentation</source>
+ <translation></translation>
+ </message>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/installdialog.cpp" line="+30"/>
+ <source>Downloading documentation info...</source>
+ <translation>Dokumentum információ letöltése...</translation>
+ </message>
+ <message>
+ <location line="+48"/>
+ <source>Download canceled.</source>
+ <translation>Letöltés vmegszakítva.</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <location line="+78"/>
+ <location line="+27"/>
+ <source>Done.</source>
+ <translation>Kész.</translation>
+ </message>
+ <message>
+ <location line="-90"/>
+ <source>The file %1 already exists. Do you want to overwrite it?</source>
+ <translation>A(z) %1 fájl már létezik. Felül szeretné írni?</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Unable to save the file %1: %2.</source>
+ <translation>Nem lehet elmenteni a(z) %1 fájlt: %2.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Downloading %1...</source>
+ <translation>%1 letöltése...</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <location line="+42"/>
+ <location line="+38"/>
+ <source>Download failed: %1.</source>
+ <translation>Nem sikerült a letöltés: %1.</translation>
+ </message>
+ <message>
+ <location line="-70"/>
+ <source>Documentation info file is corrupt!</source>
+ <translation>Dokumentum információ sérült!</translation>
+ </message>
+ <message>
+ <location line="+37"/>
+ <source>Download failed: Downloaded file is corrupted.</source>
+ <translation>Nem sikerült letölteni: A letöltött fájl sérült.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Installing documentation %1...</source>
+ <translation>%1 dokumentáció telepítése...</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Error while installing documentation:
+%1</source>
+ <translation>Hiba történt a dokumentáció telepítése közben: %1</translation>
+ </message>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/installdialog.ui"/>
+ <source>Available Documentation:</source>
+ <translation>Elérhető dokumentáció:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Install</source>
+ <translation>Telepítés</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Cancel</source>
+ <translation>Mégse</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Close</source>
+ <translation>Bezárás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Installation Path:</source>
+ <translation>Telepítési útvonal:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>...</source>
+ <translation>...</translation>
+ </message>
+</context>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/mainwindow.cpp" line="+110"/>
+ <location line="+383"/>
+ <source>Index</source>
+ <translation>Index</translation>
+ </message>
+ <message>
+ <location line="-377"/>
+ <location line="+375"/>
+ <source>Contents</source>
+ <translation>Tartalom</translation>
+ </message>
+ <message>
+ <location line="-370"/>
+ <location line="+374"/>
+ <source>Bookmarks</source>
+ <translation>Könyvjelzők</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Search</source>
+ <translation>Keresés</translation>
+ </message>
+ <message>
+ <location line="-364"/>
+ <location line="+207"/>
+ <location line="+514"/>
+ <source>Qt Assistant</source>
+ <translation>Qt Assistant</translation>
+ </message>
+ <message>
+ <location line="-546"/>
+ <location line="+5"/>
+ <source>Unfiltered</source>
+ <translation>Szűrés nélküli</translation>
+ </message>
+ <message>
+ <location line="+107"/>
+ <source>Page Set&amp;up...</source>
+ <translation>Lap Beállí&amp;tás...</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Print Preview...</source>
+ <translation>Nyomtatási előnézet...</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Print...</source>
+ <translation>&amp;Nyomtatás...</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>New &amp;Tab</source>
+ <translation>Új &amp;Lap</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Close Tab</source>
+ <translation>Lap &amp;bezárása</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>&amp;Quit</source>
+ <translation>&amp;Kilépés</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&amp;Copy selected Text</source>
+ <translation>Kiválasztott szöveg &amp;másolása</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>&amp;Find in Text...</source>
+ <translation>&amp;Keresés szövegben...</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>&amp;Find</source>
+ <translation>&amp;Keresés</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Find &amp;Next</source>
+ <translation>&amp;Következő keresés</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Find &amp;Previous</source>
+ <translation>&amp;Előző keresés</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Preferences...</source>
+ <translation>Beállítások...</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Zoom &amp;in</source>
+ <translation>&amp;Nagyítás</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Zoom &amp;out</source>
+ <translation>&amp;Kicsinyítés</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Normal &amp;Size</source>
+ <translation>Normál &amp;méret</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Ctrl+0</source>
+ <translation>Ctrl + 0</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>ALT+C</source>
+ <translation>ALT + C</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>ALT+I</source>
+ <translation>ALT + l</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>ALT+S</source>
+ <translation>ALT + S</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Home</source>
+ <translation>&amp;Otthon</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>&amp;Back</source>
+ <translation>&amp;Vissza</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&amp;Forward</source>
+ <translation>&amp;Előre</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Sync with Table of Contents</source>
+ <translation>Tartalomjegyzékkel való szinkronizálás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Sync</source>
+ <translation>Szinkronizálás</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Next Page</source>
+ <translation>Következő lap</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Ctrl+Alt+Right</source>
+ <translation>Ctrl+Alt+Right</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Previous Page</source>
+ <translation>Előző lap</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Ctrl+Alt+Left</source>
+ <translation>Ctrl+Alt+Left</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Add Bookmark...</source>
+ <translation>Könyvjelző hozzáadása...</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>About...</source>
+ <translation>Névjegy...</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Navigation Toolbar</source>
+ <translation>Navigációs eszköztár</translation>
+ </message>
+ <message>
+ <location line="+76"/>
+ <source>Toolbars</source>
+ <translation>Eszköztár</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Filter Toolbar</source>
+ <translation>Eszköztár szűrő</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Filtered by:</source>
+ <translation>Szűrési feltétel:</translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>Address Toolbar</source>
+ <translation>Eszköztár cím</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Address:</source>
+ <translation>Cím:</translation>
+ </message>
+ <message>
+ <location line="+114"/>
+ <source>Could not find the associated content item.</source>
+ <translation>Nem sikerült az összekapcsolt tartalom elemet megtalálni.</translation>
+ </message>
+ <message>
+ <location line="+71"/>
+ <source>About %1</source>
+ <translation>%1-ről</translation>
+ </message>
+ <message>
+ <location line="+114"/>
+ <source>Updating search index</source>
+ <translation>Keresési index frissítése</translation>
+ </message>
+ <message>
+ <location line="-640"/>
+ <source>Looking for Qt Documentation...</source>
+ <translation>Qt dokumentáció keresése...</translation>
+ </message>
+ <message>
+ <location line="+241"/>
+ <source>&amp;Window</source>
+ <translation>&amp;Ablak</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Minimize</source>
+ <translation>Minimalizálás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Ctrl+M</source>
+ <translation>Ctrl + M</translation>
+ </message>
+ <message>
+ <location line="-2"/>
+ <source>Zoom</source>
+ <translation>Zoomolás</translation>
+ </message>
+ <message>
+ <location line="-159"/>
+ <source>&amp;File</source>
+ <translation>&amp;Fájl</translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>&amp;Edit</source>
+ <translation>&amp;Szerkesztés</translation>
+ </message>
+ <message>
+ <location line="+27"/>
+ <source>&amp;View</source>
+ <translation>&amp;Nézet</translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>&amp;Go</source>
+ <translation>&amp;Gyerünk</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>ALT+Home</source>
+ <translation>ALT+Home</translation>
+ </message>
+ <message>
+ <location line="+29"/>
+ <source>&amp;Bookmarks</source>
+ <translation>&amp;Könyvjelzők</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&amp;Help</source>
+ <translation>&amp;Segítség</translation>
+ </message>
+ <message>
+ <location line="-40"/>
+ <source>ALT+O</source>
+ <translation>ALT + 0</translation>
+ </message>
+ <message>
+ <location line="+38"/>
+ <source>CTRL+D</source>
+ <translation>CTRL+D</translation>
+ </message>
+</context>
+<context>
+ <name>PreferencesDialog</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/preferencesdialog.cpp" line="+259"/>
+ <location line="+43"/>
+ <source>Add Documentation</source>
+ <translation>Dokumentáció hozzáadása</translation>
+ </message>
+ <message>
+ <location line="-43"/>
+ <source>Qt Compressed Help Files (*.qch)</source>
+ <translation>Qt tömörített súgó fájlok (*.qch)</translation>
+ </message>
+ <message>
+ <location line="+37"/>
+ <source>The specified file is not a valid Qt Help File!</source>
+ <translation>A meghatározott fájl egy érvénytelen Qt Súgó fájl!</translation>
+ </message>
+ <message>
+ <location line="-8"/>
+ <source>The namespace %1 is already registered!</source>
+ <translation>A(z) %1 névtér már regisztrálva van!</translation>
+ </message>
+ <message>
+ <location line="+31"/>
+ <source>Remove Documentation</source>
+ <translation>Dokumentáció eltávolítása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Some documents currently opened in Assistant reference the documentation you are attempting to remove. Removing the documentation will close those documents.</source>
+ <translation>Néhány dokumentum jelenleg az Assistant hivatkozásban lett megnyitva, amely az a dokumentum, amit megpróbál eltávolítani. A dokumentum eltávolítása be fogja zárni azokat a dokumentumokat.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Cancel</source>
+ <translation>Mégse</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>OK</source>
+ <translation>OK</translation>
+ </message>
+ <message>
+ <location line="+88"/>
+ <source>Use custom settings</source>
+ <translation>Szokásos beállítások használata</translation>
+ </message>
+</context>
+<context>
+ <name>PreferencesDialogClass</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/preferencesdialog.ui"/>
+ <source>Preferences</source>
+ <translation>Beállítások</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Fonts</source>
+ <translation>Betűk</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Font settings:</source>
+ <translation>Betű beállítások:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Browser</source>
+ <translation>Böngésző</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Application</source>
+ <translation>Alkalmazás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Filters</source>
+ <translation>Szűrők</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Filter:</source>
+ <translation>Szűrők:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Attributes:</source>
+ <translation>Attrubútumok:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>1</source>
+ <translation>1</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Add</source>
+ <translation>Hozzáadás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Remove</source>
+ <translation>Eltávolítás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Documentation</source>
+ <translation>Dokumentáció</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Registered Documentation:</source>
+ <translation>Regisztrált dokumentáció:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Add...</source>
+ <translation>Hozzáadás...</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Options</source>
+ <translation>Opciók</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Current Page</source>
+ <translation>Aktuális lap</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Restore to default</source>
+ <translation>Alapértelmezett beállítások visszaállítása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Homepage</source>
+ <translation>Honlap</translation>
+ </message>
+ <message>
+ <location/>
+ <source>On help start:</source>
+ <translation>Súgó indításra:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Show my home page</source>
+ <translation>Honlapom megjelenítése</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Show a blank page</source>
+ <translation>Egy üres lap megjelenítése</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Show my tabs from last session</source>
+ <translation>A lapjaim megjelenításe a legutolsó szakaszból</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Blank Page</source>
+ <translation>Ãœres lap</translation>
+ </message>
+</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/cmdlineparser.cpp" line="+112"/>
+ <source>The specified collection file does not exist!</source>
+ <translation>A meghatározott gyűjtemény fájl nem létezik!</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Missing collection file!</source>
+ <translation>Hiányzó gyűjtemény fájl!</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Invalid URL!</source>
+ <translation>Érvénytelen URL!</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Missing URL!</source>
+ <translation>Hiányzó URL!</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <location line="+19"/>
+ <location line="+19"/>
+ <source>Unknown widget: %1</source>
+ <translation>Ismeretlen widget: %1</translation>
+ </message>
+ <message>
+ <location line="-34"/>
+ <location line="+19"/>
+ <location line="+19"/>
+ <source>Missing widget!</source>
+ <translation>Hiányzó widget!</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <location line="+12"/>
+ <source>The specified Qt help file does not exist!</source>
+ <translation>A meghatározott Qt súgó fájl nem létezik!</translation>
+ </message>
+ <message>
+ <location line="-7"/>
+ <location line="+12"/>
+ <source>Missing help file!</source>
+ <translation>Hiányzó súgó fájl!</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Missing filter argument!</source>
+ <translation>Hiányzó szűrő argumentum!</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Unknown option: %1</source>
+ <translation>Ismeretlen opció: %1</translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <location line="+2"/>
+ <source>Qt Assistant</source>
+ <translation>Qt Assistant</translation>
+ </message>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/main.cpp" line="+225"/>
+ <source>Could not register documentation file
+%1
+
+Reason:
+%2</source>
+ <translation>Nem sikerült a dokumentációs fájl regisztrálása
+%1
+
+Ok:
+%2</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Documentation successfully registered.</source>
+ <translation>A dokumentáció regisztrálása sikeresen megtörtént.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Could not unregister documentation file
+%1
+
+Reason:
+%2</source>
+ <translation>Nem sikerült regisztrálni a dokumentációs fájlt
+%1
+
+Ok:
+%2</translation>
+ </message>
+ <message>
+ <location line="-3"/>
+ <source>Documentation successfully unregistered.</source>
+ <translation>Dokumentáció regisztrációjának megszűntetése sikeresen megtörtént.</translation>
+ </message>
+ <message>
+ <location line="+40"/>
+ <source>Cannot load sqlite database driver!</source>
+ <translation>Nem lehet betölteni az sqlite adatbázis vezérlőt!</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>The specified collection file could not be read!</source>
+ <translation>A meghatározott gyűjtemény fájlt nem lehet olvasni!</translation>
+ </message>
+</context>
+<context>
+ <name>RemoteControl</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/remotecontrol.cpp" line="+163"/>
+ <source>Debugging Remote Control</source>
+ <translation>Debuggolás Távoli Vezérlő</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Received Command: %1 %2</source>
+ <translation>Elfogadott parancs: %1 %2</translation>
+ </message>
+</context>
+<context>
+ <name>SearchWidget</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/searchwidget.cpp" line="+196"/>
+ <source>&amp;Copy</source>
+ <translation>&amp;Másolás</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Copy &amp;Link Location</source>
+ <translation>&amp;Link címének másolása</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Open Link in New Tab</source>
+ <translation>Link megnyitása új lapon</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Select All</source>
+ <translation>Az összes kiválasztása</translation>
+ </message>
+</context>
+<context>
+ <name>TopicChooser</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/topicchooser.cpp" line="+54"/>
+ <source>Choose a topic for &lt;b&gt;%1&lt;/b&gt;:</source>
+ <translation>Topik választása a következőhöz: &lt;b&gt;%1&lt;/b&gt;:</translation>
+ </message>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/topicchooser.ui"/>
+ <source>Choose Topic</source>
+ <translation>Topik választása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Topics</source>
+ <translation>&amp;Topikok</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Display</source>
+ <translation>&amp;Kijelzés</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Close</source>
+ <translation>&amp;Bezárás</translation>
+ </message>
+</context>
+</TS>
diff --git a/translations/designer_de.ts b/translations/designer_de.ts
index 8c1ba68335..475a5d542f 100644
--- a/translations/designer_de.ts
+++ b/translations/designer_de.ts
@@ -506,7 +506,7 @@
<translation>Werkzeugleiste löschen</translation>
</message>
<message>
- <location filename="../tools/designer/src/lib/shared/qdesigner_menu.cpp" line="+1195"/>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_menu.cpp" line="+1194"/>
<source>Set action text</source>
<translation>Text der Aktion setzen</translation>
</message>
@@ -621,7 +621,7 @@
<translation>Skript ändern</translation>
</message>
<message>
- <location filename="../tools/designer/src/lib/shared/qdesigner_propertycommand.cpp" line="+1213"/>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_propertycommand.cpp" line="+1225"/>
<source>Changed &apos;%1&apos; of &apos;%2&apos;</source>
<translation>&apos;%1&apos; von &apos;%2&apos; geändert</translation>
</message>
@@ -635,7 +635,7 @@
</translation>
</message>
<message>
- <location line="+76"/>
+ <location line="+84"/>
<source>Reset &apos;%1&apos; of &apos;%2&apos;</source>
<translation>&apos;%1&apos; von &apos;%2&apos; zurücksetzen</translation>
</message>
@@ -1109,7 +1109,7 @@
<context>
<name>FormWindow</name>
<message>
- <location filename="../tools/designer/src/components/formeditor/formwindow.cpp" line="+1701"/>
+ <location filename="../tools/designer/src/components/formeditor/formwindow.cpp" line="+1754"/>
<source>Unexpected element &lt;%1&gt;</source>
<translation>Ungültiges Element &lt;%1&gt;</translation>
</message>
@@ -1985,7 +1985,7 @@ Möchten Sie es noch einmal versuchen?</translation>
<context>
<name>QDesignerMenu</name>
<message>
- <location filename="../tools/designer/src/lib/shared/qdesigner_menu.cpp" line="-1181"/>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_menu.cpp" line="-1179"/>
<source>Type Here</source>
<translation>Geben Sie Text ein</translation>
</message>
@@ -2011,7 +2011,7 @@ Möchten Sie es noch einmal versuchen?</translation>
</message>
<message>
<location line="+27"/>
- <location line="+650"/>
+ <location line="+648"/>
<source>Add separator</source>
<translation>Trenner hinzufügen</translation>
</message>
@@ -2085,7 +2085,7 @@ Möchten Sie es noch einmal versuchen?</translation>
<context>
<name>QDesignerPropertySheet</name>
<message>
- <location filename="../tools/designer/src/lib/shared/qdesigner_propertysheet.cpp" line="+754"/>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_propertysheet.cpp" line="+755"/>
<source>Dynamic Properties</source>
<translation>Dynamische Eigenschaften</translation>
</message>
@@ -2456,7 +2456,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier
<context>
<name>QtBoolEdit</name>
<message>
- <location filename="../tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp" line="+247"/>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp" line="+255"/>
<location line="+10"/>
<location line="+25"/>
<source>True</source>
@@ -2472,7 +2472,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier
<context>
<name>QtBoolPropertyManager</name>
<message>
- <location filename="../tools/shared/qtpropertybrowser/qtpropertymanager.cpp" line="+1469"/>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertymanager.cpp" line="+1507"/>
<source>True</source>
<translation>Wahr</translation>
</message>
@@ -2501,7 +2501,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier
<context>
<name>QtColorPropertyManager</name>
<message>
- <location filename="../tools/shared/qtpropertybrowser/qtpropertymanager.cpp" line="+4750"/>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertymanager.cpp" line="+4718"/>
<source>Red</source>
<translation>Rot</translation>
</message>
@@ -2524,7 +2524,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier
<context>
<name>QtCursorDatabase</name>
<message>
- <location filename="../tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp" line="-226"/>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp" line="-234"/>
<source>Arrow</source>
<translation>Pfeil</translation>
</message>
@@ -3080,7 +3080,7 @@ Container-Seiten sollten ausschließlich im XML der domXML()-Methode spezifizier
<context>
<name>QtKeySequenceEdit</name>
<message>
- <location filename="../tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp" line="+241"/>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp" line="+249"/>
<source>Clear Shortcut</source>
<translation>Tastenkürzel löschen</translation>
</message>
@@ -3522,7 +3522,7 @@ Dies kann zum Beispiel eine Sprachkennung wie &quot;_de&quot; sein.</translation
<context>
<name>QtResourceViewDialog</name>
<message>
- <location line="+250"/>
+ <location line="+252"/>
<source>Select Resource</source>
<translation>Ressource auswählen</translation>
</message>
@@ -4034,7 +4034,7 @@ Möchten Sie sie überschreiben?</translation>
<context>
<name>qdesigner_internal::ActionModel</name>
<message>
- <location filename="../tools/designer/src/lib/shared/actionrepository.cpp" line="+95"/>
+ <location filename="../tools/designer/src/lib/shared/actionrepository.cpp" line="+89"/>
<source>Name</source>
<translation>Name</translation>
</message>
@@ -4727,7 +4727,7 @@ Möchten Sie sie überschreiben?</translation>
<context>
<name>qdesigner_internal::FormWindow</name>
<message>
- <location filename="../tools/designer/src/components/formeditor/formwindow.cpp" line="-1267"/>
+ <location filename="../tools/designer/src/components/formeditor/formwindow.cpp" line="-1322"/>
<source>Edit contents</source>
<translation>Ändern</translation>
</message>
@@ -4737,34 +4737,33 @@ Möchten Sie sie überschreiben?</translation>
<translation>F2</translation>
</message>
<message>
- <location line="+841"/>
+ <location line="+840"/>
<source>Resize</source>
<translation>Größe ändern</translation>
</message>
<message>
- <location line="+218"/>
- <location line="+15"/>
+ <location line="+248"/>
<source>Key Move</source>
<translation>Verschieben mittels Tastatur</translation>
</message>
<message>
- <location line="+276"/>
+ <location line="+317"/>
<source>Paste error</source>
<translation>Fehler beim Einfügen</translation>
</message>
<message>
- <location line="+450"/>
+ <location line="+448"/>
<source>Lay out</source>
<translation>Layout</translation>
</message>
<message>
- <location line="+493"/>
+ <location line="+485"/>
<location line="+55"/>
<source>Drop widget</source>
<translation>Widget einfügen</translation>
</message>
<message numerus="yes">
- <location line="-1063"/>
+ <location line="-1053"/>
<source>Paste %n action(s)</source>
<translation>
<numerusform>Eine Aktion einfügen</numerusform>
@@ -4772,12 +4771,17 @@ Möchten Sie sie überschreiben?</translation>
</translation>
</message>
<message>
- <location line="-511"/>
+ <location line="-565"/>
<source>Insert widget &apos;%1&apos;</source>
<translation>Widget &apos;%1&apos; einfügen</translation>
</message>
+ <message>
+ <location line="+313"/>
+ <source>Key Resize</source>
+ <translation>Größe ändern mittels Tastatur</translation>
+ </message>
<message numerus="yes">
- <location line="+513"/>
+ <location line="+254"/>
<source>Paste %n widget(s)</source>
<translation>
<numerusform>Widget einfügen</numerusform>
@@ -4800,17 +4804,17 @@ Möchten Sie sie überschreiben?</translation>
<translation>Bitte lösen Sie das Layout des gewünschten Containers auf und wählen Sie ihn erneut aus, um die Widgets einzufügen.</translation>
</message>
<message>
- <location line="+408"/>
+ <location line="+406"/>
<source>Select Ancestor</source>
<translation>Übergeordnetes Widget auswählen</translation>
</message>
<message>
- <location line="+581"/>
+ <location line="+573"/>
<source>A QMainWindow-based form does not contain a central widget.</source>
<translation>Ein auf QMainWindow basierendes Formular enthält kein zentrales Widget.</translation>
</message>
<message>
- <location line="-802"/>
+ <location line="-794"/>
<source>Raise widgets</source>
<translation>Widgets nach vorn bringen</translation>
</message>
diff --git a/translations/designer_hu.ts b/translations/designer_hu.ts
new file mode 100644
index 0000000000..c2960bc3d4
--- /dev/null
+++ b/translations/designer_hu.ts
@@ -0,0 +1,7023 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="hu">
+<context>
+ <name>AbstractFindWidget</name>
+ <message>
+ <location filename="../tools/shared/findwidget/abstractfindwidget.cpp" line="+127"/>
+ <source>&amp;Previous</source>
+ <translation>&amp;Előző</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>&amp;Next</source>
+ <translation>&amp;Következő</translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>&amp;Case sensitive</source>
+ <translation>&amp;Kis ér nagybetű érzékeny</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Whole &amp;words</source>
+ <translation>Egész &amp;szavakat</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>&lt;img src=&quot;:/trolltech/shared/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
+ <translation>&lt;img src=&quot;:/trolltech/shared/images/wrap.png&quot;&gt;&amp;nbsp;Keresés tördelve</translation>
+ </message>
+</context>
+<context>
+ <name>AddLinkDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/addlinkdialog.ui" line="+5"/>
+ <source>Insert Link</source>
+ <translation>Link beszúrása</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Title:</source>
+ <translation>Cím:</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>URL:</source>
+ <translation>URL:</translation>
+ </message>
+</context>
+<context>
+ <name>AppFontDialog</name>
+ <message>
+ <location filename="../tools/designer/src/designer/appfontdialog.cpp" line="+418"/>
+ <source>Additional Fonts</source>
+ <translation>További betűl</translation>
+ </message>
+</context>
+<context>
+ <name>AppFontManager</name>
+ <message>
+ <location line="-267"/>
+ <source>&apos;%1&apos; is not a file.</source>
+ <translation>%1 nem egy fájl.</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>The font file &apos;%1&apos; does not have read permissions.</source>
+ <translation>&apos;%1&apos; betű fájlnak nincsen olvasási engedélye.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>The font file &apos;%1&apos; is already loaded.</source>
+ <translation>&apos;%1&apos; font fájl már be van töltve.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>The font file &apos;%1&apos; could not be loaded.</source>
+ <translation>&apos;%1&apos; font fájlt nem sikerült betölteni.</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>&apos;%1&apos; is not a valid font id.</source>
+ <translation>&apos;%1&apos; nem egy érvényes betű azonosító.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>There is no loaded font matching the id &apos;%1&apos;.</source>
+ <translation>Nincsen &apos;%1&apos; azonosítóval megegyező betöltött betű.</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>The font &apos;%1&apos; (%2) could not be unloaded.</source>
+ <translation>&apos;%1&apos; betűt (%2) nem lehetett kirakni.</translation>
+ </message>
+</context>
+<context>
+ <name>AppFontWidget</name>
+ <message>
+ <location line="+26"/>
+ <source>Fonts</source>
+ <translation>Betűk</translation>
+ </message>
+ <message>
+ <location line="+58"/>
+ <source>Add font files</source>
+ <translation>Betű fájlok hozzáadása</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Remove current font file</source>
+ <translation>Aktuális betű fájl eltávolítása</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Remove all font files</source>
+ <translation>Az összes betű fájl eltávolítása</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Add Font Files</source>
+ <translation>Betű fájlok hozzáadása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Font files (*.ttf)</source>
+ <translation>Betű fájlok (*.ttf)</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Error Adding Fonts</source>
+ <translation>Hiba történt a betűk hozzáadásakor</translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>Error Removing Fonts</source>
+ <translation>Hiba történt a betűk eltávolításakor</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Remove Fonts</source>
+ <translation>Betűk eltávolítása</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Would you like to remove all fonts?</source>
+ <translation>El szeretné távolítani az összes betűt?</translation>
+ </message>
+</context>
+<context>
+ <name>AppearanceOptionsWidget</name>
+ <message>
+ <location filename="../tools/designer/src/designer/qdesigner_appearanceoptions.ui" line="+14"/>
+ <source>Form</source>
+ <translation></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>User Interface Mode</source>
+ <translation>Felhasználói interfész mód</translation>
+ </message>
+</context>
+<context>
+ <name>AssistantClient</name>
+ <message>
+ <location filename="../tools/designer/src/designer/assistantclient.cpp" line="+100"/>
+ <source>Unable to send request: Assistant is not responding.</source>
+ <translation>Nem lehet elküldeni a kérést, az Assistant nem válaszol.</translation>
+ </message>
+ <message>
+ <location line="+39"/>
+ <source>The binary &apos;%1&apos; does not exist.</source>
+ <translation>&apos;%1&apos; bináris nem létezik.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Unable to launch assistant (%1).</source>
+ <translation>Nem lehet elindítani a(z) %1 assistant.</translation>
+ </message>
+</context>
+<context>
+ <name>BrushPropertyManager</name>
+ <message>
+ <location filename="../tools/designer/src/components/propertyeditor/brushpropertymanager.cpp" line="+52"/>
+ <source>No brush</source>
+ <translation>Nincs kefe</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Solid</source>
+ <translation>Szolid</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Dense 1</source>
+ <translation>Sűrű 1</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Dense 2</source>
+ <translation>Sűrű 2</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Dense 3</source>
+ <translation>Sűrű 3</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Dense 4</source>
+ <translation>Sűrű 4</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Dense 5</source>
+ <translation>Sűrű 5</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Dense 6</source>
+ <translation>Sűrű 6</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Dense 7</source>
+ <translation>Sűrű 7</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Horizontal</source>
+ <translation>Horizontális</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Vertical</source>
+ <translation>Vertikális</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Cross</source>
+ <translation>Kereszt</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Backward diagonal</source>
+ <translation>Visszafele átlós</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Forward diagonal</source>
+ <translation>Előre átlós</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Crossing diagonal</source>
+ <translation>Kereszt átlós</translation>
+ </message>
+ <message>
+ <location line="+83"/>
+ <source>Style</source>
+ <translation>Stílus</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Color</source>
+ <translation>Szín</translation>
+ </message>
+ <message>
+ <location line="+105"/>
+ <source>[%1, %2]</source>
+ <translation>[%1, %2]</translation>
+ </message>
+</context>
+<context>
+ <name>Command</name>
+ <message>
+ <location filename="../tools/designer/src/components/signalsloteditor/signalsloteditor.cpp" line="+208"/>
+ <location line="+258"/>
+ <source>Change signal</source>
+ <translation>Jel változtatás</translation>
+ </message>
+ <message>
+ <location line="-256"/>
+ <location line="+268"/>
+ <source>Change slot</source>
+ <translation>Szlot változtatás</translation>
+ </message>
+ <message>
+ <location line="-220"/>
+ <source>Change signal-slot connection</source>
+ <translation>Jel szlot kapcsolat változtatása</translation>
+ </message>
+ <message>
+ <location line="+234"/>
+ <source>Change sender</source>
+ <translation>Küldő változtatás</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Change receiver</source>
+ <translation>Fogadó változtatás</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/button_taskmenu.cpp" line="+221"/>
+ <source>Create button group</source>
+ <translation>Gomb csoport létrehozása</translation>
+ </message>
+ <message>
+ <location line="+27"/>
+ <source>Break button group</source>
+ <translation>Gomb csoport törése</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Break button group &apos;%1&apos;</source>
+ <translation>&apos;%1&apos; gomb csoport törése</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Add buttons to group</source>
+ <translation>Gomb hozzáadása a csoporthoz</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <location filename="../tools/designer/src/lib/shared/formlayoutmenu.cpp" line="+458"/>
+ <source>Add &apos;%1&apos; to &apos;%2&apos;</source>
+ <extracomment>Command description for adding buttons to a QButtonGroup</extracomment>
+ <translation>&apos;%1&apos; hozzáadása &apos;%2&apos;-höz</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Remove buttons from group</source>
+ <translation>Gomb eltávolítása a csoportból</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Remove &apos;%1&apos; from &apos;%2&apos;</source>
+ <extracomment>Command description for removing buttons from a QButtonGroup</extracomment>
+ <translation>&apos;%1&apos; eltávolítása &apos;%2&apos;-ból</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/connectionedit.cpp" line="+143"/>
+ <source>Add connection</source>
+ <translation>Kapcsolat hozzáadása</translation>
+ </message>
+ <message>
+ <location line="+54"/>
+ <source>Adjust connection</source>
+ <translation>Kapcsolat beállítása</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Delete connections</source>
+ <translation>Kapcsolatok törlése</translation>
+ </message>
+ <message>
+ <location line="+58"/>
+ <source>Change source</source>
+ <translation>Forrás változtatása</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Change target</source>
+ <translation>Cél változtatása</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/morphmenu.cpp" line="+349"/>
+ <source>Morph %1/&apos;%2&apos; into %3</source>
+ <extracomment>MorphWidgetCommand description</extracomment>
+ <translation>%1/&apos;%2&apos; alakváltoztatása %3-re</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_command.cpp" line="+149"/>
+ <source>Insert &apos;%1&apos;</source>
+ <translation>&apos;%1&apos; beszúrása</translation>
+ </message>
+ <message>
+ <location line="+133"/>
+ <source>Change Z-order of &apos;%1&apos;</source>
+ <translation>&apos;%1&apos; Z sorrendjének megváltoztatása</translation>
+ </message>
+ <message>
+ <location line="+34"/>
+ <source>Raise &apos;%1&apos;</source>
+ <translation>&apos;%1&apos; növelése</translation>
+ </message>
+ <message>
+ <location line="+33"/>
+ <source>Lower &apos;%1&apos;</source>
+ <translation>Alsó &apos;%1&apos;</translation>
+ </message>
+ <message>
+ <location line="+113"/>
+ <source>Delete &apos;%1&apos;</source>
+ <translation>&apos;%1&apos; törlése</translation>
+ </message>
+ <message>
+ <location line="+119"/>
+ <source>Reparent &apos;%1&apos;</source>
+ <translation>&apos;%1&apos; újra szülősítése</translation>
+ </message>
+ <message>
+ <location line="+53"/>
+ <source>Promote to custom widget</source>
+ <translation>Egyéni widget elősegítése</translation>
+ </message>
+ <message>
+ <location line="+42"/>
+ <source>Demote from custom widget</source>
+ <translation>Egyéni widget lefokozása</translation>
+ </message>
+ <message>
+ <location line="+79"/>
+ <source>Lay out using grid</source>
+ <translation>Tervraj rácsok használatával</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Lay out vertically</source>
+ <translation>Tervrajz vertikálisan</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Lay out horizontally</source>
+ <translation>Tervrajz horizontálisan</translation>
+ </message>
+ <message>
+ <location line="+41"/>
+ <source>Break layout</source>
+ <translation>Tervrajz törése</translation>
+ </message>
+ <message>
+ <location line="+105"/>
+ <source>Simplify Grid Layout</source>
+ <translation>Egyszerűsített rács tervrajz</translation>
+ </message>
+ <message>
+ <location line="+135"/>
+ <location line="+235"/>
+ <location line="+78"/>
+ <source>Move Page</source>
+ <translation>Lap mozgatása</translation>
+ </message>
+ <message>
+ <location line="-279"/>
+ <location line="+123"/>
+ <location line="+188"/>
+ <location line="+666"/>
+ <source>Delete Page</source>
+ <translation>Lap törlése</translation>
+ </message>
+ <message>
+ <location line="-939"/>
+ <location line="+123"/>
+ <source>Page</source>
+ <translation>Lap</translation>
+ </message>
+ <message>
+ <location line="+860"/>
+ <source>page</source>
+ <translation>lap</translation>
+ </message>
+ <message>
+ <location line="-978"/>
+ <location line="+123"/>
+ <location line="+186"/>
+ <location line="+667"/>
+ <source>Insert Page</source>
+ <translation>Lap beszúrása</translation>
+ </message>
+ <message>
+ <location line="-647"/>
+ <source>Change Tab order</source>
+ <translation>Tab sorrend változtatása</translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <source>Create Menu Bar</source>
+ <translation>Menü sáv</translation>
+ </message>
+ <message>
+ <location line="+44"/>
+ <source>Delete Menu Bar</source>
+ <translation>Menü sáv törlése</translation>
+ </message>
+ <message>
+ <location line="+47"/>
+ <source>Create Status Bar</source>
+ <translation>Státusz sáv létrehozása</translation>
+ </message>
+ <message>
+ <location line="+42"/>
+ <source>Delete Status Bar</source>
+ <translation>Státusz sáv törlése</translation>
+ </message>
+ <message>
+ <location line="+45"/>
+ <source>Add Tool Bar</source>
+ <translation>Eszköz sáv hozzáadása</translation>
+ </message>
+ <message>
+ <location line="+59"/>
+ <source>Add Dock Window</source>
+ <translation>Dokk ablak hozzáadása</translation>
+ </message>
+ <message>
+ <location line="+53"/>
+ <source>Adjust Size of &apos;%1&apos;</source>
+ <translation>&apos;%1&apos; méretének igazítása</translation>
+ </message>
+ <message>
+ <location line="+57"/>
+ <source>Change Form Layout Item Geometry</source>
+ <translation>Űrlap tervrajz elem geometriájának megváltoztatása</translation>
+ </message>
+ <message>
+ <location line="+95"/>
+ <source>Change Layout Item Geometry</source>
+ <translation>Tervrajz elem geometriájának megváltoztatása</translation>
+ </message>
+ <message>
+ <location line="+138"/>
+ <source>Delete Subwindow</source>
+ <translation>Alablak törlése</translation>
+ </message>
+ <message>
+ <location line="+44"/>
+ <source>Insert Subwindow</source>
+ <translation>Alablak beszúrása</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>subwindow</source>
+ <translation>alablak</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Subwindow</source>
+ <translation>Alablak</translation>
+ </message>
+ <message>
+ <location line="+391"/>
+ <source>Change Table Contents</source>
+ <translation>Táblázat tartalom megváltoztatása</translation>
+ </message>
+ <message>
+ <location line="+107"/>
+ <source>Change Tree Contents</source>
+ <translation>Fa tartalom megváltoztatása</translation>
+ </message>
+ <message>
+ <location line="+74"/>
+ <location line="+146"/>
+ <source>Add action</source>
+ <translation>Tevékenység hozzáadása</translation>
+ </message>
+ <message>
+ <location line="-120"/>
+ <location line="+126"/>
+ <source>Remove action</source>
+ <translation>Tevékenység eltávolítása</translation>
+ </message>
+ <message>
+ <location line="+53"/>
+ <source>Add menu</source>
+ <translation>Menü hozzáadása</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Remove menu</source>
+ <translation>Menü eltávolítása</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Create submenu</source>
+ <translation>Almenü létrehozása</translation>
+ </message>
+ <message>
+ <location line="+31"/>
+ <source>Delete Tool Bar</source>
+ <translation>Eszköz sáv törlése</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_command2.cpp" line="+154"/>
+ <source>Change layout of &apos;%1&apos; from %2 to %3</source>
+ <translation>&apos;%1&apos; tervrajz megváltoztatása %2-ről %3-ra</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_menu.cpp" line="+1195"/>
+ <source>Set action text</source>
+ <translation>Tevékenység szöveg beállítása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Insert action</source>
+ <translation>Tevékenység beszúrása</translation>
+ </message>
+ <message>
+ <location line="+89"/>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_menubar.cpp" line="+907"/>
+ <source>Move action</source>
+ <translation>Tevékenység mozgatása</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_menubar.cpp" line="-424"/>
+ <source>Change Title</source>
+ <translation>Cím megváltoztatása</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Insert Menu</source>
+ <translation>Menü beszúrása</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_propertycommand.cpp" line="+1213"/>
+ <source>Changed &apos;%1&apos; of &apos;%2&apos;</source>
+ <translation>&apos;%2&apos; &apos;%1&apos;-ének megváltoztatása</translation>
+ </message>
+ <message numerus="yes">
+ <location line="+3"/>
+ <source>Changed &apos;%1&apos; of %n objects</source>
+ <translation>
+ <numerusform>%n objektum %1-ének megváltoztatása</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+76"/>
+ <source>Reset &apos;%1&apos; of &apos;%2&apos;</source>
+ <translation>&apos;%2&apos; &apos;%1&apos;-ének megváltoztatása</translation>
+ </message>
+ <message numerus="yes">
+ <location line="+3"/>
+ <source>Reset &apos;%1&apos; of %n objects</source>
+ <translation>
+ <numerusform>%n objektum &apos;%1&apos;-ének újraindítása</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+89"/>
+ <source>Add dynamic property &apos;%1&apos; to &apos;%2&apos;</source>
+ <translation>&apos;%2&apos; &apos;%1&apos; dinamikus tulajdonságának hozzáadása</translation>
+ </message>
+ <message numerus="yes">
+ <location line="+3"/>
+ <source>Add dynamic property &apos;%1&apos; to %n objects</source>
+ <translation>
+ <numerusform>%n objektum&apos; &apos;%1&apos; dinamikus tulajdonságának hozzáadása</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+86"/>
+ <source>Remove dynamic property &apos;%1&apos; from &apos;%2&apos;</source>
+ <translation>&apos;%1&apos; dinamikus tulajdonság eltávolítáas &apos;%2&apos;-ből</translation>
+ </message>
+ <message numerus="yes">
+ <location line="+3"/>
+ <source>Remove dynamic property &apos;%1&apos; from %n objects</source>
+ <translation>
+ <numerusform>&apos;%1&apos; dinamikus tulajdonság eltávolítása %n objektumból</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/scriptcommand.cpp" line="+55"/>
+ <source>Change script</source>
+ <translation>Szkript megváltoztatása</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/signalslotdialog.cpp" line="+202"/>
+ <source>Change signals/slots</source>
+ <translation>Jelek/Szlotok megváltoztatása</translation>
+ </message>
+</context>
+<context>
+ <name>ConnectDialog</name>
+ <message>
+ <location filename="../tools/designer/src/components/signalsloteditor/connectdialog.ui" line="+13"/>
+ <source>Configure Connection</source>
+ <translation>Kapcsolat konfigurálása</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <location line="+40"/>
+ <source>GroupBox</source>
+ <translation>CsoportDoboz</translation>
+ </message>
+ <message>
+ <location line="-25"/>
+ <location line="+40"/>
+ <source>Edit...</source>
+ <translation>Szerkesztés...</translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>Show signals and slots inherited from QWidget</source>
+ <translation>QWidget-ből örökölt jelek és szlotok megjelenítése</translation>
+ </message>
+</context>
+<context>
+ <name>ConnectionDelegate</name>
+ <message>
+ <location filename="../tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp" line="+643"/>
+ <source>&lt;object&gt;</source>
+ <translation>&lt;objekttum&gt;</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>&lt;signal&gt;</source>
+ <translation>&lt;jel&gt;</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>&lt;slot&gt;</source>
+ <translation>&lt;szlot&gt;</translation>
+ </message>
+</context>
+<context>
+ <name>DPI_Chooser</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/dpi_chooser.cpp" line="+69"/>
+ <source>Standard (96 x 96)</source>
+ <extracomment>Embedded device standard screen resolution</extracomment>
+ <translation>Szabványos (96 x 96)</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Greenphone (179 x 185)</source>
+ <extracomment>Embedded device screen resolution</extracomment>
+ <translation>Greenphone (179 x 185)</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>High (192 x 192)</source>
+ <extracomment>Embedded device high definition screen resolution</extracomment>
+ <translation>Magasság (192 x 192)</translation>
+ </message>
+</context>
+<context>
+ <name>Designer</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/qdesigner_resource.cpp" line="+449"/>
+ <source>Qt Designer</source>
+ <translation>Qt Designer</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>This file contains top level spacers.&lt;br&gt;They have &lt;b&gt;NOT&lt;/b&gt; been saved into the form.</source>
+ <translation>Ez a fájl felső szintű távtartókat tartalmaz.&lt;br&gt; Nem tartalmaznak &lt;b&gt;SEMMIT&lt;/b&gt;, ami el lenne mentve az űrlapba.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Perhaps you forgot to create a layout?</source>
+ <translation>Talán elfelejtette létrehozni a tervrajzot?</translation>
+ </message>
+ <message>
+ <location line="+173"/>
+ <source>Invalid UI file: The root element &lt;ui&gt; is missing.</source>
+ <translation>Érvénytelen UI fájl. A rendszergazda elem &lt;ui&gt; hiányzik.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>An error has occurred while reading the UI file at line %1, column %2: %3</source>
+ <translation>Hiba történt az UI fájl olvasás közben %1 sorban, %2 oszlopban: %3</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>This file cannot be read because it was created using %1.</source>
+ <translation>A fájl nem olvasható, mert %1 használatával hozták létre.</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>This file was created using Designer from Qt-%1 and cannot be read.</source>
+ <translation>A fájlt a(z) %1 Qt Designer-rel hozták létre és nem olvasható.</translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>The converted file could not be read.</source>
+ <translation>A konvertált fájlt nem sikerült olvasni.</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>This file was created using Designer from Qt-%1 and will be converted to a new form by Qt Designer.</source>
+ <translation>A fájlt a(z) %1 Qt Designer-rel hozták létre és a Qt Designer egy új űrlapra fogja konvertálni.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The old form has not been touched, but you will have to save the form under a new name.</source>
+ <translation>A régi űrlap nem lett érintve, de az űrlapot új néven kell majd elmentenie.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>This file was created using Designer from Qt-%1 and could not be read:
+%2</source>
+ <translation>A fájl a(z) %1 Qt Designer-rel lett létrehozva és nem olvasható:
+%2</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Please run it through &lt;b&gt;uic3&amp;nbsp;-convert&lt;/b&gt; to convert it to Qt-4&apos;s ui format.</source>
+ <translation>Kérem futtassa a &lt;br&gt;uic3&amp;nbsp;-convert&lt;/b&gt; Qt 4-s ui formára konvertáláshoz.</translation>
+ </message>
+ <message>
+ <location line="+31"/>
+ <source>This file cannot be read because the extra info extension failed to load.</source>
+ <translation>Ez a fájl nem olvasható, mert az extra információ kiterjesztést nem sikerült betölteni.</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qsimpleresource.cpp" line="+339"/>
+ <source>Custom Widgets</source>
+ <translation>Egyéni Widgetek</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Promoted Widgets</source>
+ <translation>Támogatott Widgetek</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_utils.cpp" line="+682"/>
+ <source>Unable to launch %1.</source>
+ <translation>Nem lehet elindítani %1-t.</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>%1 timed out.</source>
+ <translation>%1 időtúllépés.</translation>
+ </message>
+</context>
+<context>
+ <name>DesignerMetaEnum</name>
+ <message>
+ <location line="-513"/>
+ <source>%1 is not a valid enumeration value of &apos;%2&apos;.</source>
+ <translation>%1 nem egy érvényes &apos;%2&apos; felsorolási érték.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&apos;%1&apos; could not be converted to an enumeration value of type &apos;%2&apos;.</source>
+ <translation>&apos;%1&apos; nem konvertálható egy &apos;%2&apos; típusú felsorolási értékre.</translation>
+ </message>
+</context>
+<context>
+ <name>DesignerMetaFlags</name>
+ <message>
+ <location line="+78"/>
+ <source>&apos;%1&apos; could not be converted to a flag value of type &apos;%2&apos;.</source>
+ <translation>&apos;%1&apos; nem konvertálható egy &apos;%2&apos; típusú jelző értékre.</translation>
+ </message>
+</context>
+<context>
+ <name>DeviceProfile</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/deviceprofile.cpp" line="+397"/>
+ <source>&apos;%1&apos; is not a number.</source>
+ <extracomment>Reading a number for an embedded device profile</extracomment>
+ <translation>&apos;%1&apos; nem egy szám.</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>An invalid tag &lt;%1&gt; was encountered.</source>
+ <translation>Egy érvénytelen címkét &lt;%1&gt; talált.</translation>
+ </message>
+</context>
+<context>
+ <name>DeviceProfileDialog</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/deviceprofiledialog.ui" line="+20"/>
+ <source>&amp;Family</source>
+ <translation>&amp;Család</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>&amp;Point Size</source>
+ <translation>&amp;Pont méret</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Style</source>
+ <translation>Stílus</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Device DPI</source>
+ <translation>Eszköz DPI</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Name</source>
+ <translation>Név</translation>
+ </message>
+</context>
+<context>
+ <name>DeviceSkin</name>
+ <message>
+ <location filename="../tools/shared/deviceskin/deviceskin.cpp" line="+79"/>
+ <source>The image file &apos;%1&apos; could not be loaded.</source>
+ <translation>Nem sikerült betölteni a(z) &apos;%1&apos; kép fájlt.</translation>
+ </message>
+ <message>
+ <location line="+64"/>
+ <source>The skin directory &apos;%1&apos; does not contain a configuration file.</source>
+ <translation>A(z) &apos;%1&apos; szkin könyvtár nem tartalmaz egy konfigurációs fájlt sem.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>The skin configuration file &apos;%1&apos; could not be opened.</source>
+ <translation>A(z) &apos;%1&apos; szkin konfigurációs fájlt nem sikerült megnyitni.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>The skin configuration file &apos;%1&apos; could not be read: %2</source>
+ <translation>A(z) &apos;%1&apos; szkin konfigurációs fájlt nem sikerült olvasni: %2</translation>
+ </message>
+ <message>
+ <location line="+70"/>
+ <source>Syntax error: %1</source>
+ <translation>Szintakszis hiba: %1</translation>
+ </message>
+ <message>
+ <location line="+21"/>
+ <source>The skin &quot;up&quot; image file &apos;%1&apos; does not exist.</source>
+ <translation>A(z) &apos;%1&apos; szkin &apos;fel&apos; kép fájl nem létezik.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>The skin &quot;down&quot; image file &apos;%1&apos; does not exist.</source>
+ <translation>A(z) &apos;%1&apos; szkin &apos;le&apos; kép fájl nem létezik.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>The skin &quot;closed&quot; image file &apos;%1&apos; does not exist.</source>
+ <translation>A(z) &apos;%1&apos; szkin &apos;zárt&apos; kép fájl nem létezik.</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>The skin cursor image file &apos;%1&apos; does not exist.</source>
+ <translation>A(z) &apos;%1&apos; szkin kurzor kép fájl nem létezik.</translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>Syntax error in area definition: %1</source>
+ <translation>Szintakszis hiba a terület definícióban: %1</translation>
+ </message>
+ <message>
+ <location line="+38"/>
+ <source>Mismatch in number of areas, expected %1, got %2.</source>
+ <translation>Rossz párosítás a területek számában, várt %1, kapot %2.</translation>
+ </message>
+</context>
+<context>
+ <name>EmbeddedOptionsControl</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/embeddedoptionspage.cpp" line="+307"/>
+ <source>&lt;html&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Font&lt;/b&gt;&lt;/td&gt;&lt;td&gt;%1, %2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Style&lt;/b&gt;&lt;/td&gt;&lt;td&gt;%3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Resolution&lt;/b&gt;&lt;/td&gt;&lt;td&gt;%4 x %5&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/html&gt;</source>
+ <extracomment>Format embedded device profile description</extracomment>
+ <translation>&lt;html&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Betű&lt;/b&gt;&lt;/td&gt;&lt;td&gt;%1, %2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Stílus&lt;/b&gt;&lt;/td&gt;&lt;td&gt;%3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Felbontás&lt;/b&gt;&lt;/td&gt;&lt;td&gt;%4 x %5&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/html&gt;</translation>
+ </message>
+</context>
+<context>
+ <name>EmbeddedOptionsPage</name>
+ <message>
+ <location line="+103"/>
+ <source>Embedded Design</source>
+ <extracomment>Tab in preferences dialog</extracomment>
+ <translation>Tab a beállítások párbeszéd ablakban</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Device Profiles</source>
+ <extracomment>EmbeddedOptionsControl group box&quot;</extracomment>
+ <translation>BeágyazottOpciókVezérlő csoport doboz&quot;</translation>
+ </message>
+</context>
+<context>
+ <name>FontPanel</name>
+ <message>
+ <location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/>
+ <source>Font</source>
+ <translation>Betű</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>&amp;Writing system</source>
+ <translation>Rendszer &amp;írása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Family</source>
+ <translation>&amp;Család</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>&amp;Style</source>
+ <translation>&amp;Stílus</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>&amp;Point size</source>
+ <translation>&amp;Pont méret</translation>
+ </message>
+</context>
+<context>
+ <name>FontPropertyManager</name>
+ <message>
+ <location filename="../tools/designer/src/components/propertyeditor/fontpropertymanager.cpp" line="+62"/>
+ <source>PreferDefault</source>
+ <translation>AlapértelmezettPreferálása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>NoAntialias</source>
+ <translation>NincsÃtlapolás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>PreferAntialias</source>
+ <translation>ÃtlapolásPreferálása</translation>
+ </message>
+ <message>
+ <location line="+61"/>
+ <source>Antialiasing</source>
+ <translation>Ãtlapolás</translation>
+ </message>
+</context>
+<context>
+ <name>FormBuilder</name>
+ <message>
+ <location filename="../tools/designer/src/lib/uilib/formbuilderextra.cpp" line="+359"/>
+ <source>Invalid stretch value for &apos;%1&apos;: &apos;%2&apos;</source>
+ <extracomment>Parsing layout stretch values</extracomment>
+ <translation>Érvénytelen érték kiterjesztés &apos;%1&apos;-re: &apos;%2&apos;</translation>
+ </message>
+ <message>
+ <location line="+62"/>
+ <source>Invalid minimum size for &apos;%1&apos;: &apos;%2&apos;</source>
+ <extracomment>Parsing grid layout minimum size values</extracomment>
+ <translation>Érvénytelen minimum méret &apos;%1&apos;-re: &apos;%2&apos;</translation>
+ </message>
+</context>
+<context>
+ <name>FormEditorOptionsPage</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/formeditor_optionspage.cpp" line="+91"/>
+ <source>%1 %</source>
+ <translation>%1 %</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Preview Zoom</source>
+ <translation>Zoom előnézet</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Default Zoom</source>
+ <translation>Alapértelmezett zoom</translation>
+ </message>
+ <message>
+ <location line="+29"/>
+ <source>Forms</source>
+ <extracomment>Tab in preferences dialog</extracomment>
+ <translation>Å°rlapok</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Default Grid</source>
+ <translation>Alapértelmezett rács</translation>
+ </message>
+</context>
+<context>
+ <name>FormLayoutRowDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/formlayoutrowdialog.ui" line="+6"/>
+ <source>Add Form Layout Row</source>
+ <translatorcomment>нелепица какаÑ-то</translatorcomment>
+ <translation>Űrlap szerkezet sor hozzaadása</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>&amp;Label text:</source>
+ <translation>&amp;Címke szöveg:</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Field &amp;type:</source>
+ <translation>Mező &amp;típus:</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>&amp;Field name:</source>
+ <translation>&amp;Mező név:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>&amp;Buddy:</source>
+ <translation>&amp;Haver:</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>&amp;Row:</source>
+ <translation>&amp;Sor:</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Label &amp;name:</source>
+ <translation>Címke &amp;név:</translation>
+ </message>
+</context>
+<context>
+ <name>FormWindow</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/formwindow.cpp" line="+1701"/>
+ <source>Unexpected element &lt;%1&gt;</source>
+ <translation>Váratlan elem &lt;%1&gt;</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Error while pasting clipboard contents at line %1, column %2: %3</source>
+ <translation>Hiba történt a vágólap tartalom beillesztése közben a(z) %1 sorban, %2 oszlopban: %3</translation>
+ </message>
+</context>
+<context>
+ <name>FormWindowSettings</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/formwindowsettings.ui" line="+54"/>
+ <source>Form Settings</source>
+ <translation>Űrlap beállítások</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Layout &amp;Default</source>
+ <translation>&amp;Alapértelmezett elrendezés</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>&amp;Spacing:</source>
+ <translation>&amp;Ritkítás:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>&amp;Margin:</source>
+ <translation>&amp;Margó:</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>&amp;Layout Function</source>
+ <translation>&amp;Elrendezés függvény
+</translation>
+ </message>
+ <message>
+ <location line="+21"/>
+ <source>Ma&amp;rgin:</source>
+ <translation>Ma&amp;rgó:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Spa&amp;cing:</source>
+ <translation>Rit&amp;kítás:</translation>
+ </message>
+ <message>
+ <location line="+117"/>
+ <source>&amp;Author</source>
+ <translation>&amp;Szerző</translation>
+ </message>
+ <message>
+ <location line="-41"/>
+ <source>&amp;Include Hints</source>
+ <translation>Célzások &amp;beleértése</translation>
+ </message>
+ <message>
+ <location line="-53"/>
+ <source>&amp;Pixmap Function</source>
+ <translation>&amp;Pixmap függvény</translation>
+ </message>
+ <message>
+ <location line="+71"/>
+ <source>Grid</source>
+ <translation>Rács</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Embedded Design</source>
+ <translation>Beágyazott terv</translation>
+ </message>
+</context>
+<context>
+ <name>IconSelector</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/iconselector.cpp" line="+352"/>
+ <source>All Pixmaps (</source>
+ <translation>Az összes Pixmap (</translation>
+ </message>
+</context>
+<context>
+ <name>ItemPropertyBrowser</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/itemlisteditor.cpp" line="+66"/>
+ <source>XX Icon Selected off</source>
+ <extracomment>Sample string to determinate the width for the first column of the list item property browser</extracomment>
+ <translation>XX ikon kiválasztásának kikapcsolása</translation>
+ </message>
+</context>
+<context>
+ <name>MainWindowBase</name>
+ <message>
+ <location filename="../tools/designer/src/designer/mainwindow.cpp" line="+119"/>
+ <source>Main</source>
+ <extracomment>Not currently used (main tool bar)</extracomment>
+ <translation>FÅ‘</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>File</source>
+ <translation>Fájl</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Edit</source>
+ <translation>Szerkesztés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Tools</source>
+ <translation>Eszközök</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Form</source>
+ <translation>Å°rlap</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Qt Designer</source>
+ <translation>Qt Designer</translation>
+ </message>
+</context>
+<context>
+ <name>NewForm</name>
+ <message>
+ <location filename="../tools/designer/src/designer/newform.cpp" line="+79"/>
+ <source>C&amp;reate</source>
+ <translation>&amp;Létrehozás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Recent</source>
+ <translation>Utóbbi</translation>
+ </message>
+ <message>
+ <location line="+32"/>
+ <source>&amp;Close</source>
+ <translation>&amp;Bezárás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Open...</source>
+ <translation>&amp;Megnyitás...</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>&amp;Recent Forms</source>
+ <translation>&amp;Utóbbi űrlapok</translation>
+ </message>
+ <message>
+ <location line="+64"/>
+ <source>Read error</source>
+ <translation>Olvasási hiba</translation>
+ </message>
+ <message>
+ <location line="-100"/>
+ <source>New Form</source>
+ <translation>Űj űrlap</translation>
+ </message>
+ <message>
+ <location line="-5"/>
+ <source>Show this Dialog on Startup</source>
+ <translation>Párbeszédablak megjelenítése betöltéskor</translation>
+ </message>
+ <message>
+ <location line="+128"/>
+ <source>A temporary form file could not be created in %1.</source>
+ <translation>Egy átmeneti űrlap fájlt nem sikerült létrehozni %1-ben.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>The temporary form file %1 could not be written.</source>
+ <translation>A(z) %1 átmeneti űrlap fájlt nem sikerült írni.</translation>
+ </message>
+</context>
+<context>
+ <name>ObjectInspectorModel</name>
+ <message>
+ <location filename="../tools/designer/src/components/objectinspector/objectinspectormodel.cpp" line="+360"/>
+ <source>Object</source>
+ <translation>Objektum</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Class</source>
+ <translation>Osztály</translation>
+ </message>
+ <message>
+ <location line="+35"/>
+ <source>separator</source>
+ <translation>Elválasztó</translation>
+ </message>
+ <message>
+ <location line="+98"/>
+ <source>&lt;noname&gt;</source>
+ <translation>&lt;noname&gt;</translation>
+ </message>
+</context>
+<context>
+ <name>ObjectNameDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_taskmenu.cpp" line="+158"/>
+ <source>Change Object Name</source>
+ <translation>Objektum nevének megváltoztatása</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Object Name</source>
+ <translation>Objektum név</translation>
+ </message>
+</context>
+<context>
+ <name>PluginDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/plugindialog.ui" line="+54"/>
+ <source>Plugin Information</source>
+ <translation>Beépülő modul információ</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>1</source>
+ <translation>1</translation>
+ </message>
+</context>
+<context>
+ <name>PreferencesDialog</name>
+ <message>
+ <location filename="../tools/designer/src/designer/preferencesdialog.ui" line="+20"/>
+ <source>Preferences</source>
+ <translation>Beállítások</translation>
+ </message>
+</context>
+<context>
+ <name>PreviewConfigurationWidget</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/previewconfigurationwidget.ui" line="+5"/>
+ <source>Form</source>
+ <translation>Å°rlap</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Print/Preview Configuration</source>
+ <translation>Nyomtatás/Előnézet konfiguráció</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Style</source>
+ <translation>Stílus</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Style sheet</source>
+ <translation>Stíluslap</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <location line="+7"/>
+ <location line="+21"/>
+ <source>...</source>
+ <translation>...</translation>
+ </message>
+ <message>
+ <location line="-12"/>
+ <source>Device skin</source>
+ <translation>Eszköz szkin</translation>
+ </message>
+</context>
+<context>
+ <name>PromotionModel</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/promotionmodel.cpp" line="+112"/>
+ <source>Not used</source>
+ <extracomment>Usage of promoted widgets</extracomment>
+ <translation>Nincs használva</translation>
+ </message>
+</context>
+<context>
+ <name>Q3WizardContainer</name>
+ <message>
+ <location filename="../tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.cpp" line="+172"/>
+ <location line="+5"/>
+ <source>Page</source>
+ <translation>Lap</translation>
+ </message>
+</context>
+<context>
+ <name>QAbstractFormBuilder</name>
+ <message>
+ <location filename="../tools/designer/src/lib/uilib/abstractformbuilder.cpp" line="+206"/>
+ <source>Unexpected element &lt;%1&gt;</source>
+ <translation>Váratlan elem &lt;%1&gt;</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>An error has occurred while reading the UI file at line %1, column %2: %3</source>
+ <translation>Hiba történt az UI fájl olvasása közben a(z) %1 sorban, %2 oszlopban: %3</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Invalid UI file: The root element &lt;ui&gt; is missing.</source>
+ <translation>Érvénytelen UI fájl. A rendszergazda elem &lt;ui&gt; hiányzik.</translation>
+ </message>
+ <message>
+ <location line="+119"/>
+ <source>The creation of a widget of the class &apos;%1&apos; failed.</source>
+ <translation>A(z) &apos;%1&apos; osztály egy widget-ének létrehozása nem sikerült.</translation>
+ </message>
+ <message>
+ <location line="+296"/>
+ <source>Attempt to add child that is not of class QWizardPage to QWizard.</source>
+ <translation>Gyermek hozzáadásának megkísérelése QWizard-hoz, amely nem egy QWizardPage osztály.</translation>
+ </message>
+ <message>
+ <location line="+86"/>
+ <source>Attempt to add a layout to a widget &apos;%1&apos; (%2) which already has a layout of non-box type %3.
+This indicates an inconsistency in the ui-file.</source>
+ <translation>Egy elrendezés hozzáadásának megprónálás egy &quot;%1&apos; widgethez (%2), melynek már egy %3 típusú nem doboz elrendezése van.
+Ez ellentmondást mutat az ui fájlban.</translation>
+ </message>
+ <message>
+ <location line="+144"/>
+ <source>Empty widget item in %1 &apos;%2&apos;.</source>
+ <translation>Ãœres widget elem %1-ben &apos;%2&apos;.</translation>
+ </message>
+ <message>
+ <location line="+680"/>
+ <source>Flags property are not supported yet.</source>
+ <translation>Jelző tulajdonság még nem támogatott.</translation>
+ </message>
+ <message>
+ <location line="+81"/>
+ <source>While applying tab stops: The widget &apos;%1&apos; could not be found.</source>
+ <translation>Tab stops alkalmazásakor: A(z) &apos;%1&apos; widget nem található.</translation>
+ </message>
+ <message>
+ <location line="+908"/>
+ <source>Invalid QButtonGroup reference &apos;%1&apos; referenced by &apos;%2&apos;.</source>
+ <translation>Érvénytelen &apos;%1&apos; QButtonGroup hivatkozásra hivatkozik a(z) &apos;%2&apos;.</translation>
+ </message>
+ <message>
+ <location line="+511"/>
+ <source>This version of the uitools library is linked without script support.</source>
+ <translation>Az uitools könyvtár ezen verziója szkript támogatás nélkül linkelt.</translation>
+ </message>
+</context>
+<context>
+ <name>QAxWidgetPlugin</name>
+ <message>
+ <location filename="../tools/designer/src/plugins/activeqt/qaxwidgetplugin.cpp" line="+75"/>
+ <source>ActiveX control</source>
+ <translation>ActiveX vezérlő</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>ActiveX control widget</source>
+ <translation>ActiveX vezérlő widget</translation>
+ </message>
+</context>
+<context>
+ <name>QAxWidgetTaskMenu</name>
+ <message>
+ <location filename="../tools/designer/src/plugins/activeqt/qaxwidgettaskmenu.cpp" line="+119"/>
+ <source>Set Control</source>
+ <translation>Vezérlő beállítása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Reset Control</source>
+ <translation>Vezérlő újraindítása</translation>
+ </message>
+ <message>
+ <location line="+41"/>
+ <source>Licensed Control</source>
+ <translation>Felhatalmazott vezérlő</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>The control requires a design-time license</source>
+ <translation>A vezérlő egy tervezés idejű felhatalmazást igényel</translation>
+ </message>
+</context>
+<context>
+ <name>QCoreApplication</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_promotion.cpp" line="+83"/>
+ <source>%1 is not a promoted class.</source>
+ <translation>%1 nem egy támogatott osztály.</translation>
+ </message>
+ <message>
+ <location line="+65"/>
+ <source>The base class %1 is invalid.</source>
+ <translation>A(z) %1 alap osztály érvénytelen.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>The class %1 already exists.</source>
+ <translation>A(z) %1 osztály már létezik.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Promoted Widgets</source>
+ <translation>Támogatott Widget-ek</translation>
+ </message>
+ <message>
+ <location line="+126"/>
+ <source>The class %1 cannot be removed</source>
+ <translation>A(z) %1 osztályt nem lehet eltávolítani</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>The class %1 cannot be removed because it is still referenced.</source>
+ <translation>A(z) %1 osztályt nem lehet eltávolítani, mert még mindig hivatkozott.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>The class %1 cannot be renamed</source>
+ <translation>A(z) %1 osztályt nem lehet átnevezni</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>The class %1 cannot be renamed to an empty name.</source>
+ <translation>A(z) %1 osztályt nem lehet átnevezni egy üres névűre.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>There is already a class named %1.</source>
+ <translation>Már van egy %1 nevű osztály.</translation>
+ </message>
+ <message>
+ <location line="+29"/>
+ <source>Cannot set an empty include file.</source>
+ <translatorcomment>перевод близко к текÑту - буквальный ÑовÑем глаз режет</translatorcomment>
+ <translation>Nem lehet beállítani egy üres bennefoglalt fájlt.</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/lib/uilib/formscriptrunner.cpp" line="+88"/>
+ <source>Exception at line %1: %2</source>
+ <translation>Kivétel a(z) %1 sorban: %2</translation>
+ </message>
+ <message>
+ <location line="+36"/>
+ <source>Unknown error</source>
+ <translation>Ismeretlen hiba</translation>
+ </message>
+ <message>
+ <location line="+50"/>
+ <source>An error occurred while running the script for %1: %2
+Script: %3</source>
+ <translation>Hiba történt a szkript futtása közben %1-re: %2
+Szkript: %3</translation>
+ </message>
+</context>
+<context>
+ <name>QDesigner</name>
+ <message>
+ <location filename="../tools/designer/src/designer/qdesigner.cpp" line="+141"/>
+ <source>%1 - warning</source>
+ <translation>%1 -figyelmeztetés</translation>
+ </message>
+ <message>
+ <location line="+96"/>
+ <source>Qt Designer</source>
+ <translation>Qt Designer</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>This application cannot be used for the Console edition of Qt</source>
+ <translation>Ezt alkalmazást nem lehet a Qt konzol szerkesztésére használni</translation>
+ </message>
+</context>
+<context>
+ <name>QDesignerActions</name>
+ <message>
+ <location filename="../tools/designer/src/designer/qdesigner_actions.cpp" line="+128"/>
+ <source>Saved %1.</source>
+ <translation>Mentve: %1.</translation>
+ </message>
+ <message>
+ <location line="+50"/>
+ <source>Edit Widgets</source>
+ <translation>Widget-ek szerkesztése</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>&amp;Quit</source>
+ <translation>&amp;Bezárás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Minimize</source>
+ <translation>&amp;Minimalizálás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Bring All to Front</source>
+ <translation>Az összes előre hozása</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Preferences...</source>
+ <translation>Beállítások...</translation>
+ </message>
+ <message>
+ <location line="+298"/>
+ <source>Clear &amp;Menu</source>
+ <translation>&amp;Menü tisztítása</translation>
+ </message>
+ <message>
+ <location line="-233"/>
+ <source>CTRL+SHIFT+S</source>
+ <translation>CTRL+SHIFT+S</translation>
+ </message>
+ <message>
+ <location line="+113"/>
+ <source>CTRL+R</source>
+ <translation>CTRL+R</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>CTRL+M</source>
+ <translation>CTRL+M</translation>
+ </message>
+ <message>
+ <location line="+31"/>
+ <source>Qt Designer &amp;Help</source>
+ <translation>Qt Designer &amp;Súgó</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Current Widget Help</source>
+ <translation>Aktuális Widget Súgó</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>What&apos;s New in Qt Designer?</source>
+ <translation>Mi az újdonság a Qt Designer-ben?</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>About Plugins</source>
+ <translation>Beépülő modulokról</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <location line="+601"/>
+ <source>About Qt Designer</source>
+ <translation>Qt Designer-ről</translation>
+ </message>
+ <message>
+ <location line="-595"/>
+ <source>About Qt</source>
+ <translation>Qt-ról</translation>
+ </message>
+ <message>
+ <location line="+121"/>
+ <location line="+197"/>
+ <source>Open Form</source>
+ <translation>Űrlap megnyitása</translation>
+ </message>
+ <message>
+ <location line="-196"/>
+ <location line="+37"/>
+ <location line="+160"/>
+ <source>Designer UI files (*.%1);;All Files (*)</source>
+ <translation>Designer UI fájlok (*.%1);;Az összes fájl (*)</translation>
+ </message>
+ <message>
+ <location line="-620"/>
+ <source>%1 already exists.
+Do you want to replace it?</source>
+ <translation>%1 már létezik.
+Le szeretné cserélni?</translation>
+ </message>
+ <message>
+ <location line="+42"/>
+ <source>Additional Fonts...</source>
+ <translation>További betűk...</translation>
+ </message>
+ <message>
+ <location line="+303"/>
+ <source>&amp;Recent Forms</source>
+ <translation>&amp;Utóbbi űrlapok</translation>
+ </message>
+ <message>
+ <location line="+202"/>
+ <source>Designer</source>
+ <translation>Designer</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Feature not implemented yet!</source>
+ <translation>A tulajdonság még nincs implementálva!</translation>
+ </message>
+ <message>
+ <location line="+59"/>
+ <source>Read error</source>
+ <translation>Olvasási hiba</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>%1
+Do you want to update the file location or generate a new form?</source>
+ <translation>%1
+Szeretné frissíteni a fájl helyét vagy generálni egy új űrlapot?</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Update</source>
+ <translation>&amp;Frissítés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;New Form</source>
+ <translation>&amp;Új űrlap</translation>
+ </message>
+ <message>
+ <location line="+77"/>
+ <location line="+40"/>
+ <source>Save Form?</source>
+ <translation>Menti az űrlapot?</translation>
+ </message>
+ <message>
+ <location line="-39"/>
+ <source>Could not open file</source>
+ <translation>Nem sikerült megnyitni a fájlt</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Select New File</source>
+ <translation>Új fájl kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>Could not write file</source>
+ <translation>Nem sikerült írni a fájlt</translation>
+ </message>
+ <message>
+ <location line="+201"/>
+ <source>&amp;Close Preview</source>
+ <translation>Előnézet &amp;bezárása</translation>
+ </message>
+ <message>
+ <location line="-905"/>
+ <source>&amp;New...</source>
+ <translation>&amp;Új...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Open...</source>
+ <translation>&amp;Megnyitás...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Save</source>
+ <translation>&amp;Mentés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Save &amp;As...</source>
+ <translation>Mentés &amp;másként...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Save A&amp;ll</source>
+ <translation>Az ö&amp;sszes mentése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Save As &amp;Template...</source>
+ <translation>Mentés &amp;sablonként...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <location line="+901"/>
+ <source>&amp;Close</source>
+ <translation>&amp;Bezárás</translation>
+ </message>
+ <message>
+ <location line="-900"/>
+ <source>Save &amp;Image...</source>
+ <translation>&amp;Kép mentése...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Print...</source>
+ <translation>&amp;Nyomtatás...</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>View &amp;Code...</source>
+ <translation>&amp;Kód nézet...</translation>
+ </message>
+ <message>
+ <location line="+68"/>
+ <source>ALT+CTRL+S</source>
+ <translation>ALT+CTRL+S</translation>
+ </message>
+ <message>
+ <location line="+356"/>
+ <location line="+248"/>
+ <source>Save Form As</source>
+ <translation>Mentés űrlapként</translation>
+ </message>
+ <message>
+ <location line="+429"/>
+ <source>Preview failed</source>
+ <translation>Előnézet hiba</translation>
+ </message>
+ <message>
+ <location line="-575"/>
+ <source>Code generation failed</source>
+ <translation>Kód generálási hiba</translation>
+ </message>
+ <message>
+ <location line="+131"/>
+ <source>The file %1 could not be opened.
+Reason: %2
+Would you like to retry or select a different file?</source>
+ <translation>Nem sikerült megnyitni a(z) %1 fájlt.
+Ok: %2
+Meg szeretné újra próbálni vagy kiválasztani egy különböző fájlt?</translation>
+ </message>
+ <message>
+ <location line="+39"/>
+ <source>It was not possible to write the entire file %1 to disk.
+Reason:%2
+Would you like to retry?</source>
+ <translation>Nem lehetett az egész %1 fájlt a lemezre írni.
+Ok: %2
+Meg szeretné próbálni újra?</translation>
+ </message>
+ <message>
+ <location line="+158"/>
+ <location line="+34"/>
+ <source>Assistant</source>
+ <translation>Assistant</translation>
+ </message>
+ <message>
+ <location line="+47"/>
+ <location line="+23"/>
+ <source>The backup file %1 could not be written.</source>
+ <translation>Nem sikerült írni az archivált %1 fájlt.</translation>
+ </message>
+ <message>
+ <location line="+107"/>
+ <source>The backup directory %1 could not be created.</source>
+ <translation>Nem sikerült létrehozni a(z) %1 archivált könyvtárat.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>The temporary backup directory %1 could not be created.</source>
+ <translation>Nem sikerült létrehozni az átmeneti archivált %1 könyvtárat.</translation>
+ </message>
+ <message>
+ <location line="+54"/>
+ <source>Image files (*.%1)</source>
+ <translation>Kép fájlok (*.%1)</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <location line="+17"/>
+ <source>Save Image</source>
+ <translation>Kép mentése</translation>
+ </message>
+ <message>
+ <location line="-4"/>
+ <source>Saved image %1.</source>
+ <translation>Mentett kép: %1.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>The file %1 could not be written.</source>
+ <translation>Nem sikerült írni a(z) %1 fájlt.</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Please close all forms to enable the loading of additional fonts.</source>
+ <translation>Kérem zárja be az összes űrlapot további betűk betöltéséhez.</translation>
+ </message>
+ <message>
+ <location line="+52"/>
+ <source>Printed %1.</source>
+ <translation>Kinyomtatva: %1.</translation>
+ </message>
+</context>
+<context>
+ <name>QDesignerAppearanceOptionsPage</name>
+ <message>
+ <location filename="../tools/designer/src/designer/qdesigner_appearanceoptions.cpp" line="+138"/>
+ <source>Appearance</source>
+ <extracomment>Tab in preferences dialog</extracomment>
+ <translation>Megjelenés</translation>
+ </message>
+</context>
+<context>
+ <name>QDesignerAppearanceOptionsWidget</name>
+ <message>
+ <location line="-53"/>
+ <source>Docked Window</source>
+ <translation>Dokkolt ablak</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Multiple Top-Level Windows</source>
+ <translation>Összes felső szintű ablakok</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Toolwindow Font</source>
+ <translation>Eszköz ablak betű</translation>
+ </message>
+</context>
+<context>
+ <name>QDesignerAxWidget</name>
+ <message>
+ <location filename="../tools/designer/src/plugins/activeqt/qaxwidgettaskmenu.cpp" line="-71"/>
+ <source>Reset control</source>
+ <translation>Vezérlés újraindítása</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Set control</source>
+ <translation>Vezérlés beállítása</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/plugins/activeqt/qdesigneraxwidget.cpp" line="+179"/>
+ <source>Control loaded</source>
+ <translation>Vezérlés betöltve</translation>
+ </message>
+ <message>
+ <location line="+40"/>
+ <source>A COM exception occurred when executing a meta call of type %1, index %2 of &quot;%3&quot;.</source>
+ <translation>Egy COM kivétel történt a(z) %1 típusú meta hívás végrehajtása közben, &apos;%3&apos; %2 indexe.</translation>
+ </message>
+</context>
+<context>
+ <name>QDesignerFormBuilder</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_formbuilder.cpp" line="+89"/>
+ <source>Script errors occurred:</source>
+ <translation>Szkript hiba történt:</translation>
+ </message>
+ <message>
+ <location line="+307"/>
+ <source>The preview failed to build.</source>
+ <translation>Nem sikerült az előnézetet felépíteni.</translation>
+ </message>
+ <message>
+ <location line="+65"/>
+ <source>Designer</source>
+ <translation>Designer</translation>
+ </message>
+</context>
+<context>
+ <name>QDesignerFormWindow</name>
+ <message>
+ <location filename="../tools/designer/src/designer/qdesigner_formwindow.cpp" line="+217"/>
+ <source>%1 - %2[*]</source>
+ <translation>%1 - %2[*]</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Save Form?</source>
+ <translation>Űrlap mentése?</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Do you want to save the changes to this document before closing?</source>
+ <translation>El szeretné menteni a változtatásokat ebbe a dokumentumba a bezárás előtt?</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>If you don&apos;t save, your changes will be lost.</source>
+ <translation>Ha nem menti el, a változtatásai el fognak veszni.</translation>
+ </message>
+</context>
+<context>
+ <name>QDesignerMenu</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_menu.cpp" line="-1181"/>
+ <source>Type Here</source>
+ <translation>Gépelje be ide</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Add Separator</source>
+ <translation>Elválasztó hozzáadása</translation>
+ </message>
+ <message>
+ <location line="+371"/>
+ <source>Insert separator</source>
+ <translation>Elválasztó beszúrása</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Remove separator</source>
+ <translation>Elválasztó eltávolítása</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Remove action &apos;%1&apos;</source>
+ <translation>&apos;%1&apos; tevékenység eltávolítása</translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <location line="+650"/>
+ <source>Add separator</source>
+ <translation>Elválasztó hozzáadása</translation>
+ </message>
+ <message>
+ <location line="-348"/>
+ <source>Insert action</source>
+ <translation>Tevékenység beszúrása</translation>
+ </message>
+</context>
+<context>
+ <name>QDesignerMenuBar</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_menubar.cpp" line="-375"/>
+ <source>Type Here</source>
+ <translation>Gépelje be ide</translation>
+ </message>
+ <message>
+ <location line="+298"/>
+ <source>Remove Menu &apos;%1&apos;</source>
+ <translation>&apos;%1&apos; menü eltávolítása</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Remove Menu Bar</source>
+ <translation>Menü sáv eltávolítása</translation>
+ </message>
+ <message>
+ <location line="+70"/>
+ <source>Menu</source>
+ <translation>Menü</translation>
+ </message>
+</context>
+<context>
+ <name>QDesignerPluginManager</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/pluginmanager.cpp" line="+271"/>
+ <source>An XML error was encountered when parsing the XML of the custom widget %1: %2</source>
+ <translation>Egy XML hiba történt az egyéni %1 widget XML-ének elemzése közben: %2</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>A required attribute (&apos;%1&apos;) is missing.</source>
+ <translation>Egy szükséges attribútum (&apos;%1&apos;) hiányzik.</translation>
+ </message>
+ <message>
+ <location line="+38"/>
+ <source>An invalid property specification (&apos;%1&apos;) was encountered. Supported types: %2</source>
+ <translation>Egy érvénytelen tulajdonság specifikációt (&apos;%1&apos;) talált. Támogatott típusok: %2</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>&apos;%1&apos; is not a valid string property specification.</source>
+ <translation>&apos;%1&apos; nem egy érvényes sztring tulajdonság specifikáció.</translation>
+ </message>
+ <message>
+ <location line="+40"/>
+ <source>The XML of the custom widget %1 does not contain any of the elements &lt;widget&gt; or &lt;ui&gt;.</source>
+ <translation>Az egyéni %1 widget XML-je nem tartalmaz semmilyen elemet &lt;widget&gt; vagy &lt;ui&gt;.</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>The class attribute for the class %1 is missing.</source>
+ <translation>Az osztály attribútum %1 osztályra hiányzik.</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>The class attribute for the class %1 does not match the class name %2.</source>
+ <translation>Az osztály attribútum %1 osztályra nem egyezik meg a(z) %2 osztály nevével.</translation>
+ </message>
+</context>
+<context>
+ <name>QDesignerPropertySheet</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_propertysheet.cpp" line="+754"/>
+ <source>Dynamic Properties</source>
+ <translation>Dinamikus tulajdonságok</translation>
+ </message>
+</context>
+<context>
+ <name>QDesignerResource</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/qdesigner_resource.cpp" line="+461"/>
+ <source>The layout type &apos;%1&apos; is not supported, defaulting to grid.</source>
+ <translation>A(z) &apos;%1&apos; elrendezés típus nem támogatott, alapértelmezett rács.</translation>
+ </message>
+ <message>
+ <location line="+243"/>
+ <source>The container extension of the widget &apos;%1&apos; (%2) returned a widget not managed by Designer &apos;%3&apos; (%4) when queried for page #%5.
+Container pages should only be added by specifying them in XML returned by the domXml() method of the custom widget.</source>
+ <translation>A(z) &apos;%1&apos; (%2) widget konténer kiterjesztése egy olyan widget-et adott vissza, amelyet a(z) &apos;%3&apos; (%4) Designer nem kezel, %5 lap lekéréskor.
+Konténer lapokat XML-ben való specifikációjuk által kellene hozzáadni, az egyéni widget domXML() eljárása által.</translation>
+ </message>
+ <message>
+ <location line="+599"/>
+ <source>Unexpected element &lt;%1&gt;</source>
+ <extracomment>Parsing clipboard contents</extracomment>
+ <translation>Váratlan elem &lt;%1&gt;</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Error while pasting clipboard contents at line %1, column %2: %3</source>
+ <extracomment>Parsing clipboard contents</extracomment>
+ <translation>Hiba történt a vágólap tartalmának beillesztése közben a(z) %1 sorban, %2 oszlopban: %3</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Error while pasting clipboard contents: The root element &lt;ui&gt; is missing.</source>
+ <extracomment>Parsing clipboard contents</extracomment>
+ <translation>Hiba történt a vágólap tartalmának beillesztése közben. A rendszergazda elem &lt;ui&gt; hiányzik.</translation>
+ </message>
+</context>
+<context>
+ <name>QDesignerSharedSettings</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/shared_settings.cpp" line="+83"/>
+ <source>The template path %1 could not be created.</source>
+ <translation>Nem sikerült létrehozni a(z) %1 sablon útvonalat.</translation>
+ </message>
+ <message>
+ <location line="+184"/>
+ <source>An error has been encountered while parsing device profile XML: %1</source>
+ <translation>Hiba történt az eszköz profil %1 XML elemzése közben</translation>
+ </message>
+</context>
+<context>
+ <name>QDesignerToolWindow</name>
+ <message>
+ <location filename="../tools/designer/src/designer/qdesigner_toolwindow.cpp" line="+190"/>
+ <source>Property Editor</source>
+ <translation>Tulajdonság szerkesztő</translation>
+ </message>
+ <message>
+ <location line="+54"/>
+ <source>Action Editor</source>
+ <translation>Tevékenység szerkesztő</translation>
+ </message>
+ <message>
+ <location line="+42"/>
+ <source>Object Inspector</source>
+ <translation>Objektum felügyelő</translation>
+ </message>
+ <message>
+ <location line="+35"/>
+ <source>Resource Browser</source>
+ <translation>Erőforrás böngésző</translation>
+ </message>
+ <message>
+ <location line="+34"/>
+ <source>Signal/Slot Editor</source>
+ <translation>Jel/Szlot szerkesztő</translation>
+ </message>
+ <message>
+ <location line="+41"/>
+ <source>Widget Box</source>
+ <translation>Widget doboz</translation>
+ </message>
+</context>
+<context>
+ <name>QDesignerWorkbench</name>
+ <message>
+ <location filename="../tools/designer/src/designer/qdesigner_workbench.cpp" line="+199"/>
+ <source>&amp;File</source>
+ <translation>&amp;Fájl</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>F&amp;orm</source>
+ <translation>&amp;Å°rlap</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Preview in</source>
+ <translation>Előnézetben</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>&amp;Window</source>
+ <translation>&amp;Ablak</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>&amp;Help</source>
+ <translation>&amp;Súgó</translation>
+ </message>
+ <message>
+ <location line="-15"/>
+ <source>Edit</source>
+ <translation>Szerkesztés</translation>
+ </message>
+ <message>
+ <location line="+38"/>
+ <source>Toolbars</source>
+ <translation>Eszközsávok</translation>
+ </message>
+ <message>
+ <location line="+465"/>
+ <source>Save Forms?</source>
+ <translation>Űrlap mentése?</translation>
+ </message>
+ <message numerus="yes">
+ <location line="+1"/>
+ <source>There are %n forms with unsaved changes. Do you want to review these changes before quitting?</source>
+ <translation>
+ <numerusform>%n űrlapban vannak el nem mentett változtatások. Ãt szeretné tekintei ezeket a változtatásokat a kilépés elÅ‘tt?</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="-495"/>
+ <source>&amp;View</source>
+ <translation>&amp;Nézet</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>&amp;Settings</source>
+ <translation>&amp;Beállítások</translation>
+ </message>
+ <message>
+ <location line="+204"/>
+ <source>Widget Box</source>
+ <translation>Widget doboz</translation>
+ </message>
+ <message>
+ <location line="+292"/>
+ <source>If you do not review your documents, all your changes will be lost.</source>
+ <translation>Ha nem tekinti át újra a dokumentumokat, az összes változtatása el fog veszni.</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Discard Changes</source>
+ <translation>Változtatások eldobása</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Review Changes</source>
+ <translation>Változtatások áttekintése</translation>
+ </message>
+ <message>
+ <location line="+95"/>
+ <source>Backup Information</source>
+ <translation>Archiválási információ</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>The last session of Designer was not terminated correctly. Backup files were left behind. Do you want to load them?</source>
+ <translation>A Designer utolsó szakasza nem megfelelően állt le. Archivált fájlok hagyott maga után. Be szeretné tölteni őket?</translation>
+ </message>
+ <message>
+ <location line="+111"/>
+ <source>The file &lt;b&gt;%1&lt;/b&gt; could not be opened.</source>
+ <translation>A(z) &lt;b&gt;%1&lt;/b&gt; fájlt nem sikerült megnyitni.</translation>
+ </message>
+ <message>
+ <location line="+46"/>
+ <source>The file &lt;b&gt;%1&lt;/b&gt; is not a valid Designer UI file.</source>
+ <translation>A(z) &lt;b&gt;%1&lt;/b&gt; fájl nem egy érvényes Designer UI fájl.</translation>
+ </message>
+</context>
+<context>
+ <name>QFormBuilder</name>
+ <message>
+ <location filename="../tools/designer/src/lib/uilib/formbuilder.cpp" line="+163"/>
+ <source>An empty class name was passed on to %1 (object name: &apos;%2&apos;).</source>
+ <extracomment>Empty class name passed to widget factory method</extracomment>
+ <translation>Egy üres osztály név volt %1-ra (objektum név: &apos;%2&apos;).</translation>
+ </message>
+ <message>
+ <location line="+56"/>
+ <source>QFormBuilder was unable to create a custom widget of the class &apos;%1&apos;; defaulting to base class &apos;%2&apos;.</source>
+ <translation>QFormBuilder-nek nem sikerült létrehozni egy &apos;%1&apos; osztály egyéni widget-et, alapértelmezés a(z) &apos;%2&apos; alap osztályra.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>QFormBuilder was unable to create a widget of the class &apos;%1&apos;.</source>
+ <translation>QFormBuilder-nak nem sikerült létrehoznia egy &apos;%1&apos; osztály widget-et.</translation>
+ </message>
+ <message>
+ <location line="+61"/>
+ <source>The layout type `%1&apos; is not supported.</source>
+ <translation>A(z) &apos;%1&apos; elrendezés terv nem támogatott.</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/lib/uilib/properties.cpp" line="+106"/>
+ <source>The set-type property %1 could not be read.</source>
+ <translation>Nem sikerült olvasni a(z) %1 beállított típusú tulajdonságot.</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>The enumeration-type property %1 could not be read.</source>
+ <translation>A(z) %1 felsorolási típus tulajdonságot nem sikerült olvasni.</translation>
+ </message>
+ <message>
+ <location line="+190"/>
+ <source>Reading properties of the type %1 is not supported yet.</source>
+ <translation>&apos;%1&apos; típus tulajdonságok olvasása még nem támogatott.</translation>
+ </message>
+ <message>
+ <location line="+266"/>
+ <source>The property %1 could not be written. The type %2 is not supported yet.</source>
+ <translation>A(z) %1 tulajdonságot nem sikerült írni. A(z) %2 típus nem támogatott még.</translation>
+ </message>
+</context>
+<context>
+ <name>QStackedWidgetEventFilter</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_stackedbox.cpp" line="+194"/>
+ <source>Previous Page</source>
+ <translation>Előző lap</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Next Page</source>
+ <translation>Következő lap</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Delete</source>
+ <translation>Törlés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Before Current Page</source>
+ <translation>Aktuális lap előtt</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>After Current Page</source>
+ <translation>Aktuális lap után</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Change Page Order...</source>
+ <translation>Lap sorrend megváltoztatása...</translation>
+ </message>
+ <message>
+ <location line="+72"/>
+ <source>Change Page Order</source>
+ <translation>Lap sorrend megváltoztatása</translation>
+ </message>
+ <message>
+ <location line="+49"/>
+ <source>Page %1 of %2</source>
+ <translation>%2 %1 lapja</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <location line="+4"/>
+ <source>Insert Page</source>
+ <translation>Lap beszúrása</translation>
+ </message>
+</context>
+<context>
+ <name>QStackedWidgetPreviewEventFilter</name>
+ <message>
+ <location line="-153"/>
+ <source>Go to previous page of %1 &apos;%2&apos; (%3/%4).</source>
+ <translation>Ugrás a(z) %1 &apos;%2&apos; (%3/%4) előző lapjára.</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Go to next page of %1 &apos;%2&apos; (%3/%4).</source>
+ <translation>Ugrás a(z) %1 &apos;%2&apos; (%3/%4) következő lapjára.</translation>
+ </message>
+</context>
+<context>
+ <name>QTabWidgetEventFilter</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_tabwidget.cpp" line="+89"/>
+ <source>Delete</source>
+ <translation>Törlés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Before Current Page</source>
+ <translation>Aktuális lap előtt</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>After Current Page</source>
+ <translation>Aktuális lap után</translation>
+ </message>
+ <message>
+ <location line="+283"/>
+ <source>Page %1 of %2</source>
+ <translation>%2 %1 lapja</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <location line="+4"/>
+ <source>Insert Page</source>
+ <translation>Lap beszúrása</translation>
+ </message>
+</context>
+<context>
+ <name>QToolBoxHelper</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_toolbox.cpp" line="+64"/>
+ <source>Delete Page</source>
+ <translation>Lap törlése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Before Current Page</source>
+ <translation>Aktuális lap előtt</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>After Current Page</source>
+ <translation>Aktuális lap után</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Change Page Order...</source>
+ <translation>Lap sorrend megváltoztatása...</translation>
+ </message>
+ <message>
+ <location line="+116"/>
+ <source>Change Page Order</source>
+ <translation>Lap sorrend megváltoztatása</translation>
+ </message>
+ <message>
+ <location line="+44"/>
+ <source>Page %1 of %2</source>
+ <translation>%2 %1 lapja</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Insert Page</source>
+ <translation>Lap beszúrása</translation>
+ </message>
+</context>
+<context>
+ <name>QtBoolEdit</name>
+ <message>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp" line="+226"/>
+ <location line="+10"/>
+ <location line="+25"/>
+ <source>True</source>
+ <translation>Igaz</translation>
+ </message>
+ <message>
+ <location line="-25"/>
+ <location line="+25"/>
+ <source>False</source>
+ <translation>Hamis</translation>
+ </message>
+</context>
+<context>
+ <name>QtBoolPropertyManager</name>
+ <message>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertymanager.cpp" line="+1469"/>
+ <source>True</source>
+ <translation>Igaz</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>False</source>
+ <translation>Hamis</translation>
+ </message>
+</context>
+<context>
+ <name>QtCharEdit</name>
+ <message>
+ <location filename="../tools/shared/qtpropertybrowser/qteditorfactory.cpp" line="+1581"/>
+ <source>Clear Char</source>
+ <translation>Karakter ürítése</translation>
+ </message>
+</context>
+<context>
+ <name>QtColorEditWidget</name>
+ <message>
+ <location line="+605"/>
+ <source>...</source>
+ <translation>...</translation>
+ </message>
+</context>
+<context>
+ <name>QtColorPropertyManager</name>
+ <message>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertymanager.cpp" line="+4743"/>
+ <source>Red</source>
+ <translation>Piros</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Green</source>
+ <translation>Zöld</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Blue</source>
+ <translation>Kék</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Alpha</source>
+ <translation>Alfa</translation>
+ </message>
+</context>
+<context>
+ <name>QtCursorDatabase</name>
+ <message>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp" line="-206"/>
+ <source>Arrow</source>
+ <translation>Nyíl</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Up Arrow</source>
+ <translation>Felfele nyíl</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Cross</source>
+ <translation>Kereszt</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Wait</source>
+ <translation>Várakozás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>IBeam</source>
+ <translation>IBeam</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Size Vertical</source>
+ <translation>Vertikális méret</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Size Horizontal</source>
+ <translation>Horizontális méret</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Size Backslash</source>
+ <translation>Visszaper méret</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Size Slash</source>
+ <translation>Per méret</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Size All</source>
+ <translation>Az összes méret</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Blank</source>
+ <translation>Ãœres</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Split Vertical</source>
+ <translation>Vertikális feldarabolás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Split Horizontal</source>
+ <translation>Horizontális feldarabolás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Pointing Hand</source>
+ <translation>Mutató kéz</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Forbidden</source>
+ <translation>Tiltott</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Open Hand</source>
+ <translation>Nyitott kéz</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Closed Hand</source>
+ <translation>Zárt kéz</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>What&apos;s This</source>
+ <translation>Mi ez</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Busy</source>
+ <translation>Elfoglalt</translation>
+ </message>
+</context>
+<context>
+ <name>QtFontEditWidget</name>
+ <message>
+ <location filename="../tools/shared/qtpropertybrowser/qteditorfactory.cpp" line="+198"/>
+ <source>...</source>
+ <translation>...</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Select Font</source>
+ <translation>Betű kiválasztása</translation>
+ </message>
+</context>
+<context>
+ <name>QtFontPropertyManager</name>
+ <message>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertymanager.cpp" line="-351"/>
+ <source>Family</source>
+ <translation>Család</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Point Size</source>
+ <translation>Pont méret</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Bold</source>
+ <translation>Félkövér</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Italic</source>
+ <translation>DÅ‘lt</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Underline</source>
+ <translation>Aláhúzás</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Strikeout</source>
+ <translation>Kitalálás</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Kerning</source>
+ <translation>Szóközökkel feltöltés</translation>
+ </message>
+</context>
+<context>
+ <name>QtGradientDialog</name>
+ <message>
+ <location filename="../tools/shared/qtgradienteditor/qtgradientdialog.ui" line="+53"/>
+ <source>Edit Gradient</source>
+ <translation>Meredekség szerkesztése</translation>
+ </message>
+</context>
+<context>
+ <name>QtGradientEditor</name>
+ <message>
+ <location filename="../tools/shared/qtgradienteditor/qtgradienteditor.cpp" line="+431"/>
+ <source>Start X</source>
+ <translation>X indítása</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Start Y</source>
+ <translation>Y indítása</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Final X</source>
+ <translation>Végső X</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Final Y</source>
+ <translation>Végső Y</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <location line="+24"/>
+ <source>Central X</source>
+ <translation>X középpont</translation>
+ </message>
+ <message>
+ <location line="-20"/>
+ <location line="+24"/>
+ <source>Central Y</source>
+ <translation>Y középpont</translation>
+ </message>
+ <message>
+ <location line="-20"/>
+ <source>Focal X</source>
+ <translation>X gyújtópont</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Focal Y</source>
+ <translation>Y gyújtópont</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Radius</source>
+ <translation>Sugár</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Angle</source>
+ <translation>Szög</translation>
+ </message>
+ <message>
+ <location line="+288"/>
+ <source>Linear</source>
+ <translation>Lineáris</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Radial</source>
+ <translation>Sugárirányú</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Conical</source>
+ <translation>Kúp alakú</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Pad</source>
+ <translation>Lyuk</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Repeat</source>
+ <translation>Megismétlés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Reflect</source>
+ <translation>Prizma</translation>
+ </message>
+ <message>
+ <location filename="../tools/shared/qtgradienteditor/qtgradienteditor.ui" line="+53"/>
+ <source>Form</source>
+ <translation>Å°rlap</translation>
+ </message>
+ <message>
+ <location line="+48"/>
+ <source>Gradient Editor</source>
+ <translation>Meredekség szerkesztő</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>This area shows a preview of the gradient being edited. It also allows you to edit parameters specific to the gradient&apos;s type such as start and final point, radius, etc. by drag &amp; drop.</source>
+ <translation>Ez a mező jeleníti meg a meredekség egy előzetének szerkesztését. Ez engedélyezi a meredekség típusához tartozó paraméter specifikus dolgok szerkesztését, mint a kezdő és végpont, sugár, stb. a fogd &amp; vidd módszerrel.</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>1</source>
+ <translation>1</translation>
+ </message>
+ <message>
+ <location line="+35"/>
+ <source>2</source>
+ <translation>2</translation>
+ </message>
+ <message>
+ <location line="+35"/>
+ <source>3</source>
+ <translation>3</translation>
+ </message>
+ <message>
+ <location line="+35"/>
+ <source>4</source>
+ <translation>4</translation>
+ </message>
+ <message>
+ <location line="+35"/>
+ <source>5</source>
+ <translation>5</translation>
+ </message>
+ <message>
+ <location line="+35"/>
+ <source>Gradient Stops Editor</source>
+ <translation>Meredekség leállítás szerkesztő</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>This area allows you to edit gradient stops. Double click on the existing stop handle to duplicate it. Double click outside of the existing stop handles to create a new stop. Drag &amp; drop the handle to reposition it. Use right mouse button to popup context menu with extra actions.</source>
+ <translation>Ez a mező engedélyezi a meredekség leállításának szerkesztését.Dupla kattintás a létező leállítás kezelőn duplikálja ezt. Dupla kattintás a létező leállítás kezelőn kívül létrehoz egy új leállítást. Fogd &amp; vidd az újrapozíciónálo kezelőt. Használja a jobb egér gombot a felugró menü összefüggéshez extra tevékenységekkel.</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Zoom</source>
+ <translation>Zoom</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <location line="+3"/>
+ <source>Reset Zoom</source>
+ <translation>Újraindítás zoom</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Position</source>
+ <translation>Pozíció</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <location line="+49"/>
+ <location line="+22"/>
+ <source>Hue</source>
+ <translation>Színárnyalat</translation>
+ </message>
+ <message>
+ <location line="-68"/>
+ <source>H</source>
+ <translation>H</translation>
+ </message>
+ <message>
+ <location line="+87"/>
+ <location line="+49"/>
+ <source>Saturation</source>
+ <translation>Telítettség</translation>
+ </message>
+ <message>
+ <location line="-46"/>
+ <source>S</source>
+ <translation>S</translation>
+ </message>
+ <message>
+ <location line="+68"/>
+ <source>Sat</source>
+ <translation>Sat</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <location line="+49"/>
+ <source>Value</source>
+ <translation>Érték</translation>
+ </message>
+ <message>
+ <location line="-46"/>
+ <source>V</source>
+ <translation>V</translation>
+ </message>
+ <message>
+ <location line="+68"/>
+ <source>Val</source>
+ <translation>Val</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <location line="+49"/>
+ <location line="+22"/>
+ <source>Alpha</source>
+ <translation>Alfa</translation>
+ </message>
+ <message>
+ <location line="-68"/>
+ <source>A</source>
+ <translation>A</translation>
+ </message>
+ <message>
+ <location line="+81"/>
+ <source>Type</source>
+ <translation>Típus</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Spread</source>
+ <translation>Kiterjedés</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Color</source>
+ <translation>Szín</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Current stop&apos;s color</source>
+ <translation>Aktuális leállítás színe</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Show HSV specification</source>
+ <translation>HSV specifikáció megjelenítése</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>HSV</source>
+ <translation>HSV</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Show RGB specification</source>
+ <translation>RGB specifikáció megjelenítése</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>RGB</source>
+ <translation>RGB</translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <source>Current stop&apos;s position</source>
+ <translation>Aktuális leállítás pozíciója</translation>
+ </message>
+ <message>
+ <location line="+188"/>
+ <source>%</source>
+ <translation>%</translation>
+ </message>
+ <message>
+ <location line="+111"/>
+ <source>Zoom In</source>
+ <translation>Nagyítás</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Zoom Out</source>
+ <translation>Kicsinyítés</translation>
+ </message>
+ <message>
+ <location line="+35"/>
+ <source>Toggle details extension</source>
+ <translation>Részlet kiterjesztések kapcsolgatása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&gt;</source>
+ <translation>&gt;</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Linear Type</source>
+ <translation>Lineáris típus</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location line="+22"/>
+ <location line="+22"/>
+ <location line="+22"/>
+ <location line="+22"/>
+ <location line="+22"/>
+ <source>...</source>
+ <translation>...</translation>
+ </message>
+ <message>
+ <location line="-91"/>
+ <source>Radial Type</source>
+ <translation>Sugárirányú típus</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Conical Type</source>
+ <translation>Kúp alakú típus</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Pad Spread</source>
+ <translation>Lyuk kiterjedés</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Repeat Spread</source>
+ <translation>Ismétlési kiterjedés</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Reflect Spread</source>
+ <translation>Prizma kiterjedés</translation>
+ </message>
+</context>
+<context>
+ <name>QtGradientStopsWidget</name>
+ <message>
+ <location filename="../tools/shared/qtgradienteditor/qtgradientstopswidget.cpp" line="+947"/>
+ <source>New Stop</source>
+ <translation>Új leállítás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Delete</source>
+ <translation>Törlés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Flip All</source>
+ <translation>Az összes feldobása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Select All</source>
+ <translation>Az összes kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Zoom In</source>
+ <translation>Nagyítás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Zoom Out</source>
+ <translation>Kicsinyítés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Reset Zoom</source>
+ <translation>Zoom újraindítása</translation>
+ </message>
+</context>
+<context>
+ <name>QtGradientView</name>
+ <message>
+ <location filename="../tools/shared/qtgradienteditor/qtgradientview.cpp" line="+107"/>
+ <source>Grad</source>
+ <translation>Diplomás</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>Remove Gradient</source>
+ <translation>Meredekség eltávolítása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Are you sure you want to remove the selected gradient?</source>
+ <translation>El szeretné távolítani a kiválasztott meredekséget?</translation>
+ </message>
+ <message>
+ <location filename="../tools/shared/qtgradienteditor/qtgradientview.ui" line="+39"/>
+ <location filename="../tools/shared/qtgradienteditor/qtgradientview.cpp" line="+74"/>
+ <source>New...</source>
+ <translation>Új...</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <location filename="../tools/shared/qtgradienteditor/qtgradientview.cpp" line="+1"/>
+ <source>Edit...</source>
+ <translation>Szerkesztés...</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <location filename="../tools/shared/qtgradienteditor/qtgradientview.cpp" line="+1"/>
+ <source>Rename</source>
+ <translation>Ãtnevezés</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <location filename="../tools/shared/qtgradienteditor/qtgradientview.cpp" line="+1"/>
+ <source>Remove</source>
+ <translation>Eltávolítás</translation>
+ </message>
+ <message>
+ <location line="-83"/>
+ <source>Gradient View</source>
+ <translation>Meredekség nézet</translation>
+ </message>
+</context>
+<context>
+ <name>QtGradientViewDialog</name>
+ <message>
+ <location filename="../tools/shared/qtgradienteditor/qtgradientviewdialog.ui" line="+53"/>
+ <source>Select Gradient</source>
+ <translation>Meredekség kiválasztása</translation>
+ </message>
+</context>
+<context>
+ <name>QtKeySequenceEdit</name>
+ <message>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp" line="+221"/>
+ <source>Clear Shortcut</source>
+ <translation>Gyorsbillentyű kitisztítása</translation>
+ </message>
+</context>
+<context>
+ <name>QtLocalePropertyManager</name>
+ <message>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertymanager.cpp" line="-3541"/>
+ <source>%1, %2</source>
+ <translation>%1, %2</translation>
+ </message>
+ <message>
+ <location line="+53"/>
+ <source>Language</source>
+ <translation>Nyelv</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Country</source>
+ <translation>Ország</translation>
+ </message>
+</context>
+<context>
+ <name>QtPointFPropertyManager</name>
+ <message>
+ <location line="+411"/>
+ <source>(%1, %2)</source>
+ <translation>(%1, %2)</translation>
+ </message>
+ <message>
+ <location line="+71"/>
+ <source>X</source>
+ <translation>X</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Y</source>
+ <translation>Y</translation>
+ </message>
+</context>
+<context>
+ <name>QtPointPropertyManager</name>
+ <message>
+ <location line="-320"/>
+ <source>(%1, %2)</source>
+ <translation>(%1, %2)</translation>
+ </message>
+ <message>
+ <location line="+37"/>
+ <source>X</source>
+ <translation>X</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Y</source>
+ <translation>Y</translation>
+ </message>
+</context>
+<context>
+ <name>QtPropertyBrowserUtils</name>
+ <message>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp" line="-136"/>
+ <source>[%1, %2, %3] (%4)</source>
+ <translation>[%1, %2, %3] (%4)</translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>[%1, %2]</source>
+ <translation>[%1, %2]</translation>
+ </message>
+</context>
+<context>
+ <name>QtRectFPropertyManager</name>
+ <message>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertymanager.cpp" line="+1706"/>
+ <source>[(%1, %2), %3 x %4]</source>
+ <translation>[(%1, %2), %3 x %4]</translation>
+ </message>
+ <message>
+ <location line="+156"/>
+ <source>X</source>
+ <translation>X</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Y</source>
+ <translation>Y</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Width</source>
+ <translation>Szélesség</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Height</source>
+ <translation>Magasság</translation>
+ </message>
+</context>
+<context>
+ <name>QtRectPropertyManager</name>
+ <message>
+ <location line="-612"/>
+ <source>[(%1, %2), %3 x %4]</source>
+ <translation>[(%1, %2), %3 x %4]</translation>
+ </message>
+ <message>
+ <location line="+120"/>
+ <source>X</source>
+ <translation>X</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Y</source>
+ <translation>Y</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Width</source>
+ <translation>Szélesség</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Height</source>
+ <translation>Magasság</translation>
+ </message>
+</context>
+<context>
+ <name>QtResourceEditorDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qtresourceeditordialog.cpp" line="+76"/>
+ <source>%1 already exists.
+Do you want to replace it?</source>
+ <translation>%1 már létezik.
+Le szeretné cserélni?</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>The file does not appear to be a resource file; element &apos;%1&apos; was found where &apos;%2&apos; was expected.</source>
+ <translation>A fájl nem egy erőforrás fájl, &apos;%1&apos; elem található, ahol &apos;%2&apos; a várt.</translation>
+ </message>
+ <message>
+ <location line="+902"/>
+ <source>%1 [read-only]</source>
+ <translation>%1 [csak olvasható]</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <location line="+198"/>
+ <source>%1 [missing]</source>
+ <translation>%1 [hiányzik]</translation>
+ </message>
+ <message>
+ <location line="-72"/>
+ <source>&lt;no prefix&gt;</source>
+ <translation>&lt;nincs előtag&gt;</translation>
+ </message>
+ <message>
+ <location line="+320"/>
+ <location line="+566"/>
+ <source>New Resource File</source>
+ <translation>Új erőforrás fájl</translation>
+ </message>
+ <message>
+ <location line="-564"/>
+ <location line="+25"/>
+ <source>Resource files (*.qrc)</source>
+ <translation>Erőforrás fájlok (*.qrc)</translation>
+ </message>
+ <message>
+ <location line="-2"/>
+ <source>Import Resource File</source>
+ <translation>Erőforrás fájl importálása</translation>
+ </message>
+ <message>
+ <location line="+112"/>
+ <source>newPrefix</source>
+ <translation>újElőtag</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>&lt;p&gt;&lt;b&gt;Warning:&lt;/b&gt; The file&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;is outside of the current resource file&apos;s parent directory.&lt;/p&gt;</source>
+ <translation>&lt;p&gt;&lt;b&gt;Figyelmeztetés:&lt;/b&gt; A(z)&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;fájl az aktuális erőforrás fájl szülő könyvtárán kívül helyezkedik el.&lt;/p&gt;</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>&lt;p&gt;To resolve the issue, press:&lt;/p&gt;&lt;table&gt;&lt;tr&gt;&lt;th align=&quot;left&quot;&gt;Copy&lt;/th&gt;&lt;td&gt;to copy the file to the resource file&apos;s parent directory.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th align=&quot;left&quot;&gt;Copy As...&lt;/th&gt;&lt;td&gt;to copy the file into a subdirectory of the resource file&apos;s parent directory.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th align=&quot;left&quot;&gt;Keep&lt;/th&gt;&lt;td&gt;to use its current location.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</source>
+ <translation>&lt;p&gt;A hiba megoldásához, nyomja le a következőt:&lt;/p&gt;&lt;table&gt;&lt;tr&gt;&lt;th align=&quot;left&quot;&gt;Másolás&lt;/th&gt;&lt;td&gt;a fájl erőforrás fájljának szülőkönyvtárába másoláshoz.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th align=&quot;left&quot;&gt;Másolás másként...&lt;/th&gt;&lt;td&gt;a fájl erőforrás fájljának szülőkönyvtárának egy alkönyvtárába másoláshoz.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th align=&quot;left&quot;&gt;Megtartás&lt;/th&gt;&lt;td&gt;az aktuális helyének használatához. &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>Add Files</source>
+ <translation>Fájlok hozzáadása</translation>
+ </message>
+ <message>
+ <location line="+21"/>
+ <source>Incorrect Path</source>
+ <translation>Helytelen útvonal</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location line="+19"/>
+ <location line="+212"/>
+ <location line="+7"/>
+ <source>Copy</source>
+ <translation>Másolás</translation>
+ </message>
+ <message>
+ <location line="-236"/>
+ <source>Copy As...</source>
+ <translation>Másolás, mint...</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Keep</source>
+ <translation>Megtartás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Skip</source>
+ <translation>Kihagyás</translation>
+ </message>
+ <message>
+ <location line="+87"/>
+ <source>Clone Prefix</source>
+ <translation>Előtag klónozása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Enter the suffix which you want to add to the names of the cloned files.
+This could for example be a language extension like &quot;_de&quot;.</source>
+ <translation>Gépelje be az utótagot, melyet hozzá akar adni a klónozott fájl nevekhez.
+Ez például egy nyelv kiterjesztés lenne, úgy mint &quot;_de&quot;.</translation>
+ </message>
+ <message>
+ <location line="+113"/>
+ <location line="+4"/>
+ <source>Copy As</source>
+ <translation>Másolás, mint</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&lt;p&gt;The selected file:&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;is outside of the current resource file&apos;s directory:&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;p&gt;Please select another path within this directory.&lt;p&gt;</source>
+ <translation>&lt;p&gt;A kiválaszott fájl:&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;az aktuális erőforrás fájl könytárán kívül helyezkedik el:&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;p&gt;Kérem válasszon másik útvonalat ezen a könyvtáron belül.&lt;p&gt;</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Could not overwrite %1.</source>
+ <translation>Nem sikerült felülírni %1.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Could not copy
+%1
+to
+%2</source>
+ <translation>Nem sikerült másolni
+%1
+ide
+%2</translation>
+ </message>
+ <message>
+ <location line="+35"/>
+ <source>A parse error occurred at line %1, column %2 of %3:
+%4</source>
+ <translation>Egy elemzési hiba történt %3 %1 sorában, %2 oszlopában:
+%4</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Save Resource File</source>
+ <translation>Erőforrás fájl mentése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Could not write %1: %2</source>
+ <translation>Nem sikerült írni %1: %2</translation>
+ </message>
+ <message>
+ <location line="+33"/>
+ <source>Edit Resources</source>
+ <translation>Erőforrások szerkesztése</translation>
+ </message>
+ <message>
+ <location line="+35"/>
+ <source>New...</source>
+ <translation>Új...</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Open...</source>
+ <translation>Megnyitás...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Open Resource File</source>
+ <translation>Erőforrás fájl megnyitása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <location line="+11"/>
+ <source>Remove</source>
+ <translation>Eltávolítás</translation>
+ </message>
+ <message>
+ <location line="-10"/>
+ <location line="+11"/>
+ <source>Move Up</source>
+ <translation>Mozgatás felfelé</translation>
+ </message>
+ <message>
+ <location line="-10"/>
+ <location line="+11"/>
+ <source>Move Down</source>
+ <translation>Mozgatás lefelé</translation>
+ </message>
+ <message>
+ <location line="-9"/>
+ <location line="+1"/>
+ <source>Add Prefix</source>
+ <translation>Előtag hozzáadása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Add Files...</source>
+ <translation>Fájlok hozzáadása...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Change Prefix</source>
+ <translation>Előtag megváltoztatása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Change Language</source>
+ <translation>Nyelv megváltoztatása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Change Alias</source>
+ <translation>Ãlnév megváltoztatása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Clone Prefix...</source>
+ <translation>Előtag klónozása...</translation>
+ </message>
+ <message>
+ <location line="+37"/>
+ <source>Prefix / Path</source>
+ <translation>Előtag / Útvonal</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Language / Alias</source>
+ <translation>Nyelv / Ãlnév</translation>
+ </message>
+ <message>
+ <location line="+117"/>
+ <source>&lt;html&gt;&lt;p&gt;&lt;b&gt;Warning:&lt;/b&gt; There have been problems while reloading the resources:&lt;/p&gt;&lt;pre&gt;%1&lt;/pre&gt;&lt;/html&gt;</source>
+ <translation>&lt;html&gt;&lt;p&gt;&lt;b&gt;Figyelmeztetés:&lt;/b&gt; Hibák történtek az erőforrások újra töltése közben:&lt;/p&gt;&lt;pre&gt;%1&lt;/pre&gt;&lt;/html&gt;</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Resource Warning</source>
+ <translation>Erőforrás figyelmeztetés</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qtresourceeditordialog.ui" line="+13"/>
+ <source>Dialog</source>
+ <translation>Párbeszéd ablak</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>New File</source>
+ <translation>Új fájl</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location line="+50"/>
+ <source>N</source>
+ <translation>N</translation>
+ </message>
+ <message>
+ <location line="-43"/>
+ <source>Remove File</source>
+ <translation>Fájl eltávolítása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location line="+57"/>
+ <source>R</source>
+ <translation>R</translation>
+ </message>
+ <message>
+ <location line="-34"/>
+ <source>I</source>
+ <translation>I</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>New Resource</source>
+ <translation>Új erőforrás</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>A</source>
+ <translation>A</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Remove Resource or File</source>
+ <translation>Erőforrás vagy fájl eltávolítása</translation>
+ </message>
+</context>
+<context>
+ <name>QtResourceView</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qtresourceview.cpp" line="+566"/>
+ <source>Size: %1 x %2
+%3</source>
+ <translation>Méret: %1 x %2
+%3</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Edit Resources...</source>
+ <translation>Erőforrások szerkesztése...</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Reload</source>
+ <translation>Újratöltés</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Copy Path</source>
+ <translation>Útvonal másolása</translation>
+ </message>
+</context>
+<context>
+ <name>QtResourceViewDialog</name>
+ <message>
+ <location line="+250"/>
+ <source>Select Resource</source>
+ <translation>Erőforrás kiválasztása</translation>
+ </message>
+</context>
+<context>
+ <name>QtSizeFPropertyManager</name>
+ <message>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertymanager.cpp" line="-535"/>
+ <source>%1 x %2</source>
+ <translation>%1 x %2</translation>
+ </message>
+ <message>
+ <location line="+130"/>
+ <source>Width</source>
+ <translation>Szélesség</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Height</source>
+ <translation>Magasság</translation>
+ </message>
+</context>
+<context>
+ <name>QtSizePolicyPropertyManager</name>
+ <message>
+ <location line="+1709"/>
+ <location line="+1"/>
+ <source>&lt;Invalid&gt;</source>
+ <translation>&lt;Érvénytelen&gt;</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>[%1, %2, %3, %4]</source>
+ <translation>[%1, %2, %3, %4]</translation>
+ </message>
+ <message>
+ <location line="+45"/>
+ <source>Horizontal Policy</source>
+ <translation>Horizontális irányvonal</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Vertical Policy</source>
+ <translation>Vertikális irányelv</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Horizontal Stretch</source>
+ <translation>Horizontális terjedelem</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Vertical Stretch</source>
+ <translation>Vertikális terjedelem</translation>
+ </message>
+</context>
+<context>
+ <name>QtSizePropertyManager</name>
+ <message>
+ <location line="-2286"/>
+ <source>%1 x %2</source>
+ <translation>%1 x %2</translation>
+ </message>
+ <message>
+ <location line="+96"/>
+ <source>Width</source>
+ <translation>Szélesség</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Height</source>
+ <translation>Magasság</translation>
+ </message>
+</context>
+<context>
+ <name>QtToolBarDialog</name>
+ <message>
+ <location filename="../tools/shared/qttoolbardialog/qttoolbardialog.cpp" line="+1240"/>
+ <source>Custom Toolbar</source>
+ <translation>Egyéni eszköz sáv</translation>
+ </message>
+ <message>
+ <location line="+544"/>
+ <source>&lt; S E P A R A T O R &gt;</source>
+ <translation>&lt; E L V à L A S Z T Ó &gt;</translation>
+ </message>
+ <message>
+ <location filename="../tools/shared/qttoolbardialog/qttoolbardialog.ui" line="+13"/>
+ <source>Customize Toolbars</source>
+ <translation>Eszköz sávok testreszabása</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>1</source>
+ <translation>1</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Actions</source>
+ <translation>Tevékenységek</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Toolbars</source>
+ <translation>Eszköz sávok</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Add new toolbar</source>
+ <translation>Új eszköz sáv hozzáadása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>New</source>
+ <translation>Új</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Remove selected toolbar</source>
+ <translation>Kiválaszott eszköz sáv eltávolítás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Remove</source>
+ <translation>Eltávolítás</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Rename toolbar</source>
+ <translation>Eszköz sáv átnevezése</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Rename</source>
+ <translation>Ãtnevezés</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Move action up</source>
+ <translation>Tevékenység mozgatása felfelé</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Up</source>
+ <translation>Fel</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Remove action from toolbar</source>
+ <translation>Tevékenység eltávolítása az eszköz sávról</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&lt;-</source>
+ <translation>&lt;-</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Add action to toolbar</source>
+ <translation>Tevékenység hozzáadása az eszközsávhoz</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>-&gt;</source>
+ <translation>-&gt;</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Move action down</source>
+ <translation>Tevékenység mozgatása felfele</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Down</source>
+ <translation>Le</translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>Current Toolbar Actions</source>
+ <translation>Aktuális eszköz sáv tevékenységek</translation>
+ </message>
+</context>
+<context>
+ <name>QtTreePropertyBrowser</name>
+ <message>
+ <location filename="../tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp" line="+442"/>
+ <source>Property</source>
+ <translation>Tulajdonság</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Value</source>
+ <translation>Érték</translation>
+ </message>
+</context>
+<context>
+ <name>SaveFormAsTemplate</name>
+ <message>
+ <location filename="../tools/designer/src/designer/saveformastemplate.cpp" line="+72"/>
+ <source>Add path...</source>
+ <translation>Útvonal hozzáadása...</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Template Exists</source>
+ <translation>A sablon létezik</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A template with the name %1 already exists.
+Do you want overwrite the template?</source>
+ <translation>Egy %1 nevű sablon már létezik.
+Felül szeretné írni a sablont?</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Overwrite Template</source>
+ <translation>Sablom felülírása</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Open Error</source>
+ <translation>Megnyitási hiba</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>There was an error opening template %1 for writing. Reason: %2</source>
+ <translation>Hiba történt a(z) %1 sablon írásra megnyitása közben. Ok: %2</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Write Error</source>
+ <translation>Ãrása hiba</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>There was an error writing the template %1 to disk. Reason: %2</source>
+ <translation>Hiba történt a(z) %1 sablon lemezre írása közben. Ok: %2</translation>
+ </message>
+ <message>
+ <location line="+27"/>
+ <source>Pick a directory to save templates in</source>
+ <translation>Egy könyvtár gondos kiválasztása, melybe a könytárak lesznek elmentve</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/designer/saveformastemplate.ui" line="+45"/>
+ <source>Save Form As Template</source>
+ <translation>Az űrlap sablonként mentése</translation>
+ </message>
+ <message>
+ <location line="+49"/>
+ <source>&amp;Category:</source>
+ <translation>&amp;Kategória:</translation>
+ </message>
+ <message>
+ <location line="-35"/>
+ <source>&amp;Name:</source>
+ <translation>&amp;Név:</translation>
+ </message>
+</context>
+<context>
+ <name>ScriptErrorDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/scripterrordialog.cpp" line="+59"/>
+ <source>An error occurred while running the scripts for &quot;%1&quot;:
+</source>
+ <translation>Hiba történt a szkriptek futtatása közben &apos;%1&apos;-re:</translation>
+ </message>
+</context>
+<context>
+ <name>SelectSignalDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/selectsignaldialog.ui" line="+14"/>
+ <source>Go to slot</source>
+ <translation>Szlotra ugrás</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Select signal</source>
+ <translation>Jel kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>signal</source>
+ <translation>jel</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>class</source>
+ <translation>osztály</translation>
+ </message>
+</context>
+<context>
+ <name>SignalSlotConnection</name>
+ <message>
+ <location filename="../tools/designer/src/components/signalsloteditor/signalsloteditor.cpp" line="-358"/>
+ <source>SENDER(%1), SIGNAL(%2), RECEIVER(%3), SLOT(%4)</source>
+ <translation>KÃœLDÅ(%1), JEL(%2), FOGADÓ(%3), SZLOT(%4)</translation>
+ </message>
+</context>
+<context>
+ <name>SignalSlotDialogClass</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/signalslotdialog.ui" line="+13"/>
+ <source>Signals and slots</source>
+ <translation>Jelek és szlotok</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Slots</source>
+ <translation>Szlotok</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <location line="+49"/>
+ <source>Add</source>
+ <translation>Hozzáadás</translation>
+ </message>
+ <message>
+ <location line="-46"/>
+ <location line="+10"/>
+ <location line="+39"/>
+ <location line="+10"/>
+ <source>...</source>
+ <translation>...</translation>
+ </message>
+ <message>
+ <location line="-52"/>
+ <location line="+49"/>
+ <source>Delete</source>
+ <translation>Törlés</translation>
+ </message>
+ <message>
+ <location line="-21"/>
+ <source>Signals</source>
+ <translation>Jelek</translation>
+ </message>
+</context>
+<context>
+ <name>Spacer</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/spacer_widget.cpp" line="+275"/>
+ <source>Horizontal Spacer &apos;%1&apos;, %2 x %3</source>
+ <translation>Horizontális távtartók &apos;%1&apos;, %2 x %3</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Vertical Spacer &apos;%1&apos;, %2 x %3</source>
+ <translation>Vertikális távtartók &apos;%1&apos;, %2 x %3</translation>
+ </message>
+</context>
+<context>
+ <name>TemplateOptionsPage</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/templateoptionspage.cpp" line="+156"/>
+ <source>Template Paths</source>
+ <extracomment>Tab in preferences dialog</extracomment>
+ <translatorcomment>Слово &quot;пути&quot; опуÑтил, Ñ‚.к. Ñ Ð´Ñ€ÑƒÐ³Ð¸Ð¼Ð¸ вкладками не перепутать, а Ð´Ð»Ð¸Ð½Ð½Ð°Ñ Ð²ÐºÐ»Ð°Ð´ÐºÐ° не ÑмотритÑÑ.</translatorcomment>
+ <translation>Sablon útvonalak</translation>
+ </message>
+</context>
+<context>
+ <name>ToolBarManager</name>
+ <message>
+ <location filename="../tools/designer/src/designer/mainwindow.cpp" line="+89"/>
+ <source>Configure Toolbars...</source>
+ <translation>Eszköz sávok konfigurálása...</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Window</source>
+ <translation>Ablak</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Help</source>
+ <translation>Súgó</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Style</source>
+ <translation>Stílus</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Dock views</source>
+ <translation>Dokk nézetek</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Toolbars</source>
+ <translation>Eszköz sávok</translation>
+ </message>
+</context>
+<context>
+ <name>VersionDialog</name>
+ <message>
+ <location filename="../tools/designer/src/designer/versiondialog.cpp" line="+171"/>
+ <source>&lt;h3&gt;%1&lt;/h3&gt;&lt;br/&gt;&lt;br/&gt;Version %2</source>
+ <translation>&lt;h3&gt;%1&lt;/h3&gt;&lt;br/&gt;&lt;br/&gt;Verzió %2</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Qt Designer</source>
+ <translation>Qt Designer</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&lt;br/&gt;Qt Designer is a graphical user interface designer for Qt applications.&lt;br/&gt;</source>
+ <translation>&lt;br/&gt;Qt Designer egy grafikus felhasználói felület tervező Qt alkalmazásokhoz.&lt;br/&gt;</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>%1&lt;br/&gt;Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</source>
+ <translation>%1&lt;br/&gt;Szerzői jog (C) 2010 Nokia vállalat és/vagy leányvállalata(i).</translation>
+ </message>
+</context>
+<context>
+ <name>WidgetDataBase</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/widgetdatabase.cpp" line="+814"/>
+ <source>The file contains a custom widget &apos;%1&apos; whose base class (%2) differs from the current entry in the widget database (%3). The widget database is left unchanged.</source>
+ <translation>A fájl egy egyéni &apos;%1&apos; widget-t tartalmaz, aminek az alap osztálya (%2) különbözik az aktuális beviteltől a widget adatbázisban (%3). A widget adatbázis változatlanul lett hagyva.</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ActionEditor</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/actioneditor.cpp" line="+123"/>
+ <source>New...</source>
+ <translation>Új...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Edit...</source>
+ <translation>Szerkesztés...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Go to slot...</source>
+ <translation>Ugrás a szlotra...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy</source>
+ <translation>Másolás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Cut</source>
+ <translation>Kivágás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Paste</source>
+ <translation>Beillesztés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Select all</source>
+ <translation>Az összes kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Delete</source>
+ <translation>Törlés</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Actions</source>
+ <translation>Tevékenységek</translation>
+ </message>
+ <message>
+ <location line="+49"/>
+ <source>Configure Action Editor</source>
+ <translation>Tevékenység szerkesztő konfigurálása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Icon View</source>
+ <translation>Ikon nézet</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Detailed View</source>
+ <translation>Részletezett nézet</translation>
+ </message>
+ <message>
+ <location line="+246"/>
+ <source>New action</source>
+ <translation>Új tevékenység</translation>
+ </message>
+ <message>
+ <location line="+98"/>
+ <source>Edit action</source>
+ <translation>Tevékenység szerkesztése</translation>
+ </message>
+ <message>
+ <location line="+69"/>
+ <source>Remove action &apos;%1&apos;</source>
+ <translation>&apos;%1&apos; tevékenység eltávolítása</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Remove actions</source>
+ <translation>Tevékenységek eltávolítása</translation>
+ </message>
+ <message>
+ <location line="+186"/>
+ <source>Used In</source>
+ <translation>Használva ebben</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ActionModel</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/actionrepository.cpp" line="+95"/>
+ <source>Name</source>
+ <translation>Név</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Used</source>
+ <translation>Használt</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Text</source>
+ <translation>Szöveg</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Shortcut</source>
+ <translation>Rövidebb út</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Checkable</source>
+ <translation>Leellenőrizhető</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>ToolTip</source>
+ <translation>Eszköz tipp</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::BrushManagerProxy</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/brushmanagerproxy.cpp" line="+219"/>
+ <source>The element &apos;%1&apos; is missing the required attribute &apos;%2&apos;.</source>
+ <translation>A(z) &apos;%1&apos; elem hiányzik, a szükséges attribútum &apos;%2&apos;.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Empty brush name encountered.</source>
+ <translation>Üres kefe nevet talált.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>An unexpected element &apos;%1&apos; was encountered.</source>
+ <translation>Egy &apos;%1&apos; váratlan elemet talált.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>An error occurred when reading the brush definition file &apos;%1&apos; at line line %2, column %3: %4</source>
+ <translation>Hiba történt a(z) &apos;%1&apos; ecset definíciós fájl olvasása közben %2 sorban, %3 oszlopban: %4</translation>
+ </message>
+ <message>
+ <location line="+43"/>
+ <source>An error occurred when reading the resource file &apos;%1&apos; at line %2, column %3: %4</source>
+ <translation>Hiba történt a(z) &apos;%1&apos; erőforrás fájl olvasása közben, %2 sorban, %3 oszlopban: %4</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::BuddyEditor</name>
+ <message>
+ <location filename="../tools/designer/src/components/buddyeditor/buddyeditor.cpp" line="+261"/>
+ <source>Add buddy</source>
+ <translation>Haver hozzáadása</translation>
+ </message>
+ <message>
+ <location line="+52"/>
+ <source>Remove buddies</source>
+ <translation>Haverok eltávolítása</translation>
+ </message>
+ <message numerus="yes">
+ <location line="+24"/>
+ <source>Remove %n buddies</source>
+ <translation>
+ <numerusform>%n haverok eltávolítása</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <location line="+51"/>
+ <source>Add %n buddies</source>
+ <translation>
+ <numerusform>%n haver hozzáadása</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+47"/>
+ <source>Set automatically</source>
+ <translation>Automatikus beállítás</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::BuddyEditorPlugin</name>
+ <message>
+ <location filename="../tools/designer/src/components/buddyeditor/buddyeditor_plugin.cpp" line="+73"/>
+ <source>Edit Buddies</source>
+ <translation>Haverok szerkesztése</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::BuddyEditorTool</name>
+ <message>
+ <location filename="../tools/designer/src/components/buddyeditor/buddyeditor_tool.cpp" line="+56"/>
+ <source>Edit Buddies</source>
+ <translation>Haverok szerkesztése</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ButtonGroupMenu</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/button_taskmenu.cpp" line="+7"/>
+ <source>Select members</source>
+ <translation>Tagok kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Break</source>
+ <translation>Törés</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ButtonTaskMenu</name>
+ <message>
+ <location line="+121"/>
+ <source>Assign to button group</source>
+ <translation>Gomb csoporthoz rendelés</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Button group</source>
+ <translation>Gomb csoport</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>New button group</source>
+ <translation>Új gomb csoport</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Change text...</source>
+ <translation>Szöveg megváltoztatása...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>None</source>
+ <translation>Semmi</translation>
+ </message>
+ <message>
+ <location line="+101"/>
+ <source>Button group &apos;%1&apos;</source>
+ <translation>&apos;%1&apos; gomb csoport</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::CodeDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/codedialog.cpp" line="+95"/>
+ <source>Save...</source>
+ <translation>Mentés...</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Copy All</source>
+ <translation>Az összes másolása</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&amp;Find in Text...</source>
+ <translation>&amp;Keresés szövegben...</translation>
+ </message>
+ <message>
+ <location line="+75"/>
+ <source>A temporary form file could not be created in %1.</source>
+ <translation>Egy átmeneti űrlap fájlt nem sikerült létrehozni %1-ben.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>The temporary form file %1 could not be written.</source>
+ <translation>A(z) %1 átmeneti űrlap fájlt nem sikerült írni.</translation>
+ </message>
+ <message>
+ <location line="+21"/>
+ <source>%1 - [Code]</source>
+ <translation>%1 - [Kód]</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Save Code</source>
+ <translation>Kód mentése</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Header Files (*.%1)</source>
+ <translation>Fejállományok (*.%1)</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>The file %1 could not be opened: %2</source>
+ <translation>A(z) %1 fájlt nem sikerült megnyitni: %2</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>The file %1 could not be written: %2</source>
+ <translation>A(z) %1 fájlt nem sikerült írni: %2</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>%1 - Error</source>
+ <translation>%1 - Hiba</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ColorAction</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/richtexteditor.cpp" line="+246"/>
+ <source>Text Color</source>
+ <translation>Szöveg szín</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ComboBoxTaskMenu</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/combobox_taskmenu.cpp" line="+68"/>
+ <source>Edit Items...</source>
+ <translation>Elemek szerkesztése...</translation>
+ </message>
+ <message>
+ <location line="+38"/>
+ <source>Change Combobox Contents</source>
+ <translation>Combobox tartalmának megváltoztatása</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::CommandLinkButtonTaskMenu</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/button_taskmenu.cpp" line="+156"/>
+ <source>Change description...</source>
+ <translation>Leírás megváltoztatása...</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ConnectionEdit</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/connectionedit.cpp" line="+1313"/>
+ <source>Select All</source>
+ <translation>Az összes kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Deselect All</source>
+ <translation>Az összes kijelölés eltűntetése</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Delete</source>
+ <translation>Törlés</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ConnectionModel</name>
+ <message>
+ <location filename="../tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp" line="-465"/>
+ <source>Sender</source>
+ <translation>Küldő</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Signal</source>
+ <translation>Jel</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Receiver</source>
+ <translation>Fogadó</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Slot</source>
+ <translation>Szlot</translation>
+ </message>
+ <message>
+ <location line="+90"/>
+ <source>&lt;sender&gt;</source>
+ <translation>&lt;küldő&gt;</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&lt;signal&gt;</source>
+ <translation>&lt;jel&gt;</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&lt;receiver&gt;</source>
+ <translation>&lt;fogadó&gt;</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&lt;slot&gt;</source>
+ <translation>&lt;szlot&gt;</translation>
+ </message>
+ <message>
+ <location line="+108"/>
+ <source>The connection already exists!&lt;br&gt;%1</source>
+ <translation>A kapcsolat már létezik!&lt;br&gt;%1</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Signal and Slot Editor</source>
+ <translation>Jel és Szlot szerkesztő</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ContainerWidgetTaskMenu</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/containerwidget_taskmenu.cpp" line="+79"/>
+ <source>Delete</source>
+ <translation>Törlés</translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>Insert</source>
+ <translation>Beszúrás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Insert Page Before Current Page</source>
+ <translation>Lap beszúrása az aktuális lap elé</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Insert Page After Current Page</source>
+ <translation>Lap beszúrása az aktuális lap után</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Add Subwindow</source>
+ <translation>Alablak hozzáadása</translation>
+ </message>
+ <message>
+ <location line="+38"/>
+ <source>Subwindow</source>
+ <translation>Al ablak</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Page</source>
+ <translation>Lap</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Page %1 of %2</source>
+ <translation>%2 %1 lapja</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::DPI_Chooser</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/dpi_chooser.cpp" line="+27"/>
+ <source>System (%1 x %2)</source>
+ <extracomment>System resolution</extracomment>
+ <translation>Rendszer (%1 x %2)</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>User defined</source>
+ <translation>Felhasználó által definiált</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source> x </source>
+ <extracomment>DPI X/Y separator</extracomment>
+ <translation> x </translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::DesignerPropertyManager</name>
+ <message>
+ <location filename="../tools/designer/src/components/propertyeditor/designerpropertymanager.cpp" line="+647"/>
+ <location line="+6"/>
+ <source>AlignLeft</source>
+ <translation>IgazításBalra</translation>
+ </message>
+ <message>
+ <location line="-5"/>
+ <source>AlignHCenter</source>
+ <translation>IgazításHKözépre</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>AlignRight</source>
+ <translation>IgazításJobbra</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>AlignJustify</source>
+ <translation>IgazításFeloldása</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>AlignTop</source>
+ <translation>IgazításTetejére</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <location line="+4"/>
+ <source>AlignVCenter</source>
+ <translation>IgazításVKözépre</translation>
+ </message>
+ <message>
+ <location line="-3"/>
+ <source>AlignBottom</source>
+ <translation>IgazításAlulra</translation>
+ </message>
+ <message>
+ <location line="+565"/>
+ <source>%1, %2</source>
+ <translation>%1, %2</translation>
+ </message>
+ <message numerus="yes">
+ <location line="+6"/>
+ <source>Customized (%n roles)</source>
+ <translation>
+ <numerusform>Testreszabva (%n szabály)</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Inherited</source>
+ <translation>Örökölt</translation>
+ </message>
+ <message>
+ <location line="+566"/>
+ <source>Horizontal</source>
+ <translation>Horizontális</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Vertical</source>
+ <translation>Vertikális</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Normal Off</source>
+ <translation>Normál ki</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Normal On</source>
+ <translation>Normál be</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Disabled Off</source>
+ <translation>Tiltás ki</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Disabled On</source>
+ <translation>Tiltás be</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Active Off</source>
+ <translation>Aktív ki</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Active On</source>
+ <translation>Aktív be</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Selected Off</source>
+ <translation>Kiválasztás ki</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Selected On</source>
+ <translation>Kiválasztás be</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <location line="+21"/>
+ <source>translatable</source>
+ <translation>fordítható</translation>
+ </message>
+ <message>
+ <location line="-15"/>
+ <location line="+21"/>
+ <source>disambiguation</source>
+ <translation>Nem félreérthető</translation>
+ </message>
+ <message>
+ <location line="-15"/>
+ <location line="+21"/>
+ <source>comment</source>
+ <translation>megjegyzés</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::DeviceProfileDialog</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/deviceprofiledialog.cpp" line="+63"/>
+ <source>Device Profiles (*.%1)</source>
+ <translation>Eszköz profilok (*.%1)</translation>
+ </message>
+ <message>
+ <location line="+31"/>
+ <source>Default</source>
+ <translation>Alapértelmezett</translation>
+ </message>
+ <message>
+ <location line="+67"/>
+ <source>Save Profile</source>
+ <translation>Profil mentése</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Save Profile - Error</source>
+ <translation>Profil mentése - Hiba</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Unable to open the file &apos;%1&apos; for writing: %2</source>
+ <translation>Nem lehet megnyitni a(z) &apos;%1&apos; fájlt írásra: %2</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Open profile</source>
+ <translation>Profil megnyitása</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <location line="+6"/>
+ <source>Open Profile - Error</source>
+ <translation>Profil megnyitása - Hiba</translation>
+ </message>
+ <message>
+ <location line="-6"/>
+ <source>Unable to open the file &apos;%1&apos; for reading: %2</source>
+ <translation>Nem lehet megnyitni a(z) &apos;%1&apos; fájlt olvasásra: %2</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>&apos;%1&apos; is not a valid profile: %2</source>
+ <translation>&apos;%1&apos; nem egy érvényes profil: %2</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::Dialog</name>
+ <message>
+ <location filename="../tools/designer/src/components/propertyeditor/stringlisteditor.ui" line="+53"/>
+ <source>Dialog</source>
+ <translation>Párbeszéd ablak</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>StringList</source>
+ <translation>Sztring lista</translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <source>New String</source>
+ <translation>Új Sztring</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;New</source>
+ <translation>&amp;Új</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Delete String</source>
+ <translation>Sztring törlése</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Delete</source>
+ <translation>&amp;Törlés</translation>
+ </message>
+ <message>
+ <location line="+33"/>
+ <source>&amp;Value:</source>
+ <translation>&amp;Érték:</translation>
+ </message>
+ <message>
+ <location line="+38"/>
+ <source>Move String Up</source>
+ <translation>Sztring felfelé mozgatása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Up</source>
+ <translation>Fel</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Move String Down</source>
+ <translation>Sztring lefelé mozgatása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Down</source>
+ <translation>Le</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::EmbeddedOptionsControl</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/embeddedoptionspage.cpp" line="-260"/>
+ <source>None</source>
+ <translation>Semmi</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Add a profile</source>
+ <translation>Egy profil hozzáadása</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Edit the selected profile</source>
+ <translation>A kiválasztott profil szerkesztése</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Delete the selected profile</source>
+ <translation>A kiválasztott profil törlése</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Add Profile</source>
+ <translation>Profil hozzáadása</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>New profile</source>
+ <translation>Új profil</translation>
+ </message>
+ <message>
+ <location line="+35"/>
+ <source>Edit Profile</source>
+ <translation>Profil szerkesztése</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>Delete Profile</source>
+ <translation>Profil törlése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Would you like to delete the profile &apos;%1&apos;?</source>
+ <translation>Törölni szeretné a(z) &apos;%1&apos; profilet?</translation>
+ </message>
+ <message>
+ <location line="+55"/>
+ <source>Default</source>
+ <translation>Alapértelmezett</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::FilterWidget</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/filterwidget.cpp" line="+185"/>
+ <source>&lt;Filter&gt;</source>
+ <translation>&lt;Szűrő&gt;</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::FormEditor</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/formeditor.cpp" line="+190"/>
+ <source>Resource File Changed</source>
+ <translation>Erőforrás fájl megváltoztatva</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>The file &quot;%1&quot; has changed outside Designer. Do you want to reload it?</source>
+ <translation>A(z) &apos;%1&apos; fájl megváltoztatták a Designer-en kívül. Újra szeretné tölteni?</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::FormLayoutMenu</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/formlayoutmenu.cpp" line="+24"/>
+ <source>Add form layout row...</source>
+ <translation>Űrlap elrendezési sor hozzáadása...</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::FormWindow</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/formwindow.cpp" line="-1267"/>
+ <source>Edit contents</source>
+ <translation>Tartalom szerkesztése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>F2</source>
+ <translation>F2</translation>
+ </message>
+ <message>
+ <location line="+774"/>
+ <source>Insert widget &apos;%1&apos;</source>
+ <translation>&apos;%1&apos; widget beszúrása</translation>
+ </message>
+ <message>
+ <location line="+67"/>
+ <source>Resize</source>
+ <translation>Ãtméretezés</translation>
+ </message>
+ <message>
+ <location line="+218"/>
+ <location line="+15"/>
+ <source>Key Move</source>
+ <translation>Kulcs mozgatás</translation>
+ </message>
+ <message numerus="yes">
+ <location line="+211"/>
+ <source>Paste %n action(s)</source>
+ <translation>
+ <numerusform>%n tevékenység beillesztése</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <location line="+2"/>
+ <source>Paste %n widget(s)</source>
+ <translation>
+ <numerusform>%n widget beillesztése</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Paste (%1 widgets, %2 actions)</source>
+ <translation>Beillesztés (%1 widget-ek, %2 tevékenységek)</translation>
+ </message>
+ <message>
+ <location line="+56"/>
+ <source>Cannot paste widgets. Designer could not find a container without a layout to paste into.</source>
+ <translation>Nem lehet beilleszteni a widget-eket. A Designer nem talált egy tárolót sem elrendezés nélküli beillesztéshez.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Break the layout of the container you want to paste into, select this container and then paste again.</source>
+ <translation>A tároló elrendezésének megtörése, ahová be akarja illeszteni, válassza ki ezt a tárolót és aztán illessze e újra.</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Paste error</source>
+ <translation>Beillesztési hiba</translation>
+ </message>
+ <message>
+ <location line="+183"/>
+ <source>Raise widgets</source>
+ <translation>Widget-ek növelése</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Lower widgets</source>
+ <translation>Alsó widget-ek</translation>
+ </message>
+ <message>
+ <location line="+204"/>
+ <source>Select Ancestor</source>
+ <translation>Ås kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+41"/>
+ <source>Lay out</source>
+ <translation>Elrendezés</translation>
+ </message>
+ <message>
+ <location line="+493"/>
+ <location line="+55"/>
+ <source>Drop widget</source>
+ <translation>Widget ejtése</translation>
+ </message>
+ <message>
+ <location line="-13"/>
+ <source>A QMainWindow-based form does not contain a central widget.</source>
+ <translation>Egy QMainWindow alapú űrlap nem tartalmaz egy központi widget-et.</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::FormWindowBase</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/formwindowbase.cpp" line="+393"/>
+ <source>Delete &apos;%1&apos;</source>
+ <translation>&apos;%1&apos; törlése</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Delete</source>
+ <translation>Törlés</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::FormWindowManager</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/formwindowmanager.cpp" line="+364"/>
+ <source>Cu&amp;t</source>
+ <translation>&amp;Kivágás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Cuts the selected widgets and puts them on the clipboard</source>
+ <translation>A kiválaszott widget-ek kivágása és vágólapra helyezése</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&amp;Copy</source>
+ <translation>&amp;Másolás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Copies the selected widgets to the clipboard</source>
+ <translation>A kiválasztott widget-ek vágólapra másolása</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&amp;Paste</source>
+ <translation>&amp;Beillesztés</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Pastes the clipboard&apos;s contents</source>
+ <translation>A vágólap tartalmának beillesztése</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&amp;Delete</source>
+ <translation>&amp;Törlés</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Deletes the selected widgets</source>
+ <translation>A kiválasztott widget-ek törlése</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Select &amp;All</source>
+ <translation>Az &amp;összes kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Selects all widgets</source>
+ <translation>Az összes widget kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Bring to &amp;Front</source>
+ <translation>&amp;Előre hozás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location line="+1"/>
+ <source>Raises the selected widgets</source>
+ <translation>A kiválaszott widget-ek növelése</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Send to &amp;Back</source>
+ <translation>&amp;Visszaküldés</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location line="+1"/>
+ <source>Lowers the selected widgets</source>
+ <translation>Alsó kiválasztott widget-ek</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Adjust &amp;Size</source>
+ <translation>&amp;Méret igazítása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Adjusts the size of the selected widget</source>
+ <translation>A kiválasztott widget méretének igazítása</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Lay Out &amp;Horizontally</source>
+ <translation>Elrendezés &amp;Horizontálisan</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Lays out the selected widgets horizontally</source>
+ <translation>A kiválaszott widget-ek horizontális elrendezése</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Lay Out &amp;Vertically</source>
+ <translation>Elrendezés &amp;vertikálisan</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Lays out the selected widgets vertically</source>
+ <translation>A kiválaszott widget-ek vertikális elrendezése</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Lay Out in a &amp;Form Layout</source>
+ <translation>Elrendezés egy &amp;Űrlap elrendezésben</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Lays out the selected widgets in a form layout</source>
+ <translation>A kiválaszott widget-ek elrendezése egy űrlap elrendezésben</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Lay Out in a &amp;Grid</source>
+ <translation>Elrendezés egy &amp;rácsban</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Lays out the selected widgets in a grid</source>
+ <translation>A kiválasztott widget-ek elrendezése egy rácsban</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Lay Out Horizontally in S&amp;plitter</source>
+ <translation>Elrendezés Horizontálisan a &amp;csúszkában</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Lays out the selected widgets horizontally in a splitter</source>
+ <translation>A kiválasztott widget-ek horizontális elrendezése egy csúszkában</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Lay Out Vertically in Sp&amp;litter</source>
+ <translation>Elrendezés vertikálisan egy &amp;csúszkában</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Lays out the selected widgets vertically in a splitter</source>
+ <translation>A kiválaszott widget-ek vertikális elrendezése egy csúszkában</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>&amp;Break Layout</source>
+ <translation>Elrendezés &amp;törése</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Breaks the selected layout</source>
+ <translation>A kiválaszott elrendezés törése</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Si&amp;mplify Grid Layout</source>
+ <translation>Egy&amp;szerűsített rács elrendezés</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Removes empty columns and rows</source>
+ <translation>Üres oszlopok és sorok eltávolítása</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>&amp;Preview...</source>
+ <translation>&amp;Előnézet...</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Preview current form</source>
+ <translation>Aktuális űrlap előnézet</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Form &amp;Settings...</source>
+ <translation>Űrlap &amp;beállítások...</translation>
+ </message>
+ <message>
+ <location line="+92"/>
+ <source>Break Layout</source>
+ <translation>Elrendezés törése</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>Adjust Size</source>
+ <translation>Méret igazítása</translation>
+ </message>
+ <message>
+ <location line="+43"/>
+ <source>Could not create form preview</source>
+ <comment>Title of warning message box</comment>
+ <translation>Nem sikerült létrehozni az űrlap előnézetet</translation>
+ </message>
+ <message>
+ <location line="+341"/>
+ <source>Form Settings - %1</source>
+ <translation>Űrlap beállítások - %1</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::FormWindowSettings</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/formwindowsettings.cpp" line="+193"/>
+ <source>None</source>
+ <translation>Semmi</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Device Profile: %1</source>
+ <translation>Eszköz profil: %1</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::GridPanel</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/gridpanel.ui" line="+13"/>
+ <source>Form</source>
+ <translation>Å°rlap</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Grid</source>
+ <translation>Rács</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Visible</source>
+ <translation>Látható</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Grid &amp;X</source>
+ <translation>Rács &amp;X</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <location line="+57"/>
+ <source>Snap</source>
+ <translation>Bepattintás</translation>
+ </message>
+ <message>
+ <location line="-48"/>
+ <source>Reset</source>
+ <translation>Újraindítás</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Grid &amp;Y</source>
+ <translation>Rács &amp;Y</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::GroupBoxTaskMenu</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/groupbox_taskmenu.cpp" line="+82"/>
+ <source>Change title...</source>
+ <translation>Cím változtatása...</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::HtmlTextEdit</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/richtexteditor.cpp" line="-58"/>
+ <source>Insert HTML entity</source>
+ <translation>HTML entitás beszúrása</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::IconSelector</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/iconselector.cpp" line="-24"/>
+ <source>The pixmap file &apos;%1&apos; cannot be read.</source>
+ <translation>A(z) &apos;%1&apos; pixmap fájlt nem lehet olvasni.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>The file &apos;%1&apos; does not appear to be a valid pixmap file: %2</source>
+ <translation>A(z) &apos;%1&apos; fájlt nem egy érvényes pixmap fájl: %2</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>The file &apos;%1&apos; could not be read: %2</source>
+ <translation>A(z) &apos;%1&apos; fájlt nem sikerült olvasni: %2</translation>
+ </message>
+ <message>
+ <location line="+33"/>
+ <source>Choose a Pixmap</source>
+ <translation>Egy pixmap kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Pixmap Read Error</source>
+ <translation>Pixmap olvasási hiba</translation>
+ </message>
+ <message>
+ <location line="+54"/>
+ <source>...</source>
+ <translation>...</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Normal Off</source>
+ <translation>Normál ki</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Normal On</source>
+ <translation>Normál be</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Disabled Off</source>
+ <translation>Tiltás ki</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Disabled On</source>
+ <translation>Tiltás be</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Active Off</source>
+ <translation>Aktív ki</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Active On</source>
+ <translation>Aktív be</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Selected Off</source>
+ <translation>Kiválaszott ki</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Selected On</source>
+ <translation>Kiválaszott be</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Choose Resource...</source>
+ <translation>Erőforrás kiválasztása...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Choose File...</source>
+ <translation>Fájl kiválasztása...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Reset</source>
+ <translation>Újraindítás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Reset All</source>
+ <translation>Az összes újraindítása</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ItemListEditor</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/itemlisteditor.cpp" line="+358"/>
+ <source>Properties &amp;&lt;&lt;</source>
+ <translation>Tulajdonságok &amp;&lt;&lt;</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/itemlisteditor.ui" line="+143"/>
+ <location filename="../tools/designer/src/components/taskmenu/itemlisteditor.cpp" line="+2"/>
+ <source>Properties &amp;&gt;&gt;</source>
+ <translation>Tulajdonságok &amp;&gt;&gt;</translation>
+ </message>
+ <message>
+ <location line="-75"/>
+ <source>Items List</source>
+ <translation>Elem lista</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>New Item</source>
+ <translation>Új elem</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;New</source>
+ <translation>&amp;Új</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Delete Item</source>
+ <translation>Elem törlése</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Delete</source>
+ <translation>&amp;Törlés</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Move Item Up</source>
+ <translation>Elem mozgatása felfelé</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>U</source>
+ <translation>U</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Move Item Down</source>
+ <translation>Elem mozgatása lefelé</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>D</source>
+ <translation>D</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::LabelTaskMenu</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/label_taskmenu.cpp" line="+85"/>
+ <source>Change rich text...</source>
+ <translation>Gazdag szöveg választása...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Change plain text...</source>
+ <translation>Egyszerű szöveg választása...</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::LanguageResourceDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/iconselector.cpp" line="-343"/>
+ <source>Choose Resource</source>
+ <translation>Erőforrás kiválasztása</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::LineEditTaskMenu</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/lineedit_taskmenu.cpp" line="+80"/>
+ <source>Change text...</source>
+ <translation>Szöveg kiválasztása...</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ListWidgetEditor</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/listwidgeteditor.cpp" line="+69"/>
+ <source>New Item</source>
+ <translation>Új elem</translation>
+ </message>
+ <message>
+ <location line="+32"/>
+ <source>Edit List Widget</source>
+ <translation>Widget szerkesztési lista</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Edit Combobox</source>
+ <translation>Combobox szerkesztése</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ListWidgetTaskMenu</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/listwidget_taskmenu.cpp" line="+67"/>
+ <source>Edit Items...</source>
+ <translation>Elemek szerkesztése...</translation>
+ </message>
+ <message>
+ <location line="+38"/>
+ <source>Change List Contents</source>
+ <translation>Tartalom változtatási lista</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::MdiContainerWidgetTaskMenu</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/containerwidget_taskmenu.cpp" line="+118"/>
+ <source>Next Subwindow</source>
+ <translation>Új alablak</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Previous Subwindow</source>
+ <translation>Előző alablak</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Tile</source>
+ <translation>Cserép</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Cascade</source>
+ <translation>Kaszkád</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::MenuTaskMenu</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/menutaskmenu.cpp" line="+56"/>
+ <source>Remove</source>
+ <translation>Eltávolítás</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::MorphMenu</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/morphmenu.cpp" line="+264"/>
+ <source>Morph into</source>
+ <translation>Morph into</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::NewActionDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/newactiondialog.ui" line="+46"/>
+ <source>New Action...</source>
+ <translation>Új tevékenység...</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>&amp;Text:</source>
+ <translation>&amp;Szöveg:</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Object &amp;name:</source>
+ <translation>Objektum &amp;név:</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>&amp;Icon:</source>
+ <translation>&amp;Ikon:</translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>Shortcut:</source>
+ <translation>Rövidebb út:</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Checkable:</source>
+ <translation>Ellenőrizhető:</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>ToolTip:</source>
+ <translation>Eszköz tipp:</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <location line="+21"/>
+ <source>...</source>
+ <translation>...</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::NewDynamicPropertyDialog</name>
+ <message>
+ <location filename="../tools/designer/src/components/propertyeditor/newdynamicpropertydialog.cpp" line="+134"/>
+ <source>Set Property Name</source>
+ <translation>Tulajdonság nevének beállítása</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>The current object already has a property named &apos;%1&apos;.
+Please select another, unique one.</source>
+ <translation>Az aktuális objektumnak már van egy &apos;%1&apos; nevű tulajdonsága.
+Kérem válasszon másikat, egy egyedülállót.</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>The &apos;_q_&apos; prefix is reserved for the Qt library.
+Please select another name.</source>
+ <translation>Az &apos;_q_&apos; előtag foglalt a Qt könyvtárhoz.
+Kérem válasszon másikat.</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/components/propertyeditor/newdynamicpropertydialog.ui" line="+13"/>
+ <source>Create Dynamic Property</source>
+ <translation>Dinamikus tulajdonság létrehozása</translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>Property Name</source>
+ <translation>Tulajdonság Neve</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>horizontalSpacer</source>
+ <translation>horizontálisTávtartó</translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>Property Type</source>
+ <translation>Tulajdonság Típusa</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::NewFormWidget</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/newformwidget.cpp" line="+104"/>
+ <source>Default size</source>
+ <translation>Alapértelmezett méret</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>QVGA portrait (240x320)</source>
+ <translation>QVGA portré (240x320)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>QVGA landscape (320x240)</source>
+ <translation>QVGA tájkép (320x240)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>VGA portrait (480x640)</source>
+ <translation>VGA portré (480x640)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>VGA landscape (640x480)</source>
+ <translation>VGA tájkép: (640x480)</translation>
+ </message>
+ <message>
+ <location line="+66"/>
+ <source>Widgets</source>
+ <extracomment>New Form Dialog Categories</extracomment>
+ <translation>Widget-ek</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Custom Widgets</source>
+ <translation>Egyéni Widget-ek</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>None</source>
+ <translation>Semmi</translation>
+ </message>
+ <message>
+ <location line="+57"/>
+ <source>Error loading form</source>
+ <translation>Hiba történt az űrlap betöltése közben</translation>
+ </message>
+ <message>
+ <location line="+244"/>
+ <source>Unable to open the form template file &apos;%1&apos;: %2</source>
+ <translation>Nem lehet megnyitni a(z) &apos;%1&apos; űrlap sablon fájlt: %2</translation>
+ </message>
+ <message>
+ <location line="+67"/>
+ <source>Internal error: No template selected.</source>
+ <translation>Belső hiba: Nincsen sablon kiválasztva.</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/newformwidget.ui" line="+82"/>
+ <source>0</source>
+ <translation>0</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Choose a template for a preview</source>
+ <translation>Válasszon egy sablont egy előnézetre</translation>
+ </message>
+ <message>
+ <location line="+44"/>
+ <source>Embedded Design</source>
+ <translation>Beágyazott tervezés</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Device:</source>
+ <translation>Eszköz:</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Screen Size:</source>
+ <translation>Képernyő méret:</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::NewPromotedClassPanel</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_promotiondialog.cpp" line="+92"/>
+ <source>Add</source>
+ <translation>Hozzáadás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>New Promoted Class</source>
+ <translation>Új támogatott osztály</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Base class name:</source>
+ <translation>Alap osztály név:</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Promoted class name:</source>
+ <translation>Támogatott osztály neve:</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Header file:</source>
+ <translation>Fejállomány:</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Global include</source>
+ <translation>Globális include</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Reset</source>
+ <translation>Újraindítás</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ObjectInspector</name>
+ <message>
+ <location filename="../tools/designer/src/components/objectinspector/objectinspector.cpp" line="+754"/>
+ <source>&amp;Find in Text...</source>
+ <translation>&amp;Keresés a szövegben...</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ObjectInspector::ObjectInspectorPrivate</name>
+ <message>
+ <location line="-438"/>
+ <source>Change Current Page</source>
+ <translation>Aktuális lap megváltoztatása</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::OrderDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/orderdialog.cpp" line="+109"/>
+ <source>Index %1 (%2)</source>
+ <translation>Index %1 (%2)</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>%1 %2</source>
+ <translation>%1 %2</translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/orderdialog.ui" line="+53"/>
+ <source>Change Page Order</source>
+ <translation>Lap sorrend megváltoztatása</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Page Order</source>
+ <translation>Lap sorrend</translation>
+ </message>
+ <message>
+ <location line="+57"/>
+ <source>Move page up</source>
+ <translation>Lap mozgatása felfelé</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Move page down</source>
+ <translation>Lap mozgatása lefelé</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::PaletteEditor</name>
+ <message>
+ <location filename="../tools/designer/src/components/propertyeditor/paletteeditor.ui" line="+61"/>
+ <source>Edit Palette</source>
+ <translation>Paletta szerkesztése</translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>Tune Palette</source>
+ <translation>Paletta finomhangolása</translation>
+ </message>
+ <message>
+ <location line="+37"/>
+ <source>Show Details</source>
+ <translation>Részletek megjelenítése</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Compute Details</source>
+ <translation>Számítási részletek</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Quick</source>
+ <translation>Gyors</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Preview</source>
+ <translation>Előnézet</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Disabled</source>
+ <translation>Tiltott</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Inactive</source>
+ <translation>Inaktív</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Active</source>
+ <translation>Aktív</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::PaletteEditorButton</name>
+ <message>
+ <location filename="../tools/designer/src/components/propertyeditor/paletteeditorbutton.cpp" line="+57"/>
+ <source>Change Palette</source>
+ <translation>Paletta megváltoztatása</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::PaletteModel</name>
+ <message>
+ <location filename="../tools/designer/src/components/propertyeditor/paletteeditor.cpp" line="+374"/>
+ <source>Color Role</source>
+ <translation>Szín szabály</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Active</source>
+ <translation>Aktív</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Inactive</source>
+ <translation>Inaktív</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Disabled</source>
+ <translation>Tiltott</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::PixmapEditor</name>
+ <message>
+ <location filename="../tools/designer/src/components/propertyeditor/designerpropertymanager.cpp" line="-1541"/>
+ <source>Choose Resource...</source>
+ <translation>Erőforrás kiválasztása...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Choose File...</source>
+ <translation>Fájl kiválasztása...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy Path</source>
+ <translation>Útvonal kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Paste Path</source>
+ <translation>Útvonal beillesztése</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <location line="+16"/>
+ <source>...</source>
+ <translation>...</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::PlainTextEditorDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/plaintexteditor.cpp" line="+65"/>
+ <source>Edit text</source>
+ <translation>Szöveg szerkesztése</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::PluginDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/plugindialog.cpp" line="+72"/>
+ <source>Components</source>
+ <translation>Komponensek</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Plugin Information</source>
+ <translation>Beépülő modul információ</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Refresh</source>
+ <translation>Felfrissítés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Scan for newly installed custom widget plugins.</source>
+ <translation>Újonnan telepített egyéni widget beépülő modulok letapogatása.</translation>
+ </message>
+ <message>
+ <location line="+48"/>
+ <source>Qt Designer couldn&apos;t find any plugins</source>
+ <translation>Qt Designer nem talált egyetlen beépülő modult sem</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Qt Designer found the following plugins</source>
+ <translation>Qt Designer a következő beépülő modulokat találta</translation>
+ </message>
+ <message>
+ <location line="+55"/>
+ <source>New custom widget plugins have been found.</source>
+ <translation>Új egyéni widget betöltő modul talált.</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::PreviewActionGroup</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/previewactiongroup.cpp" line="+95"/>
+ <source>%1 Style</source>
+ <translation>%1 Stílus</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::PreviewConfigurationWidget</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/previewconfigurationwidget.cpp" line="+139"/>
+ <source>Default</source>
+ <translation>Alapértelmezett</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>None</source>
+ <translation>Semmi</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Browse...</source>
+ <translation>Böngészés...</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::PreviewConfigurationWidget::PreviewConfigurationWidgetPrivate</name>
+ <message>
+ <location line="+118"/>
+ <source>Load Custom Device Skin</source>
+ <translation>Egyéni eszköz szkin betöltése</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>All QVFB Skins (*.%1)</source>
+ <translation>Az összes QVFB szkin (*.%1)</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>%1 - Duplicate Skin</source>
+ <translation>%1 - Duplikált szkin</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>The skin &apos;%1&apos; already exists.</source>
+ <translation>A(z) &apos;%1&apos; szkin már létezik.</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>%1 - Error</source>
+ <translation>%1 - Hiba</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>%1 is not a valid skin directory:
+%2</source>
+ <translation>%1 nem egy érvényes szkin könyvtár:
+%2</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::PreviewDeviceSkin</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/previewmanager.cpp" line="+259"/>
+ <source>&amp;Portrait</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Landscape (&amp;CCW)</source>
+ <extracomment>Rotate form preview counter-clockwise</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>&amp;Landscape (CW)</source>
+ <extracomment>Rotate form preview clockwise</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Close</source>
+ <translation>&amp;Bezárás</translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::PreviewManager</name>
+ <message>
+ <location line="+426"/>
+ <source>%1 - [Preview]</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::PreviewMdiArea</name>
+ <message>
+ <location filename="../tools/designer/src/components/propertyeditor/previewframe.cpp" line="+72"/>
+ <source>The moose in the noose
+ate the goose who was loose.</source>
+ <extracomment>Palette editor background</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::PreviewWidget</name>
+ <message>
+ <location filename="../tools/designer/src/components/propertyeditor/previewwidget.ui" line="+61"/>
+ <source>Preview Window</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>LineEdit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>ComboBox</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>PushButton</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+58"/>
+ <source>ButtonGroup2</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>CheckBox1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>CheckBox2</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>ButtonGroup</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>RadioButton1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>RadioButton2</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>RadioButton3</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::PromotionModel</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/promotionmodel.cpp" line="+17"/>
+ <source>Name</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Header file</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Global include</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Usage</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::PromotionTaskMenu</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/promotiontaskmenu.cpp" line="+85"/>
+ <source>Promoted widgets...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Promote to ...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Change signals/slots...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Promote to</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Demote to %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::PropertyEditor</name>
+ <message>
+ <location filename="../tools/designer/src/components/propertyeditor/propertyeditor.cpp" line="+183"/>
+ <source>Add Dynamic Property...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Remove Dynamic Property</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Sorting</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Color Groups</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Tree View</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Drop Down Button View</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+50"/>
+ <source>String...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Bool...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Other...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Configure Property Editor</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+533"/>
+ <source>Object: %1
+Class: %2</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::PropertyLineEdit</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/propertylineedit.cpp" line="+88"/>
+ <source>Insert line break</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::QDesignerPromotionDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_promotiondialog.cpp" line="+85"/>
+ <source>Promoted Widgets</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Promoted Classes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+60"/>
+ <source>Promote</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+152"/>
+ <source>Change signals/slots...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>%1 - Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::QDesignerResource</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/qdesigner_resource.cpp" line="+277"/>
+ <source>Loading qrc file</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>The specified qrc file &lt;p&gt;&lt;b&gt;%1&lt;/b&gt;&lt;/p&gt;&lt;p&gt;could not be found. Do you want to update the file location?&lt;/p&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>New location for %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Resource files (*.qrc)</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::QDesignerTaskMenu</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_taskmenu.cpp" line="+68"/>
+ <source>Change objectName...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Change toolTip...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Change whatsThis...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Change styleSheet...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Create Menu Bar</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Add Tool Bar</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Create Status Bar</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Remove Status Bar</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Change script...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Change signals/slots...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Go to slot...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Size Constraints</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Set Minimum Width</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Set Minimum Height</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Set Minimum Size</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Set Maximum Width</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Set Maximum Height</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Set Maximum Size</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+235"/>
+ <source>Edit ToolTip</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Edit WhatsThis</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+144"/>
+ <source>no signals available</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message numerus="yes">
+ <location line="+67"/>
+ <source>Set size constraint on %n widget(s)</source>
+ <translation type="unfinished">
+ <numerusform></numerusform>
+ </translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::QDesignerWidgetBox</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_widgetbox.cpp" line="+123"/>
+ <location line="+13"/>
+ <source>Unexpected element &lt;%1&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>A parse error occurred at line %1, column %2 of the XML code specified for the widget %3: %4
+%5</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>The XML code specified for the widget %1 does not contain any widget elements.
+%2</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/components/widgetbox/widgetboxtreewidget.cpp" line="+349"/>
+ <source>An error has been encountered at line %1 of %2: %3</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+139"/>
+ <source>Unexpected element &lt;%1&gt; encountered when parsing for &lt;widget&gt; or &lt;ui&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Unexpected end of file encountered when parsing widgets.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>A widget element could not be found.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::QtGradientStopsController</name>
+ <message>
+ <location filename="../tools/shared/qtgradienteditor/qtgradientstopscontroller.cpp" line="+173"/>
+ <source>H</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>S</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>V</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <location line="+4"/>
+ <source>Hue</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-3"/>
+ <source>Sat</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Val</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Saturation</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Value</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>R</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>G</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Red</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Green</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Blue</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::RichTextEditorDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/richtexteditor.cpp" line="+436"/>
+ <source>Edit text</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Rich Text</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Source</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>&amp;OK</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>&amp;Cancel</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::RichTextEditorToolBar</name>
+ <message>
+ <location line="-302"/>
+ <source>Bold</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>CTRL+B</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Italic</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>CTRL+I</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Underline</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>CTRL+U</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Left Align</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Center</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Right Align</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Justify</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Superscript</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Subscript</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Insert &amp;Link</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Insert &amp;Image</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ScriptDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/scriptdialog.cpp" line="+66"/>
+ <source>Edit script</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&lt;html&gt;Enter a Qt Script snippet to be executed while loading the form.&lt;br&gt;The widget and its children are accessible via the variables &lt;i&gt;widget&lt;/i&gt; and &lt;i&gt;childWidgets&lt;/i&gt;, respectively.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+51"/>
+ <source>Syntax error</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ScriptErrorDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/scripterrordialog.cpp" line="+27"/>
+ <source>Script errors</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::SignalSlotDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/signalslotdialog.cpp" line="+199"/>
+ <source>There is already a slot with the signature &apos;%1&apos;.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>There is already a signal with the signature &apos;%1&apos;.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>%1 - Duplicate Signature</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+21"/>
+ <location line="+76"/>
+ <source>Signals/Slots of %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::SignalSlotEditorPlugin</name>
+ <message>
+ <location filename="../tools/designer/src/components/signalsloteditor/signalsloteditor_plugin.cpp" line="+72"/>
+ <source>Edit Signals/Slots</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>F4</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::SignalSlotEditorTool</name>
+ <message>
+ <location filename="../tools/designer/src/components/signalsloteditor/signalsloteditor_tool.cpp" line="+58"/>
+ <source>Edit Signals/Slots</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::StatusBarTaskMenu</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/toolbar_taskmenu.cpp" line="+81"/>
+ <source>Remove</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::StringListEditorButton</name>
+ <message>
+ <location filename="../tools/designer/src/components/propertyeditor/stringlisteditorbutton.cpp" line="+56"/>
+ <source>Change String List</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::StyleSheetEditorDialog</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/stylesheeteditor.cpp" line="+90"/>
+ <location line="+280"/>
+ <source>Valid Style Sheet</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-278"/>
+ <source>Add Resource...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Add Gradient...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Add Color...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Add Font...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Edit Style Sheet</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+276"/>
+ <source>Invalid Style Sheet</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::TabOrderEditor</name>
+ <message>
+ <location filename="../tools/designer/src/components/tabordereditor/tabordereditor.cpp" line="+363"/>
+ <source>Start from Here</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Restart</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Tab Order List...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+44"/>
+ <source>Tab Order List</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Tab Order</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::TabOrderEditorPlugin</name>
+ <message>
+ <location filename="../tools/designer/src/components/tabordereditor/tabordereditor_plugin.cpp" line="+73"/>
+ <source>Edit Tab Order</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::TabOrderEditorTool</name>
+ <message>
+ <location filename="../tools/designer/src/components/tabordereditor/tabordereditor_tool.cpp" line="+57"/>
+ <source>Edit Tab Order</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::TableWidgetEditor</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/tablewidgeteditor.ui" line="+97"/>
+ <location filename="../tools/designer/src/components/taskmenu/tablewidgeteditor.cpp" line="+218"/>
+ <source>Properties &amp;&gt;&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-44"/>
+ <source>Edit Table Widget</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>&amp;Items</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Table Items</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/tablewidgeteditor.cpp" line="-151"/>
+ <source>New Column</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>New Row</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>&amp;Columns</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Rows</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+137"/>
+ <source>Properties &amp;&lt;&lt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::TableWidgetTaskMenu</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/tablewidget_taskmenu.cpp" line="+64"/>
+ <source>Edit Items...</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::TemplateOptionsWidget</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/templateoptionspage.cpp" line="-18"/>
+ <source>Pick a directory to save templates in</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/templateoptionspage.ui" line="+13"/>
+ <source>Form</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Additional Template Paths</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <location line="+7"/>
+ <source>...</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::TextEditTaskMenu</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/textedit_taskmenu.cpp" line="+58"/>
+ <source>Edit HTML</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Change HTML...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Edit Text</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Change Plain Text...</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::TextEditor</name>
+ <message>
+ <location filename="../tools/designer/src/components/propertyeditor/designerpropertymanager.cpp" line="-204"/>
+ <source>Choose Resource...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Choose File...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+118"/>
+ <source>Choose a File</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ToolBarEventFilter</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_toolbar.cpp" line="+148"/>
+ <source>Insert Separator before &apos;%1&apos;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Append Separator</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Remove action &apos;%1&apos;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Remove Toolbar &apos;%1&apos;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+58"/>
+ <source>Insert Separator</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::TreeWidgetEditor</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/treewidgeteditor.cpp" line="+68"/>
+ <source>New Column</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>&amp;Columns</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+69"/>
+ <source>Per column properties</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Common properties</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/treewidgeteditor.ui" line="+101"/>
+ <location filename="../tools/designer/src/components/taskmenu/treewidgeteditor.cpp" line="+53"/>
+ <source>New Item</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <location filename="../tools/designer/src/components/taskmenu/treewidgeteditor.cpp" line="+19"/>
+ <source>New Subitem</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/treewidgeteditor.cpp" line="+175"/>
+ <source>Properties &amp;&lt;&lt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/treewidgeteditor.ui" line="+86"/>
+ <location filename="../tools/designer/src/components/taskmenu/treewidgeteditor.cpp" line="+2"/>
+ <source>Properties &amp;&gt;&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-144"/>
+ <source>Edit Tree Widget</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>&amp;Items</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>Tree Items</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>&amp;New</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>New &amp;Subitem</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Delete Item</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Delete</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Move Item Left (before Parent Item)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>L</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Move Item Right (as a First Subitem of the Next Sibling Item)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>R</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Move Item Up</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>U</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Move Item Down</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>D</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::TreeWidgetTaskMenu</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/treewidget_taskmenu.cpp" line="+63"/>
+ <source>Edit Items...</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::WidgetBox</name>
+ <message>
+ <location filename="../tools/designer/src/components/widgetbox/widgetbox_dnditem.cpp" line="+115"/>
+ <source>Warning: Widget creation failed in the widget box. This could be caused by invalid custom widget XML.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::WidgetBoxTreeWidget</name>
+ <message>
+ <location filename="../tools/designer/src/components/widgetbox/widgetboxtreewidget.cpp" line="-268"/>
+ <source>Scratchpad</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+370"/>
+ <source>Custom Widgets</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+263"/>
+ <source>Expand all</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Collapse all</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>List View</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Icon View</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Remove</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Edit name</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::WidgetDataBase</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/widgetdatabase.cpp" line="-411"/>
+ <source>A custom widget plugin whose class name (%1) matches that of an existing class has been found.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::WidgetEditorTool</name>
+ <message>
+ <location filename="../tools/designer/src/components/formeditor/tool_widgeteditor.cpp" line="+67"/>
+ <source>Edit Widgets</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::WidgetFactory</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/widgetfactory.cpp" line="+263"/>
+ <source>The custom widget factory registered for widgets of class %1 returned 0.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+44"/>
+ <source>A class name mismatch occurred when creating a widget using the custom widget factory registered for widgets of class %1. It returned a widget of class %2.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+99"/>
+ <source>%1 Widget</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+90"/>
+ <source>The current page of the container &apos;%1&apos; (%2) could not be determined while creating a layout.This indicates an inconsistency in the ui-file, probably a layout being constructed on a container widget.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+53"/>
+ <source>Attempt to add a layout to a widget &apos;%1&apos; (%2) which already has an unmanaged layout of type %3.
+This indicates an inconsistency in the ui-file.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+211"/>
+ <source>Cannot create style &apos;%1&apos;.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::WizardContainerWidgetTaskMenu</name>
+ <message>
+ <location filename="../tools/designer/src/components/taskmenu/containerwidget_taskmenu.cpp" line="-49"/>
+ <source>Next</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Back</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ZoomMenu</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/zoomwidget.cpp" line="+84"/>
+ <source>%1 %</source>
+ <extracomment>Zoom factor</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>qdesigner_internal::ZoomablePreviewDeviceSkin</name>
+ <message>
+ <location filename="../tools/designer/src/lib/shared/previewmanager.cpp" line="-270"/>
+ <source>&amp;Zoom</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/translations/linguist_de.ts b/translations/linguist_de.ts
index 101aa5b413..14095ba72f 100644
--- a/translations/linguist_de.ts
+++ b/translations/linguist_de.ts
@@ -4,7 +4,7 @@
<context>
<name>AboutDialog</name>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+1358"/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+1366"/>
<source>Qt Linguist</source>
<translation>Qt Linguist</translation>
</message>
@@ -286,7 +286,7 @@ Es wird mit einer einfachen Universalform gearbeitet.</translation>
<context>
<name>FormMultiWidget</name>
<message>
- <location filename="../tools/linguist/linguist/messageeditorwidgets.cpp" line="+296"/>
+ <location filename="../tools/linguist/linguist/messageeditorwidgets.cpp" line="+302"/>
<source>Alt+Delete</source>
<extracomment>translate, but don&apos;t change</extracomment>
<translation>Alt+Delete</translation>
@@ -317,7 +317,7 @@ Es wird mit einer einfachen Universalform gearbeitet.</translation>
<context>
<name>LRelease</name>
<message numerus="yes">
- <location filename="../tools/linguist/shared/qm.cpp" line="+761"/>
+ <location filename="../tools/linguist/shared/qm.cpp" line="+763"/>
<source>Dropped %n message(s) which had no ID.</source>
<translation>
<numerusform>Es wurde ein Eintrag ohne Bezeichner gelöscht.</numerusform>
@@ -862,11 +862,6 @@ Es wird mit einer einfachen Universalform gearbeitet.</translation>
</message>
<message>
<location/>
- <source>Display information about the Qt toolkit by Trolltech.</source>
- <translation>Informationen über das Qt-Toolkit von Trolltech anzeigen.</translation>
- </message>
- <message>
- <location/>
<source>&amp;What&apos;s This?</source>
<translation>&amp;Direkthilfe</translation>
</message>
@@ -914,13 +909,13 @@ Es wird mit einer einfachen Universalform gearbeitet.</translation>
<translation>Freigeben unter ...</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-2005"/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-2013"/>
<source></source>
<comment>This is the application&apos;s main window.</comment>
<translation></translation>
</message>
<message>
- <location line="+188"/>
+ <location line="+190"/>
<source>Source text</source>
<translation>Ursprungstext</translation>
</message>
@@ -947,12 +942,12 @@ Es wird mit einer einfachen Universalform gearbeitet.</translation>
<translation>Dieser Bereich zeigt die Kontexte an.</translation>
</message>
<message>
- <location line="+15"/>
+ <location line="+13"/>
<source>Strings</source>
<translation>Zeichenketten</translation>
</message>
<message>
- <location line="+39"/>
+ <location line="+37"/>
<source>Phrases and guesses</source>
<translation>Wörterbuch und Vorschläge</translation>
</message>
@@ -973,7 +968,7 @@ Es wird mit einer einfachen Universalform gearbeitet.</translation>
<translation>Geändert</translation>
</message>
<message>
- <location line="+130"/>
+ <location line="+139"/>
<source>Loading...</source>
<translation>Lade ...</translation>
</message>
@@ -1010,7 +1005,7 @@ Soll die erstgenannte Datei übersprungen werden?</translation>
</translation>
</message>
<message>
- <location line="+93"/>
+ <location line="+94"/>
<source>Related files (%1);;</source>
<translation>Verwandte Dateien (%1);;</translation>
</message>
@@ -1390,7 +1385,7 @@ Alle Dateien (*)</translation>
<translation>Möchten Sie das Wörterbuch &apos;%1&apos; speichern?</translation>
</message>
<message>
- <location line="+323"/>
+ <location line="+349"/>
<source>All</source>
<translation>Alle</translation>
</message>
@@ -1411,7 +1406,7 @@ Alle Dateien (*)</translation>
</message>
<message>
<location/>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-536"/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-562"/>
<source>Translation File &amp;Settings...</source>
<translation>E&amp;instellungen ...</translation>
</message>
@@ -1495,6 +1490,11 @@ Alle Dateien (*)</translation>
<source>Length Variants</source>
<translation>Längenvarianten</translation>
</message>
+ <message>
+ <location/>
+ <source>Display information about the Qt toolkit by Nokia.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>MessageEditor</name>
@@ -1535,12 +1535,12 @@ Alle Dateien (*)</translation>
<translation>Chinesisch</translation>
</message>
<message>
- <location line="+53"/>
+ <location line="+47"/>
<source>This whole panel allows you to view and edit the translation of some source text.</source>
<translation>Dieser Bereich erlaubt die Darstellung und Änderung der Übersetzung eines Textes.</translation>
</message>
<message>
- <location line="+18"/>
+ <location line="+10"/>
<source>Source text</source>
<translation>Ursprungstext</translation>
</message>
@@ -1575,7 +1575,7 @@ Alle Dateien (*)</translation>
<translation>Hier können Sie Hinweise für den eigenen Gebrauch eintragen. Diese haben keinen Einflusse auf die Übersetzung.</translation>
</message>
<message>
- <location line="+232"/>
+ <location line="+234"/>
<source>%1 translation (%2)</source>
<translation>Ãœbersetzung %1 (%2)</translation>
</message>
@@ -1605,7 +1605,7 @@ Zeile: %2</translation>
<context>
<name>MessageModel</name>
<message>
- <location filename="../tools/linguist/linguist/messagemodel.cpp" line="+832"/>
+ <location filename="../tools/linguist/linguist/messagemodel.cpp" line="+839"/>
<source>Completion status for %1</source>
<translation>Bearbeitungsstand von %1</translation>
</message>
@@ -1628,7 +1628,7 @@ Zeile: %2</translation>
<context>
<name>MsgEdit</name>
<message>
- <location filename="../tools/linguist/linguist/messageeditor.cpp" line="-614"/>
+ <location filename="../tools/linguist/linguist/messageeditor.cpp" line="-602"/>
<source></source>
<comment>This is the right panel of the main window.</comment>
<translation></translation>
@@ -1807,7 +1807,7 @@ Zeile: %2</translation>
<translation>Alle Dateien (*)</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/messagemodel.cpp" line="-1127"/>
+ <location filename="../tools/linguist/linguist/messagemodel.cpp" line="-1134"/>
<location line="+27"/>
<location line="+67"/>
<location line="+39"/>
@@ -1843,7 +1843,7 @@ Zeile: %2</translation>
<translation>XLIFF-Ãœbersetzungsdateien</translation>
</message>
<message>
- <location filename="../tools/linguist/shared/qph.cpp" line="+183"/>
+ <location filename="../tools/linguist/shared/qph.cpp" line="+195"/>
<source>Qt Linguist &apos;Phrase Book&apos;</source>
<translation>Qt-Linguist-Wörterbuch</translation>
</message>
@@ -1985,12 +1985,12 @@ Zeile: %2</translation>
<context>
<name>TranslationSettingsDialog</name>
<message>
- <location filename="../tools/linguist/linguist/translationsettingsdialog.cpp" line="+68"/>
+ <location filename="../tools/linguist/linguist/translationsettingsdialog.cpp" line="+93"/>
<source>Any Country</source>
<translation>Land</translation>
</message>
<message>
- <location line="+11"/>
+ <location line="-22"/>
<location line="+8"/>
<source>Settings for &apos;%1&apos; - Qt Linguist</source>
<translation>Einstellungen für &apos;%1&apos; - Qt Linguist</translation>
diff --git a/translations/linguist_hu.ts b/translations/linguist_hu.ts
new file mode 100644
index 0000000000..aaff8930c1
--- /dev/null
+++ b/translations/linguist_hu.ts
@@ -0,0 +1,2014 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="hu_HU" sourcelanguage="hu">
+<context>
+ <name>AboutDialog</name>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+1358"/>
+ <source>Qt Linguist</source>
+ <translation>Qt Linguist</translation>
+ </message>
+</context>
+<context>
+ <name>BatchTranslationDialog</name>
+ <message>
+ <location filename="../tools/linguist/linguist/batchtranslationdialog.cpp" line="+79"/>
+ <source>Batch Translation of &apos;%1&apos; - Qt Linguist</source>
+ <translation>&apos;%1&apos; Qt Linguist egy adat fordítása</translation>
+ </message>
+ <message>
+ <location line="+37"/>
+ <source>Searching, please wait...</source>
+ <translation>Keresés, kérem várjon...</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>&amp;Cancel</source>
+ <translation>&amp;Mégse</translation>
+ </message>
+ <message>
+ <location line="+42"/>
+ <source>Linguist batch translator</source>
+ <translation>Linguist köteg fordító</translation>
+ </message>
+ <message numerus="yes">
+ <location line="+1"/>
+ <source>Batch translated %n entries</source>
+ <translation>
+ <numerusform>%n adat belépés lefordítva</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/batchtranslation.ui"/>
+ <source>Qt Linguist - Batch Translation</source>
+ <translation>Qt Linguist adat fordítás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Options</source>
+ <translation>Opciók</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Set translated entries to finished</source>
+ <translation>Lefordított bevitelek befejezettre állítása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Retranslate entries with existing translation</source>
+ <translation>Bevitelek újrafordítása létező fordításokkal</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Translate also finished entries</source>
+ <translation>Befejezett belépéseknek is a lefordítása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Phrase book preference</source>
+ <translation>Fázis könyv beállítások</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Move up</source>
+ <translation>Felfelé mozgatás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Move down</source>
+ <translation>Lefelé mozgatás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Run</source>
+ <translation>&amp;Futtatás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Cancel</source>
+ <translation>Mégse</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Note that the modified entries will be reset to unfinished if &apos;Set translated entries to finished&apos; above is unchecked</source>
+ <translation>Ne felejtse el, hogy a módosított belépések újra lesznek indítva befejezetlenre, ha a &apos;lefordított bevitelek befejezettre állítása&apos; felül meg van jelölve</translation>
+ </message>
+ <message>
+ <location/>
+ <source>The batch translator will search through the selected phrase books in the order given above</source>
+ <translation>A köteg fordító a kiválasztott fázis könyvek között fog keresni, a fent megadott sorrendben</translation>
+ </message>
+</context>
+<context>
+ <name>DataModel</name>
+ <message>
+ <location filename="../tools/linguist/linguist/messagemodel.cpp" line="+214"/>
+ <source>&lt;qt&gt;Duplicate messages found in &apos;%1&apos;:</source>
+ <translation>&lt;qt&gt;Dupliált üzenetek találhatóak a(z) &apos;%1&apos;-ben:</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <location line="+8"/>
+ <source>&lt;p&gt;[more duplicates omitted]</source>
+ <translation>&lt;p&gt;[többi duplikáció kihagyása]</translation>
+ </message>
+ <message>
+ <location line="-5"/>
+ <source>&lt;p&gt;* ID: %1</source>
+ <translation>&lt;p&gt;* Azonosító: %1</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>&lt;p&gt;* Context: %1&lt;br&gt;* Source: %2</source>
+ <translation>&lt;p&gt;* Szövegösszefüggés: %1&lt;br&gt;* Forrás: %2</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&lt;br&gt;* Comment: %3</source>
+ <translation>&lt;br&gt;* Megjegyzés: %3</translation>
+ </message>
+ <message>
+ <location line="+71"/>
+ <source>Linguist does not know the plural rules for &apos;%1&apos;.
+Will assume a single universal form.</source>
+ <translation>A Linguist nem ismeri a többes számú szabályokat a &apos;%1&apos;-re. Egy egyszerű univerzális formát fog feltételezni.</translation>
+ </message>
+ <message>
+ <location line="+56"/>
+ <source>Cannot create &apos;%2&apos;: %1</source>
+ <translation>Nem lehet létrehozni &apos;%2&apos;: %1</translation>
+ </message>
+ <message>
+ <location line="+56"/>
+ <source>Universal Form</source>
+ <translation>Univerzális forma</translation>
+ </message>
+</context>
+<context>
+ <name>ErrorsView</name>
+ <message>
+ <location filename="../tools/linguist/linguist/errorsview.cpp" line="+76"/>
+ <source>Accelerator possibly superfluous in translation.</source>
+ <translation>A gyorsítás valószínűleg nélkülözhető a fordításban.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Accelerator possibly missing in translation.</source>
+ <translation>A gyorsítás valószínűleg hiányzik a fordításban.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Translation does not end with the same punctuation as the source text.</source>
+ <translation>A fordítás nem ugyanazzal az írásjellel végződik, mint a forrás szöveg.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>A phrase book suggestion for &apos;%1&apos; was ignored.</source>
+ <translation>A(z) &apos;%1&apos;-re tett fáziskönyv ajánlat mellőzve lett.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Translation does not refer to the same place markers as in the source text.</source>
+ <translation>Nem ugyanazok a hely megjelölők találhatóak a fordításban, mint a forrás szövegben.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Translation does not contain the necessary %n place marker.</source>
+ <translation>A fordítás nem tartalmazza a szükséges %n hely megjelölőket.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Unknown error</source>
+ <translation>Ismeretlen hiba</translation>
+ </message>
+</context>
+<context>
+ <name>FindDialog</name>
+ <message>
+ <location filename="../tools/linguist/linguist/finddialog.ui"/>
+ <source>This window allows you to search for some text in the translation source file.</source>
+ <translation>Ez az ablak engedélyezi, hogy szöveget keresses a fordítás forrás fájlban.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Type in the text to search for.</source>
+ <translation>Gépelje be szövegbe, amit keres..</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Options</source>
+ <translation>Opciók</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Source texts are searched when checked.</source>
+ <translation>Forrás szövegek keresési ellenőrzéskor.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Translations are searched when checked.</source>
+ <translation>Fordítások keresése ellenőrzéskor.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Texts such as &apos;TeX&apos; and &apos;tex&apos; are considered as different when checked.</source>
+ <translation>&apos;TeX&apos; és &apos;tex&apos; szövegek különbözőként kezelése bejelöléskor.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Comments and contexts are searched when checked.</source>
+ <translation>Megjegyzések és tartalmak keresése bejelöléskor.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Find</source>
+ <translation>Keresés
+</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Find what:</source>
+ <translation>Ennek &amp;keresése:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Source texts</source>
+ <translation>&amp;Forrás szövegek</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Translations</source>
+ <translation>&amp;Fordítások</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Match case</source>
+ <translation>&amp;Egyezés</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Comments</source>
+ <translation>&amp;Kommentek</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ignore &amp;accelerators</source>
+ <translation>&amp;Gyorsítások mellőzése</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Click here to find the next occurrence of the text you typed in.</source>
+ <translation>Kattintson ide a begépelt szöveg következő előfordulásának megkereséséhez.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Find Next</source>
+ <translation>Következő keresése</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Click here to close this window.</source>
+ <translation>Kattintson ide az ablak bezárásához.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Cancel</source>
+ <translation>Mégse</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/finddialog.cpp" line="+12"/>
+ <source></source>
+ <comment>Choose Edit|Find from the menu bar or press Ctrl+F to pop up the Find dialog</comment>
+ <translatorcomment>Válassza ki a Szerkesztés/Keresés opciót a menüből vagy nyomja le a Ctrl+F billentyűket a keresési párbeszédablak felugrásához</translatorcomment>
+ <translation></translation>
+ </message>
+</context>
+<context>
+ <name>FormMultiWidget</name>
+ <message>
+ <location filename="../tools/linguist/linguist/messageeditorwidgets.cpp" line="+296"/>
+ <source>Alt+Delete</source>
+ <extracomment>translate, but don&apos;t change</extracomment>
+ <translatorcomment>fordítsd, de ne változtasd</translatorcomment>
+ <translation>ALT+Delete</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Shift+Alt+Insert</source>
+ <extracomment>translate, but don&apos;t change</extracomment>
+ <translatorcomment>Fordítsd, de ne változtasd.</translatorcomment>
+ <translation>Shift+Alt+Insert</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Alt+Insert</source>
+ <extracomment>translate, but don&apos;t change</extracomment>
+ <translation>Alt+Insert</translation>
+ </message>
+ <message>
+ <location line="+131"/>
+ <source>Confirmation - Qt Linguist</source>
+ <translation>Megerősítés - Qt Linguist</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Delete non-empty length variant?</source>
+ <translation>Törölje az 0 hosszúságú változatok?</translation>
+ </message>
+</context>
+<context>
+ <name>LRelease</name>
+ <message numerus="yes">
+ <location filename="../tools/linguist/shared/qm.cpp" line="+761"/>
+ <source>Dropped %n message(s) which had no ID.</source>
+ <translation>
+ <numerusform>%n üzenez eldobva, melyek nem rendelkeztek azonosítóval.</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <location line="+4"/>
+ <source>Excess context/disambiguation dropped from %n message(s).</source>
+ <translation>
+ <numerusform>Fölösleges szövegösszefüggés/egyértelműsítés törlése %n üzenetből.</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <location line="+8"/>
+ <source> Generated %n translation(s) (%1 finished and %2 unfinished)
+</source>
+ <translation>
+ <numerusform>%n fordítás legenerálása (%1 befejezett és %2 befejezetlen)</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <location line="+4"/>
+ <source> Ignored %n untranslated source text(s)
+</source>
+ <translation>
+ <numerusform>%n lefordítatlan forrás szöveg mellőzése</numerusform>
+ </translation>
+ </message>
+</context>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.ui"/>
+ <source>MainWindow</source>
+ <translation>FÅ‘Ablak</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Phrases</source>
+ <translation>&amp;Fázisok</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Close Phrase Book</source>
+ <translation>&amp;Fázis könyvek bezárása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Edit Phrase Book</source>
+ <translation>Fázis könyvek &amp;szerkesztése</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Print Phrase Book</source>
+ <translation>&amp;Fázis könyvek nyomtatása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>V&amp;alidation</source>
+ <translation>&amp;Érvényesítés</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;View</source>
+ <translation>&amp;Nézet</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Vie&amp;ws</source>
+ <translation>&amp;Nézetek</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Toolbars</source>
+ <translation>&amp;Eszköztár</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Help</source>
+ <translation>&amp;Súgó</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Translation</source>
+ <translation>&amp;Fordítások</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;File</source>
+ <translation>&amp;Fájl</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Edit</source>
+ <translation>&amp;Szerkesztés</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Open...</source>
+ <translation>&amp;Megnyitás...</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Open a Qt translation source file (TS file) for editing</source>
+ <translation>Egy Qt fordítási forrás fájl (TS fájl) megnyitása szerkesztésre</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+O</source>
+ <translation>Ctrl+O</translation>
+ </message>
+ <message>
+ <location/>
+ <source>E&amp;xit</source>
+ <translation>&amp;Kilépés</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Close this window and exit.</source>
+ <translation>Ablak bezárása és kilépés.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+Q</source>
+ <translation>Ctrl+Q</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+646"/>
+ <location line="+15"/>
+ <source>&amp;Save</source>
+ <translation>&amp;Mentés</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.ui"/>
+ <source>Save changes made to this Qt translation source file</source>
+ <translation>Változtatások elmentése a Qt fordítási forrás fájlban</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Move to the previous unfinished item.</source>
+ <translation>Az előző befejezetlen elemre mozgatás.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Move to the next unfinished item.</source>
+ <translation>A következő befejezetlen elemre mozgatás.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Move to the previous item.</source>
+ <translation>Az előző elemre mozgatás.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Move to the next item.</source>
+ <translation>A következő elemre mozgatás.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Mark this item as done and move to the next unfinished item.</source>
+ <translation>Az elem készre jelölése és a következő befejezetlen elemre mozgás.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Copy from source text</source>
+ <translation>Másolás forrás szövegből</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Toggle the validity check of accelerators, i.e. whether the number of ampersands in the source and translation text is the same. If the check fails, a message is shown in the warnings window.</source>
+ <translation>Gyorsítások érvényesség ellenőrzésének kapcsolgatása, lásd vajon az et jelek száma megegyezik-e a a forrás és lefordított szövegben. Ha ez az ellenőrzés hibásan zárul le, a figyelmeztető ablakban egy üzenet tűnik fel.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Toggle the validity check of ending punctuation. If the check fails, a message is shown in the warnings window.</source>
+ <translation>A végződő írásjelek érvényesség ellenőrzésének kapcsolgatása. Ha ez az ellenőrzés nem sikerült, akkor egy üzenet bukkan fel a figyelmeztető ablakban.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Toggle checking that phrase suggestions are used. If the check fails, a message is shown in the warnings window.</source>
+ <translation>Fázis ajánlások ellenőrzésének kapcsolgatása. Ha az ellenőrzés sikertelen, akkor egy üzenet bukkan fel a figyelmeztető ablakban.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Toggle the validity check of place markers, i.e. whether %1, %2, ... are used consistently in the source text and translation text. If the check fails, a message is shown in the warnings window.</source>
+ <translation>A hely megjelelölők érvényesség ellenőrzésének kapcsolgatása, lásd vajon a(z) %1, %2.. következetesen vannak-e használva a forrás és lefordított szövegben. Ha az ellenőrzés sikertelen, egy üzenet bukkan fel a figyelmeztető ablakban.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Open Read-O&amp;nly...</source>
+ <translation>&amp;Csak olvasható megnyitása...</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Save All</source>
+ <translation>Az összes &amp;mentése</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+S</source>
+ <translation>Ctrl+S</translation>
+ </message>
+ <message>
+ <location/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-14"/>
+ <location line="+11"/>
+ <source>Save &amp;As...</source>
+ <translation>&amp;Másként mentés...</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Save As...</source>
+ <translation>Másként mentés...</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Save changes made to this Qt translation source file into a new file.</source>
+ <translation>A változtatások egy új fájlba mentése, amik ebben a Qt fordítási forrás fájlban keletkeztek.</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+4"/>
+ <source>&amp;Release</source>
+ <translation>&amp;Kiadás</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.ui"/>
+ <source>Create a Qt message file suitable for released applications from the current message file.</source>
+ <translation>Qt üzenez fájl létrehozása az aktuális üzenet fájlból, ami alkalmas a kiadásra.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Print...</source>
+ <translation>&amp;Nyomtatás...</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+P</source>
+ <translation>Ctrl+P</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Undo</source>
+ <translation>&amp;Visszacsinálás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Recently Opened &amp;Files</source>
+ <translation>&amp;Utoljára megnyitott &amp;fájlok</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Save</source>
+ <translation>Mentés</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Print a list of all the translation units in the current translation source file.</source>
+ <translation>Az összes fordítási egység kinyomtatása az aktuális fordítási forrás fájlban.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Undo the last editing operation performed on the current translation.</source>
+ <translation>Az utoljára szerkesztett művelet visszavonása az aktuális fordításon.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+Z</source>
+ <translation>Ctrl+Z</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Redo</source>
+ <translation>&amp;Helyreállítás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Redo an undone editing operation performed on the translation.</source>
+ <translation>Szerkesztő művelet helyreállítása és visszavonása, ami az aktuális fordításon lett végrehajtva.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+Y</source>
+ <translation>Ctrl+Y</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Cu&amp;t</source>
+ <translation>&amp;Kivágás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Copy the selected translation text to the clipboard and deletes it.</source>
+ <translation>A kiválasztott fordítási szöveg vágólapra másolása és törlése.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+X</source>
+ <translation>Ctrl+X</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Copy</source>
+ <translation>&amp;Másolás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Copy the selected translation text to the clipboard.</source>
+ <translation>A kiválaszott fordítási szöveg vágólapra másolása.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+C</source>
+ <translation>Ctrl+C</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Paste</source>
+ <translation>&amp;Beillesztés</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Paste the clipboard text into the translation.</source>
+ <translation>A vágólapon levő szöveg fordításba illesztése.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+V</source>
+ <translation>Ctrl+V</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Select &amp;All</source>
+ <translation>Az &amp;összes kiválasztása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Select the whole translation text.</source>
+ <translation>Az egész fordítási szöveg kiválasztása.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+A</source>
+ <translation>Ctrl+A</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Find...</source>
+ <translation>&amp;Keresés...</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Search for some text in the translation source file.</source>
+ <translation>Néhány szövegre keresés a fordítási forrás fájlban.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+F</source>
+ <translation>Ctrl+F</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Find &amp;Next</source>
+ <translation>&amp;Következő keresése</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Continue the search where it was left.</source>
+ <translation>A keresés folytatása ott, ahol abba lett hagyva.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>F3</source>
+ <translation>F3</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Prev Unfinished</source>
+ <translation>Az &amp;előző befejezetlen</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Close</source>
+ <translation>Bezárás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Close All</source>
+ <translation>Az összes &amp;bezárása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+W</source>
+ <translation>Ctrl+W</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+K</source>
+ <translation>Ctrl+K</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Next Unfinished</source>
+ <translation>&amp;Következő befejezetlen</translation>
+ </message>
+ <message>
+ <location/>
+ <source>P&amp;rev</source>
+ <translation>&amp;Előző</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+Shift+K</source>
+ <translation>Ctrl+Shift+K</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ne&amp;xt</source>
+ <translation>&amp;Következő</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Done and Next</source>
+ <translation>&amp;Kész és Következő</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Copies the source text into the translation field.</source>
+ <translation>Forrás szövegek fordítási mezőbe másolása.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+B</source>
+ <translation>Ctrl+B</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Accelerators</source>
+ <translation>&amp;Gyorsítások</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Ending Punctuation</source>
+ <translation>&amp;Vég írásjelek</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Phrase matches</source>
+ <translation>&amp;Fázis egyezés</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Place &amp;Marker Matches</source>
+ <translation>Hely &amp;megjelölők egyezései</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;New Phrase Book...</source>
+ <translation>&amp;Új fázis könyv...</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Create a new phrase book.</source>
+ <translation>Egy új fázis könyv létrehozása.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+N</source>
+ <translation>Ctrl+N</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Open Phrase Book...</source>
+ <translation>Fázis könyv &amp;megnyitása...</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Open a phrase book to assist translation.</source>
+ <translation>Fáris könyv megnyitása a fordítás támogatásával.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+H</source>
+ <translation>Ctrl+H</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Reset Sorting</source>
+ <translation>&amp;Rendezés helyreállítása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Sort the items back in the same order as in the message file.</source>
+ <translation>Az elemek visszarendezése ugyanabba a sorrendben, ahogy az üzenet fájlban található.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Display guesses</source>
+ <translation>Feltételezések &amp;kijelzése</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Set whether or not to display translation guesses.</source>
+ <translation>Annak beállítása, hogy vajon kijelezze a fordítási feltételezéseket vagy sem.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Statistics</source>
+ <translation>&amp;Statisztikák</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Display translation statistics.</source>
+ <translation>Fordítási statisztikák kijelzése.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Manual</source>
+ <translation>&amp;Kézi</translation>
+ </message>
+ <message>
+ <location/>
+ <source>F1</source>
+ <translation>F1</translation>
+ </message>
+ <message>
+ <location/>
+ <source>About Qt Linguist</source>
+ <translation>Qt Linguist-ról</translation>
+ </message>
+ <message>
+ <location/>
+ <source>About Qt</source>
+ <translation>Qt-ról</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Display information about the Qt toolkit by Trolltech.</source>
+ <translation>Információ megjelenítése a Trolltech Qt eszközrendszeréről.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;What&apos;s This?</source>
+ <translation>&amp;Mi ez?</translation>
+ </message>
+ <message>
+ <location/>
+ <source>What&apos;s This?</source>
+ <translation>Mi ez?</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Enter What&apos;s This? mode.</source>
+ <translation>Mi ez? beviteli mód.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Shift+F1</source>
+ <translation>Shift+F1</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Search And Translate...</source>
+ <translation>&amp;Keresés és fordítás...</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Replace the translation on all entries that matches the search source text.</source>
+ <translation>A fordítások kicserélése az összes olyan helyen, ahol az megegyezik a keresett forrás szöveggel.</translation>
+ </message>
+ <message>
+ <location/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+21"/>
+ <source>&amp;Batch Translation...</source>
+ <translation>&amp;Köteg fordítás...</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Batch translate all entries using the information in the phrase books.</source>
+ <translation>Köteg fordítás mindenhol, ahol az információ a fázis könyvekben van haszálva.</translation>
+ </message>
+ <message>
+ <location/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-34"/>
+ <location line="+10"/>
+ <source>Release As...</source>
+ <translation>Kiadás, mint...</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-2005"/>
+ <source></source>
+ <comment>This is the application&apos;s main window.</comment>
+ <translatorcomment>Ez az alkalmazás fő ablaka.</translatorcomment>
+ <translation></translation>
+ </message>
+ <message>
+ <location line="+188"/>
+ <source>Source text</source>
+ <translation>Forrás szöveg</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <location line="+25"/>
+ <source>Index</source>
+ <translation>Index</translation>
+ </message>
+ <message>
+ <location line="-2"/>
+ <location line="+63"/>
+ <source>Context</source>
+ <translation>Összefüggés</translation>
+ </message>
+ <message>
+ <location line="-62"/>
+ <source>Items</source>
+ <translation>Elemek</translation>
+ </message>
+ <message>
+ <location line="+79"/>
+ <source>This panel lists the source contexts.</source>
+ <translation>Ez a panel kilistázza a forrás összefüggéseket.</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Strings</source>
+ <translation>Sztringek</translation>
+ </message>
+ <message>
+ <location line="+39"/>
+ <source>Phrases and guesses</source>
+ <translation>Kommunikációk és feltételezések</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Sources and Forms</source>
+ <translation>Források és formák</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Warnings</source>
+ <translation>Figyelmeztetések</translation>
+ </message>
+ <message>
+ <location line="+59"/>
+ <source> MOD </source>
+ <comment>status bar: file(s) modified</comment>
+ <translation>MOD</translation>
+ </message>
+ <message>
+ <location line="+130"/>
+ <source>Loading...</source>
+ <translation>Betöltés...</translation>
+ </message>
+ <message>
+ <location line="+32"/>
+ <location line="+22"/>
+ <source>Loading File - Qt Linguist</source>
+ <translation>Fájl betöltése - Qt Linguist</translation>
+ </message>
+ <message>
+ <location line="-21"/>
+ <source>The file &apos;%1&apos; does not seem to be related to the currently open file(s) &apos;%2&apos;.
+
+Close the open file(s) first?</source>
+ <translation>A(z) &apos;%1&apos; fájl nem tartozik hozzá egyetlen aktuálisan megnyitott &apos;%2&apos; fájlhoz sem.
+
+Bezárja először a megnyitott fájl(oka)t?</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>The file &apos;%1&apos; does not seem to be related to the file &apos;%2&apos; which is being loaded as well.
+
+Skip loading the first named file?</source>
+ <translation>A(z) &apos;%1&apos; fájl nem tartozik egyetlen &apos;%2&apos; fájlhoz sem, amelyik ugyanúgy be lett töltve.
+
+Azt első megnevezett fájl betöltésének kihagyása?</translation>
+ </message>
+ <message numerus="yes">
+ <location line="+61"/>
+ <source>%n translation unit(s) loaded.</source>
+ <translation>
+ <numerusform>%n fordítási egység betöltése.</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+93"/>
+ <source>Related files (%1);;</source>
+ <translation>Hozzákapcsolodó fájlok (%1);;</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Open Translation Files</source>
+ <translation>Fordítási fájlok megnyitása</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <location line="+31"/>
+ <source>File saved.</source>
+ <translation>Fájl elmentve.</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.ui"/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+15"/>
+ <location line="+1165"/>
+ <source>Release</source>
+ <translation>Kiadás</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-1164"/>
+ <source>Qt message files for released applications (*.qm)
+All files (*)</source>
+ <translation>Qt üzenet fájlok a kiadott alkalmazásra (*.qm)
+Az összes fájl(*)</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location line="+12"/>
+ <source>File created.</source>
+ <translation>Fál létrehozva.</translation>
+ </message>
+ <message>
+ <location line="+34"/>
+ <location line="+355"/>
+ <source>Printing...</source>
+ <translation>Nyomtatás...</translation>
+ </message>
+ <message>
+ <location line="-347"/>
+ <source>Context: %1</source>
+ <translation>Összefüggés: %1</translation>
+ </message>
+ <message>
+ <location line="+32"/>
+ <source>finished</source>
+ <translation>Befejezve</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>unresolved</source>
+ <translation>Nincs megoldva</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>obsolete</source>
+ <translation>Elavulás</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <location line="+307"/>
+ <source>Printing... (page %1)</source>
+ <translation>Nyomtatás... (%1 lap)</translation>
+ </message>
+ <message>
+ <location line="-300"/>
+ <location line="+307"/>
+ <source>Printing completed</source>
+ <translation>Nyomtatás teljesítve</translation>
+ </message>
+ <message>
+ <location line="-305"/>
+ <location line="+307"/>
+ <source>Printing aborted</source>
+ <translation>Nyomtatás megszakítva</translation>
+ </message>
+ <message>
+ <location line="-232"/>
+ <source>Search wrapped.</source>
+ <translation>Keresés elrejtése.</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <location line="+278"/>
+ <location line="+34"/>
+ <location line="+24"/>
+ <location line="+22"/>
+ <location line="+516"/>
+ <location line="+1"/>
+ <location line="+274"/>
+ <location line="+40"/>
+ <location line="+10"/>
+ <source>Qt Linguist</source>
+ <translation>Qt Linguist</translation>
+ </message>
+ <message>
+ <location line="-1198"/>
+ <location line="+102"/>
+ <source>Cannot find the string &apos;%1&apos;.</source>
+ <translation>A(z) &apos;%1&apos; sztring nem található.</translation>
+ </message>
+ <message>
+ <location line="-82"/>
+ <source>Search And Translate in &apos;%1&apos; - Qt Linguist</source>
+ <translation>Keresés és fordítás a(z) &apos;%1&apos;-ben - Qt Linguist</translation>
+ </message>
+ <message>
+ <location line="+34"/>
+ <location line="+23"/>
+ <location line="+24"/>
+ <source>Translate - Qt Linguist</source>
+ <translation>Qt Linguist fordítása</translation>
+ </message>
+ <message numerus="yes">
+ <location line="-46"/>
+ <source>Translated %n entry(s)</source>
+ <translation>
+ <numerusform>%n bevitel lefordítva</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>No more occurrences of &apos;%1&apos;. Start over?</source>
+ <translation>Nem található &apos;%1&apos; több előfordulása. Előlről kezdi?</translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>Create New Phrase Book</source>
+ <translation>Új kommunikációs könyv létrehozása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Qt phrase books (*.qph)
+All files (*)</source>
+ <translation>Qt kommunikációs könyv (*.qph)
+Az összes fájl (*)</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Phrase book created.</source>
+ <translation>Kommunikációs könyv létrehozva.</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Open Phrase Book</source>
+ <translation>Kommunikációs könyv megnyitása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Qt phrase books (*.qph);;All files (*)</source>
+ <translation>Qt kommunikációs könyvek (*.qpm);;Az összes fájl (*)</translation>
+ </message>
+ <message numerus="yes">
+ <location line="+7"/>
+ <source>%n phrase(s) loaded.</source>
+ <translation>
+ <numerusform>%n kommunikáció betöltése.</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+93"/>
+ <location line="+3"/>
+ <location line="+7"/>
+ <source>Add to phrase book</source>
+ <translation>Kommunikációs könyv hozzáadása</translation>
+ </message>
+ <message>
+ <location line="-9"/>
+ <source>No appropriate phrasebook found.</source>
+ <translation>Nem található megfelelő kommunikációs könyv.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Adding entry to phrasebook %1</source>
+ <translation>Új elem hozzáadása a(z) %1 fázis fáziskönyvhöz</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Select phrase book to add to</source>
+ <translation>Kommunikációs könyv kiválasztása hozzáadásra</translation>
+ </message>
+ <message>
+ <location line="+29"/>
+ <source>Unable to launch Qt Assistant (%1)</source>
+ <translation>Nem lehet elindítani a Qt Assistant (%1)</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Version %1</source>
+ <translation>%1 Verzió</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&lt;center&gt;&lt;img src=&quot;:/images/splash.png&quot;/&gt;&lt;/img&gt;&lt;p&gt;%1&lt;/p&gt;&lt;/center&gt;&lt;p&gt;Qt Linguist is a tool for adding translations to Qt applications.&lt;/p&gt;&lt;p&gt;Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</source>
+ <translation>&lt;center&gt;&lt;img src=&quot;:/images/splash.png&quot;/&gt;&lt;/img&gt;&lt;p&gt;%1&lt;/p&gt;&lt;/center&gt;&lt;p&gt;Qt Linguist egy olyan eszköz, amelyekkel fordítások adhat hozzá a Qt alkalmazásokhoz.&lt;/p&gt;&lt;p&gt;Szerzői jog(C) 2010 Nokia Vállalat és/vagy leányvállalatai.</translation>
+ </message>
+ <message>
+ <location line="+38"/>
+ <source>Do you want to save the modified files?</source>
+ <translation>El szeretné menteni a módosított fájlokat?</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Do you want to save &apos;%1&apos;?</source>
+ <translation>El szeretné menteni a(z) %1-t ?</translation>
+ </message>
+ <message>
+ <location line="+43"/>
+ <source>Qt Linguist[*]</source>
+ <translation>Qt Linguist[*]</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>%1[*] - Qt Linguist</source>
+ <translation>%1[*] - Qt Linguist</translation>
+ </message>
+ <message>
+ <location line="+267"/>
+ <location line="+12"/>
+ <source>No untranslated translation units left.</source>
+ <translation>Nem maradtak lefordítatlan fordítások.</translation>
+ </message>
+ <message>
+ <location line="+176"/>
+ <source>&amp;Window</source>
+ <translation>&amp;Ablak</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Minimize</source>
+ <translation>Minimalizálás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Ctrl+M</source>
+ <translation>Ctrl+M</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Display the manual for %1.</source>
+ <translation>A manuál megjelenítése %1-re vonatkozóan.</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Display information about %1.</source>
+ <translation>Információ megjelenítése a(z) %1-ről.</translation>
+ </message>
+ <message>
+ <location line="+70"/>
+ <source>&amp;Save &apos;%1&apos;</source>
+ <translation>&apos;%1&apos; &amp;mentése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Save &apos;%1&apos; &amp;As...</source>
+ <translation>&apos;%1&apos; &amp;másként mentése...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Release &apos;%1&apos;</source>
+ <translation>&apos;%1&apos; kiadása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Release &apos;%1&apos; As...</source>
+ <translation>&apos;%1&apos; másként kiadása...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Close &apos;%1&apos;</source>
+ <translation>&apos;%1&apos; &amp;bezárása</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <location line="+13"/>
+ <source>&amp;Close</source>
+ <translation>&amp;Bezárás</translation>
+ </message>
+ <message>
+ <location line="-10"/>
+ <source>Save All</source>
+ <translation>Az összes mentése</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.ui"/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+1"/>
+ <source>&amp;Release All</source>
+ <translation>Az összes &amp;kiadása</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+1"/>
+ <source>Close All</source>
+ <translation>Az összes bezárása</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Translation File &amp;Settings for &apos;%1&apos;...</source>
+ <translation>Fordítási fájlok &amp;beállítása erre &apos;%1&apos;...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Batch Translation of &apos;%1&apos;...</source>
+ <translation>A(z) &apos;%1&apos; &amp;köteg fordítása...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Search And &amp;Translate in &apos;%1&apos;...</source>
+ <translation>Keresés és &amp;fordítás &apos;%1&apos;-ben...</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Search And &amp;Translate...</source>
+ <translation>Keresés és &amp;fordítás...</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.ui"/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+51"/>
+ <source>File</source>
+ <translation>Fájl</translation>
+ </message>
+ <message>
+ <location/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+7"/>
+ <source>Edit</source>
+ <translation>Szerkesztés</translation>
+ </message>
+ <message>
+ <location/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+6"/>
+ <source>Translation</source>
+ <translation>Fordítás</translation>
+ </message>
+ <message>
+ <location/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+6"/>
+ <source>Validation</source>
+ <translation>Érvényesítés</translation>
+ </message>
+ <message>
+ <location/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+7"/>
+ <source>Help</source>
+ <translation>Súgó</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+84"/>
+ <source>Cannot read from phrase book &apos;%1&apos;.</source>
+ <translation>Nem lehet a(z) &apos;%1&apos; kommunikációs könyvből olvasni.</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Close this phrase book.</source>
+ <translation>A kommunikációs könyv bezárása.</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Enables you to add, modify, or delete entries in this phrase book.</source>
+ <translation>Hozzáadás, módosítás, vagy törlés engedélyezése ebben a kommunikációs könyvben.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Print the entries in this phrase book.</source>
+ <translation>Az összes bevitel kinyomtatása ebben a társalgási szótárban.</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Cannot create phrase book &apos;%1&apos;.</source>
+ <translation>Nem lehet a &apos;%1&apos; társalgási szótárat létrehozni.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Do you want to save phrase book &apos;%1&apos;?</source>
+ <translation>El szeretné menteni a &apos;%1&apos; társalgási szótárat?</translation>
+ </message>
+ <message>
+ <location line="+323"/>
+ <source>All</source>
+ <translation>Mind</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.ui"/>
+ <source>Open/Refresh Form &amp;Preview</source>
+ <translation>Forma megnyitása/felfrissítése &amp;nézet</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Form Preview Tool</source>
+ <translation>Forma előnézeti eszköz</translation>
+ </message>
+ <message>
+ <location/>
+ <source>F5</source>
+ <translation>F5</translation>
+ </message>
+ <message>
+ <location/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-536"/>
+ <source>Translation File &amp;Settings...</source>
+ <translation>Fordítási fájl &amp;beállítások...</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Add to Phrase Book</source>
+ <translation>Társalgási szótárhoz &amp;hozzáadás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+T</source>
+ <translation>Ctrl+T</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+J</source>
+ <translation>Ctrl+J</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Ctrl+Shift+J</source>
+ <translation>Ctrl+Shift+J</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Previous unfinished item</source>
+ <translation>Előző befejezetlen elem</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Next unfinished item</source>
+ <translation>Következő befejezetlen elem</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Move to previous item</source>
+ <translation>Az előző befejezetlen elemre mozgás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Next item</source>
+ <translation>Következő elem</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Mark item as done and move to the next unfinished item</source>
+ <translation>Az elem készként jelölése és a következő befejezetlen elemre mozgatás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Copies the source text into the translation field</source>
+ <translation>A forrás szöveg fordítási szövegbe másolása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Toggle the validity check of accelerators</source>
+ <translation>Gyorsítások érvényesség ellenőrzésének kapcsolgatása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Toggle the validity check of ending punctuation</source>
+ <translation>Vég írásjelek érvényesség ellenőrzésének kapcsolgatása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Toggle checking that phrase suggestions are used</source>
+ <translation>A használt társalgási ajánlások ellenőrzésének kapcsolgatása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Toggle the validity check of place markers</source>
+ <translation>Hely megjelölők érvényesség vizsgálatának kapcsolgatása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Create a Qt message file suitable for released applications from the current message file. The filename will automatically be determined from the name of the TS file.</source>
+ <translation>Egy Qt üzenet fájl létrehozása az aktuális üzenet fájlból, amely megfelelő az alkalmazás kiadásaira. A fájlnév TS fájl nevéből lesz automatikusan meghatározva.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Length Variants</source>
+ <translation>Hossz változatok</translation>
+ </message>
+</context>
+<context>
+ <name>MessageEditor</name>
+ <message>
+ <location filename="../tools/linguist/linguist/messageeditor.cpp" line="+42"/>
+ <source></source>
+ <comment>This is the right panel of the main window.</comment>
+ <translatorcomment>Ez a fő ablak jobb panelja.</translatorcomment>
+ <translation></translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>Russian</source>
+ <translation>Orosz</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>German</source>
+ <translation>Német</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Japanese</source>
+ <translation>Japán</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>French</source>
+ <translation>Francia</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Polish</source>
+ <translation>Lengyel</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Chinese</source>
+ <translation>Kínai</translation>
+ </message>
+ <message>
+ <location line="+53"/>
+ <source>This whole panel allows you to view and edit the translation of some source text.</source>
+ <translation>Ez az egész pabel engedélyezi néhány forrás szöveg fordításának megtekintését és szerkesztését.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Source text</source>
+ <translation>Forrás szöveg</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>This area shows the source text.</source>
+ <translation>Ez a terület mutatja a forrás szöveget.</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Source text (Plural)</source>
+ <translation>Forrás szöveg (Többesszám)</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>This area shows the plural form of the source text.</source>
+ <translation>Ez a terület mutatja a forrás szöveg többesszámú formáját.</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Developer comments</source>
+ <translation>Fejlesztői megjegyzések</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>This area shows a comment that may guide you, and the context in which the text occurs.</source>
+ <translation>Ez a terület mutatja a megjegyzéseket, ami segítheti Önt, és az összefüggéseket, hogy melyik szövegben fordul elő.</translation>
+ </message>
+ <message>
+ <location line="+59"/>
+ <source>Here you can enter comments for your own use. They have no effect on the translated applications.</source>
+ <translation>Itt hozzáadhatja a saját megjegyzését saját használatra. Nincsen hatásuk a lefordított alkalmazásokon.</translation>
+ </message>
+ <message>
+ <location line="+232"/>
+ <source>%1 translation (%2)</source>
+ <translation>%1 fordítás (%2)</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>This is where you can enter or modify the translation of the above source text.</source>
+ <translation>Ez az a hely, ahol beviheti és módosíthatja a fentebb található forrás szöveg fordítását.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>%1 translation</source>
+ <translation>%1 fordítás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>%1 translator comments</source>
+ <translation>%1 fordító megjegyzések</translation>
+ </message>
+ <message>
+ <location line="+157"/>
+ <source>&apos;%1&apos;
+Line: %2</source>
+ <translation>&apos;%1&apos;
+Sor: %2</translation>
+ </message>
+</context>
+<context>
+ <name>MessageModel</name>
+ <message>
+ <location filename="../tools/linguist/linguist/messagemodel.cpp" line="+832"/>
+ <source>Completion status for %1</source>
+ <translation>%1 elkészítési státusza</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>&lt;file header&gt;</source>
+ <translation>&lt;file header&gt;</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>&lt;context comment&gt;</source>
+ <translation>&lt;context comment&gt;</translation>
+ </message>
+ <message>
+ <location line="+71"/>
+ <source>&lt;unnamed context&gt;</source>
+ <translation>&lt;unnamed context&gt;</translation>
+ </message>
+</context>
+<context>
+ <name>MsgEdit</name>
+ <message>
+ <location filename="../tools/linguist/linguist/messageeditor.cpp" line="-614"/>
+ <source></source>
+ <comment>This is the right panel of the main window.</comment>
+ <translatorcomment>Ez a fő ablak jobb panelja.</translatorcomment>
+ <translation></translation>
+ </message>
+</context>
+<context>
+ <name>PhraseBookBox</name>
+ <message>
+ <location filename="../tools/linguist/linguist/phrasebookbox.cpp" line="+12"/>
+ <source></source>
+ <comment>Go to Phrase &gt; Edit Phrase Book... The dialog that pops up is a PhraseBookBox.</comment>
+ <translatorcomment>Társalgás -&gt; Társalgási szótár szerkesztése... A felbukkanó ablak egy TársalgásiSzótárDoboz.</translatorcomment>
+ <translation></translation>
+ </message>
+ <message>
+ <location line="+54"/>
+ <source>(New Entry)</source>
+ <translation>(Új bevitel)</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>%1[*] - Qt Linguist</source>
+ <translation>%1[*] - Qt Linguist</translation>
+ </message>
+ <message>
+ <location line="+90"/>
+ <source>Qt Linguist</source>
+ <translation>Qt Linguist</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Cannot save phrase book &apos;%1&apos;.</source>
+ <translation>Nem lehet elmenteni a(z) &apos;%1&apos; társalgási szótárat.</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/phrasebookbox.ui"/>
+ <source>Edit Phrase Book</source>
+ <translation>Társalgási szótár szerkesztése</translation>
+ </message>
+ <message>
+ <location/>
+ <source>This window allows you to add, modify, or delete entries in a phrase book.</source>
+ <translation>Ez az ablak engedélyezi új bevitelek hozzáadását, módosítását, vagy törlését egy társalgási szótárban.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Translation:</source>
+ <translation>&amp;Fordítás:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>This is the phrase in the target language corresponding to the source phrase.</source>
+ <translation>Ez a forrás társalgás megfelelője a cél nyelvben.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>S&amp;ource phrase:</source>
+ <translation>&amp;Forrás társalgás:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>This is a definition for the source phrase.</source>
+ <translation>Ez egy forrás fordítás definíció.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>This is the phrase in the source language.</source>
+ <translation>Ez egy társalgás a forrás nyelvben.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Definition:</source>
+ <translation>&amp;Definíció:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Click here to add the phrase to the phrase book.</source>
+ <translation>Kattintson ide a társalgás hozzáadásához a társalgási könyvben.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;New Entry</source>
+ <translation>&amp;Új bevitel</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Click here to remove the entry from the phrase book.</source>
+ <translation>Kattintson ide a bevitel társalgási könyvből való eltávolításához.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Remove Entry</source>
+ <translation>Bevitel &amp;eltávolítása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Settin&amp;gs...</source>
+ <translation>&amp;Beállítások...</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Click here to save the changes made.</source>
+ <translation>Kattintson ide a változtatások elmentéséhez.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Save</source>
+ <translation>&amp;Mentés</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Click here to close this window.</source>
+ <translation>Kattintson ide az ablak bezárásához.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Close</source>
+ <translation>Bezárás</translation>
+ </message>
+</context>
+<context>
+ <name>PhraseModel</name>
+ <message>
+ <location filename="../tools/linguist/linguist/phrasemodel.cpp" line="+117"/>
+ <source>Source phrase</source>
+ <translation>Forrás társalgás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Translation</source>
+ <translation>Fordítás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Definition</source>
+ <translation>Definíció</translation>
+ </message>
+</context>
+<context>
+ <name>PhraseView</name>
+ <message>
+ <location filename="../tools/linguist/linguist/phraseview.cpp" line="+122"/>
+ <source>Insert</source>
+ <translation>Beszúrás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Edit</source>
+ <translation>Szerkesztés</translation>
+ </message>
+ <message>
+ <location line="+113"/>
+ <source>Guess (%1)</source>
+ <translation>Feltételezés (%1)</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Guess</source>
+ <translation>Feltételezés</translation>
+ </message>
+</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="../tools/linguist/shared/qm.cpp" line="+12"/>
+ <source>Compiled Qt translations</source>
+ <translation>Lefordított Qt fordítások</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-1280"/>
+ <source>Translation files (%1);;</source>
+ <translation>Fordítási fájlok (%1);;</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>All files (*)</source>
+ <translation>Fájlok hozzáadása ( *)</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/messagemodel.cpp" line="-1127"/>
+ <location line="+27"/>
+ <location line="+67"/>
+ <location line="+39"/>
+ <location line="+17"/>
+ <location line="+15"/>
+ <location filename="../tools/linguist/linguist/phrase.cpp" line="+196"/>
+ <source>Qt Linguist</source>
+ <translation>Qt Linguist</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/shared/po.cpp" line="+658"/>
+ <source>GNU Gettext localization files</source>
+ <translation>GNU Gettext lokalizációs fájlok</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/shared/ts.cpp" line="+752"/>
+ <source>Qt translation sources (format 1.1)</source>
+ <translation>Qt fordítási forrása (1.1 formátum)</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Qt translation sources (format 2.0)</source>
+ <translation>Qt fordítás források (2.0 formátum)</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Qt translation sources (latest format)</source>
+ <translation>Qt fordítási források (legutolsó formátum)</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/shared/xliff.cpp" line="+827"/>
+ <source>XLIFF localization files</source>
+ <translation>XLIFF lokalizációs fájlok</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/shared/qph.cpp" line="+183"/>
+ <source>Qt Linguist &apos;Phrase Book&apos;</source>
+ <translation>Qt Linguist &apos;Társalgási Könyv&apos;</translation>
+ </message>
+</context>
+<context>
+ <name>SourceCodeView</name>
+ <message>
+ <location filename="../tools/linguist/linguist/sourcecodeview.cpp" line="+70"/>
+ <source>&lt;i&gt;Source code not available&lt;/i&gt;</source>
+ <translation>&lt;i&gt;A forrás kód nem elérhető&lt;/i&gt;</translation>
+ </message>
+ <message>
+ <location line="+33"/>
+ <source>&lt;i&gt;File %1 not available&lt;/i&gt;</source>
+ <translation>&lt;i&gt;A(z) %1 fájl nem elérhető&lt;/i&gt;</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&lt;i&gt;File %1 not readable&lt;/i&gt;</source>
+ <translation>&lt;i&gt;A(z) %1 fájl nem olvasható&lt;/i&gt;</translation>
+ </message>
+</context>
+<context>
+ <name>Statistics</name>
+ <message>
+ <location filename="../tools/linguist/linguist/statistics.ui"/>
+ <source>Statistics</source>
+ <translation>Statisztikák</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Translation</source>
+ <translation>Fordítás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Source</source>
+ <translation>Forrás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>0</source>
+ <translation>0</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Words:</source>
+ <translation>Szavak:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Characters:</source>
+ <translation>Karakterek:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Characters (with spaces):</source>
+ <translation>Karakterek (szóközökkel):</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Close</source>
+ <translation>Bezárás</translation>
+ </message>
+</context>
+<context>
+ <name>TranslateDialog</name>
+ <message>
+ <location filename="../tools/linguist/linguist/translatedialog.ui"/>
+ <source>This window allows you to search for some text in the translation source file.</source>
+ <translation>Ez az ablak engedélyezi, hogy rákeressen néhány szövegre a fordítási forrás fájlban.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Type in the text to search for.</source>
+ <translation>Gépelje be a keresni kívánt szöveget.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Find &amp;source text:</source>
+ <translation>&amp;Forrás szöveg keresése:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Translate to:</source>
+ <translation>&amp;Fordítás erre:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Search options</source>
+ <translation>Keresés opciók</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Texts such as &apos;TeX&apos; and &apos;tex&apos; are considered as different when checked.</source>
+ <translation>&apos;TeX&apos; és &apos;text&apos; szövegek különbözően kezelése bejelöléskor.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Match &amp;case</source>
+ <translation>Megegyező &amp;eset</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Mark new translation as &amp;finished</source>
+ <translation>Új fordítások &amp;befejezettként jelölése</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Click here to find the next occurrence of the text you typed in.</source>
+ <translation>Kattintson ide a begépelt szöveg következő előfordulásának megkereséséhez.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Find Next</source>
+ <translation>Következő keresése</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Translate</source>
+ <translation>Fordítás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Translate All</source>
+ <translation>Az összes fordítása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Click here to close this window.</source>
+ <translation>Kattintson ide az ablak bezárásához.</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Cancel</source>
+ <translation>Mégse</translation>
+ </message>
+</context>
+<context>
+ <name>TranslationSettingsDialog</name>
+ <message>
+ <location filename="../tools/linguist/linguist/translationsettingsdialog.cpp" line="+68"/>
+ <source>Any Country</source>
+ <translation>Bármeny ország</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <location line="+8"/>
+ <source>Settings for &apos;%1&apos; - Qt Linguist</source>
+ <translation>&apos;%1&apos;-re állítás - Qt Linguist</translation>
+ </message>
+ <message>
+ <location filename="../tools/linguist/linguist/translationsettings.ui"/>
+ <source>Source language</source>
+ <translation>Forrás nyelv</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Language</source>
+ <translation>Nyelv</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Country/Region</source>
+ <translation>OrszágRégió</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Target language</source>
+ <translation>Cél nyelv</translation>
+ </message>
+</context>
+</TS>
diff --git a/translations/qt_da.ts b/translations/qt_da.ts
index 6267bb212a..515ed5000b 100644
--- a/translations/qt_da.ts
+++ b/translations/qt_da.ts
@@ -2,6 +2,29 @@
<!DOCTYPE TS>
<TS version="2.0" language="da_DK">
<context>
+ <name>MAC_APPLICATION_MENU</name>
+ <message>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2316"/>
+ <source>Services</source>
+ <translation>Tjenester</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide %1</source>
+ <translation>Skjul %1</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide Others</source>
+ <translation>Skjul andre</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Show All</source>
+ <translation>Vis alle</translation>
+ </message>
+</context>
+<context>
<name>AudioOutput</name>
<message>
<location filename="../src/3rdparty/phonon/phonon/audiooutput.cpp" line="+375"/>
diff --git a/translations/qt_de.ts b/translations/qt_de.ts
index 6447451912..21087745c0 100644
--- a/translations/qt_de.ts
+++ b/translations/qt_de.ts
@@ -2,9 +2,32 @@
<!DOCTYPE TS>
<TS version="2.0" language="de">
<context>
+ <name>MAC_APPLICATION_MENU</name>
+ <message>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2316"/>
+ <source>Services</source>
+ <translation>Dienste</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide %1</source>
+ <translation>%1 ausblenden</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide Others</source>
+ <translation>Andere ausblenden</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Show All</source>
+ <translation>Alle anzeigen</translation>
+ </message>
+</context>
+<context>
<name>CloseButton</name>
<message>
- <location filename="../src/gui/widgets/qtabbar.cpp" line="+2264"/>
+ <location filename="../src/gui/widgets/qtabbar.cpp" line="+2266"/>
<source>Close Tab</source>
<translation>Schließen</translation>
</message>
@@ -372,6 +395,7 @@ Bitte überprüfen Sie Ihre GStreamer-Installation und stellen Sie sicher, dass
<message>
<location line="+6"/>
<source>Decay time (ms)</source>
+ <extracomment>DecayTime: Time over which reverberation is diminished.</extracomment>
<translation>Abklingzeit (ms)</translation>
</message>
<message>
@@ -548,7 +572,7 @@ Bitte überprüfen Sie Ihre GStreamer-Installation und stellen Sie sicher, dass
<context>
<name>Q3FileDialog</name>
<message>
- <location filename="../src/qt3support/dialogs/q3filedialog.cpp" line="+827"/>
+ <location filename="../src/qt3support/dialogs/q3filedialog.cpp" line="+835"/>
<source>Copy or Move a File</source>
<translation>Datei kopieren oder verschieben</translation>
</message>
@@ -1212,7 +1236,7 @@ nach
<translation>Diese Socket-Operation wird nicht unterstützt</translation>
</message>
<message>
- <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+585"/>
+ <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+586"/>
<location filename="../src/network/socket/qabstractsocket.cpp" line="+200"/>
<source>Socket operation timed out</source>
<translation>Das Zeitlimit für die Operation wurde überschritten</translation>
@@ -1257,7 +1281,7 @@ nach
<context>
<name>QApplication</name>
<message>
- <location filename="../src/gui/kernel/qapplication.cpp" line="+2287"/>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2309"/>
<source>QT_LAYOUT_DIRECTION</source>
<comment>Translate this string to the string &apos;LTR&apos; in left-to-right languages or to &apos;RTL&apos; in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.</comment>
<translation>LTR</translation>
@@ -1327,7 +1351,7 @@ nach
<context>
<name>QColorDialog</name>
<message>
- <location filename="../src/gui/dialogs/qcolordialog.cpp" line="+1356"/>
+ <location filename="../src/gui/dialogs/qcolordialog.cpp" line="+1355"/>
<source>Hu&amp;e:</source>
<translation>Farb&amp;ton:</translation>
</message>
@@ -1367,7 +1391,7 @@ nach
<translation>Farbauswahl</translation>
</message>
<message>
- <location line="+184"/>
+ <location line="+183"/>
<source>&amp;Basic colors</source>
<translation>Grundfar&amp;ben</translation>
</message>
@@ -1567,7 +1591,7 @@ nach
<message>
<location filename="../src/gui/dialogs/qmessagebox.cpp" line="+1876"/>
<location line="+464"/>
- <location filename="../src/gui/widgets/qdialogbuttonbox.cpp" line="+650"/>
+ <location filename="../src/gui/widgets/qdialogbuttonbox.cpp" line="+648"/>
<source>OK</source>
<translation>OK</translation>
</message>
@@ -1818,7 +1842,7 @@ nach
<context>
<name>QFileDialog</name>
<message>
- <location filename="../src/gui/dialogs/qfiledialog.cpp" line="+558"/>
+ <location filename="../src/gui/dialogs/qfiledialog.cpp" line="+557"/>
<location line="+471"/>
<source>All Files (*)</source>
<translation>Alle Dateien (*)</translation>
@@ -1906,7 +1930,7 @@ nach
<translation>Verzeichnisse</translation>
</message>
<message>
- <location filename="../src/gui/dialogs/qfiledialog_win.cpp" line="+174"/>
+ <location filename="../src/gui/dialogs/qfiledialog_win.cpp" line="+148"/>
<source>All Files (*.*)</source>
<translation>Alle Dateien (*.*)</translation>
</message>
@@ -2059,7 +2083,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<context>
<name>QFileSystemModel</name>
<message>
- <location filename="../src/gui/dialogs/qfilesystemmodel.cpp" line="+744"/>
+ <location filename="../src/gui/dialogs/qfilesystemmodel.cpp" line="+740"/>
<location filename="../src/gui/itemviews/qdirmodel.cpp" line="+476"/>
<source>%1 TB</source>
<translation>%1 TB</translation>
@@ -2088,7 +2112,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<translation>%1 Byte</translation>
</message>
<message>
- <location line="+77"/>
+ <location line="+89"/>
<source>Invalid filename</source>
<translation>Ungültiger Dateiname</translation>
</message>
@@ -2125,7 +2149,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<translation>Änderungsdatum</translation>
</message>
<message>
- <location filename="../src/gui/dialogs/qfilesystemmodel_p.h" line="+258"/>
+ <location filename="../src/gui/dialogs/qfilesystemmodel_p.h" line="+261"/>
<source>My Computer</source>
<translation>Mein Computer</translation>
</message>
@@ -2558,17 +2582,30 @@ Möchten Sie die Datei trotzdem löschen?</translation>
</message>
</context>
<context>
+ <name>QGstreamerPlayerSession</name>
+ <message>
+ <location filename="../src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp" line="+270"/>
+ <source>Unable to play %1</source>
+ <translation>%1 kann nicht abgespielt werden</translation>
+ </message>
+</context>
+<context>
<name>QHostInfo</name>
<message>
<location filename="../src/network/kernel/qhostinfo_p.h" line="+101"/>
<source>Unknown error</source>
<translation>Unbekannter Fehler</translation>
</message>
+ <message>
+ <location filename="../src/network/kernel/qhostinfo.cpp" line="+168"/>
+ <source>No host name given</source>
+ <translation>Es wurde kein Hostname angegeben</translation>
+ </message>
</context>
<context>
<name>QHostInfoAgent</name>
<message>
- <location filename="../src/network/kernel/qhostinfo_unix.cpp" line="+257"/>
+ <location filename="../src/network/kernel/qhostinfo_unix.cpp" line="+259"/>
<location line="+32"/>
<location filename="../src/network/kernel/qhostinfo_win.cpp" line="+216"/>
<location line="+27"/>
@@ -2591,12 +2628,14 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<translation>Unbekannter Fehler</translation>
</message>
<message>
+ <location line="-98"/>
<location filename="../src/network/kernel/qhostinfo_win.cpp" line="-67"/>
<source>No host name given</source>
<translation>Es wurde kein Hostname angegeben</translation>
</message>
<message>
- <location line="+0"/>
+ <location line="+1"/>
+ <location filename="../src/network/kernel/qhostinfo_win.cpp" line="+0"/>
<source>Invalid hostname</source>
<translation>Ungültiger Rechnername</translation>
</message>
@@ -2919,7 +2958,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<context>
<name>QIODevice</name>
<message>
- <location filename="../src/corelib/global/qglobal.cpp" line="+2096"/>
+ <location filename="../src/corelib/global/qglobal.cpp" line="+2094"/>
<source>Permission denied</source>
<translation>Zugriff verweigert</translation>
</message>
@@ -3003,7 +3042,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<translation>Operation unmap fehlgeschlagen für &apos;%1&apos;: %2</translation>
</message>
<message>
- <location line="+345"/>
+ <location line="+361"/>
<source>The plugin &apos;%1&apos; uses incompatible Qt library. (%2.%3.%4) [%5]</source>
<translation>Das Plugin &apos;%1&apos; verwendet eine inkompatible Qt-Bibliothek. (%2.%3.%4) [%5]</translation>
</message>
@@ -3055,7 +3094,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<context>
<name>QLineEdit</name>
<message>
- <location filename="../src/gui/widgets/qlineedit.cpp" line="+2112"/>
+ <location filename="../src/gui/widgets/qlineedit.cpp" line="+2104"/>
<source>Select All</source>
<translation>Alles auswählen</translation>
</message>
@@ -3132,7 +3171,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<location line="+3"/>
<location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/>
<location filename="../src/network/socket/qlocalsocket_win.cpp" line="+80"/>
- <location line="+45"/>
+ <location line="+59"/>
<source>%1: Invalid name</source>
<translation>%1: Ungültiger Name</translation>
</message>
@@ -3163,7 +3202,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<message>
<location line="+3"/>
<location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/>
- <location filename="../src/network/socket/qlocalsocket_win.cpp" line="-50"/>
+ <location filename="../src/network/socket/qlocalsocket_win.cpp" line="-64"/>
<source>%1: Connection error</source>
<translation>%1: Verbindungsfehler</translation>
</message>
@@ -3376,6 +3415,39 @@ Möchten Sie die Datei trotzdem löschen?</translation>
</message>
</context>
<context>
+ <name>QMediaPlayer</name>
+ <message>
+ <location filename="../src/multimedia/playback/qmediaplayer.cpp" line="+471"/>
+ <source>The QMediaPlayer object does not have a valid service</source>
+ <translation>Das QMediaPlayer-Objekt verfügt über keinen gültigen Dienst</translation>
+ </message>
+</context>
+<context>
+ <name>QMediaPlaylist</name>
+ <message>
+ <location filename="../src/multimedia/base/qmediaplaylist.cpp" line="+454"/>
+ <location line="+46"/>
+ <source>Could not add items to read only playlist.</source>
+ <translation>Es konnten keine Einträge zur Wiedergabeliste hinzugefügt werden, da sie schreibgeschützt ist.</translation>
+ </message>
+ <message>
+ <location line="-27"/>
+ <location line="+46"/>
+ <source>Playlist format is not supported</source>
+ <translation>Das Format der Wiedergabeliste ist nicht unterstützt</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>The file could not be accessed.</source>
+ <translation>Auf die Datei konnte nicht zugegriffen werden.</translation>
+ </message>
+ <message>
+ <location line="+35"/>
+ <source>Playlist format is not supported.</source>
+ <translation>Das Format der Wiedergabeliste ist nicht unterstützt.</translation>
+ </message>
+</context>
+<context>
<name>QMenu</name>
<message>
<location filename="../src/plugins/accessible/widgets/qaccessiblemenu.cpp" line="+157"/>
@@ -3470,7 +3542,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<context>
<name>QNativeSocketEngine</name>
<message>
- <location filename="../src/network/socket/qnativesocketengine.cpp" line="+206"/>
+ <location filename="../src/network/socket/qnativesocketengine.cpp" line="+209"/>
<source>The remote host closed the connection</source>
<translation>Der entfernte Rechner hat die Verbindung geschlossen</translation>
</message>
@@ -3609,12 +3681,35 @@ Möchten Sie die Datei trotzdem löschen?</translation>
</message>
</context>
<context>
+ <name>QNetworkAccessDataBackend</name>
+ <message>
+ <location filename="../src/network/access/qnetworkaccessdatabackend.cpp" line="+76"/>
+ <source>Operation not supported on %1</source>
+ <translation>Diese Operation wird von %1 nicht unterstützt</translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>Invalid URI: %1</source>
+ <translation>Ungültiger URI: %1</translation>
+ </message>
+</context>
+<context>
<name>QNetworkAccessDebugPipeBackend</name>
<message>
<location filename="../src/network/access/qnetworkaccessdebugpipebackend.cpp" line="+195"/>
<source>Write error writing to %1: %2</source>
<translation>Fehler beim Schreiben zu %1: %2</translation>
</message>
+ <message>
+ <location line="+60"/>
+ <source>Socket error on %1: %2</source>
+ <translation>Socket-Fehler bei %1: %2</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Remote host closed the connection prematurely on %1</source>
+ <translation>Der entfernte Rechner hat die Verbindung zu %1 vorzeitig beendet</translation>
+ </message>
</context>
<context>
<name>QNetworkAccessFileBackend</name>
@@ -3678,37 +3773,106 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<context>
<name>QNetworkAccessHttpBackend</name>
<message>
- <location filename="../src/network/access/qnetworkaccesshttpbackend.cpp" line="+599"/>
+ <location filename="../src/network/access/qnetworkaccesshttpbackend.cpp" line="+645"/>
<source>No suitable proxy found</source>
<translation>Es konnte kein geeigneter Proxy-Server gefunden werden</translation>
</message>
</context>
<context>
+ <name>QNetworkAccessManager</name>
+ <message>
+ <location filename="../src/network/access/qnetworkreplyimpl.cpp" line="+862"/>
+ <source>Network access is disabled.</source>
+ <translation>Der Zugriff auf das Netzwerk ist nicht gestattet.</translation>
+ </message>
+</context>
+<context>
<name>QNetworkReply</name>
<message>
- <location line="+101"/>
+ <location filename="../src/network/access/qnetworkaccesshttpbackend.cpp" line="+101"/>
<source>Error downloading %1 - server replied: %2</source>
<translation>Beim Herunterladen von %1 trat ein Fehler auf - Die Antwort des Servers ist: %2</translation>
</message>
<message>
- <location filename="../src/network/access/qnetworkreplyimpl.cpp" line="+80"/>
+ <location filename="../src/network/access/qnetworkreplyimpl.cpp" line="-780"/>
<source>Protocol &quot;%1&quot; is unknown</source>
<translation>Das Protokoll &quot;%1&quot; ist unbekannt</translation>
</message>
+ <message>
+ <location line="+486"/>
+ <source>Temporary network failure.</source>
+ <translation>Das Netzwerk ist zur Zeit ausgefallen.</translation>
+ </message>
</context>
<context>
<name>QNetworkReplyImpl</name>
<message>
- <location line="+525"/>
+ <location line="+110"/>
<location line="+28"/>
<source>Operation canceled</source>
<translation>Operation abgebrochen</translation>
</message>
</context>
<context>
+ <name>QNetworkSession</name>
+ <message>
+ <location filename="../src/network/bearer/qnetworksession.cpp" line="+437"/>
+ <source>Invalid configuration.</source>
+ <translation>Ungültige Konfiguration.</translation>
+ </message>
+</context>
+<context>
+ <name>QNetworkSessionPrivateImpl</name>
+ <message>
+ <location filename="../src/plugins/bearer/qnetworksession_impl.cpp" line="+247"/>
+ <location filename="../src/plugins/bearer/symbian/qnetworksession_impl.cpp" line="+213"/>
+ <source>Unknown session error.</source>
+ <translation>Unbekannter Fehler bei Netzwerkverbindung.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <location filename="../src/plugins/bearer/symbian/qnetworksession_impl.cpp" line="+2"/>
+ <source>The session was aborted by the user or system.</source>
+ <translation>Die Verbindung wurde vom Nutzer oder vom Betriebssystem unterbrochen.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <location filename="../src/plugins/bearer/symbian/qnetworksession_impl.cpp" line="+2"/>
+ <source>The requested operation is not supported by the system.</source>
+ <translation>Die angeforderte Operation wird vom System nicht unterstützt.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <location filename="../src/plugins/bearer/symbian/qnetworksession_impl.cpp" line="+2"/>
+ <source>The specified configuration cannot be used.</source>
+ <translation>Die angegebene Konfiguration kann nicht verwendet werden.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <location filename="../src/plugins/bearer/symbian/qnetworksession_impl.cpp" line="+2"/>
+ <source>Roaming was aborted or is not possible.</source>
+ <translation>Das Roaming wurde abgebrochen oder ist hier nicht möglich.</translation>
+ </message>
+ <message>
+ <location filename="../src/plugins/bearer/icd/qnetworksession_impl.cpp" line="+1083"/>
+ <source>Roaming error</source>
+ <translation>Fehler beim Roaming</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Session aborted by user or system</source>
+ <translation>Die Verbindung wurde vom Nutzer oder vom Betriebssystem unterbrochen</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Unidentified Error</source>
+ <translation>Unbekannter Fehler</translation>
+ </message>
+</context>
+<context>
<name>QOCIDriver</name>
<message>
- <location filename="../src/sql/drivers/oci/qsql_oci.cpp" line="+2083"/>
+ <location filename="../src/sql/drivers/oci/qsql_oci.cpp" line="+2082"/>
<source>Unable to logon</source>
<translation>Logon-Vorgang fehlgeschlagen</translation>
</message>
@@ -3782,12 +3946,12 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<context>
<name>QODBCDriver</name>
<message>
- <location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="+1806"/>
+ <location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="+1791"/>
<source>Unable to connect</source>
<translation>Es kann keine Verbindung aufgebaut werden</translation>
</message>
<message>
- <location line="+238"/>
+ <location line="+233"/>
<source>Unable to disable autocommit</source>
<translation>&apos;autocommit&apos; konnte nicht deaktiviert werden</translation>
</message>
@@ -3807,7 +3971,7 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<translation>&apos;autocommit&apos; konnte nicht aktiviert werden</translation>
</message>
<message>
- <location line="-281"/>
+ <location line="-276"/>
<source>Unable to connect - Driver doesn&apos;t support all functionality required</source>
<translation>Es kann keine Verbindung aufgebaut werden weil der Treiber die benötigte Funktionalität nicht vollständig unterstützt</translation>
</message>
@@ -3815,19 +3979,19 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<context>
<name>QODBCResult</name>
<message>
- <location line="-937"/>
+ <location line="-935"/>
<location line="+351"/>
<source>QODBCResult::reset: Unable to set &apos;SQL_CURSOR_STATIC&apos; as statement attribute. Please check your ODBC driver configuration</source>
<translation>QODBCResult::reset: &apos;SQL_CURSOR_STATIC&apos; konnte nicht als Attribut des Befehls gesetzt werden. Bitte prüfen Sie die Konfiguration Ihres ODBC-Treibers</translation>
</message>
<message>
<location line="-334"/>
- <location line="+628"/>
+ <location line="+626"/>
<source>Unable to execute statement</source>
<translation>Der Befehl konnte nicht ausgeführt werden</translation>
</message>
<message>
- <location line="-547"/>
+ <location line="-545"/>
<source>Unable to fetch next</source>
<translation>Der nächste Datensatz konnte nicht abgeholt werden</translation>
</message>
@@ -3837,19 +4001,19 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<translation>Der Befehl konnte nicht initialisiert werden</translation>
</message>
<message>
- <location line="+268"/>
+ <location line="+266"/>
<source>Unable to bind variable</source>
<translation>Die Variable konnte nicht gebunden werden</translation>
</message>
<message>
<location filename="../src/sql/drivers/db2/qsql_db2.cpp" line="+189"/>
- <location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="-467"/>
- <location line="+576"/>
+ <location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="-465"/>
+ <location line="+574"/>
<source>Unable to fetch last</source>
<translation>Der letzte Datensatz konnte nicht abgeholt werden</translation>
</message>
<message>
- <location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="-670"/>
+ <location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="-668"/>
<source>Unable to fetch</source>
<translation>Es konnten keine Daten abgeholt werden</translation>
</message>
@@ -3867,41 +4031,15 @@ Möchten Sie die Datei trotzdem löschen?</translation>
<context>
<name>QObject</name>
<message>
- <location filename="../src/network/kernel/qhostinfo_unix.cpp" line="-97"/>
- <source>Invalid hostname</source>
- <translation>Ungültiger Rechnername</translation>
- </message>
- <message>
- <location filename="../src/network/access/qnetworkaccessdatabackend.cpp" line="+74"/>
- <source>Operation not supported on %1</source>
- <translation>Diese Operation wird von %1 nicht unterstützt</translation>
- </message>
- <message>
- <location line="+57"/>
- <source>Invalid URI: %1</source>
- <translation>Ungültiger URI: %1</translation>
- </message>
- <message>
- <location filename="../src/network/access/qnetworkaccessdebugpipebackend.cpp" line="+60"/>
- <source>Socket error on %1: %2</source>
- <translation>Socket-Fehler bei %1: %2</translation>
- </message>
- <message>
- <location line="+15"/>
- <source>Remote host closed the connection prematurely on %1</source>
- <translation>Der entfernte Rechner hat die Verbindung zu %1 vorzeitig beendet</translation>
- </message>
- <message>
- <location filename="../src/network/kernel/qhostinfo.cpp" line="+168"/>
- <location filename="../src/network/kernel/qhostinfo_unix.cpp" line="+0"/>
- <source>No host name given</source>
- <translation>Es wurde kein Hostname angegeben</translation>
+ <location filename="../src/declarative/util/qmlxmllistmodel.cpp" line="+370"/>
+ <source>&quot;%1&quot; duplicates a previous role name and will be disabled.</source>
+ <translation>&quot;%1&quot; ist bereits als Name einer Rolle vergeben und wird daher deaktiviert.</translation>
</message>
</context>
<context>
<name>QPPDOptionsModel</name>
<message>
- <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="+1197"/>
+ <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="+1195"/>
<source>Name</source>
<translation>Name</translation>
</message>
@@ -4959,7 +5097,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<context>
<name>QSQLiteDriver</name>
<message>
- <location filename="../src/sql/drivers/sqlite/qsql_sqlite.cpp" line="+547"/>
+ <location filename="../src/sql/drivers/sqlite/qsql_sqlite.cpp" line="+538"/>
<source>Error opening database</source>
<translation>Die Datenbankverbindung konnte nicht geöffnet werden</translation>
</message>
@@ -4987,7 +5125,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<context>
<name>QSQLiteResult</name>
<message>
- <location line="-404"/>
+ <location line="-395"/>
<location line="+62"/>
<location line="+8"/>
<source>Unable to fetch row</source>
@@ -5245,7 +5383,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<context>
<name>QScriptDebuggerLocalsModel</name>
<message>
- <location filename="../src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp" line="+872"/>
+ <location filename="../src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp" line="+897"/>
<source>Name</source>
<translation>Name</translation>
</message>
@@ -6428,7 +6566,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<translation>Umdrehen</translation>
</message>
<message>
- <location line="+575"/>
+ <location line="+602"/>
<location line="+135"/>
<source>Ctrl</source>
<translation>Strg</translation>
@@ -6462,7 +6600,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<translation>F%1</translation>
</message>
<message>
- <location line="-871"/>
+ <location line="-898"/>
<source>Home Page</source>
<translation>Startseite</translation>
</message>
@@ -6596,7 +6734,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<translation>Abbrechen</translation>
</message>
<message>
- <location filename="../src/gui/kernel/qsoftkeymanager_s60.cpp" line="+273"/>
+ <location filename="../src/gui/kernel/qsoftkeymanager_s60.cpp" line="+312"/>
<source>Exit</source>
<translation>Beenden</translation>
</message>
@@ -6940,7 +7078,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<context>
<name>QTextControl</name>
<message>
- <location filename="../src/gui/text/qtextcontrol.cpp" line="+2027"/>
+ <location filename="../src/gui/text/qtextcontrol.cpp" line="+2029"/>
<source>&amp;Undo</source>
<translation>&amp;Rückgängig</translation>
</message>
@@ -7989,7 +8127,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<context>
<name>QWidget</name>
<message>
- <location filename="../src/gui/kernel/qwidget.cpp" line="+5728"/>
+ <location filename="../src/gui/kernel/qwidget.cpp" line="+5761"/>
<source>*</source>
<translation>*</translation>
</message>
@@ -8454,6 +8592,866 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
</message>
</context>
<context>
+ <name>QmlAbstractAnimation</name>
+ <message>
+ <location filename="../src/declarative/util/qmlanimation.cpp" line="+235"/>
+ <source>Cannot animate non-existent property &quot;%1&quot;</source>
+ <translation>Die Eigenschaft &apos;%1&quot; existiert nicht und kann daher nicht animiert werden</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Cannot animate read-only property &quot;%1&quot;</source>
+ <translation>Die Eigenschaft &apos;%1&quot; ist schreibgeschützt und kann daher nicht animiert werden</translation>
+ </message>
+</context>
+<context>
+ <name>QmlBehavior</name>
+ <message>
+ <location filename="../src/declarative/util/qmlbehavior.cpp" line="+122"/>
+ <source>Cannot change the animation assigned to a Behavior.</source>
+ <translation>Die zu einem Behavior-Element gehörende Animation kann nicht geändert werden.</translation>
+ </message>
+</context>
+<context>
+ <name>QmlBinding</name>
+ <message>
+ <location filename="../src/declarative/qml/qmlbinding.cpp" line="+195"/>
+ <source>Binding loop detected for property &quot;%1&quot;</source>
+ <translation>Bei der für die Eigenschaft &quot;%1&quot; angegebenen Bindung wurde eine Schleife festgestellt</translation>
+ </message>
+</context>
+<context>
+ <name>QmlCompiler</name>
+ <message>
+ <location filename="../src/declarative/qml/qmlcompiler.cpp" line="+214"/>
+ <location line="+1772"/>
+ <location line="+124"/>
+ <location line="+427"/>
+ <source>Invalid property assignment: &quot;%1&quot; is a read-only property</source>
+ <translation>Ungültige Zuweisung bei Eigenschaft: &quot;%1&quot; ist schreibgeschützt</translation>
+ </message>
+ <message>
+ <location line="-2314"/>
+ <source>Invalid property assignment: unknown enumeration</source>
+ <translation>Ungültige Zuweisung bei Eigenschaft: Ungültiger Aufzählungswert</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Invalid property assignment: string expected</source>
+ <translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine Zeichenkette erwartet</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Invalid property assignment: url expected</source>
+ <translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine URL erwartet</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Invalid property assignment: unsigned int expected</source>
+ <translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine vorzeichenloser Ganzzahlwert erwartet</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Invalid property assignment: int expected</source>
+ <translation type="unfinished">Ungültige Zuweisung bei Eigenschaft: Es wird ein Ganzzahlwert erwartet</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Invalid property assignment: float expected</source>
+ <translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine Gleitkommazahl erwartet</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Invalid property assignment: double expected</source>
+ <translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine Gleitkommazahl (double) erwartet</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Invalid property assignment: color expected</source>
+ <translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine Farbspezifikation erwartet</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Invalid property assignment: date expected</source>
+ <translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine Datumsangabe erwartet</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Invalid property assignment: time expected</source>
+ <translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine Zeitangabe erwartet</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Invalid property assignment: datetime expected</source>
+ <translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine Datumsangabe erwartet</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Invalid property assignment: point expected</source>
+ <translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine Koordinatenangabe für einen Punkt erwartet</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Invalid property assignment: size expected</source>
+ <translation>Ungültige Zuweisung bei Eigenschaft: Es wird eine Größenangabe erwartet</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Invalid property assignment: rect expected</source>
+ <translation>Ungültige Zuweisung bei Eigenschaft: Es werden Parameter für ein Rechteck erwartet</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Invalid property assignment: boolean expected</source>
+ <translation>Ungültige Zuweisung bei Eigenschaft: Es wird ein Boolescher Wert erwartet</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Invalid property assignment: 3D vector expected</source>
+ <translation>Ungültige Zuweisung bei Eigenschaft: Es wird ein dreidimensionaler Vektor erwartet</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Invalid property assignment: unsupported type &quot;%1&quot;</source>
+ <translation>Ungültige Zuweisung bei Eigenschaft: Der Typ &quot;%1&quot; ist nicht unterstützt</translation>
+ </message>
+ <message>
+ <location line="+801"/>
+ <location line="+3"/>
+ <source>Invalid component specification</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Invalid component id specification</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <location line="+565"/>
+ <source>id is not unique</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-555"/>
+ <source>Invalid component body specification</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Cannot create empty component specification</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Invalid Script block. Specify either the source property or inline script</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Invalid Script source value</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>Properties cannot be set on Script block</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Invalid Script block</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+130"/>
+ <source>Incorrectly specified signal</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Empty signal assignment</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+36"/>
+ <source>Empty property assignment</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Attached properties cannot be used here</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <location line="+104"/>
+ <source>Non-existent attached object</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-100"/>
+ <location line="+103"/>
+ <source>Invalid attached object assignment</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-50"/>
+ <source>Cannot assign to non-existent default property</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <location line="+339"/>
+ <source>Cannot assign to non-existent property &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-308"/>
+ <source>Invalid use of namespace</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Not an attached property name</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+169"/>
+ <source>Invalid use of id property</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>&quot;%1&quot; is not a valid object id</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>id conflicts with type name</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>id conflicts with namespace prefix</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+78"/>
+ <source>Invalid value in grouped property</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <location line="+8"/>
+ <source>Invalid grouped property access</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Invalid property use</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Property assignment expected</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Single property assignment expected</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Unexpected object assignment</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+57"/>
+ <source>Cannot assign object to list</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Cannot assign primitives to lists</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-6"/>
+ <source>Can only assign one binding to lists</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Cannot assign multiple values to a script property</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Invalid property assignment: script expected</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+129"/>
+ <source>Cannot assign object to property</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+97"/>
+ <source>Duplicate default property</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Duplicate property name</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Duplicate signal name</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Duplicate method name</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Invalid property nesting</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+55"/>
+ <source>Cannot override FINAL property</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>Invalid property type</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+174"/>
+ <location line="+9"/>
+ <source>No property alias location</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-4"/>
+ <location line="+25"/>
+ <source>Invalid alias location</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-16"/>
+ <source>Invalid alias reference. An alias reference must be specified as &lt;id&gt; or &lt;id&gt;.&lt;property&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Invalid alias reference. Unable to find id &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QmlCompositeTypeManager</name>
+ <message>
+ <location filename="../src/declarative/qml/qmlcompositetypemanager.cpp" line="+415"/>
+ <location line="+220"/>
+ <source>Resource %1 unavailable</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-141"/>
+ <source>Import %1 unavailable</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>Namespace %1 cannot be used as a type</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>%1 is not a type</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+42"/>
+ <source>Type %1 unavailable</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QmlEngine</name>
+ <message>
+ <location filename="../src/declarative/qml/qmlsqldatabase.cpp" line="+204"/>
+ <source>executeSql called outside transaction()</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+52"/>
+ <source>Read-only Transaction</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Version mismatch: expected %1, found %2</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>SQL transaction failed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+21"/>
+ <source>transaction: missing callback</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+57"/>
+ <location line="+16"/>
+ <source>SQL: database version mismatch</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QmlGraphicsAnchors</name>
+ <message>
+ <location filename="../src/declarative/graphicsitems/qmlgraphicsanchors.cpp" line="+177"/>
+ <source>Possible anchor loop detected on fill.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <source>Possible anchor loop detected on centerIn.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+163"/>
+ <location line="+34"/>
+ <location line="+607"/>
+ <location line="+37"/>
+ <source>Cannot anchor to an item that isn&apos;t a parent or sibling.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-534"/>
+ <source>Possible anchor loop detected on vertical anchor.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+59"/>
+ <source>Possible anchor loop detected on horizontal anchor.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+422"/>
+ <source>Cannot specify left, right, and hcenter anchors.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <location line="+37"/>
+ <source>Cannot anchor to a null item.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-34"/>
+ <source>Cannot anchor a horizontal edge to a vertical edge.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <location line="+37"/>
+ <source>Cannot anchor item to self.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-25"/>
+ <source>Cannot specify top, bottom, and vcenter anchors.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Baseline anchor cannot be used in conjunction with top, bottom, or vcenter anchors.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Cannot anchor a vertical edge to a horizontal edge.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QmlGraphicsFlipable</name>
+ <message>
+ <location filename="../src/declarative/graphicsitems/qmlgraphicsflipable.cpp" line="+149"/>
+ <source>front is a write-once property</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>back is a write-once property</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QmlGraphicsTextInput</name>
+ <message>
+ <location filename="../src/declarative/graphicsitems/qmlgraphicstextinput.cpp" line="+594"/>
+ <location line="+9"/>
+ <source>Could not load cursor delegate</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Could not instantiate cursor delegate</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QmlGraphicsVisualDataModel</name>
+ <message>
+ <location filename="../src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp" line="+826"/>
+ <source>Delegate component must be Item type.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QmlInfo</name>
+ <message>
+ <location filename="../src/declarative/qml/qmlinfo.cpp" line="+112"/>
+ <location line="+3"/>
+ <source>unknown location</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QmlListModel</name>
+ <message>
+ <location filename="../src/declarative/util/qmllistmodel.cpp" line="+491"/>
+ <source>remove: index %1 out of range</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>insert: value is not an object</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>insert: index %1 out of range</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+29"/>
+ <source>move: out of range</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+49"/>
+ <source>append: value is not an object</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+39"/>
+ <source>get: index %1 out of range</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+33"/>
+ <source>set: value is not an object</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <location line="+39"/>
+ <source>set: index %1 out of range</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+49"/>
+ <source>ListElement: cannot use default property</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>ListElement: cannot use reserved &quot;id&quot; property</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+46"/>
+ <source>ListElement: cannot use script for property value</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>ListModel: undefined property &apos;%1&apos;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QmlParentChange</name>
+ <message>
+ <location filename="../src/declarative/util/qmlstateoperations.cpp" line="+85"/>
+ <source>Unable to preserve appearance under complex transform</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <location line="+7"/>
+ <source>Unable to preserve appearance under non-uniform scale</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Unable to preserve appearance under scale of 0</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QmlParser</name>
+ <message>
+ <location filename="../src/declarative/qml/parser/qmljslexer.cpp" line="+554"/>
+ <source>Illegal character</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Unclosed string at end of line</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>Illegal escape squence</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+46"/>
+ <source>Illegal unicode escape sequence</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>Unclosed comment at end of file</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+87"/>
+ <source>Illegal syntax for exponential number</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>Identifier cannot start with numeric literal</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+331"/>
+ <source>Unterminated regular expression literal</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>Invalid regular expression flag &apos;%0&apos;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/declarative/qml/parser/qmljsparser.cpp" line="+1767"/>
+ <location line="+67"/>
+ <source>Syntax error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-65"/>
+ <source>Unexpected token `%1&apos;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <location line="+24"/>
+ <source>Expected token `%1&apos;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/declarative/qml/qmlscriptparser.cpp" line="+267"/>
+ <source>Expected type name</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+29"/>
+ <source>Invalid use of Script block</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+151"/>
+ <source>Invalid import qualifier ID</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Library import requires a version</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+53"/>
+ <source>Expected parameter type</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+42"/>
+ <source>Invalid property type modifier</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Unexpected property type modifier</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Expected property type</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Readonly not yet supported</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+194"/>
+ <source>QmlJS declaration outside Script element</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Variable declarations not allow in inline Script blocks</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QmlPauseAnimation</name>
+ <message>
+ <location filename="../src/declarative/util/qmlanimation.cpp" line="+410"/>
+ <source>Cannot set a duration of &lt; 0</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QmlPropertyAnimation</name>
+ <message>
+ <location line="-568"/>
+ <source>Unmatched parenthesis in easing function &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Easing function &quot;%1&quot; must start with &quot;ease&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Unknown easing curve &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <location line="+9"/>
+ <source>Improperly specified parameter in easing function &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Unknown easing parameter &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1754"/>
+ <source>Cannot set a duration of &lt; 0</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QmlPropertyChanges</name>
+ <message>
+ <location filename="../src/declarative/util/qmlpropertychanges.cpp" line="+361"/>
+ <source>Cannot assign to non-existent property &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Cannot assign to read-only property &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QmlVME</name>
+ <message>
+ <location filename="../src/declarative/qml/qmlvme.cpp" line="+195"/>
+ <source>Unable to create object of type %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+306"/>
+ <source>Cannot assign value %1 to property %2</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Cannot assign object type %1 with no default method</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Cannot connect mismatched signal/slot %1 %vs. %2</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Cannot assign an object to signal property %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+147"/>
+ <source>Cannot assign object to list</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+41"/>
+ <source>Cannot assign object to interface property</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Unable to create attached object</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+32"/>
+ <source>Cannot set properties on %1 as it is null</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QmlXmlListModelRole</name>
+ <message>
+ <location filename="../src/declarative/util/qmlxmllistmodel.cpp" line="-255"/>
+ <source>An XmlRole query must not start with &apos;/&apos;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QmlXmlRoleList</name>
+ <message>
+ <location line="+430"/>
+ <source>An XmlListModel query must start with &apos;/&apos; or &quot;//&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>QtXmlPatterns</name>
<message>
<location filename="../src/xmlpatterns/data/qabstractduration.cpp" line="+99"/>
diff --git a/translations/qt_es.ts b/translations/qt_es.ts
index e65f09234f..596864adb0 100644
--- a/translations/qt_es.ts
+++ b/translations/qt_es.ts
@@ -2,6 +2,29 @@
<!DOCTYPE TS>
<TS version="2.0" language="es">
<context>
+ <name>MAC_APPLICATION_MENU</name>
+ <message>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2316"/>
+ <source>Services</source>
+ <translation>Servicios</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide %1</source>
+ <translation>Ocultar %1</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide Others</source>
+ <translation>Ocultar otros</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Show All</source>
+ <translation>Mostrar todo</translation>
+ </message>
+</context>
+<context>
<name>AudioOutput</name>
<message>
<location filename="../src/3rdparty/phonon/phonon/audiooutput.cpp" line="+375"/>
diff --git a/translations/qt_fr.ts b/translations/qt_fr.ts
index 3186a1fa0b..322fb65dad 100644
--- a/translations/qt_fr.ts
+++ b/translations/qt_fr.ts
@@ -2,6 +2,29 @@
<!DOCTYPE TS>
<TS version="2.0" language="fr">
<context>
+ <name>MAC_APPLICATION_MENU</name>
+ <message>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2316"/>
+ <source>Services</source>
+ <translation>Services</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide %1</source>
+ <translation>Masquer %1</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide Others</source>
+ <translation>Masquer les autres</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Show All</source>
+ <translation>Tout afficher</translation>
+ </message>
+</context>
+<context>
<name>AudioOutput</name>
<message>
<location filename="../src/3rdparty/phonon/phonon/audiooutput.cpp" line="+375"/>
diff --git a/translations/qt_help_de.ts b/translations/qt_help_de.ts
index f64e741c85..40d115869f 100644
--- a/translations/qt_help_de.ts
+++ b/translations/qt_help_de.ts
@@ -63,7 +63,7 @@
<translation>Unbekannter Filter &apos;%1&apos;.</translation>
</message>
<message>
- <location line="+105"/>
+ <location line="+103"/>
<source>Invalid documentation file &apos;%1&apos;!</source>
<translation>Ungültige Dokumentationsdatei &apos;%1&apos;.</translation>
</message>
@@ -78,7 +78,7 @@
<translation>Die Datenbank &apos;%1&apos; kann nicht zur Optimierung geöffnet werden.</translation>
</message>
<message>
- <location line="-438"/>
+ <location line="-436"/>
<source>Cannot create directory: %1</source>
<translation>Das Verzeichnis kann nicht angelegt werden: %1</translation>
</message>
@@ -88,7 +88,7 @@
<translation>Die Katalogdatei kann nicht kopiert werden: %1</translation>
</message>
<message>
- <location line="+174"/>
+ <location line="+172"/>
<source>Cannot register filter %1!</source>
<translation>Der Filter kann nicht registriert werden: %1</translation>
</message>
@@ -120,23 +120,20 @@
<context>
<name>QHelpEngineCore</name>
<message>
- <location filename="../tools/assistant/lib/qhelpenginecore.cpp" line="+523"/>
- <source>The specified namespace does not exist!</source>
- <translation>Der angegebene Namensraum existiert nicht.</translation>
+ <location filename="../tools/assistant/lib/qhelpenginecore.cpp" line="+122"/>
+ <source>Cannot open documentation file %1: %2!</source>
+ <translation>Die Dokumentationsdatei %1 kann nicht geöffnet werden: %2!</translation>
</message>
-</context>
-<context>
- <name>QHelpEngineCorePrivate</name>
<message>
- <location line="-401"/>
- <source>Cannot open documentation file %1: %2!</source>
- <translation>Die Dokumentationsdatei %1 kann nicht geöffnet werden: %2.</translation>
+ <location line="+404"/>
+ <source>The specified namespace does not exist!</source>
+ <translation>Der angegebene Namensraum existiert nicht.</translation>
</message>
</context>
<context>
<name>QHelpGenerator</name>
<message>
- <location filename="../tools/assistant/lib/qhelpgenerator.cpp" line="+157"/>
+ <location filename="../tools/assistant/lib/qhelpgenerator.cpp" line="+158"/>
<source>Invalid help data!</source>
<translation>Ungültige Hilfe-Daten.</translation>
</message>
@@ -216,7 +213,7 @@
<translation>Die Datei %1 kann nicht geöffnet werden. Wird übersprungen.</translation>
</message>
<message>
- <location line="+131"/>
+ <location line="+133"/>
<source>The filter %1 is already registered!</source>
<translation>Der Filter %1 ist bereits registriert.</translation>
</message>
@@ -231,7 +228,7 @@
<translation>Indizes einfügen...</translation>
</message>
<message>
- <location line="+80"/>
+ <location line="+91"/>
<source>Insert contents...</source>
<translation>Inhalt einfügen...</translation>
</message>
@@ -245,122 +242,142 @@
<source>Cannot register contents!</source>
<translation>Inhalt kann nicht registriert werden.</translation>
</message>
+ <message>
+ <location line="+56"/>
+ <source>File &apos;%1&apos; does not exist.</source>
+ <translation>Die Datei &apos;%1&apos; existiert nicht.</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>File &apos;%1&apos; cannot be opened.</source>
+ <translation>Die Datei &apos;%1&apos; kann nicht geöffnet werden.</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>File &apos;%1&apos; contains an invalid link to file &apos;%2&apos;</source>
+ <translation>Die Datei &apos;%1&apos; enthält einen ungültigen Verweis auf die Datei &apos;%2&apos;</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Invalid links in HTML files.</source>
+ <translation>Es wurden ungültige Verweise in HTML-Dateien gefunden.</translation>
+ </message>
+</context>
+<context>
+ <name>QHelpProject</name>
+ <message>
+ <location filename="../tools/assistant/lib/qhelpprojectdata.cpp" line="+86"/>
+ <source>Unknown token.</source>
+ <translation>Unbekanntes Token.</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Unknown token. Expected &quot;QtHelpProject&quot;!</source>
+ <translation>Unbekanntes Token. &quot;QtHelpProject&quot; erwartet.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Error in line %1: %2</source>
+ <translation>Fehler in Zeile %1: %2</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>A virtual folder must not contain a &apos;/&apos; character!</source>
+ <translation>Ein virtuelles Verzeichnis darf kein &apos;/&apos;-Zeichen enthalten.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>A namespace must not contain a &apos;/&apos; character!</source>
+ <translation>Ein Namensraum darf kein &apos;/&apos;-Zeichen enthalten.</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Missing namespace in QtHelpProject.</source>
+ <translation>Fehlender Namensraum in QtHelpProject.</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Missing virtual folder in QtHelpProject</source>
+ <translation>Fehlendes virtuelles Verzeichnis in QtHelpProject.</translation>
+ </message>
+ <message>
+ <location line="+89"/>
+ <source>Missing attribute in keyword at line %1.</source>
+ <translation>Fehlendes Attribut in Schlagwort in Zeile %1.</translation>
+ </message>
+ <message>
+ <location line="+125"/>
+ <source>The input file %1 could not be opened!</source>
+ <translation>Die Eingabe-Datei %1 kann nicht geöffnet werden.</translation>
+ </message>
</context>
<context>
<name>QHelpSearchQueryWidget</name>
<message>
- <location filename="../tools/assistant/lib/qhelpsearchquerywidget.cpp" line="+411"/>
+ <location filename="../tools/assistant/lib/qhelpsearchquerywidget.cpp" line="+124"/>
<source>Search for:</source>
<translation>Suche nach:</translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+1"/>
<source>Previous search</source>
<translation>Vorige Suche</translation>
</message>
<message>
- <location line="+4"/>
+ <location line="+1"/>
<source>Next search</source>
<translation>Nächste Suche</translation>
</message>
<message>
- <location line="+2"/>
+ <location line="+1"/>
<source>Search</source>
<translation>Suche</translation>
</message>
<message>
- <location line="+20"/>
+ <location line="+2"/>
<source>Advanced search</source>
<translation>Erweiterte Suche</translation>
</message>
<message>
- <location line="+18"/>
+ <location line="+1"/>
<source>words &lt;B&gt;similar&lt;/B&gt; to:</source>
<translation>Worte &lt;B&gt;ähnlich&lt;/B&gt; zu:</translation>
</message>
<message>
- <location line="+6"/>
+ <location line="+1"/>
<source>&lt;B&gt;without&lt;/B&gt; the words:</source>
<translation>&lt;B&gt;ohne&lt;/B&gt; die Wörter:</translation>
</message>
<message>
- <location line="+6"/>
+ <location line="+1"/>
<source>with &lt;B&gt;exact phrase&lt;/B&gt;:</source>
<translation>mit der &lt;B&gt;genauen Wortgruppe&lt;/B&gt;:</translation>
</message>
<message>
- <location line="+6"/>
+ <location line="+1"/>
<source>with &lt;B&gt;all&lt;/B&gt; of the words:</source>
<translation>mit &lt;B&gt;allen&lt;/B&gt; Wörtern:</translation>
</message>
<message>
- <location line="+6"/>
+ <location line="+1"/>
<source>with &lt;B&gt;at least one&lt;/B&gt; of the words:</source>
<translation>mit &lt;B&gt;irgendeinem&lt;/B&gt; der Wörter:</translation>
</message>
</context>
<context>
<name>QHelpSearchResultWidget</name>
+ <message numerus="yes">
+ <location filename="../tools/assistant/lib/qhelpsearchresultwidget.cpp" line="+174"/>
+ <source>%1 - %2 of %n Hits</source>
+ <translation>
+ <numerusform>%1 - %2 - Ein Treffer</numerusform>
+ <numerusform>%1 - %2 von %n Treffern</numerusform>
+ </translation>
+ </message>
<message>
- <location filename="../tools/assistant/lib/qhelpsearchresultwidget.cpp" line="+235"/>
+ <location line="+61"/>
<source>0 - 0 of 0 Hits</source>
<translation>0 - 0 von 0 Treffern</translation>
</message>
</context>
-<context>
- <name>QHelpSearchResultWidgetPrivate</name>
- <message>
- <location line="-61"/>
- <source>%1 - %2 of %3 Hits</source>
- <translation>%1 - %2 von %3 Treffern</translation>
- </message>
-</context>
-<context>
- <name>QObject</name>
- <message>
- <location filename="../tools/assistant/lib/qhelpprojectdata.cpp" line="+85"/>
- <source>Unknown token.</source>
- <translation>Unbekanntes Token.</translation>
- </message>
- <message>
- <location line="+13"/>
- <source>Unknown token. Expected &quot;QtHelpProject&quot;!</source>
- <translation>Unbekanntes Token. &quot;QtHelpProject&quot; erwartet.</translation>
- </message>
- <message>
- <location line="+5"/>
- <source>Error in line %1: %2</source>
- <translation>Fehler in Zeile %1: %2</translation>
- </message>
- <message>
- <location line="+13"/>
- <source>A virtual folder must not contain a &apos;/&apos; character!</source>
- <translation>Ein virtuelles Verzeichnis darf kein &apos;/&apos;-Zeichen enthalten.</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>A namespace must not contain a &apos;/&apos; character!</source>
- <translation>Ein Namensraum darf kein &apos;/&apos;-Zeichen enthalten.</translation>
- </message>
- <message>
- <location line="+16"/>
- <source>Missing namespace in QtHelpProject.</source>
- <translation>Fehlender Namensraum in QtHelpProject.</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Missing virtual folder in QtHelpProject</source>
- <translation>Fehlendes virtuelles Verzeichnis in QtHelpProject.</translation>
- </message>
- <message>
- <location line="+88"/>
- <source>Missing attribute in keyword at line %1.</source>
- <translation>Fehlendes Attribut in Schlagwort in Zeile %1.</translation>
- </message>
- <message>
- <location line="+123"/>
- <source>The input file %1 could not be opened!</source>
- <translation>Die Eingabe-Datei %1 kann nicht geöffnet werden.</translation>
- </message>
-</context>
</TS>
diff --git a/translations/qt_help_hu.ts b/translations/qt_help_hu.ts
new file mode 100644
index 0000000000..3fbe0e9114
--- /dev/null
+++ b/translations/qt_help_hu.ts
@@ -0,0 +1,298 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="hu_HU">
+<context>
+ <name>QCLuceneResultWidget</name>
+ <message>
+ <source>Search Results</source>
+ <translation>Keresési eredmény</translation>
+ </message>
+ <message>
+ <source>Note:</source>
+ <translation>Megjegyzés:</translation>
+ </message>
+ <message>
+ <source>The search results may not be complete since the documentation is still being indexed!</source>
+ <translation>A keresési eredmény lehet, hogy nem teljes, mivel a dokumentáció még mindig indexelvan van!</translation>
+ </message>
+ <message>
+ <source>Your search did not match any documents.</source>
+ <translation>A keresési feltételeknek megfelően nincs találat.</translation>
+ </message>
+ <message>
+ <source>(The reason for this might be that the documentation is still being indexed.)</source>
+ <translation>(Ennek az oka az lehet, hogy a dokumentáció még mindig indexelve van.)</translation>
+ </message>
+</context>
+<context>
+ <name>QHelpCollectionHandler</name>
+ <message>
+ <source>The collection file &apos;%1&apos; is not set up yet!</source>
+ <translation>A(z) &apos;%1&apos;gyűjtemény fájl még nincs beállítva!</translation>
+ </message>
+ <message>
+ <source>Cannot load sqlite database driver!</source>
+ <translation>Nem lehet betölteni az sqlite adatbázis vezérlőt!</translation>
+ </message>
+ <message>
+ <source>Cannot open collection file: %1</source>
+ <translation>Nem lehet megnyitni a gyűjtemény fájlt: %1</translation>
+ </message>
+ <message>
+ <source>Cannot create tables in file %1!</source>
+ <translation>Nem lehet lehet a(z) %1 fájlban táblákat létrehozni!</translation>
+ </message>
+ <message>
+ <source>The collection file &apos;%1&apos; already exists!</source>
+ <translation>A(z) &apos;%1&apos; gyűjtemény fájl már létezik!</translation>
+ </message>
+ <message>
+ <source>Unknown filter &apos;%1&apos;!</source>
+ <translation>Ismeretlen szűrő &apos;%1&apos;!</translation>
+ </message>
+ <message>
+ <source>Invalid documentation file &apos;%1&apos;!</source>
+ <translation>Érvénytelen dokumentációs fájl &apos;%1&apos;!</translation>
+ </message>
+ <message>
+ <source>Cannot register namespace &apos;%1&apos;!</source>
+ <translation>Nem lehet regisztrálni a(z) &apos;%1&apos; névteret!</translation>
+ </message>
+ <message>
+ <source>Cannot open database &apos;%1&apos; to optimize!</source>
+ <translation>Nem lehet optimalizálásra megnyitni a(z) &apos;%1&apos; adatbázist!</translation>
+ </message>
+ <message>
+ <source>Cannot create directory: %1</source>
+ <translation>Nem lehet a könyvtárat létrehozni: %1</translation>
+ </message>
+ <message>
+ <source>Cannot copy collection file: %1</source>
+ <translation>Nem lehet a gyűjtemény fájlt másolni: %1</translation>
+ </message>
+ <message>
+ <source>Cannot register filter %1!</source>
+ <translation>Nem lehet regisztrálni a(z) %1 szűrőt!</translation>
+ </message>
+ <message>
+ <source>Cannot open documentation file %1!</source>
+ <translation>Nem lehet megnyitni a(z) %1 dokumentációs fájlt!</translation>
+ </message>
+ <message>
+ <source>The namespace %1 was not registered!</source>
+ <translation>A(z) %1 névteret nem regisztrálták!</translation>
+ </message>
+ <message>
+ <source>Namespace %1 already exists!</source>
+ <translation>A(z) %1 névtér már létezik!</translation>
+ </message>
+</context>
+<context>
+ <name>QHelpDBReader</name>
+ <message>
+ <source>Cannot open database &apos;%1&apos; &apos;%2&apos;: %3</source>
+ <translation>Nem lehet megnyitni az adatbázist &apos;%1&apos; &apos;%2&apos;: %3</translation>
+ </message>
+</context>
+<context>
+ <name>QHelpEngineCore</name>
+ <message>
+ <source>The specified namespace does not exist!</source>
+ <translation>A meghatározott névtér nem létezik!</translation>
+ </message>
+</context>
+<context>
+ <name>QHelpEngineCorePrivate</name>
+ <message>
+ <source>Cannot open documentation file %1: %2!</source>
+ <translation>Nem lehet megnyitni a(z) %1 fájlt: %2!</translation>
+ </message>
+</context>
+<context>
+ <name>QHelpGenerator</name>
+ <message>
+ <source>Invalid help data!</source>
+ <translation>Érvénytelen segítség adat!</translation>
+ </message>
+ <message>
+ <source>No output file name specified!</source>
+ <translation>Nincsen kimeneti fájl meghatározva!</translation>
+ </message>
+ <message>
+ <source>Building up file structure...</source>
+ <translation>Fájl struktúra felépítése...</translation>
+ </message>
+ <message>
+ <source>The file %1 cannot be overwritten!</source>
+ <translation>Nem lehet felülírni a(z) %1 fájlt!</translation>
+ </message>
+ <message>
+ <source>Cannot open data base file %1!</source>
+ <translation>Nem lehet megnyitni a(z) %1 adatbázis fájlt!</translation>
+ </message>
+ <message>
+ <source>Cannot register namespace %1!</source>
+ <translation>Nem lehet regisztrálni a(z) %1 névteret!</translation>
+ </message>
+ <message>
+ <source>Insert custom filters...</source>
+ <translation>Szokásos szűrő beszúrása...</translation>
+ </message>
+ <message>
+ <source>Insert help data for filter section (%1 of %2)...</source>
+ <translation>Segítség adatok beszúrása a szűrő szegmens számára (%1 %2-től)...</translation>
+ </message>
+ <message>
+ <source>Documentation successfully generated.</source>
+ <translation>A dokumentáció legenerálása sikeresen lezajlott.</translation>
+ </message>
+ <message>
+ <source>Some tables already exist!</source>
+ <translation>Néhány tábla már létezik!</translation>
+ </message>
+ <message>
+ <source>Cannot create tables!</source>
+ <translation>Nem lehet a táblákat létrehozni!</translation>
+ </message>
+ <message>
+ <source>Cannot register virtual folder!</source>
+ <translation>Nem lehet registrálni a virtuális dossziét!</translation>
+ </message>
+ <message>
+ <source>Insert files...</source>
+ <translation>Fájlok beszúrása...</translation>
+ </message>
+ <message>
+ <source>The referenced file %1 must be inside or within a subdirectory of (%2). Skipping it.</source>
+ <translation>A(z) %1 hivatkozott fájlnak a(z) (%2) alkönyvtárán belül kell elhelyezkednie. Ennek kihagyása.</translation>
+ </message>
+ <message>
+ <source>The file %1 does not exist! Skipping it.</source>
+ <translation>A(z) %1 fájl nem létezik! Ennek kihagyása.</translation>
+ </message>
+ <message>
+ <source>Cannot open file %1! Skipping it.</source>
+ <translation>Nem lehet megnyitni a(z) %1 fájlt! Ennek kihagyása.</translation>
+ </message>
+ <message>
+ <source>The filter %1 is already registered!</source>
+ <translation>A(z) %1 szűrő már regisztrálva van!</translation>
+ </message>
+ <message>
+ <source>Cannot register filter %1!</source>
+ <translation>Nem lehet regisztrálni a(z) %1 szűrőt!</translation>
+ </message>
+ <message>
+ <source>Insert indices...</source>
+ <translation>Indexek beszúrása...</translation>
+ </message>
+ <message>
+ <source>Insert contents...</source>
+ <translation>Tartalom beszúrása...</translation>
+ </message>
+ <message>
+ <source>Cannot insert contents!</source>
+ <translation>Nem lehet beszúrni a tartalmat!</translation>
+ </message>
+ <message>
+ <source>Cannot register contents!</source>
+ <translation>Nem lehet regisztrálni a tartalmat!</translation>
+ </message>
+</context>
+<context>
+ <name>QHelpSearchQueryWidget</name>
+ <message>
+ <source>Search for:</source>
+ <translation>Keresés erre:</translation>
+ </message>
+ <message>
+ <source>Previous search</source>
+ <translation>Előző keresése</translation>
+ </message>
+ <message>
+ <source>Next search</source>
+ <translation>Következő keresése</translation>
+ </message>
+ <message>
+ <source>Search</source>
+ <translation>Keresés</translation>
+ </message>
+ <message>
+ <source>Advanced search</source>
+ <translation>Összetett keresés</translation>
+ </message>
+ <message>
+ <source>words &lt;B&gt;similar&lt;/B&gt; to:</source>
+ <translation>szavak &lt;B&gt;hasonlóak&lt;/B&gt; ehhez:</translation>
+ </message>
+ <message>
+ <source>&lt;B&gt;without&lt;/B&gt; the words:</source>
+ <translation>Ezen szavak &lt;B&gt;nélkül&lt;/B&gt;:</translation>
+ </message>
+ <message>
+ <source>with &lt;B&gt;exact phrase&lt;/B&gt;:</source>
+ <translation>&lt;B&gt;Pontos kifejezés&lt;/B&gt;:</translation>
+ </message>
+ <message>
+ <source>with &lt;B&gt;all&lt;/B&gt; of the words:</source>
+ <translation>Ezen szavak&lt;B&gt;mindegyikével&lt;/B&gt;:</translation>
+ </message>
+ <message>
+ <source>with &lt;B&gt;at least one&lt;/B&gt; of the words:</source>
+ <translation>&lt;B&gt;Legalább egy&lt;/B&gt; a következő szavak közül:</translation>
+ </message>
+</context>
+<context>
+ <name>QHelpSearchResultWidget</name>
+ <message>
+ <source>0 - 0 of 0 Hits</source>
+ <translation>0 találat 0 - 0</translation>
+ </message>
+</context>
+<context>
+ <name>QHelpSearchResultWidgetPrivate</name>
+ <message>
+ <source>%1 - %2 of %3 Hits</source>
+ <translation>%3 Találat %1 - %2</translation>
+ </message>
+</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <source>Unknown token.</source>
+ <translation>Ismeretlen jel.</translation>
+ </message>
+ <message>
+ <source>Unknown token. Expected &quot;QtHelpProject&quot;!</source>
+ <translation>Ismeretlen hel. &quot;QtSegítségProjekt&quot; várt!</translation>
+ </message>
+ <message>
+ <source>Error in line %1: %2</source>
+ <translation>Hiba a(z) %1 sorban: %2</translation>
+ </message>
+ <message>
+ <source>A virtual folder must not contain a &apos;/&apos; character!</source>
+ <translation>A virtuális dosszié nem tartalmazhat &apos;/&apos; karaktert!</translation>
+ </message>
+ <message>
+ <source>A namespace must not contain a &apos;/&apos; character!</source>
+ <translation>A névtér nem tartalmazhat &apos;/&apos; karaktert!</translation>
+ </message>
+ <message>
+ <source>Missing namespace in QtHelpProject.</source>
+ <translation>Hiányzó névtér a QtSegítségProjektben.</translation>
+ </message>
+ <message>
+ <source>Missing virtual folder in QtHelpProject</source>
+ <translation>Hiányzó virtuális dosszié a QtSegítségProjektben</translation>
+ </message>
+ <message>
+ <source>Missing attribute in keyword at line %1.</source>
+ <translation>Hiányzó attirbútum a kulcsszóban a(z) %1 sorban.</translation>
+ </message>
+ <message>
+ <source>The input file %1 could not be opened!</source>
+ <translation>Nem sikerült megnyitni a(z) %1 bemeneti fájlt!</translation>
+ </message>
+</context>
+</TS>
diff --git a/translations/qt_hu.ts b/translations/qt_hu.ts
new file mode 100644
index 0000000000..ecc9826c29
--- /dev/null
+++ b/translations/qt_hu.ts
@@ -0,0 +1,10537 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="hu">
+<context>
+ <name>CloseButton</name>
+ <message>
+ <location filename="../src/gui/widgets/qtabbar.cpp" line="+2262"/>
+ <source>Close Tab</source>
+ <translation>Lap bezárása</translation>
+ </message>
+</context>
+<context>
+ <name>FakeReply</name>
+ <message>
+ <location filename="../src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp" line="+2198"/>
+ <source>Fake error !</source>
+ <translation>Hamisítási hiba !</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Invalid URL</source>
+ <translation>Érvénytelen URL</translation>
+ </message>
+</context>
+<context>
+ <name>Phonon::</name>
+ <message>
+ <location filename="../src/3rdparty/phonon/phonon/phononnamespace.cpp" line="+55"/>
+ <source>Notifications</source>
+ <translation>Értesítések</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Music</source>
+ <translation>Zene</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Video</source>
+ <translation>Videó</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Communication</source>
+ <translation>Kommunikáció</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Games</source>
+ <translation>Játékok</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Accessibility</source>
+ <translation>Hozzáférhetőség</translation>
+ </message>
+</context>
+<context>
+ <name>Phonon::AudioOutput</name>
+ <message>
+ <location filename="../src/3rdparty/phonon/phonon/audiooutput.cpp" line="+385"/>
+ <source>&lt;html&gt;The audio playback device &lt;b&gt;%1&lt;/b&gt; does not work.&lt;br/&gt;Falling back to &lt;b&gt;%2&lt;/b&gt;.&lt;/html&gt;</source>
+ <translation>&lt;html&gt;Az audió visszajátszó eszköz &lt;b&gt;%1&lt;/b&gt; nem működik.&lt;br/&gt;Visszavonul ide: &lt;b&gt;%2&lt;/b&gt;.&lt;/html&gt;</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>&lt;html&gt;Switching to the audio playback device &lt;b&gt;%1&lt;/b&gt;&lt;br/&gt;which just became available and has higher preference.&lt;/html&gt;</source>
+ <translation>&lt;html&gt;Az audió visszajátszó eszközre kapcsolás &lt;b&gt;%1&lt;/b&gt;&lt;br/&gt;amely éppen elérhetővé vált és magasabb prioritása van.&lt;/html&gt;</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Revert back to device &apos;%1&apos;</source>
+ <translation>Visszatérés a(z) &apos;%1&apos; eszközre</translation>
+ </message>
+</context>
+<context>
+ <name>Phonon::Gstreamer::Backend</name>
+ <message>
+ <location filename="../src/3rdparty/phonon/gstreamer/backend.cpp" line="+182"/>
+ <source>Warning: You do not seem to have the package gstreamer0.10-plugins-good installed.
+ Some video features have been disabled.</source>
+ <translation>Figyelmeztetés: Úgy tűnik nem telepítette megfelelően a gstreamer0.10-plugins csomagot.
+ Néhány videó tulajdonság tiltva van.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Warning: You do not seem to have the base GStreamer plugins installed.
+ All audio and video support has been disabled</source>
+ <translation>Figyelmeztetés: Úgy tűnik nem telepítette az alap GStreamer beépülő modulokat.
+ Az összes audió és videó támogatás tiltva van</translation>
+ </message>
+</context>
+<context>
+ <name>Phonon::Gstreamer::MediaObject</name>
+ <message>
+ <location filename="../src/3rdparty/phonon/gstreamer/mediaobject.cpp" line="+90"/>
+ <source>Cannot start playback.
+
+Check your GStreamer installation and make sure you
+have libgstreamer-plugins-base installed.</source>
+ <translation>Nem lehet elindítani a visszajátszást.
+
+Ellenőrizze le a GStreamer telepítését és győzödjön meg róla, hogy installálta a libgstreamer-plugins-base csomagot.</translation>
+ </message>
+ <message>
+ <location line="+113"/>
+ <source>A required codec is missing. You need to install the following codec(s) to play this content: %0</source>
+ <translation>Egy szükséges kódek hiányzik. A következő kódek(ek) telepítése szükséges ennek a tartalomnak a lejátszásához: %0</translation>
+ </message>
+ <message>
+ <location line="+702"/>
+ <location line="+8"/>
+ <location line="+15"/>
+ <location line="+26"/>
+ <location line="+6"/>
+ <location line="+19"/>
+ <location line="+339"/>
+ <location line="+24"/>
+ <source>Could not open media source.</source>
+ <translation>Nem sikerült megnyitni a média forrást.</translation>
+ </message>
+ <message>
+ <location line="-424"/>
+ <source>Invalid source type.</source>
+ <translation>Érvénytelen forrás típus.</translation>
+ </message>
+ <message>
+ <location line="+398"/>
+ <source>Could not locate media source.</source>
+ <translation>Nem sikerült telepíteni a média forrást.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Could not open audio device. The device is already in use.</source>
+ <translation>Nem sikerült megnyitni az audió eszközt. Az eszköz már használatban van.</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Could not decode media source.</source>
+ <translation>Nem sikerült dekódolni a forrást.</translation>
+ </message>
+</context>
+<context>
+ <name>Phonon::MMF</name>
+ <message>
+ <location filename="../src/3rdparty/phonon/mmf/audiooutput.cpp" line="+108"/>
+ <source>Audio Output</source>
+ <translation>Audio kimenet</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>The audio output device</source>
+ <translation>A kimeneti audió eszköz</translation>
+ </message>
+</context>
+<context>
+ <name>Phonon::MMF::AudioEqualizer</name>
+ <message>
+ <location filename="../src/3rdparty/phonon/mmf/audioequalizer.cpp" line="+75"/>
+ <source>Frequency band, %1 Hz</source>
+ <translation>Frekvencia sáv, &apos;%1&apos; Hz</translation>
+ </message>
+</context>
+<context>
+ <name>Phonon::MMF::EffectFactory</name>
+ <message>
+ <location filename="../src/3rdparty/phonon/mmf/effectfactory.cpp" line="+65"/>
+ <source>Audio Equalizer</source>
+ <translation>Audió hangszínszabályozó</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Bass Boost</source>
+ <translation>Basszus erősítés</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Distance Attenuation</source>
+ <translation>Távcsillapítás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <location line="+2"/>
+ <source>Environmental Reverb</source>
+ <translation>Környezeti visszhang</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Loudness</source>
+ <translation>Hangosság</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Source Orientation</source>
+ <translation>Forrás orientáció</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Stereo Widening</source>
+ <translation>Sztereó szélesség</translation>
+ </message>
+</context>
+<context>
+ <name>Phonon::MMF::MediaObject</name>
+ <message>
+ <location filename="../src/3rdparty/phonon/mmf/mediaobject.cpp" line="+291"/>
+ <source>Media type could not be determined</source>
+ <translation>Nem lehetet meghatározni a média típust</translation>
+ </message>
+</context>
+<context>
+ <name>Phonon::VolumeSlider</name>
+ <message>
+ <location filename="../src/3rdparty/phonon/phonon/volumeslider.cpp" line="+42"/>
+ <location line="+18"/>
+ <location line="+129"/>
+ <location line="+15"/>
+ <source>Volume: %1%</source>
+ <translation>Hangerő: %1%</translation>
+ </message>
+ <message>
+ <location line="-159"/>
+ <location line="+18"/>
+ <location line="+54"/>
+ <source>Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1%</source>
+ <translation>Használja ezt a csúszkát a hangerő szabályozásához. A legbaloldalib pozíció: 0%, a legjobboldalibb %1%</translation>
+ </message>
+ <message>
+ <location line="+67"/>
+ <source>Muted</source>
+ <translation>Elnémított</translation>
+ </message>
+</context>
+<context>
+ <name>Q3Accel</name>
+ <message>
+ <location filename="../src/qt3support/other/q3accel.cpp" line="+481"/>
+ <source>%1, %2 not defined</source>
+ <translation>%1, %2 nincs definiálva</translation>
+ </message>
+ <message>
+ <location line="+36"/>
+ <source>Ambiguous %1 not handled</source>
+ <translation>Félreérthető %1 nincs lekezelve</translation>
+ </message>
+</context>
+<context>
+ <name>Q3DataTable</name>
+ <message>
+ <location filename="../src/qt3support/sql/q3datatable.cpp" line="+285"/>
+ <source>True</source>
+ <translation>Igaz</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>False</source>
+ <translation>Hamis</translation>
+ </message>
+ <message>
+ <location line="+505"/>
+ <source>Insert</source>
+ <translation>Beszúrás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Update</source>
+ <translation>Frissítés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Delete</source>
+ <translation>Törlés</translation>
+ </message>
+</context>
+<context>
+ <name>Q3FileDialog</name>
+ <message>
+ <location filename="../src/qt3support/dialogs/q3filedialog.cpp" line="+829"/>
+ <source>Copy or Move a File</source>
+ <translation>Egy fájl másolása vagy mozgatása</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Read: %1</source>
+ <translation>Olvasás: %1</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <location line="+30"/>
+ <source>Write: %1</source>
+ <translation>Ãrás: %1</translation>
+ </message>
+ <message>
+ <location line="-22"/>
+ <location line="+1579"/>
+ <source>Cancel</source>
+ <translation>Mégse</translation>
+ </message>
+ <message>
+ <location line="-157"/>
+ <location line="+49"/>
+ <location line="+2149"/>
+ <location filename="../src/qt3support/dialogs/q3filedialog_mac.cpp" line="+112"/>
+ <source>All Files (*)</source>
+ <translation>Az összes fájl (*)</translation>
+ </message>
+ <message>
+ <location line="-2085"/>
+ <source>Name</source>
+ <translation>Név</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Size</source>
+ <translation>Méret</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Type</source>
+ <translation>Típus</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Date</source>
+ <translation>Dátum</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Attributes</source>
+ <translation>Attribútumok</translation>
+ </message>
+ <message>
+ <location line="+35"/>
+ <location line="+2027"/>
+ <source>&amp;OK</source>
+ <translation>&amp;OK</translation>
+ </message>
+ <message>
+ <location line="-1987"/>
+ <source>Look &amp;in:</source>
+ <translation>&amp;Benéz:</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <location line="+1977"/>
+ <location line="+16"/>
+ <source>File &amp;name:</source>
+ <translation>Fájl &amp;név:</translation>
+ </message>
+ <message>
+ <location line="-1992"/>
+ <source>File &amp;type:</source>
+ <translation>Fájl &amp;típus:</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Back</source>
+ <translation>Vissza</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>One directory up</source>
+ <translation>Egy könyvtárral kintebb</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Create New Folder</source>
+ <translation>Új mappa létrehozása</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>List View</source>
+ <translation>Lista nézet</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Detail View</source>
+ <translation>Részletes nézet</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Preview File Info</source>
+ <translation>Fájl információ előnézet</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Preview File Contents</source>
+ <translation>Fájl tartalom előnézet</translation>
+ </message>
+ <message>
+ <location line="+88"/>
+ <source>Read-write</source>
+ <translation>Ãrás olvasás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Read-only</source>
+ <translation>Csak olvasható</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Write-only</source>
+ <translation>Csak írható</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Inaccessible</source>
+ <translation>Hozzáférhetetlen</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Symlink to File</source>
+ <translation>Szimlink a fájlra</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Symlink to Directory</source>
+ <translation>Szimlink a könyvtárra</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Symlink to Special</source>
+ <translation>Szimlink egy speciálisra</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>File</source>
+ <translation>Fájl</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Dir</source>
+ <translation>Könyvtár</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Special</source>
+ <translation>Speciális</translation>
+ </message>
+ <message>
+ <location line="+704"/>
+ <location line="+1999"/>
+ <location filename="../src/qt3support/dialogs/q3filedialog_win.cpp" line="+209"/>
+ <source>Open</source>
+ <translation>Megnyitás</translation>
+ </message>
+ <message>
+ <location line="-1889"/>
+ <location filename="../src/qt3support/dialogs/q3filedialog_win.cpp" line="+71"/>
+ <source>Save As</source>
+ <translation>Mentés másként</translation>
+ </message>
+ <message>
+ <location line="+642"/>
+ <location line="+5"/>
+ <location line="+355"/>
+ <source>&amp;Open</source>
+ <translation>&amp;Megnyitás</translation>
+ </message>
+ <message>
+ <location line="-357"/>
+ <location line="+341"/>
+ <source>&amp;Save</source>
+ <translation>&amp;Mentés</translation>
+ </message>
+ <message>
+ <location line="-334"/>
+ <source>&amp;Rename</source>
+ <translation>&amp;Ãtnevezés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Delete</source>
+ <translation>&amp;Törlés</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>R&amp;eload</source>
+ <translation>&amp;Újratöltés</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Sort by &amp;Name</source>
+ <translation>Rendezés &amp;Név alapján</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Sort by &amp;Size</source>
+ <translation>Rendezés &amp;Méret alapján</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Sort by &amp;Date</source>
+ <translation>Rendezés &amp;Dátum alapján</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>&amp;Unsorted</source>
+ <translation>&amp;Rendezetlen</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Sort</source>
+ <translation>Rendezés</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Show &amp;hidden files</source>
+ <translation>&amp;Rejtett fájlok megjelenítése</translation>
+ </message>
+ <message>
+ <location line="+31"/>
+ <source>the file</source>
+ <translation>a fájl</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>the directory</source>
+ <translation>a könyvtár</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>the symlink</source>
+ <translation>a szimlink</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Delete %1</source>
+ <translation>%1 törlése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&lt;qt&gt;Are you sure you wish to delete %1 &quot;%2&quot;?&lt;/qt&gt;</source>
+ <translation>&lt;qt&gt;Biztos benne, hogy törölni kívánja a(z) %1 &quot;%2&quot;?&lt;/qt&gt;</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>&amp;Yes</source>
+ <translation>&amp;Igen</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>&amp;No</source>
+ <translation>&amp;Nem</translation>
+ </message>
+ <message>
+ <location line="+36"/>
+ <source>New Folder 1</source>
+ <translation>Új mappa 1</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>New Folder</source>
+ <translation>Új mappa</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>New Folder %1</source>
+ <translation>Új mappa %1</translation>
+ </message>
+ <message>
+ <location line="+98"/>
+ <source>Find Directory</source>
+ <translation>Könyvtár keresése</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <location line="+108"/>
+ <source>Directories</source>
+ <translation>Könyvtárak</translation>
+ </message>
+ <message>
+ <location line="-2"/>
+ <source>Directory:</source>
+ <translation>Könyvtár:</translation>
+ </message>
+ <message>
+ <location line="+40"/>
+ <location line="+1009"/>
+ <source>Error</source>
+ <translation>Hiba</translation>
+ </message>
+ <message>
+ <location line="-1008"/>
+ <source>%1
+File not found.
+Check path and filename.</source>
+ <translation>%1
+Fájl nem található
+Útvonal és fájlnév ellenőrzése.</translation>
+ </message>
+ <message>
+ <location filename="../src/qt3support/dialogs/q3filedialog_win.cpp" line="-191"/>
+ <source>All Files (*.*)</source>
+ <translation>Az összes fájl (*.*)</translation>
+ </message>
+ <message>
+ <location line="+264"/>
+ <source>Open </source>
+ <translation>Megnyitás</translation>
+ </message>
+ <message>
+ <location line="+107"/>
+ <source>Select a Directory</source>
+ <translation>Egy könyvtár kiválasztása</translation>
+ </message>
+</context>
+<context>
+ <name>Q3LocalFs</name>
+ <message>
+ <location filename="../src/qt3support/network/q3localfs.cpp" line="+130"/>
+ <location line="+10"/>
+ <source>Could not read directory
+%1</source>
+ <translation>Nem sikerült a könytárat olvasni
+%1</translation>
+ </message>
+ <message>
+ <location line="+45"/>
+ <source>Could not create directory
+%1</source>
+ <translation>Nem sikerült létrehozni a könyvtárat
+%1</translation>
+ </message>
+ <message>
+ <location line="+34"/>
+ <source>Could not remove file or directory
+%1</source>
+ <translation>Nem sikerült eltávolítani egy fájlt vag könyvtárat
+%1</translation>
+ </message>
+ <message>
+ <location line="+27"/>
+ <source>Could not rename
+%1
+to
+%2</source>
+ <translation>Nem sikerült átnevezni ezt
+%1
+erre
+%2</translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>Could not open
+%1</source>
+ <translation>Nem sikerült megnyitni
+%1</translation>
+ </message>
+ <message>
+ <location line="+68"/>
+ <source>Could not write
+%1</source>
+ <translation>Nem sikerült írni
+%1</translation>
+ </message>
+</context>
+<context>
+ <name>Q3MainWindow</name>
+ <message>
+ <location filename="../src/qt3support/widgets/q3mainwindow.cpp" line="+2051"/>
+ <source>Line up</source>
+ <translation>Egy sorral feljebb</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Customize...</source>
+ <translation>Egyéni...</translation>
+ </message>
+</context>
+<context>
+ <name>Q3NetworkProtocol</name>
+ <message>
+ <location filename="../src/qt3support/network/q3networkprotocol.cpp" line="+854"/>
+ <source>Operation stopped by the user</source>
+ <translation>A felhasználó leállította a műveletet</translation>
+ </message>
+</context>
+<context>
+ <name>Q3ProgressDialog</name>
+ <message>
+ <location filename="../src/qt3support/dialogs/q3progressdialog.cpp" line="+224"/>
+ <location line="+61"/>
+ <source>Cancel</source>
+ <translation>Mégse</translation>
+ </message>
+</context>
+<context>
+ <name>Q3TabDialog</name>
+ <message>
+ <location filename="../src/qt3support/dialogs/q3tabdialog.cpp" line="+190"/>
+ <location line="+824"/>
+ <source>OK</source>
+ <translation>OK</translation>
+ </message>
+ <message>
+ <location line="-366"/>
+ <source>Apply</source>
+ <translation>Alkalmazza</translation>
+ </message>
+ <message>
+ <location line="+43"/>
+ <source>Help</source>
+ <translation>Súgó</translation>
+ </message>
+ <message>
+ <location line="+45"/>
+ <source>Defaults</source>
+ <translation>Alapértelemett</translation>
+ </message>
+ <message>
+ <location line="+50"/>
+ <source>Cancel</source>
+ <translation>Mégse</translation>
+ </message>
+</context>
+<context>
+ <name>Q3TextEdit</name>
+ <message>
+ <location filename="../src/qt3support/text/q3textedit.cpp" line="+5429"/>
+ <source>&amp;Undo</source>
+ <translation>&amp;Visszavonás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Redo</source>
+ <translation>&amp;Helyreállítás</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Cu&amp;t</source>
+ <translation>&amp;Kivágás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Copy</source>
+ <translation>&amp;Másolás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>&amp;Paste</source>
+ <translation>&amp;Beillesztés</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Clear</source>
+ <translation>Kiürítés</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <location line="+2"/>
+ <source>Select All</source>
+ <translation>Az összes kiválasztása</translation>
+ </message>
+</context>
+<context>
+ <name>Q3TitleBar</name>
+ <message>
+ <location filename="../src/plugins/accessible/compat/q3complexwidgets.cpp" line="+246"/>
+ <source>System</source>
+ <translation>Rendszer</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Restore up</source>
+ <translation>Felállítás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Minimize</source>
+ <translation>Minimalizálás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Restore down</source>
+ <translation>Leállítás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Maximize</source>
+ <translation>Maximalizálás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Close</source>
+ <translation>Bezárás</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Contains commands to manipulate the window</source>
+ <translation>Tartalmazza az ablak manipulációs parancsokat</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Puts a minimized window back to normal</source>
+ <translation>Egy minimalizált ablak normálra visszatétele</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Moves the window out of the way</source>
+ <translation>Az ablak félreeső helyre mozgatása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Puts a maximized window back to normal</source>
+ <translation>Maximalizált ablak normálra visszatétele</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Makes the window full screen</source>
+ <translation>Az ablak maximális méretűvé tétele</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Closes the window</source>
+ <translation>Az ablak bezárása</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Displays the name of the window and contains controls to manipulate it</source>
+ <translation>Az ablak nevének megjelenítése és manipuláláshoz szükséges vezérlő elemek tartalmazása</translation>
+ </message>
+</context>
+<context>
+ <name>Q3ToolBar</name>
+ <message>
+ <location filename="../src/qt3support/widgets/q3toolbar.cpp" line="+692"/>
+ <source>More...</source>
+ <translation>További...</translation>
+ </message>
+</context>
+<context>
+ <name>Q3UrlOperator</name>
+ <message>
+ <location filename="../src/qt3support/network/q3urloperator.cpp" line="+386"/>
+ <location line="+260"/>
+ <location line="+4"/>
+ <source>The protocol `%1&apos; is not supported</source>
+ <translation>A(z) &apos;%1&apos; protokoll nem támogatott</translation>
+ </message>
+ <message>
+ <location line="-260"/>
+ <source>The protocol `%1&apos; does not support listing directories</source>
+ <translation>A(z) &apos;%1&apos; protokoll nem támogatja a könyvtár listázást</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The protocol `%1&apos; does not support creating new directories</source>
+ <translation>A(z) &apos;%1&apos; protokoll nem támogatja az új könyvtárak létrehozását</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The protocol `%1&apos; does not support removing files or directories</source>
+ <translation>A(z) &apos;%1&apos; protokoll nem támogatja fájlok vagy könyvtárat áthelyezését</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The protocol `%1&apos; does not support renaming files or directories</source>
+ <translation>A(z) &apos;%1&apos; protokoll nem támogatja fájlok vagy könyvtárat átnevezését</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The protocol `%1&apos; does not support getting files</source>
+ <translation>A(z) &apos;%1&apos; protokoll nem támogatja fájlok szerzését</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The protocol `%1&apos; does not support putting files</source>
+ <translation>A(z) &apos;%1&apos; protokoll nem támogatja fájlok betevését</translation>
+ </message>
+ <message>
+ <location line="+243"/>
+ <location line="+4"/>
+ <source>The protocol `%1&apos; does not support copying or moving files or directories</source>
+ <translation>A(z) &apos;%1&apos; protokoll nem támogatja fájlok vagy könyvtárak mozgatását vagy másolását</translation>
+ </message>
+ <message>
+ <location line="+237"/>
+ <location line="+1"/>
+ <source>(unknown)</source>
+ <translation>(ismeretlen)</translation>
+ </message>
+</context>
+<context>
+ <name>Q3Wizard</name>
+ <message>
+ <location filename="../src/qt3support/dialogs/q3wizard.cpp" line="+177"/>
+ <source>&amp;Cancel</source>
+ <translation>&amp;Mégse</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&lt; &amp;Back</source>
+ <translation>&lt; &amp;Vissza</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Next &gt;</source>
+ <translation>&amp;Következő &gt;</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Finish</source>
+ <translation>&amp;Befejezés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Help</source>
+ <translation>&amp;Súgó</translation>
+ </message>
+</context>
+<context>
+ <name>QAbstractSocket</name>
+ <message>
+ <location filename="../src/network/socket/qabstractsocket.cpp" line="+899"/>
+ <location filename="../src/network/socket/qhttpsocketengine.cpp" line="+643"/>
+ <location filename="../src/network/socket/qsocks5socketengine.cpp" line="+661"/>
+ <location line="+26"/>
+ <source>Host not found</source>
+ <translation>A hoszt nem található</translation>
+ </message>
+ <message>
+ <location line="+50"/>
+ <location filename="../src/network/socket/qhttpsocketengine.cpp" line="+3"/>
+ <location filename="../src/network/socket/qsocks5socketengine.cpp" line="+4"/>
+ <source>Connection refused</source>
+ <translation>A kapcsolódás elutasítva</translation>
+ </message>
+ <message>
+ <location line="+142"/>
+ <source>Connection timed out</source>
+ <translation>Kapcsolódási időtúllépés</translation>
+ </message>
+ <message>
+ <location line="-555"/>
+ <location line="+805"/>
+ <location line="+208"/>
+ <source>Operation on socket is not supported</source>
+ <translation>A socket művelet nem támogatott</translation>
+ </message>
+ <message>
+ <location line="+200"/>
+ <source>Socket operation timed out</source>
+ <translation>Socket művelet időtúllépés</translation>
+ </message>
+ <message>
+ <location line="+380"/>
+ <source>Socket is not connected</source>
+ <translation>Socket nincs csatlakoztatva</translation>
+ </message>
+ <message>
+ <location filename="../src/network/socket/qsocks5socketengine.cpp" line="-8"/>
+ <source>Network unreachable</source>
+ <translation>A hálózat nem elérhető</translation>
+ </message>
+</context>
+<context>
+ <name>QAbstractSpinBox</name>
+ <message>
+ <location filename="../src/gui/widgets/qabstractspinbox.cpp" line="+1217"/>
+ <source>&amp;Step up</source>
+ <translation>&amp;Növelés</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Step &amp;down</source>
+ <translation>&amp;Csökkentés</translation>
+ </message>
+ <message>
+ <location line="-8"/>
+ <source>&amp;Select All</source>
+ <translation>Az összes &amp;kiválasztása</translation>
+ </message>
+</context>
+<context>
+ <name>QAccessibleButton</name>
+ <message>
+ <location filename="../src/plugins/accessible/widgets/simplewidgets.cpp" line="+250"/>
+ <source>Press</source>
+ <translation>Megnyomás</translation>
+ </message>
+</context>
+<context>
+ <name>QApplication</name>
+ <message>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2279"/>
+ <source>QT_LAYOUT_DIRECTION</source>
+ <comment>Translate this string to the string &apos;LTR&apos; in left-to-right languages or to &apos;RTL&apos; in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.</comment>
+ <translation>QT_LAYOUT_DIRECTION</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qmessagebox.h" line="+354"/>
+ <source>Executable &apos;%1&apos; requires Qt %2, found Qt %3.</source>
+ <translation>A(z) &apos;%1&apos; futtatható fájl igényli a Qt %2, de Qt %3.-t talált.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Incompatible Qt Library Error</source>
+ <translation>Inkompatibilis Qt könyvtár hiba</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/accessible/qaccessibleobject.cpp" line="+376"/>
+ <source>Activate</source>
+ <translation>Aktiválás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Activates the program&apos;s main window</source>
+ <translation>A program fő ablakának aktiválása</translation>
+ </message>
+</context>
+<context>
+ <name>QAxSelect</name>
+ <message>
+ <location filename="../src/activeqt/container/qaxselect.ui"/>
+ <source>Select ActiveX Control</source>
+ <translation>ActiveX vezérlő kiválasztása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>OK</source>
+ <translation>OK</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Cancel</source>
+ <translation>&amp;Mégse</translation>
+ </message>
+ <message>
+ <location/>
+ <source>COM &amp;Object:</source>
+ <translation>COM &amp;Objektum:</translation>
+ </message>
+</context>
+<context>
+ <name>QCheckBox</name>
+ <message>
+ <location filename="../src/plugins/accessible/widgets/simplewidgets.cpp" line="-136"/>
+ <source>Uncheck</source>
+ <translation>Nincs bejelölve</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Check</source>
+ <translation>Bejelölve</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Toggle</source>
+ <translation>Kapcsolgatás</translation>
+ </message>
+</context>
+<context>
+ <name>QColorDialog</name>
+ <message>
+ <location filename="../src/gui/dialogs/qcolordialog.cpp" line="+1349"/>
+ <source>Hu&amp;e:</source>
+ <translation>&amp;Színárnyalat:</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Sat:</source>
+ <translation>&amp;Sat:</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Val:</source>
+ <translation>&amp;Érték:</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Red:</source>
+ <translation>&amp;Piros:</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Green:</source>
+ <translation>&amp;Zöld:</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Bl&amp;ue:</source>
+ <translation>&amp;Kék:</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A&amp;lpha channel:</source>
+ <translation>A&amp;lfa csatorna:</translation>
+ </message>
+ <message>
+ <location line="+101"/>
+ <source>Select Color</source>
+ <translation>Szín kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+180"/>
+ <source>&amp;Basic colors</source>
+ <translation>&amp;Alap színek</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Custom colors</source>
+ <translation>&amp;Egyéni színek</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Add to Custom Colors</source>
+ <translation>&amp;Egyéni színek hozzáadása</translation>
+ </message>
+</context>
+<context>
+ <name>QComboBox</name>
+ <message>
+ <location filename="../src/plugins/accessible/widgets/complexwidgets.cpp" line="+1771"/>
+ <location line="+65"/>
+ <source>Open</source>
+ <translation>Megnyitás</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/itemviews/qitemeditorfactory.cpp" line="+556"/>
+ <source>False</source>
+ <translation>Hamis</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>True</source>
+ <translation>Igaz</translation>
+ </message>
+ <message>
+ <location filename="../src/plugins/accessible/widgets/complexwidgets.cpp" line="+0"/>
+ <source>Close</source>
+ <translation>Bezárás</translation>
+ </message>
+</context>
+<context>
+ <name>QCoreApplication</name>
+ <message>
+ <location filename="../src/corelib/kernel/qsystemsemaphore_unix.cpp" line="+119"/>
+ <source>%1: key is empty</source>
+ <comment>QSystemSemaphore</comment>
+ <translation>%1:kulcs üres</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>%1: unable to make key</source>
+ <comment>QSystemSemaphore</comment>
+ <translation>%1: nem lehet kulcsot csinálni</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>%1: ftok failed</source>
+ <comment>QSystemSemaphore</comment>
+ <translation>%1: ftok hiba</translation>
+ </message>
+ <message>
+ <location filename="../src/corelib/kernel/qsystemsemaphore_symbian.cpp" line="+65"/>
+ <source>%1: already exists</source>
+ <comment>QSystemSemaphore</comment>
+ <translation>%1: már létezik</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>%1: does not exist</source>
+ <comment>QSystemSemaphore</comment>
+ <translation>%1: nem létezik</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>%1: out of resources</source>
+ <comment>QSystemSemaphore</comment>
+ <translation>%1: elfogytak az erőforrások</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>%1: unknown error %2</source>
+ <comment>QSystemSemaphore</comment>
+ <translation>%1: ismeretlen hiba %2</translation>
+ </message>
+</context>
+<context>
+ <name>QDB2Driver</name>
+ <message>
+ <location filename="../src/sql/drivers/db2/qsql_db2.cpp" line="+1254"/>
+ <source>Unable to connect</source>
+ <translation>Nem lehet csatlakozni</translation>
+ </message>
+ <message>
+ <location line="+298"/>
+ <source>Unable to commit transaction</source>
+ <translation>Nem lehet kommitolni a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Unable to rollback transaction</source>
+ <translation>Nem lehet visszagörgetni a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Unable to set autocommit</source>
+ <translation>Nem lehet beállítani az automatikus kommitolást</translation>
+ </message>
+</context>
+<context>
+ <name>QDB2Result</name>
+ <message>
+ <location line="-1031"/>
+ <location line="+240"/>
+ <source>Unable to execute statement</source>
+ <translation>Nem lehet végrehajtani a műveletet</translation>
+ </message>
+ <message>
+ <location line="-203"/>
+ <source>Unable to prepare statement</source>
+ <translation>Nem lehet felkészülni a műveletre</translation>
+ </message>
+ <message>
+ <location line="+193"/>
+ <source>Unable to bind variable</source>
+ <translation>Nem lehet összekötni a változót</translation>
+ </message>
+ <message>
+ <location line="+89"/>
+ <source>Unable to fetch record %1</source>
+ <translation>Nem lehet letölteni a(z) %1 felvételt</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Unable to fetch next</source>
+ <translation>Nem lehet letölteni a következőt</translation>
+ </message>
+ <message>
+ <location line="+21"/>
+ <source>Unable to fetch first</source>
+ <translation>Nem lehet letölteni az elsőt</translation>
+ </message>
+</context>
+<context>
+ <name>QDateTimeEdit</name>
+ <message>
+ <location filename="../src/gui/widgets/qdatetimeedit.cpp" line="+2287"/>
+ <source>AM</source>
+ <translation>AM</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>am</source>
+ <translation>am</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>PM</source>
+ <translation>PM</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>pm</source>
+ <translation>pm</translation>
+ </message>
+</context>
+<context>
+ <name>QDial</name>
+ <message>
+ <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="+951"/>
+ <source>QDial</source>
+ <translation>QDial</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>SpeedoMeter</source>
+ <translation>Sebességmérő</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>SliderHandle</source>
+ <translation>CsúszkaKezelő</translation>
+ </message>
+</context>
+<context>
+ <name>QDialog</name>
+ <message>
+ <location filename="../src/gui/dialogs/qdialog.cpp" line="+636"/>
+ <source>What&apos;s This?</source>
+ <translation>Mi ez?</translation>
+ </message>
+ <message>
+ <location line="-135"/>
+ <source>Done</source>
+ <translation>Kész</translation>
+ </message>
+</context>
+<context>
+ <name>QDialogButtonBox</name>
+ <message>
+ <location filename="../src/gui/dialogs/qmessagebox.cpp" line="+1872"/>
+ <location line="+464"/>
+ <location filename="../src/gui/widgets/qdialogbuttonbox.cpp" line="+622"/>
+ <source>OK</source>
+ <translation>OK</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/widgets/qdialogbuttonbox.cpp" line="+3"/>
+ <source>Save</source>
+ <translation>Mentés</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>&amp;Save</source>
+ <translation>&amp;Mentés</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Open</source>
+ <translation>Megnyitás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Cancel</source>
+ <translation>Mégse</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>&amp;Cancel</source>
+ <translation>&amp;Mégse</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Close</source>
+ <translation>Bezárás</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>&amp;Close</source>
+ <translation>&amp;Bezárás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Apply</source>
+ <translation>Alkalmazza</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Reset</source>
+ <translation>Visszaállítás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Help</source>
+ <translation>Súgó</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Don&apos;t Save</source>
+ <translation>Ne mentse</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Discard</source>
+ <translation>Eldob</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Yes</source>
+ <translation>&amp;Igen</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Yes to &amp;All</source>
+ <translation>Igen az &amp;összesre</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;No</source>
+ <translation>&amp;Nem</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>N&amp;o to All</source>
+ <translation>&amp;Nem az összesre</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Save All</source>
+ <translation>Az összes mentése</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Abort</source>
+ <translation>Megszakítás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Retry</source>
+ <translation>Újra próbálkozás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ignore</source>
+ <translation>Mellőzés</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Restore Defaults</source>
+ <translation>Alapértelemezett beállítások visszaállítása</translation>
+ </message>
+ <message>
+ <location line="-29"/>
+ <source>Close without Saving</source>
+ <translation>Bezárás mentés nélkül</translation>
+ </message>
+ <message>
+ <location line="-27"/>
+ <source>&amp;OK</source>
+ <translation>&amp;OK</translation>
+ </message>
+</context>
+<context>
+ <name>QDirModel</name>
+ <message>
+ <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+457"/>
+ <source>Name</source>
+ <translation>Név</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Size</source>
+ <translation>Méret</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Kind</source>
+ <comment>Match OS X Finder</comment>
+ <translation>Fajta</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Type</source>
+ <comment>All other platforms</comment>
+ <translation>Típus</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Date Modified</source>
+ <translation>Dátum módosítva</translation>
+ </message>
+</context>
+<context>
+ <name>QDockWidget</name>
+ <message>
+ <location filename="../src/plugins/accessible/widgets/qaccessiblewidgets.cpp" line="+1239"/>
+ <source>Close</source>
+ <translation>Bezárás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Dock</source>
+ <translation>Dokkolás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Float</source>
+ <translation>Lebegtetés</translation>
+ </message>
+</context>
+<context>
+ <name>QDoubleSpinBox</name>
+ <message>
+ <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="-537"/>
+ <source>More</source>
+ <translation>Több</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Less</source>
+ <translation>Kevesebb</translation>
+ </message>
+</context>
+<context>
+ <name>QErrorMessage</name>
+ <message>
+ <location filename="../src/gui/dialogs/qerrormessage.cpp" line="+414"/>
+ <source>&amp;Show this message again</source>
+ <translation>Az üzenet újbóli &amp;megjelenítése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;OK</source>
+ <translation>&amp;OK</translation>
+ </message>
+ <message>
+ <location line="-207"/>
+ <source>Debug Message:</source>
+ <translation>Debug üzenet:</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Warning:</source>
+ <translation>Figyelmeztetés:</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Fatal Error:</source>
+ <translation>Végzetes hiba:</translation>
+ </message>
+</context>
+<context>
+ <name>QFile</name>
+ <message>
+ <location filename="../src/corelib/io/qfile.cpp" line="+697"/>
+ <location line="+155"/>
+ <source>Destination file exists</source>
+ <translation>A cél fájl létezik</translation>
+ </message>
+ <message>
+ <location line="-140"/>
+ <source>Will not rename sequential file using block copy</source>
+ <translation>Blokkos másolásnál nem lesznek átnevezve az egymást követő fájlok</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Cannot remove source file</source>
+ <translation>Nem lehet a forrás fájlt eltávolítani</translation>
+ </message>
+ <message>
+ <location line="+130"/>
+ <source>Cannot open %1 for input</source>
+ <translation>Nem lehet megnyitni %1-t bementre</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Cannot open for output</source>
+ <translation>Nem lehet megnyitni a kimenetre</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Failure to write block</source>
+ <translation>Hiba történt a blokk írás közben</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Cannot create %1 for output</source>
+ <translation>Nem lehet létrehozni a(z) %1-t kimenetre</translation>
+ </message>
+</context>
+<context>
+ <name>QFileDialog</name>
+ <message>
+ <location filename="../src/gui/dialogs/qfiledialog.cpp" line="+558"/>
+ <location line="+450"/>
+ <source>All Files (*)</source>
+ <translation>Az összes fájl (*)</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qfiledialog.ui"/>
+ <location filename="../src/gui/dialogs/qfiledialog_embedded.ui"/>
+ <source>Back</source>
+ <translation>Vissza</translation>
+ </message>
+ <message>
+ <location/>
+ <location filename="../src/gui/dialogs/qfiledialog_embedded.ui"/>
+ <source>List View</source>
+ <translation>Lista nézet</translation>
+ </message>
+ <message>
+ <location/>
+ <location filename="../src/gui/dialogs/qfiledialog_embedded.ui"/>
+ <source>Detail View</source>
+ <translation>Részletes nézet</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/itemviews/qfileiconprovider.cpp" line="+464"/>
+ <location line="+1"/>
+ <source>File</source>
+ <translation>Fájl</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-467"/>
+ <source>Open</source>
+ <translation>Megnyitás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Save As</source>
+ <translation>Mentés másként</translation>
+ </message>
+ <message>
+ <location line="+689"/>
+ <location line="+50"/>
+ <location line="+1528"/>
+ <source>&amp;Open</source>
+ <translation>&amp;Megnyitás</translation>
+ </message>
+ <message>
+ <location line="-1578"/>
+ <location line="+50"/>
+ <source>&amp;Save</source>
+ <translation>&amp;Mentés</translation>
+ </message>
+ <message>
+ <location line="+1801"/>
+ <source>Recent Places</source>
+ <translation>Utolsó helyek</translation>
+ </message>
+ <message>
+ <location line="-2511"/>
+ <source>&amp;Rename</source>
+ <translation>&amp;Ãtnevezés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Delete</source>
+ <translation>&amp;Törlés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Show &amp;hidden files</source>
+ <translation>&amp;Rejtett fájlok megjelenítése</translation>
+ </message>
+ <message>
+ <location line="+1957"/>
+ <source>New Folder</source>
+ <translation>Új mappa</translation>
+ </message>
+ <message>
+ <location line="-1992"/>
+ <source>Find Directory</source>
+ <translation>Könyvtár keresése</translation>
+ </message>
+ <message>
+ <location line="+696"/>
+ <source>Directories</source>
+ <translation>Könyvtárak</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qfiledialog_win.cpp" line="+174"/>
+ <source>All Files (*.*)</source>
+ <translation>Az összes fájl (*.*)</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-655"/>
+ <location line="+659"/>
+ <source>Directory:</source>
+ <translation>Könyvtár:</translation>
+ </message>
+ <message>
+ <location line="+810"/>
+ <source>%1 already exists.
+Do you want to replace it?</source>
+ <translation>A(z) %1 már létezik.
+Szeretné lecserélni?</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>%1
+File not found.
+Please verify the correct file name was given.</source>
+ <translation>%1
+Fájl nem található.
+Kérem ellenőrizze, hogy helyes fájlnevet adott meg.</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+402"/>
+ <source>My Computer</source>
+ <translation>Sajátgép</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qfiledialog.ui"/>
+ <location filename="../src/gui/dialogs/qfiledialog_embedded.ui"/>
+ <source>Parent Directory</source>
+ <translation>Szülő könyvtár</translation>
+ </message>
+ <message>
+ <location/>
+ <location filename="../src/gui/dialogs/qfiledialog_embedded.ui"/>
+ <source>Files of type:</source>
+ <translation>Típusfájlok:</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-54"/>
+ <location line="+862"/>
+ <source>%1
+Directory not found.
+Please verify the correct directory name was given.</source>
+ <translation>%1
+A könyvtár nem található.
+Kérem ellenőrizze le, hogy helyes könyvtár nevet adott meg.</translation>
+ </message>
+ <message>
+ <location line="-218"/>
+ <source>&apos;%1&apos; is write protected.
+Do you want to delete it anyway?</source>
+ <translation>A(z) &apos;%1&apos; írásvédett.
+Mégis törölni szeretné?</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Are sure you want to delete &apos;%1&apos;?</source>
+ <translation>Törölni szeretné &apos;%1&apos;?</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Could not delete directory.</source>
+ <translation>Nem sikerült törölni a könyvtárat.</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/itemviews/qfileiconprovider.cpp" line="-4"/>
+ <source>Drive</source>
+ <translation>Vezérlő</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>File Folder</source>
+ <comment>Match Windows Explorer</comment>
+ <translation>Fájl mappa</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Folder</source>
+ <comment>All other platforms</comment>
+ <translation>Mappa</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Alias</source>
+ <comment>Mac OS X Finder</comment>
+ <translation>Ãlnév</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Shortcut</source>
+ <comment>All other platforms</comment>
+ <translation>Gyorsbillentyű</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Unknown</source>
+ <translation>Ismeretlen</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-2111"/>
+ <source>Show </source>
+ <translation>Megjelenítés</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qfiledialog.ui"/>
+ <location filename="../src/gui/dialogs/qfiledialog_embedded.ui"/>
+ <source>Forward</source>
+ <translation>Előre</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qfiledialog.cpp" line="+7"/>
+ <source>&amp;New Folder</source>
+ <translation>&amp;Új mappa</translation>
+ </message>
+ <message>
+ <location line="+667"/>
+ <location line="+38"/>
+ <source>&amp;Choose</source>
+ <translation>&amp;Kiválasztás</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qsidebar.cpp" line="+442"/>
+ <source>Remove</source>
+ <translation>Eltávolítás</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-698"/>
+ <location line="+663"/>
+ <source>File &amp;name:</source>
+ <translation>Fájl &amp;név:</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qfiledialog.ui"/>
+ <location filename="../src/gui/dialogs/qfiledialog_embedded.ui"/>
+ <source>Look in:</source>
+ <translation>Benéz:</translation>
+ </message>
+ <message>
+ <location/>
+ <location filename="../src/gui/dialogs/qfiledialog_embedded.ui"/>
+ <source>Create New Folder</source>
+ <translation>Új mappa létrehozása</translation>
+ </message>
+</context>
+<context>
+ <name>QFileSystemModel</name>
+ <message>
+ <location filename="../src/gui/dialogs/qfilesystemmodel.cpp" line="+744"/>
+ <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+476"/>
+ <source>%1 TB</source>
+ <translation>%1 TB</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+2"/>
+ <source>%1 GB</source>
+ <translation>%1 GB</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+2"/>
+ <source>%1 MB</source>
+ <translation>%1 MB</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+2"/>
+ <source>%1 KB</source>
+ <translation>%1 KB</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>%1 bytes</source>
+ <translation>%1 bájt</translation>
+ </message>
+ <message>
+ <location line="+77"/>
+ <source>Invalid filename</source>
+ <translation>Érvénytelen fájlnév</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&lt;b&gt;The name &quot;%1&quot; can not be used.&lt;/b&gt;&lt;p&gt;Try using another name, with fewer characters or no punctuations marks.</source>
+ <translation>&lt;b&gt;A(z) &quot;%1&quot; név nem használható.&lt;/b&gt;&lt;p&gt;Próbáljon meg más nevet használni, kevesebb karakterrel vagy írásjelekek nélkül.</translation>
+ </message>
+ <message>
+ <location line="+64"/>
+ <source>Name</source>
+ <translation>Név</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Size</source>
+ <translation>Méret</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Kind</source>
+ <comment>Match OS X Finder</comment>
+ <translation>Fajta</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Type</source>
+ <comment>All other platforms</comment>
+ <translation>Típus</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Date Modified</source>
+ <translation>Dátum módosítva</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qfilesystemmodel_p.h" line="+258"/>
+ <source>My Computer</source>
+ <translation>Sajátgép</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Computer</source>
+ <translation>Számítógép</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+1"/>
+ <source>%1 byte(s)</source>
+ <translation>%1 bájt</translation>
+ </message>
+</context>
+<context>
+ <name>QFontDatabase</name>
+ <message>
+ <location filename="../src/gui/text/qfontdatabase.cpp" line="+102"/>
+ <location line="+1342"/>
+ <source>Normal</source>
+ <translation>Normál</translation>
+ </message>
+ <message>
+ <location line="-1339"/>
+ <location line="+12"/>
+ <location line="+1315"/>
+ <source>Bold</source>
+ <translation>Kövér</translation>
+ </message>
+ <message>
+ <location line="-1324"/>
+ <location line="+1326"/>
+ <source>Demi Bold</source>
+ <translation>Félkövér</translation>
+ </message>
+ <message>
+ <location line="-1323"/>
+ <location line="+18"/>
+ <location line="+1301"/>
+ <source>Black</source>
+ <translation>Fekete</translation>
+ </message>
+ <message>
+ <location line="-1311"/>
+ <source>Demi</source>
+ <translation>Fél</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <location line="+1311"/>
+ <source>Light</source>
+ <translation>Világos</translation>
+ </message>
+ <message>
+ <location line="-1165"/>
+ <location line="+1168"/>
+ <source>Italic</source>
+ <translation>DÅ‘lt</translation>
+ </message>
+ <message>
+ <location line="-1165"/>
+ <location line="+1167"/>
+ <source>Oblique</source>
+ <translation>Homályos</translation>
+ </message>
+ <message>
+ <location line="+704"/>
+ <source>Any</source>
+ <translation>Bármilyen</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Latin</source>
+ <translation>Latin</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Greek</source>
+ <translation>Görög</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Cyrillic</source>
+ <translation>Ciril</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Armenian</source>
+ <translation>Örmény</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Hebrew</source>
+ <translation>Héber</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Arabic</source>
+ <translation>Arab</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Syriac</source>
+ <translation>Szíriai</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Thaana</source>
+ <translation>Thana</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Devanagari</source>
+ <translation>Dévanágari</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Bengali</source>
+ <translation>Bengáli</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Gurmukhi</source>
+ <translation>Gurmukhi</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Gujarati</source>
+ <translation>Gujarati</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Oriya</source>
+ <translation>Oriya</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Tamil</source>
+ <translation>Tamil</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Telugu</source>
+ <translation>Telugu</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Kannada</source>
+ <translation>Kanadai</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Malayalam</source>
+ <translation>Maláj</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Sinhala</source>
+ <translation>Sinhala</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Thai</source>
+ <translation>Tájföldi</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Lao</source>
+ <translation>Lao</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Tibetan</source>
+ <translation>Tibeti</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Myanmar</source>
+ <translation>Mianmari</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Georgian</source>
+ <translation>Grúz</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Khmer</source>
+ <translation>Khmer</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Simplified Chinese</source>
+ <translation>Egyszerűsített kínai</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Traditional Chinese</source>
+ <translation>Hagyományos kínai</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Japanese</source>
+ <translation>Japán</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Korean</source>
+ <translation>Koreai</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Vietnamese</source>
+ <translation>Vietnámi</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Symbol</source>
+ <translation>Szimbólum</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ogham</source>
+ <translation>Ogham</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Runic</source>
+ <translation>Székely</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>N&apos;Ko</source>
+ <translation>N&apos;Ko</translation>
+ </message>
+</context>
+<context>
+ <name>QFontDialog</name>
+ <message>
+ <location filename="../src/gui/dialogs/qfontdialog.cpp" line="+776"/>
+ <source>&amp;Font</source>
+ <translation>&amp;Betű</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Font st&amp;yle</source>
+ <translation>Betű st&amp;ílus</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Size</source>
+ <translation>&amp;Méret</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Effects</source>
+ <translation>Hatások</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Stri&amp;keout</source>
+ <translation>Ki&amp;talál</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Underline</source>
+ <translation>&amp;Aláhúzás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Sample</source>
+ <translation>Minta</translation>
+ </message>
+ <message>
+ <location line="-608"/>
+ <location line="+257"/>
+ <source>Select Font</source>
+ <translation>Betű kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+352"/>
+ <source>Wr&amp;iting System</source>
+ <translation>Rendszer &amp;írása</translation>
+ </message>
+</context>
+<context>
+ <name>QFtp</name>
+ <message>
+ <location filename="../src/qt3support/network/q3ftp.cpp" line="+2303"/>
+ <source>Host %1 found</source>
+ <translation>%1 host megtalálva</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Host found</source>
+ <translation>Hoszt megtalálva</translation>
+ </message>
+ <message>
+ <location filename="../src/network/access/qftp.cpp" line="+1008"/>
+ <location filename="../src/qt3support/network/q3ftp.cpp" line="-1456"/>
+ <location line="+1451"/>
+ <source>Connected to host %1</source>
+ <translation>%1 hosztra csatlkoztatva</translation>
+ </message>
+ <message>
+ <location filename="../src/qt3support/network/q3ftp.cpp" line="+7"/>
+ <source>Connected to host</source>
+ <translation>Hosztra csatlakoztatva</translation>
+ </message>
+ <message>
+ <location line="-5"/>
+ <source>Connection to %1 closed</source>
+ <translation>%1-re csatlakoztatása bezárva</translation>
+ </message>
+ <message>
+ <location filename="../src/network/access/qftp.cpp" line="+1377"/>
+ <location filename="../src/qt3support/network/q3ftp.cpp" line="-243"/>
+ <location line="+250"/>
+ <source>Connection closed</source>
+ <translation>Kapcsolat bezárva</translation>
+ </message>
+ <message>
+ <location line="-1489"/>
+ <location filename="../src/qt3support/network/q3ftp.cpp" line="-1566"/>
+ <source>Host %1 not found</source>
+ <translation>%1 host nem található</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <location filename="../src/qt3support/network/q3ftp.cpp" line="+4"/>
+ <source>Connection refused to host %1</source>
+ <translation>Kapcsolat elutasítva a(z) %1 hoszttal</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Connection timed out to host %1</source>
+ <translation>Kapcsolati időtúllépés a %1 hoszttal</translation>
+ </message>
+ <message>
+ <location line="+501"/>
+ <location line="+29"/>
+ <location filename="../src/qt3support/network/q3ftp.cpp" line="+458"/>
+ <location line="+728"/>
+ <source>Unknown error</source>
+ <translation>Ismeretlen hiba</translation>
+ </message>
+ <message>
+ <location line="+891"/>
+ <location filename="../src/qt3support/network/q3ftp.cpp" line="+77"/>
+ <source>Connecting to host failed:
+%1</source>
+ <translation>A hoszthoz kapcsolódás nem sikerült:
+%1</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/>
+ <source>Login failed:
+%1</source>
+ <translation>Bejelentkezési hiba:
+%1</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/>
+ <source>Listing directory failed:
+%1</source>
+ <translation>Könyvtár listázási hiba:
+%1</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/>
+ <source>Changing directory failed:
+%1</source>
+ <translation>Könyvtár változtatási hiba:
+%1</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/>
+ <source>Downloading file failed:
+%1</source>
+ <translation>Fájl letöltési hiba:
+%1</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/>
+ <source>Uploading file failed:
+%1</source>
+ <translation>Fájl feltöltési hiba:
+%1</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/>
+ <source>Removing file failed:
+%1</source>
+ <translation>Fájl eltávolítási hiba:
+%1</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/>
+ <source>Creating directory failed:
+%1</source>
+ <translation>Könyvtár létrehozási hiba:
+%1</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <location filename="../src/qt3support/network/q3ftp.cpp" line="+3"/>
+ <source>Removing directory failed:
+%1</source>
+ <translation>Könyvtár eltávolítása hiba:
+%1</translation>
+ </message>
+ <message>
+ <location line="-1529"/>
+ <location filename="../src/qt3support/network/q3ftp.cpp" line="-1356"/>
+ <source>Not connected</source>
+ <translation>Nincs csatlakoztatva</translation>
+ </message>
+ <message>
+ <location line="+399"/>
+ <location filename="../src/qt3support/network/q3ftp.cpp" line="+332"/>
+ <source>Connection refused for data connection</source>
+ <translation>Adat kapcsolat érdekében történő csatlakozás megtagadva</translation>
+ </message>
+</context>
+<context>
+ <name>QHostInfo</name>
+ <message>
+ <location filename="../src/network/kernel/qhostinfo_p.h" line="+185"/>
+ <source>Unknown error</source>
+ <translation>Ismeretlen hiba</translation>
+ </message>
+</context>
+<context>
+ <name>QHostInfoAgent</name>
+ <message>
+ <location filename="../src/network/kernel/qhostinfo_unix.cpp" line="+257"/>
+ <location line="+32"/>
+ <location filename="../src/network/kernel/qhostinfo_win.cpp" line="+220"/>
+ <location line="+27"/>
+ <source>Host not found</source>
+ <translation>A hoszt nem található</translation>
+ </message>
+ <message>
+ <location line="-45"/>
+ <location line="+39"/>
+ <location filename="../src/network/kernel/qhostinfo_win.cpp" line="-34"/>
+ <location line="+29"/>
+ <source>Unknown address type</source>
+ <translation>Ismeretlen cím típus</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <location filename="../src/network/kernel/qhostinfo_win.cpp" line="-19"/>
+ <location line="+27"/>
+ <source>Unknown error</source>
+ <translation>Ismeretlen hiba</translation>
+ </message>
+ <message>
+ <location filename="../src/network/kernel/qhostinfo_win.cpp" line="-67"/>
+ <source>No host name given</source>
+ <translation>Nincs hoszt név megadva</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Invalid hostname</source>
+ <translation>Érvénytelen hoszt név</translation>
+ </message>
+</context>
+<context>
+ <name>QHttp</name>
+ <message>
+ <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+578"/>
+ <location filename="../src/qt3support/network/q3http.cpp" line="+1835"/>
+ <source>Connection refused</source>
+ <translation>Kapcsolat megtagadva</translation>
+ </message>
+ <message>
+ <location filename="../src/network/access/qhttp.cpp" line="+2639"/>
+ <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="-4"/>
+ <location filename="../src/qt3support/network/q3http.cpp" line="+3"/>
+ <source>Host %1 not found</source>
+ <translation>A(z) %1 hoszt nem található</translation>
+ </message>
+ <message>
+ <location line="-62"/>
+ <location filename="../src/qt3support/network/q3http.cpp" line="-45"/>
+ <source>Wrong content length</source>
+ <translation>Hibás tartalom hossz</translation>
+ </message>
+ <message>
+ <location line="+82"/>
+ <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+10"/>
+ <location line="+19"/>
+ <location filename="../src/qt3support/network/q3http.cpp" line="+48"/>
+ <source>HTTP request failed</source>
+ <translation>HTTP kérési hiba</translation>
+ </message>
+ <message>
+ <location filename="../src/qt3support/network/q3http.cpp" line="+450"/>
+ <source>Host %1 found</source>
+ <translation>A(z) %1 hoszt nem található</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Host found</source>
+ <translation>Hoszt megtalálható</translation>
+ </message>
+ <message>
+ <location line="-11"/>
+ <source>Connected to host %1</source>
+ <translation>%1 hoszthoz csatlakozva van</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Connected to host</source>
+ <translation>Hosztra csatlakoztatva</translation>
+ </message>
+ <message>
+ <location line="-11"/>
+ <source>Connection to %1 closed</source>
+ <translation>%1-re csatlkozás bezárva</translation>
+ </message>
+ <message>
+ <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="-22"/>
+ <location filename="../src/qt3support/network/q3http.cpp" line="+14"/>
+ <source>Connection closed</source>
+ <translation>Kapcsolat bezárva</translation>
+ </message>
+ <message>
+ <location filename="../src/network/access/qhttp.cpp" line="-1077"/>
+ <location line="+820"/>
+ <location filename="../src/qt3support/network/q3http.cpp" line="-1152"/>
+ <location line="+567"/>
+ <source>Unknown error</source>
+ <translation>Ismeretlen hiba</translation>
+ </message>
+ <message>
+ <location line="-568"/>
+ <location filename="../src/qt3support/network/q3http.cpp" line="-370"/>
+ <source>Request aborted</source>
+ <translation>Kérés megszakítva</translation>
+ </message>
+ <message>
+ <location line="+579"/>
+ <location filename="../src/qt3support/network/q3http.cpp" line="+381"/>
+ <source>No server set to connect to</source>
+ <translation>Nincsen szerver beállítva, amire csatlakozni lehetne</translation>
+ </message>
+ <message>
+ <location line="+168"/>
+ <location filename="../src/qt3support/network/q3http.cpp" line="+60"/>
+ <source>Server closed connection unexpectedly</source>
+ <translation>A szerver váratlanul bezárta a kapcsolatot</translation>
+ </message>
+ <message>
+ <location line="+172"/>
+ <location filename="../src/qt3support/network/q3http.cpp" line="+113"/>
+ <source>Invalid HTTP response header</source>
+ <translation>Érvénytelen HTTP válasz fejléc</translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <source>Unknown authentication method</source>
+ <translation>Ismeretlen hitelesítési eljárás</translation>
+ </message>
+ <message>
+ <location line="+97"/>
+ <location line="+48"/>
+ <location filename="../src/qt3support/network/q3http.cpp" line="+40"/>
+ <location line="+47"/>
+ <source>Invalid HTTP chunked body</source>
+ <translation>Érvénytelen nagy HTTP törzs</translation>
+ </message>
+ <message>
+ <location line="+38"/>
+ <source>Error writing response to device</source>
+ <translation>Hiba történt a válasz eszközre írása közben</translation>
+ </message>
+ <message>
+ <location line="-173"/>
+ <source>Proxy authentication required</source>
+ <translation>Proxy hitelesítés szükséges</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Authentication required</source>
+ <translation>Hitelesítés szükséges</translation>
+ </message>
+ <message>
+ <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+6"/>
+ <source>Proxy requires authentication</source>
+ <translation>A proxy a hitelesítést kéri</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Host requires authentication</source>
+ <translation>A hoszt hitelesítést kér</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Data corrupted</source>
+ <translation>Sérült adat</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>SSL handshake failed</source>
+ <translation>SSL kézfogási hiba</translation>
+ </message>
+ <message>
+ <location line="-3"/>
+ <source>Unknown protocol specified</source>
+ <translation>Ismeretlen protokoll van megadva</translation>
+ </message>
+ <message>
+ <location filename="../src/network/access/qhttp.cpp" line="-159"/>
+ <source>Connection refused (or timed out)</source>
+ <translation>Kapcsolat megtagadva (vagy időtúllépés)</translation>
+ </message>
+ <message>
+ <location line="-2266"/>
+ <source>HTTPS connection requested but SSL support not compiled in</source>
+ <translation>HTTP kapcsolat lett kérve, de az SSL támogatás nincs beleforgatva</translation>
+ </message>
+</context>
+<context>
+ <name>QHttpSocketEngine</name>
+ <message>
+ <location filename="../src/network/socket/qhttpsocketengine.cpp" line="-89"/>
+ <source>Did not receive HTTP response from proxy</source>
+ <translation>Nem kapott HTTP választ a proxy-tól</translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>Error parsing authentication request from proxy</source>
+ <translation>Hiba történt a proxy hitelesítés kérésének elemzése közben</translation>
+ </message>
+ <message>
+ <location line="+31"/>
+ <source>Authentication required</source>
+ <translation>Hitelesítés szükséges</translation>
+ </message>
+ <message>
+ <location line="+27"/>
+ <source>Proxy denied connection</source>
+ <translation>A proxy megtagadta a kapcsolatot</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Error communicating with HTTP proxy</source>
+ <translation>Hiba történt a HTTP proxy-val történő kommunikáció közben</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Proxy server not found</source>
+ <translation>A proxy szerver nem található</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Proxy connection refused</source>
+ <translation>A proxy kapcsolat elutasítva</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Proxy server connection timed out</source>
+ <translation>Proxy szerver kapcsolódási időtúllépés</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Proxy connection closed prematurely</source>
+ <translation>Proxy kapcsolódás túl korán be lett zárva</translation>
+ </message>
+</context>
+<context>
+ <name>QIBaseDriver</name>
+ <message>
+ <location filename="../src/sql/drivers/ibase/qsql_ibase.cpp" line="+1491"/>
+ <source>Error opening database</source>
+ <translation>Hiba történt az adatbázis megnyitása közben</translation>
+ </message>
+ <message>
+ <location line="+54"/>
+ <source>Could not start transaction</source>
+ <translation>Nem sikerült elindítani a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Unable to commit transaction</source>
+ <translation>Nem lehet kommitolni a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Unable to rollback transaction</source>
+ <translation>Nem lehet visszagörgetni a tranzakciót</translation>
+ </message>
+</context>
+<context>
+ <name>QIBaseResult</name>
+ <message>
+ <location line="-1149"/>
+ <source>Unable to create BLOB</source>
+ <translation>Nem lehet BLOB-t létrehozni</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Unable to write BLOB</source>
+ <translation>Nem lehet írni a BLOB-t</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Unable to open BLOB</source>
+ <translation>Nem lehet megnyitni a BLOB-t</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Unable to read BLOB</source>
+ <translation>Nem lehet olvasni a BLOB-t</translation>
+ </message>
+ <message>
+ <location line="+125"/>
+ <location line="+187"/>
+ <source>Could not find array</source>
+ <translation>Nem sikerült megtalálni a tömböt</translation>
+ </message>
+ <message>
+ <location line="-155"/>
+ <source>Could not get array data</source>
+ <translation>Nem sikerüét megszerezni a tömb adatokat</translation>
+ </message>
+ <message>
+ <location line="+210"/>
+ <source>Could not get query info</source>
+ <translation>Nem sikerült megszerezni a lekérdezi információt</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Could not start transaction</source>
+ <translation>Nem sikerült elindítani a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Unable to commit transaction</source>
+ <translation>Nem lehet kommitolni a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+42"/>
+ <source>Could not allocate statement</source>
+ <translation>Nem sikerült lefoglalni a műveletet</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Could not prepare statement</source>
+ <translation>Nem sikerült felkészülni a műveletre</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <location line="+11"/>
+ <source>Could not describe input statement</source>
+ <translation>Nem sikerült leírni a bemeneti állítást</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Could not describe statement</source>
+ <translation>Nem sikerült leírni az állítást</translation>
+ </message>
+ <message>
+ <location line="+115"/>
+ <source>Unable to close statement</source>
+ <translation>Nem lehet megnyitni az állítást</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Unable to execute query</source>
+ <translation>Nem lehet végrehajtani a lekérdezést</translation>
+ </message>
+ <message>
+ <location line="+46"/>
+ <source>Could not fetch next item</source>
+ <translation>Nem lehet letölteni a következő elemet</translation>
+ </message>
+ <message>
+ <location line="+197"/>
+ <source>Could not get statement info</source>
+ <translation>Nem lehet az művelet információkat megszerezni</translation>
+ </message>
+</context>
+<context>
+ <name>QIODevice</name>
+ <message>
+ <location filename="../src/corelib/global/qglobal.cpp" line="+2072"/>
+ <source>Permission denied</source>
+ <translation>Beleegyezés megtagadva</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Too many open files</source>
+ <translation>Túl sok fájl megnyitása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>No such file or directory</source>
+ <translation>Nincs ilyen fájl vagy könyvtár</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>No space left on device</source>
+ <translation>Nincs több hely a lemezen</translation>
+ </message>
+ <message>
+ <location filename="../src/corelib/io/qiodevice.cpp" line="+1561"/>
+ <source>Unknown error</source>
+ <translation>Ismeretlen hiba</translation>
+ </message>
+</context>
+<context>
+ <name>QInputContext</name>
+ <message>
+ <location filename="../src/gui/inputmethod/qinputcontextfactory.cpp" line="+256"/>
+ <source>XIM</source>
+ <translation>XIM</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>FEP</source>
+ <translation>FEP</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>XIM input method</source>
+ <translation>XIM beviteli eljárás</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Windows input method</source>
+ <translation>Windows beviteli eljárás</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Mac OS X input method</source>
+ <translation>Mac OS X beviteli eljárás</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>S60 FEP input method</source>
+ <translation>S60 FEP beviteli eljárás</translation>
+ </message>
+</context>
+<context>
+ <name>QInputDialog</name>
+ <message>
+ <location filename="../src/gui/dialogs/qinputdialog.cpp" line="+223"/>
+ <source>Enter a value:</source>
+ <translation>Egy értél bevitele:</translation>
+ </message>
+</context>
+<context>
+ <name>QLibrary</name>
+ <message>
+ <location filename="../src/corelib/plugin/qlibrary.cpp" line="+383"/>
+ <source>Could not mmap &apos;%1&apos;: %2</source>
+ <translation>Nem sikerült az mmap &apos;%1&apos;: %2</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Plugin verification data mismatch in &apos;%1&apos;</source>
+ <translation>Beépülő modul igazoló adata nem megfelelő a(z) &apos;%1&apos;-ben</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Could not unmap &apos;%1&apos;: %2</source>
+ <translation>Nem lehet eltávolítani a letérképezést &apos;%1&apos;: %2</translation>
+ </message>
+ <message>
+ <location line="+344"/>
+ <source>The plugin &apos;%1&apos; uses incompatible Qt library. (%2.%3.%4) [%5]</source>
+ <translation>A(z) &apos;%1&apos; beépülő modul inkompatibilis Qt könyvtárat használ. (%2.%3.%4) [%5]</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>The plugin &apos;%1&apos; uses incompatible Qt library. Expected build key &quot;%2&quot;, got &quot;%3&quot;</source>
+ <translation>A(z) &apos;%1&apos; beépülő modul inkompatibilis Qt könyvtárat használ. A várt építési kulcs &apos;%2&apos;, kapott &apos;%3&apos;</translation>
+ </message>
+ <message>
+ <location line="+365"/>
+ <source>Unknown error</source>
+ <translation>Ismeretlen hiba</translation>
+ </message>
+ <message>
+ <location line="-402"/>
+ <location filename="../src/corelib/plugin/qpluginloader.cpp" line="+343"/>
+ <source>The shared library was not found.</source>
+ <translation>A megosztott könyvtár nem található.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>The file &apos;%1&apos; is not a valid Qt plugin.</source>
+ <translation>A(z) &apos;%1&apos; fájl nem egy érvényes Qt beépülő modul.</translation>
+ </message>
+ <message>
+ <location line="+43"/>
+ <source>The plugin &apos;%1&apos; uses incompatible Qt library. (Cannot mix debug and release libraries.)</source>
+ <translation>A(z) &apos;%1&apos; beépülő modul inkompatibilis Qt könyvtárat használ. (Nem lehet a debug és kiadási könyvtárakat keverni.)</translation>
+ </message>
+ <message>
+ <location filename="../src/corelib/plugin/qlibrary_unix.cpp" line="+236"/>
+ <location filename="../src/corelib/plugin/qlibrary_win.cpp" line="+87"/>
+ <source>Cannot load library %1: %2</source>
+ <translation>Nem lehet betölteni a(z) %1 könyvtárat: %2</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <location filename="../src/corelib/plugin/qlibrary_win.cpp" line="+22"/>
+ <source>Cannot unload library %1: %2</source>
+ <translation>Nem lehet kirakni a(z) %1 könyvtárat: %2</translation>
+ </message>
+ <message>
+ <location line="+34"/>
+ <location filename="../src/corelib/plugin/qlibrary_win.cpp" line="+15"/>
+ <source>Cannot resolve symbol &quot;%1&quot; in %2: %3</source>
+ <translation>Nem lehet megfejteni a(z) &apos;%1&apos; szimbólumot a(z) %2-ben: %3</translation>
+ </message>
+</context>
+<context>
+ <name>QLineEdit</name>
+ <message>
+ <location filename="../src/gui/widgets/qlineedit.cpp" line="+2035"/>
+ <source>Select All</source>
+ <translation>Az összes kiválasztása</translation>
+ </message>
+ <message>
+ <location line="-32"/>
+ <source>&amp;Undo</source>
+ <translation>&amp;Visszavonás</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>&amp;Redo</source>
+ <translation>&amp;Helyreállítás</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Cu&amp;t</source>
+ <translation>&amp;Kivágás</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&amp;Copy</source>
+ <translation>&amp;Másolás</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&amp;Paste</source>
+ <translation>&amp;Beillesztés</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Delete</source>
+ <translation>Törlés</translation>
+ </message>
+</context>
+<context>
+ <name>QLocalServer</name>
+ <message>
+ <location filename="../src/network/socket/qlocalserver.cpp" line="+224"/>
+ <location filename="../src/network/socket/qlocalserver_unix.cpp" line="+246"/>
+ <source>%1: Name error</source>
+ <translation>%1: Név hiba</translation>
+ </message>
+ <message>
+ <location filename="../src/network/socket/qlocalserver_unix.cpp" line="-8"/>
+ <source>%1: Permission denied</source>
+ <translation>%1: Engedély megtagadva</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>%1: Address in use</source>
+ <translation>%1: Cím használatban</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>%1: Unknown error %2</source>
+ <translation>%1: Ismeretlen hiba %2</translation>
+ </message>
+</context>
+<context>
+ <name>QLocalSocket</name>
+ <message>
+ <location filename="../src/network/socket/qlocalsocket_tcp.cpp" line="+132"/>
+ <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+139"/>
+ <source>%1: Connection refused</source>
+ <translation>%1: Kapcsolat elutasítva</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/>
+ <source>%1: Remote closed</source>
+ <translation>%1: Távol bezárva</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/>
+ <location filename="../src/network/socket/qlocalsocket_win.cpp" line="+80"/>
+ <location line="+45"/>
+ <source>%1: Invalid name</source>
+ <translation>%1: Érvénytelen név</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/>
+ <source>%1: Socket access error</source>
+ <translation>%1: Socket hozzáférési hiba</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/>
+ <source>%1: Socket resource error</source>
+ <translation>%1: Socket erőforrás hiba</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/>
+ <source>%1: Socket operation timed out</source>
+ <translation>%1: Socker művelet időtúllépés</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/>
+ <source>%1: Datagram too large</source>
+ <translation>%1: Túl nagy datagram</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/>
+ <location filename="../src/network/socket/qlocalsocket_win.cpp" line="-50"/>
+ <source>%1: Connection error</source>
+ <translation>%1: Kapcsolat hiba</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/>
+ <source>%1: The socket operation is not supported</source>
+ <translation>%1: A socket művelet nem támogatott</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>%1: Unknown error</source>
+ <translation>%1: Ismeretlen hiba</translation>
+ </message>
+ <message>
+ <location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+4"/>
+ <location filename="../src/network/socket/qlocalsocket_win.cpp" line="+10"/>
+ <source>%1: Unknown error %2</source>
+ <translation>%1: Ismeretlen hiba %2</translation>
+ </message>
+</context>
+<context>
+ <name>QMYSQLDriver</name>
+ <message>
+ <location filename="../src/sql/drivers/mysql/qsql_mysql.cpp" line="+1261"/>
+ <source>Unable to open database &apos;</source>
+ <translation>Nem lehet megnyitni az adatbázist</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Unable to connect</source>
+ <translation>Nem lehet kapcsolódni</translation>
+ </message>
+ <message>
+ <location line="+151"/>
+ <source>Unable to begin transaction</source>
+ <translation>Nem lehet megkezdeni a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Unable to commit transaction</source>
+ <translation>Nem lehet kommitolni a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Unable to rollback transaction</source>
+ <translation>Nem lehet visszagörgetni a tranzakciót</translation>
+ </message>
+</context>
+<context>
+ <name>QMYSQLResult</name>
+ <message>
+ <location line="-969"/>
+ <source>Unable to fetch data</source>
+ <translation>Nem lehet letölteni az adatot</translation>
+ </message>
+ <message>
+ <location line="+183"/>
+ <source>Unable to execute query</source>
+ <translation>Nem lehet végrehajtani a lekérdezést</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Unable to store result</source>
+ <translation>Nem lehet tárolni az eredményt</translation>
+ </message>
+ <message>
+ <location line="+191"/>
+ <location line="+8"/>
+ <source>Unable to prepare statement</source>
+ <translation>Nem lehet felkészülni a műveletre</translation>
+ </message>
+ <message>
+ <location line="+37"/>
+ <source>Unable to reset statement</source>
+ <translation>Nem lehet visszaállítani a műveleteket</translation>
+ </message>
+ <message>
+ <location line="+86"/>
+ <source>Unable to bind value</source>
+ <translation>Nem lehet összekötni az értéket</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Unable to execute statement</source>
+ <translation>Nem lehet végrehajtani az állítást</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <location line="+21"/>
+ <source>Unable to bind outvalues</source>
+ <translation>Nem lehet összekötni a kiértékeléseket</translation>
+ </message>
+ <message>
+ <location line="-12"/>
+ <source>Unable to store statement results</source>
+ <translation>Nem lehet letárolni a művelet eredményeket</translation>
+ </message>
+ <message>
+ <location line="-253"/>
+ <source>Unable to execute next query</source>
+ <translation>Nem lehet végrehajtani a következő lekérdezést</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Unable to store next result</source>
+ <translation>Nem lehet letárolni a következő eredményt</translation>
+ </message>
+</context>
+<context>
+ <name>QMdiArea</name>
+ <message>
+ <location filename="../src/gui/widgets/qmdiarea.cpp" line="+290"/>
+ <source>(Untitled)</source>
+ <translation>(Címtelen)</translation>
+ </message>
+</context>
+<context>
+ <name>QMdiSubWindow</name>
+ <message>
+ <location filename="../src/gui/widgets/qmdisubwindow.cpp" line="+280"/>
+ <source>%1 - [%2]</source>
+ <translation>%1 - [%2]</translation>
+ </message>
+ <message>
+ <location line="+72"/>
+ <source>Close</source>
+ <translation>Bezárás</translation>
+ </message>
+ <message>
+ <location line="-18"/>
+ <source>Minimize</source>
+ <translation>Minimalizálás</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Restore Down</source>
+ <translation>Leállítás</translation>
+ </message>
+ <message>
+ <location line="+707"/>
+ <source>&amp;Restore</source>
+ <translation>&amp;Letárolás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Move</source>
+ <translation>&amp;Mozgatás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Size</source>
+ <translation>&amp;Méret</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Mi&amp;nimize</source>
+ <translation>&amp;Minimalizálás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Ma&amp;ximize</source>
+ <translation>Ma&amp;ximalizálás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Stay on &amp;Top</source>
+ <translation>&amp;Tetején maradni</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Close</source>
+ <translation>&amp;Bezárás</translation>
+ </message>
+ <message>
+ <location line="-729"/>
+ <source>Maximize</source>
+ <translation>Maximalizálás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Unshade</source>
+ <translation>Ãrnyékolás megszüntetése</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Shade</source>
+ <translation>Ãrnyákolás</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Restore</source>
+ <translation>Visszaállítás</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Help</source>
+ <translation>Súgó</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Menu</source>
+ <translation>Menü</translation>
+ </message>
+ <message>
+ <location line="-79"/>
+ <source>- [%1]</source>
+ <translation>- [%1]</translation>
+ </message>
+</context>
+<context>
+ <name>QMenu</name>
+ <message>
+ <location filename="../src/plugins/accessible/widgets/qaccessiblemenu.cpp" line="+157"/>
+ <location line="+225"/>
+ <source>Close</source>
+ <translation>Bezárás</translation>
+ </message>
+ <message>
+ <location line="-224"/>
+ <location line="+225"/>
+ <source>Open</source>
+ <translation>Megnyitás</translation>
+ </message>
+ <message>
+ <location line="-223"/>
+ <location line="+225"/>
+ <location line="+51"/>
+ <source>Execute</source>
+ <translation>Végrehajtás</translation>
+ </message>
+</context>
+<context>
+ <name>QMenuBar</name>
+ <message>
+ <location filename="../src/gui/widgets/qmenu_symbian.cpp" line="+410"/>
+ <source>Actions</source>
+ <translation>Tevékenységek</translation>
+ </message>
+</context>
+<context>
+ <name>QMessageBox</name>
+ <message>
+ <location filename="../src/gui/dialogs/qmessagebox.cpp" line="-1964"/>
+ <location line="+847"/>
+ <location filename="../src/gui/dialogs/qmessagebox.h" line="-52"/>
+ <location line="+8"/>
+ <source>OK</source>
+ <translation>OK</translation>
+ </message>
+ <message>
+ <location line="+477"/>
+ <source>&lt;h3&gt;About Qt&lt;/h3&gt;&lt;p&gt;This program uses Qt version %1.&lt;/p&gt;</source>
+ <translation>&lt;h3&gt;Qt-ról&lt;/h3&gt;&lt;p&gt;Ez a program a(z) %1 Qt verziót használja.&lt;/p&gt;</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&lt;p&gt;Qt is a C++ toolkit for cross-platform application development.&lt;/p&gt;&lt;p&gt;Qt provides single-source portability across MS&amp;nbsp;Windows, Mac&amp;nbsp;OS&amp;nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.&lt;/p&gt;&lt;p&gt;Qt is available under three different licensing options designed to accommodate the needs of our various users.&lt;/p&gt;&lt;p&gt;Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.&lt;/p&gt;&lt;p&gt;Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.&lt;/p&gt;&lt;p&gt;Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.&lt;/p&gt;&lt;p&gt;Please see &lt;a href=&quot;http://qt.nokia.com/products/licensing&quot;&gt;qt.nokia.com/products/licensing&lt;/a&gt; for an overview of Qt licensing.&lt;/p&gt;&lt;p&gt;Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).&lt;/p&gt;&lt;p&gt;Qt is a Nokia product. See &lt;a href=&quot;http://qt.nokia.com/&quot;&gt;qt.nokia.com&lt;/a&gt; for more information.&lt;/p&gt;</source>
+ <translation></translation>
+ </message>
+ <message>
+ <location line="+31"/>
+ <source>About Qt</source>
+ <translation>Qt-ról</translation>
+ </message>
+ <message>
+ <location line="-512"/>
+ <source>Help</source>
+ <translation>Súgó</translation>
+ </message>
+ <message>
+ <location line="-1099"/>
+ <source>Show Details...</source>
+ <translation>Részletek megjelenítése...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide Details...</source>
+ <translation>Részletek elrejtése...</translation>
+ </message>
+</context>
+<context>
+ <name>QMultiInputContext</name>
+ <message>
+ <location filename="../src/plugins/inputmethods/imsw-multi/qmultiinputcontext.cpp" line="+88"/>
+ <source>Select IM</source>
+ <translation>IM kiválasztása</translation>
+ </message>
+</context>
+<context>
+ <name>QMultiInputContextPlugin</name>
+ <message>
+ <location filename="../src/plugins/inputmethods/imsw-multi/qmultiinputcontextplugin.cpp" line="+95"/>
+ <source>Multiple input method switcher</source>
+ <translation>Összetett beviteli eljárás kapcsoló</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Multiple input method switcher that uses the context menu of the text widgets</source>
+ <translation>Összetett beviteli eljárás kapcsoló, ami a szöveg widgetek menü összefüggéseit használja</translation>
+ </message>
+</context>
+<context>
+ <name>QNativeSocketEngine</name>
+ <message>
+ <location filename="../src/network/socket/qnativesocketengine.cpp" line="+206"/>
+ <source>The remote host closed the connection</source>
+ <translation>A távoli hoszt bezárta a kapcsolatot</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Network operation timed out</source>
+ <translation>Hálózati művelet időtúllépése</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Out of resources</source>
+ <translation>Kifogytak az erőforrások</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Unsupported socket operation</source>
+ <translation>Nem támogatott socket művelet</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Protocol type not supported</source>
+ <translation>Nem támogatott protokoll típus</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Invalid socket descriptor</source>
+ <translation>Érvénytelen socket leíró</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Network unreachable</source>
+ <translation>A hálózat nem elérhető</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Permission denied</source>
+ <translation>Engedély megtagadva</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Connection timed out</source>
+ <translation>Kapcsolat időtúllépés</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Connection refused</source>
+ <translation>Kapcsolat elutasítva</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The bound address is already in use</source>
+ <translation>A cím összeköttetés már használatban van</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The address is not available</source>
+ <translation>A cím nem elérhető</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The address is protected</source>
+ <translation>A cím védett</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Unable to send a message</source>
+ <translation>Nem lehet üzenetet küldeni</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Unable to receive a message</source>
+ <translation>Nem lehet megkapni az üzeneteket</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Unable to write</source>
+ <translation>Nem lehet írni</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Network error</source>
+ <translation>Hálózati hiba</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Another socket is already listening on the same port</source>
+ <translation>Egy másik socker már ugyanazon a porton figyel</translation>
+ </message>
+ <message>
+ <location line="-66"/>
+ <source>Unable to initialize non-blocking socket</source>
+ <translation>Nem lehet inicializálni egy nem blokkoló socketet</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Unable to initialize broadcast socket</source>
+ <translation>Nem lehet inicializálni a socket közvetítőt</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Attempt to use IPv6 socket on a platform with no IPv6 support</source>
+ <translation>IPv6 socket használatának kipróbálása olyan platformon, amelyik nem támogatja az IPv6-t</translation>
+ </message>
+ <message>
+ <location line="+21"/>
+ <source>Host unreachable</source>
+ <translation>A hoszt nem elérhető</translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>Datagram was too large to send</source>
+ <translation>A datagram túl nagy volt elküldésre</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Operation on non-socket</source>
+ <translation>Nem socketen végzett művelet</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Unknown error</source>
+ <translation>Ismeretlen hiba</translation>
+ </message>
+ <message>
+ <location line="-3"/>
+ <source>The proxy type is invalid for this operation</source>
+ <translation>A proxy típusa ismeretlen erre a műveletre</translation>
+ </message>
+</context>
+<context>
+ <name>QNetworkAccessCacheBackend</name>
+ <message>
+ <location filename="../src/network/access/qnetworkaccesscachebackend.cpp" line="+66"/>
+ <source>Error opening %1</source>
+ <translation>Hiba történt a(z) %1 megnyitása közben</translation>
+ </message>
+</context>
+<context>
+ <name>QNetworkAccessDebugPipeBackend</name>
+ <message>
+ <location filename="../src/network/access/qnetworkaccessdebugpipebackend.cpp" line="+195"/>
+ <source>Write error writing to %1: %2</source>
+ <translation>Ãrása hiba történt a(z) %1-be történÅ‘ írás közben: %2</translation>
+ </message>
+</context>
+<context>
+ <name>QNetworkAccessFileBackend</name>
+ <message>
+ <location filename="../src/network/access/qfilenetworkreply.cpp" line="+83"/>
+ <location filename="../src/network/access/qnetworkaccessfilebackend.cpp" line="+100"/>
+ <source>Request for opening non-local file %1</source>
+ <translation>Kérés a(z) %1 nem helyi fál megnyitására</translation>
+ </message>
+ <message>
+ <location line="+31"/>
+ <location filename="../src/network/access/qnetworkaccessfilebackend.cpp" line="+45"/>
+ <source>Error opening %1: %2</source>
+ <translation>Hiba történt a(z) %1 megnyitása közben: %2</translation>
+ </message>
+ <message>
+ <location filename="../src/network/access/qnetworkaccessfilebackend.cpp" line="+38"/>
+ <source>Write error writing to %1: %2</source>
+ <translation>Ãrási hiba történt a(z) %1-be írás közben: %2</translation>
+ </message>
+ <message>
+ <location filename="../src/network/access/qfilenetworkreply.cpp" line="-11"/>
+ <location filename="../src/network/access/qnetworkaccessfilebackend.cpp" line="+48"/>
+ <source>Cannot open %1: Path is a directory</source>
+ <translation>Nem lehet megnyitni a(z) %1-t: az útvonal egy könyvtár</translation>
+ </message>
+ <message>
+ <location filename="../src/network/access/qnetworkaccessfilebackend.cpp" line="+21"/>
+ <source>Read error reading from %1: %2</source>
+ <translation>Olvasási hiba történt a(z) %1-ból való olvasás közben: %2</translation>
+ </message>
+</context>
+<context>
+ <name>QNetworkAccessFtpBackend</name>
+ <message>
+ <location filename="../src/network/access/qnetworkaccessftpbackend.cpp" line="+131"/>
+ <source>No suitable proxy found</source>
+ <translation>Nem található megfelelő proxy</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Cannot open %1: is a directory</source>
+ <translation>Nem lehet megnyitni a(z) %1 t, mert az egy könyvtár</translation>
+ </message>
+ <message>
+ <location line="+112"/>
+ <source>Logging in to %1 failed: authentication required</source>
+ <translation>A(z) %1-be történő loggolás nem sikerült: hitelesítés szükséges</translation>
+ </message>
+ <message>
+ <location line="+39"/>
+ <source>Error while downloading %1: %2</source>
+ <translation>Hiba történt a(z) %1 letöltése közben: %2</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Error while uploading %1: %2</source>
+ <translation>Hiba történt a(z) %1 feltöltése közben: %2</translation>
+ </message>
+</context>
+<context>
+ <name>QNetworkAccessHttpBackend</name>
+ <message>
+ <location filename="../src/network/access/qnetworkaccesshttpbackend.cpp" line="+585"/>
+ <source>No suitable proxy found</source>
+ <translation>Nem található megfelelő proxy</translation>
+ </message>
+</context>
+<context>
+ <name>QNetworkReply</name>
+ <message>
+ <location line="+95"/>
+ <source>Error downloading %1 - server replied: %2</source>
+ <translation>Hiba történt a(z) %1 letöltése közben - a szerver válasza: %2</translation>
+ </message>
+ <message>
+ <location filename="../src/network/access/qnetworkreplyimpl.cpp" line="+77"/>
+ <source>Protocol &quot;%1&quot; is unknown</source>
+ <translation>A(z) &apos;%1&apos; protokoll ismeretlen</translation>
+ </message>
+</context>
+<context>
+ <name>QNetworkReplyImpl</name>
+ <message>
+ <location line="+519"/>
+ <location line="+28"/>
+ <source>Operation canceled</source>
+ <translation>Művelet visszavonása</translation>
+ </message>
+</context>
+<context>
+ <name>QOCIDriver</name>
+ <message>
+ <location filename="../src/sql/drivers/oci/qsql_oci.cpp" line="+2083"/>
+ <source>Unable to logon</source>
+ <translation>Nem lehet bejelentkezni</translation>
+ </message>
+ <message>
+ <location line="-144"/>
+ <source>Unable to initialize</source>
+ <comment>QOCIDriver</comment>
+ <translation>Nem lehet inicializálni</translation>
+ </message>
+ <message>
+ <location line="+215"/>
+ <source>Unable to begin transaction</source>
+ <translation>Nem lehet megkezdeni a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Unable to commit transaction</source>
+ <translation>Nem lehet kommitolni a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Unable to rollback transaction</source>
+ <translation>Nem lehet visszagörgetni a tranzakciót</translation>
+ </message>
+</context>
+<context>
+ <name>QOCIResult</name>
+ <message>
+ <location line="-979"/>
+ <location line="+168"/>
+ <location line="+15"/>
+ <source>Unable to bind column for batch execute</source>
+ <translation>Nem lehet összekötni az oszlopot köteg végrehajtásra</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Unable to execute batch statement</source>
+ <translation>Nem lehet végrehajtani a köteg állítást</translation>
+ </message>
+ <message>
+ <location line="+304"/>
+ <source>Unable to goto next</source>
+ <translation>Nem lehet a következőre ugrani</translation>
+ </message>
+ <message>
+ <location line="+59"/>
+ <source>Unable to alloc statement</source>
+ <translation>Nem lehet helyet lefoglalni az állításnak</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Unable to prepare statement</source>
+ <translation>Nem lehet felkészülni a műveletre</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>Unable to get statement type</source>
+ <translation>Nem lehet megszerezni az állítás típusát</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Unable to bind value</source>
+ <translation>Nem lehet összekötni az értéket</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Unable to execute statement</source>
+ <translation>Nem lehet végrehajtani az állítást</translation>
+ </message>
+</context>
+<context>
+ <name>QODBCDriver</name>
+ <message>
+ <location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="+1790"/>
+ <source>Unable to connect</source>
+ <translation>Nem lehet kapcsolódni</translation>
+ </message>
+ <message>
+ <location line="+238"/>
+ <source>Unable to disable autocommit</source>
+ <translation>Nem lehet letiltani az automatikus kommitolást</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Unable to commit transaction</source>
+ <translation>Nem lehet kommitolni a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Unable to rollback transaction</source>
+ <translation>Nem lehet visszagörgetni a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Unable to enable autocommit</source>
+ <translation>Nem lehet engedélyezni az automatikus kommitolást</translation>
+ </message>
+ <message>
+ <location line="-281"/>
+ <source>Unable to connect - Driver doesn&apos;t support all functionality required</source>
+ <translation>Nem lehet csatlakozni- A vezérlő nem támogatja az összes szükséges funkciót</translation>
+ </message>
+</context>
+<context>
+ <name>QODBCResult</name>
+ <message>
+ <location line="-932"/>
+ <location line="+346"/>
+ <source>QODBCResult::reset: Unable to set &apos;SQL_CURSOR_STATIC&apos; as statement attribute. Please check your ODBC driver configuration</source>
+ <translation>QODBCEredmény::Visszaállítás: Nen lehet beállítani az &apos;SQL_CURSOR_STATIC&apos; állítás attribútumra. Kérem ellenőrizze le az ODBC vezérlő konfigurációt</translation>
+ </message>
+ <message>
+ <location line="-329"/>
+ <location line="+623"/>
+ <source>Unable to execute statement</source>
+ <translation>Nem lehet végrehajtani az állítást</translation>
+ </message>
+ <message>
+ <location line="-547"/>
+ <source>Unable to fetch next</source>
+ <translation>Nem lehet letölteni a következőt</translation>
+ </message>
+ <message>
+ <location line="+271"/>
+ <source>Unable to prepare statement</source>
+ <translation>Nem lehet felkészülni az állításra</translation>
+ </message>
+ <message>
+ <location line="+268"/>
+ <source>Unable to bind variable</source>
+ <translation>Nem lehet összekötni a változót</translation>
+ </message>
+ <message>
+ <location filename="../src/sql/drivers/db2/qsql_db2.cpp" line="+190"/>
+ <location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="-467"/>
+ <location line="+576"/>
+ <source>Unable to fetch last</source>
+ <translation>Nem lehet letölteni az utolsót</translation>
+ </message>
+ <message>
+ <location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="-670"/>
+ <source>Unable to fetch</source>
+ <translation>Nem lehet letölteni</translation>
+ </message>
+ <message>
+ <location line="+44"/>
+ <source>Unable to fetch first</source>
+ <translation>Nem letölteni az elsőt</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Unable to fetch previous</source>
+ <translation>Nem lehet letölteni az előzőt</translation>
+ </message>
+</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="../src/network/kernel/qhostinfo_unix.cpp" line="-97"/>
+ <source>Invalid hostname</source>
+ <translation>Érvénytelen hoszt név</translation>
+ </message>
+ <message>
+ <location filename="../src/network/access/qnetworkaccessdatabackend.cpp" line="+74"/>
+ <source>Operation not supported on %1</source>
+ <translation>A művelet nem támogatott a(z) %1-n</translation>
+ </message>
+ <message>
+ <location line="+57"/>
+ <source>Invalid URI: %1</source>
+ <translation>Érvénytelen URI: %1</translation>
+ </message>
+ <message>
+ <location filename="../src/network/access/qnetworkaccessdebugpipebackend.cpp" line="+60"/>
+ <source>Socket error on %1: %2</source>
+ <translation>Socket hiba a(z) %1-n: %2</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Remote host closed the connection prematurely on %1</source>
+ <translation>A távoli hoszt túl korán bezárta a kapcsolatot a(z) %1-n</translation>
+ </message>
+ <message>
+ <location filename="../src/network/kernel/qhostinfo.cpp" line="+175"/>
+ <location filename="../src/network/kernel/qhostinfo_unix.cpp" line="+0"/>
+ <source>No host name given</source>
+ <translation>Nincs hoszt név megadva</translation>
+ </message>
+</context>
+<context>
+ <name>QPPDOptionsModel</name>
+ <message>
+ <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="+1197"/>
+ <source>Name</source>
+ <translation>Név</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Value</source>
+ <translation>Érték</translation>
+ </message>
+</context>
+<context>
+ <name>QPSQLDriver</name>
+ <message>
+ <location filename="../src/sql/drivers/psql/qsql_psql.cpp" line="+782"/>
+ <source>Unable to connect</source>
+ <translation>Nem lehet csatlakozni</translation>
+ </message>
+ <message>
+ <location line="+49"/>
+ <source>Could not begin transaction</source>
+ <translation>Nem sikerült megkezdeni a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>Could not commit transaction</source>
+ <translation>Nem lehet kommitolni a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Could not rollback transaction</source>
+ <translation>Nem lehet visszagörgetni a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+374"/>
+ <source>Unable to subscribe</source>
+ <translation>Nem lehet feliratkozni</translation>
+ </message>
+ <message>
+ <location line="+32"/>
+ <source>Unable to unsubscribe</source>
+ <translation>Nem lehet leiratkozni</translation>
+ </message>
+</context>
+<context>
+ <name>QPSQLResult</name>
+ <message>
+ <location line="-1085"/>
+ <source>Unable to create query</source>
+ <translation>Nem lehet létrehozni a lekérdezést</translation>
+ </message>
+ <message>
+ <location line="+372"/>
+ <source>Unable to prepare statement</source>
+ <translation>Nem lehet felkészülni az állításra</translation>
+ </message>
+</context>
+<context>
+ <name>QPageSetupWidget</name>
+ <message>
+ <location filename="../src/gui/dialogs/qpagesetupdialog_unix.cpp" line="+304"/>
+ <source>Centimeters (cm)</source>
+ <translation>Centiméter (cm)</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Millimeters (mm)</source>
+ <translation>Milliméter (mm)</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Inches (in)</source>
+ <translation>Incs (in)</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Points (pt)</source>
+ <translation>Pont (pt)</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qpagesetupwidget.ui"/>
+ <source>Form</source>
+ <translation></translation>
+ </message>
+ <message>
+ <location/>
+ <source>Paper</source>
+ <translation>Papír</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Page size:</source>
+ <translation>Lap méret:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Width:</source>
+ <translation>Szélesség:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Height:</source>
+ <translation>Magasság:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Paper source:</source>
+ <translation>Papír forrás:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Orientation</source>
+ <translation>Elhelyezkedés</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Portrait</source>
+ <translation>Portré</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Landscape</source>
+ <translation>Tájkép</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Reverse landscape</source>
+ <translation>Fordított tájkép</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Reverse portrait</source>
+ <translation>Fordított portré</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Margins</source>
+ <translation>Margó</translation>
+ </message>
+ <message>
+ <location/>
+ <source>top margin</source>
+ <translation>Felső margó</translation>
+ </message>
+ <message>
+ <location/>
+ <source>left margin</source>
+ <translation>Bal margó</translation>
+ </message>
+ <message>
+ <location/>
+ <source>right margin</source>
+ <translation>Jobb margó</translation>
+ </message>
+ <message>
+ <location/>
+ <source>bottom margin</source>
+ <translation>Alsó margó</translation>
+ </message>
+</context>
+<context>
+ <name>QPluginLoader</name>
+ <message>
+ <location filename="../src/corelib/plugin/qpluginloader.cpp" line="+24"/>
+ <source>Unknown error</source>
+ <translation>Ismeretlen hiba</translation>
+ </message>
+ <message>
+ <location line="-113"/>
+ <source>The plugin was not loaded.</source>
+ <translation>A beépülő modult nem sikerült betölteni.</translation>
+ </message>
+</context>
+<context>
+ <name>QPrintDialog</name>
+ <message>
+ <location filename="../src/gui/painting/qprinterinfo_unix.cpp" line="+108"/>
+ <source>locally connected</source>
+ <translation>Helyileg csatlakoztatva</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <location line="+225"/>
+ <source>Aliases: %1</source>
+ <translation>Ãlnevek: %1</translation>
+ </message>
+ <message>
+ <location line="+225"/>
+ <location line="+199"/>
+ <source>unknown</source>
+ <translation>ismeretlen</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qprintdialog_win.cpp" line="+266"/>
+ <source>OK</source>
+ <translation>OK</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qprintdialog_qws.cpp" line="+375"/>
+ <source>Print all</source>
+ <translation>Az összes kinyomtatása</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Print range</source>
+ <translation>Egy tartomány kinyomtatása</translation>
+ </message>
+ <message>
+ <location line="-48"/>
+ <source>A0 (841 x 1189 mm)</source>
+ <translation>A0 (841 x 1189 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A1 (594 x 841 mm)</source>
+ <translation>A1 (594 x 841 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A2 (420 x 594 mm)</source>
+ <translation>A2 (420 x 594 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A3 (297 x 420 mm)</source>
+ <translation>A3 (297 x 420 mm)</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>A5 (148 x 210 mm)</source>
+ <translation>A5 (148 x 210 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A6 (105 x 148 mm)</source>
+ <translation>A6 (105 x 148 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A7 (74 x 105 mm)</source>
+ <translation>A7 (74 x 105 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A8 (52 x 74 mm)</source>
+ <translation>A8 (52 x 74 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A9 (37 x 52 mm)</source>
+ <translation>A9 (37 x 52 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B0 (1000 x 1414 mm)</source>
+ <translation>B0 (1000 x 1414 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B1 (707 x 1000 mm)</source>
+ <translation>B1 (707 x 1000 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B2 (500 x 707 mm)</source>
+ <translation>B2 (500 x 707 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B3 (353 x 500 mm)</source>
+ <translation>B3 (353 x 500 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B4 (250 x 353 mm)</source>
+ <translation>B4 (250 x 353 mm)</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>B6 (125 x 176 mm)</source>
+ <translation>B6 (125 x 176 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B7 (88 x 125 mm)</source>
+ <translation>B7 (88 x 125 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B8 (62 x 88 mm)</source>
+ <translation>B8 (62 x 88 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B9 (44 x 62 mm)</source>
+ <translation>B9 (44 x 62 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B10 (31 x 44 mm)</source>
+ <translation>B10 (31 x 44 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>C5E (163 x 229 mm)</source>
+ <translation>C5E (163 x 229 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>DLE (110 x 220 mm)</source>
+ <translation>DLE (110 x 220 mm)</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Folio (210 x 330 mm)</source>
+ <translation>Fólió (210 x 330 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Ledger (432 x 279 mm)</source>
+ <translation>Főkönyv (432 x 279 mm)</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Tabloid (279 x 432 mm)</source>
+ <translation>Tabletta (279 x 432 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>US Common #10 Envelope (105 x 241 mm)</source>
+ <translation>US közös #10 bélyeg (105 x 241 mm)</translation>
+ </message>
+ <message>
+ <location line="-25"/>
+ <source>A4 (210 x 297 mm, 8.26 x 11.7 inches)</source>
+ <translation>A4 (210 x 297 mm, 8.26 x 11.7 inches)</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>B5 (176 x 250 mm, 6.93 x 9.84 inches)</source>
+ <translation>B5 (176 x 250 mm, 6.93 x 9.84 inches)</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Executive (7.5 x 10 inches, 191 x 254 mm)</source>
+ <translation>Vezető (7.5 x 10 inches, 191 x 254 mm)</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Legal (8.5 x 14 inches, 216 x 356 mm)</source>
+ <translation>Legális (8.5 x 14 inches, 216 x 356 mm)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Letter (8.5 x 11 inches, 216 x 279 mm)</source>
+ <translation>Levél (8.5 x 11 inches, 216 x 279 mm)</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Print selection</source>
+ <translation>Nyomtatási kiválasztás</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qabstractprintdialog.cpp" line="+112"/>
+ <location line="+13"/>
+ <location filename="../src/gui/dialogs/qprintdialog_win.cpp" line="-2"/>
+ <source>Print</source>
+ <translation>Nyomtatás</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="-359"/>
+ <source>Print To File ...</source>
+ <translation>Fájlba nyomtatás ...</translation>
+ </message>
+ <message>
+ <location line="+82"/>
+ <source>File %1 is not writable.
+Please choose a different file name.</source>
+ <translation>A(z) %1 fájl nem írható.
+Kérem válasszon különböző fájl nevet.</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>%1 already exists.
+Do you want to overwrite it?</source>
+ <translation>A(z) %1 már létezik.
+Felül szeretné írni?</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qprintdialog_qws.cpp" line="-228"/>
+ <source>File exists</source>
+ <translation>Fájl létezik</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&lt;qt&gt;Do you want to overwrite it?&lt;/qt&gt;</source>
+ <translation>&lt;qt&gt;Felül szeretné írni?&lt;/qt&gt;</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="-8"/>
+ <source>%1 is a directory.
+Please choose a different file name.</source>
+ <translation>A(z) %1 egy könyvtár.
+Kérem válasszon egy különböző fájl nevet.</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qprintdialog_win.cpp" line="+1"/>
+ <source>The &apos;From&apos; value cannot be greater than the &apos;To&apos; value.</source>
+ <translation>A &apos;-Tól&apos; érték nem lehet nagyobb az &apos;-Ig&apos; értéknél.</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qpagesetupdialog_unix.cpp" line="-232"/>
+ <source>A0</source>
+ <translation>A0</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A1</source>
+ <translation>A1</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A2</source>
+ <translation>A2</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A3</source>
+ <translation>A3</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A4</source>
+ <translation>A4</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A5</source>
+ <translation>A5</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A6</source>
+ <translation>A6</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A7</source>
+ <translation>A7</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A8</source>
+ <translation>A8</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A9</source>
+ <translation>A9</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B0</source>
+ <translation>B0</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B1</source>
+ <translation>B1</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B2</source>
+ <translation>B2</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B3</source>
+ <translation>B3</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B4</source>
+ <translation>B4</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B5</source>
+ <translation>B5</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B6</source>
+ <translation>B6</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B7</source>
+ <translation>B7</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B8</source>
+ <translation>B8</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B9</source>
+ <translation>B9</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>B10</source>
+ <translation>B10</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>C5E</source>
+ <translation>C5E</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>DLE</source>
+ <translation>DLE</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Executive</source>
+ <translation>Vezető</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Folio</source>
+ <translation>Fólió</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Ledger</source>
+ <translation>Főkönyv</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Legal</source>
+ <translation>Legális</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Letter</source>
+ <translation>Levél</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Tabloid</source>
+ <translation>Tabletta</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>US Common #10 Envelope</source>
+ <translation>US közös #10 bélyeg</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Custom</source>
+ <translation>Egyéni</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="-523"/>
+ <location line="+68"/>
+ <source>&amp;Options &gt;&gt;</source>
+ <translation>&amp;Opciók &gt;&gt;</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>&amp;Options &lt;&lt;</source>
+ <translation>&amp;Opciók &lt;&lt;</translation>
+ </message>
+ <message>
+ <location line="+253"/>
+ <source>Print to File (PDF)</source>
+ <translation>Fájlba nyomtatás (PDF)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Print to File (Postscript)</source>
+ <translation>Fájlba nyomtatás (Postscript)</translation>
+ </message>
+ <message>
+ <location line="+47"/>
+ <source>Local file</source>
+ <translation>Helyi fájl</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Write %1 file</source>
+ <translation>%1 fájlba írás</translation>
+ </message>
+ <message>
+ <location line="-369"/>
+ <source>&amp;Print</source>
+ <translation>&amp;Nyomtatás</translation>
+ </message>
+</context>
+<context>
+ <name>QPrintPreviewDialog</name>
+ <message>
+ <location filename="../src/gui/dialogs/qprintpreviewdialog.cpp" line="+246"/>
+ <source>%1%</source>
+ <translation>%1%</translation>
+ </message>
+ <message>
+ <location line="+68"/>
+ <source>Print Preview</source>
+ <translation>Nyomtatási előnézet</translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>Next page</source>
+ <translation>Következő lap</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Previous page</source>
+ <translation>Előző lap</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>First page</source>
+ <translation>Első lap</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Last page</source>
+ <translation>Utolsó lap</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Fit width</source>
+ <translation>Megfelelő szélesség</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Fit page</source>
+ <translation>Megfelelő lap</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Zoom in</source>
+ <translation>Nagyítás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Zoom out</source>
+ <translation>Kicsinyítés</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Portrait</source>
+ <translation>Portré</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Landscape</source>
+ <translation>Tájkép</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Show single page</source>
+ <translation>Egyetlen lap megjelenítése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Show facing pages</source>
+ <translation>Lapok megjelenítése szemből</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Show overview of all pages</source>
+ <translation>Az összes lap áttekintésének megjelenítése</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Print</source>
+ <translation>Nyomtatás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Page setup</source>
+ <translation>Lap beállítás</translation>
+ </message>
+ <message>
+ <location line="+150"/>
+ <source>Export to PDF</source>
+ <translation>PDF-be exportálás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Export to PostScript</source>
+ <translation>PostScript-be exportálás</translation>
+ </message>
+ <message>
+ <location filename="../src/gui/dialogs/qabstractpagesetupdialog.cpp" line="+68"/>
+ <location line="+12"/>
+ <source>Page Setup</source>
+ <translation>Lap beállítás</translation>
+ </message>
+</context>
+<context>
+ <name>QPrintPropertiesWidget</name>
+ <message>
+ <location filename="../src/gui/dialogs/qprintpropertieswidget.ui"/>
+ <source>Form</source>
+ <translation>Forma</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Page</source>
+ <translation>Lap</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Advanced</source>
+ <translation>Speciális</translation>
+ </message>
+</context>
+<context>
+ <name>QPrintSettingsOutput</name>
+ <message>
+ <location filename="../src/gui/dialogs/qprintsettingsoutput.ui"/>
+ <source>Form</source>
+ <translation>Forma</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Copies</source>
+ <translation>Másolás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Print range</source>
+ <translation>Tartomány nyomtatása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Print all</source>
+ <translation>Az összes nyomtatása</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Pages from</source>
+ <translation>Lapok ettől</translation>
+ </message>
+ <message>
+ <location/>
+ <source>to</source>
+ <translation>eddig</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Selection</source>
+ <translation>Kiválasztás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Output Settings</source>
+ <translation>Kimeneti beállítások</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Copies:</source>
+ <translation>Másolatok:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Collate</source>
+ <translation>Egyeztet</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Reverse</source>
+ <translation>Fordítva</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Options</source>
+ <translation>Opciók</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Color Mode</source>
+ <translation>Színes mód</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Color</source>
+ <translation>Szín</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Grayscale</source>
+ <translation>Szürkeárnyalat</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Duplex Printing</source>
+ <translation>Dupla nyomtatás</translation>
+ </message>
+ <message>
+ <location/>
+ <source>None</source>
+ <translation>Semmi</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Long side</source>
+ <translation>Hosszú oldal</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Short side</source>
+ <translation>Rövid oldal</translation>
+ </message>
+</context>
+<context>
+ <name>QPrintWidget</name>
+ <message>
+ <location filename="../src/gui/dialogs/qprintwidget.ui"/>
+ <source>Form</source>
+ <translation>Å°rlap</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Printer</source>
+ <translation>Nyomtató</translation>
+ </message>
+ <message>
+ <location/>
+ <source>&amp;Name:</source>
+ <translation>&amp;Név:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>P&amp;roperties</source>
+ <translation>Tu&amp;lajdonságok</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Location:</source>
+ <translation>Elhelyezkedés:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Preview</source>
+ <translation>Előnézet</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Type:</source>
+ <translation>Típus:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>Output &amp;file:</source>
+ <translation>Kimeneti &amp;fájl:</translation>
+ </message>
+ <message>
+ <location/>
+ <source>...</source>
+ <translation>...</translation>
+ </message>
+</context>
+<context>
+ <name>QProcess</name>
+ <message>
+ <location filename="../src/corelib/io/qprocess_unix.cpp" line="+406"/>
+ <location filename="../src/corelib/io/qprocess_win.cpp" line="+137"/>
+ <source>Could not open input redirection for reading</source>
+ <translation>Nem sikerült megnyitni a bevitel olvasásra irányítását</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <location filename="../src/corelib/io/qprocess_win.cpp" line="+20"/>
+ <source>Could not open output redirection for writing</source>
+ <translation>Nem sikerült megnyitni a kimenet írásra irányítását</translation>
+ </message>
+ <message>
+ <location line="+239"/>
+ <source>Resource error (fork failure): %1</source>
+ <translation>Erőforrás hiba (Szétágazás hiba): %1</translation>
+ </message>
+ <message>
+ <location line="+258"/>
+ <location line="+52"/>
+ <location line="+74"/>
+ <location line="+66"/>
+ <location filename="../src/corelib/io/qprocess_win.cpp" line="+406"/>
+ <location line="+50"/>
+ <location line="+75"/>
+ <location line="+42"/>
+ <location line="+54"/>
+ <source>Process operation timed out</source>
+ <translation>Folyamat művelet időtúllépés</translation>
+ </message>
+ <message>
+ <location filename="../src/corelib/io/qprocess.cpp" line="+855"/>
+ <location line="+52"/>
+ <location filename="../src/corelib/io/qprocess_win.cpp" line="-211"/>
+ <location line="+50"/>
+ <source>Error reading from process</source>
+ <translation>Hiba történt a folyamat olvasása közben</translation>
+ </message>
+ <message>
+ <location line="+47"/>
+ <location line="+826"/>
+ <location filename="../src/corelib/io/qprocess_win.cpp" line="+140"/>
+ <source>Error writing to process</source>
+ <translation>Hiba történt a folyamat írása közben</translation>
+ </message>
+ <message>
+ <location line="-756"/>
+ <source>Process crashed</source>
+ <translation>A folyamat összeomlott</translation>
+ </message>
+ <message>
+ <location line="+959"/>
+ <source>No program defined</source>
+ <translation>Nincs program definiálva</translation>
+ </message>
+ <message>
+ <location filename="../src/corelib/io/qprocess_win.cpp" line="-360"/>
+ <source>Process failed to start: %1</source>
+ <translation>Nem sikerült elindítani a folyamatot: %1</translation>
+ </message>
+</context>
+<context>
+ <name>QProgressDialog</name>
+ <message>
+ <location filename="../src/gui/dialogs/qprogressdialog.cpp" line="+196"/>
+ <source>Cancel</source>
+ <translation>Mégse</translation>
+ </message>
+</context>
+<context>
+ <name>QPushButton</name>
+ <message>
+ <location filename="../src/plugins/accessible/widgets/simplewidgets.cpp" line="-8"/>
+ <source>Open</source>
+ <translation>Megnyitás</translation>
+ </message>
+</context>
+<context>
+ <name>QRadioButton</name>
+ <message>
+ <location line="+12"/>
+ <source>Check</source>
+ <translation>Ellenőrzés</translation>
+ </message>
+</context>
+<context>
+ <name>QRegExp</name>
+ <message>
+ <location filename="../src/corelib/tools/qregexp.cpp" line="+65"/>
+ <source>no error occurred</source>
+ <translation>nem történt hiba</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>disabled feature used</source>
+ <translation>tiltás tulajdonság használva</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>bad char class syntax</source>
+ <translation>rossz karakter osztály szintakszis</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>bad lookahead syntax</source>
+ <translation>rossz előreolvasási szintakszis</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>bad repetition syntax</source>
+ <translation>rossz ismétlési szintakszis</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>invalid octal value</source>
+ <translation>érvénytelen oktális érték</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>missing left delim</source>
+ <translation>hiányzó bal határolójel</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>unexpected end</source>
+ <translation>váratlan vég</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>met internal limit</source>
+ <translation>találkozott belső korlát</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>invalid interval</source>
+ <translation>érvénytelen intervallum</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>invalid category</source>
+ <translation>érvénytelen kategória</translation>
+ </message>
+</context>
+<context>
+ <name>QSQLite2Driver</name>
+ <message>
+ <location filename="../src/sql/drivers/sqlite2/qsql_sqlite2.cpp" line="+391"/>
+ <source>Error opening database</source>
+ <translation>Hiba történt az adatbázis megnyitása közben</translation>
+ </message>
+ <message>
+ <location line="+41"/>
+ <source>Unable to begin transaction</source>
+ <translation>Nem lehet elkezdeni a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Unable to commit transaction</source>
+ <translation>Nem lehet kommitolni a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Unable to rollback transaction</source>
+ <translation>Nem lehet visszagörgetni a tranzakciót</translation>
+ </message>
+</context>
+<context>
+ <name>QSQLite2Result</name>
+ <message>
+ <location line="-319"/>
+ <source>Unable to fetch results</source>
+ <translation>Nem lehet letölteni az eredményeket</translation>
+ </message>
+ <message>
+ <location line="+143"/>
+ <source>Unable to execute statement</source>
+ <translation>Nem lehet végrehajtani az állítást</translation>
+ </message>
+</context>
+<context>
+ <name>QSQLiteDriver</name>
+ <message>
+ <location filename="../src/sql/drivers/sqlite/qsql_sqlite.cpp" line="+540"/>
+ <source>Error opening database</source>
+ <translation>Hiba történt az adatbázis megnyitása közben</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Error closing database</source>
+ <translation>Hiba történt az adatbázis bezárása közben</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Unable to begin transaction</source>
+ <translation>Nem lehet elkezdeni a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Unable to commit transaction</source>
+ <translation>Nem lehet kommitolni a tranzakciót</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Unable to rollback transaction</source>
+ <translation>Nem lehet visszagörgetni a tranzakciót</translation>
+ </message>
+</context>
+<context>
+ <name>QSQLiteResult</name>
+ <message>
+ <location line="-404"/>
+ <location line="+62"/>
+ <location line="+8"/>
+ <source>Unable to fetch row</source>
+ <translation>Nem lehet leszedni a sort</translation>
+ </message>
+ <message>
+ <location line="+59"/>
+ <source>Unable to execute statement</source>
+ <translation>Nem lehet végrehajtani az állítást</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Unable to reset statement</source>
+ <translation>Nem lehet visszaállítani az állítást</translation>
+ </message>
+ <message>
+ <location line="+45"/>
+ <source>Unable to bind parameters</source>
+ <translation>Nem lehet összekötni a paramétereket</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Parameter count mismatch</source>
+ <translation>A paraméter számláló nem megfelelő</translation>
+ </message>
+ <message>
+ <location line="-200"/>
+ <source>No query</source>
+ <translation>Nincs lekérdezés</translation>
+ </message>
+</context>
+<context>
+ <name>QScriptBreakpointsModel</name>
+ <message>
+ <location filename="../src/scripttools/debugging/qscriptbreakpointsmodel.cpp" line="+455"/>
+ <source>ID</source>
+ <translation>Azonosító</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Location</source>
+ <translation>Elhelyezkedés</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Condition</source>
+ <translation>Feltétel</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Ignore-count</source>
+ <translation>Számítás mellőzése</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Single-shot</source>
+ <translation>Egylövetű</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Hit-count</source>
+ <translation>Leütés számítás</translation>
+ </message>
+</context>
+<context>
+ <name>QScriptBreakpointsWidget</name>
+ <message>
+ <location filename="../src/scripttools/debugging/qscriptbreakpointswidget.cpp" line="+298"/>
+ <source>New</source>
+ <translation>Új</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Delete</source>
+ <translation>Törlés</translation>
+ </message>
+</context>
+<context>
+ <name>QScriptDebugger</name>
+ <message>
+ <location filename="../src/scripttools/debugging/qscriptdebugger.cpp" line="+885"/>
+ <location line="+1013"/>
+ <source>Go to Line</source>
+ <translation>Ugrás erre a sorra</translation>
+ </message>
+ <message>
+ <location line="-1012"/>
+ <source>Line:</source>
+ <translation>Sor:</translation>
+ </message>
+ <message>
+ <location line="+791"/>
+ <source>Interrupt</source>
+ <translation>Megszakítás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Shift+F5</source>
+ <translation>Shift+F5</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Continue</source>
+ <translation>Folytatás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>F5</source>
+ <translation>F5</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Step Into</source>
+ <translation>Belelépés</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>F11</source>
+ <translation>F11</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Step Over</source>
+ <translation>Ãtlépés</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>F10</source>
+ <translation>F10</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Step Out</source>
+ <translation>Kilép</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Shift+F11</source>
+ <translation>Shift+F11</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Run to Cursor</source>
+ <translation>Kurzorra futás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Ctrl+F10</source>
+ <translation>Ctrl+F10</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Run to New Script</source>
+ <translation>Az új Szkriptre futás</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Toggle Breakpoint</source>
+ <translation>Töréspont kapcsolgatása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>F9</source>
+ <translation>F9</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Clear Debug Output</source>
+ <translation>Debug kimenet kiürítése</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Clear Error Log</source>
+ <translation>Error Log kiürítése</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Clear Console</source>
+ <translation>Konzol kiürítése</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>&amp;Find in Script...</source>
+ <translation>Szkriptben &amp;keresés...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Ctrl+F</source>
+ <translation>Ctrl+F</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Find &amp;Next</source>
+ <translation>&amp;Következő keresése</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>F3</source>
+ <translation>F3</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Find &amp;Previous</source>
+ <translation>&amp;Előző keresése</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Shift+F3</source>
+ <translation>Shift+F3</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Ctrl+G</source>
+ <translation>Ctrl+G</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Debug</source>
+ <translation>Debug</translation>
+ </message>
+</context>
+<context>
+ <name>QScriptDebuggerCodeFinderWidget</name>
+ <message>
+ <location filename="../src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp" line="+141"/>
+ <source>Close</source>
+ <translation>Bezárás</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Previous</source>
+ <translation>Előző</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Next</source>
+ <translation>Következő</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Case Sensitive</source>
+ <translation>Kis és nagybetű érzékeny</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Whole words</source>
+ <translation>Egész szavakat</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>&lt;img src=&quot;:/qt/scripttools/debugging/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
+ <translation>&lt;img src=&quot;:/qt/scripttools/debugging/images/wrap.png&quot;&gt;&amp;nbsp;Keresés tördelve</translation>
+ </message>
+</context>
+<context>
+ <name>QScriptDebuggerLocalsModel</name>
+ <message>
+ <location filename="../src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp" line="+872"/>
+ <source>Name</source>
+ <translation>Név</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Value</source>
+ <translation>Érték</translation>
+ </message>
+</context>
+<context>
+ <name>QScriptDebuggerStackModel</name>
+ <message>
+ <location filename="../src/scripttools/debugging/qscriptdebuggerstackmodel.cpp" line="+161"/>
+ <source>Level</source>
+ <translation>Szint</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Name</source>
+ <translation>Név</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Location</source>
+ <translation>Elhelyezkedés</translation>
+ </message>
+</context>
+<context>
+ <name>QScriptEdit</name>
+ <message>
+ <location filename="../src/scripttools/debugging/qscriptedit.cpp" line="+411"/>
+ <source>Toggle Breakpoint</source>
+ <translation>Töréspont kapcsolgatása</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Disable Breakpoint</source>
+ <translation>Töréspont tiltása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Enable Breakpoint</source>
+ <translation>Töréspont engedélyezése</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Breakpoint Condition:</source>
+ <translation>Töréspont feltétel:</translation>
+ </message>
+</context>
+<context>
+ <name>QScriptEngineDebugger</name>
+ <message>
+ <location filename="../src/scripttools/debugging/qscriptenginedebugger.cpp" line="+523"/>
+ <source>Loaded Scripts</source>
+ <translation>Betöltött szkriptek</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Breakpoints</source>
+ <translation>Töréspontok</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Stack</source>
+ <translation>Verem</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Locals</source>
+ <translation>Helyi változók</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Console</source>
+ <translation>Konzol</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Debug Output</source>
+ <translation>Debug kimenet</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Error Log</source>
+ <translation>Hiba Log</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Search</source>
+ <translation>Keresés</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>View</source>
+ <translation>Nézet</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Qt Script Debugger</source>
+ <translation>Qt szkript debugger</translation>
+ </message>
+</context>
+<context>
+ <name>QScriptNewBreakpointWidget</name>
+ <message>
+ <location filename="../src/scripttools/debugging/qscriptbreakpointswidget.cpp" line="-223"/>
+ <source>Close</source>
+ <translation>Bezárás</translation>
+ </message>
+</context>
+<context>
+ <name>QScrollBar</name>
+ <message>
+ <location filename="../src/gui/widgets/qscrollbar.cpp" line="+454"/>
+ <source>Scroll here</source>
+ <translation>Görgetés itt</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Left edge</source>
+ <translation>Bal szegély</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Top</source>
+ <translation>Tető</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Right edge</source>
+ <translation>Jobb szegély</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Bottom</source>
+ <translation>Alja</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Page left</source>
+ <translation>Lapzoás balra</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="+143"/>
+ <source>Page up</source>
+ <translation>Lapozás felfele</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Page right</source>
+ <translation>Lapozás jobbra</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="+4"/>
+ <source>Page down</source>
+ <translation>Lapozás lefele</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Scroll left</source>
+ <translation>Görgetés balra</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Scroll up</source>
+ <translation>Görgetés felfele</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Scroll right</source>
+ <translation>Görgetés jobbra</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Scroll down</source>
+ <translation>Görgetés lefele</translation>
+ </message>
+ <message>
+ <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="-6"/>
+ <source>Line up</source>
+ <translation>Egy sorral feljebb</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Position</source>
+ <translation>Pozíció</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Line down</source>
+ <translation>Egy sorral lejjebb</translation>
+ </message>
+</context>
+<context>
+ <name>QSharedMemory</name>
+ <message>
+ <location filename="../src/corelib/kernel/qsharedmemory.cpp" line="+304"/>
+ <source>%1: create size is less then 0</source>
+ <translation>%1: 0-nál kisebb méret létrehozása</translation>
+ </message>
+ <message>
+ <location line="+168"/>
+ <location filename="../src/corelib/kernel/qsharedmemory_p.h" line="+155"/>
+ <source>%1: unable to lock</source>
+ <translation>%1: Nem lehet zárolni</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>%1: unable to unlock</source>
+ <translation>%1: Nem lehet kinyitni</translation>
+ </message>
+ <message>
+ <location filename="../src/corelib/kernel/qsharedmemory_symbian.cpp" line="+83"/>
+ <location filename="../src/corelib/kernel/qsharedmemory_unix.cpp" line="+79"/>
+ <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+87"/>
+ <source>%1: permission denied</source>
+ <translation>%1: engedély megtagadva</translation>
+ </message>
+ <message>
+ <location line="-16"/>
+ <location filename="../src/corelib/kernel/qsharedmemory_unix.cpp" line="+4"/>
+ <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="-22"/>
+ <source>%1: already exists</source>
+ <translation>%1: már létezik</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>%1: doesn&apos;t exists</source>
+ <translation>%1: nem létezik</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <location filename="../src/corelib/kernel/qsharedmemory_unix.cpp" line="+10"/>
+ <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+18"/>
+ <source>%1: out of resources</source>
+ <translation>%1: Kifogyott az erőforrásból</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <location filename="../src/corelib/kernel/qsharedmemory_unix.cpp" line="+4"/>
+ <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+7"/>
+ <source>%1: unknown error %2</source>
+ <translation>%1: ismeretlen hiba %2</translation>
+ </message>
+ <message>
+ <location filename="../src/corelib/kernel/qsharedmemory_unix.cpp" line="+21"/>
+ <source>%1: key is empty</source>
+ <translation>%1: Ãœres kulcs</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>%1: ftok failed</source>
+ <translation>%1: ftok hiba</translation>
+ </message>
+ <message>
+ <location filename="../src/corelib/kernel/qsharedmemory_symbian.cpp" line="+56"/>
+ <location filename="../src/corelib/kernel/qsharedmemory_unix.cpp" line="+51"/>
+ <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+15"/>
+ <source>%1: unable to make key</source>
+ <translation>%1: Nem lehet kulcsot csinálni</translation>
+ </message>
+ <message>
+ <location filename="../src/corelib/kernel/qsharedmemory_unix.cpp" line="-97"/>
+ <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="-31"/>
+ <source>%1: doesn&apos;t exist</source>
+ <translation>%1: nem létezik</translation>
+ </message>
+ <message>
+ <location line="+39"/>
+ <source>%1: UNIX key file doesn&apos;t exist</source>
+ <translation>%1: UNIX kulcs fájl nem létezik</translation>
+ </message>
+ <message>
+ <location line="+78"/>
+ <source>%1: system-imposed size restrictions</source>
+ <translation>%1: a rendszer rárakott méretének korlátozásai</translation>
+ </message>
+ <message>
+ <location line="+53"/>
+ <source>%1: not attached</source>
+ <translation>%1: nincs hozzácsatolva</translation>
+ </message>
+ <message>
+ <location filename="../src/corelib/kernel/qsharedmemory_symbian.cpp" line="-67"/>
+ <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+4"/>
+ <source>%1: invalid size</source>
+ <translation>%1: érvénytelen méret</translation>
+ </message>
+ <message>
+ <location line="+40"/>
+ <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+63"/>
+ <source>%1: key error</source>
+ <translation>%1: kulcs hiba</translation>
+ </message>
+ <message>
+ <location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+32"/>
+ <source>%1: size query failed</source>
+ <translation>%1: méret lekérdezési hiba</translation>
+ </message>
+ <message>
+ <location filename="../src/corelib/kernel/qsharedmemory.cpp" line="-271"/>
+ <source>%1: unable to set key on lock</source>
+ <translation>%1: nem lehet beállítani a kulcsot a záron</translation>
+ </message>
+</context>
+<context>
+ <name>QShortcut</name>
+ <message>
+ <location filename="../src/gui/kernel/qkeysequence.cpp" line="+393"/>
+ <source>Space</source>
+ <translation>Space</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Esc</source>
+ <translation>Esc</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Tab</source>
+ <translation>Tab</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Backtab</source>
+ <translation>Backtab</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Backspace</source>
+ <translation>Backspace</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Return</source>
+ <translation>Return</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Enter</source>
+ <translation>Enter</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Ins</source>
+ <translation>Ins</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Del</source>
+ <translation>Del</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Pause</source>
+ <translation>Pause</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Print</source>
+ <translation>Print</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>SysReq</source>
+ <translation>SysReq</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Home</source>
+ <translation>Home</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>End</source>
+ <translation>End</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Left</source>
+ <translation>Left</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Up</source>
+ <translation>Up</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Right</source>
+ <translation>Right</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Down</source>
+ <translation>Down</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>PgUp</source>
+ <translation>PgUp</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>PgDown</source>
+ <translation>PgDown</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>CapsLock</source>
+ <translation>CapsLock</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>NumLock</source>
+ <translation>NumLock</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>ScrollLock</source>
+ <translation>ScrollLock</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Menu</source>
+ <translation>Menü</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Help</source>
+ <translation>Súgó</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Back</source>
+ <translation>Vissza</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Forward</source>
+ <translation>Előre</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Stop</source>
+ <translation>Leállítás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Refresh</source>
+ <translation>Felfrissítés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Volume Down</source>
+ <translation>Hangerő lehalkítása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Volume Mute</source>
+ <translation>Hangerő Elnémítás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Volume Up</source>
+ <translation>Hangerő hangosítása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Bass Boost</source>
+ <translation>Basszus erősítés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Bass Up</source>
+ <translation>Basszus növelése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Bass Down</source>
+ <translation>Basszus csökkentése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Treble Up</source>
+ <translation>Felháromszorozás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Treble Down</source>
+ <translation>Leharmadolás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Media Play</source>
+ <translation>Média elindítása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Media Stop</source>
+ <translation>Média leállítása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Media Previous</source>
+ <translation>Előző média</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Media Next</source>
+ <translation>Következő média</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Media Record</source>
+ <translation>Média felvétel</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Favorites</source>
+ <translation>Kedvcencek</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Search</source>
+ <translation>Keresés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Standby</source>
+ <translation>Készenlét</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Open URL</source>
+ <translation>URL megnyitása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Launch Mail</source>
+ <translation>Mail indítása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Launch Media</source>
+ <translation>Média indítása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Launch (0)</source>
+ <translation>Elindítás (0)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Launch (1)</source>
+ <translation>Elindítás (1)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Launch (2)</source>
+ <translation>Elindítás (2)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Launch (3)</source>
+ <translation>Elindítás (3)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Launch (4)</source>
+ <translation>Elindítás (4)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Launch (5)</source>
+ <translation>Elindítás (5)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Launch (6)</source>
+ <translation>Elindítás (6)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Launch (7)</source>
+ <translation>Elindítás (7)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Launch (8)</source>
+ <translation>Elindítás (8)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Launch (9)</source>
+ <translation>Elindítás (9)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Launch (A)</source>
+ <translation>Elindítás (A)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Launch (B)</source>
+ <translation>Elindítás (B)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Launch (C)</source>
+ <translation>Elindítás (C)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Launch (D)</source>
+ <translation>Elindítás (D)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Launch (E)</source>
+ <translation>Elindítás (E)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Launch (F)</source>
+ <translation>Elindítás (F)</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Monitor Brightness Up</source>
+ <translation>Monitorfény növelése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Monitor Brightness Down</source>
+ <translation>Monitorfény csökkentése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Keyboard Light On/Off</source>
+ <translation>Billentyű világítás be/ki</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Keyboard Brightness Up</source>
+ <translation>Billentyűfény növelése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Keyboard Brightness Down</source>
+ <translation>Billentyűfény csökkentése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Power Off</source>
+ <translation>Kikapcsolás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Wake Up</source>
+ <translation>Felébresztés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Eject</source>
+ <translation>Kidobás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Screensaver</source>
+ <translation>Képernyővédő</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>WWW</source>
+ <translation>WWW</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Sleep</source>
+ <translation>Alvás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>LightBulb</source>
+ <translation>Villanykörte</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Shop</source>
+ <translation>Bolt</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>History</source>
+ <translation>Történelem</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Add Favorite</source>
+ <translation>Hozzáadás a kedvencekhez</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hot Links</source>
+ <translation>Hot linkek</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Adjust Brightness</source>
+ <translation>Fényszabályozás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Finance</source>
+ <translation>Pénzügy</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Community</source>
+ <translation>Közösség</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Audio Rewind</source>
+ <translation>Audió áttekercselés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Back Forward</source>
+ <translation>Előre hátra</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Application Left</source>
+ <translation>Alkalmazás balra</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Application Right</source>
+ <translation>Alkalmazás jobbra</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Book</source>
+ <translation>Könyv</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>CD</source>
+ <translation>CD</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Calculator</source>
+ <translation>Számológép</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Clear</source>
+ <translation>Tiszta</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Clear Grab</source>
+ <translation>Tiszta megmarkolás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Close</source>
+ <translation>Bezárás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy</source>
+ <translation>Másolás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Cut</source>
+ <translation>Kivágás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Display</source>
+ <translation>Megjelenítés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>DOS</source>
+ <translation>DOS</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Documents</source>
+ <translation>Dokumentumok</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Spreadsheet</source>
+ <translation>Táblázatkezelő</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Browser</source>
+ <translation>Böngésző</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Game</source>
+ <translation>Játék</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Go</source>
+ <translation>Gyerünk</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>iTouch</source>
+ <translation>iTouch</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Logoff</source>
+ <translation>Kijelentkezés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Market</source>
+ <translation>Piac</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Meeting</source>
+ <translation>Találkozó</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Keyboard Menu</source>
+ <translation>Billlentyű menü</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Menu PB</source>
+ <translation>PB menü</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>My Sites</source>
+ <translation>Oldalam</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>News</source>
+ <translation>Hírek</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Home Office</source>
+ <translation>Otthoni iroda</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Option</source>
+ <translation>Opció</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Paste</source>
+ <translation>Beillesztés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Phone</source>
+ <translation>Telefon</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Reply</source>
+ <translation>Válasz</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Reload</source>
+ <translation>Újratöltés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Rotate Windows</source>
+ <translation>Ablakok forgatása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Rotation PB</source>
+ <translation>PB forgatás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Rotation KB</source>
+ <translation>KB forgatás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Save</source>
+ <translation>Mentés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Send</source>
+ <translation>Küldés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Spellchecker</source>
+ <translation>Helyesírás ellenőrző</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Split Screen</source>
+ <translation>Képernyő felosztása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Support</source>
+ <translation>Támogatás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Task Panel</source>
+ <translation>Feladat panel</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Terminal</source>
+ <translation>Terminál</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Tools</source>
+ <translation>Eszközök</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Travel</source>
+ <translation>Utazás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Video</source>
+ <translation>Videó</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Word Processor</source>
+ <translation>Szó feldolgozó</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>XFer</source>
+ <translation>XFer</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Zoom In</source>
+ <translation>Nagyítás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Zoom Out</source>
+ <translation>Kicsinyítés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Away</source>
+ <translation>Távol</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Messenger</source>
+ <translation>Hírnök</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>WebCam</source>
+ <translation>WebCam</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Mail Forward</source>
+ <translation>Mail továbbítása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Pictures</source>
+ <translation>Képek</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Music</source>
+ <translation>Zene</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Battery</source>
+ <translation>Elem</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Bluetooth</source>
+ <translation>Bluetooth</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Wireless</source>
+ <translation>Vezeték nélküli</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Ultra Wide Band</source>
+ <translation>Ultra széles sáv</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Audio Forward</source>
+ <translation>Audio továbbítás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Audio Repeat</source>
+ <translation>Audió ismétlés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Audio Random Play</source>
+ <translation>Audió véletlenszerű lejátszása</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Subtitle</source>
+ <translation>Alcím</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Audio Cycle Track</source>
+ <translation>Audió ciklikus követése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Time</source>
+ <translation>Idő</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>View</source>
+ <translation>Nézet</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Top Menu</source>
+ <translation>Felső menü</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Suspend</source>
+ <translation>Felfüggesztés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hibernate</source>
+ <translation>Hibernálás</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Print Screen</source>
+ <translation>Képernyő másolás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Page Up</source>
+ <translation>Feljebb lapozás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Page Down</source>
+ <translation>Lejjebb lapozás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Caps Lock</source>
+ <translation>Caps Lock</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Num Lock</source>
+ <translation>Num Lock</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Number Lock</source>
+ <translation>Number Lock</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Scroll Lock</source>
+ <translation>Scroll Lock</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Insert</source>
+ <translation>Insert</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Delete</source>
+ <translation>Delete</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Escape</source>
+ <translation>Escape</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>System Request</source>
+ <translation>System Request</translation>
+ </message>
+ <message>
+ <location line="-18"/>
+ <location line="+22"/>
+ <source>Select</source>
+ <translation>Kiválsztás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Yes</source>
+ <translation>Igen</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>No</source>
+ <translation>Nem</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Context1</source>
+ <translation>Tartalom1</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Context2</source>
+ <translation>Tartalom2</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Context3</source>
+ <translation>Tartalom3</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Context4</source>
+ <translation>Tartalom4</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Call</source>
+ <translation>Hívás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hangup</source>
+ <translation>Felfüggeszt</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Flip</source>
+ <translation>Feldobás</translation>
+ </message>
+ <message>
+ <location line="+573"/>
+ <location line="+135"/>
+ <source>Ctrl</source>
+ <translation>Ctrl</translation>
+ </message>
+ <message>
+ <location line="-134"/>
+ <location line="+138"/>
+ <source>Shift</source>
+ <translation>Shift</translation>
+ </message>
+ <message>
+ <location line="-137"/>
+ <location line="+135"/>
+ <source>Alt</source>
+ <translation>Alt</translation>
+ </message>
+ <message>
+ <location line="-134"/>
+ <location line="+130"/>
+ <source>Meta</source>
+ <translation>Meta</translation>
+ </message>
+ <message>
+ <location line="-40"/>
+ <source>+</source>
+ <translation>+</translation>
+ </message>
+ <message>
+ <location line="+61"/>
+ <source>F%1</source>
+ <translation>F%1</translation>
+ </message>
+ <message>
+ <location line="-869"/>
+ <source>Home Page</source>
+ <translation>Honlap</translation>
+ </message>
+</context>
+<context>
+ <name>QSlider</name>
+ <message>
+ <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="+151"/>
+ <source>Page left</source>
+ <translation>Lapozás balra</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Page up</source>
+ <translation>Lapozás felfele</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Position</source>
+ <translation>Pozíció</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Page right</source>
+ <translation>Lapozás jobbra</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Page down</source>
+ <translation>Lapozás lefele</translation>
+ </message>
+</context>
+<context>
+ <name>QSocks5SocketEngine</name>
+ <message>
+ <location filename="../src/network/socket/qsocks5socketengine.cpp" line="-67"/>
+ <source>Connection to proxy refused</source>
+ <translation>Proxyhoz kapcsolódás elutasítva</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Connection to proxy closed prematurely</source>
+ <translation>A proxyhoz való csatlakozás túl korán be lett zárva</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Proxy host not found</source>
+ <translation>Proxy hoszt nem található</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Connection to proxy timed out</source>
+ <translation>Proxyhoz való csatlakozásnál időtúllépés történt</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Proxy authentication failed</source>
+ <translation>Proxy hitelesítési hiba</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Proxy authentication failed: %1</source>
+ <translation>Proxy hitelesítési hiba: %1</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>SOCKS version 5 protocol error</source>
+ <translation>SOCKS verzió 5-s protokoll hiba</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>General SOCKSv5 server failure</source>
+ <translation>Ãltalános SOCKSv5 szerver hiba</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Connection not allowed by SOCKSv5 server</source>
+ <translation>A csatlakozást nem engedi a SOCKSv5 szerver</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>TTL expired</source>
+ <translation>Lejárt a TTL</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>SOCKSv5 command not supported</source>
+ <translation>SOCKSv5 parancs nincs támogatva</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Address type not supported</source>
+ <translation>Cím típus nincs támogatva</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Unknown SOCKSv5 proxy error code 0x%1</source>
+ <translation>Ismeretlen SOCKSv5 proxy hiba kód 0x%1</translation>
+ </message>
+ <message>
+ <location line="+689"/>
+ <source>Network operation timed out</source>
+ <translation>Hálózat műveleti időtúllépés</translation>
+ </message>
+</context>
+<context>
+ <name>QSoftKeyManager</name>
+ <message>
+ <location filename="../src/gui/kernel/qsoftkeymanager.cpp" line="+79"/>
+ <source>Ok</source>
+ <translation>Ok</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Select</source>
+ <translation>Kiválasztás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Done</source>
+ <translation>Kész</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Options</source>
+ <translation>Opciók</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Cancel</source>
+ <translation>Mégse</translation>
+ </message>
+ <message>
+ <location line="+172"/>
+ <source>Exit</source>
+ <translation>Kilépés</translation>
+ </message>
+</context>
+<context>
+ <name>QSpinBox</name>
+ <message>
+ <location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="-574"/>
+ <source>More</source>
+ <translation>Több</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Less</source>
+ <translation>Kevés</translation>
+ </message>
+</context>
+<context>
+ <name>QSql</name>
+ <message>
+ <location filename="../src/qt3support/sql/q3sqlmanager_p.cpp" line="+890"/>
+ <source>Delete</source>
+ <translation>Törlés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Delete this record?</source>
+ <translation>Törölni szeretné ezt a felvételt?</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <location line="+16"/>
+ <location line="+36"/>
+ <source>Yes</source>
+ <translation>Igen</translation>
+ </message>
+ <message>
+ <location line="-51"/>
+ <location line="+16"/>
+ <location line="+36"/>
+ <source>No</source>
+ <translation>Nem</translation>
+ </message>
+ <message>
+ <location line="-44"/>
+ <source>Insert</source>
+ <translation>Beszúrás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Update</source>
+ <translation>Frissítés</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Save edits?</source>
+ <translation>Szerkesztések mentése?</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Cancel</source>
+ <translation>Mégse</translation>
+ </message>
+ <message>
+ <location line="+32"/>
+ <source>Confirm</source>
+ <translation>Megerősítés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Cancel your edits?</source>
+ <translation>Szerkesztések visszavonása?</translation>
+ </message>
+</context>
+<context>
+ <name>QSslSocket</name>
+ <message>
+ <location filename="../src/network/ssl/qsslsocket_openssl.cpp" line="+546"/>
+ <source>Unable to write data: %1</source>
+ <translation>Nem lehet adatot írni: %1</translation>
+ </message>
+ <message>
+ <location line="+119"/>
+ <source>Error while reading: %1</source>
+ <translation>Hiba történt olvasás közben: %1</translation>
+ </message>
+ <message>
+ <location line="+96"/>
+ <source>Error during SSL handshake: %1</source>
+ <translation>Hiba történt az SSL kézfogás közben: %1</translation>
+ </message>
+ <message>
+ <location line="-501"/>
+ <source>Error creating SSL context (%1)</source>
+ <translation>Hiba történt az SSL összefüggés (%1) létrehozása közben</translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>Invalid or empty cipher list (%1)</source>
+ <translation>Érvénytelen vagy üres számjegy lista (%1)</translation>
+ </message>
+ <message>
+ <location line="+42"/>
+ <source>Private key does not certify public key, %1</source>
+ <translation>A privát kulcs nem igazolja a publikus kulcsot, %1</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Error creating SSL session, %1</source>
+ <translation>Hiba történt az SSL szakasz létrehozása közben, %1</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Error creating SSL session: %1</source>
+ <translation>Hiba történt az SSL szakasz létrehozása közben: %1</translation>
+ </message>
+ <message>
+ <location line="-61"/>
+ <source>Cannot provide a certificate with no key, %1</source>
+ <translation>Nem lehet biztosítani egy igazolást kulcs nélkül, %1</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Error loading local certificate, %1</source>
+ <translation>Hiba történt a helyi igazolás betöltése közben, %1</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Error loading private key, %1</source>
+ <translation>Hiba történt a privát kulcs betöltése közben, %1</translation>
+ </message>
+ <message>
+ <location filename="../src/network/ssl/qsslerror.cpp" line="+213"/>
+ <source>No error</source>
+ <translation>Nincs hiba</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The issuer certificate could not be found</source>
+ <translation>A problémás igazolás nem található</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The certificate signature could not be decrypted</source>
+ <translation>Az igazolás aláírás titkosítását nem sikerült feloldani</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The public key in the certificate could not be read</source>
+ <translation>Az igazolásban található publikus kulcsot nem sikerült olvasni</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The signature of the certificate is invalid</source>
+ <translation>Az igazolás aláírása érvénytelen</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The certificate is not yet valid</source>
+ <translation>Az igazolás még nem érvényes</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The certificate has expired</source>
+ <translation>Az igazolás lejárt</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The certificate&apos;s notBefore field contains an invalid time</source>
+ <translation>A mező érvénytelen idő tartalmazása előtt nincsen igazolás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The certificate&apos;s notAfter field contains an invalid time</source>
+ <translation>A mező érvénytelen idő tartalmazása után nincsen igazolás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The certificate is self-signed, and untrusted</source>
+ <translation>Az igazolás ön jelölt, és megbízhatatlan</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The root certificate of the certificate chain is self-signed, and untrusted</source>
+ <translation>Az igazolás lánc rendszergazda igazolása ön jelölt és megbízhatatlan</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The issuer certificate of a locally looked up certificate could not be found</source>
+ <translation>Egy helyileg utánanézett igazolás problémás igazolása nem található</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>No certificates could be verified</source>
+ <translation>Nem sikerült igazolást leellenőrizni</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>One of the CA certificates is invalid</source>
+ <translation>A CA igazolások egyike érvénytelen</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The basicConstraints path length parameter has been exceeded</source>
+ <translation>Az alap megszorítási útvonal hossz paramétereket meghaladták</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The supplied certificate is unsuitable for this purpose</source>
+ <translation>A szolgáltatott igazolás nem alkalmas erre a célra</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The root CA certificate is not trusted for this purpose</source>
+ <translation>A rendszergazda CA igazolás nem megbízható erre a célra</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The root CA certificate is marked to reject the specified purpose</source>
+ <translation>A rendszergazda CA igazolás a specializást cél megtagadására lett megjelölve</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The current candidate issuer certificate was rejected because its subject name did not match the issuer name of the current certificate</source>
+ <translation>Az aktuális jelölt problémás igazolása meg lett tagadva, mert a téma neve nem egyezett az aktuális igazolás problémás nevével</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>The current candidate issuer certificate was rejected because its issuer name and serial number was present and did not match the authority key identifier of the current certificate</source>
+ <translation>Az aktuális jelölt problémás igazolása el lett utasítva, mert a problémás név és sorszám benyűjtva és nem egyezett az aktuális igazolás hitelesítési kulcs azonosítójával</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>The peer did not present any certificate</source>
+ <translation>A kortárs nem nyújtott be egyetlen igazolást sem</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The host name did not match any of the valid hosts for this certificate</source>
+ <translation>A hoszt név nem egyezik egyetlen érvényes hoszttal sem erre az igazolásra</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Unknown error</source>
+ <translation>Ismeretlen hiba</translation>
+ </message>
+</context>
+<context>
+ <name>QStateMachine</name>
+ <message>
+ <location filename="../src/corelib/statemachine/qstatemachine.cpp" line="+1028"/>
+ <source>Missing initial state in compound state &apos;%1&apos;</source>
+ <translation>Hiányzó kezdeti állapot összetett helyzetben &apos;%1&apos;</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Missing default state in history state &apos;%1&apos;</source>
+ <translation>Hiányzó alapértelmezett állapot a történelmi állapotokban &apos;%1&apos;</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>No common ancestor for targets and source of transition from state &apos;%1&apos;</source>
+ <translation>Nincs közös őse az átmeneti céloknak és forrásnak a(z) &apos;%1&apos; helyzetből</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Unknown error</source>
+ <translation>Ismeretlen hiba</translation>
+ </message>
+</context>
+<context>
+ <name>QSystemSemaphore</name>
+ <message>
+ <location filename="../src/corelib/kernel/qsystemsemaphore_unix.cpp" line="-46"/>
+ <source>%1: does not exist</source>
+ <translation>%1 : nem létezik</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <location filename="../src/corelib/kernel/qsystemsemaphore_win.cpp" line="+66"/>
+ <source>%1: out of resources</source>
+ <translation>%1: kifogyott az erőforrásból</translation>
+ </message>
+ <message>
+ <location line="-13"/>
+ <location filename="../src/corelib/kernel/qsystemsemaphore_win.cpp" line="+4"/>
+ <source>%1: permission denied</source>
+ <translation>%1: Engedély megtagadva</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>%1: already exists</source>
+ <translation>%1: már létezik</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <location filename="../src/corelib/kernel/qsystemsemaphore_win.cpp" line="+3"/>
+ <source>%1: unknown error %2</source>
+ <translation>%1: ismeretlen hiba %2</translation>
+ </message>
+</context>
+<context>
+ <name>QTDSDriver</name>
+ <message>
+ <location filename="../src/sql/drivers/tds/qsql_tds.cpp" line="+595"/>
+ <source>Unable to open connection</source>
+ <translation>Nem lehet megnyitni a kapcsolatot</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Unable to use database</source>
+ <translation>Nem lehet az adatbázist használni</translation>
+ </message>
+</context>
+<context>
+ <name>QTabBar</name>
+ <message>
+ <location filename="../src/plugins/accessible/widgets/complexwidgets.cpp" line="-326"/>
+ <source>Scroll Left</source>
+ <translation>Görgetés balra</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Scroll Right</source>
+ <translation>Görgetésre jobbra</translation>
+ </message>
+</context>
+<context>
+ <name>QTcpServer</name>
+ <message>
+ <location filename="../src/network/socket/qtcpserver.cpp" line="+282"/>
+ <source>Operation on socket is not supported</source>
+ <translation>A socketen végzett művelet nem támogatott</translation>
+ </message>
+</context>
+<context>
+ <name>QTextControl</name>
+ <message>
+ <location filename="../src/gui/text/qtextcontrol.cpp" line="+2024"/>
+ <source>&amp;Undo</source>
+ <translation>&amp;Visszavonás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>&amp;Redo</source>
+ <translation>&amp;Megismétlés</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Cu&amp;t</source>
+ <translation>&amp;Kivágás</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>&amp;Copy</source>
+ <translation>&amp;Másolás</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Copy &amp;Link Location</source>
+ <translation>&amp;Link címének másolása</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>&amp;Paste</source>
+ <translation>&amp;Beillesztés</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Delete</source>
+ <translation>Törlés</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Select All</source>
+ <translation>Az összes kiválasztása</translation>
+ </message>
+</context>
+<context>
+ <name>QToolButton</name>
+ <message>
+ <location filename="../src/plugins/accessible/widgets/simplewidgets.cpp" line="+310"/>
+ <location line="+6"/>
+ <source>Press</source>
+ <translation>Megnyomás</translation>
+ </message>
+ <message>
+ <location line="-4"/>
+ <location line="+8"/>
+ <source>Open</source>
+ <translation>Megnyitás</translation>
+ </message>
+</context>
+<context>
+ <name>QUdpSocket</name>
+ <message>
+ <location filename="../src/network/socket/qudpsocket.cpp" line="+179"/>
+ <source>This platform does not support IPv6</source>
+ <translation>Ez a platform nem támogatja az IPv6-t</translation>
+ </message>
+</context>
+<context>
+ <name>QUndoGroup</name>
+ <message>
+ <location filename="../src/gui/util/qundogroup.cpp" line="+385"/>
+ <source>Undo</source>
+ <translation>Visszavonás</translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <source>Redo</source>
+ <translation>Megismétlés</translation>
+ </message>
+</context>
+<context>
+ <name>QUndoModel</name>
+ <message>
+ <location filename="../src/gui/util/qundoview.cpp" line="+101"/>
+ <source>&lt;empty&gt;</source>
+ <translation>&lt;üres&gt;</translation>
+ </message>
+</context>
+<context>
+ <name>QUndoStack</name>
+ <message>
+ <location filename="../src/gui/util/qundostack.cpp" line="+832"/>
+ <source>Undo</source>
+ <translation>Visszavonás</translation>
+ </message>
+ <message>
+ <location line="+27"/>
+ <source>Redo</source>
+ <translation>Megismétlés</translation>
+ </message>
+</context>
+<context>
+ <name>QUnicodeControlCharacterMenu</name>
+ <message>
+ <location filename="../src/gui/text/qtextcontrol.cpp" line="+899"/>
+ <source>LRM Left-to-right mark</source>
+ <translation>LRM balról jobbra jelölés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>RLM Right-to-left mark</source>
+ <translation>RLM jobbról balra jelölés</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>ZWJ Zero width joiner</source>
+ <translation>ZWJ Nulla szélességű asztalos</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>ZWNJ Zero width non-joiner</source>
+ <translation>ZWNJ Nulla szélességű nem asztalos</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>ZWSP Zero width space</source>
+ <translation>ZWSP Nulla szélességű hely</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>LRE Start of left-to-right embedding</source>
+ <translation>LRE Balról jobbra beágyazás kezdete</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>RLE Start of right-to-left embedding</source>
+ <translation>RLE Jobbról balra beágyazás kezdete</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>LRO Start of left-to-right override</source>
+ <translation>LRO Balról jobbra megsemmisítés kezdete</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>RLO Start of right-to-left override</source>
+ <translation>RLO Jobbról balra megsemmisítés kezdete</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>PDF Pop directional formatting</source>
+ <translation>PDF Kérirányú formázás benézése</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Insert Unicode control character</source>
+ <translation>Unicode vezérlő karakter beszúrása</translation>
+ </message>
+</context>
+<context>
+ <name>QWebFrame</name>
+ <message>
+ <location filename="../src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp" line="+712"/>
+ <source>Request cancelled</source>
+ <translation>Kérés visszavonva</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Request blocked</source>
+ <translation>Kérés blokkolva</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Cannot show URL</source>
+ <translation>Nem lehet megjeleníteni az URL-t</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Frame load interrupted by policy change</source>
+ <translation>Irányvonal megváltozása miatt a szerkezet töltése megszakítva</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Cannot show mimetype</source>
+ <translation>Nem lehet megjeleníteni mime típust</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>File does not exist</source>
+ <translation>A fájl nem létezik</translation>
+ </message>
+</context>
+<context>
+ <name>QWebPage</name>
+ <message>
+ <location filename="../src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp" line="+42"/>
+ <source>Submit</source>
+ <comment>default label for Submit buttons in forms on web pages</comment>
+ <translation>Feltöltés</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Submit</source>
+ <comment>Submit (input element) alt text for &lt;input&gt; elements with no alt, title, or value</comment>
+ <translation>Feltöltés</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Reset</source>
+ <comment>default label for Reset buttons in forms on web pages</comment>
+ <translation>Helyreállítás</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Choose File</source>
+ <comment>title for file button used in HTML forms</comment>
+ <translation>Fájl kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>No file selected</source>
+ <comment>text to display in file button used in HTML forms when no file is selected</comment>
+ <translation>Nincsen egyetlen fájl sem kiválasztva</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Open in New Window</source>
+ <comment>Open in New Window context menu item</comment>
+ <translation>Megnyitás új ablakban</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Save Link...</source>
+ <comment>Download Linked File context menu item</comment>
+ <translation>Link mentése...</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Copy Link</source>
+ <comment>Copy Link context menu item</comment>
+ <translation>Link másolása</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Open Image</source>
+ <comment>Open Image in New Window context menu item</comment>
+ <translation>Kép megnyitása</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Save Image</source>
+ <comment>Download Image context menu item</comment>
+ <translation>Kép elmentése</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Copy Image</source>
+ <comment>Copy Link context menu item</comment>
+ <translation>Kép másolása</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Open Frame</source>
+ <comment>Open Frame in New Window context menu item</comment>
+ <translation>Szerkezet megnyitása</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Copy</source>
+ <comment>Copy context menu item</comment>
+ <translation>Másolás</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Go Back</source>
+ <comment>Back context menu item</comment>
+ <translation>Menj vissza</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Go Forward</source>
+ <comment>Forward context menu item</comment>
+ <translation>Menj előre</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Stop</source>
+ <comment>Stop context menu item</comment>
+ <translation>Leállítás</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Reload</source>
+ <comment>Reload context menu item</comment>
+ <translation>Újratöltés</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Cut</source>
+ <comment>Cut context menu item</comment>
+ <translation>Kivágás</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Paste</source>
+ <comment>Paste context menu item</comment>
+ <translation>Beillesztés</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>No Guesses Found</source>
+ <comment>No Guesses Found context menu item</comment>
+ <translation>Nincs feltételezések találata</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Ignore</source>
+ <comment>Ignore Spelling context menu item</comment>
+ <translation>Mellőzés</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Add To Dictionary</source>
+ <comment>Learn Spelling context menu item</comment>
+ <translation>Hozzáadás a szótárhoz</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Search The Web</source>
+ <comment>Search The Web context menu item</comment>
+ <translation>Keresés a weben</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Look Up In Dictionary</source>
+ <comment>Look Up in Dictionary context menu item</comment>
+ <translation>Utánanézés szótárban</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Open Link</source>
+ <comment>Open Link context menu item</comment>
+ <translation>Link megnyitása</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Ignore</source>
+ <comment>Ignore Grammar context menu item</comment>
+ <translation>Mellőzés</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Spelling</source>
+ <comment>Spelling and Grammar context sub-menu item</comment>
+ <translation>Helyesírás</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Show Spelling and Grammar</source>
+ <comment>menu item title</comment>
+ <translation>Helyesírás és nyelvtan megjelenítése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide Spelling and Grammar</source>
+ <comment>menu item title</comment>
+ <translation>Helyesírás és nyelvtan elrejtése</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Check Spelling</source>
+ <comment>Check spelling context menu item</comment>
+ <translation>Helyesírás ellenőrzés</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Check Spelling While Typing</source>
+ <comment>Check spelling while typing context menu item</comment>
+ <translation>Helyesírás ellenőrzés gépelés közben</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Check Grammar With Spelling</source>
+ <comment>Check grammar with spelling context menu item</comment>
+ <translation>Nyelvtani ellenőrzés helyesírás ellenőrzéssel</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Fonts</source>
+ <comment>Font context sub-menu item</comment>
+ <translation>Betű</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Bold</source>
+ <comment>Bold context menu item</comment>
+ <translation>Félkövér</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Italic</source>
+ <comment>Italic context menu item</comment>
+ <translation>DÅ‘lt</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Underline</source>
+ <comment>Underline context menu item</comment>
+ <translation>Aláhúzás</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Outline</source>
+ <comment>Outline context menu item</comment>
+ <translation>Kontúrozás</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Direction</source>
+ <comment>Writing direction context sub-menu item</comment>
+ <translation>Irány összefüggések írás, menü elem</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Text Direction</source>
+ <comment>Text direction context sub-menu item</comment>
+ <translation>Szöveg irány</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Default</source>
+ <comment>Default writing direction context menu item</comment>
+ <translation>Alapértelmezett</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Left to Right</source>
+ <comment>Left to Right context menu item</comment>
+ <translation>Balról jobbra</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Right to Left</source>
+ <comment>Right to Left context menu item</comment>
+ <translation>Jobbról balra</translation>
+ </message>
+ <message>
+ <location line="+105"/>
+ <source>Loading...</source>
+ <comment>Media controller status message when the media is loading</comment>
+ <translation>Betöltés...</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Live Broadcast</source>
+ <comment>Media controller status message when watching a live broadcast</comment>
+ <translation>Élő bejelentés</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Audio Element</source>
+ <comment>Media controller element</comment>
+ <translation>Audió elem</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Video Element</source>
+ <comment>Media controller element</comment>
+ <translation>Videó elem</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Mute Button</source>
+ <comment>Media controller element</comment>
+ <translation>Elnémítás gomb</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Unmute Button</source>
+ <comment>Media controller element</comment>
+ <translation>Elnémítás megszűntetése gomb</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Play Button</source>
+ <comment>Media controller element</comment>
+ <translation>Lejátszás gomb</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Pause Button</source>
+ <comment>Media controller element</comment>
+ <translation>Szünet gomb</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Slider</source>
+ <comment>Media controller element</comment>
+ <translation>Csúszka</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Slider Thumb</source>
+ <comment>Media controller element</comment>
+ <translation>Csuszka ujj</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Rewind Button</source>
+ <comment>Media controller element</comment>
+ <translation>Ãttekercselés gomb</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Return to Real-time Button</source>
+ <comment>Media controller element</comment>
+ <translation>A valós idejűre visszatérés gomb</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Elapsed Time</source>
+ <comment>Media controller element</comment>
+ <translation>Eltelt idő</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Remaining Time</source>
+ <comment>Media controller element</comment>
+ <translation>Fennmaradó idő</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Status Display</source>
+ <comment>Media controller element</comment>
+ <translation>Státusz kijelzés</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Fullscreen Button</source>
+ <comment>Media controller element</comment>
+ <translation>Teljes képernyő gomb</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Seek Forward Button</source>
+ <comment>Media controller element</comment>
+ <translation>Keresés továbbítása gomb</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Seek Back Button</source>
+ <comment>Media controller element</comment>
+ <translation>Keresés visszafele gomb</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Audio element playback controls and status display</source>
+ <comment>Media controller element</comment>
+ <translation>Audió elem visszajátszás vezérlők és státusz kijelzés</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Video element playback controls and status display</source>
+ <comment>Media controller element</comment>
+ <translation>Videó elem visszajátszás vezérlők és státusz kijelzés</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Mute audio tracks</source>
+ <comment>Media controller element</comment>
+ <translation>Audió számok elnémítása</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Unmute audio tracks</source>
+ <comment>Media controller element</comment>
+ <translation>Audió számok elnémításának megszűntetése</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Begin playback</source>
+ <comment>Media controller element</comment>
+ <translation>Visszajátszás megkezdése</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Pause playback</source>
+ <comment>Media controller element</comment>
+ <translation>Visszajátszás szüneteltetése</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Movie time scrubber</source>
+ <comment>Media controller element</comment>
+ <translation>Film idő súroló</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Movie time scrubber thumb</source>
+ <comment>Media controller element</comment>
+ <translation>Film idő súrolókörte</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Rewind movie</source>
+ <comment>Media controller element</comment>
+ <translation>Film visszatekerése</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Return streaming movie to real-time</source>
+ <comment>Media controller element</comment>
+ <translation>Özönlő filmek visszaadása a valós idő számára</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Current movie time</source>
+ <comment>Media controller element</comment>
+ <translation>Az aktuális filmidő</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Remaining movie time</source>
+ <comment>Media controller element</comment>
+ <translation>Fennmaradó filmidő</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Current movie status</source>
+ <comment>Media controller element</comment>
+ <translation>Az aktuális film státusz</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Play movie in full-screen mode</source>
+ <comment>Media controller element</comment>
+ <translation>Film lejátszása teljes képernyős módban</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Seek quickly back</source>
+ <comment>Media controller element</comment>
+ <translation>Gyorsan visszafele keresés</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Seek quickly forward</source>
+ <comment>Media controller element</comment>
+ <translation>Gyorsan előre keresés</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Indefinite time</source>
+ <comment>Media time description</comment>
+ <translation>Bizonytalan idő</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>%1 days %2 hours %3 minutes %4 seconds</source>
+ <comment>Media time description</comment>
+ <translation>%1 nap %2 óra %3 perc %4 másodperc</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>%1 hours %2 minutes %3 seconds</source>
+ <comment>Media time description</comment>
+ <translation>%1 óra %2 perc %3 másodperc</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>%1 minutes %2 seconds</source>
+ <comment>Media time description</comment>
+ <translation>%1 perc %2 másodperc</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>%1 seconds</source>
+ <comment>Media time description</comment>
+ <translation>%1 másodperc</translation>
+ </message>
+ <message>
+ <location line="-210"/>
+ <source>Inspect</source>
+ <comment>Inspect Element context menu item</comment>
+ <translation>Megtekintés</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>No recent searches</source>
+ <comment>Label for only item in menu that appears when clicking on the search field image, when no searches have been performed</comment>
+ <translation>Nincsenek utóbbi keresések</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Recent searches</source>
+ <comment>label for first item in the menu that appears when clicking on the search field image, used as embedded menu title</comment>
+ <translation>Utóbbi keresések</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Clear recent searches</source>
+ <comment>menu item in Recent Searches menu that empties menu&apos;s contents</comment>
+ <translation>Utóbbi keresések kiürítése</translation>
+ </message>
+ <message>
+ <location line="+75"/>
+ <source>Unknown</source>
+ <comment>Unknown filesize FTP directory listing item</comment>
+ <translation>Ismeretlen</translation>
+ </message>
+ <message>
+ <location filename="../src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp" line="+167"/>
+ <source>Web Inspector - %2</source>
+ <translation>Web felügyelő - %2</translation>
+ </message>
+ <message>
+ <location filename="../src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp" line="+5"/>
+ <source>%1 (%2x%3 pixels)</source>
+ <comment>Title string for images</comment>
+ <translation>%1 (%2x%3 pixelek)</translation>
+ </message>
+ <message>
+ <location filename="../src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp" line="+412"/>
+ <source>Bad HTTP request</source>
+ <translation>Érvénytelen HTTP kérés</translation>
+ </message>
+ <message>
+ <location filename="../src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp" line="-291"/>
+ <source>This is a searchable index. Enter search keywords: </source>
+ <comment>text that appears at the start of nearly-obsolete web pages in the form of a &apos;searchable index&apos;</comment>
+ <translation>Ez egy kereshető index. Gépelje be a kívánt kulcsszavakat:</translation>
+ </message>
+ <message>
+ <location filename="../src/3rdparty/webkit/WebCore/platform/qt/ScrollbarQt.cpp" line="+58"/>
+ <source>Scroll here</source>
+ <translation>Görgetés ide</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Left edge</source>
+ <translation>Bal szegély</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Top</source>
+ <translation>Felül</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Right edge</source>
+ <translation>Jobb szegély</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Bottom</source>
+ <translation>Alul</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Page left</source>
+ <translation>Lapozás balra</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Page up</source>
+ <translation>Lapozás fel</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Page right</source>
+ <translation>Lapozás jobbra</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Page down</source>
+ <translation>Lapozás balra</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Scroll left</source>
+ <translation>Görgetés balra</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Scroll up</source>
+ <translation>Görgetés fel</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Scroll right</source>
+ <translation>Görgetés jobbra</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Scroll down</source>
+ <translation>Görgetés lefele</translation>
+ </message>
+ <message numerus="yes">
+ <location filename="../src/3rdparty/webkit/WebCore/platform/qt/FileChooserQt.cpp" line="+45"/>
+ <source>%n file(s)</source>
+ <comment>number of chosen file</comment>
+ <translation>
+ <numerusform>%n fájl</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location filename="../src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp" line="+1822"/>
+ <source>JavaScript Alert - %1</source>
+ <translation>JavaSzkript figyelmeztetés - %1</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>JavaScript Confirm - %1</source>
+ <translation>JavaSzkript megerősítés - %1</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>JavaScript Prompt - %1</source>
+ <translation>JavaSzkript prompt - %1</translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>JavaScript Problem - %1</source>
+ <translation>JavaSzkript probléma - %1</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>The script on this page appears to have a problem. Do you want to stop the script?</source>
+ <translation>Az ezen a lapon található szkriptnek úgy tűnik, hogy van egy problémája. Le szeretné állítani a szkriptet?</translation>
+ </message>
+ <message>
+ <location line="+381"/>
+ <source>Move the cursor to the next character</source>
+ <translation>Az egér mozgatása a következő karakterre</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Move the cursor to the previous character</source>
+ <translation>Az egér mozgatása az előző karakterre</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Move the cursor to the next word</source>
+ <translation>Az egér mozgatása a következő szóra</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Move the cursor to the previous word</source>
+ <translation>Az egér mozgatása az előző szóra</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Move the cursor to the next line</source>
+ <translation>Az egér mozgatása a következő sorra</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Move the cursor to the previous line</source>
+ <translation>Az egér mozgatása az előző sorra</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Move the cursor to the start of the line</source>
+ <translation>Az egér mozgatása a sor elejére</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Move the cursor to the end of the line</source>
+ <translation>Az egér mozgatása a sor végére</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Move the cursor to the start of the block</source>
+ <translation>Az egér mozgatása a blokk elejére</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Move the cursor to the end of the block</source>
+ <translation>Az egér mozgatása a blokk végére</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Move the cursor to the start of the document</source>
+ <translation>Az egér mozgatása a dokumentum elejére</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Move the cursor to the end of the document</source>
+ <translation>Az egér mozgatása a dokumentum végére</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Select all</source>
+ <translation>Az összes kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Select to the next character</source>
+ <translation>A következő karakter kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Select to the previous character</source>
+ <translation>Az előző karakter kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Select to the next word</source>
+ <translation>A következő szó kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Select to the previous word</source>
+ <translation>Az előző szó kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Select to the next line</source>
+ <translation>A következő sor kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Select to the previous line</source>
+ <translation>Az előző sor kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Select to the start of the line</source>
+ <translation>A sor elejének kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Select to the end of the line</source>
+ <translation>A sor végének kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Select to the start of the block</source>
+ <translation>A blokk elejének kiválsztása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Select to the end of the block</source>
+ <translation>A blokk végének kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Select to the start of the document</source>
+ <translation>A dokumentum elejének kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Select to the end of the document</source>
+ <translation>A dokumentum végének kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Delete to the start of the word</source>
+ <translation>A szó elejének törlése</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Delete to the end of the word</source>
+ <translation>A szó végének törlése</translation>
+ </message>
+ <message>
+ <location line="+33"/>
+ <source>Insert a new paragraph</source>
+ <translation>Egy új bekezdés beszúrása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Insert a new line</source>
+ <translation>Egy új sor beszúrása</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Paste and Match Style</source>
+ <translation>Stílus beillesztése és összepasszintása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Remove formatting</source>
+ <translation>Formázás eltávolítása</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Strikethrough</source>
+ <translation>Ãthúzás</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Subscript</source>
+ <translation>Alsó index</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Superscript</source>
+ <translation>Felső index</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Insert Bulleted List</source>
+ <translation>Hivatalos közlemény lista beszúrása</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Insert Numbered List</source>
+ <translation>Számozott lista beszúrása</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Indent</source>
+ <translation>Behúzás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Outdent</source>
+ <translation>Behúzás kifelé</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Center</source>
+ <translation>Közép</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Justify</source>
+ <translation>Igazolás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Align Left</source>
+ <translation>Balra állít</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Align Right</source>
+ <translation>Jobbra állít</translation>
+ </message>
+</context>
+<context>
+ <name>QWhatsThisAction</name>
+ <message>
+ <location filename="../src/gui/kernel/qwhatsthis.cpp" line="+527"/>
+ <source>What&apos;s This?</source>
+ <translation>Mi ez?</translation>
+ </message>
+</context>
+<context>
+ <name>QWidget</name>
+ <message>
+ <location filename="../src/gui/kernel/qwidget.cpp" line="+5720"/>
+ <source>*</source>
+ <translation>*</translation>
+ </message>
+</context>
+<context>
+ <name>QWizard</name>
+ <message>
+ <location filename="../src/gui/dialogs/qwizard.cpp" line="+661"/>
+ <source>Cancel</source>
+ <translation>Mégse</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Help</source>
+ <translation>Súgó</translation>
+ </message>
+ <message>
+ <location line="-14"/>
+ <source>&lt; &amp;Back</source>
+ <translation>&lt; &amp;Vissza</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>&amp;Finish</source>
+ <translation>&amp;Befejezés</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>&amp;Help</source>
+ <translation>&amp;Súgó</translation>
+ </message>
+ <message>
+ <location line="-14"/>
+ <source>Go Back</source>
+ <translation>Vissza ugrás</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Continue</source>
+ <translation>Folytatás</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Commit</source>
+ <translation>Kommit</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Done</source>
+ <translation>Kész</translation>
+ </message>
+ <message>
+ <location line="-4"/>
+ <source>&amp;Next</source>
+ <translation>&amp;Következő</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>&amp;Next &gt;</source>
+ <translation>&amp;Következő &gt;</translation>
+ </message>
+</context>
+<context>
+ <name>QWorkspace</name>
+ <message>
+ <location filename="../src/gui/widgets/qworkspace.cpp" line="+1089"/>
+ <source>&amp;Restore</source>
+ <translation>&amp;Visszaállítás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Move</source>
+ <translation>&amp;Mozgatás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Size</source>
+ <translation>&amp;Méret</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Mi&amp;nimize</source>
+ <translation>&amp;Minimalizálás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Ma&amp;ximize</source>
+ <translation>Ma&amp;ximalizálás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>&amp;Close</source>
+ <translation>&amp;Bezárás</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Stay on &amp;Top</source>
+ <translation>&amp;Tetején maradni</translation>
+ </message>
+ <message>
+ <location line="-988"/>
+ <source>Minimize</source>
+ <translation>Minimalizálás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Restore Down</source>
+ <translation>Letárolás</translation>
+ </message>
+ <message>
+ <location line="-4"/>
+ <source>Close</source>
+ <translation>Bezárás</translation>
+ </message>
+ <message>
+ <location line="+993"/>
+ <location line="+1059"/>
+ <source>Sh&amp;ade</source>
+ <translation>Ãrnya&amp;lat</translation>
+ </message>
+ <message>
+ <location line="-278"/>
+ <location line="+60"/>
+ <source>%1 - [%2]</source>
+ <translation>%1 - [%2]</translation>
+ </message>
+ <message>
+ <location line="+214"/>
+ <source>&amp;Unshade</source>
+ <translation>&amp;Leeresztés</translation>
+ </message>
+</context>
+<context>
+ <name>QXml</name>
+ <message>
+ <location filename="../src/xml/sax/qxml.cpp" line="+58"/>
+ <source>no error occurred</source>
+ <translation>nem történt hiba</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>error triggered by consumer</source>
+ <translation>Ügyfél által előidézett hiba</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>unexpected end of file</source>
+ <translation>Váratlan fájlvég</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>more than one document type definition</source>
+ <translation>Több mint egy dokumentum típus definíció</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>error occurred while parsing element</source>
+ <translation>Hiba történt az elem elemzése közben</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>tag mismatch</source>
+ <translation>Nem egyező címke</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>error occurred while parsing content</source>
+ <translation>Hiba történt a tartalom elemzése közben</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>unexpected character</source>
+ <translation>váratlan karakter</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>invalid name for processing instruction</source>
+ <translation>érvénytelen név az utasítás feldolgozására</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>version expected while reading the XML declaration</source>
+ <translation>várt verzió az XML deklaráció olvasása közben</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>wrong value for standalone declaration</source>
+ <translation>Hibás egyedülálló deklaráció érték</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>error occurred while parsing document type definition</source>
+ <translation>Hiba történt a dokumentum típus definíció elemzése közben</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>letter is expected</source>
+ <translation>betű várt</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>error occurred while parsing comment</source>
+ <translation>hiba történt az elemző megjegyzés előfordulása közben</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>error occurred while parsing reference</source>
+ <translation>Hiba történt az elemző hivatkozás előfordulása közben</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>internal general entity reference not allowed in DTD</source>
+ <translation>A DTD-ben nem engedélyezett a belső általános valós hivatkozás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>external parsed general entity reference not allowed in attribute value</source>
+ <translation>Az attribútum értékben nem engedélyezett a külsőleg elemzett általános valós hivatkozás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>external parsed general entity reference not allowed in DTD</source>
+ <translation>A DTD-ben nem engedélyezett a külsőleg elemzett általános valós hivatkozás</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>unparsed entity reference in wrong context</source>
+ <translation>Hivatkozás egy nem értelmezett entitásra hibás összefüggésben</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>recursive entities</source>
+ <translation>Rekurzív entitások</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>error in the text declaration of an external entity</source>
+ <translation>Hiba egy külső entitás szöveg deklarációjában</translation>
+ </message>
+ <message>
+ <location line="-11"/>
+ <source>encoding declaration or standalone declaration expected while reading the XML declaration</source>
+ <translation>Kódolása deklaráció vagy egyedülálló deklaráció várt az XML deklaráció olvasása közben</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>standalone declaration expected while reading the XML declaration</source>
+ <translation>Egyedülálló deklaráció várt az XML deklaráció olvasása közben</translation>
+ </message>
+</context>
+<context>
+ <name>QXmlPatternistCLI</name>
+ <message>
+ <location filename="../src/xmlpatterns/api/qcoloringmessagehandler.cpp" line="+87"/>
+ <source>Warning in %1, at line %2, column %3: %4</source>
+ <translation>Figyelmeztetés %1-ben, %2 sorban, %3 oszlopban: %4</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Warning in %1: %2</source>
+ <translation>Figyelmeztetés %1-ben: %2</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Unknown location</source>
+ <translation>Ismeretlen elhelyezkedés</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Error %1 in %2, at line %3, column %4: %5</source>
+ <translation>%1 hiba %2-ben, %3 sorban, %4 oszlopban: %5</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Error %1 in %2: %3</source>
+ <translation>%1 hiba %2-ben: %3</translation>
+ </message>
+</context>
+<context>
+ <name>QXmlStream</name>
+ <message>
+ <location filename="../src/corelib/xml/qxmlstream.cpp" line="+611"/>
+ <location filename="../src/corelib/xml/qxmlstream_p.h" line="+1770"/>
+ <source>Extra content at end of document.</source>
+ <translation>Extra tartalom a dokumentum végén.</translation>
+ </message>
+ <message>
+ <location line="+271"/>
+ <source>Invalid entity value.</source>
+ <translation>Érvénytelen entitás érték.</translation>
+ </message>
+ <message>
+ <location line="+109"/>
+ <source>Invalid XML character.</source>
+ <translation>Érvénytelen XML karakter.</translation>
+ </message>
+ <message>
+ <location line="+259"/>
+ <source>Sequence &apos;]]&gt;&apos; not allowed in content.</source>
+ <translation>&apos;]]&gt;&apos; sor nem engedélyezett a tartalomban.</translation>
+ </message>
+ <message>
+ <location line="+309"/>
+ <source>Namespace prefix &apos;%1&apos; not declared</source>
+ <translation>&apos;%1&apos; névtér előtag nincsen deklarálva</translation>
+ </message>
+ <message>
+ <location line="+78"/>
+ <source>Attribute redefined.</source>
+ <translation>Attribútum újradefiniálva.</translation>
+ </message>
+ <message>
+ <location line="+115"/>
+ <source>Unexpected character &apos;%1&apos; in public id literal.</source>
+ <translation>Váratlan karakter &apos;%1&apos; a publikus azonosító literál.</translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <source>Invalid XML version string.</source>
+ <translation>Érvénytelen XML verzió sztring.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Unsupported XML version.</source>
+ <translation>Nem támogatott XML verzió.</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>%1 is an invalid encoding name.</source>
+ <translation>%1 egy érvénytelen kódolási név.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Encoding %1 is unsupported</source>
+ <translation>%1 kódolás nem támogatva</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Standalone accepts only yes or no.</source>
+ <translation>Egyedülálló elfogadás kizárólas igen vagy nem.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Invalid attribute in XML declaration.</source>
+ <translation>Érvénytelen attribútum az XML deklarációban.</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Premature end of document.</source>
+ <translation>Túl korai dokumentum vég.</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Invalid document.</source>
+ <translation>Érvénytelen dokumentum.</translation>
+ </message>
+ <message>
+ <location line="+40"/>
+ <source>Expected </source>
+ <translation>Várt</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>, but got &apos;</source>
+ <translation>, pedig megkapta &apos;</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Unexpected &apos;</source>
+ <translation>Váratlan &apos;</translation>
+ </message>
+ <message>
+ <location line="+225"/>
+ <source>Expected character data.</source>
+ <translation>Várt karakter adat.</translation>
+ </message>
+ <message>
+ <location filename="../src/corelib/xml/qxmlstream_p.h" line="-995"/>
+ <source>Recursive entity detected.</source>
+ <translation>Rekurzív entitás észlelve.</translation>
+ </message>
+ <message>
+ <location line="+516"/>
+ <source>Start tag expected.</source>
+ <translation>Kezdő címke várva.</translation>
+ </message>
+ <message>
+ <location line="+222"/>
+ <source>XML declaration not at start of document.</source>
+ <translation>XML deklaráció nem a dokumentum elején található.</translation>
+ </message>
+ <message>
+ <location line="-31"/>
+ <source>NDATA in parameter entity declaration.</source>
+ <translation>NDATA a paraméter entitás deklarációban.</translation>
+ </message>
+ <message>
+ <location line="+34"/>
+ <source>%1 is an invalid processing instruction name.</source>
+ <translation>%1 egy érvénytelen feldolgozó utasítás neve.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Invalid processing instruction name.</source>
+ <translation>Érvénytelen feldolgozó utasítás név.</translation>
+ </message>
+ <message>
+ <location filename="../src/corelib/xml/qxmlstream.cpp" line="-536"/>
+ <location line="+12"/>
+ <location filename="../src/corelib/xml/qxmlstream_p.h" line="+164"/>
+ <location line="+53"/>
+ <source>Illegal namespace declaration.</source>
+ <translation>Illegális névtér deklarációk.</translation>
+ </message>
+ <message>
+ <location filename="../src/corelib/xml/qxmlstream_p.h" line="+15"/>
+ <source>Invalid XML name.</source>
+ <translation>Érvénytelen XML név.</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Opening and ending tag mismatch.</source>
+ <translation>Nyitó és záró címkék nem egyeznek.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Reference to unparsed entity &apos;%1&apos;.</source>
+ <translation>Hivatkozás egy nem értelmezett entitásra &apos;%1&apos;.</translation>
+ </message>
+ <message>
+ <location line="-13"/>
+ <location line="+61"/>
+ <location line="+40"/>
+ <source>Entity &apos;%1&apos; not declared.</source>
+ <translation>&apos;%1&apos; entitás nincsen deklarálva.</translation>
+ </message>
+ <message>
+ <location line="-26"/>
+ <source>Reference to external entity &apos;%1&apos; in attribute value.</source>
+ <translation>Hivatkozás egy külső entitásra &apos;%1&apos; az attribútum értékben.</translation>
+ </message>
+ <message>
+ <location line="+40"/>
+ <source>Invalid character reference.</source>
+ <translation>Érvénytelen karakter hivatkozás.</translation>
+ </message>
+ <message>
+ <location filename="../src/corelib/xml/qxmlstream.cpp" line="-75"/>
+ <location filename="../src/corelib/xml/qxmlstream_p.h" line="-823"/>
+ <source>Encountered incorrectly encoded content.</source>
+ <translation>Helytelen kódolási tartalommal találta szembe magát.</translation>
+ </message>
+ <message>
+ <location line="+274"/>
+ <source>The standalone pseudo attribute must appear after the encoding.</source>
+ <translation>Az egyedülálló ál attribútumnak a kódolás után kell feltűnnie.</translation>
+ </message>
+ <message>
+ <location filename="../src/corelib/xml/qxmlstream_p.h" line="+562"/>
+ <source>%1 is an invalid PUBLIC identifier.</source>
+ <translation>%1 egy érvénytelen PUBLIC-us azonosító.</translation>
+ </message>
+</context>
+<context>
+ <name>QtXmlPatterns</name>
+ <message>
+ <location filename="../src/xmlpatterns/data/qabstractduration.cpp" line="+99"/>
+ <location line="+15"/>
+ <source>At least one component must be present.</source>
+ <translation>Legalább egy komponenset be kell nyújtani.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qanyuri_p.h" line="+132"/>
+ <source>%1 is not a valid value of type %2.</source>
+ <translation>%1 nem egy érvény értéke a(z) %2 típusnak.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qatomiccasters_p.h" line="+223"/>
+ <source>When casting to %1 from %2, the source value cannot be %3.</source>
+ <translation>A(z) %1-ről %2-re történő kasztoláskor, a forrás érték nem lehet %3.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qboolean.cpp" line="+78"/>
+ <source>Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values.</source>
+ <translation>Hatékony logikai értéket nem lehet egy sor számára kiszámítani, amely kettő vagy több atomikus értéket tartalmaz.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qprocessinginstructionconstructor.cpp" line="+84"/>
+ <source>The data of a processing instruction cannot contain the string %1</source>
+ <translation>Egy feldolgozó utasítás adata nem tartalmazhat %1 sztringet</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qqnameconstructor_p.h" line="+168"/>
+ <location filename="../src/xmlpatterns/functions/qqnamefns.cpp" line="+69"/>
+ <source>%1 is an invalid %2</source>
+ <translation>%1 egy érvénytelen %2</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qassemblestringfns.cpp" line="+88"/>
+ <source>%1 is not a valid XML 1.0 character.</source>
+ <translation>%1 egy érvénytelen 1.0 XML karakter.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qerrorfn.cpp" line="+61"/>
+ <source>%1 was called.</source>
+ <translation>%1 lett meghívva.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qpatternmatchingfns.cpp" line="+133"/>
+ <source>In the replacement string, %1 must be followed by at least one digit when not escaped.</source>
+ <translation>A kicserélési sztrinben, %1 -t legalább egy számnak kell követnie nem meneküléskor.</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>In the replacement string, %1 can only be used to escape itself or %2, not %3</source>
+ <translation>A kicserelési sztringben, %1-t csak magának a(z) %2 vagy %3 menekülésére lehet használni</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qpatternplatform.cpp" line="+92"/>
+ <source>%1 matches newline characters</source>
+ <translation>%1 megegyező újsor karakterek</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Matches are case insensitive</source>
+ <translation>Az egyezés kis és nagybetűre nem érzékeny</translation>
+ </message>
+ <message>
+ <location line="+104"/>
+ <source>%1 is an invalid regular expression pattern: %2</source>
+ <translation>%1 egy érvénytelen reguláris kifejezés minta: %2</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qsequencefns.cpp" line="+346"/>
+ <source>It will not be possible to retrieve %1.</source>
+ <translation>Nem lesz lehetséges kinyerni %1.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qsequencegeneratingfns.cpp" line="+266"/>
+ <source>The default collection is undefined</source>
+ <translation>Az alapértelmezett gyűjtemény nincs definiálva</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>%1 cannot be retrieved</source>
+ <translation>%1 nem lehet megszerezni</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/janitors/qitemverifier.cpp" line="+67"/>
+ <source>The item %1 did not match the required type %2.</source>
+ <translation>A(z) %1 elem nem egyezik a szükséges típussal %2.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/parser/qquerytransformparser.cpp" line="+352"/>
+ <location line="+7323"/>
+ <source>%1 is an unknown schema type.</source>
+ <translation>%1 egy ismeretlen terv típus.</translation>
+ </message>
+ <message>
+ <location line="-7254"/>
+ <source>A template with name %1 has already been declared.</source>
+ <translation>Egy %1 nevű sablon már deklarálva van.</translation>
+ </message>
+ <message>
+ <location line="+213"/>
+ <source>Only one %1 declaration can occur in the query prolog.</source>
+ <translation>Kizárólag egy %1 deklaráció fordulhat elő a kérdéses előszóban.</translation>
+ </message>
+ <message>
+ <location line="+188"/>
+ <source>The initialization of variable %1 depends on itself</source>
+ <translation>A(z) %1 változó inicializálása önmagától függ</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/parser/qparsercontext.cpp" line="+93"/>
+ <source>The variable %1 is unused</source>
+ <translation>A(z) %1 változó nincsen használva</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/parser/qquerytransformparser.cpp" line="+2904"/>
+ <source>Version %1 is not supported. The supported XQuery version is 1.0.</source>
+ <translation>%1-es verzió nem támogatott. A támogatott XQuery verzió az 1.0.</translation>
+ </message>
+ <message>
+ <location line="+71"/>
+ <source>No function with signature %1 is available</source>
+ <translation>Nincs %1 aláírással rendelkező függvény</translation>
+ </message>
+ <message>
+ <location line="+303"/>
+ <source>It is not possible to redeclare prefix %1.</source>
+ <translation>Nem lehetséges a(z) %1 előtag újradeklarálása.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Prefix %1 is already declared in the prolog.</source>
+ <translation>%1 előtag már deklarálva van az előszóban.</translation>
+ </message>
+ <message>
+ <location line="+95"/>
+ <source>The name of an option must have a prefix. There is no default namespace for options.</source>
+ <translation>Az opció nevének tartalmaznia kell egy előtagot. Nincs alapértelmezett névtér ezekre az opciókra.</translation>
+ </message>
+ <message>
+ <location line="+171"/>
+ <source>The Schema Import feature is not supported, and therefore %1 declarations cannot occur.</source>
+ <translation>A terv importálása tulajdonság nem támogatott, és ennek következtében a(z) %1 deklarációk nem fordulhatnak elő.</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>The target namespace of a %1 cannot be empty.</source>
+ <translation>Egy %1 cél névtere nem lehet üres.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>The module import feature is not supported</source>
+ <translation>A modul importáló tulajdonság nem támogatott</translation>
+ </message>
+ <message>
+ <location line="+178"/>
+ <source>The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2</source>
+ <translation>Egy felhasználó által definiált függvény névterének egy könyvtár modulban megfelelőnek kell lenni a modul névtérrel. Más szóval, %1-nek kellene lennie %2 helyett</translation>
+ </message>
+ <message>
+ <location line="+34"/>
+ <source>A function already exists with the signature %1.</source>
+ <translation>Egy függvény már létezik ezzel az aláírással %1.</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>No external functions are supported. All supported functions can be used directly, without first declaring them as external</source>
+ <translation>Kulső függvények nincsenek támogatva. Az összes támogatott függvényt lehet közvetlenül haszálni, az első külső deklarálásuk nélkül</translation>
+ </message>
+ <message>
+ <location line="+1709"/>
+ <source>The %1-axis is unsupported in XQuery</source>
+ <translation>A(z) %1 tengely nem támogatott az XQuery-ben</translation>
+ </message>
+ <message>
+ <location line="+435"/>
+ <source>The namespace URI cannot be the empty string when binding to a prefix, %1.</source>
+ <translation>Az URI névtér nem lehet üres sztring egy előtaghoz való összeköttetéskor, %1.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>%1 is an invalid namespace URI.</source>
+ <translation>%1 egy érvénytelen URI névtér.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>It is not possible to bind to the prefix %1</source>
+ <translation>Nem lehetséges a(z) %1 előtaggal összekötni</translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>Two namespace declaration attributes have the same name: %1.</source>
+ <translation>Két névtér deklaráció attribútumnak ugyanaz a neve: %1.</translation>
+ </message>
+ <message>
+ <location line="+89"/>
+ <source>The namespace URI must be a constant and cannot use enclosed expressions.</source>
+ <translation>Az URI névtérnek állandónak kell lennie és nem használhat elhatárolt kifejezéseket.</translation>
+ </message>
+ <message>
+ <location line="+699"/>
+ <location line="+71"/>
+ <source>%1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported.</source>
+ <translation>%1 nem a hatókör attribútum deklarációin belül található. Vegye figyelembe, hogy a terv importáló tulajdonság nem támogatott.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/type/qcardinality.cpp" line="+55"/>
+ <source>empty</source>
+ <translation>üres</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>zero or one</source>
+ <translation>nulla vagy egy</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>exactly one</source>
+ <translation>pontosan egy</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>one or more</source>
+ <translation>egy vagy több</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>zero or more</source>
+ <translation>nulla vagy több</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/type/qtypechecker.cpp" line="+156"/>
+ <source>The focus is undefined.</source>
+ <translation>A fókusz nincs definiálva.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/utils/qoutputvalidator.cpp" line="+93"/>
+ <source>An attribute by name %1 has already been created.</source>
+ <translation>Egy %1 nevű attribútum már létre lett hozva.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/api/qiodevicedelegate.cpp" line="+84"/>
+ <source>Network timeout.</source>
+ <translation>Hálózati időtúllépés.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/api/qxmlserializer.cpp" line="+320"/>
+ <source>Element %1 can&apos;t be serialized because it appears outside the document element.</source>
+ <translation>%1 elemet nem lehet besorolni, mert úgy tűnik a dokumentum elem külső oldalán található.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qabstractdatetime.cpp" line="+80"/>
+ <source>Year %1 is invalid because it begins with %2.</source>
+ <translation>%1 év érvénytelen, mert %2-vel kezdődik.</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Day %1 is outside the range %2..%3.</source>
+ <translation>%1 nap a tartomány külsp oldalán van %2..%3.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Month %1 is outside the range %2..%3.</source>
+ <translation>%1 hónap a tartomány külső felületén van %2..%3.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Overflow: Can&apos;t represent date %1.</source>
+ <translation>Túlcsordulás: Nem lehet feltünteti a(z) %1 dátumot.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Day %1 is invalid for month %2.</source>
+ <translation>%1 nap érvénytelen a(z) %2 hónapra vonatkozólag.</translation>
+ </message>
+ <message>
+ <location line="+49"/>
+ <source>Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; </source>
+ <translation>Idő 24:%1:%2:%3 érvénytelen. Az óra 24, de a perc, másodperc, és milliszekundum egyáltalán nem 0; </translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Time %1:%2:%3.%4 is invalid.</source>
+ <translation>Idő %1:%2:%3.%4 érvénytelen.</translation>
+ </message>
+ <message>
+ <location line="+115"/>
+ <source>Overflow: Date can&apos;t be represented.</source>
+ <translation>Túlcsordulás: A dátumot nem lehet feltüntetni.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qabstractduration.cpp" line="-7"/>
+ <source>At least one time component must appear after the %1-delimiter.</source>
+ <translation>Legalább egy idő komponensnek lennie kell a(z) %1 határolójel után.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qatomicmathematicians.cpp" line="+201"/>
+ <location line="+32"/>
+ <source>Dividing a value of type %1 by %2 (not-a-number) is not allowed.</source>
+ <translation>%1 típus értékének osztása egy %2(nem szám)-mal nem engedélyezett.</translation>
+ </message>
+ <message>
+ <location line="-20"/>
+ <source>Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed.</source>
+ <translation>%1 típus értékének osztása egy %2 vagy %3(plusz vagy minusz nulla)-mal nem engedélyezett.</translation>
+ </message>
+ <message>
+ <location line="+32"/>
+ <source>Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed.</source>
+ <translation>%1 típusú érték %2 vagy %3-mal való szorzása(plusz vagy minusz végtelen) nem engedélyezett.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qatomicvalue.cpp" line="+79"/>
+ <source>A value of type %1 cannot have an Effective Boolean Value.</source>
+ <translation>%1 típusú értéknek nincsen hatékony logikai értéke.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qderivedinteger_p.h" line="+402"/>
+ <source>Value %1 of type %2 exceeds maximum (%3).</source>
+ <translation>%2 típus %1 értéke elérte a maxiumot (%3).</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Value %1 of type %2 is below minimum (%3).</source>
+ <translation>%1 típus %2 értéke a minimum alatt van (%3).</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qhexbinary.cpp" line="+91"/>
+ <source>A value of type %1 must contain an even number of digits. The value %2 does not.</source>
+ <translation>%1 típus értékének tartalmaznia kell egy páratlan számú számot. A(z) %2 érték nem.</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>%1 is not valid as a value of type %2.</source>
+ <translation>%1 érvénytelen %2 típusú értékként.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qarithmeticexpression.cpp" line="+207"/>
+ <source>Operator %1 cannot be used on type %2.</source>
+ <translation>%1 műveletet nem lehet a(z) %2 típuson használni.</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Operator %1 cannot be used on atomic values of type %2 and %3.</source>
+ <translation>%1 műveletet nem lehet a %2 és %3-as típusú atomikus értéken használni.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qattributenamevalidator.cpp" line="+66"/>
+ <source>The namespace URI in the name for a computed attribute cannot be %1.</source>
+ <translation>Az URI névtér a névben számított attribútumra nem lehet %1.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>The name for a computed attribute cannot have the namespace URI %1 with the local name %2.</source>
+ <translation>Egy kiszámított attribútumnak nem lehet %1 URI névtere %2 helyi névvel.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qcastas.cpp" line="+88"/>
+ <source>Type error in cast, expected %1, received %2.</source>
+ <translation>Típus hiba a kasztolásban, %1 várt, %2 kapott.</translation>
+ </message>
+ <message>
+ <location line="+29"/>
+ <source>When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed.</source>
+ <translation>%1-re kasztoláskor vagy típus származtatáskor, a forrás értéknek ugyanolyan típusúnak kell lennie, vagy sztring literálnak kell lennie. %2 típus nem engedélyezett.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qcommentconstructor.cpp" line="+67"/>
+ <source>A comment cannot contain %1</source>
+ <translation>A megjegyzés nem tartalmazhat %1-t</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>A comment cannot end with a %1.</source>
+ <translation>A megjegyzés nem végződget %1-gyel.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qdocumentcontentvalidator.cpp" line="+86"/>
+ <source>An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place.</source>
+ <translation>Az attribútum csomópont egy dokumentum csomópont gyermeke. Ennek következtében a(z) %1 attribútum nem helyénvaló.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qexpressionfactory.cpp" line="+162"/>
+ <source>A library module cannot be evaluated directly. It must be imported from a main module.</source>
+ <translation>A köbyvtár modult nem lehet közvetlenül kiértékelni. A fő modulból kell importálni.</translation>
+ </message>
+ <message>
+ <location line="+40"/>
+ <source>No template by name %1 exists.</source>
+ <translation>%1 nevű sablon nem létezik.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qgenericpredicate.cpp" line="+106"/>
+ <source>A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type.</source>
+ <translation>A(z) %1 típus értéke egy állítmány. Egy állítmánynak tartalmaznia kell vagy egy szám típust vagy egy effektív logikai érték típust.</translation>
+ </message>
+ <message>
+ <location line="+32"/>
+ <source>A positional predicate must evaluate to a single numeric value.</source>
+ <translation>A helyzet állítmányt egy egyetlen szám értékként kell kiértékelni.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qncnameconstructor_p.h" line="+113"/>
+ <source>The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, %2 is invalid.</source>
+ <translation>A cél neve egy utasítás feldolgozásban nem lehet %1 kis és nagybetűk bármely kombinációjában. Ennek következtében a(z) %2 érvénytelen.</translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>%1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3.</source>
+ <translation>%1 nem egy érvényes cél név az utasítás feldolgozásban. %2 vagy %3 értéknek kell lennie.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qpath.cpp" line="+109"/>
+ <source>The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two.</source>
+ <translation>Az utolsó lépésnek vagy csomópontokat vagy atomikus értékeket kell tartalmaznia. Ez nem lehet a kettő közötti keverék.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qqnameconstructor.cpp" line="+82"/>
+ <source>No namespace binding exists for the prefix %1</source>
+ <translation>Nem létezik névtér összeköttetés a(z) %1 előtagra</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qqnameconstructor_p.h" line="-12"/>
+ <source>No namespace binding exists for the prefix %1 in %2</source>
+ <translation>Nem létezik névtér összeköttetés a(z) %1 előtagra %2-ben</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qaggregatefns.cpp" line="+120"/>
+ <source>The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration.</source>
+ <translation>Az első argumentum %1 nem lehet %2 típusú. Egy számos típusnak kelle lennie, xs:évHónapIdőtartam vagy xs:napIdőTartam.</translation>
+ </message>
+ <message>
+ <location line="+74"/>
+ <source>The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.</source>
+ <translation>Az első argumentum %1 nem lehet %2 típusú. %3, %4 vagy %5 típusúnak kell lennie.</translation>
+ </message>
+ <message>
+ <location line="+91"/>
+ <source>The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.</source>
+ <translation>Az második argumentum %1 nem lehet %2 típusú. %3, %4 vagy %5 típusúnak kell lennie.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qdatetimefn.cpp" line="+86"/>
+ <source>If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same.</source>
+ <translation>Ha mindkét értéknek zóna eltolása van, ugyanazt a zóna eltolást kell tartalmazniuk. %1 és %2 nem ugyanaz.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qpatternmatchingfns.cpp" line="-65"/>
+ <source>%1 must be followed by %2 or %3, not at the end of the replacement string.</source>
+ <translation>%1-t %2 vagy %3-nak kell követnie, nem a kicserélési sztring végén.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qpatternplatform.cpp" line="-110"/>
+ <source>%1 and %2 match the start and end of a line.</source>
+ <translation>%1 és %2 egyezik a sor elején és végén.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Whitespace characters are removed, except when they appear in character classes</source>
+ <translation>Nem látható karakterek eltávolítva, kivéve mikor karakter osztályokban tűnnek fel</translation>
+ </message>
+ <message>
+ <location line="+130"/>
+ <source>%1 is an invalid flag for regular expressions. Valid flags are:</source>
+ <translation>%1 egy érvénytelen jelző reguláris kifejezésekre. Érvényes flagek:</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qqnamefns.cpp" line="+17"/>
+ <source>If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified.</source>
+ <translation>Ha az első argumentum üres sorozat vagy nulla hosszúságú sztring (nincsen névtér), egy előtagot nem lehet meghatározni. %1 előtag volt meghatározva.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qstringvaluefns.cpp" line="+252"/>
+ <source>The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization).</source>
+ <translation>A(z) %1 szabványosítási forma nem támogatott. A támogatott formák %2, %3, %4 és %5 és semmi más, lásd az üres sztringet (nincs szabványosítás).</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qtimezonefns.cpp" line="+87"/>
+ <source>A zone offset must be in the range %1..%2 inclusive. %3 is out of range.</source>
+ <translation>A zóna eltolásnak a(z) %1..%2 tartományban kell benne lennie. %3 az tartományon kívüli.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/janitors/qcardinalityverifier.cpp" line="+58"/>
+ <source>Required cardinality is %1; got cardinality %2.</source>
+ <translation>Szükséges számosság %1, szerzett számosság %2.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/parser/qquerytransformparser.cpp" line="-3944"/>
+ <source>The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2.</source>
+ <translation>A(z) %1 kódolás érvénytelen. Kizárólag latin karaktereket kell tartalmaznia, nem szabad látható karaktereket tartalmaznia, és a(z) %2 reguláris kifejezéssel kell megegyeznie.</translation>
+ </message>
+ <message>
+ <location line="+260"/>
+ <source>The keyword %1 cannot occur with any other mode name.</source>
+ <translation>A(z) %1 kulcscszó nem fordulhat elő semmilyen más mód névvel.</translation>
+ </message>
+ <message>
+ <location line="-3117"/>
+ <source>No variable with name %1 exists</source>
+ <translation>%1 nevű változó nem létezik</translation>
+ </message>
+ <message>
+ <location line="+3146"/>
+ <source>The value of attribute %1 must be of type %2, which %3 isn&apos;t.</source>
+ <translation>A(z) %1 attribútumnak %2 típusúnak kell lennie, amelyik nem %3-as.</translation>
+ </message>
+ <message>
+ <location line="+75"/>
+ <source>The prefix %1 cannot be bound. By default, it is already bound to the namespace %2.</source>
+ <translation>A(z) %1 előtagot nem lehet összekötni. Alapértelmezetten, már hozzá van kötve a %2 névtérhez.</translation>
+ </message>
+ <message>
+ <location line="+312"/>
+ <source>A variable with name %1 has already been declared.</source>
+ <translation>%1 nevű változó már deklarálva van.</translation>
+ </message>
+ <message>
+ <location line="+39"/>
+ <source>No value is available for the external variable with name %1.</source>
+ <translation>%1 nevű külső változóhoz nem érhető el érték. </translation>
+ </message>
+ <message>
+ <location line="+96"/>
+ <source>A stylesheet function must have a prefixed name.</source>
+ <translation>A stíluslap függvénynek tartalmaznia kell egy előtag nevet.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases.</source>
+ <translation>A(z) %1 névtér foglalt, ennek következtében a felhasználó által definiált függvényt nem lehet használni. Próbálja ki az előredefiniált %2 előtagot, amely erre az esetekre van kitalálva.</translation>
+ </message>
+ <message>
+ <location line="+106"/>
+ <source>An argument with name %1 has already been declared. Every argument name must be unique.</source>
+ <translation>Egy %1 nevű argumentum már deklarálva van. Minden argumentum névnek egyedülállónak kell lennie.</translation>
+ </message>
+ <message>
+ <location line="+179"/>
+ <source>When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal.</source>
+ <translation>Mikor %1 függvény van használva egyeztetése egy mintán belül, az argumentumnak egy változó hivatkozásnak vagy egy sztring literálnak kell lennie.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching.</source>
+ <translation>Egy XSLT mintában, az első argumentumnak a(z) %1 függvényre egy sztring literálnak kell lennie, amikor egyeztetésre használják.</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching.</source>
+ <translation>Egy XSLT mintában, az első argumentumnak a(z) %1 függvény esetén egy literálnak vagy egy változó hibatkozásnak kell lennie, mikor egyeztetésre használják.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>In an XSL-T pattern, function %1 cannot have a third argument.</source>
+ <translation>Egy XSLT mintában, %1 függvénynek nem lehet egy harmadik argumentuma.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching.</source>
+ <translation>Egy XSLT mintában, kizárólag a(z) %1 és %2 függvényeket, és %3-at nem lehet egyeztetésre használni.</translation>
+ </message>
+ <message>
+ <location line="+63"/>
+ <source>In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can.</source>
+ <translation>Egy XSLT mintában, %1 tengelyt nem lehet használni, kizárólag a(z) %2 vagy %3 tengelyeket.</translation>
+ </message>
+ <message>
+ <location line="+126"/>
+ <source>%1 is an invalid template mode name.</source>
+ <translation>%1 egy érvénytelen sablon mód név.</translation>
+ </message>
+ <message>
+ <location line="+44"/>
+ <source>The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide.</source>
+ <translation>Egy változó összeköttetés nevének egy for kifejezésben különböznie kell a pozícionális változótol. Ezért, a két %1 nevű változó ütközik.</translation>
+ </message>
+ <message>
+ <location line="+778"/>
+ <source>The Schema Validation Feature is not supported. Hence, %1-expressions may not be used.</source>
+ <translation>A terv jóváhagyási tulajdonság nem támogatott. Ezért, %1 kifejezést nem lehet használni.</translation>
+ </message>
+ <message>
+ <location line="+40"/>
+ <source>None of the pragma expressions are supported. Therefore, a fallback expression must be present</source>
+ <translation>A pragma kifejezések egyike sem támogatott. Ezért egy visszavonuló kifejezést kell nyújtani</translation>
+ </message>
+ <message>
+ <location line="+269"/>
+ <source>Each name of a template parameter must be unique; %1 is duplicated.</source>
+ <translation>Sablon paraméter mindegyik nevének egyedülállónak kell lennie, %1 az duplikáns.</translation>
+ </message>
+ <message>
+ <location line="+462"/>
+ <source>No function with name %1 is available.</source>
+ <translation>%1 nevű függvény nem elérhető.</translation>
+ </message>
+ <message>
+ <location line="-6235"/>
+ <source>%1 is not a valid numeric literal.</source>
+ <translation>%1 nem egy érvényes számos literál.</translation>
+ </message>
+ <message>
+ <location line="-152"/>
+ <source>W3C XML Schema identity constraint selector</source>
+ <translation>W3C XML terv azonosító megszorító kiválasztó</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>W3C XML Schema identity constraint field</source>
+ <translation>W3C XML Terv azonosító megszorító mező</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>A construct was encountered which is disallowed in the current language(%1).</source>
+ <translation>Egy olyan konstruktort talált amelyik nincsen engedélyezve az aktuális nyelvben(%1).</translation>
+ </message>
+ <message>
+ <location line="+6502"/>
+ <source>Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared).</source>
+ <translation>%1 névteret kizárólag a %2-vel lehet összekötni (és ennyi, vagy mindkét esetben, előre deklarált).</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared).</source>
+ <translation>%1 előtagot kizárólag a %2-vel lehet összekötni (és ennyi, vagy mindkét esetben, előre deklarált).</translation>
+ </message>
+ <message>
+ <location line="+120"/>
+ <source>An attribute with name %1 has already appeared on this element.</source>
+ <translation>%1 attribútum név már van ebben az elemben.</translation>
+ </message>
+ <message>
+ <location line="+61"/>
+ <source>A direct element constructor is not well-formed. %1 is ended with %2.</source>
+ <translation>Egy közvetlen elem konstruktor, mely nincsen jól megformázva. %1 a(z) %2-ben végzőik.</translation>
+ </message>
+ <message>
+ <location line="+458"/>
+ <source>The name %1 does not refer to any schema type.</source>
+ <translation>A(z) %1 név nem vonatkozik egyetlen terv típusra sem.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>%1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works.</source>
+ <translation>%1 egy összetett típus. Összetett típusra kasztolás nem lehetséges. De egy atomikus típusra mint egy %2 működik.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>%1 is not an atomic type. Casting is only possible to atomic types.</source>
+ <translation>%1 nem egy atomikus típus. Kaszolás kizárólag csak atomikus típusra lehetséges.</translation>
+ </message>
+ <message>
+ <location line="+76"/>
+ <source>%1 is not a valid name for a processing-instruction.</source>
+ <translation>%1 nem egy érvényes név egy utasítás feldolgozásra.</translation>
+ </message>
+ <message>
+ <location line="+188"/>
+ <source>The name of an extension expression must be in a namespace.</source>
+ <translation>Egy kifejezés kiterjesztés nevének egy névtérben kell lennie.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/type/qtypechecker.cpp" line="-93"/>
+ <source>Required type is %1, but %2 was found.</source>
+ <translation>%1 a szükséges típus, de %2 található.</translation>
+ </message>
+ <message>
+ <location line="+44"/>
+ <source>Promoting %1 to %2 may cause loss of precision.</source>
+ <translation>%1 elősegítése %2-re precíziós vesztést okozhat.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/utils/qoutputvalidator.cpp" line="-7"/>
+ <source>It&apos;s not possible to add attributes after any other kind of node.</source>
+ <translation>Nem lehetséges attribútumokat hozzáadni, bármely másik csomópont után.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/utils/qxpathhelper_p.h" line="+120"/>
+ <source>Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported.</source>
+ <translation>Kizárólag a Unicode Kódpontos összevetés támogatott(%1). %2 nem támogatott.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qatomicmathematicians.cpp" line="-180"/>
+ <source>Integer division (%1) by zero (%2) is undefined.</source>
+ <translation>Egész számos (%1) osztás nullával (%2) nem definiált.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Division (%1) by zero (%2) is undefined.</source>
+ <translation>Osztás (%1) nullával (%2) nem definiált.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Modulus division (%1) by zero (%2) is undefined.</source>
+ <translation>Tényezős osztás (%1) nullával (%2) nem definiált.</translation>
+ </message>
+ <message numerus="yes">
+ <location filename="../src/xmlpatterns/functions/qabstractfunctionfactory.cpp" line="+77"/>
+ <source>%1 takes at most %n argument(s). %2 is therefore invalid.</source>
+ <translation>
+ <numerusform>%1 legalább %n argumentumot vár. A(z) %2 ennel következtében érvénytelen.</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <location line="+11"/>
+ <source>%1 requires at least %n argument(s). %2 is therefore invalid.</source>
+ <translation>
+ <numerusform>%1 legalább %n argumentumot igényel. Ennek következtében a(z) %2 érvénytelen.</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qcontextnodechecker.cpp" line="+54"/>
+ <source>The root node of the second argument to function %1 must be a document node. %2 is not a document node.</source>
+ <translation>A második argumentum rendszergazda csomópontja %1 függvényre dokumentum csomópontnak kell lenni. %2 nem egy dokumentum csomópont.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/parser/qquerytransformparser.cpp" line="-3172"/>
+ <source>The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this)</source>
+ <translation>A névtér a felhasználó által definiált függvényre nem lehet üres (próbálja ki az előredefiniált %1 előtagot, mely innen esetekre lett kitalálva)</translation>
+ </message>
+ <message>
+ <location line="-693"/>
+ <location line="+10"/>
+ <source>A default namespace declaration must occur before function, variable, and option declarations.</source>
+ <translation>Egy alapértelmezett névtér deklarációnak a függvény, változó, és opció deklarációk előtt kell elhelyezkednie.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Namespace declarations must occur before function, variable, and option declarations.</source>
+ <translation>A névtér deklarációnak a függvény, változó, és opció deklarációk előtt kell elhelyezkednie.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Module imports must occur before function, variable, and option declarations.</source>
+ <translation>Modul importálásnak a függvény, változó, és opció deklarációk előtt kell elhelyezkednie.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qtimezonefns.cpp" line="+12"/>
+ <source>%1 is not a whole number of minutes.</source>
+ <translation>%1 nem egy egész számú perc érték.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/api/qxmlserializer.cpp" line="+60"/>
+ <source>Attribute %1 can&apos;t be serialized because it appears at the top level.</source>
+ <translation>%1 attribtútumot nem lehet sorozatosítani, mert legfelső szinten tűnik fel.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp" line="+344"/>
+ <source>%1 is an unsupported encoding.</source>
+ <translation>%1 egy nem támogatott kódolás.</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>%1 contains octets which are disallowed in the requested encoding %2.</source>
+ <translation>%1 oktálisokat tartalmat, melyek tiltva vannak a lekérdezett %2 kódolásban.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character.</source>
+ <translation>A kódpont %1, mely a %2-ben fordul elő %3 kódolást használva, egy érvénytelen XML karakter.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qapplytemplate.cpp" line="+119"/>
+ <source>Ambiguous rule match.</source>
+ <translation>Bizonytalan szabály egyezés.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qcomputednamespaceconstructor.cpp" line="+69"/>
+ <source>In a namespace constructor, the value for a namespace cannot be an empty string.</source>
+ <translation>Egy névtér konstruktorban, egy névtér értéke nem lehet egy üres sztring.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>The prefix must be a valid %1, which %2 is not.</source>
+ <translation>Az előtagnak egy érvényes %1-nek kell lennie, %2 nem lehet.</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>The prefix %1 cannot be bound.</source>
+ <translation>A(z) %1 előtagot nem lehet összekötni.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Only the prefix %1 can be bound to %2 and vice versa.</source>
+ <translation>Kizárólag a(z) %1 előtagot lehet összekötni a %2-vel és fordítva.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qtemplate.cpp" line="+145"/>
+ <source>The parameter %1 is required, but no corresponding %2 is supplied.</source>
+ <translation>A(z) %1 paraméter követelik, de nincs megelelő %2 támogatás hozzá.</translation>
+ </message>
+ <message>
+ <location line="-71"/>
+ <source>The parameter %1 is passed, but no corresponding %2 exists.</source>
+ <translation>A(z) %1 paraméter teljesítve, de a megfelelő %2 nem létezik.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qunparsedtextfn.cpp" line="+65"/>
+ <source>The URI cannot have a fragment</source>
+ <translation>Az URI nem tartalmaz tördezettséget</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/parser/qxslttokenizer.cpp" line="+519"/>
+ <source>Element %1 is not allowed at this location.</source>
+ <translation>%1 elem nincs engedélyezve ezen a ponton.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Text nodes are not allowed at this location.</source>
+ <translation>Szöveg csomópontok nincsenek engedélyezve ezen a ponton.</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Parse error: %1</source>
+ <translation>Elemzési hiba: %1</translation>
+ </message>
+ <message>
+ <location line="+62"/>
+ <source>The value of the XSL-T version attribute must be a value of type %1, which %2 isn&apos;t.</source>
+ <translation>XSLT verzió attribútum értékének %1 típusú értéknek kell lennie, %2 nem lehet.</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Running an XSL-T 1.0 stylesheet with a 2.0 processor.</source>
+ <translation>Egy XSLT 1.0 stíluslap egy 2.0 feldolgozóval való futtatása.</translation>
+ </message>
+ <message>
+ <location line="+108"/>
+ <source>Unknown XSL-T attribute %1.</source>
+ <translation>Ismeretlen XSLT attribútum %1.</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Attribute %1 and %2 are mutually exclusive.</source>
+ <translation>A(z) %1 és %2 attribútum kölcsönösen kizárják egymást.</translation>
+ </message>
+ <message>
+ <location line="+166"/>
+ <source>In a simplified stylesheet module, attribute %1 must be present.</source>
+ <translation>Egy leegyszerűsített stíluslap modulban, %1 attribútumot kell nyújtani.</translation>
+ </message>
+ <message>
+ <location line="+72"/>
+ <source>If element %1 has no attribute %2, it cannot have attribute %3 or %4.</source>
+ <translation>Ha a(z) %1 elem nem tartalmaz %2 attribútumot, akkor nem tartalmazhat %3 vagy %4 attribútumot.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Element %1 must have at least one of the attributes %2 or %3.</source>
+ <translation>%1 elemnek legalább egy %2 vagy %3 attribútumot kell tartalmaznia.</translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <source>At least one mode must be specified in the %1-attribute on element %2.</source>
+ <translation>Legalább egy csomópontot meg kell határozni a(z) %1 attribútumban a(z) %2 elemen.</translation>
+ </message>
+ <message>
+ <location line="+123"/>
+ <source>Element %1 must come last.</source>
+ <translation>%1 elemnek kell utoljára következnie.</translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>At least one %1-element must occur before %2.</source>
+ <translation>Legalább egy %1 elemnek kell előfordulnia %2 előtt.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Only one %1-element can appear.</source>
+ <translation>Csak egy %1 elem jelenhet meg.</translation>
+ </message>
+ <message>
+ <location line="+31"/>
+ <source>At least one %1-element must occur inside %2.</source>
+ <translation>Legalább egy %1 elem fordulhat elő %2-n belül.</translation>
+ </message>
+ <message>
+ <location line="+58"/>
+ <source>When attribute %1 is present on %2, a sequence constructor cannot be used.</source>
+ <translation>Mikor %1 attribútuk van benyújtva %2-n, egy sorozat konstruktort nem lehet használni.</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Element %1 must have either a %2-attribute or a sequence constructor.</source>
+ <translation>%1 elemnek vagy egy %2 attribútumot vagy egy sorozat konstruktort kell tartalmaznia.</translation>
+ </message>
+ <message>
+ <location line="+125"/>
+ <source>When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor.</source>
+ <translation>Amikor egy paramétert igényel, egy alapértelmezett érték ellátni egy %1 attribútum vagy egy sorozat konstruktoron keresztül.</translation>
+ </message>
+ <message>
+ <location line="+270"/>
+ <source>Element %1 cannot have children.</source>
+ <translation>%1 elem nem tartalmazhat gyereket.</translation>
+ </message>
+ <message>
+ <location line="+434"/>
+ <source>Element %1 cannot have a sequence constructor.</source>
+ <translation>%1 elem nem tartalmazhat egy sorozat konstruktort.</translation>
+ </message>
+ <message>
+ <location line="+86"/>
+ <location line="+9"/>
+ <source>The attribute %1 cannot appear on %2, when it is a child of %3.</source>
+ <translation>A(z) %1 attribútum nem jelenhet meg %2-n, mikor egy %3 gyereke.</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>A parameter in a function cannot be declared to be a tunnel.</source>
+ <translation>Egy paramétert nem lehet behangoltnak deklarálni egy függvényben.</translation>
+ </message>
+ <message>
+ <location line="+149"/>
+ <source>This processor is not Schema-aware and therefore %1 cannot be used.</source>
+ <translation>Ez a feldolgozó nem terv biztos és ennek következtében a(z) %1-t nem lehet használni.</translation>
+ </message>
+ <message>
+ <location line="+57"/>
+ <source>Top level stylesheet elements must be in a non-null namespace, which %1 isn&apos;t.</source>
+ <translation>Felső szintű stíluslap elemeknek nem szabad egy nem nulla névtérnek lenniük, %1 nem jó.</translation>
+ </message>
+ <message>
+ <location line="+48"/>
+ <source>The value for attribute %1 on element %2 must either be %3 or %4, not %5.</source>
+ <translation>%1 attribútum értékének a(z) %2-s elemen vagy %3 vagy %4, vagy %5-nek kell lennie.</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Attribute %1 cannot have the value %2.</source>
+ <translation>%1 attribútum nem tartalmazhat %2 értéket.</translation>
+ </message>
+ <message>
+ <location line="+58"/>
+ <source>The attribute %1 can only appear on the first %2 element.</source>
+ <translation>A(z) %1 attribútum kizárólag az első %2 elemen tűnhet fel.</translation>
+ </message>
+ <message>
+ <location line="+99"/>
+ <source>At least one %1 element must appear as child of %2.</source>
+ <translation>Legalább egy %1 elemnek mutatkoznia %2 gyerekeként.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/schema/qxsdschemachecker.cpp" line="+227"/>
+ <source>%1 has inheritance loop in its base type %2.</source>
+ <translation>%1 tartalmaz egy öröklődési hurkot annak %2 alaptípusában.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <location line="+24"/>
+ <source>Circular inheritance of base type %1.</source>
+ <translation>A(z) %1 alaptípus cirkuláris öröklődése.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Circular inheritance of union %1.</source>
+ <translation>A(z) %1 union cirkuláris öröklődése.</translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>%1 is not allowed to derive from %2 by restriction as the latter defines it as final.</source>
+ <translation>A(z) %1 %2-ből való származtatása nem megengedett, azzal a korlátozassal, hogy az utóbbi utolsónak definiálja.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>%1 is not allowed to derive from %2 by extension as the latter defines it as final.</source>
+ <translation>%1-nek nem engedélyezett a %2-ből való származtatása, azzal a kiegészítéssel, hogy a utóbbi végsőnek definiálja.</translation>
+ </message>
+ <message>
+ <location line="+31"/>
+ <source>Base type of simple type %1 cannot be complex type %2.</source>
+ <translation>A(z) %1 egyszerű típus alaptípusa nem lehet egy %2 összetett típus.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Simple type %1 cannot have direct base type %2.</source>
+ <translation>A(z) %1 egyszerű típus nem tartalmazhat közvetlen %2 alap típust.</translation>
+ </message>
+ <message>
+ <location line="+33"/>
+ <location line="+9"/>
+ <source>Simple type %1 is not allowed to have base type %2.</source>
+ <translation>%1 egyszerű típusnak nincs engedélyezve, hogy %2 alap típusokat tartalmazzon.</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Simple type %1 can only have simple atomic type as base type.</source>
+ <translation>A(z) %1 egyszerű típus kizárólag egyszerű atomikus típusokat tartalmazhat alaptípusként.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Simple type %1 cannot derive from %2 as the latter defines restriction as final.</source>
+ <translation>%1 egyszerű típus nem származtatható %2-ből, mint ahogy az utóbbi végső korlátozásokat definiál.</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <location line="+484"/>
+ <source>Variety of item type of %1 must be either atomic or union.</source>
+ <translation>%1 elemtípus különbözőségeinek vagy vagy atomikus vagy unionnak kell lenni.</translation>
+ </message>
+ <message>
+ <location line="-474"/>
+ <location line="+483"/>
+ <source>Variety of member types of %1 must be atomic.</source>
+ <translation>%1 tagtípusok különbözőségének atomikusnak kell lennie.</translation>
+ </message>
+ <message>
+ <location line="-470"/>
+ <location line="+451"/>
+ <source>%1 is not allowed to derive from %2 by list as the latter defines it as final.</source>
+ <translation>%1 származtatása a(z) %2-ből nem engedélyezett, listázva azt, hogy az utóbbi végsőként definiálja.</translation>
+ </message>
+ <message>
+ <location line="-431"/>
+ <source>Simple type %1 is only allowed to have %2 facet.</source>
+ <translation>%1 egyszerű típus kizárólag %2 oldalt tartalmazhat.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Base type of simple type %1 must have variety of type list.</source>
+ <translation>%1 egyszerű típus alap típusának különböző típus listákat kell tartalmaznia.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Base type of simple type %1 has defined derivation by restriction as final.</source>
+ <translation>%1 egyszerű típus alaptípusa definiálja a számaztatást végső korlátozással.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Item type of base type does not match item type of %1.</source>
+ <translation>Az alap típus elem típusa nem egyezik a(z) %1 elemtípusával. </translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <location line="+93"/>
+ <source>Simple type %1 contains not allowed facet type %2.</source>
+ <translation>%1 egyszerű típus nem engedélyezett oldal %2 típusokat tartalmaz.</translation>
+ </message>
+ <message>
+ <location line="-72"/>
+ <location line="+413"/>
+ <source>%1 is not allowed to derive from %2 by union as the latter defines it as final.</source>
+ <translation>%1 %2-ből történő származtatása nem engedélyezett az unió által, az utóbbi végsőként definiálja.</translation>
+ </message>
+ <message>
+ <location line="-404"/>
+ <source>%1 is not allowed to have any facets.</source>
+ <translation>%1 nem tartalmazhat semmilyen oldalt.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Base type %1 of simple type %2 must have variety of union.</source>
+ <translation>%2 egyszerű típus %1 alap típusának különböző egységeket kell tartalmaznia.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Base type %1 of simple type %2 is not allowed to have restriction in %3 attribute.</source>
+ <translation>%2 egyszerű típus %1 alap típusa nem tartalmazhat korlátozásokat a %3 attribútumban.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Member type %1 cannot be derived from member type %2 of %3&apos;s base type %4.</source>
+ <translation>%1 tag típus nem származtatható a(z) %3 %4 alap típusának %2 tagtípusából.</translation>
+ </message>
+ <message>
+ <location line="+65"/>
+ <source>Derivation method of %1 must be extension because the base type %2 is a simple type.</source>
+ <translation>%1 származtatása eljárásának kiterjesztésnek kell lennie, mert %2 alap típus egy egyszerű típus.</translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>Complex type %1 has duplicated element %2 in its content model.</source>
+ <translation>A(z) %1 összetett típusnak duplikáns %2 eleme van a tartalmi modellében.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Complex type %1 has non-deterministic content.</source>
+ <translation>%1 összetett típusnak nincsen meghatározott tartalma.</translation>
+ </message>
+ <message>
+ <location line="+21"/>
+ <source>Attributes of complex type %1 are not a valid extension of the attributes of base type %2: %3.</source>
+ <translation>%1 összetett típus attribútumai a(z) %2 alap típus attribútumainak nem érvényes kiterjesztései: %3.</translation>
+ </message>
+ <message>
+ <location line="+37"/>
+ <source>Content model of complex type %1 is not a valid extension of content model of %2.</source>
+ <translation>%1 komplex típus tartalmi modelle a(z) %2 tartalmi modellének nem egy érvényes kiterjesztése.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Complex type %1 must have simple content.</source>
+ <translation>%1 komplex típusnak tartalmaznia kell egy egyszerű tartalmat.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Complex type %1 must have the same simple type as its base class %2.</source>
+ <translation>%1 komplex típusnak ugyanazt az egyszerű típust kell tartalmaznia a(z) %2 alap osztálya számára.</translation>
+ </message>
+ <message>
+ <location line="+67"/>
+ <source>Complex type %1 cannot be derived from base type %2%3.</source>
+ <translation>%1 komplex típus nem származtatható a(z) %2%3 alap típusból.</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Attributes of complex type %1 are not a valid restriction from the attributes of base type %2: %3.</source>
+ <translation>%1 komplex típus attribútumai nem egy érvényes korlátozások a(z) %2 alap típus attribútumaitól: %3.</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Complex type %1 with simple content cannot be derived from complex base type %2.</source>
+ <translation>%1 komplex típus egyszerű tartalommal nem származtatható %2 komplex alap típusból.</translation>
+ </message>
+ <message>
+ <location line="+35"/>
+ <source>Item type of simple type %1 cannot be a complex type.</source>
+ <translation>A(z) %1 egyszerű típus elemi típusa nem lehet egy komplex típus.</translation>
+ </message>
+ <message>
+ <location line="+44"/>
+ <source>Member type of simple type %1 cannot be a complex type.</source>
+ <translation>%1 egyszerű típus tag típusa nem lehet egy komplex típus.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>%1 is not allowed to have a member type with the same name as itself.</source>
+ <translation>%1 nem engedélyzett, hogy tartalmazzon egy tag típust ugyanazzal a névvel, mint a saját neve.</translation>
+ </message>
+ <message>
+ <location line="+83"/>
+ <location line="+29"/>
+ <location line="+34"/>
+ <source>%1 facet collides with %2 facet.</source>
+ <translation>%1 oldal ütközik a(z) %2 oldallal.</translation>
+ </message>
+ <message>
+ <location line="-20"/>
+ <source>%1 facet must have the same value as %2 facet of base type.</source>
+ <translation>%1 oldalnak ugyanazt az értéket kell tartalmaznia, mint az alap típus %2 oldalának.</translation>
+ </message>
+ <message>
+ <location line="+37"/>
+ <source>%1 facet must be equal or greater than %2 facet of base type.</source>
+ <translation>%1 oldalnak nagyobbnak vagy egyenlőnek kell lennie, mint az alap típus %2 oldalának.</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <location line="+125"/>
+ <location line="+55"/>
+ <location line="+12"/>
+ <location line="+91"/>
+ <location line="+58"/>
+ <location line="+34"/>
+ <location line="+35"/>
+ <source>%1 facet must be less than or equal to %2 facet of base type.</source>
+ <translation>%1 oldalnal kisebb vagy egyenlőnek kell lennie az alap típus %2 oldalánál.</translation>
+ </message>
+ <message>
+ <location line="-389"/>
+ <source>%1 facet contains invalid regular expression</source>
+ <translation>%1 oldal érvénytelen reguláris kifejezéseket tartalmaz</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Unknown notation %1 used in %2 facet.</source>
+ <translation>%1 ismeretlen jelölési mód van használva a(z) %2 oldalon.</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>%1 facet contains invalid value %2: %3.</source>
+ <translation>%1 oldal érvénytelen %2 értéket tartalmaz: %3.</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>%1 facet cannot be %2 or %3 if %4 facet of base type is %5.</source>
+ <translation>%1 oldal nem lehet %2 vagy %3, ha az alap típus %4 oldala %5.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>%1 facet cannot be %2 if %3 facet of base type is %4.</source>
+ <translation>%1 oldal nem lehet %2, ha az alap típus %3 oldala %4.</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <location line="+55"/>
+ <location line="+230"/>
+ <source>%1 facet must be less than or equal to %2 facet.</source>
+ <translation>%1 oldalnak kisebb egyenlőnek kell lennie a(z) %2 oldalnál.</translation>
+ </message>
+ <message>
+ <location line="-257"/>
+ <location line="+134"/>
+ <location line="+82"/>
+ <source>%1 facet must be less than %2 facet of base type.</source>
+ <translation>%1 oldalnak kisebbnek kell lennie az alap típus %2 oldalánál.</translation>
+ </message>
+ <message>
+ <location line="-201"/>
+ <location line="+79"/>
+ <source>%1 facet and %2 facet cannot appear together.</source>
+ <translation>%1 oldal és %2 oldal nem fordulhat elő együtt.</translation>
+ </message>
+ <message>
+ <location line="-27"/>
+ <location line="+12"/>
+ <location line="+113"/>
+ <source>%1 facet must be greater than %2 facet of base type.</source>
+ <translation>%1 oldalnak nagyobbnak kell lennie, mint az alaptípus %2 oldalának.</translation>
+ </message>
+ <message>
+ <location line="-86"/>
+ <location line="+58"/>
+ <source>%1 facet must be less than %2 facet.</source>
+ <translation>%1 oldalnak kisebbnek kell lenni a(z) %2 oldalnál.</translation>
+ </message>
+ <message>
+ <location line="-42"/>
+ <location line="+58"/>
+ <source>%1 facet must be greater than or equal to %2 facet of base type.</source>
+ <translation>%1 oldalnak nagyobb vagy egyenlőnek kell lennie az alap típus %2 oldalánál.</translation>
+ </message>
+ <message>
+ <location line="+113"/>
+ <source>Simple type contains not allowed facet %1.</source>
+ <translation>Egyszerű típus nem tartalmazhat %1 oldalt.</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>%1, %2, %3, %4, %5 and %6 facets are not allowed when derived by list.</source>
+ <translation>%1, %2, %3, %4, %5 és %6 oldalak nem engedélyezettek listáról származtatáskor.</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Only %1 and %2 facets are allowed when derived by union.</source>
+ <translation>Csak a(z) %1 és %2 oldalak engedélyezettek union származtatásakor.</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <location line="+16"/>
+ <source>%1 contains %2 facet with invalid data: %3.</source>
+ <translation>%1 %2 oldalt tartalmaz érvénytelen adattal: %3.</translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>Attribute group %1 contains attribute %2 twice.</source>
+ <translation>A(z) %1 attribútum csoport a(z) %2 attribútumot kétszer tartalmazza.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Attribute group %1 contains two different attributes that both have types derived from %2.</source>
+ <translation>A(z) %1 attribútum csoport két különböző attribútumot tartalmaz, melyek közül mindkettő %2-ból számaztatott típusokat tartalmaz.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Attribute group %1 contains attribute %2 that has value constraint but type that inherits from %3.</source>
+ <translation>A(z) %1 attribútum csoport %2 attribútumot tartalmaz, amely olyan megszorított értéket tartalmaz, kivéve a típust, amit %3-ból örököl.</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Complex type %1 contains attribute %2 twice.</source>
+ <translation>A(z) %1 összetett típus %2 attribútumot tartalmazza kétszer.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Complex type %1 contains two different attributes that both have types derived from %2.</source>
+ <translation>%1 komplex típus két különböző attribútumot tartalmaz, amelyek közül mindkettő %2-ból származtatott típusokat tartalmaz.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Complex type %1 contains attribute %2 that has value constraint but type that inherits from %3.</source>
+ <translation>%1 kompex típus %2 attribútumot tartalmaz, aminek megszorító értéke van, kivéve a típust, amit a(z) %3-ból örököl.</translation>
+ </message>
+ <message>
+ <location line="+43"/>
+ <source>Element %1 is not allowed to have a value constraint if its base type is complex.</source>
+ <translation>%1 elem nem tartalmazhat egy korlátozott értéket, ha az alaptípusa komplex.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Element %1 is not allowed to have a value constraint if its type is derived from %2.</source>
+ <translation>%1 elem nem tartalmazhat egy korlátozott értéket, ha a típusa a(z) %2-ből származik.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <location line="+11"/>
+ <source>Value constraint of element %1 is not of elements type: %2.</source>
+ <translation>%1 elem korlátozó értéke nem elemi típus: %2.</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Element %1 is not allowed to have substitution group affiliation as it is no global element.</source>
+ <translation>%1 elem nem tartalmazhat helyettesítési csoport egyesítést, mert nem egy globális elem.</translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <source>Type of element %1 cannot be derived from type of substitution group affiliation.</source>
+ <translation>%1 elem típus nem származtatható helyettesítési csoport egyesítési típusból.</translation>
+ </message>
+ <message>
+ <location line="+41"/>
+ <source>Value constraint of attribute %1 is not of attributes type: %2.</source>
+ <translation>%1 attribútum korlátozó értéke nem attribútum típus: %2.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Attribute %1 has value constraint but has type derived from %2.</source>
+ <translation>%1 attribútumnak korlátozó értéke van, de %2-ből származtatott típust tartalmaz.</translation>
+ </message>
+ <message>
+ <location line="+56"/>
+ <source>%1 attribute in derived complex type must be %2 like in base type.</source>
+ <translation>%1 attribútum egy származtatott komplex típusban %2-nek kell lennie, mint az alap típusban.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Attribute %1 in derived complex type must have %2 value constraint like in base type.</source>
+ <translation>A származtatott komplex típusban levő %1 attribútumnak %2 érték korlátozót kell tartalmaznia, mint az alap típusban.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Attribute %1 in derived complex type must have the same %2 value constraint like in base type.</source>
+ <translation>Származtatott komplex típusban levő %1 attribútumnak ugyanazt a(z) %2 korlátozott értéket kell tartalmaznia, mint az alap típusban.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Attribute %1 in derived complex type must have %2 value constraint.</source>
+ <translation>Származtatott komplex típusban levő %1 attribútumnak %2 érték korlátozót kell tartalmaznia.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>processContent of base wildcard must be weaker than derived wildcard.</source>
+ <translation>Az alap helyettesítő jel folyamat tartalma gyengébb kell legyen, mint a származtatott helyettesítő jel.</translation>
+ </message>
+ <message>
+ <location line="+39"/>
+ <location line="+15"/>
+ <source>Element %1 exists twice with different types.</source>
+ <translation>%1 elem kétszer létezik különböző típusokkal.</translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <source>Particle contains non-deterministic wildcards.</source>
+ <translation>A részecske nem meghatározott helyettesítő jeleket tartalmaz.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/schema/qxsdschemahelper.cpp" line="+691"/>
+ <location line="+63"/>
+ <source>Base attribute %1 is required but derived attribute is not.</source>
+ <translation>A(z) %1 alap attribútum szükséges, de a származtatott attribútum nem.</translation>
+ </message>
+ <message>
+ <location line="-57"/>
+ <source>Type of derived attribute %1 cannot be validly derived from type of base attribute.</source>
+ <translation>A(z) %1 származtatott attribútum típusa nem lehet érvényesen származtatni az alap attribútum típusból.</translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <source>Value constraint of derived attribute %1 does not match value constraint of base attribute.</source>
+ <translation>&apos;%1 származtatott attribútum érték korlátozója nem egyezik az alap attribútum érték korlátozójával.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Derived attribute %1 does not exist in the base definition.</source>
+ <translation>%1 származtatott attribútum nem létezik az alap definícióban.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Derived attribute %1 does not match the wildcard in the base definition.</source>
+ <translation>%1 származtatott attribútum nem egyezik a helyettesítő jellel az alap definícióban.</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Base attribute %1 is required but missing in derived definition.</source>
+ <translation>%1 alap attribútum szükséges, de hiáynzik a származtatott definícióban.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Derived definition contains an %1 element that does not exists in the base definition</source>
+ <translation>A származtatot definíció egy %1 elemet tartalmaz, ami nem létezik az alap definícióban</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Derived wildcard is not a subset of the base wildcard.</source>
+ <translation>Származtatott helyettesítőjel nem az alap helyettesítőjel egy részhalmaza.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>%1 of derived wildcard is not a valid restriction of %2 of base wildcard</source>
+ <translation>Származtaott helyettesítő jel %1-e nem az alap helyettesítőjel %2-nek egy érvényes korlátozója</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Attribute %1 from base type is missing in derived type.</source>
+ <translation>Az alap típus %1 attribútuma hiányzik a származtatott típusban.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Type of derived attribute %1 differs from type of base attribute.</source>
+ <translation>A(z) %1 származtatott típus az alap attribútum típusától különbözik.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Base definition contains an %1 element that is missing in the derived definition</source>
+ <translation>Az alap definíció egy %1 elemet tartalmaz, ami hiányzik a származtatott definícióból</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/schema/qxsdschemaresolver.cpp" line="+354"/>
+ <source>%1 references unknown %2 or %3 element %4.</source>
+ <translation>%1 ismeretlen %2 vagy %3 elemre hivatkozik %4.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>%1 references identity constraint %2 that is no %3 or %4 element.</source>
+ <translation>%1 %2 indentitás korlátozóra hivatkozik, ami nem %3 vagy %4 elem.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>%1 has a different number of fields from the identity constraint %2 that it references.</source>
+ <translation>%1 mezők egy különböző számát tartalmazza a(z) %2 indetitás korlátozóbol, amelyik erre hivatkozik.</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Base type %1 of %2 element cannot be resolved.</source>
+ <translation>%1 elem %2 alap típusát nem lehet megfejteni.</translation>
+ </message>
+ <message>
+ <location line="+84"/>
+ <source>Item type %1 of %2 element cannot be resolved.</source>
+ <translation>%2 elem %1 elem típusát nem lehet megfejteni.</translation>
+ </message>
+ <message>
+ <location line="+31"/>
+ <source>Member type %1 of %2 element cannot be resolved.</source>
+ <translation>%2 elem %1 tag típusát nem lehet megoldani.</translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <location line="+408"/>
+ <location line="+30"/>
+ <source>Type %1 of %2 element cannot be resolved.</source>
+ <translation>%2 elem %1 típusát nem lehet megoldani.</translation>
+ </message>
+ <message>
+ <location line="-416"/>
+ <source>Base type %1 of complex type cannot be resolved.</source>
+ <translation>Komplex típus %1 alap típusát nem lehet megfejteni.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>%1 cannot have complex base type that has a %2.</source>
+ <translation>%1 nem tartalmazhat komplex alap típusokat, egy %2-t tartalmaz.</translation>
+ </message>
+ <message>
+ <location line="+279"/>
+ <source>Content model of complex type %1 contains %2 element so it cannot be derived by extension from a non-empty type.</source>
+ <translation>%1 komplex típus tartalmi modelle %2 elemet tartalmaz, tehát nem származtatható kiterjesztésben egy nem üres típusból.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Complex type %1 cannot be derived by extension from %2 as the latter contains %3 element in its content model.</source>
+ <translation>%1 komplex nem típus nem származtatható kiterjesztésben %2-ből, mert az utóbbi %3 elemet tartalmaz a tartalmi modellében.</translation>
+ </message>
+ <message>
+ <location line="+101"/>
+ <source>Type of %1 element must be a simple type, %2 is not.</source>
+ <translation>%1 elem típusnak egy egyszerű típusnak kell, de %2 nem az.</translation>
+ </message>
+ <message>
+ <location line="+62"/>
+ <source>Substitution group %1 of %2 element cannot be resolved.</source>
+ <translation>%2 elem %1 helyettesítési csoportját nem lehet megoldani.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Substitution group %1 has circular definition.</source>
+ <translation>%1 helyettesítési csoport cirkuláris definíciót tartalmaz.</translation>
+ </message>
+ <message>
+ <location line="+120"/>
+ <location line="+7"/>
+ <source>Duplicated element names %1 in %2 element.</source>
+ <translation>Duplikát %1 elemnév %2 elemben.</translation>
+ </message>
+ <message>
+ <location line="+29"/>
+ <location line="+52"/>
+ <location line="+71"/>
+ <location line="+28"/>
+ <source>Reference %1 of %2 element cannot be resolved.</source>
+ <translation>%2 elem %1 hivatkozását nem lehet megoldani.</translation>
+ </message>
+ <message>
+ <location line="-138"/>
+ <source>Circular group reference for %1.</source>
+ <translation>Cirkuláris csoport hivatkozás %1-re.</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>%1 element is not allowed in this scope</source>
+ <translation>%1 elem nem engedélyezett ebben a hatókörben</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>%1 element cannot have %2 attribute with value other than %3.</source>
+ <translation>%1 elem nem tartalmazhat %2 attribútumot %3-tól eltérő értékkel.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>%1 element cannot have %2 attribute with value other than %3 or %4.</source>
+ <translation>%1 element nem tartalmazhat %2 attribútumot %3 vagy %4-től eltérő értékkel.</translation>
+ </message>
+ <message>
+ <location line="+91"/>
+ <source>%1 or %2 attribute of reference %3 does not match with the attribute declaration %4.</source>
+ <translation>%3 hivatkozás %1 vagy %2 attribútuma nem egyezik meg a(z) %4 attribútum deklarációval.</translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>Attribute group %1 has circular reference.</source>
+ <translation>%1 attribútum csoport cirkuláris hivatkozást tartalmaz.</translation>
+ </message>
+ <message>
+ <location line="+131"/>
+ <source>%1 attribute in %2 must have %3 use like in base type %4.</source>
+ <translation>%2-ben található %1 attribútumnak %3 használatát kell tartalmaznia, mint a(z) %4 alap típusban.</translation>
+ </message>
+ <message>
+ <location line="+52"/>
+ <source>Attribute wildcard of %1 is not a valid restriction of attribute wildcard of base type %2.</source>
+ <translation>%1 attribútum helyettesítő jele nem a(z) %2 alap típus attribútum helyettesítő jelének egy érvényes korlátozása.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>%1 has attribute wildcard but its base type %2 has not.</source>
+ <translation>%1 attribútum helyettesítő jelet tartalmaz, de a(z) %2 alap típusa nem.</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>Union of attribute wildcard of type %1 and attribute wildcard of its base type %2 is not expressible.</source>
+ <translation>%2 alaptípusának attribútum helyettesítő jele és a(z) %1 típus attribútum helyettesítő jelének union-ja nem kifejezhető.</translation>
+ </message>
+ <message>
+ <location line="+48"/>
+ <source>Enumeration facet contains invalid content: {%1} is not a value of type %2.</source>
+ <translation>Felsorolás oldal érvénytelen tartalmat tartalmaz. {%1} nem egy érvényes %2 típus érték.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Namespace prefix of qualified name %1 is not defined.</source>
+ <translation>%1 minősített név névtér előtagja nincs definiálva.</translation>
+ </message>
+ <message>
+ <location line="+51"/>
+ <location line="+18"/>
+ <source>%1 element %2 is not a valid restriction of the %3 element it redefines: %4.</source>
+ <translation>%2 elem %1 nem a(z) %3 elem egy érvényes korlátozása, újradefininálja: %4.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/schema/qxsdparticlechecker.cpp" line="+165"/>
+ <source>Empty particle cannot be derived from non-empty particle.</source>
+ <translation>Üres részecskét nem lehet egy üres részecskéből származtatni.</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Derived particle is missing element %1.</source>
+ <translation>Származtatott részecskének van egy %1 hiányzó eleme.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Derived element %1 is missing value constraint as defined in base particle.</source>
+ <translation>%1 származtatott elem hiányol egy érték korlátozót, ami az alap részecskében van definiálva.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Derived element %1 has weaker value constraint than base particle.</source>
+ <translation>%1 származtatott elem gyengébb érték korlátozót tartalmaz, mint az alap részecske.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Fixed value constraint of element %1 differs from value constraint in base particle.</source>
+ <translation>%1 elem fix érték korlátozója különbözik az alap részecskében található érték korlátozótól.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Derived element %1 cannot be nillable as base element is not nillable.</source>
+ <translation>%1 származtatott elem nem lehet nullázható, mint ahogy az alap elem sem nullázható.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Block constraints of derived element %1 must not be more weaker than in the base element.</source>
+ <translation>%1 származtatott elem blokk korlátozója nem lehet gyengébb, mint az alap elemben.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Simple type of derived element %1 cannot be validly derived from base element.</source>
+ <translation>%1 származtatott elem egyszerű típusa nem származtatható érvényesen az alap elemből.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Complex type of derived element %1 cannot be validly derived from base element.</source>
+ <translation>%1 származtatott elem komplex típusa nem származtatható érvényesen az alap elemből.</translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>Element %1 is missing in derived particle.</source>
+ <translation>%1 elem hiányzik a származtott récseszkében.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Element %1 does not match namespace constraint of wildcard in base particle.</source>
+ <translation>%1 elem nem egyezik meg az alap részecskében található helyettesítő jel névtér korlátozójával.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Wildcard in derived particle is not a valid subset of wildcard in base particle.</source>
+ <translation>Helyettesítő jel a származtatott részecskénen nem az alap részecskében található helyettesítő jel egy érvényes részhalmaza.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>processContent of wildcard in derived particle is weaker than wildcard in base particle.</source>
+ <translation>A származtatott részecskében található helyettesítő jel folyamatTartalma gyengébb, mint az alap részecskében található helyettesítő jel.</translation>
+ </message>
+ <message>
+ <location line="+240"/>
+ <source>Derived particle allows content that is not allowed in the base particle.</source>
+ <translation>Származtatott részecske engedélyezi a tartalmat, ami nem engedélyezett az alap részecskében.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/schema/qxsdschemaparser.cpp" line="+170"/>
+ <source>Can not process unknown element %1, expected elements are: %2.</source>
+ <translation>Nem lehet feldolgozni ismeretlen %1 elemet, várt elemek: %2.</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Element %1 is not allowed in this scope, possible elements are: %2.</source>
+ <translation>%1 elem nem engedélyezett ebben a hatórközben, lehetséges elemek: %2.</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Child element is missing in that scope, possible child elements are: %1.</source>
+ <translation>Gyermek elem hiányzik abban a hatókörben, lehetséges gyermek elemek: %1.</translation>
+ </message>
+ <message>
+ <location line="+127"/>
+ <source>Document is not a XML schema.</source>
+ <translation>Dokumentum nem egy XML terv.</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>%1 attribute of %2 element contains invalid content: {%3} is not a value of type %4.</source>
+ <translation>%2 elem %1 attribútuma érvénytelen tartalmat tartalmaz: {%3} nem egy %4 típus érték.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>%1 attribute of %2 element contains invalid content: {%3}.</source>
+ <translation>%2 elem %1 attribútuma érvénytelen tartalmat tartalmaz: {%3}.</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>Target namespace %1 of included schema is different from the target namespace %2 as defined by the including schema.</source>
+ <translation>A beleértett terv %1 cél névtere különbözik a %2 cél névtértől, amit a beleértett terv által lett definiálva.</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <location line="+11"/>
+ <source>Target namespace %1 of imported schema is different from the target namespace %2 as defined by the importing schema.</source>
+ <translation>Az importált terv %1 cél névtere különbözik a(z) %2 cél névtértől, ami az importált terv által van definiálva.</translation>
+ </message>
+ <message>
+ <location line="+237"/>
+ <source>%1 element is not allowed to have the same %2 attribute value as the target namespace %3.</source>
+ <translation>%1 elem nem tartalmazhatja ugyanazt a(z) %2 attribútum értéket, mint a(z) %3 cél névtér.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>%1 element without %2 attribute is not allowed inside schema without target namespace.</source>
+ <translation>%1 elem %2 attribútum nélkül nem engedélyezett a vázlaton belül cél névtér nélkül.</translation>
+ </message>
+ <message>
+ <location line="+833"/>
+ <location line="+158"/>
+ <source>%1 element is not allowed inside %2 element if %3 attribute is present.</source>
+ <translation>%1 elem nem engedélyezett a(z) %2 elemen belül, ha %3 attribútum van nyújtva.</translation>
+ </message>
+ <message>
+ <location line="-97"/>
+ <location line="+119"/>
+ <location line="+92"/>
+ <source>%1 element has neither %2 attribute nor %3 child element.</source>
+ <translation>%1 elem nem tartalmaz %2 attribútumot és %3 gyermek elemet sem.</translation>
+ </message>
+ <message>
+ <location line="+835"/>
+ <location line="+1474"/>
+ <location line="+232"/>
+ <location line="+7"/>
+ <location line="+260"/>
+ <location line="+17"/>
+ <location line="+258"/>
+ <location line="+6"/>
+ <location line="+17"/>
+ <location line="+6"/>
+ <location line="+17"/>
+ <location line="+11"/>
+ <location line="+11"/>
+ <location line="+11"/>
+ <source>%1 element with %2 child element must not have a %3 attribute.</source>
+ <translation>%1 elem %2 gyermek elemmel nem tartalmazhat egy %3 attribútumot.</translation>
+ </message>
+ <message>
+ <location line="-1325"/>
+ <source>%1 attribute of %2 element must be %3 or %4.</source>
+ <translation>%2 elem %1 attribútumának %3 vagy %4-nek kell lennie.</translation>
+ </message>
+ <message>
+ <location line="+36"/>
+ <source>%1 attribute of %2 element must have a value of %3.</source>
+ <translation>%2 elem %1 attribútumának %3 egy értékét tartalmaznia kell.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <location line="+34"/>
+ <source>%1 attribute of %2 element must have a value of %3 or %4.</source>
+ <translation>%2 elem %1 attribútumának tartalmaznia kell %3 vagy %4 egy értékét.</translation>
+ </message>
+ <message>
+ <location line="+319"/>
+ <location line="+129"/>
+ <location line="+9"/>
+ <location line="+7"/>
+ <location line="+7"/>
+ <location line="+327"/>
+ <location line="+203"/>
+ <location line="+6"/>
+ <location line="+6"/>
+ <location line="+6"/>
+ <location line="+6"/>
+ <location line="+6"/>
+ <location line="+6"/>
+ <location line="+77"/>
+ <source>%1 element must not have %2 and %3 attribute together.</source>
+ <translation>%1 elemnek tartalmaznia kell %2 és %3 attribútumokat együttesen.</translation>
+ </message>
+ <message>
+ <location line="-768"/>
+ <location line="+222"/>
+ <source>Content of %1 attribute of %2 element must not be from namespace %3.</source>
+ <translation>%2 elem %1 attribútumának tartalmának nem szabad a(z) %3 névtérből lennie.</translation>
+ </message>
+ <message>
+ <location line="-215"/>
+ <location line="+222"/>
+ <source>%1 attribute of %2 element must not be %3.</source>
+ <translation>%2 elem %1 attribútumának nem szabad %3-nak lennie.</translation>
+ </message>
+ <message>
+ <location line="-64"/>
+ <source>%1 attribute of %2 element must have the value %3 because the %4 attribute is set.</source>
+ <translation>%2 elem %1 attribútumának tartalmaznia kell %3 értéket, mert %4 attribútum be van állítva.</translation>
+ </message>
+ <message>
+ <location line="+187"/>
+ <source>Specifying use=&apos;prohibited&apos; inside an attribute group has no effect.</source>
+ <translation>Használat meghatározásának = &apos;tiltott&apos; egy attribútum csoportját belül nincsen hatása.</translation>
+ </message>
+ <message>
+ <location line="+353"/>
+ <source>%1 element must have either %2 or %3 attribute.</source>
+ <translation>%1 elemnek vagy %2 vagy %3 attribútumot tartalmaznia kell.</translation>
+ </message>
+ <message>
+ <location line="+554"/>
+ <source>%1 element must have either %2 attribute or %3 or %4 as child element.</source>
+ <translation>%1 elemnek tartalmaznia kell vagy %2 vagy %3 vagy %4 attribútumot, mint ahogy a gyermek elem.</translation>
+ </message>
+ <message>
+ <location line="+55"/>
+ <source>%1 element requires either %2 or %3 attribute.</source>
+ <translation>%1 elem vagy %2 vagy %3 attribútumot igényli.</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Text or entity references not allowed inside %1 element</source>
+ <translation>Szöveg avgy entitás hivatkozás nem engedélyezett a(z) %1 elemen belül</translation>
+ </message>
+ <message>
+ <location line="+41"/>
+ <location line="+112"/>
+ <source>%1 attribute of %2 element must contain %3, %4 or a list of URIs.</source>
+ <translation>%2 elem %1 attribútumának tartalmaznia kell %3, %4 vagy URI-k egy listáját.</translation>
+ </message>
+ <message>
+ <location line="+126"/>
+ <source>%1 element is not allowed in this context.</source>
+ <translation>%1 elem nem engedélyezett ebben a szöveg környezetben.</translation>
+ </message>
+ <message>
+ <location line="+53"/>
+ <source>%1 attribute of %2 element has larger value than %3 attribute.</source>
+ <translation>%2 elem %1 attribútuma nagyobb értéket tartalmaz, mint a %3 attribútum.</translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>Prefix of qualified name %1 is not defined.</source>
+ <translation>A(z) %1 minősített név előtagja nem definiált.</translation>
+ </message>
+ <message>
+ <location line="+65"/>
+ <location line="+61"/>
+ <source>%1 attribute of %2 element must either contain %3 or the other values.</source>
+ <translation>%2 elem %1 attribútumának vagy %3 vagy más értékeket kell tartalmaznia.</translation>
+ </message>
+ <message>
+ <location line="+131"/>
+ <source>Component with ID %1 has been defined previously.</source>
+ <translation>%1 azonosítóval rendelkezővel komponens előzőleg definiálva lett.</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Element %1 already defined.</source>
+ <translation>%1 elem már definiálva van.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Attribute %1 already defined.</source>
+ <translation>%1 attribútum már definiálva van.</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Type %1 already defined.</source>
+ <translation>%1 típus már definiálva van.</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Attribute group %1 already defined.</source>
+ <translation>%1 csoport attribútum már definiálva van.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Element group %1 already defined.</source>
+ <translation>%1 csoport elem már definiálva van.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Notation %1 already defined.</source>
+ <translation>%1 értesítés már definiálva van.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Identity constraint %1 already defined.</source>
+ <translation>%1 azonosító korlátozó már definiálva van.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Duplicated facets in simple type %1.</source>
+ <translation>Duplikált oldalak %1 egyszerű típusban.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/schema/qxsdtypechecker.cpp" line="+233"/>
+ <location line="+7"/>
+ <location line="+21"/>
+ <source>%1 is not valid according to %2.</source>
+ <translation>%1 nem érvényes %2 szerint.</translation>
+ </message>
+ <message>
+ <location line="+167"/>
+ <source>String content does not match the length facet.</source>
+ <translation>Sztring tartalom nem egyezik a hossz oldallal.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>String content does not match the minLength facet.</source>
+ <translation>Sztring tartalom nem egyezik a minimális hosszúságú felülettel.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>String content does not match the maxLength facet.</source>
+ <translation>Sztring tartalom nem egyezik a maximális hosszúságú felülettel.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>String content does not match pattern facet.</source>
+ <translation>Sztrng tartalom nem egyezik a minta felülettel.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>String content is not listed in the enumeration facet.</source>
+ <translation>Sztring tartalom nincs listázva a felsorol felületben.</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Signed integer content does not match the maxInclusive facet.</source>
+ <translation>Előjeles egész szám tartalom nem egyezik a maximális beleszámított felülettel.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Signed integer content does not match the maxExclusive facet.</source>
+ <translation>Előjeles egész szám tartalom nem egyzik a maximális kizárólagos felülettel.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Signed integer content does not match the minInclusive facet.</source>
+ <translation>Előjeles egész szám tartalom nem egyezik a minimális beleértet felülettel.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Signed integer content does not match the minExclusive facet.</source>
+ <translation>Előjeles egész szám tartalom nem egyezik a minimális kizárólagos felülettel.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Signed integer content is not listed in the enumeration facet.</source>
+ <translation>Előjeles egész szám tartalom nincsen kilistázva a felsorolási felületben.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Signed integer content does not match pattern facet.</source>
+ <translation>Előjeles egész szám tartalom nem egyezik a minta felületben.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Signed integer content does not match in the totalDigits facet.</source>
+ <translation>Előjeles egész szám tartalom nem egyezik a teljesSzámos felület.</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Unsigned integer content does not match the maxInclusive facet.</source>
+ <translation>Nem előjeles egész szám tartalom nem egyezik a maximális beleértett felülettel.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Unsigned integer content does not match the maxExclusive facet.</source>
+ <translation>Nem előjeles egész szám tartalom nem egyezik a maximális kizárólagos felülettel.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Unsigned integer content does not match the minInclusive facet.</source>
+ <translation>Nem előjeles tartalom nem egyezik a minimális beleértett felülettel.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Unsigned integer content does not match the minExclusive facet.</source>
+ <translation>Nem előjeleg egész szám tartalom nem egyezik a beleértett minimális felülettel.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Unsigned integer content is not listed in the enumeration facet.</source>
+ <translation>Nem előjeles egész szám tartalom nincsen kilistázva a felsorolási felületben.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Unsigned integer content does not match pattern facet.</source>
+ <translation>Nem előjeles egész szám tartalom nem egyezik a minta felületben.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Unsigned integer content does not match in the totalDigits facet.</source>
+ <translation>Nem előjeles egész szám tartalom nem egyezik a teljesSzámos felületben.</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Double content does not match the maxInclusive facet.</source>
+ <translation>Dupla tartalom nem egyezik a maximális beleértett felületben.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Double content does not match the maxExclusive facet.</source>
+ <translation>Dupla tartalom nem egyezik a maximális kizárólagos felülettel.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Double content does not match the minInclusive facet.</source>
+ <translation>Dupla tartalom nem egyezik a minimális beleértett felülettel.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Double content does not match the minExclusive facet.</source>
+ <translation>Dupla tartalom nem egyezik a minimális kizárólag felülettel.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Double content is not listed in the enumeration facet.</source>
+ <translation>Dupla tartalom nincs listázva a felsorolási felületben.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Double content does not match pattern facet.</source>
+ <translation>Dupla tartalom nem egyezik a minta felületben.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Decimal content does not match in the fractionDigits facet.</source>
+ <translation>Tizedes tartalom nem egyezik a szám tényezős felületben.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Decimal content does not match in the totalDigits facet.</source>
+ <translation>Tizedes tartalom nem egyezik a teljesenSzámos felületben.</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Date time content does not match the maxInclusive facet.</source>
+ <translation>Dátum idő tartalom nem egyezik a maximális beleértett felülettel.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Date time content does not match the maxExclusive facet.</source>
+ <translation>Dátum idő tartalom nem egyezik a maximális kizárólagos felülettel.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Date time content does not match the minInclusive facet.</source>
+ <translation>Dátum idő tartalom nem egyezik a minimális beleértett felülettel.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Date time content does not match the minExclusive facet.</source>
+ <translation>Dátum idő tartalom nem egyezik a minimális kizárólagos felülettel.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Date time content is not listed in the enumeration facet.</source>
+ <translation>Dátum idő tartalom nincsen kilistázva a felsorolási felületben.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Date time content does not match pattern facet.</source>
+ <translation>Dátum idő tartalom nem egyezik a minta felületben.</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Duration content does not match the maxInclusive facet.</source>
+ <translation>Tartalom időtartam nem egyezik a maximális beleértett felülettel.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Duration content does not match the maxExclusive facet.</source>
+ <translation>Tartalom időtartam nem egyezik a maximális kizárólagos felülettel.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Duration content does not match the minInclusive facet.</source>
+ <translation>Tartalom időtartam nem egyezik a minimális benne foglalt felülettel.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Duration content does not match the minExclusive facet.</source>
+ <translation>Tartalom időtartam nem egyezik a minimális kizárólagos felülettel.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Duration content is not listed in the enumeration facet.</source>
+ <translation>Tartalom időtartam nincs listázva a felsorolási felületben.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Duration content does not match pattern facet.</source>
+ <translation>Tartalom időtartam nem egyezik a felület mintában.</translation>
+ </message>
+ <message>
+ <location line="+27"/>
+ <source>Boolean content does not match pattern facet.</source>
+ <translation>Logikai tartalom nem egyezik a minta felületben.</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Binary content does not match the length facet.</source>
+ <translation>Bináris tartalom nem egyezik a hossz felületben.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Binary content does not match the minLength facet.</source>
+ <translation>Bináris tartalom nem egyezik a minimális hossz felületben.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Binary content does not match the maxLength facet.</source>
+ <translation>Bináris tartalom nem egyezik a maximális hossz felületben.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Binary content is not listed in the enumeration facet.</source>
+ <translation>Bináris tartalom nincsen kilistázva a felsorolási felületben.</translation>
+ </message>
+ <message>
+ <location line="+27"/>
+ <source>Invalid QName content: %1.</source>
+ <translation>Érvénytelen QName tartalom: %1.</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>QName content is not listed in the enumeration facet.</source>
+ <translation>QName tartalom nincsen kilistázva a felsorolási felületben.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>QName content does not match pattern facet.</source>
+ <translation>QName tartalom nem egyezik a mintha felületben.</translation>
+ </message>
+ <message>
+ <location line="+36"/>
+ <source>Notation content is not listed in the enumeration facet.</source>
+ <translation>Tartalom jelölés nincsen kilistázva a felsorolási felületben.</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>List content does not match length facet.</source>
+ <translation>Tartalom lista nem egyezik a hossz felületben.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>List content does not match minLength facet.</source>
+ <translation>Tartalmi lista nem egyezik a minimális hossz felületben.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>List content does not match maxLength facet.</source>
+ <translation>Tartalmi list nem egyezik a maximális hossz felületen.</translation>
+ </message>
+ <message>
+ <location line="+90"/>
+ <source>List content is not listed in the enumeration facet.</source>
+ <translation>Tartalmi lista nincsen kilistázva a felsorolási felületen.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>List content does not match pattern facet.</source>
+ <translation>Tartalmi lista nem egyezik a minta felületen.</translation>
+ </message>
+ <message>
+ <location line="+39"/>
+ <source>Union content is not listed in the enumeration facet.</source>
+ <translation>Egység tartalom nincsen kilistázva a felsorolási felületen.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Union content does not match pattern facet.</source>
+ <translation>Egység tartalom nem egyezik a minta felületen.</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Data of type %1 are not allowed to be empty.</source>
+ <translation>%1 típus adata nem engedélyezett, hogy üres legyen.</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp" line="+160"/>
+ <source>Element %1 is missing child element.</source>
+ <translation>%1 elem hiányzik a gyermek elemből.</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>There is one IDREF value with no corresponding ID: %1.</source>
+ <translation>Van egy IDREF érték nem megfelelő azonosítóval: %1.</translation>
+ </message>
+ <message>
+ <location line="+27"/>
+ <source>Loaded schema file is invalid.</source>
+ <translation>Betöltött terv fájl nem létezik.</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>%1 contains invalid data.</source>
+ <translation>%1 érvénytelen adatot tartalmaz.</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>xsi:schemaLocation namespace %1 has already appeared earlier in the instance document.</source>
+ <translation>xsi:tervElhelyezkedés %1 névtér már előfordult korábban a példa dokumentumban.</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>xsi:noNamespaceSchemaLocation cannot appear after the first no-namespace element or attribute.</source>
+ <translation>xsi:tervElhelyezkedés névtér nem fordulhat elő az első nem névtér elem vagy attribútum után.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>No schema defined for validation.</source>
+ <translation>Nincsen terv definiálva jóváhagyásra.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>No definition for element %1 available.</source>
+ <translation>Nincsen elérhető definíció a(z) %1 elemre.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <location line="+49"/>
+ <location line="+142"/>
+ <source>Specified type %1 is not known to the schema.</source>
+ <translation>%1 meghatározott típus ismeretlen a terv számára.</translation>
+ </message>
+ <message>
+ <location line="-176"/>
+ <source>Element %1 is not defined in this scope.</source>
+ <translation>%1 elem nincs definiálva ebben a hatókörben.</translation>
+ </message>
+ <message>
+ <location line="+43"/>
+ <source>Declaration for element %1 does not exist.</source>
+ <translation>%1 elem deklaráció nem létezik.</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Element %1 contains invalid content.</source>
+ <translation>%1 elem érvénytelen tartalmat tartalmaz.</translation>
+ </message>
+ <message>
+ <location line="+73"/>
+ <source>Element %1 is declared as abstract.</source>
+ <translation>%1 elem elvontkét lett deklarálva.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Element %1 is not nillable.</source>
+ <translation>%1 elem nem nullázható.</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Attribute %1 contains invalid data: %2</source>
+ <translation>%1 attribútum érvénytelen adatokat tartalmaz: %2</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Element contains content although it is nillable.</source>
+ <translation>Elem nem nullázható elemeket tartalmaz.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Fixed value constraint not allowed if element is nillable.</source>
+ <translation>Fix érték korlátozó nem engedélyezett, ha az elem nullázható.</translation>
+ </message>
+ <message>
+ <location line="+230"/>
+ <source>Element %1 cannot contain other elements, as it has a fixed content.</source>
+ <translation>%1 nem tartalmazhat másik elemeket, mint ennek is egy fix mérete van.</translation>
+ </message>
+ <message>
+ <location line="-198"/>
+ <source>Specified type %1 is not validly substitutable with element type %2.</source>
+ <translation>%1 meghatározott típus nem helyettesíthető érvényesen %2 elem típussal.</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Complex type %1 is not allowed to be abstract.</source>
+ <translation>%1 komplex típus nem engedélyezett, hogy elvont legyen.</translation>
+ </message>
+ <message>
+ <location line="+21"/>
+ <source>Element %1 contains not allowed attributes.</source>
+ <translation>%1 nem engedélyezett attribútumokat tartalmaz.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <location line="+97"/>
+ <source>Element %1 contains not allowed child element.</source>
+ <translation>%1 nem engedélyezett gyermek attribútumokat tartalmaz.</translation>
+ </message>
+ <message>
+ <location line="-76"/>
+ <location line="+93"/>
+ <source>Content of element %1 does not match its type definition: %2.</source>
+ <translation>%1 elem tartalma nem egyezik meg a típus definíciójával: %2.</translation>
+ </message>
+ <message>
+ <location line="-85"/>
+ <location line="+92"/>
+ <location line="+41"/>
+ <source>Content of element %1 does not match defined value constraint.</source>
+ <translation>%1 elem tartalma nem egyezik meg a definiált érték korlátozóval.</translation>
+ </message>
+ <message>
+ <location line="-73"/>
+ <source>Element %1 contains not allowed child content.</source>
+ <translation>%1 nem engedélyezett gyermek tartalmat tartalmaz.</translation>
+ </message>
+ <message>
+ <location line="+41"/>
+ <source>Element %1 contains not allowed text content.</source>
+ <translation>%1 nem engedélyezett szöveg tartalmat tartalmaz.</translation>
+ </message>
+ <message>
+ <location line="+61"/>
+ <source>Element %1 is missing required attribute %2.</source>
+ <translation>%1 hiányzik, %2 attribútum igényli.</translation>
+ </message>
+ <message>
+ <location line="+29"/>
+ <source>Attribute %1 does not match the attribute wildcard.</source>
+ <translation>%1 attribűtum nem egyezik meg az attribútum helyettesítő jellel.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Declaration for attribute %1 does not exist.</source>
+ <translation>%1 attribútum deklarációja nem létezik.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Element %1 contains two attributes of type %2.</source>
+ <translation>%1 elem %2 típus két attribútumát tartalmazza.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Attribute %1 contains invalid content.</source>
+ <translation>%1 attribútum érvénytelen tartalmaz tartalmaz.</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Element %1 contains unknown attribute %2.</source>
+ <translation>%1 elem ismeretlen %2 attribútumokat tartalmaz.</translation>
+ </message>
+ <message>
+ <location line="+40"/>
+ <location line="+46"/>
+ <source>Content of attribute %1 does not match its type definition: %2.</source>
+ <translation>%1 attribútum tartalma nem egyezik a típus definíciójával: %2.</translation>
+ </message>
+ <message>
+ <location line="-38"/>
+ <location line="+46"/>
+ <source>Content of attribute %1 does not match defined value constraint.</source>
+ <translation>%1 attribútum tartalma nem egyezik meg a definiált érték korlátozóval.</translation>
+ </message>
+ <message>
+ <location line="+88"/>
+ <source>Non-unique value found for constraint %1.</source>
+ <translation>Nem található egyedülálló érték a(z) %1 módosítóra.</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Key constraint %1 contains absent fields.</source>
+ <translation>%1 kulcs korlátozó hiányzó mezőket tartalmaz.</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Key constraint %1 contains references nillable element %2.</source>
+ <translation>%1 kulcs korlátozó hivatkozásokat nem tartalmaz nullázható %2 elemekre.</translation>
+ </message>
+ <message>
+ <location line="+40"/>
+ <source>No referenced value found for key reference %1.</source>
+ <translation>Nem található referencia érték a(z) %1 kulcs referenciára.</translation>
+ </message>
+ <message>
+ <location line="+64"/>
+ <source>More than one value found for field %1.</source>
+ <translation>Több mint egy érték található a(z) %1-es mezőre.</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Field %1 has no simple type.</source>
+ <translation>%1 mezőnek nincsen egyszerű típusa.</translation>
+ </message>
+ <message>
+ <location line="+73"/>
+ <source>ID value &apos;%1&apos; is not unique.</source>
+ <translation>%1 azonosító érték nem egyedülálló.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>&apos;%1&apos; attribute contains invalid QName content: %2.</source>
+ <translation>%1 attribútum érvénytelen QName tartalmaz tartalmaz: %2.</translation>
+ </message>
+</context>
+</TS>
diff --git a/translations/qt_ja_JP.ts b/translations/qt_ja_JP.ts
index 493f3a2e23..f0dae3aac5 100644
--- a/translations/qt_ja_JP.ts
+++ b/translations/qt_ja_JP.ts
@@ -2,6 +2,29 @@
<!DOCTYPE TS>
<TS version="2.0" language="ja">
<context>
+ <name>MAC_APPLICATION_MENU</name>
+ <message>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2316"/>
+ <source>Services</source>
+ <translation>サービス</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide %1</source>
+ <translation>%1ã‚’éš ã™</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide Others</source>
+ <translation>ã»ã‹ã‚’éš ã™</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Show All</source>
+ <translation>ã™ã¹ã¦ã‚’表示</translation>
+ </message>
+</context>
+<context>
<name>CloseButton</name>
<message>
<location filename="../src/gui/widgets/qtabbar.cpp" line="+2253"/>
diff --git a/translations/qt_pl.ts b/translations/qt_pl.ts
index e219c9a524..bf6e1fe331 100644
--- a/translations/qt_pl.ts
+++ b/translations/qt_pl.ts
@@ -2,6 +2,29 @@
<!DOCTYPE TS>
<TS version="2.0" language="pl">
<context>
+ <name>MAC_APPLICATION_MENU</name>
+ <message>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2316"/>
+ <source>Services</source>
+ <translation>Usługi</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide %1</source>
+ <translation>Ukryj %1</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide Others</source>
+ <translation>Ukryj pozostałe</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Show All</source>
+ <translation>Pokaż wszystko</translation>
+ </message>
+</context>
+<context>
<name>CloseButton</name>
<message>
<location filename="../src/gui/widgets/qtabbar.cpp" line="+2264"/>
diff --git a/translations/qt_pt.ts b/translations/qt_pt.ts
index 101267c01c..7ca7fe7f3d 100644
--- a/translations/qt_pt.ts
+++ b/translations/qt_pt.ts
@@ -2,6 +2,29 @@
<!DOCTYPE TS>
<TS version="2.0" language="pt_PT">
<context>
+ <name>MAC_APPLICATION_MENU</name>
+ <message>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2316"/>
+ <source>Services</source>
+ <translation>Serviços</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide %1</source>
+ <translation>Ocultar %1</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide Others</source>
+ <translation>Ocultar Outros</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Show All</source>
+ <translation>Mostrar Tudo</translation>
+ </message>
+</context>
+<context>
<name>AudioOutput</name>
<message>
<location filename="../src/3rdparty/phonon/phonon/audiooutput.cpp" line="+375"/>
diff --git a/translations/qt_ru.ts b/translations/qt_ru.ts
index 9a2ad84aa0..641d7aafd8 100644
--- a/translations/qt_ru.ts
+++ b/translations/qt_ru.ts
@@ -2,6 +2,29 @@
<!DOCTYPE TS>
<TS version="2.0" language="ru_RU">
<context>
+ <name>MAC_APPLICATION_MENU</name>
+ <message>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2316"/>
+ <source>Services</source>
+ <translation>Службы</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide %1</source>
+ <translation>Скрыть %1</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide Others</source>
+ <translation>Скрыть оÑтальные</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Show All</source>
+ <translation>Показать вÑе</translation>
+ </message>
+</context>
+<context>
<name>CloseButton</name>
<message>
<location filename="../src/gui/widgets/qtabbar.cpp" line="+2264"/>
diff --git a/translations/qt_sv.ts b/translations/qt_sv.ts
index 61fc081f6f..391af4abcb 100644
--- a/translations/qt_sv.ts
+++ b/translations/qt_sv.ts
@@ -2,6 +2,29 @@
<!DOCTYPE TS>
<TS version="2.0">
<context>
+ <name>MAC_APPLICATION_MENU</name>
+ <message>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2316"/>
+ <source>Services</source>
+ <translation>Tjänster</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide %1</source>
+ <translation>Göm %1</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide Others</source>
+ <translation>Göm övriga</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Show All</source>
+ <translation>Visa alla</translation>
+ </message>
+</context>
+<context>
<name>AudioOutput</name>
<message>
<location filename="../src/3rdparty/phonon/phonon/audiooutput.cpp" line="+375"/>
diff --git a/translations/qt_zh_CN.ts b/translations/qt_zh_CN.ts
index a3f20a1302..d6a995dfa3 100644
--- a/translations/qt_zh_CN.ts
+++ b/translations/qt_zh_CN.ts
@@ -2,6 +2,29 @@
<!DOCTYPE TS>
<TS version="2.0" language="zh">
<context>
+ <name>MAC_APPLICATION_MENU</name>
+ <message>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2316"/>
+ <source>Services</source>
+ <translation>æœåŠ¡</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide %1</source>
+ <translation>éšè—%1</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide Others</source>
+ <translation>éšè—其他</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Show All</source>
+ <translation>全部显示</translation>
+ </message>
+</context>
+<context>
<name>AudioOutput</name>
<message>
<location filename="../src/3rdparty/phonon/phonon/audiooutput.cpp" line="+375"/>
diff --git a/translations/qt_zh_TW.ts b/translations/qt_zh_TW.ts
index a2cd27e788..50c004893b 100644
--- a/translations/qt_zh_TW.ts
+++ b/translations/qt_zh_TW.ts
@@ -2,6 +2,29 @@
<!DOCTYPE TS>
<TS version="2.0" language="zh_TW">
<context>
+ <name>MAC_APPLICATION_MENU</name>
+ <message>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2316"/>
+ <source>Services</source>
+ <translation>æœå‹™</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide %1</source>
+ <translation>éš±è—%1</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Hide Others</source>
+ <translation>éš±è—其他</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Show All</source>
+ <translation>顯示全部</translation>
+ </message>
+</context>
+<context>
<name>AudioOutput</name>
<message>
<location filename="../src/3rdparty/phonon/phonon/audiooutput.cpp" line="+375"/>
diff --git a/translations/qtconfig_hu.ts b/translations/qtconfig_hu.ts
new file mode 100644
index 0000000000..0eaead04d3
--- /dev/null
+++ b/translations/qtconfig_hu.ts
@@ -0,0 +1,920 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="hu">
+<context>
+ <name>MainWindow</name>
+ <message>
+ <location filename="../tools/qtconfig/mainwindow.cpp" line="+202"/>
+ <source>Desktop Settings (Default)</source>
+ <translation>Asztali beállítások (Alapértelmezett)</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Choose style and palette based on your desktop settings.</source>
+ <translation>Stílus és paletta alapú kiválasztása az asztali beállításokban.</translation>
+ </message>
+ <message>
+ <location line="+144"/>
+ <source>On The Spot</source>
+ <translation>Azon nyomban</translation>
+ </message>
+ <message>
+ <location line="+33"/>
+ <location line="+1"/>
+ <location line="+38"/>
+ <location line="+1"/>
+ <source>Auto (default)</source>
+ <translation>Automatikus (alapértelmezett)</translation>
+ </message>
+ <message>
+ <location line="-38"/>
+ <source>Choose audio output automatically.</source>
+ <translation>Audió kimenet automatikus kiválasztása.</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <location line="+1"/>
+ <source>aRts</source>
+ <translation>aRts</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Experimental aRts support for GStreamer.</source>
+ <translation>Kísérleti aRts támogatás a GStreamerhez.</translation>
+ </message>
+ <message>
+ <location line="+31"/>
+ <source>Phonon GStreamer backend not available.</source>
+ <translation>Phonon GStreamer backend nem elérhető.</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Choose render method automatically</source>
+ <translation>Render eljárás automatikus kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <location line="+1"/>
+ <source>X11</source>
+ <translation>X11</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Use X11 Overlays</source>
+ <translation>X11 borítás használata</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location line="+1"/>
+ <source>OpenGL</source>
+ <translation>OpenGL</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Use OpenGL if avaiable</source>
+ <translation>OpenGL használata, ha rendelkezésre áll</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <location line="+1"/>
+ <source>Software</source>
+ <translation>Szoftver</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Use simple software rendering</source>
+ <translation>Egyszerű szoftver adás használata</translation>
+ </message>
+ <message>
+ <location line="+27"/>
+ <source>No changes to be saved.</source>
+ <translation>A változtatások nincsenek elmentve.</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Saving changes...</source>
+ <translation>Változtatások elmentése...</translation>
+ </message>
+ <message>
+ <location line="+48"/>
+ <source>Over The Spot</source>
+ <translation>Célon túlmenően</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Off The Spot</source>
+ <translation>Elkalandozás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Root</source>
+ <translation>Rendszergazda</translation>
+ </message>
+ <message>
+ <location line="+466"/>
+ <source>Select a Directory</source>
+ <translation>Egy könyvtár kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>&lt;h3&gt;%1&lt;/h3&gt;&lt;br/&gt;Version %2&lt;br/&gt;&lt;br/&gt;Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</source>
+ <translation>&lt;h3&gt;%1&lt;/h3&gt;&lt;br/&gt;Verzió %2&lt;br/&gt;&lt;br/&gt;Szerzői jog (C) 2010 Nokia vállalat és/vagy leányvállalata(i).</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <location line="+1"/>
+ <location line="+8"/>
+ <source>Qt Configuration</source>
+ <translation>Qt Konfiguráció</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Save Changes</source>
+ <translation>Változtatások elmentése</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Save changes to settings?</source>
+ <translation>Változtatások elmentése a beállításokba ?</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Yes</source>
+ <translation>&amp;Igen</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>&amp;No</source>
+ <translation>&amp;Nem</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>&amp;Cancel</source>
+ <translation>&amp;Mégse</translation>
+ </message>
+</context>
+<context>
+ <name>MainWindowBase</name>
+ <message>
+ <location filename="../tools/qtconfig/mainwindowbase.ui" line="+54"/>
+ <source>Qt Configuration</source>
+ <translation>Qt Konfiguráció
+</translation>
+ </message>
+ <message>
+ <location line="+35"/>
+ <source>Appearance</source>
+ <translation>Feltűnés</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>GUI Style</source>
+ <translation>GUI Stílus</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Select GUI &amp;Style:</source>
+ <translation>GUI &amp;Stílus kiválasztása:</translation>
+ </message>
+ <message>
+ <location line="+88"/>
+ <source>Build Palette</source>
+ <translation>Építési paletta</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>&amp;3-D Effects:</source>
+ <translation>&amp;3 D Hatások:</translation>
+ </message>
+ <message>
+ <location line="+31"/>
+ <source>Window Back&amp;ground:</source>
+ <translation>Ablak Hát&amp;tér:</translation>
+ </message>
+ <message>
+ <location line="+35"/>
+ <source>&amp;Tune Palette...</source>
+ <translation>&amp;Hangolási paletta...</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Please use the KDE Control Center to set the palette.</source>
+ <translation>Kérem használja a KDE Vezérlő Központot a paletta beállításához.</translation>
+ </message>
+ <message>
+ <location line="-154"/>
+ <source>Preview</source>
+ <translation>Előnézet</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Select &amp;Palette:</source>
+ <translation>&amp;Paletta kiválasztása:</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Active Palette</source>
+ <translation>Aktív paletta</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Inactive Palette</source>
+ <translation>Inaktív paletta</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Disabled Palette</source>
+ <translation>Tiltott paletta</translation>
+ </message>
+ <message>
+ <location line="+138"/>
+ <source>Fonts</source>
+ <translation>Betűk</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Default Font</source>
+ <translation>Alapértelmezett betű</translation>
+ </message>
+ <message>
+ <location line="+45"/>
+ <source>&amp;Style:</source>
+ <translation>&amp;Stílus:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>&amp;Point Size:</source>
+ <translation>&amp;Pont méret:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>F&amp;amily:</source>
+ <translation>Csa&amp;lád:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Sample Text</source>
+ <translation>Minta szöveg</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Font Substitution</source>
+ <translation>Betű helyettesítés</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>S&amp;elect or Enter a Family:</source>
+ <translation>Egy család ki&amp;választása vgy bevitele:</translation>
+ </message>
+ <message>
+ <location line="+38"/>
+ <source>Current Substitutions:</source>
+ <translation>Aktuális helyettesítés:</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <location line="+501"/>
+ <source>Up</source>
+ <translation>Fel</translation>
+ </message>
+ <message>
+ <location line="-494"/>
+ <location line="+508"/>
+ <source>Down</source>
+ <translation>Le</translation>
+ </message>
+ <message>
+ <location line="-501"/>
+ <location line="+494"/>
+ <source>Remove</source>
+ <translation>Eltávolítás</translation>
+ </message>
+ <message>
+ <location line="-464"/>
+ <source>Select s&amp;ubstitute Family:</source>
+ <translation>Család &amp;helyettesítésének kiválasztása:</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <location line="+487"/>
+ <source>Add</source>
+ <translation>Hozzáad</translation>
+ </message>
+ <message>
+ <location line="-474"/>
+ <source>Interface</source>
+ <translation>Interfész</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Feel Settings</source>
+ <translation>Érzet beállítások</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <location line="+26"/>
+ <source> ms</source>
+ <translation> ms</translation>
+ </message>
+ <message>
+ <location line="-13"/>
+ <source>&amp;Double Click Interval:</source>
+ <translation>&amp;Dupla kattintási intervallum:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>No blinking</source>
+ <translation>Nincs villogás</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>&amp;Cursor Flash Time:</source>
+ <translation>&amp;Kurzor flash idő:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source> lines</source>
+ <translation>sorok</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Wheel &amp;Scroll Lines:</source>
+ <translation>Kerék sor &amp;görgetés:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Resolve symlinks in URLs</source>
+ <translation>URL-ben található szimlinkek megoldása</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>GUI Effects</source>
+ <translation>GUI hatások</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>&amp;Enable</source>
+ <translation>&amp;Engedélyezés</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Alt+E</source>
+ <translation>Alt+E</translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>&amp;Menu Effect:</source>
+ <translation>&amp;Menü hatás:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>C&amp;omboBox Effect:</source>
+ <translation>C&amp;omboBox hatás:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>&amp;ToolTip Effect:</source>
+ <translation>&amp;Eszköz tipp hatás:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Tool&amp;Box Effect:</source>
+ <translation>Eszköz&amp;doboz hatás:</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <location line="+19"/>
+ <location line="+14"/>
+ <location line="+19"/>
+ <source>Disable</source>
+ <translation>Tiltás</translation>
+ </message>
+ <message>
+ <location line="-47"/>
+ <location line="+19"/>
+ <location line="+14"/>
+ <location line="+19"/>
+ <source>Animate</source>
+ <translation>Animálás</translation>
+ </message>
+ <message>
+ <location line="-47"/>
+ <location line="+33"/>
+ <source>Fade</source>
+ <translation>Elhalkulás</translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <source>Global Strut</source>
+ <translation>Globális struktúra</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Minimum &amp;Width:</source>
+ <translation>Minimum &amp;szélesség:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Minimum Hei&amp;ght:</source>
+ <translation>Minimum ma&amp;gasség:</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <location line="+10"/>
+ <source> pixels</source>
+ <translation>pixelek</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Enhanced support for languages written right-to-left</source>
+ <translation>Kiterjesztett támogatás a jobbról balra írt nyelvek számára</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>XIM Input Style:</source>
+ <translation>XIM beviteli stílus:</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>On The Spot</source>
+ <translation>Azon nyomban</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Over The Spot</source>
+ <translation>Célon túlmenően</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Off The Spot</source>
+ <translation>Elkalandozás</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Root</source>
+ <translation>Rendszergazda</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Default Input Method:</source>
+ <translation>Alapértelmezett beviteli eljárás:</translation>
+ </message>
+ <message>
+ <location line="+31"/>
+ <source>Printer</source>
+ <translation>Nyomtató</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Enable Font embedding</source>
+ <translation>Betű beágyazás engedélyezése</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Font Paths</source>
+ <translation>Betű útvonalak</translation>
+ </message>
+ <message>
+ <location line="+77"/>
+ <source>Browse...</source>
+ <translation>Böngészés...</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Press the &lt;b&gt;Browse&lt;/b&gt; button or enter a directory and press Enter to add them to the list.</source>
+ <translation>Nyomja meg a &lt;b&gt;Böngészés&lt;/b&gt; gombot vagy lépjen be egy könyvtárba és nyomja meg az Enter gombot hogy hozzáadja őket a listához.</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Phonon</source>
+ <translation>Phonon</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>About Phonon</source>
+ <translation>Phonon-ról</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <location line="+44"/>
+ <source>Current Version:</source>
+ <translation>Aktuális verzió:</translation>
+ </message>
+ <message>
+ <location line="-37"/>
+ <location line="+44"/>
+ <source>Not available</source>
+ <translation>Nem elérhető</translation>
+ </message>
+ <message>
+ <location line="-37"/>
+ <location line="+44"/>
+ <source>Website:</source>
+ <translation>Weblap:</translation>
+ </message>
+ <message>
+ <location line="-37"/>
+ <source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Sans Serif&apos;; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://phonon.kde.org&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://phonon.kde.org&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+ <translation>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Sans Serif&apos;; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://phonon.kde.org&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://phonon.kde.org&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>About GStreamer</source>
+ <translation>GStreamer-ről</translation>
+ </message>
+ <message>
+ <location line="+27"/>
+ <source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Sans Serif&apos;; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://gstreamer.freedesktop.org/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://gstreamer.freedesktop.org/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+ <translation>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Sans Serif&apos;; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://gstreamer.freedesktop.org/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://gstreamer.freedesktop.org/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>GStreamer backend settings</source>
+ <translation>GStreamer backend beállítások</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Preferred audio sink:</source>
+ <translation>Preferrált audió tartály:</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Preferred render method:</source>
+ <translation>Preferrált render eljárás:</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Sans Serif&apos;; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Note: changes to these settings may prevent applications from starting up correctly.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+ <translation>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Sans Serif&apos;; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Megjegyzés: Ezekben a beállításokban történő változtatások megakadályozhatják az alkalmazásokat a megfelelő betöltéstől.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+ </message>
+ <message>
+ <location line="+68"/>
+ <source>&amp;File</source>
+ <translation>&amp;Fájl</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>&amp;Help</source>
+ <translation>&amp;Súgó</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>&amp;Save</source>
+ <translation>&amp;Mentés</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Save</source>
+ <translation>Mentés</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Ctrl+S</source>
+ <translation>Ctrl+S</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>E&amp;xit</source>
+ <translation>&amp;Kilépés</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Exit</source>
+ <translation>Kilépés</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>&amp;About</source>
+ <translation>&amp;Névjegy</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>About</source>
+ <translation>Névjegy</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>About &amp;Qt</source>
+ <translation>&amp;Qt-ról</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>About Qt</source>
+ <translation>Qt-ról</translation>
+ </message>
+</context>
+<context>
+ <name>PaletteEditorAdvancedBase</name>
+ <message>
+ <location filename="../tools/qtconfig/paletteeditoradvancedbase.ui" line="+61"/>
+ <source>Tune Palette</source>
+ <translation>Hangoló paletta</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>&lt;b&gt;Edit Palette&lt;/b&gt;&lt;p&gt;Change the palette of the current widget or form.&lt;/p&gt;&lt;p&gt;Use a generated palette or select colors for each color group and each color role.&lt;/p&gt;&lt;p&gt;The palette can be tested with different widget layouts in the preview section.&lt;/p&gt;</source>
+ <translation>&lt;b&gt;Paletta szerkesztése&lt;/b&gt;&lt;p&gt;Az aktuális widget vagy űrlap palettájának megváltoztatása&lt;/p&gt;&lt;p&gt;Egy generált paletta használata vagy szín kiválasztás mindegyik színcsoport és szín szabályra.&lt;/p&gt;&lt;p&gt;A paletta tesztelhető különböző widget szerkezetekkel az előnézeti szegmensben.&lt;/p&gt;</translation>
+ </message>
+ <message>
+ <location line="+29"/>
+ <source>Select &amp;Palette:</source>
+ <translation>&amp;Paletta kiválasztása:</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Active Palette</source>
+ <translation>Aktív paletta</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Inactive Palette</source>
+ <translation>Inaktív paletta</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Disabled Palette</source>
+ <translation>Paletta tiltása</translation>
+ </message>
+ <message>
+ <location line="+21"/>
+ <source>Auto</source>
+ <translation>Auto</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Build inactive palette from active</source>
+ <translation>Inaktív paletta építése aktívból</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Build disabled palette from active</source>
+ <translation>Tiltott paletta építése aktívból</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Central color &amp;roles</source>
+ <translation>Központi szín &amp;szabályok</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Choose central color role</source>
+ <translation>Központi szín szabályok kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&lt;b&gt;Select a color role.&lt;/b&gt;&lt;p&gt;Available central roles are: &lt;ul&gt; &lt;li&gt;Window - general background color.&lt;/li&gt; &lt;li&gt;WindowText - general foreground color. &lt;/li&gt; &lt;li&gt;Base - used as background color for e.g. text entry widgets, usually white or another light color. &lt;/li&gt; &lt;li&gt;Text - the foreground color used with Base. Usually this is the same as WindowText, in what case it must provide good contrast both with Window and Base. &lt;/li&gt; &lt;li&gt;Button - general button background color, where buttons need a background different from Window, as in the Macintosh style. &lt;/li&gt; &lt;li&gt;ButtonText - a foreground color used with the Button color. &lt;/li&gt; &lt;li&gt;Highlight - a color to indicate a selected or highlighted item. &lt;/li&gt; &lt;li&gt;HighlightedText - a text color that contrasts to Highlight. &lt;/li&gt; &lt;li&gt;BrightText - a text color that is very different from WindowText and contrasts well with e.g. black. &lt;/li&gt; &lt;/ul&gt; &lt;/p&gt;</source>
+ <translation>&lt;b&gt;Egy szín szabály kiválasztása.&lt;/b&gt;&lt;p&gt;Az elérhetp központi szabályok: &lt;ul&gt; &lt;li&gt;Ablak - általános háttér szín.&lt;/li&gt; &lt;li&gt;AblakSzöveg - általános előtér szín. &lt;/li&gt; &lt;li&gt;Alap - háttérszínként használva példul szöveg beviteli widgetekre, rendszerint fehér vagy más világos színekre. &lt;/li&gt; &lt;li&gt;Szöveg - az előtér szín van haszálva a bázissal. Rendszerint ez ugyanaz, mint az AblakSzöveg, amilyen esetekben egy jó ellentétet kell biztosítania mindkettőre Ablakkal és Bázissal. &lt;/li&gt; &lt;li&gt;Gomb - általános gomb háttér szín, ahol a gomboknak szüksége van egy háttére ami különbözik az ablakétól, mint a Macintosh stílusban. &lt;/li&gt; &lt;li&gt;GombSzöveg - egy előtér szín van használva gomb színnel. &lt;/li&gt; &lt;li&gt;Kihangsúlyozás - egy szín a kiválasztott vagy kihangsúlyozott elem jelölésére. &lt;/li&gt; &lt;li&gt;KihangsúlyozottSzöveg - egy szöveg szín, ami ellentétes a kihangsúlyozással. &lt;/li&gt; &lt;li&gt;VilágosSzöveg - egy szöveg szín, ami nagyon különböző az AblakSzövegtől és a kontrasztoktól jól van példul feketével. &lt;/li&gt; &lt;/ul&gt; &lt;/p&gt;</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Window</source>
+ <translation>Ablak</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>WindowText</source>
+ <translation>AblakSzöveg</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Button</source>
+ <translation>Gomb</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Base</source>
+ <translation>Bázis</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Text</source>
+ <translation>Szöveg</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>BrightText</source>
+ <translation>VilágosSzöveg</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>ButtonText</source>
+ <translation>GombSzöveg</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Highlight</source>
+ <translation>Kihangsúlyozás</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>HighlightedText</source>
+ <translation>KihangsúlyozottSzöveg</translation>
+ </message>
+ <message>
+ <location line="+52"/>
+ <source>&amp;Select Color:</source>
+ <translation>Szín &amp;kiválasztása:</translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <location line="+171"/>
+ <source>Choose a color</source>
+ <translation>Egy szín kiválasztása</translation>
+ </message>
+ <message>
+ <location line="-168"/>
+ <source>Choose a color for the selected central color role.</source>
+ <translation>Egy szín kiválasztása a kiválasztott központi szín szabályokra.</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>3-D shadow &amp;effects</source>
+ <translation>3 D árnyék &amp;hatások</translation>
+ </message>
+ <message>
+ <location line="+29"/>
+ <source>Build &amp;from button color</source>
+ <translation>Építés gomb szín&amp;ből</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Generate shadings</source>
+ <translation>Ãrnyékolások generálása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Check to let 3D-effect colors be calculated from button-color.</source>
+ <translation></translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Choose 3D-effect color role</source>
+ <translation>3D hatás szín szabályok kiválasztása</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&lt;b&gt;Select a color role.&lt;/b&gt;&lt;p&gt;Available effect roles are: &lt;ul&gt; &lt;li&gt;Light - lighter than Button color. &lt;/li&gt; &lt;li&gt;Midlight - between Button and Light. &lt;/li&gt; &lt;li&gt;Mid - between Button and Dark. &lt;/li&gt; &lt;li&gt;Dark - darker than Button. &lt;/li&gt; &lt;li&gt;Shadow - a very dark color. &lt;/li&gt; &lt;/ul&gt;</source>
+ <translation></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Light</source>
+ <translation>Világos</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Midlight</source>
+ <translation>Központi fény</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Mid</source>
+ <translation>Középső</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Dark</source>
+ <translation>Sötét</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Shadow</source>
+ <translation>Ãrnyék</translation>
+ </message>
+ <message>
+ <location line="+54"/>
+ <source>Select Co&amp;lor:</source>
+ <translation>&amp;Szín kiválasztása:</translation>
+ </message>
+ <message>
+ <location line="+27"/>
+ <source>Choose a color for the selected effect color role.</source>
+ <translation>Egy szín kiválasztása a kiválaszott hatás szín szabályra.</translation>
+ </message>
+ <message>
+ <location line="+42"/>
+ <source>OK</source>
+ <translation>OK</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Close dialog and apply all changes.</source>
+ <translation>Párbeszéd ablak bezárása és az összes változtatás alkalmazása.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Cancel</source>
+ <translation>Mégse</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Close dialog and discard all changes.</source>
+ <translation>Párbeszédablak bezárása és az összes változtatás eldobása.</translation>
+ </message>
+</context>
+<context>
+ <name>PreviewFrame</name>
+ <message>
+ <location filename="../tools/qtconfig/previewframe.cpp" line="+81"/>
+ <source>Desktop settings will only take effect after an application restart.</source>
+ <translation>Az asztal beállítások kizárólag az alkalmazás újraindítása utan lépnek érvénybe.</translation>
+ </message>
+</context>
+<context>
+ <name>PreviewWidgetBase</name>
+ <message>
+ <location filename="../tools/qtconfig/previewwidgetbase.ui" line="+66"/>
+ <source>Preview Window</source>
+ <translation>Előnézet ablak</translation>
+ </message>
+ <message>
+ <location line="+40"/>
+ <source>ButtonGroup</source>
+ <translation>GombCsoport</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>RadioButton1</source>
+ <translation>RádioGomb1</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>RadioButton2</source>
+ <translation>RádioGomb2</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>RadioButton3</source>
+ <translation>RádioGomb3</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>ButtonGroup2</source>
+ <translation>GombCsoport2</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>CheckBox1</source>
+ <translation>Jelölőnégyzet1</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>CheckBox2</source>
+ <translation>Jelölőnégyzet2</translation>
+ </message>
+ <message>
+ <location line="+36"/>
+ <source>LineEdit</source>
+ <translation>SorSzerkesztés</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>ComboBox</source>
+ <translation>ComboBox</translation>
+ </message>
+ <message>
+ <location line="+29"/>
+ <source>PushButton</source>
+ <translation>NyomóGomb</translation>
+ </message>
+ <message>
+ <location line="+41"/>
+ <source>&lt;p&gt;
+&lt;a href=&quot;http://qt.nokia.com&quot;&gt;http://qt.nokia.com&lt;/a&gt;
+&lt;/p&gt;
+&lt;p&gt;
+&lt;a href=&quot;http://www.kde.org&quot;&gt;http://www.kde.org&lt;/a&gt;
+&lt;/p&gt;</source>
+ <translation>&lt;p&gt;
+&lt;a href=&quot;http://qt.nokia.com&quot;&gt;http://qt.nokia.com&lt;/a&gt;
+&lt;/p&gt;
+&lt;p&gt;
+&lt;a href=&quot;http://www.kde.org&quot;&gt;http://www.kde.org&lt;/a&gt;
+&lt;/p&gt;</translation>
+ </message>
+</context>
+</TS>
diff --git a/translations/qvfb_hu.ts b/translations/qvfb_hu.ts
new file mode 100644
index 0000000000..bb8c931270
--- /dev/null
+++ b/translations/qvfb_hu.ts
@@ -0,0 +1,344 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="hu">
+<context>
+ <name>AnimationSaveWidget</name>
+ <message>
+ <location filename="../tools/qvfb/qvfb.cpp" line="+865"/>
+ <location line="+204"/>
+ <source>Record</source>
+ <translation>Rekord</translation>
+ </message>
+ <message>
+ <location line="-202"/>
+ <source>Reset</source>
+ <translation>Visszaállítás</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Save</source>
+ <translation>Mentés</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Save in MPEG format (requires netpbm package installed)</source>
+ <translation>MPEG formátumba mentés (netpbm csomag telepítése szükséges)</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <location line="+206"/>
+ <source>Click record to begin recording.</source>
+ <translation>Kattintson az írásra az írás megkezdéséhez.</translation>
+ </message>
+ <message>
+ <location line="-115"/>
+ <location line="+147"/>
+ <source>Finished saving.</source>
+ <translation>Befejezett mentés.</translation>
+ </message>
+ <message>
+ <location line="-63"/>
+ <source>Paused. Click record to resume, or save if done.</source>
+ <translation>Szüneteltetve. Kattintson az írásra a folytatáshoz, vagy mentse el, ha kész.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Pause</source>
+ <translation>Szünet</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Recording...</source>
+ <translation>Felvétel...</translation>
+ </message>
+ <message>
+ <location line="+40"/>
+ <source>Saving... </source>
+ <translation>Mentés...</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <location line="+4"/>
+ <source>Save animation...</source>
+ <translation>Animáció mentése...</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Save canceled.</source>
+ <translation>Megnés visszavonva.</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Save failed!</source>
+ <translation>Mentési hiba!</translation>
+ </message>
+</context>
+<context>
+ <name>Config</name>
+ <message>
+ <location filename="../tools/qvfb/config.ui" line="+54"/>
+ <source>Configure</source>
+ <translation>Konfigurálás</translation>
+ </message>
+ <message>
+ <location line="+29"/>
+ <source>Size</source>
+ <translation>Méret</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>176x220 &quot;SmartPhone&quot;</source>
+ <translation>176x220 &quot;ÃœgyesTelefon&quot;</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>240x320 &quot;PDA&quot;</source>
+ <translation>240x320 &quot;PDA&quot;</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>320x240 &quot;TV&quot; / &quot;QVGA&quot;</source>
+ <translation>320x240 &quot;TV&quot; / &quot;QVGA&quot;</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>640x480 &quot;VGA&quot;</source>
+ <translation>640x480 &quot;VGA&quot;</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>800x600</source>
+ <translation>800x600</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>1024x768</source>
+ <translation>1024x768</translation>
+ </message>
+ <message>
+ <location line="+21"/>
+ <source>Custom</source>
+ <translation>Szokásos</translation>
+ </message>
+ <message>
+ <location line="+44"/>
+ <source>Depth</source>
+ <translation>Mélység</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>1 bit monochrome</source>
+ <translation>1 bites egyszínű</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>2 bit grayscale</source>
+ <translation>2 bites szürke skálázás</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>4 bit grayscale</source>
+ <translation>4 bites szürke slálázás</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>8 bit</source>
+ <translation>8 bites</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>12 (16) bit</source>
+ <translation>12 (16) bites</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>15 bit</source>
+ <translation>15 bites</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>16 bit</source>
+ <translation>16 bites</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>18 bit</source>
+ <translation>18 bites</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>24 bit</source>
+ <translation>24 bites</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>32 bit</source>
+ <translation>32 bites</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>32 bit ARGB</source>
+ <translation>32 bites ARGB</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Swap red and blue channels</source>
+ <translation>Piros és kék csatornák felcserélése</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>BGR format</source>
+ <translation>BGR formátum</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Skin</source>
+ <translation>Szkin</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>None</source>
+ <translation>Semmi</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Emulate touch screen (no mouse move)</source>
+ <translatorcomment>указателÑ?</translatorcomment>
+ <translation>Érintő képernyő emulálása (nincs egér mozgatás)</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Emulate LCD screen (Only with fixed zoom of 3.0 times magnification)</source>
+ <translation>LCD kijelző emulálása (Kizárólag egy fix 3-szoros nagyítással)</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>&lt;p&gt;Note that any applications using the virtual framebuffer will be terminated if you change the Size or Depth &lt;i&gt;above&lt;/i&gt;. You may freely modify the Gamma &lt;i&gt;below&lt;/i&gt;.</source>
+ <translation>&lt;p&gt;Vegye figyelembe azt, hogy bármely alkalmazás, amely virtuális framebuffer-t használ, be lesz fejezve, ha megváltoztatja a méretet vagy a mélységet &lt;i&gt;felül&lt;/i&gt;. Szabadon módosíthatja a Gamma-t &lt;i&gt;alul&lt;/i&gt;.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Gamma</source>
+ <translation>Gamma</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Blue</source>
+ <translation>Kék</translation>
+ </message>
+ <message>
+ <location line="+489"/>
+ <location line="+496"/>
+ <location line="+14"/>
+ <location line="+496"/>
+ <source>1.0</source>
+ <translation>1.0</translation>
+ </message>
+ <message>
+ <location line="-999"/>
+ <source>Green</source>
+ <translation>Zöld</translation>
+ </message>
+ <message>
+ <location line="+496"/>
+ <source>All</source>
+ <translation>Mind</translation>
+ </message>
+ <message>
+ <location line="+496"/>
+ <source>Red</source>
+ <translation>Piros</translation>
+ </message>
+ <message>
+ <location line="+496"/>
+ <source>Set all to 1.0</source>
+ <translation>Az összes 1.0-ra állítása</translation>
+ </message>
+ <message>
+ <location line="+34"/>
+ <source>&amp;OK</source>
+ <translation>&amp;OK</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>&amp;Cancel</source>
+ <translation>&amp;Mégse</translation>
+ </message>
+</context>
+<context>
+ <name>DeviceSkin</name>
+ <message>
+ <location filename="../tools/shared/deviceskin/deviceskin.cpp" line="+79"/>
+ <source>The image file &apos;%1&apos; could not be loaded.</source>
+ <translation>Nem sikerült betölteni a(z) &apos;%1&apos; kép fájlt.</translation>
+ </message>
+ <message>
+ <location line="+64"/>
+ <source>The skin directory &apos;%1&apos; does not contain a configuration file.</source>
+ <translation>A(z) &apos;%1&apos; skin könyvtár nem tartalmaz egyetlen konfigurációs fájlt sem.</translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>The skin configuration file &apos;%1&apos; could not be opened.</source>
+ <translation>Nem lehetett megnyitni a(z) &apos;%1&apos; skin konfigurációs fájlt.</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>The skin configuration file &apos;%1&apos; could not be read: %2</source>
+ <translation>Nem lehetett olvasni a(z) &apos;%1&apos; skin konfigurációs fájlt: %2</translation>
+ </message>
+ <message>
+ <location line="+70"/>
+ <source>Syntax error: %1</source>
+ <translation>Szintakszis hiba: %1</translation>
+ </message>
+ <message>
+ <location line="+21"/>
+ <source>The skin &quot;up&quot; image file &apos;%1&apos; does not exist.</source>
+ <translation>A(z) &apos;%1 &apos;fel&apos; skinezett kép fájl nem létezik.</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>The skin &quot;down&quot; image file &apos;%1&apos; does not exist.</source>
+ <translation>A(z) &apos;%1 &apos;le&apos; skinezett kép fájl nem létezik.</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>The skin &quot;closed&quot; image file &apos;%1&apos; does not exist.</source>
+ <translation>A(z) &apos;%1&apos; skin &quot;bezárt&quot; kép fájl nem létezik.</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>The skin cursor image file &apos;%1&apos; does not exist.</source>
+ <translation>A(z) &apos;%1&apos; skin kurzor kép fájl nem létezik.</translation>
+ </message>
+ <message>
+ <location line="+25"/>
+ <source>Syntax error in area definition: %1</source>
+ <translation>Szintaszis hiba a terület definícióban: %1</translation>
+ </message>
+ <message>
+ <location line="+38"/>
+ <source>Mismatch in number of areas, expected %1, got %2.</source>
+ <translation>Nem megfelelő terület szám, %1 várt, %2 kapott.</translation>
+ </message>
+</context>
+<context>
+ <name>QVFb</name>
+ <message>
+ <location filename="../tools/qvfb/qvfb.cpp" line="-501"/>
+ <source>Browse...</source>
+ <translation>Böngészés...</translation>
+ </message>
+ <message>
+ <location line="+140"/>
+ <source>Load Custom Skin...</source>
+ <translation>Szokásos skin betöltése...</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>All QVFB Skins (*.skin)</source>
+ <translation>Minden QVFB skin (*.skin)</translation>
+ </message>
+</context>
+</TS>
diff --git a/translations/translations.pri b/translations/translations.pri
index 9c705574bc..34da6b118e 100644
--- a/translations/translations.pri
+++ b/translations/translations.pri
@@ -17,7 +17,7 @@ LUPDATE += -locations relative -no-ui-lines
###### Qt Libraries
-QT_TS = ar cs da de es fr iw ja_JP pl pt ru sk sl sv uk zh_CN zh_TW
+QT_TS = ar cs da de es fr hu iw ja_JP pl pt ru sk sl sv uk zh_CN zh_TW
ts-qt.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
-I../include -I../include/Qt \
@@ -25,6 +25,7 @@ ts-qt.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
3rdparty/webkit \
activeqt \
corelib \
+ declarative \
gui \
multimedia \
network \
@@ -57,9 +58,7 @@ ts-linguist.depends = sub-tools
ts-assistant.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
../tools/assistant/translations/translations.pro \
&& $$LUPDATE \
- ../tools/assistant/translations/qt_help.pro \
- && $$LUPDATE \
- ../tools/assistant/translations/translations_adp.pro)
+ ../tools/assistant/translations/qt_help.pro)
ts-assistant.depends = sub-tools
###### Qtconfig
diff --git a/util/unicode/.gitattributes b/util/unicode/.gitattributes
new file mode 100644
index 0000000000..772b88fc2f
--- /dev/null
+++ b/util/unicode/.gitattributes
@@ -0,0 +1 @@
+data/*.txt -crlf
diff --git a/util/unicode/data/CompositionExclusions.txt b/util/unicode/data/CompositionExclusions.txt
deleted file mode 100644
index 8a9b7be8dd..0000000000
--- a/util/unicode/data/CompositionExclusions.txt
+++ /dev/null
@@ -1,197 +0,0 @@
-# CompositionExclusions-5.0.0.txt
-# Date: 2006-05-23, 12:42:00 PST [KW]
-#
-# This file lists the characters for the Composition Exclusion Table
-# defined in UAX #15, Unicode Normalization Forms.
-#
-# This file is a normative contributory data file in the
-# Unicode Character Database.
-#
-# Copyright (c) 1991-2006 Unicode, Inc.
-# For terms of use, see http://www.unicode.org/terms_of_use.html
-#
-# For more information, see
-# http://www.unicode.org/unicode/reports/tr15/#Primary Exclusion List Table
-#
-# For a full derivation of composition exclusions, see the derived property
-# Full_Composition_Exclusion in DerivedNormalizationProps.txt
-#
-
-# ================================================
-# (1) Script Specifics
-#
-# This list of characters cannot be derived from the UnicodeData.txt file.
-# ================================================
-
-0958 # DEVANAGARI LETTER QA
-0959 # DEVANAGARI LETTER KHHA
-095A # DEVANAGARI LETTER GHHA
-095B # DEVANAGARI LETTER ZA
-095C # DEVANAGARI LETTER DDDHA
-095D # DEVANAGARI LETTER RHA
-095E # DEVANAGARI LETTER FA
-095F # DEVANAGARI LETTER YYA
-09DC # BENGALI LETTER RRA
-09DD # BENGALI LETTER RHA
-09DF # BENGALI LETTER YYA
-0A33 # GURMUKHI LETTER LLA
-0A36 # GURMUKHI LETTER SHA
-0A59 # GURMUKHI LETTER KHHA
-0A5A # GURMUKHI LETTER GHHA
-0A5B # GURMUKHI LETTER ZA
-0A5E # GURMUKHI LETTER FA
-0B5C # ORIYA LETTER RRA
-0B5D # ORIYA LETTER RHA
-0F43 # TIBETAN LETTER GHA
-0F4D # TIBETAN LETTER DDHA
-0F52 # TIBETAN LETTER DHA
-0F57 # TIBETAN LETTER BHA
-0F5C # TIBETAN LETTER DZHA
-0F69 # TIBETAN LETTER KSSA
-0F76 # TIBETAN VOWEL SIGN VOCALIC R
-0F78 # TIBETAN VOWEL SIGN VOCALIC L
-0F93 # TIBETAN SUBJOINED LETTER GHA
-0F9D # TIBETAN SUBJOINED LETTER DDHA
-0FA2 # TIBETAN SUBJOINED LETTER DHA
-0FA7 # TIBETAN SUBJOINED LETTER BHA
-0FAC # TIBETAN SUBJOINED LETTER DZHA
-0FB9 # TIBETAN SUBJOINED LETTER KSSA
-FB1D # HEBREW LETTER YOD WITH HIRIQ
-FB1F # HEBREW LIGATURE YIDDISH YOD YOD PATAH
-FB2A # HEBREW LETTER SHIN WITH SHIN DOT
-FB2B # HEBREW LETTER SHIN WITH SIN DOT
-FB2C # HEBREW LETTER SHIN WITH DAGESH AND SHIN DOT
-FB2D # HEBREW LETTER SHIN WITH DAGESH AND SIN DOT
-FB2E # HEBREW LETTER ALEF WITH PATAH
-FB2F # HEBREW LETTER ALEF WITH QAMATS
-FB30 # HEBREW LETTER ALEF WITH MAPIQ
-FB31 # HEBREW LETTER BET WITH DAGESH
-FB32 # HEBREW LETTER GIMEL WITH DAGESH
-FB33 # HEBREW LETTER DALET WITH DAGESH
-FB34 # HEBREW LETTER HE WITH MAPIQ
-FB35 # HEBREW LETTER VAV WITH DAGESH
-FB36 # HEBREW LETTER ZAYIN WITH DAGESH
-FB38 # HEBREW LETTER TET WITH DAGESH
-FB39 # HEBREW LETTER YOD WITH DAGESH
-FB3A # HEBREW LETTER FINAL KAF WITH DAGESH
-FB3B # HEBREW LETTER KAF WITH DAGESH
-FB3C # HEBREW LETTER LAMED WITH DAGESH
-FB3E # HEBREW LETTER MEM WITH DAGESH
-FB40 # HEBREW LETTER NUN WITH DAGESH
-FB41 # HEBREW LETTER SAMEKH WITH DAGESH
-FB43 # HEBREW LETTER FINAL PE WITH DAGESH
-FB44 # HEBREW LETTER PE WITH DAGESH
-FB46 # HEBREW LETTER TSADI WITH DAGESH
-FB47 # HEBREW LETTER QOF WITH DAGESH
-FB48 # HEBREW LETTER RESH WITH DAGESH
-FB49 # HEBREW LETTER SHIN WITH DAGESH
-FB4A # HEBREW LETTER TAV WITH DAGESH
-FB4B # HEBREW LETTER VAV WITH HOLAM
-FB4C # HEBREW LETTER BET WITH RAFE
-FB4D # HEBREW LETTER KAF WITH RAFE
-FB4E # HEBREW LETTER PE WITH RAFE
-
-# Total code points: 67
-
-# ================================================
-# (2) Post Composition Version precomposed characters
-#
-# These characters cannot be derived solely from the UnicodeData.txt file
-# in this version of Unicode.
-#
-# Note that characters added to the standard after the
-# Composition Version and which have canonical decomposition mappings
-# are not automatically added to this list of Post Composition
-# Version precomposed characters.
-# ================================================
-
-2ADC # FORKING
-1D15E # MUSICAL SYMBOL HALF NOTE
-1D15F # MUSICAL SYMBOL QUARTER NOTE
-1D160 # MUSICAL SYMBOL EIGHTH NOTE
-1D161 # MUSICAL SYMBOL SIXTEENTH NOTE
-1D162 # MUSICAL SYMBOL THIRTY-SECOND NOTE
-1D163 # MUSICAL SYMBOL SIXTY-FOURTH NOTE
-1D164 # MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE
-1D1BB # MUSICAL SYMBOL MINIMA
-1D1BC # MUSICAL SYMBOL MINIMA BLACK
-1D1BD # MUSICAL SYMBOL SEMIMINIMA WHITE
-1D1BE # MUSICAL SYMBOL SEMIMINIMA BLACK
-1D1BF # MUSICAL SYMBOL FUSA WHITE
-1D1C0 # MUSICAL SYMBOL FUSA BLACK
-
-# Total code points: 14
-
-# ================================================
-# (3) Singleton Decompositions
-#
-# These characters can be derived from the UnicodeData.txt file
-# by including all characters whose canonical decomposition
-# consists of a single character.
-#
-# These characters are simply quoted here for reference.
-# See also Full_Composition_Exclusion in DerivedNormalizationProps.txt
-# ================================================
-
-# 0340..0341 [2] COMBINING GRAVE TONE MARK..COMBINING ACUTE TONE MARK
-# 0343 COMBINING GREEK KORONIS
-# 0374 GREEK NUMERAL SIGN
-# 037E GREEK QUESTION MARK
-# 0387 GREEK ANO TELEIA
-# 1F71 GREEK SMALL LETTER ALPHA WITH OXIA
-# 1F73 GREEK SMALL LETTER EPSILON WITH OXIA
-# 1F75 GREEK SMALL LETTER ETA WITH OXIA
-# 1F77 GREEK SMALL LETTER IOTA WITH OXIA
-# 1F79 GREEK SMALL LETTER OMICRON WITH OXIA
-# 1F7B GREEK SMALL LETTER UPSILON WITH OXIA
-# 1F7D GREEK SMALL LETTER OMEGA WITH OXIA
-# 1FBB GREEK CAPITAL LETTER ALPHA WITH OXIA
-# 1FBE GREEK PROSGEGRAMMENI
-# 1FC9 GREEK CAPITAL LETTER EPSILON WITH OXIA
-# 1FCB GREEK CAPITAL LETTER ETA WITH OXIA
-# 1FD3 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
-# 1FDB GREEK CAPITAL LETTER IOTA WITH OXIA
-# 1FE3 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA
-# 1FEB GREEK CAPITAL LETTER UPSILON WITH OXIA
-# 1FEE..1FEF [2] GREEK DIALYTIKA AND OXIA..GREEK VARIA
-# 1FF9 GREEK CAPITAL LETTER OMICRON WITH OXIA
-# 1FFB GREEK CAPITAL LETTER OMEGA WITH OXIA
-# 1FFD GREEK OXIA
-# 2000..2001 [2] EN QUAD..EM QUAD
-# 2126 OHM SIGN
-# 212A..212B [2] KELVIN SIGN..ANGSTROM SIGN
-# 2329 LEFT-POINTING ANGLE BRACKET
-# 232A RIGHT-POINTING ANGLE BRACKET
-# F900..FA0D [270] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA0D
-# FA10 CJK COMPATIBILITY IDEOGRAPH-FA10
-# FA12 CJK COMPATIBILITY IDEOGRAPH-FA12
-# FA15..FA1E [10] CJK COMPATIBILITY IDEOGRAPH-FA15..CJK COMPATIBILITY IDEOGRAPH-FA1E
-# FA20 CJK COMPATIBILITY IDEOGRAPH-FA20
-# FA22 CJK COMPATIBILITY IDEOGRAPH-FA22
-# FA25..FA26 [2] CJK COMPATIBILITY IDEOGRAPH-FA25..CJK COMPATIBILITY IDEOGRAPH-FA26
-# FA2A..FA2D [4] CJK COMPATIBILITY IDEOGRAPH-FA2A..CJK COMPATIBILITY IDEOGRAPH-FA2D
-# FA30..FA6A [59] CJK COMPATIBILITY IDEOGRAPH-FA30..CJK COMPATIBILITY IDEOGRAPH-FA6A
-# FA70..FAD9 [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9
-# 2F800..2FA1D [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D
-
-# Total code points: 924
-
-# ================================================
-# (4) Non-Starter Decompositions
-#
-# These characters can be derived from the UnicodeData file
-# by including all characters whose canonical decomposition consists
-# of a sequence of characters, the first of which has a non-zero
-# combining class.
-#
-# These characters are simply quoted here for reference.
-# See also Full_Composition_Exclusion in DerivedNormalizationProps.txt
-# ================================================
-
-# 0344 COMBINING GREEK DIALYTIKA TONOS
-# 0F73 TIBETAN VOWEL SIGN II
-# 0F75 TIBETAN VOWEL SIGN UU
-# 0F81 TIBETAN VOWEL SIGN REVERSED II
-
-# Total code points: 4
-
diff --git a/util/unicode/data/DerivedNormalizationProps.txt b/util/unicode/data/DerivedNormalizationProps.txt
new file mode 100644
index 0000000000..fba1fd188b
--- /dev/null
+++ b/util/unicode/data/DerivedNormalizationProps.txt
@@ -0,0 +1,2650 @@
+# DerivedNormalizationProps-5.0.0.txt
+# Date: 2006-06-07, 17:42:44 GMT [MD]
+#
+# Unicode Character Database
+# Copyright (c) 1991-2006 Unicode, Inc.
+# For terms of use, see http://www.unicode.org/terms_of_use.html
+# For documentation, see UCD.html
+
+# ================================================
+
+# Derived Property: FC_NFKC_Closure
+# Generated from computing: b = NFKC(Fold(a)); c = NFKC(Fold(b));
+# Then if (c != b) add the mapping from a to c to the set of
+# mappings that constitute the FC_NFKC_Closure list
+# Uses the full case folding from CaseFolding.txt, without the T option.
+
+037A ; FC_NFKC; 0020 03B9 # Lm GREEK YPOGEGRAMMENI
+03D2 ; FC_NFKC; 03C5 # L& GREEK UPSILON WITH HOOK SYMBOL
+03D3 ; FC_NFKC; 03CD # L& GREEK UPSILON WITH ACUTE AND HOOK SYMBOL
+03D4 ; FC_NFKC; 03CB # L& GREEK UPSILON WITH DIAERESIS AND HOOK SYMBOL
+03F2 ; FC_NFKC; 03C3 # L& GREEK LUNATE SIGMA SYMBOL
+03F9 ; FC_NFKC; 03C3 # L& GREEK CAPITAL LUNATE SIGMA SYMBOL
+1D2C ; FC_NFKC; 0061 # Lm MODIFIER LETTER CAPITAL A
+1D2D ; FC_NFKC; 00E6 # Lm MODIFIER LETTER CAPITAL AE
+1D2E ; FC_NFKC; 0062 # Lm MODIFIER LETTER CAPITAL B
+1D30 ; FC_NFKC; 0064 # Lm MODIFIER LETTER CAPITAL D
+1D31 ; FC_NFKC; 0065 # Lm MODIFIER LETTER CAPITAL E
+1D32 ; FC_NFKC; 01DD # Lm MODIFIER LETTER CAPITAL REVERSED E
+1D33 ; FC_NFKC; 0067 # Lm MODIFIER LETTER CAPITAL G
+1D34 ; FC_NFKC; 0068 # Lm MODIFIER LETTER CAPITAL H
+1D35 ; FC_NFKC; 0069 # Lm MODIFIER LETTER CAPITAL I
+1D36 ; FC_NFKC; 006A # Lm MODIFIER LETTER CAPITAL J
+1D37 ; FC_NFKC; 006B # Lm MODIFIER LETTER CAPITAL K
+1D38 ; FC_NFKC; 006C # Lm MODIFIER LETTER CAPITAL L
+1D39 ; FC_NFKC; 006D # Lm MODIFIER LETTER CAPITAL M
+1D3A ; FC_NFKC; 006E # Lm MODIFIER LETTER CAPITAL N
+1D3C ; FC_NFKC; 006F # Lm MODIFIER LETTER CAPITAL O
+1D3D ; FC_NFKC; 0223 # Lm MODIFIER LETTER CAPITAL OU
+1D3E ; FC_NFKC; 0070 # Lm MODIFIER LETTER CAPITAL P
+1D3F ; FC_NFKC; 0072 # Lm MODIFIER LETTER CAPITAL R
+1D40 ; FC_NFKC; 0074 # Lm MODIFIER LETTER CAPITAL T
+1D41 ; FC_NFKC; 0075 # Lm MODIFIER LETTER CAPITAL U
+1D42 ; FC_NFKC; 0077 # Lm MODIFIER LETTER CAPITAL W
+20A8 ; FC_NFKC; 0072 0073 # Sc RUPEE SIGN
+2102 ; FC_NFKC; 0063 # L& DOUBLE-STRUCK CAPITAL C
+2103 ; FC_NFKC; 00B0 0063 # So DEGREE CELSIUS
+2107 ; FC_NFKC; 025B # L& EULER CONSTANT
+2109 ; FC_NFKC; 00B0 0066 # So DEGREE FAHRENHEIT
+210B ; FC_NFKC; 0068 # L& SCRIPT CAPITAL H
+210C ; FC_NFKC; 0068 # L& BLACK-LETTER CAPITAL H
+210D ; FC_NFKC; 0068 # L& DOUBLE-STRUCK CAPITAL H
+2110 ; FC_NFKC; 0069 # L& SCRIPT CAPITAL I
+2111 ; FC_NFKC; 0069 # L& BLACK-LETTER CAPITAL I
+2112 ; FC_NFKC; 006C # L& SCRIPT CAPITAL L
+2115 ; FC_NFKC; 006E # L& DOUBLE-STRUCK CAPITAL N
+2116 ; FC_NFKC; 006E 006F # So NUMERO SIGN
+2119 ; FC_NFKC; 0070 # L& DOUBLE-STRUCK CAPITAL P
+211A ; FC_NFKC; 0071 # L& DOUBLE-STRUCK CAPITAL Q
+211B ; FC_NFKC; 0072 # L& SCRIPT CAPITAL R
+211C ; FC_NFKC; 0072 # L& BLACK-LETTER CAPITAL R
+211D ; FC_NFKC; 0072 # L& DOUBLE-STRUCK CAPITAL R
+2120 ; FC_NFKC; 0073 006D # So SERVICE MARK
+2121 ; FC_NFKC; 0074 0065 006C # So TELEPHONE SIGN
+2122 ; FC_NFKC; 0074 006D # So TRADE MARK SIGN
+2124 ; FC_NFKC; 007A # L& DOUBLE-STRUCK CAPITAL Z
+2128 ; FC_NFKC; 007A # L& BLACK-LETTER CAPITAL Z
+212C ; FC_NFKC; 0062 # L& SCRIPT CAPITAL B
+212D ; FC_NFKC; 0063 # L& BLACK-LETTER CAPITAL C
+2130 ; FC_NFKC; 0065 # L& SCRIPT CAPITAL E
+2131 ; FC_NFKC; 0066 # L& SCRIPT CAPITAL F
+2133 ; FC_NFKC; 006D # L& SCRIPT CAPITAL M
+213B ; FC_NFKC; 0066 0061 0078 # So FACSIMILE SIGN
+213E ; FC_NFKC; 03B3 # L& DOUBLE-STRUCK CAPITAL GAMMA
+213F ; FC_NFKC; 03C0 # L& DOUBLE-STRUCK CAPITAL PI
+2145 ; FC_NFKC; 0064 # L& DOUBLE-STRUCK ITALIC CAPITAL D
+3250 ; FC_NFKC; 0070 0074 0065 # So PARTNERSHIP SIGN
+32CC ; FC_NFKC; 0068 0067 # So SQUARE HG
+32CE ; FC_NFKC; 0065 0076 # So SQUARE EV
+32CF ; FC_NFKC; 006C 0074 0064 # So LIMITED LIABILITY SIGN
+3371 ; FC_NFKC; 0068 0070 0061 # So SQUARE HPA
+3373 ; FC_NFKC; 0061 0075 # So SQUARE AU
+3375 ; FC_NFKC; 006F 0076 # So SQUARE OV
+337A ; FC_NFKC; 0069 0075 # So SQUARE IU
+3380 ; FC_NFKC; 0070 0061 # So SQUARE PA AMPS
+3381 ; FC_NFKC; 006E 0061 # So SQUARE NA
+3382 ; FC_NFKC; 03BC 0061 # So SQUARE MU A
+3383 ; FC_NFKC; 006D 0061 # So SQUARE MA
+3384 ; FC_NFKC; 006B 0061 # So SQUARE KA
+3385 ; FC_NFKC; 006B 0062 # So SQUARE KB
+3386 ; FC_NFKC; 006D 0062 # So SQUARE MB
+3387 ; FC_NFKC; 0067 0062 # So SQUARE GB
+338A ; FC_NFKC; 0070 0066 # So SQUARE PF
+338B ; FC_NFKC; 006E 0066 # So SQUARE NF
+338C ; FC_NFKC; 03BC 0066 # So SQUARE MU F
+3390 ; FC_NFKC; 0068 007A # So SQUARE HZ
+3391 ; FC_NFKC; 006B 0068 007A # So SQUARE KHZ
+3392 ; FC_NFKC; 006D 0068 007A # So SQUARE MHZ
+3393 ; FC_NFKC; 0067 0068 007A # So SQUARE GHZ
+3394 ; FC_NFKC; 0074 0068 007A # So SQUARE THZ
+33A9 ; FC_NFKC; 0070 0061 # So SQUARE PA
+33AA ; FC_NFKC; 006B 0070 0061 # So SQUARE KPA
+33AB ; FC_NFKC; 006D 0070 0061 # So SQUARE MPA
+33AC ; FC_NFKC; 0067 0070 0061 # So SQUARE GPA
+33B4 ; FC_NFKC; 0070 0076 # So SQUARE PV
+33B5 ; FC_NFKC; 006E 0076 # So SQUARE NV
+33B6 ; FC_NFKC; 03BC 0076 # So SQUARE MU V
+33B7 ; FC_NFKC; 006D 0076 # So SQUARE MV
+33B8 ; FC_NFKC; 006B 0076 # So SQUARE KV
+33B9 ; FC_NFKC; 006D 0076 # So SQUARE MV MEGA
+33BA ; FC_NFKC; 0070 0077 # So SQUARE PW
+33BB ; FC_NFKC; 006E 0077 # So SQUARE NW
+33BC ; FC_NFKC; 03BC 0077 # So SQUARE MU W
+33BD ; FC_NFKC; 006D 0077 # So SQUARE MW
+33BE ; FC_NFKC; 006B 0077 # So SQUARE KW
+33BF ; FC_NFKC; 006D 0077 # So SQUARE MW MEGA
+33C0 ; FC_NFKC; 006B 03C9 # So SQUARE K OHM
+33C1 ; FC_NFKC; 006D 03C9 # So SQUARE M OHM
+33C3 ; FC_NFKC; 0062 0071 # So SQUARE BQ
+33C6 ; FC_NFKC; 0063 2215 006B 0067 #So SQUARE C OVER KG
+33C7 ; FC_NFKC; 0063 006F 002E # So SQUARE CO
+33C8 ; FC_NFKC; 0064 0062 # So SQUARE DB
+33C9 ; FC_NFKC; 0067 0079 # So SQUARE GY
+33CB ; FC_NFKC; 0068 0070 # So SQUARE HP
+33CD ; FC_NFKC; 006B 006B # So SQUARE KK
+33CE ; FC_NFKC; 006B 006D # So SQUARE KM CAPITAL
+33D7 ; FC_NFKC; 0070 0068 # So SQUARE PH
+33D9 ; FC_NFKC; 0070 0070 006D # So SQUARE PPM
+33DA ; FC_NFKC; 0070 0072 # So SQUARE PR
+33DC ; FC_NFKC; 0073 0076 # So SQUARE SV
+33DD ; FC_NFKC; 0077 0062 # So SQUARE WB
+33DE ; FC_NFKC; 0076 2215 006D # So SQUARE V OVER M
+33DF ; FC_NFKC; 0061 2215 006D # So SQUARE A OVER M
+1D400 ; FC_NFKC; 0061 # L& MATHEMATICAL BOLD CAPITAL A
+1D401 ; FC_NFKC; 0062 # L& MATHEMATICAL BOLD CAPITAL B
+1D402 ; FC_NFKC; 0063 # L& MATHEMATICAL BOLD CAPITAL C
+1D403 ; FC_NFKC; 0064 # L& MATHEMATICAL BOLD CAPITAL D
+1D404 ; FC_NFKC; 0065 # L& MATHEMATICAL BOLD CAPITAL E
+1D405 ; FC_NFKC; 0066 # L& MATHEMATICAL BOLD CAPITAL F
+1D406 ; FC_NFKC; 0067 # L& MATHEMATICAL BOLD CAPITAL G
+1D407 ; FC_NFKC; 0068 # L& MATHEMATICAL BOLD CAPITAL H
+1D408 ; FC_NFKC; 0069 # L& MATHEMATICAL BOLD CAPITAL I
+1D409 ; FC_NFKC; 006A # L& MATHEMATICAL BOLD CAPITAL J
+1D40A ; FC_NFKC; 006B # L& MATHEMATICAL BOLD CAPITAL K
+1D40B ; FC_NFKC; 006C # L& MATHEMATICAL BOLD CAPITAL L
+1D40C ; FC_NFKC; 006D # L& MATHEMATICAL BOLD CAPITAL M
+1D40D ; FC_NFKC; 006E # L& MATHEMATICAL BOLD CAPITAL N
+1D40E ; FC_NFKC; 006F # L& MATHEMATICAL BOLD CAPITAL O
+1D40F ; FC_NFKC; 0070 # L& MATHEMATICAL BOLD CAPITAL P
+1D410 ; FC_NFKC; 0071 # L& MATHEMATICAL BOLD CAPITAL Q
+1D411 ; FC_NFKC; 0072 # L& MATHEMATICAL BOLD CAPITAL R
+1D412 ; FC_NFKC; 0073 # L& MATHEMATICAL BOLD CAPITAL S
+1D413 ; FC_NFKC; 0074 # L& MATHEMATICAL BOLD CAPITAL T
+1D414 ; FC_NFKC; 0075 # L& MATHEMATICAL BOLD CAPITAL U
+1D415 ; FC_NFKC; 0076 # L& MATHEMATICAL BOLD CAPITAL V
+1D416 ; FC_NFKC; 0077 # L& MATHEMATICAL BOLD CAPITAL W
+1D417 ; FC_NFKC; 0078 # L& MATHEMATICAL BOLD CAPITAL X
+1D418 ; FC_NFKC; 0079 # L& MATHEMATICAL BOLD CAPITAL Y
+1D419 ; FC_NFKC; 007A # L& MATHEMATICAL BOLD CAPITAL Z
+1D434 ; FC_NFKC; 0061 # L& MATHEMATICAL ITALIC CAPITAL A
+1D435 ; FC_NFKC; 0062 # L& MATHEMATICAL ITALIC CAPITAL B
+1D436 ; FC_NFKC; 0063 # L& MATHEMATICAL ITALIC CAPITAL C
+1D437 ; FC_NFKC; 0064 # L& MATHEMATICAL ITALIC CAPITAL D
+1D438 ; FC_NFKC; 0065 # L& MATHEMATICAL ITALIC CAPITAL E
+1D439 ; FC_NFKC; 0066 # L& MATHEMATICAL ITALIC CAPITAL F
+1D43A ; FC_NFKC; 0067 # L& MATHEMATICAL ITALIC CAPITAL G
+1D43B ; FC_NFKC; 0068 # L& MATHEMATICAL ITALIC CAPITAL H
+1D43C ; FC_NFKC; 0069 # L& MATHEMATICAL ITALIC CAPITAL I
+1D43D ; FC_NFKC; 006A # L& MATHEMATICAL ITALIC CAPITAL J
+1D43E ; FC_NFKC; 006B # L& MATHEMATICAL ITALIC CAPITAL K
+1D43F ; FC_NFKC; 006C # L& MATHEMATICAL ITALIC CAPITAL L
+1D440 ; FC_NFKC; 006D # L& MATHEMATICAL ITALIC CAPITAL M
+1D441 ; FC_NFKC; 006E # L& MATHEMATICAL ITALIC CAPITAL N
+1D442 ; FC_NFKC; 006F # L& MATHEMATICAL ITALIC CAPITAL O
+1D443 ; FC_NFKC; 0070 # L& MATHEMATICAL ITALIC CAPITAL P
+1D444 ; FC_NFKC; 0071 # L& MATHEMATICAL ITALIC CAPITAL Q
+1D445 ; FC_NFKC; 0072 # L& MATHEMATICAL ITALIC CAPITAL R
+1D446 ; FC_NFKC; 0073 # L& MATHEMATICAL ITALIC CAPITAL S
+1D447 ; FC_NFKC; 0074 # L& MATHEMATICAL ITALIC CAPITAL T
+1D448 ; FC_NFKC; 0075 # L& MATHEMATICAL ITALIC CAPITAL U
+1D449 ; FC_NFKC; 0076 # L& MATHEMATICAL ITALIC CAPITAL V
+1D44A ; FC_NFKC; 0077 # L& MATHEMATICAL ITALIC CAPITAL W
+1D44B ; FC_NFKC; 0078 # L& MATHEMATICAL ITALIC CAPITAL X
+1D44C ; FC_NFKC; 0079 # L& MATHEMATICAL ITALIC CAPITAL Y
+1D44D ; FC_NFKC; 007A # L& MATHEMATICAL ITALIC CAPITAL Z
+1D468 ; FC_NFKC; 0061 # L& MATHEMATICAL BOLD ITALIC CAPITAL A
+1D469 ; FC_NFKC; 0062 # L& MATHEMATICAL BOLD ITALIC CAPITAL B
+1D46A ; FC_NFKC; 0063 # L& MATHEMATICAL BOLD ITALIC CAPITAL C
+1D46B ; FC_NFKC; 0064 # L& MATHEMATICAL BOLD ITALIC CAPITAL D
+1D46C ; FC_NFKC; 0065 # L& MATHEMATICAL BOLD ITALIC CAPITAL E
+1D46D ; FC_NFKC; 0066 # L& MATHEMATICAL BOLD ITALIC CAPITAL F
+1D46E ; FC_NFKC; 0067 # L& MATHEMATICAL BOLD ITALIC CAPITAL G
+1D46F ; FC_NFKC; 0068 # L& MATHEMATICAL BOLD ITALIC CAPITAL H
+1D470 ; FC_NFKC; 0069 # L& MATHEMATICAL BOLD ITALIC CAPITAL I
+1D471 ; FC_NFKC; 006A # L& MATHEMATICAL BOLD ITALIC CAPITAL J
+1D472 ; FC_NFKC; 006B # L& MATHEMATICAL BOLD ITALIC CAPITAL K
+1D473 ; FC_NFKC; 006C # L& MATHEMATICAL BOLD ITALIC CAPITAL L
+1D474 ; FC_NFKC; 006D # L& MATHEMATICAL BOLD ITALIC CAPITAL M
+1D475 ; FC_NFKC; 006E # L& MATHEMATICAL BOLD ITALIC CAPITAL N
+1D476 ; FC_NFKC; 006F # L& MATHEMATICAL BOLD ITALIC CAPITAL O
+1D477 ; FC_NFKC; 0070 # L& MATHEMATICAL BOLD ITALIC CAPITAL P
+1D478 ; FC_NFKC; 0071 # L& MATHEMATICAL BOLD ITALIC CAPITAL Q
+1D479 ; FC_NFKC; 0072 # L& MATHEMATICAL BOLD ITALIC CAPITAL R
+1D47A ; FC_NFKC; 0073 # L& MATHEMATICAL BOLD ITALIC CAPITAL S
+1D47B ; FC_NFKC; 0074 # L& MATHEMATICAL BOLD ITALIC CAPITAL T
+1D47C ; FC_NFKC; 0075 # L& MATHEMATICAL BOLD ITALIC CAPITAL U
+1D47D ; FC_NFKC; 0076 # L& MATHEMATICAL BOLD ITALIC CAPITAL V
+1D47E ; FC_NFKC; 0077 # L& MATHEMATICAL BOLD ITALIC CAPITAL W
+1D47F ; FC_NFKC; 0078 # L& MATHEMATICAL BOLD ITALIC CAPITAL X
+1D480 ; FC_NFKC; 0079 # L& MATHEMATICAL BOLD ITALIC CAPITAL Y
+1D481 ; FC_NFKC; 007A # L& MATHEMATICAL BOLD ITALIC CAPITAL Z
+1D49C ; FC_NFKC; 0061 # L& MATHEMATICAL SCRIPT CAPITAL A
+1D49E ; FC_NFKC; 0063 # L& MATHEMATICAL SCRIPT CAPITAL C
+1D49F ; FC_NFKC; 0064 # L& MATHEMATICAL SCRIPT CAPITAL D
+1D4A2 ; FC_NFKC; 0067 # L& MATHEMATICAL SCRIPT CAPITAL G
+1D4A5 ; FC_NFKC; 006A # L& MATHEMATICAL SCRIPT CAPITAL J
+1D4A6 ; FC_NFKC; 006B # L& MATHEMATICAL SCRIPT CAPITAL K
+1D4A9 ; FC_NFKC; 006E # L& MATHEMATICAL SCRIPT CAPITAL N
+1D4AA ; FC_NFKC; 006F # L& MATHEMATICAL SCRIPT CAPITAL O
+1D4AB ; FC_NFKC; 0070 # L& MATHEMATICAL SCRIPT CAPITAL P
+1D4AC ; FC_NFKC; 0071 # L& MATHEMATICAL SCRIPT CAPITAL Q
+1D4AE ; FC_NFKC; 0073 # L& MATHEMATICAL SCRIPT CAPITAL S
+1D4AF ; FC_NFKC; 0074 # L& MATHEMATICAL SCRIPT CAPITAL T
+1D4B0 ; FC_NFKC; 0075 # L& MATHEMATICAL SCRIPT CAPITAL U
+1D4B1 ; FC_NFKC; 0076 # L& MATHEMATICAL SCRIPT CAPITAL V
+1D4B2 ; FC_NFKC; 0077 # L& MATHEMATICAL SCRIPT CAPITAL W
+1D4B3 ; FC_NFKC; 0078 # L& MATHEMATICAL SCRIPT CAPITAL X
+1D4B4 ; FC_NFKC; 0079 # L& MATHEMATICAL SCRIPT CAPITAL Y
+1D4B5 ; FC_NFKC; 007A # L& MATHEMATICAL SCRIPT CAPITAL Z
+1D4D0 ; FC_NFKC; 0061 # L& MATHEMATICAL BOLD SCRIPT CAPITAL A
+1D4D1 ; FC_NFKC; 0062 # L& MATHEMATICAL BOLD SCRIPT CAPITAL B
+1D4D2 ; FC_NFKC; 0063 # L& MATHEMATICAL BOLD SCRIPT CAPITAL C
+1D4D3 ; FC_NFKC; 0064 # L& MATHEMATICAL BOLD SCRIPT CAPITAL D
+1D4D4 ; FC_NFKC; 0065 # L& MATHEMATICAL BOLD SCRIPT CAPITAL E
+1D4D5 ; FC_NFKC; 0066 # L& MATHEMATICAL BOLD SCRIPT CAPITAL F
+1D4D6 ; FC_NFKC; 0067 # L& MATHEMATICAL BOLD SCRIPT CAPITAL G
+1D4D7 ; FC_NFKC; 0068 # L& MATHEMATICAL BOLD SCRIPT CAPITAL H
+1D4D8 ; FC_NFKC; 0069 # L& MATHEMATICAL BOLD SCRIPT CAPITAL I
+1D4D9 ; FC_NFKC; 006A # L& MATHEMATICAL BOLD SCRIPT CAPITAL J
+1D4DA ; FC_NFKC; 006B # L& MATHEMATICAL BOLD SCRIPT CAPITAL K
+1D4DB ; FC_NFKC; 006C # L& MATHEMATICAL BOLD SCRIPT CAPITAL L
+1D4DC ; FC_NFKC; 006D # L& MATHEMATICAL BOLD SCRIPT CAPITAL M
+1D4DD ; FC_NFKC; 006E # L& MATHEMATICAL BOLD SCRIPT CAPITAL N
+1D4DE ; FC_NFKC; 006F # L& MATHEMATICAL BOLD SCRIPT CAPITAL O
+1D4DF ; FC_NFKC; 0070 # L& MATHEMATICAL BOLD SCRIPT CAPITAL P
+1D4E0 ; FC_NFKC; 0071 # L& MATHEMATICAL BOLD SCRIPT CAPITAL Q
+1D4E1 ; FC_NFKC; 0072 # L& MATHEMATICAL BOLD SCRIPT CAPITAL R
+1D4E2 ; FC_NFKC; 0073 # L& MATHEMATICAL BOLD SCRIPT CAPITAL S
+1D4E3 ; FC_NFKC; 0074 # L& MATHEMATICAL BOLD SCRIPT CAPITAL T
+1D4E4 ; FC_NFKC; 0075 # L& MATHEMATICAL BOLD SCRIPT CAPITAL U
+1D4E5 ; FC_NFKC; 0076 # L& MATHEMATICAL BOLD SCRIPT CAPITAL V
+1D4E6 ; FC_NFKC; 0077 # L& MATHEMATICAL BOLD SCRIPT CAPITAL W
+1D4E7 ; FC_NFKC; 0078 # L& MATHEMATICAL BOLD SCRIPT CAPITAL X
+1D4E8 ; FC_NFKC; 0079 # L& MATHEMATICAL BOLD SCRIPT CAPITAL Y
+1D4E9 ; FC_NFKC; 007A # L& MATHEMATICAL BOLD SCRIPT CAPITAL Z
+1D504 ; FC_NFKC; 0061 # L& MATHEMATICAL FRAKTUR CAPITAL A
+1D505 ; FC_NFKC; 0062 # L& MATHEMATICAL FRAKTUR CAPITAL B
+1D507 ; FC_NFKC; 0064 # L& MATHEMATICAL FRAKTUR CAPITAL D
+1D508 ; FC_NFKC; 0065 # L& MATHEMATICAL FRAKTUR CAPITAL E
+1D509 ; FC_NFKC; 0066 # L& MATHEMATICAL FRAKTUR CAPITAL F
+1D50A ; FC_NFKC; 0067 # L& MATHEMATICAL FRAKTUR CAPITAL G
+1D50D ; FC_NFKC; 006A # L& MATHEMATICAL FRAKTUR CAPITAL J
+1D50E ; FC_NFKC; 006B # L& MATHEMATICAL FRAKTUR CAPITAL K
+1D50F ; FC_NFKC; 006C # L& MATHEMATICAL FRAKTUR CAPITAL L
+1D510 ; FC_NFKC; 006D # L& MATHEMATICAL FRAKTUR CAPITAL M
+1D511 ; FC_NFKC; 006E # L& MATHEMATICAL FRAKTUR CAPITAL N
+1D512 ; FC_NFKC; 006F # L& MATHEMATICAL FRAKTUR CAPITAL O
+1D513 ; FC_NFKC; 0070 # L& MATHEMATICAL FRAKTUR CAPITAL P
+1D514 ; FC_NFKC; 0071 # L& MATHEMATICAL FRAKTUR CAPITAL Q
+1D516 ; FC_NFKC; 0073 # L& MATHEMATICAL FRAKTUR CAPITAL S
+1D517 ; FC_NFKC; 0074 # L& MATHEMATICAL FRAKTUR CAPITAL T
+1D518 ; FC_NFKC; 0075 # L& MATHEMATICAL FRAKTUR CAPITAL U
+1D519 ; FC_NFKC; 0076 # L& MATHEMATICAL FRAKTUR CAPITAL V
+1D51A ; FC_NFKC; 0077 # L& MATHEMATICAL FRAKTUR CAPITAL W
+1D51B ; FC_NFKC; 0078 # L& MATHEMATICAL FRAKTUR CAPITAL X
+1D51C ; FC_NFKC; 0079 # L& MATHEMATICAL FRAKTUR CAPITAL Y
+1D538 ; FC_NFKC; 0061 # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL A
+1D539 ; FC_NFKC; 0062 # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL B
+1D53B ; FC_NFKC; 0064 # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL D
+1D53C ; FC_NFKC; 0065 # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL E
+1D53D ; FC_NFKC; 0066 # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL F
+1D53E ; FC_NFKC; 0067 # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL G
+1D540 ; FC_NFKC; 0069 # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL I
+1D541 ; FC_NFKC; 006A # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL J
+1D542 ; FC_NFKC; 006B # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL K
+1D543 ; FC_NFKC; 006C # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL L
+1D544 ; FC_NFKC; 006D # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL M
+1D546 ; FC_NFKC; 006F # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL O
+1D54A ; FC_NFKC; 0073 # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL S
+1D54B ; FC_NFKC; 0074 # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL T
+1D54C ; FC_NFKC; 0075 # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL U
+1D54D ; FC_NFKC; 0076 # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL V
+1D54E ; FC_NFKC; 0077 # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL W
+1D54F ; FC_NFKC; 0078 # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL X
+1D550 ; FC_NFKC; 0079 # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL Y
+1D56C ; FC_NFKC; 0061 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL A
+1D56D ; FC_NFKC; 0062 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL B
+1D56E ; FC_NFKC; 0063 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL C
+1D56F ; FC_NFKC; 0064 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL D
+1D570 ; FC_NFKC; 0065 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL E
+1D571 ; FC_NFKC; 0066 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL F
+1D572 ; FC_NFKC; 0067 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL G
+1D573 ; FC_NFKC; 0068 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL H
+1D574 ; FC_NFKC; 0069 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL I
+1D575 ; FC_NFKC; 006A # L& MATHEMATICAL BOLD FRAKTUR CAPITAL J
+1D576 ; FC_NFKC; 006B # L& MATHEMATICAL BOLD FRAKTUR CAPITAL K
+1D577 ; FC_NFKC; 006C # L& MATHEMATICAL BOLD FRAKTUR CAPITAL L
+1D578 ; FC_NFKC; 006D # L& MATHEMATICAL BOLD FRAKTUR CAPITAL M
+1D579 ; FC_NFKC; 006E # L& MATHEMATICAL BOLD FRAKTUR CAPITAL N
+1D57A ; FC_NFKC; 006F # L& MATHEMATICAL BOLD FRAKTUR CAPITAL O
+1D57B ; FC_NFKC; 0070 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL P
+1D57C ; FC_NFKC; 0071 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL Q
+1D57D ; FC_NFKC; 0072 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL R
+1D57E ; FC_NFKC; 0073 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL S
+1D57F ; FC_NFKC; 0074 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL T
+1D580 ; FC_NFKC; 0075 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL U
+1D581 ; FC_NFKC; 0076 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL V
+1D582 ; FC_NFKC; 0077 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL W
+1D583 ; FC_NFKC; 0078 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL X
+1D584 ; FC_NFKC; 0079 # L& MATHEMATICAL BOLD FRAKTUR CAPITAL Y
+1D585 ; FC_NFKC; 007A # L& MATHEMATICAL BOLD FRAKTUR CAPITAL Z
+1D5A0 ; FC_NFKC; 0061 # L& MATHEMATICAL SANS-SERIF CAPITAL A
+1D5A1 ; FC_NFKC; 0062 # L& MATHEMATICAL SANS-SERIF CAPITAL B
+1D5A2 ; FC_NFKC; 0063 # L& MATHEMATICAL SANS-SERIF CAPITAL C
+1D5A3 ; FC_NFKC; 0064 # L& MATHEMATICAL SANS-SERIF CAPITAL D
+1D5A4 ; FC_NFKC; 0065 # L& MATHEMATICAL SANS-SERIF CAPITAL E
+1D5A5 ; FC_NFKC; 0066 # L& MATHEMATICAL SANS-SERIF CAPITAL F
+1D5A6 ; FC_NFKC; 0067 # L& MATHEMATICAL SANS-SERIF CAPITAL G
+1D5A7 ; FC_NFKC; 0068 # L& MATHEMATICAL SANS-SERIF CAPITAL H
+1D5A8 ; FC_NFKC; 0069 # L& MATHEMATICAL SANS-SERIF CAPITAL I
+1D5A9 ; FC_NFKC; 006A # L& MATHEMATICAL SANS-SERIF CAPITAL J
+1D5AA ; FC_NFKC; 006B # L& MATHEMATICAL SANS-SERIF CAPITAL K
+1D5AB ; FC_NFKC; 006C # L& MATHEMATICAL SANS-SERIF CAPITAL L
+1D5AC ; FC_NFKC; 006D # L& MATHEMATICAL SANS-SERIF CAPITAL M
+1D5AD ; FC_NFKC; 006E # L& MATHEMATICAL SANS-SERIF CAPITAL N
+1D5AE ; FC_NFKC; 006F # L& MATHEMATICAL SANS-SERIF CAPITAL O
+1D5AF ; FC_NFKC; 0070 # L& MATHEMATICAL SANS-SERIF CAPITAL P
+1D5B0 ; FC_NFKC; 0071 # L& MATHEMATICAL SANS-SERIF CAPITAL Q
+1D5B1 ; FC_NFKC; 0072 # L& MATHEMATICAL SANS-SERIF CAPITAL R
+1D5B2 ; FC_NFKC; 0073 # L& MATHEMATICAL SANS-SERIF CAPITAL S
+1D5B3 ; FC_NFKC; 0074 # L& MATHEMATICAL SANS-SERIF CAPITAL T
+1D5B4 ; FC_NFKC; 0075 # L& MATHEMATICAL SANS-SERIF CAPITAL U
+1D5B5 ; FC_NFKC; 0076 # L& MATHEMATICAL SANS-SERIF CAPITAL V
+1D5B6 ; FC_NFKC; 0077 # L& MATHEMATICAL SANS-SERIF CAPITAL W
+1D5B7 ; FC_NFKC; 0078 # L& MATHEMATICAL SANS-SERIF CAPITAL X
+1D5B8 ; FC_NFKC; 0079 # L& MATHEMATICAL SANS-SERIF CAPITAL Y
+1D5B9 ; FC_NFKC; 007A # L& MATHEMATICAL SANS-SERIF CAPITAL Z
+1D5D4 ; FC_NFKC; 0061 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL A
+1D5D5 ; FC_NFKC; 0062 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL B
+1D5D6 ; FC_NFKC; 0063 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL C
+1D5D7 ; FC_NFKC; 0064 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL D
+1D5D8 ; FC_NFKC; 0065 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL E
+1D5D9 ; FC_NFKC; 0066 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL F
+1D5DA ; FC_NFKC; 0067 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL G
+1D5DB ; FC_NFKC; 0068 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL H
+1D5DC ; FC_NFKC; 0069 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL I
+1D5DD ; FC_NFKC; 006A # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL J
+1D5DE ; FC_NFKC; 006B # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL K
+1D5DF ; FC_NFKC; 006C # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL L
+1D5E0 ; FC_NFKC; 006D # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL M
+1D5E1 ; FC_NFKC; 006E # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL N
+1D5E2 ; FC_NFKC; 006F # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL O
+1D5E3 ; FC_NFKC; 0070 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL P
+1D5E4 ; FC_NFKC; 0071 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL Q
+1D5E5 ; FC_NFKC; 0072 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL R
+1D5E6 ; FC_NFKC; 0073 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL S
+1D5E7 ; FC_NFKC; 0074 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL T
+1D5E8 ; FC_NFKC; 0075 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL U
+1D5E9 ; FC_NFKC; 0076 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL V
+1D5EA ; FC_NFKC; 0077 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL W
+1D5EB ; FC_NFKC; 0078 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL X
+1D5EC ; FC_NFKC; 0079 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL Y
+1D5ED ; FC_NFKC; 007A # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL Z
+1D608 ; FC_NFKC; 0061 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL A
+1D609 ; FC_NFKC; 0062 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL B
+1D60A ; FC_NFKC; 0063 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL C
+1D60B ; FC_NFKC; 0064 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL D
+1D60C ; FC_NFKC; 0065 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL E
+1D60D ; FC_NFKC; 0066 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL F
+1D60E ; FC_NFKC; 0067 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL G
+1D60F ; FC_NFKC; 0068 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL H
+1D610 ; FC_NFKC; 0069 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL I
+1D611 ; FC_NFKC; 006A # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL J
+1D612 ; FC_NFKC; 006B # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL K
+1D613 ; FC_NFKC; 006C # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL L
+1D614 ; FC_NFKC; 006D # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL M
+1D615 ; FC_NFKC; 006E # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL N
+1D616 ; FC_NFKC; 006F # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL O
+1D617 ; FC_NFKC; 0070 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL P
+1D618 ; FC_NFKC; 0071 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL Q
+1D619 ; FC_NFKC; 0072 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL R
+1D61A ; FC_NFKC; 0073 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL S
+1D61B ; FC_NFKC; 0074 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL T
+1D61C ; FC_NFKC; 0075 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL U
+1D61D ; FC_NFKC; 0076 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL V
+1D61E ; FC_NFKC; 0077 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL W
+1D61F ; FC_NFKC; 0078 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL X
+1D620 ; FC_NFKC; 0079 # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL Y
+1D621 ; FC_NFKC; 007A # L& MATHEMATICAL SANS-SERIF ITALIC CAPITAL Z
+1D63C ; FC_NFKC; 0061 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL A
+1D63D ; FC_NFKC; 0062 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL B
+1D63E ; FC_NFKC; 0063 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL C
+1D63F ; FC_NFKC; 0064 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL D
+1D640 ; FC_NFKC; 0065 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL E
+1D641 ; FC_NFKC; 0066 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL F
+1D642 ; FC_NFKC; 0067 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL G
+1D643 ; FC_NFKC; 0068 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL H
+1D644 ; FC_NFKC; 0069 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL I
+1D645 ; FC_NFKC; 006A # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL J
+1D646 ; FC_NFKC; 006B # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL K
+1D647 ; FC_NFKC; 006C # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL L
+1D648 ; FC_NFKC; 006D # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL M
+1D649 ; FC_NFKC; 006E # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL N
+1D64A ; FC_NFKC; 006F # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL O
+1D64B ; FC_NFKC; 0070 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL P
+1D64C ; FC_NFKC; 0071 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Q
+1D64D ; FC_NFKC; 0072 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL R
+1D64E ; FC_NFKC; 0073 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL S
+1D64F ; FC_NFKC; 0074 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL T
+1D650 ; FC_NFKC; 0075 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL U
+1D651 ; FC_NFKC; 0076 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL V
+1D652 ; FC_NFKC; 0077 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL W
+1D653 ; FC_NFKC; 0078 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL X
+1D654 ; FC_NFKC; 0079 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Y
+1D655 ; FC_NFKC; 007A # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Z
+1D670 ; FC_NFKC; 0061 # L& MATHEMATICAL MONOSPACE CAPITAL A
+1D671 ; FC_NFKC; 0062 # L& MATHEMATICAL MONOSPACE CAPITAL B
+1D672 ; FC_NFKC; 0063 # L& MATHEMATICAL MONOSPACE CAPITAL C
+1D673 ; FC_NFKC; 0064 # L& MATHEMATICAL MONOSPACE CAPITAL D
+1D674 ; FC_NFKC; 0065 # L& MATHEMATICAL MONOSPACE CAPITAL E
+1D675 ; FC_NFKC; 0066 # L& MATHEMATICAL MONOSPACE CAPITAL F
+1D676 ; FC_NFKC; 0067 # L& MATHEMATICAL MONOSPACE CAPITAL G
+1D677 ; FC_NFKC; 0068 # L& MATHEMATICAL MONOSPACE CAPITAL H
+1D678 ; FC_NFKC; 0069 # L& MATHEMATICAL MONOSPACE CAPITAL I
+1D679 ; FC_NFKC; 006A # L& MATHEMATICAL MONOSPACE CAPITAL J
+1D67A ; FC_NFKC; 006B # L& MATHEMATICAL MONOSPACE CAPITAL K
+1D67B ; FC_NFKC; 006C # L& MATHEMATICAL MONOSPACE CAPITAL L
+1D67C ; FC_NFKC; 006D # L& MATHEMATICAL MONOSPACE CAPITAL M
+1D67D ; FC_NFKC; 006E # L& MATHEMATICAL MONOSPACE CAPITAL N
+1D67E ; FC_NFKC; 006F # L& MATHEMATICAL MONOSPACE CAPITAL O
+1D67F ; FC_NFKC; 0070 # L& MATHEMATICAL MONOSPACE CAPITAL P
+1D680 ; FC_NFKC; 0071 # L& MATHEMATICAL MONOSPACE CAPITAL Q
+1D681 ; FC_NFKC; 0072 # L& MATHEMATICAL MONOSPACE CAPITAL R
+1D682 ; FC_NFKC; 0073 # L& MATHEMATICAL MONOSPACE CAPITAL S
+1D683 ; FC_NFKC; 0074 # L& MATHEMATICAL MONOSPACE CAPITAL T
+1D684 ; FC_NFKC; 0075 # L& MATHEMATICAL MONOSPACE CAPITAL U
+1D685 ; FC_NFKC; 0076 # L& MATHEMATICAL MONOSPACE CAPITAL V
+1D686 ; FC_NFKC; 0077 # L& MATHEMATICAL MONOSPACE CAPITAL W
+1D687 ; FC_NFKC; 0078 # L& MATHEMATICAL MONOSPACE CAPITAL X
+1D688 ; FC_NFKC; 0079 # L& MATHEMATICAL MONOSPACE CAPITAL Y
+1D689 ; FC_NFKC; 007A # L& MATHEMATICAL MONOSPACE CAPITAL Z
+1D6A8 ; FC_NFKC; 03B1 # L& MATHEMATICAL BOLD CAPITAL ALPHA
+1D6A9 ; FC_NFKC; 03B2 # L& MATHEMATICAL BOLD CAPITAL BETA
+1D6AA ; FC_NFKC; 03B3 # L& MATHEMATICAL BOLD CAPITAL GAMMA
+1D6AB ; FC_NFKC; 03B4 # L& MATHEMATICAL BOLD CAPITAL DELTA
+1D6AC ; FC_NFKC; 03B5 # L& MATHEMATICAL BOLD CAPITAL EPSILON
+1D6AD ; FC_NFKC; 03B6 # L& MATHEMATICAL BOLD CAPITAL ZETA
+1D6AE ; FC_NFKC; 03B7 # L& MATHEMATICAL BOLD CAPITAL ETA
+1D6AF ; FC_NFKC; 03B8 # L& MATHEMATICAL BOLD CAPITAL THETA
+1D6B0 ; FC_NFKC; 03B9 # L& MATHEMATICAL BOLD CAPITAL IOTA
+1D6B1 ; FC_NFKC; 03BA # L& MATHEMATICAL BOLD CAPITAL KAPPA
+1D6B2 ; FC_NFKC; 03BB # L& MATHEMATICAL BOLD CAPITAL LAMDA
+1D6B3 ; FC_NFKC; 03BC # L& MATHEMATICAL BOLD CAPITAL MU
+1D6B4 ; FC_NFKC; 03BD # L& MATHEMATICAL BOLD CAPITAL NU
+1D6B5 ; FC_NFKC; 03BE # L& MATHEMATICAL BOLD CAPITAL XI
+1D6B6 ; FC_NFKC; 03BF # L& MATHEMATICAL BOLD CAPITAL OMICRON
+1D6B7 ; FC_NFKC; 03C0 # L& MATHEMATICAL BOLD CAPITAL PI
+1D6B8 ; FC_NFKC; 03C1 # L& MATHEMATICAL BOLD CAPITAL RHO
+1D6B9 ; FC_NFKC; 03B8 # L& MATHEMATICAL BOLD CAPITAL THETA SYMBOL
+1D6BA ; FC_NFKC; 03C3 # L& MATHEMATICAL BOLD CAPITAL SIGMA
+1D6BB ; FC_NFKC; 03C4 # L& MATHEMATICAL BOLD CAPITAL TAU
+1D6BC ; FC_NFKC; 03C5 # L& MATHEMATICAL BOLD CAPITAL UPSILON
+1D6BD ; FC_NFKC; 03C6 # L& MATHEMATICAL BOLD CAPITAL PHI
+1D6BE ; FC_NFKC; 03C7 # L& MATHEMATICAL BOLD CAPITAL CHI
+1D6BF ; FC_NFKC; 03C8 # L& MATHEMATICAL BOLD CAPITAL PSI
+1D6C0 ; FC_NFKC; 03C9 # L& MATHEMATICAL BOLD CAPITAL OMEGA
+1D6D3 ; FC_NFKC; 03C3 # L& MATHEMATICAL BOLD SMALL FINAL SIGMA
+1D6E2 ; FC_NFKC; 03B1 # L& MATHEMATICAL ITALIC CAPITAL ALPHA
+1D6E3 ; FC_NFKC; 03B2 # L& MATHEMATICAL ITALIC CAPITAL BETA
+1D6E4 ; FC_NFKC; 03B3 # L& MATHEMATICAL ITALIC CAPITAL GAMMA
+1D6E5 ; FC_NFKC; 03B4 # L& MATHEMATICAL ITALIC CAPITAL DELTA
+1D6E6 ; FC_NFKC; 03B5 # L& MATHEMATICAL ITALIC CAPITAL EPSILON
+1D6E7 ; FC_NFKC; 03B6 # L& MATHEMATICAL ITALIC CAPITAL ZETA
+1D6E8 ; FC_NFKC; 03B7 # L& MATHEMATICAL ITALIC CAPITAL ETA
+1D6E9 ; FC_NFKC; 03B8 # L& MATHEMATICAL ITALIC CAPITAL THETA
+1D6EA ; FC_NFKC; 03B9 # L& MATHEMATICAL ITALIC CAPITAL IOTA
+1D6EB ; FC_NFKC; 03BA # L& MATHEMATICAL ITALIC CAPITAL KAPPA
+1D6EC ; FC_NFKC; 03BB # L& MATHEMATICAL ITALIC CAPITAL LAMDA
+1D6ED ; FC_NFKC; 03BC # L& MATHEMATICAL ITALIC CAPITAL MU
+1D6EE ; FC_NFKC; 03BD # L& MATHEMATICAL ITALIC CAPITAL NU
+1D6EF ; FC_NFKC; 03BE # L& MATHEMATICAL ITALIC CAPITAL XI
+1D6F0 ; FC_NFKC; 03BF # L& MATHEMATICAL ITALIC CAPITAL OMICRON
+1D6F1 ; FC_NFKC; 03C0 # L& MATHEMATICAL ITALIC CAPITAL PI
+1D6F2 ; FC_NFKC; 03C1 # L& MATHEMATICAL ITALIC CAPITAL RHO
+1D6F3 ; FC_NFKC; 03B8 # L& MATHEMATICAL ITALIC CAPITAL THETA SYMBOL
+1D6F4 ; FC_NFKC; 03C3 # L& MATHEMATICAL ITALIC CAPITAL SIGMA
+1D6F5 ; FC_NFKC; 03C4 # L& MATHEMATICAL ITALIC CAPITAL TAU
+1D6F6 ; FC_NFKC; 03C5 # L& MATHEMATICAL ITALIC CAPITAL UPSILON
+1D6F7 ; FC_NFKC; 03C6 # L& MATHEMATICAL ITALIC CAPITAL PHI
+1D6F8 ; FC_NFKC; 03C7 # L& MATHEMATICAL ITALIC CAPITAL CHI
+1D6F9 ; FC_NFKC; 03C8 # L& MATHEMATICAL ITALIC CAPITAL PSI
+1D6FA ; FC_NFKC; 03C9 # L& MATHEMATICAL ITALIC CAPITAL OMEGA
+1D70D ; FC_NFKC; 03C3 # L& MATHEMATICAL ITALIC SMALL FINAL SIGMA
+1D71C ; FC_NFKC; 03B1 # L& MATHEMATICAL BOLD ITALIC CAPITAL ALPHA
+1D71D ; FC_NFKC; 03B2 # L& MATHEMATICAL BOLD ITALIC CAPITAL BETA
+1D71E ; FC_NFKC; 03B3 # L& MATHEMATICAL BOLD ITALIC CAPITAL GAMMA
+1D71F ; FC_NFKC; 03B4 # L& MATHEMATICAL BOLD ITALIC CAPITAL DELTA
+1D720 ; FC_NFKC; 03B5 # L& MATHEMATICAL BOLD ITALIC CAPITAL EPSILON
+1D721 ; FC_NFKC; 03B6 # L& MATHEMATICAL BOLD ITALIC CAPITAL ZETA
+1D722 ; FC_NFKC; 03B7 # L& MATHEMATICAL BOLD ITALIC CAPITAL ETA
+1D723 ; FC_NFKC; 03B8 # L& MATHEMATICAL BOLD ITALIC CAPITAL THETA
+1D724 ; FC_NFKC; 03B9 # L& MATHEMATICAL BOLD ITALIC CAPITAL IOTA
+1D725 ; FC_NFKC; 03BA # L& MATHEMATICAL BOLD ITALIC CAPITAL KAPPA
+1D726 ; FC_NFKC; 03BB # L& MATHEMATICAL BOLD ITALIC CAPITAL LAMDA
+1D727 ; FC_NFKC; 03BC # L& MATHEMATICAL BOLD ITALIC CAPITAL MU
+1D728 ; FC_NFKC; 03BD # L& MATHEMATICAL BOLD ITALIC CAPITAL NU
+1D729 ; FC_NFKC; 03BE # L& MATHEMATICAL BOLD ITALIC CAPITAL XI
+1D72A ; FC_NFKC; 03BF # L& MATHEMATICAL BOLD ITALIC CAPITAL OMICRON
+1D72B ; FC_NFKC; 03C0 # L& MATHEMATICAL BOLD ITALIC CAPITAL PI
+1D72C ; FC_NFKC; 03C1 # L& MATHEMATICAL BOLD ITALIC CAPITAL RHO
+1D72D ; FC_NFKC; 03B8 # L& MATHEMATICAL BOLD ITALIC CAPITAL THETA SYMBOL
+1D72E ; FC_NFKC; 03C3 # L& MATHEMATICAL BOLD ITALIC CAPITAL SIGMA
+1D72F ; FC_NFKC; 03C4 # L& MATHEMATICAL BOLD ITALIC CAPITAL TAU
+1D730 ; FC_NFKC; 03C5 # L& MATHEMATICAL BOLD ITALIC CAPITAL UPSILON
+1D731 ; FC_NFKC; 03C6 # L& MATHEMATICAL BOLD ITALIC CAPITAL PHI
+1D732 ; FC_NFKC; 03C7 # L& MATHEMATICAL BOLD ITALIC CAPITAL CHI
+1D733 ; FC_NFKC; 03C8 # L& MATHEMATICAL BOLD ITALIC CAPITAL PSI
+1D734 ; FC_NFKC; 03C9 # L& MATHEMATICAL BOLD ITALIC CAPITAL OMEGA
+1D747 ; FC_NFKC; 03C3 # L& MATHEMATICAL BOLD ITALIC SMALL FINAL SIGMA
+1D756 ; FC_NFKC; 03B1 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL ALPHA
+1D757 ; FC_NFKC; 03B2 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL BETA
+1D758 ; FC_NFKC; 03B3 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL GAMMA
+1D759 ; FC_NFKC; 03B4 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL DELTA
+1D75A ; FC_NFKC; 03B5 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL EPSILON
+1D75B ; FC_NFKC; 03B6 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL ZETA
+1D75C ; FC_NFKC; 03B7 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL ETA
+1D75D ; FC_NFKC; 03B8 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL THETA
+1D75E ; FC_NFKC; 03B9 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL IOTA
+1D75F ; FC_NFKC; 03BA # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL KAPPA
+1D760 ; FC_NFKC; 03BB # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL LAMDA
+1D761 ; FC_NFKC; 03BC # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL MU
+1D762 ; FC_NFKC; 03BD # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL NU
+1D763 ; FC_NFKC; 03BE # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL XI
+1D764 ; FC_NFKC; 03BF # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL OMICRON
+1D765 ; FC_NFKC; 03C0 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL PI
+1D766 ; FC_NFKC; 03C1 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL RHO
+1D767 ; FC_NFKC; 03B8 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL THETA SYMBOL
+1D768 ; FC_NFKC; 03C3 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL SIGMA
+1D769 ; FC_NFKC; 03C4 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL TAU
+1D76A ; FC_NFKC; 03C5 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL UPSILON
+1D76B ; FC_NFKC; 03C6 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL PHI
+1D76C ; FC_NFKC; 03C7 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL CHI
+1D76D ; FC_NFKC; 03C8 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL PSI
+1D76E ; FC_NFKC; 03C9 # L& MATHEMATICAL SANS-SERIF BOLD CAPITAL OMEGA
+1D781 ; FC_NFKC; 03C3 # L& MATHEMATICAL SANS-SERIF BOLD SMALL FINAL SIGMA
+1D790 ; FC_NFKC; 03B1 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ALPHA
+1D791 ; FC_NFKC; 03B2 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL BETA
+1D792 ; FC_NFKC; 03B3 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL GAMMA
+1D793 ; FC_NFKC; 03B4 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL DELTA
+1D794 ; FC_NFKC; 03B5 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL EPSILON
+1D795 ; FC_NFKC; 03B6 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ZETA
+1D796 ; FC_NFKC; 03B7 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ETA
+1D797 ; FC_NFKC; 03B8 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL THETA
+1D798 ; FC_NFKC; 03B9 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL IOTA
+1D799 ; FC_NFKC; 03BA # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL KAPPA
+1D79A ; FC_NFKC; 03BB # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL LAMDA
+1D79B ; FC_NFKC; 03BC # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL MU
+1D79C ; FC_NFKC; 03BD # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL NU
+1D79D ; FC_NFKC; 03BE # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL XI
+1D79E ; FC_NFKC; 03BF # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMICRON
+1D79F ; FC_NFKC; 03C0 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL PI
+1D7A0 ; FC_NFKC; 03C1 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL RHO
+1D7A1 ; FC_NFKC; 03B8 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL THETA SYMBOL
+1D7A2 ; FC_NFKC; 03C3 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL SIGMA
+1D7A3 ; FC_NFKC; 03C4 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL TAU
+1D7A4 ; FC_NFKC; 03C5 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL UPSILON
+1D7A5 ; FC_NFKC; 03C6 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL PHI
+1D7A6 ; FC_NFKC; 03C7 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL CHI
+1D7A7 ; FC_NFKC; 03C8 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL PSI
+1D7A8 ; FC_NFKC; 03C9 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMEGA
+1D7BB ; FC_NFKC; 03C3 # L& MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL FINAL SIGMA
+1D7CA ; FC_NFKC; 03DD # L& MATHEMATICAL BOLD CAPITAL DIGAMMA
+
+# Total code points: 565
+
+# ================================================
+
+# Derived Property: Full_Composition_Exclusion
+# Generated from: Composition Exclusions + Singletons + Non-Starter Decompositions
+
+0340..0341 ; Full_Composition_Exclusion # Mn [2] COMBINING GRAVE TONE MARK..COMBINING ACUTE TONE MARK
+0343..0344 ; Full_Composition_Exclusion # Mn [2] COMBINING GREEK KORONIS..COMBINING GREEK DIALYTIKA TONOS
+0374 ; Full_Composition_Exclusion # Sk GREEK NUMERAL SIGN
+037E ; Full_Composition_Exclusion # Po GREEK QUESTION MARK
+0387 ; Full_Composition_Exclusion # Po GREEK ANO TELEIA
+0958..095F ; Full_Composition_Exclusion # Lo [8] DEVANAGARI LETTER QA..DEVANAGARI LETTER YYA
+09DC..09DD ; Full_Composition_Exclusion # Lo [2] BENGALI LETTER RRA..BENGALI LETTER RHA
+09DF ; Full_Composition_Exclusion # Lo BENGALI LETTER YYA
+0A33 ; Full_Composition_Exclusion # Lo GURMUKHI LETTER LLA
+0A36 ; Full_Composition_Exclusion # Lo GURMUKHI LETTER SHA
+0A59..0A5B ; Full_Composition_Exclusion # Lo [3] GURMUKHI LETTER KHHA..GURMUKHI LETTER ZA
+0A5E ; Full_Composition_Exclusion # Lo GURMUKHI LETTER FA
+0B5C..0B5D ; Full_Composition_Exclusion # Lo [2] ORIYA LETTER RRA..ORIYA LETTER RHA
+0F43 ; Full_Composition_Exclusion # Lo TIBETAN LETTER GHA
+0F4D ; Full_Composition_Exclusion # Lo TIBETAN LETTER DDHA
+0F52 ; Full_Composition_Exclusion # Lo TIBETAN LETTER DHA
+0F57 ; Full_Composition_Exclusion # Lo TIBETAN LETTER BHA
+0F5C ; Full_Composition_Exclusion # Lo TIBETAN LETTER DZHA
+0F69 ; Full_Composition_Exclusion # Lo TIBETAN LETTER KSSA
+0F73 ; Full_Composition_Exclusion # Mn TIBETAN VOWEL SIGN II
+0F75..0F76 ; Full_Composition_Exclusion # Mn [2] TIBETAN VOWEL SIGN UU..TIBETAN VOWEL SIGN VOCALIC R
+0F78 ; Full_Composition_Exclusion # Mn TIBETAN VOWEL SIGN VOCALIC L
+0F81 ; Full_Composition_Exclusion # Mn TIBETAN VOWEL SIGN REVERSED II
+0F93 ; Full_Composition_Exclusion # Mn TIBETAN SUBJOINED LETTER GHA
+0F9D ; Full_Composition_Exclusion # Mn TIBETAN SUBJOINED LETTER DDHA
+0FA2 ; Full_Composition_Exclusion # Mn TIBETAN SUBJOINED LETTER DHA
+0FA7 ; Full_Composition_Exclusion # Mn TIBETAN SUBJOINED LETTER BHA
+0FAC ; Full_Composition_Exclusion # Mn TIBETAN SUBJOINED LETTER DZHA
+0FB9 ; Full_Composition_Exclusion # Mn TIBETAN SUBJOINED LETTER KSSA
+1F71 ; Full_Composition_Exclusion # L& GREEK SMALL LETTER ALPHA WITH OXIA
+1F73 ; Full_Composition_Exclusion # L& GREEK SMALL LETTER EPSILON WITH OXIA
+1F75 ; Full_Composition_Exclusion # L& GREEK SMALL LETTER ETA WITH OXIA
+1F77 ; Full_Composition_Exclusion # L& GREEK SMALL LETTER IOTA WITH OXIA
+1F79 ; Full_Composition_Exclusion # L& GREEK SMALL LETTER OMICRON WITH OXIA
+1F7B ; Full_Composition_Exclusion # L& GREEK SMALL LETTER UPSILON WITH OXIA
+1F7D ; Full_Composition_Exclusion # L& GREEK SMALL LETTER OMEGA WITH OXIA
+1FBB ; Full_Composition_Exclusion # L& GREEK CAPITAL LETTER ALPHA WITH OXIA
+1FBE ; Full_Composition_Exclusion # L& GREEK PROSGEGRAMMENI
+1FC9 ; Full_Composition_Exclusion # L& GREEK CAPITAL LETTER EPSILON WITH OXIA
+1FCB ; Full_Composition_Exclusion # L& GREEK CAPITAL LETTER ETA WITH OXIA
+1FD3 ; Full_Composition_Exclusion # L& GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
+1FDB ; Full_Composition_Exclusion # L& GREEK CAPITAL LETTER IOTA WITH OXIA
+1FE3 ; Full_Composition_Exclusion # L& GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA
+1FEB ; Full_Composition_Exclusion # L& GREEK CAPITAL LETTER UPSILON WITH OXIA
+1FEE..1FEF ; Full_Composition_Exclusion # Sk [2] GREEK DIALYTIKA AND OXIA..GREEK VARIA
+1FF9 ; Full_Composition_Exclusion # L& GREEK CAPITAL LETTER OMICRON WITH OXIA
+1FFB ; Full_Composition_Exclusion # L& GREEK CAPITAL LETTER OMEGA WITH OXIA
+1FFD ; Full_Composition_Exclusion # Sk GREEK OXIA
+2000..2001 ; Full_Composition_Exclusion # Zs [2] EN QUAD..EM QUAD
+2126 ; Full_Composition_Exclusion # L& OHM SIGN
+212A..212B ; Full_Composition_Exclusion # L& [2] KELVIN SIGN..ANGSTROM SIGN
+2329 ; Full_Composition_Exclusion # Ps LEFT-POINTING ANGLE BRACKET
+232A ; Full_Composition_Exclusion # Pe RIGHT-POINTING ANGLE BRACKET
+2ADC ; Full_Composition_Exclusion # Sm FORKING
+F900..FA0D ; Full_Composition_Exclusion # Lo [270] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA0D
+FA10 ; Full_Composition_Exclusion # Lo CJK COMPATIBILITY IDEOGRAPH-FA10
+FA12 ; Full_Composition_Exclusion # Lo CJK COMPATIBILITY IDEOGRAPH-FA12
+FA15..FA1E ; Full_Composition_Exclusion # Lo [10] CJK COMPATIBILITY IDEOGRAPH-FA15..CJK COMPATIBILITY IDEOGRAPH-FA1E
+FA20 ; Full_Composition_Exclusion # Lo CJK COMPATIBILITY IDEOGRAPH-FA20
+FA22 ; Full_Composition_Exclusion # Lo CJK COMPATIBILITY IDEOGRAPH-FA22
+FA25..FA26 ; Full_Composition_Exclusion # Lo [2] CJK COMPATIBILITY IDEOGRAPH-FA25..CJK COMPATIBILITY IDEOGRAPH-FA26
+FA2A..FA2D ; Full_Composition_Exclusion # Lo [4] CJK COMPATIBILITY IDEOGRAPH-FA2A..CJK COMPATIBILITY IDEOGRAPH-FA2D
+FA30..FA6A ; Full_Composition_Exclusion # Lo [59] CJK COMPATIBILITY IDEOGRAPH-FA30..CJK COMPATIBILITY IDEOGRAPH-FA6A
+FA70..FAD9 ; Full_Composition_Exclusion # Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9
+FB1D ; Full_Composition_Exclusion # Lo HEBREW LETTER YOD WITH HIRIQ
+FB1F ; Full_Composition_Exclusion # Lo HEBREW LIGATURE YIDDISH YOD YOD PATAH
+FB2A..FB36 ; Full_Composition_Exclusion # Lo [13] HEBREW LETTER SHIN WITH SHIN DOT..HEBREW LETTER ZAYIN WITH DAGESH
+FB38..FB3C ; Full_Composition_Exclusion # Lo [5] HEBREW LETTER TET WITH DAGESH..HEBREW LETTER LAMED WITH DAGESH
+FB3E ; Full_Composition_Exclusion # Lo HEBREW LETTER MEM WITH DAGESH
+FB40..FB41 ; Full_Composition_Exclusion # Lo [2] HEBREW LETTER NUN WITH DAGESH..HEBREW LETTER SAMEKH WITH DAGESH
+FB43..FB44 ; Full_Composition_Exclusion # Lo [2] HEBREW LETTER FINAL PE WITH DAGESH..HEBREW LETTER PE WITH DAGESH
+FB46..FB4E ; Full_Composition_Exclusion # Lo [9] HEBREW LETTER TSADI WITH DAGESH..HEBREW LETTER PE WITH RAFE
+1D15E..1D164 ; Full_Composition_Exclusion # So [7] MUSICAL SYMBOL HALF NOTE..MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE
+1D1BB..1D1C0 ; Full_Composition_Exclusion # So [6] MUSICAL SYMBOL MINIMA..MUSICAL SYMBOL FUSA BLACK
+2F800..2FA1D ; Full_Composition_Exclusion # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D
+
+# Total code points: 1115
+
+# ================================================
+
+# Property: NFD_Quick_Check
+
+# All code points not explicitly listed for NFD_Quick_Check
+# have the value Yes (Y).
+
+# @missing: 0000..10FFFF; NFD_QC; Yes
+
+# ================================================
+
+# NFD_Quick_Check=No
+
+00C0..00C5 ; NFD_QC; N # L& [6] LATIN CAPITAL LETTER A WITH GRAVE..LATIN CAPITAL LETTER A WITH RING ABOVE
+00C7..00CF ; NFD_QC; N # L& [9] LATIN CAPITAL LETTER C WITH CEDILLA..LATIN CAPITAL LETTER I WITH DIAERESIS
+00D1..00D6 ; NFD_QC; N # L& [6] LATIN CAPITAL LETTER N WITH TILDE..LATIN CAPITAL LETTER O WITH DIAERESIS
+00D9..00DD ; NFD_QC; N # L& [5] LATIN CAPITAL LETTER U WITH GRAVE..LATIN CAPITAL LETTER Y WITH ACUTE
+00E0..00E5 ; NFD_QC; N # L& [6] LATIN SMALL LETTER A WITH GRAVE..LATIN SMALL LETTER A WITH RING ABOVE
+00E7..00EF ; NFD_QC; N # L& [9] LATIN SMALL LETTER C WITH CEDILLA..LATIN SMALL LETTER I WITH DIAERESIS
+00F1..00F6 ; NFD_QC; N # L& [6] LATIN SMALL LETTER N WITH TILDE..LATIN SMALL LETTER O WITH DIAERESIS
+00F9..00FD ; NFD_QC; N # L& [5] LATIN SMALL LETTER U WITH GRAVE..LATIN SMALL LETTER Y WITH ACUTE
+00FF..010F ; NFD_QC; N # L& [17] LATIN SMALL LETTER Y WITH DIAERESIS..LATIN SMALL LETTER D WITH CARON
+0112..0125 ; NFD_QC; N # L& [20] LATIN CAPITAL LETTER E WITH MACRON..LATIN SMALL LETTER H WITH CIRCUMFLEX
+0128..0130 ; NFD_QC; N # L& [9] LATIN CAPITAL LETTER I WITH TILDE..LATIN CAPITAL LETTER I WITH DOT ABOVE
+0134..0137 ; NFD_QC; N # L& [4] LATIN CAPITAL LETTER J WITH CIRCUMFLEX..LATIN SMALL LETTER K WITH CEDILLA
+0139..013E ; NFD_QC; N # L& [6] LATIN CAPITAL LETTER L WITH ACUTE..LATIN SMALL LETTER L WITH CARON
+0143..0148 ; NFD_QC; N # L& [6] LATIN CAPITAL LETTER N WITH ACUTE..LATIN SMALL LETTER N WITH CARON
+014C..0151 ; NFD_QC; N # L& [6] LATIN CAPITAL LETTER O WITH MACRON..LATIN SMALL LETTER O WITH DOUBLE ACUTE
+0154..0165 ; NFD_QC; N # L& [18] LATIN CAPITAL LETTER R WITH ACUTE..LATIN SMALL LETTER T WITH CARON
+0168..017E ; NFD_QC; N # L& [23] LATIN CAPITAL LETTER U WITH TILDE..LATIN SMALL LETTER Z WITH CARON
+01A0..01A1 ; NFD_QC; N # L& [2] LATIN CAPITAL LETTER O WITH HORN..LATIN SMALL LETTER O WITH HORN
+01AF..01B0 ; NFD_QC; N # L& [2] LATIN CAPITAL LETTER U WITH HORN..LATIN SMALL LETTER U WITH HORN
+01CD..01DC ; NFD_QC; N # L& [16] LATIN CAPITAL LETTER A WITH CARON..LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE
+01DE..01E3 ; NFD_QC; N # L& [6] LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON..LATIN SMALL LETTER AE WITH MACRON
+01E6..01F0 ; NFD_QC; N # L& [11] LATIN CAPITAL LETTER G WITH CARON..LATIN SMALL LETTER J WITH CARON
+01F4..01F5 ; NFD_QC; N # L& [2] LATIN CAPITAL LETTER G WITH ACUTE..LATIN SMALL LETTER G WITH ACUTE
+01F8..021B ; NFD_QC; N # L& [36] LATIN CAPITAL LETTER N WITH GRAVE..LATIN SMALL LETTER T WITH COMMA BELOW
+021E..021F ; NFD_QC; N # L& [2] LATIN CAPITAL LETTER H WITH CARON..LATIN SMALL LETTER H WITH CARON
+0226..0233 ; NFD_QC; N # L& [14] LATIN CAPITAL LETTER A WITH DOT ABOVE..LATIN SMALL LETTER Y WITH MACRON
+0340..0341 ; NFD_QC; N # Mn [2] COMBINING GRAVE TONE MARK..COMBINING ACUTE TONE MARK
+0343..0344 ; NFD_QC; N # Mn [2] COMBINING GREEK KORONIS..COMBINING GREEK DIALYTIKA TONOS
+0374 ; NFD_QC; N # Sk GREEK NUMERAL SIGN
+037E ; NFD_QC; N # Po GREEK QUESTION MARK
+0385 ; NFD_QC; N # Sk GREEK DIALYTIKA TONOS
+0386 ; NFD_QC; N # L& GREEK CAPITAL LETTER ALPHA WITH TONOS
+0387 ; NFD_QC; N # Po GREEK ANO TELEIA
+0388..038A ; NFD_QC; N # L& [3] GREEK CAPITAL LETTER EPSILON WITH TONOS..GREEK CAPITAL LETTER IOTA WITH TONOS
+038C ; NFD_QC; N # L& GREEK CAPITAL LETTER OMICRON WITH TONOS
+038E..0390 ; NFD_QC; N # L& [3] GREEK CAPITAL LETTER UPSILON WITH TONOS..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
+03AA..03B0 ; NFD_QC; N # L& [7] GREEK CAPITAL LETTER IOTA WITH DIALYTIKA..GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS
+03CA..03CE ; NFD_QC; N # L& [5] GREEK SMALL LETTER IOTA WITH DIALYTIKA..GREEK SMALL LETTER OMEGA WITH TONOS
+03D3..03D4 ; NFD_QC; N # L& [2] GREEK UPSILON WITH ACUTE AND HOOK SYMBOL..GREEK UPSILON WITH DIAERESIS AND HOOK SYMBOL
+0400..0401 ; NFD_QC; N # L& [2] CYRILLIC CAPITAL LETTER IE WITH GRAVE..CYRILLIC CAPITAL LETTER IO
+0403 ; NFD_QC; N # L& CYRILLIC CAPITAL LETTER GJE
+0407 ; NFD_QC; N # L& CYRILLIC CAPITAL LETTER YI
+040C..040E ; NFD_QC; N # L& [3] CYRILLIC CAPITAL LETTER KJE..CYRILLIC CAPITAL LETTER SHORT U
+0419 ; NFD_QC; N # L& CYRILLIC CAPITAL LETTER SHORT I
+0439 ; NFD_QC; N # L& CYRILLIC SMALL LETTER SHORT I
+0450..0451 ; NFD_QC; N # L& [2] CYRILLIC SMALL LETTER IE WITH GRAVE..CYRILLIC SMALL LETTER IO
+0453 ; NFD_QC; N # L& CYRILLIC SMALL LETTER GJE
+0457 ; NFD_QC; N # L& CYRILLIC SMALL LETTER YI
+045C..045E ; NFD_QC; N # L& [3] CYRILLIC SMALL LETTER KJE..CYRILLIC SMALL LETTER SHORT U
+0476..0477 ; NFD_QC; N # L& [2] CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT..CYRILLIC SMALL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT
+04C1..04C2 ; NFD_QC; N # L& [2] CYRILLIC CAPITAL LETTER ZHE WITH BREVE..CYRILLIC SMALL LETTER ZHE WITH BREVE
+04D0..04D3 ; NFD_QC; N # L& [4] CYRILLIC CAPITAL LETTER A WITH BREVE..CYRILLIC SMALL LETTER A WITH DIAERESIS
+04D6..04D7 ; NFD_QC; N # L& [2] CYRILLIC CAPITAL LETTER IE WITH BREVE..CYRILLIC SMALL LETTER IE WITH BREVE
+04DA..04DF ; NFD_QC; N # L& [6] CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS..CYRILLIC SMALL LETTER ZE WITH DIAERESIS
+04E2..04E7 ; NFD_QC; N # L& [6] CYRILLIC CAPITAL LETTER I WITH MACRON..CYRILLIC SMALL LETTER O WITH DIAERESIS
+04EA..04F5 ; NFD_QC; N # L& [12] CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS..CYRILLIC SMALL LETTER CHE WITH DIAERESIS
+04F8..04F9 ; NFD_QC; N # L& [2] CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS..CYRILLIC SMALL LETTER YERU WITH DIAERESIS
+0622..0626 ; NFD_QC; N # Lo [5] ARABIC LETTER ALEF WITH MADDA ABOVE..ARABIC LETTER YEH WITH HAMZA ABOVE
+06C0 ; NFD_QC; N # Lo ARABIC LETTER HEH WITH YEH ABOVE
+06C2 ; NFD_QC; N # Lo ARABIC LETTER HEH GOAL WITH HAMZA ABOVE
+06D3 ; NFD_QC; N # Lo ARABIC LETTER YEH BARREE WITH HAMZA ABOVE
+0929 ; NFD_QC; N # Lo DEVANAGARI LETTER NNNA
+0931 ; NFD_QC; N # Lo DEVANAGARI LETTER RRA
+0934 ; NFD_QC; N # Lo DEVANAGARI LETTER LLLA
+0958..095F ; NFD_QC; N # Lo [8] DEVANAGARI LETTER QA..DEVANAGARI LETTER YYA
+09CB..09CC ; NFD_QC; N # Mc [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU
+09DC..09DD ; NFD_QC; N # Lo [2] BENGALI LETTER RRA..BENGALI LETTER RHA
+09DF ; NFD_QC; N # Lo BENGALI LETTER YYA
+0A33 ; NFD_QC; N # Lo GURMUKHI LETTER LLA
+0A36 ; NFD_QC; N # Lo GURMUKHI LETTER SHA
+0A59..0A5B ; NFD_QC; N # Lo [3] GURMUKHI LETTER KHHA..GURMUKHI LETTER ZA
+0A5E ; NFD_QC; N # Lo GURMUKHI LETTER FA
+0B48 ; NFD_QC; N # Mc ORIYA VOWEL SIGN AI
+0B4B..0B4C ; NFD_QC; N # Mc [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU
+0B5C..0B5D ; NFD_QC; N # Lo [2] ORIYA LETTER RRA..ORIYA LETTER RHA
+0B94 ; NFD_QC; N # Lo TAMIL LETTER AU
+0BCA..0BCC ; NFD_QC; N # Mc [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU
+0C48 ; NFD_QC; N # Mn TELUGU VOWEL SIGN AI
+0CC0 ; NFD_QC; N # Mc KANNADA VOWEL SIGN II
+0CC7..0CC8 ; NFD_QC; N # Mc [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI
+0CCA..0CCB ; NFD_QC; N # Mc [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO
+0D4A..0D4C ; NFD_QC; N # Mc [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU
+0DDA ; NFD_QC; N # Mc SINHALA VOWEL SIGN DIGA KOMBUVA
+0DDC..0DDE ; NFD_QC; N # Mc [3] SINHALA VOWEL SIGN KOMBUVA HAA AELA-PILLA..SINHALA VOWEL SIGN KOMBUVA HAA GAYANUKITTA
+0F43 ; NFD_QC; N # Lo TIBETAN LETTER GHA
+0F4D ; NFD_QC; N # Lo TIBETAN LETTER DDHA
+0F52 ; NFD_QC; N # Lo TIBETAN LETTER DHA
+0F57 ; NFD_QC; N # Lo TIBETAN LETTER BHA
+0F5C ; NFD_QC; N # Lo TIBETAN LETTER DZHA
+0F69 ; NFD_QC; N # Lo TIBETAN LETTER KSSA
+0F73 ; NFD_QC; N # Mn TIBETAN VOWEL SIGN II
+0F75..0F76 ; NFD_QC; N # Mn [2] TIBETAN VOWEL SIGN UU..TIBETAN VOWEL SIGN VOCALIC R
+0F78 ; NFD_QC; N # Mn TIBETAN VOWEL SIGN VOCALIC L
+0F81 ; NFD_QC; N # Mn TIBETAN VOWEL SIGN REVERSED II
+0F93 ; NFD_QC; N # Mn TIBETAN SUBJOINED LETTER GHA
+0F9D ; NFD_QC; N # Mn TIBETAN SUBJOINED LETTER DDHA
+0FA2 ; NFD_QC; N # Mn TIBETAN SUBJOINED LETTER DHA
+0FA7 ; NFD_QC; N # Mn TIBETAN SUBJOINED LETTER BHA
+0FAC ; NFD_QC; N # Mn TIBETAN SUBJOINED LETTER DZHA
+0FB9 ; NFD_QC; N # Mn TIBETAN SUBJOINED LETTER KSSA
+1026 ; NFD_QC; N # Lo MYANMAR LETTER UU
+1B06 ; NFD_QC; N # Lo BALINESE LETTER AKARA TEDUNG
+1B08 ; NFD_QC; N # Lo BALINESE LETTER IKARA TEDUNG
+1B0A ; NFD_QC; N # Lo BALINESE LETTER UKARA TEDUNG
+1B0C ; NFD_QC; N # Lo BALINESE LETTER RA REPA TEDUNG
+1B0E ; NFD_QC; N # Lo BALINESE LETTER LA LENGA TEDUNG
+1B12 ; NFD_QC; N # Lo BALINESE LETTER OKARA TEDUNG
+1B3B ; NFD_QC; N # Mc BALINESE VOWEL SIGN RA REPA TEDUNG
+1B3D ; NFD_QC; N # Mc BALINESE VOWEL SIGN LA LENGA TEDUNG
+1B40..1B41 ; NFD_QC; N # Mc [2] BALINESE VOWEL SIGN TALING TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG
+1B43 ; NFD_QC; N # Mc BALINESE VOWEL SIGN PEPET TEDUNG
+1E00..1E99 ; NFD_QC; N # L& [154] LATIN CAPITAL LETTER A WITH RING BELOW..LATIN SMALL LETTER Y WITH RING ABOVE
+1E9B ; NFD_QC; N # L& LATIN SMALL LETTER LONG S WITH DOT ABOVE
+1EA0..1EF9 ; NFD_QC; N # L& [90] LATIN CAPITAL LETTER A WITH DOT BELOW..LATIN SMALL LETTER Y WITH TILDE
+1F00..1F15 ; NFD_QC; N # L& [22] GREEK SMALL LETTER ALPHA WITH PSILI..GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA
+1F18..1F1D ; NFD_QC; N # L& [6] GREEK CAPITAL LETTER EPSILON WITH PSILI..GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA
+1F20..1F45 ; NFD_QC; N # L& [38] GREEK SMALL LETTER ETA WITH PSILI..GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA
+1F48..1F4D ; NFD_QC; N # L& [6] GREEK CAPITAL LETTER OMICRON WITH PSILI..GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA
+1F50..1F57 ; NFD_QC; N # L& [8] GREEK SMALL LETTER UPSILON WITH PSILI..GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI
+1F59 ; NFD_QC; N # L& GREEK CAPITAL LETTER UPSILON WITH DASIA
+1F5B ; NFD_QC; N # L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA
+1F5D ; NFD_QC; N # L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA
+1F5F..1F7D ; NFD_QC; N # L& [31] GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI..GREEK SMALL LETTER OMEGA WITH OXIA
+1F80..1FB4 ; NFD_QC; N # L& [53] GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI..GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI
+1FB6..1FBC ; NFD_QC; N # L& [7] GREEK SMALL LETTER ALPHA WITH PERISPOMENI..GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI
+1FBE ; NFD_QC; N # L& GREEK PROSGEGRAMMENI
+1FC1 ; NFD_QC; N # Sk GREEK DIALYTIKA AND PERISPOMENI
+1FC2..1FC4 ; NFD_QC; N # L& [3] GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI
+1FC6..1FCC ; NFD_QC; N # L& [7] GREEK SMALL LETTER ETA WITH PERISPOMENI..GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI
+1FCD..1FCF ; NFD_QC; N # Sk [3] GREEK PSILI AND VARIA..GREEK PSILI AND PERISPOMENI
+1FD0..1FD3 ; NFD_QC; N # L& [4] GREEK SMALL LETTER IOTA WITH VRACHY..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
+1FD6..1FDB ; NFD_QC; N # L& [6] GREEK SMALL LETTER IOTA WITH PERISPOMENI..GREEK CAPITAL LETTER IOTA WITH OXIA
+1FDD..1FDF ; NFD_QC; N # Sk [3] GREEK DASIA AND VARIA..GREEK DASIA AND PERISPOMENI
+1FE0..1FEC ; NFD_QC; N # L& [13] GREEK SMALL LETTER UPSILON WITH VRACHY..GREEK CAPITAL LETTER RHO WITH DASIA
+1FED..1FEF ; NFD_QC; N # Sk [3] GREEK DIALYTIKA AND VARIA..GREEK VARIA
+1FF2..1FF4 ; NFD_QC; N # L& [3] GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI
+1FF6..1FFC ; NFD_QC; N # L& [7] GREEK SMALL LETTER OMEGA WITH PERISPOMENI..GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI
+1FFD ; NFD_QC; N # Sk GREEK OXIA
+2000..2001 ; NFD_QC; N # Zs [2] EN QUAD..EM QUAD
+2126 ; NFD_QC; N # L& OHM SIGN
+212A..212B ; NFD_QC; N # L& [2] KELVIN SIGN..ANGSTROM SIGN
+219A..219B ; NFD_QC; N # Sm [2] LEFTWARDS ARROW WITH STROKE..RIGHTWARDS ARROW WITH STROKE
+21AE ; NFD_QC; N # Sm LEFT RIGHT ARROW WITH STROKE
+21CD ; NFD_QC; N # So LEFTWARDS DOUBLE ARROW WITH STROKE
+21CE..21CF ; NFD_QC; N # Sm [2] LEFT RIGHT DOUBLE ARROW WITH STROKE..RIGHTWARDS DOUBLE ARROW WITH STROKE
+2204 ; NFD_QC; N # Sm THERE DOES NOT EXIST
+2209 ; NFD_QC; N # Sm NOT AN ELEMENT OF
+220C ; NFD_QC; N # Sm DOES NOT CONTAIN AS MEMBER
+2224 ; NFD_QC; N # Sm DOES NOT DIVIDE
+2226 ; NFD_QC; N # Sm NOT PARALLEL TO
+2241 ; NFD_QC; N # Sm NOT TILDE
+2244 ; NFD_QC; N # Sm NOT ASYMPTOTICALLY EQUAL TO
+2247 ; NFD_QC; N # Sm NEITHER APPROXIMATELY NOR ACTUALLY EQUAL TO
+2249 ; NFD_QC; N # Sm NOT ALMOST EQUAL TO
+2260 ; NFD_QC; N # Sm NOT EQUAL TO
+2262 ; NFD_QC; N # Sm NOT IDENTICAL TO
+226D..2271 ; NFD_QC; N # Sm [5] NOT EQUIVALENT TO..NEITHER GREATER-THAN NOR EQUAL TO
+2274..2275 ; NFD_QC; N # Sm [2] NEITHER LESS-THAN NOR EQUIVALENT TO..NEITHER GREATER-THAN NOR EQUIVALENT TO
+2278..2279 ; NFD_QC; N # Sm [2] NEITHER LESS-THAN NOR GREATER-THAN..NEITHER GREATER-THAN NOR LESS-THAN
+2280..2281 ; NFD_QC; N # Sm [2] DOES NOT PRECEDE..DOES NOT SUCCEED
+2284..2285 ; NFD_QC; N # Sm [2] NOT A SUBSET OF..NOT A SUPERSET OF
+2288..2289 ; NFD_QC; N # Sm [2] NEITHER A SUBSET OF NOR EQUAL TO..NEITHER A SUPERSET OF NOR EQUAL TO
+22AC..22AF ; NFD_QC; N # Sm [4] DOES NOT PROVE..NEGATED DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE
+22E0..22E3 ; NFD_QC; N # Sm [4] DOES NOT PRECEDE OR EQUAL..NOT SQUARE ORIGINAL OF OR EQUAL TO
+22EA..22ED ; NFD_QC; N # Sm [4] NOT NORMAL SUBGROUP OF..DOES NOT CONTAIN AS NORMAL SUBGROUP OR EQUAL
+2329 ; NFD_QC; N # Ps LEFT-POINTING ANGLE BRACKET
+232A ; NFD_QC; N # Pe RIGHT-POINTING ANGLE BRACKET
+2ADC ; NFD_QC; N # Sm FORKING
+304C ; NFD_QC; N # Lo HIRAGANA LETTER GA
+304E ; NFD_QC; N # Lo HIRAGANA LETTER GI
+3050 ; NFD_QC; N # Lo HIRAGANA LETTER GU
+3052 ; NFD_QC; N # Lo HIRAGANA LETTER GE
+3054 ; NFD_QC; N # Lo HIRAGANA LETTER GO
+3056 ; NFD_QC; N # Lo HIRAGANA LETTER ZA
+3058 ; NFD_QC; N # Lo HIRAGANA LETTER ZI
+305A ; NFD_QC; N # Lo HIRAGANA LETTER ZU
+305C ; NFD_QC; N # Lo HIRAGANA LETTER ZE
+305E ; NFD_QC; N # Lo HIRAGANA LETTER ZO
+3060 ; NFD_QC; N # Lo HIRAGANA LETTER DA
+3062 ; NFD_QC; N # Lo HIRAGANA LETTER DI
+3065 ; NFD_QC; N # Lo HIRAGANA LETTER DU
+3067 ; NFD_QC; N # Lo HIRAGANA LETTER DE
+3069 ; NFD_QC; N # Lo HIRAGANA LETTER DO
+3070..3071 ; NFD_QC; N # Lo [2] HIRAGANA LETTER BA..HIRAGANA LETTER PA
+3073..3074 ; NFD_QC; N # Lo [2] HIRAGANA LETTER BI..HIRAGANA LETTER PI
+3076..3077 ; NFD_QC; N # Lo [2] HIRAGANA LETTER BU..HIRAGANA LETTER PU
+3079..307A ; NFD_QC; N # Lo [2] HIRAGANA LETTER BE..HIRAGANA LETTER PE
+307C..307D ; NFD_QC; N # Lo [2] HIRAGANA LETTER BO..HIRAGANA LETTER PO
+3094 ; NFD_QC; N # Lo HIRAGANA LETTER VU
+309E ; NFD_QC; N # Lm HIRAGANA VOICED ITERATION MARK
+30AC ; NFD_QC; N # Lo KATAKANA LETTER GA
+30AE ; NFD_QC; N # Lo KATAKANA LETTER GI
+30B0 ; NFD_QC; N # Lo KATAKANA LETTER GU
+30B2 ; NFD_QC; N # Lo KATAKANA LETTER GE
+30B4 ; NFD_QC; N # Lo KATAKANA LETTER GO
+30B6 ; NFD_QC; N # Lo KATAKANA LETTER ZA
+30B8 ; NFD_QC; N # Lo KATAKANA LETTER ZI
+30BA ; NFD_QC; N # Lo KATAKANA LETTER ZU
+30BC ; NFD_QC; N # Lo KATAKANA LETTER ZE
+30BE ; NFD_QC; N # Lo KATAKANA LETTER ZO
+30C0 ; NFD_QC; N # Lo KATAKANA LETTER DA
+30C2 ; NFD_QC; N # Lo KATAKANA LETTER DI
+30C5 ; NFD_QC; N # Lo KATAKANA LETTER DU
+30C7 ; NFD_QC; N # Lo KATAKANA LETTER DE
+30C9 ; NFD_QC; N # Lo KATAKANA LETTER DO
+30D0..30D1 ; NFD_QC; N # Lo [2] KATAKANA LETTER BA..KATAKANA LETTER PA
+30D3..30D4 ; NFD_QC; N # Lo [2] KATAKANA LETTER BI..KATAKANA LETTER PI
+30D6..30D7 ; NFD_QC; N # Lo [2] KATAKANA LETTER BU..KATAKANA LETTER PU
+30D9..30DA ; NFD_QC; N # Lo [2] KATAKANA LETTER BE..KATAKANA LETTER PE
+30DC..30DD ; NFD_QC; N # Lo [2] KATAKANA LETTER BO..KATAKANA LETTER PO
+30F4 ; NFD_QC; N # Lo KATAKANA LETTER VU
+30F7..30FA ; NFD_QC; N # Lo [4] KATAKANA LETTER VA..KATAKANA LETTER VO
+30FE ; NFD_QC; N # Lm KATAKANA VOICED ITERATION MARK
+AC00..D7A3 ; NFD_QC; N # Lo [11172] HANGUL SYLLABLE GA..HANGUL SYLLABLE HIH
+F900..FA0D ; NFD_QC; N # Lo [270] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA0D
+FA10 ; NFD_QC; N # Lo CJK COMPATIBILITY IDEOGRAPH-FA10
+FA12 ; NFD_QC; N # Lo CJK COMPATIBILITY IDEOGRAPH-FA12
+FA15..FA1E ; NFD_QC; N # Lo [10] CJK COMPATIBILITY IDEOGRAPH-FA15..CJK COMPATIBILITY IDEOGRAPH-FA1E
+FA20 ; NFD_QC; N # Lo CJK COMPATIBILITY IDEOGRAPH-FA20
+FA22 ; NFD_QC; N # Lo CJK COMPATIBILITY IDEOGRAPH-FA22
+FA25..FA26 ; NFD_QC; N # Lo [2] CJK COMPATIBILITY IDEOGRAPH-FA25..CJK COMPATIBILITY IDEOGRAPH-FA26
+FA2A..FA2D ; NFD_QC; N # Lo [4] CJK COMPATIBILITY IDEOGRAPH-FA2A..CJK COMPATIBILITY IDEOGRAPH-FA2D
+FA30..FA6A ; NFD_QC; N # Lo [59] CJK COMPATIBILITY IDEOGRAPH-FA30..CJK COMPATIBILITY IDEOGRAPH-FA6A
+FA70..FAD9 ; NFD_QC; N # Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9
+FB1D ; NFD_QC; N # Lo HEBREW LETTER YOD WITH HIRIQ
+FB1F ; NFD_QC; N # Lo HEBREW LIGATURE YIDDISH YOD YOD PATAH
+FB2A..FB36 ; NFD_QC; N # Lo [13] HEBREW LETTER SHIN WITH SHIN DOT..HEBREW LETTER ZAYIN WITH DAGESH
+FB38..FB3C ; NFD_QC; N # Lo [5] HEBREW LETTER TET WITH DAGESH..HEBREW LETTER LAMED WITH DAGESH
+FB3E ; NFD_QC; N # Lo HEBREW LETTER MEM WITH DAGESH
+FB40..FB41 ; NFD_QC; N # Lo [2] HEBREW LETTER NUN WITH DAGESH..HEBREW LETTER SAMEKH WITH DAGESH
+FB43..FB44 ; NFD_QC; N # Lo [2] HEBREW LETTER FINAL PE WITH DAGESH..HEBREW LETTER PE WITH DAGESH
+FB46..FB4E ; NFD_QC; N # Lo [9] HEBREW LETTER TSADI WITH DAGESH..HEBREW LETTER PE WITH RAFE
+1D15E..1D164 ; NFD_QC; N # So [7] MUSICAL SYMBOL HALF NOTE..MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE
+1D1BB..1D1C0 ; NFD_QC; N # So [6] MUSICAL SYMBOL MINIMA..MUSICAL SYMBOL FUSA BLACK
+2F800..2FA1D ; NFD_QC; N # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D
+
+# Total code points: 13215
+
+# ================================================
+
+# Property: NFC_Quick_Check
+
+# All code points not explicitly listed for NFC_Quick_Check
+# have the value Yes (Y).
+
+# @missing: 0000..10FFFF; NFC_QC; Yes
+
+# ================================================
+
+# NFC_Quick_Check=No
+
+0340..0341 ; NFC_QC; N # Mn [2] COMBINING GRAVE TONE MARK..COMBINING ACUTE TONE MARK
+0343..0344 ; NFC_QC; N # Mn [2] COMBINING GREEK KORONIS..COMBINING GREEK DIALYTIKA TONOS
+0374 ; NFC_QC; N # Sk GREEK NUMERAL SIGN
+037E ; NFC_QC; N # Po GREEK QUESTION MARK
+0387 ; NFC_QC; N # Po GREEK ANO TELEIA
+0958..095F ; NFC_QC; N # Lo [8] DEVANAGARI LETTER QA..DEVANAGARI LETTER YYA
+09DC..09DD ; NFC_QC; N # Lo [2] BENGALI LETTER RRA..BENGALI LETTER RHA
+09DF ; NFC_QC; N # Lo BENGALI LETTER YYA
+0A33 ; NFC_QC; N # Lo GURMUKHI LETTER LLA
+0A36 ; NFC_QC; N # Lo GURMUKHI LETTER SHA
+0A59..0A5B ; NFC_QC; N # Lo [3] GURMUKHI LETTER KHHA..GURMUKHI LETTER ZA
+0A5E ; NFC_QC; N # Lo GURMUKHI LETTER FA
+0B5C..0B5D ; NFC_QC; N # Lo [2] ORIYA LETTER RRA..ORIYA LETTER RHA
+0F43 ; NFC_QC; N # Lo TIBETAN LETTER GHA
+0F4D ; NFC_QC; N # Lo TIBETAN LETTER DDHA
+0F52 ; NFC_QC; N # Lo TIBETAN LETTER DHA
+0F57 ; NFC_QC; N # Lo TIBETAN LETTER BHA
+0F5C ; NFC_QC; N # Lo TIBETAN LETTER DZHA
+0F69 ; NFC_QC; N # Lo TIBETAN LETTER KSSA
+0F73 ; NFC_QC; N # Mn TIBETAN VOWEL SIGN II
+0F75..0F76 ; NFC_QC; N # Mn [2] TIBETAN VOWEL SIGN UU..TIBETAN VOWEL SIGN VOCALIC R
+0F78 ; NFC_QC; N # Mn TIBETAN VOWEL SIGN VOCALIC L
+0F81 ; NFC_QC; N # Mn TIBETAN VOWEL SIGN REVERSED II
+0F93 ; NFC_QC; N # Mn TIBETAN SUBJOINED LETTER GHA
+0F9D ; NFC_QC; N # Mn TIBETAN SUBJOINED LETTER DDHA
+0FA2 ; NFC_QC; N # Mn TIBETAN SUBJOINED LETTER DHA
+0FA7 ; NFC_QC; N # Mn TIBETAN SUBJOINED LETTER BHA
+0FAC ; NFC_QC; N # Mn TIBETAN SUBJOINED LETTER DZHA
+0FB9 ; NFC_QC; N # Mn TIBETAN SUBJOINED LETTER KSSA
+1F71 ; NFC_QC; N # L& GREEK SMALL LETTER ALPHA WITH OXIA
+1F73 ; NFC_QC; N # L& GREEK SMALL LETTER EPSILON WITH OXIA
+1F75 ; NFC_QC; N # L& GREEK SMALL LETTER ETA WITH OXIA
+1F77 ; NFC_QC; N # L& GREEK SMALL LETTER IOTA WITH OXIA
+1F79 ; NFC_QC; N # L& GREEK SMALL LETTER OMICRON WITH OXIA
+1F7B ; NFC_QC; N # L& GREEK SMALL LETTER UPSILON WITH OXIA
+1F7D ; NFC_QC; N # L& GREEK SMALL LETTER OMEGA WITH OXIA
+1FBB ; NFC_QC; N # L& GREEK CAPITAL LETTER ALPHA WITH OXIA
+1FBE ; NFC_QC; N # L& GREEK PROSGEGRAMMENI
+1FC9 ; NFC_QC; N # L& GREEK CAPITAL LETTER EPSILON WITH OXIA
+1FCB ; NFC_QC; N # L& GREEK CAPITAL LETTER ETA WITH OXIA
+1FD3 ; NFC_QC; N # L& GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
+1FDB ; NFC_QC; N # L& GREEK CAPITAL LETTER IOTA WITH OXIA
+1FE3 ; NFC_QC; N # L& GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA
+1FEB ; NFC_QC; N # L& GREEK CAPITAL LETTER UPSILON WITH OXIA
+1FEE..1FEF ; NFC_QC; N # Sk [2] GREEK DIALYTIKA AND OXIA..GREEK VARIA
+1FF9 ; NFC_QC; N # L& GREEK CAPITAL LETTER OMICRON WITH OXIA
+1FFB ; NFC_QC; N # L& GREEK CAPITAL LETTER OMEGA WITH OXIA
+1FFD ; NFC_QC; N # Sk GREEK OXIA
+2000..2001 ; NFC_QC; N # Zs [2] EN QUAD..EM QUAD
+2126 ; NFC_QC; N # L& OHM SIGN
+212A..212B ; NFC_QC; N # L& [2] KELVIN SIGN..ANGSTROM SIGN
+2329 ; NFC_QC; N # Ps LEFT-POINTING ANGLE BRACKET
+232A ; NFC_QC; N # Pe RIGHT-POINTING ANGLE BRACKET
+2ADC ; NFC_QC; N # Sm FORKING
+F900..FA0D ; NFC_QC; N # Lo [270] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA0D
+FA10 ; NFC_QC; N # Lo CJK COMPATIBILITY IDEOGRAPH-FA10
+FA12 ; NFC_QC; N # Lo CJK COMPATIBILITY IDEOGRAPH-FA12
+FA15..FA1E ; NFC_QC; N # Lo [10] CJK COMPATIBILITY IDEOGRAPH-FA15..CJK COMPATIBILITY IDEOGRAPH-FA1E
+FA20 ; NFC_QC; N # Lo CJK COMPATIBILITY IDEOGRAPH-FA20
+FA22 ; NFC_QC; N # Lo CJK COMPATIBILITY IDEOGRAPH-FA22
+FA25..FA26 ; NFC_QC; N # Lo [2] CJK COMPATIBILITY IDEOGRAPH-FA25..CJK COMPATIBILITY IDEOGRAPH-FA26
+FA2A..FA2D ; NFC_QC; N # Lo [4] CJK COMPATIBILITY IDEOGRAPH-FA2A..CJK COMPATIBILITY IDEOGRAPH-FA2D
+FA30..FA6A ; NFC_QC; N # Lo [59] CJK COMPATIBILITY IDEOGRAPH-FA30..CJK COMPATIBILITY IDEOGRAPH-FA6A
+FA70..FAD9 ; NFC_QC; N # Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9
+FB1D ; NFC_QC; N # Lo HEBREW LETTER YOD WITH HIRIQ
+FB1F ; NFC_QC; N # Lo HEBREW LIGATURE YIDDISH YOD YOD PATAH
+FB2A..FB36 ; NFC_QC; N # Lo [13] HEBREW LETTER SHIN WITH SHIN DOT..HEBREW LETTER ZAYIN WITH DAGESH
+FB38..FB3C ; NFC_QC; N # Lo [5] HEBREW LETTER TET WITH DAGESH..HEBREW LETTER LAMED WITH DAGESH
+FB3E ; NFC_QC; N # Lo HEBREW LETTER MEM WITH DAGESH
+FB40..FB41 ; NFC_QC; N # Lo [2] HEBREW LETTER NUN WITH DAGESH..HEBREW LETTER SAMEKH WITH DAGESH
+FB43..FB44 ; NFC_QC; N # Lo [2] HEBREW LETTER FINAL PE WITH DAGESH..HEBREW LETTER PE WITH DAGESH
+FB46..FB4E ; NFC_QC; N # Lo [9] HEBREW LETTER TSADI WITH DAGESH..HEBREW LETTER PE WITH RAFE
+1D15E..1D164 ; NFC_QC; N # So [7] MUSICAL SYMBOL HALF NOTE..MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE
+1D1BB..1D1C0 ; NFC_QC; N # So [6] MUSICAL SYMBOL MINIMA..MUSICAL SYMBOL FUSA BLACK
+2F800..2FA1D ; NFC_QC; N # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D
+
+# Total code points: 1115
+
+# ================================================
+
+# NFC_Quick_Check=Maybe
+
+0300..0304 ; NFC_QC; M # Mn [5] COMBINING GRAVE ACCENT..COMBINING MACRON
+0306..030C ; NFC_QC; M # Mn [7] COMBINING BREVE..COMBINING CARON
+030F ; NFC_QC; M # Mn COMBINING DOUBLE GRAVE ACCENT
+0311 ; NFC_QC; M # Mn COMBINING INVERTED BREVE
+0313..0314 ; NFC_QC; M # Mn [2] COMBINING COMMA ABOVE..COMBINING REVERSED COMMA ABOVE
+031B ; NFC_QC; M # Mn COMBINING HORN
+0323..0328 ; NFC_QC; M # Mn [6] COMBINING DOT BELOW..COMBINING OGONEK
+032D..032E ; NFC_QC; M # Mn [2] COMBINING CIRCUMFLEX ACCENT BELOW..COMBINING BREVE BELOW
+0330..0331 ; NFC_QC; M # Mn [2] COMBINING TILDE BELOW..COMBINING MACRON BELOW
+0338 ; NFC_QC; M # Mn COMBINING LONG SOLIDUS OVERLAY
+0342 ; NFC_QC; M # Mn COMBINING GREEK PERISPOMENI
+0345 ; NFC_QC; M # Mn COMBINING GREEK YPOGEGRAMMENI
+0653..0655 ; NFC_QC; M # Mn [3] ARABIC MADDAH ABOVE..ARABIC HAMZA BELOW
+093C ; NFC_QC; M # Mn DEVANAGARI SIGN NUKTA
+09BE ; NFC_QC; M # Mc BENGALI VOWEL SIGN AA
+09D7 ; NFC_QC; M # Mc BENGALI AU LENGTH MARK
+0B3E ; NFC_QC; M # Mc ORIYA VOWEL SIGN AA
+0B56 ; NFC_QC; M # Mn ORIYA AI LENGTH MARK
+0B57 ; NFC_QC; M # Mc ORIYA AU LENGTH MARK
+0BBE ; NFC_QC; M # Mc TAMIL VOWEL SIGN AA
+0BD7 ; NFC_QC; M # Mc TAMIL AU LENGTH MARK
+0C56 ; NFC_QC; M # Mn TELUGU AI LENGTH MARK
+0CC2 ; NFC_QC; M # Mc KANNADA VOWEL SIGN UU
+0CD5..0CD6 ; NFC_QC; M # Mc [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK
+0D3E ; NFC_QC; M # Mc MALAYALAM VOWEL SIGN AA
+0D57 ; NFC_QC; M # Mc MALAYALAM AU LENGTH MARK
+0DCA ; NFC_QC; M # Mn SINHALA SIGN AL-LAKUNA
+0DCF ; NFC_QC; M # Mc SINHALA VOWEL SIGN AELA-PILLA
+0DDF ; NFC_QC; M # Mc SINHALA VOWEL SIGN GAYANUKITTA
+102E ; NFC_QC; M # Mn MYANMAR VOWEL SIGN II
+1161..1175 ; NFC_QC; M # Lo [21] HANGUL JUNGSEONG A..HANGUL JUNGSEONG I
+11A8..11C2 ; NFC_QC; M # Lo [27] HANGUL JONGSEONG KIYEOK..HANGUL JONGSEONG HIEUH
+1B35 ; NFC_QC; M # Mc BALINESE VOWEL SIGN TEDUNG
+3099..309A ; NFC_QC; M # Mn [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+
+# Total code points: 102
+
+# ================================================
+
+# Property: NFKD_Quick_Check
+
+# All code points not explicitly listed for NFKD_Quick_Check
+# have the value Yes (Y).
+
+# @missing: 0000..10FFFF; NFKD_QC; Yes
+
+# ================================================
+
+# NFKD_Quick_Check=No
+
+00A0 ; NFKD_QC; N # Zs NO-BREAK SPACE
+00A8 ; NFKD_QC; N # Sk DIAERESIS
+00AA ; NFKD_QC; N # L& FEMININE ORDINAL INDICATOR
+00AF ; NFKD_QC; N # Sk MACRON
+00B2..00B3 ; NFKD_QC; N # No [2] SUPERSCRIPT TWO..SUPERSCRIPT THREE
+00B4 ; NFKD_QC; N # Sk ACUTE ACCENT
+00B5 ; NFKD_QC; N # L& MICRO SIGN
+00B8 ; NFKD_QC; N # Sk CEDILLA
+00B9 ; NFKD_QC; N # No SUPERSCRIPT ONE
+00BA ; NFKD_QC; N # L& MASCULINE ORDINAL INDICATOR
+00BC..00BE ; NFKD_QC; N # No [3] VULGAR FRACTION ONE QUARTER..VULGAR FRACTION THREE QUARTERS
+00C0..00C5 ; NFKD_QC; N # L& [6] LATIN CAPITAL LETTER A WITH GRAVE..LATIN CAPITAL LETTER A WITH RING ABOVE
+00C7..00CF ; NFKD_QC; N # L& [9] LATIN CAPITAL LETTER C WITH CEDILLA..LATIN CAPITAL LETTER I WITH DIAERESIS
+00D1..00D6 ; NFKD_QC; N # L& [6] LATIN CAPITAL LETTER N WITH TILDE..LATIN CAPITAL LETTER O WITH DIAERESIS
+00D9..00DD ; NFKD_QC; N # L& [5] LATIN CAPITAL LETTER U WITH GRAVE..LATIN CAPITAL LETTER Y WITH ACUTE
+00E0..00E5 ; NFKD_QC; N # L& [6] LATIN SMALL LETTER A WITH GRAVE..LATIN SMALL LETTER A WITH RING ABOVE
+00E7..00EF ; NFKD_QC; N # L& [9] LATIN SMALL LETTER C WITH CEDILLA..LATIN SMALL LETTER I WITH DIAERESIS
+00F1..00F6 ; NFKD_QC; N # L& [6] LATIN SMALL LETTER N WITH TILDE..LATIN SMALL LETTER O WITH DIAERESIS
+00F9..00FD ; NFKD_QC; N # L& [5] LATIN SMALL LETTER U WITH GRAVE..LATIN SMALL LETTER Y WITH ACUTE
+00FF..010F ; NFKD_QC; N # L& [17] LATIN SMALL LETTER Y WITH DIAERESIS..LATIN SMALL LETTER D WITH CARON
+0112..0125 ; NFKD_QC; N # L& [20] LATIN CAPITAL LETTER E WITH MACRON..LATIN SMALL LETTER H WITH CIRCUMFLEX
+0128..0130 ; NFKD_QC; N # L& [9] LATIN CAPITAL LETTER I WITH TILDE..LATIN CAPITAL LETTER I WITH DOT ABOVE
+0132..0137 ; NFKD_QC; N # L& [6] LATIN CAPITAL LIGATURE IJ..LATIN SMALL LETTER K WITH CEDILLA
+0139..0140 ; NFKD_QC; N # L& [8] LATIN CAPITAL LETTER L WITH ACUTE..LATIN SMALL LETTER L WITH MIDDLE DOT
+0143..0149 ; NFKD_QC; N # L& [7] LATIN CAPITAL LETTER N WITH ACUTE..LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
+014C..0151 ; NFKD_QC; N # L& [6] LATIN CAPITAL LETTER O WITH MACRON..LATIN SMALL LETTER O WITH DOUBLE ACUTE
+0154..0165 ; NFKD_QC; N # L& [18] LATIN CAPITAL LETTER R WITH ACUTE..LATIN SMALL LETTER T WITH CARON
+0168..017F ; NFKD_QC; N # L& [24] LATIN CAPITAL LETTER U WITH TILDE..LATIN SMALL LETTER LONG S
+01A0..01A1 ; NFKD_QC; N # L& [2] LATIN CAPITAL LETTER O WITH HORN..LATIN SMALL LETTER O WITH HORN
+01AF..01B0 ; NFKD_QC; N # L& [2] LATIN CAPITAL LETTER U WITH HORN..LATIN SMALL LETTER U WITH HORN
+01C4..01DC ; NFKD_QC; N # L& [25] LATIN CAPITAL LETTER DZ WITH CARON..LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE
+01DE..01E3 ; NFKD_QC; N # L& [6] LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON..LATIN SMALL LETTER AE WITH MACRON
+01E6..01F5 ; NFKD_QC; N # L& [16] LATIN CAPITAL LETTER G WITH CARON..LATIN SMALL LETTER G WITH ACUTE
+01F8..021B ; NFKD_QC; N # L& [36] LATIN CAPITAL LETTER N WITH GRAVE..LATIN SMALL LETTER T WITH COMMA BELOW
+021E..021F ; NFKD_QC; N # L& [2] LATIN CAPITAL LETTER H WITH CARON..LATIN SMALL LETTER H WITH CARON
+0226..0233 ; NFKD_QC; N # L& [14] LATIN CAPITAL LETTER A WITH DOT ABOVE..LATIN SMALL LETTER Y WITH MACRON
+02B0..02B8 ; NFKD_QC; N # Lm [9] MODIFIER LETTER SMALL H..MODIFIER LETTER SMALL Y
+02D8..02DD ; NFKD_QC; N # Sk [6] BREVE..DOUBLE ACUTE ACCENT
+02E0..02E4 ; NFKD_QC; N # Lm [5] MODIFIER LETTER SMALL GAMMA..MODIFIER LETTER SMALL REVERSED GLOTTAL STOP
+0340..0341 ; NFKD_QC; N # Mn [2] COMBINING GRAVE TONE MARK..COMBINING ACUTE TONE MARK
+0343..0344 ; NFKD_QC; N # Mn [2] COMBINING GREEK KORONIS..COMBINING GREEK DIALYTIKA TONOS
+0374 ; NFKD_QC; N # Sk GREEK NUMERAL SIGN
+037A ; NFKD_QC; N # Lm GREEK YPOGEGRAMMENI
+037E ; NFKD_QC; N # Po GREEK QUESTION MARK
+0384..0385 ; NFKD_QC; N # Sk [2] GREEK TONOS..GREEK DIALYTIKA TONOS
+0386 ; NFKD_QC; N # L& GREEK CAPITAL LETTER ALPHA WITH TONOS
+0387 ; NFKD_QC; N # Po GREEK ANO TELEIA
+0388..038A ; NFKD_QC; N # L& [3] GREEK CAPITAL LETTER EPSILON WITH TONOS..GREEK CAPITAL LETTER IOTA WITH TONOS
+038C ; NFKD_QC; N # L& GREEK CAPITAL LETTER OMICRON WITH TONOS
+038E..0390 ; NFKD_QC; N # L& [3] GREEK CAPITAL LETTER UPSILON WITH TONOS..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
+03AA..03B0 ; NFKD_QC; N # L& [7] GREEK CAPITAL LETTER IOTA WITH DIALYTIKA..GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS
+03CA..03CE ; NFKD_QC; N # L& [5] GREEK SMALL LETTER IOTA WITH DIALYTIKA..GREEK SMALL LETTER OMEGA WITH TONOS
+03D0..03D6 ; NFKD_QC; N # L& [7] GREEK BETA SYMBOL..GREEK PI SYMBOL
+03F0..03F2 ; NFKD_QC; N # L& [3] GREEK KAPPA SYMBOL..GREEK LUNATE SIGMA SYMBOL
+03F4..03F5 ; NFKD_QC; N # L& [2] GREEK CAPITAL THETA SYMBOL..GREEK LUNATE EPSILON SYMBOL
+03F9 ; NFKD_QC; N # L& GREEK CAPITAL LUNATE SIGMA SYMBOL
+0400..0401 ; NFKD_QC; N # L& [2] CYRILLIC CAPITAL LETTER IE WITH GRAVE..CYRILLIC CAPITAL LETTER IO
+0403 ; NFKD_QC; N # L& CYRILLIC CAPITAL LETTER GJE
+0407 ; NFKD_QC; N # L& CYRILLIC CAPITAL LETTER YI
+040C..040E ; NFKD_QC; N # L& [3] CYRILLIC CAPITAL LETTER KJE..CYRILLIC CAPITAL LETTER SHORT U
+0419 ; NFKD_QC; N # L& CYRILLIC CAPITAL LETTER SHORT I
+0439 ; NFKD_QC; N # L& CYRILLIC SMALL LETTER SHORT I
+0450..0451 ; NFKD_QC; N # L& [2] CYRILLIC SMALL LETTER IE WITH GRAVE..CYRILLIC SMALL LETTER IO
+0453 ; NFKD_QC; N # L& CYRILLIC SMALL LETTER GJE
+0457 ; NFKD_QC; N # L& CYRILLIC SMALL LETTER YI
+045C..045E ; NFKD_QC; N # L& [3] CYRILLIC SMALL LETTER KJE..CYRILLIC SMALL LETTER SHORT U
+0476..0477 ; NFKD_QC; N # L& [2] CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT..CYRILLIC SMALL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT
+04C1..04C2 ; NFKD_QC; N # L& [2] CYRILLIC CAPITAL LETTER ZHE WITH BREVE..CYRILLIC SMALL LETTER ZHE WITH BREVE
+04D0..04D3 ; NFKD_QC; N # L& [4] CYRILLIC CAPITAL LETTER A WITH BREVE..CYRILLIC SMALL LETTER A WITH DIAERESIS
+04D6..04D7 ; NFKD_QC; N # L& [2] CYRILLIC CAPITAL LETTER IE WITH BREVE..CYRILLIC SMALL LETTER IE WITH BREVE
+04DA..04DF ; NFKD_QC; N # L& [6] CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS..CYRILLIC SMALL LETTER ZE WITH DIAERESIS
+04E2..04E7 ; NFKD_QC; N # L& [6] CYRILLIC CAPITAL LETTER I WITH MACRON..CYRILLIC SMALL LETTER O WITH DIAERESIS
+04EA..04F5 ; NFKD_QC; N # L& [12] CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS..CYRILLIC SMALL LETTER CHE WITH DIAERESIS
+04F8..04F9 ; NFKD_QC; N # L& [2] CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS..CYRILLIC SMALL LETTER YERU WITH DIAERESIS
+0587 ; NFKD_QC; N # L& ARMENIAN SMALL LIGATURE ECH YIWN
+0622..0626 ; NFKD_QC; N # Lo [5] ARABIC LETTER ALEF WITH MADDA ABOVE..ARABIC LETTER YEH WITH HAMZA ABOVE
+0675..0678 ; NFKD_QC; N # Lo [4] ARABIC LETTER HIGH HAMZA ALEF..ARABIC LETTER HIGH HAMZA YEH
+06C0 ; NFKD_QC; N # Lo ARABIC LETTER HEH WITH YEH ABOVE
+06C2 ; NFKD_QC; N # Lo ARABIC LETTER HEH GOAL WITH HAMZA ABOVE
+06D3 ; NFKD_QC; N # Lo ARABIC LETTER YEH BARREE WITH HAMZA ABOVE
+0929 ; NFKD_QC; N # Lo DEVANAGARI LETTER NNNA
+0931 ; NFKD_QC; N # Lo DEVANAGARI LETTER RRA
+0934 ; NFKD_QC; N # Lo DEVANAGARI LETTER LLLA
+0958..095F ; NFKD_QC; N # Lo [8] DEVANAGARI LETTER QA..DEVANAGARI LETTER YYA
+09CB..09CC ; NFKD_QC; N # Mc [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU
+09DC..09DD ; NFKD_QC; N # Lo [2] BENGALI LETTER RRA..BENGALI LETTER RHA
+09DF ; NFKD_QC; N # Lo BENGALI LETTER YYA
+0A33 ; NFKD_QC; N # Lo GURMUKHI LETTER LLA
+0A36 ; NFKD_QC; N # Lo GURMUKHI LETTER SHA
+0A59..0A5B ; NFKD_QC; N # Lo [3] GURMUKHI LETTER KHHA..GURMUKHI LETTER ZA
+0A5E ; NFKD_QC; N # Lo GURMUKHI LETTER FA
+0B48 ; NFKD_QC; N # Mc ORIYA VOWEL SIGN AI
+0B4B..0B4C ; NFKD_QC; N # Mc [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU
+0B5C..0B5D ; NFKD_QC; N # Lo [2] ORIYA LETTER RRA..ORIYA LETTER RHA
+0B94 ; NFKD_QC; N # Lo TAMIL LETTER AU
+0BCA..0BCC ; NFKD_QC; N # Mc [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU
+0C48 ; NFKD_QC; N # Mn TELUGU VOWEL SIGN AI
+0CC0 ; NFKD_QC; N # Mc KANNADA VOWEL SIGN II
+0CC7..0CC8 ; NFKD_QC; N # Mc [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI
+0CCA..0CCB ; NFKD_QC; N # Mc [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO
+0D4A..0D4C ; NFKD_QC; N # Mc [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU
+0DDA ; NFKD_QC; N # Mc SINHALA VOWEL SIGN DIGA KOMBUVA
+0DDC..0DDE ; NFKD_QC; N # Mc [3] SINHALA VOWEL SIGN KOMBUVA HAA AELA-PILLA..SINHALA VOWEL SIGN KOMBUVA HAA GAYANUKITTA
+0E33 ; NFKD_QC; N # Lo THAI CHARACTER SARA AM
+0EB3 ; NFKD_QC; N # Lo LAO VOWEL SIGN AM
+0EDC..0EDD ; NFKD_QC; N # Lo [2] LAO HO NO..LAO HO MO
+0F0C ; NFKD_QC; N # Po TIBETAN MARK DELIMITER TSHEG BSTAR
+0F43 ; NFKD_QC; N # Lo TIBETAN LETTER GHA
+0F4D ; NFKD_QC; N # Lo TIBETAN LETTER DDHA
+0F52 ; NFKD_QC; N # Lo TIBETAN LETTER DHA
+0F57 ; NFKD_QC; N # Lo TIBETAN LETTER BHA
+0F5C ; NFKD_QC; N # Lo TIBETAN LETTER DZHA
+0F69 ; NFKD_QC; N # Lo TIBETAN LETTER KSSA
+0F73 ; NFKD_QC; N # Mn TIBETAN VOWEL SIGN II
+0F75..0F79 ; NFKD_QC; N # Mn [5] TIBETAN VOWEL SIGN UU..TIBETAN VOWEL SIGN VOCALIC LL
+0F81 ; NFKD_QC; N # Mn TIBETAN VOWEL SIGN REVERSED II
+0F93 ; NFKD_QC; N # Mn TIBETAN SUBJOINED LETTER GHA
+0F9D ; NFKD_QC; N # Mn TIBETAN SUBJOINED LETTER DDHA
+0FA2 ; NFKD_QC; N # Mn TIBETAN SUBJOINED LETTER DHA
+0FA7 ; NFKD_QC; N # Mn TIBETAN SUBJOINED LETTER BHA
+0FAC ; NFKD_QC; N # Mn TIBETAN SUBJOINED LETTER DZHA
+0FB9 ; NFKD_QC; N # Mn TIBETAN SUBJOINED LETTER KSSA
+1026 ; NFKD_QC; N # Lo MYANMAR LETTER UU
+10FC ; NFKD_QC; N # Lm MODIFIER LETTER GEORGIAN NAR
+1B06 ; NFKD_QC; N # Lo BALINESE LETTER AKARA TEDUNG
+1B08 ; NFKD_QC; N # Lo BALINESE LETTER IKARA TEDUNG
+1B0A ; NFKD_QC; N # Lo BALINESE LETTER UKARA TEDUNG
+1B0C ; NFKD_QC; N # Lo BALINESE LETTER RA REPA TEDUNG
+1B0E ; NFKD_QC; N # Lo BALINESE LETTER LA LENGA TEDUNG
+1B12 ; NFKD_QC; N # Lo BALINESE LETTER OKARA TEDUNG
+1B3B ; NFKD_QC; N # Mc BALINESE VOWEL SIGN RA REPA TEDUNG
+1B3D ; NFKD_QC; N # Mc BALINESE VOWEL SIGN LA LENGA TEDUNG
+1B40..1B41 ; NFKD_QC; N # Mc [2] BALINESE VOWEL SIGN TALING TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG
+1B43 ; NFKD_QC; N # Mc BALINESE VOWEL SIGN PEPET TEDUNG
+1D2C..1D2E ; NFKD_QC; N # Lm [3] MODIFIER LETTER CAPITAL A..MODIFIER LETTER CAPITAL B
+1D30..1D3A ; NFKD_QC; N # Lm [11] MODIFIER LETTER CAPITAL D..MODIFIER LETTER CAPITAL N
+1D3C..1D4D ; NFKD_QC; N # Lm [18] MODIFIER LETTER CAPITAL O..MODIFIER LETTER SMALL G
+1D4F..1D61 ; NFKD_QC; N # Lm [19] MODIFIER LETTER SMALL K..MODIFIER LETTER SMALL CHI
+1D62..1D6A ; NFKD_QC; N # L& [9] LATIN SUBSCRIPT SMALL LETTER I..GREEK SUBSCRIPT SMALL LETTER CHI
+1D78 ; NFKD_QC; N # Lm MODIFIER LETTER CYRILLIC EN
+1D9B..1DBF ; NFKD_QC; N # Lm [37] MODIFIER LETTER SMALL TURNED ALPHA..MODIFIER LETTER SMALL THETA
+1E00..1E9B ; NFKD_QC; N # L& [156] LATIN CAPITAL LETTER A WITH RING BELOW..LATIN SMALL LETTER LONG S WITH DOT ABOVE
+1EA0..1EF9 ; NFKD_QC; N # L& [90] LATIN CAPITAL LETTER A WITH DOT BELOW..LATIN SMALL LETTER Y WITH TILDE
+1F00..1F15 ; NFKD_QC; N # L& [22] GREEK SMALL LETTER ALPHA WITH PSILI..GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA
+1F18..1F1D ; NFKD_QC; N # L& [6] GREEK CAPITAL LETTER EPSILON WITH PSILI..GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA
+1F20..1F45 ; NFKD_QC; N # L& [38] GREEK SMALL LETTER ETA WITH PSILI..GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA
+1F48..1F4D ; NFKD_QC; N # L& [6] GREEK CAPITAL LETTER OMICRON WITH PSILI..GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA
+1F50..1F57 ; NFKD_QC; N # L& [8] GREEK SMALL LETTER UPSILON WITH PSILI..GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI
+1F59 ; NFKD_QC; N # L& GREEK CAPITAL LETTER UPSILON WITH DASIA
+1F5B ; NFKD_QC; N # L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA
+1F5D ; NFKD_QC; N # L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA
+1F5F..1F7D ; NFKD_QC; N # L& [31] GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI..GREEK SMALL LETTER OMEGA WITH OXIA
+1F80..1FB4 ; NFKD_QC; N # L& [53] GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI..GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI
+1FB6..1FBC ; NFKD_QC; N # L& [7] GREEK SMALL LETTER ALPHA WITH PERISPOMENI..GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI
+1FBD ; NFKD_QC; N # Sk GREEK KORONIS
+1FBE ; NFKD_QC; N # L& GREEK PROSGEGRAMMENI
+1FBF..1FC1 ; NFKD_QC; N # Sk [3] GREEK PSILI..GREEK DIALYTIKA AND PERISPOMENI
+1FC2..1FC4 ; NFKD_QC; N # L& [3] GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI
+1FC6..1FCC ; NFKD_QC; N # L& [7] GREEK SMALL LETTER ETA WITH PERISPOMENI..GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI
+1FCD..1FCF ; NFKD_QC; N # Sk [3] GREEK PSILI AND VARIA..GREEK PSILI AND PERISPOMENI
+1FD0..1FD3 ; NFKD_QC; N # L& [4] GREEK SMALL LETTER IOTA WITH VRACHY..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
+1FD6..1FDB ; NFKD_QC; N # L& [6] GREEK SMALL LETTER IOTA WITH PERISPOMENI..GREEK CAPITAL LETTER IOTA WITH OXIA
+1FDD..1FDF ; NFKD_QC; N # Sk [3] GREEK DASIA AND VARIA..GREEK DASIA AND PERISPOMENI
+1FE0..1FEC ; NFKD_QC; N # L& [13] GREEK SMALL LETTER UPSILON WITH VRACHY..GREEK CAPITAL LETTER RHO WITH DASIA
+1FED..1FEF ; NFKD_QC; N # Sk [3] GREEK DIALYTIKA AND VARIA..GREEK VARIA
+1FF2..1FF4 ; NFKD_QC; N # L& [3] GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI
+1FF6..1FFC ; NFKD_QC; N # L& [7] GREEK SMALL LETTER OMEGA WITH PERISPOMENI..GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI
+1FFD..1FFE ; NFKD_QC; N # Sk [2] GREEK OXIA..GREEK DASIA
+2000..200A ; NFKD_QC; N # Zs [11] EN QUAD..HAIR SPACE
+2011 ; NFKD_QC; N # Pd NON-BREAKING HYPHEN
+2017 ; NFKD_QC; N # Po DOUBLE LOW LINE
+2024..2026 ; NFKD_QC; N # Po [3] ONE DOT LEADER..HORIZONTAL ELLIPSIS
+202F ; NFKD_QC; N # Zs NARROW NO-BREAK SPACE
+2033..2034 ; NFKD_QC; N # Po [2] DOUBLE PRIME..TRIPLE PRIME
+2036..2037 ; NFKD_QC; N # Po [2] REVERSED DOUBLE PRIME..REVERSED TRIPLE PRIME
+203C ; NFKD_QC; N # Po DOUBLE EXCLAMATION MARK
+203E ; NFKD_QC; N # Po OVERLINE
+2047..2049 ; NFKD_QC; N # Po [3] DOUBLE QUESTION MARK..EXCLAMATION QUESTION MARK
+2057 ; NFKD_QC; N # Po QUADRUPLE PRIME
+205F ; NFKD_QC; N # Zs MEDIUM MATHEMATICAL SPACE
+2070 ; NFKD_QC; N # No SUPERSCRIPT ZERO
+2071 ; NFKD_QC; N # L& SUPERSCRIPT LATIN SMALL LETTER I
+2074..2079 ; NFKD_QC; N # No [6] SUPERSCRIPT FOUR..SUPERSCRIPT NINE
+207A..207C ; NFKD_QC; N # Sm [3] SUPERSCRIPT PLUS SIGN..SUPERSCRIPT EQUALS SIGN
+207D ; NFKD_QC; N # Ps SUPERSCRIPT LEFT PARENTHESIS
+207E ; NFKD_QC; N # Pe SUPERSCRIPT RIGHT PARENTHESIS
+207F ; NFKD_QC; N # L& SUPERSCRIPT LATIN SMALL LETTER N
+2080..2089 ; NFKD_QC; N # No [10] SUBSCRIPT ZERO..SUBSCRIPT NINE
+208A..208C ; NFKD_QC; N # Sm [3] SUBSCRIPT PLUS SIGN..SUBSCRIPT EQUALS SIGN
+208D ; NFKD_QC; N # Ps SUBSCRIPT LEFT PARENTHESIS
+208E ; NFKD_QC; N # Pe SUBSCRIPT RIGHT PARENTHESIS
+2090..2094 ; NFKD_QC; N # Lm [5] LATIN SUBSCRIPT SMALL LETTER A..LATIN SUBSCRIPT SMALL LETTER SCHWA
+20A8 ; NFKD_QC; N # Sc RUPEE SIGN
+2100..2101 ; NFKD_QC; N # So [2] ACCOUNT OF..ADDRESSED TO THE SUBJECT
+2102 ; NFKD_QC; N # L& DOUBLE-STRUCK CAPITAL C
+2103 ; NFKD_QC; N # So DEGREE CELSIUS
+2105..2106 ; NFKD_QC; N # So [2] CARE OF..CADA UNA
+2107 ; NFKD_QC; N # L& EULER CONSTANT
+2109 ; NFKD_QC; N # So DEGREE FAHRENHEIT
+210A..2113 ; NFKD_QC; N # L& [10] SCRIPT SMALL G..SCRIPT SMALL L
+2115 ; NFKD_QC; N # L& DOUBLE-STRUCK CAPITAL N
+2116 ; NFKD_QC; N # So NUMERO SIGN
+2119..211D ; NFKD_QC; N # L& [5] DOUBLE-STRUCK CAPITAL P..DOUBLE-STRUCK CAPITAL R
+2120..2122 ; NFKD_QC; N # So [3] SERVICE MARK..TRADE MARK SIGN
+2124 ; NFKD_QC; N # L& DOUBLE-STRUCK CAPITAL Z
+2126 ; NFKD_QC; N # L& OHM SIGN
+2128 ; NFKD_QC; N # L& BLACK-LETTER CAPITAL Z
+212A..212D ; NFKD_QC; N # L& [4] KELVIN SIGN..BLACK-LETTER CAPITAL C
+212F..2131 ; NFKD_QC; N # L& [3] SCRIPT SMALL E..SCRIPT CAPITAL F
+2133..2134 ; NFKD_QC; N # L& [2] SCRIPT CAPITAL M..SCRIPT SMALL O
+2135..2138 ; NFKD_QC; N # Lo [4] ALEF SYMBOL..DALET SYMBOL
+2139 ; NFKD_QC; N # L& INFORMATION SOURCE
+213B ; NFKD_QC; N # So FACSIMILE SIGN
+213C..213F ; NFKD_QC; N # L& [4] DOUBLE-STRUCK SMALL PI..DOUBLE-STRUCK CAPITAL PI
+2140 ; NFKD_QC; N # Sm DOUBLE-STRUCK N-ARY SUMMATION
+2145..2149 ; NFKD_QC; N # L& [5] DOUBLE-STRUCK ITALIC CAPITAL D..DOUBLE-STRUCK ITALIC SMALL J
+2153..215F ; NFKD_QC; N # No [13] VULGAR FRACTION ONE THIRD..FRACTION NUMERATOR ONE
+2160..217F ; NFKD_QC; N # Nl [32] ROMAN NUMERAL ONE..SMALL ROMAN NUMERAL ONE THOUSAND
+219A..219B ; NFKD_QC; N # Sm [2] LEFTWARDS ARROW WITH STROKE..RIGHTWARDS ARROW WITH STROKE
+21AE ; NFKD_QC; N # Sm LEFT RIGHT ARROW WITH STROKE
+21CD ; NFKD_QC; N # So LEFTWARDS DOUBLE ARROW WITH STROKE
+21CE..21CF ; NFKD_QC; N # Sm [2] LEFT RIGHT DOUBLE ARROW WITH STROKE..RIGHTWARDS DOUBLE ARROW WITH STROKE
+2204 ; NFKD_QC; N # Sm THERE DOES NOT EXIST
+2209 ; NFKD_QC; N # Sm NOT AN ELEMENT OF
+220C ; NFKD_QC; N # Sm DOES NOT CONTAIN AS MEMBER
+2224 ; NFKD_QC; N # Sm DOES NOT DIVIDE
+2226 ; NFKD_QC; N # Sm NOT PARALLEL TO
+222C..222D ; NFKD_QC; N # Sm [2] DOUBLE INTEGRAL..TRIPLE INTEGRAL
+222F..2230 ; NFKD_QC; N # Sm [2] SURFACE INTEGRAL..VOLUME INTEGRAL
+2241 ; NFKD_QC; N # Sm NOT TILDE
+2244 ; NFKD_QC; N # Sm NOT ASYMPTOTICALLY EQUAL TO
+2247 ; NFKD_QC; N # Sm NEITHER APPROXIMATELY NOR ACTUALLY EQUAL TO
+2249 ; NFKD_QC; N # Sm NOT ALMOST EQUAL TO
+2260 ; NFKD_QC; N # Sm NOT EQUAL TO
+2262 ; NFKD_QC; N # Sm NOT IDENTICAL TO
+226D..2271 ; NFKD_QC; N # Sm [5] NOT EQUIVALENT TO..NEITHER GREATER-THAN NOR EQUAL TO
+2274..2275 ; NFKD_QC; N # Sm [2] NEITHER LESS-THAN NOR EQUIVALENT TO..NEITHER GREATER-THAN NOR EQUIVALENT TO
+2278..2279 ; NFKD_QC; N # Sm [2] NEITHER LESS-THAN NOR GREATER-THAN..NEITHER GREATER-THAN NOR LESS-THAN
+2280..2281 ; NFKD_QC; N # Sm [2] DOES NOT PRECEDE..DOES NOT SUCCEED
+2284..2285 ; NFKD_QC; N # Sm [2] NOT A SUBSET OF..NOT A SUPERSET OF
+2288..2289 ; NFKD_QC; N # Sm [2] NEITHER A SUBSET OF NOR EQUAL TO..NEITHER A SUPERSET OF NOR EQUAL TO
+22AC..22AF ; NFKD_QC; N # Sm [4] DOES NOT PROVE..NEGATED DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE
+22E0..22E3 ; NFKD_QC; N # Sm [4] DOES NOT PRECEDE OR EQUAL..NOT SQUARE ORIGINAL OF OR EQUAL TO
+22EA..22ED ; NFKD_QC; N # Sm [4] NOT NORMAL SUBGROUP OF..DOES NOT CONTAIN AS NORMAL SUBGROUP OR EQUAL
+2329 ; NFKD_QC; N # Ps LEFT-POINTING ANGLE BRACKET
+232A ; NFKD_QC; N # Pe RIGHT-POINTING ANGLE BRACKET
+2460..249B ; NFKD_QC; N # No [60] CIRCLED DIGIT ONE..NUMBER TWENTY FULL STOP
+249C..24E9 ; NFKD_QC; N # So [78] PARENTHESIZED LATIN SMALL LETTER A..CIRCLED LATIN SMALL LETTER Z
+24EA ; NFKD_QC; N # No CIRCLED DIGIT ZERO
+2A0C ; NFKD_QC; N # Sm QUADRUPLE INTEGRAL OPERATOR
+2A74..2A76 ; NFKD_QC; N # Sm [3] DOUBLE COLON EQUAL..THREE CONSECUTIVE EQUALS SIGNS
+2ADC ; NFKD_QC; N # Sm FORKING
+2D6F ; NFKD_QC; N # Lm TIFINAGH MODIFIER LETTER LABIALIZATION MARK
+2E9F ; NFKD_QC; N # So CJK RADICAL MOTHER
+2EF3 ; NFKD_QC; N # So CJK RADICAL C-SIMPLIFIED TURTLE
+2F00..2FD5 ; NFKD_QC; N # So [214] KANGXI RADICAL ONE..KANGXI RADICAL FLUTE
+3000 ; NFKD_QC; N # Zs IDEOGRAPHIC SPACE
+3036 ; NFKD_QC; N # So CIRCLED POSTAL MARK
+3038..303A ; NFKD_QC; N # Nl [3] HANGZHOU NUMERAL TEN..HANGZHOU NUMERAL THIRTY
+304C ; NFKD_QC; N # Lo HIRAGANA LETTER GA
+304E ; NFKD_QC; N # Lo HIRAGANA LETTER GI
+3050 ; NFKD_QC; N # Lo HIRAGANA LETTER GU
+3052 ; NFKD_QC; N # Lo HIRAGANA LETTER GE
+3054 ; NFKD_QC; N # Lo HIRAGANA LETTER GO
+3056 ; NFKD_QC; N # Lo HIRAGANA LETTER ZA
+3058 ; NFKD_QC; N # Lo HIRAGANA LETTER ZI
+305A ; NFKD_QC; N # Lo HIRAGANA LETTER ZU
+305C ; NFKD_QC; N # Lo HIRAGANA LETTER ZE
+305E ; NFKD_QC; N # Lo HIRAGANA LETTER ZO
+3060 ; NFKD_QC; N # Lo HIRAGANA LETTER DA
+3062 ; NFKD_QC; N # Lo HIRAGANA LETTER DI
+3065 ; NFKD_QC; N # Lo HIRAGANA LETTER DU
+3067 ; NFKD_QC; N # Lo HIRAGANA LETTER DE
+3069 ; NFKD_QC; N # Lo HIRAGANA LETTER DO
+3070..3071 ; NFKD_QC; N # Lo [2] HIRAGANA LETTER BA..HIRAGANA LETTER PA
+3073..3074 ; NFKD_QC; N # Lo [2] HIRAGANA LETTER BI..HIRAGANA LETTER PI
+3076..3077 ; NFKD_QC; N # Lo [2] HIRAGANA LETTER BU..HIRAGANA LETTER PU
+3079..307A ; NFKD_QC; N # Lo [2] HIRAGANA LETTER BE..HIRAGANA LETTER PE
+307C..307D ; NFKD_QC; N # Lo [2] HIRAGANA LETTER BO..HIRAGANA LETTER PO
+3094 ; NFKD_QC; N # Lo HIRAGANA LETTER VU
+309B..309C ; NFKD_QC; N # Sk [2] KATAKANA-HIRAGANA VOICED SOUND MARK..KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+309E ; NFKD_QC; N # Lm HIRAGANA VOICED ITERATION MARK
+309F ; NFKD_QC; N # Lo HIRAGANA DIGRAPH YORI
+30AC ; NFKD_QC; N # Lo KATAKANA LETTER GA
+30AE ; NFKD_QC; N # Lo KATAKANA LETTER GI
+30B0 ; NFKD_QC; N # Lo KATAKANA LETTER GU
+30B2 ; NFKD_QC; N # Lo KATAKANA LETTER GE
+30B4 ; NFKD_QC; N # Lo KATAKANA LETTER GO
+30B6 ; NFKD_QC; N # Lo KATAKANA LETTER ZA
+30B8 ; NFKD_QC; N # Lo KATAKANA LETTER ZI
+30BA ; NFKD_QC; N # Lo KATAKANA LETTER ZU
+30BC ; NFKD_QC; N # Lo KATAKANA LETTER ZE
+30BE ; NFKD_QC; N # Lo KATAKANA LETTER ZO
+30C0 ; NFKD_QC; N # Lo KATAKANA LETTER DA
+30C2 ; NFKD_QC; N # Lo KATAKANA LETTER DI
+30C5 ; NFKD_QC; N # Lo KATAKANA LETTER DU
+30C7 ; NFKD_QC; N # Lo KATAKANA LETTER DE
+30C9 ; NFKD_QC; N # Lo KATAKANA LETTER DO
+30D0..30D1 ; NFKD_QC; N # Lo [2] KATAKANA LETTER BA..KATAKANA LETTER PA
+30D3..30D4 ; NFKD_QC; N # Lo [2] KATAKANA LETTER BI..KATAKANA LETTER PI
+30D6..30D7 ; NFKD_QC; N # Lo [2] KATAKANA LETTER BU..KATAKANA LETTER PU
+30D9..30DA ; NFKD_QC; N # Lo [2] KATAKANA LETTER BE..KATAKANA LETTER PE
+30DC..30DD ; NFKD_QC; N # Lo [2] KATAKANA LETTER BO..KATAKANA LETTER PO
+30F4 ; NFKD_QC; N # Lo KATAKANA LETTER VU
+30F7..30FA ; NFKD_QC; N # Lo [4] KATAKANA LETTER VA..KATAKANA LETTER VO
+30FE ; NFKD_QC; N # Lm KATAKANA VOICED ITERATION MARK
+30FF ; NFKD_QC; N # Lo KATAKANA DIGRAPH KOTO
+3131..318E ; NFKD_QC; N # Lo [94] HANGUL LETTER KIYEOK..HANGUL LETTER ARAEAE
+3192..3195 ; NFKD_QC; N # No [4] IDEOGRAPHIC ANNOTATION ONE MARK..IDEOGRAPHIC ANNOTATION FOUR MARK
+3196..319F ; NFKD_QC; N # So [10] IDEOGRAPHIC ANNOTATION TOP MARK..IDEOGRAPHIC ANNOTATION MAN MARK
+3200..321E ; NFKD_QC; N # So [31] PARENTHESIZED HANGUL KIYEOK..PARENTHESIZED KOREAN CHARACTER O HU
+3220..3229 ; NFKD_QC; N # No [10] PARENTHESIZED IDEOGRAPH ONE..PARENTHESIZED IDEOGRAPH TEN
+322A..3243 ; NFKD_QC; N # So [26] PARENTHESIZED IDEOGRAPH MOON..PARENTHESIZED IDEOGRAPH REACH
+3250 ; NFKD_QC; N # So PARTNERSHIP SIGN
+3251..325F ; NFKD_QC; N # No [15] CIRCLED NUMBER TWENTY ONE..CIRCLED NUMBER THIRTY FIVE
+3260..327E ; NFKD_QC; N # So [31] CIRCLED HANGUL KIYEOK..CIRCLED HANGUL IEUNG U
+3280..3289 ; NFKD_QC; N # No [10] CIRCLED IDEOGRAPH ONE..CIRCLED IDEOGRAPH TEN
+328A..32B0 ; NFKD_QC; N # So [39] CIRCLED IDEOGRAPH MOON..CIRCLED IDEOGRAPH NIGHT
+32B1..32BF ; NFKD_QC; N # No [15] CIRCLED NUMBER THIRTY SIX..CIRCLED NUMBER FIFTY
+32C0..32FE ; NFKD_QC; N # So [63] IDEOGRAPHIC TELEGRAPH SYMBOL FOR JANUARY..CIRCLED KATAKANA WO
+3300..33FF ; NFKD_QC; N # So [256] SQUARE APAATO..SQUARE GAL
+AC00..D7A3 ; NFKD_QC; N # Lo [11172] HANGUL SYLLABLE GA..HANGUL SYLLABLE HIH
+F900..FA0D ; NFKD_QC; N # Lo [270] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA0D
+FA10 ; NFKD_QC; N # Lo CJK COMPATIBILITY IDEOGRAPH-FA10
+FA12 ; NFKD_QC; N # Lo CJK COMPATIBILITY IDEOGRAPH-FA12
+FA15..FA1E ; NFKD_QC; N # Lo [10] CJK COMPATIBILITY IDEOGRAPH-FA15..CJK COMPATIBILITY IDEOGRAPH-FA1E
+FA20 ; NFKD_QC; N # Lo CJK COMPATIBILITY IDEOGRAPH-FA20
+FA22 ; NFKD_QC; N # Lo CJK COMPATIBILITY IDEOGRAPH-FA22
+FA25..FA26 ; NFKD_QC; N # Lo [2] CJK COMPATIBILITY IDEOGRAPH-FA25..CJK COMPATIBILITY IDEOGRAPH-FA26
+FA2A..FA2D ; NFKD_QC; N # Lo [4] CJK COMPATIBILITY IDEOGRAPH-FA2A..CJK COMPATIBILITY IDEOGRAPH-FA2D
+FA30..FA6A ; NFKD_QC; N # Lo [59] CJK COMPATIBILITY IDEOGRAPH-FA30..CJK COMPATIBILITY IDEOGRAPH-FA6A
+FA70..FAD9 ; NFKD_QC; N # Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9
+FB00..FB06 ; NFKD_QC; N # L& [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST
+FB13..FB17 ; NFKD_QC; N # L& [5] ARMENIAN SMALL LIGATURE MEN NOW..ARMENIAN SMALL LIGATURE MEN XEH
+FB1D ; NFKD_QC; N # Lo HEBREW LETTER YOD WITH HIRIQ
+FB1F..FB28 ; NFKD_QC; N # Lo [10] HEBREW LIGATURE YIDDISH YOD YOD PATAH..HEBREW LETTER WIDE TAV
+FB29 ; NFKD_QC; N # Sm HEBREW LETTER ALTERNATIVE PLUS SIGN
+FB2A..FB36 ; NFKD_QC; N # Lo [13] HEBREW LETTER SHIN WITH SHIN DOT..HEBREW LETTER ZAYIN WITH DAGESH
+FB38..FB3C ; NFKD_QC; N # Lo [5] HEBREW LETTER TET WITH DAGESH..HEBREW LETTER LAMED WITH DAGESH
+FB3E ; NFKD_QC; N # Lo HEBREW LETTER MEM WITH DAGESH
+FB40..FB41 ; NFKD_QC; N # Lo [2] HEBREW LETTER NUN WITH DAGESH..HEBREW LETTER SAMEKH WITH DAGESH
+FB43..FB44 ; NFKD_QC; N # Lo [2] HEBREW LETTER FINAL PE WITH DAGESH..HEBREW LETTER PE WITH DAGESH
+FB46..FBB1 ; NFKD_QC; N # Lo [108] HEBREW LETTER TSADI WITH DAGESH..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM
+FBD3..FD3D ; NFKD_QC; N # Lo [363] ARABIC LETTER NG ISOLATED FORM..ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM
+FD50..FD8F ; NFKD_QC; N # Lo [64] ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM..ARABIC LIGATURE MEEM WITH KHAH WITH MEEM INITIAL FORM
+FD92..FDC7 ; NFKD_QC; N # Lo [54] ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INITIAL FORM..ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM
+FDF0..FDFB ; NFKD_QC; N # Lo [12] ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM..ARABIC LIGATURE JALLAJALALOUHOU
+FDFC ; NFKD_QC; N # Sc RIAL SIGN
+FE10..FE16 ; NFKD_QC; N # Po [7] PRESENTATION FORM FOR VERTICAL COMMA..PRESENTATION FORM FOR VERTICAL QUESTION MARK
+FE17 ; NFKD_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT WHITE LENTICULAR BRACKET
+FE18 ; NFKD_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET
+FE19 ; NFKD_QC; N # Po PRESENTATION FORM FOR VERTICAL HORIZONTAL ELLIPSIS
+FE30 ; NFKD_QC; N # Po PRESENTATION FORM FOR VERTICAL TWO DOT LEADER
+FE31..FE32 ; NFKD_QC; N # Pd [2] PRESENTATION FORM FOR VERTICAL EM DASH..PRESENTATION FORM FOR VERTICAL EN DASH
+FE33..FE34 ; NFKD_QC; N # Pc [2] PRESENTATION FORM FOR VERTICAL LOW LINE..PRESENTATION FORM FOR VERTICAL WAVY LOW LINE
+FE35 ; NFKD_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS
+FE36 ; NFKD_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS
+FE37 ; NFKD_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT CURLY BRACKET
+FE38 ; NFKD_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET
+FE39 ; NFKD_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT TORTOISE SHELL BRACKET
+FE3A ; NFKD_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT TORTOISE SHELL BRACKET
+FE3B ; NFKD_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT BLACK LENTICULAR BRACKET
+FE3C ; NFKD_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT BLACK LENTICULAR BRACKET
+FE3D ; NFKD_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT DOUBLE ANGLE BRACKET
+FE3E ; NFKD_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT DOUBLE ANGLE BRACKET
+FE3F ; NFKD_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET
+FE40 ; NFKD_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT ANGLE BRACKET
+FE41 ; NFKD_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT CORNER BRACKET
+FE42 ; NFKD_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT CORNER BRACKET
+FE43 ; NFKD_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT WHITE CORNER BRACKET
+FE44 ; NFKD_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET
+FE47 ; NFKD_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT SQUARE BRACKET
+FE48 ; NFKD_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT SQUARE BRACKET
+FE49..FE4C ; NFKD_QC; N # Po [4] DASHED OVERLINE..DOUBLE WAVY OVERLINE
+FE4D..FE4F ; NFKD_QC; N # Pc [3] DASHED LOW LINE..WAVY LOW LINE
+FE50..FE52 ; NFKD_QC; N # Po [3] SMALL COMMA..SMALL FULL STOP
+FE54..FE57 ; NFKD_QC; N # Po [4] SMALL SEMICOLON..SMALL EXCLAMATION MARK
+FE58 ; NFKD_QC; N # Pd SMALL EM DASH
+FE59 ; NFKD_QC; N # Ps SMALL LEFT PARENTHESIS
+FE5A ; NFKD_QC; N # Pe SMALL RIGHT PARENTHESIS
+FE5B ; NFKD_QC; N # Ps SMALL LEFT CURLY BRACKET
+FE5C ; NFKD_QC; N # Pe SMALL RIGHT CURLY BRACKET
+FE5D ; NFKD_QC; N # Ps SMALL LEFT TORTOISE SHELL BRACKET
+FE5E ; NFKD_QC; N # Pe SMALL RIGHT TORTOISE SHELL BRACKET
+FE5F..FE61 ; NFKD_QC; N # Po [3] SMALL NUMBER SIGN..SMALL ASTERISK
+FE62 ; NFKD_QC; N # Sm SMALL PLUS SIGN
+FE63 ; NFKD_QC; N # Pd SMALL HYPHEN-MINUS
+FE64..FE66 ; NFKD_QC; N # Sm [3] SMALL LESS-THAN SIGN..SMALL EQUALS SIGN
+FE68 ; NFKD_QC; N # Po SMALL REVERSE SOLIDUS
+FE69 ; NFKD_QC; N # Sc SMALL DOLLAR SIGN
+FE6A..FE6B ; NFKD_QC; N # Po [2] SMALL PERCENT SIGN..SMALL COMMERCIAL AT
+FE70..FE72 ; NFKD_QC; N # Lo [3] ARABIC FATHATAN ISOLATED FORM..ARABIC DAMMATAN ISOLATED FORM
+FE74 ; NFKD_QC; N # Lo ARABIC KASRATAN ISOLATED FORM
+FE76..FEFC ; NFKD_QC; N # Lo [135] ARABIC FATHA ISOLATED FORM..ARABIC LIGATURE LAM WITH ALEF FINAL FORM
+FF01..FF03 ; NFKD_QC; N # Po [3] FULLWIDTH EXCLAMATION MARK..FULLWIDTH NUMBER SIGN
+FF04 ; NFKD_QC; N # Sc FULLWIDTH DOLLAR SIGN
+FF05..FF07 ; NFKD_QC; N # Po [3] FULLWIDTH PERCENT SIGN..FULLWIDTH APOSTROPHE
+FF08 ; NFKD_QC; N # Ps FULLWIDTH LEFT PARENTHESIS
+FF09 ; NFKD_QC; N # Pe FULLWIDTH RIGHT PARENTHESIS
+FF0A ; NFKD_QC; N # Po FULLWIDTH ASTERISK
+FF0B ; NFKD_QC; N # Sm FULLWIDTH PLUS SIGN
+FF0C ; NFKD_QC; N # Po FULLWIDTH COMMA
+FF0D ; NFKD_QC; N # Pd FULLWIDTH HYPHEN-MINUS
+FF0E..FF0F ; NFKD_QC; N # Po [2] FULLWIDTH FULL STOP..FULLWIDTH SOLIDUS
+FF10..FF19 ; NFKD_QC; N # Nd [10] FULLWIDTH DIGIT ZERO..FULLWIDTH DIGIT NINE
+FF1A..FF1B ; NFKD_QC; N # Po [2] FULLWIDTH COLON..FULLWIDTH SEMICOLON
+FF1C..FF1E ; NFKD_QC; N # Sm [3] FULLWIDTH LESS-THAN SIGN..FULLWIDTH GREATER-THAN SIGN
+FF1F..FF20 ; NFKD_QC; N # Po [2] FULLWIDTH QUESTION MARK..FULLWIDTH COMMERCIAL AT
+FF21..FF3A ; NFKD_QC; N # L& [26] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER Z
+FF3B ; NFKD_QC; N # Ps FULLWIDTH LEFT SQUARE BRACKET
+FF3C ; NFKD_QC; N # Po FULLWIDTH REVERSE SOLIDUS
+FF3D ; NFKD_QC; N # Pe FULLWIDTH RIGHT SQUARE BRACKET
+FF3E ; NFKD_QC; N # Sk FULLWIDTH CIRCUMFLEX ACCENT
+FF3F ; NFKD_QC; N # Pc FULLWIDTH LOW LINE
+FF40 ; NFKD_QC; N # Sk FULLWIDTH GRAVE ACCENT
+FF41..FF5A ; NFKD_QC; N # L& [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN SMALL LETTER Z
+FF5B ; NFKD_QC; N # Ps FULLWIDTH LEFT CURLY BRACKET
+FF5C ; NFKD_QC; N # Sm FULLWIDTH VERTICAL LINE
+FF5D ; NFKD_QC; N # Pe FULLWIDTH RIGHT CURLY BRACKET
+FF5E ; NFKD_QC; N # Sm FULLWIDTH TILDE
+FF5F ; NFKD_QC; N # Ps FULLWIDTH LEFT WHITE PARENTHESIS
+FF60 ; NFKD_QC; N # Pe FULLWIDTH RIGHT WHITE PARENTHESIS
+FF61 ; NFKD_QC; N # Po HALFWIDTH IDEOGRAPHIC FULL STOP
+FF62 ; NFKD_QC; N # Ps HALFWIDTH LEFT CORNER BRACKET
+FF63 ; NFKD_QC; N # Pe HALFWIDTH RIGHT CORNER BRACKET
+FF64..FF65 ; NFKD_QC; N # Po [2] HALFWIDTH IDEOGRAPHIC COMMA..HALFWIDTH KATAKANA MIDDLE DOT
+FF66..FF6F ; NFKD_QC; N # Lo [10] HALFWIDTH KATAKANA LETTER WO..HALFWIDTH KATAKANA LETTER SMALL TU
+FF70 ; NFKD_QC; N # Lm HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK
+FF71..FF9D ; NFKD_QC; N # Lo [45] HALFWIDTH KATAKANA LETTER A..HALFWIDTH KATAKANA LETTER N
+FF9E..FF9F ; NFKD_QC; N # Lm [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
+FFA0..FFBE ; NFKD_QC; N # Lo [31] HALFWIDTH HANGUL FILLER..HALFWIDTH HANGUL LETTER HIEUH
+FFC2..FFC7 ; NFKD_QC; N # Lo [6] HALFWIDTH HANGUL LETTER A..HALFWIDTH HANGUL LETTER E
+FFCA..FFCF ; NFKD_QC; N # Lo [6] HALFWIDTH HANGUL LETTER YEO..HALFWIDTH HANGUL LETTER OE
+FFD2..FFD7 ; NFKD_QC; N # Lo [6] HALFWIDTH HANGUL LETTER YO..HALFWIDTH HANGUL LETTER YU
+FFDA..FFDC ; NFKD_QC; N # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL LETTER I
+FFE0..FFE1 ; NFKD_QC; N # Sc [2] FULLWIDTH CENT SIGN..FULLWIDTH POUND SIGN
+FFE2 ; NFKD_QC; N # Sm FULLWIDTH NOT SIGN
+FFE3 ; NFKD_QC; N # Sk FULLWIDTH MACRON
+FFE4 ; NFKD_QC; N # So FULLWIDTH BROKEN BAR
+FFE5..FFE6 ; NFKD_QC; N # Sc [2] FULLWIDTH YEN SIGN..FULLWIDTH WON SIGN
+FFE8 ; NFKD_QC; N # So HALFWIDTH FORMS LIGHT VERTICAL
+FFE9..FFEC ; NFKD_QC; N # Sm [4] HALFWIDTH LEFTWARDS ARROW..HALFWIDTH DOWNWARDS ARROW
+FFED..FFEE ; NFKD_QC; N # So [2] HALFWIDTH BLACK SQUARE..HALFWIDTH WHITE CIRCLE
+1D15E..1D164 ; NFKD_QC; N # So [7] MUSICAL SYMBOL HALF NOTE..MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE
+1D1BB..1D1C0 ; NFKD_QC; N # So [6] MUSICAL SYMBOL MINIMA..MUSICAL SYMBOL FUSA BLACK
+1D400..1D454 ; NFKD_QC; N # L& [85] MATHEMATICAL BOLD CAPITAL A..MATHEMATICAL ITALIC SMALL G
+1D456..1D49C ; NFKD_QC; N # L& [71] MATHEMATICAL ITALIC SMALL I..MATHEMATICAL SCRIPT CAPITAL A
+1D49E..1D49F ; NFKD_QC; N # L& [2] MATHEMATICAL SCRIPT CAPITAL C..MATHEMATICAL SCRIPT CAPITAL D
+1D4A2 ; NFKD_QC; N # L& MATHEMATICAL SCRIPT CAPITAL G
+1D4A5..1D4A6 ; NFKD_QC; N # L& [2] MATHEMATICAL SCRIPT CAPITAL J..MATHEMATICAL SCRIPT CAPITAL K
+1D4A9..1D4AC ; NFKD_QC; N # L& [4] MATHEMATICAL SCRIPT CAPITAL N..MATHEMATICAL SCRIPT CAPITAL Q
+1D4AE..1D4B9 ; NFKD_QC; N # L& [12] MATHEMATICAL SCRIPT CAPITAL S..MATHEMATICAL SCRIPT SMALL D
+1D4BB ; NFKD_QC; N # L& MATHEMATICAL SCRIPT SMALL F
+1D4BD..1D4C3 ; NFKD_QC; N # L& [7] MATHEMATICAL SCRIPT SMALL H..MATHEMATICAL SCRIPT SMALL N
+1D4C5..1D505 ; NFKD_QC; N # L& [65] MATHEMATICAL SCRIPT SMALL P..MATHEMATICAL FRAKTUR CAPITAL B
+1D507..1D50A ; NFKD_QC; N # L& [4] MATHEMATICAL FRAKTUR CAPITAL D..MATHEMATICAL FRAKTUR CAPITAL G
+1D50D..1D514 ; NFKD_QC; N # L& [8] MATHEMATICAL FRAKTUR CAPITAL J..MATHEMATICAL FRAKTUR CAPITAL Q
+1D516..1D51C ; NFKD_QC; N # L& [7] MATHEMATICAL FRAKTUR CAPITAL S..MATHEMATICAL FRAKTUR CAPITAL Y
+1D51E..1D539 ; NFKD_QC; N # L& [28] MATHEMATICAL FRAKTUR SMALL A..MATHEMATICAL DOUBLE-STRUCK CAPITAL B
+1D53B..1D53E ; NFKD_QC; N # L& [4] MATHEMATICAL DOUBLE-STRUCK CAPITAL D..MATHEMATICAL DOUBLE-STRUCK CAPITAL G
+1D540..1D544 ; NFKD_QC; N # L& [5] MATHEMATICAL DOUBLE-STRUCK CAPITAL I..MATHEMATICAL DOUBLE-STRUCK CAPITAL M
+1D546 ; NFKD_QC; N # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL O
+1D54A..1D550 ; NFKD_QC; N # L& [7] MATHEMATICAL DOUBLE-STRUCK CAPITAL S..MATHEMATICAL DOUBLE-STRUCK CAPITAL Y
+1D552..1D6A5 ; NFKD_QC; N # L& [340] MATHEMATICAL DOUBLE-STRUCK SMALL A..MATHEMATICAL ITALIC SMALL DOTLESS J
+1D6A8..1D6C0 ; NFKD_QC; N # L& [25] MATHEMATICAL BOLD CAPITAL ALPHA..MATHEMATICAL BOLD CAPITAL OMEGA
+1D6C1 ; NFKD_QC; N # Sm MATHEMATICAL BOLD NABLA
+1D6C2..1D6DA ; NFKD_QC; N # L& [25] MATHEMATICAL BOLD SMALL ALPHA..MATHEMATICAL BOLD SMALL OMEGA
+1D6DB ; NFKD_QC; N # Sm MATHEMATICAL BOLD PARTIAL DIFFERENTIAL
+1D6DC..1D6FA ; NFKD_QC; N # L& [31] MATHEMATICAL BOLD EPSILON SYMBOL..MATHEMATICAL ITALIC CAPITAL OMEGA
+1D6FB ; NFKD_QC; N # Sm MATHEMATICAL ITALIC NABLA
+1D6FC..1D714 ; NFKD_QC; N # L& [25] MATHEMATICAL ITALIC SMALL ALPHA..MATHEMATICAL ITALIC SMALL OMEGA
+1D715 ; NFKD_QC; N # Sm MATHEMATICAL ITALIC PARTIAL DIFFERENTIAL
+1D716..1D734 ; NFKD_QC; N # L& [31] MATHEMATICAL ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD ITALIC CAPITAL OMEGA
+1D735 ; NFKD_QC; N # Sm MATHEMATICAL BOLD ITALIC NABLA
+1D736..1D74E ; NFKD_QC; N # L& [25] MATHEMATICAL BOLD ITALIC SMALL ALPHA..MATHEMATICAL BOLD ITALIC SMALL OMEGA
+1D74F ; NFKD_QC; N # Sm MATHEMATICAL BOLD ITALIC PARTIAL DIFFERENTIAL
+1D750..1D76E ; NFKD_QC; N # L& [31] MATHEMATICAL BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD CAPITAL OMEGA
+1D76F ; NFKD_QC; N # Sm MATHEMATICAL SANS-SERIF BOLD NABLA
+1D770..1D788 ; NFKD_QC; N # L& [25] MATHEMATICAL SANS-SERIF BOLD SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD SMALL OMEGA
+1D789 ; NFKD_QC; N # Sm MATHEMATICAL SANS-SERIF BOLD PARTIAL DIFFERENTIAL
+1D78A..1D7A8 ; NFKD_QC; N # L& [31] MATHEMATICAL SANS-SERIF BOLD EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMEGA
+1D7A9 ; NFKD_QC; N # Sm MATHEMATICAL SANS-SERIF BOLD ITALIC NABLA
+1D7AA..1D7C2 ; NFKD_QC; N # L& [25] MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMEGA
+1D7C3 ; NFKD_QC; N # Sm MATHEMATICAL SANS-SERIF BOLD ITALIC PARTIAL DIFFERENTIAL
+1D7C4..1D7CB ; NFKD_QC; N # L& [8] MATHEMATICAL SANS-SERIF BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD SMALL DIGAMMA
+1D7CE..1D7FF ; NFKD_QC; N # Nd [50] MATHEMATICAL BOLD DIGIT ZERO..MATHEMATICAL MONOSPACE DIGIT NINE
+2F800..2FA1D ; NFKD_QC; N # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D
+
+# Total code points: 16574
+
+# ================================================
+
+# Property: NFKC_Quick_Check
+
+# All code points not explicitly listed for NFKC_Quick_Check
+# have the value Yes (Y).
+
+# @missing: 0000..10FFFF; NFKC_QC; Yes
+
+# ================================================
+
+# NFKC_Quick_Check=No
+
+00A0 ; NFKC_QC; N # Zs NO-BREAK SPACE
+00A8 ; NFKC_QC; N # Sk DIAERESIS
+00AA ; NFKC_QC; N # L& FEMININE ORDINAL INDICATOR
+00AF ; NFKC_QC; N # Sk MACRON
+00B2..00B3 ; NFKC_QC; N # No [2] SUPERSCRIPT TWO..SUPERSCRIPT THREE
+00B4 ; NFKC_QC; N # Sk ACUTE ACCENT
+00B5 ; NFKC_QC; N # L& MICRO SIGN
+00B8 ; NFKC_QC; N # Sk CEDILLA
+00B9 ; NFKC_QC; N # No SUPERSCRIPT ONE
+00BA ; NFKC_QC; N # L& MASCULINE ORDINAL INDICATOR
+00BC..00BE ; NFKC_QC; N # No [3] VULGAR FRACTION ONE QUARTER..VULGAR FRACTION THREE QUARTERS
+0132..0133 ; NFKC_QC; N # L& [2] LATIN CAPITAL LIGATURE IJ..LATIN SMALL LIGATURE IJ
+013F..0140 ; NFKC_QC; N # L& [2] LATIN CAPITAL LETTER L WITH MIDDLE DOT..LATIN SMALL LETTER L WITH MIDDLE DOT
+0149 ; NFKC_QC; N # L& LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
+017F ; NFKC_QC; N # L& LATIN SMALL LETTER LONG S
+01C4..01CC ; NFKC_QC; N # L& [9] LATIN CAPITAL LETTER DZ WITH CARON..LATIN SMALL LETTER NJ
+01F1..01F3 ; NFKC_QC; N # L& [3] LATIN CAPITAL LETTER DZ..LATIN SMALL LETTER DZ
+02B0..02B8 ; NFKC_QC; N # Lm [9] MODIFIER LETTER SMALL H..MODIFIER LETTER SMALL Y
+02D8..02DD ; NFKC_QC; N # Sk [6] BREVE..DOUBLE ACUTE ACCENT
+02E0..02E4 ; NFKC_QC; N # Lm [5] MODIFIER LETTER SMALL GAMMA..MODIFIER LETTER SMALL REVERSED GLOTTAL STOP
+0340..0341 ; NFKC_QC; N # Mn [2] COMBINING GRAVE TONE MARK..COMBINING ACUTE TONE MARK
+0343..0344 ; NFKC_QC; N # Mn [2] COMBINING GREEK KORONIS..COMBINING GREEK DIALYTIKA TONOS
+0374 ; NFKC_QC; N # Sk GREEK NUMERAL SIGN
+037A ; NFKC_QC; N # Lm GREEK YPOGEGRAMMENI
+037E ; NFKC_QC; N # Po GREEK QUESTION MARK
+0384..0385 ; NFKC_QC; N # Sk [2] GREEK TONOS..GREEK DIALYTIKA TONOS
+0387 ; NFKC_QC; N # Po GREEK ANO TELEIA
+03D0..03D6 ; NFKC_QC; N # L& [7] GREEK BETA SYMBOL..GREEK PI SYMBOL
+03F0..03F2 ; NFKC_QC; N # L& [3] GREEK KAPPA SYMBOL..GREEK LUNATE SIGMA SYMBOL
+03F4..03F5 ; NFKC_QC; N # L& [2] GREEK CAPITAL THETA SYMBOL..GREEK LUNATE EPSILON SYMBOL
+03F9 ; NFKC_QC; N # L& GREEK CAPITAL LUNATE SIGMA SYMBOL
+0587 ; NFKC_QC; N # L& ARMENIAN SMALL LIGATURE ECH YIWN
+0675..0678 ; NFKC_QC; N # Lo [4] ARABIC LETTER HIGH HAMZA ALEF..ARABIC LETTER HIGH HAMZA YEH
+0958..095F ; NFKC_QC; N # Lo [8] DEVANAGARI LETTER QA..DEVANAGARI LETTER YYA
+09DC..09DD ; NFKC_QC; N # Lo [2] BENGALI LETTER RRA..BENGALI LETTER RHA
+09DF ; NFKC_QC; N # Lo BENGALI LETTER YYA
+0A33 ; NFKC_QC; N # Lo GURMUKHI LETTER LLA
+0A36 ; NFKC_QC; N # Lo GURMUKHI LETTER SHA
+0A59..0A5B ; NFKC_QC; N # Lo [3] GURMUKHI LETTER KHHA..GURMUKHI LETTER ZA
+0A5E ; NFKC_QC; N # Lo GURMUKHI LETTER FA
+0B5C..0B5D ; NFKC_QC; N # Lo [2] ORIYA LETTER RRA..ORIYA LETTER RHA
+0E33 ; NFKC_QC; N # Lo THAI CHARACTER SARA AM
+0EB3 ; NFKC_QC; N # Lo LAO VOWEL SIGN AM
+0EDC..0EDD ; NFKC_QC; N # Lo [2] LAO HO NO..LAO HO MO
+0F0C ; NFKC_QC; N # Po TIBETAN MARK DELIMITER TSHEG BSTAR
+0F43 ; NFKC_QC; N # Lo TIBETAN LETTER GHA
+0F4D ; NFKC_QC; N # Lo TIBETAN LETTER DDHA
+0F52 ; NFKC_QC; N # Lo TIBETAN LETTER DHA
+0F57 ; NFKC_QC; N # Lo TIBETAN LETTER BHA
+0F5C ; NFKC_QC; N # Lo TIBETAN LETTER DZHA
+0F69 ; NFKC_QC; N # Lo TIBETAN LETTER KSSA
+0F73 ; NFKC_QC; N # Mn TIBETAN VOWEL SIGN II
+0F75..0F79 ; NFKC_QC; N # Mn [5] TIBETAN VOWEL SIGN UU..TIBETAN VOWEL SIGN VOCALIC LL
+0F81 ; NFKC_QC; N # Mn TIBETAN VOWEL SIGN REVERSED II
+0F93 ; NFKC_QC; N # Mn TIBETAN SUBJOINED LETTER GHA
+0F9D ; NFKC_QC; N # Mn TIBETAN SUBJOINED LETTER DDHA
+0FA2 ; NFKC_QC; N # Mn TIBETAN SUBJOINED LETTER DHA
+0FA7 ; NFKC_QC; N # Mn TIBETAN SUBJOINED LETTER BHA
+0FAC ; NFKC_QC; N # Mn TIBETAN SUBJOINED LETTER DZHA
+0FB9 ; NFKC_QC; N # Mn TIBETAN SUBJOINED LETTER KSSA
+10FC ; NFKC_QC; N # Lm MODIFIER LETTER GEORGIAN NAR
+1D2C..1D2E ; NFKC_QC; N # Lm [3] MODIFIER LETTER CAPITAL A..MODIFIER LETTER CAPITAL B
+1D30..1D3A ; NFKC_QC; N # Lm [11] MODIFIER LETTER CAPITAL D..MODIFIER LETTER CAPITAL N
+1D3C..1D4D ; NFKC_QC; N # Lm [18] MODIFIER LETTER CAPITAL O..MODIFIER LETTER SMALL G
+1D4F..1D61 ; NFKC_QC; N # Lm [19] MODIFIER LETTER SMALL K..MODIFIER LETTER SMALL CHI
+1D62..1D6A ; NFKC_QC; N # L& [9] LATIN SUBSCRIPT SMALL LETTER I..GREEK SUBSCRIPT SMALL LETTER CHI
+1D78 ; NFKC_QC; N # Lm MODIFIER LETTER CYRILLIC EN
+1D9B..1DBF ; NFKC_QC; N # Lm [37] MODIFIER LETTER SMALL TURNED ALPHA..MODIFIER LETTER SMALL THETA
+1E9A..1E9B ; NFKC_QC; N # L& [2] LATIN SMALL LETTER A WITH RIGHT HALF RING..LATIN SMALL LETTER LONG S WITH DOT ABOVE
+1F71 ; NFKC_QC; N # L& GREEK SMALL LETTER ALPHA WITH OXIA
+1F73 ; NFKC_QC; N # L& GREEK SMALL LETTER EPSILON WITH OXIA
+1F75 ; NFKC_QC; N # L& GREEK SMALL LETTER ETA WITH OXIA
+1F77 ; NFKC_QC; N # L& GREEK SMALL LETTER IOTA WITH OXIA
+1F79 ; NFKC_QC; N # L& GREEK SMALL LETTER OMICRON WITH OXIA
+1F7B ; NFKC_QC; N # L& GREEK SMALL LETTER UPSILON WITH OXIA
+1F7D ; NFKC_QC; N # L& GREEK SMALL LETTER OMEGA WITH OXIA
+1FBB ; NFKC_QC; N # L& GREEK CAPITAL LETTER ALPHA WITH OXIA
+1FBD ; NFKC_QC; N # Sk GREEK KORONIS
+1FBE ; NFKC_QC; N # L& GREEK PROSGEGRAMMENI
+1FBF..1FC1 ; NFKC_QC; N # Sk [3] GREEK PSILI..GREEK DIALYTIKA AND PERISPOMENI
+1FC9 ; NFKC_QC; N # L& GREEK CAPITAL LETTER EPSILON WITH OXIA
+1FCB ; NFKC_QC; N # L& GREEK CAPITAL LETTER ETA WITH OXIA
+1FCD..1FCF ; NFKC_QC; N # Sk [3] GREEK PSILI AND VARIA..GREEK PSILI AND PERISPOMENI
+1FD3 ; NFKC_QC; N # L& GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
+1FDB ; NFKC_QC; N # L& GREEK CAPITAL LETTER IOTA WITH OXIA
+1FDD..1FDF ; NFKC_QC; N # Sk [3] GREEK DASIA AND VARIA..GREEK DASIA AND PERISPOMENI
+1FE3 ; NFKC_QC; N # L& GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA
+1FEB ; NFKC_QC; N # L& GREEK CAPITAL LETTER UPSILON WITH OXIA
+1FED..1FEF ; NFKC_QC; N # Sk [3] GREEK DIALYTIKA AND VARIA..GREEK VARIA
+1FF9 ; NFKC_QC; N # L& GREEK CAPITAL LETTER OMICRON WITH OXIA
+1FFB ; NFKC_QC; N # L& GREEK CAPITAL LETTER OMEGA WITH OXIA
+1FFD..1FFE ; NFKC_QC; N # Sk [2] GREEK OXIA..GREEK DASIA
+2000..200A ; NFKC_QC; N # Zs [11] EN QUAD..HAIR SPACE
+2011 ; NFKC_QC; N # Pd NON-BREAKING HYPHEN
+2017 ; NFKC_QC; N # Po DOUBLE LOW LINE
+2024..2026 ; NFKC_QC; N # Po [3] ONE DOT LEADER..HORIZONTAL ELLIPSIS
+202F ; NFKC_QC; N # Zs NARROW NO-BREAK SPACE
+2033..2034 ; NFKC_QC; N # Po [2] DOUBLE PRIME..TRIPLE PRIME
+2036..2037 ; NFKC_QC; N # Po [2] REVERSED DOUBLE PRIME..REVERSED TRIPLE PRIME
+203C ; NFKC_QC; N # Po DOUBLE EXCLAMATION MARK
+203E ; NFKC_QC; N # Po OVERLINE
+2047..2049 ; NFKC_QC; N # Po [3] DOUBLE QUESTION MARK..EXCLAMATION QUESTION MARK
+2057 ; NFKC_QC; N # Po QUADRUPLE PRIME
+205F ; NFKC_QC; N # Zs MEDIUM MATHEMATICAL SPACE
+2070 ; NFKC_QC; N # No SUPERSCRIPT ZERO
+2071 ; NFKC_QC; N # L& SUPERSCRIPT LATIN SMALL LETTER I
+2074..2079 ; NFKC_QC; N # No [6] SUPERSCRIPT FOUR..SUPERSCRIPT NINE
+207A..207C ; NFKC_QC; N # Sm [3] SUPERSCRIPT PLUS SIGN..SUPERSCRIPT EQUALS SIGN
+207D ; NFKC_QC; N # Ps SUPERSCRIPT LEFT PARENTHESIS
+207E ; NFKC_QC; N # Pe SUPERSCRIPT RIGHT PARENTHESIS
+207F ; NFKC_QC; N # L& SUPERSCRIPT LATIN SMALL LETTER N
+2080..2089 ; NFKC_QC; N # No [10] SUBSCRIPT ZERO..SUBSCRIPT NINE
+208A..208C ; NFKC_QC; N # Sm [3] SUBSCRIPT PLUS SIGN..SUBSCRIPT EQUALS SIGN
+208D ; NFKC_QC; N # Ps SUBSCRIPT LEFT PARENTHESIS
+208E ; NFKC_QC; N # Pe SUBSCRIPT RIGHT PARENTHESIS
+2090..2094 ; NFKC_QC; N # Lm [5] LATIN SUBSCRIPT SMALL LETTER A..LATIN SUBSCRIPT SMALL LETTER SCHWA
+20A8 ; NFKC_QC; N # Sc RUPEE SIGN
+2100..2101 ; NFKC_QC; N # So [2] ACCOUNT OF..ADDRESSED TO THE SUBJECT
+2102 ; NFKC_QC; N # L& DOUBLE-STRUCK CAPITAL C
+2103 ; NFKC_QC; N # So DEGREE CELSIUS
+2105..2106 ; NFKC_QC; N # So [2] CARE OF..CADA UNA
+2107 ; NFKC_QC; N # L& EULER CONSTANT
+2109 ; NFKC_QC; N # So DEGREE FAHRENHEIT
+210A..2113 ; NFKC_QC; N # L& [10] SCRIPT SMALL G..SCRIPT SMALL L
+2115 ; NFKC_QC; N # L& DOUBLE-STRUCK CAPITAL N
+2116 ; NFKC_QC; N # So NUMERO SIGN
+2119..211D ; NFKC_QC; N # L& [5] DOUBLE-STRUCK CAPITAL P..DOUBLE-STRUCK CAPITAL R
+2120..2122 ; NFKC_QC; N # So [3] SERVICE MARK..TRADE MARK SIGN
+2124 ; NFKC_QC; N # L& DOUBLE-STRUCK CAPITAL Z
+2126 ; NFKC_QC; N # L& OHM SIGN
+2128 ; NFKC_QC; N # L& BLACK-LETTER CAPITAL Z
+212A..212D ; NFKC_QC; N # L& [4] KELVIN SIGN..BLACK-LETTER CAPITAL C
+212F..2131 ; NFKC_QC; N # L& [3] SCRIPT SMALL E..SCRIPT CAPITAL F
+2133..2134 ; NFKC_QC; N # L& [2] SCRIPT CAPITAL M..SCRIPT SMALL O
+2135..2138 ; NFKC_QC; N # Lo [4] ALEF SYMBOL..DALET SYMBOL
+2139 ; NFKC_QC; N # L& INFORMATION SOURCE
+213B ; NFKC_QC; N # So FACSIMILE SIGN
+213C..213F ; NFKC_QC; N # L& [4] DOUBLE-STRUCK SMALL PI..DOUBLE-STRUCK CAPITAL PI
+2140 ; NFKC_QC; N # Sm DOUBLE-STRUCK N-ARY SUMMATION
+2145..2149 ; NFKC_QC; N # L& [5] DOUBLE-STRUCK ITALIC CAPITAL D..DOUBLE-STRUCK ITALIC SMALL J
+2153..215F ; NFKC_QC; N # No [13] VULGAR FRACTION ONE THIRD..FRACTION NUMERATOR ONE
+2160..217F ; NFKC_QC; N # Nl [32] ROMAN NUMERAL ONE..SMALL ROMAN NUMERAL ONE THOUSAND
+222C..222D ; NFKC_QC; N # Sm [2] DOUBLE INTEGRAL..TRIPLE INTEGRAL
+222F..2230 ; NFKC_QC; N # Sm [2] SURFACE INTEGRAL..VOLUME INTEGRAL
+2329 ; NFKC_QC; N # Ps LEFT-POINTING ANGLE BRACKET
+232A ; NFKC_QC; N # Pe RIGHT-POINTING ANGLE BRACKET
+2460..249B ; NFKC_QC; N # No [60] CIRCLED DIGIT ONE..NUMBER TWENTY FULL STOP
+249C..24E9 ; NFKC_QC; N # So [78] PARENTHESIZED LATIN SMALL LETTER A..CIRCLED LATIN SMALL LETTER Z
+24EA ; NFKC_QC; N # No CIRCLED DIGIT ZERO
+2A0C ; NFKC_QC; N # Sm QUADRUPLE INTEGRAL OPERATOR
+2A74..2A76 ; NFKC_QC; N # Sm [3] DOUBLE COLON EQUAL..THREE CONSECUTIVE EQUALS SIGNS
+2ADC ; NFKC_QC; N # Sm FORKING
+2D6F ; NFKC_QC; N # Lm TIFINAGH MODIFIER LETTER LABIALIZATION MARK
+2E9F ; NFKC_QC; N # So CJK RADICAL MOTHER
+2EF3 ; NFKC_QC; N # So CJK RADICAL C-SIMPLIFIED TURTLE
+2F00..2FD5 ; NFKC_QC; N # So [214] KANGXI RADICAL ONE..KANGXI RADICAL FLUTE
+3000 ; NFKC_QC; N # Zs IDEOGRAPHIC SPACE
+3036 ; NFKC_QC; N # So CIRCLED POSTAL MARK
+3038..303A ; NFKC_QC; N # Nl [3] HANGZHOU NUMERAL TEN..HANGZHOU NUMERAL THIRTY
+309B..309C ; NFKC_QC; N # Sk [2] KATAKANA-HIRAGANA VOICED SOUND MARK..KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+309F ; NFKC_QC; N # Lo HIRAGANA DIGRAPH YORI
+30FF ; NFKC_QC; N # Lo KATAKANA DIGRAPH KOTO
+3131..318E ; NFKC_QC; N # Lo [94] HANGUL LETTER KIYEOK..HANGUL LETTER ARAEAE
+3192..3195 ; NFKC_QC; N # No [4] IDEOGRAPHIC ANNOTATION ONE MARK..IDEOGRAPHIC ANNOTATION FOUR MARK
+3196..319F ; NFKC_QC; N # So [10] IDEOGRAPHIC ANNOTATION TOP MARK..IDEOGRAPHIC ANNOTATION MAN MARK
+3200..321E ; NFKC_QC; N # So [31] PARENTHESIZED HANGUL KIYEOK..PARENTHESIZED KOREAN CHARACTER O HU
+3220..3229 ; NFKC_QC; N # No [10] PARENTHESIZED IDEOGRAPH ONE..PARENTHESIZED IDEOGRAPH TEN
+322A..3243 ; NFKC_QC; N # So [26] PARENTHESIZED IDEOGRAPH MOON..PARENTHESIZED IDEOGRAPH REACH
+3250 ; NFKC_QC; N # So PARTNERSHIP SIGN
+3251..325F ; NFKC_QC; N # No [15] CIRCLED NUMBER TWENTY ONE..CIRCLED NUMBER THIRTY FIVE
+3260..327E ; NFKC_QC; N # So [31] CIRCLED HANGUL KIYEOK..CIRCLED HANGUL IEUNG U
+3280..3289 ; NFKC_QC; N # No [10] CIRCLED IDEOGRAPH ONE..CIRCLED IDEOGRAPH TEN
+328A..32B0 ; NFKC_QC; N # So [39] CIRCLED IDEOGRAPH MOON..CIRCLED IDEOGRAPH NIGHT
+32B1..32BF ; NFKC_QC; N # No [15] CIRCLED NUMBER THIRTY SIX..CIRCLED NUMBER FIFTY
+32C0..32FE ; NFKC_QC; N # So [63] IDEOGRAPHIC TELEGRAPH SYMBOL FOR JANUARY..CIRCLED KATAKANA WO
+3300..33FF ; NFKC_QC; N # So [256] SQUARE APAATO..SQUARE GAL
+F900..FA0D ; NFKC_QC; N # Lo [270] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA0D
+FA10 ; NFKC_QC; N # Lo CJK COMPATIBILITY IDEOGRAPH-FA10
+FA12 ; NFKC_QC; N # Lo CJK COMPATIBILITY IDEOGRAPH-FA12
+FA15..FA1E ; NFKC_QC; N # Lo [10] CJK COMPATIBILITY IDEOGRAPH-FA15..CJK COMPATIBILITY IDEOGRAPH-FA1E
+FA20 ; NFKC_QC; N # Lo CJK COMPATIBILITY IDEOGRAPH-FA20
+FA22 ; NFKC_QC; N # Lo CJK COMPATIBILITY IDEOGRAPH-FA22
+FA25..FA26 ; NFKC_QC; N # Lo [2] CJK COMPATIBILITY IDEOGRAPH-FA25..CJK COMPATIBILITY IDEOGRAPH-FA26
+FA2A..FA2D ; NFKC_QC; N # Lo [4] CJK COMPATIBILITY IDEOGRAPH-FA2A..CJK COMPATIBILITY IDEOGRAPH-FA2D
+FA30..FA6A ; NFKC_QC; N # Lo [59] CJK COMPATIBILITY IDEOGRAPH-FA30..CJK COMPATIBILITY IDEOGRAPH-FA6A
+FA70..FAD9 ; NFKC_QC; N # Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9
+FB00..FB06 ; NFKC_QC; N # L& [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST
+FB13..FB17 ; NFKC_QC; N # L& [5] ARMENIAN SMALL LIGATURE MEN NOW..ARMENIAN SMALL LIGATURE MEN XEH
+FB1D ; NFKC_QC; N # Lo HEBREW LETTER YOD WITH HIRIQ
+FB1F..FB28 ; NFKC_QC; N # Lo [10] HEBREW LIGATURE YIDDISH YOD YOD PATAH..HEBREW LETTER WIDE TAV
+FB29 ; NFKC_QC; N # Sm HEBREW LETTER ALTERNATIVE PLUS SIGN
+FB2A..FB36 ; NFKC_QC; N # Lo [13] HEBREW LETTER SHIN WITH SHIN DOT..HEBREW LETTER ZAYIN WITH DAGESH
+FB38..FB3C ; NFKC_QC; N # Lo [5] HEBREW LETTER TET WITH DAGESH..HEBREW LETTER LAMED WITH DAGESH
+FB3E ; NFKC_QC; N # Lo HEBREW LETTER MEM WITH DAGESH
+FB40..FB41 ; NFKC_QC; N # Lo [2] HEBREW LETTER NUN WITH DAGESH..HEBREW LETTER SAMEKH WITH DAGESH
+FB43..FB44 ; NFKC_QC; N # Lo [2] HEBREW LETTER FINAL PE WITH DAGESH..HEBREW LETTER PE WITH DAGESH
+FB46..FBB1 ; NFKC_QC; N # Lo [108] HEBREW LETTER TSADI WITH DAGESH..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM
+FBD3..FD3D ; NFKC_QC; N # Lo [363] ARABIC LETTER NG ISOLATED FORM..ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM
+FD50..FD8F ; NFKC_QC; N # Lo [64] ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM..ARABIC LIGATURE MEEM WITH KHAH WITH MEEM INITIAL FORM
+FD92..FDC7 ; NFKC_QC; N # Lo [54] ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INITIAL FORM..ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM
+FDF0..FDFB ; NFKC_QC; N # Lo [12] ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM..ARABIC LIGATURE JALLAJALALOUHOU
+FDFC ; NFKC_QC; N # Sc RIAL SIGN
+FE10..FE16 ; NFKC_QC; N # Po [7] PRESENTATION FORM FOR VERTICAL COMMA..PRESENTATION FORM FOR VERTICAL QUESTION MARK
+FE17 ; NFKC_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT WHITE LENTICULAR BRACKET
+FE18 ; NFKC_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET
+FE19 ; NFKC_QC; N # Po PRESENTATION FORM FOR VERTICAL HORIZONTAL ELLIPSIS
+FE30 ; NFKC_QC; N # Po PRESENTATION FORM FOR VERTICAL TWO DOT LEADER
+FE31..FE32 ; NFKC_QC; N # Pd [2] PRESENTATION FORM FOR VERTICAL EM DASH..PRESENTATION FORM FOR VERTICAL EN DASH
+FE33..FE34 ; NFKC_QC; N # Pc [2] PRESENTATION FORM FOR VERTICAL LOW LINE..PRESENTATION FORM FOR VERTICAL WAVY LOW LINE
+FE35 ; NFKC_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS
+FE36 ; NFKC_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS
+FE37 ; NFKC_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT CURLY BRACKET
+FE38 ; NFKC_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET
+FE39 ; NFKC_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT TORTOISE SHELL BRACKET
+FE3A ; NFKC_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT TORTOISE SHELL BRACKET
+FE3B ; NFKC_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT BLACK LENTICULAR BRACKET
+FE3C ; NFKC_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT BLACK LENTICULAR BRACKET
+FE3D ; NFKC_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT DOUBLE ANGLE BRACKET
+FE3E ; NFKC_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT DOUBLE ANGLE BRACKET
+FE3F ; NFKC_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET
+FE40 ; NFKC_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT ANGLE BRACKET
+FE41 ; NFKC_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT CORNER BRACKET
+FE42 ; NFKC_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT CORNER BRACKET
+FE43 ; NFKC_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT WHITE CORNER BRACKET
+FE44 ; NFKC_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET
+FE47 ; NFKC_QC; N # Ps PRESENTATION FORM FOR VERTICAL LEFT SQUARE BRACKET
+FE48 ; NFKC_QC; N # Pe PRESENTATION FORM FOR VERTICAL RIGHT SQUARE BRACKET
+FE49..FE4C ; NFKC_QC; N # Po [4] DASHED OVERLINE..DOUBLE WAVY OVERLINE
+FE4D..FE4F ; NFKC_QC; N # Pc [3] DASHED LOW LINE..WAVY LOW LINE
+FE50..FE52 ; NFKC_QC; N # Po [3] SMALL COMMA..SMALL FULL STOP
+FE54..FE57 ; NFKC_QC; N # Po [4] SMALL SEMICOLON..SMALL EXCLAMATION MARK
+FE58 ; NFKC_QC; N # Pd SMALL EM DASH
+FE59 ; NFKC_QC; N # Ps SMALL LEFT PARENTHESIS
+FE5A ; NFKC_QC; N # Pe SMALL RIGHT PARENTHESIS
+FE5B ; NFKC_QC; N # Ps SMALL LEFT CURLY BRACKET
+FE5C ; NFKC_QC; N # Pe SMALL RIGHT CURLY BRACKET
+FE5D ; NFKC_QC; N # Ps SMALL LEFT TORTOISE SHELL BRACKET
+FE5E ; NFKC_QC; N # Pe SMALL RIGHT TORTOISE SHELL BRACKET
+FE5F..FE61 ; NFKC_QC; N # Po [3] SMALL NUMBER SIGN..SMALL ASTERISK
+FE62 ; NFKC_QC; N # Sm SMALL PLUS SIGN
+FE63 ; NFKC_QC; N # Pd SMALL HYPHEN-MINUS
+FE64..FE66 ; NFKC_QC; N # Sm [3] SMALL LESS-THAN SIGN..SMALL EQUALS SIGN
+FE68 ; NFKC_QC; N # Po SMALL REVERSE SOLIDUS
+FE69 ; NFKC_QC; N # Sc SMALL DOLLAR SIGN
+FE6A..FE6B ; NFKC_QC; N # Po [2] SMALL PERCENT SIGN..SMALL COMMERCIAL AT
+FE70..FE72 ; NFKC_QC; N # Lo [3] ARABIC FATHATAN ISOLATED FORM..ARABIC DAMMATAN ISOLATED FORM
+FE74 ; NFKC_QC; N # Lo ARABIC KASRATAN ISOLATED FORM
+FE76..FEFC ; NFKC_QC; N # Lo [135] ARABIC FATHA ISOLATED FORM..ARABIC LIGATURE LAM WITH ALEF FINAL FORM
+FF01..FF03 ; NFKC_QC; N # Po [3] FULLWIDTH EXCLAMATION MARK..FULLWIDTH NUMBER SIGN
+FF04 ; NFKC_QC; N # Sc FULLWIDTH DOLLAR SIGN
+FF05..FF07 ; NFKC_QC; N # Po [3] FULLWIDTH PERCENT SIGN..FULLWIDTH APOSTROPHE
+FF08 ; NFKC_QC; N # Ps FULLWIDTH LEFT PARENTHESIS
+FF09 ; NFKC_QC; N # Pe FULLWIDTH RIGHT PARENTHESIS
+FF0A ; NFKC_QC; N # Po FULLWIDTH ASTERISK
+FF0B ; NFKC_QC; N # Sm FULLWIDTH PLUS SIGN
+FF0C ; NFKC_QC; N # Po FULLWIDTH COMMA
+FF0D ; NFKC_QC; N # Pd FULLWIDTH HYPHEN-MINUS
+FF0E..FF0F ; NFKC_QC; N # Po [2] FULLWIDTH FULL STOP..FULLWIDTH SOLIDUS
+FF10..FF19 ; NFKC_QC; N # Nd [10] FULLWIDTH DIGIT ZERO..FULLWIDTH DIGIT NINE
+FF1A..FF1B ; NFKC_QC; N # Po [2] FULLWIDTH COLON..FULLWIDTH SEMICOLON
+FF1C..FF1E ; NFKC_QC; N # Sm [3] FULLWIDTH LESS-THAN SIGN..FULLWIDTH GREATER-THAN SIGN
+FF1F..FF20 ; NFKC_QC; N # Po [2] FULLWIDTH QUESTION MARK..FULLWIDTH COMMERCIAL AT
+FF21..FF3A ; NFKC_QC; N # L& [26] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER Z
+FF3B ; NFKC_QC; N # Ps FULLWIDTH LEFT SQUARE BRACKET
+FF3C ; NFKC_QC; N # Po FULLWIDTH REVERSE SOLIDUS
+FF3D ; NFKC_QC; N # Pe FULLWIDTH RIGHT SQUARE BRACKET
+FF3E ; NFKC_QC; N # Sk FULLWIDTH CIRCUMFLEX ACCENT
+FF3F ; NFKC_QC; N # Pc FULLWIDTH LOW LINE
+FF40 ; NFKC_QC; N # Sk FULLWIDTH GRAVE ACCENT
+FF41..FF5A ; NFKC_QC; N # L& [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN SMALL LETTER Z
+FF5B ; NFKC_QC; N # Ps FULLWIDTH LEFT CURLY BRACKET
+FF5C ; NFKC_QC; N # Sm FULLWIDTH VERTICAL LINE
+FF5D ; NFKC_QC; N # Pe FULLWIDTH RIGHT CURLY BRACKET
+FF5E ; NFKC_QC; N # Sm FULLWIDTH TILDE
+FF5F ; NFKC_QC; N # Ps FULLWIDTH LEFT WHITE PARENTHESIS
+FF60 ; NFKC_QC; N # Pe FULLWIDTH RIGHT WHITE PARENTHESIS
+FF61 ; NFKC_QC; N # Po HALFWIDTH IDEOGRAPHIC FULL STOP
+FF62 ; NFKC_QC; N # Ps HALFWIDTH LEFT CORNER BRACKET
+FF63 ; NFKC_QC; N # Pe HALFWIDTH RIGHT CORNER BRACKET
+FF64..FF65 ; NFKC_QC; N # Po [2] HALFWIDTH IDEOGRAPHIC COMMA..HALFWIDTH KATAKANA MIDDLE DOT
+FF66..FF6F ; NFKC_QC; N # Lo [10] HALFWIDTH KATAKANA LETTER WO..HALFWIDTH KATAKANA LETTER SMALL TU
+FF70 ; NFKC_QC; N # Lm HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK
+FF71..FF9D ; NFKC_QC; N # Lo [45] HALFWIDTH KATAKANA LETTER A..HALFWIDTH KATAKANA LETTER N
+FF9E..FF9F ; NFKC_QC; N # Lm [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
+FFA0..FFBE ; NFKC_QC; N # Lo [31] HALFWIDTH HANGUL FILLER..HALFWIDTH HANGUL LETTER HIEUH
+FFC2..FFC7 ; NFKC_QC; N # Lo [6] HALFWIDTH HANGUL LETTER A..HALFWIDTH HANGUL LETTER E
+FFCA..FFCF ; NFKC_QC; N # Lo [6] HALFWIDTH HANGUL LETTER YEO..HALFWIDTH HANGUL LETTER OE
+FFD2..FFD7 ; NFKC_QC; N # Lo [6] HALFWIDTH HANGUL LETTER YO..HALFWIDTH HANGUL LETTER YU
+FFDA..FFDC ; NFKC_QC; N # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL LETTER I
+FFE0..FFE1 ; NFKC_QC; N # Sc [2] FULLWIDTH CENT SIGN..FULLWIDTH POUND SIGN
+FFE2 ; NFKC_QC; N # Sm FULLWIDTH NOT SIGN
+FFE3 ; NFKC_QC; N # Sk FULLWIDTH MACRON
+FFE4 ; NFKC_QC; N # So FULLWIDTH BROKEN BAR
+FFE5..FFE6 ; NFKC_QC; N # Sc [2] FULLWIDTH YEN SIGN..FULLWIDTH WON SIGN
+FFE8 ; NFKC_QC; N # So HALFWIDTH FORMS LIGHT VERTICAL
+FFE9..FFEC ; NFKC_QC; N # Sm [4] HALFWIDTH LEFTWARDS ARROW..HALFWIDTH DOWNWARDS ARROW
+FFED..FFEE ; NFKC_QC; N # So [2] HALFWIDTH BLACK SQUARE..HALFWIDTH WHITE CIRCLE
+1D15E..1D164 ; NFKC_QC; N # So [7] MUSICAL SYMBOL HALF NOTE..MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE
+1D1BB..1D1C0 ; NFKC_QC; N # So [6] MUSICAL SYMBOL MINIMA..MUSICAL SYMBOL FUSA BLACK
+1D400..1D454 ; NFKC_QC; N # L& [85] MATHEMATICAL BOLD CAPITAL A..MATHEMATICAL ITALIC SMALL G
+1D456..1D49C ; NFKC_QC; N # L& [71] MATHEMATICAL ITALIC SMALL I..MATHEMATICAL SCRIPT CAPITAL A
+1D49E..1D49F ; NFKC_QC; N # L& [2] MATHEMATICAL SCRIPT CAPITAL C..MATHEMATICAL SCRIPT CAPITAL D
+1D4A2 ; NFKC_QC; N # L& MATHEMATICAL SCRIPT CAPITAL G
+1D4A5..1D4A6 ; NFKC_QC; N # L& [2] MATHEMATICAL SCRIPT CAPITAL J..MATHEMATICAL SCRIPT CAPITAL K
+1D4A9..1D4AC ; NFKC_QC; N # L& [4] MATHEMATICAL SCRIPT CAPITAL N..MATHEMATICAL SCRIPT CAPITAL Q
+1D4AE..1D4B9 ; NFKC_QC; N # L& [12] MATHEMATICAL SCRIPT CAPITAL S..MATHEMATICAL SCRIPT SMALL D
+1D4BB ; NFKC_QC; N # L& MATHEMATICAL SCRIPT SMALL F
+1D4BD..1D4C3 ; NFKC_QC; N # L& [7] MATHEMATICAL SCRIPT SMALL H..MATHEMATICAL SCRIPT SMALL N
+1D4C5..1D505 ; NFKC_QC; N # L& [65] MATHEMATICAL SCRIPT SMALL P..MATHEMATICAL FRAKTUR CAPITAL B
+1D507..1D50A ; NFKC_QC; N # L& [4] MATHEMATICAL FRAKTUR CAPITAL D..MATHEMATICAL FRAKTUR CAPITAL G
+1D50D..1D514 ; NFKC_QC; N # L& [8] MATHEMATICAL FRAKTUR CAPITAL J..MATHEMATICAL FRAKTUR CAPITAL Q
+1D516..1D51C ; NFKC_QC; N # L& [7] MATHEMATICAL FRAKTUR CAPITAL S..MATHEMATICAL FRAKTUR CAPITAL Y
+1D51E..1D539 ; NFKC_QC; N # L& [28] MATHEMATICAL FRAKTUR SMALL A..MATHEMATICAL DOUBLE-STRUCK CAPITAL B
+1D53B..1D53E ; NFKC_QC; N # L& [4] MATHEMATICAL DOUBLE-STRUCK CAPITAL D..MATHEMATICAL DOUBLE-STRUCK CAPITAL G
+1D540..1D544 ; NFKC_QC; N # L& [5] MATHEMATICAL DOUBLE-STRUCK CAPITAL I..MATHEMATICAL DOUBLE-STRUCK CAPITAL M
+1D546 ; NFKC_QC; N # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL O
+1D54A..1D550 ; NFKC_QC; N # L& [7] MATHEMATICAL DOUBLE-STRUCK CAPITAL S..MATHEMATICAL DOUBLE-STRUCK CAPITAL Y
+1D552..1D6A5 ; NFKC_QC; N # L& [340] MATHEMATICAL DOUBLE-STRUCK SMALL A..MATHEMATICAL ITALIC SMALL DOTLESS J
+1D6A8..1D6C0 ; NFKC_QC; N # L& [25] MATHEMATICAL BOLD CAPITAL ALPHA..MATHEMATICAL BOLD CAPITAL OMEGA
+1D6C1 ; NFKC_QC; N # Sm MATHEMATICAL BOLD NABLA
+1D6C2..1D6DA ; NFKC_QC; N # L& [25] MATHEMATICAL BOLD SMALL ALPHA..MATHEMATICAL BOLD SMALL OMEGA
+1D6DB ; NFKC_QC; N # Sm MATHEMATICAL BOLD PARTIAL DIFFERENTIAL
+1D6DC..1D6FA ; NFKC_QC; N # L& [31] MATHEMATICAL BOLD EPSILON SYMBOL..MATHEMATICAL ITALIC CAPITAL OMEGA
+1D6FB ; NFKC_QC; N # Sm MATHEMATICAL ITALIC NABLA
+1D6FC..1D714 ; NFKC_QC; N # L& [25] MATHEMATICAL ITALIC SMALL ALPHA..MATHEMATICAL ITALIC SMALL OMEGA
+1D715 ; NFKC_QC; N # Sm MATHEMATICAL ITALIC PARTIAL DIFFERENTIAL
+1D716..1D734 ; NFKC_QC; N # L& [31] MATHEMATICAL ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD ITALIC CAPITAL OMEGA
+1D735 ; NFKC_QC; N # Sm MATHEMATICAL BOLD ITALIC NABLA
+1D736..1D74E ; NFKC_QC; N # L& [25] MATHEMATICAL BOLD ITALIC SMALL ALPHA..MATHEMATICAL BOLD ITALIC SMALL OMEGA
+1D74F ; NFKC_QC; N # Sm MATHEMATICAL BOLD ITALIC PARTIAL DIFFERENTIAL
+1D750..1D76E ; NFKC_QC; N # L& [31] MATHEMATICAL BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD CAPITAL OMEGA
+1D76F ; NFKC_QC; N # Sm MATHEMATICAL SANS-SERIF BOLD NABLA
+1D770..1D788 ; NFKC_QC; N # L& [25] MATHEMATICAL SANS-SERIF BOLD SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD SMALL OMEGA
+1D789 ; NFKC_QC; N # Sm MATHEMATICAL SANS-SERIF BOLD PARTIAL DIFFERENTIAL
+1D78A..1D7A8 ; NFKC_QC; N # L& [31] MATHEMATICAL SANS-SERIF BOLD EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMEGA
+1D7A9 ; NFKC_QC; N # Sm MATHEMATICAL SANS-SERIF BOLD ITALIC NABLA
+1D7AA..1D7C2 ; NFKC_QC; N # L& [25] MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMEGA
+1D7C3 ; NFKC_QC; N # Sm MATHEMATICAL SANS-SERIF BOLD ITALIC PARTIAL DIFFERENTIAL
+1D7C4..1D7CB ; NFKC_QC; N # L& [8] MATHEMATICAL SANS-SERIF BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD SMALL DIGAMMA
+1D7CE..1D7FF ; NFKC_QC; N # Nd [50] MATHEMATICAL BOLD DIGIT ZERO..MATHEMATICAL MONOSPACE DIGIT NINE
+2F800..2FA1D ; NFKC_QC; N # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D
+
+# Total code points: 4486
+
+# ================================================
+
+# NFKC_Quick_Check=Maybe
+
+0300..0304 ; NFKC_QC; M # Mn [5] COMBINING GRAVE ACCENT..COMBINING MACRON
+0306..030C ; NFKC_QC; M # Mn [7] COMBINING BREVE..COMBINING CARON
+030F ; NFKC_QC; M # Mn COMBINING DOUBLE GRAVE ACCENT
+0311 ; NFKC_QC; M # Mn COMBINING INVERTED BREVE
+0313..0314 ; NFKC_QC; M # Mn [2] COMBINING COMMA ABOVE..COMBINING REVERSED COMMA ABOVE
+031B ; NFKC_QC; M # Mn COMBINING HORN
+0323..0328 ; NFKC_QC; M # Mn [6] COMBINING DOT BELOW..COMBINING OGONEK
+032D..032E ; NFKC_QC; M # Mn [2] COMBINING CIRCUMFLEX ACCENT BELOW..COMBINING BREVE BELOW
+0330..0331 ; NFKC_QC; M # Mn [2] COMBINING TILDE BELOW..COMBINING MACRON BELOW
+0338 ; NFKC_QC; M # Mn COMBINING LONG SOLIDUS OVERLAY
+0342 ; NFKC_QC; M # Mn COMBINING GREEK PERISPOMENI
+0345 ; NFKC_QC; M # Mn COMBINING GREEK YPOGEGRAMMENI
+0653..0655 ; NFKC_QC; M # Mn [3] ARABIC MADDAH ABOVE..ARABIC HAMZA BELOW
+093C ; NFKC_QC; M # Mn DEVANAGARI SIGN NUKTA
+09BE ; NFKC_QC; M # Mc BENGALI VOWEL SIGN AA
+09D7 ; NFKC_QC; M # Mc BENGALI AU LENGTH MARK
+0B3E ; NFKC_QC; M # Mc ORIYA VOWEL SIGN AA
+0B56 ; NFKC_QC; M # Mn ORIYA AI LENGTH MARK
+0B57 ; NFKC_QC; M # Mc ORIYA AU LENGTH MARK
+0BBE ; NFKC_QC; M # Mc TAMIL VOWEL SIGN AA
+0BD7 ; NFKC_QC; M # Mc TAMIL AU LENGTH MARK
+0C56 ; NFKC_QC; M # Mn TELUGU AI LENGTH MARK
+0CC2 ; NFKC_QC; M # Mc KANNADA VOWEL SIGN UU
+0CD5..0CD6 ; NFKC_QC; M # Mc [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK
+0D3E ; NFKC_QC; M # Mc MALAYALAM VOWEL SIGN AA
+0D57 ; NFKC_QC; M # Mc MALAYALAM AU LENGTH MARK
+0DCA ; NFKC_QC; M # Mn SINHALA SIGN AL-LAKUNA
+0DCF ; NFKC_QC; M # Mc SINHALA VOWEL SIGN AELA-PILLA
+0DDF ; NFKC_QC; M # Mc SINHALA VOWEL SIGN GAYANUKITTA
+102E ; NFKC_QC; M # Mn MYANMAR VOWEL SIGN II
+1161..1175 ; NFKC_QC; M # Lo [21] HANGUL JUNGSEONG A..HANGUL JUNGSEONG I
+11A8..11C2 ; NFKC_QC; M # Lo [27] HANGUL JONGSEONG KIYEOK..HANGUL JONGSEONG HIEUH
+1B35 ; NFKC_QC; M # Mc BALINESE VOWEL SIGN TEDUNG
+3099..309A ; NFKC_QC; M # Mn [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+
+# Total code points: 102
+
+# ================================================
+
+# Derived Property: Expands_On_NFD
+# Generated according to UAX #15.
+# Characters whose normalized length is not one.
+# WARNING: Normalization of STRINGS must use the algorithm in UAX #15 because characters may interact.
+# The length of a normalized string is not necessarily the sum of the lengths of the normalized characters!
+
+00C0..00C5 ; Expands_On_NFD # L& [6] LATIN CAPITAL LETTER A WITH GRAVE..LATIN CAPITAL LETTER A WITH RING ABOVE
+00C7..00CF ; Expands_On_NFD # L& [9] LATIN CAPITAL LETTER C WITH CEDILLA..LATIN CAPITAL LETTER I WITH DIAERESIS
+00D1..00D6 ; Expands_On_NFD # L& [6] LATIN CAPITAL LETTER N WITH TILDE..LATIN CAPITAL LETTER O WITH DIAERESIS
+00D9..00DD ; Expands_On_NFD # L& [5] LATIN CAPITAL LETTER U WITH GRAVE..LATIN CAPITAL LETTER Y WITH ACUTE
+00E0..00E5 ; Expands_On_NFD # L& [6] LATIN SMALL LETTER A WITH GRAVE..LATIN SMALL LETTER A WITH RING ABOVE
+00E7..00EF ; Expands_On_NFD # L& [9] LATIN SMALL LETTER C WITH CEDILLA..LATIN SMALL LETTER I WITH DIAERESIS
+00F1..00F6 ; Expands_On_NFD # L& [6] LATIN SMALL LETTER N WITH TILDE..LATIN SMALL LETTER O WITH DIAERESIS
+00F9..00FD ; Expands_On_NFD # L& [5] LATIN SMALL LETTER U WITH GRAVE..LATIN SMALL LETTER Y WITH ACUTE
+00FF..010F ; Expands_On_NFD # L& [17] LATIN SMALL LETTER Y WITH DIAERESIS..LATIN SMALL LETTER D WITH CARON
+0112..0125 ; Expands_On_NFD # L& [20] LATIN CAPITAL LETTER E WITH MACRON..LATIN SMALL LETTER H WITH CIRCUMFLEX
+0128..0130 ; Expands_On_NFD # L& [9] LATIN CAPITAL LETTER I WITH TILDE..LATIN CAPITAL LETTER I WITH DOT ABOVE
+0134..0137 ; Expands_On_NFD # L& [4] LATIN CAPITAL LETTER J WITH CIRCUMFLEX..LATIN SMALL LETTER K WITH CEDILLA
+0139..013E ; Expands_On_NFD # L& [6] LATIN CAPITAL LETTER L WITH ACUTE..LATIN SMALL LETTER L WITH CARON
+0143..0148 ; Expands_On_NFD # L& [6] LATIN CAPITAL LETTER N WITH ACUTE..LATIN SMALL LETTER N WITH CARON
+014C..0151 ; Expands_On_NFD # L& [6] LATIN CAPITAL LETTER O WITH MACRON..LATIN SMALL LETTER O WITH DOUBLE ACUTE
+0154..0165 ; Expands_On_NFD # L& [18] LATIN CAPITAL LETTER R WITH ACUTE..LATIN SMALL LETTER T WITH CARON
+0168..017E ; Expands_On_NFD # L& [23] LATIN CAPITAL LETTER U WITH TILDE..LATIN SMALL LETTER Z WITH CARON
+01A0..01A1 ; Expands_On_NFD # L& [2] LATIN CAPITAL LETTER O WITH HORN..LATIN SMALL LETTER O WITH HORN
+01AF..01B0 ; Expands_On_NFD # L& [2] LATIN CAPITAL LETTER U WITH HORN..LATIN SMALL LETTER U WITH HORN
+01CD..01DC ; Expands_On_NFD # L& [16] LATIN CAPITAL LETTER A WITH CARON..LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE
+01DE..01E3 ; Expands_On_NFD # L& [6] LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON..LATIN SMALL LETTER AE WITH MACRON
+01E6..01F0 ; Expands_On_NFD # L& [11] LATIN CAPITAL LETTER G WITH CARON..LATIN SMALL LETTER J WITH CARON
+01F4..01F5 ; Expands_On_NFD # L& [2] LATIN CAPITAL LETTER G WITH ACUTE..LATIN SMALL LETTER G WITH ACUTE
+01F8..021B ; Expands_On_NFD # L& [36] LATIN CAPITAL LETTER N WITH GRAVE..LATIN SMALL LETTER T WITH COMMA BELOW
+021E..021F ; Expands_On_NFD # L& [2] LATIN CAPITAL LETTER H WITH CARON..LATIN SMALL LETTER H WITH CARON
+0226..0233 ; Expands_On_NFD # L& [14] LATIN CAPITAL LETTER A WITH DOT ABOVE..LATIN SMALL LETTER Y WITH MACRON
+0344 ; Expands_On_NFD # Mn COMBINING GREEK DIALYTIKA TONOS
+0385 ; Expands_On_NFD # Sk GREEK DIALYTIKA TONOS
+0386 ; Expands_On_NFD # L& GREEK CAPITAL LETTER ALPHA WITH TONOS
+0388..038A ; Expands_On_NFD # L& [3] GREEK CAPITAL LETTER EPSILON WITH TONOS..GREEK CAPITAL LETTER IOTA WITH TONOS
+038C ; Expands_On_NFD # L& GREEK CAPITAL LETTER OMICRON WITH TONOS
+038E..0390 ; Expands_On_NFD # L& [3] GREEK CAPITAL LETTER UPSILON WITH TONOS..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
+03AA..03B0 ; Expands_On_NFD # L& [7] GREEK CAPITAL LETTER IOTA WITH DIALYTIKA..GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS
+03CA..03CE ; Expands_On_NFD # L& [5] GREEK SMALL LETTER IOTA WITH DIALYTIKA..GREEK SMALL LETTER OMEGA WITH TONOS
+03D3..03D4 ; Expands_On_NFD # L& [2] GREEK UPSILON WITH ACUTE AND HOOK SYMBOL..GREEK UPSILON WITH DIAERESIS AND HOOK SYMBOL
+0400..0401 ; Expands_On_NFD # L& [2] CYRILLIC CAPITAL LETTER IE WITH GRAVE..CYRILLIC CAPITAL LETTER IO
+0403 ; Expands_On_NFD # L& CYRILLIC CAPITAL LETTER GJE
+0407 ; Expands_On_NFD # L& CYRILLIC CAPITAL LETTER YI
+040C..040E ; Expands_On_NFD # L& [3] CYRILLIC CAPITAL LETTER KJE..CYRILLIC CAPITAL LETTER SHORT U
+0419 ; Expands_On_NFD # L& CYRILLIC CAPITAL LETTER SHORT I
+0439 ; Expands_On_NFD # L& CYRILLIC SMALL LETTER SHORT I
+0450..0451 ; Expands_On_NFD # L& [2] CYRILLIC SMALL LETTER IE WITH GRAVE..CYRILLIC SMALL LETTER IO
+0453 ; Expands_On_NFD # L& CYRILLIC SMALL LETTER GJE
+0457 ; Expands_On_NFD # L& CYRILLIC SMALL LETTER YI
+045C..045E ; Expands_On_NFD # L& [3] CYRILLIC SMALL LETTER KJE..CYRILLIC SMALL LETTER SHORT U
+0476..0477 ; Expands_On_NFD # L& [2] CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT..CYRILLIC SMALL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT
+04C1..04C2 ; Expands_On_NFD # L& [2] CYRILLIC CAPITAL LETTER ZHE WITH BREVE..CYRILLIC SMALL LETTER ZHE WITH BREVE
+04D0..04D3 ; Expands_On_NFD # L& [4] CYRILLIC CAPITAL LETTER A WITH BREVE..CYRILLIC SMALL LETTER A WITH DIAERESIS
+04D6..04D7 ; Expands_On_NFD # L& [2] CYRILLIC CAPITAL LETTER IE WITH BREVE..CYRILLIC SMALL LETTER IE WITH BREVE
+04DA..04DF ; Expands_On_NFD # L& [6] CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS..CYRILLIC SMALL LETTER ZE WITH DIAERESIS
+04E2..04E7 ; Expands_On_NFD # L& [6] CYRILLIC CAPITAL LETTER I WITH MACRON..CYRILLIC SMALL LETTER O WITH DIAERESIS
+04EA..04F5 ; Expands_On_NFD # L& [12] CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS..CYRILLIC SMALL LETTER CHE WITH DIAERESIS
+04F8..04F9 ; Expands_On_NFD # L& [2] CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS..CYRILLIC SMALL LETTER YERU WITH DIAERESIS
+0622..0626 ; Expands_On_NFD # Lo [5] ARABIC LETTER ALEF WITH MADDA ABOVE..ARABIC LETTER YEH WITH HAMZA ABOVE
+06C0 ; Expands_On_NFD # Lo ARABIC LETTER HEH WITH YEH ABOVE
+06C2 ; Expands_On_NFD # Lo ARABIC LETTER HEH GOAL WITH HAMZA ABOVE
+06D3 ; Expands_On_NFD # Lo ARABIC LETTER YEH BARREE WITH HAMZA ABOVE
+0929 ; Expands_On_NFD # Lo DEVANAGARI LETTER NNNA
+0931 ; Expands_On_NFD # Lo DEVANAGARI LETTER RRA
+0934 ; Expands_On_NFD # Lo DEVANAGARI LETTER LLLA
+0958..095F ; Expands_On_NFD # Lo [8] DEVANAGARI LETTER QA..DEVANAGARI LETTER YYA
+09CB..09CC ; Expands_On_NFD # Mc [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU
+09DC..09DD ; Expands_On_NFD # Lo [2] BENGALI LETTER RRA..BENGALI LETTER RHA
+09DF ; Expands_On_NFD # Lo BENGALI LETTER YYA
+0A33 ; Expands_On_NFD # Lo GURMUKHI LETTER LLA
+0A36 ; Expands_On_NFD # Lo GURMUKHI LETTER SHA
+0A59..0A5B ; Expands_On_NFD # Lo [3] GURMUKHI LETTER KHHA..GURMUKHI LETTER ZA
+0A5E ; Expands_On_NFD # Lo GURMUKHI LETTER FA
+0B48 ; Expands_On_NFD # Mc ORIYA VOWEL SIGN AI
+0B4B..0B4C ; Expands_On_NFD # Mc [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU
+0B5C..0B5D ; Expands_On_NFD # Lo [2] ORIYA LETTER RRA..ORIYA LETTER RHA
+0B94 ; Expands_On_NFD # Lo TAMIL LETTER AU
+0BCA..0BCC ; Expands_On_NFD # Mc [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU
+0C48 ; Expands_On_NFD # Mn TELUGU VOWEL SIGN AI
+0CC0 ; Expands_On_NFD # Mc KANNADA VOWEL SIGN II
+0CC7..0CC8 ; Expands_On_NFD # Mc [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI
+0CCA..0CCB ; Expands_On_NFD # Mc [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO
+0D4A..0D4C ; Expands_On_NFD # Mc [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU
+0DDA ; Expands_On_NFD # Mc SINHALA VOWEL SIGN DIGA KOMBUVA
+0DDC..0DDE ; Expands_On_NFD # Mc [3] SINHALA VOWEL SIGN KOMBUVA HAA AELA-PILLA..SINHALA VOWEL SIGN KOMBUVA HAA GAYANUKITTA
+0F43 ; Expands_On_NFD # Lo TIBETAN LETTER GHA
+0F4D ; Expands_On_NFD # Lo TIBETAN LETTER DDHA
+0F52 ; Expands_On_NFD # Lo TIBETAN LETTER DHA
+0F57 ; Expands_On_NFD # Lo TIBETAN LETTER BHA
+0F5C ; Expands_On_NFD # Lo TIBETAN LETTER DZHA
+0F69 ; Expands_On_NFD # Lo TIBETAN LETTER KSSA
+0F73 ; Expands_On_NFD # Mn TIBETAN VOWEL SIGN II
+0F75..0F76 ; Expands_On_NFD # Mn [2] TIBETAN VOWEL SIGN UU..TIBETAN VOWEL SIGN VOCALIC R
+0F78 ; Expands_On_NFD # Mn TIBETAN VOWEL SIGN VOCALIC L
+0F81 ; Expands_On_NFD # Mn TIBETAN VOWEL SIGN REVERSED II
+0F93 ; Expands_On_NFD # Mn TIBETAN SUBJOINED LETTER GHA
+0F9D ; Expands_On_NFD # Mn TIBETAN SUBJOINED LETTER DDHA
+0FA2 ; Expands_On_NFD # Mn TIBETAN SUBJOINED LETTER DHA
+0FA7 ; Expands_On_NFD # Mn TIBETAN SUBJOINED LETTER BHA
+0FAC ; Expands_On_NFD # Mn TIBETAN SUBJOINED LETTER DZHA
+0FB9 ; Expands_On_NFD # Mn TIBETAN SUBJOINED LETTER KSSA
+1026 ; Expands_On_NFD # Lo MYANMAR LETTER UU
+1B06 ; Expands_On_NFD # Lo BALINESE LETTER AKARA TEDUNG
+1B08 ; Expands_On_NFD # Lo BALINESE LETTER IKARA TEDUNG
+1B0A ; Expands_On_NFD # Lo BALINESE LETTER UKARA TEDUNG
+1B0C ; Expands_On_NFD # Lo BALINESE LETTER RA REPA TEDUNG
+1B0E ; Expands_On_NFD # Lo BALINESE LETTER LA LENGA TEDUNG
+1B12 ; Expands_On_NFD # Lo BALINESE LETTER OKARA TEDUNG
+1B3B ; Expands_On_NFD # Mc BALINESE VOWEL SIGN RA REPA TEDUNG
+1B3D ; Expands_On_NFD # Mc BALINESE VOWEL SIGN LA LENGA TEDUNG
+1B40..1B41 ; Expands_On_NFD # Mc [2] BALINESE VOWEL SIGN TALING TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG
+1B43 ; Expands_On_NFD # Mc BALINESE VOWEL SIGN PEPET TEDUNG
+1E00..1E99 ; Expands_On_NFD # L& [154] LATIN CAPITAL LETTER A WITH RING BELOW..LATIN SMALL LETTER Y WITH RING ABOVE
+1E9B ; Expands_On_NFD # L& LATIN SMALL LETTER LONG S WITH DOT ABOVE
+1EA0..1EF9 ; Expands_On_NFD # L& [90] LATIN CAPITAL LETTER A WITH DOT BELOW..LATIN SMALL LETTER Y WITH TILDE
+1F00..1F15 ; Expands_On_NFD # L& [22] GREEK SMALL LETTER ALPHA WITH PSILI..GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA
+1F18..1F1D ; Expands_On_NFD # L& [6] GREEK CAPITAL LETTER EPSILON WITH PSILI..GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA
+1F20..1F45 ; Expands_On_NFD # L& [38] GREEK SMALL LETTER ETA WITH PSILI..GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA
+1F48..1F4D ; Expands_On_NFD # L& [6] GREEK CAPITAL LETTER OMICRON WITH PSILI..GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA
+1F50..1F57 ; Expands_On_NFD # L& [8] GREEK SMALL LETTER UPSILON WITH PSILI..GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI
+1F59 ; Expands_On_NFD # L& GREEK CAPITAL LETTER UPSILON WITH DASIA
+1F5B ; Expands_On_NFD # L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA
+1F5D ; Expands_On_NFD # L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA
+1F5F..1F7D ; Expands_On_NFD # L& [31] GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI..GREEK SMALL LETTER OMEGA WITH OXIA
+1F80..1FB4 ; Expands_On_NFD # L& [53] GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI..GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI
+1FB6..1FBC ; Expands_On_NFD # L& [7] GREEK SMALL LETTER ALPHA WITH PERISPOMENI..GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI
+1FC1 ; Expands_On_NFD # Sk GREEK DIALYTIKA AND PERISPOMENI
+1FC2..1FC4 ; Expands_On_NFD # L& [3] GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI
+1FC6..1FCC ; Expands_On_NFD # L& [7] GREEK SMALL LETTER ETA WITH PERISPOMENI..GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI
+1FCD..1FCF ; Expands_On_NFD # Sk [3] GREEK PSILI AND VARIA..GREEK PSILI AND PERISPOMENI
+1FD0..1FD3 ; Expands_On_NFD # L& [4] GREEK SMALL LETTER IOTA WITH VRACHY..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
+1FD6..1FDB ; Expands_On_NFD # L& [6] GREEK SMALL LETTER IOTA WITH PERISPOMENI..GREEK CAPITAL LETTER IOTA WITH OXIA
+1FDD..1FDF ; Expands_On_NFD # Sk [3] GREEK DASIA AND VARIA..GREEK DASIA AND PERISPOMENI
+1FE0..1FEC ; Expands_On_NFD # L& [13] GREEK SMALL LETTER UPSILON WITH VRACHY..GREEK CAPITAL LETTER RHO WITH DASIA
+1FED..1FEE ; Expands_On_NFD # Sk [2] GREEK DIALYTIKA AND VARIA..GREEK DIALYTIKA AND OXIA
+1FF2..1FF4 ; Expands_On_NFD # L& [3] GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI
+1FF6..1FFC ; Expands_On_NFD # L& [7] GREEK SMALL LETTER OMEGA WITH PERISPOMENI..GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI
+212B ; Expands_On_NFD # L& ANGSTROM SIGN
+219A..219B ; Expands_On_NFD # Sm [2] LEFTWARDS ARROW WITH STROKE..RIGHTWARDS ARROW WITH STROKE
+21AE ; Expands_On_NFD # Sm LEFT RIGHT ARROW WITH STROKE
+21CD ; Expands_On_NFD # So LEFTWARDS DOUBLE ARROW WITH STROKE
+21CE..21CF ; Expands_On_NFD # Sm [2] LEFT RIGHT DOUBLE ARROW WITH STROKE..RIGHTWARDS DOUBLE ARROW WITH STROKE
+2204 ; Expands_On_NFD # Sm THERE DOES NOT EXIST
+2209 ; Expands_On_NFD # Sm NOT AN ELEMENT OF
+220C ; Expands_On_NFD # Sm DOES NOT CONTAIN AS MEMBER
+2224 ; Expands_On_NFD # Sm DOES NOT DIVIDE
+2226 ; Expands_On_NFD # Sm NOT PARALLEL TO
+2241 ; Expands_On_NFD # Sm NOT TILDE
+2244 ; Expands_On_NFD # Sm NOT ASYMPTOTICALLY EQUAL TO
+2247 ; Expands_On_NFD # Sm NEITHER APPROXIMATELY NOR ACTUALLY EQUAL TO
+2249 ; Expands_On_NFD # Sm NOT ALMOST EQUAL TO
+2260 ; Expands_On_NFD # Sm NOT EQUAL TO
+2262 ; Expands_On_NFD # Sm NOT IDENTICAL TO
+226D..2271 ; Expands_On_NFD # Sm [5] NOT EQUIVALENT TO..NEITHER GREATER-THAN NOR EQUAL TO
+2274..2275 ; Expands_On_NFD # Sm [2] NEITHER LESS-THAN NOR EQUIVALENT TO..NEITHER GREATER-THAN NOR EQUIVALENT TO
+2278..2279 ; Expands_On_NFD # Sm [2] NEITHER LESS-THAN NOR GREATER-THAN..NEITHER GREATER-THAN NOR LESS-THAN
+2280..2281 ; Expands_On_NFD # Sm [2] DOES NOT PRECEDE..DOES NOT SUCCEED
+2284..2285 ; Expands_On_NFD # Sm [2] NOT A SUBSET OF..NOT A SUPERSET OF
+2288..2289 ; Expands_On_NFD # Sm [2] NEITHER A SUBSET OF NOR EQUAL TO..NEITHER A SUPERSET OF NOR EQUAL TO
+22AC..22AF ; Expands_On_NFD # Sm [4] DOES NOT PROVE..NEGATED DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE
+22E0..22E3 ; Expands_On_NFD # Sm [4] DOES NOT PRECEDE OR EQUAL..NOT SQUARE ORIGINAL OF OR EQUAL TO
+22EA..22ED ; Expands_On_NFD # Sm [4] NOT NORMAL SUBGROUP OF..DOES NOT CONTAIN AS NORMAL SUBGROUP OR EQUAL
+2ADC ; Expands_On_NFD # Sm FORKING
+304C ; Expands_On_NFD # Lo HIRAGANA LETTER GA
+304E ; Expands_On_NFD # Lo HIRAGANA LETTER GI
+3050 ; Expands_On_NFD # Lo HIRAGANA LETTER GU
+3052 ; Expands_On_NFD # Lo HIRAGANA LETTER GE
+3054 ; Expands_On_NFD # Lo HIRAGANA LETTER GO
+3056 ; Expands_On_NFD # Lo HIRAGANA LETTER ZA
+3058 ; Expands_On_NFD # Lo HIRAGANA LETTER ZI
+305A ; Expands_On_NFD # Lo HIRAGANA LETTER ZU
+305C ; Expands_On_NFD # Lo HIRAGANA LETTER ZE
+305E ; Expands_On_NFD # Lo HIRAGANA LETTER ZO
+3060 ; Expands_On_NFD # Lo HIRAGANA LETTER DA
+3062 ; Expands_On_NFD # Lo HIRAGANA LETTER DI
+3065 ; Expands_On_NFD # Lo HIRAGANA LETTER DU
+3067 ; Expands_On_NFD # Lo HIRAGANA LETTER DE
+3069 ; Expands_On_NFD # Lo HIRAGANA LETTER DO
+3070..3071 ; Expands_On_NFD # Lo [2] HIRAGANA LETTER BA..HIRAGANA LETTER PA
+3073..3074 ; Expands_On_NFD # Lo [2] HIRAGANA LETTER BI..HIRAGANA LETTER PI
+3076..3077 ; Expands_On_NFD # Lo [2] HIRAGANA LETTER BU..HIRAGANA LETTER PU
+3079..307A ; Expands_On_NFD # Lo [2] HIRAGANA LETTER BE..HIRAGANA LETTER PE
+307C..307D ; Expands_On_NFD # Lo [2] HIRAGANA LETTER BO..HIRAGANA LETTER PO
+3094 ; Expands_On_NFD # Lo HIRAGANA LETTER VU
+309E ; Expands_On_NFD # Lm HIRAGANA VOICED ITERATION MARK
+30AC ; Expands_On_NFD # Lo KATAKANA LETTER GA
+30AE ; Expands_On_NFD # Lo KATAKANA LETTER GI
+30B0 ; Expands_On_NFD # Lo KATAKANA LETTER GU
+30B2 ; Expands_On_NFD # Lo KATAKANA LETTER GE
+30B4 ; Expands_On_NFD # Lo KATAKANA LETTER GO
+30B6 ; Expands_On_NFD # Lo KATAKANA LETTER ZA
+30B8 ; Expands_On_NFD # Lo KATAKANA LETTER ZI
+30BA ; Expands_On_NFD # Lo KATAKANA LETTER ZU
+30BC ; Expands_On_NFD # Lo KATAKANA LETTER ZE
+30BE ; Expands_On_NFD # Lo KATAKANA LETTER ZO
+30C0 ; Expands_On_NFD # Lo KATAKANA LETTER DA
+30C2 ; Expands_On_NFD # Lo KATAKANA LETTER DI
+30C5 ; Expands_On_NFD # Lo KATAKANA LETTER DU
+30C7 ; Expands_On_NFD # Lo KATAKANA LETTER DE
+30C9 ; Expands_On_NFD # Lo KATAKANA LETTER DO
+30D0..30D1 ; Expands_On_NFD # Lo [2] KATAKANA LETTER BA..KATAKANA LETTER PA
+30D3..30D4 ; Expands_On_NFD # Lo [2] KATAKANA LETTER BI..KATAKANA LETTER PI
+30D6..30D7 ; Expands_On_NFD # Lo [2] KATAKANA LETTER BU..KATAKANA LETTER PU
+30D9..30DA ; Expands_On_NFD # Lo [2] KATAKANA LETTER BE..KATAKANA LETTER PE
+30DC..30DD ; Expands_On_NFD # Lo [2] KATAKANA LETTER BO..KATAKANA LETTER PO
+30F4 ; Expands_On_NFD # Lo KATAKANA LETTER VU
+30F7..30FA ; Expands_On_NFD # Lo [4] KATAKANA LETTER VA..KATAKANA LETTER VO
+30FE ; Expands_On_NFD # Lm KATAKANA VOICED ITERATION MARK
+AC00..D7A3 ; Expands_On_NFD # Lo [11172] HANGUL SYLLABLE GA..HANGUL SYLLABLE HIH
+FB1D ; Expands_On_NFD # Lo HEBREW LETTER YOD WITH HIRIQ
+FB1F ; Expands_On_NFD # Lo HEBREW LIGATURE YIDDISH YOD YOD PATAH
+FB2A..FB36 ; Expands_On_NFD # Lo [13] HEBREW LETTER SHIN WITH SHIN DOT..HEBREW LETTER ZAYIN WITH DAGESH
+FB38..FB3C ; Expands_On_NFD # Lo [5] HEBREW LETTER TET WITH DAGESH..HEBREW LETTER LAMED WITH DAGESH
+FB3E ; Expands_On_NFD # Lo HEBREW LETTER MEM WITH DAGESH
+FB40..FB41 ; Expands_On_NFD # Lo [2] HEBREW LETTER NUN WITH DAGESH..HEBREW LETTER SAMEKH WITH DAGESH
+FB43..FB44 ; Expands_On_NFD # Lo [2] HEBREW LETTER FINAL PE WITH DAGESH..HEBREW LETTER PE WITH DAGESH
+FB46..FB4E ; Expands_On_NFD # Lo [9] HEBREW LETTER TSADI WITH DAGESH..HEBREW LETTER PE WITH RAFE
+1D15E..1D164 ; Expands_On_NFD # So [7] MUSICAL SYMBOL HALF NOTE..MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE
+1D1BB..1D1C0 ; Expands_On_NFD # So [6] MUSICAL SYMBOL MINIMA..MUSICAL SYMBOL FUSA BLACK
+
+# Total code points: 12203
+
+# ================================================
+
+# Derived Property: Expands_On_NFC
+# Generated according to UAX #15.
+# Characters whose normalized length is not one.
+# WARNING: Normalization of STRINGS must use the algorithm in UAX #15 because characters may interact.
+# The length of a normalized string is not necessarily the sum of the lengths of the normalized characters!
+
+0344 ; Expands_On_NFC # Mn COMBINING GREEK DIALYTIKA TONOS
+0958..095F ; Expands_On_NFC # Lo [8] DEVANAGARI LETTER QA..DEVANAGARI LETTER YYA
+09DC..09DD ; Expands_On_NFC # Lo [2] BENGALI LETTER RRA..BENGALI LETTER RHA
+09DF ; Expands_On_NFC # Lo BENGALI LETTER YYA
+0A33 ; Expands_On_NFC # Lo GURMUKHI LETTER LLA
+0A36 ; Expands_On_NFC # Lo GURMUKHI LETTER SHA
+0A59..0A5B ; Expands_On_NFC # Lo [3] GURMUKHI LETTER KHHA..GURMUKHI LETTER ZA
+0A5E ; Expands_On_NFC # Lo GURMUKHI LETTER FA
+0B5C..0B5D ; Expands_On_NFC # Lo [2] ORIYA LETTER RRA..ORIYA LETTER RHA
+0F43 ; Expands_On_NFC # Lo TIBETAN LETTER GHA
+0F4D ; Expands_On_NFC # Lo TIBETAN LETTER DDHA
+0F52 ; Expands_On_NFC # Lo TIBETAN LETTER DHA
+0F57 ; Expands_On_NFC # Lo TIBETAN LETTER BHA
+0F5C ; Expands_On_NFC # Lo TIBETAN LETTER DZHA
+0F69 ; Expands_On_NFC # Lo TIBETAN LETTER KSSA
+0F73 ; Expands_On_NFC # Mn TIBETAN VOWEL SIGN II
+0F75..0F76 ; Expands_On_NFC # Mn [2] TIBETAN VOWEL SIGN UU..TIBETAN VOWEL SIGN VOCALIC R
+0F78 ; Expands_On_NFC # Mn TIBETAN VOWEL SIGN VOCALIC L
+0F81 ; Expands_On_NFC # Mn TIBETAN VOWEL SIGN REVERSED II
+0F93 ; Expands_On_NFC # Mn TIBETAN SUBJOINED LETTER GHA
+0F9D ; Expands_On_NFC # Mn TIBETAN SUBJOINED LETTER DDHA
+0FA2 ; Expands_On_NFC # Mn TIBETAN SUBJOINED LETTER DHA
+0FA7 ; Expands_On_NFC # Mn TIBETAN SUBJOINED LETTER BHA
+0FAC ; Expands_On_NFC # Mn TIBETAN SUBJOINED LETTER DZHA
+0FB9 ; Expands_On_NFC # Mn TIBETAN SUBJOINED LETTER KSSA
+2ADC ; Expands_On_NFC # Sm FORKING
+FB1D ; Expands_On_NFC # Lo HEBREW LETTER YOD WITH HIRIQ
+FB1F ; Expands_On_NFC # Lo HEBREW LIGATURE YIDDISH YOD YOD PATAH
+FB2A..FB36 ; Expands_On_NFC # Lo [13] HEBREW LETTER SHIN WITH SHIN DOT..HEBREW LETTER ZAYIN WITH DAGESH
+FB38..FB3C ; Expands_On_NFC # Lo [5] HEBREW LETTER TET WITH DAGESH..HEBREW LETTER LAMED WITH DAGESH
+FB3E ; Expands_On_NFC # Lo HEBREW LETTER MEM WITH DAGESH
+FB40..FB41 ; Expands_On_NFC # Lo [2] HEBREW LETTER NUN WITH DAGESH..HEBREW LETTER SAMEKH WITH DAGESH
+FB43..FB44 ; Expands_On_NFC # Lo [2] HEBREW LETTER FINAL PE WITH DAGESH..HEBREW LETTER PE WITH DAGESH
+FB46..FB4E ; Expands_On_NFC # Lo [9] HEBREW LETTER TSADI WITH DAGESH..HEBREW LETTER PE WITH RAFE
+1D15E..1D164 ; Expands_On_NFC # So [7] MUSICAL SYMBOL HALF NOTE..MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE
+1D1BB..1D1C0 ; Expands_On_NFC # So [6] MUSICAL SYMBOL MINIMA..MUSICAL SYMBOL FUSA BLACK
+
+# Total code points: 85
+
+# ================================================
+
+# Derived Property: Expands_On_NFKD
+# Generated according to UAX #15.
+# Characters whose normalized length is not one.
+# WARNING: Normalization of STRINGS must use the algorithm in UAX #15 because characters may interact.
+# The length of a normalized string is not necessarily the sum of the lengths of the normalized characters!
+
+00A8 ; Expands_On_NFKD # Sk DIAERESIS
+00AF ; Expands_On_NFKD # Sk MACRON
+00B4 ; Expands_On_NFKD # Sk ACUTE ACCENT
+00B8 ; Expands_On_NFKD # Sk CEDILLA
+00BC..00BE ; Expands_On_NFKD # No [3] VULGAR FRACTION ONE QUARTER..VULGAR FRACTION THREE QUARTERS
+00C0..00C5 ; Expands_On_NFKD # L& [6] LATIN CAPITAL LETTER A WITH GRAVE..LATIN CAPITAL LETTER A WITH RING ABOVE
+00C7..00CF ; Expands_On_NFKD # L& [9] LATIN CAPITAL LETTER C WITH CEDILLA..LATIN CAPITAL LETTER I WITH DIAERESIS
+00D1..00D6 ; Expands_On_NFKD # L& [6] LATIN CAPITAL LETTER N WITH TILDE..LATIN CAPITAL LETTER O WITH DIAERESIS
+00D9..00DD ; Expands_On_NFKD # L& [5] LATIN CAPITAL LETTER U WITH GRAVE..LATIN CAPITAL LETTER Y WITH ACUTE
+00E0..00E5 ; Expands_On_NFKD # L& [6] LATIN SMALL LETTER A WITH GRAVE..LATIN SMALL LETTER A WITH RING ABOVE
+00E7..00EF ; Expands_On_NFKD # L& [9] LATIN SMALL LETTER C WITH CEDILLA..LATIN SMALL LETTER I WITH DIAERESIS
+00F1..00F6 ; Expands_On_NFKD # L& [6] LATIN SMALL LETTER N WITH TILDE..LATIN SMALL LETTER O WITH DIAERESIS
+00F9..00FD ; Expands_On_NFKD # L& [5] LATIN SMALL LETTER U WITH GRAVE..LATIN SMALL LETTER Y WITH ACUTE
+00FF..010F ; Expands_On_NFKD # L& [17] LATIN SMALL LETTER Y WITH DIAERESIS..LATIN SMALL LETTER D WITH CARON
+0112..0125 ; Expands_On_NFKD # L& [20] LATIN CAPITAL LETTER E WITH MACRON..LATIN SMALL LETTER H WITH CIRCUMFLEX
+0128..0130 ; Expands_On_NFKD # L& [9] LATIN CAPITAL LETTER I WITH TILDE..LATIN CAPITAL LETTER I WITH DOT ABOVE
+0132..0137 ; Expands_On_NFKD # L& [6] LATIN CAPITAL LIGATURE IJ..LATIN SMALL LETTER K WITH CEDILLA
+0139..0140 ; Expands_On_NFKD # L& [8] LATIN CAPITAL LETTER L WITH ACUTE..LATIN SMALL LETTER L WITH MIDDLE DOT
+0143..0149 ; Expands_On_NFKD # L& [7] LATIN CAPITAL LETTER N WITH ACUTE..LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
+014C..0151 ; Expands_On_NFKD # L& [6] LATIN CAPITAL LETTER O WITH MACRON..LATIN SMALL LETTER O WITH DOUBLE ACUTE
+0154..0165 ; Expands_On_NFKD # L& [18] LATIN CAPITAL LETTER R WITH ACUTE..LATIN SMALL LETTER T WITH CARON
+0168..017E ; Expands_On_NFKD # L& [23] LATIN CAPITAL LETTER U WITH TILDE..LATIN SMALL LETTER Z WITH CARON
+01A0..01A1 ; Expands_On_NFKD # L& [2] LATIN CAPITAL LETTER O WITH HORN..LATIN SMALL LETTER O WITH HORN
+01AF..01B0 ; Expands_On_NFKD # L& [2] LATIN CAPITAL LETTER U WITH HORN..LATIN SMALL LETTER U WITH HORN
+01C4..01DC ; Expands_On_NFKD # L& [25] LATIN CAPITAL LETTER DZ WITH CARON..LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE
+01DE..01E3 ; Expands_On_NFKD # L& [6] LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON..LATIN SMALL LETTER AE WITH MACRON
+01E6..01F5 ; Expands_On_NFKD # L& [16] LATIN CAPITAL LETTER G WITH CARON..LATIN SMALL LETTER G WITH ACUTE
+01F8..021B ; Expands_On_NFKD # L& [36] LATIN CAPITAL LETTER N WITH GRAVE..LATIN SMALL LETTER T WITH COMMA BELOW
+021E..021F ; Expands_On_NFKD # L& [2] LATIN CAPITAL LETTER H WITH CARON..LATIN SMALL LETTER H WITH CARON
+0226..0233 ; Expands_On_NFKD # L& [14] LATIN CAPITAL LETTER A WITH DOT ABOVE..LATIN SMALL LETTER Y WITH MACRON
+02D8..02DD ; Expands_On_NFKD # Sk [6] BREVE..DOUBLE ACUTE ACCENT
+0344 ; Expands_On_NFKD # Mn COMBINING GREEK DIALYTIKA TONOS
+037A ; Expands_On_NFKD # Lm GREEK YPOGEGRAMMENI
+0384..0385 ; Expands_On_NFKD # Sk [2] GREEK TONOS..GREEK DIALYTIKA TONOS
+0386 ; Expands_On_NFKD # L& GREEK CAPITAL LETTER ALPHA WITH TONOS
+0388..038A ; Expands_On_NFKD # L& [3] GREEK CAPITAL LETTER EPSILON WITH TONOS..GREEK CAPITAL LETTER IOTA WITH TONOS
+038C ; Expands_On_NFKD # L& GREEK CAPITAL LETTER OMICRON WITH TONOS
+038E..0390 ; Expands_On_NFKD # L& [3] GREEK CAPITAL LETTER UPSILON WITH TONOS..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
+03AA..03B0 ; Expands_On_NFKD # L& [7] GREEK CAPITAL LETTER IOTA WITH DIALYTIKA..GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS
+03CA..03CE ; Expands_On_NFKD # L& [5] GREEK SMALL LETTER IOTA WITH DIALYTIKA..GREEK SMALL LETTER OMEGA WITH TONOS
+03D3..03D4 ; Expands_On_NFKD # L& [2] GREEK UPSILON WITH ACUTE AND HOOK SYMBOL..GREEK UPSILON WITH DIAERESIS AND HOOK SYMBOL
+0400..0401 ; Expands_On_NFKD # L& [2] CYRILLIC CAPITAL LETTER IE WITH GRAVE..CYRILLIC CAPITAL LETTER IO
+0403 ; Expands_On_NFKD # L& CYRILLIC CAPITAL LETTER GJE
+0407 ; Expands_On_NFKD # L& CYRILLIC CAPITAL LETTER YI
+040C..040E ; Expands_On_NFKD # L& [3] CYRILLIC CAPITAL LETTER KJE..CYRILLIC CAPITAL LETTER SHORT U
+0419 ; Expands_On_NFKD # L& CYRILLIC CAPITAL LETTER SHORT I
+0439 ; Expands_On_NFKD # L& CYRILLIC SMALL LETTER SHORT I
+0450..0451 ; Expands_On_NFKD # L& [2] CYRILLIC SMALL LETTER IE WITH GRAVE..CYRILLIC SMALL LETTER IO
+0453 ; Expands_On_NFKD # L& CYRILLIC SMALL LETTER GJE
+0457 ; Expands_On_NFKD # L& CYRILLIC SMALL LETTER YI
+045C..045E ; Expands_On_NFKD # L& [3] CYRILLIC SMALL LETTER KJE..CYRILLIC SMALL LETTER SHORT U
+0476..0477 ; Expands_On_NFKD # L& [2] CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT..CYRILLIC SMALL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT
+04C1..04C2 ; Expands_On_NFKD # L& [2] CYRILLIC CAPITAL LETTER ZHE WITH BREVE..CYRILLIC SMALL LETTER ZHE WITH BREVE
+04D0..04D3 ; Expands_On_NFKD # L& [4] CYRILLIC CAPITAL LETTER A WITH BREVE..CYRILLIC SMALL LETTER A WITH DIAERESIS
+04D6..04D7 ; Expands_On_NFKD # L& [2] CYRILLIC CAPITAL LETTER IE WITH BREVE..CYRILLIC SMALL LETTER IE WITH BREVE
+04DA..04DF ; Expands_On_NFKD # L& [6] CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS..CYRILLIC SMALL LETTER ZE WITH DIAERESIS
+04E2..04E7 ; Expands_On_NFKD # L& [6] CYRILLIC CAPITAL LETTER I WITH MACRON..CYRILLIC SMALL LETTER O WITH DIAERESIS
+04EA..04F5 ; Expands_On_NFKD # L& [12] CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS..CYRILLIC SMALL LETTER CHE WITH DIAERESIS
+04F8..04F9 ; Expands_On_NFKD # L& [2] CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS..CYRILLIC SMALL LETTER YERU WITH DIAERESIS
+0587 ; Expands_On_NFKD # L& ARMENIAN SMALL LIGATURE ECH YIWN
+0622..0626 ; Expands_On_NFKD # Lo [5] ARABIC LETTER ALEF WITH MADDA ABOVE..ARABIC LETTER YEH WITH HAMZA ABOVE
+0675..0678 ; Expands_On_NFKD # Lo [4] ARABIC LETTER HIGH HAMZA ALEF..ARABIC LETTER HIGH HAMZA YEH
+06C0 ; Expands_On_NFKD # Lo ARABIC LETTER HEH WITH YEH ABOVE
+06C2 ; Expands_On_NFKD # Lo ARABIC LETTER HEH GOAL WITH HAMZA ABOVE
+06D3 ; Expands_On_NFKD # Lo ARABIC LETTER YEH BARREE WITH HAMZA ABOVE
+0929 ; Expands_On_NFKD # Lo DEVANAGARI LETTER NNNA
+0931 ; Expands_On_NFKD # Lo DEVANAGARI LETTER RRA
+0934 ; Expands_On_NFKD # Lo DEVANAGARI LETTER LLLA
+0958..095F ; Expands_On_NFKD # Lo [8] DEVANAGARI LETTER QA..DEVANAGARI LETTER YYA
+09CB..09CC ; Expands_On_NFKD # Mc [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU
+09DC..09DD ; Expands_On_NFKD # Lo [2] BENGALI LETTER RRA..BENGALI LETTER RHA
+09DF ; Expands_On_NFKD # Lo BENGALI LETTER YYA
+0A33 ; Expands_On_NFKD # Lo GURMUKHI LETTER LLA
+0A36 ; Expands_On_NFKD # Lo GURMUKHI LETTER SHA
+0A59..0A5B ; Expands_On_NFKD # Lo [3] GURMUKHI LETTER KHHA..GURMUKHI LETTER ZA
+0A5E ; Expands_On_NFKD # Lo GURMUKHI LETTER FA
+0B48 ; Expands_On_NFKD # Mc ORIYA VOWEL SIGN AI
+0B4B..0B4C ; Expands_On_NFKD # Mc [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU
+0B5C..0B5D ; Expands_On_NFKD # Lo [2] ORIYA LETTER RRA..ORIYA LETTER RHA
+0B94 ; Expands_On_NFKD # Lo TAMIL LETTER AU
+0BCA..0BCC ; Expands_On_NFKD # Mc [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU
+0C48 ; Expands_On_NFKD # Mn TELUGU VOWEL SIGN AI
+0CC0 ; Expands_On_NFKD # Mc KANNADA VOWEL SIGN II
+0CC7..0CC8 ; Expands_On_NFKD # Mc [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI
+0CCA..0CCB ; Expands_On_NFKD # Mc [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO
+0D4A..0D4C ; Expands_On_NFKD # Mc [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU
+0DDA ; Expands_On_NFKD # Mc SINHALA VOWEL SIGN DIGA KOMBUVA
+0DDC..0DDE ; Expands_On_NFKD # Mc [3] SINHALA VOWEL SIGN KOMBUVA HAA AELA-PILLA..SINHALA VOWEL SIGN KOMBUVA HAA GAYANUKITTA
+0E33 ; Expands_On_NFKD # Lo THAI CHARACTER SARA AM
+0EB3 ; Expands_On_NFKD # Lo LAO VOWEL SIGN AM
+0EDC..0EDD ; Expands_On_NFKD # Lo [2] LAO HO NO..LAO HO MO
+0F43 ; Expands_On_NFKD # Lo TIBETAN LETTER GHA
+0F4D ; Expands_On_NFKD # Lo TIBETAN LETTER DDHA
+0F52 ; Expands_On_NFKD # Lo TIBETAN LETTER DHA
+0F57 ; Expands_On_NFKD # Lo TIBETAN LETTER BHA
+0F5C ; Expands_On_NFKD # Lo TIBETAN LETTER DZHA
+0F69 ; Expands_On_NFKD # Lo TIBETAN LETTER KSSA
+0F73 ; Expands_On_NFKD # Mn TIBETAN VOWEL SIGN II
+0F75..0F79 ; Expands_On_NFKD # Mn [5] TIBETAN VOWEL SIGN UU..TIBETAN VOWEL SIGN VOCALIC LL
+0F81 ; Expands_On_NFKD # Mn TIBETAN VOWEL SIGN REVERSED II
+0F93 ; Expands_On_NFKD # Mn TIBETAN SUBJOINED LETTER GHA
+0F9D ; Expands_On_NFKD # Mn TIBETAN SUBJOINED LETTER DDHA
+0FA2 ; Expands_On_NFKD # Mn TIBETAN SUBJOINED LETTER DHA
+0FA7 ; Expands_On_NFKD # Mn TIBETAN SUBJOINED LETTER BHA
+0FAC ; Expands_On_NFKD # Mn TIBETAN SUBJOINED LETTER DZHA
+0FB9 ; Expands_On_NFKD # Mn TIBETAN SUBJOINED LETTER KSSA
+1026 ; Expands_On_NFKD # Lo MYANMAR LETTER UU
+1B06 ; Expands_On_NFKD # Lo BALINESE LETTER AKARA TEDUNG
+1B08 ; Expands_On_NFKD # Lo BALINESE LETTER IKARA TEDUNG
+1B0A ; Expands_On_NFKD # Lo BALINESE LETTER UKARA TEDUNG
+1B0C ; Expands_On_NFKD # Lo BALINESE LETTER RA REPA TEDUNG
+1B0E ; Expands_On_NFKD # Lo BALINESE LETTER LA LENGA TEDUNG
+1B12 ; Expands_On_NFKD # Lo BALINESE LETTER OKARA TEDUNG
+1B3B ; Expands_On_NFKD # Mc BALINESE VOWEL SIGN RA REPA TEDUNG
+1B3D ; Expands_On_NFKD # Mc BALINESE VOWEL SIGN LA LENGA TEDUNG
+1B40..1B41 ; Expands_On_NFKD # Mc [2] BALINESE VOWEL SIGN TALING TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG
+1B43 ; Expands_On_NFKD # Mc BALINESE VOWEL SIGN PEPET TEDUNG
+1E00..1E9B ; Expands_On_NFKD # L& [156] LATIN CAPITAL LETTER A WITH RING BELOW..LATIN SMALL LETTER LONG S WITH DOT ABOVE
+1EA0..1EF9 ; Expands_On_NFKD # L& [90] LATIN CAPITAL LETTER A WITH DOT BELOW..LATIN SMALL LETTER Y WITH TILDE
+1F00..1F15 ; Expands_On_NFKD # L& [22] GREEK SMALL LETTER ALPHA WITH PSILI..GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA
+1F18..1F1D ; Expands_On_NFKD # L& [6] GREEK CAPITAL LETTER EPSILON WITH PSILI..GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA
+1F20..1F45 ; Expands_On_NFKD # L& [38] GREEK SMALL LETTER ETA WITH PSILI..GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA
+1F48..1F4D ; Expands_On_NFKD # L& [6] GREEK CAPITAL LETTER OMICRON WITH PSILI..GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA
+1F50..1F57 ; Expands_On_NFKD # L& [8] GREEK SMALL LETTER UPSILON WITH PSILI..GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI
+1F59 ; Expands_On_NFKD # L& GREEK CAPITAL LETTER UPSILON WITH DASIA
+1F5B ; Expands_On_NFKD # L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA
+1F5D ; Expands_On_NFKD # L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA
+1F5F..1F7D ; Expands_On_NFKD # L& [31] GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI..GREEK SMALL LETTER OMEGA WITH OXIA
+1F80..1FB4 ; Expands_On_NFKD # L& [53] GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI..GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI
+1FB6..1FBC ; Expands_On_NFKD # L& [7] GREEK SMALL LETTER ALPHA WITH PERISPOMENI..GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI
+1FBD ; Expands_On_NFKD # Sk GREEK KORONIS
+1FBF..1FC1 ; Expands_On_NFKD # Sk [3] GREEK PSILI..GREEK DIALYTIKA AND PERISPOMENI
+1FC2..1FC4 ; Expands_On_NFKD # L& [3] GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI
+1FC6..1FCC ; Expands_On_NFKD # L& [7] GREEK SMALL LETTER ETA WITH PERISPOMENI..GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI
+1FCD..1FCF ; Expands_On_NFKD # Sk [3] GREEK PSILI AND VARIA..GREEK PSILI AND PERISPOMENI
+1FD0..1FD3 ; Expands_On_NFKD # L& [4] GREEK SMALL LETTER IOTA WITH VRACHY..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
+1FD6..1FDB ; Expands_On_NFKD # L& [6] GREEK SMALL LETTER IOTA WITH PERISPOMENI..GREEK CAPITAL LETTER IOTA WITH OXIA
+1FDD..1FDF ; Expands_On_NFKD # Sk [3] GREEK DASIA AND VARIA..GREEK DASIA AND PERISPOMENI
+1FE0..1FEC ; Expands_On_NFKD # L& [13] GREEK SMALL LETTER UPSILON WITH VRACHY..GREEK CAPITAL LETTER RHO WITH DASIA
+1FED..1FEE ; Expands_On_NFKD # Sk [2] GREEK DIALYTIKA AND VARIA..GREEK DIALYTIKA AND OXIA
+1FF2..1FF4 ; Expands_On_NFKD # L& [3] GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI
+1FF6..1FFC ; Expands_On_NFKD # L& [7] GREEK SMALL LETTER OMEGA WITH PERISPOMENI..GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI
+1FFD..1FFE ; Expands_On_NFKD # Sk [2] GREEK OXIA..GREEK DASIA
+2017 ; Expands_On_NFKD # Po DOUBLE LOW LINE
+2025..2026 ; Expands_On_NFKD # Po [2] TWO DOT LEADER..HORIZONTAL ELLIPSIS
+2033..2034 ; Expands_On_NFKD # Po [2] DOUBLE PRIME..TRIPLE PRIME
+2036..2037 ; Expands_On_NFKD # Po [2] REVERSED DOUBLE PRIME..REVERSED TRIPLE PRIME
+203C ; Expands_On_NFKD # Po DOUBLE EXCLAMATION MARK
+203E ; Expands_On_NFKD # Po OVERLINE
+2047..2049 ; Expands_On_NFKD # Po [3] DOUBLE QUESTION MARK..EXCLAMATION QUESTION MARK
+2057 ; Expands_On_NFKD # Po QUADRUPLE PRIME
+20A8 ; Expands_On_NFKD # Sc RUPEE SIGN
+2100..2101 ; Expands_On_NFKD # So [2] ACCOUNT OF..ADDRESSED TO THE SUBJECT
+2103 ; Expands_On_NFKD # So DEGREE CELSIUS
+2105..2106 ; Expands_On_NFKD # So [2] CARE OF..CADA UNA
+2109 ; Expands_On_NFKD # So DEGREE FAHRENHEIT
+2116 ; Expands_On_NFKD # So NUMERO SIGN
+2120..2122 ; Expands_On_NFKD # So [3] SERVICE MARK..TRADE MARK SIGN
+212B ; Expands_On_NFKD # L& ANGSTROM SIGN
+213B ; Expands_On_NFKD # So FACSIMILE SIGN
+2153..215F ; Expands_On_NFKD # No [13] VULGAR FRACTION ONE THIRD..FRACTION NUMERATOR ONE
+2161..2163 ; Expands_On_NFKD # Nl [3] ROMAN NUMERAL TWO..ROMAN NUMERAL FOUR
+2165..2168 ; Expands_On_NFKD # Nl [4] ROMAN NUMERAL SIX..ROMAN NUMERAL NINE
+216A..216B ; Expands_On_NFKD # Nl [2] ROMAN NUMERAL ELEVEN..ROMAN NUMERAL TWELVE
+2171..2173 ; Expands_On_NFKD # Nl [3] SMALL ROMAN NUMERAL TWO..SMALL ROMAN NUMERAL FOUR
+2175..2178 ; Expands_On_NFKD # Nl [4] SMALL ROMAN NUMERAL SIX..SMALL ROMAN NUMERAL NINE
+217A..217B ; Expands_On_NFKD # Nl [2] SMALL ROMAN NUMERAL ELEVEN..SMALL ROMAN NUMERAL TWELVE
+219A..219B ; Expands_On_NFKD # Sm [2] LEFTWARDS ARROW WITH STROKE..RIGHTWARDS ARROW WITH STROKE
+21AE ; Expands_On_NFKD # Sm LEFT RIGHT ARROW WITH STROKE
+21CD ; Expands_On_NFKD # So LEFTWARDS DOUBLE ARROW WITH STROKE
+21CE..21CF ; Expands_On_NFKD # Sm [2] LEFT RIGHT DOUBLE ARROW WITH STROKE..RIGHTWARDS DOUBLE ARROW WITH STROKE
+2204 ; Expands_On_NFKD # Sm THERE DOES NOT EXIST
+2209 ; Expands_On_NFKD # Sm NOT AN ELEMENT OF
+220C ; Expands_On_NFKD # Sm DOES NOT CONTAIN AS MEMBER
+2224 ; Expands_On_NFKD # Sm DOES NOT DIVIDE
+2226 ; Expands_On_NFKD # Sm NOT PARALLEL TO
+222C..222D ; Expands_On_NFKD # Sm [2] DOUBLE INTEGRAL..TRIPLE INTEGRAL
+222F..2230 ; Expands_On_NFKD # Sm [2] SURFACE INTEGRAL..VOLUME INTEGRAL
+2241 ; Expands_On_NFKD # Sm NOT TILDE
+2244 ; Expands_On_NFKD # Sm NOT ASYMPTOTICALLY EQUAL TO
+2247 ; Expands_On_NFKD # Sm NEITHER APPROXIMATELY NOR ACTUALLY EQUAL TO
+2249 ; Expands_On_NFKD # Sm NOT ALMOST EQUAL TO
+2260 ; Expands_On_NFKD # Sm NOT EQUAL TO
+2262 ; Expands_On_NFKD # Sm NOT IDENTICAL TO
+226D..2271 ; Expands_On_NFKD # Sm [5] NOT EQUIVALENT TO..NEITHER GREATER-THAN NOR EQUAL TO
+2274..2275 ; Expands_On_NFKD # Sm [2] NEITHER LESS-THAN NOR EQUIVALENT TO..NEITHER GREATER-THAN NOR EQUIVALENT TO
+2278..2279 ; Expands_On_NFKD # Sm [2] NEITHER LESS-THAN NOR GREATER-THAN..NEITHER GREATER-THAN NOR LESS-THAN
+2280..2281 ; Expands_On_NFKD # Sm [2] DOES NOT PRECEDE..DOES NOT SUCCEED
+2284..2285 ; Expands_On_NFKD # Sm [2] NOT A SUBSET OF..NOT A SUPERSET OF
+2288..2289 ; Expands_On_NFKD # Sm [2] NEITHER A SUBSET OF NOR EQUAL TO..NEITHER A SUPERSET OF NOR EQUAL TO
+22AC..22AF ; Expands_On_NFKD # Sm [4] DOES NOT PROVE..NEGATED DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE
+22E0..22E3 ; Expands_On_NFKD # Sm [4] DOES NOT PRECEDE OR EQUAL..NOT SQUARE ORIGINAL OF OR EQUAL TO
+22EA..22ED ; Expands_On_NFKD # Sm [4] NOT NORMAL SUBGROUP OF..DOES NOT CONTAIN AS NORMAL SUBGROUP OR EQUAL
+2469..249B ; Expands_On_NFKD # No [51] CIRCLED NUMBER TEN..NUMBER TWENTY FULL STOP
+249C..24B5 ; Expands_On_NFKD # So [26] PARENTHESIZED LATIN SMALL LETTER A..PARENTHESIZED LATIN SMALL LETTER Z
+2A0C ; Expands_On_NFKD # Sm QUADRUPLE INTEGRAL OPERATOR
+2A74..2A76 ; Expands_On_NFKD # Sm [3] DOUBLE COLON EQUAL..THREE CONSECUTIVE EQUALS SIGNS
+2ADC ; Expands_On_NFKD # Sm FORKING
+304C ; Expands_On_NFKD # Lo HIRAGANA LETTER GA
+304E ; Expands_On_NFKD # Lo HIRAGANA LETTER GI
+3050 ; Expands_On_NFKD # Lo HIRAGANA LETTER GU
+3052 ; Expands_On_NFKD # Lo HIRAGANA LETTER GE
+3054 ; Expands_On_NFKD # Lo HIRAGANA LETTER GO
+3056 ; Expands_On_NFKD # Lo HIRAGANA LETTER ZA
+3058 ; Expands_On_NFKD # Lo HIRAGANA LETTER ZI
+305A ; Expands_On_NFKD # Lo HIRAGANA LETTER ZU
+305C ; Expands_On_NFKD # Lo HIRAGANA LETTER ZE
+305E ; Expands_On_NFKD # Lo HIRAGANA LETTER ZO
+3060 ; Expands_On_NFKD # Lo HIRAGANA LETTER DA
+3062 ; Expands_On_NFKD # Lo HIRAGANA LETTER DI
+3065 ; Expands_On_NFKD # Lo HIRAGANA LETTER DU
+3067 ; Expands_On_NFKD # Lo HIRAGANA LETTER DE
+3069 ; Expands_On_NFKD # Lo HIRAGANA LETTER DO
+3070..3071 ; Expands_On_NFKD # Lo [2] HIRAGANA LETTER BA..HIRAGANA LETTER PA
+3073..3074 ; Expands_On_NFKD # Lo [2] HIRAGANA LETTER BI..HIRAGANA LETTER PI
+3076..3077 ; Expands_On_NFKD # Lo [2] HIRAGANA LETTER BU..HIRAGANA LETTER PU
+3079..307A ; Expands_On_NFKD # Lo [2] HIRAGANA LETTER BE..HIRAGANA LETTER PE
+307C..307D ; Expands_On_NFKD # Lo [2] HIRAGANA LETTER BO..HIRAGANA LETTER PO
+3094 ; Expands_On_NFKD # Lo HIRAGANA LETTER VU
+309B..309C ; Expands_On_NFKD # Sk [2] KATAKANA-HIRAGANA VOICED SOUND MARK..KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+309E ; Expands_On_NFKD # Lm HIRAGANA VOICED ITERATION MARK
+309F ; Expands_On_NFKD # Lo HIRAGANA DIGRAPH YORI
+30AC ; Expands_On_NFKD # Lo KATAKANA LETTER GA
+30AE ; Expands_On_NFKD # Lo KATAKANA LETTER GI
+30B0 ; Expands_On_NFKD # Lo KATAKANA LETTER GU
+30B2 ; Expands_On_NFKD # Lo KATAKANA LETTER GE
+30B4 ; Expands_On_NFKD # Lo KATAKANA LETTER GO
+30B6 ; Expands_On_NFKD # Lo KATAKANA LETTER ZA
+30B8 ; Expands_On_NFKD # Lo KATAKANA LETTER ZI
+30BA ; Expands_On_NFKD # Lo KATAKANA LETTER ZU
+30BC ; Expands_On_NFKD # Lo KATAKANA LETTER ZE
+30BE ; Expands_On_NFKD # Lo KATAKANA LETTER ZO
+30C0 ; Expands_On_NFKD # Lo KATAKANA LETTER DA
+30C2 ; Expands_On_NFKD # Lo KATAKANA LETTER DI
+30C5 ; Expands_On_NFKD # Lo KATAKANA LETTER DU
+30C7 ; Expands_On_NFKD # Lo KATAKANA LETTER DE
+30C9 ; Expands_On_NFKD # Lo KATAKANA LETTER DO
+30D0..30D1 ; Expands_On_NFKD # Lo [2] KATAKANA LETTER BA..KATAKANA LETTER PA
+30D3..30D4 ; Expands_On_NFKD # Lo [2] KATAKANA LETTER BI..KATAKANA LETTER PI
+30D6..30D7 ; Expands_On_NFKD # Lo [2] KATAKANA LETTER BU..KATAKANA LETTER PU
+30D9..30DA ; Expands_On_NFKD # Lo [2] KATAKANA LETTER BE..KATAKANA LETTER PE
+30DC..30DD ; Expands_On_NFKD # Lo [2] KATAKANA LETTER BO..KATAKANA LETTER PO
+30F4 ; Expands_On_NFKD # Lo KATAKANA LETTER VU
+30F7..30FA ; Expands_On_NFKD # Lo [4] KATAKANA LETTER VA..KATAKANA LETTER VO
+30FE ; Expands_On_NFKD # Lm KATAKANA VOICED ITERATION MARK
+30FF ; Expands_On_NFKD # Lo KATAKANA DIGRAPH KOTO
+3200..321E ; Expands_On_NFKD # So [31] PARENTHESIZED HANGUL KIYEOK..PARENTHESIZED KOREAN CHARACTER O HU
+3220..3229 ; Expands_On_NFKD # No [10] PARENTHESIZED IDEOGRAPH ONE..PARENTHESIZED IDEOGRAPH TEN
+322A..3243 ; Expands_On_NFKD # So [26] PARENTHESIZED IDEOGRAPH MOON..PARENTHESIZED IDEOGRAPH REACH
+3250 ; Expands_On_NFKD # So PARTNERSHIP SIGN
+3251..325F ; Expands_On_NFKD # No [15] CIRCLED NUMBER TWENTY ONE..CIRCLED NUMBER THIRTY FIVE
+326E..327E ; Expands_On_NFKD # So [17] CIRCLED HANGUL KIYEOK A..CIRCLED HANGUL IEUNG U
+32B1..32BF ; Expands_On_NFKD # No [15] CIRCLED NUMBER THIRTY SIX..CIRCLED NUMBER FIFTY
+32C0..32CF ; Expands_On_NFKD # So [16] IDEOGRAPHIC TELEGRAPH SYMBOL FOR JANUARY..LIMITED LIABILITY SIGN
+3300..33FF ; Expands_On_NFKD # So [256] SQUARE APAATO..SQUARE GAL
+AC00..D7A3 ; Expands_On_NFKD # Lo [11172] HANGUL SYLLABLE GA..HANGUL SYLLABLE HIH
+FB00..FB06 ; Expands_On_NFKD # L& [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST
+FB13..FB17 ; Expands_On_NFKD # L& [5] ARMENIAN SMALL LIGATURE MEN NOW..ARMENIAN SMALL LIGATURE MEN XEH
+FB1D ; Expands_On_NFKD # Lo HEBREW LETTER YOD WITH HIRIQ
+FB1F ; Expands_On_NFKD # Lo HEBREW LIGATURE YIDDISH YOD YOD PATAH
+FB2A..FB36 ; Expands_On_NFKD # Lo [13] HEBREW LETTER SHIN WITH SHIN DOT..HEBREW LETTER ZAYIN WITH DAGESH
+FB38..FB3C ; Expands_On_NFKD # Lo [5] HEBREW LETTER TET WITH DAGESH..HEBREW LETTER LAMED WITH DAGESH
+FB3E ; Expands_On_NFKD # Lo HEBREW LETTER MEM WITH DAGESH
+FB40..FB41 ; Expands_On_NFKD # Lo [2] HEBREW LETTER NUN WITH DAGESH..HEBREW LETTER SAMEKH WITH DAGESH
+FB43..FB44 ; Expands_On_NFKD # Lo [2] HEBREW LETTER FINAL PE WITH DAGESH..HEBREW LETTER PE WITH DAGESH
+FB46..FB4F ; Expands_On_NFKD # Lo [10] HEBREW LETTER TSADI WITH DAGESH..HEBREW LIGATURE ALEF LAMED
+FBA4..FBA5 ; Expands_On_NFKD # Lo [2] ARABIC LETTER HEH WITH YEH ABOVE ISOLATED FORM..ARABIC LETTER HEH WITH YEH ABOVE FINAL FORM
+FBB0..FBB1 ; Expands_On_NFKD # Lo [2] ARABIC LETTER YEH BARREE WITH HAMZA ABOVE ISOLATED FORM..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM
+FBDD ; Expands_On_NFKD # Lo ARABIC LETTER U WITH HAMZA ABOVE ISOLATED FORM
+FBEA..FBFB ; Expands_On_NFKD # Lo [18] ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM..ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA INITIAL FORM
+FC00..FD3D ; Expands_On_NFKD # Lo [318] ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH JEEM ISOLATED FORM..ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM
+FD50..FD8F ; Expands_On_NFKD # Lo [64] ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM..ARABIC LIGATURE MEEM WITH KHAH WITH MEEM INITIAL FORM
+FD92..FDC7 ; Expands_On_NFKD # Lo [54] ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INITIAL FORM..ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM
+FDF0..FDFB ; Expands_On_NFKD # Lo [12] ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM..ARABIC LIGATURE JALLAJALALOUHOU
+FDFC ; Expands_On_NFKD # Sc RIAL SIGN
+FE19 ; Expands_On_NFKD # Po PRESENTATION FORM FOR VERTICAL HORIZONTAL ELLIPSIS
+FE30 ; Expands_On_NFKD # Po PRESENTATION FORM FOR VERTICAL TWO DOT LEADER
+FE49..FE4C ; Expands_On_NFKD # Po [4] DASHED OVERLINE..DOUBLE WAVY OVERLINE
+FE70..FE72 ; Expands_On_NFKD # Lo [3] ARABIC FATHATAN ISOLATED FORM..ARABIC DAMMATAN ISOLATED FORM
+FE74 ; Expands_On_NFKD # Lo ARABIC KASRATAN ISOLATED FORM
+FE76..FE7F ; Expands_On_NFKD # Lo [10] ARABIC FATHA ISOLATED FORM..ARABIC SUKUN MEDIAL FORM
+FE81..FE8C ; Expands_On_NFKD # Lo [12] ARABIC LETTER ALEF WITH MADDA ABOVE ISOLATED FORM..ARABIC LETTER YEH WITH HAMZA ABOVE MEDIAL FORM
+FEF5..FEFC ; Expands_On_NFKD # Lo [8] ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM..ARABIC LIGATURE LAM WITH ALEF FINAL FORM
+FFE3 ; Expands_On_NFKD # Sk FULLWIDTH MACRON
+1D15E..1D164 ; Expands_On_NFKD # So [7] MUSICAL SYMBOL HALF NOTE..MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE
+1D1BB..1D1C0 ; Expands_On_NFKD # So [6] MUSICAL SYMBOL MINIMA..MUSICAL SYMBOL FUSA BLACK
+
+# Total code points: 13310
+
+# ================================================
+
+# Derived Property: Expands_On_NFKC
+# Generated according to UAX #15.
+# Characters whose normalized length is not one.
+# WARNING: Normalization of STRINGS must use the algorithm in UAX #15 because characters may interact.
+# The length of a normalized string is not necessarily the sum of the lengths of the normalized characters!
+
+00A8 ; Expands_On_NFKC # Sk DIAERESIS
+00AF ; Expands_On_NFKC # Sk MACRON
+00B4 ; Expands_On_NFKC # Sk ACUTE ACCENT
+00B8 ; Expands_On_NFKC # Sk CEDILLA
+00BC..00BE ; Expands_On_NFKC # No [3] VULGAR FRACTION ONE QUARTER..VULGAR FRACTION THREE QUARTERS
+0132..0133 ; Expands_On_NFKC # L& [2] LATIN CAPITAL LIGATURE IJ..LATIN SMALL LIGATURE IJ
+013F..0140 ; Expands_On_NFKC # L& [2] LATIN CAPITAL LETTER L WITH MIDDLE DOT..LATIN SMALL LETTER L WITH MIDDLE DOT
+0149 ; Expands_On_NFKC # L& LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
+01C4..01CC ; Expands_On_NFKC # L& [9] LATIN CAPITAL LETTER DZ WITH CARON..LATIN SMALL LETTER NJ
+01F1..01F3 ; Expands_On_NFKC # L& [3] LATIN CAPITAL LETTER DZ..LATIN SMALL LETTER DZ
+02D8..02DD ; Expands_On_NFKC # Sk [6] BREVE..DOUBLE ACUTE ACCENT
+0344 ; Expands_On_NFKC # Mn COMBINING GREEK DIALYTIKA TONOS
+037A ; Expands_On_NFKC # Lm GREEK YPOGEGRAMMENI
+0384..0385 ; Expands_On_NFKC # Sk [2] GREEK TONOS..GREEK DIALYTIKA TONOS
+0587 ; Expands_On_NFKC # L& ARMENIAN SMALL LIGATURE ECH YIWN
+0675..0678 ; Expands_On_NFKC # Lo [4] ARABIC LETTER HIGH HAMZA ALEF..ARABIC LETTER HIGH HAMZA YEH
+0958..095F ; Expands_On_NFKC # Lo [8] DEVANAGARI LETTER QA..DEVANAGARI LETTER YYA
+09DC..09DD ; Expands_On_NFKC # Lo [2] BENGALI LETTER RRA..BENGALI LETTER RHA
+09DF ; Expands_On_NFKC # Lo BENGALI LETTER YYA
+0A33 ; Expands_On_NFKC # Lo GURMUKHI LETTER LLA
+0A36 ; Expands_On_NFKC # Lo GURMUKHI LETTER SHA
+0A59..0A5B ; Expands_On_NFKC # Lo [3] GURMUKHI LETTER KHHA..GURMUKHI LETTER ZA
+0A5E ; Expands_On_NFKC # Lo GURMUKHI LETTER FA
+0B5C..0B5D ; Expands_On_NFKC # Lo [2] ORIYA LETTER RRA..ORIYA LETTER RHA
+0E33 ; Expands_On_NFKC # Lo THAI CHARACTER SARA AM
+0EB3 ; Expands_On_NFKC # Lo LAO VOWEL SIGN AM
+0EDC..0EDD ; Expands_On_NFKC # Lo [2] LAO HO NO..LAO HO MO
+0F43 ; Expands_On_NFKC # Lo TIBETAN LETTER GHA
+0F4D ; Expands_On_NFKC # Lo TIBETAN LETTER DDHA
+0F52 ; Expands_On_NFKC # Lo TIBETAN LETTER DHA
+0F57 ; Expands_On_NFKC # Lo TIBETAN LETTER BHA
+0F5C ; Expands_On_NFKC # Lo TIBETAN LETTER DZHA
+0F69 ; Expands_On_NFKC # Lo TIBETAN LETTER KSSA
+0F73 ; Expands_On_NFKC # Mn TIBETAN VOWEL SIGN II
+0F75..0F79 ; Expands_On_NFKC # Mn [5] TIBETAN VOWEL SIGN UU..TIBETAN VOWEL SIGN VOCALIC LL
+0F81 ; Expands_On_NFKC # Mn TIBETAN VOWEL SIGN REVERSED II
+0F93 ; Expands_On_NFKC # Mn TIBETAN SUBJOINED LETTER GHA
+0F9D ; Expands_On_NFKC # Mn TIBETAN SUBJOINED LETTER DDHA
+0FA2 ; Expands_On_NFKC # Mn TIBETAN SUBJOINED LETTER DHA
+0FA7 ; Expands_On_NFKC # Mn TIBETAN SUBJOINED LETTER BHA
+0FAC ; Expands_On_NFKC # Mn TIBETAN SUBJOINED LETTER DZHA
+0FB9 ; Expands_On_NFKC # Mn TIBETAN SUBJOINED LETTER KSSA
+1E9A ; Expands_On_NFKC # L& LATIN SMALL LETTER A WITH RIGHT HALF RING
+1FBD ; Expands_On_NFKC # Sk GREEK KORONIS
+1FBF..1FC1 ; Expands_On_NFKC # Sk [3] GREEK PSILI..GREEK DIALYTIKA AND PERISPOMENI
+1FCD..1FCF ; Expands_On_NFKC # Sk [3] GREEK PSILI AND VARIA..GREEK PSILI AND PERISPOMENI
+1FDD..1FDF ; Expands_On_NFKC # Sk [3] GREEK DASIA AND VARIA..GREEK DASIA AND PERISPOMENI
+1FED..1FEE ; Expands_On_NFKC # Sk [2] GREEK DIALYTIKA AND VARIA..GREEK DIALYTIKA AND OXIA
+1FFD..1FFE ; Expands_On_NFKC # Sk [2] GREEK OXIA..GREEK DASIA
+2017 ; Expands_On_NFKC # Po DOUBLE LOW LINE
+2025..2026 ; Expands_On_NFKC # Po [2] TWO DOT LEADER..HORIZONTAL ELLIPSIS
+2033..2034 ; Expands_On_NFKC # Po [2] DOUBLE PRIME..TRIPLE PRIME
+2036..2037 ; Expands_On_NFKC # Po [2] REVERSED DOUBLE PRIME..REVERSED TRIPLE PRIME
+203C ; Expands_On_NFKC # Po DOUBLE EXCLAMATION MARK
+203E ; Expands_On_NFKC # Po OVERLINE
+2047..2049 ; Expands_On_NFKC # Po [3] DOUBLE QUESTION MARK..EXCLAMATION QUESTION MARK
+2057 ; Expands_On_NFKC # Po QUADRUPLE PRIME
+20A8 ; Expands_On_NFKC # Sc RUPEE SIGN
+2100..2101 ; Expands_On_NFKC # So [2] ACCOUNT OF..ADDRESSED TO THE SUBJECT
+2103 ; Expands_On_NFKC # So DEGREE CELSIUS
+2105..2106 ; Expands_On_NFKC # So [2] CARE OF..CADA UNA
+2109 ; Expands_On_NFKC # So DEGREE FAHRENHEIT
+2116 ; Expands_On_NFKC # So NUMERO SIGN
+2120..2122 ; Expands_On_NFKC # So [3] SERVICE MARK..TRADE MARK SIGN
+213B ; Expands_On_NFKC # So FACSIMILE SIGN
+2153..215F ; Expands_On_NFKC # No [13] VULGAR FRACTION ONE THIRD..FRACTION NUMERATOR ONE
+2161..2163 ; Expands_On_NFKC # Nl [3] ROMAN NUMERAL TWO..ROMAN NUMERAL FOUR
+2165..2168 ; Expands_On_NFKC # Nl [4] ROMAN NUMERAL SIX..ROMAN NUMERAL NINE
+216A..216B ; Expands_On_NFKC # Nl [2] ROMAN NUMERAL ELEVEN..ROMAN NUMERAL TWELVE
+2171..2173 ; Expands_On_NFKC # Nl [3] SMALL ROMAN NUMERAL TWO..SMALL ROMAN NUMERAL FOUR
+2175..2178 ; Expands_On_NFKC # Nl [4] SMALL ROMAN NUMERAL SIX..SMALL ROMAN NUMERAL NINE
+217A..217B ; Expands_On_NFKC # Nl [2] SMALL ROMAN NUMERAL ELEVEN..SMALL ROMAN NUMERAL TWELVE
+222C..222D ; Expands_On_NFKC # Sm [2] DOUBLE INTEGRAL..TRIPLE INTEGRAL
+222F..2230 ; Expands_On_NFKC # Sm [2] SURFACE INTEGRAL..VOLUME INTEGRAL
+2469..249B ; Expands_On_NFKC # No [51] CIRCLED NUMBER TEN..NUMBER TWENTY FULL STOP
+249C..24B5 ; Expands_On_NFKC # So [26] PARENTHESIZED LATIN SMALL LETTER A..PARENTHESIZED LATIN SMALL LETTER Z
+2A0C ; Expands_On_NFKC # Sm QUADRUPLE INTEGRAL OPERATOR
+2A74..2A76 ; Expands_On_NFKC # Sm [3] DOUBLE COLON EQUAL..THREE CONSECUTIVE EQUALS SIGNS
+2ADC ; Expands_On_NFKC # Sm FORKING
+309B..309C ; Expands_On_NFKC # Sk [2] KATAKANA-HIRAGANA VOICED SOUND MARK..KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+309F ; Expands_On_NFKC # Lo HIRAGANA DIGRAPH YORI
+30FF ; Expands_On_NFKC # Lo KATAKANA DIGRAPH KOTO
+3200..321E ; Expands_On_NFKC # So [31] PARENTHESIZED HANGUL KIYEOK..PARENTHESIZED KOREAN CHARACTER O HU
+3220..3229 ; Expands_On_NFKC # No [10] PARENTHESIZED IDEOGRAPH ONE..PARENTHESIZED IDEOGRAPH TEN
+322A..3243 ; Expands_On_NFKC # So [26] PARENTHESIZED IDEOGRAPH MOON..PARENTHESIZED IDEOGRAPH REACH
+3250 ; Expands_On_NFKC # So PARTNERSHIP SIGN
+3251..325F ; Expands_On_NFKC # No [15] CIRCLED NUMBER TWENTY ONE..CIRCLED NUMBER THIRTY FIVE
+327C..327D ; Expands_On_NFKC # So [2] CIRCLED KOREAN CHARACTER CHAMKO..CIRCLED KOREAN CHARACTER JUEUI
+32B1..32BF ; Expands_On_NFKC # No [15] CIRCLED NUMBER THIRTY SIX..CIRCLED NUMBER FIFTY
+32C0..32CF ; Expands_On_NFKC # So [16] IDEOGRAPHIC TELEGRAPH SYMBOL FOR JANUARY..LIMITED LIABILITY SIGN
+3300..33FF ; Expands_On_NFKC # So [256] SQUARE APAATO..SQUARE GAL
+FB00..FB06 ; Expands_On_NFKC # L& [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST
+FB13..FB17 ; Expands_On_NFKC # L& [5] ARMENIAN SMALL LIGATURE MEN NOW..ARMENIAN SMALL LIGATURE MEN XEH
+FB1D ; Expands_On_NFKC # Lo HEBREW LETTER YOD WITH HIRIQ
+FB1F ; Expands_On_NFKC # Lo HEBREW LIGATURE YIDDISH YOD YOD PATAH
+FB2A..FB36 ; Expands_On_NFKC # Lo [13] HEBREW LETTER SHIN WITH SHIN DOT..HEBREW LETTER ZAYIN WITH DAGESH
+FB38..FB3C ; Expands_On_NFKC # Lo [5] HEBREW LETTER TET WITH DAGESH..HEBREW LETTER LAMED WITH DAGESH
+FB3E ; Expands_On_NFKC # Lo HEBREW LETTER MEM WITH DAGESH
+FB40..FB41 ; Expands_On_NFKC # Lo [2] HEBREW LETTER NUN WITH DAGESH..HEBREW LETTER SAMEKH WITH DAGESH
+FB43..FB44 ; Expands_On_NFKC # Lo [2] HEBREW LETTER FINAL PE WITH DAGESH..HEBREW LETTER PE WITH DAGESH
+FB46..FB4F ; Expands_On_NFKC # Lo [10] HEBREW LETTER TSADI WITH DAGESH..HEBREW LIGATURE ALEF LAMED
+FBDD ; Expands_On_NFKC # Lo ARABIC LETTER U WITH HAMZA ABOVE ISOLATED FORM
+FBEA..FBFB ; Expands_On_NFKC # Lo [18] ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM..ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA INITIAL FORM
+FC00..FD3D ; Expands_On_NFKC # Lo [318] ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH JEEM ISOLATED FORM..ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM
+FD50..FD8F ; Expands_On_NFKC # Lo [64] ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM..ARABIC LIGATURE MEEM WITH KHAH WITH MEEM INITIAL FORM
+FD92..FDC7 ; Expands_On_NFKC # Lo [54] ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INITIAL FORM..ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM
+FDF0..FDFB ; Expands_On_NFKC # Lo [12] ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM..ARABIC LIGATURE JALLAJALALOUHOU
+FDFC ; Expands_On_NFKC # Sc RIAL SIGN
+FE19 ; Expands_On_NFKC # Po PRESENTATION FORM FOR VERTICAL HORIZONTAL ELLIPSIS
+FE30 ; Expands_On_NFKC # Po PRESENTATION FORM FOR VERTICAL TWO DOT LEADER
+FE49..FE4C ; Expands_On_NFKC # Po [4] DASHED OVERLINE..DOUBLE WAVY OVERLINE
+FE70..FE72 ; Expands_On_NFKC # Lo [3] ARABIC FATHATAN ISOLATED FORM..ARABIC DAMMATAN ISOLATED FORM
+FE74 ; Expands_On_NFKC # Lo ARABIC KASRATAN ISOLATED FORM
+FE76..FE7F ; Expands_On_NFKC # Lo [10] ARABIC FATHA ISOLATED FORM..ARABIC SUKUN MEDIAL FORM
+FEF5..FEFC ; Expands_On_NFKC # Lo [8] ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM..ARABIC LIGATURE LAM WITH ALEF FINAL FORM
+FFE3 ; Expands_On_NFKC # Sk FULLWIDTH MACRON
+1D15E..1D164 ; Expands_On_NFKC # So [7] MUSICAL SYMBOL HALF NOTE..MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE
+1D1BB..1D1C0 ; Expands_On_NFKC # So [6] MUSICAL SYMBOL MINIMA..MUSICAL SYMBOL FUSA BLACK
+
+# Total code points: 1171
+
+# EOF
diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp
index 8f27d4a969..f2ebe7c886 100644
--- a/util/unicode/main.cpp
+++ b/util/unicode/main.cpp
@@ -38,36 +38,56 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+
#include <qlist.h>
#include <qhash.h>
#include <qfile.h>
+#include <qbytearray.h>
#include <qstring.h>
#include <qchar.h>
-#include <private/qunicodetables_p.h>
#include <qvector.h>
#include <qdebug.h>
+#if 0
+#include <private/qunicodetables_p.h>
+#endif
+#define DATA_VERSION_S "5.0"
+#define DATA_VERSION_STR "QChar::Unicode_5_0"
+
+#define LAST_CODEPOINT 0x10ffff
+#define LAST_CODEPOINT_STR "0x10ffff"
+
+
+static QHash<QByteArray, QChar::UnicodeVersion> age_map;
+
+static void initAgeMap()
+{
+ struct AgeMap {
+ const QChar::UnicodeVersion version;
+ const char *age;
+ } ageMap[] = {
+ { QChar::Unicode_1_1, "1.1" },
+ { QChar::Unicode_2_0, "2.0" },
+ { QChar::Unicode_2_1_2, "2.1" },
+ { QChar::Unicode_3_0, "3.0" },
+ { QChar::Unicode_3_1, "3.1" },
+ { QChar::Unicode_3_2, "3.2" },
+ { QChar::Unicode_4_0, "4.0" },
+ { QChar::Unicode_4_1, "4.1" },
+ { QChar::Unicode_5_0, "5.0" },
+ { QChar::Unicode_Unassigned, 0 }
+ };
+ AgeMap *d = ageMap;
+ while (d->age) {
+ age_map.insert(d->age, d->version);
+ ++d;
+ }
+}
-static struct AgeMap {
- const char *age;
- const QChar::UnicodeVersion version;
-} ageMap [] = {
- { "1.1", QChar::Unicode_1_1 },
- { "2.0", QChar::Unicode_2_0 },
- { "2.1", QChar::Unicode_2_1_2 },
- { "3.0", QChar::Unicode_3_0 },
- { "3.1", QChar::Unicode_3_1 },
- { "3.2", QChar::Unicode_3_2 },
- { "4.0", QChar::Unicode_4_0 },
- { "4.1", QChar::Unicode_4_1 },
- { "5.0", QChar::Unicode_5_0 },
- { 0, QChar::Unicode_Unassigned }
-};
-#define CURRENT_UNICODE_VERSION "QChar::Unicode_5_0"
static const char *grapheme_break_string =
" enum GraphemeBreak {\n"
- " GraphemeBreakOther, \n"
+ " GraphemeBreakOther,\n"
" GraphemeBreakCR,\n"
" GraphemeBreakLF,\n"
" GraphemeBreakControl,\n"
@@ -90,9 +110,11 @@ enum GraphemeBreak {
GraphemeBreakT,
GraphemeBreakLV,
GraphemeBreakLVT
+
+ , GraphemeBreak_Unassigned
};
-QHash<QByteArray, GraphemeBreak> grapheme_break_map;
+static QHash<QByteArray, GraphemeBreak> grapheme_break_map;
static void initGraphemeBreak()
{
@@ -110,7 +132,7 @@ static void initGraphemeBreak()
{ GraphemeBreakT, "T" },
{ GraphemeBreakLV, "LV" },
{ GraphemeBreakLVT, "LVT" },
- { GraphemeBreakOther, 0 }
+ { GraphemeBreak_Unassigned, 0 }
};
GraphemeBreakList *d = breaks;
while (d->name) {
@@ -119,7 +141,8 @@ static void initGraphemeBreak()
}
}
-const char *word_break_string =
+
+static const char *word_break_string =
" enum WordBreak {\n"
" WordBreakOther,\n"
" WordBreakFormat,\n"
@@ -140,10 +163,11 @@ enum WordBreak {
WordBreakMidNum,
WordBreakNumeric,
WordBreakExtendNumLet
-};
+ , WordBreak_Unassigned
+};
-QHash<QByteArray, WordBreak> word_break_map;
+static QHash<QByteArray, WordBreak> word_break_map;
static void initWordBreak()
{
@@ -159,7 +183,7 @@ static void initWordBreak()
{ WordBreakMidNum, "MidNum" },
{ WordBreakNumeric, "Numeric" },
{ WordBreakExtendNumLet, "ExtendNumLet" },
- { WordBreakFormat, 0 }
+ { WordBreak_Unassigned, 0 }
};
WordBreakList *d = breaks;
while (d->name) {
@@ -196,10 +220,11 @@ enum SentenceBreak {
SentenceBreakATerm,
SentenceBreakSTerm,
SentenceBreakClose
-};
+ , SentenceBreak_Unassigned
+};
-QHash<QByteArray, SentenceBreak> sentence_break_map;
+static QHash<QByteArray, SentenceBreak> sentence_break_map;
static void initSentenceBreak()
{
@@ -218,7 +243,7 @@ static void initSentenceBreak()
{ SentenceBreakATerm, "ATerm" },
{ SentenceBreakSTerm, "STerm" },
{ SentenceBreakClose, "Close" },
- { SentenceBreakOther, 0 }
+ { SentenceBreak_Unassigned, 0 }
};
SentenceBreakList *d = breaks;
while (d->name) {
@@ -228,33 +253,7 @@ static void initSentenceBreak()
}
-// Keep this one in sync with the code in createPropertyInfo
-const char *property_string =
- " struct Properties {\n"
- " ushort category : 8;\n"
- " ushort line_break_class : 8;\n"
- " ushort direction : 8;\n"
- " ushort combiningClass :8;\n"
- " ushort joining : 2;\n"
- " signed short digitValue : 6; /* 5 needed */\n"
- " ushort unicodeVersion : 4;\n"
- " ushort lowerCaseSpecial : 1;\n"
- " ushort upperCaseSpecial : 1;\n"
- " ushort titleCaseSpecial : 1;\n"
- " ushort caseFoldSpecial : 1; /* currently unused */\n"
- " signed short mirrorDiff : 16;\n"
- " signed short lowerCaseDiff : 16;\n"
- " signed short upperCaseDiff : 16;\n"
- " signed short titleCaseDiff : 16;\n"
- " signed short caseFoldDiff : 16;\n"
- " ushort graphemeBreak : 8;\n"
- " ushort wordBreak : 8;\n"
- " ushort sentenceBreak : 8;\n"
- " };\n"
- " Q_CORE_EXPORT const Properties * QT_FASTCALL properties(uint ucs4);\n"
- " Q_CORE_EXPORT const Properties * QT_FASTCALL properties(ushort ucs2);\n";
-
-const char *lineBreakClass =
+static const char *lineBreakClass =
" // see http://www.unicode.org/reports/tr14/tr14-19.html\n"
" // we don't use the XX, AI and CB properties and map them to AL instead.\n"
" // as we don't support any EBDIC based OS'es, NL is ignored and mapped to AL as well.\n"
@@ -268,16 +267,108 @@ const char *lineBreakClass =
" LineBreak_SP, LineBreak_CR, LineBreak_LF, LineBreak_BK\n"
" };\n\n";
-const char *methods =
+enum LineBreakClass {
+ LineBreak_OP, LineBreak_CL, LineBreak_QU, LineBreak_GL, LineBreak_NS,
+ LineBreak_EX, LineBreak_SY, LineBreak_IS, LineBreak_PR, LineBreak_PO,
+ LineBreak_NU, LineBreak_AL, LineBreak_ID, LineBreak_IN, LineBreak_HY,
+ LineBreak_BA, LineBreak_BB, LineBreak_B2, LineBreak_ZW, LineBreak_CM,
+ LineBreak_WJ, LineBreak_H2, LineBreak_H3, LineBreak_JL, LineBreak_JV,
+ LineBreak_JT, LineBreak_SA, LineBreak_SG,
+ LineBreak_SP, LineBreak_CR, LineBreak_LF, LineBreak_BK
+
+ , LineBreak_Unassigned
+};
+
+static QHash<QByteArray, LineBreakClass> line_break_map;
+
+static void initLineBreak()
+{
+ // ### Classes XX and AI are left out and mapped to AL for now;
+ // ### Class NL is ignored and mapped to AL as well.
+ struct LineBreakList {
+ LineBreakClass brk;
+ const char *name;
+ } breaks[] = {
+ { LineBreak_BK, "BK" },
+ { LineBreak_CR, "CR" },
+ { LineBreak_LF, "LF" },
+ { LineBreak_CM, "CM" },
+ { LineBreak_AL, "NL" },
+ { LineBreak_SG, "SG" },
+ { LineBreak_WJ, "WJ" },
+ { LineBreak_ZW, "ZW" },
+ { LineBreak_GL, "GL" },
+ { LineBreak_SP, "SP" },
+ { LineBreak_B2, "B2" },
+ { LineBreak_BA, "BA" },
+ { LineBreak_BB, "BB" },
+ { LineBreak_HY, "HY" },
+ { LineBreak_AL, "CB" }, // ###
+ { LineBreak_CL, "CL" },
+ { LineBreak_EX, "EX" },
+ { LineBreak_IN, "IN" },
+ { LineBreak_NS, "NS" },
+ { LineBreak_OP, "OP" },
+ { LineBreak_QU, "QU" },
+ { LineBreak_IS, "IS" },
+ { LineBreak_NU, "NU" },
+ { LineBreak_PO, "PO" },
+ { LineBreak_PR, "PR" },
+ { LineBreak_SY, "SY" },
+ { LineBreak_AL, "AI" },
+ { LineBreak_AL, "AL" },
+ { LineBreak_H2, "H2" },
+ { LineBreak_H3, "H3" },
+ { LineBreak_ID, "ID" },
+ { LineBreak_JL, "JL" },
+ { LineBreak_JV, "JV" },
+ { LineBreak_JT, "JT" },
+ { LineBreak_SA, "SA" },
+ { LineBreak_AL, "XX" },
+ { LineBreak_Unassigned, 0 }
+ };
+ LineBreakList *d = breaks;
+ while (d->name) {
+ line_break_map.insert(d->name, d->brk);
+ ++d;
+ }
+}
+
+
+// Keep this one in sync with the code in createPropertyInfo
+static const char *property_string =
+ " struct Properties {\n"
+ " ushort category : 8; /* 5 needed */\n"
+ " ushort line_break_class : 8; /* 6 needed */\n"
+ " ushort direction : 8; /* 5 needed */\n"
+ " ushort combiningClass : 8;\n"
+ " ushort joining : 2;\n"
+ " signed short digitValue : 6; /* 5 needed */\n"
+ " ushort unicodeVersion : 4;\n"
+ " ushort lowerCaseSpecial : 1;\n"
+ " ushort upperCaseSpecial : 1;\n"
+ " ushort titleCaseSpecial : 1;\n"
+ " ushort caseFoldSpecial : 1; /* currently unused */\n"
+ " signed short mirrorDiff : 16;\n"
+ " signed short lowerCaseDiff : 16;\n"
+ " signed short upperCaseDiff : 16;\n"
+ " signed short titleCaseDiff : 16;\n"
+ " signed short caseFoldDiff : 16;\n"
+ " ushort graphemeBreak : 8; /* 4 needed */\n"
+ " ushort wordBreak : 8; /* 4 needed */\n"
+ " ushort sentenceBreak : 8; /* 4 needed */\n"
+ " };\n"
+ " Q_CORE_EXPORT const Properties * QT_FASTCALL properties(uint ucs4);\n"
+ " Q_CORE_EXPORT const Properties * QT_FASTCALL properties(ushort ucs2);\n";
+
+static const char *methods =
" Q_CORE_EXPORT QUnicodeTables::LineBreakClass QT_FASTCALL lineBreakClass(uint ucs4);\n"
- " inline int lineBreakClass(const QChar &ch) {\n"
- " return QUnicodeTables::lineBreakClass(ch.unicode());\n"
- " }\n"
+ " inline int lineBreakClass(const QChar &ch)\n"
+ " { return lineBreakClass(ch.unicode()); }\n"
"\n"
" Q_CORE_EXPORT int QT_FASTCALL script(uint ucs4);\n"
- " Q_CORE_EXPORT_INLINE int QT_FASTCALL script(const QChar &ch) {\n"
- " return script(ch.unicode());\n"
- " }\n\n";
+ " inline int script(const QChar &ch)\n"
+ " { return script(ch.unicode()); }\n\n";
struct PropertyFlags {
@@ -312,7 +403,7 @@ struct PropertyFlags {
// from DerivedAge.txt
QChar::UnicodeVersion age : 4;
int digitValue;
- uint line_break_class : 5;
+ uint line_break_class : 6;
int mirrorDiff : 16;
@@ -329,8 +420,9 @@ struct PropertyFlags {
SentenceBreak sentenceBreak;
};
-QList<int> specialCaseMap;
-int specialCaseMaxLen = 0;
+
+static QList<int> specialCaseMap;
+static int specialCaseMaxLen = 0;
static int appendToSpecialCaseMap(const QList<int> &map)
{
@@ -347,7 +439,7 @@ static int appendToSpecialCaseMap(const QList<int> &map)
specialCaseMaxLen = qMax(specialCaseMaxLen, utf16map.size());
utf16map << 0;
- for (int i = 0; i < specialCaseMap.size() - utf16map.size() - 1; ++i) {
+ for (int i = 0; i < specialCaseMap.size() - utf16map.size() + 1; ++i) {
int j;
for (j = 0; j < utf16map.size(); ++j) {
if (specialCaseMap.at(i+j) != utf16map.at(j))
@@ -364,7 +456,7 @@ static int appendToSpecialCaseMap(const QList<int> &map)
struct UnicodeData {
UnicodeData(int codepoint = 0) {
- p.category = QChar::NoCategory;
+ p.category = QChar::Other_NotAssigned; // Cn
p.combiningClass = 0;
p.direction = QChar::DirL;
@@ -387,7 +479,7 @@ struct UnicodeData {
p.age = QChar::Unicode_Unassigned;
p.mirrorDiff = 0;
p.digitValue = -1;
- p.line_break_class = QUnicodeTables::LineBreak_AL;
+ p.line_break_class = LineBreak_AL; // XX -> AL
p.lowerCaseDiff = 0;
p.upperCaseDiff = 0;
p.titleCaseDiff = 0;
@@ -438,14 +530,15 @@ enum UniDataFields {
UD_TitleCase
};
-QHash<QByteArray, QChar::Category> categoryMap;
+
+static QHash<QByteArray, QChar::Category> categoryMap;
static void initCategoryMap()
{
struct Cat {
QChar::Category cat;
const char *name;
- } categories [] = {
+ } categories[] = {
{ QChar::Mark_NonSpacing, "Mn" },
{ QChar::Mark_SpacingCombining, "Mc" },
{ QChar::Mark_Enclosing, "Me" },
@@ -485,13 +578,14 @@ static void initCategoryMap()
{ QChar::NoCategory, 0 }
};
Cat *c = categories;
- while (c->cat != QChar::NoCategory) {
+ while (c->name) {
categoryMap.insert(c->name, c->cat);
++c;
}
}
-QHash<QByteArray, QChar::Direction> directionMap;
+
+static QHash<QByteArray, QChar::Direction> directionMap;
static void initDirectionMap()
{
@@ -528,7 +622,7 @@ static void initDirectionMap()
}
-QHash<QByteArray, QChar::Decomposition> decompositionMap;
+static QHash<QByteArray, QChar::Decomposition> decompositionMap;
static void initDecompositionMap()
{
@@ -553,7 +647,7 @@ static void initDecompositionMap()
{ QChar::Square, "<square>" },
{ QChar::Compat, "<compat>" },
{ QChar::Fraction, "<fraction>" },
- { QChar::NoDecomposition, 0 }
+ { QChar::NoDecomposition, 0 }
};
Dec *d = decompositions;
while (d->name) {
@@ -563,28 +657,31 @@ static void initDecompositionMap()
}
-QHash<int, UnicodeData> unicodeData;
-QList<PropertyFlags> uniqueProperties;
+static QHash<int, UnicodeData> unicodeData;
+static QList<PropertyFlags> uniqueProperties;
-QHash<int, int> decompositionLength;
-int highestComposedCharacter = 0;
-int numLigatures = 0;
-int highestLigature = 0;
+static QHash<int, int> decompositionLength;
+static int highestComposedCharacter = 0;
+static int numLigatures = 0;
+static int highestLigature = 0;
-struct Ligature {ushort u1; ushort u2; ushort ligature;};
+struct Ligature {
+ ushort u1;
+ ushort u2;
+ ushort ligature;
+};
// we need them sorted after the first component for fast lookup
-bool operator < (const Ligature &l1, const Ligature &l2) {
- return l1.u1 < l2.u1;
-}
+bool operator < (const Ligature &l1, const Ligature &l2)
+{ return l1.u1 < l2.u1; }
-QHash<ushort, QList<Ligature> > ligatureHashes;
+static QHash<ushort, QList<Ligature> > ligatureHashes;
-QHash<int, int> combiningClassUsage;
+static QHash<int, int> combiningClassUsage;
-int maxLowerCaseDiff = 0;
-int maxUpperCaseDiff = 0;
-int maxTitleCaseDiff = 0;
+static int maxLowerCaseDiff = 0;
+static int maxUpperCaseDiff = 0;
+static int maxTitleCaseDiff = 0;
static void readUnicodeData()
{
@@ -609,6 +706,8 @@ static void readUnicodeData()
QList<QByteArray> properties = line.split(';');
bool ok;
int codepoint = properties[UD_Value].toInt(&ok, 16);
+ Q_ASSERT(ok);
+ Q_ASSERT(codepoint <= LAST_CODEPOINT);
int lastCodepoint = codepoint;
QByteArray name = properties[UD_Name];
@@ -617,11 +716,16 @@ static void readUnicodeData()
nextLine.resize(1024);
f.readLine(nextLine.data(), 1024);
QList<QByteArray> properties = nextLine.split(';');
+ Q_ASSERT(properties[UD_Name].startsWith('<') && properties[UD_Name].contains("Last"));
lastCodepoint = properties[UD_Value].toInt(&ok, 16);
+ Q_ASSERT(ok);
+ Q_ASSERT(lastCodepoint <= LAST_CODEPOINT);
}
UnicodeData data(codepoint);
data.p.category = categoryMap.value(properties[UD_Category], QChar::NoCategory);
+ if (data.p.category == QChar::NoCategory)
+ qFatal("unassigned char category: %s", properties[UD_Category].constData());
data.p.combiningClass = properties[UD_CombiningClass].toInt();
if (!combiningClassUsage.contains(data.p.combiningClass))
@@ -634,6 +738,8 @@ static void readUnicodeData()
if (!properties[UD_UpperCase].isEmpty()) {
int upperCase = properties[UD_UpperCase].toInt(&ok, 16);
Q_ASSERT(ok);
+ if (qAbs(upperCase - codepoint) >= (1<<14))
+ qWarning() << "upperCaseDiff exceeded (" << hex << codepoint << "->" << upperCase << ")";
data.p.upperCaseDiff = upperCase - codepoint;
maxUpperCaseDiff = qMax(maxUpperCaseDiff, qAbs(data.p.upperCaseDiff));
if (codepoint > 0xffff) {
@@ -644,7 +750,9 @@ static void readUnicodeData()
}
if (!properties[UD_LowerCase].isEmpty()) {
int lowerCase = properties[UD_LowerCase].toInt(&ok, 16);
- Q_ASSERT (ok);
+ Q_ASSERT(ok);
+ if (qAbs(lowerCase - codepoint) >= (1<<14))
+ qWarning() << "lowerCaseDiff exceeded (" << hex << codepoint << "->" << lowerCase << ")";
data.p.lowerCaseDiff = lowerCase - codepoint;
maxLowerCaseDiff = qMax(maxLowerCaseDiff, qAbs(data.p.lowerCaseDiff));
if (codepoint > 0xffff) {
@@ -658,7 +766,9 @@ static void readUnicodeData()
properties[UD_TitleCase] = properties[UD_UpperCase];
if (!properties[UD_TitleCase].isEmpty()) {
int titleCase = properties[UD_TitleCase].toInt(&ok, 16);
- Q_ASSERT (ok);
+ Q_ASSERT(ok);
+ if (qAbs(titleCase - codepoint) >= (1<<14))
+ qWarning() << "titleCaseDiff exceeded (" << hex << codepoint << "->" << titleCase << ")";
data.p.titleCaseDiff = titleCase - codepoint;
maxTitleCaseDiff = qMax(maxTitleCaseDiff, qAbs(data.p.titleCaseDiff));
if (codepoint > 0xffff) {
@@ -677,13 +787,17 @@ static void readUnicodeData()
highestComposedCharacter = qMax(highestComposedCharacter, codepoint);
QList<QByteArray> d = decomposition.split(' ');
if (d[0].contains('<')) {
- data.decompositionType = decompositionMap.value(d[0], QChar::Canonical);
+ data.decompositionType = decompositionMap.value(d[0], QChar::NoDecomposition);
+ if (data.decompositionType == QChar::NoDecomposition)
+ qFatal("unassigned decomposition type: %s", d[0].constData());
d.takeFirst();
} else {
data.decompositionType = QChar::Canonical;
}
- for (int i = 0; i < d.size(); ++i)
+ for (int i = 0; i < d.size(); ++i) {
data.decomposition.append(d[i].toInt(&ok, 16));
+ Q_ASSERT(ok);
+ }
if (!decompositionLength.contains(data.decomposition.size()))
decompositionLength[data.decomposition.size()] = 1;
else
@@ -725,14 +839,14 @@ static void readBidiMirroring()
bool ok;
int codepoint = pair[0].toInt(&ok, 16);
+ Q_ASSERT(ok);
int mirror = pair[1].toInt(&ok, 16);
+ Q_ASSERT(ok);
UnicodeData d = unicodeData.value(codepoint, UnicodeData(codepoint));
d.mirroredChar = mirror;
- if (qAbs(codepoint-d.mirroredChar) > maxMirroredDiff)
- maxMirroredDiff = qAbs(codepoint - d.mirroredChar);
-
d.p.mirrorDiff = d.mirroredChar - codepoint;
+ maxMirroredDiff = qMax(maxMirroredDiff, qAbs(d.p.mirrorDiff));
unicodeData.insert(codepoint, d);
}
}
@@ -764,6 +878,8 @@ static void readArabicShaping()
bool ok;
int codepoint = shaping[0].toInt(&ok, 16);
+ Q_ASSERT(ok);
+
QChar::Joining j = QChar::OtherJoining;
QByteArray shape = shaping[2].trimmed();
if (shape == "R")
@@ -810,22 +926,17 @@ static void readDerivedAge()
bool ok;
int from = cl[0].toInt(&ok, 16);
+ Q_ASSERT(ok);
int to = from;
- if (cl.size() == 2)
+ if (cl.size() == 2) {
to = cl[1].toInt(&ok, 16);
-
- QChar::UnicodeVersion age = QChar::Unicode_Unassigned;
- QByteArray ba = l[1];
- AgeMap *map = ageMap;
- while (map->age) {
- if (ba == map->age) {
- age = map->version;
- break;
- }
- ++map;
+ Q_ASSERT(ok);
}
+
+ QChar::UnicodeVersion age = age_map.value(l[1].trimmed(), QChar::Unicode_Unassigned);
//qDebug() << hex << from << ".." << to << ba << age;
- Q_ASSERT(age != QChar::Unicode_Unassigned);
+ if (age == QChar::Unicode_Unassigned)
+ qFatal("unassigned or unhandled age value: %s", l[1].constData());
for (int codepoint = from; codepoint <= to; ++codepoint) {
UnicodeData d = unicodeData.value(codepoint, UnicodeData(codepoint));
@@ -836,11 +947,11 @@ static void readDerivedAge()
}
-static void readCompositionExclusion()
+static void readDerivedNormalizationProps()
{
- QFile f("data/CompositionExclusions.txt");
+ QFile f("data/DerivedNormalizationProps.txt");
if (!f.exists())
- qFatal("Couldn't find CompositionExclusions.txt");
+ qFatal("Couldn't find DerivedNormalizationProps.txt");
f.open(QFile::ReadOnly);
@@ -853,42 +964,61 @@ static void readCompositionExclusion()
int comment = line.indexOf('#');
if (comment >= 0)
line = line.left(comment);
- line.replace(" ", "");
- if (line.isEmpty())
+ if (line.trimmed().isEmpty())
continue;
- Q_ASSERT(!line.contains(".."));
+ QList<QByteArray> l = line.split(';');
+ Q_ASSERT(l.size() >= 2);
+
+ QByteArray propName = l[1].trimmed();
+ if (propName != "Full_Composition_Exclusion")
+ // ###
+ continue;
+
+ QByteArray codes = l[0].trimmed();
+ codes.replace("..", ".");
+ QList<QByteArray> cl = codes.split('.');
bool ok;
- int codepoint = line.toInt(&ok, 16);
+ int from = cl[0].toInt(&ok, 16);
+ Q_ASSERT(ok);
+ int to = from;
+ if (cl.size() == 2) {
+ to = cl[1].toInt(&ok, 16);
+ Q_ASSERT(ok);
+ }
- UnicodeData d = unicodeData.value(codepoint, UnicodeData(codepoint));
- d.excludedComposition = true;
- unicodeData.insert(codepoint, d);
+ for (int codepoint = from; codepoint <= to; ++codepoint) {
+ UnicodeData d = unicodeData.value(codepoint, UnicodeData(codepoint));
+ d.excludedComposition = true;
+ unicodeData.insert(codepoint, d);
+ }
}
- for (int i = 0; i < 0x110000; ++i) {
- UnicodeData data = unicodeData.value(i, UnicodeData(i));
- if (!data.excludedComposition
- && data.decompositionType == QChar::Canonical
- && data.decomposition.size() > 1) {
- Q_ASSERT(data.decomposition.size() == 2);
-
- uint part1 = data.decomposition.at(0);
- uint part2 = data.decomposition.at(1);
- UnicodeData first = unicodeData.value(part1, UnicodeData(part1));
- if (first.p.combiningClass != 0)
- continue;
+ for (int codepoint = 0; codepoint <= LAST_CODEPOINT; ++codepoint) {
+ UnicodeData d = unicodeData.value(codepoint, UnicodeData(codepoint));
+ if (!d.excludedComposition
+ && d.decompositionType == QChar::Canonical
+ && d.decomposition.size() > 1) {
+ Q_ASSERT(d.decomposition.size() == 2);
+
+ uint part1 = d.decomposition.at(0);
+ uint part2 = d.decomposition.at(1);
+
+ // all non-starters are listed in DerivedNormalizationProps.txt
+ // and already excluded from composition
+ Q_ASSERT(unicodeData.value(part1, UnicodeData(part1)).p.combiningClass == 0);
++numLigatures;
highestLigature = qMax(highestLigature, (int)part1);
- Ligature l = {(ushort)part1, (ushort)part2, i};
+ Ligature l = {(ushort)part1, (ushort)part2, codepoint};
ligatureHashes[part2].append(l);
}
}
}
+
struct NormalizationCorrection {
uint codepoint;
uint mapped;
@@ -933,10 +1063,12 @@ static QByteArray createNormalizationCorrections()
QList<QByteArray> fields = line.split(';');
Q_ASSERT(fields.size() == 4);
- NormalizationCorrection c;
+ NormalizationCorrection c = { 0, 0, 0 };
bool ok;
c.codepoint = fields.at(0).toInt(&ok, 16);
+ Q_ASSERT(ok);
c.mapped = fields.at(1).toInt(&ok, 16);
+ Q_ASSERT(ok);
if (fields.at(3) == "3.2.0")
c.version = QChar::Unicode_3_2;
else if (fields.at(3) == "4.0.0")
@@ -953,7 +1085,6 @@ static QByteArray createNormalizationCorrections()
"enum { NumNormalizationCorrections = " + QByteArray::number(numCorrections) + " };\n\n";
-
return out;
}
@@ -961,7 +1092,7 @@ static QByteArray createNormalizationCorrections()
static void computeUniqueProperties()
{
qDebug("computeUniqueProperties:");
- for (int uc = 0; uc < 0x110000; ++uc) {
+ for (int uc = 0; uc <= LAST_CODEPOINT; ++uc) {
UnicodeData d = unicodeData.value(uc, UnicodeData(uc));
int index = uniqueProperties.indexOf(d.p);
@@ -972,7 +1103,7 @@ static void computeUniqueProperties()
d.propertyIndex = index;
unicodeData.insert(uc, d);
}
- qDebug(" %d unicode properties found", uniqueProperties.size());
+ qDebug(" %d unique unicode properties found", uniqueProperties.size());
}
@@ -1007,54 +1138,17 @@ static void readLineBreak()
bool ok;
int from = cl[0].toInt(&ok, 16);
+ Q_ASSERT(ok);
int to = from;
- if (cl.size() == 2)
+ if (cl.size() == 2) {
to = cl[1].toInt(&ok, 16);
-
- // ### Classes XX and AI are left out and mapped to AL for now
- QUnicodeTables::LineBreakClass lb = QUnicodeTables::LineBreak_AL;
- QByteArray ba = l[1];
-
- if (ba == "AI") lb = QUnicodeTables::LineBreak_AL;
- else if (ba == "XX") lb = QUnicodeTables::LineBreak_AL;
- else if (ba == "NL") lb = QUnicodeTables::LineBreak_AL;
- else if (ba == "OP") lb = QUnicodeTables::LineBreak_OP;
- else if (ba == "CL") lb = QUnicodeTables::LineBreak_CL;
- else if (ba == "QU") lb = QUnicodeTables::LineBreak_QU;
- else if (ba == "GL") lb = QUnicodeTables::LineBreak_GL;
- else if (ba == "NS") lb = QUnicodeTables::LineBreak_NS;
- else if (ba == "EX") lb = QUnicodeTables::LineBreak_EX;
- else if (ba == "SY") lb = QUnicodeTables::LineBreak_SY;
- else if (ba == "IS") lb = QUnicodeTables::LineBreak_IS;
- else if (ba == "PR") lb = QUnicodeTables::LineBreak_PR;
- else if (ba == "PO") lb = QUnicodeTables::LineBreak_PO;
- else if (ba == "NU") lb = QUnicodeTables::LineBreak_NU;
- else if (ba == "AL") lb = QUnicodeTables::LineBreak_AL;
- else if (ba == "ID") lb = QUnicodeTables::LineBreak_ID;
- else if (ba == "IN") lb = QUnicodeTables::LineBreak_IN;
- else if (ba == "HY") lb = QUnicodeTables::LineBreak_HY;
- else if (ba == "BA") lb = QUnicodeTables::LineBreak_BA;
- else if (ba == "BB") lb = QUnicodeTables::LineBreak_BB;
- else if (ba == "B2") lb = QUnicodeTables::LineBreak_B2;
- else if (ba == "ZW") lb = QUnicodeTables::LineBreak_ZW;
- else if (ba == "CM") lb = QUnicodeTables::LineBreak_CM;
- else if (ba == "SA") lb = QUnicodeTables::LineBreak_SA;
- else if (ba == "BK") lb = QUnicodeTables::LineBreak_BK;
- else if (ba == "CR") lb = QUnicodeTables::LineBreak_CR;
- else if (ba == "LF") lb = QUnicodeTables::LineBreak_LF;
- else if (ba == "SG") lb = QUnicodeTables::LineBreak_SG;
- else if (ba == "CB") lb = QUnicodeTables::LineBreak_AL;
- else if (ba == "SP") lb = QUnicodeTables::LineBreak_SP;
- else if (ba == "WJ") lb = QUnicodeTables::LineBreak_WJ;
- else if (ba == "H2") lb = QUnicodeTables::LineBreak_H2;
- else if (ba == "H3") lb = QUnicodeTables::LineBreak_H3;
- else if (ba == "JL") lb = QUnicodeTables::LineBreak_JL;
- else if (ba == "JV") lb = QUnicodeTables::LineBreak_JV;
- else if (ba == "JT") lb = QUnicodeTables::LineBreak_JT;
- else {
- qDebug() << "unhandled line break class:" << ba;
+ Q_ASSERT(ok);
}
+ LineBreakClass lb = line_break_map.value(l[1].trimmed(), LineBreak_Unassigned);
+ if (lb == LineBreak_Unassigned)
+ qFatal("unassigned line break class: %s", l[1].constData());
+
for (int codepoint = from; codepoint <= to; ++codepoint) {
UnicodeData d = unicodeData.value(codepoint, UnicodeData(codepoint));
d.p.line_break_class = lb;
@@ -1066,7 +1160,7 @@ static void readLineBreak()
static void readSpecialCasing()
{
-// qDebug() << "Reading SpecialCasing.txt";
+ qDebug() << "Reading SpecialCasing.txt";
QFile f("data/SpecialCasing.txt");
if (!f.exists())
qFatal("Couldn't find SpecialCasing.txt");
@@ -1114,8 +1208,6 @@ static void readSpecialCasing()
for (int i = 0; i < title.size(); ++i) {
bool ok;
titleMap.append(title.at(i).toInt(&ok, 16));
- if (!ok)
- qDebug() << line << title.at(i);
Q_ASSERT(ok);
}
@@ -1151,7 +1243,7 @@ static void readSpecialCasing()
}
}
-int maxCaseFoldDiff = 0;
+static int maxCaseFoldDiff = 0;
static void readCaseFolding()
{
@@ -1178,7 +1270,7 @@ static void readCaseFolding()
QList<QByteArray> l = line.split(';');
bool ok;
- uint codepoint = l[0].trimmed().toInt(&ok, 16);
+ int codepoint = l[0].trimmed().toInt(&ok, 16);
Q_ASSERT(ok);
@@ -1198,8 +1290,10 @@ static void readCaseFolding()
UnicodeData ud = unicodeData.value(codepoint, UnicodeData(codepoint));
if (foldMap.size() == 1) {
+ if (qAbs(foldMap.at(0) - codepoint) >= (1<<14))
+ qWarning() << "caseFoldDiff exceeded (" << hex << codepoint << "->" << foldMap.at(0) << ")";
ud.p.caseFoldDiff = foldMap.at(0) - codepoint;
- maxCaseFoldDiff = qMax(maxCaseFoldDiff, ud.p.caseFoldDiff);
+ maxCaseFoldDiff = qMax(maxCaseFoldDiff, qAbs(ud.p.caseFoldDiff));
if (codepoint > 0xffff) {
// if the condition below doesn't hold anymore we need to modify our case folding code
//qDebug() << codepoint << QChar::highSurrogate(codepoint) << QChar::highSurrogate(foldMap.at(0));
@@ -1208,7 +1302,7 @@ static void readCaseFolding()
if (foldMap.at(0) != codepoint + ud.p.lowerCaseDiff)
qDebug() << hex << codepoint;
} else {
- Q_ASSERT(false); // we currently don't support full case foldings
+ qFatal("we currently don't support full case foldings");
// qDebug() << "special" << hex << foldMap;
ud.p.caseFoldSpecial = true;
ud.p.caseFoldDiff = appendToSpecialCaseMap(foldMap);
@@ -1254,7 +1348,9 @@ static void readGraphemeBreak()
Q_ASSERT(ok);
}
- GraphemeBreak brk = grapheme_break_map.value(l[1].trimmed(), GraphemeBreakOther);
+ GraphemeBreak brk = grapheme_break_map.value(l[1].trimmed(), GraphemeBreak_Unassigned);
+ if (brk == GraphemeBreak_Unassigned)
+ qFatal("unassigned grapheme break class: %s", l[1].constData());
for (int codepoint = from; codepoint <= to; ++codepoint) {
UnicodeData ud = unicodeData.value(codepoint, UnicodeData(codepoint));
@@ -1301,8 +1397,9 @@ static void readWordBreak()
Q_ASSERT(ok);
}
- WordBreak brk = word_break_map.value(l[1].trimmed(), WordBreakOther);
- Q_ASSERT(brk != WordBreakOther);
+ WordBreak brk = word_break_map.value(l[1].trimmed(), WordBreak_Unassigned);
+ if (brk == WordBreak_Unassigned)
+ qFatal("unassigned word break class: %s", l[1].constData());
for (int codepoint = from; codepoint <= to; ++codepoint) {
UnicodeData ud = unicodeData.value(codepoint, UnicodeData(codepoint));
@@ -1349,8 +1446,9 @@ static void readSentenceBreak()
Q_ASSERT(ok);
}
- SentenceBreak brk = sentence_break_map.value(l[1].trimmed(), SentenceBreakOther);
- Q_ASSERT(brk != SentenceBreakOther);
+ SentenceBreak brk = sentence_break_map.value(l[1].trimmed(), SentenceBreak_Unassigned);
+ if (brk == SentenceBreak_Unassigned)
+ qFatal("unassigned sentence break class: %s", l[1].constData());
for (int codepoint = from; codepoint <= to; ++codepoint) {
UnicodeData ud = unicodeData.value(codepoint, UnicodeData(codepoint));
@@ -1644,6 +1742,7 @@ QByteArray createScriptEnumDeclaration()
"Lao",
"Malayalam",
"Myanmar",
+ "Nko",
"Ogham",
"Oriya",
"Runic",
@@ -1661,7 +1760,7 @@ QByteArray createScriptEnumDeclaration()
// generate script enum
QByteArray declaration;
- declaration += " // See http://www.unicode.org/reports/tr24/tr24-5.html\n\n";
+ declaration += " // See http://www.unicode.org/reports/tr24/tr24-5.html\n";
declaration += " enum Script {\n Common";
int uniqueScripts = 1; // Common
@@ -1671,31 +1770,35 @@ QByteArray createScriptEnumDeclaration()
QByteArray scriptName = scriptNames.at(i);
// does the script require special processing?
bool special = false;
- for (int s = 0; !special && s < specialScriptsCount; ++s) {
- if (scriptName == specialScripts[s])
+ for (int s = 0; s < specialScriptsCount; ++s) {
+ if (scriptName == specialScripts[s]) {
special = true;
+ break;
+ }
}
if (!special) {
- scriptHash[i] = 0; // alias for 'Common'
+ scriptHash[i] = 0; // alias for 'Common'
continue;
} else {
++uniqueScripts;
scriptHash[i] = i;
}
- declaration += ",\n ";
- declaration += scriptName;
+ if (scriptName != "Inherited") {
+ declaration += ",\n ";
+ declaration += scriptName;
+ }
}
+ declaration += ",\n Inherited";
declaration += ",\n ScriptCount = Inherited";
// output the ones that are an alias for 'Common'
for (int i = 1; i < scriptNames.size(); ++i) {
if (scriptHash.value(i) != 0)
continue;
- QByteArray scriptName = scriptNames.at(i);
- scriptName += " = Common";
declaration += ",\n ";
- declaration += scriptName;
+ declaration += scriptNames.at(i);
+ declaration += " = Common";
}
declaration += "\n };\n";
@@ -1831,14 +1934,15 @@ struct PropertyBlock {
PropertyBlock() { index = -1; }
int index;
QList<int> properties;
- bool operator ==(const PropertyBlock &other) { return properties == other.properties; }
+ bool operator==(const PropertyBlock &other)
+ { return properties == other.properties; }
};
static QByteArray createPropertyInfo()
{
qDebug("createPropertyInfo:");
- const int BMP_BLOCKSIZE=32;
+ const int BMP_BLOCKSIZE = 32;
const int BMP_SHIFT = 5;
const int BMP_END = 0x11000;
const int SMP_END = 0x110000;
@@ -1890,14 +1994,14 @@ static QByteArray createPropertyInfo()
int bmp_block_data = bmp_blocks*BMP_BLOCKSIZE*2;
int bmp_trie = BMP_END/BMP_BLOCKSIZE*2;
int bmp_mem = bmp_block_data + bmp_trie;
- qDebug(" %d unique blocks in BMP.",blocks.size());
+ qDebug(" %d unique blocks in BMP.", blocks.size());
qDebug(" block data uses: %d bytes", bmp_block_data);
qDebug(" trie data uses : %d bytes", bmp_trie);
- int smp_block_data = (blocks.size()- bmp_blocks)*SMP_BLOCKSIZE*2;
+ int smp_block_data = (blocks.size() - bmp_blocks)*SMP_BLOCKSIZE*2;
int smp_trie = (SMP_END-BMP_END)/SMP_BLOCKSIZE*2;
int smp_mem = smp_block_data + smp_trie;
- qDebug(" %d unique blocks in SMP.",blocks.size()-bmp_blocks);
+ qDebug(" %d unique blocks in SMP.", blocks.size()-bmp_blocks);
qDebug(" block data uses: %d bytes", smp_block_data);
qDebug(" trie data uses : %d bytes", smp_trie);
@@ -1908,7 +2012,7 @@ static QByteArray createPropertyInfo()
out += "static const unsigned short uc_property_trie[] = {\n";
// first write the map
- out += " // 0x" + QByteArray::number(BMP_END, 16);
+ out += " // 0 - 0x" + QByteArray::number(BMP_END, 16);
for (int i = 0; i < BMP_END/BMP_BLOCKSIZE; ++i) {
if (!(i % 8)) {
if (out.endsWith(' '))
@@ -1977,7 +2081,7 @@ static QByteArray createPropertyInfo()
"] + (ucs2 & 0x" + QByteArray::number(BMP_BLOCKSIZE-1, 16)+ ")])\n\n"
- "static const QUnicodeTables::Properties uc_properties [] = {\n";
+ "static const QUnicodeTables::Properties uc_properties[] = {\n";
// keep in sync with the property declaration
for (int i = 0; i < uniqueProperties.size(); ++i) {
@@ -2036,7 +2140,7 @@ static QByteArray createPropertyInfo()
out += QByteArray::number( p.wordBreak );
out += ", ";
out += QByteArray::number( p.sentenceBreak );
- out += "},\n";
+ out += " },\n";
}
out += "};\n\n";
@@ -2064,20 +2168,18 @@ static QByteArray createPropertyInfo()
" return uc_properties + index;\n"
"}\n\n";
- out += "#define CURRENT_VERSION "CURRENT_UNICODE_VERSION"\n\n";
-
- out += "static const ushort specialCaseMap [] = {";
+ out += "static const ushort specialCaseMap[] = {\n ";
for (int i = 0; i < specialCaseMap.size(); ++i) {
- if (!(i % 16))
- out += "\n ";
out += QByteArray(" 0x") + QByteArray::number(specialCaseMap.at(i), 16);
if (i < specialCaseMap.size() - 1)
out += ",";
+ if (!specialCaseMap.at(i))
+ out += "\n ";
}
out += "\n};\n";
out += "#define SPECIAL_CASE_MAX_LEN " + QByteArray::number(specialCaseMaxLen) + "\n\n";
- qDebug() << "Special case map uses " << specialCaseMap.size()*2 << "bytes";
+ qDebug("Special case map uses : %d bytes", specialCaseMap.size()*2);
return out;
}
@@ -2088,14 +2190,14 @@ struct DecompositionBlock {
int index;
QList<int> decompositionPositions;
bool operator ==(const DecompositionBlock &other)
- { return decompositionPositions == other.decompositionPositions; }
+ { return decompositionPositions == other.decompositionPositions; }
};
static QByteArray createCompositionInfo()
{
qDebug("createCompositionInfo:");
- const int BMP_BLOCKSIZE=16;
+ const int BMP_BLOCKSIZE = 16;
const int BMP_SHIFT = 4;
const int BMP_END = 0x3400; // start of Han
const int SMP_END = 0x30000;
@@ -2120,15 +2222,14 @@ static QByteArray createCompositionInfo()
if (!d.decomposition.isEmpty()) {
int utf16Chars = 0;
for (int j = 0; j < d.decomposition.size(); ++j)
- utf16Chars += d.decomposition.at(j) > 0x10000 ? 2 : 1;
+ utf16Chars += d.decomposition.at(j) >= 0x10000 ? 2 : 1;
decompositions.append(d.decompositionType + (utf16Chars<<8));
for (int j = 0; j < d.decomposition.size(); ++j) {
int code = d.decomposition.at(j);
- if (code > 0x10000) {
+ if (code >= 0x10000) {
// save as surrogate pair
- code -= 0x10000;
- ushort high = code/0x400 + 0xd800;
- ushort low = code%0x400 + 0xdc00;
+ ushort high = QChar::highSurrogate(code);
+ ushort low = QChar::lowSurrogate(code);
decompositions.append(high);
decompositions.append(low);
} else {
@@ -2162,15 +2263,14 @@ static QByteArray createCompositionInfo()
if (!d.decomposition.isEmpty()) {
int utf16Chars = 0;
for (int j = 0; j < d.decomposition.size(); ++j)
- utf16Chars += d.decomposition.at(j) > 0x10000 ? 2 : 1;
+ utf16Chars += d.decomposition.at(j) >= 0x10000 ? 2 : 1;
decompositions.append(d.decompositionType + (utf16Chars<<8));
for (int j = 0; j < d.decomposition.size(); ++j) {
int code = d.decomposition.at(j);
- if (code > 0x10000) {
+ if (code >= 0x10000) {
// save as surrogate pair
- code -= 0x10000;
- ushort high = code/0x400 + 0xd800;
- ushort low = code%0x400 + 0xdc00;
+ ushort high = QChar::highSurrogate(code);
+ ushort low = QChar::lowSurrogate(code);
decompositions.append(high);
decompositions.append(low);
} else {
@@ -2196,15 +2296,15 @@ static QByteArray createCompositionInfo()
int bmp_block_data = bmp_blocks*BMP_BLOCKSIZE*2;
int bmp_trie = BMP_END/BMP_BLOCKSIZE*2;
int bmp_mem = bmp_block_data + bmp_trie;
- qDebug(" %d unique blocks in BMP.",blocks.size());
+ qDebug(" %d unique blocks in BMP.", blocks.size());
qDebug(" block data uses: %d bytes", bmp_block_data);
qDebug(" trie data uses : %d bytes", bmp_trie);
qDebug(" memory usage: %d bytes", bmp_mem);
- int smp_block_data = (blocks.size()- bmp_blocks)*SMP_BLOCKSIZE*2;
+ int smp_block_data = (blocks.size() - bmp_blocks)*SMP_BLOCKSIZE*2;
int smp_trie = (SMP_END-BMP_END)/SMP_BLOCKSIZE*2;
int smp_mem = smp_block_data + smp_trie;
- qDebug(" %d unique blocks in SMP.",blocks.size()-bmp_blocks);
+ qDebug(" %d unique blocks in SMP.", blocks.size()-bmp_blocks);
qDebug(" block data uses: %d bytes", smp_block_data);
qDebug(" trie data uses : %d bytes", smp_trie);
@@ -2347,7 +2447,7 @@ static QByteArray createLigatureInfo()
int bmp_block_data = bmp_blocks*BMP_BLOCKSIZE*2;
int bmp_trie = BMP_END/BMP_BLOCKSIZE*2;
int bmp_mem = bmp_block_data + bmp_trie;
- qDebug(" %d unique blocks in BMP.",blocks.size());
+ qDebug(" %d unique blocks in BMP.", blocks.size());
qDebug(" block data uses: %d bytes", bmp_block_data);
qDebug(" trie data uses : %d bytes", bmp_trie);
qDebug(" ligature data uses : %d bytes", ligatures.size()*2);
@@ -2399,7 +2499,7 @@ static QByteArray createLigatureInfo()
"uc_ligature_trie[uc_ligature_trie[u2>>" + QByteArray::number(BMP_SHIFT) +
"] + (u2 & 0x" + QByteArray::number(BMP_BLOCKSIZE-1, 16)+ ")] : 0xffff);\n\n"
- "static const unsigned short uc_ligature_map [] = {\n";
+ "static const unsigned short uc_ligature_map[] = {\n";
for (int i = 0; i < ligatures.size(); ++i) {
if (!(i % 8)) {
@@ -2433,19 +2533,20 @@ QByteArray createCasingInfo()
int main(int, char **)
{
+ initAgeMap();
initCategoryMap();
initDirectionMap();
initDecompositionMap();
initGraphemeBreak();
initWordBreak();
initSentenceBreak();
-
+ initLineBreak();
+
readUnicodeData();
readBidiMirroring();
readArabicShaping();
readDerivedAge();
- readCompositionExclusion();
- readLineBreak();
+ readDerivedNormalizationProps();
readSpecialCasing();
readCaseFolding();
// readBlocks();
@@ -2453,6 +2554,7 @@ int main(int, char **)
readGraphemeBreak();
readWordBreak();
readSentenceBreak();
+ readLineBreak();
computeUniqueProperties();
QByteArray properties = createPropertyInfo();
@@ -2462,9 +2564,6 @@ int main(int, char **)
QByteArray scriptEnumDeclaration = createScriptEnumDeclaration();
QByteArray scriptTableDeclaration = createScriptTableDeclaration();
- QFile f("../../src/corelib/tools/qunicodetables.cpp");
- f.open(QFile::WriteOnly|QFile::Truncate);
-
QByteArray header =
"/****************************************************************************\n"
"**\n"
@@ -2505,9 +2604,10 @@ int main(int, char **)
"**\n"
"** $QT_END_LICENSE$\n"
"**\n"
- "****************************************************************************/\n\n"
+ "****************************************************************************/\n\n";
- "/* This file is autogenerated from the Unicode 5.0 database. Do not edit */\n\n";
+ QByteArray note =
+ "/* This file is autogenerated from the Unicode "DATA_VERSION_S" database. Do not edit */\n\n";
QByteArray warning =
"//\n"
@@ -2521,41 +2621,47 @@ int main(int, char **)
"// We mean it.\n"
"//\n\n";
+ QFile f("../../src/corelib/tools/qunicodetables.cpp");
+ f.open(QFile::WriteOnly|QFile::Truncate);
f.write(header);
+ f.write(note);
f.write("QT_BEGIN_NAMESPACE\n\n");
f.write(properties);
f.write(compositions);
f.write(ligatures);
f.write(normalizationCorrections);
f.write(scriptTableDeclaration);
- f.write("\nQT_END_NAMESPACE\n");
+ f.write("QT_END_NAMESPACE\n");
f.close();
f.setFileName("../../src/corelib/tools/qunicodetables_p.h");
f.open(QFile::WriteOnly | QFile::Truncate);
f.write(header);
+ f.write(note);
f.write(warning);
f.write("#ifndef QUNICODETABLES_P_H\n"
"#define QUNICODETABLES_P_H\n\n"
"#include <QtCore/qchar.h>\n\n"
"QT_BEGIN_NAMESPACE\n\n");
- f.write("namespace QUnicodeTables {\n");
+ f.write("#define UNICODE_DATA_VERSION "DATA_VERSION_STR"\n\n");
+ f.write("#define UNICODE_LAST_CODEPOINT "LAST_CODEPOINT_STR"\n\n");
+ f.write("namespace QUnicodeTables {\n\n");
f.write(property_string);
f.write("\n");
f.write(scriptEnumDeclaration);
f.write("\n");
f.write(lineBreakClass);
f.write("\n");
- f.write(methods);
- f.write("\n");
f.write(grapheme_break_string);
f.write("\n");
f.write(word_break_string);
f.write("\n");
f.write(sentence_break_string);
- f.write("\n}\n\n"
+ f.write("\n");
+ f.write(methods);
+ f.write("} // namespace QUnicodeTables\n\n"
"QT_END_NAMESPACE\n\n"
- "#endif\n");
+ "#endif // QUNICODETABLES_P_H\n");
f.close();
qDebug() << "maxMirroredDiff = " << hex << maxMirroredDiff;
@@ -2578,7 +2684,7 @@ int main(int, char **)
sum += decompositionLength.value(i, 0);
}
qDebug(" len decomposition map %d, average length %f, num composed chars %d",
- totalcompositions, (float)totalcompositions/(float)sum, sum);
+ totalcompositions, (float)totalcompositions/(float)sum, sum);
qDebug("highest composed character %x", highestComposedCharacter);
qDebug("num ligatures = %d highest=%x, maxLength=%d", numLigatures, highestLigature, longestLigature);
@@ -2599,4 +2705,3 @@ int main(int, char **)
#endif
}
-
diff --git a/util/unicode/unicode.pro b/util/unicode/unicode.pro
index a53f70ac92..0250c2a43a 100644
--- a/util/unicode/unicode.pro
+++ b/util/unicode/unicode.pro
@@ -1,2 +1,3 @@
SOURCES += main.cpp
QT = core
+CONFIG += console
diff --git a/util/webkit/mkdist-webkit b/util/webkit/mkdist-webkit
index ddf74bbee6..e8426b1ed8 100755
--- a/util/webkit/mkdist-webkit
+++ b/util/webkit/mkdist-webkit
@@ -20,7 +20,7 @@ if [ -z "$repository" ]; then
die "error: cannot locate webkit git repository. please run git config --global qtwebkit.url /path-or-url/to/webkit/repo"
fi
-excluded_directories="LayoutTests JavaScriptGlue WebKitLibraries WebKitSite WebKitTools WebCore/platform/cf WebCore/platform/gtk WebCore/platform/chromium"
+excluded_directories="LayoutTests JavaScriptGlue WebKitLibraries WebKitSite WebKitTools WebCore/platform/gtk WebCore/platform/chromium"
excluded_directories="$excluded_directories PageLoadTests"
excluded_directories="$excluded_directories BugsSite"
excluded_directories="$excluded_directories PlanetWebKit"
@@ -49,6 +49,8 @@ excluded_directories="$excluded_directories JavaScriptCore/wtf/mac"
excluded_directories="$excluded_directories JavaScriptCore/wtf/win"
excluded_directories="$excluded_directories JavaScriptCore/wtf/chromium"
excluded_directories="$excluded_directories JavaScriptCore/wtf/haiku"
+excluded_directories="$excluded_directories JavaScriptCore/wtf/android"
+excluded_directories="$excluded_directories JavaScriptCore/wtf/brew"
excluded_directories="$excluded_directories WebCore/WebCore.vcproj"
excluded_directories="$excluded_directories WebCore/WebCore.gyp"
@@ -81,41 +83,52 @@ excluded_directories="$excluded_directories WebCore/page/wx"
excluded_directories="$excluded_directories WebCore/page/chromium"
excluded_directories="$excluded_directories WebCore/page/haiku"
excluded_directories="$excluded_directories WebCore/page/wince"
+excluded_directories="$excluded_directories WebCore/page/android"
+excluded_directories="$excluded_directories WebCore/page/brew"
excluded_directories="$excluded_directories WebCore/history/mac"
+excluded_directories="$excluded_directories WebCore/history/android"
excluded_directories="$excluded_directories WebCore/editing/mac"
excluded_directories="$excluded_directories WebCore/editing/wx"
excluded_directories="$excluded_directories WebCore/editing/haiku"
+excluded_directories="$excluded_directories WebCore/editing/android"
+excluded_directories="$excluded_directories WebCore/editing/chromium"
+excluded_directories="$excluded_directories WebCore/editing/gtk"
excluded_directories="$excluded_directories WebCore/platform/haiku"
+excluded_directories="$excluded_directories WebCore/platform/android"
+excluded_directories="$excluded_directories WebCore/platform/brew"
excluded_directories="$excluded_directories WebCore/platform/text/wx"
excluded_directories="$excluded_directories WebCore/platform/text/gtk"
excluded_directories="$excluded_directories WebCore/platform/text/chromium"
excluded_directories="$excluded_directories WebCore/platform/text/haiku"
+excluded_directories="$excluded_directories WebCore/platform/text/android"
+excluded_directories="$excluded_directories WebCore/platform/text/brew"
excluded_directories="$excluded_directories WebCore/platform/sql/chromium"
excluded_directories="$excluded_directories WebCore/manual-tests"
-excluded_directories="$excluded_directories WebCore/platform/network/cf"
excluded_directories="$excluded_directories WebCore/platform/network/curl"
excluded_directories="$excluded_directories WebCore/platform/network/mac"
excluded_directories="$excluded_directories WebCore/platform/network/win"
excluded_directories="$excluded_directories WebCore/platform/network/soup"
excluded_directories="$excluded_directories WebCore/platform/network/chromium"
+excluded_directories="$excluded_directories WebCore/platform/network/android"
+excluded_directories="$excluded_directories WebCore/platform/network/brew"
excluded_directories="$excluded_directories WebCore/platform/graphics/cg"
excluded_directories="$excluded_directories WebCore/platform/graphics/cairo"
excluded_directories="$excluded_directories WebCore/platform/graphics/gtk"
excluded_directories="$excluded_directories WebCore/platform/graphics/wx"
excluded_directories="$excluded_directories WebCore/platform/graphics/mac"
-excluded_directories="$excluded_directories WebCore/platform/graphics/win"
excluded_directories="$excluded_directories WebCore/platform/graphics/skia"
excluded_directories="$excluded_directories WebCore/platform/graphics/chromium"
excluded_directories="$excluded_directories WebCore/platform/graphics/wince"
excluded_directories="$excluded_directories WebCore/platform/graphics/haiku"
+excluded_directories="$excluded_directories WebCore/platform/graphics/brew"
excluded_directories="$excluded_directories WebCore/platform/image-decoders/bmp"
excluded_directories="$excluded_directories WebCore/platform/image-decoders/gif"
@@ -126,11 +139,13 @@ excluded_directories="$excluded_directories WebCore/platform/image-decoders/jpeg
excluded_directories="$excluded_directories WebCore/platform/image-decoders/xbm"
excluded_directories="$excluded_directories WebCore/platform/image-decoders/skia"
excluded_directories="$excluded_directories WebCore/platform/image-decoders/haiku"
+excluded_directories="$excluded_directories WebCore/platform/image-decoders/wx"
excluded_directories="$excluded_directories WebCore/platform/image-encoders/skia"
excluded_directories="$excluded_directories WebCore/plugins/gtk"
excluded_directories="$excluded_directories WebCore/plugins/chromium"
+excluded_directories="$excluded_directories WebCore/plugins/wx"
excluded_directories="$excluded_directories WebCore/accessibility/chromium"
excluded_directories="$excluded_directories WebCore/accessibility/gtk"
@@ -139,6 +154,7 @@ excluded_directories="$excluded_directories WebCore/accessibility/win"
excluded_directories="$excluded_directories WebCore/accessibility/wx"
excluded_directories="$excluded_directories WebCore/storage/wince"
+excluded_directories="$excluded_directories WebCore/storage/chromium"
excluded_directories="$excluded_directories WebCore/platform/wx"
excluded_directories="$excluded_directories WebCore/platform/wince"
@@ -196,6 +212,7 @@ files_to_remove="$files_to_remove autogen.sh"
files_to_remove="$files_to_remove configure.ac"
files_to_remove="$files_to_remove WebKit.pro"
+files_to_remove="$files_to_remove DerivedSources.pro"
files_to_remove="$files_to_remove WebKit/qt/QtLauncher/QtLauncher.pro"
files_to_remove="$files_to_remove WebKit/qt/QtLauncher/main.cpp"
@@ -311,16 +328,11 @@ echo "generating extra sources"
(
for proj in JavaScriptCore WebCore; do
cd $absSrcDir/$proj &&
- rm -rf tmp &&
- mkdir tmp &&
- cd tmp &&
- mkdir -p ../generated &&
- qmake -o Makefile CONFIG-=QTDIR_build QT_CONFIG+=phonon GENERATED_SOURCES_DIR=`pwd`/../generated OUTPUT_DIR=`pwd` ../$proj.pro &&
+ qmake -o Makefile DerivedSources.pro &&
make generated_files &&
- perl -pi -e "s,$absSrcDir/,,g" ../generated/*.cpp ../generated/*.h &&
- git add ../generated &&
- cd .. &&
- rm -rf tmp &&
+ perl -pi -e "s,$absSrcDir/,,g" generated/*.cpp generated/*.h &&
+ git add generated &&
+ rm DerivedSources.pro Makefile &&
cd ..
done
)